From 2084734a4138d7116206e2f3ce5abd705c30e20c Mon Sep 17 00:00:00 2001 From: Kaylie <50653231+kaylieee@users.noreply.github.com> Date: Wed, 30 Sep 2026 21:46:05 -0700 Subject: [PATCH 01/13] Renames and Bug fixes (#50643) * add allow preview on evaluators builder * renames and int to long type update * fix skills serialization bug * update beta client javadoc * stop emitting eval level * fix spotless --- sdk/ai/azure-ai-projects/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index e6b961771db1..7fc0c129dab7 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -8,6 +8,8 @@ ### Bugs Fixed +- Fixed skill file uploads to omit an unset `default` flag instead of sending the literal text `null`. + ### Other Changes ## 2.7.0 (2026-10-06) From 2584be27d43c30681f587d3291f17fc4b1ed9b18 Mon Sep 17 00:00:00 2001 From: Kaylie <50653231+kaylieee@users.noreply.github.com> Date: Fri, 2 Oct 2026 16:05:14 -0700 Subject: [PATCH 02/13] Regen from latest spec (#50663) * initial projects regen * fix stale refs * fix agents customizations * update beta annotations * add explicit type --- sdk/ai/azure-ai-projects/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index 7fc0c129dab7..b4047cce8182 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -9,6 +9,7 @@ ### Bugs Fixed - Fixed skill file uploads to omit an unset `default` flag instead of sending the literal text `null`. +- Updated preserved data generation deserializers and samples to use the renamed configuration models and evaluator generation inputs. ### Other Changes From 331d62f79a7b0bdeed3b273268d206bffff5d7d2 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Mon, 5 Oct 2026 15:47:57 -0700 Subject: [PATCH 03/13] update changelog --- sdk/ai/azure-ai-projects/CHANGELOG.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index b4047cce8182..f2f67a8e4745 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -4,12 +4,28 @@ ### Features Added +- Added `EvaluatorsClient` and `EvaluatorsAsyncClient`, built directly through + `AIProjectClientBuilder.buildEvaluatorsClient()` and `buildEvaluatorsAsyncClient()`, for generally available + evaluator-version management and rubric-generation jobs. Preview evaluator definitions such as + `EndpointBasedEvaluatorDefinition` require `allowPreview(true)`. `BetaEvaluatorsClient` and + `BetaEvaluatorsAsyncClient` retain preview pending-upload and credential operations. +- Evaluation data generation graduated to general availability on `DatasetsClient` and `DatasetsAsyncClient`. + Added scenario-specific input and result models for evaluation, supervised fine-tuning, and reinforcement + fine-tuning. Fine-tuning scenarios remain in preview and require `allowPreview(true)`; their output configurations + support merge-file IDs. +- Added `ConnectionType.OPEN_API` (`OpenAPI`) and `ConnectionType.REMOTE_A2A` (`RemoteA2A`) for listing and identifying + OpenAPI and remote agent-to-agent connections. +- Added `ApiError.getMisalignment()` to expose structured misalignment details using the OpenAI + `ErrorObject.Misalignment` model. + ### Breaking Changes ### Bugs Fixed +- Fixed OpenAI clients built from `AIProjectClientBuilder` to acquire bearer tokens through the Azure HTTP pipeline. + Asynchronous clients now use asynchronous token acquisition instead of calling `TokenCredential.getTokenSync(...)`; + synchronous clients continue to use synchronous token acquisition. - Fixed skill file uploads to omit an unset `default` flag instead of sending the literal text `null`. -- Updated preserved data generation deserializers and samples to use the renamed configuration models and evaluator generation inputs. ### Other Changes From 3eca147ecacd0f6c3a08e4e6094b10f26d456757 Mon Sep 17 00:00:00 2001 From: Kaylie <50653231+kaylieee@users.noreply.github.com> Date: Fri, 9 Oct 2026 14:25:06 -0700 Subject: [PATCH 04/13] Regen from spec 10-09-26 (#50741) * initial regen * beta annotations --- .../customizations/beta-annotations.csv | 6 +- .../BetaVoiceAgentsTelephonyAsyncClient.java | 28 ++++---- .../BetaVoiceAgentsTelephonyClient.java | 28 ++++---- .../BetaVoiceAgentsTelephoniesImpl.java | 72 +++++++++---------- .../models/FoundryFeaturesOptInKeys.java | 7 +- .../com/azure/ai/agents/models/ApiError.java | 12 ++-- ...neExtensibilityTelephonyBindingInput.java} | 39 +++++----- .../models/CreateTelephonyBindingInput.java | 4 +- .../models/CreateTelephonyCallJobInput.java | 14 ++-- .../com/azure/ai/agents/models/PageOrder.java | 4 +- .../agents/models/SessionConfiguration.java | 19 +++-- ...msPhoneExtensibilityTelephonyBinding.java} | 34 ++++----- ...xtensibilityTelephonyBindingListItem.java} | 38 +++++----- .../ai/agents/models/TelephonyBinding.java | 4 +- .../models/TelephonyBindingListItem.java | 4 +- .../ai/agents/models/TelephonyCallJob.java | 14 ++-- .../TelephonyCallLifecycleEventSource.java | 13 ++-- .../ai/agents/models/TelephonyCallRecord.java | 4 +- .../agents/models/TelephonyCallSummary.java | 4 +- .../ai/agents/models/TelephonyProvider.java | 12 ++-- .../models/UpdateTelephonyBindingInput.java | 18 ++--- .../META-INF/azure-ai-agents_metadata.json | 2 +- sdk/ai/azure-ai-agents/tsp-location.yaml | 2 +- .../models/FoundryFeaturesOptInKeys.java | 7 +- .../azure/ai/projects/models/ApiError.java | 12 ++-- .../META-INF/azure-ai-projects_metadata.json | 2 +- sdk/ai/azure-ai-projects/tsp-location.yaml | 2 +- 27 files changed, 207 insertions(+), 198 deletions(-) rename sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/{CreateTeamsPhoneExtensionTelephonyBindingInput.java => CreateTeamsPhoneExtensibilityTelephonyBindingInput.java} (72%) rename sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/{TeamsPhoneExtensionTelephonyBinding.java => TeamsPhoneExtensibilityTelephonyBinding.java} (79%) rename sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/{TeamsPhoneExtensionTelephonyBindingListItem.java => TeamsPhoneExtensibilityTelephonyBindingListItem.java} (75%) diff --git a/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv b/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv index c59401d8cdb5..4966294530ac 100644 --- a/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv +++ b/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv @@ -23,7 +23,7 @@ class;com.azure.ai.agents.models.ChatSummaryMemoryItem;Preview API. MemoryStores field;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. DigitalWorker=V1Preview, DraftAgents=V1Preview, ExternalAgents=V1Preview, GitHubCopilot=V1Preview, Skills=V1Preview, VoiceAgents=V1Preview, WorkflowAgents=V1Preview;definition field;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. DigitalWorker=V1Preview;digital_worker_type field;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. DraftAgents=V1Preview;draft -class;com.azure.ai.agents.models.CreateTeamsPhoneExtensionTelephonyBindingInput;Preview API. VoiceAgents=V1Preview; +class;com.azure.ai.agents.models.CreateTeamsPhoneExtensibilityTelephonyBindingInput;Preview API. VoiceAgents=V1Preview; class;com.azure.ai.agents.models.CreateTelephonyBindingInput;Preview API. VoiceAgents=V1Preview; class;com.azure.ai.agents.models.CreateTelephonyCallJobInput;Preview API. VoiceAgents=V1Preview; class;com.azure.ai.agents.models.CreateTwilioTelephonyBindingInput;Preview API. VoiceAgents=V1Preview; @@ -190,8 +190,8 @@ class;com.azure.ai.agents.models.SharepointGroundingToolParameters;Preview API. class;com.azure.ai.agents.models.SharepointPreviewTool;Preview API. preview_tool; class;com.azure.ai.agents.models.SipTelephonyTransferDestination;Preview API. VoiceAgents=V1Preview; class;com.azure.ai.agents.models.SkillReference;Preview API. Skills=V1Preview; -class;com.azure.ai.agents.models.TeamsPhoneExtensionTelephonyBinding;Preview API. VoiceAgents=V1Preview; -class;com.azure.ai.agents.models.TeamsPhoneExtensionTelephonyBindingListItem;Preview API. VoiceAgents=V1Preview; +class;com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBinding;Preview API. VoiceAgents=V1Preview; +class;com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBindingListItem;Preview API. VoiceAgents=V1Preview; class;com.azure.ai.agents.models.TeamsTelephonyTransferDestination;Preview API. VoiceAgents=V1Preview; class;com.azure.ai.agents.models.TelephonyBinding;Preview API. VoiceAgents=V1Preview; class;com.azure.ai.agents.models.TelephonyBindingListItem;Preview API. VoiceAgents=V1Preview; diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java index 3d0420573ad6..04e47303e6c4 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java @@ -81,7 +81,7 @@ public final class BetaVoiceAgentsTelephonyAsyncClient { *
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
      * }
@@ -93,7 +93,7 @@ public final class BetaVoiceAgentsTelephonyAsyncClient {
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -137,7 +137,7 @@ public Mono> createTelephonyBindingWithResponse(String agen
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters bindings by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters bindings by lifecycle status. Allowed values: "active",
      * "suspended".
      * limitIntegerNoA limit on the number of objects to be returned. Limit can range
@@ -161,7 +161,7 @@ public Mono> createTelephonyBindingWithResponse(String agen
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -195,7 +195,7 @@ public PagedFlux listTelephonyBindings(String agentName, RequestOpti
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -254,7 +254,7 @@ public Mono> getTelephonyBindingWithResponse(String agentNa
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -326,7 +326,7 @@ public Mono> deleteTelephonyBindingWithResponse(String agentName,
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters calls by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters calls by lifecycle status. Allowed values:
      * "in_progress", "success", "failed".
      * started_afterOffsetDateTimeNoIncludes calls that started at or after this Unix
@@ -355,7 +355,7 @@ public Mono> deleteTelephonyBindingWithResponse(String agentName,
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -399,7 +399,7 @@ public PagedFlux listTelephonyCalls(String agentName, RequestOptions
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -440,7 +440,7 @@ public PagedFlux listTelephonyCalls(String agentName, RequestOptions
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
@@ -496,7 +496,7 @@ public Mono> getTelephonyCallWithResponse(String agentName,
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -537,7 +537,7 @@ public Mono> getTelephonyCallWithResponse(String agentName,
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
@@ -583,7 +583,7 @@ public Mono> transferTelephonyCallWithResponse(String agent
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -624,7 +624,7 @@ public Mono> transferTelephonyCallWithResponse(String agent
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java
index 42bafcfc4634..7007d748afb7 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java
@@ -75,7 +75,7 @@ public final class BetaVoiceAgentsTelephonyClient {
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
      * }
@@ -87,7 +87,7 @@ public final class BetaVoiceAgentsTelephonyClient {
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -130,7 +130,7 @@ public Response createTelephonyBindingWithResponse(String agentName,
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters bindings by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters bindings by lifecycle status. Allowed values: "active",
      * "suspended".
      * limitIntegerNoA limit on the number of objects to be returned. Limit can range
@@ -154,7 +154,7 @@ public Response createTelephonyBindingWithResponse(String agentName,
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -188,7 +188,7 @@ public PagedIterable listTelephonyBindings(String agentName, Request
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -246,7 +246,7 @@ public Response getTelephonyBindingWithResponse(String agentName, St
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -316,7 +316,7 @@ public Response deleteTelephonyBindingWithResponse(String agentName, Strin
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters calls by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters calls by lifecycle status. Allowed values:
      * "in_progress", "success", "failed".
      * started_afterOffsetDateTimeNoIncludes calls that started at or after this Unix
@@ -345,7 +345,7 @@ public Response deleteTelephonyBindingWithResponse(String agentName, Strin
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -389,7 +389,7 @@ public PagedIterable listTelephonyCalls(String agentName, RequestOpt
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -430,7 +430,7 @@ public PagedIterable listTelephonyCalls(String agentName, RequestOpt
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
@@ -485,7 +485,7 @@ public Response getTelephonyCallWithResponse(String agentName, Strin
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -526,7 +526,7 @@ public Response getTelephonyCallWithResponse(String agentName, Strin
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
@@ -571,7 +571,7 @@ public Response transferTelephonyCallWithResponse(String agentName,
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -612,7 +612,7 @@ public Response transferTelephonyCallWithResponse(String agentName,
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java
index 30569d01843b..ff916b93367d 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java
@@ -418,7 +418,7 @@ Response cancelTelephonyCallJobSync(@HostParam("endpoint") String en
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
      * }
@@ -430,7 +430,7 @@ Response cancelTelephonyCallJobSync(@HostParam("endpoint") String en
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -500,7 +500,7 @@ public Mono> createTelephonyBindingWithResponseAsync(String
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
      * }
@@ -512,7 +512,7 @@ public Mono> createTelephonyBindingWithResponseAsync(String
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -572,7 +572,7 @@ public Response createTelephonyBindingWithResponse(String agentName,
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters bindings by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters bindings by lifecycle status. Allowed values: "active",
      * "suspended".
      * limitIntegerNoA limit on the number of objects to be returned. Limit can range
@@ -596,7 +596,7 @@ public Response createTelephonyBindingWithResponse(String agentName,
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -636,7 +636,7 @@ private Mono> listTelephonyBindingsSinglePageAsync(Str
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters bindings by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters bindings by lifecycle status. Allowed values: "active",
      * "suspended".
      * limitIntegerNoA limit on the number of objects to be returned. Limit can range
@@ -660,7 +660,7 @@ private Mono> listTelephonyBindingsSinglePageAsync(Str
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -693,7 +693,7 @@ public PagedFlux listTelephonyBindingsAsync(String agentName, Reques
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters bindings by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters bindings by lifecycle status. Allowed values: "active",
      * "suspended".
      * limitIntegerNoA limit on the number of objects to be returned. Limit can range
@@ -717,7 +717,7 @@ public PagedFlux listTelephonyBindingsAsync(String agentName, Reques
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -754,7 +754,7 @@ private PagedResponse listTelephonyBindingsSinglePage(String agentNa
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters bindings by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters bindings by lifecycle status. Allowed values: "active",
      * "suspended".
      * limitIntegerNoA limit on the number of objects to be returned. Limit can range
@@ -778,7 +778,7 @@ private PagedResponse listTelephonyBindingsSinglePage(String agentNa
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -811,7 +811,7 @@ public PagedIterable listTelephonyBindings(String agentName, Request
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -858,7 +858,7 @@ public Mono> getTelephonyBindingWithResponseAsync(String ag
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -917,7 +917,7 @@ public Response getTelephonyBindingWithResponse(String agentName, St
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -980,7 +980,7 @@ public Mono> updateTelephonyBindingWithResponseAsync(String
      * 
      * {@code
      * {
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     id: String (Required)
      *     connection_name: String (Required)
      *     label: String (Optional)
@@ -1074,7 +1074,7 @@ public Response deleteTelephonyBindingWithResponse(String agentName, Strin
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters calls by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters calls by lifecycle status. Allowed values:
      * "in_progress", "success", "failed".
      * started_afterOffsetDateTimeNoIncludes calls that started at or after this Unix
@@ -1103,7 +1103,7 @@ public Response deleteTelephonyBindingWithResponse(String agentName, Strin
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1152,7 +1152,7 @@ private Mono> listTelephonyCallsSinglePageAsync(String
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters calls by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters calls by lifecycle status. Allowed values:
      * "in_progress", "success", "failed".
      * started_afterOffsetDateTimeNoIncludes calls that started at or after this Unix
@@ -1181,7 +1181,7 @@ private Mono> listTelephonyCallsSinglePageAsync(String
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1223,7 +1223,7 @@ public PagedFlux listTelephonyCallsAsync(String agentName, RequestOp
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters calls by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters calls by lifecycle status. Allowed values:
      * "in_progress", "success", "failed".
      * started_afterOffsetDateTimeNoIncludes calls that started at or after this Unix
@@ -1252,7 +1252,7 @@ public PagedFlux listTelephonyCallsAsync(String agentName, RequestOp
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1298,7 +1298,7 @@ private PagedResponse listTelephonyCallsSinglePage(String agentName,
      * Query Parameters
      * NameTypeRequiredDescription
      * providerStringNoFilters calls by provider. Allowed values:
-     * "teams_phone_extension", "twilio".
+     * "teams_phone_extensibility", "twilio".
      * statusStringNoFilters calls by lifecycle status. Allowed values:
      * "in_progress", "success", "failed".
      * started_afterOffsetDateTimeNoIncludes calls that started at or after this Unix
@@ -1327,7 +1327,7 @@ private PagedResponse listTelephonyCallsSinglePage(String agentName,
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1370,7 +1370,7 @@ public PagedIterable listTelephonyCalls(String agentName, RequestOpt
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1411,7 +1411,7 @@ public PagedIterable listTelephonyCalls(String agentName, RequestOpt
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
@@ -1458,7 +1458,7 @@ public Mono> getTelephonyCallWithResponseAsync(String agent
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1499,7 +1499,7 @@ public Mono> getTelephonyCallWithResponseAsync(String agent
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
@@ -1555,7 +1555,7 @@ public Response getTelephonyCallWithResponse(String agentName, Strin
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1596,7 +1596,7 @@ public Response getTelephonyCallWithResponse(String agentName, Strin
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
@@ -1654,7 +1654,7 @@ public Mono> transferTelephonyCallWithResponseAsync(String
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1695,7 +1695,7 @@ public Mono> transferTelephonyCallWithResponseAsync(String
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
@@ -1742,7 +1742,7 @@ public Response transferTelephonyCallWithResponse(String agentName,
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1783,7 +1783,7 @@ public Response transferTelephonyCallWithResponse(String agentName,
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
@@ -1828,7 +1828,7 @@ public Mono> endTelephonyCallWithResponseAsync(String agent
      * {@code
      * {
      *     id: String (Required)
-     *     provider: String(teams_phone_extension/twilio) (Required)
+     *     provider: String(teams_phone_extensibility/twilio) (Required)
      *     provider_call_id: String (Optional)
      *     caller_number: String (Optional)
      *     provider_number: String (Optional)
@@ -1869,7 +1869,7 @@ public Mono> endTelephonyCallWithResponseAsync(String agent
      *          (Required){
      *             sequence: long (Required)
      *             name: String(telephony.webhook.received/telephony.webhook.validation/telephony.binding.resolve/telephony.provider.answer/telephony.media.connect/telephony.agent_session.connect/telephony.media.first_caller_audio/telephony.media.first_agent_audio/telephony.call.transfer/telephony.call.hangup/telephony.call.disconnect) (Required)
-     *             source: String(gateway/teams_phone_extension/twilio/voice_agent) (Required)
+     *             source: String(gateway/teams_phone_extensibility/twilio/voice_agent) (Required)
      *             outcome: String(observed/started/succeeded/failed/rejected/cancelled) (Required)
      *             observed_at: long (Required)
      *             occurred_at: Long (Optional)
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java
index 13624be70d8d..4fd951ebb1b4 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java
@@ -61,7 +61,12 @@ public enum FoundryFeaturesOptInKeys {
     /**
      * Enum value ModelRouterControls=V1Preview.
      */
-    MODEL_ROUTER_CONTROLS_V1_PREVIEW("ModelRouterControls=V1Preview");
+    MODEL_ROUTER_CONTROLS_V1_PREVIEW("ModelRouterControls=V1Preview"),
+
+    /**
+     * Enum value FineTuningSessions=V1Preview.
+     */
+    FINETUNING_SESSIONS_V1_PREVIEW("FineTuningSessions=V1Preview");
 
     /**
      * The actual serialized value for a FoundryFeaturesOptInKeys instance.
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ApiError.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ApiError.java
index afe8c89b3afa..dbe0fcabe10a 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ApiError.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ApiError.java
@@ -47,19 +47,19 @@ public final class ApiError implements JsonSerializable {
     private String type;
 
     /*
-     * The details property.
+     * Additional errors that contributed to this failure.
      */
     @Generated
     private List details;
 
     /*
-     * The additionalInfo property.
+     * Additional structured information about the failure.
      */
     @Generated
     private Map additionalInfo;
 
     /*
-     * The debugInfo property.
+     * Diagnostic information supplied by the service for troubleshooting.
      */
     @Generated
     private Map debugInfo;
@@ -117,7 +117,7 @@ public String getType() {
     }
 
     /**
-     * Get the details property: The details property.
+     * Get the details property: Additional errors that contributed to this failure.
      *
      * @return the details value.
      */
@@ -127,7 +127,7 @@ public List getDetails() {
     }
 
     /**
-     * Get the additionalInfo property: The additionalInfo property.
+     * Get the additionalInfo property: Additional structured information about the failure.
      *
      * @return the additionalInfo value.
      */
@@ -137,7 +137,7 @@ public Map getAdditionalInfo() {
     }
 
     /**
-     * Get the debugInfo property: The debugInfo property.
+     * Get the debugInfo property: Diagnostic information supplied by the service for troubleshooting.
      *
      * @return the debugInfo value.
      */
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensionTelephonyBindingInput.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensibilityTelephonyBindingInput.java
similarity index 72%
rename from sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensionTelephonyBindingInput.java
rename to sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensibilityTelephonyBindingInput.java
index 440d0dd5674c..978a05c0a667 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensionTelephonyBindingInput.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensibilityTelephonyBindingInput.java
@@ -12,17 +12,17 @@
 import java.io.IOException;
 
 /**
- * The request to create a Microsoft Teams Phone Extension binding.
+ * The request to create a Microsoft Teams Phone extensibility binding.
  */
 @Fluent
 @Beta(warningText = "Preview API. VoiceAgents=V1Preview")
-public final class CreateTeamsPhoneExtensionTelephonyBindingInput extends CreateTelephonyBindingInput {
+public final class CreateTeamsPhoneExtensibilityTelephonyBindingInput extends CreateTelephonyBindingInput {
 
     /*
      * The telephony provider.
      */
     @Generated
-    private TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSION;
+    private TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSIBILITY;
 
     /*
      * The optional display phone number for the Teams resource account.
@@ -37,13 +37,13 @@ public final class CreateTeamsPhoneExtensionTelephonyBindingInput extends Create
     private final String resourceAccountObjectId;
 
     /**
-     * Creates an instance of CreateTeamsPhoneExtensionTelephonyBindingInput class.
+     * Creates an instance of CreateTeamsPhoneExtensibilityTelephonyBindingInput class.
      *
      * @param connectionName the connectionName value to set.
      * @param resourceAccountObjectId the resourceAccountObjectId value to set.
      */
     @Generated
-    public CreateTeamsPhoneExtensionTelephonyBindingInput(String connectionName, String resourceAccountObjectId) {
+    public CreateTeamsPhoneExtensibilityTelephonyBindingInput(String connectionName, String resourceAccountObjectId) {
         super(connectionName);
         this.resourceAccountObjectId = resourceAccountObjectId;
     }
@@ -73,10 +73,10 @@ public String getPhoneNumber() {
      * Set the phoneNumber property: The optional display phone number for the Teams resource account.
      *
      * @param phoneNumber the phoneNumber value to set.
-     * @return the CreateTeamsPhoneExtensionTelephonyBindingInput object itself.
+     * @return the CreateTeamsPhoneExtensibilityTelephonyBindingInput object itself.
      */
     @Generated
-    public CreateTeamsPhoneExtensionTelephonyBindingInput setPhoneNumber(String phoneNumber) {
+    public CreateTeamsPhoneExtensibilityTelephonyBindingInput setPhoneNumber(String phoneNumber) {
         this.phoneNumber = phoneNumber;
         return this;
     }
@@ -96,7 +96,7 @@ public String getResourceAccountObjectId() {
      */
     @Generated
     @Override
-    public CreateTeamsPhoneExtensionTelephonyBindingInput setLabel(String label) {
+    public CreateTeamsPhoneExtensibilityTelephonyBindingInput setLabel(String label) {
         super.setLabel(label);
         return this;
     }
@@ -117,21 +117,22 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
     }
 
     /**
-     * Reads an instance of CreateTeamsPhoneExtensionTelephonyBindingInput from the JsonReader.
+     * Reads an instance of CreateTeamsPhoneExtensibilityTelephonyBindingInput from the JsonReader.
      *
      * @param jsonReader The JsonReader being read.
-     * @return An instance of CreateTeamsPhoneExtensionTelephonyBindingInput if the JsonReader was pointing to an
+     * @return An instance of CreateTeamsPhoneExtensibilityTelephonyBindingInput if the JsonReader was pointing to an
      * instance of it, or null if it was pointing to JSON null.
      * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
-     * @throws IOException If an error occurs while reading the CreateTeamsPhoneExtensionTelephonyBindingInput.
+     * @throws IOException If an error occurs while reading the CreateTeamsPhoneExtensibilityTelephonyBindingInput.
      */
     @Generated
-    public static CreateTeamsPhoneExtensionTelephonyBindingInput fromJson(JsonReader jsonReader) throws IOException {
+    public static CreateTeamsPhoneExtensibilityTelephonyBindingInput fromJson(JsonReader jsonReader)
+        throws IOException {
         return jsonReader.readObject(reader -> {
             String connectionName = null;
             String label = null;
             String resourceAccountObjectId = null;
-            TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSION;
+            TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSIBILITY;
             String phoneNumber = null;
             while (reader.nextToken() != JsonToken.END_OBJECT) {
                 String fieldName = reader.getFieldName();
@@ -150,12 +151,12 @@ public static CreateTeamsPhoneExtensionTelephonyBindingInput fromJson(JsonReader
                     reader.skipChildren();
                 }
             }
-            CreateTeamsPhoneExtensionTelephonyBindingInput deserializedCreateTeamsPhoneExtensionTelephonyBindingInput
-                = new CreateTeamsPhoneExtensionTelephonyBindingInput(connectionName, resourceAccountObjectId);
-            deserializedCreateTeamsPhoneExtensionTelephonyBindingInput.setLabel(label);
-            deserializedCreateTeamsPhoneExtensionTelephonyBindingInput.provider = provider;
-            deserializedCreateTeamsPhoneExtensionTelephonyBindingInput.phoneNumber = phoneNumber;
-            return deserializedCreateTeamsPhoneExtensionTelephonyBindingInput;
+            CreateTeamsPhoneExtensibilityTelephonyBindingInput deserializedCreateTeamsPhoneExtensibilityTelephonyBindingInput
+                = new CreateTeamsPhoneExtensibilityTelephonyBindingInput(connectionName, resourceAccountObjectId);
+            deserializedCreateTeamsPhoneExtensibilityTelephonyBindingInput.setLabel(label);
+            deserializedCreateTeamsPhoneExtensibilityTelephonyBindingInput.provider = provider;
+            deserializedCreateTeamsPhoneExtensibilityTelephonyBindingInput.phoneNumber = phoneNumber;
+            return deserializedCreateTeamsPhoneExtensibilityTelephonyBindingInput;
         });
     }
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java
index 5c7f672441ba..d8e8c0a3c47d 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java
@@ -129,8 +129,8 @@ public static CreateTelephonyBindingInput fromJson(JsonReader jsonReader) throws
                     }
                 }
                 // Use the discriminator value to determine which subtype should be deserialized.
-                if ("teams_phone_extension".equals(discriminatorValue)) {
-                    return CreateTeamsPhoneExtensionTelephonyBindingInput.fromJson(readerToUse.reset());
+                if ("teams_phone_extensibility".equals(discriminatorValue)) {
+                    return CreateTeamsPhoneExtensibilityTelephonyBindingInput.fromJson(readerToUse.reset());
                 } else if ("twilio".equals(discriminatorValue)) {
                     return CreateTwilioTelephonyBindingInput.fromJson(readerToUse.reset());
                 } else {
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java
index 1f6a86a08a68..7b0c58be7f0e 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java
@@ -29,14 +29,14 @@ public final class CreateTelephonyCallJobInput implements JsonSerializable {
 
     /*
-     * The idle duration, in seconds, before a session's sandbox is suspended. Optional — when
-     * unset, the server default of 900 seconds is used. Must be between 120 and 3600 seconds
-     * (inclusive).
+     * The idle duration, in seconds, before a session's sandbox is suspended. When omitted,
+     * the server defaults to 900 seconds. Must be between 120 and 14400 seconds (4 hours).
      */
     @Generated
     private Long idleTimeoutSeconds;
@@ -34,10 +33,9 @@ public SessionConfiguration() {
     }
 
     /**
-     * Get the idleTimeoutSeconds property: The idle duration, in seconds, before a session's sandbox is suspended.
-     * Optional — when
-     * unset, the server default of 900 seconds is used. Must be between 120 and 3600 seconds
-     * (inclusive).
+     * Get the idleTimeoutSeconds property: The idle duration, in seconds, before a session's sandbox is suspended. When
+     * omitted,
+     * the server defaults to 900 seconds. Must be between 120 and 14400 seconds (4 hours).
      *
      * @return the idleTimeoutSeconds value.
      */
@@ -50,10 +48,9 @@ public Duration getIdleTimeoutSeconds() {
     }
 
     /**
-     * Set the idleTimeoutSeconds property: The idle duration, in seconds, before a session's sandbox is suspended.
-     * Optional — when
-     * unset, the server default of 900 seconds is used. Must be between 120 and 3600 seconds
-     * (inclusive).
+     * Set the idleTimeoutSeconds property: The idle duration, in seconds, before a session's sandbox is suspended. When
+     * omitted,
+     * the server defaults to 900 seconds. Must be between 120 and 14400 seconds (4 hours).
      *
      * @param idleTimeoutSeconds the idleTimeoutSeconds value to set.
      * @return the SessionConfiguration object itself.
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensionTelephonyBinding.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBinding.java
similarity index 79%
rename from sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensionTelephonyBinding.java
rename to sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBinding.java
index 96810c145948..fca3c6ba5df5 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensionTelephonyBinding.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBinding.java
@@ -12,17 +12,17 @@
 import java.io.IOException;
 
 /**
- * A Microsoft Teams Phone Extension binding owned by a voice agent.
+ * A Microsoft Teams Phone extensibility binding owned by a voice agent.
  */
 @Immutable
 @Beta(warningText = "Preview API. VoiceAgents=V1Preview")
-public final class TeamsPhoneExtensionTelephonyBinding extends TelephonyBinding {
+public final class TeamsPhoneExtensibilityTelephonyBinding extends TelephonyBinding {
 
     /*
      * The telephony provider.
      */
     @Generated
-    private TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSION;
+    private TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSIBILITY;
 
     /*
      * The optional display phone number for the Teams resource account.
@@ -37,7 +37,7 @@ public final class TeamsPhoneExtensionTelephonyBinding extends TelephonyBinding
     private final String resourceAccountObjectId;
 
     /**
-     * Creates an instance of TeamsPhoneExtensionTelephonyBinding class.
+     * Creates an instance of TeamsPhoneExtensibilityTelephonyBinding class.
      *
      * @param id the id value to set.
      * @param connectionName the connectionName value to set.
@@ -46,7 +46,7 @@ public final class TeamsPhoneExtensionTelephonyBinding extends TelephonyBinding
      * @param resourceAccountObjectId the resourceAccountObjectId value to set.
      */
     @Generated
-    private TeamsPhoneExtensionTelephonyBinding(String id, String connectionName, TelephonyBindingStatus status,
+    private TeamsPhoneExtensibilityTelephonyBinding(String id, String connectionName, TelephonyBindingStatus status,
         String incomingCallUrl, String resourceAccountObjectId) {
         super(id, connectionName, status, incomingCallUrl);
         this.resourceAccountObjectId = resourceAccountObjectId;
@@ -102,16 +102,16 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
     }
 
     /**
-     * Reads an instance of TeamsPhoneExtensionTelephonyBinding from the JsonReader.
+     * Reads an instance of TeamsPhoneExtensibilityTelephonyBinding from the JsonReader.
      *
      * @param jsonReader The JsonReader being read.
-     * @return An instance of TeamsPhoneExtensionTelephonyBinding if the JsonReader was pointing to an instance of it,
-     * or null if it was pointing to JSON null.
+     * @return An instance of TeamsPhoneExtensibilityTelephonyBinding if the JsonReader was pointing to an instance of
+     * it, or null if it was pointing to JSON null.
      * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
-     * @throws IOException If an error occurs while reading the TeamsPhoneExtensionTelephonyBinding.
+     * @throws IOException If an error occurs while reading the TeamsPhoneExtensibilityTelephonyBinding.
      */
     @Generated
-    public static TeamsPhoneExtensionTelephonyBinding fromJson(JsonReader jsonReader) throws IOException {
+    public static TeamsPhoneExtensibilityTelephonyBinding fromJson(JsonReader jsonReader) throws IOException {
         return jsonReader.readObject(reader -> {
             String id = null;
             String connectionName = null;
@@ -119,7 +119,7 @@ public static TeamsPhoneExtensionTelephonyBinding fromJson(JsonReader jsonReader
             String incomingCallUrl = null;
             String label = null;
             String resourceAccountObjectId = null;
-            TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSION;
+            TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSIBILITY;
             String phoneNumber = null;
             while (reader.nextToken() != JsonToken.END_OBJECT) {
                 String fieldName = reader.getFieldName();
@@ -144,13 +144,13 @@ public static TeamsPhoneExtensionTelephonyBinding fromJson(JsonReader jsonReader
                     reader.skipChildren();
                 }
             }
-            TeamsPhoneExtensionTelephonyBinding deserializedTeamsPhoneExtensionTelephonyBinding
-                = new TeamsPhoneExtensionTelephonyBinding(id, connectionName, status, incomingCallUrl,
+            TeamsPhoneExtensibilityTelephonyBinding deserializedTeamsPhoneExtensibilityTelephonyBinding
+                = new TeamsPhoneExtensibilityTelephonyBinding(id, connectionName, status, incomingCallUrl,
                     resourceAccountObjectId);
-            deserializedTeamsPhoneExtensionTelephonyBinding.setLabel(label);
-            deserializedTeamsPhoneExtensionTelephonyBinding.provider = provider;
-            deserializedTeamsPhoneExtensionTelephonyBinding.phoneNumber = phoneNumber;
-            return deserializedTeamsPhoneExtensionTelephonyBinding;
+            deserializedTeamsPhoneExtensibilityTelephonyBinding.setLabel(label);
+            deserializedTeamsPhoneExtensibilityTelephonyBinding.provider = provider;
+            deserializedTeamsPhoneExtensibilityTelephonyBinding.phoneNumber = phoneNumber;
+            return deserializedTeamsPhoneExtensibilityTelephonyBinding;
         });
     }
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensionTelephonyBindingListItem.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBindingListItem.java
similarity index 75%
rename from sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensionTelephonyBindingListItem.java
rename to sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBindingListItem.java
index bd37bc5e6f36..66ba70ef8b66 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensionTelephonyBindingListItem.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBindingListItem.java
@@ -12,17 +12,17 @@
 import java.io.IOException;
 
 /**
- * A Microsoft Teams Phone Extension binding returned in a list, including its entity tag.
+ * A Microsoft Teams Phone extensibility binding returned in a list, including its entity tag.
  */
 @Immutable
 @Beta(warningText = "Preview API. VoiceAgents=V1Preview")
-public final class TeamsPhoneExtensionTelephonyBindingListItem extends TelephonyBindingListItem {
+public final class TeamsPhoneExtensibilityTelephonyBindingListItem extends TelephonyBindingListItem {
 
     /*
      * The telephony provider.
      */
     @Generated
-    private TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSION;
+    private TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSIBILITY;
 
     /*
      * The optional display phone number for the Teams resource account.
@@ -37,7 +37,7 @@ public final class TeamsPhoneExtensionTelephonyBindingListItem extends Telephony
     private final String resourceAccountObjectId;
 
     /**
-     * Creates an instance of TeamsPhoneExtensionTelephonyBindingListItem class.
+     * Creates an instance of TeamsPhoneExtensibilityTelephonyBindingListItem class.
      *
      * @param id the id value to set.
      * @param connectionName the connectionName value to set.
@@ -46,8 +46,8 @@ public final class TeamsPhoneExtensionTelephonyBindingListItem extends Telephony
      * @param resourceAccountObjectId the resourceAccountObjectId value to set.
      */
     @Generated
-    private TeamsPhoneExtensionTelephonyBindingListItem(String id, String connectionName, TelephonyBindingStatus status,
-        String incomingCallUrl, String resourceAccountObjectId) {
+    private TeamsPhoneExtensibilityTelephonyBindingListItem(String id, String connectionName,
+        TelephonyBindingStatus status, String incomingCallUrl, String resourceAccountObjectId) {
         super(id, connectionName, status, incomingCallUrl);
         this.resourceAccountObjectId = resourceAccountObjectId;
     }
@@ -102,16 +102,16 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
     }
 
     /**
-     * Reads an instance of TeamsPhoneExtensionTelephonyBindingListItem from the JsonReader.
+     * Reads an instance of TeamsPhoneExtensibilityTelephonyBindingListItem from the JsonReader.
      *
      * @param jsonReader The JsonReader being read.
-     * @return An instance of TeamsPhoneExtensionTelephonyBindingListItem if the JsonReader was pointing to an instance
-     * of it, or null if it was pointing to JSON null.
+     * @return An instance of TeamsPhoneExtensibilityTelephonyBindingListItem if the JsonReader was pointing to an
+     * instance of it, or null if it was pointing to JSON null.
      * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
-     * @throws IOException If an error occurs while reading the TeamsPhoneExtensionTelephonyBindingListItem.
+     * @throws IOException If an error occurs while reading the TeamsPhoneExtensibilityTelephonyBindingListItem.
      */
     @Generated
-    public static TeamsPhoneExtensionTelephonyBindingListItem fromJson(JsonReader jsonReader) throws IOException {
+    public static TeamsPhoneExtensibilityTelephonyBindingListItem fromJson(JsonReader jsonReader) throws IOException {
         return jsonReader.readObject(reader -> {
             String id = null;
             String connectionName = null;
@@ -120,7 +120,7 @@ public static TeamsPhoneExtensionTelephonyBindingListItem fromJson(JsonReader js
             String eTag = null;
             String label = null;
             String resourceAccountObjectId = null;
-            TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSION;
+            TelephonyProvider provider = TelephonyProvider.TEAMS_PHONE_EXTENSIBILITY;
             String phoneNumber = null;
             while (reader.nextToken() != JsonToken.END_OBJECT) {
                 String fieldName = reader.getFieldName();
@@ -147,14 +147,14 @@ public static TeamsPhoneExtensionTelephonyBindingListItem fromJson(JsonReader js
                     reader.skipChildren();
                 }
             }
-            TeamsPhoneExtensionTelephonyBindingListItem deserializedTeamsPhoneExtensionTelephonyBindingListItem
-                = new TeamsPhoneExtensionTelephonyBindingListItem(id, connectionName, status, incomingCallUrl,
+            TeamsPhoneExtensibilityTelephonyBindingListItem deserializedTeamsPhoneExtensibilityTelephonyBindingListItem
+                = new TeamsPhoneExtensibilityTelephonyBindingListItem(id, connectionName, status, incomingCallUrl,
                     resourceAccountObjectId);
-            deserializedTeamsPhoneExtensionTelephonyBindingListItem.setETag(eTag);
-            deserializedTeamsPhoneExtensionTelephonyBindingListItem.setLabel(label);
-            deserializedTeamsPhoneExtensionTelephonyBindingListItem.provider = provider;
-            deserializedTeamsPhoneExtensionTelephonyBindingListItem.phoneNumber = phoneNumber;
-            return deserializedTeamsPhoneExtensionTelephonyBindingListItem;
+            deserializedTeamsPhoneExtensibilityTelephonyBindingListItem.setETag(eTag);
+            deserializedTeamsPhoneExtensibilityTelephonyBindingListItem.setLabel(label);
+            deserializedTeamsPhoneExtensibilityTelephonyBindingListItem.provider = provider;
+            deserializedTeamsPhoneExtensibilityTelephonyBindingListItem.phoneNumber = phoneNumber;
+            return deserializedTeamsPhoneExtensibilityTelephonyBindingListItem;
         });
     }
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyBinding.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyBinding.java
index 93b56093e404..35518decb684 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyBinding.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyBinding.java
@@ -171,8 +171,8 @@ public static TelephonyBinding fromJson(JsonReader jsonReader) throws IOExceptio
                     }
                 }
                 // Use the discriminator value to determine which subtype should be deserialized.
-                if ("teams_phone_extension".equals(discriminatorValue)) {
-                    return TeamsPhoneExtensionTelephonyBinding.fromJson(readerToUse.reset());
+                if ("teams_phone_extensibility".equals(discriminatorValue)) {
+                    return TeamsPhoneExtensibilityTelephonyBinding.fromJson(readerToUse.reset());
                 } else if ("twilio".equals(discriminatorValue)) {
                     return TwilioTelephonyBinding.fromJson(readerToUse.reset());
                 } else {
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java
index a4b09d0002ec..66fced7f239b 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java
@@ -171,8 +171,8 @@ public static TelephonyBindingListItem fromJson(JsonReader jsonReader) throws IO
                     }
                 }
                 // Use the discriminator value to determine which subtype should be deserialized.
-                if ("teams_phone_extension".equals(discriminatorValue)) {
-                    return TeamsPhoneExtensionTelephonyBindingListItem.fromJson(readerToUse.reset());
+                if ("teams_phone_extensibility".equals(discriminatorValue)) {
+                    return TeamsPhoneExtensibilityTelephonyBindingListItem.fromJson(readerToUse.reset());
                 } else if ("twilio".equals(discriminatorValue)) {
                     return TwilioTelephonyBindingListItem.fromJson(readerToUse.reset());
                 } else {
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java
index 29e37df2208e..c45eaf6b1e47 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java
@@ -396,14 +396,14 @@ public static TelephonyCallJob fromJson(JsonReader jsonReader) throws IOExceptio
 
     /*
      * The Foundry connection name in the current project used to originate the call. Its category selects Twilio or
-     * Azure Communication Services / Teams Phone Extension. No inbound telephony binding is required.
+     * Azure Communication Services / Teams Phone extensibility. No inbound telephony binding is required.
      */
     @Generated
     private final String connectionName;
 
     /*
      * The caller identity used to originate the call. For a Twilio connection, provide an authorized E.164 phone
-     * number. For an Azure Communication Services / Teams Phone Extension connection, provide the Teams Resource
+     * number. For an Azure Communication Services / Teams Phone extensibility connection, provide the Teams Resource
      * Account object ID. The identity type is inferred from the connection category; originating does not change
      * inbound routing.
      */
@@ -412,8 +412,8 @@ public static TelephonyCallJob fromJson(JsonReader jsonReader) throws IOExceptio
 
     /**
      * Get the connectionName property: The Foundry connection name in the current project used to originate the call.
-     * Its category selects Twilio or Azure Communication Services / Teams Phone Extension. No inbound telephony binding
-     * is required.
+     * Its category selects Twilio or Azure Communication Services / Teams Phone extensibility. No inbound telephony
+     * binding is required.
      *
      * @return the connectionName value.
      */
@@ -424,9 +424,9 @@ public String getConnectionName() {
 
     /**
      * Get the source property: The caller identity used to originate the call. For a Twilio connection, provide an
-     * authorized E.164 phone number. For an Azure Communication Services / Teams Phone Extension connection, provide
-     * the Teams Resource Account object ID. The identity type is inferred from the connection category; originating
-     * does not change inbound routing.
+     * authorized E.164 phone number. For an Azure Communication Services / Teams Phone extensibility connection,
+     * provide the Teams Resource Account object ID. The identity type is inferred from the connection category;
+     * originating does not change inbound routing.
      *
      * @return the source value.
      */
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java
index 8b08ef9e65bc..faffd4801e3f 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java
@@ -20,12 +20,6 @@ public final class TelephonyCallLifecycleEventSource extends ExpandableStringEnu
     @Generated
     public static final TelephonyCallLifecycleEventSource GATEWAY = fromString("gateway");
 
-    /**
-     * Microsoft Teams Phone Extension supplied the observation.
-     */
-    @Generated
-    public static final TelephonyCallLifecycleEventSource TEAMS_PHONE_EXTENSION = fromString("teams_phone_extension");
-
     /**
      * Twilio supplied the observation.
      */
@@ -68,4 +62,11 @@ public static TelephonyCallLifecycleEventSource fromString(String name) {
     public static Collection values() {
         return values(TelephonyCallLifecycleEventSource.class);
     }
+
+    /**
+     * Microsoft Teams Phone extensibility supplied the observation.
+     */
+    @Generated
+    public static final TelephonyCallLifecycleEventSource TEAMS_PHONE_EXTENSIBILITY
+        = fromString("teams_phone_extensibility");
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java
index 5081ca799622..550f86ebc17d 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java
@@ -49,7 +49,7 @@ public final class TelephonyCallRecord implements JsonSerializable {
 
-    /**
-     * Microsoft Teams Phone Extension.
-     */
-    @Generated
-    public static final TelephonyProvider TEAMS_PHONE_EXTENSION = fromString("teams_phone_extension");
-
     /**
      * Twilio Programmable Voice.
      */
@@ -57,4 +51,10 @@ public static TelephonyProvider fromString(String name) {
     public static Collection values() {
         return values(TelephonyProvider.class);
     }
+
+    /**
+     * Microsoft Teams Phone extensibility.
+     */
+    @Generated
+    public static final TelephonyProvider TEAMS_PHONE_EXTENSIBILITY = fromString("teams_phone_extensibility");
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java
index 1ea9cac30add..79aaee8a3f24 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java
@@ -36,15 +36,15 @@ public final class UpdateTelephonyBindingInput implements JsonSerializable {
     private String type;
 
     /*
-     * The details property.
+     * Additional errors that contributed to this failure.
      */
     @Generated
     private List details;
 
     /*
-     * The additionalInfo property.
+     * Additional structured information about the failure.
      */
     @Generated
     private Map additionalInfo;
 
     /*
-     * The debugInfo property.
+     * Diagnostic information supplied by the service for troubleshooting.
      */
     @Generated
     private Map debugInfo;
@@ -117,7 +117,7 @@ public String getType() {
     }
 
     /**
-     * Get the details property: The details property.
+     * Get the details property: Additional errors that contributed to this failure.
      *
      * @return the details value.
      */
@@ -127,7 +127,7 @@ public List getDetails() {
     }
 
     /**
-     * Get the additionalInfo property: The additionalInfo property.
+     * Get the additionalInfo property: Additional structured information about the failure.
      *
      * @return the additionalInfo value.
      */
@@ -137,7 +137,7 @@ public Map getAdditionalInfo() {
     }
 
     /**
-     * Get the debugInfo property: The debugInfo property.
+     * Get the debugInfo property: Diagnostic information supplied by the service for troubleshooting.
      *
      * @return the debugInfo value.
      */
diff --git a/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json b/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json
index fd5ed49def5f..a826e13813aa 100644
--- a/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json
+++ b/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json
@@ -1 +1 @@
-{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"f0d3551538c1","crossLanguageDefinitions":{"com.azure.ai.projects.AIProjectClientBuilder":"Azure.AI.Projects","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluatorsAsyncClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaInsightsAsyncClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaInsightsClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaModelsAsyncClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsAsyncClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsAsyncClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaRedTeamsAsyncClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRedTeamsClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRoutinesAsyncClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaRoutinesClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaSchedulesAsyncClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesAsyncClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSchedulesClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSkillsAsyncClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsAsyncClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.ConnectionsAsyncClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsAsyncClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.ConnectionsClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.DatasetsAsyncClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsAsyncClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsAsyncClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsAsyncClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsAsyncClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DeploymentsAsyncClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsAsyncClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.DeploymentsClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.EvaluationRulesAsyncClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluationRulesClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluatorsAsyncClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsAsyncClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.IndexesAsyncClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesAsyncClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.IndexesClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.implementation.models.CreateOrUpdateRoutineRequest":"Azure.AI.Projects.createOrUpdateRoutine.Request.anonymous","com.azure.ai.projects.implementation.models.CreateSkillVersionRequest":"Azure.AI.Projects.createSkillVersion.Request.anonymous","com.azure.ai.projects.implementation.models.DispatchRoutineAsyncRequest":"Azure.AI.Projects.dispatchRoutineAsync.Request.anonymous","com.azure.ai.projects.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.projects.implementation.models.UpdateSkillRequest":"Azure.AI.Projects.updateSkill.Request.anonymous","com.azure.ai.projects.models.AIProjectIndex":"Azure.AI.Projects.Index","com.azure.ai.projects.models.AgentClusterInsightRequest":"Azure.AI.Projects.AgentClusterInsightRequest","com.azure.ai.projects.models.AgentClusterInsightResult":"Azure.AI.Projects.AgentClusterInsightResult","com.azure.ai.projects.models.AgentDataGenerationJobSource":"Azure.AI.Projects.AgentDataGenerationJobSource","com.azure.ai.projects.models.AgentEvaluatorGenerationJobSource":"Azure.AI.Projects.AgentEvaluatorGenerationJobSource","com.azure.ai.projects.models.AgentInsight":"Azure.AI.Projects.AgentInsight","com.azure.ai.projects.models.AgentInsightDetails":"Azure.AI.Projects.AgentInsightDetails","com.azure.ai.projects.models.AgentInsightEstimatedCost":"Azure.AI.Projects.AgentInsightEstimatedCost","com.azure.ai.projects.models.AgentInsightHighlightedTrace":"Azure.AI.Projects.AgentInsightHighlightedTrace","com.azure.ai.projects.models.AgentInsightLinkedTrace":"Azure.AI.Projects.AgentInsightLinkedTrace","com.azure.ai.projects.models.AgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitor","com.azure.ai.projects.models.AgentInsightMonitorCreate":"Azure.AI.Projects.AgentInsightMonitorCreate","com.azure.ai.projects.models.AgentInsightMonitorListItem":"Azure.AI.Projects.AgentInsightMonitorListItem","com.azure.ai.projects.models.AgentInsightMonitorUpdate":"Azure.AI.Projects.AgentInsightMonitorUpdate","com.azure.ai.projects.models.AgentInsightOverviewSource":"Azure.AI.Projects.AgentInsightOverviewSource","com.azure.ai.projects.models.AgentInsightPromptSurface":"Azure.AI.Projects.AgentInsightPromptSurface","com.azure.ai.projects.models.AgentInsightProposedFix":"Azure.AI.Projects.AgentInsightProposedFix","com.azure.ai.projects.models.AgentInsightProposedFixChange":"Azure.AI.Projects.AgentInsightProposedFixChange","com.azure.ai.projects.models.AgentInsightProposedFixKind":"Azure.AI.Projects.AgentInsightProposedFixKind","com.azure.ai.projects.models.AgentInsightRecommendedAction":"Azure.AI.Projects.AgentInsightRecommendedAction","com.azure.ai.projects.models.AgentInsightRun":"Azure.AI.Projects.AgentInsightRun","com.azure.ai.projects.models.AgentInsightRunCreate":"Azure.AI.Projects.AgentInsightRunCreate","com.azure.ai.projects.models.AgentInsightRunResult":"Azure.AI.Projects.AgentInsightRunResult","com.azure.ai.projects.models.AgentInsightRunTrigger":"Azure.AI.Projects.AgentInsightRunTrigger","com.azure.ai.projects.models.AgentInsightSeverity":"Azure.AI.Projects.AgentInsightSeverity","com.azure.ai.projects.models.AgentInsightStatus":"Azure.AI.Projects.AgentInsightStatus","com.azure.ai.projects.models.AgentInsightSuspension":"Azure.AI.Projects.AgentInsightSuspension","com.azure.ai.projects.models.AgentInsightTokenUsage":"Azure.AI.Projects.AgentInsightTokenUsage","com.azure.ai.projects.models.AgentInsightUpdate":"Azure.AI.Projects.AgentInsightUpdate","com.azure.ai.projects.models.AgentInsightsOverview":"Azure.AI.Projects.AgentInsightsOverview","com.azure.ai.projects.models.AgentInsightsOverviewOverride":"Azure.AI.Projects.AgentInsightsOverviewOverride","com.azure.ai.projects.models.AgentTaxonomyInput":"Azure.AI.Projects.AgentTaxonomyInput","com.azure.ai.projects.models.AgenticIdentityPreviewCredential":"Azure.AI.Projects.AgenticIdentityPreviewCredentials","com.azure.ai.projects.models.ApiError":"OpenAI.Error","com.azure.ai.projects.models.ApiKeyCredential":"Azure.AI.Projects.ApiKeyCredentials","com.azure.ai.projects.models.ArtifactProfile":"Azure.AI.Projects.ArtifactProfile","com.azure.ai.projects.models.AttackStrategy":"Azure.AI.Projects.AttackStrategy","com.azure.ai.projects.models.AzureAIAgentTarget":"Azure.AI.Projects.AzureAIAgentTarget","com.azure.ai.projects.models.AzureAIModelTarget":"Azure.AI.Projects.AzureAIModelTarget","com.azure.ai.projects.models.AzureAISearchIndex":"Azure.AI.Projects.AzureAISearchIndex","com.azure.ai.projects.models.AzureOpenAIModelConfiguration":"Azure.AI.Projects.AzureOpenAIModelConfiguration","com.azure.ai.projects.models.BaseCredential":"Azure.AI.Projects.BaseCredentials","com.azure.ai.projects.models.BlobReference":"Azure.AI.Projects.BlobReference","com.azure.ai.projects.models.BlobReferenceSasCredential":"Azure.AI.Projects.SasCredential","com.azure.ai.projects.models.ChartCoordinate":"Azure.AI.Projects.ChartCoordinate","com.azure.ai.projects.models.ClusterInsightResult":"Azure.AI.Projects.ClusterInsightResult","com.azure.ai.projects.models.ClusterTokenUsage":"Azure.AI.Projects.ClusterTokenUsage","com.azure.ai.projects.models.CodeBasedEvaluatorDefinition":"Azure.AI.Projects.CodeBasedEvaluatorDefinition","com.azure.ai.projects.models.Connection":"Azure.AI.Projects.Connection","com.azure.ai.projects.models.ConnectionType":"Azure.AI.Projects.ConnectionType","com.azure.ai.projects.models.ContinuousEvaluationRuleAction":"Azure.AI.Projects.ContinuousEvaluationRuleAction","com.azure.ai.projects.models.CosmosDBIndex":"Azure.AI.Projects.CosmosDBIndex","com.azure.ai.projects.models.CreateAsyncResponse":"Azure.AI.Projects.createAsync.Response.anonymous","com.azure.ai.projects.models.CreateSkillVersionFromFilesBody":"Azure.AI.Projects.CreateSkillVersionFromFilesBody","com.azure.ai.projects.models.CredentialType":"Azure.AI.Projects.CredentialType","com.azure.ai.projects.models.CronTrigger":"Azure.AI.Projects.CronTrigger","com.azure.ai.projects.models.CustomCredential":"Azure.AI.Projects.CustomCredential","com.azure.ai.projects.models.CustomRoutineTrigger":"Azure.AI.Projects.CustomRoutineTrigger","com.azure.ai.projects.models.DailyRecurrenceSchedule":"Azure.AI.Projects.DailyRecurrenceSchedule","com.azure.ai.projects.models.DataGenerationJob":"Azure.AI.Projects.DataGenerationJob","com.azure.ai.projects.models.DataGenerationJobConfiguration":"Azure.AI.Projects.DataGenerationJobConfiguration","com.azure.ai.projects.models.DataGenerationJobInputs":"Azure.AI.Projects.DataGenerationJobInputs","com.azure.ai.projects.models.DataGenerationJobOutput":"Azure.AI.Projects.DataGenerationJobOutput","com.azure.ai.projects.models.DataGenerationJobOutputType":"Azure.AI.Projects.DataGenerationJobOutputType","com.azure.ai.projects.models.DataGenerationJobOutputWriteMode":"Azure.AI.Projects.DataGenerationJobOutputWriteMode","com.azure.ai.projects.models.DataGenerationJobResult":"Azure.AI.Projects.DataGenerationJobResult","com.azure.ai.projects.models.DataGenerationJobScenario":"Azure.AI.Projects.DataGenerationJobScenario","com.azure.ai.projects.models.DataGenerationJobSource":"Azure.AI.Projects.DataGenerationJobSource","com.azure.ai.projects.models.DataGenerationJobSourceType":"Azure.AI.Projects.DataGenerationJobSourceType","com.azure.ai.projects.models.DataGenerationJobType":"Azure.AI.Projects.DataGenerationJobType","com.azure.ai.projects.models.DataGenerationModelOptions":"Azure.AI.Projects.DataGenerationModelOptions","com.azure.ai.projects.models.DataGenerationTokenUsage":"Azure.AI.Projects.DataGenerationTokenUsage","com.azure.ai.projects.models.DatasetCredential":"Azure.AI.Projects.AssetCredentialResponse","com.azure.ai.projects.models.DatasetDataGenerationJobOutput":"Azure.AI.Projects.DatasetDataGenerationJobOutput","com.azure.ai.projects.models.DatasetEvaluatorGenerationJobSource":"Azure.AI.Projects.DatasetEvaluatorGenerationJobSource","com.azure.ai.projects.models.DatasetReference":"Azure.AI.Projects.DatasetReference","com.azure.ai.projects.models.DatasetType":"Azure.AI.Projects.DatasetType","com.azure.ai.projects.models.DatasetVersion":"Azure.AI.Projects.DatasetVersion","com.azure.ai.projects.models.Deployment":"Azure.AI.Projects.Deployment","com.azure.ai.projects.models.DeploymentType":"Azure.AI.Projects.DeploymentType","com.azure.ai.projects.models.Dimension":"Azure.AI.Projects.Dimension","com.azure.ai.projects.models.DispatchRoutineResult":"Azure.AI.Projects.DispatchRoutineResponse","com.azure.ai.projects.models.EmbeddingConfiguration":"Azure.AI.Projects.EmbeddingConfiguration","com.azure.ai.projects.models.EndpointBasedEvaluatorDefinition":"Azure.AI.Projects.EndpointBasedEvaluatorDefinition","com.azure.ai.projects.models.EntraIdCredential":"Azure.AI.Projects.EntraIDCredentials","com.azure.ai.projects.models.EvaluationComparisonInsightRequest":"Azure.AI.Projects.EvaluationComparisonInsightRequest","com.azure.ai.projects.models.EvaluationComparisonInsightResult":"Azure.AI.Projects.EvaluationComparisonInsightResult","com.azure.ai.projects.models.EvaluationDataGenerationJob":"Azure.AI.Projects.EvaluationDataGenerationJob","com.azure.ai.projects.models.EvaluationDataGenerationJobInputs":"Azure.AI.Projects.EvaluationDataGenerationJobInputs","com.azure.ai.projects.models.EvaluationDataGenerationJobOutputConfiguration":"Azure.AI.Projects.EvaluationDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.EvaluationLevel":"Azure.AI.Projects.EvaluationLevel","com.azure.ai.projects.models.EvaluationResult":"Azure.AI.Projects.EvalResult","com.azure.ai.projects.models.EvaluationResultSample":"Azure.AI.Projects.EvaluationResultSample","com.azure.ai.projects.models.EvaluationRule":"Azure.AI.Projects.EvaluationRule","com.azure.ai.projects.models.EvaluationRuleAction":"Azure.AI.Projects.EvaluationRuleAction","com.azure.ai.projects.models.EvaluationRuleActionType":"Azure.AI.Projects.EvaluationRuleActionType","com.azure.ai.projects.models.EvaluationRuleEventType":"Azure.AI.Projects.EvaluationRuleEventType","com.azure.ai.projects.models.EvaluationRuleFilter":"Azure.AI.Projects.EvaluationRuleFilter","com.azure.ai.projects.models.EvaluationRunClusterInsightRequest":"Azure.AI.Projects.EvaluationRunClusterInsightRequest","com.azure.ai.projects.models.EvaluationRunClusterInsightResult":"Azure.AI.Projects.EvaluationRunClusterInsightResult","com.azure.ai.projects.models.EvaluationRunResultCompareItem":"Azure.AI.Projects.EvalRunResultCompareItem","com.azure.ai.projects.models.EvaluationRunResultComparison":"Azure.AI.Projects.EvalRunResultComparison","com.azure.ai.projects.models.EvaluationRunResultSummary":"Azure.AI.Projects.EvalRunResultSummary","com.azure.ai.projects.models.EvaluationScheduleTask":"Azure.AI.Projects.EvaluationScheduleTask","com.azure.ai.projects.models.EvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomy","com.azure.ai.projects.models.EvaluationTaxonomyInput":"Azure.AI.Projects.EvaluationTaxonomyInput","com.azure.ai.projects.models.EvaluationTaxonomyInputType":"Azure.AI.Projects.EvaluationTaxonomyInputType","com.azure.ai.projects.models.EvaluatorCategory":"Azure.AI.Projects.EvaluatorCategory","com.azure.ai.projects.models.EvaluatorCredentialInput":"Azure.AI.Projects.EvaluatorCredentialRequest","com.azure.ai.projects.models.EvaluatorDefinition":"Azure.AI.Projects.EvaluatorDefinition","com.azure.ai.projects.models.EvaluatorDefinitionType":"Azure.AI.Projects.EvaluatorDefinitionType","com.azure.ai.projects.models.EvaluatorGenerationArtifacts":"Azure.AI.Projects.EvaluatorGenerationArtifacts","com.azure.ai.projects.models.EvaluatorGenerationInputs":"Azure.AI.Projects.EvaluatorGenerationInputs","com.azure.ai.projects.models.EvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJob","com.azure.ai.projects.models.EvaluatorGenerationJobSource":"Azure.AI.Projects.EvaluatorGenerationJobSource","com.azure.ai.projects.models.EvaluatorGenerationJobSourceType":"Azure.AI.Projects.EvaluatorGenerationJobSourceType","com.azure.ai.projects.models.EvaluatorGenerationTokenUsage":"Azure.AI.Projects.EvaluatorGenerationTokenUsage","com.azure.ai.projects.models.EvaluatorMetric":"Azure.AI.Projects.EvaluatorMetric","com.azure.ai.projects.models.EvaluatorMetricDirection":"Azure.AI.Projects.EvaluatorMetricDirection","com.azure.ai.projects.models.EvaluatorMetricType":"Azure.AI.Projects.EvaluatorMetricType","com.azure.ai.projects.models.EvaluatorType":"Azure.AI.Projects.EvaluatorType","com.azure.ai.projects.models.EvaluatorVersion":"Azure.AI.Projects.EvaluatorVersion","com.azure.ai.projects.models.FieldMapping":"Azure.AI.Projects.FieldMapping","com.azure.ai.projects.models.FileDataGenerationJobOutput":"Azure.AI.Projects.FileDataGenerationJobOutput","com.azure.ai.projects.models.FileDataGenerationJobSource":"Azure.AI.Projects.FileDataGenerationJobSource","com.azure.ai.projects.models.FileDatasetVersion":"Azure.AI.Projects.FileDatasetVersion","com.azure.ai.projects.models.FolderDatasetVersion":"Azure.AI.Projects.FolderDatasetVersion","com.azure.ai.projects.models.FoundryModelArtifactProfileCategory":"Azure.AI.Projects.FoundryModelArtifactProfileCategory","com.azure.ai.projects.models.FoundryModelArtifactProfileSignal":"Azure.AI.Projects.FoundryModelArtifactProfileSignal","com.azure.ai.projects.models.FoundryModelSourceType":"Azure.AI.Projects.FoundryModelSourceType","com.azure.ai.projects.models.FoundryModelWarning":"Azure.AI.Projects.FoundryModelWarning","com.azure.ai.projects.models.FoundryModelWarningCode":"Azure.AI.Projects.FoundryModelWarningCode","com.azure.ai.projects.models.FoundryModelWeightType":"Azure.AI.Projects.FoundryModelWeightType","com.azure.ai.projects.models.GenerationWarningType":"Azure.AI.Projects.GenerationWarningType","com.azure.ai.projects.models.GitHubIssueEvent":"Azure.AI.Projects.GitHubIssueEvent","com.azure.ai.projects.models.GitHubIssueRoutineTrigger":"Azure.AI.Projects.GitHubIssueRoutineTrigger","com.azure.ai.projects.models.GraderAzureAIEvaluator":"Azure.AI.Projects.GraderAzureAIEvaluator","com.azure.ai.projects.models.HourlyRecurrenceSchedule":"Azure.AI.Projects.HourlyRecurrenceSchedule","com.azure.ai.projects.models.HumanEvaluationPreviewRuleAction":"Azure.AI.Projects.HumanEvaluationPreviewRuleAction","com.azure.ai.projects.models.IndexType":"Azure.AI.Projects.IndexType","com.azure.ai.projects.models.Insight":"Azure.AI.Projects.Insight","com.azure.ai.projects.models.InsightCluster":"Azure.AI.Projects.InsightCluster","com.azure.ai.projects.models.InsightModelConfiguration":"Azure.AI.Projects.InsightModelConfiguration","com.azure.ai.projects.models.InsightRequest":"Azure.AI.Projects.InsightRequest","com.azure.ai.projects.models.InsightResult":"Azure.AI.Projects.InsightResult","com.azure.ai.projects.models.InsightSample":"Azure.AI.Projects.InsightSample","com.azure.ai.projects.models.InsightScheduleTask":"Azure.AI.Projects.InsightScheduleTask","com.azure.ai.projects.models.InsightSummary":"Azure.AI.Projects.InsightSummary","com.azure.ai.projects.models.InsightType":"Azure.AI.Projects.InsightType","com.azure.ai.projects.models.InsightsMetadata":"Azure.AI.Projects.InsightsMetadata","com.azure.ai.projects.models.InvokeAgentInvocationsApiDispatchPayload":"Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentInvocationsApiRoutineAction":"Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction","com.azure.ai.projects.models.InvokeAgentResponsesApiDispatchPayload":"Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentResponsesApiRoutineAction":"Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction","com.azure.ai.projects.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.projects.models.ListVersionsRequestType":"Azure.AI.Projects.listVersions.RequestType.anonymous","com.azure.ai.projects.models.LoraConfig":"Azure.AI.Projects.LoraConfig","com.azure.ai.projects.models.ManagedAzureAISearchIndex":"Azure.AI.Projects.ManagedAzureAISearchIndex","com.azure.ai.projects.models.ModelCredentialInput":"Azure.AI.Projects.ModelCredentialRequest","com.azure.ai.projects.models.ModelDeployment":"Azure.AI.Projects.ModelDeployment","com.azure.ai.projects.models.ModelDeploymentSku":"Azure.AI.Projects.Sku","com.azure.ai.projects.models.ModelPendingUploadInput":"Azure.AI.Projects.ModelPendingUploadRequest","com.azure.ai.projects.models.ModelPendingUploadResult":"Azure.AI.Projects.ModelPendingUploadResponse","com.azure.ai.projects.models.ModelSamplingParams":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.projects.models.ModelSourceData":"Azure.AI.Projects.ModelSourceData","com.azure.ai.projects.models.ModelVersion":"Azure.AI.Projects.ModelVersion","com.azure.ai.projects.models.MonthlyRecurrenceSchedule":"Azure.AI.Projects.MonthlyRecurrenceSchedule","com.azure.ai.projects.models.NoAuthenticationCredential":"Azure.AI.Projects.NoAuthenticationCredentials","com.azure.ai.projects.models.OneTimeTrigger":"Azure.AI.Projects.OneTimeTrigger","com.azure.ai.projects.models.OperationStatus":"Azure.Core.Foundations.OperationState","com.azure.ai.projects.models.PendingUploadRequest":"Azure.AI.Projects.PendingUploadRequest","com.azure.ai.projects.models.PendingUploadResponse":"Azure.AI.Projects.PendingUploadResponse","com.azure.ai.projects.models.PendingUploadType":"Azure.AI.Projects.PendingUploadType","com.azure.ai.projects.models.PromptBasedEvaluatorDefinition":"Azure.AI.Projects.PromptBasedEvaluatorDefinition","com.azure.ai.projects.models.PromptDataGenerationJobSource":"Azure.AI.Projects.PromptDataGenerationJobSource","com.azure.ai.projects.models.PromptEvaluatorGenerationJobSource":"Azure.AI.Projects.PromptEvaluatorGenerationJobSource","com.azure.ai.projects.models.RecurrenceSchedule":"Azure.AI.Projects.RecurrenceSchedule","com.azure.ai.projects.models.RecurrenceTrigger":"Azure.AI.Projects.RecurrenceTrigger","com.azure.ai.projects.models.RecurrenceType":"Azure.AI.Projects.RecurrenceType","com.azure.ai.projects.models.RedTeam":"Azure.AI.Projects.RedTeam","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJob":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJob","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobInputs":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.RiskCategory":"Azure.AI.Projects.RiskCategory","com.azure.ai.projects.models.Routine":"Azure.AI.Projects.Routine","com.azure.ai.projects.models.RoutineAction":"Azure.AI.Projects.RoutineAction","com.azure.ai.projects.models.RoutineActionType":"Azure.AI.Projects.RoutineActionType","com.azure.ai.projects.models.RoutineAttemptSource":"Azure.AI.Projects.RoutineAttemptSource","com.azure.ai.projects.models.RoutineAuthorization":"Azure.AI.Projects.RoutineAuthorization","com.azure.ai.projects.models.RoutineDispatchIdentity":"Azure.AI.Projects.RoutineDispatchIdentity","com.azure.ai.projects.models.RoutineDispatchPayload":"Azure.AI.Projects.RoutineDispatchPayload","com.azure.ai.projects.models.RoutineDispatchPayloadType":"Azure.AI.Projects.RoutineDispatchPayloadType","com.azure.ai.projects.models.RoutineRun":"Azure.AI.Projects.RoutineRun","com.azure.ai.projects.models.RoutineRunPhase":"Azure.AI.Projects.RoutineRunPhase","com.azure.ai.projects.models.RoutineTrigger":"Azure.AI.Projects.RoutineTrigger","com.azure.ai.projects.models.RoutineTriggerType":"Azure.AI.Projects.RoutineTriggerType","com.azure.ai.projects.models.RubricBasedEvaluatorDefinition":"Azure.AI.Projects.RubricBasedEvaluatorDefinition","com.azure.ai.projects.models.RubricGenerationInputQualityWarning":"Azure.AI.Projects.RubricGenerationInputQualityWarning","com.azure.ai.projects.models.RubricGenerationInputQualityWarningCode":"Azure.AI.Projects.RubricGenerationInputQualityWarningCode","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSeverity":"Azure.AI.Projects.RubricGenerationInputQualityWarningSeverity","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSource":"Azure.AI.Projects.RubricGenerationInputQualityWarningSource","com.azure.ai.projects.models.SampleType":"Azure.AI.Projects.SampleType","com.azure.ai.projects.models.SasCredential":"Azure.AI.Projects.SASCredentials","com.azure.ai.projects.models.Schedule":"Azure.AI.Projects.Schedule","com.azure.ai.projects.models.ScheduleProvisioningStatus":"Azure.AI.Projects.ScheduleProvisioningStatus","com.azure.ai.projects.models.ScheduleRoutineTrigger":"Azure.AI.Projects.ScheduleRoutineTrigger","com.azure.ai.projects.models.ScheduleRun":"Azure.AI.Projects.ScheduleRun","com.azure.ai.projects.models.ScheduleTask":"Azure.AI.Projects.ScheduleTask","com.azure.ai.projects.models.ScheduleTaskType":"Azure.AI.Projects.ScheduleTaskType","com.azure.ai.projects.models.SimpleQnADataGenerationJobConfiguration":"Azure.AI.Projects.SimpleQnADataGenerationJobConfiguration","com.azure.ai.projects.models.SimpleQnAFineTuningQuestionType":"Azure.AI.Projects.SimpleQnAFineTuningQuestionType","com.azure.ai.projects.models.SimulationSeedDataGenerationJobConfiguration":"Azure.AI.Projects.SimulationSeedDataGenerationJobConfiguration","com.azure.ai.projects.models.SkillDetails":"Azure.AI.Projects.Skill","com.azure.ai.projects.models.SkillFileDetails":"TypeSpec.Http.File","com.azure.ai.projects.models.SkillInlineContent":"Azure.AI.Projects.SkillInlineContent","com.azure.ai.projects.models.SkillVersion":"Azure.AI.Projects.SkillVersion","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJob":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJob","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobInputs":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.Target":"Azure.AI.Projects.FoundryEvaluationTarget","com.azure.ai.projects.models.TargetConfig":"Azure.AI.Projects.RedTeamTargetConfig","com.azure.ai.projects.models.TaxonomyCategory":"Azure.AI.Projects.TaxonomyCategory","com.azure.ai.projects.models.TaxonomySubCategory":"Azure.AI.Projects.TaxonomySubCategory","com.azure.ai.projects.models.TestingCriterionAzureAIEvaluator":"Azure.AI.Projects.TestingCriterionAzureAIEvaluator","com.azure.ai.projects.models.TimerRoutineTrigger":"Azure.AI.Projects.TimerRoutineTrigger","com.azure.ai.projects.models.ToolDescription":"Azure.AI.Projects.ToolDescription","com.azure.ai.projects.models.ToolUseFineTuningDataGenerationJobConfiguration":"Azure.AI.Projects.ToolUseFineTuningDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobConfiguration":"Azure.AI.Projects.TracesDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobSource":"Azure.AI.Projects.TracesDataGenerationJobSource","com.azure.ai.projects.models.TracesEvaluatorGenerationJobSource":"Azure.AI.Projects.TracesEvaluatorGenerationJobSource","com.azure.ai.projects.models.TreatmentEffectType":"Azure.AI.Projects.TreatmentEffectType","com.azure.ai.projects.models.Trigger":"Azure.AI.Projects.Trigger","com.azure.ai.projects.models.TriggerType":"Azure.AI.Projects.TriggerType","com.azure.ai.projects.models.UpdateModelVersionInput":"Azure.AI.Projects.UpdateModelVersionRequest","com.azure.ai.projects.models.WeeklyRecurrenceSchedule":"Azure.AI.Projects.WeeklyRecurrenceSchedule"},"generatedFiles":["src/main/java/com/azure/ai/projects/AIProjectClientBuilder.java","src/main/java/com/azure/ai/projects/AIProjectsServiceVersion.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsClient.java","src/main/java/com/azure/ai/projects/BetaInsightsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaInsightsClient.java","src/main/java/com/azure/ai/projects/BetaModelsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaModelsClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesClient.java","src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSkillsClient.java","src/main/java/com/azure/ai/projects/ConnectionsAsyncClient.java","src/main/java/com/azure/ai/projects/ConnectionsClient.java","src/main/java/com/azure/ai/projects/DatasetsAsyncClient.java","src/main/java/com/azure/ai/projects/DatasetsClient.java","src/main/java/com/azure/ai/projects/DeploymentsAsyncClient.java","src/main/java/com/azure/ai/projects/DeploymentsClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesClient.java","src/main/java/com/azure/ai/projects/EvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluatorsClient.java","src/main/java/com/azure/ai/projects/IndexesAsyncClient.java","src/main/java/com/azure/ai/projects/IndexesClient.java","src/main/java/com/azure/ai/projects/implementation/AIProjectClientImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaAgentInsightMonitorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluationTaxonomiesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaInsightsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaModelsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRedTeamsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRoutinesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSchedulesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSkillsImpl.java","src/main/java/com/azure/ai/projects/implementation/ConnectionsImpl.java","src/main/java/com/azure/ai/projects/implementation/DatasetsImpl.java","src/main/java/com/azure/ai/projects/implementation/DeploymentsImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluationRulesImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/IndexesImpl.java","src/main/java/com/azure/ai/projects/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/projects/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/projects/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/PollingUtils.java","src/main/java/com/azure/ai/projects/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/models/CreateOrUpdateRoutineRequest.java","src/main/java/com/azure/ai/projects/implementation/models/CreateSkillVersionRequest.java","src/main/java/com/azure/ai/projects/implementation/models/DispatchRoutineAsyncRequest.java","src/main/java/com/azure/ai/projects/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/projects/implementation/models/UpdateSkillRequest.java","src/main/java/com/azure/ai/projects/implementation/models/package-info.java","src/main/java/com/azure/ai/projects/implementation/package-info.java","src/main/java/com/azure/ai/projects/models/AIProjectIndex.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/AgentDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentInsight.java","src/main/java/com/azure/ai/projects/models/AgentInsightDetails.java","src/main/java/com/azure/ai/projects/models/AgentInsightEstimatedCost.java","src/main/java/com/azure/ai/projects/models/AgentInsightHighlightedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightLinkedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitor.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorListItem.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightOverviewSource.java","src/main/java/com/azure/ai/projects/models/AgentInsightPromptSurface.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFix.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixChange.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixKind.java","src/main/java/com/azure/ai/projects/models/AgentInsightRecommendedAction.java","src/main/java/com/azure/ai/projects/models/AgentInsightRun.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunResult.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunTrigger.java","src/main/java/com/azure/ai/projects/models/AgentInsightSeverity.java","src/main/java/com/azure/ai/projects/models/AgentInsightStatus.java","src/main/java/com/azure/ai/projects/models/AgentInsightSuspension.java","src/main/java/com/azure/ai/projects/models/AgentInsightTokenUsage.java","src/main/java/com/azure/ai/projects/models/AgentInsightUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverview.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverviewOverride.java","src/main/java/com/azure/ai/projects/models/AgentTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/AgenticIdentityPreviewCredential.java","src/main/java/com/azure/ai/projects/models/ApiError.java","src/main/java/com/azure/ai/projects/models/ApiKeyCredential.java","src/main/java/com/azure/ai/projects/models/ArtifactProfile.java","src/main/java/com/azure/ai/projects/models/AttackStrategy.java","src/main/java/com/azure/ai/projects/models/AzureAIAgentTarget.java","src/main/java/com/azure/ai/projects/models/AzureAIModelTarget.java","src/main/java/com/azure/ai/projects/models/AzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/AzureOpenAIModelConfiguration.java","src/main/java/com/azure/ai/projects/models/BaseCredential.java","src/main/java/com/azure/ai/projects/models/BlobReference.java","src/main/java/com/azure/ai/projects/models/BlobReferenceSasCredential.java","src/main/java/com/azure/ai/projects/models/ChartCoordinate.java","src/main/java/com/azure/ai/projects/models/ClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/ClusterTokenUsage.java","src/main/java/com/azure/ai/projects/models/CodeBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/Connection.java","src/main/java/com/azure/ai/projects/models/ConnectionType.java","src/main/java/com/azure/ai/projects/models/ContinuousEvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/CosmosDBIndex.java","src/main/java/com/azure/ai/projects/models/CreateAsyncResponse.java","src/main/java/com/azure/ai/projects/models/CreateSkillVersionFromFilesBody.java","src/main/java/com/azure/ai/projects/models/CredentialType.java","src/main/java/com/azure/ai/projects/models/CronTrigger.java","src/main/java/com/azure/ai/projects/models/CustomCredential.java","src/main/java/com/azure/ai/projects/models/CustomRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/DailyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/DataGenerationJob.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputWriteMode.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobResult.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobScenario.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobType.java","src/main/java/com/azure/ai/projects/models/DataGenerationModelOptions.java","src/main/java/com/azure/ai/projects/models/DataGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/DatasetCredential.java","src/main/java/com/azure/ai/projects/models/DatasetDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DatasetEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DatasetReference.java","src/main/java/com/azure/ai/projects/models/DatasetType.java","src/main/java/com/azure/ai/projects/models/DatasetVersion.java","src/main/java/com/azure/ai/projects/models/Deployment.java","src/main/java/com/azure/ai/projects/models/DeploymentType.java","src/main/java/com/azure/ai/projects/models/Dimension.java","src/main/java/com/azure/ai/projects/models/DispatchRoutineResult.java","src/main/java/com/azure/ai/projects/models/EmbeddingConfiguration.java","src/main/java/com/azure/ai/projects/models/EndpointBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EntraIdCredential.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/EvaluationLevel.java","src/main/java/com/azure/ai/projects/models/EvaluationResult.java","src/main/java/com/azure/ai/projects/models/EvaluationResultSample.java","src/main/java/com/azure/ai/projects/models/EvaluationRule.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleActionType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleEventType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleFilter.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultCompareItem.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultComparison.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultSummary.java","src/main/java/com/azure/ai/projects/models/EvaluationScheduleTask.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomy.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInputType.java","src/main/java/com/azure/ai/projects/models/EvaluatorCategory.java","src/main/java/com/azure/ai/projects/models/EvaluatorCredentialInput.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinitionType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationArtifacts.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationInputs.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetric.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricDirection.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricType.java","src/main/java/com/azure/ai/projects/models/EvaluatorType.java","src/main/java/com/azure/ai/projects/models/EvaluatorVersion.java","src/main/java/com/azure/ai/projects/models/FieldMapping.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/FileDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FolderDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileCategory.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileSignal.java","src/main/java/com/azure/ai/projects/models/FoundryModelSourceType.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarning.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarningCode.java","src/main/java/com/azure/ai/projects/models/FoundryModelWeightType.java","src/main/java/com/azure/ai/projects/models/GenerationWarningType.java","src/main/java/com/azure/ai/projects/models/GitHubIssueEvent.java","src/main/java/com/azure/ai/projects/models/GitHubIssueRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/GraderAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/HourlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/HumanEvaluationPreviewRuleAction.java","src/main/java/com/azure/ai/projects/models/IndexType.java","src/main/java/com/azure/ai/projects/models/Insight.java","src/main/java/com/azure/ai/projects/models/InsightCluster.java","src/main/java/com/azure/ai/projects/models/InsightModelConfiguration.java","src/main/java/com/azure/ai/projects/models/InsightRequest.java","src/main/java/com/azure/ai/projects/models/InsightResult.java","src/main/java/com/azure/ai/projects/models/InsightSample.java","src/main/java/com/azure/ai/projects/models/InsightScheduleTask.java","src/main/java/com/azure/ai/projects/models/InsightSummary.java","src/main/java/com/azure/ai/projects/models/InsightType.java","src/main/java/com/azure/ai/projects/models/InsightsMetadata.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/JobStatus.java","src/main/java/com/azure/ai/projects/models/ListVersionsRequestType.java","src/main/java/com/azure/ai/projects/models/LoraConfig.java","src/main/java/com/azure/ai/projects/models/ManagedAzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/ModelCredentialInput.java","src/main/java/com/azure/ai/projects/models/ModelDeployment.java","src/main/java/com/azure/ai/projects/models/ModelDeploymentSku.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadInput.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadResult.java","src/main/java/com/azure/ai/projects/models/ModelSamplingParams.java","src/main/java/com/azure/ai/projects/models/ModelSourceData.java","src/main/java/com/azure/ai/projects/models/ModelVersion.java","src/main/java/com/azure/ai/projects/models/MonthlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/NoAuthenticationCredential.java","src/main/java/com/azure/ai/projects/models/OneTimeTrigger.java","src/main/java/com/azure/ai/projects/models/OperationStatus.java","src/main/java/com/azure/ai/projects/models/PendingUploadRequest.java","src/main/java/com/azure/ai/projects/models/PendingUploadResponse.java","src/main/java/com/azure/ai/projects/models/PendingUploadType.java","src/main/java/com/azure/ai/projects/models/PromptBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/PromptDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/PromptEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/RecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/RecurrenceTrigger.java","src/main/java/com/azure/ai/projects/models/RecurrenceType.java","src/main/java/com/azure/ai/projects/models/RedTeam.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/RiskCategory.java","src/main/java/com/azure/ai/projects/models/Routine.java","src/main/java/com/azure/ai/projects/models/RoutineAction.java","src/main/java/com/azure/ai/projects/models/RoutineActionType.java","src/main/java/com/azure/ai/projects/models/RoutineAttemptSource.java","src/main/java/com/azure/ai/projects/models/RoutineAuthorization.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchIdentity.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayload.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayloadType.java","src/main/java/com/azure/ai/projects/models/RoutineRun.java","src/main/java/com/azure/ai/projects/models/RoutineRunPhase.java","src/main/java/com/azure/ai/projects/models/RoutineTrigger.java","src/main/java/com/azure/ai/projects/models/RoutineTriggerType.java","src/main/java/com/azure/ai/projects/models/RubricBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarning.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningCode.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSeverity.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSource.java","src/main/java/com/azure/ai/projects/models/SampleType.java","src/main/java/com/azure/ai/projects/models/SasCredential.java","src/main/java/com/azure/ai/projects/models/Schedule.java","src/main/java/com/azure/ai/projects/models/ScheduleProvisioningStatus.java","src/main/java/com/azure/ai/projects/models/ScheduleRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ScheduleRun.java","src/main/java/com/azure/ai/projects/models/ScheduleTask.java","src/main/java/com/azure/ai/projects/models/ScheduleTaskType.java","src/main/java/com/azure/ai/projects/models/SimpleQnADataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SimpleQnAFineTuningQuestionType.java","src/main/java/com/azure/ai/projects/models/SimulationSeedDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SkillDetails.java","src/main/java/com/azure/ai/projects/models/SkillFileDetails.java","src/main/java/com/azure/ai/projects/models/SkillInlineContent.java","src/main/java/com/azure/ai/projects/models/SkillVersion.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/Target.java","src/main/java/com/azure/ai/projects/models/TargetConfig.java","src/main/java/com/azure/ai/projects/models/TaxonomyCategory.java","src/main/java/com/azure/ai/projects/models/TaxonomySubCategory.java","src/main/java/com/azure/ai/projects/models/TestingCriterionAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/TimerRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ToolDescription.java","src/main/java/com/azure/ai/projects/models/ToolUseFineTuningDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TracesEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TreatmentEffectType.java","src/main/java/com/azure/ai/projects/models/Trigger.java","src/main/java/com/azure/ai/projects/models/TriggerType.java","src/main/java/com/azure/ai/projects/models/UpdateModelVersionInput.java","src/main/java/com/azure/ai/projects/models/WeeklyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/package-info.java","src/main/java/com/azure/ai/projects/package-info.java","src/main/java/module-info.java"]}
\ No newline at end of file
+{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"3585eace6647","crossLanguageDefinitions":{"com.azure.ai.projects.AIProjectClientBuilder":"Azure.AI.Projects","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluatorsAsyncClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaInsightsAsyncClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaInsightsClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaModelsAsyncClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsAsyncClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsAsyncClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaRedTeamsAsyncClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRedTeamsClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRoutinesAsyncClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaRoutinesClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaSchedulesAsyncClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesAsyncClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSchedulesClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSkillsAsyncClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsAsyncClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.ConnectionsAsyncClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsAsyncClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.ConnectionsClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.DatasetsAsyncClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsAsyncClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsAsyncClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsAsyncClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsAsyncClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DeploymentsAsyncClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsAsyncClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.DeploymentsClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.EvaluationRulesAsyncClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluationRulesClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluatorsAsyncClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsAsyncClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.IndexesAsyncClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesAsyncClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.IndexesClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.implementation.models.CreateOrUpdateRoutineRequest":"Azure.AI.Projects.createOrUpdateRoutine.Request.anonymous","com.azure.ai.projects.implementation.models.CreateSkillVersionRequest":"Azure.AI.Projects.createSkillVersion.Request.anonymous","com.azure.ai.projects.implementation.models.DispatchRoutineAsyncRequest":"Azure.AI.Projects.dispatchRoutineAsync.Request.anonymous","com.azure.ai.projects.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.projects.implementation.models.UpdateSkillRequest":"Azure.AI.Projects.updateSkill.Request.anonymous","com.azure.ai.projects.models.AIProjectIndex":"Azure.AI.Projects.Index","com.azure.ai.projects.models.AgentClusterInsightRequest":"Azure.AI.Projects.AgentClusterInsightRequest","com.azure.ai.projects.models.AgentClusterInsightResult":"Azure.AI.Projects.AgentClusterInsightResult","com.azure.ai.projects.models.AgentDataGenerationJobSource":"Azure.AI.Projects.AgentDataGenerationJobSource","com.azure.ai.projects.models.AgentEvaluatorGenerationJobSource":"Azure.AI.Projects.AgentEvaluatorGenerationJobSource","com.azure.ai.projects.models.AgentInsight":"Azure.AI.Projects.AgentInsight","com.azure.ai.projects.models.AgentInsightDetails":"Azure.AI.Projects.AgentInsightDetails","com.azure.ai.projects.models.AgentInsightEstimatedCost":"Azure.AI.Projects.AgentInsightEstimatedCost","com.azure.ai.projects.models.AgentInsightHighlightedTrace":"Azure.AI.Projects.AgentInsightHighlightedTrace","com.azure.ai.projects.models.AgentInsightLinkedTrace":"Azure.AI.Projects.AgentInsightLinkedTrace","com.azure.ai.projects.models.AgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitor","com.azure.ai.projects.models.AgentInsightMonitorCreate":"Azure.AI.Projects.AgentInsightMonitorCreate","com.azure.ai.projects.models.AgentInsightMonitorListItem":"Azure.AI.Projects.AgentInsightMonitorListItem","com.azure.ai.projects.models.AgentInsightMonitorUpdate":"Azure.AI.Projects.AgentInsightMonitorUpdate","com.azure.ai.projects.models.AgentInsightOverviewSource":"Azure.AI.Projects.AgentInsightOverviewSource","com.azure.ai.projects.models.AgentInsightPromptSurface":"Azure.AI.Projects.AgentInsightPromptSurface","com.azure.ai.projects.models.AgentInsightProposedFix":"Azure.AI.Projects.AgentInsightProposedFix","com.azure.ai.projects.models.AgentInsightProposedFixChange":"Azure.AI.Projects.AgentInsightProposedFixChange","com.azure.ai.projects.models.AgentInsightProposedFixKind":"Azure.AI.Projects.AgentInsightProposedFixKind","com.azure.ai.projects.models.AgentInsightRecommendedAction":"Azure.AI.Projects.AgentInsightRecommendedAction","com.azure.ai.projects.models.AgentInsightRun":"Azure.AI.Projects.AgentInsightRun","com.azure.ai.projects.models.AgentInsightRunCreate":"Azure.AI.Projects.AgentInsightRunCreate","com.azure.ai.projects.models.AgentInsightRunResult":"Azure.AI.Projects.AgentInsightRunResult","com.azure.ai.projects.models.AgentInsightRunTrigger":"Azure.AI.Projects.AgentInsightRunTrigger","com.azure.ai.projects.models.AgentInsightSeverity":"Azure.AI.Projects.AgentInsightSeverity","com.azure.ai.projects.models.AgentInsightStatus":"Azure.AI.Projects.AgentInsightStatus","com.azure.ai.projects.models.AgentInsightSuspension":"Azure.AI.Projects.AgentInsightSuspension","com.azure.ai.projects.models.AgentInsightTokenUsage":"Azure.AI.Projects.AgentInsightTokenUsage","com.azure.ai.projects.models.AgentInsightUpdate":"Azure.AI.Projects.AgentInsightUpdate","com.azure.ai.projects.models.AgentInsightsOverview":"Azure.AI.Projects.AgentInsightsOverview","com.azure.ai.projects.models.AgentInsightsOverviewOverride":"Azure.AI.Projects.AgentInsightsOverviewOverride","com.azure.ai.projects.models.AgentTaxonomyInput":"Azure.AI.Projects.AgentTaxonomyInput","com.azure.ai.projects.models.AgenticIdentityPreviewCredential":"Azure.AI.Projects.AgenticIdentityPreviewCredentials","com.azure.ai.projects.models.ApiError":"OpenAI.Error","com.azure.ai.projects.models.ApiKeyCredential":"Azure.AI.Projects.ApiKeyCredentials","com.azure.ai.projects.models.ArtifactProfile":"Azure.AI.Projects.ArtifactProfile","com.azure.ai.projects.models.AttackStrategy":"Azure.AI.Projects.AttackStrategy","com.azure.ai.projects.models.AzureAIAgentTarget":"Azure.AI.Projects.AzureAIAgentTarget","com.azure.ai.projects.models.AzureAIModelTarget":"Azure.AI.Projects.AzureAIModelTarget","com.azure.ai.projects.models.AzureAISearchIndex":"Azure.AI.Projects.AzureAISearchIndex","com.azure.ai.projects.models.AzureOpenAIModelConfiguration":"Azure.AI.Projects.AzureOpenAIModelConfiguration","com.azure.ai.projects.models.BaseCredential":"Azure.AI.Projects.BaseCredentials","com.azure.ai.projects.models.BlobReference":"Azure.AI.Projects.BlobReference","com.azure.ai.projects.models.BlobReferenceSasCredential":"Azure.AI.Projects.SasCredential","com.azure.ai.projects.models.ChartCoordinate":"Azure.AI.Projects.ChartCoordinate","com.azure.ai.projects.models.ClusterInsightResult":"Azure.AI.Projects.ClusterInsightResult","com.azure.ai.projects.models.ClusterTokenUsage":"Azure.AI.Projects.ClusterTokenUsage","com.azure.ai.projects.models.CodeBasedEvaluatorDefinition":"Azure.AI.Projects.CodeBasedEvaluatorDefinition","com.azure.ai.projects.models.Connection":"Azure.AI.Projects.Connection","com.azure.ai.projects.models.ConnectionType":"Azure.AI.Projects.ConnectionType","com.azure.ai.projects.models.ContinuousEvaluationRuleAction":"Azure.AI.Projects.ContinuousEvaluationRuleAction","com.azure.ai.projects.models.CosmosDBIndex":"Azure.AI.Projects.CosmosDBIndex","com.azure.ai.projects.models.CreateAsyncResponse":"Azure.AI.Projects.createAsync.Response.anonymous","com.azure.ai.projects.models.CreateSkillVersionFromFilesBody":"Azure.AI.Projects.CreateSkillVersionFromFilesBody","com.azure.ai.projects.models.CredentialType":"Azure.AI.Projects.CredentialType","com.azure.ai.projects.models.CronTrigger":"Azure.AI.Projects.CronTrigger","com.azure.ai.projects.models.CustomCredential":"Azure.AI.Projects.CustomCredential","com.azure.ai.projects.models.CustomRoutineTrigger":"Azure.AI.Projects.CustomRoutineTrigger","com.azure.ai.projects.models.DailyRecurrenceSchedule":"Azure.AI.Projects.DailyRecurrenceSchedule","com.azure.ai.projects.models.DataGenerationJob":"Azure.AI.Projects.DataGenerationJob","com.azure.ai.projects.models.DataGenerationJobConfiguration":"Azure.AI.Projects.DataGenerationJobConfiguration","com.azure.ai.projects.models.DataGenerationJobInputs":"Azure.AI.Projects.DataGenerationJobInputs","com.azure.ai.projects.models.DataGenerationJobOutput":"Azure.AI.Projects.DataGenerationJobOutput","com.azure.ai.projects.models.DataGenerationJobOutputType":"Azure.AI.Projects.DataGenerationJobOutputType","com.azure.ai.projects.models.DataGenerationJobOutputWriteMode":"Azure.AI.Projects.DataGenerationJobOutputWriteMode","com.azure.ai.projects.models.DataGenerationJobResult":"Azure.AI.Projects.DataGenerationJobResult","com.azure.ai.projects.models.DataGenerationJobScenario":"Azure.AI.Projects.DataGenerationJobScenario","com.azure.ai.projects.models.DataGenerationJobSource":"Azure.AI.Projects.DataGenerationJobSource","com.azure.ai.projects.models.DataGenerationJobSourceType":"Azure.AI.Projects.DataGenerationJobSourceType","com.azure.ai.projects.models.DataGenerationJobType":"Azure.AI.Projects.DataGenerationJobType","com.azure.ai.projects.models.DataGenerationModelOptions":"Azure.AI.Projects.DataGenerationModelOptions","com.azure.ai.projects.models.DataGenerationTokenUsage":"Azure.AI.Projects.DataGenerationTokenUsage","com.azure.ai.projects.models.DatasetCredential":"Azure.AI.Projects.AssetCredentialResponse","com.azure.ai.projects.models.DatasetDataGenerationJobOutput":"Azure.AI.Projects.DatasetDataGenerationJobOutput","com.azure.ai.projects.models.DatasetEvaluatorGenerationJobSource":"Azure.AI.Projects.DatasetEvaluatorGenerationJobSource","com.azure.ai.projects.models.DatasetReference":"Azure.AI.Projects.DatasetReference","com.azure.ai.projects.models.DatasetType":"Azure.AI.Projects.DatasetType","com.azure.ai.projects.models.DatasetVersion":"Azure.AI.Projects.DatasetVersion","com.azure.ai.projects.models.Deployment":"Azure.AI.Projects.Deployment","com.azure.ai.projects.models.DeploymentType":"Azure.AI.Projects.DeploymentType","com.azure.ai.projects.models.Dimension":"Azure.AI.Projects.Dimension","com.azure.ai.projects.models.DispatchRoutineResult":"Azure.AI.Projects.DispatchRoutineResponse","com.azure.ai.projects.models.EmbeddingConfiguration":"Azure.AI.Projects.EmbeddingConfiguration","com.azure.ai.projects.models.EndpointBasedEvaluatorDefinition":"Azure.AI.Projects.EndpointBasedEvaluatorDefinition","com.azure.ai.projects.models.EntraIdCredential":"Azure.AI.Projects.EntraIDCredentials","com.azure.ai.projects.models.EvaluationComparisonInsightRequest":"Azure.AI.Projects.EvaluationComparisonInsightRequest","com.azure.ai.projects.models.EvaluationComparisonInsightResult":"Azure.AI.Projects.EvaluationComparisonInsightResult","com.azure.ai.projects.models.EvaluationDataGenerationJob":"Azure.AI.Projects.EvaluationDataGenerationJob","com.azure.ai.projects.models.EvaluationDataGenerationJobInputs":"Azure.AI.Projects.EvaluationDataGenerationJobInputs","com.azure.ai.projects.models.EvaluationDataGenerationJobOutputConfiguration":"Azure.AI.Projects.EvaluationDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.EvaluationLevel":"Azure.AI.Projects.EvaluationLevel","com.azure.ai.projects.models.EvaluationResult":"Azure.AI.Projects.EvalResult","com.azure.ai.projects.models.EvaluationResultSample":"Azure.AI.Projects.EvaluationResultSample","com.azure.ai.projects.models.EvaluationRule":"Azure.AI.Projects.EvaluationRule","com.azure.ai.projects.models.EvaluationRuleAction":"Azure.AI.Projects.EvaluationRuleAction","com.azure.ai.projects.models.EvaluationRuleActionType":"Azure.AI.Projects.EvaluationRuleActionType","com.azure.ai.projects.models.EvaluationRuleEventType":"Azure.AI.Projects.EvaluationRuleEventType","com.azure.ai.projects.models.EvaluationRuleFilter":"Azure.AI.Projects.EvaluationRuleFilter","com.azure.ai.projects.models.EvaluationRunClusterInsightRequest":"Azure.AI.Projects.EvaluationRunClusterInsightRequest","com.azure.ai.projects.models.EvaluationRunClusterInsightResult":"Azure.AI.Projects.EvaluationRunClusterInsightResult","com.azure.ai.projects.models.EvaluationRunResultCompareItem":"Azure.AI.Projects.EvalRunResultCompareItem","com.azure.ai.projects.models.EvaluationRunResultComparison":"Azure.AI.Projects.EvalRunResultComparison","com.azure.ai.projects.models.EvaluationRunResultSummary":"Azure.AI.Projects.EvalRunResultSummary","com.azure.ai.projects.models.EvaluationScheduleTask":"Azure.AI.Projects.EvaluationScheduleTask","com.azure.ai.projects.models.EvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomy","com.azure.ai.projects.models.EvaluationTaxonomyInput":"Azure.AI.Projects.EvaluationTaxonomyInput","com.azure.ai.projects.models.EvaluationTaxonomyInputType":"Azure.AI.Projects.EvaluationTaxonomyInputType","com.azure.ai.projects.models.EvaluatorCategory":"Azure.AI.Projects.EvaluatorCategory","com.azure.ai.projects.models.EvaluatorCredentialInput":"Azure.AI.Projects.EvaluatorCredentialRequest","com.azure.ai.projects.models.EvaluatorDefinition":"Azure.AI.Projects.EvaluatorDefinition","com.azure.ai.projects.models.EvaluatorDefinitionType":"Azure.AI.Projects.EvaluatorDefinitionType","com.azure.ai.projects.models.EvaluatorGenerationArtifacts":"Azure.AI.Projects.EvaluatorGenerationArtifacts","com.azure.ai.projects.models.EvaluatorGenerationInputs":"Azure.AI.Projects.EvaluatorGenerationInputs","com.azure.ai.projects.models.EvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJob","com.azure.ai.projects.models.EvaluatorGenerationJobSource":"Azure.AI.Projects.EvaluatorGenerationJobSource","com.azure.ai.projects.models.EvaluatorGenerationJobSourceType":"Azure.AI.Projects.EvaluatorGenerationJobSourceType","com.azure.ai.projects.models.EvaluatorGenerationTokenUsage":"Azure.AI.Projects.EvaluatorGenerationTokenUsage","com.azure.ai.projects.models.EvaluatorMetric":"Azure.AI.Projects.EvaluatorMetric","com.azure.ai.projects.models.EvaluatorMetricDirection":"Azure.AI.Projects.EvaluatorMetricDirection","com.azure.ai.projects.models.EvaluatorMetricType":"Azure.AI.Projects.EvaluatorMetricType","com.azure.ai.projects.models.EvaluatorType":"Azure.AI.Projects.EvaluatorType","com.azure.ai.projects.models.EvaluatorVersion":"Azure.AI.Projects.EvaluatorVersion","com.azure.ai.projects.models.FieldMapping":"Azure.AI.Projects.FieldMapping","com.azure.ai.projects.models.FileDataGenerationJobOutput":"Azure.AI.Projects.FileDataGenerationJobOutput","com.azure.ai.projects.models.FileDataGenerationJobSource":"Azure.AI.Projects.FileDataGenerationJobSource","com.azure.ai.projects.models.FileDatasetVersion":"Azure.AI.Projects.FileDatasetVersion","com.azure.ai.projects.models.FolderDatasetVersion":"Azure.AI.Projects.FolderDatasetVersion","com.azure.ai.projects.models.FoundryModelArtifactProfileCategory":"Azure.AI.Projects.FoundryModelArtifactProfileCategory","com.azure.ai.projects.models.FoundryModelArtifactProfileSignal":"Azure.AI.Projects.FoundryModelArtifactProfileSignal","com.azure.ai.projects.models.FoundryModelSourceType":"Azure.AI.Projects.FoundryModelSourceType","com.azure.ai.projects.models.FoundryModelWarning":"Azure.AI.Projects.FoundryModelWarning","com.azure.ai.projects.models.FoundryModelWarningCode":"Azure.AI.Projects.FoundryModelWarningCode","com.azure.ai.projects.models.FoundryModelWeightType":"Azure.AI.Projects.FoundryModelWeightType","com.azure.ai.projects.models.GenerationWarningType":"Azure.AI.Projects.GenerationWarningType","com.azure.ai.projects.models.GitHubIssueEvent":"Azure.AI.Projects.GitHubIssueEvent","com.azure.ai.projects.models.GitHubIssueRoutineTrigger":"Azure.AI.Projects.GitHubIssueRoutineTrigger","com.azure.ai.projects.models.GraderAzureAIEvaluator":"Azure.AI.Projects.GraderAzureAIEvaluator","com.azure.ai.projects.models.HourlyRecurrenceSchedule":"Azure.AI.Projects.HourlyRecurrenceSchedule","com.azure.ai.projects.models.HumanEvaluationPreviewRuleAction":"Azure.AI.Projects.HumanEvaluationPreviewRuleAction","com.azure.ai.projects.models.IndexType":"Azure.AI.Projects.IndexType","com.azure.ai.projects.models.Insight":"Azure.AI.Projects.Insight","com.azure.ai.projects.models.InsightCluster":"Azure.AI.Projects.InsightCluster","com.azure.ai.projects.models.InsightModelConfiguration":"Azure.AI.Projects.InsightModelConfiguration","com.azure.ai.projects.models.InsightRequest":"Azure.AI.Projects.InsightRequest","com.azure.ai.projects.models.InsightResult":"Azure.AI.Projects.InsightResult","com.azure.ai.projects.models.InsightSample":"Azure.AI.Projects.InsightSample","com.azure.ai.projects.models.InsightScheduleTask":"Azure.AI.Projects.InsightScheduleTask","com.azure.ai.projects.models.InsightSummary":"Azure.AI.Projects.InsightSummary","com.azure.ai.projects.models.InsightType":"Azure.AI.Projects.InsightType","com.azure.ai.projects.models.InsightsMetadata":"Azure.AI.Projects.InsightsMetadata","com.azure.ai.projects.models.InvokeAgentInvocationsApiDispatchPayload":"Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentInvocationsApiRoutineAction":"Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction","com.azure.ai.projects.models.InvokeAgentResponsesApiDispatchPayload":"Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentResponsesApiRoutineAction":"Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction","com.azure.ai.projects.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.projects.models.ListVersionsRequestType":"Azure.AI.Projects.listVersions.RequestType.anonymous","com.azure.ai.projects.models.LoraConfig":"Azure.AI.Projects.LoraConfig","com.azure.ai.projects.models.ManagedAzureAISearchIndex":"Azure.AI.Projects.ManagedAzureAISearchIndex","com.azure.ai.projects.models.ModelCredentialInput":"Azure.AI.Projects.ModelCredentialRequest","com.azure.ai.projects.models.ModelDeployment":"Azure.AI.Projects.ModelDeployment","com.azure.ai.projects.models.ModelDeploymentSku":"Azure.AI.Projects.Sku","com.azure.ai.projects.models.ModelPendingUploadInput":"Azure.AI.Projects.ModelPendingUploadRequest","com.azure.ai.projects.models.ModelPendingUploadResult":"Azure.AI.Projects.ModelPendingUploadResponse","com.azure.ai.projects.models.ModelSamplingParams":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.projects.models.ModelSourceData":"Azure.AI.Projects.ModelSourceData","com.azure.ai.projects.models.ModelVersion":"Azure.AI.Projects.ModelVersion","com.azure.ai.projects.models.MonthlyRecurrenceSchedule":"Azure.AI.Projects.MonthlyRecurrenceSchedule","com.azure.ai.projects.models.NoAuthenticationCredential":"Azure.AI.Projects.NoAuthenticationCredentials","com.azure.ai.projects.models.OneTimeTrigger":"Azure.AI.Projects.OneTimeTrigger","com.azure.ai.projects.models.OperationStatus":"Azure.Core.Foundations.OperationState","com.azure.ai.projects.models.PendingUploadRequest":"Azure.AI.Projects.PendingUploadRequest","com.azure.ai.projects.models.PendingUploadResponse":"Azure.AI.Projects.PendingUploadResponse","com.azure.ai.projects.models.PendingUploadType":"Azure.AI.Projects.PendingUploadType","com.azure.ai.projects.models.PromptBasedEvaluatorDefinition":"Azure.AI.Projects.PromptBasedEvaluatorDefinition","com.azure.ai.projects.models.PromptDataGenerationJobSource":"Azure.AI.Projects.PromptDataGenerationJobSource","com.azure.ai.projects.models.PromptEvaluatorGenerationJobSource":"Azure.AI.Projects.PromptEvaluatorGenerationJobSource","com.azure.ai.projects.models.RecurrenceSchedule":"Azure.AI.Projects.RecurrenceSchedule","com.azure.ai.projects.models.RecurrenceTrigger":"Azure.AI.Projects.RecurrenceTrigger","com.azure.ai.projects.models.RecurrenceType":"Azure.AI.Projects.RecurrenceType","com.azure.ai.projects.models.RedTeam":"Azure.AI.Projects.RedTeam","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJob":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJob","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobInputs":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.RiskCategory":"Azure.AI.Projects.RiskCategory","com.azure.ai.projects.models.Routine":"Azure.AI.Projects.Routine","com.azure.ai.projects.models.RoutineAction":"Azure.AI.Projects.RoutineAction","com.azure.ai.projects.models.RoutineActionType":"Azure.AI.Projects.RoutineActionType","com.azure.ai.projects.models.RoutineAttemptSource":"Azure.AI.Projects.RoutineAttemptSource","com.azure.ai.projects.models.RoutineAuthorization":"Azure.AI.Projects.RoutineAuthorization","com.azure.ai.projects.models.RoutineDispatchIdentity":"Azure.AI.Projects.RoutineDispatchIdentity","com.azure.ai.projects.models.RoutineDispatchPayload":"Azure.AI.Projects.RoutineDispatchPayload","com.azure.ai.projects.models.RoutineDispatchPayloadType":"Azure.AI.Projects.RoutineDispatchPayloadType","com.azure.ai.projects.models.RoutineRun":"Azure.AI.Projects.RoutineRun","com.azure.ai.projects.models.RoutineRunPhase":"Azure.AI.Projects.RoutineRunPhase","com.azure.ai.projects.models.RoutineTrigger":"Azure.AI.Projects.RoutineTrigger","com.azure.ai.projects.models.RoutineTriggerType":"Azure.AI.Projects.RoutineTriggerType","com.azure.ai.projects.models.RubricBasedEvaluatorDefinition":"Azure.AI.Projects.RubricBasedEvaluatorDefinition","com.azure.ai.projects.models.RubricGenerationInputQualityWarning":"Azure.AI.Projects.RubricGenerationInputQualityWarning","com.azure.ai.projects.models.RubricGenerationInputQualityWarningCode":"Azure.AI.Projects.RubricGenerationInputQualityWarningCode","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSeverity":"Azure.AI.Projects.RubricGenerationInputQualityWarningSeverity","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSource":"Azure.AI.Projects.RubricGenerationInputQualityWarningSource","com.azure.ai.projects.models.SampleType":"Azure.AI.Projects.SampleType","com.azure.ai.projects.models.SasCredential":"Azure.AI.Projects.SASCredentials","com.azure.ai.projects.models.Schedule":"Azure.AI.Projects.Schedule","com.azure.ai.projects.models.ScheduleProvisioningStatus":"Azure.AI.Projects.ScheduleProvisioningStatus","com.azure.ai.projects.models.ScheduleRoutineTrigger":"Azure.AI.Projects.ScheduleRoutineTrigger","com.azure.ai.projects.models.ScheduleRun":"Azure.AI.Projects.ScheduleRun","com.azure.ai.projects.models.ScheduleTask":"Azure.AI.Projects.ScheduleTask","com.azure.ai.projects.models.ScheduleTaskType":"Azure.AI.Projects.ScheduleTaskType","com.azure.ai.projects.models.SimpleQnADataGenerationJobConfiguration":"Azure.AI.Projects.SimpleQnADataGenerationJobConfiguration","com.azure.ai.projects.models.SimpleQnAFineTuningQuestionType":"Azure.AI.Projects.SimpleQnAFineTuningQuestionType","com.azure.ai.projects.models.SimulationSeedDataGenerationJobConfiguration":"Azure.AI.Projects.SimulationSeedDataGenerationJobConfiguration","com.azure.ai.projects.models.SkillDetails":"Azure.AI.Projects.Skill","com.azure.ai.projects.models.SkillFileDetails":"TypeSpec.Http.File","com.azure.ai.projects.models.SkillInlineContent":"Azure.AI.Projects.SkillInlineContent","com.azure.ai.projects.models.SkillVersion":"Azure.AI.Projects.SkillVersion","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJob":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJob","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobInputs":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.Target":"Azure.AI.Projects.FoundryEvaluationTarget","com.azure.ai.projects.models.TargetConfig":"Azure.AI.Projects.RedTeamTargetConfig","com.azure.ai.projects.models.TaxonomyCategory":"Azure.AI.Projects.TaxonomyCategory","com.azure.ai.projects.models.TaxonomySubCategory":"Azure.AI.Projects.TaxonomySubCategory","com.azure.ai.projects.models.TestingCriterionAzureAIEvaluator":"Azure.AI.Projects.TestingCriterionAzureAIEvaluator","com.azure.ai.projects.models.TimerRoutineTrigger":"Azure.AI.Projects.TimerRoutineTrigger","com.azure.ai.projects.models.ToolDescription":"Azure.AI.Projects.ToolDescription","com.azure.ai.projects.models.ToolUseFineTuningDataGenerationJobConfiguration":"Azure.AI.Projects.ToolUseFineTuningDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobConfiguration":"Azure.AI.Projects.TracesDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobSource":"Azure.AI.Projects.TracesDataGenerationJobSource","com.azure.ai.projects.models.TracesEvaluatorGenerationJobSource":"Azure.AI.Projects.TracesEvaluatorGenerationJobSource","com.azure.ai.projects.models.TreatmentEffectType":"Azure.AI.Projects.TreatmentEffectType","com.azure.ai.projects.models.Trigger":"Azure.AI.Projects.Trigger","com.azure.ai.projects.models.TriggerType":"Azure.AI.Projects.TriggerType","com.azure.ai.projects.models.UpdateModelVersionInput":"Azure.AI.Projects.UpdateModelVersionRequest","com.azure.ai.projects.models.WeeklyRecurrenceSchedule":"Azure.AI.Projects.WeeklyRecurrenceSchedule"},"generatedFiles":["src/main/java/com/azure/ai/projects/AIProjectClientBuilder.java","src/main/java/com/azure/ai/projects/AIProjectsServiceVersion.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsClient.java","src/main/java/com/azure/ai/projects/BetaInsightsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaInsightsClient.java","src/main/java/com/azure/ai/projects/BetaModelsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaModelsClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesClient.java","src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSkillsClient.java","src/main/java/com/azure/ai/projects/ConnectionsAsyncClient.java","src/main/java/com/azure/ai/projects/ConnectionsClient.java","src/main/java/com/azure/ai/projects/DatasetsAsyncClient.java","src/main/java/com/azure/ai/projects/DatasetsClient.java","src/main/java/com/azure/ai/projects/DeploymentsAsyncClient.java","src/main/java/com/azure/ai/projects/DeploymentsClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesClient.java","src/main/java/com/azure/ai/projects/EvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluatorsClient.java","src/main/java/com/azure/ai/projects/IndexesAsyncClient.java","src/main/java/com/azure/ai/projects/IndexesClient.java","src/main/java/com/azure/ai/projects/implementation/AIProjectClientImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaAgentInsightMonitorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluationTaxonomiesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaInsightsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaModelsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRedTeamsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRoutinesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSchedulesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSkillsImpl.java","src/main/java/com/azure/ai/projects/implementation/ConnectionsImpl.java","src/main/java/com/azure/ai/projects/implementation/DatasetsImpl.java","src/main/java/com/azure/ai/projects/implementation/DeploymentsImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluationRulesImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/IndexesImpl.java","src/main/java/com/azure/ai/projects/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/projects/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/projects/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/PollingUtils.java","src/main/java/com/azure/ai/projects/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/models/CreateOrUpdateRoutineRequest.java","src/main/java/com/azure/ai/projects/implementation/models/CreateSkillVersionRequest.java","src/main/java/com/azure/ai/projects/implementation/models/DispatchRoutineAsyncRequest.java","src/main/java/com/azure/ai/projects/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/projects/implementation/models/UpdateSkillRequest.java","src/main/java/com/azure/ai/projects/implementation/models/package-info.java","src/main/java/com/azure/ai/projects/implementation/package-info.java","src/main/java/com/azure/ai/projects/models/AIProjectIndex.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/AgentDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentInsight.java","src/main/java/com/azure/ai/projects/models/AgentInsightDetails.java","src/main/java/com/azure/ai/projects/models/AgentInsightEstimatedCost.java","src/main/java/com/azure/ai/projects/models/AgentInsightHighlightedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightLinkedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitor.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorListItem.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightOverviewSource.java","src/main/java/com/azure/ai/projects/models/AgentInsightPromptSurface.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFix.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixChange.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixKind.java","src/main/java/com/azure/ai/projects/models/AgentInsightRecommendedAction.java","src/main/java/com/azure/ai/projects/models/AgentInsightRun.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunResult.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunTrigger.java","src/main/java/com/azure/ai/projects/models/AgentInsightSeverity.java","src/main/java/com/azure/ai/projects/models/AgentInsightStatus.java","src/main/java/com/azure/ai/projects/models/AgentInsightSuspension.java","src/main/java/com/azure/ai/projects/models/AgentInsightTokenUsage.java","src/main/java/com/azure/ai/projects/models/AgentInsightUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverview.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverviewOverride.java","src/main/java/com/azure/ai/projects/models/AgentTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/AgenticIdentityPreviewCredential.java","src/main/java/com/azure/ai/projects/models/ApiError.java","src/main/java/com/azure/ai/projects/models/ApiKeyCredential.java","src/main/java/com/azure/ai/projects/models/ArtifactProfile.java","src/main/java/com/azure/ai/projects/models/AttackStrategy.java","src/main/java/com/azure/ai/projects/models/AzureAIAgentTarget.java","src/main/java/com/azure/ai/projects/models/AzureAIModelTarget.java","src/main/java/com/azure/ai/projects/models/AzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/AzureOpenAIModelConfiguration.java","src/main/java/com/azure/ai/projects/models/BaseCredential.java","src/main/java/com/azure/ai/projects/models/BlobReference.java","src/main/java/com/azure/ai/projects/models/BlobReferenceSasCredential.java","src/main/java/com/azure/ai/projects/models/ChartCoordinate.java","src/main/java/com/azure/ai/projects/models/ClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/ClusterTokenUsage.java","src/main/java/com/azure/ai/projects/models/CodeBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/Connection.java","src/main/java/com/azure/ai/projects/models/ConnectionType.java","src/main/java/com/azure/ai/projects/models/ContinuousEvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/CosmosDBIndex.java","src/main/java/com/azure/ai/projects/models/CreateAsyncResponse.java","src/main/java/com/azure/ai/projects/models/CreateSkillVersionFromFilesBody.java","src/main/java/com/azure/ai/projects/models/CredentialType.java","src/main/java/com/azure/ai/projects/models/CronTrigger.java","src/main/java/com/azure/ai/projects/models/CustomCredential.java","src/main/java/com/azure/ai/projects/models/CustomRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/DailyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/DataGenerationJob.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputWriteMode.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobResult.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobScenario.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobType.java","src/main/java/com/azure/ai/projects/models/DataGenerationModelOptions.java","src/main/java/com/azure/ai/projects/models/DataGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/DatasetCredential.java","src/main/java/com/azure/ai/projects/models/DatasetDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DatasetEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DatasetReference.java","src/main/java/com/azure/ai/projects/models/DatasetType.java","src/main/java/com/azure/ai/projects/models/DatasetVersion.java","src/main/java/com/azure/ai/projects/models/Deployment.java","src/main/java/com/azure/ai/projects/models/DeploymentType.java","src/main/java/com/azure/ai/projects/models/Dimension.java","src/main/java/com/azure/ai/projects/models/DispatchRoutineResult.java","src/main/java/com/azure/ai/projects/models/EmbeddingConfiguration.java","src/main/java/com/azure/ai/projects/models/EndpointBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EntraIdCredential.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/EvaluationLevel.java","src/main/java/com/azure/ai/projects/models/EvaluationResult.java","src/main/java/com/azure/ai/projects/models/EvaluationResultSample.java","src/main/java/com/azure/ai/projects/models/EvaluationRule.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleActionType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleEventType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleFilter.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultCompareItem.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultComparison.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultSummary.java","src/main/java/com/azure/ai/projects/models/EvaluationScheduleTask.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomy.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInputType.java","src/main/java/com/azure/ai/projects/models/EvaluatorCategory.java","src/main/java/com/azure/ai/projects/models/EvaluatorCredentialInput.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinitionType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationArtifacts.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationInputs.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetric.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricDirection.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricType.java","src/main/java/com/azure/ai/projects/models/EvaluatorType.java","src/main/java/com/azure/ai/projects/models/EvaluatorVersion.java","src/main/java/com/azure/ai/projects/models/FieldMapping.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/FileDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FolderDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileCategory.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileSignal.java","src/main/java/com/azure/ai/projects/models/FoundryModelSourceType.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarning.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarningCode.java","src/main/java/com/azure/ai/projects/models/FoundryModelWeightType.java","src/main/java/com/azure/ai/projects/models/GenerationWarningType.java","src/main/java/com/azure/ai/projects/models/GitHubIssueEvent.java","src/main/java/com/azure/ai/projects/models/GitHubIssueRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/GraderAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/HourlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/HumanEvaluationPreviewRuleAction.java","src/main/java/com/azure/ai/projects/models/IndexType.java","src/main/java/com/azure/ai/projects/models/Insight.java","src/main/java/com/azure/ai/projects/models/InsightCluster.java","src/main/java/com/azure/ai/projects/models/InsightModelConfiguration.java","src/main/java/com/azure/ai/projects/models/InsightRequest.java","src/main/java/com/azure/ai/projects/models/InsightResult.java","src/main/java/com/azure/ai/projects/models/InsightSample.java","src/main/java/com/azure/ai/projects/models/InsightScheduleTask.java","src/main/java/com/azure/ai/projects/models/InsightSummary.java","src/main/java/com/azure/ai/projects/models/InsightType.java","src/main/java/com/azure/ai/projects/models/InsightsMetadata.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/JobStatus.java","src/main/java/com/azure/ai/projects/models/ListVersionsRequestType.java","src/main/java/com/azure/ai/projects/models/LoraConfig.java","src/main/java/com/azure/ai/projects/models/ManagedAzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/ModelCredentialInput.java","src/main/java/com/azure/ai/projects/models/ModelDeployment.java","src/main/java/com/azure/ai/projects/models/ModelDeploymentSku.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadInput.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadResult.java","src/main/java/com/azure/ai/projects/models/ModelSamplingParams.java","src/main/java/com/azure/ai/projects/models/ModelSourceData.java","src/main/java/com/azure/ai/projects/models/ModelVersion.java","src/main/java/com/azure/ai/projects/models/MonthlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/NoAuthenticationCredential.java","src/main/java/com/azure/ai/projects/models/OneTimeTrigger.java","src/main/java/com/azure/ai/projects/models/OperationStatus.java","src/main/java/com/azure/ai/projects/models/PendingUploadRequest.java","src/main/java/com/azure/ai/projects/models/PendingUploadResponse.java","src/main/java/com/azure/ai/projects/models/PendingUploadType.java","src/main/java/com/azure/ai/projects/models/PromptBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/PromptDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/PromptEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/RecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/RecurrenceTrigger.java","src/main/java/com/azure/ai/projects/models/RecurrenceType.java","src/main/java/com/azure/ai/projects/models/RedTeam.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/RiskCategory.java","src/main/java/com/azure/ai/projects/models/Routine.java","src/main/java/com/azure/ai/projects/models/RoutineAction.java","src/main/java/com/azure/ai/projects/models/RoutineActionType.java","src/main/java/com/azure/ai/projects/models/RoutineAttemptSource.java","src/main/java/com/azure/ai/projects/models/RoutineAuthorization.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchIdentity.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayload.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayloadType.java","src/main/java/com/azure/ai/projects/models/RoutineRun.java","src/main/java/com/azure/ai/projects/models/RoutineRunPhase.java","src/main/java/com/azure/ai/projects/models/RoutineTrigger.java","src/main/java/com/azure/ai/projects/models/RoutineTriggerType.java","src/main/java/com/azure/ai/projects/models/RubricBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarning.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningCode.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSeverity.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSource.java","src/main/java/com/azure/ai/projects/models/SampleType.java","src/main/java/com/azure/ai/projects/models/SasCredential.java","src/main/java/com/azure/ai/projects/models/Schedule.java","src/main/java/com/azure/ai/projects/models/ScheduleProvisioningStatus.java","src/main/java/com/azure/ai/projects/models/ScheduleRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ScheduleRun.java","src/main/java/com/azure/ai/projects/models/ScheduleTask.java","src/main/java/com/azure/ai/projects/models/ScheduleTaskType.java","src/main/java/com/azure/ai/projects/models/SimpleQnADataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SimpleQnAFineTuningQuestionType.java","src/main/java/com/azure/ai/projects/models/SimulationSeedDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SkillDetails.java","src/main/java/com/azure/ai/projects/models/SkillFileDetails.java","src/main/java/com/azure/ai/projects/models/SkillInlineContent.java","src/main/java/com/azure/ai/projects/models/SkillVersion.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/Target.java","src/main/java/com/azure/ai/projects/models/TargetConfig.java","src/main/java/com/azure/ai/projects/models/TaxonomyCategory.java","src/main/java/com/azure/ai/projects/models/TaxonomySubCategory.java","src/main/java/com/azure/ai/projects/models/TestingCriterionAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/TimerRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ToolDescription.java","src/main/java/com/azure/ai/projects/models/ToolUseFineTuningDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TracesEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TreatmentEffectType.java","src/main/java/com/azure/ai/projects/models/Trigger.java","src/main/java/com/azure/ai/projects/models/TriggerType.java","src/main/java/com/azure/ai/projects/models/UpdateModelVersionInput.java","src/main/java/com/azure/ai/projects/models/WeeklyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/package-info.java","src/main/java/com/azure/ai/projects/package-info.java","src/main/java/module-info.java"]}
\ No newline at end of file
diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml b/sdk/ai/azure-ai-projects/tsp-location.yaml
index cec5602ae2a3..9f407863456d 100644
--- a/sdk/ai/azure-ai-projects/tsp-location.yaml
+++ b/sdk/ai/azure-ai-projects/tsp-location.yaml
@@ -1,5 +1,5 @@
 directory: specification/ai-foundry/data-plane/Foundry/src/sdk-java-azure-ai-projects
-commit: ba8a5e96e8c92e540062922f7bed5a06920f400c
+commit: 040251f8f0685dfc8a9dfe42e85f494bf2d94d6f
 repo: Azure/azure-rest-api-specs
 additionalDirectories:
     - specification/ai-foundry/data-plane/Foundry/src/sdk-common

From bef88eac33614b806a763be337ca74cfc4adcac9 Mon Sep 17 00:00:00 2001
From: Kaylie <50653231+kaylieee@users.noreply.github.com>
Date: Tue, 13 Oct 2026 16:16:02 -0700
Subject: [PATCH 05/13] regen and fix tests (#50783)

---
 .../customizations/beta-annotations.csv       |   4 +-
 .../src/main/java/AgentsCustomizations.java   |   7 +-
 ...taVoiceAgentsConversationsAsyncClient.java |  40 +-
 .../BetaVoiceAgentsConversationsClient.java   |  40 +-
 .../BetaVoiceAgentsConversationsImpl.java     | 120 ++---
 .../agents/models/HostedAgentDefinition.java  |  38 ++
 .../ai/agents/models/VoiceAgentMcpTool.java   |  22 +-
 .../models/VoiceAgentRealtimeResponse.java    |  90 ++--
 .../VoiceAgentRealtimeResponseBase.java       | 448 ------------------
 .../VoiceAgentResponseCreateOptions.java      |  18 +-
 .../azure/ai/agents/models/VoiceResponse.java | 145 +++---
 .../ai/agents/models/VoiceResponseBase.java   | 335 -------------
 ...ject.java => VoiceResponseObjectType.java} |  18 +-
 .../META-INF/azure-ai-agents_metadata.json    |   2 +-
 ...RealtimeOpenAIDedupSerializationTests.java |  17 +-
 ...andaloneOpenAIDedupSerializationTests.java |   4 +-
 .../ReasoningDedupSerializationTests.java     |  15 +-
 ...ealtimeResponseBaseSerializationTests.java |  42 --
 ...entRealtimeResponseSerializationTests.java |  22 +-
 .../VoiceResponseBaseSerializationTests.java  |  40 --
 .../VoiceResponseSerializationTests.java      |  28 +-
 sdk/ai/azure-ai-agents/tsp-location.yaml      |   2 +-
 .../META-INF/azure-ai-projects_metadata.json  |   2 +-
 sdk/ai/azure-ai-projects/tsp-location.yaml    |   2 +-
 24 files changed, 385 insertions(+), 1116 deletions(-)
 delete mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseBase.java
 delete mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseBase.java
 rename sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/{VoiceResponseBaseObject.java => VoiceResponseObjectType.java} (64%)
 delete mode 100644 sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseBaseSerializationTests.java
 delete mode 100644 sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceResponseBaseSerializationTests.java

diff --git a/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv b/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv
index 4966294530ac..c63740fddedc 100644
--- a/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv
+++ b/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv
@@ -278,7 +278,6 @@ class;com.azure.ai.agents.models.VoiceAgentMcpTool;Preview API. VoiceAgents=V1Pr
 class;com.azure.ai.agents.models.VoiceAgentNoiseReduction;Preview API. VoiceAgents=V1Preview;
 class;com.azure.ai.agents.models.VoiceAgentNoiseReductionType;Preview API. VoiceAgents=V1Preview;
 class;com.azure.ai.agents.models.VoiceAgentRealtimeResponse;Preview API. VoiceAgents=V1Preview;
-class;com.azure.ai.agents.models.VoiceAgentRealtimeResponseBase;Preview API. VoiceAgents=V1Preview;
 class;com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDeltaEvent;Preview API. VoiceAgents=V1Preview;
 class;com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDoneEvent;Preview API. VoiceAgents=V1Preview;
 class;com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDeltaEvent;Preview API. VoiceAgents=V1Preview;
@@ -344,8 +343,7 @@ class;com.azure.ai.agents.models.VoiceRecordingChannelLayout;Preview API. VoiceA
 class;com.azure.ai.agents.models.VoiceResponse;Preview API. VoiceAgents=V1Preview;
 class;com.azure.ai.agents.models.VoiceResponseAudio;Preview API. VoiceAgents=V1Preview;
 class;com.azure.ai.agents.models.VoiceResponseAudioOutput;Preview API. VoiceAgents=V1Preview;
-class;com.azure.ai.agents.models.VoiceResponseBase;Preview API. VoiceAgents=V1Preview;
-class;com.azure.ai.agents.models.VoiceResponseBaseObject;Preview API.;
+class;com.azure.ai.agents.models.VoiceResponseObjectType;Preview API.;
 class;com.azure.ai.agents.models.VoiceType;Preview API. VoiceAgents=V1Preview;
 class;com.azure.ai.agents.models.WebIqPreviewTool;Preview API. preview_tool;
 class;com.azure.ai.agents.models.WebIqPreviewToolboxTool;Preview API. preview_tool;
diff --git a/sdk/ai/azure-ai-agents/customizations/src/main/java/AgentsCustomizations.java b/sdk/ai/azure-ai-agents/customizations/src/main/java/AgentsCustomizations.java
index 5d747be11b42..f41debcc3647 100644
--- a/sdk/ai/azure-ai-agents/customizations/src/main/java/AgentsCustomizations.java
+++ b/sdk/ai/azure-ai-agents/customizations/src/main/java/AgentsCustomizations.java
@@ -228,8 +228,7 @@ private void applyUnionTypeWrappers(LibraryCustomization customization, Logger l
         customizeUnionProperty(customization, "VoiceAgentSessionResponseConfiguration", "toolChoice",
             "Tool-selection behavior for the session.", toolChoice, false, false, logger);
 
-        // The response base models are immutable outputs. Their typed getters read through the overridable raw accessor
-        // so the generated subclasses that shadow the field share the same typed API.
+        // Retain base-model wrappers for older snapshots and expose them directly on the flattened response models.
         customizeUnionProperty(customization, "VoiceAgentRealtimeResponseBase", "maxOutputTokens",
             "Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used"
                 + " in this response.",
@@ -237,7 +236,7 @@ private void applyUnionTypeWrappers(LibraryCustomization customization, Logger l
         customizeUnionProperty(customization, "VoiceAgentRealtimeResponse", "maxOutputTokens",
             "Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used"
                 + " in this response.",
-            new ArrayList<>(), false, false, logger);
+            longMaxOutputTokens, false, false, logger);
         customizeUnionProperty(customization, "VoiceResponseBase", "maxOutputTokens",
             "Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used"
                 + " in this response.",
@@ -245,7 +244,7 @@ private void applyUnionTypeWrappers(LibraryCustomization customization, Logger l
         customizeUnionProperty(customization, "VoiceResponse", "maxOutputTokens",
             "Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used"
                 + " in this response.",
-            new ArrayList<>(), false, false, logger);
+            longMaxOutputTokens, false, false, logger);
         customizeUnionProperty(customization, "WebIqPreviewTool", "requireApproval",
             "Whether the agent requires approval before executing actions. When omitted, the service defaults to"
                 + " \"always\".",
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java
index a228b9e68984..66da64cc3398 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java
@@ -287,6 +287,7 @@ public Mono> deleteAgentConversationWithResponse(String agentName
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -298,6 +299,14 @@ public Mono> deleteAgentConversationWithResponse(String agentName
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -318,18 +327,12 @@ public Mono> deleteAgentConversationWithResponse(String agentName
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -340,9 +343,6 @@ public Mono> deleteAgentConversationWithResponse(String agentName
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
@@ -376,6 +376,7 @@ public PagedFlux listAgentConversationResponses(String agentName, St
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -387,6 +388,14 @@ public PagedFlux listAgentConversationResponses(String agentName, St
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -407,18 +416,12 @@ public PagedFlux listAgentConversationResponses(String agentName, St
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -429,9 +432,6 @@ public PagedFlux listAgentConversationResponses(String agentName, St
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java
index a493a8498035..d33bf0b84b27 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java
@@ -281,6 +281,7 @@ public Response deleteAgentConversationWithResponse(String agentName, Stri
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -292,6 +293,14 @@ public Response deleteAgentConversationWithResponse(String agentName, Stri
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -312,18 +321,12 @@ public Response deleteAgentConversationWithResponse(String agentName, Stri
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -334,9 +337,6 @@ public Response deleteAgentConversationWithResponse(String agentName, Stri
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
@@ -370,6 +370,7 @@ public PagedIterable listAgentConversationResponses(String agentName
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -381,6 +382,14 @@ public PagedIterable listAgentConversationResponses(String agentName
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -401,18 +410,12 @@ public PagedIterable listAgentConversationResponses(String agentName
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -423,9 +426,6 @@ public PagedIterable listAgentConversationResponses(String agentName
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java
index 81566299913c..bed713076b76 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java
@@ -1031,6 +1031,7 @@ public Response deleteAgentConversationWithResponse(String agentName, Stri
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -1042,6 +1043,14 @@ public Response deleteAgentConversationWithResponse(String agentName, Stri
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -1062,18 +1071,12 @@ public Response deleteAgentConversationWithResponse(String agentName, Stri
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -1084,9 +1087,6 @@ public Response deleteAgentConversationWithResponse(String agentName, Stri
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
@@ -1146,6 +1146,7 @@ private Mono> listAgentConversationResponsesSinglePage
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -1157,6 +1158,14 @@ private Mono> listAgentConversationResponsesSinglePage
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -1177,18 +1186,12 @@ private Mono> listAgentConversationResponsesSinglePage
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -1199,9 +1202,6 @@ private Mono> listAgentConversationResponsesSinglePage
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
@@ -1256,6 +1256,7 @@ public PagedFlux listAgentConversationResponsesAsync(String agentNam
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -1267,6 +1268,14 @@ public PagedFlux listAgentConversationResponsesAsync(String agentNam
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -1287,18 +1296,12 @@ public PagedFlux listAgentConversationResponsesAsync(String agentNam
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -1309,9 +1312,6 @@ public PagedFlux listAgentConversationResponsesAsync(String agentNam
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
@@ -1369,6 +1369,7 @@ private PagedResponse listAgentConversationResponsesSinglePage(Strin
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -1380,6 +1381,14 @@ private PagedResponse listAgentConversationResponsesSinglePage(Strin
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -1400,18 +1409,12 @@ private PagedResponse listAgentConversationResponsesSinglePage(Strin
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -1422,9 +1425,6 @@ private PagedResponse listAgentConversationResponsesSinglePage(Strin
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
@@ -1458,6 +1458,7 @@ public PagedIterable listAgentConversationResponses(String agentName
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -1469,6 +1470,14 @@ public PagedIterable listAgentConversationResponses(String agentName
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -1489,18 +1498,12 @@ public PagedIterable listAgentConversationResponses(String agentName
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -1511,9 +1514,6 @@ public PagedIterable listAgentConversationResponses(String agentName
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
@@ -1553,6 +1553,7 @@ public Mono> getAgentConversationResponseWithResponseAsync(
      * 
      * {@code
      * {
+     *     id: String (Optional)
      *     object: String(realtime.response) (Optional)
      *     status (Optional): {
      *     }
@@ -1564,6 +1565,14 @@ public Mono> getAgentConversationResponseWithResponseAsync(
      *             code: String (Optional)
      *         }
      *     }
+     *     output (Optional): [
+     *          (Optional){
+     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
+     *         }
+     *     ]
+     *     metadata (Optional): {
+     *         String: String (Required)
+     *     }
      *     usage (Optional): {
      *         total_tokens: Long (Optional)
      *         input_tokens: Long (Optional)
@@ -1584,18 +1593,12 @@ public Mono> getAgentConversationResponseWithResponseAsync(
      *             audio_tokens: Long (Optional)
      *         }
      *     }
+     *     conversation_id: String (Optional)
      *     output_modalities (Optional): [
      *          (Optional){
      *         }
      *     ]
      *     max_output_tokens: BinaryData (Optional)
-     *     id: String (Required)
-     *     output (Optional): [
-     *          (Optional){
-     *             type: String(function_call/function_call_output/mcp_approval_response/mcp_list_tools/mcp_call/mcp_approval_request/message) (Required)
-     *         }
-     *     ]
-     *     conversation_id: String (Required)
      *     audio (Optional): {
      *         output (Optional): {
      *             voice: String (Optional)
@@ -1606,9 +1609,6 @@ public Mono> getAgentConversationResponseWithResponseAsync(
      *             }
      *         }
      *     }
-     *     metadata (Optional): {
-     *         String: String (Required)
-     *     }
      *     temperature: Double (Optional)
      *     created_at: Long (Optional)
      *     completed_at: Long (Optional)
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java
index bd8467c1ba4a..0eda15791f90 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java
@@ -124,6 +124,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
         jsonWriter.writeJsonField("code_configuration", this.codeConfiguration);
         jsonWriter.writeJsonField("telemetry_config", this.telemetryConfig);
         jsonWriter.writeJsonField("session_configuration", this.sessionConfiguration);
+        jsonWriter.writeBooleanField("enable_memory_snapshot", this.enableMemorySnapshot);
         return jsonWriter.writeEndObject();
     }
 
@@ -149,6 +150,7 @@ public static HostedAgentDefinition fromJson(JsonReader jsonReader) throws IOExc
             CodeConfiguration codeConfiguration = null;
             TelemetryConfig telemetryConfig = null;
             SessionConfiguration sessionConfiguration = null;
+            Boolean enableMemorySnapshot = null;
             while (reader.nextToken() != JsonToken.END_OBJECT) {
                 String fieldName = reader.getFieldName();
                 reader.nextToken();
@@ -172,6 +174,8 @@ public static HostedAgentDefinition fromJson(JsonReader jsonReader) throws IOExc
                     telemetryConfig = TelemetryConfig.fromJson(reader);
                 } else if ("session_configuration".equals(fieldName)) {
                     sessionConfiguration = SessionConfiguration.fromJson(reader);
+                } else if ("enable_memory_snapshot".equals(fieldName)) {
+                    enableMemorySnapshot = reader.getNullable(JsonReader::getBoolean);
                 } else {
                     reader.skipChildren();
                 }
@@ -185,6 +189,7 @@ public static HostedAgentDefinition fromJson(JsonReader jsonReader) throws IOExc
             deserializedHostedAgentDefinition.codeConfiguration = codeConfiguration;
             deserializedHostedAgentDefinition.telemetryConfig = telemetryConfig;
             deserializedHostedAgentDefinition.sessionConfiguration = sessionConfiguration;
+            deserializedHostedAgentDefinition.enableMemorySnapshot = enableMemorySnapshot;
             return deserializedHostedAgentDefinition;
         });
     }
@@ -350,4 +355,37 @@ public HostedAgentDefinition setSessionConfiguration(SessionConfiguration sessio
         this.sessionConfiguration = sessionConfiguration;
         return this;
     }
+
+    /*
+     * Whether this agent version uses memory snapshots. Sessions for a snapshot-enabled version start from a snapshot
+     * of the agent's initialized process rather than starting the process from its image. Defaults to false.
+     */
+    @Generated
+    private Boolean enableMemorySnapshot;
+
+    /**
+     * Get the enableMemorySnapshot property: Whether this agent version uses memory snapshots. Sessions for a
+     * snapshot-enabled version start from a snapshot of the agent's initialized process rather than starting the
+     * process from its image. Defaults to false.
+     *
+     * @return the enableMemorySnapshot value.
+     */
+    @Generated
+    public Boolean isEnableMemorySnapshot() {
+        return this.enableMemorySnapshot;
+    }
+
+    /**
+     * Set the enableMemorySnapshot property: Whether this agent version uses memory snapshots. Sessions for a
+     * snapshot-enabled version start from a snapshot of the agent's initialized process rather than starting the
+     * process from its image. Defaults to false.
+     *
+     * @param enableMemorySnapshot the enableMemorySnapshot value to set.
+     * @return the HostedAgentDefinition object itself.
+     */
+    @Generated
+    public HostedAgentDefinition setEnableMemorySnapshot(Boolean enableMemorySnapshot) {
+        this.enableMemorySnapshot = enableMemorySnapshot;
+        return this;
+    }
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java
index fd67fb9ad735..d1bdce48b860 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java
@@ -16,7 +16,8 @@
 import java.util.Map;
 
 /**
- * An MCP tool available to a voice agent.
+ * An MCP tool available to a voice agent. Server endpoints use `server_url`; connector and tunnel identifiers are not
+ * supported.
  */
 @Fluent
 @Beta(warningText = "Preview API. VoiceAgents=V1Preview")
@@ -92,7 +93,8 @@ public final class VoiceAgentMcpTool extends VoiceAgentTool {
     private Map toolConfigs;
 
     /*
-     * The URL for the MCP server.
+     * The URL for the MCP server. One of `server_url`, `connector_id`, or
+     * `tunnel_id` must be provided.
      */
     @Generated
     private String serverUrl;
@@ -339,7 +341,8 @@ public VoiceAgentMcpTool setToolConfigs(Map toolConfigs) {
     }
 
     /**
-     * Get the serverUrl property: The URL for the MCP server.
+     * Get the serverUrl property: The URL for the MCP server. One of `server_url`, `connector_id`, or
+     * `tunnel_id` must be provided.
      *
      * @return the serverUrl value.
      */
@@ -349,7 +352,8 @@ public String getServerUrl() {
     }
 
     /**
-     * Set the serverUrl property: The URL for the MCP server.
+     * Set the serverUrl property: The URL for the MCP server. One of `server_url`, `connector_id`, or
+     * `tunnel_id` must be provided.
      *
      * @param serverUrl the serverUrl value to set.
      * @return the VoiceAgentMcpTool object itself.
@@ -393,6 +397,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
         jsonWriter.writeStartObject();
         jsonWriter.writeStringField("server_label", this.serverLabel);
         jsonWriter.writeStringField("type", this.type);
+        jsonWriter.writeStringField("server_url", this.serverUrl);
         jsonWriter.writeStringField("authorization", this.authorization);
         jsonWriter.writeStringField("server_description", this.serverDescription);
         jsonWriter.writeMapField("headers", this.headers, (writer, element) -> writer.writeString(element));
@@ -409,7 +414,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
         jsonWriter.writeBooleanField("defer_loading", this.deferLoading);
         jsonWriter.writeStringField("project_connection_id", this.projectConnectionId);
         jsonWriter.writeMapField("tool_configs", this.toolConfigs, (writer, element) -> writer.writeJson(element));
-        jsonWriter.writeStringField("server_url", this.serverUrl);
         jsonWriter.writeStringField("response_scheduling",
             this.responseScheduling == null ? null : this.responseScheduling.toString());
         return jsonWriter.writeEndObject();
@@ -429,6 +433,7 @@ public static VoiceAgentMcpTool fromJson(JsonReader jsonReader) throws IOExcepti
         return jsonReader.readObject(reader -> {
             String serverLabel = null;
             String type = "mcp";
+            String serverUrl = null;
             String authorization = null;
             String serverDescription = null;
             Map headers = null;
@@ -438,7 +443,6 @@ public static VoiceAgentMcpTool fromJson(JsonReader jsonReader) throws IOExcepti
             Boolean deferLoading = null;
             String projectConnectionId = null;
             Map toolConfigs = null;
-            String serverUrl = null;
             VoiceAgentToolResponseScheduling responseScheduling = null;
             while (reader.nextToken() != JsonToken.END_OBJECT) {
                 String fieldName = reader.getFieldName();
@@ -447,6 +451,8 @@ public static VoiceAgentMcpTool fromJson(JsonReader jsonReader) throws IOExcepti
                     serverLabel = reader.getString();
                 } else if ("type".equals(fieldName)) {
                     type = reader.getString();
+                } else if ("server_url".equals(fieldName)) {
+                    serverUrl = reader.getString();
                 } else if ("authorization".equals(fieldName)) {
                     authorization = reader.getString();
                 } else if ("server_description".equals(fieldName)) {
@@ -468,8 +474,6 @@ public static VoiceAgentMcpTool fromJson(JsonReader jsonReader) throws IOExcepti
                     projectConnectionId = reader.getString();
                 } else if ("tool_configs".equals(fieldName)) {
                     toolConfigs = reader.readMap(reader1 -> ToolConfig.fromJson(reader1));
-                } else if ("server_url".equals(fieldName)) {
-                    serverUrl = reader.getString();
                 } else if ("response_scheduling".equals(fieldName)) {
                     responseScheduling = VoiceAgentToolResponseScheduling.fromString(reader.getString());
                 } else {
@@ -478,6 +482,7 @@ public static VoiceAgentMcpTool fromJson(JsonReader jsonReader) throws IOExcepti
             }
             VoiceAgentMcpTool deserializedVoiceAgentMcpTool = new VoiceAgentMcpTool(serverLabel);
             deserializedVoiceAgentMcpTool.type = type;
+            deserializedVoiceAgentMcpTool.serverUrl = serverUrl;
             deserializedVoiceAgentMcpTool.authorization = authorization;
             deserializedVoiceAgentMcpTool.serverDescription = serverDescription;
             deserializedVoiceAgentMcpTool.headers = headers;
@@ -487,7 +492,6 @@ public static VoiceAgentMcpTool fromJson(JsonReader jsonReader) throws IOExcepti
             deserializedVoiceAgentMcpTool.deferLoading = deferLoading;
             deserializedVoiceAgentMcpTool.projectConnectionId = projectConnectionId;
             deserializedVoiceAgentMcpTool.toolConfigs = toolConfigs;
-            deserializedVoiceAgentMcpTool.serverUrl = serverUrl;
             deserializedVoiceAgentMcpTool.responseScheduling = responseScheduling;
             return deserializedVoiceAgentMcpTool;
         });
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java
index cacc2f40e82b..1ca6dc1ac413 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java
@@ -9,6 +9,7 @@
 import com.azure.core.annotation.Immutable;
 import com.azure.core.util.BinaryData;
 import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
 import com.azure.json.JsonToken;
 import com.azure.json.JsonWriter;
 import com.openai.models.realtime.RealtimeResponse.OutputModality;
@@ -24,7 +25,7 @@
  */
 @Immutable
 @Beta(warningText = "Preview API. VoiceAgents=V1Preview")
-public final class VoiceAgentRealtimeResponse extends VoiceAgentRealtimeResponseBase {
+public final class VoiceAgentRealtimeResponse implements JsonSerializable {
 
     /*
      * The audio configuration used by the live response, including flat voice provider, locale, and format fields under
@@ -34,7 +35,7 @@ public final class VoiceAgentRealtimeResponse extends VoiceAgentRealtimeResponse
     private VoiceResponseAudio audio;
 
     /*
-     * The items produced by the live response.
+     * The list of output items generated by the response.
      */
     @Generated
     private List output;
@@ -93,12 +94,6 @@ public final class VoiceAgentRealtimeResponse extends VoiceAgentRealtimeResponse
     @Generated
     private Status status;
 
-    /*
-     * The object type, must be `realtime.response`.
-     */
-    @Generated
-    private VoiceResponseBaseObject object;
-
     /*
      * The unique ID of the response, will look like `resp_1234`.
      */
@@ -124,7 +119,7 @@ public VoiceResponseAudio getAudio() {
     }
 
     /**
-     * Get the output property: The items produced by the live response.
+     * Get the output property: The list of output items generated by the response.
      *
      * @return the output value.
      */
@@ -139,7 +134,6 @@ public List getOutput() {
      *
      * @return the maxOutputTokens value.
      */
-    @Override
     BinaryData getMaxOutputTokens() {
         // AI Tooling: union type
         return this.maxOutputTokens;
@@ -154,7 +148,6 @@ BinaryData getMaxOutputTokens() {
      * @return the outputModalities value.
      */
     @Generated
-    @Override
     public List getOutputModalities() {
         return this.outputModalities;
     }
@@ -170,7 +163,6 @@ public List getOutputModalities() {
      * @return the conversationId value.
      */
     @Generated
-    @Override
     public String getConversationId() {
         return this.conversationId;
     }
@@ -184,7 +176,6 @@ public String getConversationId() {
      * @return the usage value.
      */
     @Generated
-    @Override
     public RealtimeResponseUsage getUsage() {
         return this.usage;
     }
@@ -195,7 +186,6 @@ public RealtimeResponseUsage getUsage() {
      * @return the metadata value.
      */
     @Generated
-    @Override
     public Map getMetadata() {
         return this.metadata;
     }
@@ -206,7 +196,6 @@ public Map getMetadata() {
      * @return the statusDetails value.
      */
     @Generated
-    @Override
     public RealtimeResponseStatus getStatusDetails() {
         return this.statusDetails;
     }
@@ -218,29 +207,16 @@ public RealtimeResponseStatus getStatusDetails() {
      * @return the status value.
      */
     @Generated
-    @Override
     public Status getStatus() {
         return this.status;
     }
 
-    /**
-     * Get the object property: The object type, must be `realtime.response`.
-     *
-     * @return the object value.
-     */
-    @Generated
-    @Override
-    public VoiceResponseBaseObject getObject() {
-        return this.object;
-    }
-
     /**
      * Get the id property: The unique ID of the response, will look like `resp_1234`.
      *
      * @return the id value.
      */
     @Generated
-    @Override
     public String getId() {
         return this.id;
     }
@@ -252,7 +228,7 @@ public String getId() {
     public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
         jsonWriter.writeStartObject();
         jsonWriter.writeStringField("id", getId());
-        jsonWriter.writeStringField("object", getObject() == null ? null : getObject().toString());
+        jsonWriter.writeStringField("object", getObjectType() == null ? null : getObjectType().toString());
         jsonWriter.writeStringField("status", getStatus() == null ? null : getStatus().asString());
         // AI Tooling: openai-java de-dup
         if (getStatusDetails() != null) {
@@ -294,8 +270,8 @@ public static VoiceAgentRealtimeResponse fromJson(JsonReader jsonReader) throws
                 if ("id".equals(fieldName)) {
                     deserializedVoiceAgentRealtimeResponse.id = reader.getString();
                 } else if ("object".equals(fieldName)) {
-                    deserializedVoiceAgentRealtimeResponse.object
-                        = VoiceResponseBaseObject.fromString(reader.getString());
+                    deserializedVoiceAgentRealtimeResponse.objectType
+                        = VoiceResponseObjectType.fromString(reader.getString());
                 } else if ("status".equals(fieldName)) {
                     deserializedVoiceAgentRealtimeResponse.status = reader.getNullable(r -> Status.of(r.getString()));
                 } else if ("status_details".equals(fieldName)) {
@@ -334,4 +310,56 @@ public static VoiceAgentRealtimeResponse fromJson(JsonReader jsonReader) throws
             return deserializedVoiceAgentRealtimeResponse;
         });
     }
+
+    /*
+     * The object type, must be `realtime.response`.
+     */
+    @Generated
+    private VoiceResponseObjectType objectType;
+
+    /**
+     * Get the objectType property: The object type, must be `realtime.response`.
+     *
+     * @return the objectType value.
+     */
+    @Generated
+    public VoiceResponseObjectType getObjectType() {
+        return this.objectType;
+    }
+
+    /**
+     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response, inclusive of
+     * tool calls, that was used in this response.
+     *
+     * @return the maxOutputTokens value as a Long, or {@code null} when it is not set or holds another variant.
+     */
+    public Long getMaxOutputTokensAsLong() {
+        // AI Tooling: union type
+        if (this.maxOutputTokens == null) {
+            return null;
+        }
+        String json = this.maxOutputTokens.toString().trim();
+        if (!(!json.isEmpty() && (Character.isDigit(json.charAt(0)) || json.charAt(0) == '-'))) {
+            return null;
+        }
+        return this.maxOutputTokens.toObject(Long.class);
+    }
+
+    /**
+     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response, inclusive of
+     * tool calls, that was used in this response.
+     *
+     * @return the maxOutputTokens value as a String, or {@code null} when it is not set or holds another variant.
+     */
+    public String getMaxOutputTokensAsString() {
+        // AI Tooling: union type
+        if (this.maxOutputTokens == null) {
+            return null;
+        }
+        String json = this.maxOutputTokens.toString().trim();
+        if (!(json.startsWith("\""))) {
+            return null;
+        }
+        return this.maxOutputTokens.toObject(String.class);
+    }
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseBase.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseBase.java
deleted file mode 100644
index b72a564ac9cb..000000000000
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseBase.java
+++ /dev/null
@@ -1,448 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.ai.agents.models;
-
-import com.azure.ai.agents.implementation.OpenAIJsonHelper;
-import com.azure.ai.agents.implementation.utils.Beta;
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.core.util.BinaryData;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import com.openai.models.realtime.RealtimeResponse.OutputModality;
-import com.openai.models.realtime.RealtimeResponse.Status;
-import com.openai.models.realtime.RealtimeResponseStatus;
-import com.openai.models.realtime.RealtimeResponseUsage;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Properties shared by realtime responses returned by the voice-agent service.
- */
-@Immutable
-@Beta(warningText = "Preview API. VoiceAgents=V1Preview")
-public class VoiceAgentRealtimeResponseBase implements JsonSerializable {
-
-    /*
-     * The unique ID of the response, will look like `resp_1234`.
-     */
-    @Generated
-    private String id;
-
-    /*
-     * The object type, must be `realtime.response`.
-     */
-    @Generated
-    private VoiceResponseBaseObject object;
-
-    /*
-     * The final status of the response (`completed`, `cancelled`, `failed`, or
-     * `incomplete`, `in_progress`).
-     */
-    @Generated
-    private Status status;
-
-    /*
-     * Additional details about the status.
-     */
-    @Generated
-    private RealtimeResponseStatus statusDetails;
-
-    /*
-     * The metadata property.
-     */
-    @Generated
-    private Map metadata;
-
-    /*
-     * Usage statistics for the Response, this will correspond to billing. A
-     * Realtime API session will maintain a conversation context and append new
-     * Items to the Conversation, thus output from previous turns (text and
-     * audio tokens) will become the input for later turns.
-     */
-    @Generated
-    private RealtimeResponseUsage usage;
-
-    /*
-     * Which conversation the response is added to, determined by the `conversation`
-     * field in the `response.create` event. If `auto`, the response will be added to
-     * the default conversation and the value of `conversation_id` will be an id like
-     * `conv_1234`. If `none`, the response will not be added to any conversation and
-     * the value of `conversation_id` will be `null`. If responses are being triggered
-     * automatically by VAD the response will be added to the default conversation
-     */
-    @Generated
-    private String conversationId;
-
-    /*
-     * The set of modalities the model used to respond, currently the only possible values are
-     * `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
-     * output to mode `text` will disable audio output from the model.
-     */
-    @Generated
-    private List outputModalities;
-
-    /*
-     * Maximum number of output tokens for a single assistant response,
-     * inclusive of tool calls, that was used in this response.
-     */
-    @Generated
-    private BinaryData maxOutputTokens;
-
-    /**
-     * Creates an instance of VoiceAgentRealtimeResponseBase class.
-     */
-    @Generated
-    protected VoiceAgentRealtimeResponseBase() {
-    }
-
-    /**
-     * Get the id property: The unique ID of the response, will look like `resp_1234`.
-     *
-     * @return the id value.
-     */
-    @Generated
-    public String getId() {
-        return this.id;
-    }
-
-    /**
-     * Set the id property: The unique ID of the response, will look like `resp_1234`.
-     *
-     * @param id the id value to set.
-     * @return the VoiceAgentRealtimeResponseBase object itself.
-     */
-    @Generated
-    VoiceAgentRealtimeResponseBase setId(String id) {
-        this.id = id;
-        return this;
-    }
-
-    /**
-     * Get the object property: The object type, must be `realtime.response`.
-     *
-     * @return the object value.
-     */
-    @Generated
-    public VoiceResponseBaseObject getObject() {
-        return this.object;
-    }
-
-    /**
-     * Get the status property: The final status of the response (`completed`, `cancelled`, `failed`, or
-     * `incomplete`, `in_progress`).
-     *
-     * @return the status value.
-     */
-    @Generated
-    public Status getStatus() {
-        return this.status;
-    }
-
-    /**
-     * Get the statusDetails property: Additional details about the status.
-     *
-     * @return the statusDetails value.
-     */
-    @Generated
-    public RealtimeResponseStatus getStatusDetails() {
-        return this.statusDetails;
-    }
-
-    /**
-     * Set the statusDetails property: Additional details about the status.
-     *
-     * @param statusDetails the statusDetails value to set.
-     * @return the VoiceAgentRealtimeResponseBase object itself.
-     */
-    @Generated
-    VoiceAgentRealtimeResponseBase setStatusDetails(RealtimeResponseStatus statusDetails) {
-        this.statusDetails = statusDetails;
-        return this;
-    }
-
-    /**
-     * Get the metadata property: The metadata property.
-     *
-     * @return the metadata value.
-     */
-    @Generated
-    public Map getMetadata() {
-        return this.metadata;
-    }
-
-    /**
-     * Set the metadata property: The metadata property.
-     *
-     * @param metadata the metadata value to set.
-     * @return the VoiceAgentRealtimeResponseBase object itself.
-     */
-    @Generated
-    VoiceAgentRealtimeResponseBase setMetadata(Map metadata) {
-        this.metadata = metadata;
-        return this;
-    }
-
-    /**
-     * Get the usage property: Usage statistics for the Response, this will correspond to billing. A
-     * Realtime API session will maintain a conversation context and append new
-     * Items to the Conversation, thus output from previous turns (text and
-     * audio tokens) will become the input for later turns.
-     *
-     * @return the usage value.
-     */
-    @Generated
-    public RealtimeResponseUsage getUsage() {
-        return this.usage;
-    }
-
-    /**
-     * Set the usage property: Usage statistics for the Response, this will correspond to billing. A
-     * Realtime API session will maintain a conversation context and append new
-     * Items to the Conversation, thus output from previous turns (text and
-     * audio tokens) will become the input for later turns.
-     *
-     * @param usage the usage value to set.
-     * @return the VoiceAgentRealtimeResponseBase object itself.
-     */
-    @Generated
-    VoiceAgentRealtimeResponseBase setUsage(RealtimeResponseUsage usage) {
-        this.usage = usage;
-        return this;
-    }
-
-    /**
-     * Get the conversationId property: Which conversation the response is added to, determined by the `conversation`
-     * field in the `response.create` event. If `auto`, the response will be added to
-     * the default conversation and the value of `conversation_id` will be an id like
-     * `conv_1234`. If `none`, the response will not be added to any conversation and
-     * the value of `conversation_id` will be `null`. If responses are being triggered
-     * automatically by VAD the response will be added to the default conversation.
-     *
-     * @return the conversationId value.
-     */
-    @Generated
-    public String getConversationId() {
-        return this.conversationId;
-    }
-
-    /**
-     * Set the conversationId property: Which conversation the response is added to, determined by the `conversation`
-     * field in the `response.create` event. If `auto`, the response will be added to
-     * the default conversation and the value of `conversation_id` will be an id like
-     * `conv_1234`. If `none`, the response will not be added to any conversation and
-     * the value of `conversation_id` will be `null`. If responses are being triggered
-     * automatically by VAD the response will be added to the default conversation.
-     *
-     * @param conversationId the conversationId value to set.
-     * @return the VoiceAgentRealtimeResponseBase object itself.
-     */
-    @Generated
-    VoiceAgentRealtimeResponseBase setConversationId(String conversationId) {
-        this.conversationId = conversationId;
-        return this;
-    }
-
-    /**
-     * Get the outputModalities property: The set of modalities the model used to respond, currently the only possible
-     * values are
-     * `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
-     * output to mode `text` will disable audio output from the model.
-     *
-     * @return the outputModalities value.
-     */
-    @Generated
-    public List getOutputModalities() {
-        return this.outputModalities;
-    }
-
-    /**
-     * Set the outputModalities property: The set of modalities the model used to respond, currently the only possible
-     * values are
-     * `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
-     * output to mode `text` will disable audio output from the model.
-     *
-     * @param outputModalities the outputModalities value to set.
-     * @return the VoiceAgentRealtimeResponseBase object itself.
-     */
-    @Generated
-    VoiceAgentRealtimeResponseBase setOutputModalities(List outputModalities) {
-        this.outputModalities = outputModalities;
-        return this;
-    }
-
-    /**
-     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response,
-     * inclusive of tool calls, that was used in this response.
-     *
-     * @return the maxOutputTokens value.
-     */
-    BinaryData getMaxOutputTokens() {
-        // AI Tooling: union type
-        return this.maxOutputTokens;
-    }
-
-    /**
-     * Set the maxOutputTokens property: Maximum number of output tokens for a single assistant response,
-     * inclusive of tool calls, that was used in this response.
-     *
-     * @param maxOutputTokens the maxOutputTokens value to set.
-     * @return the VoiceAgentRealtimeResponseBase object itself.
-     */
-    VoiceAgentRealtimeResponseBase setMaxOutputTokens(BinaryData maxOutputTokens) {
-        // AI Tooling: union type
-        this.maxOutputTokens = maxOutputTokens;
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
-        jsonWriter.writeStartObject();
-        jsonWriter.writeStringField("id", this.id);
-        jsonWriter.writeStringField("object", this.object == null ? null : this.object.toString());
-        jsonWriter.writeStringField("status", this.status == null ? null : this.status.asString());
-        // AI Tooling: openai-java de-dup
-        if (this.statusDetails != null) {
-            jsonWriter.writeFieldName("status_details");
-            OpenAIJsonHelper.toBinaryData(this.statusDetails).writeTo(jsonWriter);
-        }
-        jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element));
-        if (this.usage != null) {
-            jsonWriter.writeFieldName("usage");
-            OpenAIJsonHelper.toBinaryData(this.usage).writeTo(jsonWriter);
-        }
-        jsonWriter.writeStringField("conversation_id", this.conversationId);
-        jsonWriter.writeArrayField("output_modalities", this.outputModalities,
-            (writer, element) -> writer.writeString(element == null ? null : element.toString()));
-        if (this.maxOutputTokens != null) {
-            jsonWriter.writeFieldName("max_output_tokens");
-            this.maxOutputTokens.writeTo(jsonWriter);
-        }
-        return jsonWriter.writeEndObject();
-    }
-
-    /**
-     * Reads an instance of VoiceAgentRealtimeResponseBase from the JsonReader.
-     *
-     * @param jsonReader The JsonReader being read.
-     * @return An instance of VoiceAgentRealtimeResponseBase if the JsonReader was pointing to an instance of it, or
-     * null if it was pointing to JSON null.
-     * @throws IOException If an error occurs while reading the VoiceAgentRealtimeResponseBase.
-     */
-    public static VoiceAgentRealtimeResponseBase fromJson(JsonReader jsonReader) throws IOException {
-        // AI Tooling: openai-java de-dup
-        return jsonReader.readObject(reader -> {
-            VoiceAgentRealtimeResponseBase deserializedVoiceAgentRealtimeResponseBase
-                = new VoiceAgentRealtimeResponseBase();
-            while (reader.nextToken() != JsonToken.END_OBJECT) {
-                String fieldName = reader.getFieldName();
-                reader.nextToken();
-                if ("id".equals(fieldName)) {
-                    deserializedVoiceAgentRealtimeResponseBase.id = reader.getString();
-                } else if ("object".equals(fieldName)) {
-                    deserializedVoiceAgentRealtimeResponseBase.object
-                        = VoiceResponseBaseObject.fromString(reader.getString());
-                } else if ("status".equals(fieldName)) {
-                    deserializedVoiceAgentRealtimeResponseBase.status
-                        = reader.getNullable(r -> Status.of(r.getString()));
-                } else if ("status_details".equals(fieldName)) {
-                    // AI Tooling: openai-java de-dup
-                    BinaryData statusDetailsData
-                        = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()));
-                    deserializedVoiceAgentRealtimeResponseBase.statusDetails
-                        = OpenAIJsonHelper.fromBinaryData(statusDetailsData, RealtimeResponseStatus.class);
-                } else if ("metadata".equals(fieldName)) {
-                    Map metadata = reader.readMap(reader1 -> reader1.getString());
-                    deserializedVoiceAgentRealtimeResponseBase.metadata = metadata;
-                } else if ("usage".equals(fieldName)) {
-                    BinaryData usageData
-                        = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()));
-                    deserializedVoiceAgentRealtimeResponseBase.usage
-                        = OpenAIJsonHelper.fromBinaryData(usageData, RealtimeResponseUsage.class);
-                } else if ("conversation_id".equals(fieldName)) {
-                    deserializedVoiceAgentRealtimeResponseBase.conversationId = reader.getString();
-                } else if ("output_modalities".equals(fieldName)) {
-                    List outputModalities
-                        = reader.readArray(reader1 -> reader1.getNullable(r -> OutputModality.of(r.getString())));
-                    deserializedVoiceAgentRealtimeResponseBase.outputModalities = outputModalities;
-                } else if ("max_output_tokens".equals(fieldName)) {
-                    deserializedVoiceAgentRealtimeResponseBase.maxOutputTokens
-                        = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()));
-                } else {
-                    reader.skipChildren();
-                }
-            }
-            return deserializedVoiceAgentRealtimeResponseBase;
-        });
-    }
-
-    /**
-     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response, inclusive of
-     * tool calls, that was used in this response.
-     *
-     * @return the maxOutputTokens value as a Long, or {@code null} when it is not set or holds another variant.
-     */
-    public final Long getMaxOutputTokensAsLong() {
-        // AI Tooling: union type
-        BinaryData value = getMaxOutputTokens();
-        if (value == null) {
-            return null;
-        }
-        String json = value.toString().trim();
-        if (!(!json.isEmpty() && (Character.isDigit(json.charAt(0)) || json.charAt(0) == '-'))) {
-            return null;
-        }
-        return value.toObject(Long.class);
-    }
-
-    /**
-     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response, inclusive of
-     * tool calls, that was used in this response.
-     *
-     * @return the maxOutputTokens value as a String, or {@code null} when it is not set or holds another variant.
-     */
-    public final String getMaxOutputTokensAsString() {
-        // AI Tooling: union type
-        BinaryData value = getMaxOutputTokens();
-        if (value == null) {
-            return null;
-        }
-        String json = value.toString().trim();
-        if (!(json.startsWith("\""))) {
-            return null;
-        }
-        return value.toObject(String.class);
-    }
-
-    /**
-     * Set the status property: The final status of the response (`completed`, `cancelled`, `failed`, or
-     * `incomplete`, `in_progress`).
-     *
-     * @param status the status value to set.
-     * @return the VoiceAgentRealtimeResponseBase object itself.
-     */
-    @Generated
-    VoiceAgentRealtimeResponseBase setStatus(Status status) {
-        this.status = status;
-        return this;
-    }
-
-    /**
-     * Set the object property: The object type, must be `realtime.response`.
-     *
-     * @param object the object value to set.
-     * @return the VoiceAgentRealtimeResponseBase object itself.
-     */
-    @Generated
-    VoiceAgentRealtimeResponseBase setObject(VoiceResponseBaseObject object) {
-        this.object = object;
-        return this;
-    }
-}
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java
index c30faf835d5b..42c2e67b88a0 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java
@@ -106,7 +106,11 @@ public final class VoiceAgentResponseCreateOptions implements JsonSerializable input;
@@ -391,7 +395,11 @@ public VoiceAgentResponseCreateOptions setAudio(VoiceAgentResponseAudioConfig au
     }
 
     /**
-     * Get the input property: Conversation items used as inline response input.
+     * Get the input property: Input items to include in the prompt for the model. Using this field
+     * creates a new context for this Response instead of using the default
+     * conversation. An empty array `[]` will clear the context for this Response.
+     * Note that this can include references to items that previously appeared in the session
+     * using their id.
      *
      * @return the input value.
      */
@@ -401,7 +409,11 @@ public List getInput() {
     }
 
     /**
-     * Set the input property: Conversation items used as inline response input.
+     * Set the input property: Input items to include in the prompt for the model. Using this field
+     * creates a new context for this Response instead of using the default
+     * conversation. An empty array `[]` will clear the context for this Response.
+     * Note that this can include references to items that previously appeared in the session
+     * using their id.
      *
      * @param input the input value to set.
      * @return the VoiceAgentResponseCreateOptions object itself.
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponse.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponse.java
index 7bcbb1974e6f..7af0690d0fad 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponse.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponse.java
@@ -9,6 +9,7 @@
 import com.azure.core.annotation.Immutable;
 import com.azure.core.util.BinaryData;
 import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
 import com.azure.json.JsonToken;
 import com.azure.json.JsonWriter;
 import com.openai.models.realtime.RealtimeResponse.OutputModality;
@@ -31,28 +32,30 @@
  */
 @Immutable
 @Beta(warningText = "Preview API. VoiceAgents=V1Preview")
-public final class VoiceResponse extends VoiceResponseBase {
+public final class VoiceResponse implements JsonSerializable {
 
     /*
-     * The unique id of the response.
+     * The unique ID of the response, will look like `resp_1234`.
      */
     @Generated
-    private final String id;
+    private String id;
 
     /*
-     * The output items produced by the response. May be omitted in list results; retrieve the full response (GET
-     * .../responses/{response_id}) or use the paged response-items route (GET .../responses/{response_id}/items) for
-     * its output items. Each item's `response_id` also links it back to this response in the conversation-level items
-     * list.
+     * The list of output items generated by the response.
      */
     @Generated
     private List output;
 
     /*
-     * The id of the conversation this response belongs to.
+     * Which conversation the response is added to, determined by the `conversation`
+     * field in the `response.create` event. If `auto`, the response will be added to
+     * the default conversation and the value of `conversation_id` will be an id like
+     * `conv_1234`. If `none`, the response will not be added to any conversation and
+     * the value of `conversation_id` will be `null`. If responses are being triggered
+     * automatically by VAD the response will be added to the default conversation
      */
     @Generated
-    private final String conversationId;
+    private String conversationId;
 
     /*
      * The audio configuration used for the response, including the voice and audio format used for output.
@@ -61,7 +64,7 @@ public final class VoiceResponse extends VoiceResponseBase {
     private VoiceResponseAudio audio;
 
     /*
-     * A set of key-value pairs attached to the response.
+     * The metadata property.
      */
     @Generated
     private Map metadata;
@@ -121,26 +124,8 @@ public final class VoiceResponse extends VoiceResponseBase {
     @Generated
     private Status status;
 
-    /*
-     * The object type, must be `realtime.response`.
-     */
-    @Generated
-    private VoiceResponseBaseObject object;
-
-    /**
-     * Creates an instance of VoiceResponse class.
-     *
-     * @param id the id value to set.
-     * @param conversationId the conversationId value to set.
-     */
-    @Generated
-    private VoiceResponse(String id, String conversationId) {
-        this.id = id;
-        this.conversationId = conversationId;
-    }
-
     /**
-     * Get the id property: The unique id of the response.
+     * Get the id property: The unique ID of the response, will look like `resp_1234`.
      *
      * @return the id value.
      */
@@ -150,10 +135,7 @@ public String getId() {
     }
 
     /**
-     * Get the output property: The output items produced by the response. May be omitted in list results; retrieve the
-     * full response (GET .../responses/{response_id}) or use the paged response-items route (GET
-     * .../responses/{response_id}/items) for its output items. Each item's `response_id` also links it back to this
-     * response in the conversation-level items list.
+     * Get the output property: The list of output items generated by the response.
      *
      * @return the output value.
      */
@@ -163,7 +145,12 @@ public List getOutput() {
     }
 
     /**
-     * Get the conversationId property: The id of the conversation this response belongs to.
+     * Get the conversationId property: Which conversation the response is added to, determined by the `conversation`
+     * field in the `response.create` event. If `auto`, the response will be added to
+     * the default conversation and the value of `conversation_id` will be an id like
+     * `conv_1234`. If `none`, the response will not be added to any conversation and
+     * the value of `conversation_id` will be `null`. If responses are being triggered
+     * automatically by VAD the response will be added to the default conversation.
      *
      * @return the conversationId value.
      */
@@ -184,7 +171,7 @@ public VoiceResponseAudio getAudio() {
     }
 
     /**
-     * Get the metadata property: A set of key-value pairs attached to the response.
+     * Get the metadata property: The metadata property.
      *
      * @return the metadata value.
      */
@@ -235,7 +222,6 @@ public OffsetDateTime getCompletedAt() {
      *
      * @return the maxOutputTokens value.
      */
-    @Override
     BinaryData getMaxOutputTokens() {
         // AI Tooling: union type
         return this.maxOutputTokens;
@@ -250,7 +236,6 @@ BinaryData getMaxOutputTokens() {
      * @return the outputModalities value.
      */
     @Generated
-    @Override
     public List getOutputModalities() {
         return this.outputModalities;
     }
@@ -264,7 +249,6 @@ public List getOutputModalities() {
      * @return the usage value.
      */
     @Generated
-    @Override
     public RealtimeResponseUsage getUsage() {
         return this.usage;
     }
@@ -275,7 +259,6 @@ public RealtimeResponseUsage getUsage() {
      * @return the statusDetails value.
      */
     @Generated
-    @Override
     public RealtimeResponseStatus getStatusDetails() {
         return this.statusDetails;
     }
@@ -287,29 +270,17 @@ public RealtimeResponseStatus getStatusDetails() {
      * @return the status value.
      */
     @Generated
-    @Override
     public Status getStatus() {
         return this.status;
     }
 
-    /**
-     * Get the object property: The object type, must be `realtime.response`.
-     *
-     * @return the object value.
-     */
-    @Generated
-    @Override
-    public VoiceResponseBaseObject getObject() {
-        return this.object;
-    }
-
     /**
      * {@inheritDoc}
      */
     @Override
     public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
         jsonWriter.writeStartObject();
-        jsonWriter.writeStringField("object", getObject() == null ? null : getObject().toString());
+        jsonWriter.writeStringField("object", getObjectType() == null ? null : getObjectType().toString());
         jsonWriter.writeStringField("status", getStatus() == null ? null : getStatus().asString());
         // AI Tooling: openai-java de-dup
         if (getStatusDetails() != null) {
@@ -343,13 +314,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
      * @param jsonReader The JsonReader being read.
      * @return An instance of VoiceResponse if the JsonReader was pointing to an instance of it, or null if it was
      * pointing to JSON null.
-     * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
      * @throws IOException If an error occurs while reading the VoiceResponse.
      */
     public static VoiceResponse fromJson(JsonReader jsonReader) throws IOException {
         // AI Tooling: openai-java de-dup
         return jsonReader.readObject(reader -> {
-            VoiceResponseBaseObject object = null;
+            VoiceResponseObjectType objectType = null;
             Status status = null;
             RealtimeResponseStatus statusDetails = null;
             RealtimeResponseUsage usage = null;
@@ -367,7 +337,7 @@ public static VoiceResponse fromJson(JsonReader jsonReader) throws IOException {
                 String fieldName = reader.getFieldName();
                 reader.nextToken();
                 if ("object".equals(fieldName)) {
-                    object = VoiceResponseBaseObject.fromString(reader.getString());
+                    objectType = VoiceResponseObjectType.fromString(reader.getString());
                 } else if ("status".equals(fieldName)) {
                     status = reader.getNullable(r -> Status.of(r.getString()));
                 } else if ("status_details".equals(fieldName)) {
@@ -405,8 +375,10 @@ public static VoiceResponse fromJson(JsonReader jsonReader) throws IOException {
                     reader.skipChildren();
                 }
             }
-            VoiceResponse deserializedVoiceResponse = new VoiceResponse(id, conversationId);
-            deserializedVoiceResponse.object = object;
+            VoiceResponse deserializedVoiceResponse = new VoiceResponse();
+            deserializedVoiceResponse.id = id;
+            deserializedVoiceResponse.conversationId = conversationId;
+            deserializedVoiceResponse.objectType = objectType;
             deserializedVoiceResponse.status = status;
             deserializedVoiceResponse.statusDetails = statusDetails;
             deserializedVoiceResponse.usage = usage;
@@ -421,4 +393,63 @@ public static VoiceResponse fromJson(JsonReader jsonReader) throws IOException {
             return deserializedVoiceResponse;
         });
     }
+
+    /**
+     * Creates an instance of VoiceResponse class.
+     */
+    @Generated
+    private VoiceResponse() {
+    }
+
+    /*
+     * The object type, must be `realtime.response`.
+     */
+    @Generated
+    private VoiceResponseObjectType objectType;
+
+    /**
+     * Get the objectType property: The object type, must be `realtime.response`.
+     *
+     * @return the objectType value.
+     */
+    @Generated
+    public VoiceResponseObjectType getObjectType() {
+        return this.objectType;
+    }
+
+    /**
+     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response, inclusive of
+     * tool calls, that was used in this response.
+     *
+     * @return the maxOutputTokens value as a Long, or {@code null} when it is not set or holds another variant.
+     */
+    public Long getMaxOutputTokensAsLong() {
+        // AI Tooling: union type
+        if (this.maxOutputTokens == null) {
+            return null;
+        }
+        String json = this.maxOutputTokens.toString().trim();
+        if (!(!json.isEmpty() && (Character.isDigit(json.charAt(0)) || json.charAt(0) == '-'))) {
+            return null;
+        }
+        return this.maxOutputTokens.toObject(Long.class);
+    }
+
+    /**
+     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response, inclusive of
+     * tool calls, that was used in this response.
+     *
+     * @return the maxOutputTokens value as a String, or {@code null} when it is not set or holds another variant.
+     */
+    public String getMaxOutputTokensAsString() {
+        // AI Tooling: union type
+        if (this.maxOutputTokens == null) {
+            return null;
+        }
+        String json = this.maxOutputTokens.toString().trim();
+        if (!(json.startsWith("\""))) {
+            return null;
+        }
+        return this.maxOutputTokens.toObject(String.class);
+    }
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseBase.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseBase.java
deleted file mode 100644
index 6814a702b14c..000000000000
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseBase.java
+++ /dev/null
@@ -1,335 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.ai.agents.models;
-
-import com.azure.ai.agents.implementation.OpenAIJsonHelper;
-import com.azure.ai.agents.implementation.utils.Beta;
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.core.util.BinaryData;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import com.openai.models.realtime.RealtimeResponse.OutputModality;
-import com.openai.models.realtime.RealtimeResponse.Status;
-import com.openai.models.realtime.RealtimeResponseStatus;
-import com.openai.models.realtime.RealtimeResponseUsage;
-import java.io.IOException;
-import java.util.List;
-
-/**
- * Properties shared by persisted voice responses.
- */
-@Immutable
-@Beta(warningText = "Preview API. VoiceAgents=V1Preview")
-public class VoiceResponseBase implements JsonSerializable {
-
-    /*
-     * The object type, must be `realtime.response`.
-     */
-    @Generated
-    private VoiceResponseBaseObject object;
-
-    /*
-     * The final status of the response (`completed`, `cancelled`, `failed`, or
-     * `incomplete`, `in_progress`).
-     */
-    @Generated
-    private Status status;
-
-    /*
-     * Additional details about the status.
-     */
-    @Generated
-    private RealtimeResponseStatus statusDetails;
-
-    /*
-     * Usage statistics for the Response, this will correspond to billing. A
-     * Realtime API session will maintain a conversation context and append new
-     * Items to the Conversation, thus output from previous turns (text and
-     * audio tokens) will become the input for later turns.
-     */
-    @Generated
-    private RealtimeResponseUsage usage;
-
-    /*
-     * The set of modalities the model used to respond, currently the only possible values are
-     * `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
-     * output to mode `text` will disable audio output from the model.
-     */
-    @Generated
-    private List outputModalities;
-
-    /*
-     * Maximum number of output tokens for a single assistant response,
-     * inclusive of tool calls, that was used in this response.
-     */
-    @Generated
-    private BinaryData maxOutputTokens;
-
-    /**
-     * Creates an instance of VoiceResponseBase class.
-     */
-    @Generated
-    protected VoiceResponseBase() {
-    }
-
-    /**
-     * Get the object property: The object type, must be `realtime.response`.
-     *
-     * @return the object value.
-     */
-    @Generated
-    public VoiceResponseBaseObject getObject() {
-        return this.object;
-    }
-
-    /**
-     * Get the status property: The final status of the response (`completed`, `cancelled`, `failed`, or
-     * `incomplete`, `in_progress`).
-     *
-     * @return the status value.
-     */
-    @Generated
-    public Status getStatus() {
-        return this.status;
-    }
-
-    /**
-     * Get the statusDetails property: Additional details about the status.
-     *
-     * @return the statusDetails value.
-     */
-    @Generated
-    public RealtimeResponseStatus getStatusDetails() {
-        return this.statusDetails;
-    }
-
-    /**
-     * Set the statusDetails property: Additional details about the status.
-     *
-     * @param statusDetails the statusDetails value to set.
-     * @return the VoiceResponseBase object itself.
-     */
-    @Generated
-    VoiceResponseBase setStatusDetails(RealtimeResponseStatus statusDetails) {
-        this.statusDetails = statusDetails;
-        return this;
-    }
-
-    /**
-     * Get the usage property: Usage statistics for the Response, this will correspond to billing. A
-     * Realtime API session will maintain a conversation context and append new
-     * Items to the Conversation, thus output from previous turns (text and
-     * audio tokens) will become the input for later turns.
-     *
-     * @return the usage value.
-     */
-    @Generated
-    public RealtimeResponseUsage getUsage() {
-        return this.usage;
-    }
-
-    /**
-     * Set the usage property: Usage statistics for the Response, this will correspond to billing. A
-     * Realtime API session will maintain a conversation context and append new
-     * Items to the Conversation, thus output from previous turns (text and
-     * audio tokens) will become the input for later turns.
-     *
-     * @param usage the usage value to set.
-     * @return the VoiceResponseBase object itself.
-     */
-    @Generated
-    VoiceResponseBase setUsage(RealtimeResponseUsage usage) {
-        this.usage = usage;
-        return this;
-    }
-
-    /**
-     * Get the outputModalities property: The set of modalities the model used to respond, currently the only possible
-     * values are
-     * `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
-     * output to mode `text` will disable audio output from the model.
-     *
-     * @return the outputModalities value.
-     */
-    @Generated
-    public List getOutputModalities() {
-        return this.outputModalities;
-    }
-
-    /**
-     * Set the outputModalities property: The set of modalities the model used to respond, currently the only possible
-     * values are
-     * `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
-     * output to mode `text` will disable audio output from the model.
-     *
-     * @param outputModalities the outputModalities value to set.
-     * @return the VoiceResponseBase object itself.
-     */
-    @Generated
-    VoiceResponseBase setOutputModalities(List outputModalities) {
-        this.outputModalities = outputModalities;
-        return this;
-    }
-
-    /**
-     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response,
-     * inclusive of tool calls, that was used in this response.
-     *
-     * @return the maxOutputTokens value.
-     */
-    BinaryData getMaxOutputTokens() {
-        // AI Tooling: union type
-        return this.maxOutputTokens;
-    }
-
-    /**
-     * Set the maxOutputTokens property: Maximum number of output tokens for a single assistant response,
-     * inclusive of tool calls, that was used in this response.
-     *
-     * @param maxOutputTokens the maxOutputTokens value to set.
-     * @return the VoiceResponseBase object itself.
-     */
-    VoiceResponseBase setMaxOutputTokens(BinaryData maxOutputTokens) {
-        // AI Tooling: union type
-        this.maxOutputTokens = maxOutputTokens;
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
-        jsonWriter.writeStartObject();
-        jsonWriter.writeStringField("object", this.object == null ? null : this.object.toString());
-        jsonWriter.writeStringField("status", this.status == null ? null : this.status.asString());
-        // AI Tooling: openai-java de-dup
-        if (this.statusDetails != null) {
-            jsonWriter.writeFieldName("status_details");
-            OpenAIJsonHelper.toBinaryData(this.statusDetails).writeTo(jsonWriter);
-        }
-        if (this.usage != null) {
-            jsonWriter.writeFieldName("usage");
-            OpenAIJsonHelper.toBinaryData(this.usage).writeTo(jsonWriter);
-        }
-        jsonWriter.writeArrayField("output_modalities", this.outputModalities,
-            (writer, element) -> writer.writeString(element == null ? null : element.toString()));
-        if (this.maxOutputTokens != null) {
-            jsonWriter.writeFieldName("max_output_tokens");
-            this.maxOutputTokens.writeTo(jsonWriter);
-        }
-        return jsonWriter.writeEndObject();
-    }
-
-    /**
-     * Reads an instance of VoiceResponseBase from the JsonReader.
-     *
-     * @param jsonReader The JsonReader being read.
-     * @return An instance of VoiceResponseBase if the JsonReader was pointing to an instance of it, or null if it was
-     * pointing to JSON null.
-     * @throws IOException If an error occurs while reading the VoiceResponseBase.
-     */
-    public static VoiceResponseBase fromJson(JsonReader jsonReader) throws IOException {
-        // AI Tooling: openai-java de-dup
-        return jsonReader.readObject(reader -> {
-            VoiceResponseBase deserializedVoiceResponseBase = new VoiceResponseBase();
-            while (reader.nextToken() != JsonToken.END_OBJECT) {
-                String fieldName = reader.getFieldName();
-                reader.nextToken();
-                if ("object".equals(fieldName)) {
-                    deserializedVoiceResponseBase.object = VoiceResponseBaseObject.fromString(reader.getString());
-                } else if ("status".equals(fieldName)) {
-                    deserializedVoiceResponseBase.status = reader.getNullable(r -> Status.of(r.getString()));
-                } else if ("status_details".equals(fieldName)) {
-                    // AI Tooling: openai-java de-dup
-                    BinaryData statusDetailsData
-                        = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()));
-                    deserializedVoiceResponseBase.statusDetails
-                        = OpenAIJsonHelper.fromBinaryData(statusDetailsData, RealtimeResponseStatus.class);
-                } else if ("usage".equals(fieldName)) {
-                    BinaryData usageData
-                        = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()));
-                    deserializedVoiceResponseBase.usage
-                        = OpenAIJsonHelper.fromBinaryData(usageData, RealtimeResponseUsage.class);
-                } else if ("output_modalities".equals(fieldName)) {
-                    List outputModalities
-                        = reader.readArray(reader1 -> reader1.getNullable(r -> OutputModality.of(r.getString())));
-                    deserializedVoiceResponseBase.outputModalities = outputModalities;
-                } else if ("max_output_tokens".equals(fieldName)) {
-                    deserializedVoiceResponseBase.maxOutputTokens
-                        = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()));
-                } else {
-                    reader.skipChildren();
-                }
-            }
-            return deserializedVoiceResponseBase;
-        });
-    }
-
-    /**
-     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response, inclusive of
-     * tool calls, that was used in this response.
-     *
-     * @return the maxOutputTokens value as a Long, or {@code null} when it is not set or holds another variant.
-     */
-    public final Long getMaxOutputTokensAsLong() {
-        // AI Tooling: union type
-        BinaryData value = getMaxOutputTokens();
-        if (value == null) {
-            return null;
-        }
-        String json = value.toString().trim();
-        if (!(!json.isEmpty() && (Character.isDigit(json.charAt(0)) || json.charAt(0) == '-'))) {
-            return null;
-        }
-        return value.toObject(Long.class);
-    }
-
-    /**
-     * Get the maxOutputTokens property: Maximum number of output tokens for a single assistant response, inclusive of
-     * tool calls, that was used in this response.
-     *
-     * @return the maxOutputTokens value as a String, or {@code null} when it is not set or holds another variant.
-     */
-    public final String getMaxOutputTokensAsString() {
-        // AI Tooling: union type
-        BinaryData value = getMaxOutputTokens();
-        if (value == null) {
-            return null;
-        }
-        String json = value.toString().trim();
-        if (!(json.startsWith("\""))) {
-            return null;
-        }
-        return value.toObject(String.class);
-    }
-
-    /**
-     * Set the status property: The final status of the response (`completed`, `cancelled`, `failed`, or
-     * `incomplete`, `in_progress`).
-     *
-     * @param status the status value to set.
-     * @return the VoiceResponseBase object itself.
-     */
-    @Generated
-    VoiceResponseBase setStatus(Status status) {
-        this.status = status;
-        return this;
-    }
-
-    /**
-     * Set the object property: The object type, must be `realtime.response`.
-     *
-     * @param object the object value to set.
-     * @return the VoiceResponseBase object itself.
-     */
-    @Generated
-    VoiceResponseBase setObject(VoiceResponseBaseObject object) {
-        this.object = object;
-        return this;
-    }
-}
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseBaseObject.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseObjectType.java
similarity index 64%
rename from sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseBaseObject.java
rename to sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseObjectType.java
index 1330efb9a5d9..bbb0f06d6c1b 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseBaseObject.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VoiceResponseObjectType.java
@@ -6,10 +6,10 @@
 import com.azure.ai.agents.implementation.utils.Beta;
 
 /**
- * Defines values for VoiceResponseBaseObject.
+ * Defines values for VoiceResponseObjectType.
  */
 @Beta(warningText = "Preview API.")
-public enum VoiceResponseBaseObject {
+public enum VoiceResponseObjectType {
 
     /**
      * Enum value realtime.response.
@@ -17,26 +17,26 @@ public enum VoiceResponseBaseObject {
     REALTIME_RESPONSE("realtime.response");
 
     /**
-     * The actual serialized value for a VoiceResponseBaseObject instance.
+     * The actual serialized value for a VoiceResponseObjectType instance.
      */
     private final String value;
 
-    VoiceResponseBaseObject(String value) {
+    VoiceResponseObjectType(String value) {
         this.value = value;
     }
 
     /**
-     * Parses a serialized value to a VoiceResponseBaseObject instance.
+     * Parses a serialized value to a VoiceResponseObjectType instance.
      *
      * @param value the serialized value to parse.
-     * @return the parsed VoiceResponseBaseObject object, or null if unable to parse.
+     * @return the parsed VoiceResponseObjectType object, or null if unable to parse.
      */
-    public static VoiceResponseBaseObject fromString(String value) {
+    public static VoiceResponseObjectType fromString(String value) {
         if (value == null) {
             return null;
         }
-        VoiceResponseBaseObject[] items = VoiceResponseBaseObject.values();
-        for (VoiceResponseBaseObject item : items) {
+        VoiceResponseObjectType[] items = VoiceResponseObjectType.values();
+        for (VoiceResponseObjectType item : items) {
             if (item.toString().equalsIgnoreCase(value)) {
                 return item;
             }
diff --git a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json
index a44c9b9e4e8e..258fce868bb6 100644
--- a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json
+++ b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json
@@ -1 +1 @@
-{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"9ddd1c2e4d2c","crossLanguageDefinitions":{"com.azure.ai.agents.AgentsAsyncClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsAsyncClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsAsyncClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsAsyncClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsAsyncClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsAsyncClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsAsyncClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClientBuilder":"Azure.AI.Projects","com.azure.ai.agents.BetaAgentsAsyncClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaMemoryStoresAsyncClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.ToolboxesAsyncClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesAsyncClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesAsyncClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.implementation.models.AgentDefinitionOptInKeys":"Azure.AI.Projects.AgentDefinitionOptInKeys","com.azure.ai.agents.implementation.models.CreateAgentFromCodeContent":"Azure.AI.Projects.CreateAgentFromCodeContent","com.azure.ai.agents.implementation.models.CreateAgentFromManifestRequest":"Azure.AI.Projects.createAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentOptions":null,"com.azure.ai.agents.implementation.models.CreateAgentRequest":"Azure.AI.Projects.createAgent.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionFromManifestRequest":"Azure.AI.Projects.createAgentVersionFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionRequest":"Azure.AI.Projects.createAgentVersion.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryRequest":"Azure.AI.Projects.createMemory.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryStoreRequest":"Azure.AI.Projects.createMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.CreateSessionRequest":"Azure.AI.Projects.createSession.Request.anonymous","com.azure.ai.agents.implementation.models.CreateToolboxVersionRequest":"Azure.AI.Projects.createToolboxVersion.Request.anonymous","com.azure.ai.agents.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.agents.implementation.models.GetMicrosoft365AppPackageRequest":"Azure.AI.Projects.getMicrosoft365AppPackage.Request.anonymous","com.azure.ai.agents.implementation.models.ListMemoriesRequest":"Azure.AI.Projects.listMemories.Request.anonymous","com.azure.ai.agents.implementation.models.PublishAgentToMicrosoft365Request":"Azure.AI.Projects.publishAgentToMicrosoft365.Request.anonymous","com.azure.ai.agents.implementation.models.ReplaceTelephonyTransferTargetsRequest":"Azure.AI.Projects.replaceTelephonyTransferTargets.Request.anonymous","com.azure.ai.agents.implementation.models.SearchMemoriesRequest":"Azure.AI.Projects.searchMemories.Request.anonymous","com.azure.ai.agents.implementation.models.TransferTelephonyCallRequest":"Azure.AI.Projects.transferTelephonyCall.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest":"Azure.AI.Projects.updateAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentRequest":"Azure.AI.Projects.updateAgent.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoriesRequest":"Azure.AI.Projects.updateMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryRequest":"Azure.AI.Projects.updateMemory.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryStoreRequest":"Azure.AI.Projects.updateMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateToolboxInput":"Azure.AI.Projects.UpdateToolboxRequest","com.azure.ai.agents.implementation.models.UpdateToolboxRequest":"Azure.AI.Projects.updateToolbox.Request.anonymous","com.azure.ai.agents.models.A2APreviewTool":"Azure.AI.Projects.A2APreviewTool","com.azure.ai.agents.models.A2APreviewToolboxTool":"Azure.AI.Projects.A2APreviewToolboxTool","com.azure.ai.agents.models.A2AProtocolConfiguration":"Azure.AI.Projects.A2AProtocolConfiguration","com.azure.ai.agents.models.A2AProtocolVersion":"Azure.AI.Projects.A2AProtocolVersion","com.azure.ai.agents.models.A2ATool":"Azure.AI.Projects.A2ATool","com.azure.ai.agents.models.A2AToolCall":"Azure.AI.Projects.A2AToolCall","com.azure.ai.agents.models.A2AToolCallOutput":"Azure.AI.Projects.A2AToolCallOutput","com.azure.ai.agents.models.A2AToolboxTool":"Azure.AI.Projects.A2AToolboxTool","com.azure.ai.agents.models.AISearchIndexResource":"Azure.AI.Projects.AISearchIndexResource","com.azure.ai.agents.models.ActivityProtocolAccessBoundary":"Azure.AI.Projects.ActivityProtocolAccessBoundary","com.azure.ai.agents.models.ActivityProtocolConfiguration":"Azure.AI.Projects.ActivityProtocolConfiguration","com.azure.ai.agents.models.AgentBlueprintReference":"Azure.AI.Projects.AgentBlueprintReference","com.azure.ai.agents.models.AgentBlueprintReferenceType":"Azure.AI.Projects.AgentBlueprintReferenceType","com.azure.ai.agents.models.AgentCard":"Azure.AI.Projects.AgentCard","com.azure.ai.agents.models.AgentCardSkill":"Azure.AI.Projects.AgentCardSkill","com.azure.ai.agents.models.AgentDefinition":"Azure.AI.Projects.AgentDefinition","com.azure.ai.agents.models.AgentDetails":"Azure.AI.Projects.AgentObject","com.azure.ai.agents.models.AgentDetailsVersions":"Azure.AI.Projects.AgentObject.versions.anonymous","com.azure.ai.agents.models.AgentEndpointAuthorizationScheme":"Azure.AI.Projects.AgentEndpointAuthorizationScheme","com.azure.ai.agents.models.AgentEndpointAuthorizationSchemeType":"Azure.AI.Projects.AgentEndpointAuthorizationSchemeType","com.azure.ai.agents.models.AgentEndpointConfig":"Azure.AI.Projects.AgentEndpointConfig","com.azure.ai.agents.models.AgentEndpointProtocol":"Azure.AI.Projects.AgentEndpointProtocol","com.azure.ai.agents.models.AgentHarness":"Azure.AI.Projects.AgentHarness","com.azure.ai.agents.models.AgentIdentity":"Azure.AI.Projects.AgentIdentity","com.azure.ai.agents.models.AgentIdentityStatus":"Azure.AI.Projects.AgentIdentityStatus","com.azure.ai.agents.models.AgentKind":"Azure.AI.Projects.AgentKind","com.azure.ai.agents.models.AgentObjectType":"Azure.AI.Projects.AgentObjectType","com.azure.ai.agents.models.AgentOptimizationAgentCandidateOutput":"Azure.AI.Projects.AgentOptimizationAgentCandidateOutput","com.azure.ai.agents.models.AgentOptimizationBaselineAgentConfiguration":"Azure.AI.Projects.AgentOptimizationBaselineAgentConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationCandidate","com.azure.ai.agents.models.AgentOptimizationCandidateEvaluation":"Azure.AI.Projects.AgentOptimizationCandidateEvaluation","com.azure.ai.agents.models.AgentOptimizationCandidateExpand":"Azure.AI.Projects.AgentOptimizationCandidateExpand","com.azure.ai.agents.models.AgentOptimizationCandidateOutput":"Azure.AI.Projects.AgentOptimizationCandidateOutput","com.azure.ai.agents.models.AgentOptimizationCandidatePromotionInfo":"Azure.AI.Projects.AgentOptimizationCandidatePromotionInfo","com.azure.ai.agents.models.AgentOptimizationCandidateSearchConfiguration":"Azure.AI.Projects.AgentOptimizationCandidateSearchConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidateStatus":"Azure.AI.Projects.AgentOptimizationCandidateStatus","com.azure.ai.agents.models.AgentOptimizationConfiguration":"Azure.AI.Projects.AgentOptimizationConfiguration","com.azure.ai.agents.models.AgentOptimizationConfigurationBase":"Azure.AI.Projects.AgentOptimizationConfigurationBase","com.azure.ai.agents.models.AgentOptimizationConfigurationType":"Azure.AI.Projects.AgentOptimizationConfigurationType","com.azure.ai.agents.models.AgentOptimizationCostEstimate":"Azure.AI.Projects.AgentOptimizationCostEstimate","com.azure.ai.agents.models.AgentOptimizationDataSourceType":"Azure.AI.Projects.AgentOptimizationDataSourceType","com.azure.ai.agents.models.AgentOptimizationEstimateBand":"Azure.AI.Projects.AgentOptimizationEstimateBand","com.azure.ai.agents.models.AgentOptimizationEstimateInputs":"Azure.AI.Projects.AgentOptimizationEstimateInputs","com.azure.ai.agents.models.AgentOptimizationEstimateResult":"Azure.AI.Projects.AgentOptimizationEstimateResult","com.azure.ai.agents.models.AgentOptimizationEvaluationConfiguration":"Azure.AI.Projects.AgentOptimizationEvaluationConfiguration","com.azure.ai.agents.models.AgentOptimizationEvaluationSet":"Azure.AI.Projects.AgentOptimizationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationEvaluationSetType":"Azure.AI.Projects.AgentOptimizationEvaluationSetType","com.azure.ai.agents.models.AgentOptimizationEvaluatorReference":"Azure.AI.Projects.AgentOptimizationEvaluator","com.azure.ai.agents.models.AgentOptimizationFoundryAgentTargetConfiguration":"Azure.AI.Projects.AgentOptimizationFoundryAgentTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationGoal":"Azure.AI.Projects.AgentOptimizationGoal","com.azure.ai.agents.models.AgentOptimizationInstructionsMutation":"Azure.AI.Projects.AgentOptimizationInstructionsMutation","com.azure.ai.agents.models.AgentOptimizationJob":"Azure.AI.Projects.AgentOptimizationJob","com.azure.ai.agents.models.AgentOptimizationJobLatency":"Azure.AI.Projects.AgentOptimizationJobLatency","com.azure.ai.agents.models.AgentOptimizationJobResult":"Azure.AI.Projects.AgentOptimizationJobResult","com.azure.ai.agents.models.AgentOptimizationJobTokenUsage":"Azure.AI.Projects.AgentOptimizationJobTokenUsage","com.azure.ai.agents.models.AgentOptimizationModelConfiguration":"Azure.AI.Projects.AgentOptimizationModelConfiguration","com.azure.ai.agents.models.AgentOptimizationModelMutation":"Azure.AI.Projects.AgentOptimizationModelMutation","com.azure.ai.agents.models.AgentOptimizationMutation":"Azure.AI.Projects.AgentOptimizationMutation","com.azure.ai.agents.models.AgentOptimizationPromptCandidateOutput":"Azure.AI.Projects.AgentOptimizationPromptCandidateOutput","com.azure.ai.agents.models.AgentOptimizationResultCandidateSummary":"Azure.AI.Projects.AgentOptimizationResultCandidateSummary","com.azure.ai.agents.models.AgentOptimizationSkill":"Azure.AI.Projects.AgentOptimizationSkill","com.azure.ai.agents.models.AgentOptimizationSkillsMutation":"Azure.AI.Projects.AgentOptimizationSkillsMutation","com.azure.ai.agents.models.AgentOptimizationSpace":"Azure.AI.Projects.AgentOptimizationSpace","com.azure.ai.agents.models.AgentOptimizationStage":"Azure.AI.Projects.AgentOptimizationStage","com.azure.ai.agents.models.AgentOptimizationStageEstimate":"Azure.AI.Projects.AgentOptimizationStageEstimate","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionEvaluationSet":"Azure.AI.Projects.AgentOptimizationTargetCompletionEvaluationSet","com.azure.ai.agents.models.AgentOptimizationTargetCompletionInlineDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionInlineDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionTestCase":"Azure.AI.Projects.AgentOptimizationTargetCompletionTestCase","com.azure.ai.agents.models.AgentOptimizationTargetConfiguration":"Azure.AI.Projects.AgentOptimizationTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationTargetConfigurationType":"Azure.AI.Projects.AgentOptimizationTargetConfigurationType","com.azure.ai.agents.models.AgentOptimizationTerminationReason":"Azure.AI.Projects.AgentOptimizationTerminationReason","com.azure.ai.agents.models.AgentOptimizationToolsMutation":"Azure.AI.Projects.AgentOptimizationToolsMutation","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationEvaluationSet":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationInlineDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationInlineDataSource","com.azure.ai.agents.models.AgentReference":"Azure.AI.Projects.AgentReference","com.azure.ai.agents.models.AgentSessionResource":"Azure.AI.Projects.AgentSessionResource","com.azure.ai.agents.models.AgentSessionStatus":"Azure.AI.Projects.AgentSessionStatus","com.azure.ai.agents.models.AgentState":"Azure.AI.Projects.AgentState","com.azure.ai.agents.models.AgentStateSource":"Azure.AI.Projects.AgentStateSource","com.azure.ai.agents.models.AgentVersionDetails":"Azure.AI.Projects.AgentVersionObject","com.azure.ai.agents.models.AgentVersionStatus":"Azure.AI.Projects.AgentVersionStatus","com.azure.ai.agents.models.ApiError":"OpenAI.Error","com.azure.ai.agents.models.ApplyPatchToolParameter":"OpenAI.ApplyPatchToolParam","com.azure.ai.agents.models.ApproximateLocation":"OpenAI.ApproximateLocation","com.azure.ai.agents.models.AudioTranscription":"OpenAI.AudioTranscription","com.azure.ai.agents.models.AudioTranscriptionModel":"OpenAI.AudioTranscription.model.anonymous","com.azure.ai.agents.models.AutoCodeInterpreterToolParameter":"OpenAI.AutoCodeInterpreterToolParam","com.azure.ai.agents.models.AzureAISearchQueryType":"Azure.AI.Projects.AzureAISearchQueryType","com.azure.ai.agents.models.AzureAISearchTool":"Azure.AI.Projects.AzureAISearchTool","com.azure.ai.agents.models.AzureAISearchToolCall":"Azure.AI.Projects.AzureAISearchToolCall","com.azure.ai.agents.models.AzureAISearchToolCallOutput":"Azure.AI.Projects.AzureAISearchToolCallOutput","com.azure.ai.agents.models.AzureAISearchToolResource":"Azure.AI.Projects.AzureAISearchToolResource","com.azure.ai.agents.models.AzureAISearchToolboxTool":"Azure.AI.Projects.AzureAISearchToolboxTool","com.azure.ai.agents.models.AzureCreateResponseDetails":"Azure.AI.Projects.AzureCreateResponseDetails","com.azure.ai.agents.models.AzureCreateResponseOptions":"Azure.AI.Projects.AzureCreateResponseOptions","com.azure.ai.agents.models.AzureFunctionBinding":"Azure.AI.Projects.AzureFunctionBinding","com.azure.ai.agents.models.AzureFunctionDefinition":"Azure.AI.Projects.AzureFunctionDefinition","com.azure.ai.agents.models.AzureFunctionDefinitionDetails":"Azure.AI.Projects.AzureFunctionDefinition.function.anonymous","com.azure.ai.agents.models.AzureFunctionStorageQueue":"Azure.AI.Projects.AzureFunctionStorageQueue","com.azure.ai.agents.models.AzureFunctionTool":"Azure.AI.Projects.AzureFunctionTool","com.azure.ai.agents.models.AzureFunctionToolCall":"Azure.AI.Projects.AzureFunctionToolCall","com.azure.ai.agents.models.AzureFunctionToolCallOutput":"Azure.AI.Projects.AzureFunctionToolCallOutput","com.azure.ai.agents.models.AzureUserSecurityContext":"Azure.AI.Projects.AzureUserSecurityContext","com.azure.ai.agents.models.BingCustomSearchConfiguration":"Azure.AI.Projects.BingCustomSearchConfiguration","com.azure.ai.agents.models.BingCustomSearchPreviewTool":"Azure.AI.Projects.BingCustomSearchPreviewTool","com.azure.ai.agents.models.BingCustomSearchToolCall":"Azure.AI.Projects.BingCustomSearchToolCall","com.azure.ai.agents.models.BingCustomSearchToolCallOutput":"Azure.AI.Projects.BingCustomSearchToolCallOutput","com.azure.ai.agents.models.BingCustomSearchToolParameters":"Azure.AI.Projects.BingCustomSearchToolParameters","com.azure.ai.agents.models.BingGroundingSearchConfiguration":"Azure.AI.Projects.BingGroundingSearchConfiguration","com.azure.ai.agents.models.BingGroundingSearchToolParameters":"Azure.AI.Projects.BingGroundingSearchToolParameters","com.azure.ai.agents.models.BingGroundingTool":"Azure.AI.Projects.BingGroundingTool","com.azure.ai.agents.models.BingGroundingToolCall":"Azure.AI.Projects.BingGroundingToolCall","com.azure.ai.agents.models.BingGroundingToolCallOutput":"Azure.AI.Projects.BingGroundingToolCallOutput","com.azure.ai.agents.models.BotServiceAuthorizationScheme":"Azure.AI.Projects.BotServiceAuthorizationScheme","com.azure.ai.agents.models.BotServiceRbacAuthorizationScheme":"Azure.AI.Projects.BotServiceRbacAuthorizationScheme","com.azure.ai.agents.models.BotServiceTenantAuthorizationScheme":"Azure.AI.Projects.BotServiceTenantAuthorizationScheme","com.azure.ai.agents.models.BrowserAutomationPreviewTool":"Azure.AI.Projects.BrowserAutomationPreviewTool","com.azure.ai.agents.models.BrowserAutomationPreviewToolboxTool":"Azure.AI.Projects.BrowserAutomationPreviewToolboxTool","com.azure.ai.agents.models.BrowserAutomationTool":"Azure.AI.Projects.BrowserAutomationTool","com.azure.ai.agents.models.BrowserAutomationToolCall":"Azure.AI.Projects.BrowserAutomationToolCall","com.azure.ai.agents.models.BrowserAutomationToolCallOutput":"Azure.AI.Projects.BrowserAutomationToolCallOutput","com.azure.ai.agents.models.BrowserAutomationToolConnectionParameters":"Azure.AI.Projects.BrowserAutomationToolConnectionParameters","com.azure.ai.agents.models.BrowserAutomationToolParameters":"Azure.AI.Projects.BrowserAutomationToolParameters","com.azure.ai.agents.models.BrowserAutomationToolboxTool":"Azure.AI.Projects.BrowserAutomationToolboxTool","com.azure.ai.agents.models.CallableToolAllowedCaller":"OpenAI.CallableToolAllowedCaller","com.azure.ai.agents.models.CaptureStructuredOutputsTool":"Azure.AI.Projects.CaptureStructuredOutputsTool","com.azure.ai.agents.models.ChatSummaryMemoryItem":"Azure.AI.Projects.ChatSummaryMemoryItem","com.azure.ai.agents.models.CodeConfiguration":"Azure.AI.Projects.CodeConfiguration","com.azure.ai.agents.models.CodeDependencyResolution":"Azure.AI.Projects.CodeDependencyResolution","com.azure.ai.agents.models.CodeFileDetails":null,"com.azure.ai.agents.models.CodeInterpreterTool":"OpenAI.CodeInterpreterTool","com.azure.ai.agents.models.CodeInterpreterToolboxTool":"Azure.AI.Projects.CodeInterpreterToolboxTool","com.azure.ai.agents.models.ComputerEnvironment":"ComputerEnvironmentExpandable","com.azure.ai.agents.models.ComputerTool":"OpenAI.ComputerTool","com.azure.ai.agents.models.ComputerUsePreviewTool":"OpenAI.ComputerUsePreviewTool","com.azure.ai.agents.models.ContainerAutoParameter":"OpenAI.ContainerAutoParam","com.azure.ai.agents.models.ContainerConfiguration":"Azure.AI.Projects.ContainerConfiguration","com.azure.ai.agents.models.ContainerMemoryLimit":"ContainerMemoryLimitExpandable","com.azure.ai.agents.models.ContainerNetworkPolicyAllowlistParameter":"OpenAI.ContainerNetworkPolicyAllowlistParam","com.azure.ai.agents.models.ContainerNetworkPolicyDisabledParameter":"OpenAI.ContainerNetworkPolicyDisabledParam","com.azure.ai.agents.models.ContainerNetworkPolicyDomainSecretParameter":"OpenAI.ContainerNetworkPolicyDomainSecretParam","com.azure.ai.agents.models.ContainerNetworkPolicyParamType":"OpenAI.ContainerNetworkPolicyParamType","com.azure.ai.agents.models.ContainerNetworkPolicyParameter":"OpenAI.ContainerNetworkPolicyParam","com.azure.ai.agents.models.ContainerSkill":"OpenAI.ContainerSkill","com.azure.ai.agents.models.ContainerSkillType":"OpenAI.ContainerSkillType","com.azure.ai.agents.models.CreateAgentVersionFromCodeContent":"Azure.AI.Projects.CreateAgentVersionFromCodeContent","com.azure.ai.agents.models.CreateAgentVersionFromCodeMetadata":"Azure.AI.Projects.CreateAgentVersionFromCodeMetadata","com.azure.ai.agents.models.CreateAgentVersionInput":"Azure.AI.Projects.CreateAgentVersionRequest","com.azure.ai.agents.models.CreateAgentVersionOptions":null,"com.azure.ai.agents.models.CreateTeamsPhoneExtensibilityTelephonyBindingInput":"Azure.AI.Projects.CreateTeamsPhoneExtensibilityTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyBindingInput":"Azure.AI.Projects.CreateTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyCallJobInput":"Azure.AI.Projects.CreateTelephonyCallJobRequest","com.azure.ai.agents.models.CreateTwilioTelephonyBindingInput":"Azure.AI.Projects.CreateTwilioTelephonyBindingRequest","com.azure.ai.agents.models.CustomGrammarFormatParameter":"OpenAI.CustomGrammarFormatParam","com.azure.ai.agents.models.CustomTextFormatParameter":"OpenAI.CustomTextFormatParam","com.azure.ai.agents.models.CustomToolParamFormat":"OpenAI.CustomToolParamFormat","com.azure.ai.agents.models.CustomToolParamFormatType":"OpenAI.CustomToolParamFormatType","com.azure.ai.agents.models.CustomToolParameter":"OpenAI.CustomToolParam","com.azure.ai.agents.models.DigitalWorkerType":"Azure.AI.Projects.DigitalWorkerType","com.azure.ai.agents.models.EntraAuthorizationScheme":"Azure.AI.Projects.EntraAuthorizationScheme","com.azure.ai.agents.models.EvaluationAzureStandardVoiceModelConfiguration":"Azure.AI.Projects.EvaluationAzureStandardVoiceModelConfiguration","com.azure.ai.agents.models.EvaluationModelConfiguration":"Azure.AI.Projects.EvaluationModelConfiguration","com.azure.ai.agents.models.EvaluationVoiceModelConfiguration":"Azure.AI.Projects.EvaluationVoiceModelConfiguration","com.azure.ai.agents.models.ExternalAgentDefinition":"Azure.AI.Projects.ExternalAgentDefinition","com.azure.ai.agents.models.FabricDataAgentToolCall":"Azure.AI.Projects.FabricDataAgentToolCall","com.azure.ai.agents.models.FabricDataAgentToolCallOutput":"Azure.AI.Projects.FabricDataAgentToolCallOutput","com.azure.ai.agents.models.FabricDataAgentToolParameters":"Azure.AI.Projects.FabricDataAgentToolParameters","com.azure.ai.agents.models.FabricIqPreviewTool":"Azure.AI.Projects.FabricIQPreviewTool","com.azure.ai.agents.models.FabricIqPreviewToolboxTool":"Azure.AI.Projects.FabricIQPreviewToolboxTool","com.azure.ai.agents.models.FileSearchTool":"OpenAI.FileSearchTool","com.azure.ai.agents.models.FileSearchToolboxTool":"Azure.AI.Projects.FileSearchToolboxTool","com.azure.ai.agents.models.FixedRatioVersionSelectionRule":"Azure.AI.Projects.FixedRatioVersionSelectionRule","com.azure.ai.agents.models.FunctionShellToolParamEnvironment":"OpenAI.FunctionShellToolParamEnvironment","com.azure.ai.agents.models.FunctionShellToolParamEnvironmentType":"OpenAI.FunctionShellToolParamEnvironmentType","com.azure.ai.agents.models.FunctionShellToolParameter":"OpenAI.FunctionShellToolParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentContainerReferenceParameter":"OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentLocalEnvironmentParameter":"OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam","com.azure.ai.agents.models.FunctionTool":"OpenAI.FunctionTool","com.azure.ai.agents.models.GetMicrosoft365AppPackageOptions":null,"com.azure.ai.agents.models.GitHubCopilotBuiltInTool":"Azure.AI.Projects.GitHubCopilotBuiltInTool","com.azure.ai.agents.models.GitHubCopilotHarness":"Azure.AI.Projects.GitHubCopilotHarness","com.azure.ai.agents.models.GitHubCopilotToolsetConfig":"Azure.AI.Projects.GitHubCopilotToolsetConfig","com.azure.ai.agents.models.GitHubCopilotToolsetDefaultConfig":"Azure.AI.Projects.GitHubCopilotToolsetDefaultConfig","com.azure.ai.agents.models.GitHubCopilotToolsetPreview":"Azure.AI.Projects.GitHubCopilotToolsetPreview","com.azure.ai.agents.models.GrammarSyntax":"GrammarSyntaxExpandable","com.azure.ai.agents.models.HeaderTelemetryEndpointAuth":"Azure.AI.Projects.HeaderTelemetryEndpointAuth","com.azure.ai.agents.models.HostedAgentDefinition":"Azure.AI.Projects.HostedAgentDefinition","com.azure.ai.agents.models.HybridSearchOptions":"OpenAI.HybridSearchOptions","com.azure.ai.agents.models.ImageGenActionEnum":"ImageGenActionEnumExpandable","com.azure.ai.agents.models.ImageGenTool":"OpenAI.ImageGenTool","com.azure.ai.agents.models.ImageGenToolBackground":"ImageGenToolBackgroundExpandable","com.azure.ai.agents.models.ImageGenToolInputImageMask":"OpenAI.ImageGenToolInputImageMask","com.azure.ai.agents.models.ImageGenToolModel":"OpenAI.ImageGenTool.model.anonymous","com.azure.ai.agents.models.ImageGenToolModeration":"ImageGenToolModerationExpandable","com.azure.ai.agents.models.ImageGenToolOutputFormat":"ImageGenToolOutputFormatExpandable","com.azure.ai.agents.models.ImageGenToolQuality":"ImageGenToolQualityExpandable","com.azure.ai.agents.models.ImageGenToolSize":"ImageGenToolSizeExpandable","com.azure.ai.agents.models.IncludeEnum":"OpenAI.IncludeEnum","com.azure.ai.agents.models.InlineSkillParameter":"OpenAI.InlineSkillParam","com.azure.ai.agents.models.InlineSkillSourceParameter":"OpenAI.InlineSkillSourceParam","com.azure.ai.agents.models.InputFidelity":"InputFidelityExpandable","com.azure.ai.agents.models.InvocationsProtocolConfiguration":"Azure.AI.Projects.InvocationsProtocolConfiguration","com.azure.ai.agents.models.InvocationsWsProtocolConfiguration":"Azure.AI.Projects.InvocationsWsProtocolConfiguration","com.azure.ai.agents.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.agents.models.ListMemoriesOptions":null,"com.azure.ai.agents.models.LocalShellToolParameter":"OpenAI.LocalShellToolParam","com.azure.ai.agents.models.LocalSkillParameter":"OpenAI.LocalSkillParam","com.azure.ai.agents.models.ManagedAgentIdentityBlueprintReference":"Azure.AI.Projects.ManagedAgentIdentityBlueprintReference","com.azure.ai.agents.models.McpListToolsTool":"OpenAI.MCPListToolsTool","com.azure.ai.agents.models.McpListToolsToolAnnotations":"OpenAI.MCPListToolsToolAnnotations","com.azure.ai.agents.models.McpListToolsToolInputSchema":"OpenAI.MCPListToolsToolInputSchema","com.azure.ai.agents.models.McpProtocolConfiguration":"Azure.AI.Projects.McpProtocolConfiguration","com.azure.ai.agents.models.McpTool":"OpenAI.MCPTool","com.azure.ai.agents.models.McpToolConnectorId":"McpToolConnectorIdExpandable","com.azure.ai.agents.models.McpToolFilter":"OpenAI.MCPToolFilter","com.azure.ai.agents.models.McpToolRequireApproval":"OpenAI.MCPToolRequireApproval","com.azure.ai.agents.models.McpToolboxTool":"Azure.AI.Projects.MCPToolboxTool","com.azure.ai.agents.models.MemoryCommandToolCall":"Azure.AI.Projects.MemoryCommandToolCall","com.azure.ai.agents.models.MemoryCommandToolCallOutput":"Azure.AI.Projects.MemoryCommandToolCallOutput","com.azure.ai.agents.models.MemoryItem":"Azure.AI.Projects.MemoryItem","com.azure.ai.agents.models.MemoryItemKind":"Azure.AI.Projects.MemoryItemKind","com.azure.ai.agents.models.MemoryOperation":"Azure.AI.Projects.MemoryOperation","com.azure.ai.agents.models.MemoryOperationKind":"Azure.AI.Projects.MemoryOperationKind","com.azure.ai.agents.models.MemorySearchItem":"Azure.AI.Projects.MemorySearchItem","com.azure.ai.agents.models.MemorySearchOptions":"Azure.AI.Projects.MemorySearchOptions","com.azure.ai.agents.models.MemorySearchPreviewTool":"Azure.AI.Projects.MemorySearchPreviewTool","com.azure.ai.agents.models.MemorySearchToolCall":"Azure.AI.Projects.MemorySearchToolCall","com.azure.ai.agents.models.MemoryStoreDefaultDefinition":"Azure.AI.Projects.MemoryStoreDefaultDefinition","com.azure.ai.agents.models.MemoryStoreDefaultOptions":"Azure.AI.Projects.MemoryStoreDefaultOptions","com.azure.ai.agents.models.MemoryStoreDefinition":"Azure.AI.Projects.MemoryStoreDefinition","com.azure.ai.agents.models.MemoryStoreDetails":"Azure.AI.Projects.MemoryStoreObject","com.azure.ai.agents.models.MemoryStoreKind":"Azure.AI.Projects.MemoryStoreKind","com.azure.ai.agents.models.MemoryStoreObjectType":"Azure.AI.Projects.MemoryStoreObjectType","com.azure.ai.agents.models.MemoryStoreOperationUsage":"Azure.AI.Projects.MemoryStoreOperationUsage","com.azure.ai.agents.models.MemoryStoreSearchResponse":"Azure.AI.Projects.MemoryStoreSearchResponse","com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult":"Azure.AI.Projects.MemoryStoreUpdateCompletedResult","com.azure.ai.agents.models.MemoryStoreUpdateResponse":"Azure.AI.Projects.MemoryStoreUpdateResponse","com.azure.ai.agents.models.MemoryStoreUpdateStatus":"Azure.AI.Projects.MemoryStoreUpdateStatus","com.azure.ai.agents.models.Microsoft365PermissionScopes":"Azure.AI.Projects.Microsoft365PermissionScopes","com.azure.ai.agents.models.Microsoft365PublishDefaults":"Azure.AI.Projects.Microsoft365PublishDefaults","com.azure.ai.agents.models.Microsoft365PublishResult":"Azure.AI.Projects.Microsoft365PublishResponse","com.azure.ai.agents.models.Microsoft365PublishScope":"Azure.AI.Projects.Microsoft365PublishScope","com.azure.ai.agents.models.MicrosoftFabricPreviewTool":"Azure.AI.Projects.MicrosoftFabricPreviewTool","com.azure.ai.agents.models.ModelRouterAttempt":"Azure.AI.Projects.ModelRouterAttempt","com.azure.ai.agents.models.ModelRouterAttemptError":"Azure.AI.Projects.ModelRouterAttemptError","com.azure.ai.agents.models.ModelRouterAttemptResult":"Azure.AI.Projects.ModelRouterAttemptResult","com.azure.ai.agents.models.ModelRouterDetails":"Azure.AI.Projects.ModelRouterDetails","com.azure.ai.agents.models.ModelRouterMode":"Azure.AI.Projects.ModelRouterMode","com.azure.ai.agents.models.ModelSamplingParameters":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.agents.models.ModelSelectionDetails":"Azure.AI.Projects.ModelSelectionDetails","com.azure.ai.agents.models.NamespaceTool":"OpenAI.NamespaceToolParam","com.azure.ai.agents.models.OpenApiAnonymousAuthDetails":"Azure.AI.Projects.OpenApiAnonymousAuthDetails","com.azure.ai.agents.models.OpenApiAuthDetails":"Azure.AI.Projects.OpenApiAuthDetails","com.azure.ai.agents.models.OpenApiAuthType":"Azure.AI.Projects.OpenApiAuthType","com.azure.ai.agents.models.OpenApiFunctionDefinition":"Azure.AI.Projects.OpenApiFunctionDefinition","com.azure.ai.agents.models.OpenApiFunctionDefinitionFunction":"Azure.AI.Projects.OpenApiFunctionDefinition.function.anonymous","com.azure.ai.agents.models.OpenApiManagedAuthDetails":"Azure.AI.Projects.OpenApiManagedAuthDetails","com.azure.ai.agents.models.OpenApiManagedSecurityScheme":"Azure.AI.Projects.OpenApiManagedSecurityScheme","com.azure.ai.agents.models.OpenApiProjectConnectionAuthDetails":"Azure.AI.Projects.OpenApiProjectConnectionAuthDetails","com.azure.ai.agents.models.OpenApiProjectConnectionSecurityScheme":"Azure.AI.Projects.OpenApiProjectConnectionSecurityScheme","com.azure.ai.agents.models.OpenApiTool":"Azure.AI.Projects.OpenApiTool","com.azure.ai.agents.models.OpenApiToolCall":"Azure.AI.Projects.OpenApiToolCall","com.azure.ai.agents.models.OpenApiToolCallOutput":"Azure.AI.Projects.OpenApiToolCallOutput","com.azure.ai.agents.models.OpenApiToolboxTool":"Azure.AI.Projects.OpenApiToolboxTool","com.azure.ai.agents.models.OptimizationContext":"Azure.AI.Projects.OptimizationContext","com.azure.ai.agents.models.OptimizationContextType":"Azure.AI.Projects.OptimizationContextType","com.azure.ai.agents.models.OtlpTelemetryEndpoint":"Azure.AI.Projects.OtlpTelemetryEndpoint","com.azure.ai.agents.models.PageOrder":"Azure.AI.Projects.PageOrder","com.azure.ai.agents.models.ProceduralMemoryItem":"Azure.AI.Projects.ProceduralMemoryItem","com.azure.ai.agents.models.ProgrammaticToolCallingParameter":"OpenAI.ProgrammaticToolCallingParam","com.azure.ai.agents.models.PromptAgentDefinition":"Azure.AI.Projects.PromptAgentDefinition","com.azure.ai.agents.models.PromptAgentDefinitionTextOptions":"Azure.AI.Projects.PromptAgentDefinitionTextOptions","com.azure.ai.agents.models.PromptOptimizationConfiguration":"Azure.AI.Projects.PromptOptimizationConfiguration","com.azure.ai.agents.models.ProtocolConfiguration":"Azure.AI.Projects.ProtocolConfiguration","com.azure.ai.agents.models.ProtocolVersionRecord":"Azure.AI.Projects.ProtocolVersionRecord","com.azure.ai.agents.models.PstnTelephonyTransferDestination":"Azure.AI.Projects.PSTNTelephonyTransferDestination","com.azure.ai.agents.models.PublishAgentToMicrosoft365Options":null,"com.azure.ai.agents.models.PublishApprovalStatus":"Azure.AI.Projects.PublishApprovalStatus","com.azure.ai.agents.models.RaiConfig":"Azure.AI.Projects.RaiConfig","com.azure.ai.agents.models.RaiInvocationContentType":"Azure.AI.Projects.RaiInvocationContentType","com.azure.ai.agents.models.RaiInvocationModeration":"Azure.AI.Projects.RaiInvocationModeration","com.azure.ai.agents.models.RaiInvocationResponseMode":"Azure.AI.Projects.RaiInvocationMode","com.azure.ai.agents.models.RaiSseTextSelector":"Azure.AI.Projects.RaiSseTextSelector","com.azure.ai.agents.models.RankerVersionType":"RankerVersionTypeExpandable","com.azure.ai.agents.models.RankingOptions":"OpenAI.RankingOptions","com.azure.ai.agents.models.RealtimeAudioFormat":"OpenAI.RealtimeAudioFormats","com.azure.ai.agents.models.RealtimeAudioFormatType":"OpenAI.RealtimeAudioFormatsType","com.azure.ai.agents.models.RealtimeClientEvent":"OpenAI.RealtimeClientEvent","com.azure.ai.agents.models.RealtimeClientEventType":"OpenAI.RealtimeClientEventType","com.azure.ai.agents.models.RealtimeConversationCreatedEvent":"OpenAI.RealtimeServerEventConversationCreated","com.azure.ai.agents.models.RealtimeConversationItem":"OpenAI.RealtimeConversationItem","com.azure.ai.agents.models.RealtimeConversationItemAddedEvent":"OpenAI.RealtimeServerEventConversationItemAdded","com.azure.ai.agents.models.RealtimeConversationItemAssistantMessage":"OpenAI.RealtimeConversationItemMessageAssistant","com.azure.ai.agents.models.RealtimeConversationItemCreateEvent":"OpenAI.RealtimeClientEventConversationItemCreate","com.azure.ai.agents.models.RealtimeConversationItemCreatedEvent":"OpenAI.RealtimeServerEventConversationItemCreated","com.azure.ai.agents.models.RealtimeConversationItemDeleteEvent":"OpenAI.RealtimeClientEventConversationItemDelete","com.azure.ai.agents.models.RealtimeConversationItemDeletedEvent":"OpenAI.RealtimeServerEventConversationItemDeleted","com.azure.ai.agents.models.RealtimeConversationItemDoneEvent":"OpenAI.RealtimeServerEventConversationItemDone","com.azure.ai.agents.models.RealtimeConversationItemFunctionCall":"OpenAI.RealtimeConversationItemFunctionCall","com.azure.ai.agents.models.RealtimeConversationItemFunctionCallOutput":"OpenAI.RealtimeConversationItemFunctionCallOutput","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionCompletedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionDeltaEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionFailedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionSegmentEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegment","com.azure.ai.agents.models.RealtimeConversationItemMessage":"OpenAI.RealtimeConversationItemMessage","com.azure.ai.agents.models.RealtimeConversationItemMessageType":"OpenAI.RealtimeConversationItemMessageType","com.azure.ai.agents.models.RealtimeConversationItemObjectType":"RealtimeConversationItemObject","com.azure.ai.agents.models.RealtimeConversationItemRetrieveEvent":"OpenAI.RealtimeClientEventConversationItemRetrieve","com.azure.ai.agents.models.RealtimeConversationItemRetrievedEvent":"OpenAI.RealtimeServerEventConversationItemRetrieved","com.azure.ai.agents.models.RealtimeConversationItemSystemMessage":"OpenAI.RealtimeConversationItemMessageSystem","com.azure.ai.agents.models.RealtimeConversationItemTruncateEvent":"OpenAI.RealtimeClientEventConversationItemTruncate","com.azure.ai.agents.models.RealtimeConversationItemTruncatedEvent":"OpenAI.RealtimeServerEventConversationItemTruncated","com.azure.ai.agents.models.RealtimeConversationItemType":"OpenAI.RealtimeConversationItemType","com.azure.ai.agents.models.RealtimeConversationItemUserMessage":"OpenAI.RealtimeConversationItemMessageUser","com.azure.ai.agents.models.RealtimeErrorEvent":"OpenAI.RealtimeServerEventRealtimeServerEventError","com.azure.ai.agents.models.RealtimeInputAudioBufferAppendEvent":"OpenAI.RealtimeClientEventInputAudioBufferAppend","com.azure.ai.agents.models.RealtimeInputAudioBufferClearEvent":"OpenAI.RealtimeClientEventInputAudioBufferClear","com.azure.ai.agents.models.RealtimeInputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCleared","com.azure.ai.agents.models.RealtimeInputAudioBufferCommitEvent":"OpenAI.RealtimeClientEventInputAudioBufferCommit","com.azure.ai.agents.models.RealtimeInputAudioBufferCommittedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCommitted","com.azure.ai.agents.models.RealtimeInputAudioBufferDtmfReceivedEvent":"OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStartedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStoppedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped","com.azure.ai.agents.models.RealtimeInputAudioBufferTimeoutTriggeredEvent":"OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggered","com.azure.ai.agents.models.RealtimeMcpApprovalInput":"OpenAI.RealtimeMCPApprovalRequest","com.azure.ai.agents.models.RealtimeMcpApprovalOutput":"OpenAI.RealtimeMCPApprovalResponse","com.azure.ai.agents.models.RealtimeMcpError":"OpenAI.RealtimeMCPError","com.azure.ai.agents.models.RealtimeMcpErrorType":"OpenAI.RealtimeMcpErrorType","com.azure.ai.agents.models.RealtimeMcpHttpError":"OpenAI.RealtimeMCPHTTPError","com.azure.ai.agents.models.RealtimeMcpListTools":"OpenAI.RealtimeMCPListTools","com.azure.ai.agents.models.RealtimeMcpListToolsCompletedEvent":"OpenAI.RealtimeServerEventMCPListToolsCompleted","com.azure.ai.agents.models.RealtimeMcpListToolsFailedEvent":"OpenAI.RealtimeServerEventMCPListToolsFailed","com.azure.ai.agents.models.RealtimeMcpListToolsInProgressEvent":"OpenAI.RealtimeServerEventMCPListToolsInProgress","com.azure.ai.agents.models.RealtimeMcpProtocolError":"OpenAI.RealtimeMCPProtocolError","com.azure.ai.agents.models.RealtimeMcpToolCall":"OpenAI.RealtimeMCPToolCall","com.azure.ai.agents.models.RealtimeMcpToolExecutionError":"OpenAI.RealtimeMCPToolExecutionError","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearEvent":"OpenAI.RealtimeClientEventOutputAudioBufferClear","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferCleared","com.azure.ai.agents.models.RealtimeOutputAudioBufferStartedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStarted","com.azure.ai.agents.models.RealtimeOutputAudioBufferStoppedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStopped","com.azure.ai.agents.models.RealtimePcmAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcm","com.azure.ai.agents.models.RealtimePcmaAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcma","com.azure.ai.agents.models.RealtimePcmuAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcmu","com.azure.ai.agents.models.RealtimeRateLimitsUpdatedEvent":"OpenAI.RealtimeServerEventRateLimitsUpdated","com.azure.ai.agents.models.RealtimeResponseAudioDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioDelta","com.azure.ai.agents.models.RealtimeResponseAudioDoneEvent":"OpenAI.RealtimeServerEventResponseAudioDone","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDelta","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDoneEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDone","com.azure.ai.agents.models.RealtimeResponseCancelEvent":"OpenAI.RealtimeClientEventResponseCancel","com.azure.ai.agents.models.RealtimeResponseContentPart":"OpenAI.RealtimeServerEventResponseContentPartDonePart","com.azure.ai.agents.models.RealtimeResponseContentPartAddedEvent":"OpenAI.RealtimeServerEventResponseContentPartAdded","com.azure.ai.agents.models.RealtimeResponseContentPartDoneEvent":"OpenAI.RealtimeServerEventResponseContentPartDone","com.azure.ai.agents.models.RealtimeResponseCreateEvent":"OpenAI.RealtimeClientEventResponseCreate","com.azure.ai.agents.models.RealtimeResponseCreatedEvent":"OpenAI.RealtimeServerEventResponseCreated","com.azure.ai.agents.models.RealtimeResponseDoneEvent":"OpenAI.RealtimeServerEventResponseDone","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallCompletedEvent":"OpenAI.RealtimeServerEventResponseMCPCallCompleted","com.azure.ai.agents.models.RealtimeResponseMcpCallFailedEvent":"OpenAI.RealtimeServerEventResponseMCPCallFailed","com.azure.ai.agents.models.RealtimeResponseMcpCallInProgressEvent":"OpenAI.RealtimeServerEventResponseMCPCallInProgress","com.azure.ai.agents.models.RealtimeResponseOutputItemAddedEvent":"OpenAI.RealtimeServerEventResponseOutputItemAdded","com.azure.ai.agents.models.RealtimeResponseOutputItemDoneEvent":"OpenAI.RealtimeServerEventResponseOutputItemDone","com.azure.ai.agents.models.RealtimeResponseTextDeltaEvent":"OpenAI.RealtimeServerEventResponseTextDelta","com.azure.ai.agents.models.RealtimeResponseTextDoneEvent":"OpenAI.RealtimeServerEventResponseTextDone","com.azure.ai.agents.models.RealtimeSemanticVadTurnDetection":"OpenAI.RealtimeTurnDetectionSemanticVad","com.azure.ai.agents.models.RealtimeServerEvent":"OpenAI.RealtimeServerEvent","com.azure.ai.agents.models.RealtimeServerEventType":"OpenAI.RealtimeServerEventType","com.azure.ai.agents.models.RealtimeServerVadTurnDetection":"OpenAI.RealtimeTurnDetectionServerVad","com.azure.ai.agents.models.RealtimeSessionAudioConfiguration":"OpenAI.RealtimeSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeSessionAudioInput":"OpenAI.RealtimeSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeSessionAudioOutput":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput","com.azure.ai.agents.models.RealtimeSessionConfiguration":"OpenAI.RealtimeSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeSessionConfigurationBase":"OpenAI.RealtimeSessionCreateRequestUnion","com.azure.ai.agents.models.RealtimeSessionCreateRequestGAAudioOutputVoice":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput.voice.anonymous","com.azure.ai.agents.models.RealtimeSessionCreatedEvent":"OpenAI.RealtimeServerEventSessionCreated","com.azure.ai.agents.models.RealtimeSessionTracingConfiguration":"OpenAI.RealtimeSessionCreateRequestGATracing","com.azure.ai.agents.models.RealtimeSessionType":"OpenAI.RealtimeSessionCreateRequestUnionType","com.azure.ai.agents.models.RealtimeSessionUpdateEvent":"OpenAI.RealtimeClientEventSessionUpdate","com.azure.ai.agents.models.RealtimeSessionUpdatedEvent":"OpenAI.RealtimeServerEventSessionUpdated","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioInput":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeTranscriptionSessionConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeTurnDetection":"OpenAI.RealtimeTurnDetection","com.azure.ai.agents.models.RealtimeTurnDetectionType":"OpenAI.RealtimeTurnDetectionType","com.azure.ai.agents.models.ReminderPreviewToolboxTool":"Azure.AI.Projects.ReminderPreviewToolboxTool","com.azure.ai.agents.models.ResponseFormatJsonSchemaInner":"OpenAI.ResponseFormatJsonSchemaSchema","com.azure.ai.agents.models.ResponseUsageInputTokensDetails":"OpenAI.ResponseUsageInputTokensDetails","com.azure.ai.agents.models.ResponseUsageOutputTokensDetails":"OpenAI.ResponseUsageOutputTokensDetails","com.azure.ai.agents.models.ResponsesProtocolConfiguration":"Azure.AI.Projects.ResponsesProtocolConfiguration","com.azure.ai.agents.models.RoutingConfiguration":"Azure.AI.Projects.RoutingConfiguration","com.azure.ai.agents.models.RoutingTraceEntry":"Azure.AI.Projects.RoutingTraceEntry","com.azure.ai.agents.models.SearchContentType":"OpenAI.SearchContentType","com.azure.ai.agents.models.SearchContextSize":"SearchContextSizeExpandable","com.azure.ai.agents.models.SessionAffinityConfiguration":"Azure.AI.Projects.SessionAffinityConfiguration","com.azure.ai.agents.models.SessionAffinityDecision":"Azure.AI.Projects.SessionAffinityDecision","com.azure.ai.agents.models.SessionAffinityDetails":"Azure.AI.Projects.SessionAffinityDetails","com.azure.ai.agents.models.SessionAffinityMode":"Azure.AI.Projects.SessionAffinityMode","com.azure.ai.agents.models.SessionAffinityRequestMode":"Azure.AI.Projects.SessionAffinityRequestMode","com.azure.ai.agents.models.SessionAffinitySource":"Azure.AI.Projects.SessionAffinitySource","com.azure.ai.agents.models.SessionConfiguration":"Azure.AI.Projects.SessionConfiguration","com.azure.ai.agents.models.SessionDirectoryEntry":"Azure.AI.Projects.SessionDirectoryEntry","com.azure.ai.agents.models.SessionFileWriteResult":"Azure.AI.Projects.SessionFileWriteResponse","com.azure.ai.agents.models.SessionLogEvent":"Azure.AI.Projects.SessionLogEvent","com.azure.ai.agents.models.SessionLogEventType":"Azure.AI.Projects.SessionLogEventType","com.azure.ai.agents.models.SharepointGroundingToolCall":"Azure.AI.Projects.SharepointGroundingToolCall","com.azure.ai.agents.models.SharepointGroundingToolCallOutput":"Azure.AI.Projects.SharepointGroundingToolCallOutput","com.azure.ai.agents.models.SharepointGroundingToolParameters":"Azure.AI.Projects.SharepointGroundingToolParameters","com.azure.ai.agents.models.SharepointPreviewTool":"Azure.AI.Projects.SharepointPreviewTool","com.azure.ai.agents.models.ShellToolboxTool":"Azure.AI.Projects.ShellToolboxTool","com.azure.ai.agents.models.SipTelephonyTransferDestination":"Azure.AI.Projects.SipTelephonyTransferDestination","com.azure.ai.agents.models.SkillReference":"Azure.AI.Projects.SkillReference","com.azure.ai.agents.models.SkillReferenceParameter":"OpenAI.SkillReferenceParam","com.azure.ai.agents.models.SteeringPromptOptimizationContext":"Azure.AI.Projects.SteeringPromptOptimizationContext","com.azure.ai.agents.models.StructuredInputDefinition":"Azure.AI.Projects.StructuredInputDefinition","com.azure.ai.agents.models.StructuredOutputDefinition":"Azure.AI.Projects.StructuredOutputDefinition","com.azure.ai.agents.models.TargetAttribute":"Azure.AI.Projects.TargetAttribute","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBinding":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBinding","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBindingListItem":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBindingListItem","com.azure.ai.agents.models.TeamsTelephonyTransferDestination":"Azure.AI.Projects.TeamsTelephonyTransferDestination","com.azure.ai.agents.models.TelemetryConfig":"Azure.AI.Projects.TelemetryConfig","com.azure.ai.agents.models.TelemetryDataKind":"Azure.AI.Projects.TelemetryDataKind","com.azure.ai.agents.models.TelemetryEndpoint":"Azure.AI.Projects.TelemetryEndpoint","com.azure.ai.agents.models.TelemetryEndpointAuth":"Azure.AI.Projects.TelemetryEndpointAuth","com.azure.ai.agents.models.TelemetryEndpointAuthType":"Azure.AI.Projects.TelemetryEndpointAuthType","com.azure.ai.agents.models.TelemetryEndpointKind":"Azure.AI.Projects.TelemetryEndpointKind","com.azure.ai.agents.models.TelemetryTransportProtocol":"Azure.AI.Projects.TelemetryTransportProtocol","com.azure.ai.agents.models.TelephonyBinding":"Azure.AI.Projects.TelephonyBinding","com.azure.ai.agents.models.TelephonyBindingListItem":"Azure.AI.Projects.TelephonyBindingListItem","com.azure.ai.agents.models.TelephonyBindingStatus":"Azure.AI.Projects.TelephonyBindingStatus","com.azure.ai.agents.models.TelephonyCallDurationBasis":"Azure.AI.Projects.TelephonyCallDurationBasis","com.azure.ai.agents.models.TelephonyCallEndReason":"Azure.AI.Projects.TelephonyCallEndReason","com.azure.ai.agents.models.TelephonyCallJob":"Azure.AI.Projects.TelephonyCallJob","com.azure.ai.agents.models.TelephonyCallJobCancellation":"Azure.AI.Projects.TelephonyCallJobCancellation","com.azure.ai.agents.models.TelephonyCallJobSchedule":"Azure.AI.Projects.TelephonyCallJobSchedule","com.azure.ai.agents.models.TelephonyCallJobStatus":"Azure.AI.Projects.TelephonyCallJobStatus","com.azure.ai.agents.models.TelephonyCallJobTerminalReason":"Azure.AI.Projects.TelephonyCallJobTerminalReason","com.azure.ai.agents.models.TelephonyCallLifecycleEvent":"Azure.AI.Projects.TelephonyCallLifecycleEvent","com.azure.ai.agents.models.TelephonyCallLifecycleEventName":"Azure.AI.Projects.TelephonyCallLifecycleEventName","com.azure.ai.agents.models.TelephonyCallLifecycleEventOutcome":"Azure.AI.Projects.TelephonyCallLifecycleEventOutcome","com.azure.ai.agents.models.TelephonyCallLifecycleEventReason":"Azure.AI.Projects.TelephonyCallLifecycleEventReason","com.azure.ai.agents.models.TelephonyCallLifecycleEventSource":"Azure.AI.Projects.TelephonyCallLifecycleEventSource","com.azure.ai.agents.models.TelephonyCallPhase":"Azure.AI.Projects.TelephonyCallPhase","com.azure.ai.agents.models.TelephonyCallRecord":"Azure.AI.Projects.TelephonyCallRecord","com.azure.ai.agents.models.TelephonyCallStatus":"Azure.AI.Projects.TelephonyCallStatus","com.azure.ai.agents.models.TelephonyCallSummary":"Azure.AI.Projects.TelephonyCallSummary","com.azure.ai.agents.models.TelephonyCallTimestampSource":"Azure.AI.Projects.TelephonyCallTimestampSource","com.azure.ai.agents.models.TelephonyCallTiming":"Azure.AI.Projects.TelephonyCallTiming","com.azure.ai.agents.models.TelephonyCallTrace":"Azure.AI.Projects.TelephonyCallTrace","com.azure.ai.agents.models.TelephonyCallTraceMode":"Azure.AI.Projects.TelephonyCallTraceMode","com.azure.ai.agents.models.TelephonyCallTraceStatus":"Azure.AI.Projects.TelephonyCallTraceStatus","com.azure.ai.agents.models.TelephonyOutboundDestination":"Azure.AI.Projects.TelephonyOutboundDestination","com.azure.ai.agents.models.TelephonyOutboundDestinationType":"Azure.AI.Projects.TelephonyOutboundDestinationType","com.azure.ai.agents.models.TelephonyOutboundFixedIntervalRetryPolicy":"Azure.AI.Projects.TelephonyOutboundFixedIntervalRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicy":"Azure.AI.Projects.TelephonyOutboundRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicyType":"Azure.AI.Projects.TelephonyOutboundRetryPolicyType","com.azure.ai.agents.models.TelephonyProvider":"Azure.AI.Projects.TelephonyProvider","com.azure.ai.agents.models.TelephonyTransferDestination":"Azure.AI.Projects.TelephonyTransferDestination","com.azure.ai.agents.models.TelephonyTransferDestinationKind":"Azure.AI.Projects.TelephonyTransferDestinationKind","com.azure.ai.agents.models.TelephonyTransferTarget":"Azure.AI.Projects.TelephonyTransferTarget","com.azure.ai.agents.models.TelephonyTransferTargets":"Azure.AI.Projects.TelephonyTransferTargets","com.azure.ai.agents.models.TextResponseFormatConfiguration":"OpenAI.TextResponseFormatConfiguration","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatJsonObject":"OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatText":"OpenAI.TextResponseFormatConfigurationResponseFormatText","com.azure.ai.agents.models.TextResponseFormatConfigurationType":"OpenAI.TextResponseFormatConfigurationType","com.azure.ai.agents.models.TextResponseFormatJsonSchema":"OpenAI.TextResponseFormatJsonSchema","com.azure.ai.agents.models.Tool":"OpenAI.Tool","com.azure.ai.agents.models.ToolCallStatus":"Azure.AI.Projects.ToolCallStatus","com.azure.ai.agents.models.ToolConfig":"Azure.AI.Projects.ToolConfig","com.azure.ai.agents.models.ToolProjectConnection":"Azure.AI.Projects.ToolProjectConnection","com.azure.ai.agents.models.ToolSearchExecutionType":"OpenAI.ToolSearchExecutionType","com.azure.ai.agents.models.ToolSearchTool":"OpenAI.ToolSearchToolParam","com.azure.ai.agents.models.ToolSearchToolboxTool":"Azure.AI.Projects.ToolSearchToolboxTool","com.azure.ai.agents.models.ToolType":"OpenAI.ToolType","com.azure.ai.agents.models.ToolboxDetails":"Azure.AI.Projects.ToolboxObject","com.azure.ai.agents.models.ToolboxPolicies":"Azure.AI.Projects.ToolboxPolicies","com.azure.ai.agents.models.ToolboxSearchPreviewToolboxTool":"Azure.AI.Projects.ToolboxSearchPreviewToolboxTool","com.azure.ai.agents.models.ToolboxShellContainerAutoEnvironment":"Azure.AI.Projects.ToolboxShellContainerAutoEnvironment","com.azure.ai.agents.models.ToolboxShellContainerReferenceEnvironment":"Azure.AI.Projects.ToolboxShellContainerReferenceEnvironment","com.azure.ai.agents.models.ToolboxShellEnvironment":"Azure.AI.Projects.ToolboxShellEnvironment","com.azure.ai.agents.models.ToolboxShellNetworkPolicy":"Azure.AI.Projects.ToolboxShellNetworkPolicy","com.azure.ai.agents.models.ToolboxShellNetworkPolicyDisabled":"Azure.AI.Projects.ToolboxShellNetworkPolicyDisabled","com.azure.ai.agents.models.ToolboxSkill":"Azure.AI.Projects.ToolboxSkill","com.azure.ai.agents.models.ToolboxSkillReference":"Azure.AI.Projects.ToolboxSkillReference","com.azure.ai.agents.models.ToolboxTool":"Azure.AI.Projects.ToolboxTool","com.azure.ai.agents.models.ToolboxToolType":"Azure.AI.Projects.ToolboxToolType","com.azure.ai.agents.models.ToolboxVersionDetails":"Azure.AI.Projects.ToolboxVersionObject","com.azure.ai.agents.models.ToolboxVersions":"Azure.AI.Projects.ToolboxVersions","com.azure.ai.agents.models.TranscriptTextInputTokenDetails":"OpenAI.TranscriptTextUsageTokensInputTokenDetails","com.azure.ai.agents.models.TranscriptTextUsage":"OpenAI.CreateTranscriptionResponseJsonUsage","com.azure.ai.agents.models.TranscriptTextUsageDuration":"OpenAI.TranscriptTextUsageDuration","com.azure.ai.agents.models.TranscriptTextUsageTokens":"OpenAI.TranscriptTextUsageTokens","com.azure.ai.agents.models.TranscriptTextUsageType":"OpenAI.CreateTranscriptionResponseJsonUsageType","com.azure.ai.agents.models.TranscriptionLanguage":"OpenAI.TranscriptionLanguage","com.azure.ai.agents.models.TwilioTelephonyBinding":"Azure.AI.Projects.TwilioTelephonyBinding","com.azure.ai.agents.models.TwilioTelephonyBindingListItem":"Azure.AI.Projects.TwilioTelephonyBindingListItem","com.azure.ai.agents.models.UpdateAgentDetailsOptions":"Azure.AI.Projects.patchAgentObject.Request.anonymous","com.azure.ai.agents.models.UpdateTelephonyBindingInput":"Azure.AI.Projects.UpdateTelephonyBindingRequest","com.azure.ai.agents.models.UserConversationSimulationAudioEffect":"Azure.AI.Projects.UserConversationSimulationAudioEffect","com.azure.ai.agents.models.UserConversationSimulationAudioEffectsConfiguration":"Azure.AI.Projects.UserConversationSimulationAudioEffectsConfiguration","com.azure.ai.agents.models.UserConversationSimulationConfiguration":"Azure.AI.Projects.UserConversationSimulationConfiguration","com.azure.ai.agents.models.UserConversationSimulationDefaultInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationDefaultInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationTestCase":"Azure.AI.Projects.UserConversationSimulationTestCase","com.azure.ai.agents.models.UserConversationSimulationUserBehaviorConfiguration":"Azure.AI.Projects.UserConversationSimulationUserBehaviorConfiguration","com.azure.ai.agents.models.UserProfileMemoryItem":"Azure.AI.Projects.UserProfileMemoryItem","com.azure.ai.agents.models.VersionIndicator":"Azure.AI.Projects.VersionIndicator","com.azure.ai.agents.models.VersionIndicatorType":"Azure.AI.Projects.VersionIndicatorType","com.azure.ai.agents.models.VersionRefIndicator":"Azure.AI.Projects.VersionRefIndicator","com.azure.ai.agents.models.VersionSelectionRule":"Azure.AI.Projects.VersionSelectionRule","com.azure.ai.agents.models.VersionSelector":"Azure.AI.Projects.VersionSelector","com.azure.ai.agents.models.VersionSelectorType":"Azure.AI.Projects.VersionSelectorType","com.azure.ai.agents.models.VoiceAgentAnimationConfiguration":"Azure.AI.Projects.VoiceAgentAnimationConfig","com.azure.ai.agents.models.VoiceAgentAnimationOutputType":"Azure.AI.Projects.VoiceAgentAnimationOutputType","com.azure.ai.agents.models.VoiceAgentAudioConfiguration":"Azure.AI.Projects.VoiceAgentAudioConfig","com.azure.ai.agents.models.VoiceAgentAudioInputConfiguration":"Azure.AI.Projects.VoiceAgentAudioInputConfig","com.azure.ai.agents.models.VoiceAgentAudioOutputConfiguration":"Azure.AI.Projects.VoiceAgentAudioOutputConfig","com.azure.ai.agents.models.VoiceAgentAudioTimestampType":"Azure.AI.Projects.VoiceAgentAudioTimestampType","com.azure.ai.agents.models.VoiceAgentAvatarConfiguration":"Azure.AI.Projects.VoiceAgentAvatarConfig","com.azure.ai.agents.models.VoiceAgentAvatarIceServer":"Azure.AI.Projects.VoiceAgentAvatarIceServer","com.azure.ai.agents.models.VoiceAgentAvatarOutputProtocol":"Azure.AI.Projects.VoiceAgentAvatarOutputProtocol","com.azure.ai.agents.models.VoiceAgentAvatarScene":"Azure.AI.Projects.VoiceAgentAvatarScene","com.azure.ai.agents.models.VoiceAgentAvatarType":"Azure.AI.Projects.VoiceAgentAvatarType","com.azure.ai.agents.models.VoiceAgentAvatarVideoBackground":"Azure.AI.Projects.VoiceAgentAvatarVideoBackground","com.azure.ai.agents.models.VoiceAgentAvatarVideoCrop":"Azure.AI.Projects.VoiceAgentAvatarVideoCrop","com.azure.ai.agents.models.VoiceAgentAvatarVideoParameters":"Azure.AI.Projects.VoiceAgentAvatarVideoParams","com.azure.ai.agents.models.VoiceAgentAvatarVideoResolution":"Azure.AI.Projects.VoiceAgentAvatarVideoResolution","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadEnglishTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadEnTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadMultilingualTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadMultilingualTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentDefinition":"Azure.AI.Projects.VoiceAgentDefinition","com.azure.ai.agents.models.VoiceAgentEchoCancellation":"Azure.AI.Projects.VoiceAgentEchoCancellation","com.azure.ai.agents.models.VoiceAgentEchoCancellationReferenceSource":"Azure.AI.Projects.VoiceAgentEchoCancellationReferenceSource","com.azure.ai.agents.models.VoiceAgentEndConversationSystemTool":"Azure.AI.Projects.VoiceAgentEndConversationSystemTool","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetection":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetection","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetectionModel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetectionModel","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceThresholdLevel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceThresholdLevel","com.azure.ai.agents.models.VoiceAgentFunctionTool":"Azure.AI.Projects.VoiceAgentFunctionTool","com.azure.ai.agents.models.VoiceAgentFunctionToolType1":null,"com.azure.ai.agents.models.VoiceAgentGreetingConfiguration":"Azure.AI.Projects.VoiceAgentGreetingConfig","com.azure.ai.agents.models.VoiceAgentInputTranscription":"Azure.AI.Projects.VoiceAgentInputTranscription","com.azure.ai.agents.models.VoiceAgentInputTranscriptionModel":"Azure.AI.Projects.VoiceAgentInputTranscriptionModel","com.azure.ai.agents.models.VoiceAgentInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentInterimResponseTrigger":"Azure.AI.Projects.VoiceAgentInterimResponseTrigger","com.azure.ai.agents.models.VoiceAgentLlmGeneratedGreetingConfiguration":"Azure.AI.Projects.VoiceAgentLlmGeneratedGreetingConfig","com.azure.ai.agents.models.VoiceAgentLlmInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentLlmInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentMcpTool":"Azure.AI.Projects.VoiceAgentMcpTool","com.azure.ai.agents.models.VoiceAgentNoiseReduction":"Azure.AI.Projects.VoiceAgentNoiseReduction","com.azure.ai.agents.models.VoiceAgentNoiseReductionType":"Azure.AI.Projects.VoiceAgentNoiseReductionType","com.azure.ai.agents.models.VoiceAgentRealtimeResponse":"Azure.AI.Projects.VoiceAgentRealtimeResponse","com.azure.ai.agents.models.VoiceAgentRealtimeResponseBase":"Azure.AI.Projects.VoiceAgentRealtimeResponseBase","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDone","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDone","com.azure.ai.agents.models.VoiceAgentResponseAudioConfig":"TypeSpec.PickProperties","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDelta","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDone","com.azure.ai.agents.models.VoiceAgentResponseCreateOptions":"Azure.AI.Projects.VoiceAgentResponseCreateParams","com.azure.ai.agents.models.VoiceAgentResponseVideoDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseVideoDelta","com.azure.ai.agents.models.VoiceAgentRtcCallErrorDetails":"Azure.AI.Projects.VoiceAgentRtcCallErrorDetails","com.azure.ai.agents.models.VoiceAgentRtcCallErrorEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallError","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreateEvent":"Azure.AI.Projects.VoiceAgentClientEventRtcCallSdpCreate","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreatedEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallSdpCreated","com.azure.ai.agents.models.VoiceAgentSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentServerVadTurnDetection":"Azure.AI.Projects.VoiceAgentServerVadTurnDetection","com.azure.ai.agents.models.VoiceAgentSessionAvatarConfiguration":"Azure.AI.Projects.VoiceAgentSessionAvatarConfig","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectEvent":"Azure.AI.Projects.VoiceAgentClientEventSessionAvatarConnect","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarConnecting","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToIdleEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToIdle","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToSpeakingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToSpeaking","com.azure.ai.agents.models.VoiceAgentSessionIncludeOption":"Azure.AI.Projects.VoiceAgentSessionIncludeOption","com.azure.ai.agents.models.VoiceAgentSessionResponseConfiguration":"Azure.AI.Projects.VoiceAgentSessionResponseConfig","com.azure.ai.agents.models.VoiceAgentSessionSubagentAbortedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentAborted","com.azure.ai.agents.models.VoiceAgentSessionSubagentCompletedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentCompleted","com.azure.ai.agents.models.VoiceAgentSessionSubagentStartedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentStarted","com.azure.ai.agents.models.VoiceAgentSessionUpdateConfiguration":"Azure.AI.Projects.VoiceAgentSessionUpdateConfig","com.azure.ai.agents.models.VoiceAgentStaticInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentStaticInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentSubagent":"Azure.AI.Projects.VoiceAgentSubagent","com.azure.ai.agents.models.VoiceAgentSubagentAbortReason":"Azure.AI.Projects.VoiceAgentSubagentAbortReason","com.azure.ai.agents.models.VoiceAgentSubagentConfiguration":"Azure.AI.Projects.VoiceAgentSubagentConfig","com.azure.ai.agents.models.VoiceAgentSubagentResponsePolicy":"Azure.AI.Projects.VoiceAgentSubagentResponsePolicy","com.azure.ai.agents.models.VoiceAgentSystemTool":"Azure.AI.Projects.VoiceAgentSystemTool","com.azure.ai.agents.models.VoiceAgentSystemToolName":"Azure.AI.Projects.VoiceAgentSystemToolName","com.azure.ai.agents.models.VoiceAgentTemplateGreetingConfiguration":"Azure.AI.Projects.VoiceAgentTemplateGreetingConfig","com.azure.ai.agents.models.VoiceAgentTool":"Azure.AI.Projects.VoiceAgentTool","com.azure.ai.agents.models.VoiceAgentToolResponseScheduling":"Azure.AI.Projects.VoiceAgentToolResponseScheduling","com.azure.ai.agents.models.VoiceAgentToolboxTool":"Azure.AI.Projects.VoiceAgentToolboxTool","com.azure.ai.agents.models.VoiceAgentTranscriptionPhrase":"Azure.AI.Projects.VoiceAgentTranscriptionPhrase","com.azure.ai.agents.models.VoiceAgentTranscriptionWord":"Azure.AI.Projects.VoiceAgentTranscriptionWord","com.azure.ai.agents.models.VoiceAgentTransport":"Azure.AI.Projects.VoiceAgentTransport","com.azure.ai.agents.models.VoiceAgentTurnDetectionConfiguration":"Azure.AI.Projects.VoiceAgentTurnDetectionConfig","com.azure.ai.agents.models.VoiceAgentTurnDetectionType":"Azure.AI.Projects.VoiceAgentTurnDetectionType","com.azure.ai.agents.models.VoiceAgentWarningDetails":"Azure.AI.Projects.VoiceAgentServerEventWarningDetails","com.azure.ai.agents.models.VoiceAgentWarningEvent":"Azure.AI.Projects.VoiceAgentServerEventWarning","com.azure.ai.agents.models.VoiceAudioCodec":"Azure.AI.Projects.VoiceAudioCodec","com.azure.ai.agents.models.VoiceAudioContainerFormat":"Azure.AI.Projects.VoiceAudioContainerFormat","com.azure.ai.agents.models.VoiceAudioItem":"Azure.AI.Projects.VoiceAudioItem","com.azure.ai.agents.models.VoiceAudioRole":"Azure.AI.Projects.VoiceAudioRole","com.azure.ai.agents.models.VoiceConversation":"Azure.AI.Projects.VoiceConversation","com.azure.ai.agents.models.VoiceConversationEngine":"Azure.AI.Projects.VoiceConversationEngine","com.azure.ai.agents.models.VoiceConversationStatus":"Azure.AI.Projects.VoiceConversationStatus","com.azure.ai.agents.models.VoiceGeneratedAudioItem":"Azure.AI.Projects.VoiceGeneratedAudioItem","com.azure.ai.agents.models.VoiceHostedAgentConversationEngine":"Azure.AI.Projects.VoiceHostedAgentConversationEngine","com.azure.ai.agents.models.VoiceIds":"OpenAI.VoiceIdsShared","com.azure.ai.agents.models.VoiceModelType":"Azure.AI.Projects.VoiceModelType","com.azure.ai.agents.models.VoiceOutputModality":"Azure.AI.Projects.VoiceOutputModality","com.azure.ai.agents.models.VoiceRecording":"Azure.AI.Projects.VoiceRecording","com.azure.ai.agents.models.VoiceRecordingChannelLayout":"Azure.AI.Projects.VoiceRecordingChannelLayout","com.azure.ai.agents.models.VoiceResponse":"Azure.AI.Projects.VoiceResponse","com.azure.ai.agents.models.VoiceResponseAudio":"Azure.AI.Projects.VoiceResponseAudio","com.azure.ai.agents.models.VoiceResponseAudioOutput":"Azure.AI.Projects.VoiceResponseAudioOutput","com.azure.ai.agents.models.VoiceResponseBase":"Azure.AI.Projects.VoiceResponseBase","com.azure.ai.agents.models.VoiceResponseBaseObject":null,"com.azure.ai.agents.models.VoiceType":"Azure.AI.Projects.VoiceType","com.azure.ai.agents.models.WebIqPreviewTool":"Azure.AI.Projects.WebIQPreviewTool","com.azure.ai.agents.models.WebIqPreviewToolboxTool":"Azure.AI.Projects.WebIQPreviewToolboxTool","com.azure.ai.agents.models.WebSearchApproximateLocation":"OpenAI.WebSearchApproximateLocation","com.azure.ai.agents.models.WebSearchConfiguration":"Azure.AI.Projects.WebSearchConfiguration","com.azure.ai.agents.models.WebSearchPreviewTool":"OpenAI.WebSearchPreviewTool","com.azure.ai.agents.models.WebSearchTool":"OpenAI.WebSearchTool","com.azure.ai.agents.models.WebSearchToolFilters":"OpenAI.WebSearchToolFilters","com.azure.ai.agents.models.WebSearchToolSearchContextSize":"WebSearchToolSearchContextSizeExpandable","com.azure.ai.agents.models.WebSearchToolboxTool":"Azure.AI.Projects.WebSearchToolboxTool","com.azure.ai.agents.models.WorkIqPreviewTool":"Azure.AI.Projects.WorkIQPreviewTool","com.azure.ai.agents.models.WorkIqPreviewToolboxTool":"Azure.AI.Projects.WorkIQPreviewToolboxTool","com.azure.ai.agents.models.WorkflowAgentDefinition":"Azure.AI.Projects.WorkflowAgentDefinition"},"generatedFiles":["src/main/java/com/azure/ai/agents/AgentsAsyncClient.java","src/main/java/com/azure/ai/agents/AgentsClient.java","src/main/java/com/azure/ai/agents/AgentsClientBuilder.java","src/main/java/com/azure/ai/agents/AgentsServiceVersion.java","src/main/java/com/azure/ai/agents/BetaAgentsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaAgentsClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresAsyncClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java","src/main/java/com/azure/ai/agents/ToolboxesAsyncClient.java","src/main/java/com/azure/ai/agents/ToolboxesClient.java","src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java","src/main/java/com/azure/ai/agents/implementation/AgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaAgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaMemoryStoresImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java","src/main/java/com/azure/ai/agents/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/agents/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/agents/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/PollingUtils.java","src/main/java/com/azure/ai/agents/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/ToolboxesImpl.java","src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromCodeContent.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentOptions.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateSessionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateToolboxVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/GetMicrosoft365AppPackageRequest.java","src/main/java/com/azure/ai/agents/implementation/models/ListMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/PublishAgentToMicrosoft365Request.java","src/main/java/com/azure/ai/agents/implementation/models/ReplaceTelephonyTransferTargetsRequest.java","src/main/java/com/azure/ai/agents/implementation/models/SearchMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/TransferTelephonyCallRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxInput.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxRequest.java","src/main/java/com/azure/ai/agents/implementation/models/package-info.java","src/main/java/com/azure/ai/agents/implementation/package-info.java","src/main/java/com/azure/ai/agents/models/A2APreviewTool.java","src/main/java/com/azure/ai/agents/models/A2APreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/A2AProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/A2AProtocolVersion.java","src/main/java/com/azure/ai/agents/models/A2ATool.java","src/main/java/com/azure/ai/agents/models/A2AToolCall.java","src/main/java/com/azure/ai/agents/models/A2AToolCallOutput.java","src/main/java/com/azure/ai/agents/models/A2AToolboxTool.java","src/main/java/com/azure/ai/agents/models/AISearchIndexResource.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolAccessBoundary.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReference.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReferenceType.java","src/main/java/com/azure/ai/agents/models/AgentCard.java","src/main/java/com/azure/ai/agents/models/AgentCardSkill.java","src/main/java/com/azure/ai/agents/models/AgentDefinition.java","src/main/java/com/azure/ai/agents/models/AgentDetails.java","src/main/java/com/azure/ai/agents/models/AgentDetailsVersions.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationSchemeType.java","src/main/java/com/azure/ai/agents/models/AgentEndpointConfig.java","src/main/java/com/azure/ai/agents/models/AgentEndpointProtocol.java","src/main/java/com/azure/ai/agents/models/AgentHarness.java","src/main/java/com/azure/ai/agents/models/AgentIdentity.java","src/main/java/com/azure/ai/agents/models/AgentIdentityStatus.java","src/main/java/com/azure/ai/agents/models/AgentKind.java","src/main/java/com/azure/ai/agents/models/AgentObjectType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationAgentCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationBaselineAgentConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateEvaluation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateExpand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidatePromotionInfo.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateStatus.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationBase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCostEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationDataSourceType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateBand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateInputs.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSetType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluatorReference.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationFoundryAgentTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationGoal.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationInstructionsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJob.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobLatency.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobTokenUsage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationPromptCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationResultCandidateSummary.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkill.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkillsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSpace.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStageEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionTestCase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTerminationReason.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationToolsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentReference.java","src/main/java/com/azure/ai/agents/models/AgentSessionResource.java","src/main/java/com/azure/ai/agents/models/AgentSessionStatus.java","src/main/java/com/azure/ai/agents/models/AgentState.java","src/main/java/com/azure/ai/agents/models/AgentStateSource.java","src/main/java/com/azure/ai/agents/models/AgentVersionDetails.java","src/main/java/com/azure/ai/agents/models/AgentVersionStatus.java","src/main/java/com/azure/ai/agents/models/ApiError.java","src/main/java/com/azure/ai/agents/models/ApplyPatchToolParameter.java","src/main/java/com/azure/ai/agents/models/ApproximateLocation.java","src/main/java/com/azure/ai/agents/models/AudioTranscription.java","src/main/java/com/azure/ai/agents/models/AudioTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/AutoCodeInterpreterToolParameter.java","src/main/java/com/azure/ai/agents/models/AzureAISearchQueryType.java","src/main/java/com/azure/ai/agents/models/AzureAISearchTool.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCall.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolResource.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseDetails.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseOptions.java","src/main/java/com/azure/ai/agents/models/AzureFunctionBinding.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinitionDetails.java","src/main/java/com/azure/ai/agents/models/AzureFunctionStorageQueue.java","src/main/java/com/azure/ai/agents/models/AzureFunctionTool.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCall.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureUserSecurityContext.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCall.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingTool.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BotServiceAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceRbacAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceTenantAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCall.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolConnectionParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolboxTool.java","src/main/java/com/azure/ai/agents/models/CallableToolAllowedCaller.java","src/main/java/com/azure/ai/agents/models/CaptureStructuredOutputsTool.java","src/main/java/com/azure/ai/agents/models/ChatSummaryMemoryItem.java","src/main/java/com/azure/ai/agents/models/CodeConfiguration.java","src/main/java/com/azure/ai/agents/models/CodeDependencyResolution.java","src/main/java/com/azure/ai/agents/models/CodeFileDetails.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterTool.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolboxTool.java","src/main/java/com/azure/ai/agents/models/ComputerEnvironment.java","src/main/java/com/azure/ai/agents/models/ComputerTool.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewTool.java","src/main/java/com/azure/ai/agents/models/ContainerAutoParameter.java","src/main/java/com/azure/ai/agents/models/ContainerConfiguration.java","src/main/java/com/azure/ai/agents/models/ContainerMemoryLimit.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyAllowlistParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDisabledParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDomainSecretParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParamType.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParameter.java","src/main/java/com/azure/ai/agents/models/ContainerSkill.java","src/main/java/com/azure/ai/agents/models/ContainerSkillType.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeContent.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeMetadata.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionOptions.java","src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensibilityTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java","src/main/java/com/azure/ai/agents/models/CreateTwilioTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CustomGrammarFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomTextFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormat.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormatType.java","src/main/java/com/azure/ai/agents/models/CustomToolParameter.java","src/main/java/com/azure/ai/agents/models/DigitalWorkerType.java","src/main/java/com/azure/ai/agents/models/EntraAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/EvaluationAzureStandardVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/ExternalAgentDefinition.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCall.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCallOutput.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolParameters.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/FileSearchTool.java","src/main/java/com/azure/ai/agents/models/FileSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/FixedRatioVersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironment.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironmentType.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentContainerReferenceParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentLocalEnvironmentParameter.java","src/main/java/com/azure/ai/agents/models/FunctionTool.java","src/main/java/com/azure/ai/agents/models/GetMicrosoft365AppPackageOptions.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotBuiltInTool.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotHarness.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java","src/main/java/com/azure/ai/agents/models/GrammarSyntax.java","src/main/java/com/azure/ai/agents/models/HeaderTelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/HybridSearchOptions.java","src/main/java/com/azure/ai/agents/models/ImageGenActionEnum.java","src/main/java/com/azure/ai/agents/models/ImageGenTool.java","src/main/java/com/azure/ai/agents/models/ImageGenToolBackground.java","src/main/java/com/azure/ai/agents/models/ImageGenToolInputImageMask.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModel.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModeration.java","src/main/java/com/azure/ai/agents/models/ImageGenToolOutputFormat.java","src/main/java/com/azure/ai/agents/models/ImageGenToolQuality.java","src/main/java/com/azure/ai/agents/models/ImageGenToolSize.java","src/main/java/com/azure/ai/agents/models/IncludeEnum.java","src/main/java/com/azure/ai/agents/models/InlineSkillParameter.java","src/main/java/com/azure/ai/agents/models/InlineSkillSourceParameter.java","src/main/java/com/azure/ai/agents/models/InputFidelity.java","src/main/java/com/azure/ai/agents/models/InvocationsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/InvocationsWsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/JobStatus.java","src/main/java/com/azure/ai/agents/models/ListMemoriesOptions.java","src/main/java/com/azure/ai/agents/models/LocalShellToolParameter.java","src/main/java/com/azure/ai/agents/models/LocalSkillParameter.java","src/main/java/com/azure/ai/agents/models/ManagedAgentIdentityBlueprintReference.java","src/main/java/com/azure/ai/agents/models/McpListToolsTool.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolAnnotations.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolInputSchema.java","src/main/java/com/azure/ai/agents/models/McpProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/McpTool.java","src/main/java/com/azure/ai/agents/models/McpToolConnectorId.java","src/main/java/com/azure/ai/agents/models/McpToolFilter.java","src/main/java/com/azure/ai/agents/models/McpToolRequireApproval.java","src/main/java/com/azure/ai/agents/models/McpToolboxTool.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCallOutput.java","src/main/java/com/azure/ai/agents/models/MemoryItem.java","src/main/java/com/azure/ai/agents/models/MemoryItemKind.java","src/main/java/com/azure/ai/agents/models/MemoryOperation.java","src/main/java/com/azure/ai/agents/models/MemoryOperationKind.java","src/main/java/com/azure/ai/agents/models/MemorySearchItem.java","src/main/java/com/azure/ai/agents/models/MemorySearchOptions.java","src/main/java/com/azure/ai/agents/models/MemorySearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/MemorySearchToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultOptions.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreKind.java","src/main/java/com/azure/ai/agents/models/MemoryStoreObjectType.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsage.java","src/main/java/com/azure/ai/agents/models/MemoryStoreSearchResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateCompletedResult.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateStatus.java","src/main/java/com/azure/ai/agents/models/Microsoft365PermissionScopes.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishDefaults.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishResult.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishScope.java","src/main/java/com/azure/ai/agents/models/MicrosoftFabricPreviewTool.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttempt.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptError.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptResult.java","src/main/java/com/azure/ai/agents/models/ModelRouterDetails.java","src/main/java/com/azure/ai/agents/models/ModelRouterMode.java","src/main/java/com/azure/ai/agents/models/ModelSamplingParameters.java","src/main/java/com/azure/ai/agents/models/ModelSelectionDetails.java","src/main/java/com/azure/ai/agents/models/NamespaceTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAnonymousAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthType.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiTool.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCall.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCallOutput.java","src/main/java/com/azure/ai/agents/models/OpenApiToolboxTool.java","src/main/java/com/azure/ai/agents/models/OptimizationContext.java","src/main/java/com/azure/ai/agents/models/OptimizationContextType.java","src/main/java/com/azure/ai/agents/models/OtlpTelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/PageOrder.java","src/main/java/com/azure/ai/agents/models/ProceduralMemoryItem.java","src/main/java/com/azure/ai/agents/models/ProgrammaticToolCallingParameter.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinitionTextOptions.java","src/main/java/com/azure/ai/agents/models/PromptOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolVersionRecord.java","src/main/java/com/azure/ai/agents/models/PstnTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/PublishAgentToMicrosoft365Options.java","src/main/java/com/azure/ai/agents/models/PublishApprovalStatus.java","src/main/java/com/azure/ai/agents/models/RaiConfig.java","src/main/java/com/azure/ai/agents/models/RaiInvocationContentType.java","src/main/java/com/azure/ai/agents/models/RaiInvocationModeration.java","src/main/java/com/azure/ai/agents/models/RaiInvocationResponseMode.java","src/main/java/com/azure/ai/agents/models/RaiSseTextSelector.java","src/main/java/com/azure/ai/agents/models/RankerVersionType.java","src/main/java/com/azure/ai/agents/models/RankingOptions.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormatType.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItem.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAssistantMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeleteEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCall.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCallOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionSegmentEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessageType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemObjectType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrieveEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrievedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemSystemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemUserMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeErrorEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferAppendEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommitEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommittedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferDtmfReceivedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferTimeoutTriggeredEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalInput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpErrorType.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpHttpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListTools.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpProtocolError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolCall.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolExecutionError.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimePcmAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmaAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmuAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeRateLimitsUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCancelEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPart.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfigurationBase.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreateRequestGAAudioOutputVoice.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionTracingConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionType.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/ReminderPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ResponseFormatJsonSchemaInner.java","src/main/java/com/azure/ai/agents/models/ResponseUsageInputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponseUsageOutputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponsesProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingTraceEntry.java","src/main/java/com/azure/ai/agents/models/SearchContentType.java","src/main/java/com/azure/ai/agents/models/SearchContextSize.java","src/main/java/com/azure/ai/agents/models/SessionAffinityConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDecision.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDetails.java","src/main/java/com/azure/ai/agents/models/SessionAffinityMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinityRequestMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinitySource.java","src/main/java/com/azure/ai/agents/models/SessionConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionDirectoryEntry.java","src/main/java/com/azure/ai/agents/models/SessionFileWriteResult.java","src/main/java/com/azure/ai/agents/models/SessionLogEvent.java","src/main/java/com/azure/ai/agents/models/SessionLogEventType.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolParameters.java","src/main/java/com/azure/ai/agents/models/SharepointPreviewTool.java","src/main/java/com/azure/ai/agents/models/ShellToolboxTool.java","src/main/java/com/azure/ai/agents/models/SipTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/SkillReference.java","src/main/java/com/azure/ai/agents/models/SkillReferenceParameter.java","src/main/java/com/azure/ai/agents/models/SteeringPromptOptimizationContext.java","src/main/java/com/azure/ai/agents/models/StructuredInputDefinition.java","src/main/java/com/azure/ai/agents/models/StructuredOutputDefinition.java","src/main/java/com/azure/ai/agents/models/TargetAttribute.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TeamsTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelemetryConfig.java","src/main/java/com/azure/ai/agents/models/TelemetryDataKind.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuthType.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointKind.java","src/main/java/com/azure/ai/agents/models/TelemetryTransportProtocol.java","src/main/java/com/azure/ai/agents/models/TelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallDurationBasis.java","src/main/java/com/azure/ai/agents/models/TelephonyCallEndReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobCancellation.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobSchedule.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobTerminalReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEvent.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventName.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventOutcome.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallPhase.java","src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java","src/main/java/com/azure/ai/agents/models/TelephonyCallStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallSummary.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTimestampSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTiming.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTrace.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceMode.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestinationType.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundFixedIntervalRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicyType.java","src/main/java/com/azure/ai/agents/models/TelephonyProvider.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestinationKind.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTarget.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTargets.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfiguration.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatJsonObject.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatText.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationType.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatJsonSchema.java","src/main/java/com/azure/ai/agents/models/Tool.java","src/main/java/com/azure/ai/agents/models/ToolCallStatus.java","src/main/java/com/azure/ai/agents/models/ToolConfig.java","src/main/java/com/azure/ai/agents/models/ToolProjectConnection.java","src/main/java/com/azure/ai/agents/models/ToolSearchExecutionType.java","src/main/java/com/azure/ai/agents/models/ToolSearchTool.java","src/main/java/com/azure/ai/agents/models/ToolSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxPolicies.java","src/main/java/com/azure/ai/agents/models/ToolboxSearchPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerAutoEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerReferenceEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicy.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicyDisabled.java","src/main/java/com/azure/ai/agents/models/ToolboxSkill.java","src/main/java/com/azure/ai/agents/models/ToolboxSkillReference.java","src/main/java/com/azure/ai/agents/models/ToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxVersionDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxVersions.java","src/main/java/com/azure/ai/agents/models/TranscriptTextInputTokenDetails.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsage.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageDuration.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageTokens.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageType.java","src/main/java/com/azure/ai/agents/models/TranscriptionLanguage.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/UpdateAgentDetailsOptions.java","src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffect.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffectsConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationDefaultInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationTestCase.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationUserBehaviorConfiguration.java","src/main/java/com/azure/ai/agents/models/UserProfileMemoryItem.java","src/main/java/com/azure/ai/agents/models/VersionIndicator.java","src/main/java/com/azure/ai/agents/models/VersionIndicatorType.java","src/main/java/com/azure/ai/agents/models/VersionRefIndicator.java","src/main/java/com/azure/ai/agents/models/VersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/VersionSelector.java","src/main/java/com/azure/ai/agents/models/VersionSelectorType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationOutputType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioInputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioOutputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioTimestampType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarIceServer.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarOutputProtocol.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarScene.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoBackground.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoCrop.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoParameters.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoResolution.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadEnglishTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadMultilingualTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentDefinition.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellation.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellationReferenceSource.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndConversationSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetectionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceThresholdLevel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionToolType1.java","src/main/java/com/azure/ai/agents/models/VoiceAgentGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscription.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseTrigger.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmGeneratedGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReduction.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReductionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseBase.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioConfig.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseVideoDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreateEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreatedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToIdleEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToSpeakingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionIncludeOption.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentAbortedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentCompletedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentStartedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionUpdateConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentStaticInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentAbortReason.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentResponsePolicy.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemToolName.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTemplateGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolResponseScheduling.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolboxTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionPhrase.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionWord.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTransport.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAudioCodec.java","src/main/java/com/azure/ai/agents/models/VoiceAudioContainerFormat.java","src/main/java/com/azure/ai/agents/models/VoiceAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceAudioRole.java","src/main/java/com/azure/ai/agents/models/VoiceConversation.java","src/main/java/com/azure/ai/agents/models/VoiceConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceConversationStatus.java","src/main/java/com/azure/ai/agents/models/VoiceGeneratedAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceHostedAgentConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceIds.java","src/main/java/com/azure/ai/agents/models/VoiceModelType.java","src/main/java/com/azure/ai/agents/models/VoiceOutputModality.java","src/main/java/com/azure/ai/agents/models/VoiceRecording.java","src/main/java/com/azure/ai/agents/models/VoiceRecordingChannelLayout.java","src/main/java/com/azure/ai/agents/models/VoiceResponse.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudio.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudioOutput.java","src/main/java/com/azure/ai/agents/models/VoiceResponseBase.java","src/main/java/com/azure/ai/agents/models/VoiceResponseBaseObject.java","src/main/java/com/azure/ai/agents/models/VoiceType.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WebSearchApproximateLocation.java","src/main/java/com/azure/ai/agents/models/WebSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebSearchTool.java","src/main/java/com/azure/ai/agents/models/WebSearchToolFilters.java","src/main/java/com/azure/ai/agents/models/WebSearchToolSearchContextSize.java","src/main/java/com/azure/ai/agents/models/WebSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkflowAgentDefinition.java","src/main/java/com/azure/ai/agents/models/package-info.java","src/main/java/com/azure/ai/agents/package-info.java","src/main/java/module-info.java"]}
\ No newline at end of file
+{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"da8670faffc9","crossLanguageDefinitions":{"com.azure.ai.agents.AgentsAsyncClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsAsyncClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsAsyncClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsAsyncClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsAsyncClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsAsyncClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsAsyncClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClientBuilder":"Azure.AI.Projects","com.azure.ai.agents.BetaAgentsAsyncClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaMemoryStoresAsyncClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.ToolboxesAsyncClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesAsyncClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesAsyncClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.implementation.models.AgentDefinitionOptInKeys":"Azure.AI.Projects.AgentDefinitionOptInKeys","com.azure.ai.agents.implementation.models.CreateAgentFromCodeContent":"Azure.AI.Projects.CreateAgentFromCodeContent","com.azure.ai.agents.implementation.models.CreateAgentFromManifestRequest":"Azure.AI.Projects.createAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentOptions":null,"com.azure.ai.agents.implementation.models.CreateAgentRequest":"Azure.AI.Projects.createAgent.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionFromManifestRequest":"Azure.AI.Projects.createAgentVersionFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionRequest":"Azure.AI.Projects.createAgentVersion.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryRequest":"Azure.AI.Projects.createMemory.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryStoreRequest":"Azure.AI.Projects.createMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.CreateSessionRequest":"Azure.AI.Projects.createSession.Request.anonymous","com.azure.ai.agents.implementation.models.CreateToolboxVersionRequest":"Azure.AI.Projects.createToolboxVersion.Request.anonymous","com.azure.ai.agents.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.agents.implementation.models.GetMicrosoft365AppPackageRequest":"Azure.AI.Projects.getMicrosoft365AppPackage.Request.anonymous","com.azure.ai.agents.implementation.models.ListMemoriesRequest":"Azure.AI.Projects.listMemories.Request.anonymous","com.azure.ai.agents.implementation.models.PublishAgentToMicrosoft365Request":"Azure.AI.Projects.publishAgentToMicrosoft365.Request.anonymous","com.azure.ai.agents.implementation.models.ReplaceTelephonyTransferTargetsRequest":"Azure.AI.Projects.replaceTelephonyTransferTargets.Request.anonymous","com.azure.ai.agents.implementation.models.SearchMemoriesRequest":"Azure.AI.Projects.searchMemories.Request.anonymous","com.azure.ai.agents.implementation.models.TransferTelephonyCallRequest":"Azure.AI.Projects.transferTelephonyCall.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest":"Azure.AI.Projects.updateAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentRequest":"Azure.AI.Projects.updateAgent.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoriesRequest":"Azure.AI.Projects.updateMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryRequest":"Azure.AI.Projects.updateMemory.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryStoreRequest":"Azure.AI.Projects.updateMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateToolboxInput":"Azure.AI.Projects.UpdateToolboxRequest","com.azure.ai.agents.implementation.models.UpdateToolboxRequest":"Azure.AI.Projects.updateToolbox.Request.anonymous","com.azure.ai.agents.models.A2APreviewTool":"Azure.AI.Projects.A2APreviewTool","com.azure.ai.agents.models.A2APreviewToolboxTool":"Azure.AI.Projects.A2APreviewToolboxTool","com.azure.ai.agents.models.A2AProtocolConfiguration":"Azure.AI.Projects.A2AProtocolConfiguration","com.azure.ai.agents.models.A2AProtocolVersion":"Azure.AI.Projects.A2AProtocolVersion","com.azure.ai.agents.models.A2ATool":"Azure.AI.Projects.A2ATool","com.azure.ai.agents.models.A2AToolCall":"Azure.AI.Projects.A2AToolCall","com.azure.ai.agents.models.A2AToolCallOutput":"Azure.AI.Projects.A2AToolCallOutput","com.azure.ai.agents.models.A2AToolboxTool":"Azure.AI.Projects.A2AToolboxTool","com.azure.ai.agents.models.AISearchIndexResource":"Azure.AI.Projects.AISearchIndexResource","com.azure.ai.agents.models.ActivityProtocolAccessBoundary":"Azure.AI.Projects.ActivityProtocolAccessBoundary","com.azure.ai.agents.models.ActivityProtocolConfiguration":"Azure.AI.Projects.ActivityProtocolConfiguration","com.azure.ai.agents.models.AgentBlueprintReference":"Azure.AI.Projects.AgentBlueprintReference","com.azure.ai.agents.models.AgentBlueprintReferenceType":"Azure.AI.Projects.AgentBlueprintReferenceType","com.azure.ai.agents.models.AgentCard":"Azure.AI.Projects.AgentCard","com.azure.ai.agents.models.AgentCardSkill":"Azure.AI.Projects.AgentCardSkill","com.azure.ai.agents.models.AgentDefinition":"Azure.AI.Projects.AgentDefinition","com.azure.ai.agents.models.AgentDetails":"Azure.AI.Projects.AgentObject","com.azure.ai.agents.models.AgentDetailsVersions":"Azure.AI.Projects.AgentObject.versions.anonymous","com.azure.ai.agents.models.AgentEndpointAuthorizationScheme":"Azure.AI.Projects.AgentEndpointAuthorizationScheme","com.azure.ai.agents.models.AgentEndpointAuthorizationSchemeType":"Azure.AI.Projects.AgentEndpointAuthorizationSchemeType","com.azure.ai.agents.models.AgentEndpointConfig":"Azure.AI.Projects.AgentEndpointConfig","com.azure.ai.agents.models.AgentEndpointProtocol":"Azure.AI.Projects.AgentEndpointProtocol","com.azure.ai.agents.models.AgentHarness":"Azure.AI.Projects.AgentHarness","com.azure.ai.agents.models.AgentIdentity":"Azure.AI.Projects.AgentIdentity","com.azure.ai.agents.models.AgentIdentityStatus":"Azure.AI.Projects.AgentIdentityStatus","com.azure.ai.agents.models.AgentKind":"Azure.AI.Projects.AgentKind","com.azure.ai.agents.models.AgentObjectType":"Azure.AI.Projects.AgentObjectType","com.azure.ai.agents.models.AgentOptimizationAgentCandidateOutput":"Azure.AI.Projects.AgentOptimizationAgentCandidateOutput","com.azure.ai.agents.models.AgentOptimizationBaselineAgentConfiguration":"Azure.AI.Projects.AgentOptimizationBaselineAgentConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationCandidate","com.azure.ai.agents.models.AgentOptimizationCandidateEvaluation":"Azure.AI.Projects.AgentOptimizationCandidateEvaluation","com.azure.ai.agents.models.AgentOptimizationCandidateExpand":"Azure.AI.Projects.AgentOptimizationCandidateExpand","com.azure.ai.agents.models.AgentOptimizationCandidateOutput":"Azure.AI.Projects.AgentOptimizationCandidateOutput","com.azure.ai.agents.models.AgentOptimizationCandidatePromotionInfo":"Azure.AI.Projects.AgentOptimizationCandidatePromotionInfo","com.azure.ai.agents.models.AgentOptimizationCandidateSearchConfiguration":"Azure.AI.Projects.AgentOptimizationCandidateSearchConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidateStatus":"Azure.AI.Projects.AgentOptimizationCandidateStatus","com.azure.ai.agents.models.AgentOptimizationConfiguration":"Azure.AI.Projects.AgentOptimizationConfiguration","com.azure.ai.agents.models.AgentOptimizationConfigurationBase":"Azure.AI.Projects.AgentOptimizationConfigurationBase","com.azure.ai.agents.models.AgentOptimizationConfigurationType":"Azure.AI.Projects.AgentOptimizationConfigurationType","com.azure.ai.agents.models.AgentOptimizationCostEstimate":"Azure.AI.Projects.AgentOptimizationCostEstimate","com.azure.ai.agents.models.AgentOptimizationDataSourceType":"Azure.AI.Projects.AgentOptimizationDataSourceType","com.azure.ai.agents.models.AgentOptimizationEstimateBand":"Azure.AI.Projects.AgentOptimizationEstimateBand","com.azure.ai.agents.models.AgentOptimizationEstimateInputs":"Azure.AI.Projects.AgentOptimizationEstimateInputs","com.azure.ai.agents.models.AgentOptimizationEstimateResult":"Azure.AI.Projects.AgentOptimizationEstimateResult","com.azure.ai.agents.models.AgentOptimizationEvaluationConfiguration":"Azure.AI.Projects.AgentOptimizationEvaluationConfiguration","com.azure.ai.agents.models.AgentOptimizationEvaluationSet":"Azure.AI.Projects.AgentOptimizationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationEvaluationSetType":"Azure.AI.Projects.AgentOptimizationEvaluationSetType","com.azure.ai.agents.models.AgentOptimizationEvaluatorReference":"Azure.AI.Projects.AgentOptimizationEvaluator","com.azure.ai.agents.models.AgentOptimizationFoundryAgentTargetConfiguration":"Azure.AI.Projects.AgentOptimizationFoundryAgentTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationGoal":"Azure.AI.Projects.AgentOptimizationGoal","com.azure.ai.agents.models.AgentOptimizationInstructionsMutation":"Azure.AI.Projects.AgentOptimizationInstructionsMutation","com.azure.ai.agents.models.AgentOptimizationJob":"Azure.AI.Projects.AgentOptimizationJob","com.azure.ai.agents.models.AgentOptimizationJobLatency":"Azure.AI.Projects.AgentOptimizationJobLatency","com.azure.ai.agents.models.AgentOptimizationJobResult":"Azure.AI.Projects.AgentOptimizationJobResult","com.azure.ai.agents.models.AgentOptimizationJobTokenUsage":"Azure.AI.Projects.AgentOptimizationJobTokenUsage","com.azure.ai.agents.models.AgentOptimizationModelConfiguration":"Azure.AI.Projects.AgentOptimizationModelConfiguration","com.azure.ai.agents.models.AgentOptimizationModelMutation":"Azure.AI.Projects.AgentOptimizationModelMutation","com.azure.ai.agents.models.AgentOptimizationMutation":"Azure.AI.Projects.AgentOptimizationMutation","com.azure.ai.agents.models.AgentOptimizationPromptCandidateOutput":"Azure.AI.Projects.AgentOptimizationPromptCandidateOutput","com.azure.ai.agents.models.AgentOptimizationResultCandidateSummary":"Azure.AI.Projects.AgentOptimizationResultCandidateSummary","com.azure.ai.agents.models.AgentOptimizationSkill":"Azure.AI.Projects.AgentOptimizationSkill","com.azure.ai.agents.models.AgentOptimizationSkillsMutation":"Azure.AI.Projects.AgentOptimizationSkillsMutation","com.azure.ai.agents.models.AgentOptimizationSpace":"Azure.AI.Projects.AgentOptimizationSpace","com.azure.ai.agents.models.AgentOptimizationStage":"Azure.AI.Projects.AgentOptimizationStage","com.azure.ai.agents.models.AgentOptimizationStageEstimate":"Azure.AI.Projects.AgentOptimizationStageEstimate","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionEvaluationSet":"Azure.AI.Projects.AgentOptimizationTargetCompletionEvaluationSet","com.azure.ai.agents.models.AgentOptimizationTargetCompletionInlineDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionInlineDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionTestCase":"Azure.AI.Projects.AgentOptimizationTargetCompletionTestCase","com.azure.ai.agents.models.AgentOptimizationTargetConfiguration":"Azure.AI.Projects.AgentOptimizationTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationTargetConfigurationType":"Azure.AI.Projects.AgentOptimizationTargetConfigurationType","com.azure.ai.agents.models.AgentOptimizationTerminationReason":"Azure.AI.Projects.AgentOptimizationTerminationReason","com.azure.ai.agents.models.AgentOptimizationToolsMutation":"Azure.AI.Projects.AgentOptimizationToolsMutation","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationEvaluationSet":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationInlineDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationInlineDataSource","com.azure.ai.agents.models.AgentReference":"Azure.AI.Projects.AgentReference","com.azure.ai.agents.models.AgentSessionResource":"Azure.AI.Projects.AgentSessionResource","com.azure.ai.agents.models.AgentSessionStatus":"Azure.AI.Projects.AgentSessionStatus","com.azure.ai.agents.models.AgentState":"Azure.AI.Projects.AgentState","com.azure.ai.agents.models.AgentStateSource":"Azure.AI.Projects.AgentStateSource","com.azure.ai.agents.models.AgentVersionDetails":"Azure.AI.Projects.AgentVersionObject","com.azure.ai.agents.models.AgentVersionStatus":"Azure.AI.Projects.AgentVersionStatus","com.azure.ai.agents.models.ApiError":"OpenAI.Error","com.azure.ai.agents.models.ApplyPatchToolParameter":"OpenAI.ApplyPatchToolParam","com.azure.ai.agents.models.ApproximateLocation":"OpenAI.ApproximateLocation","com.azure.ai.agents.models.AudioTranscription":"OpenAI.AudioTranscription","com.azure.ai.agents.models.AudioTranscriptionModel":"OpenAI.AudioTranscription.model.anonymous","com.azure.ai.agents.models.AutoCodeInterpreterToolParameter":"OpenAI.AutoCodeInterpreterToolParam","com.azure.ai.agents.models.AzureAISearchQueryType":"Azure.AI.Projects.AzureAISearchQueryType","com.azure.ai.agents.models.AzureAISearchTool":"Azure.AI.Projects.AzureAISearchTool","com.azure.ai.agents.models.AzureAISearchToolCall":"Azure.AI.Projects.AzureAISearchToolCall","com.azure.ai.agents.models.AzureAISearchToolCallOutput":"Azure.AI.Projects.AzureAISearchToolCallOutput","com.azure.ai.agents.models.AzureAISearchToolResource":"Azure.AI.Projects.AzureAISearchToolResource","com.azure.ai.agents.models.AzureAISearchToolboxTool":"Azure.AI.Projects.AzureAISearchToolboxTool","com.azure.ai.agents.models.AzureCreateResponseDetails":"Azure.AI.Projects.AzureCreateResponseDetails","com.azure.ai.agents.models.AzureCreateResponseOptions":"Azure.AI.Projects.AzureCreateResponseOptions","com.azure.ai.agents.models.AzureFunctionBinding":"Azure.AI.Projects.AzureFunctionBinding","com.azure.ai.agents.models.AzureFunctionDefinition":"Azure.AI.Projects.AzureFunctionDefinition","com.azure.ai.agents.models.AzureFunctionDefinitionDetails":"Azure.AI.Projects.AzureFunctionDefinition.function.anonymous","com.azure.ai.agents.models.AzureFunctionStorageQueue":"Azure.AI.Projects.AzureFunctionStorageQueue","com.azure.ai.agents.models.AzureFunctionTool":"Azure.AI.Projects.AzureFunctionTool","com.azure.ai.agents.models.AzureFunctionToolCall":"Azure.AI.Projects.AzureFunctionToolCall","com.azure.ai.agents.models.AzureFunctionToolCallOutput":"Azure.AI.Projects.AzureFunctionToolCallOutput","com.azure.ai.agents.models.AzureUserSecurityContext":"Azure.AI.Projects.AzureUserSecurityContext","com.azure.ai.agents.models.BingCustomSearchConfiguration":"Azure.AI.Projects.BingCustomSearchConfiguration","com.azure.ai.agents.models.BingCustomSearchPreviewTool":"Azure.AI.Projects.BingCustomSearchPreviewTool","com.azure.ai.agents.models.BingCustomSearchToolCall":"Azure.AI.Projects.BingCustomSearchToolCall","com.azure.ai.agents.models.BingCustomSearchToolCallOutput":"Azure.AI.Projects.BingCustomSearchToolCallOutput","com.azure.ai.agents.models.BingCustomSearchToolParameters":"Azure.AI.Projects.BingCustomSearchToolParameters","com.azure.ai.agents.models.BingGroundingSearchConfiguration":"Azure.AI.Projects.BingGroundingSearchConfiguration","com.azure.ai.agents.models.BingGroundingSearchToolParameters":"Azure.AI.Projects.BingGroundingSearchToolParameters","com.azure.ai.agents.models.BingGroundingTool":"Azure.AI.Projects.BingGroundingTool","com.azure.ai.agents.models.BingGroundingToolCall":"Azure.AI.Projects.BingGroundingToolCall","com.azure.ai.agents.models.BingGroundingToolCallOutput":"Azure.AI.Projects.BingGroundingToolCallOutput","com.azure.ai.agents.models.BotServiceAuthorizationScheme":"Azure.AI.Projects.BotServiceAuthorizationScheme","com.azure.ai.agents.models.BotServiceRbacAuthorizationScheme":"Azure.AI.Projects.BotServiceRbacAuthorizationScheme","com.azure.ai.agents.models.BotServiceTenantAuthorizationScheme":"Azure.AI.Projects.BotServiceTenantAuthorizationScheme","com.azure.ai.agents.models.BrowserAutomationPreviewTool":"Azure.AI.Projects.BrowserAutomationPreviewTool","com.azure.ai.agents.models.BrowserAutomationPreviewToolboxTool":"Azure.AI.Projects.BrowserAutomationPreviewToolboxTool","com.azure.ai.agents.models.BrowserAutomationTool":"Azure.AI.Projects.BrowserAutomationTool","com.azure.ai.agents.models.BrowserAutomationToolCall":"Azure.AI.Projects.BrowserAutomationToolCall","com.azure.ai.agents.models.BrowserAutomationToolCallOutput":"Azure.AI.Projects.BrowserAutomationToolCallOutput","com.azure.ai.agents.models.BrowserAutomationToolConnectionParameters":"Azure.AI.Projects.BrowserAutomationToolConnectionParameters","com.azure.ai.agents.models.BrowserAutomationToolParameters":"Azure.AI.Projects.BrowserAutomationToolParameters","com.azure.ai.agents.models.BrowserAutomationToolboxTool":"Azure.AI.Projects.BrowserAutomationToolboxTool","com.azure.ai.agents.models.CallableToolAllowedCaller":"OpenAI.CallableToolAllowedCaller","com.azure.ai.agents.models.CaptureStructuredOutputsTool":"Azure.AI.Projects.CaptureStructuredOutputsTool","com.azure.ai.agents.models.ChatSummaryMemoryItem":"Azure.AI.Projects.ChatSummaryMemoryItem","com.azure.ai.agents.models.CodeConfiguration":"Azure.AI.Projects.CodeConfiguration","com.azure.ai.agents.models.CodeDependencyResolution":"Azure.AI.Projects.CodeDependencyResolution","com.azure.ai.agents.models.CodeFileDetails":null,"com.azure.ai.agents.models.CodeInterpreterTool":"OpenAI.CodeInterpreterTool","com.azure.ai.agents.models.CodeInterpreterToolboxTool":"Azure.AI.Projects.CodeInterpreterToolboxTool","com.azure.ai.agents.models.ComputerEnvironment":"ComputerEnvironmentExpandable","com.azure.ai.agents.models.ComputerTool":"OpenAI.ComputerTool","com.azure.ai.agents.models.ComputerUsePreviewTool":"OpenAI.ComputerUsePreviewTool","com.azure.ai.agents.models.ContainerAutoParameter":"OpenAI.ContainerAutoParam","com.azure.ai.agents.models.ContainerConfiguration":"Azure.AI.Projects.ContainerConfiguration","com.azure.ai.agents.models.ContainerMemoryLimit":"ContainerMemoryLimitExpandable","com.azure.ai.agents.models.ContainerNetworkPolicyAllowlistParameter":"OpenAI.ContainerNetworkPolicyAllowlistParam","com.azure.ai.agents.models.ContainerNetworkPolicyDisabledParameter":"OpenAI.ContainerNetworkPolicyDisabledParam","com.azure.ai.agents.models.ContainerNetworkPolicyDomainSecretParameter":"OpenAI.ContainerNetworkPolicyDomainSecretParam","com.azure.ai.agents.models.ContainerNetworkPolicyParamType":"OpenAI.ContainerNetworkPolicyParamType","com.azure.ai.agents.models.ContainerNetworkPolicyParameter":"OpenAI.ContainerNetworkPolicyParam","com.azure.ai.agents.models.ContainerSkill":"OpenAI.ContainerSkill","com.azure.ai.agents.models.ContainerSkillType":"OpenAI.ContainerSkillType","com.azure.ai.agents.models.CreateAgentVersionFromCodeContent":"Azure.AI.Projects.CreateAgentVersionFromCodeContent","com.azure.ai.agents.models.CreateAgentVersionFromCodeMetadata":"Azure.AI.Projects.CreateAgentVersionFromCodeMetadata","com.azure.ai.agents.models.CreateAgentVersionInput":"Azure.AI.Projects.CreateAgentVersionRequest","com.azure.ai.agents.models.CreateAgentVersionOptions":null,"com.azure.ai.agents.models.CreateTeamsPhoneExtensibilityTelephonyBindingInput":"Azure.AI.Projects.CreateTeamsPhoneExtensibilityTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyBindingInput":"Azure.AI.Projects.CreateTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyCallJobInput":"Azure.AI.Projects.CreateTelephonyCallJobRequest","com.azure.ai.agents.models.CreateTwilioTelephonyBindingInput":"Azure.AI.Projects.CreateTwilioTelephonyBindingRequest","com.azure.ai.agents.models.CustomGrammarFormatParameter":"OpenAI.CustomGrammarFormatParam","com.azure.ai.agents.models.CustomTextFormatParameter":"OpenAI.CustomTextFormatParam","com.azure.ai.agents.models.CustomToolParamFormat":"OpenAI.CustomToolParamFormat","com.azure.ai.agents.models.CustomToolParamFormatType":"OpenAI.CustomToolParamFormatType","com.azure.ai.agents.models.CustomToolParameter":"OpenAI.CustomToolParam","com.azure.ai.agents.models.DigitalWorkerType":"Azure.AI.Projects.DigitalWorkerType","com.azure.ai.agents.models.EntraAuthorizationScheme":"Azure.AI.Projects.EntraAuthorizationScheme","com.azure.ai.agents.models.EvaluationAzureStandardVoiceModelConfiguration":"Azure.AI.Projects.EvaluationAzureStandardVoiceModelConfiguration","com.azure.ai.agents.models.EvaluationModelConfiguration":"Azure.AI.Projects.EvaluationModelConfiguration","com.azure.ai.agents.models.EvaluationVoiceModelConfiguration":"Azure.AI.Projects.EvaluationVoiceModelConfiguration","com.azure.ai.agents.models.ExternalAgentDefinition":"Azure.AI.Projects.ExternalAgentDefinition","com.azure.ai.agents.models.FabricDataAgentToolCall":"Azure.AI.Projects.FabricDataAgentToolCall","com.azure.ai.agents.models.FabricDataAgentToolCallOutput":"Azure.AI.Projects.FabricDataAgentToolCallOutput","com.azure.ai.agents.models.FabricDataAgentToolParameters":"Azure.AI.Projects.FabricDataAgentToolParameters","com.azure.ai.agents.models.FabricIqPreviewTool":"Azure.AI.Projects.FabricIQPreviewTool","com.azure.ai.agents.models.FabricIqPreviewToolboxTool":"Azure.AI.Projects.FabricIQPreviewToolboxTool","com.azure.ai.agents.models.FileSearchTool":"OpenAI.FileSearchTool","com.azure.ai.agents.models.FileSearchToolboxTool":"Azure.AI.Projects.FileSearchToolboxTool","com.azure.ai.agents.models.FixedRatioVersionSelectionRule":"Azure.AI.Projects.FixedRatioVersionSelectionRule","com.azure.ai.agents.models.FunctionShellToolParamEnvironment":"OpenAI.FunctionShellToolParamEnvironment","com.azure.ai.agents.models.FunctionShellToolParamEnvironmentType":"OpenAI.FunctionShellToolParamEnvironmentType","com.azure.ai.agents.models.FunctionShellToolParameter":"OpenAI.FunctionShellToolParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentContainerReferenceParameter":"OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentLocalEnvironmentParameter":"OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam","com.azure.ai.agents.models.FunctionTool":"OpenAI.FunctionTool","com.azure.ai.agents.models.GetMicrosoft365AppPackageOptions":null,"com.azure.ai.agents.models.GitHubCopilotBuiltInTool":"Azure.AI.Projects.GitHubCopilotBuiltInTool","com.azure.ai.agents.models.GitHubCopilotHarness":"Azure.AI.Projects.GitHubCopilotHarness","com.azure.ai.agents.models.GitHubCopilotToolsetConfig":"Azure.AI.Projects.GitHubCopilotToolsetConfig","com.azure.ai.agents.models.GitHubCopilotToolsetDefaultConfig":"Azure.AI.Projects.GitHubCopilotToolsetDefaultConfig","com.azure.ai.agents.models.GitHubCopilotToolsetPreview":"Azure.AI.Projects.GitHubCopilotToolsetPreview","com.azure.ai.agents.models.GrammarSyntax":"GrammarSyntaxExpandable","com.azure.ai.agents.models.HeaderTelemetryEndpointAuth":"Azure.AI.Projects.HeaderTelemetryEndpointAuth","com.azure.ai.agents.models.HostedAgentDefinition":"Azure.AI.Projects.HostedAgentDefinition","com.azure.ai.agents.models.HybridSearchOptions":"OpenAI.HybridSearchOptions","com.azure.ai.agents.models.ImageGenActionEnum":"ImageGenActionEnumExpandable","com.azure.ai.agents.models.ImageGenTool":"OpenAI.ImageGenTool","com.azure.ai.agents.models.ImageGenToolBackground":"ImageGenToolBackgroundExpandable","com.azure.ai.agents.models.ImageGenToolInputImageMask":"OpenAI.ImageGenToolInputImageMask","com.azure.ai.agents.models.ImageGenToolModel":"OpenAI.ImageGenTool.model.anonymous","com.azure.ai.agents.models.ImageGenToolModeration":"ImageGenToolModerationExpandable","com.azure.ai.agents.models.ImageGenToolOutputFormat":"ImageGenToolOutputFormatExpandable","com.azure.ai.agents.models.ImageGenToolQuality":"ImageGenToolQualityExpandable","com.azure.ai.agents.models.ImageGenToolSize":"ImageGenToolSizeExpandable","com.azure.ai.agents.models.IncludeEnum":"OpenAI.IncludeEnum","com.azure.ai.agents.models.InlineSkillParameter":"OpenAI.InlineSkillParam","com.azure.ai.agents.models.InlineSkillSourceParameter":"OpenAI.InlineSkillSourceParam","com.azure.ai.agents.models.InputFidelity":"InputFidelityExpandable","com.azure.ai.agents.models.InvocationsProtocolConfiguration":"Azure.AI.Projects.InvocationsProtocolConfiguration","com.azure.ai.agents.models.InvocationsWsProtocolConfiguration":"Azure.AI.Projects.InvocationsWsProtocolConfiguration","com.azure.ai.agents.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.agents.models.ListMemoriesOptions":null,"com.azure.ai.agents.models.LocalShellToolParameter":"OpenAI.LocalShellToolParam","com.azure.ai.agents.models.LocalSkillParameter":"OpenAI.LocalSkillParam","com.azure.ai.agents.models.ManagedAgentIdentityBlueprintReference":"Azure.AI.Projects.ManagedAgentIdentityBlueprintReference","com.azure.ai.agents.models.McpListToolsTool":"OpenAI.MCPListToolsTool","com.azure.ai.agents.models.McpListToolsToolAnnotations":"OpenAI.MCPListToolsToolAnnotations","com.azure.ai.agents.models.McpListToolsToolInputSchema":"OpenAI.MCPListToolsToolInputSchema","com.azure.ai.agents.models.McpProtocolConfiguration":"Azure.AI.Projects.McpProtocolConfiguration","com.azure.ai.agents.models.McpTool":"OpenAI.MCPTool","com.azure.ai.agents.models.McpToolConnectorId":"McpToolConnectorIdExpandable","com.azure.ai.agents.models.McpToolFilter":"OpenAI.MCPToolFilter","com.azure.ai.agents.models.McpToolRequireApproval":"OpenAI.MCPToolRequireApproval","com.azure.ai.agents.models.McpToolboxTool":"Azure.AI.Projects.MCPToolboxTool","com.azure.ai.agents.models.MemoryCommandToolCall":"Azure.AI.Projects.MemoryCommandToolCall","com.azure.ai.agents.models.MemoryCommandToolCallOutput":"Azure.AI.Projects.MemoryCommandToolCallOutput","com.azure.ai.agents.models.MemoryItem":"Azure.AI.Projects.MemoryItem","com.azure.ai.agents.models.MemoryItemKind":"Azure.AI.Projects.MemoryItemKind","com.azure.ai.agents.models.MemoryOperation":"Azure.AI.Projects.MemoryOperation","com.azure.ai.agents.models.MemoryOperationKind":"Azure.AI.Projects.MemoryOperationKind","com.azure.ai.agents.models.MemorySearchItem":"Azure.AI.Projects.MemorySearchItem","com.azure.ai.agents.models.MemorySearchOptions":"Azure.AI.Projects.MemorySearchOptions","com.azure.ai.agents.models.MemorySearchPreviewTool":"Azure.AI.Projects.MemorySearchPreviewTool","com.azure.ai.agents.models.MemorySearchToolCall":"Azure.AI.Projects.MemorySearchToolCall","com.azure.ai.agents.models.MemoryStoreDefaultDefinition":"Azure.AI.Projects.MemoryStoreDefaultDefinition","com.azure.ai.agents.models.MemoryStoreDefaultOptions":"Azure.AI.Projects.MemoryStoreDefaultOptions","com.azure.ai.agents.models.MemoryStoreDefinition":"Azure.AI.Projects.MemoryStoreDefinition","com.azure.ai.agents.models.MemoryStoreDetails":"Azure.AI.Projects.MemoryStoreObject","com.azure.ai.agents.models.MemoryStoreKind":"Azure.AI.Projects.MemoryStoreKind","com.azure.ai.agents.models.MemoryStoreObjectType":"Azure.AI.Projects.MemoryStoreObjectType","com.azure.ai.agents.models.MemoryStoreOperationUsage":"Azure.AI.Projects.MemoryStoreOperationUsage","com.azure.ai.agents.models.MemoryStoreSearchResponse":"Azure.AI.Projects.MemoryStoreSearchResponse","com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult":"Azure.AI.Projects.MemoryStoreUpdateCompletedResult","com.azure.ai.agents.models.MemoryStoreUpdateResponse":"Azure.AI.Projects.MemoryStoreUpdateResponse","com.azure.ai.agents.models.MemoryStoreUpdateStatus":"Azure.AI.Projects.MemoryStoreUpdateStatus","com.azure.ai.agents.models.Microsoft365PermissionScopes":"Azure.AI.Projects.Microsoft365PermissionScopes","com.azure.ai.agents.models.Microsoft365PublishDefaults":"Azure.AI.Projects.Microsoft365PublishDefaults","com.azure.ai.agents.models.Microsoft365PublishResult":"Azure.AI.Projects.Microsoft365PublishResponse","com.azure.ai.agents.models.Microsoft365PublishScope":"Azure.AI.Projects.Microsoft365PublishScope","com.azure.ai.agents.models.MicrosoftFabricPreviewTool":"Azure.AI.Projects.MicrosoftFabricPreviewTool","com.azure.ai.agents.models.ModelRouterAttempt":"Azure.AI.Projects.ModelRouterAttempt","com.azure.ai.agents.models.ModelRouterAttemptError":"Azure.AI.Projects.ModelRouterAttemptError","com.azure.ai.agents.models.ModelRouterAttemptResult":"Azure.AI.Projects.ModelRouterAttemptResult","com.azure.ai.agents.models.ModelRouterDetails":"Azure.AI.Projects.ModelRouterDetails","com.azure.ai.agents.models.ModelRouterMode":"Azure.AI.Projects.ModelRouterMode","com.azure.ai.agents.models.ModelSamplingParameters":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.agents.models.ModelSelectionDetails":"Azure.AI.Projects.ModelSelectionDetails","com.azure.ai.agents.models.NamespaceTool":"OpenAI.NamespaceToolParam","com.azure.ai.agents.models.OpenApiAnonymousAuthDetails":"Azure.AI.Projects.OpenApiAnonymousAuthDetails","com.azure.ai.agents.models.OpenApiAuthDetails":"Azure.AI.Projects.OpenApiAuthDetails","com.azure.ai.agents.models.OpenApiAuthType":"Azure.AI.Projects.OpenApiAuthType","com.azure.ai.agents.models.OpenApiFunctionDefinition":"Azure.AI.Projects.OpenApiFunctionDefinition","com.azure.ai.agents.models.OpenApiFunctionDefinitionFunction":"Azure.AI.Projects.OpenApiFunctionDefinition.function.anonymous","com.azure.ai.agents.models.OpenApiManagedAuthDetails":"Azure.AI.Projects.OpenApiManagedAuthDetails","com.azure.ai.agents.models.OpenApiManagedSecurityScheme":"Azure.AI.Projects.OpenApiManagedSecurityScheme","com.azure.ai.agents.models.OpenApiProjectConnectionAuthDetails":"Azure.AI.Projects.OpenApiProjectConnectionAuthDetails","com.azure.ai.agents.models.OpenApiProjectConnectionSecurityScheme":"Azure.AI.Projects.OpenApiProjectConnectionSecurityScheme","com.azure.ai.agents.models.OpenApiTool":"Azure.AI.Projects.OpenApiTool","com.azure.ai.agents.models.OpenApiToolCall":"Azure.AI.Projects.OpenApiToolCall","com.azure.ai.agents.models.OpenApiToolCallOutput":"Azure.AI.Projects.OpenApiToolCallOutput","com.azure.ai.agents.models.OpenApiToolboxTool":"Azure.AI.Projects.OpenApiToolboxTool","com.azure.ai.agents.models.OptimizationContext":"Azure.AI.Projects.OptimizationContext","com.azure.ai.agents.models.OptimizationContextType":"Azure.AI.Projects.OptimizationContextType","com.azure.ai.agents.models.OtlpTelemetryEndpoint":"Azure.AI.Projects.OtlpTelemetryEndpoint","com.azure.ai.agents.models.PageOrder":"Azure.AI.Projects.PageOrder","com.azure.ai.agents.models.ProceduralMemoryItem":"Azure.AI.Projects.ProceduralMemoryItem","com.azure.ai.agents.models.ProgrammaticToolCallingParameter":"OpenAI.ProgrammaticToolCallingParam","com.azure.ai.agents.models.PromptAgentDefinition":"Azure.AI.Projects.PromptAgentDefinition","com.azure.ai.agents.models.PromptAgentDefinitionTextOptions":"Azure.AI.Projects.PromptAgentDefinitionTextOptions","com.azure.ai.agents.models.PromptOptimizationConfiguration":"Azure.AI.Projects.PromptOptimizationConfiguration","com.azure.ai.agents.models.ProtocolConfiguration":"Azure.AI.Projects.ProtocolConfiguration","com.azure.ai.agents.models.ProtocolVersionRecord":"Azure.AI.Projects.ProtocolVersionRecord","com.azure.ai.agents.models.PstnTelephonyTransferDestination":"Azure.AI.Projects.PSTNTelephonyTransferDestination","com.azure.ai.agents.models.PublishAgentToMicrosoft365Options":null,"com.azure.ai.agents.models.PublishApprovalStatus":"Azure.AI.Projects.PublishApprovalStatus","com.azure.ai.agents.models.RaiConfig":"Azure.AI.Projects.RaiConfig","com.azure.ai.agents.models.RaiInvocationContentType":"Azure.AI.Projects.RaiInvocationContentType","com.azure.ai.agents.models.RaiInvocationModeration":"Azure.AI.Projects.RaiInvocationModeration","com.azure.ai.agents.models.RaiInvocationResponseMode":"Azure.AI.Projects.RaiInvocationMode","com.azure.ai.agents.models.RaiSseTextSelector":"Azure.AI.Projects.RaiSseTextSelector","com.azure.ai.agents.models.RankerVersionType":"RankerVersionTypeExpandable","com.azure.ai.agents.models.RankingOptions":"OpenAI.RankingOptions","com.azure.ai.agents.models.RealtimeAudioFormat":"OpenAI.RealtimeAudioFormats","com.azure.ai.agents.models.RealtimeAudioFormatType":"OpenAI.RealtimeAudioFormatsType","com.azure.ai.agents.models.RealtimeClientEvent":"OpenAI.RealtimeClientEvent","com.azure.ai.agents.models.RealtimeClientEventType":"OpenAI.RealtimeClientEventType","com.azure.ai.agents.models.RealtimeConversationCreatedEvent":"OpenAI.RealtimeServerEventConversationCreated","com.azure.ai.agents.models.RealtimeConversationItem":"OpenAI.RealtimeConversationItem","com.azure.ai.agents.models.RealtimeConversationItemAddedEvent":"OpenAI.RealtimeServerEventConversationItemAdded","com.azure.ai.agents.models.RealtimeConversationItemAssistantMessage":"OpenAI.RealtimeConversationItemMessageAssistant","com.azure.ai.agents.models.RealtimeConversationItemCreateEvent":"OpenAI.RealtimeClientEventConversationItemCreate","com.azure.ai.agents.models.RealtimeConversationItemCreatedEvent":"OpenAI.RealtimeServerEventConversationItemCreated","com.azure.ai.agents.models.RealtimeConversationItemDeleteEvent":"OpenAI.RealtimeClientEventConversationItemDelete","com.azure.ai.agents.models.RealtimeConversationItemDeletedEvent":"OpenAI.RealtimeServerEventConversationItemDeleted","com.azure.ai.agents.models.RealtimeConversationItemDoneEvent":"OpenAI.RealtimeServerEventConversationItemDone","com.azure.ai.agents.models.RealtimeConversationItemFunctionCall":"OpenAI.RealtimeConversationItemFunctionCall","com.azure.ai.agents.models.RealtimeConversationItemFunctionCallOutput":"OpenAI.RealtimeConversationItemFunctionCallOutput","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionCompletedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionDeltaEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionFailedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionSegmentEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegment","com.azure.ai.agents.models.RealtimeConversationItemMessage":"OpenAI.RealtimeConversationItemMessage","com.azure.ai.agents.models.RealtimeConversationItemMessageType":"OpenAI.RealtimeConversationItemMessageType","com.azure.ai.agents.models.RealtimeConversationItemObjectType":"RealtimeConversationItemObject","com.azure.ai.agents.models.RealtimeConversationItemRetrieveEvent":"OpenAI.RealtimeClientEventConversationItemRetrieve","com.azure.ai.agents.models.RealtimeConversationItemRetrievedEvent":"OpenAI.RealtimeServerEventConversationItemRetrieved","com.azure.ai.agents.models.RealtimeConversationItemSystemMessage":"OpenAI.RealtimeConversationItemMessageSystem","com.azure.ai.agents.models.RealtimeConversationItemTruncateEvent":"OpenAI.RealtimeClientEventConversationItemTruncate","com.azure.ai.agents.models.RealtimeConversationItemTruncatedEvent":"OpenAI.RealtimeServerEventConversationItemTruncated","com.azure.ai.agents.models.RealtimeConversationItemType":"OpenAI.RealtimeConversationItemType","com.azure.ai.agents.models.RealtimeConversationItemUserMessage":"OpenAI.RealtimeConversationItemMessageUser","com.azure.ai.agents.models.RealtimeErrorEvent":"OpenAI.RealtimeServerEventRealtimeServerEventError","com.azure.ai.agents.models.RealtimeInputAudioBufferAppendEvent":"OpenAI.RealtimeClientEventInputAudioBufferAppend","com.azure.ai.agents.models.RealtimeInputAudioBufferClearEvent":"OpenAI.RealtimeClientEventInputAudioBufferClear","com.azure.ai.agents.models.RealtimeInputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCleared","com.azure.ai.agents.models.RealtimeInputAudioBufferCommitEvent":"OpenAI.RealtimeClientEventInputAudioBufferCommit","com.azure.ai.agents.models.RealtimeInputAudioBufferCommittedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCommitted","com.azure.ai.agents.models.RealtimeInputAudioBufferDtmfReceivedEvent":"OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStartedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStoppedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped","com.azure.ai.agents.models.RealtimeInputAudioBufferTimeoutTriggeredEvent":"OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggered","com.azure.ai.agents.models.RealtimeMcpApprovalInput":"OpenAI.RealtimeMCPApprovalRequest","com.azure.ai.agents.models.RealtimeMcpApprovalOutput":"OpenAI.RealtimeMCPApprovalResponse","com.azure.ai.agents.models.RealtimeMcpError":"OpenAI.RealtimeMCPError","com.azure.ai.agents.models.RealtimeMcpErrorType":"OpenAI.RealtimeMcpErrorType","com.azure.ai.agents.models.RealtimeMcpHttpError":"OpenAI.RealtimeMCPHTTPError","com.azure.ai.agents.models.RealtimeMcpListTools":"OpenAI.RealtimeMCPListTools","com.azure.ai.agents.models.RealtimeMcpListToolsCompletedEvent":"OpenAI.RealtimeServerEventMCPListToolsCompleted","com.azure.ai.agents.models.RealtimeMcpListToolsFailedEvent":"OpenAI.RealtimeServerEventMCPListToolsFailed","com.azure.ai.agents.models.RealtimeMcpListToolsInProgressEvent":"OpenAI.RealtimeServerEventMCPListToolsInProgress","com.azure.ai.agents.models.RealtimeMcpProtocolError":"OpenAI.RealtimeMCPProtocolError","com.azure.ai.agents.models.RealtimeMcpToolCall":"OpenAI.RealtimeMCPToolCall","com.azure.ai.agents.models.RealtimeMcpToolExecutionError":"OpenAI.RealtimeMCPToolExecutionError","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearEvent":"OpenAI.RealtimeClientEventOutputAudioBufferClear","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferCleared","com.azure.ai.agents.models.RealtimeOutputAudioBufferStartedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStarted","com.azure.ai.agents.models.RealtimeOutputAudioBufferStoppedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStopped","com.azure.ai.agents.models.RealtimePcmAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcm","com.azure.ai.agents.models.RealtimePcmaAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcma","com.azure.ai.agents.models.RealtimePcmuAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcmu","com.azure.ai.agents.models.RealtimeRateLimitsUpdatedEvent":"OpenAI.RealtimeServerEventRateLimitsUpdated","com.azure.ai.agents.models.RealtimeResponseAudioDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioDelta","com.azure.ai.agents.models.RealtimeResponseAudioDoneEvent":"OpenAI.RealtimeServerEventResponseAudioDone","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDelta","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDoneEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDone","com.azure.ai.agents.models.RealtimeResponseCancelEvent":"OpenAI.RealtimeClientEventResponseCancel","com.azure.ai.agents.models.RealtimeResponseContentPart":"OpenAI.RealtimeServerEventResponseContentPartDonePart","com.azure.ai.agents.models.RealtimeResponseContentPartAddedEvent":"OpenAI.RealtimeServerEventResponseContentPartAdded","com.azure.ai.agents.models.RealtimeResponseContentPartDoneEvent":"OpenAI.RealtimeServerEventResponseContentPartDone","com.azure.ai.agents.models.RealtimeResponseCreateEvent":"OpenAI.RealtimeClientEventResponseCreate","com.azure.ai.agents.models.RealtimeResponseCreatedEvent":"OpenAI.RealtimeServerEventResponseCreated","com.azure.ai.agents.models.RealtimeResponseDoneEvent":"OpenAI.RealtimeServerEventResponseDone","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallCompletedEvent":"OpenAI.RealtimeServerEventResponseMCPCallCompleted","com.azure.ai.agents.models.RealtimeResponseMcpCallFailedEvent":"OpenAI.RealtimeServerEventResponseMCPCallFailed","com.azure.ai.agents.models.RealtimeResponseMcpCallInProgressEvent":"OpenAI.RealtimeServerEventResponseMCPCallInProgress","com.azure.ai.agents.models.RealtimeResponseOutputItemAddedEvent":"OpenAI.RealtimeServerEventResponseOutputItemAdded","com.azure.ai.agents.models.RealtimeResponseOutputItemDoneEvent":"OpenAI.RealtimeServerEventResponseOutputItemDone","com.azure.ai.agents.models.RealtimeResponseTextDeltaEvent":"OpenAI.RealtimeServerEventResponseTextDelta","com.azure.ai.agents.models.RealtimeResponseTextDoneEvent":"OpenAI.RealtimeServerEventResponseTextDone","com.azure.ai.agents.models.RealtimeSemanticVadTurnDetection":"OpenAI.RealtimeTurnDetectionSemanticVad","com.azure.ai.agents.models.RealtimeServerEvent":"OpenAI.RealtimeServerEvent","com.azure.ai.agents.models.RealtimeServerEventType":"OpenAI.RealtimeServerEventType","com.azure.ai.agents.models.RealtimeServerVadTurnDetection":"OpenAI.RealtimeTurnDetectionServerVad","com.azure.ai.agents.models.RealtimeSessionAudioConfiguration":"OpenAI.RealtimeSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeSessionAudioInput":"OpenAI.RealtimeSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeSessionAudioOutput":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput","com.azure.ai.agents.models.RealtimeSessionConfiguration":"OpenAI.RealtimeSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeSessionConfigurationBase":"OpenAI.RealtimeSessionCreateRequestUnion","com.azure.ai.agents.models.RealtimeSessionCreateRequestGAAudioOutputVoice":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput.voice.anonymous","com.azure.ai.agents.models.RealtimeSessionCreatedEvent":"OpenAI.RealtimeServerEventSessionCreated","com.azure.ai.agents.models.RealtimeSessionTracingConfiguration":"OpenAI.RealtimeSessionCreateRequestGATracing","com.azure.ai.agents.models.RealtimeSessionType":"OpenAI.RealtimeSessionCreateRequestUnionType","com.azure.ai.agents.models.RealtimeSessionUpdateEvent":"OpenAI.RealtimeClientEventSessionUpdate","com.azure.ai.agents.models.RealtimeSessionUpdatedEvent":"OpenAI.RealtimeServerEventSessionUpdated","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioInput":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeTranscriptionSessionConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeTurnDetection":"OpenAI.RealtimeTurnDetection","com.azure.ai.agents.models.RealtimeTurnDetectionType":"OpenAI.RealtimeTurnDetectionType","com.azure.ai.agents.models.ReminderPreviewToolboxTool":"Azure.AI.Projects.ReminderPreviewToolboxTool","com.azure.ai.agents.models.ResponseFormatJsonSchemaInner":"OpenAI.ResponseFormatJsonSchemaSchema","com.azure.ai.agents.models.ResponseUsageInputTokensDetails":"OpenAI.ResponseUsageInputTokensDetails","com.azure.ai.agents.models.ResponseUsageOutputTokensDetails":"OpenAI.ResponseUsageOutputTokensDetails","com.azure.ai.agents.models.ResponsesProtocolConfiguration":"Azure.AI.Projects.ResponsesProtocolConfiguration","com.azure.ai.agents.models.RoutingConfiguration":"Azure.AI.Projects.RoutingConfiguration","com.azure.ai.agents.models.RoutingTraceEntry":"Azure.AI.Projects.RoutingTraceEntry","com.azure.ai.agents.models.SearchContentType":"OpenAI.SearchContentType","com.azure.ai.agents.models.SearchContextSize":"SearchContextSizeExpandable","com.azure.ai.agents.models.SessionAffinityConfiguration":"Azure.AI.Projects.SessionAffinityConfiguration","com.azure.ai.agents.models.SessionAffinityDecision":"Azure.AI.Projects.SessionAffinityDecision","com.azure.ai.agents.models.SessionAffinityDetails":"Azure.AI.Projects.SessionAffinityDetails","com.azure.ai.agents.models.SessionAffinityMode":"Azure.AI.Projects.SessionAffinityMode","com.azure.ai.agents.models.SessionAffinityRequestMode":"Azure.AI.Projects.SessionAffinityRequestMode","com.azure.ai.agents.models.SessionAffinitySource":"Azure.AI.Projects.SessionAffinitySource","com.azure.ai.agents.models.SessionConfiguration":"Azure.AI.Projects.SessionConfiguration","com.azure.ai.agents.models.SessionDirectoryEntry":"Azure.AI.Projects.SessionDirectoryEntry","com.azure.ai.agents.models.SessionFileWriteResult":"Azure.AI.Projects.SessionFileWriteResponse","com.azure.ai.agents.models.SessionLogEvent":"Azure.AI.Projects.SessionLogEvent","com.azure.ai.agents.models.SessionLogEventType":"Azure.AI.Projects.SessionLogEventType","com.azure.ai.agents.models.SharepointGroundingToolCall":"Azure.AI.Projects.SharepointGroundingToolCall","com.azure.ai.agents.models.SharepointGroundingToolCallOutput":"Azure.AI.Projects.SharepointGroundingToolCallOutput","com.azure.ai.agents.models.SharepointGroundingToolParameters":"Azure.AI.Projects.SharepointGroundingToolParameters","com.azure.ai.agents.models.SharepointPreviewTool":"Azure.AI.Projects.SharepointPreviewTool","com.azure.ai.agents.models.ShellToolboxTool":"Azure.AI.Projects.ShellToolboxTool","com.azure.ai.agents.models.SipTelephonyTransferDestination":"Azure.AI.Projects.SipTelephonyTransferDestination","com.azure.ai.agents.models.SkillReference":"Azure.AI.Projects.SkillReference","com.azure.ai.agents.models.SkillReferenceParameter":"OpenAI.SkillReferenceParam","com.azure.ai.agents.models.SteeringPromptOptimizationContext":"Azure.AI.Projects.SteeringPromptOptimizationContext","com.azure.ai.agents.models.StructuredInputDefinition":"Azure.AI.Projects.StructuredInputDefinition","com.azure.ai.agents.models.StructuredOutputDefinition":"Azure.AI.Projects.StructuredOutputDefinition","com.azure.ai.agents.models.TargetAttribute":"Azure.AI.Projects.TargetAttribute","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBinding":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBinding","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBindingListItem":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBindingListItem","com.azure.ai.agents.models.TeamsTelephonyTransferDestination":"Azure.AI.Projects.TeamsTelephonyTransferDestination","com.azure.ai.agents.models.TelemetryConfig":"Azure.AI.Projects.TelemetryConfig","com.azure.ai.agents.models.TelemetryDataKind":"Azure.AI.Projects.TelemetryDataKind","com.azure.ai.agents.models.TelemetryEndpoint":"Azure.AI.Projects.TelemetryEndpoint","com.azure.ai.agents.models.TelemetryEndpointAuth":"Azure.AI.Projects.TelemetryEndpointAuth","com.azure.ai.agents.models.TelemetryEndpointAuthType":"Azure.AI.Projects.TelemetryEndpointAuthType","com.azure.ai.agents.models.TelemetryEndpointKind":"Azure.AI.Projects.TelemetryEndpointKind","com.azure.ai.agents.models.TelemetryTransportProtocol":"Azure.AI.Projects.TelemetryTransportProtocol","com.azure.ai.agents.models.TelephonyBinding":"Azure.AI.Projects.TelephonyBinding","com.azure.ai.agents.models.TelephonyBindingListItem":"Azure.AI.Projects.TelephonyBindingListItem","com.azure.ai.agents.models.TelephonyBindingStatus":"Azure.AI.Projects.TelephonyBindingStatus","com.azure.ai.agents.models.TelephonyCallDurationBasis":"Azure.AI.Projects.TelephonyCallDurationBasis","com.azure.ai.agents.models.TelephonyCallEndReason":"Azure.AI.Projects.TelephonyCallEndReason","com.azure.ai.agents.models.TelephonyCallJob":"Azure.AI.Projects.TelephonyCallJob","com.azure.ai.agents.models.TelephonyCallJobCancellation":"Azure.AI.Projects.TelephonyCallJobCancellation","com.azure.ai.agents.models.TelephonyCallJobSchedule":"Azure.AI.Projects.TelephonyCallJobSchedule","com.azure.ai.agents.models.TelephonyCallJobStatus":"Azure.AI.Projects.TelephonyCallJobStatus","com.azure.ai.agents.models.TelephonyCallJobTerminalReason":"Azure.AI.Projects.TelephonyCallJobTerminalReason","com.azure.ai.agents.models.TelephonyCallLifecycleEvent":"Azure.AI.Projects.TelephonyCallLifecycleEvent","com.azure.ai.agents.models.TelephonyCallLifecycleEventName":"Azure.AI.Projects.TelephonyCallLifecycleEventName","com.azure.ai.agents.models.TelephonyCallLifecycleEventOutcome":"Azure.AI.Projects.TelephonyCallLifecycleEventOutcome","com.azure.ai.agents.models.TelephonyCallLifecycleEventReason":"Azure.AI.Projects.TelephonyCallLifecycleEventReason","com.azure.ai.agents.models.TelephonyCallLifecycleEventSource":"Azure.AI.Projects.TelephonyCallLifecycleEventSource","com.azure.ai.agents.models.TelephonyCallPhase":"Azure.AI.Projects.TelephonyCallPhase","com.azure.ai.agents.models.TelephonyCallRecord":"Azure.AI.Projects.TelephonyCallRecord","com.azure.ai.agents.models.TelephonyCallStatus":"Azure.AI.Projects.TelephonyCallStatus","com.azure.ai.agents.models.TelephonyCallSummary":"Azure.AI.Projects.TelephonyCallSummary","com.azure.ai.agents.models.TelephonyCallTimestampSource":"Azure.AI.Projects.TelephonyCallTimestampSource","com.azure.ai.agents.models.TelephonyCallTiming":"Azure.AI.Projects.TelephonyCallTiming","com.azure.ai.agents.models.TelephonyCallTrace":"Azure.AI.Projects.TelephonyCallTrace","com.azure.ai.agents.models.TelephonyCallTraceMode":"Azure.AI.Projects.TelephonyCallTraceMode","com.azure.ai.agents.models.TelephonyCallTraceStatus":"Azure.AI.Projects.TelephonyCallTraceStatus","com.azure.ai.agents.models.TelephonyOutboundDestination":"Azure.AI.Projects.TelephonyOutboundDestination","com.azure.ai.agents.models.TelephonyOutboundDestinationType":"Azure.AI.Projects.TelephonyOutboundDestinationType","com.azure.ai.agents.models.TelephonyOutboundFixedIntervalRetryPolicy":"Azure.AI.Projects.TelephonyOutboundFixedIntervalRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicy":"Azure.AI.Projects.TelephonyOutboundRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicyType":"Azure.AI.Projects.TelephonyOutboundRetryPolicyType","com.azure.ai.agents.models.TelephonyProvider":"Azure.AI.Projects.TelephonyProvider","com.azure.ai.agents.models.TelephonyTransferDestination":"Azure.AI.Projects.TelephonyTransferDestination","com.azure.ai.agents.models.TelephonyTransferDestinationKind":"Azure.AI.Projects.TelephonyTransferDestinationKind","com.azure.ai.agents.models.TelephonyTransferTarget":"Azure.AI.Projects.TelephonyTransferTarget","com.azure.ai.agents.models.TelephonyTransferTargets":"Azure.AI.Projects.TelephonyTransferTargets","com.azure.ai.agents.models.TextResponseFormatConfiguration":"OpenAI.TextResponseFormatConfiguration","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatJsonObject":"OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatText":"OpenAI.TextResponseFormatConfigurationResponseFormatText","com.azure.ai.agents.models.TextResponseFormatConfigurationType":"OpenAI.TextResponseFormatConfigurationType","com.azure.ai.agents.models.TextResponseFormatJsonSchema":"OpenAI.TextResponseFormatJsonSchema","com.azure.ai.agents.models.Tool":"OpenAI.Tool","com.azure.ai.agents.models.ToolCallStatus":"Azure.AI.Projects.ToolCallStatus","com.azure.ai.agents.models.ToolConfig":"Azure.AI.Projects.ToolConfig","com.azure.ai.agents.models.ToolProjectConnection":"Azure.AI.Projects.ToolProjectConnection","com.azure.ai.agents.models.ToolSearchExecutionType":"OpenAI.ToolSearchExecutionType","com.azure.ai.agents.models.ToolSearchTool":"OpenAI.ToolSearchToolParam","com.azure.ai.agents.models.ToolSearchToolboxTool":"Azure.AI.Projects.ToolSearchToolboxTool","com.azure.ai.agents.models.ToolType":"OpenAI.ToolType","com.azure.ai.agents.models.ToolboxDetails":"Azure.AI.Projects.ToolboxObject","com.azure.ai.agents.models.ToolboxPolicies":"Azure.AI.Projects.ToolboxPolicies","com.azure.ai.agents.models.ToolboxSearchPreviewToolboxTool":"Azure.AI.Projects.ToolboxSearchPreviewToolboxTool","com.azure.ai.agents.models.ToolboxShellContainerAutoEnvironment":"Azure.AI.Projects.ToolboxShellContainerAutoEnvironment","com.azure.ai.agents.models.ToolboxShellContainerReferenceEnvironment":"Azure.AI.Projects.ToolboxShellContainerReferenceEnvironment","com.azure.ai.agents.models.ToolboxShellEnvironment":"Azure.AI.Projects.ToolboxShellEnvironment","com.azure.ai.agents.models.ToolboxShellNetworkPolicy":"Azure.AI.Projects.ToolboxShellNetworkPolicy","com.azure.ai.agents.models.ToolboxShellNetworkPolicyDisabled":"Azure.AI.Projects.ToolboxShellNetworkPolicyDisabled","com.azure.ai.agents.models.ToolboxSkill":"Azure.AI.Projects.ToolboxSkill","com.azure.ai.agents.models.ToolboxSkillReference":"Azure.AI.Projects.ToolboxSkillReference","com.azure.ai.agents.models.ToolboxTool":"Azure.AI.Projects.ToolboxTool","com.azure.ai.agents.models.ToolboxToolType":"Azure.AI.Projects.ToolboxToolType","com.azure.ai.agents.models.ToolboxVersionDetails":"Azure.AI.Projects.ToolboxVersionObject","com.azure.ai.agents.models.ToolboxVersions":"Azure.AI.Projects.ToolboxVersions","com.azure.ai.agents.models.TranscriptTextInputTokenDetails":"OpenAI.TranscriptTextUsageTokensInputTokenDetails","com.azure.ai.agents.models.TranscriptTextUsage":"OpenAI.CreateTranscriptionResponseJsonUsage","com.azure.ai.agents.models.TranscriptTextUsageDuration":"OpenAI.TranscriptTextUsageDuration","com.azure.ai.agents.models.TranscriptTextUsageTokens":"OpenAI.TranscriptTextUsageTokens","com.azure.ai.agents.models.TranscriptTextUsageType":"OpenAI.CreateTranscriptionResponseJsonUsageType","com.azure.ai.agents.models.TranscriptionLanguage":"OpenAI.TranscriptionLanguage","com.azure.ai.agents.models.TwilioTelephonyBinding":"Azure.AI.Projects.TwilioTelephonyBinding","com.azure.ai.agents.models.TwilioTelephonyBindingListItem":"Azure.AI.Projects.TwilioTelephonyBindingListItem","com.azure.ai.agents.models.UpdateAgentDetailsOptions":"Azure.AI.Projects.patchAgentObject.Request.anonymous","com.azure.ai.agents.models.UpdateTelephonyBindingInput":"Azure.AI.Projects.UpdateTelephonyBindingRequest","com.azure.ai.agents.models.UserConversationSimulationAudioEffect":"Azure.AI.Projects.UserConversationSimulationAudioEffect","com.azure.ai.agents.models.UserConversationSimulationAudioEffectsConfiguration":"Azure.AI.Projects.UserConversationSimulationAudioEffectsConfiguration","com.azure.ai.agents.models.UserConversationSimulationConfiguration":"Azure.AI.Projects.UserConversationSimulationConfiguration","com.azure.ai.agents.models.UserConversationSimulationDefaultInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationDefaultInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationTestCase":"Azure.AI.Projects.UserConversationSimulationTestCase","com.azure.ai.agents.models.UserConversationSimulationUserBehaviorConfiguration":"Azure.AI.Projects.UserConversationSimulationUserBehaviorConfiguration","com.azure.ai.agents.models.UserProfileMemoryItem":"Azure.AI.Projects.UserProfileMemoryItem","com.azure.ai.agents.models.VersionIndicator":"Azure.AI.Projects.VersionIndicator","com.azure.ai.agents.models.VersionIndicatorType":"Azure.AI.Projects.VersionIndicatorType","com.azure.ai.agents.models.VersionRefIndicator":"Azure.AI.Projects.VersionRefIndicator","com.azure.ai.agents.models.VersionSelectionRule":"Azure.AI.Projects.VersionSelectionRule","com.azure.ai.agents.models.VersionSelector":"Azure.AI.Projects.VersionSelector","com.azure.ai.agents.models.VersionSelectorType":"Azure.AI.Projects.VersionSelectorType","com.azure.ai.agents.models.VoiceAgentAnimationConfiguration":"Azure.AI.Projects.VoiceAgentAnimationConfig","com.azure.ai.agents.models.VoiceAgentAnimationOutputType":"Azure.AI.Projects.VoiceAgentAnimationOutputType","com.azure.ai.agents.models.VoiceAgentAudioConfiguration":"Azure.AI.Projects.VoiceAgentAudioConfig","com.azure.ai.agents.models.VoiceAgentAudioInputConfiguration":"Azure.AI.Projects.VoiceAgentAudioInputConfig","com.azure.ai.agents.models.VoiceAgentAudioOutputConfiguration":"Azure.AI.Projects.VoiceAgentAudioOutputConfig","com.azure.ai.agents.models.VoiceAgentAudioTimestampType":"Azure.AI.Projects.VoiceAgentAudioTimestampType","com.azure.ai.agents.models.VoiceAgentAvatarConfiguration":"Azure.AI.Projects.VoiceAgentAvatarConfig","com.azure.ai.agents.models.VoiceAgentAvatarIceServer":"Azure.AI.Projects.VoiceAgentAvatarIceServer","com.azure.ai.agents.models.VoiceAgentAvatarOutputProtocol":"Azure.AI.Projects.VoiceAgentAvatarOutputProtocol","com.azure.ai.agents.models.VoiceAgentAvatarScene":"Azure.AI.Projects.VoiceAgentAvatarScene","com.azure.ai.agents.models.VoiceAgentAvatarType":"Azure.AI.Projects.VoiceAgentAvatarType","com.azure.ai.agents.models.VoiceAgentAvatarVideoBackground":"Azure.AI.Projects.VoiceAgentAvatarVideoBackground","com.azure.ai.agents.models.VoiceAgentAvatarVideoCrop":"Azure.AI.Projects.VoiceAgentAvatarVideoCrop","com.azure.ai.agents.models.VoiceAgentAvatarVideoParameters":"Azure.AI.Projects.VoiceAgentAvatarVideoParams","com.azure.ai.agents.models.VoiceAgentAvatarVideoResolution":"Azure.AI.Projects.VoiceAgentAvatarVideoResolution","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadEnglishTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadEnTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadMultilingualTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadMultilingualTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentDefinition":"Azure.AI.Projects.VoiceAgentDefinition","com.azure.ai.agents.models.VoiceAgentEchoCancellation":"Azure.AI.Projects.VoiceAgentEchoCancellation","com.azure.ai.agents.models.VoiceAgentEchoCancellationReferenceSource":"Azure.AI.Projects.VoiceAgentEchoCancellationReferenceSource","com.azure.ai.agents.models.VoiceAgentEndConversationSystemTool":"Azure.AI.Projects.VoiceAgentEndConversationSystemTool","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetection":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetection","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetectionModel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetectionModel","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceThresholdLevel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceThresholdLevel","com.azure.ai.agents.models.VoiceAgentFunctionTool":"Azure.AI.Projects.VoiceAgentFunctionTool","com.azure.ai.agents.models.VoiceAgentFunctionToolType1":null,"com.azure.ai.agents.models.VoiceAgentGreetingConfiguration":"Azure.AI.Projects.VoiceAgentGreetingConfig","com.azure.ai.agents.models.VoiceAgentInputTranscription":"Azure.AI.Projects.VoiceAgentInputTranscription","com.azure.ai.agents.models.VoiceAgentInputTranscriptionModel":"Azure.AI.Projects.VoiceAgentInputTranscriptionModel","com.azure.ai.agents.models.VoiceAgentInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentInterimResponseTrigger":"Azure.AI.Projects.VoiceAgentInterimResponseTrigger","com.azure.ai.agents.models.VoiceAgentLlmGeneratedGreetingConfiguration":"Azure.AI.Projects.VoiceAgentLlmGeneratedGreetingConfig","com.azure.ai.agents.models.VoiceAgentLlmInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentLlmInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentMcpTool":"Azure.AI.Projects.VoiceAgentMcpTool","com.azure.ai.agents.models.VoiceAgentNoiseReduction":"Azure.AI.Projects.VoiceAgentNoiseReduction","com.azure.ai.agents.models.VoiceAgentNoiseReductionType":"Azure.AI.Projects.VoiceAgentNoiseReductionType","com.azure.ai.agents.models.VoiceAgentRealtimeResponse":"Azure.AI.Projects.VoiceAgentRealtimeResponse","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDone","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDone","com.azure.ai.agents.models.VoiceAgentResponseAudioConfig":"TypeSpec.PickProperties","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDelta","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDone","com.azure.ai.agents.models.VoiceAgentResponseCreateOptions":"Azure.AI.Projects.VoiceAgentResponseCreateParams","com.azure.ai.agents.models.VoiceAgentResponseVideoDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseVideoDelta","com.azure.ai.agents.models.VoiceAgentRtcCallErrorDetails":"Azure.AI.Projects.VoiceAgentRtcCallErrorDetails","com.azure.ai.agents.models.VoiceAgentRtcCallErrorEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallError","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreateEvent":"Azure.AI.Projects.VoiceAgentClientEventRtcCallSdpCreate","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreatedEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallSdpCreated","com.azure.ai.agents.models.VoiceAgentSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentServerVadTurnDetection":"Azure.AI.Projects.VoiceAgentServerVadTurnDetection","com.azure.ai.agents.models.VoiceAgentSessionAvatarConfiguration":"Azure.AI.Projects.VoiceAgentSessionAvatarConfig","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectEvent":"Azure.AI.Projects.VoiceAgentClientEventSessionAvatarConnect","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarConnecting","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToIdleEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToIdle","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToSpeakingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToSpeaking","com.azure.ai.agents.models.VoiceAgentSessionIncludeOption":"Azure.AI.Projects.VoiceAgentSessionIncludeOption","com.azure.ai.agents.models.VoiceAgentSessionResponseConfiguration":"Azure.AI.Projects.VoiceAgentSessionResponseConfig","com.azure.ai.agents.models.VoiceAgentSessionSubagentAbortedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentAborted","com.azure.ai.agents.models.VoiceAgentSessionSubagentCompletedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentCompleted","com.azure.ai.agents.models.VoiceAgentSessionSubagentStartedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentStarted","com.azure.ai.agents.models.VoiceAgentSessionUpdateConfiguration":"Azure.AI.Projects.VoiceAgentSessionUpdateConfig","com.azure.ai.agents.models.VoiceAgentStaticInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentStaticInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentSubagent":"Azure.AI.Projects.VoiceAgentSubagent","com.azure.ai.agents.models.VoiceAgentSubagentAbortReason":"Azure.AI.Projects.VoiceAgentSubagentAbortReason","com.azure.ai.agents.models.VoiceAgentSubagentConfiguration":"Azure.AI.Projects.VoiceAgentSubagentConfig","com.azure.ai.agents.models.VoiceAgentSubagentResponsePolicy":"Azure.AI.Projects.VoiceAgentSubagentResponsePolicy","com.azure.ai.agents.models.VoiceAgentSystemTool":"Azure.AI.Projects.VoiceAgentSystemTool","com.azure.ai.agents.models.VoiceAgentSystemToolName":"Azure.AI.Projects.VoiceAgentSystemToolName","com.azure.ai.agents.models.VoiceAgentTemplateGreetingConfiguration":"Azure.AI.Projects.VoiceAgentTemplateGreetingConfig","com.azure.ai.agents.models.VoiceAgentTool":"Azure.AI.Projects.VoiceAgentTool","com.azure.ai.agents.models.VoiceAgentToolResponseScheduling":"Azure.AI.Projects.VoiceAgentToolResponseScheduling","com.azure.ai.agents.models.VoiceAgentToolboxTool":"Azure.AI.Projects.VoiceAgentToolboxTool","com.azure.ai.agents.models.VoiceAgentTranscriptionPhrase":"Azure.AI.Projects.VoiceAgentTranscriptionPhrase","com.azure.ai.agents.models.VoiceAgentTranscriptionWord":"Azure.AI.Projects.VoiceAgentTranscriptionWord","com.azure.ai.agents.models.VoiceAgentTransport":"Azure.AI.Projects.VoiceAgentTransport","com.azure.ai.agents.models.VoiceAgentTurnDetectionConfiguration":"Azure.AI.Projects.VoiceAgentTurnDetectionConfig","com.azure.ai.agents.models.VoiceAgentTurnDetectionType":"Azure.AI.Projects.VoiceAgentTurnDetectionType","com.azure.ai.agents.models.VoiceAgentWarningDetails":"Azure.AI.Projects.VoiceAgentServerEventWarningDetails","com.azure.ai.agents.models.VoiceAgentWarningEvent":"Azure.AI.Projects.VoiceAgentServerEventWarning","com.azure.ai.agents.models.VoiceAudioCodec":"Azure.AI.Projects.VoiceAudioCodec","com.azure.ai.agents.models.VoiceAudioContainerFormat":"Azure.AI.Projects.VoiceAudioContainerFormat","com.azure.ai.agents.models.VoiceAudioItem":"Azure.AI.Projects.VoiceAudioItem","com.azure.ai.agents.models.VoiceAudioRole":"Azure.AI.Projects.VoiceAudioRole","com.azure.ai.agents.models.VoiceConversation":"Azure.AI.Projects.VoiceConversation","com.azure.ai.agents.models.VoiceConversationEngine":"Azure.AI.Projects.VoiceConversationEngine","com.azure.ai.agents.models.VoiceConversationStatus":"Azure.AI.Projects.VoiceConversationStatus","com.azure.ai.agents.models.VoiceGeneratedAudioItem":"Azure.AI.Projects.VoiceGeneratedAudioItem","com.azure.ai.agents.models.VoiceHostedAgentConversationEngine":"Azure.AI.Projects.VoiceHostedAgentConversationEngine","com.azure.ai.agents.models.VoiceIds":"OpenAI.VoiceIdsShared","com.azure.ai.agents.models.VoiceModelType":"Azure.AI.Projects.VoiceModelType","com.azure.ai.agents.models.VoiceOutputModality":"Azure.AI.Projects.VoiceOutputModality","com.azure.ai.agents.models.VoiceRecording":"Azure.AI.Projects.VoiceRecording","com.azure.ai.agents.models.VoiceRecordingChannelLayout":"Azure.AI.Projects.VoiceRecordingChannelLayout","com.azure.ai.agents.models.VoiceResponse":"Azure.AI.Projects.VoiceResponse","com.azure.ai.agents.models.VoiceResponseAudio":"Azure.AI.Projects.VoiceResponseAudio","com.azure.ai.agents.models.VoiceResponseAudioOutput":"Azure.AI.Projects.VoiceResponseAudioOutput","com.azure.ai.agents.models.VoiceResponseObjectType":null,"com.azure.ai.agents.models.VoiceType":"Azure.AI.Projects.VoiceType","com.azure.ai.agents.models.WebIqPreviewTool":"Azure.AI.Projects.WebIQPreviewTool","com.azure.ai.agents.models.WebIqPreviewToolboxTool":"Azure.AI.Projects.WebIQPreviewToolboxTool","com.azure.ai.agents.models.WebSearchApproximateLocation":"OpenAI.WebSearchApproximateLocation","com.azure.ai.agents.models.WebSearchConfiguration":"Azure.AI.Projects.WebSearchConfiguration","com.azure.ai.agents.models.WebSearchPreviewTool":"OpenAI.WebSearchPreviewTool","com.azure.ai.agents.models.WebSearchTool":"OpenAI.WebSearchTool","com.azure.ai.agents.models.WebSearchToolFilters":"OpenAI.WebSearchToolFilters","com.azure.ai.agents.models.WebSearchToolSearchContextSize":"WebSearchToolSearchContextSizeExpandable","com.azure.ai.agents.models.WebSearchToolboxTool":"Azure.AI.Projects.WebSearchToolboxTool","com.azure.ai.agents.models.WorkIqPreviewTool":"Azure.AI.Projects.WorkIQPreviewTool","com.azure.ai.agents.models.WorkIqPreviewToolboxTool":"Azure.AI.Projects.WorkIQPreviewToolboxTool","com.azure.ai.agents.models.WorkflowAgentDefinition":"Azure.AI.Projects.WorkflowAgentDefinition"},"generatedFiles":["src/main/java/com/azure/ai/agents/AgentsAsyncClient.java","src/main/java/com/azure/ai/agents/AgentsClient.java","src/main/java/com/azure/ai/agents/AgentsClientBuilder.java","src/main/java/com/azure/ai/agents/AgentsServiceVersion.java","src/main/java/com/azure/ai/agents/BetaAgentsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaAgentsClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresAsyncClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java","src/main/java/com/azure/ai/agents/ToolboxesAsyncClient.java","src/main/java/com/azure/ai/agents/ToolboxesClient.java","src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java","src/main/java/com/azure/ai/agents/implementation/AgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaAgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaMemoryStoresImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java","src/main/java/com/azure/ai/agents/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/agents/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/agents/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/PollingUtils.java","src/main/java/com/azure/ai/agents/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/ToolboxesImpl.java","src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromCodeContent.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentOptions.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateSessionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateToolboxVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/GetMicrosoft365AppPackageRequest.java","src/main/java/com/azure/ai/agents/implementation/models/ListMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/PublishAgentToMicrosoft365Request.java","src/main/java/com/azure/ai/agents/implementation/models/ReplaceTelephonyTransferTargetsRequest.java","src/main/java/com/azure/ai/agents/implementation/models/SearchMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/TransferTelephonyCallRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxInput.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxRequest.java","src/main/java/com/azure/ai/agents/implementation/models/package-info.java","src/main/java/com/azure/ai/agents/implementation/package-info.java","src/main/java/com/azure/ai/agents/models/A2APreviewTool.java","src/main/java/com/azure/ai/agents/models/A2APreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/A2AProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/A2AProtocolVersion.java","src/main/java/com/azure/ai/agents/models/A2ATool.java","src/main/java/com/azure/ai/agents/models/A2AToolCall.java","src/main/java/com/azure/ai/agents/models/A2AToolCallOutput.java","src/main/java/com/azure/ai/agents/models/A2AToolboxTool.java","src/main/java/com/azure/ai/agents/models/AISearchIndexResource.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolAccessBoundary.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReference.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReferenceType.java","src/main/java/com/azure/ai/agents/models/AgentCard.java","src/main/java/com/azure/ai/agents/models/AgentCardSkill.java","src/main/java/com/azure/ai/agents/models/AgentDefinition.java","src/main/java/com/azure/ai/agents/models/AgentDetails.java","src/main/java/com/azure/ai/agents/models/AgentDetailsVersions.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationSchemeType.java","src/main/java/com/azure/ai/agents/models/AgentEndpointConfig.java","src/main/java/com/azure/ai/agents/models/AgentEndpointProtocol.java","src/main/java/com/azure/ai/agents/models/AgentHarness.java","src/main/java/com/azure/ai/agents/models/AgentIdentity.java","src/main/java/com/azure/ai/agents/models/AgentIdentityStatus.java","src/main/java/com/azure/ai/agents/models/AgentKind.java","src/main/java/com/azure/ai/agents/models/AgentObjectType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationAgentCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationBaselineAgentConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateEvaluation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateExpand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidatePromotionInfo.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateStatus.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationBase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCostEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationDataSourceType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateBand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateInputs.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSetType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluatorReference.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationFoundryAgentTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationGoal.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationInstructionsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJob.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobLatency.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobTokenUsage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationPromptCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationResultCandidateSummary.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkill.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkillsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSpace.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStageEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionTestCase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTerminationReason.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationToolsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentReference.java","src/main/java/com/azure/ai/agents/models/AgentSessionResource.java","src/main/java/com/azure/ai/agents/models/AgentSessionStatus.java","src/main/java/com/azure/ai/agents/models/AgentState.java","src/main/java/com/azure/ai/agents/models/AgentStateSource.java","src/main/java/com/azure/ai/agents/models/AgentVersionDetails.java","src/main/java/com/azure/ai/agents/models/AgentVersionStatus.java","src/main/java/com/azure/ai/agents/models/ApiError.java","src/main/java/com/azure/ai/agents/models/ApplyPatchToolParameter.java","src/main/java/com/azure/ai/agents/models/ApproximateLocation.java","src/main/java/com/azure/ai/agents/models/AudioTranscription.java","src/main/java/com/azure/ai/agents/models/AudioTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/AutoCodeInterpreterToolParameter.java","src/main/java/com/azure/ai/agents/models/AzureAISearchQueryType.java","src/main/java/com/azure/ai/agents/models/AzureAISearchTool.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCall.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolResource.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseDetails.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseOptions.java","src/main/java/com/azure/ai/agents/models/AzureFunctionBinding.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinitionDetails.java","src/main/java/com/azure/ai/agents/models/AzureFunctionStorageQueue.java","src/main/java/com/azure/ai/agents/models/AzureFunctionTool.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCall.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureUserSecurityContext.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCall.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingTool.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BotServiceAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceRbacAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceTenantAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCall.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolConnectionParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolboxTool.java","src/main/java/com/azure/ai/agents/models/CallableToolAllowedCaller.java","src/main/java/com/azure/ai/agents/models/CaptureStructuredOutputsTool.java","src/main/java/com/azure/ai/agents/models/ChatSummaryMemoryItem.java","src/main/java/com/azure/ai/agents/models/CodeConfiguration.java","src/main/java/com/azure/ai/agents/models/CodeDependencyResolution.java","src/main/java/com/azure/ai/agents/models/CodeFileDetails.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterTool.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolboxTool.java","src/main/java/com/azure/ai/agents/models/ComputerEnvironment.java","src/main/java/com/azure/ai/agents/models/ComputerTool.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewTool.java","src/main/java/com/azure/ai/agents/models/ContainerAutoParameter.java","src/main/java/com/azure/ai/agents/models/ContainerConfiguration.java","src/main/java/com/azure/ai/agents/models/ContainerMemoryLimit.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyAllowlistParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDisabledParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDomainSecretParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParamType.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParameter.java","src/main/java/com/azure/ai/agents/models/ContainerSkill.java","src/main/java/com/azure/ai/agents/models/ContainerSkillType.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeContent.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeMetadata.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionOptions.java","src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensibilityTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java","src/main/java/com/azure/ai/agents/models/CreateTwilioTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CustomGrammarFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomTextFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormat.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormatType.java","src/main/java/com/azure/ai/agents/models/CustomToolParameter.java","src/main/java/com/azure/ai/agents/models/DigitalWorkerType.java","src/main/java/com/azure/ai/agents/models/EntraAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/EvaluationAzureStandardVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/ExternalAgentDefinition.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCall.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCallOutput.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolParameters.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/FileSearchTool.java","src/main/java/com/azure/ai/agents/models/FileSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/FixedRatioVersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironment.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironmentType.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentContainerReferenceParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentLocalEnvironmentParameter.java","src/main/java/com/azure/ai/agents/models/FunctionTool.java","src/main/java/com/azure/ai/agents/models/GetMicrosoft365AppPackageOptions.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotBuiltInTool.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotHarness.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java","src/main/java/com/azure/ai/agents/models/GrammarSyntax.java","src/main/java/com/azure/ai/agents/models/HeaderTelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/HybridSearchOptions.java","src/main/java/com/azure/ai/agents/models/ImageGenActionEnum.java","src/main/java/com/azure/ai/agents/models/ImageGenTool.java","src/main/java/com/azure/ai/agents/models/ImageGenToolBackground.java","src/main/java/com/azure/ai/agents/models/ImageGenToolInputImageMask.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModel.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModeration.java","src/main/java/com/azure/ai/agents/models/ImageGenToolOutputFormat.java","src/main/java/com/azure/ai/agents/models/ImageGenToolQuality.java","src/main/java/com/azure/ai/agents/models/ImageGenToolSize.java","src/main/java/com/azure/ai/agents/models/IncludeEnum.java","src/main/java/com/azure/ai/agents/models/InlineSkillParameter.java","src/main/java/com/azure/ai/agents/models/InlineSkillSourceParameter.java","src/main/java/com/azure/ai/agents/models/InputFidelity.java","src/main/java/com/azure/ai/agents/models/InvocationsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/InvocationsWsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/JobStatus.java","src/main/java/com/azure/ai/agents/models/ListMemoriesOptions.java","src/main/java/com/azure/ai/agents/models/LocalShellToolParameter.java","src/main/java/com/azure/ai/agents/models/LocalSkillParameter.java","src/main/java/com/azure/ai/agents/models/ManagedAgentIdentityBlueprintReference.java","src/main/java/com/azure/ai/agents/models/McpListToolsTool.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolAnnotations.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolInputSchema.java","src/main/java/com/azure/ai/agents/models/McpProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/McpTool.java","src/main/java/com/azure/ai/agents/models/McpToolConnectorId.java","src/main/java/com/azure/ai/agents/models/McpToolFilter.java","src/main/java/com/azure/ai/agents/models/McpToolRequireApproval.java","src/main/java/com/azure/ai/agents/models/McpToolboxTool.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCallOutput.java","src/main/java/com/azure/ai/agents/models/MemoryItem.java","src/main/java/com/azure/ai/agents/models/MemoryItemKind.java","src/main/java/com/azure/ai/agents/models/MemoryOperation.java","src/main/java/com/azure/ai/agents/models/MemoryOperationKind.java","src/main/java/com/azure/ai/agents/models/MemorySearchItem.java","src/main/java/com/azure/ai/agents/models/MemorySearchOptions.java","src/main/java/com/azure/ai/agents/models/MemorySearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/MemorySearchToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultOptions.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreKind.java","src/main/java/com/azure/ai/agents/models/MemoryStoreObjectType.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsage.java","src/main/java/com/azure/ai/agents/models/MemoryStoreSearchResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateCompletedResult.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateStatus.java","src/main/java/com/azure/ai/agents/models/Microsoft365PermissionScopes.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishDefaults.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishResult.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishScope.java","src/main/java/com/azure/ai/agents/models/MicrosoftFabricPreviewTool.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttempt.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptError.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptResult.java","src/main/java/com/azure/ai/agents/models/ModelRouterDetails.java","src/main/java/com/azure/ai/agents/models/ModelRouterMode.java","src/main/java/com/azure/ai/agents/models/ModelSamplingParameters.java","src/main/java/com/azure/ai/agents/models/ModelSelectionDetails.java","src/main/java/com/azure/ai/agents/models/NamespaceTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAnonymousAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthType.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiTool.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCall.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCallOutput.java","src/main/java/com/azure/ai/agents/models/OpenApiToolboxTool.java","src/main/java/com/azure/ai/agents/models/OptimizationContext.java","src/main/java/com/azure/ai/agents/models/OptimizationContextType.java","src/main/java/com/azure/ai/agents/models/OtlpTelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/PageOrder.java","src/main/java/com/azure/ai/agents/models/ProceduralMemoryItem.java","src/main/java/com/azure/ai/agents/models/ProgrammaticToolCallingParameter.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinitionTextOptions.java","src/main/java/com/azure/ai/agents/models/PromptOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolVersionRecord.java","src/main/java/com/azure/ai/agents/models/PstnTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/PublishAgentToMicrosoft365Options.java","src/main/java/com/azure/ai/agents/models/PublishApprovalStatus.java","src/main/java/com/azure/ai/agents/models/RaiConfig.java","src/main/java/com/azure/ai/agents/models/RaiInvocationContentType.java","src/main/java/com/azure/ai/agents/models/RaiInvocationModeration.java","src/main/java/com/azure/ai/agents/models/RaiInvocationResponseMode.java","src/main/java/com/azure/ai/agents/models/RaiSseTextSelector.java","src/main/java/com/azure/ai/agents/models/RankerVersionType.java","src/main/java/com/azure/ai/agents/models/RankingOptions.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormatType.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItem.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAssistantMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeleteEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCall.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCallOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionSegmentEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessageType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemObjectType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrieveEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrievedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemSystemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemUserMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeErrorEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferAppendEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommitEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommittedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferDtmfReceivedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferTimeoutTriggeredEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalInput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpErrorType.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpHttpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListTools.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpProtocolError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolCall.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolExecutionError.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimePcmAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmaAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmuAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeRateLimitsUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCancelEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPart.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfigurationBase.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreateRequestGAAudioOutputVoice.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionTracingConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionType.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/ReminderPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ResponseFormatJsonSchemaInner.java","src/main/java/com/azure/ai/agents/models/ResponseUsageInputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponseUsageOutputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponsesProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingTraceEntry.java","src/main/java/com/azure/ai/agents/models/SearchContentType.java","src/main/java/com/azure/ai/agents/models/SearchContextSize.java","src/main/java/com/azure/ai/agents/models/SessionAffinityConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDecision.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDetails.java","src/main/java/com/azure/ai/agents/models/SessionAffinityMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinityRequestMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinitySource.java","src/main/java/com/azure/ai/agents/models/SessionConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionDirectoryEntry.java","src/main/java/com/azure/ai/agents/models/SessionFileWriteResult.java","src/main/java/com/azure/ai/agents/models/SessionLogEvent.java","src/main/java/com/azure/ai/agents/models/SessionLogEventType.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolParameters.java","src/main/java/com/azure/ai/agents/models/SharepointPreviewTool.java","src/main/java/com/azure/ai/agents/models/ShellToolboxTool.java","src/main/java/com/azure/ai/agents/models/SipTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/SkillReference.java","src/main/java/com/azure/ai/agents/models/SkillReferenceParameter.java","src/main/java/com/azure/ai/agents/models/SteeringPromptOptimizationContext.java","src/main/java/com/azure/ai/agents/models/StructuredInputDefinition.java","src/main/java/com/azure/ai/agents/models/StructuredOutputDefinition.java","src/main/java/com/azure/ai/agents/models/TargetAttribute.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TeamsTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelemetryConfig.java","src/main/java/com/azure/ai/agents/models/TelemetryDataKind.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuthType.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointKind.java","src/main/java/com/azure/ai/agents/models/TelemetryTransportProtocol.java","src/main/java/com/azure/ai/agents/models/TelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallDurationBasis.java","src/main/java/com/azure/ai/agents/models/TelephonyCallEndReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobCancellation.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobSchedule.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobTerminalReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEvent.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventName.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventOutcome.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallPhase.java","src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java","src/main/java/com/azure/ai/agents/models/TelephonyCallStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallSummary.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTimestampSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTiming.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTrace.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceMode.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestinationType.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundFixedIntervalRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicyType.java","src/main/java/com/azure/ai/agents/models/TelephonyProvider.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestinationKind.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTarget.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTargets.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfiguration.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatJsonObject.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatText.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationType.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatJsonSchema.java","src/main/java/com/azure/ai/agents/models/Tool.java","src/main/java/com/azure/ai/agents/models/ToolCallStatus.java","src/main/java/com/azure/ai/agents/models/ToolConfig.java","src/main/java/com/azure/ai/agents/models/ToolProjectConnection.java","src/main/java/com/azure/ai/agents/models/ToolSearchExecutionType.java","src/main/java/com/azure/ai/agents/models/ToolSearchTool.java","src/main/java/com/azure/ai/agents/models/ToolSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxPolicies.java","src/main/java/com/azure/ai/agents/models/ToolboxSearchPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerAutoEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerReferenceEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicy.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicyDisabled.java","src/main/java/com/azure/ai/agents/models/ToolboxSkill.java","src/main/java/com/azure/ai/agents/models/ToolboxSkillReference.java","src/main/java/com/azure/ai/agents/models/ToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxVersionDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxVersions.java","src/main/java/com/azure/ai/agents/models/TranscriptTextInputTokenDetails.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsage.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageDuration.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageTokens.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageType.java","src/main/java/com/azure/ai/agents/models/TranscriptionLanguage.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/UpdateAgentDetailsOptions.java","src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffect.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffectsConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationDefaultInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationTestCase.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationUserBehaviorConfiguration.java","src/main/java/com/azure/ai/agents/models/UserProfileMemoryItem.java","src/main/java/com/azure/ai/agents/models/VersionIndicator.java","src/main/java/com/azure/ai/agents/models/VersionIndicatorType.java","src/main/java/com/azure/ai/agents/models/VersionRefIndicator.java","src/main/java/com/azure/ai/agents/models/VersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/VersionSelector.java","src/main/java/com/azure/ai/agents/models/VersionSelectorType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationOutputType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioInputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioOutputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioTimestampType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarIceServer.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarOutputProtocol.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarScene.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoBackground.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoCrop.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoParameters.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoResolution.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadEnglishTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadMultilingualTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentDefinition.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellation.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellationReferenceSource.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndConversationSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetectionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceThresholdLevel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionToolType1.java","src/main/java/com/azure/ai/agents/models/VoiceAgentGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscription.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseTrigger.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmGeneratedGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReduction.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReductionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioConfig.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseVideoDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreateEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreatedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToIdleEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToSpeakingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionIncludeOption.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentAbortedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentCompletedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentStartedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionUpdateConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentStaticInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentAbortReason.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentResponsePolicy.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemToolName.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTemplateGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolResponseScheduling.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolboxTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionPhrase.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionWord.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTransport.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAudioCodec.java","src/main/java/com/azure/ai/agents/models/VoiceAudioContainerFormat.java","src/main/java/com/azure/ai/agents/models/VoiceAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceAudioRole.java","src/main/java/com/azure/ai/agents/models/VoiceConversation.java","src/main/java/com/azure/ai/agents/models/VoiceConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceConversationStatus.java","src/main/java/com/azure/ai/agents/models/VoiceGeneratedAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceHostedAgentConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceIds.java","src/main/java/com/azure/ai/agents/models/VoiceModelType.java","src/main/java/com/azure/ai/agents/models/VoiceOutputModality.java","src/main/java/com/azure/ai/agents/models/VoiceRecording.java","src/main/java/com/azure/ai/agents/models/VoiceRecordingChannelLayout.java","src/main/java/com/azure/ai/agents/models/VoiceResponse.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudio.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudioOutput.java","src/main/java/com/azure/ai/agents/models/VoiceResponseObjectType.java","src/main/java/com/azure/ai/agents/models/VoiceType.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WebSearchApproximateLocation.java","src/main/java/com/azure/ai/agents/models/WebSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebSearchTool.java","src/main/java/com/azure/ai/agents/models/WebSearchToolFilters.java","src/main/java/com/azure/ai/agents/models/WebSearchToolSearchContextSize.java","src/main/java/com/azure/ai/agents/models/WebSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkflowAgentDefinition.java","src/main/java/com/azure/ai/agents/models/package-info.java","src/main/java/com/azure/ai/agents/package-info.java","src/main/java/module-info.java"]}
\ No newline at end of file
diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/RealtimeOpenAIDedupSerializationTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/RealtimeOpenAIDedupSerializationTests.java
index f9e2b73b4887..d328f824011f 100644
--- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/RealtimeOpenAIDedupSerializationTests.java
+++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/RealtimeOpenAIDedupSerializationTests.java
@@ -182,19 +182,10 @@ public void testStatusAndUsageRoundTripThroughPolymorphicServerEvent() throws IO
 
     @Test
     public void testStatusAndUsageAcrossVoiceResponseModels() throws IOException {
-        VoiceResponseBase responseBase;
-        VoiceAgentRealtimeResponseBase realtimeResponseBase;
         VoiceAgentRealtimeResponse realtimeResponse;
         VoiceResponse response;
         VoiceConversation conversation;
 
-        try (JsonReader reader = JsonProviders.createReader(RESPONSE_FIELDS_JSON)) {
-            responseBase = VoiceResponseBase.fromJson(reader);
-        }
-        try (
-            JsonReader reader = JsonProviders.createReader("{\"id\":\"resp_1\"," + RESPONSE_FIELDS_JSON.substring(1))) {
-            realtimeResponseBase = VoiceAgentRealtimeResponseBase.fromJson(reader);
-        }
         try (
             JsonReader reader = JsonProviders.createReader("{\"id\":\"resp_1\"," + RESPONSE_FIELDS_JSON.substring(1))) {
             realtimeResponse = VoiceAgentRealtimeResponse.fromJson(reader);
@@ -208,14 +199,10 @@ public void testStatusAndUsageAcrossVoiceResponseModels() throws IOException {
             conversation = VoiceConversation.fromJson(reader);
         }
 
-        assertResponseFields(responseBase.getStatusDetails(), responseBase.getUsage());
-        assertResponseFields(realtimeResponseBase.getStatusDetails(), realtimeResponseBase.getUsage());
         assertResponseFields(realtimeResponse.getStatusDetails(), realtimeResponse.getUsage());
         assertResponseFields(response.getStatusDetails(), response.getUsage());
         assertUsage(conversation.getUsage());
 
-        assertStable(responseBase, VoiceResponseBase::fromJson);
-        assertStable(realtimeResponseBase, VoiceAgentRealtimeResponseBase::fromJson);
         assertStable(realtimeResponse, VoiceAgentRealtimeResponse::fromJson);
         assertStable(response, VoiceResponse::fromJson);
         assertStable(conversation, VoiceConversation::fromJson);
@@ -223,9 +210,9 @@ public void testStatusAndUsageAcrossVoiceResponseModels() throws IOException {
 
     @Test
     public void testAbsentStatusAndUsageRemainAbsent() throws IOException {
-        VoiceAgentRealtimeResponseBase response;
+        VoiceAgentRealtimeResponse response;
         try (JsonReader reader = JsonProviders.createReader("{\"id\":\"resp_1\"}")) {
-            response = VoiceAgentRealtimeResponseBase.fromJson(reader);
+            response = VoiceAgentRealtimeResponse.fromJson(reader);
         }
 
         assertNull(response.getStatusDetails());
diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/RealtimeStandaloneOpenAIDedupSerializationTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/RealtimeStandaloneOpenAIDedupSerializationTests.java
index d76826ccc381..13cf3c1537e9 100644
--- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/RealtimeStandaloneOpenAIDedupSerializationTests.java
+++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/RealtimeStandaloneOpenAIDedupSerializationTests.java
@@ -345,8 +345,8 @@ public void testRealtimeResponseEnumsAndAbsentValues() throws IOException {
                 RealtimeResponse.OutputModality.AUDIO }) {
                 String json = "{\"object\":\"realtime.response\",\"status\":\"" + status.asString()
                     + "\",\"output_modalities\":[\"" + modality.asString() + "\"]}";
-                VoiceResponseBase result = deserialize(json, VoiceResponseBase::fromJson);
-                assertEquals(VoiceResponseBaseObject.REALTIME_RESPONSE, result.getObject());
+                VoiceResponse result = deserialize(json, VoiceResponse::fromJson);
+                assertEquals(VoiceResponseObjectType.REALTIME_RESPONSE, result.getObjectType());
                 assertEquals(status, result.getStatus());
                 assertEquals(modality, result.getOutputModalities().get(0));
                 assertEquals(json, serialize(result));
diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/ReasoningDedupSerializationTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/ReasoningDedupSerializationTests.java
index 3681f96b73ce..dcd68f574395 100644
--- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/ReasoningDedupSerializationTests.java
+++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/ReasoningDedupSerializationTests.java
@@ -40,21 +40,20 @@ public void testVoiceResponseAudioConfigRoundTrip() throws IOException {
     public void testVoiceRealtimeResponseObjectRoundTrip() throws IOException {
         try (JsonReader reader = JsonProviders.createReader("{\"object\":\"realtime.response\"}")) {
             VoiceAgentRealtimeResponse response = VoiceAgentRealtimeResponse.fromJson(reader);
-            assertEquals(VoiceResponseBaseObject.REALTIME_RESPONSE, response.getObject());
+            assertEquals(VoiceResponseObjectType.REALTIME_RESPONSE, response.getObjectType());
             VoiceAgentRealtimeResponse roundTrip
                 = BinaryData.fromObject(response).toObject(VoiceAgentRealtimeResponse.class);
-            assertEquals(response.getObject(), roundTrip.getObject());
+            assertEquals(response.getObjectType(), roundTrip.getObjectType());
         }
     }
 
     @Test
-    public void testVoiceRealtimeResponseBaseObjectRoundTrip() throws IOException {
+    public void testVoiceResponseObjectTypeRoundTrip() throws IOException {
         try (JsonReader reader = JsonProviders.createReader("{\"object\":\"realtime.response\"}")) {
-            VoiceAgentRealtimeResponseBase response = VoiceAgentRealtimeResponseBase.fromJson(reader);
-            assertEquals(VoiceResponseBaseObject.REALTIME_RESPONSE, response.getObject());
-            VoiceAgentRealtimeResponseBase roundTrip
-                = BinaryData.fromObject(response).toObject(VoiceAgentRealtimeResponseBase.class);
-            assertEquals(response.getObject(), roundTrip.getObject());
+            VoiceResponse response = VoiceResponse.fromJson(reader);
+            assertEquals(VoiceResponseObjectType.REALTIME_RESPONSE, response.getObjectType());
+            VoiceResponse roundTrip = BinaryData.fromObject(response).toObject(VoiceResponse.class);
+            assertEquals(response.getObjectType(), roundTrip.getObjectType());
         }
     }
 
diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseBaseSerializationTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseBaseSerializationTests.java
deleted file mode 100644
index 09c688f29d71..000000000000
--- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseBaseSerializationTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.ai.agents.models;
-
-import org.junit.jupiter.api.Test;
-
-import java.io.IOException;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class VoiceAgentRealtimeResponseBaseSerializationTests {
-
-    @Test
-    public void maxOutputTokensVariantsRoundTrip() throws IOException {
-        VoiceAgentRealtimeResponseBase longResult = roundTrip("{\"max_output_tokens\":4096}");
-        assertEquals(4096L, longResult.getMaxOutputTokensAsLong());
-        assertNull(longResult.getMaxOutputTokensAsString());
-
-        VoiceAgentRealtimeResponseBase stringResult = roundTrip("{\"max_output_tokens\":\"inf\"}");
-        assertEquals("inf", stringResult.getMaxOutputTokensAsString());
-        assertNull(stringResult.getMaxOutputTokensAsLong());
-    }
-
-    @Test
-    public void absentMaxOutputTokensReturnsNull() throws IOException {
-        VoiceAgentRealtimeResponseBase response
-            = UnionTypeSerializationTestUtils.deserialize("{}", VoiceAgentRealtimeResponseBase::fromJson);
-        assertNull(response.getMaxOutputTokensAsLong());
-        assertNull(response.getMaxOutputTokensAsString());
-    }
-
-    private VoiceAgentRealtimeResponseBase roundTrip(String json) throws IOException {
-        VoiceAgentRealtimeResponseBase value
-            = UnionTypeSerializationTestUtils.deserialize(json, VoiceAgentRealtimeResponseBase::fromJson);
-        String serialized = UnionTypeSerializationTestUtils.serialize(value);
-        assertTrue(serialized.contains("\"max_output_tokens\""));
-        return UnionTypeSerializationTestUtils.deserialize(serialized, VoiceAgentRealtimeResponseBase::fromJson);
-    }
-}
diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseSerializationTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseSerializationTests.java
index 2037a905ce55..31492ab70625 100644
--- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseSerializationTests.java
+++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponseSerializationTests.java
@@ -8,13 +8,14 @@
 import java.io.IOException;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class VoiceAgentRealtimeResponseSerializationTests {
 
     @Test
-    public void shadowedMaxOutputTokensVariantsRoundTrip() throws IOException {
+    public void maxOutputTokensVariantsRoundTrip() throws IOException {
         VoiceAgentRealtimeResponse longResult = roundTrip("{\"max_output_tokens\":4096}");
         assertEquals(4096L, longResult.getMaxOutputTokensAsLong());
         assertNull(longResult.getMaxOutputTokensAsString());
@@ -32,6 +33,25 @@ public void absentMaxOutputTokensReturnsNull() throws IOException {
         assertNull(response.getMaxOutputTokensAsString());
     }
 
+    @Test
+    public void objectTypeRoundTripsUnderObjectWireName() throws IOException {
+        VoiceAgentRealtimeResponse response = UnionTypeSerializationTestUtils
+            .deserialize("{\"object\":\"realtime.response\"}", VoiceAgentRealtimeResponse::fromJson);
+        assertEquals(VoiceResponseObjectType.REALTIME_RESPONSE, response.getObjectType());
+
+        String serialized = UnionTypeSerializationTestUtils.serialize(response);
+        assertTrue(serialized.contains("\"object\":\"realtime.response\""));
+        assertFalse(serialized.contains("\"objectType\""));
+        assertEquals(response.getObjectType(),
+            UnionTypeSerializationTestUtils.deserialize(serialized, VoiceAgentRealtimeResponse::fromJson)
+                .getObjectType());
+        assertNull(
+            UnionTypeSerializationTestUtils.deserialize("{}", VoiceAgentRealtimeResponse::fromJson).getObjectType());
+        assertNull(
+            UnionTypeSerializationTestUtils.deserialize("{\"object\":null}", VoiceAgentRealtimeResponse::fromJson)
+                .getObjectType());
+    }
+
     private VoiceAgentRealtimeResponse roundTrip(String json) throws IOException {
         VoiceAgentRealtimeResponse value
             = UnionTypeSerializationTestUtils.deserialize(json, VoiceAgentRealtimeResponse::fromJson);
diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceResponseBaseSerializationTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceResponseBaseSerializationTests.java
deleted file mode 100644
index 9c592294c2ce..000000000000
--- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceResponseBaseSerializationTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.ai.agents.models;
-
-import org.junit.jupiter.api.Test;
-
-import java.io.IOException;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class VoiceResponseBaseSerializationTests {
-
-    @Test
-    public void maxOutputTokensVariantsRoundTrip() throws IOException {
-        VoiceResponseBase longResult = roundTrip("{\"max_output_tokens\":4096}");
-        assertEquals(4096L, longResult.getMaxOutputTokensAsLong());
-        assertNull(longResult.getMaxOutputTokensAsString());
-
-        VoiceResponseBase stringResult = roundTrip("{\"max_output_tokens\":\"inf\"}");
-        assertEquals("inf", stringResult.getMaxOutputTokensAsString());
-        assertNull(stringResult.getMaxOutputTokensAsLong());
-    }
-
-    @Test
-    public void absentMaxOutputTokensReturnsNull() throws IOException {
-        VoiceResponseBase response = UnionTypeSerializationTestUtils.deserialize("{}", VoiceResponseBase::fromJson);
-        assertNull(response.getMaxOutputTokensAsLong());
-        assertNull(response.getMaxOutputTokensAsString());
-    }
-
-    private VoiceResponseBase roundTrip(String json) throws IOException {
-        VoiceResponseBase value = UnionTypeSerializationTestUtils.deserialize(json, VoiceResponseBase::fromJson);
-        String serialized = UnionTypeSerializationTestUtils.serialize(value);
-        assertTrue(serialized.contains("\"max_output_tokens\""));
-        return UnionTypeSerializationTestUtils.deserialize(serialized, VoiceResponseBase::fromJson);
-    }
-}
diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceResponseSerializationTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceResponseSerializationTests.java
index 73805854ccb5..37a4960ae79d 100644
--- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceResponseSerializationTests.java
+++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceResponseSerializationTests.java
@@ -8,20 +8,19 @@
 import java.io.IOException;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class VoiceResponseSerializationTests {
 
     @Test
-    public void shadowedMaxOutputTokensVariantsRoundTrip() throws IOException {
-        VoiceResponse longResult
-            = roundTrip("{\"id\":\"response\",\"conversation_id\":\"conversation\",\"max_output_tokens\":4096}");
+    public void maxOutputTokensVariantsRoundTrip() throws IOException {
+        VoiceResponse longResult = roundTrip("{\"max_output_tokens\":4096}");
         assertEquals(4096L, longResult.getMaxOutputTokensAsLong());
         assertNull(longResult.getMaxOutputTokensAsString());
 
-        VoiceResponse stringResult
-            = roundTrip("{\"id\":\"response\",\"conversation_id\":\"conversation\",\"max_output_tokens\":\"inf\"}");
+        VoiceResponse stringResult = roundTrip("{\"max_output_tokens\":\"inf\"}");
         assertEquals("inf", stringResult.getMaxOutputTokensAsString());
         assertNull(stringResult.getMaxOutputTokensAsLong());
     }
@@ -34,6 +33,25 @@ public void absentMaxOutputTokensReturnsNull() throws IOException {
         assertNull(response.getMaxOutputTokensAsString());
     }
 
+    @Test
+    public void objectTypeRoundTripsUnderObjectWireName() throws IOException {
+        VoiceResponse response = UnionTypeSerializationTestUtils.deserialize(
+            "{\"id\":\"response\",\"conversation_id\":\"conversation\",\"object\":\"realtime.response\"}",
+            VoiceResponse::fromJson);
+        assertEquals(VoiceResponseObjectType.REALTIME_RESPONSE, response.getObjectType());
+        assertEquals("response", response.getId());
+        assertEquals("conversation", response.getConversationId());
+
+        String serialized = UnionTypeSerializationTestUtils.serialize(response);
+        assertTrue(serialized.contains("\"object\":\"realtime.response\""));
+        assertFalse(serialized.contains("\"objectType\""));
+        assertEquals(response.getObjectType(),
+            UnionTypeSerializationTestUtils.deserialize(serialized, VoiceResponse::fromJson).getObjectType());
+        assertNull(UnionTypeSerializationTestUtils.deserialize("{}", VoiceResponse::fromJson).getObjectType());
+        assertNull(
+            UnionTypeSerializationTestUtils.deserialize("{\"object\":null}", VoiceResponse::fromJson).getObjectType());
+    }
+
     private VoiceResponse roundTrip(String json) throws IOException {
         VoiceResponse value = UnionTypeSerializationTestUtils.deserialize(json, VoiceResponse::fromJson);
         String serialized = UnionTypeSerializationTestUtils.serialize(value);
diff --git a/sdk/ai/azure-ai-agents/tsp-location.yaml b/sdk/ai/azure-ai-agents/tsp-location.yaml
index 8936a2f6fd6e..0325a608658e 100644
--- a/sdk/ai/azure-ai-agents/tsp-location.yaml
+++ b/sdk/ai/azure-ai-agents/tsp-location.yaml
@@ -1,5 +1,5 @@
 directory: specification/ai-foundry/data-plane/Foundry/src/sdk-java-azure-ai-agents
-commit: 040251f8f0685dfc8a9dfe42e85f494bf2d94d6f
+commit: 984af499034be2d021198bedc493ecdc2530409e
 repo: Azure/azure-rest-api-specs
 additionalDirectories:
   - specification/ai-foundry/data-plane/Foundry/src/agents
diff --git a/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json b/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json
index a826e13813aa..3e371f2f1321 100644
--- a/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json
+++ b/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json
@@ -1 +1 @@
-{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"3585eace6647","crossLanguageDefinitions":{"com.azure.ai.projects.AIProjectClientBuilder":"Azure.AI.Projects","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluatorsAsyncClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaInsightsAsyncClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaInsightsClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaModelsAsyncClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsAsyncClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsAsyncClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaRedTeamsAsyncClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRedTeamsClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRoutinesAsyncClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaRoutinesClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaSchedulesAsyncClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesAsyncClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSchedulesClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSkillsAsyncClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsAsyncClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.ConnectionsAsyncClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsAsyncClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.ConnectionsClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.DatasetsAsyncClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsAsyncClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsAsyncClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsAsyncClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsAsyncClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DeploymentsAsyncClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsAsyncClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.DeploymentsClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.EvaluationRulesAsyncClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluationRulesClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluatorsAsyncClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsAsyncClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.IndexesAsyncClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesAsyncClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.IndexesClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.implementation.models.CreateOrUpdateRoutineRequest":"Azure.AI.Projects.createOrUpdateRoutine.Request.anonymous","com.azure.ai.projects.implementation.models.CreateSkillVersionRequest":"Azure.AI.Projects.createSkillVersion.Request.anonymous","com.azure.ai.projects.implementation.models.DispatchRoutineAsyncRequest":"Azure.AI.Projects.dispatchRoutineAsync.Request.anonymous","com.azure.ai.projects.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.projects.implementation.models.UpdateSkillRequest":"Azure.AI.Projects.updateSkill.Request.anonymous","com.azure.ai.projects.models.AIProjectIndex":"Azure.AI.Projects.Index","com.azure.ai.projects.models.AgentClusterInsightRequest":"Azure.AI.Projects.AgentClusterInsightRequest","com.azure.ai.projects.models.AgentClusterInsightResult":"Azure.AI.Projects.AgentClusterInsightResult","com.azure.ai.projects.models.AgentDataGenerationJobSource":"Azure.AI.Projects.AgentDataGenerationJobSource","com.azure.ai.projects.models.AgentEvaluatorGenerationJobSource":"Azure.AI.Projects.AgentEvaluatorGenerationJobSource","com.azure.ai.projects.models.AgentInsight":"Azure.AI.Projects.AgentInsight","com.azure.ai.projects.models.AgentInsightDetails":"Azure.AI.Projects.AgentInsightDetails","com.azure.ai.projects.models.AgentInsightEstimatedCost":"Azure.AI.Projects.AgentInsightEstimatedCost","com.azure.ai.projects.models.AgentInsightHighlightedTrace":"Azure.AI.Projects.AgentInsightHighlightedTrace","com.azure.ai.projects.models.AgentInsightLinkedTrace":"Azure.AI.Projects.AgentInsightLinkedTrace","com.azure.ai.projects.models.AgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitor","com.azure.ai.projects.models.AgentInsightMonitorCreate":"Azure.AI.Projects.AgentInsightMonitorCreate","com.azure.ai.projects.models.AgentInsightMonitorListItem":"Azure.AI.Projects.AgentInsightMonitorListItem","com.azure.ai.projects.models.AgentInsightMonitorUpdate":"Azure.AI.Projects.AgentInsightMonitorUpdate","com.azure.ai.projects.models.AgentInsightOverviewSource":"Azure.AI.Projects.AgentInsightOverviewSource","com.azure.ai.projects.models.AgentInsightPromptSurface":"Azure.AI.Projects.AgentInsightPromptSurface","com.azure.ai.projects.models.AgentInsightProposedFix":"Azure.AI.Projects.AgentInsightProposedFix","com.azure.ai.projects.models.AgentInsightProposedFixChange":"Azure.AI.Projects.AgentInsightProposedFixChange","com.azure.ai.projects.models.AgentInsightProposedFixKind":"Azure.AI.Projects.AgentInsightProposedFixKind","com.azure.ai.projects.models.AgentInsightRecommendedAction":"Azure.AI.Projects.AgentInsightRecommendedAction","com.azure.ai.projects.models.AgentInsightRun":"Azure.AI.Projects.AgentInsightRun","com.azure.ai.projects.models.AgentInsightRunCreate":"Azure.AI.Projects.AgentInsightRunCreate","com.azure.ai.projects.models.AgentInsightRunResult":"Azure.AI.Projects.AgentInsightRunResult","com.azure.ai.projects.models.AgentInsightRunTrigger":"Azure.AI.Projects.AgentInsightRunTrigger","com.azure.ai.projects.models.AgentInsightSeverity":"Azure.AI.Projects.AgentInsightSeverity","com.azure.ai.projects.models.AgentInsightStatus":"Azure.AI.Projects.AgentInsightStatus","com.azure.ai.projects.models.AgentInsightSuspension":"Azure.AI.Projects.AgentInsightSuspension","com.azure.ai.projects.models.AgentInsightTokenUsage":"Azure.AI.Projects.AgentInsightTokenUsage","com.azure.ai.projects.models.AgentInsightUpdate":"Azure.AI.Projects.AgentInsightUpdate","com.azure.ai.projects.models.AgentInsightsOverview":"Azure.AI.Projects.AgentInsightsOverview","com.azure.ai.projects.models.AgentInsightsOverviewOverride":"Azure.AI.Projects.AgentInsightsOverviewOverride","com.azure.ai.projects.models.AgentTaxonomyInput":"Azure.AI.Projects.AgentTaxonomyInput","com.azure.ai.projects.models.AgenticIdentityPreviewCredential":"Azure.AI.Projects.AgenticIdentityPreviewCredentials","com.azure.ai.projects.models.ApiError":"OpenAI.Error","com.azure.ai.projects.models.ApiKeyCredential":"Azure.AI.Projects.ApiKeyCredentials","com.azure.ai.projects.models.ArtifactProfile":"Azure.AI.Projects.ArtifactProfile","com.azure.ai.projects.models.AttackStrategy":"Azure.AI.Projects.AttackStrategy","com.azure.ai.projects.models.AzureAIAgentTarget":"Azure.AI.Projects.AzureAIAgentTarget","com.azure.ai.projects.models.AzureAIModelTarget":"Azure.AI.Projects.AzureAIModelTarget","com.azure.ai.projects.models.AzureAISearchIndex":"Azure.AI.Projects.AzureAISearchIndex","com.azure.ai.projects.models.AzureOpenAIModelConfiguration":"Azure.AI.Projects.AzureOpenAIModelConfiguration","com.azure.ai.projects.models.BaseCredential":"Azure.AI.Projects.BaseCredentials","com.azure.ai.projects.models.BlobReference":"Azure.AI.Projects.BlobReference","com.azure.ai.projects.models.BlobReferenceSasCredential":"Azure.AI.Projects.SasCredential","com.azure.ai.projects.models.ChartCoordinate":"Azure.AI.Projects.ChartCoordinate","com.azure.ai.projects.models.ClusterInsightResult":"Azure.AI.Projects.ClusterInsightResult","com.azure.ai.projects.models.ClusterTokenUsage":"Azure.AI.Projects.ClusterTokenUsage","com.azure.ai.projects.models.CodeBasedEvaluatorDefinition":"Azure.AI.Projects.CodeBasedEvaluatorDefinition","com.azure.ai.projects.models.Connection":"Azure.AI.Projects.Connection","com.azure.ai.projects.models.ConnectionType":"Azure.AI.Projects.ConnectionType","com.azure.ai.projects.models.ContinuousEvaluationRuleAction":"Azure.AI.Projects.ContinuousEvaluationRuleAction","com.azure.ai.projects.models.CosmosDBIndex":"Azure.AI.Projects.CosmosDBIndex","com.azure.ai.projects.models.CreateAsyncResponse":"Azure.AI.Projects.createAsync.Response.anonymous","com.azure.ai.projects.models.CreateSkillVersionFromFilesBody":"Azure.AI.Projects.CreateSkillVersionFromFilesBody","com.azure.ai.projects.models.CredentialType":"Azure.AI.Projects.CredentialType","com.azure.ai.projects.models.CronTrigger":"Azure.AI.Projects.CronTrigger","com.azure.ai.projects.models.CustomCredential":"Azure.AI.Projects.CustomCredential","com.azure.ai.projects.models.CustomRoutineTrigger":"Azure.AI.Projects.CustomRoutineTrigger","com.azure.ai.projects.models.DailyRecurrenceSchedule":"Azure.AI.Projects.DailyRecurrenceSchedule","com.azure.ai.projects.models.DataGenerationJob":"Azure.AI.Projects.DataGenerationJob","com.azure.ai.projects.models.DataGenerationJobConfiguration":"Azure.AI.Projects.DataGenerationJobConfiguration","com.azure.ai.projects.models.DataGenerationJobInputs":"Azure.AI.Projects.DataGenerationJobInputs","com.azure.ai.projects.models.DataGenerationJobOutput":"Azure.AI.Projects.DataGenerationJobOutput","com.azure.ai.projects.models.DataGenerationJobOutputType":"Azure.AI.Projects.DataGenerationJobOutputType","com.azure.ai.projects.models.DataGenerationJobOutputWriteMode":"Azure.AI.Projects.DataGenerationJobOutputWriteMode","com.azure.ai.projects.models.DataGenerationJobResult":"Azure.AI.Projects.DataGenerationJobResult","com.azure.ai.projects.models.DataGenerationJobScenario":"Azure.AI.Projects.DataGenerationJobScenario","com.azure.ai.projects.models.DataGenerationJobSource":"Azure.AI.Projects.DataGenerationJobSource","com.azure.ai.projects.models.DataGenerationJobSourceType":"Azure.AI.Projects.DataGenerationJobSourceType","com.azure.ai.projects.models.DataGenerationJobType":"Azure.AI.Projects.DataGenerationJobType","com.azure.ai.projects.models.DataGenerationModelOptions":"Azure.AI.Projects.DataGenerationModelOptions","com.azure.ai.projects.models.DataGenerationTokenUsage":"Azure.AI.Projects.DataGenerationTokenUsage","com.azure.ai.projects.models.DatasetCredential":"Azure.AI.Projects.AssetCredentialResponse","com.azure.ai.projects.models.DatasetDataGenerationJobOutput":"Azure.AI.Projects.DatasetDataGenerationJobOutput","com.azure.ai.projects.models.DatasetEvaluatorGenerationJobSource":"Azure.AI.Projects.DatasetEvaluatorGenerationJobSource","com.azure.ai.projects.models.DatasetReference":"Azure.AI.Projects.DatasetReference","com.azure.ai.projects.models.DatasetType":"Azure.AI.Projects.DatasetType","com.azure.ai.projects.models.DatasetVersion":"Azure.AI.Projects.DatasetVersion","com.azure.ai.projects.models.Deployment":"Azure.AI.Projects.Deployment","com.azure.ai.projects.models.DeploymentType":"Azure.AI.Projects.DeploymentType","com.azure.ai.projects.models.Dimension":"Azure.AI.Projects.Dimension","com.azure.ai.projects.models.DispatchRoutineResult":"Azure.AI.Projects.DispatchRoutineResponse","com.azure.ai.projects.models.EmbeddingConfiguration":"Azure.AI.Projects.EmbeddingConfiguration","com.azure.ai.projects.models.EndpointBasedEvaluatorDefinition":"Azure.AI.Projects.EndpointBasedEvaluatorDefinition","com.azure.ai.projects.models.EntraIdCredential":"Azure.AI.Projects.EntraIDCredentials","com.azure.ai.projects.models.EvaluationComparisonInsightRequest":"Azure.AI.Projects.EvaluationComparisonInsightRequest","com.azure.ai.projects.models.EvaluationComparisonInsightResult":"Azure.AI.Projects.EvaluationComparisonInsightResult","com.azure.ai.projects.models.EvaluationDataGenerationJob":"Azure.AI.Projects.EvaluationDataGenerationJob","com.azure.ai.projects.models.EvaluationDataGenerationJobInputs":"Azure.AI.Projects.EvaluationDataGenerationJobInputs","com.azure.ai.projects.models.EvaluationDataGenerationJobOutputConfiguration":"Azure.AI.Projects.EvaluationDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.EvaluationLevel":"Azure.AI.Projects.EvaluationLevel","com.azure.ai.projects.models.EvaluationResult":"Azure.AI.Projects.EvalResult","com.azure.ai.projects.models.EvaluationResultSample":"Azure.AI.Projects.EvaluationResultSample","com.azure.ai.projects.models.EvaluationRule":"Azure.AI.Projects.EvaluationRule","com.azure.ai.projects.models.EvaluationRuleAction":"Azure.AI.Projects.EvaluationRuleAction","com.azure.ai.projects.models.EvaluationRuleActionType":"Azure.AI.Projects.EvaluationRuleActionType","com.azure.ai.projects.models.EvaluationRuleEventType":"Azure.AI.Projects.EvaluationRuleEventType","com.azure.ai.projects.models.EvaluationRuleFilter":"Azure.AI.Projects.EvaluationRuleFilter","com.azure.ai.projects.models.EvaluationRunClusterInsightRequest":"Azure.AI.Projects.EvaluationRunClusterInsightRequest","com.azure.ai.projects.models.EvaluationRunClusterInsightResult":"Azure.AI.Projects.EvaluationRunClusterInsightResult","com.azure.ai.projects.models.EvaluationRunResultCompareItem":"Azure.AI.Projects.EvalRunResultCompareItem","com.azure.ai.projects.models.EvaluationRunResultComparison":"Azure.AI.Projects.EvalRunResultComparison","com.azure.ai.projects.models.EvaluationRunResultSummary":"Azure.AI.Projects.EvalRunResultSummary","com.azure.ai.projects.models.EvaluationScheduleTask":"Azure.AI.Projects.EvaluationScheduleTask","com.azure.ai.projects.models.EvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomy","com.azure.ai.projects.models.EvaluationTaxonomyInput":"Azure.AI.Projects.EvaluationTaxonomyInput","com.azure.ai.projects.models.EvaluationTaxonomyInputType":"Azure.AI.Projects.EvaluationTaxonomyInputType","com.azure.ai.projects.models.EvaluatorCategory":"Azure.AI.Projects.EvaluatorCategory","com.azure.ai.projects.models.EvaluatorCredentialInput":"Azure.AI.Projects.EvaluatorCredentialRequest","com.azure.ai.projects.models.EvaluatorDefinition":"Azure.AI.Projects.EvaluatorDefinition","com.azure.ai.projects.models.EvaluatorDefinitionType":"Azure.AI.Projects.EvaluatorDefinitionType","com.azure.ai.projects.models.EvaluatorGenerationArtifacts":"Azure.AI.Projects.EvaluatorGenerationArtifacts","com.azure.ai.projects.models.EvaluatorGenerationInputs":"Azure.AI.Projects.EvaluatorGenerationInputs","com.azure.ai.projects.models.EvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJob","com.azure.ai.projects.models.EvaluatorGenerationJobSource":"Azure.AI.Projects.EvaluatorGenerationJobSource","com.azure.ai.projects.models.EvaluatorGenerationJobSourceType":"Azure.AI.Projects.EvaluatorGenerationJobSourceType","com.azure.ai.projects.models.EvaluatorGenerationTokenUsage":"Azure.AI.Projects.EvaluatorGenerationTokenUsage","com.azure.ai.projects.models.EvaluatorMetric":"Azure.AI.Projects.EvaluatorMetric","com.azure.ai.projects.models.EvaluatorMetricDirection":"Azure.AI.Projects.EvaluatorMetricDirection","com.azure.ai.projects.models.EvaluatorMetricType":"Azure.AI.Projects.EvaluatorMetricType","com.azure.ai.projects.models.EvaluatorType":"Azure.AI.Projects.EvaluatorType","com.azure.ai.projects.models.EvaluatorVersion":"Azure.AI.Projects.EvaluatorVersion","com.azure.ai.projects.models.FieldMapping":"Azure.AI.Projects.FieldMapping","com.azure.ai.projects.models.FileDataGenerationJobOutput":"Azure.AI.Projects.FileDataGenerationJobOutput","com.azure.ai.projects.models.FileDataGenerationJobSource":"Azure.AI.Projects.FileDataGenerationJobSource","com.azure.ai.projects.models.FileDatasetVersion":"Azure.AI.Projects.FileDatasetVersion","com.azure.ai.projects.models.FolderDatasetVersion":"Azure.AI.Projects.FolderDatasetVersion","com.azure.ai.projects.models.FoundryModelArtifactProfileCategory":"Azure.AI.Projects.FoundryModelArtifactProfileCategory","com.azure.ai.projects.models.FoundryModelArtifactProfileSignal":"Azure.AI.Projects.FoundryModelArtifactProfileSignal","com.azure.ai.projects.models.FoundryModelSourceType":"Azure.AI.Projects.FoundryModelSourceType","com.azure.ai.projects.models.FoundryModelWarning":"Azure.AI.Projects.FoundryModelWarning","com.azure.ai.projects.models.FoundryModelWarningCode":"Azure.AI.Projects.FoundryModelWarningCode","com.azure.ai.projects.models.FoundryModelWeightType":"Azure.AI.Projects.FoundryModelWeightType","com.azure.ai.projects.models.GenerationWarningType":"Azure.AI.Projects.GenerationWarningType","com.azure.ai.projects.models.GitHubIssueEvent":"Azure.AI.Projects.GitHubIssueEvent","com.azure.ai.projects.models.GitHubIssueRoutineTrigger":"Azure.AI.Projects.GitHubIssueRoutineTrigger","com.azure.ai.projects.models.GraderAzureAIEvaluator":"Azure.AI.Projects.GraderAzureAIEvaluator","com.azure.ai.projects.models.HourlyRecurrenceSchedule":"Azure.AI.Projects.HourlyRecurrenceSchedule","com.azure.ai.projects.models.HumanEvaluationPreviewRuleAction":"Azure.AI.Projects.HumanEvaluationPreviewRuleAction","com.azure.ai.projects.models.IndexType":"Azure.AI.Projects.IndexType","com.azure.ai.projects.models.Insight":"Azure.AI.Projects.Insight","com.azure.ai.projects.models.InsightCluster":"Azure.AI.Projects.InsightCluster","com.azure.ai.projects.models.InsightModelConfiguration":"Azure.AI.Projects.InsightModelConfiguration","com.azure.ai.projects.models.InsightRequest":"Azure.AI.Projects.InsightRequest","com.azure.ai.projects.models.InsightResult":"Azure.AI.Projects.InsightResult","com.azure.ai.projects.models.InsightSample":"Azure.AI.Projects.InsightSample","com.azure.ai.projects.models.InsightScheduleTask":"Azure.AI.Projects.InsightScheduleTask","com.azure.ai.projects.models.InsightSummary":"Azure.AI.Projects.InsightSummary","com.azure.ai.projects.models.InsightType":"Azure.AI.Projects.InsightType","com.azure.ai.projects.models.InsightsMetadata":"Azure.AI.Projects.InsightsMetadata","com.azure.ai.projects.models.InvokeAgentInvocationsApiDispatchPayload":"Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentInvocationsApiRoutineAction":"Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction","com.azure.ai.projects.models.InvokeAgentResponsesApiDispatchPayload":"Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentResponsesApiRoutineAction":"Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction","com.azure.ai.projects.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.projects.models.ListVersionsRequestType":"Azure.AI.Projects.listVersions.RequestType.anonymous","com.azure.ai.projects.models.LoraConfig":"Azure.AI.Projects.LoraConfig","com.azure.ai.projects.models.ManagedAzureAISearchIndex":"Azure.AI.Projects.ManagedAzureAISearchIndex","com.azure.ai.projects.models.ModelCredentialInput":"Azure.AI.Projects.ModelCredentialRequest","com.azure.ai.projects.models.ModelDeployment":"Azure.AI.Projects.ModelDeployment","com.azure.ai.projects.models.ModelDeploymentSku":"Azure.AI.Projects.Sku","com.azure.ai.projects.models.ModelPendingUploadInput":"Azure.AI.Projects.ModelPendingUploadRequest","com.azure.ai.projects.models.ModelPendingUploadResult":"Azure.AI.Projects.ModelPendingUploadResponse","com.azure.ai.projects.models.ModelSamplingParams":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.projects.models.ModelSourceData":"Azure.AI.Projects.ModelSourceData","com.azure.ai.projects.models.ModelVersion":"Azure.AI.Projects.ModelVersion","com.azure.ai.projects.models.MonthlyRecurrenceSchedule":"Azure.AI.Projects.MonthlyRecurrenceSchedule","com.azure.ai.projects.models.NoAuthenticationCredential":"Azure.AI.Projects.NoAuthenticationCredentials","com.azure.ai.projects.models.OneTimeTrigger":"Azure.AI.Projects.OneTimeTrigger","com.azure.ai.projects.models.OperationStatus":"Azure.Core.Foundations.OperationState","com.azure.ai.projects.models.PendingUploadRequest":"Azure.AI.Projects.PendingUploadRequest","com.azure.ai.projects.models.PendingUploadResponse":"Azure.AI.Projects.PendingUploadResponse","com.azure.ai.projects.models.PendingUploadType":"Azure.AI.Projects.PendingUploadType","com.azure.ai.projects.models.PromptBasedEvaluatorDefinition":"Azure.AI.Projects.PromptBasedEvaluatorDefinition","com.azure.ai.projects.models.PromptDataGenerationJobSource":"Azure.AI.Projects.PromptDataGenerationJobSource","com.azure.ai.projects.models.PromptEvaluatorGenerationJobSource":"Azure.AI.Projects.PromptEvaluatorGenerationJobSource","com.azure.ai.projects.models.RecurrenceSchedule":"Azure.AI.Projects.RecurrenceSchedule","com.azure.ai.projects.models.RecurrenceTrigger":"Azure.AI.Projects.RecurrenceTrigger","com.azure.ai.projects.models.RecurrenceType":"Azure.AI.Projects.RecurrenceType","com.azure.ai.projects.models.RedTeam":"Azure.AI.Projects.RedTeam","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJob":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJob","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobInputs":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.RiskCategory":"Azure.AI.Projects.RiskCategory","com.azure.ai.projects.models.Routine":"Azure.AI.Projects.Routine","com.azure.ai.projects.models.RoutineAction":"Azure.AI.Projects.RoutineAction","com.azure.ai.projects.models.RoutineActionType":"Azure.AI.Projects.RoutineActionType","com.azure.ai.projects.models.RoutineAttemptSource":"Azure.AI.Projects.RoutineAttemptSource","com.azure.ai.projects.models.RoutineAuthorization":"Azure.AI.Projects.RoutineAuthorization","com.azure.ai.projects.models.RoutineDispatchIdentity":"Azure.AI.Projects.RoutineDispatchIdentity","com.azure.ai.projects.models.RoutineDispatchPayload":"Azure.AI.Projects.RoutineDispatchPayload","com.azure.ai.projects.models.RoutineDispatchPayloadType":"Azure.AI.Projects.RoutineDispatchPayloadType","com.azure.ai.projects.models.RoutineRun":"Azure.AI.Projects.RoutineRun","com.azure.ai.projects.models.RoutineRunPhase":"Azure.AI.Projects.RoutineRunPhase","com.azure.ai.projects.models.RoutineTrigger":"Azure.AI.Projects.RoutineTrigger","com.azure.ai.projects.models.RoutineTriggerType":"Azure.AI.Projects.RoutineTriggerType","com.azure.ai.projects.models.RubricBasedEvaluatorDefinition":"Azure.AI.Projects.RubricBasedEvaluatorDefinition","com.azure.ai.projects.models.RubricGenerationInputQualityWarning":"Azure.AI.Projects.RubricGenerationInputQualityWarning","com.azure.ai.projects.models.RubricGenerationInputQualityWarningCode":"Azure.AI.Projects.RubricGenerationInputQualityWarningCode","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSeverity":"Azure.AI.Projects.RubricGenerationInputQualityWarningSeverity","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSource":"Azure.AI.Projects.RubricGenerationInputQualityWarningSource","com.azure.ai.projects.models.SampleType":"Azure.AI.Projects.SampleType","com.azure.ai.projects.models.SasCredential":"Azure.AI.Projects.SASCredentials","com.azure.ai.projects.models.Schedule":"Azure.AI.Projects.Schedule","com.azure.ai.projects.models.ScheduleProvisioningStatus":"Azure.AI.Projects.ScheduleProvisioningStatus","com.azure.ai.projects.models.ScheduleRoutineTrigger":"Azure.AI.Projects.ScheduleRoutineTrigger","com.azure.ai.projects.models.ScheduleRun":"Azure.AI.Projects.ScheduleRun","com.azure.ai.projects.models.ScheduleTask":"Azure.AI.Projects.ScheduleTask","com.azure.ai.projects.models.ScheduleTaskType":"Azure.AI.Projects.ScheduleTaskType","com.azure.ai.projects.models.SimpleQnADataGenerationJobConfiguration":"Azure.AI.Projects.SimpleQnADataGenerationJobConfiguration","com.azure.ai.projects.models.SimpleQnAFineTuningQuestionType":"Azure.AI.Projects.SimpleQnAFineTuningQuestionType","com.azure.ai.projects.models.SimulationSeedDataGenerationJobConfiguration":"Azure.AI.Projects.SimulationSeedDataGenerationJobConfiguration","com.azure.ai.projects.models.SkillDetails":"Azure.AI.Projects.Skill","com.azure.ai.projects.models.SkillFileDetails":"TypeSpec.Http.File","com.azure.ai.projects.models.SkillInlineContent":"Azure.AI.Projects.SkillInlineContent","com.azure.ai.projects.models.SkillVersion":"Azure.AI.Projects.SkillVersion","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJob":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJob","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobInputs":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.Target":"Azure.AI.Projects.FoundryEvaluationTarget","com.azure.ai.projects.models.TargetConfig":"Azure.AI.Projects.RedTeamTargetConfig","com.azure.ai.projects.models.TaxonomyCategory":"Azure.AI.Projects.TaxonomyCategory","com.azure.ai.projects.models.TaxonomySubCategory":"Azure.AI.Projects.TaxonomySubCategory","com.azure.ai.projects.models.TestingCriterionAzureAIEvaluator":"Azure.AI.Projects.TestingCriterionAzureAIEvaluator","com.azure.ai.projects.models.TimerRoutineTrigger":"Azure.AI.Projects.TimerRoutineTrigger","com.azure.ai.projects.models.ToolDescription":"Azure.AI.Projects.ToolDescription","com.azure.ai.projects.models.ToolUseFineTuningDataGenerationJobConfiguration":"Azure.AI.Projects.ToolUseFineTuningDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobConfiguration":"Azure.AI.Projects.TracesDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobSource":"Azure.AI.Projects.TracesDataGenerationJobSource","com.azure.ai.projects.models.TracesEvaluatorGenerationJobSource":"Azure.AI.Projects.TracesEvaluatorGenerationJobSource","com.azure.ai.projects.models.TreatmentEffectType":"Azure.AI.Projects.TreatmentEffectType","com.azure.ai.projects.models.Trigger":"Azure.AI.Projects.Trigger","com.azure.ai.projects.models.TriggerType":"Azure.AI.Projects.TriggerType","com.azure.ai.projects.models.UpdateModelVersionInput":"Azure.AI.Projects.UpdateModelVersionRequest","com.azure.ai.projects.models.WeeklyRecurrenceSchedule":"Azure.AI.Projects.WeeklyRecurrenceSchedule"},"generatedFiles":["src/main/java/com/azure/ai/projects/AIProjectClientBuilder.java","src/main/java/com/azure/ai/projects/AIProjectsServiceVersion.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsClient.java","src/main/java/com/azure/ai/projects/BetaInsightsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaInsightsClient.java","src/main/java/com/azure/ai/projects/BetaModelsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaModelsClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesClient.java","src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSkillsClient.java","src/main/java/com/azure/ai/projects/ConnectionsAsyncClient.java","src/main/java/com/azure/ai/projects/ConnectionsClient.java","src/main/java/com/azure/ai/projects/DatasetsAsyncClient.java","src/main/java/com/azure/ai/projects/DatasetsClient.java","src/main/java/com/azure/ai/projects/DeploymentsAsyncClient.java","src/main/java/com/azure/ai/projects/DeploymentsClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesClient.java","src/main/java/com/azure/ai/projects/EvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluatorsClient.java","src/main/java/com/azure/ai/projects/IndexesAsyncClient.java","src/main/java/com/azure/ai/projects/IndexesClient.java","src/main/java/com/azure/ai/projects/implementation/AIProjectClientImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaAgentInsightMonitorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluationTaxonomiesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaInsightsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaModelsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRedTeamsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRoutinesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSchedulesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSkillsImpl.java","src/main/java/com/azure/ai/projects/implementation/ConnectionsImpl.java","src/main/java/com/azure/ai/projects/implementation/DatasetsImpl.java","src/main/java/com/azure/ai/projects/implementation/DeploymentsImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluationRulesImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/IndexesImpl.java","src/main/java/com/azure/ai/projects/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/projects/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/projects/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/PollingUtils.java","src/main/java/com/azure/ai/projects/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/models/CreateOrUpdateRoutineRequest.java","src/main/java/com/azure/ai/projects/implementation/models/CreateSkillVersionRequest.java","src/main/java/com/azure/ai/projects/implementation/models/DispatchRoutineAsyncRequest.java","src/main/java/com/azure/ai/projects/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/projects/implementation/models/UpdateSkillRequest.java","src/main/java/com/azure/ai/projects/implementation/models/package-info.java","src/main/java/com/azure/ai/projects/implementation/package-info.java","src/main/java/com/azure/ai/projects/models/AIProjectIndex.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/AgentDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentInsight.java","src/main/java/com/azure/ai/projects/models/AgentInsightDetails.java","src/main/java/com/azure/ai/projects/models/AgentInsightEstimatedCost.java","src/main/java/com/azure/ai/projects/models/AgentInsightHighlightedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightLinkedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitor.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorListItem.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightOverviewSource.java","src/main/java/com/azure/ai/projects/models/AgentInsightPromptSurface.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFix.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixChange.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixKind.java","src/main/java/com/azure/ai/projects/models/AgentInsightRecommendedAction.java","src/main/java/com/azure/ai/projects/models/AgentInsightRun.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunResult.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunTrigger.java","src/main/java/com/azure/ai/projects/models/AgentInsightSeverity.java","src/main/java/com/azure/ai/projects/models/AgentInsightStatus.java","src/main/java/com/azure/ai/projects/models/AgentInsightSuspension.java","src/main/java/com/azure/ai/projects/models/AgentInsightTokenUsage.java","src/main/java/com/azure/ai/projects/models/AgentInsightUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverview.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverviewOverride.java","src/main/java/com/azure/ai/projects/models/AgentTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/AgenticIdentityPreviewCredential.java","src/main/java/com/azure/ai/projects/models/ApiError.java","src/main/java/com/azure/ai/projects/models/ApiKeyCredential.java","src/main/java/com/azure/ai/projects/models/ArtifactProfile.java","src/main/java/com/azure/ai/projects/models/AttackStrategy.java","src/main/java/com/azure/ai/projects/models/AzureAIAgentTarget.java","src/main/java/com/azure/ai/projects/models/AzureAIModelTarget.java","src/main/java/com/azure/ai/projects/models/AzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/AzureOpenAIModelConfiguration.java","src/main/java/com/azure/ai/projects/models/BaseCredential.java","src/main/java/com/azure/ai/projects/models/BlobReference.java","src/main/java/com/azure/ai/projects/models/BlobReferenceSasCredential.java","src/main/java/com/azure/ai/projects/models/ChartCoordinate.java","src/main/java/com/azure/ai/projects/models/ClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/ClusterTokenUsage.java","src/main/java/com/azure/ai/projects/models/CodeBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/Connection.java","src/main/java/com/azure/ai/projects/models/ConnectionType.java","src/main/java/com/azure/ai/projects/models/ContinuousEvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/CosmosDBIndex.java","src/main/java/com/azure/ai/projects/models/CreateAsyncResponse.java","src/main/java/com/azure/ai/projects/models/CreateSkillVersionFromFilesBody.java","src/main/java/com/azure/ai/projects/models/CredentialType.java","src/main/java/com/azure/ai/projects/models/CronTrigger.java","src/main/java/com/azure/ai/projects/models/CustomCredential.java","src/main/java/com/azure/ai/projects/models/CustomRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/DailyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/DataGenerationJob.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputWriteMode.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobResult.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobScenario.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobType.java","src/main/java/com/azure/ai/projects/models/DataGenerationModelOptions.java","src/main/java/com/azure/ai/projects/models/DataGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/DatasetCredential.java","src/main/java/com/azure/ai/projects/models/DatasetDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DatasetEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DatasetReference.java","src/main/java/com/azure/ai/projects/models/DatasetType.java","src/main/java/com/azure/ai/projects/models/DatasetVersion.java","src/main/java/com/azure/ai/projects/models/Deployment.java","src/main/java/com/azure/ai/projects/models/DeploymentType.java","src/main/java/com/azure/ai/projects/models/Dimension.java","src/main/java/com/azure/ai/projects/models/DispatchRoutineResult.java","src/main/java/com/azure/ai/projects/models/EmbeddingConfiguration.java","src/main/java/com/azure/ai/projects/models/EndpointBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EntraIdCredential.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/EvaluationLevel.java","src/main/java/com/azure/ai/projects/models/EvaluationResult.java","src/main/java/com/azure/ai/projects/models/EvaluationResultSample.java","src/main/java/com/azure/ai/projects/models/EvaluationRule.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleActionType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleEventType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleFilter.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultCompareItem.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultComparison.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultSummary.java","src/main/java/com/azure/ai/projects/models/EvaluationScheduleTask.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomy.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInputType.java","src/main/java/com/azure/ai/projects/models/EvaluatorCategory.java","src/main/java/com/azure/ai/projects/models/EvaluatorCredentialInput.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinitionType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationArtifacts.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationInputs.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetric.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricDirection.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricType.java","src/main/java/com/azure/ai/projects/models/EvaluatorType.java","src/main/java/com/azure/ai/projects/models/EvaluatorVersion.java","src/main/java/com/azure/ai/projects/models/FieldMapping.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/FileDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FolderDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileCategory.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileSignal.java","src/main/java/com/azure/ai/projects/models/FoundryModelSourceType.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarning.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarningCode.java","src/main/java/com/azure/ai/projects/models/FoundryModelWeightType.java","src/main/java/com/azure/ai/projects/models/GenerationWarningType.java","src/main/java/com/azure/ai/projects/models/GitHubIssueEvent.java","src/main/java/com/azure/ai/projects/models/GitHubIssueRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/GraderAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/HourlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/HumanEvaluationPreviewRuleAction.java","src/main/java/com/azure/ai/projects/models/IndexType.java","src/main/java/com/azure/ai/projects/models/Insight.java","src/main/java/com/azure/ai/projects/models/InsightCluster.java","src/main/java/com/azure/ai/projects/models/InsightModelConfiguration.java","src/main/java/com/azure/ai/projects/models/InsightRequest.java","src/main/java/com/azure/ai/projects/models/InsightResult.java","src/main/java/com/azure/ai/projects/models/InsightSample.java","src/main/java/com/azure/ai/projects/models/InsightScheduleTask.java","src/main/java/com/azure/ai/projects/models/InsightSummary.java","src/main/java/com/azure/ai/projects/models/InsightType.java","src/main/java/com/azure/ai/projects/models/InsightsMetadata.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/JobStatus.java","src/main/java/com/azure/ai/projects/models/ListVersionsRequestType.java","src/main/java/com/azure/ai/projects/models/LoraConfig.java","src/main/java/com/azure/ai/projects/models/ManagedAzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/ModelCredentialInput.java","src/main/java/com/azure/ai/projects/models/ModelDeployment.java","src/main/java/com/azure/ai/projects/models/ModelDeploymentSku.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadInput.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadResult.java","src/main/java/com/azure/ai/projects/models/ModelSamplingParams.java","src/main/java/com/azure/ai/projects/models/ModelSourceData.java","src/main/java/com/azure/ai/projects/models/ModelVersion.java","src/main/java/com/azure/ai/projects/models/MonthlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/NoAuthenticationCredential.java","src/main/java/com/azure/ai/projects/models/OneTimeTrigger.java","src/main/java/com/azure/ai/projects/models/OperationStatus.java","src/main/java/com/azure/ai/projects/models/PendingUploadRequest.java","src/main/java/com/azure/ai/projects/models/PendingUploadResponse.java","src/main/java/com/azure/ai/projects/models/PendingUploadType.java","src/main/java/com/azure/ai/projects/models/PromptBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/PromptDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/PromptEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/RecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/RecurrenceTrigger.java","src/main/java/com/azure/ai/projects/models/RecurrenceType.java","src/main/java/com/azure/ai/projects/models/RedTeam.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/RiskCategory.java","src/main/java/com/azure/ai/projects/models/Routine.java","src/main/java/com/azure/ai/projects/models/RoutineAction.java","src/main/java/com/azure/ai/projects/models/RoutineActionType.java","src/main/java/com/azure/ai/projects/models/RoutineAttemptSource.java","src/main/java/com/azure/ai/projects/models/RoutineAuthorization.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchIdentity.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayload.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayloadType.java","src/main/java/com/azure/ai/projects/models/RoutineRun.java","src/main/java/com/azure/ai/projects/models/RoutineRunPhase.java","src/main/java/com/azure/ai/projects/models/RoutineTrigger.java","src/main/java/com/azure/ai/projects/models/RoutineTriggerType.java","src/main/java/com/azure/ai/projects/models/RubricBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarning.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningCode.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSeverity.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSource.java","src/main/java/com/azure/ai/projects/models/SampleType.java","src/main/java/com/azure/ai/projects/models/SasCredential.java","src/main/java/com/azure/ai/projects/models/Schedule.java","src/main/java/com/azure/ai/projects/models/ScheduleProvisioningStatus.java","src/main/java/com/azure/ai/projects/models/ScheduleRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ScheduleRun.java","src/main/java/com/azure/ai/projects/models/ScheduleTask.java","src/main/java/com/azure/ai/projects/models/ScheduleTaskType.java","src/main/java/com/azure/ai/projects/models/SimpleQnADataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SimpleQnAFineTuningQuestionType.java","src/main/java/com/azure/ai/projects/models/SimulationSeedDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SkillDetails.java","src/main/java/com/azure/ai/projects/models/SkillFileDetails.java","src/main/java/com/azure/ai/projects/models/SkillInlineContent.java","src/main/java/com/azure/ai/projects/models/SkillVersion.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/Target.java","src/main/java/com/azure/ai/projects/models/TargetConfig.java","src/main/java/com/azure/ai/projects/models/TaxonomyCategory.java","src/main/java/com/azure/ai/projects/models/TaxonomySubCategory.java","src/main/java/com/azure/ai/projects/models/TestingCriterionAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/TimerRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ToolDescription.java","src/main/java/com/azure/ai/projects/models/ToolUseFineTuningDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TracesEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TreatmentEffectType.java","src/main/java/com/azure/ai/projects/models/Trigger.java","src/main/java/com/azure/ai/projects/models/TriggerType.java","src/main/java/com/azure/ai/projects/models/UpdateModelVersionInput.java","src/main/java/com/azure/ai/projects/models/WeeklyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/package-info.java","src/main/java/com/azure/ai/projects/package-info.java","src/main/java/module-info.java"]}
\ No newline at end of file
+{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"c7aa598dfba9","crossLanguageDefinitions":{"com.azure.ai.projects.AIProjectClientBuilder":"Azure.AI.Projects","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluatorsAsyncClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaInsightsAsyncClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaInsightsClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaModelsAsyncClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsAsyncClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsAsyncClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaRedTeamsAsyncClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRedTeamsClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRoutinesAsyncClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaRoutinesClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaSchedulesAsyncClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesAsyncClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSchedulesClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSkillsAsyncClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsAsyncClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.ConnectionsAsyncClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsAsyncClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.ConnectionsClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.DatasetsAsyncClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsAsyncClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsAsyncClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsAsyncClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsAsyncClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DeploymentsAsyncClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsAsyncClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.DeploymentsClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.EvaluationRulesAsyncClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluationRulesClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluatorsAsyncClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsAsyncClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.IndexesAsyncClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesAsyncClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.IndexesClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.implementation.models.CreateOrUpdateRoutineRequest":"Azure.AI.Projects.createOrUpdateRoutine.Request.anonymous","com.azure.ai.projects.implementation.models.CreateSkillVersionRequest":"Azure.AI.Projects.createSkillVersion.Request.anonymous","com.azure.ai.projects.implementation.models.DispatchRoutineAsyncRequest":"Azure.AI.Projects.dispatchRoutineAsync.Request.anonymous","com.azure.ai.projects.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.projects.implementation.models.UpdateSkillRequest":"Azure.AI.Projects.updateSkill.Request.anonymous","com.azure.ai.projects.models.AIProjectIndex":"Azure.AI.Projects.Index","com.azure.ai.projects.models.AgentClusterInsightRequest":"Azure.AI.Projects.AgentClusterInsightRequest","com.azure.ai.projects.models.AgentClusterInsightResult":"Azure.AI.Projects.AgentClusterInsightResult","com.azure.ai.projects.models.AgentDataGenerationJobSource":"Azure.AI.Projects.AgentDataGenerationJobSource","com.azure.ai.projects.models.AgentEvaluatorGenerationJobSource":"Azure.AI.Projects.AgentEvaluatorGenerationJobSource","com.azure.ai.projects.models.AgentInsight":"Azure.AI.Projects.AgentInsight","com.azure.ai.projects.models.AgentInsightDetails":"Azure.AI.Projects.AgentInsightDetails","com.azure.ai.projects.models.AgentInsightEstimatedCost":"Azure.AI.Projects.AgentInsightEstimatedCost","com.azure.ai.projects.models.AgentInsightHighlightedTrace":"Azure.AI.Projects.AgentInsightHighlightedTrace","com.azure.ai.projects.models.AgentInsightLinkedTrace":"Azure.AI.Projects.AgentInsightLinkedTrace","com.azure.ai.projects.models.AgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitor","com.azure.ai.projects.models.AgentInsightMonitorCreate":"Azure.AI.Projects.AgentInsightMonitorCreate","com.azure.ai.projects.models.AgentInsightMonitorListItem":"Azure.AI.Projects.AgentInsightMonitorListItem","com.azure.ai.projects.models.AgentInsightMonitorUpdate":"Azure.AI.Projects.AgentInsightMonitorUpdate","com.azure.ai.projects.models.AgentInsightOverviewSource":"Azure.AI.Projects.AgentInsightOverviewSource","com.azure.ai.projects.models.AgentInsightPromptSurface":"Azure.AI.Projects.AgentInsightPromptSurface","com.azure.ai.projects.models.AgentInsightProposedFix":"Azure.AI.Projects.AgentInsightProposedFix","com.azure.ai.projects.models.AgentInsightProposedFixChange":"Azure.AI.Projects.AgentInsightProposedFixChange","com.azure.ai.projects.models.AgentInsightProposedFixKind":"Azure.AI.Projects.AgentInsightProposedFixKind","com.azure.ai.projects.models.AgentInsightRecommendedAction":"Azure.AI.Projects.AgentInsightRecommendedAction","com.azure.ai.projects.models.AgentInsightRun":"Azure.AI.Projects.AgentInsightRun","com.azure.ai.projects.models.AgentInsightRunCreate":"Azure.AI.Projects.AgentInsightRunCreate","com.azure.ai.projects.models.AgentInsightRunResult":"Azure.AI.Projects.AgentInsightRunResult","com.azure.ai.projects.models.AgentInsightRunTrigger":"Azure.AI.Projects.AgentInsightRunTrigger","com.azure.ai.projects.models.AgentInsightSeverity":"Azure.AI.Projects.AgentInsightSeverity","com.azure.ai.projects.models.AgentInsightStatus":"Azure.AI.Projects.AgentInsightStatus","com.azure.ai.projects.models.AgentInsightSuspension":"Azure.AI.Projects.AgentInsightSuspension","com.azure.ai.projects.models.AgentInsightTokenUsage":"Azure.AI.Projects.AgentInsightTokenUsage","com.azure.ai.projects.models.AgentInsightUpdate":"Azure.AI.Projects.AgentInsightUpdate","com.azure.ai.projects.models.AgentInsightsOverview":"Azure.AI.Projects.AgentInsightsOverview","com.azure.ai.projects.models.AgentInsightsOverviewOverride":"Azure.AI.Projects.AgentInsightsOverviewOverride","com.azure.ai.projects.models.AgentTaxonomyInput":"Azure.AI.Projects.AgentTaxonomyInput","com.azure.ai.projects.models.AgenticIdentityPreviewCredential":"Azure.AI.Projects.AgenticIdentityPreviewCredentials","com.azure.ai.projects.models.ApiError":"OpenAI.Error","com.azure.ai.projects.models.ApiKeyCredential":"Azure.AI.Projects.ApiKeyCredentials","com.azure.ai.projects.models.ArtifactProfile":"Azure.AI.Projects.ArtifactProfile","com.azure.ai.projects.models.AttackStrategy":"Azure.AI.Projects.AttackStrategy","com.azure.ai.projects.models.AzureAIAgentTarget":"Azure.AI.Projects.AzureAIAgentTarget","com.azure.ai.projects.models.AzureAIModelTarget":"Azure.AI.Projects.AzureAIModelTarget","com.azure.ai.projects.models.AzureAISearchIndex":"Azure.AI.Projects.AzureAISearchIndex","com.azure.ai.projects.models.AzureOpenAIModelConfiguration":"Azure.AI.Projects.AzureOpenAIModelConfiguration","com.azure.ai.projects.models.BaseCredential":"Azure.AI.Projects.BaseCredentials","com.azure.ai.projects.models.BlobReference":"Azure.AI.Projects.BlobReference","com.azure.ai.projects.models.BlobReferenceSasCredential":"Azure.AI.Projects.SasCredential","com.azure.ai.projects.models.ChartCoordinate":"Azure.AI.Projects.ChartCoordinate","com.azure.ai.projects.models.ClusterInsightResult":"Azure.AI.Projects.ClusterInsightResult","com.azure.ai.projects.models.ClusterTokenUsage":"Azure.AI.Projects.ClusterTokenUsage","com.azure.ai.projects.models.CodeBasedEvaluatorDefinition":"Azure.AI.Projects.CodeBasedEvaluatorDefinition","com.azure.ai.projects.models.Connection":"Azure.AI.Projects.Connection","com.azure.ai.projects.models.ConnectionType":"Azure.AI.Projects.ConnectionType","com.azure.ai.projects.models.ContinuousEvaluationRuleAction":"Azure.AI.Projects.ContinuousEvaluationRuleAction","com.azure.ai.projects.models.CosmosDBIndex":"Azure.AI.Projects.CosmosDBIndex","com.azure.ai.projects.models.CreateAsyncResponse":"Azure.AI.Projects.createAsync.Response.anonymous","com.azure.ai.projects.models.CreateSkillVersionFromFilesBody":"Azure.AI.Projects.CreateSkillVersionFromFilesBody","com.azure.ai.projects.models.CredentialType":"Azure.AI.Projects.CredentialType","com.azure.ai.projects.models.CronTrigger":"Azure.AI.Projects.CronTrigger","com.azure.ai.projects.models.CustomCredential":"Azure.AI.Projects.CustomCredential","com.azure.ai.projects.models.CustomRoutineTrigger":"Azure.AI.Projects.CustomRoutineTrigger","com.azure.ai.projects.models.DailyRecurrenceSchedule":"Azure.AI.Projects.DailyRecurrenceSchedule","com.azure.ai.projects.models.DataGenerationJob":"Azure.AI.Projects.DataGenerationJob","com.azure.ai.projects.models.DataGenerationJobConfiguration":"Azure.AI.Projects.DataGenerationJobConfiguration","com.azure.ai.projects.models.DataGenerationJobInputs":"Azure.AI.Projects.DataGenerationJobInputs","com.azure.ai.projects.models.DataGenerationJobOutput":"Azure.AI.Projects.DataGenerationJobOutput","com.azure.ai.projects.models.DataGenerationJobOutputType":"Azure.AI.Projects.DataGenerationJobOutputType","com.azure.ai.projects.models.DataGenerationJobOutputWriteMode":"Azure.AI.Projects.DataGenerationJobOutputWriteMode","com.azure.ai.projects.models.DataGenerationJobResult":"Azure.AI.Projects.DataGenerationJobResult","com.azure.ai.projects.models.DataGenerationJobScenario":"Azure.AI.Projects.DataGenerationJobScenario","com.azure.ai.projects.models.DataGenerationJobSource":"Azure.AI.Projects.DataGenerationJobSource","com.azure.ai.projects.models.DataGenerationJobSourceType":"Azure.AI.Projects.DataGenerationJobSourceType","com.azure.ai.projects.models.DataGenerationJobType":"Azure.AI.Projects.DataGenerationJobType","com.azure.ai.projects.models.DataGenerationModelOptions":"Azure.AI.Projects.DataGenerationModelOptions","com.azure.ai.projects.models.DataGenerationTokenUsage":"Azure.AI.Projects.DataGenerationTokenUsage","com.azure.ai.projects.models.DatasetCredential":"Azure.AI.Projects.AssetCredentialResponse","com.azure.ai.projects.models.DatasetDataGenerationJobOutput":"Azure.AI.Projects.DatasetDataGenerationJobOutput","com.azure.ai.projects.models.DatasetEvaluatorGenerationJobSource":"Azure.AI.Projects.DatasetEvaluatorGenerationJobSource","com.azure.ai.projects.models.DatasetReference":"Azure.AI.Projects.DatasetReference","com.azure.ai.projects.models.DatasetType":"Azure.AI.Projects.DatasetType","com.azure.ai.projects.models.DatasetVersion":"Azure.AI.Projects.DatasetVersion","com.azure.ai.projects.models.Deployment":"Azure.AI.Projects.Deployment","com.azure.ai.projects.models.DeploymentType":"Azure.AI.Projects.DeploymentType","com.azure.ai.projects.models.Dimension":"Azure.AI.Projects.Dimension","com.azure.ai.projects.models.DispatchRoutineResult":"Azure.AI.Projects.DispatchRoutineResponse","com.azure.ai.projects.models.EmbeddingConfiguration":"Azure.AI.Projects.EmbeddingConfiguration","com.azure.ai.projects.models.EndpointBasedEvaluatorDefinition":"Azure.AI.Projects.EndpointBasedEvaluatorDefinition","com.azure.ai.projects.models.EntraIdCredential":"Azure.AI.Projects.EntraIDCredentials","com.azure.ai.projects.models.EvaluationComparisonInsightRequest":"Azure.AI.Projects.EvaluationComparisonInsightRequest","com.azure.ai.projects.models.EvaluationComparisonInsightResult":"Azure.AI.Projects.EvaluationComparisonInsightResult","com.azure.ai.projects.models.EvaluationDataGenerationJob":"Azure.AI.Projects.EvaluationDataGenerationJob","com.azure.ai.projects.models.EvaluationDataGenerationJobInputs":"Azure.AI.Projects.EvaluationDataGenerationJobInputs","com.azure.ai.projects.models.EvaluationDataGenerationJobOutputConfiguration":"Azure.AI.Projects.EvaluationDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.EvaluationLevel":"Azure.AI.Projects.EvaluationLevel","com.azure.ai.projects.models.EvaluationResult":"Azure.AI.Projects.EvalResult","com.azure.ai.projects.models.EvaluationResultSample":"Azure.AI.Projects.EvaluationResultSample","com.azure.ai.projects.models.EvaluationRule":"Azure.AI.Projects.EvaluationRule","com.azure.ai.projects.models.EvaluationRuleAction":"Azure.AI.Projects.EvaluationRuleAction","com.azure.ai.projects.models.EvaluationRuleActionType":"Azure.AI.Projects.EvaluationRuleActionType","com.azure.ai.projects.models.EvaluationRuleEventType":"Azure.AI.Projects.EvaluationRuleEventType","com.azure.ai.projects.models.EvaluationRuleFilter":"Azure.AI.Projects.EvaluationRuleFilter","com.azure.ai.projects.models.EvaluationRunClusterInsightRequest":"Azure.AI.Projects.EvaluationRunClusterInsightRequest","com.azure.ai.projects.models.EvaluationRunClusterInsightResult":"Azure.AI.Projects.EvaluationRunClusterInsightResult","com.azure.ai.projects.models.EvaluationRunResultCompareItem":"Azure.AI.Projects.EvalRunResultCompareItem","com.azure.ai.projects.models.EvaluationRunResultComparison":"Azure.AI.Projects.EvalRunResultComparison","com.azure.ai.projects.models.EvaluationRunResultSummary":"Azure.AI.Projects.EvalRunResultSummary","com.azure.ai.projects.models.EvaluationScheduleTask":"Azure.AI.Projects.EvaluationScheduleTask","com.azure.ai.projects.models.EvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomy","com.azure.ai.projects.models.EvaluationTaxonomyInput":"Azure.AI.Projects.EvaluationTaxonomyInput","com.azure.ai.projects.models.EvaluationTaxonomyInputType":"Azure.AI.Projects.EvaluationTaxonomyInputType","com.azure.ai.projects.models.EvaluatorCategory":"Azure.AI.Projects.EvaluatorCategory","com.azure.ai.projects.models.EvaluatorCredentialInput":"Azure.AI.Projects.EvaluatorCredentialRequest","com.azure.ai.projects.models.EvaluatorDefinition":"Azure.AI.Projects.EvaluatorDefinition","com.azure.ai.projects.models.EvaluatorDefinitionType":"Azure.AI.Projects.EvaluatorDefinitionType","com.azure.ai.projects.models.EvaluatorGenerationArtifacts":"Azure.AI.Projects.EvaluatorGenerationArtifacts","com.azure.ai.projects.models.EvaluatorGenerationInputs":"Azure.AI.Projects.EvaluatorGenerationInputs","com.azure.ai.projects.models.EvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJob","com.azure.ai.projects.models.EvaluatorGenerationJobSource":"Azure.AI.Projects.EvaluatorGenerationJobSource","com.azure.ai.projects.models.EvaluatorGenerationJobSourceType":"Azure.AI.Projects.EvaluatorGenerationJobSourceType","com.azure.ai.projects.models.EvaluatorGenerationTokenUsage":"Azure.AI.Projects.EvaluatorGenerationTokenUsage","com.azure.ai.projects.models.EvaluatorMetric":"Azure.AI.Projects.EvaluatorMetric","com.azure.ai.projects.models.EvaluatorMetricDirection":"Azure.AI.Projects.EvaluatorMetricDirection","com.azure.ai.projects.models.EvaluatorMetricType":"Azure.AI.Projects.EvaluatorMetricType","com.azure.ai.projects.models.EvaluatorType":"Azure.AI.Projects.EvaluatorType","com.azure.ai.projects.models.EvaluatorVersion":"Azure.AI.Projects.EvaluatorVersion","com.azure.ai.projects.models.FieldMapping":"Azure.AI.Projects.FieldMapping","com.azure.ai.projects.models.FileDataGenerationJobOutput":"Azure.AI.Projects.FileDataGenerationJobOutput","com.azure.ai.projects.models.FileDataGenerationJobSource":"Azure.AI.Projects.FileDataGenerationJobSource","com.azure.ai.projects.models.FileDatasetVersion":"Azure.AI.Projects.FileDatasetVersion","com.azure.ai.projects.models.FolderDatasetVersion":"Azure.AI.Projects.FolderDatasetVersion","com.azure.ai.projects.models.FoundryModelArtifactProfileCategory":"Azure.AI.Projects.FoundryModelArtifactProfileCategory","com.azure.ai.projects.models.FoundryModelArtifactProfileSignal":"Azure.AI.Projects.FoundryModelArtifactProfileSignal","com.azure.ai.projects.models.FoundryModelSourceType":"Azure.AI.Projects.FoundryModelSourceType","com.azure.ai.projects.models.FoundryModelWarning":"Azure.AI.Projects.FoundryModelWarning","com.azure.ai.projects.models.FoundryModelWarningCode":"Azure.AI.Projects.FoundryModelWarningCode","com.azure.ai.projects.models.FoundryModelWeightType":"Azure.AI.Projects.FoundryModelWeightType","com.azure.ai.projects.models.GenerationWarningType":"Azure.AI.Projects.GenerationWarningType","com.azure.ai.projects.models.GitHubIssueEvent":"Azure.AI.Projects.GitHubIssueEvent","com.azure.ai.projects.models.GitHubIssueRoutineTrigger":"Azure.AI.Projects.GitHubIssueRoutineTrigger","com.azure.ai.projects.models.GraderAzureAIEvaluator":"Azure.AI.Projects.GraderAzureAIEvaluator","com.azure.ai.projects.models.HourlyRecurrenceSchedule":"Azure.AI.Projects.HourlyRecurrenceSchedule","com.azure.ai.projects.models.HumanEvaluationPreviewRuleAction":"Azure.AI.Projects.HumanEvaluationPreviewRuleAction","com.azure.ai.projects.models.IndexType":"Azure.AI.Projects.IndexType","com.azure.ai.projects.models.Insight":"Azure.AI.Projects.Insight","com.azure.ai.projects.models.InsightCluster":"Azure.AI.Projects.InsightCluster","com.azure.ai.projects.models.InsightModelConfiguration":"Azure.AI.Projects.InsightModelConfiguration","com.azure.ai.projects.models.InsightRequest":"Azure.AI.Projects.InsightRequest","com.azure.ai.projects.models.InsightResult":"Azure.AI.Projects.InsightResult","com.azure.ai.projects.models.InsightSample":"Azure.AI.Projects.InsightSample","com.azure.ai.projects.models.InsightScheduleTask":"Azure.AI.Projects.InsightScheduleTask","com.azure.ai.projects.models.InsightSummary":"Azure.AI.Projects.InsightSummary","com.azure.ai.projects.models.InsightType":"Azure.AI.Projects.InsightType","com.azure.ai.projects.models.InsightsMetadata":"Azure.AI.Projects.InsightsMetadata","com.azure.ai.projects.models.InvokeAgentInvocationsApiDispatchPayload":"Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentInvocationsApiRoutineAction":"Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction","com.azure.ai.projects.models.InvokeAgentResponsesApiDispatchPayload":"Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentResponsesApiRoutineAction":"Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction","com.azure.ai.projects.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.projects.models.ListVersionsRequestType":"Azure.AI.Projects.listVersions.RequestType.anonymous","com.azure.ai.projects.models.LoraConfig":"Azure.AI.Projects.LoraConfig","com.azure.ai.projects.models.ManagedAzureAISearchIndex":"Azure.AI.Projects.ManagedAzureAISearchIndex","com.azure.ai.projects.models.ModelCredentialInput":"Azure.AI.Projects.ModelCredentialRequest","com.azure.ai.projects.models.ModelDeployment":"Azure.AI.Projects.ModelDeployment","com.azure.ai.projects.models.ModelDeploymentSku":"Azure.AI.Projects.Sku","com.azure.ai.projects.models.ModelPendingUploadInput":"Azure.AI.Projects.ModelPendingUploadRequest","com.azure.ai.projects.models.ModelPendingUploadResult":"Azure.AI.Projects.ModelPendingUploadResponse","com.azure.ai.projects.models.ModelSamplingParams":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.projects.models.ModelSourceData":"Azure.AI.Projects.ModelSourceData","com.azure.ai.projects.models.ModelVersion":"Azure.AI.Projects.ModelVersion","com.azure.ai.projects.models.MonthlyRecurrenceSchedule":"Azure.AI.Projects.MonthlyRecurrenceSchedule","com.azure.ai.projects.models.NoAuthenticationCredential":"Azure.AI.Projects.NoAuthenticationCredentials","com.azure.ai.projects.models.OneTimeTrigger":"Azure.AI.Projects.OneTimeTrigger","com.azure.ai.projects.models.OperationStatus":"Azure.Core.Foundations.OperationState","com.azure.ai.projects.models.PendingUploadRequest":"Azure.AI.Projects.PendingUploadRequest","com.azure.ai.projects.models.PendingUploadResponse":"Azure.AI.Projects.PendingUploadResponse","com.azure.ai.projects.models.PendingUploadType":"Azure.AI.Projects.PendingUploadType","com.azure.ai.projects.models.PromptBasedEvaluatorDefinition":"Azure.AI.Projects.PromptBasedEvaluatorDefinition","com.azure.ai.projects.models.PromptDataGenerationJobSource":"Azure.AI.Projects.PromptDataGenerationJobSource","com.azure.ai.projects.models.PromptEvaluatorGenerationJobSource":"Azure.AI.Projects.PromptEvaluatorGenerationJobSource","com.azure.ai.projects.models.RecurrenceSchedule":"Azure.AI.Projects.RecurrenceSchedule","com.azure.ai.projects.models.RecurrenceTrigger":"Azure.AI.Projects.RecurrenceTrigger","com.azure.ai.projects.models.RecurrenceType":"Azure.AI.Projects.RecurrenceType","com.azure.ai.projects.models.RedTeam":"Azure.AI.Projects.RedTeam","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJob":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJob","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobInputs":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.RiskCategory":"Azure.AI.Projects.RiskCategory","com.azure.ai.projects.models.Routine":"Azure.AI.Projects.Routine","com.azure.ai.projects.models.RoutineAction":"Azure.AI.Projects.RoutineAction","com.azure.ai.projects.models.RoutineActionType":"Azure.AI.Projects.RoutineActionType","com.azure.ai.projects.models.RoutineAttemptSource":"Azure.AI.Projects.RoutineAttemptSource","com.azure.ai.projects.models.RoutineAuthorization":"Azure.AI.Projects.RoutineAuthorization","com.azure.ai.projects.models.RoutineDispatchIdentity":"Azure.AI.Projects.RoutineDispatchIdentity","com.azure.ai.projects.models.RoutineDispatchPayload":"Azure.AI.Projects.RoutineDispatchPayload","com.azure.ai.projects.models.RoutineDispatchPayloadType":"Azure.AI.Projects.RoutineDispatchPayloadType","com.azure.ai.projects.models.RoutineRun":"Azure.AI.Projects.RoutineRun","com.azure.ai.projects.models.RoutineRunPhase":"Azure.AI.Projects.RoutineRunPhase","com.azure.ai.projects.models.RoutineTrigger":"Azure.AI.Projects.RoutineTrigger","com.azure.ai.projects.models.RoutineTriggerType":"Azure.AI.Projects.RoutineTriggerType","com.azure.ai.projects.models.RubricBasedEvaluatorDefinition":"Azure.AI.Projects.RubricBasedEvaluatorDefinition","com.azure.ai.projects.models.RubricGenerationInputQualityWarning":"Azure.AI.Projects.RubricGenerationInputQualityWarning","com.azure.ai.projects.models.RubricGenerationInputQualityWarningCode":"Azure.AI.Projects.RubricGenerationInputQualityWarningCode","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSeverity":"Azure.AI.Projects.RubricGenerationInputQualityWarningSeverity","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSource":"Azure.AI.Projects.RubricGenerationInputQualityWarningSource","com.azure.ai.projects.models.SampleType":"Azure.AI.Projects.SampleType","com.azure.ai.projects.models.SasCredential":"Azure.AI.Projects.SASCredentials","com.azure.ai.projects.models.Schedule":"Azure.AI.Projects.Schedule","com.azure.ai.projects.models.ScheduleProvisioningStatus":"Azure.AI.Projects.ScheduleProvisioningStatus","com.azure.ai.projects.models.ScheduleRoutineTrigger":"Azure.AI.Projects.ScheduleRoutineTrigger","com.azure.ai.projects.models.ScheduleRun":"Azure.AI.Projects.ScheduleRun","com.azure.ai.projects.models.ScheduleTask":"Azure.AI.Projects.ScheduleTask","com.azure.ai.projects.models.ScheduleTaskType":"Azure.AI.Projects.ScheduleTaskType","com.azure.ai.projects.models.SimpleQnADataGenerationJobConfiguration":"Azure.AI.Projects.SimpleQnADataGenerationJobConfiguration","com.azure.ai.projects.models.SimpleQnAFineTuningQuestionType":"Azure.AI.Projects.SimpleQnAFineTuningQuestionType","com.azure.ai.projects.models.SimulationSeedDataGenerationJobConfiguration":"Azure.AI.Projects.SimulationSeedDataGenerationJobConfiguration","com.azure.ai.projects.models.SkillDetails":"Azure.AI.Projects.Skill","com.azure.ai.projects.models.SkillFileDetails":"TypeSpec.Http.File","com.azure.ai.projects.models.SkillInlineContent":"Azure.AI.Projects.SkillInlineContent","com.azure.ai.projects.models.SkillVersion":"Azure.AI.Projects.SkillVersion","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJob":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJob","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobInputs":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.Target":"Azure.AI.Projects.FoundryEvaluationTarget","com.azure.ai.projects.models.TargetConfig":"Azure.AI.Projects.RedTeamTargetConfig","com.azure.ai.projects.models.TaxonomyCategory":"Azure.AI.Projects.TaxonomyCategory","com.azure.ai.projects.models.TaxonomySubCategory":"Azure.AI.Projects.TaxonomySubCategory","com.azure.ai.projects.models.TestingCriterionAzureAIEvaluator":"Azure.AI.Projects.TestingCriterionAzureAIEvaluator","com.azure.ai.projects.models.TimerRoutineTrigger":"Azure.AI.Projects.TimerRoutineTrigger","com.azure.ai.projects.models.ToolDescription":"Azure.AI.Projects.ToolDescription","com.azure.ai.projects.models.ToolUseFineTuningDataGenerationJobConfiguration":"Azure.AI.Projects.ToolUseFineTuningDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobConfiguration":"Azure.AI.Projects.TracesDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobSource":"Azure.AI.Projects.TracesDataGenerationJobSource","com.azure.ai.projects.models.TracesEvaluatorGenerationJobSource":"Azure.AI.Projects.TracesEvaluatorGenerationJobSource","com.azure.ai.projects.models.TreatmentEffectType":"Azure.AI.Projects.TreatmentEffectType","com.azure.ai.projects.models.Trigger":"Azure.AI.Projects.Trigger","com.azure.ai.projects.models.TriggerType":"Azure.AI.Projects.TriggerType","com.azure.ai.projects.models.UpdateModelVersionInput":"Azure.AI.Projects.UpdateModelVersionRequest","com.azure.ai.projects.models.WeeklyRecurrenceSchedule":"Azure.AI.Projects.WeeklyRecurrenceSchedule"},"generatedFiles":["src/main/java/com/azure/ai/projects/AIProjectClientBuilder.java","src/main/java/com/azure/ai/projects/AIProjectsServiceVersion.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsClient.java","src/main/java/com/azure/ai/projects/BetaInsightsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaInsightsClient.java","src/main/java/com/azure/ai/projects/BetaModelsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaModelsClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesClient.java","src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSkillsClient.java","src/main/java/com/azure/ai/projects/ConnectionsAsyncClient.java","src/main/java/com/azure/ai/projects/ConnectionsClient.java","src/main/java/com/azure/ai/projects/DatasetsAsyncClient.java","src/main/java/com/azure/ai/projects/DatasetsClient.java","src/main/java/com/azure/ai/projects/DeploymentsAsyncClient.java","src/main/java/com/azure/ai/projects/DeploymentsClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesClient.java","src/main/java/com/azure/ai/projects/EvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluatorsClient.java","src/main/java/com/azure/ai/projects/IndexesAsyncClient.java","src/main/java/com/azure/ai/projects/IndexesClient.java","src/main/java/com/azure/ai/projects/implementation/AIProjectClientImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaAgentInsightMonitorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluationTaxonomiesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaInsightsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaModelsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRedTeamsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRoutinesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSchedulesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSkillsImpl.java","src/main/java/com/azure/ai/projects/implementation/ConnectionsImpl.java","src/main/java/com/azure/ai/projects/implementation/DatasetsImpl.java","src/main/java/com/azure/ai/projects/implementation/DeploymentsImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluationRulesImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/IndexesImpl.java","src/main/java/com/azure/ai/projects/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/projects/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/projects/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/PollingUtils.java","src/main/java/com/azure/ai/projects/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/models/CreateOrUpdateRoutineRequest.java","src/main/java/com/azure/ai/projects/implementation/models/CreateSkillVersionRequest.java","src/main/java/com/azure/ai/projects/implementation/models/DispatchRoutineAsyncRequest.java","src/main/java/com/azure/ai/projects/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/projects/implementation/models/UpdateSkillRequest.java","src/main/java/com/azure/ai/projects/implementation/models/package-info.java","src/main/java/com/azure/ai/projects/implementation/package-info.java","src/main/java/com/azure/ai/projects/models/AIProjectIndex.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/AgentDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentInsight.java","src/main/java/com/azure/ai/projects/models/AgentInsightDetails.java","src/main/java/com/azure/ai/projects/models/AgentInsightEstimatedCost.java","src/main/java/com/azure/ai/projects/models/AgentInsightHighlightedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightLinkedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitor.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorListItem.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightOverviewSource.java","src/main/java/com/azure/ai/projects/models/AgentInsightPromptSurface.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFix.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixChange.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixKind.java","src/main/java/com/azure/ai/projects/models/AgentInsightRecommendedAction.java","src/main/java/com/azure/ai/projects/models/AgentInsightRun.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunResult.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunTrigger.java","src/main/java/com/azure/ai/projects/models/AgentInsightSeverity.java","src/main/java/com/azure/ai/projects/models/AgentInsightStatus.java","src/main/java/com/azure/ai/projects/models/AgentInsightSuspension.java","src/main/java/com/azure/ai/projects/models/AgentInsightTokenUsage.java","src/main/java/com/azure/ai/projects/models/AgentInsightUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverview.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverviewOverride.java","src/main/java/com/azure/ai/projects/models/AgentTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/AgenticIdentityPreviewCredential.java","src/main/java/com/azure/ai/projects/models/ApiError.java","src/main/java/com/azure/ai/projects/models/ApiKeyCredential.java","src/main/java/com/azure/ai/projects/models/ArtifactProfile.java","src/main/java/com/azure/ai/projects/models/AttackStrategy.java","src/main/java/com/azure/ai/projects/models/AzureAIAgentTarget.java","src/main/java/com/azure/ai/projects/models/AzureAIModelTarget.java","src/main/java/com/azure/ai/projects/models/AzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/AzureOpenAIModelConfiguration.java","src/main/java/com/azure/ai/projects/models/BaseCredential.java","src/main/java/com/azure/ai/projects/models/BlobReference.java","src/main/java/com/azure/ai/projects/models/BlobReferenceSasCredential.java","src/main/java/com/azure/ai/projects/models/ChartCoordinate.java","src/main/java/com/azure/ai/projects/models/ClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/ClusterTokenUsage.java","src/main/java/com/azure/ai/projects/models/CodeBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/Connection.java","src/main/java/com/azure/ai/projects/models/ConnectionType.java","src/main/java/com/azure/ai/projects/models/ContinuousEvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/CosmosDBIndex.java","src/main/java/com/azure/ai/projects/models/CreateAsyncResponse.java","src/main/java/com/azure/ai/projects/models/CreateSkillVersionFromFilesBody.java","src/main/java/com/azure/ai/projects/models/CredentialType.java","src/main/java/com/azure/ai/projects/models/CronTrigger.java","src/main/java/com/azure/ai/projects/models/CustomCredential.java","src/main/java/com/azure/ai/projects/models/CustomRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/DailyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/DataGenerationJob.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputWriteMode.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobResult.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobScenario.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobType.java","src/main/java/com/azure/ai/projects/models/DataGenerationModelOptions.java","src/main/java/com/azure/ai/projects/models/DataGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/DatasetCredential.java","src/main/java/com/azure/ai/projects/models/DatasetDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DatasetEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DatasetReference.java","src/main/java/com/azure/ai/projects/models/DatasetType.java","src/main/java/com/azure/ai/projects/models/DatasetVersion.java","src/main/java/com/azure/ai/projects/models/Deployment.java","src/main/java/com/azure/ai/projects/models/DeploymentType.java","src/main/java/com/azure/ai/projects/models/Dimension.java","src/main/java/com/azure/ai/projects/models/DispatchRoutineResult.java","src/main/java/com/azure/ai/projects/models/EmbeddingConfiguration.java","src/main/java/com/azure/ai/projects/models/EndpointBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EntraIdCredential.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/EvaluationLevel.java","src/main/java/com/azure/ai/projects/models/EvaluationResult.java","src/main/java/com/azure/ai/projects/models/EvaluationResultSample.java","src/main/java/com/azure/ai/projects/models/EvaluationRule.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleActionType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleEventType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleFilter.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultCompareItem.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultComparison.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultSummary.java","src/main/java/com/azure/ai/projects/models/EvaluationScheduleTask.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomy.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInputType.java","src/main/java/com/azure/ai/projects/models/EvaluatorCategory.java","src/main/java/com/azure/ai/projects/models/EvaluatorCredentialInput.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinitionType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationArtifacts.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationInputs.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetric.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricDirection.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricType.java","src/main/java/com/azure/ai/projects/models/EvaluatorType.java","src/main/java/com/azure/ai/projects/models/EvaluatorVersion.java","src/main/java/com/azure/ai/projects/models/FieldMapping.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/FileDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FolderDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileCategory.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileSignal.java","src/main/java/com/azure/ai/projects/models/FoundryModelSourceType.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarning.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarningCode.java","src/main/java/com/azure/ai/projects/models/FoundryModelWeightType.java","src/main/java/com/azure/ai/projects/models/GenerationWarningType.java","src/main/java/com/azure/ai/projects/models/GitHubIssueEvent.java","src/main/java/com/azure/ai/projects/models/GitHubIssueRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/GraderAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/HourlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/HumanEvaluationPreviewRuleAction.java","src/main/java/com/azure/ai/projects/models/IndexType.java","src/main/java/com/azure/ai/projects/models/Insight.java","src/main/java/com/azure/ai/projects/models/InsightCluster.java","src/main/java/com/azure/ai/projects/models/InsightModelConfiguration.java","src/main/java/com/azure/ai/projects/models/InsightRequest.java","src/main/java/com/azure/ai/projects/models/InsightResult.java","src/main/java/com/azure/ai/projects/models/InsightSample.java","src/main/java/com/azure/ai/projects/models/InsightScheduleTask.java","src/main/java/com/azure/ai/projects/models/InsightSummary.java","src/main/java/com/azure/ai/projects/models/InsightType.java","src/main/java/com/azure/ai/projects/models/InsightsMetadata.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/JobStatus.java","src/main/java/com/azure/ai/projects/models/ListVersionsRequestType.java","src/main/java/com/azure/ai/projects/models/LoraConfig.java","src/main/java/com/azure/ai/projects/models/ManagedAzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/ModelCredentialInput.java","src/main/java/com/azure/ai/projects/models/ModelDeployment.java","src/main/java/com/azure/ai/projects/models/ModelDeploymentSku.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadInput.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadResult.java","src/main/java/com/azure/ai/projects/models/ModelSamplingParams.java","src/main/java/com/azure/ai/projects/models/ModelSourceData.java","src/main/java/com/azure/ai/projects/models/ModelVersion.java","src/main/java/com/azure/ai/projects/models/MonthlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/NoAuthenticationCredential.java","src/main/java/com/azure/ai/projects/models/OneTimeTrigger.java","src/main/java/com/azure/ai/projects/models/OperationStatus.java","src/main/java/com/azure/ai/projects/models/PendingUploadRequest.java","src/main/java/com/azure/ai/projects/models/PendingUploadResponse.java","src/main/java/com/azure/ai/projects/models/PendingUploadType.java","src/main/java/com/azure/ai/projects/models/PromptBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/PromptDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/PromptEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/RecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/RecurrenceTrigger.java","src/main/java/com/azure/ai/projects/models/RecurrenceType.java","src/main/java/com/azure/ai/projects/models/RedTeam.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/RiskCategory.java","src/main/java/com/azure/ai/projects/models/Routine.java","src/main/java/com/azure/ai/projects/models/RoutineAction.java","src/main/java/com/azure/ai/projects/models/RoutineActionType.java","src/main/java/com/azure/ai/projects/models/RoutineAttemptSource.java","src/main/java/com/azure/ai/projects/models/RoutineAuthorization.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchIdentity.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayload.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayloadType.java","src/main/java/com/azure/ai/projects/models/RoutineRun.java","src/main/java/com/azure/ai/projects/models/RoutineRunPhase.java","src/main/java/com/azure/ai/projects/models/RoutineTrigger.java","src/main/java/com/azure/ai/projects/models/RoutineTriggerType.java","src/main/java/com/azure/ai/projects/models/RubricBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarning.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningCode.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSeverity.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSource.java","src/main/java/com/azure/ai/projects/models/SampleType.java","src/main/java/com/azure/ai/projects/models/SasCredential.java","src/main/java/com/azure/ai/projects/models/Schedule.java","src/main/java/com/azure/ai/projects/models/ScheduleProvisioningStatus.java","src/main/java/com/azure/ai/projects/models/ScheduleRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ScheduleRun.java","src/main/java/com/azure/ai/projects/models/ScheduleTask.java","src/main/java/com/azure/ai/projects/models/ScheduleTaskType.java","src/main/java/com/azure/ai/projects/models/SimpleQnADataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SimpleQnAFineTuningQuestionType.java","src/main/java/com/azure/ai/projects/models/SimulationSeedDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SkillDetails.java","src/main/java/com/azure/ai/projects/models/SkillFileDetails.java","src/main/java/com/azure/ai/projects/models/SkillInlineContent.java","src/main/java/com/azure/ai/projects/models/SkillVersion.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/Target.java","src/main/java/com/azure/ai/projects/models/TargetConfig.java","src/main/java/com/azure/ai/projects/models/TaxonomyCategory.java","src/main/java/com/azure/ai/projects/models/TaxonomySubCategory.java","src/main/java/com/azure/ai/projects/models/TestingCriterionAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/TimerRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ToolDescription.java","src/main/java/com/azure/ai/projects/models/ToolUseFineTuningDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TracesEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TreatmentEffectType.java","src/main/java/com/azure/ai/projects/models/Trigger.java","src/main/java/com/azure/ai/projects/models/TriggerType.java","src/main/java/com/azure/ai/projects/models/UpdateModelVersionInput.java","src/main/java/com/azure/ai/projects/models/WeeklyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/package-info.java","src/main/java/com/azure/ai/projects/package-info.java","src/main/java/module-info.java"]}
\ No newline at end of file
diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml b/sdk/ai/azure-ai-projects/tsp-location.yaml
index 9f407863456d..0165f08c49b1 100644
--- a/sdk/ai/azure-ai-projects/tsp-location.yaml
+++ b/sdk/ai/azure-ai-projects/tsp-location.yaml
@@ -1,5 +1,5 @@
 directory: specification/ai-foundry/data-plane/Foundry/src/sdk-java-azure-ai-projects
-commit: 040251f8f0685dfc8a9dfe42e85f494bf2d94d6f
+commit: 0bfe00ed62b780c6d3c8da93c9b314728c3d283f
 repo: Azure/azure-rest-api-specs
 additionalDirectories:
     - specification/ai-foundry/data-plane/Foundry/src/sdk-common

From e42c612f9bb28730063eedef66f84d3ab53b2728 Mon Sep 17 00:00:00 2001
From: Kaylie <50653231+kaylieee@users.noreply.github.com>
Date: Wed, 14 Oct 2026 15:16:58 -0700
Subject: [PATCH 06/13] Regen without mem snapshot (#50805)

---
 .../agents/models/HostedAgentDefinition.java  | 38 -------------------
 .../META-INF/azure-ai-agents_metadata.json    |  2 +-
 sdk/ai/azure-ai-agents/tsp-location.yaml      |  2 +-
 3 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java
index 0eda15791f90..bd8467c1ba4a 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java
@@ -124,7 +124,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
         jsonWriter.writeJsonField("code_configuration", this.codeConfiguration);
         jsonWriter.writeJsonField("telemetry_config", this.telemetryConfig);
         jsonWriter.writeJsonField("session_configuration", this.sessionConfiguration);
-        jsonWriter.writeBooleanField("enable_memory_snapshot", this.enableMemorySnapshot);
         return jsonWriter.writeEndObject();
     }
 
@@ -150,7 +149,6 @@ public static HostedAgentDefinition fromJson(JsonReader jsonReader) throws IOExc
             CodeConfiguration codeConfiguration = null;
             TelemetryConfig telemetryConfig = null;
             SessionConfiguration sessionConfiguration = null;
-            Boolean enableMemorySnapshot = null;
             while (reader.nextToken() != JsonToken.END_OBJECT) {
                 String fieldName = reader.getFieldName();
                 reader.nextToken();
@@ -174,8 +172,6 @@ public static HostedAgentDefinition fromJson(JsonReader jsonReader) throws IOExc
                     telemetryConfig = TelemetryConfig.fromJson(reader);
                 } else if ("session_configuration".equals(fieldName)) {
                     sessionConfiguration = SessionConfiguration.fromJson(reader);
-                } else if ("enable_memory_snapshot".equals(fieldName)) {
-                    enableMemorySnapshot = reader.getNullable(JsonReader::getBoolean);
                 } else {
                     reader.skipChildren();
                 }
@@ -189,7 +185,6 @@ public static HostedAgentDefinition fromJson(JsonReader jsonReader) throws IOExc
             deserializedHostedAgentDefinition.codeConfiguration = codeConfiguration;
             deserializedHostedAgentDefinition.telemetryConfig = telemetryConfig;
             deserializedHostedAgentDefinition.sessionConfiguration = sessionConfiguration;
-            deserializedHostedAgentDefinition.enableMemorySnapshot = enableMemorySnapshot;
             return deserializedHostedAgentDefinition;
         });
     }
@@ -355,37 +350,4 @@ public HostedAgentDefinition setSessionConfiguration(SessionConfiguration sessio
         this.sessionConfiguration = sessionConfiguration;
         return this;
     }
-
-    /*
-     * Whether this agent version uses memory snapshots. Sessions for a snapshot-enabled version start from a snapshot
-     * of the agent's initialized process rather than starting the process from its image. Defaults to false.
-     */
-    @Generated
-    private Boolean enableMemorySnapshot;
-
-    /**
-     * Get the enableMemorySnapshot property: Whether this agent version uses memory snapshots. Sessions for a
-     * snapshot-enabled version start from a snapshot of the agent's initialized process rather than starting the
-     * process from its image. Defaults to false.
-     *
-     * @return the enableMemorySnapshot value.
-     */
-    @Generated
-    public Boolean isEnableMemorySnapshot() {
-        return this.enableMemorySnapshot;
-    }
-
-    /**
-     * Set the enableMemorySnapshot property: Whether this agent version uses memory snapshots. Sessions for a
-     * snapshot-enabled version start from a snapshot of the agent's initialized process rather than starting the
-     * process from its image. Defaults to false.
-     *
-     * @param enableMemorySnapshot the enableMemorySnapshot value to set.
-     * @return the HostedAgentDefinition object itself.
-     */
-    @Generated
-    public HostedAgentDefinition setEnableMemorySnapshot(Boolean enableMemorySnapshot) {
-        this.enableMemorySnapshot = enableMemorySnapshot;
-        return this;
-    }
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json
index 258fce868bb6..7aa46ff2f8e1 100644
--- a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json
+++ b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json
@@ -1 +1 @@
-{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"da8670faffc9","crossLanguageDefinitions":{"com.azure.ai.agents.AgentsAsyncClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsAsyncClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsAsyncClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsAsyncClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsAsyncClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsAsyncClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsAsyncClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClientBuilder":"Azure.AI.Projects","com.azure.ai.agents.BetaAgentsAsyncClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaMemoryStoresAsyncClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.ToolboxesAsyncClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesAsyncClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesAsyncClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.implementation.models.AgentDefinitionOptInKeys":"Azure.AI.Projects.AgentDefinitionOptInKeys","com.azure.ai.agents.implementation.models.CreateAgentFromCodeContent":"Azure.AI.Projects.CreateAgentFromCodeContent","com.azure.ai.agents.implementation.models.CreateAgentFromManifestRequest":"Azure.AI.Projects.createAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentOptions":null,"com.azure.ai.agents.implementation.models.CreateAgentRequest":"Azure.AI.Projects.createAgent.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionFromManifestRequest":"Azure.AI.Projects.createAgentVersionFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionRequest":"Azure.AI.Projects.createAgentVersion.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryRequest":"Azure.AI.Projects.createMemory.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryStoreRequest":"Azure.AI.Projects.createMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.CreateSessionRequest":"Azure.AI.Projects.createSession.Request.anonymous","com.azure.ai.agents.implementation.models.CreateToolboxVersionRequest":"Azure.AI.Projects.createToolboxVersion.Request.anonymous","com.azure.ai.agents.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.agents.implementation.models.GetMicrosoft365AppPackageRequest":"Azure.AI.Projects.getMicrosoft365AppPackage.Request.anonymous","com.azure.ai.agents.implementation.models.ListMemoriesRequest":"Azure.AI.Projects.listMemories.Request.anonymous","com.azure.ai.agents.implementation.models.PublishAgentToMicrosoft365Request":"Azure.AI.Projects.publishAgentToMicrosoft365.Request.anonymous","com.azure.ai.agents.implementation.models.ReplaceTelephonyTransferTargetsRequest":"Azure.AI.Projects.replaceTelephonyTransferTargets.Request.anonymous","com.azure.ai.agents.implementation.models.SearchMemoriesRequest":"Azure.AI.Projects.searchMemories.Request.anonymous","com.azure.ai.agents.implementation.models.TransferTelephonyCallRequest":"Azure.AI.Projects.transferTelephonyCall.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest":"Azure.AI.Projects.updateAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentRequest":"Azure.AI.Projects.updateAgent.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoriesRequest":"Azure.AI.Projects.updateMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryRequest":"Azure.AI.Projects.updateMemory.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryStoreRequest":"Azure.AI.Projects.updateMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateToolboxInput":"Azure.AI.Projects.UpdateToolboxRequest","com.azure.ai.agents.implementation.models.UpdateToolboxRequest":"Azure.AI.Projects.updateToolbox.Request.anonymous","com.azure.ai.agents.models.A2APreviewTool":"Azure.AI.Projects.A2APreviewTool","com.azure.ai.agents.models.A2APreviewToolboxTool":"Azure.AI.Projects.A2APreviewToolboxTool","com.azure.ai.agents.models.A2AProtocolConfiguration":"Azure.AI.Projects.A2AProtocolConfiguration","com.azure.ai.agents.models.A2AProtocolVersion":"Azure.AI.Projects.A2AProtocolVersion","com.azure.ai.agents.models.A2ATool":"Azure.AI.Projects.A2ATool","com.azure.ai.agents.models.A2AToolCall":"Azure.AI.Projects.A2AToolCall","com.azure.ai.agents.models.A2AToolCallOutput":"Azure.AI.Projects.A2AToolCallOutput","com.azure.ai.agents.models.A2AToolboxTool":"Azure.AI.Projects.A2AToolboxTool","com.azure.ai.agents.models.AISearchIndexResource":"Azure.AI.Projects.AISearchIndexResource","com.azure.ai.agents.models.ActivityProtocolAccessBoundary":"Azure.AI.Projects.ActivityProtocolAccessBoundary","com.azure.ai.agents.models.ActivityProtocolConfiguration":"Azure.AI.Projects.ActivityProtocolConfiguration","com.azure.ai.agents.models.AgentBlueprintReference":"Azure.AI.Projects.AgentBlueprintReference","com.azure.ai.agents.models.AgentBlueprintReferenceType":"Azure.AI.Projects.AgentBlueprintReferenceType","com.azure.ai.agents.models.AgentCard":"Azure.AI.Projects.AgentCard","com.azure.ai.agents.models.AgentCardSkill":"Azure.AI.Projects.AgentCardSkill","com.azure.ai.agents.models.AgentDefinition":"Azure.AI.Projects.AgentDefinition","com.azure.ai.agents.models.AgentDetails":"Azure.AI.Projects.AgentObject","com.azure.ai.agents.models.AgentDetailsVersions":"Azure.AI.Projects.AgentObject.versions.anonymous","com.azure.ai.agents.models.AgentEndpointAuthorizationScheme":"Azure.AI.Projects.AgentEndpointAuthorizationScheme","com.azure.ai.agents.models.AgentEndpointAuthorizationSchemeType":"Azure.AI.Projects.AgentEndpointAuthorizationSchemeType","com.azure.ai.agents.models.AgentEndpointConfig":"Azure.AI.Projects.AgentEndpointConfig","com.azure.ai.agents.models.AgentEndpointProtocol":"Azure.AI.Projects.AgentEndpointProtocol","com.azure.ai.agents.models.AgentHarness":"Azure.AI.Projects.AgentHarness","com.azure.ai.agents.models.AgentIdentity":"Azure.AI.Projects.AgentIdentity","com.azure.ai.agents.models.AgentIdentityStatus":"Azure.AI.Projects.AgentIdentityStatus","com.azure.ai.agents.models.AgentKind":"Azure.AI.Projects.AgentKind","com.azure.ai.agents.models.AgentObjectType":"Azure.AI.Projects.AgentObjectType","com.azure.ai.agents.models.AgentOptimizationAgentCandidateOutput":"Azure.AI.Projects.AgentOptimizationAgentCandidateOutput","com.azure.ai.agents.models.AgentOptimizationBaselineAgentConfiguration":"Azure.AI.Projects.AgentOptimizationBaselineAgentConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationCandidate","com.azure.ai.agents.models.AgentOptimizationCandidateEvaluation":"Azure.AI.Projects.AgentOptimizationCandidateEvaluation","com.azure.ai.agents.models.AgentOptimizationCandidateExpand":"Azure.AI.Projects.AgentOptimizationCandidateExpand","com.azure.ai.agents.models.AgentOptimizationCandidateOutput":"Azure.AI.Projects.AgentOptimizationCandidateOutput","com.azure.ai.agents.models.AgentOptimizationCandidatePromotionInfo":"Azure.AI.Projects.AgentOptimizationCandidatePromotionInfo","com.azure.ai.agents.models.AgentOptimizationCandidateSearchConfiguration":"Azure.AI.Projects.AgentOptimizationCandidateSearchConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidateStatus":"Azure.AI.Projects.AgentOptimizationCandidateStatus","com.azure.ai.agents.models.AgentOptimizationConfiguration":"Azure.AI.Projects.AgentOptimizationConfiguration","com.azure.ai.agents.models.AgentOptimizationConfigurationBase":"Azure.AI.Projects.AgentOptimizationConfigurationBase","com.azure.ai.agents.models.AgentOptimizationConfigurationType":"Azure.AI.Projects.AgentOptimizationConfigurationType","com.azure.ai.agents.models.AgentOptimizationCostEstimate":"Azure.AI.Projects.AgentOptimizationCostEstimate","com.azure.ai.agents.models.AgentOptimizationDataSourceType":"Azure.AI.Projects.AgentOptimizationDataSourceType","com.azure.ai.agents.models.AgentOptimizationEstimateBand":"Azure.AI.Projects.AgentOptimizationEstimateBand","com.azure.ai.agents.models.AgentOptimizationEstimateInputs":"Azure.AI.Projects.AgentOptimizationEstimateInputs","com.azure.ai.agents.models.AgentOptimizationEstimateResult":"Azure.AI.Projects.AgentOptimizationEstimateResult","com.azure.ai.agents.models.AgentOptimizationEvaluationConfiguration":"Azure.AI.Projects.AgentOptimizationEvaluationConfiguration","com.azure.ai.agents.models.AgentOptimizationEvaluationSet":"Azure.AI.Projects.AgentOptimizationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationEvaluationSetType":"Azure.AI.Projects.AgentOptimizationEvaluationSetType","com.azure.ai.agents.models.AgentOptimizationEvaluatorReference":"Azure.AI.Projects.AgentOptimizationEvaluator","com.azure.ai.agents.models.AgentOptimizationFoundryAgentTargetConfiguration":"Azure.AI.Projects.AgentOptimizationFoundryAgentTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationGoal":"Azure.AI.Projects.AgentOptimizationGoal","com.azure.ai.agents.models.AgentOptimizationInstructionsMutation":"Azure.AI.Projects.AgentOptimizationInstructionsMutation","com.azure.ai.agents.models.AgentOptimizationJob":"Azure.AI.Projects.AgentOptimizationJob","com.azure.ai.agents.models.AgentOptimizationJobLatency":"Azure.AI.Projects.AgentOptimizationJobLatency","com.azure.ai.agents.models.AgentOptimizationJobResult":"Azure.AI.Projects.AgentOptimizationJobResult","com.azure.ai.agents.models.AgentOptimizationJobTokenUsage":"Azure.AI.Projects.AgentOptimizationJobTokenUsage","com.azure.ai.agents.models.AgentOptimizationModelConfiguration":"Azure.AI.Projects.AgentOptimizationModelConfiguration","com.azure.ai.agents.models.AgentOptimizationModelMutation":"Azure.AI.Projects.AgentOptimizationModelMutation","com.azure.ai.agents.models.AgentOptimizationMutation":"Azure.AI.Projects.AgentOptimizationMutation","com.azure.ai.agents.models.AgentOptimizationPromptCandidateOutput":"Azure.AI.Projects.AgentOptimizationPromptCandidateOutput","com.azure.ai.agents.models.AgentOptimizationResultCandidateSummary":"Azure.AI.Projects.AgentOptimizationResultCandidateSummary","com.azure.ai.agents.models.AgentOptimizationSkill":"Azure.AI.Projects.AgentOptimizationSkill","com.azure.ai.agents.models.AgentOptimizationSkillsMutation":"Azure.AI.Projects.AgentOptimizationSkillsMutation","com.azure.ai.agents.models.AgentOptimizationSpace":"Azure.AI.Projects.AgentOptimizationSpace","com.azure.ai.agents.models.AgentOptimizationStage":"Azure.AI.Projects.AgentOptimizationStage","com.azure.ai.agents.models.AgentOptimizationStageEstimate":"Azure.AI.Projects.AgentOptimizationStageEstimate","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionEvaluationSet":"Azure.AI.Projects.AgentOptimizationTargetCompletionEvaluationSet","com.azure.ai.agents.models.AgentOptimizationTargetCompletionInlineDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionInlineDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionTestCase":"Azure.AI.Projects.AgentOptimizationTargetCompletionTestCase","com.azure.ai.agents.models.AgentOptimizationTargetConfiguration":"Azure.AI.Projects.AgentOptimizationTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationTargetConfigurationType":"Azure.AI.Projects.AgentOptimizationTargetConfigurationType","com.azure.ai.agents.models.AgentOptimizationTerminationReason":"Azure.AI.Projects.AgentOptimizationTerminationReason","com.azure.ai.agents.models.AgentOptimizationToolsMutation":"Azure.AI.Projects.AgentOptimizationToolsMutation","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationEvaluationSet":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationInlineDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationInlineDataSource","com.azure.ai.agents.models.AgentReference":"Azure.AI.Projects.AgentReference","com.azure.ai.agents.models.AgentSessionResource":"Azure.AI.Projects.AgentSessionResource","com.azure.ai.agents.models.AgentSessionStatus":"Azure.AI.Projects.AgentSessionStatus","com.azure.ai.agents.models.AgentState":"Azure.AI.Projects.AgentState","com.azure.ai.agents.models.AgentStateSource":"Azure.AI.Projects.AgentStateSource","com.azure.ai.agents.models.AgentVersionDetails":"Azure.AI.Projects.AgentVersionObject","com.azure.ai.agents.models.AgentVersionStatus":"Azure.AI.Projects.AgentVersionStatus","com.azure.ai.agents.models.ApiError":"OpenAI.Error","com.azure.ai.agents.models.ApplyPatchToolParameter":"OpenAI.ApplyPatchToolParam","com.azure.ai.agents.models.ApproximateLocation":"OpenAI.ApproximateLocation","com.azure.ai.agents.models.AudioTranscription":"OpenAI.AudioTranscription","com.azure.ai.agents.models.AudioTranscriptionModel":"OpenAI.AudioTranscription.model.anonymous","com.azure.ai.agents.models.AutoCodeInterpreterToolParameter":"OpenAI.AutoCodeInterpreterToolParam","com.azure.ai.agents.models.AzureAISearchQueryType":"Azure.AI.Projects.AzureAISearchQueryType","com.azure.ai.agents.models.AzureAISearchTool":"Azure.AI.Projects.AzureAISearchTool","com.azure.ai.agents.models.AzureAISearchToolCall":"Azure.AI.Projects.AzureAISearchToolCall","com.azure.ai.agents.models.AzureAISearchToolCallOutput":"Azure.AI.Projects.AzureAISearchToolCallOutput","com.azure.ai.agents.models.AzureAISearchToolResource":"Azure.AI.Projects.AzureAISearchToolResource","com.azure.ai.agents.models.AzureAISearchToolboxTool":"Azure.AI.Projects.AzureAISearchToolboxTool","com.azure.ai.agents.models.AzureCreateResponseDetails":"Azure.AI.Projects.AzureCreateResponseDetails","com.azure.ai.agents.models.AzureCreateResponseOptions":"Azure.AI.Projects.AzureCreateResponseOptions","com.azure.ai.agents.models.AzureFunctionBinding":"Azure.AI.Projects.AzureFunctionBinding","com.azure.ai.agents.models.AzureFunctionDefinition":"Azure.AI.Projects.AzureFunctionDefinition","com.azure.ai.agents.models.AzureFunctionDefinitionDetails":"Azure.AI.Projects.AzureFunctionDefinition.function.anonymous","com.azure.ai.agents.models.AzureFunctionStorageQueue":"Azure.AI.Projects.AzureFunctionStorageQueue","com.azure.ai.agents.models.AzureFunctionTool":"Azure.AI.Projects.AzureFunctionTool","com.azure.ai.agents.models.AzureFunctionToolCall":"Azure.AI.Projects.AzureFunctionToolCall","com.azure.ai.agents.models.AzureFunctionToolCallOutput":"Azure.AI.Projects.AzureFunctionToolCallOutput","com.azure.ai.agents.models.AzureUserSecurityContext":"Azure.AI.Projects.AzureUserSecurityContext","com.azure.ai.agents.models.BingCustomSearchConfiguration":"Azure.AI.Projects.BingCustomSearchConfiguration","com.azure.ai.agents.models.BingCustomSearchPreviewTool":"Azure.AI.Projects.BingCustomSearchPreviewTool","com.azure.ai.agents.models.BingCustomSearchToolCall":"Azure.AI.Projects.BingCustomSearchToolCall","com.azure.ai.agents.models.BingCustomSearchToolCallOutput":"Azure.AI.Projects.BingCustomSearchToolCallOutput","com.azure.ai.agents.models.BingCustomSearchToolParameters":"Azure.AI.Projects.BingCustomSearchToolParameters","com.azure.ai.agents.models.BingGroundingSearchConfiguration":"Azure.AI.Projects.BingGroundingSearchConfiguration","com.azure.ai.agents.models.BingGroundingSearchToolParameters":"Azure.AI.Projects.BingGroundingSearchToolParameters","com.azure.ai.agents.models.BingGroundingTool":"Azure.AI.Projects.BingGroundingTool","com.azure.ai.agents.models.BingGroundingToolCall":"Azure.AI.Projects.BingGroundingToolCall","com.azure.ai.agents.models.BingGroundingToolCallOutput":"Azure.AI.Projects.BingGroundingToolCallOutput","com.azure.ai.agents.models.BotServiceAuthorizationScheme":"Azure.AI.Projects.BotServiceAuthorizationScheme","com.azure.ai.agents.models.BotServiceRbacAuthorizationScheme":"Azure.AI.Projects.BotServiceRbacAuthorizationScheme","com.azure.ai.agents.models.BotServiceTenantAuthorizationScheme":"Azure.AI.Projects.BotServiceTenantAuthorizationScheme","com.azure.ai.agents.models.BrowserAutomationPreviewTool":"Azure.AI.Projects.BrowserAutomationPreviewTool","com.azure.ai.agents.models.BrowserAutomationPreviewToolboxTool":"Azure.AI.Projects.BrowserAutomationPreviewToolboxTool","com.azure.ai.agents.models.BrowserAutomationTool":"Azure.AI.Projects.BrowserAutomationTool","com.azure.ai.agents.models.BrowserAutomationToolCall":"Azure.AI.Projects.BrowserAutomationToolCall","com.azure.ai.agents.models.BrowserAutomationToolCallOutput":"Azure.AI.Projects.BrowserAutomationToolCallOutput","com.azure.ai.agents.models.BrowserAutomationToolConnectionParameters":"Azure.AI.Projects.BrowserAutomationToolConnectionParameters","com.azure.ai.agents.models.BrowserAutomationToolParameters":"Azure.AI.Projects.BrowserAutomationToolParameters","com.azure.ai.agents.models.BrowserAutomationToolboxTool":"Azure.AI.Projects.BrowserAutomationToolboxTool","com.azure.ai.agents.models.CallableToolAllowedCaller":"OpenAI.CallableToolAllowedCaller","com.azure.ai.agents.models.CaptureStructuredOutputsTool":"Azure.AI.Projects.CaptureStructuredOutputsTool","com.azure.ai.agents.models.ChatSummaryMemoryItem":"Azure.AI.Projects.ChatSummaryMemoryItem","com.azure.ai.agents.models.CodeConfiguration":"Azure.AI.Projects.CodeConfiguration","com.azure.ai.agents.models.CodeDependencyResolution":"Azure.AI.Projects.CodeDependencyResolution","com.azure.ai.agents.models.CodeFileDetails":null,"com.azure.ai.agents.models.CodeInterpreterTool":"OpenAI.CodeInterpreterTool","com.azure.ai.agents.models.CodeInterpreterToolboxTool":"Azure.AI.Projects.CodeInterpreterToolboxTool","com.azure.ai.agents.models.ComputerEnvironment":"ComputerEnvironmentExpandable","com.azure.ai.agents.models.ComputerTool":"OpenAI.ComputerTool","com.azure.ai.agents.models.ComputerUsePreviewTool":"OpenAI.ComputerUsePreviewTool","com.azure.ai.agents.models.ContainerAutoParameter":"OpenAI.ContainerAutoParam","com.azure.ai.agents.models.ContainerConfiguration":"Azure.AI.Projects.ContainerConfiguration","com.azure.ai.agents.models.ContainerMemoryLimit":"ContainerMemoryLimitExpandable","com.azure.ai.agents.models.ContainerNetworkPolicyAllowlistParameter":"OpenAI.ContainerNetworkPolicyAllowlistParam","com.azure.ai.agents.models.ContainerNetworkPolicyDisabledParameter":"OpenAI.ContainerNetworkPolicyDisabledParam","com.azure.ai.agents.models.ContainerNetworkPolicyDomainSecretParameter":"OpenAI.ContainerNetworkPolicyDomainSecretParam","com.azure.ai.agents.models.ContainerNetworkPolicyParamType":"OpenAI.ContainerNetworkPolicyParamType","com.azure.ai.agents.models.ContainerNetworkPolicyParameter":"OpenAI.ContainerNetworkPolicyParam","com.azure.ai.agents.models.ContainerSkill":"OpenAI.ContainerSkill","com.azure.ai.agents.models.ContainerSkillType":"OpenAI.ContainerSkillType","com.azure.ai.agents.models.CreateAgentVersionFromCodeContent":"Azure.AI.Projects.CreateAgentVersionFromCodeContent","com.azure.ai.agents.models.CreateAgentVersionFromCodeMetadata":"Azure.AI.Projects.CreateAgentVersionFromCodeMetadata","com.azure.ai.agents.models.CreateAgentVersionInput":"Azure.AI.Projects.CreateAgentVersionRequest","com.azure.ai.agents.models.CreateAgentVersionOptions":null,"com.azure.ai.agents.models.CreateTeamsPhoneExtensibilityTelephonyBindingInput":"Azure.AI.Projects.CreateTeamsPhoneExtensibilityTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyBindingInput":"Azure.AI.Projects.CreateTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyCallJobInput":"Azure.AI.Projects.CreateTelephonyCallJobRequest","com.azure.ai.agents.models.CreateTwilioTelephonyBindingInput":"Azure.AI.Projects.CreateTwilioTelephonyBindingRequest","com.azure.ai.agents.models.CustomGrammarFormatParameter":"OpenAI.CustomGrammarFormatParam","com.azure.ai.agents.models.CustomTextFormatParameter":"OpenAI.CustomTextFormatParam","com.azure.ai.agents.models.CustomToolParamFormat":"OpenAI.CustomToolParamFormat","com.azure.ai.agents.models.CustomToolParamFormatType":"OpenAI.CustomToolParamFormatType","com.azure.ai.agents.models.CustomToolParameter":"OpenAI.CustomToolParam","com.azure.ai.agents.models.DigitalWorkerType":"Azure.AI.Projects.DigitalWorkerType","com.azure.ai.agents.models.EntraAuthorizationScheme":"Azure.AI.Projects.EntraAuthorizationScheme","com.azure.ai.agents.models.EvaluationAzureStandardVoiceModelConfiguration":"Azure.AI.Projects.EvaluationAzureStandardVoiceModelConfiguration","com.azure.ai.agents.models.EvaluationModelConfiguration":"Azure.AI.Projects.EvaluationModelConfiguration","com.azure.ai.agents.models.EvaluationVoiceModelConfiguration":"Azure.AI.Projects.EvaluationVoiceModelConfiguration","com.azure.ai.agents.models.ExternalAgentDefinition":"Azure.AI.Projects.ExternalAgentDefinition","com.azure.ai.agents.models.FabricDataAgentToolCall":"Azure.AI.Projects.FabricDataAgentToolCall","com.azure.ai.agents.models.FabricDataAgentToolCallOutput":"Azure.AI.Projects.FabricDataAgentToolCallOutput","com.azure.ai.agents.models.FabricDataAgentToolParameters":"Azure.AI.Projects.FabricDataAgentToolParameters","com.azure.ai.agents.models.FabricIqPreviewTool":"Azure.AI.Projects.FabricIQPreviewTool","com.azure.ai.agents.models.FabricIqPreviewToolboxTool":"Azure.AI.Projects.FabricIQPreviewToolboxTool","com.azure.ai.agents.models.FileSearchTool":"OpenAI.FileSearchTool","com.azure.ai.agents.models.FileSearchToolboxTool":"Azure.AI.Projects.FileSearchToolboxTool","com.azure.ai.agents.models.FixedRatioVersionSelectionRule":"Azure.AI.Projects.FixedRatioVersionSelectionRule","com.azure.ai.agents.models.FunctionShellToolParamEnvironment":"OpenAI.FunctionShellToolParamEnvironment","com.azure.ai.agents.models.FunctionShellToolParamEnvironmentType":"OpenAI.FunctionShellToolParamEnvironmentType","com.azure.ai.agents.models.FunctionShellToolParameter":"OpenAI.FunctionShellToolParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentContainerReferenceParameter":"OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentLocalEnvironmentParameter":"OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam","com.azure.ai.agents.models.FunctionTool":"OpenAI.FunctionTool","com.azure.ai.agents.models.GetMicrosoft365AppPackageOptions":null,"com.azure.ai.agents.models.GitHubCopilotBuiltInTool":"Azure.AI.Projects.GitHubCopilotBuiltInTool","com.azure.ai.agents.models.GitHubCopilotHarness":"Azure.AI.Projects.GitHubCopilotHarness","com.azure.ai.agents.models.GitHubCopilotToolsetConfig":"Azure.AI.Projects.GitHubCopilotToolsetConfig","com.azure.ai.agents.models.GitHubCopilotToolsetDefaultConfig":"Azure.AI.Projects.GitHubCopilotToolsetDefaultConfig","com.azure.ai.agents.models.GitHubCopilotToolsetPreview":"Azure.AI.Projects.GitHubCopilotToolsetPreview","com.azure.ai.agents.models.GrammarSyntax":"GrammarSyntaxExpandable","com.azure.ai.agents.models.HeaderTelemetryEndpointAuth":"Azure.AI.Projects.HeaderTelemetryEndpointAuth","com.azure.ai.agents.models.HostedAgentDefinition":"Azure.AI.Projects.HostedAgentDefinition","com.azure.ai.agents.models.HybridSearchOptions":"OpenAI.HybridSearchOptions","com.azure.ai.agents.models.ImageGenActionEnum":"ImageGenActionEnumExpandable","com.azure.ai.agents.models.ImageGenTool":"OpenAI.ImageGenTool","com.azure.ai.agents.models.ImageGenToolBackground":"ImageGenToolBackgroundExpandable","com.azure.ai.agents.models.ImageGenToolInputImageMask":"OpenAI.ImageGenToolInputImageMask","com.azure.ai.agents.models.ImageGenToolModel":"OpenAI.ImageGenTool.model.anonymous","com.azure.ai.agents.models.ImageGenToolModeration":"ImageGenToolModerationExpandable","com.azure.ai.agents.models.ImageGenToolOutputFormat":"ImageGenToolOutputFormatExpandable","com.azure.ai.agents.models.ImageGenToolQuality":"ImageGenToolQualityExpandable","com.azure.ai.agents.models.ImageGenToolSize":"ImageGenToolSizeExpandable","com.azure.ai.agents.models.IncludeEnum":"OpenAI.IncludeEnum","com.azure.ai.agents.models.InlineSkillParameter":"OpenAI.InlineSkillParam","com.azure.ai.agents.models.InlineSkillSourceParameter":"OpenAI.InlineSkillSourceParam","com.azure.ai.agents.models.InputFidelity":"InputFidelityExpandable","com.azure.ai.agents.models.InvocationsProtocolConfiguration":"Azure.AI.Projects.InvocationsProtocolConfiguration","com.azure.ai.agents.models.InvocationsWsProtocolConfiguration":"Azure.AI.Projects.InvocationsWsProtocolConfiguration","com.azure.ai.agents.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.agents.models.ListMemoriesOptions":null,"com.azure.ai.agents.models.LocalShellToolParameter":"OpenAI.LocalShellToolParam","com.azure.ai.agents.models.LocalSkillParameter":"OpenAI.LocalSkillParam","com.azure.ai.agents.models.ManagedAgentIdentityBlueprintReference":"Azure.AI.Projects.ManagedAgentIdentityBlueprintReference","com.azure.ai.agents.models.McpListToolsTool":"OpenAI.MCPListToolsTool","com.azure.ai.agents.models.McpListToolsToolAnnotations":"OpenAI.MCPListToolsToolAnnotations","com.azure.ai.agents.models.McpListToolsToolInputSchema":"OpenAI.MCPListToolsToolInputSchema","com.azure.ai.agents.models.McpProtocolConfiguration":"Azure.AI.Projects.McpProtocolConfiguration","com.azure.ai.agents.models.McpTool":"OpenAI.MCPTool","com.azure.ai.agents.models.McpToolConnectorId":"McpToolConnectorIdExpandable","com.azure.ai.agents.models.McpToolFilter":"OpenAI.MCPToolFilter","com.azure.ai.agents.models.McpToolRequireApproval":"OpenAI.MCPToolRequireApproval","com.azure.ai.agents.models.McpToolboxTool":"Azure.AI.Projects.MCPToolboxTool","com.azure.ai.agents.models.MemoryCommandToolCall":"Azure.AI.Projects.MemoryCommandToolCall","com.azure.ai.agents.models.MemoryCommandToolCallOutput":"Azure.AI.Projects.MemoryCommandToolCallOutput","com.azure.ai.agents.models.MemoryItem":"Azure.AI.Projects.MemoryItem","com.azure.ai.agents.models.MemoryItemKind":"Azure.AI.Projects.MemoryItemKind","com.azure.ai.agents.models.MemoryOperation":"Azure.AI.Projects.MemoryOperation","com.azure.ai.agents.models.MemoryOperationKind":"Azure.AI.Projects.MemoryOperationKind","com.azure.ai.agents.models.MemorySearchItem":"Azure.AI.Projects.MemorySearchItem","com.azure.ai.agents.models.MemorySearchOptions":"Azure.AI.Projects.MemorySearchOptions","com.azure.ai.agents.models.MemorySearchPreviewTool":"Azure.AI.Projects.MemorySearchPreviewTool","com.azure.ai.agents.models.MemorySearchToolCall":"Azure.AI.Projects.MemorySearchToolCall","com.azure.ai.agents.models.MemoryStoreDefaultDefinition":"Azure.AI.Projects.MemoryStoreDefaultDefinition","com.azure.ai.agents.models.MemoryStoreDefaultOptions":"Azure.AI.Projects.MemoryStoreDefaultOptions","com.azure.ai.agents.models.MemoryStoreDefinition":"Azure.AI.Projects.MemoryStoreDefinition","com.azure.ai.agents.models.MemoryStoreDetails":"Azure.AI.Projects.MemoryStoreObject","com.azure.ai.agents.models.MemoryStoreKind":"Azure.AI.Projects.MemoryStoreKind","com.azure.ai.agents.models.MemoryStoreObjectType":"Azure.AI.Projects.MemoryStoreObjectType","com.azure.ai.agents.models.MemoryStoreOperationUsage":"Azure.AI.Projects.MemoryStoreOperationUsage","com.azure.ai.agents.models.MemoryStoreSearchResponse":"Azure.AI.Projects.MemoryStoreSearchResponse","com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult":"Azure.AI.Projects.MemoryStoreUpdateCompletedResult","com.azure.ai.agents.models.MemoryStoreUpdateResponse":"Azure.AI.Projects.MemoryStoreUpdateResponse","com.azure.ai.agents.models.MemoryStoreUpdateStatus":"Azure.AI.Projects.MemoryStoreUpdateStatus","com.azure.ai.agents.models.Microsoft365PermissionScopes":"Azure.AI.Projects.Microsoft365PermissionScopes","com.azure.ai.agents.models.Microsoft365PublishDefaults":"Azure.AI.Projects.Microsoft365PublishDefaults","com.azure.ai.agents.models.Microsoft365PublishResult":"Azure.AI.Projects.Microsoft365PublishResponse","com.azure.ai.agents.models.Microsoft365PublishScope":"Azure.AI.Projects.Microsoft365PublishScope","com.azure.ai.agents.models.MicrosoftFabricPreviewTool":"Azure.AI.Projects.MicrosoftFabricPreviewTool","com.azure.ai.agents.models.ModelRouterAttempt":"Azure.AI.Projects.ModelRouterAttempt","com.azure.ai.agents.models.ModelRouterAttemptError":"Azure.AI.Projects.ModelRouterAttemptError","com.azure.ai.agents.models.ModelRouterAttemptResult":"Azure.AI.Projects.ModelRouterAttemptResult","com.azure.ai.agents.models.ModelRouterDetails":"Azure.AI.Projects.ModelRouterDetails","com.azure.ai.agents.models.ModelRouterMode":"Azure.AI.Projects.ModelRouterMode","com.azure.ai.agents.models.ModelSamplingParameters":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.agents.models.ModelSelectionDetails":"Azure.AI.Projects.ModelSelectionDetails","com.azure.ai.agents.models.NamespaceTool":"OpenAI.NamespaceToolParam","com.azure.ai.agents.models.OpenApiAnonymousAuthDetails":"Azure.AI.Projects.OpenApiAnonymousAuthDetails","com.azure.ai.agents.models.OpenApiAuthDetails":"Azure.AI.Projects.OpenApiAuthDetails","com.azure.ai.agents.models.OpenApiAuthType":"Azure.AI.Projects.OpenApiAuthType","com.azure.ai.agents.models.OpenApiFunctionDefinition":"Azure.AI.Projects.OpenApiFunctionDefinition","com.azure.ai.agents.models.OpenApiFunctionDefinitionFunction":"Azure.AI.Projects.OpenApiFunctionDefinition.function.anonymous","com.azure.ai.agents.models.OpenApiManagedAuthDetails":"Azure.AI.Projects.OpenApiManagedAuthDetails","com.azure.ai.agents.models.OpenApiManagedSecurityScheme":"Azure.AI.Projects.OpenApiManagedSecurityScheme","com.azure.ai.agents.models.OpenApiProjectConnectionAuthDetails":"Azure.AI.Projects.OpenApiProjectConnectionAuthDetails","com.azure.ai.agents.models.OpenApiProjectConnectionSecurityScheme":"Azure.AI.Projects.OpenApiProjectConnectionSecurityScheme","com.azure.ai.agents.models.OpenApiTool":"Azure.AI.Projects.OpenApiTool","com.azure.ai.agents.models.OpenApiToolCall":"Azure.AI.Projects.OpenApiToolCall","com.azure.ai.agents.models.OpenApiToolCallOutput":"Azure.AI.Projects.OpenApiToolCallOutput","com.azure.ai.agents.models.OpenApiToolboxTool":"Azure.AI.Projects.OpenApiToolboxTool","com.azure.ai.agents.models.OptimizationContext":"Azure.AI.Projects.OptimizationContext","com.azure.ai.agents.models.OptimizationContextType":"Azure.AI.Projects.OptimizationContextType","com.azure.ai.agents.models.OtlpTelemetryEndpoint":"Azure.AI.Projects.OtlpTelemetryEndpoint","com.azure.ai.agents.models.PageOrder":"Azure.AI.Projects.PageOrder","com.azure.ai.agents.models.ProceduralMemoryItem":"Azure.AI.Projects.ProceduralMemoryItem","com.azure.ai.agents.models.ProgrammaticToolCallingParameter":"OpenAI.ProgrammaticToolCallingParam","com.azure.ai.agents.models.PromptAgentDefinition":"Azure.AI.Projects.PromptAgentDefinition","com.azure.ai.agents.models.PromptAgentDefinitionTextOptions":"Azure.AI.Projects.PromptAgentDefinitionTextOptions","com.azure.ai.agents.models.PromptOptimizationConfiguration":"Azure.AI.Projects.PromptOptimizationConfiguration","com.azure.ai.agents.models.ProtocolConfiguration":"Azure.AI.Projects.ProtocolConfiguration","com.azure.ai.agents.models.ProtocolVersionRecord":"Azure.AI.Projects.ProtocolVersionRecord","com.azure.ai.agents.models.PstnTelephonyTransferDestination":"Azure.AI.Projects.PSTNTelephonyTransferDestination","com.azure.ai.agents.models.PublishAgentToMicrosoft365Options":null,"com.azure.ai.agents.models.PublishApprovalStatus":"Azure.AI.Projects.PublishApprovalStatus","com.azure.ai.agents.models.RaiConfig":"Azure.AI.Projects.RaiConfig","com.azure.ai.agents.models.RaiInvocationContentType":"Azure.AI.Projects.RaiInvocationContentType","com.azure.ai.agents.models.RaiInvocationModeration":"Azure.AI.Projects.RaiInvocationModeration","com.azure.ai.agents.models.RaiInvocationResponseMode":"Azure.AI.Projects.RaiInvocationMode","com.azure.ai.agents.models.RaiSseTextSelector":"Azure.AI.Projects.RaiSseTextSelector","com.azure.ai.agents.models.RankerVersionType":"RankerVersionTypeExpandable","com.azure.ai.agents.models.RankingOptions":"OpenAI.RankingOptions","com.azure.ai.agents.models.RealtimeAudioFormat":"OpenAI.RealtimeAudioFormats","com.azure.ai.agents.models.RealtimeAudioFormatType":"OpenAI.RealtimeAudioFormatsType","com.azure.ai.agents.models.RealtimeClientEvent":"OpenAI.RealtimeClientEvent","com.azure.ai.agents.models.RealtimeClientEventType":"OpenAI.RealtimeClientEventType","com.azure.ai.agents.models.RealtimeConversationCreatedEvent":"OpenAI.RealtimeServerEventConversationCreated","com.azure.ai.agents.models.RealtimeConversationItem":"OpenAI.RealtimeConversationItem","com.azure.ai.agents.models.RealtimeConversationItemAddedEvent":"OpenAI.RealtimeServerEventConversationItemAdded","com.azure.ai.agents.models.RealtimeConversationItemAssistantMessage":"OpenAI.RealtimeConversationItemMessageAssistant","com.azure.ai.agents.models.RealtimeConversationItemCreateEvent":"OpenAI.RealtimeClientEventConversationItemCreate","com.azure.ai.agents.models.RealtimeConversationItemCreatedEvent":"OpenAI.RealtimeServerEventConversationItemCreated","com.azure.ai.agents.models.RealtimeConversationItemDeleteEvent":"OpenAI.RealtimeClientEventConversationItemDelete","com.azure.ai.agents.models.RealtimeConversationItemDeletedEvent":"OpenAI.RealtimeServerEventConversationItemDeleted","com.azure.ai.agents.models.RealtimeConversationItemDoneEvent":"OpenAI.RealtimeServerEventConversationItemDone","com.azure.ai.agents.models.RealtimeConversationItemFunctionCall":"OpenAI.RealtimeConversationItemFunctionCall","com.azure.ai.agents.models.RealtimeConversationItemFunctionCallOutput":"OpenAI.RealtimeConversationItemFunctionCallOutput","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionCompletedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionDeltaEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionFailedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionSegmentEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegment","com.azure.ai.agents.models.RealtimeConversationItemMessage":"OpenAI.RealtimeConversationItemMessage","com.azure.ai.agents.models.RealtimeConversationItemMessageType":"OpenAI.RealtimeConversationItemMessageType","com.azure.ai.agents.models.RealtimeConversationItemObjectType":"RealtimeConversationItemObject","com.azure.ai.agents.models.RealtimeConversationItemRetrieveEvent":"OpenAI.RealtimeClientEventConversationItemRetrieve","com.azure.ai.agents.models.RealtimeConversationItemRetrievedEvent":"OpenAI.RealtimeServerEventConversationItemRetrieved","com.azure.ai.agents.models.RealtimeConversationItemSystemMessage":"OpenAI.RealtimeConversationItemMessageSystem","com.azure.ai.agents.models.RealtimeConversationItemTruncateEvent":"OpenAI.RealtimeClientEventConversationItemTruncate","com.azure.ai.agents.models.RealtimeConversationItemTruncatedEvent":"OpenAI.RealtimeServerEventConversationItemTruncated","com.azure.ai.agents.models.RealtimeConversationItemType":"OpenAI.RealtimeConversationItemType","com.azure.ai.agents.models.RealtimeConversationItemUserMessage":"OpenAI.RealtimeConversationItemMessageUser","com.azure.ai.agents.models.RealtimeErrorEvent":"OpenAI.RealtimeServerEventRealtimeServerEventError","com.azure.ai.agents.models.RealtimeInputAudioBufferAppendEvent":"OpenAI.RealtimeClientEventInputAudioBufferAppend","com.azure.ai.agents.models.RealtimeInputAudioBufferClearEvent":"OpenAI.RealtimeClientEventInputAudioBufferClear","com.azure.ai.agents.models.RealtimeInputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCleared","com.azure.ai.agents.models.RealtimeInputAudioBufferCommitEvent":"OpenAI.RealtimeClientEventInputAudioBufferCommit","com.azure.ai.agents.models.RealtimeInputAudioBufferCommittedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCommitted","com.azure.ai.agents.models.RealtimeInputAudioBufferDtmfReceivedEvent":"OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStartedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStoppedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped","com.azure.ai.agents.models.RealtimeInputAudioBufferTimeoutTriggeredEvent":"OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggered","com.azure.ai.agents.models.RealtimeMcpApprovalInput":"OpenAI.RealtimeMCPApprovalRequest","com.azure.ai.agents.models.RealtimeMcpApprovalOutput":"OpenAI.RealtimeMCPApprovalResponse","com.azure.ai.agents.models.RealtimeMcpError":"OpenAI.RealtimeMCPError","com.azure.ai.agents.models.RealtimeMcpErrorType":"OpenAI.RealtimeMcpErrorType","com.azure.ai.agents.models.RealtimeMcpHttpError":"OpenAI.RealtimeMCPHTTPError","com.azure.ai.agents.models.RealtimeMcpListTools":"OpenAI.RealtimeMCPListTools","com.azure.ai.agents.models.RealtimeMcpListToolsCompletedEvent":"OpenAI.RealtimeServerEventMCPListToolsCompleted","com.azure.ai.agents.models.RealtimeMcpListToolsFailedEvent":"OpenAI.RealtimeServerEventMCPListToolsFailed","com.azure.ai.agents.models.RealtimeMcpListToolsInProgressEvent":"OpenAI.RealtimeServerEventMCPListToolsInProgress","com.azure.ai.agents.models.RealtimeMcpProtocolError":"OpenAI.RealtimeMCPProtocolError","com.azure.ai.agents.models.RealtimeMcpToolCall":"OpenAI.RealtimeMCPToolCall","com.azure.ai.agents.models.RealtimeMcpToolExecutionError":"OpenAI.RealtimeMCPToolExecutionError","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearEvent":"OpenAI.RealtimeClientEventOutputAudioBufferClear","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferCleared","com.azure.ai.agents.models.RealtimeOutputAudioBufferStartedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStarted","com.azure.ai.agents.models.RealtimeOutputAudioBufferStoppedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStopped","com.azure.ai.agents.models.RealtimePcmAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcm","com.azure.ai.agents.models.RealtimePcmaAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcma","com.azure.ai.agents.models.RealtimePcmuAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcmu","com.azure.ai.agents.models.RealtimeRateLimitsUpdatedEvent":"OpenAI.RealtimeServerEventRateLimitsUpdated","com.azure.ai.agents.models.RealtimeResponseAudioDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioDelta","com.azure.ai.agents.models.RealtimeResponseAudioDoneEvent":"OpenAI.RealtimeServerEventResponseAudioDone","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDelta","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDoneEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDone","com.azure.ai.agents.models.RealtimeResponseCancelEvent":"OpenAI.RealtimeClientEventResponseCancel","com.azure.ai.agents.models.RealtimeResponseContentPart":"OpenAI.RealtimeServerEventResponseContentPartDonePart","com.azure.ai.agents.models.RealtimeResponseContentPartAddedEvent":"OpenAI.RealtimeServerEventResponseContentPartAdded","com.azure.ai.agents.models.RealtimeResponseContentPartDoneEvent":"OpenAI.RealtimeServerEventResponseContentPartDone","com.azure.ai.agents.models.RealtimeResponseCreateEvent":"OpenAI.RealtimeClientEventResponseCreate","com.azure.ai.agents.models.RealtimeResponseCreatedEvent":"OpenAI.RealtimeServerEventResponseCreated","com.azure.ai.agents.models.RealtimeResponseDoneEvent":"OpenAI.RealtimeServerEventResponseDone","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallCompletedEvent":"OpenAI.RealtimeServerEventResponseMCPCallCompleted","com.azure.ai.agents.models.RealtimeResponseMcpCallFailedEvent":"OpenAI.RealtimeServerEventResponseMCPCallFailed","com.azure.ai.agents.models.RealtimeResponseMcpCallInProgressEvent":"OpenAI.RealtimeServerEventResponseMCPCallInProgress","com.azure.ai.agents.models.RealtimeResponseOutputItemAddedEvent":"OpenAI.RealtimeServerEventResponseOutputItemAdded","com.azure.ai.agents.models.RealtimeResponseOutputItemDoneEvent":"OpenAI.RealtimeServerEventResponseOutputItemDone","com.azure.ai.agents.models.RealtimeResponseTextDeltaEvent":"OpenAI.RealtimeServerEventResponseTextDelta","com.azure.ai.agents.models.RealtimeResponseTextDoneEvent":"OpenAI.RealtimeServerEventResponseTextDone","com.azure.ai.agents.models.RealtimeSemanticVadTurnDetection":"OpenAI.RealtimeTurnDetectionSemanticVad","com.azure.ai.agents.models.RealtimeServerEvent":"OpenAI.RealtimeServerEvent","com.azure.ai.agents.models.RealtimeServerEventType":"OpenAI.RealtimeServerEventType","com.azure.ai.agents.models.RealtimeServerVadTurnDetection":"OpenAI.RealtimeTurnDetectionServerVad","com.azure.ai.agents.models.RealtimeSessionAudioConfiguration":"OpenAI.RealtimeSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeSessionAudioInput":"OpenAI.RealtimeSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeSessionAudioOutput":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput","com.azure.ai.agents.models.RealtimeSessionConfiguration":"OpenAI.RealtimeSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeSessionConfigurationBase":"OpenAI.RealtimeSessionCreateRequestUnion","com.azure.ai.agents.models.RealtimeSessionCreateRequestGAAudioOutputVoice":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput.voice.anonymous","com.azure.ai.agents.models.RealtimeSessionCreatedEvent":"OpenAI.RealtimeServerEventSessionCreated","com.azure.ai.agents.models.RealtimeSessionTracingConfiguration":"OpenAI.RealtimeSessionCreateRequestGATracing","com.azure.ai.agents.models.RealtimeSessionType":"OpenAI.RealtimeSessionCreateRequestUnionType","com.azure.ai.agents.models.RealtimeSessionUpdateEvent":"OpenAI.RealtimeClientEventSessionUpdate","com.azure.ai.agents.models.RealtimeSessionUpdatedEvent":"OpenAI.RealtimeServerEventSessionUpdated","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioInput":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeTranscriptionSessionConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeTurnDetection":"OpenAI.RealtimeTurnDetection","com.azure.ai.agents.models.RealtimeTurnDetectionType":"OpenAI.RealtimeTurnDetectionType","com.azure.ai.agents.models.ReminderPreviewToolboxTool":"Azure.AI.Projects.ReminderPreviewToolboxTool","com.azure.ai.agents.models.ResponseFormatJsonSchemaInner":"OpenAI.ResponseFormatJsonSchemaSchema","com.azure.ai.agents.models.ResponseUsageInputTokensDetails":"OpenAI.ResponseUsageInputTokensDetails","com.azure.ai.agents.models.ResponseUsageOutputTokensDetails":"OpenAI.ResponseUsageOutputTokensDetails","com.azure.ai.agents.models.ResponsesProtocolConfiguration":"Azure.AI.Projects.ResponsesProtocolConfiguration","com.azure.ai.agents.models.RoutingConfiguration":"Azure.AI.Projects.RoutingConfiguration","com.azure.ai.agents.models.RoutingTraceEntry":"Azure.AI.Projects.RoutingTraceEntry","com.azure.ai.agents.models.SearchContentType":"OpenAI.SearchContentType","com.azure.ai.agents.models.SearchContextSize":"SearchContextSizeExpandable","com.azure.ai.agents.models.SessionAffinityConfiguration":"Azure.AI.Projects.SessionAffinityConfiguration","com.azure.ai.agents.models.SessionAffinityDecision":"Azure.AI.Projects.SessionAffinityDecision","com.azure.ai.agents.models.SessionAffinityDetails":"Azure.AI.Projects.SessionAffinityDetails","com.azure.ai.agents.models.SessionAffinityMode":"Azure.AI.Projects.SessionAffinityMode","com.azure.ai.agents.models.SessionAffinityRequestMode":"Azure.AI.Projects.SessionAffinityRequestMode","com.azure.ai.agents.models.SessionAffinitySource":"Azure.AI.Projects.SessionAffinitySource","com.azure.ai.agents.models.SessionConfiguration":"Azure.AI.Projects.SessionConfiguration","com.azure.ai.agents.models.SessionDirectoryEntry":"Azure.AI.Projects.SessionDirectoryEntry","com.azure.ai.agents.models.SessionFileWriteResult":"Azure.AI.Projects.SessionFileWriteResponse","com.azure.ai.agents.models.SessionLogEvent":"Azure.AI.Projects.SessionLogEvent","com.azure.ai.agents.models.SessionLogEventType":"Azure.AI.Projects.SessionLogEventType","com.azure.ai.agents.models.SharepointGroundingToolCall":"Azure.AI.Projects.SharepointGroundingToolCall","com.azure.ai.agents.models.SharepointGroundingToolCallOutput":"Azure.AI.Projects.SharepointGroundingToolCallOutput","com.azure.ai.agents.models.SharepointGroundingToolParameters":"Azure.AI.Projects.SharepointGroundingToolParameters","com.azure.ai.agents.models.SharepointPreviewTool":"Azure.AI.Projects.SharepointPreviewTool","com.azure.ai.agents.models.ShellToolboxTool":"Azure.AI.Projects.ShellToolboxTool","com.azure.ai.agents.models.SipTelephonyTransferDestination":"Azure.AI.Projects.SipTelephonyTransferDestination","com.azure.ai.agents.models.SkillReference":"Azure.AI.Projects.SkillReference","com.azure.ai.agents.models.SkillReferenceParameter":"OpenAI.SkillReferenceParam","com.azure.ai.agents.models.SteeringPromptOptimizationContext":"Azure.AI.Projects.SteeringPromptOptimizationContext","com.azure.ai.agents.models.StructuredInputDefinition":"Azure.AI.Projects.StructuredInputDefinition","com.azure.ai.agents.models.StructuredOutputDefinition":"Azure.AI.Projects.StructuredOutputDefinition","com.azure.ai.agents.models.TargetAttribute":"Azure.AI.Projects.TargetAttribute","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBinding":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBinding","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBindingListItem":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBindingListItem","com.azure.ai.agents.models.TeamsTelephonyTransferDestination":"Azure.AI.Projects.TeamsTelephonyTransferDestination","com.azure.ai.agents.models.TelemetryConfig":"Azure.AI.Projects.TelemetryConfig","com.azure.ai.agents.models.TelemetryDataKind":"Azure.AI.Projects.TelemetryDataKind","com.azure.ai.agents.models.TelemetryEndpoint":"Azure.AI.Projects.TelemetryEndpoint","com.azure.ai.agents.models.TelemetryEndpointAuth":"Azure.AI.Projects.TelemetryEndpointAuth","com.azure.ai.agents.models.TelemetryEndpointAuthType":"Azure.AI.Projects.TelemetryEndpointAuthType","com.azure.ai.agents.models.TelemetryEndpointKind":"Azure.AI.Projects.TelemetryEndpointKind","com.azure.ai.agents.models.TelemetryTransportProtocol":"Azure.AI.Projects.TelemetryTransportProtocol","com.azure.ai.agents.models.TelephonyBinding":"Azure.AI.Projects.TelephonyBinding","com.azure.ai.agents.models.TelephonyBindingListItem":"Azure.AI.Projects.TelephonyBindingListItem","com.azure.ai.agents.models.TelephonyBindingStatus":"Azure.AI.Projects.TelephonyBindingStatus","com.azure.ai.agents.models.TelephonyCallDurationBasis":"Azure.AI.Projects.TelephonyCallDurationBasis","com.azure.ai.agents.models.TelephonyCallEndReason":"Azure.AI.Projects.TelephonyCallEndReason","com.azure.ai.agents.models.TelephonyCallJob":"Azure.AI.Projects.TelephonyCallJob","com.azure.ai.agents.models.TelephonyCallJobCancellation":"Azure.AI.Projects.TelephonyCallJobCancellation","com.azure.ai.agents.models.TelephonyCallJobSchedule":"Azure.AI.Projects.TelephonyCallJobSchedule","com.azure.ai.agents.models.TelephonyCallJobStatus":"Azure.AI.Projects.TelephonyCallJobStatus","com.azure.ai.agents.models.TelephonyCallJobTerminalReason":"Azure.AI.Projects.TelephonyCallJobTerminalReason","com.azure.ai.agents.models.TelephonyCallLifecycleEvent":"Azure.AI.Projects.TelephonyCallLifecycleEvent","com.azure.ai.agents.models.TelephonyCallLifecycleEventName":"Azure.AI.Projects.TelephonyCallLifecycleEventName","com.azure.ai.agents.models.TelephonyCallLifecycleEventOutcome":"Azure.AI.Projects.TelephonyCallLifecycleEventOutcome","com.azure.ai.agents.models.TelephonyCallLifecycleEventReason":"Azure.AI.Projects.TelephonyCallLifecycleEventReason","com.azure.ai.agents.models.TelephonyCallLifecycleEventSource":"Azure.AI.Projects.TelephonyCallLifecycleEventSource","com.azure.ai.agents.models.TelephonyCallPhase":"Azure.AI.Projects.TelephonyCallPhase","com.azure.ai.agents.models.TelephonyCallRecord":"Azure.AI.Projects.TelephonyCallRecord","com.azure.ai.agents.models.TelephonyCallStatus":"Azure.AI.Projects.TelephonyCallStatus","com.azure.ai.agents.models.TelephonyCallSummary":"Azure.AI.Projects.TelephonyCallSummary","com.azure.ai.agents.models.TelephonyCallTimestampSource":"Azure.AI.Projects.TelephonyCallTimestampSource","com.azure.ai.agents.models.TelephonyCallTiming":"Azure.AI.Projects.TelephonyCallTiming","com.azure.ai.agents.models.TelephonyCallTrace":"Azure.AI.Projects.TelephonyCallTrace","com.azure.ai.agents.models.TelephonyCallTraceMode":"Azure.AI.Projects.TelephonyCallTraceMode","com.azure.ai.agents.models.TelephonyCallTraceStatus":"Azure.AI.Projects.TelephonyCallTraceStatus","com.azure.ai.agents.models.TelephonyOutboundDestination":"Azure.AI.Projects.TelephonyOutboundDestination","com.azure.ai.agents.models.TelephonyOutboundDestinationType":"Azure.AI.Projects.TelephonyOutboundDestinationType","com.azure.ai.agents.models.TelephonyOutboundFixedIntervalRetryPolicy":"Azure.AI.Projects.TelephonyOutboundFixedIntervalRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicy":"Azure.AI.Projects.TelephonyOutboundRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicyType":"Azure.AI.Projects.TelephonyOutboundRetryPolicyType","com.azure.ai.agents.models.TelephonyProvider":"Azure.AI.Projects.TelephonyProvider","com.azure.ai.agents.models.TelephonyTransferDestination":"Azure.AI.Projects.TelephonyTransferDestination","com.azure.ai.agents.models.TelephonyTransferDestinationKind":"Azure.AI.Projects.TelephonyTransferDestinationKind","com.azure.ai.agents.models.TelephonyTransferTarget":"Azure.AI.Projects.TelephonyTransferTarget","com.azure.ai.agents.models.TelephonyTransferTargets":"Azure.AI.Projects.TelephonyTransferTargets","com.azure.ai.agents.models.TextResponseFormatConfiguration":"OpenAI.TextResponseFormatConfiguration","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatJsonObject":"OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatText":"OpenAI.TextResponseFormatConfigurationResponseFormatText","com.azure.ai.agents.models.TextResponseFormatConfigurationType":"OpenAI.TextResponseFormatConfigurationType","com.azure.ai.agents.models.TextResponseFormatJsonSchema":"OpenAI.TextResponseFormatJsonSchema","com.azure.ai.agents.models.Tool":"OpenAI.Tool","com.azure.ai.agents.models.ToolCallStatus":"Azure.AI.Projects.ToolCallStatus","com.azure.ai.agents.models.ToolConfig":"Azure.AI.Projects.ToolConfig","com.azure.ai.agents.models.ToolProjectConnection":"Azure.AI.Projects.ToolProjectConnection","com.azure.ai.agents.models.ToolSearchExecutionType":"OpenAI.ToolSearchExecutionType","com.azure.ai.agents.models.ToolSearchTool":"OpenAI.ToolSearchToolParam","com.azure.ai.agents.models.ToolSearchToolboxTool":"Azure.AI.Projects.ToolSearchToolboxTool","com.azure.ai.agents.models.ToolType":"OpenAI.ToolType","com.azure.ai.agents.models.ToolboxDetails":"Azure.AI.Projects.ToolboxObject","com.azure.ai.agents.models.ToolboxPolicies":"Azure.AI.Projects.ToolboxPolicies","com.azure.ai.agents.models.ToolboxSearchPreviewToolboxTool":"Azure.AI.Projects.ToolboxSearchPreviewToolboxTool","com.azure.ai.agents.models.ToolboxShellContainerAutoEnvironment":"Azure.AI.Projects.ToolboxShellContainerAutoEnvironment","com.azure.ai.agents.models.ToolboxShellContainerReferenceEnvironment":"Azure.AI.Projects.ToolboxShellContainerReferenceEnvironment","com.azure.ai.agents.models.ToolboxShellEnvironment":"Azure.AI.Projects.ToolboxShellEnvironment","com.azure.ai.agents.models.ToolboxShellNetworkPolicy":"Azure.AI.Projects.ToolboxShellNetworkPolicy","com.azure.ai.agents.models.ToolboxShellNetworkPolicyDisabled":"Azure.AI.Projects.ToolboxShellNetworkPolicyDisabled","com.azure.ai.agents.models.ToolboxSkill":"Azure.AI.Projects.ToolboxSkill","com.azure.ai.agents.models.ToolboxSkillReference":"Azure.AI.Projects.ToolboxSkillReference","com.azure.ai.agents.models.ToolboxTool":"Azure.AI.Projects.ToolboxTool","com.azure.ai.agents.models.ToolboxToolType":"Azure.AI.Projects.ToolboxToolType","com.azure.ai.agents.models.ToolboxVersionDetails":"Azure.AI.Projects.ToolboxVersionObject","com.azure.ai.agents.models.ToolboxVersions":"Azure.AI.Projects.ToolboxVersions","com.azure.ai.agents.models.TranscriptTextInputTokenDetails":"OpenAI.TranscriptTextUsageTokensInputTokenDetails","com.azure.ai.agents.models.TranscriptTextUsage":"OpenAI.CreateTranscriptionResponseJsonUsage","com.azure.ai.agents.models.TranscriptTextUsageDuration":"OpenAI.TranscriptTextUsageDuration","com.azure.ai.agents.models.TranscriptTextUsageTokens":"OpenAI.TranscriptTextUsageTokens","com.azure.ai.agents.models.TranscriptTextUsageType":"OpenAI.CreateTranscriptionResponseJsonUsageType","com.azure.ai.agents.models.TranscriptionLanguage":"OpenAI.TranscriptionLanguage","com.azure.ai.agents.models.TwilioTelephonyBinding":"Azure.AI.Projects.TwilioTelephonyBinding","com.azure.ai.agents.models.TwilioTelephonyBindingListItem":"Azure.AI.Projects.TwilioTelephonyBindingListItem","com.azure.ai.agents.models.UpdateAgentDetailsOptions":"Azure.AI.Projects.patchAgentObject.Request.anonymous","com.azure.ai.agents.models.UpdateTelephonyBindingInput":"Azure.AI.Projects.UpdateTelephonyBindingRequest","com.azure.ai.agents.models.UserConversationSimulationAudioEffect":"Azure.AI.Projects.UserConversationSimulationAudioEffect","com.azure.ai.agents.models.UserConversationSimulationAudioEffectsConfiguration":"Azure.AI.Projects.UserConversationSimulationAudioEffectsConfiguration","com.azure.ai.agents.models.UserConversationSimulationConfiguration":"Azure.AI.Projects.UserConversationSimulationConfiguration","com.azure.ai.agents.models.UserConversationSimulationDefaultInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationDefaultInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationTestCase":"Azure.AI.Projects.UserConversationSimulationTestCase","com.azure.ai.agents.models.UserConversationSimulationUserBehaviorConfiguration":"Azure.AI.Projects.UserConversationSimulationUserBehaviorConfiguration","com.azure.ai.agents.models.UserProfileMemoryItem":"Azure.AI.Projects.UserProfileMemoryItem","com.azure.ai.agents.models.VersionIndicator":"Azure.AI.Projects.VersionIndicator","com.azure.ai.agents.models.VersionIndicatorType":"Azure.AI.Projects.VersionIndicatorType","com.azure.ai.agents.models.VersionRefIndicator":"Azure.AI.Projects.VersionRefIndicator","com.azure.ai.agents.models.VersionSelectionRule":"Azure.AI.Projects.VersionSelectionRule","com.azure.ai.agents.models.VersionSelector":"Azure.AI.Projects.VersionSelector","com.azure.ai.agents.models.VersionSelectorType":"Azure.AI.Projects.VersionSelectorType","com.azure.ai.agents.models.VoiceAgentAnimationConfiguration":"Azure.AI.Projects.VoiceAgentAnimationConfig","com.azure.ai.agents.models.VoiceAgentAnimationOutputType":"Azure.AI.Projects.VoiceAgentAnimationOutputType","com.azure.ai.agents.models.VoiceAgentAudioConfiguration":"Azure.AI.Projects.VoiceAgentAudioConfig","com.azure.ai.agents.models.VoiceAgentAudioInputConfiguration":"Azure.AI.Projects.VoiceAgentAudioInputConfig","com.azure.ai.agents.models.VoiceAgentAudioOutputConfiguration":"Azure.AI.Projects.VoiceAgentAudioOutputConfig","com.azure.ai.agents.models.VoiceAgentAudioTimestampType":"Azure.AI.Projects.VoiceAgentAudioTimestampType","com.azure.ai.agents.models.VoiceAgentAvatarConfiguration":"Azure.AI.Projects.VoiceAgentAvatarConfig","com.azure.ai.agents.models.VoiceAgentAvatarIceServer":"Azure.AI.Projects.VoiceAgentAvatarIceServer","com.azure.ai.agents.models.VoiceAgentAvatarOutputProtocol":"Azure.AI.Projects.VoiceAgentAvatarOutputProtocol","com.azure.ai.agents.models.VoiceAgentAvatarScene":"Azure.AI.Projects.VoiceAgentAvatarScene","com.azure.ai.agents.models.VoiceAgentAvatarType":"Azure.AI.Projects.VoiceAgentAvatarType","com.azure.ai.agents.models.VoiceAgentAvatarVideoBackground":"Azure.AI.Projects.VoiceAgentAvatarVideoBackground","com.azure.ai.agents.models.VoiceAgentAvatarVideoCrop":"Azure.AI.Projects.VoiceAgentAvatarVideoCrop","com.azure.ai.agents.models.VoiceAgentAvatarVideoParameters":"Azure.AI.Projects.VoiceAgentAvatarVideoParams","com.azure.ai.agents.models.VoiceAgentAvatarVideoResolution":"Azure.AI.Projects.VoiceAgentAvatarVideoResolution","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadEnglishTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadEnTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadMultilingualTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadMultilingualTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentDefinition":"Azure.AI.Projects.VoiceAgentDefinition","com.azure.ai.agents.models.VoiceAgentEchoCancellation":"Azure.AI.Projects.VoiceAgentEchoCancellation","com.azure.ai.agents.models.VoiceAgentEchoCancellationReferenceSource":"Azure.AI.Projects.VoiceAgentEchoCancellationReferenceSource","com.azure.ai.agents.models.VoiceAgentEndConversationSystemTool":"Azure.AI.Projects.VoiceAgentEndConversationSystemTool","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetection":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetection","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetectionModel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetectionModel","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceThresholdLevel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceThresholdLevel","com.azure.ai.agents.models.VoiceAgentFunctionTool":"Azure.AI.Projects.VoiceAgentFunctionTool","com.azure.ai.agents.models.VoiceAgentFunctionToolType1":null,"com.azure.ai.agents.models.VoiceAgentGreetingConfiguration":"Azure.AI.Projects.VoiceAgentGreetingConfig","com.azure.ai.agents.models.VoiceAgentInputTranscription":"Azure.AI.Projects.VoiceAgentInputTranscription","com.azure.ai.agents.models.VoiceAgentInputTranscriptionModel":"Azure.AI.Projects.VoiceAgentInputTranscriptionModel","com.azure.ai.agents.models.VoiceAgentInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentInterimResponseTrigger":"Azure.AI.Projects.VoiceAgentInterimResponseTrigger","com.azure.ai.agents.models.VoiceAgentLlmGeneratedGreetingConfiguration":"Azure.AI.Projects.VoiceAgentLlmGeneratedGreetingConfig","com.azure.ai.agents.models.VoiceAgentLlmInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentLlmInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentMcpTool":"Azure.AI.Projects.VoiceAgentMcpTool","com.azure.ai.agents.models.VoiceAgentNoiseReduction":"Azure.AI.Projects.VoiceAgentNoiseReduction","com.azure.ai.agents.models.VoiceAgentNoiseReductionType":"Azure.AI.Projects.VoiceAgentNoiseReductionType","com.azure.ai.agents.models.VoiceAgentRealtimeResponse":"Azure.AI.Projects.VoiceAgentRealtimeResponse","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDone","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDone","com.azure.ai.agents.models.VoiceAgentResponseAudioConfig":"TypeSpec.PickProperties","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDelta","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDone","com.azure.ai.agents.models.VoiceAgentResponseCreateOptions":"Azure.AI.Projects.VoiceAgentResponseCreateParams","com.azure.ai.agents.models.VoiceAgentResponseVideoDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseVideoDelta","com.azure.ai.agents.models.VoiceAgentRtcCallErrorDetails":"Azure.AI.Projects.VoiceAgentRtcCallErrorDetails","com.azure.ai.agents.models.VoiceAgentRtcCallErrorEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallError","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreateEvent":"Azure.AI.Projects.VoiceAgentClientEventRtcCallSdpCreate","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreatedEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallSdpCreated","com.azure.ai.agents.models.VoiceAgentSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentServerVadTurnDetection":"Azure.AI.Projects.VoiceAgentServerVadTurnDetection","com.azure.ai.agents.models.VoiceAgentSessionAvatarConfiguration":"Azure.AI.Projects.VoiceAgentSessionAvatarConfig","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectEvent":"Azure.AI.Projects.VoiceAgentClientEventSessionAvatarConnect","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarConnecting","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToIdleEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToIdle","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToSpeakingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToSpeaking","com.azure.ai.agents.models.VoiceAgentSessionIncludeOption":"Azure.AI.Projects.VoiceAgentSessionIncludeOption","com.azure.ai.agents.models.VoiceAgentSessionResponseConfiguration":"Azure.AI.Projects.VoiceAgentSessionResponseConfig","com.azure.ai.agents.models.VoiceAgentSessionSubagentAbortedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentAborted","com.azure.ai.agents.models.VoiceAgentSessionSubagentCompletedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentCompleted","com.azure.ai.agents.models.VoiceAgentSessionSubagentStartedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentStarted","com.azure.ai.agents.models.VoiceAgentSessionUpdateConfiguration":"Azure.AI.Projects.VoiceAgentSessionUpdateConfig","com.azure.ai.agents.models.VoiceAgentStaticInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentStaticInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentSubagent":"Azure.AI.Projects.VoiceAgentSubagent","com.azure.ai.agents.models.VoiceAgentSubagentAbortReason":"Azure.AI.Projects.VoiceAgentSubagentAbortReason","com.azure.ai.agents.models.VoiceAgentSubagentConfiguration":"Azure.AI.Projects.VoiceAgentSubagentConfig","com.azure.ai.agents.models.VoiceAgentSubagentResponsePolicy":"Azure.AI.Projects.VoiceAgentSubagentResponsePolicy","com.azure.ai.agents.models.VoiceAgentSystemTool":"Azure.AI.Projects.VoiceAgentSystemTool","com.azure.ai.agents.models.VoiceAgentSystemToolName":"Azure.AI.Projects.VoiceAgentSystemToolName","com.azure.ai.agents.models.VoiceAgentTemplateGreetingConfiguration":"Azure.AI.Projects.VoiceAgentTemplateGreetingConfig","com.azure.ai.agents.models.VoiceAgentTool":"Azure.AI.Projects.VoiceAgentTool","com.azure.ai.agents.models.VoiceAgentToolResponseScheduling":"Azure.AI.Projects.VoiceAgentToolResponseScheduling","com.azure.ai.agents.models.VoiceAgentToolboxTool":"Azure.AI.Projects.VoiceAgentToolboxTool","com.azure.ai.agents.models.VoiceAgentTranscriptionPhrase":"Azure.AI.Projects.VoiceAgentTranscriptionPhrase","com.azure.ai.agents.models.VoiceAgentTranscriptionWord":"Azure.AI.Projects.VoiceAgentTranscriptionWord","com.azure.ai.agents.models.VoiceAgentTransport":"Azure.AI.Projects.VoiceAgentTransport","com.azure.ai.agents.models.VoiceAgentTurnDetectionConfiguration":"Azure.AI.Projects.VoiceAgentTurnDetectionConfig","com.azure.ai.agents.models.VoiceAgentTurnDetectionType":"Azure.AI.Projects.VoiceAgentTurnDetectionType","com.azure.ai.agents.models.VoiceAgentWarningDetails":"Azure.AI.Projects.VoiceAgentServerEventWarningDetails","com.azure.ai.agents.models.VoiceAgentWarningEvent":"Azure.AI.Projects.VoiceAgentServerEventWarning","com.azure.ai.agents.models.VoiceAudioCodec":"Azure.AI.Projects.VoiceAudioCodec","com.azure.ai.agents.models.VoiceAudioContainerFormat":"Azure.AI.Projects.VoiceAudioContainerFormat","com.azure.ai.agents.models.VoiceAudioItem":"Azure.AI.Projects.VoiceAudioItem","com.azure.ai.agents.models.VoiceAudioRole":"Azure.AI.Projects.VoiceAudioRole","com.azure.ai.agents.models.VoiceConversation":"Azure.AI.Projects.VoiceConversation","com.azure.ai.agents.models.VoiceConversationEngine":"Azure.AI.Projects.VoiceConversationEngine","com.azure.ai.agents.models.VoiceConversationStatus":"Azure.AI.Projects.VoiceConversationStatus","com.azure.ai.agents.models.VoiceGeneratedAudioItem":"Azure.AI.Projects.VoiceGeneratedAudioItem","com.azure.ai.agents.models.VoiceHostedAgentConversationEngine":"Azure.AI.Projects.VoiceHostedAgentConversationEngine","com.azure.ai.agents.models.VoiceIds":"OpenAI.VoiceIdsShared","com.azure.ai.agents.models.VoiceModelType":"Azure.AI.Projects.VoiceModelType","com.azure.ai.agents.models.VoiceOutputModality":"Azure.AI.Projects.VoiceOutputModality","com.azure.ai.agents.models.VoiceRecording":"Azure.AI.Projects.VoiceRecording","com.azure.ai.agents.models.VoiceRecordingChannelLayout":"Azure.AI.Projects.VoiceRecordingChannelLayout","com.azure.ai.agents.models.VoiceResponse":"Azure.AI.Projects.VoiceResponse","com.azure.ai.agents.models.VoiceResponseAudio":"Azure.AI.Projects.VoiceResponseAudio","com.azure.ai.agents.models.VoiceResponseAudioOutput":"Azure.AI.Projects.VoiceResponseAudioOutput","com.azure.ai.agents.models.VoiceResponseObjectType":null,"com.azure.ai.agents.models.VoiceType":"Azure.AI.Projects.VoiceType","com.azure.ai.agents.models.WebIqPreviewTool":"Azure.AI.Projects.WebIQPreviewTool","com.azure.ai.agents.models.WebIqPreviewToolboxTool":"Azure.AI.Projects.WebIQPreviewToolboxTool","com.azure.ai.agents.models.WebSearchApproximateLocation":"OpenAI.WebSearchApproximateLocation","com.azure.ai.agents.models.WebSearchConfiguration":"Azure.AI.Projects.WebSearchConfiguration","com.azure.ai.agents.models.WebSearchPreviewTool":"OpenAI.WebSearchPreviewTool","com.azure.ai.agents.models.WebSearchTool":"OpenAI.WebSearchTool","com.azure.ai.agents.models.WebSearchToolFilters":"OpenAI.WebSearchToolFilters","com.azure.ai.agents.models.WebSearchToolSearchContextSize":"WebSearchToolSearchContextSizeExpandable","com.azure.ai.agents.models.WebSearchToolboxTool":"Azure.AI.Projects.WebSearchToolboxTool","com.azure.ai.agents.models.WorkIqPreviewTool":"Azure.AI.Projects.WorkIQPreviewTool","com.azure.ai.agents.models.WorkIqPreviewToolboxTool":"Azure.AI.Projects.WorkIQPreviewToolboxTool","com.azure.ai.agents.models.WorkflowAgentDefinition":"Azure.AI.Projects.WorkflowAgentDefinition"},"generatedFiles":["src/main/java/com/azure/ai/agents/AgentsAsyncClient.java","src/main/java/com/azure/ai/agents/AgentsClient.java","src/main/java/com/azure/ai/agents/AgentsClientBuilder.java","src/main/java/com/azure/ai/agents/AgentsServiceVersion.java","src/main/java/com/azure/ai/agents/BetaAgentsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaAgentsClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresAsyncClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java","src/main/java/com/azure/ai/agents/ToolboxesAsyncClient.java","src/main/java/com/azure/ai/agents/ToolboxesClient.java","src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java","src/main/java/com/azure/ai/agents/implementation/AgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaAgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaMemoryStoresImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java","src/main/java/com/azure/ai/agents/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/agents/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/agents/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/PollingUtils.java","src/main/java/com/azure/ai/agents/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/ToolboxesImpl.java","src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromCodeContent.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentOptions.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateSessionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateToolboxVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/GetMicrosoft365AppPackageRequest.java","src/main/java/com/azure/ai/agents/implementation/models/ListMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/PublishAgentToMicrosoft365Request.java","src/main/java/com/azure/ai/agents/implementation/models/ReplaceTelephonyTransferTargetsRequest.java","src/main/java/com/azure/ai/agents/implementation/models/SearchMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/TransferTelephonyCallRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxInput.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxRequest.java","src/main/java/com/azure/ai/agents/implementation/models/package-info.java","src/main/java/com/azure/ai/agents/implementation/package-info.java","src/main/java/com/azure/ai/agents/models/A2APreviewTool.java","src/main/java/com/azure/ai/agents/models/A2APreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/A2AProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/A2AProtocolVersion.java","src/main/java/com/azure/ai/agents/models/A2ATool.java","src/main/java/com/azure/ai/agents/models/A2AToolCall.java","src/main/java/com/azure/ai/agents/models/A2AToolCallOutput.java","src/main/java/com/azure/ai/agents/models/A2AToolboxTool.java","src/main/java/com/azure/ai/agents/models/AISearchIndexResource.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolAccessBoundary.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReference.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReferenceType.java","src/main/java/com/azure/ai/agents/models/AgentCard.java","src/main/java/com/azure/ai/agents/models/AgentCardSkill.java","src/main/java/com/azure/ai/agents/models/AgentDefinition.java","src/main/java/com/azure/ai/agents/models/AgentDetails.java","src/main/java/com/azure/ai/agents/models/AgentDetailsVersions.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationSchemeType.java","src/main/java/com/azure/ai/agents/models/AgentEndpointConfig.java","src/main/java/com/azure/ai/agents/models/AgentEndpointProtocol.java","src/main/java/com/azure/ai/agents/models/AgentHarness.java","src/main/java/com/azure/ai/agents/models/AgentIdentity.java","src/main/java/com/azure/ai/agents/models/AgentIdentityStatus.java","src/main/java/com/azure/ai/agents/models/AgentKind.java","src/main/java/com/azure/ai/agents/models/AgentObjectType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationAgentCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationBaselineAgentConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateEvaluation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateExpand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidatePromotionInfo.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateStatus.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationBase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCostEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationDataSourceType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateBand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateInputs.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSetType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluatorReference.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationFoundryAgentTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationGoal.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationInstructionsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJob.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobLatency.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobTokenUsage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationPromptCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationResultCandidateSummary.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkill.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkillsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSpace.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStageEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionTestCase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTerminationReason.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationToolsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentReference.java","src/main/java/com/azure/ai/agents/models/AgentSessionResource.java","src/main/java/com/azure/ai/agents/models/AgentSessionStatus.java","src/main/java/com/azure/ai/agents/models/AgentState.java","src/main/java/com/azure/ai/agents/models/AgentStateSource.java","src/main/java/com/azure/ai/agents/models/AgentVersionDetails.java","src/main/java/com/azure/ai/agents/models/AgentVersionStatus.java","src/main/java/com/azure/ai/agents/models/ApiError.java","src/main/java/com/azure/ai/agents/models/ApplyPatchToolParameter.java","src/main/java/com/azure/ai/agents/models/ApproximateLocation.java","src/main/java/com/azure/ai/agents/models/AudioTranscription.java","src/main/java/com/azure/ai/agents/models/AudioTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/AutoCodeInterpreterToolParameter.java","src/main/java/com/azure/ai/agents/models/AzureAISearchQueryType.java","src/main/java/com/azure/ai/agents/models/AzureAISearchTool.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCall.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolResource.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseDetails.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseOptions.java","src/main/java/com/azure/ai/agents/models/AzureFunctionBinding.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinitionDetails.java","src/main/java/com/azure/ai/agents/models/AzureFunctionStorageQueue.java","src/main/java/com/azure/ai/agents/models/AzureFunctionTool.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCall.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureUserSecurityContext.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCall.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingTool.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BotServiceAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceRbacAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceTenantAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCall.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolConnectionParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolboxTool.java","src/main/java/com/azure/ai/agents/models/CallableToolAllowedCaller.java","src/main/java/com/azure/ai/agents/models/CaptureStructuredOutputsTool.java","src/main/java/com/azure/ai/agents/models/ChatSummaryMemoryItem.java","src/main/java/com/azure/ai/agents/models/CodeConfiguration.java","src/main/java/com/azure/ai/agents/models/CodeDependencyResolution.java","src/main/java/com/azure/ai/agents/models/CodeFileDetails.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterTool.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolboxTool.java","src/main/java/com/azure/ai/agents/models/ComputerEnvironment.java","src/main/java/com/azure/ai/agents/models/ComputerTool.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewTool.java","src/main/java/com/azure/ai/agents/models/ContainerAutoParameter.java","src/main/java/com/azure/ai/agents/models/ContainerConfiguration.java","src/main/java/com/azure/ai/agents/models/ContainerMemoryLimit.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyAllowlistParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDisabledParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDomainSecretParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParamType.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParameter.java","src/main/java/com/azure/ai/agents/models/ContainerSkill.java","src/main/java/com/azure/ai/agents/models/ContainerSkillType.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeContent.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeMetadata.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionOptions.java","src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensibilityTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java","src/main/java/com/azure/ai/agents/models/CreateTwilioTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CustomGrammarFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomTextFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormat.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormatType.java","src/main/java/com/azure/ai/agents/models/CustomToolParameter.java","src/main/java/com/azure/ai/agents/models/DigitalWorkerType.java","src/main/java/com/azure/ai/agents/models/EntraAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/EvaluationAzureStandardVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/ExternalAgentDefinition.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCall.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCallOutput.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolParameters.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/FileSearchTool.java","src/main/java/com/azure/ai/agents/models/FileSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/FixedRatioVersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironment.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironmentType.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentContainerReferenceParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentLocalEnvironmentParameter.java","src/main/java/com/azure/ai/agents/models/FunctionTool.java","src/main/java/com/azure/ai/agents/models/GetMicrosoft365AppPackageOptions.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotBuiltInTool.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotHarness.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java","src/main/java/com/azure/ai/agents/models/GrammarSyntax.java","src/main/java/com/azure/ai/agents/models/HeaderTelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/HybridSearchOptions.java","src/main/java/com/azure/ai/agents/models/ImageGenActionEnum.java","src/main/java/com/azure/ai/agents/models/ImageGenTool.java","src/main/java/com/azure/ai/agents/models/ImageGenToolBackground.java","src/main/java/com/azure/ai/agents/models/ImageGenToolInputImageMask.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModel.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModeration.java","src/main/java/com/azure/ai/agents/models/ImageGenToolOutputFormat.java","src/main/java/com/azure/ai/agents/models/ImageGenToolQuality.java","src/main/java/com/azure/ai/agents/models/ImageGenToolSize.java","src/main/java/com/azure/ai/agents/models/IncludeEnum.java","src/main/java/com/azure/ai/agents/models/InlineSkillParameter.java","src/main/java/com/azure/ai/agents/models/InlineSkillSourceParameter.java","src/main/java/com/azure/ai/agents/models/InputFidelity.java","src/main/java/com/azure/ai/agents/models/InvocationsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/InvocationsWsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/JobStatus.java","src/main/java/com/azure/ai/agents/models/ListMemoriesOptions.java","src/main/java/com/azure/ai/agents/models/LocalShellToolParameter.java","src/main/java/com/azure/ai/agents/models/LocalSkillParameter.java","src/main/java/com/azure/ai/agents/models/ManagedAgentIdentityBlueprintReference.java","src/main/java/com/azure/ai/agents/models/McpListToolsTool.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolAnnotations.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolInputSchema.java","src/main/java/com/azure/ai/agents/models/McpProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/McpTool.java","src/main/java/com/azure/ai/agents/models/McpToolConnectorId.java","src/main/java/com/azure/ai/agents/models/McpToolFilter.java","src/main/java/com/azure/ai/agents/models/McpToolRequireApproval.java","src/main/java/com/azure/ai/agents/models/McpToolboxTool.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCallOutput.java","src/main/java/com/azure/ai/agents/models/MemoryItem.java","src/main/java/com/azure/ai/agents/models/MemoryItemKind.java","src/main/java/com/azure/ai/agents/models/MemoryOperation.java","src/main/java/com/azure/ai/agents/models/MemoryOperationKind.java","src/main/java/com/azure/ai/agents/models/MemorySearchItem.java","src/main/java/com/azure/ai/agents/models/MemorySearchOptions.java","src/main/java/com/azure/ai/agents/models/MemorySearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/MemorySearchToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultOptions.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreKind.java","src/main/java/com/azure/ai/agents/models/MemoryStoreObjectType.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsage.java","src/main/java/com/azure/ai/agents/models/MemoryStoreSearchResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateCompletedResult.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateStatus.java","src/main/java/com/azure/ai/agents/models/Microsoft365PermissionScopes.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishDefaults.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishResult.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishScope.java","src/main/java/com/azure/ai/agents/models/MicrosoftFabricPreviewTool.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttempt.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptError.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptResult.java","src/main/java/com/azure/ai/agents/models/ModelRouterDetails.java","src/main/java/com/azure/ai/agents/models/ModelRouterMode.java","src/main/java/com/azure/ai/agents/models/ModelSamplingParameters.java","src/main/java/com/azure/ai/agents/models/ModelSelectionDetails.java","src/main/java/com/azure/ai/agents/models/NamespaceTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAnonymousAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthType.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiTool.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCall.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCallOutput.java","src/main/java/com/azure/ai/agents/models/OpenApiToolboxTool.java","src/main/java/com/azure/ai/agents/models/OptimizationContext.java","src/main/java/com/azure/ai/agents/models/OptimizationContextType.java","src/main/java/com/azure/ai/agents/models/OtlpTelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/PageOrder.java","src/main/java/com/azure/ai/agents/models/ProceduralMemoryItem.java","src/main/java/com/azure/ai/agents/models/ProgrammaticToolCallingParameter.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinitionTextOptions.java","src/main/java/com/azure/ai/agents/models/PromptOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolVersionRecord.java","src/main/java/com/azure/ai/agents/models/PstnTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/PublishAgentToMicrosoft365Options.java","src/main/java/com/azure/ai/agents/models/PublishApprovalStatus.java","src/main/java/com/azure/ai/agents/models/RaiConfig.java","src/main/java/com/azure/ai/agents/models/RaiInvocationContentType.java","src/main/java/com/azure/ai/agents/models/RaiInvocationModeration.java","src/main/java/com/azure/ai/agents/models/RaiInvocationResponseMode.java","src/main/java/com/azure/ai/agents/models/RaiSseTextSelector.java","src/main/java/com/azure/ai/agents/models/RankerVersionType.java","src/main/java/com/azure/ai/agents/models/RankingOptions.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormatType.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItem.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAssistantMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeleteEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCall.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCallOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionSegmentEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessageType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemObjectType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrieveEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrievedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemSystemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemUserMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeErrorEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferAppendEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommitEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommittedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferDtmfReceivedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferTimeoutTriggeredEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalInput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpErrorType.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpHttpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListTools.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpProtocolError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolCall.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolExecutionError.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimePcmAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmaAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmuAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeRateLimitsUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCancelEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPart.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfigurationBase.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreateRequestGAAudioOutputVoice.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionTracingConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionType.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/ReminderPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ResponseFormatJsonSchemaInner.java","src/main/java/com/azure/ai/agents/models/ResponseUsageInputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponseUsageOutputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponsesProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingTraceEntry.java","src/main/java/com/azure/ai/agents/models/SearchContentType.java","src/main/java/com/azure/ai/agents/models/SearchContextSize.java","src/main/java/com/azure/ai/agents/models/SessionAffinityConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDecision.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDetails.java","src/main/java/com/azure/ai/agents/models/SessionAffinityMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinityRequestMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinitySource.java","src/main/java/com/azure/ai/agents/models/SessionConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionDirectoryEntry.java","src/main/java/com/azure/ai/agents/models/SessionFileWriteResult.java","src/main/java/com/azure/ai/agents/models/SessionLogEvent.java","src/main/java/com/azure/ai/agents/models/SessionLogEventType.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolParameters.java","src/main/java/com/azure/ai/agents/models/SharepointPreviewTool.java","src/main/java/com/azure/ai/agents/models/ShellToolboxTool.java","src/main/java/com/azure/ai/agents/models/SipTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/SkillReference.java","src/main/java/com/azure/ai/agents/models/SkillReferenceParameter.java","src/main/java/com/azure/ai/agents/models/SteeringPromptOptimizationContext.java","src/main/java/com/azure/ai/agents/models/StructuredInputDefinition.java","src/main/java/com/azure/ai/agents/models/StructuredOutputDefinition.java","src/main/java/com/azure/ai/agents/models/TargetAttribute.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TeamsTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelemetryConfig.java","src/main/java/com/azure/ai/agents/models/TelemetryDataKind.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuthType.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointKind.java","src/main/java/com/azure/ai/agents/models/TelemetryTransportProtocol.java","src/main/java/com/azure/ai/agents/models/TelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallDurationBasis.java","src/main/java/com/azure/ai/agents/models/TelephonyCallEndReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobCancellation.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobSchedule.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobTerminalReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEvent.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventName.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventOutcome.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallPhase.java","src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java","src/main/java/com/azure/ai/agents/models/TelephonyCallStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallSummary.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTimestampSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTiming.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTrace.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceMode.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestinationType.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundFixedIntervalRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicyType.java","src/main/java/com/azure/ai/agents/models/TelephonyProvider.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestinationKind.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTarget.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTargets.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfiguration.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatJsonObject.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatText.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationType.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatJsonSchema.java","src/main/java/com/azure/ai/agents/models/Tool.java","src/main/java/com/azure/ai/agents/models/ToolCallStatus.java","src/main/java/com/azure/ai/agents/models/ToolConfig.java","src/main/java/com/azure/ai/agents/models/ToolProjectConnection.java","src/main/java/com/azure/ai/agents/models/ToolSearchExecutionType.java","src/main/java/com/azure/ai/agents/models/ToolSearchTool.java","src/main/java/com/azure/ai/agents/models/ToolSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxPolicies.java","src/main/java/com/azure/ai/agents/models/ToolboxSearchPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerAutoEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerReferenceEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicy.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicyDisabled.java","src/main/java/com/azure/ai/agents/models/ToolboxSkill.java","src/main/java/com/azure/ai/agents/models/ToolboxSkillReference.java","src/main/java/com/azure/ai/agents/models/ToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxVersionDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxVersions.java","src/main/java/com/azure/ai/agents/models/TranscriptTextInputTokenDetails.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsage.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageDuration.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageTokens.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageType.java","src/main/java/com/azure/ai/agents/models/TranscriptionLanguage.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/UpdateAgentDetailsOptions.java","src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffect.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffectsConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationDefaultInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationTestCase.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationUserBehaviorConfiguration.java","src/main/java/com/azure/ai/agents/models/UserProfileMemoryItem.java","src/main/java/com/azure/ai/agents/models/VersionIndicator.java","src/main/java/com/azure/ai/agents/models/VersionIndicatorType.java","src/main/java/com/azure/ai/agents/models/VersionRefIndicator.java","src/main/java/com/azure/ai/agents/models/VersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/VersionSelector.java","src/main/java/com/azure/ai/agents/models/VersionSelectorType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationOutputType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioInputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioOutputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioTimestampType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarIceServer.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarOutputProtocol.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarScene.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoBackground.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoCrop.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoParameters.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoResolution.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadEnglishTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadMultilingualTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentDefinition.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellation.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellationReferenceSource.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndConversationSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetectionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceThresholdLevel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionToolType1.java","src/main/java/com/azure/ai/agents/models/VoiceAgentGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscription.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseTrigger.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmGeneratedGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReduction.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReductionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioConfig.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseVideoDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreateEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreatedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToIdleEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToSpeakingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionIncludeOption.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentAbortedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentCompletedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentStartedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionUpdateConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentStaticInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentAbortReason.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentResponsePolicy.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemToolName.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTemplateGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolResponseScheduling.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolboxTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionPhrase.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionWord.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTransport.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAudioCodec.java","src/main/java/com/azure/ai/agents/models/VoiceAudioContainerFormat.java","src/main/java/com/azure/ai/agents/models/VoiceAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceAudioRole.java","src/main/java/com/azure/ai/agents/models/VoiceConversation.java","src/main/java/com/azure/ai/agents/models/VoiceConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceConversationStatus.java","src/main/java/com/azure/ai/agents/models/VoiceGeneratedAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceHostedAgentConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceIds.java","src/main/java/com/azure/ai/agents/models/VoiceModelType.java","src/main/java/com/azure/ai/agents/models/VoiceOutputModality.java","src/main/java/com/azure/ai/agents/models/VoiceRecording.java","src/main/java/com/azure/ai/agents/models/VoiceRecordingChannelLayout.java","src/main/java/com/azure/ai/agents/models/VoiceResponse.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudio.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudioOutput.java","src/main/java/com/azure/ai/agents/models/VoiceResponseObjectType.java","src/main/java/com/azure/ai/agents/models/VoiceType.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WebSearchApproximateLocation.java","src/main/java/com/azure/ai/agents/models/WebSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebSearchTool.java","src/main/java/com/azure/ai/agents/models/WebSearchToolFilters.java","src/main/java/com/azure/ai/agents/models/WebSearchToolSearchContextSize.java","src/main/java/com/azure/ai/agents/models/WebSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkflowAgentDefinition.java","src/main/java/com/azure/ai/agents/models/package-info.java","src/main/java/com/azure/ai/agents/package-info.java","src/main/java/module-info.java"]}
\ No newline at end of file
+{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"f76f2f868d3d","crossLanguageDefinitions":{"com.azure.ai.agents.AgentsAsyncClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsAsyncClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsAsyncClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsAsyncClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsAsyncClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsAsyncClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsAsyncClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClientBuilder":"Azure.AI.Projects","com.azure.ai.agents.BetaAgentsAsyncClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaMemoryStoresAsyncClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.ToolboxesAsyncClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesAsyncClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesAsyncClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.implementation.models.AgentDefinitionOptInKeys":"Azure.AI.Projects.AgentDefinitionOptInKeys","com.azure.ai.agents.implementation.models.CreateAgentFromCodeContent":"Azure.AI.Projects.CreateAgentFromCodeContent","com.azure.ai.agents.implementation.models.CreateAgentFromManifestRequest":"Azure.AI.Projects.createAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentOptions":null,"com.azure.ai.agents.implementation.models.CreateAgentRequest":"Azure.AI.Projects.createAgent.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionFromManifestRequest":"Azure.AI.Projects.createAgentVersionFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionRequest":"Azure.AI.Projects.createAgentVersion.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryRequest":"Azure.AI.Projects.createMemory.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryStoreRequest":"Azure.AI.Projects.createMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.CreateSessionRequest":"Azure.AI.Projects.createSession.Request.anonymous","com.azure.ai.agents.implementation.models.CreateToolboxVersionRequest":"Azure.AI.Projects.createToolboxVersion.Request.anonymous","com.azure.ai.agents.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.agents.implementation.models.GetMicrosoft365AppPackageRequest":"Azure.AI.Projects.getMicrosoft365AppPackage.Request.anonymous","com.azure.ai.agents.implementation.models.ListMemoriesRequest":"Azure.AI.Projects.listMemories.Request.anonymous","com.azure.ai.agents.implementation.models.PublishAgentToMicrosoft365Request":"Azure.AI.Projects.publishAgentToMicrosoft365.Request.anonymous","com.azure.ai.agents.implementation.models.ReplaceTelephonyTransferTargetsRequest":"Azure.AI.Projects.replaceTelephonyTransferTargets.Request.anonymous","com.azure.ai.agents.implementation.models.SearchMemoriesRequest":"Azure.AI.Projects.searchMemories.Request.anonymous","com.azure.ai.agents.implementation.models.TransferTelephonyCallRequest":"Azure.AI.Projects.transferTelephonyCall.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest":"Azure.AI.Projects.updateAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentRequest":"Azure.AI.Projects.updateAgent.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoriesRequest":"Azure.AI.Projects.updateMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryRequest":"Azure.AI.Projects.updateMemory.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryStoreRequest":"Azure.AI.Projects.updateMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateToolboxInput":"Azure.AI.Projects.UpdateToolboxRequest","com.azure.ai.agents.implementation.models.UpdateToolboxRequest":"Azure.AI.Projects.updateToolbox.Request.anonymous","com.azure.ai.agents.models.A2APreviewTool":"Azure.AI.Projects.A2APreviewTool","com.azure.ai.agents.models.A2APreviewToolboxTool":"Azure.AI.Projects.A2APreviewToolboxTool","com.azure.ai.agents.models.A2AProtocolConfiguration":"Azure.AI.Projects.A2AProtocolConfiguration","com.azure.ai.agents.models.A2AProtocolVersion":"Azure.AI.Projects.A2AProtocolVersion","com.azure.ai.agents.models.A2ATool":"Azure.AI.Projects.A2ATool","com.azure.ai.agents.models.A2AToolCall":"Azure.AI.Projects.A2AToolCall","com.azure.ai.agents.models.A2AToolCallOutput":"Azure.AI.Projects.A2AToolCallOutput","com.azure.ai.agents.models.A2AToolboxTool":"Azure.AI.Projects.A2AToolboxTool","com.azure.ai.agents.models.AISearchIndexResource":"Azure.AI.Projects.AISearchIndexResource","com.azure.ai.agents.models.ActivityProtocolAccessBoundary":"Azure.AI.Projects.ActivityProtocolAccessBoundary","com.azure.ai.agents.models.ActivityProtocolConfiguration":"Azure.AI.Projects.ActivityProtocolConfiguration","com.azure.ai.agents.models.AgentBlueprintReference":"Azure.AI.Projects.AgentBlueprintReference","com.azure.ai.agents.models.AgentBlueprintReferenceType":"Azure.AI.Projects.AgentBlueprintReferenceType","com.azure.ai.agents.models.AgentCard":"Azure.AI.Projects.AgentCard","com.azure.ai.agents.models.AgentCardSkill":"Azure.AI.Projects.AgentCardSkill","com.azure.ai.agents.models.AgentDefinition":"Azure.AI.Projects.AgentDefinition","com.azure.ai.agents.models.AgentDetails":"Azure.AI.Projects.AgentObject","com.azure.ai.agents.models.AgentDetailsVersions":"Azure.AI.Projects.AgentObject.versions.anonymous","com.azure.ai.agents.models.AgentEndpointAuthorizationScheme":"Azure.AI.Projects.AgentEndpointAuthorizationScheme","com.azure.ai.agents.models.AgentEndpointAuthorizationSchemeType":"Azure.AI.Projects.AgentEndpointAuthorizationSchemeType","com.azure.ai.agents.models.AgentEndpointConfig":"Azure.AI.Projects.AgentEndpointConfig","com.azure.ai.agents.models.AgentEndpointProtocol":"Azure.AI.Projects.AgentEndpointProtocol","com.azure.ai.agents.models.AgentHarness":"Azure.AI.Projects.AgentHarness","com.azure.ai.agents.models.AgentIdentity":"Azure.AI.Projects.AgentIdentity","com.azure.ai.agents.models.AgentIdentityStatus":"Azure.AI.Projects.AgentIdentityStatus","com.azure.ai.agents.models.AgentKind":"Azure.AI.Projects.AgentKind","com.azure.ai.agents.models.AgentObjectType":"Azure.AI.Projects.AgentObjectType","com.azure.ai.agents.models.AgentOptimizationAgentCandidateOutput":"Azure.AI.Projects.AgentOptimizationAgentCandidateOutput","com.azure.ai.agents.models.AgentOptimizationBaselineAgentConfiguration":"Azure.AI.Projects.AgentOptimizationBaselineAgentConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationCandidate","com.azure.ai.agents.models.AgentOptimizationCandidateEvaluation":"Azure.AI.Projects.AgentOptimizationCandidateEvaluation","com.azure.ai.agents.models.AgentOptimizationCandidateExpand":"Azure.AI.Projects.AgentOptimizationCandidateExpand","com.azure.ai.agents.models.AgentOptimizationCandidateOutput":"Azure.AI.Projects.AgentOptimizationCandidateOutput","com.azure.ai.agents.models.AgentOptimizationCandidatePromotionInfo":"Azure.AI.Projects.AgentOptimizationCandidatePromotionInfo","com.azure.ai.agents.models.AgentOptimizationCandidateSearchConfiguration":"Azure.AI.Projects.AgentOptimizationCandidateSearchConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidateStatus":"Azure.AI.Projects.AgentOptimizationCandidateStatus","com.azure.ai.agents.models.AgentOptimizationConfiguration":"Azure.AI.Projects.AgentOptimizationConfiguration","com.azure.ai.agents.models.AgentOptimizationConfigurationBase":"Azure.AI.Projects.AgentOptimizationConfigurationBase","com.azure.ai.agents.models.AgentOptimizationConfigurationType":"Azure.AI.Projects.AgentOptimizationConfigurationType","com.azure.ai.agents.models.AgentOptimizationCostEstimate":"Azure.AI.Projects.AgentOptimizationCostEstimate","com.azure.ai.agents.models.AgentOptimizationDataSourceType":"Azure.AI.Projects.AgentOptimizationDataSourceType","com.azure.ai.agents.models.AgentOptimizationEstimateBand":"Azure.AI.Projects.AgentOptimizationEstimateBand","com.azure.ai.agents.models.AgentOptimizationEstimateInputs":"Azure.AI.Projects.AgentOptimizationEstimateInputs","com.azure.ai.agents.models.AgentOptimizationEstimateResult":"Azure.AI.Projects.AgentOptimizationEstimateResult","com.azure.ai.agents.models.AgentOptimizationEvaluationConfiguration":"Azure.AI.Projects.AgentOptimizationEvaluationConfiguration","com.azure.ai.agents.models.AgentOptimizationEvaluationSet":"Azure.AI.Projects.AgentOptimizationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationEvaluationSetType":"Azure.AI.Projects.AgentOptimizationEvaluationSetType","com.azure.ai.agents.models.AgentOptimizationEvaluatorReference":"Azure.AI.Projects.AgentOptimizationEvaluator","com.azure.ai.agents.models.AgentOptimizationFoundryAgentTargetConfiguration":"Azure.AI.Projects.AgentOptimizationFoundryAgentTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationGoal":"Azure.AI.Projects.AgentOptimizationGoal","com.azure.ai.agents.models.AgentOptimizationInstructionsMutation":"Azure.AI.Projects.AgentOptimizationInstructionsMutation","com.azure.ai.agents.models.AgentOptimizationJob":"Azure.AI.Projects.AgentOptimizationJob","com.azure.ai.agents.models.AgentOptimizationJobLatency":"Azure.AI.Projects.AgentOptimizationJobLatency","com.azure.ai.agents.models.AgentOptimizationJobResult":"Azure.AI.Projects.AgentOptimizationJobResult","com.azure.ai.agents.models.AgentOptimizationJobTokenUsage":"Azure.AI.Projects.AgentOptimizationJobTokenUsage","com.azure.ai.agents.models.AgentOptimizationModelConfiguration":"Azure.AI.Projects.AgentOptimizationModelConfiguration","com.azure.ai.agents.models.AgentOptimizationModelMutation":"Azure.AI.Projects.AgentOptimizationModelMutation","com.azure.ai.agents.models.AgentOptimizationMutation":"Azure.AI.Projects.AgentOptimizationMutation","com.azure.ai.agents.models.AgentOptimizationPromptCandidateOutput":"Azure.AI.Projects.AgentOptimizationPromptCandidateOutput","com.azure.ai.agents.models.AgentOptimizationResultCandidateSummary":"Azure.AI.Projects.AgentOptimizationResultCandidateSummary","com.azure.ai.agents.models.AgentOptimizationSkill":"Azure.AI.Projects.AgentOptimizationSkill","com.azure.ai.agents.models.AgentOptimizationSkillsMutation":"Azure.AI.Projects.AgentOptimizationSkillsMutation","com.azure.ai.agents.models.AgentOptimizationSpace":"Azure.AI.Projects.AgentOptimizationSpace","com.azure.ai.agents.models.AgentOptimizationStage":"Azure.AI.Projects.AgentOptimizationStage","com.azure.ai.agents.models.AgentOptimizationStageEstimate":"Azure.AI.Projects.AgentOptimizationStageEstimate","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionEvaluationSet":"Azure.AI.Projects.AgentOptimizationTargetCompletionEvaluationSet","com.azure.ai.agents.models.AgentOptimizationTargetCompletionInlineDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionInlineDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionTestCase":"Azure.AI.Projects.AgentOptimizationTargetCompletionTestCase","com.azure.ai.agents.models.AgentOptimizationTargetConfiguration":"Azure.AI.Projects.AgentOptimizationTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationTargetConfigurationType":"Azure.AI.Projects.AgentOptimizationTargetConfigurationType","com.azure.ai.agents.models.AgentOptimizationTerminationReason":"Azure.AI.Projects.AgentOptimizationTerminationReason","com.azure.ai.agents.models.AgentOptimizationToolsMutation":"Azure.AI.Projects.AgentOptimizationToolsMutation","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationEvaluationSet":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationInlineDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationInlineDataSource","com.azure.ai.agents.models.AgentReference":"Azure.AI.Projects.AgentReference","com.azure.ai.agents.models.AgentSessionResource":"Azure.AI.Projects.AgentSessionResource","com.azure.ai.agents.models.AgentSessionStatus":"Azure.AI.Projects.AgentSessionStatus","com.azure.ai.agents.models.AgentState":"Azure.AI.Projects.AgentState","com.azure.ai.agents.models.AgentStateSource":"Azure.AI.Projects.AgentStateSource","com.azure.ai.agents.models.AgentVersionDetails":"Azure.AI.Projects.AgentVersionObject","com.azure.ai.agents.models.AgentVersionStatus":"Azure.AI.Projects.AgentVersionStatus","com.azure.ai.agents.models.ApiError":"OpenAI.Error","com.azure.ai.agents.models.ApplyPatchToolParameter":"OpenAI.ApplyPatchToolParam","com.azure.ai.agents.models.ApproximateLocation":"OpenAI.ApproximateLocation","com.azure.ai.agents.models.AudioTranscription":"OpenAI.AudioTranscription","com.azure.ai.agents.models.AudioTranscriptionModel":"OpenAI.AudioTranscription.model.anonymous","com.azure.ai.agents.models.AutoCodeInterpreterToolParameter":"OpenAI.AutoCodeInterpreterToolParam","com.azure.ai.agents.models.AzureAISearchQueryType":"Azure.AI.Projects.AzureAISearchQueryType","com.azure.ai.agents.models.AzureAISearchTool":"Azure.AI.Projects.AzureAISearchTool","com.azure.ai.agents.models.AzureAISearchToolCall":"Azure.AI.Projects.AzureAISearchToolCall","com.azure.ai.agents.models.AzureAISearchToolCallOutput":"Azure.AI.Projects.AzureAISearchToolCallOutput","com.azure.ai.agents.models.AzureAISearchToolResource":"Azure.AI.Projects.AzureAISearchToolResource","com.azure.ai.agents.models.AzureAISearchToolboxTool":"Azure.AI.Projects.AzureAISearchToolboxTool","com.azure.ai.agents.models.AzureCreateResponseDetails":"Azure.AI.Projects.AzureCreateResponseDetails","com.azure.ai.agents.models.AzureCreateResponseOptions":"Azure.AI.Projects.AzureCreateResponseOptions","com.azure.ai.agents.models.AzureFunctionBinding":"Azure.AI.Projects.AzureFunctionBinding","com.azure.ai.agents.models.AzureFunctionDefinition":"Azure.AI.Projects.AzureFunctionDefinition","com.azure.ai.agents.models.AzureFunctionDefinitionDetails":"Azure.AI.Projects.AzureFunctionDefinition.function.anonymous","com.azure.ai.agents.models.AzureFunctionStorageQueue":"Azure.AI.Projects.AzureFunctionStorageQueue","com.azure.ai.agents.models.AzureFunctionTool":"Azure.AI.Projects.AzureFunctionTool","com.azure.ai.agents.models.AzureFunctionToolCall":"Azure.AI.Projects.AzureFunctionToolCall","com.azure.ai.agents.models.AzureFunctionToolCallOutput":"Azure.AI.Projects.AzureFunctionToolCallOutput","com.azure.ai.agents.models.AzureUserSecurityContext":"Azure.AI.Projects.AzureUserSecurityContext","com.azure.ai.agents.models.BingCustomSearchConfiguration":"Azure.AI.Projects.BingCustomSearchConfiguration","com.azure.ai.agents.models.BingCustomSearchPreviewTool":"Azure.AI.Projects.BingCustomSearchPreviewTool","com.azure.ai.agents.models.BingCustomSearchToolCall":"Azure.AI.Projects.BingCustomSearchToolCall","com.azure.ai.agents.models.BingCustomSearchToolCallOutput":"Azure.AI.Projects.BingCustomSearchToolCallOutput","com.azure.ai.agents.models.BingCustomSearchToolParameters":"Azure.AI.Projects.BingCustomSearchToolParameters","com.azure.ai.agents.models.BingGroundingSearchConfiguration":"Azure.AI.Projects.BingGroundingSearchConfiguration","com.azure.ai.agents.models.BingGroundingSearchToolParameters":"Azure.AI.Projects.BingGroundingSearchToolParameters","com.azure.ai.agents.models.BingGroundingTool":"Azure.AI.Projects.BingGroundingTool","com.azure.ai.agents.models.BingGroundingToolCall":"Azure.AI.Projects.BingGroundingToolCall","com.azure.ai.agents.models.BingGroundingToolCallOutput":"Azure.AI.Projects.BingGroundingToolCallOutput","com.azure.ai.agents.models.BotServiceAuthorizationScheme":"Azure.AI.Projects.BotServiceAuthorizationScheme","com.azure.ai.agents.models.BotServiceRbacAuthorizationScheme":"Azure.AI.Projects.BotServiceRbacAuthorizationScheme","com.azure.ai.agents.models.BotServiceTenantAuthorizationScheme":"Azure.AI.Projects.BotServiceTenantAuthorizationScheme","com.azure.ai.agents.models.BrowserAutomationPreviewTool":"Azure.AI.Projects.BrowserAutomationPreviewTool","com.azure.ai.agents.models.BrowserAutomationPreviewToolboxTool":"Azure.AI.Projects.BrowserAutomationPreviewToolboxTool","com.azure.ai.agents.models.BrowserAutomationTool":"Azure.AI.Projects.BrowserAutomationTool","com.azure.ai.agents.models.BrowserAutomationToolCall":"Azure.AI.Projects.BrowserAutomationToolCall","com.azure.ai.agents.models.BrowserAutomationToolCallOutput":"Azure.AI.Projects.BrowserAutomationToolCallOutput","com.azure.ai.agents.models.BrowserAutomationToolConnectionParameters":"Azure.AI.Projects.BrowserAutomationToolConnectionParameters","com.azure.ai.agents.models.BrowserAutomationToolParameters":"Azure.AI.Projects.BrowserAutomationToolParameters","com.azure.ai.agents.models.BrowserAutomationToolboxTool":"Azure.AI.Projects.BrowserAutomationToolboxTool","com.azure.ai.agents.models.CallableToolAllowedCaller":"OpenAI.CallableToolAllowedCaller","com.azure.ai.agents.models.CaptureStructuredOutputsTool":"Azure.AI.Projects.CaptureStructuredOutputsTool","com.azure.ai.agents.models.ChatSummaryMemoryItem":"Azure.AI.Projects.ChatSummaryMemoryItem","com.azure.ai.agents.models.CodeConfiguration":"Azure.AI.Projects.CodeConfiguration","com.azure.ai.agents.models.CodeDependencyResolution":"Azure.AI.Projects.CodeDependencyResolution","com.azure.ai.agents.models.CodeFileDetails":null,"com.azure.ai.agents.models.CodeInterpreterTool":"OpenAI.CodeInterpreterTool","com.azure.ai.agents.models.CodeInterpreterToolboxTool":"Azure.AI.Projects.CodeInterpreterToolboxTool","com.azure.ai.agents.models.ComputerEnvironment":"ComputerEnvironmentExpandable","com.azure.ai.agents.models.ComputerTool":"OpenAI.ComputerTool","com.azure.ai.agents.models.ComputerUsePreviewTool":"OpenAI.ComputerUsePreviewTool","com.azure.ai.agents.models.ContainerAutoParameter":"OpenAI.ContainerAutoParam","com.azure.ai.agents.models.ContainerConfiguration":"Azure.AI.Projects.ContainerConfiguration","com.azure.ai.agents.models.ContainerMemoryLimit":"ContainerMemoryLimitExpandable","com.azure.ai.agents.models.ContainerNetworkPolicyAllowlistParameter":"OpenAI.ContainerNetworkPolicyAllowlistParam","com.azure.ai.agents.models.ContainerNetworkPolicyDisabledParameter":"OpenAI.ContainerNetworkPolicyDisabledParam","com.azure.ai.agents.models.ContainerNetworkPolicyDomainSecretParameter":"OpenAI.ContainerNetworkPolicyDomainSecretParam","com.azure.ai.agents.models.ContainerNetworkPolicyParamType":"OpenAI.ContainerNetworkPolicyParamType","com.azure.ai.agents.models.ContainerNetworkPolicyParameter":"OpenAI.ContainerNetworkPolicyParam","com.azure.ai.agents.models.ContainerSkill":"OpenAI.ContainerSkill","com.azure.ai.agents.models.ContainerSkillType":"OpenAI.ContainerSkillType","com.azure.ai.agents.models.CreateAgentVersionFromCodeContent":"Azure.AI.Projects.CreateAgentVersionFromCodeContent","com.azure.ai.agents.models.CreateAgentVersionFromCodeMetadata":"Azure.AI.Projects.CreateAgentVersionFromCodeMetadata","com.azure.ai.agents.models.CreateAgentVersionInput":"Azure.AI.Projects.CreateAgentVersionRequest","com.azure.ai.agents.models.CreateAgentVersionOptions":null,"com.azure.ai.agents.models.CreateTeamsPhoneExtensibilityTelephonyBindingInput":"Azure.AI.Projects.CreateTeamsPhoneExtensibilityTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyBindingInput":"Azure.AI.Projects.CreateTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyCallJobInput":"Azure.AI.Projects.CreateTelephonyCallJobRequest","com.azure.ai.agents.models.CreateTwilioTelephonyBindingInput":"Azure.AI.Projects.CreateTwilioTelephonyBindingRequest","com.azure.ai.agents.models.CustomGrammarFormatParameter":"OpenAI.CustomGrammarFormatParam","com.azure.ai.agents.models.CustomTextFormatParameter":"OpenAI.CustomTextFormatParam","com.azure.ai.agents.models.CustomToolParamFormat":"OpenAI.CustomToolParamFormat","com.azure.ai.agents.models.CustomToolParamFormatType":"OpenAI.CustomToolParamFormatType","com.azure.ai.agents.models.CustomToolParameter":"OpenAI.CustomToolParam","com.azure.ai.agents.models.DigitalWorkerType":"Azure.AI.Projects.DigitalWorkerType","com.azure.ai.agents.models.EntraAuthorizationScheme":"Azure.AI.Projects.EntraAuthorizationScheme","com.azure.ai.agents.models.EvaluationAzureStandardVoiceModelConfiguration":"Azure.AI.Projects.EvaluationAzureStandardVoiceModelConfiguration","com.azure.ai.agents.models.EvaluationModelConfiguration":"Azure.AI.Projects.EvaluationModelConfiguration","com.azure.ai.agents.models.EvaluationVoiceModelConfiguration":"Azure.AI.Projects.EvaluationVoiceModelConfiguration","com.azure.ai.agents.models.ExternalAgentDefinition":"Azure.AI.Projects.ExternalAgentDefinition","com.azure.ai.agents.models.FabricDataAgentToolCall":"Azure.AI.Projects.FabricDataAgentToolCall","com.azure.ai.agents.models.FabricDataAgentToolCallOutput":"Azure.AI.Projects.FabricDataAgentToolCallOutput","com.azure.ai.agents.models.FabricDataAgentToolParameters":"Azure.AI.Projects.FabricDataAgentToolParameters","com.azure.ai.agents.models.FabricIqPreviewTool":"Azure.AI.Projects.FabricIQPreviewTool","com.azure.ai.agents.models.FabricIqPreviewToolboxTool":"Azure.AI.Projects.FabricIQPreviewToolboxTool","com.azure.ai.agents.models.FileSearchTool":"OpenAI.FileSearchTool","com.azure.ai.agents.models.FileSearchToolboxTool":"Azure.AI.Projects.FileSearchToolboxTool","com.azure.ai.agents.models.FixedRatioVersionSelectionRule":"Azure.AI.Projects.FixedRatioVersionSelectionRule","com.azure.ai.agents.models.FunctionShellToolParamEnvironment":"OpenAI.FunctionShellToolParamEnvironment","com.azure.ai.agents.models.FunctionShellToolParamEnvironmentType":"OpenAI.FunctionShellToolParamEnvironmentType","com.azure.ai.agents.models.FunctionShellToolParameter":"OpenAI.FunctionShellToolParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentContainerReferenceParameter":"OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentLocalEnvironmentParameter":"OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam","com.azure.ai.agents.models.FunctionTool":"OpenAI.FunctionTool","com.azure.ai.agents.models.GetMicrosoft365AppPackageOptions":null,"com.azure.ai.agents.models.GitHubCopilotBuiltInTool":"Azure.AI.Projects.GitHubCopilotBuiltInTool","com.azure.ai.agents.models.GitHubCopilotHarness":"Azure.AI.Projects.GitHubCopilotHarness","com.azure.ai.agents.models.GitHubCopilotToolsetConfig":"Azure.AI.Projects.GitHubCopilotToolsetConfig","com.azure.ai.agents.models.GitHubCopilotToolsetDefaultConfig":"Azure.AI.Projects.GitHubCopilotToolsetDefaultConfig","com.azure.ai.agents.models.GitHubCopilotToolsetPreview":"Azure.AI.Projects.GitHubCopilotToolsetPreview","com.azure.ai.agents.models.GrammarSyntax":"GrammarSyntaxExpandable","com.azure.ai.agents.models.HeaderTelemetryEndpointAuth":"Azure.AI.Projects.HeaderTelemetryEndpointAuth","com.azure.ai.agents.models.HostedAgentDefinition":"Azure.AI.Projects.HostedAgentDefinition","com.azure.ai.agents.models.HybridSearchOptions":"OpenAI.HybridSearchOptions","com.azure.ai.agents.models.ImageGenActionEnum":"ImageGenActionEnumExpandable","com.azure.ai.agents.models.ImageGenTool":"OpenAI.ImageGenTool","com.azure.ai.agents.models.ImageGenToolBackground":"ImageGenToolBackgroundExpandable","com.azure.ai.agents.models.ImageGenToolInputImageMask":"OpenAI.ImageGenToolInputImageMask","com.azure.ai.agents.models.ImageGenToolModel":"OpenAI.ImageGenTool.model.anonymous","com.azure.ai.agents.models.ImageGenToolModeration":"ImageGenToolModerationExpandable","com.azure.ai.agents.models.ImageGenToolOutputFormat":"ImageGenToolOutputFormatExpandable","com.azure.ai.agents.models.ImageGenToolQuality":"ImageGenToolQualityExpandable","com.azure.ai.agents.models.ImageGenToolSize":"ImageGenToolSizeExpandable","com.azure.ai.agents.models.IncludeEnum":"OpenAI.IncludeEnum","com.azure.ai.agents.models.InlineSkillParameter":"OpenAI.InlineSkillParam","com.azure.ai.agents.models.InlineSkillSourceParameter":"OpenAI.InlineSkillSourceParam","com.azure.ai.agents.models.InputFidelity":"InputFidelityExpandable","com.azure.ai.agents.models.InvocationsProtocolConfiguration":"Azure.AI.Projects.InvocationsProtocolConfiguration","com.azure.ai.agents.models.InvocationsWsProtocolConfiguration":"Azure.AI.Projects.InvocationsWsProtocolConfiguration","com.azure.ai.agents.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.agents.models.ListMemoriesOptions":null,"com.azure.ai.agents.models.LocalShellToolParameter":"OpenAI.LocalShellToolParam","com.azure.ai.agents.models.LocalSkillParameter":"OpenAI.LocalSkillParam","com.azure.ai.agents.models.ManagedAgentIdentityBlueprintReference":"Azure.AI.Projects.ManagedAgentIdentityBlueprintReference","com.azure.ai.agents.models.McpListToolsTool":"OpenAI.MCPListToolsTool","com.azure.ai.agents.models.McpListToolsToolAnnotations":"OpenAI.MCPListToolsToolAnnotations","com.azure.ai.agents.models.McpListToolsToolInputSchema":"OpenAI.MCPListToolsToolInputSchema","com.azure.ai.agents.models.McpProtocolConfiguration":"Azure.AI.Projects.McpProtocolConfiguration","com.azure.ai.agents.models.McpTool":"OpenAI.MCPTool","com.azure.ai.agents.models.McpToolConnectorId":"McpToolConnectorIdExpandable","com.azure.ai.agents.models.McpToolFilter":"OpenAI.MCPToolFilter","com.azure.ai.agents.models.McpToolRequireApproval":"OpenAI.MCPToolRequireApproval","com.azure.ai.agents.models.McpToolboxTool":"Azure.AI.Projects.MCPToolboxTool","com.azure.ai.agents.models.MemoryCommandToolCall":"Azure.AI.Projects.MemoryCommandToolCall","com.azure.ai.agents.models.MemoryCommandToolCallOutput":"Azure.AI.Projects.MemoryCommandToolCallOutput","com.azure.ai.agents.models.MemoryItem":"Azure.AI.Projects.MemoryItem","com.azure.ai.agents.models.MemoryItemKind":"Azure.AI.Projects.MemoryItemKind","com.azure.ai.agents.models.MemoryOperation":"Azure.AI.Projects.MemoryOperation","com.azure.ai.agents.models.MemoryOperationKind":"Azure.AI.Projects.MemoryOperationKind","com.azure.ai.agents.models.MemorySearchItem":"Azure.AI.Projects.MemorySearchItem","com.azure.ai.agents.models.MemorySearchOptions":"Azure.AI.Projects.MemorySearchOptions","com.azure.ai.agents.models.MemorySearchPreviewTool":"Azure.AI.Projects.MemorySearchPreviewTool","com.azure.ai.agents.models.MemorySearchToolCall":"Azure.AI.Projects.MemorySearchToolCall","com.azure.ai.agents.models.MemoryStoreDefaultDefinition":"Azure.AI.Projects.MemoryStoreDefaultDefinition","com.azure.ai.agents.models.MemoryStoreDefaultOptions":"Azure.AI.Projects.MemoryStoreDefaultOptions","com.azure.ai.agents.models.MemoryStoreDefinition":"Azure.AI.Projects.MemoryStoreDefinition","com.azure.ai.agents.models.MemoryStoreDetails":"Azure.AI.Projects.MemoryStoreObject","com.azure.ai.agents.models.MemoryStoreKind":"Azure.AI.Projects.MemoryStoreKind","com.azure.ai.agents.models.MemoryStoreObjectType":"Azure.AI.Projects.MemoryStoreObjectType","com.azure.ai.agents.models.MemoryStoreOperationUsage":"Azure.AI.Projects.MemoryStoreOperationUsage","com.azure.ai.agents.models.MemoryStoreSearchResponse":"Azure.AI.Projects.MemoryStoreSearchResponse","com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult":"Azure.AI.Projects.MemoryStoreUpdateCompletedResult","com.azure.ai.agents.models.MemoryStoreUpdateResponse":"Azure.AI.Projects.MemoryStoreUpdateResponse","com.azure.ai.agents.models.MemoryStoreUpdateStatus":"Azure.AI.Projects.MemoryStoreUpdateStatus","com.azure.ai.agents.models.Microsoft365PermissionScopes":"Azure.AI.Projects.Microsoft365PermissionScopes","com.azure.ai.agents.models.Microsoft365PublishDefaults":"Azure.AI.Projects.Microsoft365PublishDefaults","com.azure.ai.agents.models.Microsoft365PublishResult":"Azure.AI.Projects.Microsoft365PublishResponse","com.azure.ai.agents.models.Microsoft365PublishScope":"Azure.AI.Projects.Microsoft365PublishScope","com.azure.ai.agents.models.MicrosoftFabricPreviewTool":"Azure.AI.Projects.MicrosoftFabricPreviewTool","com.azure.ai.agents.models.ModelRouterAttempt":"Azure.AI.Projects.ModelRouterAttempt","com.azure.ai.agents.models.ModelRouterAttemptError":"Azure.AI.Projects.ModelRouterAttemptError","com.azure.ai.agents.models.ModelRouterAttemptResult":"Azure.AI.Projects.ModelRouterAttemptResult","com.azure.ai.agents.models.ModelRouterDetails":"Azure.AI.Projects.ModelRouterDetails","com.azure.ai.agents.models.ModelRouterMode":"Azure.AI.Projects.ModelRouterMode","com.azure.ai.agents.models.ModelSamplingParameters":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.agents.models.ModelSelectionDetails":"Azure.AI.Projects.ModelSelectionDetails","com.azure.ai.agents.models.NamespaceTool":"OpenAI.NamespaceToolParam","com.azure.ai.agents.models.OpenApiAnonymousAuthDetails":"Azure.AI.Projects.OpenApiAnonymousAuthDetails","com.azure.ai.agents.models.OpenApiAuthDetails":"Azure.AI.Projects.OpenApiAuthDetails","com.azure.ai.agents.models.OpenApiAuthType":"Azure.AI.Projects.OpenApiAuthType","com.azure.ai.agents.models.OpenApiFunctionDefinition":"Azure.AI.Projects.OpenApiFunctionDefinition","com.azure.ai.agents.models.OpenApiFunctionDefinitionFunction":"Azure.AI.Projects.OpenApiFunctionDefinition.function.anonymous","com.azure.ai.agents.models.OpenApiManagedAuthDetails":"Azure.AI.Projects.OpenApiManagedAuthDetails","com.azure.ai.agents.models.OpenApiManagedSecurityScheme":"Azure.AI.Projects.OpenApiManagedSecurityScheme","com.azure.ai.agents.models.OpenApiProjectConnectionAuthDetails":"Azure.AI.Projects.OpenApiProjectConnectionAuthDetails","com.azure.ai.agents.models.OpenApiProjectConnectionSecurityScheme":"Azure.AI.Projects.OpenApiProjectConnectionSecurityScheme","com.azure.ai.agents.models.OpenApiTool":"Azure.AI.Projects.OpenApiTool","com.azure.ai.agents.models.OpenApiToolCall":"Azure.AI.Projects.OpenApiToolCall","com.azure.ai.agents.models.OpenApiToolCallOutput":"Azure.AI.Projects.OpenApiToolCallOutput","com.azure.ai.agents.models.OpenApiToolboxTool":"Azure.AI.Projects.OpenApiToolboxTool","com.azure.ai.agents.models.OptimizationContext":"Azure.AI.Projects.OptimizationContext","com.azure.ai.agents.models.OptimizationContextType":"Azure.AI.Projects.OptimizationContextType","com.azure.ai.agents.models.OtlpTelemetryEndpoint":"Azure.AI.Projects.OtlpTelemetryEndpoint","com.azure.ai.agents.models.PageOrder":"Azure.AI.Projects.PageOrder","com.azure.ai.agents.models.ProceduralMemoryItem":"Azure.AI.Projects.ProceduralMemoryItem","com.azure.ai.agents.models.ProgrammaticToolCallingParameter":"OpenAI.ProgrammaticToolCallingParam","com.azure.ai.agents.models.PromptAgentDefinition":"Azure.AI.Projects.PromptAgentDefinition","com.azure.ai.agents.models.PromptAgentDefinitionTextOptions":"Azure.AI.Projects.PromptAgentDefinitionTextOptions","com.azure.ai.agents.models.PromptOptimizationConfiguration":"Azure.AI.Projects.PromptOptimizationConfiguration","com.azure.ai.agents.models.ProtocolConfiguration":"Azure.AI.Projects.ProtocolConfiguration","com.azure.ai.agents.models.ProtocolVersionRecord":"Azure.AI.Projects.ProtocolVersionRecord","com.azure.ai.agents.models.PstnTelephonyTransferDestination":"Azure.AI.Projects.PSTNTelephonyTransferDestination","com.azure.ai.agents.models.PublishAgentToMicrosoft365Options":null,"com.azure.ai.agents.models.PublishApprovalStatus":"Azure.AI.Projects.PublishApprovalStatus","com.azure.ai.agents.models.RaiConfig":"Azure.AI.Projects.RaiConfig","com.azure.ai.agents.models.RaiInvocationContentType":"Azure.AI.Projects.RaiInvocationContentType","com.azure.ai.agents.models.RaiInvocationModeration":"Azure.AI.Projects.RaiInvocationModeration","com.azure.ai.agents.models.RaiInvocationResponseMode":"Azure.AI.Projects.RaiInvocationMode","com.azure.ai.agents.models.RaiSseTextSelector":"Azure.AI.Projects.RaiSseTextSelector","com.azure.ai.agents.models.RankerVersionType":"RankerVersionTypeExpandable","com.azure.ai.agents.models.RankingOptions":"OpenAI.RankingOptions","com.azure.ai.agents.models.RealtimeAudioFormat":"OpenAI.RealtimeAudioFormats","com.azure.ai.agents.models.RealtimeAudioFormatType":"OpenAI.RealtimeAudioFormatsType","com.azure.ai.agents.models.RealtimeClientEvent":"OpenAI.RealtimeClientEvent","com.azure.ai.agents.models.RealtimeClientEventType":"OpenAI.RealtimeClientEventType","com.azure.ai.agents.models.RealtimeConversationCreatedEvent":"OpenAI.RealtimeServerEventConversationCreated","com.azure.ai.agents.models.RealtimeConversationItem":"OpenAI.RealtimeConversationItem","com.azure.ai.agents.models.RealtimeConversationItemAddedEvent":"OpenAI.RealtimeServerEventConversationItemAdded","com.azure.ai.agents.models.RealtimeConversationItemAssistantMessage":"OpenAI.RealtimeConversationItemMessageAssistant","com.azure.ai.agents.models.RealtimeConversationItemCreateEvent":"OpenAI.RealtimeClientEventConversationItemCreate","com.azure.ai.agents.models.RealtimeConversationItemCreatedEvent":"OpenAI.RealtimeServerEventConversationItemCreated","com.azure.ai.agents.models.RealtimeConversationItemDeleteEvent":"OpenAI.RealtimeClientEventConversationItemDelete","com.azure.ai.agents.models.RealtimeConversationItemDeletedEvent":"OpenAI.RealtimeServerEventConversationItemDeleted","com.azure.ai.agents.models.RealtimeConversationItemDoneEvent":"OpenAI.RealtimeServerEventConversationItemDone","com.azure.ai.agents.models.RealtimeConversationItemFunctionCall":"OpenAI.RealtimeConversationItemFunctionCall","com.azure.ai.agents.models.RealtimeConversationItemFunctionCallOutput":"OpenAI.RealtimeConversationItemFunctionCallOutput","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionCompletedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionDeltaEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionFailedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionSegmentEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegment","com.azure.ai.agents.models.RealtimeConversationItemMessage":"OpenAI.RealtimeConversationItemMessage","com.azure.ai.agents.models.RealtimeConversationItemMessageType":"OpenAI.RealtimeConversationItemMessageType","com.azure.ai.agents.models.RealtimeConversationItemObjectType":"RealtimeConversationItemObject","com.azure.ai.agents.models.RealtimeConversationItemRetrieveEvent":"OpenAI.RealtimeClientEventConversationItemRetrieve","com.azure.ai.agents.models.RealtimeConversationItemRetrievedEvent":"OpenAI.RealtimeServerEventConversationItemRetrieved","com.azure.ai.agents.models.RealtimeConversationItemSystemMessage":"OpenAI.RealtimeConversationItemMessageSystem","com.azure.ai.agents.models.RealtimeConversationItemTruncateEvent":"OpenAI.RealtimeClientEventConversationItemTruncate","com.azure.ai.agents.models.RealtimeConversationItemTruncatedEvent":"OpenAI.RealtimeServerEventConversationItemTruncated","com.azure.ai.agents.models.RealtimeConversationItemType":"OpenAI.RealtimeConversationItemType","com.azure.ai.agents.models.RealtimeConversationItemUserMessage":"OpenAI.RealtimeConversationItemMessageUser","com.azure.ai.agents.models.RealtimeErrorEvent":"OpenAI.RealtimeServerEventRealtimeServerEventError","com.azure.ai.agents.models.RealtimeInputAudioBufferAppendEvent":"OpenAI.RealtimeClientEventInputAudioBufferAppend","com.azure.ai.agents.models.RealtimeInputAudioBufferClearEvent":"OpenAI.RealtimeClientEventInputAudioBufferClear","com.azure.ai.agents.models.RealtimeInputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCleared","com.azure.ai.agents.models.RealtimeInputAudioBufferCommitEvent":"OpenAI.RealtimeClientEventInputAudioBufferCommit","com.azure.ai.agents.models.RealtimeInputAudioBufferCommittedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCommitted","com.azure.ai.agents.models.RealtimeInputAudioBufferDtmfReceivedEvent":"OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStartedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStoppedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped","com.azure.ai.agents.models.RealtimeInputAudioBufferTimeoutTriggeredEvent":"OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggered","com.azure.ai.agents.models.RealtimeMcpApprovalInput":"OpenAI.RealtimeMCPApprovalRequest","com.azure.ai.agents.models.RealtimeMcpApprovalOutput":"OpenAI.RealtimeMCPApprovalResponse","com.azure.ai.agents.models.RealtimeMcpError":"OpenAI.RealtimeMCPError","com.azure.ai.agents.models.RealtimeMcpErrorType":"OpenAI.RealtimeMcpErrorType","com.azure.ai.agents.models.RealtimeMcpHttpError":"OpenAI.RealtimeMCPHTTPError","com.azure.ai.agents.models.RealtimeMcpListTools":"OpenAI.RealtimeMCPListTools","com.azure.ai.agents.models.RealtimeMcpListToolsCompletedEvent":"OpenAI.RealtimeServerEventMCPListToolsCompleted","com.azure.ai.agents.models.RealtimeMcpListToolsFailedEvent":"OpenAI.RealtimeServerEventMCPListToolsFailed","com.azure.ai.agents.models.RealtimeMcpListToolsInProgressEvent":"OpenAI.RealtimeServerEventMCPListToolsInProgress","com.azure.ai.agents.models.RealtimeMcpProtocolError":"OpenAI.RealtimeMCPProtocolError","com.azure.ai.agents.models.RealtimeMcpToolCall":"OpenAI.RealtimeMCPToolCall","com.azure.ai.agents.models.RealtimeMcpToolExecutionError":"OpenAI.RealtimeMCPToolExecutionError","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearEvent":"OpenAI.RealtimeClientEventOutputAudioBufferClear","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferCleared","com.azure.ai.agents.models.RealtimeOutputAudioBufferStartedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStarted","com.azure.ai.agents.models.RealtimeOutputAudioBufferStoppedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStopped","com.azure.ai.agents.models.RealtimePcmAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcm","com.azure.ai.agents.models.RealtimePcmaAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcma","com.azure.ai.agents.models.RealtimePcmuAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcmu","com.azure.ai.agents.models.RealtimeRateLimitsUpdatedEvent":"OpenAI.RealtimeServerEventRateLimitsUpdated","com.azure.ai.agents.models.RealtimeResponseAudioDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioDelta","com.azure.ai.agents.models.RealtimeResponseAudioDoneEvent":"OpenAI.RealtimeServerEventResponseAudioDone","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDelta","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDoneEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDone","com.azure.ai.agents.models.RealtimeResponseCancelEvent":"OpenAI.RealtimeClientEventResponseCancel","com.azure.ai.agents.models.RealtimeResponseContentPart":"OpenAI.RealtimeServerEventResponseContentPartDonePart","com.azure.ai.agents.models.RealtimeResponseContentPartAddedEvent":"OpenAI.RealtimeServerEventResponseContentPartAdded","com.azure.ai.agents.models.RealtimeResponseContentPartDoneEvent":"OpenAI.RealtimeServerEventResponseContentPartDone","com.azure.ai.agents.models.RealtimeResponseCreateEvent":"OpenAI.RealtimeClientEventResponseCreate","com.azure.ai.agents.models.RealtimeResponseCreatedEvent":"OpenAI.RealtimeServerEventResponseCreated","com.azure.ai.agents.models.RealtimeResponseDoneEvent":"OpenAI.RealtimeServerEventResponseDone","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallCompletedEvent":"OpenAI.RealtimeServerEventResponseMCPCallCompleted","com.azure.ai.agents.models.RealtimeResponseMcpCallFailedEvent":"OpenAI.RealtimeServerEventResponseMCPCallFailed","com.azure.ai.agents.models.RealtimeResponseMcpCallInProgressEvent":"OpenAI.RealtimeServerEventResponseMCPCallInProgress","com.azure.ai.agents.models.RealtimeResponseOutputItemAddedEvent":"OpenAI.RealtimeServerEventResponseOutputItemAdded","com.azure.ai.agents.models.RealtimeResponseOutputItemDoneEvent":"OpenAI.RealtimeServerEventResponseOutputItemDone","com.azure.ai.agents.models.RealtimeResponseTextDeltaEvent":"OpenAI.RealtimeServerEventResponseTextDelta","com.azure.ai.agents.models.RealtimeResponseTextDoneEvent":"OpenAI.RealtimeServerEventResponseTextDone","com.azure.ai.agents.models.RealtimeSemanticVadTurnDetection":"OpenAI.RealtimeTurnDetectionSemanticVad","com.azure.ai.agents.models.RealtimeServerEvent":"OpenAI.RealtimeServerEvent","com.azure.ai.agents.models.RealtimeServerEventType":"OpenAI.RealtimeServerEventType","com.azure.ai.agents.models.RealtimeServerVadTurnDetection":"OpenAI.RealtimeTurnDetectionServerVad","com.azure.ai.agents.models.RealtimeSessionAudioConfiguration":"OpenAI.RealtimeSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeSessionAudioInput":"OpenAI.RealtimeSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeSessionAudioOutput":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput","com.azure.ai.agents.models.RealtimeSessionConfiguration":"OpenAI.RealtimeSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeSessionConfigurationBase":"OpenAI.RealtimeSessionCreateRequestUnion","com.azure.ai.agents.models.RealtimeSessionCreateRequestGAAudioOutputVoice":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput.voice.anonymous","com.azure.ai.agents.models.RealtimeSessionCreatedEvent":"OpenAI.RealtimeServerEventSessionCreated","com.azure.ai.agents.models.RealtimeSessionTracingConfiguration":"OpenAI.RealtimeSessionCreateRequestGATracing","com.azure.ai.agents.models.RealtimeSessionType":"OpenAI.RealtimeSessionCreateRequestUnionType","com.azure.ai.agents.models.RealtimeSessionUpdateEvent":"OpenAI.RealtimeClientEventSessionUpdate","com.azure.ai.agents.models.RealtimeSessionUpdatedEvent":"OpenAI.RealtimeServerEventSessionUpdated","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioInput":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeTranscriptionSessionConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeTurnDetection":"OpenAI.RealtimeTurnDetection","com.azure.ai.agents.models.RealtimeTurnDetectionType":"OpenAI.RealtimeTurnDetectionType","com.azure.ai.agents.models.ReminderPreviewToolboxTool":"Azure.AI.Projects.ReminderPreviewToolboxTool","com.azure.ai.agents.models.ResponseFormatJsonSchemaInner":"OpenAI.ResponseFormatJsonSchemaSchema","com.azure.ai.agents.models.ResponseUsageInputTokensDetails":"OpenAI.ResponseUsageInputTokensDetails","com.azure.ai.agents.models.ResponseUsageOutputTokensDetails":"OpenAI.ResponseUsageOutputTokensDetails","com.azure.ai.agents.models.ResponsesProtocolConfiguration":"Azure.AI.Projects.ResponsesProtocolConfiguration","com.azure.ai.agents.models.RoutingConfiguration":"Azure.AI.Projects.RoutingConfiguration","com.azure.ai.agents.models.RoutingTraceEntry":"Azure.AI.Projects.RoutingTraceEntry","com.azure.ai.agents.models.SearchContentType":"OpenAI.SearchContentType","com.azure.ai.agents.models.SearchContextSize":"SearchContextSizeExpandable","com.azure.ai.agents.models.SessionAffinityConfiguration":"Azure.AI.Projects.SessionAffinityConfiguration","com.azure.ai.agents.models.SessionAffinityDecision":"Azure.AI.Projects.SessionAffinityDecision","com.azure.ai.agents.models.SessionAffinityDetails":"Azure.AI.Projects.SessionAffinityDetails","com.azure.ai.agents.models.SessionAffinityMode":"Azure.AI.Projects.SessionAffinityMode","com.azure.ai.agents.models.SessionAffinityRequestMode":"Azure.AI.Projects.SessionAffinityRequestMode","com.azure.ai.agents.models.SessionAffinitySource":"Azure.AI.Projects.SessionAffinitySource","com.azure.ai.agents.models.SessionConfiguration":"Azure.AI.Projects.SessionConfiguration","com.azure.ai.agents.models.SessionDirectoryEntry":"Azure.AI.Projects.SessionDirectoryEntry","com.azure.ai.agents.models.SessionFileWriteResult":"Azure.AI.Projects.SessionFileWriteResponse","com.azure.ai.agents.models.SessionLogEvent":"Azure.AI.Projects.SessionLogEvent","com.azure.ai.agents.models.SessionLogEventType":"Azure.AI.Projects.SessionLogEventType","com.azure.ai.agents.models.SharepointGroundingToolCall":"Azure.AI.Projects.SharepointGroundingToolCall","com.azure.ai.agents.models.SharepointGroundingToolCallOutput":"Azure.AI.Projects.SharepointGroundingToolCallOutput","com.azure.ai.agents.models.SharepointGroundingToolParameters":"Azure.AI.Projects.SharepointGroundingToolParameters","com.azure.ai.agents.models.SharepointPreviewTool":"Azure.AI.Projects.SharepointPreviewTool","com.azure.ai.agents.models.ShellToolboxTool":"Azure.AI.Projects.ShellToolboxTool","com.azure.ai.agents.models.SipTelephonyTransferDestination":"Azure.AI.Projects.SipTelephonyTransferDestination","com.azure.ai.agents.models.SkillReference":"Azure.AI.Projects.SkillReference","com.azure.ai.agents.models.SkillReferenceParameter":"OpenAI.SkillReferenceParam","com.azure.ai.agents.models.SteeringPromptOptimizationContext":"Azure.AI.Projects.SteeringPromptOptimizationContext","com.azure.ai.agents.models.StructuredInputDefinition":"Azure.AI.Projects.StructuredInputDefinition","com.azure.ai.agents.models.StructuredOutputDefinition":"Azure.AI.Projects.StructuredOutputDefinition","com.azure.ai.agents.models.TargetAttribute":"Azure.AI.Projects.TargetAttribute","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBinding":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBinding","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBindingListItem":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBindingListItem","com.azure.ai.agents.models.TeamsTelephonyTransferDestination":"Azure.AI.Projects.TeamsTelephonyTransferDestination","com.azure.ai.agents.models.TelemetryConfig":"Azure.AI.Projects.TelemetryConfig","com.azure.ai.agents.models.TelemetryDataKind":"Azure.AI.Projects.TelemetryDataKind","com.azure.ai.agents.models.TelemetryEndpoint":"Azure.AI.Projects.TelemetryEndpoint","com.azure.ai.agents.models.TelemetryEndpointAuth":"Azure.AI.Projects.TelemetryEndpointAuth","com.azure.ai.agents.models.TelemetryEndpointAuthType":"Azure.AI.Projects.TelemetryEndpointAuthType","com.azure.ai.agents.models.TelemetryEndpointKind":"Azure.AI.Projects.TelemetryEndpointKind","com.azure.ai.agents.models.TelemetryTransportProtocol":"Azure.AI.Projects.TelemetryTransportProtocol","com.azure.ai.agents.models.TelephonyBinding":"Azure.AI.Projects.TelephonyBinding","com.azure.ai.agents.models.TelephonyBindingListItem":"Azure.AI.Projects.TelephonyBindingListItem","com.azure.ai.agents.models.TelephonyBindingStatus":"Azure.AI.Projects.TelephonyBindingStatus","com.azure.ai.agents.models.TelephonyCallDurationBasis":"Azure.AI.Projects.TelephonyCallDurationBasis","com.azure.ai.agents.models.TelephonyCallEndReason":"Azure.AI.Projects.TelephonyCallEndReason","com.azure.ai.agents.models.TelephonyCallJob":"Azure.AI.Projects.TelephonyCallJob","com.azure.ai.agents.models.TelephonyCallJobCancellation":"Azure.AI.Projects.TelephonyCallJobCancellation","com.azure.ai.agents.models.TelephonyCallJobSchedule":"Azure.AI.Projects.TelephonyCallJobSchedule","com.azure.ai.agents.models.TelephonyCallJobStatus":"Azure.AI.Projects.TelephonyCallJobStatus","com.azure.ai.agents.models.TelephonyCallJobTerminalReason":"Azure.AI.Projects.TelephonyCallJobTerminalReason","com.azure.ai.agents.models.TelephonyCallLifecycleEvent":"Azure.AI.Projects.TelephonyCallLifecycleEvent","com.azure.ai.agents.models.TelephonyCallLifecycleEventName":"Azure.AI.Projects.TelephonyCallLifecycleEventName","com.azure.ai.agents.models.TelephonyCallLifecycleEventOutcome":"Azure.AI.Projects.TelephonyCallLifecycleEventOutcome","com.azure.ai.agents.models.TelephonyCallLifecycleEventReason":"Azure.AI.Projects.TelephonyCallLifecycleEventReason","com.azure.ai.agents.models.TelephonyCallLifecycleEventSource":"Azure.AI.Projects.TelephonyCallLifecycleEventSource","com.azure.ai.agents.models.TelephonyCallPhase":"Azure.AI.Projects.TelephonyCallPhase","com.azure.ai.agents.models.TelephonyCallRecord":"Azure.AI.Projects.TelephonyCallRecord","com.azure.ai.agents.models.TelephonyCallStatus":"Azure.AI.Projects.TelephonyCallStatus","com.azure.ai.agents.models.TelephonyCallSummary":"Azure.AI.Projects.TelephonyCallSummary","com.azure.ai.agents.models.TelephonyCallTimestampSource":"Azure.AI.Projects.TelephonyCallTimestampSource","com.azure.ai.agents.models.TelephonyCallTiming":"Azure.AI.Projects.TelephonyCallTiming","com.azure.ai.agents.models.TelephonyCallTrace":"Azure.AI.Projects.TelephonyCallTrace","com.azure.ai.agents.models.TelephonyCallTraceMode":"Azure.AI.Projects.TelephonyCallTraceMode","com.azure.ai.agents.models.TelephonyCallTraceStatus":"Azure.AI.Projects.TelephonyCallTraceStatus","com.azure.ai.agents.models.TelephonyOutboundDestination":"Azure.AI.Projects.TelephonyOutboundDestination","com.azure.ai.agents.models.TelephonyOutboundDestinationType":"Azure.AI.Projects.TelephonyOutboundDestinationType","com.azure.ai.agents.models.TelephonyOutboundFixedIntervalRetryPolicy":"Azure.AI.Projects.TelephonyOutboundFixedIntervalRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicy":"Azure.AI.Projects.TelephonyOutboundRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicyType":"Azure.AI.Projects.TelephonyOutboundRetryPolicyType","com.azure.ai.agents.models.TelephonyProvider":"Azure.AI.Projects.TelephonyProvider","com.azure.ai.agents.models.TelephonyTransferDestination":"Azure.AI.Projects.TelephonyTransferDestination","com.azure.ai.agents.models.TelephonyTransferDestinationKind":"Azure.AI.Projects.TelephonyTransferDestinationKind","com.azure.ai.agents.models.TelephonyTransferTarget":"Azure.AI.Projects.TelephonyTransferTarget","com.azure.ai.agents.models.TelephonyTransferTargets":"Azure.AI.Projects.TelephonyTransferTargets","com.azure.ai.agents.models.TextResponseFormatConfiguration":"OpenAI.TextResponseFormatConfiguration","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatJsonObject":"OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatText":"OpenAI.TextResponseFormatConfigurationResponseFormatText","com.azure.ai.agents.models.TextResponseFormatConfigurationType":"OpenAI.TextResponseFormatConfigurationType","com.azure.ai.agents.models.TextResponseFormatJsonSchema":"OpenAI.TextResponseFormatJsonSchema","com.azure.ai.agents.models.Tool":"OpenAI.Tool","com.azure.ai.agents.models.ToolCallStatus":"Azure.AI.Projects.ToolCallStatus","com.azure.ai.agents.models.ToolConfig":"Azure.AI.Projects.ToolConfig","com.azure.ai.agents.models.ToolProjectConnection":"Azure.AI.Projects.ToolProjectConnection","com.azure.ai.agents.models.ToolSearchExecutionType":"OpenAI.ToolSearchExecutionType","com.azure.ai.agents.models.ToolSearchTool":"OpenAI.ToolSearchToolParam","com.azure.ai.agents.models.ToolSearchToolboxTool":"Azure.AI.Projects.ToolSearchToolboxTool","com.azure.ai.agents.models.ToolType":"OpenAI.ToolType","com.azure.ai.agents.models.ToolboxDetails":"Azure.AI.Projects.ToolboxObject","com.azure.ai.agents.models.ToolboxPolicies":"Azure.AI.Projects.ToolboxPolicies","com.azure.ai.agents.models.ToolboxSearchPreviewToolboxTool":"Azure.AI.Projects.ToolboxSearchPreviewToolboxTool","com.azure.ai.agents.models.ToolboxShellContainerAutoEnvironment":"Azure.AI.Projects.ToolboxShellContainerAutoEnvironment","com.azure.ai.agents.models.ToolboxShellContainerReferenceEnvironment":"Azure.AI.Projects.ToolboxShellContainerReferenceEnvironment","com.azure.ai.agents.models.ToolboxShellEnvironment":"Azure.AI.Projects.ToolboxShellEnvironment","com.azure.ai.agents.models.ToolboxShellNetworkPolicy":"Azure.AI.Projects.ToolboxShellNetworkPolicy","com.azure.ai.agents.models.ToolboxShellNetworkPolicyDisabled":"Azure.AI.Projects.ToolboxShellNetworkPolicyDisabled","com.azure.ai.agents.models.ToolboxSkill":"Azure.AI.Projects.ToolboxSkill","com.azure.ai.agents.models.ToolboxSkillReference":"Azure.AI.Projects.ToolboxSkillReference","com.azure.ai.agents.models.ToolboxTool":"Azure.AI.Projects.ToolboxTool","com.azure.ai.agents.models.ToolboxToolType":"Azure.AI.Projects.ToolboxToolType","com.azure.ai.agents.models.ToolboxVersionDetails":"Azure.AI.Projects.ToolboxVersionObject","com.azure.ai.agents.models.ToolboxVersions":"Azure.AI.Projects.ToolboxVersions","com.azure.ai.agents.models.TranscriptTextInputTokenDetails":"OpenAI.TranscriptTextUsageTokensInputTokenDetails","com.azure.ai.agents.models.TranscriptTextUsage":"OpenAI.CreateTranscriptionResponseJsonUsage","com.azure.ai.agents.models.TranscriptTextUsageDuration":"OpenAI.TranscriptTextUsageDuration","com.azure.ai.agents.models.TranscriptTextUsageTokens":"OpenAI.TranscriptTextUsageTokens","com.azure.ai.agents.models.TranscriptTextUsageType":"OpenAI.CreateTranscriptionResponseJsonUsageType","com.azure.ai.agents.models.TranscriptionLanguage":"OpenAI.TranscriptionLanguage","com.azure.ai.agents.models.TwilioTelephonyBinding":"Azure.AI.Projects.TwilioTelephonyBinding","com.azure.ai.agents.models.TwilioTelephonyBindingListItem":"Azure.AI.Projects.TwilioTelephonyBindingListItem","com.azure.ai.agents.models.UpdateAgentDetailsOptions":"Azure.AI.Projects.patchAgentObject.Request.anonymous","com.azure.ai.agents.models.UpdateTelephonyBindingInput":"Azure.AI.Projects.UpdateTelephonyBindingRequest","com.azure.ai.agents.models.UserConversationSimulationAudioEffect":"Azure.AI.Projects.UserConversationSimulationAudioEffect","com.azure.ai.agents.models.UserConversationSimulationAudioEffectsConfiguration":"Azure.AI.Projects.UserConversationSimulationAudioEffectsConfiguration","com.azure.ai.agents.models.UserConversationSimulationConfiguration":"Azure.AI.Projects.UserConversationSimulationConfiguration","com.azure.ai.agents.models.UserConversationSimulationDefaultInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationDefaultInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationTestCase":"Azure.AI.Projects.UserConversationSimulationTestCase","com.azure.ai.agents.models.UserConversationSimulationUserBehaviorConfiguration":"Azure.AI.Projects.UserConversationSimulationUserBehaviorConfiguration","com.azure.ai.agents.models.UserProfileMemoryItem":"Azure.AI.Projects.UserProfileMemoryItem","com.azure.ai.agents.models.VersionIndicator":"Azure.AI.Projects.VersionIndicator","com.azure.ai.agents.models.VersionIndicatorType":"Azure.AI.Projects.VersionIndicatorType","com.azure.ai.agents.models.VersionRefIndicator":"Azure.AI.Projects.VersionRefIndicator","com.azure.ai.agents.models.VersionSelectionRule":"Azure.AI.Projects.VersionSelectionRule","com.azure.ai.agents.models.VersionSelector":"Azure.AI.Projects.VersionSelector","com.azure.ai.agents.models.VersionSelectorType":"Azure.AI.Projects.VersionSelectorType","com.azure.ai.agents.models.VoiceAgentAnimationConfiguration":"Azure.AI.Projects.VoiceAgentAnimationConfig","com.azure.ai.agents.models.VoiceAgentAnimationOutputType":"Azure.AI.Projects.VoiceAgentAnimationOutputType","com.azure.ai.agents.models.VoiceAgentAudioConfiguration":"Azure.AI.Projects.VoiceAgentAudioConfig","com.azure.ai.agents.models.VoiceAgentAudioInputConfiguration":"Azure.AI.Projects.VoiceAgentAudioInputConfig","com.azure.ai.agents.models.VoiceAgentAudioOutputConfiguration":"Azure.AI.Projects.VoiceAgentAudioOutputConfig","com.azure.ai.agents.models.VoiceAgentAudioTimestampType":"Azure.AI.Projects.VoiceAgentAudioTimestampType","com.azure.ai.agents.models.VoiceAgentAvatarConfiguration":"Azure.AI.Projects.VoiceAgentAvatarConfig","com.azure.ai.agents.models.VoiceAgentAvatarIceServer":"Azure.AI.Projects.VoiceAgentAvatarIceServer","com.azure.ai.agents.models.VoiceAgentAvatarOutputProtocol":"Azure.AI.Projects.VoiceAgentAvatarOutputProtocol","com.azure.ai.agents.models.VoiceAgentAvatarScene":"Azure.AI.Projects.VoiceAgentAvatarScene","com.azure.ai.agents.models.VoiceAgentAvatarType":"Azure.AI.Projects.VoiceAgentAvatarType","com.azure.ai.agents.models.VoiceAgentAvatarVideoBackground":"Azure.AI.Projects.VoiceAgentAvatarVideoBackground","com.azure.ai.agents.models.VoiceAgentAvatarVideoCrop":"Azure.AI.Projects.VoiceAgentAvatarVideoCrop","com.azure.ai.agents.models.VoiceAgentAvatarVideoParameters":"Azure.AI.Projects.VoiceAgentAvatarVideoParams","com.azure.ai.agents.models.VoiceAgentAvatarVideoResolution":"Azure.AI.Projects.VoiceAgentAvatarVideoResolution","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadEnglishTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadEnTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadMultilingualTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadMultilingualTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentDefinition":"Azure.AI.Projects.VoiceAgentDefinition","com.azure.ai.agents.models.VoiceAgentEchoCancellation":"Azure.AI.Projects.VoiceAgentEchoCancellation","com.azure.ai.agents.models.VoiceAgentEchoCancellationReferenceSource":"Azure.AI.Projects.VoiceAgentEchoCancellationReferenceSource","com.azure.ai.agents.models.VoiceAgentEndConversationSystemTool":"Azure.AI.Projects.VoiceAgentEndConversationSystemTool","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetection":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetection","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetectionModel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetectionModel","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceThresholdLevel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceThresholdLevel","com.azure.ai.agents.models.VoiceAgentFunctionTool":"Azure.AI.Projects.VoiceAgentFunctionTool","com.azure.ai.agents.models.VoiceAgentFunctionToolType1":null,"com.azure.ai.agents.models.VoiceAgentGreetingConfiguration":"Azure.AI.Projects.VoiceAgentGreetingConfig","com.azure.ai.agents.models.VoiceAgentInputTranscription":"Azure.AI.Projects.VoiceAgentInputTranscription","com.azure.ai.agents.models.VoiceAgentInputTranscriptionModel":"Azure.AI.Projects.VoiceAgentInputTranscriptionModel","com.azure.ai.agents.models.VoiceAgentInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentInterimResponseTrigger":"Azure.AI.Projects.VoiceAgentInterimResponseTrigger","com.azure.ai.agents.models.VoiceAgentLlmGeneratedGreetingConfiguration":"Azure.AI.Projects.VoiceAgentLlmGeneratedGreetingConfig","com.azure.ai.agents.models.VoiceAgentLlmInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentLlmInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentMcpTool":"Azure.AI.Projects.VoiceAgentMcpTool","com.azure.ai.agents.models.VoiceAgentNoiseReduction":"Azure.AI.Projects.VoiceAgentNoiseReduction","com.azure.ai.agents.models.VoiceAgentNoiseReductionType":"Azure.AI.Projects.VoiceAgentNoiseReductionType","com.azure.ai.agents.models.VoiceAgentRealtimeResponse":"Azure.AI.Projects.VoiceAgentRealtimeResponse","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDone","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDone","com.azure.ai.agents.models.VoiceAgentResponseAudioConfig":"TypeSpec.PickProperties","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDelta","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDone","com.azure.ai.agents.models.VoiceAgentResponseCreateOptions":"Azure.AI.Projects.VoiceAgentResponseCreateParams","com.azure.ai.agents.models.VoiceAgentResponseVideoDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseVideoDelta","com.azure.ai.agents.models.VoiceAgentRtcCallErrorDetails":"Azure.AI.Projects.VoiceAgentRtcCallErrorDetails","com.azure.ai.agents.models.VoiceAgentRtcCallErrorEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallError","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreateEvent":"Azure.AI.Projects.VoiceAgentClientEventRtcCallSdpCreate","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreatedEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallSdpCreated","com.azure.ai.agents.models.VoiceAgentSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentServerVadTurnDetection":"Azure.AI.Projects.VoiceAgentServerVadTurnDetection","com.azure.ai.agents.models.VoiceAgentSessionAvatarConfiguration":"Azure.AI.Projects.VoiceAgentSessionAvatarConfig","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectEvent":"Azure.AI.Projects.VoiceAgentClientEventSessionAvatarConnect","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarConnecting","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToIdleEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToIdle","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToSpeakingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToSpeaking","com.azure.ai.agents.models.VoiceAgentSessionIncludeOption":"Azure.AI.Projects.VoiceAgentSessionIncludeOption","com.azure.ai.agents.models.VoiceAgentSessionResponseConfiguration":"Azure.AI.Projects.VoiceAgentSessionResponseConfig","com.azure.ai.agents.models.VoiceAgentSessionSubagentAbortedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentAborted","com.azure.ai.agents.models.VoiceAgentSessionSubagentCompletedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentCompleted","com.azure.ai.agents.models.VoiceAgentSessionSubagentStartedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentStarted","com.azure.ai.agents.models.VoiceAgentSessionUpdateConfiguration":"Azure.AI.Projects.VoiceAgentSessionUpdateConfig","com.azure.ai.agents.models.VoiceAgentStaticInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentStaticInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentSubagent":"Azure.AI.Projects.VoiceAgentSubagent","com.azure.ai.agents.models.VoiceAgentSubagentAbortReason":"Azure.AI.Projects.VoiceAgentSubagentAbortReason","com.azure.ai.agents.models.VoiceAgentSubagentConfiguration":"Azure.AI.Projects.VoiceAgentSubagentConfig","com.azure.ai.agents.models.VoiceAgentSubagentResponsePolicy":"Azure.AI.Projects.VoiceAgentSubagentResponsePolicy","com.azure.ai.agents.models.VoiceAgentSystemTool":"Azure.AI.Projects.VoiceAgentSystemTool","com.azure.ai.agents.models.VoiceAgentSystemToolName":"Azure.AI.Projects.VoiceAgentSystemToolName","com.azure.ai.agents.models.VoiceAgentTemplateGreetingConfiguration":"Azure.AI.Projects.VoiceAgentTemplateGreetingConfig","com.azure.ai.agents.models.VoiceAgentTool":"Azure.AI.Projects.VoiceAgentTool","com.azure.ai.agents.models.VoiceAgentToolResponseScheduling":"Azure.AI.Projects.VoiceAgentToolResponseScheduling","com.azure.ai.agents.models.VoiceAgentToolboxTool":"Azure.AI.Projects.VoiceAgentToolboxTool","com.azure.ai.agents.models.VoiceAgentTranscriptionPhrase":"Azure.AI.Projects.VoiceAgentTranscriptionPhrase","com.azure.ai.agents.models.VoiceAgentTranscriptionWord":"Azure.AI.Projects.VoiceAgentTranscriptionWord","com.azure.ai.agents.models.VoiceAgentTransport":"Azure.AI.Projects.VoiceAgentTransport","com.azure.ai.agents.models.VoiceAgentTurnDetectionConfiguration":"Azure.AI.Projects.VoiceAgentTurnDetectionConfig","com.azure.ai.agents.models.VoiceAgentTurnDetectionType":"Azure.AI.Projects.VoiceAgentTurnDetectionType","com.azure.ai.agents.models.VoiceAgentWarningDetails":"Azure.AI.Projects.VoiceAgentServerEventWarningDetails","com.azure.ai.agents.models.VoiceAgentWarningEvent":"Azure.AI.Projects.VoiceAgentServerEventWarning","com.azure.ai.agents.models.VoiceAudioCodec":"Azure.AI.Projects.VoiceAudioCodec","com.azure.ai.agents.models.VoiceAudioContainerFormat":"Azure.AI.Projects.VoiceAudioContainerFormat","com.azure.ai.agents.models.VoiceAudioItem":"Azure.AI.Projects.VoiceAudioItem","com.azure.ai.agents.models.VoiceAudioRole":"Azure.AI.Projects.VoiceAudioRole","com.azure.ai.agents.models.VoiceConversation":"Azure.AI.Projects.VoiceConversation","com.azure.ai.agents.models.VoiceConversationEngine":"Azure.AI.Projects.VoiceConversationEngine","com.azure.ai.agents.models.VoiceConversationStatus":"Azure.AI.Projects.VoiceConversationStatus","com.azure.ai.agents.models.VoiceGeneratedAudioItem":"Azure.AI.Projects.VoiceGeneratedAudioItem","com.azure.ai.agents.models.VoiceHostedAgentConversationEngine":"Azure.AI.Projects.VoiceHostedAgentConversationEngine","com.azure.ai.agents.models.VoiceIds":"OpenAI.VoiceIdsShared","com.azure.ai.agents.models.VoiceModelType":"Azure.AI.Projects.VoiceModelType","com.azure.ai.agents.models.VoiceOutputModality":"Azure.AI.Projects.VoiceOutputModality","com.azure.ai.agents.models.VoiceRecording":"Azure.AI.Projects.VoiceRecording","com.azure.ai.agents.models.VoiceRecordingChannelLayout":"Azure.AI.Projects.VoiceRecordingChannelLayout","com.azure.ai.agents.models.VoiceResponse":"Azure.AI.Projects.VoiceResponse","com.azure.ai.agents.models.VoiceResponseAudio":"Azure.AI.Projects.VoiceResponseAudio","com.azure.ai.agents.models.VoiceResponseAudioOutput":"Azure.AI.Projects.VoiceResponseAudioOutput","com.azure.ai.agents.models.VoiceResponseObjectType":null,"com.azure.ai.agents.models.VoiceType":"Azure.AI.Projects.VoiceType","com.azure.ai.agents.models.WebIqPreviewTool":"Azure.AI.Projects.WebIQPreviewTool","com.azure.ai.agents.models.WebIqPreviewToolboxTool":"Azure.AI.Projects.WebIQPreviewToolboxTool","com.azure.ai.agents.models.WebSearchApproximateLocation":"OpenAI.WebSearchApproximateLocation","com.azure.ai.agents.models.WebSearchConfiguration":"Azure.AI.Projects.WebSearchConfiguration","com.azure.ai.agents.models.WebSearchPreviewTool":"OpenAI.WebSearchPreviewTool","com.azure.ai.agents.models.WebSearchTool":"OpenAI.WebSearchTool","com.azure.ai.agents.models.WebSearchToolFilters":"OpenAI.WebSearchToolFilters","com.azure.ai.agents.models.WebSearchToolSearchContextSize":"WebSearchToolSearchContextSizeExpandable","com.azure.ai.agents.models.WebSearchToolboxTool":"Azure.AI.Projects.WebSearchToolboxTool","com.azure.ai.agents.models.WorkIqPreviewTool":"Azure.AI.Projects.WorkIQPreviewTool","com.azure.ai.agents.models.WorkIqPreviewToolboxTool":"Azure.AI.Projects.WorkIQPreviewToolboxTool","com.azure.ai.agents.models.WorkflowAgentDefinition":"Azure.AI.Projects.WorkflowAgentDefinition"},"generatedFiles":["src/main/java/com/azure/ai/agents/AgentsAsyncClient.java","src/main/java/com/azure/ai/agents/AgentsClient.java","src/main/java/com/azure/ai/agents/AgentsClientBuilder.java","src/main/java/com/azure/ai/agents/AgentsServiceVersion.java","src/main/java/com/azure/ai/agents/BetaAgentsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaAgentsClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresAsyncClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java","src/main/java/com/azure/ai/agents/ToolboxesAsyncClient.java","src/main/java/com/azure/ai/agents/ToolboxesClient.java","src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java","src/main/java/com/azure/ai/agents/implementation/AgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaAgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaMemoryStoresImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java","src/main/java/com/azure/ai/agents/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/agents/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/agents/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/PollingUtils.java","src/main/java/com/azure/ai/agents/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/ToolboxesImpl.java","src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromCodeContent.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentOptions.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateSessionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateToolboxVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/GetMicrosoft365AppPackageRequest.java","src/main/java/com/azure/ai/agents/implementation/models/ListMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/PublishAgentToMicrosoft365Request.java","src/main/java/com/azure/ai/agents/implementation/models/ReplaceTelephonyTransferTargetsRequest.java","src/main/java/com/azure/ai/agents/implementation/models/SearchMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/TransferTelephonyCallRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxInput.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxRequest.java","src/main/java/com/azure/ai/agents/implementation/models/package-info.java","src/main/java/com/azure/ai/agents/implementation/package-info.java","src/main/java/com/azure/ai/agents/models/A2APreviewTool.java","src/main/java/com/azure/ai/agents/models/A2APreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/A2AProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/A2AProtocolVersion.java","src/main/java/com/azure/ai/agents/models/A2ATool.java","src/main/java/com/azure/ai/agents/models/A2AToolCall.java","src/main/java/com/azure/ai/agents/models/A2AToolCallOutput.java","src/main/java/com/azure/ai/agents/models/A2AToolboxTool.java","src/main/java/com/azure/ai/agents/models/AISearchIndexResource.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolAccessBoundary.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReference.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReferenceType.java","src/main/java/com/azure/ai/agents/models/AgentCard.java","src/main/java/com/azure/ai/agents/models/AgentCardSkill.java","src/main/java/com/azure/ai/agents/models/AgentDefinition.java","src/main/java/com/azure/ai/agents/models/AgentDetails.java","src/main/java/com/azure/ai/agents/models/AgentDetailsVersions.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationSchemeType.java","src/main/java/com/azure/ai/agents/models/AgentEndpointConfig.java","src/main/java/com/azure/ai/agents/models/AgentEndpointProtocol.java","src/main/java/com/azure/ai/agents/models/AgentHarness.java","src/main/java/com/azure/ai/agents/models/AgentIdentity.java","src/main/java/com/azure/ai/agents/models/AgentIdentityStatus.java","src/main/java/com/azure/ai/agents/models/AgentKind.java","src/main/java/com/azure/ai/agents/models/AgentObjectType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationAgentCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationBaselineAgentConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateEvaluation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateExpand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidatePromotionInfo.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateStatus.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationBase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCostEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationDataSourceType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateBand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateInputs.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSetType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluatorReference.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationFoundryAgentTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationGoal.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationInstructionsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJob.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobLatency.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobTokenUsage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationPromptCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationResultCandidateSummary.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkill.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkillsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSpace.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStageEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionTestCase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTerminationReason.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationToolsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentReference.java","src/main/java/com/azure/ai/agents/models/AgentSessionResource.java","src/main/java/com/azure/ai/agents/models/AgentSessionStatus.java","src/main/java/com/azure/ai/agents/models/AgentState.java","src/main/java/com/azure/ai/agents/models/AgentStateSource.java","src/main/java/com/azure/ai/agents/models/AgentVersionDetails.java","src/main/java/com/azure/ai/agents/models/AgentVersionStatus.java","src/main/java/com/azure/ai/agents/models/ApiError.java","src/main/java/com/azure/ai/agents/models/ApplyPatchToolParameter.java","src/main/java/com/azure/ai/agents/models/ApproximateLocation.java","src/main/java/com/azure/ai/agents/models/AudioTranscription.java","src/main/java/com/azure/ai/agents/models/AudioTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/AutoCodeInterpreterToolParameter.java","src/main/java/com/azure/ai/agents/models/AzureAISearchQueryType.java","src/main/java/com/azure/ai/agents/models/AzureAISearchTool.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCall.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolResource.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseDetails.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseOptions.java","src/main/java/com/azure/ai/agents/models/AzureFunctionBinding.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinitionDetails.java","src/main/java/com/azure/ai/agents/models/AzureFunctionStorageQueue.java","src/main/java/com/azure/ai/agents/models/AzureFunctionTool.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCall.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureUserSecurityContext.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCall.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingTool.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BotServiceAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceRbacAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceTenantAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCall.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolConnectionParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolboxTool.java","src/main/java/com/azure/ai/agents/models/CallableToolAllowedCaller.java","src/main/java/com/azure/ai/agents/models/CaptureStructuredOutputsTool.java","src/main/java/com/azure/ai/agents/models/ChatSummaryMemoryItem.java","src/main/java/com/azure/ai/agents/models/CodeConfiguration.java","src/main/java/com/azure/ai/agents/models/CodeDependencyResolution.java","src/main/java/com/azure/ai/agents/models/CodeFileDetails.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterTool.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolboxTool.java","src/main/java/com/azure/ai/agents/models/ComputerEnvironment.java","src/main/java/com/azure/ai/agents/models/ComputerTool.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewTool.java","src/main/java/com/azure/ai/agents/models/ContainerAutoParameter.java","src/main/java/com/azure/ai/agents/models/ContainerConfiguration.java","src/main/java/com/azure/ai/agents/models/ContainerMemoryLimit.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyAllowlistParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDisabledParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDomainSecretParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParamType.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParameter.java","src/main/java/com/azure/ai/agents/models/ContainerSkill.java","src/main/java/com/azure/ai/agents/models/ContainerSkillType.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeContent.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeMetadata.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionOptions.java","src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensibilityTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java","src/main/java/com/azure/ai/agents/models/CreateTwilioTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CustomGrammarFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomTextFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormat.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormatType.java","src/main/java/com/azure/ai/agents/models/CustomToolParameter.java","src/main/java/com/azure/ai/agents/models/DigitalWorkerType.java","src/main/java/com/azure/ai/agents/models/EntraAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/EvaluationAzureStandardVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/ExternalAgentDefinition.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCall.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCallOutput.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolParameters.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/FileSearchTool.java","src/main/java/com/azure/ai/agents/models/FileSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/FixedRatioVersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironment.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironmentType.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentContainerReferenceParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentLocalEnvironmentParameter.java","src/main/java/com/azure/ai/agents/models/FunctionTool.java","src/main/java/com/azure/ai/agents/models/GetMicrosoft365AppPackageOptions.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotBuiltInTool.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotHarness.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java","src/main/java/com/azure/ai/agents/models/GrammarSyntax.java","src/main/java/com/azure/ai/agents/models/HeaderTelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/HybridSearchOptions.java","src/main/java/com/azure/ai/agents/models/ImageGenActionEnum.java","src/main/java/com/azure/ai/agents/models/ImageGenTool.java","src/main/java/com/azure/ai/agents/models/ImageGenToolBackground.java","src/main/java/com/azure/ai/agents/models/ImageGenToolInputImageMask.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModel.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModeration.java","src/main/java/com/azure/ai/agents/models/ImageGenToolOutputFormat.java","src/main/java/com/azure/ai/agents/models/ImageGenToolQuality.java","src/main/java/com/azure/ai/agents/models/ImageGenToolSize.java","src/main/java/com/azure/ai/agents/models/IncludeEnum.java","src/main/java/com/azure/ai/agents/models/InlineSkillParameter.java","src/main/java/com/azure/ai/agents/models/InlineSkillSourceParameter.java","src/main/java/com/azure/ai/agents/models/InputFidelity.java","src/main/java/com/azure/ai/agents/models/InvocationsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/InvocationsWsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/JobStatus.java","src/main/java/com/azure/ai/agents/models/ListMemoriesOptions.java","src/main/java/com/azure/ai/agents/models/LocalShellToolParameter.java","src/main/java/com/azure/ai/agents/models/LocalSkillParameter.java","src/main/java/com/azure/ai/agents/models/ManagedAgentIdentityBlueprintReference.java","src/main/java/com/azure/ai/agents/models/McpListToolsTool.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolAnnotations.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolInputSchema.java","src/main/java/com/azure/ai/agents/models/McpProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/McpTool.java","src/main/java/com/azure/ai/agents/models/McpToolConnectorId.java","src/main/java/com/azure/ai/agents/models/McpToolFilter.java","src/main/java/com/azure/ai/agents/models/McpToolRequireApproval.java","src/main/java/com/azure/ai/agents/models/McpToolboxTool.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCallOutput.java","src/main/java/com/azure/ai/agents/models/MemoryItem.java","src/main/java/com/azure/ai/agents/models/MemoryItemKind.java","src/main/java/com/azure/ai/agents/models/MemoryOperation.java","src/main/java/com/azure/ai/agents/models/MemoryOperationKind.java","src/main/java/com/azure/ai/agents/models/MemorySearchItem.java","src/main/java/com/azure/ai/agents/models/MemorySearchOptions.java","src/main/java/com/azure/ai/agents/models/MemorySearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/MemorySearchToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultOptions.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreKind.java","src/main/java/com/azure/ai/agents/models/MemoryStoreObjectType.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsage.java","src/main/java/com/azure/ai/agents/models/MemoryStoreSearchResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateCompletedResult.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateStatus.java","src/main/java/com/azure/ai/agents/models/Microsoft365PermissionScopes.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishDefaults.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishResult.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishScope.java","src/main/java/com/azure/ai/agents/models/MicrosoftFabricPreviewTool.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttempt.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptError.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptResult.java","src/main/java/com/azure/ai/agents/models/ModelRouterDetails.java","src/main/java/com/azure/ai/agents/models/ModelRouterMode.java","src/main/java/com/azure/ai/agents/models/ModelSamplingParameters.java","src/main/java/com/azure/ai/agents/models/ModelSelectionDetails.java","src/main/java/com/azure/ai/agents/models/NamespaceTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAnonymousAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthType.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiTool.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCall.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCallOutput.java","src/main/java/com/azure/ai/agents/models/OpenApiToolboxTool.java","src/main/java/com/azure/ai/agents/models/OptimizationContext.java","src/main/java/com/azure/ai/agents/models/OptimizationContextType.java","src/main/java/com/azure/ai/agents/models/OtlpTelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/PageOrder.java","src/main/java/com/azure/ai/agents/models/ProceduralMemoryItem.java","src/main/java/com/azure/ai/agents/models/ProgrammaticToolCallingParameter.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinitionTextOptions.java","src/main/java/com/azure/ai/agents/models/PromptOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolVersionRecord.java","src/main/java/com/azure/ai/agents/models/PstnTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/PublishAgentToMicrosoft365Options.java","src/main/java/com/azure/ai/agents/models/PublishApprovalStatus.java","src/main/java/com/azure/ai/agents/models/RaiConfig.java","src/main/java/com/azure/ai/agents/models/RaiInvocationContentType.java","src/main/java/com/azure/ai/agents/models/RaiInvocationModeration.java","src/main/java/com/azure/ai/agents/models/RaiInvocationResponseMode.java","src/main/java/com/azure/ai/agents/models/RaiSseTextSelector.java","src/main/java/com/azure/ai/agents/models/RankerVersionType.java","src/main/java/com/azure/ai/agents/models/RankingOptions.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormatType.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItem.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAssistantMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeleteEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCall.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCallOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionSegmentEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessageType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemObjectType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrieveEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrievedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemSystemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemUserMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeErrorEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferAppendEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommitEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommittedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferDtmfReceivedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferTimeoutTriggeredEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalInput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpErrorType.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpHttpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListTools.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpProtocolError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolCall.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolExecutionError.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimePcmAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmaAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmuAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeRateLimitsUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCancelEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPart.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfigurationBase.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreateRequestGAAudioOutputVoice.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionTracingConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionType.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/ReminderPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ResponseFormatJsonSchemaInner.java","src/main/java/com/azure/ai/agents/models/ResponseUsageInputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponseUsageOutputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponsesProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingTraceEntry.java","src/main/java/com/azure/ai/agents/models/SearchContentType.java","src/main/java/com/azure/ai/agents/models/SearchContextSize.java","src/main/java/com/azure/ai/agents/models/SessionAffinityConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDecision.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDetails.java","src/main/java/com/azure/ai/agents/models/SessionAffinityMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinityRequestMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinitySource.java","src/main/java/com/azure/ai/agents/models/SessionConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionDirectoryEntry.java","src/main/java/com/azure/ai/agents/models/SessionFileWriteResult.java","src/main/java/com/azure/ai/agents/models/SessionLogEvent.java","src/main/java/com/azure/ai/agents/models/SessionLogEventType.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolParameters.java","src/main/java/com/azure/ai/agents/models/SharepointPreviewTool.java","src/main/java/com/azure/ai/agents/models/ShellToolboxTool.java","src/main/java/com/azure/ai/agents/models/SipTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/SkillReference.java","src/main/java/com/azure/ai/agents/models/SkillReferenceParameter.java","src/main/java/com/azure/ai/agents/models/SteeringPromptOptimizationContext.java","src/main/java/com/azure/ai/agents/models/StructuredInputDefinition.java","src/main/java/com/azure/ai/agents/models/StructuredOutputDefinition.java","src/main/java/com/azure/ai/agents/models/TargetAttribute.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TeamsTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelemetryConfig.java","src/main/java/com/azure/ai/agents/models/TelemetryDataKind.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuthType.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointKind.java","src/main/java/com/azure/ai/agents/models/TelemetryTransportProtocol.java","src/main/java/com/azure/ai/agents/models/TelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallDurationBasis.java","src/main/java/com/azure/ai/agents/models/TelephonyCallEndReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobCancellation.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobSchedule.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobTerminalReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEvent.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventName.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventOutcome.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallPhase.java","src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java","src/main/java/com/azure/ai/agents/models/TelephonyCallStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallSummary.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTimestampSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTiming.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTrace.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceMode.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestinationType.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundFixedIntervalRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicyType.java","src/main/java/com/azure/ai/agents/models/TelephonyProvider.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestinationKind.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTarget.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTargets.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfiguration.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatJsonObject.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatText.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationType.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatJsonSchema.java","src/main/java/com/azure/ai/agents/models/Tool.java","src/main/java/com/azure/ai/agents/models/ToolCallStatus.java","src/main/java/com/azure/ai/agents/models/ToolConfig.java","src/main/java/com/azure/ai/agents/models/ToolProjectConnection.java","src/main/java/com/azure/ai/agents/models/ToolSearchExecutionType.java","src/main/java/com/azure/ai/agents/models/ToolSearchTool.java","src/main/java/com/azure/ai/agents/models/ToolSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxPolicies.java","src/main/java/com/azure/ai/agents/models/ToolboxSearchPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerAutoEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerReferenceEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicy.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicyDisabled.java","src/main/java/com/azure/ai/agents/models/ToolboxSkill.java","src/main/java/com/azure/ai/agents/models/ToolboxSkillReference.java","src/main/java/com/azure/ai/agents/models/ToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxVersionDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxVersions.java","src/main/java/com/azure/ai/agents/models/TranscriptTextInputTokenDetails.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsage.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageDuration.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageTokens.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageType.java","src/main/java/com/azure/ai/agents/models/TranscriptionLanguage.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/UpdateAgentDetailsOptions.java","src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffect.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffectsConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationDefaultInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationTestCase.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationUserBehaviorConfiguration.java","src/main/java/com/azure/ai/agents/models/UserProfileMemoryItem.java","src/main/java/com/azure/ai/agents/models/VersionIndicator.java","src/main/java/com/azure/ai/agents/models/VersionIndicatorType.java","src/main/java/com/azure/ai/agents/models/VersionRefIndicator.java","src/main/java/com/azure/ai/agents/models/VersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/VersionSelector.java","src/main/java/com/azure/ai/agents/models/VersionSelectorType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationOutputType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioInputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioOutputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioTimestampType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarIceServer.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarOutputProtocol.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarScene.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoBackground.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoCrop.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoParameters.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoResolution.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadEnglishTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadMultilingualTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentDefinition.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellation.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellationReferenceSource.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndConversationSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetectionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceThresholdLevel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionToolType1.java","src/main/java/com/azure/ai/agents/models/VoiceAgentGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscription.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseTrigger.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmGeneratedGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReduction.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReductionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioConfig.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseVideoDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreateEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreatedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToIdleEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToSpeakingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionIncludeOption.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentAbortedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentCompletedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentStartedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionUpdateConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentStaticInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentAbortReason.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentResponsePolicy.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemToolName.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTemplateGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolResponseScheduling.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolboxTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionPhrase.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionWord.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTransport.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAudioCodec.java","src/main/java/com/azure/ai/agents/models/VoiceAudioContainerFormat.java","src/main/java/com/azure/ai/agents/models/VoiceAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceAudioRole.java","src/main/java/com/azure/ai/agents/models/VoiceConversation.java","src/main/java/com/azure/ai/agents/models/VoiceConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceConversationStatus.java","src/main/java/com/azure/ai/agents/models/VoiceGeneratedAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceHostedAgentConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceIds.java","src/main/java/com/azure/ai/agents/models/VoiceModelType.java","src/main/java/com/azure/ai/agents/models/VoiceOutputModality.java","src/main/java/com/azure/ai/agents/models/VoiceRecording.java","src/main/java/com/azure/ai/agents/models/VoiceRecordingChannelLayout.java","src/main/java/com/azure/ai/agents/models/VoiceResponse.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudio.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudioOutput.java","src/main/java/com/azure/ai/agents/models/VoiceResponseObjectType.java","src/main/java/com/azure/ai/agents/models/VoiceType.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WebSearchApproximateLocation.java","src/main/java/com/azure/ai/agents/models/WebSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebSearchTool.java","src/main/java/com/azure/ai/agents/models/WebSearchToolFilters.java","src/main/java/com/azure/ai/agents/models/WebSearchToolSearchContextSize.java","src/main/java/com/azure/ai/agents/models/WebSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkflowAgentDefinition.java","src/main/java/com/azure/ai/agents/models/package-info.java","src/main/java/com/azure/ai/agents/package-info.java","src/main/java/module-info.java"]}
\ No newline at end of file
diff --git a/sdk/ai/azure-ai-agents/tsp-location.yaml b/sdk/ai/azure-ai-agents/tsp-location.yaml
index 0325a608658e..cb0f17d78173 100644
--- a/sdk/ai/azure-ai-agents/tsp-location.yaml
+++ b/sdk/ai/azure-ai-agents/tsp-location.yaml
@@ -1,5 +1,5 @@
 directory: specification/ai-foundry/data-plane/Foundry/src/sdk-java-azure-ai-agents
-commit: 984af499034be2d021198bedc493ecdc2530409e
+commit: 5b55ea4d7c1a18676f3f84011aef76f45a535393
 repo: Azure/azure-rest-api-specs
 additionalDirectories:
   - specification/ai-foundry/data-plane/Foundry/src/agents

From 25773dcdc7713aa730ddb1b3a460fdd19b37ec35 Mon Sep 17 00:00:00 2001
From: Kaylie <50653231+kaylieee@users.noreply.github.com>
Date: Fri, 16 Oct 2026 13:13:15 -0700
Subject: [PATCH 07/13] Implement Tracing (#50743)

* Add GenAI tracing POC for azure-ai-agents createAgentVersion

Proof of concept re-implementing agent tracing the azure-core way, modeled on
azure-ai-inference's ChatCompletionClientTracer:

- New implementation.telemetry.AgentsClientTracer emits OpenTelemetry GenAI
  semantic-convention spans for createAgentVersion (sync + async).
- Per-client Tracer built by AgentsClientBuilder from
  ClientOptions.getTracingOptions() via TracerProvider (no global static state,
  no public opt-in API).
- Content gated by AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED (off by default).
- Library version sourced from azure-ai-agents.properties (not hardcoded).
- Endpoint injected via constructor (immutable), consistent across clients.
- Unit tests use an in-memory OpenTelemetry SDK; assert span attributes, content
  gating, and error propagation without swallowing exceptions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Expand GenAI tracing POC to feature parity with PR #49434

Port the full tracing feature set from PR #49434 into the idiomatic per-client
architecture (implementation.telemetry), keeping features close to the original
while fixing the repo best-practice issues:

Telemetry engine (per-client, no global static):
- GenAiInstrumentation holds the azure-core Tracer + Meter (built by the builder
  from ClientOptions tracing/metrics options), content flag, host/port, and the
  GenAI duration/token histograms.
- GenAiTracingScope is a per-op span with the close()/nanoTime metric bugs fixed.
- GenAiMessageFormatter gates content via a parameter (formatToolCallOutput fixed).

Coverage:
- create_agent (prompt/hosted/workflow attributes, gen_ai.agent.workflow event,
  agent id/version enrichment) - sync + async.
- chat / invoke_agent response tracing - sync + streaming (TracedStreamIterable +
  ResponseAccumulator), with model/token/message/finish-reason/conversation attrs
  and gen_ai.workflow.action events.
- create_conversation span.
- Metrics: gen_ai.client.operation.duration and gen_ai.client.token.usage.
- Content gated by AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED (off by default).

Also: GenAiAgentTracingTest + GenAiMessageFormatterTest (14 tests, in-memory OTel,
no exception swallowing); TracingSample + CI-verified README snippet; CHANGELOG.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add async response tracing, port tracing samples, add TRACING_NOTES.md

- ResponsesAsyncClient: trace createAzureResponse (Mono) and
  createStreamingAzureResponse (Flux) via new GenAiResponseTracing async methods
  (Mono/Flux.usingWhen); add createConversation/deleteConversation.
- GenAiResponseTracing: add traceResponseAsync + traceStreamingResponseAsync,
  share request-attribute extraction (ResponseSpanParams/startResponseScope), and
  reuse recordResponseAttributes for both sync-streaming and async-streaming
  finalization (TracedStreamIterable simplified).
- Samples: port TracingConsoleSample and TracingAzureMonitorSample to the
  idiomatic API - no enableGenAiTracing()/disableGenAiTracing() opt-in; tracing
  activates from the configured OpenTelemetry. Added test-scope deps
  (opentelemetry-exporter-logging, opentelemetry-sdk-extension-autoconfigure,
  azure-monitor-opentelemetry-autoconfigure).
- TRACING_NOTES.md: document design decisions and open questions - toggle vs
  config-driven activation, customized-generated-methods vs traced* variants vs
  codegen-customization weaving, async HTTP-span parenting, gen_ai.system vs
  provider.name, metrics/response-path test gaps, and more.

Validated: compile (Java 8 + 21), 14 telemetry tests, 0 checkstyle violations,
samples test-compile.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* restored changelog entries for tracing

* Created roadmap.md

* Added ADR document

* Add GenAI tracing for current agents APIs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c2d020f5-af8b-42f8-8fe6-0b79451e6a29

* Replace tracing ADR with parity gap tracker

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c2d020f5-af8b-42f8-8fe6-0b79451e6a29

* Align GenAI tracing with Python telemetry

Add Python-compatible feature gates, metrics, raw response tracing, and raw stream lifecycle coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c2d020f5-af8b-42f8-8fe6-0b79451e6a29

* Harden GenAI event serialization

Use azure-json for structured telemetry attributes, expand SDK-local fixture and edge-case coverage, and clarify Python propagation parity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c2d020f5-af8b-42f8-8fe6-0b79451e6a29

* fix bad merges

* clean regen

* Cleanup tracing (#50764)

* use azure core uuid

* check enabled before build attributes

* style

* remove dev artifacts

* cspell

* fix links

* bump dependencies

* fix token fetch

* Remove conversation wrapper ops (#50808)

* bump projects dependency to match agents

---------

Co-authored-by: Jose Alvarez 
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c2d020f5-af8b-42f8-8fe6-0b79451e6a29
---
 sdk/ai/azure-ai-agents/CHANGELOG.md           |   7 +
 sdk/ai/azure-ai-agents/README.md              |  38 +
 sdk/ai/azure-ai-agents/pom.xml                |  49 ++
 .../azure/ai/agents/AgentsAsyncClient.java    |  33 +-
 .../com/azure/ai/agents/AgentsClient.java     |  29 +-
 .../azure/ai/agents/AgentsClientBuilder.java  |  71 +-
 .../azure/ai/agents/ResponsesAsyncClient.java |  47 +-
 .../com/azure/ai/agents/ResponsesClient.java  |  47 +-
 .../implementation/OpenAIJsonHelper.java      |  59 ++
 .../implementation/http/HttpClientHelper.java |  41 +-
 .../http/OpenAITracingContextBridge.java      |  62 ++
 .../telemetry/GenAiAgentTracing.java          | 185 ++++
 .../telemetry/GenAiConstants.java             |  95 +++
 .../telemetry/GenAiInstrumentation.java       | 196 +++++
 .../telemetry/GenAiMessageFormatter.java      | 166 ++++
 .../telemetry/GenAiResponseTracing.java       | 794 ++++++++++++++++++
 .../telemetry/GenAiTracingScope.java          | 241 ++++++
 .../telemetry/TracedRawStreamingResponse.java | 169 ++++
 .../telemetry/TracedStreamIterable.java       | 112 +++
 .../ai/agents/TracingAzureMonitorSample.java  |  98 +++
 .../azure/ai/agents/TracingConsoleSample.java |  87 ++
 .../com/azure/ai/agents/TracingSample.java    |  49 ++
 .../http/HttpClientHelperTests.java           |  36 +
 .../telemetry/GenAiAgentTracingTest.java      | 279 ++++++
 .../telemetry/GenAiMessageFormatterTest.java  | 143 ++++
 .../telemetry/GenAiMetricsTest.java           | 124 +++
 .../telemetry/GenAiResponseTracingTest.java   | 418 +++++++++
 sdk/ai/azure-ai-projects/pom.xml              |   2 +-
 sdk/ai/cspell.yml                             |   1 +
 29 files changed, 3614 insertions(+), 64 deletions(-)
 create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAITracingContextBridge.java
 create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiAgentTracing.java
 create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiConstants.java
 create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiInstrumentation.java
 create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiMessageFormatter.java
 create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiResponseTracing.java
 create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiTracingScope.java
 create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/TracedRawStreamingResponse.java
 create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/TracedStreamIterable.java
 create mode 100644 sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingAzureMonitorSample.java
 create mode 100644 sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingConsoleSample.java
 create mode 100644 sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingSample.java
 create mode 100644 sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiAgentTracingTest.java
 create mode 100644 sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiMessageFormatterTest.java
 create mode 100644 sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiMetricsTest.java
 create mode 100644 sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiResponseTracingTest.java

diff --git a/sdk/ai/azure-ai-agents/CHANGELOG.md b/sdk/ai/azure-ai-agents/CHANGELOG.md
index 72dfd8bf4002..19fab8b58a95 100644
--- a/sdk/ai/azure-ai-agents/CHANGELOG.md
+++ b/sdk/ai/azure-ai-agents/CHANGELOG.md
@@ -2,6 +2,13 @@
 
 ## 2.8.0-beta.1 (Unreleased)
 
+- Added experimental OpenTelemetry GenAI tracing for agent and response operations, following the OpenTelemetry GenAI semantic conventions. Set `AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true` to enable the experimental instrumentation; there is no programmatic opt-in call or process-global mutable state. Tracing/metrics are configured per client through `AgentsClientBuilder.clientOptions(...)` (`TracingOptions` / `MetricsOptions`), and message/agent content is only captured when `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true` (off by default). The former `AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED` setting remains a compatibility fallback. Coverage:
+    - All current `AgentsClient.createAgentVersion` / `AgentsAsyncClient.createAgentVersion` convenience overloads — `create_agent` spans with prompt/hosted agent attributes and the created agent id/version. Retiring workflow-agent telemetry is intentionally excluded.
+    - `ResponsesClient.createAzureResponse` and `createStreamingAzureResponse`, including their asynchronous equivalents — `chat` / `invoke_agent` spans with request/response model, token usage, input/output messages, finish reasons, and conversation id (streaming spans stay open until completion, error, cancellation, or explicit close).
+    - Raw-response create and streaming protocol methods, including synchronous and asynchronous lifecycle handling and direct HTTP parenting.
+    - `ResponsesClient.createConversation` and `ResponsesAsyncClient.createConversation` — `create_conversation` spans that surround the service call and record its result or failure.
+    - Metrics: `gen_ai.client.operation.duration` and `gen_ai.client.token.usage`.
+
 ### Features Added
 
 ### Breaking Changes
diff --git a/sdk/ai/azure-ai-agents/README.md b/sdk/ai/azure-ai-agents/README.md
index ef1b417e57f1..1bf24482a1cc 100644
--- a/sdk/ai/azure-ai-agents/README.md
+++ b/sdk/ai/azure-ai-agents/README.md
@@ -1115,6 +1115,44 @@ If there are significant differences, API calls may fail due to incompatibility.
 
 Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy.
 
+## Tracing
+
+`azure-ai-agents` emits experimental [OpenTelemetry GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/) spans
+and metrics for agent creation, response (`chat` / `invoke_agent`) and conversation operations. To use this
+experimental feature, set `AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true` and configure an OpenTelemetry implementation
+for the client through `ClientOptions` or globally. There is no programmatic opt-in call or process-global mutable
+tracing state. Customer-controlled prompts, responses, messages, instructions, function arguments, tool results, and
+equivalent agent content are omitted unless you also set
+`OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`. Review your privacy requirements before enabling content
+recording. The former `AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED` setting remains available as a compatibility
+fallback when the OpenTelemetry setting is absent.
+
+Typed and raw-response methods are covered, including synchronous and
+asynchronous streaming. Streaming spans remain open until the stream completes,
+fails, is cancelled, or is explicitly closed.
+
+```java com.azure.ai.agents.tracing
+// Configure any OpenTelemetry SDK (exporters, sampling, etc.) and pass it through ClientOptions. The client
+// then emits GenAI spans (create_agent, chat / invoke_agent, create_conversation) and metrics automatically.
+OpenTelemetrySdk openTelemetry = OpenTelemetrySdk.builder().build();
+AgentsClient agentsClient = new AgentsClientBuilder().endpoint(endpoint)
+    .credential(new DefaultAzureCredentialBuilder().build())
+    .clientOptions(new ClientOptions()
+        .setTracingOptions(new OpenTelemetryTracingOptions().setOpenTelemetry(openTelemetry)))
+    .buildAgentsClient();
+
+AgentDefinition definition
+    = new PromptAgentDefinition("gpt-4o").setInstructions("You are a helpful assistant.");
+AgentVersionDetails agent = agentsClient.createAgentVersion("my-agent", definition);
+System.out.printf("Created agent %s (traced).%n", agent.getName());
+```
+
+See [`TracingSample.java`](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingSample.java) for a runnable example.
+To inspect exported traces in the Foundry tracing UI, connect the Foundry project to an Application Insights resource
+and configure an Azure Monitor OpenTelemetry exporter. See
+[`TracingAzureMonitorSample.java`](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingAzureMonitorSample.java) for the exporter
+setup.
+
 ## Troubleshooting
 
 ### Enable client logging
diff --git a/sdk/ai/azure-ai-agents/pom.xml b/sdk/ai/azure-ai-agents/pom.xml
index f513ad6239e1..d2a81ac4afc1 100644
--- a/sdk/ai/azure-ai-agents/pom.xml
+++ b/sdk/ai/azure-ai-agents/pom.xml
@@ -51,6 +51,8 @@
       --add-reads com.azure.ai.agents=java.desktop
       --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
       --add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
+      --add-reads com.azure.ai.agents=com.azure.core.tracing.opentelemetry
+      --add-reads com.azure.ai.agents=com.azure.core.metrics.opentelemetry
     
   
   
@@ -65,6 +67,11 @@
       azure-core
       1.60.0 
     
+    
+      com.azure
+      azure-json
+      1.5.1 
+    
     
       com.azure
       azure-core-http-netty
@@ -136,6 +143,48 @@
       1.27.0-beta.19 
       test
     
+    
+      com.azure
+      azure-core-tracing-opentelemetry
+      1.0.0-beta.67 
+      test
+    
+    
+      com.azure
+      azure-core-metrics-opentelemetry
+      1.0.0-beta.40 
+      test
+    
+    
+      io.opentelemetry
+      opentelemetry-sdk
+      1.65.0 
+      test
+    
+    
+      io.opentelemetry
+      opentelemetry-sdk-testing
+      1.65.0 
+      test
+    
+    
+      io.opentelemetry
+      opentelemetry-exporter-logging
+      1.65.0 
+      test
+    
+    
+      io.opentelemetry
+      opentelemetry-sdk-extension-autoconfigure
+      1.65.0 
+      test
+    
+    
+      com.azure
+      azure-monitor-opentelemetry-autoconfigure
+      1.8.0 
+      test
+    
 
   
 
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsAsyncClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsAsyncClient.java
index dc725a93db44..9b5a7fa44bc6 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsAsyncClient.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsAsyncClient.java
@@ -18,6 +18,7 @@
 import com.azure.ai.agents.implementation.models.PublishAgentToMicrosoft365Request;
 import com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest;
 import com.azure.ai.agents.implementation.models.UpdateAgentRequest;
+import com.azure.ai.agents.implementation.telemetry.GenAiAgentTracing;
 import com.azure.ai.agents.implementation.utils.FileUtils;
 import com.azure.ai.agents.models.AgentBlueprintReference;
 import com.azure.ai.agents.models.AgentDefinition;
@@ -83,6 +84,8 @@ public final class AgentsAsyncClient {
     @Generated
     private final AgentsImpl serviceClient;
 
+    private final GenAiAgentTracing tracer;
+
     /**
      * Get an agent
      *
@@ -1029,10 +1032,11 @@ Mono updateAgent(String agentName, AgentDefinition definition) {
      * Initializes an instance of AgentsAsyncClient class.
      *
      * @param serviceClient the service client implementation.
+     * @param tracer the tracer used to emit GenAI spans for agent operations.
      */
-    @Generated
-    AgentsAsyncClient(AgentsImpl serviceClient) {
+    AgentsAsyncClient(AgentsImpl serviceClient, GenAiAgentTracing tracer) {
         this.serviceClient = serviceClient;
+        this.tracer = tracer;
     }
 
     /**
@@ -2281,9 +2285,10 @@ public Mono createAgentVersion(String agentName, AgentDefin
         RequestOptions requestOptions = new RequestOptions();
         CreateAgentVersionRequest createAgentVersionRequestObj = new CreateAgentVersionRequest(definition);
         BinaryData createAgentVersionRequest = BinaryData.fromObject(createAgentVersionRequestObj);
-        return createAgentVersionWithResponse(agentName, createAgentVersionRequest, requestOptions)
-            .flatMap(FluxUtil::toMono)
-            .map(protocolMethodData -> protocolMethodData.toObject(AgentVersionDetails.class));
+        return tracer.traceCreateAgentVersionAsync(agentName, definition,
+            (request, options) -> createAgentVersionWithResponse(agentName, request, options).flatMap(FluxUtil::toMono)
+                .map(protocolMethodData -> protocolMethodData.toObject(AgentVersionDetails.class)),
+            createAgentVersionRequest, requestOptions);
     }
 
     /**
@@ -2312,14 +2317,15 @@ public Mono createAgentVersion(String agentName, AgentDefin
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono createAgentVersion(String agentName, AgentDefinition definition,
         Map metadata, String description) {
-        // Generated convenience method for createAgentVersionWithResponse
+        // Customized convenience method for createAgentVersionWithResponse (removed @Generated to add tracing).
         RequestOptions requestOptions = new RequestOptions();
         CreateAgentVersionRequest createAgentVersionRequestObj
             = new CreateAgentVersionRequest(definition).setMetadata(metadata).setDescription(description);
         BinaryData createAgentVersionRequest = BinaryData.fromObject(createAgentVersionRequestObj);
-        return createAgentVersionWithResponse(agentName, createAgentVersionRequest, requestOptions)
-            .flatMap(FluxUtil::toMono)
-            .map(protocolMethodData -> protocolMethodData.toObject(AgentVersionDetails.class));
+        return tracer.traceCreateAgentVersionAsync(agentName, definition,
+            (request, options) -> createAgentVersionWithResponse(agentName, request, options).flatMap(FluxUtil::toMono)
+                .map(protocolMethodData -> protocolMethodData.toObject(AgentVersionDetails.class)),
+            createAgentVersionRequest, requestOptions);
     }
 
     /**
@@ -2342,12 +2348,13 @@ public Mono createAgentVersion(String agentName, AgentDefin
     @ServiceMethod(returns = ReturnType.SINGLE)
     public Mono createAgentVersion(String agentName,
         CreateAgentVersionInput createAgentVersionInput) {
-        // Generated convenience method for createAgentVersionWithResponse
+        // Customized convenience method for createAgentVersionWithResponse (removed @Generated to add tracing).
         RequestOptions requestOptions = new RequestOptions();
         BinaryData createAgentVersionRequest = BinaryData.fromObject(createAgentVersionInput);
-        return createAgentVersionWithResponse(agentName, createAgentVersionRequest, requestOptions)
-            .flatMap(FluxUtil::toMono)
-            .map(protocolMethodData -> protocolMethodData.toObject(AgentVersionDetails.class));
+        return tracer.traceCreateAgentVersionAsync(agentName, createAgentVersionInput.getDefinition(),
+            (request, options) -> createAgentVersionWithResponse(agentName, request, options).flatMap(FluxUtil::toMono)
+                .map(protocolMethodData -> protocolMethodData.toObject(AgentVersionDetails.class)),
+            createAgentVersionRequest, requestOptions);
     }
 
     /**
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClient.java
index bf66e9e5f533..899ba4931daa 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClient.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClient.java
@@ -18,6 +18,7 @@
 import com.azure.ai.agents.implementation.models.PublishAgentToMicrosoft365Request;
 import com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest;
 import com.azure.ai.agents.implementation.models.UpdateAgentRequest;
+import com.azure.ai.agents.implementation.telemetry.GenAiAgentTracing;
 import com.azure.ai.agents.implementation.utils.FileUtils;
 import com.azure.ai.agents.models.AgentBlueprintReference;
 import com.azure.ai.agents.models.AgentDefinition;
@@ -80,6 +81,8 @@ public final class AgentsClient {
     @Generated
     private final AgentsImpl serviceClient;
 
+    private final GenAiAgentTracing tracer;
+
     /**
      * Get an agent
      *
@@ -985,10 +988,11 @@ AgentDetails updateAgent(String agentName, AgentDefinition definition) {
      * Initializes an instance of AgentsClient class.
      *
      * @param serviceClient the service client implementation.
+     * @param tracer the tracer used to emit GenAI spans for agent operations.
      */
-    @Generated
-    AgentsClient(AgentsImpl serviceClient) {
+    AgentsClient(AgentsImpl serviceClient, GenAiAgentTracing tracer) {
         this.serviceClient = serviceClient;
+        this.tracer = tracer;
     }
 
     /**
@@ -2187,8 +2191,10 @@ public AgentVersionDetails createAgentVersion(String agentName, AgentDefinition
         RequestOptions requestOptions = new RequestOptions();
         CreateAgentVersionRequest createAgentVersionRequestObj = new CreateAgentVersionRequest(definition);
         BinaryData createAgentVersionRequest = BinaryData.fromObject(createAgentVersionRequestObj);
-        return createAgentVersionWithResponse(agentName, createAgentVersionRequest, requestOptions).getValue()
-            .toObject(AgentVersionDetails.class);
+        return tracer.traceCreateAgentVersion(agentName, definition,
+            (request, options) -> createAgentVersionWithResponse(agentName, request, options).getValue()
+                .toObject(AgentVersionDetails.class),
+            createAgentVersionRequest, requestOptions);
     }
 
     /**
@@ -2217,13 +2223,15 @@ public AgentVersionDetails createAgentVersion(String agentName, AgentDefinition
     @ServiceMethod(returns = ReturnType.SINGLE)
     public AgentVersionDetails createAgentVersion(String agentName, AgentDefinition definition,
         Map metadata, String description) {
-        // Generated convenience method for createAgentVersionWithResponse
+        // Customized convenience method for createAgentVersionWithResponse (removed @Generated to add tracing).
         RequestOptions requestOptions = new RequestOptions();
         CreateAgentVersionRequest createAgentVersionRequestObj
             = new CreateAgentVersionRequest(definition).setMetadata(metadata).setDescription(description);
         BinaryData createAgentVersionRequest = BinaryData.fromObject(createAgentVersionRequestObj);
-        return createAgentVersionWithResponse(agentName, createAgentVersionRequest, requestOptions).getValue()
-            .toObject(AgentVersionDetails.class);
+        return tracer.traceCreateAgentVersion(agentName, definition,
+            (request, options) -> createAgentVersionWithResponse(agentName, request, options).getValue()
+                .toObject(AgentVersionDetails.class),
+            createAgentVersionRequest, requestOptions);
     }
 
     /**
@@ -2245,10 +2253,13 @@ public AgentVersionDetails createAgentVersion(String agentName, AgentDefinition
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
     public AgentVersionDetails createAgentVersion(String agentName, CreateAgentVersionInput createAgentVersionInput) {
+        // Customized convenience method for createAgentVersionWithResponse (removed @Generated to add tracing).
         RequestOptions requestOptions = new RequestOptions();
         BinaryData createAgentVersionRequest = BinaryData.fromObject(createAgentVersionInput);
-        return createAgentVersionWithResponse(agentName, createAgentVersionRequest, requestOptions).getValue()
-            .toObject(AgentVersionDetails.class);
+        return tracer.traceCreateAgentVersion(agentName, createAgentVersionInput.getDefinition(),
+            (request, options) -> createAgentVersionWithResponse(agentName, request, options).getValue()
+                .toObject(AgentVersionDetails.class),
+            createAgentVersionRequest, requestOptions);
     }
 
     /**
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java
index c113a9fc84c2..c31bb48920f9 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java
@@ -6,9 +6,13 @@
 import com.azure.ai.agents.implementation.AgentsClientImpl;
 import com.azure.ai.agents.implementation.http.FoundryPolicyHelper;
 import com.azure.ai.agents.implementation.http.HttpClientHelper;
+import com.azure.ai.agents.implementation.http.OpenAITracingContextBridge;
 import com.azure.ai.agents.implementation.models.AgentDefinitionOptInKeys;
 import com.azure.ai.agents.implementation.models.FoundryFeaturesOptInKeys;
 import com.azure.ai.agents.implementation.realtime.VoiceAgentWebSocketClientConfiguration;
+import com.azure.ai.agents.implementation.telemetry.GenAiAgentTracing;
+import com.azure.ai.agents.implementation.telemetry.GenAiInstrumentation;
+import com.azure.ai.agents.implementation.telemetry.GenAiResponseTracing;
 import com.azure.ai.agents.implementation.utils.Beta;
 import com.azure.core.annotation.Generated;
 import com.azure.core.annotation.ServiceClientBuilder;
@@ -388,12 +392,21 @@ private HttpPipeline resolvePipeline(String foundryFeatures) {
     }
 
     private com.openai.core.http.HttpClient createOpenAIHttpClient(String foundryFeatures) {
+        return HttpClientHelper.mapToOpenAIHttpClient(resolveOpenAIHttpPipeline(foundryFeatures));
+    }
+
+    private HttpPipeline resolveOpenAIHttpPipeline(String foundryFeatures) {
         HttpPipeline localPipeline = resolvePipeline(foundryFeatures);
         if (pipeline != null && tokenCredential != null) {
             localPipeline = FoundryPolicyHelper.prependPolicy(localPipeline,
                 new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES));
         }
-        return HttpClientHelper.mapToOpenAIHttpClient(localPipeline);
+        return localPipeline;
+    }
+
+    private com.openai.core.http.HttpClient createOpenAIHttpClient(String foundryFeatures,
+        OpenAITracingContextBridge contextBridge) {
+        return HttpClientHelper.mapToOpenAIHttpClient(resolveOpenAIHttpPipeline(foundryFeatures), contextBridge);
     }
 
     /**
@@ -402,8 +415,12 @@ private com.openai.core.http.HttpClient createOpenAIHttpClient(String foundryFea
      * @return an instance of ResponsesClient
      */
     public ResponsesClient buildResponsesClient() {
-        return new ResponsesClient(getOpenAIClientBuilder(null).build()
-            .withOptions(optionBuilder -> optionBuilder.httpClient(createOpenAIHttpClient(null))));
+        final com.azure.core.util.tracing.Tracer tracer = createTracer();
+        final OpenAITracingContextBridge contextBridge = new OpenAITracingContextBridge();
+        return new ResponsesClient(
+            getOpenAIClientBuilder(null).build()
+                .withOptions(optionBuilder -> optionBuilder.httpClient(createOpenAIHttpClient(null, contextBridge))),
+            new GenAiResponseTracing(createInstrumentation(tracer), contextBridge));
     }
 
     /**
@@ -412,8 +429,12 @@ public ResponsesClient buildResponsesClient() {
      * @return an instance of ResponsesAsyncClient
      */
     public ResponsesAsyncClient buildResponsesAsyncClient() {
-        return new ResponsesAsyncClient(getOpenAIAsyncClientBuilder(null).build()
-            .withOptions(optionBuilder -> optionBuilder.httpClient(createOpenAIHttpClient(null))));
+        final com.azure.core.util.tracing.Tracer tracer = createTracer();
+        final OpenAITracingContextBridge contextBridge = new OpenAITracingContextBridge();
+        return new ResponsesAsyncClient(
+            getOpenAIAsyncClientBuilder(null).build()
+                .withOptions(optionBuilder -> optionBuilder.httpClient(createOpenAIHttpClient(null, contextBridge))),
+            new GenAiResponseTracing(createInstrumentation(tracer), contextBridge));
     }
 
     /**
@@ -524,7 +545,8 @@ private OpenAIOkHttpClientAsync.Builder getOpenAIAsyncClientBuilder(String agent
      * @return an instance of AgentsAsyncClient.
      */
     public AgentsAsyncClient buildAgentsAsyncClient() {
-        return new AgentsAsyncClient(buildInnerClient(allowPreview ? AGENT_PREVIEW_FEATURES : null).getAgents());
+        return new AgentsAsyncClient(buildInnerClient(allowPreview ? AGENT_PREVIEW_FEATURES : null).getAgents(),
+            new GenAiAgentTracing(createInstrumentation()));
     }
 
     /**
@@ -533,7 +555,42 @@ public AgentsAsyncClient buildAgentsAsyncClient() {
      * @return an instance of AgentsClient.
      */
     public AgentsClient buildAgentsClient() {
-        return new AgentsClient(buildInnerClient(allowPreview ? AGENT_PREVIEW_FEATURES : null).getAgents());
+        return new AgentsClient(buildInnerClient(allowPreview ? AGENT_PREVIEW_FEATURES : null).getAgents(),
+            new GenAiAgentTracing(createInstrumentation()));
+    }
+
+    /**
+     * Builds the azure-core {@link com.azure.core.util.tracing.Tracer} for the agents clients from the configured
+     * {@link ClientOptions#getTracingOptions()}. The tracer is a no-op unless an OpenTelemetry implementation is
+     * present and tracing is enabled for the process.
+     *
+     * @return the tracer instance.
+     */
+    private com.azure.core.util.tracing.Tracer createTracer() {
+        final String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName");
+        final String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+        final com.azure.core.util.LibraryTelemetryOptions telemetryOptions
+            = new com.azure.core.util.LibraryTelemetryOptions(clientName).setLibraryVersion(clientVersion)
+                .setResourceProviderNamespace("Microsoft.CognitiveServices")
+                .setSchemaUrl(GenAiInstrumentation.OTEL_SCHEMA_URL);
+        final com.azure.core.util.TracingOptions tracingOptions
+            = this.clientOptions == null ? null : this.clientOptions.getTracingOptions();
+        return com.azure.core.util.tracing.TracerProvider.getDefaultProvider()
+            .createTracer(telemetryOptions, tracingOptions);
+    }
+
+    private GenAiInstrumentation createInstrumentation() {
+        return createInstrumentation(createTracer());
+    }
+
+    private GenAiInstrumentation createInstrumentation(com.azure.core.util.tracing.Tracer tracer) {
+        final String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName");
+        final String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+        final com.azure.core.util.MetricsOptions metricsOptions
+            = this.clientOptions == null ? null : this.clientOptions.getMetricsOptions();
+        final com.azure.core.util.metrics.Meter meter = com.azure.core.util.metrics.MeterProvider.getDefaultProvider()
+            .createMeter(clientName, clientVersion, metricsOptions);
+        return new GenAiInstrumentation(this.endpoint, this.configuration, tracer, meter);
     }
 
     /**
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ResponsesAsyncClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ResponsesAsyncClient.java
index 16ada87bfcb3..f04769b3fc51 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ResponsesAsyncClient.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ResponsesAsyncClient.java
@@ -5,6 +5,7 @@
 package com.azure.ai.agents;
 
 import com.azure.ai.agents.implementation.OpenAIJsonHelper;
+import com.azure.ai.agents.implementation.telemetry.GenAiResponseTracing;
 import com.azure.ai.agents.models.AzureCreateResponseOptions;
 import com.azure.ai.agents.util.StreamingResponseUtils;
 import com.azure.core.annotation.ReturnType;
@@ -32,14 +33,17 @@
 @ServiceClient(builder = AgentsClientBuilder.class, isAsync = true)
 public final class ResponsesAsyncClient {
     private final ResponseServiceAsync responseServiceAsync;
+    private final GenAiResponseTracing tracer;
 
     /**
      * Initializes an instance of ResponsesAsyncClient class using the official OpenAI client library.
      *
      * @param openAIClientAsync the OpenAI async client.
+     * @param tracer the tracer used to emit GenAI spans for response operations.
      */
-    ResponsesAsyncClient(OpenAIClientAsync openAIClientAsync) {
+    ResponsesAsyncClient(OpenAIClientAsync openAIClientAsync, GenAiResponseTracing tracer) {
         this.responseServiceAsync = openAIClientAsync.responses();
+        this.tracer = tracer;
     }
 
     /**
@@ -67,7 +71,14 @@ public Mono createAzureResponse(AzureCreateResponseOptions createRespo
 
         Map additionalBodyProperties = OpenAIJsonHelper.toJsonValueMap(createResponse);
         params.additionalBodyProperties(additionalBodyProperties);
-        return Mono.fromFuture(this.responseServiceAsync.create(params.build()));
+
+        if (!tracer.isEnabled()) {
+            return Mono.fromFuture(this.responseServiceAsync.create(params.build()));
+        }
+
+        ResponseCreateParams builtParams = params.build();
+        return tracer.traceResponseAsync(createResponse, builtParams,
+            tracedParams -> Mono.fromFuture(this.responseServiceAsync.create(tracedParams)));
     }
 
     /**
@@ -86,7 +97,14 @@ public Flux createStreamingAzureResponse(AzureCreateRespons
 
         Map additionalBodyProperties = OpenAIJsonHelper.toJsonValueMap(createResponse);
         params.additionalBodyProperties(additionalBodyProperties);
-        return StreamingResponseUtils.toFlux(this.responseServiceAsync.createStreaming(params.build()));
+
+        if (!tracer.isEnabled()) {
+            return StreamingResponseUtils.toFlux(this.responseServiceAsync.createStreaming(params.build()));
+        }
+
+        ResponseCreateParams builtParams = params.build();
+        return tracer.traceStreamingResponseAsync(createResponse, builtParams,
+            tracedParams -> StreamingResponseUtils.toFlux(this.responseServiceAsync.createStreaming(tracedParams)));
     }
 
     /**
@@ -120,11 +138,12 @@ public Mono> createResponseWithResponse(BinaryData cre
         RequestOptions requestOptions) {
         Objects.requireNonNull(createResponseRequest, "createResponseRequest cannot be null");
 
-        ResponseCreateParams params = ResponseCreateParams.builder()
-            .additionalBodyProperties(OpenAIJsonHelper.jsonBodyToValueMap(createResponseRequest))
-            .build();
-        return Mono.fromFuture(this.responseServiceAsync.withRawResponse()
-            .create(params, requestOptions == null ? RequestOptions.none() : requestOptions));
+        ResponseCreateParams params = OpenAIJsonHelper.toRawResponseCreateParams(createResponseRequest);
+        AzureCreateResponseOptions azureOptions = OpenAIJsonHelper
+            .fromAdditionalProperties(params._additionalBodyProperties(), AzureCreateResponseOptions::fromJson);
+        return tracer.traceRawResponseAsync(azureOptions == null ? new AzureCreateResponseOptions() : azureOptions,
+            params, tracedParams -> Mono.fromFuture(this.responseServiceAsync.withRawResponse()
+                .create(tracedParams, requestOptions == null ? RequestOptions.none() : requestOptions)));
     }
 
     /**
@@ -152,10 +171,12 @@ public Mono> createResponseWithResponse(BinaryData cre
         createResponseStreamWithResponse(BinaryData createResponseRequest, RequestOptions requestOptions) {
         Objects.requireNonNull(createResponseRequest, "createResponseRequest cannot be null");
 
-        ResponseCreateParams params = ResponseCreateParams.builder()
-            .additionalBodyProperties(OpenAIJsonHelper.jsonBodyToValueMap(createResponseRequest))
-            .build();
-        return Mono.fromFuture(this.responseServiceAsync.withRawResponse()
-            .createStreaming(params, requestOptions == null ? RequestOptions.none() : requestOptions));
+        ResponseCreateParams params = OpenAIJsonHelper.toRawResponseCreateParams(createResponseRequest);
+        AzureCreateResponseOptions azureOptions = OpenAIJsonHelper
+            .fromAdditionalProperties(params._additionalBodyProperties(), AzureCreateResponseOptions::fromJson);
+        return tracer.traceRawStreamingResponseAsync(
+            azureOptions == null ? new AzureCreateResponseOptions() : azureOptions, params,
+            tracedParams -> Mono.fromFuture(this.responseServiceAsync.withRawResponse()
+                .createStreaming(tracedParams, requestOptions == null ? RequestOptions.none() : requestOptions)));
     }
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ResponsesClient.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ResponsesClient.java
index 834772db0f0a..736db65c92e2 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ResponsesClient.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ResponsesClient.java
@@ -5,6 +5,8 @@
 package com.azure.ai.agents;
 
 import com.azure.ai.agents.implementation.OpenAIJsonHelper;
+import com.azure.ai.agents.implementation.telemetry.GenAiResponseTracing;
+import com.azure.ai.agents.implementation.telemetry.TracedStreamIterable;
 import com.azure.ai.agents.models.AzureCreateResponseDetails;
 import com.azure.ai.agents.models.AzureCreateResponseOptions;
 import com.azure.ai.agents.util.StreamingResponseUtils;
@@ -32,14 +34,17 @@
 @ServiceClient(builder = AgentsClientBuilder.class)
 public final class ResponsesClient {
     private final ResponseService responseService;
+    private final GenAiResponseTracing tracer;
 
     /**
      * Initializes an instance of ResponsesClient class using the official OpenAI client library.
      *
      * @param openAIClient the OpenAI client.
+     * @param tracer the tracer used to emit GenAI spans for response operations.
      */
-    ResponsesClient(OpenAIClient openAIClient) {
+    ResponsesClient(OpenAIClient openAIClient, GenAiResponseTracing tracer) {
         this.responseService = openAIClient.responses();
+        this.tracer = tracer;
     }
 
     /**
@@ -67,7 +72,13 @@ public Response createAzureResponse(AzureCreateResponseOptions createResponse,
 
         Map additionalBodyProperties = OpenAIJsonHelper.toJsonValueMap(createResponse);
         params.additionalBodyProperties(additionalBodyProperties);
-        return this.responseService.create(params.build());
+
+        if (!tracer.isEnabled()) {
+            return this.responseService.create(params.build());
+        }
+
+        ResponseCreateParams builtParams = params.build();
+        return tracer.traceResponse(createResponse, builtParams, () -> this.responseService.create(builtParams));
     }
 
     /**
@@ -86,7 +97,15 @@ public IterableStream createStreamingAzureResponse(AzureCre
 
         Map additionalBodyProperties = OpenAIJsonHelper.toJsonValueMap(createResponse);
         params.additionalBodyProperties(additionalBodyProperties);
-        return StreamingResponseUtils.toIterableStream(this.responseService.createStreaming(params.build()));
+
+        if (!tracer.isEnabled()) {
+            return StreamingResponseUtils.toIterableStream(this.responseService.createStreaming(params.build()));
+        }
+
+        ResponseCreateParams builtParams = params.build();
+        TracedStreamIterable traced = tracer.traceStreamingResponse(createResponse, builtParams,
+            () -> StreamingResponseUtils.toIterableStream(this.responseService.createStreaming(builtParams)));
+        return new IterableStream<>(traced);
     }
 
     /**
@@ -132,11 +151,12 @@ public HttpResponseFor createResponseWithResponse(BinaryData createRes
         RequestOptions requestOptions) {
         Objects.requireNonNull(createResponseRequest, "createResponseRequest cannot be null");
 
-        ResponseCreateParams params = ResponseCreateParams.builder()
-            .additionalBodyProperties(OpenAIJsonHelper.jsonBodyToValueMap(createResponseRequest))
-            .build();
-        return this.responseService.withRawResponse()
-            .create(params, requestOptions == null ? RequestOptions.none() : requestOptions);
+        ResponseCreateParams params = OpenAIJsonHelper.toRawResponseCreateParams(createResponseRequest);
+        AzureCreateResponseOptions azureOptions = OpenAIJsonHelper
+            .fromAdditionalProperties(params._additionalBodyProperties(), AzureCreateResponseOptions::fromJson);
+        return tracer.traceRawResponse(azureOptions == null ? new AzureCreateResponseOptions() : azureOptions, params,
+            () -> this.responseService.withRawResponse()
+                .create(params, requestOptions == null ? RequestOptions.none() : requestOptions));
     }
 
     /**
@@ -162,11 +182,12 @@ public HttpResponseFor createResponseWithResponse(BinaryData createRes
         createResponseStreamWithResponse(BinaryData createResponseRequest, RequestOptions requestOptions) {
         Objects.requireNonNull(createResponseRequest, "createResponseRequest cannot be null");
 
-        ResponseCreateParams params = ResponseCreateParams.builder()
-            .additionalBodyProperties(OpenAIJsonHelper.jsonBodyToValueMap(createResponseRequest))
-            .build();
-        return this.responseService.withRawResponse()
-            .createStreaming(params, requestOptions == null ? RequestOptions.none() : requestOptions);
+        ResponseCreateParams params = OpenAIJsonHelper.toRawResponseCreateParams(createResponseRequest);
+        AzureCreateResponseOptions azureOptions = OpenAIJsonHelper
+            .fromAdditionalProperties(params._additionalBodyProperties(), AzureCreateResponseOptions::fromJson);
+        return tracer.traceRawStreamingResponse(azureOptions == null ? new AzureCreateResponseOptions() : azureOptions,
+            params, () -> this.responseService.withRawResponse()
+                .createStreaming(params, requestOptions == null ? RequestOptions.none() : requestOptions));
     }
 
 }
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/OpenAIJsonHelper.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/OpenAIJsonHelper.java
index cf7d056f0be0..6d7c41624bd0 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/OpenAIJsonHelper.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/OpenAIJsonHelper.java
@@ -13,6 +13,7 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.openai.core.JsonValue;
 import com.openai.core.ObjectMappers;
+import com.openai.models.responses.ResponseCreateParams;
 
 import java.io.IOException;
 import java.io.StringReader;
@@ -219,6 +220,64 @@ public static Map jsonBodyToValueMap(BinaryData body) {
         }
     }
 
+    /**
+     * Converts a raw create-response body to OpenAI request parameters while promoting the fields used by tracing to
+     * their strongly typed builder properties. All remaining fields, including Azure extensions, stay in the
+     * additional body-property map.
+     *
+     * @param body the raw create-response body.
+     * @return request parameters preserving all top-level fields.
+     */
+    public static ResponseCreateParams toRawResponseCreateParams(BinaryData body) {
+        Map properties = jsonBodyToValueMap(body);
+        ResponseCreateParams.Builder builder = ResponseCreateParams.builder();
+
+        JsonValue model = properties.remove("model");
+        if (model != null) {
+            String modelName = model.convert(String.class);
+            if (modelName != null) {
+                builder.model(modelName);
+            } else {
+                properties.put("model", model);
+            }
+        }
+        JsonValue input = properties.get("input");
+        if (input != null) {
+            try {
+                String inputText = input.convert(String.class);
+                if (inputText != null) {
+                    properties.remove("input");
+                    builder.input(inputText);
+                }
+            } catch (IllegalArgumentException ignored) {
+                // Structured input remains an additional body property and is preserved on the wire.
+            }
+        }
+        JsonValue instructions = properties.remove("instructions");
+        if (instructions != null) {
+            String instructionsText = instructions.convert(String.class);
+            if (instructionsText != null) {
+                builder.instructions(instructionsText);
+            } else {
+                properties.put("instructions", instructions);
+            }
+        }
+        JsonValue conversation = properties.get("conversation");
+        if (conversation != null) {
+            try {
+                String conversationId = conversation.convert(String.class);
+                if (conversationId != null) {
+                    properties.remove("conversation");
+                    builder.conversation(conversationId);
+                }
+            } catch (IllegalArgumentException ignored) {
+                // Structured conversation parameters remain additional body properties.
+            }
+        }
+
+        return builder.additionalBodyProperties(properties).build();
+    }
+
     private static Map jsonStringToJsonValueMap(String json) throws IOException {
         Map map = MAPPER.readValue(json, new TypeReference>() {
         });
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/HttpClientHelper.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/HttpClientHelper.java
index 67c01ba40d62..c2f33266b6b9 100644
--- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/HttpClientHelper.java
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/HttpClientHelper.java
@@ -61,15 +61,32 @@ private HttpClientHelper() {
      * @return A bridge client that honors the OpenAI interface but delegates execution to the Azure pipeline.
      */
     public static HttpClient mapToOpenAIHttpClient(HttpPipeline httpPipeline) {
-        return new HttpClientWrapper(httpPipeline);
+        return new HttpClientWrapper(httpPipeline, null);
+    }
+
+    /**
+     * Implements the OpenAI {@link HttpClient} interface and restores request-carried trace context before the Azure
+     * HTTP pipeline starts. This is required for OpenAI asynchronous clients, which may invoke the HTTP client on a
+     * different thread from the GenAI operation span.
+     *
+     * @param httpPipeline The Azure HTTP pipeline that will execute HTTP requests.
+     * @param contextBridge The bridge used to restore the Azure context associated with the OpenAI request.
+     * @return A bridge client that honors the OpenAI interface but delegates execution to the Azure pipeline.
+     */
+    public static HttpClient mapToOpenAIHttpClient(HttpPipeline httpPipeline,
+        OpenAITracingContextBridge contextBridge) {
+        return new HttpClientWrapper(httpPipeline,
+            Objects.requireNonNull(contextBridge, "'contextBridge' cannot be null."));
     }
 
     private static final class HttpClientWrapper implements HttpClient {
 
         private final HttpPipeline httpPipeline;
+        private final OpenAITracingContextBridge contextBridge;
 
-        private HttpClientWrapper(HttpPipeline httpPipeline) {
+        private HttpClientWrapper(HttpPipeline httpPipeline, OpenAITracingContextBridge contextBridge) {
             this.httpPipeline = Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+            this.contextBridge = contextBridge;
         }
 
         @Override
@@ -89,8 +106,8 @@ public HttpResponse execute(HttpRequest request, RequestOptions requestOptions)
 
             try {
                 com.azure.core.http.HttpRequest azureRequest = buildAzureRequest(request);
-                return new AzureHttpResponseAdapter(
-                    this.httpPipeline.sendSync(azureRequest, buildRequestContext(requestOptions)));
+                return new AzureHttpResponseAdapter(this.httpPipeline.sendSync(azureRequest,
+                    buildRequestContext(request, requestOptions, contextBridge)));
             } catch (MalformedURLException exception) {
                 throw new OpenAIException("Invalid URL in request: " + exception.getMessage(),
                     LOGGER.logThrowableAsError(exception));
@@ -108,7 +125,8 @@ public CompletableFuture executeAsync(HttpRequest request, Request
             Objects.requireNonNull(requestOptions, "requestOptions");
 
             return Mono.fromCallable(() -> buildAzureRequest(request))
-                .flatMap(azureRequest -> this.httpPipeline.send(azureRequest, buildRequestContext(requestOptions)))
+                .flatMap(azureRequest -> this.httpPipeline.send(azureRequest,
+                    buildRequestContext(request, requestOptions, contextBridge)))
                 .map(response -> (HttpResponse) new AzureHttpResponseAdapter(response))
                 .onErrorMap(HttpClientWrapper::mapAzureExceptionToOpenAI)
                 // publishOn moves the CompletableFuture completion (and all OpenAI SDK continuations that
@@ -228,6 +246,9 @@ private static com.azure.core.http.HttpRequest buildAzureRequest(HttpRequest req
         private static HttpHeaders toAzureHeaders(Headers sourceHeaders) {
             HttpHeaders target = new HttpHeaders();
             sourceHeaders.names().forEach(name -> {
+                if (OpenAITracingContextBridge.TRACE_CONTEXT_HEADER.equalsIgnoreCase(name)) {
+                    return;
+                }
                 List values = sourceHeaders.values(name);
                 HttpHeaderName headerName = HttpHeaderName.fromString(name);
                 if (values.isEmpty()) {
@@ -240,12 +261,16 @@ private static HttpHeaders toAzureHeaders(Headers sourceHeaders) {
         }
 
         /**
-         * Builds the request context from the given request options.
+         * Builds the request context from the internal context token and request options.
+         * @param request OpenAI SDK request containing any propagated context token
          * @param requestOptions OpenAI SDK request options
          * @return Azure request {@link Context}
          */
-        private static Context buildRequestContext(RequestOptions requestOptions) {
-            Context context = Context.NONE;
+        private static Context buildRequestContext(HttpRequest request, RequestOptions requestOptions,
+            OpenAITracingContextBridge contextBridge) {
+            List tokens = request.headers().values(OpenAITracingContextBridge.TRACE_CONTEXT_HEADER);
+            Context context
+                = contextBridge == null || tokens.isEmpty() ? Context.NONE : contextBridge.take(tokens.get(0));
             Timeout timeout = requestOptions.getTimeout();
             // we use "read" as it's the closest thing to the "response timeout"
             if (timeout != null && !timeout.read().isZero() && !timeout.read().isNegative()) {
diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAITracingContextBridge.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAITracingContextBridge.java
new file mode 100644
index 000000000000..17692eff175c
--- /dev/null
+++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/http/OpenAITracingContextBridge.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.agents.implementation.http;
+
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * Carries an Azure tracing context across openai-java's asynchronous request preparation boundary.
+ *
+ * 

The opaque header is consumed by {@link HttpClientHelper} and is never sent to the service. Entries are scoped + * to a single client and removed either when the HTTP adapter consumes them or when the traced operation ends.

+ */ +public final class OpenAITracingContextBridge { + /** + * Internal header used only between openai-java request preparation and the Azure HTTP adapter. + */ + public static final String TRACE_CONTEXT_HEADER = "x-ms-azure-ai-agents-trace-context"; + + private final ConcurrentMap contexts = new ConcurrentHashMap<>(); + + /** + * Registers a context and returns its opaque request token. + * + * @param context the Azure tracing context. + * @return the opaque request token. + */ + public String register(Context context) { + String token = CoreUtils.randomUuid().toString(); + contexts.put(token, context); + return token; + } + + /** + * Removes and returns the context associated with a request token. + * + * @param token the opaque request token. + * @return the context, or {@link Context#NONE} when the token is absent or already consumed. + */ + public Context take(String token) { + if (token == null) { + return Context.NONE; + } + Context context = contexts.remove(token); + return context == null ? Context.NONE : context; + } + + /** + * Removes an unconsumed request token. + * + * @param token the opaque request token. + */ + public void discard(String token) { + if (token != null) { + contexts.remove(token); + } + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiAgentTracing.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiAgentTracing.java new file mode 100644 index 000000000000..5f9b0d03dfc3 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiAgentTracing.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.ai.agents.models.AgentDefinition; +import com.azure.ai.agents.models.AgentVersionDetails; +import com.azure.ai.agents.models.HostedAgentDefinition; +import com.azure.ai.agents.models.PromptAgentDefinition; +import com.azure.ai.agents.models.ProtocolVersionRecord; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.function.Function; + +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.AGENT_TYPE_HOSTED; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.AGENT_TYPE_PROMPT; + +/** + * Tracing for the agent-management convenience methods on {@link com.azure.ai.agents.AgentsClient} and + * {@link com.azure.ai.agents.AgentsAsyncClient}. Wraps {@code createAgentVersion} with a {@code create_agent} span, + * extracting agent-type-specific attributes for supported prompt and hosted agents. + * + *

Constructed with a per-client {@link GenAiInstrumentation}; there is no global state.

+ */ +public final class GenAiAgentTracing { + + private final GenAiInstrumentation instrumentation; + + /** + * Creates a {@link GenAiAgentTracing}. + * + * @param instrumentation the per-client telemetry holder. + */ + public GenAiAgentTracing(GenAiInstrumentation instrumentation) { + this.instrumentation = instrumentation; + } + + /** + * Reference to the synchronous operation performing the actual create-agent-version call. + */ + @FunctionalInterface + public interface SyncCreateAgentVersionOperation { + /** + * Invokes the operation. + * + * @param request the serialized request body. + * @param requestOptions the request options (carries the tracing context). + * @return the created agent version details. + */ + AgentVersionDetails invoke(BinaryData request, RequestOptions requestOptions); + } + + /** + * Reference to the asynchronous operation performing the actual create-agent-version call. + */ + @FunctionalInterface + public interface CreateAgentVersionOperation { + /** + * Invokes the operation. + * + * @param request the serialized request body. + * @param requestOptions the request options (carries the tracing context). + * @return the created agent version details. + */ + Mono invoke(BinaryData request, RequestOptions requestOptions); + } + + /** + * Traces the synchronous {@code createAgentVersion} convenience method. + * + * @param agentName the agent name. + * @param definition the agent definition being created. + * @param operation the operation performing the actual call. + * @param request the serialized request body. + * @param requestOptions the request options. + * @return the created agent version details. + */ + @SuppressWarnings("try") + public AgentVersionDetails traceCreateAgentVersion(String agentName, AgentDefinition definition, + SyncCreateAgentVersionOperation operation, BinaryData request, RequestOptions requestOptions) { + GenAiTracingScope scope = instrumentation.startCreateAgent(agentName); + if (scope == null) { + return operation.invoke(request, requestOptions); + } + try { + applyDefinitionAttributes(scope, agentName, definition); + AgentVersionDetails result; + try (AutoCloseable ignored = scope.makeSpanCurrent()) { + result = operation.invoke(request, requestOptions.setContext(scope.getSpanContext())); + } + enrichFromResult(scope, result); + return result; + } catch (Exception e) { + scope.recordError(e); + sneakyThrows(e); + return null; + } finally { + scope.close(); + } + } + + /** + * Traces the asynchronous {@code createAgentVersion} convenience method. + * + * @param agentName the agent name. + * @param definition the agent definition being created. + * @param operation the operation performing the actual call. + * @param request the serialized request body. + * @param requestOptions the request options. + * @return a {@link Mono} emitting the created agent version details. + */ + public Mono traceCreateAgentVersionAsync(String agentName, AgentDefinition definition, + CreateAgentVersionOperation operation, BinaryData request, RequestOptions requestOptions) { + if (!instrumentation.isEnabled()) { + return operation.invoke(request, requestOptions); + } + + final Mono resourceSupplier = Mono.fromSupplier(() -> { + GenAiTracingScope scope = instrumentation.startCreateAgent(agentName); + applyDefinitionAttributes(scope, agentName, definition); + return scope; + }); + + final Function> resourceClosure + = scope -> operation.invoke(request, requestOptions.setContext(scope.getSpanContext())).map(result -> { + enrichFromResult(scope, result); + return result; + }); + + return Mono.usingWhen(resourceSupplier, resourceClosure, scope -> { + scope.close(); + return Mono.empty(); + }, (scope, throwable) -> { + scope.recordError(throwable); + scope.close(); + return Mono.empty(); + }, scope -> { + scope.close(); + return Mono.empty(); + }); + } + + private void applyDefinitionAttributes(GenAiTracingScope scope, String agentName, AgentDefinition definition) { + if (definition instanceof PromptAgentDefinition) { + PromptAgentDefinition prompt = (PromptAgentDefinition) definition; + scope.setAgentAttributes(null, agentName, null, AGENT_TYPE_PROMPT); + scope.setRequestModelAttributes(prompt.getModel(), prompt.getTemperature(), prompt.getTopP()); + scope.setSystemInstructions(prompt.getInstructions()); + } else if (definition instanceof HostedAgentDefinition) { + HostedAgentDefinition hosted = (HostedAgentDefinition) definition; + String protocol = null; + String protocolVersion = null; + List protocolVersions = hosted.getProtocolVersions(); + if (protocolVersions != null && !protocolVersions.isEmpty()) { + ProtocolVersionRecord record = protocolVersions.get(0); + protocol = record.getProtocol() != null ? record.getProtocol().toString() : null; + protocolVersion = record.getVersion(); + } + String image + = hosted.getContainerConfiguration() != null ? hosted.getContainerConfiguration().getImage() : null; + scope.setAgentAttributes(null, agentName, null, AGENT_TYPE_HOSTED); + scope.setHostedAgentAttributes(hosted.getCpu(), hosted.getMemory(), image, protocol, protocolVersion); + } else { + scope.setAgentAttributes(null, agentName, null, null); + } + } + + private static void enrichFromResult(GenAiTracingScope scope, AgentVersionDetails result) { + if (result != null) { + String name = result.getName(); + String version = result.getVersion(); + if (name != null && version != null) { + scope.setAgentIdAndVersion(name + ":" + version, version); + } + } + } + + @SuppressWarnings("unchecked") + private static void sneakyThrows(Throwable e) throws E { + throw (E) e; + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiConstants.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiConstants.java new file mode 100644 index 000000000000..3639c35346ca --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiConstants.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +/** + * Constants for GenAI semantic convention attribute names, event names, metric names, and operation names. + *

+ * These follow the OpenTelemetry GenAI semantic conventions: + * GenAI Semantic Conventions. + */ +final class GenAiConstants { + + private GenAiConstants() { + // utility class + } + + // --- Operation names --- + static final String OPERATION_CREATE_AGENT = "create_agent"; + static final String OPERATION_INVOKE_AGENT = "invoke_agent"; + static final String OPERATION_CHAT = "chat"; + static final String OPERATION_RESPONSES = "responses"; + static final String OPERATION_CREATE_CONVERSATION = "create_conversation"; + + // --- System / Provider --- + static final String GEN_AI_PROVIDER_NAME = "gen_ai.provider.name"; + static final String GEN_AI_PROVIDER_NAME_VALUE = "microsoft.foundry"; + static final String AZ_NAMESPACE_VALUE = "Microsoft.CognitiveServices"; + + // --- Operation --- + static final String GEN_AI_OPERATION_NAME = "gen_ai.operation.name"; + + // --- Agent attributes --- + static final String GEN_AI_AGENT_ID = "gen_ai.agent.id"; + static final String GEN_AI_AGENT_NAME = "gen_ai.agent.name"; + static final String GEN_AI_AGENT_DESCRIPTION = "gen_ai.agent.description"; + static final String GEN_AI_AGENT_VERSION = "gen_ai.agent.version"; + static final String GEN_AI_AGENT_TYPE = "gen_ai.agent.type"; + + // --- Hosted agent attributes --- + static final String GEN_AI_AGENT_HOSTED_CPU = "gen_ai.agent.hosted.cpu"; + static final String GEN_AI_AGENT_HOSTED_MEMORY = "gen_ai.agent.hosted.memory"; + static final String GEN_AI_AGENT_HOSTED_IMAGE = "gen_ai.agent.hosted.image"; + static final String GEN_AI_AGENT_HOSTED_PROTOCOL = "gen_ai.agent.hosted.protocol"; + static final String GEN_AI_AGENT_HOSTED_PROTOCOL_VERSION = "gen_ai.agent.hosted.protocol_version"; + + // --- Request parameters --- + static final String GEN_AI_REQUEST_MODEL = "gen_ai.request.model"; + static final String GEN_AI_REQUEST_TEMPERATURE = "gen_ai.request.temperature"; + static final String GEN_AI_REQUEST_TOP_P = "gen_ai.request.top_p"; + + // --- Response attributes --- + static final String GEN_AI_RESPONSE_MODEL = "gen_ai.response.model"; + static final String GEN_AI_RESPONSE_ID = "gen_ai.response.id"; + static final String GEN_AI_RESPONSE_FINISH_REASONS = "gen_ai.response.finish_reasons"; + + // --- Token usage --- + static final String GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens"; + static final String GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens"; + + // --- Messages (content-gated) --- + static final String GEN_AI_SYSTEM_INSTRUCTIONS = "gen_ai.system_instructions"; + static final String GEN_AI_INPUT_MESSAGES = "gen_ai.input.messages"; + static final String GEN_AI_OUTPUT_MESSAGES = "gen_ai.output.messages"; + + // --- Conversation --- + static final String GEN_AI_CONVERSATION_ID = "gen_ai.conversation.id"; + + // --- Server --- + static final String SERVER_ADDRESS = "server.address"; + static final String SERVER_PORT = "server.port"; + + // --- Error --- + static final String ERROR_TYPE = "error.type"; + + // --- Token type (for metrics) --- + static final String GEN_AI_TOKEN_TYPE = "gen_ai.token.type"; + static final String TOKEN_TYPE_INPUT = "input"; + static final String TOKEN_TYPE_OUTPUT = "completion"; + + // --- Metric names --- + static final String METRIC_OPERATION_DURATION = "gen_ai.client.operation.duration"; + static final String METRIC_TOKEN_USAGE = "gen_ai.client.token.usage"; + + // --- Metric units --- + static final String METRIC_UNIT_SECONDS = "s"; + static final String METRIC_UNIT_TOKENS = "token"; + + // --- Agent type values --- + static final String AGENT_TYPE_PROMPT = "prompt"; + static final String AGENT_TYPE_HOSTED = "hosted"; + + // --- Default port (HTTPS) --- + static final int DEFAULT_HTTPS_PORT = 443; +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiInstrumentation.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiInstrumentation.java new file mode 100644 index 000000000000..a0d06239ba2b --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiInstrumentation.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.core.util.Configuration; +import com.azure.core.util.ConfigurationProperty; +import com.azure.core.util.ConfigurationPropertyBuilder; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.metrics.DoubleHistogram; +import com.azure.core.util.metrics.Meter; +import com.azure.core.util.tracing.SpanKind; +import com.azure.core.util.tracing.StartSpanOptions; +import com.azure.core.util.tracing.Tracer; + +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; + +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.DEFAULT_HTTPS_PORT; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_OPERATION_NAME; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_PROVIDER_NAME; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_PROVIDER_NAME_VALUE; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.METRIC_OPERATION_DURATION; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.METRIC_TOKEN_USAGE; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.METRIC_UNIT_SECONDS; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.METRIC_UNIT_TOKENS; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.OPERATION_CHAT; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.OPERATION_CREATE_AGENT; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.OPERATION_CREATE_CONVERSATION; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.OPERATION_INVOKE_AGENT; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.SERVER_ADDRESS; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.SERVER_PORT; + +/** + * Per-client GenAI telemetry holder. Owns the azure-core {@link Tracer} and {@link Meter} (and the GenAI + * histograms) that the client builder created from {@code ClientOptions} tracing/metrics options, along with the + * resolved endpoint host/port and the content-recording flag. + * + *

This replaces the process-global static state used elsewhere: an instance is created per client by + * {@code AgentsClientBuilder} and injected into the clients. Tracing/metrics are emitted only when an + * OpenTelemetry implementation is configured for the process (i.e. {@link Tracer#isEnabled()} or a histogram is + * enabled).

+ */ +public final class GenAiInstrumentation { + + /** + * OpenTelemetry schema URL for the GenAI semantic conventions emitted by this instrumentation. + */ + public static final String OTEL_SCHEMA_URL = "https://opentelemetry.io/schemas/1.34.0"; + + private static final ClientLogger LOGGER = new ClientLogger(GenAiInstrumentation.class); + + private static final ConfigurationProperty EXPERIMENTAL_GEN_AI_TRACING + = ConfigurationPropertyBuilder.ofBoolean("experimental.enable_genai_tracing") + .environmentVariableName("AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING") + .systemPropertyName("azure.experimental.enable_genai_tracing") + .shared(true) + .defaultValue(false) + .build(); + private static final ConfigurationProperty CAPTURE_MESSAGE_CONTENT + = ConfigurationPropertyBuilder.ofBoolean("otel.instrumentation.genai.capture_message_content") + .environmentVariableName("OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT") + .systemPropertyName("otel.instrumentation.genai.capture_message_content") + .shared(true) + .build(); + private static final ConfigurationProperty LEGACY_CAPTURE_MESSAGE_CONTENT + = ConfigurationPropertyBuilder.ofBoolean("azure.tracing.gen_ai.content_recording_enabled") + .environmentVariableName("AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED") + .systemPropertyName("azure.tracing.gen_ai.content_recording_enabled") + .shared(true) + .defaultValue(false) + .build(); + private static final Configuration GLOBAL_CONFIG = Configuration.getGlobalConfiguration(); + + private final Tracer tracer; + private final Meter meter; + private final DoubleHistogram durationHistogram; + private final DoubleHistogram tokenUsageHistogram; + private final boolean experimentalEnabled; + private final boolean captureContent; + private final String host; + private final int port; + + /** + * Creates a {@link GenAiInstrumentation}. + * + * @param endpoint the service endpoint; used to populate {@code server.address}/{@code server.port}. + * @param configuration the {@link Configuration} used to resolve the content-recording flag; if {@code null} + * the global configuration is used. + * @param tracer the azure-core {@link Tracer} built from the client's tracing options. + * @param meter the azure-core {@link Meter} built from the client's metrics options. + */ + public GenAiInstrumentation(String endpoint, Configuration configuration, Tracer tracer, Meter meter) { + final URL url = parse(endpoint); + if (url != null) { + this.host = url.getHost(); + this.port = url.getPort() == -1 ? url.getDefaultPort() : url.getPort(); + } else { + this.host = null; + this.port = -1; + } + Configuration resolvedConfiguration = configuration == null ? GLOBAL_CONFIG : configuration; + this.experimentalEnabled = resolvedConfiguration.get(EXPERIMENTAL_GEN_AI_TRACING); + Boolean captureMessageContent = resolvedConfiguration.get(CAPTURE_MESSAGE_CONTENT); + this.captureContent = captureMessageContent == null + ? resolvedConfiguration.get(LEGACY_CAPTURE_MESSAGE_CONTENT) + : captureMessageContent; + this.tracer = tracer; + this.meter = meter; + this.durationHistogram = meter.createDoubleHistogram(METRIC_OPERATION_DURATION, "Duration of GenAI operations", + METRIC_UNIT_SECONDS); + this.tokenUsageHistogram = meter.createDoubleHistogram(METRIC_TOKEN_USAGE, + "Number of input and output tokens used", METRIC_UNIT_TOKENS); + } + + /** + * @return whether any span or metric collection is active for this instrumentation. + */ + public boolean isEnabled() { + return experimentalEnabled + && (tracer.isEnabled() || durationHistogram.isEnabled() || tokenUsageHistogram.isEnabled()); + } + + boolean isContentRecordingEnabled() { + return captureContent; + } + + Tracer tracer() { + return tracer; + } + + Meter meter() { + return meter; + } + + DoubleHistogram durationHistogram() { + return durationHistogram; + } + + DoubleHistogram tokenUsageHistogram() { + return tokenUsageHistogram; + } + + GenAiTracingScope startCreateAgent(String agentName) { + return startScope(OPERATION_CREATE_AGENT, agentName); + } + + GenAiTracingScope startInvokeAgent(String agentName) { + return startScope(OPERATION_INVOKE_AGENT, agentName); + } + + GenAiTracingScope startChat(String modelName) { + return startScope(OPERATION_CHAT, modelName); + } + + GenAiTracingScope startCreateConversation() { + return startScope(OPERATION_CREATE_CONVERSATION, null); + } + + private GenAiTracingScope startScope(String operationName, String spanNameSuffix) { + if (!isEnabled()) { + return null; + } + + String spanName = spanNameSuffix != null ? operationName + " " + spanNameSuffix : operationName; + String serverAddress = host != null ? host : "unknown"; + int serverPort = port > 0 ? port : DEFAULT_HTTPS_PORT; + + StartSpanOptions options + = new StartSpanOptions(SpanKind.CLIENT).setAttribute(GEN_AI_OPERATION_NAME, operationName) + .setAttribute(GEN_AI_PROVIDER_NAME, GEN_AI_PROVIDER_NAME_VALUE) + .setAttribute(SERVER_ADDRESS, serverAddress); + if (serverPort != DEFAULT_HTTPS_PORT) { + options.setAttribute(SERVER_PORT, (long) serverPort); + } + + Context spanContext = tracer.start(spanName, options, Context.NONE); + return new GenAiTracingScope(this, spanContext, operationName, serverAddress, serverPort); + } + + private static URL parse(String endpoint) { + if (CoreUtils.isNullOrEmpty(endpoint)) { + return null; + } + try { + return new URI(endpoint).toURL(); + } catch (MalformedURLException | URISyntaxException e) { + LOGGER.atWarning().log("Service endpoint URI parse error.", e); + } + return null; + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiMessageFormatter.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiMessageFormatter.java new file mode 100644 index 000000000000..d2a1723daadd --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiMessageFormatter.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * Formats messages for span attributes, respecting the content-recording privacy gate. + * + *

When content recording is OFF, messages include only structural information (roles and types) + * without any user content. When ON, full message text is included. The {@code captureContent} flag is + * passed in from the per-client {@link GenAiInstrumentation} rather than read from global state.

+ */ +final class GenAiMessageFormatter { + private static final ClientLogger LOGGER = new ClientLogger(GenAiMessageFormatter.class); + + private GenAiMessageFormatter() { + // utility class + } + + /** + * Formats the {@code gen_ai.system_instructions} attribute value (content-gated). + */ + static String formatSystemInstructions(boolean captureContent, String instructions) { + Map textPart = jsonObject("type", "text"); + if (captureContent && instructions != null && !instructions.isEmpty()) { + textPart.put("content", instructions); + } + return toJson(jsonArray(textPart)); + } + + /** + * Formats a user text input message for the {@code gen_ai.input.messages} attribute. + */ + static String formatUserTextInput(boolean captureContent, String text) { + Map textPart = jsonObject("type", "text"); + if (captureContent) { + textPart.put("content", text); + } + return toJson(jsonArray(jsonObject("role", "user", "parts", jsonArray(textPart)))); + } + + /** + * Formats a tool response input message for the {@code gen_ai.input.messages} attribute. + */ + static String formatToolResponseInput(boolean captureContent, String toolCallId, String content) { + Map toolPart = jsonObject("type", "tool_call_response", "id", toolCallId); + if (captureContent) { + toolPart.put("result", parseResultValue(content)); + } + return toJson(jsonArray(jsonObject("role", "tool", "parts", jsonArray(toolPart)))); + } + + /** + * Formats a text output message for the {@code gen_ai.output.messages} attribute. + */ + static String formatTextOutput(boolean captureContent, String text, String finishReason) { + Map textPart = jsonObject("type", "text"); + if (captureContent) { + textPart.put("content", text); + } + Map message = jsonObject("role", "assistant", "parts", jsonArray(textPart)); + if (finishReason != null) { + message.put("finish_reason", finishReason); + } + return toJson(jsonArray(message)); + } + + /** + * Formats a tool call output message for the {@code gen_ai.output.messages} attribute. The nested content object + * (tool type and, when content recording is enabled, the extra content) is always emitted since the tool type is + * always known. + */ + static String formatToolCallOutput(boolean captureContent, String toolCallId, String toolType, String content) { + Map nestedContent = jsonObject("type", toolType); + Map toolPart = jsonObject("type", "tool_call"); + if (toolCallId != null) { + toolPart.put("id", toolCallId); + nestedContent.put("id", toolCallId); + } + if (captureContent && content != null) { + nestedContent.put("content", content); + } + toolPart.put("content", nestedContent); + return toJson(jsonArray(jsonObject("role", "assistant", "parts", jsonArray(toolPart)))); + } + + static Map jsonObject(Object... fields) { + Map result = new LinkedHashMap<>(); + for (int i = 0; i < fields.length; i += 2) { + result.put((String) fields[i], fields[i + 1]); + } + return result; + } + + static List jsonArray(Object... values) { + return Arrays.asList(values); + } + + static String toJson(Object value) { + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + try (JsonWriter writer = JsonProviders.createWriter(stream)) { + writeValue(writer, value); + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new UncheckedIOException("Failed to serialize GenAI telemetry.", e)); + } + return new String(stream.toByteArray(), StandardCharsets.UTF_8); + } + + private static void writeValue(JsonWriter writer, Object value) throws IOException { + if (value instanceof Number) { + writer.writeNumber((Number) value); + } else if (value instanceof Map) { + writer.writeStartObject(); + for (Map.Entry entry : ((Map) value).entrySet()) { + writer.writeFieldName(String.valueOf(entry.getKey())); + writeValue(writer, entry.getValue()); + } + writer.writeEndObject(); + } else if (value instanceof Iterable) { + writer.writeStartArray(); + for (Object element : (Iterable) value) { + writeValue(writer, element); + } + writer.writeEndArray(); + } else if (value instanceof JsonSerializable) { + ((JsonSerializable) value).toJson(writer); + } else { + writer.writeUntyped(value); + } + } + + private static Object parseResultValue(String value) { + if (value == null) { + return null; + } + String trimmed = value.trim(); + if ((trimmed.startsWith("{") && trimmed.endsWith("}")) || (trimmed.startsWith("[") && trimmed.endsWith("]"))) { + try (JsonReader reader = JsonProviders.createReader(trimmed)) { + Object result = reader.readUntyped(); + JsonToken trailingToken = reader.nextToken(); + if (trailingToken == null || trailingToken == JsonToken.END_DOCUMENT) { + return result; + } + } catch (IOException | IllegalStateException ignored) { + // Preserve malformed or non-JSON tool output as a string. + } + } + return value; + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiResponseTracing.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiResponseTracing.java new file mode 100644 index 000000000000..d926e17f6f6d --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiResponseTracing.java @@ -0,0 +1,794 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.ai.agents.implementation.http.OpenAITracingContextBridge; +import com.azure.ai.agents.models.AgentReference; +import com.azure.ai.agents.models.AzureCreateResponseOptions; +import com.openai.helpers.ResponseAccumulator; +import com.openai.core.http.HttpResponseFor; +import com.openai.core.http.StreamResponse; +import com.openai.models.responses.EasyInputMessage; +import com.openai.models.responses.Response; +import com.openai.models.responses.ResponseCodeInterpreterToolCall; +import com.openai.models.responses.ResponseComputerToolCall; +import com.openai.models.responses.ResponseCreateParams; +import com.openai.models.responses.ResponseFileSearchToolCall; +import com.openai.models.responses.ResponseFunctionToolCall; +import com.openai.models.responses.ResponseFunctionWebSearch; +import com.openai.models.responses.ResponseInputItem; +import com.openai.models.responses.ResponseOutputItem; +import com.openai.models.responses.ResponseOutputMessage; +import com.openai.models.responses.ResponseOutputText; +import com.openai.models.responses.ResponseStreamEvent; +import com.openai.models.responses.ResponseUsage; +import com.openai.models.conversations.Conversation; +import com.openai.models.conversations.ConversationCreateParams; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.function.Function; +import java.util.function.Supplier; + +/** + * Tracing for the response convenience methods on {@link com.azure.ai.agents.ResponsesClient}. Wraps response + * creation with a {@code chat} or {@code invoke_agent} span (based on whether an {@link AgentReference} is present), + * recording request/response attributes, token usage, input/output messages (content-gated), and metrics. Also + * traces {@code create_conversation}. + * + *

Constructed with a per-client {@link GenAiInstrumentation}; there is no global state.

+ */ +public final class GenAiResponseTracing { + + private final GenAiInstrumentation instrumentation; + private final OpenAITracingContextBridge contextBridge; + + /** + * Creates a {@link GenAiResponseTracing}. + * + * @param instrumentation the per-client telemetry holder. + */ + public GenAiResponseTracing(GenAiInstrumentation instrumentation) { + this(instrumentation, null); + } + + /** + * Creates a {@link GenAiResponseTracing} with an asynchronous OpenAI context bridge. + * + * @param instrumentation the per-client telemetry holder. + * @param contextBridge the per-client bridge used by the OpenAI HTTP adapter. + */ + public GenAiResponseTracing(GenAiInstrumentation instrumentation, OpenAITracingContextBridge contextBridge) { + this.instrumentation = instrumentation; + this.contextBridge = contextBridge; + } + + /** + * @return whether any span/metric collection is active. + */ + public boolean isEnabled() { + return instrumentation.isEnabled(); + } + + private boolean captureContent() { + return instrumentation.isContentRecordingEnabled(); + } + + /** + * Traces a non-streaming response operation, extracting tracing parameters from the request objects. + * + * @param createResponse the Azure-specific create response options. + * @param builtParams the built request parameters. + * @param operation the supplier that performs the actual API call. + * @return the response from the operation. + */ + @SuppressWarnings("try") + public Response traceResponse(AzureCreateResponseOptions createResponse, ResponseCreateParams builtParams, + Supplier operation) { + ResponseSpanParams params = extractParams(createResponse, builtParams); + GenAiTracingScope scope = startResponseScope(params); + if (scope == null) { + return operation.get(); + } + + try { + Response response; + try (AutoCloseable ignored = scope.makeSpanCurrent()) { + response = operation.get(); + } + recordResponseAttributes(scope, response, params.isInvokeAgent); + return response; + } catch (Exception e) { + scope.recordError(e); + sneakyThrows(e); + return null; + } finally { + scope.close(); + } + } + + /** + * Traces a streaming response operation. The span remains open until the returned iterable is fully consumed. + * + * @param createResponse the Azure-specific create response options. + * @param builtParams the built request parameters. + * @param operation the supplier that starts the streaming operation. + * @return a traced iterable that wraps the stream and records attributes on completion. + */ + @SuppressWarnings("try") + public TracedStreamIterable traceStreamingResponse(AzureCreateResponseOptions createResponse, + ResponseCreateParams builtParams, Supplier> operation) { + ResponseSpanParams params = extractParams(createResponse, builtParams); + GenAiTracingScope scope = startResponseScope(params); + if (scope == null) { + return new TracedStreamIterable(operation.get(), null, this, false); + } + + try { + Iterable stream; + try (AutoCloseable ignored = scope.makeSpanCurrent()) { + stream = operation.get(); + } + return new TracedStreamIterable(stream, scope, this, params.isInvokeAgent); + } catch (Exception e) { + scope.recordError(e); + scope.close(); + sneakyThrows(e); + return null; + } + } + + /** + * Traces an asynchronous non-streaming response operation. + * + * @param createResponse the Azure-specific create response options. + * @param builtParams the built request parameters. + * @param operation the function that starts the asynchronous API call with trace context in the request headers. + * @return a {@link Mono} emitting the response from the operation. + */ + public Mono traceResponseAsync(AzureCreateResponseOptions createResponse, + ResponseCreateParams builtParams, Function> operation) { + if (!instrumentation.isEnabled()) { + return operation.apply(builtParams); + } + ResponseSpanParams params = extractParams(createResponse, builtParams); + + Mono resourceSupplier = Mono.fromSupplier(() -> startResponseScope(params)); + Function> resourceClosure + = scope -> startMonoWithContext(scope, builtParams, operation).map(response -> { + recordResponseAttributes(scope, response, params.isInvokeAgent); + return response; + }); + return Mono.usingWhen(resourceSupplier, resourceClosure, scope -> { + scope.close(); + return Mono.empty(); + }, (scope, throwable) -> { + scope.recordError(throwable); + scope.close(); + return Mono.empty(); + }, scope -> { + scope.close(); + return Mono.empty(); + }); + } + + /** + * Traces an asynchronous streaming response operation. The span remains open until the returned {@link Flux} is + * fully consumed, cancelled, or errors. + * + * @param createResponse the Azure-specific create response options. + * @param builtParams the built request parameters. + * @param operation the function that starts the streaming operation with trace context in the request headers. + * @return a {@link Flux} that wraps the stream and records attributes on completion. + */ + public Flux traceStreamingResponseAsync(AzureCreateResponseOptions createResponse, + ResponseCreateParams builtParams, Function> operation) { + if (!instrumentation.isEnabled()) { + return operation.apply(builtParams); + } + ResponseSpanParams params = extractParams(createResponse, builtParams); + + Mono resourceSupplier + = Mono.fromSupplier(() -> new StreamingState(startResponseScope(params), params.isInvokeAgent)); + Function> resourceClosure + = state -> startFluxWithContext(state.scope, builtParams, operation).doOnNext(state::accumulate); + return Flux.usingWhen(resourceSupplier, resourceClosure, state -> { + state.finalizeStream(this); + return Mono.empty(); + }, (state, throwable) -> { + state.recordError(throwable); + return Mono.empty(); + }, state -> { + state.close(); + return Mono.empty(); + }); + } + + private Mono startMonoWithContext(GenAiTracingScope scope, ResponseCreateParams params, + Function> operation) { + if (contextBridge == null) { + return startMono(scope, () -> operation.apply(params)); + } + String token = contextBridge.register(scope.getSpanContext()); + ResponseCreateParams.Builder builder = params.toBuilder(); + builder.replaceAdditionalHeaders(OpenAITracingContextBridge.TRACE_CONTEXT_HEADER, token); + return startMono(scope, () -> operation.apply(builder.build())) + .doFinally(signalType -> contextBridge.discard(token)); + } + + /** + * Traces a synchronous raw-response operation. + * + * @param createResponse the Azure-specific create response options. + * @param builtParams the raw request represented as OpenAI parameters. + * @param operation the raw-response operation. + * @return the raw HTTP response. + */ + @SuppressWarnings("try") + public HttpResponseFor traceRawResponse(AzureCreateResponseOptions createResponse, + ResponseCreateParams builtParams, Supplier> operation) { + ResponseSpanParams params = extractParams(createResponse, builtParams); + GenAiTracingScope scope = startResponseScope(params); + if (scope == null) { + return operation.get(); + } + try { + try (AutoCloseable ignored = scope.makeSpanCurrent()) { + return operation.get(); + } + } catch (Exception e) { + scope.recordError(e); + sneakyThrows(e); + return null; + } finally { + scope.close(); + } + } + + /** + * Traces an asynchronous raw-response operation. + * + * @param createResponse the Azure-specific create response options. + * @param builtParams the raw request represented as OpenAI parameters. + * @param operation the raw-response operation. + * @return the raw HTTP response publisher. + */ + public Mono> traceRawResponseAsync(AzureCreateResponseOptions createResponse, + ResponseCreateParams builtParams, Function>> operation) { + if (!instrumentation.isEnabled()) { + return operation.apply(builtParams); + } + ResponseSpanParams params = extractParams(createResponse, builtParams); + Mono resourceSupplier = Mono.fromSupplier(() -> startResponseScope(params)); + return Mono.usingWhen(resourceSupplier, scope -> startMonoWithContext(scope, builtParams, operation), scope -> { + scope.close(); + return Mono.empty(); + }, (scope, throwable) -> { + scope.recordError(throwable); + scope.close(); + return Mono.empty(); + }, scope -> { + scope.close(); + return Mono.empty(); + }); + } + + /** + * Traces a synchronous raw streaming operation. The returned response owns the span until its parsed stream is + * exhausted, fails, or is closed. + * + * @param createResponse the Azure-specific create response options. + * @param builtParams the raw request represented as OpenAI parameters. + * @param operation the raw streaming operation. + * @return the traced raw streaming response. + */ + @SuppressWarnings("try") + public HttpResponseFor> traceRawStreamingResponse( + AzureCreateResponseOptions createResponse, ResponseCreateParams builtParams, + Supplier>> operation) { + ResponseSpanParams params = extractParams(createResponse, builtParams); + GenAiTracingScope scope = startResponseScope(params); + if (scope == null) { + return operation.get(); + } + try { + HttpResponseFor> response; + try (AutoCloseable ignored = scope.makeSpanCurrent()) { + response = operation.get(); + } + return new TracedRawStreamingResponse(response, scope, this, params.isInvokeAgent); + } catch (Exception e) { + scope.recordError(e); + scope.close(); + sneakyThrows(e); + return null; + } + } + + /** + * Traces an asynchronous raw streaming operation. The emitted response owns the span until its parsed stream is + * exhausted, fails, or is closed. + * + * @param createResponse the Azure-specific create response options. + * @param builtParams the raw request represented as OpenAI parameters. + * @param operation the raw streaming operation. + * @return the traced raw streaming response publisher. + */ + public Mono>> traceRawStreamingResponseAsync( + AzureCreateResponseOptions createResponse, ResponseCreateParams builtParams, + Function>>> operation) { + if (!instrumentation.isEnabled()) { + return operation.apply(builtParams); + } + ResponseSpanParams params = extractParams(createResponse, builtParams); + return Mono.defer(() -> { + GenAiTracingScope scope = startResponseScope(params); + AtomicBoolean ownershipTransferred = new AtomicBoolean(); + return startMonoWithContext(scope, builtParams, operation).map(response -> { + HttpResponseFor> tracedResponse + = new TracedRawStreamingResponse(response, scope, this, params.isInvokeAgent); + ownershipTransferred.set(true); + return tracedResponse; + }).doOnError(throwable -> { + scope.recordError(throwable); + scope.close(); + }).doOnCancel(() -> { + if (!ownershipTransferred.get()) { + scope.close(); + } + }); + }); + } + + private Flux startFluxWithContext(GenAiTracingScope scope, ResponseCreateParams params, + Function> operation) { + if (contextBridge == null) { + return startFlux(scope, () -> operation.apply(params)); + } + String token = contextBridge.register(scope.getSpanContext()); + ResponseCreateParams.Builder builder = params.toBuilder(); + builder.replaceAdditionalHeaders(OpenAITracingContextBridge.TRACE_CONTEXT_HEADER, token); + return startFlux(scope, () -> operation.apply(builder.build())) + .doFinally(signalType -> contextBridge.discard(token)); + } + + private Mono startConversationWithContext(GenAiTracingScope scope, + Function> operation) { + if (contextBridge == null) { + return startMono(scope, () -> operation.apply(ConversationCreateParams.builder().build())); + } + String token = contextBridge.register(scope.getSpanContext()); + ConversationCreateParams.Builder builder = ConversationCreateParams.builder(); + builder.replaceAdditionalHeaders(OpenAITracingContextBridge.TRACE_CONTEXT_HEADER, token); + return startMono(scope, () -> operation.apply(builder.build())) + .doFinally(signalType -> contextBridge.discard(token)); + } + + /** + * Traces a synchronous {@code create_conversation} operation. + * + * @param operation the supplier that performs the API call. + * @return the created conversation. + */ + @SuppressWarnings("try") + public Conversation traceCreateConversation(Supplier operation) { + GenAiTracingScope scope = instrumentation.startCreateConversation(); + if (scope == null) { + return operation.get(); + } + try { + Conversation conversation; + try (AutoCloseable ignored = scope.makeSpanCurrent()) { + conversation = operation.get(); + } + scope.setConversationId(conversation.id()); + return conversation; + } catch (Exception e) { + scope.recordError(e); + sneakyThrows(e); + return null; + } finally { + scope.close(); + } + } + + /** + * Traces an asynchronous {@code create_conversation} operation. + * + * @param operation the function that performs the asynchronous API call with trace context in the request headers. + * @return a {@link Mono} emitting the created conversation. + */ + public Mono + traceCreateConversationAsync(Function> operation) { + if (!instrumentation.isEnabled()) { + return operation.apply(ConversationCreateParams.builder().build()); + } + + Mono resourceSupplier = Mono.fromSupplier(instrumentation::startCreateConversation); + Function> resourceClosure + = scope -> startConversationWithContext(scope, operation).map(conversation -> { + scope.setConversationId(conversation.id()); + return conversation; + }); + return Mono.usingWhen(resourceSupplier, resourceClosure, scope -> { + scope.close(); + return Mono.empty(); + }, (scope, throwable) -> { + scope.recordError(throwable); + scope.close(); + return Mono.empty(); + }, scope -> { + scope.close(); + return Mono.empty(); + }); + } + + @SuppressWarnings("try") + private static Mono startMono(GenAiTracingScope scope, Supplier> operation) { + try (AutoCloseable ignored = scope.makeSpanCurrent()) { + return operation.get(); + } catch (Exception e) { + return Mono.error(e); + } + } + + @SuppressWarnings("try") + private static Flux startFlux(GenAiTracingScope scope, Supplier> operation) { + try (AutoCloseable ignored = scope.makeSpanCurrent()) { + return operation.get(); + } catch (Exception e) { + return Flux.error(e); + } + } + + /** + * Extracts and formats input messages from {@link ResponseCreateParams} for tracing. + */ + String extractInputMessages(ResponseCreateParams builtParams) { + if (!builtParams.input().isPresent()) { + return null; + } + + ResponseCreateParams.Input input = builtParams.input().get(); + if (input.isText()) { + return GenAiMessageFormatter.formatUserTextInput(captureContent(), input.asText()); + } + + if (input.isResponse()) { + List items = input.asResponse(); + for (int i = items.size() - 1; i >= 0; i--) { + ResponseInputItem item = items.get(i); + if (item.easyInputMessage().isPresent()) { + EasyInputMessage msg = item.easyInputMessage().get(); + if (EasyInputMessage.Role.USER.equals(msg.role()) && msg.content().isTextInput()) { + return GenAiMessageFormatter.formatUserTextInput(captureContent(), msg.content().asTextInput()); + } + } + if (item.functionCallOutput().isPresent()) { + ResponseInputItem.FunctionCallOutput fco = item.functionCallOutput().get(); + String output = fco.output().isString() ? fco.output().asString() : null; + return GenAiMessageFormatter.formatToolResponseInput(captureContent(), fco.callId().orElse(null), + output); + } + } + } + + return null; + } + + void recordResponseAttributes(GenAiTracingScope scope, Response response, boolean isInvokeAgent) { + if (response == null) { + return; + } + + String responseId = response.id(); + String responseModel = extractModelString(response.model()); + Long inputTokens = null; + Long outputTokens = null; + + Optional usageOpt = response.usage(); + if (usageOpt.isPresent()) { + ResponseUsage usage = usageOpt.get(); + inputTokens = usage.inputTokens(); + outputTokens = usage.outputTokens(); + } + + String outputMessages = formatOutputFromResponse(response); + + scope.setResponseAttributes(responseId, responseModel, inputTokens, outputTokens, null); + scope.setOutputMessages(outputMessages); + + } + + String formatOutputFromResponse(Response response) { + if (response.output() == null || response.output().isEmpty()) { + return null; + } + + List messages = new ArrayList<>(); + for (ResponseOutputItem item : response.output()) { + Map message = formatOutputItem(item); + if (message != null) { + messages.add(message); + } + } + + if (messages.isEmpty()) { + messages.add(GenAiMessageFormatter.jsonObject("role", "assistant", "parts", + GenAiMessageFormatter.jsonArray(GenAiMessageFormatter.jsonObject("type", "text")), "finish_reason", + "completed")); + } + + return GenAiMessageFormatter.toJson(messages); + } + + private Map formatOutputItem(ResponseOutputItem item) { + if (item.isMessage()) { + return formatOutputMessage(item.asMessage()); + } else if (item.isFunctionCall()) { + return formatFunctionCall(item.asFunctionCall()); + } else if (item.isFileSearchCall()) { + return formatFileSearchCall(item.asFileSearchCall()); + } else if (item.isWebSearchCall()) { + return formatWebSearchCall(item.asWebSearchCall()); + } else if (item.isCodeInterpreterCall()) { + return formatCodeInterpreterCall(item.asCodeInterpreterCall()); + } else if (item.isComputerCall()) { + return formatComputerCall(item.asComputerCall()); + } else if (item.isMcpCall()) { + return formatMcpCall(item.asMcpCall()); + } else if (item.isImageGenerationCall()) { + return formatImageGenerationCall(item.asImageGenerationCall()); + } else if (item.isMcpApprovalRequest()) { + return formatMcpApprovalRequest(item.asMcpApprovalRequest()); + } else if (item.isMcpListTools()) { + return formatMcpListTools(item.asMcpListTools()); + } + return null; + } + + private Map formatFunctionCall(ResponseFunctionToolCall funcCall) { + Map part = GenAiMessageFormatter.jsonObject("type", "tool_call", "id", funcCall.callId()); + if (captureContent()) { + part.put("name", funcCall.name()); + part.put("arguments", funcCall.arguments()); + } + return assistantMessage(part); + } + + private Map formatFileSearchCall(ResponseFileSearchToolCall fileSearch) { + Map content + = GenAiMessageFormatter.jsonObject("type", "file_search_call", "id", fileSearch.id()); + if (captureContent()) { + List queries = fileSearch.queries(); + if (queries != null && !queries.isEmpty()) { + content.put("queries", queries); + } + Optional> results = fileSearch.results(); + if (results.isPresent() && !results.get().isEmpty()) { + List serializedResults = new ArrayList<>(); + for (ResponseFileSearchToolCall.Result result : results.get()) { + Map serializedResult = GenAiMessageFormatter.jsonObject(); + if (result.fileId().isPresent()) { + serializedResult.put("file_id", result.fileId().get()); + } + if (result.filename().isPresent()) { + serializedResult.put("filename", result.filename().get()); + } + if (result.score().isPresent()) { + serializedResult.put("score", result.score().get()); + } + serializedResults.add(serializedResult); + } + content.put("results", serializedResults); + } + } + return assistantMessage(GenAiMessageFormatter.jsonObject("type", "tool_call", "content", content)); + } + + private Map formatWebSearchCall(ResponseFunctionWebSearch webSearch) { + return assistantMessage(GenAiMessageFormatter.jsonObject("type", "tool_call", "content", + GenAiMessageFormatter.jsonObject("type", "web_search_call", "id", webSearch.id()))); + } + + private Map formatCodeInterpreterCall(ResponseCodeInterpreterToolCall codeInterpreter) { + Map content + = GenAiMessageFormatter.jsonObject("type", "code_interpreter_call", "id", codeInterpreter.id()); + if (captureContent()) { + Optional code = codeInterpreter.code(); + if (code.isPresent()) { + content.put("code", code.get()); + } + } + return assistantMessage(GenAiMessageFormatter.jsonObject("type", "tool_call", "content", content)); + } + + private Map formatComputerCall(ResponseComputerToolCall computerCall) { + return assistantMessage(GenAiMessageFormatter.jsonObject("type", "computer_call", "id", computerCall.callId())); + } + + private Map formatMcpCall(ResponseOutputItem.McpCall mcpCall) { + Map part = GenAiMessageFormatter.jsonObject("type", "mcp_call", "id", mcpCall.id()); + if (captureContent()) { + part.put("name", mcpCall.name()); + part.put("server_label", mcpCall.serverLabel()); + part.put("arguments", mcpCall.arguments()); + } + return assistantMessage(part); + } + + private Map formatImageGenerationCall(ResponseOutputItem.ImageGenerationCall imageGen) { + return assistantMessage(GenAiMessageFormatter.jsonObject("type", "image_generation_call", "id", imageGen.id())); + } + + private Map formatMcpApprovalRequest(ResponseOutputItem.McpApprovalRequest approval) { + Map part + = GenAiMessageFormatter.jsonObject("type", "mcp_approval_request", "id", approval.id()); + if (captureContent()) { + part.put("name", approval.name()); + part.put("server_label", approval.serverLabel()); + part.put("arguments", approval.arguments()); + } + return assistantMessage(part); + } + + private Map formatMcpListTools(ResponseOutputItem.McpListTools mcpListTools) { + Map part = GenAiMessageFormatter.jsonObject("type", "mcp_list_tools", "id", mcpListTools.id()); + if (captureContent()) { + part.put("server_label", mcpListTools.serverLabel()); + } + return assistantMessage(part); + } + + private Map formatOutputMessage(ResponseOutputMessage message) { + List parts = new ArrayList<>(); + if (message.content() != null) { + for (ResponseOutputMessage.Content contentPart : message.content()) { + if (contentPart.isOutputText() && captureContent()) { + ResponseOutputText textPart = contentPart.asOutputText(); + parts.add(GenAiMessageFormatter.jsonObject("type", "text", "content", textPart.text())); + } else { + parts.add(GenAiMessageFormatter.jsonObject("type", "text")); + } + } + } + + return GenAiMessageFormatter.jsonObject("role", "assistant", "parts", parts, "finish_reason", "completed"); + } + + private static Map assistantMessage(Map part) { + return GenAiMessageFormatter.jsonObject("role", "assistant", "parts", GenAiMessageFormatter.jsonArray(part)); + } + + /** + * Extracts the model name string from a {@code ResponsesModel} union type. + */ + static String extractModelString(com.openai.models.ResponsesModel model) { + if (model == null) { + return null; + } + if (model.isString()) { + return model.asString(); + } + if (model.isChat()) { + return model.asChat().asString(); + } + if (model.isOnly()) { + return model.asOnly().asString(); + } + return model.toString(); + } + + private ResponseSpanParams extractParams(AzureCreateResponseOptions createResponse, + ResponseCreateParams builtParams) { + String model = builtParams.model().isPresent() ? extractModelString(builtParams.model().get()) : null; + AgentReference agentRef = createResponse.getAgentReference(); + String agentName = agentRef != null ? agentRef.getName() : null; + boolean isInvokeAgent = agentName != null; + String nameForSpan = isInvokeAgent ? agentName : model; + String inputMessages = extractInputMessages(builtParams); + String instructions = builtParams.instructions().orElse(""); + String conversationId = builtParams.conversation().isPresent() ? builtParams.conversation().get().asId() : null; + return new ResponseSpanParams(isInvokeAgent, nameForSpan, agentName, model, inputMessages, instructions, + conversationId); + } + + private GenAiTracingScope startResponseScope(ResponseSpanParams params) { + GenAiTracingScope scope = params.isInvokeAgent + ? instrumentation.startInvokeAgent(params.nameForSpan) + : instrumentation.startChat(params.nameForSpan); + if (scope == null) { + return null; + } + if (params.agentName != null) { + scope.setAgentAttributes(null, params.agentName, null, null); + } + scope.setRequestModelAttributes(params.model, null, null); + scope.setInputMessages(params.inputMessages); + if (!params.isInvokeAgent && params.instructions != null && captureContent()) { + scope.setSystemInstructions(params.instructions); + } + if (params.conversationId != null) { + scope.setConversationId(params.conversationId); + } + return scope; + } + + private static final class ResponseSpanParams { + private final boolean isInvokeAgent; + private final String nameForSpan; + private final String agentName; + private final String model; + private final String inputMessages; + private final String instructions; + private final String conversationId; + + ResponseSpanParams(boolean isInvokeAgent, String nameForSpan, String agentName, String model, + String inputMessages, String instructions, String conversationId) { + this.isInvokeAgent = isInvokeAgent; + this.nameForSpan = nameForSpan; + this.agentName = agentName; + this.model = model; + this.inputMessages = inputMessages; + this.instructions = instructions; + this.conversationId = conversationId; + } + } + + private static final class StreamingState { + private final GenAiTracingScope scope; + private final boolean isInvokeAgent; + private final ResponseAccumulator accumulator; + private volatile boolean finalized; + + StreamingState(GenAiTracingScope scope, boolean isInvokeAgent) { + this.scope = scope; + this.isInvokeAgent = isInvokeAgent; + this.accumulator = ResponseAccumulator.create(); + } + + void accumulate(ResponseStreamEvent event) { + accumulator.accumulate(event); + } + + void finalizeStream(GenAiResponseTracing responseTracing) { + if (finalized) { + return; + } + finalized = true; + Response response = accumulator.response(); + if (response != null) { + responseTracing.recordResponseAttributes(scope, response, isInvokeAgent); + } + scope.close(); + } + + void recordError(Throwable throwable) { + if (finalized) { + return; + } + finalized = true; + scope.recordError(throwable); + scope.close(); + } + + void close() { + if (finalized) { + return; + } + finalized = true; + scope.close(); + } + } + + @SuppressWarnings("unchecked") + private static void sneakyThrows(Throwable e) throws E { + throw (E) e; + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiTracingScope.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiTracingScope.java new file mode 100644 index 000000000000..5e1eabcf85d0 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiTracingScope.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.core.util.Context; +import com.azure.core.util.TelemetryAttributes; +import com.azure.core.util.metrics.DoubleHistogram; +import com.azure.core.util.metrics.Meter; + +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.DEFAULT_HTTPS_PORT; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.ERROR_TYPE; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_AGENT_HOSTED_CPU; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_AGENT_HOSTED_IMAGE; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_AGENT_HOSTED_MEMORY; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_AGENT_HOSTED_PROTOCOL; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_AGENT_HOSTED_PROTOCOL_VERSION; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_AGENT_ID; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_AGENT_NAME; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_AGENT_TYPE; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_AGENT_VERSION; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_CONVERSATION_ID; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_INPUT_MESSAGES; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_OPERATION_NAME; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_OUTPUT_MESSAGES; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_PROVIDER_NAME; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_PROVIDER_NAME_VALUE; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_REQUEST_MODEL; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_REQUEST_TEMPERATURE; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_REQUEST_TOP_P; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_RESPONSE_FINISH_REASONS; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_RESPONSE_ID; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_RESPONSE_MODEL; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_SYSTEM_INSTRUCTIONS; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_TOKEN_TYPE; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_USAGE_INPUT_TOKENS; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.GEN_AI_USAGE_OUTPUT_TOKENS; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.OPERATION_CHAT; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.OPERATION_INVOKE_AGENT; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.OPERATION_RESPONSES; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.SERVER_ADDRESS; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.SERVER_PORT; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.TOKEN_TYPE_INPUT; +import static com.azure.ai.agents.implementation.telemetry.GenAiConstants.TOKEN_TYPE_OUTPUT; + +/** + * Manages the lifecycle of a single GenAI tracing span, including attribute setting, metrics recording, and content + * privacy gating. Created by {@link GenAiInstrumentation}; all telemetry primitives (tracer, meter, histograms, + * content flag) come from that per-client instance rather than global state. + */ +final class GenAiTracingScope implements AutoCloseable { + + private final GenAiInstrumentation instrumentation; + private final Context spanContext; + private final String operationName; + private final String serverAddress; + private final int serverPort; + private final long startTimeNanos; + private final AtomicInteger ended = new AtomicInteger(0); + + // Deferred attributes for metrics. + private String requestModel; + private String responseModel; + private String errorType; + private Throwable error; + private Long inputTokens; + private Long outputTokens; + + GenAiTracingScope(GenAiInstrumentation instrumentation, Context spanContext, String operationName, + String serverAddress, int serverPort) { + this.instrumentation = instrumentation; + this.spanContext = spanContext; + this.operationName = operationName; + this.serverAddress = serverAddress; + this.serverPort = serverPort; + this.startTimeNanos = System.nanoTime(); + } + + void setAgentAttributes(String agentId, String agentName, String agentVersion, String agentType) { + setAttributeIfNotEmpty(GEN_AI_AGENT_ID, agentId); + setAttributeIfNotEmpty(GEN_AI_AGENT_NAME, agentName); + setAttributeIfNotEmpty(GEN_AI_AGENT_VERSION, agentVersion); + setAttributeIfNotEmpty(GEN_AI_AGENT_TYPE, agentType); + } + + void setAgentIdAndVersion(String agentId, String agentVersion) { + setAttributeIfNotEmpty(GEN_AI_AGENT_ID, agentId); + setAttributeIfNotEmpty(GEN_AI_AGENT_VERSION, agentVersion); + } + + void setHostedAgentAttributes(String cpu, String memory, String image, String protocol, String protocolVersion) { + setAttributeIfNotEmpty(GEN_AI_AGENT_HOSTED_CPU, cpu); + setAttributeIfNotEmpty(GEN_AI_AGENT_HOSTED_MEMORY, memory); + setAttributeIfNotEmpty(GEN_AI_AGENT_HOSTED_IMAGE, image); + setAttributeIfNotEmpty(GEN_AI_AGENT_HOSTED_PROTOCOL, protocol); + setAttributeIfNotEmpty(GEN_AI_AGENT_HOSTED_PROTOCOL_VERSION, protocolVersion); + } + + void setRequestModelAttributes(String model, Double temperature, Double topP) { + setAttributeIfNotEmpty(GEN_AI_REQUEST_MODEL, model); + this.requestModel = model; + if (temperature != null) { + instrumentation.tracer().setAttribute(GEN_AI_REQUEST_TEMPERATURE, String.valueOf(temperature), spanContext); + } + if (topP != null) { + instrumentation.tracer().setAttribute(GEN_AI_REQUEST_TOP_P, String.valueOf(topP), spanContext); + } + } + + void setSystemInstructions(String instructions) { + if (instructions == null) { + return; + } + String value + = GenAiMessageFormatter.formatSystemInstructions(instrumentation.isContentRecordingEnabled(), instructions); + instrumentation.tracer().setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS, value, spanContext); + } + + void setInputMessages(String messages) { + if (messages != null) { + instrumentation.tracer().setAttribute(GEN_AI_INPUT_MESSAGES, messages, spanContext); + } + } + + void setOutputMessages(String messages) { + if (messages != null) { + instrumentation.tracer().setAttribute(GEN_AI_OUTPUT_MESSAGES, messages, spanContext); + } + } + + void setResponseAttributes(String responseId, String model, Long inputTokenCount, Long outputTokenCount, + String finishReasons) { + setAttributeIfNotEmpty(GEN_AI_RESPONSE_ID, responseId); + setAttributeIfNotEmpty(GEN_AI_RESPONSE_MODEL, model); + if (inputTokenCount != null) { + instrumentation.tracer().setAttribute(GEN_AI_USAGE_INPUT_TOKENS, inputTokenCount, spanContext); + } + if (outputTokenCount != null) { + instrumentation.tracer().setAttribute(GEN_AI_USAGE_OUTPUT_TOKENS, outputTokenCount, spanContext); + } + setAttributeIfNotEmpty(GEN_AI_RESPONSE_FINISH_REASONS, finishReasons); + + this.responseModel = model; + this.inputTokens = inputTokenCount; + this.outputTokens = outputTokenCount; + } + + void setConversationId(String conversationId) { + setAttributeIfNotEmpty(GEN_AI_CONVERSATION_ID, conversationId); + } + + void addEvent(String eventName, Map attributes) { + instrumentation.tracer().addEvent(eventName, attributes, OffsetDateTime.now(), spanContext); + } + + void recordError(Throwable error) { + if (error != null) { + this.error = error; + this.errorType = error.getClass().getName(); + instrumentation.tracer().setAttribute(ERROR_TYPE, this.errorType, spanContext); + } + } + + Context getSpanContext() { + return spanContext; + } + + boolean isContentRecordingEnabled() { + return instrumentation.isContentRecordingEnabled(); + } + + AutoCloseable makeSpanCurrent() { + return instrumentation.tracer().makeSpanCurrent(spanContext); + } + + @Override + public void close() { + if (ended.compareAndSet(0, 1)) { + recordMetrics(); + instrumentation.tracer().end(errorType, error, spanContext); + } + } + + private void recordMetrics() { + double durationSeconds = (System.nanoTime() - startTimeNanos) / 1_000_000_000.0; + if (instrumentation.tokenUsageHistogram().isEnabled() || instrumentation.durationHistogram().isEnabled()) { + Map baseAttributes = new HashMap<>(); + String metricOperationName + = OPERATION_CHAT.equals(operationName) || OPERATION_INVOKE_AGENT.equals(operationName) + ? OPERATION_RESPONSES + : operationName; + baseAttributes.put(GEN_AI_OPERATION_NAME, metricOperationName); + baseAttributes.put(GEN_AI_PROVIDER_NAME, GEN_AI_PROVIDER_NAME_VALUE); + baseAttributes.put(SERVER_ADDRESS, serverAddress); + if (serverPort != DEFAULT_HTTPS_PORT) { + baseAttributes.put(SERVER_PORT, (long) serverPort); + } + String model = responseModel == null ? requestModel : responseModel; + if (model != null) { + baseAttributes.put(GEN_AI_REQUEST_MODEL, model); + } + if (errorType != null) { + baseAttributes.put(ERROR_TYPE, errorType); + } + + final Meter meter = instrumentation.meter(); + final DoubleHistogram durationHistogram = instrumentation.durationHistogram(); + if (durationHistogram.isEnabled()) { + TelemetryAttributes durationAttrs = meter.createAttributes(baseAttributes); + durationHistogram.record(durationSeconds, durationAttrs, spanContext); + } + + final DoubleHistogram tokenUsageHistogram = instrumentation.tokenUsageHistogram(); + if (tokenUsageHistogram.isEnabled()) { + if (inputTokens != null && inputTokens > 0) { + Map inputAttrs = new HashMap<>(baseAttributes); + inputAttrs.put(GEN_AI_TOKEN_TYPE, TOKEN_TYPE_INPUT); + tokenUsageHistogram.record(inputTokens.doubleValue(), meter.createAttributes(inputAttrs), + spanContext); + } + if (outputTokens != null && outputTokens > 0) { + Map outputAttrs = new HashMap<>(baseAttributes); + outputAttrs.put(GEN_AI_TOKEN_TYPE, TOKEN_TYPE_OUTPUT); + tokenUsageHistogram.record(outputTokens.doubleValue(), meter.createAttributes(outputAttrs), + spanContext); + } + } + } + } + + private void setAttributeIfNotEmpty(String key, String value) { + if (value != null && !value.isEmpty()) { + instrumentation.tracer().setAttribute(key, value, spanContext); + } + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/TracedRawStreamingResponse.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/TracedRawStreamingResponse.java new file mode 100644 index 000000000000..01e57afe2040 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/TracedRawStreamingResponse.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.core.util.logging.ClientLogger; +import com.openai.core.http.Headers; +import com.openai.core.http.HttpResponseFor; +import com.openai.core.http.StreamResponse; +import com.openai.helpers.ResponseAccumulator; +import com.openai.models.responses.Response; +import com.openai.models.responses.ResponseStreamEvent; + +import java.io.InputStream; +import java.util.Iterator; +import java.util.Spliterator; +import java.util.Spliterators; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; + +/** + * Raw OpenAI streaming response that keeps a GenAI span open for the parsed stream lifecycle. + */ +final class TracedRawStreamingResponse implements HttpResponseFor> { + private static final ClientLogger LOGGER = new ClientLogger(TracedRawStreamingResponse.class); + + private final HttpResponseFor> delegate; + private final GenAiTracingScope scope; + private final GenAiResponseTracing responseTracing; + private final boolean invokeAgent; + private final AtomicBoolean closed = new AtomicBoolean(); + private TracedStreamResponse parsed; + + TracedRawStreamingResponse(HttpResponseFor> delegate, GenAiTracingScope scope, + GenAiResponseTracing responseTracing, boolean invokeAgent) { + this.delegate = delegate; + this.scope = scope; + this.responseTracing = responseTracing; + this.invokeAgent = invokeAgent; + } + + @Override + public int statusCode() { + return delegate.statusCode(); + } + + @Override + public Headers headers() { + return delegate.headers(); + } + + @Override + public InputStream body() { + return delegate.body(); + } + + @Override + public synchronized StreamResponse parse() { + if (parsed == null) { + try { + parsed = new TracedStreamResponse(delegate.parse()); + } catch (RuntimeException e) { + scope.recordError(e); + close(); + throw LOGGER.logThrowableAsError(e); + } + } + return parsed; + } + + @Override + public void close() { + if (closed.compareAndSet(false, true)) { + try { + if (parsed != null) { + parsed.close(); + } else { + scope.close(); + } + } finally { + delegate.close(); + } + } + } + + private final class TracedStreamResponse implements StreamResponse { + private final StreamResponse streamDelegate; + private final ResponseAccumulator accumulator = ResponseAccumulator.create(); + private final AtomicBoolean streamCreated = new AtomicBoolean(); + private final AtomicBoolean streamClosed = new AtomicBoolean(); + + private TracedStreamResponse(StreamResponse streamDelegate) { + this.streamDelegate = streamDelegate; + } + + @Override + public Stream stream() { + if (!streamCreated.compareAndSet(false, true)) { + throw LOGGER.logExceptionAsError( + new IllegalStateException("This raw streaming response has already been consumed.")); + } + Iterator iterator; + try { + iterator = streamDelegate.stream().iterator(); + } catch (RuntimeException e) { + fail(e); + throw LOGGER.logThrowableAsError(e); + } + Iterator tracedIterator = new Iterator() { + @Override + public boolean hasNext() { + try { + boolean hasNext = iterator.hasNext(); + if (!hasNext) { + close(); + } + return hasNext; + } catch (RuntimeException e) { + fail(e); + throw LOGGER.logThrowableAsError(e); + } + } + + @Override + public ResponseStreamEvent next() { + try { + ResponseStreamEvent event = iterator.next(); + accumulator.accumulate(event); + return event; + } catch (RuntimeException e) { + fail(e); + throw LOGGER.logThrowableAsError(e); + } + } + }; + return StreamSupport.stream(Spliterators.spliteratorUnknownSize(tracedIterator, Spliterator.ORDERED), false) + .onClose(this::close); + } + + @Override + public void close() { + if (streamClosed.compareAndSet(false, true)) { + try { + Response response = completedResponse(); + if (response != null) { + responseTracing.recordResponseAttributes(scope, response, invokeAgent); + } + scope.close(); + } finally { + streamDelegate.close(); + } + } + } + + private void fail(RuntimeException error) { + scope.recordError(error); + close(); + } + + private Response completedResponse() { + try { + return accumulator.response(); + } catch (IllegalStateException ignored) { + return null; + } + } + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/TracedStreamIterable.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/TracedStreamIterable.java new file mode 100644 index 000000000000..b3b29e072ab6 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/TracedStreamIterable.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.core.util.logging.ClientLogger; +import com.openai.helpers.ResponseAccumulator; +import com.openai.models.responses.Response; +import com.openai.models.responses.ResponseStreamEvent; + +import java.util.Iterator; +import java.util.NoSuchElementException; + +/** + * A wrapper around a streaming response iterable that records tracing attributes and metrics as the stream is + * consumed. + * + *

The span remains open until the stream is fully consumed or an error occurs. Token counts and response + * metadata are captured from the accumulated stream using the OpenAI SDK's {@link ResponseAccumulator}.

+ */ +public final class TracedStreamIterable implements Iterable, AutoCloseable { + + private static final ClientLogger LOGGER = new ClientLogger(TracedStreamIterable.class); + + private final Iterable inner; + private final GenAiTracingScope scope; + private final GenAiResponseTracing responseTracing; + private final boolean isInvokeAgent; + private volatile boolean consumed; + + TracedStreamIterable(Iterable inner, GenAiTracingScope scope, + GenAiResponseTracing responseTracing, boolean isInvokeAgent) { + this.inner = inner; + this.scope = scope; + this.responseTracing = responseTracing; + this.isInvokeAgent = isInvokeAgent; + } + + @Override + public Iterator iterator() { + return new TracedIterator(inner.iterator()); + } + + @Override + public void close() { + if (!consumed && scope != null) { + consumed = true; + scope.close(); + } + } + + private final class TracedIterator implements Iterator { + private final Iterator innerIterator; + private final ResponseAccumulator accumulator; + + TracedIterator(Iterator innerIterator) { + this.innerIterator = innerIterator; + this.accumulator = ResponseAccumulator.create(); + } + + @Override + public boolean hasNext() { + try { + boolean hasNext = innerIterator.hasNext(); + if (!hasNext) { + finalizeStream(); + } + return hasNext; + } catch (RuntimeException ex) { + recordErrorAndClose(ex); + throw LOGGER.logExceptionAsError(ex); + } + } + + @Override + public ResponseStreamEvent next() { + try { + ResponseStreamEvent event = innerIterator.next(); + accumulator.accumulate(event); + return event; + } catch (NoSuchElementException ex) { + finalizeStream(); + throw LOGGER.logExceptionAsError(ex); + } catch (RuntimeException ex) { + recordErrorAndClose(ex); + throw LOGGER.logExceptionAsError(ex); + } + } + + private void recordErrorAndClose(Throwable ex) { + if (scope != null && !consumed) { + scope.recordError(ex); + scope.close(); + consumed = true; + } + } + + private void finalizeStream() { + if (scope == null || consumed) { + return; + } + consumed = true; + + Response response = accumulator.response(); + if (response != null) { + responseTracing.recordResponseAttributes(scope, response, isInvokeAgent); + } + + scope.close(); + } + } +} diff --git a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingAzureMonitorSample.java b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingAzureMonitorSample.java new file mode 100644 index 000000000000..12ccaacfea3b --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingAzureMonitorSample.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents; + +import com.azure.ai.agents.models.AgentReference; +import com.azure.ai.agents.models.AgentVersionDetails; +import com.azure.ai.agents.models.AzureCreateResponseOptions; +import com.azure.ai.agents.models.PromptAgentDefinition; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.monitor.opentelemetry.autoconfigure.AzureMonitorAutoConfigure; +import com.openai.models.responses.Response; +import com.openai.models.responses.ResponseCreateParams; +import io.opentelemetry.api.trace.Span; +import io.opentelemetry.api.trace.Tracer; +import io.opentelemetry.context.Scope; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk; +import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder; + +/** + * Sample demonstrating GenAI tracing exported to Azure Monitor (Application Insights). + * + *

As with the console sample, there is no {@code enableGenAiTracing()} opt-in: tracing activates automatically + * once OpenTelemetry is configured (here via Azure Monitor autoconfigure, registered globally). Set the + * {@code AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED} environment variable to {@code true} to also capture + * message/agent content.

+ * + *

Prerequisites:

+ *
    + *
  • {@code FOUNDRY_PROJECT_ENDPOINT} and {@code FOUNDRY_MODEL_NAME} environment variables set
  • + *
  • {@code APPLICATIONINSIGHTS_CONNECTION_STRING} environment variable set
  • + *
  • Logged in via {@code az login}
  • + *
+ * + *

To run this sample, add these dependencies to your project:

+ *
    + *
  • {@code com.azure:azure-ai-agents}
  • + *
  • {@code com.azure:azure-monitor-opentelemetry-autoconfigure}
  • + *
  • {@code com.azure:azure-identity}
  • + *
  • {@code com.azure:azure-core-tracing-opentelemetry}
  • + *
+ */ +public final class TracingAzureMonitorSample { + + /** + * Runs the Azure Monitor tracing sample. + * + * @param args unused. + */ + @SuppressWarnings("try") + public static void main(String[] args) { + String endpoint = System.getenv("FOUNDRY_PROJECT_ENDPOINT"); + String model = System.getenv("FOUNDRY_MODEL_NAME"); + String appInsightsConnectionString = System.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING"); + + // 1. Configure the Azure Monitor OpenTelemetry exporter and register it globally. + AutoConfiguredOpenTelemetrySdkBuilder sdkBuilder = AutoConfiguredOpenTelemetrySdk.builder(); + AzureMonitorAutoConfigure.customize(sdkBuilder, appInsightsConnectionString); + sdkBuilder.setResultAsGlobal(); + OpenTelemetrySdk openTelemetry = sdkBuilder.build().getOpenTelemetrySdk(); + + // 2. Optionally group the operations under a parent span. + Tracer tracer = openTelemetry.getTracer("azure-monitor-tracing-sample"); + Span parentSpan = tracer.spanBuilder("travel-assistant-workflow").startSpan(); + try (Scope scope = parentSpan.makeCurrent()) { + // 3. Build the clients. The configured OpenTelemetry is picked up automatically. + AgentsClientBuilder builder + = new AgentsClientBuilder().endpoint(endpoint).credential(new DefaultAzureCredentialBuilder().build()); + AgentsClient agentsClient = builder.buildAgentsClient(); + ResponsesClient responsesClient = builder.buildResponsesClient(); + + // 4. Create an agent - produces a "create_agent" span nested under the parent span. + String agentName = "AzureMonitorTracingSample"; + AgentVersionDetails agent = agentsClient.createAgentVersion(agentName, + new PromptAgentDefinition(model).setInstructions("You are a travel assistant. Help users plan trips.")); + System.out.println("Agent created: " + agent.getName()); + + // 5. Generate a response - produces an "invoke_agent" span. + AzureCreateResponseOptions azureOptions + = new AzureCreateResponseOptions().setAgentReference(new AgentReference(agentName)); + ResponseCreateParams.Builder params = ResponseCreateParams.builder().input("Plan a 3-day trip to Tokyo."); + Response response = responsesClient.createAzureResponse(azureOptions, params); + System.out.println("Response ID: " + response.id()); + + agentsClient.deleteAgent(agentName); + } finally { + parentSpan.end(); + } + + // 6. Flush all pending spans to Azure Monitor before exiting. + openTelemetry.close(); + System.out.println("Done. Traces will appear in Application Insights within a few minutes."); + } + + private TracingAzureMonitorSample() { + } +} diff --git a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingConsoleSample.java b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingConsoleSample.java new file mode 100644 index 000000000000..183b17c4238a --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingConsoleSample.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents; + +import com.azure.ai.agents.models.AgentReference; +import com.azure.ai.agents.models.AgentVersionDetails; +import com.azure.ai.agents.models.AzureCreateResponseOptions; +import com.azure.ai.agents.models.PromptAgentDefinition; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.openai.models.responses.Response; +import com.openai.models.responses.ResponseCreateParams; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.exporter.logging.LoggingSpanExporter; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.resources.Resource; +import io.opentelemetry.sdk.trace.SdkTracerProvider; +import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; + +/** + * Sample demonstrating GenAI tracing exported to the console. + * + *

Unlike the original experimental design, there is no {@code enableGenAiTracing()} / {@code disableGenAiTracing()} + * opt-in: tracing activates automatically once an OpenTelemetry implementation is configured (here registered + * globally). To also capture message/agent content, set the + * {@code AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED} environment variable to {@code true} (it is off by + * default).

+ * + *

To run this sample, add these dependencies to your project:

+ *
    + *
  • {@code com.azure:azure-ai-agents}
  • + *
  • {@code com.azure:azure-core-tracing-opentelemetry}
  • + *
  • {@code com.azure:azure-identity}
  • + *
  • {@code io.opentelemetry:opentelemetry-sdk}
  • + *
  • {@code io.opentelemetry:opentelemetry-exporter-logging}
  • + *
+ */ +public final class TracingConsoleSample { + + /** + * Runs the console tracing sample. + * + * @param args unused. + */ + public static void main(String[] args) { + // 1. Configure OpenTelemetry with a console span exporter and register it globally. + SdkTracerProvider tracerProvider = SdkTracerProvider.builder() + .addSpanProcessor(SimpleSpanProcessor.create(LoggingSpanExporter.create())) + .setResource(Resource.getDefault() + .toBuilder() + .put(AttributeKey.stringKey("service.name"), "genai-tracing-sample") + .build()) + .build(); + OpenTelemetrySdk openTelemetry + = OpenTelemetrySdk.builder().setTracerProvider(tracerProvider).buildAndRegisterGlobal(); + + // 2. Build the clients. No tracing opt-in call is required; the configured OpenTelemetry is picked up. + String endpoint = System.getenv("FOUNDRY_PROJECT_ENDPOINT"); + String model = System.getenv("FOUNDRY_MODEL_NAME"); + AgentsClientBuilder builder + = new AgentsClientBuilder().endpoint(endpoint).credential(new DefaultAzureCredentialBuilder().build()); + AgentsClient agentsClient = builder.buildAgentsClient(); + ResponsesClient responsesClient = builder.buildResponsesClient(); + + // 3. Create an agent - produces a "create_agent" span. + String agentName = "TracingSampleAgent"; + AgentVersionDetails agent = agentsClient.createAgentVersion(agentName, + new PromptAgentDefinition(model).setInstructions("You are a helpful assistant that answers concisely.") + .setTemperature(0.7)); + System.out.println("Agent created: " + agent.getName() + ":" + agent.getVersion()); + + // 4. Generate a response - produces an "invoke_agent" span. + AzureCreateResponseOptions azureOptions + = new AzureCreateResponseOptions().setAgentReference(new AgentReference(agentName)); + ResponseCreateParams.Builder params = ResponseCreateParams.builder().input("What is the capital of France?"); + Response response = responsesClient.createAzureResponse(azureOptions, params); + System.out.println("Response ID: " + response.id()); + + // 5. Clean up and flush the spans to the console. + agentsClient.deleteAgent(agentName); + tracerProvider.close(); + System.out.println("Done. Check the console output for spans."); + } + + private TracingConsoleSample() { + } +} diff --git a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingSample.java b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingSample.java new file mode 100644 index 000000000000..cddd632eb604 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingSample.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents; + +import com.azure.ai.agents.models.AgentDefinition; +import com.azure.ai.agents.models.AgentVersionDetails; +import com.azure.ai.agents.models.PromptAgentDefinition; +import com.azure.core.tracing.opentelemetry.OpenTelemetryTracingOptions; +import com.azure.core.util.ClientOptions; +import com.azure.identity.DefaultAzureCredentialBuilder; +import io.opentelemetry.sdk.OpenTelemetrySdk; + +/** + * Sample showing how experimental GenAI tracing is enabled for {@link AgentsClient} by configuring an OpenTelemetry + * implementation through the client's {@link ClientOptions}. When an OpenTelemetry SDK is configured the client emits + * GenAI semantic-convention spans and metrics automatically; there is no explicit opt-in call. Set the + * {@code AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED} environment variable to also capture message/agent content. + */ +public final class TracingSample { + + /** + * Runs the tracing sample. + * + * @param args ignored. + */ + public static void main(String[] args) { + String endpoint = System.getenv("FOUNDRY_PROJECT_ENDPOINT"); + + // BEGIN: com.azure.ai.agents.tracing + // Configure any OpenTelemetry SDK (exporters, sampling, etc.) and pass it through ClientOptions. The client + // then emits GenAI spans (create_agent, chat / invoke_agent, create_conversation) and metrics automatically. + OpenTelemetrySdk openTelemetry = OpenTelemetrySdk.builder().build(); + AgentsClient agentsClient = new AgentsClientBuilder().endpoint(endpoint) + .credential(new DefaultAzureCredentialBuilder().build()) + .clientOptions(new ClientOptions() + .setTracingOptions(new OpenTelemetryTracingOptions().setOpenTelemetry(openTelemetry))) + .buildAgentsClient(); + + AgentDefinition definition + = new PromptAgentDefinition("gpt-4o").setInstructions("You are a helpful assistant."); + AgentVersionDetails agent = agentsClient.createAgentVersion("my-agent", definition); + System.out.printf("Created agent %s (traced).%n", agent.getName()); + // END: com.azure.ai.agents.tracing + } + + private TracingSample() { + } +} diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/http/HttpClientHelperTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/http/HttpClientHelperTests.java index bf3b9a4bd77b..b406c08a52ec 100644 --- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/http/HttpClientHelperTests.java +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/http/HttpClientHelperTests.java @@ -8,6 +8,7 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; +import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.test.http.MockHttpResponse; import com.azure.core.util.Context; import com.openai.core.http.HttpRequestBody; @@ -23,10 +24,13 @@ import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -51,6 +55,37 @@ void executeAsyncCompletesSuccessfully() { assertEquals(1, recordingClient.getSendCount()); } + @Test + void executeAsyncRestoresTraceContextFromRequestHeaders() { + Context parent = new Context("parent", "chat"); + OpenAITracingContextBridge contextBridge = new OpenAITracingContextBridge(); + String token = contextBridge.register(parent); + + RecordingHttpClient recordingClient + = new RecordingHttpClient(request -> createMockResponse(request, 204, new HttpHeaders(), "")); + AtomicReference pipelineContext = new AtomicReference<>(); + HttpPipelinePolicy captureContextPolicy = (context, next) -> { + pipelineContext.set(context.getContext()); + return next.process(); + }; + com.openai.core.http.HttpClient openAiClient = HttpClientHelper.mapToOpenAIHttpClient( + new HttpPipelineBuilder().policies(captureContextPolicy).httpClient(recordingClient).build(), + contextBridge); + com.openai.core.http.HttpRequest request = com.openai.core.http.HttpRequest.builder() + .method(com.openai.core.http.HttpMethod.GET) + .baseUrl("https://example.com") + .putHeader(OpenAITracingContextBridge.TRACE_CONTEXT_HEADER, token) + .build(); + + try (com.openai.core.http.HttpResponse response = openAiClient.executeAsync(request).join()) { + assertEquals(204, response.statusCode()); + assertSame(parent, pipelineContext.get()); + assertNull(recordingClient.getLastRequest() + .getHeaders() + .getValue(OpenAITracingContextBridge.TRACE_CONTEXT_HEADER)); + } + } + @Test void executeWithNullRequestBodySucceeds() throws Exception { RecordingHttpClient recordingClient = new RecordingHttpClient(request -> { @@ -217,6 +252,7 @@ HttpRequest getLastRequest() { int getSendCount() { return sendCount; } + } private static final class TestHttpRequestBody implements HttpRequestBody { diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiAgentTracingTest.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiAgentTracingTest.java new file mode 100644 index 000000000000..f6cce33d5ccf --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiAgentTracingTest.java @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.ai.agents.models.AgentVersionDetails; +import com.azure.ai.agents.models.PromptAgentDefinition; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.tracing.opentelemetry.OpenTelemetryTracingOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.core.util.ConfigurationBuilder; +import com.azure.core.util.LibraryTelemetryOptions; +import com.azure.core.util.metrics.Meter; +import com.azure.core.util.metrics.MeterProvider; +import com.azure.core.util.tracing.Tracer; +import com.azure.core.util.tracing.TracerProvider; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.trace.StatusCode; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.trace.ReadWriteSpan; +import io.opentelemetry.sdk.trace.ReadableSpan; +import io.opentelemetry.sdk.trace.SdkTracerProvider; +import io.opentelemetry.sdk.trace.SpanProcessor; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ConcurrentLinkedDeque; +import java.util.concurrent.atomic.AtomicBoolean; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for {@link GenAiAgentTracing} against a real in-memory OpenTelemetry SDK (no live service). + */ +public final class GenAiAgentTracingTest { + + private static final String ENDPOINT_HOST = "contoso.services.ai.azure.com"; + private static final String ENDPOINT = "https://" + ENDPOINT_HOST; + private static final String AZ_NAMESPACE_NAME = "Microsoft.CognitiveServices"; + private static final String AGENT_NAME = "weather-agent"; + + private static final AttributeKey AZ_NAMESPACE = AttributeKey.stringKey("az.namespace"); + private static final AttributeKey GEN_AI_PROVIDER_NAME = AttributeKey.stringKey("gen_ai.provider.name"); + private static final AttributeKey GEN_AI_OPERATION_NAME = AttributeKey.stringKey("gen_ai.operation.name"); + private static final AttributeKey GEN_AI_AGENT_NAME = AttributeKey.stringKey("gen_ai.agent.name"); + private static final AttributeKey GEN_AI_AGENT_ID = AttributeKey.stringKey("gen_ai.agent.id"); + private static final AttributeKey GEN_AI_AGENT_VERSION = AttributeKey.stringKey("gen_ai.agent.version"); + private static final AttributeKey GEN_AI_AGENT_TYPE = AttributeKey.stringKey("gen_ai.agent.type"); + private static final AttributeKey GEN_AI_REQUEST_MODEL = AttributeKey.stringKey("gen_ai.request.model"); + private static final AttributeKey GEN_AI_SYSTEM_INSTRUCTIONS + = AttributeKey.stringKey("gen_ai.system_instructions"); + private static final AttributeKey SERVER_ADDRESS = AttributeKey.stringKey("server.address"); + + private TestSpanProcessor spanProcessor; + private Tracer tracer; + private Meter meter; + + @BeforeEach + public void setup() { + spanProcessor = new TestSpanProcessor(); + final OpenTelemetryTracingOptions tracingOptions + = new OpenTelemetryTracingOptions().setOpenTelemetry(OpenTelemetrySdk.builder() + .setTracerProvider(SdkTracerProvider.builder().addSpanProcessor(spanProcessor).build()) + .build()); + tracer = TracerProvider.getDefaultProvider() + .createTracer(new LibraryTelemetryOptions("test").setResourceProviderNamespace(AZ_NAMESPACE_NAME) + .setSchemaUrl(GenAiInstrumentation.OTEL_SCHEMA_URL), tracingOptions); + meter = MeterProvider.getDefaultProvider().createMeter("test", null, null); + } + + private GenAiAgentTracing agentTracing(boolean captureContent) { + return new GenAiAgentTracing(new GenAiInstrumentation(ENDPOINT, configuration(captureContent), tracer, meter)); + } + + @ParameterizedTest + @ValueSource(booleans = { true, false }) + public void tracesPromptAgentCreation(boolean captureContent) { + PromptAgentDefinition definition + = new PromptAgentDefinition("gpt-4o").setTemperature(0.5).setTopP(0.9).setInstructions("Be helpful"); + AgentVersionDetails response = agentVersionResponse(); + + AgentVersionDetails result = agentTracing(captureContent).traceCreateAgentVersion(AGENT_NAME, definition, + (request, options) -> response, BinaryData.fromString("{}"), new RequestOptions()); + + assertSame(response, result); + ReadableSpan span = getSpan(); + Attributes attrs = span.getAttributes(); + assertEquals(AZ_NAMESPACE_NAME, attrs.get(AZ_NAMESPACE)); + assertEquals("create_agent", attrs.get(GEN_AI_OPERATION_NAME)); + assertEquals("microsoft.foundry", attrs.get(GEN_AI_PROVIDER_NAME)); + assertEquals(AGENT_NAME, attrs.get(GEN_AI_AGENT_NAME)); + assertEquals("prompt", attrs.get(GEN_AI_AGENT_TYPE)); + assertEquals("gpt-4o", attrs.get(GEN_AI_REQUEST_MODEL)); + assertEquals(ENDPOINT_HOST, attrs.get(SERVER_ADDRESS)); + // Enriched from the response: agent id is "name:version". + assertEquals(AGENT_NAME + ":1", attrs.get(GEN_AI_AGENT_ID)); + assertEquals("1", attrs.get(GEN_AI_AGENT_VERSION)); + // System instructions attribute is always present but content is gated. + String instructions = attrs.get(GEN_AI_SYSTEM_INSTRUCTIONS); + assertNotNull(instructions); + assertEquals(captureContent, instructions.contains("Be helpful")); + assertEquals(GenAiInstrumentation.OTEL_SCHEMA_URL, + span.toSpanData().getInstrumentationScopeInfo().getSchemaUrl()); + } + + @Test + public void tracesAsyncPromptAgentCreation() { + PromptAgentDefinition definition = new PromptAgentDefinition("gpt-4o"); + AgentVersionDetails response = agentVersionResponse(); + + AgentVersionDetails result = agentTracing(false).traceCreateAgentVersionAsync(AGENT_NAME, definition, + (request, options) -> Mono.just(response), BinaryData.fromString("{}"), new RequestOptions()).block(); + + assertSame(response, result); + Attributes attrs = getSpan().getAttributes(); + assertEquals("create_agent", attrs.get(GEN_AI_OPERATION_NAME)); + assertEquals(AGENT_NAME, attrs.get(GEN_AI_AGENT_NAME)); + assertEquals(AGENT_NAME + ":1", attrs.get(GEN_AI_AGENT_ID)); + } + + @Test + public void syncOperationThrowsPropagatesAndEndsSpan() { + RuntimeException failure = new RuntimeException("boom"); + RuntimeException thrown = assertThrows(RuntimeException.class, () -> agentTracing(false) + .traceCreateAgentVersion(AGENT_NAME, new PromptAgentDefinition("gpt-4o"), (request, options) -> { + throw failure; + }, BinaryData.fromString("{}"), new RequestOptions())); + + assertSame(failure, thrown); + assertEquals(StatusCode.ERROR, getSpan().toSpanData().getStatus().getStatusCode()); + } + + @Test + public void asyncOperationErrorPropagatesAndEndsSpan() { + RuntimeException failure = new RuntimeException("boom"); + RuntimeException thrown = assertThrows(RuntimeException.class, + () -> agentTracing(false) + .traceCreateAgentVersionAsync(AGENT_NAME, new PromptAgentDefinition("gpt-4o"), + (request, options) -> Mono.error(failure), BinaryData.fromString("{}"), new RequestOptions()) + .block()); + + assertSame(failure, thrown); + assertEquals(StatusCode.ERROR, getSpan().toSpanData().getStatus().getStatusCode()); + } + + @Test + public void tracingDisabledOperationStillRuns() { + Tracer disabled = TracerProvider.getDefaultProvider().createTracer("test", null, AZ_NAMESPACE_NAME, null); + GenAiAgentTracing tracing + = new GenAiAgentTracing(new GenAiInstrumentation(ENDPOINT, configuration(false), disabled, meter)); + AtomicBoolean invoked = new AtomicBoolean(false); + AgentVersionDetails response = agentVersionResponse(); + + AgentVersionDetails result + = tracing.traceCreateAgentVersion(AGENT_NAME, new PromptAgentDefinition("gpt-4o"), (request, options) -> { + invoked.set(true); + return response; + }, BinaryData.fromString("{}"), new RequestOptions()); + + assertTrue(invoked.get()); + assertSame(response, result); + assertTrue(spanProcessor.getEndedSpans().isEmpty()); + } + + @Test + public void experimentalGateDisabledOperationDoesNotEmitGenAiSpan() { + GenAiAgentTracing tracing = new GenAiAgentTracing( + new GenAiInstrumentation(ENDPOINT, new ConfigurationBuilder().build(), tracer, meter)); + AgentVersionDetails response = agentVersionResponse(); + + AgentVersionDetails result = tracing.traceCreateAgentVersion(AGENT_NAME, new PromptAgentDefinition("gpt-4o"), + (request, options) -> response, BinaryData.fromString("{}"), new RequestOptions()); + + assertSame(response, result); + assertTrue(spanProcessor.getEndedSpans().isEmpty()); + } + + @Test + public void standardContentSettingOverridesLegacySetting() { + Configuration configuration + = new ConfigurationBuilder().putProperty("experimental.enable_genai_tracing", "true") + .putProperty("otel.instrumentation.genai.capture_message_content", "false") + .putProperty("azure.tracing.gen_ai.content_recording_enabled", "true") + .build(); + GenAiAgentTracing tracing + = new GenAiAgentTracing(new GenAiInstrumentation(ENDPOINT, configuration, tracer, meter)); + + tracing.traceCreateAgentVersion(AGENT_NAME, + new PromptAgentDefinition("gpt-4o").setInstructions("Sensitive instructions"), + (request, options) -> agentVersionResponse(), BinaryData.fromString("{}"), new RequestOptions()); + + String instructions = getSpan().getAttributes().get(GEN_AI_SYSTEM_INSTRUCTIONS); + assertNotNull(instructions); + assertFalse(instructions.contains("Sensitive instructions")); + } + + @Test + public void legacyContentSettingRemainsSupported() { + Configuration configuration + = new ConfigurationBuilder().putProperty("experimental.enable_genai_tracing", "true") + .putProperty("azure.tracing.gen_ai.content_recording_enabled", "true") + .build(); + GenAiAgentTracing tracing + = new GenAiAgentTracing(new GenAiInstrumentation(ENDPOINT, configuration, tracer, meter)); + + tracing.traceCreateAgentVersion(AGENT_NAME, + new PromptAgentDefinition("gpt-4o").setInstructions("Legacy opt-in"), + (request, options) -> agentVersionResponse(), BinaryData.fromString("{}"), new RequestOptions()); + + assertTrue(getSpan().getAttributes().get(GEN_AI_SYSTEM_INSTRUCTIONS).contains("Legacy opt-in")); + } + + private ReadableSpan getSpan() { + List spans = spanProcessor.getEndedSpans(); + assertFalse(spans.isEmpty(), "Expected at least one ended span."); + ReadableSpan span + = spans.stream().filter(s -> ("create_agent " + AGENT_NAME).equals(s.getName())).findFirst().orElse(null); + assertNotNull(span, "create_agent span not found."); + return span; + } + + private static AgentVersionDetails agentVersionResponse() { + String json = "{\"name\":\"" + AGENT_NAME + "\",\"version\":\"1\"}"; + try (JsonReader reader = JsonProviders.createReader(json)) { + return AgentVersionDetails.fromJson(reader); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + private static Configuration configuration(boolean captureContent) { + return new ConfigurationBuilder().putProperty("experimental.enable_genai_tracing", "true") + .putProperty("otel.instrumentation.genai.capture_message_content", Boolean.toString(captureContent)) + .build(); + } + + private static final class TestSpanProcessor implements SpanProcessor { + private final ConcurrentLinkedDeque spans = new ConcurrentLinkedDeque<>(); + + List getEndedSpans() { + return new ArrayList<>(spans); + } + + @Override + public void onStart(io.opentelemetry.context.Context parentContext, ReadWriteSpan span) { + } + + @Override + public boolean isStartRequired() { + return false; + } + + @Override + public void onEnd(ReadableSpan span) { + spans.add(span); + } + + @Override + public boolean isEndRequired() { + return true; + } + } +} diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiMessageFormatterTest.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiMessageFormatterTest.java new file mode 100644 index 000000000000..97f0eb557565 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiMessageFormatterTest.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for {@link GenAiMessageFormatter}, focused on the content-recording privacy gate and the corrected + * tool-call output formatting. + */ +public final class GenAiMessageFormatterTest { + + @Test + public void serializationRoundTripsSpecialCharacters() throws IOException { + String content = "quote=\" slash=\\ newline=\n control=\u0001"; + + Map message = firstMessage(GenAiMessageFormatter.formatUserTextInput(true, content)); + Map part = firstPart(message); + + assertEquals(content, part.get("content")); + } + + @Test + public void userTextInputRespectsContentGate() { + String on = GenAiMessageFormatter.formatUserTextInput(true, "hello"); + assertTrue(on.contains("\"content\":\"hello\"")); + + String off = GenAiMessageFormatter.formatUserTextInput(false, "hello"); + assertFalse(off.contains("hello")); + assertTrue(off.contains("\"type\":\"text\"")); + } + + @Test + public void systemInstructionsRespectContentGate() { + assertTrue(GenAiMessageFormatter.formatSystemInstructions(true, "be nice").contains("\"content\":\"be nice\"")); + assertEquals("[{\"type\":\"text\"}]", GenAiMessageFormatter.formatSystemInstructions(false, "be nice")); + } + + @Test + public void toolResponseInputRespectsContentGate() { + String on = GenAiMessageFormatter.formatToolResponseInput(true, "call-1", "result-text"); + assertTrue(on.contains("\"result\":\"result-text\"")); + + String off = GenAiMessageFormatter.formatToolResponseInput(false, "call-1", "result-text"); + assertFalse(off.contains("result-text")); + assertTrue(off.contains("\"id\":\"call-1\"")); + } + + @Test + public void toolResponseSerializesStructuredJsonResult() throws IOException { + Map message + = firstMessage(GenAiMessageFormatter.formatToolResponseInput(true, "call-1", "{\"value\":[1,true]}")); + Object result = firstPart(message).get("result"); + + assertTrue(result instanceof Map); + assertEquals(1, ((List) ((Map) result).get("value")).get(0)); + } + + @Test + public void toolResponsePreservesMalformedJsonAsString() throws IOException { + String malformedResult = "{\"unterminated\":}"; + Map message + = firstMessage(GenAiMessageFormatter.formatToolResponseInput(true, "call-1", malformedResult)); + + assertEquals(malformedResult, firstPart(message).get("result")); + } + + @Test + public void toolResponsePreservesJsonWithTrailingContentAsString() throws IOException { + String malformedResult = "{\"first\":1}{\"second\":2}"; + Map message + = firstMessage(GenAiMessageFormatter.formatToolResponseInput(true, "call-1", malformedResult)); + + assertEquals(malformedResult, firstPart(message).get("result")); + } + + @Test + public void toolResponsePreservesLargeJsonNumbers() throws IOException { + String result = "{\"integer\":9223372036854775808,\"decimal\":1e400}"; + Map message + = firstMessage(GenAiMessageFormatter.formatToolResponseInput(true, "call-1", result)); + Map structuredResult = (Map) firstPart(message).get("result"); + + assertTrue(structuredResult.get("integer") instanceof Number); + assertTrue(structuredResult.get("decimal") instanceof Number); + } + + @Test + public void deeplyNestedToolResponseFallsBackToString() throws IOException { + StringBuilder result = new StringBuilder(); + for (int i = 0; i < 1001; i++) { + result.append('['); + } + for (int i = 0; i < 1001; i++) { + result.append(']'); + } + + Map message + = firstMessage(GenAiMessageFormatter.formatToolResponseInput(true, "call-1", result.toString())); + + assertEquals(result.toString(), firstPart(message).get("result")); + } + + @Test + public void toolCallOutputAlwaysIncludesTypeAndGatesContent() { + // Corrected behaviour: the nested content object (with the tool type) is always emitted, even when the + // extra content argument is null; the extra content value is only included when content recording is on. + String withContent = GenAiMessageFormatter.formatToolCallOutput(true, "call-1", "function_call", "extra"); + assertTrue(withContent.contains("\"type\":\"function_call\"")); + assertTrue(withContent.contains("\"content\":\"extra\"")); + + String gatedOff = GenAiMessageFormatter.formatToolCallOutput(false, "call-1", "function_call", "extra"); + assertTrue(gatedOff.contains("\"type\":\"function_call\"")); + assertFalse(gatedOff.contains("\"content\":\"extra\"")); + + String nullContent = GenAiMessageFormatter.formatToolCallOutput(true, "call-1", "code_interpreter_call", null); + assertTrue(nullContent.contains("\"type\":\"code_interpreter_call\"")); + assertTrue(nullContent.contains("\"id\":\"call-1\"")); + } + + @SuppressWarnings("unchecked") + private static Map firstMessage(String json) throws IOException { + try (JsonReader reader = JsonProviders.createReader(json)) { + return (Map) ((List) reader.readUntyped()).get(0); + } + } + + @SuppressWarnings("unchecked") + private static Map firstPart(Map message) { + return (Map) ((List) message.get("parts")).get(0); + } +} diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiMetricsTest.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiMetricsTest.java new file mode 100644 index 000000000000..fc7f89197b20 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiMetricsTest.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.core.metrics.opentelemetry.OpenTelemetryMetricsOptions; +import com.azure.core.util.ConfigurationBuilder; +import com.azure.core.util.metrics.Meter; +import com.azure.core.util.metrics.MeterProvider; +import com.azure.core.util.tracing.Tracer; +import com.azure.core.util.tracing.TracerProvider; +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.metrics.SdkMeterProvider; +import io.opentelemetry.sdk.metrics.data.MetricData; +import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for GenAI metric values and dimensions. + */ +public final class GenAiMetricsTest { + private static final AttributeKey OPERATION_NAME = AttributeKey.stringKey("gen_ai.operation.name"); + private static final AttributeKey PROVIDER_NAME = AttributeKey.stringKey("gen_ai.provider.name"); + private static final AttributeKey REQUEST_MODEL = AttributeKey.stringKey("gen_ai.request.model"); + private static final AttributeKey TOKEN_TYPE = AttributeKey.stringKey("gen_ai.token.type"); + private static final AttributeKey SERVER_ADDRESS = AttributeKey.stringKey("server.address"); + private static final AttributeKey ERROR_TYPE = AttributeKey.stringKey("error.type"); + + private InMemoryMetricReader metricReader; + private SdkMeterProvider sdkMeterProvider; + private GenAiInstrumentation instrumentation; + + @BeforeEach + public void setup() { + metricReader = InMemoryMetricReader.create(); + sdkMeterProvider = SdkMeterProvider.builder().registerMetricReader(metricReader).build(); + OpenTelemetry openTelemetry = OpenTelemetrySdk.builder().setMeterProvider(sdkMeterProvider).build(); + Meter meter = MeterProvider.getDefaultProvider() + .createMeter("test", "1.0.0", new OpenTelemetryMetricsOptions().setOpenTelemetry(openTelemetry)); + Tracer tracer = TracerProvider.getDefaultProvider().createTracer("test", null, null, null); + instrumentation = new GenAiInstrumentation("https://contoso.services.ai.azure.com", + new ConfigurationBuilder().putProperty("experimental.enable_genai_tracing", "true").build(), tracer, meter); + } + + @AfterEach + public void cleanup() { + sdkMeterProvider.close(); + } + + @Test + public void recordsResponseDurationAndTokenMetrics() { + GenAiTracingScope scope = instrumentation.startChat("gpt-4o"); + assertNotNull(scope); + scope.setRequestModelAttributes("gpt-4o", null, null); + scope.setResponseAttributes("response-1", "gpt-4.1", 12L, 7L, "stop"); + scope.close(); + + Collection metrics = metricReader.collectAllMetrics(); + MetricData duration = metric(metrics, "gen_ai.client.operation.duration"); + assertEquals("s", duration.getUnit()); + assertTrue(duration.getHistogramData().getPoints().stream().findFirst().get().getSum() >= 0); + assertCommonAttributes(duration.getHistogramData().getPoints().stream().findFirst().get().getAttributes(), + "gpt-4.1"); + + MetricData tokenUsage = metric(metrics, "gen_ai.client.token.usage"); + assertEquals("token", tokenUsage.getUnit()); + List tokenPoints + = tokenUsage.getHistogramData().getPoints().stream().collect(Collectors.toList()); + assertEquals(2, tokenPoints.size()); + assertEquals(12.0, + tokenPoints.stream() + .filter(point -> "input".equals(point.getAttributes().get(TOKEN_TYPE))) + .findFirst() + .get() + .getSum()); + assertEquals(7.0, + tokenPoints.stream() + .filter(point -> "completion".equals(point.getAttributes().get(TOKEN_TYPE))) + .findFirst() + .get() + .getSum()); + tokenPoints.forEach(point -> assertCommonAttributes(point.getAttributes(), "gpt-4.1")); + } + + @Test + public void recordsRequestModelFallbackAndErrorDimension() { + GenAiTracingScope scope = instrumentation.startInvokeAgent("weather-agent"); + assertNotNull(scope); + scope.setRequestModelAttributes("gpt-4o", null, null); + scope.recordError(new IllegalStateException("boom")); + scope.close(); + + MetricData duration = metric(metricReader.collectAllMetrics(), "gen_ai.client.operation.duration"); + io.opentelemetry.sdk.metrics.data.HistogramPointData point + = duration.getHistogramData().getPoints().stream().findFirst().get(); + assertCommonAttributes(point.getAttributes(), "gpt-4o"); + assertEquals(IllegalStateException.class.getName(), point.getAttributes().get(ERROR_TYPE)); + } + + private static MetricData metric(Collection metrics, String name) { + MetricData result = metrics.stream().filter(metric -> name.equals(metric.getName())).findFirst().orElse(null); + assertNotNull(result, "Metric not found: " + name); + return result; + } + + private static void assertCommonAttributes(io.opentelemetry.api.common.Attributes attributes, String model) { + assertEquals("responses", attributes.get(OPERATION_NAME)); + assertEquals("microsoft.foundry", attributes.get(PROVIDER_NAME)); + assertEquals("contoso.services.ai.azure.com", attributes.get(SERVER_ADDRESS)); + assertEquals(model, attributes.get(REQUEST_MODEL)); + } +} diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiResponseTracingTest.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiResponseTracingTest.java new file mode 100644 index 000000000000..b417aaa9a9f3 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/implementation/telemetry/GenAiResponseTracingTest.java @@ -0,0 +1,418 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.agents.implementation.telemetry; + +import com.azure.ai.agents.implementation.http.OpenAITracingContextBridge; +import com.azure.ai.agents.implementation.OpenAIJsonHelper; +import com.azure.ai.agents.models.AzureCreateResponseOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.tracing.opentelemetry.OpenTelemetryTracingOptions; +import com.azure.core.util.ConfigurationBuilder; +import com.azure.core.util.metrics.Meter; +import com.azure.core.util.metrics.MeterProvider; +import com.azure.core.util.tracing.Tracer; +import com.azure.core.util.tracing.TracerProvider; +import com.openai.core.JsonValue; +import com.openai.core.ObjectMappers; +import com.openai.core.http.Headers; +import com.openai.core.http.HttpResponseFor; +import com.openai.core.http.StreamResponse; +import com.openai.models.conversations.Conversation; +import com.openai.models.responses.Response; +import com.openai.models.responses.ResponseCreateParams; +import com.openai.models.responses.ResponseStreamEvent; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.trace.StatusCode; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.trace.ReadWriteSpan; +import io.opentelemetry.sdk.trace.ReadableSpan; +import io.opentelemetry.sdk.trace.SdkTracerProvider; +import io.opentelemetry.sdk.trace.SpanProcessor; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import reactor.core.Disposable; +import reactor.core.publisher.Mono; + +import java.util.ArrayList; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentLinkedDeque; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for response tracing lifecycle behavior that does not require a live service. + */ +public final class GenAiResponseTracingTest { + + private static final String CONVERSATION_ID = "conversation-1"; + private static final AttributeKey GEN_AI_CONVERSATION_ID = AttributeKey.stringKey("gen_ai.conversation.id"); + + private TestSpanProcessor spanProcessor; + private GenAiResponseTracing responseTracing; + + @BeforeEach + public void setup() { + spanProcessor = new TestSpanProcessor(); + OpenTelemetrySdk openTelemetry = OpenTelemetrySdk.builder() + .setTracerProvider(SdkTracerProvider.builder().addSpanProcessor(spanProcessor).build()) + .build(); + Tracer tracer = TracerProvider.getDefaultProvider() + .createTracer("test", null, "Microsoft.CognitiveServices", + new OpenTelemetryTracingOptions().setOpenTelemetry(openTelemetry)); + Meter meter = MeterProvider.getDefaultProvider().createMeter("test", null, null); + responseTracing = new GenAiResponseTracing(new GenAiInstrumentation("https://contoso.services.ai.azure.com", + new ConfigurationBuilder().putProperty("experimental.enable_genai_tracing", "true").build(), tracer, meter), + new OpenAITracingContextBridge()); + } + + @Test + public void tracesConversationAroundSyncOperation() { + Conversation conversation = conversation(); + + Conversation result = responseTracing.traceCreateConversation(() -> conversation); + + assertSame(conversation, result); + assertEquals(CONVERSATION_ID, getConversationSpan().getAttributes().get(GEN_AI_CONVERSATION_ID)); + } + + @Test + public void tracesConversationAroundAsyncOperation() { + Conversation conversation = conversation(); + + Conversation result = responseTracing.traceCreateConversationAsync(params -> { + assertTrue(io.opentelemetry.api.trace.Span.current().getSpanContext().isValid()); + assertTrue(params._additionalHeaders().names().contains(OpenAITracingContextBridge.TRACE_CONTEXT_HEADER)); + return Mono.just(conversation); + }).block(); + + assertSame(conversation, result); + assertEquals(CONVERSATION_ID, getConversationSpan().getAttributes().get(GEN_AI_CONVERSATION_ID)); + } + + @Test + public void syncConversationErrorPropagatesAndEndsSpan() { + RuntimeException failure = new RuntimeException("boom"); + + RuntimeException thrown + = assertThrows(RuntimeException.class, () -> responseTracing.traceCreateConversation(() -> { + throw failure; + })); + + assertSame(failure, thrown); + assertEquals(StatusCode.ERROR, getConversationSpan().toSpanData().getStatus().getStatusCode()); + } + + @Test + public void asyncConversationCancellationEndsSpan() { + Disposable subscription = responseTracing.traceCreateConversationAsync(params -> Mono.never()).subscribe(); + + subscription.dispose(); + + assertNotNull(getConversationSpan()); + } + + @Test + public void startsAsyncStreamingOperationWithCurrentSpan() { + Disposable subscription = responseTracing.traceStreamingResponseAsync(new AzureCreateResponseOptions(), + ResponseCreateParams.builder().model("gpt-4o").input("hello").build(), tracedParams -> { + assertTrue(io.opentelemetry.api.trace.Span.current().getSpanContext().isValid()); + assertTrue(tracedParams._additionalHeaders() + .names() + .contains(OpenAITracingContextBridge.TRACE_CONTEXT_HEADER)); + return reactor.core.publisher.Flux.never(); + }).subscribe(); + + subscription.dispose(); + + assertNotNull(spanProcessor.getEndedSpans() + .stream() + .filter(candidate -> "chat gpt-4o".equals(candidate.getName())) + .findFirst() + .orElse(null)); + } + + @Test + public void rawRequestPromotesTracingFieldsAndPreservesAzureExtensions() { + ResponseCreateParams params = OpenAIJsonHelper.toRawResponseCreateParams( + BinaryData.fromString("{\"model\":\"gpt-4o\",\"input\":\"hello\",\"instructions\":\"be helpful\"," + + "\"conversation\":\"conversation-1\",\"agent_reference\":{\"name\":\"weather-agent\"}}")); + + assertEquals("gpt-4o", GenAiResponseTracing.extractModelString(params.model().get())); + assertEquals("hello", params.input().get().asText()); + assertEquals("be helpful", params.instructions().get()); + assertEquals(CONVERSATION_ID, params.conversation().get().asId()); + assertTrue(params._additionalBodyProperties().containsKey("agent_reference")); + } + + @Test + public void rawRequestPreservesExplicitNullFields() { + ResponseCreateParams params = OpenAIJsonHelper.toRawResponseCreateParams( + BinaryData.fromString("{\"model\":null,\"input\":null,\"instructions\":null,\"conversation\":null}")); + + assertTrue(params._additionalBodyProperties().containsKey("model")); + assertTrue(params._additionalBodyProperties().containsKey("input")); + assertTrue(params._additionalBodyProperties().containsKey("instructions")); + assertTrue(params._additionalBodyProperties().containsKey("conversation")); + } + + @Test + public void tracesRawResponseAndClosesSpanWhenHeadersArrive() { + ResponseCreateParams params = ResponseCreateParams.builder().model("gpt-4o").input("hello").build(); + + HttpResponseFor result + = responseTracing.traceRawResponse(new AzureCreateResponseOptions(), params, () -> { + assertTrue(io.opentelemetry.api.trace.Span.current().getSpanContext().isValid()); + return rawResponse(null, new AtomicBoolean()); + }); + + assertNotNull(result); + assertNotNull(getResponseSpan()); + } + + @Test + public void tracesAsyncRawResponseWithBridgeContext() { + ResponseCreateParams params = ResponseCreateParams.builder().model("gpt-4o").input("hello").build(); + + HttpResponseFor result + = responseTracing.traceRawResponseAsync(new AzureCreateResponseOptions(), params, tracedParams -> { + assertTrue(tracedParams._additionalHeaders() + .names() + .contains(OpenAITracingContextBridge.TRACE_CONTEXT_HEADER)); + return Mono.just(rawResponse(null, new AtomicBoolean())); + }).block(); + + assertNotNull(result); + assertNotNull(getResponseSpan()); + } + + @Test + public void rawStreamingSpanEndsOnExhaustionAndClosesStream() { + AtomicBoolean streamClosed = new AtomicBoolean(); + StreamResponse streamResponse = streamResponse(Stream.empty(), streamClosed); + ResponseCreateParams params = ResponseCreateParams.builder().model("gpt-4o").input("hello").build(); + + HttpResponseFor> response = responseTracing.traceRawStreamingResponse( + new AzureCreateResponseOptions(), params, () -> rawResponse(streamResponse, new AtomicBoolean())); + + assertTrue(spanProcessor.getEndedSpans().stream().noneMatch(span -> "chat gpt-4o".equals(span.getName()))); + assertEquals(0, response.parse().stream().count()); + assertTrue(streamClosed.get()); + assertNotNull(getResponseSpan()); + } + + @Test + public void rawStreamingSpanEndsOnExplicitResponseClose() { + AtomicBoolean responseClosed = new AtomicBoolean(); + ResponseCreateParams params = ResponseCreateParams.builder().model("gpt-4o").input("hello").build(); + HttpResponseFor> response + = responseTracing.traceRawStreamingResponse(new AzureCreateResponseOptions(), params, + () -> rawResponse(streamResponse(Stream.empty(), new AtomicBoolean()), responseClosed)); + + response.close(); + + assertTrue(responseClosed.get()); + assertNotNull(getResponseSpan()); + } + + @Test + public void asyncRawStreamingResponseRetainsSpanOwnershipAfterEmission() { + ResponseCreateParams params = ResponseCreateParams.builder().model("gpt-4o").input("hello").build(); + + HttpResponseFor> response = responseTracing + .traceRawStreamingResponseAsync(new AzureCreateResponseOptions(), params, + ignored -> Mono + .just(rawResponse(streamResponse(Stream.empty(), new AtomicBoolean()), new AtomicBoolean()))) + .flux() + .take(1) + .next() + .block(); + + assertTrue(spanProcessor.getEndedSpans().stream().noneMatch(span -> "chat gpt-4o".equals(span.getName()))); + response.close(); + assertNotNull(getResponseSpan()); + } + + @Test + public void rawStreamingInitializationFailureEndsSpanAndClosesStream() { + AtomicBoolean streamClosed = new AtomicBoolean(); + RuntimeException failure = new RuntimeException("stream initialization failed"); + StreamResponse streamResponse = new StreamResponse() { + @Override + public Stream stream() { + throw failure; + } + + @Override + public void close() { + streamClosed.set(true); + } + }; + ResponseCreateParams params = ResponseCreateParams.builder().model("gpt-4o").input("hello").build(); + HttpResponseFor> response = responseTracing.traceRawStreamingResponse( + new AzureCreateResponseOptions(), params, () -> rawResponse(streamResponse, new AtomicBoolean())); + + RuntimeException thrown = assertThrows(RuntimeException.class, () -> response.parse().stream()); + + assertSame(failure, thrown); + assertTrue(streamClosed.get()); + assertEquals(StatusCode.ERROR, getResponseSpan().toSpanData().getStatus().getStatusCode()); + } + + @Test + public void responseFixtureFormattingGatesContentAndProducesValidJson() throws Exception { + Response response = ObjectMappers.jsonMapper().readValue(RESPONSE_FIXTURE, Response.class); + + String contentOff = responseTracing.formatOutputFromResponse(response); + assertFalse(contentOff.contains("lookup-tool")); + assertFalse(contentOff.contains("Seattle")); + assertFalse(contentOff.contains("hello")); + + GenAiResponseTracing contentEnabledTracing = createResponseTracing(true); + String contentOn = contentEnabledTracing.formatOutputFromResponse(response); + assertTrue(contentOn.contains("lookup-tool")); + assertTrue(contentOn.contains("Seattle")); + + Object parsed = ObjectMappers.jsonMapper().readValue(contentOn, Object.class); + assertTrue(parsed instanceof List); + @SuppressWarnings("unchecked") + List> messages = (List>) parsed; + @SuppressWarnings("unchecked") + List> textParts = (List>) messages.get(1).get("parts"); + assertEquals("hello \"world\"", textParts.get(0).get("content")); + } + + private ReadableSpan getConversationSpan() { + ReadableSpan span = spanProcessor.getEndedSpans() + .stream() + .filter(candidate -> "create_conversation".equals(candidate.getName())) + .findFirst() + .orElse(null); + assertNotNull(span, "create_conversation span not found."); + return span; + } + + private ReadableSpan getResponseSpan() { + ReadableSpan span = spanProcessor.getEndedSpans() + .stream() + .filter(candidate -> "chat gpt-4o".equals(candidate.getName())) + .findFirst() + .orElse(null); + assertNotNull(span, "chat response span not found."); + return span; + } + + private static HttpResponseFor rawResponse(T parsed, AtomicBoolean closed) { + return new HttpResponseFor() { + @Override + public int statusCode() { + return 200; + } + + @Override + public Headers headers() { + return Headers.builder().build(); + } + + @Override + public InputStream body() { + return new ByteArrayInputStream(new byte[0]); + } + + @Override + public T parse() { + return parsed; + } + + @Override + public void close() { + closed.set(true); + } + }; + } + + private static StreamResponse streamResponse(Stream stream, + AtomicBoolean closed) { + return new StreamResponse() { + @Override + public Stream stream() { + return stream; + } + + @Override + public void close() { + closed.set(true); + } + }; + } + + private static Conversation conversation() { + return Conversation.builder() + .id(CONVERSATION_ID) + .createdAt(0L) + .metadata(JsonValue.from(Collections.emptyMap())) + .object_(JsonValue.from("conversation")) + .build(); + } + + private GenAiResponseTracing createResponseTracing(boolean captureContent) { + ConfigurationBuilder configuration + = new ConfigurationBuilder().putProperty("experimental.enable_genai_tracing", "true") + .putProperty("otel.instrumentation.genai.capture_message_content", Boolean.toString(captureContent)); + return new GenAiResponseTracing( + new GenAiInstrumentation("https://contoso.services.ai.azure.com", configuration.build(), + TracerProvider.getDefaultProvider().createTracer("test", null, "Microsoft.CognitiveServices", null), + MeterProvider.getDefaultProvider().createMeter("test", null, null)), + new OpenAITracingContextBridge()); + } + + private static final String RESPONSE_FIXTURE + = "{\"id\":\"resp-1\",\"object\":\"response\",\"created_at\":1,\"status\":\"completed\"," + + "\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"model\":\"gpt-4o\"," + + "\"output\":[{\"type\":\"function_call\",\"id\":\"fc-1\",\"call_id\":\"call-1\"," + + "\"name\":\"lookup-tool\",\"arguments\":\"{\\\"city\\\":\\\"Seattle\\\"}\",\"status\":\"completed\"}," + + "{\"type\":\"message\",\"id\":\"msg-1\",\"status\":\"completed\",\"role\":\"assistant\"," + + "\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"text\":\"hello \\\"world\\\"\"}]}]," + + "\"parallel_tool_calls\":true,\"metadata\":{},\"tool_choice\":\"auto\",\"tools\":[]," + + "\"text\":{\"format\":{\"type\":\"text\"}},\"truncation\":\"disabled\"," + + "\"usage\":{\"input_tokens\":10,\"input_tokens_details\":{\"cached_tokens\":0}," + + "\"output_tokens\":5,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":15}}"; + + private static final class TestSpanProcessor implements SpanProcessor { + private final ConcurrentLinkedDeque spans = new ConcurrentLinkedDeque<>(); + + List getEndedSpans() { + return new ArrayList<>(spans); + } + + @Override + public void onStart(io.opentelemetry.context.Context parentContext, ReadWriteSpan span) { + } + + @Override + public boolean isStartRequired() { + return false; + } + + @Override + public void onEnd(ReadableSpan span) { + spans.add(span); + } + + @Override + public boolean isEndRequired() { + return true; + } + } +} diff --git a/sdk/ai/azure-ai-projects/pom.xml b/sdk/ai/azure-ai-projects/pom.xml index 79ad6081be67..9b511a093b9e 100644 --- a/sdk/ai/azure-ai-projects/pom.xml +++ b/sdk/ai/azure-ai-projects/pom.xml @@ -63,7 +63,7 @@ Code generated by Microsoft (R) TypeSpec Code Generator. com.azure azure-core-http-netty - 1.16.8 + 1.17.0-beta.1 com.azure diff --git a/sdk/ai/cspell.yml b/sdk/ai/cspell.yml index 7d5a13e2cb1e..6c951b131f37 100644 --- a/sdk/ai/cspell.yml +++ b/sdk/ai/cspell.yml @@ -13,6 +13,7 @@ words: - "csdl" - "dedup" - "fourx" + - "genai" - "gitmcp" - "pcma" - "pcmu" From c7984c40f2d14487d66e37482e0b3082772ce90c Mon Sep 17 00:00:00 2001 From: Kaylie <50653231+kaylieee@users.noreply.github.com> Date: Mon, 19 Oct 2026 11:12:57 -0700 Subject: [PATCH 08/13] Regen latest snap 10-16-26 (#50849) * regen new msft copilot tool * regen from emitter updates * rename config to configuration * temp disable tests --- .../customizations/beta-annotations.csv | 11 +- .../models/AgentDefinitionOptInKeys.java | 7 +- .../azure/ai/agents/models/AgentHarness.java | 6 +- .../models/CreateAgentVersionInput.java | 4 +- .../models/GitHubCopilotBuiltInTool.java | 3 +- .../agents/models/GitHubCopilotHarness.java | 3 +- .../models/GitHubCopilotToolsetConfig.java | 3 +- .../GitHubCopilotToolsetDefaultConfig.java | 3 +- .../models/GitHubCopilotToolsetPreview.java | 3 +- .../models/MicrosoftCopilotBuiltInTool.java | 70 ++++++++ .../models/MicrosoftCopilotHarness.java | 80 +++++++++ .../MicrosoftCopilotToolsetConfiguration.java | 120 ++++++++++++++ ...oftCopilotToolsetDefaultConfiguration.java | 95 +++++++++++ .../MicrosoftCopilotToolsetPreview.java | 153 ++++++++++++++++++ .../agents/models/PromptAgentDefinition.java | 6 +- .../java/com/azure/ai/agents/models/Tool.java | 2 + .../com/azure/ai/agents/models/ToolType.java | 6 + .../META-INF/azure-ai-agents_metadata.json | 2 +- .../voice/VoiceAgentTelephonyLiveTests.java | 3 + sdk/ai/azure-ai-agents/tsp-location.yaml | 2 +- .../ai/projects/BetaSkillsAsyncClient.java | 64 ++++---- .../azure/ai/projects/BetaSkillsClient.java | 62 +++---- .../models/EvaluationDataGenerationJob.java | 33 ++-- ...nforcementFineTuningDataGenerationJob.java | 33 ++-- ...SupervisedFineTuningDataGenerationJob.java | 33 ++-- .../META-INF/azure-ai-projects_metadata.json | 2 +- sdk/ai/azure-ai-projects/tsp-location.yaml | 2 +- 27 files changed, 685 insertions(+), 126 deletions(-) create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotBuiltInTool.java create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotHarness.java create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetConfiguration.java create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetDefaultConfiguration.java create mode 100644 sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetPreview.java diff --git a/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv b/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv index c63740fddedc..3b071045264d 100644 --- a/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv +++ b/sdk/ai/azure-ai-agents/customizations/beta-annotations.csv @@ -5,7 +5,7 @@ class;com.azure.ai.agents.models.A2AToolCall;Preview API. preview_tool; class;com.azure.ai.agents.models.A2AToolCallOutput;Preview API. preview_tool; field;com.azure.ai.agents.models.AgentDetails;Preview API. DigitalWorker=V1Preview;digital_worker_type field;com.azure.ai.agents.models.AgentEndpointProtocol;Preview API.;VOICE -class;com.azure.ai.agents.models.AgentHarness;Preview API. GitHubCopilot=V1Preview; +class;com.azure.ai.agents.models.AgentHarness;Preview API. GitHubCopilot=V1Preview, MicrosoftCopilot=V1Preview; field;com.azure.ai.agents.models.AgentKind;Preview API.;VOICE field;com.azure.ai.agents.models.AgentVersionDetails;Preview API. DraftAgents=V1Preview;draft class;com.azure.ai.agents.models.AudioTranscription;Preview API. VoiceAgents=V1Preview; @@ -20,7 +20,7 @@ class;com.azure.ai.agents.models.BingCustomSearchToolParameters;Preview API. pre class;com.azure.ai.agents.models.BrowserAutomationPreviewTool;Preview API. preview_tool; class;com.azure.ai.agents.models.BrowserAutomationPreviewToolboxTool;Preview API. preview_tool; class;com.azure.ai.agents.models.ChatSummaryMemoryItem;Preview API. MemoryStores=V1Preview; -field;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. DigitalWorker=V1Preview, DraftAgents=V1Preview, ExternalAgents=V1Preview, GitHubCopilot=V1Preview, Skills=V1Preview, VoiceAgents=V1Preview, WorkflowAgents=V1Preview;definition +field;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. DigitalWorker=V1Preview, DraftAgents=V1Preview, ExternalAgents=V1Preview, GitHubCopilot=V1Preview, MicrosoftCopilot=V1Preview, Skills=V1Preview, VoiceAgents=V1Preview, WorkflowAgents=V1Preview;definition field;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. DigitalWorker=V1Preview;digital_worker_type field;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. DraftAgents=V1Preview;draft class;com.azure.ai.agents.models.CreateTeamsPhoneExtensibilityTelephonyBindingInput;Preview API. VoiceAgents=V1Preview; @@ -61,6 +61,11 @@ class;com.azure.ai.agents.models.MemoryStoreSearchResponse;Preview API. MemorySt class;com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult;Preview API. MemoryStores=V1Preview; class;com.azure.ai.agents.models.MemoryStoreUpdateResponse;Preview API. MemoryStores=V1Preview; class;com.azure.ai.agents.models.MemoryStoreUpdateStatus;Preview API. MemoryStores=V1Preview; +class;com.azure.ai.agents.models.MicrosoftCopilotBuiltInTool;Preview API. MicrosoftCopilot=V1Preview; +class;com.azure.ai.agents.models.MicrosoftCopilotHarness;Preview API. MicrosoftCopilot=V1Preview; +class;com.azure.ai.agents.models.MicrosoftCopilotToolsetConfiguration;Preview API. MicrosoftCopilot=V1Preview; +class;com.azure.ai.agents.models.MicrosoftCopilotToolsetDefaultConfiguration;Preview API. MicrosoftCopilot=V1Preview; +class;com.azure.ai.agents.models.MicrosoftCopilotToolsetPreview;Preview API. MicrosoftCopilot=V1Preview; class;com.azure.ai.agents.models.MicrosoftFabricPreviewTool;Preview API. preview_tool; class;com.azure.ai.agents.models.ModelRouterAttempt;Preview API. ModelRouterControls=V1Preview; class;com.azure.ai.agents.models.ModelRouterAttemptError;Preview API. ModelRouterControls=V1Preview; @@ -70,7 +75,7 @@ class;com.azure.ai.agents.models.ModelRouterMode;Preview API. ModelRouterControl class;com.azure.ai.agents.models.ModelRouterResponseHeaderValue;Preview API. ModelRouterControls=V1Preview; class;com.azure.ai.agents.models.ModelSelectionDetails;Preview API. ModelRouterControls=V1Preview; class;com.azure.ai.agents.models.ProceduralMemoryItem;Preview API. MemoryStores=V1Preview; -field;com.azure.ai.agents.models.PromptAgentDefinition;Preview API. GitHubCopilot=V1Preview;harness +field;com.azure.ai.agents.models.PromptAgentDefinition;Preview API. GitHubCopilot=V1Preview, MicrosoftCopilot=V1Preview;harness field;com.azure.ai.agents.models.PromptAgentDefinition;Preview API. Skills=V1Preview;skills class;com.azure.ai.agents.models.PstnTelephonyTransferDestination;Preview API. VoiceAgents=V1Preview; class;com.azure.ai.agents.models.RealtimeAudioFormat;Preview API. VoiceAgents=V1Preview; diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java index 6b9a6421aeec..7cba3b4f318d 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java @@ -41,7 +41,12 @@ public enum AgentDefinitionOptInKeys { /** * Enum value Skills=V1Preview. */ - SKILLS_V1_PREVIEW("Skills=V1Preview"); + SKILLS_V1_PREVIEW("Skills=V1Preview"), + + /** + * The Microsoft Copilot V1 preview feature opt-in. + */ + MICROSOFT_COPILOT_V1_PREVIEW("MicrosoftCopilot=V1Preview"); /** * The actual serialized value for a AgentDefinitionOptInKeys instance. diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentHarness.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentHarness.java index 41117639eb78..685095fe0a8e 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentHarness.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentHarness.java @@ -16,7 +16,7 @@ * A managed runtime and agent loop used to execute a prompt agent. */ @Immutable -@Beta(warningText = "Preview API. GitHubCopilot=V1Preview") +@Beta(warningText = "Preview API. GitHubCopilot=V1Preview, MicrosoftCopilot=V1Preview") public class AgentHarness implements JsonSerializable { /* @@ -79,7 +79,9 @@ public static AgentHarness fromJson(JsonReader jsonReader) throws IOException { } } // Use the discriminator value to determine which subtype should be deserialized. - if ("github_copilot_preview".equals(discriminatorValue)) { + if ("microsoft_copilot_preview".equals(discriminatorValue)) { + return MicrosoftCopilotHarness.fromJson(readerToUse.reset()); + } else if ("github_copilot_preview".equals(discriminatorValue)) { return GitHubCopilotHarness.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java index 58fd72cefe23..e60747b92216 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java @@ -41,7 +41,7 @@ public final class CreateAgentVersionInput implements JsonSerializable { diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java index e742dbe29e6d..3ef3680faa7c 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java @@ -12,7 +12,8 @@ import java.io.IOException; /** - * The default enablement setting for GitHub Copilot built-in tools. + * The legacy default enablement setting retained for compatibility. Use `MicrosoftCopilotToolsetDefaultConfiguration` + * for new integrations. */ @Fluent public final class GitHubCopilotToolsetDefaultConfig implements JsonSerializable { diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java index 40f591d556b4..6772c84506ff 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java @@ -13,7 +13,8 @@ import java.util.List; /** - * Configuration overrides for GitHub Copilot built-in tools. + * The legacy GitHub Copilot toolset retained for compatibility. Use `MicrosoftCopilotToolsetPreview` for new + * integrations. */ @Fluent @Beta(warningText = "Preview API. GitHubCopilot=V1Preview") diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotBuiltInTool.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotBuiltInTool.java new file mode 100644 index 000000000000..0c0a05a9b644 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotBuiltInTool.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.agents.models; + +import com.azure.ai.agents.implementation.utils.Beta; + +/** + * A customer-configurable Microsoft Copilot built-in tool. + */ +@Beta(warningText = "Preview API. MicrosoftCopilot=V1Preview") +public enum MicrosoftCopilotBuiltInTool { + + /** + * Read and search files in the harness workspace. + */ + FILE_SYSTEM_READ("filesystem_read"), + /** + * Create and modify files in the harness workspace. + */ + FILE_SYSTEM_WRITE("filesystem_write"), + /** + * Execute operating-system commands. + */ + SHELL("shell"), + /** + * Fetch content and search external network resources. + */ + WEB("web"), + /** + * Delegate work to additional agents. + */ + SUBAGENTS("subagents"); + + /** + * The actual serialized value for a MicrosoftCopilotBuiltInTool instance. + */ + private final String value; + + MicrosoftCopilotBuiltInTool(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MicrosoftCopilotBuiltInTool instance. + * + * @param value the serialized value to parse. + * @return the parsed MicrosoftCopilotBuiltInTool object, or null if unable to parse. + */ + public static MicrosoftCopilotBuiltInTool fromString(String value) { + if (value == null) { + return null; + } + MicrosoftCopilotBuiltInTool[] items = MicrosoftCopilotBuiltInTool.values(); + for (MicrosoftCopilotBuiltInTool item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotHarness.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotHarness.java new file mode 100644 index 000000000000..6e326ee9672b --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotHarness.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.agents.models; + +import com.azure.ai.agents.implementation.utils.Beta; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Microsoft Copilot managed harness for prompt agents. + */ +@Immutable +@Beta(warningText = "Preview API. MicrosoftCopilot=V1Preview") +public final class MicrosoftCopilotHarness extends AgentHarness { + + /* + * The type of managed harness. + */ + @Generated + private String type = "microsoft_copilot_preview"; + + /** + * Creates an instance of MicrosoftCopilotHarness class. + */ + @Generated + public MicrosoftCopilotHarness() { + } + + /** + * Get the type property: The type of managed harness. + * + * @return the type value. + */ + @Generated + @Override + public String getType() { + return this.type; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MicrosoftCopilotHarness from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftCopilotHarness if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MicrosoftCopilotHarness. + */ + @Generated + public static MicrosoftCopilotHarness fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftCopilotHarness deserializedMicrosoftCopilotHarness = new MicrosoftCopilotHarness(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("type".equals(fieldName)) { + deserializedMicrosoftCopilotHarness.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedMicrosoftCopilotHarness; + }); + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetConfiguration.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetConfiguration.java new file mode 100644 index 000000000000..7d76d477300d --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetConfiguration.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.agents.models; + +import com.azure.ai.agents.implementation.utils.Beta; +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * An enablement override for a Microsoft Copilot built-in tool. + */ +@Fluent +@Beta(warningText = "Preview API. MicrosoftCopilot=V1Preview") +public final class MicrosoftCopilotToolsetConfiguration + implements JsonSerializable { + + /* + * The built-in tool to configure. + */ + @Generated + private final MicrosoftCopilotBuiltInTool toolName; + + /* + * Whether the built-in tool is enabled. If omitted, the toolset default applies. + */ + @Generated + private Boolean enabled; + + /** + * Creates an instance of MicrosoftCopilotToolsetConfiguration class. + * + * @param toolName the toolName value to set. + */ + @Generated + public MicrosoftCopilotToolsetConfiguration(MicrosoftCopilotBuiltInTool toolName) { + this.toolName = toolName; + } + + /** + * Get the toolName property: The built-in tool to configure. + * + * @return the toolName value. + */ + @Generated + public MicrosoftCopilotBuiltInTool getToolName() { + return this.toolName; + } + + /** + * Get the enabled property: Whether the built-in tool is enabled. If omitted, the toolset default applies. + * + * @return the enabled value. + */ + @Generated + public Boolean isEnabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether the built-in tool is enabled. If omitted, the toolset default applies. + * + * @param enabled the enabled value to set. + * @return the MicrosoftCopilotToolsetConfiguration object itself. + */ + @Generated + public MicrosoftCopilotToolsetConfiguration setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.toolName == null ? null : this.toolName.toString()); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MicrosoftCopilotToolsetConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftCopilotToolsetConfiguration if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MicrosoftCopilotToolsetConfiguration. + */ + @Generated + public static MicrosoftCopilotToolsetConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftCopilotBuiltInTool toolName = null; + Boolean enabled = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + toolName = MicrosoftCopilotBuiltInTool.fromString(reader.getString()); + } else if ("enabled".equals(fieldName)) { + enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + MicrosoftCopilotToolsetConfiguration deserializedMicrosoftCopilotToolsetConfiguration + = new MicrosoftCopilotToolsetConfiguration(toolName); + deserializedMicrosoftCopilotToolsetConfiguration.enabled = enabled; + return deserializedMicrosoftCopilotToolsetConfiguration; + }); + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetDefaultConfiguration.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetDefaultConfiguration.java new file mode 100644 index 000000000000..67b1ca642052 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetDefaultConfiguration.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.agents.models; + +import com.azure.ai.agents.implementation.utils.Beta; +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The default enablement setting for Microsoft Copilot built-in tools. + */ +@Fluent +@Beta(warningText = "Preview API. MicrosoftCopilot=V1Preview") +public final class MicrosoftCopilotToolsetDefaultConfiguration + implements JsonSerializable { + + /* + * Whether built-in tools are enabled by default. Defaults to true. + */ + @Generated + private Boolean enabled; + + /** + * Creates an instance of MicrosoftCopilotToolsetDefaultConfiguration class. + */ + @Generated + public MicrosoftCopilotToolsetDefaultConfiguration() { + } + + /** + * Get the enabled property: Whether built-in tools are enabled by default. Defaults to true. + * + * @return the enabled value. + */ + @Generated + public Boolean isEnabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether built-in tools are enabled by default. Defaults to true. + * + * @param enabled the enabled value to set. + * @return the MicrosoftCopilotToolsetDefaultConfiguration object itself. + */ + @Generated + public MicrosoftCopilotToolsetDefaultConfiguration setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MicrosoftCopilotToolsetDefaultConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftCopilotToolsetDefaultConfiguration if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MicrosoftCopilotToolsetDefaultConfiguration. + */ + @Generated + public static MicrosoftCopilotToolsetDefaultConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftCopilotToolsetDefaultConfiguration deserializedMicrosoftCopilotToolsetDefaultConfiguration + = new MicrosoftCopilotToolsetDefaultConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("enabled".equals(fieldName)) { + deserializedMicrosoftCopilotToolsetDefaultConfiguration.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedMicrosoftCopilotToolsetDefaultConfiguration; + }); + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetPreview.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetPreview.java new file mode 100644 index 000000000000..3e1a6086a249 --- /dev/null +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetPreview.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.agents.models; + +import com.azure.ai.agents.implementation.utils.Beta; +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Configuration overrides for Microsoft Copilot built-in tools. + */ +@Fluent +@Beta(warningText = "Preview API. MicrosoftCopilot=V1Preview") +public final class MicrosoftCopilotToolsetPreview extends Tool { + + /* + * The type property. + */ + @Generated + private ToolType type = ToolType.MICROSOFT_COPILOT_TOOLSET_PREVIEW; + + /* + * The default configuration for built-in tools. If omitted, built-in tools are enabled by default. + */ + @Generated + private MicrosoftCopilotToolsetDefaultConfiguration defaultConfiguration; + + /* + * Per-tool configuration overrides. Duplicate built-in tool names are not allowed. + */ + @Generated + private List toolConfigurations; + + /** + * Creates an instance of MicrosoftCopilotToolsetPreview class. + */ + @Generated + public MicrosoftCopilotToolsetPreview() { + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + @Generated + @Override + public ToolType getType() { + return this.type; + } + + /** + * Get the defaultConfiguration property: The default configuration for built-in tools. If omitted, built-in tools + * are enabled by default. + * + * @return the defaultConfiguration value. + */ + @Generated + public MicrosoftCopilotToolsetDefaultConfiguration getDefaultConfiguration() { + return this.defaultConfiguration; + } + + /** + * Get the toolConfigurations property: Per-tool configuration overrides. Duplicate built-in tool names are not + * allowed. + * + * @return the toolConfigurations value. + */ + @Generated + public List getToolConfigurations() { + return this.toolConfigurations; + } + + /** + * Set the toolConfigurations property: Per-tool configuration overrides. Duplicate built-in tool names are not + * allowed. + * + * @param toolConfigurations the toolConfigurations value to set. + * @return the MicrosoftCopilotToolsetPreview object itself. + */ + @Generated + public MicrosoftCopilotToolsetPreview + setToolConfigurations(List toolConfigurations) { + this.toolConfigurations = toolConfigurations; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeJsonField("default_config", this.defaultConfiguration); + jsonWriter.writeArrayField("configs", this.toolConfigurations, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MicrosoftCopilotToolsetPreview from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftCopilotToolsetPreview if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MicrosoftCopilotToolsetPreview. + */ + @Generated + public static MicrosoftCopilotToolsetPreview fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftCopilotToolsetPreview deserializedMicrosoftCopilotToolsetPreview + = new MicrosoftCopilotToolsetPreview(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("type".equals(fieldName)) { + deserializedMicrosoftCopilotToolsetPreview.type = ToolType.fromString(reader.getString()); + } else if ("default_config".equals(fieldName)) { + deserializedMicrosoftCopilotToolsetPreview.defaultConfiguration + = MicrosoftCopilotToolsetDefaultConfiguration.fromJson(reader); + } else if ("configs".equals(fieldName)) { + List toolConfigurations + = reader.readArray(reader1 -> MicrosoftCopilotToolsetConfiguration.fromJson(reader1)); + deserializedMicrosoftCopilotToolsetPreview.toolConfigurations = toolConfigurations; + } else { + reader.skipChildren(); + } + } + return deserializedMicrosoftCopilotToolsetPreview; + }); + } + + /** + * Set the defaultConfiguration property: The default configuration for built-in tools. If omitted, built-in tools + * are enabled by default. + * + * @param defaultConfiguration the defaultConfiguration value to set. + * @return the MicrosoftCopilotToolsetPreview object itself. + */ + @Generated + public MicrosoftCopilotToolsetPreview + setDefaultConfiguration(MicrosoftCopilotToolsetDefaultConfiguration defaultConfiguration) { + this.defaultConfiguration = defaultConfiguration; + return this; + } +} diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java index 29cf7ec1bfb9..5cd9e8bb31ea 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java @@ -479,7 +479,7 @@ public PromptAgentDefinition setReasoning(Reasoning reasoning) { * The managed runtime and agent loop used to execute this prompt agent. */ @Generated - @Beta(warningText = "Preview API. GitHubCopilot=V1Preview") + @Beta(warningText = "Preview API. GitHubCopilot=V1Preview, MicrosoftCopilot=V1Preview") private AgentHarness harness; /* @@ -496,7 +496,7 @@ public PromptAgentDefinition setReasoning(Reasoning reasoning) { * @return the harness value. */ @Generated - @Beta(warningText = "Preview API. GitHubCopilot=V1Preview") + @Beta(warningText = "Preview API. GitHubCopilot=V1Preview, MicrosoftCopilot=V1Preview") public AgentHarness getHarness() { return this.harness; } @@ -508,7 +508,7 @@ public AgentHarness getHarness() { * @return the PromptAgentDefinition object itself. */ @Generated - @Beta(warningText = "Preview API. GitHubCopilot=V1Preview") + @Beta(warningText = "Preview API. GitHubCopilot=V1Preview, MicrosoftCopilot=V1Preview") public PromptAgentDefinition setHarness(AgentHarness harness) { this.harness = harness; return this; diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/Tool.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/Tool.java index 71a3d601d51a..42a34e547262 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/Tool.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/Tool.java @@ -79,6 +79,8 @@ public static Tool fromJson(JsonReader jsonReader) throws IOException { // Use the discriminator value to determine which subtype should be deserialized. if ("mcp".equals(discriminatorValue)) { return McpTool.fromJson(readerToUse.reset()); + } else if ("microsoft_copilot_toolset_preview".equals(discriminatorValue)) { + return MicrosoftCopilotToolsetPreview.fromJson(readerToUse.reset()); } else if ("github_copilot_toolset_preview".equals(discriminatorValue)) { return GitHubCopilotToolsetPreview.fromJson(readerToUse.reset()); } else if ("bing_grounding".equals(discriminatorValue)) { diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ToolType.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ToolType.java index 7658c23bbdeb..859adc0c37ff 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ToolType.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ToolType.java @@ -246,4 +246,10 @@ public static Collection values() { */ @Generated public static final ToolType BROWSER_AUTOMATION = fromString("browser_automation"); + + /** + * Static value microsoft_copilot_toolset_preview for ToolType. + */ + @Generated + public static final ToolType MICROSOFT_COPILOT_TOOLSET_PREVIEW = fromString("microsoft_copilot_toolset_preview"); } diff --git a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json index 7aa46ff2f8e1..e2dc70e37c1d 100644 --- a/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json +++ b/sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"f76f2f868d3d","crossLanguageDefinitions":{"com.azure.ai.agents.AgentsAsyncClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsAsyncClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsAsyncClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsAsyncClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsAsyncClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsAsyncClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsAsyncClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClientBuilder":"Azure.AI.Projects","com.azure.ai.agents.BetaAgentsAsyncClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaMemoryStoresAsyncClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.ToolboxesAsyncClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesAsyncClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesAsyncClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.implementation.models.AgentDefinitionOptInKeys":"Azure.AI.Projects.AgentDefinitionOptInKeys","com.azure.ai.agents.implementation.models.CreateAgentFromCodeContent":"Azure.AI.Projects.CreateAgentFromCodeContent","com.azure.ai.agents.implementation.models.CreateAgentFromManifestRequest":"Azure.AI.Projects.createAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentOptions":null,"com.azure.ai.agents.implementation.models.CreateAgentRequest":"Azure.AI.Projects.createAgent.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionFromManifestRequest":"Azure.AI.Projects.createAgentVersionFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionRequest":"Azure.AI.Projects.createAgentVersion.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryRequest":"Azure.AI.Projects.createMemory.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryStoreRequest":"Azure.AI.Projects.createMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.CreateSessionRequest":"Azure.AI.Projects.createSession.Request.anonymous","com.azure.ai.agents.implementation.models.CreateToolboxVersionRequest":"Azure.AI.Projects.createToolboxVersion.Request.anonymous","com.azure.ai.agents.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.agents.implementation.models.GetMicrosoft365AppPackageRequest":"Azure.AI.Projects.getMicrosoft365AppPackage.Request.anonymous","com.azure.ai.agents.implementation.models.ListMemoriesRequest":"Azure.AI.Projects.listMemories.Request.anonymous","com.azure.ai.agents.implementation.models.PublishAgentToMicrosoft365Request":"Azure.AI.Projects.publishAgentToMicrosoft365.Request.anonymous","com.azure.ai.agents.implementation.models.ReplaceTelephonyTransferTargetsRequest":"Azure.AI.Projects.replaceTelephonyTransferTargets.Request.anonymous","com.azure.ai.agents.implementation.models.SearchMemoriesRequest":"Azure.AI.Projects.searchMemories.Request.anonymous","com.azure.ai.agents.implementation.models.TransferTelephonyCallRequest":"Azure.AI.Projects.transferTelephonyCall.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest":"Azure.AI.Projects.updateAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentRequest":"Azure.AI.Projects.updateAgent.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoriesRequest":"Azure.AI.Projects.updateMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryRequest":"Azure.AI.Projects.updateMemory.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryStoreRequest":"Azure.AI.Projects.updateMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateToolboxInput":"Azure.AI.Projects.UpdateToolboxRequest","com.azure.ai.agents.implementation.models.UpdateToolboxRequest":"Azure.AI.Projects.updateToolbox.Request.anonymous","com.azure.ai.agents.models.A2APreviewTool":"Azure.AI.Projects.A2APreviewTool","com.azure.ai.agents.models.A2APreviewToolboxTool":"Azure.AI.Projects.A2APreviewToolboxTool","com.azure.ai.agents.models.A2AProtocolConfiguration":"Azure.AI.Projects.A2AProtocolConfiguration","com.azure.ai.agents.models.A2AProtocolVersion":"Azure.AI.Projects.A2AProtocolVersion","com.azure.ai.agents.models.A2ATool":"Azure.AI.Projects.A2ATool","com.azure.ai.agents.models.A2AToolCall":"Azure.AI.Projects.A2AToolCall","com.azure.ai.agents.models.A2AToolCallOutput":"Azure.AI.Projects.A2AToolCallOutput","com.azure.ai.agents.models.A2AToolboxTool":"Azure.AI.Projects.A2AToolboxTool","com.azure.ai.agents.models.AISearchIndexResource":"Azure.AI.Projects.AISearchIndexResource","com.azure.ai.agents.models.ActivityProtocolAccessBoundary":"Azure.AI.Projects.ActivityProtocolAccessBoundary","com.azure.ai.agents.models.ActivityProtocolConfiguration":"Azure.AI.Projects.ActivityProtocolConfiguration","com.azure.ai.agents.models.AgentBlueprintReference":"Azure.AI.Projects.AgentBlueprintReference","com.azure.ai.agents.models.AgentBlueprintReferenceType":"Azure.AI.Projects.AgentBlueprintReferenceType","com.azure.ai.agents.models.AgentCard":"Azure.AI.Projects.AgentCard","com.azure.ai.agents.models.AgentCardSkill":"Azure.AI.Projects.AgentCardSkill","com.azure.ai.agents.models.AgentDefinition":"Azure.AI.Projects.AgentDefinition","com.azure.ai.agents.models.AgentDetails":"Azure.AI.Projects.AgentObject","com.azure.ai.agents.models.AgentDetailsVersions":"Azure.AI.Projects.AgentObject.versions.anonymous","com.azure.ai.agents.models.AgentEndpointAuthorizationScheme":"Azure.AI.Projects.AgentEndpointAuthorizationScheme","com.azure.ai.agents.models.AgentEndpointAuthorizationSchemeType":"Azure.AI.Projects.AgentEndpointAuthorizationSchemeType","com.azure.ai.agents.models.AgentEndpointConfig":"Azure.AI.Projects.AgentEndpointConfig","com.azure.ai.agents.models.AgentEndpointProtocol":"Azure.AI.Projects.AgentEndpointProtocol","com.azure.ai.agents.models.AgentHarness":"Azure.AI.Projects.AgentHarness","com.azure.ai.agents.models.AgentIdentity":"Azure.AI.Projects.AgentIdentity","com.azure.ai.agents.models.AgentIdentityStatus":"Azure.AI.Projects.AgentIdentityStatus","com.azure.ai.agents.models.AgentKind":"Azure.AI.Projects.AgentKind","com.azure.ai.agents.models.AgentObjectType":"Azure.AI.Projects.AgentObjectType","com.azure.ai.agents.models.AgentOptimizationAgentCandidateOutput":"Azure.AI.Projects.AgentOptimizationAgentCandidateOutput","com.azure.ai.agents.models.AgentOptimizationBaselineAgentConfiguration":"Azure.AI.Projects.AgentOptimizationBaselineAgentConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationCandidate","com.azure.ai.agents.models.AgentOptimizationCandidateEvaluation":"Azure.AI.Projects.AgentOptimizationCandidateEvaluation","com.azure.ai.agents.models.AgentOptimizationCandidateExpand":"Azure.AI.Projects.AgentOptimizationCandidateExpand","com.azure.ai.agents.models.AgentOptimizationCandidateOutput":"Azure.AI.Projects.AgentOptimizationCandidateOutput","com.azure.ai.agents.models.AgentOptimizationCandidatePromotionInfo":"Azure.AI.Projects.AgentOptimizationCandidatePromotionInfo","com.azure.ai.agents.models.AgentOptimizationCandidateSearchConfiguration":"Azure.AI.Projects.AgentOptimizationCandidateSearchConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidateStatus":"Azure.AI.Projects.AgentOptimizationCandidateStatus","com.azure.ai.agents.models.AgentOptimizationConfiguration":"Azure.AI.Projects.AgentOptimizationConfiguration","com.azure.ai.agents.models.AgentOptimizationConfigurationBase":"Azure.AI.Projects.AgentOptimizationConfigurationBase","com.azure.ai.agents.models.AgentOptimizationConfigurationType":"Azure.AI.Projects.AgentOptimizationConfigurationType","com.azure.ai.agents.models.AgentOptimizationCostEstimate":"Azure.AI.Projects.AgentOptimizationCostEstimate","com.azure.ai.agents.models.AgentOptimizationDataSourceType":"Azure.AI.Projects.AgentOptimizationDataSourceType","com.azure.ai.agents.models.AgentOptimizationEstimateBand":"Azure.AI.Projects.AgentOptimizationEstimateBand","com.azure.ai.agents.models.AgentOptimizationEstimateInputs":"Azure.AI.Projects.AgentOptimizationEstimateInputs","com.azure.ai.agents.models.AgentOptimizationEstimateResult":"Azure.AI.Projects.AgentOptimizationEstimateResult","com.azure.ai.agents.models.AgentOptimizationEvaluationConfiguration":"Azure.AI.Projects.AgentOptimizationEvaluationConfiguration","com.azure.ai.agents.models.AgentOptimizationEvaluationSet":"Azure.AI.Projects.AgentOptimizationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationEvaluationSetType":"Azure.AI.Projects.AgentOptimizationEvaluationSetType","com.azure.ai.agents.models.AgentOptimizationEvaluatorReference":"Azure.AI.Projects.AgentOptimizationEvaluator","com.azure.ai.agents.models.AgentOptimizationFoundryAgentTargetConfiguration":"Azure.AI.Projects.AgentOptimizationFoundryAgentTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationGoal":"Azure.AI.Projects.AgentOptimizationGoal","com.azure.ai.agents.models.AgentOptimizationInstructionsMutation":"Azure.AI.Projects.AgentOptimizationInstructionsMutation","com.azure.ai.agents.models.AgentOptimizationJob":"Azure.AI.Projects.AgentOptimizationJob","com.azure.ai.agents.models.AgentOptimizationJobLatency":"Azure.AI.Projects.AgentOptimizationJobLatency","com.azure.ai.agents.models.AgentOptimizationJobResult":"Azure.AI.Projects.AgentOptimizationJobResult","com.azure.ai.agents.models.AgentOptimizationJobTokenUsage":"Azure.AI.Projects.AgentOptimizationJobTokenUsage","com.azure.ai.agents.models.AgentOptimizationModelConfiguration":"Azure.AI.Projects.AgentOptimizationModelConfiguration","com.azure.ai.agents.models.AgentOptimizationModelMutation":"Azure.AI.Projects.AgentOptimizationModelMutation","com.azure.ai.agents.models.AgentOptimizationMutation":"Azure.AI.Projects.AgentOptimizationMutation","com.azure.ai.agents.models.AgentOptimizationPromptCandidateOutput":"Azure.AI.Projects.AgentOptimizationPromptCandidateOutput","com.azure.ai.agents.models.AgentOptimizationResultCandidateSummary":"Azure.AI.Projects.AgentOptimizationResultCandidateSummary","com.azure.ai.agents.models.AgentOptimizationSkill":"Azure.AI.Projects.AgentOptimizationSkill","com.azure.ai.agents.models.AgentOptimizationSkillsMutation":"Azure.AI.Projects.AgentOptimizationSkillsMutation","com.azure.ai.agents.models.AgentOptimizationSpace":"Azure.AI.Projects.AgentOptimizationSpace","com.azure.ai.agents.models.AgentOptimizationStage":"Azure.AI.Projects.AgentOptimizationStage","com.azure.ai.agents.models.AgentOptimizationStageEstimate":"Azure.AI.Projects.AgentOptimizationStageEstimate","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionEvaluationSet":"Azure.AI.Projects.AgentOptimizationTargetCompletionEvaluationSet","com.azure.ai.agents.models.AgentOptimizationTargetCompletionInlineDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionInlineDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionTestCase":"Azure.AI.Projects.AgentOptimizationTargetCompletionTestCase","com.azure.ai.agents.models.AgentOptimizationTargetConfiguration":"Azure.AI.Projects.AgentOptimizationTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationTargetConfigurationType":"Azure.AI.Projects.AgentOptimizationTargetConfigurationType","com.azure.ai.agents.models.AgentOptimizationTerminationReason":"Azure.AI.Projects.AgentOptimizationTerminationReason","com.azure.ai.agents.models.AgentOptimizationToolsMutation":"Azure.AI.Projects.AgentOptimizationToolsMutation","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationEvaluationSet":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationInlineDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationInlineDataSource","com.azure.ai.agents.models.AgentReference":"Azure.AI.Projects.AgentReference","com.azure.ai.agents.models.AgentSessionResource":"Azure.AI.Projects.AgentSessionResource","com.azure.ai.agents.models.AgentSessionStatus":"Azure.AI.Projects.AgentSessionStatus","com.azure.ai.agents.models.AgentState":"Azure.AI.Projects.AgentState","com.azure.ai.agents.models.AgentStateSource":"Azure.AI.Projects.AgentStateSource","com.azure.ai.agents.models.AgentVersionDetails":"Azure.AI.Projects.AgentVersionObject","com.azure.ai.agents.models.AgentVersionStatus":"Azure.AI.Projects.AgentVersionStatus","com.azure.ai.agents.models.ApiError":"OpenAI.Error","com.azure.ai.agents.models.ApplyPatchToolParameter":"OpenAI.ApplyPatchToolParam","com.azure.ai.agents.models.ApproximateLocation":"OpenAI.ApproximateLocation","com.azure.ai.agents.models.AudioTranscription":"OpenAI.AudioTranscription","com.azure.ai.agents.models.AudioTranscriptionModel":"OpenAI.AudioTranscription.model.anonymous","com.azure.ai.agents.models.AutoCodeInterpreterToolParameter":"OpenAI.AutoCodeInterpreterToolParam","com.azure.ai.agents.models.AzureAISearchQueryType":"Azure.AI.Projects.AzureAISearchQueryType","com.azure.ai.agents.models.AzureAISearchTool":"Azure.AI.Projects.AzureAISearchTool","com.azure.ai.agents.models.AzureAISearchToolCall":"Azure.AI.Projects.AzureAISearchToolCall","com.azure.ai.agents.models.AzureAISearchToolCallOutput":"Azure.AI.Projects.AzureAISearchToolCallOutput","com.azure.ai.agents.models.AzureAISearchToolResource":"Azure.AI.Projects.AzureAISearchToolResource","com.azure.ai.agents.models.AzureAISearchToolboxTool":"Azure.AI.Projects.AzureAISearchToolboxTool","com.azure.ai.agents.models.AzureCreateResponseDetails":"Azure.AI.Projects.AzureCreateResponseDetails","com.azure.ai.agents.models.AzureCreateResponseOptions":"Azure.AI.Projects.AzureCreateResponseOptions","com.azure.ai.agents.models.AzureFunctionBinding":"Azure.AI.Projects.AzureFunctionBinding","com.azure.ai.agents.models.AzureFunctionDefinition":"Azure.AI.Projects.AzureFunctionDefinition","com.azure.ai.agents.models.AzureFunctionDefinitionDetails":"Azure.AI.Projects.AzureFunctionDefinition.function.anonymous","com.azure.ai.agents.models.AzureFunctionStorageQueue":"Azure.AI.Projects.AzureFunctionStorageQueue","com.azure.ai.agents.models.AzureFunctionTool":"Azure.AI.Projects.AzureFunctionTool","com.azure.ai.agents.models.AzureFunctionToolCall":"Azure.AI.Projects.AzureFunctionToolCall","com.azure.ai.agents.models.AzureFunctionToolCallOutput":"Azure.AI.Projects.AzureFunctionToolCallOutput","com.azure.ai.agents.models.AzureUserSecurityContext":"Azure.AI.Projects.AzureUserSecurityContext","com.azure.ai.agents.models.BingCustomSearchConfiguration":"Azure.AI.Projects.BingCustomSearchConfiguration","com.azure.ai.agents.models.BingCustomSearchPreviewTool":"Azure.AI.Projects.BingCustomSearchPreviewTool","com.azure.ai.agents.models.BingCustomSearchToolCall":"Azure.AI.Projects.BingCustomSearchToolCall","com.azure.ai.agents.models.BingCustomSearchToolCallOutput":"Azure.AI.Projects.BingCustomSearchToolCallOutput","com.azure.ai.agents.models.BingCustomSearchToolParameters":"Azure.AI.Projects.BingCustomSearchToolParameters","com.azure.ai.agents.models.BingGroundingSearchConfiguration":"Azure.AI.Projects.BingGroundingSearchConfiguration","com.azure.ai.agents.models.BingGroundingSearchToolParameters":"Azure.AI.Projects.BingGroundingSearchToolParameters","com.azure.ai.agents.models.BingGroundingTool":"Azure.AI.Projects.BingGroundingTool","com.azure.ai.agents.models.BingGroundingToolCall":"Azure.AI.Projects.BingGroundingToolCall","com.azure.ai.agents.models.BingGroundingToolCallOutput":"Azure.AI.Projects.BingGroundingToolCallOutput","com.azure.ai.agents.models.BotServiceAuthorizationScheme":"Azure.AI.Projects.BotServiceAuthorizationScheme","com.azure.ai.agents.models.BotServiceRbacAuthorizationScheme":"Azure.AI.Projects.BotServiceRbacAuthorizationScheme","com.azure.ai.agents.models.BotServiceTenantAuthorizationScheme":"Azure.AI.Projects.BotServiceTenantAuthorizationScheme","com.azure.ai.agents.models.BrowserAutomationPreviewTool":"Azure.AI.Projects.BrowserAutomationPreviewTool","com.azure.ai.agents.models.BrowserAutomationPreviewToolboxTool":"Azure.AI.Projects.BrowserAutomationPreviewToolboxTool","com.azure.ai.agents.models.BrowserAutomationTool":"Azure.AI.Projects.BrowserAutomationTool","com.azure.ai.agents.models.BrowserAutomationToolCall":"Azure.AI.Projects.BrowserAutomationToolCall","com.azure.ai.agents.models.BrowserAutomationToolCallOutput":"Azure.AI.Projects.BrowserAutomationToolCallOutput","com.azure.ai.agents.models.BrowserAutomationToolConnectionParameters":"Azure.AI.Projects.BrowserAutomationToolConnectionParameters","com.azure.ai.agents.models.BrowserAutomationToolParameters":"Azure.AI.Projects.BrowserAutomationToolParameters","com.azure.ai.agents.models.BrowserAutomationToolboxTool":"Azure.AI.Projects.BrowserAutomationToolboxTool","com.azure.ai.agents.models.CallableToolAllowedCaller":"OpenAI.CallableToolAllowedCaller","com.azure.ai.agents.models.CaptureStructuredOutputsTool":"Azure.AI.Projects.CaptureStructuredOutputsTool","com.azure.ai.agents.models.ChatSummaryMemoryItem":"Azure.AI.Projects.ChatSummaryMemoryItem","com.azure.ai.agents.models.CodeConfiguration":"Azure.AI.Projects.CodeConfiguration","com.azure.ai.agents.models.CodeDependencyResolution":"Azure.AI.Projects.CodeDependencyResolution","com.azure.ai.agents.models.CodeFileDetails":null,"com.azure.ai.agents.models.CodeInterpreterTool":"OpenAI.CodeInterpreterTool","com.azure.ai.agents.models.CodeInterpreterToolboxTool":"Azure.AI.Projects.CodeInterpreterToolboxTool","com.azure.ai.agents.models.ComputerEnvironment":"ComputerEnvironmentExpandable","com.azure.ai.agents.models.ComputerTool":"OpenAI.ComputerTool","com.azure.ai.agents.models.ComputerUsePreviewTool":"OpenAI.ComputerUsePreviewTool","com.azure.ai.agents.models.ContainerAutoParameter":"OpenAI.ContainerAutoParam","com.azure.ai.agents.models.ContainerConfiguration":"Azure.AI.Projects.ContainerConfiguration","com.azure.ai.agents.models.ContainerMemoryLimit":"ContainerMemoryLimitExpandable","com.azure.ai.agents.models.ContainerNetworkPolicyAllowlistParameter":"OpenAI.ContainerNetworkPolicyAllowlistParam","com.azure.ai.agents.models.ContainerNetworkPolicyDisabledParameter":"OpenAI.ContainerNetworkPolicyDisabledParam","com.azure.ai.agents.models.ContainerNetworkPolicyDomainSecretParameter":"OpenAI.ContainerNetworkPolicyDomainSecretParam","com.azure.ai.agents.models.ContainerNetworkPolicyParamType":"OpenAI.ContainerNetworkPolicyParamType","com.azure.ai.agents.models.ContainerNetworkPolicyParameter":"OpenAI.ContainerNetworkPolicyParam","com.azure.ai.agents.models.ContainerSkill":"OpenAI.ContainerSkill","com.azure.ai.agents.models.ContainerSkillType":"OpenAI.ContainerSkillType","com.azure.ai.agents.models.CreateAgentVersionFromCodeContent":"Azure.AI.Projects.CreateAgentVersionFromCodeContent","com.azure.ai.agents.models.CreateAgentVersionFromCodeMetadata":"Azure.AI.Projects.CreateAgentVersionFromCodeMetadata","com.azure.ai.agents.models.CreateAgentVersionInput":"Azure.AI.Projects.CreateAgentVersionRequest","com.azure.ai.agents.models.CreateAgentVersionOptions":null,"com.azure.ai.agents.models.CreateTeamsPhoneExtensibilityTelephonyBindingInput":"Azure.AI.Projects.CreateTeamsPhoneExtensibilityTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyBindingInput":"Azure.AI.Projects.CreateTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyCallJobInput":"Azure.AI.Projects.CreateTelephonyCallJobRequest","com.azure.ai.agents.models.CreateTwilioTelephonyBindingInput":"Azure.AI.Projects.CreateTwilioTelephonyBindingRequest","com.azure.ai.agents.models.CustomGrammarFormatParameter":"OpenAI.CustomGrammarFormatParam","com.azure.ai.agents.models.CustomTextFormatParameter":"OpenAI.CustomTextFormatParam","com.azure.ai.agents.models.CustomToolParamFormat":"OpenAI.CustomToolParamFormat","com.azure.ai.agents.models.CustomToolParamFormatType":"OpenAI.CustomToolParamFormatType","com.azure.ai.agents.models.CustomToolParameter":"OpenAI.CustomToolParam","com.azure.ai.agents.models.DigitalWorkerType":"Azure.AI.Projects.DigitalWorkerType","com.azure.ai.agents.models.EntraAuthorizationScheme":"Azure.AI.Projects.EntraAuthorizationScheme","com.azure.ai.agents.models.EvaluationAzureStandardVoiceModelConfiguration":"Azure.AI.Projects.EvaluationAzureStandardVoiceModelConfiguration","com.azure.ai.agents.models.EvaluationModelConfiguration":"Azure.AI.Projects.EvaluationModelConfiguration","com.azure.ai.agents.models.EvaluationVoiceModelConfiguration":"Azure.AI.Projects.EvaluationVoiceModelConfiguration","com.azure.ai.agents.models.ExternalAgentDefinition":"Azure.AI.Projects.ExternalAgentDefinition","com.azure.ai.agents.models.FabricDataAgentToolCall":"Azure.AI.Projects.FabricDataAgentToolCall","com.azure.ai.agents.models.FabricDataAgentToolCallOutput":"Azure.AI.Projects.FabricDataAgentToolCallOutput","com.azure.ai.agents.models.FabricDataAgentToolParameters":"Azure.AI.Projects.FabricDataAgentToolParameters","com.azure.ai.agents.models.FabricIqPreviewTool":"Azure.AI.Projects.FabricIQPreviewTool","com.azure.ai.agents.models.FabricIqPreviewToolboxTool":"Azure.AI.Projects.FabricIQPreviewToolboxTool","com.azure.ai.agents.models.FileSearchTool":"OpenAI.FileSearchTool","com.azure.ai.agents.models.FileSearchToolboxTool":"Azure.AI.Projects.FileSearchToolboxTool","com.azure.ai.agents.models.FixedRatioVersionSelectionRule":"Azure.AI.Projects.FixedRatioVersionSelectionRule","com.azure.ai.agents.models.FunctionShellToolParamEnvironment":"OpenAI.FunctionShellToolParamEnvironment","com.azure.ai.agents.models.FunctionShellToolParamEnvironmentType":"OpenAI.FunctionShellToolParamEnvironmentType","com.azure.ai.agents.models.FunctionShellToolParameter":"OpenAI.FunctionShellToolParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentContainerReferenceParameter":"OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentLocalEnvironmentParameter":"OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam","com.azure.ai.agents.models.FunctionTool":"OpenAI.FunctionTool","com.azure.ai.agents.models.GetMicrosoft365AppPackageOptions":null,"com.azure.ai.agents.models.GitHubCopilotBuiltInTool":"Azure.AI.Projects.GitHubCopilotBuiltInTool","com.azure.ai.agents.models.GitHubCopilotHarness":"Azure.AI.Projects.GitHubCopilotHarness","com.azure.ai.agents.models.GitHubCopilotToolsetConfig":"Azure.AI.Projects.GitHubCopilotToolsetConfig","com.azure.ai.agents.models.GitHubCopilotToolsetDefaultConfig":"Azure.AI.Projects.GitHubCopilotToolsetDefaultConfig","com.azure.ai.agents.models.GitHubCopilotToolsetPreview":"Azure.AI.Projects.GitHubCopilotToolsetPreview","com.azure.ai.agents.models.GrammarSyntax":"GrammarSyntaxExpandable","com.azure.ai.agents.models.HeaderTelemetryEndpointAuth":"Azure.AI.Projects.HeaderTelemetryEndpointAuth","com.azure.ai.agents.models.HostedAgentDefinition":"Azure.AI.Projects.HostedAgentDefinition","com.azure.ai.agents.models.HybridSearchOptions":"OpenAI.HybridSearchOptions","com.azure.ai.agents.models.ImageGenActionEnum":"ImageGenActionEnumExpandable","com.azure.ai.agents.models.ImageGenTool":"OpenAI.ImageGenTool","com.azure.ai.agents.models.ImageGenToolBackground":"ImageGenToolBackgroundExpandable","com.azure.ai.agents.models.ImageGenToolInputImageMask":"OpenAI.ImageGenToolInputImageMask","com.azure.ai.agents.models.ImageGenToolModel":"OpenAI.ImageGenTool.model.anonymous","com.azure.ai.agents.models.ImageGenToolModeration":"ImageGenToolModerationExpandable","com.azure.ai.agents.models.ImageGenToolOutputFormat":"ImageGenToolOutputFormatExpandable","com.azure.ai.agents.models.ImageGenToolQuality":"ImageGenToolQualityExpandable","com.azure.ai.agents.models.ImageGenToolSize":"ImageGenToolSizeExpandable","com.azure.ai.agents.models.IncludeEnum":"OpenAI.IncludeEnum","com.azure.ai.agents.models.InlineSkillParameter":"OpenAI.InlineSkillParam","com.azure.ai.agents.models.InlineSkillSourceParameter":"OpenAI.InlineSkillSourceParam","com.azure.ai.agents.models.InputFidelity":"InputFidelityExpandable","com.azure.ai.agents.models.InvocationsProtocolConfiguration":"Azure.AI.Projects.InvocationsProtocolConfiguration","com.azure.ai.agents.models.InvocationsWsProtocolConfiguration":"Azure.AI.Projects.InvocationsWsProtocolConfiguration","com.azure.ai.agents.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.agents.models.ListMemoriesOptions":null,"com.azure.ai.agents.models.LocalShellToolParameter":"OpenAI.LocalShellToolParam","com.azure.ai.agents.models.LocalSkillParameter":"OpenAI.LocalSkillParam","com.azure.ai.agents.models.ManagedAgentIdentityBlueprintReference":"Azure.AI.Projects.ManagedAgentIdentityBlueprintReference","com.azure.ai.agents.models.McpListToolsTool":"OpenAI.MCPListToolsTool","com.azure.ai.agents.models.McpListToolsToolAnnotations":"OpenAI.MCPListToolsToolAnnotations","com.azure.ai.agents.models.McpListToolsToolInputSchema":"OpenAI.MCPListToolsToolInputSchema","com.azure.ai.agents.models.McpProtocolConfiguration":"Azure.AI.Projects.McpProtocolConfiguration","com.azure.ai.agents.models.McpTool":"OpenAI.MCPTool","com.azure.ai.agents.models.McpToolConnectorId":"McpToolConnectorIdExpandable","com.azure.ai.agents.models.McpToolFilter":"OpenAI.MCPToolFilter","com.azure.ai.agents.models.McpToolRequireApproval":"OpenAI.MCPToolRequireApproval","com.azure.ai.agents.models.McpToolboxTool":"Azure.AI.Projects.MCPToolboxTool","com.azure.ai.agents.models.MemoryCommandToolCall":"Azure.AI.Projects.MemoryCommandToolCall","com.azure.ai.agents.models.MemoryCommandToolCallOutput":"Azure.AI.Projects.MemoryCommandToolCallOutput","com.azure.ai.agents.models.MemoryItem":"Azure.AI.Projects.MemoryItem","com.azure.ai.agents.models.MemoryItemKind":"Azure.AI.Projects.MemoryItemKind","com.azure.ai.agents.models.MemoryOperation":"Azure.AI.Projects.MemoryOperation","com.azure.ai.agents.models.MemoryOperationKind":"Azure.AI.Projects.MemoryOperationKind","com.azure.ai.agents.models.MemorySearchItem":"Azure.AI.Projects.MemorySearchItem","com.azure.ai.agents.models.MemorySearchOptions":"Azure.AI.Projects.MemorySearchOptions","com.azure.ai.agents.models.MemorySearchPreviewTool":"Azure.AI.Projects.MemorySearchPreviewTool","com.azure.ai.agents.models.MemorySearchToolCall":"Azure.AI.Projects.MemorySearchToolCall","com.azure.ai.agents.models.MemoryStoreDefaultDefinition":"Azure.AI.Projects.MemoryStoreDefaultDefinition","com.azure.ai.agents.models.MemoryStoreDefaultOptions":"Azure.AI.Projects.MemoryStoreDefaultOptions","com.azure.ai.agents.models.MemoryStoreDefinition":"Azure.AI.Projects.MemoryStoreDefinition","com.azure.ai.agents.models.MemoryStoreDetails":"Azure.AI.Projects.MemoryStoreObject","com.azure.ai.agents.models.MemoryStoreKind":"Azure.AI.Projects.MemoryStoreKind","com.azure.ai.agents.models.MemoryStoreObjectType":"Azure.AI.Projects.MemoryStoreObjectType","com.azure.ai.agents.models.MemoryStoreOperationUsage":"Azure.AI.Projects.MemoryStoreOperationUsage","com.azure.ai.agents.models.MemoryStoreSearchResponse":"Azure.AI.Projects.MemoryStoreSearchResponse","com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult":"Azure.AI.Projects.MemoryStoreUpdateCompletedResult","com.azure.ai.agents.models.MemoryStoreUpdateResponse":"Azure.AI.Projects.MemoryStoreUpdateResponse","com.azure.ai.agents.models.MemoryStoreUpdateStatus":"Azure.AI.Projects.MemoryStoreUpdateStatus","com.azure.ai.agents.models.Microsoft365PermissionScopes":"Azure.AI.Projects.Microsoft365PermissionScopes","com.azure.ai.agents.models.Microsoft365PublishDefaults":"Azure.AI.Projects.Microsoft365PublishDefaults","com.azure.ai.agents.models.Microsoft365PublishResult":"Azure.AI.Projects.Microsoft365PublishResponse","com.azure.ai.agents.models.Microsoft365PublishScope":"Azure.AI.Projects.Microsoft365PublishScope","com.azure.ai.agents.models.MicrosoftFabricPreviewTool":"Azure.AI.Projects.MicrosoftFabricPreviewTool","com.azure.ai.agents.models.ModelRouterAttempt":"Azure.AI.Projects.ModelRouterAttempt","com.azure.ai.agents.models.ModelRouterAttemptError":"Azure.AI.Projects.ModelRouterAttemptError","com.azure.ai.agents.models.ModelRouterAttemptResult":"Azure.AI.Projects.ModelRouterAttemptResult","com.azure.ai.agents.models.ModelRouterDetails":"Azure.AI.Projects.ModelRouterDetails","com.azure.ai.agents.models.ModelRouterMode":"Azure.AI.Projects.ModelRouterMode","com.azure.ai.agents.models.ModelSamplingParameters":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.agents.models.ModelSelectionDetails":"Azure.AI.Projects.ModelSelectionDetails","com.azure.ai.agents.models.NamespaceTool":"OpenAI.NamespaceToolParam","com.azure.ai.agents.models.OpenApiAnonymousAuthDetails":"Azure.AI.Projects.OpenApiAnonymousAuthDetails","com.azure.ai.agents.models.OpenApiAuthDetails":"Azure.AI.Projects.OpenApiAuthDetails","com.azure.ai.agents.models.OpenApiAuthType":"Azure.AI.Projects.OpenApiAuthType","com.azure.ai.agents.models.OpenApiFunctionDefinition":"Azure.AI.Projects.OpenApiFunctionDefinition","com.azure.ai.agents.models.OpenApiFunctionDefinitionFunction":"Azure.AI.Projects.OpenApiFunctionDefinition.function.anonymous","com.azure.ai.agents.models.OpenApiManagedAuthDetails":"Azure.AI.Projects.OpenApiManagedAuthDetails","com.azure.ai.agents.models.OpenApiManagedSecurityScheme":"Azure.AI.Projects.OpenApiManagedSecurityScheme","com.azure.ai.agents.models.OpenApiProjectConnectionAuthDetails":"Azure.AI.Projects.OpenApiProjectConnectionAuthDetails","com.azure.ai.agents.models.OpenApiProjectConnectionSecurityScheme":"Azure.AI.Projects.OpenApiProjectConnectionSecurityScheme","com.azure.ai.agents.models.OpenApiTool":"Azure.AI.Projects.OpenApiTool","com.azure.ai.agents.models.OpenApiToolCall":"Azure.AI.Projects.OpenApiToolCall","com.azure.ai.agents.models.OpenApiToolCallOutput":"Azure.AI.Projects.OpenApiToolCallOutput","com.azure.ai.agents.models.OpenApiToolboxTool":"Azure.AI.Projects.OpenApiToolboxTool","com.azure.ai.agents.models.OptimizationContext":"Azure.AI.Projects.OptimizationContext","com.azure.ai.agents.models.OptimizationContextType":"Azure.AI.Projects.OptimizationContextType","com.azure.ai.agents.models.OtlpTelemetryEndpoint":"Azure.AI.Projects.OtlpTelemetryEndpoint","com.azure.ai.agents.models.PageOrder":"Azure.AI.Projects.PageOrder","com.azure.ai.agents.models.ProceduralMemoryItem":"Azure.AI.Projects.ProceduralMemoryItem","com.azure.ai.agents.models.ProgrammaticToolCallingParameter":"OpenAI.ProgrammaticToolCallingParam","com.azure.ai.agents.models.PromptAgentDefinition":"Azure.AI.Projects.PromptAgentDefinition","com.azure.ai.agents.models.PromptAgentDefinitionTextOptions":"Azure.AI.Projects.PromptAgentDefinitionTextOptions","com.azure.ai.agents.models.PromptOptimizationConfiguration":"Azure.AI.Projects.PromptOptimizationConfiguration","com.azure.ai.agents.models.ProtocolConfiguration":"Azure.AI.Projects.ProtocolConfiguration","com.azure.ai.agents.models.ProtocolVersionRecord":"Azure.AI.Projects.ProtocolVersionRecord","com.azure.ai.agents.models.PstnTelephonyTransferDestination":"Azure.AI.Projects.PSTNTelephonyTransferDestination","com.azure.ai.agents.models.PublishAgentToMicrosoft365Options":null,"com.azure.ai.agents.models.PublishApprovalStatus":"Azure.AI.Projects.PublishApprovalStatus","com.azure.ai.agents.models.RaiConfig":"Azure.AI.Projects.RaiConfig","com.azure.ai.agents.models.RaiInvocationContentType":"Azure.AI.Projects.RaiInvocationContentType","com.azure.ai.agents.models.RaiInvocationModeration":"Azure.AI.Projects.RaiInvocationModeration","com.azure.ai.agents.models.RaiInvocationResponseMode":"Azure.AI.Projects.RaiInvocationMode","com.azure.ai.agents.models.RaiSseTextSelector":"Azure.AI.Projects.RaiSseTextSelector","com.azure.ai.agents.models.RankerVersionType":"RankerVersionTypeExpandable","com.azure.ai.agents.models.RankingOptions":"OpenAI.RankingOptions","com.azure.ai.agents.models.RealtimeAudioFormat":"OpenAI.RealtimeAudioFormats","com.azure.ai.agents.models.RealtimeAudioFormatType":"OpenAI.RealtimeAudioFormatsType","com.azure.ai.agents.models.RealtimeClientEvent":"OpenAI.RealtimeClientEvent","com.azure.ai.agents.models.RealtimeClientEventType":"OpenAI.RealtimeClientEventType","com.azure.ai.agents.models.RealtimeConversationCreatedEvent":"OpenAI.RealtimeServerEventConversationCreated","com.azure.ai.agents.models.RealtimeConversationItem":"OpenAI.RealtimeConversationItem","com.azure.ai.agents.models.RealtimeConversationItemAddedEvent":"OpenAI.RealtimeServerEventConversationItemAdded","com.azure.ai.agents.models.RealtimeConversationItemAssistantMessage":"OpenAI.RealtimeConversationItemMessageAssistant","com.azure.ai.agents.models.RealtimeConversationItemCreateEvent":"OpenAI.RealtimeClientEventConversationItemCreate","com.azure.ai.agents.models.RealtimeConversationItemCreatedEvent":"OpenAI.RealtimeServerEventConversationItemCreated","com.azure.ai.agents.models.RealtimeConversationItemDeleteEvent":"OpenAI.RealtimeClientEventConversationItemDelete","com.azure.ai.agents.models.RealtimeConversationItemDeletedEvent":"OpenAI.RealtimeServerEventConversationItemDeleted","com.azure.ai.agents.models.RealtimeConversationItemDoneEvent":"OpenAI.RealtimeServerEventConversationItemDone","com.azure.ai.agents.models.RealtimeConversationItemFunctionCall":"OpenAI.RealtimeConversationItemFunctionCall","com.azure.ai.agents.models.RealtimeConversationItemFunctionCallOutput":"OpenAI.RealtimeConversationItemFunctionCallOutput","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionCompletedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionDeltaEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionFailedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionSegmentEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegment","com.azure.ai.agents.models.RealtimeConversationItemMessage":"OpenAI.RealtimeConversationItemMessage","com.azure.ai.agents.models.RealtimeConversationItemMessageType":"OpenAI.RealtimeConversationItemMessageType","com.azure.ai.agents.models.RealtimeConversationItemObjectType":"RealtimeConversationItemObject","com.azure.ai.agents.models.RealtimeConversationItemRetrieveEvent":"OpenAI.RealtimeClientEventConversationItemRetrieve","com.azure.ai.agents.models.RealtimeConversationItemRetrievedEvent":"OpenAI.RealtimeServerEventConversationItemRetrieved","com.azure.ai.agents.models.RealtimeConversationItemSystemMessage":"OpenAI.RealtimeConversationItemMessageSystem","com.azure.ai.agents.models.RealtimeConversationItemTruncateEvent":"OpenAI.RealtimeClientEventConversationItemTruncate","com.azure.ai.agents.models.RealtimeConversationItemTruncatedEvent":"OpenAI.RealtimeServerEventConversationItemTruncated","com.azure.ai.agents.models.RealtimeConversationItemType":"OpenAI.RealtimeConversationItemType","com.azure.ai.agents.models.RealtimeConversationItemUserMessage":"OpenAI.RealtimeConversationItemMessageUser","com.azure.ai.agents.models.RealtimeErrorEvent":"OpenAI.RealtimeServerEventRealtimeServerEventError","com.azure.ai.agents.models.RealtimeInputAudioBufferAppendEvent":"OpenAI.RealtimeClientEventInputAudioBufferAppend","com.azure.ai.agents.models.RealtimeInputAudioBufferClearEvent":"OpenAI.RealtimeClientEventInputAudioBufferClear","com.azure.ai.agents.models.RealtimeInputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCleared","com.azure.ai.agents.models.RealtimeInputAudioBufferCommitEvent":"OpenAI.RealtimeClientEventInputAudioBufferCommit","com.azure.ai.agents.models.RealtimeInputAudioBufferCommittedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCommitted","com.azure.ai.agents.models.RealtimeInputAudioBufferDtmfReceivedEvent":"OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStartedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStoppedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped","com.azure.ai.agents.models.RealtimeInputAudioBufferTimeoutTriggeredEvent":"OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggered","com.azure.ai.agents.models.RealtimeMcpApprovalInput":"OpenAI.RealtimeMCPApprovalRequest","com.azure.ai.agents.models.RealtimeMcpApprovalOutput":"OpenAI.RealtimeMCPApprovalResponse","com.azure.ai.agents.models.RealtimeMcpError":"OpenAI.RealtimeMCPError","com.azure.ai.agents.models.RealtimeMcpErrorType":"OpenAI.RealtimeMcpErrorType","com.azure.ai.agents.models.RealtimeMcpHttpError":"OpenAI.RealtimeMCPHTTPError","com.azure.ai.agents.models.RealtimeMcpListTools":"OpenAI.RealtimeMCPListTools","com.azure.ai.agents.models.RealtimeMcpListToolsCompletedEvent":"OpenAI.RealtimeServerEventMCPListToolsCompleted","com.azure.ai.agents.models.RealtimeMcpListToolsFailedEvent":"OpenAI.RealtimeServerEventMCPListToolsFailed","com.azure.ai.agents.models.RealtimeMcpListToolsInProgressEvent":"OpenAI.RealtimeServerEventMCPListToolsInProgress","com.azure.ai.agents.models.RealtimeMcpProtocolError":"OpenAI.RealtimeMCPProtocolError","com.azure.ai.agents.models.RealtimeMcpToolCall":"OpenAI.RealtimeMCPToolCall","com.azure.ai.agents.models.RealtimeMcpToolExecutionError":"OpenAI.RealtimeMCPToolExecutionError","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearEvent":"OpenAI.RealtimeClientEventOutputAudioBufferClear","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferCleared","com.azure.ai.agents.models.RealtimeOutputAudioBufferStartedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStarted","com.azure.ai.agents.models.RealtimeOutputAudioBufferStoppedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStopped","com.azure.ai.agents.models.RealtimePcmAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcm","com.azure.ai.agents.models.RealtimePcmaAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcma","com.azure.ai.agents.models.RealtimePcmuAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcmu","com.azure.ai.agents.models.RealtimeRateLimitsUpdatedEvent":"OpenAI.RealtimeServerEventRateLimitsUpdated","com.azure.ai.agents.models.RealtimeResponseAudioDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioDelta","com.azure.ai.agents.models.RealtimeResponseAudioDoneEvent":"OpenAI.RealtimeServerEventResponseAudioDone","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDelta","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDoneEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDone","com.azure.ai.agents.models.RealtimeResponseCancelEvent":"OpenAI.RealtimeClientEventResponseCancel","com.azure.ai.agents.models.RealtimeResponseContentPart":"OpenAI.RealtimeServerEventResponseContentPartDonePart","com.azure.ai.agents.models.RealtimeResponseContentPartAddedEvent":"OpenAI.RealtimeServerEventResponseContentPartAdded","com.azure.ai.agents.models.RealtimeResponseContentPartDoneEvent":"OpenAI.RealtimeServerEventResponseContentPartDone","com.azure.ai.agents.models.RealtimeResponseCreateEvent":"OpenAI.RealtimeClientEventResponseCreate","com.azure.ai.agents.models.RealtimeResponseCreatedEvent":"OpenAI.RealtimeServerEventResponseCreated","com.azure.ai.agents.models.RealtimeResponseDoneEvent":"OpenAI.RealtimeServerEventResponseDone","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallCompletedEvent":"OpenAI.RealtimeServerEventResponseMCPCallCompleted","com.azure.ai.agents.models.RealtimeResponseMcpCallFailedEvent":"OpenAI.RealtimeServerEventResponseMCPCallFailed","com.azure.ai.agents.models.RealtimeResponseMcpCallInProgressEvent":"OpenAI.RealtimeServerEventResponseMCPCallInProgress","com.azure.ai.agents.models.RealtimeResponseOutputItemAddedEvent":"OpenAI.RealtimeServerEventResponseOutputItemAdded","com.azure.ai.agents.models.RealtimeResponseOutputItemDoneEvent":"OpenAI.RealtimeServerEventResponseOutputItemDone","com.azure.ai.agents.models.RealtimeResponseTextDeltaEvent":"OpenAI.RealtimeServerEventResponseTextDelta","com.azure.ai.agents.models.RealtimeResponseTextDoneEvent":"OpenAI.RealtimeServerEventResponseTextDone","com.azure.ai.agents.models.RealtimeSemanticVadTurnDetection":"OpenAI.RealtimeTurnDetectionSemanticVad","com.azure.ai.agents.models.RealtimeServerEvent":"OpenAI.RealtimeServerEvent","com.azure.ai.agents.models.RealtimeServerEventType":"OpenAI.RealtimeServerEventType","com.azure.ai.agents.models.RealtimeServerVadTurnDetection":"OpenAI.RealtimeTurnDetectionServerVad","com.azure.ai.agents.models.RealtimeSessionAudioConfiguration":"OpenAI.RealtimeSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeSessionAudioInput":"OpenAI.RealtimeSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeSessionAudioOutput":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput","com.azure.ai.agents.models.RealtimeSessionConfiguration":"OpenAI.RealtimeSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeSessionConfigurationBase":"OpenAI.RealtimeSessionCreateRequestUnion","com.azure.ai.agents.models.RealtimeSessionCreateRequestGAAudioOutputVoice":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput.voice.anonymous","com.azure.ai.agents.models.RealtimeSessionCreatedEvent":"OpenAI.RealtimeServerEventSessionCreated","com.azure.ai.agents.models.RealtimeSessionTracingConfiguration":"OpenAI.RealtimeSessionCreateRequestGATracing","com.azure.ai.agents.models.RealtimeSessionType":"OpenAI.RealtimeSessionCreateRequestUnionType","com.azure.ai.agents.models.RealtimeSessionUpdateEvent":"OpenAI.RealtimeClientEventSessionUpdate","com.azure.ai.agents.models.RealtimeSessionUpdatedEvent":"OpenAI.RealtimeServerEventSessionUpdated","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioInput":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeTranscriptionSessionConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeTurnDetection":"OpenAI.RealtimeTurnDetection","com.azure.ai.agents.models.RealtimeTurnDetectionType":"OpenAI.RealtimeTurnDetectionType","com.azure.ai.agents.models.ReminderPreviewToolboxTool":"Azure.AI.Projects.ReminderPreviewToolboxTool","com.azure.ai.agents.models.ResponseFormatJsonSchemaInner":"OpenAI.ResponseFormatJsonSchemaSchema","com.azure.ai.agents.models.ResponseUsageInputTokensDetails":"OpenAI.ResponseUsageInputTokensDetails","com.azure.ai.agents.models.ResponseUsageOutputTokensDetails":"OpenAI.ResponseUsageOutputTokensDetails","com.azure.ai.agents.models.ResponsesProtocolConfiguration":"Azure.AI.Projects.ResponsesProtocolConfiguration","com.azure.ai.agents.models.RoutingConfiguration":"Azure.AI.Projects.RoutingConfiguration","com.azure.ai.agents.models.RoutingTraceEntry":"Azure.AI.Projects.RoutingTraceEntry","com.azure.ai.agents.models.SearchContentType":"OpenAI.SearchContentType","com.azure.ai.agents.models.SearchContextSize":"SearchContextSizeExpandable","com.azure.ai.agents.models.SessionAffinityConfiguration":"Azure.AI.Projects.SessionAffinityConfiguration","com.azure.ai.agents.models.SessionAffinityDecision":"Azure.AI.Projects.SessionAffinityDecision","com.azure.ai.agents.models.SessionAffinityDetails":"Azure.AI.Projects.SessionAffinityDetails","com.azure.ai.agents.models.SessionAffinityMode":"Azure.AI.Projects.SessionAffinityMode","com.azure.ai.agents.models.SessionAffinityRequestMode":"Azure.AI.Projects.SessionAffinityRequestMode","com.azure.ai.agents.models.SessionAffinitySource":"Azure.AI.Projects.SessionAffinitySource","com.azure.ai.agents.models.SessionConfiguration":"Azure.AI.Projects.SessionConfiguration","com.azure.ai.agents.models.SessionDirectoryEntry":"Azure.AI.Projects.SessionDirectoryEntry","com.azure.ai.agents.models.SessionFileWriteResult":"Azure.AI.Projects.SessionFileWriteResponse","com.azure.ai.agents.models.SessionLogEvent":"Azure.AI.Projects.SessionLogEvent","com.azure.ai.agents.models.SessionLogEventType":"Azure.AI.Projects.SessionLogEventType","com.azure.ai.agents.models.SharepointGroundingToolCall":"Azure.AI.Projects.SharepointGroundingToolCall","com.azure.ai.agents.models.SharepointGroundingToolCallOutput":"Azure.AI.Projects.SharepointGroundingToolCallOutput","com.azure.ai.agents.models.SharepointGroundingToolParameters":"Azure.AI.Projects.SharepointGroundingToolParameters","com.azure.ai.agents.models.SharepointPreviewTool":"Azure.AI.Projects.SharepointPreviewTool","com.azure.ai.agents.models.ShellToolboxTool":"Azure.AI.Projects.ShellToolboxTool","com.azure.ai.agents.models.SipTelephonyTransferDestination":"Azure.AI.Projects.SipTelephonyTransferDestination","com.azure.ai.agents.models.SkillReference":"Azure.AI.Projects.SkillReference","com.azure.ai.agents.models.SkillReferenceParameter":"OpenAI.SkillReferenceParam","com.azure.ai.agents.models.SteeringPromptOptimizationContext":"Azure.AI.Projects.SteeringPromptOptimizationContext","com.azure.ai.agents.models.StructuredInputDefinition":"Azure.AI.Projects.StructuredInputDefinition","com.azure.ai.agents.models.StructuredOutputDefinition":"Azure.AI.Projects.StructuredOutputDefinition","com.azure.ai.agents.models.TargetAttribute":"Azure.AI.Projects.TargetAttribute","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBinding":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBinding","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBindingListItem":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBindingListItem","com.azure.ai.agents.models.TeamsTelephonyTransferDestination":"Azure.AI.Projects.TeamsTelephonyTransferDestination","com.azure.ai.agents.models.TelemetryConfig":"Azure.AI.Projects.TelemetryConfig","com.azure.ai.agents.models.TelemetryDataKind":"Azure.AI.Projects.TelemetryDataKind","com.azure.ai.agents.models.TelemetryEndpoint":"Azure.AI.Projects.TelemetryEndpoint","com.azure.ai.agents.models.TelemetryEndpointAuth":"Azure.AI.Projects.TelemetryEndpointAuth","com.azure.ai.agents.models.TelemetryEndpointAuthType":"Azure.AI.Projects.TelemetryEndpointAuthType","com.azure.ai.agents.models.TelemetryEndpointKind":"Azure.AI.Projects.TelemetryEndpointKind","com.azure.ai.agents.models.TelemetryTransportProtocol":"Azure.AI.Projects.TelemetryTransportProtocol","com.azure.ai.agents.models.TelephonyBinding":"Azure.AI.Projects.TelephonyBinding","com.azure.ai.agents.models.TelephonyBindingListItem":"Azure.AI.Projects.TelephonyBindingListItem","com.azure.ai.agents.models.TelephonyBindingStatus":"Azure.AI.Projects.TelephonyBindingStatus","com.azure.ai.agents.models.TelephonyCallDurationBasis":"Azure.AI.Projects.TelephonyCallDurationBasis","com.azure.ai.agents.models.TelephonyCallEndReason":"Azure.AI.Projects.TelephonyCallEndReason","com.azure.ai.agents.models.TelephonyCallJob":"Azure.AI.Projects.TelephonyCallJob","com.azure.ai.agents.models.TelephonyCallJobCancellation":"Azure.AI.Projects.TelephonyCallJobCancellation","com.azure.ai.agents.models.TelephonyCallJobSchedule":"Azure.AI.Projects.TelephonyCallJobSchedule","com.azure.ai.agents.models.TelephonyCallJobStatus":"Azure.AI.Projects.TelephonyCallJobStatus","com.azure.ai.agents.models.TelephonyCallJobTerminalReason":"Azure.AI.Projects.TelephonyCallJobTerminalReason","com.azure.ai.agents.models.TelephonyCallLifecycleEvent":"Azure.AI.Projects.TelephonyCallLifecycleEvent","com.azure.ai.agents.models.TelephonyCallLifecycleEventName":"Azure.AI.Projects.TelephonyCallLifecycleEventName","com.azure.ai.agents.models.TelephonyCallLifecycleEventOutcome":"Azure.AI.Projects.TelephonyCallLifecycleEventOutcome","com.azure.ai.agents.models.TelephonyCallLifecycleEventReason":"Azure.AI.Projects.TelephonyCallLifecycleEventReason","com.azure.ai.agents.models.TelephonyCallLifecycleEventSource":"Azure.AI.Projects.TelephonyCallLifecycleEventSource","com.azure.ai.agents.models.TelephonyCallPhase":"Azure.AI.Projects.TelephonyCallPhase","com.azure.ai.agents.models.TelephonyCallRecord":"Azure.AI.Projects.TelephonyCallRecord","com.azure.ai.agents.models.TelephonyCallStatus":"Azure.AI.Projects.TelephonyCallStatus","com.azure.ai.agents.models.TelephonyCallSummary":"Azure.AI.Projects.TelephonyCallSummary","com.azure.ai.agents.models.TelephonyCallTimestampSource":"Azure.AI.Projects.TelephonyCallTimestampSource","com.azure.ai.agents.models.TelephonyCallTiming":"Azure.AI.Projects.TelephonyCallTiming","com.azure.ai.agents.models.TelephonyCallTrace":"Azure.AI.Projects.TelephonyCallTrace","com.azure.ai.agents.models.TelephonyCallTraceMode":"Azure.AI.Projects.TelephonyCallTraceMode","com.azure.ai.agents.models.TelephonyCallTraceStatus":"Azure.AI.Projects.TelephonyCallTraceStatus","com.azure.ai.agents.models.TelephonyOutboundDestination":"Azure.AI.Projects.TelephonyOutboundDestination","com.azure.ai.agents.models.TelephonyOutboundDestinationType":"Azure.AI.Projects.TelephonyOutboundDestinationType","com.azure.ai.agents.models.TelephonyOutboundFixedIntervalRetryPolicy":"Azure.AI.Projects.TelephonyOutboundFixedIntervalRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicy":"Azure.AI.Projects.TelephonyOutboundRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicyType":"Azure.AI.Projects.TelephonyOutboundRetryPolicyType","com.azure.ai.agents.models.TelephonyProvider":"Azure.AI.Projects.TelephonyProvider","com.azure.ai.agents.models.TelephonyTransferDestination":"Azure.AI.Projects.TelephonyTransferDestination","com.azure.ai.agents.models.TelephonyTransferDestinationKind":"Azure.AI.Projects.TelephonyTransferDestinationKind","com.azure.ai.agents.models.TelephonyTransferTarget":"Azure.AI.Projects.TelephonyTransferTarget","com.azure.ai.agents.models.TelephonyTransferTargets":"Azure.AI.Projects.TelephonyTransferTargets","com.azure.ai.agents.models.TextResponseFormatConfiguration":"OpenAI.TextResponseFormatConfiguration","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatJsonObject":"OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatText":"OpenAI.TextResponseFormatConfigurationResponseFormatText","com.azure.ai.agents.models.TextResponseFormatConfigurationType":"OpenAI.TextResponseFormatConfigurationType","com.azure.ai.agents.models.TextResponseFormatJsonSchema":"OpenAI.TextResponseFormatJsonSchema","com.azure.ai.agents.models.Tool":"OpenAI.Tool","com.azure.ai.agents.models.ToolCallStatus":"Azure.AI.Projects.ToolCallStatus","com.azure.ai.agents.models.ToolConfig":"Azure.AI.Projects.ToolConfig","com.azure.ai.agents.models.ToolProjectConnection":"Azure.AI.Projects.ToolProjectConnection","com.azure.ai.agents.models.ToolSearchExecutionType":"OpenAI.ToolSearchExecutionType","com.azure.ai.agents.models.ToolSearchTool":"OpenAI.ToolSearchToolParam","com.azure.ai.agents.models.ToolSearchToolboxTool":"Azure.AI.Projects.ToolSearchToolboxTool","com.azure.ai.agents.models.ToolType":"OpenAI.ToolType","com.azure.ai.agents.models.ToolboxDetails":"Azure.AI.Projects.ToolboxObject","com.azure.ai.agents.models.ToolboxPolicies":"Azure.AI.Projects.ToolboxPolicies","com.azure.ai.agents.models.ToolboxSearchPreviewToolboxTool":"Azure.AI.Projects.ToolboxSearchPreviewToolboxTool","com.azure.ai.agents.models.ToolboxShellContainerAutoEnvironment":"Azure.AI.Projects.ToolboxShellContainerAutoEnvironment","com.azure.ai.agents.models.ToolboxShellContainerReferenceEnvironment":"Azure.AI.Projects.ToolboxShellContainerReferenceEnvironment","com.azure.ai.agents.models.ToolboxShellEnvironment":"Azure.AI.Projects.ToolboxShellEnvironment","com.azure.ai.agents.models.ToolboxShellNetworkPolicy":"Azure.AI.Projects.ToolboxShellNetworkPolicy","com.azure.ai.agents.models.ToolboxShellNetworkPolicyDisabled":"Azure.AI.Projects.ToolboxShellNetworkPolicyDisabled","com.azure.ai.agents.models.ToolboxSkill":"Azure.AI.Projects.ToolboxSkill","com.azure.ai.agents.models.ToolboxSkillReference":"Azure.AI.Projects.ToolboxSkillReference","com.azure.ai.agents.models.ToolboxTool":"Azure.AI.Projects.ToolboxTool","com.azure.ai.agents.models.ToolboxToolType":"Azure.AI.Projects.ToolboxToolType","com.azure.ai.agents.models.ToolboxVersionDetails":"Azure.AI.Projects.ToolboxVersionObject","com.azure.ai.agents.models.ToolboxVersions":"Azure.AI.Projects.ToolboxVersions","com.azure.ai.agents.models.TranscriptTextInputTokenDetails":"OpenAI.TranscriptTextUsageTokensInputTokenDetails","com.azure.ai.agents.models.TranscriptTextUsage":"OpenAI.CreateTranscriptionResponseJsonUsage","com.azure.ai.agents.models.TranscriptTextUsageDuration":"OpenAI.TranscriptTextUsageDuration","com.azure.ai.agents.models.TranscriptTextUsageTokens":"OpenAI.TranscriptTextUsageTokens","com.azure.ai.agents.models.TranscriptTextUsageType":"OpenAI.CreateTranscriptionResponseJsonUsageType","com.azure.ai.agents.models.TranscriptionLanguage":"OpenAI.TranscriptionLanguage","com.azure.ai.agents.models.TwilioTelephonyBinding":"Azure.AI.Projects.TwilioTelephonyBinding","com.azure.ai.agents.models.TwilioTelephonyBindingListItem":"Azure.AI.Projects.TwilioTelephonyBindingListItem","com.azure.ai.agents.models.UpdateAgentDetailsOptions":"Azure.AI.Projects.patchAgentObject.Request.anonymous","com.azure.ai.agents.models.UpdateTelephonyBindingInput":"Azure.AI.Projects.UpdateTelephonyBindingRequest","com.azure.ai.agents.models.UserConversationSimulationAudioEffect":"Azure.AI.Projects.UserConversationSimulationAudioEffect","com.azure.ai.agents.models.UserConversationSimulationAudioEffectsConfiguration":"Azure.AI.Projects.UserConversationSimulationAudioEffectsConfiguration","com.azure.ai.agents.models.UserConversationSimulationConfiguration":"Azure.AI.Projects.UserConversationSimulationConfiguration","com.azure.ai.agents.models.UserConversationSimulationDefaultInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationDefaultInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationTestCase":"Azure.AI.Projects.UserConversationSimulationTestCase","com.azure.ai.agents.models.UserConversationSimulationUserBehaviorConfiguration":"Azure.AI.Projects.UserConversationSimulationUserBehaviorConfiguration","com.azure.ai.agents.models.UserProfileMemoryItem":"Azure.AI.Projects.UserProfileMemoryItem","com.azure.ai.agents.models.VersionIndicator":"Azure.AI.Projects.VersionIndicator","com.azure.ai.agents.models.VersionIndicatorType":"Azure.AI.Projects.VersionIndicatorType","com.azure.ai.agents.models.VersionRefIndicator":"Azure.AI.Projects.VersionRefIndicator","com.azure.ai.agents.models.VersionSelectionRule":"Azure.AI.Projects.VersionSelectionRule","com.azure.ai.agents.models.VersionSelector":"Azure.AI.Projects.VersionSelector","com.azure.ai.agents.models.VersionSelectorType":"Azure.AI.Projects.VersionSelectorType","com.azure.ai.agents.models.VoiceAgentAnimationConfiguration":"Azure.AI.Projects.VoiceAgentAnimationConfig","com.azure.ai.agents.models.VoiceAgentAnimationOutputType":"Azure.AI.Projects.VoiceAgentAnimationOutputType","com.azure.ai.agents.models.VoiceAgentAudioConfiguration":"Azure.AI.Projects.VoiceAgentAudioConfig","com.azure.ai.agents.models.VoiceAgentAudioInputConfiguration":"Azure.AI.Projects.VoiceAgentAudioInputConfig","com.azure.ai.agents.models.VoiceAgentAudioOutputConfiguration":"Azure.AI.Projects.VoiceAgentAudioOutputConfig","com.azure.ai.agents.models.VoiceAgentAudioTimestampType":"Azure.AI.Projects.VoiceAgentAudioTimestampType","com.azure.ai.agents.models.VoiceAgentAvatarConfiguration":"Azure.AI.Projects.VoiceAgentAvatarConfig","com.azure.ai.agents.models.VoiceAgentAvatarIceServer":"Azure.AI.Projects.VoiceAgentAvatarIceServer","com.azure.ai.agents.models.VoiceAgentAvatarOutputProtocol":"Azure.AI.Projects.VoiceAgentAvatarOutputProtocol","com.azure.ai.agents.models.VoiceAgentAvatarScene":"Azure.AI.Projects.VoiceAgentAvatarScene","com.azure.ai.agents.models.VoiceAgentAvatarType":"Azure.AI.Projects.VoiceAgentAvatarType","com.azure.ai.agents.models.VoiceAgentAvatarVideoBackground":"Azure.AI.Projects.VoiceAgentAvatarVideoBackground","com.azure.ai.agents.models.VoiceAgentAvatarVideoCrop":"Azure.AI.Projects.VoiceAgentAvatarVideoCrop","com.azure.ai.agents.models.VoiceAgentAvatarVideoParameters":"Azure.AI.Projects.VoiceAgentAvatarVideoParams","com.azure.ai.agents.models.VoiceAgentAvatarVideoResolution":"Azure.AI.Projects.VoiceAgentAvatarVideoResolution","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadEnglishTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadEnTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadMultilingualTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadMultilingualTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentDefinition":"Azure.AI.Projects.VoiceAgentDefinition","com.azure.ai.agents.models.VoiceAgentEchoCancellation":"Azure.AI.Projects.VoiceAgentEchoCancellation","com.azure.ai.agents.models.VoiceAgentEchoCancellationReferenceSource":"Azure.AI.Projects.VoiceAgentEchoCancellationReferenceSource","com.azure.ai.agents.models.VoiceAgentEndConversationSystemTool":"Azure.AI.Projects.VoiceAgentEndConversationSystemTool","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetection":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetection","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetectionModel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetectionModel","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceThresholdLevel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceThresholdLevel","com.azure.ai.agents.models.VoiceAgentFunctionTool":"Azure.AI.Projects.VoiceAgentFunctionTool","com.azure.ai.agents.models.VoiceAgentFunctionToolType1":null,"com.azure.ai.agents.models.VoiceAgentGreetingConfiguration":"Azure.AI.Projects.VoiceAgentGreetingConfig","com.azure.ai.agents.models.VoiceAgentInputTranscription":"Azure.AI.Projects.VoiceAgentInputTranscription","com.azure.ai.agents.models.VoiceAgentInputTranscriptionModel":"Azure.AI.Projects.VoiceAgentInputTranscriptionModel","com.azure.ai.agents.models.VoiceAgentInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentInterimResponseTrigger":"Azure.AI.Projects.VoiceAgentInterimResponseTrigger","com.azure.ai.agents.models.VoiceAgentLlmGeneratedGreetingConfiguration":"Azure.AI.Projects.VoiceAgentLlmGeneratedGreetingConfig","com.azure.ai.agents.models.VoiceAgentLlmInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentLlmInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentMcpTool":"Azure.AI.Projects.VoiceAgentMcpTool","com.azure.ai.agents.models.VoiceAgentNoiseReduction":"Azure.AI.Projects.VoiceAgentNoiseReduction","com.azure.ai.agents.models.VoiceAgentNoiseReductionType":"Azure.AI.Projects.VoiceAgentNoiseReductionType","com.azure.ai.agents.models.VoiceAgentRealtimeResponse":"Azure.AI.Projects.VoiceAgentRealtimeResponse","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDone","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDone","com.azure.ai.agents.models.VoiceAgentResponseAudioConfig":"TypeSpec.PickProperties","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDelta","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDone","com.azure.ai.agents.models.VoiceAgentResponseCreateOptions":"Azure.AI.Projects.VoiceAgentResponseCreateParams","com.azure.ai.agents.models.VoiceAgentResponseVideoDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseVideoDelta","com.azure.ai.agents.models.VoiceAgentRtcCallErrorDetails":"Azure.AI.Projects.VoiceAgentRtcCallErrorDetails","com.azure.ai.agents.models.VoiceAgentRtcCallErrorEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallError","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreateEvent":"Azure.AI.Projects.VoiceAgentClientEventRtcCallSdpCreate","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreatedEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallSdpCreated","com.azure.ai.agents.models.VoiceAgentSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentServerVadTurnDetection":"Azure.AI.Projects.VoiceAgentServerVadTurnDetection","com.azure.ai.agents.models.VoiceAgentSessionAvatarConfiguration":"Azure.AI.Projects.VoiceAgentSessionAvatarConfig","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectEvent":"Azure.AI.Projects.VoiceAgentClientEventSessionAvatarConnect","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarConnecting","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToIdleEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToIdle","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToSpeakingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToSpeaking","com.azure.ai.agents.models.VoiceAgentSessionIncludeOption":"Azure.AI.Projects.VoiceAgentSessionIncludeOption","com.azure.ai.agents.models.VoiceAgentSessionResponseConfiguration":"Azure.AI.Projects.VoiceAgentSessionResponseConfig","com.azure.ai.agents.models.VoiceAgentSessionSubagentAbortedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentAborted","com.azure.ai.agents.models.VoiceAgentSessionSubagentCompletedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentCompleted","com.azure.ai.agents.models.VoiceAgentSessionSubagentStartedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentStarted","com.azure.ai.agents.models.VoiceAgentSessionUpdateConfiguration":"Azure.AI.Projects.VoiceAgentSessionUpdateConfig","com.azure.ai.agents.models.VoiceAgentStaticInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentStaticInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentSubagent":"Azure.AI.Projects.VoiceAgentSubagent","com.azure.ai.agents.models.VoiceAgentSubagentAbortReason":"Azure.AI.Projects.VoiceAgentSubagentAbortReason","com.azure.ai.agents.models.VoiceAgentSubagentConfiguration":"Azure.AI.Projects.VoiceAgentSubagentConfig","com.azure.ai.agents.models.VoiceAgentSubagentResponsePolicy":"Azure.AI.Projects.VoiceAgentSubagentResponsePolicy","com.azure.ai.agents.models.VoiceAgentSystemTool":"Azure.AI.Projects.VoiceAgentSystemTool","com.azure.ai.agents.models.VoiceAgentSystemToolName":"Azure.AI.Projects.VoiceAgentSystemToolName","com.azure.ai.agents.models.VoiceAgentTemplateGreetingConfiguration":"Azure.AI.Projects.VoiceAgentTemplateGreetingConfig","com.azure.ai.agents.models.VoiceAgentTool":"Azure.AI.Projects.VoiceAgentTool","com.azure.ai.agents.models.VoiceAgentToolResponseScheduling":"Azure.AI.Projects.VoiceAgentToolResponseScheduling","com.azure.ai.agents.models.VoiceAgentToolboxTool":"Azure.AI.Projects.VoiceAgentToolboxTool","com.azure.ai.agents.models.VoiceAgentTranscriptionPhrase":"Azure.AI.Projects.VoiceAgentTranscriptionPhrase","com.azure.ai.agents.models.VoiceAgentTranscriptionWord":"Azure.AI.Projects.VoiceAgentTranscriptionWord","com.azure.ai.agents.models.VoiceAgentTransport":"Azure.AI.Projects.VoiceAgentTransport","com.azure.ai.agents.models.VoiceAgentTurnDetectionConfiguration":"Azure.AI.Projects.VoiceAgentTurnDetectionConfig","com.azure.ai.agents.models.VoiceAgentTurnDetectionType":"Azure.AI.Projects.VoiceAgentTurnDetectionType","com.azure.ai.agents.models.VoiceAgentWarningDetails":"Azure.AI.Projects.VoiceAgentServerEventWarningDetails","com.azure.ai.agents.models.VoiceAgentWarningEvent":"Azure.AI.Projects.VoiceAgentServerEventWarning","com.azure.ai.agents.models.VoiceAudioCodec":"Azure.AI.Projects.VoiceAudioCodec","com.azure.ai.agents.models.VoiceAudioContainerFormat":"Azure.AI.Projects.VoiceAudioContainerFormat","com.azure.ai.agents.models.VoiceAudioItem":"Azure.AI.Projects.VoiceAudioItem","com.azure.ai.agents.models.VoiceAudioRole":"Azure.AI.Projects.VoiceAudioRole","com.azure.ai.agents.models.VoiceConversation":"Azure.AI.Projects.VoiceConversation","com.azure.ai.agents.models.VoiceConversationEngine":"Azure.AI.Projects.VoiceConversationEngine","com.azure.ai.agents.models.VoiceConversationStatus":"Azure.AI.Projects.VoiceConversationStatus","com.azure.ai.agents.models.VoiceGeneratedAudioItem":"Azure.AI.Projects.VoiceGeneratedAudioItem","com.azure.ai.agents.models.VoiceHostedAgentConversationEngine":"Azure.AI.Projects.VoiceHostedAgentConversationEngine","com.azure.ai.agents.models.VoiceIds":"OpenAI.VoiceIdsShared","com.azure.ai.agents.models.VoiceModelType":"Azure.AI.Projects.VoiceModelType","com.azure.ai.agents.models.VoiceOutputModality":"Azure.AI.Projects.VoiceOutputModality","com.azure.ai.agents.models.VoiceRecording":"Azure.AI.Projects.VoiceRecording","com.azure.ai.agents.models.VoiceRecordingChannelLayout":"Azure.AI.Projects.VoiceRecordingChannelLayout","com.azure.ai.agents.models.VoiceResponse":"Azure.AI.Projects.VoiceResponse","com.azure.ai.agents.models.VoiceResponseAudio":"Azure.AI.Projects.VoiceResponseAudio","com.azure.ai.agents.models.VoiceResponseAudioOutput":"Azure.AI.Projects.VoiceResponseAudioOutput","com.azure.ai.agents.models.VoiceResponseObjectType":null,"com.azure.ai.agents.models.VoiceType":"Azure.AI.Projects.VoiceType","com.azure.ai.agents.models.WebIqPreviewTool":"Azure.AI.Projects.WebIQPreviewTool","com.azure.ai.agents.models.WebIqPreviewToolboxTool":"Azure.AI.Projects.WebIQPreviewToolboxTool","com.azure.ai.agents.models.WebSearchApproximateLocation":"OpenAI.WebSearchApproximateLocation","com.azure.ai.agents.models.WebSearchConfiguration":"Azure.AI.Projects.WebSearchConfiguration","com.azure.ai.agents.models.WebSearchPreviewTool":"OpenAI.WebSearchPreviewTool","com.azure.ai.agents.models.WebSearchTool":"OpenAI.WebSearchTool","com.azure.ai.agents.models.WebSearchToolFilters":"OpenAI.WebSearchToolFilters","com.azure.ai.agents.models.WebSearchToolSearchContextSize":"WebSearchToolSearchContextSizeExpandable","com.azure.ai.agents.models.WebSearchToolboxTool":"Azure.AI.Projects.WebSearchToolboxTool","com.azure.ai.agents.models.WorkIqPreviewTool":"Azure.AI.Projects.WorkIQPreviewTool","com.azure.ai.agents.models.WorkIqPreviewToolboxTool":"Azure.AI.Projects.WorkIQPreviewToolboxTool","com.azure.ai.agents.models.WorkflowAgentDefinition":"Azure.AI.Projects.WorkflowAgentDefinition"},"generatedFiles":["src/main/java/com/azure/ai/agents/AgentsAsyncClient.java","src/main/java/com/azure/ai/agents/AgentsClient.java","src/main/java/com/azure/ai/agents/AgentsClientBuilder.java","src/main/java/com/azure/ai/agents/AgentsServiceVersion.java","src/main/java/com/azure/ai/agents/BetaAgentsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaAgentsClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresAsyncClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java","src/main/java/com/azure/ai/agents/ToolboxesAsyncClient.java","src/main/java/com/azure/ai/agents/ToolboxesClient.java","src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java","src/main/java/com/azure/ai/agents/implementation/AgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaAgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaMemoryStoresImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java","src/main/java/com/azure/ai/agents/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/agents/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/agents/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/PollingUtils.java","src/main/java/com/azure/ai/agents/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/ToolboxesImpl.java","src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromCodeContent.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentOptions.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateSessionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateToolboxVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/GetMicrosoft365AppPackageRequest.java","src/main/java/com/azure/ai/agents/implementation/models/ListMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/PublishAgentToMicrosoft365Request.java","src/main/java/com/azure/ai/agents/implementation/models/ReplaceTelephonyTransferTargetsRequest.java","src/main/java/com/azure/ai/agents/implementation/models/SearchMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/TransferTelephonyCallRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxInput.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxRequest.java","src/main/java/com/azure/ai/agents/implementation/models/package-info.java","src/main/java/com/azure/ai/agents/implementation/package-info.java","src/main/java/com/azure/ai/agents/models/A2APreviewTool.java","src/main/java/com/azure/ai/agents/models/A2APreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/A2AProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/A2AProtocolVersion.java","src/main/java/com/azure/ai/agents/models/A2ATool.java","src/main/java/com/azure/ai/agents/models/A2AToolCall.java","src/main/java/com/azure/ai/agents/models/A2AToolCallOutput.java","src/main/java/com/azure/ai/agents/models/A2AToolboxTool.java","src/main/java/com/azure/ai/agents/models/AISearchIndexResource.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolAccessBoundary.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReference.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReferenceType.java","src/main/java/com/azure/ai/agents/models/AgentCard.java","src/main/java/com/azure/ai/agents/models/AgentCardSkill.java","src/main/java/com/azure/ai/agents/models/AgentDefinition.java","src/main/java/com/azure/ai/agents/models/AgentDetails.java","src/main/java/com/azure/ai/agents/models/AgentDetailsVersions.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationSchemeType.java","src/main/java/com/azure/ai/agents/models/AgentEndpointConfig.java","src/main/java/com/azure/ai/agents/models/AgentEndpointProtocol.java","src/main/java/com/azure/ai/agents/models/AgentHarness.java","src/main/java/com/azure/ai/agents/models/AgentIdentity.java","src/main/java/com/azure/ai/agents/models/AgentIdentityStatus.java","src/main/java/com/azure/ai/agents/models/AgentKind.java","src/main/java/com/azure/ai/agents/models/AgentObjectType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationAgentCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationBaselineAgentConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateEvaluation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateExpand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidatePromotionInfo.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateStatus.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationBase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCostEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationDataSourceType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateBand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateInputs.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSetType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluatorReference.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationFoundryAgentTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationGoal.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationInstructionsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJob.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobLatency.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobTokenUsage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationPromptCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationResultCandidateSummary.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkill.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkillsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSpace.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStageEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionTestCase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTerminationReason.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationToolsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentReference.java","src/main/java/com/azure/ai/agents/models/AgentSessionResource.java","src/main/java/com/azure/ai/agents/models/AgentSessionStatus.java","src/main/java/com/azure/ai/agents/models/AgentState.java","src/main/java/com/azure/ai/agents/models/AgentStateSource.java","src/main/java/com/azure/ai/agents/models/AgentVersionDetails.java","src/main/java/com/azure/ai/agents/models/AgentVersionStatus.java","src/main/java/com/azure/ai/agents/models/ApiError.java","src/main/java/com/azure/ai/agents/models/ApplyPatchToolParameter.java","src/main/java/com/azure/ai/agents/models/ApproximateLocation.java","src/main/java/com/azure/ai/agents/models/AudioTranscription.java","src/main/java/com/azure/ai/agents/models/AudioTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/AutoCodeInterpreterToolParameter.java","src/main/java/com/azure/ai/agents/models/AzureAISearchQueryType.java","src/main/java/com/azure/ai/agents/models/AzureAISearchTool.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCall.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolResource.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseDetails.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseOptions.java","src/main/java/com/azure/ai/agents/models/AzureFunctionBinding.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinitionDetails.java","src/main/java/com/azure/ai/agents/models/AzureFunctionStorageQueue.java","src/main/java/com/azure/ai/agents/models/AzureFunctionTool.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCall.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureUserSecurityContext.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCall.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingTool.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BotServiceAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceRbacAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceTenantAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCall.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolConnectionParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolboxTool.java","src/main/java/com/azure/ai/agents/models/CallableToolAllowedCaller.java","src/main/java/com/azure/ai/agents/models/CaptureStructuredOutputsTool.java","src/main/java/com/azure/ai/agents/models/ChatSummaryMemoryItem.java","src/main/java/com/azure/ai/agents/models/CodeConfiguration.java","src/main/java/com/azure/ai/agents/models/CodeDependencyResolution.java","src/main/java/com/azure/ai/agents/models/CodeFileDetails.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterTool.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolboxTool.java","src/main/java/com/azure/ai/agents/models/ComputerEnvironment.java","src/main/java/com/azure/ai/agents/models/ComputerTool.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewTool.java","src/main/java/com/azure/ai/agents/models/ContainerAutoParameter.java","src/main/java/com/azure/ai/agents/models/ContainerConfiguration.java","src/main/java/com/azure/ai/agents/models/ContainerMemoryLimit.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyAllowlistParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDisabledParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDomainSecretParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParamType.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParameter.java","src/main/java/com/azure/ai/agents/models/ContainerSkill.java","src/main/java/com/azure/ai/agents/models/ContainerSkillType.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeContent.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeMetadata.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionOptions.java","src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensibilityTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java","src/main/java/com/azure/ai/agents/models/CreateTwilioTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CustomGrammarFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomTextFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormat.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormatType.java","src/main/java/com/azure/ai/agents/models/CustomToolParameter.java","src/main/java/com/azure/ai/agents/models/DigitalWorkerType.java","src/main/java/com/azure/ai/agents/models/EntraAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/EvaluationAzureStandardVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/ExternalAgentDefinition.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCall.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCallOutput.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolParameters.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/FileSearchTool.java","src/main/java/com/azure/ai/agents/models/FileSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/FixedRatioVersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironment.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironmentType.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentContainerReferenceParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentLocalEnvironmentParameter.java","src/main/java/com/azure/ai/agents/models/FunctionTool.java","src/main/java/com/azure/ai/agents/models/GetMicrosoft365AppPackageOptions.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotBuiltInTool.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotHarness.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java","src/main/java/com/azure/ai/agents/models/GrammarSyntax.java","src/main/java/com/azure/ai/agents/models/HeaderTelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/HybridSearchOptions.java","src/main/java/com/azure/ai/agents/models/ImageGenActionEnum.java","src/main/java/com/azure/ai/agents/models/ImageGenTool.java","src/main/java/com/azure/ai/agents/models/ImageGenToolBackground.java","src/main/java/com/azure/ai/agents/models/ImageGenToolInputImageMask.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModel.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModeration.java","src/main/java/com/azure/ai/agents/models/ImageGenToolOutputFormat.java","src/main/java/com/azure/ai/agents/models/ImageGenToolQuality.java","src/main/java/com/azure/ai/agents/models/ImageGenToolSize.java","src/main/java/com/azure/ai/agents/models/IncludeEnum.java","src/main/java/com/azure/ai/agents/models/InlineSkillParameter.java","src/main/java/com/azure/ai/agents/models/InlineSkillSourceParameter.java","src/main/java/com/azure/ai/agents/models/InputFidelity.java","src/main/java/com/azure/ai/agents/models/InvocationsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/InvocationsWsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/JobStatus.java","src/main/java/com/azure/ai/agents/models/ListMemoriesOptions.java","src/main/java/com/azure/ai/agents/models/LocalShellToolParameter.java","src/main/java/com/azure/ai/agents/models/LocalSkillParameter.java","src/main/java/com/azure/ai/agents/models/ManagedAgentIdentityBlueprintReference.java","src/main/java/com/azure/ai/agents/models/McpListToolsTool.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolAnnotations.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolInputSchema.java","src/main/java/com/azure/ai/agents/models/McpProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/McpTool.java","src/main/java/com/azure/ai/agents/models/McpToolConnectorId.java","src/main/java/com/azure/ai/agents/models/McpToolFilter.java","src/main/java/com/azure/ai/agents/models/McpToolRequireApproval.java","src/main/java/com/azure/ai/agents/models/McpToolboxTool.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCallOutput.java","src/main/java/com/azure/ai/agents/models/MemoryItem.java","src/main/java/com/azure/ai/agents/models/MemoryItemKind.java","src/main/java/com/azure/ai/agents/models/MemoryOperation.java","src/main/java/com/azure/ai/agents/models/MemoryOperationKind.java","src/main/java/com/azure/ai/agents/models/MemorySearchItem.java","src/main/java/com/azure/ai/agents/models/MemorySearchOptions.java","src/main/java/com/azure/ai/agents/models/MemorySearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/MemorySearchToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultOptions.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreKind.java","src/main/java/com/azure/ai/agents/models/MemoryStoreObjectType.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsage.java","src/main/java/com/azure/ai/agents/models/MemoryStoreSearchResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateCompletedResult.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateStatus.java","src/main/java/com/azure/ai/agents/models/Microsoft365PermissionScopes.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishDefaults.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishResult.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishScope.java","src/main/java/com/azure/ai/agents/models/MicrosoftFabricPreviewTool.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttempt.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptError.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptResult.java","src/main/java/com/azure/ai/agents/models/ModelRouterDetails.java","src/main/java/com/azure/ai/agents/models/ModelRouterMode.java","src/main/java/com/azure/ai/agents/models/ModelSamplingParameters.java","src/main/java/com/azure/ai/agents/models/ModelSelectionDetails.java","src/main/java/com/azure/ai/agents/models/NamespaceTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAnonymousAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthType.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiTool.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCall.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCallOutput.java","src/main/java/com/azure/ai/agents/models/OpenApiToolboxTool.java","src/main/java/com/azure/ai/agents/models/OptimizationContext.java","src/main/java/com/azure/ai/agents/models/OptimizationContextType.java","src/main/java/com/azure/ai/agents/models/OtlpTelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/PageOrder.java","src/main/java/com/azure/ai/agents/models/ProceduralMemoryItem.java","src/main/java/com/azure/ai/agents/models/ProgrammaticToolCallingParameter.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinitionTextOptions.java","src/main/java/com/azure/ai/agents/models/PromptOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolVersionRecord.java","src/main/java/com/azure/ai/agents/models/PstnTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/PublishAgentToMicrosoft365Options.java","src/main/java/com/azure/ai/agents/models/PublishApprovalStatus.java","src/main/java/com/azure/ai/agents/models/RaiConfig.java","src/main/java/com/azure/ai/agents/models/RaiInvocationContentType.java","src/main/java/com/azure/ai/agents/models/RaiInvocationModeration.java","src/main/java/com/azure/ai/agents/models/RaiInvocationResponseMode.java","src/main/java/com/azure/ai/agents/models/RaiSseTextSelector.java","src/main/java/com/azure/ai/agents/models/RankerVersionType.java","src/main/java/com/azure/ai/agents/models/RankingOptions.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormatType.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItem.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAssistantMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeleteEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCall.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCallOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionSegmentEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessageType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemObjectType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrieveEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrievedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemSystemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemUserMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeErrorEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferAppendEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommitEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommittedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferDtmfReceivedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferTimeoutTriggeredEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalInput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpErrorType.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpHttpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListTools.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpProtocolError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolCall.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolExecutionError.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimePcmAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmaAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmuAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeRateLimitsUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCancelEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPart.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfigurationBase.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreateRequestGAAudioOutputVoice.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionTracingConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionType.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/ReminderPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ResponseFormatJsonSchemaInner.java","src/main/java/com/azure/ai/agents/models/ResponseUsageInputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponseUsageOutputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponsesProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingTraceEntry.java","src/main/java/com/azure/ai/agents/models/SearchContentType.java","src/main/java/com/azure/ai/agents/models/SearchContextSize.java","src/main/java/com/azure/ai/agents/models/SessionAffinityConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDecision.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDetails.java","src/main/java/com/azure/ai/agents/models/SessionAffinityMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinityRequestMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinitySource.java","src/main/java/com/azure/ai/agents/models/SessionConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionDirectoryEntry.java","src/main/java/com/azure/ai/agents/models/SessionFileWriteResult.java","src/main/java/com/azure/ai/agents/models/SessionLogEvent.java","src/main/java/com/azure/ai/agents/models/SessionLogEventType.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolParameters.java","src/main/java/com/azure/ai/agents/models/SharepointPreviewTool.java","src/main/java/com/azure/ai/agents/models/ShellToolboxTool.java","src/main/java/com/azure/ai/agents/models/SipTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/SkillReference.java","src/main/java/com/azure/ai/agents/models/SkillReferenceParameter.java","src/main/java/com/azure/ai/agents/models/SteeringPromptOptimizationContext.java","src/main/java/com/azure/ai/agents/models/StructuredInputDefinition.java","src/main/java/com/azure/ai/agents/models/StructuredOutputDefinition.java","src/main/java/com/azure/ai/agents/models/TargetAttribute.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TeamsTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelemetryConfig.java","src/main/java/com/azure/ai/agents/models/TelemetryDataKind.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuthType.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointKind.java","src/main/java/com/azure/ai/agents/models/TelemetryTransportProtocol.java","src/main/java/com/azure/ai/agents/models/TelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallDurationBasis.java","src/main/java/com/azure/ai/agents/models/TelephonyCallEndReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobCancellation.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobSchedule.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobTerminalReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEvent.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventName.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventOutcome.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallPhase.java","src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java","src/main/java/com/azure/ai/agents/models/TelephonyCallStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallSummary.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTimestampSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTiming.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTrace.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceMode.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestinationType.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundFixedIntervalRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicyType.java","src/main/java/com/azure/ai/agents/models/TelephonyProvider.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestinationKind.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTarget.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTargets.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfiguration.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatJsonObject.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatText.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationType.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatJsonSchema.java","src/main/java/com/azure/ai/agents/models/Tool.java","src/main/java/com/azure/ai/agents/models/ToolCallStatus.java","src/main/java/com/azure/ai/agents/models/ToolConfig.java","src/main/java/com/azure/ai/agents/models/ToolProjectConnection.java","src/main/java/com/azure/ai/agents/models/ToolSearchExecutionType.java","src/main/java/com/azure/ai/agents/models/ToolSearchTool.java","src/main/java/com/azure/ai/agents/models/ToolSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxPolicies.java","src/main/java/com/azure/ai/agents/models/ToolboxSearchPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerAutoEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerReferenceEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicy.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicyDisabled.java","src/main/java/com/azure/ai/agents/models/ToolboxSkill.java","src/main/java/com/azure/ai/agents/models/ToolboxSkillReference.java","src/main/java/com/azure/ai/agents/models/ToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxVersionDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxVersions.java","src/main/java/com/azure/ai/agents/models/TranscriptTextInputTokenDetails.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsage.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageDuration.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageTokens.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageType.java","src/main/java/com/azure/ai/agents/models/TranscriptionLanguage.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/UpdateAgentDetailsOptions.java","src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffect.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffectsConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationDefaultInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationTestCase.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationUserBehaviorConfiguration.java","src/main/java/com/azure/ai/agents/models/UserProfileMemoryItem.java","src/main/java/com/azure/ai/agents/models/VersionIndicator.java","src/main/java/com/azure/ai/agents/models/VersionIndicatorType.java","src/main/java/com/azure/ai/agents/models/VersionRefIndicator.java","src/main/java/com/azure/ai/agents/models/VersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/VersionSelector.java","src/main/java/com/azure/ai/agents/models/VersionSelectorType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationOutputType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioInputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioOutputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioTimestampType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarIceServer.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarOutputProtocol.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarScene.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoBackground.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoCrop.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoParameters.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoResolution.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadEnglishTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadMultilingualTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentDefinition.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellation.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellationReferenceSource.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndConversationSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetectionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceThresholdLevel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionToolType1.java","src/main/java/com/azure/ai/agents/models/VoiceAgentGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscription.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseTrigger.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmGeneratedGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReduction.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReductionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioConfig.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseVideoDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreateEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreatedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToIdleEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToSpeakingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionIncludeOption.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentAbortedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentCompletedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentStartedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionUpdateConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentStaticInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentAbortReason.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentResponsePolicy.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemToolName.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTemplateGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolResponseScheduling.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolboxTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionPhrase.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionWord.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTransport.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAudioCodec.java","src/main/java/com/azure/ai/agents/models/VoiceAudioContainerFormat.java","src/main/java/com/azure/ai/agents/models/VoiceAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceAudioRole.java","src/main/java/com/azure/ai/agents/models/VoiceConversation.java","src/main/java/com/azure/ai/agents/models/VoiceConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceConversationStatus.java","src/main/java/com/azure/ai/agents/models/VoiceGeneratedAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceHostedAgentConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceIds.java","src/main/java/com/azure/ai/agents/models/VoiceModelType.java","src/main/java/com/azure/ai/agents/models/VoiceOutputModality.java","src/main/java/com/azure/ai/agents/models/VoiceRecording.java","src/main/java/com/azure/ai/agents/models/VoiceRecordingChannelLayout.java","src/main/java/com/azure/ai/agents/models/VoiceResponse.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudio.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudioOutput.java","src/main/java/com/azure/ai/agents/models/VoiceResponseObjectType.java","src/main/java/com/azure/ai/agents/models/VoiceType.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WebSearchApproximateLocation.java","src/main/java/com/azure/ai/agents/models/WebSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebSearchTool.java","src/main/java/com/azure/ai/agents/models/WebSearchToolFilters.java","src/main/java/com/azure/ai/agents/models/WebSearchToolSearchContextSize.java","src/main/java/com/azure/ai/agents/models/WebSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkflowAgentDefinition.java","src/main/java/com/azure/ai/agents/models/package-info.java","src/main/java/com/azure/ai/agents/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"3c4a47744ac0","crossLanguageDefinitions":{"com.azure.ai.agents.AgentsAsyncClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsAsyncClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsAsyncClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsAsyncClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsAsyncClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsAsyncClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsAsyncClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsAsyncClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsAsyncClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsAsyncClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsAsyncClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsAsyncClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsAsyncClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsAsyncClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsAsyncClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsAsyncClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsAsyncClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsAsyncClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsAsyncClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsAsyncClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsAsyncClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsAsyncClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsAsyncClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient":"Azure.AI.Projects.Agents","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.beginCreateOptimizationJobWithModel":"Azure.AI.Projects.AgentOptimizationJobs.create","com.azure.ai.agents.AgentsClient.cancelOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.cancelOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.cancel","com.azure.ai.agents.AgentsClient.createAgent":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createAgentFromCode":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentFromCode","com.azure.ai.agents.AgentsClient.createAgentFromManifest":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersion":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentVersionFromCode":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.createAgentVersionFromCode","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifest":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionFromManifestWithResponse":"Azure.AI.Projects.Agents.createAgentVersionFromManifest","com.azure.ai.agents.AgentsClient.createAgentVersionWithResponse":"Azure.AI.Projects.Agents.createAgentVersion","com.azure.ai.agents.AgentsClient.createAgentWithResponse":"Azure.AI.Projects.Agents.createAgent","com.azure.ai.agents.AgentsClient.createSession":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.createSessionWithResponse":"Azure.AI.Projects.Agents.createSession","com.azure.ai.agents.AgentsClient.deleteOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.delete","com.azure.ai.agents.AgentsClient.deleteSession":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.deleteSessionFile":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.deleteSessionFile","com.azure.ai.agents.AgentsClient.deleteSessionWithResponse":"Azure.AI.Projects.Agents.deleteSession","com.azure.ai.agents.AgentsClient.disableAgent":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.disableAgentWithResponse":"Azure.AI.Projects.Agents.disableAgent","com.azure.ai.agents.AgentsClient.downloadAgentCode":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadAgentCodeWithResponse":"Azure.AI.Projects.Agents.downloadAgentCode","com.azure.ai.agents.AgentsClient.downloadSessionFile":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.downloadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.downloadSessionFile","com.azure.ai.agents.AgentsClient.enableAgent":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.enableAgentWithResponse":"Azure.AI.Projects.Agents.enableAgent","com.azure.ai.agents.AgentsClient.estimateOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.estimateOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.estimate","com.azure.ai.agents.AgentsClient.getAgent":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getAgentVersionDetails":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentVersionDetailsWithResponse":"Azure.AI.Projects.Agents.getAgentVersion","com.azure.ai.agents.AgentsClient.getAgentWithResponse":"Azure.AI.Projects.Agents.getAgent","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackage":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365AppPackageWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365AppPackage","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaults":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getMicrosoft365PublishDefaultsWithResponse":"Azure.AI.Projects.Microsoft365Publishing.getMicrosoft365PublishDefaults","com.azure.ai.agents.AgentsClient.getOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.getCandidate","com.azure.ai.agents.AgentsClient.getOptimizationJob":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getOptimizationJobWithResponse":"Azure.AI.Projects.AgentOptimizationJobs.get","com.azure.ai.agents.AgentsClient.getSession":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.getSessionWithResponse":"Azure.AI.Projects.Agents.getSession","com.azure.ai.agents.AgentsClient.listAgentConversations":"Azure.AI.Projects.Conversations.listConversations","com.azure.ai.agents.AgentsClient.listAgentVersions":"Azure.AI.Projects.Agents.listAgentVersions","com.azure.ai.agents.AgentsClient.listAgents":"Azure.AI.Projects.Agents.listAgents","com.azure.ai.agents.AgentsClient.listOptimizationCandidates":"Azure.AI.Projects.AgentOptimizationJobCandidates.listCandidates","com.azure.ai.agents.AgentsClient.listOptimizationJobs":"Azure.AI.Projects.AgentOptimizationJobs.list","com.azure.ai.agents.AgentsClient.listSessionFiles":"Azure.AI.Projects.AgentSessionFiles.listSessionFiles","com.azure.ai.agents.AgentsClient.listSessions":"Azure.AI.Projects.Agents.listSessions","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.promoteOptimizationCandidateWithResponse":"Azure.AI.Projects.AgentOptimizationJobCandidates.promoteCandidate","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.publishAgentToMicrosoft365WithResponse":"Azure.AI.Projects.Microsoft365Publishing.publishAgentToMicrosoft365","com.azure.ai.agents.AgentsClient.stopSession":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.stopSessionWithResponse":"Azure.AI.Projects.Agents.stopSession","com.azure.ai.agents.AgentsClient.updateAgent":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.updateAgentDetails":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentDetailsWithResponse":"Azure.AI.Projects.Agents.patchAgentObject","com.azure.ai.agents.AgentsClient.updateAgentFromCode":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromCodeWithResponseInternal":"Azure.AI.Projects.Agents.updateAgentFromCode","com.azure.ai.agents.AgentsClient.updateAgentFromManifest":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentFromManifestWithResponse":"Azure.AI.Projects.Agents.updateAgentFromManifest","com.azure.ai.agents.AgentsClient.updateAgentWithResponse":"Azure.AI.Projects.Agents.updateAgent","com.azure.ai.agents.AgentsClient.uploadSessionFile":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClient.uploadSessionFileWithResponse":"Azure.AI.Projects.AgentSessionFiles.uploadSessionFile","com.azure.ai.agents.AgentsClientBuilder":"Azure.AI.Projects","com.azure.ai.agents.BetaAgentsAsyncClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsAsyncClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient":"Azure.AI.Projects.Beta.Agents","com.azure.ai.agents.BetaAgentsClient.createAgentFromPrompt":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaAgentsClient.createAgentFromPromptWithResponse":"Azure.AI.Projects.Agents.generateAgent","com.azure.ai.agents.BetaMemoryStoresAsyncClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresAsyncClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresAsyncClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient":"Azure.AI.Projects.Beta.MemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemories":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.beginInternalUpdateMemoriesWithModel":"Azure.AI.Projects.MemoryStores.updateMemories","com.azure.ai.agents.BetaMemoryStoresClient.createMemory":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStore":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.createMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.createMemoryWithResponse":"Azure.AI.Projects.MemoryStores.createMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemory":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStore":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.getMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.getMemoryWithResponse":"Azure.AI.Projects.MemoryStores.getMemory","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResult":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.getUpdateResultWithResponse":"Azure.AI.Projects.MemoryStores.getUpdateResult","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemories":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.internalSearchMemoriesWithResponse":"Azure.AI.Projects.MemoryStores.searchMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemories":"Azure.AI.Projects.MemoryStores.listMemories","com.azure.ai.agents.BetaMemoryStoresClient.listMemoryStores":"Azure.AI.Projects.MemoryStores.listMemoryStores","com.azure.ai.agents.BetaMemoryStoresClient.updateMemory":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStore":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryStoreWithResponse":"Azure.AI.Projects.MemoryStores.updateMemoryStore","com.azure.ai.agents.BetaMemoryStoresClient.updateMemoryWithResponse":"Azure.AI.Projects.MemoryStores.updateMemory","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsAsyncClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient":"Azure.AI.Projects.Beta.VoiceAgents.Conversations","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.deleteAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.deleteAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.downloadAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItemContent","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversation":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudio":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationAudioWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationAudio","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationGeneratedAudioItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationGeneratedAudioItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItem":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationItemWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationItem","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationResponseWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversationResponse","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.getAgentConversationWithResponse":"Azure.AI.Projects.AgentEndpointConversations.getAgentConversation","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponseItems":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponseItems","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversationResponses":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversationResponses","com.azure.ai.agents.BetaVoiceAgentsConversationsClient.listAgentConversations":"Azure.AI.Projects.AgentEndpointConversations.listAgentConversations","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyAsyncClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient":"Azure.AI.Projects.Beta.VoiceAgents.Telephony","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.cancelTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.cancelTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBinding":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.createTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.createTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBinding":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.deleteTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.deleteTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCall":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.endTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.endTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBinding":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCall":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJob":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallJobWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCallJob","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.getTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.getTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyBindings":"Azure.AI.Projects.AgentTelephony.listTelephonyBindings","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.listTelephonyCalls":"Azure.AI.Projects.AgentTelephony.listTelephonyCalls","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargets":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.replaceTelephonyTransferTargetsWithResponse":"Azure.AI.Projects.AgentTelephony.replaceTelephonyTransferTargets","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCall":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.transferTelephonyCallWithResponse":"Azure.AI.Projects.AgentTelephony.transferTelephonyCall","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBinding":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.BetaVoiceAgentsTelephonyClient.updateTelephonyBindingWithResponse":"Azure.AI.Projects.AgentTelephony.updateTelephonyBinding","com.azure.ai.agents.ToolboxesAsyncClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesAsyncClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesAsyncClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesAsyncClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesAsyncClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient":"Azure.AI.Projects.Toolboxes","com.azure.ai.agents.ToolboxesClient.createToolboxVersion":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.createToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.createToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolbox":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersion":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolboxVersion","com.azure.ai.agents.ToolboxesClient.deleteToolboxWithResponse":"Azure.AI.Projects.Toolboxes.deleteToolbox","com.azure.ai.agents.ToolboxesClient.getToolbox":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.getToolboxVersion":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxVersionWithResponse":"Azure.AI.Projects.Toolboxes.getToolboxVersion","com.azure.ai.agents.ToolboxesClient.getToolboxWithResponse":"Azure.AI.Projects.Toolboxes.getToolbox","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcp":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.invokeLatestToolboxMcpWithResponse":"Azure.AI.Projects.Toolboxes.invokeLatestToolboxMcp","com.azure.ai.agents.ToolboxesClient.listToolboxVersions":"Azure.AI.Projects.Toolboxes.listToolboxVersions","com.azure.ai.agents.ToolboxesClient.listToolboxes":"Azure.AI.Projects.Toolboxes.listToolboxes","com.azure.ai.agents.ToolboxesClient.updateToolbox":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.ToolboxesClient.updateToolboxWithResponse":"Azure.AI.Projects.Toolboxes.updateToolbox","com.azure.ai.agents.implementation.models.AgentDefinitionOptInKeys":"Azure.AI.Projects.AgentDefinitionOptInKeys","com.azure.ai.agents.implementation.models.CreateAgentFromCodeContent":"Azure.AI.Projects.CreateAgentFromCodeContent","com.azure.ai.agents.implementation.models.CreateAgentFromManifestRequest":"Azure.AI.Projects.createAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentOptions":null,"com.azure.ai.agents.implementation.models.CreateAgentRequest":"Azure.AI.Projects.createAgent.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionFromManifestRequest":"Azure.AI.Projects.createAgentVersionFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.CreateAgentVersionRequest":"Azure.AI.Projects.createAgentVersion.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryRequest":"Azure.AI.Projects.createMemory.Request.anonymous","com.azure.ai.agents.implementation.models.CreateMemoryStoreRequest":"Azure.AI.Projects.createMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.CreateSessionRequest":"Azure.AI.Projects.createSession.Request.anonymous","com.azure.ai.agents.implementation.models.CreateToolboxVersionRequest":"Azure.AI.Projects.createToolboxVersion.Request.anonymous","com.azure.ai.agents.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.agents.implementation.models.GetMicrosoft365AppPackageRequest":"Azure.AI.Projects.getMicrosoft365AppPackage.Request.anonymous","com.azure.ai.agents.implementation.models.ListMemoriesRequest":"Azure.AI.Projects.listMemories.Request.anonymous","com.azure.ai.agents.implementation.models.PublishAgentToMicrosoft365Request":"Azure.AI.Projects.publishAgentToMicrosoft365.Request.anonymous","com.azure.ai.agents.implementation.models.ReplaceTelephonyTransferTargetsRequest":"Azure.AI.Projects.replaceTelephonyTransferTargets.Request.anonymous","com.azure.ai.agents.implementation.models.SearchMemoriesRequest":"Azure.AI.Projects.searchMemories.Request.anonymous","com.azure.ai.agents.implementation.models.TransferTelephonyCallRequest":"Azure.AI.Projects.transferTelephonyCall.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentFromManifestRequest":"Azure.AI.Projects.updateAgentFromManifest.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateAgentRequest":"Azure.AI.Projects.updateAgent.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoriesRequest":"Azure.AI.Projects.updateMemories.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryRequest":"Azure.AI.Projects.updateMemory.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateMemoryStoreRequest":"Azure.AI.Projects.updateMemoryStore.Request.anonymous","com.azure.ai.agents.implementation.models.UpdateToolboxInput":"Azure.AI.Projects.UpdateToolboxRequest","com.azure.ai.agents.implementation.models.UpdateToolboxRequest":"Azure.AI.Projects.updateToolbox.Request.anonymous","com.azure.ai.agents.models.A2APreviewTool":"Azure.AI.Projects.A2APreviewTool","com.azure.ai.agents.models.A2APreviewToolboxTool":"Azure.AI.Projects.A2APreviewToolboxTool","com.azure.ai.agents.models.A2AProtocolConfiguration":"Azure.AI.Projects.A2AProtocolConfiguration","com.azure.ai.agents.models.A2AProtocolVersion":"Azure.AI.Projects.A2AProtocolVersion","com.azure.ai.agents.models.A2ATool":"Azure.AI.Projects.A2ATool","com.azure.ai.agents.models.A2AToolCall":"Azure.AI.Projects.A2AToolCall","com.azure.ai.agents.models.A2AToolCallOutput":"Azure.AI.Projects.A2AToolCallOutput","com.azure.ai.agents.models.A2AToolboxTool":"Azure.AI.Projects.A2AToolboxTool","com.azure.ai.agents.models.AISearchIndexResource":"Azure.AI.Projects.AISearchIndexResource","com.azure.ai.agents.models.ActivityProtocolAccessBoundary":"Azure.AI.Projects.ActivityProtocolAccessBoundary","com.azure.ai.agents.models.ActivityProtocolConfiguration":"Azure.AI.Projects.ActivityProtocolConfiguration","com.azure.ai.agents.models.AgentBlueprintReference":"Azure.AI.Projects.AgentBlueprintReference","com.azure.ai.agents.models.AgentBlueprintReferenceType":"Azure.AI.Projects.AgentBlueprintReferenceType","com.azure.ai.agents.models.AgentCard":"Azure.AI.Projects.AgentCard","com.azure.ai.agents.models.AgentCardSkill":"Azure.AI.Projects.AgentCardSkill","com.azure.ai.agents.models.AgentDefinition":"Azure.AI.Projects.AgentDefinition","com.azure.ai.agents.models.AgentDetails":"Azure.AI.Projects.AgentObject","com.azure.ai.agents.models.AgentDetailsVersions":"Azure.AI.Projects.AgentObject.versions.anonymous","com.azure.ai.agents.models.AgentEndpointAuthorizationScheme":"Azure.AI.Projects.AgentEndpointAuthorizationScheme","com.azure.ai.agents.models.AgentEndpointAuthorizationSchemeType":"Azure.AI.Projects.AgentEndpointAuthorizationSchemeType","com.azure.ai.agents.models.AgentEndpointConfig":"Azure.AI.Projects.AgentEndpointConfig","com.azure.ai.agents.models.AgentEndpointProtocol":"Azure.AI.Projects.AgentEndpointProtocol","com.azure.ai.agents.models.AgentHarness":"Azure.AI.Projects.AgentHarness","com.azure.ai.agents.models.AgentIdentity":"Azure.AI.Projects.AgentIdentity","com.azure.ai.agents.models.AgentIdentityStatus":"Azure.AI.Projects.AgentIdentityStatus","com.azure.ai.agents.models.AgentKind":"Azure.AI.Projects.AgentKind","com.azure.ai.agents.models.AgentObjectType":"Azure.AI.Projects.AgentObjectType","com.azure.ai.agents.models.AgentOptimizationAgentCandidateOutput":"Azure.AI.Projects.AgentOptimizationAgentCandidateOutput","com.azure.ai.agents.models.AgentOptimizationBaselineAgentConfiguration":"Azure.AI.Projects.AgentOptimizationBaselineAgentConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidate":"Azure.AI.Projects.AgentOptimizationCandidate","com.azure.ai.agents.models.AgentOptimizationCandidateEvaluation":"Azure.AI.Projects.AgentOptimizationCandidateEvaluation","com.azure.ai.agents.models.AgentOptimizationCandidateExpand":"Azure.AI.Projects.AgentOptimizationCandidateExpand","com.azure.ai.agents.models.AgentOptimizationCandidateOutput":"Azure.AI.Projects.AgentOptimizationCandidateOutput","com.azure.ai.agents.models.AgentOptimizationCandidatePromotionInfo":"Azure.AI.Projects.AgentOptimizationCandidatePromotionInfo","com.azure.ai.agents.models.AgentOptimizationCandidateSearchConfiguration":"Azure.AI.Projects.AgentOptimizationCandidateSearchConfiguration","com.azure.ai.agents.models.AgentOptimizationCandidateStatus":"Azure.AI.Projects.AgentOptimizationCandidateStatus","com.azure.ai.agents.models.AgentOptimizationConfiguration":"Azure.AI.Projects.AgentOptimizationConfiguration","com.azure.ai.agents.models.AgentOptimizationConfigurationBase":"Azure.AI.Projects.AgentOptimizationConfigurationBase","com.azure.ai.agents.models.AgentOptimizationConfigurationType":"Azure.AI.Projects.AgentOptimizationConfigurationType","com.azure.ai.agents.models.AgentOptimizationCostEstimate":"Azure.AI.Projects.AgentOptimizationCostEstimate","com.azure.ai.agents.models.AgentOptimizationDataSourceType":"Azure.AI.Projects.AgentOptimizationDataSourceType","com.azure.ai.agents.models.AgentOptimizationEstimateBand":"Azure.AI.Projects.AgentOptimizationEstimateBand","com.azure.ai.agents.models.AgentOptimizationEstimateInputs":"Azure.AI.Projects.AgentOptimizationEstimateInputs","com.azure.ai.agents.models.AgentOptimizationEstimateResult":"Azure.AI.Projects.AgentOptimizationEstimateResult","com.azure.ai.agents.models.AgentOptimizationEvaluationConfiguration":"Azure.AI.Projects.AgentOptimizationEvaluationConfiguration","com.azure.ai.agents.models.AgentOptimizationEvaluationSet":"Azure.AI.Projects.AgentOptimizationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationEvaluationSetType":"Azure.AI.Projects.AgentOptimizationEvaluationSetType","com.azure.ai.agents.models.AgentOptimizationEvaluatorReference":"Azure.AI.Projects.AgentOptimizationEvaluator","com.azure.ai.agents.models.AgentOptimizationFoundryAgentTargetConfiguration":"Azure.AI.Projects.AgentOptimizationFoundryAgentTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationGoal":"Azure.AI.Projects.AgentOptimizationGoal","com.azure.ai.agents.models.AgentOptimizationInstructionsMutation":"Azure.AI.Projects.AgentOptimizationInstructionsMutation","com.azure.ai.agents.models.AgentOptimizationJob":"Azure.AI.Projects.AgentOptimizationJob","com.azure.ai.agents.models.AgentOptimizationJobLatency":"Azure.AI.Projects.AgentOptimizationJobLatency","com.azure.ai.agents.models.AgentOptimizationJobResult":"Azure.AI.Projects.AgentOptimizationJobResult","com.azure.ai.agents.models.AgentOptimizationJobTokenUsage":"Azure.AI.Projects.AgentOptimizationJobTokenUsage","com.azure.ai.agents.models.AgentOptimizationModelConfiguration":"Azure.AI.Projects.AgentOptimizationModelConfiguration","com.azure.ai.agents.models.AgentOptimizationModelMutation":"Azure.AI.Projects.AgentOptimizationModelMutation","com.azure.ai.agents.models.AgentOptimizationMutation":"Azure.AI.Projects.AgentOptimizationMutation","com.azure.ai.agents.models.AgentOptimizationPromptCandidateOutput":"Azure.AI.Projects.AgentOptimizationPromptCandidateOutput","com.azure.ai.agents.models.AgentOptimizationResultCandidateSummary":"Azure.AI.Projects.AgentOptimizationResultCandidateSummary","com.azure.ai.agents.models.AgentOptimizationSkill":"Azure.AI.Projects.AgentOptimizationSkill","com.azure.ai.agents.models.AgentOptimizationSkillsMutation":"Azure.AI.Projects.AgentOptimizationSkillsMutation","com.azure.ai.agents.models.AgentOptimizationSpace":"Azure.AI.Projects.AgentOptimizationSpace","com.azure.ai.agents.models.AgentOptimizationStage":"Azure.AI.Projects.AgentOptimizationStage","com.azure.ai.agents.models.AgentOptimizationStageEstimate":"Azure.AI.Projects.AgentOptimizationStageEstimate","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionEvaluationSet":"Azure.AI.Projects.AgentOptimizationTargetCompletionEvaluationSet","com.azure.ai.agents.models.AgentOptimizationTargetCompletionInlineDataSource":"Azure.AI.Projects.AgentOptimizationTargetCompletionInlineDataSource","com.azure.ai.agents.models.AgentOptimizationTargetCompletionTestCase":"Azure.AI.Projects.AgentOptimizationTargetCompletionTestCase","com.azure.ai.agents.models.AgentOptimizationTargetConfiguration":"Azure.AI.Projects.AgentOptimizationTargetConfiguration","com.azure.ai.agents.models.AgentOptimizationTargetConfigurationType":"Azure.AI.Projects.AgentOptimizationTargetConfigurationType","com.azure.ai.agents.models.AgentOptimizationTerminationReason":"Azure.AI.Projects.AgentOptimizationTerminationReason","com.azure.ai.agents.models.AgentOptimizationToolsMutation":"Azure.AI.Projects.AgentOptimizationToolsMutation","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationDatasetReferenceDataSource","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationEvaluationSet":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationEvaluationSet","com.azure.ai.agents.models.AgentOptimizationUserConversationSimulationInlineDataSource":"Azure.AI.Projects.AgentOptimizationUserConversationSimulationInlineDataSource","com.azure.ai.agents.models.AgentReference":"Azure.AI.Projects.AgentReference","com.azure.ai.agents.models.AgentSessionResource":"Azure.AI.Projects.AgentSessionResource","com.azure.ai.agents.models.AgentSessionStatus":"Azure.AI.Projects.AgentSessionStatus","com.azure.ai.agents.models.AgentState":"Azure.AI.Projects.AgentState","com.azure.ai.agents.models.AgentStateSource":"Azure.AI.Projects.AgentStateSource","com.azure.ai.agents.models.AgentVersionDetails":"Azure.AI.Projects.AgentVersionObject","com.azure.ai.agents.models.AgentVersionStatus":"Azure.AI.Projects.AgentVersionStatus","com.azure.ai.agents.models.ApiError":"OpenAI.Error","com.azure.ai.agents.models.ApplyPatchToolParameter":"OpenAI.ApplyPatchToolParam","com.azure.ai.agents.models.ApproximateLocation":"OpenAI.ApproximateLocation","com.azure.ai.agents.models.AudioTranscription":"OpenAI.AudioTranscription","com.azure.ai.agents.models.AudioTranscriptionModel":"OpenAI.AudioTranscription.model.anonymous","com.azure.ai.agents.models.AutoCodeInterpreterToolParameter":"OpenAI.AutoCodeInterpreterToolParam","com.azure.ai.agents.models.AzureAISearchQueryType":"Azure.AI.Projects.AzureAISearchQueryType","com.azure.ai.agents.models.AzureAISearchTool":"Azure.AI.Projects.AzureAISearchTool","com.azure.ai.agents.models.AzureAISearchToolCall":"Azure.AI.Projects.AzureAISearchToolCall","com.azure.ai.agents.models.AzureAISearchToolCallOutput":"Azure.AI.Projects.AzureAISearchToolCallOutput","com.azure.ai.agents.models.AzureAISearchToolResource":"Azure.AI.Projects.AzureAISearchToolResource","com.azure.ai.agents.models.AzureAISearchToolboxTool":"Azure.AI.Projects.AzureAISearchToolboxTool","com.azure.ai.agents.models.AzureCreateResponseDetails":"Azure.AI.Projects.AzureCreateResponseDetails","com.azure.ai.agents.models.AzureCreateResponseOptions":"Azure.AI.Projects.AzureCreateResponseOptions","com.azure.ai.agents.models.AzureFunctionBinding":"Azure.AI.Projects.AzureFunctionBinding","com.azure.ai.agents.models.AzureFunctionDefinition":"Azure.AI.Projects.AzureFunctionDefinition","com.azure.ai.agents.models.AzureFunctionDefinitionDetails":"Azure.AI.Projects.AzureFunctionDefinition.function.anonymous","com.azure.ai.agents.models.AzureFunctionStorageQueue":"Azure.AI.Projects.AzureFunctionStorageQueue","com.azure.ai.agents.models.AzureFunctionTool":"Azure.AI.Projects.AzureFunctionTool","com.azure.ai.agents.models.AzureFunctionToolCall":"Azure.AI.Projects.AzureFunctionToolCall","com.azure.ai.agents.models.AzureFunctionToolCallOutput":"Azure.AI.Projects.AzureFunctionToolCallOutput","com.azure.ai.agents.models.AzureUserSecurityContext":"Azure.AI.Projects.AzureUserSecurityContext","com.azure.ai.agents.models.BingCustomSearchConfiguration":"Azure.AI.Projects.BingCustomSearchConfiguration","com.azure.ai.agents.models.BingCustomSearchPreviewTool":"Azure.AI.Projects.BingCustomSearchPreviewTool","com.azure.ai.agents.models.BingCustomSearchToolCall":"Azure.AI.Projects.BingCustomSearchToolCall","com.azure.ai.agents.models.BingCustomSearchToolCallOutput":"Azure.AI.Projects.BingCustomSearchToolCallOutput","com.azure.ai.agents.models.BingCustomSearchToolParameters":"Azure.AI.Projects.BingCustomSearchToolParameters","com.azure.ai.agents.models.BingGroundingSearchConfiguration":"Azure.AI.Projects.BingGroundingSearchConfiguration","com.azure.ai.agents.models.BingGroundingSearchToolParameters":"Azure.AI.Projects.BingGroundingSearchToolParameters","com.azure.ai.agents.models.BingGroundingTool":"Azure.AI.Projects.BingGroundingTool","com.azure.ai.agents.models.BingGroundingToolCall":"Azure.AI.Projects.BingGroundingToolCall","com.azure.ai.agents.models.BingGroundingToolCallOutput":"Azure.AI.Projects.BingGroundingToolCallOutput","com.azure.ai.agents.models.BotServiceAuthorizationScheme":"Azure.AI.Projects.BotServiceAuthorizationScheme","com.azure.ai.agents.models.BotServiceRbacAuthorizationScheme":"Azure.AI.Projects.BotServiceRbacAuthorizationScheme","com.azure.ai.agents.models.BotServiceTenantAuthorizationScheme":"Azure.AI.Projects.BotServiceTenantAuthorizationScheme","com.azure.ai.agents.models.BrowserAutomationPreviewTool":"Azure.AI.Projects.BrowserAutomationPreviewTool","com.azure.ai.agents.models.BrowserAutomationPreviewToolboxTool":"Azure.AI.Projects.BrowserAutomationPreviewToolboxTool","com.azure.ai.agents.models.BrowserAutomationTool":"Azure.AI.Projects.BrowserAutomationTool","com.azure.ai.agents.models.BrowserAutomationToolCall":"Azure.AI.Projects.BrowserAutomationToolCall","com.azure.ai.agents.models.BrowserAutomationToolCallOutput":"Azure.AI.Projects.BrowserAutomationToolCallOutput","com.azure.ai.agents.models.BrowserAutomationToolConnectionParameters":"Azure.AI.Projects.BrowserAutomationToolConnectionParameters","com.azure.ai.agents.models.BrowserAutomationToolParameters":"Azure.AI.Projects.BrowserAutomationToolParameters","com.azure.ai.agents.models.BrowserAutomationToolboxTool":"Azure.AI.Projects.BrowserAutomationToolboxTool","com.azure.ai.agents.models.CallableToolAllowedCaller":"OpenAI.CallableToolAllowedCaller","com.azure.ai.agents.models.CaptureStructuredOutputsTool":"Azure.AI.Projects.CaptureStructuredOutputsTool","com.azure.ai.agents.models.ChatSummaryMemoryItem":"Azure.AI.Projects.ChatSummaryMemoryItem","com.azure.ai.agents.models.CodeConfiguration":"Azure.AI.Projects.CodeConfiguration","com.azure.ai.agents.models.CodeDependencyResolution":"Azure.AI.Projects.CodeDependencyResolution","com.azure.ai.agents.models.CodeFileDetails":null,"com.azure.ai.agents.models.CodeInterpreterTool":"OpenAI.CodeInterpreterTool","com.azure.ai.agents.models.CodeInterpreterToolboxTool":"Azure.AI.Projects.CodeInterpreterToolboxTool","com.azure.ai.agents.models.ComputerEnvironment":"ComputerEnvironmentExpandable","com.azure.ai.agents.models.ComputerTool":"OpenAI.ComputerTool","com.azure.ai.agents.models.ComputerUsePreviewTool":"OpenAI.ComputerUsePreviewTool","com.azure.ai.agents.models.ContainerAutoParameter":"OpenAI.ContainerAutoParam","com.azure.ai.agents.models.ContainerConfiguration":"Azure.AI.Projects.ContainerConfiguration","com.azure.ai.agents.models.ContainerMemoryLimit":"ContainerMemoryLimitExpandable","com.azure.ai.agents.models.ContainerNetworkPolicyAllowlistParameter":"OpenAI.ContainerNetworkPolicyAllowlistParam","com.azure.ai.agents.models.ContainerNetworkPolicyDisabledParameter":"OpenAI.ContainerNetworkPolicyDisabledParam","com.azure.ai.agents.models.ContainerNetworkPolicyDomainSecretParameter":"OpenAI.ContainerNetworkPolicyDomainSecretParam","com.azure.ai.agents.models.ContainerNetworkPolicyParamType":"OpenAI.ContainerNetworkPolicyParamType","com.azure.ai.agents.models.ContainerNetworkPolicyParameter":"OpenAI.ContainerNetworkPolicyParam","com.azure.ai.agents.models.ContainerSkill":"OpenAI.ContainerSkill","com.azure.ai.agents.models.ContainerSkillType":"OpenAI.ContainerSkillType","com.azure.ai.agents.models.CreateAgentVersionFromCodeContent":"Azure.AI.Projects.CreateAgentVersionFromCodeContent","com.azure.ai.agents.models.CreateAgentVersionFromCodeMetadata":"Azure.AI.Projects.CreateAgentVersionFromCodeMetadata","com.azure.ai.agents.models.CreateAgentVersionInput":"Azure.AI.Projects.CreateAgentVersionRequest","com.azure.ai.agents.models.CreateAgentVersionOptions":null,"com.azure.ai.agents.models.CreateTeamsPhoneExtensibilityTelephonyBindingInput":"Azure.AI.Projects.CreateTeamsPhoneExtensibilityTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyBindingInput":"Azure.AI.Projects.CreateTelephonyBindingRequest","com.azure.ai.agents.models.CreateTelephonyCallJobInput":"Azure.AI.Projects.CreateTelephonyCallJobRequest","com.azure.ai.agents.models.CreateTwilioTelephonyBindingInput":"Azure.AI.Projects.CreateTwilioTelephonyBindingRequest","com.azure.ai.agents.models.CustomGrammarFormatParameter":"OpenAI.CustomGrammarFormatParam","com.azure.ai.agents.models.CustomTextFormatParameter":"OpenAI.CustomTextFormatParam","com.azure.ai.agents.models.CustomToolParamFormat":"OpenAI.CustomToolParamFormat","com.azure.ai.agents.models.CustomToolParamFormatType":"OpenAI.CustomToolParamFormatType","com.azure.ai.agents.models.CustomToolParameter":"OpenAI.CustomToolParam","com.azure.ai.agents.models.DigitalWorkerType":"Azure.AI.Projects.DigitalWorkerType","com.azure.ai.agents.models.EntraAuthorizationScheme":"Azure.AI.Projects.EntraAuthorizationScheme","com.azure.ai.agents.models.EvaluationAzureStandardVoiceModelConfiguration":"Azure.AI.Projects.EvaluationAzureStandardVoiceModelConfiguration","com.azure.ai.agents.models.EvaluationModelConfiguration":"Azure.AI.Projects.EvaluationModelConfiguration","com.azure.ai.agents.models.EvaluationVoiceModelConfiguration":"Azure.AI.Projects.EvaluationVoiceModelConfiguration","com.azure.ai.agents.models.ExternalAgentDefinition":"Azure.AI.Projects.ExternalAgentDefinition","com.azure.ai.agents.models.FabricDataAgentToolCall":"Azure.AI.Projects.FabricDataAgentToolCall","com.azure.ai.agents.models.FabricDataAgentToolCallOutput":"Azure.AI.Projects.FabricDataAgentToolCallOutput","com.azure.ai.agents.models.FabricDataAgentToolParameters":"Azure.AI.Projects.FabricDataAgentToolParameters","com.azure.ai.agents.models.FabricIqPreviewTool":"Azure.AI.Projects.FabricIQPreviewTool","com.azure.ai.agents.models.FabricIqPreviewToolboxTool":"Azure.AI.Projects.FabricIQPreviewToolboxTool","com.azure.ai.agents.models.FileSearchTool":"OpenAI.FileSearchTool","com.azure.ai.agents.models.FileSearchToolboxTool":"Azure.AI.Projects.FileSearchToolboxTool","com.azure.ai.agents.models.FixedRatioVersionSelectionRule":"Azure.AI.Projects.FixedRatioVersionSelectionRule","com.azure.ai.agents.models.FunctionShellToolParamEnvironment":"OpenAI.FunctionShellToolParamEnvironment","com.azure.ai.agents.models.FunctionShellToolParamEnvironmentType":"OpenAI.FunctionShellToolParamEnvironmentType","com.azure.ai.agents.models.FunctionShellToolParameter":"OpenAI.FunctionShellToolParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentContainerReferenceParameter":"OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam","com.azure.ai.agents.models.FunctionShellToolParameterEnvironmentLocalEnvironmentParameter":"OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam","com.azure.ai.agents.models.FunctionTool":"OpenAI.FunctionTool","com.azure.ai.agents.models.GetMicrosoft365AppPackageOptions":null,"com.azure.ai.agents.models.GitHubCopilotBuiltInTool":"Azure.AI.Projects.GitHubCopilotBuiltInTool","com.azure.ai.agents.models.GitHubCopilotHarness":"Azure.AI.Projects.GitHubCopilotHarness","com.azure.ai.agents.models.GitHubCopilotToolsetConfig":"Azure.AI.Projects.GitHubCopilotToolsetConfig","com.azure.ai.agents.models.GitHubCopilotToolsetDefaultConfig":"Azure.AI.Projects.GitHubCopilotToolsetDefaultConfig","com.azure.ai.agents.models.GitHubCopilotToolsetPreview":"Azure.AI.Projects.GitHubCopilotToolsetPreview","com.azure.ai.agents.models.GrammarSyntax":"GrammarSyntaxExpandable","com.azure.ai.agents.models.HeaderTelemetryEndpointAuth":"Azure.AI.Projects.HeaderTelemetryEndpointAuth","com.azure.ai.agents.models.HostedAgentDefinition":"Azure.AI.Projects.HostedAgentDefinition","com.azure.ai.agents.models.HybridSearchOptions":"OpenAI.HybridSearchOptions","com.azure.ai.agents.models.ImageGenActionEnum":"ImageGenActionEnumExpandable","com.azure.ai.agents.models.ImageGenTool":"OpenAI.ImageGenTool","com.azure.ai.agents.models.ImageGenToolBackground":"ImageGenToolBackgroundExpandable","com.azure.ai.agents.models.ImageGenToolInputImageMask":"OpenAI.ImageGenToolInputImageMask","com.azure.ai.agents.models.ImageGenToolModel":"OpenAI.ImageGenTool.model.anonymous","com.azure.ai.agents.models.ImageGenToolModeration":"ImageGenToolModerationExpandable","com.azure.ai.agents.models.ImageGenToolOutputFormat":"ImageGenToolOutputFormatExpandable","com.azure.ai.agents.models.ImageGenToolQuality":"ImageGenToolQualityExpandable","com.azure.ai.agents.models.ImageGenToolSize":"ImageGenToolSizeExpandable","com.azure.ai.agents.models.IncludeEnum":"OpenAI.IncludeEnum","com.azure.ai.agents.models.InlineSkillParameter":"OpenAI.InlineSkillParam","com.azure.ai.agents.models.InlineSkillSourceParameter":"OpenAI.InlineSkillSourceParam","com.azure.ai.agents.models.InputFidelity":"InputFidelityExpandable","com.azure.ai.agents.models.InvocationsProtocolConfiguration":"Azure.AI.Projects.InvocationsProtocolConfiguration","com.azure.ai.agents.models.InvocationsWsProtocolConfiguration":"Azure.AI.Projects.InvocationsWsProtocolConfiguration","com.azure.ai.agents.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.agents.models.ListMemoriesOptions":null,"com.azure.ai.agents.models.LocalShellToolParameter":"OpenAI.LocalShellToolParam","com.azure.ai.agents.models.LocalSkillParameter":"OpenAI.LocalSkillParam","com.azure.ai.agents.models.ManagedAgentIdentityBlueprintReference":"Azure.AI.Projects.ManagedAgentIdentityBlueprintReference","com.azure.ai.agents.models.McpListToolsTool":"OpenAI.MCPListToolsTool","com.azure.ai.agents.models.McpListToolsToolAnnotations":"OpenAI.MCPListToolsToolAnnotations","com.azure.ai.agents.models.McpListToolsToolInputSchema":"OpenAI.MCPListToolsToolInputSchema","com.azure.ai.agents.models.McpProtocolConfiguration":"Azure.AI.Projects.McpProtocolConfiguration","com.azure.ai.agents.models.McpTool":"OpenAI.MCPTool","com.azure.ai.agents.models.McpToolConnectorId":"McpToolConnectorIdExpandable","com.azure.ai.agents.models.McpToolFilter":"OpenAI.MCPToolFilter","com.azure.ai.agents.models.McpToolRequireApproval":"OpenAI.MCPToolRequireApproval","com.azure.ai.agents.models.McpToolboxTool":"Azure.AI.Projects.MCPToolboxTool","com.azure.ai.agents.models.MemoryCommandToolCall":"Azure.AI.Projects.MemoryCommandToolCall","com.azure.ai.agents.models.MemoryCommandToolCallOutput":"Azure.AI.Projects.MemoryCommandToolCallOutput","com.azure.ai.agents.models.MemoryItem":"Azure.AI.Projects.MemoryItem","com.azure.ai.agents.models.MemoryItemKind":"Azure.AI.Projects.MemoryItemKind","com.azure.ai.agents.models.MemoryOperation":"Azure.AI.Projects.MemoryOperation","com.azure.ai.agents.models.MemoryOperationKind":"Azure.AI.Projects.MemoryOperationKind","com.azure.ai.agents.models.MemorySearchItem":"Azure.AI.Projects.MemorySearchItem","com.azure.ai.agents.models.MemorySearchOptions":"Azure.AI.Projects.MemorySearchOptions","com.azure.ai.agents.models.MemorySearchPreviewTool":"Azure.AI.Projects.MemorySearchPreviewTool","com.azure.ai.agents.models.MemorySearchToolCall":"Azure.AI.Projects.MemorySearchToolCall","com.azure.ai.agents.models.MemoryStoreDefaultDefinition":"Azure.AI.Projects.MemoryStoreDefaultDefinition","com.azure.ai.agents.models.MemoryStoreDefaultOptions":"Azure.AI.Projects.MemoryStoreDefaultOptions","com.azure.ai.agents.models.MemoryStoreDefinition":"Azure.AI.Projects.MemoryStoreDefinition","com.azure.ai.agents.models.MemoryStoreDetails":"Azure.AI.Projects.MemoryStoreObject","com.azure.ai.agents.models.MemoryStoreKind":"Azure.AI.Projects.MemoryStoreKind","com.azure.ai.agents.models.MemoryStoreObjectType":"Azure.AI.Projects.MemoryStoreObjectType","com.azure.ai.agents.models.MemoryStoreOperationUsage":"Azure.AI.Projects.MemoryStoreOperationUsage","com.azure.ai.agents.models.MemoryStoreSearchResponse":"Azure.AI.Projects.MemoryStoreSearchResponse","com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult":"Azure.AI.Projects.MemoryStoreUpdateCompletedResult","com.azure.ai.agents.models.MemoryStoreUpdateResponse":"Azure.AI.Projects.MemoryStoreUpdateResponse","com.azure.ai.agents.models.MemoryStoreUpdateStatus":"Azure.AI.Projects.MemoryStoreUpdateStatus","com.azure.ai.agents.models.Microsoft365PermissionScopes":"Azure.AI.Projects.Microsoft365PermissionScopes","com.azure.ai.agents.models.Microsoft365PublishDefaults":"Azure.AI.Projects.Microsoft365PublishDefaults","com.azure.ai.agents.models.Microsoft365PublishResult":"Azure.AI.Projects.Microsoft365PublishResponse","com.azure.ai.agents.models.Microsoft365PublishScope":"Azure.AI.Projects.Microsoft365PublishScope","com.azure.ai.agents.models.MicrosoftCopilotBuiltInTool":"Azure.AI.Projects.MicrosoftCopilotBuiltInTool","com.azure.ai.agents.models.MicrosoftCopilotHarness":"Azure.AI.Projects.MicrosoftCopilotHarness","com.azure.ai.agents.models.MicrosoftCopilotToolsetConfiguration":"Azure.AI.Projects.MicrosoftCopilotToolsetConfig","com.azure.ai.agents.models.MicrosoftCopilotToolsetDefaultConfiguration":"Azure.AI.Projects.MicrosoftCopilotToolsetDefaultConfig","com.azure.ai.agents.models.MicrosoftCopilotToolsetPreview":"Azure.AI.Projects.MicrosoftCopilotToolsetPreview","com.azure.ai.agents.models.MicrosoftFabricPreviewTool":"Azure.AI.Projects.MicrosoftFabricPreviewTool","com.azure.ai.agents.models.ModelRouterAttempt":"Azure.AI.Projects.ModelRouterAttempt","com.azure.ai.agents.models.ModelRouterAttemptError":"Azure.AI.Projects.ModelRouterAttemptError","com.azure.ai.agents.models.ModelRouterAttemptResult":"Azure.AI.Projects.ModelRouterAttemptResult","com.azure.ai.agents.models.ModelRouterDetails":"Azure.AI.Projects.ModelRouterDetails","com.azure.ai.agents.models.ModelRouterMode":"Azure.AI.Projects.ModelRouterMode","com.azure.ai.agents.models.ModelSamplingParameters":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.agents.models.ModelSelectionDetails":"Azure.AI.Projects.ModelSelectionDetails","com.azure.ai.agents.models.NamespaceTool":"OpenAI.NamespaceToolParam","com.azure.ai.agents.models.OpenApiAnonymousAuthDetails":"Azure.AI.Projects.OpenApiAnonymousAuthDetails","com.azure.ai.agents.models.OpenApiAuthDetails":"Azure.AI.Projects.OpenApiAuthDetails","com.azure.ai.agents.models.OpenApiAuthType":"Azure.AI.Projects.OpenApiAuthType","com.azure.ai.agents.models.OpenApiFunctionDefinition":"Azure.AI.Projects.OpenApiFunctionDefinition","com.azure.ai.agents.models.OpenApiFunctionDefinitionFunction":"Azure.AI.Projects.OpenApiFunctionDefinition.function.anonymous","com.azure.ai.agents.models.OpenApiManagedAuthDetails":"Azure.AI.Projects.OpenApiManagedAuthDetails","com.azure.ai.agents.models.OpenApiManagedSecurityScheme":"Azure.AI.Projects.OpenApiManagedSecurityScheme","com.azure.ai.agents.models.OpenApiProjectConnectionAuthDetails":"Azure.AI.Projects.OpenApiProjectConnectionAuthDetails","com.azure.ai.agents.models.OpenApiProjectConnectionSecurityScheme":"Azure.AI.Projects.OpenApiProjectConnectionSecurityScheme","com.azure.ai.agents.models.OpenApiTool":"Azure.AI.Projects.OpenApiTool","com.azure.ai.agents.models.OpenApiToolCall":"Azure.AI.Projects.OpenApiToolCall","com.azure.ai.agents.models.OpenApiToolCallOutput":"Azure.AI.Projects.OpenApiToolCallOutput","com.azure.ai.agents.models.OpenApiToolboxTool":"Azure.AI.Projects.OpenApiToolboxTool","com.azure.ai.agents.models.OptimizationContext":"Azure.AI.Projects.OptimizationContext","com.azure.ai.agents.models.OptimizationContextType":"Azure.AI.Projects.OptimizationContextType","com.azure.ai.agents.models.OtlpTelemetryEndpoint":"Azure.AI.Projects.OtlpTelemetryEndpoint","com.azure.ai.agents.models.PageOrder":"Azure.AI.Projects.PageOrder","com.azure.ai.agents.models.ProceduralMemoryItem":"Azure.AI.Projects.ProceduralMemoryItem","com.azure.ai.agents.models.ProgrammaticToolCallingParameter":"OpenAI.ProgrammaticToolCallingParam","com.azure.ai.agents.models.PromptAgentDefinition":"Azure.AI.Projects.PromptAgentDefinition","com.azure.ai.agents.models.PromptAgentDefinitionTextOptions":"Azure.AI.Projects.PromptAgentDefinitionTextOptions","com.azure.ai.agents.models.PromptOptimizationConfiguration":"Azure.AI.Projects.PromptOptimizationConfiguration","com.azure.ai.agents.models.ProtocolConfiguration":"Azure.AI.Projects.ProtocolConfiguration","com.azure.ai.agents.models.ProtocolVersionRecord":"Azure.AI.Projects.ProtocolVersionRecord","com.azure.ai.agents.models.PstnTelephonyTransferDestination":"Azure.AI.Projects.PSTNTelephonyTransferDestination","com.azure.ai.agents.models.PublishAgentToMicrosoft365Options":null,"com.azure.ai.agents.models.PublishApprovalStatus":"Azure.AI.Projects.PublishApprovalStatus","com.azure.ai.agents.models.RaiConfig":"Azure.AI.Projects.RaiConfig","com.azure.ai.agents.models.RaiInvocationContentType":"Azure.AI.Projects.RaiInvocationContentType","com.azure.ai.agents.models.RaiInvocationModeration":"Azure.AI.Projects.RaiInvocationModeration","com.azure.ai.agents.models.RaiInvocationResponseMode":"Azure.AI.Projects.RaiInvocationMode","com.azure.ai.agents.models.RaiSseTextSelector":"Azure.AI.Projects.RaiSseTextSelector","com.azure.ai.agents.models.RankerVersionType":"RankerVersionTypeExpandable","com.azure.ai.agents.models.RankingOptions":"OpenAI.RankingOptions","com.azure.ai.agents.models.RealtimeAudioFormat":"OpenAI.RealtimeAudioFormats","com.azure.ai.agents.models.RealtimeAudioFormatType":"OpenAI.RealtimeAudioFormatsType","com.azure.ai.agents.models.RealtimeClientEvent":"OpenAI.RealtimeClientEvent","com.azure.ai.agents.models.RealtimeClientEventType":"OpenAI.RealtimeClientEventType","com.azure.ai.agents.models.RealtimeConversationCreatedEvent":"OpenAI.RealtimeServerEventConversationCreated","com.azure.ai.agents.models.RealtimeConversationItem":"OpenAI.RealtimeConversationItem","com.azure.ai.agents.models.RealtimeConversationItemAddedEvent":"OpenAI.RealtimeServerEventConversationItemAdded","com.azure.ai.agents.models.RealtimeConversationItemAssistantMessage":"OpenAI.RealtimeConversationItemMessageAssistant","com.azure.ai.agents.models.RealtimeConversationItemCreateEvent":"OpenAI.RealtimeClientEventConversationItemCreate","com.azure.ai.agents.models.RealtimeConversationItemCreatedEvent":"OpenAI.RealtimeServerEventConversationItemCreated","com.azure.ai.agents.models.RealtimeConversationItemDeleteEvent":"OpenAI.RealtimeClientEventConversationItemDelete","com.azure.ai.agents.models.RealtimeConversationItemDeletedEvent":"OpenAI.RealtimeServerEventConversationItemDeleted","com.azure.ai.agents.models.RealtimeConversationItemDoneEvent":"OpenAI.RealtimeServerEventConversationItemDone","com.azure.ai.agents.models.RealtimeConversationItemFunctionCall":"OpenAI.RealtimeConversationItemFunctionCall","com.azure.ai.agents.models.RealtimeConversationItemFunctionCallOutput":"OpenAI.RealtimeConversationItemFunctionCallOutput","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionCompletedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionDeltaEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionFailedEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.agents.models.RealtimeConversationItemInputAudioTranscriptionSegmentEvent":"OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegment","com.azure.ai.agents.models.RealtimeConversationItemMessage":"OpenAI.RealtimeConversationItemMessage","com.azure.ai.agents.models.RealtimeConversationItemMessageType":"OpenAI.RealtimeConversationItemMessageType","com.azure.ai.agents.models.RealtimeConversationItemObjectType":"RealtimeConversationItemObject","com.azure.ai.agents.models.RealtimeConversationItemRetrieveEvent":"OpenAI.RealtimeClientEventConversationItemRetrieve","com.azure.ai.agents.models.RealtimeConversationItemRetrievedEvent":"OpenAI.RealtimeServerEventConversationItemRetrieved","com.azure.ai.agents.models.RealtimeConversationItemSystemMessage":"OpenAI.RealtimeConversationItemMessageSystem","com.azure.ai.agents.models.RealtimeConversationItemTruncateEvent":"OpenAI.RealtimeClientEventConversationItemTruncate","com.azure.ai.agents.models.RealtimeConversationItemTruncatedEvent":"OpenAI.RealtimeServerEventConversationItemTruncated","com.azure.ai.agents.models.RealtimeConversationItemType":"OpenAI.RealtimeConversationItemType","com.azure.ai.agents.models.RealtimeConversationItemUserMessage":"OpenAI.RealtimeConversationItemMessageUser","com.azure.ai.agents.models.RealtimeErrorEvent":"OpenAI.RealtimeServerEventRealtimeServerEventError","com.azure.ai.agents.models.RealtimeInputAudioBufferAppendEvent":"OpenAI.RealtimeClientEventInputAudioBufferAppend","com.azure.ai.agents.models.RealtimeInputAudioBufferClearEvent":"OpenAI.RealtimeClientEventInputAudioBufferClear","com.azure.ai.agents.models.RealtimeInputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCleared","com.azure.ai.agents.models.RealtimeInputAudioBufferCommitEvent":"OpenAI.RealtimeClientEventInputAudioBufferCommit","com.azure.ai.agents.models.RealtimeInputAudioBufferCommittedEvent":"OpenAI.RealtimeServerEventInputAudioBufferCommitted","com.azure.ai.agents.models.RealtimeInputAudioBufferDtmfReceivedEvent":"OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStartedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted","com.azure.ai.agents.models.RealtimeInputAudioBufferSpeechStoppedEvent":"OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped","com.azure.ai.agents.models.RealtimeInputAudioBufferTimeoutTriggeredEvent":"OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggered","com.azure.ai.agents.models.RealtimeMcpApprovalInput":"OpenAI.RealtimeMCPApprovalRequest","com.azure.ai.agents.models.RealtimeMcpApprovalOutput":"OpenAI.RealtimeMCPApprovalResponse","com.azure.ai.agents.models.RealtimeMcpError":"OpenAI.RealtimeMCPError","com.azure.ai.agents.models.RealtimeMcpErrorType":"OpenAI.RealtimeMcpErrorType","com.azure.ai.agents.models.RealtimeMcpHttpError":"OpenAI.RealtimeMCPHTTPError","com.azure.ai.agents.models.RealtimeMcpListTools":"OpenAI.RealtimeMCPListTools","com.azure.ai.agents.models.RealtimeMcpListToolsCompletedEvent":"OpenAI.RealtimeServerEventMCPListToolsCompleted","com.azure.ai.agents.models.RealtimeMcpListToolsFailedEvent":"OpenAI.RealtimeServerEventMCPListToolsFailed","com.azure.ai.agents.models.RealtimeMcpListToolsInProgressEvent":"OpenAI.RealtimeServerEventMCPListToolsInProgress","com.azure.ai.agents.models.RealtimeMcpProtocolError":"OpenAI.RealtimeMCPProtocolError","com.azure.ai.agents.models.RealtimeMcpToolCall":"OpenAI.RealtimeMCPToolCall","com.azure.ai.agents.models.RealtimeMcpToolExecutionError":"OpenAI.RealtimeMCPToolExecutionError","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearEvent":"OpenAI.RealtimeClientEventOutputAudioBufferClear","com.azure.ai.agents.models.RealtimeOutputAudioBufferClearedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferCleared","com.azure.ai.agents.models.RealtimeOutputAudioBufferStartedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStarted","com.azure.ai.agents.models.RealtimeOutputAudioBufferStoppedEvent":"OpenAI.RealtimeServerEventOutputAudioBufferStopped","com.azure.ai.agents.models.RealtimePcmAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcm","com.azure.ai.agents.models.RealtimePcmaAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcma","com.azure.ai.agents.models.RealtimePcmuAudioFormat":"OpenAI.RealtimeAudioFormatsAudioPcmu","com.azure.ai.agents.models.RealtimeRateLimitsUpdatedEvent":"OpenAI.RealtimeServerEventRateLimitsUpdated","com.azure.ai.agents.models.RealtimeResponseAudioDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioDelta","com.azure.ai.agents.models.RealtimeResponseAudioDoneEvent":"OpenAI.RealtimeServerEventResponseAudioDone","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDeltaEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDelta","com.azure.ai.agents.models.RealtimeResponseAudioTranscriptDoneEvent":"OpenAI.RealtimeServerEventResponseAudioTranscriptDone","com.azure.ai.agents.models.RealtimeResponseCancelEvent":"OpenAI.RealtimeClientEventResponseCancel","com.azure.ai.agents.models.RealtimeResponseContentPart":"OpenAI.RealtimeServerEventResponseContentPartDonePart","com.azure.ai.agents.models.RealtimeResponseContentPartAddedEvent":"OpenAI.RealtimeServerEventResponseContentPartAdded","com.azure.ai.agents.models.RealtimeResponseContentPartDoneEvent":"OpenAI.RealtimeServerEventResponseContentPartDone","com.azure.ai.agents.models.RealtimeResponseCreateEvent":"OpenAI.RealtimeClientEventResponseCreate","com.azure.ai.agents.models.RealtimeResponseCreatedEvent":"OpenAI.RealtimeServerEventResponseCreated","com.azure.ai.agents.models.RealtimeResponseDoneEvent":"OpenAI.RealtimeServerEventResponseDone","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseFunctionCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDeltaEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDelta","com.azure.ai.agents.models.RealtimeResponseMcpCallArgumentsDoneEvent":"OpenAI.RealtimeServerEventResponseMCPCallArgumentsDone","com.azure.ai.agents.models.RealtimeResponseMcpCallCompletedEvent":"OpenAI.RealtimeServerEventResponseMCPCallCompleted","com.azure.ai.agents.models.RealtimeResponseMcpCallFailedEvent":"OpenAI.RealtimeServerEventResponseMCPCallFailed","com.azure.ai.agents.models.RealtimeResponseMcpCallInProgressEvent":"OpenAI.RealtimeServerEventResponseMCPCallInProgress","com.azure.ai.agents.models.RealtimeResponseOutputItemAddedEvent":"OpenAI.RealtimeServerEventResponseOutputItemAdded","com.azure.ai.agents.models.RealtimeResponseOutputItemDoneEvent":"OpenAI.RealtimeServerEventResponseOutputItemDone","com.azure.ai.agents.models.RealtimeResponseTextDeltaEvent":"OpenAI.RealtimeServerEventResponseTextDelta","com.azure.ai.agents.models.RealtimeResponseTextDoneEvent":"OpenAI.RealtimeServerEventResponseTextDone","com.azure.ai.agents.models.RealtimeSemanticVadTurnDetection":"OpenAI.RealtimeTurnDetectionSemanticVad","com.azure.ai.agents.models.RealtimeServerEvent":"OpenAI.RealtimeServerEvent","com.azure.ai.agents.models.RealtimeServerEventType":"OpenAI.RealtimeServerEventType","com.azure.ai.agents.models.RealtimeServerVadTurnDetection":"OpenAI.RealtimeTurnDetectionServerVad","com.azure.ai.agents.models.RealtimeSessionAudioConfiguration":"OpenAI.RealtimeSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeSessionAudioInput":"OpenAI.RealtimeSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeSessionAudioOutput":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput","com.azure.ai.agents.models.RealtimeSessionConfiguration":"OpenAI.RealtimeSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeSessionConfigurationBase":"OpenAI.RealtimeSessionCreateRequestUnion","com.azure.ai.agents.models.RealtimeSessionCreateRequestGAAudioOutputVoice":"OpenAI.RealtimeSessionCreateRequestGAAudioOutput.voice.anonymous","com.azure.ai.agents.models.RealtimeSessionCreatedEvent":"OpenAI.RealtimeServerEventSessionCreated","com.azure.ai.agents.models.RealtimeSessionTracingConfiguration":"OpenAI.RealtimeSessionCreateRequestGATracing","com.azure.ai.agents.models.RealtimeSessionType":"OpenAI.RealtimeSessionCreateRequestUnionType","com.azure.ai.agents.models.RealtimeSessionUpdateEvent":"OpenAI.RealtimeClientEventSessionUpdate","com.azure.ai.agents.models.RealtimeSessionUpdatedEvent":"OpenAI.RealtimeServerEventSessionUpdated","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudio","com.azure.ai.agents.models.RealtimeTranscriptionSessionAudioInput":"OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInput","com.azure.ai.agents.models.RealtimeTranscriptionSessionConfiguration":"OpenAI.RealtimeTranscriptionSessionCreateRequestGA","com.azure.ai.agents.models.RealtimeTurnDetection":"OpenAI.RealtimeTurnDetection","com.azure.ai.agents.models.RealtimeTurnDetectionType":"OpenAI.RealtimeTurnDetectionType","com.azure.ai.agents.models.ReminderPreviewToolboxTool":"Azure.AI.Projects.ReminderPreviewToolboxTool","com.azure.ai.agents.models.ResponseFormatJsonSchemaInner":"OpenAI.ResponseFormatJsonSchemaSchema","com.azure.ai.agents.models.ResponseUsageInputTokensDetails":"OpenAI.ResponseUsageInputTokensDetails","com.azure.ai.agents.models.ResponseUsageOutputTokensDetails":"OpenAI.ResponseUsageOutputTokensDetails","com.azure.ai.agents.models.ResponsesProtocolConfiguration":"Azure.AI.Projects.ResponsesProtocolConfiguration","com.azure.ai.agents.models.RoutingConfiguration":"Azure.AI.Projects.RoutingConfiguration","com.azure.ai.agents.models.RoutingTraceEntry":"Azure.AI.Projects.RoutingTraceEntry","com.azure.ai.agents.models.SearchContentType":"OpenAI.SearchContentType","com.azure.ai.agents.models.SearchContextSize":"SearchContextSizeExpandable","com.azure.ai.agents.models.SessionAffinityConfiguration":"Azure.AI.Projects.SessionAffinityConfiguration","com.azure.ai.agents.models.SessionAffinityDecision":"Azure.AI.Projects.SessionAffinityDecision","com.azure.ai.agents.models.SessionAffinityDetails":"Azure.AI.Projects.SessionAffinityDetails","com.azure.ai.agents.models.SessionAffinityMode":"Azure.AI.Projects.SessionAffinityMode","com.azure.ai.agents.models.SessionAffinityRequestMode":"Azure.AI.Projects.SessionAffinityRequestMode","com.azure.ai.agents.models.SessionAffinitySource":"Azure.AI.Projects.SessionAffinitySource","com.azure.ai.agents.models.SessionConfiguration":"Azure.AI.Projects.SessionConfiguration","com.azure.ai.agents.models.SessionDirectoryEntry":"Azure.AI.Projects.SessionDirectoryEntry","com.azure.ai.agents.models.SessionFileWriteResult":"Azure.AI.Projects.SessionFileWriteResponse","com.azure.ai.agents.models.SessionLogEvent":"Azure.AI.Projects.SessionLogEvent","com.azure.ai.agents.models.SessionLogEventType":"Azure.AI.Projects.SessionLogEventType","com.azure.ai.agents.models.SharepointGroundingToolCall":"Azure.AI.Projects.SharepointGroundingToolCall","com.azure.ai.agents.models.SharepointGroundingToolCallOutput":"Azure.AI.Projects.SharepointGroundingToolCallOutput","com.azure.ai.agents.models.SharepointGroundingToolParameters":"Azure.AI.Projects.SharepointGroundingToolParameters","com.azure.ai.agents.models.SharepointPreviewTool":"Azure.AI.Projects.SharepointPreviewTool","com.azure.ai.agents.models.ShellToolboxTool":"Azure.AI.Projects.ShellToolboxTool","com.azure.ai.agents.models.SipTelephonyTransferDestination":"Azure.AI.Projects.SipTelephonyTransferDestination","com.azure.ai.agents.models.SkillReference":"Azure.AI.Projects.SkillReference","com.azure.ai.agents.models.SkillReferenceParameter":"OpenAI.SkillReferenceParam","com.azure.ai.agents.models.SteeringPromptOptimizationContext":"Azure.AI.Projects.SteeringPromptOptimizationContext","com.azure.ai.agents.models.StructuredInputDefinition":"Azure.AI.Projects.StructuredInputDefinition","com.azure.ai.agents.models.StructuredOutputDefinition":"Azure.AI.Projects.StructuredOutputDefinition","com.azure.ai.agents.models.TargetAttribute":"Azure.AI.Projects.TargetAttribute","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBinding":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBinding","com.azure.ai.agents.models.TeamsPhoneExtensibilityTelephonyBindingListItem":"Azure.AI.Projects.TeamsPhoneExtensibilityTelephonyBindingListItem","com.azure.ai.agents.models.TeamsTelephonyTransferDestination":"Azure.AI.Projects.TeamsTelephonyTransferDestination","com.azure.ai.agents.models.TelemetryConfig":"Azure.AI.Projects.TelemetryConfig","com.azure.ai.agents.models.TelemetryDataKind":"Azure.AI.Projects.TelemetryDataKind","com.azure.ai.agents.models.TelemetryEndpoint":"Azure.AI.Projects.TelemetryEndpoint","com.azure.ai.agents.models.TelemetryEndpointAuth":"Azure.AI.Projects.TelemetryEndpointAuth","com.azure.ai.agents.models.TelemetryEndpointAuthType":"Azure.AI.Projects.TelemetryEndpointAuthType","com.azure.ai.agents.models.TelemetryEndpointKind":"Azure.AI.Projects.TelemetryEndpointKind","com.azure.ai.agents.models.TelemetryTransportProtocol":"Azure.AI.Projects.TelemetryTransportProtocol","com.azure.ai.agents.models.TelephonyBinding":"Azure.AI.Projects.TelephonyBinding","com.azure.ai.agents.models.TelephonyBindingListItem":"Azure.AI.Projects.TelephonyBindingListItem","com.azure.ai.agents.models.TelephonyBindingStatus":"Azure.AI.Projects.TelephonyBindingStatus","com.azure.ai.agents.models.TelephonyCallDurationBasis":"Azure.AI.Projects.TelephonyCallDurationBasis","com.azure.ai.agents.models.TelephonyCallEndReason":"Azure.AI.Projects.TelephonyCallEndReason","com.azure.ai.agents.models.TelephonyCallJob":"Azure.AI.Projects.TelephonyCallJob","com.azure.ai.agents.models.TelephonyCallJobCancellation":"Azure.AI.Projects.TelephonyCallJobCancellation","com.azure.ai.agents.models.TelephonyCallJobSchedule":"Azure.AI.Projects.TelephonyCallJobSchedule","com.azure.ai.agents.models.TelephonyCallJobStatus":"Azure.AI.Projects.TelephonyCallJobStatus","com.azure.ai.agents.models.TelephonyCallJobTerminalReason":"Azure.AI.Projects.TelephonyCallJobTerminalReason","com.azure.ai.agents.models.TelephonyCallLifecycleEvent":"Azure.AI.Projects.TelephonyCallLifecycleEvent","com.azure.ai.agents.models.TelephonyCallLifecycleEventName":"Azure.AI.Projects.TelephonyCallLifecycleEventName","com.azure.ai.agents.models.TelephonyCallLifecycleEventOutcome":"Azure.AI.Projects.TelephonyCallLifecycleEventOutcome","com.azure.ai.agents.models.TelephonyCallLifecycleEventReason":"Azure.AI.Projects.TelephonyCallLifecycleEventReason","com.azure.ai.agents.models.TelephonyCallLifecycleEventSource":"Azure.AI.Projects.TelephonyCallLifecycleEventSource","com.azure.ai.agents.models.TelephonyCallPhase":"Azure.AI.Projects.TelephonyCallPhase","com.azure.ai.agents.models.TelephonyCallRecord":"Azure.AI.Projects.TelephonyCallRecord","com.azure.ai.agents.models.TelephonyCallStatus":"Azure.AI.Projects.TelephonyCallStatus","com.azure.ai.agents.models.TelephonyCallSummary":"Azure.AI.Projects.TelephonyCallSummary","com.azure.ai.agents.models.TelephonyCallTimestampSource":"Azure.AI.Projects.TelephonyCallTimestampSource","com.azure.ai.agents.models.TelephonyCallTiming":"Azure.AI.Projects.TelephonyCallTiming","com.azure.ai.agents.models.TelephonyCallTrace":"Azure.AI.Projects.TelephonyCallTrace","com.azure.ai.agents.models.TelephonyCallTraceMode":"Azure.AI.Projects.TelephonyCallTraceMode","com.azure.ai.agents.models.TelephonyCallTraceStatus":"Azure.AI.Projects.TelephonyCallTraceStatus","com.azure.ai.agents.models.TelephonyOutboundDestination":"Azure.AI.Projects.TelephonyOutboundDestination","com.azure.ai.agents.models.TelephonyOutboundDestinationType":"Azure.AI.Projects.TelephonyOutboundDestinationType","com.azure.ai.agents.models.TelephonyOutboundFixedIntervalRetryPolicy":"Azure.AI.Projects.TelephonyOutboundFixedIntervalRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicy":"Azure.AI.Projects.TelephonyOutboundRetryPolicy","com.azure.ai.agents.models.TelephonyOutboundRetryPolicyType":"Azure.AI.Projects.TelephonyOutboundRetryPolicyType","com.azure.ai.agents.models.TelephonyProvider":"Azure.AI.Projects.TelephonyProvider","com.azure.ai.agents.models.TelephonyTransferDestination":"Azure.AI.Projects.TelephonyTransferDestination","com.azure.ai.agents.models.TelephonyTransferDestinationKind":"Azure.AI.Projects.TelephonyTransferDestinationKind","com.azure.ai.agents.models.TelephonyTransferTarget":"Azure.AI.Projects.TelephonyTransferTarget","com.azure.ai.agents.models.TelephonyTransferTargets":"Azure.AI.Projects.TelephonyTransferTargets","com.azure.ai.agents.models.TextResponseFormatConfiguration":"OpenAI.TextResponseFormatConfiguration","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatJsonObject":"OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject","com.azure.ai.agents.models.TextResponseFormatConfigurationResponseFormatText":"OpenAI.TextResponseFormatConfigurationResponseFormatText","com.azure.ai.agents.models.TextResponseFormatConfigurationType":"OpenAI.TextResponseFormatConfigurationType","com.azure.ai.agents.models.TextResponseFormatJsonSchema":"OpenAI.TextResponseFormatJsonSchema","com.azure.ai.agents.models.Tool":"OpenAI.Tool","com.azure.ai.agents.models.ToolCallStatus":"Azure.AI.Projects.ToolCallStatus","com.azure.ai.agents.models.ToolConfig":"Azure.AI.Projects.ToolConfig","com.azure.ai.agents.models.ToolProjectConnection":"Azure.AI.Projects.ToolProjectConnection","com.azure.ai.agents.models.ToolSearchExecutionType":"OpenAI.ToolSearchExecutionType","com.azure.ai.agents.models.ToolSearchTool":"OpenAI.ToolSearchToolParam","com.azure.ai.agents.models.ToolSearchToolboxTool":"Azure.AI.Projects.ToolSearchToolboxTool","com.azure.ai.agents.models.ToolType":"OpenAI.ToolType","com.azure.ai.agents.models.ToolboxDetails":"Azure.AI.Projects.ToolboxObject","com.azure.ai.agents.models.ToolboxPolicies":"Azure.AI.Projects.ToolboxPolicies","com.azure.ai.agents.models.ToolboxSearchPreviewToolboxTool":"Azure.AI.Projects.ToolboxSearchPreviewToolboxTool","com.azure.ai.agents.models.ToolboxShellContainerAutoEnvironment":"Azure.AI.Projects.ToolboxShellContainerAutoEnvironment","com.azure.ai.agents.models.ToolboxShellContainerReferenceEnvironment":"Azure.AI.Projects.ToolboxShellContainerReferenceEnvironment","com.azure.ai.agents.models.ToolboxShellEnvironment":"Azure.AI.Projects.ToolboxShellEnvironment","com.azure.ai.agents.models.ToolboxShellNetworkPolicy":"Azure.AI.Projects.ToolboxShellNetworkPolicy","com.azure.ai.agents.models.ToolboxShellNetworkPolicyDisabled":"Azure.AI.Projects.ToolboxShellNetworkPolicyDisabled","com.azure.ai.agents.models.ToolboxSkill":"Azure.AI.Projects.ToolboxSkill","com.azure.ai.agents.models.ToolboxSkillReference":"Azure.AI.Projects.ToolboxSkillReference","com.azure.ai.agents.models.ToolboxTool":"Azure.AI.Projects.ToolboxTool","com.azure.ai.agents.models.ToolboxToolType":"Azure.AI.Projects.ToolboxToolType","com.azure.ai.agents.models.ToolboxVersionDetails":"Azure.AI.Projects.ToolboxVersionObject","com.azure.ai.agents.models.ToolboxVersions":"Azure.AI.Projects.ToolboxVersions","com.azure.ai.agents.models.TranscriptTextInputTokenDetails":"OpenAI.TranscriptTextUsageTokensInputTokenDetails","com.azure.ai.agents.models.TranscriptTextUsage":"OpenAI.CreateTranscriptionResponseJsonUsage","com.azure.ai.agents.models.TranscriptTextUsageDuration":"OpenAI.TranscriptTextUsageDuration","com.azure.ai.agents.models.TranscriptTextUsageTokens":"OpenAI.TranscriptTextUsageTokens","com.azure.ai.agents.models.TranscriptTextUsageType":"OpenAI.CreateTranscriptionResponseJsonUsageType","com.azure.ai.agents.models.TranscriptionLanguage":"OpenAI.TranscriptionLanguage","com.azure.ai.agents.models.TwilioTelephonyBinding":"Azure.AI.Projects.TwilioTelephonyBinding","com.azure.ai.agents.models.TwilioTelephonyBindingListItem":"Azure.AI.Projects.TwilioTelephonyBindingListItem","com.azure.ai.agents.models.UpdateAgentDetailsOptions":"Azure.AI.Projects.patchAgentObject.Request.anonymous","com.azure.ai.agents.models.UpdateTelephonyBindingInput":"Azure.AI.Projects.UpdateTelephonyBindingRequest","com.azure.ai.agents.models.UserConversationSimulationAudioEffect":"Azure.AI.Projects.UserConversationSimulationAudioEffect","com.azure.ai.agents.models.UserConversationSimulationAudioEffectsConfiguration":"Azure.AI.Projects.UserConversationSimulationAudioEffectsConfiguration","com.azure.ai.agents.models.UserConversationSimulationConfiguration":"Azure.AI.Projects.UserConversationSimulationConfiguration","com.azure.ai.agents.models.UserConversationSimulationDefaultInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationDefaultInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationInterruptionConfiguration":"Azure.AI.Projects.UserConversationSimulationInterruptionConfiguration","com.azure.ai.agents.models.UserConversationSimulationTestCase":"Azure.AI.Projects.UserConversationSimulationTestCase","com.azure.ai.agents.models.UserConversationSimulationUserBehaviorConfiguration":"Azure.AI.Projects.UserConversationSimulationUserBehaviorConfiguration","com.azure.ai.agents.models.UserProfileMemoryItem":"Azure.AI.Projects.UserProfileMemoryItem","com.azure.ai.agents.models.VersionIndicator":"Azure.AI.Projects.VersionIndicator","com.azure.ai.agents.models.VersionIndicatorType":"Azure.AI.Projects.VersionIndicatorType","com.azure.ai.agents.models.VersionRefIndicator":"Azure.AI.Projects.VersionRefIndicator","com.azure.ai.agents.models.VersionSelectionRule":"Azure.AI.Projects.VersionSelectionRule","com.azure.ai.agents.models.VersionSelector":"Azure.AI.Projects.VersionSelector","com.azure.ai.agents.models.VersionSelectorType":"Azure.AI.Projects.VersionSelectorType","com.azure.ai.agents.models.VoiceAgentAnimationConfiguration":"Azure.AI.Projects.VoiceAgentAnimationConfig","com.azure.ai.agents.models.VoiceAgentAnimationOutputType":"Azure.AI.Projects.VoiceAgentAnimationOutputType","com.azure.ai.agents.models.VoiceAgentAudioConfiguration":"Azure.AI.Projects.VoiceAgentAudioConfig","com.azure.ai.agents.models.VoiceAgentAudioInputConfiguration":"Azure.AI.Projects.VoiceAgentAudioInputConfig","com.azure.ai.agents.models.VoiceAgentAudioOutputConfiguration":"Azure.AI.Projects.VoiceAgentAudioOutputConfig","com.azure.ai.agents.models.VoiceAgentAudioTimestampType":"Azure.AI.Projects.VoiceAgentAudioTimestampType","com.azure.ai.agents.models.VoiceAgentAvatarConfiguration":"Azure.AI.Projects.VoiceAgentAvatarConfig","com.azure.ai.agents.models.VoiceAgentAvatarIceServer":"Azure.AI.Projects.VoiceAgentAvatarIceServer","com.azure.ai.agents.models.VoiceAgentAvatarOutputProtocol":"Azure.AI.Projects.VoiceAgentAvatarOutputProtocol","com.azure.ai.agents.models.VoiceAgentAvatarScene":"Azure.AI.Projects.VoiceAgentAvatarScene","com.azure.ai.agents.models.VoiceAgentAvatarType":"Azure.AI.Projects.VoiceAgentAvatarType","com.azure.ai.agents.models.VoiceAgentAvatarVideoBackground":"Azure.AI.Projects.VoiceAgentAvatarVideoBackground","com.azure.ai.agents.models.VoiceAgentAvatarVideoCrop":"Azure.AI.Projects.VoiceAgentAvatarVideoCrop","com.azure.ai.agents.models.VoiceAgentAvatarVideoParameters":"Azure.AI.Projects.VoiceAgentAvatarVideoParams","com.azure.ai.agents.models.VoiceAgentAvatarVideoResolution":"Azure.AI.Projects.VoiceAgentAvatarVideoResolution","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadEnglishTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadEnTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadMultilingualTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadMultilingualTurnDetection","com.azure.ai.agents.models.VoiceAgentAzureSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentAzureSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentDefinition":"Azure.AI.Projects.VoiceAgentDefinition","com.azure.ai.agents.models.VoiceAgentEchoCancellation":"Azure.AI.Projects.VoiceAgentEchoCancellation","com.azure.ai.agents.models.VoiceAgentEchoCancellationReferenceSource":"Azure.AI.Projects.VoiceAgentEchoCancellationReferenceSource","com.azure.ai.agents.models.VoiceAgentEndConversationSystemTool":"Azure.AI.Projects.VoiceAgentEndConversationSystemTool","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetection":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetection","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceDetectionModel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceDetectionModel","com.azure.ai.agents.models.VoiceAgentEndOfUtteranceThresholdLevel":"Azure.AI.Projects.VoiceAgentEndOfUtteranceThresholdLevel","com.azure.ai.agents.models.VoiceAgentFunctionTool":"Azure.AI.Projects.VoiceAgentFunctionTool","com.azure.ai.agents.models.VoiceAgentFunctionToolType1":null,"com.azure.ai.agents.models.VoiceAgentGreetingConfiguration":"Azure.AI.Projects.VoiceAgentGreetingConfig","com.azure.ai.agents.models.VoiceAgentInputTranscription":"Azure.AI.Projects.VoiceAgentInputTranscription","com.azure.ai.agents.models.VoiceAgentInputTranscriptionModel":"Azure.AI.Projects.VoiceAgentInputTranscriptionModel","com.azure.ai.agents.models.VoiceAgentInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentInterimResponseTrigger":"Azure.AI.Projects.VoiceAgentInterimResponseTrigger","com.azure.ai.agents.models.VoiceAgentLlmGeneratedGreetingConfiguration":"Azure.AI.Projects.VoiceAgentLlmGeneratedGreetingConfig","com.azure.ai.agents.models.VoiceAgentLlmInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentLlmInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentMcpTool":"Azure.AI.Projects.VoiceAgentMcpTool","com.azure.ai.agents.models.VoiceAgentNoiseReduction":"Azure.AI.Projects.VoiceAgentNoiseReduction","com.azure.ai.agents.models.VoiceAgentNoiseReductionType":"Azure.AI.Projects.VoiceAgentNoiseReductionType","com.azure.ai.agents.models.VoiceAgentRealtimeResponse":"Azure.AI.Projects.VoiceAgentRealtimeResponse","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationBlendshapeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationBlendshapesDone","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDelta","com.azure.ai.agents.models.VoiceAgentResponseAnimationVisemeDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAnimationVisemeDone","com.azure.ai.agents.models.VoiceAgentResponseAudioConfig":"TypeSpec.PickProperties","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDelta","com.azure.ai.agents.models.VoiceAgentResponseAudioTimestampDoneEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseAudioTimestampDone","com.azure.ai.agents.models.VoiceAgentResponseCreateOptions":"Azure.AI.Projects.VoiceAgentResponseCreateParams","com.azure.ai.agents.models.VoiceAgentResponseVideoDeltaEvent":"Azure.AI.Projects.VoiceAgentServerEventResponseVideoDelta","com.azure.ai.agents.models.VoiceAgentRtcCallErrorDetails":"Azure.AI.Projects.VoiceAgentRtcCallErrorDetails","com.azure.ai.agents.models.VoiceAgentRtcCallErrorEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallError","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreateEvent":"Azure.AI.Projects.VoiceAgentClientEventRtcCallSdpCreate","com.azure.ai.agents.models.VoiceAgentRtcCallSdpCreatedEvent":"Azure.AI.Projects.VoiceAgentServerEventRtcCallSdpCreated","com.azure.ai.agents.models.VoiceAgentSemanticVadTurnDetection":"Azure.AI.Projects.VoiceAgentSemanticVadTurnDetection","com.azure.ai.agents.models.VoiceAgentServerVadTurnDetection":"Azure.AI.Projects.VoiceAgentServerVadTurnDetection","com.azure.ai.agents.models.VoiceAgentSessionAvatarConfiguration":"Azure.AI.Projects.VoiceAgentSessionAvatarConfig","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectEvent":"Azure.AI.Projects.VoiceAgentClientEventSessionAvatarConnect","com.azure.ai.agents.models.VoiceAgentSessionAvatarConnectingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarConnecting","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToIdleEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToIdle","com.azure.ai.agents.models.VoiceAgentSessionAvatarSwitchToSpeakingEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionAvatarSwitchToSpeaking","com.azure.ai.agents.models.VoiceAgentSessionIncludeOption":"Azure.AI.Projects.VoiceAgentSessionIncludeOption","com.azure.ai.agents.models.VoiceAgentSessionResponseConfiguration":"Azure.AI.Projects.VoiceAgentSessionResponseConfig","com.azure.ai.agents.models.VoiceAgentSessionSubagentAbortedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentAborted","com.azure.ai.agents.models.VoiceAgentSessionSubagentCompletedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentCompleted","com.azure.ai.agents.models.VoiceAgentSessionSubagentStartedEvent":"Azure.AI.Projects.VoiceAgentServerEventSessionSubagentStarted","com.azure.ai.agents.models.VoiceAgentSessionUpdateConfiguration":"Azure.AI.Projects.VoiceAgentSessionUpdateConfig","com.azure.ai.agents.models.VoiceAgentStaticInterimResponseConfiguration":"Azure.AI.Projects.VoiceAgentStaticInterimResponseConfig","com.azure.ai.agents.models.VoiceAgentSubagent":"Azure.AI.Projects.VoiceAgentSubagent","com.azure.ai.agents.models.VoiceAgentSubagentAbortReason":"Azure.AI.Projects.VoiceAgentSubagentAbortReason","com.azure.ai.agents.models.VoiceAgentSubagentConfiguration":"Azure.AI.Projects.VoiceAgentSubagentConfig","com.azure.ai.agents.models.VoiceAgentSubagentResponsePolicy":"Azure.AI.Projects.VoiceAgentSubagentResponsePolicy","com.azure.ai.agents.models.VoiceAgentSystemTool":"Azure.AI.Projects.VoiceAgentSystemTool","com.azure.ai.agents.models.VoiceAgentSystemToolName":"Azure.AI.Projects.VoiceAgentSystemToolName","com.azure.ai.agents.models.VoiceAgentTemplateGreetingConfiguration":"Azure.AI.Projects.VoiceAgentTemplateGreetingConfig","com.azure.ai.agents.models.VoiceAgentTool":"Azure.AI.Projects.VoiceAgentTool","com.azure.ai.agents.models.VoiceAgentToolResponseScheduling":"Azure.AI.Projects.VoiceAgentToolResponseScheduling","com.azure.ai.agents.models.VoiceAgentToolboxTool":"Azure.AI.Projects.VoiceAgentToolboxTool","com.azure.ai.agents.models.VoiceAgentTranscriptionPhrase":"Azure.AI.Projects.VoiceAgentTranscriptionPhrase","com.azure.ai.agents.models.VoiceAgentTranscriptionWord":"Azure.AI.Projects.VoiceAgentTranscriptionWord","com.azure.ai.agents.models.VoiceAgentTransport":"Azure.AI.Projects.VoiceAgentTransport","com.azure.ai.agents.models.VoiceAgentTurnDetectionConfiguration":"Azure.AI.Projects.VoiceAgentTurnDetectionConfig","com.azure.ai.agents.models.VoiceAgentTurnDetectionType":"Azure.AI.Projects.VoiceAgentTurnDetectionType","com.azure.ai.agents.models.VoiceAgentWarningDetails":"Azure.AI.Projects.VoiceAgentServerEventWarningDetails","com.azure.ai.agents.models.VoiceAgentWarningEvent":"Azure.AI.Projects.VoiceAgentServerEventWarning","com.azure.ai.agents.models.VoiceAudioCodec":"Azure.AI.Projects.VoiceAudioCodec","com.azure.ai.agents.models.VoiceAudioContainerFormat":"Azure.AI.Projects.VoiceAudioContainerFormat","com.azure.ai.agents.models.VoiceAudioItem":"Azure.AI.Projects.VoiceAudioItem","com.azure.ai.agents.models.VoiceAudioRole":"Azure.AI.Projects.VoiceAudioRole","com.azure.ai.agents.models.VoiceConversation":"Azure.AI.Projects.VoiceConversation","com.azure.ai.agents.models.VoiceConversationEngine":"Azure.AI.Projects.VoiceConversationEngine","com.azure.ai.agents.models.VoiceConversationStatus":"Azure.AI.Projects.VoiceConversationStatus","com.azure.ai.agents.models.VoiceGeneratedAudioItem":"Azure.AI.Projects.VoiceGeneratedAudioItem","com.azure.ai.agents.models.VoiceHostedAgentConversationEngine":"Azure.AI.Projects.VoiceHostedAgentConversationEngine","com.azure.ai.agents.models.VoiceIds":"OpenAI.VoiceIdsShared","com.azure.ai.agents.models.VoiceModelType":"Azure.AI.Projects.VoiceModelType","com.azure.ai.agents.models.VoiceOutputModality":"Azure.AI.Projects.VoiceOutputModality","com.azure.ai.agents.models.VoiceRecording":"Azure.AI.Projects.VoiceRecording","com.azure.ai.agents.models.VoiceRecordingChannelLayout":"Azure.AI.Projects.VoiceRecordingChannelLayout","com.azure.ai.agents.models.VoiceResponse":"Azure.AI.Projects.VoiceResponse","com.azure.ai.agents.models.VoiceResponseAudio":"Azure.AI.Projects.VoiceResponseAudio","com.azure.ai.agents.models.VoiceResponseAudioOutput":"Azure.AI.Projects.VoiceResponseAudioOutput","com.azure.ai.agents.models.VoiceResponseObjectType":null,"com.azure.ai.agents.models.VoiceType":"Azure.AI.Projects.VoiceType","com.azure.ai.agents.models.WebIqPreviewTool":"Azure.AI.Projects.WebIQPreviewTool","com.azure.ai.agents.models.WebIqPreviewToolboxTool":"Azure.AI.Projects.WebIQPreviewToolboxTool","com.azure.ai.agents.models.WebSearchApproximateLocation":"OpenAI.WebSearchApproximateLocation","com.azure.ai.agents.models.WebSearchConfiguration":"Azure.AI.Projects.WebSearchConfiguration","com.azure.ai.agents.models.WebSearchPreviewTool":"OpenAI.WebSearchPreviewTool","com.azure.ai.agents.models.WebSearchTool":"OpenAI.WebSearchTool","com.azure.ai.agents.models.WebSearchToolFilters":"OpenAI.WebSearchToolFilters","com.azure.ai.agents.models.WebSearchToolSearchContextSize":"WebSearchToolSearchContextSizeExpandable","com.azure.ai.agents.models.WebSearchToolboxTool":"Azure.AI.Projects.WebSearchToolboxTool","com.azure.ai.agents.models.WorkIqPreviewTool":"Azure.AI.Projects.WorkIQPreviewTool","com.azure.ai.agents.models.WorkIqPreviewToolboxTool":"Azure.AI.Projects.WorkIQPreviewToolboxTool","com.azure.ai.agents.models.WorkflowAgentDefinition":"Azure.AI.Projects.WorkflowAgentDefinition"},"generatedFiles":["src/main/java/com/azure/ai/agents/AgentsAsyncClient.java","src/main/java/com/azure/ai/agents/AgentsClient.java","src/main/java/com/azure/ai/agents/AgentsClientBuilder.java","src/main/java/com/azure/ai/agents/AgentsServiceVersion.java","src/main/java/com/azure/ai/agents/BetaAgentsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaAgentsClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresAsyncClient.java","src/main/java/com/azure/ai/agents/BetaMemoryStoresClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsConversationsClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyAsyncClient.java","src/main/java/com/azure/ai/agents/BetaVoiceAgentsTelephonyClient.java","src/main/java/com/azure/ai/agents/ToolboxesAsyncClient.java","src/main/java/com/azure/ai/agents/ToolboxesClient.java","src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java","src/main/java/com/azure/ai/agents/implementation/AgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaAgentsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaMemoryStoresImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsConversationsImpl.java","src/main/java/com/azure/ai/agents/implementation/BetaVoiceAgentsTelephoniesImpl.java","src/main/java/com/azure/ai/agents/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/agents/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/agents/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/PollingUtils.java","src/main/java/com/azure/ai/agents/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/agents/implementation/ToolboxesImpl.java","src/main/java/com/azure/ai/agents/implementation/models/AgentDefinitionOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromCodeContent.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentOptions.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateSessionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/CreateToolboxVersionRequest.java","src/main/java/com/azure/ai/agents/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/agents/implementation/models/GetMicrosoft365AppPackageRequest.java","src/main/java/com/azure/ai/agents/implementation/models/ListMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/PublishAgentToMicrosoft365Request.java","src/main/java/com/azure/ai/agents/implementation/models/ReplaceTelephonyTransferTargetsRequest.java","src/main/java/com/azure/ai/agents/implementation/models/SearchMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/TransferTelephonyCallRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentFromManifestRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoriesRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateMemoryStoreRequest.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxInput.java","src/main/java/com/azure/ai/agents/implementation/models/UpdateToolboxRequest.java","src/main/java/com/azure/ai/agents/implementation/models/package-info.java","src/main/java/com/azure/ai/agents/implementation/package-info.java","src/main/java/com/azure/ai/agents/models/A2APreviewTool.java","src/main/java/com/azure/ai/agents/models/A2APreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/A2AProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/A2AProtocolVersion.java","src/main/java/com/azure/ai/agents/models/A2ATool.java","src/main/java/com/azure/ai/agents/models/A2AToolCall.java","src/main/java/com/azure/ai/agents/models/A2AToolCallOutput.java","src/main/java/com/azure/ai/agents/models/A2AToolboxTool.java","src/main/java/com/azure/ai/agents/models/AISearchIndexResource.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolAccessBoundary.java","src/main/java/com/azure/ai/agents/models/ActivityProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReference.java","src/main/java/com/azure/ai/agents/models/AgentBlueprintReferenceType.java","src/main/java/com/azure/ai/agents/models/AgentCard.java","src/main/java/com/azure/ai/agents/models/AgentCardSkill.java","src/main/java/com/azure/ai/agents/models/AgentDefinition.java","src/main/java/com/azure/ai/agents/models/AgentDetails.java","src/main/java/com/azure/ai/agents/models/AgentDetailsVersions.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationSchemeType.java","src/main/java/com/azure/ai/agents/models/AgentEndpointConfig.java","src/main/java/com/azure/ai/agents/models/AgentEndpointProtocol.java","src/main/java/com/azure/ai/agents/models/AgentHarness.java","src/main/java/com/azure/ai/agents/models/AgentIdentity.java","src/main/java/com/azure/ai/agents/models/AgentIdentityStatus.java","src/main/java/com/azure/ai/agents/models/AgentKind.java","src/main/java/com/azure/ai/agents/models/AgentObjectType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationAgentCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationBaselineAgentConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateEvaluation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateExpand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidatePromotionInfo.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCandidateStatus.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationBase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationCostEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationDataSourceType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateBand.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateInputs.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEstimateResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluationSetType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationEvaluatorReference.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationFoundryAgentTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationGoal.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationInstructionsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJob.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobLatency.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobResult.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationJobTokenUsage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationModelMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationPromptCandidateOutput.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationResultCandidateSummary.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkill.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSkillsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationSpace.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStage.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationStageEstimate.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetCompletionTestCase.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfiguration.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTargetConfigurationType.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationTerminationReason.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationToolsMutation.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationDatasetReferenceDataSource.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationEvaluationSet.java","src/main/java/com/azure/ai/agents/models/AgentOptimizationUserConversationSimulationInlineDataSource.java","src/main/java/com/azure/ai/agents/models/AgentReference.java","src/main/java/com/azure/ai/agents/models/AgentSessionResource.java","src/main/java/com/azure/ai/agents/models/AgentSessionStatus.java","src/main/java/com/azure/ai/agents/models/AgentState.java","src/main/java/com/azure/ai/agents/models/AgentStateSource.java","src/main/java/com/azure/ai/agents/models/AgentVersionDetails.java","src/main/java/com/azure/ai/agents/models/AgentVersionStatus.java","src/main/java/com/azure/ai/agents/models/ApiError.java","src/main/java/com/azure/ai/agents/models/ApplyPatchToolParameter.java","src/main/java/com/azure/ai/agents/models/ApproximateLocation.java","src/main/java/com/azure/ai/agents/models/AudioTranscription.java","src/main/java/com/azure/ai/agents/models/AudioTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/AutoCodeInterpreterToolParameter.java","src/main/java/com/azure/ai/agents/models/AzureAISearchQueryType.java","src/main/java/com/azure/ai/agents/models/AzureAISearchTool.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCall.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolResource.java","src/main/java/com/azure/ai/agents/models/AzureAISearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseDetails.java","src/main/java/com/azure/ai/agents/models/AzureCreateResponseOptions.java","src/main/java/com/azure/ai/agents/models/AzureFunctionBinding.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/AzureFunctionDefinitionDetails.java","src/main/java/com/azure/ai/agents/models/AzureFunctionStorageQueue.java","src/main/java/com/azure/ai/agents/models/AzureFunctionTool.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCall.java","src/main/java/com/azure/ai/agents/models/AzureFunctionToolCallOutput.java","src/main/java/com/azure/ai/agents/models/AzureUserSecurityContext.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCall.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BingCustomSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/BingGroundingSearchToolParameters.java","src/main/java/com/azure/ai/agents/models/BingGroundingTool.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/BingGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BotServiceAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceRbacAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BotServiceTenantAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationTool.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCall.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolCallOutput.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolConnectionParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolParameters.java","src/main/java/com/azure/ai/agents/models/BrowserAutomationToolboxTool.java","src/main/java/com/azure/ai/agents/models/CallableToolAllowedCaller.java","src/main/java/com/azure/ai/agents/models/CaptureStructuredOutputsTool.java","src/main/java/com/azure/ai/agents/models/ChatSummaryMemoryItem.java","src/main/java/com/azure/ai/agents/models/CodeConfiguration.java","src/main/java/com/azure/ai/agents/models/CodeDependencyResolution.java","src/main/java/com/azure/ai/agents/models/CodeFileDetails.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterTool.java","src/main/java/com/azure/ai/agents/models/CodeInterpreterToolboxTool.java","src/main/java/com/azure/ai/agents/models/ComputerEnvironment.java","src/main/java/com/azure/ai/agents/models/ComputerTool.java","src/main/java/com/azure/ai/agents/models/ComputerUsePreviewTool.java","src/main/java/com/azure/ai/agents/models/ContainerAutoParameter.java","src/main/java/com/azure/ai/agents/models/ContainerConfiguration.java","src/main/java/com/azure/ai/agents/models/ContainerMemoryLimit.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyAllowlistParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDisabledParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyDomainSecretParameter.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParamType.java","src/main/java/com/azure/ai/agents/models/ContainerNetworkPolicyParameter.java","src/main/java/com/azure/ai/agents/models/ContainerSkill.java","src/main/java/com/azure/ai/agents/models/ContainerSkillType.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeContent.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionFromCodeMetadata.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionInput.java","src/main/java/com/azure/ai/agents/models/CreateAgentVersionOptions.java","src/main/java/com/azure/ai/agents/models/CreateTeamsPhoneExtensibilityTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CreateTelephonyCallJobInput.java","src/main/java/com/azure/ai/agents/models/CreateTwilioTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/CustomGrammarFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomTextFormatParameter.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormat.java","src/main/java/com/azure/ai/agents/models/CustomToolParamFormatType.java","src/main/java/com/azure/ai/agents/models/CustomToolParameter.java","src/main/java/com/azure/ai/agents/models/DigitalWorkerType.java","src/main/java/com/azure/ai/agents/models/EntraAuthorizationScheme.java","src/main/java/com/azure/ai/agents/models/EvaluationAzureStandardVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationModelConfiguration.java","src/main/java/com/azure/ai/agents/models/EvaluationVoiceModelConfiguration.java","src/main/java/com/azure/ai/agents/models/ExternalAgentDefinition.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCall.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolCallOutput.java","src/main/java/com/azure/ai/agents/models/FabricDataAgentToolParameters.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/FabricIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/FileSearchTool.java","src/main/java/com/azure/ai/agents/models/FileSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/FixedRatioVersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironment.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParamEnvironmentType.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentContainerReferenceParameter.java","src/main/java/com/azure/ai/agents/models/FunctionShellToolParameterEnvironmentLocalEnvironmentParameter.java","src/main/java/com/azure/ai/agents/models/FunctionTool.java","src/main/java/com/azure/ai/agents/models/GetMicrosoft365AppPackageOptions.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotBuiltInTool.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotHarness.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetDefaultConfig.java","src/main/java/com/azure/ai/agents/models/GitHubCopilotToolsetPreview.java","src/main/java/com/azure/ai/agents/models/GrammarSyntax.java","src/main/java/com/azure/ai/agents/models/HeaderTelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java","src/main/java/com/azure/ai/agents/models/HybridSearchOptions.java","src/main/java/com/azure/ai/agents/models/ImageGenActionEnum.java","src/main/java/com/azure/ai/agents/models/ImageGenTool.java","src/main/java/com/azure/ai/agents/models/ImageGenToolBackground.java","src/main/java/com/azure/ai/agents/models/ImageGenToolInputImageMask.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModel.java","src/main/java/com/azure/ai/agents/models/ImageGenToolModeration.java","src/main/java/com/azure/ai/agents/models/ImageGenToolOutputFormat.java","src/main/java/com/azure/ai/agents/models/ImageGenToolQuality.java","src/main/java/com/azure/ai/agents/models/ImageGenToolSize.java","src/main/java/com/azure/ai/agents/models/IncludeEnum.java","src/main/java/com/azure/ai/agents/models/InlineSkillParameter.java","src/main/java/com/azure/ai/agents/models/InlineSkillSourceParameter.java","src/main/java/com/azure/ai/agents/models/InputFidelity.java","src/main/java/com/azure/ai/agents/models/InvocationsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/InvocationsWsProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/JobStatus.java","src/main/java/com/azure/ai/agents/models/ListMemoriesOptions.java","src/main/java/com/azure/ai/agents/models/LocalShellToolParameter.java","src/main/java/com/azure/ai/agents/models/LocalSkillParameter.java","src/main/java/com/azure/ai/agents/models/ManagedAgentIdentityBlueprintReference.java","src/main/java/com/azure/ai/agents/models/McpListToolsTool.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolAnnotations.java","src/main/java/com/azure/ai/agents/models/McpListToolsToolInputSchema.java","src/main/java/com/azure/ai/agents/models/McpProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/McpTool.java","src/main/java/com/azure/ai/agents/models/McpToolConnectorId.java","src/main/java/com/azure/ai/agents/models/McpToolFilter.java","src/main/java/com/azure/ai/agents/models/McpToolRequireApproval.java","src/main/java/com/azure/ai/agents/models/McpToolboxTool.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryCommandToolCallOutput.java","src/main/java/com/azure/ai/agents/models/MemoryItem.java","src/main/java/com/azure/ai/agents/models/MemoryItemKind.java","src/main/java/com/azure/ai/agents/models/MemoryOperation.java","src/main/java/com/azure/ai/agents/models/MemoryOperationKind.java","src/main/java/com/azure/ai/agents/models/MemorySearchItem.java","src/main/java/com/azure/ai/agents/models/MemorySearchOptions.java","src/main/java/com/azure/ai/agents/models/MemorySearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/MemorySearchToolCall.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefaultOptions.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDefinition.java","src/main/java/com/azure/ai/agents/models/MemoryStoreDetails.java","src/main/java/com/azure/ai/agents/models/MemoryStoreKind.java","src/main/java/com/azure/ai/agents/models/MemoryStoreObjectType.java","src/main/java/com/azure/ai/agents/models/MemoryStoreOperationUsage.java","src/main/java/com/azure/ai/agents/models/MemoryStoreSearchResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateCompletedResult.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateResponse.java","src/main/java/com/azure/ai/agents/models/MemoryStoreUpdateStatus.java","src/main/java/com/azure/ai/agents/models/Microsoft365PermissionScopes.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishDefaults.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishResult.java","src/main/java/com/azure/ai/agents/models/Microsoft365PublishScope.java","src/main/java/com/azure/ai/agents/models/MicrosoftCopilotBuiltInTool.java","src/main/java/com/azure/ai/agents/models/MicrosoftCopilotHarness.java","src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetConfiguration.java","src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetDefaultConfiguration.java","src/main/java/com/azure/ai/agents/models/MicrosoftCopilotToolsetPreview.java","src/main/java/com/azure/ai/agents/models/MicrosoftFabricPreviewTool.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttempt.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptError.java","src/main/java/com/azure/ai/agents/models/ModelRouterAttemptResult.java","src/main/java/com/azure/ai/agents/models/ModelRouterDetails.java","src/main/java/com/azure/ai/agents/models/ModelRouterMode.java","src/main/java/com/azure/ai/agents/models/ModelSamplingParameters.java","src/main/java/com/azure/ai/agents/models/ModelSelectionDetails.java","src/main/java/com/azure/ai/agents/models/NamespaceTool.java","src/main/java/com/azure/ai/agents/models/OpenApiAnonymousAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiAuthType.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinition.java","src/main/java/com/azure/ai/agents/models/OpenApiFunctionDefinitionFunction.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiManagedSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionAuthDetails.java","src/main/java/com/azure/ai/agents/models/OpenApiProjectConnectionSecurityScheme.java","src/main/java/com/azure/ai/agents/models/OpenApiTool.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCall.java","src/main/java/com/azure/ai/agents/models/OpenApiToolCallOutput.java","src/main/java/com/azure/ai/agents/models/OpenApiToolboxTool.java","src/main/java/com/azure/ai/agents/models/OptimizationContext.java","src/main/java/com/azure/ai/agents/models/OptimizationContextType.java","src/main/java/com/azure/ai/agents/models/OtlpTelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/PageOrder.java","src/main/java/com/azure/ai/agents/models/ProceduralMemoryItem.java","src/main/java/com/azure/ai/agents/models/ProgrammaticToolCallingParameter.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinition.java","src/main/java/com/azure/ai/agents/models/PromptAgentDefinitionTextOptions.java","src/main/java/com/azure/ai/agents/models/PromptOptimizationConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/ProtocolVersionRecord.java","src/main/java/com/azure/ai/agents/models/PstnTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/PublishAgentToMicrosoft365Options.java","src/main/java/com/azure/ai/agents/models/PublishApprovalStatus.java","src/main/java/com/azure/ai/agents/models/RaiConfig.java","src/main/java/com/azure/ai/agents/models/RaiInvocationContentType.java","src/main/java/com/azure/ai/agents/models/RaiInvocationModeration.java","src/main/java/com/azure/ai/agents/models/RaiInvocationResponseMode.java","src/main/java/com/azure/ai/agents/models/RaiSseTextSelector.java","src/main/java/com/azure/ai/agents/models/RankerVersionType.java","src/main/java/com/azure/ai/agents/models/RankingOptions.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeAudioFormatType.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeClientEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItem.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemAssistantMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeleteEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDeletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCall.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemFunctionCallOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemInputAudioTranscriptionSegmentEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemMessageType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemObjectType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrieveEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemRetrievedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemSystemMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemTruncatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemType.java","src/main/java/com/azure/ai/agents/models/RealtimeConversationItemUserMessage.java","src/main/java/com/azure/ai/agents/models/RealtimeErrorEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferAppendEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommitEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferCommittedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferDtmfReceivedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferSpeechStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeInputAudioBufferTimeoutTriggeredEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalInput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpApprovalOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpErrorType.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpHttpError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListTools.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpListToolsInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpProtocolError.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolCall.java","src/main/java/com/azure/ai/agents/models/RealtimeMcpToolExecutionError.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferClearedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStartedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeOutputAudioBufferStoppedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimePcmAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmaAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimePcmuAudioFormat.java","src/main/java/com/azure/ai/agents/models/RealtimeRateLimitsUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseAudioTranscriptDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCancelEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPart.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseContentPartDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseFunctionCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallArgumentsDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallCompletedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallFailedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseMcpCallInProgressEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemAddedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseOutputItemDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDeltaEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeResponseTextDoneEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeServerEventType.java","src/main/java/com/azure/ai/agents/models/RealtimeServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionAudioOutput.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionConfigurationBase.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreateRequestGAAudioOutputVoice.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionCreatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionTracingConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionType.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdateEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeSessionUpdatedEvent.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionAudioInput.java","src/main/java/com/azure/ai/agents/models/RealtimeTranscriptionSessionConfiguration.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetection.java","src/main/java/com/azure/ai/agents/models/RealtimeTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/ReminderPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ResponseFormatJsonSchemaInner.java","src/main/java/com/azure/ai/agents/models/ResponseUsageInputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponseUsageOutputTokensDetails.java","src/main/java/com/azure/ai/agents/models/ResponsesProtocolConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingConfiguration.java","src/main/java/com/azure/ai/agents/models/RoutingTraceEntry.java","src/main/java/com/azure/ai/agents/models/SearchContentType.java","src/main/java/com/azure/ai/agents/models/SearchContextSize.java","src/main/java/com/azure/ai/agents/models/SessionAffinityConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDecision.java","src/main/java/com/azure/ai/agents/models/SessionAffinityDetails.java","src/main/java/com/azure/ai/agents/models/SessionAffinityMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinityRequestMode.java","src/main/java/com/azure/ai/agents/models/SessionAffinitySource.java","src/main/java/com/azure/ai/agents/models/SessionConfiguration.java","src/main/java/com/azure/ai/agents/models/SessionDirectoryEntry.java","src/main/java/com/azure/ai/agents/models/SessionFileWriteResult.java","src/main/java/com/azure/ai/agents/models/SessionLogEvent.java","src/main/java/com/azure/ai/agents/models/SessionLogEventType.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCall.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolCallOutput.java","src/main/java/com/azure/ai/agents/models/SharepointGroundingToolParameters.java","src/main/java/com/azure/ai/agents/models/SharepointPreviewTool.java","src/main/java/com/azure/ai/agents/models/ShellToolboxTool.java","src/main/java/com/azure/ai/agents/models/SipTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/SkillReference.java","src/main/java/com/azure/ai/agents/models/SkillReferenceParameter.java","src/main/java/com/azure/ai/agents/models/SteeringPromptOptimizationContext.java","src/main/java/com/azure/ai/agents/models/StructuredInputDefinition.java","src/main/java/com/azure/ai/agents/models/StructuredOutputDefinition.java","src/main/java/com/azure/ai/agents/models/TargetAttribute.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TeamsPhoneExtensibilityTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TeamsTelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelemetryConfig.java","src/main/java/com/azure/ai/agents/models/TelemetryDataKind.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpoint.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuth.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointAuthType.java","src/main/java/com/azure/ai/agents/models/TelemetryEndpointKind.java","src/main/java/com/azure/ai/agents/models/TelemetryTransportProtocol.java","src/main/java/com/azure/ai/agents/models/TelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/TelephonyBindingStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallDurationBasis.java","src/main/java/com/azure/ai/agents/models/TelephonyCallEndReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJob.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobCancellation.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobSchedule.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallJobTerminalReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEvent.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventName.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventOutcome.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventReason.java","src/main/java/com/azure/ai/agents/models/TelephonyCallLifecycleEventSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallPhase.java","src/main/java/com/azure/ai/agents/models/TelephonyCallRecord.java","src/main/java/com/azure/ai/agents/models/TelephonyCallStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyCallSummary.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTimestampSource.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTiming.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTrace.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceMode.java","src/main/java/com/azure/ai/agents/models/TelephonyCallTraceStatus.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundDestinationType.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundFixedIntervalRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicy.java","src/main/java/com/azure/ai/agents/models/TelephonyOutboundRetryPolicyType.java","src/main/java/com/azure/ai/agents/models/TelephonyProvider.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestination.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferDestinationKind.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTarget.java","src/main/java/com/azure/ai/agents/models/TelephonyTransferTargets.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfiguration.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatJsonObject.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationResponseFormatText.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatConfigurationType.java","src/main/java/com/azure/ai/agents/models/TextResponseFormatJsonSchema.java","src/main/java/com/azure/ai/agents/models/Tool.java","src/main/java/com/azure/ai/agents/models/ToolCallStatus.java","src/main/java/com/azure/ai/agents/models/ToolConfig.java","src/main/java/com/azure/ai/agents/models/ToolProjectConnection.java","src/main/java/com/azure/ai/agents/models/ToolSearchExecutionType.java","src/main/java/com/azure/ai/agents/models/ToolSearchTool.java","src/main/java/com/azure/ai/agents/models/ToolSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxPolicies.java","src/main/java/com/azure/ai/agents/models/ToolboxSearchPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerAutoEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellContainerReferenceEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellEnvironment.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicy.java","src/main/java/com/azure/ai/agents/models/ToolboxShellNetworkPolicyDisabled.java","src/main/java/com/azure/ai/agents/models/ToolboxSkill.java","src/main/java/com/azure/ai/agents/models/ToolboxSkillReference.java","src/main/java/com/azure/ai/agents/models/ToolboxTool.java","src/main/java/com/azure/ai/agents/models/ToolboxToolType.java","src/main/java/com/azure/ai/agents/models/ToolboxVersionDetails.java","src/main/java/com/azure/ai/agents/models/ToolboxVersions.java","src/main/java/com/azure/ai/agents/models/TranscriptTextInputTokenDetails.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsage.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageDuration.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageTokens.java","src/main/java/com/azure/ai/agents/models/TranscriptTextUsageType.java","src/main/java/com/azure/ai/agents/models/TranscriptionLanguage.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBinding.java","src/main/java/com/azure/ai/agents/models/TwilioTelephonyBindingListItem.java","src/main/java/com/azure/ai/agents/models/UpdateAgentDetailsOptions.java","src/main/java/com/azure/ai/agents/models/UpdateTelephonyBindingInput.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffect.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationAudioEffectsConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationDefaultInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationInterruptionConfiguration.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationTestCase.java","src/main/java/com/azure/ai/agents/models/UserConversationSimulationUserBehaviorConfiguration.java","src/main/java/com/azure/ai/agents/models/UserProfileMemoryItem.java","src/main/java/com/azure/ai/agents/models/VersionIndicator.java","src/main/java/com/azure/ai/agents/models/VersionIndicatorType.java","src/main/java/com/azure/ai/agents/models/VersionRefIndicator.java","src/main/java/com/azure/ai/agents/models/VersionSelectionRule.java","src/main/java/com/azure/ai/agents/models/VersionSelector.java","src/main/java/com/azure/ai/agents/models/VersionSelectorType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAnimationOutputType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioInputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioOutputConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAudioTimestampType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarIceServer.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarOutputProtocol.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarScene.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoBackground.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoCrop.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoParameters.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAvatarVideoResolution.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadEnglishTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadMultilingualTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentAzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentDefinition.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellation.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEchoCancellationReferenceSource.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndConversationSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceDetectionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentEndOfUtteranceThresholdLevel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentFunctionToolType1.java","src/main/java/com/azure/ai/agents/models/VoiceAgentGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscription.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInputTranscriptionModel.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentInterimResponseTrigger.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmGeneratedGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentLlmInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentMcpTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReduction.java","src/main/java/com/azure/ai/agents/models/VoiceAgentNoiseReductionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRealtimeResponse.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationBlendshapeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAnimationVisemeDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioConfig.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseAudioTimestampDoneEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseCreateOptions.java","src/main/java/com/azure/ai/agents/models/VoiceAgentResponseVideoDeltaEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallErrorEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreateEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentRtcCallSdpCreatedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSemanticVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentServerVadTurnDetection.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarConnectingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToIdleEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionAvatarSwitchToSpeakingEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionIncludeOption.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentAbortedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentCompletedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionSubagentStartedEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSessionUpdateConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentStaticInterimResponseConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagent.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentAbortReason.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSubagentResponsePolicy.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentSystemToolName.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTemplateGreetingConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolResponseScheduling.java","src/main/java/com/azure/ai/agents/models/VoiceAgentToolboxTool.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionPhrase.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTranscriptionWord.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTransport.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionConfiguration.java","src/main/java/com/azure/ai/agents/models/VoiceAgentTurnDetectionType.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningDetails.java","src/main/java/com/azure/ai/agents/models/VoiceAgentWarningEvent.java","src/main/java/com/azure/ai/agents/models/VoiceAudioCodec.java","src/main/java/com/azure/ai/agents/models/VoiceAudioContainerFormat.java","src/main/java/com/azure/ai/agents/models/VoiceAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceAudioRole.java","src/main/java/com/azure/ai/agents/models/VoiceConversation.java","src/main/java/com/azure/ai/agents/models/VoiceConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceConversationStatus.java","src/main/java/com/azure/ai/agents/models/VoiceGeneratedAudioItem.java","src/main/java/com/azure/ai/agents/models/VoiceHostedAgentConversationEngine.java","src/main/java/com/azure/ai/agents/models/VoiceIds.java","src/main/java/com/azure/ai/agents/models/VoiceModelType.java","src/main/java/com/azure/ai/agents/models/VoiceOutputModality.java","src/main/java/com/azure/ai/agents/models/VoiceRecording.java","src/main/java/com/azure/ai/agents/models/VoiceRecordingChannelLayout.java","src/main/java/com/azure/ai/agents/models/VoiceResponse.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudio.java","src/main/java/com/azure/ai/agents/models/VoiceResponseAudioOutput.java","src/main/java/com/azure/ai/agents/models/VoiceResponseObjectType.java","src/main/java/com/azure/ai/agents/models/VoiceType.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WebSearchApproximateLocation.java","src/main/java/com/azure/ai/agents/models/WebSearchConfiguration.java","src/main/java/com/azure/ai/agents/models/WebSearchPreviewTool.java","src/main/java/com/azure/ai/agents/models/WebSearchTool.java","src/main/java/com/azure/ai/agents/models/WebSearchToolFilters.java","src/main/java/com/azure/ai/agents/models/WebSearchToolSearchContextSize.java","src/main/java/com/azure/ai/agents/models/WebSearchToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewTool.java","src/main/java/com/azure/ai/agents/models/WorkIqPreviewToolboxTool.java","src/main/java/com/azure/ai/agents/models/WorkflowAgentDefinition.java","src/main/java/com/azure/ai/agents/models/package-info.java","src/main/java/com/azure/ai/agents/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/voice/VoiceAgentTelephonyLiveTests.java b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/voice/VoiceAgentTelephonyLiveTests.java index cf8ff936f836..d47c877a813b 100644 --- a/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/voice/VoiceAgentTelephonyLiveTests.java +++ b/sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/voice/VoiceAgentTelephonyLiveTests.java @@ -45,6 +45,7 @@ import java.util.Collections; import java.util.List; import java.util.stream.Stream; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; import org.junit.jupiter.params.ParameterizedTest; @@ -105,6 +106,7 @@ protected List getAdditionalTestProxySanitizersToRemove() { */ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("getTestParameters") + @Disabled("TODO: Re-record with MicrosoftCopilot=V1Preview in the Foundry-Features header.") public void bindingLifecycleLive(HttpClient httpClient, AgentsServiceVersion serviceVersion) { Configuration configuration = Configuration.getGlobalConfiguration(); String model = getRecordedModel(configuration); @@ -154,6 +156,7 @@ public void bindingLifecycleLive(HttpClient httpClient, AgentsServiceVersion ser @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("getTestParameters") + @Disabled("TODO: Re-record with MicrosoftCopilot=V1Preview in the Foundry-Features header.") public void twilioBindingAndOutboundCallLive(HttpClient httpClient, AgentsServiceVersion serviceVersion) { Configuration configuration = Configuration.getGlobalConfiguration(); String model = getRecordedModel(configuration); diff --git a/sdk/ai/azure-ai-agents/tsp-location.yaml b/sdk/ai/azure-ai-agents/tsp-location.yaml index cb0f17d78173..cc042d24476e 100644 --- a/sdk/ai/azure-ai-agents/tsp-location.yaml +++ b/sdk/ai/azure-ai-agents/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai-foundry/data-plane/Foundry/src/sdk-java-azure-ai-agents -commit: 5b55ea4d7c1a18676f3f84011aef76f45a535393 +commit: 6cc90ff8fe988069008dcb88f06a75066f830fc2 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/ai-foundry/data-plane/Foundry/src/agents diff --git a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java index 3966dd6bd2df..d313a50f767a 100644 --- a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java +++ b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java @@ -699,37 +699,6 @@ public Mono createSkillVersion(String name) { .map(protocolMethodData -> protocolMethodData.toObject(SkillVersion.class)); } - /** - * Create a skill version from uploaded files - * - * Creates a new version of a skill from uploaded files via multipart form data. - * - * @param name The name of the skill. - * @param content The multipart request content. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific version of a skill on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSkillVersionFromFiles(String name, CreateSkillVersionFromFilesBody content) { - RequestOptions requestOptions = new RequestOptions(); - return createSkillVersionFromFilesWithResponseInternal(name, - new MultipartFormDataHelper(requestOptions) - .serializeFileFields("files", - content.getFiles().stream().map(SkillFileDetails::getContent).collect(Collectors.toList()), - content.getFiles().stream().map(SkillFileDetails::getContentType).collect(Collectors.toList()), - content.getFiles().stream().map(SkillFileDetails::getFilename).collect(Collectors.toList())) - .serializeTextField("default", Objects.toString(content.isDefaultProperty(), null)) - .end() - .getRequestBody(), - requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(SkillVersion.class)); - } - /** * List skill versions * @@ -940,4 +909,37 @@ Mono> createSkillVersionFromFilesWithResponseInternal(Strin // and hence not generated. return this.serviceClient.createSkillVersionFromFilesWithResponseInternalAsync(name, content, requestOptions); } + + /** + * Create a skill version from uploaded files + * + * Creates a new version of a skill from uploaded files via multipart form data. + * + * @param name The name of the skill. + * @param content The multipart request content. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific version of a skill on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSkillVersionFromFiles(String name, CreateSkillVersionFromFilesBody content) { + // Generated convenience method for createSkillVersionFromFilesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return createSkillVersionFromFilesWithResponseInternal(name, + new MultipartFormDataHelper(requestOptions) + .serializeFileFields("files", + content.getFiles().stream().map(SkillFileDetails::getContent).collect(Collectors.toList()), + content.getFiles().stream().map(SkillFileDetails::getContentType).collect(Collectors.toList()), + content.getFiles().stream().map(SkillFileDetails::getFilename).collect(Collectors.toList())) + .serializeTextField("default", Objects.toString(content.isDefaultProperty(), null)) + .end() + .getRequestBody(), + requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(SkillVersion.class)); + } } diff --git a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/BetaSkillsClient.java b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/BetaSkillsClient.java index dd8641a64dec..f1471de01426 100644 --- a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/BetaSkillsClient.java +++ b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/BetaSkillsClient.java @@ -654,36 +654,6 @@ public SkillVersion createSkillVersion(String name) { .toObject(SkillVersion.class); } - /** - * Create a skill version from uploaded files - * - * Creates a new version of a skill from uploaded files via multipart form data. - * - * @param name The name of the skill. - * @param content The multipart request content. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific version of a skill. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SkillVersion createSkillVersionFromFiles(String name, CreateSkillVersionFromFilesBody content) { - RequestOptions requestOptions = new RequestOptions(); - return createSkillVersionFromFilesWithResponseInternal(name, - new MultipartFormDataHelper(requestOptions) - .serializeFileFields("files", - content.getFiles().stream().map(SkillFileDetails::getContent).collect(Collectors.toList()), - content.getFiles().stream().map(SkillFileDetails::getContentType).collect(Collectors.toList()), - content.getFiles().stream().map(SkillFileDetails::getFilename).collect(Collectors.toList())) - .serializeTextField("default", Objects.toString(content.isDefaultProperty(), null)) - .end() - .getRequestBody(), - requestOptions).getValue().toObject(SkillVersion.class); - } - /** * List skill versions * @@ -857,4 +827,36 @@ Response createSkillVersionFromFilesWithResponseInternal(String name // and hence not generated. return this.serviceClient.createSkillVersionFromFilesWithResponseInternal(name, content, requestOptions); } + + /** + * Create a skill version from uploaded files + * + * Creates a new version of a skill from uploaded files via multipart form data. + * + * @param name The name of the skill. + * @param content The multipart request content. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a specific version of a skill. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SkillVersion createSkillVersionFromFiles(String name, CreateSkillVersionFromFilesBody content) { + // Generated convenience method for createSkillVersionFromFilesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return createSkillVersionFromFilesWithResponseInternal(name, + new MultipartFormDataHelper(requestOptions) + .serializeFileFields("files", + content.getFiles().stream().map(SkillFileDetails::getContent).collect(Collectors.toList()), + content.getFiles().stream().map(SkillFileDetails::getContentType).collect(Collectors.toList()), + content.getFiles().stream().map(SkillFileDetails::getFilename).collect(Collectors.toList())) + .serializeTextField("default", Objects.toString(content.isDefaultProperty(), null)) + .end() + .getRequestBody(), + requestOptions).getValue().toObject(SkillVersion.class); + } } diff --git a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java index c3bad634efa7..cae17adb95ed 100644 --- a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java +++ b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java @@ -68,6 +68,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { return jsonWriter.writeEndObject(); } + /** + * Creates an instance of EvaluationDataGenerationJob class. + * + * @param name the name value to set. + * @param sources the sources value to set. + * @param generationConfiguration the generationConfiguration value to set. + */ + @Generated + private EvaluationDataGenerationJob(String name, List sources, + DataGenerationJobConfiguration generationConfiguration) { + super(name, sources, generationConfiguration); + } + /** * Reads an instance of EvaluationDataGenerationJob from the JsonReader. * @@ -77,6 +90,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the EvaluationDataGenerationJob. */ + @Generated public static EvaluationDataGenerationJob fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String id = null; @@ -110,8 +124,10 @@ public static EvaluationDataGenerationJob fromJson(JsonReader jsonReader) throws } else if ("error".equals(fieldName)) { error = ApiError.fromJson(reader); } else if ("finished_at".equals(fieldName)) { - finishedAt = reader.getNullable(nullableReader -> OffsetDateTime - .ofInstant(Instant.ofEpochSecond(nullableReader.getLong()), ZoneOffset.UTC)); + Long finishedAtHolder = reader.getNullable(JsonReader::getLong); + if (finishedAtHolder != null) { + finishedAt = OffsetDateTime.ofInstant(Instant.ofEpochSecond(finishedAtHolder), ZoneOffset.UTC); + } } else if ("scenario".equals(fieldName)) { scenario = DataGenerationJobScenario.fromString(reader.getString()); } else if ("output_configuration".equals(fieldName)) { @@ -133,17 +149,4 @@ public static EvaluationDataGenerationJob fromJson(JsonReader jsonReader) throws return deserializedEvaluationDataGenerationJob; }); } - - /** - * Creates an instance of EvaluationDataGenerationJob class. - * - * @param name the name value to set. - * @param sources the sources value to set. - * @param generationConfiguration the generationConfiguration value to set. - */ - @Generated - private EvaluationDataGenerationJob(String name, List sources, - DataGenerationJobConfiguration generationConfiguration) { - super(name, sources, generationConfiguration); - } } diff --git a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java index 51c51c775f32..2bf14e21dc09 100644 --- a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java +++ b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java @@ -71,6 +71,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { return jsonWriter.writeEndObject(); } + /** + * Creates an instance of ReinforcementFineTuningDataGenerationJob class. + * + * @param name the name value to set. + * @param sources the sources value to set. + * @param generationConfiguration the generationConfiguration value to set. + */ + @Generated + private ReinforcementFineTuningDataGenerationJob(String name, List sources, + DataGenerationJobConfiguration generationConfiguration) { + super(name, sources, generationConfiguration); + } + /** * Reads an instance of ReinforcementFineTuningDataGenerationJob from the JsonReader. * @@ -80,6 +93,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ReinforcementFineTuningDataGenerationJob. */ + @Generated public static ReinforcementFineTuningDataGenerationJob fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String id = null; @@ -113,8 +127,10 @@ public static ReinforcementFineTuningDataGenerationJob fromJson(JsonReader jsonR } else if ("error".equals(fieldName)) { error = ApiError.fromJson(reader); } else if ("finished_at".equals(fieldName)) { - finishedAt = reader.getNullable(nullableReader -> OffsetDateTime - .ofInstant(Instant.ofEpochSecond(nullableReader.getLong()), ZoneOffset.UTC)); + Long finishedAtHolder = reader.getNullable(JsonReader::getLong); + if (finishedAtHolder != null) { + finishedAt = OffsetDateTime.ofInstant(Instant.ofEpochSecond(finishedAtHolder), ZoneOffset.UTC); + } } else if ("scenario".equals(fieldName)) { scenario = DataGenerationJobScenario.fromString(reader.getString()); } else if ("output_configuration".equals(fieldName)) { @@ -136,17 +152,4 @@ public static ReinforcementFineTuningDataGenerationJob fromJson(JsonReader jsonR return deserializedReinforcementFineTuningDataGenerationJob; }); } - - /** - * Creates an instance of ReinforcementFineTuningDataGenerationJob class. - * - * @param name the name value to set. - * @param sources the sources value to set. - * @param generationConfiguration the generationConfiguration value to set. - */ - @Generated - private ReinforcementFineTuningDataGenerationJob(String name, List sources, - DataGenerationJobConfiguration generationConfiguration) { - super(name, sources, generationConfiguration); - } } diff --git a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java index fbf912e3e1d2..23bc84bae95c 100644 --- a/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java +++ b/sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java @@ -71,6 +71,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { return jsonWriter.writeEndObject(); } + /** + * Creates an instance of SupervisedFineTuningDataGenerationJob class. + * + * @param name the name value to set. + * @param sources the sources value to set. + * @param generationConfiguration the generationConfiguration value to set. + */ + @Generated + private SupervisedFineTuningDataGenerationJob(String name, List sources, + DataGenerationJobConfiguration generationConfiguration) { + super(name, sources, generationConfiguration); + } + /** * Reads an instance of SupervisedFineTuningDataGenerationJob from the JsonReader. * @@ -80,6 +93,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the SupervisedFineTuningDataGenerationJob. */ + @Generated public static SupervisedFineTuningDataGenerationJob fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String id = null; @@ -113,8 +127,10 @@ public static SupervisedFineTuningDataGenerationJob fromJson(JsonReader jsonRead } else if ("error".equals(fieldName)) { error = ApiError.fromJson(reader); } else if ("finished_at".equals(fieldName)) { - finishedAt = reader.getNullable(nullableReader -> OffsetDateTime - .ofInstant(Instant.ofEpochSecond(nullableReader.getLong()), ZoneOffset.UTC)); + Long finishedAtHolder = reader.getNullable(JsonReader::getLong); + if (finishedAtHolder != null) { + finishedAt = OffsetDateTime.ofInstant(Instant.ofEpochSecond(finishedAtHolder), ZoneOffset.UTC); + } } else if ("scenario".equals(fieldName)) { scenario = DataGenerationJobScenario.fromString(reader.getString()); } else if ("output_configuration".equals(fieldName)) { @@ -136,17 +152,4 @@ public static SupervisedFineTuningDataGenerationJob fromJson(JsonReader jsonRead return deserializedSupervisedFineTuningDataGenerationJob; }); } - - /** - * Creates an instance of SupervisedFineTuningDataGenerationJob class. - * - * @param name the name value to set. - * @param sources the sources value to set. - * @param generationConfiguration the generationConfiguration value to set. - */ - @Generated - private SupervisedFineTuningDataGenerationJob(String name, List sources, - DataGenerationJobConfiguration generationConfiguration) { - super(name, sources, generationConfiguration); - } } diff --git a/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json b/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json index 3e371f2f1321..bcccc2e53ce3 100644 --- a/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json +++ b/sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"c7aa598dfba9","crossLanguageDefinitions":{"com.azure.ai.projects.AIProjectClientBuilder":"Azure.AI.Projects","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluatorsAsyncClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaInsightsAsyncClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaInsightsClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaModelsAsyncClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsAsyncClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsAsyncClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaRedTeamsAsyncClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRedTeamsClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRoutinesAsyncClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaRoutinesClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaSchedulesAsyncClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesAsyncClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSchedulesClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSkillsAsyncClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsAsyncClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.ConnectionsAsyncClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsAsyncClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.ConnectionsClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.DatasetsAsyncClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsAsyncClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsAsyncClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsAsyncClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsAsyncClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DeploymentsAsyncClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsAsyncClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.DeploymentsClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.EvaluationRulesAsyncClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluationRulesClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluatorsAsyncClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsAsyncClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.IndexesAsyncClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesAsyncClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.IndexesClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.implementation.models.CreateOrUpdateRoutineRequest":"Azure.AI.Projects.createOrUpdateRoutine.Request.anonymous","com.azure.ai.projects.implementation.models.CreateSkillVersionRequest":"Azure.AI.Projects.createSkillVersion.Request.anonymous","com.azure.ai.projects.implementation.models.DispatchRoutineAsyncRequest":"Azure.AI.Projects.dispatchRoutineAsync.Request.anonymous","com.azure.ai.projects.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.projects.implementation.models.UpdateSkillRequest":"Azure.AI.Projects.updateSkill.Request.anonymous","com.azure.ai.projects.models.AIProjectIndex":"Azure.AI.Projects.Index","com.azure.ai.projects.models.AgentClusterInsightRequest":"Azure.AI.Projects.AgentClusterInsightRequest","com.azure.ai.projects.models.AgentClusterInsightResult":"Azure.AI.Projects.AgentClusterInsightResult","com.azure.ai.projects.models.AgentDataGenerationJobSource":"Azure.AI.Projects.AgentDataGenerationJobSource","com.azure.ai.projects.models.AgentEvaluatorGenerationJobSource":"Azure.AI.Projects.AgentEvaluatorGenerationJobSource","com.azure.ai.projects.models.AgentInsight":"Azure.AI.Projects.AgentInsight","com.azure.ai.projects.models.AgentInsightDetails":"Azure.AI.Projects.AgentInsightDetails","com.azure.ai.projects.models.AgentInsightEstimatedCost":"Azure.AI.Projects.AgentInsightEstimatedCost","com.azure.ai.projects.models.AgentInsightHighlightedTrace":"Azure.AI.Projects.AgentInsightHighlightedTrace","com.azure.ai.projects.models.AgentInsightLinkedTrace":"Azure.AI.Projects.AgentInsightLinkedTrace","com.azure.ai.projects.models.AgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitor","com.azure.ai.projects.models.AgentInsightMonitorCreate":"Azure.AI.Projects.AgentInsightMonitorCreate","com.azure.ai.projects.models.AgentInsightMonitorListItem":"Azure.AI.Projects.AgentInsightMonitorListItem","com.azure.ai.projects.models.AgentInsightMonitorUpdate":"Azure.AI.Projects.AgentInsightMonitorUpdate","com.azure.ai.projects.models.AgentInsightOverviewSource":"Azure.AI.Projects.AgentInsightOverviewSource","com.azure.ai.projects.models.AgentInsightPromptSurface":"Azure.AI.Projects.AgentInsightPromptSurface","com.azure.ai.projects.models.AgentInsightProposedFix":"Azure.AI.Projects.AgentInsightProposedFix","com.azure.ai.projects.models.AgentInsightProposedFixChange":"Azure.AI.Projects.AgentInsightProposedFixChange","com.azure.ai.projects.models.AgentInsightProposedFixKind":"Azure.AI.Projects.AgentInsightProposedFixKind","com.azure.ai.projects.models.AgentInsightRecommendedAction":"Azure.AI.Projects.AgentInsightRecommendedAction","com.azure.ai.projects.models.AgentInsightRun":"Azure.AI.Projects.AgentInsightRun","com.azure.ai.projects.models.AgentInsightRunCreate":"Azure.AI.Projects.AgentInsightRunCreate","com.azure.ai.projects.models.AgentInsightRunResult":"Azure.AI.Projects.AgentInsightRunResult","com.azure.ai.projects.models.AgentInsightRunTrigger":"Azure.AI.Projects.AgentInsightRunTrigger","com.azure.ai.projects.models.AgentInsightSeverity":"Azure.AI.Projects.AgentInsightSeverity","com.azure.ai.projects.models.AgentInsightStatus":"Azure.AI.Projects.AgentInsightStatus","com.azure.ai.projects.models.AgentInsightSuspension":"Azure.AI.Projects.AgentInsightSuspension","com.azure.ai.projects.models.AgentInsightTokenUsage":"Azure.AI.Projects.AgentInsightTokenUsage","com.azure.ai.projects.models.AgentInsightUpdate":"Azure.AI.Projects.AgentInsightUpdate","com.azure.ai.projects.models.AgentInsightsOverview":"Azure.AI.Projects.AgentInsightsOverview","com.azure.ai.projects.models.AgentInsightsOverviewOverride":"Azure.AI.Projects.AgentInsightsOverviewOverride","com.azure.ai.projects.models.AgentTaxonomyInput":"Azure.AI.Projects.AgentTaxonomyInput","com.azure.ai.projects.models.AgenticIdentityPreviewCredential":"Azure.AI.Projects.AgenticIdentityPreviewCredentials","com.azure.ai.projects.models.ApiError":"OpenAI.Error","com.azure.ai.projects.models.ApiKeyCredential":"Azure.AI.Projects.ApiKeyCredentials","com.azure.ai.projects.models.ArtifactProfile":"Azure.AI.Projects.ArtifactProfile","com.azure.ai.projects.models.AttackStrategy":"Azure.AI.Projects.AttackStrategy","com.azure.ai.projects.models.AzureAIAgentTarget":"Azure.AI.Projects.AzureAIAgentTarget","com.azure.ai.projects.models.AzureAIModelTarget":"Azure.AI.Projects.AzureAIModelTarget","com.azure.ai.projects.models.AzureAISearchIndex":"Azure.AI.Projects.AzureAISearchIndex","com.azure.ai.projects.models.AzureOpenAIModelConfiguration":"Azure.AI.Projects.AzureOpenAIModelConfiguration","com.azure.ai.projects.models.BaseCredential":"Azure.AI.Projects.BaseCredentials","com.azure.ai.projects.models.BlobReference":"Azure.AI.Projects.BlobReference","com.azure.ai.projects.models.BlobReferenceSasCredential":"Azure.AI.Projects.SasCredential","com.azure.ai.projects.models.ChartCoordinate":"Azure.AI.Projects.ChartCoordinate","com.azure.ai.projects.models.ClusterInsightResult":"Azure.AI.Projects.ClusterInsightResult","com.azure.ai.projects.models.ClusterTokenUsage":"Azure.AI.Projects.ClusterTokenUsage","com.azure.ai.projects.models.CodeBasedEvaluatorDefinition":"Azure.AI.Projects.CodeBasedEvaluatorDefinition","com.azure.ai.projects.models.Connection":"Azure.AI.Projects.Connection","com.azure.ai.projects.models.ConnectionType":"Azure.AI.Projects.ConnectionType","com.azure.ai.projects.models.ContinuousEvaluationRuleAction":"Azure.AI.Projects.ContinuousEvaluationRuleAction","com.azure.ai.projects.models.CosmosDBIndex":"Azure.AI.Projects.CosmosDBIndex","com.azure.ai.projects.models.CreateAsyncResponse":"Azure.AI.Projects.createAsync.Response.anonymous","com.azure.ai.projects.models.CreateSkillVersionFromFilesBody":"Azure.AI.Projects.CreateSkillVersionFromFilesBody","com.azure.ai.projects.models.CredentialType":"Azure.AI.Projects.CredentialType","com.azure.ai.projects.models.CronTrigger":"Azure.AI.Projects.CronTrigger","com.azure.ai.projects.models.CustomCredential":"Azure.AI.Projects.CustomCredential","com.azure.ai.projects.models.CustomRoutineTrigger":"Azure.AI.Projects.CustomRoutineTrigger","com.azure.ai.projects.models.DailyRecurrenceSchedule":"Azure.AI.Projects.DailyRecurrenceSchedule","com.azure.ai.projects.models.DataGenerationJob":"Azure.AI.Projects.DataGenerationJob","com.azure.ai.projects.models.DataGenerationJobConfiguration":"Azure.AI.Projects.DataGenerationJobConfiguration","com.azure.ai.projects.models.DataGenerationJobInputs":"Azure.AI.Projects.DataGenerationJobInputs","com.azure.ai.projects.models.DataGenerationJobOutput":"Azure.AI.Projects.DataGenerationJobOutput","com.azure.ai.projects.models.DataGenerationJobOutputType":"Azure.AI.Projects.DataGenerationJobOutputType","com.azure.ai.projects.models.DataGenerationJobOutputWriteMode":"Azure.AI.Projects.DataGenerationJobOutputWriteMode","com.azure.ai.projects.models.DataGenerationJobResult":"Azure.AI.Projects.DataGenerationJobResult","com.azure.ai.projects.models.DataGenerationJobScenario":"Azure.AI.Projects.DataGenerationJobScenario","com.azure.ai.projects.models.DataGenerationJobSource":"Azure.AI.Projects.DataGenerationJobSource","com.azure.ai.projects.models.DataGenerationJobSourceType":"Azure.AI.Projects.DataGenerationJobSourceType","com.azure.ai.projects.models.DataGenerationJobType":"Azure.AI.Projects.DataGenerationJobType","com.azure.ai.projects.models.DataGenerationModelOptions":"Azure.AI.Projects.DataGenerationModelOptions","com.azure.ai.projects.models.DataGenerationTokenUsage":"Azure.AI.Projects.DataGenerationTokenUsage","com.azure.ai.projects.models.DatasetCredential":"Azure.AI.Projects.AssetCredentialResponse","com.azure.ai.projects.models.DatasetDataGenerationJobOutput":"Azure.AI.Projects.DatasetDataGenerationJobOutput","com.azure.ai.projects.models.DatasetEvaluatorGenerationJobSource":"Azure.AI.Projects.DatasetEvaluatorGenerationJobSource","com.azure.ai.projects.models.DatasetReference":"Azure.AI.Projects.DatasetReference","com.azure.ai.projects.models.DatasetType":"Azure.AI.Projects.DatasetType","com.azure.ai.projects.models.DatasetVersion":"Azure.AI.Projects.DatasetVersion","com.azure.ai.projects.models.Deployment":"Azure.AI.Projects.Deployment","com.azure.ai.projects.models.DeploymentType":"Azure.AI.Projects.DeploymentType","com.azure.ai.projects.models.Dimension":"Azure.AI.Projects.Dimension","com.azure.ai.projects.models.DispatchRoutineResult":"Azure.AI.Projects.DispatchRoutineResponse","com.azure.ai.projects.models.EmbeddingConfiguration":"Azure.AI.Projects.EmbeddingConfiguration","com.azure.ai.projects.models.EndpointBasedEvaluatorDefinition":"Azure.AI.Projects.EndpointBasedEvaluatorDefinition","com.azure.ai.projects.models.EntraIdCredential":"Azure.AI.Projects.EntraIDCredentials","com.azure.ai.projects.models.EvaluationComparisonInsightRequest":"Azure.AI.Projects.EvaluationComparisonInsightRequest","com.azure.ai.projects.models.EvaluationComparisonInsightResult":"Azure.AI.Projects.EvaluationComparisonInsightResult","com.azure.ai.projects.models.EvaluationDataGenerationJob":"Azure.AI.Projects.EvaluationDataGenerationJob","com.azure.ai.projects.models.EvaluationDataGenerationJobInputs":"Azure.AI.Projects.EvaluationDataGenerationJobInputs","com.azure.ai.projects.models.EvaluationDataGenerationJobOutputConfiguration":"Azure.AI.Projects.EvaluationDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.EvaluationLevel":"Azure.AI.Projects.EvaluationLevel","com.azure.ai.projects.models.EvaluationResult":"Azure.AI.Projects.EvalResult","com.azure.ai.projects.models.EvaluationResultSample":"Azure.AI.Projects.EvaluationResultSample","com.azure.ai.projects.models.EvaluationRule":"Azure.AI.Projects.EvaluationRule","com.azure.ai.projects.models.EvaluationRuleAction":"Azure.AI.Projects.EvaluationRuleAction","com.azure.ai.projects.models.EvaluationRuleActionType":"Azure.AI.Projects.EvaluationRuleActionType","com.azure.ai.projects.models.EvaluationRuleEventType":"Azure.AI.Projects.EvaluationRuleEventType","com.azure.ai.projects.models.EvaluationRuleFilter":"Azure.AI.Projects.EvaluationRuleFilter","com.azure.ai.projects.models.EvaluationRunClusterInsightRequest":"Azure.AI.Projects.EvaluationRunClusterInsightRequest","com.azure.ai.projects.models.EvaluationRunClusterInsightResult":"Azure.AI.Projects.EvaluationRunClusterInsightResult","com.azure.ai.projects.models.EvaluationRunResultCompareItem":"Azure.AI.Projects.EvalRunResultCompareItem","com.azure.ai.projects.models.EvaluationRunResultComparison":"Azure.AI.Projects.EvalRunResultComparison","com.azure.ai.projects.models.EvaluationRunResultSummary":"Azure.AI.Projects.EvalRunResultSummary","com.azure.ai.projects.models.EvaluationScheduleTask":"Azure.AI.Projects.EvaluationScheduleTask","com.azure.ai.projects.models.EvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomy","com.azure.ai.projects.models.EvaluationTaxonomyInput":"Azure.AI.Projects.EvaluationTaxonomyInput","com.azure.ai.projects.models.EvaluationTaxonomyInputType":"Azure.AI.Projects.EvaluationTaxonomyInputType","com.azure.ai.projects.models.EvaluatorCategory":"Azure.AI.Projects.EvaluatorCategory","com.azure.ai.projects.models.EvaluatorCredentialInput":"Azure.AI.Projects.EvaluatorCredentialRequest","com.azure.ai.projects.models.EvaluatorDefinition":"Azure.AI.Projects.EvaluatorDefinition","com.azure.ai.projects.models.EvaluatorDefinitionType":"Azure.AI.Projects.EvaluatorDefinitionType","com.azure.ai.projects.models.EvaluatorGenerationArtifacts":"Azure.AI.Projects.EvaluatorGenerationArtifacts","com.azure.ai.projects.models.EvaluatorGenerationInputs":"Azure.AI.Projects.EvaluatorGenerationInputs","com.azure.ai.projects.models.EvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJob","com.azure.ai.projects.models.EvaluatorGenerationJobSource":"Azure.AI.Projects.EvaluatorGenerationJobSource","com.azure.ai.projects.models.EvaluatorGenerationJobSourceType":"Azure.AI.Projects.EvaluatorGenerationJobSourceType","com.azure.ai.projects.models.EvaluatorGenerationTokenUsage":"Azure.AI.Projects.EvaluatorGenerationTokenUsage","com.azure.ai.projects.models.EvaluatorMetric":"Azure.AI.Projects.EvaluatorMetric","com.azure.ai.projects.models.EvaluatorMetricDirection":"Azure.AI.Projects.EvaluatorMetricDirection","com.azure.ai.projects.models.EvaluatorMetricType":"Azure.AI.Projects.EvaluatorMetricType","com.azure.ai.projects.models.EvaluatorType":"Azure.AI.Projects.EvaluatorType","com.azure.ai.projects.models.EvaluatorVersion":"Azure.AI.Projects.EvaluatorVersion","com.azure.ai.projects.models.FieldMapping":"Azure.AI.Projects.FieldMapping","com.azure.ai.projects.models.FileDataGenerationJobOutput":"Azure.AI.Projects.FileDataGenerationJobOutput","com.azure.ai.projects.models.FileDataGenerationJobSource":"Azure.AI.Projects.FileDataGenerationJobSource","com.azure.ai.projects.models.FileDatasetVersion":"Azure.AI.Projects.FileDatasetVersion","com.azure.ai.projects.models.FolderDatasetVersion":"Azure.AI.Projects.FolderDatasetVersion","com.azure.ai.projects.models.FoundryModelArtifactProfileCategory":"Azure.AI.Projects.FoundryModelArtifactProfileCategory","com.azure.ai.projects.models.FoundryModelArtifactProfileSignal":"Azure.AI.Projects.FoundryModelArtifactProfileSignal","com.azure.ai.projects.models.FoundryModelSourceType":"Azure.AI.Projects.FoundryModelSourceType","com.azure.ai.projects.models.FoundryModelWarning":"Azure.AI.Projects.FoundryModelWarning","com.azure.ai.projects.models.FoundryModelWarningCode":"Azure.AI.Projects.FoundryModelWarningCode","com.azure.ai.projects.models.FoundryModelWeightType":"Azure.AI.Projects.FoundryModelWeightType","com.azure.ai.projects.models.GenerationWarningType":"Azure.AI.Projects.GenerationWarningType","com.azure.ai.projects.models.GitHubIssueEvent":"Azure.AI.Projects.GitHubIssueEvent","com.azure.ai.projects.models.GitHubIssueRoutineTrigger":"Azure.AI.Projects.GitHubIssueRoutineTrigger","com.azure.ai.projects.models.GraderAzureAIEvaluator":"Azure.AI.Projects.GraderAzureAIEvaluator","com.azure.ai.projects.models.HourlyRecurrenceSchedule":"Azure.AI.Projects.HourlyRecurrenceSchedule","com.azure.ai.projects.models.HumanEvaluationPreviewRuleAction":"Azure.AI.Projects.HumanEvaluationPreviewRuleAction","com.azure.ai.projects.models.IndexType":"Azure.AI.Projects.IndexType","com.azure.ai.projects.models.Insight":"Azure.AI.Projects.Insight","com.azure.ai.projects.models.InsightCluster":"Azure.AI.Projects.InsightCluster","com.azure.ai.projects.models.InsightModelConfiguration":"Azure.AI.Projects.InsightModelConfiguration","com.azure.ai.projects.models.InsightRequest":"Azure.AI.Projects.InsightRequest","com.azure.ai.projects.models.InsightResult":"Azure.AI.Projects.InsightResult","com.azure.ai.projects.models.InsightSample":"Azure.AI.Projects.InsightSample","com.azure.ai.projects.models.InsightScheduleTask":"Azure.AI.Projects.InsightScheduleTask","com.azure.ai.projects.models.InsightSummary":"Azure.AI.Projects.InsightSummary","com.azure.ai.projects.models.InsightType":"Azure.AI.Projects.InsightType","com.azure.ai.projects.models.InsightsMetadata":"Azure.AI.Projects.InsightsMetadata","com.azure.ai.projects.models.InvokeAgentInvocationsApiDispatchPayload":"Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentInvocationsApiRoutineAction":"Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction","com.azure.ai.projects.models.InvokeAgentResponsesApiDispatchPayload":"Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentResponsesApiRoutineAction":"Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction","com.azure.ai.projects.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.projects.models.ListVersionsRequestType":"Azure.AI.Projects.listVersions.RequestType.anonymous","com.azure.ai.projects.models.LoraConfig":"Azure.AI.Projects.LoraConfig","com.azure.ai.projects.models.ManagedAzureAISearchIndex":"Azure.AI.Projects.ManagedAzureAISearchIndex","com.azure.ai.projects.models.ModelCredentialInput":"Azure.AI.Projects.ModelCredentialRequest","com.azure.ai.projects.models.ModelDeployment":"Azure.AI.Projects.ModelDeployment","com.azure.ai.projects.models.ModelDeploymentSku":"Azure.AI.Projects.Sku","com.azure.ai.projects.models.ModelPendingUploadInput":"Azure.AI.Projects.ModelPendingUploadRequest","com.azure.ai.projects.models.ModelPendingUploadResult":"Azure.AI.Projects.ModelPendingUploadResponse","com.azure.ai.projects.models.ModelSamplingParams":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.projects.models.ModelSourceData":"Azure.AI.Projects.ModelSourceData","com.azure.ai.projects.models.ModelVersion":"Azure.AI.Projects.ModelVersion","com.azure.ai.projects.models.MonthlyRecurrenceSchedule":"Azure.AI.Projects.MonthlyRecurrenceSchedule","com.azure.ai.projects.models.NoAuthenticationCredential":"Azure.AI.Projects.NoAuthenticationCredentials","com.azure.ai.projects.models.OneTimeTrigger":"Azure.AI.Projects.OneTimeTrigger","com.azure.ai.projects.models.OperationStatus":"Azure.Core.Foundations.OperationState","com.azure.ai.projects.models.PendingUploadRequest":"Azure.AI.Projects.PendingUploadRequest","com.azure.ai.projects.models.PendingUploadResponse":"Azure.AI.Projects.PendingUploadResponse","com.azure.ai.projects.models.PendingUploadType":"Azure.AI.Projects.PendingUploadType","com.azure.ai.projects.models.PromptBasedEvaluatorDefinition":"Azure.AI.Projects.PromptBasedEvaluatorDefinition","com.azure.ai.projects.models.PromptDataGenerationJobSource":"Azure.AI.Projects.PromptDataGenerationJobSource","com.azure.ai.projects.models.PromptEvaluatorGenerationJobSource":"Azure.AI.Projects.PromptEvaluatorGenerationJobSource","com.azure.ai.projects.models.RecurrenceSchedule":"Azure.AI.Projects.RecurrenceSchedule","com.azure.ai.projects.models.RecurrenceTrigger":"Azure.AI.Projects.RecurrenceTrigger","com.azure.ai.projects.models.RecurrenceType":"Azure.AI.Projects.RecurrenceType","com.azure.ai.projects.models.RedTeam":"Azure.AI.Projects.RedTeam","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJob":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJob","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobInputs":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.RiskCategory":"Azure.AI.Projects.RiskCategory","com.azure.ai.projects.models.Routine":"Azure.AI.Projects.Routine","com.azure.ai.projects.models.RoutineAction":"Azure.AI.Projects.RoutineAction","com.azure.ai.projects.models.RoutineActionType":"Azure.AI.Projects.RoutineActionType","com.azure.ai.projects.models.RoutineAttemptSource":"Azure.AI.Projects.RoutineAttemptSource","com.azure.ai.projects.models.RoutineAuthorization":"Azure.AI.Projects.RoutineAuthorization","com.azure.ai.projects.models.RoutineDispatchIdentity":"Azure.AI.Projects.RoutineDispatchIdentity","com.azure.ai.projects.models.RoutineDispatchPayload":"Azure.AI.Projects.RoutineDispatchPayload","com.azure.ai.projects.models.RoutineDispatchPayloadType":"Azure.AI.Projects.RoutineDispatchPayloadType","com.azure.ai.projects.models.RoutineRun":"Azure.AI.Projects.RoutineRun","com.azure.ai.projects.models.RoutineRunPhase":"Azure.AI.Projects.RoutineRunPhase","com.azure.ai.projects.models.RoutineTrigger":"Azure.AI.Projects.RoutineTrigger","com.azure.ai.projects.models.RoutineTriggerType":"Azure.AI.Projects.RoutineTriggerType","com.azure.ai.projects.models.RubricBasedEvaluatorDefinition":"Azure.AI.Projects.RubricBasedEvaluatorDefinition","com.azure.ai.projects.models.RubricGenerationInputQualityWarning":"Azure.AI.Projects.RubricGenerationInputQualityWarning","com.azure.ai.projects.models.RubricGenerationInputQualityWarningCode":"Azure.AI.Projects.RubricGenerationInputQualityWarningCode","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSeverity":"Azure.AI.Projects.RubricGenerationInputQualityWarningSeverity","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSource":"Azure.AI.Projects.RubricGenerationInputQualityWarningSource","com.azure.ai.projects.models.SampleType":"Azure.AI.Projects.SampleType","com.azure.ai.projects.models.SasCredential":"Azure.AI.Projects.SASCredentials","com.azure.ai.projects.models.Schedule":"Azure.AI.Projects.Schedule","com.azure.ai.projects.models.ScheduleProvisioningStatus":"Azure.AI.Projects.ScheduleProvisioningStatus","com.azure.ai.projects.models.ScheduleRoutineTrigger":"Azure.AI.Projects.ScheduleRoutineTrigger","com.azure.ai.projects.models.ScheduleRun":"Azure.AI.Projects.ScheduleRun","com.azure.ai.projects.models.ScheduleTask":"Azure.AI.Projects.ScheduleTask","com.azure.ai.projects.models.ScheduleTaskType":"Azure.AI.Projects.ScheduleTaskType","com.azure.ai.projects.models.SimpleQnADataGenerationJobConfiguration":"Azure.AI.Projects.SimpleQnADataGenerationJobConfiguration","com.azure.ai.projects.models.SimpleQnAFineTuningQuestionType":"Azure.AI.Projects.SimpleQnAFineTuningQuestionType","com.azure.ai.projects.models.SimulationSeedDataGenerationJobConfiguration":"Azure.AI.Projects.SimulationSeedDataGenerationJobConfiguration","com.azure.ai.projects.models.SkillDetails":"Azure.AI.Projects.Skill","com.azure.ai.projects.models.SkillFileDetails":"TypeSpec.Http.File","com.azure.ai.projects.models.SkillInlineContent":"Azure.AI.Projects.SkillInlineContent","com.azure.ai.projects.models.SkillVersion":"Azure.AI.Projects.SkillVersion","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJob":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJob","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobInputs":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.Target":"Azure.AI.Projects.FoundryEvaluationTarget","com.azure.ai.projects.models.TargetConfig":"Azure.AI.Projects.RedTeamTargetConfig","com.azure.ai.projects.models.TaxonomyCategory":"Azure.AI.Projects.TaxonomyCategory","com.azure.ai.projects.models.TaxonomySubCategory":"Azure.AI.Projects.TaxonomySubCategory","com.azure.ai.projects.models.TestingCriterionAzureAIEvaluator":"Azure.AI.Projects.TestingCriterionAzureAIEvaluator","com.azure.ai.projects.models.TimerRoutineTrigger":"Azure.AI.Projects.TimerRoutineTrigger","com.azure.ai.projects.models.ToolDescription":"Azure.AI.Projects.ToolDescription","com.azure.ai.projects.models.ToolUseFineTuningDataGenerationJobConfiguration":"Azure.AI.Projects.ToolUseFineTuningDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobConfiguration":"Azure.AI.Projects.TracesDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobSource":"Azure.AI.Projects.TracesDataGenerationJobSource","com.azure.ai.projects.models.TracesEvaluatorGenerationJobSource":"Azure.AI.Projects.TracesEvaluatorGenerationJobSource","com.azure.ai.projects.models.TreatmentEffectType":"Azure.AI.Projects.TreatmentEffectType","com.azure.ai.projects.models.Trigger":"Azure.AI.Projects.Trigger","com.azure.ai.projects.models.TriggerType":"Azure.AI.Projects.TriggerType","com.azure.ai.projects.models.UpdateModelVersionInput":"Azure.AI.Projects.UpdateModelVersionRequest","com.azure.ai.projects.models.WeeklyRecurrenceSchedule":"Azure.AI.Projects.WeeklyRecurrenceSchedule"},"generatedFiles":["src/main/java/com/azure/ai/projects/AIProjectClientBuilder.java","src/main/java/com/azure/ai/projects/AIProjectsServiceVersion.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsClient.java","src/main/java/com/azure/ai/projects/BetaInsightsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaInsightsClient.java","src/main/java/com/azure/ai/projects/BetaModelsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaModelsClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesClient.java","src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSkillsClient.java","src/main/java/com/azure/ai/projects/ConnectionsAsyncClient.java","src/main/java/com/azure/ai/projects/ConnectionsClient.java","src/main/java/com/azure/ai/projects/DatasetsAsyncClient.java","src/main/java/com/azure/ai/projects/DatasetsClient.java","src/main/java/com/azure/ai/projects/DeploymentsAsyncClient.java","src/main/java/com/azure/ai/projects/DeploymentsClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesClient.java","src/main/java/com/azure/ai/projects/EvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluatorsClient.java","src/main/java/com/azure/ai/projects/IndexesAsyncClient.java","src/main/java/com/azure/ai/projects/IndexesClient.java","src/main/java/com/azure/ai/projects/implementation/AIProjectClientImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaAgentInsightMonitorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluationTaxonomiesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaInsightsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaModelsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRedTeamsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRoutinesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSchedulesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSkillsImpl.java","src/main/java/com/azure/ai/projects/implementation/ConnectionsImpl.java","src/main/java/com/azure/ai/projects/implementation/DatasetsImpl.java","src/main/java/com/azure/ai/projects/implementation/DeploymentsImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluationRulesImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/IndexesImpl.java","src/main/java/com/azure/ai/projects/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/projects/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/projects/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/PollingUtils.java","src/main/java/com/azure/ai/projects/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/models/CreateOrUpdateRoutineRequest.java","src/main/java/com/azure/ai/projects/implementation/models/CreateSkillVersionRequest.java","src/main/java/com/azure/ai/projects/implementation/models/DispatchRoutineAsyncRequest.java","src/main/java/com/azure/ai/projects/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/projects/implementation/models/UpdateSkillRequest.java","src/main/java/com/azure/ai/projects/implementation/models/package-info.java","src/main/java/com/azure/ai/projects/implementation/package-info.java","src/main/java/com/azure/ai/projects/models/AIProjectIndex.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/AgentDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentInsight.java","src/main/java/com/azure/ai/projects/models/AgentInsightDetails.java","src/main/java/com/azure/ai/projects/models/AgentInsightEstimatedCost.java","src/main/java/com/azure/ai/projects/models/AgentInsightHighlightedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightLinkedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitor.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorListItem.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightOverviewSource.java","src/main/java/com/azure/ai/projects/models/AgentInsightPromptSurface.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFix.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixChange.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixKind.java","src/main/java/com/azure/ai/projects/models/AgentInsightRecommendedAction.java","src/main/java/com/azure/ai/projects/models/AgentInsightRun.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunResult.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunTrigger.java","src/main/java/com/azure/ai/projects/models/AgentInsightSeverity.java","src/main/java/com/azure/ai/projects/models/AgentInsightStatus.java","src/main/java/com/azure/ai/projects/models/AgentInsightSuspension.java","src/main/java/com/azure/ai/projects/models/AgentInsightTokenUsage.java","src/main/java/com/azure/ai/projects/models/AgentInsightUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverview.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverviewOverride.java","src/main/java/com/azure/ai/projects/models/AgentTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/AgenticIdentityPreviewCredential.java","src/main/java/com/azure/ai/projects/models/ApiError.java","src/main/java/com/azure/ai/projects/models/ApiKeyCredential.java","src/main/java/com/azure/ai/projects/models/ArtifactProfile.java","src/main/java/com/azure/ai/projects/models/AttackStrategy.java","src/main/java/com/azure/ai/projects/models/AzureAIAgentTarget.java","src/main/java/com/azure/ai/projects/models/AzureAIModelTarget.java","src/main/java/com/azure/ai/projects/models/AzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/AzureOpenAIModelConfiguration.java","src/main/java/com/azure/ai/projects/models/BaseCredential.java","src/main/java/com/azure/ai/projects/models/BlobReference.java","src/main/java/com/azure/ai/projects/models/BlobReferenceSasCredential.java","src/main/java/com/azure/ai/projects/models/ChartCoordinate.java","src/main/java/com/azure/ai/projects/models/ClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/ClusterTokenUsage.java","src/main/java/com/azure/ai/projects/models/CodeBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/Connection.java","src/main/java/com/azure/ai/projects/models/ConnectionType.java","src/main/java/com/azure/ai/projects/models/ContinuousEvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/CosmosDBIndex.java","src/main/java/com/azure/ai/projects/models/CreateAsyncResponse.java","src/main/java/com/azure/ai/projects/models/CreateSkillVersionFromFilesBody.java","src/main/java/com/azure/ai/projects/models/CredentialType.java","src/main/java/com/azure/ai/projects/models/CronTrigger.java","src/main/java/com/azure/ai/projects/models/CustomCredential.java","src/main/java/com/azure/ai/projects/models/CustomRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/DailyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/DataGenerationJob.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputWriteMode.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobResult.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobScenario.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobType.java","src/main/java/com/azure/ai/projects/models/DataGenerationModelOptions.java","src/main/java/com/azure/ai/projects/models/DataGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/DatasetCredential.java","src/main/java/com/azure/ai/projects/models/DatasetDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DatasetEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DatasetReference.java","src/main/java/com/azure/ai/projects/models/DatasetType.java","src/main/java/com/azure/ai/projects/models/DatasetVersion.java","src/main/java/com/azure/ai/projects/models/Deployment.java","src/main/java/com/azure/ai/projects/models/DeploymentType.java","src/main/java/com/azure/ai/projects/models/Dimension.java","src/main/java/com/azure/ai/projects/models/DispatchRoutineResult.java","src/main/java/com/azure/ai/projects/models/EmbeddingConfiguration.java","src/main/java/com/azure/ai/projects/models/EndpointBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EntraIdCredential.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/EvaluationLevel.java","src/main/java/com/azure/ai/projects/models/EvaluationResult.java","src/main/java/com/azure/ai/projects/models/EvaluationResultSample.java","src/main/java/com/azure/ai/projects/models/EvaluationRule.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleActionType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleEventType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleFilter.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultCompareItem.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultComparison.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultSummary.java","src/main/java/com/azure/ai/projects/models/EvaluationScheduleTask.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomy.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInputType.java","src/main/java/com/azure/ai/projects/models/EvaluatorCategory.java","src/main/java/com/azure/ai/projects/models/EvaluatorCredentialInput.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinitionType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationArtifacts.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationInputs.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetric.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricDirection.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricType.java","src/main/java/com/azure/ai/projects/models/EvaluatorType.java","src/main/java/com/azure/ai/projects/models/EvaluatorVersion.java","src/main/java/com/azure/ai/projects/models/FieldMapping.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/FileDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FolderDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileCategory.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileSignal.java","src/main/java/com/azure/ai/projects/models/FoundryModelSourceType.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarning.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarningCode.java","src/main/java/com/azure/ai/projects/models/FoundryModelWeightType.java","src/main/java/com/azure/ai/projects/models/GenerationWarningType.java","src/main/java/com/azure/ai/projects/models/GitHubIssueEvent.java","src/main/java/com/azure/ai/projects/models/GitHubIssueRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/GraderAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/HourlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/HumanEvaluationPreviewRuleAction.java","src/main/java/com/azure/ai/projects/models/IndexType.java","src/main/java/com/azure/ai/projects/models/Insight.java","src/main/java/com/azure/ai/projects/models/InsightCluster.java","src/main/java/com/azure/ai/projects/models/InsightModelConfiguration.java","src/main/java/com/azure/ai/projects/models/InsightRequest.java","src/main/java/com/azure/ai/projects/models/InsightResult.java","src/main/java/com/azure/ai/projects/models/InsightSample.java","src/main/java/com/azure/ai/projects/models/InsightScheduleTask.java","src/main/java/com/azure/ai/projects/models/InsightSummary.java","src/main/java/com/azure/ai/projects/models/InsightType.java","src/main/java/com/azure/ai/projects/models/InsightsMetadata.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/JobStatus.java","src/main/java/com/azure/ai/projects/models/ListVersionsRequestType.java","src/main/java/com/azure/ai/projects/models/LoraConfig.java","src/main/java/com/azure/ai/projects/models/ManagedAzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/ModelCredentialInput.java","src/main/java/com/azure/ai/projects/models/ModelDeployment.java","src/main/java/com/azure/ai/projects/models/ModelDeploymentSku.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadInput.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadResult.java","src/main/java/com/azure/ai/projects/models/ModelSamplingParams.java","src/main/java/com/azure/ai/projects/models/ModelSourceData.java","src/main/java/com/azure/ai/projects/models/ModelVersion.java","src/main/java/com/azure/ai/projects/models/MonthlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/NoAuthenticationCredential.java","src/main/java/com/azure/ai/projects/models/OneTimeTrigger.java","src/main/java/com/azure/ai/projects/models/OperationStatus.java","src/main/java/com/azure/ai/projects/models/PendingUploadRequest.java","src/main/java/com/azure/ai/projects/models/PendingUploadResponse.java","src/main/java/com/azure/ai/projects/models/PendingUploadType.java","src/main/java/com/azure/ai/projects/models/PromptBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/PromptDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/PromptEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/RecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/RecurrenceTrigger.java","src/main/java/com/azure/ai/projects/models/RecurrenceType.java","src/main/java/com/azure/ai/projects/models/RedTeam.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/RiskCategory.java","src/main/java/com/azure/ai/projects/models/Routine.java","src/main/java/com/azure/ai/projects/models/RoutineAction.java","src/main/java/com/azure/ai/projects/models/RoutineActionType.java","src/main/java/com/azure/ai/projects/models/RoutineAttemptSource.java","src/main/java/com/azure/ai/projects/models/RoutineAuthorization.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchIdentity.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayload.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayloadType.java","src/main/java/com/azure/ai/projects/models/RoutineRun.java","src/main/java/com/azure/ai/projects/models/RoutineRunPhase.java","src/main/java/com/azure/ai/projects/models/RoutineTrigger.java","src/main/java/com/azure/ai/projects/models/RoutineTriggerType.java","src/main/java/com/azure/ai/projects/models/RubricBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarning.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningCode.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSeverity.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSource.java","src/main/java/com/azure/ai/projects/models/SampleType.java","src/main/java/com/azure/ai/projects/models/SasCredential.java","src/main/java/com/azure/ai/projects/models/Schedule.java","src/main/java/com/azure/ai/projects/models/ScheduleProvisioningStatus.java","src/main/java/com/azure/ai/projects/models/ScheduleRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ScheduleRun.java","src/main/java/com/azure/ai/projects/models/ScheduleTask.java","src/main/java/com/azure/ai/projects/models/ScheduleTaskType.java","src/main/java/com/azure/ai/projects/models/SimpleQnADataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SimpleQnAFineTuningQuestionType.java","src/main/java/com/azure/ai/projects/models/SimulationSeedDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SkillDetails.java","src/main/java/com/azure/ai/projects/models/SkillFileDetails.java","src/main/java/com/azure/ai/projects/models/SkillInlineContent.java","src/main/java/com/azure/ai/projects/models/SkillVersion.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/Target.java","src/main/java/com/azure/ai/projects/models/TargetConfig.java","src/main/java/com/azure/ai/projects/models/TaxonomyCategory.java","src/main/java/com/azure/ai/projects/models/TaxonomySubCategory.java","src/main/java/com/azure/ai/projects/models/TestingCriterionAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/TimerRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ToolDescription.java","src/main/java/com/azure/ai/projects/models/ToolUseFineTuningDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TracesEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TreatmentEffectType.java","src/main/java/com/azure/ai/projects/models/Trigger.java","src/main/java/com/azure/ai/projects/models/TriggerType.java","src/main/java/com/azure/ai/projects/models/UpdateModelVersionInput.java","src/main/java/com/azure/ai/projects/models/WeeklyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/package-info.java","src/main/java/com/azure/ai/projects/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Azure.AI.Projects":"v1"},"crossLanguagePackageId":"Azure.AI.Projects","crossLanguageVersion":"88432b851633","crossLanguageDefinitions":{"com.azure.ai.projects.AIProjectClientBuilder":"Azure.AI.Projects","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsAsyncClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient":"Azure.AI.Projects.Beta.AgentInsightMonitors","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.beginCreateAgentInsightRunWithModel":"Azure.AI.Projects.AgentInsightMonitors.createRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.cancelAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.cancelRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.createAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.create","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.deleteAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.delete","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.get","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRun":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightRunWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getRun","com.azure.ai.projects.BetaAgentInsightMonitorsClient.getAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.getInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightMonitors":"Azure.AI.Projects.AgentInsightMonitors.list","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsightRuns":"Azure.AI.Projects.AgentInsightMonitors.listRuns","com.azure.ai.projects.BetaAgentInsightMonitorsClient.listAgentInsights":"Azure.AI.Projects.AgentInsightMonitors.listInsights","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.resetAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.reset","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsight":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightMonitorWithResponse":"Azure.AI.Projects.AgentInsightMonitors.update","com.azure.ai.projects.BetaAgentInsightMonitorsClient.updateAgentInsightWithResponse":"Azure.AI.Projects.AgentInsightMonitors.updateInsight","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesAsyncClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient":"Azure.AI.Projects.Beta.EvaluationTaxonomies","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.createEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.create","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.deleteEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.delete","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.getEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.get","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.listEvaluationTaxonomies":"Azure.AI.Projects.EvaluationTaxonomies.list","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluationTaxonomiesClient.updateEvaluationTaxonomyWithResponse":"Azure.AI.Projects.EvaluationTaxonomies.update","com.azure.ai.projects.BetaEvaluatorsAsyncClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsAsyncClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient":"Azure.AI.Projects.Beta.Evaluators","com.azure.ai.projects.BetaEvaluatorsClient.getCredentials":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.getCredentialsWithResponse":"Azure.AI.Projects.Evaluators.getCredentials","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUpload":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaEvaluatorsClient.startPendingUploadWithResponse":"Azure.AI.Projects.Evaluators.startPendingUpload","com.azure.ai.projects.BetaInsightsAsyncClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsAsyncClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsAsyncClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaInsightsClient":"Azure.AI.Projects.Beta.Insights","com.azure.ai.projects.BetaInsightsClient.generateInsight":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.generateInsightWithResponse":"Azure.AI.Projects.Insights.generate","com.azure.ai.projects.BetaInsightsClient.getInsight":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.getInsightWithResponse":"Azure.AI.Projects.Insights.get","com.azure.ai.projects.BetaInsightsClient.listInsights":"Azure.AI.Projects.Insights.list","com.azure.ai.projects.BetaModelsAsyncClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsAsyncClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsAsyncClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsAsyncClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsAsyncClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient":"Azure.AI.Projects.Beta.Models","com.azure.ai.projects.BetaModelsClient.createModelVersionAsyncWithResponse":"Azure.AI.Projects.Models.createAsync","com.azure.ai.projects.BetaModelsClient.deleteModelVersion":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.deleteModelVersionWithResponse":"Azure.AI.Projects.Models.deleteVersion","com.azure.ai.projects.BetaModelsClient.getModelCredentials":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelCredentialsWithResponse":"Azure.AI.Projects.Models.getCredentials","com.azure.ai.projects.BetaModelsClient.getModelVersion":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.getModelVersionWithResponse":"Azure.AI.Projects.Models.getVersion","com.azure.ai.projects.BetaModelsClient.listLatestModelVersions":"Azure.AI.Projects.Models.listLatest","com.azure.ai.projects.BetaModelsClient.listModelVersions":"Azure.AI.Projects.Models.listVersions","com.azure.ai.projects.BetaModelsClient.startModelPendingUpload":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.startModelPendingUploadWithResponse":"Azure.AI.Projects.Models.startPendingUpload","com.azure.ai.projects.BetaModelsClient.updateModelVersion":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaModelsClient.updateModelVersionWithResponse":"Azure.AI.Projects.Models.createOrUpdateVersion","com.azure.ai.projects.BetaRedTeamsAsyncClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsAsyncClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRedTeamsClient":"Azure.AI.Projects.Beta.RedTeams","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRun":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.createRedTeamRunWithResponse":"Azure.AI.Projects.RedTeams.create","com.azure.ai.projects.BetaRedTeamsClient.getRedTeam":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.getRedTeamWithResponse":"Azure.AI.Projects.RedTeams.get","com.azure.ai.projects.BetaRedTeamsClient.listRedTeams":"Azure.AI.Projects.RedTeams.list","com.azure.ai.projects.BetaRoutinesAsyncClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesAsyncClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaRoutinesClient":"Azure.AI.Projects.Beta.Routines","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutine":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.createOrUpdateRoutineWithResponse":"Azure.AI.Projects.Routines.createOrUpdateRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutine":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.deleteRoutineWithResponse":"Azure.AI.Projects.Routines.deleteRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutine":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.disableRoutineWithResponse":"Azure.AI.Projects.Routines.disableRoutine","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutine":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.dispatchRoutineWithResponse":"Azure.AI.Projects.Routines.dispatchRoutineAsync","com.azure.ai.projects.BetaRoutinesClient.enableRoutine":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.enableRoutineWithResponse":"Azure.AI.Projects.Routines.enableRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutine":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.getRoutineWithResponse":"Azure.AI.Projects.Routines.getRoutine","com.azure.ai.projects.BetaRoutinesClient.listRoutineRuns":"Azure.AI.Projects.Routines.listRoutineRuns","com.azure.ai.projects.BetaRoutinesClient.listRoutines":"Azure.AI.Projects.Routines.listRoutines","com.azure.ai.projects.BetaSchedulesAsyncClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesAsyncClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesAsyncClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesAsyncClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesAsyncClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSchedulesClient":"Azure.AI.Projects.Beta.Schedules","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateSchedule":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.createOrUpdateScheduleWithResponse":"Azure.AI.Projects.Schedules.createOrUpdate","com.azure.ai.projects.BetaSchedulesClient.deleteSchedule":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.deleteScheduleWithResponse":"Azure.AI.Projects.Schedules.delete","com.azure.ai.projects.BetaSchedulesClient.getSchedule":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.getScheduleRun":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleRunWithResponse":"Azure.AI.Projects.Schedules.getRun","com.azure.ai.projects.BetaSchedulesClient.getScheduleWithResponse":"Azure.AI.Projects.Schedules.get","com.azure.ai.projects.BetaSchedulesClient.listScheduleRuns":"Azure.AI.Projects.Schedules.listRuns","com.azure.ai.projects.BetaSchedulesClient.listSchedules":"Azure.AI.Projects.Schedules.list","com.azure.ai.projects.BetaSkillsAsyncClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsAsyncClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsAsyncClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsAsyncClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsAsyncClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsAsyncClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient":"Azure.AI.Projects.Beta.Skills","com.azure.ai.projects.BetaSkillsClient.createSkillVersion":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFiles":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionFromFilesWithResponseInternal":"Azure.AI.Projects.Skills.createSkillVersionFromFiles","com.azure.ai.projects.BetaSkillsClient.createSkillVersionWithResponse":"Azure.AI.Projects.Skills.createSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkill":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.getSkillContent":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillContentWithResponse":"Azure.AI.Projects.Skills.getSkillContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersion":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContent":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionContentWithResponse":"Azure.AI.Projects.Skills.getSkillVersionContent","com.azure.ai.projects.BetaSkillsClient.getSkillVersionWithResponse":"Azure.AI.Projects.Skills.getSkillVersion","com.azure.ai.projects.BetaSkillsClient.getSkillWithResponse":"Azure.AI.Projects.Skills.getSkill","com.azure.ai.projects.BetaSkillsClient.listSkillVersions":"Azure.AI.Projects.Skills.listSkillVersions","com.azure.ai.projects.BetaSkillsClient.listSkills":"Azure.AI.Projects.Skills.listSkills","com.azure.ai.projects.BetaSkillsClient.updateSkill":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.BetaSkillsClient.updateSkillWithResponse":"Azure.AI.Projects.Skills.updateSkill","com.azure.ai.projects.ConnectionsAsyncClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsAsyncClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsAsyncClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsAsyncClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.ConnectionsClient":"Azure.AI.Projects.Connections","com.azure.ai.projects.ConnectionsClient.getConnection":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentials":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithCredentialsWithResponse":"Azure.AI.Projects.Connections.getWithCredentials","com.azure.ai.projects.ConnectionsClient.getConnectionWithResponse":"Azure.AI.Projects.Connections.get","com.azure.ai.projects.ConnectionsClient.listConnections":"Azure.AI.Projects.Connections.list","com.azure.ai.projects.DatasetsAsyncClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsAsyncClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsAsyncClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsAsyncClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsAsyncClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsAsyncClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsAsyncClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient":"Azure.AI.Projects.Datasets","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJob":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.beginCreateGenerationJobWithModel":"Azure.AI.Projects.DataGenerationJobs.create","com.azure.ai.projects.DatasetsClient.cancelGenerationJob":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.cancelGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.cancel","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersion":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.createOrUpdateDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.createOrUpdateVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersion":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.deleteVersion","com.azure.ai.projects.DatasetsClient.deleteGenerationJob":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.deleteGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.delete","com.azure.ai.projects.DatasetsClient.getCredentials":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getCredentialsWithResponse":"Azure.AI.Projects.Datasets.getCredentials","com.azure.ai.projects.DatasetsClient.getDatasetVersion":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getDatasetVersionWithResponse":"Azure.AI.Projects.Datasets.getVersion","com.azure.ai.projects.DatasetsClient.getGenerationJob":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.getGenerationJobWithResponse":"Azure.AI.Projects.DataGenerationJobs.get","com.azure.ai.projects.DatasetsClient.listDatasetVersions":"Azure.AI.Projects.Datasets.listVersions","com.azure.ai.projects.DatasetsClient.listGenerationJobs":"Azure.AI.Projects.DataGenerationJobs.list","com.azure.ai.projects.DatasetsClient.listLatestDatasetVersions":"Azure.AI.Projects.Datasets.listLatest","com.azure.ai.projects.DatasetsClient.pendingUpload":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DatasetsClient.pendingUploadWithResponse":"Azure.AI.Projects.Datasets.startPendingUploadVersion","com.azure.ai.projects.DeploymentsAsyncClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsAsyncClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsAsyncClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.DeploymentsClient":"Azure.AI.Projects.Deployments","com.azure.ai.projects.DeploymentsClient.getDeployment":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.getDeploymentWithResponse":"Azure.AI.Projects.Deployments.get","com.azure.ai.projects.DeploymentsClient.listDeployments":"Azure.AI.Projects.Deployments.list","com.azure.ai.projects.EvaluationRulesAsyncClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesAsyncClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluationRulesClient":"Azure.AI.Projects.EvaluationRules","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRule":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.createOrUpdateEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.createOrUpdate","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRule":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.deleteEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.delete","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRule":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.getEvaluationRuleWithResponse":"Azure.AI.Projects.EvaluationRules.get","com.azure.ai.projects.EvaluationRulesClient.listEvaluationRules":"Azure.AI.Projects.EvaluationRules.list","com.azure.ai.projects.EvaluatorsAsyncClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsAsyncClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsAsyncClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsAsyncClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient":"Azure.AI.Projects.Evaluators","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.beginCreateEvaluatorGenerationJobWithModel":"Azure.AI.Projects.EvaluatorGenerationJobs.create","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.cancelEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.cancel","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersion":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.createEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.createVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.delete","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersion":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.deleteEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.deleteVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorGenerationJobWithResponse":"Azure.AI.Projects.EvaluatorGenerationJobs.get","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersion":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.getEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.getVersion","com.azure.ai.projects.EvaluatorsClient.listEvaluatorGenerationJobs":"Azure.AI.Projects.EvaluatorGenerationJobs.list","com.azure.ai.projects.EvaluatorsClient.listEvaluatorVersions":"Azure.AI.Projects.Evaluators.listVersions","com.azure.ai.projects.EvaluatorsClient.listLatestEvaluatorVersions":"Azure.AI.Projects.Evaluators.listLatestVersions","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersion":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.EvaluatorsClient.updateEvaluatorVersionWithResponse":"Azure.AI.Projects.Evaluators.updateVersion","com.azure.ai.projects.IndexesAsyncClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesAsyncClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesAsyncClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.IndexesClient":"Azure.AI.Projects.Indexes","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersion":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.createOrUpdateIndexVersionWithResponse":"Azure.AI.Projects.Indexes.createOrUpdateVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersion":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.deleteIndexVersionWithResponse":"Azure.AI.Projects.Indexes.deleteVersion","com.azure.ai.projects.IndexesClient.getIndexVersion":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.getIndexVersionWithResponse":"Azure.AI.Projects.Indexes.getVersion","com.azure.ai.projects.IndexesClient.listIndexVersions":"Azure.AI.Projects.Indexes.listVersions","com.azure.ai.projects.IndexesClient.listLatestIndexVersions":"Azure.AI.Projects.Indexes.listLatest","com.azure.ai.projects.implementation.models.CreateOrUpdateRoutineRequest":"Azure.AI.Projects.createOrUpdateRoutine.Request.anonymous","com.azure.ai.projects.implementation.models.CreateSkillVersionRequest":"Azure.AI.Projects.createSkillVersion.Request.anonymous","com.azure.ai.projects.implementation.models.DispatchRoutineAsyncRequest":"Azure.AI.Projects.dispatchRoutineAsync.Request.anonymous","com.azure.ai.projects.implementation.models.FoundryFeaturesOptInKeys":"Azure.AI.Projects.FoundryFeaturesOptInKeys","com.azure.ai.projects.implementation.models.UpdateSkillRequest":"Azure.AI.Projects.updateSkill.Request.anonymous","com.azure.ai.projects.models.AIProjectIndex":"Azure.AI.Projects.Index","com.azure.ai.projects.models.AgentClusterInsightRequest":"Azure.AI.Projects.AgentClusterInsightRequest","com.azure.ai.projects.models.AgentClusterInsightResult":"Azure.AI.Projects.AgentClusterInsightResult","com.azure.ai.projects.models.AgentDataGenerationJobSource":"Azure.AI.Projects.AgentDataGenerationJobSource","com.azure.ai.projects.models.AgentEvaluatorGenerationJobSource":"Azure.AI.Projects.AgentEvaluatorGenerationJobSource","com.azure.ai.projects.models.AgentInsight":"Azure.AI.Projects.AgentInsight","com.azure.ai.projects.models.AgentInsightDetails":"Azure.AI.Projects.AgentInsightDetails","com.azure.ai.projects.models.AgentInsightEstimatedCost":"Azure.AI.Projects.AgentInsightEstimatedCost","com.azure.ai.projects.models.AgentInsightHighlightedTrace":"Azure.AI.Projects.AgentInsightHighlightedTrace","com.azure.ai.projects.models.AgentInsightLinkedTrace":"Azure.AI.Projects.AgentInsightLinkedTrace","com.azure.ai.projects.models.AgentInsightMonitor":"Azure.AI.Projects.AgentInsightMonitor","com.azure.ai.projects.models.AgentInsightMonitorCreate":"Azure.AI.Projects.AgentInsightMonitorCreate","com.azure.ai.projects.models.AgentInsightMonitorListItem":"Azure.AI.Projects.AgentInsightMonitorListItem","com.azure.ai.projects.models.AgentInsightMonitorUpdate":"Azure.AI.Projects.AgentInsightMonitorUpdate","com.azure.ai.projects.models.AgentInsightOverviewSource":"Azure.AI.Projects.AgentInsightOverviewSource","com.azure.ai.projects.models.AgentInsightPromptSurface":"Azure.AI.Projects.AgentInsightPromptSurface","com.azure.ai.projects.models.AgentInsightProposedFix":"Azure.AI.Projects.AgentInsightProposedFix","com.azure.ai.projects.models.AgentInsightProposedFixChange":"Azure.AI.Projects.AgentInsightProposedFixChange","com.azure.ai.projects.models.AgentInsightProposedFixKind":"Azure.AI.Projects.AgentInsightProposedFixKind","com.azure.ai.projects.models.AgentInsightRecommendedAction":"Azure.AI.Projects.AgentInsightRecommendedAction","com.azure.ai.projects.models.AgentInsightRun":"Azure.AI.Projects.AgentInsightRun","com.azure.ai.projects.models.AgentInsightRunCreate":"Azure.AI.Projects.AgentInsightRunCreate","com.azure.ai.projects.models.AgentInsightRunResult":"Azure.AI.Projects.AgentInsightRunResult","com.azure.ai.projects.models.AgentInsightRunTrigger":"Azure.AI.Projects.AgentInsightRunTrigger","com.azure.ai.projects.models.AgentInsightSeverity":"Azure.AI.Projects.AgentInsightSeverity","com.azure.ai.projects.models.AgentInsightStatus":"Azure.AI.Projects.AgentInsightStatus","com.azure.ai.projects.models.AgentInsightSuspension":"Azure.AI.Projects.AgentInsightSuspension","com.azure.ai.projects.models.AgentInsightTokenUsage":"Azure.AI.Projects.AgentInsightTokenUsage","com.azure.ai.projects.models.AgentInsightUpdate":"Azure.AI.Projects.AgentInsightUpdate","com.azure.ai.projects.models.AgentInsightsOverview":"Azure.AI.Projects.AgentInsightsOverview","com.azure.ai.projects.models.AgentInsightsOverviewOverride":"Azure.AI.Projects.AgentInsightsOverviewOverride","com.azure.ai.projects.models.AgentTaxonomyInput":"Azure.AI.Projects.AgentTaxonomyInput","com.azure.ai.projects.models.AgenticIdentityPreviewCredential":"Azure.AI.Projects.AgenticIdentityPreviewCredentials","com.azure.ai.projects.models.ApiError":"OpenAI.Error","com.azure.ai.projects.models.ApiKeyCredential":"Azure.AI.Projects.ApiKeyCredentials","com.azure.ai.projects.models.ArtifactProfile":"Azure.AI.Projects.ArtifactProfile","com.azure.ai.projects.models.AttackStrategy":"Azure.AI.Projects.AttackStrategy","com.azure.ai.projects.models.AzureAIAgentTarget":"Azure.AI.Projects.AzureAIAgentTarget","com.azure.ai.projects.models.AzureAIModelTarget":"Azure.AI.Projects.AzureAIModelTarget","com.azure.ai.projects.models.AzureAISearchIndex":"Azure.AI.Projects.AzureAISearchIndex","com.azure.ai.projects.models.AzureOpenAIModelConfiguration":"Azure.AI.Projects.AzureOpenAIModelConfiguration","com.azure.ai.projects.models.BaseCredential":"Azure.AI.Projects.BaseCredentials","com.azure.ai.projects.models.BlobReference":"Azure.AI.Projects.BlobReference","com.azure.ai.projects.models.BlobReferenceSasCredential":"Azure.AI.Projects.SasCredential","com.azure.ai.projects.models.ChartCoordinate":"Azure.AI.Projects.ChartCoordinate","com.azure.ai.projects.models.ClusterInsightResult":"Azure.AI.Projects.ClusterInsightResult","com.azure.ai.projects.models.ClusterTokenUsage":"Azure.AI.Projects.ClusterTokenUsage","com.azure.ai.projects.models.CodeBasedEvaluatorDefinition":"Azure.AI.Projects.CodeBasedEvaluatorDefinition","com.azure.ai.projects.models.Connection":"Azure.AI.Projects.Connection","com.azure.ai.projects.models.ConnectionType":"Azure.AI.Projects.ConnectionType","com.azure.ai.projects.models.ContinuousEvaluationRuleAction":"Azure.AI.Projects.ContinuousEvaluationRuleAction","com.azure.ai.projects.models.CosmosDBIndex":"Azure.AI.Projects.CosmosDBIndex","com.azure.ai.projects.models.CreateAsyncResponse":"Azure.AI.Projects.createAsync.Response.anonymous","com.azure.ai.projects.models.CreateSkillVersionFromFilesBody":"Azure.AI.Projects.CreateSkillVersionFromFilesBody","com.azure.ai.projects.models.CredentialType":"Azure.AI.Projects.CredentialType","com.azure.ai.projects.models.CronTrigger":"Azure.AI.Projects.CronTrigger","com.azure.ai.projects.models.CustomCredential":"Azure.AI.Projects.CustomCredential","com.azure.ai.projects.models.CustomRoutineTrigger":"Azure.AI.Projects.CustomRoutineTrigger","com.azure.ai.projects.models.DailyRecurrenceSchedule":"Azure.AI.Projects.DailyRecurrenceSchedule","com.azure.ai.projects.models.DataGenerationJob":"Azure.AI.Projects.DataGenerationJob","com.azure.ai.projects.models.DataGenerationJobConfiguration":"Azure.AI.Projects.DataGenerationJobConfiguration","com.azure.ai.projects.models.DataGenerationJobInputs":"Azure.AI.Projects.DataGenerationJobInputs","com.azure.ai.projects.models.DataGenerationJobOutput":"Azure.AI.Projects.DataGenerationJobOutput","com.azure.ai.projects.models.DataGenerationJobOutputType":"Azure.AI.Projects.DataGenerationJobOutputType","com.azure.ai.projects.models.DataGenerationJobOutputWriteMode":"Azure.AI.Projects.DataGenerationJobOutputWriteMode","com.azure.ai.projects.models.DataGenerationJobResult":"Azure.AI.Projects.DataGenerationJobResult","com.azure.ai.projects.models.DataGenerationJobScenario":"Azure.AI.Projects.DataGenerationJobScenario","com.azure.ai.projects.models.DataGenerationJobSource":"Azure.AI.Projects.DataGenerationJobSource","com.azure.ai.projects.models.DataGenerationJobSourceType":"Azure.AI.Projects.DataGenerationJobSourceType","com.azure.ai.projects.models.DataGenerationJobType":"Azure.AI.Projects.DataGenerationJobType","com.azure.ai.projects.models.DataGenerationModelOptions":"Azure.AI.Projects.DataGenerationModelOptions","com.azure.ai.projects.models.DataGenerationTokenUsage":"Azure.AI.Projects.DataGenerationTokenUsage","com.azure.ai.projects.models.DatasetCredential":"Azure.AI.Projects.AssetCredentialResponse","com.azure.ai.projects.models.DatasetDataGenerationJobOutput":"Azure.AI.Projects.DatasetDataGenerationJobOutput","com.azure.ai.projects.models.DatasetEvaluatorGenerationJobSource":"Azure.AI.Projects.DatasetEvaluatorGenerationJobSource","com.azure.ai.projects.models.DatasetReference":"Azure.AI.Projects.DatasetReference","com.azure.ai.projects.models.DatasetType":"Azure.AI.Projects.DatasetType","com.azure.ai.projects.models.DatasetVersion":"Azure.AI.Projects.DatasetVersion","com.azure.ai.projects.models.Deployment":"Azure.AI.Projects.Deployment","com.azure.ai.projects.models.DeploymentType":"Azure.AI.Projects.DeploymentType","com.azure.ai.projects.models.Dimension":"Azure.AI.Projects.Dimension","com.azure.ai.projects.models.DispatchRoutineResult":"Azure.AI.Projects.DispatchRoutineResponse","com.azure.ai.projects.models.EmbeddingConfiguration":"Azure.AI.Projects.EmbeddingConfiguration","com.azure.ai.projects.models.EndpointBasedEvaluatorDefinition":"Azure.AI.Projects.EndpointBasedEvaluatorDefinition","com.azure.ai.projects.models.EntraIdCredential":"Azure.AI.Projects.EntraIDCredentials","com.azure.ai.projects.models.EvaluationComparisonInsightRequest":"Azure.AI.Projects.EvaluationComparisonInsightRequest","com.azure.ai.projects.models.EvaluationComparisonInsightResult":"Azure.AI.Projects.EvaluationComparisonInsightResult","com.azure.ai.projects.models.EvaluationDataGenerationJob":"Azure.AI.Projects.EvaluationDataGenerationJob","com.azure.ai.projects.models.EvaluationDataGenerationJobInputs":"Azure.AI.Projects.EvaluationDataGenerationJobInputs","com.azure.ai.projects.models.EvaluationDataGenerationJobOutputConfiguration":"Azure.AI.Projects.EvaluationDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.EvaluationLevel":"Azure.AI.Projects.EvaluationLevel","com.azure.ai.projects.models.EvaluationResult":"Azure.AI.Projects.EvalResult","com.azure.ai.projects.models.EvaluationResultSample":"Azure.AI.Projects.EvaluationResultSample","com.azure.ai.projects.models.EvaluationRule":"Azure.AI.Projects.EvaluationRule","com.azure.ai.projects.models.EvaluationRuleAction":"Azure.AI.Projects.EvaluationRuleAction","com.azure.ai.projects.models.EvaluationRuleActionType":"Azure.AI.Projects.EvaluationRuleActionType","com.azure.ai.projects.models.EvaluationRuleEventType":"Azure.AI.Projects.EvaluationRuleEventType","com.azure.ai.projects.models.EvaluationRuleFilter":"Azure.AI.Projects.EvaluationRuleFilter","com.azure.ai.projects.models.EvaluationRunClusterInsightRequest":"Azure.AI.Projects.EvaluationRunClusterInsightRequest","com.azure.ai.projects.models.EvaluationRunClusterInsightResult":"Azure.AI.Projects.EvaluationRunClusterInsightResult","com.azure.ai.projects.models.EvaluationRunResultCompareItem":"Azure.AI.Projects.EvalRunResultCompareItem","com.azure.ai.projects.models.EvaluationRunResultComparison":"Azure.AI.Projects.EvalRunResultComparison","com.azure.ai.projects.models.EvaluationRunResultSummary":"Azure.AI.Projects.EvalRunResultSummary","com.azure.ai.projects.models.EvaluationScheduleTask":"Azure.AI.Projects.EvaluationScheduleTask","com.azure.ai.projects.models.EvaluationTaxonomy":"Azure.AI.Projects.EvaluationTaxonomy","com.azure.ai.projects.models.EvaluationTaxonomyInput":"Azure.AI.Projects.EvaluationTaxonomyInput","com.azure.ai.projects.models.EvaluationTaxonomyInputType":"Azure.AI.Projects.EvaluationTaxonomyInputType","com.azure.ai.projects.models.EvaluatorCategory":"Azure.AI.Projects.EvaluatorCategory","com.azure.ai.projects.models.EvaluatorCredentialInput":"Azure.AI.Projects.EvaluatorCredentialRequest","com.azure.ai.projects.models.EvaluatorDefinition":"Azure.AI.Projects.EvaluatorDefinition","com.azure.ai.projects.models.EvaluatorDefinitionType":"Azure.AI.Projects.EvaluatorDefinitionType","com.azure.ai.projects.models.EvaluatorGenerationArtifacts":"Azure.AI.Projects.EvaluatorGenerationArtifacts","com.azure.ai.projects.models.EvaluatorGenerationInputs":"Azure.AI.Projects.EvaluatorGenerationInputs","com.azure.ai.projects.models.EvaluatorGenerationJob":"Azure.AI.Projects.EvaluatorGenerationJob","com.azure.ai.projects.models.EvaluatorGenerationJobSource":"Azure.AI.Projects.EvaluatorGenerationJobSource","com.azure.ai.projects.models.EvaluatorGenerationJobSourceType":"Azure.AI.Projects.EvaluatorGenerationJobSourceType","com.azure.ai.projects.models.EvaluatorGenerationTokenUsage":"Azure.AI.Projects.EvaluatorGenerationTokenUsage","com.azure.ai.projects.models.EvaluatorMetric":"Azure.AI.Projects.EvaluatorMetric","com.azure.ai.projects.models.EvaluatorMetricDirection":"Azure.AI.Projects.EvaluatorMetricDirection","com.azure.ai.projects.models.EvaluatorMetricType":"Azure.AI.Projects.EvaluatorMetricType","com.azure.ai.projects.models.EvaluatorType":"Azure.AI.Projects.EvaluatorType","com.azure.ai.projects.models.EvaluatorVersion":"Azure.AI.Projects.EvaluatorVersion","com.azure.ai.projects.models.FieldMapping":"Azure.AI.Projects.FieldMapping","com.azure.ai.projects.models.FileDataGenerationJobOutput":"Azure.AI.Projects.FileDataGenerationJobOutput","com.azure.ai.projects.models.FileDataGenerationJobSource":"Azure.AI.Projects.FileDataGenerationJobSource","com.azure.ai.projects.models.FileDatasetVersion":"Azure.AI.Projects.FileDatasetVersion","com.azure.ai.projects.models.FolderDatasetVersion":"Azure.AI.Projects.FolderDatasetVersion","com.azure.ai.projects.models.FoundryModelArtifactProfileCategory":"Azure.AI.Projects.FoundryModelArtifactProfileCategory","com.azure.ai.projects.models.FoundryModelArtifactProfileSignal":"Azure.AI.Projects.FoundryModelArtifactProfileSignal","com.azure.ai.projects.models.FoundryModelSourceType":"Azure.AI.Projects.FoundryModelSourceType","com.azure.ai.projects.models.FoundryModelWarning":"Azure.AI.Projects.FoundryModelWarning","com.azure.ai.projects.models.FoundryModelWarningCode":"Azure.AI.Projects.FoundryModelWarningCode","com.azure.ai.projects.models.FoundryModelWeightType":"Azure.AI.Projects.FoundryModelWeightType","com.azure.ai.projects.models.GenerationWarningType":"Azure.AI.Projects.GenerationWarningType","com.azure.ai.projects.models.GitHubIssueEvent":"Azure.AI.Projects.GitHubIssueEvent","com.azure.ai.projects.models.GitHubIssueRoutineTrigger":"Azure.AI.Projects.GitHubIssueRoutineTrigger","com.azure.ai.projects.models.GraderAzureAIEvaluator":"Azure.AI.Projects.GraderAzureAIEvaluator","com.azure.ai.projects.models.HourlyRecurrenceSchedule":"Azure.AI.Projects.HourlyRecurrenceSchedule","com.azure.ai.projects.models.HumanEvaluationPreviewRuleAction":"Azure.AI.Projects.HumanEvaluationPreviewRuleAction","com.azure.ai.projects.models.IndexType":"Azure.AI.Projects.IndexType","com.azure.ai.projects.models.Insight":"Azure.AI.Projects.Insight","com.azure.ai.projects.models.InsightCluster":"Azure.AI.Projects.InsightCluster","com.azure.ai.projects.models.InsightModelConfiguration":"Azure.AI.Projects.InsightModelConfiguration","com.azure.ai.projects.models.InsightRequest":"Azure.AI.Projects.InsightRequest","com.azure.ai.projects.models.InsightResult":"Azure.AI.Projects.InsightResult","com.azure.ai.projects.models.InsightSample":"Azure.AI.Projects.InsightSample","com.azure.ai.projects.models.InsightScheduleTask":"Azure.AI.Projects.InsightScheduleTask","com.azure.ai.projects.models.InsightSummary":"Azure.AI.Projects.InsightSummary","com.azure.ai.projects.models.InsightType":"Azure.AI.Projects.InsightType","com.azure.ai.projects.models.InsightsMetadata":"Azure.AI.Projects.InsightsMetadata","com.azure.ai.projects.models.InvokeAgentInvocationsApiDispatchPayload":"Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentInvocationsApiRoutineAction":"Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction","com.azure.ai.projects.models.InvokeAgentResponsesApiDispatchPayload":"Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload","com.azure.ai.projects.models.InvokeAgentResponsesApiRoutineAction":"Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction","com.azure.ai.projects.models.JobStatus":"Azure.AI.Projects.JobStatus","com.azure.ai.projects.models.ListVersionsRequestType":"Azure.AI.Projects.listVersions.RequestType.anonymous","com.azure.ai.projects.models.LoraConfig":"Azure.AI.Projects.LoraConfig","com.azure.ai.projects.models.ManagedAzureAISearchIndex":"Azure.AI.Projects.ManagedAzureAISearchIndex","com.azure.ai.projects.models.ModelCredentialInput":"Azure.AI.Projects.ModelCredentialRequest","com.azure.ai.projects.models.ModelDeployment":"Azure.AI.Projects.ModelDeployment","com.azure.ai.projects.models.ModelDeploymentSku":"Azure.AI.Projects.Sku","com.azure.ai.projects.models.ModelPendingUploadInput":"Azure.AI.Projects.ModelPendingUploadRequest","com.azure.ai.projects.models.ModelPendingUploadResult":"Azure.AI.Projects.ModelPendingUploadResponse","com.azure.ai.projects.models.ModelSamplingParams":"Azure.AI.Projects.ModelSamplingParams","com.azure.ai.projects.models.ModelSourceData":"Azure.AI.Projects.ModelSourceData","com.azure.ai.projects.models.ModelVersion":"Azure.AI.Projects.ModelVersion","com.azure.ai.projects.models.MonthlyRecurrenceSchedule":"Azure.AI.Projects.MonthlyRecurrenceSchedule","com.azure.ai.projects.models.NoAuthenticationCredential":"Azure.AI.Projects.NoAuthenticationCredentials","com.azure.ai.projects.models.OneTimeTrigger":"Azure.AI.Projects.OneTimeTrigger","com.azure.ai.projects.models.OperationStatus":"Azure.Core.Foundations.OperationState","com.azure.ai.projects.models.PendingUploadRequest":"Azure.AI.Projects.PendingUploadRequest","com.azure.ai.projects.models.PendingUploadResponse":"Azure.AI.Projects.PendingUploadResponse","com.azure.ai.projects.models.PendingUploadType":"Azure.AI.Projects.PendingUploadType","com.azure.ai.projects.models.PromptBasedEvaluatorDefinition":"Azure.AI.Projects.PromptBasedEvaluatorDefinition","com.azure.ai.projects.models.PromptDataGenerationJobSource":"Azure.AI.Projects.PromptDataGenerationJobSource","com.azure.ai.projects.models.PromptEvaluatorGenerationJobSource":"Azure.AI.Projects.PromptEvaluatorGenerationJobSource","com.azure.ai.projects.models.RecurrenceSchedule":"Azure.AI.Projects.RecurrenceSchedule","com.azure.ai.projects.models.RecurrenceTrigger":"Azure.AI.Projects.RecurrenceTrigger","com.azure.ai.projects.models.RecurrenceType":"Azure.AI.Projects.RecurrenceType","com.azure.ai.projects.models.RedTeam":"Azure.AI.Projects.RedTeam","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJob":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJob","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobInputs":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.ReinforcementFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.ReinforcementFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.RiskCategory":"Azure.AI.Projects.RiskCategory","com.azure.ai.projects.models.Routine":"Azure.AI.Projects.Routine","com.azure.ai.projects.models.RoutineAction":"Azure.AI.Projects.RoutineAction","com.azure.ai.projects.models.RoutineActionType":"Azure.AI.Projects.RoutineActionType","com.azure.ai.projects.models.RoutineAttemptSource":"Azure.AI.Projects.RoutineAttemptSource","com.azure.ai.projects.models.RoutineAuthorization":"Azure.AI.Projects.RoutineAuthorization","com.azure.ai.projects.models.RoutineDispatchIdentity":"Azure.AI.Projects.RoutineDispatchIdentity","com.azure.ai.projects.models.RoutineDispatchPayload":"Azure.AI.Projects.RoutineDispatchPayload","com.azure.ai.projects.models.RoutineDispatchPayloadType":"Azure.AI.Projects.RoutineDispatchPayloadType","com.azure.ai.projects.models.RoutineRun":"Azure.AI.Projects.RoutineRun","com.azure.ai.projects.models.RoutineRunPhase":"Azure.AI.Projects.RoutineRunPhase","com.azure.ai.projects.models.RoutineTrigger":"Azure.AI.Projects.RoutineTrigger","com.azure.ai.projects.models.RoutineTriggerType":"Azure.AI.Projects.RoutineTriggerType","com.azure.ai.projects.models.RubricBasedEvaluatorDefinition":"Azure.AI.Projects.RubricBasedEvaluatorDefinition","com.azure.ai.projects.models.RubricGenerationInputQualityWarning":"Azure.AI.Projects.RubricGenerationInputQualityWarning","com.azure.ai.projects.models.RubricGenerationInputQualityWarningCode":"Azure.AI.Projects.RubricGenerationInputQualityWarningCode","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSeverity":"Azure.AI.Projects.RubricGenerationInputQualityWarningSeverity","com.azure.ai.projects.models.RubricGenerationInputQualityWarningSource":"Azure.AI.Projects.RubricGenerationInputQualityWarningSource","com.azure.ai.projects.models.SampleType":"Azure.AI.Projects.SampleType","com.azure.ai.projects.models.SasCredential":"Azure.AI.Projects.SASCredentials","com.azure.ai.projects.models.Schedule":"Azure.AI.Projects.Schedule","com.azure.ai.projects.models.ScheduleProvisioningStatus":"Azure.AI.Projects.ScheduleProvisioningStatus","com.azure.ai.projects.models.ScheduleRoutineTrigger":"Azure.AI.Projects.ScheduleRoutineTrigger","com.azure.ai.projects.models.ScheduleRun":"Azure.AI.Projects.ScheduleRun","com.azure.ai.projects.models.ScheduleTask":"Azure.AI.Projects.ScheduleTask","com.azure.ai.projects.models.ScheduleTaskType":"Azure.AI.Projects.ScheduleTaskType","com.azure.ai.projects.models.SimpleQnADataGenerationJobConfiguration":"Azure.AI.Projects.SimpleQnADataGenerationJobConfiguration","com.azure.ai.projects.models.SimpleQnAFineTuningQuestionType":"Azure.AI.Projects.SimpleQnAFineTuningQuestionType","com.azure.ai.projects.models.SimulationSeedDataGenerationJobConfiguration":"Azure.AI.Projects.SimulationSeedDataGenerationJobConfiguration","com.azure.ai.projects.models.SkillDetails":"Azure.AI.Projects.Skill","com.azure.ai.projects.models.SkillFileDetails":"TypeSpec.Http.File","com.azure.ai.projects.models.SkillInlineContent":"Azure.AI.Projects.SkillInlineContent","com.azure.ai.projects.models.SkillVersion":"Azure.AI.Projects.SkillVersion","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJob":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJob","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobInputs":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobInputs","com.azure.ai.projects.models.SupervisedFineTuningDataGenerationJobOutputConfiguration":"Azure.AI.Projects.SupervisedFineTuningDataGenerationJobOutputConfiguration","com.azure.ai.projects.models.Target":"Azure.AI.Projects.FoundryEvaluationTarget","com.azure.ai.projects.models.TargetConfig":"Azure.AI.Projects.RedTeamTargetConfig","com.azure.ai.projects.models.TaxonomyCategory":"Azure.AI.Projects.TaxonomyCategory","com.azure.ai.projects.models.TaxonomySubCategory":"Azure.AI.Projects.TaxonomySubCategory","com.azure.ai.projects.models.TestingCriterionAzureAIEvaluator":"Azure.AI.Projects.TestingCriterionAzureAIEvaluator","com.azure.ai.projects.models.TimerRoutineTrigger":"Azure.AI.Projects.TimerRoutineTrigger","com.azure.ai.projects.models.ToolDescription":"Azure.AI.Projects.ToolDescription","com.azure.ai.projects.models.ToolUseFineTuningDataGenerationJobConfiguration":"Azure.AI.Projects.ToolUseFineTuningDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobConfiguration":"Azure.AI.Projects.TracesDataGenerationJobConfiguration","com.azure.ai.projects.models.TracesDataGenerationJobSource":"Azure.AI.Projects.TracesDataGenerationJobSource","com.azure.ai.projects.models.TracesEvaluatorGenerationJobSource":"Azure.AI.Projects.TracesEvaluatorGenerationJobSource","com.azure.ai.projects.models.TreatmentEffectType":"Azure.AI.Projects.TreatmentEffectType","com.azure.ai.projects.models.Trigger":"Azure.AI.Projects.Trigger","com.azure.ai.projects.models.TriggerType":"Azure.AI.Projects.TriggerType","com.azure.ai.projects.models.UpdateModelVersionInput":"Azure.AI.Projects.UpdateModelVersionRequest","com.azure.ai.projects.models.WeeklyRecurrenceSchedule":"Azure.AI.Projects.WeeklyRecurrenceSchedule"},"generatedFiles":["src/main/java/com/azure/ai/projects/AIProjectClientBuilder.java","src/main/java/com/azure/ai/projects/AIProjectsServiceVersion.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaAgentInsightMonitorsClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluationTaxonomiesClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaEvaluatorsClient.java","src/main/java/com/azure/ai/projects/BetaInsightsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaInsightsClient.java","src/main/java/com/azure/ai/projects/BetaModelsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaModelsClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRedTeamsClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaRoutinesClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSchedulesClient.java","src/main/java/com/azure/ai/projects/BetaSkillsAsyncClient.java","src/main/java/com/azure/ai/projects/BetaSkillsClient.java","src/main/java/com/azure/ai/projects/ConnectionsAsyncClient.java","src/main/java/com/azure/ai/projects/ConnectionsClient.java","src/main/java/com/azure/ai/projects/DatasetsAsyncClient.java","src/main/java/com/azure/ai/projects/DatasetsClient.java","src/main/java/com/azure/ai/projects/DeploymentsAsyncClient.java","src/main/java/com/azure/ai/projects/DeploymentsClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluationRulesClient.java","src/main/java/com/azure/ai/projects/EvaluatorsAsyncClient.java","src/main/java/com/azure/ai/projects/EvaluatorsClient.java","src/main/java/com/azure/ai/projects/IndexesAsyncClient.java","src/main/java/com/azure/ai/projects/IndexesClient.java","src/main/java/com/azure/ai/projects/implementation/AIProjectClientImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaAgentInsightMonitorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluationTaxonomiesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaEvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaInsightsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaModelsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRedTeamsImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaRoutinesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSchedulesImpl.java","src/main/java/com/azure/ai/projects/implementation/BetaSkillsImpl.java","src/main/java/com/azure/ai/projects/implementation/ConnectionsImpl.java","src/main/java/com/azure/ai/projects/implementation/DatasetsImpl.java","src/main/java/com/azure/ai/projects/implementation/DeploymentsImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluationRulesImpl.java","src/main/java/com/azure/ai/projects/implementation/EvaluatorsImpl.java","src/main/java/com/azure/ai/projects/implementation/IndexesImpl.java","src/main/java/com/azure/ai/projects/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/ai/projects/implementation/MultipartFormDataHelper.java","src/main/java/com/azure/ai/projects/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/PollingUtils.java","src/main/java/com/azure/ai/projects/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/ai/projects/implementation/models/CreateOrUpdateRoutineRequest.java","src/main/java/com/azure/ai/projects/implementation/models/CreateSkillVersionRequest.java","src/main/java/com/azure/ai/projects/implementation/models/DispatchRoutineAsyncRequest.java","src/main/java/com/azure/ai/projects/implementation/models/FoundryFeaturesOptInKeys.java","src/main/java/com/azure/ai/projects/implementation/models/UpdateSkillRequest.java","src/main/java/com/azure/ai/projects/implementation/models/package-info.java","src/main/java/com/azure/ai/projects/implementation/package-info.java","src/main/java/com/azure/ai/projects/models/AIProjectIndex.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/AgentClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/AgentDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/AgentInsight.java","src/main/java/com/azure/ai/projects/models/AgentInsightDetails.java","src/main/java/com/azure/ai/projects/models/AgentInsightEstimatedCost.java","src/main/java/com/azure/ai/projects/models/AgentInsightHighlightedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightLinkedTrace.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitor.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorListItem.java","src/main/java/com/azure/ai/projects/models/AgentInsightMonitorUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightOverviewSource.java","src/main/java/com/azure/ai/projects/models/AgentInsightPromptSurface.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFix.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixChange.java","src/main/java/com/azure/ai/projects/models/AgentInsightProposedFixKind.java","src/main/java/com/azure/ai/projects/models/AgentInsightRecommendedAction.java","src/main/java/com/azure/ai/projects/models/AgentInsightRun.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunCreate.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunResult.java","src/main/java/com/azure/ai/projects/models/AgentInsightRunTrigger.java","src/main/java/com/azure/ai/projects/models/AgentInsightSeverity.java","src/main/java/com/azure/ai/projects/models/AgentInsightStatus.java","src/main/java/com/azure/ai/projects/models/AgentInsightSuspension.java","src/main/java/com/azure/ai/projects/models/AgentInsightTokenUsage.java","src/main/java/com/azure/ai/projects/models/AgentInsightUpdate.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverview.java","src/main/java/com/azure/ai/projects/models/AgentInsightsOverviewOverride.java","src/main/java/com/azure/ai/projects/models/AgentTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/AgenticIdentityPreviewCredential.java","src/main/java/com/azure/ai/projects/models/ApiError.java","src/main/java/com/azure/ai/projects/models/ApiKeyCredential.java","src/main/java/com/azure/ai/projects/models/ArtifactProfile.java","src/main/java/com/azure/ai/projects/models/AttackStrategy.java","src/main/java/com/azure/ai/projects/models/AzureAIAgentTarget.java","src/main/java/com/azure/ai/projects/models/AzureAIModelTarget.java","src/main/java/com/azure/ai/projects/models/AzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/AzureOpenAIModelConfiguration.java","src/main/java/com/azure/ai/projects/models/BaseCredential.java","src/main/java/com/azure/ai/projects/models/BlobReference.java","src/main/java/com/azure/ai/projects/models/BlobReferenceSasCredential.java","src/main/java/com/azure/ai/projects/models/ChartCoordinate.java","src/main/java/com/azure/ai/projects/models/ClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/ClusterTokenUsage.java","src/main/java/com/azure/ai/projects/models/CodeBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/Connection.java","src/main/java/com/azure/ai/projects/models/ConnectionType.java","src/main/java/com/azure/ai/projects/models/ContinuousEvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/CosmosDBIndex.java","src/main/java/com/azure/ai/projects/models/CreateAsyncResponse.java","src/main/java/com/azure/ai/projects/models/CreateSkillVersionFromFilesBody.java","src/main/java/com/azure/ai/projects/models/CredentialType.java","src/main/java/com/azure/ai/projects/models/CronTrigger.java","src/main/java/com/azure/ai/projects/models/CustomCredential.java","src/main/java/com/azure/ai/projects/models/CustomRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/DailyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/DataGenerationJob.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobOutputWriteMode.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobResult.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobScenario.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/DataGenerationJobType.java","src/main/java/com/azure/ai/projects/models/DataGenerationModelOptions.java","src/main/java/com/azure/ai/projects/models/DataGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/DatasetCredential.java","src/main/java/com/azure/ai/projects/models/DatasetDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/DatasetEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/DatasetReference.java","src/main/java/com/azure/ai/projects/models/DatasetType.java","src/main/java/com/azure/ai/projects/models/DatasetVersion.java","src/main/java/com/azure/ai/projects/models/Deployment.java","src/main/java/com/azure/ai/projects/models/DeploymentType.java","src/main/java/com/azure/ai/projects/models/Dimension.java","src/main/java/com/azure/ai/projects/models/DispatchRoutineResult.java","src/main/java/com/azure/ai/projects/models/EmbeddingConfiguration.java","src/main/java/com/azure/ai/projects/models/EndpointBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EntraIdCredential.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationComparisonInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/EvaluationDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/EvaluationLevel.java","src/main/java/com/azure/ai/projects/models/EvaluationResult.java","src/main/java/com/azure/ai/projects/models/EvaluationResultSample.java","src/main/java/com/azure/ai/projects/models/EvaluationRule.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleAction.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleActionType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleEventType.java","src/main/java/com/azure/ai/projects/models/EvaluationRuleFilter.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightRequest.java","src/main/java/com/azure/ai/projects/models/EvaluationRunClusterInsightResult.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultCompareItem.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultComparison.java","src/main/java/com/azure/ai/projects/models/EvaluationRunResultSummary.java","src/main/java/com/azure/ai/projects/models/EvaluationScheduleTask.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomy.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInput.java","src/main/java/com/azure/ai/projects/models/EvaluationTaxonomyInputType.java","src/main/java/com/azure/ai/projects/models/EvaluatorCategory.java","src/main/java/com/azure/ai/projects/models/EvaluatorCredentialInput.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/EvaluatorDefinitionType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationArtifacts.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationInputs.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJob.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationJobSourceType.java","src/main/java/com/azure/ai/projects/models/EvaluatorGenerationTokenUsage.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetric.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricDirection.java","src/main/java/com/azure/ai/projects/models/EvaluatorMetricType.java","src/main/java/com/azure/ai/projects/models/EvaluatorType.java","src/main/java/com/azure/ai/projects/models/EvaluatorVersion.java","src/main/java/com/azure/ai/projects/models/FieldMapping.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobOutput.java","src/main/java/com/azure/ai/projects/models/FileDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/FileDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FolderDatasetVersion.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileCategory.java","src/main/java/com/azure/ai/projects/models/FoundryModelArtifactProfileSignal.java","src/main/java/com/azure/ai/projects/models/FoundryModelSourceType.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarning.java","src/main/java/com/azure/ai/projects/models/FoundryModelWarningCode.java","src/main/java/com/azure/ai/projects/models/FoundryModelWeightType.java","src/main/java/com/azure/ai/projects/models/GenerationWarningType.java","src/main/java/com/azure/ai/projects/models/GitHubIssueEvent.java","src/main/java/com/azure/ai/projects/models/GitHubIssueRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/GraderAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/HourlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/HumanEvaluationPreviewRuleAction.java","src/main/java/com/azure/ai/projects/models/IndexType.java","src/main/java/com/azure/ai/projects/models/Insight.java","src/main/java/com/azure/ai/projects/models/InsightCluster.java","src/main/java/com/azure/ai/projects/models/InsightModelConfiguration.java","src/main/java/com/azure/ai/projects/models/InsightRequest.java","src/main/java/com/azure/ai/projects/models/InsightResult.java","src/main/java/com/azure/ai/projects/models/InsightSample.java","src/main/java/com/azure/ai/projects/models/InsightScheduleTask.java","src/main/java/com/azure/ai/projects/models/InsightSummary.java","src/main/java/com/azure/ai/projects/models/InsightType.java","src/main/java/com/azure/ai/projects/models/InsightsMetadata.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentInvocationsApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiDispatchPayload.java","src/main/java/com/azure/ai/projects/models/InvokeAgentResponsesApiRoutineAction.java","src/main/java/com/azure/ai/projects/models/JobStatus.java","src/main/java/com/azure/ai/projects/models/ListVersionsRequestType.java","src/main/java/com/azure/ai/projects/models/LoraConfig.java","src/main/java/com/azure/ai/projects/models/ManagedAzureAISearchIndex.java","src/main/java/com/azure/ai/projects/models/ModelCredentialInput.java","src/main/java/com/azure/ai/projects/models/ModelDeployment.java","src/main/java/com/azure/ai/projects/models/ModelDeploymentSku.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadInput.java","src/main/java/com/azure/ai/projects/models/ModelPendingUploadResult.java","src/main/java/com/azure/ai/projects/models/ModelSamplingParams.java","src/main/java/com/azure/ai/projects/models/ModelSourceData.java","src/main/java/com/azure/ai/projects/models/ModelVersion.java","src/main/java/com/azure/ai/projects/models/MonthlyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/NoAuthenticationCredential.java","src/main/java/com/azure/ai/projects/models/OneTimeTrigger.java","src/main/java/com/azure/ai/projects/models/OperationStatus.java","src/main/java/com/azure/ai/projects/models/PendingUploadRequest.java","src/main/java/com/azure/ai/projects/models/PendingUploadResponse.java","src/main/java/com/azure/ai/projects/models/PendingUploadType.java","src/main/java/com/azure/ai/projects/models/PromptBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/PromptDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/PromptEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/RecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/RecurrenceTrigger.java","src/main/java/com/azure/ai/projects/models/RecurrenceType.java","src/main/java/com/azure/ai/projects/models/RedTeam.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/ReinforcementFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/RiskCategory.java","src/main/java/com/azure/ai/projects/models/Routine.java","src/main/java/com/azure/ai/projects/models/RoutineAction.java","src/main/java/com/azure/ai/projects/models/RoutineActionType.java","src/main/java/com/azure/ai/projects/models/RoutineAttemptSource.java","src/main/java/com/azure/ai/projects/models/RoutineAuthorization.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchIdentity.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayload.java","src/main/java/com/azure/ai/projects/models/RoutineDispatchPayloadType.java","src/main/java/com/azure/ai/projects/models/RoutineRun.java","src/main/java/com/azure/ai/projects/models/RoutineRunPhase.java","src/main/java/com/azure/ai/projects/models/RoutineTrigger.java","src/main/java/com/azure/ai/projects/models/RoutineTriggerType.java","src/main/java/com/azure/ai/projects/models/RubricBasedEvaluatorDefinition.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarning.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningCode.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSeverity.java","src/main/java/com/azure/ai/projects/models/RubricGenerationInputQualityWarningSource.java","src/main/java/com/azure/ai/projects/models/SampleType.java","src/main/java/com/azure/ai/projects/models/SasCredential.java","src/main/java/com/azure/ai/projects/models/Schedule.java","src/main/java/com/azure/ai/projects/models/ScheduleProvisioningStatus.java","src/main/java/com/azure/ai/projects/models/ScheduleRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ScheduleRun.java","src/main/java/com/azure/ai/projects/models/ScheduleTask.java","src/main/java/com/azure/ai/projects/models/ScheduleTaskType.java","src/main/java/com/azure/ai/projects/models/SimpleQnADataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SimpleQnAFineTuningQuestionType.java","src/main/java/com/azure/ai/projects/models/SimulationSeedDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/SkillDetails.java","src/main/java/com/azure/ai/projects/models/SkillFileDetails.java","src/main/java/com/azure/ai/projects/models/SkillInlineContent.java","src/main/java/com/azure/ai/projects/models/SkillVersion.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJob.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobInputs.java","src/main/java/com/azure/ai/projects/models/SupervisedFineTuningDataGenerationJobOutputConfiguration.java","src/main/java/com/azure/ai/projects/models/Target.java","src/main/java/com/azure/ai/projects/models/TargetConfig.java","src/main/java/com/azure/ai/projects/models/TaxonomyCategory.java","src/main/java/com/azure/ai/projects/models/TaxonomySubCategory.java","src/main/java/com/azure/ai/projects/models/TestingCriterionAzureAIEvaluator.java","src/main/java/com/azure/ai/projects/models/TimerRoutineTrigger.java","src/main/java/com/azure/ai/projects/models/ToolDescription.java","src/main/java/com/azure/ai/projects/models/ToolUseFineTuningDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobConfiguration.java","src/main/java/com/azure/ai/projects/models/TracesDataGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TracesEvaluatorGenerationJobSource.java","src/main/java/com/azure/ai/projects/models/TreatmentEffectType.java","src/main/java/com/azure/ai/projects/models/Trigger.java","src/main/java/com/azure/ai/projects/models/TriggerType.java","src/main/java/com/azure/ai/projects/models/UpdateModelVersionInput.java","src/main/java/com/azure/ai/projects/models/WeeklyRecurrenceSchedule.java","src/main/java/com/azure/ai/projects/models/package-info.java","src/main/java/com/azure/ai/projects/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml b/sdk/ai/azure-ai-projects/tsp-location.yaml index 0165f08c49b1..a3906274498c 100644 --- a/sdk/ai/azure-ai-projects/tsp-location.yaml +++ b/sdk/ai/azure-ai-projects/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai-foundry/data-plane/Foundry/src/sdk-java-azure-ai-projects -commit: 0bfe00ed62b780c6d3c8da93c9b314728c3d283f +commit: 6cc90ff8fe988069008dcb88f06a75066f830fc2 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/ai-foundry/data-plane/Foundry/src/sdk-common From 57628a8405a895f4798f31992dbe548dc2375125 Mon Sep 17 00:00:00 2001 From: Kaylie <50653231+kaylieee@users.noreply.github.com> Date: Mon, 19 Oct 2026 11:42:36 -0700 Subject: [PATCH 09/13] bump versions, update changelog and readme (#50867) --- eng/versioning/version_client.txt | 4 +-- sdk/ai/azure-ai-agents/CHANGELOG.md | 44 ++++++++++++++++++++++----- sdk/ai/azure-ai-agents/README.md | 6 ++-- sdk/ai/azure-ai-agents/pom.xml | 2 +- sdk/ai/azure-ai-projects/CHANGELOG.md | 26 +++++----------- sdk/ai/azure-ai-projects/README.md | 2 +- sdk/ai/azure-ai-projects/pom.xml | 4 +-- 7 files changed, 52 insertions(+), 36 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 6d09d9c87cdd..55c63e3388b5 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -37,7 +37,7 @@ com.azure:azure-data-sdk-parent;1.3.0;1.3.0 com.azure:azure-sdk-parent;1.6.0;1.6.0 com.azure:azure-client-sdk-parent;1.7.0;1.7.0 com.azure:azure-ai-agents-persistent;1.0.0-beta.2;1.0.0-beta.3 -com.azure:azure-ai-agents;2.7.0;2.8.0-beta.1 +com.azure:azure-ai-agents;2.7.0;2.8.0 com.azure:azure-ai-anomalydetector;3.0.0-beta.5;3.0.0-beta.6 com.azure:azure-ai-contentsafety;1.0.21;1.1.0-beta.2 com.azure:azure-ai-contentunderstanding;1.0.0;1.1.0-beta.4 @@ -53,7 +53,7 @@ com.azure:azure-ai-openai;1.0.0-beta.16;1.0.0-beta.17 com.azure:azure-ai-openai-assistants;1.0.0-beta.5;1.0.0-beta.6 com.azure:azure-ai-openai-realtime;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-ai-openai-stainless;1.0.0-beta.1;1.0.0-beta.1 -com.azure:azure-ai-projects;2.7.0;2.8.0-beta.1 +com.azure:azure-ai-projects;2.7.0;2.8.0 com.azure:azure-ai-speech-transcription;1.0.0;1.1.0-beta.1 com.azure:azure-ai-textanalytics;5.5.16;5.6.0-beta.1 com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1 diff --git a/sdk/ai/azure-ai-agents/CHANGELOG.md b/sdk/ai/azure-ai-agents/CHANGELOG.md index 19fab8b58a95..00e20cb6e08e 100644 --- a/sdk/ai/azure-ai-agents/CHANGELOG.md +++ b/sdk/ai/azure-ai-agents/CHANGELOG.md @@ -1,22 +1,50 @@ # Release History -## 2.8.0-beta.1 (Unreleased) - -- Added experimental OpenTelemetry GenAI tracing for agent and response operations, following the OpenTelemetry GenAI semantic conventions. Set `AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true` to enable the experimental instrumentation; there is no programmatic opt-in call or process-global mutable state. Tracing/metrics are configured per client through `AgentsClientBuilder.clientOptions(...)` (`TracingOptions` / `MetricsOptions`), and message/agent content is only captured when `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true` (off by default). The former `AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED` setting remains a compatibility fallback. Coverage: - - All current `AgentsClient.createAgentVersion` / `AgentsAsyncClient.createAgentVersion` convenience overloads — `create_agent` spans with prompt/hosted agent attributes and the created agent id/version. Retiring workflow-agent telemetry is intentionally excluded. - - `ResponsesClient.createAzureResponse` and `createStreamingAzureResponse`, including their asynchronous equivalents — `chat` / `invoke_agent` spans with request/response model, token usage, input/output messages, finish reasons, and conversation id (streaming spans stay open until completion, error, cancellation, or explicit close). - - Raw-response create and streaming protocol methods, including synchronous and asynchronous lifecycle handling and direct HTTP parenting. - - `ResponsesClient.createConversation` and `ResponsesAsyncClient.createConversation` — `create_conversation` spans that surround the service call and record its result or failure. - - Metrics: `gen_ai.client.operation.duration` and `gen_ai.client.token.usage`. +## 2.8.0 (2026-10-19) ### Features Added +- Added experimental OpenTelemetry GenAI tracing and metrics for agent-version creation and Azure response operations, + including synchronous, asynchronous, streaming, and raw-response methods. Instrumentation emits `create_agent`, + `chat`, and `invoke_agent` spans, plus `gen_ai.client.operation.duration` and `gen_ai.client.token.usage` metrics. + Set `AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true` to enable it and configure tracing and metrics per client through + `AgentsClientBuilder.clientOptions(...)` using `TracingOptions` and `MetricsOptions`. Message content capture is + disabled by default; enable it with `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`. + `AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED` remains supported as a fallback when the newer setting is unset. +- Added tracing samples for custom OpenTelemetry configuration, console export, and Azure Monitor export. +- Added preview Microsoft Copilot harness and built-in toolset support for prompt agents through + `MicrosoftCopilotHarness`, `MicrosoftCopilotToolsetPreview`, and related configuration types. + `AgentsClientBuilder.allowPreview(true)` and beta agent clients include the `MicrosoftCopilot=V1Preview` feature + opt-in. The legacy GitHub Copilot types remain available for compatibility. + ### Breaking Changes +- Flattened the preview voice response models. Removed `VoiceResponseBase` and `VoiceAgentRealtimeResponseBase`; + use `VoiceResponse` and `VoiceAgentRealtimeResponse` directly. Response properties and typed token-limit accessors + are now declared on those concrete models. +- Renamed `VoiceResponseBaseObject` to `VoiceResponseObjectType` and replaced `getObject()` with `getObjectType()` + on `VoiceResponse` and `VoiceAgentRealtimeResponse`. The JSON property remains `object`. +- Renamed the preview Teams Phone binding models from `CreateTeamsPhoneExtensionTelephonyBindingInput`, + `TeamsPhoneExtensionTelephonyBinding`, and `TeamsPhoneExtensionTelephonyBindingListItem` to + `CreateTeamsPhoneExtensibilityTelephonyBindingInput`, `TeamsPhoneExtensibilityTelephonyBinding`, and + `TeamsPhoneExtensibilityTelephonyBindingListItem`, respectively. +- Renamed `TelephonyProvider.TEAMS_PHONE_EXTENSION` and + `TelephonyCallLifecycleEventSource.TEAMS_PHONE_EXTENSION` to `TEAMS_PHONE_EXTENSIBILITY`. + Their serialized value changed from `teams_phone_extension` to `teams_phone_extensibility`. + ### Bugs Fixed +- Fixed typed asynchronous list operations to forward the page-size hint supplied through `PagedFlux.byPage(...)`, + including when resuming from a continuation token, instead of ignoring it. + ### Other Changes +- Regenerated from the updated Foundry TypeSpec specification. +- Updated `SessionConfiguration` documentation to reflect the service-supported maximum idle timeout of 14,400 seconds + (four hours); the default remains 900 seconds. +- Updated `azure-core` to `1.61.0-beta.1` and `azure-core-http-netty` to `1.17.0-beta.1`. +- Updated shaded Reactor Netty to `1.3.7` and Netty to `4.2.19.Final`. + ## 2.7.0 (2026-10-06) ### Features Added diff --git a/sdk/ai/azure-ai-agents/README.md b/sdk/ai/azure-ai-agents/README.md index 1bf24482a1cc..13d458c6c5b6 100644 --- a/sdk/ai/azure-ai-agents/README.md +++ b/sdk/ai/azure-ai-agents/README.md @@ -31,7 +31,7 @@ Various documentation is available to help you get started com.azure azure-ai-agents - 2.7.0 + 2.8.0 ``` [//]: # ({x-version-update-end}) @@ -163,8 +163,8 @@ The SDK supports a variety of tools that can be attached to agent definitions. S | `BrowserAutomationPreviewTool` | Browser automation | | `ComputerUsePreviewTool` | Computer use | | `FabricIqPreviewTool` | Fabric IQ | -| `GitHubCopilotToolsetPreview` | GitHub Copilot built-in tools | | `MemorySearchPreviewTool` | Memory search | +| `MicrosoftCopilotToolsetPreview` | Microsoft Copilot built-in tools | | `MicrosoftFabricPreviewTool` | Microsoft Fabric | | `ReminderPreviewTool` | Reminder scheduling | | `SharepointPreviewTool` | SharePoint grounding | @@ -195,7 +195,7 @@ Build clients whose names start with `Beta` from `AgentsClientBuilder.beta()`. T | Beta sub-client | Automatically populated `Foundry-Features` value | |---|---| -| `BetaAgentsClient` | `WorkflowAgents=V1Preview,ExternalAgents=V1Preview,DraftAgents=V1Preview,VoiceAgents=V1Preview,DigitalWorker=V1Preview,GitHubCopilot=V1Preview,Skills=V1Preview` | +| `BetaAgentsClient` | `WorkflowAgents=V1Preview,ExternalAgents=V1Preview,DraftAgents=V1Preview,VoiceAgents=V1Preview,DigitalWorker=V1Preview,GitHubCopilot=V1Preview,Skills=V1Preview,MicrosoftCopilot=V1Preview` | | `BetaMemoryStoresClient` | `MemoryStores=V1Preview` | | `BetaVoiceAgentWebSocketClient` | `VoiceAgents=V1Preview` | | `BetaVoiceAgentsTelephonyClient` | `VoiceAgents=V1Preview` | diff --git a/sdk/ai/azure-ai-agents/pom.xml b/sdk/ai/azure-ai-agents/pom.xml index d2a81ac4afc1..3947b3ac461d 100644 --- a/sdk/ai/azure-ai-agents/pom.xml +++ b/sdk/ai/azure-ai-agents/pom.xml @@ -14,7 +14,7 @@ com.azure azure-ai-agents - 2.8.0-beta.1 + 2.8.0 jar Microsoft Azure SDK for Agents diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index f2f67a8e4745..e8a015989215 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -1,34 +1,22 @@ # Release History -## 2.8.0-beta.1 (Unreleased) +## 2.8.0 (2026-10-19) ### Features Added -- Added `EvaluatorsClient` and `EvaluatorsAsyncClient`, built directly through - `AIProjectClientBuilder.buildEvaluatorsClient()` and `buildEvaluatorsAsyncClient()`, for generally available - evaluator-version management and rubric-generation jobs. Preview evaluator definitions such as - `EndpointBasedEvaluatorDefinition` require `allowPreview(true)`. `BetaEvaluatorsClient` and - `BetaEvaluatorsAsyncClient` retain preview pending-upload and credential operations. -- Evaluation data generation graduated to general availability on `DatasetsClient` and `DatasetsAsyncClient`. - Added scenario-specific input and result models for evaluation, supervised fine-tuning, and reinforcement - fine-tuning. Fine-tuning scenarios remain in preview and require `allowPreview(true)`; their output configurations - support merge-file IDs. -- Added `ConnectionType.OPEN_API` (`OpenAPI`) and `ConnectionType.REMOTE_A2A` (`RemoteA2A`) for listing and identifying - OpenAPI and remote agent-to-agent connections. -- Added `ApiError.getMisalignment()` to expose structured misalignment details using the OpenAI - `ErrorObject.Misalignment` model. - ### Breaking Changes ### Bugs Fixed -- Fixed OpenAI clients built from `AIProjectClientBuilder` to acquire bearer tokens through the Azure HTTP pipeline. - Asynchronous clients now use asynchronous token acquisition instead of calling `TokenCredential.getTokenSync(...)`; - synchronous clients continue to use synchronous token acquisition. -- Fixed skill file uploads to omit an unset `default` flag instead of sending the literal text `null`. +- Fixed typed asynchronous list operations to forward the page-size hint supplied through `PagedFlux.byPage(...)`, + including when resuming from a continuation token, instead of ignoring it. ### Other Changes +- Regenerated from the updated Foundry TypeSpec specification. +- Updated `azure-ai-agents` to `2.8.0`, `azure-storage-blob` to `12.36.0`, and `azure-core-http-netty` to + `1.17.0-beta.1`. + ## 2.7.0 (2026-10-06) ### Features Added diff --git a/sdk/ai/azure-ai-projects/README.md b/sdk/ai/azure-ai-projects/README.md index 9ff9bbf7b331..97d9cbe9e9a6 100644 --- a/sdk/ai/azure-ai-projects/README.md +++ b/sdk/ai/azure-ai-projects/README.md @@ -43,7 +43,7 @@ Various documentation is available to help you get started com.azure azure-ai-projects - 2.7.0 + 2.8.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/ai/azure-ai-projects/pom.xml b/sdk/ai/azure-ai-projects/pom.xml index 9b511a093b9e..3f5e28667ca7 100644 --- a/sdk/ai/azure-ai-projects/pom.xml +++ b/sdk/ai/azure-ai-projects/pom.xml @@ -14,7 +14,7 @@ Code generated by Microsoft (R) TypeSpec Code Generator. com.azure azure-ai-projects - 2.8.0-beta.1 + 2.8.0 jar Microsoft Azure SDK for Projects @@ -73,7 +73,7 @@ Code generated by Microsoft (R) TypeSpec Code Generator. com.azure azure-ai-agents - 2.8.0-beta.1 + 2.8.0 com.openai From ea4ed2a1e80166649a0da4fc795e524a711ee9e3 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Mon, 19 Oct 2026 11:57:45 -0700 Subject: [PATCH 10/13] undo netty bump --- sdk/ai/azure-ai-agents/CHANGELOG.md | 2 -- sdk/ai/azure-ai-projects/CHANGELOG.md | 3 +-- sdk/ai/azure-ai-projects/pom.xml | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sdk/ai/azure-ai-agents/CHANGELOG.md b/sdk/ai/azure-ai-agents/CHANGELOG.md index 00e20cb6e08e..65c5eef9bfcb 100644 --- a/sdk/ai/azure-ai-agents/CHANGELOG.md +++ b/sdk/ai/azure-ai-agents/CHANGELOG.md @@ -42,8 +42,6 @@ - Regenerated from the updated Foundry TypeSpec specification. - Updated `SessionConfiguration` documentation to reflect the service-supported maximum idle timeout of 14,400 seconds (four hours); the default remains 900 seconds. -- Updated `azure-core` to `1.61.0-beta.1` and `azure-core-http-netty` to `1.17.0-beta.1`. -- Updated shaded Reactor Netty to `1.3.7` and Netty to `4.2.19.Final`. ## 2.7.0 (2026-10-06) diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index e8a015989215..0787a97d4e5f 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -14,8 +14,7 @@ ### Other Changes - Regenerated from the updated Foundry TypeSpec specification. -- Updated `azure-ai-agents` to `2.8.0`, `azure-storage-blob` to `12.36.0`, and `azure-core-http-netty` to - `1.17.0-beta.1`. +- Updated `azure-ai-agents` to `2.8.0` and `azure-storage-blob` to `12.36.0`. ## 2.7.0 (2026-10-06) diff --git a/sdk/ai/azure-ai-projects/pom.xml b/sdk/ai/azure-ai-projects/pom.xml index 3f5e28667ca7..45ed470558fa 100644 --- a/sdk/ai/azure-ai-projects/pom.xml +++ b/sdk/ai/azure-ai-projects/pom.xml @@ -63,7 +63,7 @@ Code generated by Microsoft (R) TypeSpec Code Generator. com.azure azure-core-http-netty - 1.17.0-beta.1 + 1.16.8 com.azure From 9361eeb31cc5e4b493869bbed752a683b8709fe7 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Mon, 19 Oct 2026 13:03:35 -0700 Subject: [PATCH 11/13] remove unused changelog sections --- sdk/ai/azure-ai-projects/CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sdk/ai/azure-ai-projects/CHANGELOG.md b/sdk/ai/azure-ai-projects/CHANGELOG.md index 0787a97d4e5f..e789c4523a82 100644 --- a/sdk/ai/azure-ai-projects/CHANGELOG.md +++ b/sdk/ai/azure-ai-projects/CHANGELOG.md @@ -2,10 +2,6 @@ ## 2.8.0 (2026-10-19) -### Features Added - -### Breaking Changes - ### Bugs Fixed - Fixed typed asynchronous list operations to forward the page-size hint supplied through `PagedFlux.byPage(...)`, From 4320b558e0ed88f3aea7cc319f023abd39a25e71 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Mon, 19 Oct 2026 13:30:36 -0700 Subject: [PATCH 12/13] Clarify GenAI tracing sample documentation Describe current tracing configuration without implementation-history comparisons and synchronize the README sample. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 949a06a4-5a12-463d-9ab8-ebfad63a8236 --- sdk/ai/azure-ai-agents/README.md | 10 +++++----- .../telemetry/GenAiInstrumentation.java | 7 +++---- .../azure/ai/agents/TracingAzureMonitorSample.java | 8 ++++---- .../com/azure/ai/agents/TracingConsoleSample.java | 11 +++++------ .../java/com/azure/ai/agents/TracingSample.java | 13 +++++++------ 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/sdk/ai/azure-ai-agents/README.md b/sdk/ai/azure-ai-agents/README.md index 13d458c6c5b6..e8048423ebf8 100644 --- a/sdk/ai/azure-ai-agents/README.md +++ b/sdk/ai/azure-ai-agents/README.md @@ -1118,10 +1118,10 @@ Always ensure that the chosen API version is fully supported and operational for ## Tracing `azure-ai-agents` emits experimental [OpenTelemetry GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/) spans -and metrics for agent creation, response (`chat` / `invoke_agent`) and conversation operations. To use this +and metrics for agent creation and response (`chat` / `invoke_agent`) operations. To use this experimental feature, set `AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true` and configure an OpenTelemetry implementation -for the client through `ClientOptions` or globally. There is no programmatic opt-in call or process-global mutable -tracing state. Customer-controlled prompts, responses, messages, instructions, function arguments, tool results, and +for the client through `ClientOptions` or globally. +Customer-controlled prompts, responses, messages, instructions, function arguments, tool results, and equivalent agent content are omitted unless you also set `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`. Review your privacy requirements before enabling content recording. The former `AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED` setting remains available as a compatibility @@ -1132,8 +1132,8 @@ asynchronous streaming. Streaming spans remain open until the stream completes, fails, is cancelled, or is explicitly closed. ```java com.azure.ai.agents.tracing -// Configure any OpenTelemetry SDK (exporters, sampling, etc.) and pass it through ClientOptions. The client -// then emits GenAI spans (create_agent, chat / invoke_agent, create_conversation) and metrics automatically. +// Set AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true before running this sample. +// Configure OpenTelemetry exporters and sampling, then pass the SDK through ClientOptions. OpenTelemetrySdk openTelemetry = OpenTelemetrySdk.builder().build(); AgentsClient agentsClient = new AgentsClientBuilder().endpoint(endpoint) .credential(new DefaultAzureCredentialBuilder().build()) diff --git a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiInstrumentation.java b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiInstrumentation.java index a0d06239ba2b..80c85260c08a 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiInstrumentation.java +++ b/sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/telemetry/GenAiInstrumentation.java @@ -40,10 +40,9 @@ * histograms) that the client builder created from {@code ClientOptions} tracing/metrics options, along with the * resolved endpoint host/port and the content-recording flag. * - *

This replaces the process-global static state used elsewhere: an instance is created per client by - * {@code AgentsClientBuilder} and injected into the clients. Tracing/metrics are emitted only when an - * OpenTelemetry implementation is configured for the process (i.e. {@link Tracer#isEnabled()} or a histogram is - * enabled).

+ *

An instance is created per client by {@code AgentsClientBuilder} and injected into the clients. + * Tracing and metrics are emitted only when experimental GenAI instrumentation is enabled and the configured + * {@link Tracer} or a histogram is enabled.

*/ public final class GenAiInstrumentation { diff --git a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingAzureMonitorSample.java b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingAzureMonitorSample.java index 12ccaacfea3b..8dfae6b66901 100644 --- a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingAzureMonitorSample.java +++ b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingAzureMonitorSample.java @@ -21,10 +21,10 @@ /** * Sample demonstrating GenAI tracing exported to Azure Monitor (Application Insights). * - *

As with the console sample, there is no {@code enableGenAiTracing()} opt-in: tracing activates automatically - * once OpenTelemetry is configured (here via Azure Monitor autoconfigure, registered globally). Set the - * {@code AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED} environment variable to {@code true} to also capture - * message/agent content.

+ *

Set {@code AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true} to enable experimental GenAI tracing. This sample + * configures OpenTelemetry globally through Azure Monitor autoconfigure. Message and agent content capture is + * disabled by default; set {@code OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true} to enable it. + * Review your privacy requirements before enabling content capture.

* *

Prerequisites:

*
    diff --git a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingConsoleSample.java b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingConsoleSample.java index 183b17c4238a..6d1a61596a23 100644 --- a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingConsoleSample.java +++ b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingConsoleSample.java @@ -20,11 +20,10 @@ /** * Sample demonstrating GenAI tracing exported to the console. * - *

    Unlike the original experimental design, there is no {@code enableGenAiTracing()} / {@code disableGenAiTracing()} - * opt-in: tracing activates automatically once an OpenTelemetry implementation is configured (here registered - * globally). To also capture message/agent content, set the - * {@code AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED} environment variable to {@code true} (it is off by - * default).

    + *

    Set {@code AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true} to enable experimental GenAI tracing. This sample + * configures an OpenTelemetry implementation globally with a console span exporter. Message and agent content + * capture is disabled by default; set {@code OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true} to enable it. + * Review your privacy requirements before enabling content capture.

    * *

    To run this sample, add these dependencies to your project:

    *
      @@ -54,7 +53,7 @@ public static void main(String[] args) { OpenTelemetrySdk openTelemetry = OpenTelemetrySdk.builder().setTracerProvider(tracerProvider).buildAndRegisterGlobal(); - // 2. Build the clients. No tracing opt-in call is required; the configured OpenTelemetry is picked up. + // 2. Build the clients using the globally configured OpenTelemetry implementation. String endpoint = System.getenv("FOUNDRY_PROJECT_ENDPOINT"); String model = System.getenv("FOUNDRY_MODEL_NAME"); AgentsClientBuilder builder diff --git a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingSample.java b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingSample.java index cddd632eb604..bd6fb8f97118 100644 --- a/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingSample.java +++ b/sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/TracingSample.java @@ -12,10 +12,11 @@ import io.opentelemetry.sdk.OpenTelemetrySdk; /** - * Sample showing how experimental GenAI tracing is enabled for {@link AgentsClient} by configuring an OpenTelemetry - * implementation through the client's {@link ClientOptions}. When an OpenTelemetry SDK is configured the client emits - * GenAI semantic-convention spans and metrics automatically; there is no explicit opt-in call. Set the - * {@code AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED} environment variable to also capture message/agent content. + * Sample showing how to configure OpenTelemetry tracing for {@link AgentsClient} through the client's + * {@link ClientOptions}. Set {@code AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true} to enable experimental GenAI spans. + * Message and agent content capture is disabled by default; set + * {@code OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true} to enable it. + * Review your privacy requirements before enabling content capture. */ public final class TracingSample { @@ -28,8 +29,8 @@ public static void main(String[] args) { String endpoint = System.getenv("FOUNDRY_PROJECT_ENDPOINT"); // BEGIN: com.azure.ai.agents.tracing - // Configure any OpenTelemetry SDK (exporters, sampling, etc.) and pass it through ClientOptions. The client - // then emits GenAI spans (create_agent, chat / invoke_agent, create_conversation) and metrics automatically. + // Set AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING=true before running this sample. + // Configure OpenTelemetry exporters and sampling, then pass the SDK through ClientOptions. OpenTelemetrySdk openTelemetry = OpenTelemetrySdk.builder().build(); AgentsClient agentsClient = new AgentsClientBuilder().endpoint(endpoint) .credential(new DefaultAzureCredentialBuilder().build()) From 15cdbe273e58ff7eddb49ec440eda17278f15b71 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Mon, 19 Oct 2026 13:31:24 -0700 Subject: [PATCH 13/13] Revert main merge from Foundry 2.8.0 release branch This reverts commit 01911619c8ef0e7976c983c37e4aa63da2a31a73, reversing changes made to ea4ed2a1e80166649a0da4fc795e524a711ee9e3. Restore the emitter-based release baseline without the unreleased Core and Netty upgrades. Preserve subsequent changelog cleanup and tracing documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 949a06a4-5a12-463d-9ab8-ebfad63a8236 --- .github/CODEOWNERS | 9 + common/perf-test-core/pom.xml | 2 +- docs/contributor/building.md | 20 - eng/common/pipelines/live-eval.yml | 11 +- eng/common/pipelines/skill-eval.yml | 15 +- .../jobs/apireview-hub-build-tools-base.yml | 92 - .../apireview-hub-generate-artifact-base.yml | 213 - .../templates/jobs/apireview-hub-job-base.yml | 89 + .../pipelines/templates/jobs/eval-shard.yml | 29 +- .../templates/jobs/eval-summarize.yml | 63 +- .../stages/archetype-auto-release-prepare.yml | 2 +- .../templates/stages/archetype-eval.yml | 15 +- .../steps/apireview-hub-failure-callback.yml | 70 - .../create-apireview-hub-artifacts-base.yml | 118 + .../pipelines/templates/steps/eval-invoke.yml | 12 +- .../templates/steps/eval-publish-results.yml | 59 - .../templates/steps/login-to-copilot.yml | 11 - .../templates/steps/login-to-github.yml | 8 +- .../steps/mark-release-completion.yml | 7 +- eng/common/pipelines/workflow-eval.yml | 15 +- .../scripts/Mark-ReleasePlanCompletion.ps1 | 113 +- .../scripts/Resolve-AutoReleasePackages.ps1 | 9 +- eng/common/scripts/eval/README.md | 169 +- eng/common/scripts/eval/build-eval-summary.ts | 98 +- eng/common/scripts/eval/lib/shard-results.ts | 271 - .../scripts/eval/publisher/CHANGELOG.md | 17 - .../eval/publisher/Publish-EvalResults.ps1 | 135 - eng/common/scripts/eval/publisher/bundle.ts | 201 - .../scripts/eval/publisher/package.json | 17 - .../scripts/eval/publisher/pnpm-lock.yaml | 22 - .../eval/publisher/test/publisher.test.ts | 376 - .../scripts/eval/test/shard-results.test.ts | 530 - eng/common/scripts/login-to-github.ps1 | 56 +- eng/pipelines/scripts/sync_emitter.py | 1 + eng/pipelines/templates/jobs/ci.yml | 1 - .../Compare-CurrentToCodegeneration.ps1 | 5 + .../aggregate_javadoc_configuration.txt | 3 + eng/versioning/external_dependencies.txt | 37 +- ...upported_external_dependency_versions.json | 8 +- eng/versioning/version_client.txt | 47 +- pom.xml | 6 + sdk/ai/azure-ai-agents/pom.xml | 32 +- .../src/main/java/module-info.java | 1 - sdk/ai/azure-ai-projects/pom.xml | 2 +- .../azure-ai-anomalydetector/CHANGELOG.md | 85 + .../azure-ai-anomalydetector/README.md | 247 + .../azure-ai-anomalydetector/assets.json | 6 + .../checkstyle-suppressions.xml | 6 + .../azure-ai-anomalydetector/pom.xml | 72 + .../spotbugs-exclude.xml | 7 + .../AnomalyDetectorClientBuilder.java | 356 + .../AnomalyDetectorServiceVersion.java | 40 + .../MultivariateAsyncClient.java | 883 + .../anomalydetector/MultivariateClient.java | 849 + .../UnivariateAsyncClient.java | 285 + .../ai/anomalydetector/UnivariateClient.java | 301 + .../AnomalyDetectorClientImpl.java | 148 + .../implementation/MultivariatesImpl.java | 1800 + .../implementation/UnivariatesImpl.java | 531 + .../implementation/package-info.java | 18 + .../ai/anomalydetector/models/AlignMode.java | 57 + .../anomalydetector/models/AlignPolicy.java | 155 + .../models/AnomalyDetectionModel.java | 156 + .../models/AnomalyInterpretation.java | 119 + .../anomalydetector/models/AnomalyState.java | 131 + .../anomalydetector/models/AnomalyValue.java | 152 + .../models/CorrelationChanges.java | 81 + .../ai/anomalydetector/models/DataSchema.java | 60 + .../models/DiagnosticsInfo.java | 100 + .../anomalydetector/models/ErrorResponse.java | 104 + .../anomalydetector/models/FillNAMethod.java | 75 + .../ai/anomalydetector/models/ImputeMode.java | 81 + .../ai/anomalydetector/models/ModelInfo.java | 345 + .../ai/anomalydetector/models/ModelState.java | 148 + .../anomalydetector/models/ModelStatus.java | 69 + .../MultivariateBatchDetectionOptions.java | 185 + ...ltivariateBatchDetectionResultSummary.java | 154 + .../MultivariateBatchDetectionStatus.java | 69 + .../models/MultivariateDetectionResult.java | 127 + .../MultivariateLastDetectionOptions.java | 126 + .../MultivariateLastDetectionResult.java | 102 + .../models/TimeGranularity.java | 99 + .../models/TimeSeriesPoint.java | 121 + ...UnivariateChangePointDetectionOptions.java | 266 + .../UnivariateChangePointDetectionResult.java | 128 + .../models/UnivariateDetectionOptions.java | 354 + .../UnivariateEntireDetectionResult.java | 249 + .../models/UnivariateLastDetectionResult.java | 283 + .../anomalydetector/models/VariableState.java | 161 + .../models/VariableValues.java | 127 + .../anomalydetector/models/package-info.java | 25 + .../ai/anomalydetector/package-info.java | 17 + .../src/main/java/module-info.java | 12 + ...ai-anomalydetector_apiview_properties.json | 73 + .../azure-ai-anomalydetector_metadata.json | 1 + .../main/resources/anomalydetector.properties | 2 + .../azure-ai-anomalydetector.properties | 2 + .../src/samples/README.md | 59 + .../DetectAnomaliesEntireSeries.java | 68 + .../DetectAnomaliesLastPoint.java | 51 + .../anomalydetector/DetectChangePoints.java | 59 + .../anomalydetector/MultivariateSample.java | 185 + .../ai/anomalydetector/ReadmeSamples.java | 27 + .../azure/ai/anomalydetector/SampleUtils.java | 47 + .../CreateAndTrainMultivariateModel.java | 37 + .../generated/DeleteMultivariateModel.java | 22 + .../DetectMultivariateBatchAnomaly.java | 30 + .../DetectMultivariateLastAnomaly.java | 77 + .../generated/DetectUnivariateLastPoint.java | 83 + .../generated/GetAMultivariateModel.java | 24 + .../GetMultivariateBatchDetectionResult.java | 24 + .../generated/ListMultivariateModels.java | 24 + .../UnivariateDetectEntireSeries.java | 29 + .../UnivariateDetectionOfAChangePoint.java | 290 + .../samples/java/sample_data/request-data.csv | 47 + .../java/sample_data/request-data.json | 51 + .../java/sample_data/sync_infer_body.json | 12545 ++++++ .../AnomalyDetectorClientTest.java | 59 + .../AnomalyDetectorClientTestBase.java | 73 + ...MultivariateAnomalyDetectorClientTest.java | 37 + .../AnomalyDetectorClientTestBase.java | 46 + .../CreateAndTrainMultivariateModelTests.java | 64 + .../DeleteMultivariateModelTests.java | 18 + .../DetectMultivariateBatchAnomalyTests.java | 53 + .../DetectMultivariateLastAnomalyTests.java | 103 + .../DetectUnivariateLastPointTests.java | 101 + .../generated/GetAMultivariateModelTests.java | 88 + ...MultivariateBatchDetectionResultTests.java | 67 + .../ListMultivariateModelsTests.java | 90 + .../UnivariateDetectEntireSeriesTests.java | 28 + ...nivariateDetectionOfAChangePointTests.java | 299 + .../test-resources.json | 93 + .../azure-ai-anomalydetector/tests.yml | 10 + .../tsp-location.yaml | 3 + sdk/anomalydetector/ci.yml | 36 + sdk/anomalydetector/cspell.yml | 9 + sdk/anomalydetector/pom.xml | 14 + .../azure-resourcemanager-appservice/pom.xml | 2 +- .../azure-security-attestation/pom.xml | 1 - .../CHANGELOG.md | 456 +- .../README.md | 4 +- .../SAMPLE.md | 2014 +- .../pom.xml | 5 +- .../azurestackhci/AzureStackHciManager.java | 214 - .../fluent/AzureStackHciManagementClient.java | 91 - .../fluent/ClusterJobsClient.java | 199 - .../EdgeMachineDeploymentSettingsClient.java | 207 - .../fluent/EdgeMachineDiskJobsClient.java | 215 - .../EdgeMachineDiskPrivilegedJobsClient.java | 220 - .../fluent/EdgeMachineDisksClient.java | 199 - .../fluent/EdgeMachineJobsClient.java | 199 - .../EdgeMachineNetworkAdapterJobsClient.java | 220 - .../EdgeMachineNetworkAdaptersClient.java | 77 - ...chineSecuritySettingsOperationsClient.java | 206 - .../fluent/EdgeMachineVolumesClient.java | 199 - .../fluent/EdgeMachinesClient.java | 447 - .../azurestackhci/fluent/OsImagesClient.java | 69 - .../fluent/OwnershipVouchersClient.java | 48 - .../fluent/models/ClusterInner.java | 10 - .../fluent/models/ClusterJobInner.java | 155 - .../fluent/models/ClusterProperties.java | 17 - .../EdgeMachineDeploymentSettingInner.java | 157 - .../fluent/models/EdgeMachineDiskInner.java | 155 - .../models/EdgeMachineDiskJobInner.java | 155 - .../EdgeMachineDiskPrivilegedJobInner.java | 157 - .../fluent/models/EdgeMachineInner.java | 209 - .../fluent/models/EdgeMachineJobInner.java | 155 - .../EdgeMachineNetworkAdapterInner.java | 146 - .../EdgeMachineNetworkAdapterJobInner.java | 157 - .../EdgeMachineSecuritySettingsInner.java | 157 - .../EdgeMachineValidateResponseInner.java | 74 - .../fluent/models/EdgeMachineVolumeInner.java | 155 - .../fluent/models/OsImageInner.java | 144 - ...alidateOwnershipVouchersResponseInner.java | 83 - .../AzureStackHciManagementClientImpl.java | 210 +- .../implementation/ClusterImpl.java | 5 - .../implementation/ClusterJobImpl.java | 129 - .../implementation/ClusterJobsClientImpl.java | 750 - .../implementation/ClusterJobsImpl.java | 152 - .../EdgeMachineDeploymentSettingImpl.java | 131 - ...geMachineDeploymentSettingsClientImpl.java | 791 - .../EdgeMachineDeploymentSettingsImpl.java | 161 - .../implementation/EdgeMachineDiskImpl.java | 129 - .../EdgeMachineDiskJobImpl.java | 134 - .../EdgeMachineDiskJobsClientImpl.java | 808 - .../EdgeMachineDiskJobsImpl.java | 176 - .../EdgeMachineDiskPrivilegedJobImpl.java | 140 - ...geMachineDiskPrivilegedJobsClientImpl.java | 823 - .../EdgeMachineDiskPrivilegedJobsImpl.java | 182 - .../EdgeMachineDisksClientImpl.java | 764 - .../implementation/EdgeMachineDisksImpl.java | 153 - .../implementation/EdgeMachineImpl.java | 218 - .../implementation/EdgeMachineJobImpl.java | 129 - .../EdgeMachineJobsClientImpl.java | 763 - .../implementation/EdgeMachineJobsImpl.java | 153 - .../EdgeMachineNetworkAdapterImpl.java | 50 - .../EdgeMachineNetworkAdapterJobImpl.java | 140 - ...geMachineNetworkAdapterJobsClientImpl.java | 824 - .../EdgeMachineNetworkAdapterJobsImpl.java | 182 - .../EdgeMachineNetworkAdaptersClientImpl.java | 373 - .../EdgeMachineNetworkAdaptersImpl.java | 68 - .../EdgeMachineSecuritySettingsImpl.java | 131 - ...eSecuritySettingsOperationsClientImpl.java | 789 - ...MachineSecuritySettingsOperationsImpl.java | 160 - .../EdgeMachineValidateResponseImpl.java | 32 - .../implementation/EdgeMachineVolumeImpl.java | 130 - .../EdgeMachineVolumesClientImpl.java | 770 - .../EdgeMachineVolumesImpl.java | 153 - .../EdgeMachinesClientImpl.java | 1667 - .../implementation/EdgeMachinesImpl.java | 183 - .../implementation/OsImageImpl.java | 49 - .../implementation/OsImagesClientImpl.java | 344 - .../implementation/OsImagesImpl.java | 62 - .../OwnershipVouchersClientImpl.java | 159 - .../implementation/OwnershipVouchersImpl.java | 56 - ...ValidateOwnershipVouchersResponseImpl.java | 40 - .../models/ClusterJobListResult.java | 95 - ...dgeMachineDeploymentSettingListResult.java | 98 - .../models/EdgeMachineDiskJobListResult.java | 96 - .../models/EdgeMachineDiskListResult.java | 96 - ...dgeMachineDiskPrivilegedJobListResult.java | 98 - .../models/EdgeMachineJobListResult.java | 96 - .../models/EdgeMachineListResult.java | 95 - ...dgeMachineNetworkAdapterJobListResult.java | 98 - .../EdgeMachineNetworkAdapterListResult.java | 98 - ...EdgeMachineSecuritySettingsListResult.java | 98 - .../models/EdgeMachineVolumeListResult.java | 96 - .../models/OsImageListResult.java | 95 - .../models/AddServerJobServerDetails.java | 172 - ...figurationNetworkAdapterJobProperties.java | 142 - .../azurestackhci/models/Architecture.java | 51 - .../models/AuthenticationType.java | 66 - .../azurestackhci/models/Cluster.java | 7 - .../azurestackhci/models/ClusterJob.java | 189 - .../models/ClusterJobProperties.java | 299 - .../azurestackhci/models/ClusterJobs.java | 144 - .../models/ClusterSdnProperties.java | 131 - .../azurestackhci/models/ConnectionState.java | 71 - .../models/CreateVolumeJobProperties.java | 209 - .../models/DeleteVolumeJobProperties.java | 164 - .../azurestackhci/models/DeploymentStep.java | 67 - .../models/DiskActionStatus.java | 91 - .../models/DiskConfiguration.java | 88 - .../models/DiskDeploymentStep.java | 188 - .../models/DiskFileSystemType.java | 76 - .../models/DiskJobReportedProperties.java | 105 - .../azurestackhci/models/DiskJobType.java | 51 - .../models/DiskReportedProperties.java | 271 - .../azurestackhci/models/DiskState.java | 66 - .../azurestackhci/models/DiskStorageType.java | 51 - .../azurestackhci/models/DiskType.java | 81 - .../models/DiskVolumeConfiguration.java | 142 - .../models/DiskVolumeReportedProperties.java | 217 - .../models/DownloadOsJobProperties.java | 162 - .../models/DownloadOsProfile.java | 253 - .../azurestackhci/models/DownloadRequest.java | 114 - .../azurestackhci/models/EAPMethod.java | 61 - .../azurestackhci/models/EceSecrets.java | 11 - .../azurestackhci/models/EdgeMachine.java | 350 - .../EdgeMachineAdapterPropertyOverrides.java | 113 - .../EdgeMachineCollectLogJobProperties.java | 203 - ...achineCollectLogJobReportedProperties.java | 130 - .../models/EdgeMachineConnectivityStatus.java | 56 - .../EdgeMachineDeploymentConfiguration.java | 118 - .../models/EdgeMachineDeploymentData.java | 147 - .../models/EdgeMachineDeploymentSetting.java | 189 - ...dgeMachineDeploymentSettingProperties.java | 124 - .../models/EdgeMachineDeploymentSettings.java | 147 - .../azurestackhci/models/EdgeMachineDisk.java | 189 - .../models/EdgeMachineDiskJob.java | 190 - .../models/EdgeMachineDiskJobProperties.java | 327 - .../models/EdgeMachineDiskJobs.java | 151 - .../models/EdgeMachineDiskPrivilegedJob.java | 190 - ...dgeMachineDiskPrivilegedJobProperties.java | 329 - .../models/EdgeMachineDiskPrivilegedJobs.java | 153 - .../models/EdgeMachineDiskProperties.java | 118 - .../models/EdgeMachineDisks.java | 144 - .../models/EdgeMachineHostNetwork.java | 133 - .../models/EdgeMachineHostNetworkIntent.java | 347 - .../azurestackhci/models/EdgeMachineJob.java | 189 - .../models/EdgeMachineJobProperties.java | 302 - .../models/EdgeMachineJobType.java | 61 - .../azurestackhci/models/EdgeMachineJobs.java | 144 - .../azurestackhci/models/EdgeMachineKind.java | 51 - .../models/EdgeMachineLifecycleStatus.java | 91 - .../models/EdgeMachineNetworkAdapter.java | 55 - .../models/EdgeMachineNetworkAdapterJob.java | 191 - ...dgeMachineNetworkAdapterJobProperties.java | 334 - .../models/EdgeMachineNetworkAdapterJobs.java | 156 - .../EdgeMachineNetworkAdapterProperties.java | 111 - .../models/EdgeMachineNetworkAdapters.java | 69 - .../models/EdgeMachineNetworkProfile.java | 125 - .../models/EdgeMachineNicDetail.java | 315 - .../models/EdgeMachinePatch.java | 116 - .../models/EdgeMachineProperties.java | 424 - ...EdgeMachineRemoteSupportJobProperties.java | 217 - ...ineRemoteSupportJobReportedProperties.java | 146 - .../EdgeMachineRemoteSupportNodeSettings.java | 143 - .../models/EdgeMachineReportedProperties.java | 232 - .../models/EdgeMachineScaleUnits.java | 86 - .../EdgeMachineSecurityComplianceStatus.java | 144 - .../models/EdgeMachineSecurityProperties.java | 128 - .../models/EdgeMachineSecuritySettings.java | 189 - ...EdgeMachineSecuritySettingsOperations.java | 147 - .../models/EdgeMachineState.java | 86 - .../EdgeMachineStorageAdapterIpInfo.java | 108 - .../models/EdgeMachineStorageNetwork.java | 127 - .../models/EdgeMachineValidateRequest.java | 117 - .../models/EdgeMachineValidateResponse.java | 26 - ...neVirtualSwitchConfigurationOverrides.java | 92 - .../models/EdgeMachineVolume.java | 189 - .../models/EdgeMachineVolumeProperties.java | 119 - .../models/EdgeMachineVolumes.java | 144 - .../EdgeMachineWorkloadInventoryItem.java | 172 - .../azurestackhci/models/EdgeMachines.java | 237 - .../ForcePushNetworkAdapterJobProperties.java | 110 - .../azurestackhci/models/HardwareProfile.java | 185 - .../models/HciAddServerJobProperties.java | 168 - ...iConfigureSdnIntegrationJobProperties.java | 169 - .../azurestackhci/models/HciJobType.java | 56 - .../models/HciNetworkProfile.java | 16 - .../models/HciRepairServerJobProperties.java | 169 - .../azurestackhci/models/InterfaceState.java | 51 - .../azurestackhci/models/IpAddressRange.java | 114 - .../models/IpAssignmentType.java | 51 - .../azurestackhci/models/IpInterfaceType.java | 51 - .../models/IscsiAdapterIPConfig.java | 173 - .../models/IscsiAdapterProperties.java | 143 - .../models/IscsiChapSettings.java | 85 - .../azurestackhci/models/IscsiChapType.java | 56 - .../azurestackhci/models/IscsiConfig.java | 141 - .../models/IscsiNetworkConfig.java | 117 - .../models/IscsiTargetPortalAddress.java | 113 - .../models/JobReportedProperties.java | 105 - .../models/LifecycleDetails.java | 93 - .../models/LifecycleOperationStatus.java | 61 - .../azurestackhci/models/LifecycleStage.java | 194 - .../azurestackhci/models/LifecycleStatus.java | 143 - .../azurestackhci/models/Metadata.java | 92 - .../azurestackhci/models/NetworkAdapter.java | 314 - .../models/NetworkAdapterActionStatus.java | 92 - .../models/NetworkAdapterConfiguration.java | 316 - .../models/NetworkAdapterDeploymentStep.java | 189 - .../NetworkAdapterJobReportedProperties.java | 110 - .../models/NetworkAdapterJobType.java | 56 - .../models/NetworkAdapterOperationStatus.java | 56 - .../NetworkAdapterProvisioningStatus.java | 91 - .../NetworkAdapterReportedProperties.java | 441 - .../models/NetworkAdapterStatus.java | 106 - .../models/NetworkConfiguration.java | 89 - .../models/NetworkInterfaceType.java | 51 - .../azurestackhci/models/NodeStorageType.java | 56 - .../azurestackhci/models/OSOperationType.java | 61 - .../models/OnboardingConfiguration.java | 197 - .../models/OnboardingResourceType.java | 46 - .../azurestackhci/models/OperationDetail.java | 170 - .../azurestackhci/models/OsImage.java | 55 - .../models/OsImageProperties.java | 159 - .../azurestackhci/models/OsImages.java | 62 - .../azurestackhci/models/OsProfile.java | 186 - .../models/OsProvisionProfile.java | 281 - .../azurestackhci/models/OwnerKeyType.java | 46 - .../models/OwnershipVoucherDetails.java | 131 - .../OwnershipVoucherValidationDetails.java | 215 - .../OwnershipVoucherValidationStatus.java | 51 - .../models/OwnershipVouchers.java | 42 - .../models/PrivilegedJobType.java | 46 - .../models/ProvisionOsJobProperties.java | 162 - .../models/ProvisionOsReportedProperties.java | 106 - .../models/ProvisioningDetails.java | 116 - .../models/ProvisioningOsType.java | 51 - .../models/ProvisioningRequest.java | 228 - .../models/RepairServerJobServerDetails.java | 116 - .../models/ResolutionStrategy.java | 51 - .../models/SdnIntegrationIntent.java | 51 - .../azurestackhci/models/SdnProperties.java | 112 - .../azurestackhci/models/SdnStatus.java | 60 - .../azurestackhci/models/SecretType.java | 51 - .../azurestackhci/models/SiteDetails.java | 114 - .../azurestackhci/models/SolutionType.java | 51 - .../models/StorageConfiguration.java | 85 - .../models/StorageInitiator.java | 164 - .../models/StorageInitiatorType.java | 56 - .../azurestackhci/models/StorageProfile.java | 73 - .../SyncConfigurationJobProperties.java | 139 - ...figurationNetworkAdapterJobProperties.java | 142 - .../models/TargetDeviceConfiguration.java | 197 - .../models/TimeConfiguration.java | 141 - .../azurestackhci/models/UserDetails.java | 172 - .../ValidateOwnershipVouchersRequest.java | 92 - .../ValidateOwnershipVouchersResponse.java | 28 - .../models/VolumeConfiguration.java | 85 - .../models/VolumeReportedProperties.java | 201 - .../models/WebProxyConfiguration.java | 143 - .../WifiConfigurationDesiredProperties.java | 200 - .../WifiConfigurationReportedProperties.java | 181 - .../azurestackhci/models/WifiSecret.java | 141 - .../azurestackhci/models/WifiSecretType.java | 56 - ...esourcemanager-azurestackhci_metadata.json | 2 +- .../proxy-config.json | 2 +- ...entAndInstallDefaultExtensionsSamples.java | 2 +- .../ArcSettingsCreateIdentitySamples.java | 2 +- .../generated/ArcSettingsCreateSamples.java | 2 +- .../generated/ArcSettingsDeleteSamples.java | 2 +- .../ArcSettingsGeneratePasswordSamples.java | 2 +- .../generated/ArcSettingsGetSamples.java | 2 +- ...ttingsInitializeDisableProcessSamples.java | 2 +- .../ArcSettingsListByClusterSamples.java | 2 +- .../ArcSettingsReconcileSamples.java | 2 +- .../generated/ArcSettingsUpdateSamples.java | 2 +- .../ClusterJobsCreateOrUpdateSamples.java | 95 - .../generated/ClusterJobsDeleteSamples.java | 23 - .../generated/ClusterJobsGetSamples.java | 50 - .../generated/ClusterJobsListSamples.java | 22 - ...ClustersConfigureRemoteSupportSamples.java | 2 +- .../ClustersCreateIdentitySamples.java | 2 +- .../generated/ClustersCreateSamples.java | 2 +- .../generated/ClustersDeleteSamples.java | 2 +- ...ExtendSoftwareAssuranceBenefitSamples.java | 2 +- .../ClustersGetByResourceGroupSamples.java | 2 +- .../ClustersListByResourceGroupSamples.java | 2 +- .../generated/ClustersListSamples.java | 2 +- .../ClustersTriggerLogCollectionSamples.java | 2 +- .../generated/ClustersUpdateSamples.java | 2 +- ...ClustersUpdateSecretsLocationsSamples.java | 2 +- .../ClustersUploadCertificateSamples.java | 2 +- ...ploymentSettingsCreateOrUpdateSamples.java | 8 +- .../DeploymentSettingsDeleteSamples.java | 2 +- .../DeploymentSettingsGetSamples.java | 2 +- ...ploymentSettingsListByClustersSamples.java | 2 +- .../EdgeDeviceJobsCreateOrUpdateSamples.java | 4 +- .../EdgeDeviceJobsDeleteSamples.java | 2 +- .../generated/EdgeDeviceJobsGetSamples.java | 2 +- ...EdgeDeviceJobsListByEdgeDeviceSamples.java | 2 +- .../EdgeDevicesCreateOrUpdateSamples.java | 2 +- .../generated/EdgeDevicesDeleteSamples.java | 2 +- .../generated/EdgeDevicesGetSamples.java | 2 +- .../generated/EdgeDevicesListSamples.java | 2 +- .../generated/EdgeDevicesValidateSamples.java | 2 +- ...ploymentSettingsCreateOrUpdateSamples.java | 65 - ...achineDeploymentSettingsDeleteSamples.java | 24 - ...geMachineDeploymentSettingsGetSamples.java | 24 - ...ymentSettingsListByEdgeMachineSamples.java | 24 - ...eMachineDiskJobsCreateOrUpdateSamples.java | 34 - .../EdgeMachineDiskJobsDeleteSamples.java | 23 - .../EdgeMachineDiskJobsGetSamples.java | 24 - .../EdgeMachineDiskJobsListSamples.java | 22 - ...skPrivilegedJobsCreateOrUpdateSamples.java | 32 - ...achineDiskPrivilegedJobsDeleteSamples.java | 24 - ...geMachineDiskPrivilegedJobsGetSamples.java | 24 - ...eMachineDiskPrivilegedJobsListSamples.java | 24 - ...EdgeMachineDisksCreateOrUpdateSamples.java | 36 - .../EdgeMachineDisksDeleteSamples.java | 22 - .../generated/EdgeMachineDisksGetSamples.java | 23 - .../EdgeMachineDisksListSamples.java | 22 - .../EdgeMachineJobsCreateOrUpdateSamples.java | 211 - .../EdgeMachineJobsDeleteSamples.java | 24 - .../generated/EdgeMachineJobsGetSamples.java | 52 - .../generated/EdgeMachineJobsListSamples.java | 23 - ...tworkAdapterJobsCreateOrUpdateSamples.java | 43 - ...achineNetworkAdapterJobsDeleteSamples.java | 24 - ...geMachineNetworkAdapterJobsGetSamples.java | 25 - ...eMachineNetworkAdapterJobsListSamples.java | 24 - .../EdgeMachineNetworkAdaptersGetSamples.java | 24 - ...EdgeMachineNetworkAdaptersListSamples.java | 23 - ...ttingsOperationsCreateOrUpdateSamples.java | 29 - ...curitySettingsOperationsDeleteSamples.java | 24 - ...eSecuritySettingsOperationsGetSamples.java | 24 - ...ngsOperationsListByEdgeMachineSamples.java | 24 - ...geMachineVolumesCreateOrUpdateSamples.java | 31 - .../EdgeMachineVolumesDeleteSamples.java | 22 - .../EdgeMachineVolumesGetSamples.java | 23 - .../EdgeMachineVolumesListSamples.java | 22 - .../EdgeMachinesCreateOrUpdateSamples.java | 34 - .../generated/EdgeMachinesDeleteSamples.java | 23 - ...EdgeMachinesGetByResourceGroupSamples.java | 23 - ...dgeMachinesListByResourceGroupSamples.java | 23 - .../generated/EdgeMachinesListSamples.java | 23 - ...chinesRefreshApplicableUpdatesSamples.java | 23 - ...achinesRefreshSecuritySettingsSamples.java | 23 - .../generated/EdgeMachinesUpdateSamples.java | 41 - .../EdgeMachinesValidateSamples.java | 29 - .../generated/ExtensionsCreateSamples.java | 2 +- .../generated/ExtensionsDeleteSamples.java | 2 +- .../generated/ExtensionsGetSamples.java | 2 +- .../ExtensionsListByArcSettingSamples.java | 2 +- .../generated/ExtensionsUpdateSamples.java | 2 +- .../generated/ExtensionsUpgradeSamples.java | 2 +- .../generated/OffersGetSamples.java | 2 +- .../generated/OffersListByClusterSamples.java | 2 +- .../OffersListByPublisherSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- .../generated/OsImagesGetSamples.java | 22 - ...BySubscriptionLocationResourceSamples.java | 23 - .../OwnershipVouchersValidateSamples.java | 33 - ...SecuritySettingsCreateOrUpdateSamples.java | 2 +- .../SecuritySettingsDeleteSamples.java | 2 +- .../generated/SecuritySettingsGetSamples.java | 2 +- ...SecuritySettingsListByClustersSamples.java | 2 +- .../generated/SkusGetSamples.java | 2 +- .../generated/SkusListByOfferSamples.java | 2 +- .../generated/UpdateRunsDeleteSamples.java | 2 +- .../generated/UpdateRunsGetSamples.java | 2 +- .../generated/UpdateRunsListSamples.java | 2 +- .../generated/UpdateRunsPutSamples.java | 2 +- ...UpdateSummariesOperationDeleteSamples.java | 2 +- .../UpdateSummariesOperationGetSamples.java | 2 +- ...ariesOperationGroupCheckHealthSamples.java | 2 +- ...riesOperationGroupCheckUpdatesSamples.java | 4 +- .../UpdateSummariesOperationListSamples.java | 2 +- .../UpdateSummariesOperationPutSamples.java | 2 +- .../generated/UpdatesDeleteSamples.java | 2 +- .../generated/UpdatesGetSamples.java | 2 +- .../generated/UpdatesListSamples.java | 2 +- .../generated/UpdatesPostSamples.java | 2 +- .../generated/UpdatesPrepareSamples.java | 2 +- .../generated/UpdatesPutSamples.java | 2 +- .../ValidatedSolutionRecipesGetSamples.java | 2 +- ...BySubscriptionLocationResourceSamples.java | 2 +- .../AddServerJobServerDetailsTests.java | 35 - .../ArcConnectivityPropertiesTests.java | 10 +- .../ArcIdentityResponseInnerTests.java | 2 +- .../ArcIdentityResponsePropertiesTests.java | 10 +- .../generated/ArcSettingInnerTests.java | 41 +- .../generated/ArcSettingListTests.java | 18 +- .../generated/ArcSettingPropertiesTests.java | 41 +- ...efaultExtensionsWithResponseMockTests.java | 19 +- .../ArcSettingsCreateIdentityMockTests.java | 4 +- ...rcSettingsCreateWithResponseMockTests.java | 31 +- .../generated/ArcSettingsDeleteMockTests.java | 2 +- .../ArcSettingsGetWithResponseMockTests.java | 18 +- ...ingsInitializeDisableProcessMockTests.java | 2 +- .../ArcSettingsListByClusterMockTests.java | 16 +- .../ArcSettingsPatchPropertiesTests.java | 9 +- .../generated/ArcSettingsPatchTests.java | 24 +- .../ArcSettingsReconcileMockTests.java | 20 +- .../generated/AssemblyInfoPayloadTests.java | 5 +- .../generated/AssemblyInfoTests.java | 2 +- .../generated/CheckUpdatesRequestTests.java | 8 +- .../ClusterBillingPropertiesTests.java | 8 +- .../ClusterDesiredPropertiesTests.java | 8 +- .../ClusterIdentityResponseInnerTests.java | 2 +- ...lusterIdentityResponsePropertiesTests.java | 10 +- .../generated/ClusterJobListResultTests.java | 21 - .../ClusterJobsCreateOrUpdateMockTests.java | 43 - .../ClusterJobsGetWithResponseMockTests.java | 40 - .../generated/ClusterJobsListMockTests.java | 40 - .../generated/ClusterNodeTests.java | 2 +- .../ClusterPatchPropertiesTests.java | 26 +- .../generated/ClusterPatchTests.java | 46 +- .../ClusterReportedPropertiesTests.java | 4 +- .../generated/ClusterSdnPropertiesTests.java | 17 - .../ClustersCreateIdentityMockTests.java | 4 +- .../generated/ClustersDeleteMockTests.java | 2 +- .../DefaultExtensionDetailsTests.java | 2 +- .../generated/DeploymentClusterTests.java | 32 +- ...tSettingAdapterPropertyOverridesTests.java | 22 +- .../DeploymentSettingHostNetworkTests.java | 272 +- .../DeploymentSettingIntentsTests.java | 74 +- .../DeploymentSettingListResultTests.java | 10 +- ...ymentSettingStorageAdapterIpInfoTests.java | 21 +- ...DeploymentSettingStorageNetworksTests.java | 50 +- ...tualSwitchConfigurationOverridesTests.java | 14 +- ...oymentSettingsCreateOrUpdateMockTests.java | 25 +- ...ymentSettingsGetWithResponseMockTests.java | 10 +- ...oymentSettingsListByClustersMockTests.java | 8 +- .../generated/DeploymentStepTests.java | 17 + .../generated/DeviceConfigurationTests.java | 72 +- .../generated/DiskActionStatusTests.java | 17 - .../generated/DiskConfigurationTests.java | 36 - .../generated/DiskDeploymentStepTests.java | 17 - .../DiskJobReportedPropertiesTests.java | 17 - .../DiskReportedPropertiesTests.java | 17 - .../DiskVolumeConfigurationTests.java | 33 - .../DiskVolumeReportedPropertiesTests.java | 17 - .../generated/DnsZonesTests.java | 14 +- .../generated/EceActionStatusTests.java | 17 + .../generated/EceReportedPropertiesTests.java | 17 + .../generated/EdgeDeviceDisksTests.java | 2 +- .../generated/EdgeDeviceInnerTests.java | 7 +- .../generated/EdgeDeviceJobInnerTests.java | 2 +- .../EdgeDeviceJobListResultTests.java | 4 +- ...EdgeDeviceJobsCreateOrUpdateMockTests.java | 6 +- ...dgeDeviceJobsGetWithResponseMockTests.java | 4 +- ...geDeviceJobsListByEdgeDeviceMockTests.java | 6 +- .../generated/EdgeDeviceListResultTests.java | 4 +- .../generated/EdgeDevicePropertiesTests.java | 117 +- .../EdgeDevicesCreateOrUpdateMockTests.java | 5 +- .../EdgeDevicesGetWithResponseMockTests.java | 4 +- .../generated/EdgeDevicesListMockTests.java | 5 +- .../EdgeDevicesValidateMockTests.java | 8 +- ...eMachineAdapterPropertyOverridesTests.java | 18 - ...chineDeploymentSettingListResultTests.java | 30 - ...oymentSettingsCreateOrUpdateMockTests.java | 55 - ...ymentSettingsGetWithResponseMockTests.java | 42 - ...entSettingsListByEdgeMachineMockTests.java | 50 - .../generated/EdgeMachineDiskInnerTests.java | 52 - .../EdgeMachineDiskListResultTests.java | 23 - .../EdgeMachineDiskPropertiesTests.java | 41 - ...geMachineDisksCreateOrUpdateMockTests.java | 60 - ...eMachineDisksGetWithResponseMockTests.java | 43 - .../EdgeMachineDisksListMockTests.java | 45 - .../EdgeMachineHostNetworkIntentTests.java | 17 - .../EdgeMachineHostNetworkTests.java | 17 - .../EdgeMachineNetworkProfileTests.java | 17 - .../generated/EdgeMachineNicDetailTests.java | 17 - .../generated/EdgeMachinePatchTests.java | 48 - ...MachineRemoteSupportNodeSettingsTests.java | 17 - ...eMachineSecurityComplianceStatusTests.java | 17 - .../EdgeMachineSecurityPropertiesTests.java | 23 - ...EdgeMachineSecuritySettingsInnerTests.java | 25 - ...achineSecuritySettingsListResultTests.java | 19 - ...ingsOperationsCreateOrUpdateMockTests.java | 40 - ...ngsOperationsGetWithResponseMockTests.java | 37 - ...sOperationsListByEdgeMachineMockTests.java | 37 - .../EdgeMachineStorageAdapterIpInfoTests.java | 17 - .../EdgeMachineStorageNetworkTests.java | 17 - .../EdgeMachineValidateRequestTests.java | 32 - ...EdgeMachineValidateResponseInnerTests.java | 16 - ...tualSwitchConfigurationOverridesTests.java | 17 - .../EdgeMachineVolumeInnerTests.java | 29 - .../EdgeMachineVolumeListResultTests.java | 20 - .../EdgeMachineVolumePropertiesTests.java | 28 - ...MachineVolumesCreateOrUpdateMockTests.java | 44 - ...achineVolumesGetWithResponseMockTests.java | 39 - .../EdgeMachineVolumesListMockTests.java | 40 - ...EdgeMachineWorkloadInventoryItemTests.java | 17 - .../EdgeMachinesValidateMockTests.java | 40 - .../generated/ExtensionListTests.java | 16 +- .../generated/ExtensionParametersTests.java | 30 +- .../ExtensionPatchParametersTests.java | 12 +- .../ExtensionPatchPropertiesTests.java | 12 +- .../generated/ExtensionPatchTests.java | 18 +- .../generated/ExtensionProfileTests.java | 2 +- .../ExtensionUpgradeParametersTests.java | 8 +- .../generated/ExtensionsCreateMockTests.java | 30 +- .../generated/ExtensionsDeleteMockTests.java | 3 +- .../ExtensionsGetWithResponseMockTests.java | 14 +- .../ExtensionsListByArcSettingMockTests.java | 18 +- .../generated/HardwareProfileTests.java | 17 - .../HciCollectLogJobPropertiesTests.java | 34 + ...geDeviceAdapterPropertyOverridesTests.java | 2 +- .../HciEdgeDeviceArcExtensionTests.java | 2 +- .../HciEdgeDeviceHostNetworkTests.java | 2 +- .../generated/HciEdgeDeviceIntentsTests.java | 2 +- .../HciEdgeDeviceJobPropertiesTests.java | 8 +- .../generated/HciEdgeDeviceJobTests.java | 8 +- ...ciEdgeDeviceStorageAdapterIpInfoTests.java | 2 +- .../HciEdgeDeviceStorageNetworksTests.java | 2 +- ...tualSwitchConfigurationOverridesTests.java | 2 +- .../generated/HciHardwareProfileTests.java | 2 +- .../generated/HciNetworkProfileTests.java | 2 +- .../generated/HciNicDetailTests.java | 2 +- .../generated/HciOsProfileTests.java | 5 +- .../HciRemoteSupportJobPropertiesTests.java | 40 + .../generated/HciStorageProfileTests.java | 2 +- .../HciValidationFailureDetailTests.java | 2 +- .../generated/InfrastructureNetworkTests.java | 58 +- .../generated/IpAddressRangeTests.java | 27 - .../azurestackhci/generated/IpPoolsTests.java | 12 +- .../generated/IscsiAdapterIPConfigTests.java | 43 - .../IscsiAdapterPropertiesTests.java | 32 - .../generated/IscsiChapSettingsTests.java | 25 - .../generated/IscsiConfigTests.java | 70 - .../generated/IscsiNetworkConfigTests.java | 63 - .../IscsiTargetPortalAddressTests.java | 28 - ...olatedVmAttestationConfigurationTests.java | 2 +- .../generated/LifecycleStatusTests.java | 17 - .../LocalAvailabilityZonesTests.java | 19 +- .../LogCollectionJobSessionTests.java | 2 +- .../LogCollectionReportedPropertiesTests.java | 17 + .../LogCollectionRequestPropertiesTests.java | 14 +- .../generated/LogCollectionRequestTests.java | 14 +- .../ManagedServiceIdentityTests.java | 6 +- .../NetworkAdapterActionStatusTests.java | 17 - .../NetworkAdapterDeploymentStepTests.java | 17 - ...workAdapterJobReportedPropertiesTests.java | 17 - ...NetworkAdapterProvisioningStatusTests.java | 17 - .../generated/NetworkAdapterTests.java | 55 - .../generated/NetworkConfigurationTests.java | 91 - .../generated/NetworkControllerTests.java | 14 +- .../generated/NextBillingModelTests.java | 8 +- .../generated/NicDetailTests.java | 56 +- .../generated/ObservabilityTests.java | 12 +- .../generated/OfferInnerTests.java | 14 +- .../generated/OfferListTests.java | 17 +- .../generated/OfferPropertiesTests.java | 14 +- .../OffersGetWithResponseMockTests.java | 17 +- .../OffersListByClusterMockTests.java | 16 +- .../OffersListByPublisherMockTests.java | 17 +- .../OnboardingConfigurationTests.java | 40 - .../generated/OperationDisplayTests.java | 2 +- .../generated/OperationInnerTests.java | 2 +- .../generated/OperationListResultTests.java | 4 +- .../generated/OperationsListMockTests.java | 2 +- .../generated/OptionalServicesTests.java | 9 +- .../generated/OsImageInnerTests.java | 26 - .../generated/OsImageListResultTests.java | 27 - .../generated/OsImagePropertiesTests.java | 26 - .../OsImagesGetWithResponseMockTests.java | 45 - ...SubscriptionLocationResourceMockTests.java | 47 - .../generated/OsProfileTests.java | 17 - .../generated/PackageVersionInfoTests.java | 21 +- .../PerNodeRemoteSupportSessionTests.java | 2 +- .../generated/PerNodeStateTests.java | 2 +- .../generated/PhysicalNodesTests.java | 12 +- .../generated/QosPolicyOverridesTests.java | 20 +- .../generated/RawCertificateDataTests.java | 10 +- ...cileArcSettingsRequestPropertiesTests.java | 8 +- .../ReconcileArcSettingsRequestTests.java | 16 +- .../RemoteSupportJobNodeSettingsTests.java | 2 +- ...moteSupportJobReportedPropertiesTests.java | 17 + .../RemoteSupportNodeSettingsTests.java | 2 +- .../RemoteSupportPropertiesTests.java | 2 +- .../RemoteSupportRequestPropertiesTests.java | 14 +- .../generated/RemoteSupportRequestTests.java | 8 +- .../generated/RemoteSupportSessionTests.java | 2 +- .../RepairServerJobServerDetailsTests.java | 29 - .../generated/ReportedPropertiesTests.java | 2 +- .../generated/SanAdapterIPConfigTests.java | 26 +- .../generated/SanAdapterPropertiesTests.java | 26 +- .../SanClusterNetworkConfigTests.java | 66 +- .../generated/SanNetworksTests.java | 78 +- .../generated/SbeDeploymentInfoTests.java | 32 +- .../generated/SbePartnerPropertiesTests.java | 14 +- .../generated/SdnIntegrationTests.java | 14 +- .../generated/SdnPropertiesTests.java | 17 - .../SecurityComplianceStatusTests.java | 2 +- .../generated/SecurityPropertiesTests.java | 15 +- .../generated/SecuritySettingInnerTests.java | 15 +- .../SecuritySettingListResultTests.java | 9 +- ...curitySettingsCreateOrUpdateMockTests.java | 10 +- ...uritySettingsGetWithResponseMockTests.java | 7 +- ...curitySettingsListByClustersMockTests.java | 8 +- .../generated/ServiceConfigurationTests.java | 8 +- .../generated/SiteDetailsTests.java | 128 - .../generated/SkuInnerTests.java | 16 +- .../azurestackhci/generated/SkuListTests.java | 19 +- .../generated/SkuMappingsTests.java | 8 +- .../generated/SkuPropertiesTests.java | 16 +- .../SkusGetWithResponseMockTests.java | 20 +- .../generated/SkusListByOfferMockTests.java | 19 +- ...AssuranceChangeRequestPropertiesTests.java | 8 +- .../SoftwareAssurancePropertiesTests.java | 2 +- .../azurestackhci/generated/StepTests.java | 262 +- .../generated/StorageConfigurationTests.java | 25 - .../generated/StorageInitiatorTests.java | 17 - .../generated/StorageProfileTests.java | 16 - .../generated/StorageS2dConfigTests.java | 8 +- .../generated/StorageSanConfigTests.java | 13 +- .../azurestackhci/generated/StorageTests.java | 36 +- .../generated/SwitchDetailTests.java | 2 +- .../generated/SwitchExtensionTests.java | 3 +- .../TargetDeviceConfigurationTests.java | 103 - .../generated/TimeConfigurationTests.java | 32 - .../generated/UpdateListTests.java | 78 +- .../generated/UpdatePrerequisiteTests.java | 19 +- .../generated/UpdateRunInnerTests.java | 169 +- .../generated/UpdateRunListTests.java | 28 +- .../generated/UpdateRunPropertiesTests.java | 256 +- .../generated/UpdateRunsDeleteMockTests.java | 3 +- .../UpdateRunsGetWithResponseMockTests.java | 44 +- .../generated/UpdateRunsListMockTests.java | 44 +- .../UpdateRunsPutWithResponseMockTests.java | 100 +- .../generated/UpdateStatePropertiesTests.java | 14 +- .../generated/UpdateSummariesListTests.java | 57 +- ...ateSummariesOperationsDeleteMockTests.java | 2 +- .../generated/UpdatesDeleteMockTests.java | 2 +- .../generated/UpdatesPostMockTests.java | 2 +- .../UploadCertificateRequestTests.java | 11 +- .../generated/UserAssignedIdentityTests.java | 2 +- .../generated/ValidateRequestTests.java | 12 +- .../generated/ValidateResponseInnerTests.java | 2 +- ...idatedSolutionRecipeCapabilitiesTests.java | 6 +- ...alidatedSolutionRecipeCapabilityTests.java | 4 +- ...dSolutionRecipeComponentMetadataTests.java | 22 +- ...edSolutionRecipeComponentPayloadTests.java | 12 +- ...ValidatedSolutionRecipeComponentTests.java | 40 +- .../ValidatedSolutionRecipeContentTests.java | 46 +- .../ValidatedSolutionRecipeInfoTests.java | 6 +- .../ValidatedSolutionRecipeInnerTests.java | 53 +- ...alidatedSolutionRecipeListResultTests.java | 19 +- ...alidatedSolutionRecipePropertiesTests.java | 51 +- ...lutionRecipesGetWithResponseMockTests.java | 32 +- ...SubscriptionLocationResourceMockTests.java | 32 +- .../generated/VolumeConfigurationTests.java | 25 - .../VolumeReportedPropertiesTests.java | 17 - .../generated/WebProxyConfigurationTests.java | 33 - ...iConfigurationReportedPropertiesTests.java | 24 - .../tsp-location.yaml | 2 +- sdk/batch/azure-resourcemanager-batch/pom.xml | 2 +- .../http/client/JdkHttpClientBuilderIT.java | 1 - .../core/http/models/ProxyOptionsTests.java | 67 +- sdk/clientcore/cspell.yml | 1 - sdk/clientcore/http-netty4/CHANGELOG.md | 4 - sdk/clientcore/http-netty4/README.md | 36 - sdk/clientcore/http-netty4/pom.xml | 62 +- .../http-netty4/spotbugs-exclude.xml | 4 - .../http/netty4/NettyHttpClientBuilder.java | 107 +- .../netty4/implementation/Netty4Utility.java | 10 +- .../src/main/java/module-info.java | 1 - .../netty4/NettyHttp2HttpClientTests.java | 36 - .../netty4/NettyHttpClientBuilderTests.java | 273 +- .../Netty4ConnectionPoolTests.java | 5 +- .../Netty4Http11ChannelBinaryDataTests.java | 2 - .../Netty4PipelineCleanupHandlerTests.java | 5 - .../implementation/Netty4UtilityTests.java | 28 - .../okhttp3/OkHttpHttpClientBuilderTests.java | 4 - .../CHANGELOG.md | 17 - .../README.md | 4 +- .../SAMPLE.md | 66 +- .../azure-resourcemanager-cloudhealth/pom.xml | 6 +- .../CloudHealthManagementClientImpl.java | 2 +- ...-resourcemanager-cloudhealth_metadata.json | 2 +- ...ticationSettingsCreateOrUpdateSamples.java | 2 +- .../AuthenticationSettingsDeleteSamples.java | 2 +- .../AuthenticationSettingsGetSamples.java | 2 +- ...ationSettingsListByHealthModelSamples.java | 2 +- .../DiscoveryRulesCreateOrUpdateSamples.java | 2 +- .../DiscoveryRulesDeleteSamples.java | 2 +- .../generated/DiscoveryRulesGetSamples.java | 2 +- ...iscoveryRulesListByHealthModelSamples.java | 2 +- .../EntitiesAddDataAnnotationSamples.java | 2 +- .../EntitiesCreateOrUpdateSamples.java | 2 +- .../generated/EntitiesDeleteSamples.java | 2 +- .../EntitiesGetDataAnnotationsSamples.java | 2 +- .../generated/EntitiesGetHistorySamples.java | 2 +- .../generated/EntitiesGetSamples.java | 2 +- .../EntitiesGetSignalHistorySamples.java | 2 +- ...titiesGetSignalRecommendationsSamples.java | 2 +- .../EntitiesIngestHealthReportSamples.java | 2 +- .../EntitiesListByHealthModelSamples.java | 2 +- .../generated/HealthModelsCreateSamples.java | 2 +- .../generated/HealthModelsDeleteSamples.java | 2 +- ...HealthModelsGetByResourceGroupSamples.java | 2 +- ...ealthModelsListByResourceGroupSamples.java | 2 +- .../generated/HealthModelsListSamples.java | 2 +- .../generated/HealthModelsUpdateSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- .../RelationshipsCreateOrUpdateSamples.java | 2 +- .../generated/RelationshipsDeleteSamples.java | 2 +- .../generated/RelationshipsGetSamples.java | 2 +- ...RelationshipsListByHealthModelSamples.java | 2 +- ...ignalDefinitionsCreateOrUpdateSamples.java | 2 +- .../SignalDefinitionsDeleteSamples.java | 2 +- .../SignalDefinitionsGetSamples.java | 2 +- ...alDefinitionsListByHealthModelSamples.java | 2 +- .../tsp-location.yaml | 2 +- .../CHANGELOG.md | 296 +- .../README.md | 4 +- .../SAMPLE.md | 1358 +- .../pom.xml | 4 +- .../CognitiveServicesManager.java | 64 - .../fluent/AdapterDeploymentsClient.java | 242 - .../CognitiveServicesManagementClient.java | 28 - .../fluent/CostControlsClient.java | 177 - .../fluent/RaiBindingsClient.java | 142 - .../fluent/RaiPoliciesClient.java | 21 +- .../fluent/RaiRegosClient.java | 141 - .../fluent/WorkbenchesClient.java | 46 +- .../fluent/models/AdapterDeploymentInner.java | 171 - .../fluent/models/ComputeInner.java | 30 + .../fluent/models/CostControlInner.java | 171 - .../fluent/models/RaiBindingInner.java | 201 - .../fluent/models/RaiRegoInner.java | 201 - .../fluent/models/UsageInner.java | 36 +- .../fluent/models/WorkbenchInner.java | 58 + .../implementation/AdapterDeploymentImpl.java | 175 - .../AdapterDeploymentsClientImpl.java | 1039 - .../AdapterDeploymentsImpl.java | 160 - ...CognitiveServicesManagementClientImpl.java | 66 +- .../implementation/ComputeImpl.java | 16 + .../implementation/CostControlImpl.java | 179 - .../CostControlsClientImpl.java | 683 - .../implementation/CostControlsImpl.java | 160 - .../implementation/RaiBindingImpl.java | 193 - .../implementation/RaiBindingsClientImpl.java | 597 - .../implementation/RaiBindingsImpl.java | 160 - .../implementation/RaiPoliciesClientImpl.java | 166 +- .../implementation/RaiPoliciesImpl.java | 23 +- .../implementation/RaiPolicyImpl.java | 48 +- .../implementation/RaiRegoImpl.java | 193 - .../implementation/RaiRegosClientImpl.java | 590 - .../implementation/RaiRegosImpl.java | 159 - .../implementation/UsageImpl.java | 8 - .../implementation/WorkbenchImpl.java | 61 +- .../implementation/WorkbenchesClientImpl.java | 152 +- .../models/AdapterDeploymentListResult.java | 95 - .../models/CostControlListResult.java | 95 - .../models/RaiBindingListResult.java | 95 - .../models/RaiRegoListResult.java | 95 - .../models/AccountProperties.java | 67 - .../models/AdapterDeployment.java | 253 - .../AdapterDeploymentLastOperation.java | 154 - .../AdapterDeploymentOperationState.java | 61 - .../AdapterDeploymentOperationType.java | 56 - .../models/AdapterDeploymentProperties.java | 190 - .../models/AdapterDeployments.java | 147 - .../models/AdapterDeploymentsGetHeaders.java | 39 - .../models/AdapterDeploymentsGetResponse.java | 40 - .../cognitiveservices/models/Compute.java | 40 +- .../models/ConnectionCategory.java | 5 - .../cognitiveservices/models/CostControl.java | 236 - .../models/CostControlConnections.java | 123 - .../models/CostControlDimension.java | 104 - .../models/CostControlDimensionType.java | 72 - .../models/CostControlMatch.java | 183 - .../models/CostControlPatch.java | 85 - .../models/CostControlPatchProperties.java | 117 - .../models/CostControlPeriod.java | 71 - .../models/CostControlProperties.java | 116 - .../models/CostControlRule.java | 322 - .../models/CostControlThreshold.java | 150 - .../models/CostControlThresholdAction.java | 56 - .../models/CostControlThresholdType.java | 51 - .../models/CostControlUnit.java | 46 - .../models/CostControls.java | 149 - .../CostControlsCreateOrUpdateHeaders.java | 39 - .../CostControlsCreateOrUpdateResponse.java | 40 - .../models/CostControlsGetHeaders.java | 39 - .../models/CostControlsGetResponse.java | 39 - .../models/CostControlsUpdateHeaders.java | 39 - .../models/CostControlsUpdateResponse.java | 39 - .../models/DeploymentProperties.java | 33 - .../models/GatedModelAccessProperties.java | 89 - .../ManagedComputeDeploymentProperties.java | 31 - .../models/RaiAcsEmptyObject.java | 55 - .../models/RaiAcsHarmCategory.java | 76 - .../models/RaiAcsHarmConfiguration.java | 119 - .../models/RaiAcsInterventionPoint.java | 175 - .../models/RaiAcsInterventionPoints.java | 169 - .../models/RaiAcsManifest.java | 245 - .../RaiAcsModerationBindingExtension.java | 121 - .../models/RaiAcsModerationSubjectFormat.java | 51 - .../models/RaiAcsPolicyBinding.java | 144 - .../models/RaiAcsPolicyDefinitionType.java | 46 - .../models/RaiAcsPolicyTarget.java | 61 - .../models/RaiAcsPolicyTargetKind.java | 61 - .../models/RaiAcsRegoPolicyDefinition.java | 115 - .../models/RaiAcsToolDefinition.java | 242 - .../models/RaiAcsToolInterventionPoint.java | 206 - .../models/RaiAcsToolNameSelector.java | 53 - .../cognitiveservices/models/RaiBinding.java | 284 - .../models/RaiBindingProperties.java | 118 - .../cognitiveservices/models/RaiBindings.java | 150 - .../RaiBindingsCreateOrUpdateHeaders.java | 39 - .../RaiBindingsCreateOrUpdateResponse.java | 40 - .../models/RaiBindingsGetHeaders.java | 39 - .../models/RaiBindingsGetResponse.java | 39 - .../cognitiveservices/models/RaiPolicies.java | 12 +- .../RaiPoliciesCreateOrUpdateHeaders.java | 39 - .../RaiPoliciesCreateOrUpdateResponse.java | 40 - .../models/RaiPoliciesGetHeaders.java | 39 - .../models/RaiPoliciesGetResponse.java | 39 - .../cognitiveservices/models/RaiPolicy.java | 58 +- ...CustomExternalSafetyProviderReference.java | 180 - .../models/RaiPolicyFormat.java | 51 - .../models/RaiPolicyProperties.java | 124 +- .../cognitiveservices/models/RaiRego.java | 284 - .../models/RaiRegoEncoding.java | 51 - .../models/RaiRegoProperties.java | 114 - .../models/RaiRegoReference.java | 86 - .../cognitiveservices/models/RaiRegos.java | 150 - .../models/RaiRegosCreateOrUpdateHeaders.java | 39 - .../RaiRegosCreateOrUpdateResponse.java | 39 - .../models/RaiRegosGetHeaders.java | 39 - .../models/RaiRegosGetResponse.java | 39 - .../cognitiveservices/models/Usage.java | 15 - .../cognitiveservices/models/Workbench.java | 97 +- .../models/WorkbenchProperties.java | 126 +- .../models/WorkbenchProvisioningState.java | 61 - .../models/WorkbenchStatus.java | 91 - .../models/WorkbenchUpdate.java | 119 - .../models/WorkbenchUpdateProperties.java | 191 - ...rcemanager-cognitiveservices_metadata.json | 2 +- .../proxy-config.json | 2 +- ...tCapabilityHostsCreateOrUpdateSamples.java | 2 +- .../AccountCapabilityHostsDeleteSamples.java | 2 +- .../AccountCapabilityHostsGetSamples.java | 2 +- .../AccountCapabilityHostsListSamples.java | 2 +- .../AccountConnectionsCreateSamples.java | 2 +- .../AccountConnectionsDeleteSamples.java | 2 +- .../AccountConnectionsGetSamples.java | 2 +- .../AccountConnectionsListSamples.java | 2 +- .../AccountConnectionsUpdateSamples.java | 2 +- .../generated/AccountsCreateSamples.java | 6 +- .../generated/AccountsDeleteSamples.java | 2 +- ...untsEvaluateDeploymentPoliciesSamples.java | 2 +- .../AccountsGetByResourceGroupSamples.java | 2 +- .../AccountsListByResourceGroupSamples.java | 2 +- .../generated/AccountsListKeysSamples.java | 2 +- .../generated/AccountsListModelsSamples.java | 2 +- .../generated/AccountsListSamples.java | 2 +- .../generated/AccountsListSkusSamples.java | 2 +- .../generated/AccountsListUsagesSamples.java | 8 +- .../AccountsRegenerateKeySamples.java | 2 +- .../generated/AccountsUpdateSamples.java | 13 +- ...apterDeploymentsCreateOrUpdateSamples.java | 31 - .../AdapterDeploymentsDeleteSamples.java | 25 - .../AdapterDeploymentsGetSamples.java | 25 - .../AdapterDeploymentsListSamples.java | 23 - ...gentApplicationsCreateOrUpdateSamples.java | 2 +- .../AgentApplicationsDeleteSamples.java | 2 +- .../AgentApplicationsDisableSamples.java | 2 +- .../AgentApplicationsEnableSamples.java | 2 +- .../AgentApplicationsGetSamples.java | 2 +- .../AgentApplicationsListAgentsSamples.java | 2 +- .../AgentApplicationsListSamples.java | 2 +- ...AgentDeploymentsCreateOrUpdateSamples.java | 2 +- .../AgentDeploymentsDeleteSamples.java | 2 +- .../generated/AgentDeploymentsGetSamples.java | 2 +- .../AgentDeploymentsListSamples.java | 2 +- .../AgentDeploymentsStartSamples.java | 2 +- .../AgentDeploymentsStopSamples.java | 2 +- .../ArcDeploymentsCreateOrUpdateSamples.java | 4 +- .../ArcDeploymentsDeleteSamples.java | 2 +- .../generated/ArcDeploymentsGetSamples.java | 2 +- .../generated/ArcDeploymentsListSamples.java | 2 +- .../ArcDeploymentsUpdateSamples.java | 2 +- ...PlansCreateOrUpdateAssociationSamples.java | 2 +- ...mitmentPlansCreateOrUpdatePlanSamples.java | 2 +- .../CommitmentPlansCreateOrUpdateSamples.java | 2 +- ...mmitmentPlansDeleteAssociationSamples.java | 2 +- .../CommitmentPlansDeletePlanSamples.java | 2 +- .../CommitmentPlansDeleteSamples.java | 2 +- .../CommitmentPlansGetAssociationSamples.java | 2 +- ...mitmentPlansGetByResourceGroupSamples.java | 2 +- .../generated/CommitmentPlansGetSamples.java | 2 +- ...ommitmentPlansListAssociationsSamples.java | 2 +- ...itmentPlansListByResourceGroupSamples.java | 2 +- ...ntPlansListPlansBySubscriptionSamples.java | 2 +- .../generated/CommitmentPlansListSamples.java | 2 +- .../CommitmentPlansUpdatePlanSamples.java | 2 +- .../generated/CommitmentTiersListSamples.java | 2 +- .../ComputeOperationsGetSamples.java | 2 +- .../ComputesCreateOrUpdateSamples.java | 4 +- .../generated/ComputesDeleteSamples.java | 2 +- .../generated/ComputesGetSamples.java | 4 +- .../generated/ComputesListSamples.java | 2 +- .../generated/ComputesRestartSamples.java | 2 +- .../generated/ComputesStartSamples.java | 2 +- .../generated/ComputesStopSamples.java | 2 +- .../CostControlsCreateOrUpdateSamples.java | 70 - .../generated/CostControlsDeleteSamples.java | 25 - .../generated/CostControlsGetSamples.java | 40 - .../generated/CostControlsListSamples.java | 23 - .../generated/CostControlsUpdateSamples.java | 83 - ...derForAISettingsCreateOrUpdateSamples.java | 2 +- .../DefenderForAISettingsGetSamples.java | 2 +- .../DefenderForAISettingsListSamples.java | 2 +- .../DefenderForAISettingsUpdateSamples.java | 2 +- .../generated/DeletedAccountsGetSamples.java | 2 +- .../generated/DeletedAccountsListSamples.java | 2 +- .../DeletedAccountsPurgeSamples.java | 2 +- .../DeploymentsCreateOrUpdateSamples.java | 4 +- .../generated/DeploymentsDeleteSamples.java | 2 +- .../generated/DeploymentsGetSamples.java | 2 +- .../generated/DeploymentsListSamples.java | 2 +- .../generated/DeploymentsListSkusSamples.java | 2 +- .../generated/DeploymentsPauseSamples.java | 2 +- .../generated/DeploymentsResumeSamples.java | 2 +- .../generated/DeploymentsUpdateSamples.java | 2 +- ...EncryptionScopesCreateOrUpdateSamples.java | 2 +- .../EncryptionScopesDeleteSamples.java | 2 +- .../generated/EncryptionScopesGetSamples.java | 2 +- .../EncryptionScopesListSamples.java | 2 +- ...cationBasedModelCapacitiesListSamples.java | 8 +- .../ManagedComputeCapacitiesListSamples.java | 2 +- ...mputeDeploymentsCreateOrUpdateSamples.java | 11 +- ...anagedComputeDeploymentsDeleteSamples.java | 2 +- .../ManagedComputeDeploymentsGetSamples.java | 4 +- .../ManagedComputeDeploymentsListSamples.java | 4 +- ...anagedComputeDeploymentsUpdateSamples.java | 4 +- ...omputeUsagesOperationGroupListSamples.java | 2 +- ...visionsProvisionManagedNetworkSamples.java | 2 +- ...NetworkSettingsOperationDeleteSamples.java | 2 +- ...gedNetworkSettingsOperationGetSamples.java | 2 +- ...edNetworkSettingsOperationListSamples.java | 2 +- ...dNetworkSettingsOperationPatchSamples.java | 2 +- ...gedNetworkSettingsOperationPutSamples.java | 2 +- .../generated/ModelCapacitiesListSamples.java | 8 +- .../generated/ModelsListSamples.java | 2 +- ...rityPerimeterConfigurationsGetSamples.java | 2 +- ...ityPerimeterConfigurationsListSamples.java | 2 +- ...rimeterConfigurationsReconcileSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- .../OutboundRuleCreateOrUpdateSamples.java | 2 +- .../generated/OutboundRuleDeleteSamples.java | 2 +- .../generated/OutboundRuleGetSamples.java | 2 +- .../generated/OutboundRuleListSamples.java | 2 +- .../OutboundRulesOperationPostSamples.java | 2 +- ...pointConnectionsCreateOrUpdateSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...PrivateEndpointConnectionsListSamples.java | 2 +- .../PrivateLinkResourcesListSamples.java | 2 +- ...tCapabilityHostsCreateOrUpdateSamples.java | 2 +- .../ProjectCapabilityHostsDeleteSamples.java | 2 +- .../ProjectCapabilityHostsGetSamples.java | 2 +- .../ProjectCapabilityHostsListSamples.java | 2 +- .../ProjectConnectionsCreateSamples.java | 2 +- .../ProjectConnectionsDeleteSamples.java | 2 +- .../ProjectConnectionsGetSamples.java | 2 +- .../ProjectConnectionsListSamples.java | 2 +- .../ProjectConnectionsUpdateSamples.java | 2 +- .../generated/ProjectsCreateSamples.java | 4 +- .../generated/ProjectsDeleteSamples.java | 2 +- .../generated/ProjectsGetSamples.java | 2 +- .../generated/ProjectsListSamples.java | 2 +- .../generated/ProjectsUpdateSamples.java | 2 +- .../QuotaTiersCreateOrUpdateSamples.java | 2 +- .../generated/QuotaTiersGetSamples.java | 2 +- .../generated/QuotaTiersListSamples.java | 2 +- .../generated/QuotaTiersUpdateSamples.java | 2 +- .../RaiBindingsCreateOrUpdateSamples.java | 54 - .../generated/RaiBindingsDeleteSamples.java | 24 - .../generated/RaiBindingsGetSamples.java | 23 - .../generated/RaiBindingsListSamples.java | 22 - .../RaiBlocklistItemsBatchAddSamples.java | 2 +- .../RaiBlocklistItemsBatchDeleteSamples.java | 2 +- ...aiBlocklistItemsCreateOrUpdateSamples.java | 2 +- .../RaiBlocklistItemsDeleteSamples.java | 2 +- .../RaiBlocklistItemsGetSamples.java | 2 +- .../RaiBlocklistItemsListSamples.java | 2 +- .../RaiBlocklistsCreateOrUpdateSamples.java | 2 +- .../generated/RaiBlocklistsDeleteSamples.java | 2 +- .../generated/RaiBlocklistsGetSamples.java | 2 +- .../generated/RaiBlocklistsListSamples.java | 2 +- .../RaiContentFiltersGetSamples.java | 2 +- .../RaiContentFiltersListSamples.java | 2 +- ...alSafetyProviderCreateOrUpdateSamples.java | 2 +- ...aiExternalSafetyProviderDeleteSamples.java | 2 +- .../RaiExternalSafetyProviderGetSamples.java | 2 +- ...alSafetyProvidersOperationListSamples.java | 2 +- .../RaiPoliciesCreateOrUpdateSamples.java | 204 +- .../generated/RaiPoliciesDeleteSamples.java | 18 +- .../generated/RaiPoliciesGetSamples.java | 15 +- .../generated/RaiPoliciesListSamples.java | 2 +- .../RaiRegosCreateOrUpdateSamples.java | 68 - .../generated/RaiRegosDeleteSamples.java | 25 - .../generated/RaiRegosGetSamples.java | 24 - .../generated/RaiRegosListSamples.java | 23 - .../RaiToolLabelsCreateOrUpdateSamples.java | 2 +- .../generated/RaiToolLabelsDeleteSamples.java | 2 +- .../generated/RaiToolLabelsGetSamples.java | 2 +- .../generated/RaiToolLabelsListSamples.java | 2 +- .../RaiTopicsCreateOrUpdateSamples.java | 2 +- .../generated/RaiTopicsDeleteSamples.java | 2 +- .../generated/RaiTopicsGetSamples.java | 2 +- .../generated/RaiTopicsListSamples.java | 2 +- ...ProviderCalculateModelCapacitySamples.java | 2 +- ...roviderCheckDomainAvailabilitySamples.java | 2 +- ...ceProviderCheckSkuAvailabilitySamples.java | 2 +- .../generated/ResourceSkusListSamples.java | 2 +- ...riptionRaiPolicyCreateOrUpdateSamples.java | 2 +- .../SubscriptionRaiPolicyDeleteSamples.java | 2 +- .../SubscriptionRaiPolicyGetSamples.java | 2 +- ...alSafetyProviderCreateOrUpdateSamples.java | 2 +- .../generated/UsagesListSamples.java | 21 +- .../WorkbenchesCreateOrUpdateSamples.java | 26 +- .../generated/WorkbenchesDeleteSamples.java | 2 +- .../generated/WorkbenchesGetSamples.java | 2 +- .../generated/WorkbenchesListSamples.java | 2 +- .../generated/WorkbenchesRestartSamples.java | 2 +- .../generated/WorkbenchesStartSamples.java | 2 +- .../generated/WorkbenchesStopSamples.java | 2 +- .../generated/WorkbenchesUpdateSamples.java | 60 +- .../AadAuthTypeConnectionPropertiesTests.java | 51 +- ...apabilityHostsCreateOrUpdateMockTests.java | 38 +- ...pabilityHostsGetWithResponseMockTests.java | 20 +- .../AccountCapabilityHostsListMockTests.java | 20 +- ...onnectionsCreateWithResponseMockTests.java | 43 +- ...onnectionsDeleteWithResponseMockTests.java | 3 +- ...ntConnectionsGetWithResponseMockTests.java | 20 +- .../AccountConnectionsListMockTests.java | 23 +- .../AccountSkuListResultInnerTests.java | 12 +- .../generated/AccountSkuTests.java | 14 +- .../generated/AccountsDeleteMockTests.java | 2 +- ...ploymentPoliciesWithResponseMockTests.java | 71 +- ...AccountsListSkusWithResponseMockTests.java | 16 +- ...countsListUsagesWithResponseMockTests.java | 26 +- .../AdapterDeploymentInnerTests.java | 30 - .../AdapterDeploymentLastOperationTests.java | 26 - .../AdapterDeploymentListResultTests.java | 19 - .../AdapterDeploymentPropertiesTests.java | 29 - ...terDeploymentsCreateOrUpdateMockTests.java | 46 - ...erDeploymentsGetWithResponseMockTests.java | 40 - .../AdapterDeploymentsListMockTests.java | 40 - ...licationsDisableWithResponseMockTests.java | 3 +- ...plicationsEnableWithResponseMockTests.java | 2 +- ...ationsListAgentsWithResponseMockTests.java | 11 +- .../generated/AgentDeploymentInnerTests.java | 65 +- .../AgentDeploymentPropertiesTests.java | 67 +- ...oymentResourceArmPaginatedResultTests.java | 24 +- ...entDeploymentsCreateOrUpdateMockTests.java | 55 +- ...ntDeploymentsGetWithResponseMockTests.java | 22 +- .../AgentDeploymentsListMockTests.java | 26 +- ...DeploymentsStartWithResponseMockTests.java | 3 +- ...tDeploymentsStopWithResponseMockTests.java | 2 +- .../generated/AgentProtocolVersionTests.java | 9 +- .../AgentReferencePropertiesTests.java | 15 +- ...eResourceArmPaginatedResultInnerTests.java | 8 +- .../generated/AgentReferenceTests.java | 6 +- .../ApplicationTrafficRoutingPolicyTests.java | 39 +- ...entCpuMemoryResourceRequirementsTests.java | 12 +- .../generated/ArcDeploymentInnerTests.java | 83 +- ...ArcDeploymentKubernetesResourcesTests.java | 30 +- .../ArcDeploymentListResultTests.java | 4 +- .../generated/ArcDeploymentModelTests.java | 12 +- ...tchCpuMemoryResourceRequirementsTests.java | 12 +- ...ploymentPatchKubernetesResourcesTests.java | 31 +- .../ArcDeploymentPropertiesTests.java | 77 +- ...ArcDeploymentProvisioningDetailsTests.java | 10 +- ...rcDeploymentResourceRequirementsTests.java | 19 +- .../ArcDeploymentUpdatePropertiesTests.java | 42 +- .../generated/ArcDeploymentUpdateTests.java | 46 +- .../ArcDeploymentVllmParametersTests.java | 10 +- ...ArcDeploymentsCreateOrUpdateMockTests.java | 51 +- ...rcDeploymentsGetWithResponseMockTests.java | 32 +- .../ArcDeploymentsListMockTests.java | 33 +- .../generated/AssignedIdentityTests.java | 38 +- .../generated/BillingMeterInfoTests.java | 8 +- .../generated/CapabilityHostInnerTests.java | 53 +- .../CapabilityHostPropertiesTests.java | 50 +- ...tyHostResourceArmPaginatedResultTests.java | 20 +- .../generated/CapacityConfigTests.java | 12 +- .../generated/CommitmentCostTests.java | 6 +- .../generated/CommitmentPeriodTests.java | 12 +- ...tmentPlanAccountAssociationInnerTests.java | 14 +- ...PlanAccountAssociationListResultTests.java | 4 +- ...PlanAccountAssociationPropertiesTests.java | 8 +- .../generated/CommitmentPlanInnerTests.java | 94 +- .../CommitmentPlanListResultTests.java | 4 +- .../CommitmentPlanPropertiesTests.java | 34 +- ...ansCreateOrUpdateAssociationMockTests.java | 15 +- ...tmentPlansCreateOrUpdatePlanMockTests.java | 60 +- ...nsCreateOrUpdateWithResponseMockTests.java | 58 +- ...itmentPlansDeleteAssociationMockTests.java | 3 +- .../CommitmentPlansDeleteMockTests.java | 3 +- .../CommitmentPlansDeletePlanMockTests.java | 2 +- ...nsGetAssociationWithResponseMockTests.java | 8 +- ...tByResourceGroupWithResponseMockTests.java | 32 +- ...mmitmentPlansGetWithResponseMockTests.java | 34 +- ...mitmentPlansListAssociationsMockTests.java | 8 +- ...mentPlansListByResourceGroupMockTests.java | 35 +- .../CommitmentPlansListMockTests.java | 33 +- ...PlansListPlansBySubscriptionMockTests.java | 31 +- .../generated/CommitmentQuotaTests.java | 6 +- .../generated/CommitmentTierInnerTests.java | 22 +- .../CommitmentTierListResultTests.java | 4 +- .../CommitmentTiersListMockTests.java | 24 +- .../ConnectionManagedIdentityTests.java | 12 +- .../ConnectionPersonalAccessTokenTests.java | 8 +- ...2BasicResourceArmPaginatedResultTests.java | 19 +- ...onPropertiesV2BasicResourceInnerTests.java | 57 +- .../ConnectionPropertiesV2Tests.java | 62 +- .../ConnectionSharedAccessSignatureTests.java | 8 +- .../ConnectionUpdateContentTests.java | 45 +- .../generated/ConnectivityEndpointsTests.java | 2 +- .../CostControlConnectionsTests.java | 29 - .../generated/CostControlDimensionTests.java | 26 - .../generated/CostControlMatchTests.java | 37 - .../generated/CostControlThresholdTests.java | 34 - ...stControlsDeleteWithResponseMockTests.java | 35 - .../generated/CustomBlocklistConfigTests.java | 20 +- .../DefenderForAISettingInnerTests.java | 14 +- .../DefenderForAISettingResultTests.java | 6 +- ...gsCreateOrUpdateWithResponseMockTests.java | 14 +- ...ForAISettingsGetWithResponseMockTests.java | 8 +- .../DefenderForAISettingsListMockTests.java | 10 +- .../DeletedAccountsPurgeMockTests.java | 2 +- .../DeploymentCapacitySettingsTests.java | 12 +- ...DeploymentPolicyEvaluationResultTests.java | 29 +- .../DeploymentScaleSettingsTests.java | 8 +- .../DeploymentSizeCapacityTests.java | 2 +- .../DeploymentSkuListResultTests.java | 4 +- .../generated/DeploymentsDeleteMockTests.java | 2 +- .../DeploymentsListSkusMockTests.java | 28 +- ...valuateDeploymentPoliciesRequestTests.java | 86 +- ...eDeploymentPoliciesResponseInnerTests.java | 27 +- .../generated/FqdnOutboundRuleTests.java | 14 +- .../GatedModelAccessPropertiesTests.java | 25 - .../generated/HostedAgentDeploymentTests.java | 86 +- .../generated/IdentityTests.java | 11 +- ...tionBasedModelCapacitiesListMockTests.java | 28 +- .../ManagedAgentDeploymentTests.java | 77 +- ...ManagedComputeCapacitiesListMockTests.java | 4 +- .../ManagedComputeCapacityInnerTests.java | 2 +- ...ManagedComputeCapacityListResultTests.java | 4 +- ...ManagedComputeCapacityPropertiesTests.java | 2 +- .../ManagedComputeDeploymentInfoTests.java | 12 +- .../ManagedComputeDeploymentInnerTests.java | 72 +- ...nagedComputeDeploymentListResultTests.java | 4 +- ...nagedComputeDeploymentPropertiesTests.java | 36 +- ...uteDeploymentProvisioningDetailsTests.java | 6 +- .../ManagedComputeDeploymentRoutesTests.java | 11 +- ...uteDeploymentsCreateOrUpdateMockTests.java | 49 +- ...agedComputeDeploymentsDeleteMockTests.java | 3 +- ...teDeploymentsGetWithResponseMockTests.java | 25 +- ...anagedComputeDeploymentsListMockTests.java | 27 +- .../ManagedComputeUsageInnerTests.java | 20 +- .../ManagedComputeUsageListResultTests.java | 22 +- ...uteUsagesOperationGroupsListMockTests.java | 22 +- .../ManagedNetworkListResultTests.java | 10 +- ...sionsProvisionManagedNetworkMockTests.java | 6 +- ...etworkSettingsBasicResourceInnerTests.java | 42 +- .../ManagedNetworkSettingsExTests.java | 38 +- .../ManagedNetworkSettingsInnerTests.java | 17 +- ...ngsOperationsGetWithResponseMockTests.java | 16 +- ...etworkSettingsOperationsListMockTests.java | 19 +- ...NetworkSettingsOperationsPutMockTests.java | 31 +- ...ingsPropertiesBasicResourceInnerTests.java | 43 +- ...ManagedNetworkSettingsPropertiesTests.java | 43 +- .../generated/MetricNameTests.java | 8 +- .../ModelCapacitiesListMockTests.java | 28 +- .../ModelCapacityListResultTests.java | 4 +- .../generated/ModelDeprecationInfoTests.java | 8 +- .../generated/ModelListResultTests.java | 64 +- ...sRulePropertiesSubscriptionsItemTests.java | 7 +- ...ityPerimeterAccessRulePropertiesTests.java | 16 +- ...tworkSecurityPerimeterAccessRuleTests.java | 16 +- ...eterConfigurationAssociationInfoTests.java | 6 +- ...urityPerimeterConfigurationInnerTests.java | 39 +- ...curityPerimeterConfigurationListTests.java | 24 +- ...PerimeterConfigurationPropertiesTests.java | 40 +- ...onfigurationsGetWithResponseMockTests.java | 36 +- ...yPerimeterConfigurationsListMockTests.java | 38 +- ...meterConfigurationsReconcileMockTests.java | 36 +- ...workSecurityPerimeterProfileInfoTests.java | 25 +- .../NetworkSecurityPerimeterTests.java | 8 +- ...NoneAuthTypeConnectionPropertiesTests.java | 62 +- .../generated/OperationsListMockTests.java | 2 +- .../OutboundRuleBasicResourceInnerTests.java | 14 +- .../OutboundRuleListResultTests.java | 6 +- .../generated/OutboundRuleTests.java | 13 +- .../OutboundRulesCreateOrUpdateMockTests.java | 12 +- ...OutboundRulesGetWithResponseMockTests.java | 9 +- .../generated/OutboundRulesListMockTests.java | 10 +- .../generated/PatchResourceSkuTests.java | 32 +- .../PatchResourceTagsAndSkuTests.java | 38 +- .../generated/PatchResourceTagsTests.java | 12 +- ...olicyAssignmentEvaluationDetailsTests.java | 26 +- ...olicyExpressionEvaluationDetailsTests.java | 14 +- .../generated/PoolTests.java | 26 +- ...ndpointConnectionListResultInnerTests.java | 12 +- ...intConnectionsCreateOrUpdateMockTests.java | 25 +- ...ateEndpointConnectionsDeleteMockTests.java | 3 +- ...ntConnectionsGetWithResponseMockTests.java | 12 +- ...tConnectionsListWithResponseMockTests.java | 14 +- ...eEndpointOutboundRuleDestinationTests.java | 14 +- .../PrivateEndpointOutboundRuleTests.java | 32 +- ...ivateLinkResourceListResultInnerTests.java | 4 +- .../PrivateLinkResourcePropertiesTests.java | 4 +- .../generated/PrivateLinkResourceTests.java | 4 +- ...inkResourcesListWithResponseMockTests.java | 6 +- .../ProjectCapabilityHostInnerTests.java | 28 +- .../ProjectCapabilityHostPropertiesTests.java | 28 +- ...tyHostResourceArmPaginatedResultTests.java | 12 +- ...apabilityHostsCreateOrUpdateMockTests.java | 28 +- ...pabilityHostsGetWithResponseMockTests.java | 13 +- .../ProjectCapabilityHostsListMockTests.java | 17 +- ...onnectionsCreateWithResponseMockTests.java | 53 +- ...onnectionsDeleteWithResponseMockTests.java | 2 +- ...ctConnectionsGetWithResponseMockTests.java | 19 +- .../ProjectConnectionsListMockTests.java | 23 +- ...onnectionsUpdateWithResponseMockTests.java | 39 +- .../generated/ProjectInnerTests.java | 52 +- .../generated/ProjectListResultTests.java | 4 +- .../generated/ProjectPropertiesTests.java | 32 +- .../generated/ProjectsCreateMockTests.java | 42 +- .../generated/ProjectsDeleteMockTests.java | 2 +- .../ProjectsGetWithResponseMockTests.java | 20 +- .../generated/ProjectsListMockTests.java | 22 +- .../ProvisioningIssuePropertiesTests.java | 25 +- .../generated/ProvisioningIssueTests.java | 18 +- .../generated/QuotaTierInnerTests.java | 2 +- .../generated/QuotaTierListResultTests.java | 4 +- .../generated/QuotaTierPropertiesTests.java | 9 +- .../QuotaTierUpgradeEligibilityInfoTests.java | 8 +- ...rsCreateOrUpdateWithResponseMockTests.java | 6 +- .../QuotaTiersGetWithResponseMockTests.java | 6 +- .../generated/QuotaTiersListMockTests.java | 4 +- .../generated/RaiAcsEmptyObjectTests.java | 21 - .../RaiAcsHarmConfigurationTests.java | 30 - .../RaiAcsInterventionPointTests.java | 62 - .../RaiAcsInterventionPointsTests.java | 178 - .../generated/RaiAcsManifestTests.java | 213 - ...RaiAcsModerationBindingExtensionTests.java | 41 - .../generated/RaiAcsPolicyBindingTests.java | 51 - .../RaiAcsRegoPolicyDefinitionTests.java | 29 - .../generated/RaiAcsToolDefinitionTests.java | 55 - .../RaiAcsToolInterventionPointTests.java | 66 - .../generated/RaiBindingInnerTests.java | 47 - .../generated/RaiBindingListResultTests.java | 22 - .../generated/RaiBindingPropertiesTests.java | 29 - ...gsCreateOrUpdateWithResponseMockTests.java | 62 - ...aiBindingsDeleteWithResponseMockTests.java | 35 - .../RaiBindingsGetWithResponseMockTests.java | 41 - .../generated/RaiBindingsListMockTests.java | 41 - .../RaiBlockListItemsResultTests.java | 8 +- .../generated/RaiBlockListResultTests.java | 8 +- .../generated/RaiBlocklistConfigTests.java | 8 +- .../generated/RaiBlocklistInnerTests.java | 14 +- .../RaiBlocklistItemBulkRequestTests.java | 18 +- .../generated/RaiBlocklistItemInnerTests.java | 18 +- .../RaiBlocklistItemPropertiesTests.java | 14 +- ...istItemsBatchAddWithResponseMockTests.java | 19 +- ...ItemsBatchDeleteWithResponseMockTests.java | 2 +- ...msCreateOrUpdateWithResponseMockTests.java | 14 +- ...locklistItemsGetWithResponseMockTests.java | 8 +- .../RaiBlocklistItemsListMockTests.java | 8 +- .../RaiBlocklistPropertiesTests.java | 8 +- ...tsCreateOrUpdateWithResponseMockTests.java | 15 +- ...RaiBlocklistsGetWithResponseMockTests.java | 8 +- .../generated/RaiBlocklistsListMockTests.java | 8 +- .../generated/RaiContentFilterInnerTests.java | 6 +- .../RaiContentFilterListResultTests.java | 10 +- .../RaiContentFilterPropertiesTests.java | 6 +- ...ontentFiltersGetWithResponseMockTests.java | 10 +- .../RaiContentFiltersListMockTests.java | 10 +- .../RaiEgressManagedIdentityRefTests.java | 12 +- .../generated/RaiEgressPolicyConfigTests.java | 86 +- .../RaiEgressRewriteTargetTests.java | 19 +- .../generated/RaiEgressRuleMatchTests.java | 14 +- ...esCreateOrUpdateWithResponseMockTests.java | 259 +- .../RaiPoliciesGetWithResponseMockTests.java | 84 +- .../generated/RaiPoliciesListMockTests.java | 105 +- .../RaiPolicyContentFilterTests.java | 26 +- ...mExternalSafetyProviderReferenceTests.java | 37 - .../generated/RaiPolicyInnerTests.java | 391 +- .../generated/RaiPolicyListResultTests.java | 72 +- .../generated/RaiPolicyPropertiesTests.java | 492 +- .../generated/RaiRegoInnerTests.java | 49 - .../generated/RaiRegoListResultTests.java | 23 - .../generated/RaiRegoPropertiesTests.java | 28 - .../generated/RaiRegoReferenceTests.java | 25 - ...osCreateOrUpdateWithResponseMockTests.java | 63 - .../RaiRegosDeleteWithResponseMockTests.java | 34 - .../RaiRegosGetWithResponseMockTests.java | 42 - .../generated/RaiRegosListMockTests.java | 42 - .../RaiSafetyProviderConfigTests.java | 16 +- .../generated/RaiToolLabelInnerTests.java | 53 +- ...iToolLabelPropertiesAccountScopeTests.java | 13 +- ...LabelPropertiesProjectScopesItemTests.java | 19 +- .../RaiToolLabelPropertiesTests.java | 35 +- .../generated/RaiToolLabelResultTests.java | 18 +- ...lsCreateOrUpdateWithResponseMockTests.java | 40 +- ...RaiToolLabelsGetWithResponseMockTests.java | 16 +- .../generated/RaiToolLabelsListMockTests.java | 18 +- .../generated/RaiTopicInnerTests.java | 57 +- .../generated/RaiTopicPropertiesTests.java | 50 +- .../generated/RaiTopicResultTests.java | 22 +- ...csCreateOrUpdateWithResponseMockTests.java | 42 +- .../RaiTopicsGetWithResponseMockTests.java | 22 +- .../generated/RaiTopicsListMockTests.java | 22 +- .../generated/ReplacementConfigTests.java | 10 +- .../generated/ResourceBaseTests.java | 14 +- ...mainAvailabilityWithResponseMockTests.java | 16 +- ...kSkuAvailabilityWithResponseMockTests.java | 20 +- .../ResourceSkuRestrictionInfoTests.java | 9 +- .../generated/SafetyProviderConfigTests.java | 24 +- ...erviceTagOutboundRuleDestinationTests.java | 32 +- .../ServiceTagOutboundRuleTests.java | 26 +- .../generated/SkuResourceInnerTests.java | 24 +- .../cognitiveservices/generated/SkuTests.java | 31 +- ...esCreateOrUpdateWithResponseMockTests.java | 268 +- ...onRaiPoliciesGetWithResponseMockTests.java | 94 +- .../generated/TrafficRoutingRuleTests.java | 26 +- .../generated/UsageInnerTests.java | 18 +- .../generated/UsageListResultInnerTests.java | 22 +- .../generated/UsagesListMockTests.java | 20 +- .../generated/UserAssignedIdentityTests.java | 5 +- .../VersionedAgentReferenceTests.java | 16 +- .../WorkbenchUpdatePropertiesTests.java | 35 - .../generated/WorkbenchUpdateTests.java | 59 - .../tsp-location.yaml | 4 +- .../CHANGELOG.md | 62 + .../README.md | 79 + .../checkstyle-suppressions.xml | 8 + .../azure-communication-callingserver/ci.yml | 35 + .../azure-communication-callingserver/pom.xml | 139 + .../spotbugs-exclude.xml | 19 + .../CallAutomationAsyncClient.java | 349 + .../callingserver/CallAutomationClient.java | 183 + .../CallAutomationClientBuilder.java | 479 + .../callingserver/CallConnection.java | 241 + .../callingserver/CallConnectionAsync.java | 392 + .../callingserver/CallMedia.java | 124 + .../callingserver/CallMediaAsync.java | 259 + .../callingserver/CallRecording.java | 277 + .../callingserver/CallRecordingAsync.java | 542 + .../CallingServerServiceVersion.java | 43 + .../callingserver/ContentDownloader.java | 265 + .../callingserver/EventHandler.java | 120 + ...CommunicationCallingServerServiceImpl.java | 154 + ...cationCallingServerServiceImplBuilder.java | 228 + .../implementation/CallConnectionsImpl.java | 974 + .../implementation/Constants.java | 30 + .../implementation/ContentsImpl.java | 477 + .../CustomHmacAuthenticationPolicy.java | 143 + .../implementation/ServerCallingsImpl.java | 477 + .../implementation/ServerCallsImpl.java | 450 + ...dParticipantsResponseConstructorProxy.java | 60 + ...lConnectionPropertiesConstructorProxy.java | 63 + .../accesshelpers/ErrorConstructorProxy.java | 65 + ...tParticipantsResponseConstructorProxy.java | 58 + ...ecordingStateResponseConstructorProxy.java | 57 + ...eParticipantsResponseConstructorProxy.java | 60 + .../TransferCallResponseConstructorProxy.java | 60 + .../accesshelpers/package-info.java | 7 + .../converters/CallParticipantConverter.java | 29 + .../converters/CallSourceConverter.java | 43 + .../CommunicationIdentifierConverter.java | 148 + .../PhoneNumberIdentifierConverter.java | 43 + .../converters/package-info.java | 5 + .../models/AcsCallParticipantInternal.java | 104 + .../models/AcsEventTypeInternal.java | 75 + .../AddParticipantsRequestInternal.java | 167 + .../AddParticipantsResponseInternal.java | 105 + .../models/AnswerCallRequestInternal.java | 133 + .../CallConnectionPropertiesInternal.java | 275 + .../CallConnectionStateModelInternal.java | 58 + .../models/CallLocatorInternal.java | 133 + .../models/CallLocatorKindInternal.java | 43 + .../models/CallRejectReasonInternal.java | 46 + .../models/CallSourceInternal.java | 105 + .../models/ChannelAffinityInternal.java | 109 + .../models/CollectTonesResult.java | 75 + .../CommunicationCloudEnvironmentModel.java | 46 + .../models/CommunicationError.java | 189 + .../models/CommunicationErrorResponse.java | 74 + .../models/CommunicationIdentifierModel.java | 189 + .../CommunicationIdentifierModelKind.java | 49 + .../CommunicationUserIdentifierModel.java | 74 + .../models/CreateCallRequestInternal.java | 190 + .../models/DtmfConfigurationsInternal.java | 134 + .../models/FileSourceInternal.java | 74 + .../GetParticipantsResponseInternal.java | 105 + ...ediaStreamingAudioChannelTypeInternal.java | 44 + .../MediaStreamingConfigurationInternal.java | 164 + .../MediaStreamingContentTypeInternal.java | 40 + .../MediaStreamingTransportTypeInternal.java | 41 + .../MicrosoftTeamsUserIdentifierModel.java | 133 + .../models/PhoneNumberIdentifierModel.java | 74 + .../models/PlayOptionsInternal.java | 74 + .../implementation/models/PlayRequest.java | 163 + .../models/PlaySourceInternal.java | 133 + .../models/PlaySourceTypeInternal.java | 40 + .../models/RecognitionType.java | 39 + .../models/RecognizeCompleted.java | 275 + .../RecognizeConfigurationsInternal.java | 161 + .../models/RecognizeFailed.java | 219 + .../models/RecognizeInputTypeInternal.java | 40 + .../models/RecognizeRequest.java | 191 + .../models/RecordingChannelInternal.java | 43 + .../models/RecordingContentInternal.java | 43 + .../models/RecordingFormatInternal.java | 46 + .../models/RecordingStateInternal.java | 43 + .../RecordingStateResponseInternal.java | 105 + .../models/RedirectCallRequestInternal.java | 104 + .../models/RejectCallRequestInternal.java | 105 + .../RemoveParticipantsRequestInternal.java | 106 + .../RemoveParticipantsResponseInternal.java | 74 + .../models/ResultInformation.java | 132 + .../StartCallRecordingRequestInternal.java | 218 + .../models/StopTonesInternal.java | 84 + .../models/TransferCallResponseInternal.java | 74 + .../TransferToParticipantRequestInternal.java | 161 + .../implementation/models/package-info.java | 6 + .../implementation/package-info.java | 6 + .../models/AddParticipantsOptions.java | 119 + .../models/AddParticipantsResult.java | 79 + .../models/AnswerCallResult.java | 25 + .../models/CallConnectionProperties.java | 140 + .../models/CallConnectionState.java | 55 + .../callingserver/models/CallLocator.java | 35 + .../callingserver/models/CallLocatorKind.java | 44 + .../callingserver/models/CallParticipant.java | 50 + .../models/CallRejectReason.java | 46 + .../callingserver/models/CallResult.java | 61 + .../callingserver/models/CallSource.java | 62 + .../models/CallingOperationStatus.java | 47 + .../models/CallingServerError.java | 100 + .../models/CallingServerErrorException.java | 95 + .../callingserver/models/ChannelAffinity.java | 100 + .../models/CreateCallOptions.java | 148 + .../models/CreateCallResult.java | 25 + .../models/DownloadToFileOptions.java | 67 + .../models/DtmfConfigurations.java | 143 + .../callingserver/models/FileSource.java | 83 + .../models/GroupCallLocator.java | 35 + .../models/ListParticipantsResult.java | 62 + .../MediaStreamingAudioChannelType.java | 46 + .../models/MediaStreamingConfiguration.java | 134 + .../models/MediaStreamingContentType.java | 43 + .../models/MediaStreamingTransportType.java | 43 + .../models/ParallelDownloadOptions.java | 113 + .../callingserver/models/PlayOptions.java | 66 + .../callingserver/models/PlaySource.java | 87 + .../callingserver/models/PlaySourceType.java | 41 + .../models/RecognizeConfigurations.java | 173 + .../models/RecognizeInputType.java | 41 + .../models/RecognizeOptions.java | 205 + .../models/RecordingChannel.java | 43 + .../models/RecordingContent.java | 44 + .../callingserver/models/RecordingFormat.java | 47 + .../callingserver/models/RecordingState.java | 43 + .../models/RecordingStateResult.java | 59 + .../models/RemoveParticipantsResult.java | 58 + .../models/ServerCallLocator.java | 35 + .../models/StartRecordingOptions.java | 150 + .../callingserver/models/StopTones.java | 86 + .../models/TransferCallResult.java | 57 + .../TransferToParticipantCallOptions.java | 113 + .../events/AddParticipantsFailedEvent.java | 108 + .../events/AddParticipantsSucceededEvent.java | 107 + .../events/CallAutomationEventBase.java | 86 + .../models/events/CallConnectedEvent.java | 49 + .../models/events/CallDisconnectedEvent.java | 49 + .../events/CallTransferAcceptedEvent.java | 86 + .../events/CallTransferFailedEvent.java | 86 + .../events/ParticipantsUpdatedEvent.java | 73 + .../models/events/PlayCompleted.java | 86 + .../models/events/PlayFailed.java | 86 + .../events/RecordingStateChangedEvent.java | 107 + .../models/events/ResultInfo.java | 101 + .../models/events/package-info.java | 5 + .../callingserver/models/package-info.java | 6 + .../callingserver/package-info.java | 5 + .../src/main/java/module-info.java | 18 + .../CallAutomationAsyncClientUnitTests.java | 138 + .../CallAutomationClientBuilderUnitTests.java | 229 + .../CallAutomationClientUnitTests.java | 135 + .../CallAutomationLiveTestBase.java | 142 + .../CallAutomationUnitTestBase.java | 168 + .../CallConnectionAsyncUnitTests.java | 273 + .../CallConnectionUnitTests.java | 258 + .../CallMediaAsyncUnitTests.java | 78 + .../callingserver/CallMediaUnitTests.java | 73 + .../CallRecordingAsyncLiveTests.java | 71 + .../CallRecordingAsyncUnitTests.java | 76 + .../callingserver/CallRecordingLiveTests.java | 69 + .../CallRecordingUnitTestBase.java | 45 + .../callingserver/CallRecordingUnitTests.java | 59 + ...unicationIdentifierConverterUnitTests.java | 383 + .../callingserver/DeleteAsyncLiveTests.java | 94 + .../callingserver/DeleteLiveTests.java | 95 + .../DownloadContentAsyncLiveTests.java | 216 + .../DownloadContentAsyncUnitTests.java | 113 + .../DownloadContentLiveTests.java | 151 + .../DownloadContentUnitTests.java | 59 + .../callingserver/EventHandlerUnitTests.java | 112 + .../callingserver/MockHttpClient.java | 50 + .../callingserver/ModelGenerator.java | 22 + .../swagger/README.md | 278 + .../tests.yml | 8 + .../azure-communication-common/pom.xml | 6 + .../azure-communication-jobrouter/pom.xml | 14 + sdk/communication/pom.xml | 1 + .../CHANGELOG.md | 25 +- .../azure-resourcemanager-compute/README.md | 2 +- .../azure-resourcemanager-compute/pom.xml | 6 +- .../CapacityReservationGroupsClient.java | 62 +- .../fluent/models/VirtualMachineInner.java | 38 - ...orkInterfaceIPConfigurationProperties.java | 33 - .../models/VirtualMachinePropertiesInner.java | 53 - ...hineScaleSetIPConfigurationProperties.java | 33 - ...aleSetUpdateIPConfigurationProperties.java | 33 - .../models/VirtualMachineUpdateInner.java | 38 - .../CapacityReservationGroupsClientImpl.java | 128 +- .../compute/models/FlexProfile.java | 117 - .../models/ResourceSkuZoneDetails.java | 2 +- .../models/RestorePointInstanceView.java | 11 +- ...achineNetworkInterfaceIpConfiguration.java | 26 - ...VirtualMachineScaleSetIpConfiguration.java | 26 - ...lMachineScaleSetUpdateIpConfiguration.java | 26 - ...zure-resourcemanager-compute_metadata.json | 2 +- ...apacityReservationGroupsDeleteSamples.java | 4 +- .../VirtualMachineScaleSetsUpdateSamples.java | 1 - .../VirtualMachinesCreateOrUpdateSamples.java | 38 - ...tualMachinesGetByResourceGroupSamples.java | 14 - .../VirtualMachinesUpdateSamples.java | 18 - .../tsp-location.yaml | 2 +- .../pom.xml | 2 +- .../CHANGELOG.md | 440 +- .../README.md | 4 +- .../SAMPLE.md | 886 +- .../pom.xml | 6 +- .../fluent/ScheduledActionsClient.java | 49 +- ...ateFlexResourceOperationResponseInner.java | 131 - .../ComputeScheduleMgmtClientImpl.java | 2 +- ...eateFlexResourceOperationResponseImpl.java | 52 - .../ScheduledActionsClientImpl.java | 134 +- .../implementation/ScheduledActionsImpl.java | 22 - .../models/AdditionalCapabilities.java | 119 - .../models/AdditionalUnattendContent.java | 183 - ...dditionalUnattendContentComponentName.java | 51 - .../AdditionalUnattendContentPassName.java | 51 - .../models/AllInstancesDown.java | 87 - .../models/AllocationStrategy.java | 56 - .../models/ApiEntityReference.java | 87 - .../models/ApplicationProfile.java | 89 - .../models/BootDiagnostics.java | 118 - .../models/BulkActionVMExtension.java | 114 - .../models/BulkActionVMProperties.java | 495 - .../BulkActionVmExtensionProperties.java | 415 - .../models/BulkVMConfiguration.java | 375 - .../computeschedule/models/CachingTypes.java | 57 - .../models/CapacityReservationProfile.java | 91 - .../CreateFlexResourceOperationResponse.java | 49 - .../computeschedule/models/DataDisk.java | 459 - .../computeschedule/models/DeleteOptions.java | 51 - .../models/DiagnosticsProfile.java | 94 - .../models/DiffDiskOptions.java | 46 - .../models/DiffDiskPlacement.java | 61 - .../models/DiffDiskSettings.java | 120 - .../models/DiskControllerTypes.java | 56 - .../models/DiskCreateOptionTypes.java | 72 - .../models/DiskDeleteOptionTypes.java | 54 - .../models/DiskDetachOptionTypes.java | 52 - .../models/DiskEncryptionSetParameters.java | 71 - .../models/DiskEncryptionSettings.java | 143 - .../models/DistributionStrategy.java | 61 - .../models/DomainNameLabelScopeTypes.java | 63 - .../models/EncryptionIdentity.java | 87 - .../models/EventGridAndResourceGraph.java | 117 - .../models/ExecuteCreateFlexRequest.java | 144 - .../models/ExtendedLocation.java | 114 - .../models/ExtendedLocationType.java | 51 - .../models/FallbackOperationInfo.java | 109 - .../models/FlexProperties.java | 173 - .../models/HardwareProfile.java | 148 - .../models/HostEndpointSettings.java | 128 - .../computeschedule/models/IPVersions.java | 52 - .../models/ImageReference.java | 269 - .../models/KeyVaultKeyReference.java | 115 - .../models/KeyVaultSecretReference.java | 115 - .../models/LinuxConfiguration.java | 209 - .../models/LinuxPatchAssessmentMode.java | 54 - .../models/LinuxPatchSettings.java | 167 - ...PatchAutomaticByPlatformRebootSetting.java | 62 - ...GuestPatchAutomaticByPlatformSettings.java | 124 - .../models/LinuxVMGuestPatchMode.java | 55 - .../models/ManagedDiskParameters.java | 160 - .../computeschedule/models/Mode.java | 53 - .../computeschedule/models/Modes.java | 58 - .../models/NetworkApiVersion.java | 52 - .../models/NetworkInterfaceAuxiliaryMode.java | 56 - .../models/NetworkInterfaceAuxiliarySku.java | 66 - .../models/NetworkInterfaceReference.java | 98 - .../NetworkInterfaceReferenceProperties.java | 119 - .../models/NetworkProfile.java | 157 - .../computeschedule/models/OSDisk.java | 431 - .../models/OSImageNotificationProfile.java | 119 - .../computeschedule/models/OSProfile.java | 411 - .../models/OperatingSystemTypes.java | 52 - .../computeschedule/models/OsType.java | 51 - .../computeschedule/models/PatchSettings.java | 210 - .../computeschedule/models/Placement.java | 169 - .../computeschedule/models/Plan.java | 203 - .../models/PriorityProfile.java | 114 - .../computeschedule/models/PriorityType.java | 51 - .../computeschedule/models/ProtocolTypes.java | 51 - .../models/ProxyAgentSettings.java | 242 - .../models/PublicIPAddressSku.java | 113 - .../models/PublicIPAddressSkuName.java | 51 - .../models/PublicIPAddressSkuTier.java | 51 - .../models/PublicIPAllocationMethod.java | 51 - .../models/ResourceIdentityType.java | 68 - .../models/ResourceOperationDetails.java | 17 - .../models/ResourceOperationType.java | 10 - .../models/ResourceProvisionFlexPayload.java | 209 - .../models/ResourceProvisionPayload.java | 103 +- .../computeschedule/models/RetryPolicy.java | 29 - .../models/ScheduledActions.java | 45 +- ...uledEventsAdditionalPublishingTargets.java | 91 - .../models/ScheduledEventsPolicy.java | 180 - .../models/ScheduledEventsProfile.java | 117 - .../models/SecurityEncryptionTypes.java | 58 - .../models/SecurityProfile.java | 218 - .../computeschedule/models/SecurityTypes.java | 52 - .../computeschedule/models/SettingNames.java | 52 - .../models/SshConfiguration.java | 87 - .../computeschedule/models/SshPublicKey.java | 122 - .../models/StorageAccountTypes.java | 82 - .../models/StorageProfile.java | 204 - .../models/TerminateNotificationProfile.java | 119 - .../computeschedule/models/UefiSettings.java | 118 - .../models/UserAssignedIdentitiesValue.java | 89 - .../models/UserInitiatedReboot.java | 85 - .../models/UserInitiatedRedeploy.java | 85 - .../models/VMDiskSecurityProfile.java | 127 - .../models/VMGalleryApplication.java | 240 - .../models/VaultCertificate.java | 150 - .../models/VaultSecretGroup.java | 120 - .../models/VirtualHardDisk.java | 85 - .../models/VirtualMachineIdentity.java | 166 - .../models/VirtualMachineIpTag.java | 113 - ...lMachineNetworkInterfaceConfiguration.java | 150 - ...tworkInterfaceConfigurationProperties.java | 429 - ...workInterfaceDnsSettingsConfiguration.java | 90 - ...achineNetworkInterfaceIPConfiguration.java | 118 - ...orkInterfaceIPConfigurationProperties.java | 297 - ...alMachinePublicIPAddressConfiguration.java | 178 - ...ublicIPAddressConfigurationProperties.java | 274 - ...blicIPAddressDnsSettingsConfiguration.java | 130 - .../computeschedule/models/VmSizeProfile.java | 114 - .../models/VmSizeProperties.java | 133 - .../models/WinRMConfiguration.java | 87 - .../computeschedule/models/WinRMListener.java | 139 - .../models/WindowsConfiguration.java | 258 - .../models/WindowsPatchAssessmentMode.java | 54 - ...PatchAutomaticByPlatformRebootSetting.java | 62 - ...GuestPatchAutomaticByPlatformSettings.java | 125 - .../models/WindowsVMGuestPatchMode.java | 63 - .../models/ZoneAllocationPolicy.java | 120 - .../models/ZonePlacementPolicyType.java | 53 - .../models/ZonePreference.java | 114 - ...ourcemanager-computeschedule_metadata.json | 2 +- ...ceExtensionListOccurrenceByVmsSamples.java | 23 +- .../generated/OccurrencesCancelSamples.java | 6 +- .../generated/OccurrencesDelaySamples.java | 10 +- .../generated/OccurrencesGetSamples.java | 4 +- ...currencesListByScheduledActionSamples.java | 4 +- .../OccurrencesListResourcesSamples.java | 4 +- .../generated/OperationsListSamples.java | 4 +- ...eduledActionExtensionListByVmsSamples.java | 14 +- ...cheduledActionsAttachResourcesSamples.java | 6 +- ...ledActionsCancelNextOccurrenceSamples.java | 6 +- ...ScheduledActionsCreateOrUpdateSamples.java | 25 +- .../ScheduledActionsDeleteSamples.java | 4 +- ...cheduledActionsDetachResourcesSamples.java | 6 +- .../ScheduledActionsDisableSamples.java | 4 +- .../ScheduledActionsEnableSamples.java | 4 +- ...duledActionsGetByResourceGroupSamples.java | 5 +- ...uledActionsListByResourceGroupSamples.java | 4 +- .../ScheduledActionsListResourcesSamples.java | 4 +- .../ScheduledActionsListSamples.java | 4 +- ...ScheduledActionsPatchResourcesSamples.java | 6 +- ...ActionsTriggerManualOccurrenceSamples.java | 4 +- .../ScheduledActionsUpdateSamples.java | 24 +- ...irtualMachinesCancelOperationsSamples.java | 16 +- ...rtualMachinesExecuteCreateFlexSamples.java | 228 - ...nsVirtualMachinesExecuteCreateSamples.java | 218 +- ...rtualMachinesExecuteDeallocateSamples.java | 21 +- ...nsVirtualMachinesExecuteDeleteSamples.java | 35 +- ...irtualMachinesExecuteHibernateSamples.java | 25 +- ...onsVirtualMachinesExecuteStartSamples.java | 25 +- ...tualMachinesGetOperationErrorsSamples.java | 20 +- ...tualMachinesGetOperationStatusSamples.java | 20 +- ...irtualMachinesSubmitDeallocateSamples.java | 35 +- ...VirtualMachinesSubmitHibernateSamples.java | 35 +- ...ionsVirtualMachinesSubmitStartSamples.java | 35 +- .../AdditionalCapabilitiesTests.java | 28 - .../AdditionalUnattendContentTests.java | 41 - .../generated/AllInstancesDownTests.java | 25 - .../generated/ApiEntityReferenceTests.java | 24 - .../generated/ApplicationProfileTests.java | 50 - .../generated/BootDiagnosticsTests.java | 27 - .../CancelOccurrenceRequestTests.java | 8 +- .../CancelOperationsRequestTests.java | 14 +- .../CapacityReservationProfileTests.java | 27 - .../generated/DataDiskTests.java | 89 - .../generated/DelayRequestTests.java | 17 +- .../generated/DiagnosticsProfileTests.java | 30 - .../generated/DiffDiskSettingsTests.java | 30 - .../DiskEncryptionSetParametersTests.java | 25 - .../generated/EncryptionIdentityTests.java | 25 - .../EventGridAndResourceGraphTests.java | 29 - .../generated/ExecuteCreateRequestTests.java | 62 + .../ExecuteDeallocateRequestTests.java | 41 +- .../generated/ExecuteDeleteRequestTests.java | 40 +- .../ExecuteHibernateRequestTests.java | 37 +- .../generated/ExecuteStartRequestTests.java | 41 +- .../generated/ExecutionParametersTests.java | 17 +- .../generated/ExtendedLocationTests.java | 29 - .../generated/FlexPropertiesTests.java | 60 - .../GetOperationErrorsRequestTests.java | 13 +- .../GetOperationStatusRequestTests.java | 14 +- .../generated/HardwareProfileTests.java | 32 - .../generated/HostEndpointSettingsTests.java | 30 - .../generated/ImageReferenceTests.java | 44 - .../generated/LinuxPatchSettingsTests.java | 42 - ...PatchAutomaticByPlatformSettingsTests.java | 31 - .../generated/ManagedDiskParametersTests.java | 45 - ...workInterfaceReferencePropertiesTests.java | 30 - .../NetworkInterfaceReferenceTests.java | 34 - .../generated/NetworkProfileTests.java | 133 - .../NotificationPropertiesTests.java | 14 +- .../OSImageNotificationProfileTests.java | 29 - .../generated/OperationsListMockTests.java | 2 +- .../generated/PatchSettingsTests.java | 45 - .../generated/PlacementTests.java | 34 - .../generated/PriorityProfileTests.java | 30 - .../generated/PublicIPAddressSkuTests.java | 30 - .../generated/ResourceAttachRequestTests.java | 40 +- .../generated/ResourceDetachRequestTests.java | 11 +- .../generated/ResourceListResponseTests.java | 8 +- .../generated/ResourcePatchRequestTests.java | 57 +- .../ResourceProvisionPayloadTests.java | 46 + .../generated/ResourcesTests.java | 8 +- .../generated/RetryPolicyTests.java | 18 +- .../generated/ScheduleTests.java | 32 +- ...ledActionExtensionsListByVmsMockTests.java | 34 +- .../generated/ScheduledActionInnerTests.java | 139 +- .../ScheduledActionListResultTests.java | 35 +- .../ScheduledActionPropertiesTests.java | 118 +- .../ScheduledActionResourceInnerTests.java | 22 +- .../ScheduledActionResourcesInnerTests.java | 35 +- ...heduledActionResourcesListResultTests.java | 26 +- .../ScheduledActionUpdatePropertiesTests.java | 114 +- .../generated/ScheduledActionUpdateTests.java | 125 +- ...heduledActionsCreateOrUpdateMockTests.java | 91 +- ...edActionsDisableWithResponseMockTests.java | 2 +- ...ledActionsEnableWithResponseMockTests.java | 3 +- ...eduledActionsExtensionPropertiesTests.java | 34 +- ...tByResourceGroupWithResponseMockTests.java | 39 +- ...edActionsListByResourceGroupMockTests.java | 37 +- .../ScheduledActionsListMockTests.java | 35 +- ...cheduledActionsListResourcesMockTests.java | 10 +- .../ScheduledActionsScheduleTests.java | 55 +- ...ventsAdditionalPublishingTargetsTests.java | 31 - .../generated/ScheduledEventsPolicyTests.java | 47 - .../ScheduledEventsProfileTests.java | 38 - .../SubmitDeallocateRequestTests.java | 23 +- .../SubmitHibernateRequestTests.java | 64 +- .../generated/SubmitStartRequestTests.java | 62 +- .../TerminateNotificationProfileTests.java | 28 - .../generated/UefiSettingsTests.java | 27 - .../UserAssignedIdentitiesValueTests.java | 23 - .../generated/UserInitiatedRebootTests.java | 25 - .../generated/UserInitiatedRedeployTests.java | 25 - .../generated/VMDiskSecurityProfileTests.java | 33 - .../generated/VMGalleryApplicationTests.java | 41 - .../generated/VaultCertificateTests.java | 29 - .../generated/VaultSecretGroupTests.java | 39 - .../generated/VirtualHardDiskTests.java | 24 - .../VirtualMachineIdentityTests.java | 45 - .../generated/VirtualMachineIpTagTests.java | 27 - ...InterfaceConfigurationPropertiesTests.java | 272 - ...ineNetworkInterfaceConfigurationTests.java | 176 - ...nterfaceDnsSettingsConfigurationTests.java | 29 - ...terfaceIPConfigurationPropertiesTests.java | 129 - ...eNetworkInterfaceIPConfigurationTests.java | 146 - ...IPAddressConfigurationPropertiesTests.java | 63 - ...hinePublicIPAddressConfigurationTests.java | 92 - ...PAddressDnsSettingsConfigurationTests.java | 31 - .../generated/VmSizeProfileTests.java | 27 - .../generated/VmSizePropertiesTests.java | 27 - .../generated/WinRMConfigurationTests.java | 32 - .../generated/WinRMListenerTests.java | 29 - .../generated/WindowsConfigurationTests.java | 90 - ...PatchAutomaticByPlatformSettingsTests.java | 31 - .../generated/ZoneAllocationPolicyTests.java | 35 - .../generated/ZonePreferenceTests.java | 27 - .../tsp-location.yaml | 2 +- .../azure-security-confidentialledger/pom.xml | 3 - .../pom.xml | 4 +- .../CHANGELOG.md | 17 +- .../README.md | 2 +- .../pom.xml | 4 +- .../fluent/AgentPoolsClient.java | 353 + .../fluent/AlertConfigurationsClient.java | 346 + .../ContainerServiceManagementClient.java | 56 + .../fluent/JWTAuthenticatorsClient.java | 352 + .../fluent/LoadBalancersClient.java | 294 + .../fluent/MachinesClient.java | 172 + .../fluent/MaintenanceWindowsClient.java | 437 + .../fluent/ManagedClusterSnapshotsClient.java | 324 + .../fluent/ManagedClustersClient.java | 446 +- .../fluent/MeshMembershipsClient.java | 345 + .../fluent/OperationStatusResultsClient.java | 249 + .../containerservice/fluent/VmSkusClient.java | 92 + .../fluent/models/AgentPoolInner.java | 137 + .../models/AgentPoolUpgradeProfileInner.java | 10 + .../AgentPoolUpgradeProfileProperties.java | 24 + .../models/AlertConfigurationInner.java | 167 + .../GuardrailsAvailableVersionInner.java | 164 + .../fluent/models/IdentityBindingInner.java | 34 + .../fluent/models/JWTAuthenticatorInner.java | 185 + .../fluent/models/LoadBalancerInner.java | 298 + .../fluent/models/LoadBalancerProperties.java | 259 + .../fluent/models/MachineInner.java | 29 +- .../models/MaintenanceConfigurationInner.java | 29 + .../MaintenanceConfigurationProperties.java | 37 + .../MaintenanceWindowResourceInner.java | 196 + ...agedClusterAgentPoolProfileProperties.java | 184 + .../fluent/models/ManagedClusterInner.java | 163 + .../models/ManagedClusterProperties.java | 217 + .../models/ManagedClusterSnapshotInner.java | 240 + .../ManagedClusterSnapshotProperties.java | 150 + .../fluent/models/MeshMembershipInner.java | 222 + .../fluent/models/NodeImageVersionInner.java | 134 + .../models/OperationStatusResultInner.java | 273 + .../fluent/models/PoolBootstrapDataInner.java | 145 + .../fluent/models/ResourceSkuInner.java | 307 + .../SafeguardsAvailableVersionInner.java | 164 + .../implementation/AgentPoolsClientImpl.java | 753 + .../AlertConfigurationsClientImpl.java | 938 + .../ContainerServiceManagementClientImpl.java | 130 +- .../JWTAuthenticatorsClientImpl.java | 948 + .../LoadBalancersClientImpl.java | 829 + .../implementation/MachinesClientImpl.java | 364 + .../MaintenanceWindowsClientImpl.java | 1239 + .../ManagedClusterSnapshotsClientImpl.java | 1000 + .../ManagedClustersClientImpl.java | 1575 +- .../MeshMembershipsClientImpl.java | 937 + .../OperationStatusResultsClientImpl.java | 838 + .../implementation/VmSkusClientImpl.java | 331 + .../models/AlertConfigurationListResult.java | 114 + .../GuardrailsAvailableVersionsList.java | 115 + .../models/JWTAuthenticatorListResult.java | 114 + .../models/LoadBalancerListResult.java | 112 + .../MaintenanceWindowResourceListResult.java | 116 + .../ManagedClusterSnapshotListResult.java | 115 + .../models/MeshMembershipsListResult.java | 114 + .../models/NodeImageVersionsListResult.java | 114 + .../models/OperationStatusResultList.java | 114 + .../SafeguardsAvailableVersionsList.java | 115 + .../models/VmSkusListResult.java | 112 + .../models/AddonAutoscaling.java | 51 + .../AgentPoolBlueGreenUpgradeSettings.java | 210 + .../models/AgentPoolMode.java | 13 + ...ntPoolNICPublicIPAddressConfiguration.java | 179 + .../AgentPoolNICPublicIPAddressVersion.java | 46 + .../models/AgentPoolNetworkInterface.java | 205 + .../models/AgentPoolNetworkInterfaceType.java | 55 + .../models/AgentPoolNetworkProfile.java | 95 + .../models/AgentPoolType.java | 5 + .../models/AgentPoolUpdate.java | 96 + .../AgentPoolUpdateManualScaleProfile.java | 125 + .../models/AgentPoolUpdateProperties.java | 126 + .../models/AgentPoolUpdateScaleProfile.java | 99 + ...AgentPoolUpdateVirtualMachinesProfile.java | 99 + ...lUpgradeProfilePropertiesUpgradesItem.java | 18 + .../models/AgentPoolUpgradeSettings.java | 86 + .../models/AlertConfigurationMode.java | 52 + .../models/AlertConfigurationProperties.java | 155 + .../AlertConfigurationProvisioningState.java | 72 + .../models/AlertNotification.java | 102 + .../models/AllowedSubject.java | 161 + .../models/BackendPoolType.java | 6 + .../models/BastionProfile.java | 236 + .../containerservice/models/BastionSku.java | 52 + .../models/BootstrapAzureConfig.java | 135 + .../models/BootstrapComponentVersions.java | 113 + .../models/BootstrapKubeletConfig.java | 97 + .../models/BootstrapNetworkingConfig.java | 97 + .../models/BootstrapNodeConfig.java | 136 + .../models/BootstrapTargetCluster.java | 81 + .../models/BootstrapTokenInfo.java | 81 + .../models/CapacityReservation.java | 99 + .../models/CapacityReservationGroup.java | 105 + ...terServiceLoadBalancerHealthProbeMode.java | 53 + .../models/ClusterUpgradeSettings.java | 39 + .../containerservice/models/Component.java | 121 + .../models/ComponentsByRelease.java | 104 + .../ContainerServiceNetworkProfile.java | 153 + ...rServiceNetworkProfileKubeProxyConfig.java | 166 + ...tworkProfileKubeProxyConfigIpvsConfig.java | 193 + .../models/ControlPlaneScalingSize.java | 59 + .../containerservice/models/DriftAction.java | 52 + .../containerservice/models/DriverType.java | 54 + .../containerservice/models/GpuProfile.java | 36 + ...GuardrailsAvailableVersionsProperties.java | 101 + .../models/GuardrailsSupport.java | 52 + .../models/HardEvictionThreshold.java | 168 + .../models/IdentityBindingProperties.java | 50 + .../models/IpvsScheduler.java | 51 + ...WTAuthenticatorClaimMappingExpression.java | 104 + .../models/JWTAuthenticatorClaimMappings.java | 213 + ...henticatorExtraClaimMappingExpression.java | 137 + .../models/JWTAuthenticatorIssuer.java | 142 + .../models/JWTAuthenticatorProperties.java | 299 + .../JWTAuthenticatorProvisioningState.java | 71 + .../JWTAuthenticatorValidationRule.java | 131 + .../containerservice/models/KubeReserved.java | 128 + .../models/KubeletConfig.java | 228 + .../models/LabelSelector.java | 138 + .../models/LabelSelectorRequirement.java | 154 + .../models/ListBootstrapDataRequest.java | 63 + .../models/LoadBalancerSku.java | 7 + .../models/MachineBillingProfile.java | 101 + .../models/MachineHardwareProfile.java | 190 + .../models/MachineKubernetesProfile.java | 390 + .../models/MachineNetworkProperties.java | 183 +- .../models/MachineOSProfile.java | 285 + .../models/MachineOSProfileLinuxProfile.java | 132 + .../models/MachineProperties.java | 432 +- .../models/MachineSecurityProfile.java | 193 + .../models/MachineStatus.java | 155 + .../MaintenanceWindowResourceProperties.java | 317 + .../ManagedClusterAgentPoolProfile.java | 74 + ...agedClusterControlPlaneScalingProfile.java | 112 + .../ManagedClusterHealthMonitorProfile.java | 128 + .../models/ManagedClusterHttpProxyConfig.java | 19 + ...gedClusterIngressDefaultDomainProfile.java | 114 + .../models/ManagedClusterIngressProfile.java | 33 + ...IngressProfileApplicationLoadBalancer.java | 119 + ...gedClusterIngressProfileWebAppRouting.java | 39 + .../ManagedClusterLoadBalancerProfile.java | 35 + .../ManagedClusterPoolUpgradeProfile.java | 23 + ...ClusterPoolUpgradeProfileUpgradesItem.java | 18 + .../ManagedClusterPropertiesForSnapshot.java | 139 + .../models/ManagedClusterSecurityProfile.java | 111 + ...dClusterSecurityProfileImageIntegrity.java | 96 + ...ClusterSecurityProfileNodeRestriction.java | 96 + ...utoScalerProfileVerticalPodAutoscaler.java | 31 + .../MeshMembershipPrivateConnectProfile.java | 115 + .../models/MeshMembershipProperties.java | 164 + .../MeshMembershipProvisioningState.java | 71 + .../containerservice/models/MigStrategy.java | 60 + .../containerservice/models/Mode.java | 56 + .../models/NetworkProfileForSnapshot.java | 154 + .../models/NodeDisruptionPolicy.java | 65 + .../models/NodeDisruptionProfile.java | 107 + .../models/NvidiaDriverMode.java | 51 + .../models/NvidiaGPUProfile.java | 114 + .../containerservice/models/OSSku.java | 25 + .../containerservice/models/Operator.java | 61 + .../models/PodLinkLocalAccess.java | 52 + .../PreparedImageSpecificationProfile.java | 99 + .../models/PublicNetworkAccess.java | 5 + .../RebalanceLoadBalancersRequestBody.java | 97 + .../models/ResourceProvisioningState.java | 2 +- .../models/ResourceSkuCapabilities.java | 97 + .../models/ResourceSkuCapacity.java | 130 + .../models/ResourceSkuCapacityScaleType.java | 56 + .../models/ResourceSkuCosts.java | 113 + .../models/ResourceSkuLocationInfo.java | 153 + .../models/ResourceSkuRestrictionInfo.java | 100 + .../models/ResourceSkuRestrictions.java | 138 + .../ResourceSkuRestrictionsReasonCode.java | 52 + .../models/ResourceSkuRestrictionsType.java | 51 + .../models/ResourceSkuZoneDetails.java | 105 + ...SafeguardsAvailableVersionsProperties.java | 101 + .../models/SafeguardsSupport.java | 52 + .../models/SeccompDefault.java | 53 + .../ServiceAccountImagePullProfile.java | 139 + .../containerservice/models/SnapshotType.java | 5 + .../models/SoftEvictionGracePeriod.java | 169 + .../models/SoftEvictionThreshold.java | 174 + .../models/TransitEncryptionType.java | 6 + .../models/UpgradeGateSettings.java | 111 + .../models/UpgradeStrategy.java | 51 + .../containerservice/models/VmState.java | 51 + .../models/WorkloadRuntime.java | 8 + ...urcemanager-containerservice_metadata.json | 2 +- .../proxy-config.json | 2 +- ...AgentPoolsAbortLatestOperationSamples.java | 2 +- .../AgentPoolsCompleteUpgradeSamples.java | 25 + .../AgentPoolsCreateOrUpdateSamples.java | 439 +- .../AgentPoolsDeleteMachinesSamples.java | 2 +- .../generated/AgentPoolsDeleteSamples.java | 17 +- ...sGetAvailableAgentPoolVersionsSamples.java | 2 +- .../generated/AgentPoolsGetSamples.java | 2 +- .../AgentPoolsGetUpgradeProfileSamples.java | 2 +- .../AgentPoolsListBootstrapDataSamples.java | 28 + .../generated/AgentPoolsListSamples.java | 2 +- .../generated/AgentPoolsUpdateSamples.java | 54 + ...ntPoolsUpgradeNodeImageVersionSamples.java | 2 +- ...rtConfigurationsCreateOrUpdateSamples.java | 35 + .../AlertConfigurationsDeleteSamples.java | 25 + .../AlertConfigurationsGetSamples.java | 25 + ...igurationsListByManagedClusterSamples.java | 25 + ...IdentityBindingsCreateOrUpdateSamples.java | 36 +- .../IdentityBindingsDeleteSamples.java | 2 +- .../generated/IdentityBindingsGetSamples.java | 2 +- ...tyBindingsListByManagedClusterSamples.java | 2 +- ...WTAuthenticatorsCreateOrUpdateSamples.java | 99 + .../JWTAuthenticatorsDeleteSamples.java | 25 + .../JWTAuthenticatorsGetSamples.java | 24 + ...enticatorsListByManagedClusterSamples.java | 25 + .../LoadBalancersCreateOrUpdateSamples.java | 29 + .../generated/LoadBalancersDeleteSamples.java | 24 + .../generated/LoadBalancersGetSamples.java | 24 + ...dBalancersListByManagedClusterSamples.java | 25 + .../MachinesCreateOrUpdateSamples.java | 63 + .../generated/MachinesGetSamples.java | 2 +- .../generated/MachinesListSamples.java | 2 +- ...ceConfigurationsCreateOrUpdateSamples.java | 20 +- ...aintenanceConfigurationsDeleteSamples.java | 2 +- .../MaintenanceConfigurationsGetSamples.java | 17 +- ...igurationsListByManagedClusterSamples.java | 2 +- ...intenanceWindowsCreateOrUpdateSamples.java | 60 + .../MaintenanceWindowsDeleteSamples.java | 25 + ...nanceWindowsGetByResourceGroupSamples.java | 25 + ...anceWindowsListByResourceGroupSamples.java | 25 + .../MaintenanceWindowsListSamples.java | 23 + .../MaintenanceWindowsUpdateTagsSamples.java | 43 + ...ClusterSnapshotsCreateOrUpdateSamples.java | 46 + .../ManagedClusterSnapshotsDeleteSamples.java | 25 + ...terSnapshotsGetByResourceGroupSamples.java | 25 + ...erSnapshotsListByResourceGroupSamples.java | 25 + .../ManagedClusterSnapshotsListSamples.java | 23 + ...agedClusterSnapshotsUpdateTagsSamples.java | 43 + ...edClustersAbortLatestOperationSamples.java | 2 +- .../ManagedClustersCreateOrUpdateSamples.java | 795 +- .../ManagedClustersDeleteSamples.java | 4 +- ...anagedClustersGetAccessProfileSamples.java | 2 +- ...agedClustersGetByResourceGroupSamples.java | 2 +- ...anagedClustersGetCommandResultSamples.java | 4 +- ...dClustersGetGuardrailsVersionsSamples.java | 25 + ...ClustersGetMeshRevisionProfileSamples.java | 2 +- ...dClustersGetMeshUpgradeProfileSamples.java | 2 +- ...dClustersGetSafeguardsVersionsSamples.java | 25 + ...nagedClustersGetUpgradeProfileSamples.java | 2 +- ...gedClustersListByResourceGroupSamples.java | 2 +- ...ersListClusterAdminCredentialsSamples.java | 2 +- ...usterMonitoringUserCredentialsSamples.java | 2 +- ...tersListClusterUserCredentialsSamples.java | 2 +- ...ClustersListGuardrailsVersionsSamples.java | 25 + ...ClustersListKubernetesVersionsSamples.java | 2 +- ...ustersListMeshRevisionProfilesSamples.java | 2 +- ...lustersListMeshUpgradeProfilesSamples.java | 2 +- ...dClustersListNodeImageVersionsSamples.java | 25 + ...ndNetworkDependenciesEndpointsSamples.java | 2 +- ...ClustersListSafeguardsVersionsSamples.java | 25 + .../generated/ManagedClustersListSamples.java | 2 +- ...ClustersRebalanceLoadBalancersSamples.java | 30 + ...ManagedClustersResetAADProfileSamples.java | 2 +- ...rsResetServicePrincipalProfileSamples.java | 2 +- ...stersRotateClusterCertificatesSamples.java | 2 +- ...otateServiceAccountSigningKeysSamples.java | 2 +- .../ManagedClustersRunCommandSamples.java | 2 +- .../ManagedClustersStartSamples.java | 2 +- .../generated/ManagedClustersStopSamples.java | 2 +- .../ManagedClustersUpdateTagsSamples.java | 2 +- ...anagedNamespacesCreateOrUpdateSamples.java | 2 +- .../ManagedNamespacesDeleteSamples.java | 2 +- .../ManagedNamespacesGetSamples.java | 2 +- ...NamespacesListByManagedClusterSamples.java | 2 +- ...anagedNamespacesListCredentialSamples.java | 2 +- .../ManagedNamespacesUpdateSamples.java | 2 +- .../MeshMembershipsCreateOrUpdateSamples.java | 31 + .../MeshMembershipsDeleteSamples.java | 25 + .../generated/MeshMembershipsGetSamples.java | 24 + ...embershipsListByManagedClusterSamples.java | 25 + ...tionStatusResultGetByAgentPoolSamples.java | 26 + .../OperationStatusResultGetSamples.java | 26 + ...ionStatusResultListByAgentPoolSamples.java | 40 + .../OperationStatusResultListSamples.java | 25 + .../generated/OperationsListSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...PrivateEndpointConnectionsListSamples.java | 2 +- ...ivateEndpointConnectionsUpdateSamples.java | 2 +- .../PrivateLinkResourcesListSamples.java | 2 +- ...esolvePrivateLinkServiceIdPOSTSamples.java | 2 +- .../SnapshotsCreateOrUpdateSamples.java | 2 +- .../generated/SnapshotsDeleteSamples.java | 2 +- .../SnapshotsGetByResourceGroupSamples.java | 2 +- .../SnapshotsListByResourceGroupSamples.java | 2 +- .../generated/SnapshotsListSamples.java | 2 +- .../generated/SnapshotsUpdateTagsSamples.java | 2 +- ...cessRoleBindingsCreateOrUpdateSamples.java | 2 +- ...rustedAccessRoleBindingsDeleteSamples.java | 2 +- .../TrustedAccessRoleBindingsGetSamples.java | 2 +- .../TrustedAccessRoleBindingsListSamples.java | 2 +- .../TrustedAccessRolesListSamples.java | 2 +- .../generated/VmSkusListSamples.java | 36 + .../tsp-location.yaml | 2 +- sdk/core/azure-core-experimental/pom.xml | 2 +- .../azure-core-http-jdk-httpclient/pom.xml | 3 +- .../httpclient/JdkHttpClientBuilderTests.java | 10 +- sdk/core/azure-core-http-netty/CHANGELOG.md | 11 - sdk/core/azure-core-http-netty/README.md | 43 +- .../azure-core-http-netty/cgmanifest.json | 2 +- sdk/core/azure-core-http-netty/pom.xml | 75 +- .../core/http/netty/NettyAsyncHttpClient.java | 25 +- .../netty/NettyAsyncHttpClientBuilder.java | 21 +- .../AzureNettyHttpClientContext.java | 23 +- .../netty/implementation/AzureSdkHandler.java | 14 - .../ByteBufWriteSubscriber.java | 38 +- .../NettyAsyncHttpResponse.java | 6 +- .../netty/implementation/NettyUtility.java | 6 +- .../src/main/java/module-info.java | 3 - .../native-image.properties | 6 + ...cHttpClientBuilderJavaDocCodeSnippets.java | 7 +- .../NettyAsyncHttpClientBuilderTests.java | 57 +- .../NettyExpectContinueObservationTests.java | 188 - .../NettyNativeTransportModulesTests.java | 126 - .../ByteBufWriterSubscriberTests.java | 43 - .../implementation/NettyUtilityTests.java | 4 - sdk/core/azure-core-http-okhttp/pom.xml | 2 +- .../OkHttpAsyncHttpClientBuilderTests.java | 4 - sdk/core/azure-core-http-vertx/CHANGELOG.md | 3 - sdk/core/azure-core-http-vertx/README.md | 5 +- sdk/core/azure-core-http-vertx/pom.xml | 2 +- .../core/http/vertx/VertxHttpClient.java | 30 +- .../vertx/VertxHttpClientBuilderTests.java | 9 +- sdk/core/azure-core-management/pom.xml | 2 +- sdk/core/azure-core-perf/pom.xml | 2 +- .../azure-core-serializer-avro-apache/pom.xml | 2 +- .../azure-core-serializer-json-gson/pom.xml | 2 +- .../pom.xml | 2 +- sdk/core/azure-core-test/CHANGELOG.md | 4 - sdk/core/azure-core-test/README.md | 1 + sdk/core/azure-core-test/pom.xml | 4 +- .../azure-core-tracing-opentelemetry/pom.xml | 2 +- sdk/core/azure-core-version-tests/pom.xml | 4 +- sdk/core/azure-core/CHANGELOG.md | 6 - sdk/core/azure-core/pom.xml | 6 +- .../azure/core/http/ProxyOptionsTests.java | 70 +- sdk/cosmos/azure-cosmos-encryption/pom.xml | 5 +- .../pom.xml | 2 +- .../azure-cosmos-spark_3-4_2-12/pom.xml | 16 - sdk/cosmos/azure-cosmos-spark_3-5/pom.xml | 16 - sdk/cosmos/azure-cosmos-spark_3/pom.xml | 10 +- .../cosmos/spark/NettyCompatibilitySpec.scala | 37 - .../azure-cosmos-spark_4-0_2-13/pom.xml | 76 - .../azure-cosmos-spark_4-1_2-13/pom.xml | 104 - sdk/cosmos/azure-cosmos-tests/pom.xml | 2 +- .../cosmos/implementation/ConfigsTests.java | 39 - .../TcpServerMock/TcpServer.java | 7 +- .../rntbd/RntbdLoopTests.java | 73 - .../http/ReactorNettyHttpClientTest.java | 22 - .../cosmos/rx/proxy/HttpProxyServer.java | 7 +- sdk/cosmos/azure-cosmos/CHANGELOG.md | 3 +- sdk/cosmos/azure-cosmos/README.md | 18 - sdk/cosmos/azure-cosmos/pom.xml | 10 +- .../azure/cosmos/implementation/Configs.java | 5 +- .../rntbd/RntbdLoopEpoll.java | 5 +- .../rntbd/RntbdLoopNIO.java | 5 +- .../rntbd/RntbdServiceEndpoint.java | 2 +- .../guava25/hash/Striped64.java | 2 + .../http/ReactorNettyClient.java | 9 - .../src/main/java/module-info.java | 1 - .../azure-resourcemanager-cosmos/pom.xml | 4 +- sdk/cosmos/cspell.yml | 1 - .../azure-resourcemanager-datafactory/pom.xml | 2 +- ...entModelAdministrationAsyncClientTest.java | 3 +- ...DocumentModelAdministrationClientTest.java | 7 +- .../CHANGELOG.md | 20 + .../azure-analytics-defender-easm/README.md | 110 + .../azure-analytics-defender-easm/assets.json | 6 + .../checkstyle-suppressions.xml | 6 + .../azure-analytics-defender-easm/pom.xml | 74 + .../spotbugs-exclude.xml | 7 + .../defender/easm/EasmAsyncClient.java | 2294 + .../analytics/defender/easm/EasmClient.java | 2011 + .../defender/easm/EasmClientBuilder.java | 333 + .../defender/easm/EasmServiceVersion.java | 40 + .../easm/implementation/EasmClientImpl.java | 5132 +++ .../easm/implementation/package-info.java | 13 + .../defender/easm/models/AlexaDetails.java | 180 + .../defender/easm/models/AsAsset.java | 579 + .../defender/easm/models/AsAssetResource.java | 176 + .../defender/easm/models/AssetPageResult.java | 137 + .../defender/easm/models/AssetResource.java | 536 + .../easm/models/AssetSecurityPolicy.java | 220 + .../defender/easm/models/AssetState.java | 87 + .../easm/models/AssetSummaryResult.java | 264 + .../defender/easm/models/AssetUpdateData.java | 185 + .../easm/models/AssetUpdateState.java | 81 + .../easm/models/AssetUpdateTransfers.java | 93 + .../defender/easm/models/Attribute.java | 201 + .../defender/easm/models/AuditTrailItem.java | 154 + .../easm/models/AuditTrailItemKind.java | 93 + .../AzureDataExplorerDataConnection.java | 160 + .../AzureDataExplorerDataConnectionData.java | 165 + ...eDataExplorerDataConnectionProperties.java | 152 + .../defender/easm/models/Banner.java | 258 + .../defender/easm/models/ContactAsset.java | 202 + .../easm/models/ContactAssetResource.java | 176 + .../defender/easm/models/Cookie.java | 203 + .../analytics/defender/easm/models/Cve.java | 135 + .../defender/easm/models/Cvss3Summary.java | 382 + .../defender/easm/models/DataConnection.java | 449 + .../easm/models/DataConnectionContent.java | 57 + .../easm/models/DataConnectionData.java | 231 + .../easm/models/DataConnectionFrequency.java | 63 + .../easm/models/DataConnectionProperties.java | 57 + .../easm/models/DependentResource.java | 535 + .../defender/easm/models/DiscoGroup.java | 300 + .../defender/easm/models/DiscoGroupData.java | 317 + .../defender/easm/models/DiscoRunResult.java | 244 + .../defender/easm/models/DiscoRunState.java | 69 + .../defender/easm/models/DiscoSource.java | 121 + .../defender/easm/models/DiscoSourceKind.java | 81 + .../defender/easm/models/DiscoTemplate.java | 252 + .../defender/easm/models/DomainAsset.java | 704 + .../easm/models/DomainAssetResource.java | 176 + .../defender/easm/models/ErrorDetail.java | 170 + .../defender/easm/models/GuidPair.java | 140 + .../defender/easm/models/HostAsset.java | 722 + .../easm/models/HostAssetResource.java | 176 + .../defender/easm/models/HostCore.java | 812 + .../defender/easm/models/InnerError.java | 103 + .../defender/easm/models/InventoryAsset.java | 57 + .../defender/easm/models/IpAddressAsset.java | 562 + .../easm/models/IpAddressAssetResource.java | 176 + .../defender/easm/models/IpBlock.java | 182 + .../defender/easm/models/IpBlockAsset.java | 696 + .../easm/models/IpBlockAssetResource.java | 176 + .../defender/easm/models/Location.java | 268 + .../models/LogAnalyticsDataConnection.java | 160 + .../LogAnalyticsDataConnectionData.java | 165 + .../LogAnalyticsDataConnectionProperties.java | 121 + .../defender/easm/models/ObservedBoolean.java | 185 + .../defender/easm/models/ObservedHeader.java | 183 + .../defender/easm/models/ObservedInteger.java | 185 + .../easm/models/ObservedIntegers.java | 186 + .../easm/models/ObservedLocation.java | 185 + .../defender/easm/models/ObservedLong.java | 185 + .../easm/models/ObservedPortState.java | 183 + .../easm/models/ObservedPortStateValue.java | 63 + .../defender/easm/models/ObservedString.java | 185 + .../defender/easm/models/ObservedValue.java | 190 + .../defender/easm/models/PageAsset.java | 1298 + .../easm/models/PageAssetRedirectType.java | 69 + .../easm/models/PageAssetResource.java | 176 + .../defender/easm/models/PageCause.java | 192 + .../analytics/defender/easm/models/Port.java | 142 + .../models/ReportAssetSnapshotRequest.java | 183 + .../models/ReportAssetSnapshotResult.java | 179 + .../models/ReportAssetSummaryRequest.java | 257 + .../easm/models/ReportAssetSummaryResult.java | 82 + .../models/ReportBillableAssetBreakdown.java | 98 + .../ReportBillableAssetBreakdownKind.java | 63 + .../ReportBillableAssetSnapshotResult.java | 124 + .../ReportBillableAssetSummaryResult.java | 83 + .../defender/easm/models/Reputation.java | 220 + .../defender/easm/models/ResourceUrl.java | 183 + .../defender/easm/models/SavedFilter.java | 154 + .../defender/easm/models/SavedFilterData.java | 104 + .../defender/easm/models/ScanMetadata.java | 142 + .../defender/easm/models/Service.java | 282 + .../defender/easm/models/SoaRecord.java | 199 + .../defender/easm/models/Source.java | 161 + .../defender/easm/models/SslCertAsset.java | 729 + .../easm/models/SslCertAssetResource.java | 176 + .../models/SslCertAssetValidationType.java | 63 + .../defender/easm/models/SslServerConfig.java | 184 + .../models/SubResourceIntegrityCheck.java | 237 + .../analytics/defender/easm/models/Task.java | 230 + .../defender/easm/models/TaskPhase.java | 63 + .../defender/easm/models/TaskState.java | 87 + .../defender/easm/models/ValidateResult.java | 79 + .../defender/easm/models/WebComponent.java | 318 + .../defender/easm/models/package-info.java | 13 + .../analytics/defender/easm/package-info.java | 13 + .../src/main/java/module-info.java | 12 + ...tics-defender-easm_apiview_properties.json | 193 + ...zure-analytics-defender-easm_metadata.json | 1 + .../azure-analytics-defender-easm.properties | 2 + .../defender/easm/DiscoTemplateSample.java | 68 + .../defender/easm/DiscoveryRunsSample.java | 65 + .../easm/ManagingExternalIdsSample.java | 85 + .../defender/easm/ReadmeSamples.java | 21 + .../defender/easm/SavedFilterSample.java | 62 + .../defender/easm/AssetsAsyncTest.java | 80 + .../analytics/defender/easm/AssetsTest.java | 75 + .../easm/DataConnectionAsyncTest.java | 77 + .../defender/easm/DataConnectionsTest.java | 69 + .../easm/DiscoveryGroupsAsyncTest.java | 93 + .../defender/easm/DiscoveryGroupsTest.java | 85 + .../easm/DiscoveryTemplatesAsyncTest.java | 49 + .../defender/easm/DiscoveryTemplatesTest.java | 33 + .../defender/easm/EasmClientTestBase.java | 64 + .../defender/easm/ReportsAsyncTest.java | 38 + .../analytics/defender/easm/ReportsTest.java | 39 + .../defender/easm/SavedFiltersAsyncTest.java | 69 + .../defender/easm/SavedFiltersTest.java | 54 + .../defender/easm/TasksAsyncTest.java | 40 + .../analytics/defender/easm/TasksTest.java | 36 + .../tsp-location.yaml | 3 + sdk/easm/ci.yml | 39 + sdk/easm/cspell.yml | 14 + sdk/easm/pom.xml | 14 + .../CHANGELOG.md | 10 - .../azure-resourcemanager-edgeactions/pom.xml | 2 +- .../pom.xml | 2 +- .../azure-messaging-eventhubs/docs/pom.xml | 2 +- .../azure-resourcemanager-eventhubs/pom.xml | 2 +- .../FormTrainingAsyncClientTest.java | 12 +- .../FormTrainingClientTest.java | 14 +- .../DocumentModelAdminClientTest.java | 7 +- ...entModelAdministrationAsyncClientTest.java | 5 +- .../azure-resourcemanager-frontdoor/pom.xml | 2 +- .../azure-resourcemanager-hdinsight/pom.xml | 4 +- .../CHANGELOG.md | 15 + .../README.md | 220 + .../assets.json | 6 + .../checkstyle-suppressions.xml | 6 + .../pom.xml | 82 + .../spotbugs-exclude.xml | 7 + .../AzureHealthInsightsServiceVersion.java | 40 + .../CancerProfilingAsyncClient.java | 198 + .../CancerProfilingClient.java | 198 + .../CancerProfilingClientBuilder.java | 331 + .../CancerProfilingClientImpl.java | 1078 + .../OperationLocationPollingStrategy.java | 140 + .../implementation/PollingUtils.java | 151 + .../SyncOperationLocationPollingStrategy.java | 133 + .../implementation/package-info.java | 11 + .../models/ClinicalCodedElement.java | 171 + .../models/ClinicalDocumentType.java | 93 + .../models/ClinicalNoteEvidence.java | 148 + .../models/DocumentContent.java | 108 + .../models/DocumentContentSourceType.java | 59 + .../cancerprofiling/models/DocumentType.java | 69 + .../models/InferenceEvidence.java | 118 + .../cancerprofiling/models/JobStatus.java | 75 + .../models/OncoPhenotypeData.java | 117 + .../models/OncoPhenotypeInference.java | 191 + .../models/OncoPhenotypeInferenceType.java | 93 + .../OncoPhenotypeModelConfiguration.java | 201 + .../models/OncoPhenotypePatientResult.java | 105 + .../models/OncoPhenotypeResult.java | 194 + .../models/OncoPhenotypeResults.java | 105 + .../models/PatientDocument.java | 233 + .../cancerprofiling/models/PatientInfo.java | 158 + .../models/PatientInfoSex.java | 63 + .../cancerprofiling/models/PatientRecord.java | 153 + .../cancerprofiling/models/package-info.java | 11 + .../cancerprofiling/package-info.java | 11 + .../src/main/java/module-info.java | 12 + ...ts-cancerprofiling_apiview_properties.json | 31 + ...health-insights-cancerprofiling.properties | 2 + .../src/samples/README.md | 29 + .../SampleInferCancerProfile.java | 190 + .../CancerProfilingClientTest.java | 40 + .../CancerProfilingClientTestBase.java | 59 + .../CancerProfilingClientTestBase.java | 34 + .../CancerProfilingClientTest.request.json | 25 + .../CHANGELOG.md | 15 + .../README.md | 167 + .../assets.json | 6 + .../checkstyle-suppressions.xml | 6 + .../pom.xml | 82 + .../spotbugs-exclude.xml | 7 + .../AzureHealthInsightsServiceVersion.java | 40 + .../ClinicalMatchingAsyncClient.java | 334 + .../ClinicalMatchingClient.java | 334 + .../ClinicalMatchingClientBuilder.java | 331 + .../ClinicalMatchingClientImpl.java | 1888 + .../OperationLocationPollingStrategy.java | 140 + .../implementation/PollingUtils.java | 151 + .../SyncOperationLocationPollingStrategy.java | 133 + .../implementation/package-info.java | 11 + .../clinicalmatching/models/AcceptedAge.java | 104 + .../models/AcceptedAgeRange.java | 121 + .../clinicalmatching/models/AgeUnit.java | 63 + .../clinicalmatching/models/AreaGeometry.java | 108 + .../models/AreaProperties.java | 104 + .../models/ClinicalCodedElement.java | 171 + .../models/ClinicalDocumentType.java | 93 + .../models/ClinicalNoteEvidence.java | 148 + .../models/ClinicalTrialAcceptedSex.java | 64 + .../models/ClinicalTrialDemographics.java | 124 + .../models/ClinicalTrialDetails.java | 174 + .../models/ClinicalTrialMetadata.java | 290 + .../models/ClinicalTrialPhase.java | 81 + .../models/ClinicalTrialPurpose.java | 105 + .../ClinicalTrialRecruitmentStatus.java | 69 + .../models/ClinicalTrialRegistryFilter.java | 492 + .../models/ClinicalTrialResearchFacility.java | 172 + .../models/ClinicalTrialSource.java | 57 + .../models/ClinicalTrialStudyType.java | 69 + .../models/ClinicalTrials.java | 133 + .../models/ContactDetails.java | 152 + .../models/DocumentContent.java | 108 + .../models/DocumentContentSourceType.java | 59 + .../clinicalmatching/models/DocumentType.java | 69 + .../models/ExtendedClinicalCodedElement.java | 193 + .../models/GeoJsonGeometryType.java | 51 + .../models/GeoJsonPropertiesSubType.java | 51 + .../clinicalmatching/models/GeoJsonType.java | 51 + .../models/GeographicArea.java | 127 + .../models/GeographicLocation.java | 153 + .../clinicalmatching/models/JobStatus.java | 75 + .../models/PatientDocument.java | 233 + .../clinicalmatching/models/PatientInfo.java | 158 + .../models/PatientInfoSex.java | 63 + .../models/PatientRecord.java | 153 + .../models/TrialMatcherData.java | 117 + .../models/TrialMatcherInference.java | 232 + .../models/TrialMatcherInferenceEvidence.java | 141 + .../models/TrialMatcherInferenceType.java | 51 + .../TrialMatcherModelConfiguration.java | 159 + .../models/TrialMatcherPatientResult.java | 130 + .../models/TrialMatcherResult.java | 194 + .../models/TrialMatcherResults.java | 132 + .../clinicalmatching/models/package-info.java | 11 + .../clinicalmatching/package-info.java | 11 + .../src/main/java/module-info.java | 12 + ...s-clinicalmatching_apiview_properties.json | 55 + ...ealth-insights-clinicalmatching.properties | 2 + .../src/samples/README.md | 28 + .../SampleMatchTrialAsync.java | 145 + .../ClinicalMatchingClientTest.java | 40 + .../ClinicalMatchingClientTestBase.java | 58 + .../ClinicalMatchingClientTestBase.java | 34 + .../ClinicalMatchingClientTest.request.json | 50 + .../Sample_MatchTrial_PatientFhir.json | 37509 ++++++++++++++++ sdk/healthinsights/ci.yml | 20 + sdk/healthinsights/pom.xml | 2 + sdk/healthinsights/tests.yml | 6 + sdk/identity/azure-identity/pom.xml | 7 +- ...IdentityCredentialIdentityBindingTest.java | 11 +- .../azure-security-keyvault-jca/CHANGELOG.md | 15 +- .../azure-security-keyvault-jca/README.md | 11 +- .../azure-security-keyvault-jca/pom.xml | 2 +- .../jca/KeyVaultJcaPropertyNames.java | 9 +- .../keyvault/jca/KeyVaultKeyStore.java | 14 - .../jca/KeyVaultLoadStoreParameter.java | 37 +- .../certificates/KeyVaultCertificates.java | 2 +- .../jca/KeyVaultCertificatesTest.java | 2 +- .../jca/KeyVaultLoadStoreParameterTest.java | 135 +- .../KeyVaultCertificatesTest.java | 5 +- .../keyvault/secrets/SecretClientTest.java | 6 +- .../azure-security-test-keyvault-jca/pom.xml | 2 +- .../azure-resourcemanager-logz/CHANGELOG.md | 174 + sdk/logz/azure-resourcemanager-logz/README.md | 104 + sdk/logz/azure-resourcemanager-logz/SAMPLE.md | 796 + sdk/logz/azure-resourcemanager-logz/pom.xml | 75 + .../resourcemanager/logz/LogzManager.java | 370 + .../logz/fluent/MicrosoftLogz.java | 97 + .../logz/fluent/MonitorOperationsClient.java | 103 + .../logz/fluent/MonitorsClient.java | 295 + .../logz/fluent/OperationsClient.java | 40 + .../logz/fluent/SingleSignOnsClient.java | 141 + .../logz/fluent/SubAccountTagRulesClient.java | 146 + .../logz/fluent/SubAccountsClient.java | 355 + .../logz/fluent/TagRulesClient.java | 135 + .../models/LogzMonitorResourceInner.java | 224 + .../models/LogzSingleSignOnResourceInner.java | 167 + .../fluent/models/MonitoredResourceInner.java | 224 + .../models/MonitoringTagRulesInner.java | 166 + .../fluent/models/OperationResultInner.java | 181 + .../fluent/models/UserRoleResponseInner.java | 94 + .../models/VMExtensionPayloadInner.java | 121 + .../logz/fluent/models/VMResourcesInner.java | 121 + .../logz/fluent/models/package-info.java | 9 + .../logz/fluent/package-info.java | 9 + .../LogzMonitorResourceImpl.java | 216 + .../LogzSingleSignOnResourceImpl.java | 131 + .../implementation/MicrosoftLogzBuilder.java | 138 + .../implementation/MicrosoftLogzImpl.java | 384 + .../MonitorOperationsClientImpl.java | 657 + .../implementation/MonitorOperationsImpl.java | 84 + .../implementation/MonitoredResourceImpl.java | 53 + .../MonitoringTagRulesImpl.java | 134 + .../implementation/MonitorsClientImpl.java | 1665 + .../logz/implementation/MonitorsImpl.java | 176 + .../implementation/OperationResultImpl.java | 44 + .../implementation/OperationsClientImpl.java | 233 + .../logz/implementation/OperationsImpl.java | 44 + .../implementation/ResourceManagerUtils.java | 195 + .../SingleSignOnsClientImpl.java | 729 + .../implementation/SingleSignOnsImpl.java | 112 + .../SubAccountTagRulesClientImpl.java | 768 + .../SubAccountTagRulesImpl.java | 107 + .../implementation/SubAccountsClientImpl.java | 1981 + .../logz/implementation/SubAccountsImpl.java | 188 + .../implementation/TagRulesClientImpl.java | 708 + .../logz/implementation/TagRulesImpl.java | 158 + .../implementation/UserRoleResponseImpl.java | 32 + .../VMExtensionPayloadImpl.java | 36 + .../logz/implementation/VMResourcesImpl.java | 35 + .../logz/implementation/package-info.java | 9 + .../logz/models/FilteringTag.java | 150 + .../logz/models/IdentityProperties.java | 125 + .../logz/models/LiftrResourceCategories.java | 51 + .../resourcemanager/logz/models/LogRules.java | 195 + .../logz/models/LogzMonitorResource.java | 329 + .../LogzMonitorResourceListResponse.java | 129 + .../LogzMonitorResourceUpdateParameters.java | 129 + .../models/LogzOrganizationProperties.java | 165 + .../models/LogzSingleSignOnProperties.java | 168 + .../logz/models/LogzSingleSignOnResource.java | 189 + .../LogzSingleSignOnResourceListResponse.java | 130 + .../logz/models/ManagedIdentityTypes.java | 51 + .../models/MarketplaceSubscriptionStatus.java | 52 + .../logz/models/MonitorOperations.java | 92 + .../logz/models/MonitorProperties.java | 271 + .../logz/models/MonitorUpdateProperties.java | 95 + .../logz/models/MonitoredResource.java | 63 + .../models/MonitoredResourceListResponse.java | 129 + .../logz/models/MonitoringStatus.java | 51 + .../logz/models/MonitoringTagRules.java | 189 + .../MonitoringTagRulesListResponse.java | 129 + .../models/MonitoringTagRulesProperties.java | 130 + .../resourcemanager/logz/models/Monitors.java | 211 + .../logz/models/OperationDisplay.java | 177 + .../logz/models/OperationListResult.java | 128 + .../logz/models/OperationResult.java | 47 + .../logz/models/Operations.java | 35 + .../resourcemanager/logz/models/PlanData.java | 182 + .../logz/models/ProvisioningState.java | 86 + .../logz/models/SingleSignOnStates.java | 61 + .../logz/models/SingleSignOns.java | 98 + .../logz/models/SubAccountTagRules.java | 134 + .../SubAccountTagRulesDeleteHeaders.java | 58 + .../SubAccountTagRulesDeleteResponse.java | 28 + .../logz/models/SubAccounts.java | 265 + .../logz/models/TagAction.java | 51 + .../resourcemanager/logz/models/TagRules.java | 147 + .../logz/models/TagRulesDeleteHeaders.java | 58 + .../logz/models/TagRulesDeleteResponse.java | 28 + .../resourcemanager/logz/models/UserInfo.java | 177 + .../resourcemanager/logz/models/UserRole.java | 56 + .../logz/models/UserRoleListResponse.java | 128 + .../logz/models/UserRoleRequest.java | 93 + .../logz/models/UserRoleResponse.java | 26 + .../logz/models/VMExtensionPayload.java | 33 + .../logz/models/VMHostUpdateRequest.java | 128 + .../logz/models/VMHostUpdateStates.java | 51 + .../logz/models/VMResources.java | 33 + .../logz/models/VMResourcesListResponse.java | 127 + .../logz/models/package-info.java | 9 + .../resourcemanager/logz/package-info.java | 9 + .../src/main/java/module-info.java | 15 + .../proxy-config.json | 1 + .../reflect-config.json | 1 + .../MonitorOperationListVMHostsSamples.java | 23 + ...nitorOperationListVmHostUpdateSamples.java | 24 + .../MonitorOperationVMHostPayloadSamples.java | 24 + .../logz/generated/MonitorsCreateSamples.java | 27 + .../logz/generated/MonitorsDeleteSamples.java | 23 + .../MonitorsGetByResourceGroupSamples.java | 24 + .../MonitorsListByResourceGroupSamples.java | 23 + ...MonitorsListMonitoredResourcesSamples.java | 23 + .../logz/generated/MonitorsListSamples.java | 23 + .../MonitorsListUserRolesSamples.java | 23 + .../logz/generated/MonitorsUpdateSamples.java | 28 + .../logz/generated/OperationsListSamples.java | 23 + .../SingleSignOnCreateOrUpdateSamples.java | 23 + .../generated/SingleSignOnGetSamples.java | 24 + .../generated/SingleSignOnListSamples.java | 24 + .../generated/SubAccountCreateSamples.java | 24 + .../generated/SubAccountDeleteSamples.java | 23 + .../logz/generated/SubAccountGetSamples.java | 24 + ...bAccountListMonitoredResourcesSamples.java | 25 + .../logz/generated/SubAccountListSamples.java | 23 + .../SubAccountListVMHostsSamples.java | 24 + .../SubAccountListVmHostUpdateSamples.java | 24 + ...bAccountTagRulesCreateOrUpdateSamples.java | 26 + .../SubAccountTagRulesDeleteSamples.java | 25 + .../SubAccountTagRulesGetSamples.java | 25 + .../SubAccountTagRulesListSamples.java | 24 + .../generated/SubAccountUpdateSamples.java | 24 + .../SubAccountVMHostPayloadSamples.java | 24 + .../TagRulesCreateOrUpdateSamples.java | 23 + .../logz/generated/TagRulesDeleteSamples.java | 24 + .../logz/generated/TagRulesGetSamples.java | 23 + .../logz/generated/TagRulesListSamples.java | 23 + .../logz/generated/FilteringTagTests.java | 32 + .../generated/IdentityPropertiesTests.java | 28 + .../logz/generated/LogRulesTests.java | 45 + .../LogzMonitorResourceInnerTests.java | 98 + .../LogzMonitorResourceListResponseTests.java | 143 + ...zMonitorResourceUpdateParametersTests.java | 46 + .../LogzOrganizationPropertiesTests.java | 32 + .../LogzSingleSignOnPropertiesTests.java | 34 + .../LogzSingleSignOnResourceInnerTests.java | 35 + ...SingleSignOnResourceListResponseTests.java | 45 + ...MonitorOperationsListVMHostsMockTests.java | 39 + ...orOperationsListVmHostUpdateMockTests.java | 48 + .../generated/MonitorPropertiesTests.java | 68 + .../MonitorUpdatePropertiesTests.java | 26 + .../MonitoredResourceInnerTests.java | 38 + .../MonitoredResourceListResponseTests.java | 54 + .../MonitoringTagRulesInnerTests.java | 53 + .../MonitoringTagRulesListResponseTests.java | 51 + .../MonitoringTagRulesPropertiesTests.java | 49 + .../generated/MonitorsCreateMockTests.java | 97 + .../generated/MonitorsDeleteMockTests.java | 33 + ...tByResourceGroupWithResponseMockTests.java | 59 + .../MonitorsListByResourceGroupMockTests.java | 62 + .../logz/generated/MonitorsListMockTests.java | 61 + ...nitorsListMonitoredResourcesMockTests.java | 43 + .../MonitorsListUserRolesMockTests.java | 41 + .../logz/generated/OperationDisplayTests.java | 36 + .../generated/OperationListResultTests.java | 58 + .../generated/OperationResultInnerTests.java | 45 + .../generated/OperationsListMockTests.java | 44 + .../logz/generated/PlanDataTests.java | 36 + .../SingleSignOnsCreateOrUpdateMockTests.java | 47 + ...SingleSignOnsGetWithResponseMockTests.java | 42 + .../generated/SingleSignOnsListMockTests.java | 43 + ...esCreateOrUpdateWithResponseMockTests.java | 59 + ...ntTagRulesDeleteWithResponseMockTests.java | 34 + ...countTagRulesGetWithResponseMockTests.java | 45 + .../SubAccountTagRulesListMockTests.java | 47 + .../generated/SubAccountsCreateMockTests.java | 97 + .../generated/SubAccountsDeleteMockTests.java | 33 + .../SubAccountsGetWithResponseMockTests.java | 60 + .../generated/SubAccountsListMockTests.java | 62 + ...countsListMonitoredResourcesMockTests.java | 43 + .../SubAccountsListVMHostsMockTests.java | 39 + .../SubAccountsListVmHostUpdateMockTests.java | 51 + ...ubAccountsUpdateWithResponseMockTests.java | 79 + ...esCreateOrUpdateWithResponseMockTests.java | 55 + .../TagRulesDeleteWithResponseMockTests.java | 33 + .../TagRulesGetWithResponseMockTests.java | 45 + .../logz/generated/TagRulesListMockTests.java | 47 + .../logz/generated/UserInfoTests.java | 35 + .../generated/UserRoleListResponseTests.java | 34 + .../logz/generated/UserRoleRequestTests.java | 24 + .../generated/UserRoleResponseInnerTests.java | 26 + .../generated/VMHostUpdateRequestTests.java | 36 + .../logz/generated/VMResourcesInnerTests.java | 27 + .../VMResourcesListResponseTests.java | 35 + .../org.mockito.plugins.MockMaker | 1 + sdk/logz/ci.yml | 39 + sdk/logz/cspell.yml | 9 + sdk/logz/pom.xml | 15 + .../pom.xml | 2 +- sdk/maps/README.md | 3 + sdk/maps/azure-maps-traffic/CHANGELOG.md | 16 + sdk/maps/azure-maps-traffic/README.md | 204 + sdk/maps/azure-maps-traffic/assets.json | 6 + .../checkstyle-suppressions.xml | 7 + sdk/maps/azure-maps-traffic/ci.yml | 35 + sdk/maps/azure-maps-traffic/pom.xml | 77 + .../azure-maps-traffic/spotbugs-exclude.xml | 7 + .../maps/traffic/TrafficAsyncClient.java | 734 + .../com/azure/maps/traffic/TrafficClient.java | 426 + .../maps/traffic/TrafficClientBuilder.java | 389 + .../maps/traffic/TrafficServiceVersion.java | 44 + .../implementation/TrafficClientImpl.java | 159 + .../TrafficClientImplBuilder.java | 332 + .../traffic/implementation/TrafficsImpl.java | 1363 + .../implementation/helpers/Utility.java | 21 + .../implementation/helpers/package-info.java | 7 + .../models/ErrorAdditionalInfo.java | 97 + .../implementation/models/ErrorDetail.java | 155 + .../implementation/models/ErrorResponse.java | 95 + .../models/ErrorResponseException.java | 42 + .../implementation/models/LatLongPair.java | 123 + .../implementation/models/ResponseFormat.java | 57 + ...TrafficFlowSegmentDataFlowSegmentData.java | 281 + .../models/TrafficIncidentDetailTm.java | 101 + .../TrafficsGetTrafficFlowTileHeaders.java | 54 + ...TrafficsGetTrafficIncidentTileHeaders.java | 54 + .../implementation/models/package-info.java | 9 + .../traffic/implementation/package-info.java | 9 + .../maps/traffic/models/DelayMagnitude.java | 149 + .../maps/traffic/models/IconCategory.java | 211 + .../traffic/models/IncidentDetailStyle.java | 69 + .../traffic/models/IncidentGeometryType.java | 57 + .../azure/maps/traffic/models/MapsPoint.java | 95 + .../traffic/models/ProjectionStandard.java | 57 + .../azure/maps/traffic/models/SpeedUnit.java | 57 + .../azure/maps/traffic/models/TileFormat.java | 57 + .../azure/maps/traffic/models/TileIndex.java | 99 + .../models/TrafficFlowSegmentData.java | 162 + ...cFlowSegmentDataPropertiesCoordinates.java | 86 + .../models/TrafficFlowSegmentOptions.java | 144 + .../models/TrafficFlowSegmentStyle.java | 63 + .../models/TrafficFlowTileOptions.java | 123 + .../traffic/models/TrafficFlowTileStyle.java | 73 + .../traffic/models/TrafficIncidentDetail.java | 87 + .../models/TrafficIncidentDetailOptions.java | 204 + .../TrafficIncidentPointOfInterest.java | 365 + .../models/TrafficIncidentTileOptions.java | 123 + .../models/TrafficIncidentTileStyle.java | 69 + .../models/TrafficIncidentViewport.java | 77 + .../TrafficIncidentViewportOptions.java | 128 + .../TrafficIncidentViewportResponse.java | 136 + .../maps/traffic/models/TrafficState.java | 99 + .../maps/traffic/models/package-info.java | 9 + .../com/azure/maps/traffic/package-info.java | 6 + .../src/main/java/module-info.java | 13 + .../resources/azure-maps-traffic.properties | 2 + .../samples/GetTrafficFlowSegment.java | 89 + .../traffic/samples/GetTrafficFlowTile.java | 87 + .../samples/GetTrafficIncidentDetail.java | 97 + .../samples/GetTrafficIncidentTile.java | 87 + .../samples/GetTrafficIncidentViewport.java | 89 + .../maps/traffic/samples/TrafficSample.java | 87 + .../com/azure/maps/traffic/TestUtils.java | 56 + .../maps/traffic/TrafficAsyncClientTest.java | 273 + .../traffic/TrafficClientBuilderTest.java | 67 + .../azure/maps/traffic/TrafficClientTest.java | 287 + .../maps/traffic/TrafficClientTestBase.java | 141 + .../test/resources/trafficflowsegment.json | 424 + .../test/resources/trafficincidentdetail.json | 6 + .../resources/trafficincidentviewport.json | 11 + sdk/maps/azure-maps-traffic/swagger/README.md | 90 + sdk/maps/azure-maps-traffic/swagger/pom.xml | 17 + .../src/main/java/TrafficCustomization.java | 192 + sdk/maps/azure-maps-traffic/tests.yml | 7 + sdk/maps/ci.yml | 2 + sdk/maps/pom.xml | 1 + .../pom.xml | 2 +- .../DataFeedAsyncClientTest.java | 5 +- .../ai/metricsadvisor/DataFeedClientTest.java | 6 +- sdk/mixedreality/cspell.yml | 9 + .../CHANGELOG.md | 864 + .../README.md | 106 + .../SAMPLE.md | 2735 ++ .../pom.xml | 74 + .../mobilenetwork/MobileNetworkManager.java | 551 + .../fluent/AttachedDataNetworksClient.java | 263 + .../fluent/DataNetworksClient.java | 235 + .../fluent/DiagnosticsPackagesClient.java | 200 + .../fluent/ExtendedUeInformationsClient.java | 46 + .../fluent/MobileNetworkManagementClient.java | 174 + .../fluent/MobileNetworksClient.java | 267 + .../fluent/OperationsClient.java | 38 + .../fluent/PacketCapturesClient.java | 265 + .../PacketCoreControlPlaneVersionsClient.java | 115 + .../fluent/PacketCoreControlPlanesClient.java | 436 + .../fluent/PacketCoreDataPlanesClient.java | 244 + .../fluent/RoutingInfoesClient.java | 75 + .../mobilenetwork/fluent/ServicesClient.java | 247 + .../mobilenetwork/fluent/SimGroupsClient.java | 238 + .../fluent/SimPoliciesClient.java | 235 + .../mobilenetwork/fluent/SimsClient.java | 508 + .../mobilenetwork/fluent/SitesClient.java | 300 + .../mobilenetwork/fluent/SlicesClient.java | 233 + .../fluent/UeInformationsClient.java | 43 + .../models/AsyncOperationStatusInner.java | 334 + .../models/AttachedDataNetworkInner.java | 341 + .../AttachedDataNetworkPropertiesFormat.java | 295 + .../fluent/models/DataNetworkInner.java | 213 + .../models/DataNetworkPropertiesFormat.java | 111 + .../models/DiagnosticsPackageInner.java | 194 + .../DiagnosticsPackagePropertiesFormat.java | 118 + .../models/EncryptedSimPropertiesFormat.java | 270 + .../fluent/models/ExtendedUeInfoInner.java | 172 + .../fluent/models/MobileNetworkInner.java | 297 + .../models/MobileNetworkPropertiesFormat.java | 189 + .../fluent/models/OperationInner.java | 129 + .../fluent/models/PacketCaptureInner.java | 307 + .../models/PacketCapturePropertiesFormat.java | 275 + .../models/PacketCoreControlPlaneInner.java | 640 + ...acketCoreControlPlanePropertiesFormat.java | 668 + .../PacketCoreControlPlaneVersionInner.java | 199 + ...reControlPlaneVersionPropertiesFormat.java | 119 + .../models/PacketCoreDataPlaneInner.java | 255 + .../PacketCoreDataPlanePropertiesFormat.java | 171 + .../fluent/models/RoutingInfoModelInner.java | 233 + .../models/RoutingInfoPropertiesFormat.java | 168 + .../fluent/models/ServiceInner.java | 276 + .../models/ServicePropertiesFormat.java | 198 + .../fluent/models/SimGroupInner.java | 278 + .../models/SimGroupPropertiesFormat.java | 149 + .../mobilenetwork/fluent/models/SimInner.java | 384 + .../fluent/models/SimPolicyInner.java | 336 + .../models/SimPolicyPropertiesFormat.java | 290 + .../fluent/models/SimPropertiesFormat.java | 296 + .../fluent/models/SiteInner.java | 202 + .../fluent/models/SitePropertiesFormat.java | 104 + .../fluent/models/SliceInner.java | 245 + .../fluent/models/SlicePropertiesFormat.java | 152 + .../fluent/models/UeInfoInner.java | 172 + .../fluent/models/package-info.java | 10 + .../mobilenetwork/fluent/package-info.java | 10 + .../AsyncOperationStatusImpl.java | 66 + .../AttachedDataNetworkImpl.java | 257 + .../AttachedDataNetworksClientImpl.java | 1257 + .../AttachedDataNetworksImpl.java | 194 + .../implementation/DataNetworkImpl.java | 188 + .../DataNetworksClientImpl.java | 1110 + .../implementation/DataNetworksImpl.java | 159 + .../DiagnosticsPackageImpl.java | 59 + .../DiagnosticsPackagesClientImpl.java | 939 + .../DiagnosticsPackagesImpl.java | 105 + .../implementation/ExtendedUeInfoImpl.java | 50 + .../ExtendedUeInformationsClientImpl.java | 205 + .../ExtendedUeInformationsImpl.java | 57 + .../implementation/MobileNetworkImpl.java | 229 + .../MobileNetworkManagementClientBuilder.java | 138 + .../MobileNetworkManagementClientImpl.java | 560 + .../MobileNetworksClientImpl.java | 1416 + .../implementation/MobileNetworksImpl.java | 159 + .../implementation/OperationImpl.java | 41 + .../implementation/OperationsClientImpl.java | 227 + .../implementation/OperationsImpl.java | 45 + .../implementation/PacketCaptureImpl.java | 206 + .../PacketCapturesClientImpl.java | 1211 + .../implementation/PacketCapturesImpl.java | 187 + .../PacketCoreControlPlaneImpl.java | 395 + .../PacketCoreControlPlaneVersionImpl.java | 62 + ...ketCoreControlPlaneVersionsClientImpl.java | 642 + .../PacketCoreControlPlaneVersionsImpl.java | 100 + .../PacketCoreControlPlanesClientImpl.java | 1955 + .../PacketCoreControlPlanesImpl.java | 213 + .../PacketCoreDataPlaneImpl.java | 212 + .../PacketCoreDataPlanesClientImpl.java | 1149 + .../PacketCoreDataPlanesImpl.java | 165 + .../implementation/ResourceManagerUtils.java | 195 + .../implementation/RoutingInfoModelImpl.java | 76 + .../RoutingInfoesClientImpl.java | 416 + .../implementation/RoutingInfoesImpl.java | 71 + .../implementation/ServiceImpl.java | 212 + .../implementation/ServicesClientImpl.java | 1123 + .../implementation/ServicesImpl.java | 159 + .../implementation/SimGroupImpl.java | 209 + .../implementation/SimGroupsClientImpl.java | 1177 + .../implementation/SimGroupsImpl.java | 146 + .../mobilenetwork/implementation/SimImpl.java | 219 + .../implementation/SimPoliciesClientImpl.java | 1095 + .../implementation/SimPoliciesImpl.java | 159 + .../implementation/SimPolicyImpl.java | 242 + .../implementation/SimsClientImpl.java | 2128 + .../implementation/SimsImpl.java | 265 + .../implementation/SiteImpl.java | 197 + .../implementation/SitesClientImpl.java | 1364 + .../implementation/SitesImpl.java | 169 + .../implementation/SliceImpl.java | 196 + .../implementation/SlicesClientImpl.java | 1094 + .../implementation/SlicesImpl.java | 159 + .../implementation/UeInfoImpl.java | 49 + .../UeInformationsClientImpl.java | 280 + .../implementation/UeInformationsImpl.java | 46 + .../implementation/package-info.java | 10 + .../mobilenetwork/models/Ambr.java | 132 + .../mobilenetwork/models/AmfId.java | 150 + .../models/AsyncOperationId.java | 101 + .../models/AsyncOperationStatus.java | 84 + .../models/AttachedDataNetwork.java | 387 + .../models/AttachedDataNetworkListResult.java | 117 + .../models/AttachedDataNetworkResourceId.java | 103 + .../models/AttachedDataNetworks.java | 157 + .../models/AuthenticationType.java | 51 + .../AzureStackEdgeDeviceResourceId.java | 103 + .../AzureStackHciClusterResourceId.java | 103 + .../mobilenetwork/models/BillingSku.java | 67 + .../models/CertificateProvisioning.java | 98 + .../models/CertificateProvisioningState.java | 56 + .../models/CommonSimPropertiesFormat.java | 379 + .../models/ConnectedClusterResourceId.java | 101 + .../mobilenetwork/models/CoreNetworkType.java | 61 + .../models/CustomLocationResourceId.java | 101 + .../mobilenetwork/models/DataNetwork.java | 260 + .../models/DataNetworkConfiguration.java | 439 + .../models/DataNetworkListResult.java | 115 + .../models/DataNetworkResourceId.java | 101 + .../mobilenetwork/models/DataNetworks.java | 144 + .../models/DesiredInstallationState.java | 51 + .../models/DiagnosticsPackage.java | 69 + .../models/DiagnosticsPackageListResult.java | 116 + .../models/DiagnosticsPackageStatus.java | 61 + .../models/DiagnosticsPackages.java | 124 + .../DiagnosticsUploadConfiguration.java | 103 + .../mobilenetwork/models/DnnIpPair.java | 124 + .../models/EncryptedSimUploadList.java | 268 + .../models/EventHubConfiguration.java | 129 + .../mobilenetwork/models/ExtendedUeInfo.java | 55 + .../models/ExtendedUeInfoProperties.java | 142 + .../models/ExtendedUeInformations.java | 41 + .../mobilenetwork/models/GNbId.java | 121 + .../mobilenetwork/models/GlobalRanNodeId.java | 302 + .../mobilenetwork/models/Guti4G.java | 169 + .../mobilenetwork/models/Guti5G.java | 169 + .../HomeNetworkPrivateKeysProvisioning.java | 84 + ...meNetworkPrivateKeysProvisioningState.java | 57 + .../models/HomeNetworkPublicKey.java | 128 + .../models/HttpsServerCertificate.java | 123 + .../models/IdentityAndTagsObject.java | 126 + .../mobilenetwork/models/Installation.java | 164 + .../models/InstallationReason.java | 92 + .../models/InstallationState.java | 86 + .../models/InterfaceProperties.java | 269 + .../mobilenetwork/models/Ipv4Route.java | 126 + .../models/Ipv4RouteNextHop.java | 121 + .../mobilenetwork/models/KeyVaultKey.java | 95 + .../LocalDiagnosticsAccessConfiguration.java | 141 + .../models/ManagedServiceIdentity.java | 149 + .../models/ManagedServiceIdentityType.java | 51 + .../mobilenetwork/models/MmeId.java | 122 + .../mobilenetwork/models/MobileNetwork.java | 358 + .../models/MobileNetworkListResult.java | 115 + .../models/MobileNetworkResourceId.java | 101 + .../mobilenetwork/models/MobileNetworks.java | 183 + .../models/NaptConfiguration.java | 231 + .../mobilenetwork/models/NaptEnabled.java | 51 + .../models/NasEncryptionType.java | 56 + .../models/NasRerouteConfiguration.java | 96 + .../mobilenetwork/models/ObsoleteVersion.java | 51 + .../mobilenetwork/models/Operation.java | 40 + .../models/OperationDisplay.java | 179 + .../mobilenetwork/models/OperationList.java | 103 + .../mobilenetwork/models/Operations.java | 33 + .../mobilenetwork/models/PacketCapture.java | 353 + .../models/PacketCaptureListResult.java | 115 + .../models/PacketCaptureStatus.java | 61 + .../mobilenetwork/models/PacketCaptures.java | 174 + .../models/PacketCoreControlPlane.java | 704 + ...ControlPlaneCollectDiagnosticsPackage.java | 105 + .../PacketCoreControlPlaneListResult.java | 117 + .../PacketCoreControlPlaneResourceId.java | 103 + .../models/PacketCoreControlPlaneVersion.java | 63 + ...cketCoreControlPlaneVersionListResult.java | 118 + .../PacketCoreControlPlaneVersions.java | 104 + .../models/PacketCoreControlPlanes.java | 247 + .../models/PacketCoreDataPlane.java | 296 + .../models/PacketCoreDataPlaneListResult.java | 117 + .../models/PacketCoreDataPlanes.java | 148 + .../models/PccRuleConfiguration.java | 241 + .../models/PccRuleQosPolicy.java | 178 + .../mobilenetwork/models/PdnType.java | 46 + .../mobilenetwork/models/PduSessionType.java | 51 + .../mobilenetwork/models/PinholeTimeouts.java | 149 + .../mobilenetwork/models/Platform.java | 272 + .../models/PlatformConfiguration.java | 254 + .../mobilenetwork/models/PlatformType.java | 51 + .../mobilenetwork/models/PlmnId.java | 133 + .../mobilenetwork/models/PortRange.java | 124 + .../models/PortReuseHoldTimes.java | 128 + .../models/PreemptionCapability.java | 51 + .../models/PreemptionVulnerability.java | 51 + .../models/ProvisioningState.java | 76 + .../models/PublicLandMobileNetwork.java | 134 + ...andMobileNetworkHomeNetworkPublicKeys.java | 140 + .../mobilenetwork/models/QosPolicy.java | 247 + .../mobilenetwork/models/RatType.java | 51 + .../models/RecommendedVersion.java | 51 + .../models/ReinstallRequired.java | 51 + .../models/RoutingInfoListResult.java | 116 + .../models/RoutingInfoModel.java | 70 + .../mobilenetwork/models/RoutingInfoes.java | 67 + .../models/RrcEstablishmentCause.java | 71 + .../mobilenetwork/models/SdfDirection.java | 56 + .../mobilenetwork/models/Service.java | 314 + .../models/ServiceDataFlowTemplate.java | 268 + .../models/ServiceListResult.java | 115 + .../models/ServiceResourceId.java | 101 + .../mobilenetwork/models/Services.java | 148 + .../models/SignalingConfiguration.java | 134 + .../mobilenetwork/models/Sim.java | 441 + .../mobilenetwork/models/SimClone.java | 126 + .../mobilenetwork/models/SimDeleteList.java | 103 + .../mobilenetwork/models/SimGroup.java | 316 + .../models/SimGroupListResult.java | 115 + .../models/SimGroupResourceId.java | 101 + .../mobilenetwork/models/SimGroups.java | 157 + .../mobilenetwork/models/SimListResult.java | 115 + .../mobilenetwork/models/SimMove.java | 126 + .../models/SimNameAndEncryptedProperties.java | 326 + .../models/SimNameAndProperties.java | 346 + .../mobilenetwork/models/SimPolicies.java | 144 + .../mobilenetwork/models/SimPolicy.java | 367 + .../models/SimPolicyListResult.java | 115 + .../models/SimPolicyResourceId.java | 101 + .../mobilenetwork/models/SimState.java | 56 + .../models/SimStaticIpProperties.java | 170 + .../models/SimStaticIpPropertiesStaticIp.java | 97 + .../mobilenetwork/models/SimUploadList.java | 106 + .../mobilenetwork/models/Sims.java | 282 + .../mobilenetwork/models/Site.java | 271 + .../models/SiteDeletePacketCore.java | 96 + .../mobilenetwork/models/SiteListResult.java | 115 + .../models/SiteProvisioningState.java | 71 + .../mobilenetwork/models/SiteResourceId.java | 101 + .../mobilenetwork/models/Sites.java | 177 + .../mobilenetwork/models/Slice.java | 283 + .../models/SliceConfiguration.java | 187 + .../mobilenetwork/models/SliceListResult.java | 115 + .../mobilenetwork/models/SliceResourceId.java | 101 + .../mobilenetwork/models/Slices.java | 144 + .../mobilenetwork/models/Snssai.java | 122 + .../mobilenetwork/models/TagsObject.java | 95 + .../models/TrafficControlPermission.java | 51 + .../models/UeConnectionInfo4G.java | 378 + .../models/UeConnectionInfo5G.java | 411 + .../mobilenetwork/models/UeInfo.java | 55 + .../mobilenetwork/models/UeInfo4G.java | 138 + .../models/UeInfo4GProperties.java | 255 + .../mobilenetwork/models/UeInfo5G.java | 138 + .../models/UeInfo5GProperties.java | 227 + .../mobilenetwork/models/UeInfoList.java | 115 + .../models/UeInfoPropertiesFormat.java | 199 + .../mobilenetwork/models/UeInformations.java | 38 + .../mobilenetwork/models/UeIpAddress.java | 93 + .../mobilenetwork/models/UeLocationInfo.java | 167 + .../mobilenetwork/models/UeQosFlow.java | 184 + .../mobilenetwork/models/UeSessionInfo4G.java | 195 + .../mobilenetwork/models/UeSessionInfo5G.java | 299 + .../mobilenetwork/models/UeState.java | 66 + .../mobilenetwork/models/UeUsageSetting.java | 51 + .../models/UserAssignedIdentity.java | 100 + .../models/UserConsentConfiguration.java | 96 + .../models/UserPlaneDataRoutesItem.java | 130 + .../mobilenetwork/models/VersionState.java | 71 + .../mobilenetwork/models/package-info.java | 10 + .../mobilenetwork/package-info.java | 10 + .../src/main/java/module-info.java | 15 + .../proxy-config.json | 1 + .../reflect-config.json | 1 + ...chedDataNetworksCreateOrUpdateSamples.java | 45 + .../AttachedDataNetworksDeleteSamples.java | 27 + .../AttachedDataNetworksGetSamples.java | 26 + ...worksListByPacketCoreDataPlaneSamples.java | 26 + ...AttachedDataNetworksUpdateTagsSamples.java | 45 + .../DataNetworksCreateOrUpdateSamples.java | 29 + .../generated/DataNetworksDeleteSamples.java | 24 + .../generated/DataNetworksGetSamples.java | 25 + ...ataNetworksListByMobileNetworkSamples.java | 25 + .../DataNetworksUpdateTagsSamples.java | 43 + ...gnosticsPackagesCreateOrUpdateSamples.java | 25 + .../DiagnosticsPackagesDeleteSamples.java | 24 + .../DiagnosticsPackagesGetSamples.java | 25 + ...esListByPacketCoreControlPlaneSamples.java | 26 + .../ExtendedUeInformationGetSamples.java | 40 + .../MobileNetworksCreateOrUpdateSamples.java | 46 + .../MobileNetworksDeleteSamples.java | 24 + ...bileNetworksGetByResourceGroupSamples.java | 25 + ...ileNetworksListByResourceGroupSamples.java | 25 + .../generated/MobileNetworksListSamples.java | 25 + .../MobileNetworksListSimGroupsSamples.java | 25 + .../MobileNetworksUpdateTagsSamples.java | 43 + .../generated/OperationsListSamples.java | 24 + .../PacketCapturesCreateOrUpdateSamples.java | 36 + .../PacketCapturesDeleteSamples.java | 24 + .../generated/PacketCapturesGetSamples.java | 24 + ...esListByPacketCoreControlPlaneSamples.java | 26 + .../generated/PacketCapturesStopSamples.java | 24 + ...PlaneVersionsGetBySubscriptionSamples.java | 26 + ...ketCoreControlPlaneVersionsGetSamples.java | 25 + ...laneVersionsListBySubscriptionSamples.java | 25 + ...etCoreControlPlaneVersionsListSamples.java | 25 + ...lanesCollectDiagnosticsPackageSamples.java | 31 + ...oreControlPlanesCreateOrUpdateSamples.java | 75 + .../PacketCoreControlPlanesDeleteSamples.java | 25 + ...ontrolPlanesGetByResourceGroupSamples.java | 25 + ...ntrolPlanesListByResourceGroupSamples.java | 25 + .../PacketCoreControlPlanesListSamples.java | 25 + ...cketCoreControlPlanesReinstallSamples.java | 25 + ...acketCoreControlPlanesRollbackSamples.java | 25 + ...ketCoreControlPlanesUpdateTagsSamples.java | 53 + ...etCoreDataPlanesCreateOrUpdateSamples.java | 31 + .../PacketCoreDataPlanesDeleteSamples.java | 25 + .../PacketCoreDataPlanesGetSamples.java | 25 + ...esListByPacketCoreControlPlaneSamples.java | 26 + ...PacketCoreDataPlanesUpdateTagsSamples.java | 44 + .../generated/RoutingInfoGetSamples.java | 25 + .../generated/RoutingInfoListSamples.java | 25 + .../ServicesCreateOrUpdateSamples.java | 59 + .../generated/ServicesDeleteSamples.java | 24 + .../generated/ServicesGetSamples.java | 23 + .../ServicesListByMobileNetworkSamples.java | 26 + .../generated/ServicesUpdateTagsSamples.java | 43 + .../SimGroupsCreateOrUpdateSamples.java | 55 + .../generated/SimGroupsDeleteSamples.java | 24 + .../SimGroupsGetByResourceGroupSamples.java | 25 + .../SimGroupsListByResourceGroupSamples.java | 25 + .../generated/SimGroupsListSamples.java | 25 + .../generated/SimGroupsUpdateTagsSamples.java | 52 + .../SimPoliciesCreateOrUpdateSamples.java | 60 + .../generated/SimPoliciesDeleteSamples.java | 24 + .../generated/SimPoliciesGetSamples.java | 24 + ...SimPoliciesListByMobileNetworkSamples.java | 26 + .../SimPoliciesUpdateTagsSamples.java | 43 + .../generated/SimsBulkDeleteSamples.java | 30 + .../SimsBulkUploadEncryptedSamples.java | 66 + .../generated/SimsBulkUploadSamples.java | 63 + .../generated/SimsCloneSamples.java | 33 + .../generated/SimsCreateOrUpdateSamples.java | 46 + .../generated/SimsDeleteSamples.java | 23 + .../generated/SimsGetSamples.java | 24 + .../generated/SimsListByGroupSamples.java | 24 + .../generated/SimsMoveSamples.java | 33 + .../generated/SitesCreateOrUpdateSamples.java | 27 + .../SitesDeletePacketCoreSamples.java | 32 + .../generated/SitesDeleteSamples.java | 23 + .../generated/SitesGetSamples.java | 23 + .../SitesListByMobileNetworkSamples.java | 25 + .../generated/SitesUpdateTagsSamples.java | 44 + .../SlicesCreateOrUpdateSamples.java | 31 + .../generated/SlicesDeleteSamples.java | 23 + .../generated/SlicesGetSamples.java | 23 + .../SlicesListByMobileNetworkSamples.java | 25 + .../generated/SlicesUpdateTagsSamples.java | 43 + .../generated/UeInformationListSamples.java | 23 + .../mobilenetwork/generated/AmbrTests.java | 26 + .../mobilenetwork/generated/AmfIdTests.java | 29 + .../generated/AsyncOperationIdTests.java | 24 + .../AttachedDataNetworkInnerTests.java | 103 + .../AttachedDataNetworkListResultTests.java | 161 + ...achedDataNetworkPropertiesFormatTests.java | 84 + .../AttachedDataNetworkResourceIdTests.java | 25 + ...edDataNetworksCreateOrUpdateMockTests.java | 98 + .../AttachedDataNetworksDeleteMockTests.java | 33 + ...dDataNetworksGetWithResponseMockTests.java | 60 + ...rksListByPacketCoreDataPlaneMockTests.java | 62 + .../AzureStackEdgeDeviceResourceIdTests.java | 25 + .../AzureStackHciClusterResourceIdTests.java | 25 + .../CertificateProvisioningTests.java | 22 + .../ConnectedClusterResourceIdTests.java | 25 + .../CustomLocationResourceIdTests.java | 25 + .../DataNetworkConfigurationTests.java | 64 + .../generated/DataNetworkInnerTests.java | 46 + .../generated/DataNetworkListResultTests.java | 49 + .../DataNetworkPropertiesFormatTests.java | 26 + .../generated/DataNetworkResourceIdTests.java | 25 + .../DataNetworksCreateOrUpdateMockTests.java | 60 + .../DataNetworksDeleteMockTests.java | 33 + .../DataNetworksGetWithResponseMockTests.java | 41 + ...aNetworksListByMobileNetworkMockTests.java | 41 + .../DiagnosticsPackageInnerTests.java | 23 + .../DiagnosticsPackageListResultTests.java | 26 + ...agnosticsPackagePropertiesFormatTests.java | 23 + ...osticsPackagesCreateOrUpdateMockTests.java | 36 + .../DiagnosticsPackagesDeleteMockTests.java | 33 + ...sticsPackagesGetWithResponseMockTests.java | 37 + ...ListByPacketCoreControlPlaneMockTests.java | 37 + .../DiagnosticsUploadConfigurationTests.java | 26 + .../generated/DnnIpPairTests.java | 29 + .../generated/EventHubConfigurationTests.java | 27 + .../generated/ExtendedUeInfoInnerTests.java | 29 + .../ExtendedUeInfoPropertiesTests.java | 28 + ...eInformationsGetWithResponseMockTests.java | 39 + .../mobilenetwork/generated/GNbIdTests.java | 27 + .../generated/GlobalRanNodeIdTests.java | 54 + .../mobilenetwork/generated/Guti5GTests.java | 40 + ...meNetworkPrivateKeysProvisioningTests.java | 22 + .../generated/HomeNetworkPublicKeyTests.java | 27 + .../HttpsServerCertificateTests.java | 27 + .../generated/IdentityAndTagsObjectTests.java | 49 + .../generated/InstallationTests.java | 27 + .../generated/InterfacePropertiesTests.java | 45 + .../generated/Ipv4RouteNextHopTests.java | 27 + .../generated/Ipv4RouteTests.java | 33 + ...alDiagnosticsAccessConfigurationTests.java | 32 + .../ManagedServiceIdentityTests.java | 43 + .../MobileNetworkResourceIdTests.java | 25 + .../MobileNetworksDeleteMockTests.java | 33 + .../generated/NaptConfigurationTests.java | 50 + .../NasRerouteConfigurationTests.java | 25 + .../generated/OperationDisplayTests.java | 35 + .../generated/OperationInnerTests.java | 26 + .../generated/OperationListTests.java | 23 + .../generated/OperationsListMockTests.java | 38 + .../generated/PacketCaptureInnerTests.java | 37 + .../PacketCaptureListResultTests.java | 38 + .../PacketCapturePropertiesFormatTests.java | 37 + ...PacketCapturesCreateOrUpdateMockTests.java | 48 + .../PacketCapturesDeleteMockTests.java | 33 + ...acketCapturesGetWithResponseMockTests.java | 42 + ...ListByPacketCoreControlPlaneMockTests.java | 42 + ...olPlaneCollectDiagnosticsPackageTests.java | 27 + ...PacketCoreControlPlaneResourceIdTests.java | 25 + ...cketCoreControlPlaneVersionInnerTests.java | 73 + ...oreControlPlaneVersionListResultTests.java | 89 + ...trolPlaneVersionPropertiesFormatTests.java | 59 + ...etBySubscriptionWithResponseMockTests.java | 49 + ...PlaneVersionsGetWithResponseMockTests.java | 49 + ...neVersionsListBySubscriptionMockTests.java | 55 + ...CoreControlPlaneVersionsListMockTests.java | 51 + ...acketCoreControlPlanesDeleteMockTests.java | 33 + .../PacketCoreDataPlaneInnerTests.java | 69 + .../PacketCoreDataPlaneListResultTests.java | 76 + ...ketCoreDataPlanePropertiesFormatTests.java | 50 + ...CoreDataPlanesCreateOrUpdateMockTests.java | 77 + .../PacketCoreDataPlanesDeleteMockTests.java | 33 + ...oreDataPlanesGetWithResponseMockTests.java | 48 + ...ListByPacketCoreControlPlaneMockTests.java | 50 + .../generated/PccRuleConfigurationTests.java | 88 + .../generated/PccRuleQosPolicyTests.java | 48 + .../generated/PinholeTimeoutsTests.java | 29 + .../generated/PlatformConfigurationTests.java | 43 + .../generated/PlatformTests.java | 49 + .../mobilenetwork/generated/PlmnIdTests.java | 26 + .../generated/PortRangeTests.java | 27 + .../generated/PortReuseHoldTimesTests.java | 27 + ...bileNetworkHomeNetworkPublicKeysTests.java | 41 + .../generated/QosPolicyTests.java | 43 + .../generated/RoutingInfoListResultTests.java | 85 + .../generated/RoutingInfoModelInnerTests.java | 86 + .../RoutingInfoPropertiesFormatTests.java | 78 + ...RoutingInfoesGetWithResponseMockTests.java | 41 + .../generated/RoutingInfoesListMockTests.java | 42 + .../ServiceDataFlowTemplateTests.java | 40 + .../generated/ServiceInnerTests.java | 144 + .../generated/ServiceListResultTests.java | 297 + .../ServicePropertiesFormatTests.java | 231 + .../generated/ServiceResourceIdTests.java | 24 + .../ServicesCreateOrUpdateMockTests.java | 116 + .../generated/ServicesDeleteMockTests.java | 33 + .../ServicesGetWithResponseMockTests.java | 72 + .../ServicesListByMobileNetworkMockTests.java | 78 + .../SignalingConfigurationTests.java | 34 + .../generated/SimCloneTests.java | 31 + .../generated/SimDeleteListTests.java | 26 + .../generated/SimGroupResourceIdTests.java | 24 + .../generated/SimGroupsDeleteMockTests.java | 33 + .../mobilenetwork/generated/SimMoveTests.java | 31 + .../SimPoliciesCreateOrUpdateMockTests.java | 121 + .../generated/SimPoliciesDeleteMockTests.java | 33 + .../SimPoliciesGetWithResponseMockTests.java | 53 + ...mPoliciesListByMobileNetworkMockTests.java | 75 + .../generated/SimPolicyInnerTests.java | 171 + .../generated/SimPolicyListResultTests.java | 216 + .../SimPolicyPropertiesFormatTests.java | 218 + .../generated/SimPolicyResourceIdTests.java | 24 + .../SimStaticIpPropertiesStaticIpTests.java | 25 + .../generated/SimStaticIpPropertiesTests.java | 36 + .../generated/SimsDeleteMockTests.java | 33 + .../generated/SiteDeletePacketCoreTests.java | 27 + .../generated/SiteInnerTests.java | 43 + .../generated/SiteListResultTests.java | 52 + .../generated/SitePropertiesFormatTests.java | 23 + .../generated/SiteResourceIdTests.java | 24 + .../SitesCreateOrUpdateMockTests.java | 57 + .../generated/SitesDeleteMockTests.java | 33 + .../SitesDeletePacketCoreMockTests.java | 38 + .../SitesGetWithResponseMockTests.java | 40 + .../SitesListByMobileNetworkMockTests.java | 40 + .../generated/SliceConfigurationTests.java | 92 + .../generated/SliceInnerTests.java | 52 + .../generated/SliceListResultTests.java | 64 + .../generated/SlicePropertiesFormatTests.java | 33 + .../generated/SliceResourceIdTests.java | 24 + .../SlicesCreateOrUpdateMockTests.java | 63 + .../generated/SlicesDeleteMockTests.java | 33 + .../SlicesGetWithResponseMockTests.java | 43 + .../SlicesListByMobileNetworkMockTests.java | 43 + .../mobilenetwork/generated/SnssaiTests.java | 26 + .../generated/TagsObjectTests.java | 38 + .../generated/UeConnectionInfo4GTests.java | 96 + .../generated/UeConnectionInfo5GTests.java | 104 + .../generated/UeInfo5GPropertiesTests.java | 230 + .../generated/UeInfo5GTests.java | 209 + .../generated/UeInfoInnerTests.java | 45 + .../generated/UeInfoListTests.java | 58 + .../UeInfoPropertiesFormatTests.java | 47 + .../UeInformationsListMockTests.java | 47 + .../generated/UeIpAddressTests.java | 24 + .../generated/UeLocationInfoTests.java | 35 + .../generated/UeQosFlowTests.java | 40 + .../generated/UeSessionInfo4GTests.java | 37 + .../generated/UeSessionInfo5GTests.java | 76 + .../generated/UserAssignedIdentityTests.java | 23 + .../UserConsentConfigurationTests.java | 25 + .../UserPlaneDataRoutesItemTests.java | 50 + .../org.mockito.plugins.MockMaker | 1 + sdk/mobilenetwork/ci.yml | 39 + sdk/mobilenetwork/cspell.yml | 9 + sdk/mobilenetwork/pom.xml | 15 + .../azure-iot-modelsrepository/CHANGELOG.md | 32 + .../azure-iot-modelsrepository/README.md | 76 + .../azure-iot-modelsrepository/assets.json | 6 + .../azure-iot-modelsrepository/build.ps1 | 14 + .../checkstyle-suppressions.xml | 7 + .../azure-iot-modelsrepository/pom.xml | 125 + .../spotbugs-exclude.xml | 7 + .../iot/modelsrepository/DtmiConventions.java | 123 + .../ModelDependencyResolution.java | 19 + .../ModelsRepositoryAsyncClient.java | 130 + .../ModelsRepositoryClient.java | 96 + .../ModelsRepositoryClientBuilder.java | 421 + .../ModelsRepositoryServiceVersion.java | 39 + .../implementation/FileModelFetcher.java | 118 + .../implementation/HttpModelFetcher.java | 104 + .../IntermediateFetchModelResult.java | 30 + .../implementation/ModelFetcher.java | 17 + .../implementation/ModelsQuery.java | 171 + .../ModelsRepositoryAPIImpl.java | 86 + .../ModelsRepositoryAPIImplBuilder.java | 231 + .../ModelsRepositoryConstants.java | 22 + .../implementation/ModelsRepositoryImpl.java | 79 + .../implementation/RepositoryHandler.java | 153 + .../implementation/StatusStrings.java | 20 + .../models/FetchMetadataResult.java | 66 + .../models/FetchModelResult.java | 75 + .../implementation/models/ModelMetadata.java | 43 + .../models/ModelsRepositoryMetadata.java | 103 + .../models/RepositoryFeatures.java | 68 + .../implementation/models/package-info.java | 7 + .../implementation/package-info.java | 7 + .../iot/modelsrepository/package-info.java | 7 + .../src/main/java/module-info.java | 12 + .../azure-iot-modelsrepository.properties | 2 + .../src/samples/README.md | 203 + .../iot/core/DtmiConventionsSamples.java | 56 + .../samples/java/com/azure/iot/core/Main.java | 31 + .../iot/core/ModelResolutionSamples.java | 128 + .../devicemanagement/deviceinformation-1.json | 64 + .../devicemanagement/deviceinformation-2.json | 16 + .../dtmi/com/example/base-1.json | 56 + .../dtmi/com/example/base-2.json | 57 + .../dtmi/com/example/building-1.json | 19 + .../dtmi/com/example/camera-3.json | 13 + .../dtmi/com/example/coldstorage-1.json | 13 + .../dtmi/com/example/conferenceroom-1.json | 13 + .../example/danglingexpanded-1.expanded.json | 215 + .../dtmi/com/example/freezer-1.json | 12 + .../incompleteexpanded-1.expanded.json | 151 + .../dtmi/com/example/invalidmodel-1.json | 13 + .../dtmi/com/example/invalidmodel-2.json | 23 + .../dtmi/com/example/phone-2.json | 23 + .../dtmi/com/example/room-1.json | 12 + .../temperaturecontroller-1.expanded.json | 215 + .../com/example/temperaturecontroller-1.json | 60 + .../dtmi/com/example/thermostat-1.json | 19 + .../dtmi/company/demodevice-1.json | 31 + .../dtmi/company/demodevice-2.json | 31 + .../dtmi/strict/badfilepath-1.json | 12 + .../dtmi/strict/emptyarray-1.json | 1 + .../dtmi/strict/namespaceconflict-1.json | 37 + .../TestModelRepo/dtmi/strict/nondtdl-1.json | 1 + .../dtmi/strict/unsupportedrootarray-1.json | 91 + .../modelsrepository/DtmiConventionTests.java | 88 + .../iot/modelsrepository/ModelQueryTests.java | 138 + .../ModelRepositoryIntegrationTests.java | 90 + .../ModelsRepositoryTestBase.java | 48 + .../iot/modelsrepository/TestHelper.java | 105 + .../modelsrepository/TestsAssetsHelpers.java | 16 + .../devicemanagement/deviceinformation-1.json | 64 + .../devicemanagement/deviceinformation-2.json | 16 + .../dtmi/com/example/base-1.json | 56 + .../dtmi/com/example/base-2.json | 57 + .../dtmi/com/example/building-1.json | 19 + .../dtmi/com/example/camera-3.json | 13 + .../dtmi/com/example/coldstorage-1.json | 13 + .../dtmi/com/example/conferenceroom-1.json | 13 + .../example/danglingexpanded-1.expanded.json | 215 + .../dtmi/com/example/freezer-1.json | 12 + .../incompleteexpanded-1.expanded.json | 151 + .../dtmi/com/example/invalidmodel-1.json | 13 + .../dtmi/com/example/invalidmodel-2.json | 23 + .../dtmi/com/example/phone-2.json | 23 + .../dtmi/com/example/room-1.json | 12 + .../temperaturecontroller-1.expanded.json | 215 + .../com/example/temperaturecontroller-1.json | 60 + .../dtmi/com/example/thermostat-1.json | 19 + .../dtmi/company/demodevice-1.json | 31 + .../dtmi/company/demodevice-2.json | 31 + .../dtmi/strict/badfilepath-1.json | 12 + .../dtmi/strict/emptyarray-1.json | 1 + .../dtmi/strict/namespaceconflict-1.json | 37 + .../TestModelRepo/dtmi/strict/nondtdl-1.json | 1 + .../dtmi/strict/unsupportedrootarray-1.json | 91 + .../devicemanagement/deviceinformation-1.json | 64 + .../devicemanagement/deviceinformation-2.json | 16 + .../dtmi/com/example/base-1.json | 56 + .../dtmi/com/example/base-2.json | 57 + .../dtmi/com/example/building-1.json | 19 + .../dtmi/com/example/camera-3.json | 13 + .../dtmi/com/example/coldstorage-1.json | 13 + .../dtmi/com/example/conferenceroom-1.json | 13 + .../example/danglingexpanded-1.expanded.json | 215 + .../dtmi/com/example/freezer-1.json | 12 + .../incompleteexpanded-1.expanded.json | 151 + .../dtmi/com/example/invalidmodel-1.json | 13 + .../dtmi/com/example/invalidmodel-2.json | 23 + .../dtmi/com/example/phone-2.json | 23 + .../dtmi/com/example/room-1.json | 12 + .../temperaturecontroller-1.expanded.json | 215 + .../com/example/temperaturecontroller-1.json | 60 + .../dtmi/com/example/thermostat-1.json | 19 + .../dtmi/company/demodevice-1.json | 31 + .../dtmi/company/demodevice-2.json | 31 + .../dtmi/strict/badfilepath-1.json | 12 + .../dtmi/strict/emptyarray-1.json | 1 + .../dtmi/strict/namespaceconflict-1.json | 37 + .../dtmi/strict/nondtdl-1.json | 1 + .../dtmi/strict/unsupportedrootarray-1.json | 91 + .../metadataModelsrepo/metadata.json | 10 + .../update-recorded-sessions.ps1 | 11 + sdk/modelsrepository/ci.yml | 38 + sdk/modelsrepository/cspell.yml | 12 + sdk/modelsrepository/pom.xml | 14 + sdk/modelsrepository/tests.yml | 11 + .../pom.xml | 1 - .../CHANGELOG.md | 10 - .../pom.xml | 2 +- .../azure-resourcemanager-monitor/pom.xml | 4 +- .../CHANGELOG.md | 10 - .../azure-resourcemanager-network/pom.xml | 2 +- .../CHANGELOG.md | 27 + .../README.md | 109 + .../SAMPLE.md | 854 + .../pom.xml | 97 + .../NetworkAnalyticsManager.java | 322 + .../fluent/DataProductsCatalogsClient.java | 89 + .../fluent/DataProductsClient.java | 425 + .../fluent/DataTypesClient.java | 364 + .../fluent/NetworkAnalyticsMgmtClient.java | 76 + .../fluent/OperationsClient.java | 40 + .../fluent/models/AccountSasTokenInner.java | 61 + .../fluent/models/ContainerSasTokenInner.java | 61 + .../fluent/models/DataProductInner.java | 124 + .../models/DataProductsCatalogInner.java | 75 + .../fluent/models/DataTypeInner.java | 75 + .../models/ListRoleAssignmentsInner.java | 90 + .../fluent/models/OperationInner.java | 129 + .../models/RoleAssignmentDetailInner.java | 243 + .../fluent/models/package-info.java | 9 + .../networkanalytics/fluent/package-info.java | 9 + .../implementation/AccountSasTokenImpl.java | 32 + .../implementation/ContainerSasTokenImpl.java | 32 + .../implementation/DataProductImpl.java | 250 + .../DataProductsCatalogImpl.java | 50 + .../DataProductsCatalogsClientImpl.java | 570 + .../DataProductsCatalogsImpl.java | 78 + .../DataProductsClientImpl.java | 2033 + .../implementation/DataProductsImpl.java | 240 + .../implementation/DataTypeImpl.java | 162 + .../implementation/DataTypesClientImpl.java | 1615 + .../implementation/DataTypesImpl.java | 194 + .../ListRoleAssignmentsImpl.java | 48 + .../NetworkAnalyticsMgmtClientBuilder.java | 138 + .../NetworkAnalyticsMgmtClientImpl.java | 335 + .../implementation/OperationImpl.java | 51 + .../implementation/OperationsClientImpl.java | 239 + .../implementation/OperationsImpl.java | 45 + .../implementation/ResourceManagerUtils.java | 197 + .../RoleAssignmentDetailImpl.java | 64 + .../implementation/package-info.java | 9 + .../networkanalytics/models/AccountSas.java | 122 + .../models/AccountSasToken.java | 26 + .../networkanalytics/models/ActionType.java | 48 + .../ConsumptionEndpointsProperties.java | 118 + .../networkanalytics/models/ContainerSaS.java | 122 + .../models/ContainerSasToken.java | 26 + .../networkanalytics/models/ControlState.java | 53 + .../networkanalytics/models/DataProduct.java | 414 + .../models/DataProductInformation.java | 124 + .../models/DataProductListResult.java | 91 + .../models/DataProductNetworkAcls.java | 158 + .../models/DataProductProperties.java | 514 + .../models/DataProductUpdate.java | 115 + .../models/DataProductUpdateProperties.java | 159 + .../models/DataProductUserRole.java | 53 + .../models/DataProductVersion.java | 61 + .../networkanalytics/models/DataProducts.java | 298 + .../models/DataProductsCatalog.java | 55 + .../models/DataProductsCatalogListResult.java | 91 + .../models/DataProductsCatalogProperties.java | 79 + .../models/DataProductsCatalogs.java | 80 + .../networkanalytics/models/DataType.java | 234 + .../models/DataTypeListResult.java | 91 + .../models/DataTypeProperties.java | 177 + .../models/DataTypeState.java | 53 + .../models/DataTypeUpdate.java | 57 + .../models/DataTypeUpdateProperties.java | 132 + .../networkanalytics/models/DataTypes.java | 203 + .../models/DefaultAction.java | 53 + .../models/EncryptionKeyDetails.java | 121 + .../networkanalytics/models/IpRules.java | 87 + .../networkanalytics/models/KeyVaultInfo.java | 61 + .../models/ListRoleAssignments.java | 34 + .../ManagedResourceGroupConfiguration.java | 91 + .../models/ManagedServiceIdentity.java | 144 + .../models/ManagedServiceIdentityType.java | 64 + .../networkanalytics/models/Operation.java | 58 + .../models/OperationDisplay.java | 95 + .../models/OperationListResult.java | 64 + .../networkanalytics/models/Operations.java | 35 + .../networkanalytics/models/Origin.java | 59 + .../models/ProvisioningState.java | 78 + .../models/PublisherInformation.java | 94 + .../RoleAssignmentCommonProperties.java | 212 + .../models/RoleAssignmentDetail.java | 69 + .../models/UserAssignedIdentity.java | 59 + .../models/VirtualNetworkRule.java | 113 + .../networkanalytics/models/package-info.java | 9 + .../networkanalytics/package-info.java | 9 + .../src/main/java/module-info.java | 15 + .../proxy-config.json | 1 + .../reflect-config.json | 216 + .../DataProductsAddUserRoleSamples.java | 54 + ...uctsCatalogsGetByResourceGroupSamples.java | 42 + ...ctsCatalogsListByResourceGroupSamples.java | 40 + .../DataProductsCatalogsListSamples.java | 40 + .../generated/DataProductsCreateSamples.java | 96 + .../generated/DataProductsDeleteSamples.java | 40 + ...GenerateStorageAccountSasTokenSamples.java | 50 + ...DataProductsGetByResourceGroupSamples.java | 42 + ...ataProductsListByResourceGroupSamples.java | 40 + ...taProductsListRolesAssignmentsSamples.java | 50 + .../generated/DataProductsListSamples.java | 40 + .../DataProductsRemoveUserRoleSamples.java | 54 + .../DataProductsRotateKeySamples.java | 44 + .../generated/DataProductsUpdateSamples.java | 77 + .../generated/DataTypesCreateSamples.java | 47 + .../generated/DataTypesDeleteDataSamples.java | 50 + .../generated/DataTypesDeleteSamples.java | 42 + ...nerateStorageContainerSasTokenSamples.java | 52 + .../generated/DataTypesGetSamples.java | 42 + .../DataTypesListByDataProductSamples.java | 42 + .../generated/DataTypesUpdateSamples.java | 51 + .../generated/OperationsListSamples.java | 40 + .../generated/AccountSasTests.java | 33 + .../ConsumptionEndpointsPropertiesTests.java | 23 + .../generated/ContainerSaSTests.java | 33 + .../DataProductInformationTests.java | 36 + .../DataProductNetworkAclsTests.java | 49 + .../DataProductUpdatePropertiesTests.java | 41 + .../generated/DataProductUpdateTests.java | 69 + .../generated/DataProductVersionTests.java | 24 + ...ductsAddUserRoleWithResponseMockTests.java | 74 + .../DataProductsCatalogInnerTests.java | 46 + .../DataProductsCatalogListResultTests.java | 71 + .../DataProductsCatalogPropertiesTests.java | 54 + ...tByResourceGroupWithResponseMockTests.java | 62 + ...sCatalogsListByResourceGroupMockTests.java | 63 + .../DataProductsCatalogsListMockTests.java | 63 + ...RolesAssignmentsWithResponseMockTests.java | 67 + ...tsRemoveUserRoleWithResponseMockTests.java | 64 + .../generated/DataTypeInnerTests.java | 38 + .../generated/DataTypeListResultTests.java | 55 + .../generated/DataTypePropertiesTests.java | 36 + .../DataTypeUpdatePropertiesTests.java | 36 + .../generated/DataTypeUpdateTests.java | 38 + .../generated/DataTypesCreateMockTests.java | 68 + .../DataTypesGetWithResponseMockTests.java | 62 + .../DataTypesListByDataProductMockTests.java | 62 + .../generated/IpRulesTests.java | 27 + .../ListRoleAssignmentsInnerTests.java | 65 + ...anagedResourceGroupConfigurationTests.java | 29 + .../ManagedServiceIdentityTests.java | 45 + .../generated/OperationDisplayTests.java | 23 + .../generated/OperationInnerTests.java | 24 + .../generated/OperationListResultTests.java | 23 + .../generated/OperationsListMockTests.java | 55 + .../generated/PublisherInformationTests.java | 51 + .../RoleAssignmentCommonPropertiesTests.java | 43 + .../RoleAssignmentDetailInnerTests.java | 46 + .../generated/UserAssignedIdentityTests.java | 23 + .../generated/VirtualNetworkRuleTests.java | 31 + .../org.mockito.plugins.MockMaker | 1 + sdk/networkanalytics/ci.yml | 46 + sdk/networkanalytics/cspell.yml | 9 + sdk/networkanalytics/pom.xml | 15 + sdk/networkanalytics/test-resources.bicep | 22 + .../azure-ai-openai-realtime/CHANGELOG.md | 4 +- sdk/openai/azure-ai-openai-realtime/pom.xml | 14 +- .../websocket/WebSocketSessionNettyImpl.java | 8 +- .../src/main/java/module-info.java | 1 - .../azure-resourcemanager-privatedns/pom.xml | 2 +- .../CHANGELOG.md | 21 + .../README.md | 117 + .../assets.json | 6 + .../checkstyle-suppressions.xml | 6 + .../pom.xml | 69 + .../spotbugs-exclude.xml | 7 + .../administration/AccountsAsyncClient.java | 290 + .../administration/AccountsClient.java | 288 + .../administration/AccountsClientBuilder.java | 334 + .../CollectionsAsyncClient.java | 279 + .../administration/CollectionsClient.java | 277 + .../CollectionsClientBuilder.java | 334 + .../MetadataPolicyAsyncClient.java | 314 + .../administration/MetadataPolicyClient.java | 313 + .../MetadataPolicyClientBuilder.java | 334 + .../MetadataRolesAsyncClient.java | 91 + .../administration/MetadataRolesClient.java | 91 + .../MetadataRolesClientBuilder.java | 334 + .../PurviewAccountServiceVersion.java | 40 + .../PurviewMetadataServiceVersion.java | 40 + .../ResourceSetRulesAsyncClient.java | 522 + .../ResourceSetRulesClient.java | 520 + .../ResourceSetRulesClientBuilder.java | 334 + .../implementation/AccountsImpl.java | 667 + .../implementation/CollectionsImpl.java | 1095 + .../implementation/MetadataPoliciesImpl.java | 1056 + .../implementation/MetadataRolesImpl.java | 484 + .../PurviewAccountClientImpl.java | 161 + .../PurviewMetadataClientImpl.java | 143 + .../implementation/ResourceSetRulesImpl.java | 1686 + .../implementation/package-info.java | 9 + .../purview/administration/package-info.java | 9 + .../src/main/java/module-info.java | 9 + ...nalytics-purview-administration.properties | 2 + .../purview/administration/GetAccount.java | 18 + .../purview/administration/ReadmeSamples.java | 37 + .../generated/AccountsGetAccessKeys.java | 25 + .../AccountsGetAccountProperties.java | 25 + .../generated/AccountsRegenerateKeys.java | 26 + .../AccountsUpdateAccountProperties.java | 27 + .../CollectionsCreateOrUpdateCollection.java | 28 + .../CollectionsDeleteCollection.java | 24 + .../generated/CollectionsGetCollection.java | 25 + .../CollectionsGetCollectionPath.java | 26 + .../CollectionsListChildCollectionNames.java | 26 + .../generated/CollectionsListCollections.java | 25 + .../generated/MetadataPolicyGet.java | 26 + .../generated/MetadataPolicyListAll.java | 25 + .../generated/MetadataPolicyUpdate.java | 27 + .../generated/MetadataRolesList.java | 25 + ...SetRulesCreateOrUpdateResourceSetRule.java | 28 + ...ResourceSetRulesDeleteResourceSetRule.java | 24 + .../ResourceSetRulesGetResourceSetRule.java | 25 + .../ResourceSetRulesListResourceSetRules.java | 25 + .../administration/AccountsClientTests.java | 22 + .../CollectionsClientTests.java | 27 + .../MetadataPolicyClientTests.java | 46 + .../PurviewAccountClientTestBase.java | 155 + .../generated/AccountsGetAccessKeysTests.java | 36 + .../AccountsGetAccountPropertiesTests.java | 36 + .../AccountsRegenerateKeysTests.java | 37 + .../AccountsUpdateAccountPropertiesTests.java | 38 + ...lectionsCreateOrUpdateCollectionTests.java | 37 + .../CollectionsDeleteCollectionTests.java | 30 + .../CollectionsGetCollectionPathTests.java | 35 + .../CollectionsGetCollectionTests.java | 34 + ...lectionsListChildCollectionNamesTests.java | 51 + .../CollectionsListCollectionsTests.java | 49 + .../generated/MetadataPolicyGetTests.java | 29 + .../generated/MetadataPolicyListAllTests.java | 33 + .../generated/MetadataPolicyUpdateTests.java | 30 + .../generated/MetadataRolesListTests.java | 33 + .../PurviewAccountClientTestBase.java | 77 + .../PurviewMetadataClientTestBase.java | 59 + ...lesCreateOrUpdateResourceSetRuleTests.java | 37 + ...rceSetRulesDeleteResourceSetRuleTests.java | 30 + ...sourceSetRulesGetResourceSetRuleTests.java | 34 + ...urceSetRulesListResourceSetRulesTests.java | 49 + .../swagger/README.md | 47 + .../CHANGELOG.md | 29 + .../README.md | 115 + .../assets.json | 6 + .../checkstyle-suppressions.xml | 6 + .../azure-analytics-purview-scanning/pom.xml | 69 + .../spotbugs-exclude.xml | 7 + .../ClassificationRulesAsyncClient.java | 248 + .../scanning/ClassificationRulesClient.java | 247 + .../scanning/DataSourcesAsyncClient.java | 435 + .../purview/scanning/DataSourcesClient.java | 434 + .../purview/scanning/FiltersAsyncClient.java | 139 + .../purview/scanning/FiltersClient.java | 137 + .../KeyVaultConnectionsAsyncClient.java | 179 + .../scanning/KeyVaultConnectionsClient.java | 178 + .../PurviewScanningClientBuilder.java | 513 + .../PurviewScanningServiceVersion.java | 40 + .../scanning/ScanResultAsyncClient.java | 210 + .../purview/scanning/ScanResultClient.java | 209 + .../scanning/ScanRulesetsAsyncClient.java | 186 + .../purview/scanning/ScanRulesetsClient.java | 184 + .../purview/scanning/ScansAsyncClient.java | 400 + .../purview/scanning/ScansClient.java | 398 + .../SystemScanRulesetsAsyncClient.java | 233 + .../scanning/SystemScanRulesetsClient.java | 230 + .../purview/scanning/TriggersAsyncClient.java | 301 + .../purview/scanning/TriggersClient.java | 300 + .../ClassificationRulesImpl.java | 982 + .../implementation/DataSourcesImpl.java | 1354 + .../scanning/implementation/FiltersImpl.java | 334 + .../KeyVaultConnectionsImpl.java | 631 + .../PurviewScanningClientImpl.java | 251 + .../implementation/ScanResultsImpl.java | 825 + .../implementation/ScanRulesetsImpl.java | 654 + .../scanning/implementation/ScansImpl.java | 1251 + .../SystemScanRulesetsImpl.java | 940 + .../scanning/implementation/TriggersImpl.java | 672 + .../scanning/implementation/package-info.java | 9 + .../purview/scanning/package-info.java | 9 + .../src/main/java/module-info.java | 9 + ...zure-analytics-purview-scanning.properties | 2 + .../src/samples/README.md | 51 + .../scanning/ListAllSystemScanRulesets.java | 42 + .../purview/scanning/ReadmeSamples.java | 23 + .../ClassificationRulesCreateOrUpdate.java | 27 + .../generated/ClassificationRulesDelete.java | 26 + .../generated/ClassificationRulesGet.java | 26 + .../generated/ClassificationRulesListAll.java | 25 + ...sListVersionsByClassificationRuleName.java | 26 + ...ficationRulesTagClassificationVersion.java | 26 + .../generated/DataSourcesCreateOrUpdate.java | 26 + .../scanning/generated/DataSourcesDelete.java | 25 + .../scanning/generated/DataSourcesGet.java | 25 + .../generated/DataSourcesListAll.java | 25 + .../generated/FiltersCreateOrUpdate.java | 27 + .../scanning/generated/FiltersGet.java | 25 + .../generated/KeyVaultConnectionsCreate.java | 27 + .../generated/KeyVaultConnectionsDelete.java | 25 + .../generated/KeyVaultConnectionsGet.java | 25 + .../generated/KeyVaultConnectionsListAll.java | 25 + .../generated/ScanResultCancelScan.java | 26 + .../generated/ScanResultListScanHistory.java | 25 + .../scanning/generated/ScanResultRunScan.java | 26 + .../generated/ScanRulesetsCreateOrUpdate.java | 27 + .../generated/ScanRulesetsDelete.java | 25 + .../scanning/generated/ScanRulesetsGet.java | 25 + .../generated/ScanRulesetsListAll.java | 25 + .../generated/ScansCreateOrUpdate.java | 28 + .../scanning/generated/ScansDelete.java | 25 + .../purview/scanning/generated/ScansGet.java | 25 + .../generated/ScansListByDataSource.java | 25 + .../generated/SystemScanRulesetsGet.java | 25 + .../SystemScanRulesetsGetByVersion.java | 25 + .../SystemScanRulesetsGetLatest.java | 25 + .../generated/SystemScanRulesetsListAll.java | 25 + ...mScanRulesetsListVersionsByDataSource.java | 25 + .../generated/TriggersCreateTrigger.java | 28 + .../generated/TriggersDeleteTrigger.java | 26 + .../generated/TriggersGetTrigger.java | 26 + .../PurviewScanningClientTestBase.java | 40 + .../SystemScanRulesetsClientTests.java | 30 + .../swagger/README.md | 22 + .../CHANGELOG.md | 31 + .../azure-analytics-purview-sharing/README.md | 417 + .../assets.json | 6 + .../checkstyle-suppressions.xml | 7 + .../azure-analytics-purview-sharing/pom.xml | 74 + .../spotbugs-exclude.xml | 7 + .../sharing/PurviewShareServiceVersion.java | 40 + .../sharing/ReceivedSharesAsyncClient.java | 345 + .../purview/sharing/ReceivedSharesClient.java | 339 + .../sharing/ReceivedSharesClientBuilder.java | 334 + .../sharing/SentSharesAsyncClient.java | 394 + .../purview/sharing/SentSharesClient.java | 390 + .../sharing/SentSharesClientBuilder.java | 334 + .../sharing/ShareResourcesAsyncClient.java | 80 + .../purview/sharing/ShareResourcesClient.java | 80 + .../sharing/ShareResourcesClientBuilder.java | 334 + .../PurviewShareClientImpl.java | 161 + .../implementation/ReceivedSharesImpl.java | 1474 + .../implementation/SentSharesImpl.java | 1695 + .../implementation/ShareResourcesImpl.java | 401 + .../sharing/implementation/package-info.java | 9 + .../purview/sharing/package-info.java | 9 + .../src/main/java/module-info.java | 9 + ...azure-analytics-purview-sharing.properties | 2 + .../azure/analytics/purview/sharing/README.md | 33 + .../purview/sharing/ReadmeSamples.java | 325 + ...SharesActivateTenantEmailRegistration.java | 28 + .../ReceivedSharesCreateOrReplace.java | 28 + ...dSharesCreateOrReplaceAdlsGen2Account.java | 28 + ...eivedSharesCreateOrReplaceBlobAccount.java | 28 + .../generated/ReceivedSharesDelete.java | 26 + .../sharing/generated/ReceivedSharesGet.java | 26 + .../ReceivedSharesGetAdlsGen2Account.java | 26 + .../ReceivedSharesGetBlobAccount.java | 26 + .../generated/ReceivedSharesListAttached.java | 27 + .../generated/ReceivedSharesListDetached.java | 25 + ...SharesRegisterTenantEmailRegistration.java | 26 + .../generated/SentSharesCreateInvitation.java | 29 + .../generated/SentSharesCreateOrReplace.java | 28 + ...tSharesCreateOrReplaceAdlsGen2Account.java | 28 + .../SentSharesCreateOrReplaceBlobAccount.java | 28 + .../SentSharesCreateServiceInvitation.java | 29 + .../SentSharesCreateUserInvitation.java | 29 + .../sharing/generated/SentSharesDelete.java | 26 + .../generated/SentSharesDeleteInvitation.java | 26 + .../sharing/generated/SentSharesGet.java | 26 + .../SentSharesGetAdlsGen2Account.java | 26 + .../generated/SentSharesGetBlobAccount.java | 26 + .../generated/SentSharesGetInvitation.java | 26 + .../SentSharesGetServiceInvitation.java | 26 + .../SentSharesGetUserInvitation.java | 26 + .../sharing/generated/SentSharesList.java | 27 + .../generated/SentSharesListInvitations.java | 26 + .../SentSharesNotifyUserInvitation.java | 26 + .../sharing/generated/ShareResourcesList.java | 25 + .../sharing/models/AdlsGen2AccountSink.java | 116 + .../models/AdlsGen2AccountSinkProperties.java | 160 + .../sharing/models/AdlsGen2Artifact.java | 116 + .../models/AdlsGen2ArtifactProperties.java | 105 + .../purview/sharing/models/Artifact.java | 131 + .../sharing/models/BlobAccountSink.java | 116 + .../models/BlobAccountSinkProperties.java | 159 + .../sharing/models/BlobStorageArtifact.java | 116 + .../models/BlobStorageArtifactProperties.java | 106 + .../sharing/models/InPlaceReceivedShare.java | 138 + .../InPlaceReceivedShareProperties.java | 376 + .../sharing/models/InPlaceSentShare.java | 138 + .../models/InPlaceSentShareProperties.java | 248 + .../sharing/models/InvitationKind.java | 52 + .../sharing/models/OperationResponse.java | 212 + .../sharing/models/OperationStatus.java | 68 + .../purview/sharing/models/ProxyResource.java | 112 + .../sharing/models/PurviewShareError.java | 87 + .../models/PurviewShareErrorException.java | 42 + .../sharing/models/PurviewShareErrorInfo.java | 174 + .../purview/sharing/models/ReceivedShare.java | 133 + .../sharing/models/ReceivedShareList.java | 117 + ...esCreateOrReplaceReceivedShareHeaders.java | 50 + ...eivedSharesDeleteReceivedShareHeaders.java | 50 + .../sharing/models/ReferenceNameType.java | 47 + .../purview/sharing/models/SentShare.java | 133 + .../sharing/models/SentShareInvitation.java | 136 + .../models/SentShareInvitationList.java | 118 + .../purview/sharing/models/SentShareList.java | 117 + ...SharesCreateOrReplaceSentShareHeaders.java | 50 + .../SentSharesDeleteSentShareHeaders.java | 50 + ...haresDeleteSentShareInvitationHeaders.java | 50 + .../sharing/models/ServiceInvitation.java | 139 + .../models/ServiceInvitationProperties.java | 266 + .../purview/sharing/models/ShareKind.java | 47 + .../purview/sharing/models/ShareResource.java | 209 + .../sharing/models/ShareResourceList.java | 117 + .../purview/sharing/models/ShareStatus.java | 52 + .../purview/sharing/models/Sink.java | 131 + .../purview/sharing/models/State.java | 72 + .../sharing/models/StorageAccountPath.java | 143 + .../purview/sharing/models/StoreKind.java | 52 + .../sharing/models/StoreReference.java | 114 + .../models/TenantEmailRegistration.java | 119 + .../TenantEmailRegistrationProperties.java | 174 + .../models/TenantEmailRegistrationStatus.java | 58 + .../sharing/models/UserInvitation.java | 139 + .../models/UserInvitationProperties.java | 262 + .../purview/sharing/models/package-info.java | 5 + .../purview/sharing/PurviewShareTestBase.java | 189 + .../sharing/ReceivedShareClientTest.java | 133 + .../purview/sharing/SentShareClientTest.java | 177 + .../sharing/ShareResourceClientTest.java | 43 + .../AdlsGen2AccountSinkPropertiesTests.java | 32 + .../generated/AdlsGen2AccountSinkTests.java | 42 + .../AdlsGen2ArtifactPropertiesTests.java | 38 + .../generated/AdlsGen2ArtifactTests.java | 46 + .../sharing/generated/ArtifactTests.java | 31 + .../BlobAccountSinkPropertiesTests.java | 32 + .../generated/BlobAccountSinkTests.java | 42 + .../BlobStorageArtifactPropertiesTests.java | 37 + .../generated/BlobStorageArtifactTests.java | 51 + .../InPlaceReceivedSharePropertiesTests.java | 46 + .../generated/InPlaceReceivedShareTests.java | 49 + .../InPlaceSentSharePropertiesTests.java | 41 + .../generated/InPlaceSentShareTests.java | 45 + .../sharing/generated/ProxyResourceTests.java | 22 + .../generated/PurviewShareClientTestBase.java | 77 + .../generated/ReceivedShareListTests.java | 29 + .../sharing/generated/ReceivedShareTests.java | 23 + ...sActivateTenantEmailRegistrationTests.java | 35 + ...esCreateOrReplaceAdlsGen2AccountTests.java | 27 + ...SharesCreateOrReplaceBlobAccountTests.java | 27 + .../ReceivedSharesCreateOrReplaceTests.java | 27 + .../generated/ReceivedSharesDeleteTests.java | 25 + ...ReceivedSharesGetAdlsGen2AccountTests.java | 31 + .../ReceivedSharesGetBlobAccountTests.java | 31 + .../generated/ReceivedSharesGetTests.java | 31 + .../ReceivedSharesListAttachedTests.java | 37 + .../ReceivedSharesListDetachedTests.java | 35 + ...sRegisterTenantEmailRegistrationTests.java | 33 + .../SentShareInvitationListTests.java | 29 + .../generated/SentShareInvitationTests.java | 23 + .../sharing/generated/SentShareListTests.java | 29 + .../sharing/generated/SentShareTests.java | 23 + .../SentSharesCreateInvitationTests.java | 34 + ...esCreateOrReplaceAdlsGen2AccountTests.java | 27 + ...SharesCreateOrReplaceBlobAccountTests.java | 27 + .../SentSharesCreateOrReplaceTests.java | 27 + ...entSharesCreateServiceInvitationTests.java | 34 + .../SentSharesCreateUserInvitationTests.java | 34 + .../SentSharesDeleteInvitationTests.java | 26 + .../generated/SentSharesDeleteTests.java | 25 + .../SentSharesGetAdlsGen2AccountTests.java | 31 + .../SentSharesGetBlobAccountTests.java | 31 + .../SentSharesGetInvitationTests.java | 31 + .../SentSharesGetServiceInvitationTests.java | 31 + .../sharing/generated/SentSharesGetTests.java | 31 + .../SentSharesGetUserInvitationTests.java | 31 + .../SentSharesListInvitationsTests.java | 36 + .../generated/SentSharesListTests.java | 37 + .../SentSharesNotifyUserInvitationTests.java | 31 + .../ServiceInvitationPropertiesTests.java | 41 + .../generated/ServiceInvitationTests.java | 46 + .../generated/ShareResourceListTests.java | 64 + .../sharing/generated/ShareResourceTests.java | 41 + .../generated/ShareResourcesListTests.java | 35 + .../purview/sharing/generated/SinkTests.java | 31 + .../generated/StorageAccountPathTests.java | 31 + .../generated/StoreReferenceTests.java | 30 + .../UserInvitationPropertiesTests.java | 38 + .../generated/UserInvitationTests.java | 41 + .../swagger/README.md | 50 + .../CHANGELOG.md | 20 + .../README.md | 115 + .../assets.json | 6 + .../checkstyle-suppressions.xml | 6 + .../azure-analytics-purview-workflow/pom.xml | 76 + .../spotbugs-exclude.xml | 7 + .../purview/workflow/ApprovalAsyncClient.java | 94 + .../purview/workflow/ApprovalClient.java | 93 + .../workflow/ApprovalClientBuilder.java | 334 + .../PurviewWorkflowServiceVersion.java | 40 + .../workflow/TaskStatusAsyncClient.java | 67 + .../purview/workflow/TaskStatusClient.java | 66 + .../workflow/TaskStatusClientBuilder.java | 334 + .../workflow/UserRequestsAsyncClient.java | 95 + .../purview/workflow/UserRequestsClient.java | 92 + .../workflow/UserRequestsClientBuilder.java | 334 + .../purview/workflow/WorkflowAsyncClient.java | 222 + .../purview/workflow/WorkflowClient.java | 221 + .../workflow/WorkflowClientBuilder.java | 334 + .../workflow/WorkflowRunAsyncClient.java | 110 + .../purview/workflow/WorkflowRunClient.java | 109 + .../workflow/WorkflowRunClientBuilder.java | 334 + .../workflow/WorkflowRunsAsyncClient.java | 94 + .../purview/workflow/WorkflowRunsClient.java | 94 + .../workflow/WorkflowRunsClientBuilder.java | 334 + .../workflow/WorkflowTaskAsyncClient.java | 125 + .../purview/workflow/WorkflowTaskClient.java | 124 + .../workflow/WorkflowTaskClientBuilder.java | 334 + .../workflow/WorkflowTasksAsyncClient.java | 117 + .../purview/workflow/WorkflowTasksClient.java | 117 + .../workflow/WorkflowTasksClientBuilder.java | 334 + .../workflow/WorkflowsAsyncClient.java | 77 + .../purview/workflow/WorkflowsClient.java | 77 + .../workflow/WorkflowsClientBuilder.java | 334 + .../implementation/ApprovalsImpl.java | 233 + .../PurviewWorkflowClientImpl.java | 248 + .../implementation/TaskStatusImpl.java | 153 + .../implementation/UserRequestsImpl.java | 206 + .../implementation/WorkflowRunsImpl.java | 503 + .../WorkflowRunsOperationsImpl.java | 264 + .../implementation/WorkflowTasksImpl.java | 627 + .../WorkflowTasksOperationsImpl.java | 289 + .../implementation/WorkflowsImpl.java | 400 + .../WorkflowsOperationsImpl.java | 536 + .../workflow/implementation/package-info.java | 12 + .../purview/workflow/package-info.java | 12 + .../src/main/java/module-info.java | 9 + ...zure-analytics-purview-workflow.properties | 2 + .../purview/workflow/ReadmeSamples.java | 82 + .../workflow/generated/ApprovalApprove.java | 28 + .../workflow/generated/ApprovalReject.java | 28 + .../workflow/generated/TaskRequestUpdate.java | 28 + .../generated/UserRequestsSubmit.java | 28 + .../workflow/generated/WorkTaskGet.java | 27 + .../generated/WorkflowCreateOrUpdate.java | 29 + .../workflow/generated/WorkflowDelete.java | 26 + .../workflow/generated/WorkflowGet.java | 27 + .../workflow/generated/WorkflowRunCancel.java | 28 + .../workflow/generated/WorkflowRunGet.java | 27 + .../workflow/generated/WorkflowRunsList.java | 28 + .../generated/WorkflowTaskReassign.java | 29 + .../workflow/generated/WorkflowTasksList.java | 29 + .../workflow/generated/WorkflowsList.java | 26 + .../generated/ApprovalApproveTests.java | 24 + .../generated/ApprovalRejectTests.java | 24 + .../PurviewWorkflowClientTestBase.java | 185 + .../generated/TaskRequestUpdateTests.java | 24 + .../generated/UserRequestsSubmitTests.java | 27 + .../workflow/generated/WorkTaskGetTests.java | 26 + .../WorkflowCreateOrUpdateTests.java | 28 + .../generated/WorkflowDeleteTests.java | 22 + .../workflow/generated/WorkflowGetTests.java | 26 + .../generated/WorkflowRunCancelTests.java | 24 + .../generated/WorkflowRunGetTests.java | 26 + .../generated/WorkflowRunsListTests.java | 27 + .../generated/WorkflowTaskReassignTests.java | 25 + .../generated/WorkflowTasksListTests.java | 28 + .../generated/WorkflowsListTests.java | 25 + .../swagger/README.md | 18 + sdk/purview/ci.yml | 40 + sdk/purview/pom.xml | 4 + sdk/quantum/azure-quantum-jobs/CHANGELOG.md | 9 + sdk/quantum/azure-quantum-jobs/README.md | 229 + sdk/quantum/azure-quantum-jobs/assets.json | 6 + .../checkstyle-suppressions.xml | 44 + sdk/quantum/azure-quantum-jobs/pom.xml | 84 + .../azure-quantum-jobs/spotbugs-exclude.xml | 7 + .../azure/quantum/jobs/JobsAsyncClient.java | 158 + .../com/azure/quantum/jobs/JobsClient.java | 85 + .../quantum/jobs/ProvidersAsyncClient.java | 70 + .../azure/quantum/jobs/ProvidersClient.java | 42 + .../quantum/jobs/QuantumClientBuilder.java | 369 + .../azure/quantum/jobs/QuotasAsyncClient.java | 70 + .../com/azure/quantum/jobs/QuotasClient.java | 42 + .../quantum/jobs/StorageAsyncClient.java | 62 + .../com/azure/quantum/jobs/StorageClient.java | 45 + .../quantum/jobs/implementation/JobsImpl.java | 301 + .../jobs/implementation/ProvidersImpl.java | 128 + .../implementation/QuantumClientImpl.java | 193 + .../jobs/implementation/QuotasImpl.java | 127 + .../jobs/implementation/StoragesImpl.java | 113 + .../jobs/implementation/package-info.java | 8 + .../quantum/jobs/models/BlobDetails.java | 111 + .../quantum/jobs/models/DimensionScope.java | 47 + .../azure/quantum/jobs/models/ErrorData.java | 117 + .../azure/quantum/jobs/models/JobDetails.java | 482 + .../quantum/jobs/models/JobDetailsList.java | 115 + .../azure/quantum/jobs/models/JobStatus.java | 56 + .../quantum/jobs/models/MeterPeriod.java | 47 + .../jobs/models/ProviderAvailability.java | 50 + .../quantum/jobs/models/ProviderStatus.java | 103 + .../jobs/models/ProviderStatusList.java | 88 + .../com/azure/quantum/jobs/models/Quota.java | 256 + .../azure/quantum/jobs/models/QuotaList.java | 87 + .../azure/quantum/jobs/models/RestError.java | 81 + .../jobs/models/RestErrorException.java | 39 + .../quantum/jobs/models/SasUriResponse.java | 82 + .../jobs/models/TargetAvailability.java | 50 + .../quantum/jobs/models/TargetStatus.java | 118 + .../quantum/jobs/models/package-info.java | 8 + .../com/azure/quantum/jobs/package-info.java | 8 + .../src/main/java/module-info.java | 11 + .../resources/azure-quantum-jobs.properties | 2 + .../java/com/azure/quantum/jobs/BellState.bc | Bin 0 -> 2308 bytes .../java/com/azure/quantum/jobs/BellState.qs | 11 + .../com/azure/quantum/jobs/ReadmeSamples.java | 146 + .../java/com/azure/quantum/jobs/BellState.bc | Bin 0 -> 2308 bytes .../java/com/azure/quantum/jobs/BellState.qs | 11 + .../azure/quantum/jobs/JobsClientTest.java | 116 + .../quantum/jobs/ProviderClientTest.java | 42 + .../quantum/jobs/QuantumClientTestBase.java | 148 + .../azure/quantum/jobs/QuotasClientTest.java | 46 + .../azure/quantum/jobs/StorageClientTest.java | 34 + .../src/test/resources/problem.json | 32 + sdk/quantum/ci.yml | 11 + sdk/quantum/pom.xml | 1 + sdk/redis/azure-resourcemanager-redis/pom.xml | 2 +- .../pom.xml | 2 +- sdk/resourcemanager/autocent.js | 3 + .../azure-resourcemanager/pom.xml | 8 +- .../docs/SINGLE_SERVICE_PACKAGES.md | 24 + ...rviceBusAdministrationAsyncClientTest.java | 7 +- .../ServiceBusAdministrationClientTest.java | 7 +- .../CHANGELOG.md | 3 +- .../spring-cloud-azure-autoconfigure/pom.xml | 17 +- .../pom.xml | 2 +- sdk/sql/azure-resourcemanager-sql/pom.xml | 2 +- .../azure-resourcemanager-standbypool/pom.xml | 2 +- .../CHANGELOG.md | 115 +- .../azure-resourcemanager-storage/README.md | 2 +- .../azure-resourcemanager-storage/pom.xml | 2 +- .../BlobAccessPointConfigurationsClient.java | 638 - .../BlobAccessPointConnectionTestsClient.java | 156 - .../storage/fluent/ContextCachesClient.java | 56 - .../fluent/StorageManagementClient.java | 14 - .../BlobAccessPointConfigurationInner.java | 201 - ...ccessPointConnectionTestResponseInner.java | 135 - .../fluent/models/BlobContainerInner.java | 31 - .../fluent/models/ContainerProperties.java | 40 - ...CacheCheckNameAvailabilityResultInner.java | 123 - .../fluent/models/ListContainerItemInner.java | 12 - .../fluent/models/StorageAccountInner.java | 24 - ...rageAccountPropertiesCreateParameters.java | 32 - .../models/StorageAccountPropertiesInner.java | 32 - ...rageAccountPropertiesUpdateParameters.java | 32 - ...obAccessPointConfigurationsClientImpl.java | 1588 - ...bAccessPointConnectionTestsClientImpl.java | 355 - .../ContextCachesClientImpl.java | 126 - .../StorageManagementClientImpl.java | 34 +- ...lobAccessPointConfigurationListResult.java | 116 - ...lobAccessPointAccessKeyAuthProperties.java | 216 - ...essPointAccessKeyAuthPropertiesUpdate.java | 202 - ...PointAzureNetAppFilesSourceProperties.java | 165 - ...zureNetAppFilesSourcePropertiesUpdate.java | 155 - ...bAccessPointCommvaultSourceProperties.java | 164 - ...sPointCommvaultSourcePropertiesUpdate.java | 153 - ...lobAccessPointConfigurationConnection.java | 132 - ...lobAccessPointConfigurationProperties.java | 253 - ...essPointConfigurationPropertiesUpdate.java | 158 - .../BlobAccessPointConfigurationState.java | 51 - .../BlobAccessPointConfigurationUpdate.java | 128 - .../BlobAccessPointConnectionProperties.java | 114 - ...AccessPointConnectionPropertiesUpdate.java | 116 - .../BlobAccessPointConnectionTestRequest.java | 110 - .../BlobAccessPointConnectionTestStatus.java | 52 - .../models/BlobAccessPointConnectionType.java | 51 - ...bAccessPointDellOneFsSourceProperties.java | 164 - ...sPointDellOneFsSourcePropertiesUpdate.java | 153 - ...cessPointEndpointConnectionProperties.java | 155 - ...intEndpointConnectionPropertiesUpdate.java | 118 - ...bAccessPointGenericS3SourceProperties.java | 164 - ...sPointGenericS3SourcePropertiesUpdate.java | 153 - ...BlobAccessPointNasuniSourceProperties.java | 164 - ...cessPointNasuniSourcePropertiesUpdate.java | 153 - ...ccessPointNetAppOntapSourceProperties.java | 164 - ...ointNetAppOntapSourcePropertiesUpdate.java | 153 - ...sPointPrivateLinkConnectionProperties.java | 334 - ...PrivateLinkConnectionPropertiesUpdate.java | 120 - .../BlobAccessPointPrivateLinkIdType.java | 46 - ...essPointProposedConnectionTestRequest.java | 107 - ...BlobAccessPointQumuloSourceProperties.java | 164 - ...cessPointQumuloSourcePropertiesUpdate.java | 153 - .../BlobAccessPointRemoteAuthProperties.java | 111 - ...AccessPointRemoteAuthPropertiesUpdate.java | 113 - .../models/BlobAccessPointRemoteAuthType.java | 46 - .../BlobAccessPointSourceProperties.java | 122 - ...BlobAccessPointSourcePropertiesUpdate.java | 122 - .../models/BlobAccessPointSourceType.java | 76 - .../BlobAccessPointTlsVerification.java | 52 - ...cheCheckNameAvailabilityFailureReason.java | 54 - ...tCacheCheckNameAvailabilityParameters.java | 119 - .../models/NspAccessRuleProperties.java | 18 - .../StorageAccountCreateParameters.java | 23 - .../StorageAccountUpdateParameters.java | 23 - ...rageDataCollaborationPolicyProperties.java | 31 - .../storage/models/TurboTier.java | 124 - .../storage/models/TurboTierStatus.java | 51 - ...zure-resourcemanager-storage_metadata.json | 2 +- .../proxy-config.json | 2 +- ...dPlatformMetricsCreateOrUpdateSamples.java | 6 +- .../AdvancedPlatformMetricsDeleteSamples.java | 2 +- .../AdvancedPlatformMetricsGetSamples.java | 2 +- .../AdvancedPlatformMetricsListSamples.java | 2 +- ...ccessPointConfigurationsCreateSamples.java | 81 - ...ccessPointConfigurationsDeleteSamples.java | 24 - ...obAccessPointConfigurationsGetSamples.java | 24 - ...igurationsListByStorageAccountSamples.java | 25 - ...urationsTestExistingConnectionSamples.java | 29 - ...ccessPointConfigurationsUpdateSamples.java | 38 - ...ionTestsTestProposedConnectionSamples.java | 45 - .../BlobContainersClearLegalHoldSamples.java | 2 +- ...eateOrUpdateImmutabilityPolicySamples.java | 4 +- .../BlobContainersCreateSamples.java | 26 +- ...ainersDeleteImmutabilityPolicySamples.java | 2 +- .../BlobContainersDeleteSamples.java | 2 +- ...ainersExtendImmutabilityPolicySamples.java | 2 +- ...ontainersGetImmutabilityPolicySamples.java | 2 +- .../generated/BlobContainersGetSamples.java | 4 +- .../generated/BlobContainersLeaseSamples.java | 4 +- .../generated/BlobContainersListSamples.java | 4 +- ...ntainersLockImmutabilityPolicySamples.java | 2 +- .../BlobContainersObjectLevelWormSamples.java | 2 +- .../BlobContainersSetLegalHoldSamples.java | 4 +- .../BlobContainersUpdateSamples.java | 2 +- ...nventoryPoliciesCreateOrUpdateSamples.java | 6 +- .../BlobInventoryPoliciesDeleteSamples.java | 2 +- .../BlobInventoryPoliciesGetSamples.java | 2 +- .../BlobInventoryPoliciesListSamples.java | 2 +- ...obServicesGetServicePropertiesSamples.java | 2 +- .../generated/BlobServicesListSamples.java | 2 +- ...obServicesSetServicePropertiesSamples.java | 6 +- .../generated/ConnectorsCreateSamples.java | 2 +- .../generated/ConnectorsDeleteSamples.java | 2 +- .../generated/ConnectorsGetSamples.java | 2 +- ...ConnectorsListByStorageAccountSamples.java | 2 +- ...nnectorsTestExistingConnectionSamples.java | 2 +- .../generated/ConnectorsUpdateSamples.java | 2 +- ...tCacheContainersCreateOrUpdateSamples.java | 2 +- .../ContextCacheContainersDeleteSamples.java | 2 +- .../ContextCacheContainersGetSamples.java | 2 +- ...heContainersListByContextCacheSamples.java | 2 +- .../ContextCacheContainersUpdateSamples.java | 2 +- ...extCachesCheckNameAvailabilitySamples.java | 28 - .../ContextCachesCreateOrUpdateSamples.java | 64 +- .../generated/ContextCachesDeleteSamples.java | 2 +- ...ontextCachesGetByResourceGroupSamples.java | 4 +- ...ntextCachesListByResourceGroupSamples.java | 2 +- .../generated/ContextCachesListSamples.java | 2 +- .../generated/ContextCachesUpdateSamples.java | 22 +- .../generated/DataSharesCreateSamples.java | 2 +- .../generated/DataSharesDeleteSamples.java | 2 +- .../generated/DataSharesGetSamples.java | 2 +- ...DataSharesListByStorageAccountSamples.java | 2 +- .../generated/DataSharesUpdateSamples.java | 2 +- .../generated/DeletedAccountsGetSamples.java | 2 +- .../generated/DeletedAccountsListSamples.java | 2 +- .../generated/EncryptionScopesGetSamples.java | 2 +- .../EncryptionScopesListSamples.java | 2 +- .../EncryptionScopesPatchSamples.java | 2 +- .../generated/EncryptionScopesPutSamples.java | 4 +- ...leServicesGetServicePropertiesSamples.java | 2 +- .../FileServicesGetServiceUsageSamples.java | 2 +- .../generated/FileServicesListSamples.java | 2 +- .../FileServicesListServiceUsagesSamples.java | 2 +- ...leServicesSetServicePropertiesSamples.java | 8 +- .../generated/FileSharesCreateSamples.java | 10 +- .../generated/FileSharesDeleteSamples.java | 2 +- .../generated/FileSharesGetSamples.java | 8 +- .../generated/FileSharesLeaseSamples.java | 4 +- .../generated/FileSharesListSamples.java | 10 +- .../generated/FileSharesRestoreSamples.java | 2 +- .../generated/FileSharesUpdateSamples.java | 8 +- ...alUsersOperationCreateOrUpdateSamples.java | 6 +- .../LocalUsersOperationDeleteSamples.java | 2 +- .../LocalUsersOperationGetSamples.java | 2 +- .../LocalUsersOperationListKeysSamples.java | 2 +- .../LocalUsersOperationListSamples.java | 4 +- ...ersOperationRegeneratePasswordSamples.java | 2 +- ...nagementPoliciesCreateOrUpdateSamples.java | 16 +- .../ManagementPoliciesDeleteSamples.java | 2 +- .../ManagementPoliciesGetSamples.java | 2 +- ...rityPerimeterConfigurationsGetSamples.java | 2 +- ...ityPerimeterConfigurationsListSamples.java | 2 +- ...rimeterConfigurationsReconcileSamples.java | 2 +- ...oliciesOperationCreateOrUpdateSamples.java | 8 +- ...icationPoliciesOperationDeleteSamples.java | 2 +- ...eplicationPoliciesOperationGetSamples.java | 2 +- ...plicationPoliciesOperationListSamples.java | 2 +- .../generated/OperationsListSamples.java | 14 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...PrivateEndpointConnectionsListSamples.java | 2 +- .../PrivateEndpointConnectionsPutSamples.java | 2 +- ...kResourcesListByStorageAccountSamples.java | 2 +- .../storage/generated/QueueCreateSamples.java | 4 +- .../storage/generated/QueueDeleteSamples.java | 2 +- .../storage/generated/QueueGetSamples.java | 2 +- .../storage/generated/QueueListSamples.java | 2 +- ...ueServicesGetServicePropertiesSamples.java | 2 +- .../generated/QueueServicesListSamples.java | 2 +- ...ueServicesSetServicePropertiesSamples.java | 2 +- .../storage/generated/QueueUpdateSamples.java | 2 +- .../storage/generated/SkusListSamples.java | 4 +- ...HierarchicalNamespaceMigrationSamples.java | 2 +- ...eAccountsCheckNameAvailabilitySamples.java | 2 +- .../StorageAccountsCreateSamples.java | 54 +- ...untsCustomerInitiatedMigrationSamples.java | 2 +- .../StorageAccountsDeleteSamples.java | 2 +- .../StorageAccountsFailoverSamples.java | 4 +- ...rageAccountsGetByResourceGroupSamples.java | 12 +- ...sGetCustomerInitiatedMigrationSamples.java | 4 +- ...HierarchicalNamespaceMigrationSamples.java | 2 +- .../StorageAccountsListAccountSasSamples.java | 2 +- ...ageAccountsListByResourceGroupSamples.java | 2 +- .../StorageAccountsListKeysSamples.java | 2 +- .../generated/StorageAccountsListSamples.java | 2 +- .../StorageAccountsListServiceSasSamples.java | 2 +- .../StorageAccountsRegenerateKeySamples.java | 4 +- ...orageAccountsRestoreBlobRangesSamples.java | 2 +- ...countsRevokeUserDelegationKeysSamples.java | 2 +- .../StorageAccountsUpdateSamples.java | 45 +- ...kAssignmentInstancesReportListSamples.java | 2 +- .../StorageTaskAssignmentsCreateSamples.java | 6 +- .../StorageTaskAssignmentsDeleteSamples.java | 2 +- .../StorageTaskAssignmentsGetSamples.java | 2 +- ...AssignmentsInstancesReportListSamples.java | 2 +- .../StorageTaskAssignmentsListSamples.java | 2 +- ...eTaskAssignmentsStopAssignmentSamples.java | 2 +- .../StorageTaskAssignmentsUpdateSamples.java | 2 +- .../storage/generated/TableCreateSamples.java | 4 +- .../storage/generated/TableDeleteSamples.java | 2 +- .../storage/generated/TableGetSamples.java | 2 +- .../storage/generated/TableListSamples.java | 2 +- ...leServicesGetServicePropertiesSamples.java | 2 +- .../generated/TableServicesListSamples.java | 2 +- ...leServicesSetServicePropertiesSamples.java | 2 +- .../storage/generated/TableUpdateSamples.java | 4 +- .../UsagesListByLocationSamples.java | 2 +- .../tsp-location.yaml | 4 +- .../pom.xml | 4 +- .../CHANGELOG.md | 42 + .../README.md | 111 + .../checkstyle-suppressions.xml | 8 + .../pom.xml | 73 + .../spotbugs-exclude.xml | 7 + .../AccessControlClientBuilder.java | 379 + .../RoleAssignmentsAsyncClient.java | 289 + .../accesscontrol/RoleAssignmentsClient.java | 292 + .../RoleDefinitionsAsyncClient.java | 139 + .../accesscontrol/RoleDefinitionsClient.java | 141 + .../AccessControlClientImpl.java | 141 + .../implementation/RoleAssignmentsImpl.java | 836 + .../implementation/RoleDefinitionsImpl.java | 382 + .../implementation/package-info.java | 9 + .../models/CheckAccessDecision.java | 154 + .../models/CheckPrincipalAccessRequest.java | 157 + .../models/CheckPrincipalAccessResponse.java | 99 + .../models/ErrorAdditionalInfo.java | 97 + .../accesscontrol/models/ErrorContract.java | 94 + .../models/ErrorContractException.java | 42 + .../accesscontrol/models/ErrorResponse.java | 158 + .../accesscontrol/models/RequiredAction.java | 124 + .../models/RoleAssignmentDetails.java | 220 + .../models/RoleAssignmentDetailsList.java | 126 + .../models/RoleAssignmentRequest.java | 190 + ...AssignmentsListRoleAssignmentsHeaders.java | 56 + .../accesscontrol/models/SubjectInfo.java | 131 + .../models/SynapseRbacPermission.java | 191 + .../models/SynapseRoleDefinition.java | 285 + .../accesscontrol/models/package-info.java | 9 + .../synapse/accesscontrol/package-info.java | 9 + .../src/main/java/module-info.java | 12 + ...analytics-synapse-accesscontrol.properties | 2 + .../swagger/README.md | 50 + .../CHANGELOG.md | 42 + .../README.md | 111 + .../checkstyle-suppressions.xml | 6 + .../pom.xml | 73 + .../spotbugs-exclude.xml | 7 + .../ManagedPrivateEndpointsAsyncClient.java | 154 + .../ManagedPrivateEndpointsClient.java | 171 + .../ManagedPrivateEndpointsClientBuilder.java | 355 + .../ManagedPrivateEndpointsClientImpl.java | 126 + .../ManagedPrivateEndpointsImpl.java | 618 + .../implementation/package-info.java | 9 + .../models/ManagedPrivateEndpoint.java | 150 + ...ManagedPrivateEndpointConnectionState.java | 143 + .../ManagedPrivateEndpointListResponse.java | 114 + .../ManagedPrivateEndpointProperties.java | 291 + .../models/package-info.java | 9 + .../managedprivateendpoints/package-info.java | 9 + .../src/main/java/module-info.java | 12 + .../swagger/README.md | 47 + .../CHANGELOG.md | 46 + .../README.md | 111 + .../checkstyle-suppressions.xml | 6 + .../pom.xml | 73 + .../spotbugs-exclude.xml | 7 + .../monitoring/MonitoringAsyncClient.java | 134 + .../synapse/monitoring/MonitoringClient.java | 135 + .../monitoring/MonitoringClientBuilder.java | 354 + .../implementation/MonitoringClientImpl.java | 126 + .../implementation/MonitoringsImpl.java | 354 + .../implementation/package-info.java | 9 + .../synapse/monitoring/models/SparkJob.java | 536 + .../models/SparkJobListViewResponse.java | 125 + .../models/SqlQueryStringDataModel.java | 92 + .../monitoring/models/package-info.java | 9 + .../synapse/monitoring/package-info.java | 9 + .../src/main/java/module-info.java | 12 + .../swagger/README.md | 46 + .../CHANGELOG.md | 57 + .../azure-analytics-synapse-spark/README.md | 234 + .../azure-analytics-synapse-spark/assets.json | 6 + .../checkstyle-suppressions.xml | 6 + .../azure-analytics-synapse-spark/pom.xml | 79 + .../spotbugs-exclude.xml | 7 + .../synapse/spark/SparkBatchAsyncClient.java | 211 + .../synapse/spark/SparkBatchClient.java | 214 + .../synapse/spark/SparkClientBuilder.java | 397 + .../spark/SparkSessionAsyncClient.java | 375 + .../synapse/spark/SparkSessionClient.java | 380 + .../implementation/SparkBatchesImpl.java | 589 + .../spark/implementation/SparkClientImpl.java | 159 + .../implementation/SparkSessionsImpl.java | 1119 + .../spark/implementation/package-info.java | 9 + .../spark/models/LivyStatementStates.java | 81 + .../synapse/spark/models/LivyStates.java | 111 + .../spark/models/PluginCurrentState.java | 87 + .../spark/models/SchedulerCurrentState.java | 63 + .../synapse/spark/models/SparkBatchJob.java | 626 + .../spark/models/SparkBatchJobCollection.java | 157 + .../spark/models/SparkBatchJobOptions.java | 567 + .../spark/models/SparkBatchJobResultType.java | 69 + .../spark/models/SparkBatchJobState.java | 357 + .../spark/models/SparkErrorSource.java | 69 + .../synapse/spark/models/SparkJobType.java | 57 + .../synapse/spark/models/SparkRequest.java | 503 + .../synapse/spark/models/SparkScheduler.java | 229 + .../spark/models/SparkServiceError.java | 154 + .../spark/models/SparkServicePlugin.java | 270 + .../synapse/spark/models/SparkSession.java | 626 + .../spark/models/SparkSessionCollection.java | 157 + .../spark/models/SparkSessionOptions.java | 567 + .../spark/models/SparkSessionResultType.java | 69 + .../spark/models/SparkSessionState.java | 423 + .../synapse/spark/models/SparkStatement.java | 186 + .../SparkStatementCancellationResult.java | 93 + .../models/SparkStatementCollection.java | 126 + .../models/SparkStatementLanguageType.java | 69 + .../spark/models/SparkStatementOptions.java | 123 + .../spark/models/SparkStatementOutput.java | 252 + .../synapse/spark/models/package-info.java | 9 + .../analytics/synapse/spark/package-info.java | 9 + .../src/main/java/module-info.java | 12 + .../azure-analytics-synapse-spark.properties | 2 + .../analytics/synapse/spark/HelloWorld.java | 60 + .../synapse/spark/HelloWorldAsync.java | 66 + .../synapse/spark/SparkBatchClientTest.java | 32 + .../synapse/spark/SparkClientTestBase.java | 175 + .../synapse/spark/SparkSessionClientTest.java | 32 + .../swagger/README.md | 56 + sdk/synapse/ci.yml | 48 + sdk/synapse/pom.xml | 4 + .../CHANGELOG.md | 96 +- .../azure-resourcemanager-terraform/README.md | 8 +- .../azure-resourcemanager-terraform/SAMPLE.md | 4 +- .../azure-resourcemanager-terraform/pom.xml | 7 +- .../AzureTerraformManagementClientImpl.java | 2 +- .../models/AzureExtensionResourceType.java | 56 - .../terraform/models/BaseExportModel.java | 45 +- .../terraform/models/ExportQuery.java | 15 - .../terraform/models/ExportResource.java | 15 - .../terraform/models/ExportResourceGroup.java | 15 - ...re-resourcemanager-terraform_metadata.json | 2 +- .../generated/OperationsListSamples.java | 2 +- .../TerraformExportTerraformSamples.java | 2 +- .../generated/BaseExportModelTests.java | 25 +- .../generated/ExportResourceGroupTests.java | 54 +- .../generated/ExportResourceTests.java | 60 +- .../generated/OperationsListMockTests.java | 2 +- .../tsp-location.yaml | 4 +- sdk/tools/azure-openrewrite/pom.xml | 4 +- .../azure-ai-documenttranslator/CHANGELOG.md | 15 + .../azure-ai-documenttranslator/README.md | 92 + .../azure-ai-documenttranslator/assets.json | 6 + .../checkstyle-suppressions.xml | 6 + .../azure-ai-documenttranslator/pom.xml | 81 + .../spotbugs-exclude.xml | 7 + .../BatchDocumentTranslationAsyncClient.java | 624 + .../BatchDocumentTranslationClient.java | 620 + ...BatchDocumentTranslationClientBuilder.java | 332 + ...atchDocumentTranslationServiceVersion.java | 40 + .../BatchDocumentTranslationClientImpl.java | 133 + .../DocumentTranslationsImpl.java | 2364 + .../implementation/package-info.java | 9 + .../ai/documenttranslator/package-info.java | 9 + .../src/main/java/module-info.java | 9 + .../azure-ai-documenttranslator.properties | 2 + .../src/samples/README.md | 54 + .../ai/documenttranslator/ReadmeSamples.java | 29 + .../TranslateDocuments.java | 53 + ...atchDocumentTranslationClientTestBase.java | 37 + ...tchDocumentTranslationRestClientTests.java | 52 + .../swagger/README.md | 13 + sdk/translation/ci.yml | 10 + sdk/translation/pom.xml | 1 + sdk/voicelive/azure-ai-voicelive/pom.xml | 2 +- .../azure-messaging-webpubsub-chat/pom.xml | 10 +- .../CHANGELOG.md | 2 +- .../azure-messaging-webpubsub-client/pom.xml | 14 +- .../websocket/WebSocketSessionNettyImpl.java | 18 +- .../src/main/java/module-info.java | 1 - 4589 files changed, 393796 insertions(+), 112018 deletions(-) delete mode 100644 eng/common/pipelines/templates/jobs/apireview-hub-build-tools-base.yml delete mode 100644 eng/common/pipelines/templates/jobs/apireview-hub-generate-artifact-base.yml create mode 100644 eng/common/pipelines/templates/jobs/apireview-hub-job-base.yml delete mode 100644 eng/common/pipelines/templates/steps/apireview-hub-failure-callback.yml create mode 100644 eng/common/pipelines/templates/steps/create-apireview-hub-artifacts-base.yml delete mode 100644 eng/common/pipelines/templates/steps/eval-publish-results.yml delete mode 100644 eng/common/pipelines/templates/steps/login-to-copilot.yml delete mode 100644 eng/common/scripts/eval/lib/shard-results.ts delete mode 100644 eng/common/scripts/eval/publisher/CHANGELOG.md delete mode 100644 eng/common/scripts/eval/publisher/Publish-EvalResults.ps1 delete mode 100644 eng/common/scripts/eval/publisher/bundle.ts delete mode 100644 eng/common/scripts/eval/publisher/package.json delete mode 100644 eng/common/scripts/eval/publisher/pnpm-lock.yaml delete mode 100644 eng/common/scripts/eval/publisher/test/publisher.test.ts delete mode 100644 eng/common/scripts/eval/test/shard-results.test.ts create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/README.md create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/assets.json create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/checkstyle-suppressions.xml create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/pom.xml create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/spotbugs-exclude.xml create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorClientBuilder.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorServiceVersion.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateAsyncClient.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateClient.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateAsyncClient.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateClient.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/AnomalyDetectorClientImpl.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/MultivariatesImpl.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/UnivariatesImpl.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/package-info.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AlignMode.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AlignPolicy.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyDetectionModel.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyInterpretation.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyState.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyValue.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/CorrelationChanges.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/DataSchema.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/DiagnosticsInfo.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ErrorResponse.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/FillNAMethod.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ImputeMode.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelInfo.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelState.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelStatus.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionOptions.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionResultSummary.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionStatus.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateDetectionResult.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateLastDetectionOptions.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateLastDetectionResult.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/TimeGranularity.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/TimeSeriesPoint.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateChangePointDetectionOptions.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateChangePointDetectionResult.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateDetectionOptions.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateEntireDetectionResult.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateLastDetectionResult.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/VariableState.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/VariableValues.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/package-info.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/package-info.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/module-info.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/META-INF/azure-ai-anomalydetector_apiview_properties.json create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/META-INF/azure-ai-anomalydetector_metadata.json create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/anomalydetector.properties create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/azure-ai-anomalydetector.properties create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/MultivariateSample.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/ReadmeSamples.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/SampleUtils.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/CreateAndTrainMultivariateModel.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DeleteMultivariateModel.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectMultivariateBatchAnomaly.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectMultivariateLastAnomaly.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectUnivariateLastPoint.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/GetAMultivariateModel.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/GetMultivariateBatchDetectionResult.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/ListMultivariateModels.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/UnivariateDetectEntireSeries.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/UnivariateDetectionOfAChangePoint.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.csv create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.json create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/sync_infer_body.json create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/AnomalyDetectorClientTest.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/AnomalyDetectorClientTestBase.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/MultivariateAnomalyDetectorClientTest.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/AnomalyDetectorClientTestBase.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/CreateAndTrainMultivariateModelTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DeleteMultivariateModelTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectMultivariateBatchAnomalyTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectMultivariateLastAnomalyTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectUnivariateLastPointTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/GetAMultivariateModelTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/GetMultivariateBatchDetectionResultTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/ListMultivariateModelsTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/UnivariateDetectEntireSeriesTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/UnivariateDetectionOfAChangePointTests.java create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/test-resources.json create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/tests.yml create mode 100644 sdk/anomalydetector/azure-ai-anomalydetector/tsp-location.yaml create mode 100644 sdk/anomalydetector/ci.yml create mode 100644 sdk/anomalydetector/cspell.yml create mode 100644 sdk/anomalydetector/pom.xml delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClusterJobsClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDeploymentSettingsClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskJobsClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskPrivilegedJobsClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDisksClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineJobsClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdapterJobsClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdaptersClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineSecuritySettingsOperationsClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineVolumesClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachinesClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OsImagesClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OwnershipVouchersClient.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterJobInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDeploymentSettingInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskJobInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskPrivilegedJobInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineJobInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterJobInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineSecuritySettingsInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineValidateResponseInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineVolumeInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OsImageInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateOwnershipVouchersResponseInner.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineValidateResponseImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumeImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImageImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersClientImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateOwnershipVouchersResponseImpl.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterJobListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDeploymentSettingListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskJobListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskPrivilegedJobListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineJobListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterJobListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineSecuritySettingsListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineVolumeListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OsImageListResult.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AddServerJobServerDetails.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ApplyConfigurationNetworkAdapterJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Architecture.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AuthenticationType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJob.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobs.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterSdnProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectionState.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/CreateVolumeJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeleteVolumeJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskActionStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskDeploymentStep.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskFileSystemType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskState.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskStorageType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsProfile.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadRequest.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EAPMethod.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachine.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineAdapterPropertyOverrides.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineConnectivityStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentData.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSetting.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettingProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettings.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisk.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJob.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobs.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJob.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobs.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisks.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetwork.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetworkIntent.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJob.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobs.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineKind.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineLifecycleStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapter.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJob.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobs.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapters.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkProfile.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNicDetail.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachinePatch.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportNodeSettings.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineScaleUnits.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityComplianceStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettings.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettingsOperations.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineState.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageAdapterIpInfo.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageNetwork.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateRequest.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateResponse.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVirtualSwitchConfigurationOverrides.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolume.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumeProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumes.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineWorkloadInventoryItem.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachines.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ForcePushNetworkAdapterJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfile.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciAddServerJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciConfigureSdnIntegrationJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciJobType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciRepairServerJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InterfaceState.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAddressRange.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAssignmentType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpInterfaceType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterIPConfig.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapSettings.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiConfig.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiNetworkConfig.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiTargetPortalAddress.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/JobReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleDetails.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleOperationStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStage.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Metadata.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapter.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterActionStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterDeploymentStep.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterOperationStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterProvisioningStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeStorageType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OSOperationType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingResourceType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDetail.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImage.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImageProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImages.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfile.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProvisionProfile.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnerKeyType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherDetails.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationDetails.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVouchers.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrivilegedJobType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningDetails.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningOsType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningRequest.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RepairServerJobServerDetails.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ResolutionStrategy.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegrationIntent.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnStatus.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SiteDetails.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SolutionType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiator.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiatorType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfile.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationNetworkAdapterJobProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TargetDeviceConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TimeConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserDetails.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersRequest.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersResponse.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WebProxyConfiguration.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationDesiredProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationReportedProperties.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecret.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecretType.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsListSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsListByEdgeMachineSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsListSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsListSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksListSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsListSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsListSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdaptersGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdaptersListSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsListByEdgeMachineSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesListSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesCreateOrUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesDeleteSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesGetByResourceGroupSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListByResourceGroupSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesRefreshApplicableUpdatesSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesRefreshSecuritySettingsSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesUpdateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesValidateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OwnershipVouchersValidateSamples.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AddServerJobServerDetailsTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobListResultTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsCreateOrUpdateMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsGetWithResponseMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsListMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterSdnPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentStepTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskActionStatusTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskConfigurationTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskDeploymentStepTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskJobReportedPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskReportedPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskVolumeConfigurationTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskVolumeReportedPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceActionStatusTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceReportedPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineAdapterPropertyOverridesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingListResultTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsCreateOrUpdateMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsGetWithResponseMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsListByEdgeMachineMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskInnerTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskListResultTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksCreateOrUpdateMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksGetWithResponseMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksListMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineHostNetworkIntentTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineHostNetworkTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkProfileTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNicDetailTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinePatchTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineRemoteSupportNodeSettingsTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecurityComplianceStatusTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecurityPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsInnerTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsListResultTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsCreateOrUpdateMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsGetWithResponseMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsListByEdgeMachineMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineStorageAdapterIpInfoTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineStorageNetworkTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineValidateRequestTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineValidateResponseInnerTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVirtualSwitchConfigurationOverridesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumeInnerTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumeListResultTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumePropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesCreateOrUpdateMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesGetWithResponseMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesListMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineWorkloadInventoryItemTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesValidateMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciCollectLogJobPropertiesTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciRemoteSupportJobPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpAddressRangeTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiAdapterIPConfigTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiAdapterPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiChapSettingsTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiConfigTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiNetworkConfigTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiTargetPortalAddressTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LifecycleStatusTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionReportedPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterActionStatusTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterDeploymentStepTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterJobReportedPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterProvisioningStatusTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkConfigurationTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OnboardingConfigurationTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageInnerTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageListResultTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagePropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetWithResponseMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceMockTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileTests.java create mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobReportedPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RepairServerJobServerDetailsTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SiteDetailsTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageConfigurationTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageInitiatorTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TargetDeviceConfigurationTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TimeConfigurationTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VolumeConfigurationTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VolumeReportedPropertiesTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WebProxyConfigurationTests.java delete mode 100644 sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WifiConfigurationReportedPropertiesTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AdapterDeploymentsClient.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CostControlsClient.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiBindingsClient.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiRegosClient.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AdapterDeploymentInner.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CostControlInner.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiBindingInner.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiRegoInner.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsClientImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsClientImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsClientImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegoImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosClientImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosImpl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AdapterDeploymentListResult.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CostControlListResult.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiBindingListResult.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiRegoListResult.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployment.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentLastOperation.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationState.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationType.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentProperties.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployments.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControl.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlConnections.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimension.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimensionType.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlMatch.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatch.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatchProperties.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPeriod.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlProperties.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlRule.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThreshold.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdAction.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdType.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlUnit.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControls.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/GatedModelAccessProperties.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsEmptyObject.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmCategory.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmConfiguration.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoint.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoints.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsManifest.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationBindingExtension.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationSubjectFormat.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyBinding.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyDefinitionType.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTarget.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTargetKind.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsRegoPolicyDefinition.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolDefinition.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolInterventionPoint.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolNameSelector.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBinding.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingProperties.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindings.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyCustomExternalSafetyProviderReference.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyFormat.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRego.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoEncoding.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoProperties.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoReference.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegos.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetHeaders.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetResponse.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProvisioningState.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchStatus.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdate.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdateProperties.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsCreateOrUpdateSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsDeleteSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsGetSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsListSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsCreateOrUpdateSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsDeleteSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsGetSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsListSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsUpdateSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsCreateOrUpdateSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsDeleteSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsGetSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsListSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosCreateOrUpdateSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosDeleteSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosGetSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosListSamples.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentInnerTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentLastOperationTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentListResultTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentPropertiesTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsCreateOrUpdateMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsGetWithResponseMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsListMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlConnectionsTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlDimensionTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlMatchTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlThresholdTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsDeleteWithResponseMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/GatedModelAccessPropertiesTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsEmptyObjectTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsHarmConfigurationTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsInterventionPointTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsInterventionPointsTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsManifestTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsModerationBindingExtensionTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsPolicyBindingTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsRegoPolicyDefinitionTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsToolDefinitionTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsToolInterventionPointTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingInnerTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingListResultTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingPropertiesTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsDeleteWithResponseMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsGetWithResponseMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsListMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyCustomExternalSafetyProviderReferenceTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoInnerTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoListResultTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoPropertiesTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoReferenceTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosDeleteWithResponseMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosGetWithResponseMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosListMockTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchUpdatePropertiesTests.java delete mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchUpdateTests.java create mode 100644 sdk/communication/azure-communication-callingserver/CHANGELOG.md create mode 100644 sdk/communication/azure-communication-callingserver/README.md create mode 100644 sdk/communication/azure-communication-callingserver/checkstyle-suppressions.xml create mode 100644 sdk/communication/azure-communication-callingserver/ci.yml create mode 100644 sdk/communication/azure-communication-callingserver/pom.xml create mode 100644 sdk/communication/azure-communication-callingserver/spotbugs-exclude.xml create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationAsyncClient.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationClient.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationClientBuilder.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallConnection.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallConnectionAsync.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallMedia.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallMediaAsync.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallRecording.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallRecordingAsync.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallingServerServiceVersion.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ContentDownloader.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/EventHandler.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/AzureCommunicationCallingServerServiceImpl.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/AzureCommunicationCallingServerServiceImplBuilder.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/CallConnectionsImpl.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/Constants.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ContentsImpl.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/CustomHmacAuthenticationPolicy.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ServerCallingsImpl.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ServerCallsImpl.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/AddParticipantsResponseConstructorProxy.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/CallConnectionPropertiesConstructorProxy.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/ErrorConstructorProxy.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/ListParticipantsResponseConstructorProxy.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/RecordingStateResponseConstructorProxy.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/RemoveParticipantsResponseConstructorProxy.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/TransferCallResponseConstructorProxy.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/package-info.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CallParticipantConverter.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CallSourceConverter.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CommunicationIdentifierConverter.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/PhoneNumberIdentifierConverter.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/package-info.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AcsCallParticipantInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AcsEventTypeInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AddParticipantsRequestInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AddParticipantsResponseInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AnswerCallRequestInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallConnectionPropertiesInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallConnectionStateModelInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallLocatorInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallLocatorKindInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallRejectReasonInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallSourceInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/ChannelAffinityInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CollectTonesResult.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationCloudEnvironmentModel.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationError.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationErrorResponse.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationIdentifierModel.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationIdentifierModelKind.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationUserIdentifierModel.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CreateCallRequestInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/DtmfConfigurationsInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/FileSourceInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/GetParticipantsResponseInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingAudioChannelTypeInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingConfigurationInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingContentTypeInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingTransportTypeInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MicrosoftTeamsUserIdentifierModel.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PhoneNumberIdentifierModel.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlayOptionsInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlayRequest.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlaySourceInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlaySourceTypeInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognitionType.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeCompleted.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeConfigurationsInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeFailed.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeInputTypeInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeRequest.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannelInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContentInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormatInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingStateInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingStateResponseInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RedirectCallRequestInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RejectCallRequestInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RemoveParticipantsRequestInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RemoveParticipantsResponseInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/ResultInformation.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StartCallRecordingRequestInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StopTonesInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/TransferCallResponseInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/TransferToParticipantRequestInternal.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/package-info.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/package-info.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AddParticipantsOptions.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AddParticipantsResult.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AnswerCallResult.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallConnectionProperties.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallConnectionState.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallLocator.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallLocatorKind.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallParticipant.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallRejectReason.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallResult.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallSource.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingOperationStatus.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingServerError.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingServerErrorException.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ChannelAffinity.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CreateCallOptions.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CreateCallResult.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/DownloadToFileOptions.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/DtmfConfigurations.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/FileSource.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/GroupCallLocator.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ListParticipantsResult.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingAudioChannelType.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingConfiguration.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingContentType.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingTransportType.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ParallelDownloadOptions.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlayOptions.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlaySource.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlaySourceType.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeConfigurations.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeInputType.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeOptions.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannel.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContent.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormat.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingState.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingStateResult.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RemoveParticipantsResult.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ServerCallLocator.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StartRecordingOptions.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StopTones.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/TransferCallResult.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/TransferToParticipantCallOptions.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/AddParticipantsFailedEvent.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/AddParticipantsSucceededEvent.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallAutomationEventBase.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallConnectedEvent.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallDisconnectedEvent.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallTransferAcceptedEvent.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallTransferFailedEvent.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/ParticipantsUpdatedEvent.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/PlayCompleted.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/PlayFailed.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/RecordingStateChangedEvent.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/ResultInfo.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/package-info.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/package-info.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/package-info.java create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/module-info.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationAsyncClientUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationClientBuilderUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationClientUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationLiveTestBase.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationUnitTestBase.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallConnectionAsyncUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallConnectionUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallMediaAsyncUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallMediaUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingAsyncLiveTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingAsyncUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingLiveTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingUnitTestBase.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CommunicationIdentifierConverterUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DeleteAsyncLiveTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DeleteLiveTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentAsyncLiveTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentAsyncUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentLiveTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/EventHandlerUnitTests.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/MockHttpClient.java create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/ModelGenerator.java create mode 100644 sdk/communication/azure-communication-callingserver/swagger/README.md create mode 100644 sdk/communication/azure-communication-callingserver/tests.yml delete mode 100644 sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/FlexProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProperties.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexRequest.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HardwareProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionFlexPayload.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProperties.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateFlexSamples.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalCapabilitiesTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalUnattendContentTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AllInstancesDownTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApiEntityReferenceTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApplicationProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/BootDiagnosticsTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CapacityReservationProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DataDiskTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiagnosticsProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiffDiskSettingsTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiskEncryptionSetParametersTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EncryptionIdentityTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EventGridAndResourceGraphTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteCreateRequestTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExtendedLocationTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/FlexPropertiesTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HardwareProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HostEndpointSettingsTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ImageReferenceTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxPatchSettingsTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ManagedDiskParametersTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferencePropertiesTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferenceTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OSImageNotificationProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PatchSettingsTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PlacementTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PriorityProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PublicIPAddressSkuTests.java create mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceProvisionPayloadTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsAdditionalPublishingTargetsTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsPolicyTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/TerminateNotificationProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UefiSettingsTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserAssignedIdentitiesValueTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRebootTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRedeployTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMDiskSecurityProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMGalleryApplicationTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultCertificateTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultSecretGroupTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualHardDiskTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIdentityTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIpTagTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationPropertiesTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationPropertiesTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressDnsSettingsConfigurationTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizeProfileTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizePropertiesTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMConfigurationTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMListenerTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsConfigurationTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZoneAllocationPolicyTests.java delete mode 100644 sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZonePreferenceTests.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AlertConfigurationsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JWTAuthenticatorsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceWindowsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/VmSkusClient.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AlertConfigurationInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JWTAuthenticatorInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceWindowResourceInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PoolBootstrapDataInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ResourceSkuInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AlertConfigurationsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JWTAuthenticatorsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceWindowsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/VmSkusClientImpl.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AlertConfigurationListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/GuardrailsAvailableVersionsList.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/JWTAuthenticatorListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/LoadBalancerListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceWindowResourceListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterSnapshotListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshMembershipsListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/NodeImageVersionsListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationStatusResultList.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SafeguardsAvailableVersionsList.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/VmSkusListResult.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressConfiguration.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressVersion.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterface.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterfaceType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdate.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateManualScaleProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateScaleProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateVirtualMachinesProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertNotification.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AllowedSubject.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BastionProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BastionSku.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapAzureConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapComponentVersions.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapKubeletConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNetworkingConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNodeConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTargetCluster.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTokenInfo.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservation.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservationGroup.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ControlPlaneScalingSize.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/HardEvictionThreshold.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappingExpression.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappings.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorExtraClaimMappingExpression.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorIssuer.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorValidationRule.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeReserved.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ListBootstrapDataRequest.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineBillingProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineSecurityProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindowResourceProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterControlPlaneScalingProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHealthMonitorProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipPrivateConnectProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MigStrategy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionPolicy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaDriverMode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PreparedImageSpecificationProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java rename sdk/{storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage => containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice}/models/ResourceProvisioningState.java (96%) create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapabilities.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacity.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacityScaleType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCosts.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuLocationInfo.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionInfo.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictions.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsReasonCode.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsType.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuZoneDetails.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceAccountImagePullProfile.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionGracePeriod.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionThreshold.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeGateSettings.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCompleteUpgradeSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListBootstrapDataSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsListByManagedClusterSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsListByManagedClusterSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersListByManagedClusterSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsGetByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsListByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsUpdateTagsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsGetByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListByResourceGroupSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsUpdateTagsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetGuardrailsVersionsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetSafeguardsVersionsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListGuardrailsVersionsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListNodeImageVersionsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSafeguardsVersionsSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRebalanceLoadBalancersSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsCreateOrUpdateSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsDeleteSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsListByManagedClusterSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetByAgentPoolSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListByAgentPoolSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListSamples.java create mode 100644 sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/VmSkusListSamples.java delete mode 100644 sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyExpectContinueObservationTests.java delete mode 100644 sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyNativeTransportModulesTests.java delete mode 100644 sdk/cosmos/azure-cosmos-spark_3/src/test/scala/com/azure/cosmos/spark/NettyCompatibilitySpec.scala delete mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopTests.java create mode 100644 sdk/easm/azure-analytics-defender-easm/CHANGELOG.md create mode 100644 sdk/easm/azure-analytics-defender-easm/README.md create mode 100644 sdk/easm/azure-analytics-defender-easm/assets.json create mode 100644 sdk/easm/azure-analytics-defender-easm/checkstyle-suppressions.xml create mode 100644 sdk/easm/azure-analytics-defender-easm/pom.xml create mode 100644 sdk/easm/azure-analytics-defender-easm/spotbugs-exclude.xml create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmAsyncClient.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmClient.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmClientBuilder.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmServiceVersion.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/implementation/EasmClientImpl.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/implementation/package-info.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AlexaDetails.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AsAsset.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AsAssetResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetPageResult.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetSecurityPolicy.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetState.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetSummaryResult.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateData.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateState.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateTransfers.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Attribute.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItem.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItemKind.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnection.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionData.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionProperties.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Banner.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ContactAsset.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ContactAssetResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cookie.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cve.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cvss3Summary.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnection.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionContent.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionData.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionFrequency.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionProperties.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DependentResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoGroup.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoGroupData.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoRunResult.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoRunState.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoSource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoSourceKind.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoTemplate.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DomainAsset.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DomainAssetResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ErrorDetail.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/GuidPair.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostAsset.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostAssetResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostCore.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/InnerError.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/InventoryAsset.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpAddressAsset.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpAddressAssetResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlock.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlockAsset.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlockAssetResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Location.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnection.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionData.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionProperties.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedBoolean.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedHeader.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedInteger.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedIntegers.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedLocation.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedLong.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedPortState.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedPortStateValue.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedString.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedValue.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAsset.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAssetRedirectType.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAssetResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageCause.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Port.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotRequest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotResult.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryRequest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryResult.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdown.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdownKind.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSnapshotResult.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSummaryResult.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Reputation.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ResourceUrl.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SavedFilter.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SavedFilterData.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ScanMetadata.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Service.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SoaRecord.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Source.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAsset.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetResource.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetValidationType.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslServerConfig.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SubResourceIntegrityCheck.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Task.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/TaskPhase.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/TaskState.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ValidateResult.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/WebComponent.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/package-info.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/package-info.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/java/module-info.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/resources/META-INF/azure-analytics-defender-easm_apiview_properties.json create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/resources/META-INF/azure-analytics-defender-easm_metadata.json create mode 100644 sdk/easm/azure-analytics-defender-easm/src/main/resources/azure-analytics-defender-easm.properties create mode 100644 sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoTemplateSample.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoveryRunsSample.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ManagingExternalIdsSample.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ReadmeSamples.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/SavedFilterSample.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/AssetsAsyncTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/AssetsTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DataConnectionAsyncTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DataConnectionsTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryGroupsAsyncTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryGroupsTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryTemplatesAsyncTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryTemplatesTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/EasmClientTestBase.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/ReportsAsyncTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/ReportsTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/SavedFiltersAsyncTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/SavedFiltersTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/TasksAsyncTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/TasksTest.java create mode 100644 sdk/easm/azure-analytics-defender-easm/tsp-location.yaml create mode 100644 sdk/easm/ci.yml create mode 100644 sdk/easm/cspell.yml create mode 100644 sdk/easm/pom.xml create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/CHANGELOG.md create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/README.md create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/assets.json create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/checkstyle-suppressions.xml create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/pom.xml create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/spotbugs-exclude.xml create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/AzureHealthInsightsServiceVersion.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingAsyncClient.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingClient.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientBuilder.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/CancerProfilingClientImpl.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/OperationLocationPollingStrategy.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/PollingUtils.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/SyncOperationLocationPollingStrategy.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/package-info.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalCodedElement.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalDocumentType.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalNoteEvidence.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentContent.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentContentSourceType.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentType.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/InferenceEvidence.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/JobStatus.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeData.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeInference.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeInferenceType.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeModelConfiguration.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypePatientResult.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeResult.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeResults.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientDocument.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientInfo.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientInfoSex.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientRecord.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/package-info.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/package-info.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/module-info.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/resources/META-INF/azure-health-insights-cancerprofiling_apiview_properties.json create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/resources/azure-health-insights-cancerprofiling.properties create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/README.md create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/java/com/azure/health/insights/cancerprofiling/SampleInferCancerProfile.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientTest.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientTestBase.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/generated/CancerProfilingClientTestBase.java create mode 100644 sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/resources/CancerProfilingClientTest.request.json create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/CHANGELOG.md create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/README.md create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/assets.json create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/checkstyle-suppressions.xml create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/pom.xml create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/spotbugs-exclude.xml create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/AzureHealthInsightsServiceVersion.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingAsyncClient.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClient.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientBuilder.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/ClinicalMatchingClientImpl.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/OperationLocationPollingStrategy.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/PollingUtils.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/SyncOperationLocationPollingStrategy.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/package-info.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AcceptedAge.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AcceptedAgeRange.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AgeUnit.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AreaGeometry.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AreaProperties.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalCodedElement.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalDocumentType.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalNoteEvidence.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialAcceptedSex.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialDemographics.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialDetails.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialMetadata.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialPhase.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialPurpose.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialRecruitmentStatus.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialRegistryFilter.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialResearchFacility.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialSource.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialStudyType.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrials.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ContactDetails.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentContent.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentContentSourceType.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentType.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ExtendedClinicalCodedElement.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonGeometryType.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonPropertiesSubType.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonType.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeographicArea.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeographicLocation.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/JobStatus.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientDocument.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientInfo.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientInfoSex.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientRecord.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherData.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInference.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInferenceEvidence.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInferenceType.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherModelConfiguration.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherPatientResult.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherResult.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherResults.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/package-info.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/package-info.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/module-info.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/resources/META-INF/azure-health-insights-clinicalmatching_apiview_properties.json create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/resources/azure-health-insights-clinicalmatching.properties create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples/README.md create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples/java/com/azure/health/insights/clinicalmatching/SampleMatchTrialAsync.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientTest.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientTestBase.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/generated/ClinicalMatchingClientTestBase.java create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/resources/ClinicalMatchingClientTest.request.json create mode 100644 sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/resources/Sample_MatchTrial_PatientFhir.json create mode 100644 sdk/logz/azure-resourcemanager-logz/CHANGELOG.md create mode 100644 sdk/logz/azure-resourcemanager-logz/README.md create mode 100644 sdk/logz/azure-resourcemanager-logz/SAMPLE.md create mode 100644 sdk/logz/azure-resourcemanager-logz/pom.xml create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/LogzManager.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MicrosoftLogz.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorOperationsClient.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorsClient.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/OperationsClient.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SingleSignOnsClient.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountTagRulesClient.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountsClient.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/TagRulesClient.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzMonitorResourceInner.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzSingleSignOnResourceInner.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoredResourceInner.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoringTagRulesInner.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/OperationResultInner.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/UserRoleResponseInner.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMExtensionPayloadInner.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMResourcesInner.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/package-info.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/package-info.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzMonitorResourceImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzSingleSignOnResourceImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzBuilder.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsClientImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoredResourceImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoringTagRulesImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsClientImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationResultImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsClientImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/ResourceManagerUtils.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsClientImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesClientImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsClientImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesClientImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/UserRoleResponseImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMExtensionPayloadImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMResourcesImpl.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/package-info.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/FilteringTag.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/IdentityProperties.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LiftrResourceCategories.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogRules.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResource.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceListResponse.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceUpdateParameters.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzOrganizationProperties.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnProperties.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResource.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResourceListResponse.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ManagedIdentityTypes.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MarketplaceSubscriptionStatus.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorOperations.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorProperties.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorUpdateProperties.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResource.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResourceListResponse.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringStatus.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRules.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesListResponse.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesProperties.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Monitors.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationDisplay.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationListResult.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationResult.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Operations.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/PlanData.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ProvisioningState.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOnStates.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOns.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRules.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteHeaders.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteResponse.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccounts.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagAction.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRules.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteHeaders.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteResponse.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserInfo.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRole.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleListResponse.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleRequest.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleResponse.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMExtensionPayload.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateRequest.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateStates.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResources.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResourcesListResponse.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/package-info.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/package-info.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/java/module-info.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/proxy-config.json create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/reflect-config.json create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVMHostsSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVmHostUpdateSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationVMHostPayloadSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsCreateSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsUpdateSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/OperationsListSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnCreateOrUpdateSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnGetSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnListSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountCreateSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountDeleteSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountGetSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListMonitoredResourcesSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVMHostsSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVmHostUpdateSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountUpdateSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountVMHostPayloadSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesGetSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesListSamples.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/FilteringTagTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/IdentityPropertiesTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogRulesTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceInnerTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceListResponseTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceUpdateParametersTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzOrganizationPropertiesTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnPropertiesTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceInnerTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceListResponseTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVMHostsMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVmHostUpdateMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorPropertiesTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorUpdatePropertiesTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceInnerTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceListResponseTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesInnerTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesListResponseTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesPropertiesTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsCreateMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationDisplayTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationListResultTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationResultInnerTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationsListMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/PlanDataTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsCreateOrUpdateMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsGetWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsListMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsCreateMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsDeleteMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsGetWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMonitoredResourcesMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVMHostsMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVmHostUpdateMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsUpdateWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesGetWithResponseMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesListMockTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserInfoTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleListResponseTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleRequestTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleResponseInnerTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMHostUpdateRequestTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesInnerTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesListResponseTests.java create mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker create mode 100644 sdk/logz/ci.yml create mode 100644 sdk/logz/cspell.yml create mode 100644 sdk/logz/pom.xml create mode 100644 sdk/maps/azure-maps-traffic/CHANGELOG.md create mode 100644 sdk/maps/azure-maps-traffic/README.md create mode 100644 sdk/maps/azure-maps-traffic/assets.json create mode 100644 sdk/maps/azure-maps-traffic/checkstyle-suppressions.xml create mode 100644 sdk/maps/azure-maps-traffic/ci.yml create mode 100644 sdk/maps/azure-maps-traffic/pom.xml create mode 100644 sdk/maps/azure-maps-traffic/spotbugs-exclude.xml create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficAsyncClient.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficClient.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficClientBuilder.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficServiceVersion.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficClientImpl.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficClientImplBuilder.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficsImpl.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/helpers/Utility.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/helpers/package-info.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorAdditionalInfo.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorDetail.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorResponse.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorResponseException.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/LatLongPair.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ResponseFormat.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficFlowSegmentDataFlowSegmentData.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficIncidentDetailTm.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficsGetTrafficFlowTileHeaders.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficsGetTrafficIncidentTileHeaders.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/package-info.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/package-info.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/DelayMagnitude.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IconCategory.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IncidentDetailStyle.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IncidentGeometryType.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/MapsPoint.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/ProjectionStandard.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/SpeedUnit.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TileFormat.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TileIndex.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentData.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentDataPropertiesCoordinates.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentOptions.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentStyle.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowTileOptions.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowTileStyle.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentDetail.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentDetailOptions.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentPointOfInterest.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentTileOptions.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentTileStyle.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewport.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewportOptions.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewportResponse.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficState.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/package-info.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/package-info.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/java/module-info.java create mode 100644 sdk/maps/azure-maps-traffic/src/main/resources/azure-maps-traffic.properties create mode 100644 sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficFlowSegment.java create mode 100644 sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficFlowTile.java create mode 100644 sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentDetail.java create mode 100644 sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentTile.java create mode 100644 sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentViewport.java create mode 100644 sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/TrafficSample.java create mode 100644 sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TestUtils.java create mode 100644 sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficAsyncClientTest.java create mode 100644 sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientBuilderTest.java create mode 100644 sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientTest.java create mode 100644 sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientTestBase.java create mode 100644 sdk/maps/azure-maps-traffic/src/test/resources/trafficflowsegment.json create mode 100644 sdk/maps/azure-maps-traffic/src/test/resources/trafficincidentdetail.json create mode 100644 sdk/maps/azure-maps-traffic/src/test/resources/trafficincidentviewport.json create mode 100644 sdk/maps/azure-maps-traffic/swagger/README.md create mode 100644 sdk/maps/azure-maps-traffic/swagger/pom.xml create mode 100644 sdk/maps/azure-maps-traffic/swagger/src/main/java/TrafficCustomization.java create mode 100644 sdk/maps/azure-maps-traffic/tests.yml create mode 100644 sdk/mixedreality/cspell.yml create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/MobileNetworkManager.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/AttachedDataNetworksClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DataNetworksClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DiagnosticsPackagesClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/ExtendedUeInformationsClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworkManagementClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworksClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/OperationsClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCapturesClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneVersionsClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlanesClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreDataPlanesClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/RoutingInfoesClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/ServicesClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimGroupsClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimPoliciesClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimsClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SitesClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SlicesClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/UeInformationsClient.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AsyncOperationStatusInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AttachedDataNetworkInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AttachedDataNetworkPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DataNetworkInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DataNetworkPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackageInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackagePropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/EncryptedSimPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ExtendedUeInfoInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/MobileNetworkInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/MobileNetworkPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/OperationInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCaptureInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCapturePropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlanePropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneVersionInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneVersionPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreDataPlaneInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreDataPlanePropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/RoutingInfoModelInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/RoutingInfoPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ServiceInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ServicePropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimGroupInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimGroupPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SiteInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SitePropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SliceInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SlicePropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/UeInfoInner.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/package-info.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/package-info.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AsyncOperationStatusImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworkImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworkImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackageImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInfoImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInformationsClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInformationsImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientBuilder.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationsClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationsImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCaptureImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlaneImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ResourceManagerUtils.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoModelImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoesClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoesImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServiceImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPolicyImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SiteImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SliceImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInfoImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInformationsClientImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInformationsImpl.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/package-info.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ambr.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AmfId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AsyncOperationId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AsyncOperationStatus.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetwork.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworkListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworkResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworks.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AuthenticationType.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AzureStackEdgeDeviceResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AzureStackHciClusterResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/BillingSku.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioning.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioningState.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CommonSimPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ConnectedClusterResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CoreNetworkType.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CustomLocationResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetwork.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworks.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DesiredInstallationState.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackage.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageStatus.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackages.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsUploadConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DnnIpPair.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/EncryptedSimUploadList.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/EventHubConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInfo.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInfoProperties.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInformations.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/GNbId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/GlobalRanNodeId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Guti4G.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Guti5G.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPrivateKeysProvisioning.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPrivateKeysProvisioningState.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPublicKey.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HttpsServerCertificate.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/IdentityAndTagsObject.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Installation.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationReason.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationState.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InterfaceProperties.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ipv4Route.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ipv4RouteNextHop.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/KeyVaultKey.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/LocalDiagnosticsAccessConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentity.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentityType.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MmeId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetwork.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworkListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworkResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworks.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NaptConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NaptEnabled.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NasEncryptionType.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NasRerouteConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ObsoleteVersion.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Operation.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/OperationDisplay.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/OperationList.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Operations.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCapture.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureStatus.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptures.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlane.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneCollectDiagnosticsPackage.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersion.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersionListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersions.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlanes.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlane.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlaneListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlanes.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PccRuleConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PccRuleQosPolicy.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PdnType.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PduSessionType.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PinholeTimeouts.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Platform.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformType.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlmnId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PortRange.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PortReuseHoldTimes.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionCapability.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionVulnerability.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ProvisioningState.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PublicLandMobileNetwork.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PublicLandMobileNetworkHomeNetworkPublicKeys.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/QosPolicy.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RatType.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RecommendedVersion.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ReinstallRequired.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoModel.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoes.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RrcEstablishmentCause.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SdfDirection.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Service.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceDataFlowTemplate.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Services.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SignalingConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sim.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimClone.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimDeleteList.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroup.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroupListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroupResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroups.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimMove.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimNameAndEncryptedProperties.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimNameAndProperties.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicies.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicy.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicyListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicyResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimState.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimStaticIpProperties.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimStaticIpPropertiesStaticIp.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimUploadList.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sims.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Site.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteDeletePacketCore.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteProvisioningState.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sites.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Slice.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceListResult.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceResourceId.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Slices.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Snssai.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/TagsObject.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/TrafficControlPermission.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeConnectionInfo4G.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeConnectionInfo5G.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo4G.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo4GProperties.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo5G.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo5GProperties.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfoList.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfoPropertiesFormat.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInformations.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeIpAddress.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeLocationInfo.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeQosFlow.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeSessionInfo4G.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeSessionInfo5G.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeState.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeUsageSetting.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserAssignedIdentity.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserConsentConfiguration.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserPlaneDataRoutesItem.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/VersionState.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/package-info.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/package-info.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/module-info.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mobilenetwork/proxy-config.json create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mobilenetwork/reflect-config.json create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInformationGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksGetByResourceGroupSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListByResourceGroupSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSimGroupsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesStopSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesGetByResourceGroupSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListByResourceGroupSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoListSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsGetByResourceGroupSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListByResourceGroupSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCloneSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsListByGroupSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsMoveSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesUpdateTagsSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/UeInformationListSamples.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AmbrTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AmfIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AsyncOperationIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkPropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AzureStackEdgeDeviceResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AzureStackHciClusterResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/CertificateProvisioningTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ConnectedClusterResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/CustomLocationResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkPropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackageInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackageListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagePropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsUploadConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DnnIpPairTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/EventHubConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInfoInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInfoPropertiesTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInformationsGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/GNbIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/GlobalRanNodeIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Guti5GTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HomeNetworkPrivateKeysProvisioningTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HomeNetworkPublicKeyTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HttpsServerCertificateTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/IdentityAndTagsObjectTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/InstallationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/InterfacePropertiesTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Ipv4RouteNextHopTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Ipv4RouteTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/LocalDiagnosticsAccessConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ManagedServiceIdentityTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworkResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/NaptConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/NasRerouteConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationDisplayTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationListTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCaptureInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCaptureListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturePropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneCollectDiagnosticsPackageTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionPropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlaneInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlaneListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanePropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PccRuleConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PccRuleQosPolicyTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PinholeTimeoutsTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlatformConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlatformTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlmnIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PortRangeTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PortReuseHoldTimesTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PublicLandMobileNetworkHomeNetworkPublicKeysTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/QosPolicyTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoModelInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoPropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoesGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoesListMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceDataFlowTemplateTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicePropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SignalingConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimCloneTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimDeleteListTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimMoveTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyPropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimStaticIpPropertiesStaticIpTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimStaticIpPropertiesTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteDeletePacketCoreTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitePropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceListResultTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicePropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceResourceIdTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetWithResponseMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SnssaiTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/TagsObjectTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeConnectionInfo4GTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeConnectionInfo5GTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfo5GPropertiesTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfo5GTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoInnerTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoListTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoPropertiesFormatTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInformationsListMockTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeIpAddressTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeLocationInfoTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeQosFlowTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeSessionInfo4GTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeSessionInfo5GTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserAssignedIdentityTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserConsentConfigurationTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserPlaneDataRoutesItemTests.java create mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker create mode 100644 sdk/mobilenetwork/ci.yml create mode 100644 sdk/mobilenetwork/cspell.yml create mode 100644 sdk/mobilenetwork/pom.xml create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/CHANGELOG.md create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/README.md create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/assets.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/build.ps1 create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/checkstyle-suppressions.xml create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/pom.xml create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/spotbugs-exclude.xml create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/DtmiConventions.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelDependencyResolution.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryAsyncClient.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryClient.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryClientBuilder.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryServiceVersion.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/FileModelFetcher.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/HttpModelFetcher.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/IntermediateFetchModelResult.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelFetcher.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsQuery.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryAPIImpl.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryAPIImplBuilder.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryConstants.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryImpl.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/RepositoryHandler.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/StatusStrings.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/FetchMetadataResult.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/FetchModelResult.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/ModelMetadata.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/ModelsRepositoryMetadata.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/RepositoryFeatures.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/package-info.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/package-info.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/package-info.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/module-info.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/main/resources/azure-iot-modelsrepository.properties create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/README.md create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/DtmiConventionsSamples.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/Main.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/ModelResolutionSamples.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/base-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/base-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/building-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/camera-3.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/coldstorage-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/conferenceroom-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/danglingexpanded-1.expanded.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/freezer-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/incompleteexpanded-1.expanded.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/invalidmodel-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/invalidmodel-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/phone-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/room-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.expanded.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/thermostat-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/company/demodevice-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/company/demodevice-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/badfilepath-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/emptyarray-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/namespaceconflict-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/nondtdl-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/unsupportedrootarray-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/DtmiConventionTests.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelQueryTests.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelRepositoryIntegrationTests.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelsRepositoryTestBase.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/TestHelper.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/TestsAssetsHelpers.java create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/base-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/base-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/building-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/camera-3.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/coldstorage-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/conferenceroom-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/danglingexpanded-1.expanded.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/freezer-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/incompleteexpanded-1.expanded.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/invalidmodel-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/invalidmodel-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/phone-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/room-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.expanded.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/thermostat-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/company/demodevice-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/company/demodevice-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/badfilepath-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/emptyarray-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/namespaceconflict-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/nondtdl-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/unsupportedrootarray-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/azure/devicemanagement/deviceinformation-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/azure/devicemanagement/deviceinformation-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/base-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/base-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/building-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/camera-3.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/coldstorage-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/conferenceroom-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/danglingexpanded-1.expanded.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/freezer-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/incompleteexpanded-1.expanded.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/invalidmodel-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/invalidmodel-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/phone-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/room-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/temperaturecontroller-1.expanded.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/temperaturecontroller-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/thermostat-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/company/demodevice-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/company/demodevice-2.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/badfilepath-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/emptyarray-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/namespaceconflict-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/nondtdl-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/unsupportedrootarray-1.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/metadata.json create mode 100644 sdk/modelsrepository/azure-iot-modelsrepository/update-recorded-sessions.ps1 create mode 100644 sdk/modelsrepository/ci.yml create mode 100644 sdk/modelsrepository/cspell.yml create mode 100644 sdk/modelsrepository/pom.xml create mode 100644 sdk/modelsrepository/tests.yml create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/CHANGELOG.md create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/README.md create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/NetworkAnalyticsManager.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsCatalogsClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataTypesClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsMgmtClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/AccountSasTokenInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ContainerSasTokenInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductsCatalogInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataTypeInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ListRoleAssignmentsInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/RoleAssignmentDetailInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/AccountSasTokenImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ContainerSasTokenImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypeImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ListRoleAssignmentsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsMgmtClientBuilder.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsMgmtClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ResourceManagerUtils.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/RoleAssignmentDetailImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AccountSas.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AccountSasToken.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ActionType.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ConsumptionEndpointsProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ContainerSaS.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ContainerSasToken.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ControlState.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProduct.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductInformation.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductListResult.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductNetworkAcls.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUpdate.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUpdateProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUserRole.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductVersion.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProducts.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalog.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogListResult.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogs.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataType.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeListResult.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeState.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeUpdate.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeUpdateProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypes.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DefaultAction.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/EncryptionKeyDetails.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/IpRules.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KeyVaultInfo.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ListRoleAssignments.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedResourceGroupConfiguration.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedServiceIdentity.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedServiceIdentityType.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operation.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationDisplay.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationListResult.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operations.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Origin.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ProvisioningState.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PublisherInformation.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RoleAssignmentCommonProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RoleAssignmentDetail.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/UserAssignedIdentity.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkRule.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/module-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkanalytics/proxy-config.json create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkanalytics/reflect-config.json create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsAddUserRoleSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsGetByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCreateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsDeleteSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsGenerateStorageAccountSasTokenSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsGetByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListRolesAssignmentsSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRemoveUserRoleSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRotateKeySamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsUpdateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesCreateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesDeleteDataSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesDeleteSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGenerateStorageContainerSasTokenSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGetSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesListByDataProductSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesUpdateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/AccountSasTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ConsumptionEndpointsPropertiesTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ContainerSaSTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductInformationTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductNetworkAclsTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductUpdatePropertiesTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductUpdateTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductVersionTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsAddUserRoleWithResponseMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogInnerTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogListResultTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogPropertiesTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsGetByResourceGroupWithResponseMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListByResourceGroupMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListRolesAssignmentsWithResponseMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRemoveUserRoleWithResponseMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeInnerTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeListResultTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypePropertiesTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeUpdatePropertiesTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeUpdateTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesCreateMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGetWithResponseMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesListByDataProductMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/IpRulesTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ListRoleAssignmentsInnerTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ManagedResourceGroupConfigurationTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ManagedServiceIdentityTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationDisplayTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationInnerTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationListResultTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListMockTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/PublisherInformationTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/RoleAssignmentCommonPropertiesTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/RoleAssignmentDetailInnerTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/UserAssignedIdentityTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/VirtualNetworkRuleTests.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker create mode 100644 sdk/networkanalytics/ci.yml create mode 100644 sdk/networkanalytics/cspell.yml create mode 100644 sdk/networkanalytics/pom.xml create mode 100644 sdk/networkanalytics/test-resources.bicep create mode 100644 sdk/purview/azure-analytics-purview-administration/CHANGELOG.md create mode 100644 sdk/purview/azure-analytics-purview-administration/README.md create mode 100644 sdk/purview/azure-analytics-purview-administration/assets.json create mode 100644 sdk/purview/azure-analytics-purview-administration/checkstyle-suppressions.xml create mode 100644 sdk/purview/azure-analytics-purview-administration/pom.xml create mode 100644 sdk/purview/azure-analytics-purview-administration/spotbugs-exclude.xml create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/PurviewAccountServiceVersion.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/PurviewMetadataServiceVersion.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesClient.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/AccountsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/CollectionsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/MetadataPoliciesImpl.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/MetadataRolesImpl.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/PurviewAccountClientImpl.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/PurviewMetadataClientImpl.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/ResourceSetRulesImpl.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/package-info.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/package-info.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/java/module-info.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/main/resources/azure-analytics-purview-administration.properties create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/GetAccount.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/ReadmeSamples.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsGetAccessKeys.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsGetAccountProperties.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsRegenerateKeys.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsUpdateAccountProperties.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsCreateOrUpdateCollection.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsDeleteCollection.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollection.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionPath.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsListChildCollectionNames.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsListCollections.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyGet.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyListAll.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataRolesList.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesCreateOrUpdateResourceSetRule.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesDeleteResourceSetRule.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesGetResourceSetRule.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesListResourceSetRules.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/AccountsClientTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/CollectionsClientTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/MetadataPolicyClientTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/PurviewAccountClientTestBase.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsGetAccessKeysTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsGetAccountPropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsRegenerateKeysTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsUpdateAccountPropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsCreateOrUpdateCollectionTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsDeleteCollectionTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionPathTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsListChildCollectionNamesTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsListCollectionsTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyGetTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyListAllTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyUpdateTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataRolesListTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/PurviewAccountClientTestBase.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/PurviewMetadataClientTestBase.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesCreateOrUpdateResourceSetRuleTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesDeleteResourceSetRuleTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesGetResourceSetRuleTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesListResourceSetRulesTests.java create mode 100644 sdk/purview/azure-analytics-purview-administration/swagger/README.md create mode 100644 sdk/purview/azure-analytics-purview-scanning/CHANGELOG.md create mode 100644 sdk/purview/azure-analytics-purview-scanning/README.md create mode 100644 sdk/purview/azure-analytics-purview-scanning/assets.json create mode 100644 sdk/purview/azure-analytics-purview-scanning/checkstyle-suppressions.xml create mode 100644 sdk/purview/azure-analytics-purview-scanning/pom.xml create mode 100644 sdk/purview/azure-analytics-purview-scanning/spotbugs-exclude.xml create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ClassificationRulesAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ClassificationRulesClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/DataSourcesAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/DataSourcesClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/FiltersAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/FiltersClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/KeyVaultConnectionsAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/KeyVaultConnectionsClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/PurviewScanningClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/PurviewScanningServiceVersion.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanResultAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanResultClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanRulesetsAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanRulesetsClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScansAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScansClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/SystemScanRulesetsAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/SystemScanRulesetsClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/TriggersAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/TriggersClient.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ClassificationRulesImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/DataSourcesImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/FiltersImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/KeyVaultConnectionsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/PurviewScanningClientImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScanResultsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScanRulesetsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScansImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/SystemScanRulesetsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/TriggersImpl.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/package-info.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/package-info.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/java/module-info.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/main/resources/azure-analytics-purview-scanning.properties create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/README.md create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/ListAllSystemScanRulesets.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/ReadmeSamples.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesCreateOrUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesDelete.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesGet.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesListAll.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesListVersionsByClassificationRuleName.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesTagClassificationVersion.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesCreateOrUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesDelete.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesGet.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesListAll.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/FiltersCreateOrUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/FiltersGet.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsCreate.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsDelete.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsGet.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsListAll.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultCancelScan.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultListScanHistory.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultRunScan.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsCreateOrUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsDelete.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsGet.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsListAll.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansCreateOrUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansDelete.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansGet.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansListByDataSource.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGet.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGetByVersion.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGetLatest.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsListAll.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsListVersionsByDataSource.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersCreateTrigger.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersDeleteTrigger.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersGetTrigger.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/test/java/com/azure/analytics/purview/scanning/PurviewScanningClientTestBase.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/src/test/java/com/azure/analytics/purview/scanning/SystemScanRulesetsClientTests.java create mode 100644 sdk/purview/azure-analytics-purview-scanning/swagger/README.md create mode 100644 sdk/purview/azure-analytics-purview-sharing/CHANGELOG.md create mode 100644 sdk/purview/azure-analytics-purview-sharing/README.md create mode 100644 sdk/purview/azure-analytics-purview-sharing/assets.json create mode 100644 sdk/purview/azure-analytics-purview-sharing/checkstyle-suppressions.xml create mode 100644 sdk/purview/azure-analytics-purview-sharing/pom.xml create mode 100644 sdk/purview/azure-analytics-purview-sharing/spotbugs-exclude.xml create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/PurviewShareServiceVersion.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesClient.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesClient.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesClient.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/PurviewShareClientImpl.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/ReceivedSharesImpl.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/SentSharesImpl.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/ShareResourcesImpl.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/package-info.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/package-info.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/java/module-info.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/main/resources/azure-analytics-purview-sharing.properties create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/README.md create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/ReadmeSamples.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistration.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplace.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2Account.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccount.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDelete.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGet.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2Account.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccount.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttached.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetached.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistration.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplace.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2Account.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccount.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDelete.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGet.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2Account.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccount.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesList.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesListInvitations.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesNotifyUserInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ShareResourcesList.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSink.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSinkProperties.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2Artifact.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2ArtifactProperties.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/Artifact.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobAccountSink.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobAccountSinkProperties.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifact.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifactProperties.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShare.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShareProperties.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceSentShare.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceSentShareProperties.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InvitationKind.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/OperationResponse.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/OperationStatus.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ProxyResource.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareError.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorException.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorInfo.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedShare.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedShareList.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedSharesCreateOrReplaceReceivedShareHeaders.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedSharesDeleteReceivedShareHeaders.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReferenceNameType.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShare.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareInvitationList.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareList.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesCreateOrReplaceSentShareHeaders.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesDeleteSentShareHeaders.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesDeleteSentShareInvitationHeaders.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ServiceInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ServiceInvitationProperties.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareKind.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareResource.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareResourceList.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareStatus.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/Sink.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/State.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StorageAccountPath.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StoreKind.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StoreReference.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistration.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationProperties.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationStatus.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/UserInvitation.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/UserInvitationProperties.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/package-info.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/PurviewShareTestBase.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/ReceivedShareClientTest.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/SentShareClientTest.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/ShareResourceClientTest.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2AccountSinkPropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2AccountSinkTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2ArtifactPropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2ArtifactTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ArtifactTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobAccountSinkPropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobAccountSinkTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobStorageArtifactPropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobStorageArtifactTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceReceivedSharePropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceReceivedShareTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceSentSharePropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceSentShareTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ProxyResourceTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/PurviewShareClientTestBase.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedShareListTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedShareTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistrationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2AccountTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccountTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDeleteTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2AccountTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccountTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttachedTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetachedTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistrationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareInvitationListTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareListTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2AccountTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccountTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2AccountTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccountTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesListInvitationsTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesListTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesNotifyUserInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ServiceInvitationPropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ServiceInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourceListTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourceTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourcesListTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SinkTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/StorageAccountPathTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/StoreReferenceTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/UserInvitationPropertiesTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/UserInvitationTests.java create mode 100644 sdk/purview/azure-analytics-purview-sharing/swagger/README.md create mode 100644 sdk/purview/azure-analytics-purview-workflow/CHANGELOG.md create mode 100644 sdk/purview/azure-analytics-purview-workflow/README.md create mode 100644 sdk/purview/azure-analytics-purview-workflow/assets.json create mode 100644 sdk/purview/azure-analytics-purview-workflow/checkstyle-suppressions.xml create mode 100644 sdk/purview/azure-analytics-purview-workflow/pom.xml create mode 100644 sdk/purview/azure-analytics-purview-workflow/spotbugs-exclude.xml create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/PurviewWorkflowServiceVersion.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsAsyncClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsClient.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsClientBuilder.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/ApprovalsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/PurviewWorkflowClientImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/TaskStatusImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/UserRequestsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowRunsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowRunsOperationsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowTasksImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowTasksOperationsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowsOperationsImpl.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/package-info.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/package-info.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/java/module-info.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/main/resources/azure-analytics-purview-workflow.properties create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/ReadmeSamples.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/ApprovalApprove.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/ApprovalReject.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/TaskRequestUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/UserRequestsSubmit.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkTaskGet.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowCreateOrUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowDelete.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowGet.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunCancel.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunGet.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunsList.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowTaskReassign.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowTasksList.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowsList.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/ApprovalApproveTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/ApprovalRejectTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/PurviewWorkflowClientTestBase.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/TaskRequestUpdateTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/UserRequestsSubmitTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkTaskGetTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowCreateOrUpdateTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowDeleteTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowGetTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunCancelTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunGetTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunsListTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowTaskReassignTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowTasksListTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowsListTests.java create mode 100644 sdk/purview/azure-analytics-purview-workflow/swagger/README.md create mode 100644 sdk/quantum/azure-quantum-jobs/CHANGELOG.md create mode 100644 sdk/quantum/azure-quantum-jobs/README.md create mode 100644 sdk/quantum/azure-quantum-jobs/assets.json create mode 100644 sdk/quantum/azure-quantum-jobs/checkstyle-suppressions.xml create mode 100644 sdk/quantum/azure-quantum-jobs/pom.xml create mode 100644 sdk/quantum/azure-quantum-jobs/spotbugs-exclude.xml create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/JobsAsyncClient.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/JobsClient.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/ProvidersAsyncClient.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/ProvidersClient.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuantumClientBuilder.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuotasAsyncClient.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuotasClient.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/StorageAsyncClient.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/StorageClient.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/JobsImpl.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/ProvidersImpl.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/QuantumClientImpl.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/QuotasImpl.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/StoragesImpl.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/package-info.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/BlobDetails.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/DimensionScope.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ErrorData.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobDetails.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobDetailsList.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobStatus.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/MeterPeriod.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderAvailability.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderStatus.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderStatusList.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/Quota.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/QuotaList.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/RestError.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/RestErrorException.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/SasUriResponse.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/TargetAvailability.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/TargetStatus.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/package-info.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/package-info.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/java/module-info.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/main/resources/azure-quantum-jobs.properties create mode 100644 sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/BellState.bc create mode 100644 sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/BellState.qs create mode 100644 sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/ReadmeSamples.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/BellState.bc create mode 100644 sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/BellState.qs create mode 100644 sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/JobsClientTest.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/ProviderClientTest.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/QuantumClientTestBase.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/QuotasClientTest.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/StorageClientTest.java create mode 100644 sdk/quantum/azure-quantum-jobs/src/test/resources/problem.json delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConfigurationsClient.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConnectionTestsClient.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConfigurationInner.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConnectionTestResponseInner.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/ContextCacheCheckNameAvailabilityResultInner.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/BlobAccessPointConfigurationsClientImpl.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/BlobAccessPointConnectionTestsClientImpl.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/models/BlobAccessPointConfigurationListResult.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthPropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourceProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourceProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourcePropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationConnection.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationPropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationState.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionPropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestRequest.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestStatus.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionType.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourceProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourcePropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionPropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourceProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourcePropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourceProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourcePropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourceProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourcePropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionPropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkIdType.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointProposedConnectionTestRequest.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourceProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourcePropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthPropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthType.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceProperties.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourcePropertiesUpdate.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceType.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointTlsVerification.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityFailureReason.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityParameters.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/TurboTier.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/TurboTierStatus.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsCreateSamples.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsDeleteSamples.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsGetSamples.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsListByStorageAccountSamples.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsTestExistingConnectionSamples.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsUpdateSamples.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConnectionTestsTestProposedConnectionSamples.java delete mode 100644 sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesCheckNameAvailabilitySamples.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/CHANGELOG.md create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/README.md create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/checkstyle-suppressions.xml create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/spotbugs-exclude.xml create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/AccessControlClientBuilder.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleAssignmentsAsyncClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleAssignmentsClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleDefinitionsAsyncClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleDefinitionsClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/AccessControlClientImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/RoleAssignmentsImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/RoleDefinitionsImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckAccessDecision.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckPrincipalAccessRequest.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckPrincipalAccessResponse.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorAdditionalInfo.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorContract.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorContractException.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorResponse.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RequiredAction.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentDetails.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentDetailsList.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentRequest.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentsListRoleAssignmentsHeaders.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SubjectInfo.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SynapseRbacPermission.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SynapseRoleDefinition.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/module-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/resources/azure-analytics-synapse-accesscontrol.properties create mode 100644 sdk/synapse/azure-analytics-synapse-accesscontrol/swagger/README.md create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/CHANGELOG.md create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/README.md create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/checkstyle-suppressions.xml create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/spotbugs-exclude.xml create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsAsyncClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsClientBuilder.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/ManagedPrivateEndpointsClientImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/ManagedPrivateEndpointsImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpoint.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointConnectionState.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointListResponse.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointProperties.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/module-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-managedprivateendpoints/swagger/README.md create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/CHANGELOG.md create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/README.md create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/checkstyle-suppressions.xml create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/pom.xml create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/spotbugs-exclude.xml create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringAsyncClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringClientBuilder.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/MonitoringClientImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/MonitoringsImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SparkJob.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SparkJobListViewResponse.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SqlQueryStringDataModel.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/module-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-monitoring/swagger/README.md create mode 100644 sdk/synapse/azure-analytics-synapse-spark/CHANGELOG.md create mode 100644 sdk/synapse/azure-analytics-synapse-spark/README.md create mode 100644 sdk/synapse/azure-analytics-synapse-spark/assets.json create mode 100644 sdk/synapse/azure-analytics-synapse-spark/checkstyle-suppressions.xml create mode 100644 sdk/synapse/azure-analytics-synapse-spark/pom.xml create mode 100644 sdk/synapse/azure-analytics-synapse-spark/spotbugs-exclude.xml create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkBatchAsyncClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkBatchClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkClientBuilder.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkSessionAsyncClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkSessionClient.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkBatchesImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkClientImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkSessionsImpl.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/LivyStatementStates.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/LivyStates.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/PluginCurrentState.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SchedulerCurrentState.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJob.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobCollection.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobOptions.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobResultType.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobState.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkErrorSource.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkJobType.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkRequest.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkScheduler.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkServiceError.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkServicePlugin.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSession.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionCollection.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionOptions.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionResultType.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionState.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatement.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementCancellationResult.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementCollection.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementLanguageType.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementOptions.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementOutput.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/package-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/java/module-info.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/main/resources/azure-analytics-synapse-spark.properties create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/samples/java/com/azure/analytics/synapse/spark/HelloWorld.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/samples/java/com/azure/analytics/synapse/spark/HelloWorldAsync.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkBatchClientTest.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkClientTestBase.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkSessionClientTest.java create mode 100644 sdk/synapse/azure-analytics-synapse-spark/swagger/README.md delete mode 100644 sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/AzureExtensionResourceType.java create mode 100644 sdk/translation/azure-ai-documenttranslator/CHANGELOG.md create mode 100644 sdk/translation/azure-ai-documenttranslator/README.md create mode 100644 sdk/translation/azure-ai-documenttranslator/assets.json create mode 100644 sdk/translation/azure-ai-documenttranslator/checkstyle-suppressions.xml create mode 100644 sdk/translation/azure-ai-documenttranslator/pom.xml create mode 100644 sdk/translation/azure-ai-documenttranslator/spotbugs-exclude.xml create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationAsyncClient.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClient.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClientBuilder.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationServiceVersion.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/BatchDocumentTranslationClientImpl.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/DocumentTranslationsImpl.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/package-info.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/package-info.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/java/module-info.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/main/resources/azure-ai-documenttranslator.properties create mode 100644 sdk/translation/azure-ai-documenttranslator/src/samples/README.md create mode 100644 sdk/translation/azure-ai-documenttranslator/src/samples/java/com/azure/ai/documenttranslator/ReadmeSamples.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/samples/java/com/azure/ai/documenttranslator/TranslateDocuments.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/test/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClientTestBase.java create mode 100644 sdk/translation/azure-ai-documenttranslator/src/test/java/com/azure/ai/documenttranslator/BatchDocumentTranslationRestClientTests.java create mode 100644 sdk/translation/azure-ai-documenttranslator/swagger/README.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2748ad447193..5c4f42876bda 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -180,6 +180,9 @@ # AzureSdkOwners: @alzimmermsft @jonathangiles @vcolin7 # ServiceLabel: %clientcore +# PRLabel: %Cognitive - Anomaly Detector +/sdk/anomalydetector/ @mengaims @Azure/azure-java-sdk + # ServiceLabel: %Cognitive - Anomaly Detector # ServiceOwners: @bowgong @yingqunpku @@ -225,6 +228,9 @@ # PRLabel: %Communication - Call Automation /sdk/communication/azure-communication-callautomation/ @fhaghbin-msft @juntuchen-msft @minwoolee-msft @v-dharmarajv @Azure/azure-java-sdk +# PRLabel: %Communication - Calling Server +/sdk/communication/azure-communication-callingserver/ @minwoolee-msft @Azure/azure-java-sdk + # PRLabel: %Communication - Chat /sdk/communication/azure-communication-chat/ @ankitarorabit @Azure/azure-sdk-communication-code-reviewers @minnieliu @Azure/azure-java-sdk @@ -360,6 +366,9 @@ # ServiceLabel: %Load Testing # AzureSdkOwners: @Harshan01 @mitsha-microsoft @ninallam @prativen +# PRLabel: %Models Repository +/sdk/modelsrepository/ @abhipsaMisra @andyk-ms @brycewang-microsoft @digimaun @timtay-microsoft @Azure/azure-java-sdk + # PRLabel: %Monitor /sdk/monitor/azure-monitor-ingestion*/ @Azure/azure-sdk-write-monitor-data-plane @jairmyree @Azure/azure-java-sdk diff --git a/common/perf-test-core/pom.xml b/common/perf-test-core/pom.xml index 1cb0e1a1c466..fe4afb60e18d 100644 --- a/common/perf-test-core/pom.xml +++ b/common/perf-test-core/pom.xml @@ -56,7 +56,7 @@ com.beust:jcommander:[1.82] io.vertx:vertx-codegen:[4.5.32] - io.projectreactor:reactor-core:[3.8.7] + io.projectreactor:reactor-core:[3.7.19] diff --git a/docs/contributor/building.md b/docs/contributor/building.md index e62ca997407f..e443dbd588a3 100644 --- a/docs/contributor/building.md +++ b/docs/contributor/building.md @@ -47,26 +47,6 @@ mvn install -f sdk/appconfiguration/pom.xml -Dgpg.skip -Drevapi.skip -DskipTests Remove `-DskipTests` from the build commands above. Remove `-Djacoco.skip` as well if you want coverage reports. Spring integration tests have a separate switch, `-DskipSpringITs=false`, and require their own test setup. -### Test-only Java module dependencies - -On JDK 9 and later, tests run as part of their library's named module. When tests directly use classes -from a dependency that the production module does not read, add a narrow `--add-reads` option to the -package's `javaModulesSurefireArgLine` property. Failsafe inherits this property through -`javaModulesFailsafeArgLine`. - -For example, tests using Netty's `HttpResponseStatus` need to read the explicit `io.netty.codec.http` -module in Netty 4.2: - -```xml - - --add-reads com.azure.ai.documentintelligence=io.netty.codec.http - -``` - -Keep these test-only reads out of production `module-info.java` descriptors. Preserve any existing -options in the property, and add reads for each module directly used by the tests. These options are -only applied by the Java 9+ build profile and do not affect Java 8 test runs. - ### Build selected client libraries Select libraries from the root reactor by their Maven coordinates. For example, build App Configuration diff --git a/eng/common/pipelines/live-eval.yml b/eng/common/pipelines/live-eval.yml index e18bafa65fb7..e69e48005506 100644 --- a/eng/common/pipelines/live-eval.yml +++ b/eng/common/pipelines/live-eval.yml @@ -13,22 +13,15 @@ schedules: - main always: true # run even when main has not changed -parameters: - - name: publishDashboardResults - displayName: 'Publish trusted main results to Blob (includes pipeline-wide Azure Storage egress)' - type: boolean - default: true - variables: # Managed-pool image selection (LINUXPOOL/LINUXVMIMAGE). Repo-local. - template: /eng/pipelines/templates/variables/image.yml + # Provides the secret azuresdk-copilot-github-pat, mapped into GITHUB_TOKEN in the invoke step. + - group: AzSDK_Eval_Variable_group extends: template: /eng/common/pipelines/templates/stages/archetype-eval.yml parameters: - createDashboardBundle: true - # EvalStorageAccountName is configured by the pipeline owner, not in synced YAML. - publishDashboardResults: ${{ parameters.publishDashboardResults }} # Shared mock/live builder; select the live tier (real Cli MCP). mcpSetupTemplate: /eng/common/pipelines/templates/steps/eval-mcp-setup.yml TestType: live diff --git a/eng/common/pipelines/skill-eval.yml b/eng/common/pipelines/skill-eval.yml index 2b639ae5307c..880a9d3eef22 100644 --- a/eng/common/pipelines/skill-eval.yml +++ b/eng/common/pipelines/skill-eval.yml @@ -12,32 +12,21 @@ trigger: - eng/common/pipelines/skill-eval.yml - eng/common/pipelines/templates/jobs/** - eng/common/pipelines/templates/steps/eval-invoke.yml - - eng/common/pipelines/templates/steps/login-to-copilot.yml - - eng/common/pipelines/templates/steps/login-to-github.yml - - eng/common/scripts/login-to-github.ps1 - eng/common/pipelines/templates/steps/eval-mcp-setup.yml - - eng/common/pipelines/templates/steps/eval-publish-results.yml - eng/common/pipelines/templates/stages/archetype-eval.yml - eng/common/scripts/eval/** pr: none -parameters: - - name: publishDashboardResults - displayName: 'Publish trusted main results to Blob (includes pipeline-wide Azure Storage egress)' - type: boolean - default: true - variables: # Managed-pool image selection (LINUXPOOL/LINUXVMIMAGE). Repo-local. - template: /eng/pipelines/templates/variables/image.yml + # Provides the secret azuresdk-copilot-github-pat, mapped into GITHUB_TOKEN in the invoke step. + - group: AzSDK_Eval_Variable_group extends: template: /eng/common/pipelines/templates/stages/archetype-eval.yml parameters: - createDashboardBundle: true - # EvalStorageAccountName is configured by the pipeline owner, not in synced YAML. - publishDashboardResults: ${{ parameters.publishDashboardResults }} # Shared mock/live builder; select the mock tier. mcpSetupTemplate: /eng/common/pipelines/templates/steps/eval-mcp-setup.yml TestType: mock diff --git a/eng/common/pipelines/templates/jobs/apireview-hub-build-tools-base.yml b/eng/common/pipelines/templates/jobs/apireview-hub-build-tools-base.yml deleted file mode 100644 index 49d6c7d8f9ee..000000000000 --- a/eng/common/pipelines/templates/jobs/apireview-hub-build-tools-base.yml +++ /dev/null @@ -1,92 +0,0 @@ -parameters: - - name: languageRepoResource - type: string - - name: toolsRef - type: string - - name: languageToolsRef - type: string - - name: poolName - type: string - default: 'azsdk-pool' - - name: imageOverride - type: string - default: 'ubuntu-24.04' - - name: stepList - type: stepList - default: [] - -jobs: - - job: BuildTools - displayName: Build API review tools - pool: - name: ${{ parameters.poolName }} - demands: ImageOverride -equals ${{ parameters.imageOverride }} - variables: - - template: /eng/pipelines/templates/variables/globals.yml - - name: ToolsSourceDirectory - value: $(Pipeline.Workspace)/tools - - name: LanguageToolsSourceDirectory - value: $(Build.SourcesDirectory) - - name: BinOutputDirectory - value: $(Build.ArtifactStagingDirectory)/bin - steps: - - checkout: self - path: tools - fetchDepth: 1 - sparseCheckoutDirectories: eng - - checkout: ${{ parameters.languageRepoResource }} - path: s - fetchDepth: 1 - sparseCheckoutDirectories: eng - - - bash: | - set -Eeuo pipefail - - checkout_ref() { - local repository="$1" - local name="$2" - local ref="$3" - if [[ "$ref" != refs/heads/* && "$ref" != refs/tags/* ]]; then - echo "$name must be a fully-qualified branch or tag ref." >&2 - exit 1 - fi - git -C "$repository" fetch --depth=1 origin "$ref" - git -C "$repository" checkout --detach FETCH_HEAD - git -C "$repository" clean -ffd - echo "$name=$ref sourceCommit=$(git -C "$repository" rev-parse HEAD)" - } - - checkout_ref "$TOOLS_REPOSITORY" toolsRef "$TOOLS_REF" - checkout_ref "$LANGUAGE_REPOSITORY" languageToolsRef "$LANGUAGE_TOOLS_REF" - displayName: Resolve API review tool refs - env: - TOOLS_REF: ${{ parameters.toolsRef }} - LANGUAGE_TOOLS_REF: ${{ parameters.languageToolsRef }} - TOOLS_REPOSITORY: $(ToolsSourceDirectory) - LANGUAGE_REPOSITORY: $(LanguageToolsSourceDirectory) - - - pwsh: | - $ErrorActionPreference = 'Stop' - New-Item -ItemType Directory -Force -Path $env:BIN_OUTPUT_DIRECTORY | Out-Null - displayName: Prepare binary output directory - env: - BIN_OUTPUT_DIRECTORY: $(BinOutputDirectory) - - # Language templates publish every file needed by artifact generation to the bin directory. - - ${{ parameters.stepList }} - - - publish: $(BinOutputDirectory) - artifact: bin - displayName: Publish built tools - - - template: /eng/common/pipelines/templates/steps/apireview-hub-failure-callback.yml - parameters: - kind: target - ref: $(ApiReviewTargetRef) - condition: failed() - - - template: /eng/common/pipelines/templates/steps/apireview-hub-failure-callback.yml - parameters: - kind: base - ref: $(ApiReviewBaseRef) - condition: and(failed(), ne(variables['ApiReviewBaseRef'], '')) diff --git a/eng/common/pipelines/templates/jobs/apireview-hub-generate-artifact-base.yml b/eng/common/pipelines/templates/jobs/apireview-hub-generate-artifact-base.yml deleted file mode 100644 index ccfbfbf00793..000000000000 --- a/eng/common/pipelines/templates/jobs/apireview-hub-generate-artifact-base.yml +++ /dev/null @@ -1,213 +0,0 @@ -parameters: - - name: jobName - type: string - - name: kind - type: string - values: - - base - - target - - name: requestMode - type: string - values: - - create - - update - - name: language - type: string - - name: repositoryFullName - type: string - - name: ref - type: string - - name: packageName - type: string - - name: operationId - type: string - - name: poolName - type: string - default: 'azsdk-pool' - - name: imageOverride - type: string - default: 'ubuntu-24.04' - - name: stepList - type: stepList - default: [] - -jobs: - - job: ${{ parameters.jobName }} - displayName: Generate ${{ parameters.kind }} API review artifact - pool: - name: ${{ parameters.poolName }} - demands: ImageOverride -equals ${{ parameters.imageOverride }} - variables: - - template: /eng/pipelines/templates/variables/globals.yml - - name: BinDirectory - value: $(Pipeline.Workspace)/bin - - name: ApiReviewSourceCommit - ${{ if eq(parameters.kind, 'base') }}: - value: $(ApiReviewBaseCommit) - ${{ if eq(parameters.kind, 'target') }}: - value: $(ApiReviewTargetCommit) - - name: ArtifactOutputDirectory - value: $(Build.ArtifactStagingDirectory)/${{ parameters.kind }} - steps: - - checkout: none - - - bash: | - set -Eeuo pipefail - - if [[ "$REF" != refs/heads/* && "$REF" != refs/tags/* ]]; then - echo "ref must be a fully-qualified branch or tag ref." >&2 - exit 1 - fi - if [[ ! "$SOURCE_COMMIT" =~ ^[0-9a-fA-F]{40}$ ]]; then - echo "A pinned 40-character source commit SHA is required." >&2 - exit 1 - fi - if [[ ! "$REPOSITORY_FULL_NAME" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]]; then - echo "repositoryFullName must be in owner/repository form." >&2 - exit 1 - fi - if [ -z "$PACKAGE_NAME" ] || [ -z "$OPERATION_ID" ] || [ -z "$LANGUAGE" ]; then - echo "packageName, operationId, and language are required." >&2 - exit 1 - fi - - if [[ -z "$SOURCE_DIRECTORY" || "$SOURCE_DIRECTORY" == "/" ]]; then - echo "SOURCE_DIRECTORY must be a non-root path." >&2 - exit 1 - fi - rm -rf -- "$SOURCE_DIRECTORY" - mkdir -p "$SOURCE_DIRECTORY" - git -C "$SOURCE_DIRECTORY" init - git -C "$SOURCE_DIRECTORY" remote add origin "https://github.com/$REPOSITORY_FULL_NAME.git" - git -C "$SOURCE_DIRECTORY" fetch --depth=1 origin "$SOURCE_COMMIT" - git -C "$SOURCE_DIRECTORY" checkout --detach FETCH_HEAD - git -C "$SOURCE_DIRECTORY" clean -ffd - - source_commit=$(git -C "$SOURCE_DIRECTORY" rev-parse HEAD) - if [[ "${source_commit,,}" != "${SOURCE_COMMIT,,}" ]]; then - echo "Checked-out source commit does not match the requested SHA." >&2 - exit 1 - fi - echo "ref=$REF sourceCommit=$source_commit" - echo "##vso[task.setvariable variable=ApiReviewSourceCommit]$source_commit" - displayName: Clone ${{ parameters.kind }} source ref - env: - REF: ${{ parameters.ref }} - SOURCE_COMMIT: $(ApiReviewSourceCommit) - REPOSITORY_FULL_NAME: ${{ parameters.repositoryFullName }} - SOURCE_DIRECTORY: $(Build.SourcesDirectory) - PACKAGE_NAME: ${{ parameters.packageName }} - OPERATION_ID: ${{ parameters.operationId }} - LANGUAGE: ${{ parameters.language }} - - - download: current - artifact: bin - displayName: Download built tools - - - pwsh: | - $ErrorActionPreference = 'Stop' - New-Item -ItemType Directory -Force -Path $env:ARTIFACT_OUTPUT_DIRECTORY | Out-Null - displayName: Prepare artifact output directory - env: - ARTIFACT_OUTPUT_DIRECTORY: $(ArtifactOutputDirectory) - - # Run the language-specific API review generation steps. - - ${{ parameters.stepList }} - - - pwsh: | - $ErrorActionPreference = 'Stop' - - $apiPath = Join-Path $env:ARTIFACT_OUTPUT_DIRECTORY 'api.md' - $metadataPath = Join-Path $env:ARTIFACT_OUTPUT_DIRECTORY 'api.metadata.yml' - if (!(Test-Path $apiPath -PathType Leaf)) { - throw "Expected api.md was not produced at $apiPath." - } - if (!(Test-Path $metadataPath -PathType Leaf)) { - throw "Expected api.metadata.yml was not produced at $metadataPath." - } - - $metadata = @{} - foreach ($line in Get-Content $metadataPath) { - if ($line -match '^\s*([^#][^:]*):\s*(.*?)\s*$') { - $metadata[$matches[1].Trim()] = $matches[2].Trim().Trim('"', "'") - } - } - foreach ($field in 'apiHash', 'packageVersion', 'packageRelativePath') { - if ([string]::IsNullOrWhiteSpace($metadata[$field])) { - throw "api.metadata.yml must contain a non-empty $field field." - } - } - - $sourceRoot = [IO.Path]::GetFullPath($env:SOURCE_DIRECTORY) - $packagePath = [IO.Path]::GetFullPath((Join-Path $sourceRoot $metadata['packageRelativePath'])) - $sourcePrefix = $sourceRoot.TrimEnd([IO.Path]::DirectorySeparatorChar) + [IO.Path]::DirectorySeparatorChar - if (!$packagePath.StartsWith($sourcePrefix, [StringComparison]::OrdinalIgnoreCase) -or - !(Test-Path $packagePath -PathType Container)) { - throw "packageRelativePath must resolve to an existing directory below the source root." - } - displayName: Validate ${{ parameters.kind }} API review bundle - env: - ARTIFACT_OUTPUT_DIRECTORY: $(ArtifactOutputDirectory) - SOURCE_DIRECTORY: $(Build.SourcesDirectory) - - - publish: $(ArtifactOutputDirectory) - artifact: ${{ parameters.kind }}-$(System.JobAttempt) - displayName: Publish ${{ parameters.kind }} API review artifact - - - task: AzurePowerShell@5 - displayName: Report ${{ parameters.kind }} completion - condition: always() - retryCountOnTaskFailure: 3 - inputs: - azureSubscription: $(CompletionCallbackAzureSubscription) - azurePowerShellVersion: LatestVersion - ScriptType: InlineScript - Inline: | - $ErrorActionPreference = 'Stop' - - if ([string]::IsNullOrWhiteSpace($env:CALLBACK_PROOF)) { - throw 'The callback proof is required.' - } - $tokenResponse = Get-AzAccessToken -ResourceUrl $env:CALLBACK_RESOURCE_URL -AsSecureString - $token = [System.Net.NetworkCredential]::new('', $tokenResponse.Token).Password - if ([string]::IsNullOrWhiteSpace($token)) { - throw 'The API Review Hub access token was empty.' - } - - $body = @{ - operationId = $env:OPERATION_ID - mode = $env:REQUEST_MODE - language = $env:LANGUAGE - kind = $env:KIND - ref = $env:REF - sourceCommit = $env:SOURCE_COMMIT - result = $env:JOB_RESULT - artifactName = $env:ARTIFACT_NAME - buildId = $env:BUILD_ID - project = $env:PROJECT - } | ConvertTo-Json -Compress - $headers = @{ - Authorization = "Bearer $token" - 'x-arh-callback-proof' = $env:CALLBACK_PROOF - } - $callbackUrl = "$($env:API_REVIEW_HUB_ENDPOINT.TrimEnd('/'))/api/operations/$($env:OPERATION_ID)" - Write-Host "Completion callback URL: $callbackUrl" - Write-Host "Completion callback body: $body" - Invoke-WebRequest -Method Post -Uri $callbackUrl -Headers $headers -ContentType 'application/json' -Body $body | Out-Null - env: - ${{ if eq(parameters.kind, 'base') }}: - CALLBACK_PROOF: $(BaseCallbackProof) - ${{ if eq(parameters.kind, 'target') }}: - CALLBACK_PROOF: $(TargetCallbackProof) - CALLBACK_RESOURCE_URL: $(CompletionCallbackResourceUrl) - API_REVIEW_HUB_ENDPOINT: $(ApiReviewHubEndpoint) - OPERATION_ID: ${{ parameters.operationId }} - REQUEST_MODE: ${{ parameters.requestMode }} - LANGUAGE: ${{ parameters.language }} - KIND: ${{ parameters.kind }} - REF: ${{ parameters.ref }} - SOURCE_COMMIT: $(ApiReviewSourceCommit) - JOB_RESULT: $(Agent.JobStatus) - ARTIFACT_NAME: ${{ parameters.kind }}-$(System.JobAttempt) - BUILD_ID: $(Build.BuildId) - PROJECT: $(System.TeamProject) diff --git a/eng/common/pipelines/templates/jobs/apireview-hub-job-base.yml b/eng/common/pipelines/templates/jobs/apireview-hub-job-base.yml new file mode 100644 index 000000000000..375ca69efb37 --- /dev/null +++ b/eng/common/pipelines/templates/jobs/apireview-hub-job-base.yml @@ -0,0 +1,89 @@ +# Base job wrapper for API Review Hub artifact creation. Language-specific job +# templates provide setup steps and the request handler provides orchestration steps. +parameters: + - name: jobName + type: string + default: CreateApiReviewArtifacts + - name: displayName + type: string + default: 'Create API review artifacts' + - name: poolName + type: string + default: 'azsdk-pool' + - name: imageOverride + type: string + default: 'ubuntu-24.04' + - name: languageRepoResource + type: string + - name: variables + type: object + default: [] + - name: sourceRepositoryFullName + type: string + default: '' + - name: sourceCheckoutDir + type: string + default: '' + - name: toolingDir + type: string + default: '$(Pipeline.Workspace)/apireview/tooling' + - name: setupSteps + type: stepList + default: [] + - name: steps + type: stepList + default: [] + +jobs: +- job: ${{ parameters.jobName }} + displayName: ${{ parameters.displayName }} + + pool: + name: ${{ parameters.poolName }} + demands: ImageOverride -equals ${{ parameters.imageOverride }} + + variables: + - template: /eng/pipelines/templates/variables/globals.yml + - name: ToolsRepo + value: $(Pipeline.Workspace)/tools + - name: LanguageRepo + value: $(Pipeline.Workspace)/lang + - name: ApiReviewRepositoryFullName + value: ${{ parameters.sourceRepositoryFullName }} + - name: ApiReviewSourceDir + value: ${{ parameters.sourceCheckoutDir }} + - name: ApiReviewToolingDir + value: ${{ parameters.toolingDir }} + - ${{ each variable in parameters.variables }}: + - ${{ variable }} + steps: + - checkout: self + path: tools + fetchDepth: 1 + sparseCheckoutDirectories: eng + - checkout: ${{ parameters.languageRepoResource }} + path: lang + fetchDepth: 1 + sparseCheckoutDirectories: eng + + - ${{ if ne(parameters.sourceCheckoutDir, '') }}: + - bash: | + set -Eeuo pipefail + + source_repo="$SOURCE_CHECKOUT_DIR" + repository_full_name="$SOURCE_REPOSITORY_FULL_NAME" + + rm -rf "$source_repo" + mkdir -p "$(dirname "$source_repo")" + + echo "Cloning $repository_full_name into $source_repo" + git clone --filter=blob:none --no-checkout "https://github.com/$repository_full_name.git" "$source_repo" + env: + SOURCE_CHECKOUT_DIR: ${{ parameters.sourceCheckoutDir }} + SOURCE_REPOSITORY_FULL_NAME: ${{ parameters.sourceRepositoryFullName }} + displayName: 'Clone API review source repository' + + - ${{ parameters.setupSteps }} + + # These steps are assembled by the generic API Review Hub request pipeline. + - ${{ parameters.steps }} \ No newline at end of file diff --git a/eng/common/pipelines/templates/jobs/eval-shard.yml b/eng/common/pipelines/templates/jobs/eval-shard.yml index cb54e75584e8..fc4245111884 100644 --- a/eng/common/pipelines/templates/jobs/eval-shard.yml +++ b/eng/common/pipelines/templates/jobs/eval-shard.yml @@ -1,5 +1,5 @@ # Fan-out shard job: one leg per shard runs its evals against the prebuilt MCP and publishes -# per-leg raw JSONL + JUnit + completeness (always), and transcripts (on failure). Pass/fail is the eval VERDICT, not the +# per-leg JUnit (always) + transcripts (on failure). Pass/fail is the eval VERDICT, not the # `vally` exit code (vally can exit 1 on a teardown flake after a pass). parameters: @@ -41,8 +41,6 @@ jobs: # A red shard shouldn't abort its siblings; the rollup gates in Summary. continueOnError: true timeoutInMinutes: ${{ parameters.shardTimeoutInMinutes }} - workspace: - clean: all strategy: matrix: $[ stageDependencies.Prepare.generate_eval_matrix.outputs['detect.matrix'] ] maxParallel: 10 @@ -52,9 +50,9 @@ jobs: # name instead of colliding with the prior attempt's artifact (which fails the rerun). # The Summary job keeps only the highest attempt per shard so retries supersede cleanly. - output: pipelineArtifact - displayName: 'Publish $(shardName) raw results, JUnit and completeness' + displayName: 'Publish $(shardName) JUnit' artifactName: 'eval-result-$(shardName)-$(System.JobAttempt)' - targetPath: $(Build.ArtifactStagingDirectory)/eval-result + targetPath: $(Build.ArtifactStagingDirectory)/junit condition: always() - output: pipelineArtifact displayName: 'Publish $(shardName) transcripts (on failure)' @@ -63,13 +61,12 @@ jobs: condition: failed() steps: - checkout: self - clean: true fetchDepth: 1 - task: UseNode@1 - displayName: 'Use Node.js 24.x' + displayName: 'Use Node.js 22.x' inputs: - version: 24.x + version: 22.x # 1ES Official image blocks registry.npmjs.org; restore via the azure-sdk npm mirror. - template: /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml @@ -114,8 +111,6 @@ jobs: env: EVAL_ARGS: $(evalArgs) - - template: /eng/common/pipelines/templates/steps/login-to-copilot.yml - # Runs the eval via the invoke template (auth-conditional in the common default). - template: ${{ parameters.evalInvokeTemplate }} parameters: @@ -127,15 +122,13 @@ jobs: - ${{ if parameters.postEvalTemplate }}: - template: ${{ parameters.postEvalTemplate }} - # Preserve exactly the newest invocation, including completed failed evals. - # Even an early failure publishes an incomplete marker; never fall back to stale data. + # JUnit is tiny — stage it always; heavy transcripts stage separately on failure. + # Also create the debug dir here so the failed()-gated debug publish always has a target + # (otherwise the publish errors "Path does not exist" when the dir was never created). - script: | - mkdir -p "$(Build.ArtifactStagingDirectory)/debug" - node --experimental-strip-types "$(Build.SourcesDirectory)/eng/common/scripts/eval/lib/shard-results.ts" \ - --results-root "$(Build.SourcesDirectory)/artifacts/vally-results/$(shardName)" \ - --output-directory "$(Build.ArtifactStagingDirectory)/eval-result" \ - --shard-name "$(shardName)" --attempt "$(System.JobAttempt)" - displayName: 'Collect $(shardName) result data and completeness' + mkdir -p "$(Build.ArtifactStagingDirectory)/junit" "$(Build.ArtifactStagingDirectory)/debug" + find "$(Build.SourcesDirectory)/artifacts/vally-results/$(shardName)" -name '*.junit.xml' -exec cp {} "$(Build.ArtifactStagingDirectory)/junit/" \; + displayName: 'Collect $(shardName) JUnit' condition: always() # On a real failure keep transcripts; strip JUnit so Summary can't double-count it. diff --git a/eng/common/pipelines/templates/jobs/eval-summarize.yml b/eng/common/pipelines/templates/jobs/eval-summarize.yml index eddc71c6e908..8d9f49d6c8c8 100644 --- a/eng/common/pipelines/templates/jobs/eval-summarize.yml +++ b/eng/common/pipelines/templates/jobs/eval-summarize.yml @@ -5,86 +5,41 @@ parameters: - name: failOnFailedTests type: boolean default: false - - name: createDashboardBundle - type: boolean - default: false - - name: publishDashboardResults - type: boolean - default: false jobs: - job: Summarize - displayName: 'Consolidate, publish + gate results' + displayName: 'Publish + gate rollup' pool: name: $(LINUXPOOL) image: $(LINUXVMIMAGE) os: linux - workspace: - clean: all - variables: - EvalExpectedMatrix: $[ stageDependencies.Prepare.generate_eval_matrix.outputs['detect.matrix'] ] - templateContext: - outputs: - - output: pipelineArtifact - displayName: 'Retain selected build summary and saved bundle' - artifactName: 'eval-summary-$(System.JobAttempt)' - targetPath: $(Build.ArtifactStagingDirectory)/eval-summary - condition: always() steps: - - checkout: self - clean: true - fetchDepth: 1 - - task: UseNode@1 - displayName: 'Use Node.js 24.x' + displayName: 'Use Node.js 22.x' inputs: - version: 24.x + version: 22.x - # Allowlist result data only, excluding debug, MCP, SDL and signing artifacts. + # Match *.junit.xml only so stray XML (e.g. a DLL's doc XML) can't fake a shard. - task: DownloadPipelineArtifact@2 displayName: 'Download all shard results' inputs: buildType: 'current' - itemPattern: | - eval-result-*/results.jsonl - eval-result-*/shard.json - eval-result-*/**/*.junit.xml + itemPattern: '**/*.junit.xml' targetPath: $(Pipeline.Workspace)/eval-results - # Only attempt verification needs the current build token; rendering uses saved evidence. - - script: | - node --experimental-strip-types "$(Build.SourcesDirectory)/eng/common/scripts/eval/lib/shard-results.ts" \ - --attempts-output "$(Build.ArtifactStagingDirectory)/eval-summary/job-attempts.json" - displayName: 'Verify latest shard job attempts from current build timeline' - condition: always() - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - EVAL_EXPECTED_MATRIX: $(EvalExpectedMatrix) - + # Renders the rollup to the run's Summary tab (##vso[task.uploadsummary]). - script: | node --experimental-strip-types "$(Build.SourcesDirectory)/eng/common/scripts/eval/build-eval-summary.ts" \ --results-root "$(Pipeline.Workspace)/eval-results" \ - --selected-root "$(Pipeline.Workspace)/eval-selected" \ - --attempts-file "$(Build.ArtifactStagingDirectory)/eval-summary/job-attempts.json" \ - --output-path "$(Build.ArtifactStagingDirectory)/eval-summary/eval-summary.md" - displayName: 'Select expected latest attempts and render complete-build summary' + --output-path "$(Build.ArtifactStagingDirectory)/eval-summary.md" + displayName: 'Render Markdown rollup' condition: always() - env: - EVAL_EXPECTED_MATRIX: $(EvalExpectedMatrix) - - - ${{ if or(parameters.createDashboardBundle, parameters.publishDashboardResults) }}: - - template: ../steps/eval-publish-results.yml - parameters: - publishDashboardResults: ${{ parameters.publishDashboardResults }} - # Completed failing evals are useful data: publish BEFORE the evaluation gate. - task: PublishTestResults@2 displayName: 'Publish eval rollup' - condition: succeededOrFailed() inputs: testResultsFormat: 'JUnit' - testResultsFiles: '$(Pipeline.Workspace)/eval-selected/**/*.junit.xml' + testResultsFiles: '$(Pipeline.Workspace)/eval-results/**/*.junit.xml' mergeTestResults: true failTaskOnFailedTests: ${{ parameters.failOnFailedTests }} - failTaskOnMissingResultsFile: true testRunTitle: 'Vally evals' diff --git a/eng/common/pipelines/templates/stages/archetype-auto-release-prepare.yml b/eng/common/pipelines/templates/stages/archetype-auto-release-prepare.yml index 191901f27d7c..69e1f99722cb 100644 --- a/eng/common/pipelines/templates/stages/archetype-auto-release-prepare.yml +++ b/eng/common/pipelines/templates/stages/archetype-auto-release-prepare.yml @@ -28,7 +28,7 @@ stages: # condition: dependencies.AutoReleasePrepare.outputs['ResolveAutoReleasePackages.resolve.'] # variables: stageDependencies.AutoReleasePrepare.ResolveAutoReleasePackages.outputs['resolve.'] # Emitted variables: HasAutoReleaseArtifacts (the single eligibility gate), AutoReleaseArtifactsJson, - # ReleaseArtifact_ per declared artifact, and AutoReleaseSdkPullRequestUrl for completion. + # and ReleaseArtifact_ per declared artifact. - stage: AutoReleasePrepare displayName: Auto-release prepare dependsOn: ${{ parameters.DependsOn }} diff --git a/eng/common/pipelines/templates/stages/archetype-eval.yml b/eng/common/pipelines/templates/stages/archetype-eval.yml index 8ee61d9878cd..4e29b4c314ce 100644 --- a/eng/common/pipelines/templates/stages/archetype-eval.yml +++ b/eng/common/pipelines/templates/stages/archetype-eval.yml @@ -62,22 +62,11 @@ parameters: # Per-shard job timeout, passed to the shard job's timeoutInMinutes. Live tier raises it. type: number default: 20 - - name: createDashboardBundle - type: boolean - default: false - # Publication includes the required pipeline-wide AzureStorage egress policy. - - name: publishDashboardResults - type: boolean - default: false extends: # 1es-redirect picks Official (internal) vs Unofficial; its Use1ESOfficial defaults true. template: /eng/pipelines/templates/stages/1es-redirect.yml parameters: - # The checkbox controls compile-time egress; the account variable gates upload at runtime. - # Keep trust policy in YAML, without hardcoding DevOps definition IDs in shared code. - ${{ if and(parameters.publishDashboardResults, eq(variables['System.CollectionUri'], 'https://dev.azure.com/azure-sdk/'), eq(variables['System.TeamProject'], 'internal'), eq(variables['Build.Repository.Name'], 'Azure/azure-sdk-tools'), eq(variables['Build.SourceBranch'], 'refs/heads/main'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Schedule', 'Manual')) }}: - AllowAzureStorage: true stages: - stage: Prepare displayName: 'Build MCP' @@ -109,11 +98,9 @@ extends: - stage: Summary displayName: 'Summarize results' - dependsOn: [Prepare, Eval] + dependsOn: Eval condition: always() jobs: - template: /eng/common/pipelines/templates/jobs/eval-summarize.yml parameters: failOnFailedTests: ${{ parameters.failOnFailedTests }} - createDashboardBundle: ${{ parameters.createDashboardBundle }} - publishDashboardResults: ${{ parameters.publishDashboardResults }} diff --git a/eng/common/pipelines/templates/steps/apireview-hub-failure-callback.yml b/eng/common/pipelines/templates/steps/apireview-hub-failure-callback.yml deleted file mode 100644 index 91a439d0553b..000000000000 --- a/eng/common/pipelines/templates/steps/apireview-hub-failure-callback.yml +++ /dev/null @@ -1,70 +0,0 @@ -parameters: - - name: kind - type: string - values: - - base - - target - - name: ref - type: string - - name: condition - type: string - default: failed() - -steps: - - task: AzurePowerShell@5 - displayName: Report ${{ parameters.kind }} API review failure - condition: ${{ parameters.condition }} - retryCountOnTaskFailure: 3 - inputs: - azureSubscription: $(CompletionCallbackAzureSubscription) - azurePowerShellVersion: LatestVersion - ScriptType: InlineScript - Inline: | - $ErrorActionPreference = 'Stop' - - if ([string]::IsNullOrWhiteSpace($env:CALLBACK_PROOF)) { - throw 'The callback proof is required.' - } - $tokenResponse = Get-AzAccessToken -ResourceUrl $env:CALLBACK_RESOURCE_URL -AsSecureString - $token = [System.Net.NetworkCredential]::new('', $tokenResponse.Token).Password - if ([string]::IsNullOrWhiteSpace($token)) { - throw 'The API Review Hub access token was empty.' - } - - $body = @{ - operationId = $env:OPERATION_ID - mode = $env:REQUEST_MODE - language = $env:LANGUAGE - kind = $env:KIND - ref = $env:REF - sourceCommit = $env:SOURCE_COMMIT - result = 'Failed' - artifactName = $env:ARTIFACT_NAME - buildId = $env:BUILD_ID - project = $env:PROJECT - } | ConvertTo-Json -Compress - $headers = @{ - Authorization = "Bearer $token" - 'x-arh-callback-proof' = $env:CALLBACK_PROOF - } - $callbackUrl = "$($env:API_REVIEW_HUB_ENDPOINT.TrimEnd('/'))/api/operations/$($env:OPERATION_ID)" - Write-Host "Completion callback URL: $callbackUrl" - Write-Host "Completion callback body: $body" - Invoke-WebRequest -Method Post -Uri $callbackUrl -Headers $headers -ContentType 'application/json' -Body $body | Out-Null - env: - ${{ if eq(parameters.kind, 'base') }}: - CALLBACK_PROOF: $(BaseCallbackProof) - SOURCE_COMMIT: $(ApiReviewBaseCommit) - ${{ if eq(parameters.kind, 'target') }}: - CALLBACK_PROOF: $(TargetCallbackProof) - SOURCE_COMMIT: $(ApiReviewTargetCommit) - CALLBACK_RESOURCE_URL: $(CompletionCallbackResourceUrl) - API_REVIEW_HUB_ENDPOINT: $(ApiReviewHubEndpoint) - OPERATION_ID: $(ApiReviewOperationId) - REQUEST_MODE: $(ApiReviewRequestMode) - LANGUAGE: $(ApiReviewRequestLanguage) - KIND: ${{ parameters.kind }} - REF: ${{ parameters.ref }} - ARTIFACT_NAME: ${{ parameters.kind }}-$(System.JobAttempt) - BUILD_ID: $(Build.BuildId) - PROJECT: $(System.TeamProject) diff --git a/eng/common/pipelines/templates/steps/create-apireview-hub-artifacts-base.yml b/eng/common/pipelines/templates/steps/create-apireview-hub-artifacts-base.yml new file mode 100644 index 000000000000..e8ba1bad9f7c --- /dev/null +++ b/eng/common/pipelines/templates/steps/create-apireview-hub-artifacts-base.yml @@ -0,0 +1,118 @@ +# Base artifact step for API Review Hub. Language-specific templates provide the +# generation steps and this template enforces the shared artifact contract. +parameters: + - name: requestMode + type: string + - name: operationId + type: string + - name: packageName + type: string + - name: ref + type: string + - name: kind + type: string + - name: outputDir + type: string + - name: workingDir + type: string + - name: sourceDir + type: string + - name: language + type: string + - name: repositoryFullName + type: string + - name: generationSteps + type: stepList + default: [] + +steps: + - pwsh: | + $ErrorActionPreference = 'Stop' + + New-Item -ItemType Directory -Force -Path $env:OUTPUT_DIR | Out-Null + New-Item -ItemType Directory -Force -Path $env:WORKING_DIR | Out-Null + New-Item -ItemType Directory -Force -Path (Join-Path $env:WORKING_DIR 'state') | Out-Null + env: + OUTPUT_DIR: ${{ parameters.outputDir }} + WORKING_DIR: ${{ parameters.workingDir }} + displayName: 'Prepare ${{ parameters.kind }} API review bundle directories' + + - bash: | + set -Eeuo pipefail + + source_repo="$SOURCE_DIR" + ref="$REF" + + if [ ! -d "$source_repo/.git" ]; then + echo "Expected API review source repository was not cloned at $source_repo" >&2 + exit 1 + fi + + # API Review Hub must provide a fully-qualified Git ref (for example refs/heads/* or refs/tags/*). + # Keeping this explicit avoids ambiguous fetch behavior across remote refspec configurations. + if [[ -z "$ref" || "$ref" != refs/* ]]; then + echo "Expected a fully-qualified git ref (refs/*), but received: '$ref'" >&2 + exit 1 + fi + + echo "Checking out $KIND API review source ref $ref in $source_repo" + git -C "$source_repo" fetch --depth=1 origin "$ref" + git -C "$source_repo" checkout --force FETCH_HEAD + git -C "$source_repo" clean -ffd + env: + SOURCE_DIR: ${{ parameters.sourceDir }} + REF: ${{ parameters.ref }} + KIND: ${{ parameters.kind }} + displayName: 'Checkout ${{ parameters.kind }} API review source' + + - ${{ parameters.generationSteps }} + + - pwsh: | + $ErrorActionPreference = 'Stop' + + $outputDir = $env:OUTPUT_DIR + $stateDir = Join-Path $env:WORKING_DIR 'state' + $apiMdPath = Join-Path $outputDir 'api.md' + $apiMetadataPath = Join-Path $outputDir 'api.metadata.yml' + $packageRelativePathPath = Join-Path $stateDir 'package-relative-path.txt' + $versionPath = Join-Path $stateDir 'version.txt' + if (!(Test-Path -Path $apiMdPath -PathType Leaf)) { + Write-Error "Expected api.md was not produced at $apiMdPath." + } + if (!(Test-Path -Path $apiMetadataPath -PathType Leaf)) { + Write-Error "Expected api.metadata.yml was not produced at $apiMetadataPath." + } + if (!(Test-Path -Path $packageRelativePathPath -PathType Leaf)) { + Write-Error "Expected package-relative-path.txt was not produced at $packageRelativePathPath." + } + if (!(Test-Path -Path $versionPath -PathType Leaf)) { + Write-Error "Expected version.txt was not produced at $versionPath." + } + + $packageRelativePath = Get-Content -Raw -Path $packageRelativePathPath + $version = Get-Content -Raw -Path $versionPath + + $metadata = [ordered]@{ + operationId = $env:OPERATION_ID + mode = $env:REQUEST_MODE + language = $env:LANGUAGE + repositoryFullName = $env:REPOSITORY_FULL_NAME + packageName = $env:PACKAGE_NAME + packageRelativePath = $packageRelativePath.Trim() + ref = $env:REF + version = $version.Trim() + kind = $env:KIND + } + $metadata | ConvertTo-Json -Depth 10 | Set-Content -Path (Join-Path $outputDir 'artifact-metadata.json') -Encoding utf8 + Get-Content -Path (Join-Path $outputDir 'artifact-metadata.json') + env: + OUTPUT_DIR: ${{ parameters.outputDir }} + WORKING_DIR: ${{ parameters.workingDir }} + OPERATION_ID: ${{ parameters.operationId }} + REQUEST_MODE: ${{ parameters.requestMode }} + LANGUAGE: ${{ parameters.language }} + REPOSITORY_FULL_NAME: ${{ parameters.repositoryFullName }} + PACKAGE_NAME: ${{ parameters.packageName }} + REF: ${{ parameters.ref }} + KIND: ${{ parameters.kind }} + displayName: 'Validate and write ${{ parameters.kind }} API review bundle metadata' \ No newline at end of file diff --git a/eng/common/pipelines/templates/steps/eval-invoke.yml b/eng/common/pipelines/templates/steps/eval-invoke.yml index 191765af3f90..2ebb5133f11d 100644 --- a/eng/common/pipelines/templates/steps/eval-invoke.yml +++ b/eng/common/pipelines/templates/steps/eval-invoke.yml @@ -1,7 +1,7 @@ # Invokes `vally eval` for one shard. UseAzSdkAuthentication=false (default) runs the hermetic # node script directly. UseAzSdkAuthentication=true wraps the same run in AzureCLI@2 so a live # MCP's Azure DevOps calls inherit the service-connection identity. -# The shard's login-to-copilot template supplies the executor and prompt-judge token. +# copilot-sdk authenticates the model session via GITHUB_TOKEN (from the linked eval variable group). parameters: - name: vallyRoot @@ -32,8 +32,9 @@ steps: --shard-name "$(shardName)" \ --output-dir "$(Build.SourcesDirectory)/artifacts/vally-results/$(shardName)" \ --threshold ${{ parameters.threshold }} - env: - COPILOT_GITHUB_TOKEN: $(COPILOT_GITHUB_TOKEN) + ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + env: + GITHUB_TOKEN: $(azuresdk-copilot-github-pat) - ${{ else }}: - script: | @@ -44,5 +45,6 @@ steps: --threshold ${{ parameters.threshold }} displayName: 'vally eval $(shardName)' workingDirectory: ${{ parameters.vallyRoot }} - env: - COPILOT_GITHUB_TOKEN: $(COPILOT_GITHUB_TOKEN) + ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + env: + GITHUB_TOKEN: $(azuresdk-copilot-github-pat) diff --git a/eng/common/pipelines/templates/steps/eval-publish-results.yml b/eng/common/pipelines/templates/steps/eval-publish-results.yml deleted file mode 100644 index 00d8c1c869c8..000000000000 --- a/eng/common/pipelines/templates/steps/eval-publish-results.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Builds a data-only archive, then uses the authenticated Azure CLI to publish it. -parameters: - - name: publishDashboardResults - type: boolean - default: false - -steps: - - template: /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml - parameters: - npmrcPath: $(Build.SourcesDirectory)/.npmrc - CustomCondition: and(succeeded(), eq(variables['EvalSummaryComplete'], 'true')) - - # Bootstrap only the pinned package manager with Node's bundled npm, as specs does. - # Isolate the archive install from any consuming repository's pnpm workspace. - - script: | - set -euo pipefail - npm install --prefix "$(Agent.TempDirectory)/eval-pnpm" --no-save --no-package-lock --ignore-scripts --no-audit --no-fund pnpm@12.6.0 - node "$(Agent.TempDirectory)/eval-pnpm/node_modules/pnpm/bin/pnpm.mjs" --ignore-workspace install --pm-on-fail=ignore --frozen-lockfile --prod --ignore-scripts - displayName: 'Install archive dependency' - workingDirectory: eng/common/scripts/eval/publisher - condition: and(succeeded(), eq(variables['EvalSummaryComplete'], 'true')) - env: - NPM_CONFIG_USERCONFIG: $(Build.SourcesDirectory)/.npmrc - - - script: | - set -euo pipefail - organization="${SYSTEM_COLLECTIONURI%/}" - node --experimental-strip-types "$(Build.SourcesDirectory)/eng/common/scripts/eval/publisher/bundle.ts" \ - --index "$(Pipeline.Workspace)/eval-results/shard-index.json" \ - --summary "$(Build.ArtifactStagingDirectory)/eval-summary/eval-summary.md" \ - --output "$(Build.ArtifactStagingDirectory)/eval-summary/dashboard-bundle.zip" \ - --organization "${organization##*/}" --project "$SYSTEM_TEAMPROJECT" \ - --repository "$BUILD_REPOSITORY_NAME" --pipeline "$BUILD_DEFINITIONNAME" \ - --definition-id "$SYSTEM_DEFINITIONID" --build-id "$BUILD_BUILDID" \ - --attempt "$SYSTEM_JOBATTEMPT" --branch "$BUILD_SOURCEBRANCH" --source-version "$BUILD_SOURCEVERSION" - displayName: 'Prepare one complete build result bundle' - condition: and(succeeded(), eq(variables['EvalSummaryComplete'], 'true')) - - # Pipeline-owned account configuration is a runtime value, not a template parameter. - # Missing configuration skips the task; PRs/foreign repos/non-main never get this task. - - ${{ if and(parameters.publishDashboardResults, eq(variables['System.CollectionUri'], 'https://dev.azure.com/azure-sdk/'), eq(variables['System.TeamProject'], 'internal'), eq(variables['Build.Repository.Name'], 'Azure/azure-sdk-tools'), eq(variables['Build.SourceBranch'], 'refs/heads/main'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Schedule', 'Manual')) }}: - - task: AzureCLI@2 - displayName: 'Publish saved build bundle directly to Blob' - condition: and(succeeded(), eq(variables['EvalSummaryComplete'], 'true'), ne(variables['EvalStorageAccountName'], ''), eq(variables['System.CollectionUri'], 'https://dev.azure.com/azure-sdk/'), eq(variables['System.TeamProject'], 'internal'), eq(variables['Build.Repository.Name'], 'Azure/azure-sdk-tools'), eq(variables['Build.SourceBranch'], 'refs/heads/main'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Schedule', 'Manual')) - timeoutInMinutes: 20 - env: - EVAL_STORAGE_ACCOUNT_NAME: $(EvalStorageAccountName) - EVAL_DASHBOARD_REFRESH_URL: $(EvalDashboardRefreshUrl) - EVAL_DASHBOARD_RESOURCE: $(EvalDashboardResource) - inputs: - azureSubscription: eval-dashboard-sc - scriptType: pscore - scriptLocation: inlineScript - # Environment mapping passes values literally, without parsing variable contents as code. - inlineScript: | - & "$(Build.SourcesDirectory)/eng/common/scripts/eval/publisher/Publish-EvalResults.ps1" ` - -StorageAccountName $env:EVAL_STORAGE_ACCOUNT_NAME ` - -BundlePath "$(Build.ArtifactStagingDirectory)/eval-summary/dashboard-bundle.zip" ` - -DashboardRefreshUrl $env:EVAL_DASHBOARD_REFRESH_URL -DashboardResource $env:EVAL_DASHBOARD_RESOURCE diff --git a/eng/common/pipelines/templates/steps/login-to-copilot.yml b/eng/common/pipelines/templates/steps/login-to-copilot.yml deleted file mode 100644 index da1c12db9143..000000000000 --- a/eng/common/pipelines/templates/steps/login-to-copilot.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Shared GitHub App authentication for Vally executors and prompt judges. -steps: - - template: /eng/common/pipelines/templates/steps/login-to-github.yml - parameters: - VariableNamePrefix: COPILOT_GITHUB_TOKEN - TokenRequest: - repositories: - - ${{ split(variables['Build.Repository.Name'], '/')[1] }} - permissions: - organization_copilot_requests: read - metadata: read \ No newline at end of file diff --git a/eng/common/pipelines/templates/steps/login-to-github.yml b/eng/common/pipelines/templates/steps/login-to-github.yml index 8da4155b8c54..5814417bb0bb 100644 --- a/eng/common/pipelines/templates/steps/login-to-github.yml +++ b/eng/common/pipelines/templates/steps/login-to-github.yml @@ -14,10 +14,6 @@ parameters: - name: ExportAsOutputVariable type: boolean default: false -- name: TokenRequest - # Optional GitHub access-token request body restricting repositories and permissions. - type: object - default: {} - name: ScriptDirectory default: eng/common/scripts - name: Condition @@ -37,6 +33,4 @@ steps: -InstallationTokenOwners '${{ join(''',''', parameters.TokenOwners) }}' -VariableNamePrefix '${{ parameters.VariableNamePrefix }}' -AlwaysUseOwnerSuffix:$${{ parameters.AlwaysUseOwnerSuffix }} - -ExportAsOutputVariable:$${{ parameters.ExportAsOutputVariable }} - env: - GITHUB_TOKEN_REQUEST: ${{ convertToJson(parameters.TokenRequest) }} \ No newline at end of file + -ExportAsOutputVariable:$${{ parameters.ExportAsOutputVariable }} \ No newline at end of file diff --git a/eng/common/pipelines/templates/steps/mark-release-completion.yml b/eng/common/pipelines/templates/steps/mark-release-completion.yml index 7f6e1c5f2a42..0e4824872c69 100644 --- a/eng/common/pipelines/templates/steps/mark-release-completion.yml +++ b/eng/common/pipelines/templates/steps/mark-release-completion.yml @@ -2,8 +2,6 @@ parameters: ConfigFileDir: '' PackageArtifactName: '' SourceRootPath: $(Build.SourcesDirectory) - ReleasePlanId: 0 - SdkPullRequest: '' steps: - template: /eng/common/pipelines/templates/steps/install-azsdk-cli.yml @@ -18,10 +16,7 @@ steps: scriptPath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Mark-ReleasePlanCompletion.ps1 arguments: > -PackageInfoFilePath '${{ parameters.ConfigFileDir }}/${{ parameters.PackageArtifactName }}.json' -AzsdkExePath '$(AZSDK)' - -ReleasePlanId '${{ parameters.ReleasePlanId }}' - -SdkPullRequest '${{ parameters.SdkPullRequest }}' - -PipelineUrl "$(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)" workingDirectory: $(Pipeline.Workspace) displayName: Mark package as released continueOnError: true - condition: and(succeeded(), ne(variables['Skip.MarkReleaseCompletion'], 'true')) + condition: and(succeeded(), ne(variables['Skip.MarkReleaseCompletion'], 'true')) \ No newline at end of file diff --git a/eng/common/pipelines/workflow-eval.yml b/eng/common/pipelines/workflow-eval.yml index 01f5dbecb6cf..d61b02b65e0a 100644 --- a/eng/common/pipelines/workflow-eval.yml +++ b/eng/common/pipelines/workflow-eval.yml @@ -15,32 +15,21 @@ trigger: - eng/common/pipelines/workflow-eval.yml - eng/common/pipelines/templates/jobs/** - eng/common/pipelines/templates/steps/eval-invoke.yml - - eng/common/pipelines/templates/steps/login-to-copilot.yml - - eng/common/pipelines/templates/steps/login-to-github.yml - - eng/common/scripts/login-to-github.ps1 - eng/common/pipelines/templates/steps/eval-mcp-setup.yml - - eng/common/pipelines/templates/steps/eval-publish-results.yml - eng/common/pipelines/templates/stages/archetype-eval.yml - eng/common/scripts/eval/** pr: none -parameters: - - name: publishDashboardResults - displayName: 'Publish trusted main results to Blob (includes pipeline-wide Azure Storage egress)' - type: boolean - default: true - variables: # Defines LINUXPOOL + LINUXVMIMAGE used by the archetype's jobs. - template: /eng/pipelines/templates/variables/image.yml + # Provides the secret azuresdk-copilot-github-pat, mapped into GITHUB_TOKEN in the invoke step. + - group: AzSDK_Eval_Variable_group extends: template: /eng/common/pipelines/templates/stages/archetype-eval.yml parameters: - createDashboardBundle: true - # EvalStorageAccountName is configured by the pipeline owner, not in synced YAML. - publishDashboardResults: ${{ parameters.publishDashboardResults }} # Shared mock/live builder; select the mock tier. mcpSetupTemplate: /eng/common/pipelines/templates/steps/eval-mcp-setup.yml TestType: mock diff --git a/eng/common/scripts/Mark-ReleasePlanCompletion.ps1 b/eng/common/scripts/Mark-ReleasePlanCompletion.ps1 index da116172c747..7d5a5ed122f1 100644 --- a/eng/common/scripts/Mark-ReleasePlanCompletion.ps1 +++ b/eng/common/scripts/Mark-ReleasePlanCompletion.ps1 @@ -1,51 +1,25 @@ -[CmdletBinding()] -param( +param( [Parameter(Mandatory = $true)] [string]$PackageInfoFilePath, [Parameter(Mandatory = $true)] - [string]$AzsdkExePath, - [ValidateScript({ - $id = 0 - if (-not [int]::TryParse($_, [System.Globalization.NumberStyles]::None, [System.Globalization.CultureInfo]::InvariantCulture, [ref]$id)) - { - throw 'Release plan ID must be a nonnegative 32-bit integer, without fractions or whitespace.' - } - return $true - })] - [string]$ReleasePlanId = '0', - [string]$SdkPullRequest = '', - [string]$PipelineUrl = '' + [string]$AzsdkExePath ) <# .SYNOPSIS - Updates release status using an explicit release-plan ID or SDK PR when supplied, otherwise the legacy package lookup. + Marks release plan completion by identifying pull requests that changed files in a given path. .DESCRIPTION - Uses the requester-supplied release-plan ID for manual releases, or the triggering SDK PR - for automatic releases. azsdk resolves the existing ADO plan and validates the language/package. - TRANSITIONAL: when neither is supplied, the original package-name lookup is used and an informational message is logged - so pipelines that do not yet forward the association keep working. Remove once every pipeline forwards one. + This script helps to mark release plan completion by finding the active release plans for a package name .PARAMETER PackageInfoFilePath The path to the package information file (required) or path to the directory containing package information files. .PARAMETER AzsdkExePath The path to the azsdk executable used to mark the release completion. - -.PARAMETER ReleasePlanId - The release-plan ID explicitly supplied for this manual release. Zero means no manual association. - -.PARAMETER SdkPullRequest - The unambiguous SDK PR that triggered the automatic release. Not a spec PR or a previous package PR. - -.PARAMETER PipelineUrl - The current release pipeline URL, recorded for manual and automatic releases. #> -Set-StrictMode -Version 4 -$ErrorActionPreference = 'Stop' -[int]$suppliedPlanId = [int]::Parse($ReleasePlanId, [System.Globalization.CultureInfo]::InvariantCulture) +Set-StrictMode -Version 3 . (Join-Path $PSScriptRoot common.ps1) #Validate azsdk executable path @@ -65,79 +39,50 @@ if (-Not (Test-Path $PackageInfoFilePath)) function Process-Package([string]$packageInfoPath) { # Get package info from json file created before updating version to daily dev - $pkgInfo = Get-Content -LiteralPath $packageInfoPath -Raw | ConvertFrom-Json -AsHashtable - if ($pkgInfo -isnot [System.Collections.IDictionary]) - { - Write-Warning "Package information must be a JSON object: $packageInfoPath. No release plan was updated." - return - } - $PackageName = $pkgInfo['Name'] - if ($PackageName -isnot [string] -or [string]::IsNullOrWhiteSpace($PackageName)) + $pkgInfo = Get-Content $packageInfoPath | ConvertFrom-Json + $PackageName = $pkgInfo.Name + if (!$PackageName) { Write-Host "Package name is not available in the package information file. Skipping the release plan status update for the package." return - } + } - $isLegacyLookup = ($suppliedPlanId -eq 0 -and [string]::IsNullOrWhiteSpace($SdkPullRequest)) - if ($isLegacyLookup) + Write-Host "Marking release completion for package, name: $PackageName" + $PackageVersion = $pkgInfo.Version + $version = [AzureEngSemanticVersion]::ParseVersionString($PackageVersion) + if (!$version) { - Write-Host "LEGACY_RELEASE_PLAN_LOOKUP: Package '$PackageName' has no release-plan ID or triggering SDK PR; using the legacy package lookup. Forward ReleasePlanId or SdkPullRequest from the release pipeline." + Write-Host "Failed to parse version string '$($PackageVersion)' for package '$PackageName'. Skipping the release plan status update." + return } - # Do not inherit plan IDs from package metadata; unrelated bug-fix builds can reuse those files. - Write-Host "Correlating release status for package '$PackageName', language '$LanguageDisplayName'." - $releaseArgs = @("release-plan", "update-release-status", "--package-name", $PackageName, "--language", $LanguageDisplayName, "--status", "Released") - if ($suppliedPlanId -gt 0) - { - $releaseArgs += @("--release-plan-id", "$suppliedPlanId") - } - if (-not [string]::IsNullOrWhiteSpace($SdkPullRequest)) - { - $releaseArgs += @("--sdk-pull-request", $SdkPullRequest) - } - if (-not [string]::IsNullOrWhiteSpace($PipelineUrl)) + $sdkReleaseType = "" + if ($version.IsPrerelease) { - $releaseArgs += @("--release-pipeline", $PipelineUrl) + $sdkReleaseType = "beta" } - $PackageVersion = $pkgInfo['Version'] - $version = $null - if ($PackageVersion -is [string] -and -not [string]::IsNullOrWhiteSpace($PackageVersion)) - { - $version = [AzureEngSemanticVersion]::ParseVersionString($PackageVersion) - } - if ($version) + else { - $sdkReleaseType = if ($version.IsPrerelease) { 'beta' } else { 'stable' } - $releaseArgs += @("--package-version", $PackageVersion, "--sdk-release-type", $sdkReleaseType) + $sdkReleaseType = "stable" } - else + + $releaseArgs = @("release-plan", "update-release-status", "--package-name", $PackageName, "--language", $LanguageDisplayName, "--status", "Released", "--sdk-release-type", $sdkReleaseType) + if ($PackageVersion) { - Write-Host "Package version is missing or invalid for '$PackageName'. Updating release status without version metadata." + $releaseArgs += @("--package-version", $PackageVersion) } $releaseInfo = & $AzsdkExePath @releaseArgs if ($LASTEXITCODE -ne 0) { ## Not all releases have a release plan. So we should not fail the script even if a release plan is missing. - Write-Host "Release plan status was not updated for package '$PackageName'. Exit code: $LASTEXITCODE. Not all packages have a release plan." + Write-Host "Failed to mark release completion for package '$PackageName' using azsdk. Exit code: $LASTEXITCODE" } Write-Host "Details: $releaseInfo" - return } Write-Host "Finding all package info files in the path: $PackageInfoFilePath" # Get all package info file under the directory given in input param and process -foreach ($packageInfoFile in Get-ChildItem -Path $PackageInfoFilePath -Filter "*.json" -File) -{ - try - { - Write-Host "Processing package info file: $packageInfoFile" - Process-Package $packageInfoFile.FullName - } - catch - { - Write-Warning "Failed to update release status for '$packageInfoFile': $($_.Exception.Message)" - } -} - -# Status reporting must not change the outcome of an already completed package release. -exit 0 +Get-ChildItem -Path $PackageInfoFilePath -Filter "*.json" | ForEach-Object { + Write-Host "Processing package info file: $_" + Process-Package $_.FullName +} \ No newline at end of file diff --git a/eng/common/scripts/Resolve-AutoReleasePackages.ps1 b/eng/common/scripts/Resolve-AutoReleasePackages.ps1 index b92467a2539f..60c559027476 100644 --- a/eng/common/scripts/Resolve-AutoReleasePackages.ps1 +++ b/eng/common/scripts/Resolve-AutoReleasePackages.ps1 @@ -58,7 +58,6 @@ The path to the azsdk executable used for release operations. Defaults to the AZ Azure DevOps output variables (reference cross-stage via dependencies..outputs['..']): - HasAutoReleaseArtifacts : 'true' if at least one declared package is releasable - AutoReleaseArtifactsJson : JSON array of the matched declared-artifact objects (or '[]') - - AutoReleaseSdkPullRequestUrl : the SDK PR selected for this release, for release-stage status correlation - ReleaseArtifact_ : 'true'/'false' per declared artifact HasAutoReleaseArtifacts is the single eligibility gate: it is 'true' only when a merged, auto-release-labeled PR changed at least one declared package, and it is emitted last so any earlier failure fails closed. @@ -102,7 +101,6 @@ catch { # Fail-closed defaults: nothing releases unless we positively determine otherwise below. Set-PipelineVariable -Name 'HasAutoReleaseArtifacts' -Value 'false' -IsOutput Set-PipelineVariable -Name 'AutoReleaseArtifactsJson' -Value '[]' -IsOutput -Set-PipelineVariable -Name 'AutoReleaseSdkPullRequestUrl' -Value '' -IsOutput foreach ($artifact in $declaredArtifacts) { if ($artifact.PSObject.Properties['safeName'] -and $artifact.safeName) { Set-PipelineVariable -Name "ReleaseArtifact_$($artifact.safeName)" -Value 'false' -IsOutput @@ -240,8 +238,9 @@ function Invoke-AutoReleaseResolution { } if($AzsdkExePath) { + $sdkPullRequestUrl = $pr.html_url Write-Host "Updating release plan for package '$packageName' (artifact name: '$name', package name: '$packageName')" - $cliArgs = @("release-plan", "update-release-status", "--package-name", $packageName, "--language", $LanguageDisplayName, "--status", "Release In Progress", "--sdk-pull-request", $prLink) + $cliArgs = @("release-plan", "update-release-status", "--package-name", $packageName, "--language", $LanguageDisplayName, "--status", "Release In Progress", "--sdk-pull-request", $sdkPullRequestUrl) if ($PipelineUrl) { $cliArgs += @("--release-pipeline", $PipelineUrl) @@ -255,7 +254,7 @@ function Invoke-AutoReleaseResolution { if ($LASTEXITCODE -ne 0) { ## Not all releases have a release plan. So we should not fail the script even if a release plan is missing. - LogWarning "Failed to update release in progress status for package '$packageName' using azsdk. Exit code: $LASTEXITCODE" + Write-Host "Failed to update release in progress status for package '$packageName' using azsdk. Exit code: $LASTEXITCODE" } } else @@ -281,7 +280,6 @@ function Invoke-AutoReleaseResolution { # Pipe (not -InputObject) with -AsArray so a single match still serializes as a JSON array, '[{...}]'. $artifactsJson = $matchedArtifacts | ConvertTo-Json -Depth 100 -Compress -AsArray Set-PipelineVariable -Name 'AutoReleaseArtifactsJson' -Value $artifactsJson -IsOutput - Set-PipelineVariable -Name 'AutoReleaseSdkPullRequestUrl' -Value $prLink -IsOutput Write-Host "Auto-release packages from PR ${prLink}: $((@($matchedArtifacts | ForEach-Object { $_.name })) -join ', ')" Set-PipelineVariable -Name 'HasAutoReleaseArtifacts' -Value 'true' -IsOutput } @@ -300,7 +298,6 @@ catch { LogWarning "Auto-release resolution failed; skipping auto-release. $($_.Exception.Message)" Set-PipelineVariable -Name 'HasAutoReleaseArtifacts' -Value 'false' -IsOutput Set-PipelineVariable -Name 'AutoReleaseArtifactsJson' -Value '[]' -IsOutput - Set-PipelineVariable -Name 'AutoReleaseSdkPullRequestUrl' -Value '' -IsOutput foreach ($artifact in $declaredArtifacts) { if ($artifact.PSObject.Properties['safeName'] -and $artifact.safeName) { Set-PipelineVariable -Name "ReleaseArtifact_$($artifact.safeName)" -Value 'false' -IsOutput diff --git a/eng/common/scripts/eval/README.md b/eng/common/scripts/eval/README.md index d760c556bbc7..b934c0f9357a 100644 --- a/eng/common/scripts/eval/README.md +++ b/eng/common/scripts/eval/README.md @@ -7,172 +7,16 @@ the committed `package-lock.json` instead of resolved fresh from semver ranges o It lives under `eng/common` so it syncs to every repo that consumes the shared eval pipeline templates. -- This evaluator package's only dependency is `@microsoft/vally-cli`, pinned to the version CI should evaluate with. +- The only dependency should be `@microsoft/vally-cli`, pinned to the version CI should evaluate with. - `package-lock.json` must be committed so `npm ci` is deterministic. -- Optional Blob publication is isolated in [publisher](publisher/), with - its own pnpm package/lock for **fflate only** and CLI/PowerShell tests. Shard evaluator - restores do not install it; publication adds no Node Azure SDK dependencies. - -## Complete build results and direct Blob publishing - -Shards now retain the newest invocation's raw JSONL, JUnit and a completion marker -via [shard-results](lib/shard-results.ts), including failed evaluations. -Summary checks the full Prepare matrix and selects each expected shard's highest -attempt once for Markdown, the Tests tab and bundling. Missing, interrupted or -corrupt results remain incomplete; later failed attempts never fall back to older -successful artifacts. A separate step reads the current-build timeline with -`System.AccessToken` and three bounded transient retries, saving the latest attempt -evidence beside the summary. Rendering reads that file and needs no token or network. -Unverified or ambiguous attempts cannot authorize publication. The legacy JUnit-only -summary remains supported. No historical build download or reconstruction is involved. -The bundler accepts exactly one already-selected attempt per expected shard; it -does not repeat Summary's selection or accept an ambiguous list of attempts. - -The [publishing step](../../pipelines/templates/steps/eval-publish-results.yml) restores -the archive dependency with **pnpm 12.6.0** from the **default JavaScript feed**, prepares one saved ZIP -and a checksum/identity descriptor, then runs [Publish-EvalResults.ps1](publisher/Publish-EvalResults.ps1) -under `AzureCLI@2` using `eval-dashboard-sc`. The script uses `az storage blob upload`, -not a custom SDK transport. There is no enterprise checkout, dashboard file upload, -evaluator rerun or container creation. Bundle metadata is passed explicitly by YAML; -neither bundling nor upload interprets DevOps environment variables or publishing policy. -Shard/Summary jobs and publisher CI use Node 24; the publisher requires **24.14.1+**, -matching the specs repository. Its frozen `pnpm-lock.yaml` retains the reviewed -SHA512 checksum and no private registry URLs. `--ignore-workspace` prevents a -consumer's workspace from changing the install or pulling in unrelated packages. -The pipeline uses Node's bundled npm only to bootstrap the exact pnpm version into -the agent's temporary directory, with lifecycle scripts disabled. The same -authenticated `.npmrc` is used by both commands; no global tools are changed. -`--pm-on-fail=ignore` avoids pnpm resolving/downloading itself again after that -explicit bootstrap, without changing dependency checks or the frozen lock. - -| Control | Current use | -| --- | --- | -| `publishDashboardResults` | The only checkbox; defaults to `true` in the three tools entrypoints. Set `false` to disable both upload and Azure Storage egress | -| `EvalStorageAccountName` | Pipeline-owner configuration. Upload is skipped when absent; set it to `evaltestsummary` for this dashboard | -| `EvalDashboardRefreshUrl` | Pipeline-owner configuration: `https://azsdk-eval-bue6a7dwanatgpb3.westus3-01.azurewebsites.net/api/refresh` | -| `EvalDashboardResource` | Pipeline-owner configuration: `api://258998df-81ec-460c-bdd7-56a9bdde1e48` (resource URI, not a `/.default` scope) | -| `createDashboardBundle` | Shared-template artifact-only mode; enabled for all three tools entrypoints | - -The pipeline owner must set **`EvalStorageAccountName=evaltestsummary`** and the two -dashboard variables above in each onboarded DevOps pipeline, with **queue-time -override disabled** and edit permissions restricted. These settings are trusted -deployment configuration: the owner must verify the dashboard URL/API pairing. -The task passes values through environment mapping, never by evaluating their contents -as script code. This source change does not configure DevOps or grant -access. The dashboard reads that account's existing `vally-results` container; -publishing to another account does not redirect the reader. Service-connection -authorization, approved branch checks and existing RBAC remain required. - -Publishing policy stays in YAML: organization `https://dev.azure.com/azure-sdk/`, -project `internal`, repository `Azure/azure-sdk-tools`, exact `refs/heads/main`, and -a CI, scheduled or manual reason. There is no hardcoded definition-ID allowlist or -variable template in shared code. Feature branches, other repositories, PRs, pull -refs and public-project runs do not get the credential-bearing task. At runtime it -also requires a complete summary and a configured storage account. - -There is no separate automatic-publication, feature-branch override or network-access -flag. Publication requests the documented -[AzureStorage policy](https://aka.ms/1es/netiso/pipelinetemplates), which -keeps `DefaultDeny, CFSClean, CFSClean2, CFSClean3` and allows Azure Storage egress -for **all processes in that pipeline**, not just one container. It grants no RBAC -access. DevOps pipeline-stored variables are runtime values and cannot select a -compile-time 1ES policy: the checkbox and trusted-run checks select egress, while -the account variable additionally gates upload. An enabled trusted run can therefore -have storage egress even if the account variable is absent, but cannot upload. -Set the checkbox to `false` for artifact-only runs with no added storage egress. -Shared templates still default to no publication. Keep approvals, network restrictions -and existing consumer defaults unchanged. - -These entrypoints run real evaluations and consume model quota; there is no synthetic -pipeline mode. Completed failed evaluations publish before their existing test gate; -missing or incomplete results fail Summary and cannot publish. - -### Archive and retry contract - -For this dashboard, configure account `evaltestsummary`; the container remains `vally-results`. -An archive uses `v1//////dashboard-bundle.zip`. -It contains a schema-v1 manifest, executed plain-eval JSONL trials, Markdown and JUnit, -never debug files, MCP binaries or unrelated workspace contents. Non-executed skips -remain in raw artifacts and JUnit/Markdown; an entirely skipped shard is incomplete. - -Reader limits are **32 MiB ZIP, 128 MiB expanded, 10,000 entries and 100,000 trials**. -Canonical identities, UTC calendar dates, safe entries and counts are validated -before upload. Blob metadata records schema, SHA-256, hashed publisher identity and -the original storage time; Azure RBAC remains the authorization boundary. -Construction checks every required non-empty input, merged byte/trial limits and -the total entry count, including merged JSONL, before creating the ZIP. The final -compressed-size cap is checked afterward. Full ZIP decoding remains in contract -tests rather than reopening the archive in production. JSONL is decoded once and -parsed directly as text, with byte limits on both source and serialized records. - -Uploads use `--auth-mode login --overwrite false --if-none-match '*'` with the **same -saved ZIP**; Azure CLI owns transport retries, without another script/task retry loop. -Request/socket timeouts and the task deadline bound execution. Existing archives must match metadata, -owner, checksum and size. Changed content needs a new Summary attempt, not an overwrite. -The publisher never deletes archives; the dashboard's separate identity stays read-only. -The upload is confirmed and logged before notification. No local publication status -file is written; a failed notification does not change the stored archive or fail upload. - -### Notification and recovery - -Every successful publication attempts to send only `{blobName, sha256}` to -`EvalDashboardRefreshUrl`, using a token for `EvalDashboardResource`. No production -dashboard URL or API ID is hardcoded in the script. The URL must be a canonical -HTTPS App Service address ending exactly in `/api/refresh`, with no credentials, -nondefault port, query or fragment; the resource must be `api://`. -Validation happens before requesting a notification token. Missing or invalid -configuration preserves the uploaded archive, sends no token and warns. -The storage OAuth resource `https://storage.azure.com/` remains a platform constant, -not a deployment destination. For the values above, Azure CLI requests a token for -`api://258998df-81ec-460c-bdd7-56a9bdde1e48`; the dashboard -validates the Entra v2 token's GUID `aud`, not the `api://` resource string. -The application needs `Dashboard.Refresh` permission and the receiver's Easy Auth -client allowlist. Blob permission alone does not grant notification access. - -Signals are bounded to 2 KiB, retry at most four times, honor `Retry-After` and never -follow redirects. Failure is a warning after durable upload. Browser reload/startup -and daily reconciliation recover missed signals without changing source archives. -Do not replace viewer authentication or network restrictions to make a signal succeed. - -### Publisher tests and diagnostics - -With **Node 24.14.1+ and pnpm 12.6.0**, run `pnpm --ignore-workspace install ---pm-on-fail=ignore --frozen-lockfile --prod --ignore-scripts` and -`pnpm --ignore-workspace --pm-on-fail=ignore test` from `publisher`, -then `node --experimental-strip-types --test` from this directory. -Publisher tests require **PowerShell 7.4+ and -Pester 5**; pipeline upload uses the agent's authenticated Azure CLI. The existing -common-tests PR pipeline runs all shared/archive Node tests and discovers the tagged -PowerShell suite under `eng/common-tests/eval`; failures fail the CI job. -CI restores only the locked archive dependency, not the Vally evaluator. -Regression coverage includes the actual HTTP -cmdlet against loopback, invalid collision metadata, upload-before-notification -ordering and publication without local status files. -Construction regressions exercise the exact entry/trial boundaries, aggregate -expanded bytes, final compressed bytes, required inputs and UTF-8 JSONL limits. -The loopback fixture selects the first Node application when CI has multiple Node -installations on `PATH`. Configuration tests use synthetic hosts/resources and -prove invalid targets cannot request or receive notification tokens. -Tests use synthetic fixtures and fake Azure transports; -they do not evaluate models or contact production services. A real-run test remains -separate from local checks and should use an already approved evaluation run. - -The task logs the stored Blob name and notification outcome. Failures include a -bounded operation/error code, never raw Azure responses, tokens or result contents. -Token acquisition failures require checking the -service connection; Blob 403 requires checking its data-role scope; network failures -require checking approved egress. Preserve the original archive for conflicts, and -retry the signal or the same saved bytes for outages. Never substitute account keys, -relax TLS or broaden permissions to hide a failed request. ## TypeScript (no build step) The `*.ts` sources run directly through Node's native type stripping (erasable syntax only — -no `enum`/`namespace`/parameter properties, no emit). Shard/Summary jobs and publisher -CI use Node `24.x`; the publisher requires `>=24.14.1`. The older dependency-free -glue still supports its declared Node 22 minimum, but that is not the publisher's -runtime requirement. Relative imports use explicit `.ts` specifiers, as Node requires. -The standalone Blob publisher uses the same execution model; it adds no compiler or TypeScript runtime dependency. +no `enum`/`namespace`/parameter properties, no emit). CI pins Node `22.x`, which strips types +unflagged on `>=22.18`; the pipeline `node` invocations and the `npm test` script pass +`--experimental-strip-types` so the same sources also run on older local Node (`>=22.6`), which +prints a harmless `ExperimentalWarning`. Relative imports use explicit `.ts` specifiers, as Node requires. ## Vendored files @@ -201,7 +45,6 @@ cd ../../../.. ./eng/common/scripts/eval/node_modules/.bin/vally lint . ``` -This uses the same locked CLI as CI. A passing local run does not validate the -agent's credentials, network access, artifact permissions or live-service behavior. +This matches the CI job step-for-step, so a green local run on the current lockfile means a green CI run. A global install (`npm install -g @microsoft/vally-cli@`) still works for ad-hoc iteration, but it won't match the transitive dependency tree CI uses and isn't a substitute for the steps above when validating a version bump. diff --git a/eng/common/scripts/eval/build-eval-summary.ts b/eng/common/scripts/eval/build-eval-summary.ts index fb738b8f554a..c270821e6375 100644 --- a/eng/common/scripts/eval/build-eval-summary.ts +++ b/eng/common/scripts/eval/build-eval-summary.ts @@ -6,7 +6,6 @@ import fs from "node:fs"; import path from "node:path"; import { pathToFileURL } from "node:url"; import { globFiles } from "./lib/glob.ts"; -import { expectedShardsFromMatrix, selectSummaryResults } from "./lib/shard-results.ts"; // Maps a JUnit file path back to its shard and job attempt. Result artifacts download into // folders named `eval-result--` (the attempt suffix keeps "Rerun failed @@ -195,7 +194,7 @@ export function getEvalSummary(resultsRoot) { * @param {Record} shards Output of getEvalSummary. * @returns {string} Markdown. */ -export function formatEvalSummaryMarkdown(shards, incompleteShards = []) { +export function formatEvalSummaryMarkdown(shards) { const all = Object.values(shards); const shardCount = all.length; @@ -214,10 +213,7 @@ export function formatEvalSummaryMarkdown(shards, incompleteShards = []) { // A run that parsed zero testcases is NOT a pass — surface it as a loud NO RESULTS state. let overall; let overallIcon; - if (incompleteShards.length) { - overall = "INCOMPLETE"; - overallIcon = "⚠️"; - } else if (totalTests === 0) { + if (totalTests === 0) { overall = "NO RESULTS"; overallIcon = "⚠️"; } else if (totalFailed === 0) { @@ -235,13 +231,6 @@ export function formatEvalSummaryMarkdown(shards, incompleteShards = []) { lines.push(`## ${overallIcon} Vally eval results — ${overall}`); lines.push(""); - if (incompleteShards.length) { - lines.push("> Some expected shards are missing or incomplete. The available results below are **not** a complete build result; no dashboard bundle will be uploaded."); - lines.push(""); - for (const shard of incompleteShards) lines.push(`- **${shard.shard}**: ${shard.reason}`); - lines.push(""); - } - if (totalTests === 0) { lines.push(`No scenarios were found across ${shardCount} shard(s).`); lines.push(""); @@ -324,27 +313,16 @@ export function formatEvalSummaryMarkdown(shards, incompleteShards = []) { function parseArgs(argv) { const options = { outputPath: "eval-summary.md" }; for (let i = 0; i < argv.length; i++) { - const arg = argv[i]; - const next = () => { - const value = argv[++i]; - if (!value || value.startsWith("--")) throw new Error(`Missing value for ${arg}`); - return value; - }; - switch (arg) { + const next = () => argv[++i]; + switch (argv[i]) { case "--results-root": options.resultsRoot = next(); break; case "--output-path": options.outputPath = next(); break; - case "--selected-root": - options.selectedRoot = next(); - break; - case "--attempts-file": - options.attemptsFile = next(); - break; default: - throw new Error(`Unknown argument: ${arg}`); + throw new Error(`Unknown argument: ${argv[i]}`); } } if (!options.resultsRoot) { @@ -353,83 +331,25 @@ function parseArgs(argv) { return options; } -async function main(argv) { +function main(argv) { const options = parseArgs(argv); - fs.mkdirSync(path.dirname(path.resolve(options.outputPath)), { recursive: true }); - fs.mkdirSync(options.resultsRoot, { recursive: true }); - let selection = null; - if (options.selectedRoot) { - let expectedShards = []; - let matrixValid = true; - try { - expectedShards = expectedShardsFromMatrix(process.env.EVAL_EXPECTED_MATRIX); - } catch { - matrixValid = false; - } - // Even a failed Prepare must use an empty destination, not stale selected results. - let jobAttempts = { schemaVersion: 1, valid: false, attempts: {} }; - if (matrixValid && options.attemptsFile) { - try { - const stat = fs.lstatSync(options.attemptsFile); - if (!stat.isFile() || stat.size > 2 * 1024 * 1024) throw new Error("Invalid attempt evidence."); - jobAttempts = JSON.parse(fs.readFileSync(options.attemptsFile, "utf8")); - } - catch { - console.warn("##vso[task.logissue type=warning]Latest shard attempts could not be verified; Summary will retain diagnostics but refuse publication."); - } - } - selection = selectSummaryResults({ resultsRoot: options.resultsRoot, - selectedRoot: options.selectedRoot, expectedShards, jobAttempts }); - if (!matrixValid) { - selection.status.push({ shard: "Prepare", attempt: null, complete: false, - reason: "The expected shard matrix is unavailable or invalid; check the Prepare stage." }); - } - } - const shards = getEvalSummary(options.selectedRoot ?? options.resultsRoot); - if (selection) { - for (const entry of selection.status) { - if (entry.complete && !shards[entry.shard]?.total) { - entry.complete = false; - entry.reason = "The selected JUnit contains no evaluation testcases."; - } - } - selection.complete = selection.status.every((entry) => entry.complete); - selection.shardInput.complete = selection.complete; - fs.writeFileSync(path.join(options.resultsRoot, "shard-index.json"), JSON.stringify(selection.shardInput, null, 2) + "\n"); - } - let markdown = formatEvalSummaryMarkdown(shards, selection?.status.filter((entry) => !entry.complete) ?? []); - if (selection) { - markdown += "\n### Selected shard attempts\n\n| Shard | Attempt | Result data |\n| --- | ---: | --- |\n"; - for (const entry of selection.status) markdown += `| ${entry.shard} | ${entry.attempt ?? "—"} | ${entry.complete ? "Complete" : "Incomplete"} |\n`; - fs.writeFileSync(path.join(path.dirname(options.outputPath), "eval-summary.json"), JSON.stringify({ - schemaVersion: 1, complete: selection.complete, shards: selection.status, - totals: Object.values(shards).reduce((totals, shard) => ({ scenarios: totals.scenarios + shard.total, - failed: totals.failed + shard.failed, skipped: totals.skipped + shard.skipped }), { scenarios: 0, failed: 0, skipped: 0 }), - }, null, 2) + "\n"); - } + const shards = getEvalSummary(options.resultsRoot); + const markdown = formatEvalSummaryMarkdown(shards); fs.writeFileSync(options.outputPath, markdown, "utf8"); console.log(markdown); if (process.env.TF_BUILD) { console.log(`##vso[task.uploadsummary]${path.resolve(options.outputPath)}`); - if (selection) console.log(`##vso[task.setvariable variable=EvalSummaryComplete]${selection.complete}`); } - // Completed evaluation failures remain governed by failOnFailedTests. Missing result - // data is an infrastructure failure, reported after retaining a diagnostic summary. - if (selection && !selection.complete) process.exitCode = 1; - return shards; } if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { try { - await main(process.argv.slice(2)); + main(process.argv.slice(2)); } catch (error) { - if (process.env.TF_BUILD && process.argv.includes("--selected-root")) { - console.log("##vso[task.setvariable variable=EvalSummaryComplete]false"); - } console.error(error.message); process.exit(1); } diff --git a/eng/common/scripts/eval/lib/shard-results.ts b/eng/common/scripts/eval/lib/shard-results.ts deleted file mode 100644 index c38925562c4d..000000000000 --- a/eng/common/scripts/eval/lib/shard-results.ts +++ /dev/null @@ -1,271 +0,0 @@ -// Dependency-free artifact staging/selection shared by eval pipeline consumers. -// Publish an incomplete marker even when an invocation fails before producing results; -// a later incomplete attempt must never fall back to an older successful attempt. -import fs from "node:fs"; -import path from "node:path"; -import { setTimeout as delay } from "node:timers/promises"; -import { parseArgs } from "node:util"; -import { pathToFileURL } from "node:url"; -import { globFiles } from "./glob.ts"; - -// No individual result can exceed the bundle's expanded-size ceiling. Check before -// copying/reading whole files; completion metadata should never approach this size. -const MAX_RESULT_BYTES = 128 * 1024 * 1024; -const MAX_METADATA_BYTES = 64 * 1024; -const MISSING_RESULTS = "The invocation is missing trials, JUnit, or its final run-summary."; - -function validShard(name) { - return typeof name === "string" && /^[A-Za-z0-9_][A-Za-z0-9_-]{0,199}$/.test(name); -} - -export function expectedShardsFromMatrix(value) { - const matrix = typeof value === "string" ? JSON.parse(value) : value; - if (!matrix || typeof matrix !== "object" || Array.isArray(matrix)) { - throw new Error("The Prepare stage's eval matrix is required to check result completeness."); - } - const names = Object.values(matrix).map((entry) => entry?.shardName); - if (!names.length || names.some((name) => !validShard(name)) || new Set(names).size !== names.length) { - throw new Error("The eval matrix must contain unique, non-empty shard names."); - } - return names.sort(); -} - -// The artifact list cannot reveal a newer retry that lost its agent before publishing. -export function latestShardAttempts(timeline, matrix) { - expectedShardsFromMatrix(matrix); - if (!Array.isArray(timeline?.records)) throw new Error("The current build timeline is required."); - const attempts = {}; - for (const [key, entry] of Object.entries(matrix)) { - if (!validShard(key)) throw new Error("Invalid matrix leg identity."); - const jobs = timeline.records.filter(record => record?.type === "Job" && record.identifier === `Eval.RunShard.${key}`); - for (const record of jobs) { - if (!Number.isSafeInteger(record.attempt) || record.attempt < 1) throw new Error("Invalid timeline attempt."); - const current = { attempt: record.attempt, complete: record.state === "completed" && - ["succeeded", "succeededWithIssues", "failed"].includes(record.result) }; - const previous = attempts[entry.shardName]; - if (previous?.attempt === current.attempt && previous.complete !== current.complete) throw new Error("Ambiguous timeline attempt."); - if (!previous || previous.attempt < current.attempt) attempts[entry.shardName] = current; - } - if (!attempts[entry.shardName]) throw new Error("An expected matrix job is missing from the current build timeline."); - } - return { schemaVersion: 1, valid: true, attempts }; -} - -export async function readShardAttempts(env, { fetchImpl = fetch, wait = delay } = {}) { - const base = new URL(env.SYSTEM_COLLECTIONURI), matrix = JSON.parse(env.EVAL_EXPECTED_MATRIX); - expectedShardsFromMatrix(matrix); - if (base.protocol !== "https:" || base.hostname !== "dev.azure.com" || base.port || base.username || base.password || base.search || base.hash || - !/^\/[a-z0-9][a-z0-9-]{0,99}\/$/i.test(base.pathname) || !env.SYSTEM_ACCESSTOKEN || - !/^[a-f0-9-]{36}$/i.test(env.SYSTEM_TEAMPROJECTID ?? "") || !/^[1-9][0-9]*$/.test(env.BUILD_BUILDID ?? "")) { - throw new Error("Current build identity/token missing."); - } - const url = new URL(`${env.SYSTEM_TEAMPROJECTID}/_apis/build/builds/${env.BUILD_BUILDID}/timeline?api-version=7.1`, base); - for (let attempt = 0; attempt < 3; attempt++) { - let response; - try { - response = await fetchImpl(url, { headers: { authorization: `Bearer ${env.SYSTEM_ACCESSTOKEN}` }, - redirect: "error", signal: AbortSignal.timeout(30_000) }); - if (!response.ok) throw new Error("Timeline could not be read."); - return latestShardAttempts(await response.json(), matrix); - } catch (error) { - if ((response && ![408, 429, 500, 502, 503, 504].includes(response.status)) || attempt === 2) throw error; - } finally { await response?.body?.cancel().catch(() => {}); } - const header = response?.headers?.get("retry-after"), seconds = Number(header); - const milliseconds = header && Number.isFinite(seconds) ? seconds * 1000 : header ? Date.parse(header) - Date.now() : NaN; - await wait(Math.min(30_000, Math.max(0, Number.isFinite(milliseconds) ? milliseconds : 1000 * 2 ** attempt))); - } -} - -function emptyDirectory(directory) { - fs.mkdirSync(directory, { recursive: true }); - if (!fs.lstatSync(directory).isDirectory() || fs.readdirSync(directory).length) { - throw new Error(`Output directory must be empty and not a symbolic link: ${directory}`); - } -} - -function checkResultFile(file, limit = MAX_RESULT_BYTES) { - const stat = fs.lstatSync(file); - if (!stat.isFile() || stat.size > limit) { - throw new Error("Result files must be regular files within the size limit."); - } -} - -function readResultFile(file, limit = MAX_RESULT_BYTES) { - checkResultFile(file, limit); - return fs.readFileSync(file, "utf8"); -} - -function copyResultFile(source, destination) { - checkResultFile(source); - fs.copyFileSync(source, destination, fs.constants.COPYFILE_EXCL); -} - -function inspectInvocation(file) { - const result = { complete: false, trials: 0, reason: MISSING_RESULTS }; - try { - let summary; - // Iterate lines without allocating an array proportional to the newline count. - for (const [line] of readResultFile(file).matchAll(/[^\n]+/g)) { - if (!line.trim()) continue; - const record = JSON.parse(line); - if (!record || typeof record !== "object" || Array.isArray(record)) { - throw new Error("Invalid JSONL record."); - } - if (record.type === "run-summary") summary = record; - else if ((record.type === undefined || record.type === "trial-result") && ["success", "error"].includes(record.status)) { - result.trials++; - summary = undefined; - } - } - result.complete = Boolean(result.trials && Array.isArray(summary?.evals) && summary.evals.length); - result.reason = result.complete ? null : MISSING_RESULTS; - } catch { - // Do not log JSON.parse errors: they can include raw evaluation content. - result.reason = "The invocation contains incomplete, invalid, unreadable, or oversized JSONL."; - } - return result; -} - -export function stageShardResults({ resultsRoot, outputDirectory, shardName, attempt }) { - if (!validShard(shardName) || !Number.isSafeInteger(attempt) || attempt < 1) { - throw new Error("A valid shard name and positive job attempt are required."); - } - emptyDirectory(outputDirectory); - fs.mkdirSync(path.join(outputDirectory, "junit")); - const metadata = { - schemaVersion: 1, shard: shardName, attempt, complete: false, trials: 0, - reason: "No results.jsonl was produced.", - }; - const marker = path.join(outputDirectory, "shard.json"); - fs.writeFileSync(marker, JSON.stringify(metadata, null, 2) + "\n"); - try { - // Match lib/verdict.ts exactly: globFiles sorts paths, and the last path wins - // an mtime tie. localeCompare sorting would choose a different invocation. - let source; - let newest = -Infinity; - for (const file of globFiles(resultsRoot, "**/results.jsonl")) { - const mtime = fs.statSync(file).mtimeMs; - if (mtime >= newest) { - newest = mtime; - source = file; - } - } - if (source) { - const junit = globFiles(path.dirname(source), "**/*.junit.xml"); - let junitComplete = junit.length > 0; - for (const [index, file] of junit.entries()) { - try { - copyResultFile(file, path.join(outputDirectory, "junit", `${index}.junit.xml`)); - } catch { - junitComplete = false; - } - } - const stagedResults = path.join(outputDirectory, "results.jsonl"); - copyResultFile(source, stagedResults); - // Inspect the staged snapshot, not a source file that could still change. - Object.assign(metadata, inspectInvocation(stagedResults)); - if (!junitComplete) { - metadata.complete = false; - metadata.reason ??= MISSING_RESULTS; - } - } - } catch { - metadata.complete = false; - metadata.reason = "The invocation contains unreadable or oversized result files."; - } - fs.writeFileSync(marker, JSON.stringify(metadata, null, 2) + "\n"); - return metadata; -} - -export function selectSummaryResults({ resultsRoot, selectedRoot, expectedShards, jobAttempts }) { - if (!Array.isArray(expectedShards) || expectedShards.some((name) => !validShard(name)) || - new Set(expectedShards).size !== expectedShards.length) { - throw new Error("Expected shards must be unique, valid shard names from Prepare."); - } - emptyDirectory(selectedRoot); - const expected = new Set(expectedShards); - const selected = new Map(); - const seen = new Set(); - for (const entry of fs.readdirSync(resultsRoot, { withFileTypes: true })) { - const match = /^eval-result-(.+)-(\d+)$/.exec(entry.name); - if (!match || !expected.has(match[1])) continue; - if (!entry.isDirectory()) throw new Error("Shard artifact paths must be directories, not files or symbolic links."); - const attempt = Number(match[2]); - if (!Number.isSafeInteger(attempt) || attempt < 1) throw new Error("Invalid shard artifact attempt."); - const identity = `${match[1]}:${attempt}`; - if (seen.has(identity)) throw new Error(`Duplicate artifact attempt for ${match[1]}.`); - seen.add(identity); - const previous = selected.get(match[1]); - if (!previous || previous.attempt < attempt) { - selected.set(match[1], { shard: match[1], attempt, directory: entry.name }); - } - } - const status = []; - for (const shard of expectedShards) { - const selectedAttempt = selected.get(shard); - if (!selectedAttempt) { - status.push({ shard, attempt: null, complete: false, reason: "No artifact was published." }); - continue; - } - const directory = path.join(resultsRoot, selectedAttempt.directory); - const junit = globFiles(directory, "junit/*.junit.xml"); - let complete = false; - let reason = "The artifact is missing valid completion metadata or result files."; - try { - const metadata = JSON.parse(readResultFile(path.join(directory, "shard.json"), MAX_METADATA_BYTES)); - complete = metadata.schemaVersion === 1 && metadata.shard === shard && metadata.attempt === selectedAttempt.attempt && - metadata.complete === true && Number.isSafeInteger(metadata.trials) && metadata.trials > 0 && junit.length > 0; - if (complete) { - const invocation = inspectInvocation(path.join(directory, "results.jsonl")); - complete = invocation.complete && invocation.trials === metadata.trials; - } - if (!complete && metadata.complete === false) reason = "The latest shard attempt did not produce a complete invocation."; - } catch { /* Retain available JUnit below, but do not adopt an incomplete artifact for upload. */ } - if (jobAttempts?.valid !== true || jobAttempts.schemaVersion !== 1 || - jobAttempts.attempts?.[shard]?.attempt !== selectedAttempt.attempt || jobAttempts.attempts[shard].complete !== true) { - complete = false; - reason = "The latest timeline job attempt has no matching complete artifact, or its status could not be verified."; - } - // The Tests tab and Markdown use the SAME selected attempts as the bundle. - // Old-layout JUnit remains diagnostic; old artifacts are never upload-ready. - const files = junit.length ? junit : globFiles(directory, "**/*.junit.xml"); - const output = path.join(selectedRoot, selectedAttempt.directory, "junit"); - fs.mkdirSync(output, { recursive: true }); - for (const [index, file] of files.entries()) { - try { - copyResultFile(file, path.join(output, `${index}.junit.xml`)); - } catch { - complete = false; - reason = "The selected JUnit result files are unreadable or exceed the size limit."; - } - } - status.push({ shard, attempt: selectedAttempt.attempt, complete, reason: complete ? null : reason }); - } - const complete = status.length > 0 && status.every((entry) => entry.complete); - const shardInput = { - schemaVersion: 1, complete, expectedShards, - attempts: [...selected.values()].sort((a, b) => a.shard.localeCompare(b.shard)), - }; - fs.writeFileSync(path.join(resultsRoot, "shard-index.json"), JSON.stringify(shardInput, null, 2) + "\n"); - return { complete, status, shardInput }; -} - -if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { - try { - const { values } = parseArgs({ options: { "results-root": { type: "string" }, "output-directory": { type: "string" }, - "shard-name": { type: "string" }, attempt: { type: "string" }, "attempts-output": { type: "string" } } }); - if (values["attempts-output"]) { - let result = { schemaVersion: 1, valid: false, attempts: {} }; - try { result = await readShardAttempts(process.env); } - catch { console.log("##vso[task.logissue type=warning]Current build attempts could not be verified; no complete bundle will be published."); } - fs.mkdirSync(path.dirname(path.resolve(values["attempts-output"])), { recursive: true }); - fs.writeFileSync(values["attempts-output"], JSON.stringify(result, null, 2) + "\n"); - } else { - if (!values["results-root"] || !values["output-directory"]) throw new Error("Results and output directories are required."); - const result = stageShardResults({ resultsRoot: values["results-root"], outputDirectory: values["output-directory"], - shardName: values["shard-name"], attempt: Number(values.attempt) }); - console.log(`Staged ${result.shard} attempt ${result.attempt}: ${result.trials} trials; ${result.complete ? "complete" : "incomplete"}.`); - if (!result.complete) console.log(`##vso[task.logissue type=warning]${result.reason}`); - } - } catch (error) { console.error(error.message); process.exitCode = 1; } -} \ No newline at end of file diff --git a/eng/common/scripts/eval/publisher/CHANGELOG.md b/eng/common/scripts/eval/publisher/CHANGELOG.md deleted file mode 100644 index 60fbc50525a8..000000000000 --- a/eng/common/scripts/eval/publisher/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Changelog - -## Unreleased - -- Retain one complete, latest-attempt evaluation archive per build in Blob storage. -- Use authenticated Azure CLI publication instead of a custom Node Azure SDK transport. -- Read the storage account from pipeline-owned configuration and keep publishing policy in YAML. -- Pass archive identity explicitly and isolate token-bearing timeline verification from summary rendering. -- Preserve create-only uploads, checksum/provenance metadata and authenticated notification recovery. -- Run shared/archive Node tests and tagged publisher PowerShell tests in the existing Windows/Linux PR CI job, without evaluations. -- Treat real redirect exceptions as permanent and reject noncanonical collision timestamps. -- Read the dashboard refresh URL and Entra API resource from protected pipeline variables, validating both before acquiring notification credentials. -- Preserve uploaded archives when notification configuration is missing or invalid, and handle multiple Node installations in hosted CI regression tests. -- Remove optional local publication status files; log confirmed uploads before attempting warning-only dashboard notifications. -- Use Node 24.14.1+ and pinned pnpm 12.6.0 for the publisher, with a portable SHA512 lock and frozen installs isolated from consuming workspaces. -- Enforce required entries and byte/trial/entry budgets during construction, including merged JSONL, instead of decoding the new ZIP again. -- Validate exactly one Summary-selected attempt per expected shard and parse JSONL strings directly without repeated Buffer conversions. \ No newline at end of file diff --git a/eng/common/scripts/eval/publisher/Publish-EvalResults.ps1 b/eng/common/scripts/eval/publisher/Publish-EvalResults.ps1 deleted file mode 100644 index a68588d08c44..000000000000 --- a/eng/common/scripts/eval/publisher/Publish-EvalResults.ps1 +++ /dev/null @@ -1,135 +0,0 @@ -# Uploads one saved archive with Azure CLI, then signals the dashboard without local status files. -#requires -Version 7.4 -[CmdletBinding()] -param( - [Parameter(Mandatory)] [ValidatePattern('^[a-z0-9]{3,24}$')] [string] $StorageAccountName, - [Parameter(Mandatory)] [string] $BundlePath, - [string] $DashboardRefreshUrl = '', - [string] $DashboardResource = '' -) - -Set-StrictMode -Version 4 -$ErrorActionPreference = 'Stop' - -function Invoke-AzJson([string[]] $Arguments) { - # Capture all CLI output, especially tokens and errors; never echo raw Azure responses. - $output = az @Arguments --only-show-errors --output json 2>&1 - if ($LASTEXITCODE -ne 0) { throw 'Azure CLI operation failed.' } - # ConvertFrom-Json auto-converts ISO strings into dates on some PowerShell versions. - # Keep Blob metadata strings exact, including their required UTC Z suffix. - $document = [System.Text.Json.JsonDocument]::Parse($output -join "`n") - try { return $document.RootElement.Clone() } finally { $document.Dispose() } -} - -$operation = 'validate_inputs' -$failureCode = 'invalid_bundle' -$stored = $false -try { - $BundlePath = [System.IO.Path]::GetFullPath($BundlePath) - $archive = Get-Item -LiteralPath $BundlePath - $descriptor = Get-Item -LiteralPath "$BundlePath.json" - if ($archive.PSIsContainer -or $archive.LinkType -or $archive.Length -le 0 -or $archive.Length -gt 32MB -or - $descriptor.PSIsContainer -or $descriptor.LinkType -or $descriptor.Length -gt 64KB) { throw 'Invalid saved archive.' } - $prepared = Get-Content -LiteralPath $descriptor.FullName -Raw | ConvertFrom-Json -AsHashtable - $hash = (Get-FileHash -LiteralPath $BundlePath -Algorithm SHA256).Hash.ToLowerInvariant() - $name = [string] $prepared.blobName - if ($prepared.bytes -ne $archive.Length -or $prepared.sha256 -cne $hash -or $name.Length -gt 800 -or - $name -cnotmatch '^v1/[a-z0-9][a-z0-9-]{0,99}/(?:[a-z0-9_.~-]|%[0-9A-F]{2})+/[1-9][0-9]{0,19}/[1-9][0-9]{0,19}/[1-9][0-9]*/dashboard-bundle\.zip$') { - throw 'Archive identity or checksum differs from its preparation descriptor.' - } - - # Deployment values belong to protected pipeline configuration, not queue-time input. - # Never acquire a notification token for a noncanonical or non-App-Service destination. - $refreshUri = $null - $notificationValid = $DashboardRefreshUrl.Length -le 2048 -and - [Uri]::TryCreate($DashboardRefreshUrl, [UriKind]::Absolute, [ref]$refreshUri) -and - $refreshUri.Scheme -ceq 'https' -and $refreshUri.IsDefaultPort -and - $refreshUri.Host -match '^[a-z0-9][a-z0-9.-]*\.azurewebsites\.net$' -and - !$refreshUri.UserInfo -and !$refreshUri.Query -and !$refreshUri.Fragment -and - $refreshUri.AbsolutePath -ceq '/api/refresh' -and $refreshUri.AbsoluteUri -ceq $DashboardRefreshUrl -and - $DashboardResource -cmatch '^api://[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}\z' - - $operation = 'acquire_storage_identity' - $failureCode = 'storage_identity' - $token = (Invoke-AzJson -Arguments @('account', 'get-access-token', '--resource', 'https://storage.azure.com/')).GetProperty('accessToken').GetString() - $payload = $token.Split('.')[1].Replace('-', '+').Replace('_', '/') - $claims = [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($payload.PadRight([int]([Math]::Ceiling($payload.Length / 4) * 4), '='))) | ConvertFrom-Json -AsHashtable - foreach ($key in @('tid', 'oid')) { - if ($claims[$key] -notmatch '^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$') { throw 'Invalid publisher identity.' } - } - $owner = [Convert]::ToHexString([System.Security.Cryptography.SHA256]::HashData([System.Text.Encoding]::UTF8.GetBytes("$($claims.tid):$($claims.oid)"))).ToLowerInvariant() - $storedAt = [DateTime]::UtcNow.ToString('o') - $storage = @('--account-name', $StorageAccountName, '--container-name', 'vally-results', '--name', $name, '--auth-mode', 'login') - - $operation = 'publish_blob' - $failureCode = 'publication_failed' - $duplicate = $false - try { - # CLI owns transport retries. Never overwrite, rebuild the ZIP, or create a container. - Invoke-AzJson -Arguments (@('storage', 'blob', 'upload') + $storage + @('--file', $BundlePath, - '--type', 'block', '--overwrite', 'false', '--if-none-match', '*', '--content-type', 'application/zip', - '--metadata', 'schema=1', "sha256=$hash", "publisher=$owner", "storedat=$storedAt", '--timeout', '30', '--socket-timeout', '30')) | Out-Null - } catch { - # Also covers a lost success response: adopt only the same already-stored archive. - $operation = 'verify_existing_blob' - $saved = Invoke-AzJson -Arguments (@('storage', 'blob', 'show') + $storage + @('--timeout', '30')) - $failureCode = 'submission_conflict' - $metadata = $saved.GetProperty('metadata') - $savedTime = $metadata.GetProperty('storedat').GetString() - $parsedTime = [DateTimeOffset]::MinValue - # Accept canonical UTC time only; .NET's loose parser otherwise admits spaces - # that the dashboard rejects. Truncate fractions to the reader's millisecond precision. - $validTime = $savedTime -cmatch '^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?Z\z' -and - [DateTimeOffset]::TryParse(($savedTime -replace '(\.\d{3})\d+(?=Z\z)', '$1'), [Globalization.CultureInfo]::InvariantCulture, [Globalization.DateTimeStyles]::None, [ref]$parsedTime) -and - $parsedTime.UtcDateTime.ToString('yyyy-MM-dd') -ceq $savedTime.Substring(0, 10) - if ($saved.GetProperty('properties').GetProperty('contentLength').GetInt64() -ne $archive.Length -or $metadata.GetProperty('schema').GetString() -cne '1' -or - $metadata.GetProperty('sha256').GetString() -cne $hash -or $metadata.GetProperty('publisher').GetString() -cne $owner -or !$validTime) { throw 'Conflicting archive.' } - $duplicate = $true - } - - $stored = $true - Write-Host "Result archive stored: $name (duplicate: $duplicate)." - - $body = @{ blobName = $name; sha256 = $hash } | ConvertTo-Json -Compress - if ([System.Text.Encoding]::UTF8.GetByteCount($body) -gt 2048) { throw 'Invalid refresh signal.' } - $notificationSucceeded = $false - for ($attempt = 0; $notificationValid -and $attempt -lt 4; $attempt++) { - $status = 0; $headers = @{} - try { - $token = (Invoke-AzJson -Arguments @('account', 'get-access-token', '--resource', $DashboardResource)).GetProperty('accessToken').GetString() - $response = Invoke-WebRequest -Uri $refreshUri ` - -Method Post -ContentType 'application/json' -Body $body -Headers @{ Authorization = "Bearer $token" } ` - -MaximumRedirection 0 -TimeoutSec 180 -OperationTimeoutSeconds 180 -SkipHttpErrorCheck - $status = [int]$response.StatusCode; $headers = $response.Headers - if ($status -eq 200) { - $report = $response.Content | ConvertFrom-Json -AsHashtable - if ($report.status -eq 'succeeded' -and $report.failureCount -eq 0) { - $notificationSucceeded = $true; break - } - } - } catch { - # Redirect errors can throw even with SkipHttpErrorCheck. Never retry/follow them. - if ($_.FullyQualifiedErrorId.Split(',')[0] -eq 'MaximumRedirectExceeded') { $status = 302 } - elseif ($_.Exception.PSObject.Properties['Response'] -and $_.Exception.Response) { $status = [int]$_.Exception.Response.StatusCode } - } - if (($status -ne 0 -and $status -ne 200 -and $status -notin @(408, 429, 500, 502, 503, 504)) -or $attempt -eq 3) { break } - $seconds = [Math]::Pow(2, $attempt) - if ($headers['Retry-After']) { - $value = [string]($headers['Retry-After'] | Select-Object -First 1) - $retryDate = [DateTimeOffset]::MinValue; $retrySeconds = 0.0 - if ([double]::TryParse($value, [ref]$retrySeconds) -and [double]::IsFinite($retrySeconds)) { $seconds = $retrySeconds } - elseif ([DateTimeOffset]::TryParse($value, [ref]$retryDate)) { $seconds = ($retryDate - [DateTimeOffset]::UtcNow).TotalSeconds } - } - Start-Sleep -Milliseconds ([int]([Math]::Clamp($seconds, 0, 60) * 1000)) - } - if (!$notificationValid) { Write-Warning 'Archive stored; dashboard notification configuration is missing or invalid. Reload/startup/daily reconciliation can recover it.' } - elseif (!$notificationSucceeded) { Write-Warning 'Archive stored; dashboard refresh failed. Reload/startup/daily reconciliation can recover it.' } - else { Write-Host 'Dashboard refresh succeeded.' } -} catch { - # Raw CLI output and exceptions can contain tokens. Stored data needs no local status file. - if ($stored) { - Write-Warning 'Archive stored; dashboard refresh failed. Reload/startup/daily reconciliation can recover it.' - } else { - throw "Evaluation publication failed: $operation ($failureCode). No raw Azure response was logged." - } -} \ No newline at end of file diff --git a/eng/common/scripts/eval/publisher/bundle.ts b/eng/common/scripts/eval/publisher/bundle.ts deleted file mode 100644 index a2a06f32e2ce..000000000000 --- a/eng/common/scripts/eval/publisher/bundle.ts +++ /dev/null @@ -1,201 +0,0 @@ -// Schema-v1 wire contract consumed by the read-only Vally dashboard. This module -// packages existing records only; it never executes an evaluation or calls an LLM. -import { createHash } from "node:crypto"; -import { lstat, mkdir, readFile, readdir, realpath, writeFile } from "node:fs/promises"; -import { dirname, join, resolve, sep } from "node:path"; -import { pathToFileURL } from "node:url"; -import { parseArgs } from "node:util"; -import { strToU8, unzipSync, zipSync } from "fflate"; - -export const MAX_ZIP_BYTES = 32 * 1024 * 1024; -export const MAX_EXPANDED_BYTES = 128 * 1024 * 1024; -const MAX_ENTRIES = 10_000; -const MAX_TRIALS = 100_000; - -export class PublicationError extends Error { - constructor(code, message) { super(message); this.code = code; } -} - -function requireValue(condition, message) { - if (!condition) throw new PublicationError("invalid_bundle", message); -} - -function parseJson(text) { - try { return JSON.parse(text); } - catch { throw new PublicationError("invalid_bundle", "Invalid result JSON; raw evaluation content was not logged."); } -} - -export const sha256 = (bytes) => createHash("sha256").update(bytes).digest("hex"); - -export function isUtcTimestamp(value) { - if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.*Z$/.test(value)) return false; - const timestamp = Date.parse(value); - // Date.parse normalizes impossible dates; the dashboard rejects that rollover. - return Number.isFinite(timestamp) && new Date(timestamp).toISOString().slice(0, 10) === value.slice(0, 10); -} - -export async function boundedFile(path, maximum = MAX_EXPANDED_BYTES) { - const stat = await lstat(path); - requireValue(stat.isFile() && stat.size > 0 && stat.size <= maximum, "Result input must be a non-empty regular file within the size limit."); - const bytes = await readFile(path); - requireValue(bytes.length === stat.size, "Result input changed while being read."); - return bytes; -} - -export function validateManifest(value) { - requireValue(value?.schemaVersion === 1 && !Array.isArray(value), "A schema-v1 manifest is required."); - for (const key of ["adoOrganization", "adoProject", "repo", "pipeline", "runTimestamp"]) { - requireValue(typeof value[key] === "string" && value[key].trim().length > 0 && value[key].length <= 200 && - value[key] === value[key].trim() && !/[\u0000-\u001f\u007f]/.test(value[key]), - "Manifest identity fields must be bounded, trimmed non-empty strings."); - } - // The reader trims identity fields before deriving its canonical Blob name. - // Reject padding here rather than publishing an archive the reader cannot import. - requireValue(/^[a-z0-9][a-z0-9-]{0,99}$/.test(value.adoOrganization) && - !/[\\/:]/.test(value.adoProject) && !/^\.+$/.test(value.adoProject), "Invalid Azure DevOps organization/project identity."); - for (const key of ["pipelineDefinitionId", "buildId"]) { - requireValue(typeof value[key] === "string" && /^[1-9][0-9]{0,19}$/.test(value[key]), "Positive numeric pipeline/build IDs are required."); - } - requireValue(Number.isSafeInteger(value.summaryAttempt) && value.summaryAttempt > 0, "A positive Summary attempt is required."); - requireValue(isUtcTimestamp(value.runTimestamp), "A valid UTC result timestamp is required."); - if (value.branch !== undefined) requireValue(typeof value.branch === "string" && value.branch.trim().length > 0 && value.branch === value.branch.trim() && - value.branch.length <= 200 && !/[\u0000-\u001f\u007f]/.test(value.branch), "Invalid source branch."); - if (value.sourceVersion !== undefined) requireValue(typeof value.sourceVersion === "string" && /^[a-fA-F0-9]{40,64}$/.test(value.sourceVersion), "A source commit SHA is required."); - return value; -} - -export function blobName(manifest) { - validateManifest(manifest); - const name = ["v1", manifest.adoOrganization, manifest.adoProject.toLowerCase(), manifest.pipelineDefinitionId, - manifest.buildId, String(manifest.summaryAttempt)].map(encodeURIComponent).join("/") + "/dashboard-bundle.zip"; - requireValue(name.length <= 800, "The encoded archive name exceeds the dashboard limit."); - return name; -} - -export function validateSelectedAttempts(index) { - requireValue(index?.schemaVersion === 1 && index.complete === true && Array.isArray(index.expectedShards) && - index.expectedShards.length > 0 && Array.isArray(index.attempts), "Only a complete expected-shard index can be published."); - // Summary already selected the latest attempts against the current-build timeline. - // Accept exactly that selection, not an unselected list that could hide ambiguity. - const expected = new Set(index.expectedShards); - requireValue(expected.size === index.expectedShards.length && [...expected].every(name => typeof name === "string" && - /^[A-Za-z0-9_][A-Za-z0-9_-]{0,199}$/.test(name)), "Expected shard names must be valid and unique."); - requireValue(index.attempts.length === expected.size, "Exactly one selected attempt per expected shard is required."); - for (const item of index.attempts) { - requireValue(item && expected.delete(item.shard) && Number.isSafeInteger(item.attempt) && item.attempt > 0 && - item.directory === `eval-result-${item.shard}-${item.attempt}`, "Invalid shard directory or attempt."); - } - return [...index.attempts].sort((a, b) => a.shard.localeCompare(b.shard)); -} - -function trialsFrom(bytes, { onSkipped } = {}) { - const trials = []; - for (const [line] of Buffer.from(bytes).toString("utf8").matchAll(/[^\n]+/g)) { - if (!line.trim()) continue; - requireValue(Buffer.byteLength(line) <= 8 * 1024 * 1024, "A JSONL record exceeds the size limit."); - const item = parseJson(line); - requireValue(item && typeof item === "object" && !Array.isArray(item), "Invalid trial object."); - if (["log", "run-summary"].includes(item.type)) continue; - if (onSkipped && item.status === "skipped" && !item.experiment && [undefined, "trial-result"].includes(item.type)) { - onSkipped(); continue; - } - requireValue((item.type === undefined || item.type === "trial-result") && !item.experiment && - ["success", "error"].includes(item.status), "Only plain-eval trial records are supported."); - const serialized = JSON.stringify(item); - requireValue(Buffer.byteLength(serialized) <= 8 * 1024 * 1024, "A serialized JSONL record exceeds the size limit."); - trials.push(serialized + "\n"); - requireValue(trials.length <= MAX_TRIALS, "Too many trial records."); - } - requireValue(trials.length > 0, "Every selected shard must contain trial records."); - return trials; -} - -export function validateBundle(bytes) { - requireValue(bytes.length > 0 && bytes.length <= MAX_ZIP_BYTES, "Bundle exceeds the 32 MiB archive limit."); - const sizes = new Map(); let expanded = 0; - try { - unzipSync(bytes, { filter(file) { - requireValue(["manifest.json", "results.jsonl", "eval-summary.md"].includes(file.name) || /^junit\/[a-zA-Z0-9_-]+\.xml$/.test(file.name), "Unexpected ZIP entry."); - requireValue(!sizes.has(file.name.toLowerCase()), "Duplicate ZIP entry."); - requireValue(Number.isSafeInteger(file.originalSize) && file.originalSize >= 0, "Invalid ZIP entry size."); - expanded += file.originalSize; sizes.set(file.name.toLowerCase(), file.originalSize); - requireValue(sizes.size <= MAX_ENTRIES && expanded <= MAX_EXPANDED_BYTES, "Bundle exceeds the extraction budget."); - return false; - } }); - const entries = unzipSync(bytes); - for (const name of ["manifest.json", "results.jsonl", "eval-summary.md"]) requireValue(entries[name]?.length > 0, "Required ZIP entry is missing."); - requireValue(Object.keys(entries).some(name => name.startsWith("junit/")), "JUnit results are missing."); - for (const [name, content] of Object.entries(entries)) requireValue(content.length === sizes.get(name.toLowerCase()), "ZIP size mismatch."); - const manifest = validateManifest(parseJson(Buffer.from(entries["manifest.json"]).toString("utf8"))); - return { manifest, trials: trialsFrom(entries["results.jsonl"]).length, entries }; - } catch (error) { - if (error instanceof PublicationError) throw error; - throw new PublicationError("invalid_bundle", "The saved ZIP could not be validated."); - } -} - -export async function prepareBundle({ indexPath, summaryPath, outputPath, manifest }) { - const name = blobName(manifest); - const root = await realpath(dirname(resolve(indexPath))); - const selected = validateSelectedAttempts(parseJson((await boundedFile(indexPath, 2 * 1024 * 1024)).toString("utf8"))); - const entries = {}, trials = []; - let expanded = 0, trialBytes = 0, entryCount = 0, skipped = 0; - const add = (name, bytes) => { - expanded += bytes.length; - requireValue(bytes.length > 0 && expanded <= MAX_EXPANDED_BYTES && ++entryCount <= MAX_ENTRIES, "Merged results exceed the bundle budget."); - entries[name] = bytes; - }; - add("manifest.json", strToU8(JSON.stringify(manifest, null, 2) + "\n")); - for (const [number, item] of selected.entries()) { - const directory = join(root, item.directory), info = await lstat(directory); - requireValue(info.isDirectory() && (await realpath(directory)).startsWith(root + sep), "Shard directory must remain inside the artifact root."); - const metadata = parseJson((await boundedFile(join(directory, "shard.json"), 64 * 1024)).toString("utf8")); - requireValue(metadata.schemaVersion === 1 && metadata.complete === true && metadata.shard === item.shard && - metadata.attempt === item.attempt, "Selected shard is incomplete or has mismatched metadata."); - // The current dashboard imports executed trials (success/error). Vally's - // executor-incompatible skips remain in raw shard artifacts and JUnit/ - // Markdown, not fabricated as failed executions or silently lost counts. - const shardTrials = trialsFrom(await boundedFile(join(directory, "results.jsonl")), { onSkipped: () => { skipped++; } }); - requireValue(shardTrials.length === metadata.trials, "Shard trial count differs from its completion marker."); - for (const text of shardTrials) { - trialBytes += Buffer.byteLength(text); trials.push(text); - requireValue(expanded + trialBytes <= MAX_EXPANDED_BYTES && trials.length <= MAX_TRIALS, "Merged trials exceed the bundle budget."); - } - const junitRoot = join(directory, "junit"); - requireValue((await lstat(junitRoot)).isDirectory(), "JUnit path must not be a symbolic link."); - const files = (await readdir(junitRoot)).filter(name => name.endsWith(".junit.xml")).sort(); - requireValue(files.length > 0, "A selected shard has no JUnit."); - for (const [fileNumber, name] of files.entries()) add(`junit/${number}-${fileNumber}.xml`, await boundedFile(join(junitRoot, name), MAX_EXPANDED_BYTES - expanded - trialBytes)); - } - add("results.jsonl", strToU8(trials.join(""))); - add("eval-summary.md", await boundedFile(summaryPath, MAX_EXPANDED_BYTES - expanded)); - // Stable timestamps prevent packaging metadata from changing otherwise equal bytes. - const bytes = zipSync(entries, { level: 6, mtime: new Date("2020-01-01T00:00:00Z") }); - // Inputs, required non-empty entries and merged budgets were checked during - // construction. Full ZIP decoding remains an archive-contract test, not a second pass. - requireValue(bytes.length > 0 && bytes.length <= MAX_ZIP_BYTES, "Bundle exceeds the 32 MiB archive limit."); - await mkdir(dirname(resolve(outputPath)), { recursive: true }); - await writeFile(outputPath, bytes, { flag: "wx" }); - return { shards: selected.length, trials: trials.length, skipped, bytes: bytes.length, sha256: sha256(bytes), blobName: name }; -} - -if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { - try { - const { values } = parseArgs({ options: { index: { type: "string" }, summary: { type: "string" }, output: { type: "string" }, - organization: { type: "string" }, project: { type: "string" }, repository: { type: "string" }, pipeline: { type: "string" }, - "definition-id": { type: "string" }, "build-id": { type: "string" }, attempt: { type: "string" }, - branch: { type: "string" }, "source-version": { type: "string" } } }); - if (!values.index || !values.summary || !values.output) throw new PublicationError("invalid_arguments", "Provide --index, --summary and --output."); - const result = await prepareBundle({ indexPath: values.index, summaryPath: values.summary, outputPath: values.output, - manifest: { schemaVersion: 1, adoOrganization: values.organization, adoProject: values.project, repo: values.repository, - pipeline: values.pipeline, pipelineDefinitionId: values["definition-id"], buildId: values["build-id"], - summaryAttempt: Number(values.attempt), branch: values.branch, sourceVersion: values["source-version"], runTimestamp: new Date().toISOString() } }); - // Transport consumes this saved identity/checksum, not pipeline environment variables. - await writeFile(`${values.output}.json`, JSON.stringify(result, null, 2) + "\n", { flag: "wx" }); - console.log(`Prepared one build bundle: ${result.shards} selected shards, ${result.trials} trials, ${result.bytes} bytes.`); - if (result.skipped) console.log(`${result.skipped} non-executed skipped records are retained in raw artifacts and JUnit/Markdown, not imported as dashboard outcomes.`); - } catch (error) { - console.error(error instanceof PublicationError ? error.message : "Bundle preparation failed; inspect the selected result artifacts."); - process.exitCode = 1; - } -} \ No newline at end of file diff --git a/eng/common/scripts/eval/publisher/package.json b/eng/common/scripts/eval/publisher/package.json deleted file mode 100644 index 0a5e158ddac6..000000000000 --- a/eng/common/scripts/eval/publisher/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@azure-tools/eval-result-publisher", - "version": "1.0.0", - "private": true, - "description": "Data-only Vally result bundling; Azure CLI performs publication. No evaluator or dashboard runtime.", - "type": "module", - "packageManager": "pnpm@12.6.0", - "engines": { - "node": ">=24.14.1" - }, - "scripts": { - "test": "node --experimental-strip-types --test test/*.test.ts && pwsh -NoProfile -Command \"Invoke-Pester -Path ../../../../common-tests/eval/Publish-EvalResults.Tests.ps1 -CI\"" - }, - "dependencies": { - "fflate": "0.8.3" - } -} \ No newline at end of file diff --git a/eng/common/scripts/eval/publisher/pnpm-lock.yaml b/eng/common/scripts/eval/publisher/pnpm-lock.yaml deleted file mode 100644 index 56c3971ecf94..000000000000 --- a/eng/common/scripts/eval/publisher/pnpm-lock.yaml +++ /dev/null @@ -1,22 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - dependencies: - fflate: - specifier: 0.8.3 - version: 0.8.3 - -packages: - - fflate@0.8.3: - resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==} - -snapshots: - - fflate@0.8.3: {} \ No newline at end of file diff --git a/eng/common/scripts/eval/publisher/test/publisher.test.ts b/eng/common/scripts/eval/publisher/test/publisher.test.ts deleted file mode 100644 index 1b6d2cba2436..000000000000 --- a/eng/common/scripts/eval/publisher/test/publisher.test.ts +++ /dev/null @@ -1,376 +0,0 @@ -// Verifies the saved archive contract and pipeline-owned publication policy, without Azure requests. -import assert from "node:assert/strict"; -import { spawnSync } from "node:child_process"; -import { randomBytes } from "node:crypto"; -import { mkdtemp, mkdir, readFile, rm, truncate, writeFile } from "node:fs/promises"; -import { tmpdir } from "node:os"; -import { join, resolve } from "node:path"; -import { pathToFileURL } from "node:url"; -import { test } from "node:test"; -import { runInNewContext } from "node:vm"; -import { zipSync, strToU8 } from "fflate"; -import { MAX_EXPANDED_BYTES, MAX_ZIP_BYTES, blobName, boundedFile, isUtcTimestamp, prepareBundle, validateSelectedAttempts, sha256, validateBundle, validateManifest } from "../bundle.ts"; - -const manifest = { schemaVersion: 1, adoOrganization: "azure-sdk", adoProject: "internal", repo: "Azure/azure-sdk-tools", - pipeline: "synthetic", pipelineDefinitionId: "8255", buildId: "1001", summaryAttempt: 1, runTimestamp: "2026-09-21T00:00:00.000Z" }; -const trial = { type: "trial-result", itemId: "synthetic", evalName: "synthetic", stimulus: "synthetic", model: "no-llm", status: "error", error: "Synthetic", durationMs: 1, trajectory: null, gradeResult: null }; -const entries = (extra = {}) => ({ "manifest.json": strToU8(JSON.stringify(manifest)), "results.jsonl": strToU8(JSON.stringify(trial)), - "eval-summary.md": strToU8("# Synthetic test"), "junit/0.xml": strToU8(''), ...extra }); -const zip = (extra) => zipSync(entries(extra), { mtime: new Date("2020-01-01T00:00:00Z") }); - -async function fixture(t) { - const root = await mkdtemp(join(tmpdir(), "eval-publisher-")); - t.after(() => rm(root, { recursive: true, force: true })); - const path = join(root, "saved.zip"); await writeFile(path, zip()); - return { root, path }; -} - -async function constructionFixture(t) { - const f = await fixture(t), artifact = join(f.root, "eval-result-a-2"), junit = join(artifact, "junit"); - await mkdir(junit, { recursive: true }); - await writeFile(join(artifact, "results.jsonl"), JSON.stringify(trial) + "\n"); - await writeFile(join(artifact, "shard.json"), JSON.stringify({ schemaVersion: 1, shard: "a", attempt: 2, complete: true, trials: 1 })); - await writeFile(join(junit, "0.junit.xml"), ""); - const indexPath = join(f.root, "shard-index.json"), summaryPath = join(f.root, "summary.md"), outputPath = join(f.root, "bundle.zip"); - await writeFile(indexPath, JSON.stringify({ schemaVersion: 1, complete: true, expectedShards: ["a"], - attempts: [{ shard: "a", attempt: 2, directory: "eval-result-a-2" }] })); - await writeFile(summaryPath, "# Complete build\n"); - return { ...f, artifact, junit, indexPath, summaryPath, outputPath, manifest }; -} - -function run(script, args, env = {}, preload = []) { - const environment = { ...process.env, ...env }; delete environment.NODE_TEST_CONTEXT; - const child = spawnSync(process.execPath, ["--experimental-strip-types", ...preload, script, ...args], { - encoding: "utf8", env: environment, timeout: 30_000, maxBuffer: 2 * 1024 * 1024, - }); - assert.ifError(child.error); assert.equal(child.status, 0, child.stderr + child.stdout); - return child; -} - -test("shared shards -> saved timeline evidence -> token-free summary -> one schema-v1 ZIP", async (t) => { - const f = await fixture(t), scripts = resolve(import.meta.dirname, "../.."); - const downloads = join(f.root, "downloads"); await mkdir(downloads); - for (const shard of ["shard_a", "shard_b"]) { - const source = join(f.root, shard), invocation = join(source, "invocation"); - await mkdir(invocation, { recursive: true }); - await writeFile(join(invocation, "results.jsonl"), [ - { ...trial, itemId: shard }, { type: "run-summary", evals: [{ name: trial.evalName, stimuliRun: 1, passed: false }] }, - ].map(record => JSON.stringify(record)).join("\n") + "\n"); - await writeFile(join(invocation, "eval-results.junit.xml"), - ``); - run(join(scripts, "lib/shard-results.ts"), ["--results-root", source, "--output-directory", join(downloads, `eval-result-${shard}-1`), "--shard-name", shard, "--attempt", "1"]); - } - const summary = join(f.root, "summary", "eval-summary.md"), attempts = join(f.root, "summary", "job-attempts.json"); - const mock = join(f.root, "timeline-fetch.mjs"); - await writeFile(mock, `import { Socket } from "node:net"; - Socket.prototype.connect = function() { throw new Error("Network disabled"); }; - globalThis.fetch = async (url, options) => { - if (url.origin !== "https://dev.azure.com" || options.headers.authorization !== "Bearer fixture-token" || options.redirect !== "error") throw new Error("Unexpected timeline request"); - return Response.json({ records: ["a", "b"].map(key => ({ type: "Job", identifier: "Eval.RunShard." + key, - attempt: 1, state: "completed", result: "failed" })) }); - };`); - const matrix = JSON.stringify({ a: { shardName: "shard_a" }, b: { shardName: "shard_b" } }); - run(join(scripts, "lib/shard-results.ts"), ["--attempts-output", attempts], { - EVAL_EXPECTED_MATRIX: matrix, SYSTEM_COLLECTIONURI: "https://dev.azure.com/azure-sdk/", - SYSTEM_TEAMPROJECTID: "00000000-0000-4000-8000-000000000001", BUILD_BUILDID: "1001", SYSTEM_ACCESSTOKEN: "fixture-token", - }, ["--import", pathToFileURL(mock).href]); - assert.equal(JSON.parse(await readFile(attempts, "utf8")).valid, true); - const offline = join(f.root, "no-network.mjs"); - await writeFile(offline, `globalThis.fetch = () => { throw new Error("Rendering cannot fetch"); }; delete process.env.SYSTEM_ACCESSTOKEN;`); - const result = run(join(scripts, "build-eval-summary.ts"), ["--results-root", downloads, "--selected-root", join(f.root, "selected"), - "--attempts-file", attempts, "--output-path", summary], { TF_BUILD: "true", EVAL_EXPECTED_MATRIX: matrix }, ["--import", pathToFileURL(offline).href]); - assert.match(result.stdout, /EvalSummaryComplete\]true/); - const output = join(f.root, "build.zip"); - const packed = await prepareBundle({ indexPath: join(downloads, "shard-index.json"), summaryPath: summary, outputPath: output, manifest }); - assert.equal(packed.trials, 2); assert.equal(packed.shards, 2); - assert.equal(packed.sha256, sha256(await readFile(output))); - assert.equal(packed.blobName, "v1/azure-sdk/internal/8255/1001/1/dashboard-bundle.zip"); - const checked = validateBundle(await readFile(output)); assert.deepEqual(checked.manifest, manifest); - assert.equal(Object.keys(checked.entries).length, 5); - assert.doesNotMatch(Buffer.from(checked.entries["results.jsonl"]).toString("utf8"), /run-summary/); - assert.match(Buffer.from(checked.entries["eval-summary.md"]).toString("utf8"), /FAILED/); - await assert.rejects(prepareBundle({ indexPath: join(downloads, "shard-index.json"), summaryPath: summary, outputPath: output, manifest }), { code: "EEXIST" }); -}); - -test("bundle CLI takes explicit metadata, preserves the real pipeline name and saves transport identity", async (t) => { - const f = await fixture(t), artifact = join(f.root, "eval-result-a-1"); - await mkdir(join(artifact, "junit"), { recursive: true }); - await writeFile(join(artifact, "results.jsonl"), JSON.stringify(trial)); - await writeFile(join(artifact, "shard.json"), JSON.stringify({ schemaVersion: 1, shard: "a", attempt: 1, complete: true, trials: 1 })); - await writeFile(join(artifact, "junit", "0.junit.xml"), ''); - const index = join(f.root, "shard-index.json"), summary = join(f.root, "summary.md"), output = join(f.root, "explicit.zip"); - await writeFile(index, JSON.stringify({ schemaVersion: 1, complete: true, expectedShards: ["a"], attempts: [{ shard: "a", attempt: 1, directory: "eval-result-a-1" }] })); - await writeFile(summary, "# Saved summary"); - run(resolve(import.meta.dirname, "../bundle.ts"), ["--index", index, "--summary", summary, "--output", output, - "--organization", "azure-sdk", "--project", "Test Project", "--repository", "Azure/azure-sdk-tools", "--pipeline", "Real Pipeline Name", - "--definition-id", "9999", "--build-id", "1001", "--attempt", "2", "--branch", "refs/heads/main", "--source-version", "a".repeat(40)], { - SYSTEM_COLLECTIONURI: "https://attacker.example", SYSTEM_DEFINITIONID: "bad", BUILD_DEFINITIONNAME: "wrong", - }); - const bytes = await readFile(output), checked = validateBundle(bytes), prepared = JSON.parse(await readFile(`${output}.json`, "utf8")); - assert.equal(checked.manifest.pipeline, "Real Pipeline Name"); assert.equal(checked.manifest.pipelineDefinitionId, "9999"); - assert.equal(prepared.blobName, "v1/azure-sdk/test%20project/9999/1001/2/dashboard-bundle.zip"); - assert.equal(prepared.sha256, sha256(bytes)); assert.equal(prepared.bytes, bytes.length); - assert.doesNotMatch(await readFile(resolve(import.meta.dirname, "../bundle.ts"), "utf8"), /process\.env|SYSTEM_|BUILD_|TF_BUILD/); -}); - -test("skips remain in raw artifacts/JUnit, not fabricated as dashboard executions", async (t) => { - const f = await fixture(t), artifact = join(f.root, "eval-result-a-1"); - await mkdir(join(artifact, "junit"), { recursive: true }); - const skipped = { type: "trial-result", status: "skipped", itemId: "incompatible", skipReason: "Synthetic incompatible executor" }; - await writeFile(join(artifact, "results.jsonl"), [trial, skipped, { type: "run-summary", evals: [{ name: "synthetic" }] }].map(record => JSON.stringify(record)).join("\n")); - await writeFile(join(artifact, "shard.json"), JSON.stringify({ schemaVersion: 1, shard: "a", attempt: 1, complete: true, trials: 1 })); - await writeFile(join(artifact, "junit", "0.junit.xml"), ''); - const index = join(f.root, "shard-index.json"), summary = join(f.root, "summary.md"), output = join(f.root, "mixed.zip"); - await writeFile(index, JSON.stringify({ schemaVersion: 1, complete: true, expectedShards: ["a"], attempts: [{ shard: "a", attempt: 1, directory: "eval-result-a-1" }] })); - await writeFile(summary, "# Mixed result\n1 executed, 1 skipped"); - const result = await prepareBundle({ indexPath: index, summaryPath: summary, outputPath: output, manifest }); - assert.equal(result.trials, 1); assert.equal(result.skipped, 1); - const checked = validateBundle(await readFile(output)); assert.equal(checked.trials, 1); - assert.match(Buffer.from(checked.entries["junit/0-0.xml"]).toString(), / { - const a = { shard: "a", attempt: 2, directory: "eval-result-a-2" }, b = { shard: "b", attempt: 3, directory: "eval-result-b-3" }; - const base = { schemaVersion: 1, complete: true, expectedShards: ["a", "b"], attempts: [b, a] }; - assert.deepEqual(validateSelectedAttempts(base), [a, b]); assert.deepEqual(base.attempts, [b, a]); - for (const source of [{ ...base, complete: false }, { ...base, expectedShards: ["a", "b", "c"] }, { ...base, expectedShards: ["a", "a"] }, - { ...base, attempts: [a] }, { ...base, attempts: [a, a] }, { ...base, attempts: [a, { ...a, attempt: 1, directory: "eval-result-a-1" }, b] }, - ...[0, -1, 1.5, "2"].map(attempt => ({ ...base, attempts: [{ ...a, attempt }, b] })), - { ...base, expectedShards: ["a", "../b"] }, { ...base, attempts: [a, { ...b, shard: "unexpected" }] }, - { ...base, attempts: [{ ...a, directory: "../elsewhere" }, b] }, { ...base, attempts: [null, b] }]) { - assert.throws(() => validateSelectedAttempts(source), { code: "invalid_bundle" }); - } -}); - -test("construction keeps nonempty required inputs and shard completion checks before saving", async (t) => { - for (const input of ["results.jsonl", "junit/0.junit.xml", "summary.md"]) await t.test(`empty ${input}`, async (t) => { - const f = await constructionFixture(t); - await writeFile(input === "summary.md" ? f.summaryPath : join(f.artifact, input), ""); - await assert.rejects(prepareBundle(f), { code: "invalid_bundle" }); - await assert.rejects(readFile(f.outputPath), { code: "ENOENT" }); - }); - for (const patch of [{ complete: false }, { shard: "other" }, { attempt: 1 }, { trials: 2 }]) await t.test(`metadata ${JSON.stringify(patch)}`, async (t) => { - const f = await constructionFixture(t), path = join(f.artifact, "shard.json"); - await writeFile(path, JSON.stringify({ ...JSON.parse(await readFile(path, "utf8")), ...patch })); - await assert.rejects(prepareBundle(f), { code: "invalid_bundle" }); - await assert.rejects(readFile(f.outputPath), { code: "ENOENT" }); - }); - const f = await constructionFixture(t); - await rm(join(f.junit, "0.junit.xml")); - await assert.rejects(prepareBundle(f), { code: "invalid_bundle" }); -}); - -test("construction counts all 10,000 entries including merged JSONL and rejects one more", async (t) => { - const f = await constructionFixture(t); - // 9,997 JUnit files plus manifest, JSONL and Markdown reach the exact limit. - for (let start = 1; start < 9_997; start += 100) { - await Promise.all(Array.from({ length: Math.min(100, 9_997 - start) }, (_, offset) => - writeFile(join(f.junit, `${start + offset}.junit.xml`), ""))); - } - await prepareBundle(f); - assert.equal(Object.keys(validateBundle(await readFile(f.outputPath)).entries).length, 10_000); - await writeFile(join(f.junit, "9997.junit.xml"), ""); - const outputPath = join(f.root, "too-many-entries.zip"); - await assert.rejects(prepareBundle({ ...f, outputPath }), { code: "invalid_bundle" }); - await assert.rejects(readFile(outputPath), { code: "ENOENT" }); -}); - -test("construction enforces the aggregate expanded budget including trials before reading oversized input", async (t) => { - const f = await constructionFixture(t); - const used = Buffer.byteLength(JSON.stringify(manifest, null, 2) + "\n") + Buffer.byteLength(JSON.stringify(trial) + "\n") + - (await readFile(join(f.junit, "0.junit.xml"))).length; - await truncate(f.summaryPath, MAX_EXPANDED_BYTES - used + 1); - await assert.rejects(prepareBundle(f), { code: "invalid_bundle" }); - await assert.rejects(readFile(f.outputPath), { code: "ENOENT" }); -}); - -test("construction keeps the final compressed-size cap without decoding the newly created ZIP", async (t) => { - const f = await constructionFixture(t); - await writeFile(join(f.junit, "0.junit.xml"), randomBytes(MAX_ZIP_BYTES + 1024)); - await assert.rejects(prepareBundle(f), { code: "invalid_bundle" }); - await assert.rejects(readFile(f.outputPath), { code: "ENOENT" }); - const source = await readFile(resolve(import.meta.dirname, "../bundle.ts"), "utf8"); - assert.doesNotMatch(source.slice(source.indexOf("export async function prepareBundle")), /validateBundle\(|unzipSync\(/); -}); - -test("construction permits 100,000 trials but rejects a merged build with more", async (t) => { - const f = await constructionFixture(t), record = '{"status":"error"}\n'; - const metadata = { schemaVersion: 1, shard: "a", attempt: 2, complete: true, trials: 100_000 }; - await writeFile(join(f.artifact, "results.jsonl"), record.repeat(100_000)); - await writeFile(join(f.artifact, "shard.json"), JSON.stringify(metadata)); - const result = await prepareBundle(f); assert.equal(result.trials, 100_000); - assert.equal(validateBundle(await readFile(f.outputPath)).trials, 100_000); - const other = join(f.root, "eval-result-b-1"); await mkdir(join(other, "junit"), { recursive: true }); - await writeFile(join(other, "results.jsonl"), record); - await writeFile(join(other, "shard.json"), JSON.stringify({ ...metadata, shard: "b", attempt: 1, trials: 1 })); - await writeFile(join(other, "junit/0.junit.xml"), ""); - const index = JSON.parse(await readFile(f.indexPath, "utf8")); - index.expectedShards.push("b"); index.attempts.push({ shard: "b", attempt: 1, directory: "eval-result-b-1" }); - await writeFile(f.indexPath, JSON.stringify(index)); - const outputPath = join(f.root, "too-many-trials.zip"); - await assert.rejects(prepareBundle({ ...f, outputPath }), { code: "invalid_bundle" }); - await assert.rejects(readFile(outputPath), { code: "ENOENT" }); -}); - -test("direct JSON string parsing preserves UTF-8, byte limits and sanitized errors", async (t) => { - const f = await constructionFixture(t), path = join(f.artifact, "results.jsonl"); - await writeFile(path, JSON.stringify({ ...trial, itemId: "UTF-8 界" }) + "\r\n"); - await prepareBundle(f); - assert.match(Buffer.from(validateBundle(await readFile(f.outputPath)).entries["results.jsonl"]).toString("utf8"), /UTF-8 界/); - for (const raw of [JSON.stringify({ status: "error", itemId: "界".repeat(Math.ceil(8 * 1024 * 1024 / 3)) }), - '{"status":"error","values":[' + Array(940_000).fill("1e-6").join(",") + "]}"]) { - await writeFile(path, raw); - await assert.rejects(prepareBundle({ ...f, outputPath: join(f.root, "oversized-record.zip") }), { code: "invalid_bundle" }); - } - for (const path of [f.indexPath, join(f.artifact, "shard.json"), join(f.artifact, "results.jsonl")]) { - const previous = await readFile(path); - await writeFile(path, '{"secret":"PRIVATE_RESULT_CONTENT"'); - await assert.rejects(prepareBundle(f), error => error.code === "invalid_bundle" && !error.message.includes("PRIVATE_RESULT_CONTENT")); - await writeFile(path, previous); - } -}); - -test("ZIP allowlist, corrupt records, experiments and extraction bombs are rejected without logging content", async (t) => { - const f = await fixture(t); - for (const extra of [{ "../escape": strToU8("no") }, { "manifest.JSON": strToU8("no") }, { "bin/mcp.dll": strToU8("no") }, - { "results.jsonl": strToU8('{"secret":"do not log"') }, { "results.jsonl": strToU8(JSON.stringify({ ...trial, experiment: { runId: "x" } })) }, - { "results.jsonl": new Uint8Array() }, { "manifest.json": strToU8(JSON.stringify({ ...manifest, buildId: "0" })) }]) { - assert.throws(() => validateBundle(zip(extra)), { code: "invalid_bundle" }); - } - const bomb = Buffer.from(zip()), start = bomb.indexOf(Buffer.from([0x50, 0x4b, 0x01, 0x02])); - bomb.writeUInt32LE(128 * 1024 * 1024 + 1, start + 24); - assert.throws(() => validateBundle(bomb), { code: "invalid_bundle" }); - await assert.rejects(boundedFile(f.path, 1), { code: "invalid_bundle" }); - assert.throws(() => validateBundle(zip({ "results.jsonl": strToU8('{"secret":"do not log"') })), error => !error.message.includes("secret")); - assert.equal(validateBundle(zip({ "results.jsonl": strToU8(JSON.stringify(trial) + "\r\n") })).trials, 1); -}); - -test("canonical identity and UTC calendar validation match the reader", () => { - assert.equal(blobName({ ...manifest, adoProject: "Test Project" }), "v1/azure-sdk/test%20project/8255/1001/1/dashboard-bundle.zip"); - for (const key of ["adoOrganization", "adoProject", "repo", "pipeline", "runTimestamp"]) for (const padded of [` ${manifest[key]}`, `${manifest[key]} `]) { - assert.throws(() => validateManifest({ ...manifest, [key]: padded }), { code: "invalid_bundle" }); - } - for (const branch of [" ", " refs/heads/main", "refs/heads/main "]) assert.throws(() => validateManifest({ ...manifest, branch }), { code: "invalid_bundle" }); - assert.throws(() => blobName({ ...manifest, adoProject: "\u754c".repeat(200) }), { code: "invalid_bundle" }); - for (const timestamp of ["2024-02-29T23:59:59Z", "2026-09-24T12:34:56.1234567Z", "2026-01-01T00:00:00Z"]) assert.equal(isUtcTimestamp(timestamp), true); - for (const timestamp of ["2026-02-30T00:00:00Z", "2026-02-29T00:00:00Z", "2026-04-31T00:00:00Z", "2026-01-01T24:00:00Z", "2026-01-01T00:00:00+00:00", "2026-01-01T00:00:00", "not a date", null]) { - assert.equal(isUtcTimestamp(timestamp), false); - assert.throws(() => validateManifest({ ...manifest, runTimestamp: timestamp }), { code: "invalid_bundle" }); - } -}); - -test("the archive package pins Node 24/pnpm and one portable SHA512-locked dependency", async () => { - const packageJson = JSON.parse(await readFile(resolve(import.meta.dirname, "../package.json"), "utf8")); - const lock = await readFile(resolve(import.meta.dirname, "../pnpm-lock.yaml"), "utf8"); - assert.equal(packageJson.engines.node, ">=24.14.1"); assert.equal(packageJson.packageManager, "pnpm@12.6.0"); - assert.deepEqual(packageJson.dependencies, { fflate: "0.8.3" }); - assert.deepEqual([...lock.matchAll(/^ ([^\s]+@[^:]+):/gm)].map(match => match[1]), ["fflate@0.8.3", "fflate@0.8.3"]); - assert.match(lock, /specifier: 0\.8\.3\s+version: 0\.8\.3/); - assert.match(lock, /integrity: sha512-tbZNuJrLwGUp3zshBtdy4W\+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==/); - assert.doesNotMatch(lock, /https?:|tarball:|sha1-|packageManagerDependencies/); -}); - -test("PR CI runs every lightweight Node suite and discovers tagged publisher PowerShell tests", async () => { - const root = resolve(import.meta.dirname, "../../../../.."); - const ci = await readFile(join(root, "common-tests/ci.yml"), "utf8"); - assert.match(ci, /TargetDirectory: eng\/common-tests/); - assert.match(ci, /TargetTags: UnitTest,IntegrationTest/); - assert.match(ci, /CustomTestSteps:[\s\S]*config.Filter.Tag = @\('UnitTest', 'IntegrationTest'\)/); - assert.match(ci, /if \(\$result.FailedCount -gt 0\) \{ throw/); - assert.match(ci, /node --experimental-strip-types --test test\/\*\.test\.ts publisher\/test\/\*\.test\.ts/); - assert.match(ci, /version: 24\.x/); - assert.match(ci, /npm install --prefix.*pnpm@12\.6\.0/); - assert.match(ci, /pnpm\/bin\/pnpm\.mjs.*--dir publisher --ignore-workspace install --pm-on-fail=ignore --frozen-lockfile --prod --ignore-scripts/); - assert.match(ci, /NPM_CONFIG_USERCONFIG: \$\(Agent.TempDirectory\)\/eval-unit-tests\.npmrc/); - assert.doesNotMatch(ci, /vally eval|azureSubscription:|npm ci/); - const pester = await readFile(join(root, "common-tests/eval/Publish-EvalResults.Tests.ps1"), "utf8"); - assert.match(pester, /Describe 'Azure CLI evaluation publication' -Tag 'UnitTest'/); - assert.match(pester, /Microsoft.PowerShell.Utility\\Invoke-WebRequest/); - assert.match(pester, /server\.listen\(0,'127\.0\.0\.1'/); - const publisher = JSON.parse(await readFile(resolve(import.meta.dirname, "../package.json"), "utf8")); - assert.match(publisher.scripts.test, /common-tests\/eval\/Publish-EvalResults.Tests.ps1/); -}); - -test("pipeline separates token-bearing attempt verification from rendering and uploads before the score gate", async () => { - const root = resolve(import.meta.dirname, "../../../.."); - const summary = await readFile(join(root, "pipelines/templates/jobs/eval-summarize.yml"), "utf8"); - const verification = summary.slice(summary.indexOf("# Only attempt verification"), summary.indexOf('"$(Build.SourcesDirectory)/eng/common/scripts/eval/build-eval-summary.ts"')); - assert.match(verification, /--attempts-output/); assert.match(verification, /SYSTEM_ACCESSTOKEN: \$\(System.AccessToken\)/); - const rendering = summary.slice(summary.indexOf('"$(Build.SourcesDirectory)/eng/common/scripts/eval/build-eval-summary.ts"')); - assert.match(rendering, /--attempts-file/); assert.doesNotMatch(rendering, /SYSTEM_ACCESSTOKEN/); - assert.ok(summary.indexOf("../steps/eval-publish-results.yml") < summary.indexOf("task: PublishTestResults@2")); - const steps = await readFile(join(root, "pipelines/templates/steps/eval-publish-results.yml"), "utf8"); - assert.match(steps, /pnpm\/bin\/pnpm\.mjs.*--ignore-workspace install --pm-on-fail=ignore --frozen-lockfile --prod --ignore-scripts/); - assert.match(steps, /NPM_CONFIG_USERCONFIG: \$\(Build.SourcesDirectory\)\/\.npmrc/); - assert.doesNotMatch(steps, /npm ci/); - for (const job of ["eval-shard.yml", "eval-summarize.yml"]) { - assert.match(await readFile(join(root, "pipelines/templates/jobs", job), "utf8"), /version: 24\.x/); - } - assert.doesNotMatch(steps, /registryUrl:|azure-sdk-tools\/npm\/registry/); - assert.match(steps, /scriptType: pscore[\s\S]*scriptLocation: inlineScript[\s\S]*Publish-EvalResults\.ps1/); - assert.match(steps, /azureSubscription: eval-dashboard-sc/); - assert.match(steps, /EVAL_STORAGE_ACCOUNT_NAME: \$\(EvalStorageAccountName\)/); - assert.match(steps, /EVAL_DASHBOARD_REFRESH_URL: \$\(EvalDashboardRefreshUrl\)/); - assert.match(steps, /EVAL_DASHBOARD_RESOURCE: \$\(EvalDashboardResource\)/); - assert.match(steps, /-DashboardRefreshUrl \$env:EVAL_DASHBOARD_REFRESH_URL -DashboardResource \$env:EVAL_DASHBOARD_RESOURCE/); - assert.doesNotMatch(steps, /ResultPath|storage-publication-result/); - const publisher = await readFile(resolve(import.meta.dirname, "../Publish-EvalResults.ps1"), "utf8"); - assert.doesNotMatch(publisher, /Save-Receipt|ResultPath|persist_storage_result|receipt_failed|File\]::(?:Write|Open|Move)|Set-Content/); - assert.ok(publisher.indexOf('Write-Host "Result archive stored:') < publisher.indexOf("'--resource', $DashboardResource"), "Confirm upload before notification without a local status file"); - assert.doesNotMatch(steps, /258998df|azsdk-eval-bue6/); - assert.doesNotMatch(await readFile(resolve(import.meta.dirname, "../Publish-EvalResults.ps1"), "utf8"), /258998df|azsdk-eval-bue6/); - assert.doesNotMatch(await readFile(resolve(import.meta.dirname, "../Publish-EvalResults.ps1"), "utf8"), /TF_BUILD|SYSTEM_|BUILD_|System\.DefinitionId/); -}); - -test("one checkbox gates trusted-run egress; owner configuration additionally gates runtime upload", async () => { - const root = resolve(import.meta.dirname, "../../../.."); - const archetype = await readFile(join(root, "pipelines/templates/stages/archetype-eval.yml"), "utf8"); - const steps = await readFile(join(root, "pipelines/templates/steps/eval-publish-results.yml"), "utf8"); - const gate = source => source.match(/\$\{\{ if (and\(parameters\.publishDashboardResults, .+\)) \}\}:/)?.[1]; - const networkGate = gate(archetype), uploadGate = gate(steps); - assert.ok(networkGate); assert.equal(networkGate, uploadGate); - assert.doesNotMatch(networkGate, /System.DefinitionId|EvalStorageAccountName/); - const runtime = steps.match(/ condition: (and\(.+\))/)?.[1]; assert.ok(runtime); - const evaluate = (expression, variables, enabled = true, succeeds = true) => runInNewContext(expression.replace(/\bin\(/g, "oneOf("), { - variables, parameters: { publishDashboardResults: enabled }, succeeded: () => succeeds, - and: (...values) => values.every(Boolean), eq: (a, b) => String(a ?? "").toLowerCase() === String(b ?? "").toLowerCase(), - ne: (a, b) => String(a ?? "").toLowerCase() !== String(b ?? "").toLowerCase(), - oneOf: (value, ...items) => items.some(item => String(value ?? "").toLowerCase() === String(item).toLowerCase()), - }); - const base = { "System.CollectionUri": "https://dev.azure.com/azure-sdk/", "System.TeamProject": "internal", "Build.Repository.Name": "Azure/azure-sdk-tools", - "Build.SourceBranch": "refs/heads/main", "Build.Reason": "Manual", "EvalSummaryComplete": "true", "EvalStorageAccountName": "evaltestsummary" }; - assert.equal(evaluate(networkGate, base), true); assert.equal(evaluate(runtime, base), true); - assert.equal(evaluate(networkGate, base, false), false); assert.equal(evaluate(runtime, base, true, false), false); - for (const account of [undefined, ""]) assert.equal(evaluate(runtime, { ...base, EvalStorageAccountName: account }), false); - assert.equal(evaluate(runtime, { ...base, EvalSummaryComplete: "false" }), false); - for (const [key, value] of [["System.CollectionUri", "https://dev.azure.com/other/"], ["System.TeamProject", "public"], - ["Build.Repository.Name", "Azure/azure-rest-api-specs"], ["Build.Reason", "PullRequest"], ["Build.Reason", "ResourceTrigger"], - ...["refs/pull/1/merge", "refs/heads/feature", "refs/heads/feature/main", "refs/tags/main", ""].map(branch => ["Build.SourceBranch", branch])]) { - const variables = { ...base, [key]: value }; - assert.equal(evaluate(networkGate, variables), false); assert.equal(evaluate(runtime, variables), false); - } - for (const id of ["8255", "9999"]) assert.equal(evaluate(networkGate, { ...base, "System.DefinitionId": id }), true, "Definition IDs are archive identity, not shared policy"); -}); - -test("redirect retains Default Deny/CFS and shared publication defaults stay off", async () => { - const root = resolve(import.meta.dirname, "../../../.."); - const redirect = await readFile(join(root, "../pipelines/templates/stages/1es-redirect.yml"), "utf8"); - assert.match(redirect, /networkIsolationPolicy: DefaultDeny, CFSClean, CFSClean2, CFSClean3, AzureStorage/); - assert.match(redirect, /parameters.AllowAzureStorage.*parameters.Use1ESOfficial.*System.TeamProject.*PullRequest.*refs\/pull\//); - for (const path of ["templates/steps/eval-publish-results.yml", "templates/jobs/eval-summarize.yml", "templates/stages/archetype-eval.yml"]) { - assert.match(await readFile(join(root, "pipelines", path), "utf8"), /name: publishDashboardResults\s+type: boolean\s+default: false/); - } -}); - -for (const tier of ["workflow", "skill", "live"]) test(`${tier} forwards only the checkbox and preserves its evaluation tier`, async () => { - const root = resolve(import.meta.dirname, "../../../.."), content = await readFile(join(root, `pipelines/${tier}-eval.yml`), "utf8"); - assert.match(content, /createDashboardBundle: true/); assert.match(content, /name: publishDashboardResults[\s\S]*default: true/); - assert.ok(content.includes("publishDashboardResults: ${{ parameters.publishDashboardResults }}")); - assert.doesNotMatch(content, /eval-dashboard\.yml|EvalDashboardPublicationEnabled|System.DefinitionId|autoPublishDashboardResults|allowAzureStorageNetworkAccess/); - const inputs = content.slice(content.indexOf("\nparameters:\n"), content.indexOf("\nvariables:\n")); - assert.deepEqual([...inputs.matchAll(/- name: (\w+)/g)].map(match => match[1]), ["publishDashboardResults"]); - assert.match(content, /group: AzSDK_Eval_Variable_group/); assert.match(content, new RegExp(`TestType: ${tier === "live" ? "live" : "mock"}`)); - if (tier === "live") { assert.match(content, /UseAzSdkAuthentication: true/); assert.match(content, /failOnFailedTests: true/); } - if (tier === "skill") assert.match(content, /vallyRoot: \.github\/skills/); -}); \ No newline at end of file diff --git a/eng/common/scripts/eval/test/shard-results.test.ts b/eng/common/scripts/eval/test/shard-results.test.ts deleted file mode 100644 index 38bca140a85a..000000000000 --- a/eng/common/scripts/eval/test/shard-results.test.ts +++ /dev/null @@ -1,530 +0,0 @@ -// Verifies complete result staging, authoritative attempts and recovery after transport failures. -import assert from "node:assert/strict"; -import fs from "node:fs"; -import os from "node:os"; -import path from "node:path"; -import { fileURLToPath, pathToFileURL } from "node:url"; -import { spawnSync } from "node:child_process"; -import { test } from "node:test"; -import { expectedShardsFromMatrix, latestShardAttempts, readShardAttempts, selectSummaryResults, stageShardResults } from "../lib/shard-results.ts"; -import { getVallyShardVerdict } from "../lib/verdict.ts"; - -function setup(t) { - const root = fs.mkdtempSync(path.join(os.tmpdir(), "eval-artifacts-")); - t.after(() => fs.rmSync(root, { recursive: true, force: true })); - return root; -} - -function invocation(root, name, { failed = false, summary = true, malformed = false, junit = true } = {}) { - const directory = path.join(root, name); - fs.mkdirSync(directory, { recursive: true }); - const records = [{ type: "trial-result", status: failed ? "error" : "success", itemId: name }]; - if (summary) records.push({ type: "run-summary", evals: [{ name, stimuliRun: 1, passed: !failed }] }); - fs.writeFileSync(path.join(directory, "results.jsonl"), records.map((entry) => JSON.stringify(entry)).join("\n") + (malformed ? '\n{"type":' : "\n")); - if (junit) fs.writeFileSync(path.join(directory, "eval-results.junit.xml"), - `${failed ? '' : ""}`); - return directory; -} - -function artifact(root, shard, attempt, options = {}) { - const source = invocation(root, `source-${shard}-${attempt}`, options); - const output = path.join(root, "download", `eval-result-${shard}-${attempt}`); - stageShardResults({ resultsRoot: source, outputDirectory: output, shardName: shard, attempt }); - const evidence = path.join(root, "job-attempts.json"); - const timeline = fs.existsSync(evidence) ? readJson(evidence) : { schemaVersion: 1, valid: true, attempts: {} }; - if (!timeline.attempts[shard] || timeline.attempts[shard].attempt < attempt) timeline.attempts[shard] = { attempt, complete: true }; - fs.writeFileSync(evidence, JSON.stringify(timeline)); - return output; -} - -function readJson(file) { - return JSON.parse(fs.readFileSync(file, "utf8")); -} - -function runCli(scriptName, args, environment = {}, cwd = undefined) { - const script = fileURLToPath(new URL(`../${scriptName}`, import.meta.url)); - const env = { ...process.env, ...environment }; - delete env.NODE_TEST_CONTEXT; - for (const key of Object.keys(env)) if (env[key] === undefined) delete env[key]; - const preload = []; - if (scriptName === "build-eval-summary.ts" && args.includes("--selected-root")) { - const root = path.dirname(args[args.indexOf("--results-root") + 1]); - fs.mkdirSync(root, { recursive: true }); - const mock = path.join(root, "rendering-offline.mjs"); - fs.writeFileSync(mock, `globalThis.fetch = () => { throw new Error("Summary rendering cannot contact a service"); };`); - delete env.SYSTEM_ACCESSTOKEN; - preload.push("--import", pathToFileURL(mock).href); - args = [...args, "--attempts-file", path.join(root, "job-attempts.json")]; - } - const child = spawnSync(process.execPath, ["--experimental-strip-types", ...preload, script, ...args], { - encoding: "utf8", env, cwd, timeout: 30_000, maxBuffer: 1024 * 1024, - }); - assert.ifError(child.error); - return child; -} - -function runSummary(root, shards, options = {}) { - const output = path.join(root, "summary", "eval-summary.md"); - const matrix = Object.hasOwn(options, "matrix") ? options.matrix : - JSON.stringify(Object.fromEntries(shards.map((shardName) => [shardName, { shardName }]))); - const child = runCli("build-eval-summary.ts", [ - "--results-root", path.join(root, "download"), "--selected-root", path.join(root, "selected"), - "--output-path", output, - ], { TF_BUILD: "true", EVAL_EXPECTED_MATRIX: matrix }); - return { - child, markdown: fs.readFileSync(output, "utf8"), - result: readJson(path.join(root, "summary", "eval-summary.json")), - index: readJson(path.join(root, "download", "shard-index.json")), - }; -} - -test("expected shards come from the full Prepare matrix, not arrived artifacts or matrix keys", () => { - const matrix = { secondJob: { shardName: "area_b", evalArgs: "-e b.eval.yaml" }, firstJob: { shardName: "area_a" } }; - assert.deepEqual(expectedShardsFromMatrix(matrix), ["area_a", "area_b"]); - assert.deepEqual(expectedShardsFromMatrix(JSON.stringify(matrix)), ["area_a", "area_b"]); - for (const invalid of [undefined, "not JSON", {}, [], null, true, 1, { a: null }, { a: { shardName: "../escape" } }, - { a: { shardName: "" } }, { a: { shardName: "x".repeat(201) } }, { a: { shardName: "same" }, b: { shardName: "same" } }]) { - assert.throws(() => expectedShardsFromMatrix(invalid)); - } -}); - -test("completed failing evaluations stage exact raw bytes and all JUnit, but no unrelated files", (t) => { - const root = setup(t); - const source = invocation(root, "source", { failed: true }); - fs.writeFileSync(path.join(source, "debug.log"), "not bundled"); - fs.writeFileSync(path.join(source, "mcp.dll"), "not bundled"); - fs.mkdirSync(path.join(source, "nested")); - fs.copyFileSync(path.join(source, "eval-results.junit.xml"), path.join(source, "nested", "eval-results.junit.xml")); - const output = path.join(root, "staged"); - const result = stageShardResults({ resultsRoot: source, outputDirectory: output, shardName: "area_test", attempt: 2 }); - assert.deepEqual(result, { schemaVersion: 1, shard: "area_test", attempt: 2, complete: true, trials: 1, reason: null }); - assert.deepEqual(readJson(path.join(output, "shard.json")), result); - assert.deepEqual(fs.readdirSync(output).sort(), ["junit", "results.jsonl", "shard.json"]); - assert.deepEqual(fs.readdirSync(path.join(output, "junit")), ["0.junit.xml", "1.junit.xml"]); - assert.deepEqual(fs.readFileSync(path.join(output, "results.jsonl")), fs.readFileSync(path.join(source, "results.jsonl"))); -}); - -test("missing, interrupted and corrupt invocations publish incomplete markers", (t) => { - const root = setup(t); - for (const [index, options] of [{ summary: false }, { malformed: true }, { junit: false }].entries()) { - const source = invocation(root, `source-${index}`, options); - const output = path.join(root, `stage-${index}`); - const result = stageShardResults({ resultsRoot: source, outputDirectory: output, shardName: "test", attempt: 1 }); - assert.equal(result.complete, false); - assert.equal(result.trials, 1); - assert.ok(result.reason); - assert.deepEqual(readJson(path.join(output, "shard.json")), result); - assert.deepEqual(fs.readFileSync(path.join(output, "results.jsonl")), fs.readFileSync(path.join(source, "results.jsonl"))); - } - const output = path.join(root, "empty"); - const empty = stageShardResults({ resultsRoot: path.join(root, "not-created"), outputDirectory: output, shardName: "test", attempt: 1 }); - assert.equal(empty.complete, false); - assert.equal(empty.trials, 0); - assert.deepEqual(fs.readdirSync(output).sort(), ["junit", "shard.json"]); -}); - -test("non-object JSONL and empty final summaries are incomplete, and a trial invalidates an earlier summary", (t) => { - const root = setup(t); - const suffixes = ["null", "[]", "42", '{"type":"run-summary","evals":[]}', - '{"type":"run-summary","evals":null}', '{"type":"trial-result","status":"success"}']; - for (const [index, suffix] of suffixes.entries()) { - const source = invocation(root, `source-${index}`); - fs.appendFileSync(path.join(source, "results.jsonl"), suffix + "\n"); - const result = stageShardResults({ resultsRoot: source, outputDirectory: path.join(root, `staged-${index}`), shardName: "test", attempt: 1 }); - assert.equal(result.complete, false); - } -}); - -test("untyped trial records, CRLF and blank lines retain the reference completion semantics", (t) => { - const root = setup(t); - const source = invocation(root, "source"); - fs.writeFileSync(path.join(source, "results.jsonl"), '\r\n{"status":"success"}\r\n \r\n{"type":"run-summary","evals":[{"name":"legacy"}]}\r\n'); - const result = stageShardResults({ resultsRoot: source, outputDirectory: path.join(root, "staged"), shardName: "test", attempt: 1 }); - assert.equal(result.complete, true); - assert.equal(result.trials, 1); -}); - -test("staging selects the same newest invocation as the shard verdict", (t) => { - const root = setup(t); - const old = invocation(root, "runs/old"); - const latest = invocation(root, "runs/new", { failed: true }); - fs.utimesSync(path.join(old, "results.jsonl"), 1, 1); - fs.utimesSync(path.join(latest, "results.jsonl"), 2, 2); - const output = path.join(root, "stage"); - assert.equal(getVallyShardVerdict({ resultsDir: path.join(root, "runs") }).passed, false); - stageShardResults({ resultsRoot: path.join(root, "runs"), outputDirectory: output, shardName: "test", attempt: 1 }); - assert.deepEqual(fs.readFileSync(path.join(output, "results.jsonl")), fs.readFileSync(path.join(latest, "results.jsonl"))); - assert.deepEqual(fs.readFileSync(path.join(output, "junit", "0.junit.xml")), fs.readFileSync(path.join(latest, "eval-results.junit.xml"))); -}); - -test("equal-mtime invocation ties use the verdict's path order, not localeCompare", (t) => { - const root = setup(t); - const first = invocation(root, "runs/Z"); - const last = invocation(root, "runs/a", { failed: true }); - for (const directory of [first, last]) fs.utimesSync(path.join(directory, "results.jsonl"), 1, 1); - const output = path.join(root, "stage"); - assert.equal(getVallyShardVerdict({ resultsDir: path.join(root, "runs") }).passed, false); - stageShardResults({ resultsRoot: path.join(root, "runs"), outputDirectory: output, shardName: "test", attempt: 1 }); - assert.deepEqual(fs.readFileSync(path.join(output, "results.jsonl")), fs.readFileSync(path.join(last, "results.jsonl"))); -}); - -test("a corrupt newest invocation never falls back to older complete output", (t) => { - const root = setup(t); - const old = invocation(root, "runs/old"); - const latest = invocation(root, "runs/new", { malformed: true }); - fs.utimesSync(path.join(old, "results.jsonl"), 1, 1); - fs.utimesSync(path.join(latest, "results.jsonl"), 2, 2); - const output = path.join(root, "stage"); - const result = stageShardResults({ resultsRoot: path.join(root, "runs"), outputDirectory: output, shardName: "test", attempt: 1 }); - assert.equal(result.complete, false); - assert.deepEqual(fs.readFileSync(path.join(output, "results.jsonl")), fs.readFileSync(path.join(latest, "results.jsonl"))); -}); - -test("staging requires an empty destination and does not delete existing contents", (t) => { - const root = setup(t); - const source = invocation(root, "source"); - const output = path.join(root, "staged"); - fs.mkdirSync(output); - fs.writeFileSync(path.join(output, "keep.txt"), "keep me"); - assert.throws(() => stageShardResults({ resultsRoot: source, outputDirectory: output, shardName: "test", attempt: 1 }), /must be empty/); - assert.deepEqual(fs.readdirSync(output), ["keep.txt"]); - assert.equal(fs.readFileSync(path.join(output, "keep.txt"), "utf8"), "keep me"); -}); - -test("invalid shard identities or attempts are rejected before creating an output", (t) => { - const root = setup(t); - const output = path.join(root, "staged"); - for (const shardName of ["", "../escape", "a/b", "a\\b", "a\n", "x".repeat(201), undefined]) { - assert.throws(() => stageShardResults({ resultsRoot: root, outputDirectory: output, shardName, attempt: 1 })); - } - for (const attempt of [0, -1, 1.5, NaN, Infinity, Number.MAX_SAFE_INTEGER + 1]) { - assert.throws(() => stageShardResults({ resultsRoot: root, outputDirectory: output, shardName: "test", attempt })); - } - assert.equal(fs.existsSync(output), false); -}); - -test("symbolic-link destinations are not treated as owned empty directories", (t) => { - const root = setup(t); - const source = invocation(root, "source"); - const target = path.join(root, "target"); - const output = path.join(root, "link"); - fs.mkdirSync(target); - fs.symlinkSync(target, output, "junction"); - assert.throws(() => stageShardResults({ resultsRoot: source, outputDirectory: output, shardName: "test", attempt: 1 }), /symbolic link/); - assert.deepEqual(fs.readdirSync(target), []); -}); - -test("oversized raw files are not read or copied, but JUnit and an incomplete marker survive", (t) => { - const root = setup(t); - const source = invocation(root, "source"); - const fd = fs.openSync(path.join(source, "results.jsonl"), "r+"); - try { fs.ftruncateSync(fd, 128 * 1024 * 1024 + 1); } finally { fs.closeSync(fd); } - const output = path.join(root, "stage"); - const result = stageShardResults({ resultsRoot: source, outputDirectory: output, shardName: "test", attempt: 1 }); - assert.equal(result.complete, false); - assert.match(result.reason, /oversized/); - assert.equal(fs.existsSync(path.join(output, "results.jsonl")), false); - assert.deepEqual(fs.readdirSync(path.join(output, "junit")), ["0.junit.xml"]); - assert.equal(readJson(path.join(output, "shard.json")).complete, false); -}); - -test("summary selects latest expected attempts once; completed failures remain eligible for publication", (t) => { - const root = setup(t); - artifact(root, "area_a", 1, { failed: true }); - artifact(root, "area_a", 2); - artifact(root, "area_b", 1, { failed: true }); - artifact(root, "unrequested", 9); - const { child, markdown, result, index } = runSummary(root, ["area_b", "area_a"]); - assert.equal(child.status, 0, child.stderr); - assert.match(child.stdout, /##vso\[task.setvariable variable=EvalSummaryComplete\]true/); - assert.deepEqual(result, { - schemaVersion: 1, complete: true, - shards: [{ shard: "area_a", attempt: 2, complete: true, reason: null }, { shard: "area_b", attempt: 1, complete: true, reason: null }], - totals: { scenarios: 2, failed: 1, skipped: 0 }, - }); - assert.match(markdown, /results — FAILED/); - assert.match(markdown, /\| area_a \| 2 \| Complete \|/); - assert.deepEqual(fs.readdirSync(path.join(root, "selected")).sort(), ["eval-result-area_a-2", "eval-result-area_b-1"]); - assert.deepEqual(index, { - schemaVersion: 1, complete: true, expectedShards: ["area_a", "area_b"], - attempts: [{ shard: "area_a", attempt: 2, directory: "eval-result-area_a-2" }, { shard: "area_b", attempt: 1, directory: "eval-result-area_b-1" }], - }); -}); - -test("a later incomplete attempt and a missing shard never fall back to complete older artifacts", (t) => { - const root = setup(t); - artifact(root, "area_a", 1); - artifact(root, "area_a", 2, { junit: false }); - const { child, markdown, result, index } = runSummary(root, ["area_a", "area_missing"]); - assert.equal(child.status, 1); - assert.match(child.stdout, /##vso\[task.setvariable variable=EvalSummaryComplete\]false/); - assert.equal(result.complete, false); - assert.equal(index.complete, false); - assert.match(markdown, /results — INCOMPLETE/); - assert.doesNotMatch(markdown, /results — PASSED/); - assert.equal(result.shards[0].attempt, 2); - assert.equal(result.shards[1].attempt, null); - assert.equal(result.totals.scenarios, 0); - assert.deepEqual(index.expectedShards, ["area_a", "area_missing"]); - assert.deepEqual(index.attempts, [{ shard: "area_a", attempt: 2, directory: "eval-result-area_a-2" }]); -}); - -test("attempt selection is numeric and includes the newest directory even when it is empty", (t) => { - const root = setup(t); - artifact(root, "area_a", 9); - fs.mkdirSync(path.join(root, "download", "eval-result-area_a-10")); - const { child, result, index } = runSummary(root, ["area_a"]); - assert.equal(child.status, 1); - assert.equal(result.shards[0].attempt, 10); - assert.equal(result.totals.scenarios, 0); - assert.equal(index.attempts[0].attempt, 10); - assert.deepEqual(fs.readdirSync(path.join(root, "selected")), ["eval-result-area_a-10"]); -}); - -test("zero parsed JUnit cases make that shard incomplete even when another shard has results", (t) => { - const root = setup(t); - const output = artifact(root, "area_a", 1); - fs.writeFileSync(path.join(output, "junit", "0.junit.xml"), ""); - artifact(root, "area_b", 1); - const { child, result, index, markdown } = runSummary(root, ["area_a", "area_b"]); - assert.equal(child.status, 1); - assert.equal(result.complete, false); - assert.equal(index.complete, false); - assert.equal(result.totals.scenarios, 1); - assert.match(result.shards[0].reason, /no evaluation testcases/); - assert.equal(result.shards[1].complete, true); - assert.match(markdown, /results — INCOMPLETE/); -}); - -test("bad completion metadata cannot hide available diagnostic JUnit", (t) => { - const root = setup(t); - const base = { schemaVersion: 1, shard: "area_a", attempt: 1, complete: true, trials: 1 }; - const markers = ["not JSON", "null", JSON.stringify({}), JSON.stringify({ ...base, schemaVersion: 2 }), - JSON.stringify({ ...base, shard: "other" }), JSON.stringify({ ...base, attempt: 2 }), - JSON.stringify({ ...base, complete: "true" }), JSON.stringify({ ...base, trials: 0 }), - JSON.stringify({ ...base, trials: 1.5 }), JSON.stringify({ ...base, trials: 2 }), - JSON.stringify({ ...base, padding: " ".repeat(64 * 1024) })]; - for (const [index, marker] of markers.entries()) { - const directory = path.join(root, `case-${index}`); - const output = artifact(directory, "area_a", 1); - fs.writeFileSync(path.join(output, "shard.json"), marker); - const selection = selectSummaryResults({ resultsRoot: path.join(directory, "download"), selectedRoot: path.join(directory, "selected"), expectedShards: ["area_a"] }); - assert.equal(selection.complete, false); - assert.deepEqual(fs.readdirSync(path.join(directory, "selected", "eval-result-area_a-1", "junit")), ["0.junit.xml"]); - } -}); - -test("missing or corrupted raw results override a complete marker without losing diagnostic cases", (t) => { - const root = setup(t); - for (const corrupt of [false, true]) { - const directory = path.join(root, String(corrupt)); - artifact(directory, "area_a", 1); - const output = artifact(directory, "area_a", 2); - if (corrupt) fs.appendFileSync(path.join(output, "results.jsonl"), "not JSON\n"); - else fs.unlinkSync(path.join(output, "results.jsonl")); - const { child, result, index } = runSummary(directory, ["area_a"]); - assert.equal(child.status, 1); - assert.equal(result.complete, false); - assert.equal(result.shards[0].attempt, 2); - assert.equal(result.totals.scenarios, 1); - assert.equal(index.complete, false); - } -}); - -test("legacy-layout JUnit is diagnostic only, and never causes fallback to an older attempt", (t) => { - const root = setup(t); - artifact(root, "area_a", 1); - const latest = path.join(root, "download", "eval-result-area_a-2"); - fs.mkdirSync(latest); - fs.writeFileSync(path.join(latest, "eval-results.junit.xml"), ''); - const { child, result, index, markdown } = runSummary(root, ["area_a"]); - assert.equal(child.status, 1); - assert.equal(result.complete, false); - assert.deepEqual(result.totals, { scenarios: 1, failed: 1, skipped: 0 }); - assert.equal(index.attempts[0].attempt, 2); - assert.match(markdown, /latest \(0\/1 runs passed\)/); - assert.equal(fs.existsSync(path.join(root, "selected", "eval-result-area_a-1")), false); -}); - -test("failed Prepare retains incomplete summary contracts without inferring expected shards", (t) => { - const root = setup(t); - for (const [index, matrix] of [undefined, "", "not JSON", "{}", "[]"].entries()) { - const directory = path.join(root, `case-${index}`); - artifact(directory, "arrived", 1); - const { child, markdown, result, index: shardIndex } = runSummary(directory, [], { matrix }); - assert.equal(child.status, 1); - assert.equal(result.complete, false); - assert.equal(result.totals.scenarios, 0); - assert.match(markdown, /results — INCOMPLETE/); - assert.match(markdown, /check the Prepare stage/); - assert.deepEqual(shardIndex, { schemaVersion: 1, complete: false, expectedShards: [], attempts: [] }); - assert.deepEqual(fs.readdirSync(path.join(directory, "selected")), []); - } -}); - -test("a missing artifact root reports every expected shard missing", (t) => { - const root = setup(t); - const { child, result, index } = runSummary(root, ["area_a", "area_b"]); - assert.equal(child.status, 1); - assert.equal(result.complete, false); - assert.equal(result.totals.scenarios, 0); - assert.ok(result.shards.every((entry) => entry.attempt === null)); - assert.deepEqual(index.expectedShards, ["area_a", "area_b"]); - assert.deepEqual(index.attempts, []); -}); - -test("summary cannot publish when timeline evidence is unavailable, invalid or corrupt", (t) => { - const root = setup(t); - for (const mode of ["invalid", "missing", "corrupt"]) { - const directory = path.join(root, mode); - artifact(directory, "area_a", 1); - const attempts = path.join(directory, "job-attempts.json"); - if (mode === "invalid") fs.writeFileSync(attempts, JSON.stringify({ valid: false })); - if (mode === "missing") fs.unlinkSync(attempts); - if (mode === "corrupt") fs.writeFileSync(attempts, "not JSON"); - const output = path.join(directory, "summary", "eval-summary.md"); - const child = runCli("build-eval-summary.ts", ["--results-root", path.join(directory, "download"), - "--selected-root", path.join(directory, "selected"), "--output-path", output], { - TF_BUILD: "true", EVAL_EXPECTED_MATRIX: JSON.stringify({ a: { shardName: "area_a" } }), - }); - assert.equal(child.status, 1); assert.match(child.stdout, /EvalSummaryComplete\]false/); - assert.equal(readJson(path.join(directory, "download", "shard-index.json")).complete, false); - assert.equal(readJson(path.join(directory, "summary", "eval-summary.json")).totals.scenarios, 1); - assert.match(fs.readFileSync(output, "utf8"), /timeline/); - assert.equal(fs.existsSync(path.join(directory, "summary", "job-attempts.json")), false, "Rendering never fabricates timeline evidence"); - } -}); - -test("selection rejects stale destinations and never treats zero expected shards as complete", (t) => { - const root = setup(t); - artifact(root, "area_a", 1); - const selectedRoot = path.join(root, "selected"); - fs.mkdirSync(selectedRoot); - fs.writeFileSync(path.join(selectedRoot, "keep.txt"), "keep me"); - assert.throws(() => selectSummaryResults({ resultsRoot: path.join(root, "download"), selectedRoot, expectedShards: ["area_a"] }), /must be empty/); - assert.equal(fs.readFileSync(path.join(selectedRoot, "keep.txt"), "utf8"), "keep me"); - assert.equal(fs.existsSync(path.join(root, "download", "shard-index.json")), false); - const selection = selectSummaryResults({ resultsRoot: path.join(root, "download"), selectedRoot: path.join(root, "empty-selection"), expectedShards: [] }); - assert.equal(selection.complete, false); - assert.equal(selection.shardInput.complete, false); - assert.deepEqual(selection.shardInput.attempts, []); -}); - -test("ambiguous numeric attempt names and invalid attempts are rejected", (t) => { - const root = setup(t); - for (const [index, names] of [["01", "1", "2"], ["0"], ["9007199254740992"]].entries()) { - const directory = path.join(root, `case-${index}`); - const resultsRoot = path.join(directory, "download"); - for (const name of names) fs.mkdirSync(path.join(resultsRoot, `eval-result-area_a-${name}`), { recursive: true }); - assert.throws(() => selectSummaryResults({ resultsRoot, selectedRoot: path.join(directory, "selected"), expectedShards: ["area_a"] }), /artifact attempt/i); - } -}); - -test("staging CLI logs counts and sanitized warnings, never the raw invalid record", (t) => { - const root = setup(t); - const source = invocation(root, "source"); - const privateText = "SYNTHETIC_RAW_RECORD_DO_NOT_LOG"; - fs.appendFileSync(path.join(source, "results.jsonl"), privateText); - const output = path.join(root, "stage"); - const child = runCli("lib/shard-results.ts", ["--results-root", source, "--output-directory", output, "--shard-name", "area_test", "--attempt", "3"]); - assert.equal(child.status, 0, child.stderr); - assert.match(child.stdout, /Staged area_test attempt 3: 1 trials; incomplete/); - assert.match(child.stdout, /##vso\[task.logissue type=warning\]/); - assert.ok(!(child.stdout + child.stderr).includes(privateText)); - assert.equal(readJson(path.join(output, "shard.json")).complete, false); -}); - -test("summary CLI without selected-root preserves legacy JUnit-only behavior and default output", (t) => { - const root = setup(t); - const results = path.join(root, "download", "eval-result-legacy"); - fs.mkdirSync(results, { recursive: true }); - fs.writeFileSync(path.join(results, "junit.xml"), ''); - const child = runCli("build-eval-summary.ts", ["--results-root", path.join(root, "download")], - { TF_BUILD: "true", EVAL_EXPECTED_MATRIX: "invalid matrix is irrelevant in legacy mode" }, root); - assert.equal(child.status, 0, child.stderr); - assert.match(fs.readFileSync(path.join(root, "eval-summary.md"), "utf8"), /results — PASSED/); - assert.match(child.stdout, /##vso\[task.uploadsummary\]/); - assert.doesNotMatch(child.stdout, /EvalSummaryComplete/); - assert.equal(fs.existsSync(path.join(root, "eval-summary.json")), false); - assert.equal(fs.existsSync(path.join(root, "download", "shard-index.json")), false); -}); - -test("a selected-root flag without a value cannot silently fall back to legacy mode", (t) => { - const root = setup(t); - const child = runCli("build-eval-summary.ts", ["--results-root", root, "--selected-root"], { TF_BUILD: "true" }, root); - assert.equal(child.status, 1); - assert.match(child.stderr, /Missing value for --selected-root/); - assert.match(child.stdout, /##vso\[task.setvariable variable=EvalSummaryComplete\]false/); - assert.equal(fs.existsSync(path.join(root, "eval-summary.md")), false); -}); - -test("invalid Prepare cannot reuse a stale selected directory", (t) => { - const root = setup(t); - const selected = path.join(root, "selected"); - fs.mkdirSync(selected); - fs.writeFileSync(path.join(selected, "keep.txt"), "keep me"); - const child = runCli("build-eval-summary.ts", ["--results-root", path.join(root, "download"), "--selected-root", selected], - { TF_BUILD: "true", EVAL_EXPECTED_MATRIX: "{}" }, root); - assert.equal(child.status, 1); - assert.match(child.stderr, /must be empty/); - assert.match(child.stdout, /##vso\[task.setvariable variable=EvalSummaryComplete\]false/); - assert.deepEqual(fs.readdirSync(selected), ["keep.txt"]); - assert.equal(fs.readFileSync(path.join(selected, "keep.txt"), "utf8"), "keep me"); -}); - -const timelineEnv = { SYSTEM_COLLECTIONURI: "https://dev.azure.com/azure-sdk/", SYSTEM_TEAMPROJECTID: "00000000-0000-4000-8000-000000000001", - BUILD_BUILDID: "1001", SYSTEM_ACCESSTOKEN: "fixture-token", EVAL_EXPECTED_MATRIX: '{"a":{"shardName":"a"}}' }; -const timelineRecord = { type: "Job", identifier: "Eval.RunShard.a", attempt: 1, state: "completed", result: "failed" }; - -test("timeline uses matrix identifiers, highest attempts and completed state, rejecting ambiguous attempts", () => { - const matrix = { a: { shardName: "a" } }, records = [timelineRecord, { ...timelineRecord, attempt: 2 }]; - assert.deepEqual(latestShardAttempts({ records }, matrix).attempts.a, { attempt: 2, complete: true }); - records[1].result = "canceled"; - assert.equal(latestShardAttempts({ records }, matrix).attempts.a.complete, false); - assert.throws(() => latestShardAttempts({ records: [] }, matrix)); - assert.throws(() => latestShardAttempts({ records }, {})); - assert.throws(() => latestShardAttempts({ records: [timelineRecord, { ...timelineRecord, result: "canceled" }] }, matrix), /Ambiguous/); -}); - -test("newer failed attempt with no artifact cannot adopt an older complete artifact", t => { - const root = setup(t); artifact(root, "a", 1); - for (const [index, jobAttempts] of [undefined, null, - { schemaVersion: 1, valid: true, attempts: { a: { attempt: 2, complete: true } } }, - { schemaVersion: 1, valid: true, attempts: { a: { attempt: 1, complete: false } } }, - { schemaVersion: 1, valid: false, attempts: {} }].entries()) { - const selected = selectSummaryResults({ resultsRoot: path.join(root, "download"), selectedRoot: path.join(root, `selection-${index}`), expectedShards: ["a"], jobAttempts }); - assert.equal(selected.complete, false); assert.match(selected.status[0].reason, /timeline/); - } -}); - -test("timeline reads retry transient failures only, with a fixed three-attempt budget", async () => { - const waits = []; let calls = 0; - const result = await readShardAttempts(timelineEnv, { wait: async value => waits.push(value), fetchImpl: async (url, options) => { - calls++; assert.equal(url.href, "https://dev.azure.com/azure-sdk/00000000-0000-4000-8000-000000000001/_apis/build/builds/1001/timeline?api-version=7.1"); - assert.equal(options.headers.authorization, "Bearer fixture-token"); assert.equal(options.redirect, "error"); - if (calls === 1) throw new Error("Lost response"); - if (calls === 2) return new Response("", { status: 503 }); - return Response.json({ records: [timelineRecord] }); - } }); - assert.equal(result.valid, true); assert.equal(calls, 3); assert.deepEqual(waits, [1000, 2000]); - waits.length = 0; calls = 0; - await readShardAttempts(timelineEnv, { wait: async value => waits.push(value), fetchImpl: async () => ++calls === 1 ? - new Response("", { status: 429, headers: { "retry-after": "5" } }) : Response.json({ records: [timelineRecord] }) }); - assert.equal(calls, 2); assert.deepEqual(waits, [5000]); - calls = 0; - await assert.rejects(readShardAttempts(timelineEnv, { wait: async () => {}, fetchImpl: async () => { calls++; throw new Error("Offline"); } })); - assert.equal(calls, 3); - for (const status of [302, 401, 403]) { - calls = 0; - await assert.rejects(readShardAttempts(timelineEnv, { wait: () => assert.fail("Permanent failures do not retry"), - fetchImpl: async () => { calls++; return new Response("", { status }); } })); - assert.equal(calls, 1); - } -}); - -test("invalid timeline configuration cannot send the build token to another endpoint", async () => { - for (const collection of ["https://dev.azure.com:444/azure-sdk/", "https://dev.azure.com.attacker.example/azure-sdk/", - "http://dev.azure.com/azure-sdk/", "https://user:password@dev.azure.com/azure-sdk/", "https://dev.azure.com/azure-sdk/?extra=1"]) { - await assert.rejects(readShardAttempts({ ...timelineEnv, SYSTEM_COLLECTIONURI: collection }, { fetchImpl: () => assert.fail("Invalid endpoint reached fetch") })); - } -}); \ No newline at end of file diff --git a/eng/common/scripts/login-to-github.ps1 b/eng/common/scripts/login-to-github.ps1 index 6680f89bf2f0..c3553b91a208 100644 --- a/eng/common/scripts/login-to-github.ps1 +++ b/eng/common/scripts/login-to-github.ps1 @@ -29,10 +29,6 @@ When set in Azure DevOps, also exports the variable as an output variable (##vso[task.setvariable ...;isOutput=true]) for downstream jobs/stages. -.PARAMETER TokenRequest - Optional JSON object restricting the installation token's repositories and permissions. - Defaults to GITHUB_TOKEN_REQUEST. When omitted, retains the installation's default scope. - .OUTPUTS Sets environment variables in the current process and exports them to the CI system: - Azure DevOps: sets secret pipeline variables via ##vso logging commands @@ -47,8 +43,7 @@ param( [string[]] $InstallationTokenOwners = @("Azure"), [string] $VariableNamePrefix = "GH_TOKEN", [switch] $AlwaysUseOwnerSuffix, - [switch] $ExportAsOutputVariable, - [string] $TokenRequest = $env:GITHUB_TOKEN_REQUEST + [switch] $ExportAsOutputVariable ) $ErrorActionPreference = 'Stop' @@ -215,53 +210,16 @@ function New-GitHubInstallationToken { [Parameter(Mandatory)] [string] $Jwt, [Parameter(Mandatory)] [string] $InstallationId, [Parameter(Mandatory)] [string] $ApiBase, - [Parameter(Mandatory)] [string] $ApiVersion, - [hashtable] $TokenRequest = @{} + [Parameter(Mandatory)] [string] $ApiVersion ) $headers = Get-Headers -Jwt $Jwt -ApiVersion $ApiVersion $uri = "$ApiBase/app/installations/$InstallationId/access_tokens" - $request = @{ - Method = 'Post' - Headers = $headers - Uri = $uri - TimeoutSec = 30 - MaximumRetryCount = 3 - } - if ($TokenRequest.Count -gt 0) { - $request.Body = ConvertTo-Json -InputObject $TokenRequest -Depth 5 -Compress - $request.ContentType = 'application/json' - } - - $resp = Invoke-RestMethod @request - $token = Get-PropertyValue -InputObject $resp -PropertyName 'token' - if (!$token) { throw "Failed to obtain installation access token for installation $InstallationId." } - - $requestedPermissions = Get-PropertyValue -InputObject $TokenRequest -PropertyName 'permissions' - if ($requestedPermissions) { - $grantedPermissions = Get-PropertyValue -InputObject $resp -PropertyName 'permissions' - foreach ($permission in $requestedPermissions.Keys) { - if ((Get-PropertyValue -InputObject $grantedPermissions -PropertyName $permission) -ne $requestedPermissions[$permission]) { - throw "Installation token did not grant requested permission '$permission': '$($requestedPermissions[$permission])'." - } - } - } - return $token + $resp = Invoke-RestMethod -Method Post -Headers $headers -Uri $uri -TimeoutSec 30 -MaximumRetryCount 3 + if (!$resp.token) { throw "Failed to obtain installation access token for installation $InstallationId." } + return $resp.token } function Invoke-LoginToGitHub { - param( - [string] $TokenRequest, - [string] $VariableNamePrefix = 'GH_TOKEN' - ) - - $tokenRequestBody = @{} - if ($TokenRequest) { - $tokenRequestBody = ConvertFrom-Json -InputObject $TokenRequest -AsHashtable - if ($tokenRequestBody -isnot [System.Collections.IDictionary]) { - throw 'TokenRequest must be a JSON object.' - } - } - Write-Host "Generating GitHub App JWT by signing via Azure Key Vault (no key export)..." $jwt = New-GitHubAppJwt -VaultName $KeyVaultName -KeyName $KeyName -AppId $GitHubAppId @@ -274,7 +232,7 @@ function Invoke-LoginToGitHub { Write-Host "Installation ID resolved: $installationId" Write-Host "Exchanging JWT for installation access token..." - $installationToken = New-GitHubInstallationToken -Jwt $jwt -InstallationId $installationId -ApiBase $GitHubApiBaseUrl -ApiVersion $GitHubApiVersion -TokenRequest $tokenRequestBody + $installationToken = New-GitHubInstallationToken -Jwt $jwt -InstallationId $installationId -ApiBase $GitHubApiBaseUrl -ApiVersion $GitHubApiVersion $variableName = $VariableNamePrefix if ($AlwaysUseOwnerSuffix -or $InstallationTokenOwners.Count -gt 1) { @@ -320,4 +278,4 @@ if ($env:PESTER_TEST_RUN -eq 'true') { return } -Invoke-LoginToGitHub -TokenRequest $TokenRequest -VariableNamePrefix $VariableNamePrefix +Invoke-LoginToGitHub diff --git a/eng/pipelines/scripts/sync_emitter.py b/eng/pipelines/scripts/sync_emitter.py index 029eeaeb284d..4426c7e44647 100644 --- a/eng/pipelines/scripts/sync_emitter.py +++ b/eng/pipelines/scripts/sync_emitter.py @@ -23,6 +23,7 @@ script_root: str = os.path.dirname(os.path.realpath(__file__)) skip_artifacts: List[str] = [ + "azure-ai-anomalydetector", # deprecated # expect failure on below # emitter generates inconsistent code for id-parameterized subclients (LargePersonGroup, # LargeFaceList): wrapper clients call the removed plural getLargePersonGroups()/getLargeFaceLists() diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index 463315065b85..1b0af4b0c28c 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -308,7 +308,6 @@ jobs: - job: 'Analyze' condition: and(succeeded(), ne(variables['Skip.Analyze'], 'true')) - timeoutInMinutes: 120 pool: name: $(LINUXPOOL) diff --git a/eng/scripts/Compare-CurrentToCodegeneration.ps1 b/eng/scripts/Compare-CurrentToCodegeneration.ps1 index 5f270531575f..d354d6845831 100644 --- a/eng/scripts/Compare-CurrentToCodegeneration.ps1 +++ b/eng/scripts/Compare-CurrentToCodegeneration.ps1 @@ -64,6 +64,11 @@ function Find-GenerationInformation { Write-Host "Skipping TypeSpec regeneration for v2 library: $LibraryFolder" return } + if ($LibraryFolder.Contains("azure-ai-anomalydetector")) { + # Skip azure-ai-anomalydetector for TypeSpec regeneration as it is has errors that need to be fixed. + Write-Host "Skipping TypeSpec regeneration for azure-ai-anomalydetector: $LibraryFolder" + return + } if ($LibraryFolder.Contains("azure-ai-vision-face")) { # Skip azure-ai-vision-face for TypeSpec regeneration as it is has errors that need to be fixed. Write-Host "Skipping TypeSpec regeneration for azure-ai-vision-face: $LibraryFolder" diff --git a/eng/scripts/aggregate_javadoc_configuration.txt b/eng/scripts/aggregate_javadoc_configuration.txt index 7144da67ff2c..5144623f7723 100644 --- a/eng/scripts/aggregate_javadoc_configuration.txt +++ b/eng/scripts/aggregate_javadoc_configuration.txt @@ -18,6 +18,7 @@ Group;Azure Core - Serializer - JSON - Gson;com.azure.core.serializer.json.gson* Group;Azure Core - Serializer - JSON - Jackson;com.azure.core.serializer.json.jackson* Group;Azure Core - Test;com.azure.core.test* Group;Azure Core - Tracing - OpenTelemetry;com.azure.core.tracing.opentelemetry* +Group;Azure Anomaly Detector;com.azure.ai.anomalydetector* Group;Azure App Configuration;com.azure.data.appconfiguration* Group;Azure Communication;com.azure.communication* Group;Azure Confidential Ledger;com.azure.security.confidentialledger* @@ -25,10 +26,12 @@ Group;Azure Container Registry;com.azure.containers.containerregistry* Group;Azure Cosmos;com.azure.cosmos* Group;Azure Device Update for IoT Hub;com.azure.iot.deviceupdate* Group;Azure Digital Twins;com.azure.digitaltwins.core* +Group;Azure Document Translator;com.azure.ai.documenttranslator* Group;Azure Event Grid;com.azure.messaging.eventgrid* Group;Azure Event Hubs;com.azure.messaging.eventhubs* Group;Azure Form Recognizer;com.azure.ai.formrecognizer* Group;Azure Identity;com.azure.identity* +Group;Azure IoT Models Repository;com.azure.iot.modelsrepository* Group;Azure Key Vault;com.azure.security.keyvault* Group;Azure Metrics Advisor;com.azure.ai.metricsadvisor* Group;Azure Monitor - Ingestion;com.azure.monitor.ingestion* diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 0d4bd6af14c1..8a385ea84b44 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -44,25 +44,22 @@ commons-net:commons-net;3.9.0 io.cloudevents:cloudevents-api;2.2.0 io.cloudevents:cloudevents-core;2.2.0 io.fabric8:kubernetes-client;6.12.1 -io.netty:netty-buffer;4.2.19.Final -io.netty:netty-common;4.2.19.Final -io.netty:netty-codec-base;4.2.19.Final -io.netty:netty-codec-http;4.2.19.Final -io.netty:netty-codec-http2;4.2.19.Final -io.netty:netty-codec-http3;4.2.19.Final -io.netty:netty-handler;4.2.19.Final -io.netty:netty-handler-proxy;4.2.19.Final -io.netty:netty-resolver;4.2.19.Final -io.netty:netty-resolver-dns;4.2.19.Final -io.netty:netty-resolver-dns-native-macos;4.2.19.Final +io.netty:netty-buffer;4.1.138.Final +io.netty:netty-common;4.1.138.Final +io.netty:netty-codec;4.1.138.Final +io.netty:netty-codec-http;4.1.138.Final +io.netty:netty-codec-http2;4.1.138.Final +io.netty:netty-handler;4.1.138.Final +io.netty:netty-handler-proxy;4.1.138.Final +io.netty:netty-resolver;4.1.138.Final +io.netty:netty-resolver-dns;4.1.138.Final io.netty:netty-tcnative-boringssl-static;2.0.84.Final -io.netty:netty-transport;4.2.19.Final -io.netty:netty-transport-classes-epoll;4.2.19.Final -io.netty:netty-transport-native-epoll;4.2.19.Final -io.netty:netty-transport-native-unix-common;4.2.19.Final -io.netty:netty-transport-native-kqueue;4.2.19.Final -io.projectreactor.netty:reactor-netty-http;1.3.7 -io.projectreactor:reactor-core;3.8.7 +io.netty:netty-transport;4.1.138.Final +io.netty:netty-transport-native-epoll;4.1.138.Final +io.netty:netty-transport-native-unix-common;4.1.138.Final +io.netty:netty-transport-native-kqueue;4.1.138.Final +io.projectreactor.netty:reactor-netty-http;1.2.18 +io.projectreactor:reactor-core;3.7.19 io.vertx:vertx-codegen;4.5.32 io.vertx:vertx-core;4.5.32 javax.websocket:javax.websocket-api;1.1 @@ -127,7 +124,7 @@ io.opentelemetry:opentelemetry-bom;1.65.0 io.opentelemetry.instrumentation:opentelemetry-runtime-telemetry;2.31.1-alpha io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter;2.31.1 io.opentelemetry.instrumentation:opentelemetry-logback-appender-1.0;2.31.1-alpha -io.projectreactor:reactor-test;3.8.7 +io.projectreactor:reactor-test;3.7.19 io.github.hakky54:logcaptor;2.9.3 com.squareup.okio:okio;3.18.1 com.squareup.okio:okio-jvm;3.18.1 @@ -208,7 +205,7 @@ org.revapi:revapi-reporter-json;0.5.1 org.revapi:revapi-maven-plugin;0.15.1 # External Dependency Exceptions -# This section is for external dependencies whose versions were different from +# This section is for external dependencies whose versions were different than # what was defined in the parent pom. # Format; # _groupId:artifactId;dependency-version diff --git a/eng/versioning/supported_external_dependency_versions.json b/eng/versioning/supported_external_dependency_versions.json index 722d67abfd9e..35fddef80f79 100644 --- a/eng/versioning/supported_external_dependency_versions.json +++ b/eng/versioning/supported_external_dependency_versions.json @@ -162,10 +162,10 @@ ], "reactor_2025": [ - { "io.projectreactor.netty:reactor-netty": "1.3.0" }, - { "io.projectreactor.netty:reactor-netty-http": "1.3.0" }, - { "io.projectreactor:reactor-core": "3.8.0" }, - { "io.projectreactor:reactor-test": "3.8.0" } + { "io.projectreactor.netty:reactor-netty": "1.3.0-M2" }, + { "io.projectreactor.netty:reactor-netty-http": "1.3.0-M2" }, + { "io.projectreactor:reactor-core": "3.8.0-M2" }, + { "io.projectreactor:reactor-test": "3.8.0-M2" } ], "reactor_2024": [ diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 58c0221c5980..55c63e3388b5 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -38,10 +38,12 @@ com.azure:azure-sdk-parent;1.6.0;1.6.0 com.azure:azure-client-sdk-parent;1.7.0;1.7.0 com.azure:azure-ai-agents-persistent;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-ai-agents;2.7.0;2.8.0 +com.azure:azure-ai-anomalydetector;3.0.0-beta.5;3.0.0-beta.6 com.azure:azure-ai-contentsafety;1.0.21;1.1.0-beta.2 com.azure:azure-ai-contentunderstanding;1.0.0;1.1.0-beta.4 com.azure:azure-ai-discovery;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-ai-documentintelligence;1.0.11;1.1.0-beta.1 +com.azure:azure-ai-documenttranslator;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-ai-formrecognizer;4.1.13;4.2.0-beta.1 com.azure:azure-ai-formrecognizer-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-ai-inference;1.0.0-beta.5;1.0.0-beta.6 @@ -59,11 +61,21 @@ com.azure:azure-ai-translation-text;2.0.4;2.1.0-beta.1 com.azure:azure-ai-translation-document;2.0.2;2.1.0-beta.1 com.azure:azure-ai-vision-face;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-ai-voicelive;1.1.0;1.2.0-beta.1 +com.azure:azure-analytics-defender-easm;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-analytics-purview-datamap;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-analytics-onlineexperimentation;1.0.0-beta.1;1.0.0-beta.2 +com.azure:azure-analytics-purview-scanning;1.0.0-beta.2;1.0.0-beta.3 +com.azure:azure-analytics-purview-sharing;1.0.0-beta.2;1.0.0-beta.3 +com.azure:azure-analytics-purview-administration;1.0.0-beta.1;1.0.0-beta.2 +com.azure:azure-analytics-purview-workflow;1.0.0-beta.1;1.0.0-beta.2 +com.azure:azure-analytics-synapse-accesscontrol;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-analytics-synapse-artifacts;1.0.0-beta.17;1.0.0-beta.18 +com.azure:azure-analytics-synapse-spark;1.0.0-beta.5;1.0.0-beta.6 +com.azure:azure-analytics-synapse-managedprivateendpoints;1.0.0-beta.5;1.0.0-beta.6 +com.azure:azure-analytics-synapse-monitoring;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-code-customization-parent;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-communication-callautomation;1.7.3;1.8.0-beta.1 +com.azure:azure-communication-callingserver;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-communication-chat;1.6.9;1.7.0-beta.1 com.azure:azure-communication-common;1.4.9;1.5.0-beta.1 com.azure:azure-communication-common-perf;1.0.0-beta.1;1.0.0-beta.1 @@ -123,6 +135,8 @@ com.azure:azure-developer-devcenter;1.0.18;1.1.0-beta.1 com.azure:azure-developer-loadtesting;1.0.32;1.2.0-beta.2 com.azure:azure-digitaltwins-core;1.5.9;1.6.0-beta.1 com.azure:azure-health-deidentification;1.0.0;1.1.0-beta.2 +com.azure:azure-health-insights-clinicalmatching;1.0.0-beta.1;1.0.0-beta.2 +com.azure:azure-health-insights-cancerprofiling;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-health-insights-radiologyinsights;1.1.10;1.2.0-beta.1 com.azure:azure-identity;1.18.7;1.19.0-beta.3 com.azure:azure-identity-extensions;1.2.10;1.3.0-beta.1 @@ -130,7 +144,9 @@ com.azure:azure-identity-broker;1.1.24;1.2.0-beta.1 com.azure:azure-identity-broker-samples;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-identity-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-iot-deviceupdate;1.1.2;1.2.0-beta.1 +com.azure:azure-iot-modelsrepository;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-json;1.5.1;1.6.0-beta.1 +com.azure:azure-maps-traffic;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-maps-weather;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-maps-timezone;1.0.0-beta.2;1.0.0-beta.3 com.azure:azure-maps-geolocation;1.0.0-beta.3;1.0.0-beta.4 @@ -163,13 +179,14 @@ com.azure:azure-monitor-query-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-openrewrite;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-perf-test-parent;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-analytics-planetarycomputer;1.0.0;1.1.0-beta.1 +com.azure:azure-quantum-jobs;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-search-documents;12.0.3;12.1.0-beta.3 com.azure:azure-search-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-security-attestation;1.2.0;1.3.0-beta.1 com.azure:azure-security-confidentialledger;1.0.38;2.0.2-beta.2 com.azure:azure-security-keyvault-administration;4.8.3;4.9.0-beta.2 com.azure:azure-security-keyvault-certificates;4.9.3;4.10.0-beta.2 -com.azure:azure-security-keyvault-jca;2.13.0;2.14.0-beta.1 +com.azure:azure-security-keyvault-jca;2.12.0;2.13.0-beta.1 com.azure:azure-security-test-keyvault-jca;1.0.0;1.0.0 com.azure:azure-security-keyvault-keys;4.11.3;4.12.0-beta.3 com.azure:azure-security-keyvault-secrets;4.11.3;4.12.0-beta.1 @@ -265,17 +282,17 @@ com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appservice;2.56.3;2.57.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.14;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.12;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-compute;2.62.0;2.63.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-compute;2.61.2;2.62.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.15;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.55.6;2.56.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-containerservice;2.65.0;2.66.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerservice;2.64.2;2.65.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.55.3;2.56.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-dns;2.53.12;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.13;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-keyvault;2.55.6;2.56.0 com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.12;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-msi;2.54.3;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-network;2.62.0;2.63.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-network;2.61.2;2.62.0 com.azure.resourcemanager:azure-resourcemanager-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.12;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-resources;2.55.0;2.56.0-beta.1 @@ -284,7 +301,7 @@ com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.1;2.0.0-beta. com.azure.resourcemanager:azure-resourcemanager-search;2.54.11;2.55.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-servicebus;2.53.12;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-sql;2.54.3;2.55.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-storage;2.59.0;2.60.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-storage;2.58.2;2.59.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.54.0;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.4;2.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-mediaservices;2.4.0;2.5.0-beta.1 @@ -326,13 +343,13 @@ com.azure.resourcemanager:azure-resourcemanager-advisor;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appconfiguration;1.1.0;1.2.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-attestation;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-azurestack;1.0.0;1.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-azurestackhci;1.2.0;1.3.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-azurestackhci;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-avs;1.5.0;1.6.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-commerce;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-signalr;1.0.0;1.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-cognitiveservices;1.4.0;1.5.0-beta.6 +com.azure.resourcemanager:azure-resourcemanager-cognitiveservices;1.4.0;1.5.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-customerinsights;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-databox;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-datamigration;1.2.0;1.3.0-beta.1 @@ -378,6 +395,7 @@ com.azure.resourcemanager:azure-resourcemanager-mysqlflexibleserver;1.0.0;1.1.0- com.azure.resourcemanager:azure-resourcemanager-baremetalinfrastructure;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-quota;2.0.0;2.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.4;1.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dataprotection;1.6.0;1.7.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-desktopvirtualization;1.2.0;1.3.0-beta.1 @@ -387,6 +405,7 @@ com.azure.resourcemanager:azure-resourcemanager-edgeorder;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-securityinsights;1.0.0;1.1.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-oep;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-dnsresolver;1.1.0;1.2.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;1.3.1;1.4.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-azureadexternalidentities;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dashboard;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-servicelinker;1.0.0;1.1.0-beta.1 @@ -438,6 +457,7 @@ com.azure.resourcemanager:azure-resourcemanager-apicenter;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.1.0;1.2.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-playwrighttesting;1.0.0;1.1.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-recoveryservicesdatareplication;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-networkanalytics;1.0.1;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-springappdiscovery;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-workloadssapvirtualinstance;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-largeinstance;1.0.0-beta.2;1.0.0-beta.3 @@ -455,11 +475,11 @@ com.azure.resourcemanager:azure-resourcemanager-servicefabricmanagedclusters;1.1 com.azure.resourcemanager:azure-resourcemanager-healthdataaiservices;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-redhatopenshift;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-fabric;1.0.0;1.1.0-beta.3 -com.azure.resourcemanager:azure-resourcemanager-computeschedule;1.1.0;1.2.0-beta.3 +com.azure.resourcemanager:azure-resourcemanager-computeschedule;1.1.0;1.2.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-trustedsigning;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-iotoperations;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerorchestratorruntime;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-terraform;1.0.0-beta.2;1.0.0-beta.3 +com.azure.resourcemanager:azure-resourcemanager-terraform;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-connectedcache;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-neonpostgres;1.0.1;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-pineconevectordb;1.0.0-beta.2;1.0.0-beta.3 @@ -484,7 +504,7 @@ com.azure.resourcemanager:azure-resourcemanager-planetarycomputer;1.0.0;1.1.0-be com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration-fluxconfigurations;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration-extensions;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration-extensiontypes;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-cloudhealth;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-cloudhealth;1.0.0-beta.4;1.0.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-resources-deploymentstacks;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration-privatelinkscopes;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-resources-bicep;1.0.0-beta.1;1.0.0-beta.2 @@ -498,7 +518,7 @@ com.azure.resourcemanager:azure-resourcemanager-disconnectedoperations;1.0.0;1.1 com.azure.resourcemanager:azure-resourcemanager-compute-recommender;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-computelimit;1.4.0;1.5.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerregistry-tasks;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-edgeactions;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-edgeactions;1.0.0-beta.1;1.0.0 com.azure.resourcemanager:azure-resourcemanager-computebulkactions;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-artifactsigning;1.0.0;1.1.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-appnetwork;1.0.0-beta.2;1.0.0-beta.3 @@ -507,7 +527,7 @@ com.azure.resourcemanager:azure-resourcemanager-horizondb;1.0.0-beta.2;1.0.0-bet com.azure.resourcemanager:azure-resourcemanager-relationships;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-fileshares;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-monitor-slis;1.0.0-beta.2;1.0.0-beta.3 -com.azure.resourcemanager:azure-resourcemanager-monitor-workspaces;1.0.0;1.1.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-monitor-workspaces;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-programenrollment;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-resiliencemanagement;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-napsteromniagentapi;1.0.0-beta.1;1.0.0-beta.2 @@ -556,9 +576,6 @@ io.clientcore:optional-dependency-tests;1.0.0-beta.1;1.0.0-beta.1 # In the pom, the version update tag after the version should name the unreleased package and the dependency version: # -unreleased_com.azure:azure-core;1.61.0-beta.1 -unreleased_com.azure:azure-core-http-netty;1.17.0-beta.1 -unreleased_com.azure:azure-core-test;1.27.0-beta.20 unreleased_com.azure.v2:azure-core;2.0.0-beta.1 unreleased_com.azure.v2:azure-identity;2.0.0-beta.1 unreleased_com.azure.v2:azure-data-appconfiguration;2.0.0-beta.1 diff --git a/pom.xml b/pom.xml index 1f4bf0534cb7..81a5f4f9dd62 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,7 @@ sdk/advisor sdk/ai sdk/alertsmanagement + sdk/anomalydetector sdk/apicenter sdk/apimanagement sdk/appcomplianceautomation @@ -108,6 +109,7 @@ sdk/documentintelligence sdk/durabletask sdk/dynatrace + sdk/easm sdk/edgeactions sdk/edgeorder sdk/edgezones @@ -156,6 +158,7 @@ sdk/loadtesting sdk/loganalytics sdk/logic + sdk/logz sdk/machinelearning sdk/maintenance sdk/managedapplications @@ -169,6 +172,8 @@ sdk/metricsadvisor sdk/migration sdk/migrationdiscoverysap + sdk/mobilenetwork + sdk/modelsrepository sdk/mongocluster sdk/mongodbatlas sdk/monitor @@ -179,6 +184,7 @@ sdk/neonpostgres sdk/netapp sdk/network + sdk/networkanalytics sdk/networkcloud sdk/networkfunction sdk/newrelicobservability diff --git a/sdk/ai/azure-ai-agents/pom.xml b/sdk/ai/azure-ai-agents/pom.xml index 723397962dad..3947b3ac461d 100644 --- a/sdk/ai/azure-ai-agents/pom.xml +++ b/sdk/ai/azure-ai-agents/pom.xml @@ -65,7 +65,7 @@ com.azure azure-core - 1.61.0-beta.1 + 1.60.0 com.azure @@ -75,37 +75,37 @@ com.azure azure-core-http-netty - 1.17.0-beta.1 + 1.16.8 io.projectreactor.netty reactor-netty-http - 1.3.7 + 1.2.18 io.netty netty-codec-http - 4.2.19.Final + 4.1.138.Final io.netty netty-transport - 4.2.19.Final + 4.1.138.Final io.netty netty-common - 4.2.19.Final + 4.1.138.Final io.netty - netty-codec-base - 4.2.19.Final + netty-codec + 4.1.138.Final io.netty netty-buffer - 4.2.19.Final + 4.1.138.Final com.squareup.okhttp3 @@ -140,7 +140,7 @@ com.azure azure-core-test - 1.27.0-beta.20 + 1.27.0-beta.19 test @@ -199,12 +199,12 @@ com.openai:openai-java:[4.69.0] - io.projectreactor.netty:reactor-netty-http:[1.3.7] - io.netty:netty-codec-http:[4.2.19.Final] - io.netty:netty-transport:[4.2.19.Final] - io.netty:netty-common:[4.2.19.Final] - io.netty:netty-codec-base:[4.2.19.Final] - io.netty:netty-buffer:[4.2.19.Final] + io.projectreactor.netty:reactor-netty-http:[1.2.18] + io.netty:netty-codec-http:[4.1.138.Final] + io.netty:netty-transport:[4.1.138.Final] + io.netty:netty-common:[4.1.138.Final] + io.netty:netty-codec:[4.1.138.Final] + io.netty:netty-buffer:[4.1.138.Final] com.squareup.okhttp3:okhttp:[4.12.0] com.squareup.okio:okio-jvm:[3.18.1] diff --git a/sdk/ai/azure-ai-agents/src/main/java/module-info.java b/sdk/ai/azure-ai-agents/src/main/java/module-info.java index c3d5364775d4..06498120ce9e 100644 --- a/sdk/ai/azure-ai-agents/src/main/java/module-info.java +++ b/sdk/ai/azure-ai-agents/src/main/java/module-info.java @@ -12,7 +12,6 @@ requires io.netty.transport; requires io.netty.common; requires io.netty.codec; - requires io.netty.codec.compression; requires io.netty.buffer; requires okhttp3; requires okio; diff --git a/sdk/ai/azure-ai-projects/pom.xml b/sdk/ai/azure-ai-projects/pom.xml index 3f5e28667ca7..45ed470558fa 100644 --- a/sdk/ai/azure-ai-projects/pom.xml +++ b/sdk/ai/azure-ai-projects/pom.xml @@ -63,7 +63,7 @@ Code generated by Microsoft (R) TypeSpec Code Generator. com.azure azure-core-http-netty - 1.17.0-beta.1 + 1.16.8 com.azure diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md b/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md new file mode 100644 index 000000000000..a57f8b207b92 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/CHANGELOG.md @@ -0,0 +1,85 @@ +# Release History + +## 3.0.0-beta.6 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 3.0.0-beta.5 (2022-12-08) + +### Features Added + +- Added `OneTable` and `MultiTable` two data schemas. +- Added Azure Managed Identity data reader access for Azure Blob Storage. +- Added `topContributorCount` in the request body for `getMultivariateBatchDetectionResult`, `detectMultivariateBatchAnomaly` and `detectMultivariateLastAnomaly`. + +### Breaking Changes + +- Renamed `Model` to `AnomalyDetectionModel`. +- Renamed `DetectionRequest` to `MultivariateBatchDetectionOptions`. +- Renamed `DetectionResult` to `MultivariateDetectionResult`. +- Renamed `DetectionStatus` to `MultivariateBatchDetectionStatus`. +- Renamed `DetectionResultSummary` to `MultivariateBatchDetectionResultSummary`. +- Renamed `FillNaMethod` to `FillNAMethod`. +- Renamed `LastDetectionRequest` to `MultivariateLastDetectionOptions`. +- Renamed `LastDetectionResult` to `MultivariateLastDetectionResult`. +- Replaced `ModelSnapshot` with `AnomalyDetectionModel` in `listMultivariateModel`. +- Renamed `trainMultivariateModelWithResponse` to `trainMultivariateModel`. +- Renamed `detectAnomalyWithResponse` to `detectMultivariateBatchAnomaly`. +- Renamed `getDetectionResult` to `getMultivariateBatchDetectionResult`. +- Renamed `listMultivariateModel` to `listMultivariateModels`. +- Renamed `lastDetectAnomalyWithResponse` to `detectMultivariateLastAnomaly`. +- Renamed `DetectRequest` to `UnivariateDetectionOptions`. +- Renamed `EntireDetectResponse` to `UnivariateEntireDetectionResult`. +- Renamed `LastDetectResponse` to `UnivariateLastDetectionResult`. +- Renamed `ChangePointDetectRequest` to `UnivariateChangePointDetectionOptions`. +- Renamed `ChangePointDetectResponse` to `UnivariateChangePointDetectionResult`. +- Renamed `detectEntireSeries` to `detectUnivariateEntireSeries`. +- Renamed `detectLastPoint` to `detectUnivariateLastPoint`. +- Renamed `detectChangePoint` to `detectUnivariateChangePoint`. +- Added `DataSchema` to `ModelInfo` +- Removed `AnomalyDetectorError`. +- Removed `AnomalyDetectorErrorCodes`. +- Removed `AnomalyDetectorErrorException`. +- Removed `ErrorResponseException`. +- Removed `TrainMultivariateModelHeaders` in `trainMultivariateModelWithResponse`. +- Removed `TrainMultivariateModelResponse` in `trainMultivariateModelWithResponse`. +- Removed `DetectAnomalyHeader` in `detectAnomalyWithResponse`. +- Removed `DetectAnomalyResponse` in `detectAnomalyWithResponse`. +- Removed `exportModelWithResponse`. +- Removed `changedvalue` in the inference response body. +- Removed `detectingPoints` in the sync inference request body. + + +## 3.0.0-beta.4 (2022-01-23) + +- Fix release issues + +## 3.0.0-beta.3 (2022-01-18) + +- Introduced the new API `lastDetectAnomaly` +- Added 2 new optional properties: `imputeMode` & `imputeFixedValue` to the `DetectRequest` object. +- Added 1 new optional property: `severity` to the `EntireDetectResponse` & `LastDetectResponse` objects. +- Removed the optional property `errors` from the `VariableState` object. +- Refactored the optional property `contributors` to `interpretation` from the `AnomalyValue` object. +- Modified the `FillNAMethod` object into an extensible enum. + + +## 3.0.0-beta.2 (2021-04-16) + +### New Features + +- Add support for multivariate anomaly detection + +## 3.0.0-beta.1 (2020-08-27) + +- Change version to 3.0.0-beta.1 + +## 1.0.0-beta.1 (2020-08-27) + +- Initial beta release for Anomaly Detector client library. diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/README.md b/sdk/anomalydetector/azure-ai-anomalydetector/README.md new file mode 100644 index 000000000000..98f58d9403ce --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/README.md @@ -0,0 +1,247 @@ +# Azure Anomaly Detector client library for Java + +[Anomaly Detector](https://learn.microsoft.com/azure/cognitive-services/Anomaly-Detector/overview) is an AI service with a set of APIs, which enables you to monitor and detect anomalies in your time series data with little machine learning (ML) knowledge, either batch validation or real-time inference. + +[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][api_reference_doc] | [Product Documentation][product_documentation] | [Samples][samples_readme] + +## Getting started + +### Prerequisites + +- A [Java Development Kit (JDK)][jdk_link], version 11 or later. +- [Azure Subscription][azure_subscription] +- An existing Cognitive Services or Anomaly Detector resource. + +For more information about creating the resource or how to get the location and sku information see +[here][cognitive_resource_cli]. + +### Include the Package + +[//]: # ({x-version-update-start;com.azure:azure-ai-anomalydetector;current}) + +```xml + + com.azure + azure-ai-anomalydetector + 3.0.0-beta.6 + +``` + +[//]: # ({x-version-update-end}) + +### Authenticate the client + +In order to interact with the Anomaly Detector service, you'll need to create an instance of +[`MultivariateClient`][multivariate_client_class], [`MultivariateAsyncClient`][multivariate_async_client_class], +[`UnivariateClient`][univariate_client_class], or [`UnivariateAsyncClient`][univariate_async_client_class]. You will +need an **endpoint** and an **API key** to instantiate a client object. + +#### Get API Key + +You can obtain the endpoint and API key from the resource information in the [Azure Portal][azure_portal]. + +Alternatively, you can use the [Azure CLI][azure_cli] snippet below to get the API key from the Anomaly Detector resource. + +```bash +az cognitiveservices account keys list --resource-group --name +``` + +#### Create AnomalyDetectorClient with Azure Active Directory Credential + +You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. Note that regional +endpoints do not support AAD authentication. Create a [custom subdomain][custom_subdomain] for your resource in order +to use this type of authentication. + +After setup, you can choose which type of [credential][azure_identity_credential_type] from `azure-identity` to use. +We recommend using [DefaultAzureCredential][identity_dac], configured through the `AZURE_TOKEN_CREDENTIALS` environment variable. +Set this variable as described in the [Learn documentation][customize_defaultAzureCredential], which provides the most up-to-date guidance and examples. + +To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below, or other credential providers provided +with the Azure SDK, please include the `azure-identity` package: + +[//]: # ({x-version-update-start;com.azure:azure-identity;dependency}) + +```xml + + com.azure + azure-identity + 1.18.2 + +``` + +You will also need to [register a new AAD application][register_aad_app] and [grant access][aad_grant_access] to +Anomaly Detector by assigning the `"Cognitive Services User"` role to your service principal. + +##### Sync client + +```java readme-sample-createAnomalyDetectorClient +String endpoint = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_ENDPOINT"); +String key = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_API_KEY"); + +MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new AzureKeyCredential(key)) + .endpoint(endpoint) + .buildMultivariateClient(); + +UnivariateClient univariateClient = new AnomalyDetectorClientBuilder() + .credential(new AzureKeyCredential(key)) + .endpoint(endpoint) + .buildUnivariateClient(); +``` + +## Key concepts + +With the Anomaly Detector, you can either detect anomalies in one variable using **Univariate Anomaly Detection**, or +detect anomalies in multiple variables with **Multivariate Anomaly Detection**. + +|Feature |Description | +|---------|---------| +|Univariate Anomaly Detection | Detect anomalies in one variable, like revenue, cost, etc. The model was selected automatically based on your data pattern. | +|Multivariate Anomaly Detection| Detect anomalies in multiple variables with correlations, which are usually gathered from equipment or other complex system. The underlying model used is Graph attention network.| + +### Univariate Anomaly Detection + +The Univariate Anomaly Detection API enables you to monitor and detect abnormalities in your time series data without +having to know machine learning. The algorithms adapt by automatically identifying and applying the best-fitting models +to your data, regardless of industry, scenario, or data volume. Using your time series data, the API determines +boundaries for anomaly detection, expected values, and which data points are anomalies. + +Using the Anomaly Detector doesn't require any prior experience in machine learning, and the REST API enables you to +easily integrate the service into your applications and processes. + +With the Univariate Anomaly Detection, you can automatically detect anomalies throughout your time series data, or as +they occur in real-time. + +|Feature |Description | +|---------|---------| +| Streaming detection| Detect anomalies in your streaming data by using previously seen data points to determine if your latest one is an anomaly. This operation generates a model using the data points you send, and determines if the target point is an anomaly. By calling the API with each new data point you generate, you can monitor your data as it's created. | +| Batch detection | Use your time series to detect any anomalies that might exist throughout your data. This operation generates a model using your entire time series data, with each point analyzed with the same model. | +| Change points detection | Use your time series to detect any trend change points that exist in your data. This operation generates a model using your entire time series data, with each point analyzed with the same model. | + +### Multivariate Anomaly Detection + +The **Multivariate Anomaly Detection** APIs further enable developers by easily integrating advanced AI for detecting +anomalies from groups of metrics, without the need for machine learning knowledge or labeled data. Dependencies and +inter-correlations between up to 300 different signals are now automatically counted as key factors. This new +capability helps you to proactively protect your complex systems such as software applications, servers, factory +machines, spacecraft, or even your business, from failures. + +With the Multivariate Anomaly Detection, you can automatically detect anomalies throughout your time series data, or as +they occur in real-time. There are three processes to use Multivariate Anomaly Detection. + +- **Training**: Use Train Model API to create and train a model, then use Get Model Status API to get the status and model metadata. +- **Inference**: + - Use Async Inference API to trigger an asynchronous inference process and use Get Inference results API to get detection results on a batch of data. + - You could also use Sync Inference API to trigger a detection on one timestamp every time. +- **Other operations**: List Model API and Delete Model API are supported in Multivariate Anomaly Detection model for model management. + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other. This +ensures that the recommendation of reusing client instances is always safe, even across threads. + +## Examples + +The following section provides several code snippets covering some of the most common Anomaly Detector service tasks, +including: + +- [Univariate Anomaly Detection - Batch detection](#batch-detection) +- [Univariate Anomaly Detection - Streaming detection](#streaming-detection) +- [Univariate Anomaly Detection - Detect change points](#detect-change-points) +- [Multivariate Anomaly Detection](#multivariate-anomaly-detection-sample) + +### Create client + +```java readme-sample-createAnomalyDetectorClient +String endpoint = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_ENDPOINT"); +String key = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_API_KEY"); + +MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new AzureKeyCredential(key)) + .endpoint(endpoint) + .buildMultivariateClient(); + +UnivariateClient univariateClient = new AnomalyDetectorClientBuilder() + .credential(new AzureKeyCredential(key)) + .endpoint(endpoint) + .buildUnivariateClient(); +``` + +### Batch detection + +For batch detection in univariate anomaly detection, please go to this sample for better understanding the workflow: +[DetectAnomaliesEntireSeries.java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java) + +### Streaming detection + +For streaming/last detection in univariate anomaly detection, please go to this sample for better understanding the +workflow: [DetectAnomaliesLastPoint.java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java) + +### Detect change points + +For change points detection in univariate anomaly detection, please go to this sample for better understanding the +workflow: [DetectChangePoints.java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java) + +### Multivariate Anomaly Detection Sample + +To see how to use Anomaly Detector library to conduct Multivariate Anomaly Detection, see this [MultivariateSample.java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/MultivariateSample.java). + +## Troubleshooting + +### Enabling Logging + +Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite +their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help +locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +## Next steps + +These code samples show common scenario operations with the Azure Anomaly Detector library. More samples can be found +under the [samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector) directory. + +For more extensive documentation on Azure Anomaly Detector, see the [Anomaly Detector documentation](https://learn.microsoft.com/azure/cognitive-services/anomaly-detector/overview) on +learn.microsoft.com. + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License +Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. +For details, visit [cla.microsoft.com][cla]. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate +the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to +do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the +[Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +[cla]: https://cla.microsoft.com +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com +[samples]: src/samples/java/com/azure/ai/anomalydetector +[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src +[samples_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/ +[azure_subscription]: https://azure.microsoft.com/free/ +[api_reference_doc]: https://azure.github.io/azure-sdk-for-java/ +[product_documentation]: https://learn.microsoft.com/azure/cognitive-services/anomaly-detector/ +[cognitive_resource_cli]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli +[multivariate_client_class]: https://github.com/Azure/azure-sdk-for-java/blob/8b2622353dd8c4a03a87c7e04a6f82bf0712bab5/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateClient.java +[multivariate_async_client_class]: https://github.com/Azure/azure-sdk-for-java/blob/8b2622353dd8c4a03a87c7e04a6f82bf0712bab5/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateAsyncClient.java +[univariate_client_class]: https://github.com/Azure/azure-sdk-for-java/blob/8b2622353dd8c4a03a87c7e04a6f82bf0712bab5/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateClient.java +[univariate_async_client_class]: https://github.com/Azure/azure-sdk-for-java/blob/8b2622353dd8c4a03a87c7e04a6f82bf0712bab5/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateAsyncClient.java +[azure_cli]: https://learn.microsoft.com/cli/azure +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity +[DefaultAzureCredential]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md#defaultazurecredential +[custom_subdomain]: https://learn.microsoft.com/azure/cognitive-services/authentication#create-a-resource-with-a-custom-subdomain +[register_aad_app]: https://learn.microsoft.com/azure/cognitive-services/authentication#assign-a-role-to-a-service-principal +[aad_grant_access]: https://learn.microsoft.com/azure/cognitive-services/authentication#assign-a-role-to-a-service-principal +[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable +[package]: https://central.sonatype.com/artifact/com.azure/azure-ai-anomalydetector +[samples_readme]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md +[logging]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/logging.md +[customize_defaultAzureCredential]: https://aka.ms/azsdk/java/identity/credential-chains#how-to-customize-defaultazurecredential +[azure_identity_credential_type]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials +[identity_dac]: https://aka.ms/azsdk/java/identity/credential-chains#defaultazurecredential-overview diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/assets.json b/sdk/anomalydetector/azure-ai-anomalydetector/assets.json new file mode 100644 index 000000000000..25690a7ee80e --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/anomalydetector/azure-ai-anomalydetector", + "Tag": "java/anomalydetector/azure-ai-anomalydetector_24918ac6aa" +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/checkstyle-suppressions.xml b/sdk/anomalydetector/azure-ai-anomalydetector/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml new file mode 100644 index 000000000000..af9b4eeb0f4f --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml @@ -0,0 +1,72 @@ + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-ai-anomalydetector + 3.0.0-beta.6 + jar + + Microsoft Azure client library for Anomaly Detector + This package contains Microsoft Azure Anomaly Detector client library. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0.11 + 0.07 + + false + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/spotbugs-exclude.xml b/sdk/anomalydetector/azure-ai-anomalydetector/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorClientBuilder.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorClientBuilder.java new file mode 100644 index 000000000000..5c31a9623a0f --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorClientBuilder.java @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.implementation.AnomalyDetectorClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.KeyCredentialTrait; +import com.azure.core.credential.KeyCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.KeyCredentialPolicy; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the AnomalyDetectorClient type. + */ +@ServiceClientBuilder( + serviceClients = { + UnivariateClient.class, + MultivariateClient.class, + UnivariateAsyncClient.class, + MultivariateAsyncClient.class }) +public final class AnomalyDetectorClientBuilder + implements HttpTrait, ConfigurationTrait, + KeyCredentialTrait, EndpointTrait { + + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-ai-anomalydetector.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the AnomalyDetectorClientBuilder. + */ + @Generated + public AnomalyDetectorClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AnomalyDetectorClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AnomalyDetectorClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AnomalyDetectorClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AnomalyDetectorClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AnomalyDetectorClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AnomalyDetectorClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AnomalyDetectorClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AnomalyDetectorClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private AnomalyDetectorServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the AnomalyDetectorClientBuilder. + */ + @Generated + public AnomalyDetectorClientBuilder serviceVersion(AnomalyDetectorServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the AnomalyDetectorClientBuilder. + */ + @Generated + public AnomalyDetectorClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of AnomalyDetectorClientImpl with the provided parameters. + * + * @return an instance of AnomalyDetectorClientImpl. + */ + @Generated + private AnomalyDetectorClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + AnomalyDetectorServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : AnomalyDetectorServiceVersion.getLatest(); + AnomalyDetectorClientImpl client = new AnomalyDetectorClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (keyCredential != null) { + policies.add(new KeyCredentialPolicy("Ocp-Apim-Subscription-Key", keyCredential)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /* + * The KeyCredential used for authentication. + */ + @Generated + private KeyCredential keyCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AnomalyDetectorClientBuilder credential(KeyCredential keyCredential) { + this.keyCredential = keyCredential; + return this; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + /** + * Builds an instance of UnivariateAsyncClient class. + * + * @return an instance of UnivariateAsyncClient. + */ + @Generated + public UnivariateAsyncClient buildUnivariateAsyncClient() { + return new UnivariateAsyncClient(buildInnerClient().getUnivariates()); + } + + /** + * Builds an instance of MultivariateAsyncClient class. + * + * @return an instance of MultivariateAsyncClient. + */ + @Generated + public MultivariateAsyncClient buildMultivariateAsyncClient() { + return new MultivariateAsyncClient(buildInnerClient().getMultivariates()); + } + + /** + * Builds an instance of UnivariateClient class. + * + * @return an instance of UnivariateClient. + */ + @Generated + public UnivariateClient buildUnivariateClient() { + return new UnivariateClient(buildInnerClient().getUnivariates()); + } + + /** + * Builds an instance of MultivariateClient class. + * + * @return an instance of MultivariateClient. + */ + @Generated + public MultivariateClient buildMultivariateClient() { + return new MultivariateClient(buildInnerClient().getMultivariates()); + } + + private static final ClientLogger LOGGER = new ClientLogger(AnomalyDetectorClientBuilder.class); +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorServiceVersion.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorServiceVersion.java new file mode 100644 index 000000000000..12d5cce92701 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of AnomalyDetectorClient. + */ +public enum AnomalyDetectorServiceVersion implements ServiceVersion { + /** + * Enum value v1.1. + */ + V1_1("v1.1"); + + private final String version; + + AnomalyDetectorServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link AnomalyDetectorServiceVersion}. + */ + public static AnomalyDetectorServiceVersion getLatest() { + return V1_1; + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateAsyncClient.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateAsyncClient.java new file mode 100644 index 000000000000..b29e932a5db3 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateAsyncClient.java @@ -0,0 +1,883 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.implementation.MultivariatesImpl; +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.ai.anomalydetector.models.ModelInfo; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateDetectionResult; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionResult; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.FluxUtil; +import java.util.stream.Collectors; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AnomalyDetectorClient type. + */ +@ServiceClient(builder = AnomalyDetectorClientBuilder.class, isAsync = true) +public final class MultivariateAsyncClient { + + @Generated + private final MultivariatesImpl serviceClient; + + /** + * Initializes an instance of MultivariateAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + MultivariateAsyncClient(MultivariatesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get Multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     resultId: String (Required)
      +     *     summary (Required): {
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Required)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *         setupInfo (Required): {
      +     *             dataSource: String (Required)
      +     *             topContributorCount: Integer (Optional)
      +     *             startTime: OffsetDateTime (Required)
      +     *             endTime: OffsetDateTime (Required)
      +     *         }
      +     *     }
      +     *     results (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param resultId ID of a batch detection result. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMultivariateBatchDetectionResultWithResponse(String resultId, + RequestOptions requestOptions) { + return this.serviceClient.getMultivariateBatchDetectionResultWithResponseAsync(resultId, requestOptions); + } + + /** + * Train a Multivariate Anomaly Detection Model + * + * Create and train a multivariate anomaly detection model. The request must + * include a source parameter to indicate an Azure Blob + * Storage URI that's accessible to the service. There are two types of data input. The Blob Storage URI can point + * to an Azure Blob + * Storage folder that contains multiple CSV files, where each CSV file has + * two columns, time stamp and variable. Or the Blob Storage URI can point to a single blob that contains a CSV file + * that has all the variables and a + * time stamp column. + * The model object will be created and returned in the response, but the + * training process happens asynchronously. To check the training status, call + * GetMultivariateModel with the modelId value and check the status field in the + * modelInfo object. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     dataSource: String (Required)
      +     *     dataSchema: String(OneTable/MultiTable) (Optional)
      +     *     startTime: OffsetDateTime (Required)
      +     *     endTime: OffsetDateTime (Required)
      +     *     displayName: String (Optional)
      +     *     slidingWindow: Integer (Optional)
      +     *     alignPolicy (Optional): {
      +     *         alignMode: String(Inner/Outer) (Optional)
      +     *         fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *         paddingValue: Double (Optional)
      +     *     }
      +     *     status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *         }
      +     *     ]
      +     *     diagnosticsInfo (Optional): {
      +     *         modelState (Optional): {
      +     *             epochIds (Optional): [
      +     *                 int (Optional)
      +     *             ]
      +     *             trainLosses (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *             validationLosses (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *             latenciesInSeconds (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *         }
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param modelInfo Model information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of getting a model along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> trainMultivariateModelWithResponse(BinaryData modelInfo, + RequestOptions requestOptions) { + return this.serviceClient.trainMultivariateModelWithResponseAsync(modelInfo, requestOptions); + } + + /** + * List Multivariate Models + * + * List models of a resource. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      topIntegerNoThe number of result items to return.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of listing models as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMultivariateModels(RequestOptions requestOptions) { + return this.serviceClient.listMultivariateModelsAsync(requestOptions); + } + + /** + * Delete Multivariate Model + * + * Delete an existing multivariate model according to the modelId value. + * + * @param modelId Model identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteMultivariateModelWithResponse(String modelId, RequestOptions requestOptions) { + return this.serviceClient.deleteMultivariateModelWithResponseAsync(modelId, requestOptions); + } + + /** + * Get Multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMultivariateModelWithResponse(String modelId, RequestOptions requestOptions) { + return this.serviceClient.getMultivariateModelWithResponseAsync(modelId, requestOptions); + } + + /** + * Detect Multivariate Anomaly + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The input schema should be the same with the training + * request. The request will finish asynchronously and return a resultId value to + * query the detection result. The request should be a source link to indicate an + * externally accessible Azure Storage URI that either points to an Azure Blob + * Storage folder or points to a CSV file in Azure Blob Storage. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     dataSource: String (Required)
      +     *     topContributorCount: Integer (Optional)
      +     *     startTime: OffsetDateTime (Required)
      +     *     endTime: OffsetDateTime (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     resultId: String (Required)
      +     *     summary (Required): {
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Required)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *         setupInfo (Required): {
      +     *             dataSource: String (Required)
      +     *             topContributorCount: Integer (Optional)
      +     *             startTime: OffsetDateTime (Required)
      +     *             endTime: OffsetDateTime (Required)
      +     *         }
      +     *     }
      +     *     results (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param options Request of multivariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return detection results for the resultId value along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectMultivariateBatchAnomalyWithResponse(String modelId, BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectMultivariateBatchAnomalyWithResponseAsync(modelId, options, requestOptions); + } + + /** + * Detect anomalies in the last point of the request body + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The inference data should be put into the request body in + * JSON format. The request will finish synchronously and return the detection + * immediately in the response body. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     variables (Required): [
      +     *          (Required){
      +     *             variable: String (Required)
      +     *             timestamps (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             values (Required): [
      +     *                 double (Required)
      +     *             ]
      +     *         }
      +     *     ]
      +     *     topContributorCount: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     variableStates (Optional): [
      +     *          (Optional){
      +     *             variable: String (Optional)
      +     *             filledNARatio: Double (Optional)
      +     *             effectiveCount: Integer (Optional)
      +     *             firstTimestamp: OffsetDateTime (Optional)
      +     *             lastTimestamp: OffsetDateTime (Optional)
      +     *         }
      +     *     ]
      +     *     results (Optional): [
      +     *          (Optional){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                  (Optional){
      +     *                     code: String (Required)
      +     *                     message: String (Required)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param options Request of the last detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return results of the last detection along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectMultivariateLastAnomalyWithResponse(String modelId, BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectMultivariateLastAnomalyWithResponseAsync(modelId, options, requestOptions); + } + + /** + * Get Multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns. + * + * @param resultId ID of a batch detection result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getMultivariateBatchDetectionResult(String resultId) { + // Generated convenience method for getMultivariateBatchDetectionResultWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getMultivariateBatchDetectionResultWithResponse(resultId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(MultivariateDetectionResult.class)); + } + + /** + * Train a Multivariate Anomaly Detection Model + * + * Create and train a multivariate anomaly detection model. The request must + * include a source parameter to indicate an Azure Blob + * Storage URI that's accessible to the service. There are two types of data input. The Blob Storage URI can point + * to an Azure Blob + * Storage folder that contains multiple CSV files, where each CSV file has + * two columns, time stamp and variable. Or the Blob Storage URI can point to a single blob that contains a CSV file + * that has all the variables and a + * time stamp column. + * The model object will be created and returned in the response, but the + * training process happens asynchronously. To check the training status, call + * GetMultivariateModel with the modelId value and check the status field in the + * modelInfo object. + * + * @param modelInfo Model information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of getting a model on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono trainMultivariateModel(ModelInfo modelInfo) { + // Generated convenience method for trainMultivariateModelWithResponse + RequestOptions requestOptions = new RequestOptions(); + return trainMultivariateModelWithResponse(BinaryData.fromObject(modelInfo), requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(AnomalyDetectionModel.class)); + } + + /** + * List Multivariate Models + * + * List models of a resource. + * + * @param skip The number of result items to skip. + * @param top The number of result items to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of listing models as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMultivariateModels(Integer skip, Integer top) { + // Generated convenience method for listMultivariateModels + RequestOptions requestOptions = new RequestOptions(); + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + if (top != null) { + requestOptions.addQueryParam("top", String.valueOf(top), false); + } + PagedFlux pagedFluxResponse = listMultivariateModels(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux + .map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(AnomalyDetectionModel.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * List Multivariate Models + * + * List models of a resource. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of listing models as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMultivariateModels() { + // Generated convenience method for listMultivariateModels + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listMultivariateModels(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux + .map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(AnomalyDetectionModel.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Delete Multivariate Model + * + * Delete an existing multivariate model according to the modelId value. + * + * @param modelId Model identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteMultivariateModel(String modelId) { + // Generated convenience method for deleteMultivariateModelWithResponse + RequestOptions requestOptions = new RequestOptions(); + return deleteMultivariateModelWithResponse(modelId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Get Multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model. + * + * @param modelId Model identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getMultivariateModel(String modelId) { + // Generated convenience method for getMultivariateModelWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getMultivariateModelWithResponse(modelId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(AnomalyDetectionModel.class)); + } + + /** + * Detect Multivariate Anomaly + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The input schema should be the same with the training + * request. The request will finish asynchronously and return a resultId value to + * query the detection result. The request should be a source link to indicate an + * externally accessible Azure Storage URI that either points to an Azure Blob + * Storage folder or points to a CSV file in Azure Blob Storage. + * + * @param modelId Model identifier. + * @param options Request of multivariate anomaly detection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return detection results for the resultId value on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono detectMultivariateBatchAnomaly(String modelId, + MultivariateBatchDetectionOptions options) { + // Generated convenience method for detectMultivariateBatchAnomalyWithResponse + RequestOptions requestOptions = new RequestOptions(); + return detectMultivariateBatchAnomalyWithResponse(modelId, BinaryData.fromObject(options), requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(MultivariateDetectionResult.class)); + } + + /** + * Detect anomalies in the last point of the request body + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The inference data should be put into the request body in + * JSON format. The request will finish synchronously and return the detection + * immediately in the response body. + * + * @param modelId Model identifier. + * @param options Request of the last detection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return results of the last detection on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono detectMultivariateLastAnomaly(String modelId, + MultivariateLastDetectionOptions options) { + // Generated convenience method for detectMultivariateLastAnomalyWithResponse + RequestOptions requestOptions = new RequestOptions(); + return detectMultivariateLastAnomalyWithResponse(modelId, BinaryData.fromObject(options), requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(MultivariateLastDetectionResult.class)); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateClient.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateClient.java new file mode 100644 index 000000000000..cba1afd2f331 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/MultivariateClient.java @@ -0,0 +1,849 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.implementation.MultivariatesImpl; +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.ai.anomalydetector.models.ModelInfo; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateDetectionResult; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionResult; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous AnomalyDetectorClient type. + */ +@ServiceClient(builder = AnomalyDetectorClientBuilder.class) +public final class MultivariateClient { + + @Generated + private final MultivariatesImpl serviceClient; + + /** + * Initializes an instance of MultivariateClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + MultivariateClient(MultivariatesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get Multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     resultId: String (Required)
      +     *     summary (Required): {
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Required)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *         setupInfo (Required): {
      +     *             dataSource: String (Required)
      +     *             topContributorCount: Integer (Optional)
      +     *             startTime: OffsetDateTime (Required)
      +     *             endTime: OffsetDateTime (Required)
      +     *         }
      +     *     }
      +     *     results (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param resultId ID of a batch detection result. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMultivariateBatchDetectionResultWithResponse(String resultId, + RequestOptions requestOptions) { + return this.serviceClient.getMultivariateBatchDetectionResultWithResponse(resultId, requestOptions); + } + + /** + * Train a Multivariate Anomaly Detection Model + * + * Create and train a multivariate anomaly detection model. The request must + * include a source parameter to indicate an Azure Blob + * Storage URI that's accessible to the service. There are two types of data input. The Blob Storage URI can point + * to an Azure Blob + * Storage folder that contains multiple CSV files, where each CSV file has + * two columns, time stamp and variable. Or the Blob Storage URI can point to a single blob that contains a CSV file + * that has all the variables and a + * time stamp column. + * The model object will be created and returned in the response, but the + * training process happens asynchronously. To check the training status, call + * GetMultivariateModel with the modelId value and check the status field in the + * modelInfo object. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     dataSource: String (Required)
      +     *     dataSchema: String(OneTable/MultiTable) (Optional)
      +     *     startTime: OffsetDateTime (Required)
      +     *     endTime: OffsetDateTime (Required)
      +     *     displayName: String (Optional)
      +     *     slidingWindow: Integer (Optional)
      +     *     alignPolicy (Optional): {
      +     *         alignMode: String(Inner/Outer) (Optional)
      +     *         fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *         paddingValue: Double (Optional)
      +     *     }
      +     *     status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *         }
      +     *     ]
      +     *     diagnosticsInfo (Optional): {
      +     *         modelState (Optional): {
      +     *             epochIds (Optional): [
      +     *                 int (Optional)
      +     *             ]
      +     *             trainLosses (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *             validationLosses (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *             latenciesInSeconds (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *         }
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param modelInfo Model information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of getting a model along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response trainMultivariateModelWithResponse(BinaryData modelInfo, + RequestOptions requestOptions) { + return this.serviceClient.trainMultivariateModelWithResponse(modelInfo, requestOptions); + } + + /** + * List Multivariate Models + * + * List models of a resource. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      topIntegerNoThe number of result items to return.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of listing models as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultivariateModels(RequestOptions requestOptions) { + return this.serviceClient.listMultivariateModels(requestOptions); + } + + /** + * Delete Multivariate Model + * + * Delete an existing multivariate model according to the modelId value. + * + * @param modelId Model identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteMultivariateModelWithResponse(String modelId, RequestOptions requestOptions) { + return this.serviceClient.deleteMultivariateModelWithResponse(modelId, requestOptions); + } + + /** + * Get Multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMultivariateModelWithResponse(String modelId, RequestOptions requestOptions) { + return this.serviceClient.getMultivariateModelWithResponse(modelId, requestOptions); + } + + /** + * Detect Multivariate Anomaly + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The input schema should be the same with the training + * request. The request will finish asynchronously and return a resultId value to + * query the detection result. The request should be a source link to indicate an + * externally accessible Azure Storage URI that either points to an Azure Blob + * Storage folder or points to a CSV file in Azure Blob Storage. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     dataSource: String (Required)
      +     *     topContributorCount: Integer (Optional)
      +     *     startTime: OffsetDateTime (Required)
      +     *     endTime: OffsetDateTime (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     resultId: String (Required)
      +     *     summary (Required): {
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Required)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *         setupInfo (Required): {
      +     *             dataSource: String (Required)
      +     *             topContributorCount: Integer (Optional)
      +     *             startTime: OffsetDateTime (Required)
      +     *             endTime: OffsetDateTime (Required)
      +     *         }
      +     *     }
      +     *     results (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param options Request of multivariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return detection results for the resultId value along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectMultivariateBatchAnomalyWithResponse(String modelId, BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectMultivariateBatchAnomalyWithResponse(modelId, options, requestOptions); + } + + /** + * Detect anomalies in the last point of the request body + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The inference data should be put into the request body in + * JSON format. The request will finish synchronously and return the detection + * immediately in the response body. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     variables (Required): [
      +     *          (Required){
      +     *             variable: String (Required)
      +     *             timestamps (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             values (Required): [
      +     *                 double (Required)
      +     *             ]
      +     *         }
      +     *     ]
      +     *     topContributorCount: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     variableStates (Optional): [
      +     *          (Optional){
      +     *             variable: String (Optional)
      +     *             filledNARatio: Double (Optional)
      +     *             effectiveCount: Integer (Optional)
      +     *             firstTimestamp: OffsetDateTime (Optional)
      +     *             lastTimestamp: OffsetDateTime (Optional)
      +     *         }
      +     *     ]
      +     *     results (Optional): [
      +     *          (Optional){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                  (Optional){
      +     *                     code: String (Required)
      +     *                     message: String (Required)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param options Request of the last detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return results of the last detection along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectMultivariateLastAnomalyWithResponse(String modelId, BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectMultivariateLastAnomalyWithResponse(modelId, options, requestOptions); + } + + /** + * Get Multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns. + * + * @param resultId ID of a batch detection result. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public MultivariateDetectionResult getMultivariateBatchDetectionResult(String resultId) { + // Generated convenience method for getMultivariateBatchDetectionResultWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getMultivariateBatchDetectionResultWithResponse(resultId, requestOptions).getValue() + .toObject(MultivariateDetectionResult.class); + } + + /** + * Train a Multivariate Anomaly Detection Model + * + * Create and train a multivariate anomaly detection model. The request must + * include a source parameter to indicate an Azure Blob + * Storage URI that's accessible to the service. There are two types of data input. The Blob Storage URI can point + * to an Azure Blob + * Storage folder that contains multiple CSV files, where each CSV file has + * two columns, time stamp and variable. Or the Blob Storage URI can point to a single blob that contains a CSV file + * that has all the variables and a + * time stamp column. + * The model object will be created and returned in the response, but the + * training process happens asynchronously. To check the training status, call + * GetMultivariateModel with the modelId value and check the status field in the + * modelInfo object. + * + * @param modelInfo Model information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of getting a model. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public AnomalyDetectionModel trainMultivariateModel(ModelInfo modelInfo) { + // Generated convenience method for trainMultivariateModelWithResponse + RequestOptions requestOptions = new RequestOptions(); + return trainMultivariateModelWithResponse(BinaryData.fromObject(modelInfo), requestOptions).getValue() + .toObject(AnomalyDetectionModel.class); + } + + /** + * List Multivariate Models + * + * List models of a resource. + * + * @param skip The number of result items to skip. + * @param top The number of result items to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of listing models as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultivariateModels(Integer skip, Integer top) { + // Generated convenience method for listMultivariateModels + RequestOptions requestOptions = new RequestOptions(); + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + if (top != null) { + requestOptions.addQueryParam("top", String.valueOf(top), false); + } + return serviceClient.listMultivariateModels(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(AnomalyDetectionModel.class)); + } + + /** + * List Multivariate Models + * + * List models of a resource. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of listing models as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultivariateModels() { + // Generated convenience method for listMultivariateModels + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listMultivariateModels(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(AnomalyDetectionModel.class)); + } + + /** + * Delete Multivariate Model + * + * Delete an existing multivariate model according to the modelId value. + * + * @param modelId Model identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteMultivariateModel(String modelId) { + // Generated convenience method for deleteMultivariateModelWithResponse + RequestOptions requestOptions = new RequestOptions(); + deleteMultivariateModelWithResponse(modelId, requestOptions).getValue(); + } + + /** + * Get Multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model. + * + * @param modelId Model identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public AnomalyDetectionModel getMultivariateModel(String modelId) { + // Generated convenience method for getMultivariateModelWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getMultivariateModelWithResponse(modelId, requestOptions).getValue() + .toObject(AnomalyDetectionModel.class); + } + + /** + * Detect Multivariate Anomaly + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The input schema should be the same with the training + * request. The request will finish asynchronously and return a resultId value to + * query the detection result. The request should be a source link to indicate an + * externally accessible Azure Storage URI that either points to an Azure Blob + * Storage folder or points to a CSV file in Azure Blob Storage. + * + * @param modelId Model identifier. + * @param options Request of multivariate anomaly detection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return detection results for the resultId value. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public MultivariateDetectionResult detectMultivariateBatchAnomaly(String modelId, + MultivariateBatchDetectionOptions options) { + // Generated convenience method for detectMultivariateBatchAnomalyWithResponse + RequestOptions requestOptions = new RequestOptions(); + return detectMultivariateBatchAnomalyWithResponse(modelId, BinaryData.fromObject(options), requestOptions) + .getValue() + .toObject(MultivariateDetectionResult.class); + } + + /** + * Detect anomalies in the last point of the request body + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The inference data should be put into the request body in + * JSON format. The request will finish synchronously and return the detection + * immediately in the response body. + * + * @param modelId Model identifier. + * @param options Request of the last detection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return results of the last detection. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public MultivariateLastDetectionResult detectMultivariateLastAnomaly(String modelId, + MultivariateLastDetectionOptions options) { + // Generated convenience method for detectMultivariateLastAnomalyWithResponse + RequestOptions requestOptions = new RequestOptions(); + return detectMultivariateLastAnomalyWithResponse(modelId, BinaryData.fromObject(options), requestOptions) + .getValue() + .toObject(MultivariateLastDetectionResult.class); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateAsyncClient.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateAsyncClient.java new file mode 100644 index 000000000000..e501424e05d7 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateAsyncClient.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.implementation.UnivariatesImpl; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionResult; +import com.azure.ai.anomalydetector.models.UnivariateDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateLastDetectionResult; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AnomalyDetectorClient type. + */ +@ServiceClient(builder = AnomalyDetectorClientBuilder.class, isAsync = true) +public final class UnivariateAsyncClient { + + @Generated + private final UnivariatesImpl serviceClient; + + /** + * Initializes an instance of UnivariateAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + UnivariateAsyncClient(UnivariatesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Detect anomalies for the entire series in batch. + * + * This operation generates a model with an entire series. Each point is detected + * with the same model. With this method, points before and after a certain point + * are used to determine whether it's an anomaly. The entire detection can give the + * user an overall status of the time series. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Optional)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     maxAnomalyRatio: Double (Optional)
      +     *     sensitivity: Integer (Optional)
      +     *     imputeMode: String(auto/previous/linear/fixed/zero/notFill) (Optional)
      +     *     imputeFixedValue: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: int (Required)
      +     *     expectedValues (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     upperMargins (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     lowerMargins (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     isAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     isNegativeAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     isPositiveAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     severity (Optional): [
      +     *         double (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of the entire anomaly detection along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectUnivariateEntireSeriesWithResponse(BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectUnivariateEntireSeriesWithResponseAsync(options, requestOptions); + } + + /** + * Detect anomaly status of the latest point in time series. + * + * This operation generates a model by using the points that you sent in to the API + * and based on all data to determine whether the last point is anomalous. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Optional)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     maxAnomalyRatio: Double (Optional)
      +     *     sensitivity: Integer (Optional)
      +     *     imputeMode: String(auto/previous/linear/fixed/zero/notFill) (Optional)
      +     *     imputeFixedValue: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: int (Required)
      +     *     suggestedWindow: int (Required)
      +     *     expectedValue: double (Required)
      +     *     upperMargin: double (Required)
      +     *     lowerMargin: double (Required)
      +     *     isAnomaly: boolean (Required)
      +     *     isNegativeAnomaly: boolean (Required)
      +     *     isPositiveAnomaly: boolean (Required)
      +     *     severity: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of the last anomaly detection along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectUnivariateLastPointWithResponse(BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectUnivariateLastPointWithResponseAsync(options, requestOptions); + } + + /** + * Detect change point for the entire series + * + * Evaluate the change point score of every series point. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Required)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     stableTrendWindow: Integer (Optional)
      +     *     threshold: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: Integer (Optional)
      +     *     isChangePoint (Optional): [
      +     *         boolean (Optional)
      +     *     ]
      +     *     confidenceScores (Optional): [
      +     *         double (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of change point detection along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectUnivariateChangePointWithResponse(BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectUnivariateChangePointWithResponseAsync(options, requestOptions); + } + + /** + * Detect anomaly status of the latest point in time series. + * + * This operation generates a model by using the points that you sent in to the API + * and based on all data to determine whether the last point is anomalous. + * + * @param options Method of univariate anomaly detection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the last anomaly detection on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono detectUnivariateLastPoint(UnivariateDetectionOptions options) { + // Generated convenience method for detectUnivariateLastPointWithResponse + RequestOptions requestOptions = new RequestOptions(); + return detectUnivariateLastPointWithResponse(BinaryData.fromObject(options), requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(UnivariateLastDetectionResult.class)); + } + + /** + * Detect change point for the entire series + * + * Evaluate the change point score of every series point. + * + * @param options Method of univariate anomaly detection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of change point detection on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono + detectUnivariateChangePoint(UnivariateChangePointDetectionOptions options) { + // Generated convenience method for detectUnivariateChangePointWithResponse + RequestOptions requestOptions = new RequestOptions(); + return detectUnivariateChangePointWithResponse(BinaryData.fromObject(options), requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(UnivariateChangePointDetectionResult.class)); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateClient.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateClient.java new file mode 100644 index 000000000000..549b63c729c6 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/UnivariateClient.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.implementation.UnivariatesImpl; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionResult; +import com.azure.ai.anomalydetector.models.UnivariateDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateEntireDetectionResult; +import com.azure.ai.anomalydetector.models.UnivariateLastDetectionResult; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous AnomalyDetectorClient type. + */ +@ServiceClient(builder = AnomalyDetectorClientBuilder.class) +public final class UnivariateClient { + + @Generated + private final UnivariatesImpl serviceClient; + + /** + * Initializes an instance of UnivariateClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + UnivariateClient(UnivariatesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Detect anomalies for the entire series in batch. + * + * This operation generates a model with an entire series. Each point is detected + * with the same model. With this method, points before and after a certain point + * are used to determine whether it's an anomaly. The entire detection can give the + * user an overall status of the time series. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Optional)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     maxAnomalyRatio: Double (Optional)
      +     *     sensitivity: Integer (Optional)
      +     *     imputeMode: String(auto/previous/linear/fixed/zero/notFill) (Optional)
      +     *     imputeFixedValue: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: int (Required)
      +     *     expectedValues (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     upperMargins (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     lowerMargins (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     isAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     isNegativeAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     isPositiveAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     severity (Optional): [
      +     *         double (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of the entire anomaly detection along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectUnivariateEntireSeriesWithResponse(BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectUnivariateEntireSeriesWithResponse(options, requestOptions); + } + + /** + * Detect anomaly status of the latest point in time series. + * + * This operation generates a model by using the points that you sent in to the API + * and based on all data to determine whether the last point is anomalous. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Optional)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     maxAnomalyRatio: Double (Optional)
      +     *     sensitivity: Integer (Optional)
      +     *     imputeMode: String(auto/previous/linear/fixed/zero/notFill) (Optional)
      +     *     imputeFixedValue: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: int (Required)
      +     *     suggestedWindow: int (Required)
      +     *     expectedValue: double (Required)
      +     *     upperMargin: double (Required)
      +     *     lowerMargin: double (Required)
      +     *     isAnomaly: boolean (Required)
      +     *     isNegativeAnomaly: boolean (Required)
      +     *     isPositiveAnomaly: boolean (Required)
      +     *     severity: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of the last anomaly detection along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectUnivariateLastPointWithResponse(BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectUnivariateLastPointWithResponse(options, requestOptions); + } + + /** + * Detect change point for the entire series + * + * Evaluate the change point score of every series point. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Required)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     stableTrendWindow: Integer (Optional)
      +     *     threshold: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: Integer (Optional)
      +     *     isChangePoint (Optional): [
      +     *         boolean (Optional)
      +     *     ]
      +     *     confidenceScores (Optional): [
      +     *         double (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of change point detection along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectUnivariateChangePointWithResponse(BinaryData options, + RequestOptions requestOptions) { + return this.serviceClient.detectUnivariateChangePointWithResponse(options, requestOptions); + } + + /** + * Detect anomalies for the entire series in batch. + * + * This operation generates a model with an entire series. Each point is detected + * with the same model. With this method, points before and after a certain point + * are used to determine whether it's an anomaly. The entire detection can give the + * user an overall status of the time series. + * + * @param options Method of univariate anomaly detection. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of the entire anomaly detection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UnivariateEntireDetectionResult detectUnivariateEntireSeries(UnivariateDetectionOptions options) { + return detectUnivariateEntireSeriesWithResponse(BinaryData.fromObject(options), new RequestOptions()).getValue() + .toObject(UnivariateEntireDetectionResult.class); + } + + /** + * Detect anomaly status of the latest point in time series. + * + * This operation generates a model by using the points that you sent in to the API + * and based on all data to determine whether the last point is anomalous. + * + * @param options Method of univariate anomaly detection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of the last anomaly detection. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public UnivariateLastDetectionResult detectUnivariateLastPoint(UnivariateDetectionOptions options) { + // Generated convenience method for detectUnivariateLastPointWithResponse + RequestOptions requestOptions = new RequestOptions(); + return detectUnivariateLastPointWithResponse(BinaryData.fromObject(options), requestOptions).getValue() + .toObject(UnivariateLastDetectionResult.class); + } + + /** + * Detect change point for the entire series + * + * Evaluate the change point score of every series point. + * + * @param options Method of univariate anomaly detection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of change point detection. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public UnivariateChangePointDetectionResult + detectUnivariateChangePoint(UnivariateChangePointDetectionOptions options) { + // Generated convenience method for detectUnivariateChangePointWithResponse + RequestOptions requestOptions = new RequestOptions(); + return detectUnivariateChangePointWithResponse(BinaryData.fromObject(options), requestOptions).getValue() + .toObject(UnivariateChangePointDetectionResult.class); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/AnomalyDetectorClientImpl.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/AnomalyDetectorClientImpl.java new file mode 100644 index 000000000000..dd611410e1d8 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/AnomalyDetectorClientImpl.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.implementation; + +import com.azure.ai.anomalydetector.AnomalyDetectorServiceVersion; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the AnomalyDetectorClient type. + */ +public final class AnomalyDetectorClientImpl { + /** + * Supported Azure Cognitive Services endpoints (protocol and host name, such as + * https://westus2.api.cognitive.microsoft.com). + */ + private final String endpoint; + + /** + * Gets Supported Azure Cognitive Services endpoints (protocol and host name, such as + * https://westus2.api.cognitive.microsoft.com). + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final AnomalyDetectorServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public AnomalyDetectorServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The UnivariatesImpl object to access its operations. + */ + private final UnivariatesImpl univariates; + + /** + * Gets the UnivariatesImpl object to access its operations. + * + * @return the UnivariatesImpl object. + */ + public UnivariatesImpl getUnivariates() { + return this.univariates; + } + + /** + * The MultivariatesImpl object to access its operations. + */ + private final MultivariatesImpl multivariates; + + /** + * Gets the MultivariatesImpl object to access its operations. + * + * @return the MultivariatesImpl object. + */ + public MultivariatesImpl getMultivariates() { + return this.multivariates; + } + + /** + * Initializes an instance of AnomalyDetectorClient client. + * + * @param endpoint Supported Azure Cognitive Services endpoints (protocol and host name, such as + * https://westus2.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public AnomalyDetectorClientImpl(String endpoint, AnomalyDetectorServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of AnomalyDetectorClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint Supported Azure Cognitive Services endpoints (protocol and host name, such as + * https://westus2.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public AnomalyDetectorClientImpl(HttpPipeline httpPipeline, String endpoint, + AnomalyDetectorServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of AnomalyDetectorClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint Supported Azure Cognitive Services endpoints (protocol and host name, such as + * https://westus2.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public AnomalyDetectorClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + AnomalyDetectorServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.univariates = new UnivariatesImpl(this); + this.multivariates = new MultivariatesImpl(this); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/MultivariatesImpl.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/MultivariatesImpl.java new file mode 100644 index 000000000000..94682fd79166 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/MultivariatesImpl.java @@ -0,0 +1,1800 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.implementation; + +import com.azure.ai.anomalydetector.AnomalyDetectorServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Multivariates. + */ +public final class MultivariatesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final MultivariatesService service; + + /** + * The service client containing this operation class. + */ + private final AnomalyDetectorClientImpl client; + + /** + * Initializes an instance of MultivariatesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MultivariatesImpl(AnomalyDetectorClientImpl client) { + this.service + = RestProxy.create(MultivariatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public AnomalyDetectorServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for AnomalyDetectorClientMultivariates to be used by the proxy service to + * perform REST calls. + */ + @Host("{Endpoint}/anomalydetector/{ApiVersion}") + @ServiceInterface(name = "AnomalyDetectorClien") + public interface MultivariatesService { + @Get("/multivariate/detect-batch/{resultId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getMultivariateBatchDetectionResult(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("resultId") String resultId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/multivariate/detect-batch/{resultId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getMultivariateBatchDetectionResultSync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("resultId") String resultId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/multivariate/models") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> trainMultivariateModel(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData modelInfo, + RequestOptions requestOptions, Context context); + + @Post("/multivariate/models") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response trainMultivariateModelSync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData modelInfo, + RequestOptions requestOptions, Context context); + + @Get("/multivariate/models") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listMultivariateModels(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/multivariate/models") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listMultivariateModelsSync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/multivariate/models/{modelId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteMultivariateModel(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("modelId") String modelId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/multivariate/models/{modelId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteMultivariateModelSync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("modelId") String modelId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/multivariate/models/{modelId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getMultivariateModel(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("modelId") String modelId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/multivariate/models/{modelId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getMultivariateModelSync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("modelId") String modelId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/multivariate/models/{modelId}:detect-batch") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> detectMultivariateBatchAnomaly(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("modelId") String modelId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData options, RequestOptions requestOptions, Context context); + + @Post("/multivariate/models/{modelId}:detect-batch") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response detectMultivariateBatchAnomalySync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("modelId") String modelId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData options, RequestOptions requestOptions, Context context); + + @Post("/multivariate/models/{modelId}:detect-last") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> detectMultivariateLastAnomaly(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("modelId") String modelId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData options, RequestOptions requestOptions, Context context); + + @Post("/multivariate/models/{modelId}:detect-last") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response detectMultivariateLastAnomalySync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @PathParam("modelId") String modelId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData options, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listMultivariateModelsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listMultivariateModelsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + } + + /** + * Get Multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     resultId: String (Required)
      +     *     summary (Required): {
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Required)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *         setupInfo (Required): {
      +     *             dataSource: String (Required)
      +     *             topContributorCount: Integer (Optional)
      +     *             startTime: OffsetDateTime (Required)
      +     *             endTime: OffsetDateTime (Required)
      +     *         }
      +     *     }
      +     *     results (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param resultId ID of a batch detection result. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMultivariateBatchDetectionResultWithResponseAsync(String resultId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getMultivariateBatchDetectionResult(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), resultId, accept, requestOptions, context)); + } + + /** + * Get Multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     resultId: String (Required)
      +     *     summary (Required): {
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Required)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *         setupInfo (Required): {
      +     *             dataSource: String (Required)
      +     *             topContributorCount: Integer (Optional)
      +     *             startTime: OffsetDateTime (Required)
      +     *             endTime: OffsetDateTime (Required)
      +     *         }
      +     *     }
      +     *     results (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param resultId ID of a batch detection result. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return multivariate Anomaly Detection Result + * + * For asynchronous inference, get a multivariate anomaly detection result based on the + * resultId value that the BatchDetectAnomaly API returns along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMultivariateBatchDetectionResultWithResponse(String resultId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getMultivariateBatchDetectionResultSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), resultId, accept, requestOptions, Context.NONE); + } + + /** + * Train a Multivariate Anomaly Detection Model + * + * Create and train a multivariate anomaly detection model. The request must + * include a source parameter to indicate an Azure Blob + * Storage URI that's accessible to the service. There are two types of data input. The Blob Storage URI can point + * to an Azure Blob + * Storage folder that contains multiple CSV files, where each CSV file has + * two columns, time stamp and variable. Or the Blob Storage URI can point to a single blob that contains a CSV file + * that has all the variables and a + * time stamp column. + * The model object will be created and returned in the response, but the + * training process happens asynchronously. To check the training status, call + * GetMultivariateModel with the modelId value and check the status field in the + * modelInfo object. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     dataSource: String (Required)
      +     *     dataSchema: String(OneTable/MultiTable) (Optional)
      +     *     startTime: OffsetDateTime (Required)
      +     *     endTime: OffsetDateTime (Required)
      +     *     displayName: String (Optional)
      +     *     slidingWindow: Integer (Optional)
      +     *     alignPolicy (Optional): {
      +     *         alignMode: String(Inner/Outer) (Optional)
      +     *         fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *         paddingValue: Double (Optional)
      +     *     }
      +     *     status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *         }
      +     *     ]
      +     *     diagnosticsInfo (Optional): {
      +     *         modelState (Optional): {
      +     *             epochIds (Optional): [
      +     *                 int (Optional)
      +     *             ]
      +     *             trainLosses (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *             validationLosses (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *             latenciesInSeconds (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *         }
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param modelInfo Model information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of getting a model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> trainMultivariateModelWithResponseAsync(BinaryData modelInfo, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.trainMultivariateModel(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), contentType, accept, modelInfo, requestOptions, context)); + } + + /** + * Train a Multivariate Anomaly Detection Model + * + * Create and train a multivariate anomaly detection model. The request must + * include a source parameter to indicate an Azure Blob + * Storage URI that's accessible to the service. There are two types of data input. The Blob Storage URI can point + * to an Azure Blob + * Storage folder that contains multiple CSV files, where each CSV file has + * two columns, time stamp and variable. Or the Blob Storage URI can point to a single blob that contains a CSV file + * that has all the variables and a + * time stamp column. + * The model object will be created and returned in the response, but the + * training process happens asynchronously. To check the training status, call + * GetMultivariateModel with the modelId value and check the status field in the + * modelInfo object. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     dataSource: String (Required)
      +     *     dataSchema: String(OneTable/MultiTable) (Optional)
      +     *     startTime: OffsetDateTime (Required)
      +     *     endTime: OffsetDateTime (Required)
      +     *     displayName: String (Optional)
      +     *     slidingWindow: Integer (Optional)
      +     *     alignPolicy (Optional): {
      +     *         alignMode: String(Inner/Outer) (Optional)
      +     *         fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *         paddingValue: Double (Optional)
      +     *     }
      +     *     status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *         }
      +     *     ]
      +     *     diagnosticsInfo (Optional): {
      +     *         modelState (Optional): {
      +     *             epochIds (Optional): [
      +     *                 int (Optional)
      +     *             ]
      +     *             trainLosses (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *             validationLosses (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *             latenciesInSeconds (Optional): [
      +     *                 double (Optional)
      +     *             ]
      +     *         }
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param modelInfo Model information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of getting a model along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response trainMultivariateModelWithResponse(BinaryData modelInfo, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.trainMultivariateModelSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), contentType, accept, modelInfo, requestOptions, Context.NONE); + } + + /** + * List Multivariate Models + * + * List models of a resource. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      topIntegerNoThe number of result items to return.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of listing models along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultivariateModelsSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listMultivariateModels(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "models"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List Multivariate Models + * + * List models of a resource. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      topIntegerNoThe number of result items to return.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of listing models as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMultivariateModelsAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listMultivariateModelsSinglePageAsync(requestOptions), + nextLink -> listMultivariateModelsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List Multivariate Models + * + * List models of a resource. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      topIntegerNoThe number of result items to return.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of listing models along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listMultivariateModelsSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listMultivariateModelsSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "models"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List Multivariate Models + * + * List models of a resource. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      topIntegerNoThe number of result items to return.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of listing models as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultivariateModels(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listMultivariateModelsSinglePage(requestOptions), + nextLink -> listMultivariateModelsNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Delete Multivariate Model + * + * Delete an existing multivariate model according to the modelId value. + * + * @param modelId Model identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteMultivariateModelWithResponseAsync(String modelId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.deleteMultivariateModel(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), modelId, accept, requestOptions, context)); + } + + /** + * Delete Multivariate Model + * + * Delete an existing multivariate model according to the modelId value. + * + * @param modelId Model identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteMultivariateModelWithResponse(String modelId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteMultivariateModelSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), modelId, accept, requestOptions, Context.NONE); + } + + /** + * Get Multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMultivariateModelWithResponseAsync(String modelId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getMultivariateModel(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), modelId, accept, requestOptions, context)); + } + + /** + * Get Multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return multivariate Model + * + * Get detailed information about the multivariate model, including the training status + * and variables used in the model along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMultivariateModelWithResponse(String modelId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getMultivariateModelSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + modelId, accept, requestOptions, Context.NONE); + } + + /** + * Detect Multivariate Anomaly + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The input schema should be the same with the training + * request. The request will finish asynchronously and return a resultId value to + * query the detection result. The request should be a source link to indicate an + * externally accessible Azure Storage URI that either points to an Azure Blob + * Storage folder or points to a CSV file in Azure Blob Storage. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     dataSource: String (Required)
      +     *     topContributorCount: Integer (Optional)
      +     *     startTime: OffsetDateTime (Required)
      +     *     endTime: OffsetDateTime (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     resultId: String (Required)
      +     *     summary (Required): {
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Required)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *         setupInfo (Required): {
      +     *             dataSource: String (Required)
      +     *             topContributorCount: Integer (Optional)
      +     *             startTime: OffsetDateTime (Required)
      +     *             endTime: OffsetDateTime (Required)
      +     *         }
      +     *     }
      +     *     results (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param options Request of multivariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return detection results for the resultId value along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectMultivariateBatchAnomalyWithResponseAsync(String modelId, + BinaryData options, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.detectMultivariateBatchAnomaly(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), modelId, contentType, accept, options, requestOptions, + context)); + } + + /** + * Detect Multivariate Anomaly + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The input schema should be the same with the training + * request. The request will finish asynchronously and return a resultId value to + * query the detection result. The request should be a source link to indicate an + * externally accessible Azure Storage URI that either points to an Azure Blob + * Storage folder or points to a CSV file in Azure Blob Storage. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     dataSource: String (Required)
      +     *     topContributorCount: Integer (Optional)
      +     *     startTime: OffsetDateTime (Required)
      +     *     endTime: OffsetDateTime (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     resultId: String (Required)
      +     *     summary (Required): {
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Required)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         variableStates (Optional): [
      +     *              (Optional){
      +     *                 variable: String (Optional)
      +     *                 filledNARatio: Double (Optional)
      +     *                 effectiveCount: Integer (Optional)
      +     *                 firstTimestamp: OffsetDateTime (Optional)
      +     *                 lastTimestamp: OffsetDateTime (Optional)
      +     *             }
      +     *         ]
      +     *         setupInfo (Required): {
      +     *             dataSource: String (Required)
      +     *             topContributorCount: Integer (Optional)
      +     *             startTime: OffsetDateTime (Required)
      +     *             endTime: OffsetDateTime (Required)
      +     *         }
      +     *     }
      +     *     results (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param options Request of multivariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return detection results for the resultId value along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectMultivariateBatchAnomalyWithResponse(String modelId, BinaryData options, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.detectMultivariateBatchAnomalySync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), modelId, contentType, accept, options, requestOptions, + Context.NONE); + } + + /** + * Detect anomalies in the last point of the request body + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The inference data should be put into the request body in + * JSON format. The request will finish synchronously and return the detection + * immediately in the response body. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     variables (Required): [
      +     *          (Required){
      +     *             variable: String (Required)
      +     *             timestamps (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             values (Required): [
      +     *                 double (Required)
      +     *             ]
      +     *         }
      +     *     ]
      +     *     topContributorCount: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     variableStates (Optional): [
      +     *          (Optional){
      +     *             variable: String (Optional)
      +     *             filledNARatio: Double (Optional)
      +     *             effectiveCount: Integer (Optional)
      +     *             firstTimestamp: OffsetDateTime (Optional)
      +     *             lastTimestamp: OffsetDateTime (Optional)
      +     *         }
      +     *     ]
      +     *     results (Optional): [
      +     *          (Optional){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                  (Optional){
      +     *                     code: String (Required)
      +     *                     message: String (Required)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param options Request of the last detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return results of the last detection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectMultivariateLastAnomalyWithResponseAsync(String modelId, BinaryData options, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.detectMultivariateLastAnomaly(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), modelId, contentType, accept, options, requestOptions, + context)); + } + + /** + * Detect anomalies in the last point of the request body + * + * Submit a multivariate anomaly detection task with the modelId value of a trained model + * and inference data. The inference data should be put into the request body in + * JSON format. The request will finish synchronously and return the detection + * immediately in the response body. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     variables (Required): [
      +     *          (Required){
      +     *             variable: String (Required)
      +     *             timestamps (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             values (Required): [
      +     *                 double (Required)
      +     *             ]
      +     *         }
      +     *     ]
      +     *     topContributorCount: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     variableStates (Optional): [
      +     *          (Optional){
      +     *             variable: String (Optional)
      +     *             filledNARatio: Double (Optional)
      +     *             effectiveCount: Integer (Optional)
      +     *             firstTimestamp: OffsetDateTime (Optional)
      +     *             lastTimestamp: OffsetDateTime (Optional)
      +     *         }
      +     *     ]
      +     *     results (Optional): [
      +     *          (Optional){
      +     *             timestamp: OffsetDateTime (Required)
      +     *             value (Optional): {
      +     *                 isAnomaly: boolean (Required)
      +     *                 severity: double (Required)
      +     *                 score: double (Required)
      +     *                 interpretation (Optional): [
      +     *                      (Optional){
      +     *                         variable: String (Optional)
      +     *                         contributionScore: Double (Optional)
      +     *                         correlationChanges (Optional): {
      +     *                             changedVariables (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             errors (Optional): [
      +     *                  (Optional){
      +     *                     code: String (Required)
      +     *                     message: String (Required)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param modelId Model identifier. + * @param options Request of the last detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return results of the last detection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectMultivariateLastAnomalyWithResponse(String modelId, BinaryData options, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.detectMultivariateLastAnomalySync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), modelId, contentType, accept, options, requestOptions, + Context.NONE); + } + + /** + * List Multivariate Models + * + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of listing models along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultivariateModelsNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listMultivariateModelsNext(nextLink, this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "models"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List Multivariate Models + * + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     modelId: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdatedTime: OffsetDateTime (Required)
      +     *     modelInfo (Optional): {
      +     *         dataSource: String (Required)
      +     *         dataSchema: String(OneTable/MultiTable) (Optional)
      +     *         startTime: OffsetDateTime (Required)
      +     *         endTime: OffsetDateTime (Required)
      +     *         displayName: String (Optional)
      +     *         slidingWindow: Integer (Optional)
      +     *         alignPolicy (Optional): {
      +     *             alignMode: String(Inner/Outer) (Optional)
      +     *             fillNAMethod: String(Previous/Subsequent/Linear/Zero/Fixed) (Optional)
      +     *             paddingValue: Double (Optional)
      +     *         }
      +     *         status: String(CREATED/RUNNING/READY/FAILED) (Optional)
      +     *         errors (Optional): [
      +     *              (Optional){
      +     *                 code: String (Required)
      +     *                 message: String (Required)
      +     *             }
      +     *         ]
      +     *         diagnosticsInfo (Optional): {
      +     *             modelState (Optional): {
      +     *                 epochIds (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 trainLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 validationLosses (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *                 latenciesInSeconds (Optional): [
      +     *                     double (Optional)
      +     *                 ]
      +     *             }
      +     *             variableStates (Optional): [
      +     *                  (Optional){
      +     *                     variable: String (Optional)
      +     *                     filledNARatio: Double (Optional)
      +     *                     effectiveCount: Integer (Optional)
      +     *                     firstTimestamp: OffsetDateTime (Optional)
      +     *                     lastTimestamp: OffsetDateTime (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of listing models along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listMultivariateModelsNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listMultivariateModelsNextSync(nextLink, this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "models"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/UnivariatesImpl.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/UnivariatesImpl.java new file mode 100644 index 000000000000..d1e7291ab396 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/UnivariatesImpl.java @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.implementation; + +import com.azure.ai.anomalydetector.AnomalyDetectorServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Univariates. + */ +public final class UnivariatesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final UnivariatesService service; + + /** + * The service client containing this operation class. + */ + private final AnomalyDetectorClientImpl client; + + /** + * Initializes an instance of UnivariatesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UnivariatesImpl(AnomalyDetectorClientImpl client) { + this.service + = RestProxy.create(UnivariatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public AnomalyDetectorServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for AnomalyDetectorClientUnivariates to be used by the proxy service to + * perform REST calls. + */ + @Host("{Endpoint}/anomalydetector/{ApiVersion}") + @ServiceInterface(name = "AnomalyDetectorClien") + public interface UnivariatesService { + @Post("/timeseries/entire/detect") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> detectUnivariateEntireSeries(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData options, + RequestOptions requestOptions, Context context); + + @Post("/timeseries/entire/detect") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response detectUnivariateEntireSeriesSync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData options, + RequestOptions requestOptions, Context context); + + @Post("/timeseries/last/detect") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> detectUnivariateLastPoint(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData options, + RequestOptions requestOptions, Context context); + + @Post("/timeseries/last/detect") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response detectUnivariateLastPointSync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData options, + RequestOptions requestOptions, Context context); + + @Post("/timeseries/changepoint/detect") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> detectUnivariateChangePoint(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData options, + RequestOptions requestOptions, Context context); + + @Post("/timeseries/changepoint/detect") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response detectUnivariateChangePointSync(@HostParam("Endpoint") String endpoint, + @HostParam("ApiVersion") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData options, + RequestOptions requestOptions, Context context); + } + + /** + * Detect anomalies for the entire series in batch. + * + * This operation generates a model with an entire series. Each point is detected + * with the same model. With this method, points before and after a certain point + * are used to determine whether it's an anomaly. The entire detection can give the + * user an overall status of the time series. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Optional)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     maxAnomalyRatio: Double (Optional)
      +     *     sensitivity: Integer (Optional)
      +     *     imputeMode: String(auto/previous/linear/fixed/zero/notFill) (Optional)
      +     *     imputeFixedValue: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: int (Required)
      +     *     expectedValues (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     upperMargins (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     lowerMargins (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     isAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     isNegativeAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     isPositiveAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     severity (Optional): [
      +     *         double (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of the entire anomaly detection along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectUnivariateEntireSeriesWithResponseAsync(BinaryData options, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.detectUnivariateEntireSeries(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), contentType, accept, options, requestOptions, context)); + } + + /** + * Detect anomalies for the entire series in batch. + * + * This operation generates a model with an entire series. Each point is detected + * with the same model. With this method, points before and after a certain point + * are used to determine whether it's an anomaly. The entire detection can give the + * user an overall status of the time series. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Optional)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     maxAnomalyRatio: Double (Optional)
      +     *     sensitivity: Integer (Optional)
      +     *     imputeMode: String(auto/previous/linear/fixed/zero/notFill) (Optional)
      +     *     imputeFixedValue: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: int (Required)
      +     *     expectedValues (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     upperMargins (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     lowerMargins (Required): [
      +     *         double (Required)
      +     *     ]
      +     *     isAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     isNegativeAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     isPositiveAnomaly (Required): [
      +     *         boolean (Required)
      +     *     ]
      +     *     severity (Optional): [
      +     *         double (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of the entire anomaly detection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectUnivariateEntireSeriesWithResponse(BinaryData options, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.detectUnivariateEntireSeriesSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), contentType, accept, options, requestOptions, Context.NONE); + } + + /** + * Detect anomaly status of the latest point in time series. + * + * This operation generates a model by using the points that you sent in to the API + * and based on all data to determine whether the last point is anomalous. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Optional)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     maxAnomalyRatio: Double (Optional)
      +     *     sensitivity: Integer (Optional)
      +     *     imputeMode: String(auto/previous/linear/fixed/zero/notFill) (Optional)
      +     *     imputeFixedValue: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: int (Required)
      +     *     suggestedWindow: int (Required)
      +     *     expectedValue: double (Required)
      +     *     upperMargin: double (Required)
      +     *     lowerMargin: double (Required)
      +     *     isAnomaly: boolean (Required)
      +     *     isNegativeAnomaly: boolean (Required)
      +     *     isPositiveAnomaly: boolean (Required)
      +     *     severity: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of the last anomaly detection along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectUnivariateLastPointWithResponseAsync(BinaryData options, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.detectUnivariateLastPoint(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), contentType, accept, options, requestOptions, context)); + } + + /** + * Detect anomaly status of the latest point in time series. + * + * This operation generates a model by using the points that you sent in to the API + * and based on all data to determine whether the last point is anomalous. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Optional)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     maxAnomalyRatio: Double (Optional)
      +     *     sensitivity: Integer (Optional)
      +     *     imputeMode: String(auto/previous/linear/fixed/zero/notFill) (Optional)
      +     *     imputeFixedValue: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: int (Required)
      +     *     suggestedWindow: int (Required)
      +     *     expectedValue: double (Required)
      +     *     upperMargin: double (Required)
      +     *     lowerMargin: double (Required)
      +     *     isAnomaly: boolean (Required)
      +     *     isNegativeAnomaly: boolean (Required)
      +     *     isPositiveAnomaly: boolean (Required)
      +     *     severity: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of the last anomaly detection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectUnivariateLastPointWithResponse(BinaryData options, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.detectUnivariateLastPointSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), contentType, accept, options, requestOptions, Context.NONE); + } + + /** + * Detect change point for the entire series + * + * Evaluate the change point score of every series point. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Required)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     stableTrendWindow: Integer (Optional)
      +     *     threshold: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: Integer (Optional)
      +     *     isChangePoint (Optional): [
      +     *         boolean (Optional)
      +     *     ]
      +     *     confidenceScores (Optional): [
      +     *         double (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of change point detection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> detectUnivariateChangePointWithResponseAsync(BinaryData options, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.detectUnivariateChangePoint(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), contentType, accept, options, requestOptions, context)); + } + + /** + * Detect change point for the entire series + * + * Evaluate the change point score of every series point. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     series (Required): [
      +     *          (Required){
      +     *             timestamp: OffsetDateTime (Optional)
      +     *             value: double (Required)
      +     *         }
      +     *     ]
      +     *     granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none) (Required)
      +     *     customInterval: Integer (Optional)
      +     *     period: Integer (Optional)
      +     *     stableTrendWindow: Integer (Optional)
      +     *     threshold: Double (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     period: Integer (Optional)
      +     *     isChangePoint (Optional): [
      +     *         boolean (Optional)
      +     *     ]
      +     *     confidenceScores (Optional): [
      +     *         double (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param options Method of univariate anomaly detection. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response of change point detection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detectUnivariateChangePointWithResponse(BinaryData options, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.detectUnivariateChangePointSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), contentType, accept, options, requestOptions, Context.NONE); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/package-info.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/package-info.java new file mode 100644 index 000000000000..45aab30e4026 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/package-info.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +/** + * Package containing the implementations for AnomalyDetector. The Anomaly Detector API detects anomalies automatically + * in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In + * stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained + * by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is + * for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will + * be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a + * time range without preparing time series in client side. Besides the above three functionalities, stateful model also + * provide group based detection and labeling service. By leveraging labeling service user can provide labels for each + * detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is + * a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using + * anomaly detector service, business customers can discover incidents and establish a logic flow for root cause + * analysis. + */ +package com.azure.ai.anomalydetector.implementation; diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AlignMode.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AlignMode.java new file mode 100644 index 000000000000..4a4f99db1f55 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AlignMode.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for AlignMode. + */ +public final class AlignMode extends ExpandableStringEnum { + + /** + * Static value Inner for AlignMode. + */ + @Generated + public static final AlignMode INNER = fromString("Inner"); + + /** + * Static value Outer for AlignMode. + */ + @Generated + public static final AlignMode OUTER = fromString("Outer"); + + /** + * Creates a new instance of AlignMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public AlignMode() { + } + + /** + * Creates or finds a AlignMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AlignMode. + */ + @Generated + public static AlignMode fromString(String name) { + return fromString(name, AlignMode.class); + } + + /** + * Gets known AlignMode values. + * + * @return known AlignMode values. + */ + @Generated + public static Collection values() { + return values(AlignMode.class); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AlignPolicy.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AlignPolicy.java new file mode 100644 index 000000000000..f777af3e86d8 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AlignPolicy.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Manner of aligning multiple variables. + */ +@Fluent +public final class AlignPolicy implements JsonSerializable { + + /* + * Field that indicates how to align different variables to the same + * time range. + */ + @Generated + private AlignMode alignMode; + + /* + * Field that indicates how missing values will be filled. + */ + @Generated + private FillNAMethod fillNAMethod; + + /* + * Field that's required when fillNAMethod is Fixed. + */ + @Generated + private Double paddingValue; + + /** + * Creates an instance of AlignPolicy class. + */ + @Generated + public AlignPolicy() { + } + + /** + * Get the alignMode property: Field that indicates how to align different variables to the same + * time range. + * + * @return the alignMode value. + */ + @Generated + public AlignMode getAlignMode() { + return this.alignMode; + } + + /** + * Set the alignMode property: Field that indicates how to align different variables to the same + * time range. + * + * @param alignMode the alignMode value to set. + * @return the AlignPolicy object itself. + */ + @Generated + public AlignPolicy setAlignMode(AlignMode alignMode) { + this.alignMode = alignMode; + return this; + } + + /** + * Get the fillNAMethod property: Field that indicates how missing values will be filled. + * + * @return the fillNAMethod value. + */ + @Generated + public FillNAMethod getFillNAMethod() { + return this.fillNAMethod; + } + + /** + * Set the fillNAMethod property: Field that indicates how missing values will be filled. + * + * @param fillNAMethod the fillNAMethod value to set. + * @return the AlignPolicy object itself. + */ + @Generated + public AlignPolicy setFillNAMethod(FillNAMethod fillNAMethod) { + this.fillNAMethod = fillNAMethod; + return this; + } + + /** + * Get the paddingValue property: Field that's required when fillNAMethod is Fixed. + * + * @return the paddingValue value. + */ + @Generated + public Double getPaddingValue() { + return this.paddingValue; + } + + /** + * Set the paddingValue property: Field that's required when fillNAMethod is Fixed. + * + * @param paddingValue the paddingValue value to set. + * @return the AlignPolicy object itself. + */ + @Generated + public AlignPolicy setPaddingValue(Double paddingValue) { + this.paddingValue = paddingValue; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("alignMode", this.alignMode == null ? null : this.alignMode.toString()); + jsonWriter.writeStringField("fillNAMethod", this.fillNAMethod == null ? null : this.fillNAMethod.toString()); + jsonWriter.writeNumberField("paddingValue", this.paddingValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AlignPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AlignPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AlignPolicy. + */ + @Generated + public static AlignPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AlignPolicy deserializedAlignPolicy = new AlignPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("alignMode".equals(fieldName)) { + deserializedAlignPolicy.alignMode = AlignMode.fromString(reader.getString()); + } else if ("fillNAMethod".equals(fieldName)) { + deserializedAlignPolicy.fillNAMethod = FillNAMethod.fromString(reader.getString()); + } else if ("paddingValue".equals(fieldName)) { + deserializedAlignPolicy.paddingValue = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + return deserializedAlignPolicy; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyDetectionModel.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyDetectionModel.java new file mode 100644 index 000000000000..67c33f09261f --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyDetectionModel.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Response of getting a model. + */ +@Immutable +public final class AnomalyDetectionModel implements JsonSerializable { + + /* + * Model identifier. + */ + @Generated + private String modelId; + + /* + * Date and time (UTC) when the model was created. + */ + @Generated + private final OffsetDateTime createdTime; + + /* + * Date and time (UTC) when the model was last updated. + */ + @Generated + private final OffsetDateTime lastUpdatedTime; + + /* + * Training result of a model, including its status, errors, and diagnostics + * information. + */ + @Generated + private ModelInfo modelInfo; + + /** + * Creates an instance of AnomalyDetectionModel class. + * + * @param createdTime the createdTime value to set. + * @param lastUpdatedTime the lastUpdatedTime value to set. + */ + @Generated + private AnomalyDetectionModel(OffsetDateTime createdTime, OffsetDateTime lastUpdatedTime) { + this.createdTime = createdTime; + this.lastUpdatedTime = lastUpdatedTime; + } + + /** + * Get the modelId property: Model identifier. + * + * @return the modelId value. + */ + @Generated + public String getModelId() { + return this.modelId; + } + + /** + * Get the createdTime property: Date and time (UTC) when the model was created. + * + * @return the createdTime value. + */ + @Generated + public OffsetDateTime getCreatedTime() { + return this.createdTime; + } + + /** + * Get the lastUpdatedTime property: Date and time (UTC) when the model was last updated. + * + * @return the lastUpdatedTime value. + */ + @Generated + public OffsetDateTime getLastUpdatedTime() { + return this.lastUpdatedTime; + } + + /** + * Get the modelInfo property: Training result of a model, including its status, errors, and diagnostics + * information. + * + * @return the modelInfo value. + */ + @Generated + public ModelInfo getModelInfo() { + return this.modelInfo; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("createdTime", + this.createdTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdTime)); + jsonWriter.writeStringField("lastUpdatedTime", + this.lastUpdatedTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastUpdatedTime)); + jsonWriter.writeJsonField("modelInfo", this.modelInfo); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AnomalyDetectionModel from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AnomalyDetectionModel if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AnomalyDetectionModel. + */ + @Generated + public static AnomalyDetectionModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String modelId = null; + OffsetDateTime createdTime = null; + OffsetDateTime lastUpdatedTime = null; + ModelInfo modelInfo = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("modelId".equals(fieldName)) { + modelId = reader.getString(); + } else if ("createdTime".equals(fieldName)) { + createdTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastUpdatedTime".equals(fieldName)) { + lastUpdatedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("modelInfo".equals(fieldName)) { + modelInfo = ModelInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + AnomalyDetectionModel deserializedAnomalyDetectionModel + = new AnomalyDetectionModel(createdTime, lastUpdatedTime); + deserializedAnomalyDetectionModel.modelId = modelId; + deserializedAnomalyDetectionModel.modelInfo = modelInfo; + return deserializedAnomalyDetectionModel; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyInterpretation.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyInterpretation.java new file mode 100644 index 000000000000..32db52763225 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyInterpretation.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Interpretation of the anomalous time stamp. + */ +@Immutable +public final class AnomalyInterpretation implements JsonSerializable { + + /* + * Variable. + */ + @Generated + private String variable; + + /* + * This score shows the percentage that contributes to the anomalous time stamp. It's a + * number between 0 and 1. + */ + @Generated + private Double contributionScore; + + /* + * Correlation changes among the anomalous variables. + */ + @Generated + private CorrelationChanges correlationChanges; + + /** + * Creates an instance of AnomalyInterpretation class. + */ + @Generated + private AnomalyInterpretation() { + } + + /** + * Get the variable property: Variable. + * + * @return the variable value. + */ + @Generated + public String getVariable() { + return this.variable; + } + + /** + * Get the contributionScore property: This score shows the percentage that contributes to the anomalous time stamp. + * It's a + * number between 0 and 1. + * + * @return the contributionScore value. + */ + @Generated + public Double getContributionScore() { + return this.contributionScore; + } + + /** + * Get the correlationChanges property: Correlation changes among the anomalous variables. + * + * @return the correlationChanges value. + */ + @Generated + public CorrelationChanges getCorrelationChanges() { + return this.correlationChanges; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("variable", this.variable); + jsonWriter.writeNumberField("contributionScore", this.contributionScore); + jsonWriter.writeJsonField("correlationChanges", this.correlationChanges); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AnomalyInterpretation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AnomalyInterpretation if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the AnomalyInterpretation. + */ + @Generated + public static AnomalyInterpretation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AnomalyInterpretation deserializedAnomalyInterpretation = new AnomalyInterpretation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("variable".equals(fieldName)) { + deserializedAnomalyInterpretation.variable = reader.getString(); + } else if ("contributionScore".equals(fieldName)) { + deserializedAnomalyInterpretation.contributionScore = reader.getNullable(JsonReader::getDouble); + } else if ("correlationChanges".equals(fieldName)) { + deserializedAnomalyInterpretation.correlationChanges = CorrelationChanges.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedAnomalyInterpretation; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyState.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyState.java new file mode 100644 index 000000000000..6ef042f3b758 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyState.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Anomaly status and information. + */ +@Immutable +public final class AnomalyState implements JsonSerializable { + + /* + * Time stamp for this anomaly. + */ + @Generated + private final OffsetDateTime timestamp; + + /* + * Detailed value of this anomalous time stamp. + */ + @Generated + private AnomalyValue value; + + /* + * Error message for the current time stamp. + */ + @Generated + private List errors; + + /** + * Creates an instance of AnomalyState class. + * + * @param timestamp the timestamp value to set. + */ + @Generated + private AnomalyState(OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + /** + * Get the timestamp property: Time stamp for this anomaly. + * + * @return the timestamp value. + */ + @Generated + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Get the value property: Detailed value of this anomalous time stamp. + * + * @return the value value. + */ + @Generated + public AnomalyValue getValue() { + return this.value; + } + + /** + * Get the errors property: Error message for the current time stamp. + * + * @return the errors value. + */ + @Generated + public List getErrors() { + return this.errors; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("timestamp", + this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); + jsonWriter.writeJsonField("value", this.value); + jsonWriter.writeArrayField("errors", this.errors, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AnomalyState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AnomalyState if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AnomalyState. + */ + @Generated + public static AnomalyState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OffsetDateTime timestamp = null; + AnomalyValue value = null; + List errors = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("timestamp".equals(fieldName)) { + timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("value".equals(fieldName)) { + value = AnomalyValue.fromJson(reader); + } else if ("errors".equals(fieldName)) { + errors = reader.readArray(reader1 -> ErrorResponse.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + AnomalyState deserializedAnomalyState = new AnomalyState(timestamp); + deserializedAnomalyState.value = value; + deserializedAnomalyState.errors = errors; + return deserializedAnomalyState; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyValue.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyValue.java new file mode 100644 index 000000000000..34ef3484db08 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AnomalyValue.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Detailed information of the anomalous time stamp. + */ +@Immutable +public final class AnomalyValue implements JsonSerializable { + + /* + * True if an anomaly is detected at the current time stamp. + */ + @Generated + private final boolean isAnomaly; + + /* + * Indicates the significance of the anomaly. The higher the severity, the more + * significant the anomaly is. + */ + @Generated + private final double severity; + + /* + * Raw anomaly score of severity, to help indicate the degree of abnormality. + */ + @Generated + private final double score; + + /* + * Interpretation of this anomalous time stamp. + */ + @Generated + private List interpretation; + + /** + * Creates an instance of AnomalyValue class. + * + * @param isAnomaly the isAnomaly value to set. + * @param severity the severity value to set. + * @param score the score value to set. + */ + @Generated + private AnomalyValue(boolean isAnomaly, double severity, double score) { + this.isAnomaly = isAnomaly; + this.severity = severity; + this.score = score; + } + + /** + * Get the isAnomaly property: True if an anomaly is detected at the current time stamp. + * + * @return the isAnomaly value. + */ + @Generated + public boolean isAnomaly() { + return this.isAnomaly; + } + + /** + * Get the severity property: Indicates the significance of the anomaly. The higher the severity, the more + * significant the anomaly is. + * + * @return the severity value. + */ + @Generated + public double getSeverity() { + return this.severity; + } + + /** + * Get the score property: Raw anomaly score of severity, to help indicate the degree of abnormality. + * + * @return the score value. + */ + @Generated + public double getScore() { + return this.score; + } + + /** + * Get the interpretation property: Interpretation of this anomalous time stamp. + * + * @return the interpretation value. + */ + @Generated + public List getInterpretation() { + return this.interpretation; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isAnomaly", this.isAnomaly); + jsonWriter.writeDoubleField("severity", this.severity); + jsonWriter.writeDoubleField("score", this.score); + jsonWriter.writeArrayField("interpretation", this.interpretation, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AnomalyValue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AnomalyValue if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AnomalyValue. + */ + @Generated + public static AnomalyValue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + boolean isAnomaly = false; + double severity = 0.0; + double score = 0.0; + List interpretation = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("isAnomaly".equals(fieldName)) { + isAnomaly = reader.getBoolean(); + } else if ("severity".equals(fieldName)) { + severity = reader.getDouble(); + } else if ("score".equals(fieldName)) { + score = reader.getDouble(); + } else if ("interpretation".equals(fieldName)) { + interpretation = reader.readArray(reader1 -> AnomalyInterpretation.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + AnomalyValue deserializedAnomalyValue = new AnomalyValue(isAnomaly, severity, score); + deserializedAnomalyValue.interpretation = interpretation; + return deserializedAnomalyValue; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/CorrelationChanges.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/CorrelationChanges.java new file mode 100644 index 000000000000..2a95ca1c1956 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/CorrelationChanges.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Correlation changes among the anomalous variables. + */ +@Immutable +public final class CorrelationChanges implements JsonSerializable { + + /* + * Correlated variables that have correlation changes under an anomaly. + */ + @Generated + private List changedVariables; + + /** + * Creates an instance of CorrelationChanges class. + */ + @Generated + private CorrelationChanges() { + } + + /** + * Get the changedVariables property: Correlated variables that have correlation changes under an anomaly. + * + * @return the changedVariables value. + */ + @Generated + public List getChangedVariables() { + return this.changedVariables; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("changedVariables", this.changedVariables, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CorrelationChanges from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CorrelationChanges if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CorrelationChanges. + */ + @Generated + public static CorrelationChanges fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CorrelationChanges deserializedCorrelationChanges = new CorrelationChanges(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("changedVariables".equals(fieldName)) { + List changedVariables = reader.readArray(reader1 -> reader1.getString()); + deserializedCorrelationChanges.changedVariables = changedVariables; + } else { + reader.skipChildren(); + } + } + return deserializedCorrelationChanges; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/DataSchema.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/DataSchema.java new file mode 100644 index 000000000000..4365b1b40570 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/DataSchema.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Data schema of the input data source. The default is OneTable. + */ +public final class DataSchema extends ExpandableStringEnum { + + /** + * OneTable means that your input data is in one CSV file, which contains one time stamp column and several variable + * columns. The default DataSchema value is OneTable. + */ + @Generated + public static final DataSchema ONE_TABLE = fromString("OneTable"); + + /** + * MultiTable means that your input data is separated in multiple CSV files. Each file contains one time stamp + * column and one variable column, and the CSV file name should indicate the name of the variable. The default + * DataSchema value is OneTable. + */ + @Generated + public static final DataSchema MULTI_TABLE = fromString("MultiTable"); + + /** + * Creates a new instance of DataSchema value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public DataSchema() { + } + + /** + * Creates or finds a DataSchema from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataSchema. + */ + @Generated + public static DataSchema fromString(String name) { + return fromString(name, DataSchema.class); + } + + /** + * Gets known DataSchema values. + * + * @return known DataSchema values. + */ + @Generated + public static Collection values() { + return values(DataSchema.class); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/DiagnosticsInfo.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/DiagnosticsInfo.java new file mode 100644 index 000000000000..68db9b8bdb76 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/DiagnosticsInfo.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Diagnostics information to help inspect the states of a model or variable. + */ +@Immutable +public final class DiagnosticsInfo implements JsonSerializable { + + /* + * Model status. + */ + @Generated + private ModelState modelState; + + /* + * Variable status. + */ + @Generated + private List variableStates; + + /** + * Creates an instance of DiagnosticsInfo class. + */ + @Generated + private DiagnosticsInfo() { + } + + /** + * Get the modelState property: Model status. + * + * @return the modelState value. + */ + @Generated + public ModelState getModelState() { + return this.modelState; + } + + /** + * Get the variableStates property: Variable status. + * + * @return the variableStates value. + */ + @Generated + public List getVariableStates() { + return this.variableStates; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("modelState", this.modelState); + jsonWriter.writeArrayField("variableStates", this.variableStates, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiagnosticsInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiagnosticsInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DiagnosticsInfo. + */ + @Generated + public static DiagnosticsInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiagnosticsInfo deserializedDiagnosticsInfo = new DiagnosticsInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("modelState".equals(fieldName)) { + deserializedDiagnosticsInfo.modelState = ModelState.fromJson(reader); + } else if ("variableStates".equals(fieldName)) { + List variableStates = reader.readArray(reader1 -> VariableState.fromJson(reader1)); + deserializedDiagnosticsInfo.variableStates = variableStates; + } else { + reader.skipChildren(); + } + } + return deserializedDiagnosticsInfo; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ErrorResponse.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ErrorResponse.java new file mode 100644 index 000000000000..5182e7e30d92 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ErrorResponse.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Error information that the API returned. + */ +@Immutable +public final class ErrorResponse implements JsonSerializable { + + /* + * Error code. + */ + @Generated + private final String code; + + /* + * Message that explains the error that the service reported. + */ + @Generated + private final String message; + + /** + * Creates an instance of ErrorResponse class. + * + * @param code the code value to set. + * @param message the message value to set. + */ + @Generated + private ErrorResponse(String code, String message) { + this.code = code; + this.message = message; + } + + /** + * Get the code property: Error code. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Get the message property: Message that explains the error that the service reported. + * + * @return the message value. + */ + @Generated + public String getMessage() { + return this.message; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorResponse if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ErrorResponse. + */ + @Generated + public static ErrorResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String code = null; + String message = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("code".equals(fieldName)) { + code = reader.getString(); + } else if ("message".equals(fieldName)) { + message = reader.getString(); + } else { + reader.skipChildren(); + } + } + return new ErrorResponse(code, message); + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/FillNAMethod.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/FillNAMethod.java new file mode 100644 index 000000000000..19c1df212b85 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/FillNAMethod.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Field that indicates how missing values will be filled. + */ +public final class FillNAMethod extends ExpandableStringEnum { + + /** + * Static value Previous for FillNAMethod. + */ + @Generated + public static final FillNAMethod PREVIOUS = fromString("Previous"); + + /** + * Static value Subsequent for FillNAMethod. + */ + @Generated + public static final FillNAMethod SUBSEQUENT = fromString("Subsequent"); + + /** + * Static value Linear for FillNAMethod. + */ + @Generated + public static final FillNAMethod LINEAR = fromString("Linear"); + + /** + * Static value Zero for FillNAMethod. + */ + @Generated + public static final FillNAMethod ZERO = fromString("Zero"); + + /** + * Static value Fixed for FillNAMethod. + */ + @Generated + public static final FillNAMethod FIXED = fromString("Fixed"); + + /** + * Creates a new instance of FillNAMethod value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public FillNAMethod() { + } + + /** + * Creates or finds a FillNAMethod from its string representation. + * + * @param name a name to look for. + * @return the corresponding FillNAMethod. + */ + @Generated + public static FillNAMethod fromString(String name) { + return fromString(name, FillNAMethod.class); + } + + /** + * Gets known FillNAMethod values. + * + * @return known FillNAMethod values. + */ + @Generated + public static Collection values() { + return values(FillNAMethod.class); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ImputeMode.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ImputeMode.java new file mode 100644 index 000000000000..ff0fe6cc8054 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ImputeMode.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ImputeMode. + */ +public final class ImputeMode extends ExpandableStringEnum { + + /** + * Static value auto for ImputeMode. + */ + @Generated + public static final ImputeMode AUTO = fromString("auto"); + + /** + * Static value previous for ImputeMode. + */ + @Generated + public static final ImputeMode PREVIOUS = fromString("previous"); + + /** + * Static value linear for ImputeMode. + */ + @Generated + public static final ImputeMode LINEAR = fromString("linear"); + + /** + * Static value fixed for ImputeMode. + */ + @Generated + public static final ImputeMode FIXED = fromString("fixed"); + + /** + * Static value zero for ImputeMode. + */ + @Generated + public static final ImputeMode ZERO = fromString("zero"); + + /** + * Static value notFill for ImputeMode. + */ + @Generated + public static final ImputeMode NOT_FILL = fromString("notFill"); + + /** + * Creates a new instance of ImputeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ImputeMode() { + } + + /** + * Creates or finds a ImputeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImputeMode. + */ + @Generated + public static ImputeMode fromString(String name) { + return fromString(name, ImputeMode.class); + } + + /** + * Gets known ImputeMode values. + * + * @return known ImputeMode values. + */ + @Generated + public static Collection values() { + return values(ImputeMode.class); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelInfo.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelInfo.java new file mode 100644 index 000000000000..158d18c70f29 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelInfo.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Training result of a model, including its status, errors, and diagnostics + * information. + */ +@Fluent +public final class ModelInfo implements JsonSerializable { + + /* + * Source link to the input data to indicate an accessible Azure Storage URI. + * It either points to an Azure Blob Storage folder or points to a CSV file in + * Azure Blob Storage, based on your data schema selection. + */ + @Generated + private final String dataSource; + + /* + * Data schema of the input data source. The default + * is OneTable. + */ + @Generated + private DataSchema dataSchema; + + /* + * Start date/time of training data, which should be + * in ISO 8601 format. + */ + @Generated + private final OffsetDateTime startTime; + + /* + * End date/time of training data, which should be + * in ISO 8601 format. + */ + @Generated + private final OffsetDateTime endTime; + + /* + * Display name of the model. Maximum length is 24 + * characters. + */ + @Generated + private String displayName; + + /* + * Number of previous time stamps that will be used to + * detect whether the time stamp is an anomaly or not. + */ + @Generated + private Integer slidingWindow; + + /* + * Manner of aligning multiple variables. + */ + @Generated + private AlignPolicy alignPolicy; + + /* + * Model status. + */ + @Generated + private ModelStatus status; + + /* + * Error messages after failure to create a model. + */ + @Generated + private List errors; + + /* + * Diagnostics information to help inspect the states of a model or variable. + */ + @Generated + private DiagnosticsInfo diagnosticsInfo; + + /** + * Creates an instance of ModelInfo class. + * + * @param dataSource the dataSource value to set. + * @param startTime the startTime value to set. + * @param endTime the endTime value to set. + */ + @Generated + public ModelInfo(String dataSource, OffsetDateTime startTime, OffsetDateTime endTime) { + this.dataSource = dataSource; + this.startTime = startTime; + this.endTime = endTime; + } + + /** + * Get the dataSource property: Source link to the input data to indicate an accessible Azure Storage URI. + * It either points to an Azure Blob Storage folder or points to a CSV file in + * Azure Blob Storage, based on your data schema selection. + * + * @return the dataSource value. + */ + @Generated + public String getDataSource() { + return this.dataSource; + } + + /** + * Get the dataSchema property: Data schema of the input data source. The default + * is OneTable. + * + * @return the dataSchema value. + */ + @Generated + public DataSchema getDataSchema() { + return this.dataSchema; + } + + /** + * Set the dataSchema property: Data schema of the input data source. The default + * is OneTable. + * + * @param dataSchema the dataSchema value to set. + * @return the ModelInfo object itself. + */ + @Generated + public ModelInfo setDataSchema(DataSchema dataSchema) { + this.dataSchema = dataSchema; + return this; + } + + /** + * Get the startTime property: Start date/time of training data, which should be + * in ISO 8601 format. + * + * @return the startTime value. + */ + @Generated + public OffsetDateTime getStartTime() { + return this.startTime; + } + + /** + * Get the endTime property: End date/time of training data, which should be + * in ISO 8601 format. + * + * @return the endTime value. + */ + @Generated + public OffsetDateTime getEndTime() { + return this.endTime; + } + + /** + * Get the displayName property: Display name of the model. Maximum length is 24 + * characters. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the model. Maximum length is 24 + * characters. + * + * @param displayName the displayName value to set. + * @return the ModelInfo object itself. + */ + @Generated + public ModelInfo setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the slidingWindow property: Number of previous time stamps that will be used to + * detect whether the time stamp is an anomaly or not. + * + * @return the slidingWindow value. + */ + @Generated + public Integer getSlidingWindow() { + return this.slidingWindow; + } + + /** + * Set the slidingWindow property: Number of previous time stamps that will be used to + * detect whether the time stamp is an anomaly or not. + * + * @param slidingWindow the slidingWindow value to set. + * @return the ModelInfo object itself. + */ + @Generated + public ModelInfo setSlidingWindow(Integer slidingWindow) { + this.slidingWindow = slidingWindow; + return this; + } + + /** + * Get the alignPolicy property: Manner of aligning multiple variables. + * + * @return the alignPolicy value. + */ + @Generated + public AlignPolicy getAlignPolicy() { + return this.alignPolicy; + } + + /** + * Set the alignPolicy property: Manner of aligning multiple variables. + * + * @param alignPolicy the alignPolicy value to set. + * @return the ModelInfo object itself. + */ + @Generated + public ModelInfo setAlignPolicy(AlignPolicy alignPolicy) { + this.alignPolicy = alignPolicy; + return this; + } + + /** + * Get the status property: Model status. + * + * @return the status value. + */ + @Generated + public ModelStatus getStatus() { + return this.status; + } + + /** + * Get the errors property: Error messages after failure to create a model. + * + * @return the errors value. + */ + @Generated + public List getErrors() { + return this.errors; + } + + /** + * Get the diagnosticsInfo property: Diagnostics information to help inspect the states of a model or variable. + * + * @return the diagnosticsInfo value. + */ + @Generated + public DiagnosticsInfo getDiagnosticsInfo() { + return this.diagnosticsInfo; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dataSource", this.dataSource); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeStringField("dataSchema", this.dataSchema == null ? null : this.dataSchema.toString()); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeNumberField("slidingWindow", this.slidingWindow); + jsonWriter.writeJsonField("alignPolicy", this.alignPolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ModelInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ModelInfo if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ModelInfo. + */ + @Generated + public static ModelInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String dataSource = null; + OffsetDateTime startTime = null; + OffsetDateTime endTime = null; + DataSchema dataSchema = null; + String displayName = null; + Integer slidingWindow = null; + AlignPolicy alignPolicy = null; + ModelStatus status = null; + List errors = null; + DiagnosticsInfo diagnosticsInfo = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("dataSource".equals(fieldName)) { + dataSource = reader.getString(); + } else if ("startTime".equals(fieldName)) { + startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("dataSchema".equals(fieldName)) { + dataSchema = DataSchema.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("slidingWindow".equals(fieldName)) { + slidingWindow = reader.getNullable(JsonReader::getInt); + } else if ("alignPolicy".equals(fieldName)) { + alignPolicy = AlignPolicy.fromJson(reader); + } else if ("status".equals(fieldName)) { + status = ModelStatus.fromString(reader.getString()); + } else if ("errors".equals(fieldName)) { + errors = reader.readArray(reader1 -> ErrorResponse.fromJson(reader1)); + } else if ("diagnosticsInfo".equals(fieldName)) { + diagnosticsInfo = DiagnosticsInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + ModelInfo deserializedModelInfo = new ModelInfo(dataSource, startTime, endTime); + deserializedModelInfo.dataSchema = dataSchema; + deserializedModelInfo.displayName = displayName; + deserializedModelInfo.slidingWindow = slidingWindow; + deserializedModelInfo.alignPolicy = alignPolicy; + deserializedModelInfo.status = status; + deserializedModelInfo.errors = errors; + deserializedModelInfo.diagnosticsInfo = diagnosticsInfo; + return deserializedModelInfo; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelState.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelState.java new file mode 100644 index 000000000000..fcd48eb71007 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelState.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model status. + */ +@Immutable +public final class ModelState implements JsonSerializable { + + /* + * Number of passes of the entire training dataset that the + * algorithm has completed. + */ + @Generated + private List epochIds; + + /* + * List of metrics used to assess how the model fits the training data for each + * epoch. + */ + @Generated + private List trainLosses; + + /* + * List of metrics used to assess how the model fits the validation set for each + * epoch. + */ + @Generated + private List validationLosses; + + /* + * Latency for each epoch. + */ + @Generated + private List latenciesInSeconds; + + /** + * Creates an instance of ModelState class. + */ + @Generated + private ModelState() { + } + + /** + * Get the epochIds property: Number of passes of the entire training dataset that the + * algorithm has completed. + * + * @return the epochIds value. + */ + @Generated + public List getEpochIds() { + return this.epochIds; + } + + /** + * Get the trainLosses property: List of metrics used to assess how the model fits the training data for each + * epoch. + * + * @return the trainLosses value. + */ + @Generated + public List getTrainLosses() { + return this.trainLosses; + } + + /** + * Get the validationLosses property: List of metrics used to assess how the model fits the validation set for each + * epoch. + * + * @return the validationLosses value. + */ + @Generated + public List getValidationLosses() { + return this.validationLosses; + } + + /** + * Get the latenciesInSeconds property: Latency for each epoch. + * + * @return the latenciesInSeconds value. + */ + @Generated + public List getLatenciesInSeconds() { + return this.latenciesInSeconds; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("epochIds", this.epochIds, (writer, element) -> writer.writeInt(element)); + jsonWriter.writeArrayField("trainLosses", this.trainLosses, (writer, element) -> writer.writeDouble(element)); + jsonWriter.writeArrayField("validationLosses", this.validationLosses, + (writer, element) -> writer.writeDouble(element)); + jsonWriter.writeArrayField("latenciesInSeconds", this.latenciesInSeconds, + (writer, element) -> writer.writeDouble(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ModelState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ModelState if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the ModelState. + */ + @Generated + public static ModelState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ModelState deserializedModelState = new ModelState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("epochIds".equals(fieldName)) { + List epochIds = reader.readArray(reader1 -> reader1.getInt()); + deserializedModelState.epochIds = epochIds; + } else if ("trainLosses".equals(fieldName)) { + List trainLosses = reader.readArray(reader1 -> reader1.getDouble()); + deserializedModelState.trainLosses = trainLosses; + } else if ("validationLosses".equals(fieldName)) { + List validationLosses = reader.readArray(reader1 -> reader1.getDouble()); + deserializedModelState.validationLosses = validationLosses; + } else if ("latenciesInSeconds".equals(fieldName)) { + List latenciesInSeconds = reader.readArray(reader1 -> reader1.getDouble()); + deserializedModelState.latenciesInSeconds = latenciesInSeconds; + } else { + reader.skipChildren(); + } + } + return deserializedModelState; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelStatus.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelStatus.java new file mode 100644 index 000000000000..3e7446e393d6 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelStatus.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ModelStatus. + */ +public final class ModelStatus extends ExpandableStringEnum { + + /** + * The model has been created. Training has been scheduled but not yet started. + */ + @Generated + public static final ModelStatus CREATED = fromString("CREATED"); + + /** + * The model is being trained. + */ + @Generated + public static final ModelStatus RUNNING = fromString("RUNNING"); + + /** + * The model has been trained and is ready to be used for anomaly detection. + */ + @Generated + public static final ModelStatus READY = fromString("READY"); + + /** + * The model training failed. + */ + @Generated + public static final ModelStatus FAILED = fromString("FAILED"); + + /** + * Creates a new instance of ModelStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ModelStatus() { + } + + /** + * Creates or finds a ModelStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ModelStatus. + */ + @Generated + public static ModelStatus fromString(String name) { + return fromString(name, ModelStatus.class); + } + + /** + * Gets known ModelStatus values. + * + * @return known ModelStatus values. + */ + @Generated + public static Collection values() { + return values(ModelStatus.class); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionOptions.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionOptions.java new file mode 100644 index 000000000000..009a6cbce507 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionOptions.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Detection request for batch inference. This is an asynchronous inference that + * will need another API to get detection results. + */ +@Fluent +public final class MultivariateBatchDetectionOptions implements JsonSerializable { + + /* + * Source link to the input data to indicate an accessible Azure Storage URI. + * It either points to an Azure Blob Storage folder or points to a CSV file in + * Azure Blob Storage, based on your data schema selection. The data schema should + * be exactly the same as those used in the training phase. The input data must + * contain at least slidingWindow entries preceding the start time of the data + * to be detected. + */ + @Generated + private final String dataSource; + + /* + * Number of top contributed variables for one anomalous time stamp in the response. + */ + @Generated + private Integer topContributorCount; + + /* + * Start date/time of data for detection, which should + * be in ISO 8601 format. + */ + @Generated + private final OffsetDateTime startTime; + + /* + * End date/time of data for detection, which should + * be in ISO 8601 format. + */ + @Generated + private final OffsetDateTime endTime; + + /** + * Creates an instance of MultivariateBatchDetectionOptions class. + * + * @param dataSource the dataSource value to set. + * @param startTime the startTime value to set. + * @param endTime the endTime value to set. + */ + @Generated + public MultivariateBatchDetectionOptions(String dataSource, OffsetDateTime startTime, OffsetDateTime endTime) { + this.dataSource = dataSource; + this.startTime = startTime; + this.endTime = endTime; + } + + /** + * Get the dataSource property: Source link to the input data to indicate an accessible Azure Storage URI. + * It either points to an Azure Blob Storage folder or points to a CSV file in + * Azure Blob Storage, based on your data schema selection. The data schema should + * be exactly the same as those used in the training phase. The input data must + * contain at least slidingWindow entries preceding the start time of the data + * to be detected. + * + * @return the dataSource value. + */ + @Generated + public String getDataSource() { + return this.dataSource; + } + + /** + * Get the topContributorCount property: Number of top contributed variables for one anomalous time stamp in the + * response. + * + * @return the topContributorCount value. + */ + @Generated + public Integer getTopContributorCount() { + return this.topContributorCount; + } + + /** + * Set the topContributorCount property: Number of top contributed variables for one anomalous time stamp in the + * response. + * + * @param topContributorCount the topContributorCount value to set. + * @return the MultivariateBatchDetectionOptions object itself. + */ + @Generated + public MultivariateBatchDetectionOptions setTopContributorCount(Integer topContributorCount) { + this.topContributorCount = topContributorCount; + return this; + } + + /** + * Get the startTime property: Start date/time of data for detection, which should + * be in ISO 8601 format. + * + * @return the startTime value. + */ + @Generated + public OffsetDateTime getStartTime() { + return this.startTime; + } + + /** + * Get the endTime property: End date/time of data for detection, which should + * be in ISO 8601 format. + * + * @return the endTime value. + */ + @Generated + public OffsetDateTime getEndTime() { + return this.endTime; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dataSource", this.dataSource); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeNumberField("topContributorCount", this.topContributorCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MultivariateBatchDetectionOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MultivariateBatchDetectionOptions if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MultivariateBatchDetectionOptions. + */ + @Generated + public static MultivariateBatchDetectionOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String dataSource = null; + OffsetDateTime startTime = null; + OffsetDateTime endTime = null; + Integer topContributorCount = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("dataSource".equals(fieldName)) { + dataSource = reader.getString(); + } else if ("startTime".equals(fieldName)) { + startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("topContributorCount".equals(fieldName)) { + topContributorCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + MultivariateBatchDetectionOptions deserializedMultivariateBatchDetectionOptions + = new MultivariateBatchDetectionOptions(dataSource, startTime, endTime); + deserializedMultivariateBatchDetectionOptions.topContributorCount = topContributorCount; + return deserializedMultivariateBatchDetectionOptions; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionResultSummary.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionResultSummary.java new file mode 100644 index 000000000000..e9bbcf71dddf --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionResultSummary.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Multivariate anomaly detection status. + */ +@Immutable +public final class MultivariateBatchDetectionResultSummary + implements JsonSerializable { + + /* + * Status of detection results. + */ + @Generated + private final MultivariateBatchDetectionStatus status; + + /* + * Error message when detection fails. + */ + @Generated + private List errors; + + /* + * Variable status. + */ + @Generated + private List variableStates; + + /* + * Detection request for batch inference. This is an asynchronous inference that + * will need another API to get detection results. + */ + @Generated + private final MultivariateBatchDetectionOptions setupInfo; + + /** + * Creates an instance of MultivariateBatchDetectionResultSummary class. + * + * @param status the status value to set. + * @param setupInfo the setupInfo value to set. + */ + @Generated + private MultivariateBatchDetectionResultSummary(MultivariateBatchDetectionStatus status, + MultivariateBatchDetectionOptions setupInfo) { + this.status = status; + this.setupInfo = setupInfo; + } + + /** + * Get the status property: Status of detection results. + * + * @return the status value. + */ + @Generated + public MultivariateBatchDetectionStatus getStatus() { + return this.status; + } + + /** + * Get the errors property: Error message when detection fails. + * + * @return the errors value. + */ + @Generated + public List getErrors() { + return this.errors; + } + + /** + * Get the variableStates property: Variable status. + * + * @return the variableStates value. + */ + @Generated + public List getVariableStates() { + return this.variableStates; + } + + /** + * Get the setupInfo property: Detection request for batch inference. This is an asynchronous inference that + * will need another API to get detection results. + * + * @return the setupInfo value. + */ + @Generated + public MultivariateBatchDetectionOptions getSetupInfo() { + return this.setupInfo; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeJsonField("setupInfo", this.setupInfo); + jsonWriter.writeArrayField("errors", this.errors, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("variableStates", this.variableStates, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MultivariateBatchDetectionResultSummary from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MultivariateBatchDetectionResultSummary if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MultivariateBatchDetectionResultSummary. + */ + @Generated + public static MultivariateBatchDetectionResultSummary fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MultivariateBatchDetectionStatus status = null; + MultivariateBatchDetectionOptions setupInfo = null; + List errors = null; + List variableStates = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("status".equals(fieldName)) { + status = MultivariateBatchDetectionStatus.fromString(reader.getString()); + } else if ("setupInfo".equals(fieldName)) { + setupInfo = MultivariateBatchDetectionOptions.fromJson(reader); + } else if ("errors".equals(fieldName)) { + errors = reader.readArray(reader1 -> ErrorResponse.fromJson(reader1)); + } else if ("variableStates".equals(fieldName)) { + variableStates = reader.readArray(reader1 -> VariableState.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + MultivariateBatchDetectionResultSummary deserializedMultivariateBatchDetectionResultSummary + = new MultivariateBatchDetectionResultSummary(status, setupInfo); + deserializedMultivariateBatchDetectionResultSummary.errors = errors; + deserializedMultivariateBatchDetectionResultSummary.variableStates = variableStates; + return deserializedMultivariateBatchDetectionResultSummary; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionStatus.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionStatus.java new file mode 100644 index 000000000000..bffa19933777 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateBatchDetectionStatus.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for MultivariateBatchDetectionStatus. + */ +public final class MultivariateBatchDetectionStatus extends ExpandableStringEnum { + + /** + * Static value CREATED for MultivariateBatchDetectionStatus. + */ + @Generated + public static final MultivariateBatchDetectionStatus CREATED = fromString("CREATED"); + + /** + * Static value RUNNING for MultivariateBatchDetectionStatus. + */ + @Generated + public static final MultivariateBatchDetectionStatus RUNNING = fromString("RUNNING"); + + /** + * Static value READY for MultivariateBatchDetectionStatus. + */ + @Generated + public static final MultivariateBatchDetectionStatus READY = fromString("READY"); + + /** + * Static value FAILED for MultivariateBatchDetectionStatus. + */ + @Generated + public static final MultivariateBatchDetectionStatus FAILED = fromString("FAILED"); + + /** + * Creates a new instance of MultivariateBatchDetectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public MultivariateBatchDetectionStatus() { + } + + /** + * Creates or finds a MultivariateBatchDetectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding MultivariateBatchDetectionStatus. + */ + @Generated + public static MultivariateBatchDetectionStatus fromString(String name) { + return fromString(name, MultivariateBatchDetectionStatus.class); + } + + /** + * Gets known MultivariateBatchDetectionStatus values. + * + * @return known MultivariateBatchDetectionStatus values. + */ + @Generated + public static Collection values() { + return values(MultivariateBatchDetectionStatus.class); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateDetectionResult.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateDetectionResult.java new file mode 100644 index 000000000000..5292d8eb9ff3 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateDetectionResult.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Detection results for the resultId value. + */ +@Immutable +public final class MultivariateDetectionResult implements JsonSerializable { + + /* + * Result identifier that's used to fetch the results of an inference call. + */ + @Generated + private String resultId; + + /* + * Multivariate anomaly detection status. + */ + @Generated + private final MultivariateBatchDetectionResultSummary summary; + + /* + * Detection result for each time stamp. + */ + @Generated + private final List results; + + /** + * Creates an instance of MultivariateDetectionResult class. + * + * @param summary the summary value to set. + * @param results the results value to set. + */ + @Generated + private MultivariateDetectionResult(MultivariateBatchDetectionResultSummary summary, List results) { + this.summary = summary; + this.results = results; + } + + /** + * Get the resultId property: Result identifier that's used to fetch the results of an inference call. + * + * @return the resultId value. + */ + @Generated + public String getResultId() { + return this.resultId; + } + + /** + * Get the summary property: Multivariate anomaly detection status. + * + * @return the summary value. + */ + @Generated + public MultivariateBatchDetectionResultSummary getSummary() { + return this.summary; + } + + /** + * Get the results property: Detection result for each time stamp. + * + * @return the results value. + */ + @Generated + public List getResults() { + return this.results; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("summary", this.summary); + jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MultivariateDetectionResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MultivariateDetectionResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MultivariateDetectionResult. + */ + @Generated + public static MultivariateDetectionResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String resultId = null; + MultivariateBatchDetectionResultSummary summary = null; + List results = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("resultId".equals(fieldName)) { + resultId = reader.getString(); + } else if ("summary".equals(fieldName)) { + summary = MultivariateBatchDetectionResultSummary.fromJson(reader); + } else if ("results".equals(fieldName)) { + results = reader.readArray(reader1 -> AnomalyState.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + MultivariateDetectionResult deserializedMultivariateDetectionResult + = new MultivariateDetectionResult(summary, results); + deserializedMultivariateDetectionResult.resultId = resultId; + return deserializedMultivariateDetectionResult; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateLastDetectionOptions.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateLastDetectionOptions.java new file mode 100644 index 000000000000..89071e0651b3 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateLastDetectionOptions.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Request of the last detection. + */ +@Fluent +public final class MultivariateLastDetectionOptions implements JsonSerializable { + + /* + * Contains the inference data, including the name, time stamps (ISO 8601), and + * values of variables. + */ + @Generated + private final List variables; + + /* + * Number of top contributed + * variables for one anomalous time stamp in the response. The default is + * 10. + */ + @Generated + private Integer topContributorCount; + + /** + * Creates an instance of MultivariateLastDetectionOptions class. + * + * @param variables the variables value to set. + */ + @Generated + public MultivariateLastDetectionOptions(List variables) { + this.variables = variables; + } + + /** + * Get the variables property: Contains the inference data, including the name, time stamps (ISO 8601), and + * values of variables. + * + * @return the variables value. + */ + @Generated + public List getVariables() { + return this.variables; + } + + /** + * Get the topContributorCount property: Number of top contributed + * variables for one anomalous time stamp in the response. The default is + * 10. + * + * @return the topContributorCount value. + */ + @Generated + public Integer getTopContributorCount() { + return this.topContributorCount; + } + + /** + * Set the topContributorCount property: Number of top contributed + * variables for one anomalous time stamp in the response. The default is + * 10. + * + * @param topContributorCount the topContributorCount value to set. + * @return the MultivariateLastDetectionOptions object itself. + */ + @Generated + public MultivariateLastDetectionOptions setTopContributorCount(Integer topContributorCount) { + this.topContributorCount = topContributorCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("variables", this.variables, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("topContributorCount", this.topContributorCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MultivariateLastDetectionOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MultivariateLastDetectionOptions if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MultivariateLastDetectionOptions. + */ + @Generated + public static MultivariateLastDetectionOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List variables = null; + Integer topContributorCount = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("variables".equals(fieldName)) { + variables = reader.readArray(reader1 -> VariableValues.fromJson(reader1)); + } else if ("topContributorCount".equals(fieldName)) { + topContributorCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + MultivariateLastDetectionOptions deserializedMultivariateLastDetectionOptions + = new MultivariateLastDetectionOptions(variables); + deserializedMultivariateLastDetectionOptions.topContributorCount = topContributorCount; + return deserializedMultivariateLastDetectionOptions; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateLastDetectionResult.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateLastDetectionResult.java new file mode 100644 index 000000000000..edbfdb80ae3d --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/MultivariateLastDetectionResult.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Results of the last detection. + */ +@Immutable +public final class MultivariateLastDetectionResult implements JsonSerializable { + + /* + * Variable status. + */ + @Generated + private List variableStates; + + /* + * Anomaly status and information. + */ + @Generated + private List results; + + /** + * Creates an instance of MultivariateLastDetectionResult class. + */ + @Generated + private MultivariateLastDetectionResult() { + } + + /** + * Get the variableStates property: Variable status. + * + * @return the variableStates value. + */ + @Generated + public List getVariableStates() { + return this.variableStates; + } + + /** + * Get the results property: Anomaly status and information. + * + * @return the results value. + */ + @Generated + public List getResults() { + return this.results; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("variableStates", this.variableStates, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MultivariateLastDetectionResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MultivariateLastDetectionResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MultivariateLastDetectionResult. + */ + @Generated + public static MultivariateLastDetectionResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MultivariateLastDetectionResult deserializedMultivariateLastDetectionResult + = new MultivariateLastDetectionResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("variableStates".equals(fieldName)) { + List variableStates = reader.readArray(reader1 -> VariableState.fromJson(reader1)); + deserializedMultivariateLastDetectionResult.variableStates = variableStates; + } else if ("results".equals(fieldName)) { + List results = reader.readArray(reader1 -> AnomalyState.fromJson(reader1)); + deserializedMultivariateLastDetectionResult.results = results; + } else { + reader.skipChildren(); + } + } + return deserializedMultivariateLastDetectionResult; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/TimeGranularity.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/TimeGranularity.java new file mode 100644 index 000000000000..d63bbd0eea0a --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/TimeGranularity.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for TimeGranularity. + */ +public final class TimeGranularity extends ExpandableStringEnum { + + /** + * Static value yearly for TimeGranularity. + */ + @Generated + public static final TimeGranularity YEARLY = fromString("yearly"); + + /** + * Static value monthly for TimeGranularity. + */ + @Generated + public static final TimeGranularity MONTHLY = fromString("monthly"); + + /** + * Static value weekly for TimeGranularity. + */ + @Generated + public static final TimeGranularity WEEKLY = fromString("weekly"); + + /** + * Static value daily for TimeGranularity. + */ + @Generated + public static final TimeGranularity DAILY = fromString("daily"); + + /** + * Static value hourly for TimeGranularity. + */ + @Generated + public static final TimeGranularity HOURLY = fromString("hourly"); + + /** + * Static value minutely for TimeGranularity. + */ + @Generated + public static final TimeGranularity PER_MINUTE = fromString("minutely"); + + /** + * Static value secondly for TimeGranularity. + */ + @Generated + public static final TimeGranularity PER_SECOND = fromString("secondly"); + + /** + * Static value microsecond for TimeGranularity. + */ + @Generated + public static final TimeGranularity MICROSECOND = fromString("microsecond"); + + /** + * Static value none for TimeGranularity. + */ + @Generated + public static final TimeGranularity NONE = fromString("none"); + + /** + * Creates a new instance of TimeGranularity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TimeGranularity() { + } + + /** + * Creates or finds a TimeGranularity from its string representation. + * + * @param name a name to look for. + * @return the corresponding TimeGranularity. + */ + @Generated + public static TimeGranularity fromString(String name) { + return fromString(name, TimeGranularity.class); + } + + /** + * Gets known TimeGranularity values. + * + * @return known TimeGranularity values. + */ + @Generated + public static Collection values() { + return values(TimeGranularity.class); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/TimeSeriesPoint.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/TimeSeriesPoint.java new file mode 100644 index 000000000000..5c0e920b704e --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/TimeSeriesPoint.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Definition of input time series points. + */ +@Fluent +public final class TimeSeriesPoint implements JsonSerializable { + + /* + * Argument that indicates the time stamp of a data point (ISO8601 format). + */ + @Generated + private OffsetDateTime timestamp; + + /* + * Measurement of that point. + */ + @Generated + private final double value; + + /** + * Creates an instance of TimeSeriesPoint class. + * + * @param value the value value to set. + */ + @Generated + public TimeSeriesPoint(double value) { + this.value = value; + } + + /** + * Get the timestamp property: Argument that indicates the time stamp of a data point (ISO8601 format). + * + * @return the timestamp value. + */ + @Generated + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: Argument that indicates the time stamp of a data point (ISO8601 format). + * + * @param timestamp the timestamp value to set. + * @return the TimeSeriesPoint object itself. + */ + @Generated + public TimeSeriesPoint setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the value property: Measurement of that point. + * + * @return the value value. + */ + @Generated + public double getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeDoubleField("value", this.value); + jsonWriter.writeStringField("timestamp", + this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TimeSeriesPoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TimeSeriesPoint if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TimeSeriesPoint. + */ + @Generated + public static TimeSeriesPoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + double value = 0.0; + OffsetDateTime timestamp = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("value".equals(fieldName)) { + value = reader.getDouble(); + } else if ("timestamp".equals(fieldName)) { + timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + TimeSeriesPoint deserializedTimeSeriesPoint = new TimeSeriesPoint(value); + deserializedTimeSeriesPoint.timestamp = timestamp; + return deserializedTimeSeriesPoint; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateChangePointDetectionOptions.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateChangePointDetectionOptions.java new file mode 100644 index 000000000000..2cd936626059 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateChangePointDetectionOptions.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Request of change point detection. + */ +@Fluent +public final class UnivariateChangePointDetectionOptions + implements JsonSerializable { + + /* + * Time series data points. Points should be sorted by time stamp in ascending + * order to match the change point detection result. + */ + @Generated + private final List series; + + /* + * Granularity is used to verify whether the input series is valid. + */ + @Generated + private final TimeGranularity granularity; + + /* + * A custom interval is used to set a nonstandard time interval. For example, if the + * series is 5 minutes, the request can be set as {"granularity":"minutely", + * "customInterval":5}. + */ + @Generated + private Integer customInterval; + + /* + * Argument that indicates the periodic value of a time series. If the value is null or + * not present, the API will determine the period automatically. + */ + @Generated + private Integer period; + + /* + * Argument that indicates an advanced model parameter. A default stableTrendWindow value will + * be used in detection. + */ + @Generated + private Integer stableTrendWindow; + + /* + * Argument that indicates an advanced model parameter between 0.0 and 1.0. The lower the + * value is, the larger the trend error is, which means less change point will + * be accepted. + */ + @Generated + private Double threshold; + + /** + * Creates an instance of UnivariateChangePointDetectionOptions class. + * + * @param series the series value to set. + * @param granularity the granularity value to set. + */ + @Generated + public UnivariateChangePointDetectionOptions(List series, TimeGranularity granularity) { + this.series = series; + this.granularity = granularity; + } + + /** + * Get the series property: Time series data points. Points should be sorted by time stamp in ascending + * order to match the change point detection result. + * + * @return the series value. + */ + @Generated + public List getSeries() { + return this.series; + } + + /** + * Get the granularity property: Granularity is used to verify whether the input series is valid. + * + * @return the granularity value. + */ + @Generated + public TimeGranularity getGranularity() { + return this.granularity; + } + + /** + * Get the customInterval property: A custom interval is used to set a nonstandard time interval. For example, if + * the + * series is 5 minutes, the request can be set as {"granularity":"minutely", + * "customInterval":5}. + * + * @return the customInterval value. + */ + @Generated + public Integer getCustomInterval() { + return this.customInterval; + } + + /** + * Set the customInterval property: A custom interval is used to set a nonstandard time interval. For example, if + * the + * series is 5 minutes, the request can be set as {"granularity":"minutely", + * "customInterval":5}. + * + * @param customInterval the customInterval value to set. + * @return the UnivariateChangePointDetectionOptions object itself. + */ + @Generated + public UnivariateChangePointDetectionOptions setCustomInterval(Integer customInterval) { + this.customInterval = customInterval; + return this; + } + + /** + * Get the period property: Argument that indicates the periodic value of a time series. If the value is null or + * not present, the API will determine the period automatically. + * + * @return the period value. + */ + @Generated + public Integer getPeriod() { + return this.period; + } + + /** + * Set the period property: Argument that indicates the periodic value of a time series. If the value is null or + * not present, the API will determine the period automatically. + * + * @param period the period value to set. + * @return the UnivariateChangePointDetectionOptions object itself. + */ + @Generated + public UnivariateChangePointDetectionOptions setPeriod(Integer period) { + this.period = period; + return this; + } + + /** + * Get the stableTrendWindow property: Argument that indicates an advanced model parameter. A default + * stableTrendWindow value will + * be used in detection. + * + * @return the stableTrendWindow value. + */ + @Generated + public Integer getStableTrendWindow() { + return this.stableTrendWindow; + } + + /** + * Set the stableTrendWindow property: Argument that indicates an advanced model parameter. A default + * stableTrendWindow value will + * be used in detection. + * + * @param stableTrendWindow the stableTrendWindow value to set. + * @return the UnivariateChangePointDetectionOptions object itself. + */ + @Generated + public UnivariateChangePointDetectionOptions setStableTrendWindow(Integer stableTrendWindow) { + this.stableTrendWindow = stableTrendWindow; + return this; + } + + /** + * Get the threshold property: Argument that indicates an advanced model parameter between 0.0 and 1.0. The lower + * the + * value is, the larger the trend error is, which means less change point will + * be accepted. + * + * @return the threshold value. + */ + @Generated + public Double getThreshold() { + return this.threshold; + } + + /** + * Set the threshold property: Argument that indicates an advanced model parameter between 0.0 and 1.0. The lower + * the + * value is, the larger the trend error is, which means less change point will + * be accepted. + * + * @param threshold the threshold value to set. + * @return the UnivariateChangePointDetectionOptions object itself. + */ + @Generated + public UnivariateChangePointDetectionOptions setThreshold(Double threshold) { + this.threshold = threshold; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("series", this.series, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("granularity", this.granularity == null ? null : this.granularity.toString()); + jsonWriter.writeNumberField("customInterval", this.customInterval); + jsonWriter.writeNumberField("period", this.period); + jsonWriter.writeNumberField("stableTrendWindow", this.stableTrendWindow); + jsonWriter.writeNumberField("threshold", this.threshold); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UnivariateChangePointDetectionOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UnivariateChangePointDetectionOptions if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UnivariateChangePointDetectionOptions. + */ + @Generated + public static UnivariateChangePointDetectionOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List series = null; + TimeGranularity granularity = null; + Integer customInterval = null; + Integer period = null; + Integer stableTrendWindow = null; + Double threshold = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("series".equals(fieldName)) { + series = reader.readArray(reader1 -> TimeSeriesPoint.fromJson(reader1)); + } else if ("granularity".equals(fieldName)) { + granularity = TimeGranularity.fromString(reader.getString()); + } else if ("customInterval".equals(fieldName)) { + customInterval = reader.getNullable(JsonReader::getInt); + } else if ("period".equals(fieldName)) { + period = reader.getNullable(JsonReader::getInt); + } else if ("stableTrendWindow".equals(fieldName)) { + stableTrendWindow = reader.getNullable(JsonReader::getInt); + } else if ("threshold".equals(fieldName)) { + threshold = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + UnivariateChangePointDetectionOptions deserializedUnivariateChangePointDetectionOptions + = new UnivariateChangePointDetectionOptions(series, granularity); + deserializedUnivariateChangePointDetectionOptions.customInterval = customInterval; + deserializedUnivariateChangePointDetectionOptions.period = period; + deserializedUnivariateChangePointDetectionOptions.stableTrendWindow = stableTrendWindow; + deserializedUnivariateChangePointDetectionOptions.threshold = threshold; + return deserializedUnivariateChangePointDetectionOptions; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateChangePointDetectionResult.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateChangePointDetectionResult.java new file mode 100644 index 000000000000..187d523e4e8a --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateChangePointDetectionResult.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Response of change point detection. + */ +@Immutable +public final class UnivariateChangePointDetectionResult + implements JsonSerializable { + + /* + * Frequency extracted from the series. Zero means no recurrent pattern has been + * found. + */ + @Generated + private Integer period; + + /* + * Change point properties for each input point. True means + * an anomaly (either negative or positive) has been detected. The index of the + * array is consistent with the input series. + */ + @Generated + private List isChangePoint; + + /* + * Change point confidence of each point. + */ + @Generated + private List confidenceScores; + + /** + * Creates an instance of UnivariateChangePointDetectionResult class. + */ + @Generated + private UnivariateChangePointDetectionResult() { + } + + /** + * Get the period property: Frequency extracted from the series. Zero means no recurrent pattern has been + * found. + * + * @return the period value. + */ + @Generated + public Integer getPeriod() { + return this.period; + } + + /** + * Get the isChangePoint property: Change point properties for each input point. True means + * an anomaly (either negative or positive) has been detected. The index of the + * array is consistent with the input series. + * + * @return the isChangePoint value. + */ + @Generated + public List getIsChangePoint() { + return this.isChangePoint; + } + + /** + * Get the confidenceScores property: Change point confidence of each point. + * + * @return the confidenceScores value. + */ + @Generated + public List getConfidenceScores() { + return this.confidenceScores; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("isChangePoint", this.isChangePoint, + (writer, element) -> writer.writeBoolean(element)); + jsonWriter.writeArrayField("confidenceScores", this.confidenceScores, + (writer, element) -> writer.writeDouble(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UnivariateChangePointDetectionResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UnivariateChangePointDetectionResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UnivariateChangePointDetectionResult. + */ + @Generated + public static UnivariateChangePointDetectionResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UnivariateChangePointDetectionResult deserializedUnivariateChangePointDetectionResult + = new UnivariateChangePointDetectionResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("period".equals(fieldName)) { + deserializedUnivariateChangePointDetectionResult.period = reader.getNullable(JsonReader::getInt); + } else if ("isChangePoint".equals(fieldName)) { + List isChangePoint = reader.readArray(reader1 -> reader1.getBoolean()); + deserializedUnivariateChangePointDetectionResult.isChangePoint = isChangePoint; + } else if ("confidenceScores".equals(fieldName)) { + List confidenceScores = reader.readArray(reader1 -> reader1.getDouble()); + deserializedUnivariateChangePointDetectionResult.confidenceScores = confidenceScores; + } else { + reader.skipChildren(); + } + } + return deserializedUnivariateChangePointDetectionResult; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateDetectionOptions.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateDetectionOptions.java new file mode 100644 index 000000000000..29690acb881c --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateDetectionOptions.java @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Request of the entire or last anomaly detection. + */ +@Fluent +public final class UnivariateDetectionOptions implements JsonSerializable { + + /* + * Time series data points. Points should be sorted by time stamp in ascending + * order to match the anomaly detection result. If the data is not sorted + * correctly or there's a duplicated time stamp, the API won't work. In such + * a case, an error message is returned. + */ + @Generated + private final List series; + + /* + * Argument that indicates time granularity. If granularity is not present, the value + * is none by default. If granularity is none, the time stamp property in the time + * series point can be absent. + */ + @Generated + private TimeGranularity granularity; + + /* + * A custom interval is used to set a nonstandard time interval. For example, if the + * series is 5 minutes, the request can be set as {"granularity":"minutely", + * "customInterval":5}. + */ + @Generated + private Integer customInterval; + + /* + * Argument that indicates the periodic value of a time series. If the value is null or + * is not present, the API determines the period automatically. + */ + @Generated + private Integer period; + + /* + * Argument that indicates an advanced model parameter. It's the maximum anomaly ratio in a time series. + */ + @Generated + private Double maxAnomalyRatio; + + /* + * Argument that indicates an advanced model parameter between 0 and 99. The lower the value + * is, the larger the margin value is, which means fewer anomalies will be + * accepted. + */ + @Generated + private Integer sensitivity; + + /* + * Specifies how to deal with missing values in the input series. It's used + * when granularity is not "none". + */ + @Generated + private ImputeMode imputeMode; + + /* + * Specifies the value to fill. It's used when granularity is not "none" + * and imputeMode is "fixed". + */ + @Generated + private Double imputeFixedValue; + + /** + * Creates an instance of UnivariateDetectionOptions class. + * + * @param series the series value to set. + */ + @Generated + public UnivariateDetectionOptions(List series) { + this.series = series; + } + + /** + * Get the series property: Time series data points. Points should be sorted by time stamp in ascending + * order to match the anomaly detection result. If the data is not sorted + * correctly or there's a duplicated time stamp, the API won't work. In such + * a case, an error message is returned. + * + * @return the series value. + */ + @Generated + public List getSeries() { + return this.series; + } + + /** + * Get the granularity property: Argument that indicates time granularity. If granularity is not present, the value + * is none by default. If granularity is none, the time stamp property in the time + * series point can be absent. + * + * @return the granularity value. + */ + @Generated + public TimeGranularity getGranularity() { + return this.granularity; + } + + /** + * Set the granularity property: Argument that indicates time granularity. If granularity is not present, the value + * is none by default. If granularity is none, the time stamp property in the time + * series point can be absent. + * + * @param granularity the granularity value to set. + * @return the UnivariateDetectionOptions object itself. + */ + @Generated + public UnivariateDetectionOptions setGranularity(TimeGranularity granularity) { + this.granularity = granularity; + return this; + } + + /** + * Get the customInterval property: A custom interval is used to set a nonstandard time interval. For example, if + * the + * series is 5 minutes, the request can be set as {"granularity":"minutely", + * "customInterval":5}. + * + * @return the customInterval value. + */ + @Generated + public Integer getCustomInterval() { + return this.customInterval; + } + + /** + * Set the customInterval property: A custom interval is used to set a nonstandard time interval. For example, if + * the + * series is 5 minutes, the request can be set as {"granularity":"minutely", + * "customInterval":5}. + * + * @param customInterval the customInterval value to set. + * @return the UnivariateDetectionOptions object itself. + */ + @Generated + public UnivariateDetectionOptions setCustomInterval(Integer customInterval) { + this.customInterval = customInterval; + return this; + } + + /** + * Get the period property: Argument that indicates the periodic value of a time series. If the value is null or + * is not present, the API determines the period automatically. + * + * @return the period value. + */ + @Generated + public Integer getPeriod() { + return this.period; + } + + /** + * Set the period property: Argument that indicates the periodic value of a time series. If the value is null or + * is not present, the API determines the period automatically. + * + * @param period the period value to set. + * @return the UnivariateDetectionOptions object itself. + */ + @Generated + public UnivariateDetectionOptions setPeriod(Integer period) { + this.period = period; + return this; + } + + /** + * Get the maxAnomalyRatio property: Argument that indicates an advanced model parameter. It's the maximum anomaly + * ratio in a time series. + * + * @return the maxAnomalyRatio value. + */ + @Generated + public Double getMaxAnomalyRatio() { + return this.maxAnomalyRatio; + } + + /** + * Set the maxAnomalyRatio property: Argument that indicates an advanced model parameter. It's the maximum anomaly + * ratio in a time series. + * + * @param maxAnomalyRatio the maxAnomalyRatio value to set. + * @return the UnivariateDetectionOptions object itself. + */ + @Generated + public UnivariateDetectionOptions setMaxAnomalyRatio(Double maxAnomalyRatio) { + this.maxAnomalyRatio = maxAnomalyRatio; + return this; + } + + /** + * Get the sensitivity property: Argument that indicates an advanced model parameter between 0 and 99. The lower the + * value + * is, the larger the margin value is, which means fewer anomalies will be + * accepted. + * + * @return the sensitivity value. + */ + @Generated + public Integer getSensitivity() { + return this.sensitivity; + } + + /** + * Set the sensitivity property: Argument that indicates an advanced model parameter between 0 and 99. The lower the + * value + * is, the larger the margin value is, which means fewer anomalies will be + * accepted. + * + * @param sensitivity the sensitivity value to set. + * @return the UnivariateDetectionOptions object itself. + */ + @Generated + public UnivariateDetectionOptions setSensitivity(Integer sensitivity) { + this.sensitivity = sensitivity; + return this; + } + + /** + * Get the imputeMode property: Specifies how to deal with missing values in the input series. It's used + * when granularity is not "none". + * + * @return the imputeMode value. + */ + @Generated + public ImputeMode getImputeMode() { + return this.imputeMode; + } + + /** + * Set the imputeMode property: Specifies how to deal with missing values in the input series. It's used + * when granularity is not "none". + * + * @param imputeMode the imputeMode value to set. + * @return the UnivariateDetectionOptions object itself. + */ + @Generated + public UnivariateDetectionOptions setImputeMode(ImputeMode imputeMode) { + this.imputeMode = imputeMode; + return this; + } + + /** + * Get the imputeFixedValue property: Specifies the value to fill. It's used when granularity is not "none" + * and imputeMode is "fixed". + * + * @return the imputeFixedValue value. + */ + @Generated + public Double getImputeFixedValue() { + return this.imputeFixedValue; + } + + /** + * Set the imputeFixedValue property: Specifies the value to fill. It's used when granularity is not "none" + * and imputeMode is "fixed". + * + * @param imputeFixedValue the imputeFixedValue value to set. + * @return the UnivariateDetectionOptions object itself. + */ + @Generated + public UnivariateDetectionOptions setImputeFixedValue(Double imputeFixedValue) { + this.imputeFixedValue = imputeFixedValue; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("series", this.series, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("granularity", this.granularity == null ? null : this.granularity.toString()); + jsonWriter.writeNumberField("customInterval", this.customInterval); + jsonWriter.writeNumberField("period", this.period); + jsonWriter.writeNumberField("maxAnomalyRatio", this.maxAnomalyRatio); + jsonWriter.writeNumberField("sensitivity", this.sensitivity); + jsonWriter.writeStringField("imputeMode", this.imputeMode == null ? null : this.imputeMode.toString()); + jsonWriter.writeNumberField("imputeFixedValue", this.imputeFixedValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UnivariateDetectionOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UnivariateDetectionOptions if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UnivariateDetectionOptions. + */ + @Generated + public static UnivariateDetectionOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List series = null; + TimeGranularity granularity = null; + Integer customInterval = null; + Integer period = null; + Double maxAnomalyRatio = null; + Integer sensitivity = null; + ImputeMode imputeMode = null; + Double imputeFixedValue = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("series".equals(fieldName)) { + series = reader.readArray(reader1 -> TimeSeriesPoint.fromJson(reader1)); + } else if ("granularity".equals(fieldName)) { + granularity = TimeGranularity.fromString(reader.getString()); + } else if ("customInterval".equals(fieldName)) { + customInterval = reader.getNullable(JsonReader::getInt); + } else if ("period".equals(fieldName)) { + period = reader.getNullable(JsonReader::getInt); + } else if ("maxAnomalyRatio".equals(fieldName)) { + maxAnomalyRatio = reader.getNullable(JsonReader::getDouble); + } else if ("sensitivity".equals(fieldName)) { + sensitivity = reader.getNullable(JsonReader::getInt); + } else if ("imputeMode".equals(fieldName)) { + imputeMode = ImputeMode.fromString(reader.getString()); + } else if ("imputeFixedValue".equals(fieldName)) { + imputeFixedValue = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + UnivariateDetectionOptions deserializedUnivariateDetectionOptions = new UnivariateDetectionOptions(series); + deserializedUnivariateDetectionOptions.granularity = granularity; + deserializedUnivariateDetectionOptions.customInterval = customInterval; + deserializedUnivariateDetectionOptions.period = period; + deserializedUnivariateDetectionOptions.maxAnomalyRatio = maxAnomalyRatio; + deserializedUnivariateDetectionOptions.sensitivity = sensitivity; + deserializedUnivariateDetectionOptions.imputeMode = imputeMode; + deserializedUnivariateDetectionOptions.imputeFixedValue = imputeFixedValue; + return deserializedUnivariateDetectionOptions; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateEntireDetectionResult.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateEntireDetectionResult.java new file mode 100644 index 000000000000..c6039e3d44bd --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateEntireDetectionResult.java @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The response of entire anomaly detection. */ +@Immutable +public final class UnivariateEntireDetectionResult implements JsonSerializable { + /* + * Frequency extracted from the series, zero means no recurrent pattern has been found. + */ + private final int period; + + /* + * ExpectedValues contain expected value for each input point. The index of the array is consistent with the input + * series. + */ + private final List expectedValues; + + /* + * UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which + * equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary + * and lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in client side. The + * index of the array is consistent with the input series. + */ + private final List upperMargins; + + /* + * LowerMargins contain lower margin of each input point. LowerMargin is used to + * calculate lowerBoundary, which equals to expectedValue - (100 - + * marginScale)*lowerMargin. Points between the boundary can be marked as normal + * ones in client side. The index of the array is consistent with the input + * series. + */ + private final List lowerMargins; + + /* + * IsAnomaly contains anomaly properties for each input point. True means an + * anomaly either negative or positive has been detected. The index of the array + * is consistent with the input series. + */ + private final List isAnomaly; + + /* + * IsNegativeAnomaly contains anomaly status in negative direction for each input + * point. True means a negative anomaly has been detected. A negative anomaly + * means the point is detected as an anomaly and its real value is smaller than + * the expected one. The index of the array is consistent with the input series. + */ + private final List isNegativeAnomaly; + + /* + * IsPositiveAnomaly contain anomaly status in positive direction for each input + * point. True means a positive anomaly has been detected. A positive anomaly + * means the point is detected as an anomaly and its real value is larger than the + * expected one. The index of the array is consistent with the input series. + */ + private final List isPositiveAnomaly; + + /* + * The severity score for each input point. The larger the value is, the more + * sever the anomaly is. For normal points, the "severity" is always 0. + */ + private List severity; + + /** + * Creates an instance of UnivariateEntireDetectionResult class. + * + * @param period the period value to set. + * @param expectedValues the expectedValues value to set. + * @param upperMargins the upperMargins value to set. + * @param lowerMargins the lowerMargins value to set. + * @param isAnomaly the isAnomaly value to set. + * @param isNegativeAnomaly the isNegativeAnomaly value to set. + * @param isPositiveAnomaly the isPositiveAnomaly value to set. + */ + private UnivariateEntireDetectionResult(int period, List expectedValues, List upperMargins, + List lowerMargins, List isAnomaly, List isNegativeAnomaly, + List isPositiveAnomaly) { + this.period = period; + this.expectedValues = expectedValues; + this.upperMargins = upperMargins; + this.lowerMargins = lowerMargins; + this.isAnomaly = isAnomaly; + this.isNegativeAnomaly = isNegativeAnomaly; + this.isPositiveAnomaly = isPositiveAnomaly; + } + + /** + * Get the period property: Frequency extracted from the series, zero means no recurrent pattern has been found. + * + * @return the period value. + */ + public int getPeriod() { + return this.period; + } + + /** + * Get the expectedValues property: ExpectedValues contain expected value for each input point. The index of the + * array is consistent with the input series. + * + * @return the expectedValues value. + */ + public List getExpectedValues() { + return this.expectedValues; + } + + /** + * Get the upperMargins property: UpperMargins contain upper margin of each input point. UpperMargin is used to + * calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response + * can be filtered by upperBoundary and lowerBoundary. By adjusting marginScale value, less significant anomalies + * can be filtered in client side. The index of the array is consistent with the input series. + * + * @return the upperMargins value. + */ + public List getUpperMargins() { + return this.upperMargins; + } + + /** + * Get the lowerMargins property: LowerMargins contain lower margin of each input point. LowerMargin is used to + * calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. Points between the + * boundary can be marked as normal ones in client side. The index of the array is consistent with the input series. + * + * @return the lowerMargins value. + */ + public List getLowerMargins() { + return this.lowerMargins; + } + + /** + * Get the isAnomaly property: IsAnomaly contains anomaly properties for each input point. True means an anomaly + * either negative or positive has been detected. The index of the array is consistent with the input series. + * + * @return the isAnomaly value. + */ + public List getIsAnomaly() { + return this.isAnomaly; + } + + /** + * Get the isNegativeAnomaly property: IsNegativeAnomaly contains anomaly status in negative direction for each + * input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as + * an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the + * input series. + * + * @return the isNegativeAnomaly value. + */ + public List getIsNegativeAnomaly() { + return this.isNegativeAnomaly; + } + + /** + * Get the isPositiveAnomaly property: IsPositiveAnomaly contain anomaly status in positive direction for each input + * point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an + * anomaly and its real value is larger than the expected one. The index of the array is consistent with the input + * series. + * + * @return the isPositiveAnomaly value. + */ + public List getIsPositiveAnomaly() { + return this.isPositiveAnomaly; + } + + /** + * Get the severity property: The severity score for each input point. The larger the value is, the more sever the + * anomaly is. For normal points, the "severity" is always 0. + * + * @return the severity value. + */ + public List getSeverity() { + return this.severity; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeIntField("period", period) + .writeArrayField("expectedValues", expectedValues, JsonWriter::writeNumber) + .writeArrayField("upperMargins", upperMargins, JsonWriter::writeNumber) + .writeArrayField("lowerMargins", lowerMargins, JsonWriter::writeNumber) + .writeArrayField("isAnomaly", isAnomaly, JsonWriter::writeBoolean) + .writeArrayField("isNegativeAnomaly", isNegativeAnomaly, JsonWriter::writeBoolean) + .writeArrayField("isPositiveAnomaly", isPositiveAnomaly, JsonWriter::writeBoolean) + .writeArrayField("severity", severity, JsonWriter::writeNumber) + .writeEndObject(); + } + + /** + * Reads an instance of UnivariateEntireDetectionResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UnivariateEntireDetectionResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UnivariateEntireDetectionResult. + */ + public static UnivariateEntireDetectionResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + int period = 0; + List expectedValues = null; + List upperMargins = null; + List lowerMargins = null; + List isAnomaly = null; + List isNegativeAnomaly = null; + List isPositiveAnomaly = null; + List severity = null; + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("period".equals(fieldName)) { + period = reader.getInt(); + } else if ("expectedValues".equals(fieldName)) { + expectedValues = reader.readArray(JsonReader::getDouble); + } else if ("upperMargins".equals(fieldName)) { + upperMargins = reader.readArray(JsonReader::getDouble); + } else if ("lowerMargins".equals(fieldName)) { + lowerMargins = reader.readArray(JsonReader::getDouble); + } else if ("isAnomaly".equals(fieldName)) { + isAnomaly = reader.readArray(JsonReader::getBoolean); + } else if ("isNegativeAnomaly".equals(fieldName)) { + isNegativeAnomaly = reader.readArray(JsonReader::getBoolean); + } else if ("isPositiveAnomaly".equals(fieldName)) { + isPositiveAnomaly = reader.readArray(JsonReader::getBoolean); + } else if ("severity".equals(fieldName)) { + severity = reader.readArray(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + UnivariateEntireDetectionResult result = new UnivariateEntireDetectionResult(period, expectedValues, + upperMargins, lowerMargins, isAnomaly, isNegativeAnomaly, isPositiveAnomaly); + result.severity = severity; + return result; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateLastDetectionResult.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateLastDetectionResult.java new file mode 100644 index 000000000000..e9664f8049ca --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/UnivariateLastDetectionResult.java @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Response of the last anomaly detection. + */ +@Immutable +public final class UnivariateLastDetectionResult implements JsonSerializable { + + /* + * Frequency extracted from the series. Zero means no recurrent pattern has been + * found. + */ + @Generated + private final int period; + + /* + * Suggested input series points needed for detecting the latest point. + */ + @Generated + private final int suggestedWindow; + + /* + * Expected value of the latest point. + */ + @Generated + private final double expectedValue; + + /* + * Upper margin of the latest point. UpperMargin is used to calculate + * upperBoundary, which is equal to expectedValue + (100 - marginScale)*upperMargin. + * If the value of latest point is between upperBoundary and lowerBoundary, it + * should be treated as a normal value. Adjusting the marginScale value enables the anomaly + * status of the latest point to be changed. + */ + @Generated + private final double upperMargin; + + /* + * Lower margin of the latest point. LowerMargin is used to calculate + * lowerBoundary, which is equal to expectedValue - (100 - marginScale)*lowerMargin. + */ + @Generated + private final double lowerMargin; + + /* + * Anomaly status of the latest point. True means the latest point is an anomaly, + * either in the negative direction or in the positive direction. + */ + @Generated + private final boolean isAnomaly; + + /* + * Anomaly status of the latest point in a negative direction. True means the latest + * point is an anomaly and its real value is smaller than the expected one. + */ + @Generated + private final boolean isNegativeAnomaly; + + /* + * Anomaly status of the latest point in a positive direction. True means the latest + * point is an anomaly and its real value is larger than the expected one. + */ + @Generated + private final boolean isPositiveAnomaly; + + /* + * Severity score for the last input point. The larger the value is, the more + * severe the anomaly is. For normal points, the severity is always 0. + */ + @Generated + private Double severity; + + /** + * Creates an instance of UnivariateLastDetectionResult class. + * + * @param period the period value to set. + * @param suggestedWindow the suggestedWindow value to set. + * @param expectedValue the expectedValue value to set. + * @param upperMargin the upperMargin value to set. + * @param lowerMargin the lowerMargin value to set. + * @param isAnomaly the isAnomaly value to set. + * @param isNegativeAnomaly the isNegativeAnomaly value to set. + * @param isPositiveAnomaly the isPositiveAnomaly value to set. + */ + @Generated + private UnivariateLastDetectionResult(int period, int suggestedWindow, double expectedValue, double upperMargin, + double lowerMargin, boolean isAnomaly, boolean isNegativeAnomaly, boolean isPositiveAnomaly) { + this.period = period; + this.suggestedWindow = suggestedWindow; + this.expectedValue = expectedValue; + this.upperMargin = upperMargin; + this.lowerMargin = lowerMargin; + this.isAnomaly = isAnomaly; + this.isNegativeAnomaly = isNegativeAnomaly; + this.isPositiveAnomaly = isPositiveAnomaly; + } + + /** + * Get the period property: Frequency extracted from the series. Zero means no recurrent pattern has been + * found. + * + * @return the period value. + */ + @Generated + public int getPeriod() { + return this.period; + } + + /** + * Get the suggestedWindow property: Suggested input series points needed for detecting the latest point. + * + * @return the suggestedWindow value. + */ + @Generated + public int getSuggestedWindow() { + return this.suggestedWindow; + } + + /** + * Get the expectedValue property: Expected value of the latest point. + * + * @return the expectedValue value. + */ + @Generated + public double getExpectedValue() { + return this.expectedValue; + } + + /** + * Get the upperMargin property: Upper margin of the latest point. UpperMargin is used to calculate + * upperBoundary, which is equal to expectedValue + (100 - marginScale)*upperMargin. + * If the value of latest point is between upperBoundary and lowerBoundary, it + * should be treated as a normal value. Adjusting the marginScale value enables the anomaly + * status of the latest point to be changed. + * + * @return the upperMargin value. + */ + @Generated + public double getUpperMargin() { + return this.upperMargin; + } + + /** + * Get the lowerMargin property: Lower margin of the latest point. LowerMargin is used to calculate + * lowerBoundary, which is equal to expectedValue - (100 - marginScale)*lowerMargin. + * + * @return the lowerMargin value. + */ + @Generated + public double getLowerMargin() { + return this.lowerMargin; + } + + /** + * Get the isAnomaly property: Anomaly status of the latest point. True means the latest point is an anomaly, + * either in the negative direction or in the positive direction. + * + * @return the isAnomaly value. + */ + @Generated + public boolean isAnomaly() { + return this.isAnomaly; + } + + /** + * Get the isNegativeAnomaly property: Anomaly status of the latest point in a negative direction. True means the + * latest + * point is an anomaly and its real value is smaller than the expected one. + * + * @return the isNegativeAnomaly value. + */ + @Generated + public boolean isNegativeAnomaly() { + return this.isNegativeAnomaly; + } + + /** + * Get the isPositiveAnomaly property: Anomaly status of the latest point in a positive direction. True means the + * latest + * point is an anomaly and its real value is larger than the expected one. + * + * @return the isPositiveAnomaly value. + */ + @Generated + public boolean isPositiveAnomaly() { + return this.isPositiveAnomaly; + } + + /** + * Get the severity property: Severity score for the last input point. The larger the value is, the more + * severe the anomaly is. For normal points, the severity is always 0. + * + * @return the severity value. + */ + @Generated + public Double getSeverity() { + return this.severity; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("period", this.period); + jsonWriter.writeIntField("suggestedWindow", this.suggestedWindow); + jsonWriter.writeDoubleField("expectedValue", this.expectedValue); + jsonWriter.writeDoubleField("upperMargin", this.upperMargin); + jsonWriter.writeDoubleField("lowerMargin", this.lowerMargin); + jsonWriter.writeBooleanField("isAnomaly", this.isAnomaly); + jsonWriter.writeBooleanField("isNegativeAnomaly", this.isNegativeAnomaly); + jsonWriter.writeBooleanField("isPositiveAnomaly", this.isPositiveAnomaly); + jsonWriter.writeNumberField("severity", this.severity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UnivariateLastDetectionResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UnivariateLastDetectionResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UnivariateLastDetectionResult. + */ + @Generated + public static UnivariateLastDetectionResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + int period = 0; + int suggestedWindow = 0; + double expectedValue = 0.0; + double upperMargin = 0.0; + double lowerMargin = 0.0; + boolean isAnomaly = false; + boolean isNegativeAnomaly = false; + boolean isPositiveAnomaly = false; + Double severity = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("period".equals(fieldName)) { + period = reader.getInt(); + } else if ("suggestedWindow".equals(fieldName)) { + suggestedWindow = reader.getInt(); + } else if ("expectedValue".equals(fieldName)) { + expectedValue = reader.getDouble(); + } else if ("upperMargin".equals(fieldName)) { + upperMargin = reader.getDouble(); + } else if ("lowerMargin".equals(fieldName)) { + lowerMargin = reader.getDouble(); + } else if ("isAnomaly".equals(fieldName)) { + isAnomaly = reader.getBoolean(); + } else if ("isNegativeAnomaly".equals(fieldName)) { + isNegativeAnomaly = reader.getBoolean(); + } else if ("isPositiveAnomaly".equals(fieldName)) { + isPositiveAnomaly = reader.getBoolean(); + } else if ("severity".equals(fieldName)) { + severity = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + UnivariateLastDetectionResult deserializedUnivariateLastDetectionResult + = new UnivariateLastDetectionResult(period, suggestedWindow, expectedValue, upperMargin, lowerMargin, + isAnomaly, isNegativeAnomaly, isPositiveAnomaly); + deserializedUnivariateLastDetectionResult.severity = severity; + return deserializedUnivariateLastDetectionResult; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/VariableState.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/VariableState.java new file mode 100644 index 000000000000..da114134b877 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/VariableState.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Variable status. + */ +@Immutable +public final class VariableState implements JsonSerializable { + + /* + * Variable name in variable states. + */ + @Generated + private String variable; + + /* + * Proportion of missing values that need to be filled by fillNAMethod. + */ + @Generated + private Double filledNARatio; + + /* + * Number of effective data points before fillNAMethod is applied. + */ + @Generated + private Integer effectiveCount; + + /* + * First valid time stamp with a value of input data. + */ + @Generated + private OffsetDateTime firstTimestamp; + + /* + * Last valid time stamp with a value of input data. + */ + @Generated + private OffsetDateTime lastTimestamp; + + /** + * Creates an instance of VariableState class. + */ + @Generated + private VariableState() { + } + + /** + * Get the variable property: Variable name in variable states. + * + * @return the variable value. + */ + @Generated + public String getVariable() { + return this.variable; + } + + /** + * Get the filledNARatio property: Proportion of missing values that need to be filled by fillNAMethod. + * + * @return the filledNARatio value. + */ + @Generated + public Double getFilledNARatio() { + return this.filledNARatio; + } + + /** + * Get the effectiveCount property: Number of effective data points before fillNAMethod is applied. + * + * @return the effectiveCount value. + */ + @Generated + public Integer getEffectiveCount() { + return this.effectiveCount; + } + + /** + * Get the firstTimestamp property: First valid time stamp with a value of input data. + * + * @return the firstTimestamp value. + */ + @Generated + public OffsetDateTime getFirstTimestamp() { + return this.firstTimestamp; + } + + /** + * Get the lastTimestamp property: Last valid time stamp with a value of input data. + * + * @return the lastTimestamp value. + */ + @Generated + public OffsetDateTime getLastTimestamp() { + return this.lastTimestamp; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("variable", this.variable); + jsonWriter.writeNumberField("filledNARatio", this.filledNARatio); + jsonWriter.writeNumberField("effectiveCount", this.effectiveCount); + jsonWriter.writeStringField("firstTimestamp", + this.firstTimestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstTimestamp)); + jsonWriter.writeStringField("lastTimestamp", + this.lastTimestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastTimestamp)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VariableState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VariableState if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VariableState. + */ + @Generated + public static VariableState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VariableState deserializedVariableState = new VariableState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("variable".equals(fieldName)) { + deserializedVariableState.variable = reader.getString(); + } else if ("filledNARatio".equals(fieldName)) { + deserializedVariableState.filledNARatio = reader.getNullable(JsonReader::getDouble); + } else if ("effectiveCount".equals(fieldName)) { + deserializedVariableState.effectiveCount = reader.getNullable(JsonReader::getInt); + } else if ("firstTimestamp".equals(fieldName)) { + deserializedVariableState.firstTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastTimestamp".equals(fieldName)) { + deserializedVariableState.lastTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + return deserializedVariableState; + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/VariableValues.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/VariableValues.java new file mode 100644 index 000000000000..eb3df14fa267 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/VariableValues.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.anomalydetector.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Variable values. + */ +@Immutable +public final class VariableValues implements JsonSerializable { + + /* + * Variable name of the last detection request. + */ + @Generated + private final String variable; + + /* + * Time stamps of the last detection request. + */ + @Generated + private final List timestamps; + + /* + * Values of variables. + */ + @Generated + private final List values; + + /** + * Creates an instance of VariableValues class. + * + * @param variable the variable value to set. + * @param timestamps the timestamps value to set. + * @param values the values value to set. + */ + @Generated + public VariableValues(String variable, List timestamps, List values) { + this.variable = variable; + this.timestamps = timestamps; + this.values = values; + } + + /** + * Get the variable property: Variable name of the last detection request. + * + * @return the variable value. + */ + @Generated + public String getVariable() { + return this.variable; + } + + /** + * Get the timestamps property: Time stamps of the last detection request. + * + * @return the timestamps value. + */ + @Generated + public List getTimestamps() { + return this.timestamps; + } + + /** + * Get the values property: Values of variables. + * + * @return the values value. + */ + @Generated + public List getValues() { + return this.values; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("variable", this.variable); + jsonWriter.writeArrayField("timestamps", this.timestamps, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeDouble(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VariableValues from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VariableValues if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VariableValues. + */ + @Generated + public static VariableValues fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String variable = null; + List timestamps = null; + List values = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("variable".equals(fieldName)) { + variable = reader.getString(); + } else if ("timestamps".equals(fieldName)) { + timestamps = reader.readArray(reader1 -> reader1.getString()); + } else if ("values".equals(fieldName)) { + values = reader.readArray(reader1 -> reader1.getDouble()); + } else { + reader.skipChildren(); + } + } + return new VariableValues(variable, timestamps, values); + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/package-info.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/package-info.java new file mode 100644 index 000000000000..647bd9a1de1c --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/package-info.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the data models for AnomalyDetector. + * The Anomaly Detector API detects anomalies automatically in time series data. + * It supports both a stateless detection mode and a + * stateful detection mode. In stateless mode, there are three functionalities. Entire + * Detect is for detecting the whole series, with the model trained by the time series. + * Last Detect is for detecting the last point, with the model trained by points before. + * ChangePoint Detect is for detecting trend changes in the time series. In stateful + * mode, the user can store time series. The stored time series will be used for + * detection anomalies. In this mode, the user can still use the preceding three + * functionalities by only giving a time range without preparing time series on the + * client side. Besides the preceding three functionalities, the stateful model + * provides group-based detection and labeling services. By using the labeling + * service, the user can provide labels for each detection result. These labels will be + * used for retuning or regenerating detection models. Inconsistency detection is + * a kind of group-based detection that finds inconsistencies in + * a set of time series. By using the anomaly detector service, business customers can + * discover incidents and establish a logic flow for root cause analysis. + * + */ +package com.azure.ai.anomalydetector.models; diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/package-info.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/package-info.java new file mode 100644 index 000000000000..b233df6a7ade --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/package-info.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +/** + * Package containing the classes for AnomalyDetector. The Anomaly Detector API detects anomalies automatically in time + * series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless + * mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time + * series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting + * trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for + * detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range + * without preparing time series in client side. Besides the above three functionalities, stateful model also provide + * group based detection and labeling service. By leveraging labeling service user can provide labels for each detection + * result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of + * group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector + * service, business customers can discover incidents and establish a logic flow for root cause analysis. + */ +package com.azure.ai.anomalydetector; diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/module-info.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/module-info.java new file mode 100644 index 000000000000..2dd258e99df1 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +module com.azure.ai.anomalydetector { + requires transitive com.azure.core; + + exports com.azure.ai.anomalydetector; + exports com.azure.ai.anomalydetector.models; + + opens com.azure.ai.anomalydetector.models to com.azure.core; +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/META-INF/azure-ai-anomalydetector_apiview_properties.json b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/META-INF/azure-ai-anomalydetector_apiview_properties.json new file mode 100644 index 000000000000..850cd78129c9 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/META-INF/azure-ai-anomalydetector_apiview_properties.json @@ -0,0 +1,73 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder": "AnomalyDetector", + "com.azure.ai.anomalydetector.MultivariateAsyncClient": "AnomalyDetector.Multivariate", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.deleteMultivariateModel": "AnomalyDetector.Multivariate.deleteMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.deleteMultivariateModelWithResponse": "AnomalyDetector.Multivariate.deleteMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.detectMultivariateBatchAnomaly": "AnomalyDetector.Multivariate.detectMultivariateBatchAnomaly", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.detectMultivariateBatchAnomalyWithResponse": "AnomalyDetector.Multivariate.detectMultivariateBatchAnomaly", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.detectMultivariateLastAnomaly": "AnomalyDetector.Multivariate.detectMultivariateLastAnomaly", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.detectMultivariateLastAnomalyWithResponse": "AnomalyDetector.Multivariate.detectMultivariateLastAnomaly", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.getMultivariateBatchDetectionResult": "AnomalyDetector.Multivariate.getMultivariateBatchDetectionResult", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.getMultivariateBatchDetectionResultWithResponse": "AnomalyDetector.Multivariate.getMultivariateBatchDetectionResult", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.getMultivariateModel": "AnomalyDetector.Multivariate.getMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.getMultivariateModelWithResponse": "AnomalyDetector.Multivariate.getMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.listMultivariateModels": "AnomalyDetector.Multivariate.listMultivariateModels", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.trainMultivariateModel": "AnomalyDetector.Multivariate.trainMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateAsyncClient.trainMultivariateModelWithResponse": "AnomalyDetector.Multivariate.trainMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateClient": "AnomalyDetector.Multivariate", + "com.azure.ai.anomalydetector.MultivariateClient.deleteMultivariateModel": "AnomalyDetector.Multivariate.deleteMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateClient.deleteMultivariateModelWithResponse": "AnomalyDetector.Multivariate.deleteMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateClient.detectMultivariateBatchAnomaly": "AnomalyDetector.Multivariate.detectMultivariateBatchAnomaly", + "com.azure.ai.anomalydetector.MultivariateClient.detectMultivariateBatchAnomalyWithResponse": "AnomalyDetector.Multivariate.detectMultivariateBatchAnomaly", + "com.azure.ai.anomalydetector.MultivariateClient.detectMultivariateLastAnomaly": "AnomalyDetector.Multivariate.detectMultivariateLastAnomaly", + "com.azure.ai.anomalydetector.MultivariateClient.detectMultivariateLastAnomalyWithResponse": "AnomalyDetector.Multivariate.detectMultivariateLastAnomaly", + "com.azure.ai.anomalydetector.MultivariateClient.getMultivariateBatchDetectionResult": "AnomalyDetector.Multivariate.getMultivariateBatchDetectionResult", + "com.azure.ai.anomalydetector.MultivariateClient.getMultivariateBatchDetectionResultWithResponse": "AnomalyDetector.Multivariate.getMultivariateBatchDetectionResult", + "com.azure.ai.anomalydetector.MultivariateClient.getMultivariateModel": "AnomalyDetector.Multivariate.getMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateClient.getMultivariateModelWithResponse": "AnomalyDetector.Multivariate.getMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateClient.listMultivariateModels": "AnomalyDetector.Multivariate.listMultivariateModels", + "com.azure.ai.anomalydetector.MultivariateClient.trainMultivariateModel": "AnomalyDetector.Multivariate.trainMultivariateModel", + "com.azure.ai.anomalydetector.MultivariateClient.trainMultivariateModelWithResponse": "AnomalyDetector.Multivariate.trainMultivariateModel", + "com.azure.ai.anomalydetector.UnivariateAsyncClient": "AnomalyDetector.Univariate", + "com.azure.ai.anomalydetector.UnivariateAsyncClient.detectUnivariateChangePoint": "AnomalyDetector.Univariate.detectUnivariateChangePoint", + "com.azure.ai.anomalydetector.UnivariateAsyncClient.detectUnivariateChangePointWithResponse": "AnomalyDetector.Univariate.detectUnivariateChangePoint", + "com.azure.ai.anomalydetector.UnivariateAsyncClient.detectUnivariateLastPoint": "AnomalyDetector.Univariate.detectUnivariateLastPoint", + "com.azure.ai.anomalydetector.UnivariateAsyncClient.detectUnivariateLastPointWithResponse": "AnomalyDetector.Univariate.detectUnivariateLastPoint", + "com.azure.ai.anomalydetector.UnivariateClient": "AnomalyDetector.Univariate", + "com.azure.ai.anomalydetector.UnivariateClient.detectUnivariateChangePoint": "AnomalyDetector.Univariate.detectUnivariateChangePoint", + "com.azure.ai.anomalydetector.UnivariateClient.detectUnivariateChangePointWithResponse": "AnomalyDetector.Univariate.detectUnivariateChangePoint", + "com.azure.ai.anomalydetector.UnivariateClient.detectUnivariateLastPoint": "AnomalyDetector.Univariate.detectUnivariateLastPoint", + "com.azure.ai.anomalydetector.UnivariateClient.detectUnivariateLastPointWithResponse": "AnomalyDetector.Univariate.detectUnivariateLastPoint", + "com.azure.ai.anomalydetector.models.AlignMode": "AnomalyDetector.Multivariate.AlignMode", + "com.azure.ai.anomalydetector.models.AlignPolicy": "AnomalyDetector.Multivariate.AlignPolicy", + "com.azure.ai.anomalydetector.models.AnomalyDetectionModel": "AnomalyDetector.Multivariate.AnomalyDetectionModel", + "com.azure.ai.anomalydetector.models.AnomalyInterpretation": "AnomalyDetector.Multivariate.AnomalyInterpretation", + "com.azure.ai.anomalydetector.models.AnomalyState": "AnomalyDetector.Multivariate.AnomalyState", + "com.azure.ai.anomalydetector.models.AnomalyValue": "AnomalyDetector.Multivariate.AnomalyValue", + "com.azure.ai.anomalydetector.models.CorrelationChanges": "AnomalyDetector.Multivariate.CorrelationChanges", + "com.azure.ai.anomalydetector.models.DataSchema": "AnomalyDetector.Multivariate.DataSchema", + "com.azure.ai.anomalydetector.models.DiagnosticsInfo": "AnomalyDetector.Multivariate.DiagnosticsInfo", + "com.azure.ai.anomalydetector.models.ErrorResponse": "AnomalyDetector.Multivariate.ErrorResponse", + "com.azure.ai.anomalydetector.models.FillNAMethod": "AnomalyDetector.Multivariate.FillNAMethod", + "com.azure.ai.anomalydetector.models.ImputeMode": "AnomalyDetector.Univariate.ImputeMode", + "com.azure.ai.anomalydetector.models.ModelInfo": "AnomalyDetector.Multivariate.ModelInfo", + "com.azure.ai.anomalydetector.models.ModelState": "AnomalyDetector.Multivariate.ModelState", + "com.azure.ai.anomalydetector.models.ModelStatus": "AnomalyDetector.Multivariate.ModelStatus", + "com.azure.ai.anomalydetector.models.MultivariateBatchDetectionOptions": "AnomalyDetector.Multivariate.MultivariateBatchDetectionOptions", + "com.azure.ai.anomalydetector.models.MultivariateBatchDetectionResultSummary": "AnomalyDetector.Multivariate.MultivariateBatchDetectionResultSummary", + "com.azure.ai.anomalydetector.models.MultivariateBatchDetectionStatus": "AnomalyDetector.Multivariate.MultivariateBatchDetectionStatus", + "com.azure.ai.anomalydetector.models.MultivariateDetectionResult": "AnomalyDetector.Multivariate.MultivariateDetectionResult", + "com.azure.ai.anomalydetector.models.MultivariateLastDetectionOptions": "AnomalyDetector.Multivariate.MultivariateLastDetectionOptions", + "com.azure.ai.anomalydetector.models.MultivariateLastDetectionResult": "AnomalyDetector.Multivariate.MultivariateLastDetectionResult", + "com.azure.ai.anomalydetector.models.TimeGranularity": "AnomalyDetector.Univariate.TimeGranularity", + "com.azure.ai.anomalydetector.models.TimeSeriesPoint": "AnomalyDetector.Univariate.TimeSeriesPoint", + "com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionOptions": "AnomalyDetector.Univariate.UnivariateChangePointDetectionOptions", + "com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionResult": "AnomalyDetector.Univariate.UnivariateChangePointDetectionResult", + "com.azure.ai.anomalydetector.models.UnivariateDetectionOptions": "AnomalyDetector.Univariate.UnivariateDetectionOptions", + "com.azure.ai.anomalydetector.models.UnivariateLastDetectionResult": "AnomalyDetector.Univariate.UnivariateLastDetectionResult", + "com.azure.ai.anomalydetector.models.VariableState": "AnomalyDetector.Multivariate.VariableState", + "com.azure.ai.anomalydetector.models.VariableValues": "AnomalyDetector.Multivariate.VariableValues" + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/META-INF/azure-ai-anomalydetector_metadata.json b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/META-INF/azure-ai-anomalydetector_metadata.json new file mode 100644 index 000000000000..84131876cda7 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/META-INF/azure-ai-anomalydetector_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"v1.1","crossLanguageDefinitions":{"com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder":"AnomalyDetector","com.azure.ai.anomalydetector.MultivariateAsyncClient":"AnomalyDetector.Multivariate","com.azure.ai.anomalydetector.MultivariateAsyncClient.deleteMultivariateModel":"AnomalyDetector.Multivariate.deleteMultivariateModel","com.azure.ai.anomalydetector.MultivariateAsyncClient.deleteMultivariateModelWithResponse":"AnomalyDetector.Multivariate.deleteMultivariateModel","com.azure.ai.anomalydetector.MultivariateAsyncClient.detectMultivariateBatchAnomaly":"AnomalyDetector.Multivariate.detectMultivariateBatchAnomaly","com.azure.ai.anomalydetector.MultivariateAsyncClient.detectMultivariateBatchAnomalyWithResponse":"AnomalyDetector.Multivariate.detectMultivariateBatchAnomaly","com.azure.ai.anomalydetector.MultivariateAsyncClient.detectMultivariateLastAnomaly":"AnomalyDetector.Multivariate.detectMultivariateLastAnomaly","com.azure.ai.anomalydetector.MultivariateAsyncClient.detectMultivariateLastAnomalyWithResponse":"AnomalyDetector.Multivariate.detectMultivariateLastAnomaly","com.azure.ai.anomalydetector.MultivariateAsyncClient.getMultivariateBatchDetectionResult":"AnomalyDetector.Multivariate.getMultivariateBatchDetectionResult","com.azure.ai.anomalydetector.MultivariateAsyncClient.getMultivariateBatchDetectionResultWithResponse":"AnomalyDetector.Multivariate.getMultivariateBatchDetectionResult","com.azure.ai.anomalydetector.MultivariateAsyncClient.getMultivariateModel":"AnomalyDetector.Multivariate.getMultivariateModel","com.azure.ai.anomalydetector.MultivariateAsyncClient.getMultivariateModelWithResponse":"AnomalyDetector.Multivariate.getMultivariateModel","com.azure.ai.anomalydetector.MultivariateAsyncClient.listMultivariateModels":"AnomalyDetector.Multivariate.listMultivariateModels","com.azure.ai.anomalydetector.MultivariateAsyncClient.trainMultivariateModel":"AnomalyDetector.Multivariate.trainMultivariateModel","com.azure.ai.anomalydetector.MultivariateAsyncClient.trainMultivariateModelWithResponse":"AnomalyDetector.Multivariate.trainMultivariateModel","com.azure.ai.anomalydetector.MultivariateClient":"AnomalyDetector.Multivariate","com.azure.ai.anomalydetector.MultivariateClient.deleteMultivariateModel":"AnomalyDetector.Multivariate.deleteMultivariateModel","com.azure.ai.anomalydetector.MultivariateClient.deleteMultivariateModelWithResponse":"AnomalyDetector.Multivariate.deleteMultivariateModel","com.azure.ai.anomalydetector.MultivariateClient.detectMultivariateBatchAnomaly":"AnomalyDetector.Multivariate.detectMultivariateBatchAnomaly","com.azure.ai.anomalydetector.MultivariateClient.detectMultivariateBatchAnomalyWithResponse":"AnomalyDetector.Multivariate.detectMultivariateBatchAnomaly","com.azure.ai.anomalydetector.MultivariateClient.detectMultivariateLastAnomaly":"AnomalyDetector.Multivariate.detectMultivariateLastAnomaly","com.azure.ai.anomalydetector.MultivariateClient.detectMultivariateLastAnomalyWithResponse":"AnomalyDetector.Multivariate.detectMultivariateLastAnomaly","com.azure.ai.anomalydetector.MultivariateClient.getMultivariateBatchDetectionResult":"AnomalyDetector.Multivariate.getMultivariateBatchDetectionResult","com.azure.ai.anomalydetector.MultivariateClient.getMultivariateBatchDetectionResultWithResponse":"AnomalyDetector.Multivariate.getMultivariateBatchDetectionResult","com.azure.ai.anomalydetector.MultivariateClient.getMultivariateModel":"AnomalyDetector.Multivariate.getMultivariateModel","com.azure.ai.anomalydetector.MultivariateClient.getMultivariateModelWithResponse":"AnomalyDetector.Multivariate.getMultivariateModel","com.azure.ai.anomalydetector.MultivariateClient.listMultivariateModels":"AnomalyDetector.Multivariate.listMultivariateModels","com.azure.ai.anomalydetector.MultivariateClient.trainMultivariateModel":"AnomalyDetector.Multivariate.trainMultivariateModel","com.azure.ai.anomalydetector.MultivariateClient.trainMultivariateModelWithResponse":"AnomalyDetector.Multivariate.trainMultivariateModel","com.azure.ai.anomalydetector.UnivariateAsyncClient":"AnomalyDetector.Univariate","com.azure.ai.anomalydetector.UnivariateAsyncClient.detectUnivariateChangePoint":"AnomalyDetector.Univariate.detectUnivariateChangePoint","com.azure.ai.anomalydetector.UnivariateAsyncClient.detectUnivariateChangePointWithResponse":"AnomalyDetector.Univariate.detectUnivariateChangePoint","com.azure.ai.anomalydetector.UnivariateAsyncClient.detectUnivariateLastPoint":"AnomalyDetector.Univariate.detectUnivariateLastPoint","com.azure.ai.anomalydetector.UnivariateAsyncClient.detectUnivariateLastPointWithResponse":"AnomalyDetector.Univariate.detectUnivariateLastPoint","com.azure.ai.anomalydetector.UnivariateClient":"AnomalyDetector.Univariate","com.azure.ai.anomalydetector.UnivariateClient.detectUnivariateChangePoint":"AnomalyDetector.Univariate.detectUnivariateChangePoint","com.azure.ai.anomalydetector.UnivariateClient.detectUnivariateChangePointWithResponse":"AnomalyDetector.Univariate.detectUnivariateChangePoint","com.azure.ai.anomalydetector.UnivariateClient.detectUnivariateLastPoint":"AnomalyDetector.Univariate.detectUnivariateLastPoint","com.azure.ai.anomalydetector.UnivariateClient.detectUnivariateLastPointWithResponse":"AnomalyDetector.Univariate.detectUnivariateLastPoint","com.azure.ai.anomalydetector.models.AlignMode":"AnomalyDetector.Multivariate.AlignMode","com.azure.ai.anomalydetector.models.AlignPolicy":"AnomalyDetector.Multivariate.AlignPolicy","com.azure.ai.anomalydetector.models.AnomalyDetectionModel":"AnomalyDetector.Multivariate.AnomalyDetectionModel","com.azure.ai.anomalydetector.models.AnomalyInterpretation":"AnomalyDetector.Multivariate.AnomalyInterpretation","com.azure.ai.anomalydetector.models.AnomalyState":"AnomalyDetector.Multivariate.AnomalyState","com.azure.ai.anomalydetector.models.AnomalyValue":"AnomalyDetector.Multivariate.AnomalyValue","com.azure.ai.anomalydetector.models.CorrelationChanges":"AnomalyDetector.Multivariate.CorrelationChanges","com.azure.ai.anomalydetector.models.DataSchema":"AnomalyDetector.Multivariate.DataSchema","com.azure.ai.anomalydetector.models.DiagnosticsInfo":"AnomalyDetector.Multivariate.DiagnosticsInfo","com.azure.ai.anomalydetector.models.ErrorResponse":"AnomalyDetector.Multivariate.ErrorResponse","com.azure.ai.anomalydetector.models.FillNAMethod":"AnomalyDetector.Multivariate.FillNAMethod","com.azure.ai.anomalydetector.models.ImputeMode":"AnomalyDetector.Univariate.ImputeMode","com.azure.ai.anomalydetector.models.ModelInfo":"AnomalyDetector.Multivariate.ModelInfo","com.azure.ai.anomalydetector.models.ModelState":"AnomalyDetector.Multivariate.ModelState","com.azure.ai.anomalydetector.models.ModelStatus":"AnomalyDetector.Multivariate.ModelStatus","com.azure.ai.anomalydetector.models.MultivariateBatchDetectionOptions":"AnomalyDetector.Multivariate.MultivariateBatchDetectionOptions","com.azure.ai.anomalydetector.models.MultivariateBatchDetectionResultSummary":"AnomalyDetector.Multivariate.MultivariateBatchDetectionResultSummary","com.azure.ai.anomalydetector.models.MultivariateBatchDetectionStatus":"AnomalyDetector.Multivariate.MultivariateBatchDetectionStatus","com.azure.ai.anomalydetector.models.MultivariateDetectionResult":"AnomalyDetector.Multivariate.MultivariateDetectionResult","com.azure.ai.anomalydetector.models.MultivariateLastDetectionOptions":"AnomalyDetector.Multivariate.MultivariateLastDetectionOptions","com.azure.ai.anomalydetector.models.MultivariateLastDetectionResult":"AnomalyDetector.Multivariate.MultivariateLastDetectionResult","com.azure.ai.anomalydetector.models.TimeGranularity":"AnomalyDetector.Univariate.TimeGranularity","com.azure.ai.anomalydetector.models.TimeSeriesPoint":"AnomalyDetector.Univariate.TimeSeriesPoint","com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionOptions":"AnomalyDetector.Univariate.UnivariateChangePointDetectionOptions","com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionResult":"AnomalyDetector.Univariate.UnivariateChangePointDetectionResult","com.azure.ai.anomalydetector.models.UnivariateDetectionOptions":"AnomalyDetector.Univariate.UnivariateDetectionOptions","com.azure.ai.anomalydetector.models.UnivariateLastDetectionResult":"AnomalyDetector.Univariate.UnivariateLastDetectionResult","com.azure.ai.anomalydetector.models.VariableState":"AnomalyDetector.Multivariate.VariableState","com.azure.ai.anomalydetector.models.VariableValues":"AnomalyDetector.Multivariate.VariableValues"}} \ No newline at end of file diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/anomalydetector.properties b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/anomalydetector.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/anomalydetector.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/azure-ai-anomalydetector.properties b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/azure-ai-anomalydetector.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/main/resources/azure-ai-anomalydetector.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md new file mode 100644 index 000000000000..22ea4cb7f115 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/README.md @@ -0,0 +1,59 @@ +--- +page_type: sample +languages: + - java +products: + - azure + - azure-cognitive-services + - azure-anomaly-detector +urlFragment: anomalydetector-java-samples +--- + +# Azure Anomaly Detector client library samples for Java + +Azure Anomaly Detector samples are a set of self-contained Java programs that demonstrate interacting with Azure self-contained service using the client library. Each sample focuses on a specific scenario and can be executed independently. + +## Key concepts + +Key concepts are explained in detail [here][SDK_README_KEY_CONCEPTS]. + +## Getting started + +Getting started explained in detail [here][SDK_README_GETTING_STARTED]. + +## Examples + +The following sections provide code samples covering common scenario operations with the Azure Anomaly Detector client library. + +All of these samples need the endpoint to your Anomaly Detector resource, and your Anomaly Detector API key. + +|**File Name**|**Description**| +|----------------|-------------| +|[DetectAnomaliesEntireSeries.java][detect_anomaly_entire]|Detect anomalies as a batch| +|[DetectAnomaliesLastPoint.java][detect_anomaly_last]|Detect if last point is anomaly| +|[DetectChangePoints.java][detect_change_point]|Detect change points in series| + +## Troubleshooting + +Troubleshooting steps can be found [here][SDK_README_TROUBLESHOOTING]. + +## Next steps + +See [Next steps][SDK_README_NEXT_STEPS]. + +## Contributing + +If you would like to become an active contributor to this project please refer to our [Contribution +Guidelines][SDK_README_CONTRIBUTING] for more information. + + +[SDK_README_CONTRIBUTING]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/README.md#contributing +[SDK_README_GETTING_STARTED]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/README.md#getting-started +[SDK_README_TROUBLESHOOTING]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/README.md#troubleshooting +[SDK_README_KEY_CONCEPTS]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/README.md#key-concepts +[SDK_README_DEPENDENCY]: ../../README.md#include-the-package +[SDK_README_NEXT_STEPS]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/README.md#next-steps + +[detect_anomaly_entire]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java +[detect_anomaly_last]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java +[detect_change_point]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java new file mode 100644 index 000000000000..f665070aadd7 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesEntireSeries.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.ImputeMode; +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.ai.anomalydetector.models.UnivariateDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateEntireDetectionResult; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.Configuration; + +import java.io.IOException; +import java.util.List; + + +/** + * Sample for detecting anomalies in a piece of time series. + */ +public class DetectAnomaliesEntireSeries { + + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + * @throws IOException Exception thrown when there is an error in reading all the lines from the csv file. + */ + public static void main(final String[] args) throws IOException { + String endpoint = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_ENDPOINT"); + String key = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_API_KEY"); + + UnivariateClient anomalyDetectorClient = + new AnomalyDetectorClientBuilder() + .credential(new AzureKeyCredential(key)) + .endpoint(endpoint) + .buildUnivariateClient(); + + List series = SampleUtils.loadTimeSeriesData(); + + System.out.println("Detecting anomalies as a batch..."); + UnivariateDetectionOptions request = new UnivariateDetectionOptions(series); + // Set the granularity to be DAILY since the minimal interval in time of the sample data is one day. + request.setGranularity(TimeGranularity.DAILY); + request.setImputeMode(ImputeMode.AUTO); + + UnivariateEntireDetectionResult response = anomalyDetectorClient.detectUnivariateEntireSeries(request); + if (response.getIsAnomaly().contains(true)) { + System.out.println("Anomalies found in the following data positions:"); + for (int i = 0; i < request.getSeries().size(); ++i) { + if (response.getIsAnomaly().get(i)) { + System.out.print(i + " "); + } + } + System.out.println(); + } else { + System.out.println("No anomalies were found in the series."); + } + + System.out.println(); + System.out.println("All response data: "); + System.out.println(response.getPeriod()); + System.out.println("expectedValues: " + response.getExpectedValues()); + System.out.print("upperMargins: " + response.getUpperMargins()); + System.out.print("lowerMargins: " + response.getLowerMargins()); + System.out.print("isAnomaly: " + response.getIsAnomaly()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java new file mode 100644 index 000000000000..81a174b15334 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectAnomaliesLastPoint.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.ImputeMode; +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.ai.anomalydetector.models.UnivariateDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateLastDetectionResult; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.Configuration; + +import java.io.IOException; +import java.util.List; + +/** + * Sample for detecting whether the last point of time series is anomaly or not. + */ +public class DetectAnomaliesLastPoint { + + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + * @throws IOException Exception thrown when there is an error in reading all the lines from the csv file. + */ + public static void main(final String[] args) throws IOException { + String endpoint = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_ENDPOINT"); + String key = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_API_KEY"); + + UnivariateClient anomalyDetectorClient = new AnomalyDetectorClientBuilder().credential( + new AzureKeyCredential(key)).endpoint(endpoint).buildUnivariateClient(); + + List series = SampleUtils.loadTimeSeriesData(); + + System.out.println("Determining if latest data point is an anomaly..."); + UnivariateDetectionOptions request = new UnivariateDetectionOptions(series); + // Set the granularity to be DAILY since the minimal interval in time of the sample data is one day. + request.setGranularity(TimeGranularity.DAILY); + request.setImputeMode(ImputeMode.AUTO); + + UnivariateLastDetectionResult response = anomalyDetectorClient.detectUnivariateLastPoint(request); + System.out.println("ExpectedValue: " + response.getExpectedValue() + ", Severity: " + response.getSeverity()); + if (response.isAnomaly()) { + System.out.println("The latest point was detected as an anomaly."); + } else { + System.out.println("The latest point was not detected as an anomaly."); + } + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java new file mode 100644 index 000000000000..66ae8354421a --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/DetectChangePoints.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionResult; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.Configuration; + +import java.io.IOException; +import java.util.List; + +/** + * Sample for detecting change points in a piece of time series. + */ +public class DetectChangePoints { + + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + * @throws IOException Exception thrown when there is an error in reading all the lines from the csv file. + */ + public static void main(final String[] args) throws IOException { + String endpoint = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_ENDPOINT"); + String key = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_API_KEY"); + + UnivariateClient anomalyDetectorClient = new AnomalyDetectorClientBuilder().credential( + new AzureKeyCredential(key)).endpoint(endpoint).buildUnivariateClient(); + + List series = SampleUtils.loadTimeSeriesData(); + + System.out.println("Detecting change points..."); + // Set the granularity to be DAILY since the minimal interval in time of the sample data is one day. + UnivariateChangePointDetectionOptions request = new UnivariateChangePointDetectionOptions(series, + TimeGranularity.DAILY); + UnivariateChangePointDetectionResult response = anomalyDetectorClient.detectUnivariateChangePoint(request); + if (response.getIsChangePoint().contains(true)) { + System.out.println("Change points found in the following data positions:"); + for (int i = 0; i < request.getSeries().size(); ++i) { + if (response.getIsChangePoint().get(i)) { + System.out.print(i + " "); + } + } + System.out.println(); + } else { + System.out.println("No change points were found in the series."); + } + + System.out.println("All response data: "); + System.out.println(response.getPeriod()); + System.out.println(response.getIsChangePoint()); + System.out.println(response.getConfidenceScores()); + System.out.println(response.getIsChangePoint()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/MultivariateSample.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/MultivariateSample.java new file mode 100644 index 000000000000..ccf184b236b8 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/MultivariateSample.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.AlignMode; +import com.azure.ai.anomalydetector.models.AlignPolicy; +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.ai.anomalydetector.models.AnomalyState; +import com.azure.ai.anomalydetector.models.DataSchema; +import com.azure.ai.anomalydetector.models.ErrorResponse; +import com.azure.ai.anomalydetector.models.FillNAMethod; +import com.azure.ai.anomalydetector.models.ModelInfo; +import com.azure.ai.anomalydetector.models.ModelStatus; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionStatus; +import com.azure.ai.anomalydetector.models.MultivariateDetectionResult; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionResult; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Configuration; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.ByteBuffer; +import java.time.OffsetDateTime; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +public class MultivariateSample { + private static void close(FileOutputStream fos) { + try { + fos.close(); + System.out.println("closed"); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + private static void write(FileOutputStream fos, ByteBuffer b) { + try { + fos.write(b.array()); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + private static MultivariateClient getClient(String endpoint, String key) { + return new AnomalyDetectorClientBuilder().credential(new AzureKeyCredential(key)) + .endpoint(endpoint) + .buildMultivariateClient(); + } + + private static UUID createModel(MultivariateClient client, ModelInfo modelInfo) { + AnomalyDetectionModel model = client.trainMultivariateModel(modelInfo); + return UUID.fromString(model.getModelId()); + } + + private static ModelInfo getModelInfo(MultivariateClient client, UUID modelId) { + return client.getMultivariateModel(modelId.toString()).getModelInfo(); + } + + private static UUID getResultId(MultivariateClient client, MultivariateBatchDetectionOptions body, UUID modelId) { + MultivariateDetectionResult detectionResult = client.detectMultivariateBatchAnomaly(modelId.toString(), body); + return UUID.fromString(detectionResult.getResultId()); + } + + private static MultivariateBatchDetectionStatus getInferenceStatus(MultivariateClient client, UUID resultId) { + return client.getMultivariateBatchDetectionResult(resultId.toString()).getSummary().getStatus(); + } + + private static void getModelList(MultivariateClient client) { + PagedIterable response = client.listMultivariateModels(); + + System.out.println("ModelList: "); + response.streamByPage().forEach(models -> { + for (AnomalyDetectionModel item : models.getValue()) { + System.out.println("\t" + item.getModelId()); + } + }); + } + + private static MultivariateLastDetectionResult getLastDetectResult(MultivariateClient client, + MultivariateLastDetectionOptions body, UUID modelId) { + return client.detectMultivariateLastAnomaly(modelId.toString(), body); + } + + public static void run(String datasource, DataSchema dataSchema) throws Exception { + String endpoint = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_ENDPOINT"); + String key = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_API_KEY"); + + // Get multivariate client + MultivariateClient client = getClient(endpoint, key); + + // set training request + OffsetDateTime startTime = OffsetDateTime.parse("2021-01-02T00:00:00Z"); + OffsetDateTime endTime = OffsetDateTime.parse("2021-01-02T05:00:00Z"); + ModelInfo trainRequest = new ModelInfo(datasource, startTime, endTime); + trainRequest.setSlidingWindow(200) + .setAlignPolicy(new AlignPolicy().setAlignMode(AlignMode.OUTER) + .setFillNAMethod(FillNAMethod.LINEAR) + .setPaddingValue(0.0)) + .setDataSchema(dataSchema) + .setDisplayName("SampleRequest"); + + // Start training and get Model ID + UUID modelId = createModel(client, trainRequest); + System.out.println("modelId: " + modelId); + // Check model status util the model get ready + while (true) { + ModelInfo modelInfo = getModelInfo(client, modelId); + ModelStatus modelStatus = modelInfo.getStatus(); + if (modelStatus == ModelStatus.READY) { + System.out.println("READY"); + break; + } else if (modelStatus == ModelStatus.FAILED) { + System.out.println("FAILED"); + StringBuilder errorStr = new StringBuilder(); + for (ErrorResponse errorResponse : modelInfo.getErrors()) { + System.out.println(errorResponse.getCode() + errorResponse.getMessage()); + errorStr.append(";").append(errorResponse.getCode()).append(errorResponse.getMessage()); + } + throw new RuntimeException("Training Failed. Error: " + errorStr); + } + System.out.println("TRAINING"); + TimeUnit.SECONDS.sleep(5); + } + + // Start inference and get the Result ID + OffsetDateTime endTimeDetect = OffsetDateTime.parse("2021-01-02T12:00:00Z"); + MultivariateBatchDetectionOptions detectionRequest = new MultivariateBatchDetectionOptions(datasource, + startTime, endTimeDetect) + .setTopContributorCount(10); + UUID resultId = getResultId(client, detectionRequest, modelId); + System.out.println("resultId: " + resultId); + while (true) { // Check inference status util the result get ready + MultivariateBatchDetectionStatus detectionStatus = getInferenceStatus(client, resultId); + if (detectionStatus == MultivariateBatchDetectionStatus.READY) { + System.out.println("READY"); + break; + } else if (detectionStatus == MultivariateBatchDetectionStatus.FAILED) { + System.out.println("FAILED"); + throw new RuntimeException("Inference Failed."); + } + System.out.println("INFERRING"); + TimeUnit.SECONDS.sleep(5); + } + + // Synchronized anomaly detection + MultivariateLastDetectionOptions lastDetectionRequest; + try (InputStream fileInputStream = new FileInputStream( + "azure-ai-anomalydetector\\src\\samples\\java\\sample_data\\sync_infer_body.json"); + JsonReader jsonReader = JsonProviders.createReader(fileInputStream)) { + lastDetectionRequest = MultivariateLastDetectionOptions.fromJson(jsonReader); + } + + MultivariateLastDetectionResult lastDetectionResult = getLastDetectResult(client, lastDetectionRequest, + modelId); + for (AnomalyState anomalyState : lastDetectionResult.getResults()) { + System.out.println( + "timestamp: " + anomalyState.getTimestamp().toString() + ", isAnomaly: " + anomalyState.getValue() + .isAnomaly() + ", Score: " + anomalyState.getValue().getScore()); + } + + //Delete model + client.deleteMultivariateModel(modelId.toString()); + + //Get model list + getModelList(client); + } + + public static void main(final String[] args) throws Exception { + System.out.println("Test MultiTables"); + run("https://mvaddataset.blob.core.windows.net/sample-multitable/sample_data_20_3000", DataSchema.MULTI_TABLE); + + System.out.println("Test OneTable"); + run("https://mvaddataset.blob.core.windows.net/sample-onetable/sample_data_20_3000.csv", DataSchema.ONE_TABLE); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/ReadmeSamples.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/ReadmeSamples.java new file mode 100644 index 000000000000..3779e79672e1 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/ReadmeSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.Configuration; + +public final class ReadmeSamples { + + private static void createClient() { + // BEGIN: readme-sample-createAnomalyDetectorClient + String endpoint = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_ENDPOINT"); + String key = Configuration.getGlobalConfiguration().get("AZURE_ANOMALY_DETECTOR_API_KEY"); + + MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new AzureKeyCredential(key)) + .endpoint(endpoint) + .buildMultivariateClient(); + + UnivariateClient univariateClient = new AnomalyDetectorClientBuilder() + .credential(new AzureKeyCredential(key)) + .endpoint(endpoint) + .buildUnivariateClient(); + // END: readme-sample-createAnomalyDetectorClient + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/SampleUtils.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/SampleUtils.java new file mode 100644 index 000000000000..f0ecb3ca454a --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/SampleUtils.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Helper class for common sample methods. + */ +final class SampleUtils { + /** + * Loads the {@link TimeSeriesPoint} data from the csv file. + * + * @return A list of {@link TimeSeriesPoint} data. + * @throws IOException Exception thrown when there is an error in reading all the lines from the csv file. + */ + static List loadTimeSeriesData() throws IOException { + // Read the time series from csv file and organize the time series into list of TimeSeriesPoint. + // The sample csv file has no header, and it contains 2 columns, namely timestamp and value. + // The following is a snippet of the sample csv file: + // 2018-03-01T00:00:00Z,32858923 + // 2018-03-02T00:00:00Z,29615278 + // 2018-03-03T00:00:00Z,22839355 + // 2018-03-04T00:00:00Z,25948736 + Path path = Paths.get("azure-ai-anomalydetector/src/samples/java/sample_data/request-data.csv"); + List requestData = Files.readAllLines(path); + return requestData.stream() + .map(String::trim) + .filter(line -> !line.isEmpty()) + .map(line -> line.split(",", 2)) + .filter(splits -> splits.length == 2) + .map(splits -> { + TimeSeriesPoint timeSeriesPoint = new TimeSeriesPoint(Float.parseFloat(splits[1])); + timeSeriesPoint.setTimestamp(OffsetDateTime.parse(splits[0])); + return timeSeriesPoint; + }) + .collect(Collectors.toList()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/CreateAndTrainMultivariateModel.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/CreateAndTrainMultivariateModel.java new file mode 100644 index 000000000000..d2bd060070f0 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/CreateAndTrainMultivariateModel.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.MultivariateClient; +import com.azure.ai.anomalydetector.models.AlignMode; +import com.azure.ai.anomalydetector.models.AlignPolicy; +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.ai.anomalydetector.models.DataSchema; +import com.azure.ai.anomalydetector.models.FillNAMethod; +import com.azure.ai.anomalydetector.models.ModelInfo; +import com.azure.core.credential.KeyCredential; +import com.azure.core.util.Configuration; +import java.time.OffsetDateTime; + +public class CreateAndTrainMultivariateModel { + public static void main(String[] args) { + MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildMultivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.multivariate-train-multivariate-model.create-and-train-multivariate-model + AnomalyDetectionModel response = multivariateClient.trainMultivariateModel( + new ModelInfo("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + OffsetDateTime.parse("2019-04-01T00:00:00Z"), OffsetDateTime.parse("2019-04-02T00:00:00Z")) + .setDataSchema(DataSchema.ONE_TABLE) + .setDisplayName("Devops-MultiAD") + .setSlidingWindow(20) + .setAlignPolicy(new AlignPolicy().setAlignMode(AlignMode.OUTER) + .setFillNAMethod(FillNAMethod.LINEAR) + .setPaddingValue(0.0D))); + // END:com.azure.ai.anomalydetector.generated.multivariate-train-multivariate-model.create-and-train-multivariate-model + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DeleteMultivariateModel.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DeleteMultivariateModel.java new file mode 100644 index 000000000000..77e3705aad7b --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DeleteMultivariateModel.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.MultivariateClient; +import com.azure.core.credential.KeyCredential; +import com.azure.core.util.Configuration; + +public class DeleteMultivariateModel { + public static void main(String[] args) { + MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildMultivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.multivariate-delete-multivariate-model.delete-multivariate-model + multivariateClient.deleteMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); + // END:com.azure.ai.anomalydetector.generated.multivariate-delete-multivariate-model.delete-multivariate-model + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectMultivariateBatchAnomaly.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectMultivariateBatchAnomaly.java new file mode 100644 index 000000000000..a0bf27198b18 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectMultivariateBatchAnomaly.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.MultivariateClient; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateDetectionResult; +import com.azure.core.credential.KeyCredential; +import com.azure.core.util.Configuration; +import java.time.OffsetDateTime; + +public class DetectMultivariateBatchAnomaly { + public static void main(String[] args) { + MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildMultivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.multivariate-detect-multivariate-batch-anomaly.detect-multivariate-batch-anomaly + MultivariateDetectionResult response + = multivariateClient.detectMultivariateBatchAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", + new MultivariateBatchDetectionOptions( + "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + OffsetDateTime.parse("2019-04-01T00:15:00Z"), OffsetDateTime.parse("2019-04-01T00:40:00Z")) + .setTopContributorCount(10)); + // END:com.azure.ai.anomalydetector.generated.multivariate-detect-multivariate-batch-anomaly.detect-multivariate-batch-anomaly + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectMultivariateLastAnomaly.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectMultivariateLastAnomaly.java new file mode 100644 index 000000000000..a50befd26afe --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectMultivariateLastAnomaly.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.MultivariateClient; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionResult; +import com.azure.ai.anomalydetector.models.VariableValues; +import com.azure.core.credential.KeyCredential; +import com.azure.core.util.Configuration; +import java.util.Arrays; + +public class DetectMultivariateLastAnomaly { + public static void main(String[] args) { + MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildMultivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.multivariate-detect-multivariate-last-anomaly.detect-multivariate-last-anomaly + MultivariateLastDetectionResult response = multivariateClient.detectMultivariateLastAnomaly( + "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + new MultivariateLastDetectionOptions(Arrays.asList(new VariableValues("Variable_1", + Arrays.asList("2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"), + Arrays.asList(0.4551378545933972, 0.7388603950488748, 0.201088255984052, 0.7462812245891899, + 0.07308128850401663, 0.33090474587393537, 0.7544925268153315, 0.987506336316328, 0.6665932993421468, + 0.6308351543168672, 0.08083310161466228, 0.8414415588668442, 0.514583545640453, 0.0954489875193526, + 0.7786793231920507, 0.41646133667960994, 0.030176187583339287, 0.3474214937189324, + 0.508530173413991, 0.42451199127255046, 0.2115944222725208, 0.24733519545833516, 0.8791022110982156, + 0.9479621899884665, 0.26702703121252136, 0.6954503497669413, 0.1235728391488995, 0.8214915473050647, + 0.11813002444192677, 0.8579045951076123)), + new VariableValues("Variable_2", + Arrays.asList("2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"), + Arrays.asList(0.9617871613964145, 0.24903311574778408, 0.4920561254118613, 0.9895601049618598, + 0.9171759283128094, 0.5754204711105273, 0.1811033296265634, 0.8852311981742577, + 0.9543231904644779, 0.7088012446094262, 0.7843572237149014, 0.7664787010700046, + 0.3699552325387093, 0.504519908266789, 0.5848930929950164, 0.7628913396089576, + 0.8148405868900065, 0.08540458873739332, 0.03481976727525682, 0.21275099339467762, + 0.9836175579199806, 0.9321441483364282, 0.038466608085469534, 0.1723138437622782, + 0.8626383410218382, 0.35053229974224254, 0.631141662835182, 0.0730352607990088, + 0.08886179043386, 0.7488606040971179)), + new VariableValues("Variable_3", + Arrays.asList("2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"), + Arrays.asList(0.4030756879437628, 0.15526889968448554, 0.36352226408981103, 0.6051200637229004, + 0.8516795018476276, 0.2645605735279929, 0.6810875830037345, 0.9165894221681316, + 0.700783245230424, 0.5624155469940331, 0.6277289685127893, 0.15992056539730204, + 0.6020964482827594, 0.35937967753105915, 0.8731686034848609, 0.20301549117588935, + 0.029261872151168933, 0.6261499548828445, 0.45850782028563386, 0.8275006940083313, + 0.032760268834037376, 0.4485202784055029, 0.8915691008748384, 0.891669051517807, + 0.9469979353323046, 0.115293087370132, 0.08818772518459506, 0.7426286620589166, + 0.32372247468990756, 0.936268139507417)))).setTopContributorCount(10)); + // END:com.azure.ai.anomalydetector.generated.multivariate-detect-multivariate-last-anomaly.detect-multivariate-last-anomaly + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectUnivariateLastPoint.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectUnivariateLastPoint.java new file mode 100644 index 000000000000..aca582f7b08c --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/DetectUnivariateLastPoint.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.UnivariateClient; +import com.azure.ai.anomalydetector.models.ImputeMode; +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.ai.anomalydetector.models.UnivariateDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateLastDetectionResult; +import com.azure.core.credential.KeyCredential; +import com.azure.core.util.Configuration; +import java.time.OffsetDateTime; +import java.util.Arrays; + +public class DetectUnivariateLastPoint { + public static void main(String[] args) { + UnivariateClient univariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildUnivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.univariate-detect-univariate-last-point.detect-univariate-last-point + UnivariateLastDetectionResult response + = univariateClient.detectUnivariateLastPoint(new UnivariateDetectionOptions( + Arrays.asList(new TimeSeriesPoint(826.0).setTimestamp(OffsetDateTime.parse("1972-01-01T00:00:00Z")), + new TimeSeriesPoint(799.0).setTimestamp(OffsetDateTime.parse("1972-02-01T00:00:00Z")), + new TimeSeriesPoint(890.0).setTimestamp(OffsetDateTime.parse("1972-03-01T00:00:00Z")), + new TimeSeriesPoint(900.0).setTimestamp(OffsetDateTime.parse("1972-04-01T00:00:00Z")), + new TimeSeriesPoint(961.0).setTimestamp(OffsetDateTime.parse("1972-05-01T00:00:00Z")), + new TimeSeriesPoint(935.0).setTimestamp(OffsetDateTime.parse("1972-06-01T00:00:00Z")), + new TimeSeriesPoint(894.0).setTimestamp(OffsetDateTime.parse("1972-07-01T00:00:00Z")), + new TimeSeriesPoint(855.0).setTimestamp(OffsetDateTime.parse("1972-08-01T00:00:00Z")), + new TimeSeriesPoint(809.0).setTimestamp(OffsetDateTime.parse("1972-09-01T00:00:00Z")), + new TimeSeriesPoint(810.0).setTimestamp(OffsetDateTime.parse("1972-10-01T00:00:00Z")), + new TimeSeriesPoint(766.0).setTimestamp(OffsetDateTime.parse("1972-11-01T00:00:00Z")), + new TimeSeriesPoint(805.0).setTimestamp(OffsetDateTime.parse("1972-12-01T00:00:00Z")), + new TimeSeriesPoint(821.0).setTimestamp(OffsetDateTime.parse("1973-01-01T00:00:00Z")), + new TimeSeriesPoint(773.0).setTimestamp(OffsetDateTime.parse("1973-02-01T00:00:00Z")), + new TimeSeriesPoint(883.0).setTimestamp(OffsetDateTime.parse("1973-03-01T00:00:00Z")), + new TimeSeriesPoint(898.0).setTimestamp(OffsetDateTime.parse("1973-04-01T00:00:00Z")), + new TimeSeriesPoint(957.0).setTimestamp(OffsetDateTime.parse("1973-05-01T00:00:00Z")), + new TimeSeriesPoint(924.0).setTimestamp(OffsetDateTime.parse("1973-06-01T00:00:00Z")), + new TimeSeriesPoint(881.0).setTimestamp(OffsetDateTime.parse("1973-07-01T00:00:00Z")), + new TimeSeriesPoint(837.0).setTimestamp(OffsetDateTime.parse("1973-08-01T00:00:00Z")), + new TimeSeriesPoint(784.0).setTimestamp(OffsetDateTime.parse("1973-09-01T00:00:00Z")), + new TimeSeriesPoint(791.0).setTimestamp(OffsetDateTime.parse("1973-10-01T00:00:00Z")), + new TimeSeriesPoint(760.0).setTimestamp(OffsetDateTime.parse("1973-11-01T00:00:00Z")), + new TimeSeriesPoint(802.0).setTimestamp(OffsetDateTime.parse("1973-12-01T00:00:00Z")), + new TimeSeriesPoint(828.0).setTimestamp(OffsetDateTime.parse("1974-01-01T00:00:00Z")), + new TimeSeriesPoint(1030.0).setTimestamp(OffsetDateTime.parse("1974-02-01T00:00:00Z")), + new TimeSeriesPoint(889.0).setTimestamp(OffsetDateTime.parse("1974-03-01T00:00:00Z")), + new TimeSeriesPoint(902.0).setTimestamp(OffsetDateTime.parse("1974-04-01T00:00:00Z")), + new TimeSeriesPoint(969.0).setTimestamp(OffsetDateTime.parse("1974-05-01T00:00:00Z")), + new TimeSeriesPoint(947.0).setTimestamp(OffsetDateTime.parse("1974-06-01T00:00:00Z")), + new TimeSeriesPoint(908.0).setTimestamp(OffsetDateTime.parse("1974-07-01T00:00:00Z")), + new TimeSeriesPoint(867.0).setTimestamp(OffsetDateTime.parse("1974-08-01T00:00:00Z")), + new TimeSeriesPoint(815.0).setTimestamp(OffsetDateTime.parse("1974-09-01T00:00:00Z")), + new TimeSeriesPoint(812.0).setTimestamp(OffsetDateTime.parse("1974-10-01T00:00:00Z")), + new TimeSeriesPoint(773.0).setTimestamp(OffsetDateTime.parse("1974-11-01T00:00:00Z")), + new TimeSeriesPoint(813.0).setTimestamp(OffsetDateTime.parse("1974-12-01T00:00:00Z")), + new TimeSeriesPoint(834.0).setTimestamp(OffsetDateTime.parse("1975-01-01T00:00:00Z")), + new TimeSeriesPoint(782.0).setTimestamp(OffsetDateTime.parse("1975-02-01T00:00:00Z")), + new TimeSeriesPoint(892.0).setTimestamp(OffsetDateTime.parse("1975-03-01T00:00:00Z")), + new TimeSeriesPoint(903.0).setTimestamp(OffsetDateTime.parse("1975-04-01T00:00:00Z")), + new TimeSeriesPoint(966.0).setTimestamp(OffsetDateTime.parse("1975-05-01T00:00:00Z")), + new TimeSeriesPoint(937.0).setTimestamp(OffsetDateTime.parse("1975-06-01T00:00:00Z")), + new TimeSeriesPoint(896.0).setTimestamp(OffsetDateTime.parse("1975-07-01T00:00:00Z")), + new TimeSeriesPoint(858.0).setTimestamp(OffsetDateTime.parse("1975-08-01T00:00:00Z")), + new TimeSeriesPoint(817.0).setTimestamp(OffsetDateTime.parse("1975-09-01T00:00:00Z")), + new TimeSeriesPoint(827.0).setTimestamp(OffsetDateTime.parse("1975-10-01T00:00:00Z")), + new TimeSeriesPoint(797.0).setTimestamp(OffsetDateTime.parse("1975-11-01T00:00:00Z")), + new TimeSeriesPoint(843.0).setTimestamp(OffsetDateTime.parse("1975-12-01T00:00:00Z")))) + .setGranularity(TimeGranularity.MONTHLY) + .setMaxAnomalyRatio(0.25D) + .setSensitivity(95) + .setImputeMode(ImputeMode.FIXED) + .setImputeFixedValue(800.0D)); + // END:com.azure.ai.anomalydetector.generated.univariate-detect-univariate-last-point.detect-univariate-last-point + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/GetAMultivariateModel.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/GetAMultivariateModel.java new file mode 100644 index 000000000000..7f61dcd07702 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/GetAMultivariateModel.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.MultivariateClient; +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.core.credential.KeyCredential; +import com.azure.core.util.Configuration; + +public class GetAMultivariateModel { + public static void main(String[] args) { + MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildMultivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.multivariate-get-multivariate-model.get-a-multivariate-model + AnomalyDetectionModel response + = multivariateClient.getMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); + // END:com.azure.ai.anomalydetector.generated.multivariate-get-multivariate-model.get-a-multivariate-model + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/GetMultivariateBatchDetectionResult.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/GetMultivariateBatchDetectionResult.java new file mode 100644 index 000000000000..188b77f798c5 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/GetMultivariateBatchDetectionResult.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.MultivariateClient; +import com.azure.ai.anomalydetector.models.MultivariateDetectionResult; +import com.azure.core.credential.KeyCredential; +import com.azure.core.util.Configuration; + +public class GetMultivariateBatchDetectionResult { + public static void main(String[] args) { + MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildMultivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.multivariate-get-multivariate-batch-detection-result.get-multivariate-batch-detection-result + MultivariateDetectionResult response + = multivariateClient.getMultivariateBatchDetectionResult("663884e6-b117-11ea-b3de-0242ac130004"); + // END:com.azure.ai.anomalydetector.generated.multivariate-get-multivariate-batch-detection-result.get-multivariate-batch-detection-result + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/ListMultivariateModels.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/ListMultivariateModels.java new file mode 100644 index 000000000000..2464c573f2ad --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/ListMultivariateModels.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.MultivariateClient; +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.core.credential.KeyCredential; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Configuration; + +public class ListMultivariateModels { + public static void main(String[] args) { + MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildMultivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.multivariate-list-multivariate-models.list-multivariate-models + PagedIterable response = multivariateClient.listMultivariateModels(0, 10); + // END:com.azure.ai.anomalydetector.generated.multivariate-list-multivariate-models.list-multivariate-models + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/UnivariateDetectEntireSeries.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/UnivariateDetectEntireSeries.java new file mode 100644 index 000000000000..7fe831e0b86c --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/UnivariateDetectEntireSeries.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.UnivariateClient; +import com.azure.core.credential.KeyCredential; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; + +public class UnivariateDetectEntireSeries { + public static void main(String[] args) { + UnivariateClient univariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildUnivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.univariate-detect-univariate-entire-series.univariate-detect-entire-series + BinaryData options = BinaryData.fromString( + "{\"series\":[{\"timestamp\":\"1972-01-01T00:00:00Z\",\"value\":826},{\"timestamp\":\"1972-02-01T00:00:00Z\",\"value\":799},{\"timestamp\":\"1972-03-01T00:00:00Z\",\"value\":890},{\"timestamp\":\"1972-04-01T00:00:00Z\",\"value\":900},{\"timestamp\":\"1972-05-01T00:00:00Z\",\"value\":961},{\"timestamp\":\"1972-06-01T00:00:00Z\",\"value\":935},{\"timestamp\":\"1972-07-01T00:00:00Z\",\"value\":894},{\"timestamp\":\"1972-08-01T00:00:00Z\",\"value\":855},{\"timestamp\":\"1972-09-01T00:00:00Z\",\"value\":809},{\"timestamp\":\"1972-10-01T00:00:00Z\",\"value\":810},{\"timestamp\":\"1972-11-01T00:00:00Z\",\"value\":766},{\"timestamp\":\"1972-12-01T00:00:00Z\",\"value\":805},{\"timestamp\":\"1973-01-01T00:00:00Z\",\"value\":821},{\"timestamp\":\"1973-02-01T00:00:00Z\",\"value\":773},{\"timestamp\":\"1973-03-01T00:00:00Z\",\"value\":883},{\"timestamp\":\"1973-04-01T00:00:00Z\",\"value\":898},{\"timestamp\":\"1973-05-01T00:00:00Z\",\"value\":957},{\"timestamp\":\"1973-06-01T00:00:00Z\",\"value\":924},{\"timestamp\":\"1973-07-01T00:00:00Z\",\"value\":881},{\"timestamp\":\"1973-08-01T00:00:00Z\",\"value\":837},{\"timestamp\":\"1973-09-01T00:00:00Z\",\"value\":784},{\"timestamp\":\"1973-10-01T00:00:00Z\",\"value\":791},{\"timestamp\":\"1973-11-01T00:00:00Z\",\"value\":760},{\"timestamp\":\"1973-12-01T00:00:00Z\",\"value\":802},{\"timestamp\":\"1974-01-01T00:00:00Z\",\"value\":828},{\"timestamp\":\"1974-02-01T00:00:00Z\",\"value\":1030},{\"timestamp\":\"1974-03-01T00:00:00Z\",\"value\":889},{\"timestamp\":\"1974-04-01T00:00:00Z\",\"value\":902},{\"timestamp\":\"1974-05-01T00:00:00Z\",\"value\":969},{\"timestamp\":\"1974-06-01T00:00:00Z\",\"value\":947},{\"timestamp\":\"1974-07-01T00:00:00Z\",\"value\":908},{\"timestamp\":\"1974-08-01T00:00:00Z\",\"value\":867},{\"timestamp\":\"1974-09-01T00:00:00Z\",\"value\":815},{\"timestamp\":\"1974-10-01T00:00:00Z\",\"value\":812},{\"timestamp\":\"1974-11-01T00:00:00Z\",\"value\":773},{\"timestamp\":\"1974-12-01T00:00:00Z\",\"value\":813},{\"timestamp\":\"1975-01-01T00:00:00Z\",\"value\":834},{\"timestamp\":\"1975-02-01T00:00:00Z\",\"value\":782},{\"timestamp\":\"1975-03-01T00:00:00Z\",\"value\":892},{\"timestamp\":\"1975-04-01T00:00:00Z\",\"value\":903},{\"timestamp\":\"1975-05-01T00:00:00Z\",\"value\":966},{\"timestamp\":\"1975-06-01T00:00:00Z\",\"value\":937},{\"timestamp\":\"1975-07-01T00:00:00Z\",\"value\":896},{\"timestamp\":\"1975-08-01T00:00:00Z\",\"value\":858},{\"timestamp\":\"1975-09-01T00:00:00Z\",\"value\":817},{\"timestamp\":\"1975-10-01T00:00:00Z\",\"value\":827},{\"timestamp\":\"1975-11-01T00:00:00Z\",\"value\":797},{\"timestamp\":\"1975-12-01T00:00:00Z\",\"value\":843}],\"maxAnomalyRatio\":0.25,\"sensitivity\":95,\"granularity\":\"monthly\",\"imputeMode\":\"auto\"}"); + RequestOptions requestOptions = new RequestOptions().addHeader("Content-Type", "application/json"); + Response response + = univariateClient.detectUnivariateEntireSeriesWithResponse(options, requestOptions); + // END:com.azure.ai.anomalydetector.generated.univariate-detect-univariate-entire-series.univariate-detect-entire-series + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/UnivariateDetectionOfAChangePoint.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/UnivariateDetectionOfAChangePoint.java new file mode 100644 index 000000000000..50967c628826 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/com/azure/ai/anomalydetector/generated/UnivariateDetectionOfAChangePoint.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.UnivariateClient; +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionResult; +import com.azure.core.credential.KeyCredential; +import com.azure.core.util.Configuration; +import java.time.OffsetDateTime; +import java.util.Arrays; + +public class UnivariateDetectionOfAChangePoint { + public static void main(String[] args) { + UnivariateClient univariateClient = new AnomalyDetectorClientBuilder() + .credential(new KeyCredential(Configuration.getGlobalConfiguration().get("API_KEY"))) + .endpoint("{Endpoint}") + .buildUnivariateClient(); + // BEGIN:com.azure.ai.anomalydetector.generated.univariate-detect-univariate-change-point.univariate-detection-of-a-change-point + UnivariateChangePointDetectionResult response + = univariateClient.detectUnivariateChangePoint(new UnivariateChangePointDetectionOptions( + Arrays.asList(new TimeSeriesPoint(1639196.0).setTimestamp(OffsetDateTime.parse("2017-01-01T06:45:00Z")), + new TimeSeriesPoint(1639290.0).setTimestamp(OffsetDateTime.parse("2017-01-01T06:50:00Z")), + new TimeSeriesPoint(1667293.0).setTimestamp(OffsetDateTime.parse("2017-01-01T06:55:00Z")), + new TimeSeriesPoint(1703130.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:00:00Z")), + new TimeSeriesPoint(1650912.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:05:00Z")), + new TimeSeriesPoint(1653596.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:10:00Z")), + new TimeSeriesPoint(1653793.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:15:00Z")), + new TimeSeriesPoint(1653795.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:20:00Z")), + new TimeSeriesPoint(1663471.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:25:00Z")), + new TimeSeriesPoint(1662358.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:30:00Z")), + new TimeSeriesPoint(1664320.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:35:00Z")), + new TimeSeriesPoint(1664942.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:40:00Z")), + new TimeSeriesPoint(1664966.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:45:00Z")), + new TimeSeriesPoint(1724271.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:50:00Z")), + new TimeSeriesPoint(1678720.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:55:00Z")), + new TimeSeriesPoint(1672536.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:00:00Z")), + new TimeSeriesPoint(1672544.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:05:00Z")), + new TimeSeriesPoint(1672364.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:10:00Z")), + new TimeSeriesPoint(1672912.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:15:00Z")), + new TimeSeriesPoint(1672736.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:20:00Z")), + new TimeSeriesPoint(1672725.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:25:00Z")), + new TimeSeriesPoint(1673247.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:30:00Z")), + new TimeSeriesPoint(1673109.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:35:00Z")), + new TimeSeriesPoint(1690088.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:40:00Z")), + new TimeSeriesPoint(1703865.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:45:00Z")), + new TimeSeriesPoint(1703865.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:50:00Z")), + new TimeSeriesPoint(1786581.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:55:00Z")), + new TimeSeriesPoint(1800945.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:00:00Z")), + new TimeSeriesPoint(1800957.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:05:00Z")), + new TimeSeriesPoint(1801191.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:10:00Z")), + new TimeSeriesPoint(1801412.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:15:00Z")), + new TimeSeriesPoint(1801621.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:20:00Z")), + new TimeSeriesPoint(1801621.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:25:00Z")), + new TimeSeriesPoint(1801654.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:30:00Z")), + new TimeSeriesPoint(1802105.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:35:00Z")), + new TimeSeriesPoint(1801800.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:40:00Z")), + new TimeSeriesPoint(1803040.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:45:00Z")), + new TimeSeriesPoint(1803672.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:50:00Z")), + new TimeSeriesPoint(1803535.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:55:00Z")), + new TimeSeriesPoint(1803541.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:00:00Z")), + new TimeSeriesPoint(1803545.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:05:00Z")), + new TimeSeriesPoint(1803599.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:10:00Z")), + new TimeSeriesPoint(1803616.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:15:00Z")), + new TimeSeriesPoint(1803619.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:20:00Z")), + new TimeSeriesPoint(1809942.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:25:00Z")), + new TimeSeriesPoint(1802720.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:30:00Z")), + new TimeSeriesPoint(1802720.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:35:00Z")), + new TimeSeriesPoint(1802888.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:40:00Z")), + new TimeSeriesPoint(1809574.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:45:00Z")), + new TimeSeriesPoint(1803896.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:50:00Z")), + new TimeSeriesPoint(1803850.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:55:00Z")), + new TimeSeriesPoint(1803854.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:00:00Z")), + new TimeSeriesPoint(1803854.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:05:00Z")), + new TimeSeriesPoint(1803797.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:10:00Z")), + new TimeSeriesPoint(1803921.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:15:00Z")), + new TimeSeriesPoint(1803933.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:20:00Z")), + new TimeSeriesPoint(1804040.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:25:00Z")), + new TimeSeriesPoint(1804044.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:30:00Z")), + new TimeSeriesPoint(1804070.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:35:00Z")), + new TimeSeriesPoint(1804070.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:40:00Z")), + new TimeSeriesPoint(1804068.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:45:00Z")), + new TimeSeriesPoint(1804073.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:50:00Z")), + new TimeSeriesPoint(1804101.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:55:00Z")), + new TimeSeriesPoint(1804674.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:00:00Z")), + new TimeSeriesPoint(1804714.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:05:00Z")), + new TimeSeriesPoint(1804730.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:10:00Z")), + new TimeSeriesPoint(1804816.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:15:00Z")), + new TimeSeriesPoint(1803996.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:20:00Z")), + new TimeSeriesPoint(1803998.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:25:00Z")), + new TimeSeriesPoint(1804015.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:30:00Z")), + new TimeSeriesPoint(1804047.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:35:00Z")), + new TimeSeriesPoint(1804050.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:40:00Z")), + new TimeSeriesPoint(1804218.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:45:00Z")), + new TimeSeriesPoint(1804217.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:50:00Z")), + new TimeSeriesPoint(1804217.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:55:00Z")), + new TimeSeriesPoint(1804205.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:00:00Z")), + new TimeSeriesPoint(1804728.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:05:00Z")), + new TimeSeriesPoint(1804748.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:10:00Z")), + new TimeSeriesPoint(1805232.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:15:00Z")), + new TimeSeriesPoint(1814121.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:20:00Z")), + new TimeSeriesPoint(1806789.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:25:00Z")), + new TimeSeriesPoint(1806119.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:30:00Z")), + new TimeSeriesPoint(1806329.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:35:00Z")), + new TimeSeriesPoint(1806454.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:40:00Z")), + new TimeSeriesPoint(1806852.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:45:00Z")), + new TimeSeriesPoint(1807347.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:50:00Z")), + new TimeSeriesPoint(1812144.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:55:00Z")), + new TimeSeriesPoint(1807418.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:00:00Z")), + new TimeSeriesPoint(1807418.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:05:00Z")), + new TimeSeriesPoint(1807432.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:10:00Z")), + new TimeSeriesPoint(1808540.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:15:00Z")), + new TimeSeriesPoint(1808541.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:20:00Z")), + new TimeSeriesPoint(1807831.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:25:00Z")), + new TimeSeriesPoint(1807852.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:30:00Z")), + new TimeSeriesPoint(1807811.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:35:00Z")), + new TimeSeriesPoint(2214285.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:40:00Z")), + new TimeSeriesPoint(2215019.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:45:00Z")), + new TimeSeriesPoint(2215329.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:50:00Z")), + new TimeSeriesPoint(2215097.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:55:00Z")), + new TimeSeriesPoint(2215129.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:00:00Z")), + new TimeSeriesPoint(2215120.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:05:00Z")), + new TimeSeriesPoint(2217056.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:10:00Z")), + new TimeSeriesPoint(2217056.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:15:00Z")), + new TimeSeriesPoint(2222126.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:20:00Z")), + new TimeSeriesPoint(2226472.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:25:00Z")), + new TimeSeriesPoint(2226722.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:30:00Z")), + new TimeSeriesPoint(2226729.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:35:00Z")), + new TimeSeriesPoint(2226735.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:40:00Z")), + new TimeSeriesPoint(2226735.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:45:00Z")), + new TimeSeriesPoint(2226735.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:50:00Z")), + new TimeSeriesPoint(2226952.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:55:00Z")), + new TimeSeriesPoint(2226962.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:00:00Z")), + new TimeSeriesPoint(2649337.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:05:00Z")), + new TimeSeriesPoint(2092796.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:10:00Z")), + new TimeSeriesPoint(2092839.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:15:00Z")), + new TimeSeriesPoint(2092940.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:20:00Z")), + new TimeSeriesPoint(2092940.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:25:00Z")), + new TimeSeriesPoint(2092965.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:30:00Z")), + new TimeSeriesPoint(2092979.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:35:00Z")), + new TimeSeriesPoint(2095588.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:40:00Z")), + new TimeSeriesPoint(2099586.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:45:00Z")), + new TimeSeriesPoint(2102981.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:50:00Z")), + new TimeSeriesPoint(2108053.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:55:00Z")), + new TimeSeriesPoint(2107907.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:00:00Z")), + new TimeSeriesPoint(2108241.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:05:00Z")), + new TimeSeriesPoint(2100321.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:10:00Z")), + new TimeSeriesPoint(2100448.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:15:00Z")), + new TimeSeriesPoint(2100483.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:20:00Z")), + new TimeSeriesPoint(2103042.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:25:00Z")), + new TimeSeriesPoint(2103037.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:30:00Z")), + new TimeSeriesPoint(2103040.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:35:00Z")), + new TimeSeriesPoint(2103054.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:40:00Z")), + new TimeSeriesPoint(2103058.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:45:00Z")), + new TimeSeriesPoint(1830757.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:50:00Z")), + new TimeSeriesPoint(1830855.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:55:00Z")), + new TimeSeriesPoint(1831495.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:00:00Z")), + new TimeSeriesPoint(1831463.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:05:00Z")), + new TimeSeriesPoint(1831963.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:10:00Z")), + new TimeSeriesPoint(1832046.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:15:00Z")), + new TimeSeriesPoint(1832070.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:20:00Z")), + new TimeSeriesPoint(1835511.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:25:00Z")), + new TimeSeriesPoint(1835265.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:30:00Z")), + new TimeSeriesPoint(1835481.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:35:00Z")), + new TimeSeriesPoint(1835578.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:40:00Z")), + new TimeSeriesPoint(1835611.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:45:00Z")), + new TimeSeriesPoint(1836314.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:50:00Z")), + new TimeSeriesPoint(1836369.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:55:00Z")), + new TimeSeriesPoint(1837280.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:00:00Z")), + new TimeSeriesPoint(1842939.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:05:00Z")), + new TimeSeriesPoint(1843126.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:10:00Z")), + new TimeSeriesPoint(1845840.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:15:00Z")), + new TimeSeriesPoint(1842444.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:20:00Z")), + new TimeSeriesPoint(1839891.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:25:00Z")), + new TimeSeriesPoint(1839875.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:30:00Z")), + new TimeSeriesPoint(1839870.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:35:00Z")), + new TimeSeriesPoint(1840090.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:40:00Z")), + new TimeSeriesPoint(1840479.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:45:00Z")), + new TimeSeriesPoint(1840479.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:50:00Z")), + new TimeSeriesPoint(1840482.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:55:00Z")), + new TimeSeriesPoint(1841522.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:00:00Z")), + new TimeSeriesPoint(1841836.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:05:00Z")), + new TimeSeriesPoint(1842377.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:10:00Z")), + new TimeSeriesPoint(1842388.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:15:00Z")), + new TimeSeriesPoint(1842489.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:20:00Z")), + new TimeSeriesPoint(1842489.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:25:00Z")), + new TimeSeriesPoint(1842489.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:30:00Z")), + new TimeSeriesPoint(1842496.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:35:00Z")), + new TimeSeriesPoint(1842689.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:40:00Z")), + new TimeSeriesPoint(1843117.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:45:00Z")), + new TimeSeriesPoint(1843116.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:50:00Z")), + new TimeSeriesPoint(1843227.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:55:00Z")), + new TimeSeriesPoint(1843138.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:00:00Z")), + new TimeSeriesPoint(1843141.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:05:00Z")), + new TimeSeriesPoint(1843310.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:10:00Z")), + new TimeSeriesPoint(1843310.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:15:00Z")), + new TimeSeriesPoint(1843507.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:20:00Z")), + new TimeSeriesPoint(1843953.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:25:00Z")), + new TimeSeriesPoint(1844778.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:30:00Z")), + new TimeSeriesPoint(1843918.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:35:00Z")), + new TimeSeriesPoint(1882692.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:40:00Z")), + new TimeSeriesPoint(1974888.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:45:00Z")), + new TimeSeriesPoint(2157136.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:50:00Z")), + new TimeSeriesPoint(2154987.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:55:00Z")), + new TimeSeriesPoint(2155664.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:00:00Z")), + new TimeSeriesPoint(2155660.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:05:00Z")), + new TimeSeriesPoint(2155824.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:10:00Z")), + new TimeSeriesPoint(2155824.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:15:00Z")), + new TimeSeriesPoint(2156329.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:20:00Z")), + new TimeSeriesPoint(2156479.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:25:00Z")), + new TimeSeriesPoint(2165269.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:30:00Z")), + new TimeSeriesPoint(2165433.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:35:00Z")), + new TimeSeriesPoint(2165739.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:40:00Z")), + new TimeSeriesPoint(2165931.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:45:00Z")), + new TimeSeriesPoint(2165928.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:50:00Z")), + new TimeSeriesPoint(2165989.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:55:00Z")), + new TimeSeriesPoint(2228961.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:00:00Z")), + new TimeSeriesPoint(2228961.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:05:00Z")), + new TimeSeriesPoint(2228961.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:10:00Z")), + new TimeSeriesPoint(2485802.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:15:00Z")), + new TimeSeriesPoint(2485802.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:20:00Z")), + new TimeSeriesPoint(2486021.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:25:00Z")), + new TimeSeriesPoint(2485293.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:30:00Z")), + new TimeSeriesPoint(2485293.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:35:00Z")), + new TimeSeriesPoint(2485324.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:40:00Z")), + new TimeSeriesPoint(2489142.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:45:00Z")), + new TimeSeriesPoint(2526312.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:50:00Z")), + new TimeSeriesPoint(2526313.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:55:00Z")), + new TimeSeriesPoint(2526314.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:00:00Z")), + new TimeSeriesPoint(2526324.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:05:00Z")), + new TimeSeriesPoint(2526325.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:10:00Z")), + new TimeSeriesPoint(2526205.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:15:00Z")), + new TimeSeriesPoint(2526226.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:20:00Z")), + new TimeSeriesPoint(2526475.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:25:00Z")), + new TimeSeriesPoint(2526471.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:30:00Z")), + new TimeSeriesPoint(2526471.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:35:00Z")), + new TimeSeriesPoint(2526534.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:40:00Z")), + new TimeSeriesPoint(2526646.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:45:00Z")), + new TimeSeriesPoint(2526646.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:50:00Z")), + new TimeSeriesPoint(2526648.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:55:00Z")), + new TimeSeriesPoint(2526658.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:00:00Z")), + new TimeSeriesPoint(2526771.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:05:00Z")), + new TimeSeriesPoint(2526773.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:10:00Z")), + new TimeSeriesPoint(2526793.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:15:00Z")), + new TimeSeriesPoint(2527010.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:20:00Z")), + new TimeSeriesPoint(2527031.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:25:00Z")), + new TimeSeriesPoint(3178096.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:30:00Z")), + new TimeSeriesPoint(3196305.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:35:00Z")), + new TimeSeriesPoint(3196202.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:40:00Z")), + new TimeSeriesPoint(3196202.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:45:00Z")), + new TimeSeriesPoint(3196205.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:50:00Z")), + new TimeSeriesPoint(3229232.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:55:00Z")), + new TimeSeriesPoint(3230463.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:00:00Z")), + new TimeSeriesPoint(3230468.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:05:00Z")), + new TimeSeriesPoint(3230468.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:10:00Z")), + new TimeSeriesPoint(3230468.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:15:00Z")), + new TimeSeriesPoint(3230470.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:20:00Z")), + new TimeSeriesPoint(3230467.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:25:00Z")), + new TimeSeriesPoint(3230506.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:30:00Z")), + new TimeSeriesPoint(3231536.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:35:00Z")), + new TimeSeriesPoint(3230723.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:40:00Z")), + new TimeSeriesPoint(3230727.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:45:00Z")), + new TimeSeriesPoint(3230727.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:50:00Z")), + new TimeSeriesPoint(3230727.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:55:00Z")), + new TimeSeriesPoint(3231880.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:00:00Z")), + new TimeSeriesPoint(3232283.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:05:00Z")), + new TimeSeriesPoint(3232283.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:10:00Z")), + new TimeSeriesPoint(3232283.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:15:00Z")), + new TimeSeriesPoint(3232325.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:20:00Z")), + new TimeSeriesPoint(3232323.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:25:00Z")), + new TimeSeriesPoint(3232327.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:30:00Z")), + new TimeSeriesPoint(3232340.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:35:00Z")), + new TimeSeriesPoint(3232713.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:40:00Z")), + new TimeSeriesPoint(3232729.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:45:00Z")), + new TimeSeriesPoint(3232756.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:50:00Z")), + new TimeSeriesPoint(3233500.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:55:00Z")), + new TimeSeriesPoint(3233500.0).setTimestamp(OffsetDateTime.parse("2017-01-02T04:00:00Z")), + new TimeSeriesPoint(3233500.0).setTimestamp(OffsetDateTime.parse("2017-01-02T04:05:00Z"))), + TimeGranularity.PER_MINUTE).setCustomInterval(5) + .setPeriod(0) + .setStableTrendWindow(10) + .setThreshold(0.99D)); + // END:com.azure.ai.anomalydetector.generated.univariate-detect-univariate-change-point.univariate-detection-of-a-change-point + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.csv b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.csv new file mode 100644 index 000000000000..7f242c3712c1 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.csv @@ -0,0 +1,47 @@ +2018-03-01T00:00:00Z,32858923 +2018-03-02T00:00:00Z,29615278 +2018-03-03T00:00:00Z,22839355 +2018-03-04T00:00:00Z,25948736 +2018-03-05T00:00:00Z,34139159 +2018-03-06T00:00:00Z,33843985 +2018-03-07T00:00:00Z,33637661 +2018-03-08T00:00:00Z,32627350 +2018-03-09T00:00:00Z,29881076 +2018-03-10T00:00:00Z,22681575 +2018-03-11T00:00:00Z,24629393 +2018-03-12T00:00:00Z,34010679 +2018-03-13T00:00:00Z,33893888 +2018-03-14T00:00:00Z,33760076 +2018-03-15T00:00:00Z,33093515 +2018-03-16T00:00:00Z,29945555 +2018-03-17T00:00:00Z,22676212 +2018-03-18T00:00:00Z,25262514 +2018-03-19T00:00:00Z,33631649 +2018-03-20T00:00:00Z,34468310 +2018-03-21T00:00:00Z,34212281 +2018-03-22T00:00:00Z,38144434 +2018-03-23T00:00:00Z,34662949 +2018-03-24T00:00:00Z,24623684 +2018-03-25T00:00:00Z,26530491 +2018-03-26T00:00:00Z,35445003 +2018-03-27T00:00:00Z,34250789 +2018-03-28T00:00:00Z,33423012 +2018-03-29T00:00:00Z,30744783 +2018-03-30T00:00:00Z,25825128 +2018-03-31T00:00:00Z,21244209 +2018-04-01T00:00:00Z,22576956 +2018-04-02T00:00:00Z,31957221 +2018-04-03T00:00:00Z,33841228 +2018-04-04T00:00:00Z,33554483 +2018-04-05T00:00:00Z,32383350 +2018-04-06T00:00:00Z,29494850 +2018-04-07T00:00:00Z,22815534 +2018-04-08T00:00:00Z,25557267 +2018-04-09T00:00:00Z,34858252 +2018-04-10T00:00:00Z,34750597 +2018-04-11T00:00:00Z,34717956 +2018-04-12T00:00:00Z,34132534 +2018-04-13T00:00:00Z,30762236 +2018-04-14T00:00:00Z,22504059 +2018-04-15T00:00:00Z,26149060 +2018-04-16T00:00:00Z,35250105 \ No newline at end of file diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.json b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.json new file mode 100644 index 000000000000..eabf3ddd9679 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/request-data.json @@ -0,0 +1,51 @@ +{ + "series":[ + {"timestamp":"2018-03-01T00:00:00Z", "value":32858923}, + {"timestamp":"2018-03-02T00:00:00Z", "value":29615278}, + {"timestamp":"2018-03-03T00:00:00Z", "value":22839355}, + {"timestamp":"2018-03-04T00:00:00Z", "value":25948736}, + {"timestamp":"2018-03-05T00:00:00Z", "value":34139159}, + {"timestamp":"2018-03-06T00:00:00Z", "value":33843985}, + {"timestamp":"2018-03-07T00:00:00Z", "value":33637661}, + {"timestamp":"2018-03-08T00:00:00Z", "value":32627350}, + {"timestamp":"2018-03-09T00:00:00Z", "value":29881076}, + {"timestamp":"2018-03-10T00:00:00Z", "value":22681575}, + {"timestamp":"2018-03-11T00:00:00Z", "value":24629393}, + {"timestamp":"2018-03-12T00:00:00Z", "value":34010679}, + {"timestamp":"2018-03-13T00:00:00Z", "value":33893888}, + {"timestamp":"2018-03-14T00:00:00Z", "value":33760076}, + {"timestamp":"2018-03-15T00:00:00Z", "value":33093515}, + {"timestamp":"2018-03-16T00:00:00Z", "value":29945555}, + {"timestamp":"2018-03-17T00:00:00Z", "value":22676212}, + {"timestamp":"2018-03-18T00:00:00Z", "value":25262514}, + {"timestamp":"2018-03-19T00:00:00Z", "value":33631649}, + {"timestamp":"2018-03-20T00:00:00Z", "value":34468310}, + {"timestamp":"2018-03-21T00:00:00Z", "value":34212281}, + {"timestamp":"2018-03-22T00:00:00Z", "value":38144434}, + {"timestamp":"2018-03-23T00:00:00Z", "value":34662949}, + {"timestamp":"2018-03-24T00:00:00Z", "value":24623684}, + {"timestamp":"2018-03-25T00:00:00Z", "value":26530491}, + {"timestamp":"2018-03-26T00:00:00Z", "value":35445003}, + {"timestamp":"2018-03-27T00:00:00Z", "value":34250789}, + {"timestamp":"2018-03-28T00:00:00Z", "value":33423012}, + {"timestamp":"2018-03-29T00:00:00Z", "value":30744783}, + {"timestamp":"2018-03-30T00:00:00Z", "value":25825128}, + {"timestamp":"2018-03-31T00:00:00Z", "value":21244209}, + {"timestamp":"2018-04-01T00:00:00Z", "value":22576956}, + {"timestamp":"2018-04-02T00:00:00Z", "value":31957221}, + {"timestamp":"2018-04-03T00:00:00Z", "value":33841228}, + {"timestamp":"2018-04-04T00:00:00Z", "value":33554483}, + {"timestamp":"2018-04-05T00:00:00Z", "value":32383350}, + {"timestamp":"2018-04-06T00:00:00Z", "value":29494850}, + {"timestamp":"2018-04-07T00:00:00Z", "value":22815534}, + {"timestamp":"2018-04-08T00:00:00Z", "value":25557267}, + {"timestamp":"2018-04-09T00:00:00Z", "value":34858252}, + {"timestamp":"2018-04-10T00:00:00Z", "value":34750597}, + {"timestamp":"2018-04-11T00:00:00Z", "value":34717956}, + {"timestamp":"2018-04-12T00:00:00Z", "value":34132534}, + {"timestamp":"2018-04-13T00:00:00Z", "value":30762236}, + {"timestamp":"2018-04-14T00:00:00Z", "value":22504059}, + {"timestamp":"2018-04-15T00:00:00Z", "value":26149060}, + {"timestamp":"2018-04-16T00:00:00Z", "value":35250105} + ] +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/sync_infer_body.json b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/sync_infer_body.json new file mode 100644 index 000000000000..9a849a64489f --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/samples/java/sample_data/sync_infer_body.json @@ -0,0 +1,12545 @@ +{ + "variables": [ + { + "variable": "series_0", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.579851442290506, + 0.6283434038457479, + 0.4504514278560624, + 0.3932233846901343, + 0.1674282353266664, + 0.630441261790587, + 0.6038052340868525, + 0.6504520081920425, + 0.6900040558067796, + 0.9592683157322113, + 0.8637303113196916, + 0.7060394530232093, + 0.12307332500532087, + 0.531489360962655, + 0.6870507978847801, + 0.6517345808133034, + 0.21813713730036166, + 0.7919840925472428, + 0.7639162095143875, + 0.8811551807541605, + 0.5681940866126549, + 0.658595599675099, + 0.46693157082369463, + 0.03829150947150628, + 0.9770763177215016, + 0.4734352229845479, + 0.4075216450233816, + 0.06654629211052676, + 0.46175595274554226, + 0.5796075053291201, + 0.42462400868882433, + 0.8171554913798853, + 0.41069524690498527, + 0.46309625076526595, + 0.4970648166994448, + 0.18596131671608762, + 0.024102219917705225, + 0.43084122348740095, + 0.7989105420786575, + 0.5104853797050489, + 0.4308027641465153, + 0.9829960776444482, + 0.8246137678128441, + 0.507352185361256, + 0.1103224548947549, + 0.11714584034845932, + 0.26999267201289356, + 0.21871053526419593, + 0.18527741137342202, + 0.4995160276196944, + 0.9048320394055158, + 0.31408795999168015, + 0.4040792590485244, + 0.9964416231206911, + 0.5568213348316201, + 0.8823221318575026, + 0.053834108393478686, + 0.13084980692118142, + 0.6300045796825212, + 0.7479229454446744, + 0.4483254156069776, + 0.7319262778756604, + 0.2953828921869085, + 0.7743936973415074, + 0.6122478882423863, + 0.9768423450867112, + 0.4034761871052335, + 0.8883840708602049, + 0.2812833885537983, + 0.7786225843047461, + 0.3711936282870032, + 0.5838303076345319, + 0.9148604204506962, + 0.6998273162982676, + 0.2149059574415645, + 0.24029372463263388, + 0.5299280576295401, + 0.9483381946406384, + 0.30655432728692567, + 0.57390002445048, + 0.8059461029088039, + 0.014305123928379682, + 0.195162209418677, + 0.7773398960130304, + 0.21812392280708925, + 0.33441116982216934, + 0.11681242331082442, + 0.5054900262309758, + 0.37017192337367266, + 0.26607668268403384, + 0.6979860660343318, + 0.0783110759413227, + 0.5950893487149188, + 0.834285347706301, + 0.7515905474594615, + 0.7811412620721393, + 0.5906413448797235, + 0.7512089340660952, + 0.4036323004909098, + 0.6893049667536647, + 0.4269914217577332, + 0.972292863282217, + 0.04171018378000313, + 0.9590167227829469, + 0.11985301135989712, + 0.3956523281688148, + 0.59957660620743, + 0.345812703077123, + 0.6026907756092583, + 0.7055308296557591, + 0.8073713080937847, + 0.7027611961502496, + 0.037099971637395424, + 0.48901029101078053, + 0.30618359784627525, + 0.4225754204661013, + 0.2917260078915478, + 0.4225031944742883, + 0.50059805948515, + 0.5307380167878961, + 0.6786286228869445, + 0.4703058964713792, + 0.7952680277572565, + 0.8784386573920652, + 0.21571437285517103, + 0.8239299809802759, + 0.3106588911394388, + 0.6119019576412006, + 0.254921097919502, + 0.2848837002861283, + 0.8518825001334218, + 0.6761040882234188, + 0.6301740975897414, + 0.16737765714403452, + 0.4341871318189866, + 0.7520137441718346, + 0.7343679659536673, + 0.863135001985155, + 0.1839176138805163, + 0.4321888943328053, + 0.795894226277464, + 0.6763850906896225, + 0.6869006728325415, + 0.26906680021449947, + 0.671010227102288, + 0.6354142059299305, + 0.8467755939284247, + 0.38609300820249404, + 0.17453173424804147, + 0.7114728526256804, + 0.25307843517870354, + 0.3350286820500781, + 0.3072840970430727, + 0.9257445043845917, + 0.9010599494942975, + 0.779519919860808, + 0.41328412852102037, + 0.3200899221320188, + 0.3734208291843151, + 0.6741561028111682, + 0.9751970221400001, + 0.5741588735755123, + 0.20002360437916433, + 0.2745238247620547, + 0.8996857567732303, + 0.02728768608307175, + 0.3152344627172815, + 0.30167625892308503, + 0.013964792568767592, + 0.07603371229331946, + 0.25102470984577485, + 0.6425678176156432, + 0.28009065271955635, + 0.00660641763519354, + 0.5579247635078589, + 0.7298677826687249, + 0.5549047715126516, + 0.36942377178343755, + 0.9628706964781225, + 0.7200585580649331, + 0.3993404943133191, + 0.017853361932931744, + 0.9517112869844709, + 0.9377008061473899, + 0.46183965111601455, + 0.14036733190475537, + 0.1303004327624977, + 0.44096898085343184, + 0.5768493239299738, + 0.030731405144652224, + 0.7472763299847744, + 0.9514531152595836, + 0.2652505875695019, + 0.7127026497954756, + 0.3352710715651487, + 0.9035769737901723, + 0.060851013208677585, + 0.13311472641468902, + 0.6118531981685167, + 0.5258775156510428, + 0.4641393563138716, + 0.026956161013478197, + 0.47619884060993034, + 0.8341848629545406, + 0.6736864361820483, + 0.9458269541236444, + 0.7322384664422258, + 0.47433352630190506, + 0.7085332851968889, + 0.255726084124823, + 0.6610141993705847, + 0.6415618205835592, + 0.35188201951381626, + 0.057391378685602956, + 0.36692135067571363, + 0.7714292564563653, + 0.33148327080693374, + 0.17771388234402574, + 0.5720931597455913, + 0.22219255698937967, + 0.1655206208242932, + 0.5516375957135302, + 0.13009422558403894, + 0.16051853671327898, + 0.00980529503632488, + 0.8920460192814085, + 0.8800609144754364, + 0.8858623339108258, + 0.6475594667317249, + 0.7186692670017965, + 0.9560721121500638, + 0.7544619282145179, + 0.23855254989560248, + 0.3460077570575414, + 0.6678545340110837, + 0.965857266327586, + 0.3517023475799894, + 0.7050162193768086, + 0.8474625620533361, + 0.34167227833878466, + 0.23907465558329621, + 0.008731050347155711, + 0.15928040357451112, + 0.6120284698113603, + 0.5654274136568886, + 0.08479187783119102, + 0.2954365139926882, + 0.9202408581766002, + 0.8435355989007527, + 0.06955766049982759, + 0.9261455093921811, + 0.37295890734145454, + 0.16360228826676348, + 0.7792272255492546, + 0.44865171599474507, + 0.8481006139505533, + 0.4279801346818851, + 0.1938390085645525, + 0.27880283646357884, + 0.6633776284133177, + 0.6410890118943386, + 0.0825976542888045, + 0.2939103498932336, + 0.9451829389144697, + 0.8073902057390331, + 0.6009229570362895, + 0.6440062523233666, + 0.04321128699700327, + 0.5101785226464819, + 0.3639059902373821, + 0.5855228728127307, + 0.7851832290326292, + 0.17026122117997688, + 0.43554889842419753, + 0.4684272081864731, + 0.83989201438257, + 0.828369334495118, + 0.6967351938445232, + 0.3714092425773875, + 0.6519202890403731, + 0.48482103681136524, + 0.44824225635434756, + 0.3365910986328733, + 0.8691534071329386, + 0.2450411238557928, + 0.46779688384975526, + 0.35634560224945766, + 0.2784352991500587, + 0.16063451783860305, + 0.4960244098430814, + 0.5320832681896275, + 0.43462369721484484, + 0.9553287708229896, + 0.696569402574327, + 0.7677301134404914, + 0.676567069428193, + 0.14784143367809421, + 0.4924778971718703, + 0.9003315637024765, + 0.20643995699702855, + 0.18646615219806373, + 0.446933449529637, + 0.17459908817627423, + 0.7844967715982246, + 0.4685047861439231, + 0.5340711084334715, + 0.4262294081569715, + 0.27723299622774866, + 0.3736274815684706, + 0.28689162322590644 + ] + }, + { + "variable": "series_1", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_2", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.579851442290506, + 0.6283434038457479, + 0.4504514278560624, + 0.3932233846901343, + 0.1674282353266664, + 0.630441261790587, + 0.6038052340868525, + 0.6504520081920425, + 0.6900040558067796, + 0.9592683157322113, + 0.8637303113196916, + 0.7060394530232093, + 0.12307332500532087, + 0.531489360962655, + 0.6870507978847801, + 0.6517345808133034, + 0.21813713730036166, + 0.7919840925472428, + 0.7639162095143875, + 0.8811551807541605, + 0.5681940866126549, + 0.658595599675099, + 0.46693157082369463, + 0.03829150947150628, + 0.9770763177215016, + 0.4734352229845479, + 0.4075216450233816, + 0.06654629211052676, + 0.46175595274554226, + 0.5796075053291201, + 0.42462400868882433, + 0.8171554913798853, + 0.41069524690498527, + 0.46309625076526595, + 0.4970648166994448, + 0.18596131671608762, + 0.024102219917705225, + 0.43084122348740095, + 0.7989105420786575, + 0.5104853797050489, + 0.4308027641465153, + 0.9829960776444482, + 0.8246137678128441, + 0.507352185361256, + 0.1103224548947549, + 0.11714584034845932, + 0.26999267201289356, + 0.21871053526419593, + 0.18527741137342202, + 0.4995160276196944, + 0.9048320394055158, + 0.31408795999168015, + 0.4040792590485244, + 0.9964416231206911, + 0.5568213348316201, + 0.8823221318575026, + 0.053834108393478686, + 0.13084980692118142, + 0.6300045796825212, + 0.7479229454446744, + 0.4483254156069776, + 0.7319262778756604, + 0.2953828921869085, + 0.7743936973415074, + 0.6122478882423863, + 0.9768423450867112, + 0.4034761871052335, + 0.8883840708602049, + 0.2812833885537983, + 0.7786225843047461, + 0.3711936282870032, + 0.5838303076345319, + 0.9148604204506962, + 0.6998273162982676, + 0.2149059574415645, + 0.24029372463263388, + 0.5299280576295401, + 0.9483381946406384, + 0.30655432728692567, + 0.57390002445048, + 0.8059461029088039, + 0.014305123928379682, + 0.195162209418677, + 0.7773398960130304, + 0.21812392280708925, + 0.33441116982216934, + 0.11681242331082442, + 0.5054900262309758, + 0.37017192337367266, + 0.26607668268403384, + 0.6979860660343318, + 0.0783110759413227, + 0.5950893487149188, + 0.834285347706301, + 0.7515905474594615, + 0.7811412620721393, + 0.5906413448797235, + 0.7512089340660952, + 0.4036323004909098, + 0.6893049667536647, + 0.4269914217577332, + 0.972292863282217, + 0.04171018378000313, + 0.9590167227829469, + 0.11985301135989712, + 0.3956523281688148, + 0.59957660620743, + 0.345812703077123, + 0.6026907756092583, + 0.7055308296557591, + 0.8073713080937847, + 0.7027611961502496, + 0.037099971637395424, + 0.48901029101078053, + 0.30618359784627525, + 0.4225754204661013, + 0.2917260078915478, + 0.4225031944742883, + 0.50059805948515, + 0.5307380167878961, + 0.6786286228869445, + 0.4703058964713792, + 0.7952680277572565, + 0.8784386573920652, + 0.21571437285517103, + 0.8239299809802759, + 0.3106588911394388, + 0.6119019576412006, + 0.254921097919502, + 0.2848837002861283, + 0.8518825001334218, + 0.6761040882234188, + 0.6301740975897414, + 0.16737765714403452, + 0.4341871318189866, + 0.7520137441718346, + 0.7343679659536673, + 0.863135001985155, + 0.1839176138805163, + 0.4321888943328053, + 0.795894226277464, + 0.6763850906896225, + 0.6869006728325415, + 0.26906680021449947, + 0.671010227102288, + 0.6354142059299305, + 0.8467755939284247, + 0.38609300820249404, + 0.17453173424804147, + 0.7114728526256804, + 0.25307843517870354, + 0.3350286820500781, + 0.3072840970430727, + 0.9257445043845917, + 0.9010599494942975, + 0.779519919860808, + 0.41328412852102037, + 0.3200899221320188, + 0.3734208291843151, + 0.6741561028111682, + 0.9751970221400001, + 0.5741588735755123, + 0.20002360437916433, + 0.2745238247620547, + 0.8996857567732303, + 0.02728768608307175, + 0.3152344627172815, + 0.30167625892308503, + 0.013964792568767592, + 0.07603371229331946, + 0.25102470984577485, + 0.6425678176156432, + 0.28009065271955635, + 0.00660641763519354, + 0.5579247635078589, + 0.7298677826687249, + 0.5549047715126516, + 0.36942377178343755, + 0.9628706964781225, + 0.7200585580649331, + 0.3993404943133191, + 0.017853361932931744, + 0.9517112869844709, + 0.9377008061473899, + 0.46183965111601455, + 0.14036733190475537, + 0.1303004327624977, + 0.44096898085343184, + 0.5768493239299738, + 0.030731405144652224, + 0.7472763299847744, + 0.9514531152595836, + 0.2652505875695019, + 0.7127026497954756, + 0.3352710715651487, + 0.9035769737901723, + 0.060851013208677585, + 0.13311472641468902, + 0.6118531981685167, + 0.5258775156510428, + 0.4641393563138716, + 0.026956161013478197, + 0.47619884060993034, + 0.8341848629545406, + 0.6736864361820483, + 0.9458269541236444, + 0.7322384664422258, + 0.47433352630190506, + 0.7085332851968889, + 0.255726084124823, + 0.6610141993705847, + 0.6415618205835592, + 0.35188201951381626, + 0.057391378685602956, + 0.36692135067571363, + 0.7714292564563653, + 0.33148327080693374, + 0.17771388234402574, + 0.5720931597455913, + 0.22219255698937967, + 0.1655206208242932, + 0.5516375957135302, + 0.13009422558403894, + 0.16051853671327898, + 0.00980529503632488, + 0.8920460192814085, + 0.8800609144754364, + 0.8858623339108258, + 0.6475594667317249, + 0.7186692670017965, + 0.9560721121500638, + 0.7544619282145179, + 0.23855254989560248, + 0.3460077570575414, + 0.6678545340110837, + 0.965857266327586, + 0.3517023475799894, + 0.7050162193768086, + 0.8474625620533361, + 0.34167227833878466, + 0.23907465558329621, + 0.008731050347155711, + 0.15928040357451112, + 0.6120284698113603, + 0.5654274136568886, + 0.08479187783119102, + 0.2954365139926882, + 0.9202408581766002, + 0.8435355989007527, + 0.06955766049982759, + 0.9261455093921811, + 0.37295890734145454, + 0.16360228826676348, + 0.7792272255492546, + 0.44865171599474507, + 0.8481006139505533, + 0.4279801346818851, + 0.1938390085645525, + 0.27880283646357884, + 0.6633776284133177, + 0.6410890118943386, + 0.0825976542888045, + 0.2939103498932336, + 0.9451829389144697, + 0.8073902057390331, + 0.6009229570362895, + 0.6440062523233666, + 0.04321128699700327, + 0.5101785226464819, + 0.3639059902373821, + 0.5855228728127307, + 0.7851832290326292, + 0.17026122117997688, + 0.43554889842419753, + 0.4684272081864731, + 0.83989201438257, + 0.828369334495118, + 0.6967351938445232, + 0.3714092425773875, + 0.6519202890403731, + 0.48482103681136524, + 0.44824225635434756, + 0.3365910986328733, + 0.8691534071329386, + 0.2450411238557928, + 0.46779688384975526, + 0.35634560224945766, + 0.2784352991500587, + 0.16063451783860305, + 0.4960244098430814, + 0.5320832681896275, + 0.43462369721484484, + 0.9553287708229896, + 0.696569402574327, + 0.7677301134404914, + 0.676567069428193, + 0.14784143367809421, + 0.4924778971718703, + 0.9003315637024765, + 0.20643995699702855, + 0.18646615219806373, + 0.446933449529637, + 0.17459908817627423, + 0.7844967715982246, + 0.4685047861439231, + 0.5340711084334715, + 0.4262294081569715, + 0.27723299622774866, + 0.3736274815684706, + 0.28689162322590644 + ] + }, + { + "variable": "series_3", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_4", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_5", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.579851442290506, + 0.6283434038457479, + 0.4504514278560624, + 0.3932233846901343, + 0.1674282353266664, + 0.630441261790587, + 0.6038052340868525, + 0.6504520081920425, + 0.6900040558067796, + 0.9592683157322113, + 0.8637303113196916, + 0.7060394530232093, + 0.12307332500532087, + 0.531489360962655, + 0.6870507978847801, + 0.6517345808133034, + 0.21813713730036166, + 0.7919840925472428, + 0.7639162095143875, + 0.8811551807541605, + 0.5681940866126549, + 0.658595599675099, + 0.46693157082369463, + 0.03829150947150628, + 0.9770763177215016, + 0.4734352229845479, + 0.4075216450233816, + 0.06654629211052676, + 0.46175595274554226, + 0.5796075053291201, + 0.42462400868882433, + 0.8171554913798853, + 0.41069524690498527, + 0.46309625076526595, + 0.4970648166994448, + 0.18596131671608762, + 0.024102219917705225, + 0.43084122348740095, + 0.7989105420786575, + 0.5104853797050489, + 0.4308027641465153, + 0.9829960776444482, + 0.8246137678128441, + 0.507352185361256, + 0.1103224548947549, + 0.11714584034845932, + 0.26999267201289356, + 0.21871053526419593, + 0.18527741137342202, + 0.4995160276196944, + 0.9048320394055158, + 0.31408795999168015, + 0.4040792590485244, + 0.9964416231206911, + 0.5568213348316201, + 0.8823221318575026, + 0.053834108393478686, + 0.13084980692118142, + 0.6300045796825212, + 0.7479229454446744, + 0.4483254156069776, + 0.7319262778756604, + 0.2953828921869085, + 0.7743936973415074, + 0.6122478882423863, + 0.9768423450867112, + 0.4034761871052335, + 0.8883840708602049, + 0.2812833885537983, + 0.7786225843047461, + 0.3711936282870032, + 0.5838303076345319, + 0.9148604204506962, + 0.6998273162982676, + 0.2149059574415645, + 0.24029372463263388, + 0.5299280576295401, + 0.9483381946406384, + 0.30655432728692567, + 0.57390002445048, + 0.8059461029088039, + 0.014305123928379682, + 0.195162209418677, + 0.7773398960130304, + 0.21812392280708925, + 0.33441116982216934, + 0.11681242331082442, + 0.5054900262309758, + 0.37017192337367266, + 0.26607668268403384, + 0.6979860660343318, + 0.0783110759413227, + 0.5950893487149188, + 0.834285347706301, + 0.7515905474594615, + 0.7811412620721393, + 0.5906413448797235, + 0.7512089340660952, + 0.4036323004909098, + 0.6893049667536647, + 0.4269914217577332, + 0.972292863282217, + 0.04171018378000313, + 0.9590167227829469, + 0.11985301135989712, + 0.3956523281688148, + 0.59957660620743, + 0.345812703077123, + 0.6026907756092583, + 0.7055308296557591, + 0.8073713080937847, + 0.7027611961502496, + 0.037099971637395424, + 0.48901029101078053, + 0.30618359784627525, + 0.4225754204661013, + 0.2917260078915478, + 0.4225031944742883, + 0.50059805948515, + 0.5307380167878961, + 0.6786286228869445, + 0.4703058964713792, + 0.7952680277572565, + 0.8784386573920652, + 0.21571437285517103, + 0.8239299809802759, + 0.3106588911394388, + 0.6119019576412006, + 0.254921097919502, + 0.2848837002861283, + 0.8518825001334218, + 0.6761040882234188, + 0.6301740975897414, + 0.16737765714403452, + 0.4341871318189866, + 0.7520137441718346, + 0.7343679659536673, + 0.863135001985155, + 0.1839176138805163, + 0.4321888943328053, + 0.795894226277464, + 0.6763850906896225, + 0.6869006728325415, + 0.26906680021449947, + 0.671010227102288, + 0.6354142059299305, + 0.8467755939284247, + 0.38609300820249404, + 0.17453173424804147, + 0.7114728526256804, + 0.25307843517870354, + 0.3350286820500781, + 0.3072840970430727, + 0.9257445043845917, + 0.9010599494942975, + 0.779519919860808, + 0.41328412852102037, + 0.3200899221320188, + 0.3734208291843151, + 0.6741561028111682, + 0.9751970221400001, + 0.5741588735755123, + 0.20002360437916433, + 0.2745238247620547, + 0.8996857567732303, + 0.02728768608307175, + 0.3152344627172815, + 0.30167625892308503, + 0.013964792568767592, + 0.07603371229331946, + 0.25102470984577485, + 0.6425678176156432, + 0.28009065271955635, + 0.00660641763519354, + 0.5579247635078589, + 0.7298677826687249, + 0.5549047715126516, + 0.36942377178343755, + 0.9628706964781225, + 0.7200585580649331, + 0.3993404943133191, + 0.017853361932931744, + 0.9517112869844709, + 0.9377008061473899, + 0.46183965111601455, + 0.14036733190475537, + 0.1303004327624977, + 0.44096898085343184, + 0.5768493239299738, + 0.030731405144652224, + 0.7472763299847744, + 0.9514531152595836, + 0.2652505875695019, + 0.7127026497954756, + 0.3352710715651487, + 0.9035769737901723, + 0.060851013208677585, + 0.13311472641468902, + 0.6118531981685167, + 0.5258775156510428, + 0.4641393563138716, + 0.026956161013478197, + 0.47619884060993034, + 0.8341848629545406, + 0.6736864361820483, + 0.9458269541236444, + 0.7322384664422258, + 0.47433352630190506, + 0.7085332851968889, + 0.255726084124823, + 0.6610141993705847, + 0.6415618205835592, + 0.35188201951381626, + 0.057391378685602956, + 0.36692135067571363, + 0.7714292564563653, + 0.33148327080693374, + 0.17771388234402574, + 0.5720931597455913, + 0.22219255698937967, + 0.1655206208242932, + 0.5516375957135302, + 0.13009422558403894, + 0.16051853671327898, + 0.00980529503632488, + 0.8920460192814085, + 0.8800609144754364, + 0.8858623339108258, + 0.6475594667317249, + 0.7186692670017965, + 0.9560721121500638, + 0.7544619282145179, + 0.23855254989560248, + 0.3460077570575414, + 0.6678545340110837, + 0.965857266327586, + 0.3517023475799894, + 0.7050162193768086, + 0.8474625620533361, + 0.34167227833878466, + 0.23907465558329621, + 0.008731050347155711, + 0.15928040357451112, + 0.6120284698113603, + 0.5654274136568886, + 0.08479187783119102, + 0.2954365139926882, + 0.9202408581766002, + 0.8435355989007527, + 0.06955766049982759, + 0.9261455093921811, + 0.37295890734145454, + 0.16360228826676348, + 0.7792272255492546, + 0.44865171599474507, + 0.8481006139505533, + 0.4279801346818851, + 0.1938390085645525, + 0.27880283646357884, + 0.6633776284133177, + 0.6410890118943386, + 0.0825976542888045, + 0.2939103498932336, + 0.9451829389144697, + 0.8073902057390331, + 0.6009229570362895, + 0.6440062523233666, + 0.04321128699700327, + 0.5101785226464819, + 0.3639059902373821, + 0.5855228728127307, + 0.7851832290326292, + 0.17026122117997688, + 0.43554889842419753, + 0.4684272081864731, + 0.83989201438257, + 0.828369334495118, + 0.6967351938445232, + 0.3714092425773875, + 0.6519202890403731, + 0.48482103681136524, + 0.44824225635434756, + 0.3365910986328733, + 0.8691534071329386, + 0.2450411238557928, + 0.46779688384975526, + 0.35634560224945766, + 0.2784352991500587, + 0.16063451783860305, + 0.4960244098430814, + 0.5320832681896275, + 0.43462369721484484, + 0.9553287708229896, + 0.696569402574327, + 0.7677301134404914, + 0.676567069428193, + 0.14784143367809421, + 0.4924778971718703, + 0.9003315637024765, + 0.20643995699702855, + 0.18646615219806373, + 0.446933449529637, + 0.17459908817627423, + 0.7844967715982246, + 0.4685047861439231, + 0.5340711084334715, + 0.4262294081569715, + 0.27723299622774866, + 0.3736274815684706, + 0.28689162322590644 + ] + }, + { + "variable": "series_6", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_7", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.579851442290506, + 0.6283434038457479, + 0.4504514278560624, + 0.3932233846901343, + 0.1674282353266664, + 0.630441261790587, + 0.6038052340868525, + 0.6504520081920425, + 0.6900040558067796, + 0.9592683157322113, + 0.8637303113196916, + 0.7060394530232093, + 0.12307332500532087, + 0.531489360962655, + 0.6870507978847801, + 0.6517345808133034, + 0.21813713730036166, + 0.7919840925472428, + 0.7639162095143875, + 0.8811551807541605, + 0.5681940866126549, + 0.658595599675099, + 0.46693157082369463, + 0.03829150947150628, + 0.9770763177215016, + 0.4734352229845479, + 0.4075216450233816, + 0.06654629211052676, + 0.46175595274554226, + 0.5796075053291201, + 0.42462400868882433, + 0.8171554913798853, + 0.41069524690498527, + 0.46309625076526595, + 0.4970648166994448, + 0.18596131671608762, + 0.024102219917705225, + 0.43084122348740095, + 0.7989105420786575, + 0.5104853797050489, + 0.4308027641465153, + 0.9829960776444482, + 0.8246137678128441, + 0.507352185361256, + 0.1103224548947549, + 0.11714584034845932, + 0.26999267201289356, + 0.21871053526419593, + 0.18527741137342202, + 0.4995160276196944, + 0.9048320394055158, + 0.31408795999168015, + 0.4040792590485244, + 0.9964416231206911, + 0.5568213348316201, + 0.8823221318575026, + 0.053834108393478686, + 0.13084980692118142, + 0.6300045796825212, + 0.7479229454446744, + 0.4483254156069776, + 0.7319262778756604, + 0.2953828921869085, + 0.7743936973415074, + 0.6122478882423863, + 0.9768423450867112, + 0.4034761871052335, + 0.8883840708602049, + 0.2812833885537983, + 0.7786225843047461, + 0.3711936282870032, + 0.5838303076345319, + 0.9148604204506962, + 0.6998273162982676, + 0.2149059574415645, + 0.24029372463263388, + 0.5299280576295401, + 0.9483381946406384, + 0.30655432728692567, + 0.57390002445048, + 0.8059461029088039, + 0.014305123928379682, + 0.195162209418677, + 0.7773398960130304, + 0.21812392280708925, + 0.33441116982216934, + 0.11681242331082442, + 0.5054900262309758, + 0.37017192337367266, + 0.26607668268403384, + 0.6979860660343318, + 0.0783110759413227, + 0.5950893487149188, + 0.834285347706301, + 0.7515905474594615, + 0.7811412620721393, + 0.5906413448797235, + 0.7512089340660952, + 0.4036323004909098, + 0.6893049667536647, + 0.4269914217577332, + 0.972292863282217, + 0.04171018378000313, + 0.9590167227829469, + 0.11985301135989712, + 0.3956523281688148, + 0.59957660620743, + 0.345812703077123, + 0.6026907756092583, + 0.7055308296557591, + 0.8073713080937847, + 0.7027611961502496, + 0.037099971637395424, + 0.48901029101078053, + 0.30618359784627525, + 0.4225754204661013, + 0.2917260078915478, + 0.4225031944742883, + 0.50059805948515, + 0.5307380167878961, + 0.6786286228869445, + 0.4703058964713792, + 0.7952680277572565, + 0.8784386573920652, + 0.21571437285517103, + 0.8239299809802759, + 0.3106588911394388, + 0.6119019576412006, + 0.254921097919502, + 0.2848837002861283, + 0.8518825001334218, + 0.6761040882234188, + 0.6301740975897414, + 0.16737765714403452, + 0.4341871318189866, + 0.7520137441718346, + 0.7343679659536673, + 0.863135001985155, + 0.1839176138805163, + 0.4321888943328053, + 0.795894226277464, + 0.6763850906896225, + 0.6869006728325415, + 0.26906680021449947, + 0.671010227102288, + 0.6354142059299305, + 0.8467755939284247, + 0.38609300820249404, + 0.17453173424804147, + 0.7114728526256804, + 0.25307843517870354, + 0.3350286820500781, + 0.3072840970430727, + 0.9257445043845917, + 0.9010599494942975, + 0.779519919860808, + 0.41328412852102037, + 0.3200899221320188, + 0.3734208291843151, + 0.6741561028111682, + 0.9751970221400001, + 0.5741588735755123, + 0.20002360437916433, + 0.2745238247620547, + 0.8996857567732303, + 0.02728768608307175, + 0.3152344627172815, + 0.30167625892308503, + 0.013964792568767592, + 0.07603371229331946, + 0.25102470984577485, + 0.6425678176156432, + 0.28009065271955635, + 0.00660641763519354, + 0.5579247635078589, + 0.7298677826687249, + 0.5549047715126516, + 0.36942377178343755, + 0.9628706964781225, + 0.7200585580649331, + 0.3993404943133191, + 0.017853361932931744, + 0.9517112869844709, + 0.9377008061473899, + 0.46183965111601455, + 0.14036733190475537, + 0.1303004327624977, + 0.44096898085343184, + 0.5768493239299738, + 0.030731405144652224, + 0.7472763299847744, + 0.9514531152595836, + 0.2652505875695019, + 0.7127026497954756, + 0.3352710715651487, + 0.9035769737901723, + 0.060851013208677585, + 0.13311472641468902, + 0.6118531981685167, + 0.5258775156510428, + 0.4641393563138716, + 0.026956161013478197, + 0.47619884060993034, + 0.8341848629545406, + 0.6736864361820483, + 0.9458269541236444, + 0.7322384664422258, + 0.47433352630190506, + 0.7085332851968889, + 0.255726084124823, + 0.6610141993705847, + 0.6415618205835592, + 0.35188201951381626, + 0.057391378685602956, + 0.36692135067571363, + 0.7714292564563653, + 0.33148327080693374, + 0.17771388234402574, + 0.5720931597455913, + 0.22219255698937967, + 0.1655206208242932, + 0.5516375957135302, + 0.13009422558403894, + 0.16051853671327898, + 0.00980529503632488, + 0.8920460192814085, + 0.8800609144754364, + 0.8858623339108258, + 0.6475594667317249, + 0.7186692670017965, + 0.9560721121500638, + 0.7544619282145179, + 0.23855254989560248, + 0.3460077570575414, + 0.6678545340110837, + 0.965857266327586, + 0.3517023475799894, + 0.7050162193768086, + 0.8474625620533361, + 0.34167227833878466, + 0.23907465558329621, + 0.008731050347155711, + 0.15928040357451112, + 0.6120284698113603, + 0.5654274136568886, + 0.08479187783119102, + 0.2954365139926882, + 0.9202408581766002, + 0.8435355989007527, + 0.06955766049982759, + 0.9261455093921811, + 0.37295890734145454, + 0.16360228826676348, + 0.7792272255492546, + 0.44865171599474507, + 0.8481006139505533, + 0.4279801346818851, + 0.1938390085645525, + 0.27880283646357884, + 0.6633776284133177, + 0.6410890118943386, + 0.0825976542888045, + 0.2939103498932336, + 0.9451829389144697, + 0.8073902057390331, + 0.6009229570362895, + 0.6440062523233666, + 0.04321128699700327, + 0.5101785226464819, + 0.3639059902373821, + 0.5855228728127307, + 0.7851832290326292, + 0.17026122117997688, + 0.43554889842419753, + 0.4684272081864731, + 0.83989201438257, + 0.828369334495118, + 0.6967351938445232, + 0.3714092425773875, + 0.6519202890403731, + 0.48482103681136524, + 0.44824225635434756, + 0.3365910986328733, + 0.8691534071329386, + 0.2450411238557928, + 0.46779688384975526, + 0.35634560224945766, + 0.2784352991500587, + 0.16063451783860305, + 0.4960244098430814, + 0.5320832681896275, + 0.43462369721484484, + 0.9553287708229896, + 0.696569402574327, + 0.7677301134404914, + 0.676567069428193, + 0.14784143367809421, + 0.4924778971718703, + 0.9003315637024765, + 0.20643995699702855, + 0.18646615219806373, + 0.446933449529637, + 0.17459908817627423, + 0.7844967715982246, + 0.4685047861439231, + 0.5340711084334715, + 0.4262294081569715, + 0.27723299622774866, + 0.3736274815684706, + 0.28689162322590644 + ] + }, + { + "variable": "series_8", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_9", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_10", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.579851442290506, + 0.6283434038457479, + 0.4504514278560624, + 0.3932233846901343, + 0.1674282353266664, + 0.630441261790587, + 0.6038052340868525, + 0.6504520081920425, + 0.6900040558067796, + 0.9592683157322113, + 0.8637303113196916, + 0.7060394530232093, + 0.12307332500532087, + 0.531489360962655, + 0.6870507978847801, + 0.6517345808133034, + 0.21813713730036166, + 0.7919840925472428, + 0.7639162095143875, + 0.8811551807541605, + 0.5681940866126549, + 0.658595599675099, + 0.46693157082369463, + 0.03829150947150628, + 0.9770763177215016, + 0.4734352229845479, + 0.4075216450233816, + 0.06654629211052676, + 0.46175595274554226, + 0.5796075053291201, + 0.42462400868882433, + 0.8171554913798853, + 0.41069524690498527, + 0.46309625076526595, + 0.4970648166994448, + 0.18596131671608762, + 0.024102219917705225, + 0.43084122348740095, + 0.7989105420786575, + 0.5104853797050489, + 0.4308027641465153, + 0.9829960776444482, + 0.8246137678128441, + 0.507352185361256, + 0.1103224548947549, + 0.11714584034845932, + 0.26999267201289356, + 0.21871053526419593, + 0.18527741137342202, + 0.4995160276196944, + 0.9048320394055158, + 0.31408795999168015, + 0.4040792590485244, + 0.9964416231206911, + 0.5568213348316201, + 0.8823221318575026, + 0.053834108393478686, + 0.13084980692118142, + 0.6300045796825212, + 0.7479229454446744, + 0.4483254156069776, + 0.7319262778756604, + 0.2953828921869085, + 0.7743936973415074, + 0.6122478882423863, + 0.9768423450867112, + 0.4034761871052335, + 0.8883840708602049, + 0.2812833885537983, + 0.7786225843047461, + 0.3711936282870032, + 0.5838303076345319, + 0.9148604204506962, + 0.6998273162982676, + 0.2149059574415645, + 0.24029372463263388, + 0.5299280576295401, + 0.9483381946406384, + 0.30655432728692567, + 0.57390002445048, + 0.8059461029088039, + 0.014305123928379682, + 0.195162209418677, + 0.7773398960130304, + 0.21812392280708925, + 0.33441116982216934, + 0.11681242331082442, + 0.5054900262309758, + 0.37017192337367266, + 0.26607668268403384, + 0.6979860660343318, + 0.0783110759413227, + 0.5950893487149188, + 0.834285347706301, + 0.7515905474594615, + 0.7811412620721393, + 0.5906413448797235, + 0.7512089340660952, + 0.4036323004909098, + 0.6893049667536647, + 0.4269914217577332, + 0.972292863282217, + 0.04171018378000313, + 0.9590167227829469, + 0.11985301135989712, + 0.3956523281688148, + 0.59957660620743, + 0.345812703077123, + 0.6026907756092583, + 0.7055308296557591, + 0.8073713080937847, + 0.7027611961502496, + 0.037099971637395424, + 0.48901029101078053, + 0.30618359784627525, + 0.4225754204661013, + 0.2917260078915478, + 0.4225031944742883, + 0.50059805948515, + 0.5307380167878961, + 0.6786286228869445, + 0.4703058964713792, + 0.7952680277572565, + 0.8784386573920652, + 0.21571437285517103, + 0.8239299809802759, + 0.3106588911394388, + 0.6119019576412006, + 0.254921097919502, + 0.2848837002861283, + 0.8518825001334218, + 0.6761040882234188, + 0.6301740975897414, + 0.16737765714403452, + 0.4341871318189866, + 0.7520137441718346, + 0.7343679659536673, + 0.863135001985155, + 0.1839176138805163, + 0.4321888943328053, + 0.795894226277464, + 0.6763850906896225, + 0.6869006728325415, + 0.26906680021449947, + 0.671010227102288, + 0.6354142059299305, + 0.8467755939284247, + 0.38609300820249404, + 0.17453173424804147, + 0.7114728526256804, + 0.25307843517870354, + 0.3350286820500781, + 0.3072840970430727, + 0.9257445043845917, + 0.9010599494942975, + 0.779519919860808, + 0.41328412852102037, + 0.3200899221320188, + 0.3734208291843151, + 0.6741561028111682, + 0.9751970221400001, + 0.5741588735755123, + 0.20002360437916433, + 0.2745238247620547, + 0.8996857567732303, + 0.02728768608307175, + 0.3152344627172815, + 0.30167625892308503, + 0.013964792568767592, + 0.07603371229331946, + 0.25102470984577485, + 0.6425678176156432, + 0.28009065271955635, + 0.00660641763519354, + 0.5579247635078589, + 0.7298677826687249, + 0.5549047715126516, + 0.36942377178343755, + 0.9628706964781225, + 0.7200585580649331, + 0.3993404943133191, + 0.017853361932931744, + 0.9517112869844709, + 0.9377008061473899, + 0.46183965111601455, + 0.14036733190475537, + 0.1303004327624977, + 0.44096898085343184, + 0.5768493239299738, + 0.030731405144652224, + 0.7472763299847744, + 0.9514531152595836, + 0.2652505875695019, + 0.7127026497954756, + 0.3352710715651487, + 0.9035769737901723, + 0.060851013208677585, + 0.13311472641468902, + 0.6118531981685167, + 0.5258775156510428, + 0.4641393563138716, + 0.026956161013478197, + 0.47619884060993034, + 0.8341848629545406, + 0.6736864361820483, + 0.9458269541236444, + 0.7322384664422258, + 0.47433352630190506, + 0.7085332851968889, + 0.255726084124823, + 0.6610141993705847, + 0.6415618205835592, + 0.35188201951381626, + 0.057391378685602956, + 0.36692135067571363, + 0.7714292564563653, + 0.33148327080693374, + 0.17771388234402574, + 0.5720931597455913, + 0.22219255698937967, + 0.1655206208242932, + 0.5516375957135302, + 0.13009422558403894, + 0.16051853671327898, + 0.00980529503632488, + 0.8920460192814085, + 0.8800609144754364, + 0.8858623339108258, + 0.6475594667317249, + 0.7186692670017965, + 0.9560721121500638, + 0.7544619282145179, + 0.23855254989560248, + 0.3460077570575414, + 0.6678545340110837, + 0.965857266327586, + 0.3517023475799894, + 0.7050162193768086, + 0.8474625620533361, + 0.34167227833878466, + 0.23907465558329621, + 0.008731050347155711, + 0.15928040357451112, + 0.6120284698113603, + 0.5654274136568886, + 0.08479187783119102, + 0.2954365139926882, + 0.9202408581766002, + 0.8435355989007527, + 0.06955766049982759, + 0.9261455093921811, + 0.37295890734145454, + 0.16360228826676348, + 0.7792272255492546, + 0.44865171599474507, + 0.8481006139505533, + 0.4279801346818851, + 0.1938390085645525, + 0.27880283646357884, + 0.6633776284133177, + 0.6410890118943386, + 0.0825976542888045, + 0.2939103498932336, + 0.9451829389144697, + 0.8073902057390331, + 0.6009229570362895, + 0.6440062523233666, + 0.04321128699700327, + 0.5101785226464819, + 0.3639059902373821, + 0.5855228728127307, + 0.7851832290326292, + 0.17026122117997688, + 0.43554889842419753, + 0.4684272081864731, + 0.83989201438257, + 0.828369334495118, + 0.6967351938445232, + 0.3714092425773875, + 0.6519202890403731, + 0.48482103681136524, + 0.44824225635434756, + 0.3365910986328733, + 0.8691534071329386, + 0.2450411238557928, + 0.46779688384975526, + 0.35634560224945766, + 0.2784352991500587, + 0.16063451783860305, + 0.4960244098430814, + 0.5320832681896275, + 0.43462369721484484, + 0.9553287708229896, + 0.696569402574327, + 0.7677301134404914, + 0.676567069428193, + 0.14784143367809421, + 0.4924778971718703, + 0.9003315637024765, + 0.20643995699702855, + 0.18646615219806373, + 0.446933449529637, + 0.17459908817627423, + 0.7844967715982246, + 0.4685047861439231, + 0.5340711084334715, + 0.4262294081569715, + 0.27723299622774866, + 0.3736274815684706, + 0.28689162322590644 + ] + }, + { + "variable": "series_11", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_12", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.579851442290506, + 0.6283434038457479, + 0.4504514278560624, + 0.3932233846901343, + 0.1674282353266664, + 0.630441261790587, + 0.6038052340868525, + 0.6504520081920425, + 0.6900040558067796, + 0.9592683157322113, + 0.8637303113196916, + 0.7060394530232093, + 0.12307332500532087, + 0.531489360962655, + 0.6870507978847801, + 0.6517345808133034, + 0.21813713730036166, + 0.7919840925472428, + 0.7639162095143875, + 0.8811551807541605, + 0.5681940866126549, + 0.658595599675099, + 0.46693157082369463, + 0.03829150947150628, + 0.9770763177215016, + 0.4734352229845479, + 0.4075216450233816, + 0.06654629211052676, + 0.46175595274554226, + 0.5796075053291201, + 0.42462400868882433, + 0.8171554913798853, + 0.41069524690498527, + 0.46309625076526595, + 0.4970648166994448, + 0.18596131671608762, + 0.024102219917705225, + 0.43084122348740095, + 0.7989105420786575, + 0.5104853797050489, + 0.4308027641465153, + 0.9829960776444482, + 0.8246137678128441, + 0.507352185361256, + 0.1103224548947549, + 0.11714584034845932, + 0.26999267201289356, + 0.21871053526419593, + 0.18527741137342202, + 0.4995160276196944, + 0.9048320394055158, + 0.31408795999168015, + 0.4040792590485244, + 0.9964416231206911, + 0.5568213348316201, + 0.8823221318575026, + 0.053834108393478686, + 0.13084980692118142, + 0.6300045796825212, + 0.7479229454446744, + 0.4483254156069776, + 0.7319262778756604, + 0.2953828921869085, + 0.7743936973415074, + 0.6122478882423863, + 0.9768423450867112, + 0.4034761871052335, + 0.8883840708602049, + 0.2812833885537983, + 0.7786225843047461, + 0.3711936282870032, + 0.5838303076345319, + 0.9148604204506962, + 0.6998273162982676, + 0.2149059574415645, + 0.24029372463263388, + 0.5299280576295401, + 0.9483381946406384, + 0.30655432728692567, + 0.57390002445048, + 0.8059461029088039, + 0.014305123928379682, + 0.195162209418677, + 0.7773398960130304, + 0.21812392280708925, + 0.33441116982216934, + 0.11681242331082442, + 0.5054900262309758, + 0.37017192337367266, + 0.26607668268403384, + 0.6979860660343318, + 0.0783110759413227, + 0.5950893487149188, + 0.834285347706301, + 0.7515905474594615, + 0.7811412620721393, + 0.5906413448797235, + 0.7512089340660952, + 0.4036323004909098, + 0.6893049667536647, + 0.4269914217577332, + 0.972292863282217, + 0.04171018378000313, + 0.9590167227829469, + 0.11985301135989712, + 0.3956523281688148, + 0.59957660620743, + 0.345812703077123, + 0.6026907756092583, + 0.7055308296557591, + 0.8073713080937847, + 0.7027611961502496, + 0.037099971637395424, + 0.48901029101078053, + 0.30618359784627525, + 0.4225754204661013, + 0.2917260078915478, + 0.4225031944742883, + 0.50059805948515, + 0.5307380167878961, + 0.6786286228869445, + 0.4703058964713792, + 0.7952680277572565, + 0.8784386573920652, + 0.21571437285517103, + 0.8239299809802759, + 0.3106588911394388, + 0.6119019576412006, + 0.254921097919502, + 0.2848837002861283, + 0.8518825001334218, + 0.6761040882234188, + 0.6301740975897414, + 0.16737765714403452, + 0.4341871318189866, + 0.7520137441718346, + 0.7343679659536673, + 0.863135001985155, + 0.1839176138805163, + 0.4321888943328053, + 0.795894226277464, + 0.6763850906896225, + 0.6869006728325415, + 0.26906680021449947, + 0.671010227102288, + 0.6354142059299305, + 0.8467755939284247, + 0.38609300820249404, + 0.17453173424804147, + 0.7114728526256804, + 0.25307843517870354, + 0.3350286820500781, + 0.3072840970430727, + 0.9257445043845917, + 0.9010599494942975, + 0.779519919860808, + 0.41328412852102037, + 0.3200899221320188, + 0.3734208291843151, + 0.6741561028111682, + 0.9751970221400001, + 0.5741588735755123, + 0.20002360437916433, + 0.2745238247620547, + 0.8996857567732303, + 0.02728768608307175, + 0.3152344627172815, + 0.30167625892308503, + 0.013964792568767592, + 0.07603371229331946, + 0.25102470984577485, + 0.6425678176156432, + 0.28009065271955635, + 0.00660641763519354, + 0.5579247635078589, + 0.7298677826687249, + 0.5549047715126516, + 0.36942377178343755, + 0.9628706964781225, + 0.7200585580649331, + 0.3993404943133191, + 0.017853361932931744, + 0.9517112869844709, + 0.9377008061473899, + 0.46183965111601455, + 0.14036733190475537, + 0.1303004327624977, + 0.44096898085343184, + 0.5768493239299738, + 0.030731405144652224, + 0.7472763299847744, + 0.9514531152595836, + 0.2652505875695019, + 0.7127026497954756, + 0.3352710715651487, + 0.9035769737901723, + 0.060851013208677585, + 0.13311472641468902, + 0.6118531981685167, + 0.5258775156510428, + 0.4641393563138716, + 0.026956161013478197, + 0.47619884060993034, + 0.8341848629545406, + 0.6736864361820483, + 0.9458269541236444, + 0.7322384664422258, + 0.47433352630190506, + 0.7085332851968889, + 0.255726084124823, + 0.6610141993705847, + 0.6415618205835592, + 0.35188201951381626, + 0.057391378685602956, + 0.36692135067571363, + 0.7714292564563653, + 0.33148327080693374, + 0.17771388234402574, + 0.5720931597455913, + 0.22219255698937967, + 0.1655206208242932, + 0.5516375957135302, + 0.13009422558403894, + 0.16051853671327898, + 0.00980529503632488, + 0.8920460192814085, + 0.8800609144754364, + 0.8858623339108258, + 0.6475594667317249, + 0.7186692670017965, + 0.9560721121500638, + 0.7544619282145179, + 0.23855254989560248, + 0.3460077570575414, + 0.6678545340110837, + 0.965857266327586, + 0.3517023475799894, + 0.7050162193768086, + 0.8474625620533361, + 0.34167227833878466, + 0.23907465558329621, + 0.008731050347155711, + 0.15928040357451112, + 0.6120284698113603, + 0.5654274136568886, + 0.08479187783119102, + 0.2954365139926882, + 0.9202408581766002, + 0.8435355989007527, + 0.06955766049982759, + 0.9261455093921811, + 0.37295890734145454, + 0.16360228826676348, + 0.7792272255492546, + 0.44865171599474507, + 0.8481006139505533, + 0.4279801346818851, + 0.1938390085645525, + 0.27880283646357884, + 0.6633776284133177, + 0.6410890118943386, + 0.0825976542888045, + 0.2939103498932336, + 0.9451829389144697, + 0.8073902057390331, + 0.6009229570362895, + 0.6440062523233666, + 0.04321128699700327, + 0.5101785226464819, + 0.3639059902373821, + 0.5855228728127307, + 0.7851832290326292, + 0.17026122117997688, + 0.43554889842419753, + 0.4684272081864731, + 0.83989201438257, + 0.828369334495118, + 0.6967351938445232, + 0.3714092425773875, + 0.6519202890403731, + 0.48482103681136524, + 0.44824225635434756, + 0.3365910986328733, + 0.8691534071329386, + 0.2450411238557928, + 0.46779688384975526, + 0.35634560224945766, + 0.2784352991500587, + 0.16063451783860305, + 0.4960244098430814, + 0.5320832681896275, + 0.43462369721484484, + 0.9553287708229896, + 0.696569402574327, + 0.7677301134404914, + 0.676567069428193, + 0.14784143367809421, + 0.4924778971718703, + 0.9003315637024765, + 0.20643995699702855, + 0.18646615219806373, + 0.446933449529637, + 0.17459908817627423, + 0.7844967715982246, + 0.4685047861439231, + 0.5340711084334715, + 0.4262294081569715, + 0.27723299622774866, + 0.3736274815684706, + 0.28689162322590644 + ] + }, + { + "variable": "series_13", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_14", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_15", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.579851442290506, + 0.6283434038457479, + 0.4504514278560624, + 0.3932233846901343, + 0.1674282353266664, + 0.630441261790587, + 0.6038052340868525, + 0.6504520081920425, + 0.6900040558067796, + 0.9592683157322113, + 0.8637303113196916, + 0.7060394530232093, + 0.12307332500532087, + 0.531489360962655, + 0.6870507978847801, + 0.6517345808133034, + 0.21813713730036166, + 0.7919840925472428, + 0.7639162095143875, + 0.8811551807541605, + 0.5681940866126549, + 0.658595599675099, + 0.46693157082369463, + 0.03829150947150628, + 0.9770763177215016, + 0.4734352229845479, + 0.4075216450233816, + 0.06654629211052676, + 0.46175595274554226, + 0.5796075053291201, + 0.42462400868882433, + 0.8171554913798853, + 0.41069524690498527, + 0.46309625076526595, + 0.4970648166994448, + 0.18596131671608762, + 0.024102219917705225, + 0.43084122348740095, + 0.7989105420786575, + 0.5104853797050489, + 0.4308027641465153, + 0.9829960776444482, + 0.8246137678128441, + 0.507352185361256, + 0.1103224548947549, + 0.11714584034845932, + 0.26999267201289356, + 0.21871053526419593, + 0.18527741137342202, + 0.4995160276196944, + 0.9048320394055158, + 0.31408795999168015, + 0.4040792590485244, + 0.9964416231206911, + 0.5568213348316201, + 0.8823221318575026, + 0.053834108393478686, + 0.13084980692118142, + 0.6300045796825212, + 0.7479229454446744, + 0.4483254156069776, + 0.7319262778756604, + 0.2953828921869085, + 0.7743936973415074, + 0.6122478882423863, + 0.9768423450867112, + 0.4034761871052335, + 0.8883840708602049, + 0.2812833885537983, + 0.7786225843047461, + 0.3711936282870032, + 0.5838303076345319, + 0.9148604204506962, + 0.6998273162982676, + 0.2149059574415645, + 0.24029372463263388, + 0.5299280576295401, + 0.9483381946406384, + 0.30655432728692567, + 0.57390002445048, + 0.8059461029088039, + 0.014305123928379682, + 0.195162209418677, + 0.7773398960130304, + 0.21812392280708925, + 0.33441116982216934, + 0.11681242331082442, + 0.5054900262309758, + 0.37017192337367266, + 0.26607668268403384, + 0.6979860660343318, + 0.0783110759413227, + 0.5950893487149188, + 0.834285347706301, + 0.7515905474594615, + 0.7811412620721393, + 0.5906413448797235, + 0.7512089340660952, + 0.4036323004909098, + 0.6893049667536647, + 0.4269914217577332, + 0.972292863282217, + 0.04171018378000313, + 0.9590167227829469, + 0.11985301135989712, + 0.3956523281688148, + 0.59957660620743, + 0.345812703077123, + 0.6026907756092583, + 0.7055308296557591, + 0.8073713080937847, + 0.7027611961502496, + 0.037099971637395424, + 0.48901029101078053, + 0.30618359784627525, + 0.4225754204661013, + 0.2917260078915478, + 0.4225031944742883, + 0.50059805948515, + 0.5307380167878961, + 0.6786286228869445, + 0.4703058964713792, + 0.7952680277572565, + 0.8784386573920652, + 0.21571437285517103, + 0.8239299809802759, + 0.3106588911394388, + 0.6119019576412006, + 0.254921097919502, + 0.2848837002861283, + 0.8518825001334218, + 0.6761040882234188, + 0.6301740975897414, + 0.16737765714403452, + 0.4341871318189866, + 0.7520137441718346, + 0.7343679659536673, + 0.863135001985155, + 0.1839176138805163, + 0.4321888943328053, + 0.795894226277464, + 0.6763850906896225, + 0.6869006728325415, + 0.26906680021449947, + 0.671010227102288, + 0.6354142059299305, + 0.8467755939284247, + 0.38609300820249404, + 0.17453173424804147, + 0.7114728526256804, + 0.25307843517870354, + 0.3350286820500781, + 0.3072840970430727, + 0.9257445043845917, + 0.9010599494942975, + 0.779519919860808, + 0.41328412852102037, + 0.3200899221320188, + 0.3734208291843151, + 0.6741561028111682, + 0.9751970221400001, + 0.5741588735755123, + 0.20002360437916433, + 0.2745238247620547, + 0.8996857567732303, + 0.02728768608307175, + 0.3152344627172815, + 0.30167625892308503, + 0.013964792568767592, + 0.07603371229331946, + 0.25102470984577485, + 0.6425678176156432, + 0.28009065271955635, + 0.00660641763519354, + 0.5579247635078589, + 0.7298677826687249, + 0.5549047715126516, + 0.36942377178343755, + 0.9628706964781225, + 0.7200585580649331, + 0.3993404943133191, + 0.017853361932931744, + 0.9517112869844709, + 0.9377008061473899, + 0.46183965111601455, + 0.14036733190475537, + 0.1303004327624977, + 0.44096898085343184, + 0.5768493239299738, + 0.030731405144652224, + 0.7472763299847744, + 0.9514531152595836, + 0.2652505875695019, + 0.7127026497954756, + 0.3352710715651487, + 0.9035769737901723, + 0.060851013208677585, + 0.13311472641468902, + 0.6118531981685167, + 0.5258775156510428, + 0.4641393563138716, + 0.026956161013478197, + 0.47619884060993034, + 0.8341848629545406, + 0.6736864361820483, + 0.9458269541236444, + 0.7322384664422258, + 0.47433352630190506, + 0.7085332851968889, + 0.255726084124823, + 0.6610141993705847, + 0.6415618205835592, + 0.35188201951381626, + 0.057391378685602956, + 0.36692135067571363, + 0.7714292564563653, + 0.33148327080693374, + 0.17771388234402574, + 0.5720931597455913, + 0.22219255698937967, + 0.1655206208242932, + 0.5516375957135302, + 0.13009422558403894, + 0.16051853671327898, + 0.00980529503632488, + 0.8920460192814085, + 0.8800609144754364, + 0.8858623339108258, + 0.6475594667317249, + 0.7186692670017965, + 0.9560721121500638, + 0.7544619282145179, + 0.23855254989560248, + 0.3460077570575414, + 0.6678545340110837, + 0.965857266327586, + 0.3517023475799894, + 0.7050162193768086, + 0.8474625620533361, + 0.34167227833878466, + 0.23907465558329621, + 0.008731050347155711, + 0.15928040357451112, + 0.6120284698113603, + 0.5654274136568886, + 0.08479187783119102, + 0.2954365139926882, + 0.9202408581766002, + 0.8435355989007527, + 0.06955766049982759, + 0.9261455093921811, + 0.37295890734145454, + 0.16360228826676348, + 0.7792272255492546, + 0.44865171599474507, + 0.8481006139505533, + 0.4279801346818851, + 0.1938390085645525, + 0.27880283646357884, + 0.6633776284133177, + 0.6410890118943386, + 0.0825976542888045, + 0.2939103498932336, + 0.9451829389144697, + 0.8073902057390331, + 0.6009229570362895, + 0.6440062523233666, + 0.04321128699700327, + 0.5101785226464819, + 0.3639059902373821, + 0.5855228728127307, + 0.7851832290326292, + 0.17026122117997688, + 0.43554889842419753, + 0.4684272081864731, + 0.83989201438257, + 0.828369334495118, + 0.6967351938445232, + 0.3714092425773875, + 0.6519202890403731, + 0.48482103681136524, + 0.44824225635434756, + 0.3365910986328733, + 0.8691534071329386, + 0.2450411238557928, + 0.46779688384975526, + 0.35634560224945766, + 0.2784352991500587, + 0.16063451783860305, + 0.4960244098430814, + 0.5320832681896275, + 0.43462369721484484, + 0.9553287708229896, + 0.696569402574327, + 0.7677301134404914, + 0.676567069428193, + 0.14784143367809421, + 0.4924778971718703, + 0.9003315637024765, + 0.20643995699702855, + 0.18646615219806373, + 0.446933449529637, + 0.17459908817627423, + 0.7844967715982246, + 0.4685047861439231, + 0.5340711084334715, + 0.4262294081569715, + 0.27723299622774866, + 0.3736274815684706, + 0.28689162322590644 + ] + }, + { + "variable": "series_16", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_17", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.579851442290506, + 0.6283434038457479, + 0.4504514278560624, + 0.3932233846901343, + 0.1674282353266664, + 0.630441261790587, + 0.6038052340868525, + 0.6504520081920425, + 0.6900040558067796, + 0.9592683157322113, + 0.8637303113196916, + 0.7060394530232093, + 0.12307332500532087, + 0.531489360962655, + 0.6870507978847801, + 0.6517345808133034, + 0.21813713730036166, + 0.7919840925472428, + 0.7639162095143875, + 0.8811551807541605, + 0.5681940866126549, + 0.658595599675099, + 0.46693157082369463, + 0.03829150947150628, + 0.9770763177215016, + 0.4734352229845479, + 0.4075216450233816, + 0.06654629211052676, + 0.46175595274554226, + 0.5796075053291201, + 0.42462400868882433, + 0.8171554913798853, + 0.41069524690498527, + 0.46309625076526595, + 0.4970648166994448, + 0.18596131671608762, + 0.024102219917705225, + 0.43084122348740095, + 0.7989105420786575, + 0.5104853797050489, + 0.4308027641465153, + 0.9829960776444482, + 0.8246137678128441, + 0.507352185361256, + 0.1103224548947549, + 0.11714584034845932, + 0.26999267201289356, + 0.21871053526419593, + 0.18527741137342202, + 0.4995160276196944, + 0.9048320394055158, + 0.31408795999168015, + 0.4040792590485244, + 0.9964416231206911, + 0.5568213348316201, + 0.8823221318575026, + 0.053834108393478686, + 0.13084980692118142, + 0.6300045796825212, + 0.7479229454446744, + 0.4483254156069776, + 0.7319262778756604, + 0.2953828921869085, + 0.7743936973415074, + 0.6122478882423863, + 0.9768423450867112, + 0.4034761871052335, + 0.8883840708602049, + 0.2812833885537983, + 0.7786225843047461, + 0.3711936282870032, + 0.5838303076345319, + 0.9148604204506962, + 0.6998273162982676, + 0.2149059574415645, + 0.24029372463263388, + 0.5299280576295401, + 0.9483381946406384, + 0.30655432728692567, + 0.57390002445048, + 0.8059461029088039, + 0.014305123928379682, + 0.195162209418677, + 0.7773398960130304, + 0.21812392280708925, + 0.33441116982216934, + 0.11681242331082442, + 0.5054900262309758, + 0.37017192337367266, + 0.26607668268403384, + 0.6979860660343318, + 0.0783110759413227, + 0.5950893487149188, + 0.834285347706301, + 0.7515905474594615, + 0.7811412620721393, + 0.5906413448797235, + 0.7512089340660952, + 0.4036323004909098, + 0.6893049667536647, + 0.4269914217577332, + 0.972292863282217, + 0.04171018378000313, + 0.9590167227829469, + 0.11985301135989712, + 0.3956523281688148, + 0.59957660620743, + 0.345812703077123, + 0.6026907756092583, + 0.7055308296557591, + 0.8073713080937847, + 0.7027611961502496, + 0.037099971637395424, + 0.48901029101078053, + 0.30618359784627525, + 0.4225754204661013, + 0.2917260078915478, + 0.4225031944742883, + 0.50059805948515, + 0.5307380167878961, + 0.6786286228869445, + 0.4703058964713792, + 0.7952680277572565, + 0.8784386573920652, + 0.21571437285517103, + 0.8239299809802759, + 0.3106588911394388, + 0.6119019576412006, + 0.254921097919502, + 0.2848837002861283, + 0.8518825001334218, + 0.6761040882234188, + 0.6301740975897414, + 0.16737765714403452, + 0.4341871318189866, + 0.7520137441718346, + 0.7343679659536673, + 0.863135001985155, + 0.1839176138805163, + 0.4321888943328053, + 0.795894226277464, + 0.6763850906896225, + 0.6869006728325415, + 0.26906680021449947, + 0.671010227102288, + 0.6354142059299305, + 0.8467755939284247, + 0.38609300820249404, + 0.17453173424804147, + 0.7114728526256804, + 0.25307843517870354, + 0.3350286820500781, + 0.3072840970430727, + 0.9257445043845917, + 0.9010599494942975, + 0.779519919860808, + 0.41328412852102037, + 0.3200899221320188, + 0.3734208291843151, + 0.6741561028111682, + 0.9751970221400001, + 0.5741588735755123, + 0.20002360437916433, + 0.2745238247620547, + 0.8996857567732303, + 0.02728768608307175, + 0.3152344627172815, + 0.30167625892308503, + 0.013964792568767592, + 0.07603371229331946, + 0.25102470984577485, + 0.6425678176156432, + 0.28009065271955635, + 0.00660641763519354, + 0.5579247635078589, + 0.7298677826687249, + 0.5549047715126516, + 0.36942377178343755, + 0.9628706964781225, + 0.7200585580649331, + 0.3993404943133191, + 0.017853361932931744, + 0.9517112869844709, + 0.9377008061473899, + 0.46183965111601455, + 0.14036733190475537, + 0.1303004327624977, + 0.44096898085343184, + 0.5768493239299738, + 0.030731405144652224, + 0.7472763299847744, + 0.9514531152595836, + 0.2652505875695019, + 0.7127026497954756, + 0.3352710715651487, + 0.9035769737901723, + 0.060851013208677585, + 0.13311472641468902, + 0.6118531981685167, + 0.5258775156510428, + 0.4641393563138716, + 0.026956161013478197, + 0.47619884060993034, + 0.8341848629545406, + 0.6736864361820483, + 0.9458269541236444, + 0.7322384664422258, + 0.47433352630190506, + 0.7085332851968889, + 0.255726084124823, + 0.6610141993705847, + 0.6415618205835592, + 0.35188201951381626, + 0.057391378685602956, + 0.36692135067571363, + 0.7714292564563653, + 0.33148327080693374, + 0.17771388234402574, + 0.5720931597455913, + 0.22219255698937967, + 0.1655206208242932, + 0.5516375957135302, + 0.13009422558403894, + 0.16051853671327898, + 0.00980529503632488, + 0.8920460192814085, + 0.8800609144754364, + 0.8858623339108258, + 0.6475594667317249, + 0.7186692670017965, + 0.9560721121500638, + 0.7544619282145179, + 0.23855254989560248, + 0.3460077570575414, + 0.6678545340110837, + 0.965857266327586, + 0.3517023475799894, + 0.7050162193768086, + 0.8474625620533361, + 0.34167227833878466, + 0.23907465558329621, + 0.008731050347155711, + 0.15928040357451112, + 0.6120284698113603, + 0.5654274136568886, + 0.08479187783119102, + 0.2954365139926882, + 0.9202408581766002, + 0.8435355989007527, + 0.06955766049982759, + 0.9261455093921811, + 0.37295890734145454, + 0.16360228826676348, + 0.7792272255492546, + 0.44865171599474507, + 0.8481006139505533, + 0.4279801346818851, + 0.1938390085645525, + 0.27880283646357884, + 0.6633776284133177, + 0.6410890118943386, + 0.0825976542888045, + 0.2939103498932336, + 0.9451829389144697, + 0.8073902057390331, + 0.6009229570362895, + 0.6440062523233666, + 0.04321128699700327, + 0.5101785226464819, + 0.3639059902373821, + 0.5855228728127307, + 0.7851832290326292, + 0.17026122117997688, + 0.43554889842419753, + 0.4684272081864731, + 0.83989201438257, + 0.828369334495118, + 0.6967351938445232, + 0.3714092425773875, + 0.6519202890403731, + 0.48482103681136524, + 0.44824225635434756, + 0.3365910986328733, + 0.8691534071329386, + 0.2450411238557928, + 0.46779688384975526, + 0.35634560224945766, + 0.2784352991500587, + 0.16063451783860305, + 0.4960244098430814, + 0.5320832681896275, + 0.43462369721484484, + 0.9553287708229896, + 0.696569402574327, + 0.7677301134404914, + 0.676567069428193, + 0.14784143367809421, + 0.4924778971718703, + 0.9003315637024765, + 0.20643995699702855, + 0.18646615219806373, + 0.446933449529637, + 0.17459908817627423, + 0.7844967715982246, + 0.4685047861439231, + 0.5340711084334715, + 0.4262294081569715, + 0.27723299622774866, + 0.3736274815684706, + 0.28689162322590644 + ] + }, + { + "variable": "series_18", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + }, + { + "variable": "series_19", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z", + "2021-01-01T00:30:00Z", + "2021-01-01T00:31:00Z", + "2021-01-01T00:32:00Z", + "2021-01-01T00:33:00Z", + "2021-01-01T00:34:00Z", + "2021-01-01T00:35:00Z", + "2021-01-01T00:36:00Z", + "2021-01-01T00:37:00Z", + "2021-01-01T00:38:00Z", + "2021-01-01T00:39:00Z", + "2021-01-01T00:40:00Z", + "2021-01-01T00:41:00Z", + "2021-01-01T00:42:00Z", + "2021-01-01T00:43:00Z", + "2021-01-01T00:44:00Z", + "2021-01-01T00:45:00Z", + "2021-01-01T00:46:00Z", + "2021-01-01T00:47:00Z", + "2021-01-01T00:48:00Z", + "2021-01-01T00:49:00Z", + "2021-01-01T00:50:00Z", + "2021-01-01T00:51:00Z", + "2021-01-01T00:52:00Z", + "2021-01-01T00:53:00Z", + "2021-01-01T00:54:00Z", + "2021-01-01T00:55:00Z", + "2021-01-01T00:56:00Z", + "2021-01-01T00:57:00Z", + "2021-01-01T00:58:00Z", + "2021-01-01T00:59:00Z", + "2021-01-01T01:00:00Z", + "2021-01-01T01:01:00Z", + "2021-01-01T01:02:00Z", + "2021-01-01T01:03:00Z", + "2021-01-01T01:04:00Z", + "2021-01-01T01:05:00Z", + "2021-01-01T01:06:00Z", + "2021-01-01T01:07:00Z", + "2021-01-01T01:08:00Z", + "2021-01-01T01:09:00Z", + "2021-01-01T01:10:00Z", + "2021-01-01T01:11:00Z", + "2021-01-01T01:12:00Z", + "2021-01-01T01:13:00Z", + "2021-01-01T01:14:00Z", + "2021-01-01T01:15:00Z", + "2021-01-01T01:16:00Z", + "2021-01-01T01:17:00Z", + "2021-01-01T01:18:00Z", + "2021-01-01T01:19:00Z", + "2021-01-01T01:20:00Z", + "2021-01-01T01:21:00Z", + "2021-01-01T01:22:00Z", + "2021-01-01T01:23:00Z", + "2021-01-01T01:24:00Z", + "2021-01-01T01:25:00Z", + "2021-01-01T01:26:00Z", + "2021-01-01T01:27:00Z", + "2021-01-01T01:28:00Z", + "2021-01-01T01:29:00Z", + "2021-01-01T01:30:00Z", + "2021-01-01T01:31:00Z", + "2021-01-01T01:32:00Z", + "2021-01-01T01:33:00Z", + "2021-01-01T01:34:00Z", + "2021-01-01T01:35:00Z", + "2021-01-01T01:36:00Z", + "2021-01-01T01:37:00Z", + "2021-01-01T01:38:00Z", + "2021-01-01T01:39:00Z", + "2021-01-01T01:40:00Z", + "2021-01-01T01:41:00Z", + "2021-01-01T01:42:00Z", + "2021-01-01T01:43:00Z", + "2021-01-01T01:44:00Z", + "2021-01-01T01:45:00Z", + "2021-01-01T01:46:00Z", + "2021-01-01T01:47:00Z", + "2021-01-01T01:48:00Z", + "2021-01-01T01:49:00Z", + "2021-01-01T01:50:00Z", + "2021-01-01T01:51:00Z", + "2021-01-01T01:52:00Z", + "2021-01-01T01:53:00Z", + "2021-01-01T01:54:00Z", + "2021-01-01T01:55:00Z", + "2021-01-01T01:56:00Z", + "2021-01-01T01:57:00Z", + "2021-01-01T01:58:00Z", + "2021-01-01T01:59:00Z", + "2021-01-01T02:00:00Z", + "2021-01-01T02:01:00Z", + "2021-01-01T02:02:00Z", + "2021-01-01T02:03:00Z", + "2021-01-01T02:04:00Z", + "2021-01-01T02:05:00Z", + "2021-01-01T02:06:00Z", + "2021-01-01T02:07:00Z", + "2021-01-01T02:08:00Z", + "2021-01-01T02:09:00Z", + "2021-01-01T02:10:00Z", + "2021-01-01T02:11:00Z", + "2021-01-01T02:12:00Z", + "2021-01-01T02:13:00Z", + "2021-01-01T02:14:00Z", + "2021-01-01T02:15:00Z", + "2021-01-01T02:16:00Z", + "2021-01-01T02:17:00Z", + "2021-01-01T02:18:00Z", + "2021-01-01T02:19:00Z", + "2021-01-01T02:20:00Z", + "2021-01-01T02:21:00Z", + "2021-01-01T02:22:00Z", + "2021-01-01T02:23:00Z", + "2021-01-01T02:24:00Z", + "2021-01-01T02:25:00Z", + "2021-01-01T02:26:00Z", + "2021-01-01T02:27:00Z", + "2021-01-01T02:28:00Z", + "2021-01-01T02:29:00Z", + "2021-01-01T02:30:00Z", + "2021-01-01T02:31:00Z", + "2021-01-01T02:32:00Z", + "2021-01-01T02:33:00Z", + "2021-01-01T02:34:00Z", + "2021-01-01T02:35:00Z", + "2021-01-01T02:36:00Z", + "2021-01-01T02:37:00Z", + "2021-01-01T02:38:00Z", + "2021-01-01T02:39:00Z", + "2021-01-01T02:40:00Z", + "2021-01-01T02:41:00Z", + "2021-01-01T02:42:00Z", + "2021-01-01T02:43:00Z", + "2021-01-01T02:44:00Z", + "2021-01-01T02:45:00Z", + "2021-01-01T02:46:00Z", + "2021-01-01T02:47:00Z", + "2021-01-01T02:48:00Z", + "2021-01-01T02:49:00Z", + "2021-01-01T02:50:00Z", + "2021-01-01T02:51:00Z", + "2021-01-01T02:52:00Z", + "2021-01-01T02:53:00Z", + "2021-01-01T02:54:00Z", + "2021-01-01T02:55:00Z", + "2021-01-01T02:56:00Z", + "2021-01-01T02:57:00Z", + "2021-01-01T02:58:00Z", + "2021-01-01T02:59:00Z", + "2021-01-01T03:00:00Z", + "2021-01-01T03:01:00Z", + "2021-01-01T03:02:00Z", + "2021-01-01T03:03:00Z", + "2021-01-01T03:04:00Z", + "2021-01-01T03:05:00Z", + "2021-01-01T03:06:00Z", + "2021-01-01T03:07:00Z", + "2021-01-01T03:08:00Z", + "2021-01-01T03:09:00Z", + "2021-01-01T03:10:00Z", + "2021-01-01T03:11:00Z", + "2021-01-01T03:12:00Z", + "2021-01-01T03:13:00Z", + "2021-01-01T03:14:00Z", + "2021-01-01T03:15:00Z", + "2021-01-01T03:16:00Z", + "2021-01-01T03:17:00Z", + "2021-01-01T03:18:00Z", + "2021-01-01T03:19:00Z", + "2021-01-01T03:20:00Z", + "2021-01-01T03:21:00Z", + "2021-01-01T03:22:00Z", + "2021-01-01T03:23:00Z", + "2021-01-01T03:24:00Z", + "2021-01-01T03:25:00Z", + "2021-01-01T03:26:00Z", + "2021-01-01T03:27:00Z", + "2021-01-01T03:28:00Z", + "2021-01-01T03:29:00Z", + "2021-01-01T03:30:00Z", + "2021-01-01T03:31:00Z", + "2021-01-01T03:32:00Z", + "2021-01-01T03:33:00Z", + "2021-01-01T03:34:00Z", + "2021-01-01T03:35:00Z", + "2021-01-01T03:36:00Z", + "2021-01-01T03:37:00Z", + "2021-01-01T03:38:00Z", + "2021-01-01T03:39:00Z", + "2021-01-01T03:40:00Z", + "2021-01-01T03:41:00Z", + "2021-01-01T03:42:00Z", + "2021-01-01T03:43:00Z", + "2021-01-01T03:44:00Z", + "2021-01-01T03:45:00Z", + "2021-01-01T03:46:00Z", + "2021-01-01T03:47:00Z", + "2021-01-01T03:48:00Z", + "2021-01-01T03:49:00Z", + "2021-01-01T03:50:00Z", + "2021-01-01T03:51:00Z", + "2021-01-01T03:52:00Z", + "2021-01-01T03:53:00Z", + "2021-01-01T03:54:00Z", + "2021-01-01T03:55:00Z", + "2021-01-01T03:56:00Z", + "2021-01-01T03:57:00Z", + "2021-01-01T03:58:00Z", + "2021-01-01T03:59:00Z", + "2021-01-01T04:00:00Z", + "2021-01-01T04:01:00Z", + "2021-01-01T04:02:00Z", + "2021-01-01T04:03:00Z", + "2021-01-01T04:04:00Z", + "2021-01-01T04:05:00Z", + "2021-01-01T04:06:00Z", + "2021-01-01T04:07:00Z", + "2021-01-01T04:08:00Z", + "2021-01-01T04:09:00Z", + "2021-01-01T04:10:00Z", + "2021-01-01T04:11:00Z", + "2021-01-01T04:12:00Z", + "2021-01-01T04:13:00Z", + "2021-01-01T04:14:00Z", + "2021-01-01T04:15:00Z", + "2021-01-01T04:16:00Z", + "2021-01-01T04:17:00Z", + "2021-01-01T04:18:00Z", + "2021-01-01T04:19:00Z", + "2021-01-01T04:20:00Z", + "2021-01-01T04:21:00Z", + "2021-01-01T04:22:00Z", + "2021-01-01T04:23:00Z", + "2021-01-01T04:24:00Z", + "2021-01-01T04:25:00Z", + "2021-01-01T04:26:00Z", + "2021-01-01T04:27:00Z", + "2021-01-01T04:28:00Z", + "2021-01-01T04:29:00Z", + "2021-01-01T04:30:00Z", + "2021-01-01T04:31:00Z", + "2021-01-01T04:32:00Z", + "2021-01-01T04:33:00Z", + "2021-01-01T04:34:00Z", + "2021-01-01T04:35:00Z", + "2021-01-01T04:36:00Z", + "2021-01-01T04:37:00Z", + "2021-01-01T04:38:00Z", + "2021-01-01T04:39:00Z", + "2021-01-01T04:40:00Z", + "2021-01-01T04:41:00Z", + "2021-01-01T04:42:00Z", + "2021-01-01T04:43:00Z", + "2021-01-01T04:44:00Z", + "2021-01-01T04:45:00Z", + "2021-01-01T04:46:00Z", + "2021-01-01T04:47:00Z", + "2021-01-01T04:48:00Z", + "2021-01-01T04:49:00Z", + "2021-01-01T04:50:00Z", + "2021-01-01T04:51:00Z", + "2021-01-01T04:52:00Z", + "2021-01-01T04:53:00Z", + "2021-01-01T04:54:00Z", + "2021-01-01T04:55:00Z", + "2021-01-01T04:56:00Z", + "2021-01-01T04:57:00Z", + "2021-01-01T04:58:00Z", + "2021-01-01T04:59:00Z", + "2021-01-01T05:00:00Z", + "2021-01-01T05:01:00Z", + "2021-01-01T05:02:00Z", + "2021-01-01T05:03:00Z", + "2021-01-01T05:04:00Z", + "2021-01-01T05:05:00Z", + "2021-01-01T05:06:00Z", + "2021-01-01T05:07:00Z", + "2021-01-01T05:08:00Z", + "2021-01-01T05:09:00Z" + ], + "values": [ + 0.062141354244908076, + 0.017228333429610276, + 0.24458969332477165, + 0.8122337884440541, + 0.9830955151208699, + 0.3929699707203873, + 0.39874778092078567, + 0.38340703938830434, + 0.7075723081651936, + 0.734023661925162, + 0.3499302896359896, + 0.13707547534601616, + 0.1290830502684478, + 0.7929096775637827, + 0.926777762241825, + 0.5883809317330941, + 0.34962412316472735, + 0.053112184766437975, + 0.6876512886741466, + 0.02324143938945855, + 0.6291448558580277, + 0.1352600035511452, + 0.7915932199286151, + 0.0706348754237216, + 0.8338493642926885, + 0.11867045982522917, + 0.7406675891010297, + 0.974583351200777, + 0.8793111415547916, + 0.6763639006897476, + 0.3280615130919382, + 0.6804229193803479, + 0.5851872592969437, + 0.7972205282997732, + 0.7602955897512919, + 0.07767159146715852, + 0.4856289204829467, + 0.8279905980213151, + 0.2122901330132002, + 0.8974557714313893, + 0.21125371226926615, + 0.9708979869598999, + 0.9666128215851884, + 0.5644835721005336, + 0.14517325052775953, + 0.7208436444412433, + 0.31839240413300396, + 0.6147060804046153, + 0.19440412130649898, + 0.21683107706220772, + 0.3946123242942917, + 0.5649905857278688, + 0.8891552790966032, + 0.28857586803338575, + 0.17870308497789233, + 0.29917845329690285, + 0.43654222663716213, + 0.5989394056351041, + 0.23368501339839742, + 0.2879476448865622, + 0.17754663303868468, + 0.8420598816890291, + 0.4717755157906345, + 0.6782959663346935, + 0.5666025079822468, + 0.10185162054399544, + 0.1263504446795014, + 0.8928164952142156, + 0.7791292161718996, + 0.18430401790437212, + 0.6046475130857542, + 0.7952231962307743, + 0.4668019201841116, + 0.867705862725735, + 0.8734297108044529, + 0.17456621860788402, + 0.8276972133480617, + 0.19007814292356973, + 0.7847172497609001, + 0.4783325735936963, + 0.17645589536930573, + 0.6210850883412133, + 0.15424494639479858, + 0.49509602310124523, + 0.6455016221937333, + 0.23715423231723953, + 0.8897075358730084, + 0.6847752725616744, + 0.948969037208046, + 0.81132928172996, + 0.06834995180036241, + 0.0006809199509499875, + 0.13668416327978472, + 0.027230712464357043, + 0.8766716216105773, + 0.8130690764015431, + 0.5006255836083235, + 0.8250115047531077, + 0.7144772562531698, + 0.8577744209615799, + 0.22651350216389776, + 0.4011173708595841, + 0.9703838504497531, + 0.43344616799093094, + 0.6134996918483073, + 0.7294017329436411, + 0.15997914564966864, + 0.9506312793057573, + 0.368663300909731, + 0.689497132625205, + 0.9517744360086294, + 0.1757987383042875, + 0.7558323207482254, + 0.22458441042168742, + 0.5558146058131181, + 0.37945978673214487, + 0.8652128456399701, + 0.42898599271272686, + 0.7888355261103746, + 0.7911923517721834, + 0.9598395465767828, + 0.6027553071102654, + 0.8024069554455167, + 0.9681480401065, + 0.5713757592438633, + 0.9033853163225122, + 0.19513761230202809, + 0.09131318172102532, + 0.6405263124631864, + 0.821520500354208, + 0.889700661245878, + 0.2022041569332127, + 0.013357434879504027, + 0.30490604413455724, + 0.0188988260485331, + 0.09950886640541934, + 0.6286122148366894, + 0.8436500191450462, + 0.687904628765443, + 0.7753422849382302, + 0.8268532337019399, + 0.29679491590934237, + 0.8079497816329126, + 0.6811440881115035, + 0.7699288146623291, + 0.18253870235493685, + 0.26244884037740557, + 0.06661568202572288, + 0.2666571122865049, + 0.958191177688634, + 0.43839792144700584, + 0.4147210829829536, + 0.031806830396142405, + 0.9606714721771388, + 0.8731958418861631, + 0.5513959487499019, + 0.8088706822920882, + 0.6383671969573289, + 0.6931305590119536, + 0.3783771379064217, + 0.9576712070161693, + 0.22500684612628508, + 0.918014091615932, + 0.13706763801991673, + 0.21834843184680208, + 0.31722601946078255, + 0.7817694183961448, + 0.1714819695634947, + 0.996480030517726, + 0.9023915525651258, + 0.9262526966601379, + 0.8514075298300847, + 0.25101612573351617, + 0.13442083912520597, + 0.16981732040403585, + 0.555259005553807, + 0.42220469693190854, + 0.3598941396701344, + 0.615342389357366, + 0.8731740566664434, + 0.07778688488733188, + 0.14321938917854982, + 0.7494643348278122, + 0.8146693047107249, + 0.22849173146732005, + 0.8584960993850931, + 0.006092636697984877, + 0.22552096402288668, + 0.03420653636402282, + 0.21200793131475215, + 0.618976809360579, + 0.6323685983312858, + 0.9586889390208344, + 0.06886210804003035, + 0.5599384798724899, + 0.03633980463513686, + 0.3087909741444276, + 0.7029989907478223, + 0.4002244566736597, + 0.8437298289814877, + 0.21826034678553763, + 0.971175736022246, + 0.4567987768328886, + 0.3485089605512217, + 0.23484028724632966, + 0.5333233634230872, + 0.27298603800431964, + 0.3586050998266461, + 0.022622513306980507, + 0.03351134593572802, + 0.5835797169897701, + 0.1524730964730573, + 0.7450597201985334, + 0.49787005827315045, + 0.7686844145558811, + 0.6642091948179849, + 0.42753863298452555, + 0.4225019499772553, + 0.5076085636819617, + 0.2283034841742887, + 0.6710781963473148, + 0.029802673811673674, + 0.08408408769957143, + 0.08670898557539497, + 0.2924893981015615, + 0.9696873455700612, + 0.6348770508762374, + 0.4684314813158643, + 0.7168536931895028, + 0.818197919260416, + 0.9117429988780886, + 0.07156665849002075, + 0.9772213185188173, + 0.8353163480705875, + 0.2871266270840609, + 0.150357374375374, + 0.8636284877206177, + 0.8894162127395213, + 0.7997229511967557, + 0.853592286892848, + 0.08285827035392346, + 0.28017155145411077, + 0.4353799289927748, + 0.3905200187859521, + 0.6497965916502576, + 0.19820306400604992, + 0.12518518784985677, + 0.07470056454981222, + 0.6489362636151245, + 0.4145344799821804, + 0.022710112644663827, + 0.29539734577355004, + 0.9453016739754952, + 0.8988939323469833, + 0.5728174970198003, + 0.008769972498196887, + 0.005285567545963321, + 0.6953909191901325, + 0.8154124578796287, + 0.5531499580180063, + 0.17941043764115705, + 0.615950966383836, + 0.6477614399528839, + 0.9445576588297375, + 0.2598885387910871, + 0.22465399145224052, + 0.8973593476219158, + 0.45519203914871387, + 0.43644016735093916, + 0.23530355856599494, + 0.18932516626404283, + 0.997234648625255, + 0.06962697187002564, + 0.7418469235130629, + 0.24038696679828087, + 0.12425484039580992, + 0.7904204557944166, + 0.6308536000778281, + 0.124735617362709, + 0.8408372796680738, + 0.5469586565086612, + 0.1483683434944566, + 0.547062396952859, + 0.23962586431193222, + 0.7704109691596849, + 0.6097564466767798, + 0.7517297483302936, + 0.08298941964564222, + 0.8110979709543097, + 0.07848713260420137, + 0.033579869647930694, + 0.9196571142326834, + 0.17048574564636843, + 0.042406320484218885, + 0.615179046694329, + 0.437078518190434, + 0.6415687242087623, + 0.7916040236115068, + 0.029740962459238407, + 0.43764440014100703, + 0.42108481244631657, + 0.7170205510212198, + 0.8885945165025833, + 0.9048047885224215, + 0.001172341080063477, + 0.8572509752690098, + 0.4489127550769507, + 0.008705667130451067, + 0.4433756300739977, + 0.352517085085698 + ] + } + ], + "topContributorCount":10 +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/AnomalyDetectorClientTest.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/AnomalyDetectorClientTest.java new file mode 100644 index 000000000000..892edb0849be --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/AnomalyDetectorClientTest.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.UnivariateEntireDetectionResult; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.logging.LogLevel; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * Unit tests for {@link UnivariateClient}. + */ +public class AnomalyDetectorClientTest extends AnomalyDetectorClientTestBase { + private static final ClientLogger LOGGER = new ClientLogger(AnomalyDetectorClientTest.class); + + private UnivariateClient getClient() { + return getClientBuilder().buildUnivariateClient(); + } + + @Test + public void testDetect() { + testDetectEntireSeriesWithResponse(request -> { + Response response + = getClient().detectUnivariateEntireSeriesWithResponse(request, new RequestOptions()); + LOGGER.log(LogLevel.INFORMATIONAL, response::toString); + + String responseBodyStr = response.getValue().toString(); + + UnivariateEntireDetectionResult result; + try (JsonReader jsonReader = JsonProviders.createReader(responseBodyStr)) { + result = UnivariateEntireDetectionResult.fromJson(jsonReader); + } catch (IOException e) { + throw new RuntimeException(e); + } + + assertEquals(200, response.getStatusCode()); + assertEquals(24, result.getExpectedValues().size()); + assertEquals(24, result.getIsAnomaly().size()); + assertEquals(24, result.getIsPositiveAnomaly().size()); + assertEquals(24, result.getLowerMargins().size()); + assertEquals(24, result.getSeverity().size()); + assertEquals(24, result.getUpperMargins().size()); + + result.getIsAnomaly().forEach(Assertions::assertFalse); + result.getIsPositiveAnomaly().forEach(Assertions::assertFalse); + }); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/AnomalyDetectorClientTestBase.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/AnomalyDetectorClientTestBase.java new file mode 100644 index 000000000000..00fc4d4ca41a --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/AnomalyDetectorClientTestBase.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; + +import java.util.function.Consumer; + +/** + * Base class for Anomaly Detector clients test. + */ +public class AnomalyDetectorClientTestBase extends TestProxyTestBase { + void testDetectEntireSeriesWithResponse(Consumer testRunner) { + testRunner.accept(getDetectRequest()); + } + + AnomalyDetectorClientBuilder getClientBuilder() { + AnomalyDetectorClientBuilder builder + = new AnomalyDetectorClientBuilder().endpoint(getEndpoint()).credential(new AzureKeyCredential(getKey())); + + if (interceptorManager.isPlaybackMode()) { + builder.httpClient(interceptorManager.getPlaybackClient()); + } else if (interceptorManager.isRecordMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + + return builder; + } + + private String getKey() { + return interceptorManager.isPlaybackMode() + ? "fakeKeyPlaceholder" + : Configuration.getGlobalConfiguration().get("ANOMALY_DETECTOR_API_KEY"); + } + + String getEndpoint() { + return interceptorManager.isPlaybackMode() + ? "https://localhost:8080" + : Configuration.getGlobalConfiguration().get("ANOMALY_DETECTOR_ENDPOINT"); + } + + private BinaryData getDetectRequest() { + return BinaryData.fromString("{\"series\":[{\"timestamp\":\"2018-01-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-02-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-03-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-04-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-05-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-06-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-07-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-08-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-09-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-10-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-11-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2018-12-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-01-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-02-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-03-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-04-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-05-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-06-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-07-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-08-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-09-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-10-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-11-19T00:00:00Z\",\"value\":855}," + + "{\"timestamp\":\"2019-12-19T00:00:00Z\",\"value\":855}]," + + "\"granularity\":\"monthly\",\"maxAnomalyRatio\":0.25,\"sensitivity\":95}"); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/MultivariateAnomalyDetectorClientTest.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/MultivariateAnomalyDetectorClientTest.java new file mode 100644 index 000000000000..af4c20e077e0 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/MultivariateAnomalyDetectorClientTest.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.anomalydetector; + +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.logging.LogLevel; +import org.junit.jupiter.api.Test; + +public class MultivariateAnomalyDetectorClientTest extends AnomalyDetectorClientTestBase { + private static final ClientLogger LOGGER = new ClientLogger(MultivariateAnomalyDetectorClientTest.class); + + private MultivariateClient getClient() { + return getClientBuilder().buildMultivariateClient(); + } + + private static void getModelList(MultivariateClient client, Integer skip, Integer top) { + PagedIterable response = client.listMultivariateModels(skip, top); + + LOGGER.info("ModelList: "); + response.forEach(model -> LOGGER.log(LogLevel.INFORMATIONAL, () -> "\t" + model.getModelId())); + } + + @Test + public void testDetect() { + testDetectEntireSeriesWithResponse(request -> { + MultivariateClient client = getClient(); + + Integer skip = 0; + Integer top = 5; + getModelList(client, skip, top); + }); + + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/AnomalyDetectorClientTestBase.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/AnomalyDetectorClientTestBase.java new file mode 100644 index 000000000000..6b3ba2c0e9e2 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/AnomalyDetectorClientTestBase.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder; +import com.azure.ai.anomalydetector.MultivariateClient; +import com.azure.ai.anomalydetector.UnivariateClient; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.util.Configuration; + +class AnomalyDetectorClientTestBase extends TestProxyTestBase { + protected UnivariateClient univariateClient; + + protected MultivariateClient multivariateClient; + + @Override + protected void beforeTest() { + AnomalyDetectorClientBuilder univariateClientbuilder = new AnomalyDetectorClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + univariateClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + univariateClient = univariateClientbuilder.buildUnivariateClient(); + + AnomalyDetectorClientBuilder multivariateClientbuilder = new AnomalyDetectorClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + multivariateClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + multivariateClient = multivariateClientbuilder.buildMultivariateClient(); + + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/CreateAndTrainMultivariateModelTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/CreateAndTrainMultivariateModelTests.java new file mode 100644 index 000000000000..dacbfa81097d --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/CreateAndTrainMultivariateModelTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.models.AlignMode; +import com.azure.ai.anomalydetector.models.AlignPolicy; +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.ai.anomalydetector.models.DataSchema; +import com.azure.ai.anomalydetector.models.ErrorResponse; +import com.azure.ai.anomalydetector.models.FillNAMethod; +import com.azure.ai.anomalydetector.models.ModelInfo; +import com.azure.ai.anomalydetector.models.ModelStatus; +import java.time.OffsetDateTime; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class CreateAndTrainMultivariateModelTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testCreateAndTrainMultivariateModelTests() { + // method invocation + AnomalyDetectionModel response = multivariateClient.trainMultivariateModel( + new ModelInfo("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + OffsetDateTime.parse("2019-04-01T00:00:00Z"), OffsetDateTime.parse("2019-04-02T00:00:00Z")) + .setDataSchema(DataSchema.ONE_TABLE) + .setDisplayName("Devops-MultiAD") + .setSlidingWindow(20) + .setAlignPolicy(new AlignPolicy().setAlignMode(AlignMode.OUTER) + .setFillNAMethod(FillNAMethod.LINEAR) + .setPaddingValue(0.0D))); + + // response assertion + Assertions.assertNotNull(response); + // verify property "modelId" + Assertions.assertEquals("45aad126-aafd-11ea-b8fb-d89ef3400c5f", response.getModelId()); + // verify property "createdTime" + Assertions.assertNotNull(response.getCreatedTime()); + // verify property "lastUpdatedTime" + Assertions.assertNotNull(response.getLastUpdatedTime()); + // verify property "modelInfo" + ModelInfo responseModelInfo = response.getModelInfo(); + Assertions.assertNotNull(responseModelInfo); + Assertions.assertEquals("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + responseModelInfo.getDataSource()); + Assertions.assertEquals(DataSchema.ONE_TABLE, responseModelInfo.getDataSchema()); + Assertions.assertNotNull(responseModelInfo.getStartTime()); + Assertions.assertNotNull(responseModelInfo.getEndTime()); + Assertions.assertEquals("Devops-MultiAD", responseModelInfo.getDisplayName()); + Assertions.assertEquals(20, responseModelInfo.getSlidingWindow()); + AlignPolicy responseModelInfoAlignPolicy = responseModelInfo.getAlignPolicy(); + Assertions.assertNotNull(responseModelInfoAlignPolicy); + Assertions.assertEquals(AlignMode.OUTER, responseModelInfoAlignPolicy.getAlignMode()); + Assertions.assertEquals(FillNAMethod.LINEAR, responseModelInfoAlignPolicy.getFillNAMethod()); + Assertions.assertEquals(0.0D, responseModelInfoAlignPolicy.getPaddingValue()); + Assertions.assertEquals(ModelStatus.CREATED, responseModelInfo.getStatus()); + List responseModelInfoErrors = responseModelInfo.getErrors(); + Assertions.assertEquals(0, responseModelInfoErrors.size()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DeleteMultivariateModelTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DeleteMultivariateModelTests.java new file mode 100644 index 000000000000..9bc10959f74b --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DeleteMultivariateModelTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DeleteMultivariateModelTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testDeleteMultivariateModelTests() { + // method invocation + multivariateClient.deleteMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectMultivariateBatchAnomalyTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectMultivariateBatchAnomalyTests.java new file mode 100644 index 000000000000..b18485454994 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectMultivariateBatchAnomalyTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.models.AnomalyState; +import com.azure.ai.anomalydetector.models.ErrorResponse; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionResultSummary; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionStatus; +import com.azure.ai.anomalydetector.models.MultivariateDetectionResult; +import java.time.OffsetDateTime; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DetectMultivariateBatchAnomalyTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testDetectMultivariateBatchAnomalyTests() { + // method invocation + MultivariateDetectionResult response + = multivariateClient.detectMultivariateBatchAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", + new MultivariateBatchDetectionOptions( + "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + OffsetDateTime.parse("2019-04-01T00:15:00Z"), OffsetDateTime.parse("2019-04-01T00:40:00Z")) + .setTopContributorCount(10)); + + // response assertion + Assertions.assertNotNull(response); + // verify property "resultId" + Assertions.assertEquals("663884e6-b117-11ea-b3de-0242ac130004", response.getResultId()); + // verify property "summary" + MultivariateBatchDetectionResultSummary responseSummary = response.getSummary(); + Assertions.assertNotNull(responseSummary); + Assertions.assertEquals(MultivariateBatchDetectionStatus.CREATED, responseSummary.getStatus()); + List responseSummaryErrors = responseSummary.getErrors(); + Assertions.assertEquals(0, responseSummaryErrors.size()); + MultivariateBatchDetectionOptions responseSummarySetupInfo = responseSummary.getSetupInfo(); + Assertions.assertNotNull(responseSummarySetupInfo); + Assertions.assertEquals("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + responseSummarySetupInfo.getDataSource()); + Assertions.assertEquals(10, responseSummarySetupInfo.getTopContributorCount()); + Assertions.assertNotNull(responseSummarySetupInfo.getStartTime()); + Assertions.assertNotNull(responseSummarySetupInfo.getEndTime()); + // verify property "results" + List responseResults = response.getResults(); + Assertions.assertEquals(0, responseResults.size()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectMultivariateLastAnomalyTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectMultivariateLastAnomalyTests.java new file mode 100644 index 000000000000..4c60244cd6b0 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectMultivariateLastAnomalyTests.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.models.AnomalyState; +import com.azure.ai.anomalydetector.models.AnomalyValue; +import com.azure.ai.anomalydetector.models.ErrorResponse; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateLastDetectionResult; +import com.azure.ai.anomalydetector.models.VariableState; +import com.azure.ai.anomalydetector.models.VariableValues; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DetectMultivariateLastAnomalyTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testDetectMultivariateLastAnomalyTests() { + // method invocation + MultivariateLastDetectionResult response = multivariateClient.detectMultivariateLastAnomaly( + "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + new MultivariateLastDetectionOptions(Arrays.asList(new VariableValues("Variable_1", + Arrays.asList("2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"), + Arrays.asList(0.4551378545933972, 0.7388603950488748, 0.201088255984052, 0.7462812245891899, + 0.07308128850401663, 0.33090474587393537, 0.7544925268153315, 0.987506336316328, 0.6665932993421468, + 0.6308351543168672, 0.08083310161466228, 0.8414415588668442, 0.514583545640453, 0.0954489875193526, + 0.7786793231920507, 0.41646133667960994, 0.030176187583339287, 0.3474214937189324, + 0.508530173413991, 0.42451199127255046, 0.2115944222725208, 0.24733519545833516, 0.8791022110982156, + 0.9479621899884665, 0.26702703121252136, 0.6954503497669413, 0.1235728391488995, 0.8214915473050647, + 0.11813002444192677, 0.8579045951076123)), + new VariableValues("Variable_2", + Arrays.asList("2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"), + Arrays.asList(0.9617871613964145, 0.24903311574778408, 0.4920561254118613, 0.9895601049618598, + 0.9171759283128094, 0.5754204711105273, 0.1811033296265634, 0.8852311981742577, + 0.9543231904644779, 0.7088012446094262, 0.7843572237149014, 0.7664787010700046, + 0.3699552325387093, 0.504519908266789, 0.5848930929950164, 0.7628913396089576, + 0.8148405868900065, 0.08540458873739332, 0.03481976727525682, 0.21275099339467762, + 0.9836175579199806, 0.9321441483364282, 0.038466608085469534, 0.1723138437622782, + 0.8626383410218382, 0.35053229974224254, 0.631141662835182, 0.0730352607990088, + 0.08886179043386, 0.7488606040971179)), + new VariableValues("Variable_3", + Arrays.asList("2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"), + Arrays.asList(0.4030756879437628, 0.15526889968448554, 0.36352226408981103, 0.6051200637229004, + 0.8516795018476276, 0.2645605735279929, 0.6810875830037345, 0.9165894221681316, + 0.700783245230424, 0.5624155469940331, 0.6277289685127893, 0.15992056539730204, + 0.6020964482827594, 0.35937967753105915, 0.8731686034848609, 0.20301549117588935, + 0.029261872151168933, 0.6261499548828445, 0.45850782028563386, 0.8275006940083313, + 0.032760268834037376, 0.4485202784055029, 0.8915691008748384, 0.891669051517807, + 0.9469979353323046, 0.115293087370132, 0.08818772518459506, 0.7426286620589166, + 0.32372247468990756, 0.936268139507417)))).setTopContributorCount(10)); + + // response assertion + Assertions.assertNotNull(response); + // verify property "variableStates" + List responseVariableStates = response.getVariableStates(); + VariableState responseVariableStatesFirstItem = responseVariableStates.iterator().next(); + Assertions.assertNotNull(responseVariableStatesFirstItem); + Assertions.assertEquals("variable_1", responseVariableStatesFirstItem.getVariable()); + Assertions.assertEquals(0.0D, responseVariableStatesFirstItem.getFilledNARatio()); + Assertions.assertEquals(30, responseVariableStatesFirstItem.getEffectiveCount()); + Assertions.assertNotNull(responseVariableStatesFirstItem.getFirstTimestamp()); + Assertions.assertNotNull(responseVariableStatesFirstItem.getLastTimestamp()); + // verify property "results" + List responseResults = response.getResults(); + AnomalyState responseResultsFirstItem = responseResults.iterator().next(); + Assertions.assertNotNull(responseResultsFirstItem); + Assertions.assertNotNull(responseResultsFirstItem.getTimestamp()); + AnomalyValue responseResultsFirstItemValue = responseResultsFirstItem.getValue(); + Assertions.assertNotNull(responseResultsFirstItemValue); + Assertions.assertEquals(false, responseResultsFirstItemValue.isAnomaly()); + Assertions.assertEquals(0.0, responseResultsFirstItemValue.getSeverity()); + Assertions.assertEquals(0.6928471326828003, responseResultsFirstItemValue.getScore()); + List responseResultsFirstItemErrors = responseResultsFirstItem.getErrors(); + Assertions.assertEquals(0, responseResultsFirstItemErrors.size()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectUnivariateLastPointTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectUnivariateLastPointTests.java new file mode 100644 index 000000000000..72584f64a055 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/DetectUnivariateLastPointTests.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.models.ImputeMode; +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.ai.anomalydetector.models.UnivariateDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateLastDetectionResult; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class DetectUnivariateLastPointTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testDetectUnivariateLastPointTests() { + // method invocation + UnivariateLastDetectionResult response + = univariateClient.detectUnivariateLastPoint(new UnivariateDetectionOptions( + Arrays.asList(new TimeSeriesPoint(826.0).setTimestamp(OffsetDateTime.parse("1972-01-01T00:00:00Z")), + new TimeSeriesPoint(799.0).setTimestamp(OffsetDateTime.parse("1972-02-01T00:00:00Z")), + new TimeSeriesPoint(890.0).setTimestamp(OffsetDateTime.parse("1972-03-01T00:00:00Z")), + new TimeSeriesPoint(900.0).setTimestamp(OffsetDateTime.parse("1972-04-01T00:00:00Z")), + new TimeSeriesPoint(961.0).setTimestamp(OffsetDateTime.parse("1972-05-01T00:00:00Z")), + new TimeSeriesPoint(935.0).setTimestamp(OffsetDateTime.parse("1972-06-01T00:00:00Z")), + new TimeSeriesPoint(894.0).setTimestamp(OffsetDateTime.parse("1972-07-01T00:00:00Z")), + new TimeSeriesPoint(855.0).setTimestamp(OffsetDateTime.parse("1972-08-01T00:00:00Z")), + new TimeSeriesPoint(809.0).setTimestamp(OffsetDateTime.parse("1972-09-01T00:00:00Z")), + new TimeSeriesPoint(810.0).setTimestamp(OffsetDateTime.parse("1972-10-01T00:00:00Z")), + new TimeSeriesPoint(766.0).setTimestamp(OffsetDateTime.parse("1972-11-01T00:00:00Z")), + new TimeSeriesPoint(805.0).setTimestamp(OffsetDateTime.parse("1972-12-01T00:00:00Z")), + new TimeSeriesPoint(821.0).setTimestamp(OffsetDateTime.parse("1973-01-01T00:00:00Z")), + new TimeSeriesPoint(773.0).setTimestamp(OffsetDateTime.parse("1973-02-01T00:00:00Z")), + new TimeSeriesPoint(883.0).setTimestamp(OffsetDateTime.parse("1973-03-01T00:00:00Z")), + new TimeSeriesPoint(898.0).setTimestamp(OffsetDateTime.parse("1973-04-01T00:00:00Z")), + new TimeSeriesPoint(957.0).setTimestamp(OffsetDateTime.parse("1973-05-01T00:00:00Z")), + new TimeSeriesPoint(924.0).setTimestamp(OffsetDateTime.parse("1973-06-01T00:00:00Z")), + new TimeSeriesPoint(881.0).setTimestamp(OffsetDateTime.parse("1973-07-01T00:00:00Z")), + new TimeSeriesPoint(837.0).setTimestamp(OffsetDateTime.parse("1973-08-01T00:00:00Z")), + new TimeSeriesPoint(784.0).setTimestamp(OffsetDateTime.parse("1973-09-01T00:00:00Z")), + new TimeSeriesPoint(791.0).setTimestamp(OffsetDateTime.parse("1973-10-01T00:00:00Z")), + new TimeSeriesPoint(760.0).setTimestamp(OffsetDateTime.parse("1973-11-01T00:00:00Z")), + new TimeSeriesPoint(802.0).setTimestamp(OffsetDateTime.parse("1973-12-01T00:00:00Z")), + new TimeSeriesPoint(828.0).setTimestamp(OffsetDateTime.parse("1974-01-01T00:00:00Z")), + new TimeSeriesPoint(1030.0).setTimestamp(OffsetDateTime.parse("1974-02-01T00:00:00Z")), + new TimeSeriesPoint(889.0).setTimestamp(OffsetDateTime.parse("1974-03-01T00:00:00Z")), + new TimeSeriesPoint(902.0).setTimestamp(OffsetDateTime.parse("1974-04-01T00:00:00Z")), + new TimeSeriesPoint(969.0).setTimestamp(OffsetDateTime.parse("1974-05-01T00:00:00Z")), + new TimeSeriesPoint(947.0).setTimestamp(OffsetDateTime.parse("1974-06-01T00:00:00Z")), + new TimeSeriesPoint(908.0).setTimestamp(OffsetDateTime.parse("1974-07-01T00:00:00Z")), + new TimeSeriesPoint(867.0).setTimestamp(OffsetDateTime.parse("1974-08-01T00:00:00Z")), + new TimeSeriesPoint(815.0).setTimestamp(OffsetDateTime.parse("1974-09-01T00:00:00Z")), + new TimeSeriesPoint(812.0).setTimestamp(OffsetDateTime.parse("1974-10-01T00:00:00Z")), + new TimeSeriesPoint(773.0).setTimestamp(OffsetDateTime.parse("1974-11-01T00:00:00Z")), + new TimeSeriesPoint(813.0).setTimestamp(OffsetDateTime.parse("1974-12-01T00:00:00Z")), + new TimeSeriesPoint(834.0).setTimestamp(OffsetDateTime.parse("1975-01-01T00:00:00Z")), + new TimeSeriesPoint(782.0).setTimestamp(OffsetDateTime.parse("1975-02-01T00:00:00Z")), + new TimeSeriesPoint(892.0).setTimestamp(OffsetDateTime.parse("1975-03-01T00:00:00Z")), + new TimeSeriesPoint(903.0).setTimestamp(OffsetDateTime.parse("1975-04-01T00:00:00Z")), + new TimeSeriesPoint(966.0).setTimestamp(OffsetDateTime.parse("1975-05-01T00:00:00Z")), + new TimeSeriesPoint(937.0).setTimestamp(OffsetDateTime.parse("1975-06-01T00:00:00Z")), + new TimeSeriesPoint(896.0).setTimestamp(OffsetDateTime.parse("1975-07-01T00:00:00Z")), + new TimeSeriesPoint(858.0).setTimestamp(OffsetDateTime.parse("1975-08-01T00:00:00Z")), + new TimeSeriesPoint(817.0).setTimestamp(OffsetDateTime.parse("1975-09-01T00:00:00Z")), + new TimeSeriesPoint(827.0).setTimestamp(OffsetDateTime.parse("1975-10-01T00:00:00Z")), + new TimeSeriesPoint(797.0).setTimestamp(OffsetDateTime.parse("1975-11-01T00:00:00Z")), + new TimeSeriesPoint(843.0).setTimestamp(OffsetDateTime.parse("1975-12-01T00:00:00Z")))) + .setGranularity(TimeGranularity.MONTHLY) + .setMaxAnomalyRatio(0.25D) + .setSensitivity(95) + .setImputeMode(ImputeMode.FIXED) + .setImputeFixedValue(800.0D)); + + // response assertion + Assertions.assertNotNull(response); + // verify property "period" + Assertions.assertEquals(12, response.getPeriod()); + // verify property "suggestedWindow" + Assertions.assertEquals(49, response.getSuggestedWindow()); + // verify property "expectedValue" + Assertions.assertEquals(809.2328084659704, response.getExpectedValue()); + // verify property "upperMargin" + Assertions.assertEquals(40.46164042329852, response.getUpperMargin()); + // verify property "lowerMargin" + Assertions.assertEquals(40.46164042329852, response.getLowerMargin()); + // verify property "isAnomaly" + Assertions.assertEquals(false, response.isAnomaly()); + // verify property "isNegativeAnomaly" + Assertions.assertEquals(false, response.isNegativeAnomaly()); + // verify property "isPositiveAnomaly" + Assertions.assertEquals(false, response.isPositiveAnomaly()); + // verify property "severity" + Assertions.assertEquals(0.0D, response.getSeverity()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/GetAMultivariateModelTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/GetAMultivariateModelTests.java new file mode 100644 index 000000000000..e36486cf2fbb --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/GetAMultivariateModelTests.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.models.AlignMode; +import com.azure.ai.anomalydetector.models.AlignPolicy; +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.ai.anomalydetector.models.DataSchema; +import com.azure.ai.anomalydetector.models.DiagnosticsInfo; +import com.azure.ai.anomalydetector.models.ErrorResponse; +import com.azure.ai.anomalydetector.models.FillNAMethod; +import com.azure.ai.anomalydetector.models.ModelInfo; +import com.azure.ai.anomalydetector.models.ModelState; +import com.azure.ai.anomalydetector.models.ModelStatus; +import com.azure.ai.anomalydetector.models.VariableState; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetAMultivariateModelTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testGetAMultivariateModelTests() { + // method invocation + AnomalyDetectionModel response + = multivariateClient.getMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "modelId" + Assertions.assertEquals("45aad126-aafd-11ea-b8fb-d89ef3400c5f", response.getModelId()); + // verify property "createdTime" + Assertions.assertNotNull(response.getCreatedTime()); + // verify property "lastUpdatedTime" + Assertions.assertNotNull(response.getLastUpdatedTime()); + // verify property "modelInfo" + ModelInfo responseModelInfo = response.getModelInfo(); + Assertions.assertNotNull(responseModelInfo); + Assertions.assertEquals("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + responseModelInfo.getDataSource()); + Assertions.assertEquals(DataSchema.ONE_TABLE, responseModelInfo.getDataSchema()); + Assertions.assertNotNull(responseModelInfo.getStartTime()); + Assertions.assertNotNull(responseModelInfo.getEndTime()); + Assertions.assertEquals("Devops-MultiAD", responseModelInfo.getDisplayName()); + Assertions.assertEquals(20, responseModelInfo.getSlidingWindow()); + AlignPolicy responseModelInfoAlignPolicy = responseModelInfo.getAlignPolicy(); + Assertions.assertNotNull(responseModelInfoAlignPolicy); + Assertions.assertEquals(AlignMode.OUTER, responseModelInfoAlignPolicy.getAlignMode()); + Assertions.assertEquals(FillNAMethod.LINEAR, responseModelInfoAlignPolicy.getFillNAMethod()); + Assertions.assertEquals(0.0D, responseModelInfoAlignPolicy.getPaddingValue()); + Assertions.assertEquals(ModelStatus.READY, responseModelInfo.getStatus()); + List responseModelInfoErrors = responseModelInfo.getErrors(); + Assertions.assertEquals(0, responseModelInfoErrors.size()); + DiagnosticsInfo responseModelInfoDiagnosticsInfo = responseModelInfo.getDiagnosticsInfo(); + Assertions.assertNotNull(responseModelInfoDiagnosticsInfo); + ModelState responseModelInfoDiagnosticsInfoModelState = responseModelInfoDiagnosticsInfo.getModelState(); + Assertions.assertNotNull(responseModelInfoDiagnosticsInfoModelState); + List responseModelInfoDiagnosticsInfoModelStateEpochIds + = responseModelInfoDiagnosticsInfoModelState.getEpochIds(); + Assertions.assertEquals(10, responseModelInfoDiagnosticsInfoModelStateEpochIds.iterator().next()); + List responseModelInfoDiagnosticsInfoModelStateTrainLosses + = responseModelInfoDiagnosticsInfoModelState.getTrainLosses(); + Assertions.assertEquals(0.6291328072547913, + responseModelInfoDiagnosticsInfoModelStateTrainLosses.iterator().next()); + List responseModelInfoDiagnosticsInfoModelStateValidationLosses + = responseModelInfoDiagnosticsInfoModelState.getValidationLosses(); + Assertions.assertEquals(1.9232804775238037, + responseModelInfoDiagnosticsInfoModelStateValidationLosses.iterator().next()); + List responseModelInfoDiagnosticsInfoModelStateLatenciesInSeconds + = responseModelInfoDiagnosticsInfoModelState.getLatenciesInSeconds(); + Assertions.assertEquals(0.3398594856262207, + responseModelInfoDiagnosticsInfoModelStateLatenciesInSeconds.iterator().next()); + List responseModelInfoDiagnosticsInfoVariableStates + = responseModelInfoDiagnosticsInfo.getVariableStates(); + VariableState responseModelInfoDiagnosticsInfoVariableStatesFirstItem + = responseModelInfoDiagnosticsInfoVariableStates.iterator().next(); + Assertions.assertNotNull(responseModelInfoDiagnosticsInfoVariableStatesFirstItem); + Assertions.assertEquals("ad_input", responseModelInfoDiagnosticsInfoVariableStatesFirstItem.getVariable()); + Assertions.assertEquals(0.0D, responseModelInfoDiagnosticsInfoVariableStatesFirstItem.getFilledNARatio()); + Assertions.assertEquals(1441, responseModelInfoDiagnosticsInfoVariableStatesFirstItem.getEffectiveCount()); + Assertions.assertNotNull(responseModelInfoDiagnosticsInfoVariableStatesFirstItem.getFirstTimestamp()); + Assertions.assertNotNull(responseModelInfoDiagnosticsInfoVariableStatesFirstItem.getLastTimestamp()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/GetMultivariateBatchDetectionResultTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/GetMultivariateBatchDetectionResultTests.java new file mode 100644 index 000000000000..33906d29f964 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/GetMultivariateBatchDetectionResultTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.models.AnomalyState; +import com.azure.ai.anomalydetector.models.AnomalyValue; +import com.azure.ai.anomalydetector.models.ErrorResponse; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionOptions; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionResultSummary; +import com.azure.ai.anomalydetector.models.MultivariateBatchDetectionStatus; +import com.azure.ai.anomalydetector.models.MultivariateDetectionResult; +import com.azure.ai.anomalydetector.models.VariableState; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class GetMultivariateBatchDetectionResultTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testGetMultivariateBatchDetectionResultTests() { + // method invocation + MultivariateDetectionResult response + = multivariateClient.getMultivariateBatchDetectionResult("663884e6-b117-11ea-b3de-0242ac130004"); + + // response assertion + Assertions.assertNotNull(response); + // verify property "resultId" + Assertions.assertEquals("663884e6-b117-11ea-b3de-0242ac130004", response.getResultId()); + // verify property "summary" + MultivariateBatchDetectionResultSummary responseSummary = response.getSummary(); + Assertions.assertNotNull(responseSummary); + Assertions.assertEquals(MultivariateBatchDetectionStatus.READY, responseSummary.getStatus()); + List responseSummaryErrors = responseSummary.getErrors(); + Assertions.assertEquals(0, responseSummaryErrors.size()); + List responseSummaryVariableStates = responseSummary.getVariableStates(); + VariableState responseSummaryVariableStatesFirstItem = responseSummaryVariableStates.iterator().next(); + Assertions.assertNotNull(responseSummaryVariableStatesFirstItem); + Assertions.assertEquals("variable_1", responseSummaryVariableStatesFirstItem.getVariable()); + Assertions.assertEquals(0.0D, responseSummaryVariableStatesFirstItem.getFilledNARatio()); + Assertions.assertEquals(30, responseSummaryVariableStatesFirstItem.getEffectiveCount()); + Assertions.assertNotNull(responseSummaryVariableStatesFirstItem.getFirstTimestamp()); + Assertions.assertNotNull(responseSummaryVariableStatesFirstItem.getLastTimestamp()); + MultivariateBatchDetectionOptions responseSummarySetupInfo = responseSummary.getSetupInfo(); + Assertions.assertNotNull(responseSummarySetupInfo); + Assertions.assertEquals("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + responseSummarySetupInfo.getDataSource()); + Assertions.assertEquals(10, responseSummarySetupInfo.getTopContributorCount()); + Assertions.assertNotNull(responseSummarySetupInfo.getStartTime()); + Assertions.assertNotNull(responseSummarySetupInfo.getEndTime()); + // verify property "results" + List responseResults = response.getResults(); + AnomalyState responseResultsFirstItem = responseResults.iterator().next(); + Assertions.assertNotNull(responseResultsFirstItem); + Assertions.assertNotNull(responseResultsFirstItem.getTimestamp()); + AnomalyValue responseResultsFirstItemValue = responseResultsFirstItem.getValue(); + Assertions.assertNotNull(responseResultsFirstItemValue); + Assertions.assertEquals(false, responseResultsFirstItemValue.isAnomaly()); + Assertions.assertEquals(0.0, responseResultsFirstItemValue.getSeverity()); + Assertions.assertEquals(0.6928471326828003, responseResultsFirstItemValue.getScore()); + List responseResultsFirstItemErrors = responseResultsFirstItem.getErrors(); + Assertions.assertEquals(0, responseResultsFirstItemErrors.size()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/ListMultivariateModelsTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/ListMultivariateModelsTests.java new file mode 100644 index 000000000000..03c44dd82278 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/ListMultivariateModelsTests.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.models.AlignMode; +import com.azure.ai.anomalydetector.models.AlignPolicy; +import com.azure.ai.anomalydetector.models.AnomalyDetectionModel; +import com.azure.ai.anomalydetector.models.DataSchema; +import com.azure.ai.anomalydetector.models.DiagnosticsInfo; +import com.azure.ai.anomalydetector.models.ErrorResponse; +import com.azure.ai.anomalydetector.models.FillNAMethod; +import com.azure.ai.anomalydetector.models.ModelInfo; +import com.azure.ai.anomalydetector.models.ModelState; +import com.azure.ai.anomalydetector.models.ModelStatus; +import com.azure.ai.anomalydetector.models.VariableState; +import com.azure.core.http.rest.PagedIterable; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class ListMultivariateModelsTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testListMultivariateModelsTests() { + // method invocation + PagedIterable response = multivariateClient.listMultivariateModels(0, 10); + + // response assertion + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + AnomalyDetectionModel firstItem = response.iterator().next(); + Assertions.assertNotNull(firstItem); + // verify property "modelId" + Assertions.assertEquals("45aad126-aafd-11ea-b8fb-d89ef3400c5f", firstItem.getModelId()); + // verify property "createdTime" + Assertions.assertNotNull(firstItem.getCreatedTime()); + // verify property "lastUpdatedTime" + Assertions.assertNotNull(firstItem.getLastUpdatedTime()); + // verify property "modelInfo" + ModelInfo firstItemModelInfo = firstItem.getModelInfo(); + Assertions.assertNotNull(firstItemModelInfo); + Assertions.assertEquals("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + firstItemModelInfo.getDataSource()); + Assertions.assertEquals(DataSchema.ONE_TABLE, firstItemModelInfo.getDataSchema()); + Assertions.assertNotNull(firstItemModelInfo.getStartTime()); + Assertions.assertNotNull(firstItemModelInfo.getEndTime()); + Assertions.assertEquals("Devops-MultiAD", firstItemModelInfo.getDisplayName()); + Assertions.assertEquals(20, firstItemModelInfo.getSlidingWindow()); + AlignPolicy firstItemModelInfoAlignPolicy = firstItemModelInfo.getAlignPolicy(); + Assertions.assertNotNull(firstItemModelInfoAlignPolicy); + Assertions.assertEquals(AlignMode.OUTER, firstItemModelInfoAlignPolicy.getAlignMode()); + Assertions.assertEquals(FillNAMethod.LINEAR, firstItemModelInfoAlignPolicy.getFillNAMethod()); + Assertions.assertEquals(0.0D, firstItemModelInfoAlignPolicy.getPaddingValue()); + Assertions.assertEquals(ModelStatus.READY, firstItemModelInfo.getStatus()); + List firstItemModelInfoErrors = firstItemModelInfo.getErrors(); + Assertions.assertEquals(0, firstItemModelInfoErrors.size()); + DiagnosticsInfo firstItemModelInfoDiagnosticsInfo = firstItemModelInfo.getDiagnosticsInfo(); + Assertions.assertNotNull(firstItemModelInfoDiagnosticsInfo); + ModelState firstItemModelInfoDiagnosticsInfoModelState = firstItemModelInfoDiagnosticsInfo.getModelState(); + Assertions.assertNotNull(firstItemModelInfoDiagnosticsInfoModelState); + List firstItemModelInfoDiagnosticsInfoModelStateEpochIds + = firstItemModelInfoDiagnosticsInfoModelState.getEpochIds(); + Assertions.assertEquals(10, firstItemModelInfoDiagnosticsInfoModelStateEpochIds.iterator().next()); + List firstItemModelInfoDiagnosticsInfoModelStateTrainLosses + = firstItemModelInfoDiagnosticsInfoModelState.getTrainLosses(); + Assertions.assertEquals(0.6291328072547913, + firstItemModelInfoDiagnosticsInfoModelStateTrainLosses.iterator().next()); + List firstItemModelInfoDiagnosticsInfoModelStateValidationLosses + = firstItemModelInfoDiagnosticsInfoModelState.getValidationLosses(); + Assertions.assertEquals(1.9232804775238037, + firstItemModelInfoDiagnosticsInfoModelStateValidationLosses.iterator().next()); + List firstItemModelInfoDiagnosticsInfoModelStateLatenciesInSeconds + = firstItemModelInfoDiagnosticsInfoModelState.getLatenciesInSeconds(); + Assertions.assertEquals(0.3398594856262207, + firstItemModelInfoDiagnosticsInfoModelStateLatenciesInSeconds.iterator().next()); + List firstItemModelInfoDiagnosticsInfoVariableStates + = firstItemModelInfoDiagnosticsInfo.getVariableStates(); + VariableState firstItemModelInfoDiagnosticsInfoVariableStatesFirstItem + = firstItemModelInfoDiagnosticsInfoVariableStates.iterator().next(); + Assertions.assertNotNull(firstItemModelInfoDiagnosticsInfoVariableStatesFirstItem); + Assertions.assertEquals("ad_input", firstItemModelInfoDiagnosticsInfoVariableStatesFirstItem.getVariable()); + Assertions.assertEquals(0.0D, firstItemModelInfoDiagnosticsInfoVariableStatesFirstItem.getFilledNARatio()); + Assertions.assertEquals(1441, firstItemModelInfoDiagnosticsInfoVariableStatesFirstItem.getEffectiveCount()); + Assertions.assertNotNull(firstItemModelInfoDiagnosticsInfoVariableStatesFirstItem.getFirstTimestamp()); + Assertions.assertNotNull(firstItemModelInfoDiagnosticsInfoVariableStatesFirstItem.getLastTimestamp()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/UnivariateDetectEntireSeriesTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/UnivariateDetectEntireSeriesTests.java new file mode 100644 index 000000000000..5c8eb0d8add8 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/UnivariateDetectEntireSeriesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class UnivariateDetectEntireSeriesTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testUnivariateDetectEntireSeriesTests() { + BinaryData options = BinaryData.fromString( + "{\"series\":[{\"timestamp\":\"1972-01-01T00:00:00Z\",\"value\":826},{\"timestamp\":\"1972-02-01T00:00:00Z\",\"value\":799},{\"timestamp\":\"1972-03-01T00:00:00Z\",\"value\":890},{\"timestamp\":\"1972-04-01T00:00:00Z\",\"value\":900},{\"timestamp\":\"1972-05-01T00:00:00Z\",\"value\":961},{\"timestamp\":\"1972-06-01T00:00:00Z\",\"value\":935},{\"timestamp\":\"1972-07-01T00:00:00Z\",\"value\":894},{\"timestamp\":\"1972-08-01T00:00:00Z\",\"value\":855},{\"timestamp\":\"1972-09-01T00:00:00Z\",\"value\":809},{\"timestamp\":\"1972-10-01T00:00:00Z\",\"value\":810},{\"timestamp\":\"1972-11-01T00:00:00Z\",\"value\":766},{\"timestamp\":\"1972-12-01T00:00:00Z\",\"value\":805},{\"timestamp\":\"1973-01-01T00:00:00Z\",\"value\":821},{\"timestamp\":\"1973-02-01T00:00:00Z\",\"value\":773},{\"timestamp\":\"1973-03-01T00:00:00Z\",\"value\":883},{\"timestamp\":\"1973-04-01T00:00:00Z\",\"value\":898},{\"timestamp\":\"1973-05-01T00:00:00Z\",\"value\":957},{\"timestamp\":\"1973-06-01T00:00:00Z\",\"value\":924},{\"timestamp\":\"1973-07-01T00:00:00Z\",\"value\":881},{\"timestamp\":\"1973-08-01T00:00:00Z\",\"value\":837},{\"timestamp\":\"1973-09-01T00:00:00Z\",\"value\":784},{\"timestamp\":\"1973-10-01T00:00:00Z\",\"value\":791},{\"timestamp\":\"1973-11-01T00:00:00Z\",\"value\":760},{\"timestamp\":\"1973-12-01T00:00:00Z\",\"value\":802},{\"timestamp\":\"1974-01-01T00:00:00Z\",\"value\":828},{\"timestamp\":\"1974-02-01T00:00:00Z\",\"value\":1030},{\"timestamp\":\"1974-03-01T00:00:00Z\",\"value\":889},{\"timestamp\":\"1974-04-01T00:00:00Z\",\"value\":902},{\"timestamp\":\"1974-05-01T00:00:00Z\",\"value\":969},{\"timestamp\":\"1974-06-01T00:00:00Z\",\"value\":947},{\"timestamp\":\"1974-07-01T00:00:00Z\",\"value\":908},{\"timestamp\":\"1974-08-01T00:00:00Z\",\"value\":867},{\"timestamp\":\"1974-09-01T00:00:00Z\",\"value\":815},{\"timestamp\":\"1974-10-01T00:00:00Z\",\"value\":812},{\"timestamp\":\"1974-11-01T00:00:00Z\",\"value\":773},{\"timestamp\":\"1974-12-01T00:00:00Z\",\"value\":813},{\"timestamp\":\"1975-01-01T00:00:00Z\",\"value\":834},{\"timestamp\":\"1975-02-01T00:00:00Z\",\"value\":782},{\"timestamp\":\"1975-03-01T00:00:00Z\",\"value\":892},{\"timestamp\":\"1975-04-01T00:00:00Z\",\"value\":903},{\"timestamp\":\"1975-05-01T00:00:00Z\",\"value\":966},{\"timestamp\":\"1975-06-01T00:00:00Z\",\"value\":937},{\"timestamp\":\"1975-07-01T00:00:00Z\",\"value\":896},{\"timestamp\":\"1975-08-01T00:00:00Z\",\"value\":858},{\"timestamp\":\"1975-09-01T00:00:00Z\",\"value\":817},{\"timestamp\":\"1975-10-01T00:00:00Z\",\"value\":827},{\"timestamp\":\"1975-11-01T00:00:00Z\",\"value\":797},{\"timestamp\":\"1975-12-01T00:00:00Z\",\"value\":843}],\"maxAnomalyRatio\":0.25,\"sensitivity\":95,\"granularity\":\"monthly\",\"imputeMode\":\"auto\"}"); + RequestOptions requestOptions = new RequestOptions().addHeader("Content-Type", "application/json"); + Response response + = univariateClient.detectUnivariateEntireSeriesWithResponse(options, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"isNegativeAnomaly\":[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],\"expectedValues\":[827.7940908243968,798.9133774671927,888.6058431807189,900.5606407986661,962.8389426378304,933.2591606306954,891.0784104799666,856.1781601363697,809.8987227908941,807.375129007505,764.3196682448518,803.933498594564,823.5900620883058,794.0905641334288,883.164245249282,894.8419000690953,956.8430591101258,927.6285055190114,885.812983784303,851.6424797402517,806.0927886943216,804.6826815312029,762.74070738882,804.0251702513732,825.3523662579559,798.0404188724976,889.3016505577698,902.4226124345937,965.867078532635,937.3200495736695,896.1720524711102,862.0087368413656,816.4662342097423,814.4297745524709,771.8614479159354,811.859271346729,831.8998279215521,802.947544797165,892.5684407435083,904.5488214533809,966.8527063844707,937.3168391003043,895.180003672544,860.3649596356635,814.1707285969043,811.9054862686213,769.1083769610742,809.2328084659704],\"isPositiveAnomaly\":[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],\"lowerMargins\":[41.389704541219835,39.94566887335964,44.43029215903594,45.02803203993331,48.14194713189152,46.66295803153477,44.55392052399833,42.808908006818484,40.494936139544706,40.36875645037525,38.215983412242586,40.196674929728196,41.17950310441529,39.70452820667144,44.1582122624641,44.74209500345477,47.84215295550629,46.38142527595057,44.290649189215145,42.58212398701258,40.30463943471608,40.234134076560146,38.137035369441,40.201258512568664,41.267618312897795,39.90202094362488,44.46508252788849,45.121130621729684,48.29335392663175,46.86600247868348,44.80860262355551,43.100436842068284,40.82331171048711,40.721488727623544,38.593072395796774,40.59296356733645,41.5949913960776,40.14737723985825,44.62842203717541,45.227441072669045,48.34263531922354,46.86584195501521,44.759000183627194,43.01824798178317,40.70853642984521,40.59527431343106,38.45541884805371,40.46164042329852],\"period\":12,\"upperMargins\":[41.389704541219835,39.94566887335964,44.43029215903594,45.02803203993331,48.14194713189152,46.66295803153477,44.55392052399833,42.808908006818484,40.494936139544706,40.36875645037525,38.215983412242586,40.196674929728196,41.17950310441529,39.70452820667144,44.1582122624641,44.74209500345477,47.84215295550629,46.38142527595057,44.290649189215145,42.58212398701258,40.30463943471608,40.234134076560146,38.137035369441,40.201258512568664,41.267618312897795,39.90202094362488,44.46508252788849,45.121130621729684,48.29335392663175,46.86600247868348,44.80860262355551,43.100436842068284,40.82331171048711,40.721488727623544,38.593072395796774,40.59296356733645,41.5949913960776,40.14737723985825,44.62842203717541,45.227441072669045,48.34263531922354,46.86584195501521,44.759000183627194,43.01824798178317,40.70853642984521,40.59527431343106,38.45541884805371,40.46164042329852],\"isAnomaly\":[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],\"severity\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2906614447614368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/UnivariateDetectionOfAChangePointTests.java b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/UnivariateDetectionOfAChangePointTests.java new file mode 100644 index 000000000000..b4faefc5baa5 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/src/test/java/com/azure/ai/anomalydetector/generated/UnivariateDetectionOfAChangePointTests.java @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.ai.anomalydetector.generated; + +import com.azure.ai.anomalydetector.models.TimeGranularity; +import com.azure.ai.anomalydetector.models.TimeSeriesPoint; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionOptions; +import com.azure.ai.anomalydetector.models.UnivariateChangePointDetectionResult; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +@Disabled +public final class UnivariateDetectionOfAChangePointTests extends AnomalyDetectorClientTestBase { + @Test + @Disabled + public void testUnivariateDetectionOfAChangePointTests() { + // method invocation + UnivariateChangePointDetectionResult response + = univariateClient.detectUnivariateChangePoint(new UnivariateChangePointDetectionOptions( + Arrays.asList(new TimeSeriesPoint(1639196.0).setTimestamp(OffsetDateTime.parse("2017-01-01T06:45:00Z")), + new TimeSeriesPoint(1639290.0).setTimestamp(OffsetDateTime.parse("2017-01-01T06:50:00Z")), + new TimeSeriesPoint(1667293.0).setTimestamp(OffsetDateTime.parse("2017-01-01T06:55:00Z")), + new TimeSeriesPoint(1703130.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:00:00Z")), + new TimeSeriesPoint(1650912.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:05:00Z")), + new TimeSeriesPoint(1653596.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:10:00Z")), + new TimeSeriesPoint(1653793.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:15:00Z")), + new TimeSeriesPoint(1653795.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:20:00Z")), + new TimeSeriesPoint(1663471.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:25:00Z")), + new TimeSeriesPoint(1662358.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:30:00Z")), + new TimeSeriesPoint(1664320.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:35:00Z")), + new TimeSeriesPoint(1664942.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:40:00Z")), + new TimeSeriesPoint(1664966.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:45:00Z")), + new TimeSeriesPoint(1724271.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:50:00Z")), + new TimeSeriesPoint(1678720.0).setTimestamp(OffsetDateTime.parse("2017-01-01T07:55:00Z")), + new TimeSeriesPoint(1672536.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:00:00Z")), + new TimeSeriesPoint(1672544.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:05:00Z")), + new TimeSeriesPoint(1672364.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:10:00Z")), + new TimeSeriesPoint(1672912.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:15:00Z")), + new TimeSeriesPoint(1672736.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:20:00Z")), + new TimeSeriesPoint(1672725.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:25:00Z")), + new TimeSeriesPoint(1673247.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:30:00Z")), + new TimeSeriesPoint(1673109.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:35:00Z")), + new TimeSeriesPoint(1690088.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:40:00Z")), + new TimeSeriesPoint(1703865.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:45:00Z")), + new TimeSeriesPoint(1703865.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:50:00Z")), + new TimeSeriesPoint(1786581.0).setTimestamp(OffsetDateTime.parse("2017-01-01T08:55:00Z")), + new TimeSeriesPoint(1800945.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:00:00Z")), + new TimeSeriesPoint(1800957.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:05:00Z")), + new TimeSeriesPoint(1801191.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:10:00Z")), + new TimeSeriesPoint(1801412.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:15:00Z")), + new TimeSeriesPoint(1801621.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:20:00Z")), + new TimeSeriesPoint(1801621.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:25:00Z")), + new TimeSeriesPoint(1801654.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:30:00Z")), + new TimeSeriesPoint(1802105.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:35:00Z")), + new TimeSeriesPoint(1801800.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:40:00Z")), + new TimeSeriesPoint(1803040.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:45:00Z")), + new TimeSeriesPoint(1803672.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:50:00Z")), + new TimeSeriesPoint(1803535.0).setTimestamp(OffsetDateTime.parse("2017-01-01T09:55:00Z")), + new TimeSeriesPoint(1803541.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:00:00Z")), + new TimeSeriesPoint(1803545.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:05:00Z")), + new TimeSeriesPoint(1803599.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:10:00Z")), + new TimeSeriesPoint(1803616.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:15:00Z")), + new TimeSeriesPoint(1803619.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:20:00Z")), + new TimeSeriesPoint(1809942.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:25:00Z")), + new TimeSeriesPoint(1802720.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:30:00Z")), + new TimeSeriesPoint(1802720.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:35:00Z")), + new TimeSeriesPoint(1802888.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:40:00Z")), + new TimeSeriesPoint(1809574.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:45:00Z")), + new TimeSeriesPoint(1803896.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:50:00Z")), + new TimeSeriesPoint(1803850.0).setTimestamp(OffsetDateTime.parse("2017-01-01T10:55:00Z")), + new TimeSeriesPoint(1803854.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:00:00Z")), + new TimeSeriesPoint(1803854.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:05:00Z")), + new TimeSeriesPoint(1803797.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:10:00Z")), + new TimeSeriesPoint(1803921.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:15:00Z")), + new TimeSeriesPoint(1803933.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:20:00Z")), + new TimeSeriesPoint(1804040.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:25:00Z")), + new TimeSeriesPoint(1804044.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:30:00Z")), + new TimeSeriesPoint(1804070.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:35:00Z")), + new TimeSeriesPoint(1804070.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:40:00Z")), + new TimeSeriesPoint(1804068.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:45:00Z")), + new TimeSeriesPoint(1804073.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:50:00Z")), + new TimeSeriesPoint(1804101.0).setTimestamp(OffsetDateTime.parse("2017-01-01T11:55:00Z")), + new TimeSeriesPoint(1804674.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:00:00Z")), + new TimeSeriesPoint(1804714.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:05:00Z")), + new TimeSeriesPoint(1804730.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:10:00Z")), + new TimeSeriesPoint(1804816.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:15:00Z")), + new TimeSeriesPoint(1803996.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:20:00Z")), + new TimeSeriesPoint(1803998.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:25:00Z")), + new TimeSeriesPoint(1804015.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:30:00Z")), + new TimeSeriesPoint(1804047.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:35:00Z")), + new TimeSeriesPoint(1804050.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:40:00Z")), + new TimeSeriesPoint(1804218.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:45:00Z")), + new TimeSeriesPoint(1804217.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:50:00Z")), + new TimeSeriesPoint(1804217.0).setTimestamp(OffsetDateTime.parse("2017-01-01T12:55:00Z")), + new TimeSeriesPoint(1804205.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:00:00Z")), + new TimeSeriesPoint(1804728.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:05:00Z")), + new TimeSeriesPoint(1804748.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:10:00Z")), + new TimeSeriesPoint(1805232.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:15:00Z")), + new TimeSeriesPoint(1814121.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:20:00Z")), + new TimeSeriesPoint(1806789.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:25:00Z")), + new TimeSeriesPoint(1806119.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:30:00Z")), + new TimeSeriesPoint(1806329.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:35:00Z")), + new TimeSeriesPoint(1806454.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:40:00Z")), + new TimeSeriesPoint(1806852.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:45:00Z")), + new TimeSeriesPoint(1807347.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:50:00Z")), + new TimeSeriesPoint(1812144.0).setTimestamp(OffsetDateTime.parse("2017-01-01T13:55:00Z")), + new TimeSeriesPoint(1807418.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:00:00Z")), + new TimeSeriesPoint(1807418.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:05:00Z")), + new TimeSeriesPoint(1807432.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:10:00Z")), + new TimeSeriesPoint(1808540.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:15:00Z")), + new TimeSeriesPoint(1808541.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:20:00Z")), + new TimeSeriesPoint(1807831.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:25:00Z")), + new TimeSeriesPoint(1807852.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:30:00Z")), + new TimeSeriesPoint(1807811.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:35:00Z")), + new TimeSeriesPoint(2214285.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:40:00Z")), + new TimeSeriesPoint(2215019.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:45:00Z")), + new TimeSeriesPoint(2215329.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:50:00Z")), + new TimeSeriesPoint(2215097.0).setTimestamp(OffsetDateTime.parse("2017-01-01T14:55:00Z")), + new TimeSeriesPoint(2215129.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:00:00Z")), + new TimeSeriesPoint(2215120.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:05:00Z")), + new TimeSeriesPoint(2217056.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:10:00Z")), + new TimeSeriesPoint(2217056.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:15:00Z")), + new TimeSeriesPoint(2222126.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:20:00Z")), + new TimeSeriesPoint(2226472.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:25:00Z")), + new TimeSeriesPoint(2226722.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:30:00Z")), + new TimeSeriesPoint(2226729.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:35:00Z")), + new TimeSeriesPoint(2226735.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:40:00Z")), + new TimeSeriesPoint(2226735.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:45:00Z")), + new TimeSeriesPoint(2226735.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:50:00Z")), + new TimeSeriesPoint(2226952.0).setTimestamp(OffsetDateTime.parse("2017-01-01T15:55:00Z")), + new TimeSeriesPoint(2226962.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:00:00Z")), + new TimeSeriesPoint(2649337.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:05:00Z")), + new TimeSeriesPoint(2092796.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:10:00Z")), + new TimeSeriesPoint(2092839.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:15:00Z")), + new TimeSeriesPoint(2092940.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:20:00Z")), + new TimeSeriesPoint(2092940.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:25:00Z")), + new TimeSeriesPoint(2092965.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:30:00Z")), + new TimeSeriesPoint(2092979.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:35:00Z")), + new TimeSeriesPoint(2095588.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:40:00Z")), + new TimeSeriesPoint(2099586.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:45:00Z")), + new TimeSeriesPoint(2102981.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:50:00Z")), + new TimeSeriesPoint(2108053.0).setTimestamp(OffsetDateTime.parse("2017-01-01T16:55:00Z")), + new TimeSeriesPoint(2107907.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:00:00Z")), + new TimeSeriesPoint(2108241.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:05:00Z")), + new TimeSeriesPoint(2100321.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:10:00Z")), + new TimeSeriesPoint(2100448.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:15:00Z")), + new TimeSeriesPoint(2100483.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:20:00Z")), + new TimeSeriesPoint(2103042.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:25:00Z")), + new TimeSeriesPoint(2103037.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:30:00Z")), + new TimeSeriesPoint(2103040.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:35:00Z")), + new TimeSeriesPoint(2103054.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:40:00Z")), + new TimeSeriesPoint(2103058.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:45:00Z")), + new TimeSeriesPoint(1830757.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:50:00Z")), + new TimeSeriesPoint(1830855.0).setTimestamp(OffsetDateTime.parse("2017-01-01T17:55:00Z")), + new TimeSeriesPoint(1831495.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:00:00Z")), + new TimeSeriesPoint(1831463.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:05:00Z")), + new TimeSeriesPoint(1831963.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:10:00Z")), + new TimeSeriesPoint(1832046.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:15:00Z")), + new TimeSeriesPoint(1832070.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:20:00Z")), + new TimeSeriesPoint(1835511.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:25:00Z")), + new TimeSeriesPoint(1835265.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:30:00Z")), + new TimeSeriesPoint(1835481.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:35:00Z")), + new TimeSeriesPoint(1835578.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:40:00Z")), + new TimeSeriesPoint(1835611.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:45:00Z")), + new TimeSeriesPoint(1836314.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:50:00Z")), + new TimeSeriesPoint(1836369.0).setTimestamp(OffsetDateTime.parse("2017-01-01T18:55:00Z")), + new TimeSeriesPoint(1837280.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:00:00Z")), + new TimeSeriesPoint(1842939.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:05:00Z")), + new TimeSeriesPoint(1843126.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:10:00Z")), + new TimeSeriesPoint(1845840.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:15:00Z")), + new TimeSeriesPoint(1842444.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:20:00Z")), + new TimeSeriesPoint(1839891.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:25:00Z")), + new TimeSeriesPoint(1839875.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:30:00Z")), + new TimeSeriesPoint(1839870.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:35:00Z")), + new TimeSeriesPoint(1840090.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:40:00Z")), + new TimeSeriesPoint(1840479.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:45:00Z")), + new TimeSeriesPoint(1840479.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:50:00Z")), + new TimeSeriesPoint(1840482.0).setTimestamp(OffsetDateTime.parse("2017-01-01T19:55:00Z")), + new TimeSeriesPoint(1841522.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:00:00Z")), + new TimeSeriesPoint(1841836.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:05:00Z")), + new TimeSeriesPoint(1842377.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:10:00Z")), + new TimeSeriesPoint(1842388.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:15:00Z")), + new TimeSeriesPoint(1842489.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:20:00Z")), + new TimeSeriesPoint(1842489.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:25:00Z")), + new TimeSeriesPoint(1842489.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:30:00Z")), + new TimeSeriesPoint(1842496.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:35:00Z")), + new TimeSeriesPoint(1842689.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:40:00Z")), + new TimeSeriesPoint(1843117.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:45:00Z")), + new TimeSeriesPoint(1843116.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:50:00Z")), + new TimeSeriesPoint(1843227.0).setTimestamp(OffsetDateTime.parse("2017-01-01T20:55:00Z")), + new TimeSeriesPoint(1843138.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:00:00Z")), + new TimeSeriesPoint(1843141.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:05:00Z")), + new TimeSeriesPoint(1843310.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:10:00Z")), + new TimeSeriesPoint(1843310.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:15:00Z")), + new TimeSeriesPoint(1843507.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:20:00Z")), + new TimeSeriesPoint(1843953.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:25:00Z")), + new TimeSeriesPoint(1844778.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:30:00Z")), + new TimeSeriesPoint(1843918.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:35:00Z")), + new TimeSeriesPoint(1882692.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:40:00Z")), + new TimeSeriesPoint(1974888.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:45:00Z")), + new TimeSeriesPoint(2157136.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:50:00Z")), + new TimeSeriesPoint(2154987.0).setTimestamp(OffsetDateTime.parse("2017-01-01T21:55:00Z")), + new TimeSeriesPoint(2155664.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:00:00Z")), + new TimeSeriesPoint(2155660.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:05:00Z")), + new TimeSeriesPoint(2155824.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:10:00Z")), + new TimeSeriesPoint(2155824.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:15:00Z")), + new TimeSeriesPoint(2156329.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:20:00Z")), + new TimeSeriesPoint(2156479.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:25:00Z")), + new TimeSeriesPoint(2165269.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:30:00Z")), + new TimeSeriesPoint(2165433.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:35:00Z")), + new TimeSeriesPoint(2165739.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:40:00Z")), + new TimeSeriesPoint(2165931.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:45:00Z")), + new TimeSeriesPoint(2165928.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:50:00Z")), + new TimeSeriesPoint(2165989.0).setTimestamp(OffsetDateTime.parse("2017-01-01T22:55:00Z")), + new TimeSeriesPoint(2228961.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:00:00Z")), + new TimeSeriesPoint(2228961.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:05:00Z")), + new TimeSeriesPoint(2228961.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:10:00Z")), + new TimeSeriesPoint(2485802.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:15:00Z")), + new TimeSeriesPoint(2485802.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:20:00Z")), + new TimeSeriesPoint(2486021.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:25:00Z")), + new TimeSeriesPoint(2485293.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:30:00Z")), + new TimeSeriesPoint(2485293.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:35:00Z")), + new TimeSeriesPoint(2485324.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:40:00Z")), + new TimeSeriesPoint(2489142.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:45:00Z")), + new TimeSeriesPoint(2526312.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:50:00Z")), + new TimeSeriesPoint(2526313.0).setTimestamp(OffsetDateTime.parse("2017-01-01T23:55:00Z")), + new TimeSeriesPoint(2526314.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:00:00Z")), + new TimeSeriesPoint(2526324.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:05:00Z")), + new TimeSeriesPoint(2526325.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:10:00Z")), + new TimeSeriesPoint(2526205.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:15:00Z")), + new TimeSeriesPoint(2526226.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:20:00Z")), + new TimeSeriesPoint(2526475.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:25:00Z")), + new TimeSeriesPoint(2526471.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:30:00Z")), + new TimeSeriesPoint(2526471.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:35:00Z")), + new TimeSeriesPoint(2526534.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:40:00Z")), + new TimeSeriesPoint(2526646.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:45:00Z")), + new TimeSeriesPoint(2526646.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:50:00Z")), + new TimeSeriesPoint(2526648.0).setTimestamp(OffsetDateTime.parse("2017-01-02T00:55:00Z")), + new TimeSeriesPoint(2526658.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:00:00Z")), + new TimeSeriesPoint(2526771.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:05:00Z")), + new TimeSeriesPoint(2526773.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:10:00Z")), + new TimeSeriesPoint(2526793.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:15:00Z")), + new TimeSeriesPoint(2527010.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:20:00Z")), + new TimeSeriesPoint(2527031.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:25:00Z")), + new TimeSeriesPoint(3178096.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:30:00Z")), + new TimeSeriesPoint(3196305.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:35:00Z")), + new TimeSeriesPoint(3196202.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:40:00Z")), + new TimeSeriesPoint(3196202.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:45:00Z")), + new TimeSeriesPoint(3196205.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:50:00Z")), + new TimeSeriesPoint(3229232.0).setTimestamp(OffsetDateTime.parse("2017-01-02T01:55:00Z")), + new TimeSeriesPoint(3230463.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:00:00Z")), + new TimeSeriesPoint(3230468.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:05:00Z")), + new TimeSeriesPoint(3230468.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:10:00Z")), + new TimeSeriesPoint(3230468.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:15:00Z")), + new TimeSeriesPoint(3230470.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:20:00Z")), + new TimeSeriesPoint(3230467.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:25:00Z")), + new TimeSeriesPoint(3230506.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:30:00Z")), + new TimeSeriesPoint(3231536.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:35:00Z")), + new TimeSeriesPoint(3230723.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:40:00Z")), + new TimeSeriesPoint(3230727.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:45:00Z")), + new TimeSeriesPoint(3230727.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:50:00Z")), + new TimeSeriesPoint(3230727.0).setTimestamp(OffsetDateTime.parse("2017-01-02T02:55:00Z")), + new TimeSeriesPoint(3231880.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:00:00Z")), + new TimeSeriesPoint(3232283.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:05:00Z")), + new TimeSeriesPoint(3232283.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:10:00Z")), + new TimeSeriesPoint(3232283.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:15:00Z")), + new TimeSeriesPoint(3232325.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:20:00Z")), + new TimeSeriesPoint(3232323.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:25:00Z")), + new TimeSeriesPoint(3232327.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:30:00Z")), + new TimeSeriesPoint(3232340.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:35:00Z")), + new TimeSeriesPoint(3232713.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:40:00Z")), + new TimeSeriesPoint(3232729.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:45:00Z")), + new TimeSeriesPoint(3232756.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:50:00Z")), + new TimeSeriesPoint(3233500.0).setTimestamp(OffsetDateTime.parse("2017-01-02T03:55:00Z")), + new TimeSeriesPoint(3233500.0).setTimestamp(OffsetDateTime.parse("2017-01-02T04:00:00Z")), + new TimeSeriesPoint(3233500.0).setTimestamp(OffsetDateTime.parse("2017-01-02T04:05:00Z"))), + TimeGranularity.PER_MINUTE).setCustomInterval(5) + .setPeriod(0) + .setStableTrendWindow(10) + .setThreshold(0.99D)); + + // response assertion + Assertions.assertNotNull(response); + // verify property "period" + Assertions.assertEquals(0, response.getPeriod()); + // verify property "isChangePoint" + List responseIsChangePoint = response.getIsChangePoint(); + Assertions.assertEquals(false, responseIsChangePoint.iterator().next()); + // verify property "confidenceScores" + List responseConfidenceScores = response.getConfidenceScores(); + Assertions.assertEquals(0.11841763735063232, responseConfidenceScores.iterator().next()); + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/test-resources.json b/sdk/anomalydetector/azure-ai-anomalydetector/test-resources.json new file mode 100644 index 000000000000..fa4e0cdc8ad5 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/test-resources.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "The base resource name." + } + }, + "location": { + "type": "string", + "defaultValue": "westus2", + "metadata": { + "description": "The location of the resource. By default, this is the same as the resource group." + } + }, + "endpointPrefix": { + "defaultValue": "anomalydetector", + "type": "string" + }, + "endpointSuffix": { + "defaultValue": ".cognitiveservices.azure.com", + "type": "string" + }, + "testApplicationOid": { + "type": "string", + "metadata": { + "description": "The principal to assign the role to. This is application object id." + } + }, + "tenantId": { + "type": "string", + "metadata": { + "description": "The tenant id to which the application and resources belong." + } + }, + "testApplicationId": { + "type": "string", + "metadata": { + "description": "The application client id used to run tests." + } + } + }, + "variables": { + "roleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/a97b65f3-24c7-4388-baec-2e87135dc908')]", + "uniqueSubDomainName": "[format('{0}-{1}', parameters('baseName'), parameters('endpointPrefix'))]", + "endpointValue": "[format('https://{0}-{1}{2}', parameters('baseName'), parameters('endpointPrefix'), parameters('endpointSuffix'))]" + }, + "resources": [ + { + "type": "Microsoft.CognitiveServices/accounts", + "apiVersion": "2017-04-18", + "name": "[variables('uniqueSubDomainName')]", + "location":"[parameters('location')]", + "sku": { + "name": "S0" + }, + "kind": "AnomalyDetector", + "properties": { + "customSubDomainName": "[variables('uniqueSubDomainName')]" + } + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2018-09-01-preview", + "name": "[guid(resourceGroup().id)]", + "properties": { + "roleDefinitionId": "[variables('roleDefinitionId')]", + "principalId": "[parameters('testApplicationOid')]" + } + } + ], + "outputs": { + "AZURE_TENANT_ID": { + "type": "string", + "value": "[parameters('tenantId')]" + }, + "AZURE_CLIENT_ID": { + "type": "string", + "value": "[parameters('testApplicationId')]" + }, + "ANOMALY_DETECTOR_API_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts',variables('uniqueSubDomainName')), '2017-04-18').key1]" + }, + "ANOMALY_DETECTOR_ENDPOINT": { + "type": "string", + "value": "[variables('endpointValue')]" + } + } +} diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/tests.yml b/sdk/anomalydetector/azure-ai-anomalydetector/tests.yml new file mode 100644 index 000000000000..fe448ee40a2b --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/tests.yml @@ -0,0 +1,10 @@ +trigger: none + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml + parameters: + ServiceDirectory: anomalydetector + Artifacts: + - name: azure-ai-anomalydetector + groupId: com.azure + safeName: azureaianomalydetector diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/tsp-location.yaml b/sdk/anomalydetector/azure-ai-anomalydetector/tsp-location.yaml new file mode 100644 index 000000000000..7cc6b8a4a8e0 --- /dev/null +++ b/sdk/anomalydetector/azure-ai-anomalydetector/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/cognitiveservices/AnomalyDetector +commit: d69bf516b84328b1d678b0520cbe9cfb57de0b81 +repo: Azure/azure-rest-api-specs diff --git a/sdk/anomalydetector/ci.yml b/sdk/anomalydetector/ci.yml new file mode 100644 index 000000000000..f34cbd2d575d --- /dev/null +++ b/sdk/anomalydetector/ci.yml @@ -0,0 +1,36 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/anomalydetector/ + exclude: + - sdk/anomalydetector/pom.xml + - sdk/anomalydetector/azure-ai-anomalydetector/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/anomalydetector/ + exclude: + - sdk/anomalydetector/pom.xml + - sdk/anomalydetector/azure-ai-anomalydetector/pom.xml + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: anomalydetector + Artifacts: + - name: azure-ai-anomalydetector + groupId: com.azure + safeName: azureaianomalydetector diff --git a/sdk/anomalydetector/cspell.yml b/sdk/anomalydetector/cspell.yml new file mode 100644 index 000000000000..8899b8dc6f15 --- /dev/null +++ b/sdk/anomalydetector/cspell.yml @@ -0,0 +1,9 @@ +# Spell-check overrides for this SDK group. +# Inherits the global config at the repo root. +# +# Add words that only appear in this folder here, in alphabetical order. +# Cross-cutting terms should go in the root cspell.json instead. +version: "0.2" +import: + - ../../.vscode/cspell.json +words: diff --git a/sdk/anomalydetector/pom.xml b/sdk/anomalydetector/pom.xml new file mode 100644 index 000000000000..9d74d4af2f5c --- /dev/null +++ b/sdk/anomalydetector/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + com.azure + azure-anomalydetector-service + pom + 1.0.0 + + azure-ai-anomalydetector + + diff --git a/sdk/appservice/azure-resourcemanager-appservice/pom.xml b/sdk/appservice/azure-resourcemanager-appservice/pom.xml index 3cb7f6b84357..dff4207974aa 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/pom.xml +++ b/sdk/appservice/azure-resourcemanager-appservice/pom.xml @@ -69,7 +69,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 com.azure.resourcemanager diff --git a/sdk/attestation/azure-security-attestation/pom.xml b/sdk/attestation/azure-security-attestation/pom.xml index 2900e9b032d0..cf049fb42666 100644 --- a/sdk/attestation/azure-security-attestation/pom.xml +++ b/sdk/attestation/azure-security-attestation/pom.xml @@ -37,7 +37,6 @@ --add-opens com.azure.security.attestation/com.azure.security.attestation=ALL-UNNAMED --add-opens com.azure.security.attestation/com.azure.security.attestation.models=ALL-UNNAMED - --add-reads com.azure.security.attestation=org.bouncycastle.provider false diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md index bcfd39e172d8..17f197ba44d2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (Unreleased) ### Features Added @@ -10,460 +10,6 @@ ### Other Changes -## 1.2.0 (2026-10-15) - -- Azure Resource Manager Azure Stack Hci client library for Java. This package contains Microsoft Azure SDK for Azure Stack Hci Management SDK. Azure Stack HCI service. Package api-version 2026-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Features Added - -* `models.ClusterJob$UpdateStages` was added - -* `models.DiskType` was added - -* `models.NetworkAdapterActionStatus` was added - -* `models.StorageConfiguration` was added - -* `models.NetworkAdapterOperationStatus` was added - -* `models.LifecycleOperationStatus` was added - -* `models.HciJobType` was added - -* `models.EdgeMachineVolume$DefinitionStages` was added - -* `models.EdgeMachineDisk` was added - -* `models.InterfaceState` was added - -* `models.VolumeReportedProperties` was added - -* `models.EdgeMachineDiskPrivilegedJob$Update` was added - -* `models.EdgeMachineDiskPrivilegedJobProperties` was added - -* `models.ProvisionOsJobProperties` was added - -* `models.EdgeMachinePatch` was added - -* `models.AuthenticationType` was added - -* `models.EdgeMachineHostNetwork` was added - -* `models.DownloadRequest` was added - -* `models.ForcePushNetworkAdapterJobProperties` was added - -* `models.NetworkAdapterConfiguration` was added - -* `models.Metadata` was added - -* `models.EdgeMachineDeploymentData` was added - -* `models.ClusterJobProperties` was added - -* `models.EdgeMachineDiskJob$Definition` was added - -* `models.HciAddServerJobProperties` was added - -* `models.RepairServerJobServerDetails` was added - -* `models.NetworkAdapterJobReportedProperties` was added - -* `models.DiskFileSystemType` was added - -* `models.SyncConfigurationJobProperties` was added - -* `models.ResolutionStrategy` was added - -* `models.EdgeMachineDisk$Update` was added - -* `models.ProvisionOsReportedProperties` was added - -* `models.SecretType` was added - -* `models.EdgeMachineWorkloadInventoryItem` was added - -* `models.EdgeMachineSecuritySettings$UpdateStages` was added - -* `models.LifecycleStage` was added - -* `models.EdgeMachineLifecycleStatus` was added - -* `models.PrivilegedJobType` was added - -* `models.WifiConfigurationDesiredProperties` was added - -* `models.DiskActionStatus` was added - -* `models.EdgeMachineProperties` was added - -* `models.EdgeMachineJob` was added - -* `models.HciConfigureSdnIntegrationJobProperties` was added - -* `models.ClusterJob` was added - -* `models.IscsiTargetPortalAddress` was added - -* `models.IscsiAdapterIPConfig` was added - -* `models.ValidateOwnershipVouchersRequest` was added - -* `models.NodeStorageType` was added - -* `models.TimeConfiguration` was added - -* `models.EdgeMachineJobProperties` was added - -* `models.NetworkAdapterReportedProperties` was added - -* `models.SolutionType` was added - -* `models.EdgeMachineRemoteSupportJobProperties` was added - -* `models.EdgeMachineVolume$Definition` was added - -* `models.EdgeMachines` was added - -* `models.EdgeMachineStorageNetwork` was added - -* `models.EdgeMachineValidateResponse` was added - -* `models.EdgeMachineHostNetworkIntent` was added - -* `models.EdgeMachine$Definition` was added - -* `models.EdgeMachineDiskJobProperties` was added - -* `models.EdgeMachineNetworkAdapterJob$Definition` was added - -* `models.EdgeMachineVolume$UpdateStages` was added - -* `models.EdgeMachineDiskPrivilegedJob` was added - -* `models.EdgeMachineAdapterPropertyOverrides` was added - -* `models.OsImages` was added - -* `models.EdgeMachineNetworkAdapterJob$DefinitionStages` was added - -* `models.EdgeMachineJobs` was added - -* `models.EdgeMachineVolumeProperties` was added - -* `models.IpAddressRange` was added - -* `models.EdgeMachineSecuritySettingsOperations` was added - -* `models.EdgeMachineDiskJobs` was added - -* `models.EdgeMachineDisk$Definition` was added - -* `models.ClusterJobs` was added - -* `models.DiskConfiguration` was added - -* `models.OSOperationType` was added - -* `models.EdgeMachineSecuritySettings$Definition` was added - -* `models.DiskStorageType` was added - -* `models.EdgeMachineNetworkAdapterProperties` was added - -* `models.IscsiNetworkConfig` was added - -* `models.IpInterfaceType` was added - -* `models.EdgeMachine$DefinitionStages` was added - -* `models.StorageInitiatorType` was added - -* `models.ClusterJob$Update` was added - -* `models.EdgeMachineDeploymentConfiguration` was added - -* `models.DiskState` was added - -* `models.OsImageProperties` was added - -* `models.EdgeMachineDiskPrivilegedJob$Definition` was added - -* `models.EdgeMachineJob$DefinitionStages` was added - -* `models.EdgeMachineRemoteSupportJobReportedProperties` was added - -* `models.DownloadOsJobProperties` was added - -* `models.EdgeMachineVirtualSwitchConfigurationOverrides` was added - -* `models.EdgeMachineJob$Definition` was added - -* `models.IscsiChapSettings` was added - -* `models.DiskDeploymentStep` was added - -* `models.DiskReportedProperties` was added - -* `models.OnboardingConfiguration` was added - -* `models.ClusterSdnProperties` was added - -* `models.EAPMethod` was added - -* `models.EdgeMachineDiskJob` was added - -* `models.EdgeMachineNetworkAdapterJob` was added - -* `models.ClusterJob$Definition` was added - -* `models.EdgeMachineNicDetail` was added - -* `models.OnboardingResourceType` was added - -* `models.EdgeMachineNetworkAdapterJobProperties` was added - -* `models.NetworkAdapterProvisioningStatus` was added - -* `models.EdgeMachine` was added - -* `models.EdgeMachineVolume$Update` was added - -* `models.EdgeMachineDeploymentSettings` was added - -* `models.EdgeMachineDisk$DefinitionStages` was added - -* `models.EdgeMachineKind` was added - -* `models.NetworkInterfaceType` was added - -* `models.EdgeMachineSecuritySettings$Update` was added - -* `models.OwnershipVoucherValidationStatus` was added - -* `models.SdnStatus` was added - -* `models.OwnershipVoucherDetails` was added - -* `models.OsProvisionProfile` was added - -* `models.ApplyConfigurationNetworkAdapterJobProperties` was added - -* `models.WifiConfigurationReportedProperties` was added - -* `models.EdgeMachineNetworkAdapterJob$Update` was added - -* `models.NetworkAdapterDeploymentStep` was added - -* `models.SiteDetails` was added - -* `models.DiskVolumeReportedProperties` was added - -* `models.ValidateOwnershipVouchersResponse` was added - -* `models.EdgeMachineDiskPrivilegedJobs` was added - -* `models.UserDetails` was added - -* `models.EdgeMachineDiskProperties` was added - -* `models.DiskJobReportedProperties` was added - -* `models.TargetDeviceConfiguration` was added - -* `models.EdgeMachineNetworkAdapterJobs` was added - -* `models.IpAssignmentType` was added - -* `models.ClusterJob$DefinitionStages` was added - -* `models.JobReportedProperties` was added - -* `models.HciRepairServerJobProperties` was added - -* `models.EdgeMachineNetworkAdapterJob$UpdateStages` was added - -* `models.NetworkConfiguration` was added - -* `models.EdgeMachineDeploymentSetting$DefinitionStages` was added - -* `models.EdgeMachineScaleUnits` was added - -* `models.WifiSecret` was added - -* `models.EdgeMachineDiskJob$Update` was added - -* `models.ProvisioningRequest` was added - -* `models.DownloadOsProfile` was added - -* `models.OsImage` was added - -* `models.LifecycleStatus` was added - -* `models.EdgeMachineDeploymentSettingProperties` was added - -* `models.Architecture` was added - -* `models.LifecycleDetails` was added - -* `models.EdgeMachineSecurityComplianceStatus` was added - -* `models.ConnectionState` was added - -* `models.EdgeMachineSecurityProperties` was added - -* `models.EdgeMachineNetworkAdapters` was added - -* `models.EdgeMachineReportedProperties` was added - -* `models.EdgeMachineDiskJob$UpdateStages` was added - -* `models.SdnIntegrationIntent` was added - -* `models.EdgeMachineRemoteSupportNodeSettings` was added - -* `models.OwnershipVoucherValidationDetails` was added - -* `models.NetworkAdapter` was added - -* `models.VolumeConfiguration` was added - -* `models.EdgeMachineDiskJob$DefinitionStages` was added - -* `models.EdgeMachineSecuritySettings$DefinitionStages` was added - -* `models.IscsiAdapterProperties` was added - -* `models.ProvisioningOsType` was added - -* `models.StorageInitiator` was added - -* `models.EdgeMachineSecuritySettings` was added - -* `models.EdgeMachineDisks` was added - -* `models.EdgeMachineJob$Update` was added - -* `models.EdgeMachine$UpdateStages` was added - -* `models.EdgeMachineJobType` was added - -* `models.EdgeMachineDisk$UpdateStages` was added - -* `models.OwnerKeyType` was added - -* `models.EdgeMachineCollectLogJobReportedProperties` was added - -* `models.OperationDetail` was added - -* `models.EdgeMachineDiskPrivilegedJob$DefinitionStages` was added - -* `models.StorageProfile` was added - -* `models.HardwareProfile` was added - -* `models.AddServerJobServerDetails` was added - -* `models.WifiSecretType` was added - -* `models.EdgeMachineConnectivityStatus` was added - -* `models.OwnershipVouchers` was added - -* `models.EdgeMachineCollectLogJobProperties` was added - -* `models.EdgeMachineNetworkAdapter` was added - -* `models.EdgeMachineStorageAdapterIpInfo` was added - -* `models.IscsiChapType` was added - -* `models.NetworkAdapterJobType` was added - -* `models.CreateVolumeJobProperties` was added - -* `models.EdgeMachineState` was added - -* `models.WebProxyConfiguration` was added - -* `models.EdgeMachineDeploymentSetting$Update` was added - -* `models.SdnProperties` was added - -* `models.EdgeMachineJob$UpdateStages` was added - -* `models.DiskJobType` was added - -* `models.EdgeMachineValidateRequest` was added - -* `models.EdgeMachineDeploymentSetting$Definition` was added - -* `models.EdgeMachineDeploymentSetting$UpdateStages` was added - -* `models.EdgeMachineVolume` was added - -* `models.EdgeMachineVolumes` was added - -* `models.DeleteVolumeJobProperties` was added - -* `models.ProvisioningDetails` was added - -* `models.SyncConfigurationNetworkAdapterJobProperties` was added - -* `models.IscsiConfig` was added - -* `models.EdgeMachine$Update` was added - -* `models.OsProfile` was added - -* `models.EdgeMachineDeploymentSetting` was added - -* `models.NetworkAdapterStatus` was added - -* `models.DiskVolumeConfiguration` was added - -* `models.EdgeMachineNetworkProfile` was added - -* `models.EdgeMachineDiskPrivilegedJob$UpdateStages` was added - -#### `models.DeploymentStep` was modified - -* `percentComplete()` was added -* `recommendedSteps()` was added -* `error()` was added -* `additionalData()` was added - -#### `models.Cluster` was modified - -* `sdnProperties()` was added - -#### `models.HciNetworkProfile` was modified - -* `sdnProperties()` was added - -#### `models.EceSecrets` was modified - -* `CHAP_CREDENTIAL` was added -* `MUTUAL_CHAP_CREDENTIAL` was added - -#### `AzureStackHciManager` was modified - -* `edgeMachines()` was added -* `osImages()` was added -* `ownershipVouchers()` was added -* `edgeMachineDiskPrivilegedJobs()` was added -* `edgeMachineSecuritySettingsOperations()` was added -* `edgeMachineDiskJobs()` was added -* `edgeMachineNetworkAdapters()` was added -* `edgeMachineVolumes()` was added -* `edgeMachineNetworkAdapterJobs()` was added -* `edgeMachineDisks()` was added -* `clusterJobs()` was added -* `edgeMachineJobs()` was added -* `edgeMachineDeploymentSettings()` was added - ## 1.1.0 (2026-05-15) - Azure Resource Manager Azure Stack Hci client library for Java. This package contains Microsoft Azure SDK for Azure Stack Hci Management SDK. Azure Stack HCI service. Package api-version 2026-04-30. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md index a3eb471986c0..52ece1364a23 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Azure Stack Hci client library for Java. -This package contains Microsoft Azure SDK for Azure Stack Hci Management SDK. Azure Stack HCI service. Package api-version 2026-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Azure Stack Hci Management SDK. Azure Stack HCI service. Package api-version 2026-04-30. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-azurestackhci - 1.2.0 + 1.1.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md index 14778f0a2bec..0e394742a98b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md @@ -14,13 +14,6 @@ - [Reconcile](#arcsettings_reconcile) - [Update](#arcsettings_update) -## ClusterJobs - -- [CreateOrUpdate](#clusterjobs_createorupdate) -- [Delete](#clusterjobs_delete) -- [Get](#clusterjobs_get) -- [List](#clusterjobs_list) - ## Clusters - [ConfigureRemoteSupport](#clusters_configureremotesupport) @@ -58,79 +51,6 @@ - [List](#edgedevices_list) - [Validate](#edgedevices_validate) -## EdgeMachineDeploymentSettings - -- [CreateOrUpdate](#edgemachinedeploymentsettings_createorupdate) -- [Delete](#edgemachinedeploymentsettings_delete) -- [Get](#edgemachinedeploymentsettings_get) -- [ListByEdgeMachine](#edgemachinedeploymentsettings_listbyedgemachine) - -## EdgeMachineDiskJobs - -- [CreateOrUpdate](#edgemachinediskjobs_createorupdate) -- [Delete](#edgemachinediskjobs_delete) -- [Get](#edgemachinediskjobs_get) -- [List](#edgemachinediskjobs_list) - -## EdgeMachineDiskPrivilegedJobs - -- [CreateOrUpdate](#edgemachinediskprivilegedjobs_createorupdate) -- [Delete](#edgemachinediskprivilegedjobs_delete) -- [Get](#edgemachinediskprivilegedjobs_get) -- [List](#edgemachinediskprivilegedjobs_list) - -## EdgeMachineDisks - -- [CreateOrUpdate](#edgemachinedisks_createorupdate) -- [Delete](#edgemachinedisks_delete) -- [Get](#edgemachinedisks_get) -- [List](#edgemachinedisks_list) - -## EdgeMachineJobs - -- [CreateOrUpdate](#edgemachinejobs_createorupdate) -- [Delete](#edgemachinejobs_delete) -- [Get](#edgemachinejobs_get) -- [List](#edgemachinejobs_list) - -## EdgeMachineNetworkAdapterJobs - -- [CreateOrUpdate](#edgemachinenetworkadapterjobs_createorupdate) -- [Delete](#edgemachinenetworkadapterjobs_delete) -- [Get](#edgemachinenetworkadapterjobs_get) -- [List](#edgemachinenetworkadapterjobs_list) - -## EdgeMachineNetworkAdapters - -- [Get](#edgemachinenetworkadapters_get) -- [List](#edgemachinenetworkadapters_list) - -## EdgeMachineSecuritySettingsOperations - -- [CreateOrUpdate](#edgemachinesecuritysettingsoperations_createorupdate) -- [Delete](#edgemachinesecuritysettingsoperations_delete) -- [Get](#edgemachinesecuritysettingsoperations_get) -- [ListByEdgeMachine](#edgemachinesecuritysettingsoperations_listbyedgemachine) - -## EdgeMachineVolumes - -- [CreateOrUpdate](#edgemachinevolumes_createorupdate) -- [Delete](#edgemachinevolumes_delete) -- [Get](#edgemachinevolumes_get) -- [List](#edgemachinevolumes_list) - -## EdgeMachines - -- [CreateOrUpdate](#edgemachines_createorupdate) -- [Delete](#edgemachines_delete) -- [GetByResourceGroup](#edgemachines_getbyresourcegroup) -- [List](#edgemachines_list) -- [ListByResourceGroup](#edgemachines_listbyresourcegroup) -- [RefreshApplicableUpdates](#edgemachines_refreshapplicableupdates) -- [RefreshSecuritySettings](#edgemachines_refreshsecuritysettings) -- [Update](#edgemachines_update) -- [Validate](#edgemachines_validate) - ## Extensions - [Create](#extensions_create) @@ -150,15 +70,6 @@ - [List](#operations_list) -## OsImages - -- [Get](#osimages_get) -- [ListBySubscriptionLocationResource](#osimages_listbysubscriptionlocationresource) - -## OwnershipVouchers - -- [Validate](#ownershipvouchers_validate) - ## SecuritySettings - [CreateOrUpdate](#securitysettings_createorupdate) @@ -211,7 +122,7 @@ */ public final class ArcSettingsConsentAndInstallDefaultExtensionsSamples { /* - * x-ms-original-file: 2026-10-01/ConsentAndInstallDefaultExtensions.json + * x-ms-original-file: 2026-04-30/ConsentAndInstallDefaultExtensions.json */ /** * Sample code: Consent And Install Default Extensions. @@ -235,7 +146,7 @@ public final class ArcSettingsConsentAndInstallDefaultExtensionsSamples { */ public final class ArcSettingsCreateSamples { /* - * x-ms-original-file: 2026-10-01/PutArcSetting.json + * x-ms-original-file: 2026-04-30/PutArcSetting.json */ /** * Sample code: Create ArcSetting. @@ -256,7 +167,7 @@ public final class ArcSettingsCreateSamples { */ public final class ArcSettingsCreateIdentitySamples { /* - * x-ms-original-file: 2026-10-01/CreateArcIdentity.json + * x-ms-original-file: 2026-04-30/CreateArcIdentity.json */ /** * Sample code: Create Arc Identity. @@ -277,7 +188,7 @@ public final class ArcSettingsCreateIdentitySamples { */ public final class ArcSettingsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteArcSetting.json + * x-ms-original-file: 2026-04-30/DeleteArcSetting.json */ /** * Sample code: Delete ArcSetting. @@ -298,7 +209,7 @@ public final class ArcSettingsDeleteSamples { */ public final class ArcSettingsGeneratePasswordSamples { /* - * x-ms-original-file: 2026-10-01/GeneratePassword.json + * x-ms-original-file: 2026-04-30/GeneratePassword.json */ /** * Sample code: Generate Password. @@ -320,7 +231,7 @@ public final class ArcSettingsGeneratePasswordSamples { */ public final class ArcSettingsGetSamples { /* - * x-ms-original-file: 2026-10-01/GetArcSetting.json + * x-ms-original-file: 2026-04-30/GetArcSetting.json */ /** * Sample code: Get ArcSetting. @@ -341,7 +252,7 @@ public final class ArcSettingsGetSamples { */ public final class ArcSettingsInitializeDisableProcessSamples { /* - * x-ms-original-file: 2026-10-01/InitializeDisableProcess.json + * x-ms-original-file: 2026-04-30/InitializeDisableProcess.json */ /** * Sample code: Trigger ARC Disable. @@ -363,7 +274,7 @@ public final class ArcSettingsInitializeDisableProcessSamples { */ public final class ArcSettingsListByClusterSamples { /* - * x-ms-original-file: 2026-10-01/ListArcSettingsByCluster.json + * x-ms-original-file: 2026-04-30/ListArcSettingsByCluster.json */ /** * Sample code: List ArcSetting resources by HCI Cluster. @@ -389,7 +300,7 @@ import java.util.Arrays; */ public final class ArcSettingsReconcileSamples { /* - * x-ms-original-file: 2026-10-01/reconcileArcSettings.json + * x-ms-original-file: 2026-04-30/reconcileArcSettings.json */ /** * Sample code: Reconcile Arc Settings. @@ -422,7 +333,7 @@ import java.util.Arrays; */ public final class ArcSettingsUpdateSamples { /* - * x-ms-original-file: 2026-10-01/PatchArcSetting.json + * x-ms-original-file: 2026-04-30/PatchArcSetting.json */ /** * Sample code: Patch ArcSetting. @@ -442,192 +353,6 @@ public final class ArcSettingsUpdateSamples { } ``` -### ClusterJobs_CreateOrUpdate - -```java -import com.azure.resourcemanager.azurestackhci.models.AddServerJobServerDetails; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets; -import com.azure.resourcemanager.azurestackhci.models.EceSecrets; -import com.azure.resourcemanager.azurestackhci.models.HciAddServerJobProperties; -import com.azure.resourcemanager.azurestackhci.models.HciConfigureSdnIntegrationJobProperties; -import com.azure.resourcemanager.azurestackhci.models.HciRepairServerJobProperties; -import com.azure.resourcemanager.azurestackhci.models.RepairServerJobServerDetails; -import com.azure.resourcemanager.azurestackhci.models.SdnIntegrationIntent; -import java.util.Arrays; - -/** - * Samples for ClusterJobs CreateOrUpdate. - */ -public final class ClusterJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_CreateOrUpdate_RepairServer.json - */ - /** - * Sample code: ClusterJobs_CreateOrUpdate_RepairServerJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsCreateOrUpdateRepairServerJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .define("repairserver") - .withExistingCluster("test-rg", "myCluster") - .withProperties(new HciRepairServerJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withRepairServerJobServerDetails(Arrays.asList(new RepairServerJobServerDetails() - .withServerName("Node-2") - .withServerResourceId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2"))) - .withSecrets(Arrays.asList( - new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.LOCAL_ADMIN_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder"), - new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.AZURE_STACK_LCMUSER_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder")))) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_CreateOrUpdate_ConfigureSdnIntegration_Enable.json - */ - /** - * Sample code: ClusterJobs_CreateOrUpdate_ConfigureSdnIntegration_Enable. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void clusterJobsCreateOrUpdateConfigureSdnIntegrationEnable( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .define("configureSdnIntegration") - .withExistingCluster("test-rg", "myCluster") - .withProperties(new HciConfigureSdnIntegrationJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withSdnIntegrationIntent(SdnIntegrationIntent.ENABLE)) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_CreateOrUpdate_AddServer.json - */ - /** - * Sample code: ClusterJobs_CreateOrUpdate_AddServerJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsCreateOrUpdateAddServerJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .define("addserver") - .withExistingCluster("test-rg", "myCluster") - .withProperties(new HciAddServerJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withAddServerJobServerDetails(Arrays.asList(new AddServerJobServerDetails().withServerName("Node-2") - .withHostIpv4Address("192.168.10.10") - .withServerResourceId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2"))) - .withSecrets(Arrays.asList( - new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.LOCAL_ADMIN_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder"), - new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.AZURE_STACK_LCMUSER_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder")))) - .create(); - } -} -``` - -### ClusterJobs_Delete - -```java -/** - * Samples for ClusterJobs Delete. - */ -public final class ClusterJobsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_Delete.json - */ - /** - * Sample code: ClusterJobs_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void clusterJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .delete("rghci", "3-Vz3LSRO5Q6q8EV-PKs8-5E", "configureSdnIntegration", com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterJobs_Get - -```java -/** - * Samples for ClusterJobs Get. - */ -public final class ClusterJobsGetSamples { - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_Get_AddServerJob.json - */ - /** - * Sample code: ClusterJobs_Get_AddServerJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsGetAddServerJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs().getWithResponse("test-rg", "myCluster", "addserver", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_Get_ConfigureSdnIntegrationJob.json - */ - /** - * Sample code: ClusterJobs_Get_ConfigureSdnIntegrationJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsGetConfigureSdnIntegrationJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .getWithResponse("rghci", "Y-k0MG", "configureSdnIntegration", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_Get_RepairServerJob.json - */ - /** - * Sample code: ClusterJobs_Get_RepairServerJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsGetRepairServerJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs().getWithResponse("test-rg", "myCluster", "repairserver", com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterJobs_List - -```java -/** - * Samples for ClusterJobs List. - */ -public final class ClusterJobsListSamples { - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_List.json - */ - /** - * Sample code: ClusterJobs_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void clusterJobsList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs().list("rghci", "Ql40O4-I77S", com.azure.core.util.Context.NONE); - } -} -``` - ### Clusters_ConfigureRemoteSupport ```java @@ -641,7 +366,7 @@ import java.time.OffsetDateTime; */ public final class ClustersConfigureRemoteSupportSamples { /* - * x-ms-original-file: 2026-10-01/ConfigureRemoteSupport.json + * x-ms-original-file: 2026-04-30/ConfigureRemoteSupport.json */ /** * Sample code: Configure Remote Support. @@ -669,7 +394,7 @@ import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType */ public final class ClustersCreateSamples { /* - * x-ms-original-file: 2026-10-01/CreateCluster.json + * x-ms-original-file: 2026-04-30/CreateCluster.json */ /** * Sample code: Create cluster. @@ -698,7 +423,7 @@ public final class ClustersCreateSamples { */ public final class ClustersCreateIdentitySamples { /* - * x-ms-original-file: 2026-10-01/CreateClusterIdentity.json + * x-ms-original-file: 2026-04-30/CreateClusterIdentity.json */ /** * Sample code: Create cluster Identity. @@ -719,7 +444,7 @@ public final class ClustersCreateIdentitySamples { */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteCluster.json + * x-ms-original-file: 2026-04-30/DeleteCluster.json */ /** * Sample code: Delete cluster. @@ -744,7 +469,7 @@ import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; */ public final class ClustersExtendSoftwareAssuranceBenefitSamples { /* - * x-ms-original-file: 2026-10-01/ExtendSoftwareAssuranceBenefit.json + * x-ms-original-file: 2026-04-30/ExtendSoftwareAssuranceBenefit.json */ /** * Sample code: Create cluster Identity. @@ -769,7 +494,7 @@ public final class ClustersExtendSoftwareAssuranceBenefitSamples { */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-10-01/GetCluster.json + * x-ms-original-file: 2026-04-30/GetCluster.json */ /** * Sample code: Get cluster. @@ -790,7 +515,7 @@ public final class ClustersGetByResourceGroupSamples { */ public final class ClustersListSamples { /* - * x-ms-original-file: 2026-10-01/ListClustersBySubscription.json + * x-ms-original-file: 2026-04-30/ListClustersBySubscription.json */ /** * Sample code: List clusters in a given subscription. @@ -812,7 +537,7 @@ public final class ClustersListSamples { */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2026-10-01/ListClustersByResourceGroup.json + * x-ms-original-file: 2026-04-30/ListClustersByResourceGroup.json */ /** * Sample code: List clusters in a given resource group. @@ -838,7 +563,7 @@ import java.time.OffsetDateTime; */ public final class ClustersTriggerLogCollectionSamples { /* - * x-ms-original-file: 2026-10-01/TriggerLogCollection.json + * x-ms-original-file: 2026-04-30/TriggerLogCollection.json */ /** * Sample code: Trigger Log Collection. @@ -872,7 +597,7 @@ import java.util.Map; */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: 2026-10-01/UpdateCluster.json + * x-ms-original-file: 2026-04-30/UpdateCluster.json */ /** * Sample code: Update cluster. @@ -920,7 +645,7 @@ import java.util.Arrays; */ public final class ClustersUpdateSecretsLocationsSamples { /* - * x-ms-original-file: 2026-10-01/Clusters_UpdateSecretsLocations.json + * x-ms-original-file: 2026-04-30/Clusters_UpdateSecretsLocations.json */ /** * Sample code: Update secrets locations for a Cluster. @@ -951,7 +676,7 @@ import java.util.Arrays; */ public final class ClustersUploadCertificateSamples { /* - * x-ms-original-file: 2026-10-01/UploadCertificate.json + * x-ms-original-file: 2026-04-30/UploadCertificate.json */ /** * Sample code: Upload certificate. @@ -1019,7 +744,7 @@ import java.util.Arrays; */ public final class DeploymentSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-10-01/PutDeploymentSettings_StorageS2D.json + * x-ms-original-file: 2026-04-30/PutDeploymentSettings_StorageS2D.json */ /** * Sample code: Create Deployment Settings with S2D Storage. @@ -1131,7 +856,7 @@ public final class DeploymentSettingsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-10-01/PutDeploymentSettingsWithADLess.json + * x-ms-original-file: 2026-04-30/PutDeploymentSettingsWithADLess.json */ /** * Sample code: Create Deployment Settings Without Active Directory Integration. @@ -1260,7 +985,7 @@ public final class DeploymentSettingsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-10-01/PutDeploymentSettings.json + * x-ms-original-file: 2026-04-30/PutDeploymentSettings.json */ /** * Sample code: Create Deployment Settings. @@ -1388,7 +1113,7 @@ public final class DeploymentSettingsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-10-01/PutDeploymentSettings_StorageSAN.json + * x-ms-original-file: 2026-04-30/PutDeploymentSettings_StorageSAN.json */ /** * Sample code: Create Deployment Settings with SAN Storage. @@ -1522,7 +1247,7 @@ public final class DeploymentSettingsCreateOrUpdateSamples { */ public final class DeploymentSettingsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteDeploymentSettings.json + * x-ms-original-file: 2026-04-30/DeleteDeploymentSettings.json */ /** * Sample code: Delete Deployment Settings. @@ -1543,7 +1268,7 @@ public final class DeploymentSettingsDeleteSamples { */ public final class DeploymentSettingsGetSamples { /* - * x-ms-original-file: 2026-10-01/GetDeploymentSettings.json + * x-ms-original-file: 2026-04-30/GetDeploymentSettings.json */ /** * Sample code: Get Deployment Settings. @@ -1565,7 +1290,7 @@ public final class DeploymentSettingsGetSamples { */ public final class DeploymentSettingsListByClustersSamples { /* - * x-ms-original-file: 2026-10-01/ListDeploymentSettingsByCluster.json + * x-ms-original-file: 2026-04-30/ListDeploymentSettingsByCluster.json */ /** * Sample code: List Deployment Settings. @@ -1593,7 +1318,7 @@ import java.time.OffsetDateTime; */ public final class EdgeDeviceJobsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_CreateOrUpdate_RemoteSupport.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_CreateOrUpdate_RemoteSupport.json */ /** * Sample code: EdgeDeviceJobs_CreateOrUpdate_RemoteSupport. @@ -1614,7 +1339,7 @@ public final class EdgeDeviceJobsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_CreateOrUpdate_CollectLog.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_CreateOrUpdate_CollectLog.json */ /** * Sample code: EdgeDeviceJobs_CreateOrUpdate_CollectLog. @@ -1643,7 +1368,7 @@ public final class EdgeDeviceJobsCreateOrUpdateSamples { */ public final class EdgeDeviceJobsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_Delete.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_Delete.json */ /** * Sample code: EdgeDeviceJobs_Delete. @@ -1667,7 +1392,7 @@ public final class EdgeDeviceJobsDeleteSamples { */ public final class EdgeDeviceJobsGetSamples { /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_Get_RemoteSupport.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_Get_RemoteSupport.json */ /** * Sample code: EdgeDeviceJobs_Get_RemoteSupport. @@ -1692,7 +1417,7 @@ public final class EdgeDeviceJobsGetSamples { */ public final class EdgeDeviceJobsListByEdgeDeviceSamples { /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_ListByEdgeDevice.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_ListByEdgeDevice.json */ /** * Sample code: EdgeDeviceJobs_ListByEdgeDevice. @@ -1723,7 +1448,7 @@ import java.util.Arrays; */ public final class EdgeDevicesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-10-01/CreateHciEdgeDevice.json + * x-ms-original-file: 2026-04-30/CreateHciEdgeDevice.json */ /** * Sample code: Create HCI Edge Device. @@ -1758,7 +1483,7 @@ public final class EdgeDevicesCreateOrUpdateSamples { */ public final class EdgeDevicesDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteEdgeDevices.json + * x-ms-original-file: 2026-04-30/DeleteEdgeDevices.json */ /** * Sample code: Delete Edge Devices. @@ -1782,7 +1507,7 @@ public final class EdgeDevicesDeleteSamples { */ public final class EdgeDevicesGetSamples { /* - * x-ms-original-file: 2026-10-01/GetEdgeDevices.json + * x-ms-original-file: 2026-04-30/GetEdgeDevices.json */ /** * Sample code: Get Edge Device. @@ -1806,7 +1531,7 @@ public final class EdgeDevicesGetSamples { */ public final class EdgeDevicesListSamples { /* - * x-ms-original-file: 2026-10-01/ListEdgeDevices.json + * x-ms-original-file: 2026-04-30/ListEdgeDevices.json */ /** * Sample code: List Edge Devices. @@ -1833,7 +1558,7 @@ import java.util.Arrays; */ public final class EdgeDevicesValidateSamples { /* - * x-ms-original-file: 2026-10-01/ValidateEdgeDevices.json + * x-ms-original-file: 2026-04-30/ValidateEdgeDevices.json */ /** * Sample code: Validate Edge Devices. @@ -1854,1570 +1579,252 @@ public final class EdgeDevicesValidateSamples { } ``` -### EdgeMachineDeploymentSettings_CreateOrUpdate +### Extensions_Create ```java -import com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets; -import com.azure.resourcemanager.azurestackhci.models.EceSecrets; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentConfiguration; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSettingProperties; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineScaleUnits; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterIPConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterProperties; -import com.azure.resourcemanager.azurestackhci.models.IscsiChapSettings; -import com.azure.resourcemanager.azurestackhci.models.IscsiChapType; -import com.azure.resourcemanager.azurestackhci.models.IscsiConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiNetworkConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiTargetPortalAddress; -import com.azure.resourcemanager.azurestackhci.models.NodeStorageType; -import java.util.Arrays; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; /** - * Samples for EdgeMachineDeploymentSettings CreateOrUpdate. + * Samples for Extensions Create. */ -public final class EdgeMachineDeploymentSettingsCreateOrUpdateSamples { +public final class ExtensionsCreateSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDeploymentSettings_CreateOrUpdate.json + * x-ms-original-file: 2026-04-30/PutExtension.json */ /** - * Sample code: EdgeMachineDeploymentSettings_CreateOrUpdate. + * Sample code: Create Arc Extension. * * @param manager Entry point to AzureStackHciManager. */ - public static void edgeMachineDeploymentSettingsCreateOrUpdate( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDeploymentSettings() - .define("default") - .withExistingEdgeMachine("test-rg", "EdgeMachine01") - .withProperties( - new EdgeMachineDeploymentSettingProperties() - .withDeploymentConfiguration( - new EdgeMachineDeploymentConfiguration().withVersion("10.2.0.0") - .withScaleUnits(Arrays.asList(new EdgeMachineScaleUnits().withDeploymentData( - new EdgeMachineDeploymentData().withStorageType(NodeStorageType.SAN_ISCSI) - .withIScsiConfig(new IscsiConfig() - .withIScsiNetworkConfig(new IscsiNetworkConfig() - .withAdapterProperties(new IscsiAdapterProperties().withJumboPacket(9014)) - .withAdapterIPConfig(Arrays - .asList(new IscsiAdapterIPConfig().withNetworkAdapterName("iSCSI-A") - .withVlanId(401) - .withAddressPrefix("10.10.50.0/24") - .withTargetPortalAddresses(Arrays - .asList(new IscsiTargetPortalAddress().withIpAddress("10.0.0.1") - .withNextHop("10.10.50.1")))))) - .withChapSettings( - new IscsiChapSettings().withChapType(IscsiChapType.BIDIRECTIONAL)) - .withInitiatorIqn("iqn.2025-01.com.example:storage-target")) - .withSecrets( - Arrays.asList(new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.CHAP_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder")))))))) + public static void createArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) + throws IOException { + manager.extensions() + .define("MicrosoftMonitoringAgent") + .withExistingArcSetting("test-rg", "myCluster", "default") + .withPublisher("Microsoft.Compute") + .withTypePropertiesType("MicrosoftMonitoringAgent") + .withTypeHandlerVersion("1.10") + .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON)) + .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceKey\":\"xx\"}", Object.class, SerializerEncoding.JSON)) + .withEnableAutomaticUpgrade(false) .create(); } } ``` -### EdgeMachineDeploymentSettings_Delete +### Extensions_Delete ```java /** - * Samples for EdgeMachineDeploymentSettings Delete. + * Samples for Extensions Delete. */ -public final class EdgeMachineDeploymentSettingsDeleteSamples { +public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDeploymentSettings_Delete.json + * x-ms-original-file: 2026-04-30/DeleteExtension.json */ /** - * Sample code: EdgeMachineDeploymentSettings_Delete. + * Sample code: Delete Arc Extension. * * @param manager Entry point to AzureStackHciManager. */ - public static void - edgeMachineDeploymentSettingsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDeploymentSettings() - .delete("test-rg", "EdgeMachine01", "default", com.azure.core.util.Context.NONE); + public static void deleteArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions() + .delete("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", com.azure.core.util.Context.NONE); } } ``` -### EdgeMachineDeploymentSettings_Get +### Extensions_Get ```java /** - * Samples for EdgeMachineDeploymentSettings Get. + * Samples for Extensions Get. */ -public final class EdgeMachineDeploymentSettingsGetSamples { +public final class ExtensionsGetSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDeploymentSettings_Get.json + * x-ms-original-file: 2026-04-30/GetExtension.json */ /** - * Sample code: EdgeMachineDeploymentSettings_Get. + * Sample code: Get ArcSettings Extension. * * @param manager Entry point to AzureStackHciManager. */ - public static void - edgeMachineDeploymentSettingsGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDeploymentSettings() - .getWithResponse("test-rg", "EdgeMachine01", "default", com.azure.core.util.Context.NONE); + public static void getArcSettingsExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions() + .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", + com.azure.core.util.Context.NONE); } } ``` -### EdgeMachineDeploymentSettings_ListByEdgeMachine +### Extensions_ListByArcSetting ```java /** - * Samples for EdgeMachineDeploymentSettings ListByEdgeMachine. + * Samples for Extensions ListByArcSetting. */ -public final class EdgeMachineDeploymentSettingsListByEdgeMachineSamples { +public final class ExtensionsListByArcSettingSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDeploymentSettings_ListByEdgeMachine.json + * x-ms-original-file: 2026-04-30/ListExtensionsByArcSetting.json */ /** - * Sample code: EdgeMachineDeploymentSettings_ListByEdgeMachine. + * Sample code: List Extensions under ArcSetting resource. * * @param manager Entry point to AzureStackHciManager. */ - public static void edgeMachineDeploymentSettingsListByEdgeMachine( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDeploymentSettings() - .listByEdgeMachine("test-rg", "EdgeMachine01", com.azure.core.util.Context.NONE); + public static void + listExtensionsUnderArcSettingResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions().listByArcSetting("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); } } ``` -### EdgeMachineDiskJobs_CreateOrUpdate +### Extensions_Update ```java -import com.azure.resourcemanager.azurestackhci.models.CreateVolumeJobProperties; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.azurestackhci.models.Extension; +import com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters; +import java.io.IOException; /** - * Samples for EdgeMachineDiskJobs CreateOrUpdate. + * Samples for Extensions Update. */ -public final class EdgeMachineDiskJobsCreateOrUpdateSamples { +public final class ExtensionsUpdateSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskJobs_CreateOrUpdate_CreateVolume.json + * x-ms-original-file: 2026-04-30/PatchExtension.json */ /** - * Sample code: EdgeMachineDiskJobs_CreateOrUpdate_CreateVolume. + * Sample code: Update Arc Extension. * * @param manager Entry point to AzureStackHciManager. */ - public static void edgeMachineDiskJobsCreateOrUpdateCreateVolume( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskJobs() - .define("CreateVolume") - .withExistingDisk("test-rg", "EdgeMachine01", "disk-001") - .withProperties(new CreateVolumeJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withSizeInBytes("107374182400") - .withPath("/data") - .withFileSystem(DiskFileSystemType.EXT4)) - .create(); + public static void updateArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) + throws IOException { + Extension resource = manager.extensions() + .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("1.10") + .withEnableAutomaticUpgrade(false) + .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON)) + .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceKey\":\"xx\"}", Object.class, SerializerEncoding.JSON))) + .apply(); } } ``` -### EdgeMachineDiskJobs_Delete +### Extensions_Upgrade ```java +import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; + /** - * Samples for EdgeMachineDiskJobs Delete. + * Samples for Extensions Upgrade. */ -public final class EdgeMachineDiskJobsDeleteSamples { +public final class ExtensionsUpgradeSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskJobs_Delete.json + * x-ms-original-file: 2026-04-30/Extensions_Upgrade.json */ /** - * Sample code: EdgeMachineDiskJobs_Delete. + * Sample code: Upgrade Machine Extensions. * * @param manager Entry point to AzureStackHciManager. */ - public static void edgeMachineDiskJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskJobs() - .delete("test-rg", "EdgeMachine01", "disk-001", "CreateVolume", com.azure.core.util.Context.NONE); + public static void upgradeMachineExtensions(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions() + .upgrade("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", + new ExtensionUpgradeParameters().withTargetVersion("1.0.18062.0"), com.azure.core.util.Context.NONE); } } ``` -### EdgeMachineDiskJobs_Get +### Offers_Get ```java /** - * Samples for EdgeMachineDiskJobs Get. + * Samples for Offers Get. */ -public final class EdgeMachineDiskJobsGetSamples { +public final class OffersGetSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskJobs_Get_CreateVolume.json + * x-ms-original-file: 2026-04-30/GetOffer.json */ /** - * Sample code: EdgeMachineDiskJobs_Get_CreateVolume. + * Sample code: Get Offer. * * @param manager Entry point to AzureStackHciManager. */ - public static void - edgeMachineDiskJobsGetCreateVolume(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskJobs() - .getWithResponse("test-rg", "EdgeMachine01", "disk-001", "CreateVolume", com.azure.core.util.Context.NONE); + public static void getOffer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.offers() + .getWithResponse("test-rg", "myCluster", "publisher1", "offer1", null, com.azure.core.util.Context.NONE); } } ``` -### EdgeMachineDiskJobs_List +### Offers_ListByCluster ```java /** - * Samples for EdgeMachineDiskJobs List. + * Samples for Offers ListByCluster. */ -public final class EdgeMachineDiskJobsListSamples { +public final class OffersListByClusterSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskJobs_List.json + * x-ms-original-file: 2026-04-30/ListOffersByCluster.json */ /** - * Sample code: EdgeMachineDiskJobs_List. + * Sample code: List Offer resources by HCI Cluster. * * @param manager Entry point to AzureStackHciManager. */ - public static void edgeMachineDiskJobsList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskJobs().list("test-rg", "EdgeMachine01", "disk-001", com.azure.core.util.Context.NONE); + public static void + listOfferResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.offers().listByCluster("test-rg", "myCluster", null, com.azure.core.util.Context.NONE); } } ``` -### EdgeMachineDiskPrivilegedJobs_CreateOrUpdate +### Offers_ListByPublisher ```java -import com.azure.resourcemanager.azurestackhci.models.DeleteVolumeJobProperties; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; - /** - * Samples for EdgeMachineDiskPrivilegedJobs CreateOrUpdate. + * Samples for Offers ListByPublisher. */ -public final class EdgeMachineDiskPrivilegedJobsCreateOrUpdateSamples { +public final class OffersListByPublisherSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskPrivilegedJobs_CreateOrUpdate_DeleteVolume.json + * x-ms-original-file: 2026-04-30/ListOffersByPublisher.json */ /** - * Sample code: EdgeMachineDiskPrivilegedJobs_CreateOrUpdate_DeleteVolume. + * Sample code: List Offer resources by publisher for the HCI Cluster. * * @param manager Entry point to AzureStackHciManager. */ - public static void edgeMachineDiskPrivilegedJobsCreateOrUpdateDeleteVolume( + public static void listOfferResourcesByPublisherForTheHCICluster( com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskPrivilegedJobs() - .define("DeleteVolume") - .withExistingDisk("test-rg", "EdgeMachine01", "disk-001") - .withProperties(new DeleteVolumeJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withVolumePath("/data") - .withConfirmDeletion(true)) - .create(); + manager.offers().listByPublisher("test-rg", "myCluster", "publisher1", null, com.azure.core.util.Context.NONE); } } ``` -### EdgeMachineDiskPrivilegedJobs_Delete +### Operations_List ```java /** - * Samples for EdgeMachineDiskPrivilegedJobs Delete. + * Samples for Operations List. */ -public final class EdgeMachineDiskPrivilegedJobsDeleteSamples { +public final class OperationsListSamples { /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskPrivilegedJobs_Delete.json + * x-ms-original-file: 2026-04-30/Operations_List.json */ /** - * Sample code: EdgeMachineDiskPrivilegedJobs_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineDiskPrivilegedJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskPrivilegedJobs() - .delete("test-rg", "EdgeMachine01", "disk-001", "DeleteVolume", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineDiskPrivilegedJobs_Get - -```java -/** - * Samples for EdgeMachineDiskPrivilegedJobs Get. - */ -public final class EdgeMachineDiskPrivilegedJobsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskPrivilegedJobs_Get_DeleteVolume.json - */ - /** - * Sample code: EdgeMachineDiskPrivilegedJobs_Get_DeleteVolume. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDiskPrivilegedJobsGetDeleteVolume( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskPrivilegedJobs() - .getWithResponse("test-rg", "EdgeMachine01", "disk-001", "DeleteVolume", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineDiskPrivilegedJobs_List - -```java -/** - * Samples for EdgeMachineDiskPrivilegedJobs List. - */ -public final class EdgeMachineDiskPrivilegedJobsListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskPrivilegedJobs_List.json - */ - /** - * Sample code: EdgeMachineDiskPrivilegedJobs_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineDiskPrivilegedJobsList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskPrivilegedJobs() - .list("test-rg", "EdgeMachine01", "disk-001", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineDisks_CreateOrUpdate - -```java -import com.azure.resourcemanager.azurestackhci.models.DiskConfiguration; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; -import com.azure.resourcemanager.azurestackhci.models.DiskVolumeConfiguration; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskProperties; -import java.util.Arrays; - -/** - * Samples for EdgeMachineDisks CreateOrUpdate. - */ -public final class EdgeMachineDisksCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDisks_CreateOrUpdate.json - */ - /** - * Sample code: EdgeMachineDisks_CreateOrUpdate. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineDisksCreateOrUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDisks() - .define("disk-001") - .withExistingEdgeMachine("test-rg", "EdgeMachine01") - .withProperties(new EdgeMachineDiskProperties().withDiskConfiguration(new DiskConfiguration() - .withVolumes(Arrays.asList(new DiskVolumeConfiguration().withSizeInBytes("107374182400") - .withPath("/data") - .withFileSystem(DiskFileSystemType.EXT4))))) - .create(); - } -} -``` - -### EdgeMachineDisks_Delete - -```java -/** - * Samples for EdgeMachineDisks Delete. - */ -public final class EdgeMachineDisksDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDisks_Delete.json - */ - /** - * Sample code: EdgeMachineDisks_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDisksDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDisks().delete("test-rg", "EdgeMachine01", "disk-001", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineDisks_Get - -```java -/** - * Samples for EdgeMachineDisks Get. - */ -public final class EdgeMachineDisksGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDisks_Get.json - */ - /** - * Sample code: EdgeMachineDisks_Get. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDisksGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDisks() - .getWithResponse("test-rg", "EdgeMachine01", "disk-001", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineDisks_List - -```java -/** - * Samples for EdgeMachineDisks List. - */ -public final class EdgeMachineDisksListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDisks_List.json - */ - /** - * Sample code: EdgeMachineDisks_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDisksList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDisks().list("test-rg", "EdgeMachine01", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineJobs_CreateOrUpdate - -```java -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import com.azure.resourcemanager.azurestackhci.models.DownloadOsJobProperties; -import com.azure.resourcemanager.azurestackhci.models.DownloadOsProfile; -import com.azure.resourcemanager.azurestackhci.models.DownloadRequest; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobProperties; -import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; -import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; -import com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration; -import com.azure.resourcemanager.azurestackhci.models.OSOperationType; -import com.azure.resourcemanager.azurestackhci.models.OnboardingConfiguration; -import com.azure.resourcemanager.azurestackhci.models.OnboardingResourceType; -import com.azure.resourcemanager.azurestackhci.models.OsProvisionProfile; -import com.azure.resourcemanager.azurestackhci.models.ProvisionOsJobProperties; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningOsType; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningRequest; -import com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel; -import com.azure.resourcemanager.azurestackhci.models.RemoteSupportType; -import com.azure.resourcemanager.azurestackhci.models.SecretType; -import com.azure.resourcemanager.azurestackhci.models.StorageConfiguration; -import com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration; -import com.azure.resourcemanager.azurestackhci.models.TimeConfiguration; -import com.azure.resourcemanager.azurestackhci.models.UserDetails; -import com.azure.resourcemanager.azurestackhci.models.WebProxyConfiguration; -import java.time.OffsetDateTime; -import java.util.Arrays; - -/** - * Samples for EdgeMachineJobs CreateOrUpdate. - */ -public final class EdgeMachineJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_DownloadOs.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_DownloadOs. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsCreateOrUpdateDownloadOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("DownloadOs") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties(new DownloadOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withDownloadRequest(new DownloadRequest().withTarget(ProvisioningOsType.AZURE_LINUX) - .withOsProfile(new DownloadOsProfile().withOsName("AzureLinux") - .withOsType("AzureLinux") - .withOsVersion("3.0") - .withOsImageLocation("https://aka.ms/aep/azlinux3.0") - .withVsrVersion("1.0.0") - .withImageHash("sha256:a8b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1") - .withGpgPubKey("fakeTokenPlaceholder")))) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_ProvisionOs.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_ProvisionOs. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsCreateOrUpdateProvisionOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("ProvisionOs") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties(new ProvisionOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withProvisioningRequest(new ProvisioningRequest().withTarget(ProvisioningOsType.AZURE_LINUX) - .withOsProfile(new OsProvisionProfile().withOsName("AzureLinux") - .withOsType("AzureLinux") - .withOsVersion("3.0") - .withOsImageLocation("https://aka.ms/aep/azlinux3.0") - .withVsrVersion("1.0.0") - .withImageHash("sha256:a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456") - .withGpgPubKey("fakeTokenPlaceholder") - .withOperationType(OSOperationType.PROVISION)) - .withUserDetails(Arrays.asList(new UserDetails().withUserName("edgeuser") - .withSecretType(SecretType.KEY_VAULT) - .withSecretLocation("fakeTokenPlaceholder") - .withSshPubKey( - Arrays.asList("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7... edgeuser@example.com")))) - .withOnboardingConfiguration(new OnboardingConfiguration() - .withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) - .withResourceId( - "/subscriptions/ff0aa6da-20f8-44fe-9aee-381c8e8a4aeb/resourceGroups/bhukumar-test-rg/providers/Microsoft.HybridCompute/machines/bkumar-t1") - .withLocation("eastus") - .withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") - .withArcVirtualMachineId("634b9db8-83e1-46ed-b391-c1614e2d0097")) - .withDeviceConfiguration(new TargetDeviceConfiguration() - .withNetwork(new NetworkConfiguration().withNetworkAdapters( - Arrays.asList(new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) - .withIpAddress("") - .withIpAddressRange(new IpAddressRange().withStartIp("").withEndIp("")) - .withGateway("") - .withSubnetMask("") - .withDnsAddressArray(Arrays.asList("8.8.8.8")) - .withVlanId("0")))) - .withHostName("634b9db8-83e1-46ed-b391-c1614e2d0097") - .withWebProxy(new WebProxyConfiguration().withConnectionUri("https://microsoft.com/a") - .withPort("") - .withBypassList(Arrays.asList())) - .withTime(new TimeConfiguration().withPrimaryTimeServer("") - .withSecondaryTimeServer("") - .withTimeZone("UTC")) - .withStorage(new StorageConfiguration().withPartitionSize("30GB"))) - .withCustomConfiguration("eyJjdXN0b21Db25maWciOiAiZXhhbXBsZSBiYXNlNjQgZW5jb2RlZCBjb25maWcifQ=="))) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_UpdateOs.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_UpdateOs. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsCreateOrUpdateUpdateOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("UpdateOs") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties(new ProvisionOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withProvisioningRequest(new ProvisioningRequest().withTarget(ProvisioningOsType.AZURE_LINUX) - .withOsProfile(new OsProvisionProfile().withOsName("AzureLinux") - .withOsType("AzureLinux") - .withOsVersion("3.1") - .withOsImageLocation("https://aka.ms/aep/azlinux3.1") - .withVsrVersion("1.1.0") - .withImageHash("sha256:b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678") - .withGpgPubKey("fakeTokenPlaceholder") - .withOperationType(OSOperationType.UPDATE)) - .withUserDetails(Arrays.asList(new UserDetails().withUserName("edgeuser") - .withSecretType(SecretType.KEY_VAULT) - .withSecretLocation("fakeTokenPlaceholder") - .withSshPubKey( - Arrays.asList("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7... edgeuser@example.com")))) - .withOnboardingConfiguration(new OnboardingConfiguration() - .withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) - .withResourceId( - "/subscriptions/ff0aa6da-20f8-44fe-9aee-381c8e8a4aeb/resourceGroups/bhukumar-test-rg/providers/Microsoft.HybridCompute/machines/bkumar-t1") - .withLocation("eastus") - .withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") - .withArcVirtualMachineId("634b9db8-83e1-46ed-b391-c1614e2d0097")) - .withDeviceConfiguration(new TargetDeviceConfiguration() - .withNetwork(new NetworkConfiguration().withNetworkAdapters( - Arrays.asList(new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) - .withIpAddress("") - .withIpAddressRange(new IpAddressRange().withStartIp("").withEndIp("")) - .withGateway("") - .withSubnetMask("") - .withDnsAddressArray(Arrays.asList("8.8.8.8")) - .withVlanId("0")))) - .withHostName("634b9db8-83e1-46ed-b391-c1614e2d0097") - .withWebProxy(new WebProxyConfiguration().withConnectionUri("https://microsoft.com/a") - .withPort("") - .withBypassList(Arrays.asList())) - .withTime(new TimeConfiguration().withPrimaryTimeServer("") - .withSecondaryTimeServer("") - .withTimeZone("UTC"))) - .withCustomConfiguration("eyJjdXN0b21Db25maWciOiAiZXhhbXBsZSBiYXNlNjQgZW5jb2RlZCBjb25maWcifQ=="))) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_CollectLog.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_CollectLog. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsCreateOrUpdateCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("triggerLogCollection") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties(new EdgeMachineJobProperties().withDeploymentMode(DeploymentMode.VALIDATE)) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_RemoteSupport.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_RemoteSupport. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineJobsCreateOrUpdateRemoteSupport( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("RemoteSupport") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties( - new EdgeMachineRemoteSupportJobProperties().withAccessLevel(RemoteSupportAccessLevel.DIAGNOSTICS) - .withExpirationTimestamp(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z")) - .withType(RemoteSupportType.ENABLE)) - .create(); - } -} -``` - -### EdgeMachineJobs_Delete - -```java -/** - * Samples for EdgeMachineJobs Delete. - */ -public final class EdgeMachineJobsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: EdgeMachineJobs_Delete_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsDeleteMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .delete("ArcInstance-rg", "machine1", "triggerLogCollection", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineJobs_Get - -```java -/** - * Samples for EdgeMachineJobs Get. - */ -public final class EdgeMachineJobsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_Get_ProvisionOs.json - */ - /** - * Sample code: EdgeMachineJobs_Get_ProvisionOs. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsGetProvisionOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .getWithResponse("ArcInstance-rg", "machine1", "ProvisionOs", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_Get_CollectLog.json - */ - /** - * Sample code: EdgeMachineJobs_Get_CollectLog. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsGetCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .getWithResponse("ArcInstance-rg", "machine1", "collectLog", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_Get_RemoteSupport.json - */ - /** - * Sample code: EdgeMachineJobs_Get_RemoteSupport. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsGetRemoteSupport(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .getWithResponse("ArcInstance-rg", "machine1", "RemoteSupport", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineJobs_List - -```java -/** - * Samples for EdgeMachineJobs List. - */ -public final class EdgeMachineJobsListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_List_MaximumSet_Gen.json - */ - /** - * Sample code: EdgeMachineJobs_List_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsListMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs().list("ArcInstance-rg", "machine1", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineNetworkAdapterJobs_CreateOrUpdate - -```java -import com.azure.resourcemanager.azurestackhci.models.ApplyConfigurationNetworkAdapterJobProperties; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import com.azure.resourcemanager.azurestackhci.models.InterfaceState; -import com.azure.resourcemanager.azurestackhci.models.IpInterfaceType; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapterConfiguration; -import java.util.Arrays; - -/** - * Samples for EdgeMachineNetworkAdapterJobs CreateOrUpdate. - */ -public final class EdgeMachineNetworkAdapterJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapterJobs_CreateOrUpdate_ApplyConfiguration.json - */ - /** - * Sample code: EdgeMachineNetworkAdapterJobs_CreateOrUpdate_ApplyConfiguration. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineNetworkAdapterJobsCreateOrUpdateApplyConfiguration( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapterJobs() - .define("ApplyConfiguration") - .withExistingNetworkAdapter("test-rg", "EdgeMachine01", "ethernet0") - .withProperties( - new ApplyConfigurationNetworkAdapterJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withTargetConfiguration(new NetworkAdapterConfiguration().withAdapterName("ethernet0") - .withIp4Address("192.168.1.100") - .withSubnetMask("255.255.255.0") - .withDefaultGateway("192.168.1.1") - .withDnsServers(Arrays.asList("8.8.8.8", "8.8.4.4")) - .withIpInterfaceType(IpInterfaceType.STATIC) - .withVlanId(100) - .withInterfaceState(InterfaceState.UP))) - .create(); - } -} -``` - -### EdgeMachineNetworkAdapterJobs_Delete - -```java -/** - * Samples for EdgeMachineNetworkAdapterJobs Delete. - */ -public final class EdgeMachineNetworkAdapterJobsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapterJobs_Delete.json - */ - /** - * Sample code: EdgeMachineNetworkAdapterJobs_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdapterJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapterJobs() - .delete("test-rg", "EdgeMachine01", "ethernet0", "ApplyConfiguration", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineNetworkAdapterJobs_Get - -```java -/** - * Samples for EdgeMachineNetworkAdapterJobs Get. - */ -public final class EdgeMachineNetworkAdapterJobsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapterJobs_Get.json - */ - /** - * Sample code: EdgeMachineNetworkAdapterJobs_Get. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdapterJobsGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapterJobs() - .getWithResponse("test-rg", "EdgeMachine01", "ethernet0", "ApplyConfiguration", - com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineNetworkAdapterJobs_List - -```java -/** - * Samples for EdgeMachineNetworkAdapterJobs List. - */ -public final class EdgeMachineNetworkAdapterJobsListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapterJobs_List.json - */ - /** - * Sample code: EdgeMachineNetworkAdapterJobs_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdapterJobsList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapterJobs() - .list("test-rg", "EdgeMachine01", "ethernet0", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineNetworkAdapters_Get - -```java -/** - * Samples for EdgeMachineNetworkAdapters Get. - */ -public final class EdgeMachineNetworkAdaptersGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapters_Get.json - */ - /** - * Sample code: EdgeMachineNetworkAdapters_Get. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdaptersGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapters() - .getWithResponse("test-rg", "EdgeMachine01", "ethernet0", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineNetworkAdapters_List - -```java -/** - * Samples for EdgeMachineNetworkAdapters List. - */ -public final class EdgeMachineNetworkAdaptersListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapters_List.json - */ - /** - * Sample code: EdgeMachineNetworkAdapters_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdaptersList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapters().list("test-rg", "EdgeMachine01", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineSecuritySettingsOperations_CreateOrUpdate - -```java -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityProperties; - -/** - * Samples for EdgeMachineSecuritySettingsOperations CreateOrUpdate. - */ -public final class EdgeMachineSecuritySettingsOperationsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineSecuritySettingsOperations_CreateOrUpdate.json - */ - /** - * Sample code: Create or update edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void createOrUpdateEdgeMachineSecuritySettings( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineSecuritySettingsOperations() - .define("default") - .withExistingEdgeMachine("test-rg", "testEdgeMachine") - .withProperties(new EdgeMachineSecurityProperties()) - .create(); - } -} -``` - -### EdgeMachineSecuritySettingsOperations_Delete - -```java -/** - * Samples for EdgeMachineSecuritySettingsOperations Delete. - */ -public final class EdgeMachineSecuritySettingsOperationsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineSecuritySettingsOperations_Delete.json - */ - /** - * Sample code: Delete edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - deleteEdgeMachineSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineSecuritySettingsOperations() - .delete("test-rg", "testEdgeMachine", "default", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineSecuritySettingsOperations_Get - -```java -/** - * Samples for EdgeMachineSecuritySettingsOperations Get. - */ -public final class EdgeMachineSecuritySettingsOperationsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineSecuritySettingsOperations_Get.json - */ - /** - * Sample code: Get edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - getEdgeMachineSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineSecuritySettingsOperations() - .getWithResponse("test-rg", "testEdgeMachine", "default", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineSecuritySettingsOperations_ListByEdgeMachine - -```java -/** - * Samples for EdgeMachineSecuritySettingsOperations ListByEdgeMachine. - */ -public final class EdgeMachineSecuritySettingsOperationsListByEdgeMachineSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineSecuritySettingsOperations_ListByEdgeMachine.json - */ - /** - * Sample code: List edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - listEdgeMachineSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineSecuritySettingsOperations() - .listByEdgeMachine("test-rg", "testEdgeMachine", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineVolumes_CreateOrUpdate - -```java -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumeProperties; -import com.azure.resourcemanager.azurestackhci.models.VolumeConfiguration; - -/** - * Samples for EdgeMachineVolumes CreateOrUpdate. - */ -public final class EdgeMachineVolumesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineVolumes_CreateOrUpdate.json - */ - /** - * Sample code: EdgeMachineVolumes_CreateOrUpdate. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineVolumesCreateOrUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineVolumes() - .define("vol-001") - .withExistingEdgeMachine("test-rg", "EdgeMachine01") - .withProperties( - new EdgeMachineVolumeProperties().withVolumeConfiguration(new VolumeConfiguration().withReserved(""))) - .create(); - } -} -``` - -### EdgeMachineVolumes_Delete - -```java -/** - * Samples for EdgeMachineVolumes Delete. - */ -public final class EdgeMachineVolumesDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineVolumes_Delete.json - */ - /** - * Sample code: EdgeMachineVolumes_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineVolumesDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineVolumes().delete("test-rg", "EdgeMachine01", "vol-001", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineVolumes_Get - -```java -/** - * Samples for EdgeMachineVolumes Get. - */ -public final class EdgeMachineVolumesGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineVolumes_Get.json - */ - /** - * Sample code: EdgeMachineVolumes_Get. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineVolumesGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineVolumes() - .getWithResponse("test-rg", "EdgeMachine01", "vol-001", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachineVolumes_List - -```java -/** - * Samples for EdgeMachineVolumes List. - */ -public final class EdgeMachineVolumesListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineVolumes_List.json - */ - /** - * Sample code: EdgeMachineVolumes_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineVolumesList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineVolumes().list("test-rg", "EdgeMachine01", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachines_CreateOrUpdate - -```java -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineProperties; - -/** - * Samples for EdgeMachines CreateOrUpdate. - */ -public final class EdgeMachinesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_CreateOrUpdate.json - */ - /** - * Sample code: EdgeMachines_CreateOrUpdate. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachinesCreateOrUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines() - .define("machine-1") - .withRegion("eastus") - .withExistingResourceGroup("ArcInstance-rg") - .withProperties(new EdgeMachineProperties() - .withArcMachineResourceGroupId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg") - .withArcMachineResourceId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1")) - .create(); - } -} -``` - -### EdgeMachines_Delete - -```java -/** - * Samples for EdgeMachines Delete. - */ -public final class EdgeMachinesDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_Delete.json - */ - /** - * Sample code: EdgeMachines_Delete_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachinesDeleteMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().delete("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachines_GetByResourceGroup - -```java -/** - * Samples for EdgeMachines GetByResourceGroup. - */ -public final class EdgeMachinesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_Get.json - */ - /** - * Sample code: EdgeMachines_Get_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachinesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines() - .getByResourceGroupWithResponse("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachines_List - -```java -/** - * Samples for EdgeMachines List. - */ -public final class EdgeMachinesListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_ListBySubscription.json - */ - /** - * Sample code: List edge machines in a given subscription. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - listEdgeMachinesInAGivenSubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().list(com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachines_ListByResourceGroup - -```java -/** - * Samples for EdgeMachines ListByResourceGroup. - */ -public final class EdgeMachinesListByResourceGroupSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_ListByResourceGroup.json - */ - /** - * Sample code: List edge machines in a given resource group. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - listEdgeMachinesInAGivenResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().listByResourceGroup("ArcInstance-rg", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachines_RefreshApplicableUpdates - -```java -/** - * Samples for EdgeMachines RefreshApplicableUpdates. - */ -public final class EdgeMachinesRefreshApplicableUpdatesSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_RefreshApplicableUpdates.json - */ - /** - * Sample code: Refresh edge machine applicable updates. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - refreshEdgeMachineApplicableUpdates(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().refreshApplicableUpdates("test-rg", "testEdgeMachine", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachines_RefreshSecuritySettings - -```java -/** - * Samples for EdgeMachines RefreshSecuritySettings. - */ -public final class EdgeMachinesRefreshSecuritySettingsSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_RefreshSecuritySettings.json - */ - /** - * Sample code: Refresh edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - refreshEdgeMachineSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().refreshSecuritySettings("test-rg", "testEdgeMachine", com.azure.core.util.Context.NONE); - } -} -``` - -### EdgeMachines_Update - -```java -import com.azure.resourcemanager.azurestackhci.models.EdgeMachine; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for EdgeMachines Update. - */ -public final class EdgeMachinesUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_Update.json - */ - /** - * Sample code: EdgeMachines_Update. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachinesUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - EdgeMachine resource = manager.edgeMachines() - .getByResourceGroupWithResponse("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key2335", "fakeTokenPlaceholder")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### EdgeMachines_Validate - -```java -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateRequest; -import java.util.Arrays; - -/** - * Samples for EdgeMachines Validate. - */ -public final class EdgeMachinesValidateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_Validate.json - */ - /** - * Sample code: EdgeMachines_Validate. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachinesValidate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines() - .validate("ArcInstance-rg", "machine-1", new EdgeMachineValidateRequest().withEdgeMachineIds(Arrays.asList( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.AzureStackHCI/edgeMachines/machine-2", - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.AzureStackHCI/edgeMachines/machine-3")) - .withAdditionalInfo("Validate before cluster creation"), com.azure.core.util.Context.NONE); - } -} -``` - -### Extensions_Create - -```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import java.io.IOException; - -/** - * Samples for Extensions Create. - */ -public final class ExtensionsCreateSamples { - /* - * x-ms-original-file: 2026-10-01/PutExtension.json - */ - /** - * Sample code: Create Arc Extension. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void createArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) - throws IOException { - manager.extensions() - .define("MicrosoftMonitoringAgent") - .withExistingArcSetting("test-rg", "myCluster", "default") - .withPublisher("Microsoft.Compute") - .withTypePropertiesType("MicrosoftMonitoringAgent") - .withTypeHandlerVersion("1.10") - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON)) - .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"workspaceKey\":\"xx\"}", Object.class, SerializerEncoding.JSON)) - .withEnableAutomaticUpgrade(false) - .create(); - } -} -``` - -### Extensions_Delete - -```java -/** - * Samples for Extensions Delete. - */ -public final class ExtensionsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/DeleteExtension.json - */ - /** - * Sample code: Delete Arc Extension. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void deleteArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.extensions() - .delete("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", com.azure.core.util.Context.NONE); - } -} -``` - -### Extensions_Get - -```java -/** - * Samples for Extensions Get. - */ -public final class ExtensionsGetSamples { - /* - * x-ms-original-file: 2026-10-01/GetExtension.json - */ - /** - * Sample code: Get ArcSettings Extension. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void getArcSettingsExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.extensions() - .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", - com.azure.core.util.Context.NONE); - } -} -``` - -### Extensions_ListByArcSetting - -```java -/** - * Samples for Extensions ListByArcSetting. - */ -public final class ExtensionsListByArcSettingSamples { - /* - * x-ms-original-file: 2026-10-01/ListExtensionsByArcSetting.json - */ - /** - * Sample code: List Extensions under ArcSetting resource. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - listExtensionsUnderArcSettingResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.extensions().listByArcSetting("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); - } -} -``` - -### Extensions_Update - -```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.azurestackhci.models.Extension; -import com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters; -import java.io.IOException; - -/** - * Samples for Extensions Update. - */ -public final class ExtensionsUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/PatchExtension.json - */ - /** - * Sample code: Update Arc Extension. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void updateArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) - throws IOException { - Extension resource = manager.extensions() - .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("1.10") - .withEnableAutomaticUpgrade(false) - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON)) - .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"workspaceKey\":\"xx\"}", Object.class, SerializerEncoding.JSON))) - .apply(); - } -} -``` - -### Extensions_Upgrade - -```java -import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; - -/** - * Samples for Extensions Upgrade. - */ -public final class ExtensionsUpgradeSamples { - /* - * x-ms-original-file: 2026-10-01/Extensions_Upgrade.json - */ - /** - * Sample code: Upgrade Machine Extensions. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void upgradeMachineExtensions(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.extensions() - .upgrade("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", - new ExtensionUpgradeParameters().withTargetVersion("1.0.18062.0"), com.azure.core.util.Context.NONE); - } -} -``` - -### Offers_Get - -```java -/** - * Samples for Offers Get. - */ -public final class OffersGetSamples { - /* - * x-ms-original-file: 2026-10-01/GetOffer.json - */ - /** - * Sample code: Get Offer. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void getOffer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.offers() - .getWithResponse("test-rg", "myCluster", "publisher1", "offer1", null, com.azure.core.util.Context.NONE); - } -} -``` - -### Offers_ListByCluster - -```java -/** - * Samples for Offers ListByCluster. - */ -public final class OffersListByClusterSamples { - /* - * x-ms-original-file: 2026-10-01/ListOffersByCluster.json - */ - /** - * Sample code: List Offer resources by HCI Cluster. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - listOfferResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.offers().listByCluster("test-rg", "myCluster", null, com.azure.core.util.Context.NONE); - } -} -``` - -### Offers_ListByPublisher - -```java -/** - * Samples for Offers ListByPublisher. - */ -public final class OffersListByPublisherSamples { - /* - * x-ms-original-file: 2026-10-01/ListOffersByPublisher.json - */ - /** - * Sample code: List Offer resources by publisher for the HCI Cluster. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void listOfferResourcesByPublisherForTheHCICluster( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.offers().listByPublisher("test-rg", "myCluster", "publisher1", null, com.azure.core.util.Context.NONE); - } -} -``` - -### Operations_List - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2026-10-01/Operations_List.json - */ - /** - * Sample code: List the operations for the provider. + * Sample code: List the operations for the provider. * * @param manager Entry point to AzureStackHciManager. */ @@ -3428,81 +1835,6 @@ public final class OperationsListSamples { } ``` -### OsImages_Get - -```java -/** - * Samples for OsImages Get. - */ -public final class OsImagesGetSamples { - /* - * x-ms-original-file: 2026-10-01/OsImages_Get_MaximumSet_Gen.json - */ - /** - * Sample code: OsImages_Get_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void osImagesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.osImages().getWithResponse("arowdcr", "10.2408.0.1", com.azure.core.util.Context.NONE); - } -} -``` - -### OsImages_ListBySubscriptionLocationResource - -```java -/** - * Samples for OsImages ListBySubscriptionLocationResource. - */ -public final class OsImagesListBySubscriptionLocationResourceSamples { - /* - * x-ms-original-file: 2026-10-01/OsImages_ListBySubscriptionLocationResource_MaximumSet_Gen.json - */ - /** - * Sample code: OsImages_ListBySubscriptionLocationResource_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void osImagesListBySubscriptionLocationResourceMaximumSet( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.osImages().listBySubscriptionLocationResource("westus2", com.azure.core.util.Context.NONE); - } -} -``` - -### OwnershipVouchers_Validate - -```java -import com.azure.resourcemanager.azurestackhci.models.OwnerKeyType; -import com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherDetails; -import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; -import java.util.Arrays; - -/** - * Samples for OwnershipVouchers Validate. - */ -public final class OwnershipVouchersValidateSamples { - /* - * x-ms-original-file: 2026-10-01/ValidateOwnershipVouchers_ByResourceGroup.json - */ - /** - * Sample code: Validate ownership vouchers in a given resource group. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void validateOwnershipVouchersInAGivenResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.ownershipVouchers() - .validateWithResponse("ArcInstance-rg", "westus", - new ValidateOwnershipVouchersRequest().withOwnershipVoucherDetails( - Arrays.asList(new OwnershipVoucherDetails().withOwnershipVoucher("Device Model Ownership content") - .withOwnerKeyType(OwnerKeyType.MICROSOFT_MANAGED))), - com.azure.core.util.Context.NONE); - } -} -``` - ### SecuritySettings_CreateOrUpdate ```java @@ -3513,7 +1845,7 @@ import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; */ public final class SecuritySettingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-10-01/PutSecuritySettings.json + * x-ms-original-file: 2026-04-30/PutSecuritySettings.json */ /** * Sample code: Create Security Settings. @@ -3540,7 +1872,7 @@ public final class SecuritySettingsCreateOrUpdateSamples { */ public final class SecuritySettingsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteSecuritySettings.json + * x-ms-original-file: 2026-04-30/DeleteSecuritySettings.json */ /** * Sample code: Delete Security Settings. @@ -3561,7 +1893,7 @@ public final class SecuritySettingsDeleteSamples { */ public final class SecuritySettingsGetSamples { /* - * x-ms-original-file: 2026-10-01/GetSecuritySettings.json + * x-ms-original-file: 2026-04-30/GetSecuritySettings.json */ /** * Sample code: Get Security Settings. @@ -3582,7 +1914,7 @@ public final class SecuritySettingsGetSamples { */ public final class SecuritySettingsListByClustersSamples { /* - * x-ms-original-file: 2026-10-01/ListSecuritySettingsByCluster.json + * x-ms-original-file: 2026-04-30/ListSecuritySettingsByCluster.json */ /** * Sample code: List Security Settings. @@ -3603,7 +1935,7 @@ public final class SecuritySettingsListByClustersSamples { */ public final class SkusGetSamples { /* - * x-ms-original-file: 2026-10-01/GetSku.json + * x-ms-original-file: 2026-04-30/GetSku.json */ /** * Sample code: Get Sku. @@ -3626,7 +1958,7 @@ public final class SkusGetSamples { */ public final class SkusListByOfferSamples { /* - * x-ms-original-file: 2026-10-01/ListSkusByOffer.json + * x-ms-original-file: 2026-04-30/ListSkusByOffer.json */ /** * Sample code: List SKU resources by offer for the HCI Cluster. @@ -3649,7 +1981,7 @@ public final class SkusListByOfferSamples { */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteUpdateRuns.json + * x-ms-original-file: 2026-04-30/DeleteUpdateRuns.json */ /** * Sample code: Delete an Update. @@ -3672,7 +2004,7 @@ public final class UpdateRunsDeleteSamples { */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: 2026-10-01/GetUpdateRuns.json + * x-ms-original-file: 2026-04-30/GetUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. @@ -3696,7 +2028,7 @@ public final class UpdateRunsGetSamples { */ public final class UpdateRunsListSamples { /* - * x-ms-original-file: 2026-10-01/ListUpdateRuns.json + * x-ms-original-file: 2026-04-30/ListUpdateRuns.json */ /** * Sample code: List Update runs under cluster resource. @@ -3723,7 +2055,7 @@ import java.util.Arrays; */ public final class UpdateRunsPutSamples { /* - * x-ms-original-file: 2026-10-01/PutUpdateRuns.json + * x-ms-original-file: 2026-04-30/PutUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. @@ -3765,7 +2097,7 @@ public final class UpdateRunsPutSamples { */ public final class UpdateSummariesOperationDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteUpdateSummaries.json + * x-ms-original-file: 2026-04-30/DeleteUpdateSummaries.json */ /** * Sample code: Delete an Update. @@ -3786,7 +2118,7 @@ public final class UpdateSummariesOperationDeleteSamples { */ public final class UpdateSummariesOperationGetSamples { /* - * x-ms-original-file: 2026-10-01/GetUpdateSummaries.json + * x-ms-original-file: 2026-04-30/GetUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. @@ -3808,7 +2140,7 @@ public final class UpdateSummariesOperationGetSamples { */ public final class UpdateSummariesOperationListSamples { /* - * x-ms-original-file: 2026-10-01/ListUpdateSummaries.json + * x-ms-original-file: 2026-04-30/ListUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. @@ -3834,7 +2166,7 @@ import java.time.OffsetDateTime; */ public final class UpdateSummariesOperationPutSamples { /* - * x-ms-original-file: 2026-10-01/PutUpdateSummaries.json + * x-ms-original-file: 2026-04-30/PutUpdateSummaries.json */ /** * Sample code: Put Update summaries under cluster resource. @@ -3864,7 +2196,7 @@ public final class UpdateSummariesOperationPutSamples { */ public final class UpdateSummariesOperationGroupCheckHealthSamples { /* - * x-ms-original-file: 2026-10-01/UpdateSummaries_CheckHealth.json + * x-ms-original-file: 2026-04-30/UpdateSummaries_CheckHealth.json */ /** * Sample code: Check health of UpdateSummaries. @@ -3888,7 +2220,7 @@ import com.azure.resourcemanager.azurestackhci.models.CheckUpdatesRequest; */ public final class UpdateSummariesOperationGroupCheckUpdatesSamples { /* - * x-ms-original-file: 2026-10-01/UpdateSummaries_CheckUpdates.json + * x-ms-original-file: 2026-04-30/UpdateSummaries_CheckUpdates.json */ /** * Sample code: Check for updates. @@ -3901,7 +2233,7 @@ public final class UpdateSummariesOperationGroupCheckUpdatesSamples { } /* - * x-ms-original-file: 2026-10-01/UpdateSummaries_CheckUpdates_MaximumSet.json + * x-ms-original-file: 2026-04-30/UpdateSummaries_CheckUpdates_MaximumSet.json */ /** * Sample code: Check for specific update by name. @@ -3925,7 +2257,7 @@ public final class UpdateSummariesOperationGroupCheckUpdatesSamples { */ public final class UpdatesDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteUpdates.json + * x-ms-original-file: 2026-04-30/DeleteUpdates.json */ /** * Sample code: Delete an Update. @@ -3946,7 +2278,7 @@ public final class UpdatesDeleteSamples { */ public final class UpdatesGetSamples { /* - * x-ms-original-file: 2026-10-01/GetUpdates.json + * x-ms-original-file: 2026-04-30/GetUpdates.json */ /** * Sample code: Get a specific update. @@ -3968,7 +2300,7 @@ public final class UpdatesGetSamples { */ public final class UpdatesListSamples { /* - * x-ms-original-file: 2026-10-01/ListUpdates.json + * x-ms-original-file: 2026-04-30/ListUpdates.json */ /** * Sample code: List available updates. @@ -3989,7 +2321,7 @@ public final class UpdatesListSamples { */ public final class UpdatesPostSamples { /* - * x-ms-original-file: 2026-10-01/PostUpdates.json + * x-ms-original-file: 2026-04-30/PostUpdates.json */ /** * Sample code: List available updates. @@ -4010,7 +2342,7 @@ public final class UpdatesPostSamples { */ public final class UpdatesPrepareSamples { /* - * x-ms-original-file: 2026-10-01/Updates_Prepare.json + * x-ms-original-file: 2026-04-30/Updates_Prepare.json */ /** * Sample code: Prepare Update. @@ -4038,7 +2370,7 @@ import java.util.Arrays; */ public final class UpdatesPutSamples { /* - * x-ms-original-file: 2026-10-01/PutUpdates.json + * x-ms-original-file: 2026-04-30/PutUpdates.json */ /** * Sample code: Put a specific update. @@ -4080,7 +2412,7 @@ public final class UpdatesPutSamples { */ public final class ValidatedSolutionRecipesGetSamples { /* - * x-ms-original-file: 2026-10-01/ValidatedSolutionRecipes_Get.json + * x-ms-original-file: 2026-04-30/ValidatedSolutionRecipes_Get.json */ /** * Sample code: ValidatedSolutionRecipes_Get. @@ -4102,7 +2434,7 @@ public final class ValidatedSolutionRecipesGetSamples { */ public final class ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples { /* - * x-ms-original-file: 2026-10-01/ValidatedSolutionRecipes_ListBySubscriptionLocationResource.json + * x-ms-original-file: 2026-04-30/ValidatedSolutionRecipes_ListBySubscriptionLocationResource.json */ /** * Sample code: ValidatedSolutionRecipes_ListBySubscriptionLocationResource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml index 9833ad1024ed..dd5b7a4ac944 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-azurestackhci - 1.3.0-beta.1 + 1.2.0-beta.1 jar Microsoft Azure SDK for Azure Stack Hci Management - This package contains Microsoft Azure SDK for Azure Stack Hci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI service. Package api-version 2026-10-01. + This package contains Microsoft Azure SDK for Azure Stack Hci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI service. Package api-version 2026-04-30. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + false diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java index 39de11809f2e..7ab66ea18c0d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java @@ -27,26 +27,13 @@ import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciManagementClient; import com.azure.resourcemanager.azurestackhci.implementation.ArcSettingsImpl; import com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciManagementClientBuilder; -import com.azure.resourcemanager.azurestackhci.implementation.ClusterJobsImpl; import com.azure.resourcemanager.azurestackhci.implementation.ClustersImpl; import com.azure.resourcemanager.azurestackhci.implementation.DeploymentSettingsImpl; import com.azure.resourcemanager.azurestackhci.implementation.EdgeDeviceJobsImpl; import com.azure.resourcemanager.azurestackhci.implementation.EdgeDevicesImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineDeploymentSettingsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineDiskJobsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineDiskPrivilegedJobsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineDisksImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineJobsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineNetworkAdapterJobsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineNetworkAdaptersImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineSecuritySettingsOperationsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineVolumesImpl; -import com.azure.resourcemanager.azurestackhci.implementation.EdgeMachinesImpl; import com.azure.resourcemanager.azurestackhci.implementation.ExtensionsImpl; import com.azure.resourcemanager.azurestackhci.implementation.OffersImpl; import com.azure.resourcemanager.azurestackhci.implementation.OperationsImpl; -import com.azure.resourcemanager.azurestackhci.implementation.OsImagesImpl; -import com.azure.resourcemanager.azurestackhci.implementation.OwnershipVouchersImpl; import com.azure.resourcemanager.azurestackhci.implementation.SecuritySettingsImpl; import com.azure.resourcemanager.azurestackhci.implementation.SkusImpl; import com.azure.resourcemanager.azurestackhci.implementation.UpdateRunsImpl; @@ -55,26 +42,13 @@ import com.azure.resourcemanager.azurestackhci.implementation.UpdatesImpl; import com.azure.resourcemanager.azurestackhci.implementation.ValidatedSolutionRecipesImpl; import com.azure.resourcemanager.azurestackhci.models.ArcSettings; -import com.azure.resourcemanager.azurestackhci.models.ClusterJobs; import com.azure.resourcemanager.azurestackhci.models.Clusters; import com.azure.resourcemanager.azurestackhci.models.DeploymentSettings; import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceJobs; import com.azure.resourcemanager.azurestackhci.models.EdgeDevices; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSettings; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskJobs; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskPrivilegedJobs; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDisks; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobs; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterJobs; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapters; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecuritySettingsOperations; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumes; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachines; import com.azure.resourcemanager.azurestackhci.models.Extensions; import com.azure.resourcemanager.azurestackhci.models.Offers; import com.azure.resourcemanager.azurestackhci.models.Operations; -import com.azure.resourcemanager.azurestackhci.models.OsImages; -import com.azure.resourcemanager.azurestackhci.models.OwnershipVouchers; import com.azure.resourcemanager.azurestackhci.models.SecuritySettings; import com.azure.resourcemanager.azurestackhci.models.Skus; import com.azure.resourcemanager.azurestackhci.models.UpdateRuns; @@ -95,8 +69,6 @@ * Azure Stack HCI service. */ public final class AzureStackHciManager { - private OsImages osImages; - private Operations operations; private ArcSettings arcSettings; @@ -125,30 +97,6 @@ public final class AzureStackHciManager { private ValidatedSolutionRecipes validatedSolutionRecipes; - private EdgeMachines edgeMachines; - - private EdgeMachineJobs edgeMachineJobs; - - private OwnershipVouchers ownershipVouchers; - - private ClusterJobs clusterJobs; - - private EdgeMachineNetworkAdapters edgeMachineNetworkAdapters; - - private EdgeMachineNetworkAdapterJobs edgeMachineNetworkAdapterJobs; - - private EdgeMachineDisks edgeMachineDisks; - - private EdgeMachineVolumes edgeMachineVolumes; - - private EdgeMachineDiskJobs edgeMachineDiskJobs; - - private EdgeMachineDiskPrivilegedJobs edgeMachineDiskPrivilegedJobs; - - private EdgeMachineSecuritySettingsOperations edgeMachineSecuritySettingsOperations; - - private EdgeMachineDeploymentSettings edgeMachineDeploymentSettings; - private UpdateSummariesOperations updateSummariesOperations; private final AzureStackHciManagementClient clientObject; @@ -366,18 +314,6 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil } } - /** - * Gets the resource collection API of OsImages. - * - * @return Resource collection API of OsImages. - */ - public OsImages osImages() { - if (this.osImages == null) { - this.osImages = new OsImagesImpl(clientObject.getOsImages(), this); - } - return osImages; - } - /** * Gets the resource collection API of Operations. * @@ -548,156 +484,6 @@ public ValidatedSolutionRecipes validatedSolutionRecipes() { return validatedSolutionRecipes; } - /** - * Gets the resource collection API of EdgeMachines. It manages EdgeMachine. - * - * @return Resource collection API of EdgeMachines. - */ - public EdgeMachines edgeMachines() { - if (this.edgeMachines == null) { - this.edgeMachines = new EdgeMachinesImpl(clientObject.getEdgeMachines(), this); - } - return edgeMachines; - } - - /** - * Gets the resource collection API of EdgeMachineJobs. It manages EdgeMachineJob. - * - * @return Resource collection API of EdgeMachineJobs. - */ - public EdgeMachineJobs edgeMachineJobs() { - if (this.edgeMachineJobs == null) { - this.edgeMachineJobs = new EdgeMachineJobsImpl(clientObject.getEdgeMachineJobs(), this); - } - return edgeMachineJobs; - } - - /** - * Gets the resource collection API of OwnershipVouchers. - * - * @return Resource collection API of OwnershipVouchers. - */ - public OwnershipVouchers ownershipVouchers() { - if (this.ownershipVouchers == null) { - this.ownershipVouchers = new OwnershipVouchersImpl(clientObject.getOwnershipVouchers(), this); - } - return ownershipVouchers; - } - - /** - * Gets the resource collection API of ClusterJobs. It manages ClusterJob. - * - * @return Resource collection API of ClusterJobs. - */ - public ClusterJobs clusterJobs() { - if (this.clusterJobs == null) { - this.clusterJobs = new ClusterJobsImpl(clientObject.getClusterJobs(), this); - } - return clusterJobs; - } - - /** - * Gets the resource collection API of EdgeMachineNetworkAdapters. - * - * @return Resource collection API of EdgeMachineNetworkAdapters. - */ - public EdgeMachineNetworkAdapters edgeMachineNetworkAdapters() { - if (this.edgeMachineNetworkAdapters == null) { - this.edgeMachineNetworkAdapters - = new EdgeMachineNetworkAdaptersImpl(clientObject.getEdgeMachineNetworkAdapters(), this); - } - return edgeMachineNetworkAdapters; - } - - /** - * Gets the resource collection API of EdgeMachineNetworkAdapterJobs. It manages EdgeMachineNetworkAdapterJob. - * - * @return Resource collection API of EdgeMachineNetworkAdapterJobs. - */ - public EdgeMachineNetworkAdapterJobs edgeMachineNetworkAdapterJobs() { - if (this.edgeMachineNetworkAdapterJobs == null) { - this.edgeMachineNetworkAdapterJobs - = new EdgeMachineNetworkAdapterJobsImpl(clientObject.getEdgeMachineNetworkAdapterJobs(), this); - } - return edgeMachineNetworkAdapterJobs; - } - - /** - * Gets the resource collection API of EdgeMachineDisks. It manages EdgeMachineDisk. - * - * @return Resource collection API of EdgeMachineDisks. - */ - public EdgeMachineDisks edgeMachineDisks() { - if (this.edgeMachineDisks == null) { - this.edgeMachineDisks = new EdgeMachineDisksImpl(clientObject.getEdgeMachineDisks(), this); - } - return edgeMachineDisks; - } - - /** - * Gets the resource collection API of EdgeMachineVolumes. It manages EdgeMachineVolume. - * - * @return Resource collection API of EdgeMachineVolumes. - */ - public EdgeMachineVolumes edgeMachineVolumes() { - if (this.edgeMachineVolumes == null) { - this.edgeMachineVolumes = new EdgeMachineVolumesImpl(clientObject.getEdgeMachineVolumes(), this); - } - return edgeMachineVolumes; - } - - /** - * Gets the resource collection API of EdgeMachineDiskJobs. It manages EdgeMachineDiskJob. - * - * @return Resource collection API of EdgeMachineDiskJobs. - */ - public EdgeMachineDiskJobs edgeMachineDiskJobs() { - if (this.edgeMachineDiskJobs == null) { - this.edgeMachineDiskJobs = new EdgeMachineDiskJobsImpl(clientObject.getEdgeMachineDiskJobs(), this); - } - return edgeMachineDiskJobs; - } - - /** - * Gets the resource collection API of EdgeMachineDiskPrivilegedJobs. It manages EdgeMachineDiskPrivilegedJob. - * - * @return Resource collection API of EdgeMachineDiskPrivilegedJobs. - */ - public EdgeMachineDiskPrivilegedJobs edgeMachineDiskPrivilegedJobs() { - if (this.edgeMachineDiskPrivilegedJobs == null) { - this.edgeMachineDiskPrivilegedJobs - = new EdgeMachineDiskPrivilegedJobsImpl(clientObject.getEdgeMachineDiskPrivilegedJobs(), this); - } - return edgeMachineDiskPrivilegedJobs; - } - - /** - * Gets the resource collection API of EdgeMachineSecuritySettingsOperations. It manages - * EdgeMachineSecuritySettings. - * - * @return Resource collection API of EdgeMachineSecuritySettingsOperations. - */ - public EdgeMachineSecuritySettingsOperations edgeMachineSecuritySettingsOperations() { - if (this.edgeMachineSecuritySettingsOperations == null) { - this.edgeMachineSecuritySettingsOperations = new EdgeMachineSecuritySettingsOperationsImpl( - clientObject.getEdgeMachineSecuritySettingsOperations(), this); - } - return edgeMachineSecuritySettingsOperations; - } - - /** - * Gets the resource collection API of EdgeMachineDeploymentSettings. It manages EdgeMachineDeploymentSetting. - * - * @return Resource collection API of EdgeMachineDeploymentSettings. - */ - public EdgeMachineDeploymentSettings edgeMachineDeploymentSettings() { - if (this.edgeMachineDeploymentSettings == null) { - this.edgeMachineDeploymentSettings - = new EdgeMachineDeploymentSettingsImpl(clientObject.getEdgeMachineDeploymentSettings(), this); - } - return edgeMachineDeploymentSettings; - } - /** * Gets the resource collection API of UpdateSummariesOperations. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java index fabd18c96cb2..933d4519488c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java @@ -46,13 +46,6 @@ public interface AzureStackHciManagementClient { */ Duration getDefaultPollInterval(); - /** - * Gets the OsImagesClient object to access its operations. - * - * @return the OsImagesClient object. - */ - OsImagesClient getOsImages(); - /** * Gets the OperationsClient object to access its operations. * @@ -151,90 +144,6 @@ public interface AzureStackHciManagementClient { */ ValidatedSolutionRecipesClient getValidatedSolutionRecipes(); - /** - * Gets the EdgeMachinesClient object to access its operations. - * - * @return the EdgeMachinesClient object. - */ - EdgeMachinesClient getEdgeMachines(); - - /** - * Gets the EdgeMachineJobsClient object to access its operations. - * - * @return the EdgeMachineJobsClient object. - */ - EdgeMachineJobsClient getEdgeMachineJobs(); - - /** - * Gets the OwnershipVouchersClient object to access its operations. - * - * @return the OwnershipVouchersClient object. - */ - OwnershipVouchersClient getOwnershipVouchers(); - - /** - * Gets the ClusterJobsClient object to access its operations. - * - * @return the ClusterJobsClient object. - */ - ClusterJobsClient getClusterJobs(); - - /** - * Gets the EdgeMachineNetworkAdaptersClient object to access its operations. - * - * @return the EdgeMachineNetworkAdaptersClient object. - */ - EdgeMachineNetworkAdaptersClient getEdgeMachineNetworkAdapters(); - - /** - * Gets the EdgeMachineNetworkAdapterJobsClient object to access its operations. - * - * @return the EdgeMachineNetworkAdapterJobsClient object. - */ - EdgeMachineNetworkAdapterJobsClient getEdgeMachineNetworkAdapterJobs(); - - /** - * Gets the EdgeMachineDisksClient object to access its operations. - * - * @return the EdgeMachineDisksClient object. - */ - EdgeMachineDisksClient getEdgeMachineDisks(); - - /** - * Gets the EdgeMachineVolumesClient object to access its operations. - * - * @return the EdgeMachineVolumesClient object. - */ - EdgeMachineVolumesClient getEdgeMachineVolumes(); - - /** - * Gets the EdgeMachineDiskJobsClient object to access its operations. - * - * @return the EdgeMachineDiskJobsClient object. - */ - EdgeMachineDiskJobsClient getEdgeMachineDiskJobs(); - - /** - * Gets the EdgeMachineDiskPrivilegedJobsClient object to access its operations. - * - * @return the EdgeMachineDiskPrivilegedJobsClient object. - */ - EdgeMachineDiskPrivilegedJobsClient getEdgeMachineDiskPrivilegedJobs(); - - /** - * Gets the EdgeMachineSecuritySettingsOperationsClient object to access its operations. - * - * @return the EdgeMachineSecuritySettingsOperationsClient object. - */ - EdgeMachineSecuritySettingsOperationsClient getEdgeMachineSecuritySettingsOperations(); - - /** - * Gets the EdgeMachineDeploymentSettingsClient object to access its operations. - * - * @return the EdgeMachineDeploymentSettingsClient object. - */ - EdgeMachineDeploymentSettingsClient getEdgeMachineDeploymentSettings(); - /** * Gets the UpdateSummariesOperationsClient object to access its operations. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClusterJobsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClusterJobsClient.java deleted file mode 100644 index 3fcbd062759c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClusterJobsClient.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterJobInner; - -/** - * An instance of this class provides access to all the operations defined in ClusterJobsClient. - */ -public interface ClusterJobsClient { - /** - * Get a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String jobsName, - Context context); - - /** - * Get a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterJobInner get(String resourceGroupName, String clusterName, String jobsName); - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterJobInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String jobsName, ClusterJobInner resource); - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterJobInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String jobsName, ClusterJobInner resource, Context context); - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterJobInner createOrUpdate(String resourceGroupName, String clusterName, String jobsName, - ClusterJobInner resource); - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterJobInner createOrUpdate(String resourceGroupName, String clusterName, String jobsName, - ClusterJobInner resource, Context context); - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String jobsName); - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String jobsName, - Context context); - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String jobsName); - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String jobsName, Context context); - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName); - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDeploymentSettingsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDeploymentSettingsClient.java deleted file mode 100644 index 62d7ce63f84b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDeploymentSettingsClient.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDeploymentSettingInner; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineDeploymentSettingsClient. - */ -public interface EdgeMachineDeploymentSettingsClient { - /** - * Get an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, Context context); - - /** - * Get an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDeploymentSettingInner get(String resourceGroupName, String edgeMachineName, - String deploymentSettingName); - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of deployment setting resource for an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineDeploymentSettingInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String deploymentSettingName, - EdgeMachineDeploymentSettingInner resource); - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of deployment setting resource for an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineDeploymentSettingInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String deploymentSettingName, - EdgeMachineDeploymentSettingInner resource, Context context); - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment setting resource for an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDeploymentSettingInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, EdgeMachineDeploymentSettingInner resource); - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment setting resource for an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDeploymentSettingInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, EdgeMachineDeploymentSettingInner resource, Context context); - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String deploymentSettingName); - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, Context context); - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String deploymentSettingName); - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String deploymentSettingName, Context context); - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEdgeMachine(String resourceGroupName, - String edgeMachineName); - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEdgeMachine(String resourceGroupName, String edgeMachineName, - Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskJobsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskJobsClient.java deleted file mode 100644 index b89c0a2a14d2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskJobsClient.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskJobInner; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineDiskJobsClient. - */ -public interface EdgeMachineDiskJobsClient { - /** - * Get a specific disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - String jobName, Context context); - - /** - * Get a specific disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDiskJobInner get(String resourceGroupName, String edgeMachineName, String diskName, String jobName); - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, String diskName); - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, String diskName, - Context context); - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk Job resource for managing operations on disks. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineDiskJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String diskName, String jobName, - EdgeMachineDiskJobInner resource); - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk Job resource for managing operations on disks. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineDiskJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String diskName, String jobName, - EdgeMachineDiskJobInner resource, Context context); - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Job resource for managing operations on disks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDiskJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - String jobName, EdgeMachineDiskJobInner resource); - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Job resource for managing operations on disks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDiskJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - String jobName, EdgeMachineDiskJobInner resource, Context context); - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String diskName, - String jobName); - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String diskName, - String jobName, Context context); - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String diskName, String jobName); - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String diskName, String jobName, Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskPrivilegedJobsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskPrivilegedJobsClient.java deleted file mode 100644 index 3fb360981616..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskPrivilegedJobsClient.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskPrivilegedJobInner; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineDiskPrivilegedJobsClient. - */ -public interface EdgeMachineDiskPrivilegedJobsClient { - /** - * Get a specific privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName, Context context); - - /** - * Get a specific privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDiskPrivilegedJobInner get(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName); - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, - String diskName); - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, - String diskName, Context context); - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk Privileged Job resource for managing privileged operations on - * disk volumes. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineDiskPrivilegedJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName, - EdgeMachineDiskPrivilegedJobInner resource); - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk Privileged Job resource for managing privileged operations on - * disk volumes. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineDiskPrivilegedJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName, - EdgeMachineDiskPrivilegedJobInner resource, Context context); - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Privileged Job resource for managing privileged operations on disk volumes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDiskPrivilegedJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName, EdgeMachineDiskPrivilegedJobInner resource); - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Privileged Job resource for managing privileged operations on disk volumes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDiskPrivilegedJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName, EdgeMachineDiskPrivilegedJobInner resource, Context context); - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName); - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName, Context context); - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName); - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName, - Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDisksClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDisksClient.java deleted file mode 100644 index f687395637b8..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDisksClient.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskInner; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineDisksClient. - */ -public interface EdgeMachineDisksClient { - /** - * Get a specific disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - Context context); - - /** - * Get a specific disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDiskInner get(String resourceGroupName, String edgeMachineName, String diskName); - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName); - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, Context context); - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk resource representing a physical disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineDiskInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, String diskName, EdgeMachineDiskInner resource); - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk resource representing a physical disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineDiskInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, String diskName, EdgeMachineDiskInner resource, Context context); - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource representing a physical disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDiskInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - EdgeMachineDiskInner resource); - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource representing a physical disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineDiskInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - EdgeMachineDiskInner resource, Context context); - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String diskName); - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String diskName, - Context context); - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String diskName); - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String diskName, Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineJobsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineJobsClient.java deleted file mode 100644 index aad055bb7d46..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineJobsClient.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineJobsClient. - */ -public interface EdgeMachineJobsClient { - /** - * Get a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String edgeMachineName, String jobsName, - Context context); - - /** - * Get a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineJobInner get(String resourceGroupName, String edgeMachineName, String jobsName); - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineJobInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, String jobsName, EdgeMachineJobInner resource); - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineJobInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, String jobsName, EdgeMachineJobInner resource, Context context); - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String jobsName, - EdgeMachineJobInner resource); - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String jobsName, - EdgeMachineJobInner resource, Context context); - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String jobsName); - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String jobsName, - Context context); - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String jobsName); - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String jobsName, Context context); - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName); - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdapterJobsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdapterJobsClient.java deleted file mode 100644 index 31e7b2192681..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdapterJobsClient.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterJobInner; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineNetworkAdapterJobsClient. - */ -public interface EdgeMachineNetworkAdapterJobsClient { - /** - * Get a specific network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, Context context); - - /** - * Get a specific network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineNetworkAdapterJobInner get(String resourceGroupName, String edgeMachineName, String networkAdapterName, - String jobName); - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, - String networkAdapterName); - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, - String networkAdapterName, Context context); - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job for an Edge Machine Network Adapter. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineNetworkAdapterJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName, - EdgeMachineNetworkAdapterJobInner resource); - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job for an Edge Machine Network Adapter. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineNetworkAdapterJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName, - EdgeMachineNetworkAdapterJobInner resource, Context context); - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job for an Edge Machine Network Adapter. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineNetworkAdapterJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, EdgeMachineNetworkAdapterJobInner resource); - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job for an Edge Machine Network Adapter. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineNetworkAdapterJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, EdgeMachineNetworkAdapterJobInner resource, Context context); - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName); - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, Context context); - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName); - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName, - Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdaptersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdaptersClient.java deleted file mode 100644 index 1fa2de28552c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdaptersClient.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterInner; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineNetworkAdaptersClient. - */ -public interface EdgeMachineNetworkAdaptersClient { - /** - * Get a specific network adapter on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, Context context); - - /** - * Get a specific network adapter on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineNetworkAdapterInner get(String resourceGroupName, String edgeMachineName, String networkAdapterName); - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName); - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, - Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineSecuritySettingsOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineSecuritySettingsOperationsClient.java deleted file mode 100644 index 22cfa83dcfbe..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineSecuritySettingsOperationsClient.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineSecuritySettingsInner; - -/** - * An instance of this class provides access to all the operations defined in - * EdgeMachineSecuritySettingsOperationsClient. - */ -public interface EdgeMachineSecuritySettingsOperationsClient { - /** - * Get an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String securitySettingsName, Context context); - - /** - * Get an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineSecuritySettingsInner get(String resourceGroupName, String edgeMachineName, String securitySettingsName); - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edge Machine Security Settings proxy resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineSecuritySettingsInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String securitySettingsName, - EdgeMachineSecuritySettingsInner resource); - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edge Machine Security Settings proxy resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineSecuritySettingsInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String securitySettingsName, - EdgeMachineSecuritySettingsInner resource, Context context); - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edge Machine Security Settings proxy resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineSecuritySettingsInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String securitySettingsName, EdgeMachineSecuritySettingsInner resource); - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edge Machine Security Settings proxy resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineSecuritySettingsInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String securitySettingsName, EdgeMachineSecuritySettingsInner resource, Context context); - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String securitySettingsName); - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String securitySettingsName, Context context); - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String securitySettingsName); - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String securitySettingsName, Context context); - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEdgeMachine(String resourceGroupName, String edgeMachineName); - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEdgeMachine(String resourceGroupName, String edgeMachineName, - Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineVolumesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineVolumesClient.java deleted file mode 100644 index 945979e06205..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineVolumesClient.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineVolumeInner; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineVolumesClient. - */ -public interface EdgeMachineVolumesClient { - /** - * Get a specific volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String volumeName, Context context); - - /** - * Get a specific volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineVolumeInner get(String resourceGroupName, String edgeMachineName, String volumeName); - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName); - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String edgeMachineName, Context context); - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of volume resource representing a storage volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineVolumeInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, String volumeName, EdgeMachineVolumeInner resource); - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of volume resource representing a storage volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineVolumeInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, String volumeName, EdgeMachineVolumeInner resource, Context context); - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume resource representing a storage volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineVolumeInner createOrUpdate(String resourceGroupName, String edgeMachineName, String volumeName, - EdgeMachineVolumeInner resource); - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume resource representing a storage volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineVolumeInner createOrUpdate(String resourceGroupName, String edgeMachineName, String volumeName, - EdgeMachineVolumeInner resource, Context context); - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String volumeName); - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, String volumeName, - Context context); - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String volumeName); - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, String volumeName, Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachinesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachinesClient.java deleted file mode 100644 index d2aad8f79a5e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachinesClient.java +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineValidateResponseInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateRequest; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachinesClient. - */ -public interface EdgeMachinesClient { - /** - * Get an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String edgeMachineName, - Context context); - - /** - * Get an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineInner getByResourceGroup(String resourceGroupName, String edgeMachineName); - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, EdgeMachineInner resource); - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, EdgeMachineInner resource, Context context); - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineInner createOrUpdate(String resourceGroupName, String edgeMachineName, EdgeMachineInner resource); - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineInner createOrUpdate(String resourceGroupName, String edgeMachineName, EdgeMachineInner resource, - Context context); - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineInner> beginUpdate(String resourceGroupName, - String edgeMachineName, EdgeMachinePatch properties); - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineInner> beginUpdate(String resourceGroupName, - String edgeMachineName, EdgeMachinePatch properties, Context context); - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineInner update(String resourceGroupName, String edgeMachineName, EdgeMachinePatch properties); - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineInner update(String resourceGroupName, String edgeMachineName, EdgeMachinePatch properties, - Context context); - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName); - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, Context context); - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName); - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String edgeMachineName, Context context); - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List all edge machines in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List all edge machines in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the validate response for Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineValidateResponseInner> - beginValidate(String resourceGroupName, String edgeMachineName, EdgeMachineValidateRequest body); - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the validate response for Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EdgeMachineValidateResponseInner> beginValidate( - String resourceGroupName, String edgeMachineName, EdgeMachineValidateRequest body, Context context); - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineValidateResponseInner validate(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body); - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeMachineValidateResponseInner validate(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body, Context context); - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRefreshSecuritySettings(String resourceGroupName, String edgeMachineName); - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRefreshSecuritySettings(String resourceGroupName, String edgeMachineName, - Context context); - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void refreshSecuritySettings(String resourceGroupName, String edgeMachineName); - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void refreshSecuritySettings(String resourceGroupName, String edgeMachineName, Context context); - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRefreshApplicableUpdates(String resourceGroupName, String edgeMachineName); - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRefreshApplicableUpdates(String resourceGroupName, String edgeMachineName, - Context context); - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void refreshApplicableUpdates(String resourceGroupName, String edgeMachineName); - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void refreshApplicableUpdates(String resourceGroupName, String edgeMachineName, Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OsImagesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OsImagesClient.java deleted file mode 100644 index 34e32965494a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OsImagesClient.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; - -/** - * An instance of this class provides access to all the operations defined in OsImagesClient. - */ -public interface OsImagesClient { - /** - * Get a os image. - * - * @param location The name of the Azure region. - * @param osImageName The name of the OsImage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a os image along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String osImageName, Context context); - - /** - * Get a os image. - * - * @param location The name of the Azure region. - * @param osImageName The name of the OsImage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a os image. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OsImageInner get(String location, String osImageName); - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySubscriptionLocationResource(String location); - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySubscriptionLocationResource(String location, Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OwnershipVouchersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OwnershipVouchersClient.java deleted file mode 100644 index d819634be919..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OwnershipVouchersClient.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; -import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; - -/** - * An instance of this class provides access to all the operations defined in OwnershipVouchersClient. - */ -public interface OwnershipVouchersClient { - /** - * Validates ownership vouchers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Ownership vouchers to be validated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return validate Ownership Voucher Response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response validateWithResponse(String resourceGroupName, String location, - ValidateOwnershipVouchersRequest validationRequest, Context context); - - /** - * Validates ownership vouchers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Ownership vouchers to be validated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return validate Ownership Voucher Response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ValidateOwnershipVouchersResponseInner validate(String resourceGroupName, String location, - ValidateOwnershipVouchersRequest validationRequest); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java index 8b3cb08000a3..e06b6ce912ea 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java @@ -14,7 +14,6 @@ import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; import com.azure.resourcemanager.azurestackhci.models.ClusterPattern; import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties; -import com.azure.resourcemanager.azurestackhci.models.ClusterSdnProperties; import com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus; import com.azure.resourcemanager.azurestackhci.models.IdentityProvider; import com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration; @@ -555,15 +554,6 @@ public ClusterPattern clusterPattern() { return this.innerProperties() == null ? null : this.innerProperties().clusterPattern(); } - /** - * Get the sdnProperties property: Software Defined Networking Properties of the cluster. - * - * @return the sdnProperties value. - */ - public ClusterSdnProperties sdnProperties() { - return this.innerProperties() == null ? null : this.innerProperties().sdnProperties(); - } - /** * Get the localAvailabilityZones property: Local Availability Zone information for HCI cluster. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterJobInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterJobInner.java deleted file mode 100644 index 2d9e4ccd9e00..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterJobInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.ClusterJobProperties; -import java.io.IOException; - -/** - * Cluster Jobs resource. - */ -@Fluent -public final class ClusterJobInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private ClusterJobProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ClusterJobInner class. - */ - public ClusterJobInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public ClusterJobProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the ClusterJobInner object itself. - */ - public ClusterJobInner withProperties(ClusterJobProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterJobInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterJobInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ClusterJobInner. - */ - public static ClusterJobInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterJobInner deserializedClusterJobInner = new ClusterJobInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedClusterJobInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedClusterJobInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedClusterJobInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedClusterJobInner.properties = ClusterJobProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedClusterJobInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterJobInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java index d3dd2b68350a..7c3f0e8ea9b3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java @@ -14,7 +14,6 @@ import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; import com.azure.resourcemanager.azurestackhci.models.ClusterPattern; import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties; -import com.azure.resourcemanager.azurestackhci.models.ClusterSdnProperties; import com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus; import com.azure.resourcemanager.azurestackhci.models.IdentityProvider; import com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration; @@ -168,11 +167,6 @@ public final class ClusterProperties implements JsonSerializable localAvailabilityZones = reader.readArray(reader1 -> LocalAvailabilityZones.fromJson(reader1)); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDeploymentSettingInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDeploymentSettingInner.java deleted file mode 100644 index 31e7cd246b28..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDeploymentSettingInner.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSettingProperties; -import java.io.IOException; - -/** - * Deployment setting resource for an Edge Machine. - */ -@Fluent -public final class EdgeMachineDeploymentSettingInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineDeploymentSettingProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineDeploymentSettingInner class. - */ - public EdgeMachineDeploymentSettingInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineDeploymentSettingProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EdgeMachineDeploymentSettingInner object itself. - */ - public EdgeMachineDeploymentSettingInner withProperties(EdgeMachineDeploymentSettingProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDeploymentSettingInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDeploymentSettingInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDeploymentSettingInner. - */ - public static EdgeMachineDeploymentSettingInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDeploymentSettingInner deserializedEdgeMachineDeploymentSettingInner - = new EdgeMachineDeploymentSettingInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineDeploymentSettingInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineDeploymentSettingInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineDeploymentSettingInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineDeploymentSettingInner.properties - = EdgeMachineDeploymentSettingProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineDeploymentSettingInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDeploymentSettingInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskInner.java deleted file mode 100644 index 5b60aed76c83..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskProperties; -import java.io.IOException; - -/** - * Disk resource representing a physical disk on an Edge Machine. - */ -@Fluent -public final class EdgeMachineDiskInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineDiskProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineDiskInner class. - */ - public EdgeMachineDiskInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineDiskProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EdgeMachineDiskInner object itself. - */ - public EdgeMachineDiskInner withProperties(EdgeMachineDiskProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDiskInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDiskInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDiskInner. - */ - public static EdgeMachineDiskInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDiskInner deserializedEdgeMachineDiskInner = new EdgeMachineDiskInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineDiskInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineDiskInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineDiskInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineDiskInner.properties = EdgeMachineDiskProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineDiskInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDiskInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskJobInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskJobInner.java deleted file mode 100644 index 0396ec9776b2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskJobInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskJobProperties; -import java.io.IOException; - -/** - * Disk Job resource for managing operations on disks. - */ -@Fluent -public final class EdgeMachineDiskJobInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineDiskJobProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineDiskJobInner class. - */ - public EdgeMachineDiskJobInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineDiskJobProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EdgeMachineDiskJobInner object itself. - */ - public EdgeMachineDiskJobInner withProperties(EdgeMachineDiskJobProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDiskJobInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDiskJobInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDiskJobInner. - */ - public static EdgeMachineDiskJobInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDiskJobInner deserializedEdgeMachineDiskJobInner = new EdgeMachineDiskJobInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineDiskJobInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineDiskJobInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineDiskJobInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineDiskJobInner.properties = EdgeMachineDiskJobProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineDiskJobInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDiskJobInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskPrivilegedJobInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskPrivilegedJobInner.java deleted file mode 100644 index 6dfa134f6d6c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskPrivilegedJobInner.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskPrivilegedJobProperties; -import java.io.IOException; - -/** - * Disk Privileged Job resource for managing privileged operations on disk volumes. - */ -@Fluent -public final class EdgeMachineDiskPrivilegedJobInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineDiskPrivilegedJobProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineDiskPrivilegedJobInner class. - */ - public EdgeMachineDiskPrivilegedJobInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineDiskPrivilegedJobProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EdgeMachineDiskPrivilegedJobInner object itself. - */ - public EdgeMachineDiskPrivilegedJobInner withProperties(EdgeMachineDiskPrivilegedJobProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDiskPrivilegedJobInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDiskPrivilegedJobInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDiskPrivilegedJobInner. - */ - public static EdgeMachineDiskPrivilegedJobInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDiskPrivilegedJobInner deserializedEdgeMachineDiskPrivilegedJobInner - = new EdgeMachineDiskPrivilegedJobInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobInner.properties - = EdgeMachineDiskPrivilegedJobProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDiskPrivilegedJobInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineInner.java deleted file mode 100644 index d5494e8d63dc..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineInner.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineProperties; -import java.io.IOException; -import java.util.Map; - -/** - * EdgeMachine details. - */ -@Fluent -public final class EdgeMachineInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineProperties properties; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineInner class. - */ - public EdgeMachineInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EdgeMachineInner object itself. - */ - public EdgeMachineInner withProperties(EdgeMachineProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the EdgeMachineInner object itself. - */ - public EdgeMachineInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public EdgeMachineInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EdgeMachineInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineInner. - */ - public static EdgeMachineInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineInner deserializedEdgeMachineInner = new EdgeMachineInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedEdgeMachineInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEdgeMachineInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineInner.properties = EdgeMachineProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedEdgeMachineInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineJobInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineJobInner.java deleted file mode 100644 index 80380f1bad93..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineJobInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties; -import java.io.IOException; - -/** - * Cluster Jobs resource. - */ -@Fluent -public final class EdgeMachineJobInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineJobProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineJobInner class. - */ - public EdgeMachineJobInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineJobProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EdgeMachineJobInner object itself. - */ - public EdgeMachineJobInner withProperties(EdgeMachineJobProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineJobInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineJobInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineJobInner. - */ - public static EdgeMachineJobInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineJobInner deserializedEdgeMachineJobInner = new EdgeMachineJobInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineJobInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineJobInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineJobInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineJobInner.properties = EdgeMachineJobProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineJobInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineJobInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterInner.java deleted file mode 100644 index 19003e2db3be..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterInner.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterProperties; -import java.io.IOException; - -/** - * Edge Machine Network Adapter Resource. - */ -@Immutable -public final class EdgeMachineNetworkAdapterInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineNetworkAdapterProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineNetworkAdapterInner class. - */ - private EdgeMachineNetworkAdapterInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineNetworkAdapterProperties properties() { - return this.properties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineNetworkAdapterInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineNetworkAdapterInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineNetworkAdapterInner. - */ - public static EdgeMachineNetworkAdapterInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineNetworkAdapterInner deserializedEdgeMachineNetworkAdapterInner - = new EdgeMachineNetworkAdapterInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterInner.properties - = EdgeMachineNetworkAdapterProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineNetworkAdapterInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterJobInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterJobInner.java deleted file mode 100644 index e163e234502a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterJobInner.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterJobProperties; -import java.io.IOException; - -/** - * Job for an Edge Machine Network Adapter. - */ -@Fluent -public final class EdgeMachineNetworkAdapterJobInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineNetworkAdapterJobProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineNetworkAdapterJobInner class. - */ - public EdgeMachineNetworkAdapterJobInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineNetworkAdapterJobProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EdgeMachineNetworkAdapterJobInner object itself. - */ - public EdgeMachineNetworkAdapterJobInner withProperties(EdgeMachineNetworkAdapterJobProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineNetworkAdapterJobInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineNetworkAdapterJobInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineNetworkAdapterJobInner. - */ - public static EdgeMachineNetworkAdapterJobInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineNetworkAdapterJobInner deserializedEdgeMachineNetworkAdapterJobInner - = new EdgeMachineNetworkAdapterJobInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobInner.properties - = EdgeMachineNetworkAdapterJobProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineNetworkAdapterJobInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineSecuritySettingsInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineSecuritySettingsInner.java deleted file mode 100644 index 7da216fe5ef9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineSecuritySettingsInner.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityProperties; -import java.io.IOException; - -/** - * Edge Machine Security Settings proxy resource. - */ -@Fluent -public final class EdgeMachineSecuritySettingsInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineSecurityProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineSecuritySettingsInner class. - */ - public EdgeMachineSecuritySettingsInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineSecurityProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EdgeMachineSecuritySettingsInner object itself. - */ - public EdgeMachineSecuritySettingsInner withProperties(EdgeMachineSecurityProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineSecuritySettingsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineSecuritySettingsInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineSecuritySettingsInner. - */ - public static EdgeMachineSecuritySettingsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineSecuritySettingsInner deserializedEdgeMachineSecuritySettingsInner - = new EdgeMachineSecuritySettingsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineSecuritySettingsInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineSecuritySettingsInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineSecuritySettingsInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineSecuritySettingsInner.properties - = EdgeMachineSecurityProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineSecuritySettingsInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineSecuritySettingsInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineValidateResponseInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineValidateResponseInner.java deleted file mode 100644 index 4afdf4aa49d1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineValidateResponseInner.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The validate response for Edge Machine. - */ -@Immutable -public final class EdgeMachineValidateResponseInner implements JsonSerializable { - /* - * Edge machine validation status. - */ - private String status; - - /** - * Creates an instance of EdgeMachineValidateResponseInner class. - */ - private EdgeMachineValidateResponseInner() { - } - - /** - * Get the status property: Edge machine validation status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineValidateResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineValidateResponseInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineValidateResponseInner. - */ - public static EdgeMachineValidateResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineValidateResponseInner deserializedEdgeMachineValidateResponseInner - = new EdgeMachineValidateResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedEdgeMachineValidateResponseInner.status = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineValidateResponseInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineVolumeInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineVolumeInner.java deleted file mode 100644 index eacb7495b80a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineVolumeInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumeProperties; -import java.io.IOException; - -/** - * Volume resource representing a storage volume on an Edge Machine. - */ -@Fluent -public final class EdgeMachineVolumeInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private EdgeMachineVolumeProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EdgeMachineVolumeInner class. - */ - public EdgeMachineVolumeInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public EdgeMachineVolumeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the EdgeMachineVolumeInner object itself. - */ - public EdgeMachineVolumeInner withProperties(EdgeMachineVolumeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineVolumeInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineVolumeInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineVolumeInner. - */ - public static EdgeMachineVolumeInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineVolumeInner deserializedEdgeMachineVolumeInner = new EdgeMachineVolumeInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEdgeMachineVolumeInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineVolumeInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineVolumeInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEdgeMachineVolumeInner.properties = EdgeMachineVolumeProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEdgeMachineVolumeInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineVolumeInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OsImageInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OsImageInner.java deleted file mode 100644 index 1c529cfd98c5..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OsImageInner.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.OsImageProperties; -import java.io.IOException; - -/** - * Represents a os image resource. - */ -@Immutable -public final class OsImageInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private OsImageProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of OsImageInner class. - */ - private OsImageInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public OsImageProperties properties() { - return this.properties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OsImageInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OsImageInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OsImageInner. - */ - public static OsImageInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OsImageInner deserializedOsImageInner = new OsImageInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOsImageInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOsImageInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOsImageInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedOsImageInner.properties = OsImageProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOsImageInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOsImageInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateOwnershipVouchersResponseInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateOwnershipVouchersResponseInner.java deleted file mode 100644 index 93ba5ccdf69c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateOwnershipVouchersResponseInner.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherValidationDetails; -import java.io.IOException; -import java.util.List; - -/** - * Validate Ownership Voucher Response. - */ -@Immutable -public final class ValidateOwnershipVouchersResponseInner - implements JsonSerializable { - /* - * Ownership Voucher Validation Details. - */ - private List ownershipVoucherValidationDetails; - - /** - * Creates an instance of ValidateOwnershipVouchersResponseInner class. - */ - private ValidateOwnershipVouchersResponseInner() { - } - - /** - * Get the ownershipVoucherValidationDetails property: Ownership Voucher Validation Details. - * - * @return the ownershipVoucherValidationDetails value. - */ - public List ownershipVoucherValidationDetails() { - return this.ownershipVoucherValidationDetails; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ownershipVoucherValidationDetails", this.ownershipVoucherValidationDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ValidateOwnershipVouchersResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ValidateOwnershipVouchersResponseInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ValidateOwnershipVouchersResponseInner. - */ - public static ValidateOwnershipVouchersResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ValidateOwnershipVouchersResponseInner deserializedValidateOwnershipVouchersResponseInner - = new ValidateOwnershipVouchersResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ownershipVoucherValidationDetails".equals(fieldName)) { - List ownershipVoucherValidationDetails - = reader.readArray(reader1 -> OwnershipVoucherValidationDetails.fromJson(reader1)); - deserializedValidateOwnershipVouchersResponseInner.ownershipVoucherValidationDetails - = ownershipVoucherValidationDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedValidateOwnershipVouchersResponseInner; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java index fc0ab5240fd5..f727db885beb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java @@ -28,26 +28,13 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient; import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciManagementClient; -import com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient; import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient; import com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient; import com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient; import com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdaptersClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient; import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient; import com.azure.resourcemanager.azurestackhci.fluent.OffersClient; import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient; -import com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient; -import com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient; import com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient; import com.azure.resourcemanager.azurestackhci.fluent.SkusClient; import com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient; @@ -153,20 +140,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** - * The OsImagesClient object to access its operations. - */ - private final OsImagesClient osImages; - - /** - * Gets the OsImagesClient object to access its operations. - * - * @return the OsImagesClient object. - */ - public OsImagesClient getOsImages() { - return this.osImages; - } - /** * The OperationsClient object to access its operations. */ @@ -363,174 +336,6 @@ public ValidatedSolutionRecipesClient getValidatedSolutionRecipes() { return this.validatedSolutionRecipes; } - /** - * The EdgeMachinesClient object to access its operations. - */ - private final EdgeMachinesClient edgeMachines; - - /** - * Gets the EdgeMachinesClient object to access its operations. - * - * @return the EdgeMachinesClient object. - */ - public EdgeMachinesClient getEdgeMachines() { - return this.edgeMachines; - } - - /** - * The EdgeMachineJobsClient object to access its operations. - */ - private final EdgeMachineJobsClient edgeMachineJobs; - - /** - * Gets the EdgeMachineJobsClient object to access its operations. - * - * @return the EdgeMachineJobsClient object. - */ - public EdgeMachineJobsClient getEdgeMachineJobs() { - return this.edgeMachineJobs; - } - - /** - * The OwnershipVouchersClient object to access its operations. - */ - private final OwnershipVouchersClient ownershipVouchers; - - /** - * Gets the OwnershipVouchersClient object to access its operations. - * - * @return the OwnershipVouchersClient object. - */ - public OwnershipVouchersClient getOwnershipVouchers() { - return this.ownershipVouchers; - } - - /** - * The ClusterJobsClient object to access its operations. - */ - private final ClusterJobsClient clusterJobs; - - /** - * Gets the ClusterJobsClient object to access its operations. - * - * @return the ClusterJobsClient object. - */ - public ClusterJobsClient getClusterJobs() { - return this.clusterJobs; - } - - /** - * The EdgeMachineNetworkAdaptersClient object to access its operations. - */ - private final EdgeMachineNetworkAdaptersClient edgeMachineNetworkAdapters; - - /** - * Gets the EdgeMachineNetworkAdaptersClient object to access its operations. - * - * @return the EdgeMachineNetworkAdaptersClient object. - */ - public EdgeMachineNetworkAdaptersClient getEdgeMachineNetworkAdapters() { - return this.edgeMachineNetworkAdapters; - } - - /** - * The EdgeMachineNetworkAdapterJobsClient object to access its operations. - */ - private final EdgeMachineNetworkAdapterJobsClient edgeMachineNetworkAdapterJobs; - - /** - * Gets the EdgeMachineNetworkAdapterJobsClient object to access its operations. - * - * @return the EdgeMachineNetworkAdapterJobsClient object. - */ - public EdgeMachineNetworkAdapterJobsClient getEdgeMachineNetworkAdapterJobs() { - return this.edgeMachineNetworkAdapterJobs; - } - - /** - * The EdgeMachineDisksClient object to access its operations. - */ - private final EdgeMachineDisksClient edgeMachineDisks; - - /** - * Gets the EdgeMachineDisksClient object to access its operations. - * - * @return the EdgeMachineDisksClient object. - */ - public EdgeMachineDisksClient getEdgeMachineDisks() { - return this.edgeMachineDisks; - } - - /** - * The EdgeMachineVolumesClient object to access its operations. - */ - private final EdgeMachineVolumesClient edgeMachineVolumes; - - /** - * Gets the EdgeMachineVolumesClient object to access its operations. - * - * @return the EdgeMachineVolumesClient object. - */ - public EdgeMachineVolumesClient getEdgeMachineVolumes() { - return this.edgeMachineVolumes; - } - - /** - * The EdgeMachineDiskJobsClient object to access its operations. - */ - private final EdgeMachineDiskJobsClient edgeMachineDiskJobs; - - /** - * Gets the EdgeMachineDiskJobsClient object to access its operations. - * - * @return the EdgeMachineDiskJobsClient object. - */ - public EdgeMachineDiskJobsClient getEdgeMachineDiskJobs() { - return this.edgeMachineDiskJobs; - } - - /** - * The EdgeMachineDiskPrivilegedJobsClient object to access its operations. - */ - private final EdgeMachineDiskPrivilegedJobsClient edgeMachineDiskPrivilegedJobs; - - /** - * Gets the EdgeMachineDiskPrivilegedJobsClient object to access its operations. - * - * @return the EdgeMachineDiskPrivilegedJobsClient object. - */ - public EdgeMachineDiskPrivilegedJobsClient getEdgeMachineDiskPrivilegedJobs() { - return this.edgeMachineDiskPrivilegedJobs; - } - - /** - * The EdgeMachineSecuritySettingsOperationsClient object to access its operations. - */ - private final EdgeMachineSecuritySettingsOperationsClient edgeMachineSecuritySettingsOperations; - - /** - * Gets the EdgeMachineSecuritySettingsOperationsClient object to access its operations. - * - * @return the EdgeMachineSecuritySettingsOperationsClient object. - */ - public EdgeMachineSecuritySettingsOperationsClient getEdgeMachineSecuritySettingsOperations() { - return this.edgeMachineSecuritySettingsOperations; - } - - /** - * The EdgeMachineDeploymentSettingsClient object to access its operations. - */ - private final EdgeMachineDeploymentSettingsClient edgeMachineDeploymentSettings; - - /** - * Gets the EdgeMachineDeploymentSettingsClient object to access its operations. - * - * @return the EdgeMachineDeploymentSettingsClient object. - */ - public EdgeMachineDeploymentSettingsClient getEdgeMachineDeploymentSettings() { - return this.edgeMachineDeploymentSettings; - } - /** * The UpdateSummariesOperationsClient object to access its operations. */ @@ -562,8 +367,7 @@ public UpdateSummariesOperationsClient getUpdateSummariesOperations() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-10-01"; - this.osImages = new OsImagesClientImpl(this); + this.apiVersion = "2026-04-30"; this.operations = new OperationsClientImpl(this); this.arcSettings = new ArcSettingsClientImpl(this); this.offers = new OffersClientImpl(this); @@ -578,18 +382,6 @@ public UpdateSummariesOperationsClient getUpdateSummariesOperations() { this.updates = new UpdatesClientImpl(this); this.updateSummariesOperationGroups = new UpdateSummariesOperationGroupsClientImpl(this); this.validatedSolutionRecipes = new ValidatedSolutionRecipesClientImpl(this); - this.edgeMachines = new EdgeMachinesClientImpl(this); - this.edgeMachineJobs = new EdgeMachineJobsClientImpl(this); - this.ownershipVouchers = new OwnershipVouchersClientImpl(this); - this.clusterJobs = new ClusterJobsClientImpl(this); - this.edgeMachineNetworkAdapters = new EdgeMachineNetworkAdaptersClientImpl(this); - this.edgeMachineNetworkAdapterJobs = new EdgeMachineNetworkAdapterJobsClientImpl(this); - this.edgeMachineDisks = new EdgeMachineDisksClientImpl(this); - this.edgeMachineVolumes = new EdgeMachineVolumesClientImpl(this); - this.edgeMachineDiskJobs = new EdgeMachineDiskJobsClientImpl(this); - this.edgeMachineDiskPrivilegedJobs = new EdgeMachineDiskPrivilegedJobsClientImpl(this); - this.edgeMachineSecuritySettingsOperations = new EdgeMachineSecuritySettingsOperationsClientImpl(this); - this.edgeMachineDeploymentSettings = new EdgeMachineDeploymentSettingsClientImpl(this); this.updateSummariesOperations = new UpdateSummariesOperationsClientImpl(this); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java index 8589bc74f3c5..b62d8405cfcb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java @@ -15,7 +15,6 @@ import com.azure.resourcemanager.azurestackhci.models.ClusterPatch; import com.azure.resourcemanager.azurestackhci.models.ClusterPattern; import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties; -import com.azure.resourcemanager.azurestackhci.models.ClusterSdnProperties; import com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus; import com.azure.resourcemanager.azurestackhci.models.IdentityProvider; import com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration; @@ -186,10 +185,6 @@ public ClusterPattern clusterPattern() { return this.innerModel().clusterPattern(); } - public ClusterSdnProperties sdnProperties() { - return this.innerModel().sdnProperties(); - } - public List localAvailabilityZones() { List inner = this.innerModel().localAvailabilityZones(); if (inner != null) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobImpl.java deleted file mode 100644 index bbe221e22100..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.azurestackhci.models.ClusterJob; -import com.azure.resourcemanager.azurestackhci.models.ClusterJobProperties; - -public final class ClusterJobImpl implements ClusterJob, ClusterJob.Definition, ClusterJob.Update { - private ClusterJobInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ClusterJobProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ClusterJobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String clusterName; - - private String jobsName; - - public ClusterJobImpl withExistingCluster(String resourceGroupName, String clusterName) { - this.resourceGroupName = resourceGroupName; - this.clusterName = clusterName; - return this; - } - - public ClusterJob create() { - this.innerObject = serviceManager.serviceClient() - .getClusterJobs() - .createOrUpdate(resourceGroupName, clusterName, jobsName, this.innerModel(), Context.NONE); - return this; - } - - public ClusterJob create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusterJobs() - .createOrUpdate(resourceGroupName, clusterName, jobsName, this.innerModel(), context); - return this; - } - - ClusterJobImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new ClusterJobInner(); - this.serviceManager = serviceManager; - this.jobsName = name; - } - - public ClusterJobImpl update() { - return this; - } - - public ClusterJob apply() { - this.innerObject = serviceManager.serviceClient() - .getClusterJobs() - .createOrUpdate(resourceGroupName, clusterName, jobsName, this.innerModel(), Context.NONE); - return this; - } - - public ClusterJob apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusterJobs() - .createOrUpdate(resourceGroupName, clusterName, jobsName, this.innerModel(), context); - return this; - } - - ClusterJobImpl(ClusterJobInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); - this.jobsName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public ClusterJob refresh() { - this.innerObject = serviceManager.serviceClient() - .getClusterJobs() - .getWithResponse(resourceGroupName, clusterName, jobsName, Context.NONE) - .getValue(); - return this; - } - - public ClusterJob refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusterJobs() - .getWithResponse(resourceGroupName, clusterName, jobsName, context) - .getValue(); - return this; - } - - public ClusterJobImpl withProperties(ClusterJobProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsClientImpl.java deleted file mode 100644 index b9a8c9094c89..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsClientImpl.java +++ /dev/null @@ -1,750 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.ClusterJobListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ClusterJobsClient. - */ -public final class ClusterJobsClientImpl implements ClusterJobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ClusterJobsService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of ClusterJobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ClusterJobsClientImpl(AzureStackHciManagementClientImpl client) { - this.service - = RestProxy.create(ClusterJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientClusterJobs to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientClusterJobs") - public interface ClusterJobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/jobs/{jobsName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("jobsName") String jobsName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/jobs/{jobsName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("jobsName") String jobsName, @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/jobs/{jobsName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("jobsName") String jobsName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ClusterJobInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/jobs/{jobsName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("jobsName") String jobsName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ClusterJobInner resource, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/jobs/{jobsName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("jobsName") String jobsName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/jobs/{jobsName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("jobsName") String jobsName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String jobsName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, jobsName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterName, String jobsName) { - return getWithResponseAsync(resourceGroupName, clusterName, jobsName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, String jobsName, - Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, jobsName, accept, context); - } - - /** - * Get a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterJobInner get(String resourceGroupName, String clusterName, String jobsName) { - return getWithResponse(resourceGroupName, clusterName, jobsName, Context.NONE).getValue(); - } - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String jobsName, ClusterJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, jobsName, contentType, accept, - resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - String jobsName, ClusterJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, jobsName, contentType, accept, resource, - Context.NONE); - } - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - String jobsName, ClusterJobInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, jobsName, contentType, accept, resource, - context); - } - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterJobInner> beginCreateOrUpdateAsync(String resourceGroupName, - String clusterName, String jobsName, ClusterJobInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, jobsName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterJobInner.class, ClusterJobInner.class, this.client.getContext()); - } - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterJobInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String jobsName, ClusterJobInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, clusterName, jobsName, resource); - return this.client.getLroResult(response, ClusterJobInner.class, - ClusterJobInner.class, Context.NONE); - } - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterJobInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String jobsName, ClusterJobInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, clusterName, jobsName, resource, context); - return this.client.getLroResult(response, ClusterJobInner.class, - ClusterJobInner.class, context); - } - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, String jobsName, - ClusterJobInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, jobsName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterJobInner createOrUpdate(String resourceGroupName, String clusterName, String jobsName, - ClusterJobInner resource) { - return beginCreateOrUpdate(resourceGroupName, clusterName, jobsName, resource).getFinalResult(); - } - - /** - * Create a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterJobInner createOrUpdate(String resourceGroupName, String clusterName, String jobsName, - ClusterJobInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, clusterName, jobsName, resource, context).getFinalResult(); - } - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String jobsName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, jobsName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, String jobsName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, jobsName, Context.NONE); - } - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, String jobsName, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, jobsName, context); - } - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String jobsName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, jobsName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, - String jobsName) { - Response response = deleteWithResponse(resourceGroupName, clusterName, jobsName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String jobsName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, clusterName, jobsName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, String jobsName) { - return beginDeleteAsync(resourceGroupName, clusterName, jobsName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String jobsName) { - beginDelete(resourceGroupName, clusterName, jobsName).getFinalResult(); - } - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String jobsName, Context context) { - beginDelete(resourceGroupName, clusterName, jobsName, context).getFinalResult(); - } - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName, - Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsImpl.java deleted file mode 100644 index 87d43a926c80..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsImpl.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.azurestackhci.models.ClusterJob; -import com.azure.resourcemanager.azurestackhci.models.ClusterJobs; - -public final class ClusterJobsImpl implements ClusterJobs { - private static final ClientLogger LOGGER = new ClientLogger(ClusterJobsImpl.class); - - private final ClusterJobsClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public ClusterJobsImpl(ClusterJobsClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String clusterName, String jobsName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, clusterName, jobsName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClusterJobImpl(inner.getValue(), this.manager())); - } - - public ClusterJob get(String resourceGroupName, String clusterName, String jobsName) { - ClusterJobInner inner = this.serviceClient().get(resourceGroupName, clusterName, jobsName); - if (inner != null) { - return new ClusterJobImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String clusterName, String jobsName) { - this.serviceClient().delete(resourceGroupName, clusterName, jobsName); - } - - public void delete(String resourceGroupName, String clusterName, String jobsName, Context context) { - this.serviceClient().delete(resourceGroupName, clusterName, jobsName, context); - } - - public PagedIterable list(String resourceGroupName, String clusterName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterJobImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterJobImpl(inner1, this.manager())); - } - - public ClusterJob getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, clusterName, jobsName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, clusterName, jobsName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, clusterName, jobsName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, clusterName, jobsName, context); - } - - private ClusterJobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public ClusterJobImpl define(String name) { - return new ClusterJobImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingImpl.java deleted file mode 100644 index 30c87084046d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDeploymentSettingInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSetting; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSettingProperties; - -public final class EdgeMachineDeploymentSettingImpl implements EdgeMachineDeploymentSetting, - EdgeMachineDeploymentSetting.Definition, EdgeMachineDeploymentSetting.Update { - private EdgeMachineDeploymentSettingInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EdgeMachineDeploymentSettingProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeMachineDeploymentSettingInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String edgeMachineName; - - private String deploymentSettingName; - - public EdgeMachineDeploymentSettingImpl withExistingEdgeMachine(String resourceGroupName, String edgeMachineName) { - this.resourceGroupName = resourceGroupName; - this.edgeMachineName = edgeMachineName; - return this; - } - - public EdgeMachineDeploymentSetting create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDeploymentSettings() - .createOrUpdate(resourceGroupName, edgeMachineName, deploymentSettingName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineDeploymentSetting create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDeploymentSettings() - .createOrUpdate(resourceGroupName, edgeMachineName, deploymentSettingName, this.innerModel(), context); - return this; - } - - EdgeMachineDeploymentSettingImpl(String name, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new EdgeMachineDeploymentSettingInner(); - this.serviceManager = serviceManager; - this.deploymentSettingName = name; - } - - public EdgeMachineDeploymentSettingImpl update() { - return this; - } - - public EdgeMachineDeploymentSetting apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDeploymentSettings() - .createOrUpdate(resourceGroupName, edgeMachineName, deploymentSettingName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineDeploymentSetting apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDeploymentSettings() - .createOrUpdate(resourceGroupName, edgeMachineName, deploymentSettingName, this.innerModel(), context); - return this; - } - - EdgeMachineDeploymentSettingImpl(EdgeMachineDeploymentSettingInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); - this.deploymentSettingName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deploymentSettings"); - } - - public EdgeMachineDeploymentSetting refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDeploymentSettings() - .getWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName, Context.NONE) - .getValue(); - return this; - } - - public EdgeMachineDeploymentSetting refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDeploymentSettings() - .getWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName, context) - .getValue(); - return this; - } - - public EdgeMachineDeploymentSettingImpl withProperties(EdgeMachineDeploymentSettingProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsClientImpl.java deleted file mode 100644 index 56efade1e7aa..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsClientImpl.java +++ /dev/null @@ -1,791 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDeploymentSettingInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDeploymentSettingListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineDeploymentSettingsClient. - */ -public final class EdgeMachineDeploymentSettingsClientImpl implements EdgeMachineDeploymentSettingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachineDeploymentSettingsService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachineDeploymentSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachineDeploymentSettingsClientImpl(AzureStackHciManagementClientImpl client) { - this.service = RestProxy.create(EdgeMachineDeploymentSettingsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachineDeploymentSettings to be used - * by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineDeploymentSettings") - public interface EdgeMachineDeploymentSettingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/deploymentSettings/{deploymentSettingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("deploymentSettingName") String deploymentSettingName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/deploymentSettings/{deploymentSettingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("deploymentSettingName") String deploymentSettingName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/deploymentSettings/{deploymentSettingName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("deploymentSettingName") String deploymentSettingName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineDeploymentSettingInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/deploymentSettings/{deploymentSettingName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("deploymentSettingName") String deploymentSettingName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineDeploymentSettingInner resource, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/deploymentSettings/{deploymentSettingName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("deploymentSettingName") String deploymentSettingName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/deploymentSettings/{deploymentSettingName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("deploymentSettingName") String deploymentSettingName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/deploymentSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByEdgeMachine(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/deploymentSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByEdgeMachineSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByEdgeMachineNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByEdgeMachineNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String edgeMachineName, String deploymentSettingName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, deploymentSettingName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String edgeMachineName, - String deploymentSettingName) { - return getWithResponseAsync(resourceGroupName, edgeMachineName, deploymentSettingName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, deploymentSettingName, accept, context); - } - - /** - * Get an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDeploymentSettingInner get(String resourceGroupName, String edgeMachineName, - String deploymentSettingName) { - return getWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName, Context.NONE).getValue(); - } - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment setting resource for an Edge Machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String edgeMachineName, String deploymentSettingName, EdgeMachineDeploymentSettingInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, deploymentSettingName, contentType, - accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment setting resource for an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, EdgeMachineDeploymentSettingInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, deploymentSettingName, contentType, - accept, resource, Context.NONE); - } - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment setting resource for an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, EdgeMachineDeploymentSettingInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, deploymentSettingName, contentType, - accept, resource, context); - } - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of deployment setting resource for an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineDeploymentSettingInner> - beginCreateOrUpdateAsync(String resourceGroupName, String edgeMachineName, String deploymentSettingName, - EdgeMachineDeploymentSettingInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, deploymentSettingName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EdgeMachineDeploymentSettingInner.class, - EdgeMachineDeploymentSettingInner.class, this.client.getContext()); - } - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of deployment setting resource for an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineDeploymentSettingInner> - beginCreateOrUpdate(String resourceGroupName, String edgeMachineName, String deploymentSettingName, - EdgeMachineDeploymentSettingInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName, resource); - return this.client.getLroResult(response, - EdgeMachineDeploymentSettingInner.class, EdgeMachineDeploymentSettingInner.class, Context.NONE); - } - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of deployment setting resource for an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineDeploymentSettingInner> - beginCreateOrUpdate(String resourceGroupName, String edgeMachineName, String deploymentSettingName, - EdgeMachineDeploymentSettingInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName, resource, context); - return this.client.getLroResult(response, - EdgeMachineDeploymentSettingInner.class, EdgeMachineDeploymentSettingInner.class, context); - } - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment setting resource for an Edge Machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String edgeMachineName, String deploymentSettingName, EdgeMachineDeploymentSettingInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, deploymentSettingName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment setting resource for an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDeploymentSettingInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, EdgeMachineDeploymentSettingInner resource) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, deploymentSettingName, resource) - .getFinalResult(); - } - - /** - * Create or update an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return deployment setting resource for an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDeploymentSettingInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, EdgeMachineDeploymentSettingInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, deploymentSettingName, resource, context) - .getFinalResult(); - } - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName, - String deploymentSettingName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, deploymentSettingName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, - String deploymentSettingName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, deploymentSettingName, Context.NONE); - } - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, deploymentSettingName, context); - } - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName, - String deploymentSettingName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, edgeMachineName, deploymentSettingName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String deploymentSettingName) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String edgeMachineName, String deploymentSettingName) { - return beginDeleteAsync(resourceGroupName, edgeMachineName, deploymentSettingName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String deploymentSettingName) { - beginDelete(resourceGroupName, edgeMachineName, deploymentSettingName).getFinalResult(); - } - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String deploymentSettingName, - Context context) { - beginDelete(resourceGroupName, edgeMachineName, deploymentSettingName, context).getFinalResult(); - } - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByEdgeMachineSinglePageAsync(String resourceGroupName, String edgeMachineName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByEdgeMachine(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByEdgeMachineAsync(String resourceGroupName, - String edgeMachineName) { - return new PagedFlux<>(() -> listByEdgeMachineSinglePageAsync(resourceGroupName, edgeMachineName), - nextLink -> listByEdgeMachineNextSinglePageAsync(nextLink)); - } - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByEdgeMachineSinglePage(String resourceGroupName, - String edgeMachineName) { - final String accept = "application/json"; - Response res - = service.listByEdgeMachineSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByEdgeMachineSinglePage(String resourceGroupName, - String edgeMachineName, Context context) { - final String accept = "application/json"; - Response res - = service.listByEdgeMachineSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEdgeMachine(String resourceGroupName, - String edgeMachineName) { - return new PagedIterable<>(() -> listByEdgeMachineSinglePage(resourceGroupName, edgeMachineName), - nextLink -> listByEdgeMachineNextSinglePage(nextLink)); - } - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEdgeMachine(String resourceGroupName, - String edgeMachineName, Context context) { - return new PagedIterable<>(() -> listByEdgeMachineSinglePage(resourceGroupName, edgeMachineName, context), - nextLink -> listByEdgeMachineNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByEdgeMachineNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByEdgeMachineNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByEdgeMachineNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByEdgeMachineNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByEdgeMachineNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listByEdgeMachineNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsImpl.java deleted file mode 100644 index d2d189ce4d7d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDeploymentSettingInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSetting; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSettings; - -public final class EdgeMachineDeploymentSettingsImpl implements EdgeMachineDeploymentSettings { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineDeploymentSettingsImpl.class); - - private final EdgeMachineDeploymentSettingsClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachineDeploymentSettingsImpl(EdgeMachineDeploymentSettingsClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineDeploymentSettingImpl(inner.getValue(), this.manager())); - } - - public EdgeMachineDeploymentSetting get(String resourceGroupName, String edgeMachineName, - String deploymentSettingName) { - EdgeMachineDeploymentSettingInner inner - = this.serviceClient().get(resourceGroupName, edgeMachineName, deploymentSettingName); - if (inner != null) { - return new EdgeMachineDeploymentSettingImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String edgeMachineName, String deploymentSettingName) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, deploymentSettingName); - } - - public void delete(String resourceGroupName, String edgeMachineName, String deploymentSettingName, - Context context) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, deploymentSettingName, context); - } - - public PagedIterable listByEdgeMachine(String resourceGroupName, - String edgeMachineName) { - PagedIterable inner - = this.serviceClient().listByEdgeMachine(resourceGroupName, edgeMachineName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new EdgeMachineDeploymentSettingImpl(inner1, this.manager())); - } - - public PagedIterable listByEdgeMachine(String resourceGroupName, - String edgeMachineName, Context context) { - PagedIterable inner - = this.serviceClient().listByEdgeMachine(resourceGroupName, edgeMachineName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new EdgeMachineDeploymentSettingImpl(inner1, this.manager())); - } - - public EdgeMachineDeploymentSetting getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String deploymentSettingName = ResourceManagerUtils.getValueFromIdByName(id, "deploymentSettings"); - if (deploymentSettingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentSettings'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String deploymentSettingName = ResourceManagerUtils.getValueFromIdByName(id, "deploymentSettings"); - if (deploymentSettingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentSettings'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, deploymentSettingName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String deploymentSettingName = ResourceManagerUtils.getValueFromIdByName(id, "deploymentSettings"); - if (deploymentSettingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentSettings'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, deploymentSettingName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String deploymentSettingName = ResourceManagerUtils.getValueFromIdByName(id, "deploymentSettings"); - if (deploymentSettingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentSettings'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, deploymentSettingName, context); - } - - private EdgeMachineDeploymentSettingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public EdgeMachineDeploymentSettingImpl define(String name) { - return new EdgeMachineDeploymentSettingImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskImpl.java deleted file mode 100644 index c20dc9cf0ac2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDisk; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskProperties; - -public final class EdgeMachineDiskImpl implements EdgeMachineDisk, EdgeMachineDisk.Definition, EdgeMachineDisk.Update { - private EdgeMachineDiskInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EdgeMachineDiskProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeMachineDiskInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String edgeMachineName; - - private String diskName; - - public EdgeMachineDiskImpl withExistingEdgeMachine(String resourceGroupName, String edgeMachineName) { - this.resourceGroupName = resourceGroupName; - this.edgeMachineName = edgeMachineName; - return this; - } - - public EdgeMachineDisk create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDisks() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineDisk create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDisks() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, this.innerModel(), context); - return this; - } - - EdgeMachineDiskImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new EdgeMachineDiskInner(); - this.serviceManager = serviceManager; - this.diskName = name; - } - - public EdgeMachineDiskImpl update() { - return this; - } - - public EdgeMachineDisk apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDisks() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineDisk apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDisks() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, this.innerModel(), context); - return this; - } - - EdgeMachineDiskImpl(EdgeMachineDiskInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); - this.diskName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "disks"); - } - - public EdgeMachineDisk refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDisks() - .getWithResponse(resourceGroupName, edgeMachineName, diskName, Context.NONE) - .getValue(); - return this; - } - - public EdgeMachineDisk refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDisks() - .getWithResponse(resourceGroupName, edgeMachineName, diskName, context) - .getValue(); - return this; - } - - public EdgeMachineDiskImpl withProperties(EdgeMachineDiskProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobImpl.java deleted file mode 100644 index 4cc36223ad7f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobImpl.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskJobInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskJob; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskJobProperties; - -public final class EdgeMachineDiskJobImpl - implements EdgeMachineDiskJob, EdgeMachineDiskJob.Definition, EdgeMachineDiskJob.Update { - private EdgeMachineDiskJobInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EdgeMachineDiskJobProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeMachineDiskJobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String edgeMachineName; - - private String diskName; - - private String jobName; - - public EdgeMachineDiskJobImpl withExistingDisk(String resourceGroupName, String edgeMachineName, String diskName) { - this.resourceGroupName = resourceGroupName; - this.edgeMachineName = edgeMachineName; - this.diskName = diskName; - return this; - } - - public EdgeMachineDiskJob create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, jobName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineDiskJob create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, jobName, this.innerModel(), context); - return this; - } - - EdgeMachineDiskJobImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new EdgeMachineDiskJobInner(); - this.serviceManager = serviceManager; - this.jobName = name; - } - - public EdgeMachineDiskJobImpl update() { - return this; - } - - public EdgeMachineDiskJob apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, jobName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineDiskJob apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, jobName, this.innerModel(), context); - return this; - } - - EdgeMachineDiskJobImpl(EdgeMachineDiskJobInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); - this.diskName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "disks"); - this.jobName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public EdgeMachineDiskJob refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskJobs() - .getWithResponse(resourceGroupName, edgeMachineName, diskName, jobName, Context.NONE) - .getValue(); - return this; - } - - public EdgeMachineDiskJob refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskJobs() - .getWithResponse(resourceGroupName, edgeMachineName, diskName, jobName, context) - .getValue(); - return this; - } - - public EdgeMachineDiskJobImpl withProperties(EdgeMachineDiskJobProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsClientImpl.java deleted file mode 100644 index 098b10697ee1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsClientImpl.java +++ /dev/null @@ -1,808 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskJobInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDiskJobListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineDiskJobsClient. - */ -public final class EdgeMachineDiskJobsClientImpl implements EdgeMachineDiskJobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachineDiskJobsService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachineDiskJobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachineDiskJobsClientImpl(AzureStackHciManagementClientImpl client) { - this.service = RestProxy.create(EdgeMachineDiskJobsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachineDiskJobs to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineDiskJobs") - public interface EdgeMachineDiskJobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/jobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/jobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/jobs/{jobName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("jobName") String jobName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachineDiskJobInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/jobs/{jobName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("jobName") String jobName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachineDiskJobInner resource, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/jobs/{jobName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("jobName") String jobName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/jobs/{jobName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("jobName") String jobName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a specific disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String edgeMachineName, String diskName, String jobName) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a specific disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String edgeMachineName, String diskName, - String jobName) { - return getWithResponseAsync(resourceGroupName, edgeMachineName, diskName, jobName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a specific disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String jobName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, diskName, jobName, accept, context); - } - - /** - * Get a specific disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDiskJobInner get(String resourceGroupName, String edgeMachineName, String diskName, - String jobName) { - return getWithResponse(resourceGroupName, edgeMachineName, diskName, jobName, Context.NONE).getValue(); - } - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String edgeMachineName, String diskName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String edgeMachineName, - String diskName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, edgeMachineName, diskName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName, - String diskName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, diskName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName, - String diskName, Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, diskName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String diskName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, diskName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String diskName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, diskName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Job resource for managing operations on disks along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String edgeMachineName, String diskName, String jobName, EdgeMachineDiskJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, jobName, contentType, - accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Job resource for managing operations on disks along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String jobName, EdgeMachineDiskJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, jobName, contentType, accept, - resource, Context.NONE); - } - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Job resource for managing operations on disks along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String jobName, EdgeMachineDiskJobInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, jobName, contentType, accept, - resource, context); - } - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of disk Job resource for managing operations on disks. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineDiskJobInner> beginCreateOrUpdateAsync( - String resourceGroupName, String edgeMachineName, String diskName, String jobName, - EdgeMachineDiskJobInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, diskName, jobName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EdgeMachineDiskJobInner.class, EdgeMachineDiskJobInner.class, - this.client.getContext()); - } - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk Job resource for managing operations on disks. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineDiskJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String diskName, String jobName, - EdgeMachineDiskJobInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, diskName, jobName, resource); - return this.client.getLroResult(response, - EdgeMachineDiskJobInner.class, EdgeMachineDiskJobInner.class, Context.NONE); - } - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk Job resource for managing operations on disks. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineDiskJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String diskName, String jobName, - EdgeMachineDiskJobInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, diskName, jobName, resource, context); - return this.client.getLroResult(response, - EdgeMachineDiskJobInner.class, EdgeMachineDiskJobInner.class, context); - } - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Job resource for managing operations on disks on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String edgeMachineName, - String diskName, String jobName, EdgeMachineDiskJobInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, diskName, jobName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Job resource for managing operations on disks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDiskJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - String jobName, EdgeMachineDiskJobInner resource) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, diskName, jobName, resource).getFinalResult(); - } - - /** - * Create or update a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Job resource for managing operations on disks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDiskJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - String jobName, EdgeMachineDiskJobInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, diskName, jobName, resource, context) - .getFinalResult(); - } - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName, - String diskName, String jobName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, jobName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - String jobName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, jobName, Context.NONE); - } - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - String jobName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, jobName, context); - } - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName, - String diskName, String jobName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, edgeMachineName, diskName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String diskName, String jobName) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, diskName, jobName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String diskName, String jobName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, edgeMachineName, diskName, jobName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String edgeMachineName, String diskName, String jobName) { - return beginDeleteAsync(resourceGroupName, edgeMachineName, diskName, jobName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String diskName, String jobName) { - beginDelete(resourceGroupName, edgeMachineName, diskName, jobName).getFinalResult(); - } - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String diskName, String jobName, - Context context) { - beginDelete(resourceGroupName, edgeMachineName, diskName, jobName, context).getFinalResult(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsImpl.java deleted file mode 100644 index a61c26e2ab7f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskJobInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskJob; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskJobs; - -public final class EdgeMachineDiskJobsImpl implements EdgeMachineDiskJobs { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineDiskJobsImpl.class); - - private final EdgeMachineDiskJobsClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachineDiskJobsImpl(EdgeMachineDiskJobsClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String jobName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, edgeMachineName, diskName, jobName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineDiskJobImpl(inner.getValue(), this.manager())); - } - - public EdgeMachineDiskJob get(String resourceGroupName, String edgeMachineName, String diskName, String jobName) { - EdgeMachineDiskJobInner inner = this.serviceClient().get(resourceGroupName, edgeMachineName, diskName, jobName); - if (inner != null) { - return new EdgeMachineDiskJobImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, String diskName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, diskName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineDiskJobImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, String diskName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, diskName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineDiskJobImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String edgeMachineName, String diskName, String jobName) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, diskName, jobName); - } - - public void delete(String resourceGroupName, String edgeMachineName, String diskName, String jobName, - Context context) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, diskName, jobName, context); - } - - public EdgeMachineDiskJob getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, diskName, jobName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, diskName, jobName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, diskName, jobName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, diskName, jobName, context); - } - - private EdgeMachineDiskJobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public EdgeMachineDiskJobImpl define(String name) { - return new EdgeMachineDiskJobImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobImpl.java deleted file mode 100644 index 361ab0d1eff7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobImpl.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskPrivilegedJobInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskPrivilegedJob; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskPrivilegedJobProperties; - -public final class EdgeMachineDiskPrivilegedJobImpl implements EdgeMachineDiskPrivilegedJob, - EdgeMachineDiskPrivilegedJob.Definition, EdgeMachineDiskPrivilegedJob.Update { - private EdgeMachineDiskPrivilegedJobInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EdgeMachineDiskPrivilegedJobProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeMachineDiskPrivilegedJobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String edgeMachineName; - - private String diskName; - - private String privilegedJobName; - - public EdgeMachineDiskPrivilegedJobImpl withExistingDisk(String resourceGroupName, String edgeMachineName, - String diskName) { - this.resourceGroupName = resourceGroupName; - this.edgeMachineName = edgeMachineName; - this.diskName = diskName; - return this; - } - - public EdgeMachineDiskPrivilegedJob create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskPrivilegedJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, privilegedJobName, this.innerModel(), - Context.NONE); - return this; - } - - public EdgeMachineDiskPrivilegedJob create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskPrivilegedJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, privilegedJobName, this.innerModel(), - context); - return this; - } - - EdgeMachineDiskPrivilegedJobImpl(String name, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new EdgeMachineDiskPrivilegedJobInner(); - this.serviceManager = serviceManager; - this.privilegedJobName = name; - } - - public EdgeMachineDiskPrivilegedJobImpl update() { - return this; - } - - public EdgeMachineDiskPrivilegedJob apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskPrivilegedJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, privilegedJobName, this.innerModel(), - Context.NONE); - return this; - } - - public EdgeMachineDiskPrivilegedJob apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskPrivilegedJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, diskName, privilegedJobName, this.innerModel(), - context); - return this; - } - - EdgeMachineDiskPrivilegedJobImpl(EdgeMachineDiskPrivilegedJobInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); - this.diskName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "disks"); - this.privilegedJobName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privilegedJobs"); - } - - public EdgeMachineDiskPrivilegedJob refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskPrivilegedJobs() - .getWithResponse(resourceGroupName, edgeMachineName, diskName, privilegedJobName, Context.NONE) - .getValue(); - return this; - } - - public EdgeMachineDiskPrivilegedJob refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineDiskPrivilegedJobs() - .getWithResponse(resourceGroupName, edgeMachineName, diskName, privilegedJobName, context) - .getValue(); - return this; - } - - public EdgeMachineDiskPrivilegedJobImpl withProperties(EdgeMachineDiskPrivilegedJobProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsClientImpl.java deleted file mode 100644 index 412b4060d15c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsClientImpl.java +++ /dev/null @@ -1,823 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskPrivilegedJobInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDiskPrivilegedJobListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineDiskPrivilegedJobsClient. - */ -public final class EdgeMachineDiskPrivilegedJobsClientImpl implements EdgeMachineDiskPrivilegedJobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachineDiskPrivilegedJobsService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachineDiskPrivilegedJobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachineDiskPrivilegedJobsClientImpl(AzureStackHciManagementClientImpl client) { - this.service = RestProxy.create(EdgeMachineDiskPrivilegedJobsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachineDiskPrivilegedJobs to be used - * by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineDiskPrivilegedJobs") - public interface EdgeMachineDiskPrivilegedJobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/privilegedJobs/{privilegedJobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("privilegedJobName") String privilegedJobName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/privilegedJobs/{privilegedJobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("privilegedJobName") String privilegedJobName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/privilegedJobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/privilegedJobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/privilegedJobs/{privilegedJobName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("privilegedJobName") String privilegedJobName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineDiskPrivilegedJobInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/privilegedJobs/{privilegedJobName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("privilegedJobName") String privilegedJobName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineDiskPrivilegedJobInner resource, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/privilegedJobs/{privilegedJobName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("privilegedJobName") String privilegedJobName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}/privilegedJobs/{privilegedJobName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @PathParam("privilegedJobName") String privilegedJobName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a specific privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String edgeMachineName, String diskName, String privilegedJobName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, privilegedJobName, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a specific privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName) { - return getWithResponseAsync(resourceGroupName, edgeMachineName, diskName, privilegedJobName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a specific privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, diskName, privilegedJobName, accept, context); - } - - /** - * Get a specific privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDiskPrivilegedJobInner get(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName) { - return getWithResponse(resourceGroupName, edgeMachineName, diskName, privilegedJobName, Context.NONE) - .getValue(); - } - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String edgeMachineName, String diskName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String edgeMachineName, - String diskName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, edgeMachineName, diskName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - String edgeMachineName, String diskName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, diskName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - String edgeMachineName, String diskName, Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, diskName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String diskName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, diskName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String diskName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, diskName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Privileged Job resource for managing privileged operations on disk volumes along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String edgeMachineName, String diskName, String privilegedJobName, EdgeMachineDiskPrivilegedJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, privilegedJobName, - contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Privileged Job resource for managing privileged operations on disk volumes along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName, EdgeMachineDiskPrivilegedJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, privilegedJobName, - contentType, accept, resource, Context.NONE); - } - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Privileged Job resource for managing privileged operations on disk volumes along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName, EdgeMachineDiskPrivilegedJobInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, privilegedJobName, - contentType, accept, resource, context); - } - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of disk Privileged Job resource for managing privileged operations on - * disk volumes. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineDiskPrivilegedJobInner> - beginCreateOrUpdateAsync(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName, EdgeMachineDiskPrivilegedJobInner resource) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, - diskName, privilegedJobName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EdgeMachineDiskPrivilegedJobInner.class, - EdgeMachineDiskPrivilegedJobInner.class, this.client.getContext()); - } - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk Privileged Job resource for managing privileged operations on - * disk volumes. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineDiskPrivilegedJobInner> - beginCreateOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName, - EdgeMachineDiskPrivilegedJobInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, diskName, privilegedJobName, resource); - return this.client.getLroResult(response, - EdgeMachineDiskPrivilegedJobInner.class, EdgeMachineDiskPrivilegedJobInner.class, Context.NONE); - } - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk Privileged Job resource for managing privileged operations on - * disk volumes. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineDiskPrivilegedJobInner> - beginCreateOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName, - EdgeMachineDiskPrivilegedJobInner resource, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, diskName, - privilegedJobName, resource, context); - return this.client.getLroResult(response, - EdgeMachineDiskPrivilegedJobInner.class, EdgeMachineDiskPrivilegedJobInner.class, context); - } - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Privileged Job resource for managing privileged operations on disk volumes on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String edgeMachineName, String diskName, String privilegedJobName, EdgeMachineDiskPrivilegedJobInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, diskName, privilegedJobName, resource) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Privileged Job resource for managing privileged operations on disk volumes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDiskPrivilegedJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName, EdgeMachineDiskPrivilegedJobInner resource) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, diskName, privilegedJobName, resource) - .getFinalResult(); - } - - /** - * Create or update a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk Privileged Job resource for managing privileged operations on disk volumes. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDiskPrivilegedJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName, EdgeMachineDiskPrivilegedJobInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, diskName, privilegedJobName, resource, context) - .getFinalResult(); - } - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName) { - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, privilegedJobName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, privilegedJobName, - Context.NONE); - } - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, privilegedJobName, context); - } - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, edgeMachineName, diskName, privilegedJobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName) { - Response response - = deleteWithResponse(resourceGroupName, edgeMachineName, diskName, privilegedJobName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, edgeMachineName, diskName, privilegedJobName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName) { - return beginDeleteAsync(resourceGroupName, edgeMachineName, diskName, privilegedJobName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName) { - beginDelete(resourceGroupName, edgeMachineName, diskName, privilegedJobName).getFinalResult(); - } - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName, - Context context) { - beginDelete(resourceGroupName, edgeMachineName, diskName, privilegedJobName, context).getFinalResult(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsImpl.java deleted file mode 100644 index 27240f5cc05a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsImpl.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskPrivilegedJobInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskPrivilegedJob; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskPrivilegedJobs; - -public final class EdgeMachineDiskPrivilegedJobsImpl implements EdgeMachineDiskPrivilegedJobs { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineDiskPrivilegedJobsImpl.class); - - private final EdgeMachineDiskPrivilegedJobsClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachineDiskPrivilegedJobsImpl(EdgeMachineDiskPrivilegedJobsClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, edgeMachineName, diskName, privilegedJobName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineDiskPrivilegedJobImpl(inner.getValue(), this.manager())); - } - - public EdgeMachineDiskPrivilegedJob get(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName) { - EdgeMachineDiskPrivilegedJobInner inner - = this.serviceClient().get(resourceGroupName, edgeMachineName, diskName, privilegedJobName); - if (inner != null) { - return new EdgeMachineDiskPrivilegedJobImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String diskName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, diskName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new EdgeMachineDiskPrivilegedJobImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String diskName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, diskName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new EdgeMachineDiskPrivilegedJobImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, diskName, privilegedJobName); - } - - public void delete(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName, - Context context) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, diskName, privilegedJobName, context); - } - - public EdgeMachineDiskPrivilegedJob getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - String privilegedJobName = ResourceManagerUtils.getValueFromIdByName(id, "privilegedJobs"); - if (privilegedJobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privilegedJobs'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, diskName, privilegedJobName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - String privilegedJobName = ResourceManagerUtils.getValueFromIdByName(id, "privilegedJobs"); - if (privilegedJobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privilegedJobs'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, diskName, privilegedJobName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - String privilegedJobName = ResourceManagerUtils.getValueFromIdByName(id, "privilegedJobs"); - if (privilegedJobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privilegedJobs'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, diskName, privilegedJobName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - String privilegedJobName = ResourceManagerUtils.getValueFromIdByName(id, "privilegedJobs"); - if (privilegedJobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privilegedJobs'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, diskName, privilegedJobName, context); - } - - private EdgeMachineDiskPrivilegedJobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public EdgeMachineDiskPrivilegedJobImpl define(String name) { - return new EdgeMachineDiskPrivilegedJobImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksClientImpl.java deleted file mode 100644 index 8a5284c58e82..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksClientImpl.java +++ /dev/null @@ -1,764 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDiskListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineDisksClient. - */ -public final class EdgeMachineDisksClientImpl implements EdgeMachineDisksClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachineDisksService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachineDisksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachineDisksClientImpl(AzureStackHciManagementClientImpl client) { - this.service - = RestProxy.create(EdgeMachineDisksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachineDisks to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineDisks") - public interface EdgeMachineDisksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineDiskInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineDiskInner resource, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/disks/{diskName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("diskName") String diskName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a specific disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String edgeMachineName, - String diskName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a specific disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String edgeMachineName, String diskName) { - return getWithResponseAsync(resourceGroupName, edgeMachineName, diskName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a specific disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, diskName, accept, context); - } - - /** - * Get a specific disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDiskInner get(String resourceGroupName, String edgeMachineName, String diskName) { - return getWithResponse(resourceGroupName, edgeMachineName, diskName, Context.NONE).getValue(); - } - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String edgeMachineName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String edgeMachineName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, edgeMachineName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName, - Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource representing a physical disk on an Edge Machine along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String edgeMachineName, String diskName, EdgeMachineDiskInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, contentType, accept, - resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource representing a physical disk on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, EdgeMachineDiskInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, contentType, accept, - resource, Context.NONE); - } - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource representing a physical disk on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, EdgeMachineDiskInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, contentType, accept, - resource, context); - } - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of disk resource representing a physical disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineDiskInner> beginCreateOrUpdateAsync( - String resourceGroupName, String edgeMachineName, String diskName, EdgeMachineDiskInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, diskName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EdgeMachineDiskInner.class, EdgeMachineDiskInner.class, this.client.getContext()); - } - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk resource representing a physical disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineDiskInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String diskName, EdgeMachineDiskInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, diskName, resource); - return this.client.getLroResult(response, - EdgeMachineDiskInner.class, EdgeMachineDiskInner.class, Context.NONE); - } - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of disk resource representing a physical disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineDiskInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String diskName, EdgeMachineDiskInner resource, - Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, diskName, resource, context); - return this.client.getLroResult(response, - EdgeMachineDiskInner.class, EdgeMachineDiskInner.class, context); - } - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource representing a physical disk on an Edge Machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String edgeMachineName, - String diskName, EdgeMachineDiskInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, diskName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource representing a physical disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDiskInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - EdgeMachineDiskInner resource) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, diskName, resource).getFinalResult(); - } - - /** - * Create or update a disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return disk resource representing a physical disk on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineDiskInner createOrUpdate(String resourceGroupName, String edgeMachineName, String diskName, - EdgeMachineDiskInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, diskName, resource, context).getFinalResult(); - } - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName, - String diskName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String diskName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, Context.NONE); - } - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, diskName, context); - } - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName, - String diskName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, edgeMachineName, diskName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String diskName) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, diskName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String diskName, Context context) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, diskName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String edgeMachineName, String diskName) { - return beginDeleteAsync(resourceGroupName, edgeMachineName, diskName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String diskName) { - beginDelete(resourceGroupName, edgeMachineName, diskName).getFinalResult(); - } - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String diskName, Context context) { - beginDelete(resourceGroupName, edgeMachineName, diskName, context).getFinalResult(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksImpl.java deleted file mode 100644 index 80c438491526..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDisk; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDisks; - -public final class EdgeMachineDisksImpl implements EdgeMachineDisks { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineDisksImpl.class); - - private final EdgeMachineDisksClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachineDisksImpl(EdgeMachineDisksClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, edgeMachineName, diskName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineDiskImpl(inner.getValue(), this.manager())); - } - - public EdgeMachineDisk get(String resourceGroupName, String edgeMachineName, String diskName) { - EdgeMachineDiskInner inner = this.serviceClient().get(resourceGroupName, edgeMachineName, diskName); - if (inner != null) { - return new EdgeMachineDiskImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, edgeMachineName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineDiskImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineDiskImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String edgeMachineName, String diskName) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, diskName); - } - - public void delete(String resourceGroupName, String edgeMachineName, String diskName, Context context) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, diskName, context); - } - - public EdgeMachineDisk getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, diskName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, diskName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, diskName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String diskName = ResourceManagerUtils.getValueFromIdByName(id, "disks"); - if (diskName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'disks'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, diskName, context); - } - - private EdgeMachineDisksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public EdgeMachineDiskImpl define(String name) { - return new EdgeMachineDiskImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineImpl.java deleted file mode 100644 index be5af2f666a8..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; -import com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachine; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineProperties; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateRequest; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateResponse; -import java.util.Collections; -import java.util.Map; - -public final class EdgeMachineImpl implements EdgeMachine, EdgeMachine.Definition, EdgeMachine.Update { - private EdgeMachineInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public EdgeMachineProperties properties() { - return this.innerModel().properties(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeMachineInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String edgeMachineName; - - private EdgeMachinePatch updateProperties; - - public EdgeMachineImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public EdgeMachine create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachines() - .createOrUpdate(resourceGroupName, edgeMachineName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachine create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachines() - .createOrUpdate(resourceGroupName, edgeMachineName, this.innerModel(), context); - return this; - } - - EdgeMachineImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new EdgeMachineInner(); - this.serviceManager = serviceManager; - this.edgeMachineName = name; - } - - public EdgeMachineImpl update() { - this.updateProperties = new EdgeMachinePatch(); - return this; - } - - public EdgeMachine apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachines() - .update(resourceGroupName, edgeMachineName, updateProperties, Context.NONE); - return this; - } - - public EdgeMachine apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachines() - .update(resourceGroupName, edgeMachineName, updateProperties, context); - return this; - } - - EdgeMachineImpl(EdgeMachineInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); - } - - public EdgeMachine refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachines() - .getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, Context.NONE) - .getValue(); - return this; - } - - public EdgeMachine refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachines() - .getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, context) - .getValue(); - return this; - } - - public EdgeMachineValidateResponse validate(EdgeMachineValidateRequest body) { - return serviceManager.edgeMachines().validate(resourceGroupName, edgeMachineName, body); - } - - public EdgeMachineValidateResponse validate(EdgeMachineValidateRequest body, Context context) { - return serviceManager.edgeMachines().validate(resourceGroupName, edgeMachineName, body, context); - } - - public void refreshSecuritySettings() { - serviceManager.edgeMachines().refreshSecuritySettings(resourceGroupName, edgeMachineName); - } - - public void refreshSecuritySettings(Context context) { - serviceManager.edgeMachines().refreshSecuritySettings(resourceGroupName, edgeMachineName, context); - } - - public void refreshApplicableUpdates() { - serviceManager.edgeMachines().refreshApplicableUpdates(resourceGroupName, edgeMachineName); - } - - public void refreshApplicableUpdates(Context context) { - serviceManager.edgeMachines().refreshApplicableUpdates(resourceGroupName, edgeMachineName, context); - } - - public EdgeMachineImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public EdgeMachineImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public EdgeMachineImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateProperties.withTags(tags); - return this; - } - } - - public EdgeMachineImpl withProperties(EdgeMachineProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public EdgeMachineImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateProperties.withIdentity(identity); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobImpl.java deleted file mode 100644 index aed855260d7f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJob; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties; - -public final class EdgeMachineJobImpl implements EdgeMachineJob, EdgeMachineJob.Definition, EdgeMachineJob.Update { - private EdgeMachineJobInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EdgeMachineJobProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeMachineJobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String edgeMachineName; - - private String jobsName; - - public EdgeMachineJobImpl withExistingEdgeMachine(String resourceGroupName, String edgeMachineName) { - this.resourceGroupName = resourceGroupName; - this.edgeMachineName = edgeMachineName; - return this; - } - - public EdgeMachineJob create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, jobsName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineJob create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, jobsName, this.innerModel(), context); - return this; - } - - EdgeMachineJobImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new EdgeMachineJobInner(); - this.serviceManager = serviceManager; - this.jobsName = name; - } - - public EdgeMachineJobImpl update() { - return this; - } - - public EdgeMachineJob apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, jobsName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineJob apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, jobsName, this.innerModel(), context); - return this; - } - - EdgeMachineJobImpl(EdgeMachineJobInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); - this.jobsName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public EdgeMachineJob refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineJobs() - .getWithResponse(resourceGroupName, edgeMachineName, jobsName, Context.NONE) - .getValue(); - return this; - } - - public EdgeMachineJob refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineJobs() - .getWithResponse(resourceGroupName, edgeMachineName, jobsName, context) - .getValue(); - return this; - } - - public EdgeMachineJobImpl withProperties(EdgeMachineJobProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsClientImpl.java deleted file mode 100644 index 7a1ad37222c2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsClientImpl.java +++ /dev/null @@ -1,763 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineJobListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineJobsClient. - */ -public final class EdgeMachineJobsClientImpl implements EdgeMachineJobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachineJobsService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachineJobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachineJobsClientImpl(AzureStackHciManagementClientImpl client) { - this.service - = RestProxy.create(EdgeMachineJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachineJobs to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineJobs") - public interface EdgeMachineJobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineJobInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineJobInner resource, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs/{jobsName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("jobsName") String jobsName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String edgeMachineName, - String jobsName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String edgeMachineName, String jobsName) { - return getWithResponseAsync(resourceGroupName, edgeMachineName, jobsName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String jobsName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, jobsName, accept, context); - } - - /** - * Get a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineJobInner get(String resourceGroupName, String edgeMachineName, String jobsName) { - return getWithResponse(resourceGroupName, edgeMachineName, jobsName, Context.NONE).getValue(); - } - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String edgeMachineName, String jobsName, EdgeMachineJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, contentType, accept, - resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String jobsName, EdgeMachineJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, contentType, accept, - resource, Context.NONE); - } - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String jobsName, EdgeMachineJobInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, contentType, accept, - resource, context); - } - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineJobInner> beginCreateOrUpdateAsync( - String resourceGroupName, String edgeMachineName, String jobsName, EdgeMachineJobInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, jobsName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EdgeMachineJobInner.class, EdgeMachineJobInner.class, this.client.getContext()); - } - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String jobsName, EdgeMachineJobInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, jobsName, resource); - return this.client.getLroResult(response, EdgeMachineJobInner.class, - EdgeMachineJobInner.class, Context.NONE); - } - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineJobInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String jobsName, EdgeMachineJobInner resource, - Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, jobsName, resource, context); - return this.client.getLroResult(response, EdgeMachineJobInner.class, - EdgeMachineJobInner.class, context); - } - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String edgeMachineName, - String jobsName, EdgeMachineJobInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, jobsName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String jobsName, - EdgeMachineJobInner resource) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, jobsName, resource).getFinalResult(); - } - - /** - * Create a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster Jobs resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, String jobsName, - EdgeMachineJobInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, jobsName, resource, context).getFinalResult(); - } - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName, - String jobsName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String jobsName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, Context.NONE); - } - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String jobsName, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, jobsName, context); - } - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName, - String jobsName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, edgeMachineName, jobsName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String jobsName) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, jobsName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String jobsName, Context context) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, jobsName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String edgeMachineName, String jobsName) { - return beginDeleteAsync(resourceGroupName, edgeMachineName, jobsName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String jobsName) { - beginDelete(resourceGroupName, edgeMachineName, jobsName).getFinalResult(); - } - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String jobsName, Context context) { - beginDelete(resourceGroupName, edgeMachineName, jobsName, context).getFinalResult(); - } - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String edgeMachineName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String edgeMachineName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, edgeMachineName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName, - Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsImpl.java deleted file mode 100644 index 953c0602d63d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJob; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobs; - -public final class EdgeMachineJobsImpl implements EdgeMachineJobs { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineJobsImpl.class); - - private final EdgeMachineJobsClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachineJobsImpl(EdgeMachineJobsClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String edgeMachineName, String jobsName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, edgeMachineName, jobsName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineJobImpl(inner.getValue(), this.manager())); - } - - public EdgeMachineJob get(String resourceGroupName, String edgeMachineName, String jobsName) { - EdgeMachineJobInner inner = this.serviceClient().get(resourceGroupName, edgeMachineName, jobsName); - if (inner != null) { - return new EdgeMachineJobImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String edgeMachineName, String jobsName) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, jobsName); - } - - public void delete(String resourceGroupName, String edgeMachineName, String jobsName, Context context) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, jobsName, context); - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, edgeMachineName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineJobImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineJobImpl(inner1, this.manager())); - } - - public EdgeMachineJob getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, jobsName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, jobsName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, jobsName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String jobsName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, jobsName, context); - } - - private EdgeMachineJobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public EdgeMachineJobImpl define(String name) { - return new EdgeMachineJobImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterImpl.java deleted file mode 100644 index 4bd7ba0e9718..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterProperties; - -public final class EdgeMachineNetworkAdapterImpl implements EdgeMachineNetworkAdapter { - private EdgeMachineNetworkAdapterInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - EdgeMachineNetworkAdapterImpl(EdgeMachineNetworkAdapterInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EdgeMachineNetworkAdapterProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public EdgeMachineNetworkAdapterInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobImpl.java deleted file mode 100644 index 447cc54066ee..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobImpl.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterJobInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterJob; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterJobProperties; - -public final class EdgeMachineNetworkAdapterJobImpl implements EdgeMachineNetworkAdapterJob, - EdgeMachineNetworkAdapterJob.Definition, EdgeMachineNetworkAdapterJob.Update { - private EdgeMachineNetworkAdapterJobInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EdgeMachineNetworkAdapterJobProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeMachineNetworkAdapterJobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String edgeMachineName; - - private String networkAdapterName; - - private String jobName; - - public EdgeMachineNetworkAdapterJobImpl withExistingNetworkAdapter(String resourceGroupName, String edgeMachineName, - String networkAdapterName) { - this.resourceGroupName = resourceGroupName; - this.edgeMachineName = edgeMachineName; - this.networkAdapterName = networkAdapterName; - return this; - } - - public EdgeMachineNetworkAdapterJob create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineNetworkAdapterJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, networkAdapterName, jobName, this.innerModel(), - Context.NONE); - return this; - } - - public EdgeMachineNetworkAdapterJob create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineNetworkAdapterJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, networkAdapterName, jobName, this.innerModel(), - context); - return this; - } - - EdgeMachineNetworkAdapterJobImpl(String name, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new EdgeMachineNetworkAdapterJobInner(); - this.serviceManager = serviceManager; - this.jobName = name; - } - - public EdgeMachineNetworkAdapterJobImpl update() { - return this; - } - - public EdgeMachineNetworkAdapterJob apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineNetworkAdapterJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, networkAdapterName, jobName, this.innerModel(), - Context.NONE); - return this; - } - - public EdgeMachineNetworkAdapterJob apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineNetworkAdapterJobs() - .createOrUpdate(resourceGroupName, edgeMachineName, networkAdapterName, jobName, this.innerModel(), - context); - return this; - } - - EdgeMachineNetworkAdapterJobImpl(EdgeMachineNetworkAdapterJobInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); - this.networkAdapterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "networkAdapters"); - this.jobName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public EdgeMachineNetworkAdapterJob refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineNetworkAdapterJobs() - .getWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, jobName, Context.NONE) - .getValue(); - return this; - } - - public EdgeMachineNetworkAdapterJob refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineNetworkAdapterJobs() - .getWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, jobName, context) - .getValue(); - return this; - } - - public EdgeMachineNetworkAdapterJobImpl withProperties(EdgeMachineNetworkAdapterJobProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsClientImpl.java deleted file mode 100644 index daca94eb5053..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsClientImpl.java +++ /dev/null @@ -1,824 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterJobInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineNetworkAdapterJobListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineNetworkAdapterJobsClient. - */ -public final class EdgeMachineNetworkAdapterJobsClientImpl implements EdgeMachineNetworkAdapterJobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachineNetworkAdapterJobsService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachineNetworkAdapterJobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachineNetworkAdapterJobsClientImpl(AzureStackHciManagementClientImpl client) { - this.service = RestProxy.create(EdgeMachineNetworkAdapterJobsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachineNetworkAdapterJobs to be used - * by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineNetworkAdapterJobs") - public interface EdgeMachineNetworkAdapterJobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}/jobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}/jobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}/jobs/{jobName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @PathParam("jobName") String jobName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineNetworkAdapterJobInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}/jobs/{jobName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @PathParam("jobName") String jobName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineNetworkAdapterJobInner resource, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}/jobs/{jobName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @PathParam("jobName") String jobName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}/jobs/{jobName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @PathParam("jobName") String jobName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a specific network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String edgeMachineName, String networkAdapterName, String jobName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, networkAdapterName, jobName, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a specific network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName) { - return getWithResponseAsync(resourceGroupName, edgeMachineName, networkAdapterName, jobName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a specific network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, networkAdapterName, jobName, accept, context); - } - - /** - * Get a specific network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineNetworkAdapterJobInner get(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName) { - return getWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, jobName, Context.NONE) - .getValue(); - } - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String edgeMachineName, String networkAdapterName) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, networkAdapterName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String edgeMachineName, - String networkAdapterName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, edgeMachineName, networkAdapterName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - String edgeMachineName, String networkAdapterName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, networkAdapterName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - String edgeMachineName, String networkAdapterName, Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, networkAdapterName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String networkAdapterName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, networkAdapterName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String networkAdapterName, Context context) { - return new PagedIterable<>( - () -> listSinglePage(resourceGroupName, edgeMachineName, networkAdapterName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job for an Edge Machine Network Adapter along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String edgeMachineName, String networkAdapterName, String jobName, EdgeMachineNetworkAdapterJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, networkAdapterName, jobName, - contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job for an Edge Machine Network Adapter along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, EdgeMachineNetworkAdapterJobInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, networkAdapterName, jobName, - contentType, accept, resource, Context.NONE); - } - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job for an Edge Machine Network Adapter along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, EdgeMachineNetworkAdapterJobInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, networkAdapterName, jobName, - contentType, accept, resource, context); - } - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job for an Edge Machine Network Adapter. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineNetworkAdapterJobInner> - beginCreateOrUpdateAsync(String resourceGroupName, String edgeMachineName, String networkAdapterName, - String jobName, EdgeMachineNetworkAdapterJobInner resource) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, - networkAdapterName, jobName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EdgeMachineNetworkAdapterJobInner.class, - EdgeMachineNetworkAdapterJobInner.class, this.client.getContext()); - } - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job for an Edge Machine Network Adapter. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineNetworkAdapterJobInner> - beginCreateOrUpdate(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName, - EdgeMachineNetworkAdapterJobInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, jobName, resource); - return this.client.getLroResult(response, - EdgeMachineNetworkAdapterJobInner.class, EdgeMachineNetworkAdapterJobInner.class, Context.NONE); - } - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job for an Edge Machine Network Adapter. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineNetworkAdapterJobInner> - beginCreateOrUpdate(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName, - EdgeMachineNetworkAdapterJobInner resource, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, - networkAdapterName, jobName, resource, context); - return this.client.getLroResult(response, - EdgeMachineNetworkAdapterJobInner.class, EdgeMachineNetworkAdapterJobInner.class, context); - } - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job for an Edge Machine Network Adapter on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String edgeMachineName, String networkAdapterName, String jobName, EdgeMachineNetworkAdapterJobInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, networkAdapterName, jobName, resource) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job for an Edge Machine Network Adapter. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineNetworkAdapterJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, EdgeMachineNetworkAdapterJobInner resource) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, networkAdapterName, jobName, resource) - .getFinalResult(); - } - - /** - * Create or update a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job for an Edge Machine Network Adapter. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineNetworkAdapterJobInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, EdgeMachineNetworkAdapterJobInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, networkAdapterName, jobName, resource, context) - .getFinalResult(); - } - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName) { - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, networkAdapterName, jobName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, networkAdapterName, jobName, - Context.NONE); - } - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, networkAdapterName, jobName, context); - } - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, edgeMachineName, networkAdapterName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName) { - Response response - = deleteWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, jobName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, jobName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String edgeMachineName, String networkAdapterName, - String jobName) { - return beginDeleteAsync(resourceGroupName, edgeMachineName, networkAdapterName, jobName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName) { - beginDelete(resourceGroupName, edgeMachineName, networkAdapterName, jobName).getFinalResult(); - } - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName, - Context context) { - beginDelete(resourceGroupName, edgeMachineName, networkAdapterName, jobName, context).getFinalResult(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsImpl.java deleted file mode 100644 index 218bce3cfbf4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsImpl.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterJobInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterJob; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterJobs; - -public final class EdgeMachineNetworkAdapterJobsImpl implements EdgeMachineNetworkAdapterJobs { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineNetworkAdapterJobsImpl.class); - - private final EdgeMachineNetworkAdapterJobsClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachineNetworkAdapterJobsImpl(EdgeMachineNetworkAdapterJobsClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, jobName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineNetworkAdapterJobImpl(inner.getValue(), this.manager())); - } - - public EdgeMachineNetworkAdapterJob get(String resourceGroupName, String edgeMachineName, String networkAdapterName, - String jobName) { - EdgeMachineNetworkAdapterJobInner inner - = this.serviceClient().get(resourceGroupName, edgeMachineName, networkAdapterName, jobName); - if (inner != null) { - return new EdgeMachineNetworkAdapterJobImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String networkAdapterName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, networkAdapterName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new EdgeMachineNetworkAdapterJobImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, - String networkAdapterName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, networkAdapterName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new EdgeMachineNetworkAdapterJobImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, networkAdapterName, jobName); - } - - public void delete(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName, - Context context) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, networkAdapterName, jobName, context); - } - - public EdgeMachineNetworkAdapterJob getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String networkAdapterName = ResourceManagerUtils.getValueFromIdByName(id, "networkAdapters"); - if (networkAdapterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'networkAdapters'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, jobName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String networkAdapterName = ResourceManagerUtils.getValueFromIdByName(id, "networkAdapters"); - if (networkAdapterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'networkAdapters'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, jobName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String networkAdapterName = ResourceManagerUtils.getValueFromIdByName(id, "networkAdapters"); - if (networkAdapterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'networkAdapters'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, networkAdapterName, jobName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String networkAdapterName = ResourceManagerUtils.getValueFromIdByName(id, "networkAdapters"); - if (networkAdapterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'networkAdapters'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, networkAdapterName, jobName, context); - } - - private EdgeMachineNetworkAdapterJobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public EdgeMachineNetworkAdapterJobImpl define(String name) { - return new EdgeMachineNetworkAdapterJobImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersClientImpl.java deleted file mode 100644 index 5e3d2b548efd..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersClientImpl.java +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdaptersClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineNetworkAdapterListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineNetworkAdaptersClient. - */ -public final class EdgeMachineNetworkAdaptersClientImpl implements EdgeMachineNetworkAdaptersClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachineNetworkAdaptersService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachineNetworkAdaptersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachineNetworkAdaptersClientImpl(AzureStackHciManagementClientImpl client) { - this.service = RestProxy.create(EdgeMachineNetworkAdaptersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachineNetworkAdapters to be used by - * the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineNetworkAdapters") - public interface EdgeMachineNetworkAdaptersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters/{networkAdapterName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("networkAdapterName") String networkAdapterName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/networkAdapters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a specific network adapter on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter on an Edge Machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String edgeMachineName, String networkAdapterName) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, networkAdapterName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a specific network adapter on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter on an Edge Machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String edgeMachineName, - String networkAdapterName) { - return getWithResponseAsync(resourceGroupName, edgeMachineName, networkAdapterName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a specific network adapter on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, networkAdapterName, accept, context); - } - - /** - * Get a specific network adapter on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineNetworkAdapterInner get(String resourceGroupName, String edgeMachineName, - String networkAdapterName) { - return getWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, Context.NONE).getValue(); - } - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String edgeMachineName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String edgeMachineName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, edgeMachineName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - String edgeMachineName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - String edgeMachineName, Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, - Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersImpl.java deleted file mode 100644 index 1cdd0c63bc25..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdaptersClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapter; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapters; - -public final class EdgeMachineNetworkAdaptersImpl implements EdgeMachineNetworkAdapters { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineNetworkAdaptersImpl.class); - - private final EdgeMachineNetworkAdaptersClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachineNetworkAdaptersImpl(EdgeMachineNetworkAdaptersClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, edgeMachineName, networkAdapterName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineNetworkAdapterImpl(inner.getValue(), this.manager())); - } - - public EdgeMachineNetworkAdapter get(String resourceGroupName, String edgeMachineName, String networkAdapterName) { - EdgeMachineNetworkAdapterInner inner - = this.serviceClient().get(resourceGroupName, edgeMachineName, networkAdapterName); - if (inner != null) { - return new EdgeMachineNetworkAdapterImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineNetworkAdapterImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineNetworkAdapterImpl(inner1, this.manager())); - } - - private EdgeMachineNetworkAdaptersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsImpl.java deleted file mode 100644 index df96a9472d61..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineSecuritySettingsInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityProperties; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecuritySettings; - -public final class EdgeMachineSecuritySettingsImpl - implements EdgeMachineSecuritySettings, EdgeMachineSecuritySettings.Definition, EdgeMachineSecuritySettings.Update { - private EdgeMachineSecuritySettingsInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EdgeMachineSecurityProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeMachineSecuritySettingsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String edgeMachineName; - - private String securitySettingsName; - - public EdgeMachineSecuritySettingsImpl withExistingEdgeMachine(String resourceGroupName, String edgeMachineName) { - this.resourceGroupName = resourceGroupName; - this.edgeMachineName = edgeMachineName; - return this; - } - - public EdgeMachineSecuritySettings create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineSecuritySettingsOperations() - .createOrUpdate(resourceGroupName, edgeMachineName, securitySettingsName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineSecuritySettings create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineSecuritySettingsOperations() - .createOrUpdate(resourceGroupName, edgeMachineName, securitySettingsName, this.innerModel(), context); - return this; - } - - EdgeMachineSecuritySettingsImpl(String name, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new EdgeMachineSecuritySettingsInner(); - this.serviceManager = serviceManager; - this.securitySettingsName = name; - } - - public EdgeMachineSecuritySettingsImpl update() { - return this; - } - - public EdgeMachineSecuritySettings apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineSecuritySettingsOperations() - .createOrUpdate(resourceGroupName, edgeMachineName, securitySettingsName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineSecuritySettings apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineSecuritySettingsOperations() - .createOrUpdate(resourceGroupName, edgeMachineName, securitySettingsName, this.innerModel(), context); - return this; - } - - EdgeMachineSecuritySettingsImpl(EdgeMachineSecuritySettingsInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); - this.securitySettingsName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "securitySettings"); - } - - public EdgeMachineSecuritySettings refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineSecuritySettingsOperations() - .getWithResponse(resourceGroupName, edgeMachineName, securitySettingsName, Context.NONE) - .getValue(); - return this; - } - - public EdgeMachineSecuritySettings refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineSecuritySettingsOperations() - .getWithResponse(resourceGroupName, edgeMachineName, securitySettingsName, context) - .getValue(); - return this; - } - - public EdgeMachineSecuritySettingsImpl withProperties(EdgeMachineSecurityProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsClientImpl.java deleted file mode 100644 index 5989c52b9085..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsClientImpl.java +++ /dev/null @@ -1,789 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineSecuritySettingsInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineSecuritySettingsListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * EdgeMachineSecuritySettingsOperationsClient. - */ -public final class EdgeMachineSecuritySettingsOperationsClientImpl - implements EdgeMachineSecuritySettingsOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachineSecuritySettingsOperationsService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachineSecuritySettingsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachineSecuritySettingsOperationsClientImpl(AzureStackHciManagementClientImpl client) { - this.service = RestProxy.create(EdgeMachineSecuritySettingsOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachineSecuritySettingsOperations to - * be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineSecuritySettingsOperations") - public interface EdgeMachineSecuritySettingsOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/securitySettings/{securitySettingsName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("securitySettingsName") String securitySettingsName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/securitySettings/{securitySettingsName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("securitySettingsName") String securitySettingsName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/securitySettings/{securitySettingsName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("securitySettingsName") String securitySettingsName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineSecuritySettingsInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/securitySettings/{securitySettingsName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("securitySettingsName") String securitySettingsName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineSecuritySettingsInner resource, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/securitySettings/{securitySettingsName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("securitySettingsName") String securitySettingsName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/securitySettings/{securitySettingsName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, - @PathParam("securitySettingsName") String securitySettingsName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/securitySettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByEdgeMachine(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/securitySettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByEdgeMachineSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByEdgeMachineNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByEdgeMachineNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String edgeMachineName, String securitySettingsName) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, securitySettingsName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String edgeMachineName, - String securitySettingsName) { - return getWithResponseAsync(resourceGroupName, edgeMachineName, securitySettingsName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String securitySettingsName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, securitySettingsName, accept, context); - } - - /** - * Get an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineSecuritySettingsInner get(String resourceGroupName, String edgeMachineName, - String securitySettingsName) { - return getWithResponse(resourceGroupName, edgeMachineName, securitySettingsName, Context.NONE).getValue(); - } - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edge Machine Security Settings proxy resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String edgeMachineName, String securitySettingsName, EdgeMachineSecuritySettingsInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, securitySettingsName, contentType, - accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edge Machine Security Settings proxy resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String securitySettingsName, EdgeMachineSecuritySettingsInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, securitySettingsName, contentType, - accept, resource, Context.NONE); - } - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edge Machine Security Settings proxy resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String securitySettingsName, EdgeMachineSecuritySettingsInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, securitySettingsName, contentType, - accept, resource, context); - } - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of edge Machine Security Settings proxy resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineSecuritySettingsInner> - beginCreateOrUpdateAsync(String resourceGroupName, String edgeMachineName, String securitySettingsName, - EdgeMachineSecuritySettingsInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, securitySettingsName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EdgeMachineSecuritySettingsInner.class, - EdgeMachineSecuritySettingsInner.class, this.client.getContext()); - } - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edge Machine Security Settings proxy resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineSecuritySettingsInner> - beginCreateOrUpdate(String resourceGroupName, String edgeMachineName, String securitySettingsName, - EdgeMachineSecuritySettingsInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, securitySettingsName, resource); - return this.client.getLroResult(response, - EdgeMachineSecuritySettingsInner.class, EdgeMachineSecuritySettingsInner.class, Context.NONE); - } - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edge Machine Security Settings proxy resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineSecuritySettingsInner> - beginCreateOrUpdate(String resourceGroupName, String edgeMachineName, String securitySettingsName, - EdgeMachineSecuritySettingsInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, securitySettingsName, resource, context); - return this.client.getLroResult(response, - EdgeMachineSecuritySettingsInner.class, EdgeMachineSecuritySettingsInner.class, context); - } - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edge Machine Security Settings proxy resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String edgeMachineName, - String securitySettingsName, EdgeMachineSecuritySettingsInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, securitySettingsName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edge Machine Security Settings proxy resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineSecuritySettingsInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String securitySettingsName, EdgeMachineSecuritySettingsInner resource) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, securitySettingsName, resource).getFinalResult(); - } - - /** - * Create or update an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edge Machine Security Settings proxy resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineSecuritySettingsInner createOrUpdate(String resourceGroupName, String edgeMachineName, - String securitySettingsName, EdgeMachineSecuritySettingsInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, securitySettingsName, resource, context) - .getFinalResult(); - } - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName, - String securitySettingsName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, securitySettingsName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, - String securitySettingsName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, securitySettingsName, Context.NONE); - } - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, - String securitySettingsName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, securitySettingsName, context); - } - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName, - String securitySettingsName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, edgeMachineName, securitySettingsName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String securitySettingsName) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, securitySettingsName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String securitySettingsName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, edgeMachineName, securitySettingsName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String edgeMachineName, String securitySettingsName) { - return beginDeleteAsync(resourceGroupName, edgeMachineName, securitySettingsName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String securitySettingsName) { - beginDelete(resourceGroupName, edgeMachineName, securitySettingsName).getFinalResult(); - } - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String securitySettingsName, Context context) { - beginDelete(resourceGroupName, edgeMachineName, securitySettingsName, context).getFinalResult(); - } - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByEdgeMachineSinglePageAsync(String resourceGroupName, String edgeMachineName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByEdgeMachine(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByEdgeMachineAsync(String resourceGroupName, - String edgeMachineName) { - return new PagedFlux<>(() -> listByEdgeMachineSinglePageAsync(resourceGroupName, edgeMachineName), - nextLink -> listByEdgeMachineNextSinglePageAsync(nextLink)); - } - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByEdgeMachineSinglePage(String resourceGroupName, - String edgeMachineName) { - final String accept = "application/json"; - Response res - = service.listByEdgeMachineSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByEdgeMachineSinglePage(String resourceGroupName, - String edgeMachineName, Context context) { - final String accept = "application/json"; - Response res - = service.listByEdgeMachineSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEdgeMachine(String resourceGroupName, - String edgeMachineName) { - return new PagedIterable<>(() -> listByEdgeMachineSinglePage(resourceGroupName, edgeMachineName), - nextLink -> listByEdgeMachineNextSinglePage(nextLink)); - } - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEdgeMachine(String resourceGroupName, - String edgeMachineName, Context context) { - return new PagedIterable<>(() -> listByEdgeMachineSinglePage(resourceGroupName, edgeMachineName, context), - nextLink -> listByEdgeMachineNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByEdgeMachineNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByEdgeMachineNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByEdgeMachineNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByEdgeMachineNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByEdgeMachineNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listByEdgeMachineNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsImpl.java deleted file mode 100644 index cbcf288a9971..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineSecuritySettingsInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecuritySettings; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecuritySettingsOperations; - -public final class EdgeMachineSecuritySettingsOperationsImpl implements EdgeMachineSecuritySettingsOperations { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineSecuritySettingsOperationsImpl.class); - - private final EdgeMachineSecuritySettingsOperationsClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachineSecuritySettingsOperationsImpl(EdgeMachineSecuritySettingsOperationsClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String securitySettingsName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, edgeMachineName, securitySettingsName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineSecuritySettingsImpl(inner.getValue(), this.manager())); - } - - public EdgeMachineSecuritySettings get(String resourceGroupName, String edgeMachineName, - String securitySettingsName) { - EdgeMachineSecuritySettingsInner inner - = this.serviceClient().get(resourceGroupName, edgeMachineName, securitySettingsName); - if (inner != null) { - return new EdgeMachineSecuritySettingsImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String edgeMachineName, String securitySettingsName) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, securitySettingsName); - } - - public void delete(String resourceGroupName, String edgeMachineName, String securitySettingsName, Context context) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, securitySettingsName, context); - } - - public PagedIterable listByEdgeMachine(String resourceGroupName, - String edgeMachineName) { - PagedIterable inner - = this.serviceClient().listByEdgeMachine(resourceGroupName, edgeMachineName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new EdgeMachineSecuritySettingsImpl(inner1, this.manager())); - } - - public PagedIterable listByEdgeMachine(String resourceGroupName, - String edgeMachineName, Context context) { - PagedIterable inner - = this.serviceClient().listByEdgeMachine(resourceGroupName, edgeMachineName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new EdgeMachineSecuritySettingsImpl(inner1, this.manager())); - } - - public EdgeMachineSecuritySettings getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String securitySettingsName = ResourceManagerUtils.getValueFromIdByName(id, "securitySettings"); - if (securitySettingsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'securitySettings'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, securitySettingsName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String securitySettingsName = ResourceManagerUtils.getValueFromIdByName(id, "securitySettings"); - if (securitySettingsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'securitySettings'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, securitySettingsName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String securitySettingsName = ResourceManagerUtils.getValueFromIdByName(id, "securitySettings"); - if (securitySettingsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'securitySettings'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, securitySettingsName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String securitySettingsName = ResourceManagerUtils.getValueFromIdByName(id, "securitySettings"); - if (securitySettingsName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'securitySettings'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, securitySettingsName, context); - } - - private EdgeMachineSecuritySettingsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public EdgeMachineSecuritySettingsImpl define(String name) { - return new EdgeMachineSecuritySettingsImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineValidateResponseImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineValidateResponseImpl.java deleted file mode 100644 index 2ef0148a8279..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineValidateResponseImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineValidateResponseInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateResponse; - -public final class EdgeMachineValidateResponseImpl implements EdgeMachineValidateResponse { - private EdgeMachineValidateResponseInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - EdgeMachineValidateResponseImpl(EdgeMachineValidateResponseInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String status() { - return this.innerModel().status(); - } - - public EdgeMachineValidateResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumeImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumeImpl.java deleted file mode 100644 index 3e25f34bbc3d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumeImpl.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineVolumeInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolume; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumeProperties; - -public final class EdgeMachineVolumeImpl - implements EdgeMachineVolume, EdgeMachineVolume.Definition, EdgeMachineVolume.Update { - private EdgeMachineVolumeInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EdgeMachineVolumeProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeMachineVolumeInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String edgeMachineName; - - private String volumeName; - - public EdgeMachineVolumeImpl withExistingEdgeMachine(String resourceGroupName, String edgeMachineName) { - this.resourceGroupName = resourceGroupName; - this.edgeMachineName = edgeMachineName; - return this; - } - - public EdgeMachineVolume create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineVolumes() - .createOrUpdate(resourceGroupName, edgeMachineName, volumeName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineVolume create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineVolumes() - .createOrUpdate(resourceGroupName, edgeMachineName, volumeName, this.innerModel(), context); - return this; - } - - EdgeMachineVolumeImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = new EdgeMachineVolumeInner(); - this.serviceManager = serviceManager; - this.volumeName = name; - } - - public EdgeMachineVolumeImpl update() { - return this; - } - - public EdgeMachineVolume apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineVolumes() - .createOrUpdate(resourceGroupName, edgeMachineName, volumeName, this.innerModel(), Context.NONE); - return this; - } - - public EdgeMachineVolume apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineVolumes() - .createOrUpdate(resourceGroupName, edgeMachineName, volumeName, this.innerModel(), context); - return this; - } - - EdgeMachineVolumeImpl(EdgeMachineVolumeInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.edgeMachineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "edgeMachines"); - this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumes"); - } - - public EdgeMachineVolume refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineVolumes() - .getWithResponse(resourceGroupName, edgeMachineName, volumeName, Context.NONE) - .getValue(); - return this; - } - - public EdgeMachineVolume refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeMachineVolumes() - .getWithResponse(resourceGroupName, edgeMachineName, volumeName, context) - .getValue(); - return this; - } - - public EdgeMachineVolumeImpl withProperties(EdgeMachineVolumeProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesClientImpl.java deleted file mode 100644 index 0c6fde91f481..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesClientImpl.java +++ /dev/null @@ -1,770 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineVolumeInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineVolumeListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachineVolumesClient. - */ -public final class EdgeMachineVolumesClientImpl implements EdgeMachineVolumesClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachineVolumesService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachineVolumesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachineVolumesClientImpl(AzureStackHciManagementClientImpl client) { - this.service = RestProxy.create(EdgeMachineVolumesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachineVolumes to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachineVolumes") - public interface EdgeMachineVolumesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/volumes/{volumeName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("volumeName") String volumeName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/volumes/{volumeName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("volumeName") String volumeName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/volumes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/volumes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/volumes/{volumeName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("volumeName") String volumeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineVolumeInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/volumes/{volumeName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("volumeName") String volumeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EdgeMachineVolumeInner resource, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/volumes/{volumeName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("volumeName") String volumeName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/volumes/{volumeName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @PathParam("volumeName") String volumeName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a specific volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String edgeMachineName, String volumeName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, volumeName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a specific volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String edgeMachineName, String volumeName) { - return getWithResponseAsync(resourceGroupName, edgeMachineName, volumeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a specific volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String volumeName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, volumeName, accept, context); - } - - /** - * Get a specific volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineVolumeInner get(String resourceGroupName, String edgeMachineName, String volumeName) { - return getWithResponse(resourceGroupName, edgeMachineName, volumeName, Context.NONE).getValue(); - } - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String edgeMachineName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String edgeMachineName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, edgeMachineName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String edgeMachineName, - Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, edgeMachineName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String edgeMachineName, - Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, edgeMachineName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume resource representing a storage volume on an Edge Machine along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String edgeMachineName, String volumeName, EdgeMachineVolumeInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, volumeName, contentType, accept, - resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume resource representing a storage volume on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String volumeName, EdgeMachineVolumeInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, volumeName, contentType, accept, - resource, Context.NONE); - } - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume resource representing a storage volume on an Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - String volumeName, EdgeMachineVolumeInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, volumeName, contentType, accept, - resource, context); - } - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of volume resource representing a storage volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineVolumeInner> beginCreateOrUpdateAsync( - String resourceGroupName, String edgeMachineName, String volumeName, EdgeMachineVolumeInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, volumeName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EdgeMachineVolumeInner.class, EdgeMachineVolumeInner.class, - this.client.getContext()); - } - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of volume resource representing a storage volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineVolumeInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String volumeName, EdgeMachineVolumeInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, volumeName, resource); - return this.client.getLroResult(response, - EdgeMachineVolumeInner.class, EdgeMachineVolumeInner.class, Context.NONE); - } - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of volume resource representing a storage volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineVolumeInner> beginCreateOrUpdate( - String resourceGroupName, String edgeMachineName, String volumeName, EdgeMachineVolumeInner resource, - Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, volumeName, resource, context); - return this.client.getLroResult(response, - EdgeMachineVolumeInner.class, EdgeMachineVolumeInner.class, context); - } - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume resource representing a storage volume on an Edge Machine on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String edgeMachineName, - String volumeName, EdgeMachineVolumeInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, volumeName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume resource representing a storage volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineVolumeInner createOrUpdate(String resourceGroupName, String edgeMachineName, String volumeName, - EdgeMachineVolumeInner resource) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, volumeName, resource).getFinalResult(); - } - - /** - * Create or update a volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return volume resource representing a storage volume on an Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineVolumeInner createOrUpdate(String resourceGroupName, String edgeMachineName, String volumeName, - EdgeMachineVolumeInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, volumeName, resource, context).getFinalResult(); - } - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName, - String volumeName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, volumeName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, - String volumeName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, volumeName, Context.NONE); - } - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, String volumeName, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, volumeName, context); - } - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName, - String volumeName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, edgeMachineName, volumeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String volumeName) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, volumeName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - String volumeName, Context context) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, volumeName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String edgeMachineName, String volumeName) { - return beginDeleteAsync(resourceGroupName, edgeMachineName, volumeName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String volumeName) { - beginDelete(resourceGroupName, edgeMachineName, volumeName).getFinalResult(); - } - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, String volumeName, Context context) { - beginDelete(resourceGroupName, edgeMachineName, volumeName, context).getFinalResult(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesImpl.java deleted file mode 100644 index 2405904ccfda..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineVolumeInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolume; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumes; - -public final class EdgeMachineVolumesImpl implements EdgeMachineVolumes { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachineVolumesImpl.class); - - private final EdgeMachineVolumesClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachineVolumesImpl(EdgeMachineVolumesClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String edgeMachineName, - String volumeName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, edgeMachineName, volumeName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineVolumeImpl(inner.getValue(), this.manager())); - } - - public EdgeMachineVolume get(String resourceGroupName, String edgeMachineName, String volumeName) { - EdgeMachineVolumeInner inner = this.serviceClient().get(resourceGroupName, edgeMachineName, volumeName); - if (inner != null) { - return new EdgeMachineVolumeImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, edgeMachineName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineVolumeImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String edgeMachineName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, edgeMachineName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineVolumeImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String edgeMachineName, String volumeName) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, volumeName); - } - - public void delete(String resourceGroupName, String edgeMachineName, String volumeName, Context context) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, volumeName, context); - } - - public EdgeMachineVolume getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, volumeName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - return this.getWithResponse(resourceGroupName, edgeMachineName, volumeName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, volumeName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); - if (volumeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, volumeName, context); - } - - private EdgeMachineVolumesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public EdgeMachineVolumeImpl define(String name) { - return new EdgeMachineVolumeImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesClientImpl.java deleted file mode 100644 index 49fc48dc70e3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesClientImpl.java +++ /dev/null @@ -1,1667 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineValidateResponseInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineListResult; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EdgeMachinesClient. - */ -public final class EdgeMachinesClientImpl implements EdgeMachinesClient { - /** - * The proxy service used to perform REST calls. - */ - private final EdgeMachinesService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of EdgeMachinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeMachinesClientImpl(AzureStackHciManagementClientImpl client) { - this.service - = RestProxy.create(EdgeMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientEdgeMachines to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientEdgeMachines") - public interface EdgeMachinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachineInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachineInner resource, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachinePatch properties, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachinePatch properties, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/edgeMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/edgeMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/validate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachineValidateRequest body, - Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/validate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response validateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") EdgeMachineValidateRequest body, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/refreshSecuritySettings") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshSecuritySettings(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/refreshSecuritySettings") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response refreshSecuritySettingsSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/refreshApplicableUpdates") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshApplicableUpdates(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/edgeMachines/{edgeMachineName}/refreshApplicableUpdates") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response refreshApplicableUpdatesSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("edgeMachineName") String edgeMachineName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String edgeMachineName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String edgeMachineName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, edgeMachineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String edgeMachineName, - Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, accept, context); - } - - /** - * Get an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineInner getByResourceGroup(String resourceGroupName, String edgeMachineName) { - return getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, Context.NONE).getValue(); - } - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String edgeMachineName, EdgeMachineInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, resource, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - EdgeMachineInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, resource, - Context.NONE); - } - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String edgeMachineName, - EdgeMachineInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, resource, - context); - } - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineInner> - beginCreateOrUpdateAsync(String resourceGroupName, String edgeMachineName, EdgeMachineInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, edgeMachineName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EdgeMachineInner.class, EdgeMachineInner.class, this.client.getContext()); - } - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, EdgeMachineInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, resource); - return this.client.getLroResult(response, EdgeMachineInner.class, - EdgeMachineInner.class, Context.NONE); - } - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineInner> beginCreateOrUpdate(String resourceGroupName, - String edgeMachineName, EdgeMachineInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, edgeMachineName, resource, context); - return this.client.getLroResult(response, EdgeMachineInner.class, - EdgeMachineInner.class, context); - } - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String edgeMachineName, - EdgeMachineInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, edgeMachineName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineInner createOrUpdate(String resourceGroupName, String edgeMachineName, - EdgeMachineInner resource) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, resource).getFinalResult(); - } - - /** - * Create or update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineInner createOrUpdate(String resourceGroupName, String edgeMachineName, EdgeMachineInner resource, - Context context) { - return beginCreateOrUpdate(resourceGroupName, edgeMachineName, resource, context).getFinalResult(); - } - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String edgeMachineName, - EdgeMachinePatch properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, properties, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String edgeMachineName, - EdgeMachinePatch properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, properties, - Context.NONE); - } - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String edgeMachineName, - EdgeMachinePatch properties, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, properties, - context); - } - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineInner> beginUpdateAsync(String resourceGroupName, - String edgeMachineName, EdgeMachinePatch properties) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, edgeMachineName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EdgeMachineInner.class, EdgeMachineInner.class, this.client.getContext()); - } - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineInner> beginUpdate(String resourceGroupName, - String edgeMachineName, EdgeMachinePatch properties) { - Response response = updateWithResponse(resourceGroupName, edgeMachineName, properties); - return this.client.getLroResult(response, EdgeMachineInner.class, - EdgeMachineInner.class, Context.NONE); - } - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineInner> beginUpdate(String resourceGroupName, - String edgeMachineName, EdgeMachinePatch properties, Context context) { - Response response = updateWithResponse(resourceGroupName, edgeMachineName, properties, context); - return this.client.getLroResult(response, EdgeMachineInner.class, - EdgeMachineInner.class, context); - } - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String edgeMachineName, - EdgeMachinePatch properties) { - return beginUpdateAsync(resourceGroupName, edgeMachineName, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineInner update(String resourceGroupName, String edgeMachineName, EdgeMachinePatch properties) { - return beginUpdate(resourceGroupName, edgeMachineName, properties).getFinalResult(); - } - - /** - * Update an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return edgeMachine details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineInner update(String resourceGroupName, String edgeMachineName, EdgeMachinePatch properties, - Context context) { - return beginUpdate(resourceGroupName, edgeMachineName, properties, context).getFinalResult(); - } - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String edgeMachineName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, Context.NONE); - } - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String edgeMachineName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, context); - } - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String edgeMachineName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, edgeMachineName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String edgeMachineName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, edgeMachineName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String edgeMachineName) { - return beginDeleteAsync(resourceGroupName, edgeMachineName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName) { - beginDelete(resourceGroupName, edgeMachineName).getFinalResult(); - } - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String edgeMachineName, Context context) { - beginDelete(resourceGroupName, edgeMachineName, context).getFinalResult(); - } - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); - } - - /** - * List all edge machines in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all edge machines in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List all edge machines in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all edge machines in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all edge machines in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List all edge machines in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateWithResponseAsync(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, body, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateWithResponse(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, body, - Context.NONE); - } - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateWithResponse(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, contentType, accept, body, context); - } - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the validate response for Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EdgeMachineValidateResponseInner> - beginValidateAsync(String resourceGroupName, String edgeMachineName, EdgeMachineValidateRequest body) { - Mono>> mono = validateWithResponseAsync(resourceGroupName, edgeMachineName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EdgeMachineValidateResponseInner.class, - EdgeMachineValidateResponseInner.class, this.client.getContext()); - } - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the validate response for Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineValidateResponseInner> - beginValidate(String resourceGroupName, String edgeMachineName, EdgeMachineValidateRequest body) { - Response response = validateWithResponse(resourceGroupName, edgeMachineName, body); - return this.client.getLroResult(response, - EdgeMachineValidateResponseInner.class, EdgeMachineValidateResponseInner.class, Context.NONE); - } - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the validate response for Edge Machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EdgeMachineValidateResponseInner> beginValidate( - String resourceGroupName, String edgeMachineName, EdgeMachineValidateRequest body, Context context) { - Response response = validateWithResponse(resourceGroupName, edgeMachineName, body, context); - return this.client.getLroResult(response, - EdgeMachineValidateResponseInner.class, EdgeMachineValidateResponseInner.class, context); - } - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAsync(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body) { - return beginValidateAsync(resourceGroupName, edgeMachineName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineValidateResponseInner validate(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body) { - return beginValidate(resourceGroupName, edgeMachineName, body).getFinalResult(); - } - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeMachineValidateResponseInner validate(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body, Context context) { - return beginValidate(resourceGroupName, edgeMachineName, body, context).getFinalResult(); - } - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshSecuritySettingsWithResponseAsync(String resourceGroupName, - String edgeMachineName) { - return FluxUtil - .withContext( - context -> service.refreshSecuritySettings(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response refreshSecuritySettingsWithResponse(String resourceGroupName, String edgeMachineName) { - return service.refreshSecuritySettingsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, Context.NONE); - } - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response refreshSecuritySettingsWithResponse(String resourceGroupName, String edgeMachineName, - Context context) { - return service.refreshSecuritySettingsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, context); - } - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRefreshSecuritySettingsAsync(String resourceGroupName, - String edgeMachineName) { - Mono>> mono - = refreshSecuritySettingsWithResponseAsync(resourceGroupName, edgeMachineName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRefreshSecuritySettings(String resourceGroupName, - String edgeMachineName) { - Response response = refreshSecuritySettingsWithResponse(resourceGroupName, edgeMachineName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRefreshSecuritySettings(String resourceGroupName, - String edgeMachineName, Context context) { - Response response - = refreshSecuritySettingsWithResponse(resourceGroupName, edgeMachineName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshSecuritySettingsAsync(String resourceGroupName, String edgeMachineName) { - return beginRefreshSecuritySettingsAsync(resourceGroupName, edgeMachineName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void refreshSecuritySettings(String resourceGroupName, String edgeMachineName) { - beginRefreshSecuritySettings(resourceGroupName, edgeMachineName).getFinalResult(); - } - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void refreshSecuritySettings(String resourceGroupName, String edgeMachineName, Context context) { - beginRefreshSecuritySettings(resourceGroupName, edgeMachineName, context).getFinalResult(); - } - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshApplicableUpdatesWithResponseAsync(String resourceGroupName, - String edgeMachineName) { - return FluxUtil - .withContext( - context -> service.refreshApplicableUpdates(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response refreshApplicableUpdatesWithResponse(String resourceGroupName, - String edgeMachineName) { - return service.refreshApplicableUpdatesSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, Context.NONE); - } - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response refreshApplicableUpdatesWithResponse(String resourceGroupName, String edgeMachineName, - Context context) { - return service.refreshApplicableUpdatesSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, edgeMachineName, context); - } - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRefreshApplicableUpdatesAsync(String resourceGroupName, - String edgeMachineName) { - Mono>> mono - = refreshApplicableUpdatesWithResponseAsync(resourceGroupName, edgeMachineName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRefreshApplicableUpdates(String resourceGroupName, - String edgeMachineName) { - Response response = refreshApplicableUpdatesWithResponse(resourceGroupName, edgeMachineName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRefreshApplicableUpdates(String resourceGroupName, - String edgeMachineName, Context context) { - Response response - = refreshApplicableUpdatesWithResponse(resourceGroupName, edgeMachineName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshApplicableUpdatesAsync(String resourceGroupName, String edgeMachineName) { - return beginRefreshApplicableUpdatesAsync(resourceGroupName, edgeMachineName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void refreshApplicableUpdates(String resourceGroupName, String edgeMachineName) { - beginRefreshApplicableUpdates(resourceGroupName, edgeMachineName).getFinalResult(); - } - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void refreshApplicableUpdates(String resourceGroupName, String edgeMachineName, Context context) { - beginRefreshApplicableUpdates(resourceGroupName, edgeMachineName, context).getFinalResult(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesImpl.java deleted file mode 100644 index 92bf0738b402..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineValidateResponseInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachine; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateRequest; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateResponse; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachines; - -public final class EdgeMachinesImpl implements EdgeMachines { - private static final ClientLogger LOGGER = new ClientLogger(EdgeMachinesImpl.class); - - private final EdgeMachinesClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public EdgeMachinesImpl(EdgeMachinesClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String edgeMachineName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeMachineImpl(inner.getValue(), this.manager())); - } - - public EdgeMachine getByResourceGroup(String resourceGroupName, String edgeMachineName) { - EdgeMachineInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, edgeMachineName); - if (inner != null) { - return new EdgeMachineImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String edgeMachineName) { - this.serviceClient().delete(resourceGroupName, edgeMachineName); - } - - public void delete(String resourceGroupName, String edgeMachineName, Context context) { - this.serviceClient().delete(resourceGroupName, edgeMachineName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeMachineImpl(inner1, this.manager())); - } - - public EdgeMachineValidateResponse validate(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body) { - EdgeMachineValidateResponseInner inner - = this.serviceClient().validate(resourceGroupName, edgeMachineName, body); - if (inner != null) { - return new EdgeMachineValidateResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public EdgeMachineValidateResponse validate(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body, Context context) { - EdgeMachineValidateResponseInner inner - = this.serviceClient().validate(resourceGroupName, edgeMachineName, body, context); - if (inner != null) { - return new EdgeMachineValidateResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public void refreshSecuritySettings(String resourceGroupName, String edgeMachineName) { - this.serviceClient().refreshSecuritySettings(resourceGroupName, edgeMachineName); - } - - public void refreshSecuritySettings(String resourceGroupName, String edgeMachineName, Context context) { - this.serviceClient().refreshSecuritySettings(resourceGroupName, edgeMachineName, context); - } - - public void refreshApplicableUpdates(String resourceGroupName, String edgeMachineName) { - this.serviceClient().refreshApplicableUpdates(resourceGroupName, edgeMachineName); - } - - public void refreshApplicableUpdates(String resourceGroupName, String edgeMachineName, Context context) { - this.serviceClient().refreshApplicableUpdates(resourceGroupName, edgeMachineName, context); - } - - public EdgeMachine getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, edgeMachineName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String edgeMachineName = ResourceManagerUtils.getValueFromIdByName(id, "edgeMachines"); - if (edgeMachineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeMachines'.", id))); - } - this.delete(resourceGroupName, edgeMachineName, context); - } - - private EdgeMachinesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } - - public EdgeMachineImpl define(String name) { - return new EdgeMachineImpl(name, this.manager()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImageImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImageImpl.java deleted file mode 100644 index 26a8c8ac65c2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImageImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; -import com.azure.resourcemanager.azurestackhci.models.OsImage; -import com.azure.resourcemanager.azurestackhci.models.OsImageProperties; - -public final class OsImageImpl implements OsImage { - private OsImageInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - OsImageImpl(OsImageInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public OsImageProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public OsImageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesClientImpl.java deleted file mode 100644 index ee73075c9c23..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesClientImpl.java +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; -import com.azure.resourcemanager.azurestackhci.implementation.models.OsImageListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OsImagesClient. - */ -public final class OsImagesClientImpl implements OsImagesClient { - /** - * The proxy service used to perform REST calls. - */ - private final OsImagesService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of OsImagesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OsImagesClientImpl(AzureStackHciManagementClientImpl client) { - this.service = RestProxy.create(OsImagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientOsImages to be used by the proxy service - * to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientOsImages") - public interface OsImagesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/osImages/{osImageName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("osImageName") String osImageName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/osImages/{osImageName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("osImageName") String osImageName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/osImages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionLocationResource(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/osImages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionLocationResourceSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionLocationResourceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionLocationResourceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a os image. - * - * @param location The name of the Azure region. - * @param osImageName The name of the OsImage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a os image along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String osImageName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, osImageName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a os image. - * - * @param location The name of the Azure region. - * @param osImageName The name of the OsImage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a os image on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String osImageName) { - return getWithResponseAsync(location, osImageName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a os image. - * - * @param location The name of the Azure region. - * @param osImageName The name of the OsImage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a os image along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String osImageName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, osImageName, accept, context); - } - - /** - * Get a os image. - * - * @param location The name of the Azure region. - * @param osImageName The name of the OsImage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a os image. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OsImageInner get(String location, String osImageName) { - return getWithResponse(location, osImageName, Context.NONE).getValue(); - } - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionLocationResourceSinglePageAsync(String location) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listBySubscriptionLocationResource(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySubscriptionLocationResourceAsync(String location) { - return new PagedFlux<>(() -> listBySubscriptionLocationResourceSinglePageAsync(location), - nextLink -> listBySubscriptionLocationResourceNextSinglePageAsync(nextLink)); - } - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionLocationResourceSinglePage(String location) { - final String accept = "application/json"; - Response res = service.listBySubscriptionLocationResourceSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionLocationResourceSinglePage(String location, Context context) { - final String accept = "application/json"; - Response res = service.listBySubscriptionLocationResourceSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySubscriptionLocationResource(String location) { - return new PagedIterable<>(() -> listBySubscriptionLocationResourceSinglePage(location), - nextLink -> listBySubscriptionLocationResourceNextSinglePage(nextLink)); - } - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySubscriptionLocationResource(String location, Context context) { - return new PagedIterable<>(() -> listBySubscriptionLocationResourceSinglePage(location, context), - nextLink -> listBySubscriptionLocationResourceNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionLocationResourceNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listBySubscriptionLocationResourceNext(nextLink, this.client.getEndpoint(), - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionLocationResourceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res = service.listBySubscriptionLocationResourceNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionLocationResourceNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionLocationResourceNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesImpl.java deleted file mode 100644 index c05cb4eb0402..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; -import com.azure.resourcemanager.azurestackhci.models.OsImage; -import com.azure.resourcemanager.azurestackhci.models.OsImages; - -public final class OsImagesImpl implements OsImages { - private static final ClientLogger LOGGER = new ClientLogger(OsImagesImpl.class); - - private final OsImagesClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public OsImagesImpl(OsImagesClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String location, String osImageName, Context context) { - Response inner = this.serviceClient().getWithResponse(location, osImageName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OsImageImpl(inner.getValue(), this.manager())); - } - - public OsImage get(String location, String osImageName) { - OsImageInner inner = this.serviceClient().get(location, osImageName); - if (inner != null) { - return new OsImageImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listBySubscriptionLocationResource(String location) { - PagedIterable inner = this.serviceClient().listBySubscriptionLocationResource(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OsImageImpl(inner1, this.manager())); - } - - public PagedIterable listBySubscriptionLocationResource(String location, Context context) { - PagedIterable inner = this.serviceClient().listBySubscriptionLocationResource(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OsImageImpl(inner1, this.manager())); - } - - private OsImagesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersClientImpl.java deleted file mode 100644 index 6b98f0ac1056..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersClientImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; -import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OwnershipVouchersClient. - */ -public final class OwnershipVouchersClientImpl implements OwnershipVouchersClient { - /** - * The proxy service used to perform REST calls. - */ - private final OwnershipVouchersService service; - - /** - * The service client containing this operation class. - */ - private final AzureStackHciManagementClientImpl client; - - /** - * Initializes an instance of OwnershipVouchersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OwnershipVouchersClientImpl(AzureStackHciManagementClientImpl client) { - this.service - = RestProxy.create(OwnershipVouchersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureStackHciManagementClientOwnershipVouchers to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AzureStackHciManagementClientOwnershipVouchers") - public interface OwnershipVouchersService { - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/locations/{location}/validateOwnershipVouchers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ValidateOwnershipVouchersRequest validationRequest, Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/locations/{location}/validateOwnershipVouchers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response validateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ValidateOwnershipVouchersRequest validationRequest, Context context); - } - - /** - * Validates ownership vouchers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Ownership vouchers to be validated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return validate Ownership Voucher Response along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateWithResponseAsync(String resourceGroupName, - String location, ValidateOwnershipVouchersRequest validationRequest) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, location, contentType, accept, validationRequest, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Validates ownership vouchers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Ownership vouchers to be validated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return validate Ownership Voucher Response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAsync(String resourceGroupName, String location, - ValidateOwnershipVouchersRequest validationRequest) { - return validateWithResponseAsync(resourceGroupName, location, validationRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Validates ownership vouchers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Ownership vouchers to be validated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return validate Ownership Voucher Response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateWithResponse(String resourceGroupName, - String location, ValidateOwnershipVouchersRequest validationRequest, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, location, contentType, accept, validationRequest, - context); - } - - /** - * Validates ownership vouchers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Ownership vouchers to be validated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return validate Ownership Voucher Response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateOwnershipVouchersResponseInner validate(String resourceGroupName, String location, - ValidateOwnershipVouchersRequest validationRequest) { - return validateWithResponse(resourceGroupName, location, validationRequest, Context.NONE).getValue(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersImpl.java deleted file mode 100644 index aeba3eeb95d9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; -import com.azure.resourcemanager.azurestackhci.models.OwnershipVouchers; -import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; -import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersResponse; - -public final class OwnershipVouchersImpl implements OwnershipVouchers { - private static final ClientLogger LOGGER = new ClientLogger(OwnershipVouchersImpl.class); - - private final OwnershipVouchersClient innerClient; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - public OwnershipVouchersImpl(OwnershipVouchersClient innerClient, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response validateWithResponse(String resourceGroupName, String location, - ValidateOwnershipVouchersRequest validationRequest, Context context) { - Response inner - = this.serviceClient().validateWithResponse(resourceGroupName, location, validationRequest, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ValidateOwnershipVouchersResponseImpl(inner.getValue(), this.manager())); - } - - public ValidateOwnershipVouchersResponse validate(String resourceGroupName, String location, - ValidateOwnershipVouchersRequest validationRequest) { - ValidateOwnershipVouchersResponseInner inner - = this.serviceClient().validate(resourceGroupName, location, validationRequest); - if (inner != null) { - return new ValidateOwnershipVouchersResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - private OwnershipVouchersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateOwnershipVouchersResponseImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateOwnershipVouchersResponseImpl.java deleted file mode 100644 index 92b9865be92b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateOwnershipVouchersResponseImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; -import com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherValidationDetails; -import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersResponse; -import java.util.Collections; -import java.util.List; - -public final class ValidateOwnershipVouchersResponseImpl implements ValidateOwnershipVouchersResponse { - private ValidateOwnershipVouchersResponseInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - ValidateOwnershipVouchersResponseImpl(ValidateOwnershipVouchersResponseInner innerObject, - com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List ownershipVoucherValidationDetails() { - List inner = this.innerModel().ownershipVoucherValidationDetails(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ValidateOwnershipVouchersResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterJobListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterJobListResult.java deleted file mode 100644 index a8e293b840f5..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterJobListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterJobInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Cluster Job resources for the HCI cluster. - */ -@Immutable -public final class ClusterJobListResult implements JsonSerializable { - /* - * The ClusterJob items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ClusterJobListResult class. - */ - private ClusterJobListResult() { - } - - /** - * Get the value property: The ClusterJob items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterJobListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterJobListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ClusterJobListResult. - */ - public static ClusterJobListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterJobListResult deserializedClusterJobListResult = new ClusterJobListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ClusterJobInner.fromJson(reader1)); - deserializedClusterJobListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedClusterJobListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterJobListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDeploymentSettingListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDeploymentSettingListResult.java deleted file mode 100644 index d2eade8e5701..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDeploymentSettingListResult.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDeploymentSettingInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a EdgeMachineDeploymentSetting list operation. - */ -@Immutable -public final class EdgeMachineDeploymentSettingListResult - implements JsonSerializable { - /* - * The EdgeMachineDeploymentSetting items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineDeploymentSettingListResult class. - */ - private EdgeMachineDeploymentSettingListResult() { - } - - /** - * Get the value property: The EdgeMachineDeploymentSetting items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDeploymentSettingListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDeploymentSettingListResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDeploymentSettingListResult. - */ - public static EdgeMachineDeploymentSettingListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDeploymentSettingListResult deserializedEdgeMachineDeploymentSettingListResult - = new EdgeMachineDeploymentSettingListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EdgeMachineDeploymentSettingInner.fromJson(reader1)); - deserializedEdgeMachineDeploymentSettingListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineDeploymentSettingListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDeploymentSettingListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskJobListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskJobListResult.java deleted file mode 100644 index 428b727a3eaa..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskJobListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskJobInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a EdgeMachineDiskJob list operation. - */ -@Immutable -public final class EdgeMachineDiskJobListResult implements JsonSerializable { - /* - * The EdgeMachineDiskJob items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineDiskJobListResult class. - */ - private EdgeMachineDiskJobListResult() { - } - - /** - * Get the value property: The EdgeMachineDiskJob items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDiskJobListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDiskJobListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDiskJobListResult. - */ - public static EdgeMachineDiskJobListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDiskJobListResult deserializedEdgeMachineDiskJobListResult = new EdgeMachineDiskJobListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EdgeMachineDiskJobInner.fromJson(reader1)); - deserializedEdgeMachineDiskJobListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineDiskJobListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDiskJobListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskListResult.java deleted file mode 100644 index 5d8f0e35d83c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a EdgeMachineDisk list operation. - */ -@Immutable -public final class EdgeMachineDiskListResult implements JsonSerializable { - /* - * The EdgeMachineDisk items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineDiskListResult class. - */ - private EdgeMachineDiskListResult() { - } - - /** - * Get the value property: The EdgeMachineDisk items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDiskListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDiskListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDiskListResult. - */ - public static EdgeMachineDiskListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDiskListResult deserializedEdgeMachineDiskListResult = new EdgeMachineDiskListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EdgeMachineDiskInner.fromJson(reader1)); - deserializedEdgeMachineDiskListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineDiskListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDiskListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskPrivilegedJobListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskPrivilegedJobListResult.java deleted file mode 100644 index 1739941f512d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskPrivilegedJobListResult.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskPrivilegedJobInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Disk Privileged Job resources. - */ -@Immutable -public final class EdgeMachineDiskPrivilegedJobListResult - implements JsonSerializable { - /* - * The EdgeMachineDiskPrivilegedJob items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineDiskPrivilegedJobListResult class. - */ - private EdgeMachineDiskPrivilegedJobListResult() { - } - - /** - * Get the value property: The EdgeMachineDiskPrivilegedJob items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDiskPrivilegedJobListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDiskPrivilegedJobListResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDiskPrivilegedJobListResult. - */ - public static EdgeMachineDiskPrivilegedJobListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDiskPrivilegedJobListResult deserializedEdgeMachineDiskPrivilegedJobListResult - = new EdgeMachineDiskPrivilegedJobListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EdgeMachineDiskPrivilegedJobInner.fromJson(reader1)); - deserializedEdgeMachineDiskPrivilegedJobListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDiskPrivilegedJobListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineJobListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineJobListResult.java deleted file mode 100644 index 0b2e111715cd..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineJobListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a EdgeMachineJob list operation. - */ -@Immutable -public final class EdgeMachineJobListResult implements JsonSerializable { - /* - * The EdgeMachineJob items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineJobListResult class. - */ - private EdgeMachineJobListResult() { - } - - /** - * Get the value property: The EdgeMachineJob items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineJobListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineJobListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineJobListResult. - */ - public static EdgeMachineJobListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineJobListResult deserializedEdgeMachineJobListResult = new EdgeMachineJobListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EdgeMachineJobInner.fromJson(reader1)); - deserializedEdgeMachineJobListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineJobListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineJobListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineListResult.java deleted file mode 100644 index 48268c11a0c7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a EdgeMachine list operation. - */ -@Immutable -public final class EdgeMachineListResult implements JsonSerializable { - /* - * The EdgeMachine items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineListResult class. - */ - private EdgeMachineListResult() { - } - - /** - * Get the value property: The EdgeMachine items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineListResult. - */ - public static EdgeMachineListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineListResult deserializedEdgeMachineListResult = new EdgeMachineListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> EdgeMachineInner.fromJson(reader1)); - deserializedEdgeMachineListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterJobListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterJobListResult.java deleted file mode 100644 index 13d31ff4624b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterJobListResult.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterJobInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a EdgeMachineNetworkAdapterJob list operation. - */ -@Immutable -public final class EdgeMachineNetworkAdapterJobListResult - implements JsonSerializable { - /* - * The EdgeMachineNetworkAdapterJob items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineNetworkAdapterJobListResult class. - */ - private EdgeMachineNetworkAdapterJobListResult() { - } - - /** - * Get the value property: The EdgeMachineNetworkAdapterJob items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineNetworkAdapterJobListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineNetworkAdapterJobListResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineNetworkAdapterJobListResult. - */ - public static EdgeMachineNetworkAdapterJobListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineNetworkAdapterJobListResult deserializedEdgeMachineNetworkAdapterJobListResult - = new EdgeMachineNetworkAdapterJobListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EdgeMachineNetworkAdapterJobInner.fromJson(reader1)); - deserializedEdgeMachineNetworkAdapterJobListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineNetworkAdapterJobListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterListResult.java deleted file mode 100644 index 00efa9a84d84..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterListResult.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a EdgeMachineNetworkAdapter list operation. - */ -@Immutable -public final class EdgeMachineNetworkAdapterListResult - implements JsonSerializable { - /* - * The EdgeMachineNetworkAdapter items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineNetworkAdapterListResult class. - */ - private EdgeMachineNetworkAdapterListResult() { - } - - /** - * Get the value property: The EdgeMachineNetworkAdapter items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineNetworkAdapterListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineNetworkAdapterListResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineNetworkAdapterListResult. - */ - public static EdgeMachineNetworkAdapterListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineNetworkAdapterListResult deserializedEdgeMachineNetworkAdapterListResult - = new EdgeMachineNetworkAdapterListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EdgeMachineNetworkAdapterInner.fromJson(reader1)); - deserializedEdgeMachineNetworkAdapterListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineNetworkAdapterListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineSecuritySettingsListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineSecuritySettingsListResult.java deleted file mode 100644 index 036de16bbe9d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineSecuritySettingsListResult.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineSecuritySettingsInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a EdgeMachineSecuritySettings list operation. - */ -@Immutable -public final class EdgeMachineSecuritySettingsListResult - implements JsonSerializable { - /* - * The EdgeMachineSecuritySettings items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineSecuritySettingsListResult class. - */ - private EdgeMachineSecuritySettingsListResult() { - } - - /** - * Get the value property: The EdgeMachineSecuritySettings items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineSecuritySettingsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineSecuritySettingsListResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineSecuritySettingsListResult. - */ - public static EdgeMachineSecuritySettingsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineSecuritySettingsListResult deserializedEdgeMachineSecuritySettingsListResult - = new EdgeMachineSecuritySettingsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EdgeMachineSecuritySettingsInner.fromJson(reader1)); - deserializedEdgeMachineSecuritySettingsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineSecuritySettingsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineSecuritySettingsListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineVolumeListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineVolumeListResult.java deleted file mode 100644 index 2114f80156a7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineVolumeListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineVolumeInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a EdgeMachineVolume list operation. - */ -@Immutable -public final class EdgeMachineVolumeListResult implements JsonSerializable { - /* - * The EdgeMachineVolume items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of EdgeMachineVolumeListResult class. - */ - private EdgeMachineVolumeListResult() { - } - - /** - * Get the value property: The EdgeMachineVolume items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineVolumeListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineVolumeListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineVolumeListResult. - */ - public static EdgeMachineVolumeListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineVolumeListResult deserializedEdgeMachineVolumeListResult = new EdgeMachineVolumeListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EdgeMachineVolumeInner.fromJson(reader1)); - deserializedEdgeMachineVolumeListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEdgeMachineVolumeListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineVolumeListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OsImageListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OsImageListResult.java deleted file mode 100644 index ba3ff4cc0a67..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OsImageListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a OsImage list operation. - */ -@Immutable -public final class OsImageListResult implements JsonSerializable { - /* - * The OsImage items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OsImageListResult class. - */ - private OsImageListResult() { - } - - /** - * Get the value property: The OsImage items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OsImageListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OsImageListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OsImageListResult. - */ - public static OsImageListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OsImageListResult deserializedOsImageListResult = new OsImageListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OsImageInner.fromJson(reader1)); - deserializedOsImageListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOsImageListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOsImageListResult; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AddServerJobServerDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AddServerJobServerDetails.java deleted file mode 100644 index d4ef38793235..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AddServerJobServerDetails.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of servers to be added to the cluster. - */ -@Fluent -public final class AddServerJobServerDetails implements JsonSerializable { - /* - * Name of server to be added to cluster. - */ - private String serverName; - - /* - * Ip address of server to be added to cluster. - */ - private String hostIpv4Address; - - /* - * Local availability zone name of server to be added to rack aware cluster. - */ - private String localAvailabilityZoneName; - - /* - * Azure resource id of machine part of cluster for which job will be triggered. - */ - private String serverResourceId; - - /** - * Creates an instance of AddServerJobServerDetails class. - */ - public AddServerJobServerDetails() { - } - - /** - * Get the serverName property: Name of server to be added to cluster. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Set the serverName property: Name of server to be added to cluster. - * - * @param serverName the serverName value to set. - * @return the AddServerJobServerDetails object itself. - */ - public AddServerJobServerDetails withServerName(String serverName) { - this.serverName = serverName; - return this; - } - - /** - * Get the hostIpv4Address property: Ip address of server to be added to cluster. - * - * @return the hostIpv4Address value. - */ - public String hostIpv4Address() { - return this.hostIpv4Address; - } - - /** - * Set the hostIpv4Address property: Ip address of server to be added to cluster. - * - * @param hostIpv4Address the hostIpv4Address value to set. - * @return the AddServerJobServerDetails object itself. - */ - public AddServerJobServerDetails withHostIpv4Address(String hostIpv4Address) { - this.hostIpv4Address = hostIpv4Address; - return this; - } - - /** - * Get the localAvailabilityZoneName property: Local availability zone name of server to be added to rack aware - * cluster. - * - * @return the localAvailabilityZoneName value. - */ - public String localAvailabilityZoneName() { - return this.localAvailabilityZoneName; - } - - /** - * Set the localAvailabilityZoneName property: Local availability zone name of server to be added to rack aware - * cluster. - * - * @param localAvailabilityZoneName the localAvailabilityZoneName value to set. - * @return the AddServerJobServerDetails object itself. - */ - public AddServerJobServerDetails withLocalAvailabilityZoneName(String localAvailabilityZoneName) { - this.localAvailabilityZoneName = localAvailabilityZoneName; - return this; - } - - /** - * Get the serverResourceId property: Azure resource id of machine part of cluster for which job will be triggered. - * - * @return the serverResourceId value. - */ - public String serverResourceId() { - return this.serverResourceId; - } - - /** - * Set the serverResourceId property: Azure resource id of machine part of cluster for which job will be triggered. - * - * @param serverResourceId the serverResourceId value to set. - * @return the AddServerJobServerDetails object itself. - */ - public AddServerJobServerDetails withServerResourceId(String serverResourceId) { - this.serverResourceId = serverResourceId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serverName", this.serverName); - jsonWriter.writeStringField("hostIpv4Address", this.hostIpv4Address); - jsonWriter.writeStringField("serverResourceId", this.serverResourceId); - jsonWriter.writeStringField("localAvailabilityZoneName", this.localAvailabilityZoneName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AddServerJobServerDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AddServerJobServerDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AddServerJobServerDetails. - */ - public static AddServerJobServerDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AddServerJobServerDetails deserializedAddServerJobServerDetails = new AddServerJobServerDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serverName".equals(fieldName)) { - deserializedAddServerJobServerDetails.serverName = reader.getString(); - } else if ("hostIpv4Address".equals(fieldName)) { - deserializedAddServerJobServerDetails.hostIpv4Address = reader.getString(); - } else if ("serverResourceId".equals(fieldName)) { - deserializedAddServerJobServerDetails.serverResourceId = reader.getString(); - } else if ("localAvailabilityZoneName".equals(fieldName)) { - deserializedAddServerJobServerDetails.localAvailabilityZoneName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAddServerJobServerDetails; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ApplyConfigurationNetworkAdapterJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ApplyConfigurationNetworkAdapterJobProperties.java deleted file mode 100644 index 72ceba97d916..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ApplyConfigurationNetworkAdapterJobProperties.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties for applying network adapter configuration. - */ -@Fluent -public final class ApplyConfigurationNetworkAdapterJobProperties extends EdgeMachineNetworkAdapterJobProperties { - /* - * Type of operation. - */ - private NetworkAdapterJobType jobType = NetworkAdapterJobType.APPLY_CONFIGURATION; - - /* - * The desired network configuration to apply. - */ - private NetworkAdapterConfiguration targetConfiguration; - - /** - * Creates an instance of ApplyConfigurationNetworkAdapterJobProperties class. - */ - public ApplyConfigurationNetworkAdapterJobProperties() { - } - - /** - * Get the jobType property: Type of operation. - * - * @return the jobType value. - */ - @Override - public NetworkAdapterJobType jobType() { - return this.jobType; - } - - /** - * Get the targetConfiguration property: The desired network configuration to apply. - * - * @return the targetConfiguration value. - */ - public NetworkAdapterConfiguration targetConfiguration() { - return this.targetConfiguration; - } - - /** - * Set the targetConfiguration property: The desired network configuration to apply. - * - * @param targetConfiguration the targetConfiguration value to set. - * @return the ApplyConfigurationNetworkAdapterJobProperties object itself. - */ - public ApplyConfigurationNetworkAdapterJobProperties - withTargetConfiguration(NetworkAdapterConfiguration targetConfiguration) { - this.targetConfiguration = targetConfiguration; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ApplyConfigurationNetworkAdapterJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeJsonField("targetConfiguration", this.targetConfiguration); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplyConfigurationNetworkAdapterJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplyConfigurationNetworkAdapterJobProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ApplyConfigurationNetworkAdapterJobProperties. - */ - public static ApplyConfigurationNetworkAdapterJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplyConfigurationNetworkAdapterJobProperties deserializedApplyConfigurationNetworkAdapterJobProperties - = new ApplyConfigurationNetworkAdapterJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties - .withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties - .withError(ManagementError.fromJson(reader)); - } else if ("reportedProperties".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties - .withReportedProperties(NetworkAdapterJobReportedProperties.fromJson(reader)); - } else if ("targetConfiguration".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties.targetConfiguration - = NetworkAdapterConfiguration.fromJson(reader); - } else if ("jobType".equals(fieldName)) { - deserializedApplyConfigurationNetworkAdapterJobProperties.jobType - = NetworkAdapterJobType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedApplyConfigurationNetworkAdapterJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Architecture.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Architecture.java deleted file mode 100644 index dc8a73ad51f4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Architecture.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Represents the CPU architecture of a machine or an OS image. - */ -public final class Architecture extends ExpandableStringEnum { - /** - * 64-bit x86 architecture. - */ - public static final Architecture AMD64 = fromString("amd64"); - - /** - * 64-bit Arm architecture. - */ - public static final Architecture ARM64 = fromString("arm64"); - - /** - * Creates a new instance of Architecture value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Architecture() { - } - - /** - * Creates or finds a Architecture from its string representation. - * - * @param name a name to look for. - * @return the corresponding Architecture. - */ - public static Architecture fromString(String name) { - return fromString(name, Architecture.class); - } - - /** - * Gets known Architecture values. - * - * @return known Architecture values. - */ - public static Collection values() { - return values(Architecture.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AuthenticationType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AuthenticationType.java deleted file mode 100644 index 79558cfc61e0..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AuthenticationType.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * WiFi authentication type. - */ -public final class AuthenticationType extends ExpandableStringEnum { - /** - * WPA2 Personal. - */ - public static final AuthenticationType WPA2_PERSONAL = fromString("WPA2-Personal"); - - /** - * WPA2 Enterprise. - */ - public static final AuthenticationType WPA2_ENTERPRISE = fromString("WPA2-Enterprise"); - - /** - * WPA3 Personal. - */ - public static final AuthenticationType WPA3_PERSONAL = fromString("WPA3-Personal"); - - /** - * WPA3 Enterprise. - */ - public static final AuthenticationType WPA3_ENTERPRISE = fromString("WPA3-Enterprise"); - - /** - * Open network. - */ - public static final AuthenticationType OPEN = fromString("Open"); - - /** - * Creates a new instance of AuthenticationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AuthenticationType() { - } - - /** - * Creates or finds a AuthenticationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AuthenticationType. - */ - public static AuthenticationType fromString(String name) { - return fromString(name, AuthenticationType.class); - } - - /** - * Gets known AuthenticationType values. - * - * @return known AuthenticationType values. - */ - public static Collection values() { - return values(AuthenticationType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java index 8c936c236370..cb8f0ce25212 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java @@ -253,13 +253,6 @@ public interface Cluster { */ ClusterPattern clusterPattern(); - /** - * Gets the sdnProperties property: Software Defined Networking Properties of the cluster. - * - * @return the sdnProperties value. - */ - ClusterSdnProperties sdnProperties(); - /** * Gets the localAvailabilityZones property: Local Availability Zone information for HCI cluster. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJob.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJob.java deleted file mode 100644 index 83ef2214f9ae..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJob.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterJobInner; - -/** - * An immutable client-side representation of ClusterJob. - */ -public interface ClusterJob { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - ClusterJobProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.ClusterJobInner object. - * - * @return the inner object. - */ - ClusterJobInner innerModel(); - - /** - * The entirety of the ClusterJob definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ClusterJob definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ClusterJob definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ClusterJob definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, clusterName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @return the next definition stage. - */ - WithCreate withExistingCluster(String resourceGroupName, String clusterName); - } - - /** - * The stage of the ClusterJob definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ClusterJob create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ClusterJob create(Context context); - } - - /** - * The stage of the ClusterJob definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(ClusterJobProperties properties); - } - } - - /** - * Begins update for the ClusterJob resource. - * - * @return the stage of resource update. - */ - ClusterJob.Update update(); - - /** - * The template for ClusterJob update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ClusterJob apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ClusterJob apply(Context context); - } - - /** - * The ClusterJob update stages. - */ - interface UpdateStages { - /** - * The stage of the ClusterJob update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(ClusterJobProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ClusterJob refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ClusterJob refresh(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobProperties.java deleted file mode 100644 index f7ad67ce7a76..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobProperties.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Cluster Job properties. - */ -@Fluent -public class ClusterJobProperties implements JsonSerializable { - /* - * Job Type to support polymorphic resource. - */ - private HciJobType jobType = HciJobType.fromString("ClusterJobProperties"); - - /* - * Deployment mode to trigger job. - */ - private DeploymentMode deploymentMode; - - /* - * Job provisioning state - */ - private ProvisioningState provisioningState; - - /* - * Unique, immutable job id. - */ - private String jobId; - - /* - * The UTC date and time at which the job started. - */ - private OffsetDateTime startTimeUtc; - - /* - * The UTC date and time at which the job completed. - */ - private OffsetDateTime endTimeUtc; - - /* - * Status of Cluster job. - */ - private JobStatus status; - - /* - * Reported properties for job - */ - private JobReportedProperties reportedProperties; - - /** - * Creates an instance of ClusterJobProperties class. - */ - public ClusterJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - public HciJobType jobType() { - return this.jobType; - } - - /** - * Get the deploymentMode property: Deployment mode to trigger job. - * - * @return the deploymentMode value. - */ - public DeploymentMode deploymentMode() { - return this.deploymentMode; - } - - /** - * Set the deploymentMode property: Deployment mode to trigger job. - * - * @param deploymentMode the deploymentMode value to set. - * @return the ClusterJobProperties object itself. - */ - public ClusterJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - this.deploymentMode = deploymentMode; - return this; - } - - /** - * Get the provisioningState property: Job provisioning state. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Job provisioning state. - * - * @param provisioningState the provisioningState value to set. - * @return the ClusterJobProperties object itself. - */ - ClusterJobProperties withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the jobId property: Unique, immutable job id. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: Unique, immutable job id. - * - * @param jobId the jobId value to set. - * @return the ClusterJobProperties object itself. - */ - ClusterJobProperties withJobId(String jobId) { - this.jobId = jobId; - return this; - } - - /** - * Get the startTimeUtc property: The UTC date and time at which the job started. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The UTC date and time at which the job started. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the ClusterJobProperties object itself. - */ - ClusterJobProperties withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the endTimeUtc property: The UTC date and time at which the job completed. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The UTC date and time at which the job completed. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the ClusterJobProperties object itself. - */ - ClusterJobProperties withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the status property: Status of Cluster job. - * - * @return the status value. - */ - public JobStatus status() { - return this.status; - } - - /** - * Set the status property: Status of Cluster job. - * - * @param status the status value to set. - * @return the ClusterJobProperties object itself. - */ - ClusterJobProperties withStatus(JobStatus status) { - this.status = status; - return this; - } - - /** - * Get the reportedProperties property: Reported properties for job. - * - * @return the reportedProperties value. - */ - public JobReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Set the reportedProperties property: Reported properties for job. - * - * @param reportedProperties the reportedProperties value to set. - * @return the ClusterJobProperties object itself. - */ - ClusterJobProperties withReportedProperties(JobReportedProperties reportedProperties) { - this.reportedProperties = reportedProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeStringField("deploymentMode", - this.deploymentMode == null ? null : this.deploymentMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterJobProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ClusterJobProperties. - */ - public static ClusterJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("jobType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("ConfigureSdnIntegration".equals(discriminatorValue)) { - return HciConfigureSdnIntegrationJobProperties.fromJson(readerToUse.reset()); - } else if ("AddServer".equals(discriminatorValue)) { - return HciAddServerJobProperties.fromJson(readerToUse.reset()); - } else if ("RepairServer".equals(discriminatorValue)) { - return HciRepairServerJobProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ClusterJobProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterJobProperties deserializedClusterJobProperties = new ClusterJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobType".equals(fieldName)) { - deserializedClusterJobProperties.jobType = HciJobType.fromString(reader.getString()); - } else if ("deploymentMode".equals(fieldName)) { - deserializedClusterJobProperties.deploymentMode = DeploymentMode.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedClusterJobProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("jobId".equals(fieldName)) { - deserializedClusterJobProperties.jobId = reader.getString(); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedClusterJobProperties.startTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedClusterJobProperties.endTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("status".equals(fieldName)) { - deserializedClusterJobProperties.status = JobStatus.fromString(reader.getString()); - } else if ("reportedProperties".equals(fieldName)) { - deserializedClusterJobProperties.reportedProperties = JobReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobs.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobs.java deleted file mode 100644 index 22799f222907..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobs.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ClusterJobs. - */ -public interface ClusterJobs { - /** - * Get a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String clusterName, String jobsName, - Context context); - - /** - * Get a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob. - */ - ClusterJob get(String resourceGroupName, String clusterName, String jobsName); - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String clusterName, String jobsName); - - /** - * Delete a ClusterJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param jobsName Name of ClusterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String clusterName, String jobsName, Context context); - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String clusterName); - - /** - * List ClusterJob resources by Clusters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Cluster Job resources for the HCI cluster as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String clusterName, Context context); - - /** - * Get a ClusterJob. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob along with {@link Response}. - */ - ClusterJob getById(String id); - - /** - * Get a ClusterJob. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ClusterJob along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a ClusterJob. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a ClusterJob. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ClusterJob resource. - * - * @param name resource name. - * @return the first stage of the new ClusterJob definition. - */ - ClusterJob.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterSdnProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterSdnProperties.java deleted file mode 100644 index f4c4ab0bc8d3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterSdnProperties.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents the Software Defined Networking (SDN) configuration state of the Azure Stack HCI cluster. - */ -@Immutable -public final class ClusterSdnProperties implements JsonSerializable { - /* - * Indicates the current Software Defined Networking (SDN) status of the resource, which may be an individual device - * or a cluster. - */ - private SdnStatus sdnStatus; - - /* - * The fully qualified domain name (FQDN) associated with the SDN deployment. This value is propagated from the - * Device Management Extension to the cluster resource. It is typically in the format `-nc.` when - * SDN is enabled. May be null or absent in unsupported or disabled states. - */ - private String sdnDomainName; - - /* - * Represents the API address for the SDN deployment. - */ - private String sdnApiAddress; - - /* - * Indicates whether Software Defined Networking (SDN) integration should be enabled or disabled for this - * deployment. - */ - private SdnIntegrationIntent sdnIntegrationIntent; - - /** - * Creates an instance of ClusterSdnProperties class. - */ - private ClusterSdnProperties() { - } - - /** - * Get the sdnStatus property: Indicates the current Software Defined Networking (SDN) status of the resource, which - * may be an individual device or a cluster. - * - * @return the sdnStatus value. - */ - public SdnStatus sdnStatus() { - return this.sdnStatus; - } - - /** - * Get the sdnDomainName property: The fully qualified domain name (FQDN) associated with the SDN deployment. This - * value is propagated from the Device Management Extension to the cluster resource. It is typically in the format - * `<sdnPrefix>-nc.<domain>` when SDN is enabled. May be null or absent in unsupported or disabled - * states. - * - * @return the sdnDomainName value. - */ - public String sdnDomainName() { - return this.sdnDomainName; - } - - /** - * Get the sdnApiAddress property: Represents the API address for the SDN deployment. - * - * @return the sdnApiAddress value. - */ - public String sdnApiAddress() { - return this.sdnApiAddress; - } - - /** - * Get the sdnIntegrationIntent property: Indicates whether Software Defined Networking (SDN) integration should be - * enabled or disabled for this deployment. - * - * @return the sdnIntegrationIntent value. - */ - public SdnIntegrationIntent sdnIntegrationIntent() { - return this.sdnIntegrationIntent; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterSdnProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterSdnProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ClusterSdnProperties. - */ - public static ClusterSdnProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterSdnProperties deserializedClusterSdnProperties = new ClusterSdnProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sdnStatus".equals(fieldName)) { - deserializedClusterSdnProperties.sdnStatus = SdnStatus.fromString(reader.getString()); - } else if ("sdnDomainName".equals(fieldName)) { - deserializedClusterSdnProperties.sdnDomainName = reader.getString(); - } else if ("sdnApiAddress".equals(fieldName)) { - deserializedClusterSdnProperties.sdnApiAddress = reader.getString(); - } else if ("sdnIntegrationIntent".equals(fieldName)) { - deserializedClusterSdnProperties.sdnIntegrationIntent - = SdnIntegrationIntent.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterSdnProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectionState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectionState.java deleted file mode 100644 index 15a45536e337..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectionState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * WiFi connection state. - */ -public final class ConnectionState extends ExpandableStringEnum { - /** - * WiFi is not configured. - */ - public static final ConnectionState NOT_CONFIGURED = fromString("NotConfigured"); - - /** - * WiFi is connected. - */ - public static final ConnectionState CONNECTED = fromString("Connected"); - - /** - * WiFi is disconnected. - */ - public static final ConnectionState DISCONNECTED = fromString("Disconnected"); - - /** - * WiFi is connecting. - */ - public static final ConnectionState CONNECTING = fromString("Connecting"); - - /** - * WiFi is disconnecting. - */ - public static final ConnectionState DISCONNECTING = fromString("Disconnecting"); - - /** - * WiFi authentication failed. - */ - public static final ConnectionState AUTHENTICATION_FAILED = fromString("AuthenticationFailed"); - - /** - * Creates a new instance of ConnectionState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectionState() { - } - - /** - * Creates or finds a ConnectionState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectionState. - */ - public static ConnectionState fromString(String name) { - return fromString(name, ConnectionState.class); - } - - /** - * Gets known ConnectionState values. - * - * @return known ConnectionState values. - */ - public static Collection values() { - return values(ConnectionState.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/CreateVolumeJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/CreateVolumeJobProperties.java deleted file mode 100644 index c2e79d6de927..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/CreateVolumeJobProperties.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties for creating a volume on a disk. - */ -@Fluent -public final class CreateVolumeJobProperties extends EdgeMachineDiskJobProperties { - /* - * Job Type to support polymorphic resource. - */ - private DiskJobType jobType = DiskJobType.CREATE_VOLUME; - - /* - * Size of the volume to create in bytes. - */ - private String sizeInBytes; - - /* - * Absolute path where the volume should be mounted. - */ - private String path; - - /* - * File system type to format the volume with. - */ - private DiskFileSystemType fileSystem; - - /* - * ARM resource ID of the created volume. - */ - private String createdVolumeId; - - /** - * Creates an instance of CreateVolumeJobProperties class. - */ - public CreateVolumeJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public DiskJobType jobType() { - return this.jobType; - } - - /** - * Get the sizeInBytes property: Size of the volume to create in bytes. - * - * @return the sizeInBytes value. - */ - public String sizeInBytes() { - return this.sizeInBytes; - } - - /** - * Set the sizeInBytes property: Size of the volume to create in bytes. - * - * @param sizeInBytes the sizeInBytes value to set. - * @return the CreateVolumeJobProperties object itself. - */ - public CreateVolumeJobProperties withSizeInBytes(String sizeInBytes) { - this.sizeInBytes = sizeInBytes; - return this; - } - - /** - * Get the path property: Absolute path where the volume should be mounted. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Absolute path where the volume should be mounted. - * - * @param path the path value to set. - * @return the CreateVolumeJobProperties object itself. - */ - public CreateVolumeJobProperties withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the fileSystem property: File system type to format the volume with. - * - * @return the fileSystem value. - */ - public DiskFileSystemType fileSystem() { - return this.fileSystem; - } - - /** - * Set the fileSystem property: File system type to format the volume with. - * - * @param fileSystem the fileSystem value to set. - * @return the CreateVolumeJobProperties object itself. - */ - public CreateVolumeJobProperties withFileSystem(DiskFileSystemType fileSystem) { - this.fileSystem = fileSystem; - return this; - } - - /** - * Get the createdVolumeId property: ARM resource ID of the created volume. - * - * @return the createdVolumeId value. - */ - public String createdVolumeId() { - return this.createdVolumeId; - } - - /** - * {@inheritDoc} - */ - @Override - public CreateVolumeJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeStringField("sizeInBytes", this.sizeInBytes); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeStringField("fileSystem", this.fileSystem == null ? null : this.fileSystem.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateVolumeJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateVolumeJobProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CreateVolumeJobProperties. - */ - public static CreateVolumeJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateVolumeJobProperties deserializedCreateVolumeJobProperties = new CreateVolumeJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedCreateVolumeJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedCreateVolumeJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedCreateVolumeJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedCreateVolumeJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedCreateVolumeJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedCreateVolumeJobProperties.withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedCreateVolumeJobProperties.withError(ManagementError.fromJson(reader)); - } else if ("reportedProperties".equals(fieldName)) { - deserializedCreateVolumeJobProperties - .withReportedProperties(DiskJobReportedProperties.fromJson(reader)); - } else if ("sizeInBytes".equals(fieldName)) { - deserializedCreateVolumeJobProperties.sizeInBytes = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedCreateVolumeJobProperties.path = reader.getString(); - } else if ("jobType".equals(fieldName)) { - deserializedCreateVolumeJobProperties.jobType = DiskJobType.fromString(reader.getString()); - } else if ("fileSystem".equals(fieldName)) { - deserializedCreateVolumeJobProperties.fileSystem - = DiskFileSystemType.fromString(reader.getString()); - } else if ("createdVolumeId".equals(fieldName)) { - deserializedCreateVolumeJobProperties.createdVolumeId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateVolumeJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeleteVolumeJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeleteVolumeJobProperties.java deleted file mode 100644 index 3488d7b3cd94..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeleteVolumeJobProperties.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties for deleting a volume from a disk. - */ -@Fluent -public final class DeleteVolumeJobProperties extends EdgeMachineDiskPrivilegedJobProperties { - /* - * Privileged Job Type to support polymorphic resource. - */ - private PrivilegedJobType jobType = PrivilegedJobType.DELETE_VOLUME; - - /* - * The mount path of the volume to delete. - */ - private String volumePath; - - /* - * Confirmation flag that must be set to true to proceed with deletion. - */ - private Boolean confirmDeletion; - - /** - * Creates an instance of DeleteVolumeJobProperties class. - */ - public DeleteVolumeJobProperties() { - } - - /** - * Get the jobType property: Privileged Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public PrivilegedJobType jobType() { - return this.jobType; - } - - /** - * Get the volumePath property: The mount path of the volume to delete. - * - * @return the volumePath value. - */ - public String volumePath() { - return this.volumePath; - } - - /** - * Set the volumePath property: The mount path of the volume to delete. - * - * @param volumePath the volumePath value to set. - * @return the DeleteVolumeJobProperties object itself. - */ - public DeleteVolumeJobProperties withVolumePath(String volumePath) { - this.volumePath = volumePath; - return this; - } - - /** - * Get the confirmDeletion property: Confirmation flag that must be set to true to proceed with deletion. - * - * @return the confirmDeletion value. - */ - public Boolean confirmDeletion() { - return this.confirmDeletion; - } - - /** - * Set the confirmDeletion property: Confirmation flag that must be set to true to proceed with deletion. - * - * @param confirmDeletion the confirmDeletion value to set. - * @return the DeleteVolumeJobProperties object itself. - */ - public DeleteVolumeJobProperties withConfirmDeletion(Boolean confirmDeletion) { - this.confirmDeletion = confirmDeletion; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DeleteVolumeJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeStringField("volumePath", this.volumePath); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeBooleanField("confirmDeletion", this.confirmDeletion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DeleteVolumeJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DeleteVolumeJobProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DeleteVolumeJobProperties. - */ - public static DeleteVolumeJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DeleteVolumeJobProperties deserializedDeleteVolumeJobProperties = new DeleteVolumeJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedDeleteVolumeJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedDeleteVolumeJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedDeleteVolumeJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedDeleteVolumeJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedDeleteVolumeJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedDeleteVolumeJobProperties.withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedDeleteVolumeJobProperties.withError(ManagementError.fromJson(reader)); - } else if ("reportedProperties".equals(fieldName)) { - deserializedDeleteVolumeJobProperties - .withReportedProperties(DiskJobReportedProperties.fromJson(reader)); - } else if ("volumePath".equals(fieldName)) { - deserializedDeleteVolumeJobProperties.volumePath = reader.getString(); - } else if ("jobType".equals(fieldName)) { - deserializedDeleteVolumeJobProperties.jobType = PrivilegedJobType.fromString(reader.getString()); - } else if ("confirmDeletion".equals(fieldName)) { - deserializedDeleteVolumeJobProperties.confirmDeletion = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedDeleteVolumeJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java index a2d50e23ed1d..c0391434d095 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.azurestackhci.models; import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -58,26 +57,6 @@ public final class DeploymentStep implements JsonSerializable { */ private List exception; - /* - * error details. - */ - private ManagementError error; - - /* - * The progress percentage of the step. - */ - private Integer percentComplete; - - /* - * Additional metadata associated with the step. - */ - private List additionalData; - - /* - * Recommended steps to resolve failures in this step. - */ - private List recommendedSteps; - /** * Creates an instance of DeploymentStep class. */ @@ -156,42 +135,6 @@ public List exception() { return this.exception; } - /** - * Get the error property: error details. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Get the percentComplete property: The progress percentage of the step. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the additionalData property: Additional metadata associated with the step. - * - * @return the additionalData value. - */ - public List additionalData() { - return this.additionalData; - } - - /** - * Get the recommendedSteps property: Recommended steps to resolve failures in this step. - * - * @return the recommendedSteps value. - */ - public List recommendedSteps() { - return this.recommendedSteps; - } - /** * {@inheritDoc} */ @@ -234,16 +177,6 @@ public static DeploymentStep fromJson(JsonReader jsonReader) throws IOException } else if ("exception".equals(fieldName)) { List exception = reader.readArray(reader1 -> reader1.getString()); deserializedDeploymentStep.exception = exception; - } else if ("error".equals(fieldName)) { - deserializedDeploymentStep.error = ManagementError.fromJson(reader); - } else if ("percentComplete".equals(fieldName)) { - deserializedDeploymentStep.percentComplete = reader.getNullable(JsonReader::getInt); - } else if ("additionalData".equals(fieldName)) { - List additionalData = reader.readArray(reader1 -> Metadata.fromJson(reader1)); - deserializedDeploymentStep.additionalData = additionalData; - } else if ("recommendedSteps".equals(fieldName)) { - List recommendedSteps = reader.readArray(reader1 -> reader1.getString()); - deserializedDeploymentStep.recommendedSteps = recommendedSteps; } else { reader.skipChildren(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskActionStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskActionStatus.java deleted file mode 100644 index adaa016accfe..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskActionStatus.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The action plan deployment status for Disk Job. - */ -@Immutable -public final class DiskActionStatus implements JsonSerializable { - /* - * Status of ECE action Disk Job. - */ - private String status; - - /* - * List of steps of Disk Job. - */ - private List steps; - - /** - * Creates an instance of DiskActionStatus class. - */ - private DiskActionStatus() { - } - - /** - * Get the status property: Status of ECE action Disk Job. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the steps property: List of steps of Disk Job. - * - * @return the steps value. - */ - public List steps() { - return this.steps; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskActionStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskActionStatus if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskActionStatus. - */ - public static DiskActionStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskActionStatus deserializedDiskActionStatus = new DiskActionStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedDiskActionStatus.status = reader.getString(); - } else if ("steps".equals(fieldName)) { - List steps = reader.readArray(reader1 -> DiskDeploymentStep.fromJson(reader1)); - deserializedDiskActionStatus.steps = steps; - } else { - reader.skipChildren(); - } - } - - return deserializedDiskActionStatus; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskConfiguration.java deleted file mode 100644 index 62e1493da5de..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskConfiguration.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Desired configuration for a disk. - */ -@Fluent -public final class DiskConfiguration implements JsonSerializable { - /* - * List of desired volumes on this disk. - */ - private List volumes; - - /** - * Creates an instance of DiskConfiguration class. - */ - public DiskConfiguration() { - } - - /** - * Get the volumes property: List of desired volumes on this disk. - * - * @return the volumes value. - */ - public List volumes() { - return this.volumes; - } - - /** - * Set the volumes property: List of desired volumes on this disk. - * - * @param volumes the volumes value to set. - * @return the DiskConfiguration object itself. - */ - public DiskConfiguration withVolumes(List volumes) { - this.volumes = volumes; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("volumes", this.volumes, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskConfiguration. - */ - public static DiskConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskConfiguration deserializedDiskConfiguration = new DiskConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("volumes".equals(fieldName)) { - List volumes - = reader.readArray(reader1 -> DiskVolumeConfiguration.fromJson(reader1)); - deserializedDiskConfiguration.volumes = volumes; - } else { - reader.skipChildren(); - } - } - - return deserializedDiskConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskDeploymentStep.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskDeploymentStep.java deleted file mode 100644 index 1e61db125f7b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskDeploymentStep.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The Step of Disk Job. - */ -@Immutable -public final class DiskDeploymentStep implements JsonSerializable { - /* - * Name of step. - */ - private String name; - - /* - * Description of step. - */ - private String description; - - /* - * FullStepIndex of step. - */ - private String fullStepIndex; - - /* - * Start time of step. - */ - private String startTimeUtc; - - /* - * End time of step. - */ - private String endTimeUtc; - - /* - * Status of step (Error, Success, InProgress). - */ - private String status; - - /* - * List of nested steps. - */ - private List steps; - - /* - * List of exceptions. - */ - private List exception; - - /** - * Creates an instance of DiskDeploymentStep class. - */ - private DiskDeploymentStep() { - } - - /** - * Get the name property: Name of step. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the description property: Description of step. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the fullStepIndex property: FullStepIndex of step. - * - * @return the fullStepIndex value. - */ - public String fullStepIndex() { - return this.fullStepIndex; - } - - /** - * Get the startTimeUtc property: Start time of step. - * - * @return the startTimeUtc value. - */ - public String startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Get the endTimeUtc property: End time of step. - * - * @return the endTimeUtc value. - */ - public String endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Get the status property: Status of step (Error, Success, InProgress). - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the steps property: List of nested steps. - * - * @return the steps value. - */ - public List steps() { - return this.steps; - } - - /** - * Get the exception property: List of exceptions. - * - * @return the exception value. - */ - public List exception() { - return this.exception; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskDeploymentStep from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskDeploymentStep if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskDeploymentStep. - */ - public static DiskDeploymentStep fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskDeploymentStep deserializedDiskDeploymentStep = new DiskDeploymentStep(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDiskDeploymentStep.name = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedDiskDeploymentStep.description = reader.getString(); - } else if ("fullStepIndex".equals(fieldName)) { - deserializedDiskDeploymentStep.fullStepIndex = reader.getString(); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedDiskDeploymentStep.startTimeUtc = reader.getString(); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedDiskDeploymentStep.endTimeUtc = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedDiskDeploymentStep.status = reader.getString(); - } else if ("steps".equals(fieldName)) { - List steps = reader.readArray(reader1 -> DiskDeploymentStep.fromJson(reader1)); - deserializedDiskDeploymentStep.steps = steps; - } else if ("exception".equals(fieldName)) { - List exception = reader.readArray(reader1 -> reader1.getString()); - deserializedDiskDeploymentStep.exception = exception; - } else { - reader.skipChildren(); - } - } - - return deserializedDiskDeploymentStep; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskFileSystemType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskFileSystemType.java deleted file mode 100644 index 5fc97a237583..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskFileSystemType.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * File system types supported for volumes. - */ -public final class DiskFileSystemType extends ExpandableStringEnum { - /** - * ext4 file system (Linux). - */ - public static final DiskFileSystemType EXT4 = fromString("ext4"); - - /** - * xfs file system (Linux). - */ - public static final DiskFileSystemType XFS = fromString("xfs"); - - /** - * NTFS file system (Windows). - */ - public static final DiskFileSystemType NTFS = fromString("NTFS"); - - /** - * ReFS file system (Windows). - */ - public static final DiskFileSystemType RE_FS = fromString("ReFS"); - - /** - * vfat file system (Linux/cross-platform). - */ - public static final DiskFileSystemType VFAT = fromString("vfat"); - - /** - * FAT32 file system. - */ - public static final DiskFileSystemType FAT32 = fromString("fat32"); - - /** - * FAT file system. - */ - public static final DiskFileSystemType FAT = fromString("fat"); - - /** - * Creates a new instance of DiskFileSystemType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskFileSystemType() { - } - - /** - * Creates or finds a DiskFileSystemType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskFileSystemType. - */ - public static DiskFileSystemType fromString(String name) { - return fromString(name, DiskFileSystemType.class); - } - - /** - * Gets known DiskFileSystemType values. - * - * @return known DiskFileSystemType values. - */ - public static Collection values() { - return values(DiskFileSystemType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobReportedProperties.java deleted file mode 100644 index 7daf113fa426..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobReportedProperties.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reported properties of a disk job. - */ -@Immutable -public final class DiskJobReportedProperties implements JsonSerializable { - /* - * Percentage of job completion. - */ - private Integer percentComplete; - - /* - * Validation status of Disk Job. - */ - private DiskActionStatus validationStatus; - - /* - * Deployment status of Disk Job. - */ - private DiskActionStatus deploymentStatus; - - /** - * Creates an instance of DiskJobReportedProperties class. - */ - private DiskJobReportedProperties() { - } - - /** - * Get the percentComplete property: Percentage of job completion. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the validationStatus property: Validation status of Disk Job. - * - * @return the validationStatus value. - */ - public DiskActionStatus validationStatus() { - return this.validationStatus; - } - - /** - * Get the deploymentStatus property: Deployment status of Disk Job. - * - * @return the deploymentStatus value. - */ - public DiskActionStatus deploymentStatus() { - return this.deploymentStatus; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskJobReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskJobReportedProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskJobReportedProperties. - */ - public static DiskJobReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskJobReportedProperties deserializedDiskJobReportedProperties = new DiskJobReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("percentComplete".equals(fieldName)) { - deserializedDiskJobReportedProperties.percentComplete = reader.getNullable(JsonReader::getInt); - } else if ("validationStatus".equals(fieldName)) { - deserializedDiskJobReportedProperties.validationStatus = DiskActionStatus.fromJson(reader); - } else if ("deploymentStatus".equals(fieldName)) { - deserializedDiskJobReportedProperties.deploymentStatus = DiskActionStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskJobReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobType.java deleted file mode 100644 index 2561487f7c7b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Job Type supported for disk operations. - */ -public final class DiskJobType extends ExpandableStringEnum { - /** - * Job to create a volume on the disk. - */ - public static final DiskJobType CREATE_VOLUME = fromString("CreateVolume"); - - /** - * Job to resolve configuration drift between desired and reported state. - */ - public static final DiskJobType SYNC_CONFIGURATION = fromString("SyncConfiguration"); - - /** - * Creates a new instance of DiskJobType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskJobType() { - } - - /** - * Creates or finds a DiskJobType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskJobType. - */ - public static DiskJobType fromString(String name) { - return fromString(name, DiskJobType.class); - } - - /** - * Gets known DiskJobType values. - * - * @return known DiskJobType values. - */ - public static Collection values() { - return values(DiskJobType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskReportedProperties.java deleted file mode 100644 index fa6e8c511e3c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskReportedProperties.java +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The actual state of the disk as reported by the device. - */ -@Immutable -public final class DiskReportedProperties implements JsonSerializable { - /* - * The actual disk name as reported by the OS. - */ - private String diskName; - - /* - * Model number of the hardware. - */ - private String model; - - /* - * The manufacturer of the disk. - */ - private String manufacturer; - - /* - * Indicates whether the disk manufacturer is supported for the validated solution recipe ring. Defaults to true. - * Set to false when the SAN vendor is not in the allowed vendor list for the current ring. - */ - private Boolean isSupported; - - /* - * Serial number. - */ - private String serialNumber; - - /* - * Firmware version. - */ - private String firmwareVersion; - - /* - * Size in bytes. - */ - private String sizeInBytes; - - /* - * Storage type of the disk. - */ - private DiskStorageType storageType; - - /* - * Type of the disk. - */ - private DiskType diskType; - - /* - * Bus location of the disk. - */ - private String busLocation; - - /* - * Unallocated space on the disk in bytes. - */ - private String unallocatedSizeInBytes; - - /* - * Current state of the disk. - */ - private DiskState state; - - /* - * List of volumes on this disk. - */ - private List volumes; - - /** - * Creates an instance of DiskReportedProperties class. - */ - private DiskReportedProperties() { - } - - /** - * Get the diskName property: The actual disk name as reported by the OS. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Get the model property: Model number of the hardware. - * - * @return the model value. - */ - public String model() { - return this.model; - } - - /** - * Get the manufacturer property: The manufacturer of the disk. - * - * @return the manufacturer value. - */ - public String manufacturer() { - return this.manufacturer; - } - - /** - * Get the isSupported property: Indicates whether the disk manufacturer is supported for the validated solution - * recipe ring. Defaults to true. Set to false when the SAN vendor is not in the allowed vendor list for the current - * ring. - * - * @return the isSupported value. - */ - public Boolean isSupported() { - return this.isSupported; - } - - /** - * Get the serialNumber property: Serial number. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Get the firmwareVersion property: Firmware version. - * - * @return the firmwareVersion value. - */ - public String firmwareVersion() { - return this.firmwareVersion; - } - - /** - * Get the sizeInBytes property: Size in bytes. - * - * @return the sizeInBytes value. - */ - public String sizeInBytes() { - return this.sizeInBytes; - } - - /** - * Get the storageType property: Storage type of the disk. - * - * @return the storageType value. - */ - public DiskStorageType storageType() { - return this.storageType; - } - - /** - * Get the diskType property: Type of the disk. - * - * @return the diskType value. - */ - public DiskType diskType() { - return this.diskType; - } - - /** - * Get the busLocation property: Bus location of the disk. - * - * @return the busLocation value. - */ - public String busLocation() { - return this.busLocation; - } - - /** - * Get the unallocatedSizeInBytes property: Unallocated space on the disk in bytes. - * - * @return the unallocatedSizeInBytes value. - */ - public String unallocatedSizeInBytes() { - return this.unallocatedSizeInBytes; - } - - /** - * Get the state property: Current state of the disk. - * - * @return the state value. - */ - public DiskState state() { - return this.state; - } - - /** - * Get the volumes property: List of volumes on this disk. - * - * @return the volumes value. - */ - public List volumes() { - return this.volumes; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskReportedProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskReportedProperties. - */ - public static DiskReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskReportedProperties deserializedDiskReportedProperties = new DiskReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskName".equals(fieldName)) { - deserializedDiskReportedProperties.diskName = reader.getString(); - } else if ("model".equals(fieldName)) { - deserializedDiskReportedProperties.model = reader.getString(); - } else if ("manufacturer".equals(fieldName)) { - deserializedDiskReportedProperties.manufacturer = reader.getString(); - } else if ("isSupported".equals(fieldName)) { - deserializedDiskReportedProperties.isSupported = reader.getNullable(JsonReader::getBoolean); - } else if ("serialNumber".equals(fieldName)) { - deserializedDiskReportedProperties.serialNumber = reader.getString(); - } else if ("firmwareVersion".equals(fieldName)) { - deserializedDiskReportedProperties.firmwareVersion = reader.getString(); - } else if ("sizeInBytes".equals(fieldName)) { - deserializedDiskReportedProperties.sizeInBytes = reader.getString(); - } else if ("storageType".equals(fieldName)) { - deserializedDiskReportedProperties.storageType = DiskStorageType.fromString(reader.getString()); - } else if ("diskType".equals(fieldName)) { - deserializedDiskReportedProperties.diskType = DiskType.fromString(reader.getString()); - } else if ("busLocation".equals(fieldName)) { - deserializedDiskReportedProperties.busLocation = reader.getString(); - } else if ("unallocatedSizeInBytes".equals(fieldName)) { - deserializedDiskReportedProperties.unallocatedSizeInBytes = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedDiskReportedProperties.state = DiskState.fromString(reader.getString()); - } else if ("volumes".equals(fieldName)) { - List volumes - = reader.readArray(reader1 -> DiskVolumeReportedProperties.fromJson(reader1)); - deserializedDiskReportedProperties.volumes = volumes; - } else { - reader.skipChildren(); - } - } - - return deserializedDiskReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskState.java deleted file mode 100644 index 41db4feff6dc..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskState.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * State of the disk. - */ -public final class DiskState extends ExpandableStringEnum { - /** - * Disk is online and available. - */ - public static final DiskState ONLINE = fromString("Online"); - - /** - * Disk is offline. - */ - public static final DiskState OFFLINE = fromString("Offline"); - - /** - * Disk has failed. - */ - public static final DiskState FAILED = fromString("Failed"); - - /** - * Disk is missing. - */ - public static final DiskState MISSING = fromString("Missing"); - - /** - * Disk state is unknown. - */ - public static final DiskState UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of DiskState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskState() { - } - - /** - * Creates or finds a DiskState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskState. - */ - public static DiskState fromString(String name) { - return fromString(name, DiskState.class); - } - - /** - * Gets known DiskState values. - * - * @return known DiskState values. - */ - public static Collection values() { - return values(DiskState.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskStorageType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskStorageType.java deleted file mode 100644 index cec4c367711b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskStorageType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Storage type of the disk. - */ -public final class DiskStorageType extends ExpandableStringEnum { - /** - * SAN storage. - */ - public static final DiskStorageType SAN = fromString("SAN"); - - /** - * Storage Spaces Direct storage. - */ - public static final DiskStorageType S2D = fromString("S2D"); - - /** - * Creates a new instance of DiskStorageType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskStorageType() { - } - - /** - * Creates or finds a DiskStorageType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskStorageType. - */ - public static DiskStorageType fromString(String name) { - return fromString(name, DiskStorageType.class); - } - - /** - * Gets known DiskStorageType values. - * - * @return known DiskStorageType values. - */ - public static Collection values() { - return values(DiskStorageType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskType.java deleted file mode 100644 index c2ddff77e956..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskType.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of disk. - */ -public final class DiskType extends ExpandableStringEnum { - /** - * Unknown disk type. - */ - public static final DiskType UNKNOWN = fromString("Unknown"); - - /** - * Storage Class Memory disk. - */ - public static final DiskType SCM = fromString("SCM"); - - /** - * NVMe disk. - */ - public static final DiskType NVME = fromString("NVMe"); - - /** - * SATA disk. - */ - public static final DiskType SATA = fromString("SATA"); - - /** - * Solid State Drive. - */ - public static final DiskType SSD = fromString("SSD"); - - /** - * Hard Disk Drive. - */ - public static final DiskType HDD = fromString("HDD"); - - /** - * Virtual disk. - */ - public static final DiskType VIRTUAL = fromString("Virtual"); - - /** - * Other disk type. - */ - public static final DiskType OTHER = fromString("Other"); - - /** - * Creates a new instance of DiskType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskType() { - } - - /** - * Creates or finds a DiskType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskType. - */ - public static DiskType fromString(String name) { - return fromString(name, DiskType.class); - } - - /** - * Gets known DiskType values. - * - * @return known DiskType values. - */ - public static Collection values() { - return values(DiskType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeConfiguration.java deleted file mode 100644 index 6843402fdd73..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeConfiguration.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration for a volume on a disk. - */ -@Fluent -public final class DiskVolumeConfiguration implements JsonSerializable { - /* - * Size of the volume in bytes. - */ - private String sizeInBytes; - - /* - * Mount path for the volume (e.g., /data or D:\data). - */ - private String path; - - /* - * File system type to format the volume with. - */ - private DiskFileSystemType fileSystem; - - /** - * Creates an instance of DiskVolumeConfiguration class. - */ - public DiskVolumeConfiguration() { - } - - /** - * Get the sizeInBytes property: Size of the volume in bytes. - * - * @return the sizeInBytes value. - */ - public String sizeInBytes() { - return this.sizeInBytes; - } - - /** - * Set the sizeInBytes property: Size of the volume in bytes. - * - * @param sizeInBytes the sizeInBytes value to set. - * @return the DiskVolumeConfiguration object itself. - */ - public DiskVolumeConfiguration withSizeInBytes(String sizeInBytes) { - this.sizeInBytes = sizeInBytes; - return this; - } - - /** - * Get the path property: Mount path for the volume (e.g., /data or D:\data). - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Mount path for the volume (e.g., /data or D:\data). - * - * @param path the path value to set. - * @return the DiskVolumeConfiguration object itself. - */ - public DiskVolumeConfiguration withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the fileSystem property: File system type to format the volume with. - * - * @return the fileSystem value. - */ - public DiskFileSystemType fileSystem() { - return this.fileSystem; - } - - /** - * Set the fileSystem property: File system type to format the volume with. - * - * @param fileSystem the fileSystem value to set. - * @return the DiskVolumeConfiguration object itself. - */ - public DiskVolumeConfiguration withFileSystem(DiskFileSystemType fileSystem) { - this.fileSystem = fileSystem; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sizeInBytes", this.sizeInBytes); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeStringField("fileSystem", this.fileSystem == null ? null : this.fileSystem.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskVolumeConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskVolumeConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DiskVolumeConfiguration. - */ - public static DiskVolumeConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskVolumeConfiguration deserializedDiskVolumeConfiguration = new DiskVolumeConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sizeInBytes".equals(fieldName)) { - deserializedDiskVolumeConfiguration.sizeInBytes = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedDiskVolumeConfiguration.path = reader.getString(); - } else if ("fileSystem".equals(fieldName)) { - deserializedDiskVolumeConfiguration.fileSystem = DiskFileSystemType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskVolumeConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeReportedProperties.java deleted file mode 100644 index c430c258a76a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeReportedProperties.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reported properties of a volume on the disk. - */ -@Immutable -public final class DiskVolumeReportedProperties implements JsonSerializable { - /* - * Size of the volume in bytes. - */ - private String sizeInBytes; - - /* - * Mount path for the volume. - */ - private String path; - - /* - * File system type. - */ - private String fileSystem; - - /* - * Unique identifier for the partition. - */ - private String partitionId; - - /* - * Partition number. - */ - private Integer partitionNumber; - - /* - * Byte offset of the partition start. - */ - private Long offsetInBytes; - - /* - * Name of the volume. - */ - private String name; - - /* - * Indicates if this volume is a boot volume. - */ - private Boolean isBoot; - - /* - * Available space on the volume in bytes. - */ - private String sizeRemainingInBytes; - - /* - * Resource name of the volume. - */ - private String resourceName; - - /** - * Creates an instance of DiskVolumeReportedProperties class. - */ - private DiskVolumeReportedProperties() { - } - - /** - * Get the sizeInBytes property: Size of the volume in bytes. - * - * @return the sizeInBytes value. - */ - public String sizeInBytes() { - return this.sizeInBytes; - } - - /** - * Get the path property: Mount path for the volume. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Get the fileSystem property: File system type. - * - * @return the fileSystem value. - */ - public String fileSystem() { - return this.fileSystem; - } - - /** - * Get the partitionId property: Unique identifier for the partition. - * - * @return the partitionId value. - */ - public String partitionId() { - return this.partitionId; - } - - /** - * Get the partitionNumber property: Partition number. - * - * @return the partitionNumber value. - */ - public Integer partitionNumber() { - return this.partitionNumber; - } - - /** - * Get the offsetInBytes property: Byte offset of the partition start. - * - * @return the offsetInBytes value. - */ - public Long offsetInBytes() { - return this.offsetInBytes; - } - - /** - * Get the name property: Name of the volume. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isBoot property: Indicates if this volume is a boot volume. - * - * @return the isBoot value. - */ - public Boolean isBoot() { - return this.isBoot; - } - - /** - * Get the sizeRemainingInBytes property: Available space on the volume in bytes. - * - * @return the sizeRemainingInBytes value. - */ - public String sizeRemainingInBytes() { - return this.sizeRemainingInBytes; - } - - /** - * Get the resourceName property: Resource name of the volume. - * - * @return the resourceName value. - */ - public String resourceName() { - return this.resourceName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskVolumeReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskVolumeReportedProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskVolumeReportedProperties. - */ - public static DiskVolumeReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskVolumeReportedProperties deserializedDiskVolumeReportedProperties = new DiskVolumeReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sizeInBytes".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.sizeInBytes = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.path = reader.getString(); - } else if ("fileSystem".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.fileSystem = reader.getString(); - } else if ("partitionId".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.partitionId = reader.getString(); - } else if ("partitionNumber".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.partitionNumber = reader.getNullable(JsonReader::getInt); - } else if ("offsetInBytes".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.offsetInBytes = reader.getNullable(JsonReader::getLong); - } else if ("name".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.name = reader.getString(); - } else if ("isBoot".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.isBoot = reader.getNullable(JsonReader::getBoolean); - } else if ("sizeRemainingInBytes".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.sizeRemainingInBytes = reader.getString(); - } else if ("resourceName".equals(fieldName)) { - deserializedDiskVolumeReportedProperties.resourceName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskVolumeReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsJobProperties.java deleted file mode 100644 index b2166b29d762..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsJobProperties.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents the properties of Download Os job. - */ -@Fluent -public final class DownloadOsJobProperties extends EdgeMachineJobProperties { - /* - * Job Type to support polymorphic resource. - */ - private EdgeMachineJobType jobType = EdgeMachineJobType.DOWNLOAD_OS; - - /* - * Download OS request. - */ - private DownloadRequest downloadRequest; - - /* - * Reported Properties for Download Os job - */ - private ProvisionOsReportedProperties reportedProperties; - - /** - * Creates an instance of DownloadOsJobProperties class. - */ - public DownloadOsJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public EdgeMachineJobType jobType() { - return this.jobType; - } - - /** - * Get the downloadRequest property: Download OS request. - * - * @return the downloadRequest value. - */ - public DownloadRequest downloadRequest() { - return this.downloadRequest; - } - - /** - * Set the downloadRequest property: Download OS request. - * - * @param downloadRequest the downloadRequest value to set. - * @return the DownloadOsJobProperties object itself. - */ - public DownloadOsJobProperties withDownloadRequest(DownloadRequest downloadRequest) { - this.downloadRequest = downloadRequest; - return this; - } - - /** - * Get the reportedProperties property: Reported Properties for Download Os job. - * - * @return the reportedProperties value. - */ - public ProvisionOsReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Set the reportedProperties property: Reported Properties for Download Os job. - * - * @param reportedProperties the reportedProperties value to set. - * @return the DownloadOsJobProperties object itself. - */ - public DownloadOsJobProperties withReportedProperties(ProvisionOsReportedProperties reportedProperties) { - this.reportedProperties = reportedProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DownloadOsJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeJsonField("downloadRequest", this.downloadRequest); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("reportedProperties", this.reportedProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DownloadOsJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DownloadOsJobProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DownloadOsJobProperties. - */ - public static DownloadOsJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DownloadOsJobProperties deserializedDownloadOsJobProperties = new DownloadOsJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedDownloadOsJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedDownloadOsJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedDownloadOsJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedDownloadOsJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedDownloadOsJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedDownloadOsJobProperties.withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedDownloadOsJobProperties.withError(ManagementError.fromJson(reader)); - } else if ("downloadRequest".equals(fieldName)) { - deserializedDownloadOsJobProperties.downloadRequest = DownloadRequest.fromJson(reader); - } else if ("jobType".equals(fieldName)) { - deserializedDownloadOsJobProperties.jobType = EdgeMachineJobType.fromString(reader.getString()); - } else if ("reportedProperties".equals(fieldName)) { - deserializedDownloadOsJobProperties.reportedProperties - = ProvisionOsReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDownloadOsJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsProfile.java deleted file mode 100644 index 506a2d3a8655..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsProfile.java +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Operating system profile. - */ -@Fluent -public final class DownloadOsProfile implements JsonSerializable { - /* - * Name of the operating system. - */ - private String osName; - - /* - * Type of the operating system. - */ - private String osType; - - /* - * Version of the operating system. - */ - private String osVersion; - - /* - * Location of the operating system image. - */ - private String osImageLocation; - - /* - * Validated Solution Recipe version to be used for the job - */ - private String vsrVersion; - - /* - * Hash of the OS package downloaded - */ - private String imageHash; - - /* - * GPG Public Key used for package verification - */ - private String gpgPubKey; - - /** - * Creates an instance of DownloadOsProfile class. - */ - public DownloadOsProfile() { - } - - /** - * Get the osName property: Name of the operating system. - * - * @return the osName value. - */ - public String osName() { - return this.osName; - } - - /** - * Set the osName property: Name of the operating system. - * - * @param osName the osName value to set. - * @return the DownloadOsProfile object itself. - */ - public DownloadOsProfile withOsName(String osName) { - this.osName = osName; - return this; - } - - /** - * Get the osType property: Type of the operating system. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: Type of the operating system. - * - * @param osType the osType value to set. - * @return the DownloadOsProfile object itself. - */ - public DownloadOsProfile withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the osVersion property: Version of the operating system. - * - * @return the osVersion value. - */ - public String osVersion() { - return this.osVersion; - } - - /** - * Set the osVersion property: Version of the operating system. - * - * @param osVersion the osVersion value to set. - * @return the DownloadOsProfile object itself. - */ - public DownloadOsProfile withOsVersion(String osVersion) { - this.osVersion = osVersion; - return this; - } - - /** - * Get the osImageLocation property: Location of the operating system image. - * - * @return the osImageLocation value. - */ - public String osImageLocation() { - return this.osImageLocation; - } - - /** - * Set the osImageLocation property: Location of the operating system image. - * - * @param osImageLocation the osImageLocation value to set. - * @return the DownloadOsProfile object itself. - */ - public DownloadOsProfile withOsImageLocation(String osImageLocation) { - this.osImageLocation = osImageLocation; - return this; - } - - /** - * Get the vsrVersion property: Validated Solution Recipe version to be used for the job. - * - * @return the vsrVersion value. - */ - public String vsrVersion() { - return this.vsrVersion; - } - - /** - * Set the vsrVersion property: Validated Solution Recipe version to be used for the job. - * - * @param vsrVersion the vsrVersion value to set. - * @return the DownloadOsProfile object itself. - */ - public DownloadOsProfile withVsrVersion(String vsrVersion) { - this.vsrVersion = vsrVersion; - return this; - } - - /** - * Get the imageHash property: Hash of the OS package downloaded. - * - * @return the imageHash value. - */ - public String imageHash() { - return this.imageHash; - } - - /** - * Set the imageHash property: Hash of the OS package downloaded. - * - * @param imageHash the imageHash value to set. - * @return the DownloadOsProfile object itself. - */ - public DownloadOsProfile withImageHash(String imageHash) { - this.imageHash = imageHash; - return this; - } - - /** - * Get the gpgPubKey property: GPG Public Key used for package verification. - * - * @return the gpgPubKey value. - */ - public String gpgPubKey() { - return this.gpgPubKey; - } - - /** - * Set the gpgPubKey property: GPG Public Key used for package verification. - * - * @param gpgPubKey the gpgPubKey value to set. - * @return the DownloadOsProfile object itself. - */ - public DownloadOsProfile withGpgPubKey(String gpgPubKey) { - this.gpgPubKey = gpgPubKey; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("osName", this.osName); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("osVersion", this.osVersion); - jsonWriter.writeStringField("osImageLocation", this.osImageLocation); - jsonWriter.writeStringField("vsrVersion", this.vsrVersion); - jsonWriter.writeStringField("imageHash", this.imageHash); - jsonWriter.writeStringField("gpgPubKey", this.gpgPubKey); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DownloadOsProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DownloadOsProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DownloadOsProfile. - */ - public static DownloadOsProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DownloadOsProfile deserializedDownloadOsProfile = new DownloadOsProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("osName".equals(fieldName)) { - deserializedDownloadOsProfile.osName = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedDownloadOsProfile.osType = reader.getString(); - } else if ("osVersion".equals(fieldName)) { - deserializedDownloadOsProfile.osVersion = reader.getString(); - } else if ("osImageLocation".equals(fieldName)) { - deserializedDownloadOsProfile.osImageLocation = reader.getString(); - } else if ("vsrVersion".equals(fieldName)) { - deserializedDownloadOsProfile.vsrVersion = reader.getString(); - } else if ("imageHash".equals(fieldName)) { - deserializedDownloadOsProfile.imageHash = reader.getString(); - } else if ("gpgPubKey".equals(fieldName)) { - deserializedDownloadOsProfile.gpgPubKey = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDownloadOsProfile; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadRequest.java deleted file mode 100644 index 66b50929b3ee..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadRequest.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Download Request properties. - */ -@Fluent -public final class DownloadRequest implements JsonSerializable { - /* - * Target operating system to support polymorphic resource. - */ - private ProvisioningOsType target; - - /* - * Operating system profile. - */ - private DownloadOsProfile osProfile; - - /** - * Creates an instance of DownloadRequest class. - */ - public DownloadRequest() { - } - - /** - * Get the target property: Target operating system to support polymorphic resource. - * - * @return the target value. - */ - public ProvisioningOsType target() { - return this.target; - } - - /** - * Set the target property: Target operating system to support polymorphic resource. - * - * @param target the target value to set. - * @return the DownloadRequest object itself. - */ - public DownloadRequest withTarget(ProvisioningOsType target) { - this.target = target; - return this; - } - - /** - * Get the osProfile property: Operating system profile. - * - * @return the osProfile value. - */ - public DownloadOsProfile osProfile() { - return this.osProfile; - } - - /** - * Set the osProfile property: Operating system profile. - * - * @param osProfile the osProfile value to set. - * @return the DownloadRequest object itself. - */ - public DownloadRequest withOsProfile(DownloadOsProfile osProfile) { - this.osProfile = osProfile; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("target", this.target == null ? null : this.target.toString()); - jsonWriter.writeJsonField("osProfile", this.osProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DownloadRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DownloadRequest if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DownloadRequest. - */ - public static DownloadRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DownloadRequest deserializedDownloadRequest = new DownloadRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("target".equals(fieldName)) { - deserializedDownloadRequest.target = ProvisioningOsType.fromString(reader.getString()); - } else if ("osProfile".equals(fieldName)) { - deserializedDownloadRequest.osProfile = DownloadOsProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDownloadRequest; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EAPMethod.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EAPMethod.java deleted file mode 100644 index f6283901c72d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EAPMethod.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * EAP authentication method. - */ -public final class EAPMethod extends ExpandableStringEnum { - /** - * PEAP authentication. - */ - public static final EAPMethod PEAP = fromString("PEAP"); - - /** - * EAP-TLS authentication. - */ - public static final EAPMethod EAP_TLS = fromString("EAP-TLS"); - - /** - * EAP-TTLS authentication. - */ - public static final EAPMethod EAP_TTLS = fromString("EAP-TTLS"); - - /** - * EAP-FAST authentication. - */ - public static final EAPMethod EAP_FAST = fromString("EAP-FAST"); - - /** - * Creates a new instance of EAPMethod value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EAPMethod() { - } - - /** - * Creates or finds a EAPMethod from its string representation. - * - * @param name a name to look for. - * @return the corresponding EAPMethod. - */ - public static EAPMethod fromString(String name) { - return fromString(name, EAPMethod.class); - } - - /** - * Gets known EAPMethod values. - * - * @return known EAPMethod values. - */ - public static Collection values() { - return values(EAPMethod.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceSecrets.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceSecrets.java index 110bca0642ab..d8a8aa8b6eda 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceSecrets.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EceSecrets.java @@ -31,17 +31,6 @@ public final class EceSecrets extends ExpandableStringEnum { */ public static final EceSecrets WITNESS_STORAGE_KEY = fromString("WitnessStorageKey"); - /** - * chapCredential used for iSCSI CHAP authentication during edge machine node preparation. - */ - public static final EceSecrets CHAP_CREDENTIAL = fromString("chapCredential"); - - /** - * mutualChapCredential used for iSCSI mutual (bidirectional) CHAP authentication during edge machine node - * preparation. - */ - public static final EceSecrets MUTUAL_CHAP_CREDENTIAL = fromString("mutualChapCredential"); - /** * Creates a new instance of EceSecrets value. * diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachine.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachine.java deleted file mode 100644 index 2b098bae599c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachine.java +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner; -import com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; -import java.util.Map; - -/** - * An immutable client-side representation of EdgeMachine. - */ -public interface EdgeMachine { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineProperties properties(); - - /** - * Gets the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner object. - * - * @return the inner object. - */ - EdgeMachineInner innerModel(); - - /** - * The entirety of the EdgeMachine definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The EdgeMachine definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EdgeMachine definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the EdgeMachine definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the EdgeMachine definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the EdgeMachine definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeMachine create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeMachine create(Context context); - } - - /** - * The stage of the EdgeMachine definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the EdgeMachine definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EdgeMachineProperties properties); - } - - /** - * The stage of the EdgeMachine definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Begins update for the EdgeMachine resource. - * - * @return the stage of resource update. - */ - EdgeMachine.Update update(); - - /** - * The template for EdgeMachine update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeMachine apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeMachine apply(Context context); - } - - /** - * The EdgeMachine update stages. - */ - interface UpdateStages { - /** - * The stage of the EdgeMachine update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the EdgeMachine update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeMachine refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeMachine refresh(Context context); - - /** - * A long-running resource action to validate the edge machine. - * - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine. - */ - EdgeMachineValidateResponse validate(EdgeMachineValidateRequest body); - - /** - * A long-running resource action to validate the edge machine. - * - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine. - */ - EdgeMachineValidateResponse validate(EdgeMachineValidateRequest body, Context context); - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void refreshSecuritySettings(); - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void refreshSecuritySettings(Context context); - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void refreshApplicableUpdates(); - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void refreshApplicableUpdates(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineAdapterPropertyOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineAdapterPropertyOverrides.java deleted file mode 100644 index ac7dd89e2d73..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineAdapterPropertyOverrides.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The AdapterPropertyOverrides reported for the edge machine. - */ -@Immutable -public final class EdgeMachineAdapterPropertyOverrides - implements JsonSerializable { - /* - * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM - * validation. - */ - private String jumboPacket; - - /* - * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM - * validation. - */ - private String networkDirect; - - /* - * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM - * validation. Expected values are 'iWARP', 'RoCEv2', 'RoCE' - */ - private String networkDirectTechnology; - - /** - * Creates an instance of EdgeMachineAdapterPropertyOverrides class. - */ - private EdgeMachineAdapterPropertyOverrides() { - } - - /** - * Get the jumboPacket property: This parameter should only be modified based on your OEM guidance. Do not modify - * this parameter without OEM validation. - * - * @return the jumboPacket value. - */ - public String jumboPacket() { - return this.jumboPacket; - } - - /** - * Get the networkDirect property: This parameter should only be modified based on your OEM guidance. Do not modify - * this parameter without OEM validation. - * - * @return the networkDirect value. - */ - public String networkDirect() { - return this.networkDirect; - } - - /** - * Get the networkDirectTechnology property: This parameter should only be modified based on your OEM guidance. Do - * not modify this parameter without OEM validation. Expected values are 'iWARP', 'RoCEv2', 'RoCE'. - * - * @return the networkDirectTechnology value. - */ - public String networkDirectTechnology() { - return this.networkDirectTechnology; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineAdapterPropertyOverrides from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineAdapterPropertyOverrides if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineAdapterPropertyOverrides. - */ - public static EdgeMachineAdapterPropertyOverrides fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineAdapterPropertyOverrides deserializedEdgeMachineAdapterPropertyOverrides - = new EdgeMachineAdapterPropertyOverrides(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jumboPacket".equals(fieldName)) { - deserializedEdgeMachineAdapterPropertyOverrides.jumboPacket = reader.getString(); - } else if ("networkDirect".equals(fieldName)) { - deserializedEdgeMachineAdapterPropertyOverrides.networkDirect = reader.getString(); - } else if ("networkDirectTechnology".equals(fieldName)) { - deserializedEdgeMachineAdapterPropertyOverrides.networkDirectTechnology = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineAdapterPropertyOverrides; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobProperties.java deleted file mode 100644 index d801d26016e6..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobProperties.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Properties for pausing a server in the cluster. - */ -@Fluent -public final class EdgeMachineCollectLogJobProperties extends EdgeMachineJobProperties { - /* - * Job Type to support polymorphic resource. - */ - private EdgeMachineJobType jobType = EdgeMachineJobType.COLLECT_LOG; - - /* - * From date for log collection. - */ - private OffsetDateTime fromDate; - - /* - * To date for log collection. - */ - private OffsetDateTime toDate; - - /* - * To date for log collection. - */ - private OffsetDateTime lastLogGenerated; - - /* - * log collection job reported properties. - */ - private EdgeMachineCollectLogJobReportedProperties reportedProperties; - - /** - * Creates an instance of EdgeMachineCollectLogJobProperties class. - */ - public EdgeMachineCollectLogJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public EdgeMachineJobType jobType() { - return this.jobType; - } - - /** - * Get the fromDate property: From date for log collection. - * - * @return the fromDate value. - */ - public OffsetDateTime fromDate() { - return this.fromDate; - } - - /** - * Set the fromDate property: From date for log collection. - * - * @param fromDate the fromDate value to set. - * @return the EdgeMachineCollectLogJobProperties object itself. - */ - public EdgeMachineCollectLogJobProperties withFromDate(OffsetDateTime fromDate) { - this.fromDate = fromDate; - return this; - } - - /** - * Get the toDate property: To date for log collection. - * - * @return the toDate value. - */ - public OffsetDateTime toDate() { - return this.toDate; - } - - /** - * Set the toDate property: To date for log collection. - * - * @param toDate the toDate value to set. - * @return the EdgeMachineCollectLogJobProperties object itself. - */ - public EdgeMachineCollectLogJobProperties withToDate(OffsetDateTime toDate) { - this.toDate = toDate; - return this; - } - - /** - * Get the lastLogGenerated property: To date for log collection. - * - * @return the lastLogGenerated value. - */ - public OffsetDateTime lastLogGenerated() { - return this.lastLogGenerated; - } - - /** - * Get the reportedProperties property: log collection job reported properties. - * - * @return the reportedProperties value. - */ - public EdgeMachineCollectLogJobReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * {@inheritDoc} - */ - @Override - public EdgeMachineCollectLogJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeStringField("fromDate", - this.fromDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.fromDate)); - jsonWriter.writeStringField("toDate", - this.toDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.toDate)); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineCollectLogJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineCollectLogJobProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineCollectLogJobProperties. - */ - public static EdgeMachineCollectLogJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineCollectLogJobProperties deserializedEdgeMachineCollectLogJobProperties - = new EdgeMachineCollectLogJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.withError(ManagementError.fromJson(reader)); - } else if ("fromDate".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.fromDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("toDate".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.toDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("jobType".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.jobType - = EdgeMachineJobType.fromString(reader.getString()); - } else if ("lastLogGenerated".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.lastLogGenerated = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobProperties.reportedProperties - = EdgeMachineCollectLogJobReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineCollectLogJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobReportedProperties.java deleted file mode 100644 index 4150285d3f8b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobReportedProperties.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Represents the reported properties of a log collection job. - */ -@Immutable -public final class EdgeMachineCollectLogJobReportedProperties - implements JsonSerializable { - /* - * The percentage of the job that is complete. - */ - private Integer percentComplete; - - /* - * Validation status of job. - */ - private EceActionStatus validationStatus; - - /* - * Deployment status of job. - */ - private EceActionStatus deploymentStatus; - - /* - * Details of the log collection session. - */ - private List logCollectionSessionDetails; - - /** - * Creates an instance of EdgeMachineCollectLogJobReportedProperties class. - */ - private EdgeMachineCollectLogJobReportedProperties() { - } - - /** - * Get the percentComplete property: The percentage of the job that is complete. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the validationStatus property: Validation status of job. - * - * @return the validationStatus value. - */ - public EceActionStatus validationStatus() { - return this.validationStatus; - } - - /** - * Get the deploymentStatus property: Deployment status of job. - * - * @return the deploymentStatus value. - */ - public EceActionStatus deploymentStatus() { - return this.deploymentStatus; - } - - /** - * Get the logCollectionSessionDetails property: Details of the log collection session. - * - * @return the logCollectionSessionDetails value. - */ - public List logCollectionSessionDetails() { - return this.logCollectionSessionDetails; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineCollectLogJobReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineCollectLogJobReportedProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineCollectLogJobReportedProperties. - */ - public static EdgeMachineCollectLogJobReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineCollectLogJobReportedProperties deserializedEdgeMachineCollectLogJobReportedProperties - = new EdgeMachineCollectLogJobReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("percentComplete".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobReportedProperties.percentComplete - = reader.getNullable(JsonReader::getInt); - } else if ("validationStatus".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobReportedProperties.validationStatus - = EceActionStatus.fromJson(reader); - } else if ("deploymentStatus".equals(fieldName)) { - deserializedEdgeMachineCollectLogJobReportedProperties.deploymentStatus - = EceActionStatus.fromJson(reader); - } else if ("logCollectionSessionDetails".equals(fieldName)) { - List logCollectionSessionDetails - = reader.readArray(reader1 -> LogCollectionJobSession.fromJson(reader1)); - deserializedEdgeMachineCollectLogJobReportedProperties.logCollectionSessionDetails - = logCollectionSessionDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineCollectLogJobReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineConnectivityStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineConnectivityStatus.java deleted file mode 100644 index 37f8f49e7830..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineConnectivityStatus.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Overall connectivity status for the machine resource. - */ -public final class EdgeMachineConnectivityStatus extends ExpandableStringEnum { - /** - * The connectivity status of the machine resource is not specified. - */ - public static final EdgeMachineConnectivityStatus NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * The machine resource is disconnected. - */ - public static final EdgeMachineConnectivityStatus DISCONNECTED = fromString("Disconnected"); - - /** - * The machine resource is connected. - */ - public static final EdgeMachineConnectivityStatus CONNECTED = fromString("Connected"); - - /** - * Creates a new instance of EdgeMachineConnectivityStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EdgeMachineConnectivityStatus() { - } - - /** - * Creates or finds a EdgeMachineConnectivityStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EdgeMachineConnectivityStatus. - */ - public static EdgeMachineConnectivityStatus fromString(String name) { - return fromString(name, EdgeMachineConnectivityStatus.class); - } - - /** - * Gets known EdgeMachineConnectivityStatus values. - * - * @return known EdgeMachineConnectivityStatus values. - */ - public static Collection values() { - return values(EdgeMachineConnectivityStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentConfiguration.java deleted file mode 100644 index 2246592820ee..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentConfiguration.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Edge Machine Deployment Configuration. - */ -@Fluent -public final class EdgeMachineDeploymentConfiguration implements JsonSerializable { - /* - * Deployment template version. - */ - private String version; - - /* - * The list of deployment data. - */ - private List scaleUnits; - - /** - * Creates an instance of EdgeMachineDeploymentConfiguration class. - */ - public EdgeMachineDeploymentConfiguration() { - } - - /** - * Get the version property: Deployment template version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Deployment template version. - * - * @param version the version value to set. - * @return the EdgeMachineDeploymentConfiguration object itself. - */ - public EdgeMachineDeploymentConfiguration withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the scaleUnits property: The list of deployment data. - * - * @return the scaleUnits value. - */ - public List scaleUnits() { - return this.scaleUnits; - } - - /** - * Set the scaleUnits property: The list of deployment data. - * - * @param scaleUnits the scaleUnits value to set. - * @return the EdgeMachineDeploymentConfiguration object itself. - */ - public EdgeMachineDeploymentConfiguration withScaleUnits(List scaleUnits) { - this.scaleUnits = scaleUnits; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("scaleUnits", this.scaleUnits, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("version", this.version); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDeploymentConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDeploymentConfiguration if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDeploymentConfiguration. - */ - public static EdgeMachineDeploymentConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDeploymentConfiguration deserializedEdgeMachineDeploymentConfiguration - = new EdgeMachineDeploymentConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scaleUnits".equals(fieldName)) { - List scaleUnits - = reader.readArray(reader1 -> EdgeMachineScaleUnits.fromJson(reader1)); - deserializedEdgeMachineDeploymentConfiguration.scaleUnits = scaleUnits; - } else if ("version".equals(fieldName)) { - deserializedEdgeMachineDeploymentConfiguration.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDeploymentConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentData.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentData.java deleted file mode 100644 index c76c2f6eb6c7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentData.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The deployment data of an edge machine. - */ -@Fluent -public final class EdgeMachineDeploymentData implements JsonSerializable { - /* - * Storage type for the edge machine node. - */ - private NodeStorageType storageType; - - /* - * iSCSI configuration for the edge machine. - */ - private IscsiConfig iScsiConfig; - - /* - * Protected parameters stored in Key Vault and applied during edge machine node preparation. - */ - private List secrets; - - /** - * Creates an instance of EdgeMachineDeploymentData class. - */ - public EdgeMachineDeploymentData() { - } - - /** - * Get the storageType property: Storage type for the edge machine node. - * - * @return the storageType value. - */ - public NodeStorageType storageType() { - return this.storageType; - } - - /** - * Set the storageType property: Storage type for the edge machine node. - * - * @param storageType the storageType value to set. - * @return the EdgeMachineDeploymentData object itself. - */ - public EdgeMachineDeploymentData withStorageType(NodeStorageType storageType) { - this.storageType = storageType; - return this; - } - - /** - * Get the iScsiConfig property: iSCSI configuration for the edge machine. - * - * @return the iScsiConfig value. - */ - public IscsiConfig iScsiConfig() { - return this.iScsiConfig; - } - - /** - * Set the iScsiConfig property: iSCSI configuration for the edge machine. - * - * @param iScsiConfig the iScsiConfig value to set. - * @return the EdgeMachineDeploymentData object itself. - */ - public EdgeMachineDeploymentData withIScsiConfig(IscsiConfig iScsiConfig) { - this.iScsiConfig = iScsiConfig; - return this; - } - - /** - * Get the secrets property: Protected parameters stored in Key Vault and applied during edge machine node - * preparation. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: Protected parameters stored in Key Vault and applied during edge machine node - * preparation. - * - * @param secrets the secrets value to set. - * @return the EdgeMachineDeploymentData object itself. - */ - public EdgeMachineDeploymentData withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("storageType", this.storageType == null ? null : this.storageType.toString()); - jsonWriter.writeJsonField("iScsiConfig", this.iScsiConfig); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDeploymentData from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDeploymentData if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDeploymentData. - */ - public static EdgeMachineDeploymentData fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDeploymentData deserializedEdgeMachineDeploymentData = new EdgeMachineDeploymentData(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("storageType".equals(fieldName)) { - deserializedEdgeMachineDeploymentData.storageType = NodeStorageType.fromString(reader.getString()); - } else if ("iScsiConfig".equals(fieldName)) { - deserializedEdgeMachineDeploymentData.iScsiConfig = IscsiConfig.fromJson(reader); - } else if ("secrets".equals(fieldName)) { - List secrets - = reader.readArray(reader1 -> EceDeploymentSecrets.fromJson(reader1)); - deserializedEdgeMachineDeploymentData.secrets = secrets; - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDeploymentData; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSetting.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSetting.java deleted file mode 100644 index 4bd13c7fa684..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSetting.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDeploymentSettingInner; - -/** - * An immutable client-side representation of EdgeMachineDeploymentSetting. - */ -public interface EdgeMachineDeploymentSetting { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineDeploymentSettingProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDeploymentSettingInner object. - * - * @return the inner object. - */ - EdgeMachineDeploymentSettingInner innerModel(); - - /** - * The entirety of the EdgeMachineDeploymentSetting definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The EdgeMachineDeploymentSetting definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EdgeMachineDeploymentSetting definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EdgeMachineDeploymentSetting definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, edgeMachineName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @return the next definition stage. - */ - WithCreate withExistingEdgeMachine(String resourceGroupName, String edgeMachineName); - } - - /** - * The stage of the EdgeMachineDeploymentSetting definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeMachineDeploymentSetting create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeMachineDeploymentSetting create(Context context); - } - - /** - * The stage of the EdgeMachineDeploymentSetting definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EdgeMachineDeploymentSettingProperties properties); - } - } - - /** - * Begins update for the EdgeMachineDeploymentSetting resource. - * - * @return the stage of resource update. - */ - EdgeMachineDeploymentSetting.Update update(); - - /** - * The template for EdgeMachineDeploymentSetting update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeMachineDeploymentSetting apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeMachineDeploymentSetting apply(Context context); - } - - /** - * The EdgeMachineDeploymentSetting update stages. - */ - interface UpdateStages { - /** - * The stage of the EdgeMachineDeploymentSetting update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(EdgeMachineDeploymentSettingProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeMachineDeploymentSetting refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeMachineDeploymentSetting refresh(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettingProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettingProperties.java deleted file mode 100644 index ca2a05c123cd..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettingProperties.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties of an Edge Machine Deployment Setting. - */ -@Fluent -public final class EdgeMachineDeploymentSettingProperties - implements JsonSerializable { - /* - * The provisioning state of the deployment setting resource. - */ - private ProvisioningState provisioningState; - - /* - * The deployment configuration for the edge machine. - */ - private EdgeMachineDeploymentConfiguration deploymentConfiguration; - - /* - * Deployment status reported from the edge machine. - */ - private EceReportedProperties reportedProperties; - - /** - * Creates an instance of EdgeMachineDeploymentSettingProperties class. - */ - public EdgeMachineDeploymentSettingProperties() { - } - - /** - * Get the provisioningState property: The provisioning state of the deployment setting resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the deploymentConfiguration property: The deployment configuration for the edge machine. - * - * @return the deploymentConfiguration value. - */ - public EdgeMachineDeploymentConfiguration deploymentConfiguration() { - return this.deploymentConfiguration; - } - - /** - * Set the deploymentConfiguration property: The deployment configuration for the edge machine. - * - * @param deploymentConfiguration the deploymentConfiguration value to set. - * @return the EdgeMachineDeploymentSettingProperties object itself. - */ - public EdgeMachineDeploymentSettingProperties - withDeploymentConfiguration(EdgeMachineDeploymentConfiguration deploymentConfiguration) { - this.deploymentConfiguration = deploymentConfiguration; - return this; - } - - /** - * Get the reportedProperties property: Deployment status reported from the edge machine. - * - * @return the reportedProperties value. - */ - public EceReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("deploymentConfiguration", this.deploymentConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDeploymentSettingProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDeploymentSettingProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineDeploymentSettingProperties. - */ - public static EdgeMachineDeploymentSettingProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDeploymentSettingProperties deserializedEdgeMachineDeploymentSettingProperties - = new EdgeMachineDeploymentSettingProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentConfiguration".equals(fieldName)) { - deserializedEdgeMachineDeploymentSettingProperties.deploymentConfiguration - = EdgeMachineDeploymentConfiguration.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineDeploymentSettingProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineDeploymentSettingProperties.reportedProperties - = EceReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDeploymentSettingProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettings.java deleted file mode 100644 index 62e3f92ede5c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettings.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachineDeploymentSettings. - */ -public interface EdgeMachineDeploymentSettings { - /** - * Get an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String deploymentSettingName, Context context); - - /** - * Get an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting. - */ - EdgeMachineDeploymentSetting get(String resourceGroupName, String edgeMachineName, String deploymentSettingName); - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String deploymentSettingName); - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param deploymentSettingName Name of Edge Machine Deployment Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String deploymentSettingName, Context context); - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByEdgeMachine(String resourceGroupName, String edgeMachineName); - - /** - * List Edge Machine Deployment Setting resources by Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDeploymentSetting list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByEdgeMachine(String resourceGroupName, String edgeMachineName, - Context context); - - /** - * Get an Edge Machine Deployment Setting. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting along with {@link Response}. - */ - EdgeMachineDeploymentSetting getById(String id); - - /** - * Get an Edge Machine Deployment Setting. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Edge Machine Deployment Setting along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete an Edge Machine Deployment Setting. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeMachineDeploymentSetting resource. - * - * @param name resource name. - * @return the first stage of the new EdgeMachineDeploymentSetting definition. - */ - EdgeMachineDeploymentSetting.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisk.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisk.java deleted file mode 100644 index 669a245ad47d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisk.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskInner; - -/** - * An immutable client-side representation of EdgeMachineDisk. - */ -public interface EdgeMachineDisk { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineDiskProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskInner object. - * - * @return the inner object. - */ - EdgeMachineDiskInner innerModel(); - - /** - * The entirety of the EdgeMachineDisk definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The EdgeMachineDisk definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EdgeMachineDisk definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EdgeMachineDisk definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, edgeMachineName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @return the next definition stage. - */ - WithCreate withExistingEdgeMachine(String resourceGroupName, String edgeMachineName); - } - - /** - * The stage of the EdgeMachineDisk definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeMachineDisk create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeMachineDisk create(Context context); - } - - /** - * The stage of the EdgeMachineDisk definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EdgeMachineDiskProperties properties); - } - } - - /** - * Begins update for the EdgeMachineDisk resource. - * - * @return the stage of resource update. - */ - EdgeMachineDisk.Update update(); - - /** - * The template for EdgeMachineDisk update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeMachineDisk apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeMachineDisk apply(Context context); - } - - /** - * The EdgeMachineDisk update stages. - */ - interface UpdateStages { - /** - * The stage of the EdgeMachineDisk update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(EdgeMachineDiskProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeMachineDisk refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeMachineDisk refresh(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJob.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJob.java deleted file mode 100644 index 56cb31104cff..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJob.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskJobInner; - -/** - * An immutable client-side representation of EdgeMachineDiskJob. - */ -public interface EdgeMachineDiskJob { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineDiskJobProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskJobInner object. - * - * @return the inner object. - */ - EdgeMachineDiskJobInner innerModel(); - - /** - * The entirety of the EdgeMachineDiskJob definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The EdgeMachineDiskJob definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EdgeMachineDiskJob definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EdgeMachineDiskJob definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, edgeMachineName, diskName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @return the next definition stage. - */ - WithCreate withExistingDisk(String resourceGroupName, String edgeMachineName, String diskName); - } - - /** - * The stage of the EdgeMachineDiskJob definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeMachineDiskJob create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeMachineDiskJob create(Context context); - } - - /** - * The stage of the EdgeMachineDiskJob definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EdgeMachineDiskJobProperties properties); - } - } - - /** - * Begins update for the EdgeMachineDiskJob resource. - * - * @return the stage of resource update. - */ - EdgeMachineDiskJob.Update update(); - - /** - * The template for EdgeMachineDiskJob update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeMachineDiskJob apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeMachineDiskJob apply(Context context); - } - - /** - * The EdgeMachineDiskJob update stages. - */ - interface UpdateStages { - /** - * The stage of the EdgeMachineDiskJob update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(EdgeMachineDiskJobProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeMachineDiskJob refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeMachineDiskJob refresh(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobProperties.java deleted file mode 100644 index f5eeafc9122c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobProperties.java +++ /dev/null @@ -1,327 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Disk Job properties. - */ -@Fluent -public class EdgeMachineDiskJobProperties implements JsonSerializable { - /* - * Job Type to support polymorphic resource. - */ - private DiskJobType jobType = DiskJobType.fromString("EdgeMachineDiskJobProperties"); - - /* - * Deployment mode to trigger job. - */ - private DeploymentMode deploymentMode; - - /* - * Job provisioning state. - */ - private ProvisioningState provisioningState; - - /* - * Unique, immutable job id. - */ - private String jobId; - - /* - * The UTC date and time at which the job started. - */ - private OffsetDateTime startTimeUtc; - - /* - * The UTC date and time at which the job completed. - */ - private OffsetDateTime endTimeUtc; - - /* - * Status of disk job. - */ - private JobStatus status; - - /* - * Error details if job failed. - */ - private ManagementError error; - - /* - * Properties reported by the job execution. - */ - private DiskJobReportedProperties reportedProperties; - - /** - * Creates an instance of EdgeMachineDiskJobProperties class. - */ - public EdgeMachineDiskJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - public DiskJobType jobType() { - return this.jobType; - } - - /** - * Get the deploymentMode property: Deployment mode to trigger job. - * - * @return the deploymentMode value. - */ - public DeploymentMode deploymentMode() { - return this.deploymentMode; - } - - /** - * Set the deploymentMode property: Deployment mode to trigger job. - * - * @param deploymentMode the deploymentMode value to set. - * @return the EdgeMachineDiskJobProperties object itself. - */ - public EdgeMachineDiskJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - this.deploymentMode = deploymentMode; - return this; - } - - /** - * Get the provisioningState property: Job provisioning state. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Job provisioning state. - * - * @param provisioningState the provisioningState value to set. - * @return the EdgeMachineDiskJobProperties object itself. - */ - EdgeMachineDiskJobProperties withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the jobId property: Unique, immutable job id. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: Unique, immutable job id. - * - * @param jobId the jobId value to set. - * @return the EdgeMachineDiskJobProperties object itself. - */ - EdgeMachineDiskJobProperties withJobId(String jobId) { - this.jobId = jobId; - return this; - } - - /** - * Get the startTimeUtc property: The UTC date and time at which the job started. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The UTC date and time at which the job started. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the EdgeMachineDiskJobProperties object itself. - */ - EdgeMachineDiskJobProperties withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the endTimeUtc property: The UTC date and time at which the job completed. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The UTC date and time at which the job completed. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the EdgeMachineDiskJobProperties object itself. - */ - EdgeMachineDiskJobProperties withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the status property: Status of disk job. - * - * @return the status value. - */ - public JobStatus status() { - return this.status; - } - - /** - * Set the status property: Status of disk job. - * - * @param status the status value to set. - * @return the EdgeMachineDiskJobProperties object itself. - */ - EdgeMachineDiskJobProperties withStatus(JobStatus status) { - this.status = status; - return this; - } - - /** - * Get the error property: Error details if job failed. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Set the error property: Error details if job failed. - * - * @param error the error value to set. - * @return the EdgeMachineDiskJobProperties object itself. - */ - EdgeMachineDiskJobProperties withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Get the reportedProperties property: Properties reported by the job execution. - * - * @return the reportedProperties value. - */ - public DiskJobReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Set the reportedProperties property: Properties reported by the job execution. - * - * @param reportedProperties the reportedProperties value to set. - * @return the EdgeMachineDiskJobProperties object itself. - */ - EdgeMachineDiskJobProperties withReportedProperties(DiskJobReportedProperties reportedProperties) { - this.reportedProperties = reportedProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeStringField("deploymentMode", - this.deploymentMode == null ? null : this.deploymentMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDiskJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDiskJobProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineDiskJobProperties. - */ - public static EdgeMachineDiskJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("jobType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("CreateVolume".equals(discriminatorValue)) { - return CreateVolumeJobProperties.fromJson(readerToUse.reset()); - } else if ("SyncConfiguration".equals(discriminatorValue)) { - return SyncConfigurationJobProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EdgeMachineDiskJobProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDiskJobProperties deserializedEdgeMachineDiskJobProperties = new EdgeMachineDiskJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobType".equals(fieldName)) { - deserializedEdgeMachineDiskJobProperties.jobType = DiskJobType.fromString(reader.getString()); - } else if ("deploymentMode".equals(fieldName)) { - deserializedEdgeMachineDiskJobProperties.deploymentMode - = DeploymentMode.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineDiskJobProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("jobId".equals(fieldName)) { - deserializedEdgeMachineDiskJobProperties.jobId = reader.getString(); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedEdgeMachineDiskJobProperties.startTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedEdgeMachineDiskJobProperties.endTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("status".equals(fieldName)) { - deserializedEdgeMachineDiskJobProperties.status = JobStatus.fromString(reader.getString()); - } else if ("error".equals(fieldName)) { - deserializedEdgeMachineDiskJobProperties.error = ManagementError.fromJson(reader); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineDiskJobProperties.reportedProperties - = DiskJobReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDiskJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobs.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobs.java deleted file mode 100644 index 9a81e52e8518..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobs.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachineDiskJobs. - */ -public interface EdgeMachineDiskJobs { - /** - * Get a specific disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - String jobName, Context context); - - /** - * Get a specific disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job. - */ - EdgeMachineDiskJob get(String resourceGroupName, String edgeMachineName, String diskName, String jobName); - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, String diskName); - - /** - * List all jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDiskJob list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, String diskName, - Context context); - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String diskName, String jobName); - - /** - * Delete a disk job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param jobName The name of the EdgeMachineDiskJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String diskName, String jobName, Context context); - - /** - * Get a specific disk job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job along with {@link Response}. - */ - EdgeMachineDiskJob getById(String id); - - /** - * Get a specific disk job. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk job along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a disk job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a disk job. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeMachineDiskJob resource. - * - * @param name resource name. - * @return the first stage of the new EdgeMachineDiskJob definition. - */ - EdgeMachineDiskJob.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJob.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJob.java deleted file mode 100644 index 93e843c538fe..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJob.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskPrivilegedJobInner; - -/** - * An immutable client-side representation of EdgeMachineDiskPrivilegedJob. - */ -public interface EdgeMachineDiskPrivilegedJob { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineDiskPrivilegedJobProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskPrivilegedJobInner object. - * - * @return the inner object. - */ - EdgeMachineDiskPrivilegedJobInner innerModel(); - - /** - * The entirety of the EdgeMachineDiskPrivilegedJob definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The EdgeMachineDiskPrivilegedJob definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EdgeMachineDiskPrivilegedJob definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EdgeMachineDiskPrivilegedJob definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, edgeMachineName, diskName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @return the next definition stage. - */ - WithCreate withExistingDisk(String resourceGroupName, String edgeMachineName, String diskName); - } - - /** - * The stage of the EdgeMachineDiskPrivilegedJob definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeMachineDiskPrivilegedJob create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeMachineDiskPrivilegedJob create(Context context); - } - - /** - * The stage of the EdgeMachineDiskPrivilegedJob definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EdgeMachineDiskPrivilegedJobProperties properties); - } - } - - /** - * Begins update for the EdgeMachineDiskPrivilegedJob resource. - * - * @return the stage of resource update. - */ - EdgeMachineDiskPrivilegedJob.Update update(); - - /** - * The template for EdgeMachineDiskPrivilegedJob update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeMachineDiskPrivilegedJob apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeMachineDiskPrivilegedJob apply(Context context); - } - - /** - * The EdgeMachineDiskPrivilegedJob update stages. - */ - interface UpdateStages { - /** - * The stage of the EdgeMachineDiskPrivilegedJob update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(EdgeMachineDiskPrivilegedJobProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeMachineDiskPrivilegedJob refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeMachineDiskPrivilegedJob refresh(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobProperties.java deleted file mode 100644 index 695f231456af..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobProperties.java +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Disk Privileged Job properties. - */ -@Fluent -public class EdgeMachineDiskPrivilegedJobProperties - implements JsonSerializable { - /* - * Privileged Job Type to support polymorphic resource. - */ - private PrivilegedJobType jobType = PrivilegedJobType.fromString("EdgeMachineDiskPrivilegedJobProperties"); - - /* - * Deployment mode to trigger job. - */ - private DeploymentMode deploymentMode; - - /* - * Job provisioning state. - */ - private ProvisioningState provisioningState; - - /* - * Unique, immutable job id. - */ - private String jobId; - - /* - * The UTC date and time at which the job started. - */ - private OffsetDateTime startTimeUtc; - - /* - * The UTC date and time at which the job completed. - */ - private OffsetDateTime endTimeUtc; - - /* - * Status of disk job. - */ - private JobStatus status; - - /* - * Error details if job failed. - */ - private ManagementError error; - - /* - * Properties reported by the job execution. - */ - private DiskJobReportedProperties reportedProperties; - - /** - * Creates an instance of EdgeMachineDiskPrivilegedJobProperties class. - */ - public EdgeMachineDiskPrivilegedJobProperties() { - } - - /** - * Get the jobType property: Privileged Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - public PrivilegedJobType jobType() { - return this.jobType; - } - - /** - * Get the deploymentMode property: Deployment mode to trigger job. - * - * @return the deploymentMode value. - */ - public DeploymentMode deploymentMode() { - return this.deploymentMode; - } - - /** - * Set the deploymentMode property: Deployment mode to trigger job. - * - * @param deploymentMode the deploymentMode value to set. - * @return the EdgeMachineDiskPrivilegedJobProperties object itself. - */ - public EdgeMachineDiskPrivilegedJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - this.deploymentMode = deploymentMode; - return this; - } - - /** - * Get the provisioningState property: Job provisioning state. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Job provisioning state. - * - * @param provisioningState the provisioningState value to set. - * @return the EdgeMachineDiskPrivilegedJobProperties object itself. - */ - EdgeMachineDiskPrivilegedJobProperties withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the jobId property: Unique, immutable job id. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: Unique, immutable job id. - * - * @param jobId the jobId value to set. - * @return the EdgeMachineDiskPrivilegedJobProperties object itself. - */ - EdgeMachineDiskPrivilegedJobProperties withJobId(String jobId) { - this.jobId = jobId; - return this; - } - - /** - * Get the startTimeUtc property: The UTC date and time at which the job started. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The UTC date and time at which the job started. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the EdgeMachineDiskPrivilegedJobProperties object itself. - */ - EdgeMachineDiskPrivilegedJobProperties withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the endTimeUtc property: The UTC date and time at which the job completed. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The UTC date and time at which the job completed. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the EdgeMachineDiskPrivilegedJobProperties object itself. - */ - EdgeMachineDiskPrivilegedJobProperties withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the status property: Status of disk job. - * - * @return the status value. - */ - public JobStatus status() { - return this.status; - } - - /** - * Set the status property: Status of disk job. - * - * @param status the status value to set. - * @return the EdgeMachineDiskPrivilegedJobProperties object itself. - */ - EdgeMachineDiskPrivilegedJobProperties withStatus(JobStatus status) { - this.status = status; - return this; - } - - /** - * Get the error property: Error details if job failed. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Set the error property: Error details if job failed. - * - * @param error the error value to set. - * @return the EdgeMachineDiskPrivilegedJobProperties object itself. - */ - EdgeMachineDiskPrivilegedJobProperties withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Get the reportedProperties property: Properties reported by the job execution. - * - * @return the reportedProperties value. - */ - public DiskJobReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Set the reportedProperties property: Properties reported by the job execution. - * - * @param reportedProperties the reportedProperties value to set. - * @return the EdgeMachineDiskPrivilegedJobProperties object itself. - */ - EdgeMachineDiskPrivilegedJobProperties withReportedProperties(DiskJobReportedProperties reportedProperties) { - this.reportedProperties = reportedProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeStringField("deploymentMode", - this.deploymentMode == null ? null : this.deploymentMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDiskPrivilegedJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDiskPrivilegedJobProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineDiskPrivilegedJobProperties. - */ - public static EdgeMachineDiskPrivilegedJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("jobType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("DeleteVolume".equals(discriminatorValue)) { - return DeleteVolumeJobProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EdgeMachineDiskPrivilegedJobProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDiskPrivilegedJobProperties deserializedEdgeMachineDiskPrivilegedJobProperties - = new EdgeMachineDiskPrivilegedJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobType".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobProperties.jobType - = PrivilegedJobType.fromString(reader.getString()); - } else if ("deploymentMode".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobProperties.deploymentMode - = DeploymentMode.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("jobId".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobProperties.jobId = reader.getString(); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobProperties.startTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobProperties.endTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("status".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobProperties.status - = JobStatus.fromString(reader.getString()); - } else if ("error".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobProperties.error = ManagementError.fromJson(reader); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineDiskPrivilegedJobProperties.reportedProperties - = DiskJobReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDiskPrivilegedJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobs.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobs.java deleted file mode 100644 index f7c629fbbcaf..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobs.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachineDiskPrivilegedJobs. - */ -public interface EdgeMachineDiskPrivilegedJobs { - /** - * Get a specific privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String diskName, String privilegedJobName, Context context); - - /** - * Get a specific privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job. - */ - EdgeMachineDiskPrivilegedJob get(String resourceGroupName, String edgeMachineName, String diskName, - String privilegedJobName); - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, String diskName); - - /** - * List all privileged jobs for a disk. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Disk Privileged Job resources as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, String diskName, - Context context); - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName); - - /** - * Delete a privileged job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param privilegedJobName The name of the EdgeMachineDiskPrivilegedJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String diskName, String privilegedJobName, - Context context); - - /** - * Get a specific privileged job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job along with {@link Response}. - */ - EdgeMachineDiskPrivilegedJob getById(String id); - - /** - * Get a specific privileged job. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific privileged job along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a privileged job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a privileged job. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeMachineDiskPrivilegedJob resource. - * - * @param name resource name. - * @return the first stage of the new EdgeMachineDiskPrivilegedJob definition. - */ - EdgeMachineDiskPrivilegedJob.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskProperties.java deleted file mode 100644 index 57f3ae9c7cba..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskProperties.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of a disk. - */ -@Fluent -public final class EdgeMachineDiskProperties implements JsonSerializable { - /* - * The authoritative desired configuration for this disk. - */ - private DiskConfiguration diskConfiguration; - - /* - * The actual state of the disk as reported by the device. - */ - private DiskReportedProperties reportedProperties; - - /* - * Provisioning state of the disk resource. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of EdgeMachineDiskProperties class. - */ - public EdgeMachineDiskProperties() { - } - - /** - * Get the diskConfiguration property: The authoritative desired configuration for this disk. - * - * @return the diskConfiguration value. - */ - public DiskConfiguration diskConfiguration() { - return this.diskConfiguration; - } - - /** - * Set the diskConfiguration property: The authoritative desired configuration for this disk. - * - * @param diskConfiguration the diskConfiguration value to set. - * @return the EdgeMachineDiskProperties object itself. - */ - public EdgeMachineDiskProperties withDiskConfiguration(DiskConfiguration diskConfiguration) { - this.diskConfiguration = diskConfiguration; - return this; - } - - /** - * Get the reportedProperties property: The actual state of the disk as reported by the device. - * - * @return the reportedProperties value. - */ - public DiskReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Get the provisioningState property: Provisioning state of the disk resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("diskConfiguration", this.diskConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineDiskProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineDiskProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineDiskProperties. - */ - public static EdgeMachineDiskProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineDiskProperties deserializedEdgeMachineDiskProperties = new EdgeMachineDiskProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskConfiguration".equals(fieldName)) { - deserializedEdgeMachineDiskProperties.diskConfiguration = DiskConfiguration.fromJson(reader); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineDiskProperties.reportedProperties = DiskReportedProperties.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineDiskProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineDiskProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisks.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisks.java deleted file mode 100644 index d240e6dd3a1c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisks.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachineDisks. - */ -public interface EdgeMachineDisks { - /** - * Get a specific disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String edgeMachineName, String diskName, - Context context); - - /** - * Get a specific disk on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine. - */ - EdgeMachineDisk get(String resourceGroupName, String edgeMachineName, String diskName); - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName); - - /** - * List all disks on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineDisk list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, Context context); - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String diskName); - - /** - * Delete a disk from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param diskName The name of the EdgeMachineDisk. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String diskName, Context context); - - /** - * Get a specific disk on an Edge Machine. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine along with {@link Response}. - */ - EdgeMachineDisk getById(String id); - - /** - * Get a specific disk on an Edge Machine. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific disk on an Edge Machine along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a disk from an Edge Machine. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a disk from an Edge Machine. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeMachineDisk resource. - * - * @param name resource name. - * @return the first stage of the new EdgeMachineDisk definition. - */ - EdgeMachineDisk.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetwork.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetwork.java deleted file mode 100644 index ba895c1f6be5..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetwork.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * HostNetwork configuration reported for the edge machine. - */ -@Immutable -public final class EdgeMachineHostNetwork implements JsonSerializable { - /* - * The network intents assigned to the network reference pattern used for the deployment. Each intent will define - * its own name, traffic type, adapter names, and overrides as recommended by your OEM. - */ - private List intents; - - /* - * List of StorageNetworks config to deploy AzureStackHCI Cluster. - */ - private List storageNetworks; - - /* - * Defines how the storage adapters between nodes are connected either switch or switch less. - */ - private Boolean storageConnectivitySwitchless; - - /* - * Optional parameter required only for 3 Nodes Switchless deployments. This allows users to specify IPs and Mask - * for Storage NICs when Network ATC is not assigning the IPs for storage automatically. - */ - private Boolean enableStorageAutoIp; - - /** - * Creates an instance of EdgeMachineHostNetwork class. - */ - private EdgeMachineHostNetwork() { - } - - /** - * Get the intents property: The network intents assigned to the network reference pattern used for the deployment. - * Each intent will define its own name, traffic type, adapter names, and overrides as recommended by your OEM. - * - * @return the intents value. - */ - public List intents() { - return this.intents; - } - - /** - * Get the storageNetworks property: List of StorageNetworks config to deploy AzureStackHCI Cluster. - * - * @return the storageNetworks value. - */ - public List storageNetworks() { - return this.storageNetworks; - } - - /** - * Get the storageConnectivitySwitchless property: Defines how the storage adapters between nodes are connected - * either switch or switch less. - * - * @return the storageConnectivitySwitchless value. - */ - public Boolean storageConnectivitySwitchless() { - return this.storageConnectivitySwitchless; - } - - /** - * Get the enableStorageAutoIp property: Optional parameter required only for 3 Nodes Switchless deployments. This - * allows users to specify IPs and Mask for Storage NICs when Network ATC is not assigning the IPs for storage - * automatically. - * - * @return the enableStorageAutoIp value. - */ - public Boolean enableStorageAutoIp() { - return this.enableStorageAutoIp; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineHostNetwork from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineHostNetwork if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineHostNetwork. - */ - public static EdgeMachineHostNetwork fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineHostNetwork deserializedEdgeMachineHostNetwork = new EdgeMachineHostNetwork(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("intents".equals(fieldName)) { - List intents - = reader.readArray(reader1 -> EdgeMachineHostNetworkIntent.fromJson(reader1)); - deserializedEdgeMachineHostNetwork.intents = intents; - } else if ("storageNetworks".equals(fieldName)) { - List storageNetworks - = reader.readArray(reader1 -> EdgeMachineStorageNetwork.fromJson(reader1)); - deserializedEdgeMachineHostNetwork.storageNetworks = storageNetworks; - } else if ("storageConnectivitySwitchless".equals(fieldName)) { - deserializedEdgeMachineHostNetwork.storageConnectivitySwitchless - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableStorageAutoIp".equals(fieldName)) { - deserializedEdgeMachineHostNetwork.enableStorageAutoIp = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineHostNetwork; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetworkIntent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetworkIntent.java deleted file mode 100644 index 3fa769319bb3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetworkIntent.java +++ /dev/null @@ -1,347 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The network intent reported for the edge machine. - */ -@Immutable -public final class EdgeMachineHostNetworkIntent implements JsonSerializable { - /* - * Scope for host network intent. - */ - private Long scope; - - /* - * IntentType for host network intent. - */ - private Long intentType; - - /* - * IsComputeIntentSet for host network intent. - */ - private Boolean isComputeIntentSet; - - /* - * IsStorageIntentSet for host network intent. - */ - private Boolean isStorageIntentSet; - - /* - * IntentType for host network intent. - */ - private Boolean isOnlyStorage; - - /* - * IsManagementIntentSet for host network intent. - */ - private Boolean isManagementIntentSet; - - /* - * IsStretchIntentSet for host network intent. - */ - private Boolean isStretchIntentSet; - - /* - * IsOnlyStretch for host network intent. - */ - private Boolean isOnlyStretch; - - /* - * IsNetworkIntentType for host network intent. - */ - private Boolean isNetworkIntentType; - - /* - * Name of the network intent you wish to create. - */ - private String intentName; - - /* - * Array of adapters used for the network intent. - */ - private List intentAdapters; - - /* - * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM - * validation. - */ - private Boolean overrideVirtualSwitchConfiguration; - - /* - * Set virtualSwitch ConfigurationOverrides for cluster. - */ - private EdgeMachineVirtualSwitchConfigurationOverrides virtualSwitchConfigurationOverrides; - - /* - * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM - * validation. - */ - private Boolean overrideQosPolicy; - - /* - * Set QoS PolicyOverrides for cluster. - */ - private QosPolicyOverrides qosPolicyOverrides; - - /* - * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM - * validation. - */ - private Boolean overrideAdapterProperty; - - /* - * Set Adapter PropertyOverrides for cluster. - */ - private EdgeMachineAdapterPropertyOverrides adapterPropertyOverrides; - - /** - * Creates an instance of EdgeMachineHostNetworkIntent class. - */ - private EdgeMachineHostNetworkIntent() { - } - - /** - * Get the scope property: Scope for host network intent. - * - * @return the scope value. - */ - public Long scope() { - return this.scope; - } - - /** - * Get the intentType property: IntentType for host network intent. - * - * @return the intentType value. - */ - public Long intentType() { - return this.intentType; - } - - /** - * Get the isComputeIntentSet property: IsComputeIntentSet for host network intent. - * - * @return the isComputeIntentSet value. - */ - public Boolean isComputeIntentSet() { - return this.isComputeIntentSet; - } - - /** - * Get the isStorageIntentSet property: IsStorageIntentSet for host network intent. - * - * @return the isStorageIntentSet value. - */ - public Boolean isStorageIntentSet() { - return this.isStorageIntentSet; - } - - /** - * Get the isOnlyStorage property: IntentType for host network intent. - * - * @return the isOnlyStorage value. - */ - public Boolean isOnlyStorage() { - return this.isOnlyStorage; - } - - /** - * Get the isManagementIntentSet property: IsManagementIntentSet for host network intent. - * - * @return the isManagementIntentSet value. - */ - public Boolean isManagementIntentSet() { - return this.isManagementIntentSet; - } - - /** - * Get the isStretchIntentSet property: IsStretchIntentSet for host network intent. - * - * @return the isStretchIntentSet value. - */ - public Boolean isStretchIntentSet() { - return this.isStretchIntentSet; - } - - /** - * Get the isOnlyStretch property: IsOnlyStretch for host network intent. - * - * @return the isOnlyStretch value. - */ - public Boolean isOnlyStretch() { - return this.isOnlyStretch; - } - - /** - * Get the isNetworkIntentType property: IsNetworkIntentType for host network intent. - * - * @return the isNetworkIntentType value. - */ - public Boolean isNetworkIntentType() { - return this.isNetworkIntentType; - } - - /** - * Get the intentName property: Name of the network intent you wish to create. - * - * @return the intentName value. - */ - public String intentName() { - return this.intentName; - } - - /** - * Get the intentAdapters property: Array of adapters used for the network intent. - * - * @return the intentAdapters value. - */ - public List intentAdapters() { - return this.intentAdapters; - } - - /** - * Get the overrideVirtualSwitchConfiguration property: This parameter should only be modified based on your OEM - * guidance. Do not modify this parameter without OEM validation. - * - * @return the overrideVirtualSwitchConfiguration value. - */ - public Boolean overrideVirtualSwitchConfiguration() { - return this.overrideVirtualSwitchConfiguration; - } - - /** - * Get the virtualSwitchConfigurationOverrides property: Set virtualSwitch ConfigurationOverrides for cluster. - * - * @return the virtualSwitchConfigurationOverrides value. - */ - public EdgeMachineVirtualSwitchConfigurationOverrides virtualSwitchConfigurationOverrides() { - return this.virtualSwitchConfigurationOverrides; - } - - /** - * Get the overrideQosPolicy property: This parameter should only be modified based on your OEM guidance. Do not - * modify this parameter without OEM validation. - * - * @return the overrideQosPolicy value. - */ - public Boolean overrideQosPolicy() { - return this.overrideQosPolicy; - } - - /** - * Get the qosPolicyOverrides property: Set QoS PolicyOverrides for cluster. - * - * @return the qosPolicyOverrides value. - */ - public QosPolicyOverrides qosPolicyOverrides() { - return this.qosPolicyOverrides; - } - - /** - * Get the overrideAdapterProperty property: This parameter should only be modified based on your OEM guidance. Do - * not modify this parameter without OEM validation. - * - * @return the overrideAdapterProperty value. - */ - public Boolean overrideAdapterProperty() { - return this.overrideAdapterProperty; - } - - /** - * Get the adapterPropertyOverrides property: Set Adapter PropertyOverrides for cluster. - * - * @return the adapterPropertyOverrides value. - */ - public EdgeMachineAdapterPropertyOverrides adapterPropertyOverrides() { - return this.adapterPropertyOverrides; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineHostNetworkIntent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineHostNetworkIntent if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineHostNetworkIntent. - */ - public static EdgeMachineHostNetworkIntent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineHostNetworkIntent deserializedEdgeMachineHostNetworkIntent = new EdgeMachineHostNetworkIntent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scope".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.scope = reader.getNullable(JsonReader::getLong); - } else if ("intentType".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.intentType = reader.getNullable(JsonReader::getLong); - } else if ("isComputeIntentSet".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.isComputeIntentSet - = reader.getNullable(JsonReader::getBoolean); - } else if ("isStorageIntentSet".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.isStorageIntentSet - = reader.getNullable(JsonReader::getBoolean); - } else if ("isOnlyStorage".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.isOnlyStorage = reader.getNullable(JsonReader::getBoolean); - } else if ("isManagementIntentSet".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.isManagementIntentSet - = reader.getNullable(JsonReader::getBoolean); - } else if ("isStretchIntentSet".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.isStretchIntentSet - = reader.getNullable(JsonReader::getBoolean); - } else if ("isOnlyStretch".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.isOnlyStretch = reader.getNullable(JsonReader::getBoolean); - } else if ("isNetworkIntentType".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.isNetworkIntentType - = reader.getNullable(JsonReader::getBoolean); - } else if ("intentName".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.intentName = reader.getString(); - } else if ("intentAdapters".equals(fieldName)) { - List intentAdapters = reader.readArray(reader1 -> reader1.getString()); - deserializedEdgeMachineHostNetworkIntent.intentAdapters = intentAdapters; - } else if ("overrideVirtualSwitchConfiguration".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.overrideVirtualSwitchConfiguration - = reader.getNullable(JsonReader::getBoolean); - } else if ("virtualSwitchConfigurationOverrides".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.virtualSwitchConfigurationOverrides - = EdgeMachineVirtualSwitchConfigurationOverrides.fromJson(reader); - } else if ("overrideQosPolicy".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.overrideQosPolicy - = reader.getNullable(JsonReader::getBoolean); - } else if ("qosPolicyOverrides".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.qosPolicyOverrides = QosPolicyOverrides.fromJson(reader); - } else if ("overrideAdapterProperty".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.overrideAdapterProperty - = reader.getNullable(JsonReader::getBoolean); - } else if ("adapterPropertyOverrides".equals(fieldName)) { - deserializedEdgeMachineHostNetworkIntent.adapterPropertyOverrides - = EdgeMachineAdapterPropertyOverrides.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineHostNetworkIntent; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJob.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJob.java deleted file mode 100644 index a53cb91394c2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJob.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner; - -/** - * An immutable client-side representation of EdgeMachineJob. - */ -public interface EdgeMachineJob { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineJobProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner object. - * - * @return the inner object. - */ - EdgeMachineJobInner innerModel(); - - /** - * The entirety of the EdgeMachineJob definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The EdgeMachineJob definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EdgeMachineJob definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EdgeMachineJob definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, edgeMachineName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @return the next definition stage. - */ - WithCreate withExistingEdgeMachine(String resourceGroupName, String edgeMachineName); - } - - /** - * The stage of the EdgeMachineJob definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeMachineJob create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeMachineJob create(Context context); - } - - /** - * The stage of the EdgeMachineJob definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EdgeMachineJobProperties properties); - } - } - - /** - * Begins update for the EdgeMachineJob resource. - * - * @return the stage of resource update. - */ - EdgeMachineJob.Update update(); - - /** - * The template for EdgeMachineJob update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeMachineJob apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeMachineJob apply(Context context); - } - - /** - * The EdgeMachineJob update stages. - */ - interface UpdateStages { - /** - * The stage of the EdgeMachineJob update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(EdgeMachineJobProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeMachineJob refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeMachineJob refresh(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobProperties.java deleted file mode 100644 index ae8a568249c3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobProperties.java +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * EdgeMachine Job properties. - */ -@Fluent -public class EdgeMachineJobProperties implements JsonSerializable { - /* - * Job Type to support polymorphic resource. - */ - private EdgeMachineJobType jobType = EdgeMachineJobType.fromString("EdgeMachineJobProperties"); - - /* - * Deployment mode to trigger job. - */ - private DeploymentMode deploymentMode; - - /* - * Job provisioning state - */ - private ProvisioningState provisioningState; - - /* - * Unique, immutable job id. - */ - private String jobId; - - /* - * The UTC date and time at which the job started. - */ - private OffsetDateTime startTimeUtc; - - /* - * The UTC date and time at which the job completed. - */ - private OffsetDateTime endTimeUtc; - - /* - * Status of Edge device job. - */ - private JobStatus status; - - /* - * error details. - */ - private ManagementError error; - - /** - * Creates an instance of EdgeMachineJobProperties class. - */ - public EdgeMachineJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - public EdgeMachineJobType jobType() { - return this.jobType; - } - - /** - * Get the deploymentMode property: Deployment mode to trigger job. - * - * @return the deploymentMode value. - */ - public DeploymentMode deploymentMode() { - return this.deploymentMode; - } - - /** - * Set the deploymentMode property: Deployment mode to trigger job. - * - * @param deploymentMode the deploymentMode value to set. - * @return the EdgeMachineJobProperties object itself. - */ - public EdgeMachineJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - this.deploymentMode = deploymentMode; - return this; - } - - /** - * Get the provisioningState property: Job provisioning state. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Job provisioning state. - * - * @param provisioningState the provisioningState value to set. - * @return the EdgeMachineJobProperties object itself. - */ - EdgeMachineJobProperties withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the jobId property: Unique, immutable job id. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: Unique, immutable job id. - * - * @param jobId the jobId value to set. - * @return the EdgeMachineJobProperties object itself. - */ - EdgeMachineJobProperties withJobId(String jobId) { - this.jobId = jobId; - return this; - } - - /** - * Get the startTimeUtc property: The UTC date and time at which the job started. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The UTC date and time at which the job started. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the EdgeMachineJobProperties object itself. - */ - EdgeMachineJobProperties withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the endTimeUtc property: The UTC date and time at which the job completed. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The UTC date and time at which the job completed. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the EdgeMachineJobProperties object itself. - */ - EdgeMachineJobProperties withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the status property: Status of Edge device job. - * - * @return the status value. - */ - public JobStatus status() { - return this.status; - } - - /** - * Set the status property: Status of Edge device job. - * - * @param status the status value to set. - * @return the EdgeMachineJobProperties object itself. - */ - EdgeMachineJobProperties withStatus(JobStatus status) { - this.status = status; - return this; - } - - /** - * Get the error property: error details. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Set the error property: error details. - * - * @param error the error value to set. - * @return the EdgeMachineJobProperties object itself. - */ - EdgeMachineJobProperties withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeStringField("deploymentMode", - this.deploymentMode == null ? null : this.deploymentMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineJobProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineJobProperties. - */ - public static EdgeMachineJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("jobType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("RemoteSupport".equals(discriminatorValue)) { - return EdgeMachineRemoteSupportJobProperties.fromJson(readerToUse.reset()); - } else if ("ProvisionOs".equals(discriminatorValue)) { - return ProvisionOsJobProperties.fromJson(readerToUse.reset()); - } else if ("DownloadOs".equals(discriminatorValue)) { - return DownloadOsJobProperties.fromJson(readerToUse.reset()); - } else if ("CollectLog".equals(discriminatorValue)) { - return EdgeMachineCollectLogJobProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EdgeMachineJobProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineJobProperties deserializedEdgeMachineJobProperties = new EdgeMachineJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobType".equals(fieldName)) { - deserializedEdgeMachineJobProperties.jobType = EdgeMachineJobType.fromString(reader.getString()); - } else if ("deploymentMode".equals(fieldName)) { - deserializedEdgeMachineJobProperties.deploymentMode = DeploymentMode.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineJobProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("jobId".equals(fieldName)) { - deserializedEdgeMachineJobProperties.jobId = reader.getString(); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedEdgeMachineJobProperties.startTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedEdgeMachineJobProperties.endTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("status".equals(fieldName)) { - deserializedEdgeMachineJobProperties.status = JobStatus.fromString(reader.getString()); - } else if ("error".equals(fieldName)) { - deserializedEdgeMachineJobProperties.error = ManagementError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobType.java deleted file mode 100644 index 41588453f5da..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobType.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Job Type supported. - */ -public final class EdgeMachineJobType extends ExpandableStringEnum { - /** - * Job to collect logs from the device. - */ - public static final EdgeMachineJobType COLLECT_LOG = fromString("CollectLog"); - - /** - * Job to provide remote support to the device. - */ - public static final EdgeMachineJobType REMOTE_SUPPORT = fromString("RemoteSupport"); - - /** - * Job to provision operating system in the device. - */ - public static final EdgeMachineJobType PROVISION_OS = fromString("ProvisionOs"); - - /** - * Job to download OS packages on to the device. - */ - public static final EdgeMachineJobType DOWNLOAD_OS = fromString("DownloadOs"); - - /** - * Creates a new instance of EdgeMachineJobType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EdgeMachineJobType() { - } - - /** - * Creates or finds a EdgeMachineJobType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EdgeMachineJobType. - */ - public static EdgeMachineJobType fromString(String name) { - return fromString(name, EdgeMachineJobType.class); - } - - /** - * Gets known EdgeMachineJobType values. - * - * @return known EdgeMachineJobType values. - */ - public static Collection values() { - return values(EdgeMachineJobType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobs.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobs.java deleted file mode 100644 index be5d900b3a2e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobs.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachineJobs. - */ -public interface EdgeMachineJobs { - /** - * Get a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String edgeMachineName, String jobsName, - Context context); - - /** - * Get a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob. - */ - EdgeMachineJob get(String resourceGroupName, String edgeMachineName, String jobsName); - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String jobsName); - - /** - * Delete a EdgeMachineJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param jobsName Name of EdgeMachineJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String jobsName, Context context); - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName); - - /** - * List EdgeMachineJob resources by EdgeMachines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineJob list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, Context context); - - /** - * Get a EdgeMachineJob. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob along with {@link Response}. - */ - EdgeMachineJob getById(String id); - - /** - * Get a EdgeMachineJob. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a EdgeMachineJob along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a EdgeMachineJob. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a EdgeMachineJob. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeMachineJob resource. - * - * @param name resource name. - * @return the first stage of the new EdgeMachineJob definition. - */ - EdgeMachineJob.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineKind.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineKind.java deleted file mode 100644 index 40fbb65ba8ae..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineKind.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Edge Machine Kind. - */ -public final class EdgeMachineKind extends ExpandableStringEnum { - /** - * EdgeMachine resource created using Zero-touch provisioning. - */ - public static final EdgeMachineKind STANDARD = fromString("Standard"); - - /** - * EdgeMachine resource created for brownfield HCI customers without zero touch provisioning. - */ - public static final EdgeMachineKind DEDICATED = fromString("Dedicated"); - - /** - * Creates a new instance of EdgeMachineKind value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EdgeMachineKind() { - } - - /** - * Creates or finds a EdgeMachineKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EdgeMachineKind. - */ - public static EdgeMachineKind fromString(String name) { - return fromString(name, EdgeMachineKind.class); - } - - /** - * Gets known EdgeMachineKind values. - * - * @return known EdgeMachineKind values. - */ - public static Collection values() { - return values(EdgeMachineKind.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineLifecycleStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineLifecycleStatus.java deleted file mode 100644 index 0c10397d0a8c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineLifecycleStatus.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Lifecycle status of an Edge Machine. - */ -public final class EdgeMachineLifecycleStatus extends ExpandableStringEnum { - /** - * Machine is being created. - */ - public static final EdgeMachineLifecycleStatus CREATING = fromString("Creating"); - - /** - * Machine is awaiting connection. - */ - public static final EdgeMachineLifecycleStatus AWAITING_CONNECTION = fromString("AwaitingConnection"); - - /** - * Machine is being provisioned. - */ - public static final EdgeMachineLifecycleStatus PROVISIONING = fromString("Provisioning"); - - /** - * Machine is ready for OS installation. - */ - public static final EdgeMachineLifecycleStatus READY_FOR_OS = fromString("ReadyForOs"); - - /** - * Machine is installing the OS. - */ - public static final EdgeMachineLifecycleStatus INSTALLING_OS = fromString("InstallingOs"); - - /** - * Machine has been provisioned. - */ - public static final EdgeMachineLifecycleStatus PROVISIONED = fromString("Provisioned"); - - /** - * Machine OS is being updated. - */ - public static final EdgeMachineLifecycleStatus UPDATING_OS = fromString("UpdatingOs"); - - /** - * Machine OS is being reset. - */ - public static final EdgeMachineLifecycleStatus RESETTING_OS = fromString("ResettingOs"); - - /** - * Machine is being deleted. - */ - public static final EdgeMachineLifecycleStatus DELETING = fromString("Deleting"); - - /** - * Machine is in a failed state. - */ - public static final EdgeMachineLifecycleStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of EdgeMachineLifecycleStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EdgeMachineLifecycleStatus() { - } - - /** - * Creates or finds a EdgeMachineLifecycleStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EdgeMachineLifecycleStatus. - */ - public static EdgeMachineLifecycleStatus fromString(String name) { - return fromString(name, EdgeMachineLifecycleStatus.class); - } - - /** - * Gets known EdgeMachineLifecycleStatus values. - * - * @return known EdgeMachineLifecycleStatus values. - */ - public static Collection values() { - return values(EdgeMachineLifecycleStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapter.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapter.java deleted file mode 100644 index fe553c71f389..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapter.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterInner; - -/** - * An immutable client-side representation of EdgeMachineNetworkAdapter. - */ -public interface EdgeMachineNetworkAdapter { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineNetworkAdapterProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterInner object. - * - * @return the inner object. - */ - EdgeMachineNetworkAdapterInner innerModel(); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJob.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJob.java deleted file mode 100644 index 6024e8cf66e9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJob.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterJobInner; - -/** - * An immutable client-side representation of EdgeMachineNetworkAdapterJob. - */ -public interface EdgeMachineNetworkAdapterJob { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineNetworkAdapterJobProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterJobInner object. - * - * @return the inner object. - */ - EdgeMachineNetworkAdapterJobInner innerModel(); - - /** - * The entirety of the EdgeMachineNetworkAdapterJob definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The EdgeMachineNetworkAdapterJob definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EdgeMachineNetworkAdapterJob definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EdgeMachineNetworkAdapterJob definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, edgeMachineName, networkAdapterName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @return the next definition stage. - */ - WithCreate withExistingNetworkAdapter(String resourceGroupName, String edgeMachineName, - String networkAdapterName); - } - - /** - * The stage of the EdgeMachineNetworkAdapterJob definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeMachineNetworkAdapterJob create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeMachineNetworkAdapterJob create(Context context); - } - - /** - * The stage of the EdgeMachineNetworkAdapterJob definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EdgeMachineNetworkAdapterJobProperties properties); - } - } - - /** - * Begins update for the EdgeMachineNetworkAdapterJob resource. - * - * @return the stage of resource update. - */ - EdgeMachineNetworkAdapterJob.Update update(); - - /** - * The template for EdgeMachineNetworkAdapterJob update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeMachineNetworkAdapterJob apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeMachineNetworkAdapterJob apply(Context context); - } - - /** - * The EdgeMachineNetworkAdapterJob update stages. - */ - interface UpdateStages { - /** - * The stage of the EdgeMachineNetworkAdapterJob update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(EdgeMachineNetworkAdapterJobProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeMachineNetworkAdapterJob refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeMachineNetworkAdapterJob refresh(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobProperties.java deleted file mode 100644 index 6c3fd6e917f4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobProperties.java +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Properties of the Network Adapter Job. - */ -@Fluent -public class EdgeMachineNetworkAdapterJobProperties - implements JsonSerializable { - /* - * Type of operation. - */ - private NetworkAdapterJobType jobType = NetworkAdapterJobType.fromString("EdgeMachineNetworkAdapterJobProperties"); - - /* - * Deployment mode to trigger job. - */ - private DeploymentMode deploymentMode; - - /* - * Provisioning state of the job. - */ - private ProvisioningState provisioningState; - - /* - * Unique, immutable job id. - */ - private String jobId; - - /* - * The UTC date and time at which the job started. - */ - private OffsetDateTime startTimeUtc; - - /* - * The UTC date and time at which the job completed. - */ - private OffsetDateTime endTimeUtc; - - /* - * Status of Edge device job. - */ - private JobStatus status; - - /* - * Error details if job failed. - */ - private ManagementError error; - - /* - * Reported properties for Network Adapter Job. - */ - private NetworkAdapterJobReportedProperties reportedProperties; - - /** - * Creates an instance of EdgeMachineNetworkAdapterJobProperties class. - */ - public EdgeMachineNetworkAdapterJobProperties() { - } - - /** - * Get the jobType property: Type of operation. - * - * @return the jobType value. - */ - public NetworkAdapterJobType jobType() { - return this.jobType; - } - - /** - * Get the deploymentMode property: Deployment mode to trigger job. - * - * @return the deploymentMode value. - */ - public DeploymentMode deploymentMode() { - return this.deploymentMode; - } - - /** - * Set the deploymentMode property: Deployment mode to trigger job. - * - * @param deploymentMode the deploymentMode value to set. - * @return the EdgeMachineNetworkAdapterJobProperties object itself. - */ - public EdgeMachineNetworkAdapterJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - this.deploymentMode = deploymentMode; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the job. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Provisioning state of the job. - * - * @param provisioningState the provisioningState value to set. - * @return the EdgeMachineNetworkAdapterJobProperties object itself. - */ - EdgeMachineNetworkAdapterJobProperties withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the jobId property: Unique, immutable job id. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: Unique, immutable job id. - * - * @param jobId the jobId value to set. - * @return the EdgeMachineNetworkAdapterJobProperties object itself. - */ - EdgeMachineNetworkAdapterJobProperties withJobId(String jobId) { - this.jobId = jobId; - return this; - } - - /** - * Get the startTimeUtc property: The UTC date and time at which the job started. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The UTC date and time at which the job started. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the EdgeMachineNetworkAdapterJobProperties object itself. - */ - EdgeMachineNetworkAdapterJobProperties withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the endTimeUtc property: The UTC date and time at which the job completed. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The UTC date and time at which the job completed. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the EdgeMachineNetworkAdapterJobProperties object itself. - */ - EdgeMachineNetworkAdapterJobProperties withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the status property: Status of Edge device job. - * - * @return the status value. - */ - public JobStatus status() { - return this.status; - } - - /** - * Set the status property: Status of Edge device job. - * - * @param status the status value to set. - * @return the EdgeMachineNetworkAdapterJobProperties object itself. - */ - EdgeMachineNetworkAdapterJobProperties withStatus(JobStatus status) { - this.status = status; - return this; - } - - /** - * Get the error property: Error details if job failed. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Set the error property: Error details if job failed. - * - * @param error the error value to set. - * @return the EdgeMachineNetworkAdapterJobProperties object itself. - */ - EdgeMachineNetworkAdapterJobProperties withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Get the reportedProperties property: Reported properties for Network Adapter Job. - * - * @return the reportedProperties value. - */ - public NetworkAdapterJobReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Set the reportedProperties property: Reported properties for Network Adapter Job. - * - * @param reportedProperties the reportedProperties value to set. - * @return the EdgeMachineNetworkAdapterJobProperties object itself. - */ - EdgeMachineNetworkAdapterJobProperties - withReportedProperties(NetworkAdapterJobReportedProperties reportedProperties) { - this.reportedProperties = reportedProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeStringField("deploymentMode", - this.deploymentMode == null ? null : this.deploymentMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineNetworkAdapterJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineNetworkAdapterJobProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineNetworkAdapterJobProperties. - */ - public static EdgeMachineNetworkAdapterJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("jobType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("ApplyConfiguration".equals(discriminatorValue)) { - return ApplyConfigurationNetworkAdapterJobProperties.fromJson(readerToUse.reset()); - } else if ("ForcePush".equals(discriminatorValue)) { - return ForcePushNetworkAdapterJobProperties.fromJson(readerToUse.reset()); - } else if ("SyncConfiguration".equals(discriminatorValue)) { - return SyncConfigurationNetworkAdapterJobProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EdgeMachineNetworkAdapterJobProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineNetworkAdapterJobProperties deserializedEdgeMachineNetworkAdapterJobProperties - = new EdgeMachineNetworkAdapterJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobType".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobProperties.jobType - = NetworkAdapterJobType.fromString(reader.getString()); - } else if ("deploymentMode".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobProperties.deploymentMode - = DeploymentMode.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("jobId".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobProperties.jobId = reader.getString(); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobProperties.startTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobProperties.endTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("status".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobProperties.status - = JobStatus.fromString(reader.getString()); - } else if ("error".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobProperties.error = ManagementError.fromJson(reader); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterJobProperties.reportedProperties - = NetworkAdapterJobReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineNetworkAdapterJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobs.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobs.java deleted file mode 100644 index 5475ad3d6598..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobs.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachineNetworkAdapterJobs. - */ -public interface EdgeMachineNetworkAdapterJobs { - /** - * Get a specific network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, String jobName, Context context); - - /** - * Get a specific network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job. - */ - EdgeMachineNetworkAdapterJob get(String resourceGroupName, String edgeMachineName, String networkAdapterName, - String jobName); - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, - String networkAdapterName); - - /** - * List all jobs for a network adapter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapterJob list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, - String networkAdapterName, Context context); - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName); - - /** - * Delete a network adapter job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param jobName The name of the EdgeMachineNetworkAdapterJob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String networkAdapterName, String jobName, - Context context); - - /** - * Get a specific network adapter job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job along with {@link Response}. - */ - EdgeMachineNetworkAdapterJob getById(String id); - - /** - * Get a specific network adapter job. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter job along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a network adapter job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a network adapter job. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeMachineNetworkAdapterJob resource. - * - * @param name resource name. - * @return the first stage of the new EdgeMachineNetworkAdapterJob definition. - */ - EdgeMachineNetworkAdapterJob.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterProperties.java deleted file mode 100644 index 00d3f8dd640a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterProperties.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of the Network Adapter resource. - */ -@Immutable -public final class EdgeMachineNetworkAdapterProperties - implements JsonSerializable { - /* - * The authoritative desired configuration for this specific interface. - */ - private NetworkAdapterConfiguration networkConfiguration; - - /* - * The actual applied configuration reported by the device. - */ - private NetworkAdapterReportedProperties reportedProperties; - - /* - * Provisioning state of the network adapter resource. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of EdgeMachineNetworkAdapterProperties class. - */ - private EdgeMachineNetworkAdapterProperties() { - } - - /** - * Get the networkConfiguration property: The authoritative desired configuration for this specific interface. - * - * @return the networkConfiguration value. - */ - public NetworkAdapterConfiguration networkConfiguration() { - return this.networkConfiguration; - } - - /** - * Get the reportedProperties property: The actual applied configuration reported by the device. - * - * @return the reportedProperties value. - */ - public NetworkAdapterReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Get the provisioningState property: Provisioning state of the network adapter resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("networkConfiguration", this.networkConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineNetworkAdapterProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineNetworkAdapterProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineNetworkAdapterProperties. - */ - public static EdgeMachineNetworkAdapterProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineNetworkAdapterProperties deserializedEdgeMachineNetworkAdapterProperties - = new EdgeMachineNetworkAdapterProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkConfiguration".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterProperties.networkConfiguration - = NetworkAdapterConfiguration.fromJson(reader); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterProperties.reportedProperties - = NetworkAdapterReportedProperties.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineNetworkAdapterProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineNetworkAdapterProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapters.java deleted file mode 100644 index 5c400c83c084..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapters.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachineNetworkAdapters. - */ -public interface EdgeMachineNetworkAdapters { - /** - * Get a specific network adapter on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter on an Edge Machine along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String networkAdapterName, Context context); - - /** - * Get a specific network adapter on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param networkAdapterName The name of the EdgeMachineNetworkAdapter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific network adapter on an Edge Machine. - */ - EdgeMachineNetworkAdapter get(String resourceGroupName, String edgeMachineName, String networkAdapterName); - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName); - - /** - * List all network adapters on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineNetworkAdapter list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkProfile.java deleted file mode 100644 index 3033c1eba964..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkProfile.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * NetworkProfile of edge machine. - */ -@Immutable -public final class EdgeMachineNetworkProfile implements JsonSerializable { - /* - * List of Network Interface Card (NIC) Details of edge machine. - */ - private List nicDetails; - - /* - * List of switch Details of edge machine. - */ - private List switchDetails; - - /* - * HostNetwork configuration reported for the edge machine. - */ - private EdgeMachineHostNetwork hostNetwork; - - /* - * Software Defined Networking (SDN) properties reported for the edge machine. - */ - private SdnProperties sdnProperties; - - /** - * Creates an instance of EdgeMachineNetworkProfile class. - */ - private EdgeMachineNetworkProfile() { - } - - /** - * Get the nicDetails property: List of Network Interface Card (NIC) Details of edge machine. - * - * @return the nicDetails value. - */ - public List nicDetails() { - return this.nicDetails; - } - - /** - * Get the switchDetails property: List of switch Details of edge machine. - * - * @return the switchDetails value. - */ - public List switchDetails() { - return this.switchDetails; - } - - /** - * Get the hostNetwork property: HostNetwork configuration reported for the edge machine. - * - * @return the hostNetwork value. - */ - public EdgeMachineHostNetwork hostNetwork() { - return this.hostNetwork; - } - - /** - * Get the sdnProperties property: Software Defined Networking (SDN) properties reported for the edge machine. - * - * @return the sdnProperties value. - */ - public SdnProperties sdnProperties() { - return this.sdnProperties; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineNetworkProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineNetworkProfile if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineNetworkProfile. - */ - public static EdgeMachineNetworkProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineNetworkProfile deserializedEdgeMachineNetworkProfile = new EdgeMachineNetworkProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nicDetails".equals(fieldName)) { - List nicDetails - = reader.readArray(reader1 -> EdgeMachineNicDetail.fromJson(reader1)); - deserializedEdgeMachineNetworkProfile.nicDetails = nicDetails; - } else if ("switchDetails".equals(fieldName)) { - List switchDetails = reader.readArray(reader1 -> SwitchDetail.fromJson(reader1)); - deserializedEdgeMachineNetworkProfile.switchDetails = switchDetails; - } else if ("hostNetwork".equals(fieldName)) { - deserializedEdgeMachineNetworkProfile.hostNetwork = EdgeMachineHostNetwork.fromJson(reader); - } else if ("sdnProperties".equals(fieldName)) { - deserializedEdgeMachineNetworkProfile.sdnProperties = SdnProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineNetworkProfile; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNicDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNicDetail.java deleted file mode 100644 index 1f2336b0bdbe..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNicDetail.java +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Network Interface Card (NIC) Details of edge machine. - */ -@Immutable -public final class EdgeMachineNicDetail implements JsonSerializable { - /* - * Adapter Name of NIC - */ - private String adapterName; - - /* - * Interface Description of NIC - */ - private String interfaceDescription; - - /* - * Component Id of NIC - */ - private String componentId; - - /* - * Driver Version of NIC - */ - private String driverVersion; - - /* - * Subnet Mask of NIC - */ - private String ip4Address; - - /* - * Subnet Mask of NIC - */ - private String subnetMask; - - /* - * Default Gateway of NIC - */ - private String defaultGateway; - - /* - * DNS Servers for NIC - */ - private List dnsServers; - - /* - * Default Isolation of Management NIC - */ - private String defaultIsolationId; - - /* - * MAC address information of NIC. - */ - private String macAddress; - - /* - * The slot attached to the NIC. - */ - private String slot; - - /* - * The switch attached to the NIC, if any. - */ - private String switchName; - - /* - * The type of NIC, physical, virtual, management. - */ - private String nicType; - - /* - * The VLAN ID of the physical NIC. - */ - private String vlanId; - - /* - * The status of NIC, up, disconnected. - */ - private String nicStatus; - - /* - * Describes the RDMA capability of the network adapter. - */ - private RdmaCapability rdmaCapability; - - /** - * Creates an instance of EdgeMachineNicDetail class. - */ - private EdgeMachineNicDetail() { - } - - /** - * Get the adapterName property: Adapter Name of NIC. - * - * @return the adapterName value. - */ - public String adapterName() { - return this.adapterName; - } - - /** - * Get the interfaceDescription property: Interface Description of NIC. - * - * @return the interfaceDescription value. - */ - public String interfaceDescription() { - return this.interfaceDescription; - } - - /** - * Get the componentId property: Component Id of NIC. - * - * @return the componentId value. - */ - public String componentId() { - return this.componentId; - } - - /** - * Get the driverVersion property: Driver Version of NIC. - * - * @return the driverVersion value. - */ - public String driverVersion() { - return this.driverVersion; - } - - /** - * Get the ip4Address property: Subnet Mask of NIC. - * - * @return the ip4Address value. - */ - public String ip4Address() { - return this.ip4Address; - } - - /** - * Get the subnetMask property: Subnet Mask of NIC. - * - * @return the subnetMask value. - */ - public String subnetMask() { - return this.subnetMask; - } - - /** - * Get the defaultGateway property: Default Gateway of NIC. - * - * @return the defaultGateway value. - */ - public String defaultGateway() { - return this.defaultGateway; - } - - /** - * Get the dnsServers property: DNS Servers for NIC. - * - * @return the dnsServers value. - */ - public List dnsServers() { - return this.dnsServers; - } - - /** - * Get the defaultIsolationId property: Default Isolation of Management NIC. - * - * @return the defaultIsolationId value. - */ - public String defaultIsolationId() { - return this.defaultIsolationId; - } - - /** - * Get the macAddress property: MAC address information of NIC. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.macAddress; - } - - /** - * Get the slot property: The slot attached to the NIC. - * - * @return the slot value. - */ - public String slot() { - return this.slot; - } - - /** - * Get the switchName property: The switch attached to the NIC, if any. - * - * @return the switchName value. - */ - public String switchName() { - return this.switchName; - } - - /** - * Get the nicType property: The type of NIC, physical, virtual, management. - * - * @return the nicType value. - */ - public String nicType() { - return this.nicType; - } - - /** - * Get the vlanId property: The VLAN ID of the physical NIC. - * - * @return the vlanId value. - */ - public String vlanId() { - return this.vlanId; - } - - /** - * Get the nicStatus property: The status of NIC, up, disconnected. - * - * @return the nicStatus value. - */ - public String nicStatus() { - return this.nicStatus; - } - - /** - * Get the rdmaCapability property: Describes the RDMA capability of the network adapter. - * - * @return the rdmaCapability value. - */ - public RdmaCapability rdmaCapability() { - return this.rdmaCapability; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineNicDetail from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineNicDetail if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineNicDetail. - */ - public static EdgeMachineNicDetail fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineNicDetail deserializedEdgeMachineNicDetail = new EdgeMachineNicDetail(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("adapterName".equals(fieldName)) { - deserializedEdgeMachineNicDetail.adapterName = reader.getString(); - } else if ("interfaceDescription".equals(fieldName)) { - deserializedEdgeMachineNicDetail.interfaceDescription = reader.getString(); - } else if ("componentId".equals(fieldName)) { - deserializedEdgeMachineNicDetail.componentId = reader.getString(); - } else if ("driverVersion".equals(fieldName)) { - deserializedEdgeMachineNicDetail.driverVersion = reader.getString(); - } else if ("ip4Address".equals(fieldName)) { - deserializedEdgeMachineNicDetail.ip4Address = reader.getString(); - } else if ("subnetMask".equals(fieldName)) { - deserializedEdgeMachineNicDetail.subnetMask = reader.getString(); - } else if ("defaultGateway".equals(fieldName)) { - deserializedEdgeMachineNicDetail.defaultGateway = reader.getString(); - } else if ("dnsServers".equals(fieldName)) { - List dnsServers = reader.readArray(reader1 -> reader1.getString()); - deserializedEdgeMachineNicDetail.dnsServers = dnsServers; - } else if ("defaultIsolationId".equals(fieldName)) { - deserializedEdgeMachineNicDetail.defaultIsolationId = reader.getString(); - } else if ("macAddress".equals(fieldName)) { - deserializedEdgeMachineNicDetail.macAddress = reader.getString(); - } else if ("slot".equals(fieldName)) { - deserializedEdgeMachineNicDetail.slot = reader.getString(); - } else if ("switchName".equals(fieldName)) { - deserializedEdgeMachineNicDetail.switchName = reader.getString(); - } else if ("nicType".equals(fieldName)) { - deserializedEdgeMachineNicDetail.nicType = reader.getString(); - } else if ("vlanId".equals(fieldName)) { - deserializedEdgeMachineNicDetail.vlanId = reader.getString(); - } else if ("nicStatus".equals(fieldName)) { - deserializedEdgeMachineNicDetail.nicStatus = reader.getString(); - } else if ("rdmaCapability".equals(fieldName)) { - deserializedEdgeMachineNicDetail.rdmaCapability = RdmaCapability.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineNicDetail; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachinePatch.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachinePatch.java deleted file mode 100644 index f7b23d43b43e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachinePatch.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; -import java.io.IOException; -import java.util.Map; - -/** - * Model for patching edge machine. - */ -@Fluent -public final class EdgeMachinePatch implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /** - * Creates an instance of EdgeMachinePatch class. - */ - public EdgeMachinePatch() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the EdgeMachinePatch object itself. - */ - public EdgeMachinePatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the EdgeMachinePatch object itself. - */ - public EdgeMachinePatch withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachinePatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachinePatch if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachinePatch. - */ - public static EdgeMachinePatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachinePatch deserializedEdgeMachinePatch = new EdgeMachinePatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEdgeMachinePatch.tags = tags; - } else if ("identity".equals(fieldName)) { - deserializedEdgeMachinePatch.identity = ManagedServiceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachinePatch; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineProperties.java deleted file mode 100644 index e8cebcca73d3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineProperties.java +++ /dev/null @@ -1,424 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Properties for edge machine. - */ -@Fluent -public final class EdgeMachineProperties implements JsonSerializable { - /* - * Edge Machine type. - */ - private EdgeMachineKind edgeMachineKind; - - /* - * The provisioning state of a resource. - */ - private ProvisioningState provisioningState; - - /* - * Unique, immutable resource id. - */ - private String cloudId; - - /* - * Optional property to create arc machine in custom resource group. - */ - private String arcMachineResourceGroupId; - - /* - * Arc machine instance resource id. - */ - private String arcMachineResourceId; - - /* - * Lifecycle details of the resource - */ - private LifecycleDetails lifecycleDetails; - - /* - * Link to Arc Gateway ARM resource Id - */ - private String arcGatewayResourceId; - - /* - * Service fetches common configuration from site. - */ - private SiteDetails siteDetails; - - /* - * Ownership voucher details for provisioned machine. - */ - private OwnershipVoucherDetails ownershipVoucherDetails; - - /* - * Details for device provisioning. - */ - private ProvisioningDetails provisioningDetails; - - /* - * A machine can only be assigned to single device pool - */ - private String devicePoolResourceId; - - /* - * OS configuration status details - */ - private EdgeMachineState machineState; - - /* - * machine connectivity status - */ - private EdgeMachineConnectivityStatus connectivityStatus; - - /* - * Tracks the ID of the consuming resource, setting the machine as in-use. - */ - private String claimedBy; - - /* - * Reported properties for edge machine. - */ - private EdgeMachineReportedProperties reportedProperties; - - /* - * operation status details for edge machine. - */ - private List operationDetails; - - /* - * Last time data updated to service. - */ - private OffsetDateTime lastSyncTimestamp; - - /** - * Creates an instance of EdgeMachineProperties class. - */ - public EdgeMachineProperties() { - } - - /** - * Get the edgeMachineKind property: Edge Machine type. - * - * @return the edgeMachineKind value. - */ - public EdgeMachineKind edgeMachineKind() { - return this.edgeMachineKind; - } - - /** - * Set the edgeMachineKind property: Edge Machine type. - * - * @param edgeMachineKind the edgeMachineKind value to set. - * @return the EdgeMachineProperties object itself. - */ - public EdgeMachineProperties withEdgeMachineKind(EdgeMachineKind edgeMachineKind) { - this.edgeMachineKind = edgeMachineKind; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of a resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the cloudId property: Unique, immutable resource id. - * - * @return the cloudId value. - */ - public String cloudId() { - return this.cloudId; - } - - /** - * Get the arcMachineResourceGroupId property: Optional property to create arc machine in custom resource group. - * - * @return the arcMachineResourceGroupId value. - */ - public String arcMachineResourceGroupId() { - return this.arcMachineResourceGroupId; - } - - /** - * Set the arcMachineResourceGroupId property: Optional property to create arc machine in custom resource group. - * - * @param arcMachineResourceGroupId the arcMachineResourceGroupId value to set. - * @return the EdgeMachineProperties object itself. - */ - public EdgeMachineProperties withArcMachineResourceGroupId(String arcMachineResourceGroupId) { - this.arcMachineResourceGroupId = arcMachineResourceGroupId; - return this; - } - - /** - * Get the arcMachineResourceId property: Arc machine instance resource id. - * - * @return the arcMachineResourceId value. - */ - public String arcMachineResourceId() { - return this.arcMachineResourceId; - } - - /** - * Set the arcMachineResourceId property: Arc machine instance resource id. - * - * @param arcMachineResourceId the arcMachineResourceId value to set. - * @return the EdgeMachineProperties object itself. - */ - public EdgeMachineProperties withArcMachineResourceId(String arcMachineResourceId) { - this.arcMachineResourceId = arcMachineResourceId; - return this; - } - - /** - * Get the lifecycleDetails property: Lifecycle details of the resource. - * - * @return the lifecycleDetails value. - */ - public LifecycleDetails lifecycleDetails() { - return this.lifecycleDetails; - } - - /** - * Get the arcGatewayResourceId property: Link to Arc Gateway ARM resource Id. - * - * @return the arcGatewayResourceId value. - */ - public String arcGatewayResourceId() { - return this.arcGatewayResourceId; - } - - /** - * Set the arcGatewayResourceId property: Link to Arc Gateway ARM resource Id. - * - * @param arcGatewayResourceId the arcGatewayResourceId value to set. - * @return the EdgeMachineProperties object itself. - */ - public EdgeMachineProperties withArcGatewayResourceId(String arcGatewayResourceId) { - this.arcGatewayResourceId = arcGatewayResourceId; - return this; - } - - /** - * Get the siteDetails property: Service fetches common configuration from site. - * - * @return the siteDetails value. - */ - public SiteDetails siteDetails() { - return this.siteDetails; - } - - /** - * Set the siteDetails property: Service fetches common configuration from site. - * - * @param siteDetails the siteDetails value to set. - * @return the EdgeMachineProperties object itself. - */ - public EdgeMachineProperties withSiteDetails(SiteDetails siteDetails) { - this.siteDetails = siteDetails; - return this; - } - - /** - * Get the ownershipVoucherDetails property: Ownership voucher details for provisioned machine. - * - * @return the ownershipVoucherDetails value. - */ - public OwnershipVoucherDetails ownershipVoucherDetails() { - return this.ownershipVoucherDetails; - } - - /** - * Set the ownershipVoucherDetails property: Ownership voucher details for provisioned machine. - * - * @param ownershipVoucherDetails the ownershipVoucherDetails value to set. - * @return the EdgeMachineProperties object itself. - */ - public EdgeMachineProperties withOwnershipVoucherDetails(OwnershipVoucherDetails ownershipVoucherDetails) { - this.ownershipVoucherDetails = ownershipVoucherDetails; - return this; - } - - /** - * Get the provisioningDetails property: Details for device provisioning. - * - * @return the provisioningDetails value. - */ - public ProvisioningDetails provisioningDetails() { - return this.provisioningDetails; - } - - /** - * Set the provisioningDetails property: Details for device provisioning. - * - * @param provisioningDetails the provisioningDetails value to set. - * @return the EdgeMachineProperties object itself. - */ - public EdgeMachineProperties withProvisioningDetails(ProvisioningDetails provisioningDetails) { - this.provisioningDetails = provisioningDetails; - return this; - } - - /** - * Get the devicePoolResourceId property: A machine can only be assigned to single device pool. - * - * @return the devicePoolResourceId value. - */ - public String devicePoolResourceId() { - return this.devicePoolResourceId; - } - - /** - * Get the machineState property: OS configuration status details. - * - * @return the machineState value. - */ - public EdgeMachineState machineState() { - return this.machineState; - } - - /** - * Get the connectivityStatus property: machine connectivity status. - * - * @return the connectivityStatus value. - */ - public EdgeMachineConnectivityStatus connectivityStatus() { - return this.connectivityStatus; - } - - /** - * Get the claimedBy property: Tracks the ID of the consuming resource, setting the machine as in-use. - * - * @return the claimedBy value. - */ - public String claimedBy() { - return this.claimedBy; - } - - /** - * Get the reportedProperties property: Reported properties for edge machine. - * - * @return the reportedProperties value. - */ - public EdgeMachineReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Get the operationDetails property: operation status details for edge machine. - * - * @return the operationDetails value. - */ - public List operationDetails() { - return this.operationDetails; - } - - /** - * Get the lastSyncTimestamp property: Last time data updated to service. - * - * @return the lastSyncTimestamp value. - */ - public OffsetDateTime lastSyncTimestamp() { - return this.lastSyncTimestamp; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("edgeMachineKind", - this.edgeMachineKind == null ? null : this.edgeMachineKind.toString()); - jsonWriter.writeStringField("arcMachineResourceGroupId", this.arcMachineResourceGroupId); - jsonWriter.writeStringField("arcMachineResourceId", this.arcMachineResourceId); - jsonWriter.writeStringField("arcGatewayResourceId", this.arcGatewayResourceId); - jsonWriter.writeJsonField("siteDetails", this.siteDetails); - jsonWriter.writeJsonField("ownershipVoucherDetails", this.ownershipVoucherDetails); - jsonWriter.writeJsonField("provisioningDetails", this.provisioningDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineProperties. - */ - public static EdgeMachineProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineProperties deserializedEdgeMachineProperties = new EdgeMachineProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("edgeMachineKind".equals(fieldName)) { - deserializedEdgeMachineProperties.edgeMachineKind = EdgeMachineKind.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("cloudId".equals(fieldName)) { - deserializedEdgeMachineProperties.cloudId = reader.getString(); - } else if ("arcMachineResourceGroupId".equals(fieldName)) { - deserializedEdgeMachineProperties.arcMachineResourceGroupId = reader.getString(); - } else if ("arcMachineResourceId".equals(fieldName)) { - deserializedEdgeMachineProperties.arcMachineResourceId = reader.getString(); - } else if ("lifecycleDetails".equals(fieldName)) { - deserializedEdgeMachineProperties.lifecycleDetails = LifecycleDetails.fromJson(reader); - } else if ("arcGatewayResourceId".equals(fieldName)) { - deserializedEdgeMachineProperties.arcGatewayResourceId = reader.getString(); - } else if ("siteDetails".equals(fieldName)) { - deserializedEdgeMachineProperties.siteDetails = SiteDetails.fromJson(reader); - } else if ("ownershipVoucherDetails".equals(fieldName)) { - deserializedEdgeMachineProperties.ownershipVoucherDetails - = OwnershipVoucherDetails.fromJson(reader); - } else if ("provisioningDetails".equals(fieldName)) { - deserializedEdgeMachineProperties.provisioningDetails = ProvisioningDetails.fromJson(reader); - } else if ("devicePoolResourceId".equals(fieldName)) { - deserializedEdgeMachineProperties.devicePoolResourceId = reader.getString(); - } else if ("machineState".equals(fieldName)) { - deserializedEdgeMachineProperties.machineState = EdgeMachineState.fromString(reader.getString()); - } else if ("connectivityStatus".equals(fieldName)) { - deserializedEdgeMachineProperties.connectivityStatus - = EdgeMachineConnectivityStatus.fromString(reader.getString()); - } else if ("claimedBy".equals(fieldName)) { - deserializedEdgeMachineProperties.claimedBy = reader.getString(); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineProperties.reportedProperties - = EdgeMachineReportedProperties.fromJson(reader); - } else if ("operationDetails".equals(fieldName)) { - List operationDetails - = reader.readArray(reader1 -> OperationDetail.fromJson(reader1)); - deserializedEdgeMachineProperties.operationDetails = operationDetails; - } else if ("lastSyncTimestamp".equals(fieldName)) { - deserializedEdgeMachineProperties.lastSyncTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobProperties.java deleted file mode 100644 index 8cf6a0abe7d4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobProperties.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Properties for adding a server in the cluster. - */ -@Fluent -public final class EdgeMachineRemoteSupportJobProperties extends EdgeMachineJobProperties { - /* - * Job Type to support polymorphic resource. - */ - private EdgeMachineJobType jobType = EdgeMachineJobType.REMOTE_SUPPORT; - - /* - * Remote support access level. - */ - private RemoteSupportAccessLevel accessLevel; - - /* - * Remote support expiration timestamp. - */ - private OffsetDateTime expirationTimestamp; - - /* - * Remote support type. - */ - private RemoteSupportType type; - - /* - * log collection job reported properties. - */ - private EdgeMachineRemoteSupportJobReportedProperties reportedProperties; - - /** - * Creates an instance of EdgeMachineRemoteSupportJobProperties class. - */ - public EdgeMachineRemoteSupportJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public EdgeMachineJobType jobType() { - return this.jobType; - } - - /** - * Get the accessLevel property: Remote support access level. - * - * @return the accessLevel value. - */ - public RemoteSupportAccessLevel accessLevel() { - return this.accessLevel; - } - - /** - * Set the accessLevel property: Remote support access level. - * - * @param accessLevel the accessLevel value to set. - * @return the EdgeMachineRemoteSupportJobProperties object itself. - */ - public EdgeMachineRemoteSupportJobProperties withAccessLevel(RemoteSupportAccessLevel accessLevel) { - this.accessLevel = accessLevel; - return this; - } - - /** - * Get the expirationTimestamp property: Remote support expiration timestamp. - * - * @return the expirationTimestamp value. - */ - public OffsetDateTime expirationTimestamp() { - return this.expirationTimestamp; - } - - /** - * Set the expirationTimestamp property: Remote support expiration timestamp. - * - * @param expirationTimestamp the expirationTimestamp value to set. - * @return the EdgeMachineRemoteSupportJobProperties object itself. - */ - public EdgeMachineRemoteSupportJobProperties withExpirationTimestamp(OffsetDateTime expirationTimestamp) { - this.expirationTimestamp = expirationTimestamp; - return this; - } - - /** - * Get the type property: Remote support type. - * - * @return the type value. - */ - public RemoteSupportType type() { - return this.type; - } - - /** - * Set the type property: Remote support type. - * - * @param type the type value to set. - * @return the EdgeMachineRemoteSupportJobProperties object itself. - */ - public EdgeMachineRemoteSupportJobProperties withType(RemoteSupportType type) { - this.type = type; - return this; - } - - /** - * Get the reportedProperties property: log collection job reported properties. - * - * @return the reportedProperties value. - */ - public EdgeMachineRemoteSupportJobReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * {@inheritDoc} - */ - @Override - public EdgeMachineRemoteSupportJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeStringField("accessLevel", this.accessLevel == null ? null : this.accessLevel.toString()); - jsonWriter.writeStringField("expirationTimestamp", - this.expirationTimestamp == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTimestamp)); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineRemoteSupportJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineRemoteSupportJobProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineRemoteSupportJobProperties. - */ - public static EdgeMachineRemoteSupportJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineRemoteSupportJobProperties deserializedEdgeMachineRemoteSupportJobProperties - = new EdgeMachineRemoteSupportJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties - .withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties.withError(ManagementError.fromJson(reader)); - } else if ("accessLevel".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties.accessLevel - = RemoteSupportAccessLevel.fromString(reader.getString()); - } else if ("expirationTimestamp".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties.expirationTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("type".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties.type - = RemoteSupportType.fromString(reader.getString()); - } else if ("jobType".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties.jobType - = EdgeMachineJobType.fromString(reader.getString()); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobProperties.reportedProperties - = EdgeMachineRemoteSupportJobReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineRemoteSupportJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobReportedProperties.java deleted file mode 100644 index 648d16a81cfc..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobReportedProperties.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Represents the reported properties of a remote support job. - */ -@Immutable -public final class EdgeMachineRemoteSupportJobReportedProperties - implements JsonSerializable { - /* - * The percentage of the job that is complete. - */ - private Integer percentComplete; - - /* - * Validation status of job. - */ - private EceActionStatus validationStatus; - - /* - * Deployment status of job. - */ - private EceActionStatus deploymentStatus; - - /* - * Optional settings for configuring the node for remote support. - */ - private EdgeMachineRemoteSupportNodeSettings nodeSettings; - - /* - * Details of the remote support session. - */ - private List sessionDetails; - - /** - * Creates an instance of EdgeMachineRemoteSupportJobReportedProperties class. - */ - private EdgeMachineRemoteSupportJobReportedProperties() { - } - - /** - * Get the percentComplete property: The percentage of the job that is complete. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the validationStatus property: Validation status of job. - * - * @return the validationStatus value. - */ - public EceActionStatus validationStatus() { - return this.validationStatus; - } - - /** - * Get the deploymentStatus property: Deployment status of job. - * - * @return the deploymentStatus value. - */ - public EceActionStatus deploymentStatus() { - return this.deploymentStatus; - } - - /** - * Get the nodeSettings property: Optional settings for configuring the node for remote support. - * - * @return the nodeSettings value. - */ - public EdgeMachineRemoteSupportNodeSettings nodeSettings() { - return this.nodeSettings; - } - - /** - * Get the sessionDetails property: Details of the remote support session. - * - * @return the sessionDetails value. - */ - public List sessionDetails() { - return this.sessionDetails; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineRemoteSupportJobReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineRemoteSupportJobReportedProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineRemoteSupportJobReportedProperties. - */ - public static EdgeMachineRemoteSupportJobReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineRemoteSupportJobReportedProperties deserializedEdgeMachineRemoteSupportJobReportedProperties - = new EdgeMachineRemoteSupportJobReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("percentComplete".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobReportedProperties.percentComplete - = reader.getNullable(JsonReader::getInt); - } else if ("validationStatus".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobReportedProperties.validationStatus - = EceActionStatus.fromJson(reader); - } else if ("deploymentStatus".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobReportedProperties.deploymentStatus - = EceActionStatus.fromJson(reader); - } else if ("nodeSettings".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportJobReportedProperties.nodeSettings - = EdgeMachineRemoteSupportNodeSettings.fromJson(reader); - } else if ("sessionDetails".equals(fieldName)) { - List sessionDetails - = reader.readArray(reader1 -> RemoteSupportSession.fromJson(reader1)); - deserializedEdgeMachineRemoteSupportJobReportedProperties.sessionDetails = sessionDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineRemoteSupportJobReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportNodeSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportNodeSettings.java deleted file mode 100644 index 237a131105f0..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportNodeSettings.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Represents the settings of a remote support node. - */ -@Immutable -public final class EdgeMachineRemoteSupportNodeSettings - implements JsonSerializable { - /* - * The state of the remote support node. - */ - private String state; - - /* - * The timestamp when the node settings were created, in UTC. - */ - private OffsetDateTime createdAt; - - /* - * The timestamp when the node settings were last updated, in UTC. - */ - private OffsetDateTime updatedAt; - - /* - * The current connection status of the remote support session. - */ - private String connectionStatus; - - /* - * The error message, if any, from the last connection attempt. - */ - private String connectionErrorMessage; - - /** - * Creates an instance of EdgeMachineRemoteSupportNodeSettings class. - */ - private EdgeMachineRemoteSupportNodeSettings() { - } - - /** - * Get the state property: The state of the remote support node. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Get the createdAt property: The timestamp when the node settings were created, in UTC. - * - * @return the createdAt value. - */ - public OffsetDateTime createdAt() { - return this.createdAt; - } - - /** - * Get the updatedAt property: The timestamp when the node settings were last updated, in UTC. - * - * @return the updatedAt value. - */ - public OffsetDateTime updatedAt() { - return this.updatedAt; - } - - /** - * Get the connectionStatus property: The current connection status of the remote support session. - * - * @return the connectionStatus value. - */ - public String connectionStatus() { - return this.connectionStatus; - } - - /** - * Get the connectionErrorMessage property: The error message, if any, from the last connection attempt. - * - * @return the connectionErrorMessage value. - */ - public String connectionErrorMessage() { - return this.connectionErrorMessage; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineRemoteSupportNodeSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineRemoteSupportNodeSettings if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineRemoteSupportNodeSettings. - */ - public static EdgeMachineRemoteSupportNodeSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineRemoteSupportNodeSettings deserializedEdgeMachineRemoteSupportNodeSettings - = new EdgeMachineRemoteSupportNodeSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("state".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportNodeSettings.state = reader.getString(); - } else if ("createdAt".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportNodeSettings.createdAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("updatedAt".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportNodeSettings.updatedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("connectionStatus".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportNodeSettings.connectionStatus = reader.getString(); - } else if ("connectionErrorMessage".equals(fieldName)) { - deserializedEdgeMachineRemoteSupportNodeSettings.connectionErrorMessage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineRemoteSupportNodeSettings; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineReportedProperties.java deleted file mode 100644 index c2bbb0ad558c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineReportedProperties.java +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Reported properties for edge machine. - */ -@Immutable -public final class EdgeMachineReportedProperties implements JsonSerializable { - /* - * Last time data reported. - */ - private OffsetDateTime lastUpdated; - - /* - * Network details for edge machine. - */ - private EdgeMachineNetworkProfile networkProfile; - - /* - * OS Properties for edge machine. - */ - private OsProfile osProfile; - - /* - * Hardware related information for edge machine. - */ - private HardwareProfile hardwareProfile; - - /* - * Storage related information for edge machine. - */ - private StorageProfile storageProfile; - - /* - * Solution builder extension (SBE) deployment package information. - */ - private SbeDeploymentPackageInfo sbeDeploymentPackageInfo; - - /* - * Extension details for edge machine. - */ - private ExtensionProfile extensionProfile; - - /* - * Read-only Hyper-V VM inventory reported by the device management extension for VMs visible on this node. - */ - private List workloadInventory; - - /* - * Last time the device management extension refreshed the local Hyper-V workload inventory. - */ - private OffsetDateTime workloadInventoryLastUpdated; - - /* - * Storage fabric initiator ports (iSCSI or Fibre Channel) discovered on the edge machine. - */ - private List storageInitiators; - - /** - * Creates an instance of EdgeMachineReportedProperties class. - */ - private EdgeMachineReportedProperties() { - } - - /** - * Get the lastUpdated property: Last time data reported. - * - * @return the lastUpdated value. - */ - public OffsetDateTime lastUpdated() { - return this.lastUpdated; - } - - /** - * Get the networkProfile property: Network details for edge machine. - * - * @return the networkProfile value. - */ - public EdgeMachineNetworkProfile networkProfile() { - return this.networkProfile; - } - - /** - * Get the osProfile property: OS Properties for edge machine. - * - * @return the osProfile value. - */ - public OsProfile osProfile() { - return this.osProfile; - } - - /** - * Get the hardwareProfile property: Hardware related information for edge machine. - * - * @return the hardwareProfile value. - */ - public HardwareProfile hardwareProfile() { - return this.hardwareProfile; - } - - /** - * Get the storageProfile property: Storage related information for edge machine. - * - * @return the storageProfile value. - */ - public StorageProfile storageProfile() { - return this.storageProfile; - } - - /** - * Get the sbeDeploymentPackageInfo property: Solution builder extension (SBE) deployment package information. - * - * @return the sbeDeploymentPackageInfo value. - */ - public SbeDeploymentPackageInfo sbeDeploymentPackageInfo() { - return this.sbeDeploymentPackageInfo; - } - - /** - * Get the extensionProfile property: Extension details for edge machine. - * - * @return the extensionProfile value. - */ - public ExtensionProfile extensionProfile() { - return this.extensionProfile; - } - - /** - * Get the workloadInventory property: Read-only Hyper-V VM inventory reported by the device management extension - * for VMs visible on this node. - * - * @return the workloadInventory value. - */ - public List workloadInventory() { - return this.workloadInventory; - } - - /** - * Get the workloadInventoryLastUpdated property: Last time the device management extension refreshed the local - * Hyper-V workload inventory. - * - * @return the workloadInventoryLastUpdated value. - */ - public OffsetDateTime workloadInventoryLastUpdated() { - return this.workloadInventoryLastUpdated; - } - - /** - * Get the storageInitiators property: Storage fabric initiator ports (iSCSI or Fibre Channel) discovered on the - * edge machine. - * - * @return the storageInitiators value. - */ - public List storageInitiators() { - return this.storageInitiators; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineReportedProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineReportedProperties. - */ - public static EdgeMachineReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineReportedProperties deserializedEdgeMachineReportedProperties - = new EdgeMachineReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("lastUpdated".equals(fieldName)) { - deserializedEdgeMachineReportedProperties.lastUpdated = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("networkProfile".equals(fieldName)) { - deserializedEdgeMachineReportedProperties.networkProfile - = EdgeMachineNetworkProfile.fromJson(reader); - } else if ("osProfile".equals(fieldName)) { - deserializedEdgeMachineReportedProperties.osProfile = OsProfile.fromJson(reader); - } else if ("hardwareProfile".equals(fieldName)) { - deserializedEdgeMachineReportedProperties.hardwareProfile = HardwareProfile.fromJson(reader); - } else if ("storageProfile".equals(fieldName)) { - deserializedEdgeMachineReportedProperties.storageProfile = StorageProfile.fromJson(reader); - } else if ("sbeDeploymentPackageInfo".equals(fieldName)) { - deserializedEdgeMachineReportedProperties.sbeDeploymentPackageInfo - = SbeDeploymentPackageInfo.fromJson(reader); - } else if ("extensionProfile".equals(fieldName)) { - deserializedEdgeMachineReportedProperties.extensionProfile = ExtensionProfile.fromJson(reader); - } else if ("workloadInventory".equals(fieldName)) { - List workloadInventory - = reader.readArray(reader1 -> EdgeMachineWorkloadInventoryItem.fromJson(reader1)); - deserializedEdgeMachineReportedProperties.workloadInventory = workloadInventory; - } else if ("workloadInventoryLastUpdated".equals(fieldName)) { - deserializedEdgeMachineReportedProperties.workloadInventoryLastUpdated = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("storageInitiators".equals(fieldName)) { - List storageInitiators - = reader.readArray(reader1 -> StorageInitiator.fromJson(reader1)); - deserializedEdgeMachineReportedProperties.storageInitiators = storageInitiators; - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineScaleUnits.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineScaleUnits.java deleted file mode 100644 index f484ea156ae8..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineScaleUnits.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A scale unit containing deployment data. - */ -@Fluent -public final class EdgeMachineScaleUnits implements JsonSerializable { - /* - * Deployment data to configure the edge machine. - */ - private EdgeMachineDeploymentData deploymentData; - - /** - * Creates an instance of EdgeMachineScaleUnits class. - */ - public EdgeMachineScaleUnits() { - } - - /** - * Get the deploymentData property: Deployment data to configure the edge machine. - * - * @return the deploymentData value. - */ - public EdgeMachineDeploymentData deploymentData() { - return this.deploymentData; - } - - /** - * Set the deploymentData property: Deployment data to configure the edge machine. - * - * @param deploymentData the deploymentData value to set. - * @return the EdgeMachineScaleUnits object itself. - */ - public EdgeMachineScaleUnits withDeploymentData(EdgeMachineDeploymentData deploymentData) { - this.deploymentData = deploymentData; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("deploymentData", this.deploymentData); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineScaleUnits from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineScaleUnits if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineScaleUnits. - */ - public static EdgeMachineScaleUnits fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineScaleUnits deserializedEdgeMachineScaleUnits = new EdgeMachineScaleUnits(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentData".equals(fieldName)) { - deserializedEdgeMachineScaleUnits.deploymentData = EdgeMachineDeploymentData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineScaleUnits; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityComplianceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityComplianceStatus.java deleted file mode 100644 index 97a0831470df..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityComplianceStatus.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Compliance status payload for edge machine security settings. - */ -@Immutable -public final class EdgeMachineSecurityComplianceStatus - implements JsonSerializable { - /* - * FIPS compliance status. - */ - private ComplianceStatus fipsStatus; - - /* - * Secure Boot compliance status. - */ - private ComplianceStatus secureBootStatus; - - /* - * Encryption at rest compliance status. - */ - private ComplianceStatus encryptionAtRestStatus; - - /* - * SELinux policy compliance status. - */ - private ComplianceStatus seLinuxPolicyStatus; - - /* - * Security baseline compliance status. - */ - private ComplianceStatus securityBaselineStatus; - - /** - * Creates an instance of EdgeMachineSecurityComplianceStatus class. - */ - private EdgeMachineSecurityComplianceStatus() { - } - - /** - * Get the fipsStatus property: FIPS compliance status. - * - * @return the fipsStatus value. - */ - public ComplianceStatus fipsStatus() { - return this.fipsStatus; - } - - /** - * Get the secureBootStatus property: Secure Boot compliance status. - * - * @return the secureBootStatus value. - */ - public ComplianceStatus secureBootStatus() { - return this.secureBootStatus; - } - - /** - * Get the encryptionAtRestStatus property: Encryption at rest compliance status. - * - * @return the encryptionAtRestStatus value. - */ - public ComplianceStatus encryptionAtRestStatus() { - return this.encryptionAtRestStatus; - } - - /** - * Get the seLinuxPolicyStatus property: SELinux policy compliance status. - * - * @return the seLinuxPolicyStatus value. - */ - public ComplianceStatus seLinuxPolicyStatus() { - return this.seLinuxPolicyStatus; - } - - /** - * Get the securityBaselineStatus property: Security baseline compliance status. - * - * @return the securityBaselineStatus value. - */ - public ComplianceStatus securityBaselineStatus() { - return this.securityBaselineStatus; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineSecurityComplianceStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineSecurityComplianceStatus if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineSecurityComplianceStatus. - */ - public static EdgeMachineSecurityComplianceStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineSecurityComplianceStatus deserializedEdgeMachineSecurityComplianceStatus - = new EdgeMachineSecurityComplianceStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fipsStatus".equals(fieldName)) { - deserializedEdgeMachineSecurityComplianceStatus.fipsStatus - = ComplianceStatus.fromString(reader.getString()); - } else if ("secureBootStatus".equals(fieldName)) { - deserializedEdgeMachineSecurityComplianceStatus.secureBootStatus - = ComplianceStatus.fromString(reader.getString()); - } else if ("encryptionAtRestStatus".equals(fieldName)) { - deserializedEdgeMachineSecurityComplianceStatus.encryptionAtRestStatus - = ComplianceStatus.fromString(reader.getString()); - } else if ("seLinuxPolicyStatus".equals(fieldName)) { - deserializedEdgeMachineSecurityComplianceStatus.seLinuxPolicyStatus - = ComplianceStatus.fromString(reader.getString()); - } else if ("securityBaselineStatus".equals(fieldName)) { - deserializedEdgeMachineSecurityComplianceStatus.securityBaselineStatus - = ComplianceStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineSecurityComplianceStatus; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityProperties.java deleted file mode 100644 index 199918f7c854..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityProperties.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Properties of an Edge Machine Security Settings resource. - */ -@Immutable -public final class EdgeMachineSecurityProperties implements JsonSerializable { - /* - * The provisioning state of the resource. - */ - private ProvisioningState provisioningState; - - /* - * Compliance status values synchronized from Guest Configuration. - */ - private EdgeMachineSecurityComplianceStatus securityComplianceStatus; - - /* - * First synchronization timestamp in UTC. - */ - private OffsetDateTime registrationTimestamp; - - /* - * Most recent synchronization timestamp in UTC. - */ - private OffsetDateTime lastSyncTimestamp; - - /** - * Creates an instance of EdgeMachineSecurityProperties class. - */ - public EdgeMachineSecurityProperties() { - } - - /** - * Get the provisioningState property: The provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the securityComplianceStatus property: Compliance status values synchronized from Guest Configuration. - * - * @return the securityComplianceStatus value. - */ - public EdgeMachineSecurityComplianceStatus securityComplianceStatus() { - return this.securityComplianceStatus; - } - - /** - * Get the registrationTimestamp property: First synchronization timestamp in UTC. - * - * @return the registrationTimestamp value. - */ - public OffsetDateTime registrationTimestamp() { - return this.registrationTimestamp; - } - - /** - * Get the lastSyncTimestamp property: Most recent synchronization timestamp in UTC. - * - * @return the lastSyncTimestamp value. - */ - public OffsetDateTime lastSyncTimestamp() { - return this.lastSyncTimestamp; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineSecurityProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineSecurityProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineSecurityProperties. - */ - public static EdgeMachineSecurityProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineSecurityProperties deserializedEdgeMachineSecurityProperties - = new EdgeMachineSecurityProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineSecurityProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("securityComplianceStatus".equals(fieldName)) { - deserializedEdgeMachineSecurityProperties.securityComplianceStatus - = EdgeMachineSecurityComplianceStatus.fromJson(reader); - } else if ("registrationTimestamp".equals(fieldName)) { - deserializedEdgeMachineSecurityProperties.registrationTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastSyncTimestamp".equals(fieldName)) { - deserializedEdgeMachineSecurityProperties.lastSyncTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineSecurityProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettings.java deleted file mode 100644 index f17ff430bd0e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettings.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineSecuritySettingsInner; - -/** - * An immutable client-side representation of EdgeMachineSecuritySettings. - */ -public interface EdgeMachineSecuritySettings { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineSecurityProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineSecuritySettingsInner object. - * - * @return the inner object. - */ - EdgeMachineSecuritySettingsInner innerModel(); - - /** - * The entirety of the EdgeMachineSecuritySettings definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The EdgeMachineSecuritySettings definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EdgeMachineSecuritySettings definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EdgeMachineSecuritySettings definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, edgeMachineName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @return the next definition stage. - */ - WithCreate withExistingEdgeMachine(String resourceGroupName, String edgeMachineName); - } - - /** - * The stage of the EdgeMachineSecuritySettings definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeMachineSecuritySettings create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeMachineSecuritySettings create(Context context); - } - - /** - * The stage of the EdgeMachineSecuritySettings definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EdgeMachineSecurityProperties properties); - } - } - - /** - * Begins update for the EdgeMachineSecuritySettings resource. - * - * @return the stage of resource update. - */ - EdgeMachineSecuritySettings.Update update(); - - /** - * The template for EdgeMachineSecuritySettings update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeMachineSecuritySettings apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeMachineSecuritySettings apply(Context context); - } - - /** - * The EdgeMachineSecuritySettings update stages. - */ - interface UpdateStages { - /** - * The stage of the EdgeMachineSecuritySettings update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(EdgeMachineSecurityProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeMachineSecuritySettings refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeMachineSecuritySettings refresh(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettingsOperations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettingsOperations.java deleted file mode 100644 index 36994665c4cd..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettingsOperations.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachineSecuritySettingsOperations. - */ -public interface EdgeMachineSecuritySettingsOperations { - /** - * Get an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String edgeMachineName, - String securitySettingsName, Context context); - - /** - * Get an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings. - */ - EdgeMachineSecuritySettings get(String resourceGroupName, String edgeMachineName, String securitySettingsName); - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String securitySettingsName); - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param securitySettingsName Name of the security settings resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String securitySettingsName, Context context); - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByEdgeMachine(String resourceGroupName, String edgeMachineName); - - /** - * List EdgeMachineSecuritySettings by EdgeMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineSecuritySettings list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByEdgeMachine(String resourceGroupName, String edgeMachineName, - Context context); - - /** - * Get an EdgeMachineSecuritySettings. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings along with {@link Response}. - */ - EdgeMachineSecuritySettings getById(String id); - - /** - * Get an EdgeMachineSecuritySettings. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an EdgeMachineSecuritySettings along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete an EdgeMachineSecuritySettings. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeMachineSecuritySettings resource. - * - * @param name resource name. - * @return the first stage of the new EdgeMachineSecuritySettings definition. - */ - EdgeMachineSecuritySettings.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineState.java deleted file mode 100644 index cf9b3e920b58..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineState.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * OS State. - */ -public final class EdgeMachineState extends ExpandableStringEnum { - /** - * Created when EdgeMachine resource created. - */ - public static final EdgeMachineState CREATED = fromString("Created"); - - /** - * EdgeMachine state during device discovery and registration. - */ - public static final EdgeMachineState REGISTERING = fromString("Registering"); - - /** - * EdgeMachine state when machine configured with restricted OS and not provisioned to deploy workloads. - */ - public static final EdgeMachineState UNPURPOSED = fromString("Unpurposed"); - - /** - * EdgeMachine state when transitioning from initial OS to target OS. - */ - public static final EdgeMachineState TRANSITIONING = fromString("Transitioning"); - - /** - * EdgeMachine state when machine configured with target OS to deploy workloads. - */ - public static final EdgeMachineState PURPOSED = fromString("Purposed"); - - /** - * EdgeMachine state when OS updates are in-progress. - */ - public static final EdgeMachineState UPDATING = fromString("Updating"); - - /** - * EdgeMachine state when transitioning from target OS to restricted OS. - */ - public static final EdgeMachineState RESETTING = fromString("Resetting"); - - /** - * EdgeMachine failed state and only option to recover is to re-provisioning machine. - */ - public static final EdgeMachineState FAILED = fromString("Failed"); - - /** - * Preparing EdgeMachine. - */ - public static final EdgeMachineState PREPARING = fromString("Preparing"); - - /** - * Creates a new instance of EdgeMachineState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EdgeMachineState() { - } - - /** - * Creates or finds a EdgeMachineState from its string representation. - * - * @param name a name to look for. - * @return the corresponding EdgeMachineState. - */ - public static EdgeMachineState fromString(String name) { - return fromString(name, EdgeMachineState.class); - } - - /** - * Gets known EdgeMachineState values. - * - * @return known EdgeMachineState values. - */ - public static Collection values() { - return values(EdgeMachineState.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageAdapterIpInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageAdapterIpInfo.java deleted file mode 100644 index dba27510db6b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageAdapterIpInfo.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The StorageAdapter physical nodes reported for the edge machine. - */ -@Immutable -public final class EdgeMachineStorageAdapterIpInfo implements JsonSerializable { - /* - * storage adapter physical node name. - */ - private String physicalNode; - - /* - * The IPv4 address assigned to each storage adapter physical node on your Azure Stack HCI cluster. - */ - private String ipv4Address; - - /* - * The SubnetMask address assigned to each storage adapter physical node on your Azure Stack HCI cluster. - */ - private String subnetMask; - - /** - * Creates an instance of EdgeMachineStorageAdapterIpInfo class. - */ - private EdgeMachineStorageAdapterIpInfo() { - } - - /** - * Get the physicalNode property: storage adapter physical node name. - * - * @return the physicalNode value. - */ - public String physicalNode() { - return this.physicalNode; - } - - /** - * Get the ipv4Address property: The IPv4 address assigned to each storage adapter physical node on your Azure Stack - * HCI cluster. - * - * @return the ipv4Address value. - */ - public String ipv4Address() { - return this.ipv4Address; - } - - /** - * Get the subnetMask property: The SubnetMask address assigned to each storage adapter physical node on your Azure - * Stack HCI cluster. - * - * @return the subnetMask value. - */ - public String subnetMask() { - return this.subnetMask; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineStorageAdapterIpInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineStorageAdapterIpInfo if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineStorageAdapterIpInfo. - */ - public static EdgeMachineStorageAdapterIpInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineStorageAdapterIpInfo deserializedEdgeMachineStorageAdapterIpInfo - = new EdgeMachineStorageAdapterIpInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("physicalNode".equals(fieldName)) { - deserializedEdgeMachineStorageAdapterIpInfo.physicalNode = reader.getString(); - } else if ("ipv4Address".equals(fieldName)) { - deserializedEdgeMachineStorageAdapterIpInfo.ipv4Address = reader.getString(); - } else if ("subnetMask".equals(fieldName)) { - deserializedEdgeMachineStorageAdapterIpInfo.subnetMask = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineStorageAdapterIpInfo; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageNetwork.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageNetwork.java deleted file mode 100644 index 119f23800f19..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageNetwork.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The StorageNetworks reported for the edge machine. - */ -@Immutable -public final class EdgeMachineStorageNetwork implements JsonSerializable { - /* - * Name of the storage network. - */ - private String name; - - /* - * Name of the storage network adapter. - */ - private String networkAdapterName; - - /* - * ID specified for the VLAN storage network. This setting is applied to the network interfaces that route the - * storage and VM migration traffic. - */ - private String storageVlanId; - - /* - * List of Storage adapter physical nodes config to deploy AzureStackHCI Cluster. - */ - private List storageAdapterIPInfo; - - /** - * Creates an instance of EdgeMachineStorageNetwork class. - */ - private EdgeMachineStorageNetwork() { - } - - /** - * Get the name property: Name of the storage network. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the networkAdapterName property: Name of the storage network adapter. - * - * @return the networkAdapterName value. - */ - public String networkAdapterName() { - return this.networkAdapterName; - } - - /** - * Get the storageVlanId property: ID specified for the VLAN storage network. This setting is applied to the network - * interfaces that route the storage and VM migration traffic. - * - * @return the storageVlanId value. - */ - public String storageVlanId() { - return this.storageVlanId; - } - - /** - * Get the storageAdapterIPInfo property: List of Storage adapter physical nodes config to deploy AzureStackHCI - * Cluster. - * - * @return the storageAdapterIPInfo value. - */ - public List storageAdapterIPInfo() { - return this.storageAdapterIPInfo; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineStorageNetwork from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineStorageNetwork if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineStorageNetwork. - */ - public static EdgeMachineStorageNetwork fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineStorageNetwork deserializedEdgeMachineStorageNetwork = new EdgeMachineStorageNetwork(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedEdgeMachineStorageNetwork.name = reader.getString(); - } else if ("networkAdapterName".equals(fieldName)) { - deserializedEdgeMachineStorageNetwork.networkAdapterName = reader.getString(); - } else if ("storageVlanId".equals(fieldName)) { - deserializedEdgeMachineStorageNetwork.storageVlanId = reader.getString(); - } else if ("storageAdapterIPInfo".equals(fieldName)) { - List storageAdapterIPInfo - = reader.readArray(reader1 -> EdgeMachineStorageAdapterIpInfo.fromJson(reader1)); - deserializedEdgeMachineStorageNetwork.storageAdapterIPInfo = storageAdapterIPInfo; - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineStorageNetwork; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateRequest.java deleted file mode 100644 index 84c315eeafa4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateRequest.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The validate request for Edge Machine. - */ -@Fluent -public final class EdgeMachineValidateRequest implements JsonSerializable { - /* - * Machine Ids against which, current machine has to be validated. - */ - private List edgeMachineIds; - - /* - * Additional info required for validation. - */ - private String additionalInfo; - - /** - * Creates an instance of EdgeMachineValidateRequest class. - */ - public EdgeMachineValidateRequest() { - } - - /** - * Get the edgeMachineIds property: Machine Ids against which, current machine has to be validated. - * - * @return the edgeMachineIds value. - */ - public List edgeMachineIds() { - return this.edgeMachineIds; - } - - /** - * Set the edgeMachineIds property: Machine Ids against which, current machine has to be validated. - * - * @param edgeMachineIds the edgeMachineIds value to set. - * @return the EdgeMachineValidateRequest object itself. - */ - public EdgeMachineValidateRequest withEdgeMachineIds(List edgeMachineIds) { - this.edgeMachineIds = edgeMachineIds; - return this; - } - - /** - * Get the additionalInfo property: Additional info required for validation. - * - * @return the additionalInfo value. - */ - public String additionalInfo() { - return this.additionalInfo; - } - - /** - * Set the additionalInfo property: Additional info required for validation. - * - * @param additionalInfo the additionalInfo value to set. - * @return the EdgeMachineValidateRequest object itself. - */ - public EdgeMachineValidateRequest withAdditionalInfo(String additionalInfo) { - this.additionalInfo = additionalInfo; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("edgeMachineIds", this.edgeMachineIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("additionalInfo", this.additionalInfo); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineValidateRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineValidateRequest if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EdgeMachineValidateRequest. - */ - public static EdgeMachineValidateRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineValidateRequest deserializedEdgeMachineValidateRequest = new EdgeMachineValidateRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("edgeMachineIds".equals(fieldName)) { - List edgeMachineIds = reader.readArray(reader1 -> reader1.getString()); - deserializedEdgeMachineValidateRequest.edgeMachineIds = edgeMachineIds; - } else if ("additionalInfo".equals(fieldName)) { - deserializedEdgeMachineValidateRequest.additionalInfo = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineValidateRequest; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateResponse.java deleted file mode 100644 index fbaa17e0b809..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineValidateResponseInner; - -/** - * An immutable client-side representation of EdgeMachineValidateResponse. - */ -public interface EdgeMachineValidateResponse { - /** - * Gets the status property: Edge machine validation status. - * - * @return the status value. - */ - String status(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineValidateResponseInner object. - * - * @return the inner object. - */ - EdgeMachineValidateResponseInner innerModel(); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVirtualSwitchConfigurationOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVirtualSwitchConfigurationOverrides.java deleted file mode 100644 index 3bc5421e7949..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVirtualSwitchConfigurationOverrides.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The VirtualSwitchConfigurationOverrides reported for the edge machine. - */ -@Immutable -public final class EdgeMachineVirtualSwitchConfigurationOverrides - implements JsonSerializable { - /* - * Enable IoV for Virtual Switch - */ - private String enableIov; - - /* - * Load Balancing Algorithm for Virtual Switch - */ - private String loadBalancingAlgorithm; - - /** - * Creates an instance of EdgeMachineVirtualSwitchConfigurationOverrides class. - */ - private EdgeMachineVirtualSwitchConfigurationOverrides() { - } - - /** - * Get the enableIov property: Enable IoV for Virtual Switch. - * - * @return the enableIov value. - */ - public String enableIov() { - return this.enableIov; - } - - /** - * Get the loadBalancingAlgorithm property: Load Balancing Algorithm for Virtual Switch. - * - * @return the loadBalancingAlgorithm value. - */ - public String loadBalancingAlgorithm() { - return this.loadBalancingAlgorithm; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineVirtualSwitchConfigurationOverrides from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineVirtualSwitchConfigurationOverrides if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineVirtualSwitchConfigurationOverrides. - */ - public static EdgeMachineVirtualSwitchConfigurationOverrides fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineVirtualSwitchConfigurationOverrides deserializedEdgeMachineVirtualSwitchConfigurationOverrides - = new EdgeMachineVirtualSwitchConfigurationOverrides(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableIov".equals(fieldName)) { - deserializedEdgeMachineVirtualSwitchConfigurationOverrides.enableIov = reader.getString(); - } else if ("loadBalancingAlgorithm".equals(fieldName)) { - deserializedEdgeMachineVirtualSwitchConfigurationOverrides.loadBalancingAlgorithm - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineVirtualSwitchConfigurationOverrides; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolume.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolume.java deleted file mode 100644 index 54b694b500c5..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolume.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineVolumeInner; - -/** - * An immutable client-side representation of EdgeMachineVolume. - */ -public interface EdgeMachineVolume { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - EdgeMachineVolumeProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineVolumeInner object. - * - * @return the inner object. - */ - EdgeMachineVolumeInner innerModel(); - - /** - * The entirety of the EdgeMachineVolume definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The EdgeMachineVolume definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EdgeMachineVolume definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EdgeMachineVolume definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, edgeMachineName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @return the next definition stage. - */ - WithCreate withExistingEdgeMachine(String resourceGroupName, String edgeMachineName); - } - - /** - * The stage of the EdgeMachineVolume definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeMachineVolume create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeMachineVolume create(Context context); - } - - /** - * The stage of the EdgeMachineVolume definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(EdgeMachineVolumeProperties properties); - } - } - - /** - * Begins update for the EdgeMachineVolume resource. - * - * @return the stage of resource update. - */ - EdgeMachineVolume.Update update(); - - /** - * The template for EdgeMachineVolume update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeMachineVolume apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeMachineVolume apply(Context context); - } - - /** - * The EdgeMachineVolume update stages. - */ - interface UpdateStages { - /** - * The stage of the EdgeMachineVolume update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(EdgeMachineVolumeProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeMachineVolume refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeMachineVolume refresh(Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumeProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumeProperties.java deleted file mode 100644 index 12fe4fa7a217..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumeProperties.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of a volume. - */ -@Fluent -public final class EdgeMachineVolumeProperties implements JsonSerializable { - /* - * Desired configuration for this volume. - */ - private VolumeConfiguration volumeConfiguration; - - /* - * The actual state of the volume as reported by the device. - */ - private VolumeReportedProperties reportedProperties; - - /* - * Provisioning state of the volume resource. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of EdgeMachineVolumeProperties class. - */ - public EdgeMachineVolumeProperties() { - } - - /** - * Get the volumeConfiguration property: Desired configuration for this volume. - * - * @return the volumeConfiguration value. - */ - public VolumeConfiguration volumeConfiguration() { - return this.volumeConfiguration; - } - - /** - * Set the volumeConfiguration property: Desired configuration for this volume. - * - * @param volumeConfiguration the volumeConfiguration value to set. - * @return the EdgeMachineVolumeProperties object itself. - */ - public EdgeMachineVolumeProperties withVolumeConfiguration(VolumeConfiguration volumeConfiguration) { - this.volumeConfiguration = volumeConfiguration; - return this; - } - - /** - * Get the reportedProperties property: The actual state of the volume as reported by the device. - * - * @return the reportedProperties value. - */ - public VolumeReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Get the provisioningState property: Provisioning state of the volume resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("volumeConfiguration", this.volumeConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineVolumeProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineVolumeProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineVolumeProperties. - */ - public static EdgeMachineVolumeProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineVolumeProperties deserializedEdgeMachineVolumeProperties = new EdgeMachineVolumeProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("volumeConfiguration".equals(fieldName)) { - deserializedEdgeMachineVolumeProperties.volumeConfiguration = VolumeConfiguration.fromJson(reader); - } else if ("reportedProperties".equals(fieldName)) { - deserializedEdgeMachineVolumeProperties.reportedProperties - = VolumeReportedProperties.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedEdgeMachineVolumeProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineVolumeProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumes.java deleted file mode 100644 index 68b0f819d993..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumes.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachineVolumes. - */ -public interface EdgeMachineVolumes { - /** - * Get a specific volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String edgeMachineName, String volumeName, - Context context); - - /** - * Get a specific volume on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine. - */ - EdgeMachineVolume get(String resourceGroupName, String edgeMachineName, String volumeName); - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName); - - /** - * List all volumes on an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachineVolume list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String edgeMachineName, Context context); - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String volumeName); - - /** - * Delete a volume from an Edge Machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param volumeName The name of the EdgeMachineVolume. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, String volumeName, Context context); - - /** - * Get a specific volume on an Edge Machine. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine along with {@link Response}. - */ - EdgeMachineVolume getById(String id); - - /** - * Get a specific volume on an Edge Machine. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific volume on an Edge Machine along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a volume from an Edge Machine. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a volume from an Edge Machine. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeMachineVolume resource. - * - * @param name resource name. - * @return the first stage of the new EdgeMachineVolume definition. - */ - EdgeMachineVolume.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineWorkloadInventoryItem.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineWorkloadInventoryItem.java deleted file mode 100644 index 1d67b91cd130..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineWorkloadInventoryItem.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents a single workload (Hyper-V VM) inventory entry reported by the device management extension running on the - * edge machine. - */ -@Immutable -public final class EdgeMachineWorkloadInventoryItem implements JsonSerializable { - /* - * Stable device-reported workload identifier, such as the Hyper-V VM ID when available. - */ - private String workloadId; - - /* - * Hyper-V VM name. - */ - private String name; - - /* - * Optional ARM resource ID when the service can map the local VM to an ARM resource. - */ - private String resourceId; - - /* - * Workload type. For v1 this should be VirtualMachine. - */ - private String workloadType; - - /* - * Hyper-V VM state reported by the node. - */ - private String state; - - /* - * Configured virtual processor count from Hyper-V. - */ - private String virtualProcessorCount; - - /* - * Maximum memory the VM can consume, in bytes. - */ - private String memoryInBytes; - - /** - * Creates an instance of EdgeMachineWorkloadInventoryItem class. - */ - private EdgeMachineWorkloadInventoryItem() { - } - - /** - * Get the workloadId property: Stable device-reported workload identifier, such as the Hyper-V VM ID when - * available. - * - * @return the workloadId value. - */ - public String workloadId() { - return this.workloadId; - } - - /** - * Get the name property: Hyper-V VM name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the resourceId property: Optional ARM resource ID when the service can map the local VM to an ARM resource. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Get the workloadType property: Workload type. For v1 this should be VirtualMachine. - * - * @return the workloadType value. - */ - public String workloadType() { - return this.workloadType; - } - - /** - * Get the state property: Hyper-V VM state reported by the node. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Get the virtualProcessorCount property: Configured virtual processor count from Hyper-V. - * - * @return the virtualProcessorCount value. - */ - public String virtualProcessorCount() { - return this.virtualProcessorCount; - } - - /** - * Get the memoryInBytes property: Maximum memory the VM can consume, in bytes. - * - * @return the memoryInBytes value. - */ - public String memoryInBytes() { - return this.memoryInBytes; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EdgeMachineWorkloadInventoryItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EdgeMachineWorkloadInventoryItem if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EdgeMachineWorkloadInventoryItem. - */ - public static EdgeMachineWorkloadInventoryItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EdgeMachineWorkloadInventoryItem deserializedEdgeMachineWorkloadInventoryItem - = new EdgeMachineWorkloadInventoryItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("workloadId".equals(fieldName)) { - deserializedEdgeMachineWorkloadInventoryItem.workloadId = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEdgeMachineWorkloadInventoryItem.name = reader.getString(); - } else if ("resourceId".equals(fieldName)) { - deserializedEdgeMachineWorkloadInventoryItem.resourceId = reader.getString(); - } else if ("workloadType".equals(fieldName)) { - deserializedEdgeMachineWorkloadInventoryItem.workloadType = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedEdgeMachineWorkloadInventoryItem.state = reader.getString(); - } else if ("virtualProcessorCount".equals(fieldName)) { - deserializedEdgeMachineWorkloadInventoryItem.virtualProcessorCount = reader.getString(); - } else if ("memoryInBytes".equals(fieldName)) { - deserializedEdgeMachineWorkloadInventoryItem.memoryInBytes = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEdgeMachineWorkloadInventoryItem; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachines.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachines.java deleted file mode 100644 index f337f53590d0..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachines.java +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of EdgeMachines. - */ -public interface EdgeMachines { - /** - * Get an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String edgeMachineName, - Context context); - - /** - * Get an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine. - */ - EdgeMachine getByResourceGroup(String resourceGroupName, String edgeMachineName); - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String edgeMachineName); - - /** - * Delete an edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String edgeMachineName, Context context); - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List all edge machines in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List all edge machines in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List all edge machines in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a EdgeMachine list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine. - */ - EdgeMachineValidateResponse validate(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body); - - /** - * A long-running resource action to validate the edge machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the validate response for Edge Machine. - */ - EdgeMachineValidateResponse validate(String resourceGroupName, String edgeMachineName, - EdgeMachineValidateRequest body, Context context); - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void refreshSecuritySettings(String resourceGroupName, String edgeMachineName); - - /** - * Trigger an on-demand sync of edge machine security settings from Guest Configuration. - * Creates the default security settings child resource if it does not already exist. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void refreshSecuritySettings(String resourceGroupName, String edgeMachineName, Context context); - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void refreshApplicableUpdates(String resourceGroupName, String edgeMachineName); - - /** - * Trigger an on-demand refresh of applicable updates for the edge machine. - * Creates or updates the default EdgeMachineUpdate child resource with the latest set of applicable updates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param edgeMachineName Name of Device. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void refreshApplicableUpdates(String resourceGroupName, String edgeMachineName, Context context); - - /** - * Get an edge machine. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine along with {@link Response}. - */ - EdgeMachine getById(String id); - - /** - * Get an edge machine. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an edge machine along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete an edge machine. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete an edge machine. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeMachine resource. - * - * @param name resource name. - * @return the first stage of the new EdgeMachine definition. - */ - EdgeMachine.DefinitionStages.Blank define(String name); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ForcePushNetworkAdapterJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ForcePushNetworkAdapterJobProperties.java deleted file mode 100644 index 415bb1cc9b1c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ForcePushNetworkAdapterJobProperties.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties for force push of network adapter configuration. - */ -@Fluent -public final class ForcePushNetworkAdapterJobProperties extends EdgeMachineNetworkAdapterJobProperties { - /* - * Type of operation. - */ - private NetworkAdapterJobType jobType = NetworkAdapterJobType.FORCE_PUSH; - - /** - * Creates an instance of ForcePushNetworkAdapterJobProperties class. - */ - public ForcePushNetworkAdapterJobProperties() { - } - - /** - * Get the jobType property: Type of operation. - * - * @return the jobType value. - */ - @Override - public NetworkAdapterJobType jobType() { - return this.jobType; - } - - /** - * {@inheritDoc} - */ - @Override - public ForcePushNetworkAdapterJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ForcePushNetworkAdapterJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ForcePushNetworkAdapterJobProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ForcePushNetworkAdapterJobProperties. - */ - public static ForcePushNetworkAdapterJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ForcePushNetworkAdapterJobProperties deserializedForcePushNetworkAdapterJobProperties - = new ForcePushNetworkAdapterJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedForcePushNetworkAdapterJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedForcePushNetworkAdapterJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedForcePushNetworkAdapterJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedForcePushNetworkAdapterJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedForcePushNetworkAdapterJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedForcePushNetworkAdapterJobProperties - .withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedForcePushNetworkAdapterJobProperties.withError(ManagementError.fromJson(reader)); - } else if ("reportedProperties".equals(fieldName)) { - deserializedForcePushNetworkAdapterJobProperties - .withReportedProperties(NetworkAdapterJobReportedProperties.fromJson(reader)); - } else if ("jobType".equals(fieldName)) { - deserializedForcePushNetworkAdapterJobProperties.jobType - = NetworkAdapterJobType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedForcePushNetworkAdapterJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfile.java deleted file mode 100644 index 1ca950ae2182..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfile.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Hardware profile for the machine. - */ -@Immutable -public final class HardwareProfile implements JsonSerializable { - /* - * Number of cpu cores in the machine - */ - private Long cpuCores; - - /* - * Number of cpu sockets in the machine - */ - private Long cpuSockets; - - /* - * Memory capacity of the machine - */ - private Long memoryCapacityInGb; - - /* - * Model info of the machine - */ - private String model; - - /* - * manufacturer info of the machine - */ - private String manufacturer; - - /* - * Serial number of the machine - */ - private String serialNumber; - - /* - * Process type of the machine - */ - private String processorType; - - /* - * CPU architecture of the machine, for example amd64 or arm64. - */ - private Architecture architecture; - - /** - * Creates an instance of HardwareProfile class. - */ - private HardwareProfile() { - } - - /** - * Get the cpuCores property: Number of cpu cores in the machine. - * - * @return the cpuCores value. - */ - public Long cpuCores() { - return this.cpuCores; - } - - /** - * Get the cpuSockets property: Number of cpu sockets in the machine. - * - * @return the cpuSockets value. - */ - public Long cpuSockets() { - return this.cpuSockets; - } - - /** - * Get the memoryCapacityInGb property: Memory capacity of the machine. - * - * @return the memoryCapacityInGb value. - */ - public Long memoryCapacityInGb() { - return this.memoryCapacityInGb; - } - - /** - * Get the model property: Model info of the machine. - * - * @return the model value. - */ - public String model() { - return this.model; - } - - /** - * Get the manufacturer property: manufacturer info of the machine. - * - * @return the manufacturer value. - */ - public String manufacturer() { - return this.manufacturer; - } - - /** - * Get the serialNumber property: Serial number of the machine. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Get the processorType property: Process type of the machine. - * - * @return the processorType value. - */ - public String processorType() { - return this.processorType; - } - - /** - * Get the architecture property: CPU architecture of the machine, for example amd64 or arm64. - * - * @return the architecture value. - */ - public Architecture architecture() { - return this.architecture; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HardwareProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HardwareProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HardwareProfile. - */ - public static HardwareProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HardwareProfile deserializedHardwareProfile = new HardwareProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cpuCores".equals(fieldName)) { - deserializedHardwareProfile.cpuCores = reader.getNullable(JsonReader::getLong); - } else if ("cpuSockets".equals(fieldName)) { - deserializedHardwareProfile.cpuSockets = reader.getNullable(JsonReader::getLong); - } else if ("memoryCapacityInGb".equals(fieldName)) { - deserializedHardwareProfile.memoryCapacityInGb = reader.getNullable(JsonReader::getLong); - } else if ("model".equals(fieldName)) { - deserializedHardwareProfile.model = reader.getString(); - } else if ("manufacturer".equals(fieldName)) { - deserializedHardwareProfile.manufacturer = reader.getString(); - } else if ("serialNumber".equals(fieldName)) { - deserializedHardwareProfile.serialNumber = reader.getString(); - } else if ("processorType".equals(fieldName)) { - deserializedHardwareProfile.processorType = reader.getString(); - } else if ("architecture".equals(fieldName)) { - deserializedHardwareProfile.architecture = Architecture.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedHardwareProfile; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciAddServerJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciAddServerJobProperties.java deleted file mode 100644 index 0ea26449e3fb..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciAddServerJobProperties.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties for adding a server in the cluster. - */ -@Fluent -public final class HciAddServerJobProperties extends ClusterJobProperties { - /* - * Job Type to support polymorphic resource. - */ - private HciJobType jobType = HciJobType.ADD_SERVER; - - /* - * Details of servers to be added to the cluster. - */ - private List addServerJobServerDetails; - - /* - * List of protected parameters to pass to trigger the job for the cluster. - */ - private List secrets; - - /** - * Creates an instance of HciAddServerJobProperties class. - */ - public HciAddServerJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public HciJobType jobType() { - return this.jobType; - } - - /** - * Get the addServerJobServerDetails property: Details of servers to be added to the cluster. - * - * @return the addServerJobServerDetails value. - */ - public List addServerJobServerDetails() { - return this.addServerJobServerDetails; - } - - /** - * Set the addServerJobServerDetails property: Details of servers to be added to the cluster. - * - * @param addServerJobServerDetails the addServerJobServerDetails value to set. - * @return the HciAddServerJobProperties object itself. - */ - public HciAddServerJobProperties - withAddServerJobServerDetails(List addServerJobServerDetails) { - this.addServerJobServerDetails = addServerJobServerDetails; - return this; - } - - /** - * Get the secrets property: List of protected parameters to pass to trigger the job for the cluster. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: List of protected parameters to pass to trigger the job for the cluster. - * - * @param secrets the secrets value to set. - * @return the HciAddServerJobProperties object itself. - */ - public HciAddServerJobProperties withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HciAddServerJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeArrayField("addServerJobServerDetails", this.addServerJobServerDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HciAddServerJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HciAddServerJobProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the HciAddServerJobProperties. - */ - public static HciAddServerJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HciAddServerJobProperties deserializedHciAddServerJobProperties = new HciAddServerJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedHciAddServerJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedHciAddServerJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedHciAddServerJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedHciAddServerJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedHciAddServerJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedHciAddServerJobProperties.withStatus(JobStatus.fromString(reader.getString())); - } else if ("reportedProperties".equals(fieldName)) { - deserializedHciAddServerJobProperties - .withReportedProperties(JobReportedProperties.fromJson(reader)); - } else if ("addServerJobServerDetails".equals(fieldName)) { - List addServerJobServerDetails - = reader.readArray(reader1 -> AddServerJobServerDetails.fromJson(reader1)); - deserializedHciAddServerJobProperties.addServerJobServerDetails = addServerJobServerDetails; - } else if ("jobType".equals(fieldName)) { - deserializedHciAddServerJobProperties.jobType = HciJobType.fromString(reader.getString()); - } else if ("secrets".equals(fieldName)) { - List secrets - = reader.readArray(reader1 -> EceDeploymentSecrets.fromJson(reader1)); - deserializedHciAddServerJobProperties.secrets = secrets; - } else { - reader.skipChildren(); - } - } - - return deserializedHciAddServerJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciConfigureSdnIntegrationJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciConfigureSdnIntegrationJobProperties.java deleted file mode 100644 index c77442ded9dc..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciConfigureSdnIntegrationJobProperties.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties for configuring SDN integration intent for the cluster. - */ -@Fluent -public final class HciConfigureSdnIntegrationJobProperties extends ClusterJobProperties { - /* - * Job Type to support polymorphic resource. - */ - private HciJobType jobType = HciJobType.CONFIGURE_SDN_INTEGRATION; - - /* - * Defines the customer's intent for configuring SDN integration - */ - private SdnIntegrationIntent sdnIntegrationIntent; - - /* - * A string identifier used to construct the Network Controller (NC) REST resource name. This prefix helps group and - * distinguish SDN-managed network components and must follow specific formatting rules. - */ - private String sdnPrefix; - - /** - * Creates an instance of HciConfigureSdnIntegrationJobProperties class. - */ - public HciConfigureSdnIntegrationJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public HciJobType jobType() { - return this.jobType; - } - - /** - * Get the sdnIntegrationIntent property: Defines the customer's intent for configuring SDN integration. - * - * @return the sdnIntegrationIntent value. - */ - public SdnIntegrationIntent sdnIntegrationIntent() { - return this.sdnIntegrationIntent; - } - - /** - * Set the sdnIntegrationIntent property: Defines the customer's intent for configuring SDN integration. - * - * @param sdnIntegrationIntent the sdnIntegrationIntent value to set. - * @return the HciConfigureSdnIntegrationJobProperties object itself. - */ - public HciConfigureSdnIntegrationJobProperties withSdnIntegrationIntent(SdnIntegrationIntent sdnIntegrationIntent) { - this.sdnIntegrationIntent = sdnIntegrationIntent; - return this; - } - - /** - * Get the sdnPrefix property: A string identifier used to construct the Network Controller (NC) REST resource name. - * This prefix helps group and distinguish SDN-managed network components and must follow specific formatting rules. - * - * @return the sdnPrefix value. - */ - public String sdnPrefix() { - return this.sdnPrefix; - } - - /** - * Set the sdnPrefix property: A string identifier used to construct the Network Controller (NC) REST resource name. - * This prefix helps group and distinguish SDN-managed network components and must follow specific formatting rules. - * - * @param sdnPrefix the sdnPrefix value to set. - * @return the HciConfigureSdnIntegrationJobProperties object itself. - */ - public HciConfigureSdnIntegrationJobProperties withSdnPrefix(String sdnPrefix) { - this.sdnPrefix = sdnPrefix; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HciConfigureSdnIntegrationJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeStringField("sdnIntegrationIntent", - this.sdnIntegrationIntent == null ? null : this.sdnIntegrationIntent.toString()); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeStringField("sdnPrefix", this.sdnPrefix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HciConfigureSdnIntegrationJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HciConfigureSdnIntegrationJobProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the HciConfigureSdnIntegrationJobProperties. - */ - public static HciConfigureSdnIntegrationJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HciConfigureSdnIntegrationJobProperties deserializedHciConfigureSdnIntegrationJobProperties - = new HciConfigureSdnIntegrationJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties - .withStatus(JobStatus.fromString(reader.getString())); - } else if ("reportedProperties".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties - .withReportedProperties(JobReportedProperties.fromJson(reader)); - } else if ("sdnIntegrationIntent".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties.sdnIntegrationIntent - = SdnIntegrationIntent.fromString(reader.getString()); - } else if ("jobType".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties.jobType - = HciJobType.fromString(reader.getString()); - } else if ("sdnPrefix".equals(fieldName)) { - deserializedHciConfigureSdnIntegrationJobProperties.sdnPrefix = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHciConfigureSdnIntegrationJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciJobType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciJobType.java deleted file mode 100644 index dbf1b3530518..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciJobType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * ClusterJob Type supported. - */ -public final class HciJobType extends ExpandableStringEnum { - /** - * Job to add a server to the cluster. - */ - public static final HciJobType ADD_SERVER = fromString("AddServer"); - - /** - * Job to repair a server in the cluster. - */ - public static final HciJobType REPAIR_SERVER = fromString("RepairServer"); - - /** - * Job to configure SDN (Software Defined Networking) integration for the cluster. - */ - public static final HciJobType CONFIGURE_SDN_INTEGRATION = fromString("ConfigureSdnIntegration"); - - /** - * Creates a new instance of HciJobType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public HciJobType() { - } - - /** - * Creates or finds a HciJobType from its string representation. - * - * @param name a name to look for. - * @return the corresponding HciJobType. - */ - public static HciJobType fromString(String name) { - return fromString(name, HciJobType.class); - } - - /** - * Gets known HciJobType values. - * - * @return known HciJobType values. - */ - public static Collection values() { - return values(HciJobType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java index d5e385c283fe..af2af764acc1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java @@ -32,11 +32,6 @@ public final class HciNetworkProfile implements JsonSerializable repairServerJobServerDetails; - - /* - * List of protected parameters to pass to trigger job for cluster. - */ - private List secrets; - - /** - * Creates an instance of HciRepairServerJobProperties class. - */ - public HciRepairServerJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public HciJobType jobType() { - return this.jobType; - } - - /** - * Get the repairServerJobServerDetails property: Details of servers to be repaired in the cluster. - * - * @return the repairServerJobServerDetails value. - */ - public List repairServerJobServerDetails() { - return this.repairServerJobServerDetails; - } - - /** - * Set the repairServerJobServerDetails property: Details of servers to be repaired in the cluster. - * - * @param repairServerJobServerDetails the repairServerJobServerDetails value to set. - * @return the HciRepairServerJobProperties object itself. - */ - public HciRepairServerJobProperties - withRepairServerJobServerDetails(List repairServerJobServerDetails) { - this.repairServerJobServerDetails = repairServerJobServerDetails; - return this; - } - - /** - * Get the secrets property: List of protected parameters to pass to trigger job for cluster. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: List of protected parameters to pass to trigger job for cluster. - * - * @param secrets the secrets value to set. - * @return the HciRepairServerJobProperties object itself. - */ - public HciRepairServerJobProperties withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HciRepairServerJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeArrayField("repairServerJobServerDetails", this.repairServerJobServerDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HciRepairServerJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HciRepairServerJobProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the HciRepairServerJobProperties. - */ - public static HciRepairServerJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HciRepairServerJobProperties deserializedHciRepairServerJobProperties = new HciRepairServerJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedHciRepairServerJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedHciRepairServerJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedHciRepairServerJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedHciRepairServerJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedHciRepairServerJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedHciRepairServerJobProperties.withStatus(JobStatus.fromString(reader.getString())); - } else if ("reportedProperties".equals(fieldName)) { - deserializedHciRepairServerJobProperties - .withReportedProperties(JobReportedProperties.fromJson(reader)); - } else if ("repairServerJobServerDetails".equals(fieldName)) { - List repairServerJobServerDetails - = reader.readArray(reader1 -> RepairServerJobServerDetails.fromJson(reader1)); - deserializedHciRepairServerJobProperties.repairServerJobServerDetails - = repairServerJobServerDetails; - } else if ("jobType".equals(fieldName)) { - deserializedHciRepairServerJobProperties.jobType = HciJobType.fromString(reader.getString()); - } else if ("secrets".equals(fieldName)) { - List secrets - = reader.readArray(reader1 -> EceDeploymentSecrets.fromJson(reader1)); - deserializedHciRepairServerJobProperties.secrets = secrets; - } else { - reader.skipChildren(); - } - } - - return deserializedHciRepairServerJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InterfaceState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InterfaceState.java deleted file mode 100644 index 7f2c65135922..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InterfaceState.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current state of the interface. - */ -public final class InterfaceState extends ExpandableStringEnum { - /** - * Interface is up. - */ - public static final InterfaceState UP = fromString("up"); - - /** - * Interface is down. - */ - public static final InterfaceState DOWN = fromString("down"); - - /** - * Creates a new instance of InterfaceState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InterfaceState() { - } - - /** - * Creates or finds a InterfaceState from its string representation. - * - * @param name a name to look for. - * @return the corresponding InterfaceState. - */ - public static InterfaceState fromString(String name) { - return fromString(name, InterfaceState.class); - } - - /** - * Gets known InterfaceState values. - * - * @return known InterfaceState values. - */ - public static Collection values() { - return values(InterfaceState.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAddressRange.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAddressRange.java deleted file mode 100644 index 0966e0fd8b75..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAddressRange.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP address range configuration. - */ -@Fluent -public final class IpAddressRange implements JsonSerializable { - /* - * Start IP address. - */ - private String startIp; - - /* - * End IP address. - */ - private String endIp; - - /** - * Creates an instance of IpAddressRange class. - */ - public IpAddressRange() { - } - - /** - * Get the startIp property: Start IP address. - * - * @return the startIp value. - */ - public String startIp() { - return this.startIp; - } - - /** - * Set the startIp property: Start IP address. - * - * @param startIp the startIp value to set. - * @return the IpAddressRange object itself. - */ - public IpAddressRange withStartIp(String startIp) { - this.startIp = startIp; - return this; - } - - /** - * Get the endIp property: End IP address. - * - * @return the endIp value. - */ - public String endIp() { - return this.endIp; - } - - /** - * Set the endIp property: End IP address. - * - * @param endIp the endIp value to set. - * @return the IpAddressRange object itself. - */ - public IpAddressRange withEndIp(String endIp) { - this.endIp = endIp; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("startIp", this.startIp); - jsonWriter.writeStringField("endIp", this.endIp); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpAddressRange from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpAddressRange if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IpAddressRange. - */ - public static IpAddressRange fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpAddressRange deserializedIpAddressRange = new IpAddressRange(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("startIp".equals(fieldName)) { - deserializedIpAddressRange.startIp = reader.getString(); - } else if ("endIp".equals(fieldName)) { - deserializedIpAddressRange.endIp = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIpAddressRange; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAssignmentType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAssignmentType.java deleted file mode 100644 index c1c69b174f89..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAssignmentType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * IP assignment types. - */ -public final class IpAssignmentType extends ExpandableStringEnum { - /** - * Automatic IP assignment. - */ - public static final IpAssignmentType AUTOMATIC = fromString("Automatic"); - - /** - * Manual IP assignment. - */ - public static final IpAssignmentType MANUAL = fromString("Manual"); - - /** - * Creates a new instance of IpAssignmentType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IpAssignmentType() { - } - - /** - * Creates or finds a IpAssignmentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IpAssignmentType. - */ - public static IpAssignmentType fromString(String name) { - return fromString(name, IpAssignmentType.class); - } - - /** - * Gets known IpAssignmentType values. - * - * @return known IpAssignmentType values. - */ - public static Collection values() { - return values(IpAssignmentType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpInterfaceType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpInterfaceType.java deleted file mode 100644 index 3e689281916d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpInterfaceType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * IP configuration type. - */ -public final class IpInterfaceType extends ExpandableStringEnum { - /** - * DHCP configuration. - */ - public static final IpInterfaceType DHCP = fromString("Dhcp"); - - /** - * Static configuration. - */ - public static final IpInterfaceType STATIC = fromString("Static"); - - /** - * Creates a new instance of IpInterfaceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IpInterfaceType() { - } - - /** - * Creates or finds a IpInterfaceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IpInterfaceType. - */ - public static IpInterfaceType fromString(String name) { - return fromString(name, IpInterfaceType.class); - } - - /** - * Gets known IpInterfaceType values. - * - * @return known IpInterfaceType values. - */ - public static Collection values() { - return values(IpInterfaceType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterIPConfig.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterIPConfig.java deleted file mode 100644 index 37eb9f7daa57..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterIPConfig.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * IP configuration for a single iSCSI network adapter. - */ -@Fluent -public final class IscsiAdapterIPConfig implements JsonSerializable { - /* - * Name of the iSCSI network adapter. - */ - private String networkAdapterName; - - /* - * VLAN ID associated with the iSCSI network adapter. - */ - private Integer vlanId; - - /* - * Address prefix in CIDR notation. - */ - private String addressPrefix; - - /* - * Target portal addresses reachable through this adapter. - */ - private List targetPortalAddresses; - - /** - * Creates an instance of IscsiAdapterIPConfig class. - */ - public IscsiAdapterIPConfig() { - } - - /** - * Get the networkAdapterName property: Name of the iSCSI network adapter. - * - * @return the networkAdapterName value. - */ - public String networkAdapterName() { - return this.networkAdapterName; - } - - /** - * Set the networkAdapterName property: Name of the iSCSI network adapter. - * - * @param networkAdapterName the networkAdapterName value to set. - * @return the IscsiAdapterIPConfig object itself. - */ - public IscsiAdapterIPConfig withNetworkAdapterName(String networkAdapterName) { - this.networkAdapterName = networkAdapterName; - return this; - } - - /** - * Get the vlanId property: VLAN ID associated with the iSCSI network adapter. - * - * @return the vlanId value. - */ - public Integer vlanId() { - return this.vlanId; - } - - /** - * Set the vlanId property: VLAN ID associated with the iSCSI network adapter. - * - * @param vlanId the vlanId value to set. - * @return the IscsiAdapterIPConfig object itself. - */ - public IscsiAdapterIPConfig withVlanId(Integer vlanId) { - this.vlanId = vlanId; - return this; - } - - /** - * Get the addressPrefix property: Address prefix in CIDR notation. - * - * @return the addressPrefix value. - */ - public String addressPrefix() { - return this.addressPrefix; - } - - /** - * Set the addressPrefix property: Address prefix in CIDR notation. - * - * @param addressPrefix the addressPrefix value to set. - * @return the IscsiAdapterIPConfig object itself. - */ - public IscsiAdapterIPConfig withAddressPrefix(String addressPrefix) { - this.addressPrefix = addressPrefix; - return this; - } - - /** - * Get the targetPortalAddresses property: Target portal addresses reachable through this adapter. - * - * @return the targetPortalAddresses value. - */ - public List targetPortalAddresses() { - return this.targetPortalAddresses; - } - - /** - * Set the targetPortalAddresses property: Target portal addresses reachable through this adapter. - * - * @param targetPortalAddresses the targetPortalAddresses value to set. - * @return the IscsiAdapterIPConfig object itself. - */ - public IscsiAdapterIPConfig withTargetPortalAddresses(List targetPortalAddresses) { - this.targetPortalAddresses = targetPortalAddresses; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("networkAdapterName", this.networkAdapterName); - jsonWriter.writeNumberField("vlanId", this.vlanId); - jsonWriter.writeStringField("addressPrefix", this.addressPrefix); - jsonWriter.writeArrayField("targetPortalAddresses", this.targetPortalAddresses, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IscsiAdapterIPConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IscsiAdapterIPConfig if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the IscsiAdapterIPConfig. - */ - public static IscsiAdapterIPConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IscsiAdapterIPConfig deserializedIscsiAdapterIPConfig = new IscsiAdapterIPConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkAdapterName".equals(fieldName)) { - deserializedIscsiAdapterIPConfig.networkAdapterName = reader.getString(); - } else if ("vlanId".equals(fieldName)) { - deserializedIscsiAdapterIPConfig.vlanId = reader.getNullable(JsonReader::getInt); - } else if ("addressPrefix".equals(fieldName)) { - deserializedIscsiAdapterIPConfig.addressPrefix = reader.getString(); - } else if ("targetPortalAddresses".equals(fieldName)) { - List targetPortalAddresses - = reader.readArray(reader1 -> IscsiTargetPortalAddress.fromJson(reader1)); - deserializedIscsiAdapterIPConfig.targetPortalAddresses = targetPortalAddresses; - } else { - reader.skipChildren(); - } - } - - return deserializedIscsiAdapterIPConfig; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterProperties.java deleted file mode 100644 index d01444ccd9ef..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterProperties.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Common properties applied to iSCSI network adapters. - */ -@Fluent -public final class IscsiAdapterProperties implements JsonSerializable { - /* - * 802.1p priority value for iSCSI traffic. - */ - private Integer priorityValue8021ActionIscsi; - - /* - * iSCSI bandwidth percentage. - */ - private Integer bandwidthPercentageIscsi; - - /* - * Jumbo frame size in bytes. - */ - private Integer jumboPacket; - - /** - * Creates an instance of IscsiAdapterProperties class. - */ - public IscsiAdapterProperties() { - } - - /** - * Get the priorityValue8021ActionIscsi property: 802.1p priority value for iSCSI traffic. - * - * @return the priorityValue8021ActionIscsi value. - */ - public Integer priorityValue8021ActionIscsi() { - return this.priorityValue8021ActionIscsi; - } - - /** - * Set the priorityValue8021ActionIscsi property: 802.1p priority value for iSCSI traffic. - * - * @param priorityValue8021ActionIscsi the priorityValue8021ActionIscsi value to set. - * @return the IscsiAdapterProperties object itself. - */ - public IscsiAdapterProperties withPriorityValue8021ActionIscsi(Integer priorityValue8021ActionIscsi) { - this.priorityValue8021ActionIscsi = priorityValue8021ActionIscsi; - return this; - } - - /** - * Get the bandwidthPercentageIscsi property: iSCSI bandwidth percentage. - * - * @return the bandwidthPercentageIscsi value. - */ - public Integer bandwidthPercentageIscsi() { - return this.bandwidthPercentageIscsi; - } - - /** - * Set the bandwidthPercentageIscsi property: iSCSI bandwidth percentage. - * - * @param bandwidthPercentageIscsi the bandwidthPercentageIscsi value to set. - * @return the IscsiAdapterProperties object itself. - */ - public IscsiAdapterProperties withBandwidthPercentageIscsi(Integer bandwidthPercentageIscsi) { - this.bandwidthPercentageIscsi = bandwidthPercentageIscsi; - return this; - } - - /** - * Get the jumboPacket property: Jumbo frame size in bytes. - * - * @return the jumboPacket value. - */ - public Integer jumboPacket() { - return this.jumboPacket; - } - - /** - * Set the jumboPacket property: Jumbo frame size in bytes. - * - * @param jumboPacket the jumboPacket value to set. - * @return the IscsiAdapterProperties object itself. - */ - public IscsiAdapterProperties withJumboPacket(Integer jumboPacket) { - this.jumboPacket = jumboPacket; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("priorityValue8021ActionIscsi", this.priorityValue8021ActionIscsi); - jsonWriter.writeNumberField("bandwidthPercentageIscsi", this.bandwidthPercentageIscsi); - jsonWriter.writeNumberField("jumboPacket", this.jumboPacket); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IscsiAdapterProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IscsiAdapterProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the IscsiAdapterProperties. - */ - public static IscsiAdapterProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IscsiAdapterProperties deserializedIscsiAdapterProperties = new IscsiAdapterProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("priorityValue8021ActionIscsi".equals(fieldName)) { - deserializedIscsiAdapterProperties.priorityValue8021ActionIscsi - = reader.getNullable(JsonReader::getInt); - } else if ("bandwidthPercentageIscsi".equals(fieldName)) { - deserializedIscsiAdapterProperties.bandwidthPercentageIscsi - = reader.getNullable(JsonReader::getInt); - } else if ("jumboPacket".equals(fieldName)) { - deserializedIscsiAdapterProperties.jumboPacket = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedIscsiAdapterProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapSettings.java deleted file mode 100644 index b7c5f3721152..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapSettings.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * CHAP authentication settings for an iSCSI connection. - */ -@Fluent -public final class IscsiChapSettings implements JsonSerializable { - /* - * The CHAP authentication mode to use. - */ - private IscsiChapType chapType; - - /** - * Creates an instance of IscsiChapSettings class. - */ - public IscsiChapSettings() { - } - - /** - * Get the chapType property: The CHAP authentication mode to use. - * - * @return the chapType value. - */ - public IscsiChapType chapType() { - return this.chapType; - } - - /** - * Set the chapType property: The CHAP authentication mode to use. - * - * @param chapType the chapType value to set. - * @return the IscsiChapSettings object itself. - */ - public IscsiChapSettings withChapType(IscsiChapType chapType) { - this.chapType = chapType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("chapType", this.chapType == null ? null : this.chapType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IscsiChapSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IscsiChapSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the IscsiChapSettings. - */ - public static IscsiChapSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IscsiChapSettings deserializedIscsiChapSettings = new IscsiChapSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("chapType".equals(fieldName)) { - deserializedIscsiChapSettings.chapType = IscsiChapType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedIscsiChapSettings; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapType.java deleted file mode 100644 index f020afacf7d7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The CHAP authentication mode for an iSCSI connection. - */ -public final class IscsiChapType extends ExpandableStringEnum { - /** - * No CHAP authentication is used. - */ - public static final IscsiChapType NO_CHAP = fromString("NoChap"); - - /** - * The target authenticates the initiator. - */ - public static final IscsiChapType ONE_WAY = fromString("OneWay"); - - /** - * The initiator and target authenticate each other. - */ - public static final IscsiChapType BIDIRECTIONAL = fromString("Bidirectional"); - - /** - * Creates a new instance of IscsiChapType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IscsiChapType() { - } - - /** - * Creates or finds a IscsiChapType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IscsiChapType. - */ - public static IscsiChapType fromString(String name) { - return fromString(name, IscsiChapType.class); - } - - /** - * Gets known IscsiChapType values. - * - * @return known IscsiChapType values. - */ - public static Collection values() { - return values(IscsiChapType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiConfig.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiConfig.java deleted file mode 100644 index d4a6d8045a81..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiConfig.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * iSCSI configuration. - */ -@Fluent -public final class IscsiConfig implements JsonSerializable { - /* - * iSCSI network configuration. - */ - private IscsiNetworkConfig iScsiNetworkConfig; - - /* - * CHAP authentication settings. - */ - private IscsiChapSettings chapSettings; - - /* - * iSCSI Qualified Name of the initiator. - */ - private String initiatorIqn; - - /** - * Creates an instance of IscsiConfig class. - */ - public IscsiConfig() { - } - - /** - * Get the iScsiNetworkConfig property: iSCSI network configuration. - * - * @return the iScsiNetworkConfig value. - */ - public IscsiNetworkConfig iScsiNetworkConfig() { - return this.iScsiNetworkConfig; - } - - /** - * Set the iScsiNetworkConfig property: iSCSI network configuration. - * - * @param iScsiNetworkConfig the iScsiNetworkConfig value to set. - * @return the IscsiConfig object itself. - */ - public IscsiConfig withIScsiNetworkConfig(IscsiNetworkConfig iScsiNetworkConfig) { - this.iScsiNetworkConfig = iScsiNetworkConfig; - return this; - } - - /** - * Get the chapSettings property: CHAP authentication settings. - * - * @return the chapSettings value. - */ - public IscsiChapSettings chapSettings() { - return this.chapSettings; - } - - /** - * Set the chapSettings property: CHAP authentication settings. - * - * @param chapSettings the chapSettings value to set. - * @return the IscsiConfig object itself. - */ - public IscsiConfig withChapSettings(IscsiChapSettings chapSettings) { - this.chapSettings = chapSettings; - return this; - } - - /** - * Get the initiatorIqn property: iSCSI Qualified Name of the initiator. - * - * @return the initiatorIqn value. - */ - public String initiatorIqn() { - return this.initiatorIqn; - } - - /** - * Set the initiatorIqn property: iSCSI Qualified Name of the initiator. - * - * @param initiatorIqn the initiatorIqn value to set. - * @return the IscsiConfig object itself. - */ - public IscsiConfig withInitiatorIqn(String initiatorIqn) { - this.initiatorIqn = initiatorIqn; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("iScsiNetworkConfig", this.iScsiNetworkConfig); - jsonWriter.writeJsonField("chapSettings", this.chapSettings); - jsonWriter.writeStringField("initiatorIqn", this.initiatorIqn); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IscsiConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IscsiConfig if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the IscsiConfig. - */ - public static IscsiConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IscsiConfig deserializedIscsiConfig = new IscsiConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("iScsiNetworkConfig".equals(fieldName)) { - deserializedIscsiConfig.iScsiNetworkConfig = IscsiNetworkConfig.fromJson(reader); - } else if ("chapSettings".equals(fieldName)) { - deserializedIscsiConfig.chapSettings = IscsiChapSettings.fromJson(reader); - } else if ("initiatorIqn".equals(fieldName)) { - deserializedIscsiConfig.initiatorIqn = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIscsiConfig; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiNetworkConfig.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiNetworkConfig.java deleted file mode 100644 index 0bfb3e6e8242..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiNetworkConfig.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * iSCSI network configuration. - */ -@Fluent -public final class IscsiNetworkConfig implements JsonSerializable { - /* - * Common adapter properties applied to all iSCSI network adapters. - */ - private IscsiAdapterProperties adapterProperties; - - /* - * Per-adapter IP configuration for the iSCSI network adapters. - */ - private List adapterIPConfig; - - /** - * Creates an instance of IscsiNetworkConfig class. - */ - public IscsiNetworkConfig() { - } - - /** - * Get the adapterProperties property: Common adapter properties applied to all iSCSI network adapters. - * - * @return the adapterProperties value. - */ - public IscsiAdapterProperties adapterProperties() { - return this.adapterProperties; - } - - /** - * Set the adapterProperties property: Common adapter properties applied to all iSCSI network adapters. - * - * @param adapterProperties the adapterProperties value to set. - * @return the IscsiNetworkConfig object itself. - */ - public IscsiNetworkConfig withAdapterProperties(IscsiAdapterProperties adapterProperties) { - this.adapterProperties = adapterProperties; - return this; - } - - /** - * Get the adapterIPConfig property: Per-adapter IP configuration for the iSCSI network adapters. - * - * @return the adapterIPConfig value. - */ - public List adapterIPConfig() { - return this.adapterIPConfig; - } - - /** - * Set the adapterIPConfig property: Per-adapter IP configuration for the iSCSI network adapters. - * - * @param adapterIPConfig the adapterIPConfig value to set. - * @return the IscsiNetworkConfig object itself. - */ - public IscsiNetworkConfig withAdapterIPConfig(List adapterIPConfig) { - this.adapterIPConfig = adapterIPConfig; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("adapterProperties", this.adapterProperties); - jsonWriter.writeArrayField("adapterIPConfig", this.adapterIPConfig, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IscsiNetworkConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IscsiNetworkConfig if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the IscsiNetworkConfig. - */ - public static IscsiNetworkConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IscsiNetworkConfig deserializedIscsiNetworkConfig = new IscsiNetworkConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("adapterProperties".equals(fieldName)) { - deserializedIscsiNetworkConfig.adapterProperties = IscsiAdapterProperties.fromJson(reader); - } else if ("adapterIPConfig".equals(fieldName)) { - List adapterIPConfig - = reader.readArray(reader1 -> IscsiAdapterIPConfig.fromJson(reader1)); - deserializedIscsiNetworkConfig.adapterIPConfig = adapterIPConfig; - } else { - reader.skipChildren(); - } - } - - return deserializedIscsiNetworkConfig; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiTargetPortalAddress.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiTargetPortalAddress.java deleted file mode 100644 index fe852d99f5c1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiTargetPortalAddress.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * iSCSI target portal address. - */ -@Fluent -public final class IscsiTargetPortalAddress implements JsonSerializable { - /* - * IP address of the iSCSI target portal. - */ - private String ipAddress; - - /* - * Next hop IP address used to reach the target portal. - */ - private String nextHop; - - /** - * Creates an instance of IscsiTargetPortalAddress class. - */ - public IscsiTargetPortalAddress() { - } - - /** - * Get the ipAddress property: IP address of the iSCSI target portal. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: IP address of the iSCSI target portal. - * - * @param ipAddress the ipAddress value to set. - * @return the IscsiTargetPortalAddress object itself. - */ - public IscsiTargetPortalAddress withIpAddress(String ipAddress) { - this.ipAddress = ipAddress; - return this; - } - - /** - * Get the nextHop property: Next hop IP address used to reach the target portal. - * - * @return the nextHop value. - */ - public String nextHop() { - return this.nextHop; - } - - /** - * Set the nextHop property: Next hop IP address used to reach the target portal. - * - * @param nextHop the nextHop value to set. - * @return the IscsiTargetPortalAddress object itself. - */ - public IscsiTargetPortalAddress withNextHop(String nextHop) { - this.nextHop = nextHop; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("nextHop", this.nextHop); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IscsiTargetPortalAddress from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IscsiTargetPortalAddress if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IscsiTargetPortalAddress. - */ - public static IscsiTargetPortalAddress fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IscsiTargetPortalAddress deserializedIscsiTargetPortalAddress = new IscsiTargetPortalAddress(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipAddress".equals(fieldName)) { - deserializedIscsiTargetPortalAddress.ipAddress = reader.getString(); - } else if ("nextHop".equals(fieldName)) { - deserializedIscsiTargetPortalAddress.nextHop = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIscsiTargetPortalAddress; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/JobReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/JobReportedProperties.java deleted file mode 100644 index e9dcb8c9b51f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/JobReportedProperties.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reported Properties for job triggered from cloud. - */ -@Immutable -public final class JobReportedProperties implements JsonSerializable { - /* - * The percentage of the job that is complete. - */ - private Integer percentComplete; - - /* - * Validation status of job. - */ - private EceActionStatus validationStatus; - - /* - * Deployment status of job. - */ - private EceActionStatus deploymentStatus; - - /** - * Creates an instance of JobReportedProperties class. - */ - private JobReportedProperties() { - } - - /** - * Get the percentComplete property: The percentage of the job that is complete. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the validationStatus property: Validation status of job. - * - * @return the validationStatus value. - */ - public EceActionStatus validationStatus() { - return this.validationStatus; - } - - /** - * Get the deploymentStatus property: Deployment status of job. - * - * @return the deploymentStatus value. - */ - public EceActionStatus deploymentStatus() { - return this.deploymentStatus; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobReportedProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobReportedProperties. - */ - public static JobReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobReportedProperties deserializedJobReportedProperties = new JobReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("percentComplete".equals(fieldName)) { - deserializedJobReportedProperties.percentComplete = reader.getNullable(JsonReader::getInt); - } else if ("validationStatus".equals(fieldName)) { - deserializedJobReportedProperties.validationStatus = EceActionStatus.fromJson(reader); - } else if ("deploymentStatus".equals(fieldName)) { - deserializedJobReportedProperties.deploymentStatus = EceActionStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleDetails.java deleted file mode 100644 index 09b7d229dfc9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleDetails.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Overall Lifecycle details for a resource. - */ -@Immutable -public final class LifecycleDetails implements JsonSerializable { - /* - * Overall lifecycle status of the edge machine. - */ - private LifecycleStatus lifecycleStatus; - - /* - * List of lifecycle stages for the edge machine. - */ - private List lifecycleStages; - - /** - * Creates an instance of LifecycleDetails class. - */ - private LifecycleDetails() { - } - - /** - * Get the lifecycleStatus property: Overall lifecycle status of the edge machine. - * - * @return the lifecycleStatus value. - */ - public LifecycleStatus lifecycleStatus() { - return this.lifecycleStatus; - } - - /** - * Get the lifecycleStages property: List of lifecycle stages for the edge machine. - * - * @return the lifecycleStages value. - */ - public List lifecycleStages() { - return this.lifecycleStages; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LifecycleDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LifecycleDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LifecycleDetails. - */ - public static LifecycleDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LifecycleDetails deserializedLifecycleDetails = new LifecycleDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("lifecycleStages".equals(fieldName)) { - List lifecycleStages - = reader.readArray(reader1 -> LifecycleStage.fromJson(reader1)); - deserializedLifecycleDetails.lifecycleStages = lifecycleStages; - } else if ("lifecycleStatus".equals(fieldName)) { - deserializedLifecycleDetails.lifecycleStatus = LifecycleStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedLifecycleDetails; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleOperationStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleOperationStatus.java deleted file mode 100644 index 0e2be32ecd4f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleOperationStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status of an operation. Maps to Steps.Status / SubSteps.Status. - */ -public final class LifecycleOperationStatus extends ExpandableStringEnum { - /** - * Operation has not started. - */ - public static final LifecycleOperationStatus NOT_STARTED = fromString("NotStarted"); - - /** - * Operation is in progress. - */ - public static final LifecycleOperationStatus IN_PROGRESS = fromString("InProgress"); - - /** - * Operation has completed successfully. - */ - public static final LifecycleOperationStatus COMPLETED = fromString("Completed"); - - /** - * Operation has failed. - */ - public static final LifecycleOperationStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of LifecycleOperationStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LifecycleOperationStatus() { - } - - /** - * Creates or finds a LifecycleOperationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding LifecycleOperationStatus. - */ - public static LifecycleOperationStatus fromString(String name) { - return fromString(name, LifecycleOperationStatus.class); - } - - /** - * Gets known LifecycleOperationStatus values. - * - * @return known LifecycleOperationStatus values. - */ - public static Collection values() { - return values(LifecycleOperationStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStage.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStage.java deleted file mode 100644 index 6e7394f70bb0..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStage.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Lifecycle stage details for a resource. - */ -@Immutable -public final class LifecycleStage implements JsonSerializable { - /* - * Name of the stage. - */ - private String name; - - /* - * Description of the stage. - */ - private String description; - - /* - * Status of the stage. - */ - private LifecycleOperationStatus status; - - /* - * Start time of the stage. - */ - private OffsetDateTime startTimeUtc; - - /* - * End time of the stage. - */ - private OffsetDateTime endTimeUtc; - - /* - * Last time the stage was updated. - */ - private OffsetDateTime lastUpdatedUtc; - - /* - * Error details. - */ - private ManagementError error; - - /* - * Sub-stages for this stage. - */ - private List subStages; - - /** - * Creates an instance of LifecycleStage class. - */ - private LifecycleStage() { - } - - /** - * Get the name property: Name of the stage. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the description property: Description of the stage. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the status property: Status of the stage. - * - * @return the status value. - */ - public LifecycleOperationStatus status() { - return this.status; - } - - /** - * Get the startTimeUtc property: Start time of the stage. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Get the endTimeUtc property: End time of the stage. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Get the lastUpdatedUtc property: Last time the stage was updated. - * - * @return the lastUpdatedUtc value. - */ - public OffsetDateTime lastUpdatedUtc() { - return this.lastUpdatedUtc; - } - - /** - * Get the error property: Error details. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Get the subStages property: Sub-stages for this stage. - * - * @return the subStages value. - */ - public List subStages() { - return this.subStages; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LifecycleStage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LifecycleStage if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LifecycleStage. - */ - public static LifecycleStage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LifecycleStage deserializedLifecycleStage = new LifecycleStage(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedLifecycleStage.name = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedLifecycleStage.description = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedLifecycleStage.status = LifecycleOperationStatus.fromString(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedLifecycleStage.startTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedLifecycleStage.endTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastUpdatedUtc".equals(fieldName)) { - deserializedLifecycleStage.lastUpdatedUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("error".equals(fieldName)) { - deserializedLifecycleStage.error = ManagementError.fromJson(reader); - } else if ("subStages".equals(fieldName)) { - List subStages = reader.readArray(reader1 -> LifecycleStage.fromJson(reader1)); - deserializedLifecycleStage.subStages = subStages; - } else { - reader.skipChildren(); - } - } - - return deserializedLifecycleStage; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStatus.java deleted file mode 100644 index 45bbd9dc3657..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStatus.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Summary lifecycle status for a resource. - */ -@Immutable -public final class LifecycleStatus implements JsonSerializable { - /* - * Overall lifecycle status of the edge machine. - */ - private EdgeMachineLifecycleStatus status; - - /* - * Depicts what is the current ongoing stage. - */ - private String stage; - - /* - * Last time the lifecycle status was updated. - */ - private OffsetDateTime lastUpdatedUtc; - - /* - * Message to provide more details on lifecycle status, especially in case of failures. - */ - private String message; - - /* - * Recommended steps to resolve failures. - */ - private List recommendedSteps; - - /** - * Creates an instance of LifecycleStatus class. - */ - private LifecycleStatus() { - } - - /** - * Get the status property: Overall lifecycle status of the edge machine. - * - * @return the status value. - */ - public EdgeMachineLifecycleStatus status() { - return this.status; - } - - /** - * Get the stage property: Depicts what is the current ongoing stage. - * - * @return the stage value. - */ - public String stage() { - return this.stage; - } - - /** - * Get the lastUpdatedUtc property: Last time the lifecycle status was updated. - * - * @return the lastUpdatedUtc value. - */ - public OffsetDateTime lastUpdatedUtc() { - return this.lastUpdatedUtc; - } - - /** - * Get the message property: Message to provide more details on lifecycle status, especially in case of failures. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the recommendedSteps property: Recommended steps to resolve failures. - * - * @return the recommendedSteps value. - */ - public List recommendedSteps() { - return this.recommendedSteps; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LifecycleStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LifecycleStatus if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LifecycleStatus. - */ - public static LifecycleStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LifecycleStatus deserializedLifecycleStatus = new LifecycleStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedLifecycleStatus.status = EdgeMachineLifecycleStatus.fromString(reader.getString()); - } else if ("lastUpdatedUtc".equals(fieldName)) { - deserializedLifecycleStatus.lastUpdatedUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("stage".equals(fieldName)) { - deserializedLifecycleStatus.stage = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedLifecycleStatus.message = reader.getString(); - } else if ("recommendedSteps".equals(fieldName)) { - List recommendedSteps = reader.readArray(reader1 -> reader1.getString()); - deserializedLifecycleStatus.recommendedSteps = recommendedSteps; - } else { - reader.skipChildren(); - } - } - - return deserializedLifecycleStatus; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Metadata.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Metadata.java deleted file mode 100644 index 67ea6d3c8de2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Metadata.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Metadata associated with a deployment step. - */ -@Immutable -public final class Metadata implements JsonSerializable { - /* - * The key of the metadata entry. - */ - private String key; - - /* - * The value of the metadata entry. - */ - private String value; - - /** - * Creates an instance of Metadata class. - */ - private Metadata() { - } - - /** - * Get the key property: The key of the metadata entry. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Get the value property: The value of the metadata entry. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("key", this.key); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Metadata from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Metadata if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Metadata. - */ - public static Metadata fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Metadata deserializedMetadata = new Metadata(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("key".equals(fieldName)) { - deserializedMetadata.key = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedMetadata.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMetadata; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapter.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapter.java deleted file mode 100644 index 1ad84fa40a58..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapter.java +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Network adapter configuration. - */ -@Fluent -public final class NetworkAdapter implements JsonSerializable { - /* - * Type of IP assignment. - */ - private IpAssignmentType ipAssignmentType; - - /* - * IP address. - */ - private String ipAddress; - - /* - * Adapter Name. - */ - private String adapterName; - - /* - * MAC address. - */ - private String macAddress; - - /* - * IP address range. - */ - private IpAddressRange ipAddressRange; - - /* - * Gateway id. - */ - private String gateway; - - /* - * Subnet mask. - */ - private String subnetMask; - - /* - * Array of DNS addresses. - */ - private List dnsAddressArray; - - /* - * VLAN ID for the network setup. - */ - private String vlanId; - - /** - * Creates an instance of NetworkAdapter class. - */ - public NetworkAdapter() { - } - - /** - * Get the ipAssignmentType property: Type of IP assignment. - * - * @return the ipAssignmentType value. - */ - public IpAssignmentType ipAssignmentType() { - return this.ipAssignmentType; - } - - /** - * Set the ipAssignmentType property: Type of IP assignment. - * - * @param ipAssignmentType the ipAssignmentType value to set. - * @return the NetworkAdapter object itself. - */ - public NetworkAdapter withIpAssignmentType(IpAssignmentType ipAssignmentType) { - this.ipAssignmentType = ipAssignmentType; - return this; - } - - /** - * Get the ipAddress property: IP address. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: IP address. - * - * @param ipAddress the ipAddress value to set. - * @return the NetworkAdapter object itself. - */ - public NetworkAdapter withIpAddress(String ipAddress) { - this.ipAddress = ipAddress; - return this; - } - - /** - * Get the adapterName property: Adapter Name. - * - * @return the adapterName value. - */ - public String adapterName() { - return this.adapterName; - } - - /** - * Set the adapterName property: Adapter Name. - * - * @param adapterName the adapterName value to set. - * @return the NetworkAdapter object itself. - */ - public NetworkAdapter withAdapterName(String adapterName) { - this.adapterName = adapterName; - return this; - } - - /** - * Get the macAddress property: MAC address. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.macAddress; - } - - /** - * Set the macAddress property: MAC address. - * - * @param macAddress the macAddress value to set. - * @return the NetworkAdapter object itself. - */ - public NetworkAdapter withMacAddress(String macAddress) { - this.macAddress = macAddress; - return this; - } - - /** - * Get the ipAddressRange property: IP address range. - * - * @return the ipAddressRange value. - */ - public IpAddressRange ipAddressRange() { - return this.ipAddressRange; - } - - /** - * Set the ipAddressRange property: IP address range. - * - * @param ipAddressRange the ipAddressRange value to set. - * @return the NetworkAdapter object itself. - */ - public NetworkAdapter withIpAddressRange(IpAddressRange ipAddressRange) { - this.ipAddressRange = ipAddressRange; - return this; - } - - /** - * Get the gateway property: Gateway id. - * - * @return the gateway value. - */ - public String gateway() { - return this.gateway; - } - - /** - * Set the gateway property: Gateway id. - * - * @param gateway the gateway value to set. - * @return the NetworkAdapter object itself. - */ - public NetworkAdapter withGateway(String gateway) { - this.gateway = gateway; - return this; - } - - /** - * Get the subnetMask property: Subnet mask. - * - * @return the subnetMask value. - */ - public String subnetMask() { - return this.subnetMask; - } - - /** - * Set the subnetMask property: Subnet mask. - * - * @param subnetMask the subnetMask value to set. - * @return the NetworkAdapter object itself. - */ - public NetworkAdapter withSubnetMask(String subnetMask) { - this.subnetMask = subnetMask; - return this; - } - - /** - * Get the dnsAddressArray property: Array of DNS addresses. - * - * @return the dnsAddressArray value. - */ - public List dnsAddressArray() { - return this.dnsAddressArray; - } - - /** - * Set the dnsAddressArray property: Array of DNS addresses. - * - * @param dnsAddressArray the dnsAddressArray value to set. - * @return the NetworkAdapter object itself. - */ - public NetworkAdapter withDnsAddressArray(List dnsAddressArray) { - this.dnsAddressArray = dnsAddressArray; - return this; - } - - /** - * Get the vlanId property: VLAN ID for the network setup. - * - * @return the vlanId value. - */ - public String vlanId() { - return this.vlanId; - } - - /** - * Set the vlanId property: VLAN ID for the network setup. - * - * @param vlanId the vlanId value to set. - * @return the NetworkAdapter object itself. - */ - public NetworkAdapter withVlanId(String vlanId) { - this.vlanId = vlanId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ipAssignmentType", - this.ipAssignmentType == null ? null : this.ipAssignmentType.toString()); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("adapterName", this.adapterName); - jsonWriter.writeStringField("macAddress", this.macAddress); - jsonWriter.writeJsonField("ipAddressRange", this.ipAddressRange); - jsonWriter.writeStringField("gateway", this.gateway); - jsonWriter.writeStringField("subnetMask", this.subnetMask); - jsonWriter.writeArrayField("dnsAddressArray", this.dnsAddressArray, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("vlanId", this.vlanId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkAdapter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkAdapter if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NetworkAdapter. - */ - public static NetworkAdapter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkAdapter deserializedNetworkAdapter = new NetworkAdapter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipAssignmentType".equals(fieldName)) { - deserializedNetworkAdapter.ipAssignmentType = IpAssignmentType.fromString(reader.getString()); - } else if ("ipAddress".equals(fieldName)) { - deserializedNetworkAdapter.ipAddress = reader.getString(); - } else if ("adapterName".equals(fieldName)) { - deserializedNetworkAdapter.adapterName = reader.getString(); - } else if ("macAddress".equals(fieldName)) { - deserializedNetworkAdapter.macAddress = reader.getString(); - } else if ("ipAddressRange".equals(fieldName)) { - deserializedNetworkAdapter.ipAddressRange = IpAddressRange.fromJson(reader); - } else if ("gateway".equals(fieldName)) { - deserializedNetworkAdapter.gateway = reader.getString(); - } else if ("subnetMask".equals(fieldName)) { - deserializedNetworkAdapter.subnetMask = reader.getString(); - } else if ("dnsAddressArray".equals(fieldName)) { - List dnsAddressArray = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkAdapter.dnsAddressArray = dnsAddressArray; - } else if ("vlanId".equals(fieldName)) { - deserializedNetworkAdapter.vlanId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkAdapter; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterActionStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterActionStatus.java deleted file mode 100644 index fdafd3087645..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterActionStatus.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The action plan deployment status for Network Adapter Job. - */ -@Immutable -public final class NetworkAdapterActionStatus implements JsonSerializable { - /* - * Status of ECE action Network Adapter Job. - */ - private String status; - - /* - * List of steps of Network Adapter Job. - */ - private List steps; - - /** - * Creates an instance of NetworkAdapterActionStatus class. - */ - private NetworkAdapterActionStatus() { - } - - /** - * Get the status property: Status of ECE action Network Adapter Job. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the steps property: List of steps of Network Adapter Job. - * - * @return the steps value. - */ - public List steps() { - return this.steps; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkAdapterActionStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkAdapterActionStatus if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkAdapterActionStatus. - */ - public static NetworkAdapterActionStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkAdapterActionStatus deserializedNetworkAdapterActionStatus = new NetworkAdapterActionStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedNetworkAdapterActionStatus.status = reader.getString(); - } else if ("steps".equals(fieldName)) { - List steps - = reader.readArray(reader1 -> NetworkAdapterDeploymentStep.fromJson(reader1)); - deserializedNetworkAdapterActionStatus.steps = steps; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkAdapterActionStatus; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterConfiguration.java deleted file mode 100644 index 47a0c8b39d67..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterConfiguration.java +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Network adapter configuration. - */ -@Fluent -public final class NetworkAdapterConfiguration implements JsonSerializable { - /* - * Adapter name. - */ - private String adapterName; - - /* - * IP address. - */ - private String ip4Address; - - /* - * Subnet mask. - */ - private String subnetMask; - - /* - * Default gateway. - */ - private String defaultGateway; - - /* - * List of DNS servers. - */ - private List dnsServers; - - /* - * IP configuration type (Dhcp or Static). - */ - private IpInterfaceType ipInterfaceType; - - /* - * VLAN identifier for network segmentation. - */ - private Integer vlanId; - - /* - * Administrative state of the interface (up or down). - */ - private InterfaceState interfaceState; - - /* - * WiFi configuration desired properties. - */ - private WifiConfigurationDesiredProperties wifiConfiguration; - - /** - * Creates an instance of NetworkAdapterConfiguration class. - */ - public NetworkAdapterConfiguration() { - } - - /** - * Get the adapterName property: Adapter name. - * - * @return the adapterName value. - */ - public String adapterName() { - return this.adapterName; - } - - /** - * Set the adapterName property: Adapter name. - * - * @param adapterName the adapterName value to set. - * @return the NetworkAdapterConfiguration object itself. - */ - public NetworkAdapterConfiguration withAdapterName(String adapterName) { - this.adapterName = adapterName; - return this; - } - - /** - * Get the ip4Address property: IP address. - * - * @return the ip4Address value. - */ - public String ip4Address() { - return this.ip4Address; - } - - /** - * Set the ip4Address property: IP address. - * - * @param ip4Address the ip4Address value to set. - * @return the NetworkAdapterConfiguration object itself. - */ - public NetworkAdapterConfiguration withIp4Address(String ip4Address) { - this.ip4Address = ip4Address; - return this; - } - - /** - * Get the subnetMask property: Subnet mask. - * - * @return the subnetMask value. - */ - public String subnetMask() { - return this.subnetMask; - } - - /** - * Set the subnetMask property: Subnet mask. - * - * @param subnetMask the subnetMask value to set. - * @return the NetworkAdapterConfiguration object itself. - */ - public NetworkAdapterConfiguration withSubnetMask(String subnetMask) { - this.subnetMask = subnetMask; - return this; - } - - /** - * Get the defaultGateway property: Default gateway. - * - * @return the defaultGateway value. - */ - public String defaultGateway() { - return this.defaultGateway; - } - - /** - * Set the defaultGateway property: Default gateway. - * - * @param defaultGateway the defaultGateway value to set. - * @return the NetworkAdapterConfiguration object itself. - */ - public NetworkAdapterConfiguration withDefaultGateway(String defaultGateway) { - this.defaultGateway = defaultGateway; - return this; - } - - /** - * Get the dnsServers property: List of DNS servers. - * - * @return the dnsServers value. - */ - public List dnsServers() { - return this.dnsServers; - } - - /** - * Set the dnsServers property: List of DNS servers. - * - * @param dnsServers the dnsServers value to set. - * @return the NetworkAdapterConfiguration object itself. - */ - public NetworkAdapterConfiguration withDnsServers(List dnsServers) { - this.dnsServers = dnsServers; - return this; - } - - /** - * Get the ipInterfaceType property: IP configuration type (Dhcp or Static). - * - * @return the ipInterfaceType value. - */ - public IpInterfaceType ipInterfaceType() { - return this.ipInterfaceType; - } - - /** - * Set the ipInterfaceType property: IP configuration type (Dhcp or Static). - * - * @param ipInterfaceType the ipInterfaceType value to set. - * @return the NetworkAdapterConfiguration object itself. - */ - public NetworkAdapterConfiguration withIpInterfaceType(IpInterfaceType ipInterfaceType) { - this.ipInterfaceType = ipInterfaceType; - return this; - } - - /** - * Get the vlanId property: VLAN identifier for network segmentation. - * - * @return the vlanId value. - */ - public Integer vlanId() { - return this.vlanId; - } - - /** - * Set the vlanId property: VLAN identifier for network segmentation. - * - * @param vlanId the vlanId value to set. - * @return the NetworkAdapterConfiguration object itself. - */ - public NetworkAdapterConfiguration withVlanId(Integer vlanId) { - this.vlanId = vlanId; - return this; - } - - /** - * Get the interfaceState property: Administrative state of the interface (up or down). - * - * @return the interfaceState value. - */ - public InterfaceState interfaceState() { - return this.interfaceState; - } - - /** - * Set the interfaceState property: Administrative state of the interface (up or down). - * - * @param interfaceState the interfaceState value to set. - * @return the NetworkAdapterConfiguration object itself. - */ - public NetworkAdapterConfiguration withInterfaceState(InterfaceState interfaceState) { - this.interfaceState = interfaceState; - return this; - } - - /** - * Get the wifiConfiguration property: WiFi configuration desired properties. - * - * @return the wifiConfiguration value. - */ - public WifiConfigurationDesiredProperties wifiConfiguration() { - return this.wifiConfiguration; - } - - /** - * Set the wifiConfiguration property: WiFi configuration desired properties. - * - * @param wifiConfiguration the wifiConfiguration value to set. - * @return the NetworkAdapterConfiguration object itself. - */ - public NetworkAdapterConfiguration withWifiConfiguration(WifiConfigurationDesiredProperties wifiConfiguration) { - this.wifiConfiguration = wifiConfiguration; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("adapterName", this.adapterName); - jsonWriter.writeStringField("ip4Address", this.ip4Address); - jsonWriter.writeStringField("subnetMask", this.subnetMask); - jsonWriter.writeStringField("defaultGateway", this.defaultGateway); - jsonWriter.writeArrayField("dnsServers", this.dnsServers, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("ipInterfaceType", - this.ipInterfaceType == null ? null : this.ipInterfaceType.toString()); - jsonWriter.writeNumberField("vlanId", this.vlanId); - jsonWriter.writeStringField("interfaceState", - this.interfaceState == null ? null : this.interfaceState.toString()); - jsonWriter.writeJsonField("wifiConfiguration", this.wifiConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkAdapterConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkAdapterConfiguration if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkAdapterConfiguration. - */ - public static NetworkAdapterConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkAdapterConfiguration deserializedNetworkAdapterConfiguration = new NetworkAdapterConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("adapterName".equals(fieldName)) { - deserializedNetworkAdapterConfiguration.adapterName = reader.getString(); - } else if ("ip4Address".equals(fieldName)) { - deserializedNetworkAdapterConfiguration.ip4Address = reader.getString(); - } else if ("subnetMask".equals(fieldName)) { - deserializedNetworkAdapterConfiguration.subnetMask = reader.getString(); - } else if ("defaultGateway".equals(fieldName)) { - deserializedNetworkAdapterConfiguration.defaultGateway = reader.getString(); - } else if ("dnsServers".equals(fieldName)) { - List dnsServers = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkAdapterConfiguration.dnsServers = dnsServers; - } else if ("ipInterfaceType".equals(fieldName)) { - deserializedNetworkAdapterConfiguration.ipInterfaceType - = IpInterfaceType.fromString(reader.getString()); - } else if ("vlanId".equals(fieldName)) { - deserializedNetworkAdapterConfiguration.vlanId = reader.getNullable(JsonReader::getInt); - } else if ("interfaceState".equals(fieldName)) { - deserializedNetworkAdapterConfiguration.interfaceState - = InterfaceState.fromString(reader.getString()); - } else if ("wifiConfiguration".equals(fieldName)) { - deserializedNetworkAdapterConfiguration.wifiConfiguration - = WifiConfigurationDesiredProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkAdapterConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterDeploymentStep.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterDeploymentStep.java deleted file mode 100644 index c44abb1b3cd2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterDeploymentStep.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The Step of Network Adapter Job. - */ -@Immutable -public final class NetworkAdapterDeploymentStep implements JsonSerializable { - /* - * Name of step. - */ - private String name; - - /* - * Description of step. - */ - private String description; - - /* - * FullStepIndex of step. - */ - private String fullStepIndex; - - /* - * Start time of step. - */ - private String startTimeUtc; - - /* - * End time of step. - */ - private String endTimeUtc; - - /* - * Status of step (Error, Success, InProgress). - */ - private String status; - - /* - * List of nested steps. - */ - private List steps; - - /* - * List of exceptions. - */ - private List exception; - - /** - * Creates an instance of NetworkAdapterDeploymentStep class. - */ - private NetworkAdapterDeploymentStep() { - } - - /** - * Get the name property: Name of step. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the description property: Description of step. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the fullStepIndex property: FullStepIndex of step. - * - * @return the fullStepIndex value. - */ - public String fullStepIndex() { - return this.fullStepIndex; - } - - /** - * Get the startTimeUtc property: Start time of step. - * - * @return the startTimeUtc value. - */ - public String startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Get the endTimeUtc property: End time of step. - * - * @return the endTimeUtc value. - */ - public String endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Get the status property: Status of step (Error, Success, InProgress). - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the steps property: List of nested steps. - * - * @return the steps value. - */ - public List steps() { - return this.steps; - } - - /** - * Get the exception property: List of exceptions. - * - * @return the exception value. - */ - public List exception() { - return this.exception; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkAdapterDeploymentStep from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkAdapterDeploymentStep if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkAdapterDeploymentStep. - */ - public static NetworkAdapterDeploymentStep fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkAdapterDeploymentStep deserializedNetworkAdapterDeploymentStep = new NetworkAdapterDeploymentStep(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNetworkAdapterDeploymentStep.name = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedNetworkAdapterDeploymentStep.description = reader.getString(); - } else if ("fullStepIndex".equals(fieldName)) { - deserializedNetworkAdapterDeploymentStep.fullStepIndex = reader.getString(); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedNetworkAdapterDeploymentStep.startTimeUtc = reader.getString(); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedNetworkAdapterDeploymentStep.endTimeUtc = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedNetworkAdapterDeploymentStep.status = reader.getString(); - } else if ("steps".equals(fieldName)) { - List steps - = reader.readArray(reader1 -> NetworkAdapterDeploymentStep.fromJson(reader1)); - deserializedNetworkAdapterDeploymentStep.steps = steps; - } else if ("exception".equals(fieldName)) { - List exception = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkAdapterDeploymentStep.exception = exception; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkAdapterDeploymentStep; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobReportedProperties.java deleted file mode 100644 index 68a90f70e79c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobReportedProperties.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reported properties for Network Adapter Job. - */ -@Immutable -public final class NetworkAdapterJobReportedProperties - implements JsonSerializable { - /* - * The percentage of the job that is complete. - */ - private Integer percentComplete; - - /* - * Validation status of Network Adapter Job. - */ - private NetworkAdapterActionStatus validationStatus; - - /* - * Deployment status of Network Adapter Job. - */ - private NetworkAdapterActionStatus deploymentStatus; - - /** - * Creates an instance of NetworkAdapterJobReportedProperties class. - */ - private NetworkAdapterJobReportedProperties() { - } - - /** - * Get the percentComplete property: The percentage of the job that is complete. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the validationStatus property: Validation status of Network Adapter Job. - * - * @return the validationStatus value. - */ - public NetworkAdapterActionStatus validationStatus() { - return this.validationStatus; - } - - /** - * Get the deploymentStatus property: Deployment status of Network Adapter Job. - * - * @return the deploymentStatus value. - */ - public NetworkAdapterActionStatus deploymentStatus() { - return this.deploymentStatus; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkAdapterJobReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkAdapterJobReportedProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkAdapterJobReportedProperties. - */ - public static NetworkAdapterJobReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkAdapterJobReportedProperties deserializedNetworkAdapterJobReportedProperties - = new NetworkAdapterJobReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("percentComplete".equals(fieldName)) { - deserializedNetworkAdapterJobReportedProperties.percentComplete - = reader.getNullable(JsonReader::getInt); - } else if ("validationStatus".equals(fieldName)) { - deserializedNetworkAdapterJobReportedProperties.validationStatus - = NetworkAdapterActionStatus.fromJson(reader); - } else if ("deploymentStatus".equals(fieldName)) { - deserializedNetworkAdapterJobReportedProperties.deploymentStatus - = NetworkAdapterActionStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkAdapterJobReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobType.java deleted file mode 100644 index 458748976afd..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of network adapter job operation. - */ -public final class NetworkAdapterJobType extends ExpandableStringEnum { - /** - * Apply configuration to the network adapter. - */ - public static final NetworkAdapterJobType APPLY_CONFIGURATION = fromString("ApplyConfiguration"); - - /** - * Force push configuration to the network adapter. - */ - public static final NetworkAdapterJobType FORCE_PUSH = fromString("ForcePush"); - - /** - * Job to resolve configuration drift between desired and reported state. - */ - public static final NetworkAdapterJobType SYNC_CONFIGURATION = fromString("SyncConfiguration"); - - /** - * Creates a new instance of NetworkAdapterJobType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkAdapterJobType() { - } - - /** - * Creates or finds a NetworkAdapterJobType from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkAdapterJobType. - */ - public static NetworkAdapterJobType fromString(String name) { - return fromString(name, NetworkAdapterJobType.class); - } - - /** - * Gets known NetworkAdapterJobType values. - * - * @return known NetworkAdapterJobType values. - */ - public static Collection values() { - return values(NetworkAdapterJobType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterOperationStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterOperationStatus.java deleted file mode 100644 index 6ca1f3addd24..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterOperationStatus.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status of network adapter operation. - */ -public final class NetworkAdapterOperationStatus extends ExpandableStringEnum { - /** - * Operation succeeded. - */ - public static final NetworkAdapterOperationStatus SUCCEEDED = fromString("Succeeded"); - - /** - * Operation failed. - */ - public static final NetworkAdapterOperationStatus FAILED = fromString("Failed"); - - /** - * Operation in progress. - */ - public static final NetworkAdapterOperationStatus IN_PROGRESS = fromString("InProgress"); - - /** - * Creates a new instance of NetworkAdapterOperationStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkAdapterOperationStatus() { - } - - /** - * Creates or finds a NetworkAdapterOperationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkAdapterOperationStatus. - */ - public static NetworkAdapterOperationStatus fromString(String name) { - return fromString(name, NetworkAdapterOperationStatus.class); - } - - /** - * Gets known NetworkAdapterOperationStatus values. - * - * @return known NetworkAdapterOperationStatus values. - */ - public static Collection values() { - return values(NetworkAdapterOperationStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterProvisioningStatus.java deleted file mode 100644 index d0de8e108568..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterProvisioningStatus.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network adapter provisioning status. - */ -@Immutable -public final class NetworkAdapterProvisioningStatus implements JsonSerializable { - /* - * The ID of the operation performed on the network adapter. - */ - private String operationId; - - /* - * The status of the operation performed on the network adapter. - */ - private NetworkAdapterOperationStatus status; - - /** - * Creates an instance of NetworkAdapterProvisioningStatus class. - */ - private NetworkAdapterProvisioningStatus() { - } - - /** - * Get the operationId property: The ID of the operation performed on the network adapter. - * - * @return the operationId value. - */ - public String operationId() { - return this.operationId; - } - - /** - * Get the status property: The status of the operation performed on the network adapter. - * - * @return the status value. - */ - public NetworkAdapterOperationStatus status() { - return this.status; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkAdapterProvisioningStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkAdapterProvisioningStatus if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkAdapterProvisioningStatus. - */ - public static NetworkAdapterProvisioningStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkAdapterProvisioningStatus deserializedNetworkAdapterProvisioningStatus - = new NetworkAdapterProvisioningStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("operationId".equals(fieldName)) { - deserializedNetworkAdapterProvisioningStatus.operationId = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedNetworkAdapterProvisioningStatus.status - = NetworkAdapterOperationStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkAdapterProvisioningStatus; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterReportedProperties.java deleted file mode 100644 index e70b30ced03f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterReportedProperties.java +++ /dev/null @@ -1,441 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Reported properties of a network adapter. - */ -@Immutable -public final class NetworkAdapterReportedProperties implements JsonSerializable { - /* - * Adapter name. - */ - private String adapterName; - - /* - * IP address. - */ - private String ip4Address; - - /* - * Subnet mask. - */ - private String subnetMask; - - /* - * Default gateway. - */ - private String defaultGateway; - - /* - * List of DNS servers. - */ - private List dnsServers; - - /* - * Interface description of NIC. - */ - private String interfaceDescription; - - /* - * Component ID of NIC. - */ - private String componentId; - - /* - * Driver version of NIC. - */ - private String driverVersion; - - /* - * Default isolation of management NIC. - */ - private String defaultIsolationId; - - /* - * MAC address. - */ - private String macAddress; - - /* - * The slot attached to the NIC. - */ - private String slot; - - /* - * The switch attached to the NIC, if any. - */ - private String switchName; - - /* - * Type of network interface. - */ - private NetworkInterfaceType interfaceType; - - /* - * Interface speed in Mbps. - */ - private Integer interfaceSpeed; - - /* - * Current state of the interface. - */ - private InterfaceState interfaceState; - - /* - * The type of NIC (physical, virtual, management). - */ - private String nicType; - - /* - * The status of NIC (up, disconnected). - */ - private String nicStatus; - - /* - * IP configuration type. - */ - private IpInterfaceType ipInterfaceType; - - /* - * VLAN identifier (0-4096). - */ - private Integer vlanId; - - /* - * Indicates if this is a management interface. - */ - private Boolean managementInterface; - - /* - * RDMA capability of the network adapter. - */ - private RdmaCapability rdmaCapability; - - /* - * The observed state of network adapter. - */ - private NetworkAdapterStatus networkAdapterStatus; - - /* - * WiFi configuration reported properties. - */ - private WifiConfigurationReportedProperties wifiConfiguration; - - /** - * Creates an instance of NetworkAdapterReportedProperties class. - */ - private NetworkAdapterReportedProperties() { - } - - /** - * Get the adapterName property: Adapter name. - * - * @return the adapterName value. - */ - public String adapterName() { - return this.adapterName; - } - - /** - * Get the ip4Address property: IP address. - * - * @return the ip4Address value. - */ - public String ip4Address() { - return this.ip4Address; - } - - /** - * Get the subnetMask property: Subnet mask. - * - * @return the subnetMask value. - */ - public String subnetMask() { - return this.subnetMask; - } - - /** - * Get the defaultGateway property: Default gateway. - * - * @return the defaultGateway value. - */ - public String defaultGateway() { - return this.defaultGateway; - } - - /** - * Get the dnsServers property: List of DNS servers. - * - * @return the dnsServers value. - */ - public List dnsServers() { - return this.dnsServers; - } - - /** - * Get the interfaceDescription property: Interface description of NIC. - * - * @return the interfaceDescription value. - */ - public String interfaceDescription() { - return this.interfaceDescription; - } - - /** - * Get the componentId property: Component ID of NIC. - * - * @return the componentId value. - */ - public String componentId() { - return this.componentId; - } - - /** - * Get the driverVersion property: Driver version of NIC. - * - * @return the driverVersion value. - */ - public String driverVersion() { - return this.driverVersion; - } - - /** - * Get the defaultIsolationId property: Default isolation of management NIC. - * - * @return the defaultIsolationId value. - */ - public String defaultIsolationId() { - return this.defaultIsolationId; - } - - /** - * Get the macAddress property: MAC address. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.macAddress; - } - - /** - * Get the slot property: The slot attached to the NIC. - * - * @return the slot value. - */ - public String slot() { - return this.slot; - } - - /** - * Get the switchName property: The switch attached to the NIC, if any. - * - * @return the switchName value. - */ - public String switchName() { - return this.switchName; - } - - /** - * Get the interfaceType property: Type of network interface. - * - * @return the interfaceType value. - */ - public NetworkInterfaceType interfaceType() { - return this.interfaceType; - } - - /** - * Get the interfaceSpeed property: Interface speed in Mbps. - * - * @return the interfaceSpeed value. - */ - public Integer interfaceSpeed() { - return this.interfaceSpeed; - } - - /** - * Get the interfaceState property: Current state of the interface. - * - * @return the interfaceState value. - */ - public InterfaceState interfaceState() { - return this.interfaceState; - } - - /** - * Get the nicType property: The type of NIC (physical, virtual, management). - * - * @return the nicType value. - */ - public String nicType() { - return this.nicType; - } - - /** - * Get the nicStatus property: The status of NIC (up, disconnected). - * - * @return the nicStatus value. - */ - public String nicStatus() { - return this.nicStatus; - } - - /** - * Get the ipInterfaceType property: IP configuration type. - * - * @return the ipInterfaceType value. - */ - public IpInterfaceType ipInterfaceType() { - return this.ipInterfaceType; - } - - /** - * Get the vlanId property: VLAN identifier (0-4096). - * - * @return the vlanId value. - */ - public Integer vlanId() { - return this.vlanId; - } - - /** - * Get the managementInterface property: Indicates if this is a management interface. - * - * @return the managementInterface value. - */ - public Boolean managementInterface() { - return this.managementInterface; - } - - /** - * Get the rdmaCapability property: RDMA capability of the network adapter. - * - * @return the rdmaCapability value. - */ - public RdmaCapability rdmaCapability() { - return this.rdmaCapability; - } - - /** - * Get the networkAdapterStatus property: The observed state of network adapter. - * - * @return the networkAdapterStatus value. - */ - public NetworkAdapterStatus networkAdapterStatus() { - return this.networkAdapterStatus; - } - - /** - * Get the wifiConfiguration property: WiFi configuration reported properties. - * - * @return the wifiConfiguration value. - */ - public WifiConfigurationReportedProperties wifiConfiguration() { - return this.wifiConfiguration; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("adapterName", this.adapterName); - jsonWriter.writeStringField("ip4Address", this.ip4Address); - jsonWriter.writeStringField("subnetMask", this.subnetMask); - jsonWriter.writeStringField("defaultGateway", this.defaultGateway); - jsonWriter.writeArrayField("dnsServers", this.dnsServers, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkAdapterReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkAdapterReportedProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkAdapterReportedProperties. - */ - public static NetworkAdapterReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkAdapterReportedProperties deserializedNetworkAdapterReportedProperties - = new NetworkAdapterReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("adapterName".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.adapterName = reader.getString(); - } else if ("ip4Address".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.ip4Address = reader.getString(); - } else if ("subnetMask".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.subnetMask = reader.getString(); - } else if ("defaultGateway".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.defaultGateway = reader.getString(); - } else if ("dnsServers".equals(fieldName)) { - List dnsServers = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkAdapterReportedProperties.dnsServers = dnsServers; - } else if ("interfaceDescription".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.interfaceDescription = reader.getString(); - } else if ("componentId".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.componentId = reader.getString(); - } else if ("driverVersion".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.driverVersion = reader.getString(); - } else if ("defaultIsolationId".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.defaultIsolationId = reader.getString(); - } else if ("macAddress".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.macAddress = reader.getString(); - } else if ("slot".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.slot = reader.getString(); - } else if ("switchName".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.switchName = reader.getString(); - } else if ("interfaceType".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.interfaceType - = NetworkInterfaceType.fromString(reader.getString()); - } else if ("interfaceSpeed".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.interfaceSpeed - = reader.getNullable(JsonReader::getInt); - } else if ("interfaceState".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.interfaceState - = InterfaceState.fromString(reader.getString()); - } else if ("nicType".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.nicType = reader.getString(); - } else if ("nicStatus".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.nicStatus = reader.getString(); - } else if ("ipInterfaceType".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.ipInterfaceType - = IpInterfaceType.fromString(reader.getString()); - } else if ("vlanId".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.vlanId = reader.getNullable(JsonReader::getInt); - } else if ("managementInterface".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.managementInterface - = reader.getNullable(JsonReader::getBoolean); - } else if ("rdmaCapability".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.rdmaCapability - = RdmaCapability.fromString(reader.getString()); - } else if ("networkAdapterStatus".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.networkAdapterStatus - = NetworkAdapterStatus.fromJson(reader); - } else if ("wifiConfiguration".equals(fieldName)) { - deserializedNetworkAdapterReportedProperties.wifiConfiguration - = WifiConfigurationReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkAdapterReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterStatus.java deleted file mode 100644 index c6d7481ffaa9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterStatus.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The observed state of network adapters. - */ -@Immutable -public final class NetworkAdapterStatus implements JsonSerializable { - /* - * Network adapter provisioning error code. - */ - private String errorCode; - - /* - * Descriptive error message. - */ - private String errorMessage; - - /* - * Network adapter provisioning status. - */ - private NetworkAdapterProvisioningStatus provisioningStatus; - - /** - * Creates an instance of NetworkAdapterStatus class. - */ - private NetworkAdapterStatus() { - } - - /** - * Get the errorCode property: Network adapter provisioning error code. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: Descriptive error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the provisioningStatus property: Network adapter provisioning status. - * - * @return the provisioningStatus value. - */ - public NetworkAdapterProvisioningStatus provisioningStatus() { - return this.provisioningStatus; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkAdapterStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkAdapterStatus if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkAdapterStatus. - */ - public static NetworkAdapterStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkAdapterStatus deserializedNetworkAdapterStatus = new NetworkAdapterStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorCode".equals(fieldName)) { - deserializedNetworkAdapterStatus.errorCode = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedNetworkAdapterStatus.errorMessage = reader.getString(); - } else if ("provisioningStatus".equals(fieldName)) { - deserializedNetworkAdapterStatus.provisioningStatus - = NetworkAdapterProvisioningStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkAdapterStatus; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkConfiguration.java deleted file mode 100644 index eac07a0b35a0..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkConfiguration.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Network configuration. - */ -@Fluent -public final class NetworkConfiguration implements JsonSerializable { - /* - * List of network adapters. - */ - private List networkAdapters; - - /** - * Creates an instance of NetworkConfiguration class. - */ - public NetworkConfiguration() { - } - - /** - * Get the networkAdapters property: List of network adapters. - * - * @return the networkAdapters value. - */ - public List networkAdapters() { - return this.networkAdapters; - } - - /** - * Set the networkAdapters property: List of network adapters. - * - * @param networkAdapters the networkAdapters value to set. - * @return the NetworkConfiguration object itself. - */ - public NetworkConfiguration withNetworkAdapters(List networkAdapters) { - this.networkAdapters = networkAdapters; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("networkAdapters", this.networkAdapters, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkConfiguration. - */ - public static NetworkConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkConfiguration deserializedNetworkConfiguration = new NetworkConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkAdapters".equals(fieldName)) { - List networkAdapters - = reader.readArray(reader1 -> NetworkAdapter.fromJson(reader1)); - deserializedNetworkConfiguration.networkAdapters = networkAdapters; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceType.java deleted file mode 100644 index 8c834d6d1237..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of network interface. - */ -public final class NetworkInterfaceType extends ExpandableStringEnum { - /** - * Ethernet interface. - */ - public static final NetworkInterfaceType ETH = fromString("Eth"); - - /** - * Wi-Fi interface. - */ - public static final NetworkInterfaceType WIFI = fromString("wifi"); - - /** - * Creates a new instance of NetworkInterfaceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkInterfaceType() { - } - - /** - * Creates or finds a NetworkInterfaceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkInterfaceType. - */ - public static NetworkInterfaceType fromString(String name) { - return fromString(name, NetworkInterfaceType.class); - } - - /** - * Gets known NetworkInterfaceType values. - * - * @return known NetworkInterfaceType values. - */ - public static Collection values() { - return values(NetworkInterfaceType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeStorageType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeStorageType.java deleted file mode 100644 index 7ec84f663b65..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeStorageType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Node storage type for an edge machine. - */ -public final class NodeStorageType extends ExpandableStringEnum { - /** - * Storage Spaces Direct (S2D) storage type. - */ - public static final NodeStorageType S2D = fromString("S2D"); - - /** - * SAN iSCSI storage type. - */ - public static final NodeStorageType SAN_ISCSI = fromString("SANISCSI"); - - /** - * SAN Fibre Channel storage type. - */ - public static final NodeStorageType SAN_FC = fromString("SANFC"); - - /** - * Creates a new instance of NodeStorageType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NodeStorageType() { - } - - /** - * Creates or finds a NodeStorageType from its string representation. - * - * @param name a name to look for. - * @return the corresponding NodeStorageType. - */ - public static NodeStorageType fromString(String name) { - return fromString(name, NodeStorageType.class); - } - - /** - * Gets known NodeStorageType values. - * - * @return known NodeStorageType values. - */ - public static Collection values() { - return values(NodeStorageType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OSOperationType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OSOperationType.java deleted file mode 100644 index 736b7f0aa1d3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OSOperationType.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * OS Provision Operation type. - */ -public final class OSOperationType extends ExpandableStringEnum { - /** - * OS Provisioning operation. - */ - public static final OSOperationType PROVISION = fromString("Provision"); - - /** - * OS Update operation. - */ - public static final OSOperationType UPDATE = fromString("Update"); - - /** - * OS ReImage operation. - */ - public static final OSOperationType RE_IMAGE = fromString("ReImage"); - - /** - * OS Reset operation. - */ - public static final OSOperationType RESET = fromString("Reset"); - - /** - * Creates a new instance of OSOperationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OSOperationType() { - } - - /** - * Creates or finds a OSOperationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OSOperationType. - */ - public static OSOperationType fromString(String name) { - return fromString(name, OSOperationType.class); - } - - /** - * Gets known OSOperationType values. - * - * @return known OSOperationType values. - */ - public static Collection values() { - return values(OSOperationType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingConfiguration.java deleted file mode 100644 index fbe4d3c8dea9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingConfiguration.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Onboarding configuration. - */ -@Fluent -public final class OnboardingConfiguration implements JsonSerializable { - /* - * Type of the onboarding resource to support polymorphic resource. - */ - private OnboardingResourceType type; - - /* - * Resource ID. - */ - private String resourceId; - - /* - * Location of the resource. - */ - private String location; - - /* - * Tenant ID of the resource. - */ - private String tenantId; - - /* - * Azure Arc virtual machine ID. - */ - private String arcVirtualMachineId; - - /** - * Creates an instance of OnboardingConfiguration class. - */ - public OnboardingConfiguration() { - } - - /** - * Get the type property: Type of the onboarding resource to support polymorphic resource. - * - * @return the type value. - */ - public OnboardingResourceType type() { - return this.type; - } - - /** - * Set the type property: Type of the onboarding resource to support polymorphic resource. - * - * @param type the type value to set. - * @return the OnboardingConfiguration object itself. - */ - public OnboardingConfiguration withType(OnboardingResourceType type) { - this.type = type; - return this; - } - - /** - * Get the resourceId property: Resource ID. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: Resource ID. - * - * @param resourceId the resourceId value to set. - * @return the OnboardingConfiguration object itself. - */ - public OnboardingConfiguration withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the location property: Location of the resource. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Location of the resource. - * - * @param location the location value to set. - * @return the OnboardingConfiguration object itself. - */ - public OnboardingConfiguration withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tenantId property: Tenant ID of the resource. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: Tenant ID of the resource. - * - * @param tenantId the tenantId value to set. - * @return the OnboardingConfiguration object itself. - */ - public OnboardingConfiguration withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the arcVirtualMachineId property: Azure Arc virtual machine ID. - * - * @return the arcVirtualMachineId value. - */ - public String arcVirtualMachineId() { - return this.arcVirtualMachineId; - } - - /** - * Set the arcVirtualMachineId property: Azure Arc virtual machine ID. - * - * @param arcVirtualMachineId the arcVirtualMachineId value to set. - * @return the OnboardingConfiguration object itself. - */ - public OnboardingConfiguration withArcVirtualMachineId(String arcVirtualMachineId) { - this.arcVirtualMachineId = arcVirtualMachineId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeStringField("tenantId", this.tenantId); - jsonWriter.writeStringField("arcVirtualMachineId", this.arcVirtualMachineId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnboardingConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnboardingConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the OnboardingConfiguration. - */ - public static OnboardingConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnboardingConfiguration deserializedOnboardingConfiguration = new OnboardingConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedOnboardingConfiguration.type = OnboardingResourceType.fromString(reader.getString()); - } else if ("resourceId".equals(fieldName)) { - deserializedOnboardingConfiguration.resourceId = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedOnboardingConfiguration.location = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedOnboardingConfiguration.tenantId = reader.getString(); - } else if ("arcVirtualMachineId".equals(fieldName)) { - deserializedOnboardingConfiguration.arcVirtualMachineId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOnboardingConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingResourceType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingResourceType.java deleted file mode 100644 index f53bdad5b6cd..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingResourceType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Onboarding resource type. - */ -public final class OnboardingResourceType extends ExpandableStringEnum { - /** - * Hybrid Compute Machine. - */ - public static final OnboardingResourceType HYBRID_COMPUTE_MACHINE = fromString("HybridComputeMachine"); - - /** - * Creates a new instance of OnboardingResourceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OnboardingResourceType() { - } - - /** - * Creates or finds a OnboardingResourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OnboardingResourceType. - */ - public static OnboardingResourceType fromString(String name) { - return fromString(name, OnboardingResourceType.class); - } - - /** - * Gets known OnboardingResourceType values. - * - * @return known OnboardingResourceType values. - */ - public static Collection values() { - return values(OnboardingResourceType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDetail.java deleted file mode 100644 index 9c25f3aa5320..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDetail.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * operation detail. - */ -@Immutable -public final class OperationDetail implements JsonSerializable { - /* - * operation name. - */ - private String name; - - /* - * operation id. - */ - private String id; - - /* - * operation type. - */ - private String type; - - /* - * operation resource id. - */ - private String resourceId; - - /* - * operation description. - */ - private String description; - - /* - * operation status. - */ - private String status; - - /* - * error details. - */ - private ManagementError error; - - /** - * Creates an instance of OperationDetail class. - */ - private OperationDetail() { - } - - /** - * Get the name property: operation name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the id property: operation id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the type property: operation type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the resourceId property: operation resource id. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Get the description property: operation description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the status property: operation status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the error property: error details. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDetail from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDetail if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDetail. - */ - public static OperationDetail fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDetail deserializedOperationDetail = new OperationDetail(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationDetail.name = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedOperationDetail.id = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOperationDetail.type = reader.getString(); - } else if ("resourceId".equals(fieldName)) { - deserializedOperationDetail.resourceId = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDetail.description = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedOperationDetail.status = reader.getString(); - } else if ("error".equals(fieldName)) { - deserializedOperationDetail.error = ManagementError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDetail; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImage.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImage.java deleted file mode 100644 index 3a1b241cb3a7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImage.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; - -/** - * An immutable client-side representation of OsImage. - */ -public interface OsImage { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - OsImageProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner object. - * - * @return the inner object. - */ - OsImageInner innerModel(); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImageProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImageProperties.java deleted file mode 100644 index 6ac72b3f7946..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImageProperties.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents properties of a os image resource. - */ -@Immutable -public final class OsImageProperties implements JsonSerializable { - /* - * Represents validated solution recipe version of a os image. - */ - private String validatedSolutionRecipeVersion; - - /* - * Represents composed image version of a os image. - */ - private String composedImageVersion; - - /* - * Represents composed image iso download url of a os image. - */ - private String composedImageIsoUrl; - - /* - * Represents composed image iso hash of a os image. - */ - private String composedImageIsoHash; - - /* - * Represents the CPU architecture of an OS image, for example amd64 or arm64. - */ - private Architecture architecture; - - /* - * The solution type (OS family) of the OS image, for example AzureLinux or HCI. - */ - private SolutionType solutionType; - - /** - * Creates an instance of OsImageProperties class. - */ - private OsImageProperties() { - } - - /** - * Get the validatedSolutionRecipeVersion property: Represents validated solution recipe version of a os image. - * - * @return the validatedSolutionRecipeVersion value. - */ - public String validatedSolutionRecipeVersion() { - return this.validatedSolutionRecipeVersion; - } - - /** - * Get the composedImageVersion property: Represents composed image version of a os image. - * - * @return the composedImageVersion value. - */ - public String composedImageVersion() { - return this.composedImageVersion; - } - - /** - * Get the composedImageIsoUrl property: Represents composed image iso download url of a os image. - * - * @return the composedImageIsoUrl value. - */ - public String composedImageIsoUrl() { - return this.composedImageIsoUrl; - } - - /** - * Get the composedImageIsoHash property: Represents composed image iso hash of a os image. - * - * @return the composedImageIsoHash value. - */ - public String composedImageIsoHash() { - return this.composedImageIsoHash; - } - - /** - * Get the architecture property: Represents the CPU architecture of an OS image, for example amd64 or arm64. - * - * @return the architecture value. - */ - public Architecture architecture() { - return this.architecture; - } - - /** - * Get the solutionType property: The solution type (OS family) of the OS image, for example AzureLinux or HCI. - * - * @return the solutionType value. - */ - public SolutionType solutionType() { - return this.solutionType; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("validatedSolutionRecipeVersion", this.validatedSolutionRecipeVersion); - jsonWriter.writeStringField("composedImageVersion", this.composedImageVersion); - jsonWriter.writeStringField("composedImageIsoUrl", this.composedImageIsoUrl); - jsonWriter.writeStringField("composedImageIsoHash", this.composedImageIsoHash); - jsonWriter.writeStringField("architecture", this.architecture == null ? null : this.architecture.toString()); - jsonWriter.writeStringField("solutionType", this.solutionType == null ? null : this.solutionType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OsImageProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OsImageProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OsImageProperties. - */ - public static OsImageProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OsImageProperties deserializedOsImageProperties = new OsImageProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("validatedSolutionRecipeVersion".equals(fieldName)) { - deserializedOsImageProperties.validatedSolutionRecipeVersion = reader.getString(); - } else if ("composedImageVersion".equals(fieldName)) { - deserializedOsImageProperties.composedImageVersion = reader.getString(); - } else if ("composedImageIsoUrl".equals(fieldName)) { - deserializedOsImageProperties.composedImageIsoUrl = reader.getString(); - } else if ("composedImageIsoHash".equals(fieldName)) { - deserializedOsImageProperties.composedImageIsoHash = reader.getString(); - } else if ("architecture".equals(fieldName)) { - deserializedOsImageProperties.architecture = Architecture.fromString(reader.getString()); - } else if ("solutionType".equals(fieldName)) { - deserializedOsImageProperties.solutionType = SolutionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOsImageProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImages.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImages.java deleted file mode 100644 index 9e536d5f131c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImages.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of OsImages. - */ -public interface OsImages { - /** - * Get a os image. - * - * @param location The name of the Azure region. - * @param osImageName The name of the OsImage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a os image along with {@link Response}. - */ - Response getWithResponse(String location, String osImageName, Context context); - - /** - * Get a os image. - * - * @param location The name of the Azure region. - * @param osImageName The name of the OsImage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a os image. - */ - OsImage get(String location, String osImageName); - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listBySubscriptionLocationResource(String location); - - /** - * List all os images. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OsImage list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listBySubscriptionLocationResource(String location, Context context); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfile.java deleted file mode 100644 index ae501c4d5575..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfile.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * OS configurations for HCI device. - */ -@Immutable -public final class OsProfile implements JsonSerializable { - /* - * The boot type of the device. e.g. UEFI, Legacy etc - */ - private String bootType; - - /* - * Version of assembly present on device - */ - private String assemblyVersion; - - /* - * OS type (“windows", “linux”) - */ - private String osType; - - /* - * OS SKU (e.g., “ Microsoft Azure Linux ROE“, “Azure Stack HCI", "Microsoft Azure Linux 3.0") - */ - private String osSku; - - /* - * OS Version - */ - private String osVersion; - - /* - * OS Build Number - */ - private String buildNumber; - - /* - * OS Base Image Version - */ - private String baseImageVersion; - - /* - * OS Image Version - */ - private String imageVersion; - - /** - * Creates an instance of OsProfile class. - */ - private OsProfile() { - } - - /** - * Get the bootType property: The boot type of the device. e.g. UEFI, Legacy etc. - * - * @return the bootType value. - */ - public String bootType() { - return this.bootType; - } - - /** - * Get the assemblyVersion property: Version of assembly present on device. - * - * @return the assemblyVersion value. - */ - public String assemblyVersion() { - return this.assemblyVersion; - } - - /** - * Get the osType property: OS type (“windows", “linux”). - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Get the osSku property: OS SKU (e.g., “ Microsoft Azure Linux ROE“, “Azure Stack HCI", "Microsoft Azure Linux - * 3.0"). - * - * @return the osSku value. - */ - public String osSku() { - return this.osSku; - } - - /** - * Get the osVersion property: OS Version. - * - * @return the osVersion value. - */ - public String osVersion() { - return this.osVersion; - } - - /** - * Get the buildNumber property: OS Build Number. - * - * @return the buildNumber value. - */ - public String buildNumber() { - return this.buildNumber; - } - - /** - * Get the baseImageVersion property: OS Base Image Version. - * - * @return the baseImageVersion value. - */ - public String baseImageVersion() { - return this.baseImageVersion; - } - - /** - * Get the imageVersion property: OS Image Version. - * - * @return the imageVersion value. - */ - public String imageVersion() { - return this.imageVersion; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OsProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OsProfile if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the OsProfile. - */ - public static OsProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OsProfile deserializedOsProfile = new OsProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("bootType".equals(fieldName)) { - deserializedOsProfile.bootType = reader.getString(); - } else if ("assemblyVersion".equals(fieldName)) { - deserializedOsProfile.assemblyVersion = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedOsProfile.osType = reader.getString(); - } else if ("osSku".equals(fieldName)) { - deserializedOsProfile.osSku = reader.getString(); - } else if ("osVersion".equals(fieldName)) { - deserializedOsProfile.osVersion = reader.getString(); - } else if ("buildNumber".equals(fieldName)) { - deserializedOsProfile.buildNumber = reader.getString(); - } else if ("baseImageVersion".equals(fieldName)) { - deserializedOsProfile.baseImageVersion = reader.getString(); - } else if ("imageVersion".equals(fieldName)) { - deserializedOsProfile.imageVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOsProfile; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProvisionProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProvisionProfile.java deleted file mode 100644 index fb789f3eaf72..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProvisionProfile.java +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Operating system profile. - */ -@Fluent -public final class OsProvisionProfile implements JsonSerializable { - /* - * Name of the operating system. - */ - private String osName; - - /* - * Type of the operating system. - */ - private String osType; - - /* - * Version of the operating system. - */ - private String osVersion; - - /* - * Location of the operating system image. - */ - private String osImageLocation; - - /* - * Validated Solution Recipe version to be used for the job - */ - private String vsrVersion; - - /* - * Hash of the OS package downloaded - */ - private String imageHash; - - /* - * GPG Public Key used for package verification - */ - private String gpgPubKey; - - /* - * Operation sub type of OS Provisioning - */ - private OSOperationType operationType; - - /** - * Creates an instance of OsProvisionProfile class. - */ - public OsProvisionProfile() { - } - - /** - * Get the osName property: Name of the operating system. - * - * @return the osName value. - */ - public String osName() { - return this.osName; - } - - /** - * Set the osName property: Name of the operating system. - * - * @param osName the osName value to set. - * @return the OsProvisionProfile object itself. - */ - public OsProvisionProfile withOsName(String osName) { - this.osName = osName; - return this; - } - - /** - * Get the osType property: Type of the operating system. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: Type of the operating system. - * - * @param osType the osType value to set. - * @return the OsProvisionProfile object itself. - */ - public OsProvisionProfile withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the osVersion property: Version of the operating system. - * - * @return the osVersion value. - */ - public String osVersion() { - return this.osVersion; - } - - /** - * Set the osVersion property: Version of the operating system. - * - * @param osVersion the osVersion value to set. - * @return the OsProvisionProfile object itself. - */ - public OsProvisionProfile withOsVersion(String osVersion) { - this.osVersion = osVersion; - return this; - } - - /** - * Get the osImageLocation property: Location of the operating system image. - * - * @return the osImageLocation value. - */ - public String osImageLocation() { - return this.osImageLocation; - } - - /** - * Set the osImageLocation property: Location of the operating system image. - * - * @param osImageLocation the osImageLocation value to set. - * @return the OsProvisionProfile object itself. - */ - public OsProvisionProfile withOsImageLocation(String osImageLocation) { - this.osImageLocation = osImageLocation; - return this; - } - - /** - * Get the vsrVersion property: Validated Solution Recipe version to be used for the job. - * - * @return the vsrVersion value. - */ - public String vsrVersion() { - return this.vsrVersion; - } - - /** - * Set the vsrVersion property: Validated Solution Recipe version to be used for the job. - * - * @param vsrVersion the vsrVersion value to set. - * @return the OsProvisionProfile object itself. - */ - public OsProvisionProfile withVsrVersion(String vsrVersion) { - this.vsrVersion = vsrVersion; - return this; - } - - /** - * Get the imageHash property: Hash of the OS package downloaded. - * - * @return the imageHash value. - */ - public String imageHash() { - return this.imageHash; - } - - /** - * Set the imageHash property: Hash of the OS package downloaded. - * - * @param imageHash the imageHash value to set. - * @return the OsProvisionProfile object itself. - */ - public OsProvisionProfile withImageHash(String imageHash) { - this.imageHash = imageHash; - return this; - } - - /** - * Get the gpgPubKey property: GPG Public Key used for package verification. - * - * @return the gpgPubKey value. - */ - public String gpgPubKey() { - return this.gpgPubKey; - } - - /** - * Set the gpgPubKey property: GPG Public Key used for package verification. - * - * @param gpgPubKey the gpgPubKey value to set. - * @return the OsProvisionProfile object itself. - */ - public OsProvisionProfile withGpgPubKey(String gpgPubKey) { - this.gpgPubKey = gpgPubKey; - return this; - } - - /** - * Get the operationType property: Operation sub type of OS Provisioning. - * - * @return the operationType value. - */ - public OSOperationType operationType() { - return this.operationType; - } - - /** - * Set the operationType property: Operation sub type of OS Provisioning. - * - * @param operationType the operationType value to set. - * @return the OsProvisionProfile object itself. - */ - public OsProvisionProfile withOperationType(OSOperationType operationType) { - this.operationType = operationType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("osName", this.osName); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("osVersion", this.osVersion); - jsonWriter.writeStringField("osImageLocation", this.osImageLocation); - jsonWriter.writeStringField("vsrVersion", this.vsrVersion); - jsonWriter.writeStringField("imageHash", this.imageHash); - jsonWriter.writeStringField("gpgPubKey", this.gpgPubKey); - jsonWriter.writeStringField("operationType", this.operationType == null ? null : this.operationType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OsProvisionProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OsProvisionProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OsProvisionProfile. - */ - public static OsProvisionProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OsProvisionProfile deserializedOsProvisionProfile = new OsProvisionProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("osName".equals(fieldName)) { - deserializedOsProvisionProfile.osName = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedOsProvisionProfile.osType = reader.getString(); - } else if ("osVersion".equals(fieldName)) { - deserializedOsProvisionProfile.osVersion = reader.getString(); - } else if ("osImageLocation".equals(fieldName)) { - deserializedOsProvisionProfile.osImageLocation = reader.getString(); - } else if ("vsrVersion".equals(fieldName)) { - deserializedOsProvisionProfile.vsrVersion = reader.getString(); - } else if ("imageHash".equals(fieldName)) { - deserializedOsProvisionProfile.imageHash = reader.getString(); - } else if ("gpgPubKey".equals(fieldName)) { - deserializedOsProvisionProfile.gpgPubKey = reader.getString(); - } else if ("operationType".equals(fieldName)) { - deserializedOsProvisionProfile.operationType = OSOperationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOsProvisionProfile; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnerKeyType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnerKeyType.java deleted file mode 100644 index f4bc7645ac2d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnerKeyType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of owner key in the voucher. - */ -public final class OwnerKeyType extends ExpandableStringEnum { - /** - * Owner is Microsoft managed key. - */ - public static final OwnerKeyType MICROSOFT_MANAGED = fromString("MicrosoftManaged"); - - /** - * Creates a new instance of OwnerKeyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OwnerKeyType() { - } - - /** - * Creates or finds a OwnerKeyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OwnerKeyType. - */ - public static OwnerKeyType fromString(String name) { - return fromString(name, OwnerKeyType.class); - } - - /** - * Gets known OwnerKeyType values. - * - * @return known OwnerKeyType values. - */ - public static Collection values() { - return values(OwnerKeyType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherDetails.java deleted file mode 100644 index e25d046a8289..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherDetails.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details for ownership voucher. - */ -@Fluent -public final class OwnershipVoucherDetails implements JsonSerializable { - /* - * Ownership voucher in base64 encoded format - */ - private String ownershipVoucher; - - /* - * Owner key type - */ - private OwnerKeyType ownerKeyType; - - /* - * Ownership Voucher Validation Details - */ - private OwnershipVoucherValidationDetails validationDetails; - - /** - * Creates an instance of OwnershipVoucherDetails class. - */ - public OwnershipVoucherDetails() { - } - - /** - * Get the ownershipVoucher property: Ownership voucher in base64 encoded format. - * - * @return the ownershipVoucher value. - */ - public String ownershipVoucher() { - return this.ownershipVoucher; - } - - /** - * Set the ownershipVoucher property: Ownership voucher in base64 encoded format. - * - * @param ownershipVoucher the ownershipVoucher value to set. - * @return the OwnershipVoucherDetails object itself. - */ - public OwnershipVoucherDetails withOwnershipVoucher(String ownershipVoucher) { - this.ownershipVoucher = ownershipVoucher; - return this; - } - - /** - * Get the ownerKeyType property: Owner key type. - * - * @return the ownerKeyType value. - */ - public OwnerKeyType ownerKeyType() { - return this.ownerKeyType; - } - - /** - * Set the ownerKeyType property: Owner key type. - * - * @param ownerKeyType the ownerKeyType value to set. - * @return the OwnershipVoucherDetails object itself. - */ - public OwnershipVoucherDetails withOwnerKeyType(OwnerKeyType ownerKeyType) { - this.ownerKeyType = ownerKeyType; - return this; - } - - /** - * Get the validationDetails property: Ownership Voucher Validation Details. - * - * @return the validationDetails value. - */ - public OwnershipVoucherValidationDetails validationDetails() { - return this.validationDetails; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ownershipVoucher", this.ownershipVoucher); - jsonWriter.writeStringField("ownerKeyType", this.ownerKeyType == null ? null : this.ownerKeyType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OwnershipVoucherDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OwnershipVoucherDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OwnershipVoucherDetails. - */ - public static OwnershipVoucherDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OwnershipVoucherDetails deserializedOwnershipVoucherDetails = new OwnershipVoucherDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ownershipVoucher".equals(fieldName)) { - deserializedOwnershipVoucherDetails.ownershipVoucher = reader.getString(); - } else if ("ownerKeyType".equals(fieldName)) { - deserializedOwnershipVoucherDetails.ownerKeyType = OwnerKeyType.fromString(reader.getString()); - } else if ("validationDetails".equals(fieldName)) { - deserializedOwnershipVoucherDetails.validationDetails - = OwnershipVoucherValidationDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOwnershipVoucherDetails; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationDetails.java deleted file mode 100644 index 1c432375403e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationDetails.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Ownership Voucher Validation Details. - */ -@Immutable -public final class OwnershipVoucherValidationDetails implements JsonSerializable { - /* - * The ownership voucher validation status. - */ - private OwnershipVoucherValidationStatus validationStatus; - - /* - * Serial number of the device. - */ - private String serialNumber; - - /* - * FDO guid of the Ownership Voucher. - */ - private String id; - - /* - * Name of the manufacturer. - */ - private String manufacturer; - - /* - * Name of the model. - */ - private String modelName; - - /* - * Version of the Ownership Voucher format - */ - private String version; - - /* - * Azure Machine Id of the Ownership voucher - */ - private String azureMachineId; - - /* - * CPU architecture of the device, for example amd64 or arm64. - */ - private Architecture architecture; - - /* - * Error details if the validation failed. - */ - private ManagementError error; - - /** - * Creates an instance of OwnershipVoucherValidationDetails class. - */ - private OwnershipVoucherValidationDetails() { - } - - /** - * Get the validationStatus property: The ownership voucher validation status. - * - * @return the validationStatus value. - */ - public OwnershipVoucherValidationStatus validationStatus() { - return this.validationStatus; - } - - /** - * Get the serialNumber property: Serial number of the device. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Get the id property: FDO guid of the Ownership Voucher. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the manufacturer property: Name of the manufacturer. - * - * @return the manufacturer value. - */ - public String manufacturer() { - return this.manufacturer; - } - - /** - * Get the modelName property: Name of the model. - * - * @return the modelName value. - */ - public String modelName() { - return this.modelName; - } - - /** - * Get the version property: Version of the Ownership Voucher format. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the azureMachineId property: Azure Machine Id of the Ownership voucher. - * - * @return the azureMachineId value. - */ - public String azureMachineId() { - return this.azureMachineId; - } - - /** - * Get the architecture property: CPU architecture of the device, for example amd64 or arm64. - * - * @return the architecture value. - */ - public Architecture architecture() { - return this.architecture; - } - - /** - * Get the error property: Error details if the validation failed. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("validationStatus", - this.validationStatus == null ? null : this.validationStatus.toString()); - jsonWriter.writeStringField("serialNumber", this.serialNumber); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("manufacturer", this.manufacturer); - jsonWriter.writeStringField("modelName", this.modelName); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeStringField("azureMachineId", this.azureMachineId); - jsonWriter.writeStringField("architecture", this.architecture == null ? null : this.architecture.toString()); - jsonWriter.writeJsonField("error", this.error); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OwnershipVoucherValidationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OwnershipVoucherValidationDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OwnershipVoucherValidationDetails. - */ - public static OwnershipVoucherValidationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OwnershipVoucherValidationDetails deserializedOwnershipVoucherValidationDetails - = new OwnershipVoucherValidationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("validationStatus".equals(fieldName)) { - deserializedOwnershipVoucherValidationDetails.validationStatus - = OwnershipVoucherValidationStatus.fromString(reader.getString()); - } else if ("serialNumber".equals(fieldName)) { - deserializedOwnershipVoucherValidationDetails.serialNumber = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedOwnershipVoucherValidationDetails.id = reader.getString(); - } else if ("manufacturer".equals(fieldName)) { - deserializedOwnershipVoucherValidationDetails.manufacturer = reader.getString(); - } else if ("modelName".equals(fieldName)) { - deserializedOwnershipVoucherValidationDetails.modelName = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedOwnershipVoucherValidationDetails.version = reader.getString(); - } else if ("azureMachineId".equals(fieldName)) { - deserializedOwnershipVoucherValidationDetails.azureMachineId = reader.getString(); - } else if ("architecture".equals(fieldName)) { - deserializedOwnershipVoucherValidationDetails.architecture - = Architecture.fromString(reader.getString()); - } else if ("error".equals(fieldName)) { - deserializedOwnershipVoucherValidationDetails.error = ManagementError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOwnershipVoucherValidationDetails; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationStatus.java deleted file mode 100644 index e93605db9ba2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Ownership Voucher validation Status. - */ -public final class OwnershipVoucherValidationStatus extends ExpandableStringEnum { - /** - * Voucher evaluated as valid. - */ - public static final OwnershipVoucherValidationStatus VALID = fromString("Valid"); - - /** - * Voucher evaluated as invalid. - */ - public static final OwnershipVoucherValidationStatus INVALID = fromString("Invalid"); - - /** - * Creates a new instance of OwnershipVoucherValidationStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OwnershipVoucherValidationStatus() { - } - - /** - * Creates or finds a OwnershipVoucherValidationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding OwnershipVoucherValidationStatus. - */ - public static OwnershipVoucherValidationStatus fromString(String name) { - return fromString(name, OwnershipVoucherValidationStatus.class); - } - - /** - * Gets known OwnershipVoucherValidationStatus values. - * - * @return known OwnershipVoucherValidationStatus values. - */ - public static Collection values() { - return values(OwnershipVoucherValidationStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVouchers.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVouchers.java deleted file mode 100644 index 38a4e4ae8f5b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVouchers.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of OwnershipVouchers. - */ -public interface OwnershipVouchers { - /** - * Validates ownership vouchers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Ownership vouchers to be validated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return validate Ownership Voucher Response along with {@link Response}. - */ - Response validateWithResponse(String resourceGroupName, String location, - ValidateOwnershipVouchersRequest validationRequest, Context context); - - /** - * Validates ownership vouchers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Ownership vouchers to be validated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return validate Ownership Voucher Response. - */ - ValidateOwnershipVouchersResponse validate(String resourceGroupName, String location, - ValidateOwnershipVouchersRequest validationRequest); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrivilegedJobType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrivilegedJobType.java deleted file mode 100644 index 7f969c4dc7c0..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrivilegedJobType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Job Type supported for disk privileged operations. - */ -public final class PrivilegedJobType extends ExpandableStringEnum { - /** - * Job to delete a volume from the disk. - */ - public static final PrivilegedJobType DELETE_VOLUME = fromString("DeleteVolume"); - - /** - * Creates a new instance of PrivilegedJobType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivilegedJobType() { - } - - /** - * Creates or finds a PrivilegedJobType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivilegedJobType. - */ - public static PrivilegedJobType fromString(String name) { - return fromString(name, PrivilegedJobType.class); - } - - /** - * Gets known PrivilegedJobType values. - * - * @return known PrivilegedJobType values. - */ - public static Collection values() { - return values(PrivilegedJobType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsJobProperties.java deleted file mode 100644 index b2a597f7dc01..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsJobProperties.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents the properties of an Azure Linux restricted operating environment Provision Os job. - */ -@Fluent -public final class ProvisionOsJobProperties extends EdgeMachineJobProperties { - /* - * Job Type to support polymorphic resource. - */ - private EdgeMachineJobType jobType = EdgeMachineJobType.PROVISION_OS; - - /* - * Os Provisioning request. - */ - private ProvisioningRequest provisioningRequest; - - /* - * Reported Properties for Provision Os job - */ - private ProvisionOsReportedProperties reportedProperties; - - /** - * Creates an instance of ProvisionOsJobProperties class. - */ - public ProvisionOsJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public EdgeMachineJobType jobType() { - return this.jobType; - } - - /** - * Get the provisioningRequest property: Os Provisioning request. - * - * @return the provisioningRequest value. - */ - public ProvisioningRequest provisioningRequest() { - return this.provisioningRequest; - } - - /** - * Set the provisioningRequest property: Os Provisioning request. - * - * @param provisioningRequest the provisioningRequest value to set. - * @return the ProvisionOsJobProperties object itself. - */ - public ProvisionOsJobProperties withProvisioningRequest(ProvisioningRequest provisioningRequest) { - this.provisioningRequest = provisioningRequest; - return this; - } - - /** - * Get the reportedProperties property: Reported Properties for Provision Os job. - * - * @return the reportedProperties value. - */ - public ProvisionOsReportedProperties reportedProperties() { - return this.reportedProperties; - } - - /** - * Set the reportedProperties property: Reported Properties for Provision Os job. - * - * @param reportedProperties the reportedProperties value to set. - * @return the ProvisionOsJobProperties object itself. - */ - public ProvisionOsJobProperties withReportedProperties(ProvisionOsReportedProperties reportedProperties) { - this.reportedProperties = reportedProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProvisionOsJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeJsonField("provisioningRequest", this.provisioningRequest); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("reportedProperties", this.reportedProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProvisionOsJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProvisionOsJobProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProvisionOsJobProperties. - */ - public static ProvisionOsJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProvisionOsJobProperties deserializedProvisionOsJobProperties = new ProvisionOsJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedProvisionOsJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedProvisionOsJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedProvisionOsJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedProvisionOsJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedProvisionOsJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedProvisionOsJobProperties.withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedProvisionOsJobProperties.withError(ManagementError.fromJson(reader)); - } else if ("provisioningRequest".equals(fieldName)) { - deserializedProvisionOsJobProperties.provisioningRequest = ProvisioningRequest.fromJson(reader); - } else if ("jobType".equals(fieldName)) { - deserializedProvisionOsJobProperties.jobType = EdgeMachineJobType.fromString(reader.getString()); - } else if ("reportedProperties".equals(fieldName)) { - deserializedProvisionOsJobProperties.reportedProperties - = ProvisionOsReportedProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedProvisionOsJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsReportedProperties.java deleted file mode 100644 index 20a3a079733c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsReportedProperties.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reported Properties for Provision Os job. - */ -@Immutable -public final class ProvisionOsReportedProperties implements JsonSerializable { - /* - * The percentage of the job that is complete. - */ - private Integer percentComplete; - - /* - * Validation status of job. - */ - private EceActionStatus validationStatus; - - /* - * Deployment status of job. - */ - private EceActionStatus deploymentStatus; - - /** - * Creates an instance of ProvisionOsReportedProperties class. - */ - public ProvisionOsReportedProperties() { - } - - /** - * Get the percentComplete property: The percentage of the job that is complete. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the validationStatus property: Validation status of job. - * - * @return the validationStatus value. - */ - public EceActionStatus validationStatus() { - return this.validationStatus; - } - - /** - * Get the deploymentStatus property: Deployment status of job. - * - * @return the deploymentStatus value. - */ - public EceActionStatus deploymentStatus() { - return this.deploymentStatus; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProvisionOsReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProvisionOsReportedProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProvisionOsReportedProperties. - */ - public static ProvisionOsReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProvisionOsReportedProperties deserializedProvisionOsReportedProperties - = new ProvisionOsReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("percentComplete".equals(fieldName)) { - deserializedProvisionOsReportedProperties.percentComplete = reader.getNullable(JsonReader::getInt); - } else if ("validationStatus".equals(fieldName)) { - deserializedProvisionOsReportedProperties.validationStatus = EceActionStatus.fromJson(reader); - } else if ("deploymentStatus".equals(fieldName)) { - deserializedProvisionOsReportedProperties.deploymentStatus = EceActionStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedProvisionOsReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningDetails.java deleted file mode 100644 index 69bc3b9e7e00..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningDetails.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Details for device provisioning. - */ -@Fluent -public final class ProvisioningDetails implements JsonSerializable { - /* - * Operating system profile. - */ - private OsProvisionProfile osProfile; - - /* - * User configuration. - */ - private List userDetails; - - /** - * Creates an instance of ProvisioningDetails class. - */ - public ProvisioningDetails() { - } - - /** - * Get the osProfile property: Operating system profile. - * - * @return the osProfile value. - */ - public OsProvisionProfile osProfile() { - return this.osProfile; - } - - /** - * Set the osProfile property: Operating system profile. - * - * @param osProfile the osProfile value to set. - * @return the ProvisioningDetails object itself. - */ - public ProvisioningDetails withOsProfile(OsProvisionProfile osProfile) { - this.osProfile = osProfile; - return this; - } - - /** - * Get the userDetails property: User configuration. - * - * @return the userDetails value. - */ - public List userDetails() { - return this.userDetails; - } - - /** - * Set the userDetails property: User configuration. - * - * @param userDetails the userDetails value to set. - * @return the ProvisioningDetails object itself. - */ - public ProvisioningDetails withUserDetails(List userDetails) { - this.userDetails = userDetails; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("osProfile", this.osProfile); - jsonWriter.writeArrayField("userDetails", this.userDetails, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProvisioningDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProvisioningDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProvisioningDetails. - */ - public static ProvisioningDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProvisioningDetails deserializedProvisioningDetails = new ProvisioningDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("osProfile".equals(fieldName)) { - deserializedProvisioningDetails.osProfile = OsProvisionProfile.fromJson(reader); - } else if ("userDetails".equals(fieldName)) { - List userDetails = reader.readArray(reader1 -> UserDetails.fromJson(reader1)); - deserializedProvisioningDetails.userDetails = userDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedProvisioningDetails; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningOsType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningOsType.java deleted file mode 100644 index 35618903fe82..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningOsType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Represents the provisioning operating system type. - */ -public final class ProvisioningOsType extends ExpandableStringEnum { - /** - * AzureLinux OS. - */ - public static final ProvisioningOsType AZURE_LINUX = fromString("AzureLinux"); - - /** - * HCI OS. - */ - public static final ProvisioningOsType HCI = fromString("HCI"); - - /** - * Creates a new instance of ProvisioningOsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProvisioningOsType() { - } - - /** - * Creates or finds a ProvisioningOsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningOsType. - */ - public static ProvisioningOsType fromString(String name) { - return fromString(name, ProvisioningOsType.class); - } - - /** - * Gets known ProvisioningOsType values. - * - * @return known ProvisioningOsType values. - */ - public static Collection values() { - return values(ProvisioningOsType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningRequest.java deleted file mode 100644 index 769f87636400..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningRequest.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Represents a provisioning request. - */ -@Fluent -public final class ProvisioningRequest implements JsonSerializable { - /* - * Target operating system to support polymorphic resource. - */ - private ProvisioningOsType target; - - /* - * Operating system profile. - */ - private OsProvisionProfile osProfile; - - /* - * User configuration. - */ - private List userDetails; - - /* - * Onboarding configuration. - */ - private OnboardingConfiguration onboardingConfiguration; - - /* - * Device configuration. - */ - private TargetDeviceConfiguration deviceConfiguration; - - /* - * Base64 encoded custom configuration for CAPI to use - */ - private String customConfiguration; - - /** - * Creates an instance of ProvisioningRequest class. - */ - public ProvisioningRequest() { - } - - /** - * Get the target property: Target operating system to support polymorphic resource. - * - * @return the target value. - */ - public ProvisioningOsType target() { - return this.target; - } - - /** - * Set the target property: Target operating system to support polymorphic resource. - * - * @param target the target value to set. - * @return the ProvisioningRequest object itself. - */ - public ProvisioningRequest withTarget(ProvisioningOsType target) { - this.target = target; - return this; - } - - /** - * Get the osProfile property: Operating system profile. - * - * @return the osProfile value. - */ - public OsProvisionProfile osProfile() { - return this.osProfile; - } - - /** - * Set the osProfile property: Operating system profile. - * - * @param osProfile the osProfile value to set. - * @return the ProvisioningRequest object itself. - */ - public ProvisioningRequest withOsProfile(OsProvisionProfile osProfile) { - this.osProfile = osProfile; - return this; - } - - /** - * Get the userDetails property: User configuration. - * - * @return the userDetails value. - */ - public List userDetails() { - return this.userDetails; - } - - /** - * Set the userDetails property: User configuration. - * - * @param userDetails the userDetails value to set. - * @return the ProvisioningRequest object itself. - */ - public ProvisioningRequest withUserDetails(List userDetails) { - this.userDetails = userDetails; - return this; - } - - /** - * Get the onboardingConfiguration property: Onboarding configuration. - * - * @return the onboardingConfiguration value. - */ - public OnboardingConfiguration onboardingConfiguration() { - return this.onboardingConfiguration; - } - - /** - * Set the onboardingConfiguration property: Onboarding configuration. - * - * @param onboardingConfiguration the onboardingConfiguration value to set. - * @return the ProvisioningRequest object itself. - */ - public ProvisioningRequest withOnboardingConfiguration(OnboardingConfiguration onboardingConfiguration) { - this.onboardingConfiguration = onboardingConfiguration; - return this; - } - - /** - * Get the deviceConfiguration property: Device configuration. - * - * @return the deviceConfiguration value. - */ - public TargetDeviceConfiguration deviceConfiguration() { - return this.deviceConfiguration; - } - - /** - * Set the deviceConfiguration property: Device configuration. - * - * @param deviceConfiguration the deviceConfiguration value to set. - * @return the ProvisioningRequest object itself. - */ - public ProvisioningRequest withDeviceConfiguration(TargetDeviceConfiguration deviceConfiguration) { - this.deviceConfiguration = deviceConfiguration; - return this; - } - - /** - * Get the customConfiguration property: Base64 encoded custom configuration for CAPI to use. - * - * @return the customConfiguration value. - */ - public String customConfiguration() { - return this.customConfiguration; - } - - /** - * Set the customConfiguration property: Base64 encoded custom configuration for CAPI to use. - * - * @param customConfiguration the customConfiguration value to set. - * @return the ProvisioningRequest object itself. - */ - public ProvisioningRequest withCustomConfiguration(String customConfiguration) { - this.customConfiguration = customConfiguration; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("target", this.target == null ? null : this.target.toString()); - jsonWriter.writeJsonField("osProfile", this.osProfile); - jsonWriter.writeArrayField("userDetails", this.userDetails, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("onboardingConfiguration", this.onboardingConfiguration); - jsonWriter.writeJsonField("deviceConfiguration", this.deviceConfiguration); - jsonWriter.writeStringField("customConfiguration", this.customConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProvisioningRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProvisioningRequest if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProvisioningRequest. - */ - public static ProvisioningRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProvisioningRequest deserializedProvisioningRequest = new ProvisioningRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("target".equals(fieldName)) { - deserializedProvisioningRequest.target = ProvisioningOsType.fromString(reader.getString()); - } else if ("osProfile".equals(fieldName)) { - deserializedProvisioningRequest.osProfile = OsProvisionProfile.fromJson(reader); - } else if ("userDetails".equals(fieldName)) { - List userDetails = reader.readArray(reader1 -> UserDetails.fromJson(reader1)); - deserializedProvisioningRequest.userDetails = userDetails; - } else if ("onboardingConfiguration".equals(fieldName)) { - deserializedProvisioningRequest.onboardingConfiguration = OnboardingConfiguration.fromJson(reader); - } else if ("deviceConfiguration".equals(fieldName)) { - deserializedProvisioningRequest.deviceConfiguration = TargetDeviceConfiguration.fromJson(reader); - } else if ("customConfiguration".equals(fieldName)) { - deserializedProvisioningRequest.customConfiguration = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProvisioningRequest; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RepairServerJobServerDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RepairServerJobServerDetails.java deleted file mode 100644 index 9aa2bc3efa72..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RepairServerJobServerDetails.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of servers to be repaired in the cluster. - */ -@Fluent -public final class RepairServerJobServerDetails implements JsonSerializable { - /* - * Name of server to be repaired in cluster. - */ - private String serverName; - - /* - * Azure resource id of Arc machine part of cluster for which job will be triggered. - */ - private String serverResourceId; - - /** - * Creates an instance of RepairServerJobServerDetails class. - */ - public RepairServerJobServerDetails() { - } - - /** - * Get the serverName property: Name of server to be repaired in cluster. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Set the serverName property: Name of server to be repaired in cluster. - * - * @param serverName the serverName value to set. - * @return the RepairServerJobServerDetails object itself. - */ - public RepairServerJobServerDetails withServerName(String serverName) { - this.serverName = serverName; - return this; - } - - /** - * Get the serverResourceId property: Azure resource id of Arc machine part of cluster for which job will be - * triggered. - * - * @return the serverResourceId value. - */ - public String serverResourceId() { - return this.serverResourceId; - } - - /** - * Set the serverResourceId property: Azure resource id of Arc machine part of cluster for which job will be - * triggered. - * - * @param serverResourceId the serverResourceId value to set. - * @return the RepairServerJobServerDetails object itself. - */ - public RepairServerJobServerDetails withServerResourceId(String serverResourceId) { - this.serverResourceId = serverResourceId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serverName", this.serverName); - jsonWriter.writeStringField("serverResourceId", this.serverResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RepairServerJobServerDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RepairServerJobServerDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RepairServerJobServerDetails. - */ - public static RepairServerJobServerDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RepairServerJobServerDetails deserializedRepairServerJobServerDetails = new RepairServerJobServerDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serverName".equals(fieldName)) { - deserializedRepairServerJobServerDetails.serverName = reader.getString(); - } else if ("serverResourceId".equals(fieldName)) { - deserializedRepairServerJobServerDetails.serverResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRepairServerJobServerDetails; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ResolutionStrategy.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ResolutionStrategy.java deleted file mode 100644 index b5e9d85da1a1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ResolutionStrategy.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Strategy for resolving configuration drift. - */ -public final class ResolutionStrategy extends ExpandableStringEnum { - /** - * Trust Cloud. Push the desiredConfiguration down to the device. - */ - public static final ResolutionStrategy APPLY_DESIRED = fromString("ApplyDesired"); - - /** - * Trust Device. Update the desiredConfiguration in ARM to match the reported state. - */ - public static final ResolutionStrategy ACCEPT_REPORTED = fromString("AcceptReported"); - - /** - * Creates a new instance of ResolutionStrategy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResolutionStrategy() { - } - - /** - * Creates or finds a ResolutionStrategy from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResolutionStrategy. - */ - public static ResolutionStrategy fromString(String name) { - return fromString(name, ResolutionStrategy.class); - } - - /** - * Gets known ResolutionStrategy values. - * - * @return known ResolutionStrategy values. - */ - public static Collection values() { - return values(ResolutionStrategy.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegrationIntent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegrationIntent.java deleted file mode 100644 index 9b5e3d6d75e3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegrationIntent.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether Software Defined Networking (SDN) integration should be enabled or disabled for this deployment. - */ -public final class SdnIntegrationIntent extends ExpandableStringEnum { - /** - * Enable SDN integration for the deployment. - */ - public static final SdnIntegrationIntent ENABLE = fromString("Enable"); - - /** - * Disable SDN integration for the deployment. - */ - public static final SdnIntegrationIntent DISABLE = fromString("Disable"); - - /** - * Creates a new instance of SdnIntegrationIntent value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SdnIntegrationIntent() { - } - - /** - * Creates or finds a SdnIntegrationIntent from its string representation. - * - * @param name a name to look for. - * @return the corresponding SdnIntegrationIntent. - */ - public static SdnIntegrationIntent fromString(String name) { - return fromString(name, SdnIntegrationIntent.class); - } - - /** - * Gets known SdnIntegrationIntent values. - * - * @return known SdnIntegrationIntent values. - */ - public static Collection values() { - return values(SdnIntegrationIntent.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnProperties.java deleted file mode 100644 index f2b00db42b93..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnProperties.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents the Software Defined Networking (SDN) configuration state. - */ -@Immutable -public final class SdnProperties implements JsonSerializable { - /* - * Indicates the current Software Defined Networking (SDN) status of the resource, which may be an individual device - * or a cluster. - */ - private SdnStatus sdnStatus; - - /* - * The fully qualified domain name (FQDN) associated with the SDN deployment. This value is propagated from the - * Device Management Extension to the cluster resource. It is typically in the format `-nc.` when - * SDN is enabled. May be null or absent in unsupported or disabled states. - */ - private String sdnDomainName; - - /* - * Represents the API address for the SDN deployment. - */ - private String sdnApiAddress; - - /** - * Creates an instance of SdnProperties class. - */ - private SdnProperties() { - } - - /** - * Get the sdnStatus property: Indicates the current Software Defined Networking (SDN) status of the resource, which - * may be an individual device or a cluster. - * - * @return the sdnStatus value. - */ - public SdnStatus sdnStatus() { - return this.sdnStatus; - } - - /** - * Get the sdnDomainName property: The fully qualified domain name (FQDN) associated with the SDN deployment. This - * value is propagated from the Device Management Extension to the cluster resource. It is typically in the format - * `<sdnPrefix>-nc.<domain>` when SDN is enabled. May be null or absent in unsupported or disabled - * states. - * - * @return the sdnDomainName value. - */ - public String sdnDomainName() { - return this.sdnDomainName; - } - - /** - * Get the sdnApiAddress property: Represents the API address for the SDN deployment. - * - * @return the sdnApiAddress value. - */ - public String sdnApiAddress() { - return this.sdnApiAddress; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SdnProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SdnProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SdnProperties. - */ - public static SdnProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SdnProperties deserializedSdnProperties = new SdnProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sdnStatus".equals(fieldName)) { - deserializedSdnProperties.sdnStatus = SdnStatus.fromString(reader.getString()); - } else if ("sdnDomainName".equals(fieldName)) { - deserializedSdnProperties.sdnDomainName = reader.getString(); - } else if ("sdnApiAddress".equals(fieldName)) { - deserializedSdnProperties.sdnApiAddress = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSdnProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnStatus.java deleted file mode 100644 index c845e20f33b4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnStatus.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates the current Software Defined Networking (SDN) status of the resource, which may be an individual device or - * a cluster. - */ -public final class SdnStatus extends ExpandableStringEnum { - /** - * The SDN status could not be determined due to a failure in querying the SDN API service. This may occur if the - * query script fails or if the system is in an inconsistent state. The domain name will be null in this case. - */ - public static final SdnStatus UNKNOWN = fromString("Unknown"); - - /** - * SDN is not enabled on the resource. The domain name will be null. This is the default state when SDN has not been - * configured. - */ - public static final SdnStatus DISABLED = fromString("Disabled"); - - /** - * SDN is successfully enabled on the resource. The domain name will be populated in the format - * `<sdnPrefix>-nc.<domain>`. Customers may need to manage DNS settings to ensure proper resolution. - */ - public static final SdnStatus ENABLED = fromString("Enabled"); - - /** - * Creates a new instance of SdnStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SdnStatus() { - } - - /** - * Creates or finds a SdnStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SdnStatus. - */ - public static SdnStatus fromString(String name) { - return fromString(name, SdnStatus.class); - } - - /** - * Gets known SdnStatus values. - * - * @return known SdnStatus values. - */ - public static Collection values() { - return values(SdnStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretType.java deleted file mode 100644 index 98b6da2623c9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of secret used for authentication. - */ -public final class SecretType extends ExpandableStringEnum { - /** - * Key Vault based authentication. - */ - public static final SecretType KEY_VAULT = fromString("KeyVault"); - - /** - * SSH Public Key based authentication. - */ - public static final SecretType SSH_PUB_KEY = fromString("SshPubKey"); - - /** - * Creates a new instance of SecretType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SecretType() { - } - - /** - * Creates or finds a SecretType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecretType. - */ - public static SecretType fromString(String name) { - return fromString(name, SecretType.class); - } - - /** - * Gets known SecretType values. - * - * @return known SecretType values. - */ - public static Collection values() { - return values(SecretType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SiteDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SiteDetails.java deleted file mode 100644 index cd4bb91b423c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SiteDetails.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Site Details consists of common configurations. - */ -@Fluent -public final class SiteDetails implements JsonSerializable { - /* - * Site resource Id to be set during Edge Machine resource creation. - */ - private String siteResourceId; - - /* - * Edge Device configuration received from site common configuration. - */ - private TargetDeviceConfiguration deviceConfiguration; - - /** - * Creates an instance of SiteDetails class. - */ - public SiteDetails() { - } - - /** - * Get the siteResourceId property: Site resource Id to be set during Edge Machine resource creation. - * - * @return the siteResourceId value. - */ - public String siteResourceId() { - return this.siteResourceId; - } - - /** - * Set the siteResourceId property: Site resource Id to be set during Edge Machine resource creation. - * - * @param siteResourceId the siteResourceId value to set. - * @return the SiteDetails object itself. - */ - public SiteDetails withSiteResourceId(String siteResourceId) { - this.siteResourceId = siteResourceId; - return this; - } - - /** - * Get the deviceConfiguration property: Edge Device configuration received from site common configuration. - * - * @return the deviceConfiguration value. - */ - public TargetDeviceConfiguration deviceConfiguration() { - return this.deviceConfiguration; - } - - /** - * Set the deviceConfiguration property: Edge Device configuration received from site common configuration. - * - * @param deviceConfiguration the deviceConfiguration value to set. - * @return the SiteDetails object itself. - */ - public SiteDetails withDeviceConfiguration(TargetDeviceConfiguration deviceConfiguration) { - this.deviceConfiguration = deviceConfiguration; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("siteResourceId", this.siteResourceId); - jsonWriter.writeJsonField("deviceConfiguration", this.deviceConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SiteDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SiteDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SiteDetails. - */ - public static SiteDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SiteDetails deserializedSiteDetails = new SiteDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("siteResourceId".equals(fieldName)) { - deserializedSiteDetails.siteResourceId = reader.getString(); - } else if ("deviceConfiguration".equals(fieldName)) { - deserializedSiteDetails.deviceConfiguration = TargetDeviceConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSiteDetails; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SolutionType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SolutionType.java deleted file mode 100644 index d9781e41e6ad..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SolutionType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Represents the solution type (OS family) of an OS image. - */ -public final class SolutionType extends ExpandableStringEnum { - /** - * AzureLinux OS. - */ - public static final SolutionType AZURE_LINUX = fromString("AzureLinux"); - - /** - * HCI OS. - */ - public static final SolutionType HCI = fromString("HCI"); - - /** - * Creates a new instance of SolutionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SolutionType() { - } - - /** - * Creates or finds a SolutionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SolutionType. - */ - public static SolutionType fromString(String name) { - return fromString(name, SolutionType.class); - } - - /** - * Gets known SolutionType values. - * - * @return known SolutionType values. - */ - public static Collection values() { - return values(SolutionType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageConfiguration.java deleted file mode 100644 index 9fe0f05de3f1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageConfiguration.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Storage configuration. - */ -@Fluent -public final class StorageConfiguration implements JsonSerializable { - /* - * Partition size. - */ - private String partitionSize; - - /** - * Creates an instance of StorageConfiguration class. - */ - public StorageConfiguration() { - } - - /** - * Get the partitionSize property: Partition size. - * - * @return the partitionSize value. - */ - public String partitionSize() { - return this.partitionSize; - } - - /** - * Set the partitionSize property: Partition size. - * - * @param partitionSize the partitionSize value to set. - * @return the StorageConfiguration object itself. - */ - public StorageConfiguration withPartitionSize(String partitionSize) { - this.partitionSize = partitionSize; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("partitionSize", this.partitionSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageConfiguration. - */ - public static StorageConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageConfiguration deserializedStorageConfiguration = new StorageConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("partitionSize".equals(fieldName)) { - deserializedStorageConfiguration.partitionSize = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiator.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiator.java deleted file mode 100644 index 9c3f26982014..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiator.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A storage fabric initiator port (iSCSI or Fibre Channel) discovered on the edge machine. - */ -@Immutable -public final class StorageInitiator implements JsonSerializable { - /* - * Transport type of the initiator port. - */ - private StorageInitiatorType initiatorType; - - /* - * Node identifier of the initiator. IQN for iSCSI or node WWN (WWNN) for Fibre Channel. Corresponds to the - * NodeAddress reported by Get-InitiatorPort. - */ - private String initiatorIdentifier; - - /* - * Fibre Channel port World Wide Name (WWPN). Populated for FibreChannel initiators only; corresponds to the - * PortAddress reported by Get-InitiatorPort. - */ - private String portWorldWideName; - - /* - * Name of the Ethernet adapter the iSCSI initiator is bound to. Populated for iSCSI initiators only; matches - * EdgeMachineNicDetail.adapterName. - */ - private String ethernetAdapterName; - - /* - * MAC address of the Ethernet adapter the iSCSI initiator is bound to. Populated for iSCSI initiators only; matches - * EdgeMachineNicDetail.macAddress. - */ - private String ethernetAdapterMacAddress; - - /* - * Operational status of the initiator port as reported by the host. Corresponds to OperationalStatus from - * Get-InitiatorPort. - */ - private String operationalStatus; - - /** - * Creates an instance of StorageInitiator class. - */ - private StorageInitiator() { - } - - /** - * Get the initiatorType property: Transport type of the initiator port. - * - * @return the initiatorType value. - */ - public StorageInitiatorType initiatorType() { - return this.initiatorType; - } - - /** - * Get the initiatorIdentifier property: Node identifier of the initiator. IQN for iSCSI or node WWN (WWNN) for - * Fibre Channel. Corresponds to the NodeAddress reported by Get-InitiatorPort. - * - * @return the initiatorIdentifier value. - */ - public String initiatorIdentifier() { - return this.initiatorIdentifier; - } - - /** - * Get the portWorldWideName property: Fibre Channel port World Wide Name (WWPN). Populated for FibreChannel - * initiators only; corresponds to the PortAddress reported by Get-InitiatorPort. - * - * @return the portWorldWideName value. - */ - public String portWorldWideName() { - return this.portWorldWideName; - } - - /** - * Get the ethernetAdapterName property: Name of the Ethernet adapter the iSCSI initiator is bound to. Populated for - * iSCSI initiators only; matches EdgeMachineNicDetail.adapterName. - * - * @return the ethernetAdapterName value. - */ - public String ethernetAdapterName() { - return this.ethernetAdapterName; - } - - /** - * Get the ethernetAdapterMacAddress property: MAC address of the Ethernet adapter the iSCSI initiator is bound to. - * Populated for iSCSI initiators only; matches EdgeMachineNicDetail.macAddress. - * - * @return the ethernetAdapterMacAddress value. - */ - public String ethernetAdapterMacAddress() { - return this.ethernetAdapterMacAddress; - } - - /** - * Get the operationalStatus property: Operational status of the initiator port as reported by the host. Corresponds - * to OperationalStatus from Get-InitiatorPort. - * - * @return the operationalStatus value. - */ - public String operationalStatus() { - return this.operationalStatus; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageInitiator from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageInitiator if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the StorageInitiator. - */ - public static StorageInitiator fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageInitiator deserializedStorageInitiator = new StorageInitiator(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("initiatorType".equals(fieldName)) { - deserializedStorageInitiator.initiatorType = StorageInitiatorType.fromString(reader.getString()); - } else if ("initiatorIdentifier".equals(fieldName)) { - deserializedStorageInitiator.initiatorIdentifier = reader.getString(); - } else if ("portWorldWideName".equals(fieldName)) { - deserializedStorageInitiator.portWorldWideName = reader.getString(); - } else if ("ethernetAdapterName".equals(fieldName)) { - deserializedStorageInitiator.ethernetAdapterName = reader.getString(); - } else if ("ethernetAdapterMacAddress".equals(fieldName)) { - deserializedStorageInitiator.ethernetAdapterMacAddress = reader.getString(); - } else if ("operationalStatus".equals(fieldName)) { - deserializedStorageInitiator.operationalStatus = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageInitiator; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiatorType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiatorType.java deleted file mode 100644 index 01490092b08e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiatorType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Transport type of a storage fabric initiator port on the edge machine. - */ -public final class StorageInitiatorType extends ExpandableStringEnum { - /** - * iSCSI initiator. The initiator identifier is an IQN (iSCSI Qualified Name). - */ - public static final StorageInitiatorType I_SCSI = fromString("iSCSI"); - - /** - * Fibre Channel initiator. The initiator identifier is the node WWN (WWNN); the port is identified by its WWPN. - */ - public static final StorageInitiatorType FIBRE_CHANNEL = fromString("FibreChannel"); - - /** - * The initiator transport type could not be determined. - */ - public static final StorageInitiatorType UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of StorageInitiatorType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StorageInitiatorType() { - } - - /** - * Creates or finds a StorageInitiatorType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageInitiatorType. - */ - public static StorageInitiatorType fromString(String name) { - return fromString(name, StorageInitiatorType.class); - } - - /** - * Gets known StorageInitiatorType values. - * - * @return known StorageInitiatorType values. - */ - public static Collection values() { - return values(StorageInitiatorType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfile.java deleted file mode 100644 index fb76aab102fc..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfile.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * StorageProfile of edge machine. - */ -@Immutable -public final class StorageProfile implements JsonSerializable { - /* - * Number of storage disks in the device with $CanPool as true. - */ - private Long poolableDisksCount; - - /** - * Creates an instance of StorageProfile class. - */ - private StorageProfile() { - } - - /** - * Get the poolableDisksCount property: Number of storage disks in the device with $CanPool as true. - * - * @return the poolableDisksCount value. - */ - public Long poolableDisksCount() { - return this.poolableDisksCount; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageProfile. - */ - public static StorageProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageProfile deserializedStorageProfile = new StorageProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("poolableDisksCount".equals(fieldName)) { - deserializedStorageProfile.poolableDisksCount = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageProfile; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationJobProperties.java deleted file mode 100644 index 2ca3e816052b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationJobProperties.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties for resolving configuration drift. - */ -@Fluent -public final class SyncConfigurationJobProperties extends EdgeMachineDiskJobProperties { - /* - * Job Type to support polymorphic resource. - */ - private DiskJobType jobType = DiskJobType.SYNC_CONFIGURATION; - - /* - * The strategy to use for resolving the configuration drift. - */ - private ResolutionStrategy resolutionStrategy; - - /** - * Creates an instance of SyncConfigurationJobProperties class. - */ - public SyncConfigurationJobProperties() { - } - - /** - * Get the jobType property: Job Type to support polymorphic resource. - * - * @return the jobType value. - */ - @Override - public DiskJobType jobType() { - return this.jobType; - } - - /** - * Get the resolutionStrategy property: The strategy to use for resolving the configuration drift. - * - * @return the resolutionStrategy value. - */ - public ResolutionStrategy resolutionStrategy() { - return this.resolutionStrategy; - } - - /** - * Set the resolutionStrategy property: The strategy to use for resolving the configuration drift. - * - * @param resolutionStrategy the resolutionStrategy value to set. - * @return the SyncConfigurationJobProperties object itself. - */ - public SyncConfigurationJobProperties withResolutionStrategy(ResolutionStrategy resolutionStrategy) { - this.resolutionStrategy = resolutionStrategy; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SyncConfigurationJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeStringField("resolutionStrategy", - this.resolutionStrategy == null ? null : this.resolutionStrategy.toString()); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SyncConfigurationJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SyncConfigurationJobProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SyncConfigurationJobProperties. - */ - public static SyncConfigurationJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SyncConfigurationJobProperties deserializedSyncConfigurationJobProperties - = new SyncConfigurationJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedSyncConfigurationJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedSyncConfigurationJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedSyncConfigurationJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedSyncConfigurationJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedSyncConfigurationJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedSyncConfigurationJobProperties.withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedSyncConfigurationJobProperties.withError(ManagementError.fromJson(reader)); - } else if ("reportedProperties".equals(fieldName)) { - deserializedSyncConfigurationJobProperties - .withReportedProperties(DiskJobReportedProperties.fromJson(reader)); - } else if ("resolutionStrategy".equals(fieldName)) { - deserializedSyncConfigurationJobProperties.resolutionStrategy - = ResolutionStrategy.fromString(reader.getString()); - } else if ("jobType".equals(fieldName)) { - deserializedSyncConfigurationJobProperties.jobType = DiskJobType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSyncConfigurationJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationNetworkAdapterJobProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationNetworkAdapterJobProperties.java deleted file mode 100644 index ef1e52189ed7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationNetworkAdapterJobProperties.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties for resolving network adapter configuration drift. - */ -@Fluent -public final class SyncConfigurationNetworkAdapterJobProperties extends EdgeMachineNetworkAdapterJobProperties { - /* - * Type of operation. - */ - private NetworkAdapterJobType jobType = NetworkAdapterJobType.SYNC_CONFIGURATION; - - /* - * The strategy to use for resolving the configuration drift. - */ - private ResolutionStrategy resolutionStrategy; - - /** - * Creates an instance of SyncConfigurationNetworkAdapterJobProperties class. - */ - public SyncConfigurationNetworkAdapterJobProperties() { - } - - /** - * Get the jobType property: Type of operation. - * - * @return the jobType value. - */ - @Override - public NetworkAdapterJobType jobType() { - return this.jobType; - } - - /** - * Get the resolutionStrategy property: The strategy to use for resolving the configuration drift. - * - * @return the resolutionStrategy value. - */ - public ResolutionStrategy resolutionStrategy() { - return this.resolutionStrategy; - } - - /** - * Set the resolutionStrategy property: The strategy to use for resolving the configuration drift. - * - * @param resolutionStrategy the resolutionStrategy value to set. - * @return the SyncConfigurationNetworkAdapterJobProperties object itself. - */ - public SyncConfigurationNetworkAdapterJobProperties withResolutionStrategy(ResolutionStrategy resolutionStrategy) { - this.resolutionStrategy = resolutionStrategy; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SyncConfigurationNetworkAdapterJobProperties withDeploymentMode(DeploymentMode deploymentMode) { - super.withDeploymentMode(deploymentMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentMode", deploymentMode() == null ? null : deploymentMode().toString()); - jsonWriter.writeStringField("resolutionStrategy", - this.resolutionStrategy == null ? null : this.resolutionStrategy.toString()); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SyncConfigurationNetworkAdapterJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SyncConfigurationNetworkAdapterJobProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SyncConfigurationNetworkAdapterJobProperties. - */ - public static SyncConfigurationNetworkAdapterJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SyncConfigurationNetworkAdapterJobProperties deserializedSyncConfigurationNetworkAdapterJobProperties - = new SyncConfigurationNetworkAdapterJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentMode".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties - .withDeploymentMode(DeploymentMode.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); - } else if ("jobId".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties.withJobId(reader.getString()); - } else if ("startTimeUtc".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties.withStartTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("endTimeUtc".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties.withEndTimeUtc(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("status".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties - .withStatus(JobStatus.fromString(reader.getString())); - } else if ("error".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties - .withError(ManagementError.fromJson(reader)); - } else if ("reportedProperties".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties - .withReportedProperties(NetworkAdapterJobReportedProperties.fromJson(reader)); - } else if ("resolutionStrategy".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties.resolutionStrategy - = ResolutionStrategy.fromString(reader.getString()); - } else if ("jobType".equals(fieldName)) { - deserializedSyncConfigurationNetworkAdapterJobProperties.jobType - = NetworkAdapterJobType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSyncConfigurationNetworkAdapterJobProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TargetDeviceConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TargetDeviceConfiguration.java deleted file mode 100644 index 683f7ef1efb7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TargetDeviceConfiguration.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Device configuration. - */ -@Fluent -public final class TargetDeviceConfiguration implements JsonSerializable { - /* - * Network configuration. - */ - private NetworkConfiguration network; - - /* - * Hostname of the device. - */ - private String hostName; - - /* - * Web proxy configuration. - */ - private WebProxyConfiguration webProxy; - - /* - * Time configuration. - */ - private TimeConfiguration time; - - /* - * Storage configuration. - */ - private StorageConfiguration storage; - - /** - * Creates an instance of TargetDeviceConfiguration class. - */ - public TargetDeviceConfiguration() { - } - - /** - * Get the network property: Network configuration. - * - * @return the network value. - */ - public NetworkConfiguration network() { - return this.network; - } - - /** - * Set the network property: Network configuration. - * - * @param network the network value to set. - * @return the TargetDeviceConfiguration object itself. - */ - public TargetDeviceConfiguration withNetwork(NetworkConfiguration network) { - this.network = network; - return this; - } - - /** - * Get the hostName property: Hostname of the device. - * - * @return the hostName value. - */ - public String hostName() { - return this.hostName; - } - - /** - * Set the hostName property: Hostname of the device. - * - * @param hostName the hostName value to set. - * @return the TargetDeviceConfiguration object itself. - */ - public TargetDeviceConfiguration withHostName(String hostName) { - this.hostName = hostName; - return this; - } - - /** - * Get the webProxy property: Web proxy configuration. - * - * @return the webProxy value. - */ - public WebProxyConfiguration webProxy() { - return this.webProxy; - } - - /** - * Set the webProxy property: Web proxy configuration. - * - * @param webProxy the webProxy value to set. - * @return the TargetDeviceConfiguration object itself. - */ - public TargetDeviceConfiguration withWebProxy(WebProxyConfiguration webProxy) { - this.webProxy = webProxy; - return this; - } - - /** - * Get the time property: Time configuration. - * - * @return the time value. - */ - public TimeConfiguration time() { - return this.time; - } - - /** - * Set the time property: Time configuration. - * - * @param time the time value to set. - * @return the TargetDeviceConfiguration object itself. - */ - public TargetDeviceConfiguration withTime(TimeConfiguration time) { - this.time = time; - return this; - } - - /** - * Get the storage property: Storage configuration. - * - * @return the storage value. - */ - public StorageConfiguration storage() { - return this.storage; - } - - /** - * Set the storage property: Storage configuration. - * - * @param storage the storage value to set. - * @return the TargetDeviceConfiguration object itself. - */ - public TargetDeviceConfiguration withStorage(StorageConfiguration storage) { - this.storage = storage; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("network", this.network); - jsonWriter.writeStringField("hostName", this.hostName); - jsonWriter.writeJsonField("webProxy", this.webProxy); - jsonWriter.writeJsonField("time", this.time); - jsonWriter.writeJsonField("storage", this.storage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TargetDeviceConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TargetDeviceConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TargetDeviceConfiguration. - */ - public static TargetDeviceConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TargetDeviceConfiguration deserializedTargetDeviceConfiguration = new TargetDeviceConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("network".equals(fieldName)) { - deserializedTargetDeviceConfiguration.network = NetworkConfiguration.fromJson(reader); - } else if ("hostName".equals(fieldName)) { - deserializedTargetDeviceConfiguration.hostName = reader.getString(); - } else if ("webProxy".equals(fieldName)) { - deserializedTargetDeviceConfiguration.webProxy = WebProxyConfiguration.fromJson(reader); - } else if ("time".equals(fieldName)) { - deserializedTargetDeviceConfiguration.time = TimeConfiguration.fromJson(reader); - } else if ("storage".equals(fieldName)) { - deserializedTargetDeviceConfiguration.storage = StorageConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTargetDeviceConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TimeConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TimeConfiguration.java deleted file mode 100644 index 916e1c602a68..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/TimeConfiguration.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Time configuration. - */ -@Fluent -public final class TimeConfiguration implements JsonSerializable { - /* - * Primary NTP server. - */ - private String primaryTimeServer; - - /* - * Secondary NTP server. - */ - private String secondaryTimeServer; - - /* - * Time zone. - */ - private String timeZone; - - /** - * Creates an instance of TimeConfiguration class. - */ - public TimeConfiguration() { - } - - /** - * Get the primaryTimeServer property: Primary NTP server. - * - * @return the primaryTimeServer value. - */ - public String primaryTimeServer() { - return this.primaryTimeServer; - } - - /** - * Set the primaryTimeServer property: Primary NTP server. - * - * @param primaryTimeServer the primaryTimeServer value to set. - * @return the TimeConfiguration object itself. - */ - public TimeConfiguration withPrimaryTimeServer(String primaryTimeServer) { - this.primaryTimeServer = primaryTimeServer; - return this; - } - - /** - * Get the secondaryTimeServer property: Secondary NTP server. - * - * @return the secondaryTimeServer value. - */ - public String secondaryTimeServer() { - return this.secondaryTimeServer; - } - - /** - * Set the secondaryTimeServer property: Secondary NTP server. - * - * @param secondaryTimeServer the secondaryTimeServer value to set. - * @return the TimeConfiguration object itself. - */ - public TimeConfiguration withSecondaryTimeServer(String secondaryTimeServer) { - this.secondaryTimeServer = secondaryTimeServer; - return this; - } - - /** - * Get the timeZone property: Time zone. - * - * @return the timeZone value. - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone property: Time zone. - * - * @param timeZone the timeZone value to set. - * @return the TimeConfiguration object itself. - */ - public TimeConfiguration withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryTimeServer", this.primaryTimeServer); - jsonWriter.writeStringField("secondaryTimeServer", this.secondaryTimeServer); - jsonWriter.writeStringField("timeZone", this.timeZone); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TimeConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TimeConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TimeConfiguration. - */ - public static TimeConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TimeConfiguration deserializedTimeConfiguration = new TimeConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryTimeServer".equals(fieldName)) { - deserializedTimeConfiguration.primaryTimeServer = reader.getString(); - } else if ("secondaryTimeServer".equals(fieldName)) { - deserializedTimeConfiguration.secondaryTimeServer = reader.getString(); - } else if ("timeZone".equals(fieldName)) { - deserializedTimeConfiguration.timeZone = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTimeConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserDetails.java deleted file mode 100644 index 72b170626c87..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserDetails.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * User configuration. - */ -@Fluent -public final class UserDetails implements JsonSerializable { - /* - * Name of the user. - */ - private String userName; - - /* - * Type of the secret used for authentication. - */ - private SecretType secretType; - - /* - * Location of the secret used for authentication. - */ - private String secretLocation; - - /* - * SSH Public Key for the user. - */ - private List sshPubKey; - - /** - * Creates an instance of UserDetails class. - */ - public UserDetails() { - } - - /** - * Get the userName property: Name of the user. - * - * @return the userName value. - */ - public String userName() { - return this.userName; - } - - /** - * Set the userName property: Name of the user. - * - * @param userName the userName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withUserName(String userName) { - this.userName = userName; - return this; - } - - /** - * Get the secretType property: Type of the secret used for authentication. - * - * @return the secretType value. - */ - public SecretType secretType() { - return this.secretType; - } - - /** - * Set the secretType property: Type of the secret used for authentication. - * - * @param secretType the secretType value to set. - * @return the UserDetails object itself. - */ - public UserDetails withSecretType(SecretType secretType) { - this.secretType = secretType; - return this; - } - - /** - * Get the secretLocation property: Location of the secret used for authentication. - * - * @return the secretLocation value. - */ - public String secretLocation() { - return this.secretLocation; - } - - /** - * Set the secretLocation property: Location of the secret used for authentication. - * - * @param secretLocation the secretLocation value to set. - * @return the UserDetails object itself. - */ - public UserDetails withSecretLocation(String secretLocation) { - this.secretLocation = secretLocation; - return this; - } - - /** - * Get the sshPubKey property: SSH Public Key for the user. - * - * @return the sshPubKey value. - */ - public List sshPubKey() { - return this.sshPubKey; - } - - /** - * Set the sshPubKey property: SSH Public Key for the user. - * - * @param sshPubKey the sshPubKey value to set. - * @return the UserDetails object itself. - */ - public UserDetails withSshPubKey(List sshPubKey) { - this.sshPubKey = sshPubKey; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("userName", this.userName); - jsonWriter.writeStringField("secretType", this.secretType == null ? null : this.secretType.toString()); - jsonWriter.writeStringField("secretLocation", this.secretLocation); - jsonWriter.writeArrayField("sshPubKey", this.sshPubKey, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UserDetails. - */ - public static UserDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserDetails deserializedUserDetails = new UserDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userName".equals(fieldName)) { - deserializedUserDetails.userName = reader.getString(); - } else if ("secretType".equals(fieldName)) { - deserializedUserDetails.secretType = SecretType.fromString(reader.getString()); - } else if ("secretLocation".equals(fieldName)) { - deserializedUserDetails.secretLocation = reader.getString(); - } else if ("sshPubKey".equals(fieldName)) { - List sshPubKey = reader.readArray(reader1 -> reader1.getString()); - deserializedUserDetails.sshPubKey = sshPubKey; - } else { - reader.skipChildren(); - } - } - - return deserializedUserDetails; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersRequest.java deleted file mode 100644 index ae29eb8e5080..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersRequest.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Validate Ownership Voucher Request. - */ -@Fluent -public final class ValidateOwnershipVouchersRequest implements JsonSerializable { - /* - * Ownership Voucher Details. - */ - private List ownershipVoucherDetails; - - /** - * Creates an instance of ValidateOwnershipVouchersRequest class. - */ - public ValidateOwnershipVouchersRequest() { - } - - /** - * Get the ownershipVoucherDetails property: Ownership Voucher Details. - * - * @return the ownershipVoucherDetails value. - */ - public List ownershipVoucherDetails() { - return this.ownershipVoucherDetails; - } - - /** - * Set the ownershipVoucherDetails property: Ownership Voucher Details. - * - * @param ownershipVoucherDetails the ownershipVoucherDetails value to set. - * @return the ValidateOwnershipVouchersRequest object itself. - */ - public ValidateOwnershipVouchersRequest - withOwnershipVoucherDetails(List ownershipVoucherDetails) { - this.ownershipVoucherDetails = ownershipVoucherDetails; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ownershipVoucherDetails", this.ownershipVoucherDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ValidateOwnershipVouchersRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ValidateOwnershipVouchersRequest if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ValidateOwnershipVouchersRequest. - */ - public static ValidateOwnershipVouchersRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ValidateOwnershipVouchersRequest deserializedValidateOwnershipVouchersRequest - = new ValidateOwnershipVouchersRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ownershipVoucherDetails".equals(fieldName)) { - List ownershipVoucherDetails - = reader.readArray(reader1 -> OwnershipVoucherDetails.fromJson(reader1)); - deserializedValidateOwnershipVouchersRequest.ownershipVoucherDetails = ownershipVoucherDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedValidateOwnershipVouchersRequest; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersResponse.java deleted file mode 100644 index 2ce0e36a8171..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersResponse.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner; -import java.util.List; - -/** - * An immutable client-side representation of ValidateOwnershipVouchersResponse. - */ -public interface ValidateOwnershipVouchersResponse { - /** - * Gets the ownershipVoucherValidationDetails property: Ownership Voucher Validation Details. - * - * @return the ownershipVoucherValidationDetails value. - */ - List ownershipVoucherValidationDetails(); - - /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner - * object. - * - * @return the inner object. - */ - ValidateOwnershipVouchersResponseInner innerModel(); -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeConfiguration.java deleted file mode 100644 index 825ab962a132..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeConfiguration.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Desired configuration for a volume. Reserved for future use. - */ -@Fluent -public final class VolumeConfiguration implements JsonSerializable { - /* - * Reserved for future volume configuration options. - */ - private String reserved; - - /** - * Creates an instance of VolumeConfiguration class. - */ - public VolumeConfiguration() { - } - - /** - * Get the reserved property: Reserved for future volume configuration options. - * - * @return the reserved value. - */ - public String reserved() { - return this.reserved; - } - - /** - * Set the reserved property: Reserved for future volume configuration options. - * - * @param reserved the reserved value to set. - * @return the VolumeConfiguration object itself. - */ - public VolumeConfiguration withReserved(String reserved) { - this.reserved = reserved; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("reserved", this.reserved); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VolumeConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VolumeConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VolumeConfiguration. - */ - public static VolumeConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VolumeConfiguration deserializedVolumeConfiguration = new VolumeConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("reserved".equals(fieldName)) { - deserializedVolumeConfiguration.reserved = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVolumeConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeReportedProperties.java deleted file mode 100644 index 492ddf38f232..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeReportedProperties.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The actual state of the volume as reported by the device. - */ -@Immutable -public final class VolumeReportedProperties implements JsonSerializable { - /* - * Unique identifier for the partition. - */ - private String partitionId; - - /* - * Byte offset of the partition start. - */ - private Long offsetInBytes; - - /* - * Label of the volume. - */ - private String name; - - /* - * Access path for the volume. - */ - private String path; - - /* - * ARM resource ID of the parent disk. - */ - private String parentDiskId; - - /* - * Indicates if this volume is a boot volume. - */ - private Boolean isBoot; - - /* - * Total size of the volume in bytes. - */ - private String sizeInBytes; - - /* - * Available space on the volume in bytes. - */ - private String sizeRemainingInBytes; - - /* - * File system on the volume. - */ - private String fileSystem; - - /** - * Creates an instance of VolumeReportedProperties class. - */ - private VolumeReportedProperties() { - } - - /** - * Get the partitionId property: Unique identifier for the partition. - * - * @return the partitionId value. - */ - public String partitionId() { - return this.partitionId; - } - - /** - * Get the offsetInBytes property: Byte offset of the partition start. - * - * @return the offsetInBytes value. - */ - public Long offsetInBytes() { - return this.offsetInBytes; - } - - /** - * Get the name property: Label of the volume. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the path property: Access path for the volume. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Get the parentDiskId property: ARM resource ID of the parent disk. - * - * @return the parentDiskId value. - */ - public String parentDiskId() { - return this.parentDiskId; - } - - /** - * Get the isBoot property: Indicates if this volume is a boot volume. - * - * @return the isBoot value. - */ - public Boolean isBoot() { - return this.isBoot; - } - - /** - * Get the sizeInBytes property: Total size of the volume in bytes. - * - * @return the sizeInBytes value. - */ - public String sizeInBytes() { - return this.sizeInBytes; - } - - /** - * Get the sizeRemainingInBytes property: Available space on the volume in bytes. - * - * @return the sizeRemainingInBytes value. - */ - public String sizeRemainingInBytes() { - return this.sizeRemainingInBytes; - } - - /** - * Get the fileSystem property: File system on the volume. - * - * @return the fileSystem value. - */ - public String fileSystem() { - return this.fileSystem; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VolumeReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VolumeReportedProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VolumeReportedProperties. - */ - public static VolumeReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VolumeReportedProperties deserializedVolumeReportedProperties = new VolumeReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("partitionId".equals(fieldName)) { - deserializedVolumeReportedProperties.partitionId = reader.getString(); - } else if ("offsetInBytes".equals(fieldName)) { - deserializedVolumeReportedProperties.offsetInBytes = reader.getNullable(JsonReader::getLong); - } else if ("name".equals(fieldName)) { - deserializedVolumeReportedProperties.name = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedVolumeReportedProperties.path = reader.getString(); - } else if ("parentDiskId".equals(fieldName)) { - deserializedVolumeReportedProperties.parentDiskId = reader.getString(); - } else if ("isBoot".equals(fieldName)) { - deserializedVolumeReportedProperties.isBoot = reader.getNullable(JsonReader::getBoolean); - } else if ("sizeInBytes".equals(fieldName)) { - deserializedVolumeReportedProperties.sizeInBytes = reader.getString(); - } else if ("sizeRemainingInBytes".equals(fieldName)) { - deserializedVolumeReportedProperties.sizeRemainingInBytes = reader.getString(); - } else if ("fileSystem".equals(fieldName)) { - deserializedVolumeReportedProperties.fileSystem = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVolumeReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WebProxyConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WebProxyConfiguration.java deleted file mode 100644 index d1ae95de76d6..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WebProxyConfiguration.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Web proxy configuration. - */ -@Fluent -public final class WebProxyConfiguration implements JsonSerializable { - /* - * Connection URI of the web proxy. - */ - private String connectionUri; - - /* - * Port of the web proxy. - */ - private String port; - - /* - * Bypass list for the web proxy. - */ - private List bypassList; - - /** - * Creates an instance of WebProxyConfiguration class. - */ - public WebProxyConfiguration() { - } - - /** - * Get the connectionUri property: Connection URI of the web proxy. - * - * @return the connectionUri value. - */ - public String connectionUri() { - return this.connectionUri; - } - - /** - * Set the connectionUri property: Connection URI of the web proxy. - * - * @param connectionUri the connectionUri value to set. - * @return the WebProxyConfiguration object itself. - */ - public WebProxyConfiguration withConnectionUri(String connectionUri) { - this.connectionUri = connectionUri; - return this; - } - - /** - * Get the port property: Port of the web proxy. - * - * @return the port value. - */ - public String port() { - return this.port; - } - - /** - * Set the port property: Port of the web proxy. - * - * @param port the port value to set. - * @return the WebProxyConfiguration object itself. - */ - public WebProxyConfiguration withPort(String port) { - this.port = port; - return this; - } - - /** - * Get the bypassList property: Bypass list for the web proxy. - * - * @return the bypassList value. - */ - public List bypassList() { - return this.bypassList; - } - - /** - * Set the bypassList property: Bypass list for the web proxy. - * - * @param bypassList the bypassList value to set. - * @return the WebProxyConfiguration object itself. - */ - public WebProxyConfiguration withBypassList(List bypassList) { - this.bypassList = bypassList; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("connectionUri", this.connectionUri); - jsonWriter.writeStringField("port", this.port); - jsonWriter.writeArrayField("bypassList", this.bypassList, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebProxyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebProxyConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the WebProxyConfiguration. - */ - public static WebProxyConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebProxyConfiguration deserializedWebProxyConfiguration = new WebProxyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connectionUri".equals(fieldName)) { - deserializedWebProxyConfiguration.connectionUri = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedWebProxyConfiguration.port = reader.getString(); - } else if ("bypassList".equals(fieldName)) { - List bypassList = reader.readArray(reader1 -> reader1.getString()); - deserializedWebProxyConfiguration.bypassList = bypassList; - } else { - reader.skipChildren(); - } - } - - return deserializedWebProxyConfiguration; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationDesiredProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationDesiredProperties.java deleted file mode 100644 index d22f115459a3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationDesiredProperties.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * WiFi configuration desired properties. - */ -@Fluent -public final class WifiConfigurationDesiredProperties implements JsonSerializable { - /* - * WiFi SSID. - */ - private String ssid; - - /* - * WiFi authentication type. - */ - private AuthenticationType authenticationType; - - /* - * EAP method used for authentication. - */ - private EAPMethod eapMethod; - - /* - * Username for enterprise WiFi authentication. - */ - private String username; - - /* - * WiFi secret reference. - */ - private WifiSecret wifiSecret; - - /** - * Creates an instance of WifiConfigurationDesiredProperties class. - */ - public WifiConfigurationDesiredProperties() { - } - - /** - * Get the ssid property: WiFi SSID. - * - * @return the ssid value. - */ - public String ssid() { - return this.ssid; - } - - /** - * Set the ssid property: WiFi SSID. - * - * @param ssid the ssid value to set. - * @return the WifiConfigurationDesiredProperties object itself. - */ - public WifiConfigurationDesiredProperties withSsid(String ssid) { - this.ssid = ssid; - return this; - } - - /** - * Get the authenticationType property: WiFi authentication type. - * - * @return the authenticationType value. - */ - public AuthenticationType authenticationType() { - return this.authenticationType; - } - - /** - * Set the authenticationType property: WiFi authentication type. - * - * @param authenticationType the authenticationType value to set. - * @return the WifiConfigurationDesiredProperties object itself. - */ - public WifiConfigurationDesiredProperties withAuthenticationType(AuthenticationType authenticationType) { - this.authenticationType = authenticationType; - return this; - } - - /** - * Get the eapMethod property: EAP method used for authentication. - * - * @return the eapMethod value. - */ - public EAPMethod eapMethod() { - return this.eapMethod; - } - - /** - * Set the eapMethod property: EAP method used for authentication. - * - * @param eapMethod the eapMethod value to set. - * @return the WifiConfigurationDesiredProperties object itself. - */ - public WifiConfigurationDesiredProperties withEapMethod(EAPMethod eapMethod) { - this.eapMethod = eapMethod; - return this; - } - - /** - * Get the username property: Username for enterprise WiFi authentication. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username for enterprise WiFi authentication. - * - * @param username the username value to set. - * @return the WifiConfigurationDesiredProperties object itself. - */ - public WifiConfigurationDesiredProperties withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the wifiSecret property: WiFi secret reference. - * - * @return the wifiSecret value. - */ - public WifiSecret wifiSecret() { - return this.wifiSecret; - } - - /** - * Set the wifiSecret property: WiFi secret reference. - * - * @param wifiSecret the wifiSecret value to set. - * @return the WifiConfigurationDesiredProperties object itself. - */ - public WifiConfigurationDesiredProperties withWifiSecret(WifiSecret wifiSecret) { - this.wifiSecret = wifiSecret; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ssid", this.ssid); - jsonWriter.writeStringField("authenticationType", - this.authenticationType == null ? null : this.authenticationType.toString()); - jsonWriter.writeStringField("eapMethod", this.eapMethod == null ? null : this.eapMethod.toString()); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeJsonField("wifiSecret", this.wifiSecret); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WifiConfigurationDesiredProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WifiConfigurationDesiredProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WifiConfigurationDesiredProperties. - */ - public static WifiConfigurationDesiredProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WifiConfigurationDesiredProperties deserializedWifiConfigurationDesiredProperties - = new WifiConfigurationDesiredProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ssid".equals(fieldName)) { - deserializedWifiConfigurationDesiredProperties.ssid = reader.getString(); - } else if ("authenticationType".equals(fieldName)) { - deserializedWifiConfigurationDesiredProperties.authenticationType - = AuthenticationType.fromString(reader.getString()); - } else if ("eapMethod".equals(fieldName)) { - deserializedWifiConfigurationDesiredProperties.eapMethod = EAPMethod.fromString(reader.getString()); - } else if ("username".equals(fieldName)) { - deserializedWifiConfigurationDesiredProperties.username = reader.getString(); - } else if ("wifiSecret".equals(fieldName)) { - deserializedWifiConfigurationDesiredProperties.wifiSecret = WifiSecret.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWifiConfigurationDesiredProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationReportedProperties.java deleted file mode 100644 index 918e671a3c39..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationReportedProperties.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * WiFi configuration reported properties. - */ -@Immutable -public final class WifiConfigurationReportedProperties - implements JsonSerializable { - /* - * WiFi SSID. - */ - private String ssid; - - /* - * WiFi authentication type. - */ - private AuthenticationType authenticationType; - - /* - * EAP method used for authentication. - */ - private EAPMethod eapMethod; - - /* - * WiFi signal strength. - */ - private Integer signalStrength; - - /* - * Last successful WiFi connection timestamp. - */ - private String lastSuccessfulConnectionTimestamp; - - /* - * Current WiFi connection state. - */ - private ConnectionState connectionState; - - /* - * Username for enterprise WiFi authentication. - */ - private String username; - - /** - * Creates an instance of WifiConfigurationReportedProperties class. - */ - private WifiConfigurationReportedProperties() { - } - - /** - * Get the ssid property: WiFi SSID. - * - * @return the ssid value. - */ - public String ssid() { - return this.ssid; - } - - /** - * Get the authenticationType property: WiFi authentication type. - * - * @return the authenticationType value. - */ - public AuthenticationType authenticationType() { - return this.authenticationType; - } - - /** - * Get the eapMethod property: EAP method used for authentication. - * - * @return the eapMethod value. - */ - public EAPMethod eapMethod() { - return this.eapMethod; - } - - /** - * Get the signalStrength property: WiFi signal strength. - * - * @return the signalStrength value. - */ - public Integer signalStrength() { - return this.signalStrength; - } - - /** - * Get the lastSuccessfulConnectionTimestamp property: Last successful WiFi connection timestamp. - * - * @return the lastSuccessfulConnectionTimestamp value. - */ - public String lastSuccessfulConnectionTimestamp() { - return this.lastSuccessfulConnectionTimestamp; - } - - /** - * Get the connectionState property: Current WiFi connection state. - * - * @return the connectionState value. - */ - public ConnectionState connectionState() { - return this.connectionState; - } - - /** - * Get the username property: Username for enterprise WiFi authentication. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ssid", this.ssid); - jsonWriter.writeStringField("authenticationType", - this.authenticationType == null ? null : this.authenticationType.toString()); - jsonWriter.writeStringField("eapMethod", this.eapMethod == null ? null : this.eapMethod.toString()); - jsonWriter.writeStringField("username", this.username); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WifiConfigurationReportedProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WifiConfigurationReportedProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WifiConfigurationReportedProperties. - */ - public static WifiConfigurationReportedProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WifiConfigurationReportedProperties deserializedWifiConfigurationReportedProperties - = new WifiConfigurationReportedProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ssid".equals(fieldName)) { - deserializedWifiConfigurationReportedProperties.ssid = reader.getString(); - } else if ("authenticationType".equals(fieldName)) { - deserializedWifiConfigurationReportedProperties.authenticationType - = AuthenticationType.fromString(reader.getString()); - } else if ("eapMethod".equals(fieldName)) { - deserializedWifiConfigurationReportedProperties.eapMethod - = EAPMethod.fromString(reader.getString()); - } else if ("signalStrength".equals(fieldName)) { - deserializedWifiConfigurationReportedProperties.signalStrength - = reader.getNullable(JsonReader::getInt); - } else if ("lastSuccessfulConnectionTimestamp".equals(fieldName)) { - deserializedWifiConfigurationReportedProperties.lastSuccessfulConnectionTimestamp - = reader.getString(); - } else if ("connectionState".equals(fieldName)) { - deserializedWifiConfigurationReportedProperties.connectionState - = ConnectionState.fromString(reader.getString()); - } else if ("username".equals(fieldName)) { - deserializedWifiConfigurationReportedProperties.username = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWifiConfigurationReportedProperties; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecret.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecret.java deleted file mode 100644 index 815c9e6a87a3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecret.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * WiFi secret reference for storing credentials. - */ -@Fluent -public final class WifiSecret implements JsonSerializable { - /* - * Name of the secret. - */ - private String secretName; - - /* - * Location of the secret. - */ - private String secretLocation; - - /* - * Type of the WiFi secret. - */ - private WifiSecretType secretType; - - /** - * Creates an instance of WifiSecret class. - */ - public WifiSecret() { - } - - /** - * Get the secretName property: Name of the secret. - * - * @return the secretName value. - */ - public String secretName() { - return this.secretName; - } - - /** - * Set the secretName property: Name of the secret. - * - * @param secretName the secretName value to set. - * @return the WifiSecret object itself. - */ - public WifiSecret withSecretName(String secretName) { - this.secretName = secretName; - return this; - } - - /** - * Get the secretLocation property: Location of the secret. - * - * @return the secretLocation value. - */ - public String secretLocation() { - return this.secretLocation; - } - - /** - * Set the secretLocation property: Location of the secret. - * - * @param secretLocation the secretLocation value to set. - * @return the WifiSecret object itself. - */ - public WifiSecret withSecretLocation(String secretLocation) { - this.secretLocation = secretLocation; - return this; - } - - /** - * Get the secretType property: Type of the WiFi secret. - * - * @return the secretType value. - */ - public WifiSecretType secretType() { - return this.secretType; - } - - /** - * Set the secretType property: Type of the WiFi secret. - * - * @param secretType the secretType value to set. - * @return the WifiSecret object itself. - */ - public WifiSecret withSecretType(WifiSecretType secretType) { - this.secretType = secretType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretName", this.secretName); - jsonWriter.writeStringField("secretLocation", this.secretLocation); - jsonWriter.writeStringField("secretType", this.secretType == null ? null : this.secretType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WifiSecret from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WifiSecret if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the WifiSecret. - */ - public static WifiSecret fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WifiSecret deserializedWifiSecret = new WifiSecret(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretName".equals(fieldName)) { - deserializedWifiSecret.secretName = reader.getString(); - } else if ("secretLocation".equals(fieldName)) { - deserializedWifiSecret.secretLocation = reader.getString(); - } else if ("secretType".equals(fieldName)) { - deserializedWifiSecret.secretType = WifiSecretType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedWifiSecret; - }); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecretType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecretType.java deleted file mode 100644 index 69d7b0dc3901..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecretType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of WiFi secret. - */ -public final class WifiSecretType extends ExpandableStringEnum { - /** - * WiFi password. - */ - public static final WifiSecretType WI_FI_PASSWORD = fromString("WiFiPassword"); - - /** - * WiFi certificate. - */ - public static final WifiSecretType WI_FI_CERTIFICATE = fromString("WiFiCertificate"); - - /** - * WiFi CA certificate. - */ - public static final WifiSecretType WI_FI_CACERTIFICATE = fromString("WiFiCACertificate"); - - /** - * Creates a new instance of WifiSecretType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WifiSecretType() { - } - - /** - * Creates or finds a WifiSecretType from its string representation. - * - * @param name a name to look for. - * @return the corresponding WifiSecretType. - */ - public static WifiSecretType fromString(String name) { - return fromString(name, WifiSecretType.class); - } - - /** - * Gets known WifiSecretType values. - * - * @return known WifiSecretType values. - */ - public static Collection values() { - return values(WifiSecretType.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_metadata.json b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_metadata.json index 73458cd6f503..86364917e904 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_metadata.json +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/azure-resourcemanager-azurestackhci_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.AzureStackHCI":"2026-10-01"},"crossLanguagePackageId":"Microsoft.AzureStackHCI","crossLanguageVersion":"9bb3e9ba3b67","crossLanguageDefinitions":{"com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient":"Microsoft.AzureStackHCI.ArcSettings","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginCreateIdentity":"Microsoft.AzureStackHCI.ArcSettings.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginDelete":"Microsoft.AzureStackHCI.ArcSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginInitializeDisableProcess":"Microsoft.AzureStackHCI.ArcSettings.initializeDisableProcess","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginReconcile":"Microsoft.AzureStackHCI.ArcSettings.reconcile","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.consentAndInstallDefaultExtensions":"Microsoft.AzureStackHCI.ArcSettings.consentAndInstallDefaultExtensions","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.consentAndInstallDefaultExtensionsWithResponse":"Microsoft.AzureStackHCI.ArcSettings.consentAndInstallDefaultExtensions","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.create":"Microsoft.AzureStackHCI.ArcSettings.create","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.createIdentity":"Microsoft.AzureStackHCI.ArcSettings.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.createWithResponse":"Microsoft.AzureStackHCI.ArcSettings.create","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.delete":"Microsoft.AzureStackHCI.ArcSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.generatePassword":"Microsoft.AzureStackHCI.ArcSettings.generatePassword","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.generatePasswordWithResponse":"Microsoft.AzureStackHCI.ArcSettings.generatePassword","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.get":"Microsoft.AzureStackHCI.ArcSettings.get","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.getWithResponse":"Microsoft.AzureStackHCI.ArcSettings.get","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.initializeDisableProcess":"Microsoft.AzureStackHCI.ArcSettings.initializeDisableProcess","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.listByCluster":"Microsoft.AzureStackHCI.ArcSettings.listByCluster","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.reconcile":"Microsoft.AzureStackHCI.ArcSettings.reconcile","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.update":"Microsoft.AzureStackHCI.ArcSettings.update","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.updateWithResponse":"Microsoft.AzureStackHCI.ArcSettings.update","com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciManagementClient":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient":"Microsoft.AzureStackHCI.ClusterJobs","com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.ClusterJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient.beginDelete":"Microsoft.AzureStackHCI.ClusterJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient.createOrUpdate":"Microsoft.AzureStackHCI.ClusterJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient.delete":"Microsoft.AzureStackHCI.ClusterJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient.get":"Microsoft.AzureStackHCI.ClusterJobs.get","com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient.getWithResponse":"Microsoft.AzureStackHCI.ClusterJobs.get","com.azure.resourcemanager.azurestackhci.fluent.ClusterJobsClient.list":"Microsoft.AzureStackHCI.ClusterJobs.list","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient":"Microsoft.AzureStackHCI.Clusters","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginConfigureRemoteSupport":"Microsoft.AzureStackHCI.Clusters.configureRemoteSupport","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginCreateIdentity":"Microsoft.AzureStackHCI.Clusters.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginDelete":"Microsoft.AzureStackHCI.Clusters.delete","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginExtendSoftwareAssuranceBenefit":"Microsoft.AzureStackHCI.Clusters.extendSoftwareAssuranceBenefit","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginTriggerLogCollection":"Microsoft.AzureStackHCI.Clusters.triggerLogCollection","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginUpdateSecretsLocations":"Microsoft.AzureStackHCI.Clusters.updateSecretsLocations","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginUploadCertificate":"Microsoft.AzureStackHCI.Clusters.uploadCertificate","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.configureRemoteSupport":"Microsoft.AzureStackHCI.Clusters.configureRemoteSupport","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.create":"Microsoft.AzureStackHCI.Clusters.create","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.createIdentity":"Microsoft.AzureStackHCI.Clusters.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.createWithResponse":"Microsoft.AzureStackHCI.Clusters.create","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.delete":"Microsoft.AzureStackHCI.Clusters.delete","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.extendSoftwareAssuranceBenefit":"Microsoft.AzureStackHCI.Clusters.extendSoftwareAssuranceBenefit","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.getByResourceGroup":"Microsoft.AzureStackHCI.Clusters.get","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.Clusters.get","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.list":"Microsoft.AzureStackHCI.Clusters.listBySubscription","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.listByResourceGroup":"Microsoft.AzureStackHCI.Clusters.listByResourceGroup","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.triggerLogCollection":"Microsoft.AzureStackHCI.Clusters.triggerLogCollection","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.update":"Microsoft.AzureStackHCI.Clusters.update","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.updateSecretsLocations":"Microsoft.AzureStackHCI.Clusters.updateSecretsLocations","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.updateWithResponse":"Microsoft.AzureStackHCI.Clusters.update","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.uploadCertificate":"Microsoft.AzureStackHCI.Clusters.uploadCertificate","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient":"Microsoft.AzureStackHCI.DeploymentSettings","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.DeploymentSettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.beginDelete":"Microsoft.AzureStackHCI.DeploymentSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.createOrUpdate":"Microsoft.AzureStackHCI.DeploymentSettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.delete":"Microsoft.AzureStackHCI.DeploymentSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.get":"Microsoft.AzureStackHCI.DeploymentSettings.get","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.getWithResponse":"Microsoft.AzureStackHCI.DeploymentSettings.get","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.listByClusters":"Microsoft.AzureStackHCI.DeploymentSettings.listByClusters","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient":"Microsoft.AzureStackHCI.EdgeDeviceJobs","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeDeviceJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeDeviceJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeDeviceJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.delete":"Microsoft.AzureStackHCI.EdgeDeviceJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.get":"Microsoft.AzureStackHCI.EdgeDeviceJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeDeviceJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.listByEdgeDevice":"Microsoft.AzureStackHCI.EdgeDeviceJobs.listByEdgeDevice","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient":"Microsoft.AzureStackHCI.EdgeDevices","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeDevices.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginDelete":"Microsoft.AzureStackHCI.EdgeDevices.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginValidate":"Microsoft.AzureStackHCI.EdgeDevices.validate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeDevices.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.delete":"Microsoft.AzureStackHCI.EdgeDevices.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.get":"Microsoft.AzureStackHCI.EdgeDevices.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeDevices.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.list":"Microsoft.AzureStackHCI.EdgeDevices.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.validate":"Microsoft.AzureStackHCI.EdgeDevices.validate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSettings","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient.delete":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient.get":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSettings.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSettings.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDeploymentSettingsClient.listByEdgeMachine":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSettings.listByEdgeMachine","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient":"Microsoft.AzureStackHCI.EdgeMachineDiskJobs","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineDiskJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachineDiskJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineDiskJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient.delete":"Microsoft.AzureStackHCI.EdgeMachineDiskJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient.get":"Microsoft.AzureStackHCI.EdgeMachineDiskJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineDiskJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskJobsClient.list":"Microsoft.AzureStackHCI.EdgeMachineDiskJobs.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobs","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient.delete":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient.get":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDiskPrivilegedJobsClient.list":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobs.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient":"Microsoft.AzureStackHCI.EdgeMachineDisks","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineDisks.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachineDisks.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineDisks.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient.delete":"Microsoft.AzureStackHCI.EdgeMachineDisks.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient.get":"Microsoft.AzureStackHCI.EdgeMachineDisks.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineDisks.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineDisksClient.list":"Microsoft.AzureStackHCI.EdgeMachineDisks.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient":"Microsoft.AzureStackHCI.EdgeMachineJobs","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachineJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.delete":"Microsoft.AzureStackHCI.EdgeMachineJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.get":"Microsoft.AzureStackHCI.EdgeMachineJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineJobsClient.list":"Microsoft.AzureStackHCI.EdgeMachineJobs.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJobs","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient.delete":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient.get":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdapterJobsClient.list":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJobs.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdaptersClient":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapters","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdaptersClient.get":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapters.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdaptersClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapters.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineNetworkAdaptersClient.list":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapters.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient":"Microsoft.AzureStackHCI.EdgeMachineSecuritySettingsOperations","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineSecuritySettingsOperations.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachineSecuritySettingsOperations.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineSecuritySettingsOperations.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient.delete":"Microsoft.AzureStackHCI.EdgeMachineSecuritySettingsOperations.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient.get":"Microsoft.AzureStackHCI.EdgeMachineSecuritySettingsOperations.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineSecuritySettingsOperations.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineSecuritySettingsOperationsClient.listByEdgeMachine":"Microsoft.AzureStackHCI.EdgeMachineSecuritySettingsOperations.listByEdgeMachine","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient":"Microsoft.AzureStackHCI.EdgeMachineVolumes","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineVolumes.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachineVolumes.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachineVolumes.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient.delete":"Microsoft.AzureStackHCI.EdgeMachineVolumes.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient.get":"Microsoft.AzureStackHCI.EdgeMachineVolumes.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeMachineVolumes.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachineVolumesClient.list":"Microsoft.AzureStackHCI.EdgeMachineVolumes.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient":"Microsoft.AzureStackHCI.EdgeMachines","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeMachines.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginDelete":"Microsoft.AzureStackHCI.EdgeMachines.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginRefreshApplicableUpdates":"Microsoft.AzureStackHCI.EdgeMachines.refreshApplicableUpdates","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginRefreshSecuritySettings":"Microsoft.AzureStackHCI.EdgeMachines.refreshSecuritySettings","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginUpdate":"Microsoft.AzureStackHCI.EdgeMachines.update","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.beginValidate":"Microsoft.AzureStackHCI.EdgeMachines.validate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeMachines.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.delete":"Microsoft.AzureStackHCI.EdgeMachines.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.getByResourceGroup":"Microsoft.AzureStackHCI.EdgeMachines.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.EdgeMachines.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.list":"Microsoft.AzureStackHCI.EdgeMachines.listBySubscription","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.listByResourceGroup":"Microsoft.AzureStackHCI.EdgeMachines.listByResourceGroup","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.refreshApplicableUpdates":"Microsoft.AzureStackHCI.EdgeMachines.refreshApplicableUpdates","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.refreshSecuritySettings":"Microsoft.AzureStackHCI.EdgeMachines.refreshSecuritySettings","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.update":"Microsoft.AzureStackHCI.EdgeMachines.update","com.azure.resourcemanager.azurestackhci.fluent.EdgeMachinesClient.validate":"Microsoft.AzureStackHCI.EdgeMachines.validate","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient":"Microsoft.AzureStackHCI.Extensions","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginCreate":"Microsoft.AzureStackHCI.Extensions.create","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginDelete":"Microsoft.AzureStackHCI.Extensions.delete","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginUpdate":"Microsoft.AzureStackHCI.Extensions.update","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginUpgrade":"Microsoft.AzureStackHCI.Extensions.upgrade","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.create":"Microsoft.AzureStackHCI.Extensions.create","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.delete":"Microsoft.AzureStackHCI.Extensions.delete","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.get":"Microsoft.AzureStackHCI.Extensions.get","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.getWithResponse":"Microsoft.AzureStackHCI.Extensions.get","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.listByArcSetting":"Microsoft.AzureStackHCI.Extensions.listByArcSetting","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.update":"Microsoft.AzureStackHCI.Extensions.update","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.upgrade":"Microsoft.AzureStackHCI.Extensions.upgrade","com.azure.resourcemanager.azurestackhci.fluent.OffersClient":"Microsoft.AzureStackHCI.Offers","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.get":"Microsoft.AzureStackHCI.Offers.get","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.getWithResponse":"Microsoft.AzureStackHCI.Offers.get","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.listByCluster":"Microsoft.AzureStackHCI.Clusters.listByCluster","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.listByPublisher":"Microsoft.AzureStackHCI.Offers.listByPublisher","com.azure.resourcemanager.azurestackhci.fluent.OperationsClient":"Microsoft.AzureStackHCI.Operations","com.azure.resourcemanager.azurestackhci.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient":"Microsoft.AzureStackHCI.OsImages","com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient.get":"Microsoft.AzureStackHCI.OsImages.get","com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient.getWithResponse":"Microsoft.AzureStackHCI.OsImages.get","com.azure.resourcemanager.azurestackhci.fluent.OsImagesClient.listBySubscriptionLocationResource":"Microsoft.AzureStackHCI.OsImages.listBySubscriptionLocationResource","com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient":"Microsoft.AzureStackHCI.OwnershipVouchers","com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient.validate":"Microsoft.AzureStackHCI.OwnershipVouchers.validate","com.azure.resourcemanager.azurestackhci.fluent.OwnershipVouchersClient.validateWithResponse":"Microsoft.AzureStackHCI.OwnershipVouchers.validate","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient":"Microsoft.AzureStackHCI.SecuritySettings","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.SecuritySettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.beginDelete":"Microsoft.AzureStackHCI.SecuritySettings.delete","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.createOrUpdate":"Microsoft.AzureStackHCI.SecuritySettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.delete":"Microsoft.AzureStackHCI.SecuritySettings.delete","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.get":"Microsoft.AzureStackHCI.SecuritySettings.get","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.getWithResponse":"Microsoft.AzureStackHCI.SecuritySettings.get","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.listByClusters":"Microsoft.AzureStackHCI.SecuritySettings.listByClusters","com.azure.resourcemanager.azurestackhci.fluent.SkusClient":"Microsoft.AzureStackHCI.Skus","com.azure.resourcemanager.azurestackhci.fluent.SkusClient.get":"Microsoft.AzureStackHCI.Skus.get","com.azure.resourcemanager.azurestackhci.fluent.SkusClient.getWithResponse":"Microsoft.AzureStackHCI.Skus.get","com.azure.resourcemanager.azurestackhci.fluent.SkusClient.listByOffer":"Microsoft.AzureStackHCI.Skus.listByOffer","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient":"Microsoft.AzureStackHCI.UpdateRuns","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.beginDelete":"Microsoft.AzureStackHCI.UpdateRuns.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.delete":"Microsoft.AzureStackHCI.UpdateRuns.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.get":"Microsoft.AzureStackHCI.UpdateRuns.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.getWithResponse":"Microsoft.AzureStackHCI.UpdateRuns.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.list":"Microsoft.AzureStackHCI.UpdateRuns.list","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.put":"Microsoft.AzureStackHCI.UpdateRuns.put","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.putWithResponse":"Microsoft.AzureStackHCI.UpdateRuns.put","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient.beginCheckHealth":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.checkHealth","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient.beginCheckUpdates":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.checkUpdates","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient.checkHealth":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.checkHealth","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient.checkUpdates":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.checkUpdates","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.beginDelete":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.delete":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.get":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.getWithResponse":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.list":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.list","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.put":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.put","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.putWithResponse":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.put","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient":"Microsoft.AzureStackHCI.Updates","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginDelete":"Microsoft.AzureStackHCI.Updates.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginPost":"Microsoft.AzureStackHCI.Updates.post","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginPrepare":"Microsoft.AzureStackHCI.Updates.prepare","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.delete":"Microsoft.AzureStackHCI.Updates.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.get":"Microsoft.AzureStackHCI.Updates.get","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.getWithResponse":"Microsoft.AzureStackHCI.Updates.get","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.list":"Microsoft.AzureStackHCI.Updates.list","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.post":"Microsoft.AzureStackHCI.Updates.post","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.prepare":"Microsoft.AzureStackHCI.Updates.prepare","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.put":"Microsoft.AzureStackHCI.Updates.put","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.putWithResponse":"Microsoft.AzureStackHCI.Updates.put","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.get":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes.get","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.getWithResponse":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes.get","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.listBySubscriptionLocationResource":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes.listBySubscriptionLocationResource","com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner":"Microsoft.AzureStackHCI.ArcIdentityResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseProperties":"Microsoft.AzureStackHCI.ArcIdentityResponseProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner":"Microsoft.AzureStackHCI.ArcSetting","com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingProperties":"Microsoft.AzureStackHCI.ArcSettingProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingsPatchProperties":"Microsoft.AzureStackHCI.ArcSettingsPatchProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner":"Microsoft.AzureStackHCI.ClusterIdentityResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseProperties":"Microsoft.AzureStackHCI.ClusterIdentityResponseProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner":"Microsoft.AzureStackHCI.Cluster","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterJobInner":"Microsoft.AzureStackHCI.ClusterJob","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterPatchProperties":"Microsoft.AzureStackHCI.ClusterPatchProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterProperties":"Microsoft.AzureStackHCI.ClusterProperties","com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner":"Microsoft.AzureStackHCI.DeploymentSetting","com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingsProperties":"Microsoft.AzureStackHCI.DeploymentSettingsProperties","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner":"Microsoft.AzureStackHCI.EdgeDevice","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner":"Microsoft.AzureStackHCI.EdgeDeviceJob","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDeploymentSettingInner":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSetting","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskInner":"Microsoft.AzureStackHCI.EdgeMachineDisk","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskJobInner":"Microsoft.AzureStackHCI.EdgeMachineDiskJob","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskPrivilegedJobInner":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJob","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineInner":"Microsoft.AzureStackHCI.EdgeMachine","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineJobInner":"Microsoft.AzureStackHCI.EdgeMachineJob","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterInner":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapter","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineNetworkAdapterJobInner":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJob","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineSecuritySettingsInner":"Microsoft.AzureStackHCI.EdgeMachineSecuritySettings","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineValidateResponseInner":"Microsoft.AzureStackHCI.EdgeMachineValidateResponse","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineVolumeInner":"Microsoft.AzureStackHCI.EdgeMachineVolume","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner":"Microsoft.AzureStackHCI.Extension","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionParameters":"Microsoft.AzureStackHCI.ExtensionParameters","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionPatchProperties":"Microsoft.AzureStackHCI.ExtensionPatchProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionProperties":"Microsoft.AzureStackHCI.ExtensionProperties","com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner":"Microsoft.AzureStackHCI.Update","com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner":"Microsoft.AzureStackHCI.Offer","com.azure.resourcemanager.azurestackhci.fluent.models.OfferProperties":"Microsoft.AzureStackHCI.OfferProperties","com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner":"Microsoft.AzureStackHCI.OsImage","com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner":"Microsoft.AzureStackHCI.PasswordCredential","com.azure.resourcemanager.azurestackhci.fluent.models.SecurityProperties":"Microsoft.AzureStackHCI.SecurityProperties","com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner":"Microsoft.AzureStackHCI.SecuritySetting","com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner":"Microsoft.AzureStackHCI.Sku","com.azure.resourcemanager.azurestackhci.fluent.models.SkuProperties":"Microsoft.AzureStackHCI.SkuProperties","com.azure.resourcemanager.azurestackhci.fluent.models.Step":"Microsoft.AzureStackHCI.Step","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateProperties":"Microsoft.AzureStackHCI.UpdateProperties","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner":"Microsoft.AzureStackHCI.UpdateRun","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunProperties":"Microsoft.AzureStackHCI.UpdateRunProperties","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateStateProperties":"Microsoft.AzureStackHCI.UpdateStateProperties","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner":"Microsoft.AzureStackHCI.UpdateSummaries","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesProperties":"Microsoft.AzureStackHCI.UpdateSummariesProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ValidateOwnershipVouchersResponseInner":"Microsoft.AzureStackHCI.ValidateOwnershipVouchersResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner":"Microsoft.AzureStackHCI.ValidateResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner":"Microsoft.AzureStackHCI.ValidatedSolutionRecipe","com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciManagementClientBuilder":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.implementation.models.ArcSettingList":"Microsoft.AzureStackHCI.ArcSettingList","com.azure.resourcemanager.azurestackhci.implementation.models.ClusterJobListResult":"Microsoft.AzureStackHCI.ClusterJobListResult","com.azure.resourcemanager.azurestackhci.implementation.models.ClusterList":"Microsoft.AzureStackHCI.ClusterList","com.azure.resourcemanager.azurestackhci.implementation.models.DeploymentSettingListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceJobListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDeploymentSettingListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDiskJobListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDiskListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDiskPrivilegedJobListResult":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineJobListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineNetworkAdapterJobListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineNetworkAdapterListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineSecuritySettingsListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.ExtensionList":"Microsoft.AzureStackHCI.ExtensionList","com.azure.resourcemanager.azurestackhci.implementation.models.OfferList":"Microsoft.AzureStackHCI.OfferList","com.azure.resourcemanager.azurestackhci.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.azurestackhci.implementation.models.OsImageListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.SecuritySettingListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.SkuList":"Microsoft.AzureStackHCI.SkuList","com.azure.resourcemanager.azurestackhci.implementation.models.UpdateList":"Microsoft.AzureStackHCI.UpdateList","com.azure.resourcemanager.azurestackhci.implementation.models.UpdateRunList":"Microsoft.AzureStackHCI.UpdateRunList","com.azure.resourcemanager.azurestackhci.implementation.models.UpdateSummariesList":"Microsoft.AzureStackHCI.UpdateSummariesList","com.azure.resourcemanager.azurestackhci.implementation.models.ValidatedSolutionRecipeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.models.AccessLevel":"Microsoft.AzureStackHCI.AccessLevel","com.azure.resourcemanager.azurestackhci.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.azurestackhci.models.AddServerJobServerDetails":"Microsoft.AzureStackHCI.AddServerJobServerDetails","com.azure.resourcemanager.azurestackhci.models.ApplyConfigurationNetworkAdapterJobProperties":"Microsoft.AzureStackHCI.ApplyConfigurationNetworkAdapterJobProperties","com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties":"Microsoft.AzureStackHCI.ArcConnectivityProperties","com.azure.resourcemanager.azurestackhci.models.ArcExtensionState":"Microsoft.AzureStackHCI.ArcExtensionState","com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState":"Microsoft.AzureStackHCI.ArcSettingAggregateState","com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch":"Microsoft.AzureStackHCI.ArcSettingsPatch","com.azure.resourcemanager.azurestackhci.models.Architecture":"Microsoft.AzureStackHCI.Architecture","com.azure.resourcemanager.azurestackhci.models.AssemblyInfo":"Microsoft.AzureStackHCI.AssemblyInfo","com.azure.resourcemanager.azurestackhci.models.AssemblyInfoPayload":"Microsoft.AzureStackHCI.AssemblyInfoPayload","com.azure.resourcemanager.azurestackhci.models.AuthenticationType":"Microsoft.AzureStackHCI.AuthenticationType","com.azure.resourcemanager.azurestackhci.models.AvailabilityType":"Microsoft.AzureStackHCI.AvailabilityType","com.azure.resourcemanager.azurestackhci.models.CheckUpdatesRequest":"Microsoft.AzureStackHCI.CheckUpdatesRequest","com.azure.resourcemanager.azurestackhci.models.ClusterBillingProperties":"Microsoft.AzureStackHCI.ClusterBillingProperties","com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties":"Microsoft.AzureStackHCI.ClusterDesiredProperties","com.azure.resourcemanager.azurestackhci.models.ClusterJobProperties":"Microsoft.AzureStackHCI.ClusterJobProperties","com.azure.resourcemanager.azurestackhci.models.ClusterNode":"Microsoft.AzureStackHCI.ClusterNode","com.azure.resourcemanager.azurestackhci.models.ClusterNodeType":"Microsoft.AzureStackHCI.ClusterNodeType","com.azure.resourcemanager.azurestackhci.models.ClusterPatch":"Microsoft.AzureStackHCI.ClusterPatch","com.azure.resourcemanager.azurestackhci.models.ClusterPattern":"Microsoft.AzureStackHCI.ClusterPattern","com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties":"Microsoft.AzureStackHCI.ClusterReportedProperties","com.azure.resourcemanager.azurestackhci.models.ClusterSdnProperties":"Microsoft.AzureStackHCI.ClusterSdnProperties","com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType":"Microsoft.AzureStackHCI.ComplianceAssignmentType","com.azure.resourcemanager.azurestackhci.models.ComplianceStatus":"Microsoft.AzureStackHCI.ComplianceStatus","com.azure.resourcemanager.azurestackhci.models.ConnectionState":"Microsoft.AzureStackHCI.ConnectionState","com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus":"Microsoft.AzureStackHCI.ConnectivityStatus","com.azure.resourcemanager.azurestackhci.models.CreateVolumeJobProperties":"Microsoft.AzureStackHCI.CreateVolumeJobProperties","com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails":"Microsoft.AzureStackHCI.DefaultExtensionDetails","com.azure.resourcemanager.azurestackhci.models.DeleteVolumeJobProperties":"Microsoft.AzureStackHCI.DeleteVolumeJobProperties","com.azure.resourcemanager.azurestackhci.models.DeploymentCluster":"Microsoft.AzureStackHCI.DeploymentCluster","com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration":"Microsoft.AzureStackHCI.DeploymentConfiguration","com.azure.resourcemanager.azurestackhci.models.DeploymentData":"Microsoft.AzureStackHCI.DeploymentData","com.azure.resourcemanager.azurestackhci.models.DeploymentMode":"Microsoft.AzureStackHCI.DeploymentMode","com.azure.resourcemanager.azurestackhci.models.DeploymentSecuritySettings":"Microsoft.AzureStackHCI.DeploymentSecuritySettings","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingAdapterPropertyOverrides":"Microsoft.AzureStackHCI.DeploymentSettingAdapterPropertyOverrides","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingHostNetwork":"Microsoft.AzureStackHCI.DeploymentSettingHostNetwork","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingIntents":"Microsoft.AzureStackHCI.DeploymentSettingIntents","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageAdapterIpInfo":"Microsoft.AzureStackHCI.DeploymentSettingStorageAdapterIPInfo","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageNetworks":"Microsoft.AzureStackHCI.DeploymentSettingStorageNetworks","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingVirtualSwitchConfigurationOverrides":"Microsoft.AzureStackHCI.DeploymentSettingVirtualSwitchConfigurationOverrides","com.azure.resourcemanager.azurestackhci.models.DeploymentStep":"Microsoft.AzureStackHCI.DeploymentStep","com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration":"Microsoft.AzureStackHCI.DeviceConfiguration","com.azure.resourcemanager.azurestackhci.models.DeviceKind":"Microsoft.AzureStackHCI.DeviceKind","com.azure.resourcemanager.azurestackhci.models.DeviceLogCollectionStatus":"Microsoft.AzureStackHCI.DeviceLogCollectionStatus","com.azure.resourcemanager.azurestackhci.models.DeviceState":"Microsoft.AzureStackHCI.DeviceState","com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel":"Microsoft.AzureStackHCI.DiagnosticLevel","com.azure.resourcemanager.azurestackhci.models.DiskActionStatus":"Microsoft.AzureStackHCI.DiskActionStatus","com.azure.resourcemanager.azurestackhci.models.DiskConfiguration":"Microsoft.AzureStackHCI.DiskConfiguration","com.azure.resourcemanager.azurestackhci.models.DiskDeploymentStep":"Microsoft.AzureStackHCI.DiskDeploymentStep","com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType":"Microsoft.AzureStackHCI.DiskFileSystemType","com.azure.resourcemanager.azurestackhci.models.DiskJobReportedProperties":"Microsoft.AzureStackHCI.DiskJobReportedProperties","com.azure.resourcemanager.azurestackhci.models.DiskJobType":"Microsoft.AzureStackHCI.DiskJobType","com.azure.resourcemanager.azurestackhci.models.DiskReportedProperties":"Microsoft.AzureStackHCI.DiskReportedProperties","com.azure.resourcemanager.azurestackhci.models.DiskState":"Microsoft.AzureStackHCI.DiskState","com.azure.resourcemanager.azurestackhci.models.DiskStorageType":"Microsoft.AzureStackHCI.DiskStorageType","com.azure.resourcemanager.azurestackhci.models.DiskType":"Microsoft.AzureStackHCI.DiskType","com.azure.resourcemanager.azurestackhci.models.DiskVolumeConfiguration":"Microsoft.AzureStackHCI.DiskVolumeConfiguration","com.azure.resourcemanager.azurestackhci.models.DiskVolumeReportedProperties":"Microsoft.AzureStackHCI.DiskVolumeReportedProperties","com.azure.resourcemanager.azurestackhci.models.DnsServerConfig":"Microsoft.AzureStackHCI.DnsServerConfig","com.azure.resourcemanager.azurestackhci.models.DnsZones":"Microsoft.AzureStackHCI.DnsZones","com.azure.resourcemanager.azurestackhci.models.DownloadOsJobProperties":"Microsoft.AzureStackHCI.DownloadOsJobProperties","com.azure.resourcemanager.azurestackhci.models.DownloadOsProfile":"Microsoft.AzureStackHCI.DownloadOsProfile","com.azure.resourcemanager.azurestackhci.models.DownloadRequest":"Microsoft.AzureStackHCI.DownloadRequest","com.azure.resourcemanager.azurestackhci.models.EAPMethod":"Microsoft.AzureStackHCI.EAPMethod","com.azure.resourcemanager.azurestackhci.models.EceActionStatus":"Microsoft.AzureStackHCI.EceActionStatus","com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets":"Microsoft.AzureStackHCI.EceDeploymentSecrets","com.azure.resourcemanager.azurestackhci.models.EceReportedProperties":"Microsoft.AzureStackHCI.EceReportedProperties","com.azure.resourcemanager.azurestackhci.models.EceSecrets":"Microsoft.AzureStackHCI.EceSecrets","com.azure.resourcemanager.azurestackhci.models.EdgeDeviceDisks":"Microsoft.AzureStackHCI.EdgeDeviceDisks","com.azure.resourcemanager.azurestackhci.models.EdgeDeviceKind":"Microsoft.AzureStackHCI.EdgeDeviceKind","com.azure.resourcemanager.azurestackhci.models.EdgeDeviceProperties":"Microsoft.AzureStackHCI.EdgeDeviceProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineAdapterPropertyOverrides":"Microsoft.AzureStackHCI.EdgeMachineAdapterPropertyOverrides","com.azure.resourcemanager.azurestackhci.models.EdgeMachineCollectLogJobProperties":"Microsoft.AzureStackHCI.EdgeMachineCollectLogJobProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineCollectLogJobReportedProperties":"Microsoft.AzureStackHCI.EdgeMachineCollectLogJobReportedProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineConnectivityStatus":"Microsoft.AzureStackHCI.EdgeMachineConnectivityStatus","com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentConfiguration":"Microsoft.AzureStackHCI.EdgeMachineDeploymentConfiguration","com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentData":"Microsoft.AzureStackHCI.EdgeMachineDeploymentData","com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSettingProperties":"Microsoft.AzureStackHCI.EdgeMachineDeploymentSettingProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskJobProperties":"Microsoft.AzureStackHCI.EdgeMachineDiskJobProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskPrivilegedJobProperties":"Microsoft.AzureStackHCI.EdgeMachineDiskPrivilegedJobProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskProperties":"Microsoft.AzureStackHCI.EdgeMachineDiskProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineHostNetwork":"Microsoft.AzureStackHCI.EdgeMachineHostNetwork","com.azure.resourcemanager.azurestackhci.models.EdgeMachineHostNetworkIntent":"Microsoft.AzureStackHCI.EdgeMachineHostNetworkIntent","com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties":"Microsoft.AzureStackHCI.EdgeMachineJobProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobType":"Microsoft.AzureStackHCI.EdgeMachineJobType","com.azure.resourcemanager.azurestackhci.models.EdgeMachineKind":"Microsoft.AzureStackHCI.EdgeMachineKind","com.azure.resourcemanager.azurestackhci.models.EdgeMachineLifecycleStatus":"Microsoft.AzureStackHCI.EdgeMachineLifecycleStatus","com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterJobProperties":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterJobProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkAdapterProperties":"Microsoft.AzureStackHCI.EdgeMachineNetworkAdapterProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkProfile":"Microsoft.AzureStackHCI.EdgeMachineNetworkProfile","com.azure.resourcemanager.azurestackhci.models.EdgeMachineNicDetail":"Microsoft.AzureStackHCI.EdgeMachineNicDetail","com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch":"Microsoft.AzureStackHCI.EdgeMachinePatch","com.azure.resourcemanager.azurestackhci.models.EdgeMachineProperties":"Microsoft.AzureStackHCI.EdgeMachineProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobProperties":"Microsoft.AzureStackHCI.EdgeMachineRemoteSupportJobProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobReportedProperties":"Microsoft.AzureStackHCI.EdgeMachineRemoteSupportJobReportedProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportNodeSettings":"Microsoft.AzureStackHCI.EdgeMachineRemoteSupportNodeSettings","com.azure.resourcemanager.azurestackhci.models.EdgeMachineReportedProperties":"Microsoft.AzureStackHCI.EdgeMachineReportedProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineScaleUnits":"Microsoft.AzureStackHCI.EdgeMachineScaleUnits","com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityComplianceStatus":"Microsoft.AzureStackHCI.EdgeMachineSecurityComplianceStatus","com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityProperties":"Microsoft.AzureStackHCI.EdgeMachineSecurityProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineState":"Microsoft.AzureStackHCI.EdgeMachineState","com.azure.resourcemanager.azurestackhci.models.EdgeMachineStorageAdapterIpInfo":"Microsoft.AzureStackHCI.EdgeMachineStorageAdapterIpInfo","com.azure.resourcemanager.azurestackhci.models.EdgeMachineStorageNetwork":"Microsoft.AzureStackHCI.EdgeMachineStorageNetwork","com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateRequest":"Microsoft.AzureStackHCI.EdgeMachineValidateRequest","com.azure.resourcemanager.azurestackhci.models.EdgeMachineVirtualSwitchConfigurationOverrides":"Microsoft.AzureStackHCI.EdgeMachineVirtualSwitchConfigurationOverrides","com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumeProperties":"Microsoft.AzureStackHCI.EdgeMachineVolumeProperties","com.azure.resourcemanager.azurestackhci.models.EdgeMachineWorkloadInventoryItem":"Microsoft.AzureStackHCI.EdgeMachineWorkloadInventoryItem","com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState":"Microsoft.AzureStackHCI.ExtensionAggregateState","com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceView":"Microsoft.AzureStackHCI.ExtensionInstanceView","com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceViewStatus":"Microsoft.AzureStackHCI.ExtensionInstanceViewStatus","com.azure.resourcemanager.azurestackhci.models.ExtensionManagedBy":"Microsoft.AzureStackHCI.ExtensionManagedBy","com.azure.resourcemanager.azurestackhci.models.ExtensionPatch":"Microsoft.AzureStackHCI.ExtensionPatch","com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters":"Microsoft.AzureStackHCI.ExtensionPatchParameters","com.azure.resourcemanager.azurestackhci.models.ExtensionProfile":"Microsoft.AzureStackHCI.ExtensionProfile","com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters":"Microsoft.AzureStackHCI.ExtensionUpgradeParameters","com.azure.resourcemanager.azurestackhci.models.ForcePushNetworkAdapterJobProperties":"Microsoft.AzureStackHCI.ForcePushNetworkAdapterJobProperties","com.azure.resourcemanager.azurestackhci.models.HardwareClass":"Microsoft.AzureStackHCI.HardwareClass","com.azure.resourcemanager.azurestackhci.models.HardwareProfile":"Microsoft.AzureStackHCI.HardwareProfile","com.azure.resourcemanager.azurestackhci.models.HciAddServerJobProperties":"Microsoft.AzureStackHCI.HciAddServerJobProperties","com.azure.resourcemanager.azurestackhci.models.HciCollectLogJobProperties":"Microsoft.AzureStackHCI.HciCollectLogJobProperties","com.azure.resourcemanager.azurestackhci.models.HciConfigureSdnIntegrationJobProperties":"Microsoft.AzureStackHCI.HciConfigureSdnIntegrationJobProperties","com.azure.resourcemanager.azurestackhci.models.HciEdgeDevice":"Microsoft.AzureStackHCI.HciEdgeDevice","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceAdapterPropertyOverrides":"Microsoft.AzureStackHCI.HciEdgeDeviceAdapterPropertyOverrides","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceArcExtension":"Microsoft.AzureStackHCI.HciEdgeDeviceArcExtension","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceHostNetwork":"Microsoft.AzureStackHCI.HciEdgeDeviceHostNetwork","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceIntents":"Microsoft.AzureStackHCI.HciEdgeDeviceIntents","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJob":"Microsoft.AzureStackHCI.HciEdgeDeviceJob","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobProperties":"Microsoft.AzureStackHCI.HciEdgeDeviceJobProperties","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobType":"Microsoft.AzureStackHCI.HciEdgeDeviceJobType","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceProperties":"Microsoft.AzureStackHCI.HciEdgeDeviceProperties","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceStorageAdapterIpInfo":"Microsoft.AzureStackHCI.HciEdgeDeviceStorageAdapterIPInfo","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceStorageNetworks":"Microsoft.AzureStackHCI.HciEdgeDeviceStorageNetworks","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceVirtualSwitchConfigurationOverrides":"Microsoft.AzureStackHCI.HciEdgeDeviceVirtualSwitchConfigurationOverrides","com.azure.resourcemanager.azurestackhci.models.HciHardwareProfile":"Microsoft.AzureStackHCI.HciHardwareProfile","com.azure.resourcemanager.azurestackhci.models.HciJobType":"Microsoft.AzureStackHCI.HciJobType","com.azure.resourcemanager.azurestackhci.models.HciNetworkProfile":"Microsoft.AzureStackHCI.HciNetworkProfile","com.azure.resourcemanager.azurestackhci.models.HciNicDetail":"Microsoft.AzureStackHCI.HciNicDetail","com.azure.resourcemanager.azurestackhci.models.HciOsProfile":"Microsoft.AzureStackHCI.HciOsProfile","com.azure.resourcemanager.azurestackhci.models.HciRemoteSupportJobProperties":"Microsoft.AzureStackHCI.HciRemoteSupportJobProperties","com.azure.resourcemanager.azurestackhci.models.HciRepairServerJobProperties":"Microsoft.AzureStackHCI.HciRepairServerJobProperties","com.azure.resourcemanager.azurestackhci.models.HciReportedProperties":"Microsoft.AzureStackHCI.HciReportedProperties","com.azure.resourcemanager.azurestackhci.models.HciStorageProfile":"Microsoft.AzureStackHCI.HciStorageProfile","com.azure.resourcemanager.azurestackhci.models.HciValidationFailureDetail":"Microsoft.AzureStackHCI.HciValidationFailureDetail","com.azure.resourcemanager.azurestackhci.models.HealthState":"Microsoft.AzureStackHCI.HealthState","com.azure.resourcemanager.azurestackhci.models.IdentityProvider":"Microsoft.AzureStackHCI.IdentityProvider","com.azure.resourcemanager.azurestackhci.models.ImdsAttestation":"Microsoft.AzureStackHCI.ImdsAttestation","com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork":"Microsoft.AzureStackHCI.InfrastructureNetwork","com.azure.resourcemanager.azurestackhci.models.InterfaceState":"Microsoft.AzureStackHCI.InterfaceState","com.azure.resourcemanager.azurestackhci.models.IpAddressRange":"Microsoft.AzureStackHCI.IpAddressRange","com.azure.resourcemanager.azurestackhci.models.IpAssignmentType":"Microsoft.AzureStackHCI.IpAssignmentType","com.azure.resourcemanager.azurestackhci.models.IpInterfaceType":"Microsoft.AzureStackHCI.IpInterfaceType","com.azure.resourcemanager.azurestackhci.models.IpPools":"Microsoft.AzureStackHCI.IpPools","com.azure.resourcemanager.azurestackhci.models.IscsiAdapterIPConfig":"Microsoft.AzureStackHCI.IscsiAdapterIPConfig","com.azure.resourcemanager.azurestackhci.models.IscsiAdapterProperties":"Microsoft.AzureStackHCI.IscsiAdapterProperties","com.azure.resourcemanager.azurestackhci.models.IscsiChapSettings":"Microsoft.AzureStackHCI.IscsiChapSettings","com.azure.resourcemanager.azurestackhci.models.IscsiChapType":"Microsoft.AzureStackHCI.IscsiChapType","com.azure.resourcemanager.azurestackhci.models.IscsiConfig":"Microsoft.AzureStackHCI.IscsiConfig","com.azure.resourcemanager.azurestackhci.models.IscsiNetworkConfig":"Microsoft.AzureStackHCI.IscsiNetworkConfig","com.azure.resourcemanager.azurestackhci.models.IscsiTargetPortalAddress":"Microsoft.AzureStackHCI.IscsiTargetPortalAddress","com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration":"Microsoft.AzureStackHCI.IsolatedVmAttestationConfiguration","com.azure.resourcemanager.azurestackhci.models.JobReportedProperties":"Microsoft.AzureStackHCI.JobReportedProperties","com.azure.resourcemanager.azurestackhci.models.JobStatus":"Microsoft.AzureStackHCI.JobStatus","com.azure.resourcemanager.azurestackhci.models.LifecycleDetails":"Microsoft.AzureStackHCI.LifecycleDetails","com.azure.resourcemanager.azurestackhci.models.LifecycleOperationStatus":"Microsoft.AzureStackHCI.LifecycleOperationStatus","com.azure.resourcemanager.azurestackhci.models.LifecycleStage":"Microsoft.AzureStackHCI.LifecycleStage","com.azure.resourcemanager.azurestackhci.models.LifecycleStatus":"Microsoft.AzureStackHCI.LifecycleStatus","com.azure.resourcemanager.azurestackhci.models.LocalAvailabilityZones":"Microsoft.AzureStackHCI.LocalAvailabilityZones","com.azure.resourcemanager.azurestackhci.models.LogCollectionError":"Microsoft.AzureStackHCI.LogCollectionError","com.azure.resourcemanager.azurestackhci.models.LogCollectionJobSession":"Microsoft.AzureStackHCI.LogCollectionJobSession","com.azure.resourcemanager.azurestackhci.models.LogCollectionJobType":"Microsoft.AzureStackHCI.LogCollectionJobType","com.azure.resourcemanager.azurestackhci.models.LogCollectionProperties":"Microsoft.AzureStackHCI.LogCollectionProperties","com.azure.resourcemanager.azurestackhci.models.LogCollectionReportedProperties":"Microsoft.AzureStackHCI.LogCollectionReportedProperties","com.azure.resourcemanager.azurestackhci.models.LogCollectionRequest":"Microsoft.AzureStackHCI.LogCollectionRequest","com.azure.resourcemanager.azurestackhci.models.LogCollectionRequestProperties":"Microsoft.AzureStackHCI.LogCollectionRequestProperties","com.azure.resourcemanager.azurestackhci.models.LogCollectionSession":"Microsoft.AzureStackHCI.LogCollectionSession","com.azure.resourcemanager.azurestackhci.models.LogCollectionStatus":"Microsoft.AzureStackHCI.LogCollectionStatus","com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.azurestackhci.models.Metadata":"Microsoft.AzureStackHCI.Metadata","com.azure.resourcemanager.azurestackhci.models.NetworkAdapter":"Microsoft.AzureStackHCI.NetworkAdapter","com.azure.resourcemanager.azurestackhci.models.NetworkAdapterActionStatus":"Microsoft.AzureStackHCI.NetworkAdapterActionStatus","com.azure.resourcemanager.azurestackhci.models.NetworkAdapterConfiguration":"Microsoft.AzureStackHCI.NetworkAdapterConfiguration","com.azure.resourcemanager.azurestackhci.models.NetworkAdapterDeploymentStep":"Microsoft.AzureStackHCI.NetworkAdapterDeploymentStep","com.azure.resourcemanager.azurestackhci.models.NetworkAdapterJobReportedProperties":"Microsoft.AzureStackHCI.NetworkAdapterJobReportedProperties","com.azure.resourcemanager.azurestackhci.models.NetworkAdapterJobType":"Microsoft.AzureStackHCI.NetworkAdapterJobType","com.azure.resourcemanager.azurestackhci.models.NetworkAdapterOperationStatus":"Microsoft.AzureStackHCI.NetworkAdapterOperationStatus","com.azure.resourcemanager.azurestackhci.models.NetworkAdapterProvisioningStatus":"Microsoft.AzureStackHCI.NetworkAdapterProvisioningStatus","com.azure.resourcemanager.azurestackhci.models.NetworkAdapterReportedProperties":"Microsoft.AzureStackHCI.NetworkAdapterReportedProperties","com.azure.resourcemanager.azurestackhci.models.NetworkAdapterStatus":"Microsoft.AzureStackHCI.NetworkAdapterStatus","com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration":"Microsoft.AzureStackHCI.NetworkConfiguration","com.azure.resourcemanager.azurestackhci.models.NetworkController":"Microsoft.AzureStackHCI.NetworkController","com.azure.resourcemanager.azurestackhci.models.NetworkInterfaceType":"Microsoft.AzureStackHCI.NetworkInterfaceType","com.azure.resourcemanager.azurestackhci.models.NextBillingModel":"Microsoft.AzureStackHCI.NextBillingModel","com.azure.resourcemanager.azurestackhci.models.NicDetail":"Microsoft.AzureStackHCI.NicDetail","com.azure.resourcemanager.azurestackhci.models.NodeArcState":"Microsoft.AzureStackHCI.NodeArcState","com.azure.resourcemanager.azurestackhci.models.NodeExtensionState":"Microsoft.AzureStackHCI.NodeExtensionState","com.azure.resourcemanager.azurestackhci.models.NodeStorageType":"Microsoft.AzureStackHCI.NodeStorageType","com.azure.resourcemanager.azurestackhci.models.OSOperationType":"Microsoft.AzureStackHCI.OSOperationType","com.azure.resourcemanager.azurestackhci.models.Observability":"Microsoft.AzureStackHCI.Observability","com.azure.resourcemanager.azurestackhci.models.OemActivation":"Microsoft.AzureStackHCI.OemActivation","com.azure.resourcemanager.azurestackhci.models.OnboardingConfiguration":"Microsoft.AzureStackHCI.OnboardingConfiguration","com.azure.resourcemanager.azurestackhci.models.OnboardingResourceType":"Microsoft.AzureStackHCI.OnboardingResourceType","com.azure.resourcemanager.azurestackhci.models.OperationDetail":"Microsoft.AzureStackHCI.OperationDetail","com.azure.resourcemanager.azurestackhci.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.azurestackhci.models.OperationType":"Microsoft.AzureStackHCI.OperationType","com.azure.resourcemanager.azurestackhci.models.OptionalServices":"Microsoft.AzureStackHCI.OptionalServices","com.azure.resourcemanager.azurestackhci.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.azurestackhci.models.OsImageProperties":"Microsoft.AzureStackHCI.OsImageProperties","com.azure.resourcemanager.azurestackhci.models.OsProfile":"Microsoft.AzureStackHCI.OsProfile","com.azure.resourcemanager.azurestackhci.models.OsProvisionProfile":"Microsoft.AzureStackHCI.OsProvisionProfile","com.azure.resourcemanager.azurestackhci.models.OverprovisioningRatio":"Microsoft.AzureStackHCI.OverprovisioningRatio","com.azure.resourcemanager.azurestackhci.models.OwnerKeyType":"Microsoft.AzureStackHCI.OwnerKeyType","com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherDetails":"Microsoft.AzureStackHCI.OwnershipVoucherDetails","com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherValidationDetails":"Microsoft.AzureStackHCI.OwnershipVoucherValidationDetails","com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherValidationStatus":"Microsoft.AzureStackHCI.OwnershipVoucherValidationStatus","com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo":"Microsoft.AzureStackHCI.PackageVersionInfo","com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState":"Microsoft.AzureStackHCI.PerNodeExtensionState","com.azure.resourcemanager.azurestackhci.models.PerNodeRemoteSupportSession":"Microsoft.AzureStackHCI.PerNodeRemoteSupportSession","com.azure.resourcemanager.azurestackhci.models.PerNodeState":"Microsoft.AzureStackHCI.PerNodeState","com.azure.resourcemanager.azurestackhci.models.PhysicalNodes":"Microsoft.AzureStackHCI.PhysicalNodes","com.azure.resourcemanager.azurestackhci.models.PrecheckResult":"Microsoft.AzureStackHCI.PrecheckResult","com.azure.resourcemanager.azurestackhci.models.PrecheckResultTags":"Microsoft.AzureStackHCI.PrecheckResultTags","com.azure.resourcemanager.azurestackhci.models.PrivilegedJobType":"Microsoft.AzureStackHCI.PrivilegedJobType","com.azure.resourcemanager.azurestackhci.models.ProvisionOsJobProperties":"Microsoft.AzureStackHCI.ProvisionOsJobProperties","com.azure.resourcemanager.azurestackhci.models.ProvisionOsReportedProperties":"Microsoft.AzureStackHCI.ProvisionOsReportedProperties","com.azure.resourcemanager.azurestackhci.models.ProvisioningDetails":"Microsoft.AzureStackHCI.ProvisioningDetails","com.azure.resourcemanager.azurestackhci.models.ProvisioningOsType":"Microsoft.AzureStackHCI.ProvisioningOsType","com.azure.resourcemanager.azurestackhci.models.ProvisioningRequest":"Microsoft.AzureStackHCI.ProvisioningRequest","com.azure.resourcemanager.azurestackhci.models.ProvisioningState":"Microsoft.AzureStackHCI.ProvisioningState","com.azure.resourcemanager.azurestackhci.models.QosPolicyOverrides":"Microsoft.AzureStackHCI.QosPolicyOverrides","com.azure.resourcemanager.azurestackhci.models.RawCertificateData":"Microsoft.AzureStackHCI.RawCertificateData","com.azure.resourcemanager.azurestackhci.models.RdmaCapability":"Microsoft.AzureStackHCI.RdmaCapability","com.azure.resourcemanager.azurestackhci.models.RebootRequirement":"Microsoft.AzureStackHCI.RebootRequirement","com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest":"Microsoft.AzureStackHCI.ReconcileArcSettingsRequest","com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequestProperties":"Microsoft.AzureStackHCI.ReconcileArcSettingsRequestProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel":"Microsoft.AzureStackHCI.RemoteSupportAccessLevel","com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobNodeSettings":"Microsoft.AzureStackHCI.RemoteSupportJobNodeSettings","com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobReportedProperties":"Microsoft.AzureStackHCI.RemoteSupportJobReportedProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportNodeSettings":"Microsoft.AzureStackHCI.RemoteSupportNodeSettings","com.azure.resourcemanager.azurestackhci.models.RemoteSupportProperties":"Microsoft.AzureStackHCI.RemoteSupportProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportProvisioningState":"Microsoft.AzureStackHCI.RemoteSupportProvisioningState","com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequest":"Microsoft.AzureStackHCI.RemoteSupportRequest","com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequestProperties":"Microsoft.AzureStackHCI.RemoteSupportRequestProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportSession":"Microsoft.AzureStackHCI.RemoteSupportSession","com.azure.resourcemanager.azurestackhci.models.RemoteSupportType":"Microsoft.AzureStackHCI.RemoteSupportType","com.azure.resourcemanager.azurestackhci.models.RepairServerJobServerDetails":"Microsoft.AzureStackHCI.RepairServerJobServerDetails","com.azure.resourcemanager.azurestackhci.models.ReportedProperties":"Microsoft.AzureStackHCI.ReportedProperties","com.azure.resourcemanager.azurestackhci.models.ResolutionStrategy":"Microsoft.AzureStackHCI.ResolutionStrategy","com.azure.resourcemanager.azurestackhci.models.SanAdapterIPConfig":"Microsoft.AzureStackHCI.SanAdapterIPConfig","com.azure.resourcemanager.azurestackhci.models.SanAdapterProperties":"Microsoft.AzureStackHCI.SanAdapterProperties","com.azure.resourcemanager.azurestackhci.models.SanClusterNetworkConfig":"Microsoft.AzureStackHCI.SanClusterNetworkConfig","com.azure.resourcemanager.azurestackhci.models.SanNetworks":"Microsoft.AzureStackHCI.SanNetworks","com.azure.resourcemanager.azurestackhci.models.SbeCredentials":"Microsoft.AzureStackHCI.SbeCredentials","com.azure.resourcemanager.azurestackhci.models.SbeDeploymentInfo":"Microsoft.AzureStackHCI.SbeDeploymentInfo","com.azure.resourcemanager.azurestackhci.models.SbeDeploymentPackageInfo":"Microsoft.AzureStackHCI.SbeDeploymentPackageInfo","com.azure.resourcemanager.azurestackhci.models.SbePartnerInfo":"Microsoft.AzureStackHCI.SbePartnerInfo","com.azure.resourcemanager.azurestackhci.models.SbePartnerProperties":"Microsoft.AzureStackHCI.SbePartnerProperties","com.azure.resourcemanager.azurestackhci.models.ScaleUnits":"Microsoft.AzureStackHCI.ScaleUnits","com.azure.resourcemanager.azurestackhci.models.SdnIntegration":"Microsoft.AzureStackHCI.SdnIntegration","com.azure.resourcemanager.azurestackhci.models.SdnIntegrationIntent":"Microsoft.AzureStackHCI.SdnIntegrationIntent","com.azure.resourcemanager.azurestackhci.models.SdnProperties":"Microsoft.AzureStackHCI.SdnProperties","com.azure.resourcemanager.azurestackhci.models.SdnStatus":"Microsoft.AzureStackHCI.SdnStatus","com.azure.resourcemanager.azurestackhci.models.SecretType":"Microsoft.AzureStackHCI.SecretType","com.azure.resourcemanager.azurestackhci.models.SecretsLocationDetails":"Microsoft.AzureStackHCI.SecretsLocationDetails","com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest":"Microsoft.AzureStackHCI.SecretsLocationsChangeRequest","com.azure.resourcemanager.azurestackhci.models.SecretsType":"Microsoft.AzureStackHCI.SecretsType","com.azure.resourcemanager.azurestackhci.models.SecurityComplianceStatus":"Microsoft.AzureStackHCI.SecurityComplianceStatus","com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration":"Microsoft.AzureStackHCI.ServiceConfiguration","com.azure.resourcemanager.azurestackhci.models.ServiceName":"Microsoft.AzureStackHCI.ServiceName","com.azure.resourcemanager.azurestackhci.models.Severity":"Microsoft.AzureStackHCI.Severity","com.azure.resourcemanager.azurestackhci.models.SiteDetails":"Microsoft.AzureStackHCI.SiteDetails","com.azure.resourcemanager.azurestackhci.models.SkuMappings":"Microsoft.AzureStackHCI.SkuMappings","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest":"Microsoft.AzureStackHCI.SoftwareAssuranceChangeRequest","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequestProperties":"Microsoft.AzureStackHCI.SoftwareAssuranceChangeRequestProperties","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent":"Microsoft.AzureStackHCI.SoftwareAssuranceIntent","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties":"Microsoft.AzureStackHCI.SoftwareAssuranceProperties","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceStatus":"Microsoft.AzureStackHCI.SoftwareAssuranceStatus","com.azure.resourcemanager.azurestackhci.models.SolutionType":"Microsoft.AzureStackHCI.SolutionType","com.azure.resourcemanager.azurestackhci.models.State":"Microsoft.AzureStackHCI.State","com.azure.resourcemanager.azurestackhci.models.Status":"Microsoft.AzureStackHCI.Status","com.azure.resourcemanager.azurestackhci.models.StatusLevelTypes":"Microsoft.AzureStackHCI.StatusLevelTypes","com.azure.resourcemanager.azurestackhci.models.Storage":"Microsoft.AzureStackHCI.Storage","com.azure.resourcemanager.azurestackhci.models.StorageConfiguration":"Microsoft.AzureStackHCI.StorageConfiguration","com.azure.resourcemanager.azurestackhci.models.StorageInitiator":"Microsoft.AzureStackHCI.StorageInitiator","com.azure.resourcemanager.azurestackhci.models.StorageInitiatorType":"Microsoft.AzureStackHCI.StorageInitiatorType","com.azure.resourcemanager.azurestackhci.models.StorageProfile":"Microsoft.AzureStackHCI.StorageProfile","com.azure.resourcemanager.azurestackhci.models.StorageS2dConfig":"Microsoft.AzureStackHCI.StorageS2dConfig","com.azure.resourcemanager.azurestackhci.models.StorageSanConfig":"Microsoft.AzureStackHCI.StorageSanConfig","com.azure.resourcemanager.azurestackhci.models.StorageType":"Microsoft.AzureStackHCI.StorageType","com.azure.resourcemanager.azurestackhci.models.SwitchDetail":"Microsoft.AzureStackHCI.SwitchDetail","com.azure.resourcemanager.azurestackhci.models.SwitchExtension":"Microsoft.AzureStackHCI.SwitchExtension","com.azure.resourcemanager.azurestackhci.models.SyncConfigurationJobProperties":"Microsoft.AzureStackHCI.SyncConfigurationJobProperties","com.azure.resourcemanager.azurestackhci.models.SyncConfigurationNetworkAdapterJobProperties":"Microsoft.AzureStackHCI.SyncConfigurationNetworkAdapterJobProperties","com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration":"Microsoft.AzureStackHCI.TargetDeviceConfiguration","com.azure.resourcemanager.azurestackhci.models.TimeConfiguration":"Microsoft.AzureStackHCI.TimeConfiguration","com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite":"Microsoft.AzureStackHCI.UpdatePrerequisite","com.azure.resourcemanager.azurestackhci.models.UpdateRunPropertiesState":"Microsoft.AzureStackHCI.UpdateRunPropertiesState","com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState":"Microsoft.AzureStackHCI.UpdateSummariesPropertiesState","com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest":"Microsoft.AzureStackHCI.UploadCertificateRequest","com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.azurestackhci.models.UserDetails":"Microsoft.AzureStackHCI.UserDetails","com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest":"Microsoft.AzureStackHCI.ValidateOwnershipVouchersRequest","com.azure.resourcemanager.azurestackhci.models.ValidateRequest":"Microsoft.AzureStackHCI.ValidateRequest","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapabilities":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeCapabilities","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapability":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeCapability","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponent":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponent","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentMetadata":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponentMetadata","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentPayload":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponentPayload","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeContent":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeContent","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeInfo":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeInfo","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeProperties":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeProperties","com.azure.resourcemanager.azurestackhci.models.VolumeConfiguration":"Microsoft.AzureStackHCI.VolumeConfiguration","com.azure.resourcemanager.azurestackhci.models.VolumeReportedProperties":"Microsoft.AzureStackHCI.VolumeReportedProperties","com.azure.resourcemanager.azurestackhci.models.VolumeType":"Microsoft.AzureStackHCI.VolumeType","com.azure.resourcemanager.azurestackhci.models.WebProxyConfiguration":"Microsoft.AzureStackHCI.WebProxyConfiguration","com.azure.resourcemanager.azurestackhci.models.WifiConfigurationDesiredProperties":"Microsoft.AzureStackHCI.WifiConfigurationDesiredProperties","com.azure.resourcemanager.azurestackhci.models.WifiConfigurationReportedProperties":"Microsoft.AzureStackHCI.WifiConfigurationReportedProperties","com.azure.resourcemanager.azurestackhci.models.WifiSecret":"Microsoft.AzureStackHCI.WifiSecret","com.azure.resourcemanager.azurestackhci.models.WifiSecretType":"Microsoft.AzureStackHCI.WifiSecretType","com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription":"Microsoft.AzureStackHCI.WindowsServerSubscription"},"generatedFiles":["src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClusterJobsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDeviceJobsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDeploymentSettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskJobsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDiskPrivilegedJobsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineDisksClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineJobsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdapterJobsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineNetworkAdaptersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineSecuritySettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachineVolumesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeMachinesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OsImagesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OwnershipVouchersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationGroupsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ValidatedSolutionRecipesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterJobInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceJobInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDeploymentSettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskJobInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineDiskPrivilegedJobInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineJobInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineNetworkAdapterJobInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineSecuritySettingsInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineValidateResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeMachineVolumeInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OsImageInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateOwnershipVouchersResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidatedSolutionRecipeInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterJobsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDeploymentSettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskJobsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDiskPrivilegedJobsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineDisksImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineJobsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdapterJobsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineNetworkAdaptersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineSecuritySettingsOperationsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineValidateResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumeImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachineVolumesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeMachinesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImageImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OsImagesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OwnershipVouchersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationGroupsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateOwnershipVouchersResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipeImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ArcSettingList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterJobListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/DeploymentSettingListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceJobListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDeploymentSettingListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskJobListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineDiskPrivilegedJobListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineJobListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterJobListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineNetworkAdapterListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineSecuritySettingsListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeMachineVolumeListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ExtensionList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OfferList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OsImageListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SecuritySettingListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SkuList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateRunList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateSummariesList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ValidatedSolutionRecipeListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AccessLevel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AddServerJobServerDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ApplyConfigurationNetworkAdapterJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcConnectivityProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcExtensionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Architecture.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfoPayload.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AuthenticationType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/CheckUpdatesRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterBillingProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterJobs.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPattern.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterSdnProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/CreateVolumeJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeleteVolumeJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentCluster.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingAdapterPropertyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingHostNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingIntents.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageAdapterIpInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingVirtualSwitchConfigurationOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceKind.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceLogCollectionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskActionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskDeploymentStep.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskFileSystemType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskStorageType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskVolumeReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsServerConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsZones.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadOsProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DownloadRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EAPMethod.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceActionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceDeploymentSecrets.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceSecrets.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceDisks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJobs.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceKind.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachine.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineAdapterPropertyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineCollectLogJobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineConnectivityStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentData.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettingProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDeploymentSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisk.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskJobs.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskPrivilegedJobs.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDiskProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineDisks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineHostNetworkIntent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineJobs.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineKind.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineLifecycleStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapter.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterJobs.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapterProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkAdapters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNetworkProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineNicDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachinePatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportJobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineRemoteSupportNodeSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineScaleUnits.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityComplianceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecurityProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineSecuritySettingsOperations.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageAdapterIpInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineStorageNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineValidateResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVirtualSwitchConfigurationOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolume.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumeProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineVolumes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachineWorkloadInventoryItem.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeMachines.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceViewStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionManagedBy.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ForcePushNetworkAdapterJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareClass.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciAddServerJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciCollectLogJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciConfigureSdnIntegrationJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDevice.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceAdapterPropertyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceArcExtension.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceHostNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceIntents.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageAdapterIpInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceVirtualSwitchConfigurationOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciHardwareProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNicDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciOsProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciRemoteSupportJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciRepairServerJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciStorageProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciValidationFailureDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HealthState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IdentityProvider.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/InterfaceState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAddressRange.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAssignmentType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IpInterfaceType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterIPConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiAdapterProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiChapType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiNetworkConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IscsiTargetPortalAddress.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/JobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/JobStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleOperationStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStage.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LifecycleStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LocalAvailabilityZones.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionError.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Metadata.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapter.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterActionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterDeploymentStep.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterOperationStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterProvisioningStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkAdapterStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkController.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NextBillingModel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeStorageType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OSOperationType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OnboardingResourceType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImage.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImageProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OsImages.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProvisionProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OverprovisioningRatio.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnerKeyType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVoucherValidationStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OwnershipVouchers.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeRemoteSupportSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PrivilegedJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisionOsReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningOsType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RdmaCapability.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportAccessLevel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobNodeSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportNodeSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportProvisioningState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RepairServerJobServerDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ResolutionStrategy.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SanAdapterIPConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SanAdapterProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SanClusterNetworkConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SanNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeCredentials.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentPackageInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegrationIntent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationsChangeRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceName.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SiteDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SolutionType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiator.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageInitiatorType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageS2dConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageSanConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchExtension.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SyncConfigurationNetworkAdapterJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/TargetDeviceConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/TimeConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperationGroups.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UserDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateOwnershipVouchersResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipe.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapabilities.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapability.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentMetadata.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentPayload.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeContent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/WebProxyConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationDesiredProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiConfigurationReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecret.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/WifiSecretType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.AzureStackHCI":"2026-04-30"},"crossLanguagePackageId":"Microsoft.AzureStackHCI","crossLanguageVersion":"726d2381bf68","crossLanguageDefinitions":{"com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient":"Microsoft.AzureStackHCI.ArcSettings","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginCreateIdentity":"Microsoft.AzureStackHCI.ArcSettings.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginDelete":"Microsoft.AzureStackHCI.ArcSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginInitializeDisableProcess":"Microsoft.AzureStackHCI.ArcSettings.initializeDisableProcess","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.beginReconcile":"Microsoft.AzureStackHCI.ArcSettings.reconcile","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.consentAndInstallDefaultExtensions":"Microsoft.AzureStackHCI.ArcSettings.consentAndInstallDefaultExtensions","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.consentAndInstallDefaultExtensionsWithResponse":"Microsoft.AzureStackHCI.ArcSettings.consentAndInstallDefaultExtensions","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.create":"Microsoft.AzureStackHCI.ArcSettings.create","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.createIdentity":"Microsoft.AzureStackHCI.ArcSettings.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.createWithResponse":"Microsoft.AzureStackHCI.ArcSettings.create","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.delete":"Microsoft.AzureStackHCI.ArcSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.generatePassword":"Microsoft.AzureStackHCI.ArcSettings.generatePassword","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.generatePasswordWithResponse":"Microsoft.AzureStackHCI.ArcSettings.generatePassword","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.get":"Microsoft.AzureStackHCI.ArcSettings.get","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.getWithResponse":"Microsoft.AzureStackHCI.ArcSettings.get","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.initializeDisableProcess":"Microsoft.AzureStackHCI.ArcSettings.initializeDisableProcess","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.listByCluster":"Microsoft.AzureStackHCI.ArcSettings.listByCluster","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.reconcile":"Microsoft.AzureStackHCI.ArcSettings.reconcile","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.update":"Microsoft.AzureStackHCI.ArcSettings.update","com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient.updateWithResponse":"Microsoft.AzureStackHCI.ArcSettings.update","com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciManagementClient":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient":"Microsoft.AzureStackHCI.Clusters","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginConfigureRemoteSupport":"Microsoft.AzureStackHCI.Clusters.configureRemoteSupport","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginCreateIdentity":"Microsoft.AzureStackHCI.Clusters.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginDelete":"Microsoft.AzureStackHCI.Clusters.delete","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginExtendSoftwareAssuranceBenefit":"Microsoft.AzureStackHCI.Clusters.extendSoftwareAssuranceBenefit","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginTriggerLogCollection":"Microsoft.AzureStackHCI.Clusters.triggerLogCollection","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginUpdateSecretsLocations":"Microsoft.AzureStackHCI.Clusters.updateSecretsLocations","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.beginUploadCertificate":"Microsoft.AzureStackHCI.Clusters.uploadCertificate","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.configureRemoteSupport":"Microsoft.AzureStackHCI.Clusters.configureRemoteSupport","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.create":"Microsoft.AzureStackHCI.Clusters.create","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.createIdentity":"Microsoft.AzureStackHCI.Clusters.createIdentity","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.createWithResponse":"Microsoft.AzureStackHCI.Clusters.create","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.delete":"Microsoft.AzureStackHCI.Clusters.delete","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.extendSoftwareAssuranceBenefit":"Microsoft.AzureStackHCI.Clusters.extendSoftwareAssuranceBenefit","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.getByResourceGroup":"Microsoft.AzureStackHCI.Clusters.get","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.getByResourceGroupWithResponse":"Microsoft.AzureStackHCI.Clusters.get","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.list":"Microsoft.AzureStackHCI.Clusters.listBySubscription","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.listByResourceGroup":"Microsoft.AzureStackHCI.Clusters.listByResourceGroup","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.triggerLogCollection":"Microsoft.AzureStackHCI.Clusters.triggerLogCollection","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.update":"Microsoft.AzureStackHCI.Clusters.update","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.updateSecretsLocations":"Microsoft.AzureStackHCI.Clusters.updateSecretsLocations","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.updateWithResponse":"Microsoft.AzureStackHCI.Clusters.update","com.azure.resourcemanager.azurestackhci.fluent.ClustersClient.uploadCertificate":"Microsoft.AzureStackHCI.Clusters.uploadCertificate","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient":"Microsoft.AzureStackHCI.DeploymentSettings","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.DeploymentSettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.beginDelete":"Microsoft.AzureStackHCI.DeploymentSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.createOrUpdate":"Microsoft.AzureStackHCI.DeploymentSettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.delete":"Microsoft.AzureStackHCI.DeploymentSettings.delete","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.get":"Microsoft.AzureStackHCI.DeploymentSettings.get","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.getWithResponse":"Microsoft.AzureStackHCI.DeploymentSettings.get","com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient.listByClusters":"Microsoft.AzureStackHCI.DeploymentSettings.listByClusters","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient":"Microsoft.AzureStackHCI.EdgeDeviceJobs","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeDeviceJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.beginDelete":"Microsoft.AzureStackHCI.EdgeDeviceJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeDeviceJobs.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.delete":"Microsoft.AzureStackHCI.EdgeDeviceJobs.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.get":"Microsoft.AzureStackHCI.EdgeDeviceJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeDeviceJobs.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDeviceJobsClient.listByEdgeDevice":"Microsoft.AzureStackHCI.EdgeDeviceJobs.listByEdgeDevice","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient":"Microsoft.AzureStackHCI.EdgeDevices","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.EdgeDevices.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginDelete":"Microsoft.AzureStackHCI.EdgeDevices.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.beginValidate":"Microsoft.AzureStackHCI.EdgeDevices.validate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.createOrUpdate":"Microsoft.AzureStackHCI.EdgeDevices.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.delete":"Microsoft.AzureStackHCI.EdgeDevices.delete","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.get":"Microsoft.AzureStackHCI.EdgeDevices.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.getWithResponse":"Microsoft.AzureStackHCI.EdgeDevices.get","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.list":"Microsoft.AzureStackHCI.EdgeDevices.list","com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient.validate":"Microsoft.AzureStackHCI.EdgeDevices.validate","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient":"Microsoft.AzureStackHCI.Extensions","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginCreate":"Microsoft.AzureStackHCI.Extensions.create","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginDelete":"Microsoft.AzureStackHCI.Extensions.delete","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginUpdate":"Microsoft.AzureStackHCI.Extensions.update","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.beginUpgrade":"Microsoft.AzureStackHCI.Extensions.upgrade","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.create":"Microsoft.AzureStackHCI.Extensions.create","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.delete":"Microsoft.AzureStackHCI.Extensions.delete","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.get":"Microsoft.AzureStackHCI.Extensions.get","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.getWithResponse":"Microsoft.AzureStackHCI.Extensions.get","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.listByArcSetting":"Microsoft.AzureStackHCI.Extensions.listByArcSetting","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.update":"Microsoft.AzureStackHCI.Extensions.update","com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient.upgrade":"Microsoft.AzureStackHCI.Extensions.upgrade","com.azure.resourcemanager.azurestackhci.fluent.OffersClient":"Microsoft.AzureStackHCI.Offers","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.get":"Microsoft.AzureStackHCI.Offers.get","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.getWithResponse":"Microsoft.AzureStackHCI.Offers.get","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.listByCluster":"Microsoft.AzureStackHCI.Clusters.listByCluster","com.azure.resourcemanager.azurestackhci.fluent.OffersClient.listByPublisher":"Microsoft.AzureStackHCI.Offers.listByPublisher","com.azure.resourcemanager.azurestackhci.fluent.OperationsClient":"Microsoft.AzureStackHCI.Operations","com.azure.resourcemanager.azurestackhci.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient":"Microsoft.AzureStackHCI.SecuritySettings","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.beginCreateOrUpdate":"Microsoft.AzureStackHCI.SecuritySettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.beginDelete":"Microsoft.AzureStackHCI.SecuritySettings.delete","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.createOrUpdate":"Microsoft.AzureStackHCI.SecuritySettings.createOrUpdate","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.delete":"Microsoft.AzureStackHCI.SecuritySettings.delete","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.get":"Microsoft.AzureStackHCI.SecuritySettings.get","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.getWithResponse":"Microsoft.AzureStackHCI.SecuritySettings.get","com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient.listByClusters":"Microsoft.AzureStackHCI.SecuritySettings.listByClusters","com.azure.resourcemanager.azurestackhci.fluent.SkusClient":"Microsoft.AzureStackHCI.Skus","com.azure.resourcemanager.azurestackhci.fluent.SkusClient.get":"Microsoft.AzureStackHCI.Skus.get","com.azure.resourcemanager.azurestackhci.fluent.SkusClient.getWithResponse":"Microsoft.AzureStackHCI.Skus.get","com.azure.resourcemanager.azurestackhci.fluent.SkusClient.listByOffer":"Microsoft.AzureStackHCI.Skus.listByOffer","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient":"Microsoft.AzureStackHCI.UpdateRuns","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.beginDelete":"Microsoft.AzureStackHCI.UpdateRuns.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.delete":"Microsoft.AzureStackHCI.UpdateRuns.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.get":"Microsoft.AzureStackHCI.UpdateRuns.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.getWithResponse":"Microsoft.AzureStackHCI.UpdateRuns.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.list":"Microsoft.AzureStackHCI.UpdateRuns.list","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.put":"Microsoft.AzureStackHCI.UpdateRuns.put","com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient.putWithResponse":"Microsoft.AzureStackHCI.UpdateRuns.put","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient.beginCheckHealth":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.checkHealth","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient.beginCheckUpdates":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.checkUpdates","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient.checkHealth":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.checkHealth","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationGroupsClient.checkUpdates":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.checkUpdates","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.beginDelete":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.delete":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.get":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.getWithResponse":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.get","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.list":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.list","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.put":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.put","com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient.putWithResponse":"Microsoft.AzureStackHCI.UpdateSummariesOperationGroup.put","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient":"Microsoft.AzureStackHCI.Updates","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginDelete":"Microsoft.AzureStackHCI.Updates.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginPost":"Microsoft.AzureStackHCI.Updates.post","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.beginPrepare":"Microsoft.AzureStackHCI.Updates.prepare","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.delete":"Microsoft.AzureStackHCI.Updates.delete","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.get":"Microsoft.AzureStackHCI.Updates.get","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.getWithResponse":"Microsoft.AzureStackHCI.Updates.get","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.list":"Microsoft.AzureStackHCI.Updates.list","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.post":"Microsoft.AzureStackHCI.Updates.post","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.prepare":"Microsoft.AzureStackHCI.Updates.prepare","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.put":"Microsoft.AzureStackHCI.Updates.put","com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient.putWithResponse":"Microsoft.AzureStackHCI.Updates.put","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.get":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes.get","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.getWithResponse":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes.get","com.azure.resourcemanager.azurestackhci.fluent.ValidatedSolutionRecipesClient.listBySubscriptionLocationResource":"Microsoft.AzureStackHCI.ValidatedSolutionRecipes.listBySubscriptionLocationResource","com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner":"Microsoft.AzureStackHCI.ArcIdentityResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseProperties":"Microsoft.AzureStackHCI.ArcIdentityResponseProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner":"Microsoft.AzureStackHCI.ArcSetting","com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingProperties":"Microsoft.AzureStackHCI.ArcSettingProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingsPatchProperties":"Microsoft.AzureStackHCI.ArcSettingsPatchProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner":"Microsoft.AzureStackHCI.ClusterIdentityResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseProperties":"Microsoft.AzureStackHCI.ClusterIdentityResponseProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner":"Microsoft.AzureStackHCI.Cluster","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterPatchProperties":"Microsoft.AzureStackHCI.ClusterPatchProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ClusterProperties":"Microsoft.AzureStackHCI.ClusterProperties","com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner":"Microsoft.AzureStackHCI.DeploymentSetting","com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingsProperties":"Microsoft.AzureStackHCI.DeploymentSettingsProperties","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner":"Microsoft.AzureStackHCI.EdgeDevice","com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceJobInner":"Microsoft.AzureStackHCI.EdgeDeviceJob","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner":"Microsoft.AzureStackHCI.Extension","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionParameters":"Microsoft.AzureStackHCI.ExtensionParameters","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionPatchProperties":"Microsoft.AzureStackHCI.ExtensionPatchProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionProperties":"Microsoft.AzureStackHCI.ExtensionProperties","com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner":"Microsoft.AzureStackHCI.Update","com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner":"Microsoft.AzureStackHCI.Offer","com.azure.resourcemanager.azurestackhci.fluent.models.OfferProperties":"Microsoft.AzureStackHCI.OfferProperties","com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner":"Microsoft.AzureStackHCI.PasswordCredential","com.azure.resourcemanager.azurestackhci.fluent.models.SecurityProperties":"Microsoft.AzureStackHCI.SecurityProperties","com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner":"Microsoft.AzureStackHCI.SecuritySetting","com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner":"Microsoft.AzureStackHCI.Sku","com.azure.resourcemanager.azurestackhci.fluent.models.SkuProperties":"Microsoft.AzureStackHCI.SkuProperties","com.azure.resourcemanager.azurestackhci.fluent.models.Step":"Microsoft.AzureStackHCI.Step","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateProperties":"Microsoft.AzureStackHCI.UpdateProperties","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner":"Microsoft.AzureStackHCI.UpdateRun","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunProperties":"Microsoft.AzureStackHCI.UpdateRunProperties","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateStateProperties":"Microsoft.AzureStackHCI.UpdateStateProperties","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner":"Microsoft.AzureStackHCI.UpdateSummaries","com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesProperties":"Microsoft.AzureStackHCI.UpdateSummariesProperties","com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner":"Microsoft.AzureStackHCI.ValidateResponse","com.azure.resourcemanager.azurestackhci.fluent.models.ValidatedSolutionRecipeInner":"Microsoft.AzureStackHCI.ValidatedSolutionRecipe","com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciManagementClientBuilder":"Microsoft.AzureStackHCI","com.azure.resourcemanager.azurestackhci.implementation.models.ArcSettingList":"Microsoft.AzureStackHCI.ArcSettingList","com.azure.resourcemanager.azurestackhci.implementation.models.ClusterList":"Microsoft.AzureStackHCI.ClusterList","com.azure.resourcemanager.azurestackhci.implementation.models.DeploymentSettingListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceJobListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.EdgeDeviceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.ExtensionList":"Microsoft.AzureStackHCI.ExtensionList","com.azure.resourcemanager.azurestackhci.implementation.models.OfferList":"Microsoft.AzureStackHCI.OfferList","com.azure.resourcemanager.azurestackhci.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.azurestackhci.implementation.models.SecuritySettingListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.implementation.models.SkuList":"Microsoft.AzureStackHCI.SkuList","com.azure.resourcemanager.azurestackhci.implementation.models.UpdateList":"Microsoft.AzureStackHCI.UpdateList","com.azure.resourcemanager.azurestackhci.implementation.models.UpdateRunList":"Microsoft.AzureStackHCI.UpdateRunList","com.azure.resourcemanager.azurestackhci.implementation.models.UpdateSummariesList":"Microsoft.AzureStackHCI.UpdateSummariesList","com.azure.resourcemanager.azurestackhci.implementation.models.ValidatedSolutionRecipeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.azurestackhci.models.AccessLevel":"Microsoft.AzureStackHCI.AccessLevel","com.azure.resourcemanager.azurestackhci.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.azurestackhci.models.ArcConnectivityProperties":"Microsoft.AzureStackHCI.ArcConnectivityProperties","com.azure.resourcemanager.azurestackhci.models.ArcExtensionState":"Microsoft.AzureStackHCI.ArcExtensionState","com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState":"Microsoft.AzureStackHCI.ArcSettingAggregateState","com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch":"Microsoft.AzureStackHCI.ArcSettingsPatch","com.azure.resourcemanager.azurestackhci.models.AssemblyInfo":"Microsoft.AzureStackHCI.AssemblyInfo","com.azure.resourcemanager.azurestackhci.models.AssemblyInfoPayload":"Microsoft.AzureStackHCI.AssemblyInfoPayload","com.azure.resourcemanager.azurestackhci.models.AvailabilityType":"Microsoft.AzureStackHCI.AvailabilityType","com.azure.resourcemanager.azurestackhci.models.CheckUpdatesRequest":"Microsoft.AzureStackHCI.CheckUpdatesRequest","com.azure.resourcemanager.azurestackhci.models.ClusterBillingProperties":"Microsoft.AzureStackHCI.ClusterBillingProperties","com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties":"Microsoft.AzureStackHCI.ClusterDesiredProperties","com.azure.resourcemanager.azurestackhci.models.ClusterNode":"Microsoft.AzureStackHCI.ClusterNode","com.azure.resourcemanager.azurestackhci.models.ClusterNodeType":"Microsoft.AzureStackHCI.ClusterNodeType","com.azure.resourcemanager.azurestackhci.models.ClusterPatch":"Microsoft.AzureStackHCI.ClusterPatch","com.azure.resourcemanager.azurestackhci.models.ClusterPattern":"Microsoft.AzureStackHCI.ClusterPattern","com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties":"Microsoft.AzureStackHCI.ClusterReportedProperties","com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType":"Microsoft.AzureStackHCI.ComplianceAssignmentType","com.azure.resourcemanager.azurestackhci.models.ComplianceStatus":"Microsoft.AzureStackHCI.ComplianceStatus","com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus":"Microsoft.AzureStackHCI.ConnectivityStatus","com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails":"Microsoft.AzureStackHCI.DefaultExtensionDetails","com.azure.resourcemanager.azurestackhci.models.DeploymentCluster":"Microsoft.AzureStackHCI.DeploymentCluster","com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration":"Microsoft.AzureStackHCI.DeploymentConfiguration","com.azure.resourcemanager.azurestackhci.models.DeploymentData":"Microsoft.AzureStackHCI.DeploymentData","com.azure.resourcemanager.azurestackhci.models.DeploymentMode":"Microsoft.AzureStackHCI.DeploymentMode","com.azure.resourcemanager.azurestackhci.models.DeploymentSecuritySettings":"Microsoft.AzureStackHCI.DeploymentSecuritySettings","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingAdapterPropertyOverrides":"Microsoft.AzureStackHCI.DeploymentSettingAdapterPropertyOverrides","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingHostNetwork":"Microsoft.AzureStackHCI.DeploymentSettingHostNetwork","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingIntents":"Microsoft.AzureStackHCI.DeploymentSettingIntents","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageAdapterIpInfo":"Microsoft.AzureStackHCI.DeploymentSettingStorageAdapterIPInfo","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageNetworks":"Microsoft.AzureStackHCI.DeploymentSettingStorageNetworks","com.azure.resourcemanager.azurestackhci.models.DeploymentSettingVirtualSwitchConfigurationOverrides":"Microsoft.AzureStackHCI.DeploymentSettingVirtualSwitchConfigurationOverrides","com.azure.resourcemanager.azurestackhci.models.DeploymentStep":"Microsoft.AzureStackHCI.DeploymentStep","com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration":"Microsoft.AzureStackHCI.DeviceConfiguration","com.azure.resourcemanager.azurestackhci.models.DeviceKind":"Microsoft.AzureStackHCI.DeviceKind","com.azure.resourcemanager.azurestackhci.models.DeviceLogCollectionStatus":"Microsoft.AzureStackHCI.DeviceLogCollectionStatus","com.azure.resourcemanager.azurestackhci.models.DeviceState":"Microsoft.AzureStackHCI.DeviceState","com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel":"Microsoft.AzureStackHCI.DiagnosticLevel","com.azure.resourcemanager.azurestackhci.models.DnsServerConfig":"Microsoft.AzureStackHCI.DnsServerConfig","com.azure.resourcemanager.azurestackhci.models.DnsZones":"Microsoft.AzureStackHCI.DnsZones","com.azure.resourcemanager.azurestackhci.models.EceActionStatus":"Microsoft.AzureStackHCI.EceActionStatus","com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets":"Microsoft.AzureStackHCI.EceDeploymentSecrets","com.azure.resourcemanager.azurestackhci.models.EceReportedProperties":"Microsoft.AzureStackHCI.EceReportedProperties","com.azure.resourcemanager.azurestackhci.models.EceSecrets":"Microsoft.AzureStackHCI.EceSecrets","com.azure.resourcemanager.azurestackhci.models.EdgeDeviceDisks":"Microsoft.AzureStackHCI.EdgeDeviceDisks","com.azure.resourcemanager.azurestackhci.models.EdgeDeviceKind":"Microsoft.AzureStackHCI.EdgeDeviceKind","com.azure.resourcemanager.azurestackhci.models.EdgeDeviceProperties":"Microsoft.AzureStackHCI.EdgeDeviceProperties","com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState":"Microsoft.AzureStackHCI.ExtensionAggregateState","com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceView":"Microsoft.AzureStackHCI.ExtensionInstanceView","com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceViewStatus":"Microsoft.AzureStackHCI.ExtensionInstanceViewStatus","com.azure.resourcemanager.azurestackhci.models.ExtensionManagedBy":"Microsoft.AzureStackHCI.ExtensionManagedBy","com.azure.resourcemanager.azurestackhci.models.ExtensionPatch":"Microsoft.AzureStackHCI.ExtensionPatch","com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters":"Microsoft.AzureStackHCI.ExtensionPatchParameters","com.azure.resourcemanager.azurestackhci.models.ExtensionProfile":"Microsoft.AzureStackHCI.ExtensionProfile","com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters":"Microsoft.AzureStackHCI.ExtensionUpgradeParameters","com.azure.resourcemanager.azurestackhci.models.HardwareClass":"Microsoft.AzureStackHCI.HardwareClass","com.azure.resourcemanager.azurestackhci.models.HciCollectLogJobProperties":"Microsoft.AzureStackHCI.HciCollectLogJobProperties","com.azure.resourcemanager.azurestackhci.models.HciEdgeDevice":"Microsoft.AzureStackHCI.HciEdgeDevice","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceAdapterPropertyOverrides":"Microsoft.AzureStackHCI.HciEdgeDeviceAdapterPropertyOverrides","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceArcExtension":"Microsoft.AzureStackHCI.HciEdgeDeviceArcExtension","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceHostNetwork":"Microsoft.AzureStackHCI.HciEdgeDeviceHostNetwork","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceIntents":"Microsoft.AzureStackHCI.HciEdgeDeviceIntents","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJob":"Microsoft.AzureStackHCI.HciEdgeDeviceJob","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobProperties":"Microsoft.AzureStackHCI.HciEdgeDeviceJobProperties","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceJobType":"Microsoft.AzureStackHCI.HciEdgeDeviceJobType","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceProperties":"Microsoft.AzureStackHCI.HciEdgeDeviceProperties","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceStorageAdapterIpInfo":"Microsoft.AzureStackHCI.HciEdgeDeviceStorageAdapterIPInfo","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceStorageNetworks":"Microsoft.AzureStackHCI.HciEdgeDeviceStorageNetworks","com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceVirtualSwitchConfigurationOverrides":"Microsoft.AzureStackHCI.HciEdgeDeviceVirtualSwitchConfigurationOverrides","com.azure.resourcemanager.azurestackhci.models.HciHardwareProfile":"Microsoft.AzureStackHCI.HciHardwareProfile","com.azure.resourcemanager.azurestackhci.models.HciNetworkProfile":"Microsoft.AzureStackHCI.HciNetworkProfile","com.azure.resourcemanager.azurestackhci.models.HciNicDetail":"Microsoft.AzureStackHCI.HciNicDetail","com.azure.resourcemanager.azurestackhci.models.HciOsProfile":"Microsoft.AzureStackHCI.HciOsProfile","com.azure.resourcemanager.azurestackhci.models.HciRemoteSupportJobProperties":"Microsoft.AzureStackHCI.HciRemoteSupportJobProperties","com.azure.resourcemanager.azurestackhci.models.HciReportedProperties":"Microsoft.AzureStackHCI.HciReportedProperties","com.azure.resourcemanager.azurestackhci.models.HciStorageProfile":"Microsoft.AzureStackHCI.HciStorageProfile","com.azure.resourcemanager.azurestackhci.models.HciValidationFailureDetail":"Microsoft.AzureStackHCI.HciValidationFailureDetail","com.azure.resourcemanager.azurestackhci.models.HealthState":"Microsoft.AzureStackHCI.HealthState","com.azure.resourcemanager.azurestackhci.models.IdentityProvider":"Microsoft.AzureStackHCI.IdentityProvider","com.azure.resourcemanager.azurestackhci.models.ImdsAttestation":"Microsoft.AzureStackHCI.ImdsAttestation","com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork":"Microsoft.AzureStackHCI.InfrastructureNetwork","com.azure.resourcemanager.azurestackhci.models.IpPools":"Microsoft.AzureStackHCI.IpPools","com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration":"Microsoft.AzureStackHCI.IsolatedVmAttestationConfiguration","com.azure.resourcemanager.azurestackhci.models.JobStatus":"Microsoft.AzureStackHCI.JobStatus","com.azure.resourcemanager.azurestackhci.models.LocalAvailabilityZones":"Microsoft.AzureStackHCI.LocalAvailabilityZones","com.azure.resourcemanager.azurestackhci.models.LogCollectionError":"Microsoft.AzureStackHCI.LogCollectionError","com.azure.resourcemanager.azurestackhci.models.LogCollectionJobSession":"Microsoft.AzureStackHCI.LogCollectionJobSession","com.azure.resourcemanager.azurestackhci.models.LogCollectionJobType":"Microsoft.AzureStackHCI.LogCollectionJobType","com.azure.resourcemanager.azurestackhci.models.LogCollectionProperties":"Microsoft.AzureStackHCI.LogCollectionProperties","com.azure.resourcemanager.azurestackhci.models.LogCollectionReportedProperties":"Microsoft.AzureStackHCI.LogCollectionReportedProperties","com.azure.resourcemanager.azurestackhci.models.LogCollectionRequest":"Microsoft.AzureStackHCI.LogCollectionRequest","com.azure.resourcemanager.azurestackhci.models.LogCollectionRequestProperties":"Microsoft.AzureStackHCI.LogCollectionRequestProperties","com.azure.resourcemanager.azurestackhci.models.LogCollectionSession":"Microsoft.AzureStackHCI.LogCollectionSession","com.azure.resourcemanager.azurestackhci.models.LogCollectionStatus":"Microsoft.AzureStackHCI.LogCollectionStatus","com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.azurestackhci.models.NetworkController":"Microsoft.AzureStackHCI.NetworkController","com.azure.resourcemanager.azurestackhci.models.NextBillingModel":"Microsoft.AzureStackHCI.NextBillingModel","com.azure.resourcemanager.azurestackhci.models.NicDetail":"Microsoft.AzureStackHCI.NicDetail","com.azure.resourcemanager.azurestackhci.models.NodeArcState":"Microsoft.AzureStackHCI.NodeArcState","com.azure.resourcemanager.azurestackhci.models.NodeExtensionState":"Microsoft.AzureStackHCI.NodeExtensionState","com.azure.resourcemanager.azurestackhci.models.Observability":"Microsoft.AzureStackHCI.Observability","com.azure.resourcemanager.azurestackhci.models.OemActivation":"Microsoft.AzureStackHCI.OemActivation","com.azure.resourcemanager.azurestackhci.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.azurestackhci.models.OperationType":"Microsoft.AzureStackHCI.OperationType","com.azure.resourcemanager.azurestackhci.models.OptionalServices":"Microsoft.AzureStackHCI.OptionalServices","com.azure.resourcemanager.azurestackhci.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.azurestackhci.models.OverprovisioningRatio":"Microsoft.AzureStackHCI.OverprovisioningRatio","com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo":"Microsoft.AzureStackHCI.PackageVersionInfo","com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState":"Microsoft.AzureStackHCI.PerNodeExtensionState","com.azure.resourcemanager.azurestackhci.models.PerNodeRemoteSupportSession":"Microsoft.AzureStackHCI.PerNodeRemoteSupportSession","com.azure.resourcemanager.azurestackhci.models.PerNodeState":"Microsoft.AzureStackHCI.PerNodeState","com.azure.resourcemanager.azurestackhci.models.PhysicalNodes":"Microsoft.AzureStackHCI.PhysicalNodes","com.azure.resourcemanager.azurestackhci.models.PrecheckResult":"Microsoft.AzureStackHCI.PrecheckResult","com.azure.resourcemanager.azurestackhci.models.PrecheckResultTags":"Microsoft.AzureStackHCI.PrecheckResultTags","com.azure.resourcemanager.azurestackhci.models.ProvisioningState":"Microsoft.AzureStackHCI.ProvisioningState","com.azure.resourcemanager.azurestackhci.models.QosPolicyOverrides":"Microsoft.AzureStackHCI.QosPolicyOverrides","com.azure.resourcemanager.azurestackhci.models.RawCertificateData":"Microsoft.AzureStackHCI.RawCertificateData","com.azure.resourcemanager.azurestackhci.models.RdmaCapability":"Microsoft.AzureStackHCI.RdmaCapability","com.azure.resourcemanager.azurestackhci.models.RebootRequirement":"Microsoft.AzureStackHCI.RebootRequirement","com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequest":"Microsoft.AzureStackHCI.ReconcileArcSettingsRequest","com.azure.resourcemanager.azurestackhci.models.ReconcileArcSettingsRequestProperties":"Microsoft.AzureStackHCI.ReconcileArcSettingsRequestProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel":"Microsoft.AzureStackHCI.RemoteSupportAccessLevel","com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobNodeSettings":"Microsoft.AzureStackHCI.RemoteSupportJobNodeSettings","com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobReportedProperties":"Microsoft.AzureStackHCI.RemoteSupportJobReportedProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportNodeSettings":"Microsoft.AzureStackHCI.RemoteSupportNodeSettings","com.azure.resourcemanager.azurestackhci.models.RemoteSupportProperties":"Microsoft.AzureStackHCI.RemoteSupportProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportProvisioningState":"Microsoft.AzureStackHCI.RemoteSupportProvisioningState","com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequest":"Microsoft.AzureStackHCI.RemoteSupportRequest","com.azure.resourcemanager.azurestackhci.models.RemoteSupportRequestProperties":"Microsoft.AzureStackHCI.RemoteSupportRequestProperties","com.azure.resourcemanager.azurestackhci.models.RemoteSupportSession":"Microsoft.AzureStackHCI.RemoteSupportSession","com.azure.resourcemanager.azurestackhci.models.RemoteSupportType":"Microsoft.AzureStackHCI.RemoteSupportType","com.azure.resourcemanager.azurestackhci.models.ReportedProperties":"Microsoft.AzureStackHCI.ReportedProperties","com.azure.resourcemanager.azurestackhci.models.SanAdapterIPConfig":"Microsoft.AzureStackHCI.SanAdapterIPConfig","com.azure.resourcemanager.azurestackhci.models.SanAdapterProperties":"Microsoft.AzureStackHCI.SanAdapterProperties","com.azure.resourcemanager.azurestackhci.models.SanClusterNetworkConfig":"Microsoft.AzureStackHCI.SanClusterNetworkConfig","com.azure.resourcemanager.azurestackhci.models.SanNetworks":"Microsoft.AzureStackHCI.SanNetworks","com.azure.resourcemanager.azurestackhci.models.SbeCredentials":"Microsoft.AzureStackHCI.SbeCredentials","com.azure.resourcemanager.azurestackhci.models.SbeDeploymentInfo":"Microsoft.AzureStackHCI.SbeDeploymentInfo","com.azure.resourcemanager.azurestackhci.models.SbeDeploymentPackageInfo":"Microsoft.AzureStackHCI.SbeDeploymentPackageInfo","com.azure.resourcemanager.azurestackhci.models.SbePartnerInfo":"Microsoft.AzureStackHCI.SbePartnerInfo","com.azure.resourcemanager.azurestackhci.models.SbePartnerProperties":"Microsoft.AzureStackHCI.SbePartnerProperties","com.azure.resourcemanager.azurestackhci.models.ScaleUnits":"Microsoft.AzureStackHCI.ScaleUnits","com.azure.resourcemanager.azurestackhci.models.SdnIntegration":"Microsoft.AzureStackHCI.SdnIntegration","com.azure.resourcemanager.azurestackhci.models.SecretsLocationDetails":"Microsoft.AzureStackHCI.SecretsLocationDetails","com.azure.resourcemanager.azurestackhci.models.SecretsLocationsChangeRequest":"Microsoft.AzureStackHCI.SecretsLocationsChangeRequest","com.azure.resourcemanager.azurestackhci.models.SecretsType":"Microsoft.AzureStackHCI.SecretsType","com.azure.resourcemanager.azurestackhci.models.SecurityComplianceStatus":"Microsoft.AzureStackHCI.SecurityComplianceStatus","com.azure.resourcemanager.azurestackhci.models.ServiceConfiguration":"Microsoft.AzureStackHCI.ServiceConfiguration","com.azure.resourcemanager.azurestackhci.models.ServiceName":"Microsoft.AzureStackHCI.ServiceName","com.azure.resourcemanager.azurestackhci.models.Severity":"Microsoft.AzureStackHCI.Severity","com.azure.resourcemanager.azurestackhci.models.SkuMappings":"Microsoft.AzureStackHCI.SkuMappings","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest":"Microsoft.AzureStackHCI.SoftwareAssuranceChangeRequest","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequestProperties":"Microsoft.AzureStackHCI.SoftwareAssuranceChangeRequestProperties","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent":"Microsoft.AzureStackHCI.SoftwareAssuranceIntent","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties":"Microsoft.AzureStackHCI.SoftwareAssuranceProperties","com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceStatus":"Microsoft.AzureStackHCI.SoftwareAssuranceStatus","com.azure.resourcemanager.azurestackhci.models.State":"Microsoft.AzureStackHCI.State","com.azure.resourcemanager.azurestackhci.models.Status":"Microsoft.AzureStackHCI.Status","com.azure.resourcemanager.azurestackhci.models.StatusLevelTypes":"Microsoft.AzureStackHCI.StatusLevelTypes","com.azure.resourcemanager.azurestackhci.models.Storage":"Microsoft.AzureStackHCI.Storage","com.azure.resourcemanager.azurestackhci.models.StorageS2dConfig":"Microsoft.AzureStackHCI.StorageS2dConfig","com.azure.resourcemanager.azurestackhci.models.StorageSanConfig":"Microsoft.AzureStackHCI.StorageSanConfig","com.azure.resourcemanager.azurestackhci.models.StorageType":"Microsoft.AzureStackHCI.StorageType","com.azure.resourcemanager.azurestackhci.models.SwitchDetail":"Microsoft.AzureStackHCI.SwitchDetail","com.azure.resourcemanager.azurestackhci.models.SwitchExtension":"Microsoft.AzureStackHCI.SwitchExtension","com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite":"Microsoft.AzureStackHCI.UpdatePrerequisite","com.azure.resourcemanager.azurestackhci.models.UpdateRunPropertiesState":"Microsoft.AzureStackHCI.UpdateRunPropertiesState","com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState":"Microsoft.AzureStackHCI.UpdateSummariesPropertiesState","com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest":"Microsoft.AzureStackHCI.UploadCertificateRequest","com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.azurestackhci.models.ValidateRequest":"Microsoft.AzureStackHCI.ValidateRequest","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapabilities":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeCapabilities","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeCapability":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeCapability","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponent":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponent","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentMetadata":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponentMetadata","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeComponentPayload":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeComponentPayload","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeContent":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeContent","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeInfo":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeInfo","com.azure.resourcemanager.azurestackhci.models.ValidatedSolutionRecipeProperties":"Microsoft.AzureStackHCI.ValidatedSolutionRecipeProperties","com.azure.resourcemanager.azurestackhci.models.VolumeType":"Microsoft.AzureStackHCI.VolumeType","com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription":"Microsoft.AzureStackHCI.WindowsServerSubscription"},"generatedFiles":["src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciManagementClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDeviceJobsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationGroupsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ValidatedSolutionRecipesClient.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceJobInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidatedSolutionRecipeInner.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciManagementClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceJobsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationGroupsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipeImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesClientImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidatedSolutionRecipesImpl.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ArcSettingList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ClusterList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/DeploymentSettingListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceJobListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/EdgeDeviceListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ExtensionList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OfferList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SecuritySettingListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/SkuList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateRunList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/UpdateSummariesList.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/models/ValidatedSolutionRecipeListResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AccessLevel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcConnectivityProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcExtensionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AssemblyInfoPayload.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/CheckUpdatesRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterBillingProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPattern.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentCluster.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingAdapterPropertyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingHostNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingIntents.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageAdapterIpInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingStorageNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingVirtualSwitchConfigurationOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceKind.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceLogCollectionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsServerConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/DnsZones.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceActionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceDeploymentSecrets.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EceSecrets.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceDisks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceJobs.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceKind.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceViewStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionManagedBy.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareClass.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciCollectLogJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDevice.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceAdapterPropertyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceArcExtension.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceHostNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceIntents.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJob.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageAdapterIpInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceStorageNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciEdgeDeviceVirtualSwitchConfigurationOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciHardwareProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNetworkProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciNicDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciOsProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciRemoteSupportJobProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciStorageProfile.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HciValidationFailureDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/HealthState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IdentityProvider.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/JobStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LocalAvailabilityZones.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionError.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionJobType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/LogCollectionStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkController.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NextBillingModel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/OverprovisioningRatio.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeRemoteSupportSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RdmaCapability.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ReconcileArcSettingsRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportAccessLevel.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobNodeSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportJobReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportNodeSettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportProvisioningState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportSession.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/RemoteSupportType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SanAdapterIPConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SanAdapterProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SanClusterNetworkConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SanNetworks.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeCredentials.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbeDeploymentPackageInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SbePartnerProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SdnIntegration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationDetails.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsLocationsChangeRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecretsType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySetting.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceConfiguration.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ServiceName.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageS2dConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageSanConfig.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchDetail.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/SwitchExtension.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperationGroups.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipe.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapabilities.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeCapability.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentMetadata.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeComponentPayload.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeContent.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeInfo.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipeProperties.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidatedSolutionRecipes.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/VolumeType.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java","src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java","src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json index 986fcd40a033..bcedc245c40b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.azurestackhci.implementation.ArcSettingsClientImpl$ArcSettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.ClusterJobsClientImpl$ClusterJobsService"],["com.azure.resourcemanager.azurestackhci.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.azurestackhci.implementation.DeploymentSettingsClientImpl$DeploymentSettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeDeviceJobsClientImpl$EdgeDeviceJobsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeDevicesClientImpl$EdgeDevicesService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineDeploymentSettingsClientImpl$EdgeMachineDeploymentSettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineDiskJobsClientImpl$EdgeMachineDiskJobsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineDiskPrivilegedJobsClientImpl$EdgeMachineDiskPrivilegedJobsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineDisksClientImpl$EdgeMachineDisksService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineJobsClientImpl$EdgeMachineJobsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineNetworkAdapterJobsClientImpl$EdgeMachineNetworkAdapterJobsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineNetworkAdaptersClientImpl$EdgeMachineNetworkAdaptersService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineSecuritySettingsOperationsClientImpl$EdgeMachineSecuritySettingsOperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachineVolumesClientImpl$EdgeMachineVolumesService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeMachinesClientImpl$EdgeMachinesService"],["com.azure.resourcemanager.azurestackhci.implementation.ExtensionsClientImpl$ExtensionsService"],["com.azure.resourcemanager.azurestackhci.implementation.OffersClientImpl$OffersService"],["com.azure.resourcemanager.azurestackhci.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.OsImagesClientImpl$OsImagesService"],["com.azure.resourcemanager.azurestackhci.implementation.OwnershipVouchersClientImpl$OwnershipVouchersService"],["com.azure.resourcemanager.azurestackhci.implementation.SecuritySettingsClientImpl$SecuritySettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.SkusClientImpl$SkusService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateRunsClientImpl$UpdateRunsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateSummariesOperationGroupsClientImpl$UpdateSummariesOperationGroupsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateSummariesOperationsClientImpl$UpdateSummariesOperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdatesClientImpl$UpdatesService"],["com.azure.resourcemanager.azurestackhci.implementation.ValidatedSolutionRecipesClientImpl$ValidatedSolutionRecipesService"]] \ No newline at end of file +[["com.azure.resourcemanager.azurestackhci.implementation.ArcSettingsClientImpl$ArcSettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.azurestackhci.implementation.DeploymentSettingsClientImpl$DeploymentSettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeDeviceJobsClientImpl$EdgeDeviceJobsService"],["com.azure.resourcemanager.azurestackhci.implementation.EdgeDevicesClientImpl$EdgeDevicesService"],["com.azure.resourcemanager.azurestackhci.implementation.ExtensionsClientImpl$ExtensionsService"],["com.azure.resourcemanager.azurestackhci.implementation.OffersClientImpl$OffersService"],["com.azure.resourcemanager.azurestackhci.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.SecuritySettingsClientImpl$SecuritySettingsService"],["com.azure.resourcemanager.azurestackhci.implementation.SkusClientImpl$SkusService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateRunsClientImpl$UpdateRunsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateSummariesOperationGroupsClientImpl$UpdateSummariesOperationGroupsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdateSummariesOperationsClientImpl$UpdateSummariesOperationsService"],["com.azure.resourcemanager.azurestackhci.implementation.UpdatesClientImpl$UpdatesService"],["com.azure.resourcemanager.azurestackhci.implementation.ValidatedSolutionRecipesClientImpl$ValidatedSolutionRecipesService"]] \ No newline at end of file diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java index ba658b3c33ce..ff209b0440ec 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java @@ -9,7 +9,7 @@ */ public final class ArcSettingsConsentAndInstallDefaultExtensionsSamples { /* - * x-ms-original-file: 2026-10-01/ConsentAndInstallDefaultExtensions.json + * x-ms-original-file: 2026-04-30/ConsentAndInstallDefaultExtensions.json */ /** * Sample code: Consent And Install Default Extensions. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java index c02b3ac4fe74..6640e4a7c3ed 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java @@ -9,7 +9,7 @@ */ public final class ArcSettingsCreateIdentitySamples { /* - * x-ms-original-file: 2026-10-01/CreateArcIdentity.json + * x-ms-original-file: 2026-04-30/CreateArcIdentity.json */ /** * Sample code: Create Arc Identity. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java index 592a2a8bd598..955a1ff6fd42 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java @@ -9,7 +9,7 @@ */ public final class ArcSettingsCreateSamples { /* - * x-ms-original-file: 2026-10-01/PutArcSetting.json + * x-ms-original-file: 2026-04-30/PutArcSetting.json */ /** * Sample code: Create ArcSetting. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java index c8e98dc51089..81a4fad539c7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ArcSettingsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteArcSetting.json + * x-ms-original-file: 2026-04-30/DeleteArcSetting.json */ /** * Sample code: Delete ArcSetting. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java index cb987ae473a6..233fb108322d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java @@ -9,7 +9,7 @@ */ public final class ArcSettingsGeneratePasswordSamples { /* - * x-ms-original-file: 2026-10-01/GeneratePassword.json + * x-ms-original-file: 2026-04-30/GeneratePassword.json */ /** * Sample code: Generate Password. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java index 9c218f4f2e4c..df47de253908 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ArcSettingsGetSamples { /* - * x-ms-original-file: 2026-10-01/GetArcSetting.json + * x-ms-original-file: 2026-04-30/GetArcSetting.json */ /** * Sample code: Get ArcSetting. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java index 54660065471e..678770535285 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java @@ -9,7 +9,7 @@ */ public final class ArcSettingsInitializeDisableProcessSamples { /* - * x-ms-original-file: 2026-10-01/InitializeDisableProcess.json + * x-ms-original-file: 2026-04-30/InitializeDisableProcess.json */ /** * Sample code: Trigger ARC Disable. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java index e4597f73890a..dcd2aae43ec6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java @@ -9,7 +9,7 @@ */ public final class ArcSettingsListByClusterSamples { /* - * x-ms-original-file: 2026-10-01/ListArcSettingsByCluster.json + * x-ms-original-file: 2026-04-30/ListArcSettingsByCluster.json */ /** * Sample code: List ArcSetting resources by HCI Cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileSamples.java index 25242bf341d8..069c6c1d0821 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileSamples.java @@ -13,7 +13,7 @@ */ public final class ArcSettingsReconcileSamples { /* - * x-ms-original-file: 2026-10-01/reconcileArcSettings.json + * x-ms-original-file: 2026-04-30/reconcileArcSettings.json */ /** * Sample code: Reconcile Arc Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java index 14b010b0ec98..1648a7f061b8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class ArcSettingsUpdateSamples { /* - * x-ms-original-file: 2026-10-01/PatchArcSetting.json + * x-ms-original-file: 2026-04-30/PatchArcSetting.json */ /** * Sample code: Patch ArcSetting. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsCreateOrUpdateSamples.java deleted file mode 100644 index 97435faa6593..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.AddServerJobServerDetails; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets; -import com.azure.resourcemanager.azurestackhci.models.EceSecrets; -import com.azure.resourcemanager.azurestackhci.models.HciAddServerJobProperties; -import com.azure.resourcemanager.azurestackhci.models.HciConfigureSdnIntegrationJobProperties; -import com.azure.resourcemanager.azurestackhci.models.HciRepairServerJobProperties; -import com.azure.resourcemanager.azurestackhci.models.RepairServerJobServerDetails; -import com.azure.resourcemanager.azurestackhci.models.SdnIntegrationIntent; -import java.util.Arrays; - -/** - * Samples for ClusterJobs CreateOrUpdate. - */ -public final class ClusterJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_CreateOrUpdate_RepairServer.json - */ - /** - * Sample code: ClusterJobs_CreateOrUpdate_RepairServerJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsCreateOrUpdateRepairServerJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .define("repairserver") - .withExistingCluster("test-rg", "myCluster") - .withProperties(new HciRepairServerJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withRepairServerJobServerDetails(Arrays.asList(new RepairServerJobServerDetails() - .withServerName("Node-2") - .withServerResourceId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2"))) - .withSecrets(Arrays.asList( - new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.LOCAL_ADMIN_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder"), - new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.AZURE_STACK_LCMUSER_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder")))) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_CreateOrUpdate_ConfigureSdnIntegration_Enable.json - */ - /** - * Sample code: ClusterJobs_CreateOrUpdate_ConfigureSdnIntegration_Enable. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void clusterJobsCreateOrUpdateConfigureSdnIntegrationEnable( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .define("configureSdnIntegration") - .withExistingCluster("test-rg", "myCluster") - .withProperties(new HciConfigureSdnIntegrationJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withSdnIntegrationIntent(SdnIntegrationIntent.ENABLE)) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_CreateOrUpdate_AddServer.json - */ - /** - * Sample code: ClusterJobs_CreateOrUpdate_AddServerJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsCreateOrUpdateAddServerJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .define("addserver") - .withExistingCluster("test-rg", "myCluster") - .withProperties(new HciAddServerJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withAddServerJobServerDetails(Arrays.asList(new AddServerJobServerDetails().withServerName("Node-2") - .withHostIpv4Address("192.168.10.10") - .withServerResourceId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2"))) - .withSecrets(Arrays.asList( - new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.LOCAL_ADMIN_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder"), - new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.AZURE_STACK_LCMUSER_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder")))) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsDeleteSamples.java deleted file mode 100644 index 587ba0fb1d36..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for ClusterJobs Delete. - */ -public final class ClusterJobsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_Delete.json - */ - /** - * Sample code: ClusterJobs_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void clusterJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .delete("rghci", "3-Vz3LSRO5Q6q8EV-PKs8-5E", "configureSdnIntegration", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsGetSamples.java deleted file mode 100644 index c7737f705694..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsGetSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for ClusterJobs Get. - */ -public final class ClusterJobsGetSamples { - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_Get_AddServerJob.json - */ - /** - * Sample code: ClusterJobs_Get_AddServerJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsGetAddServerJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs().getWithResponse("test-rg", "myCluster", "addserver", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_Get_ConfigureSdnIntegrationJob.json - */ - /** - * Sample code: ClusterJobs_Get_ConfigureSdnIntegrationJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsGetConfigureSdnIntegrationJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs() - .getWithResponse("rghci", "Y-k0MG", "configureSdnIntegration", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_Get_RepairServerJob.json - */ - /** - * Sample code: ClusterJobs_Get_RepairServerJob. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - clusterJobsGetRepairServerJob(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs().getWithResponse("test-rg", "myCluster", "repairserver", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsListSamples.java deleted file mode 100644 index fc452edec074..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for ClusterJobs List. - */ -public final class ClusterJobsListSamples { - /* - * x-ms-original-file: 2026-10-01/ClusterJobs_List.json - */ - /** - * Sample code: ClusterJobs_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void clusterJobsList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.clusterJobs().list("rghci", "Ql40O4-I77S", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportSamples.java index f33a5c02fea7..dd3166bc4f0c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersConfigureRemoteSupportSamples.java @@ -14,7 +14,7 @@ */ public final class ClustersConfigureRemoteSupportSamples { /* - * x-ms-original-file: 2026-10-01/ConfigureRemoteSupport.json + * x-ms-original-file: 2026-04-30/ConfigureRemoteSupport.json */ /** * Sample code: Configure Remote Support. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java index e72d0c86fe2b..22115a224a50 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java @@ -9,7 +9,7 @@ */ public final class ClustersCreateIdentitySamples { /* - * x-ms-original-file: 2026-10-01/CreateClusterIdentity.json + * x-ms-original-file: 2026-04-30/CreateClusterIdentity.json */ /** * Sample code: Create cluster Identity. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java index f466323de2c2..a9e53a71cfae 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java @@ -11,7 +11,7 @@ */ public final class ClustersCreateSamples { /* - * x-ms-original-file: 2026-10-01/CreateCluster.json + * x-ms-original-file: 2026-04-30/CreateCluster.json */ /** * Sample code: Create cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java index b9f929a97eee..e18c131ea238 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteCluster.json + * x-ms-original-file: 2026-04-30/DeleteCluster.json */ /** * Sample code: Delete cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java index 43a946c7c45f..86ecef9b40fd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java @@ -13,7 +13,7 @@ */ public final class ClustersExtendSoftwareAssuranceBenefitSamples { /* - * x-ms-original-file: 2026-10-01/ExtendSoftwareAssuranceBenefit.json + * x-ms-original-file: 2026-04-30/ExtendSoftwareAssuranceBenefit.json */ /** * Sample code: Create cluster Identity. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java index 8f046c6f8a6c..4c001cf55b81 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-10-01/GetCluster.json + * x-ms-original-file: 2026-04-30/GetCluster.json */ /** * Sample code: Get cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java index 08ab46561809..70cb478a7477 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2026-10-01/ListClustersByResourceGroup.json + * x-ms-original-file: 2026-04-30/ListClustersByResourceGroup.json */ /** * Sample code: List clusters in a given resource group. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java index d1d1b193fa76..e0c7b7db1408 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java @@ -9,7 +9,7 @@ */ public final class ClustersListSamples { /* - * x-ms-original-file: 2026-10-01/ListClustersBySubscription.json + * x-ms-original-file: 2026-04-30/ListClustersBySubscription.json */ /** * Sample code: List clusters in a given subscription. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionSamples.java index b3702bdf56eb..e2bde5446eff 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersTriggerLogCollectionSamples.java @@ -13,7 +13,7 @@ */ public final class ClustersTriggerLogCollectionSamples { /* - * x-ms-original-file: 2026-10-01/TriggerLogCollection.json + * x-ms-original-file: 2026-04-30/TriggerLogCollection.json */ /** * Sample code: Trigger Log Collection. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java index f68e09790f7c..7bb79eaf84d7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: 2026-10-01/UpdateCluster.json + * x-ms-original-file: 2026-04-30/UpdateCluster.json */ /** * Sample code: Update cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSecretsLocationsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSecretsLocationsSamples.java index a64e1e01d631..8384494c3bc4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSecretsLocationsSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSecretsLocationsSamples.java @@ -14,7 +14,7 @@ */ public final class ClustersUpdateSecretsLocationsSamples { /* - * x-ms-original-file: 2026-10-01/Clusters_UpdateSecretsLocations.json + * x-ms-original-file: 2026-04-30/Clusters_UpdateSecretsLocations.json */ /** * Sample code: Update secrets locations for a Cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java index 60652f6f5c65..007a6976c7ab 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java @@ -13,7 +13,7 @@ */ public final class ClustersUploadCertificateSamples { /* - * x-ms-original-file: 2026-10-01/UploadCertificate.json + * x-ms-original-file: 2026-04-30/UploadCertificate.json */ /** * Sample code: Upload certificate. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java index 7739697cea09..bf33546f7872 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java @@ -52,7 +52,7 @@ */ public final class DeploymentSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-10-01/PutDeploymentSettings_StorageS2D.json + * x-ms-original-file: 2026-04-30/PutDeploymentSettings_StorageS2D.json */ /** * Sample code: Create Deployment Settings with S2D Storage. @@ -164,7 +164,7 @@ public final class DeploymentSettingsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-10-01/PutDeploymentSettingsWithADLess.json + * x-ms-original-file: 2026-04-30/PutDeploymentSettingsWithADLess.json */ /** * Sample code: Create Deployment Settings Without Active Directory Integration. @@ -293,7 +293,7 @@ public static void createDeploymentSettingsWithoutActiveDirectoryIntegration( } /* - * x-ms-original-file: 2026-10-01/PutDeploymentSettings.json + * x-ms-original-file: 2026-04-30/PutDeploymentSettings.json */ /** * Sample code: Create Deployment Settings. @@ -421,7 +421,7 @@ public static void createDeploymentSettings(com.azure.resourcemanager.azurestack } /* - * x-ms-original-file: 2026-10-01/PutDeploymentSettings_StorageSAN.json + * x-ms-original-file: 2026-04-30/PutDeploymentSettings_StorageSAN.json */ /** * Sample code: Create Deployment Settings with SAN Storage. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java index 0e76f0083ce1..a02ee0494164 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class DeploymentSettingsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteDeploymentSettings.json + * x-ms-original-file: 2026-04-30/DeleteDeploymentSettings.json */ /** * Sample code: Delete Deployment Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java index 78a4ae544859..8158395d954a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DeploymentSettingsGetSamples { /* - * x-ms-original-file: 2026-10-01/GetDeploymentSettings.json + * x-ms-original-file: 2026-04-30/GetDeploymentSettings.json */ /** * Sample code: Get Deployment Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java index cbface087517..79c2d517c5b5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java @@ -9,7 +9,7 @@ */ public final class DeploymentSettingsListByClustersSamples { /* - * x-ms-original-file: 2026-10-01/ListDeploymentSettingsByCluster.json + * x-ms-original-file: 2026-04-30/ListDeploymentSettingsByCluster.json */ /** * Sample code: List Deployment Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateSamples.java index ff7aec5c50e6..d4923bc1767d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class EdgeDeviceJobsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_CreateOrUpdate_RemoteSupport.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_CreateOrUpdate_RemoteSupport.json */ /** * Sample code: EdgeDeviceJobs_CreateOrUpdate_RemoteSupport. @@ -37,7 +37,7 @@ public static void edgeDeviceJobsCreateOrUpdateRemoteSupport( } /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_CreateOrUpdate_CollectLog.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_CreateOrUpdate_CollectLog.json */ /** * Sample code: EdgeDeviceJobs_CreateOrUpdate_CollectLog. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsDeleteSamples.java index 313638bad0da..827f4fbb6546 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class EdgeDeviceJobsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_Delete.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_Delete.json */ /** * Sample code: EdgeDeviceJobs_Delete. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetSamples.java index c2596c93feb0..6e8c2ad735f1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetSamples.java @@ -9,7 +9,7 @@ */ public final class EdgeDeviceJobsGetSamples { /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_Get_RemoteSupport.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_Get_RemoteSupport.json */ /** * Sample code: EdgeDeviceJobs_Get_RemoteSupport. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceSamples.java index 7cef41f549df..3eb3de71699f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceSamples.java @@ -9,7 +9,7 @@ */ public final class EdgeDeviceJobsListByEdgeDeviceSamples { /* - * x-ms-original-file: 2026-10-01/EdgeDeviceJobs_ListByEdgeDevice.json + * x-ms-original-file: 2026-04-30/EdgeDeviceJobs_ListByEdgeDevice.json */ /** * Sample code: EdgeDeviceJobs_ListByEdgeDevice. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java index 612991d676e3..07924ee2f07f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class EdgeDevicesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-10-01/CreateHciEdgeDevice.json + * x-ms-original-file: 2026-04-30/CreateHciEdgeDevice.json */ /** * Sample code: Create HCI Edge Device. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java index 6e7a32cacc4c..593c72a04105 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class EdgeDevicesDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteEdgeDevices.json + * x-ms-original-file: 2026-04-30/DeleteEdgeDevices.json */ /** * Sample code: Delete Edge Devices. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java index 53eb47f7ad6b..be399fb643bf 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java @@ -9,7 +9,7 @@ */ public final class EdgeDevicesGetSamples { /* - * x-ms-original-file: 2026-10-01/GetEdgeDevices.json + * x-ms-original-file: 2026-04-30/GetEdgeDevices.json */ /** * Sample code: Get Edge Device. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java index 8cca509d12d9..24655a5bd428 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java @@ -9,7 +9,7 @@ */ public final class EdgeDevicesListSamples { /* - * x-ms-original-file: 2026-10-01/ListEdgeDevices.json + * x-ms-original-file: 2026-04-30/ListEdgeDevices.json */ /** * Sample code: List Edge Devices. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java index 196f4c093e12..6b41991c406c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java @@ -12,7 +12,7 @@ */ public final class EdgeDevicesValidateSamples { /* - * x-ms-original-file: 2026-10-01/ValidateEdgeDevices.json + * x-ms-original-file: 2026-04-30/ValidateEdgeDevices.json */ /** * Sample code: Validate Edge Devices. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 2bb4124fc293..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.EceDeploymentSecrets; -import com.azure.resourcemanager.azurestackhci.models.EceSecrets; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentConfiguration; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSettingProperties; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineScaleUnits; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterIPConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterProperties; -import com.azure.resourcemanager.azurestackhci.models.IscsiChapSettings; -import com.azure.resourcemanager.azurestackhci.models.IscsiChapType; -import com.azure.resourcemanager.azurestackhci.models.IscsiConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiNetworkConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiTargetPortalAddress; -import com.azure.resourcemanager.azurestackhci.models.NodeStorageType; -import java.util.Arrays; - -/** - * Samples for EdgeMachineDeploymentSettings CreateOrUpdate. - */ -public final class EdgeMachineDeploymentSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDeploymentSettings_CreateOrUpdate.json - */ - /** - * Sample code: EdgeMachineDeploymentSettings_CreateOrUpdate. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDeploymentSettingsCreateOrUpdate( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDeploymentSettings() - .define("default") - .withExistingEdgeMachine("test-rg", "EdgeMachine01") - .withProperties( - new EdgeMachineDeploymentSettingProperties() - .withDeploymentConfiguration( - new EdgeMachineDeploymentConfiguration().withVersion("10.2.0.0") - .withScaleUnits(Arrays.asList(new EdgeMachineScaleUnits().withDeploymentData( - new EdgeMachineDeploymentData().withStorageType(NodeStorageType.SAN_ISCSI) - .withIScsiConfig(new IscsiConfig() - .withIScsiNetworkConfig(new IscsiNetworkConfig() - .withAdapterProperties(new IscsiAdapterProperties().withJumboPacket(9014)) - .withAdapterIPConfig(Arrays - .asList(new IscsiAdapterIPConfig().withNetworkAdapterName("iSCSI-A") - .withVlanId(401) - .withAddressPrefix("10.10.50.0/24") - .withTargetPortalAddresses(Arrays - .asList(new IscsiTargetPortalAddress().withIpAddress("10.0.0.1") - .withNextHop("10.10.50.1")))))) - .withChapSettings( - new IscsiChapSettings().withChapType(IscsiChapType.BIDIRECTIONAL)) - .withInitiatorIqn("iqn.2025-01.com.example:storage-target")) - .withSecrets( - Arrays.asList(new EceDeploymentSecrets().withSecretName("fakeTokenPlaceholder") - .withEceSecretName(EceSecrets.CHAP_CREDENTIAL) - .withSecretLocation("fakeTokenPlaceholder")))))))) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsDeleteSamples.java deleted file mode 100644 index 6b37857a9108..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDeploymentSettings Delete. - */ -public final class EdgeMachineDeploymentSettingsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDeploymentSettings_Delete.json - */ - /** - * Sample code: EdgeMachineDeploymentSettings_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineDeploymentSettingsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDeploymentSettings() - .delete("test-rg", "EdgeMachine01", "default", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsGetSamples.java deleted file mode 100644 index 58f2d96dbce9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDeploymentSettings Get. - */ -public final class EdgeMachineDeploymentSettingsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDeploymentSettings_Get.json - */ - /** - * Sample code: EdgeMachineDeploymentSettings_Get. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineDeploymentSettingsGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDeploymentSettings() - .getWithResponse("test-rg", "EdgeMachine01", "default", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsListByEdgeMachineSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsListByEdgeMachineSamples.java deleted file mode 100644 index 5a09ce5ec68e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsListByEdgeMachineSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDeploymentSettings ListByEdgeMachine. - */ -public final class EdgeMachineDeploymentSettingsListByEdgeMachineSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDeploymentSettings_ListByEdgeMachine.json - */ - /** - * Sample code: EdgeMachineDeploymentSettings_ListByEdgeMachine. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDeploymentSettingsListByEdgeMachine( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDeploymentSettings() - .listByEdgeMachine("test-rg", "EdgeMachine01", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsCreateOrUpdateSamples.java deleted file mode 100644 index 520d795f8cc7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.CreateVolumeJobProperties; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; - -/** - * Samples for EdgeMachineDiskJobs CreateOrUpdate. - */ -public final class EdgeMachineDiskJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskJobs_CreateOrUpdate_CreateVolume.json - */ - /** - * Sample code: EdgeMachineDiskJobs_CreateOrUpdate_CreateVolume. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDiskJobsCreateOrUpdateCreateVolume( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskJobs() - .define("CreateVolume") - .withExistingDisk("test-rg", "EdgeMachine01", "disk-001") - .withProperties(new CreateVolumeJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withSizeInBytes("107374182400") - .withPath("/data") - .withFileSystem(DiskFileSystemType.EXT4)) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsDeleteSamples.java deleted file mode 100644 index ef3ec399939e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDiskJobs Delete. - */ -public final class EdgeMachineDiskJobsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskJobs_Delete.json - */ - /** - * Sample code: EdgeMachineDiskJobs_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDiskJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskJobs() - .delete("test-rg", "EdgeMachine01", "disk-001", "CreateVolume", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsGetSamples.java deleted file mode 100644 index 2f0899f9be1b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDiskJobs Get. - */ -public final class EdgeMachineDiskJobsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskJobs_Get_CreateVolume.json - */ - /** - * Sample code: EdgeMachineDiskJobs_Get_CreateVolume. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineDiskJobsGetCreateVolume(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskJobs() - .getWithResponse("test-rg", "EdgeMachine01", "disk-001", "CreateVolume", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsListSamples.java deleted file mode 100644 index 227e7c64928a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskJobsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDiskJobs List. - */ -public final class EdgeMachineDiskJobsListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskJobs_List.json - */ - /** - * Sample code: EdgeMachineDiskJobs_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDiskJobsList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskJobs().list("test-rg", "EdgeMachine01", "disk-001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsCreateOrUpdateSamples.java deleted file mode 100644 index b5a41edd2a8c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.DeleteVolumeJobProperties; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; - -/** - * Samples for EdgeMachineDiskPrivilegedJobs CreateOrUpdate. - */ -public final class EdgeMachineDiskPrivilegedJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskPrivilegedJobs_CreateOrUpdate_DeleteVolume.json - */ - /** - * Sample code: EdgeMachineDiskPrivilegedJobs_CreateOrUpdate_DeleteVolume. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDiskPrivilegedJobsCreateOrUpdateDeleteVolume( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskPrivilegedJobs() - .define("DeleteVolume") - .withExistingDisk("test-rg", "EdgeMachine01", "disk-001") - .withProperties(new DeleteVolumeJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withVolumePath("/data") - .withConfirmDeletion(true)) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsDeleteSamples.java deleted file mode 100644 index 6c655e19ffc7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDiskPrivilegedJobs Delete. - */ -public final class EdgeMachineDiskPrivilegedJobsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskPrivilegedJobs_Delete.json - */ - /** - * Sample code: EdgeMachineDiskPrivilegedJobs_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineDiskPrivilegedJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskPrivilegedJobs() - .delete("test-rg", "EdgeMachine01", "disk-001", "DeleteVolume", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsGetSamples.java deleted file mode 100644 index 20fa0d080ed4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDiskPrivilegedJobs Get. - */ -public final class EdgeMachineDiskPrivilegedJobsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskPrivilegedJobs_Get_DeleteVolume.json - */ - /** - * Sample code: EdgeMachineDiskPrivilegedJobs_Get_DeleteVolume. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDiskPrivilegedJobsGetDeleteVolume( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskPrivilegedJobs() - .getWithResponse("test-rg", "EdgeMachine01", "disk-001", "DeleteVolume", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsListSamples.java deleted file mode 100644 index 8f74063bb6c8..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPrivilegedJobsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDiskPrivilegedJobs List. - */ -public final class EdgeMachineDiskPrivilegedJobsListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDiskPrivilegedJobs_List.json - */ - /** - * Sample code: EdgeMachineDiskPrivilegedJobs_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineDiskPrivilegedJobsList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDiskPrivilegedJobs() - .list("test-rg", "EdgeMachine01", "disk-001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksCreateOrUpdateSamples.java deleted file mode 100644 index fbdb4377f4f6..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksCreateOrUpdateSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.DiskConfiguration; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; -import com.azure.resourcemanager.azurestackhci.models.DiskVolumeConfiguration; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskProperties; -import java.util.Arrays; - -/** - * Samples for EdgeMachineDisks CreateOrUpdate. - */ -public final class EdgeMachineDisksCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDisks_CreateOrUpdate.json - */ - /** - * Sample code: EdgeMachineDisks_CreateOrUpdate. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineDisksCreateOrUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDisks() - .define("disk-001") - .withExistingEdgeMachine("test-rg", "EdgeMachine01") - .withProperties(new EdgeMachineDiskProperties().withDiskConfiguration(new DiskConfiguration() - .withVolumes(Arrays.asList(new DiskVolumeConfiguration().withSizeInBytes("107374182400") - .withPath("/data") - .withFileSystem(DiskFileSystemType.EXT4))))) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksDeleteSamples.java deleted file mode 100644 index 25cbefcea476..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDisks Delete. - */ -public final class EdgeMachineDisksDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDisks_Delete.json - */ - /** - * Sample code: EdgeMachineDisks_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDisksDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDisks().delete("test-rg", "EdgeMachine01", "disk-001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksGetSamples.java deleted file mode 100644 index 32fb7a1ffb9d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDisks Get. - */ -public final class EdgeMachineDisksGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDisks_Get.json - */ - /** - * Sample code: EdgeMachineDisks_Get. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDisksGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDisks() - .getWithResponse("test-rg", "EdgeMachine01", "disk-001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksListSamples.java deleted file mode 100644 index 24c8c0a5f866..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineDisks List. - */ -public final class EdgeMachineDisksListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineDisks_List.json - */ - /** - * Sample code: EdgeMachineDisks_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineDisksList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineDisks().list("test-rg", "EdgeMachine01", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsCreateOrUpdateSamples.java deleted file mode 100644 index 71a8466c1d7a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import com.azure.resourcemanager.azurestackhci.models.DownloadOsJobProperties; -import com.azure.resourcemanager.azurestackhci.models.DownloadOsProfile; -import com.azure.resourcemanager.azurestackhci.models.DownloadRequest; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineJobProperties; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportJobProperties; -import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; -import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; -import com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration; -import com.azure.resourcemanager.azurestackhci.models.OSOperationType; -import com.azure.resourcemanager.azurestackhci.models.OnboardingConfiguration; -import com.azure.resourcemanager.azurestackhci.models.OnboardingResourceType; -import com.azure.resourcemanager.azurestackhci.models.OsProvisionProfile; -import com.azure.resourcemanager.azurestackhci.models.ProvisionOsJobProperties; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningOsType; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningRequest; -import com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel; -import com.azure.resourcemanager.azurestackhci.models.RemoteSupportType; -import com.azure.resourcemanager.azurestackhci.models.SecretType; -import com.azure.resourcemanager.azurestackhci.models.StorageConfiguration; -import com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration; -import com.azure.resourcemanager.azurestackhci.models.TimeConfiguration; -import com.azure.resourcemanager.azurestackhci.models.UserDetails; -import com.azure.resourcemanager.azurestackhci.models.WebProxyConfiguration; -import java.time.OffsetDateTime; -import java.util.Arrays; - -/** - * Samples for EdgeMachineJobs CreateOrUpdate. - */ -public final class EdgeMachineJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_DownloadOs.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_DownloadOs. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsCreateOrUpdateDownloadOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("DownloadOs") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties(new DownloadOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withDownloadRequest(new DownloadRequest().withTarget(ProvisioningOsType.AZURE_LINUX) - .withOsProfile(new DownloadOsProfile().withOsName("AzureLinux") - .withOsType("AzureLinux") - .withOsVersion("3.0") - .withOsImageLocation("https://aka.ms/aep/azlinux3.0") - .withVsrVersion("1.0.0") - .withImageHash("sha256:a8b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1") - .withGpgPubKey("fakeTokenPlaceholder")))) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_ProvisionOs.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_ProvisionOs. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsCreateOrUpdateProvisionOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("ProvisionOs") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties(new ProvisionOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withProvisioningRequest(new ProvisioningRequest().withTarget(ProvisioningOsType.AZURE_LINUX) - .withOsProfile(new OsProvisionProfile().withOsName("AzureLinux") - .withOsType("AzureLinux") - .withOsVersion("3.0") - .withOsImageLocation("https://aka.ms/aep/azlinux3.0") - .withVsrVersion("1.0.0") - .withImageHash("sha256:a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456") - .withGpgPubKey("fakeTokenPlaceholder") - .withOperationType(OSOperationType.PROVISION)) - .withUserDetails(Arrays.asList(new UserDetails().withUserName("edgeuser") - .withSecretType(SecretType.KEY_VAULT) - .withSecretLocation("fakeTokenPlaceholder") - .withSshPubKey( - Arrays.asList("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7... edgeuser@example.com")))) - .withOnboardingConfiguration(new OnboardingConfiguration() - .withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) - .withResourceId( - "/subscriptions/ff0aa6da-20f8-44fe-9aee-381c8e8a4aeb/resourceGroups/bhukumar-test-rg/providers/Microsoft.HybridCompute/machines/bkumar-t1") - .withLocation("eastus") - .withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") - .withArcVirtualMachineId("634b9db8-83e1-46ed-b391-c1614e2d0097")) - .withDeviceConfiguration(new TargetDeviceConfiguration() - .withNetwork(new NetworkConfiguration().withNetworkAdapters( - Arrays.asList(new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) - .withIpAddress("") - .withIpAddressRange(new IpAddressRange().withStartIp("").withEndIp("")) - .withGateway("") - .withSubnetMask("") - .withDnsAddressArray(Arrays.asList("8.8.8.8")) - .withVlanId("0")))) - .withHostName("634b9db8-83e1-46ed-b391-c1614e2d0097") - .withWebProxy(new WebProxyConfiguration().withConnectionUri("https://microsoft.com/a") - .withPort("") - .withBypassList(Arrays.asList())) - .withTime(new TimeConfiguration().withPrimaryTimeServer("") - .withSecondaryTimeServer("") - .withTimeZone("UTC")) - .withStorage(new StorageConfiguration().withPartitionSize("30GB"))) - .withCustomConfiguration("eyJjdXN0b21Db25maWciOiAiZXhhbXBsZSBiYXNlNjQgZW5jb2RlZCBjb25maWcifQ=="))) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_UpdateOs.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_UpdateOs. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsCreateOrUpdateUpdateOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("UpdateOs") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties(new ProvisionOsJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withProvisioningRequest(new ProvisioningRequest().withTarget(ProvisioningOsType.AZURE_LINUX) - .withOsProfile(new OsProvisionProfile().withOsName("AzureLinux") - .withOsType("AzureLinux") - .withOsVersion("3.1") - .withOsImageLocation("https://aka.ms/aep/azlinux3.1") - .withVsrVersion("1.1.0") - .withImageHash("sha256:b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678") - .withGpgPubKey("fakeTokenPlaceholder") - .withOperationType(OSOperationType.UPDATE)) - .withUserDetails(Arrays.asList(new UserDetails().withUserName("edgeuser") - .withSecretType(SecretType.KEY_VAULT) - .withSecretLocation("fakeTokenPlaceholder") - .withSshPubKey( - Arrays.asList("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7... edgeuser@example.com")))) - .withOnboardingConfiguration(new OnboardingConfiguration() - .withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) - .withResourceId( - "/subscriptions/ff0aa6da-20f8-44fe-9aee-381c8e8a4aeb/resourceGroups/bhukumar-test-rg/providers/Microsoft.HybridCompute/machines/bkumar-t1") - .withLocation("eastus") - .withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") - .withArcVirtualMachineId("634b9db8-83e1-46ed-b391-c1614e2d0097")) - .withDeviceConfiguration(new TargetDeviceConfiguration() - .withNetwork(new NetworkConfiguration().withNetworkAdapters( - Arrays.asList(new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) - .withIpAddress("") - .withIpAddressRange(new IpAddressRange().withStartIp("").withEndIp("")) - .withGateway("") - .withSubnetMask("") - .withDnsAddressArray(Arrays.asList("8.8.8.8")) - .withVlanId("0")))) - .withHostName("634b9db8-83e1-46ed-b391-c1614e2d0097") - .withWebProxy(new WebProxyConfiguration().withConnectionUri("https://microsoft.com/a") - .withPort("") - .withBypassList(Arrays.asList())) - .withTime(new TimeConfiguration().withPrimaryTimeServer("") - .withSecondaryTimeServer("") - .withTimeZone("UTC"))) - .withCustomConfiguration("eyJjdXN0b21Db25maWciOiAiZXhhbXBsZSBiYXNlNjQgZW5jb2RlZCBjb25maWcifQ=="))) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_CollectLog.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_CollectLog. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsCreateOrUpdateCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("triggerLogCollection") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties(new EdgeMachineJobProperties().withDeploymentMode(DeploymentMode.VALIDATE)) - .create(); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_CreateOrUpdate_RemoteSupport.json - */ - /** - * Sample code: EdgeMachineJobs_CreateOrUpdate_RemoteSupport. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineJobsCreateOrUpdateRemoteSupport( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .define("RemoteSupport") - .withExistingEdgeMachine("ArcInstance-rg", "machine1") - .withProperties( - new EdgeMachineRemoteSupportJobProperties().withAccessLevel(RemoteSupportAccessLevel.DIAGNOSTICS) - .withExpirationTimestamp(OffsetDateTime.parse("2024-01-29T10:43:27.9471574Z")) - .withType(RemoteSupportType.ENABLE)) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsDeleteSamples.java deleted file mode 100644 index 25a6a0e0bfbe..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineJobs Delete. - */ -public final class EdgeMachineJobsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_Delete_MaximumSet_Gen.json - */ - /** - * Sample code: EdgeMachineJobs_Delete_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsDeleteMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .delete("ArcInstance-rg", "machine1", "triggerLogCollection", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsGetSamples.java deleted file mode 100644 index bda7add0594f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsGetSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineJobs Get. - */ -public final class EdgeMachineJobsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_Get_ProvisionOs.json - */ - /** - * Sample code: EdgeMachineJobs_Get_ProvisionOs. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsGetProvisionOs(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .getWithResponse("ArcInstance-rg", "machine1", "ProvisionOs", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_Get_CollectLog.json - */ - /** - * Sample code: EdgeMachineJobs_Get_CollectLog. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsGetCollectLog(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .getWithResponse("ArcInstance-rg", "machine1", "collectLog", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_Get_RemoteSupport.json - */ - /** - * Sample code: EdgeMachineJobs_Get_RemoteSupport. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsGetRemoteSupport(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs() - .getWithResponse("ArcInstance-rg", "machine1", "RemoteSupport", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsListSamples.java deleted file mode 100644 index a8e8f9b5cc7e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineJobsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineJobs List. - */ -public final class EdgeMachineJobsListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineJobs_List_MaximumSet_Gen.json - */ - /** - * Sample code: EdgeMachineJobs_List_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineJobsListMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineJobs().list("ArcInstance-rg", "machine1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsCreateOrUpdateSamples.java deleted file mode 100644 index f6db1144e6a2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.ApplyConfigurationNetworkAdapterJobProperties; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import com.azure.resourcemanager.azurestackhci.models.InterfaceState; -import com.azure.resourcemanager.azurestackhci.models.IpInterfaceType; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapterConfiguration; -import java.util.Arrays; - -/** - * Samples for EdgeMachineNetworkAdapterJobs CreateOrUpdate. - */ -public final class EdgeMachineNetworkAdapterJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapterJobs_CreateOrUpdate_ApplyConfiguration.json - */ - /** - * Sample code: EdgeMachineNetworkAdapterJobs_CreateOrUpdate_ApplyConfiguration. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineNetworkAdapterJobsCreateOrUpdateApplyConfiguration( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapterJobs() - .define("ApplyConfiguration") - .withExistingNetworkAdapter("test-rg", "EdgeMachine01", "ethernet0") - .withProperties( - new ApplyConfigurationNetworkAdapterJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) - .withTargetConfiguration(new NetworkAdapterConfiguration().withAdapterName("ethernet0") - .withIp4Address("192.168.1.100") - .withSubnetMask("255.255.255.0") - .withDefaultGateway("192.168.1.1") - .withDnsServers(Arrays.asList("8.8.8.8", "8.8.4.4")) - .withIpInterfaceType(IpInterfaceType.STATIC) - .withVlanId(100) - .withInterfaceState(InterfaceState.UP))) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsDeleteSamples.java deleted file mode 100644 index 510a401f4b24..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineNetworkAdapterJobs Delete. - */ -public final class EdgeMachineNetworkAdapterJobsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapterJobs_Delete.json - */ - /** - * Sample code: EdgeMachineNetworkAdapterJobs_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdapterJobsDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapterJobs() - .delete("test-rg", "EdgeMachine01", "ethernet0", "ApplyConfiguration", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsGetSamples.java deleted file mode 100644 index a2e86646ee14..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineNetworkAdapterJobs Get. - */ -public final class EdgeMachineNetworkAdapterJobsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapterJobs_Get.json - */ - /** - * Sample code: EdgeMachineNetworkAdapterJobs_Get. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdapterJobsGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapterJobs() - .getWithResponse("test-rg", "EdgeMachine01", "ethernet0", "ApplyConfiguration", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsListSamples.java deleted file mode 100644 index 04df38582347..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdapterJobsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineNetworkAdapterJobs List. - */ -public final class EdgeMachineNetworkAdapterJobsListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapterJobs_List.json - */ - /** - * Sample code: EdgeMachineNetworkAdapterJobs_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdapterJobsList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapterJobs() - .list("test-rg", "EdgeMachine01", "ethernet0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdaptersGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdaptersGetSamples.java deleted file mode 100644 index 027da8ad56d1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdaptersGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineNetworkAdapters Get. - */ -public final class EdgeMachineNetworkAdaptersGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapters_Get.json - */ - /** - * Sample code: EdgeMachineNetworkAdapters_Get. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdaptersGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapters() - .getWithResponse("test-rg", "EdgeMachine01", "ethernet0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdaptersListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdaptersListSamples.java deleted file mode 100644 index 7ed8b9df6c5f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkAdaptersListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineNetworkAdapters List. - */ -public final class EdgeMachineNetworkAdaptersListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineNetworkAdapters_List.json - */ - /** - * Sample code: EdgeMachineNetworkAdapters_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineNetworkAdaptersList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineNetworkAdapters().list("test-rg", "EdgeMachine01", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsCreateOrUpdateSamples.java deleted file mode 100644 index b69c5afa161b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityProperties; - -/** - * Samples for EdgeMachineSecuritySettingsOperations CreateOrUpdate. - */ -public final class EdgeMachineSecuritySettingsOperationsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineSecuritySettingsOperations_CreateOrUpdate.json - */ - /** - * Sample code: Create or update edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void createOrUpdateEdgeMachineSecuritySettings( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineSecuritySettingsOperations() - .define("default") - .withExistingEdgeMachine("test-rg", "testEdgeMachine") - .withProperties(new EdgeMachineSecurityProperties()) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsDeleteSamples.java deleted file mode 100644 index 9f33f2608e04..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineSecuritySettingsOperations Delete. - */ -public final class EdgeMachineSecuritySettingsOperationsDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineSecuritySettingsOperations_Delete.json - */ - /** - * Sample code: Delete edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - deleteEdgeMachineSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineSecuritySettingsOperations() - .delete("test-rg", "testEdgeMachine", "default", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsGetSamples.java deleted file mode 100644 index 64619b0d065c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineSecuritySettingsOperations Get. - */ -public final class EdgeMachineSecuritySettingsOperationsGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineSecuritySettingsOperations_Get.json - */ - /** - * Sample code: Get edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - getEdgeMachineSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineSecuritySettingsOperations() - .getWithResponse("test-rg", "testEdgeMachine", "default", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsListByEdgeMachineSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsListByEdgeMachineSamples.java deleted file mode 100644 index 4e9f7614d2b4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsListByEdgeMachineSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineSecuritySettingsOperations ListByEdgeMachine. - */ -public final class EdgeMachineSecuritySettingsOperationsListByEdgeMachineSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineSecuritySettingsOperations_ListByEdgeMachine.json - */ - /** - * Sample code: List edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - listEdgeMachineSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineSecuritySettingsOperations() - .listByEdgeMachine("test-rg", "testEdgeMachine", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesCreateOrUpdateSamples.java deleted file mode 100644 index a7418411db7b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesCreateOrUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumeProperties; -import com.azure.resourcemanager.azurestackhci.models.VolumeConfiguration; - -/** - * Samples for EdgeMachineVolumes CreateOrUpdate. - */ -public final class EdgeMachineVolumesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineVolumes_CreateOrUpdate.json - */ - /** - * Sample code: EdgeMachineVolumes_CreateOrUpdate. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachineVolumesCreateOrUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineVolumes() - .define("vol-001") - .withExistingEdgeMachine("test-rg", "EdgeMachine01") - .withProperties( - new EdgeMachineVolumeProperties().withVolumeConfiguration(new VolumeConfiguration().withReserved(""))) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesDeleteSamples.java deleted file mode 100644 index cc5104cc69ad..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineVolumes Delete. - */ -public final class EdgeMachineVolumesDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineVolumes_Delete.json - */ - /** - * Sample code: EdgeMachineVolumes_Delete. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineVolumesDelete(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineVolumes().delete("test-rg", "EdgeMachine01", "vol-001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesGetSamples.java deleted file mode 100644 index 5bc8be3e98a1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineVolumes Get. - */ -public final class EdgeMachineVolumesGetSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineVolumes_Get.json - */ - /** - * Sample code: EdgeMachineVolumes_Get. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineVolumesGet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineVolumes() - .getWithResponse("test-rg", "EdgeMachine01", "vol-001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesListSamples.java deleted file mode 100644 index 899ed52f1ee4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachineVolumes List. - */ -public final class EdgeMachineVolumesListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachineVolumes_List.json - */ - /** - * Sample code: EdgeMachineVolumes_List. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachineVolumesList(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachineVolumes().list("test-rg", "EdgeMachine01", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesCreateOrUpdateSamples.java deleted file mode 100644 index f328fa327750..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineProperties; - -/** - * Samples for EdgeMachines CreateOrUpdate. - */ -public final class EdgeMachinesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_CreateOrUpdate.json - */ - /** - * Sample code: EdgeMachines_CreateOrUpdate. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachinesCreateOrUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines() - .define("machine-1") - .withRegion("eastus") - .withExistingResourceGroup("ArcInstance-rg") - .withProperties(new EdgeMachineProperties() - .withArcMachineResourceGroupId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg") - .withArcMachineResourceId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1")) - .create(); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesDeleteSamples.java deleted file mode 100644 index ad73dc781860..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachines Delete. - */ -public final class EdgeMachinesDeleteSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_Delete.json - */ - /** - * Sample code: EdgeMachines_Delete_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - edgeMachinesDeleteMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().delete("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesGetByResourceGroupSamples.java deleted file mode 100644 index 5889abd79472..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesGetByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachines GetByResourceGroup. - */ -public final class EdgeMachinesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_Get.json - */ - /** - * Sample code: EdgeMachines_Get_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachinesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines() - .getByResourceGroupWithResponse("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListByResourceGroupSamples.java deleted file mode 100644 index 52f4a21b73eb..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachines ListByResourceGroup. - */ -public final class EdgeMachinesListByResourceGroupSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_ListByResourceGroup.json - */ - /** - * Sample code: List edge machines in a given resource group. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - listEdgeMachinesInAGivenResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().listByResourceGroup("ArcInstance-rg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListSamples.java deleted file mode 100644 index e8d774633118..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachines List. - */ -public final class EdgeMachinesListSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_ListBySubscription.json - */ - /** - * Sample code: List edge machines in a given subscription. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - listEdgeMachinesInAGivenSubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesRefreshApplicableUpdatesSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesRefreshApplicableUpdatesSamples.java deleted file mode 100644 index 49635b6ebaec..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesRefreshApplicableUpdatesSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachines RefreshApplicableUpdates. - */ -public final class EdgeMachinesRefreshApplicableUpdatesSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_RefreshApplicableUpdates.json - */ - /** - * Sample code: Refresh edge machine applicable updates. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - refreshEdgeMachineApplicableUpdates(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().refreshApplicableUpdates("test-rg", "testEdgeMachine", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesRefreshSecuritySettingsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesRefreshSecuritySettingsSamples.java deleted file mode 100644 index c969c4ebbb51..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesRefreshSecuritySettingsSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for EdgeMachines RefreshSecuritySettings. - */ -public final class EdgeMachinesRefreshSecuritySettingsSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_RefreshSecuritySettings.json - */ - /** - * Sample code: Refresh edge machine security settings. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void - refreshEdgeMachineSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines().refreshSecuritySettings("test-rg", "testEdgeMachine", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesUpdateSamples.java deleted file mode 100644 index 1e4feabb393a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesUpdateSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.EdgeMachine; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for EdgeMachines Update. - */ -public final class EdgeMachinesUpdateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_Update.json - */ - /** - * Sample code: EdgeMachines_Update. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachinesUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - EdgeMachine resource = manager.edgeMachines() - .getByResourceGroupWithResponse("ArcInstance-rg", "machine-1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key2335", "fakeTokenPlaceholder")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesValidateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesValidateSamples.java deleted file mode 100644 index 072f9c0bbdc0..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesValidateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateRequest; -import java.util.Arrays; - -/** - * Samples for EdgeMachines Validate. - */ -public final class EdgeMachinesValidateSamples { - /* - * x-ms-original-file: 2026-10-01/EdgeMachines_Validate.json - */ - /** - * Sample code: EdgeMachines_Validate. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void edgeMachinesValidate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.edgeMachines() - .validate("ArcInstance-rg", "machine-1", new EdgeMachineValidateRequest().withEdgeMachineIds(Arrays.asList( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.AzureStackHCI/edgeMachines/machine-2", - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.AzureStackHCI/edgeMachines/machine-3")) - .withAdditionalInfo("Validate before cluster creation"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java index 9c7de2bdac3a..406b8d302a9b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java @@ -13,7 +13,7 @@ */ public final class ExtensionsCreateSamples { /* - * x-ms-original-file: 2026-10-01/PutExtension.json + * x-ms-original-file: 2026-04-30/PutExtension.json */ /** * Sample code: Create Arc Extension. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java index 0c299bdebdad..35fdbbc69a96 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteExtension.json + * x-ms-original-file: 2026-04-30/DeleteExtension.json */ /** * Sample code: Delete Arc Extension. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java index 61338edb9ac9..698d43bf8ec2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ExtensionsGetSamples { /* - * x-ms-original-file: 2026-10-01/GetExtension.json + * x-ms-original-file: 2026-04-30/GetExtension.json */ /** * Sample code: Get ArcSettings Extension. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java index 1e3cfe0b1b19..96b55622eef7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java @@ -9,7 +9,7 @@ */ public final class ExtensionsListByArcSettingSamples { /* - * x-ms-original-file: 2026-10-01/ListExtensionsByArcSetting.json + * x-ms-original-file: 2026-04-30/ListExtensionsByArcSetting.json */ /** * Sample code: List Extensions under ArcSetting resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java index d2d3ed8a65e8..4b893696d070 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class ExtensionsUpdateSamples { /* - * x-ms-original-file: 2026-10-01/PatchExtension.json + * x-ms-original-file: 2026-04-30/PatchExtension.json */ /** * Sample code: Update Arc Extension. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java index 1915069bc410..37bd94491486 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java @@ -11,7 +11,7 @@ */ public final class ExtensionsUpgradeSamples { /* - * x-ms-original-file: 2026-10-01/Extensions_Upgrade.json + * x-ms-original-file: 2026-04-30/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java index 93561cd577af..b5fb7e5c343f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java @@ -9,7 +9,7 @@ */ public final class OffersGetSamples { /* - * x-ms-original-file: 2026-10-01/GetOffer.json + * x-ms-original-file: 2026-04-30/GetOffer.json */ /** * Sample code: Get Offer. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java index 2eca0fd84c2a..e0463fc8c188 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java @@ -9,7 +9,7 @@ */ public final class OffersListByClusterSamples { /* - * x-ms-original-file: 2026-10-01/ListOffersByCluster.json + * x-ms-original-file: 2026-04-30/ListOffersByCluster.json */ /** * Sample code: List Offer resources by HCI Cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java index afe9ee027265..6a802f3452d3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java @@ -9,7 +9,7 @@ */ public final class OffersListByPublisherSamples { /* - * x-ms-original-file: 2026-10-01/ListOffersByPublisher.json + * x-ms-original-file: 2026-04-30/ListOffersByPublisher.json */ /** * Sample code: List Offer resources by publisher for the HCI Cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java index 40ca74bd09d3..74621e5b5f44 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-10-01/Operations_List.json + * x-ms-original-file: 2026-04-30/Operations_List.json */ /** * Sample code: List the operations for the provider. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetSamples.java deleted file mode 100644 index 94090e8b10a6..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for OsImages Get. - */ -public final class OsImagesGetSamples { - /* - * x-ms-original-file: 2026-10-01/OsImages_Get_MaximumSet_Gen.json - */ - /** - * Sample code: OsImages_Get_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void osImagesGetMaximumSet(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.osImages().getWithResponse("arowdcr", "10.2408.0.1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceSamples.java deleted file mode 100644 index 6d0603dd1eb2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -/** - * Samples for OsImages ListBySubscriptionLocationResource. - */ -public final class OsImagesListBySubscriptionLocationResourceSamples { - /* - * x-ms-original-file: 2026-10-01/OsImages_ListBySubscriptionLocationResource_MaximumSet_Gen.json - */ - /** - * Sample code: OsImages_ListBySubscriptionLocationResource_MaximumSet. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void osImagesListBySubscriptionLocationResourceMaximumSet( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.osImages().listBySubscriptionLocationResource("westus2", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OwnershipVouchersValidateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OwnershipVouchersValidateSamples.java deleted file mode 100644 index 5090391156fd..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OwnershipVouchersValidateSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.resourcemanager.azurestackhci.models.OwnerKeyType; -import com.azure.resourcemanager.azurestackhci.models.OwnershipVoucherDetails; -import com.azure.resourcemanager.azurestackhci.models.ValidateOwnershipVouchersRequest; -import java.util.Arrays; - -/** - * Samples for OwnershipVouchers Validate. - */ -public final class OwnershipVouchersValidateSamples { - /* - * x-ms-original-file: 2026-10-01/ValidateOwnershipVouchers_ByResourceGroup.json - */ - /** - * Sample code: Validate ownership vouchers in a given resource group. - * - * @param manager Entry point to AzureStackHciManager. - */ - public static void validateOwnershipVouchersInAGivenResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.ownershipVouchers() - .validateWithResponse("ArcInstance-rg", "westus", - new ValidateOwnershipVouchersRequest().withOwnershipVoucherDetails( - Arrays.asList(new OwnershipVoucherDetails().withOwnershipVoucher("Device Model Ownership content") - .withOwnerKeyType(OwnerKeyType.MICROSOFT_MANAGED))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java index d7ae71b0dc07..b999a77589bb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class SecuritySettingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-10-01/PutSecuritySettings.json + * x-ms-original-file: 2026-04-30/PutSecuritySettings.json */ /** * Sample code: Create Security Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java index 7e689c5b52be..45548697b5f5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SecuritySettingsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteSecuritySettings.json + * x-ms-original-file: 2026-04-30/DeleteSecuritySettings.json */ /** * Sample code: Delete Security Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java index f0f284d0586b..080b290ad17b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java @@ -9,7 +9,7 @@ */ public final class SecuritySettingsGetSamples { /* - * x-ms-original-file: 2026-10-01/GetSecuritySettings.json + * x-ms-original-file: 2026-04-30/GetSecuritySettings.json */ /** * Sample code: Get Security Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java index 986f86ab162e..fb9a34a4dab6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java @@ -9,7 +9,7 @@ */ public final class SecuritySettingsListByClustersSamples { /* - * x-ms-original-file: 2026-10-01/ListSecuritySettingsByCluster.json + * x-ms-original-file: 2026-04-30/ListSecuritySettingsByCluster.json */ /** * Sample code: List Security Settings. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java index 95b28209823d..d39518f5f986 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java @@ -9,7 +9,7 @@ */ public final class SkusGetSamples { /* - * x-ms-original-file: 2026-10-01/GetSku.json + * x-ms-original-file: 2026-04-30/GetSku.json */ /** * Sample code: Get Sku. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java index a532e1246bb5..a185cd0295ce 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java @@ -9,7 +9,7 @@ */ public final class SkusListByOfferSamples { /* - * x-ms-original-file: 2026-10-01/ListSkusByOffer.json + * x-ms-original-file: 2026-04-30/ListSkusByOffer.json */ /** * Sample code: List SKU resources by offer for the HCI Cluster. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java index f87695c89089..4ab8d5cc5b74 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteUpdateRuns.json + * x-ms-original-file: 2026-04-30/DeleteUpdateRuns.json */ /** * Sample code: Delete an Update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java index 0c73d91f0163..35ce330a9c68 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: 2026-10-01/GetUpdateRuns.json + * x-ms-original-file: 2026-04-30/GetUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java index a2b0b268f38e..59c8992e4d8d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateRunsListSamples { /* - * x-ms-original-file: 2026-10-01/ListUpdateRuns.json + * x-ms-original-file: 2026-04-30/ListUpdateRuns.json */ /** * Sample code: List Update runs under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java index dfb752c43abb..2d2381b151c9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java @@ -14,7 +14,7 @@ */ public final class UpdateRunsPutSamples { /* - * x-ms-original-file: 2026-10-01/PutUpdateRuns.json + * x-ms-original-file: 2026-04-30/PutUpdateRuns.json */ /** * Sample code: Get Update runs under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java index 4c9c43b9abf9..3ab9b6df3176 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateSummariesOperationDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteUpdateSummaries.json + * x-ms-original-file: 2026-04-30/DeleteUpdateSummaries.json */ /** * Sample code: Delete an Update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java index 380d64eb80a9..9fa95fee7010 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateSummariesOperationGetSamples { /* - * x-ms-original-file: 2026-10-01/GetUpdateSummaries.json + * x-ms-original-file: 2026-04-30/GetUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGroupCheckHealthSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGroupCheckHealthSamples.java index b7fcc4199527..62241045025a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGroupCheckHealthSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGroupCheckHealthSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateSummariesOperationGroupCheckHealthSamples { /* - * x-ms-original-file: 2026-10-01/UpdateSummaries_CheckHealth.json + * x-ms-original-file: 2026-04-30/UpdateSummaries_CheckHealth.json */ /** * Sample code: Check health of UpdateSummaries. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGroupCheckUpdatesSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGroupCheckUpdatesSamples.java index 52d53f1125f7..445ca73bbda3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGroupCheckUpdatesSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGroupCheckUpdatesSamples.java @@ -11,7 +11,7 @@ */ public final class UpdateSummariesOperationGroupCheckUpdatesSamples { /* - * x-ms-original-file: 2026-10-01/UpdateSummaries_CheckUpdates.json + * x-ms-original-file: 2026-04-30/UpdateSummaries_CheckUpdates.json */ /** * Sample code: Check for updates. @@ -24,7 +24,7 @@ public static void checkForUpdates(com.azure.resourcemanager.azurestackhci.Azure } /* - * x-ms-original-file: 2026-10-01/UpdateSummaries_CheckUpdates_MaximumSet.json + * x-ms-original-file: 2026-04-30/UpdateSummaries_CheckUpdates_MaximumSet.json */ /** * Sample code: Check for specific update by name. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java index dc9c963fd302..9549b3dfd95f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java @@ -9,7 +9,7 @@ */ public final class UpdateSummariesOperationListSamples { /* - * x-ms-original-file: 2026-10-01/ListUpdateSummaries.json + * x-ms-original-file: 2026-04-30/ListUpdateSummaries.json */ /** * Sample code: Get Update summaries under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java index 2065e2b776c8..b64935b26dcc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java @@ -13,7 +13,7 @@ */ public final class UpdateSummariesOperationPutSamples { /* - * x-ms-original-file: 2026-10-01/PutUpdateSummaries.json + * x-ms-original-file: 2026-04-30/PutUpdateSummaries.json */ /** * Sample code: Put Update summaries under cluster resource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java index a1856c3a396a..cbcd6dc43274 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class UpdatesDeleteSamples { /* - * x-ms-original-file: 2026-10-01/DeleteUpdates.json + * x-ms-original-file: 2026-04-30/DeleteUpdates.json */ /** * Sample code: Delete an Update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java index d11034531da6..4e8f74128b01 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java @@ -9,7 +9,7 @@ */ public final class UpdatesGetSamples { /* - * x-ms-original-file: 2026-10-01/GetUpdates.json + * x-ms-original-file: 2026-04-30/GetUpdates.json */ /** * Sample code: Get a specific update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java index 770323379d6a..36399e67da27 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java @@ -9,7 +9,7 @@ */ public final class UpdatesListSamples { /* - * x-ms-original-file: 2026-10-01/ListUpdates.json + * x-ms-original-file: 2026-04-30/ListUpdates.json */ /** * Sample code: List available updates. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java index f4dd11421d0a..68f4884684d5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java @@ -9,7 +9,7 @@ */ public final class UpdatesPostSamples { /* - * x-ms-original-file: 2026-10-01/PostUpdates.json + * x-ms-original-file: 2026-04-30/PostUpdates.json */ /** * Sample code: List available updates. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPrepareSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPrepareSamples.java index eebaf73eab60..87b4532e7396 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPrepareSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPrepareSamples.java @@ -9,7 +9,7 @@ */ public final class UpdatesPrepareSamples { /* - * x-ms-original-file: 2026-10-01/Updates_Prepare.json + * x-ms-original-file: 2026-04-30/Updates_Prepare.json */ /** * Sample code: Prepare Update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java index 35e7710c5e9d..a8a7385a026c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java @@ -16,7 +16,7 @@ */ public final class UpdatesPutSamples { /* - * x-ms-original-file: 2026-10-01/PutUpdates.json + * x-ms-original-file: 2026-04-30/PutUpdates.json */ /** * Sample code: Put a specific update. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetSamples.java index 17ed0a626342..8956fb9ae2e1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ValidatedSolutionRecipesGetSamples { /* - * x-ms-original-file: 2026-10-01/ValidatedSolutionRecipes_Get.json + * x-ms-original-file: 2026-04-30/ValidatedSolutionRecipes_Get.json */ /** * Sample code: ValidatedSolutionRecipes_Get. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples.java index b24f7777c402..abfc9844750b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples.java @@ -9,7 +9,7 @@ */ public final class ValidatedSolutionRecipesListBySubscriptionLocationResourceSamples { /* - * x-ms-original-file: 2026-10-01/ValidatedSolutionRecipes_ListBySubscriptionLocationResource.json + * x-ms-original-file: 2026-04-30/ValidatedSolutionRecipes_ListBySubscriptionLocationResource.json */ /** * Sample code: ValidatedSolutionRecipes_ListBySubscriptionLocationResource. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AddServerJobServerDetailsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AddServerJobServerDetailsTests.java deleted file mode 100644 index e3130af0ad30..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AddServerJobServerDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.AddServerJobServerDetails; -import org.junit.jupiter.api.Assertions; - -public final class AddServerJobServerDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddServerJobServerDetails model = BinaryData.fromString( - "{\"serverName\":\"bulnvgskjtoxjdz\",\"hostIpv4Address\":\"sjznvhx\",\"localAvailabilityZoneName\":\"mqipaydhfnzo\",\"serverResourceId\":\"xmtf\"}") - .toObject(AddServerJobServerDetails.class); - Assertions.assertEquals("bulnvgskjtoxjdz", model.serverName()); - Assertions.assertEquals("sjznvhx", model.hostIpv4Address()); - Assertions.assertEquals("mqipaydhfnzo", model.localAvailabilityZoneName()); - Assertions.assertEquals("xmtf", model.serverResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddServerJobServerDetails model = new AddServerJobServerDetails().withServerName("bulnvgskjtoxjdz") - .withHostIpv4Address("sjznvhx") - .withLocalAvailabilityZoneName("mqipaydhfnzo") - .withServerResourceId("xmtf"); - model = BinaryData.fromObject(model).toObject(AddServerJobServerDetails.class); - Assertions.assertEquals("bulnvgskjtoxjdz", model.serverName()); - Assertions.assertEquals("sjznvhx", model.hostIpv4Address()); - Assertions.assertEquals("mqipaydhfnzo", model.localAvailabilityZoneName()); - Assertions.assertEquals("xmtf", model.serverResourceId()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcConnectivityPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcConnectivityPropertiesTests.java index 337e5c4b1963..6731ff8e27a7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcConnectivityPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcConnectivityPropertiesTests.java @@ -15,22 +15,22 @@ public final class ArcConnectivityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcConnectivityProperties model = BinaryData.fromString( - "{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":3040729179005507255},{\"serviceName\":\"WAC\",\"port\":728427044151085646}]}") + "{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":3740091618502324159},{\"serviceName\":\"WAC\",\"port\":4533506116683097889}]}") .toObject(ArcConnectivityProperties.class); Assertions.assertFalse(model.enabled()); Assertions.assertEquals(ServiceName.WAC, model.serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(3040729179005507255L, model.serviceConfigurations().get(0).port()); + Assertions.assertEquals(3740091618502324159L, model.serviceConfigurations().get(0).port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ArcConnectivityProperties model = new ArcConnectivityProperties().withEnabled(false) .withServiceConfigurations(Arrays.asList( - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3040729179005507255L), - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(728427044151085646L))); + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3740091618502324159L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(4533506116683097889L))); model = BinaryData.fromObject(model).toObject(ArcConnectivityProperties.class); Assertions.assertFalse(model.enabled()); Assertions.assertEquals(ServiceName.WAC, model.serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(3040729179005507255L, model.serviceConfigurations().get(0).port()); + Assertions.assertEquals(3740091618502324159L, model.serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponseInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponseInnerTests.java index d65bdb1a9d3b..553bb1b20157 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponseInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponseInnerTests.java @@ -11,7 +11,7 @@ public final class ArcIdentityResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcIdentityResponseInner model = BinaryData.fromString( - "{\"properties\":{\"arcApplicationClientId\":\"qvuhrhcffcyddglm\",\"arcApplicationTenantId\":\"hjq\",\"arcServicePrincipalObjectId\":\"pyeicxm\",\"arcApplicationObjectId\":\"iwqvhkh\"}}") + "{\"properties\":{\"arcApplicationClientId\":\"bzqqedqytbciq\",\"arcApplicationTenantId\":\"uflmm\",\"arcServicePrincipalObjectId\":\"zsm\",\"arcApplicationObjectId\":\"mglougpbkw\"}}") .toObject(ArcIdentityResponseInner.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponsePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponsePropertiesTests.java index 6d7c80178b34..59dcdc775fb3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponsePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcIdentityResponsePropertiesTests.java @@ -12,11 +12,11 @@ public final class ArcIdentityResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcIdentityResponseProperties model = BinaryData.fromString( - "{\"arcApplicationClientId\":\"uigdtopbobjog\",\"arcApplicationTenantId\":\"e\",\"arcServicePrincipalObjectId\":\"a\",\"arcApplicationObjectId\":\"uhrzayvvt\"}") + "{\"arcApplicationClientId\":\"utduqktapspwgcu\",\"arcApplicationTenantId\":\"tumkdosvqwhbm\",\"arcServicePrincipalObjectId\":\"bbjfddgmbmbexp\",\"arcApplicationObjectId\":\"htqqrolfp\"}") .toObject(ArcIdentityResponseProperties.class); - Assertions.assertEquals("uigdtopbobjog", model.arcApplicationClientId()); - Assertions.assertEquals("e", model.arcApplicationTenantId()); - Assertions.assertEquals("a", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("uhrzayvvt", model.arcApplicationObjectId()); + Assertions.assertEquals("utduqktapspwgcu", model.arcApplicationClientId()); + Assertions.assertEquals("tumkdosvqwhbm", model.arcApplicationTenantId()); + Assertions.assertEquals("bbjfddgmbmbexp", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("htqqrolfp", model.arcApplicationObjectId()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingInnerTests.java index 840e066443a8..9dad68fbb1be 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingInnerTests.java @@ -16,43 +16,40 @@ public final class ArcSettingInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcSettingInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"arcInstanceResourceGroup\":\"vhpfxxypininmay\",\"arcApplicationClientId\":\"ybb\",\"arcApplicationTenantId\":\"odepoogin\",\"arcServicePrincipalObjectId\":\"amiheognarxz\",\"arcApplicationObjectId\":\"heotusiv\",\"aggregateState\":\"PartiallySucceeded\",\"perNodeDetails\":[{\"name\":\"qi\",\"arcInstance\":\"hungbwjzrnf\",\"arcNodeServicePrincipalObjectId\":\"xgispemvtzfkufu\",\"state\":\"Canceled\"},{\"name\":\"fxqeof\",\"arcInstance\":\"e\",\"arcNodeServicePrincipalObjectId\":\"hqjbasvmsmj\",\"state\":\"Creating\"},{\"name\":\"gsntnbybkzgcwr\",\"arcInstance\":\"lxxwrljdouskc\",\"arcNodeServicePrincipalObjectId\":\"kocrcjdkwtnhx\",\"state\":\"Moving\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":3123588613038420776},{\"serviceName\":\"WAC\",\"port\":2559549428131986201},{\"serviceName\":\"WAC\",\"port\":6174837165204706711},{\"serviceName\":\"WAC\",\"port\":1980152902307812746}]},\"defaultExtensions\":[{\"category\":\"ljfmppee\",\"consentTime\":\"2021-10-30T03:41:11Z\"},{\"category\":\"xsabkyqdu\",\"consentTime\":\"2021-07-17T19:18:59Z\"},{\"category\":\"c\",\"consentTime\":\"2021-06-28T19:19:24Z\"},{\"category\":\"zevndhkrwpdappds\",\"consentTime\":\"2020-12-28T00:09:45Z\"}]},\"id\":\"wrwjfeu\",\"name\":\"nhutjeltmrldhugj\",\"type\":\"zdatqxhocdg\"}") + "{\"properties\":{\"provisioningState\":\"InProgress\",\"arcInstanceResourceGroup\":\"pzvgnwzsymglzufc\",\"arcApplicationClientId\":\"kohdbiha\",\"arcApplicationTenantId\":\"fhfcb\",\"arcServicePrincipalObjectId\":\"s\",\"arcApplicationObjectId\":\"ithxqhabifpi\",\"aggregateState\":\"Updating\",\"perNodeDetails\":[{\"name\":\"yscnpqxu\",\"arcInstance\":\"vyq\",\"arcNodeServicePrincipalObjectId\":\"wby\",\"state\":\"Deleted\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":6997715187439318616}]},\"defaultExtensions\":[{\"category\":\"vukxgau\",\"consentTime\":\"2021-10-29T03:26:02Z\"},{\"category\":\"nhsjcnyej\",\"consentTime\":\"2021-09-02T05:03:22Z\"}]},\"id\":\"htnapczwlokjyem\",\"name\":\"kvnipjoxz\",\"type\":\"nchgej\"}") .toObject(ArcSettingInner.class); - Assertions.assertEquals("vhpfxxypininmay", model.arcInstanceResourceGroup()); - Assertions.assertEquals("ybb", model.arcApplicationClientId()); - Assertions.assertEquals("odepoogin", model.arcApplicationTenantId()); - Assertions.assertEquals("amiheognarxz", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("heotusiv", model.arcApplicationObjectId()); + Assertions.assertEquals("pzvgnwzsymglzufc", model.arcInstanceResourceGroup()); + Assertions.assertEquals("kohdbiha", model.arcApplicationClientId()); + Assertions.assertEquals("fhfcb", model.arcApplicationTenantId()); + Assertions.assertEquals("s", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("ithxqhabifpi", model.arcApplicationObjectId()); Assertions.assertTrue(model.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, model.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(3123588613038420776L, + Assertions.assertEquals(6997715187439318616L, model.connectivityProperties().serviceConfigurations().get(0).port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcSettingInner model = new ArcSettingInner().withArcInstanceResourceGroup("vhpfxxypininmay") - .withArcApplicationClientId("ybb") - .withArcApplicationTenantId("odepoogin") - .withArcServicePrincipalObjectId("amiheognarxz") - .withArcApplicationObjectId("heotusiv") + ArcSettingInner model = new ArcSettingInner().withArcInstanceResourceGroup("pzvgnwzsymglzufc") + .withArcApplicationClientId("kohdbiha") + .withArcApplicationTenantId("fhfcb") + .withArcServicePrincipalObjectId("s") + .withArcApplicationObjectId("ithxqhabifpi") .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(true) .withServiceConfigurations(Arrays.asList( - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3123588613038420776L), - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(2559549428131986201L), - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6174837165204706711L), - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(1980152902307812746L)))); + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6997715187439318616L)))); model = BinaryData.fromObject(model).toObject(ArcSettingInner.class); - Assertions.assertEquals("vhpfxxypininmay", model.arcInstanceResourceGroup()); - Assertions.assertEquals("ybb", model.arcApplicationClientId()); - Assertions.assertEquals("odepoogin", model.arcApplicationTenantId()); - Assertions.assertEquals("amiheognarxz", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("heotusiv", model.arcApplicationObjectId()); + Assertions.assertEquals("pzvgnwzsymglzufc", model.arcInstanceResourceGroup()); + Assertions.assertEquals("kohdbiha", model.arcApplicationClientId()); + Assertions.assertEquals("fhfcb", model.arcApplicationTenantId()); + Assertions.assertEquals("s", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("ithxqhabifpi", model.arcApplicationObjectId()); Assertions.assertTrue(model.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, model.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(3123588613038420776L, + Assertions.assertEquals(6997715187439318616L, model.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingListTests.java index e2ecc8c375f9..016ca9a13fc6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingListTests.java @@ -13,18 +13,18 @@ public final class ArcSettingListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcSettingList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Provisioning\",\"arcInstanceResourceGroup\":\"fihrfi\",\"arcApplicationClientId\":\"vzwdzuhtymwis\",\"arcApplicationTenantId\":\"fthwxmnteiwa\",\"arcServicePrincipalObjectId\":\"vkmijcmmxdcuf\",\"arcApplicationObjectId\":\"srp\",\"aggregateState\":\"Creating\",\"perNodeDetails\":[{\"name\":\"sezcxtb\",\"arcInstance\":\"gfycc\",\"arcNodeServicePrincipalObjectId\":\"ewmdw\",\"state\":\"DisableInProgress\"},{\"name\":\"ac\",\"arcInstance\":\"oosflnr\",\"arcNodeServicePrincipalObjectId\":\"fqpte\",\"state\":\"Canceled\"},{\"name\":\"vypyqrimzinpv\",\"arcInstance\":\"jdkirsoodqx\",\"arcNodeServicePrincipalObjectId\":\"rmnohj\",\"state\":\"InProgress\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":6788261713797866838},{\"serviceName\":\"WAC\",\"port\":266631522010641977},{\"serviceName\":\"WAC\",\"port\":6060954968389753554},{\"serviceName\":\"WAC\",\"port\":286612532150478312}]},\"defaultExtensions\":[{\"category\":\"bznorcjxvsnby\",\"consentTime\":\"2021-06-02T22:09:38Z\"}]},\"id\":\"nmoc\",\"name\":\"cyshurzafbljjgp\",\"type\":\"toqcjmklja\"},{\"properties\":{\"provisioningState\":\"Disconnected\",\"arcInstanceResourceGroup\":\"tqajzyulpkudjkrl\",\"arcApplicationClientId\":\"bzhfepgzgqexz\",\"arcApplicationTenantId\":\"c\",\"arcServicePrincipalObjectId\":\"c\",\"arcApplicationObjectId\":\"ierhhbcsglummaj\",\"aggregateState\":\"Deleted\",\"perNodeDetails\":[{\"name\":\"obnbdxkqpxokaj\",\"arcInstance\":\"npime\",\"arcNodeServicePrincipalObjectId\":\"stxgc\",\"state\":\"Deleting\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":4053910893386240781},{\"serviceName\":\"WAC\",\"port\":5608732709320879366},{\"serviceName\":\"WAC\",\"port\":7190660973674687583}]},\"defaultExtensions\":[{\"category\":\"clwhijcoejctbz\",\"consentTime\":\"2021-04-25T10:37:50Z\"},{\"category\":\"sycbkbfk\",\"consentTime\":\"2021-04-13T09:52:22Z\"}]},\"id\":\"kexxppof\",\"name\":\"xaxcfjpgddtocjjx\",\"type\":\"vpmouexhdzxib\"}],\"nextLink\":\"ojnxqbzvdd\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"DisableInProgress\",\"arcInstanceResourceGroup\":\"xbnjbiksq\",\"arcApplicationClientId\":\"lssai\",\"arcApplicationTenantId\":\"p\",\"arcServicePrincipalObjectId\":\"nzl\",\"arcApplicationObjectId\":\"fmppe\",\"aggregateState\":\"Error\",\"perNodeDetails\":[{\"name\":\"sabkyqduujitcjcz\",\"arcInstance\":\"evndh\",\"arcNodeServicePrincipalObjectId\":\"wpdappdsbdkv\",\"state\":\"Accepted\"},{\"name\":\"feusnhut\",\"arcInstance\":\"ltmrldh\",\"arcNodeServicePrincipalObjectId\":\"jzzd\",\"state\":\"Accepted\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":4634339895723122949},{\"serviceName\":\"WAC\",\"port\":5556090733611514478},{\"serviceName\":\"WAC\",\"port\":3195393764493000398}]},\"defaultExtensions\":[{\"category\":\"ndv\",\"consentTime\":\"2021-07-12T00:44:12Z\"},{\"category\":\"wyiftyhxhur\",\"consentTime\":\"2021-08-25T23:42:56Z\"},{\"category\":\"yxolniwp\",\"consentTime\":\"2021-07-02T03:55:48Z\"},{\"category\":\"jfkgiawxk\",\"consentTime\":\"2021-05-21T20:11:19Z\"}]},\"id\":\"lwckbasyypnddhs\",\"name\":\"cbacphejkotynqg\",\"type\":\"ulzndlikwyqk\"}],\"nextLink\":\"gibma\"}") .toObject(ArcSettingList.class); - Assertions.assertEquals("fihrfi", model.value().get(0).arcInstanceResourceGroup()); - Assertions.assertEquals("vzwdzuhtymwis", model.value().get(0).arcApplicationClientId()); - Assertions.assertEquals("fthwxmnteiwa", model.value().get(0).arcApplicationTenantId()); - Assertions.assertEquals("vkmijcmmxdcuf", model.value().get(0).arcServicePrincipalObjectId()); - Assertions.assertEquals("srp", model.value().get(0).arcApplicationObjectId()); - Assertions.assertTrue(model.value().get(0).connectivityProperties().enabled()); + Assertions.assertEquals("xbnjbiksq", model.value().get(0).arcInstanceResourceGroup()); + Assertions.assertEquals("lssai", model.value().get(0).arcApplicationClientId()); + Assertions.assertEquals("p", model.value().get(0).arcApplicationTenantId()); + Assertions.assertEquals("nzl", model.value().get(0).arcServicePrincipalObjectId()); + Assertions.assertEquals("fmppe", model.value().get(0).arcApplicationObjectId()); + Assertions.assertFalse(model.value().get(0).connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, model.value().get(0).connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(6788261713797866838L, + Assertions.assertEquals(4634339895723122949L, model.value().get(0).connectivityProperties().serviceConfigurations().get(0).port()); - Assertions.assertEquals("ojnxqbzvdd", model.nextLink()); + Assertions.assertEquals("gibma", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingPropertiesTests.java index 169f40b4a3fa..6a6035510bf5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingPropertiesTests.java @@ -16,40 +16,43 @@ public final class ArcSettingPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcSettingProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"arcInstanceResourceGroup\":\"gphuticndvka\",\"arcApplicationClientId\":\"wyiftyhxhur\",\"arcApplicationTenantId\":\"ftyxolniw\",\"arcServicePrincipalObjectId\":\"cukjf\",\"arcApplicationObjectId\":\"iawxklry\",\"aggregateState\":\"Updating\",\"perNodeDetails\":[{\"name\":\"asy\",\"arcInstance\":\"nddhsgcbacph\",\"arcNodeServicePrincipalObjectId\":\"koty\",\"state\":\"Deleting\"},{\"name\":\"ulzndlikwyqk\",\"arcInstance\":\"gibma\",\"arcNodeServicePrincipalObjectId\":\"akeqs\",\"state\":\"Moving\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":7609707190512592781}]},\"defaultExtensions\":[{\"category\":\"iqfouflmmnkz\",\"consentTime\":\"2021-10-01T10:06:40Z\"},{\"category\":\"mglougpbkw\",\"consentTime\":\"2021-06-18T17:23:58Z\"},{\"category\":\"duqkt\",\"consentTime\":\"2021-12-06T22:46:59Z\"}]}") + "{\"provisioningState\":\"PartiallyConnected\",\"arcInstanceResourceGroup\":\"mailzydehojw\",\"arcApplicationClientId\":\"huxinpmqnj\",\"arcApplicationTenantId\":\"wixjsprozvcp\",\"arcServicePrincipalObjectId\":\"eg\",\"arcApplicationObjectId\":\"wmfdatscmdvpjhul\",\"aggregateState\":\"Deleting\",\"perNodeDetails\":[{\"name\":\"jozkrwfndiod\",\"arcInstance\":\"slwejdpvw\",\"arcNodeServicePrincipalObjectId\":\"oqpsoa\",\"state\":\"Succeeded\"},{\"name\":\"zakljlahbc\",\"arcInstance\":\"ffdfdosygexpa\",\"arcNodeServicePrincipalObjectId\":\"akhmsbzjhcrz\",\"state\":\"DisableInProgress\"},{\"name\":\"hlxaolthqtr\",\"arcInstance\":\"jbp\",\"arcNodeServicePrincipalObjectId\":\"fsinzgvfcjrwzoxx\",\"state\":\"PartiallyConnected\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":6619682147047690446},{\"serviceName\":\"WAC\",\"port\":7202609969053429028},{\"serviceName\":\"WAC\",\"port\":5685465600666313009},{\"serviceName\":\"WAC\",\"port\":3411109218141355466}]},\"defaultExtensions\":[{\"category\":\"xofpdvhpfxxypi\",\"consentTime\":\"2020-12-31T08:59:56Z\"},{\"category\":\"ayhuy\",\"consentTime\":\"2021-05-05T04:33:07Z\"},{\"category\":\"odepoogin\",\"consentTime\":\"2021-04-24T19:55:27Z\"},{\"category\":\"iheogna\",\"consentTime\":\"2021-08-23T15:48:59Z\"}]}") .toObject(ArcSettingProperties.class); - Assertions.assertEquals("gphuticndvka", model.arcInstanceResourceGroup()); - Assertions.assertEquals("wyiftyhxhur", model.arcApplicationClientId()); - Assertions.assertEquals("ftyxolniw", model.arcApplicationTenantId()); - Assertions.assertEquals("cukjf", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("iawxklry", model.arcApplicationObjectId()); + Assertions.assertEquals("mailzydehojw", model.arcInstanceResourceGroup()); + Assertions.assertEquals("huxinpmqnj", model.arcApplicationClientId()); + Assertions.assertEquals("wixjsprozvcp", model.arcApplicationTenantId()); + Assertions.assertEquals("eg", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("wmfdatscmdvpjhul", model.arcApplicationObjectId()); Assertions.assertTrue(model.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, model.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(7609707190512592781L, + Assertions.assertEquals(6619682147047690446L, model.connectivityProperties().serviceConfigurations().get(0).port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcSettingProperties model = new ArcSettingProperties().withArcInstanceResourceGroup("gphuticndvka") - .withArcApplicationClientId("wyiftyhxhur") - .withArcApplicationTenantId("ftyxolniw") - .withArcServicePrincipalObjectId("cukjf") - .withArcApplicationObjectId("iawxklry") + ArcSettingProperties model = new ArcSettingProperties().withArcInstanceResourceGroup("mailzydehojw") + .withArcApplicationClientId("huxinpmqnj") + .withArcApplicationTenantId("wixjsprozvcp") + .withArcServicePrincipalObjectId("eg") + .withArcApplicationObjectId("wmfdatscmdvpjhul") .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(true) .withServiceConfigurations(Arrays.asList( - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(7609707190512592781L)))); + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6619682147047690446L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(7202609969053429028L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(5685465600666313009L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3411109218141355466L)))); model = BinaryData.fromObject(model).toObject(ArcSettingProperties.class); - Assertions.assertEquals("gphuticndvka", model.arcInstanceResourceGroup()); - Assertions.assertEquals("wyiftyhxhur", model.arcApplicationClientId()); - Assertions.assertEquals("ftyxolniw", model.arcApplicationTenantId()); - Assertions.assertEquals("cukjf", model.arcServicePrincipalObjectId()); - Assertions.assertEquals("iawxklry", model.arcApplicationObjectId()); + Assertions.assertEquals("mailzydehojw", model.arcInstanceResourceGroup()); + Assertions.assertEquals("huxinpmqnj", model.arcApplicationClientId()); + Assertions.assertEquals("wixjsprozvcp", model.arcApplicationTenantId()); + Assertions.assertEquals("eg", model.arcServicePrincipalObjectId()); + Assertions.assertEquals("wmfdatscmdvpjhul", model.arcApplicationObjectId()); Assertions.assertTrue(model.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, model.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(7609707190512592781L, + Assertions.assertEquals(6619682147047690446L, model.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMockTests.java index c6c2d29de2eb..ab8b47bff146 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ArcSettingsConsentAndInstallDefaultExtensionsWithResponseMock @Test public void testConsentAndInstallDefaultExtensionsWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"InProgress\",\"arcInstanceResourceGroup\":\"oqhbjqlqfbler\",\"arcApplicationClientId\":\"ollcshjucihby\",\"arcApplicationTenantId\":\"jvtpnerxvjeaz\",\"arcServicePrincipalObjectId\":\"helhbimyi\",\"arcApplicationObjectId\":\"qamcthtpqgfz\",\"aggregateState\":\"Provisioning\",\"perNodeDetails\":[{\"name\":\"d\",\"arcInstance\":\"vflgzhc\",\"arcNodeServicePrincipalObjectId\":\"gwahcrxo\",\"state\":\"Succeeded\"},{\"name\":\"tvnpccxzivxpmh\",\"arcInstance\":\"hh\",\"arcNodeServicePrincipalObjectId\":\"vnnjd\",\"state\":\"InProgress\"},{\"name\":\"zvhn\",\"arcInstance\":\"pmxnht\",\"arcNodeServicePrincipalObjectId\":\"stqlfxolrwv\",\"state\":\"Moving\"},{\"name\":\"yfjswequf\",\"arcInstance\":\"yyopoaytwwgw\",\"arcNodeServicePrincipalObjectId\":\"b\",\"state\":\"DisableInProgress\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":3138687116025308939},{\"serviceName\":\"WAC\",\"port\":1508448021413403241},{\"serviceName\":\"WAC\",\"port\":3765084177861792662},{\"serviceName\":\"WAC\",\"port\":7029864324592576714}]},\"defaultExtensions\":[{\"category\":\"jskreeedddrft\",\"consentTime\":\"2021-03-02T06:29:02Z\"},{\"category\":\"lpclhsiigeeuwbr\",\"consentTime\":\"2021-08-30T12:06:46Z\"},{\"category\":\"f\",\"consentTime\":\"2021-09-04T15:51:29Z\"},{\"category\":\"e\",\"consentTime\":\"2021-12-08T17:48:01Z\"}]},\"id\":\"yn\",\"name\":\"oqgvbzpggp\",\"type\":\"meyobqajejirvavr\"}"; + = "{\"properties\":{\"provisioningState\":\"InProgress\",\"arcInstanceResourceGroup\":\"ejpewpyjlfxampqc\",\"arcApplicationClientId\":\"g\",\"arcApplicationTenantId\":\"qxbpiatwfauje\",\"arcServicePrincipalObjectId\":\"d\",\"arcApplicationObjectId\":\"dr\",\"aggregateState\":\"PartiallySucceeded\",\"perNodeDetails\":[{\"name\":\"jkrukizyhgsqtnqs\",\"arcInstance\":\"xqfpj\",\"arcNodeServicePrincipalObjectId\":\"ggweeiwdhdmncgb\",\"state\":\"Accepted\"},{\"name\":\"cstu\",\"arcInstance\":\"lhxd\",\"arcNodeServicePrincipalObjectId\":\"klciichgjsysm\",\"state\":\"Error\"},{\"name\":\"gwxfkzsi\",\"arcInstance\":\"uvbdujgcwxvec\",\"arcNodeServicePrincipalObjectId\":\"wjtrdxriza\",\"state\":\"Moving\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":5410489272741266493},{\"serviceName\":\"WAC\",\"port\":2243185118478919876},{\"serviceName\":\"WAC\",\"port\":7333060053837110594},{\"serviceName\":\"WAC\",\"port\":82453599115452659}]},\"defaultExtensions\":[{\"category\":\"qrxhaclcdos\",\"consentTime\":\"2021-06-28T21:59:40Z\"},{\"category\":\"jqgkifmmainwhe\",\"consentTime\":\"2021-07-02T12:23:07Z\"},{\"category\":\"bqwuntobuizazzel\",\"consentTime\":\"2021-07-24T02:08:36Z\"},{\"category\":\"djufbnkl\",\"consentTime\":\"2021-01-08T07:14:33Z\"}]},\"id\":\"peg\",\"name\":\"wdabalfdxaglzfyt\",\"type\":\"btlqh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,18 +32,19 @@ public void testConsentAndInstallDefaultExtensionsWithResponse() throws Exceptio new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcSetting response = manager.arcSettings() - .consentAndInstallDefaultExtensionsWithResponse("dyblpe", "t", "m", com.azure.core.util.Context.NONE) + .consentAndInstallDefaultExtensionsWithResponse("hqlfmsib", "oyrfgxk", "dpmypgfqvmtywh", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("oqhbjqlqfbler", response.arcInstanceResourceGroup()); - Assertions.assertEquals("ollcshjucihby", response.arcApplicationClientId()); - Assertions.assertEquals("jvtpnerxvjeaz", response.arcApplicationTenantId()); - Assertions.assertEquals("helhbimyi", response.arcServicePrincipalObjectId()); - Assertions.assertEquals("qamcthtpqgfz", response.arcApplicationObjectId()); - Assertions.assertFalse(response.connectivityProperties().enabled()); + Assertions.assertEquals("ejpewpyjlfxampqc", response.arcInstanceResourceGroup()); + Assertions.assertEquals("g", response.arcApplicationClientId()); + Assertions.assertEquals("qxbpiatwfauje", response.arcApplicationTenantId()); + Assertions.assertEquals("d", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("dr", response.arcApplicationObjectId()); + Assertions.assertTrue(response.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, response.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(3138687116025308939L, + Assertions.assertEquals(5410489272741266493L, response.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentityMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentityMockTests.java index 3afbd291eb3a..43fd112d550c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentityMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentityMockTests.java @@ -20,7 +20,7 @@ public final class ArcSettingsCreateIdentityMockTests { @Test public void testCreateIdentity() throws Exception { String responseStr - = "{\"properties\":{\"arcApplicationClientId\":\"iupqscoobkj\",\"arcApplicationTenantId\":\"axsqcomji\",\"arcServicePrincipalObjectId\":\"incev\",\"arcApplicationObjectId\":\"kdevpximzii\"}}"; + = "{\"properties\":{\"arcApplicationClientId\":\"fewxqouox\",\"arcApplicationTenantId\":\"nmckaprhkn\",\"arcServicePrincipalObjectId\":\"ijgencdgmoq\",\"arcApplicationObjectId\":\"qih\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testCreateIdentity() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcIdentityResponse response = manager.arcSettings() - .createIdentity("cpdrmegajrz", "twymzs", "wqkkgeseip", com.azure.core.util.Context.NONE); + .createIdentity("czygxv", "ajpxecxqnwhscoza", "mvgxsmpknpwir", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateWithResponseMockTests.java index c7bfc25cfd87..99724596b36e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateWithResponseMockTests.java @@ -25,7 +25,7 @@ public final class ArcSettingsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleted\",\"arcInstanceResourceGroup\":\"rznzcbivoveo\",\"arcApplicationClientId\":\"hfeqcoop\",\"arcApplicationTenantId\":\"pohimgck\",\"arcServicePrincipalObjectId\":\"jpeebz\",\"arcApplicationObjectId\":\"znxsuloutnpbm\",\"aggregateState\":\"InProgress\",\"perNodeDetails\":[{\"name\":\"gpncdmwkhupfhsl\",\"arcInstance\":\"dzauiunyev\",\"arcNodeServicePrincipalObjectId\":\"zdsytciks\",\"state\":\"Connected\"},{\"name\":\"mwuynfx\",\"arcInstance\":\"gsfcmvha\",\"arcNodeServicePrincipalObjectId\":\"pba\",\"state\":\"DisableInProgress\"},{\"name\":\"kljq\",\"arcInstance\":\"w\",\"arcNodeServicePrincipalObjectId\":\"jtvjkowggxawwd\",\"state\":\"DisableInProgress\"},{\"name\":\"nkteiidlbovwbclp\",\"arcInstance\":\"eganihk\",\"arcNodeServicePrincipalObjectId\":\"n\",\"state\":\"Canceled\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":4676106042316468952}]},\"defaultExtensions\":[{\"category\":\"hqlq\",\"consentTime\":\"2021-03-07T19:27:03Z\"}]},\"id\":\"tvceba\",\"name\":\"vbvx\",\"type\":\"vegenlrjc\"}"; + = "{\"properties\":{\"provisioningState\":\"NotSpecified\",\"arcInstanceResourceGroup\":\"lnfyzav\",\"arcApplicationClientId\":\"bypicdbkpdj\",\"arcApplicationTenantId\":\"qh\",\"arcServicePrincipalObjectId\":\"q\",\"arcApplicationObjectId\":\"pdgonjhxs\",\"aggregateState\":\"Moving\",\"perNodeDetails\":[{\"name\":\"c\",\"arcInstance\":\"ulptk\",\"arcNodeServicePrincipalObjectId\":\"cpxtzhigqqbt\",\"state\":\"Disconnected\"},{\"name\":\"jbl\",\"arcInstance\":\"nsihqhudsm\",\"arcNodeServicePrincipalObjectId\":\"uaawja\",\"state\":\"Moving\"},{\"name\":\"nfczmnniixyxvq\",\"arcInstance\":\"nosjtgirnbgmgmd\",\"arcNodeServicePrincipalObjectId\":\"rgmyn\",\"state\":\"DisableInProgress\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":8706741355871200917},{\"serviceName\":\"WAC\",\"port\":6814697636902550630},{\"serviceName\":\"WAC\",\"port\":2749535173634170877}]},\"defaultExtensions\":[{\"category\":\"tamfddrvlkpz\",\"consentTime\":\"2021-09-27T14:16:13Z\"},{\"category\":\"recchdidrmu\",\"consentTime\":\"2021-03-04T12:25:58Z\"},{\"category\":\"mjedbiu\",\"consentTime\":\"2021-07-27T08:42:13Z\"}]},\"id\":\"hwmjpjbweunxc\",\"name\":\"rrihufoi\",\"type\":\"ppiybxv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,28 +35,27 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcSetting response = manager.arcSettings() - .define("xmwqpdkesjqbzkq") - .withExistingCluster("mjmoplu", "fykkfhsovadkrm") - .withArcInstanceResourceGroup("riwbwggij") - .withArcApplicationClientId("pzjnrrhikw") - .withArcApplicationTenantId("zrhdugquht") - .withArcServicePrincipalObjectId("zfrunjfhrjhiycba") - .withArcApplicationObjectId("eqnczkvihvtuwy") + .define("kirkskw") + .withExistingCluster("h", "gpterdiu") + .withArcInstanceResourceGroup("tjygowifc") + .withArcApplicationClientId("olzkgys") + .withArcApplicationTenantId("zyybzo") + .withArcServicePrincipalObjectId("v") + .withArcApplicationObjectId("ptvdxxheigm") .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(false) .withServiceConfigurations(Arrays.asList( - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(1243571087169545024L), - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(8610364871306505658L)))) + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(3892906688970626729L)))) .create(); - Assertions.assertEquals("rznzcbivoveo", response.arcInstanceResourceGroup()); - Assertions.assertEquals("hfeqcoop", response.arcApplicationClientId()); - Assertions.assertEquals("pohimgck", response.arcApplicationTenantId()); - Assertions.assertEquals("jpeebz", response.arcServicePrincipalObjectId()); - Assertions.assertEquals("znxsuloutnpbm", response.arcApplicationObjectId()); + Assertions.assertEquals("lnfyzav", response.arcInstanceResourceGroup()); + Assertions.assertEquals("bypicdbkpdj", response.arcApplicationClientId()); + Assertions.assertEquals("qh", response.arcApplicationTenantId()); + Assertions.assertEquals("q", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("pdgonjhxs", response.arcApplicationObjectId()); Assertions.assertTrue(response.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, response.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(4676106042316468952L, + Assertions.assertEquals(8706741355871200917L, response.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteMockTests.java index ee24204e2981..7b1b0ca7c220 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.arcSettings().delete("p", "uvqhxtozfgdkw", "kurklpiigfuzkeu", com.azure.core.util.Context.NONE); + manager.arcSettings().delete("vuldbkkejjk", "igaw", "azmxjqi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetWithResponseMockTests.java index e1e5286191a8..f038bbd29fa9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ArcSettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Accepted\",\"arcInstanceResourceGroup\":\"xsgcemegd\",\"arcApplicationClientId\":\"vyljubvfjyzufldi\",\"arcApplicationTenantId\":\"ivl\",\"arcServicePrincipalObjectId\":\"ggmaac\",\"arcApplicationObjectId\":\"uhvcgzxhkls\",\"aggregateState\":\"Deleted\",\"perNodeDetails\":[{\"name\":\"y\",\"arcInstance\":\"tsrjyxxoxwfz\",\"arcNodeServicePrincipalObjectId\":\"vecnxfxphs\",\"state\":\"InProgress\"},{\"name\":\"bsnbwutlvuw\",\"arcInstance\":\"u\",\"arcNodeServicePrincipalObjectId\":\"stih\",\"state\":\"Disconnected\"},{\"name\":\"fjajvkyxmm\",\"arcInstance\":\"zvogtde\",\"arcNodeServicePrincipalObjectId\":\"ennmkvaeuwqd\",\"state\":\"PartiallyConnected\"},{\"name\":\"lbmyphfxnrp\",\"arcInstance\":\"ewokyqsfkxf\",\"arcNodeServicePrincipalObjectId\":\"wbihqbtodjfyxbvk\",\"state\":\"NotSpecified\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":1637294898497378389}]},\"defaultExtensions\":[{\"category\":\"yoz\",\"consentTime\":\"2021-07-21T17:48:45Z\"}]},\"id\":\"njdvv\",\"name\":\"rho\",\"type\":\"rkkvxundqzbv\"}"; + = "{\"properties\":{\"provisioningState\":\"NotSpecified\",\"arcInstanceResourceGroup\":\"kajlcyizy\",\"arcApplicationClientId\":\"cvxodkrvfsxxby\",\"arcApplicationTenantId\":\"sqlv\",\"arcServicePrincipalObjectId\":\"cpwgoljtzxnmxsd\",\"arcApplicationObjectId\":\"ygoogxqapjxva\",\"aggregateState\":\"Provisioning\",\"perNodeDetails\":[{\"name\":\"saodj\",\"arcInstance\":\"sdk\",\"arcNodeServicePrincipalObjectId\":\"bfas\",\"state\":\"PartiallySucceeded\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":1287813328153685233},{\"serviceName\":\"WAC\",\"port\":8912121229311861680},{\"serviceName\":\"WAC\",\"port\":2008162710152183739}]},\"defaultExtensions\":[{\"category\":\"zboimyfpqdo\",\"consentTime\":\"2021-11-30T13:57:22Z\"}]},\"id\":\"nwyytfv\",\"name\":\"ct\",\"type\":\"jikffffgkuhznw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,18 +32,18 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcSetting response = manager.arcSettings() - .getWithResponse("vztnjawrhulemm", "mbwppxirxbkitzmn", "itaxju", com.azure.core.util.Context.NONE) + .getWithResponse("vwtiwsmosa", "nhqnampp", "ltassaekewna", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xsgcemegd", response.arcInstanceResourceGroup()); - Assertions.assertEquals("vyljubvfjyzufldi", response.arcApplicationClientId()); - Assertions.assertEquals("ivl", response.arcApplicationTenantId()); - Assertions.assertEquals("ggmaac", response.arcServicePrincipalObjectId()); - Assertions.assertEquals("uhvcgzxhkls", response.arcApplicationObjectId()); - Assertions.assertFalse(response.connectivityProperties().enabled()); + Assertions.assertEquals("kajlcyizy", response.arcInstanceResourceGroup()); + Assertions.assertEquals("cvxodkrvfsxxby", response.arcApplicationClientId()); + Assertions.assertEquals("sqlv", response.arcApplicationTenantId()); + Assertions.assertEquals("cpwgoljtzxnmxsd", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("ygoogxqapjxva", response.arcApplicationObjectId()); + Assertions.assertTrue(response.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, response.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(1637294898497378389L, + Assertions.assertEquals(1287813328153685233L, response.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessMockTests.java index 9cff9af9ac97..803c90ab0aa8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessMockTests.java @@ -28,7 +28,7 @@ public void testInitializeDisableProcess() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.arcSettings() - .initializeDisableProcess("kgpogplbjuvlnh", "nrnjhinaeg", "sbxnep", com.azure.core.util.Context.NONE); + .initializeDisableProcess("pxouvmr", "iflikyypzkgxfx", "myrqsdbpokszan", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterMockTests.java index add4ec081c2c..0cbf8b6aa0d0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterMockTests.java @@ -23,7 +23,7 @@ public final class ArcSettingsListByClusterMockTests { @Test public void testListByCluster() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"arcInstanceResourceGroup\":\"zq\",\"arcApplicationClientId\":\"zochwbekmuyn\",\"arcApplicationTenantId\":\"kyvnhiysdhork\",\"arcServicePrincipalObjectId\":\"hr\",\"arcApplicationObjectId\":\"kiwlwkfflaqwmwq\",\"aggregateState\":\"Deleting\",\"perNodeDetails\":[{\"name\":\"eatne\",\"arcInstance\":\"fzjxnjt\",\"arcNodeServicePrincipalObjectId\":\"gysibthnvxw\",\"state\":\"Error\"},{\"name\":\"cbjdbtqy\",\"arcInstance\":\"xu\",\"arcNodeServicePrincipalObjectId\":\"aujqgbbjv\",\"state\":\"PartiallyConnected\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":6826563652171532437}]},\"defaultExtensions\":[{\"category\":\"oygsabdgdheronsd\",\"consentTime\":\"2021-01-13T11:49:05Z\"},{\"category\":\"zvzuat\",\"consentTime\":\"2021-07-13T15:05:25Z\"}]},\"id\":\"uyxtrvfdbqs\",\"name\":\"gqj\",\"type\":\"vitp\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"arcInstanceResourceGroup\":\"lirh\",\"arcApplicationClientId\":\"ojusuzgfjzcva\",\"arcApplicationTenantId\":\"oialahfxwccokdx\",\"arcServicePrincipalObjectId\":\"kmkcz\",\"arcApplicationObjectId\":\"uhhoqeqshavlj\",\"aggregateState\":\"Failed\",\"perNodeDetails\":[{\"name\":\"olnthb\",\"arcInstance\":\"kgzukwdrnzkjth\",\"arcNodeServicePrincipalObjectId\":\"eyjncjmlfuy\",\"state\":\"PartiallyConnected\"},{\"name\":\"fiddhlrufzcq\",\"arcInstance\":\"mq\",\"arcNodeServicePrincipalObjectId\":\"uiocuselqkrsazr\",\"state\":\"Error\"},{\"name\":\"dqmdtffis\",\"arcInstance\":\"rkkhmwdmdlgy\",\"arcNodeServicePrincipalObjectId\":\"xokwtjawhvagnqfq\",\"state\":\"Updating\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":7714848345048051757},{\"serviceName\":\"WAC\",\"port\":6314427193417595192},{\"serviceName\":\"WAC\",\"port\":8045601227210071511},{\"serviceName\":\"WAC\",\"port\":7649933024732507884}]},\"defaultExtensions\":[{\"category\":\"qdnzyza\",\"consentTime\":\"2021-02-02T09:23:34Z\"}]},\"id\":\"wqkokbczothymg\",\"name\":\"bllmsnwgwimaanea\",\"type\":\"htmhobcyanrf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,17 @@ public void testListByCluster() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.arcSettings().listByCluster("uipjclzjwaqd", "qydewuwxyllz", com.azure.core.util.Context.NONE); + = manager.arcSettings().listByCluster("h", "jjsbcmlzaahzbhur", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zq", response.iterator().next().arcInstanceResourceGroup()); - Assertions.assertEquals("zochwbekmuyn", response.iterator().next().arcApplicationClientId()); - Assertions.assertEquals("kyvnhiysdhork", response.iterator().next().arcApplicationTenantId()); - Assertions.assertEquals("hr", response.iterator().next().arcServicePrincipalObjectId()); - Assertions.assertEquals("kiwlwkfflaqwmwq", response.iterator().next().arcApplicationObjectId()); + Assertions.assertEquals("lirh", response.iterator().next().arcInstanceResourceGroup()); + Assertions.assertEquals("ojusuzgfjzcva", response.iterator().next().arcApplicationClientId()); + Assertions.assertEquals("oialahfxwccokdx", response.iterator().next().arcApplicationTenantId()); + Assertions.assertEquals("kmkcz", response.iterator().next().arcServicePrincipalObjectId()); + Assertions.assertEquals("uhhoqeqshavlj", response.iterator().next().arcApplicationObjectId()); Assertions.assertTrue(response.iterator().next().connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, response.iterator().next().connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(6826563652171532437L, + Assertions.assertEquals(7714848345048051757L, response.iterator().next().connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchPropertiesTests.java index 78c4021aaeff..f9ed1cef4b99 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchPropertiesTests.java @@ -16,12 +16,12 @@ public final class ArcSettingsPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcSettingsPatchProperties model = BinaryData.fromString( - "{\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":6910082069847359363},{\"serviceName\":\"WAC\",\"port\":8958500252629721830}]}}") + "{\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":4579047227223149451}]}}") .toObject(ArcSettingsPatchProperties.class); Assertions.assertFalse(model.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, model.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(6910082069847359363L, + Assertions.assertEquals(4579047227223149451L, model.connectivityProperties().serviceConfigurations().get(0).port()); } @@ -30,13 +30,12 @@ public void testSerialize() throws Exception { ArcSettingsPatchProperties model = new ArcSettingsPatchProperties() .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(false) .withServiceConfigurations(Arrays.asList( - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6910082069847359363L), - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(8958500252629721830L)))); + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(4579047227223149451L)))); model = BinaryData.fromObject(model).toObject(ArcSettingsPatchProperties.class); Assertions.assertFalse(model.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, model.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(6910082069847359363L, + Assertions.assertEquals(4579047227223149451L, model.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchTests.java index cf5f1bf020c8..be5300035d66 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsPatchTests.java @@ -18,30 +18,30 @@ public final class ArcSettingsPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcSettingsPatch model = BinaryData.fromString( - "{\"tags\":{\"fhrtxilnerkujysv\":\"o\",\"fqawrlyxw\":\"eju\",\"xgjvtbv\":\"kcprbnw\",\"uouq\":\"ysszdnrujqguh\"},\"properties\":{\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":41329089410242621},{\"serviceName\":\"WAC\",\"port\":4520848990140400139}]}}}") + "{\"tags\":{\"hqjbasvmsmj\":\"jaeq\",\"ybkzgcwr\":\"ulngsntn\"},\"properties\":{\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":5729741485194722983},{\"serviceName\":\"WAC\",\"port\":4069471963990822296},{\"serviceName\":\"WAC\",\"port\":6350015487998990980}]}}}") .toObject(ArcSettingsPatch.class); - Assertions.assertEquals("o", model.tags().get("fhrtxilnerkujysv")); - Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals("jaeq", model.tags().get("hqjbasvmsmj")); + Assertions.assertTrue(model.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, model.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(41329089410242621L, + Assertions.assertEquals(5729741485194722983L, model.connectivityProperties().serviceConfigurations().get(0).port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcSettingsPatch model = new ArcSettingsPatch() - .withTags(mapOf("fhrtxilnerkujysv", "o", "fqawrlyxw", "eju", "xgjvtbv", "kcprbnw", "uouq", "ysszdnrujqguh")) - .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(false) + ArcSettingsPatch model = new ArcSettingsPatch().withTags(mapOf("hqjbasvmsmj", "jaeq", "ybkzgcwr", "ulngsntn")) + .withConnectivityProperties(new ArcConnectivityProperties().withEnabled(true) .withServiceConfigurations(Arrays.asList( - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(41329089410242621L), - new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(4520848990140400139L)))); + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(5729741485194722983L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(4069471963990822296L), + new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(6350015487998990980L)))); model = BinaryData.fromObject(model).toObject(ArcSettingsPatch.class); - Assertions.assertEquals("o", model.tags().get("fhrtxilnerkujysv")); - Assertions.assertFalse(model.connectivityProperties().enabled()); + Assertions.assertEquals("jaeq", model.tags().get("hqjbasvmsmj")); + Assertions.assertTrue(model.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, model.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(41329089410242621L, + Assertions.assertEquals(5729741485194722983L, model.connectivityProperties().serviceConfigurations().get(0).port()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileMockTests.java index 93d860665aa5..2d0dcf60ea1d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsReconcileMockTests.java @@ -25,7 +25,7 @@ public final class ArcSettingsReconcileMockTests { @Test public void testReconcile() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"arcInstanceResourceGroup\":\"quf\",\"arcApplicationClientId\":\"amxo\",\"arcApplicationTenantId\":\"gc\",\"arcServicePrincipalObjectId\":\"yutehlkarvtipquk\",\"arcApplicationObjectId\":\"iknsgo\",\"aggregateState\":\"NotSpecified\",\"perNodeDetails\":[{\"name\":\"p\",\"arcInstance\":\"kggvmfnnbbx\",\"arcNodeServicePrincipalObjectId\":\"dfkkedeetxtpwcv\",\"state\":\"InProgress\"},{\"name\":\"sunjzijaciwmm\",\"arcInstance\":\"tqdonbzzs\",\"arcNodeServicePrincipalObjectId\":\"zyviiwsu\",\"state\":\"Error\"},{\"name\":\"wsyuifkzqqhbtflo\",\"arcInstance\":\"mkfbeoiipj\",\"arcNodeServicePrincipalObjectId\":\"gvyvuoikdlp\",\"state\":\"DisableInProgress\"},{\"name\":\"ugfw\",\"arcInstance\":\"qn\",\"arcNodeServicePrincipalObjectId\":\"clo\",\"state\":\"Canceled\"}],\"connectivityProperties\":{\"enabled\":false,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":2151227859655787729},{\"serviceName\":\"WAC\",\"port\":6149349870283078613}]},\"defaultExtensions\":[{\"category\":\"xtwwulk\",\"consentTime\":\"2021-09-13T02:43:46Z\"}]},\"id\":\"aevyk\",\"name\":\"yjecrqkwakkch\",\"type\":\"foulborcxuibsdq\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"arcInstanceResourceGroup\":\"doad\",\"arcApplicationClientId\":\"op\",\"arcApplicationTenantId\":\"hpadkmdzg\",\"arcServicePrincipalObjectId\":\"zxvctkbbxuharls\",\"arcApplicationObjectId\":\"ncclabvoyngsuxxc\",\"aggregateState\":\"Error\",\"perNodeDetails\":[{\"name\":\"ogh\",\"arcInstance\":\"a\",\"arcNodeServicePrincipalObjectId\":\"janormovdxxu\",\"state\":\"Error\"},{\"name\":\"jmoilunwe\",\"arcInstance\":\"deel\",\"arcNodeServicePrincipalObjectId\":\"lkyozdsfzj\",\"state\":\"Succeeded\"},{\"name\":\"hr\",\"arcInstance\":\"slejtvxj\",\"arcNodeServicePrincipalObjectId\":\"vgjbfio\",\"state\":\"Canceled\"}],\"connectivityProperties\":{\"enabled\":true,\"serviceConfigurations\":[{\"serviceName\":\"WAC\",\"port\":7906418026810627066},{\"serviceName\":\"WAC\",\"port\":2508806055278138733},{\"serviceName\":\"WAC\",\"port\":357950708331061392}]},\"defaultExtensions\":[{\"category\":\"sazuxejgwecywnfy\",\"consentTime\":\"2021-10-08T17:41:09Z\"},{\"category\":\"czs\",\"consentTime\":\"2021-11-17T00:21:13Z\"},{\"category\":\"dnddbbozsyv\",\"consentTime\":\"2021-06-11T00:23Z\"}]},\"id\":\"myitr\",\"name\":\"hwudlxeei\",\"type\":\"tpmnoe\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,20 +35,20 @@ public void testReconcile() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcSetting response = manager.arcSettings() - .reconcile("meqmduvtvodqxxpq", "ml", "ibtblmcvrjazno", + .reconcile("kyow", "tjouwhldxwhi", "proqk", new ReconcileArcSettingsRequest().withProperties(new ReconcileArcSettingsRequestProperties() - .withClusterNodes(Arrays.asList("qvpbq", "dqk", "sb", "sbbmitaftazgcx"))), + .withClusterNodes(Arrays.asList("mcvprstvk", "tbfjtdyotnplf", "cqoccq", "qxwetjtd"))), com.azure.core.util.Context.NONE); - Assertions.assertEquals("quf", response.arcInstanceResourceGroup()); - Assertions.assertEquals("amxo", response.arcApplicationClientId()); - Assertions.assertEquals("gc", response.arcApplicationTenantId()); - Assertions.assertEquals("yutehlkarvtipquk", response.arcServicePrincipalObjectId()); - Assertions.assertEquals("iknsgo", response.arcApplicationObjectId()); - Assertions.assertFalse(response.connectivityProperties().enabled()); + Assertions.assertEquals("doad", response.arcInstanceResourceGroup()); + Assertions.assertEquals("op", response.arcApplicationClientId()); + Assertions.assertEquals("hpadkmdzg", response.arcApplicationTenantId()); + Assertions.assertEquals("zxvctkbbxuharls", response.arcServicePrincipalObjectId()); + Assertions.assertEquals("ncclabvoyngsuxxc", response.arcApplicationObjectId()); + Assertions.assertTrue(response.connectivityProperties().enabled()); Assertions.assertEquals(ServiceName.WAC, response.connectivityProperties().serviceConfigurations().get(0).serviceName()); - Assertions.assertEquals(2151227859655787729L, + Assertions.assertEquals(7906418026810627066L, response.connectivityProperties().serviceConfigurations().get(0).port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoPayloadTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoPayloadTests.java index 0ff07387dbc7..55dee3728a5b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoPayloadTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoPayloadTests.java @@ -10,9 +10,8 @@ public final class AssemblyInfoPayloadTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AssemblyInfoPayload model = BinaryData - .fromString( - "{\"identifier\":\"gvmpipaslthaqfx\",\"hash\":\"mwutwbdsre\",\"fileName\":\"drhneuyow\",\"url\":\"d\"}") + AssemblyInfoPayload model = BinaryData.fromString( + "{\"identifier\":\"mlwpazt\",\"hash\":\"ofncckwyfzqwhxxb\",\"fileName\":\"qa\",\"url\":\"feqztppriol\"}") .toObject(AssemblyInfoPayload.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoTests.java index 2fa6647b73a9..34788f2f2e42 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/AssemblyInfoTests.java @@ -11,7 +11,7 @@ public final class AssemblyInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AssemblyInfo model = BinaryData.fromString( - "{\"packageVersion\":\"hjjklff\",\"payload\":[{\"identifier\":\"wqlgzrf\",\"hash\":\"eyebizikayuhql\",\"fileName\":\"bs\",\"url\":\"bqwrvtldgm\"}]}") + "{\"packageVersion\":\"nsj\",\"payload\":[{\"identifier\":\"iagxsdszuempsbz\",\"hash\":\"z\",\"fileName\":\"yvpnqicvinvkjj\",\"url\":\"xrbuukzclew\"}]}") .toObject(AssemblyInfo.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/CheckUpdatesRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/CheckUpdatesRequestTests.java index 6ef667ca18c6..62603341d81c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/CheckUpdatesRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/CheckUpdatesRequestTests.java @@ -12,14 +12,14 @@ public final class CheckUpdatesRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckUpdatesRequest model - = BinaryData.fromString("{\"updateName\":\"rhunlp\"}").toObject(CheckUpdatesRequest.class); - Assertions.assertEquals("rhunlp", model.updateName()); + = BinaryData.fromString("{\"updateName\":\"fmkk\"}").toObject(CheckUpdatesRequest.class); + Assertions.assertEquals("fmkk", model.updateName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CheckUpdatesRequest model = new CheckUpdatesRequest().withUpdateName("rhunlp"); + CheckUpdatesRequest model = new CheckUpdatesRequest().withUpdateName("fmkk"); model = BinaryData.fromObject(model).toObject(CheckUpdatesRequest.class); - Assertions.assertEquals("rhunlp", model.updateName()); + Assertions.assertEquals("fmkk", model.updateName()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterBillingPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterBillingPropertiesTests.java index 7b353770c8fa..37b2db897ade 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterBillingPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterBillingPropertiesTests.java @@ -12,10 +12,10 @@ public final class ClusterBillingPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterBillingProperties model = BinaryData.fromString( - "{\"nextBillingModel\":{\"billingModel\":\"aln\",\"capabilitiesEnabled\":[\"isxyawjoyaqcslyj\",\"kiidzyex\",\"nelixhnrztfo\",\"hb\"],\"trialDaysRemaining\":56.91511565013755}}") + "{\"nextBillingModel\":{\"billingModel\":\"ck\",\"capabilitiesEnabled\":[\"hrxsbk\",\"vpycanuzbp\",\"kafkuwbcrnwbm\"],\"trialDaysRemaining\":39.313377855702626}}") .toObject(ClusterBillingProperties.class); - Assertions.assertEquals("aln", model.nextBillingModel().billingModel()); - Assertions.assertEquals("isxyawjoyaqcslyj", model.nextBillingModel().capabilitiesEnabled().get(0)); - Assertions.assertEquals(56.91511565013755D, model.nextBillingModel().trialDaysRemaining()); + Assertions.assertEquals("ck", model.nextBillingModel().billingModel()); + Assertions.assertEquals("hrxsbk", model.nextBillingModel().capabilitiesEnabled().get(0)); + Assertions.assertEquals(39.313377855702626D, model.nextBillingModel().trialDaysRemaining()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterDesiredPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterDesiredPropertiesTests.java index eb3ec1adc3a9..526bf728c549 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterDesiredPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterDesiredPropertiesTests.java @@ -14,19 +14,19 @@ public final class ClusterDesiredPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterDesiredProperties model - = BinaryData.fromString("{\"windowsServerSubscription\":\"Enabled\",\"diagnosticLevel\":\"Off\"}") + = BinaryData.fromString("{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Off\"}") .toObject(ClusterDesiredProperties.class); - Assertions.assertEquals(WindowsServerSubscription.ENABLED, model.windowsServerSubscription()); + Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.windowsServerSubscription()); Assertions.assertEquals(DiagnosticLevel.OFF, model.diagnosticLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterDesiredProperties model - = new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.ENABLED) + = new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) .withDiagnosticLevel(DiagnosticLevel.OFF); model = BinaryData.fromObject(model).toObject(ClusterDesiredProperties.class); - Assertions.assertEquals(WindowsServerSubscription.ENABLED, model.windowsServerSubscription()); + Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.windowsServerSubscription()); Assertions.assertEquals(DiagnosticLevel.OFF, model.diagnosticLevel()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponseInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponseInnerTests.java index 238ea134f11d..b016c02a675e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponseInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponseInnerTests.java @@ -11,7 +11,7 @@ public final class ClusterIdentityResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterIdentityResponseInner model = BinaryData.fromString( - "{\"properties\":{\"aadClientId\":\"clvit\",\"aadTenantId\":\"qzonosggbhcohf\",\"aadServicePrincipalObjectId\":\"sjnkal\",\"aadApplicationObjectId\":\"tiiswacffg\"}}") + "{\"properties\":{\"aadClientId\":\"e\",\"aadTenantId\":\"t\",\"aadServicePrincipalObjectId\":\"aqtdoqmcbx\",\"aadApplicationObjectId\":\"vxysl\"}}") .toObject(ClusterIdentityResponseInner.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponsePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponsePropertiesTests.java index 37b594df8142..30983eeef4ad 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponsePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterIdentityResponsePropertiesTests.java @@ -12,11 +12,11 @@ public final class ClusterIdentityResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterIdentityResponseProperties model = BinaryData.fromString( - "{\"aadClientId\":\"zzewkfvhqcrai\",\"aadTenantId\":\"pnppfuf\",\"aadServicePrincipalObjectId\":\"wdmhdlxyjrxs\",\"aadApplicationObjectId\":\"afcnih\"}") + "{\"aadClientId\":\"hsfxoblytkb\",\"aadTenantId\":\"pe\",\"aadServicePrincipalObjectId\":\"wfbkrvrns\",\"aadApplicationObjectId\":\"hqjohxcrsbfova\"}") .toObject(ClusterIdentityResponseProperties.class); - Assertions.assertEquals("zzewkfvhqcrai", model.aadClientId()); - Assertions.assertEquals("pnppfuf", model.aadTenantId()); - Assertions.assertEquals("wdmhdlxyjrxs", model.aadServicePrincipalObjectId()); - Assertions.assertEquals("afcnih", model.aadApplicationObjectId()); + Assertions.assertEquals("hsfxoblytkb", model.aadClientId()); + Assertions.assertEquals("pe", model.aadTenantId()); + Assertions.assertEquals("wfbkrvrns", model.aadServicePrincipalObjectId()); + Assertions.assertEquals("hqjohxcrsbfova", model.aadApplicationObjectId()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobListResultTests.java deleted file mode 100644 index 8071f85b7e3d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobListResultTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.implementation.models.ClusterJobListResult; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import org.junit.jupiter.api.Assertions; - -public final class ClusterJobListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"jobType\":\"ClusterJobProperties\",\"deploymentMode\":\"Validate\",\"provisioningState\":\"Creating\",\"jobId\":\"ajodmkrrwepgqvqo\",\"startTimeUtc\":\"2021-02-06T12:29:06Z\",\"endTimeUtc\":\"2021-10-08T23:17:04Z\",\"status\":\"NotSpecified\",\"reportedProperties\":{\"percentComplete\":1858188575,\"validationStatus\":{\"status\":\"lyvxchp\",\"steps\":[{},{},{},{}]},\"deploymentStatus\":{\"status\":\"fa\",\"steps\":[{},{}]}}},\"id\":\"wsknstvzuzhasup\",\"name\":\"lppdpgz\",\"type\":\"zqazvb\"},{\"properties\":{\"jobType\":\"ClusterJobProperties\",\"deploymentMode\":\"Deploy\",\"provisioningState\":\"Updating\",\"jobId\":\"ongru\",\"startTimeUtc\":\"2021-10-15T20:24:19Z\",\"endTimeUtc\":\"2021-07-19T20:39:34Z\",\"status\":\"NotSpecified\",\"reportedProperties\":{\"percentComplete\":1401114997,\"validationStatus\":{\"status\":\"igbeqn\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"yjdeayscseyd\",\"steps\":[{},{},{},{}]}}},\"id\":\"exmnv\",\"name\":\"vmuw\",\"type\":\"xlniwmcpm\"},{\"properties\":{\"jobType\":\"ClusterJobProperties\",\"deploymentMode\":\"Deploy\",\"provisioningState\":\"Error\",\"jobId\":\"vmi\",\"startTimeUtc\":\"2021-05-08T08:59:53Z\",\"endTimeUtc\":\"2021-01-28T10:09:08Z\",\"status\":\"ValidationSuccess\",\"reportedProperties\":{\"percentComplete\":1357379583,\"validationStatus\":{\"status\":\"dclacroczfmun\",\"steps\":[{},{}]},\"deploymentStatus\":{\"status\":\"uxzshxz\",\"steps\":[{},{}]}}},\"id\":\"uzudlevzskejcg\",\"name\":\"fsgqkstyecupyuij\",\"type\":\"ard\"},{\"properties\":{\"jobType\":\"ClusterJobProperties\",\"deploymentMode\":\"Deploy\",\"provisioningState\":\"Succeeded\",\"jobId\":\"azpzdqwuz\",\"startTimeUtc\":\"2021-08-08T22:12:08Z\",\"endTimeUtc\":\"2021-11-13T21:14Z\",\"status\":\"DeploymentInProgress\",\"reportedProperties\":{\"percentComplete\":723216390,\"validationStatus\":{\"status\":\"vfrjwu\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"vajbvbnkrdemdid\",\"steps\":[{},{},{}]}}},\"id\":\"idgzwdydamis\",\"name\":\"pztdivyk\",\"type\":\"xkqejtpjfojiunr\"}],\"nextLink\":\"hxuk\"}") - .toObject(ClusterJobListResult.class); - Assertions.assertEquals(DeploymentMode.VALIDATE, model.value().get(0).properties().deploymentMode()); - Assertions.assertEquals("hxuk", model.nextLink()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsCreateOrUpdateMockTests.java deleted file mode 100644 index 406dd0266f27..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.ClusterJob; -import com.azure.resourcemanager.azurestackhci.models.ClusterJobProperties; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterJobsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"jobType\":\"ClusterJobProperties\",\"deploymentMode\":\"Validate\",\"provisioningState\":\"Succeeded\",\"jobId\":\"wtzsroeqcrjvcj\",\"startTimeUtc\":\"2021-09-19T12:27:26Z\",\"endTimeUtc\":\"2021-08-13T09:31:06Z\",\"status\":\"Canceled\",\"reportedProperties\":{\"percentComplete\":47161080,\"validationStatus\":{\"status\":\"unhdikatzmtuv\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"jkbi\",\"steps\":[{},{}]}}},\"id\":\"zlvkcm\",\"name\":\"u\",\"type\":\"aunlodincf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ClusterJob response = manager.clusterJobs() - .define("uufhpdncokqrg") - .withExistingCluster("bmxbpqcnx", "kehojvmazuflfp") - .withProperties(new ClusterJobProperties().withDeploymentMode(DeploymentMode.VALIDATE)) - .create(); - - Assertions.assertEquals(DeploymentMode.VALIDATE, response.properties().deploymentMode()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsGetWithResponseMockTests.java deleted file mode 100644 index 990615b07bf2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.ClusterJob; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterJobsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"jobType\":\"ClusterJobProperties\",\"deploymentMode\":\"Validate\",\"provisioningState\":\"Error\",\"jobId\":\"pbilnszyjbuw\",\"startTimeUtc\":\"2021-11-13T06:17:54Z\",\"endTimeUtc\":\"2021-07-09T21:39:50Z\",\"status\":\"ValidationFailed\",\"reportedProperties\":{\"percentComplete\":804062004,\"validationStatus\":{\"status\":\"ayioxpqgqs\",\"steps\":[{},{},{},{}]},\"deploymentStatus\":{\"status\":\"feombodvdgfuakqs\",\"steps\":[{},{},{}]}}},\"id\":\"f\",\"name\":\"vzceuy\",\"type\":\"qktcktnbpk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ClusterJob response = manager.clusterJobs() - .getWithResponse("kqcgzygtdjhtbar", "txur", "uoyyumhzpstocq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(DeploymentMode.VALIDATE, response.properties().deploymentMode()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsListMockTests.java deleted file mode 100644 index ab364928ab51..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterJobsListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.ClusterJob; -import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterJobsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"jobType\":\"ClusterJobProperties\",\"deploymentMode\":\"Validate\",\"provisioningState\":\"Deleting\",\"jobId\":\"hqsacj\",\"startTimeUtc\":\"2021-04-08T12:19:05Z\",\"endTimeUtc\":\"2021-02-11T11:05:26Z\",\"status\":\"Scheduled\",\"reportedProperties\":{\"percentComplete\":1517617142,\"validationStatus\":{\"status\":\"p\",\"steps\":[{},{},{},{}]},\"deploymentStatus\":{\"status\":\"vmkmzv\",\"steps\":[{},{}]}}},\"id\":\"fblsxyfqgtodg\",\"name\":\"llefmizdcsrv\",\"type\":\"bnasgfyxhsxcg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.clusterJobs().list("nxrlncm", "z", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(DeploymentMode.VALIDATE, response.iterator().next().properties().deploymentMode()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterNodeTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterNodeTests.java index 711eb5f6d4fe..832ca833ab82 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterNodeTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterNodeTests.java @@ -11,7 +11,7 @@ public final class ClusterNodeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterNode model = BinaryData.fromString( - "{\"name\":\"jyzhpvgq\",\"id\":3.2978185411500105,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"lmwlxkvugfhzo\",\"manufacturer\":\"wjvzunluthnn\",\"model\":\"nxipeil\",\"osName\":\"zuaejxd\",\"osVersion\":\"tskzbbtdzumveek\",\"osDisplayVersion\":\"wozuhkf\",\"serialNumber\":\"sjyofdx\",\"coreCount\":7.019162359413455,\"memoryInGiB\":93.2361656942931,\"lastLicensingTimestamp\":\"2021-05-28T20:42:22Z\",\"oemActivation\":\"Disabled\"}") + "{\"name\":\"k\",\"id\":1.7329070285957315,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"phywpnvj\",\"manufacturer\":\"qnermclfplphoxu\",\"model\":\"rpabg\",\"osName\":\"psbjta\",\"osVersion\":\"ugxywpmueef\",\"osDisplayVersion\":\"wfqkquj\",\"serialNumber\":\"suyonobglaocq\",\"coreCount\":15.741170001214488,\"memoryInGiB\":1.921075020730334,\"lastLicensingTimestamp\":\"2021-02-11T06:40:02Z\",\"oemActivation\":\"Enabled\"}") .toObject(ClusterNode.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchPropertiesTests.java index 228699e92aee..8fc295223d09 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchPropertiesTests.java @@ -15,29 +15,29 @@ public final class ClusterPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterPatchProperties model = BinaryData.fromString( - "{\"cloudManagementEndpoint\":\"zdnds\",\"aadClientId\":\"nayqi\",\"aadTenantId\":\"nduhavhqlkthum\",\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Basic\"}}") + "{\"cloudManagementEndpoint\":\"prwmdyvxqt\",\"aadClientId\":\"riwwroy\",\"aadTenantId\":\"exrmcqibycnojvk\",\"desiredProperties\":{\"windowsServerSubscription\":\"Enabled\",\"diagnosticLevel\":\"Basic\"}}") .toObject(ClusterPatchProperties.class); - Assertions.assertEquals("zdnds", model.cloudManagementEndpoint()); - Assertions.assertEquals("nayqi", model.aadClientId()); - Assertions.assertEquals("nduhavhqlkthum", model.aadTenantId()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, + Assertions.assertEquals("prwmdyvxqt", model.cloudManagementEndpoint()); + Assertions.assertEquals("riwwroy", model.aadClientId()); + Assertions.assertEquals("exrmcqibycnojvk", model.aadTenantId()); + Assertions.assertEquals(WindowsServerSubscription.ENABLED, model.desiredProperties().windowsServerSubscription()); Assertions.assertEquals(DiagnosticLevel.BASIC, model.desiredProperties().diagnosticLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterPatchProperties model = new ClusterPatchProperties().withCloudManagementEndpoint("zdnds") - .withAadClientId("nayqi") - .withAadTenantId("nduhavhqlkthum") + ClusterPatchProperties model = new ClusterPatchProperties().withCloudManagementEndpoint("prwmdyvxqt") + .withAadClientId("riwwroy") + .withAadTenantId("exrmcqibycnojvk") .withDesiredProperties( - new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) + new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.ENABLED) .withDiagnosticLevel(DiagnosticLevel.BASIC)); model = BinaryData.fromObject(model).toObject(ClusterPatchProperties.class); - Assertions.assertEquals("zdnds", model.cloudManagementEndpoint()); - Assertions.assertEquals("nayqi", model.aadClientId()); - Assertions.assertEquals("nduhavhqlkthum", model.aadTenantId()); - Assertions.assertEquals(WindowsServerSubscription.DISABLED, + Assertions.assertEquals("prwmdyvxqt", model.cloudManagementEndpoint()); + Assertions.assertEquals("riwwroy", model.aadClientId()); + Assertions.assertEquals("exrmcqibycnojvk", model.aadTenantId()); + Assertions.assertEquals(WindowsServerSubscription.ENABLED, model.desiredProperties().windowsServerSubscription()); Assertions.assertEquals(DiagnosticLevel.BASIC, model.desiredProperties().diagnosticLevel()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchTests.java index e18c2e6ff364..46e1b6549957 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterPatchTests.java @@ -19,39 +19,39 @@ public final class ClusterPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterPatch model = BinaryData.fromString( - "{\"tags\":{\"q\":\"fbkrvrnsvs\",\"rruvwbhsq\":\"ohxcrsbfova\",\"gjb\":\"sub\"},\"identity\":{\"principalId\":\"bpybsrfbjf\",\"tenantId\":\"w\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ruoujmk\":{\"principalId\":\"tpvjzbexilzznfqq\",\"clientId\":\"wpmqt\"}}},\"properties\":{\"cloudManagementEndpoint\":\"wqytjrybnwjewgdr\",\"aadClientId\":\"rvnaenqpeh\",\"aadTenantId\":\"doy\",\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Basic\"}}}") + "{\"tags\":{\"bkpyc\":\"x\",\"l\":\"klwndnhjdauwhv\",\"xujznbmpowu\":\"zbtd\",\"lupj\":\"przqlveu\"},\"identity\":{\"principalId\":\"fxobbcsws\",\"tenantId\":\"jriplrbpbewtghf\",\"type\":\"None\",\"userAssignedIdentities\":{\"cgwrtzjuz\":{\"principalId\":\"wxzvlvqhjkb\",\"clientId\":\"ibtnmxiebwwaloay\"}}},\"properties\":{\"cloudManagementEndpoint\":\"zmh\",\"aadClientId\":\"ongmtsa\",\"aadTenantId\":\"cbpwxqpsrknft\",\"desiredProperties\":{\"windowsServerSubscription\":\"Disabled\",\"diagnosticLevel\":\"Off\"}}}") .toObject(ClusterPatch.class); - Assertions.assertEquals("fbkrvrnsvs", model.tags().get("q")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("wqytjrybnwjewgdr", model.cloudManagementEndpoint()); - Assertions.assertEquals("rvnaenqpeh", model.aadClientId()); - Assertions.assertEquals("doy", model.aadTenantId()); + Assertions.assertEquals("x", model.tags().get("bkpyc")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); + Assertions.assertEquals("zmh", model.cloudManagementEndpoint()); + Assertions.assertEquals("ongmtsa", model.aadClientId()); + Assertions.assertEquals("cbpwxqpsrknft", model.aadTenantId()); Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, model.desiredProperties().diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.OFF, model.desiredProperties().diagnosticLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterPatch model - = new ClusterPatch().withTags(mapOf("q", "fbkrvrnsvs", "rruvwbhsq", "ohxcrsbfova", "gjb", "sub")) - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("ruoujmk", new UserAssignedIdentity())) - .withCloudManagementEndpoint("wqytjrybnwjewgdr") - .withAadClientId("rvnaenqpeh") - .withAadTenantId("doy") - .withDesiredProperties( - new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) - .withDiagnosticLevel(DiagnosticLevel.BASIC)); + ClusterPatch model = new ClusterPatch() + .withTags(mapOf("bkpyc", "x", "l", "klwndnhjdauwhv", "xujznbmpowu", "zbtd", "lupj", "przqlveu")) + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("cgwrtzjuz", new UserAssignedIdentity())) + .withCloudManagementEndpoint("zmh") + .withAadClientId("ongmtsa") + .withAadTenantId("cbpwxqpsrknft") + .withDesiredProperties( + new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.DISABLED) + .withDiagnosticLevel(DiagnosticLevel.OFF)); model = BinaryData.fromObject(model).toObject(ClusterPatch.class); - Assertions.assertEquals("fbkrvrnsvs", model.tags().get("q")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("wqytjrybnwjewgdr", model.cloudManagementEndpoint()); - Assertions.assertEquals("rvnaenqpeh", model.aadClientId()); - Assertions.assertEquals("doy", model.aadTenantId()); + Assertions.assertEquals("x", model.tags().get("bkpyc")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); + Assertions.assertEquals("zmh", model.cloudManagementEndpoint()); + Assertions.assertEquals("ongmtsa", model.aadClientId()); + Assertions.assertEquals("cbpwxqpsrknft", model.aadTenantId()); Assertions.assertEquals(WindowsServerSubscription.DISABLED, model.desiredProperties().windowsServerSubscription()); - Assertions.assertEquals(DiagnosticLevel.BASIC, model.desiredProperties().diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.OFF, model.desiredProperties().diagnosticLevel()); } // Use "Map.of" if available diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterReportedPropertiesTests.java index bb6253c776ab..0cd0bd8fab84 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterReportedPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterReportedPropertiesTests.java @@ -13,8 +13,8 @@ public final class ClusterReportedPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterReportedProperties model = BinaryData.fromString( - "{\"clusterName\":\"auhashsfwx\",\"clusterId\":\"owzxcu\",\"clusterVersion\":\"cjooxdjebwpucwwf\",\"nodes\":[{\"name\":\"vmeueci\",\"id\":86.32730479423516,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"ThirdParty\",\"ehcResourceId\":\"gjrwjueiotwmcdyt\",\"manufacturer\":\"wit\",\"model\":\"rjaw\",\"osName\":\"wgxhn\",\"osVersion\":\"kxfbkpycgklwndn\",\"osDisplayVersion\":\"dauwhvylwzbtd\",\"serialNumber\":\"ujznb\",\"coreCount\":6.623657803570204,\"memoryInGiB\":17.470323267570254,\"lastLicensingTimestamp\":\"2021-06-11T09:32:45Z\",\"oemActivation\":\"Disabled\"},{\"name\":\"eualupjmkhf\",\"id\":67.89578859974978,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"tjrip\",\"manufacturer\":\"bpbewtghfgb\",\"model\":\"gw\",\"osName\":\"vlvqhjkbegi\",\"osVersion\":\"nmxiebwwaloayqc\",\"osDisplayVersion\":\"rtzju\",\"serialNumber\":\"wyzmhtxon\",\"coreCount\":8.177344044524727,\"memoryInGiB\":82.38854083547146,\"lastLicensingTimestamp\":\"2021-02-07T11:49:38Z\",\"oemActivation\":\"Enabled\"}],\"lastUpdated\":\"2021-05-06T06:11:53Z\",\"msiExpirationTimeStamp\":\"2021-11-21T02:56:55Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Off\",\"supportedCapabilities\":[\"uvriuhprwm\",\"yvxqtayriwwroy\",\"bexrmcq\"],\"clusterType\":\"ThirdParty\",\"manufacturer\":\"nojvknmefqsg\",\"oemActivation\":\"Disabled\",\"hardwareClass\":\"Medium\"}") + "{\"clusterName\":\"tnrsyn\",\"clusterId\":\"idybyxczf\",\"clusterVersion\":\"haaxdbabphl\",\"nodes\":[{\"name\":\"fkts\",\"id\":94.88104909833913,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"yyazttbt\",\"manufacturer\":\"rq\",\"model\":\"edckzywbiexzfey\",\"osName\":\"axibxujw\",\"osVersion\":\"qwalmuzyoxaepd\",\"osDisplayVersion\":\"jancu\",\"serialNumber\":\"hdwbavxbniwdjs\",\"coreCount\":40.08923472524211,\"memoryInGiB\":13.819728983131496,\"lastLicensingTimestamp\":\"2021-10-19T12:26:50Z\",\"oemActivation\":\"Disabled\"},{\"name\":\"x\",\"id\":73.27388446473302,\"windowsServerSubscription\":\"Enabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"abgl\",\"manufacturer\":\"hxw\",\"model\":\"tyq\",\"osName\":\"lbbovplw\",\"osVersion\":\"hvgyuguosvmk\",\"osDisplayVersion\":\"sxqu\",\"serialNumber\":\"fpl\",\"coreCount\":81.71717361278654,\"memoryInGiB\":84.04422719105101,\"lastLicensingTimestamp\":\"2021-10-15T20:07:23Z\",\"oemActivation\":\"Disabled\"},{\"name\":\"slpvlop\",\"id\":38.77565618282895,\"windowsServerSubscription\":\"Disabled\",\"nodeType\":\"FirstParty\",\"ehcResourceId\":\"dwzbaiue\",\"manufacturer\":\"a\",\"model\":\"nyqupedeojnabck\",\"osName\":\"mtxpsiebtfh\",\"osVersion\":\"esap\",\"osDisplayVersion\":\"rdqmhjjdhtldwkyz\",\"serialNumber\":\"utknc\",\"coreCount\":58.26754862273958,\"memoryInGiB\":91.1911214778656,\"lastLicensingTimestamp\":\"2021-06-10T13:25:17Z\",\"oemActivation\":\"Enabled\"}],\"lastUpdated\":\"2021-06-12T12:47:04Z\",\"msiExpirationTimeStamp\":\"2021-10-13T03:47:08Z\",\"imdsAttestation\":\"Enabled\",\"diagnosticLevel\":\"Basic\",\"supportedCapabilities\":[\"nmic\"],\"clusterType\":\"FirstParty\",\"manufacturer\":\"eoveilovnotyf\",\"oemActivation\":\"Enabled\",\"hardwareClass\":\"Small\"}") .toObject(ClusterReportedProperties.class); - Assertions.assertEquals(DiagnosticLevel.OFF, model.diagnosticLevel()); + Assertions.assertEquals(DiagnosticLevel.BASIC, model.diagnosticLevel()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterSdnPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterSdnPropertiesTests.java deleted file mode 100644 index 1266fb6532e1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClusterSdnPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.ClusterSdnProperties; - -public final class ClusterSdnPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterSdnProperties model = BinaryData.fromString( - "{\"sdnStatus\":\"Enabled\",\"sdnDomainName\":\"mgucna\",\"sdnApiAddress\":\"t\",\"sdnIntegrationIntent\":\"Disable\"}") - .toObject(ClusterSdnProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentityMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentityMockTests.java index ccfdea284507..593db7ea9062 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentityMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentityMockTests.java @@ -20,7 +20,7 @@ public final class ClustersCreateIdentityMockTests { @Test public void testCreateIdentity() throws Exception { String responseStr - = "{\"properties\":{\"aadClientId\":\"qlefnohey\",\"aadTenantId\":\"fopkyll\",\"aadServicePrincipalObjectId\":\"yenjpwdmsfw\",\"aadApplicationObjectId\":\"rsvevcneqswxhqh\"}}"; + = "{\"properties\":{\"aadClientId\":\"kgtxkrdtulcrcj\",\"aadTenantId\":\"lotcsubmzoonsv\",\"aadServicePrincipalObjectId\":\"chkxfpwhdysl\",\"aadApplicationObjectId\":\"lglmnnkkwayqsh\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testCreateIdentity() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClusterIdentityResponse response - = manager.clusters().createIdentity("vehyklel", "qdvpqfbxgycudusd", com.azure.core.util.Context.NONE); + = manager.clusters().createIdentity("kyelsyasvfnkwmy", "jjekrknfdrugj", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteMockTests.java index c7b85d759c40..9008b475045f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.clusters().delete("qscjpvqerqxk", "mwdz", com.azure.core.util.Context.NONE); + manager.clusters().delete("azdfsqxhyqmrej", "arnpvgrsz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DefaultExtensionDetailsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DefaultExtensionDetailsTests.java index 879ce158b3a4..27092e9872c3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DefaultExtensionDetailsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DefaultExtensionDetailsTests.java @@ -11,7 +11,7 @@ public final class DefaultExtensionDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DefaultExtensionDetails model - = BinaryData.fromString("{\"category\":\"bquxigjy\",\"consentTime\":\"2021-09-19T22:03:44Z\"}") + = BinaryData.fromString("{\"category\":\"pemvtzfkufubljof\",\"consentTime\":\"2021-09-01T11:04:48Z\"}") .toObject(DefaultExtensionDetails.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentClusterTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentClusterTests.java index 6544f7b66265..df0d96cfcf60 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentClusterTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentClusterTests.java @@ -13,30 +13,30 @@ public final class DeploymentClusterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentCluster model = BinaryData.fromString( - "{\"name\":\"qrhzoymibmrqyib\",\"witnessType\":\"wfluszdt\",\"witnessPath\":\"rkwofyyvoqa\",\"cloudAccountName\":\"iexpbtgiwbwo\",\"azureServiceEndpoint\":\"washr\",\"hardwareClass\":\"Small\",\"clusterPattern\":\"RackAware\"}") + "{\"name\":\"dvxzbncblylpst\",\"witnessType\":\"hh\",\"witnessPath\":\"rzdzucerscdnt\",\"cloudAccountName\":\"vfiwjmygtdss\",\"azureServiceEndpoint\":\"wtmwerio\",\"hardwareClass\":\"Small\",\"clusterPattern\":\"RackAware\"}") .toObject(DeploymentCluster.class); - Assertions.assertEquals("qrhzoymibmrqyib", model.name()); - Assertions.assertEquals("wfluszdt", model.witnessType()); - Assertions.assertEquals("rkwofyyvoqa", model.witnessPath()); - Assertions.assertEquals("iexpbtgiwbwo", model.cloudAccountName()); - Assertions.assertEquals("washr", model.azureServiceEndpoint()); + Assertions.assertEquals("dvxzbncblylpst", model.name()); + Assertions.assertEquals("hh", model.witnessType()); + Assertions.assertEquals("rzdzucerscdnt", model.witnessPath()); + Assertions.assertEquals("vfiwjmygtdss", model.cloudAccountName()); + Assertions.assertEquals("wtmwerio", model.azureServiceEndpoint()); Assertions.assertEquals(ClusterPattern.RACK_AWARE, model.clusterPattern()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentCluster model = new DeploymentCluster().withName("qrhzoymibmrqyib") - .withWitnessType("wfluszdt") - .withWitnessPath("rkwofyyvoqa") - .withCloudAccountName("iexpbtgiwbwo") - .withAzureServiceEndpoint("washr") + DeploymentCluster model = new DeploymentCluster().withName("dvxzbncblylpst") + .withWitnessType("hh") + .withWitnessPath("rzdzucerscdnt") + .withCloudAccountName("vfiwjmygtdss") + .withAzureServiceEndpoint("wtmwerio") .withClusterPattern(ClusterPattern.RACK_AWARE); model = BinaryData.fromObject(model).toObject(DeploymentCluster.class); - Assertions.assertEquals("qrhzoymibmrqyib", model.name()); - Assertions.assertEquals("wfluszdt", model.witnessType()); - Assertions.assertEquals("rkwofyyvoqa", model.witnessPath()); - Assertions.assertEquals("iexpbtgiwbwo", model.cloudAccountName()); - Assertions.assertEquals("washr", model.azureServiceEndpoint()); + Assertions.assertEquals("dvxzbncblylpst", model.name()); + Assertions.assertEquals("hh", model.witnessType()); + Assertions.assertEquals("rzdzucerscdnt", model.witnessPath()); + Assertions.assertEquals("vfiwjmygtdss", model.cloudAccountName()); + Assertions.assertEquals("wtmwerio", model.azureServiceEndpoint()); Assertions.assertEquals(ClusterPattern.RACK_AWARE, model.clusterPattern()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingAdapterPropertyOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingAdapterPropertyOverridesTests.java index 97ff3b242287..4f6d03521b6e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingAdapterPropertyOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingAdapterPropertyOverridesTests.java @@ -11,23 +11,23 @@ public final class DeploymentSettingAdapterPropertyOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DeploymentSettingAdapterPropertyOverrides model = BinaryData - .fromString("{\"jumboPacket\":\"doaon\",\"networkDirect\":\"jcntuj\",\"networkDirectTechnology\":\"c\"}") + DeploymentSettingAdapterPropertyOverrides model = BinaryData.fromString( + "{\"jumboPacket\":\"lpcirelsf\",\"networkDirect\":\"enwabfatk\",\"networkDirectTechnology\":\"dxbjhwuaanozj\"}") .toObject(DeploymentSettingAdapterPropertyOverrides.class); - Assertions.assertEquals("doaon", model.jumboPacket()); - Assertions.assertEquals("jcntuj", model.networkDirect()); - Assertions.assertEquals("c", model.networkDirectTechnology()); + Assertions.assertEquals("lpcirelsf", model.jumboPacket()); + Assertions.assertEquals("enwabfatk", model.networkDirect()); + Assertions.assertEquals("dxbjhwuaanozj", model.networkDirectTechnology()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentSettingAdapterPropertyOverrides model - = new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("doaon") - .withNetworkDirect("jcntuj") - .withNetworkDirectTechnology("c"); + = new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("lpcirelsf") + .withNetworkDirect("enwabfatk") + .withNetworkDirectTechnology("dxbjhwuaanozj"); model = BinaryData.fromObject(model).toObject(DeploymentSettingAdapterPropertyOverrides.class); - Assertions.assertEquals("doaon", model.jumboPacket()); - Assertions.assertEquals("jcntuj", model.networkDirect()); - Assertions.assertEquals("c", model.networkDirectTechnology()); + Assertions.assertEquals("lpcirelsf", model.jumboPacket()); + Assertions.assertEquals("enwabfatk", model.networkDirect()); + Assertions.assertEquals("dxbjhwuaanozj", model.networkDirectTechnology()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingHostNetworkTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingHostNetworkTests.java index 0b4fae8adc16..14fbf80a4b15 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingHostNetworkTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingHostNetworkTests.java @@ -23,177 +23,181 @@ public final class DeploymentSettingHostNetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingHostNetwork model = BinaryData.fromString( - "{\"intents\":[{\"name\":\"kzivgvvcnayrh\",\"trafficType\":[\"xxmueedn\",\"rdvstkwqqtch\",\"alm\",\"mtdaa\"],\"adapter\":[\"v\",\"vgpiohgwxrt\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"pxgy\",\"loadBalancingAlgorithm\":\"gvr\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"ukghimdblxgw\",\"priorityValue8021Action_SMB\":\"fnjhfjxwmszkkfo\",\"bandwidthPercentage_SMB\":\"eyfkzikfja\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"vxwc\",\"networkDirect\":\"lpcirelsf\",\"networkDirectTechnology\":\"enwabfatk\"}},{\"name\":\"dxbjhwuaanozj\",\"trafficType\":[\"hyoulpjr\"],\"adapter\":[\"glrvimjwosytxi\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"cktqumiekkezzi\",\"loadBalancingAlgorithm\":\"ly\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"qgge\",\"priorityValue8021Action_SMB\":\"unygaeqid\",\"bandwidthPercentage_SMB\":\"fatpxllrxcyjmoa\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"r\",\"networkDirect\":\"wdmjsjqbjhhyx\",\"networkDirectTechnology\":\"wlycoduhpkxkg\"}}],\"storageNetworks\":[{\"name\":\"eqnajxqugjhkycu\",\"networkAdapterName\":\"ddg\",\"vlanId\":\"ofwq\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"lkrm\",\"ipv4Address\":\"i\",\"subnetMask\":\"xacqqudfnbyx\"}]},{\"name\":\"aabjyvayffimrz\",\"networkAdapterName\":\"uzqogsexnevf\",\"vlanId\":\"wnwmewzs\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"uzsoi\",\"ipv4Address\":\"ud\",\"subnetMask\":\"rx\"},{\"physicalNode\":\"thzvaytdwkqbrqu\",\"ipv4Address\":\"axhexiilivp\",\"subnetMask\":\"iirqtd\"},{\"physicalNode\":\"axoruzfgsquy\",\"ipv4Address\":\"rxxle\",\"subnetMask\":\"ramxjezwlwnw\"},{\"physicalNode\":\"qlcvydy\",\"ipv4Address\":\"tdooaoj\",\"subnetMask\":\"iodkooebwnujhem\"}]}],\"sanNetworks\":{\"clusterNetworkConfig\":{\"adapterProperties\":{\"priorityValue8021ActionCluster\":640428654,\"priorityValue8021ActionSmb\":1312724328,\"bandwidthPercentageSmb\":1751076005,\"jumboPacket\":1291411043},\"adapterIPConfig\":[{\"name\":\"wj\",\"networkAdapterName\":\"lt\",\"vlanId\":510695304,\"addressPrefix\":\"vefkdlfoakggk\"},{\"name\":\"agaowpulpqblylsy\",\"networkAdapterName\":\"qjnsjervtia\",\"vlanId\":1353667842,\"addressPrefix\":\"sz\"},{\"name\":\"mpsbzkfzbeyv\",\"networkAdapterName\":\"qi\",\"vlanId\":1110186498,\"addressPrefix\":\"v\"},{\"name\":\"jxdxrbuukz\",\"networkAdapterName\":\"ewyhml\",\"vlanId\":963182303,\"addressPrefix\":\"tzpofncckwyfzq\"}]}},\"storageConnectivitySwitchless\":false,\"enableStorageAutoIp\":false}") + "{\"intents\":[{\"name\":\"jutiiswacff\",\"trafficType\":[\"zzewkfvhqcrai\"],\"adapter\":[\"n\",\"pfuflrw\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"xyjrxsagafcnih\",\"loadBalancingAlgorithm\":\"qapnedgfbcv\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"pkeqdcvdrhvoo\",\"priorityValue8021Action_SMB\":\"otbobzdopcj\",\"bandwidthPercentage_SMB\":\"nhdldwmgxcx\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"utwu\",\"networkDirect\":\"grpkhjwniyqs\",\"networkDirectTechnology\":\"i\"}},{\"name\":\"dggkzzlvmbmpa\",\"trafficType\":[\"dfvue\",\"yw\",\"bpfvm\"],\"adapter\":[\"rfouyftaakcpw\",\"yzvqt\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"xkp\",\"loadBalancingAlgorithm\":\"smond\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"vypomgkopkwho\",\"priorityValue8021Action_SMB\":\"pajqgxysm\",\"bandwidthPercentage_SMB\":\"mbqfqvmk\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"pvhelxprg\",\"networkDirect\":\"atddc\",\"networkDirectTechnology\":\"bcuejrjxgci\"}},{\"name\":\"brh\",\"trafficType\":[\"sdqrhzoymibmrq\",\"ibahwflus\",\"dtmhrkwofyyvoqa\",\"piexpbtgiw\"],\"adapter\":[\"enwash\",\"tdtkcn\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"okulpiujwa\",\"loadBalancingAlgorithm\":\"ipqiiobyuqerpq\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"ciuqgbdb\",\"priorityValue8021Action_SMB\":\"auvfbtkuwhhmhyk\",\"bandwidthPercentage_SMB\":\"oxafn\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"chkoymkcdyh\",\"networkDirect\":\"kkpwdreqnovvq\",\"networkDirectTechnology\":\"vljxywsu\"}}],\"storageNetworks\":[{\"name\":\"s\",\"networkAdapterName\":\"sytgadgvraea\",\"vlanId\":\"e\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"rrwlquuijfqkace\",\"ipv4Address\":\"ipfpubji\",\"subnetMask\":\"wifto\"}]}],\"sanNetworks\":{\"clusterNetworkConfig\":{\"adapterProperties\":{\"priorityValue8021ActionCluster\":2128432962,\"priorityValue8021ActionSmb\":1615767806,\"bandwidthPercentageSmb\":491288629,\"jumboPacket\":710710602},\"adapterIPConfig\":[{\"name\":\"nynfsynljphuo\",\"networkAdapterName\":\"odlqiyntor\",\"vlanId\":1915861757,\"addressPrefix\":\"eosjswsr\"},{\"name\":\"lyzrpzbchckqqzqi\",\"networkAdapterName\":\"iysui\",\"vlanId\":2121235922,\"addressPrefix\":\"ked\"},{\"name\":\"trwyhqmib\",\"networkAdapterName\":\"hwit\",\"vlanId\":1364304656,\"addressPrefix\":\"yynpcdpumnzgmwz\"},{\"name\":\"abikns\",\"networkAdapterName\":\"gj\",\"vlanId\":1714142762,\"addressPrefix\":\"dtlwwrlkd\"}]}},\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":true}") .toObject(DeploymentSettingHostNetwork.class); - Assertions.assertEquals("kzivgvvcnayrh", model.intents().get(0).name()); - Assertions.assertEquals("xxmueedn", model.intents().get(0).trafficType().get(0)); - Assertions.assertEquals("v", model.intents().get(0).adapter().get(0)); - Assertions.assertFalse(model.intents().get(0).overrideVirtualSwitchConfiguration()); - Assertions.assertEquals("pxgy", model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); - Assertions.assertEquals("gvr", + Assertions.assertEquals("jutiiswacff", model.intents().get(0).name()); + Assertions.assertEquals("zzewkfvhqcrai", model.intents().get(0).trafficType().get(0)); + Assertions.assertEquals("n", model.intents().get(0).adapter().get(0)); + Assertions.assertTrue(model.intents().get(0).overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("xyjrxsagafcnih", + model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("qapnedgfbcv", model.intents().get(0).virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertTrue(model.intents().get(0).overrideQosPolicy()); - Assertions.assertEquals("ukghimdblxgw", + Assertions.assertFalse(model.intents().get(0).overrideQosPolicy()); + Assertions.assertEquals("pkeqdcvdrhvoo", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionCluster()); - Assertions.assertEquals("fnjhfjxwmszkkfo", + Assertions.assertEquals("otbobzdopcj", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionSmb()); - Assertions.assertEquals("eyfkzikfja", model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertEquals("nhdldwmgxcx", model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); Assertions.assertTrue(model.intents().get(0).overrideAdapterProperty()); - Assertions.assertEquals("vxwc", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); - Assertions.assertEquals("lpcirelsf", model.intents().get(0).adapterPropertyOverrides().networkDirect()); - Assertions.assertEquals("enwabfatk", - model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); - Assertions.assertEquals("eqnajxqugjhkycu", model.storageNetworks().get(0).name()); - Assertions.assertEquals("ddg", model.storageNetworks().get(0).networkAdapterName()); - Assertions.assertEquals("ofwq", model.storageNetworks().get(0).vlanId()); - Assertions.assertEquals("lkrm", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); - Assertions.assertEquals("i", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("xacqqudfnbyx", - model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); - Assertions.assertEquals(640428654, + Assertions.assertEquals("utwu", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("grpkhjwniyqs", model.intents().get(0).adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("i", model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("s", model.storageNetworks().get(0).name()); + Assertions.assertEquals("sytgadgvraea", model.storageNetworks().get(0).networkAdapterName()); + Assertions.assertEquals("e", model.storageNetworks().get(0).vlanId()); + Assertions.assertEquals("rrwlquuijfqkace", + model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("ipfpubji", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("wifto", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); + Assertions.assertEquals(2128432962, model.sanNetworks().clusterNetworkConfig().adapterProperties().priorityValue8021ActionCluster()); - Assertions.assertEquals(1312724328, + Assertions.assertEquals(1615767806, model.sanNetworks().clusterNetworkConfig().adapterProperties().priorityValue8021ActionSmb()); - Assertions.assertEquals(1751076005, + Assertions.assertEquals(491288629, model.sanNetworks().clusterNetworkConfig().adapterProperties().bandwidthPercentageSmb()); - Assertions.assertEquals(1291411043, + Assertions.assertEquals(710710602, model.sanNetworks().clusterNetworkConfig().adapterProperties().jumboPacket()); - Assertions.assertEquals("wj", model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).name()); - Assertions.assertEquals("lt", + Assertions.assertEquals("nynfsynljphuo", + model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).name()); + Assertions.assertEquals("odlqiyntor", model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(510695304, + Assertions.assertEquals(1915861757, model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("vefkdlfoakggk", + Assertions.assertEquals("eosjswsr", model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).addressPrefix()); - Assertions.assertFalse(model.storageConnectivitySwitchless()); - Assertions.assertFalse(model.enableStorageAutoIp()); + Assertions.assertTrue(model.storageConnectivitySwitchless()); + Assertions.assertTrue(model.enableStorageAutoIp()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentSettingHostNetwork model = new DeploymentSettingHostNetwork() .withIntents(Arrays.asList( - new DeploymentSettingIntents().withName("kzivgvvcnayrh") - .withTrafficType(Arrays.asList("xxmueedn", "rdvstkwqqtch", "alm", "mtdaa")) - .withAdapter(Arrays.asList("v", "vgpiohgwxrt")) - .withOverrideVirtualSwitchConfiguration(false) + new DeploymentSettingIntents().withName("jutiiswacff") + .withTrafficType(Arrays.asList("zzewkfvhqcrai")) + .withAdapter(Arrays.asList("n", "pfuflrw")) + .withOverrideVirtualSwitchConfiguration(true) .withVirtualSwitchConfigurationOverrides( - new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("pxgy") - .withLoadBalancingAlgorithm("gvr")) - .withOverrideQosPolicy(true) - .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("ukghimdblxgw") - .withPriorityValue8021ActionSmb("fnjhfjxwmszkkfo") - .withBandwidthPercentageSmb("eyfkzikfja")) + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("xyjrxsagafcnih") + .withLoadBalancingAlgorithm("qapnedgfbcv")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("pkeqdcvdrhvoo") + .withPriorityValue8021ActionSmb("otbobzdopcj") + .withBandwidthPercentageSmb("nhdldwmgxcx")) .withOverrideAdapterProperty(true) .withAdapterPropertyOverrides( - new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("vxwc") - .withNetworkDirect("lpcirelsf") - .withNetworkDirectTechnology("enwabfatk")), - new DeploymentSettingIntents().withName("dxbjhwuaanozj") - .withTrafficType(Arrays.asList("hyoulpjr")) - .withAdapter(Arrays.asList("glrvimjwosytxi")) + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("utwu") + .withNetworkDirect("grpkhjwniyqs") + .withNetworkDirectTechnology("i")), + new DeploymentSettingIntents().withName("dggkzzlvmbmpa") + .withTrafficType(Arrays.asList("dfvue", "yw", "bpfvm")) + .withAdapter(Arrays.asList("rfouyftaakcpw", "yzvqt")) .withOverrideVirtualSwitchConfiguration(false) .withVirtualSwitchConfigurationOverrides( - new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("cktqumiekkezzi") - .withLoadBalancingAlgorithm("ly")) + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("xkp") + .withLoadBalancingAlgorithm("smond")) + .withOverrideQosPolicy(true) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("vypomgkopkwho") + .withPriorityValue8021ActionSmb("pajqgxysm") + .withBandwidthPercentageSmb("mbqfqvmk")) + .withOverrideAdapterProperty(false) + .withAdapterPropertyOverrides( + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("pvhelxprg") + .withNetworkDirect("atddc") + .withNetworkDirectTechnology("bcuejrjxgci")), + new DeploymentSettingIntents().withName("brh") + .withTrafficType(Arrays.asList("sdqrhzoymibmrq", "ibahwflus", "dtmhrkwofyyvoqa", "piexpbtgiw")) + .withAdapter(Arrays.asList("enwash", "tdtkcn")) + .withOverrideVirtualSwitchConfiguration(true) + .withVirtualSwitchConfigurationOverrides( + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("okulpiujwa") + .withLoadBalancingAlgorithm("ipqiiobyuqerpq")) .withOverrideQosPolicy(false) - .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("qgge") - .withPriorityValue8021ActionSmb("unygaeqid") - .withBandwidthPercentageSmb("fatpxllrxcyjmoa")) - .withOverrideAdapterProperty(true) - .withAdapterPropertyOverrides(new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("r") - .withNetworkDirect("wdmjsjqbjhhyx") - .withNetworkDirectTechnology("wlycoduhpkxkg")))) - .withStorageNetworks(Arrays.asList( - new DeploymentSettingStorageNetworks().withName("eqnajxqugjhkycu") - .withNetworkAdapterName("ddg") - .withVlanId("ofwq") - .withStorageAdapterIpInfo( - Arrays.asList(new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("lkrm") - .withIpv4Address("i") - .withSubnetMask("xacqqudfnbyx"))), - new DeploymentSettingStorageNetworks().withName("aabjyvayffimrz") - .withNetworkAdapterName("uzqogsexnevf") - .withVlanId("wnwmewzs") - .withStorageAdapterIpInfo(Arrays.asList( - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("uzsoi") - .withIpv4Address("ud") - .withSubnetMask("rx"), - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("thzvaytdwkqbrqu") - .withIpv4Address("axhexiilivp") - .withSubnetMask("iirqtd"), - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("axoruzfgsquy") - .withIpv4Address("rxxle") - .withSubnetMask("ramxjezwlwnw"), - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("qlcvydy") - .withIpv4Address("tdooaoj") - .withSubnetMask("iodkooebwnujhem"))))) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("ciuqgbdb") + .withPriorityValue8021ActionSmb("auvfbtkuwhhmhyk") + .withBandwidthPercentageSmb("oxafn")) + .withOverrideAdapterProperty(false) + .withAdapterPropertyOverrides( + new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("chkoymkcdyh") + .withNetworkDirect("kkpwdreqnovvq") + .withNetworkDirectTechnology("vljxywsu")))) + .withStorageNetworks( + Arrays + .asList(new DeploymentSettingStorageNetworks().withName("s") + .withNetworkAdapterName("sytgadgvraea") + .withVlanId("e") + .withStorageAdapterIpInfo(Arrays + .asList(new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("rrwlquuijfqkace") + .withIpv4Address("ipfpubji") + .withSubnetMask("wifto"))))) .withSanNetworks(new SanNetworks().withClusterNetworkConfig(new SanClusterNetworkConfig() - .withAdapterProperties(new SanAdapterProperties().withPriorityValue8021ActionCluster(640428654) - .withPriorityValue8021ActionSmb(1312724328) - .withBandwidthPercentageSmb(1751076005) - .withJumboPacket(1291411043)) + .withAdapterProperties(new SanAdapterProperties().withPriorityValue8021ActionCluster(2128432962) + .withPriorityValue8021ActionSmb(1615767806) + .withBandwidthPercentageSmb(491288629) + .withJumboPacket(710710602)) .withAdapterIPConfig(Arrays.asList( - new SanAdapterIPConfig().withName("wj") - .withNetworkAdapterName("lt") - .withVlanId(510695304) - .withAddressPrefix("vefkdlfoakggk"), - new SanAdapterIPConfig().withName("agaowpulpqblylsy") - .withNetworkAdapterName("qjnsjervtia") - .withVlanId(1353667842) - .withAddressPrefix("sz"), - new SanAdapterIPConfig().withName("mpsbzkfzbeyv") - .withNetworkAdapterName("qi") - .withVlanId(1110186498) - .withAddressPrefix("v"), - new SanAdapterIPConfig().withName("jxdxrbuukz") - .withNetworkAdapterName("ewyhml") - .withVlanId(963182303) - .withAddressPrefix("tzpofncckwyfzq"))))) - .withStorageConnectivitySwitchless(false) - .withEnableStorageAutoIp(false); + new SanAdapterIPConfig().withName("nynfsynljphuo") + .withNetworkAdapterName("odlqiyntor") + .withVlanId(1915861757) + .withAddressPrefix("eosjswsr"), + new SanAdapterIPConfig().withName("lyzrpzbchckqqzqi") + .withNetworkAdapterName("iysui") + .withVlanId(2121235922) + .withAddressPrefix("ked"), + new SanAdapterIPConfig().withName("trwyhqmib") + .withNetworkAdapterName("hwit") + .withVlanId(1364304656) + .withAddressPrefix("yynpcdpumnzgmwz"), + new SanAdapterIPConfig().withName("abikns") + .withNetworkAdapterName("gj") + .withVlanId(1714142762) + .withAddressPrefix("dtlwwrlkd"))))) + .withStorageConnectivitySwitchless(true) + .withEnableStorageAutoIp(true); model = BinaryData.fromObject(model).toObject(DeploymentSettingHostNetwork.class); - Assertions.assertEquals("kzivgvvcnayrh", model.intents().get(0).name()); - Assertions.assertEquals("xxmueedn", model.intents().get(0).trafficType().get(0)); - Assertions.assertEquals("v", model.intents().get(0).adapter().get(0)); - Assertions.assertFalse(model.intents().get(0).overrideVirtualSwitchConfiguration()); - Assertions.assertEquals("pxgy", model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); - Assertions.assertEquals("gvr", + Assertions.assertEquals("jutiiswacff", model.intents().get(0).name()); + Assertions.assertEquals("zzewkfvhqcrai", model.intents().get(0).trafficType().get(0)); + Assertions.assertEquals("n", model.intents().get(0).adapter().get(0)); + Assertions.assertTrue(model.intents().get(0).overrideVirtualSwitchConfiguration()); + Assertions.assertEquals("xyjrxsagafcnih", + model.intents().get(0).virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("qapnedgfbcv", model.intents().get(0).virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertTrue(model.intents().get(0).overrideQosPolicy()); - Assertions.assertEquals("ukghimdblxgw", + Assertions.assertFalse(model.intents().get(0).overrideQosPolicy()); + Assertions.assertEquals("pkeqdcvdrhvoo", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionCluster()); - Assertions.assertEquals("fnjhfjxwmszkkfo", + Assertions.assertEquals("otbobzdopcj", model.intents().get(0).qosPolicyOverrides().priorityValue8021ActionSmb()); - Assertions.assertEquals("eyfkzikfja", model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertEquals("nhdldwmgxcx", model.intents().get(0).qosPolicyOverrides().bandwidthPercentageSmb()); Assertions.assertTrue(model.intents().get(0).overrideAdapterProperty()); - Assertions.assertEquals("vxwc", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); - Assertions.assertEquals("lpcirelsf", model.intents().get(0).adapterPropertyOverrides().networkDirect()); - Assertions.assertEquals("enwabfatk", - model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); - Assertions.assertEquals("eqnajxqugjhkycu", model.storageNetworks().get(0).name()); - Assertions.assertEquals("ddg", model.storageNetworks().get(0).networkAdapterName()); - Assertions.assertEquals("ofwq", model.storageNetworks().get(0).vlanId()); - Assertions.assertEquals("lkrm", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); - Assertions.assertEquals("i", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("xacqqudfnbyx", - model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); - Assertions.assertEquals(640428654, + Assertions.assertEquals("utwu", model.intents().get(0).adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("grpkhjwniyqs", model.intents().get(0).adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("i", model.intents().get(0).adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("s", model.storageNetworks().get(0).name()); + Assertions.assertEquals("sytgadgvraea", model.storageNetworks().get(0).networkAdapterName()); + Assertions.assertEquals("e", model.storageNetworks().get(0).vlanId()); + Assertions.assertEquals("rrwlquuijfqkace", + model.storageNetworks().get(0).storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("ipfpubji", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("wifto", model.storageNetworks().get(0).storageAdapterIpInfo().get(0).subnetMask()); + Assertions.assertEquals(2128432962, model.sanNetworks().clusterNetworkConfig().adapterProperties().priorityValue8021ActionCluster()); - Assertions.assertEquals(1312724328, + Assertions.assertEquals(1615767806, model.sanNetworks().clusterNetworkConfig().adapterProperties().priorityValue8021ActionSmb()); - Assertions.assertEquals(1751076005, + Assertions.assertEquals(491288629, model.sanNetworks().clusterNetworkConfig().adapterProperties().bandwidthPercentageSmb()); - Assertions.assertEquals(1291411043, + Assertions.assertEquals(710710602, model.sanNetworks().clusterNetworkConfig().adapterProperties().jumboPacket()); - Assertions.assertEquals("wj", model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).name()); - Assertions.assertEquals("lt", + Assertions.assertEquals("nynfsynljphuo", + model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).name()); + Assertions.assertEquals("odlqiyntor", model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(510695304, + Assertions.assertEquals(1915861757, model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("vefkdlfoakggk", + Assertions.assertEquals("eosjswsr", model.sanNetworks().clusterNetworkConfig().adapterIPConfig().get(0).addressPrefix()); - Assertions.assertFalse(model.storageConnectivitySwitchless()); - Assertions.assertFalse(model.enableStorageAutoIp()); + Assertions.assertTrue(model.storageConnectivitySwitchless()); + Assertions.assertTrue(model.enableStorageAutoIp()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingIntentsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingIntentsTests.java index 7d2382d2cd62..9acc2fbc6f4d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingIntentsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingIntentsTests.java @@ -16,55 +16,55 @@ public final class DeploymentSettingIntentsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingIntents model = BinaryData.fromString( - "{\"name\":\"yq\",\"trafficType\":[\"feqztppriol\",\"or\",\"altol\"],\"adapter\":[\"wsobqwcsdbn\",\"dcfhucqdpf\",\"vglsbjjca\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"t\",\"loadBalancingAlgorithm\":\"dut\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"r\",\"priorityValue8021Action_SMB\":\"qtvcofudflvkgj\",\"bandwidthPercentage_SMB\":\"gdknnqv\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"n\",\"networkDirect\":\"rudsg\",\"networkDirectTechnology\":\"hmk\"}}") + "{\"name\":\"kotl\",\"trafficType\":[\"yhgsy\"],\"adapter\":[\"gjltdtbnnhado\",\"crkvcikhnv\",\"amqgxqquezikyw\",\"gxk\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"melwuipiccjz\",\"loadBalancingAlgorithm\":\"ivgvvcna\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"nxxmueedndrdv\",\"priorityValue8021Action_SMB\":\"kwqqtchealmf\",\"bandwidthPercentage_SMB\":\"d\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"v\",\"networkDirect\":\"gpiohgwxrtfudxe\",\"networkDirectTechnology\":\"gyqagvrvmnpkuk\"}}") .toObject(DeploymentSettingIntents.class); - Assertions.assertEquals("yq", model.name()); - Assertions.assertEquals("feqztppriol", model.trafficType().get(0)); - Assertions.assertEquals("wsobqwcsdbn", model.adapter().get(0)); + Assertions.assertEquals("kotl", model.name()); + Assertions.assertEquals("yhgsy", model.trafficType().get(0)); + Assertions.assertEquals("gjltdtbnnhado", model.adapter().get(0)); Assertions.assertFalse(model.overrideVirtualSwitchConfiguration()); - Assertions.assertEquals("t", model.virtualSwitchConfigurationOverrides().enableIov()); - Assertions.assertEquals("dut", model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertTrue(model.overrideQosPolicy()); - Assertions.assertEquals("r", model.qosPolicyOverrides().priorityValue8021ActionCluster()); - Assertions.assertEquals("qtvcofudflvkgj", model.qosPolicyOverrides().priorityValue8021ActionSmb()); - Assertions.assertEquals("gdknnqv", model.qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertEquals("melwuipiccjz", model.virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("ivgvvcna", model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); + Assertions.assertFalse(model.overrideQosPolicy()); + Assertions.assertEquals("nxxmueedndrdv", model.qosPolicyOverrides().priorityValue8021ActionCluster()); + Assertions.assertEquals("kwqqtchealmf", model.qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("d", model.qosPolicyOverrides().bandwidthPercentageSmb()); Assertions.assertFalse(model.overrideAdapterProperty()); - Assertions.assertEquals("n", model.adapterPropertyOverrides().jumboPacket()); - Assertions.assertEquals("rudsg", model.adapterPropertyOverrides().networkDirect()); - Assertions.assertEquals("hmk", model.adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("v", model.adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("gpiohgwxrtfudxe", model.adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("gyqagvrvmnpkuk", model.adapterPropertyOverrides().networkDirectTechnology()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentSettingIntents model = new DeploymentSettingIntents().withName("yq") - .withTrafficType(Arrays.asList("feqztppriol", "or", "altol")) - .withAdapter(Arrays.asList("wsobqwcsdbn", "dcfhucqdpf", "vglsbjjca")) + DeploymentSettingIntents model = new DeploymentSettingIntents().withName("kotl") + .withTrafficType(Arrays.asList("yhgsy")) + .withAdapter(Arrays.asList("gjltdtbnnhado", "crkvcikhnv", "amqgxqquezikyw", "gxk")) .withOverrideVirtualSwitchConfiguration(false) .withVirtualSwitchConfigurationOverrides( - new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("t") - .withLoadBalancingAlgorithm("dut")) - .withOverrideQosPolicy(true) - .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("r") - .withPriorityValue8021ActionSmb("qtvcofudflvkgj") - .withBandwidthPercentageSmb("gdknnqv")) + new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("melwuipiccjz") + .withLoadBalancingAlgorithm("ivgvvcna")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("nxxmueedndrdv") + .withPriorityValue8021ActionSmb("kwqqtchealmf") + .withBandwidthPercentageSmb("d")) .withOverrideAdapterProperty(false) - .withAdapterPropertyOverrides(new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("n") - .withNetworkDirect("rudsg") - .withNetworkDirectTechnology("hmk")); + .withAdapterPropertyOverrides(new DeploymentSettingAdapterPropertyOverrides().withJumboPacket("v") + .withNetworkDirect("gpiohgwxrtfudxe") + .withNetworkDirectTechnology("gyqagvrvmnpkuk")); model = BinaryData.fromObject(model).toObject(DeploymentSettingIntents.class); - Assertions.assertEquals("yq", model.name()); - Assertions.assertEquals("feqztppriol", model.trafficType().get(0)); - Assertions.assertEquals("wsobqwcsdbn", model.adapter().get(0)); + Assertions.assertEquals("kotl", model.name()); + Assertions.assertEquals("yhgsy", model.trafficType().get(0)); + Assertions.assertEquals("gjltdtbnnhado", model.adapter().get(0)); Assertions.assertFalse(model.overrideVirtualSwitchConfiguration()); - Assertions.assertEquals("t", model.virtualSwitchConfigurationOverrides().enableIov()); - Assertions.assertEquals("dut", model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); - Assertions.assertTrue(model.overrideQosPolicy()); - Assertions.assertEquals("r", model.qosPolicyOverrides().priorityValue8021ActionCluster()); - Assertions.assertEquals("qtvcofudflvkgj", model.qosPolicyOverrides().priorityValue8021ActionSmb()); - Assertions.assertEquals("gdknnqv", model.qosPolicyOverrides().bandwidthPercentageSmb()); + Assertions.assertEquals("melwuipiccjz", model.virtualSwitchConfigurationOverrides().enableIov()); + Assertions.assertEquals("ivgvvcna", model.virtualSwitchConfigurationOverrides().loadBalancingAlgorithm()); + Assertions.assertFalse(model.overrideQosPolicy()); + Assertions.assertEquals("nxxmueedndrdv", model.qosPolicyOverrides().priorityValue8021ActionCluster()); + Assertions.assertEquals("kwqqtchealmf", model.qosPolicyOverrides().priorityValue8021ActionSmb()); + Assertions.assertEquals("d", model.qosPolicyOverrides().bandwidthPercentageSmb()); Assertions.assertFalse(model.overrideAdapterProperty()); - Assertions.assertEquals("n", model.adapterPropertyOverrides().jumboPacket()); - Assertions.assertEquals("rudsg", model.adapterPropertyOverrides().networkDirect()); - Assertions.assertEquals("hmk", model.adapterPropertyOverrides().networkDirectTechnology()); + Assertions.assertEquals("v", model.adapterPropertyOverrides().jumboPacket()); + Assertions.assertEquals("gpiohgwxrtfudxe", model.adapterPropertyOverrides().networkDirect()); + Assertions.assertEquals("gyqagvrvmnpkuk", model.adapterPropertyOverrides().networkDirectTechnology()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingListResultTests.java index 6119eb7b0d7f..0422928120ce 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingListResultTests.java @@ -14,12 +14,12 @@ public final class DeploymentSettingListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"arcNodeResourceIds\":[\"fffiak\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"m\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"mmji\",\"steps\":[{},{}]},\"deploymentStatus\":{\"status\":\"phvwauyqncygu\",\"steps\":[{},{},{},{}]}}},\"id\":\"p\",\"name\":\"dscwxqupevzhf\",\"type\":\"totxhojujb\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"arcNodeResourceIds\":[\"c\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"bjx\",\"scaleUnits\":[{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"lrcoolsttpki\",\"steps\":[{},{}]},\"deploymentStatus\":{\"status\":\"ujrywvtyl\",\"steps\":[{},{}]}}},\"id\":\"curdoiwiitht\",\"name\":\"wubxc\",\"type\":\"ihwqknfdntwjchr\"}],\"nextLink\":\"oihxumwctondzjlu\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Error\",\"arcNodeResourceIds\":[\"vzvfvaawzqadfl\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"glae\",\"scaleUnits\":[{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}},{\"deploymentData\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"icokpv\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"mldgxobfirc\",\"steps\":[{}]}}},\"id\":\"ciayzriykhya\",\"name\":\"fvjlboxqvkjlmx\",\"type\":\"omdynhdwdigum\"}],\"nextLink\":\"raauzzpt\"}") .toObject(DeploymentSettingListResult.class); - Assertions.assertEquals("fffiak", model.value().get(0).arcNodeResourceIds().get(0)); + Assertions.assertEquals("vzvfvaawzqadfl", model.value().get(0).arcNodeResourceIds().get(0)); Assertions.assertEquals(DeploymentMode.VALIDATE, model.value().get(0).deploymentMode()); - Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, model.value().get(0).operationType()); - Assertions.assertEquals("m", model.value().get(0).deploymentConfiguration().version()); - Assertions.assertEquals("oihxumwctondzjlu", model.nextLink()); + Assertions.assertEquals(OperationType.CLUSTER_PROVISIONING, model.value().get(0).operationType()); + Assertions.assertEquals("glae", model.value().get(0).deploymentConfiguration().version()); + Assertions.assertEquals("raauzzpt", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageAdapterIpInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageAdapterIpInfoTests.java index 3cf59666808e..e30375645e60 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageAdapterIpInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageAdapterIpInfoTests.java @@ -12,22 +12,23 @@ public final class DeploymentSettingStorageAdapterIpInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingStorageAdapterIpInfo model = BinaryData - .fromString("{\"physicalNode\":\"hewpusdsttwv\",\"ipv4Address\":\"vbbejdcng\",\"subnetMask\":\"m\"}") + .fromString( + "{\"physicalNode\":\"xcyjmoadsuvarmy\",\"ipv4Address\":\"mjsjqb\",\"subnetMask\":\"hyxxrwlycoduhpk\"}") .toObject(DeploymentSettingStorageAdapterIpInfo.class); - Assertions.assertEquals("hewpusdsttwv", model.physicalNode()); - Assertions.assertEquals("vbbejdcng", model.ipv4Address()); - Assertions.assertEquals("m", model.subnetMask()); + Assertions.assertEquals("xcyjmoadsuvarmy", model.physicalNode()); + Assertions.assertEquals("mjsjqb", model.ipv4Address()); + Assertions.assertEquals("hyxxrwlycoduhpk", model.subnetMask()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentSettingStorageAdapterIpInfo model - = new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("hewpusdsttwv") - .withIpv4Address("vbbejdcng") - .withSubnetMask("m"); + = new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("xcyjmoadsuvarmy") + .withIpv4Address("mjsjqb") + .withSubnetMask("hyxxrwlycoduhpk"); model = BinaryData.fromObject(model).toObject(DeploymentSettingStorageAdapterIpInfo.class); - Assertions.assertEquals("hewpusdsttwv", model.physicalNode()); - Assertions.assertEquals("vbbejdcng", model.ipv4Address()); - Assertions.assertEquals("m", model.subnetMask()); + Assertions.assertEquals("xcyjmoadsuvarmy", model.physicalNode()); + Assertions.assertEquals("mjsjqb", model.ipv4Address()); + Assertions.assertEquals("hyxxrwlycoduhpk", model.subnetMask()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageNetworksTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageNetworksTests.java index e07cbf88ede0..3968d3ce5acf 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageNetworksTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingStorageNetworksTests.java @@ -14,40 +14,34 @@ public final class DeploymentSettingStorageNetworksTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingStorageNetworks model = BinaryData.fromString( - "{\"name\":\"df\",\"networkAdapterName\":\"waezkojvd\",\"vlanId\":\"zfoqouicybxar\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"ufoxc\",\"ipv4Address\":\"opidoamciodh\",\"subnetMask\":\"azxkhnzbonlwnto\"},{\"physicalNode\":\"okdwb\",\"ipv4Address\":\"kszzcmrvexztv\",\"subnetMask\":\"qgsfraoyzkoow\"},{\"physicalNode\":\"mnguxawqaldsyu\",\"ipv4Address\":\"imerqfobwyznk\",\"subnetMask\":\"kutwpf\"},{\"physicalNode\":\"a\",\"ipv4Address\":\"hrskdsnfd\",\"subnetMask\":\"oakgtdlmkkzev\"}]}") + "{\"name\":\"ph\",\"networkAdapterName\":\"ulpjr\",\"vlanId\":\"ag\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"mjwosytx\",\"ipv4Address\":\"cskfcktqumiekk\",\"subnetMask\":\"zikhl\"},{\"physicalNode\":\"jhdgqggebdunyga\",\"ipv4Address\":\"idb\",\"subnetMask\":\"atpxl\"}]}") .toObject(DeploymentSettingStorageNetworks.class); - Assertions.assertEquals("df", model.name()); - Assertions.assertEquals("waezkojvd", model.networkAdapterName()); - Assertions.assertEquals("zfoqouicybxar", model.vlanId()); - Assertions.assertEquals("ufoxc", model.storageAdapterIpInfo().get(0).physicalNode()); - Assertions.assertEquals("opidoamciodh", model.storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("azxkhnzbonlwnto", model.storageAdapterIpInfo().get(0).subnetMask()); + Assertions.assertEquals("ph", model.name()); + Assertions.assertEquals("ulpjr", model.networkAdapterName()); + Assertions.assertEquals("ag", model.vlanId()); + Assertions.assertEquals("mjwosytx", model.storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("cskfcktqumiekk", model.storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("zikhl", model.storageAdapterIpInfo().get(0).subnetMask()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentSettingStorageNetworks model = new DeploymentSettingStorageNetworks().withName("df") - .withNetworkAdapterName("waezkojvd") - .withVlanId("zfoqouicybxar") + DeploymentSettingStorageNetworks model = new DeploymentSettingStorageNetworks().withName("ph") + .withNetworkAdapterName("ulpjr") + .withVlanId("ag") .withStorageAdapterIpInfo(Arrays.asList( - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("ufoxc") - .withIpv4Address("opidoamciodh") - .withSubnetMask("azxkhnzbonlwnto"), - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("okdwb") - .withIpv4Address("kszzcmrvexztv") - .withSubnetMask("qgsfraoyzkoow"), - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("mnguxawqaldsyu") - .withIpv4Address("imerqfobwyznk") - .withSubnetMask("kutwpf"), - new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("a") - .withIpv4Address("hrskdsnfd") - .withSubnetMask("oakgtdlmkkzev"))); + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("mjwosytx") + .withIpv4Address("cskfcktqumiekk") + .withSubnetMask("zikhl"), + new DeploymentSettingStorageAdapterIpInfo().withPhysicalNode("jhdgqggebdunyga") + .withIpv4Address("idb") + .withSubnetMask("atpxl"))); model = BinaryData.fromObject(model).toObject(DeploymentSettingStorageNetworks.class); - Assertions.assertEquals("df", model.name()); - Assertions.assertEquals("waezkojvd", model.networkAdapterName()); - Assertions.assertEquals("zfoqouicybxar", model.vlanId()); - Assertions.assertEquals("ufoxc", model.storageAdapterIpInfo().get(0).physicalNode()); - Assertions.assertEquals("opidoamciodh", model.storageAdapterIpInfo().get(0).ipv4Address()); - Assertions.assertEquals("azxkhnzbonlwnto", model.storageAdapterIpInfo().get(0).subnetMask()); + Assertions.assertEquals("ph", model.name()); + Assertions.assertEquals("ulpjr", model.networkAdapterName()); + Assertions.assertEquals("ag", model.vlanId()); + Assertions.assertEquals("mjwosytx", model.storageAdapterIpInfo().get(0).physicalNode()); + Assertions.assertEquals("cskfcktqumiekk", model.storageAdapterIpInfo().get(0).ipv4Address()); + Assertions.assertEquals("zikhl", model.storageAdapterIpInfo().get(0).subnetMask()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingVirtualSwitchConfigurationOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingVirtualSwitchConfigurationOverridesTests.java index b94180735878..09c206ae97fb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingVirtualSwitchConfigurationOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingVirtualSwitchConfigurationOverridesTests.java @@ -12,19 +12,19 @@ public final class DeploymentSettingVirtualSwitchConfigurationOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSettingVirtualSwitchConfigurationOverrides model - = BinaryData.fromString("{\"enableIov\":\"grauwjuetaebur\",\"loadBalancingAlgorithm\":\"dmovsm\"}") + = BinaryData.fromString("{\"enableIov\":\"i\",\"loadBalancingAlgorithm\":\"blxgwimf\"}") .toObject(DeploymentSettingVirtualSwitchConfigurationOverrides.class); - Assertions.assertEquals("grauwjuetaebur", model.enableIov()); - Assertions.assertEquals("dmovsm", model.loadBalancingAlgorithm()); + Assertions.assertEquals("i", model.enableIov()); + Assertions.assertEquals("blxgwimf", model.loadBalancingAlgorithm()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentSettingVirtualSwitchConfigurationOverrides model - = new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("grauwjuetaebur") - .withLoadBalancingAlgorithm("dmovsm"); + = new DeploymentSettingVirtualSwitchConfigurationOverrides().withEnableIov("i") + .withLoadBalancingAlgorithm("blxgwimf"); model = BinaryData.fromObject(model).toObject(DeploymentSettingVirtualSwitchConfigurationOverrides.class); - Assertions.assertEquals("grauwjuetaebur", model.enableIov()); - Assertions.assertEquals("dmovsm", model.loadBalancingAlgorithm()); + Assertions.assertEquals("i", model.enableIov()); + Assertions.assertEquals("blxgwimf", model.loadBalancingAlgorithm()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateMockTests.java index 7f0d0811c9d5..6175cc4b5789 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateMockTests.java @@ -28,7 +28,7 @@ public final class DeploymentSettingsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"arcNodeResourceIds\":[\"lzmslubnknyfuy\",\"jhvrrllfswarmy\",\"w\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"eysyqnipehfwwcbf\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"vjucfjisosfzl\",\"steps\":[{},{}]},\"deploymentStatus\":{\"status\":\"fyzguaxf\",\"steps\":[{},{},{}]}}},\"id\":\"xgofq\",\"name\":\"qwsjmihuvrq\",\"type\":\"bxdoicqpkntl\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"arcNodeResourceIds\":[\"csaaqgoq\",\"diuycsbskowkrbhz\",\"rb\",\"htmqowi\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"qgucyhfaimqv\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"fpeoehgfmq\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"xvlzjxplhpevasyn\",\"steps\":[{},{},{}]}}},\"id\":\"yielb\",\"name\":\"rvvbqvknmpecqxg\",\"type\":\"qa\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,22 +38,19 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentSetting response = manager.deploymentSettings() - .define("mzgccy") - .withExistingCluster("dqseypdlmajpuy", "oaf") - .withArcNodeResourceIds(Arrays.asList("si", "hedmm", "oneeyrxpa", "xtzayqwddig")) - .withDeploymentMode(DeploymentMode.DEPLOY) + .define("iyvndjokgwes") + .withExistingCluster("gufy", "fdk") + .withArcNodeResourceIds(Arrays.asList("rqpfzlp", "j")) + .withDeploymentMode(DeploymentMode.VALIDATE) .withOperationType(OperationType.CLUSTER_PROVISIONING) - .withDeploymentConfiguration(new DeploymentConfiguration().withVersion("lzdssi") - .withScaleUnits(Arrays.asList( - new ScaleUnits().withDeploymentData(new DeploymentData()).withSbePartnerInfo(new SbePartnerInfo()), - new ScaleUnits().withDeploymentData(new DeploymentData()).withSbePartnerInfo(new SbePartnerInfo()), - new ScaleUnits().withDeploymentData(new DeploymentData()) - .withSbePartnerInfo(new SbePartnerInfo())))) + .withDeploymentConfiguration(new DeploymentConfiguration().withVersion("ueaujqbbg") + .withScaleUnits(Arrays.asList(new ScaleUnits().withDeploymentData(new DeploymentData()) + .withSbePartnerInfo(new SbePartnerInfo())))) .create(); - Assertions.assertEquals("lzmslubnknyfuy", response.arcNodeResourceIds().get(0)); + Assertions.assertEquals("csaaqgoq", response.arcNodeResourceIds().get(0)); Assertions.assertEquals(DeploymentMode.DEPLOY, response.deploymentMode()); - Assertions.assertEquals(OperationType.CLUSTER_PROVISIONING, response.operationType()); - Assertions.assertEquals("eysyqnipehfwwcbf", response.deploymentConfiguration().version()); + Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, response.operationType()); + Assertions.assertEquals("qgucyhfaimqv", response.deploymentConfiguration().version()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetWithResponseMockTests.java index c90e53abe394..ac8c66de9458 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class DeploymentSettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"arcNodeResourceIds\":[\"gqp\",\"dhgxgiea\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterProvisioning\",\"deploymentConfiguration\":{\"version\":\"xavlozukgs\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"maxcebnb\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"mqqerwqxpj\",\"steps\":[{},{}]}}},\"id\":\"dfkhttuobrxz\",\"name\":\"hyt\",\"type\":\"bjkjge\"}"; + = "{\"properties\":{\"provisioningState\":\"Accepted\",\"arcNodeResourceIds\":[\"omlnws\",\"v\",\"dls\",\"lxkqesdfeds\"],\"deploymentMode\":\"Deploy\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"coinmphymcqi\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"nufbxwei\",\"steps\":[{},{},{},{}]},\"deploymentStatus\":{\"status\":\"jovf\",\"steps\":[{},{}]}}},\"id\":\"dhuihaouwudhuao\",\"name\":\"hjkehwvumosqir\",\"type\":\"amqprlo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentSetting response = manager.deploymentSettings() - .getWithResponse("s", "rxs", "mfpabw", com.azure.core.util.Context.NONE) + .getWithResponse("dux", "pg", "cqeb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gqp", response.arcNodeResourceIds().get(0)); + Assertions.assertEquals("omlnws", response.arcNodeResourceIds().get(0)); Assertions.assertEquals(DeploymentMode.DEPLOY, response.deploymentMode()); - Assertions.assertEquals(OperationType.CLUSTER_PROVISIONING, response.operationType()); - Assertions.assertEquals("xavlozukgs", response.deploymentConfiguration().version()); + Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, response.operationType()); + Assertions.assertEquals("coinmphymcqi", response.deploymentConfiguration().version()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersMockTests.java index faeba1e0c214..45cee9c44bca 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersMockTests.java @@ -24,7 +24,7 @@ public final class DeploymentSettingsListByClustersMockTests { @Test public void testListByClusters() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"arcNodeResourceIds\":[\"qrmlq\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"jgqqrugwesps\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"tluwozfvzasupc\",\"steps\":[{}]},\"deploymentStatus\":{\"status\":\"vwio\",\"steps\":[{},{},{}]}}},\"id\":\"cgmlmpn\",\"name\":\"qxuyi\",\"type\":\"rzn\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"arcNodeResourceIds\":[\"fmzsizzhravr\",\"jkjymgqbgcx\",\"nqxgz\",\"lermkmerg\"],\"deploymentMode\":\"Validate\",\"operationType\":\"ClusterUpgrade\",\"deploymentConfiguration\":{\"version\":\"hnp\",\"scaleUnits\":[{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}},{\"deploymentData\":{},\"sbePartnerInfo\":{}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"kdljqnvtsdydshkp\",\"steps\":[{},{},{},{}]},\"deploymentStatus\":{\"status\":\"oowwziz\",\"steps\":[{}]}}},\"id\":\"f\",\"name\":\"qz\",\"type\":\"ti\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,11 +34,11 @@ public void testListByClusters() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.deploymentSettings() - .listByClusters("cwtfmabvbmn", "twofxfmhlvy", com.azure.core.util.Context.NONE); + .listByClusters("rugejcvjkjy", "zcmtagelajdyolj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("qrmlq", response.iterator().next().arcNodeResourceIds().get(0)); + Assertions.assertEquals("fmzsizzhravr", response.iterator().next().arcNodeResourceIds().get(0)); Assertions.assertEquals(DeploymentMode.VALIDATE, response.iterator().next().deploymentMode()); Assertions.assertEquals(OperationType.CLUSTER_UPGRADE, response.iterator().next().operationType()); - Assertions.assertEquals("jgqqrugwesps", response.iterator().next().deploymentConfiguration().version()); + Assertions.assertEquals("hnp", response.iterator().next().deploymentConfiguration().version()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentStepTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentStepTests.java new file mode 100644 index 000000000000..376b69513f81 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentStepTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentStep; + +public final class DeploymentStepTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeploymentStep model = BinaryData.fromString( + "{\"name\":\"fukuvsjcswsmystu\",\"description\":\"qypfcv\",\"fullStepIndex\":\"rchpqbmfpjbabwid\",\"startTimeUtc\":\"xsspuunnoxyhk\",\"endTimeUtc\":\"qddrihpfhoqcaae\",\"status\":\"aomdjvlpjxx\",\"steps\":[{\"name\":\"msgeivsiykzk\",\"description\":\"cjdx\",\"fullStepIndex\":\"bzo\",\"startTimeUtc\":\"culapzwyrpgogtq\",\"endTimeUtc\":\"pnylb\",\"status\":\"ajlyjtlvofqzhv\",\"steps\":[{\"name\":\"yfm\",\"description\":\"uxrkjp\",\"fullStepIndex\":\"w\",\"startTimeUtc\":\"zwiivwzjbhyzs\",\"endTimeUtc\":\"rkambt\",\"status\":\"egv\",\"steps\":[{},{},{},{}],\"exception\":[\"eqvldspast\"]},{\"name\":\"kkdmfl\",\"description\":\"stmjlxrri\",\"fullStepIndex\":\"zapeewchpx\",\"startTimeUtc\":\"twkuziycs\",\"endTimeUtc\":\"vu\",\"status\":\"ztcktyh\",\"steps\":[{},{},{}],\"exception\":[\"cgzulwmmrqzzr\",\"jvpglydzgk\"]}],\"exception\":[\"eevt\",\"epr\"]}],\"exception\":[\"nwy\"]}") + .toObject(DeploymentStep.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeviceConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeviceConfigurationTests.java index 40d7fdc0af65..3aa2aae5b9f0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeviceConfigurationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DeviceConfigurationTests.java @@ -14,42 +14,52 @@ public final class DeviceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeviceConfiguration model = BinaryData.fromString( - "{\"nicDetails\":[{\"adapterName\":\"aqvlgafcqusr\",\"interfaceDescription\":\"etnwsdtutnw\",\"componentId\":\"uycvuzhyrmewip\",\"driverVersion\":\"ekdxuku\",\"ip4Address\":\"sjjxundxgketw\",\"subnetMask\":\"hzjhf\",\"defaultGateway\":\"hvvmuvgpmun\",\"dnsServers\":[\"xvmhf\"],\"defaultIsolationId\":\"zjyi\"}],\"deviceMetadata\":\"as\"}") + "{\"nicDetails\":[{\"adapterName\":\"sxze\",\"interfaceDescription\":\"axwk\",\"componentId\":\"ykhv\",\"driverVersion\":\"xepmrut\",\"ip4Address\":\"abaobnslujdjltym\",\"subnetMask\":\"vguihywar\",\"defaultGateway\":\"pphkixkykxds\",\"dnsServers\":[\"emmucfxh\",\"kkflrmymyincqlhr\",\"s\"],\"defaultIsolationId\":\"lmiiiovg\"},{\"adapterName\":\"gxuugqkctotio\",\"interfaceDescription\":\"xteqdptjgwdtg\",\"componentId\":\"ranblwphqlkccu\",\"driverVersion\":\"ygqwahoiu\",\"ip4Address\":\"gniiprglvaw\",\"subnetMask\":\"z\",\"defaultGateway\":\"fypiv\",\"dnsServers\":[\"bjpmcubk\",\"ifoxxkubvphav\",\"mhbrbqgvg\"],\"defaultIsolationId\":\"pbbttefjoknss\"}],\"deviceMetadata\":\"zqedikdfrdbi\"}") .toObject(DeviceConfiguration.class); - Assertions.assertEquals("aqvlgafcqusr", model.nicDetails().get(0).adapterName()); - Assertions.assertEquals("etnwsdtutnw", model.nicDetails().get(0).interfaceDescription()); - Assertions.assertEquals("uycvuzhyrmewip", model.nicDetails().get(0).componentId()); - Assertions.assertEquals("ekdxuku", model.nicDetails().get(0).driverVersion()); - Assertions.assertEquals("sjjxundxgketw", model.nicDetails().get(0).ip4Address()); - Assertions.assertEquals("hzjhf", model.nicDetails().get(0).subnetMask()); - Assertions.assertEquals("hvvmuvgpmun", model.nicDetails().get(0).defaultGateway()); - Assertions.assertEquals("xvmhf", model.nicDetails().get(0).dnsServers().get(0)); - Assertions.assertEquals("zjyi", model.nicDetails().get(0).defaultIsolationId()); - Assertions.assertEquals("as", model.deviceMetadata()); + Assertions.assertEquals("sxze", model.nicDetails().get(0).adapterName()); + Assertions.assertEquals("axwk", model.nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("ykhv", model.nicDetails().get(0).componentId()); + Assertions.assertEquals("xepmrut", model.nicDetails().get(0).driverVersion()); + Assertions.assertEquals("abaobnslujdjltym", model.nicDetails().get(0).ip4Address()); + Assertions.assertEquals("vguihywar", model.nicDetails().get(0).subnetMask()); + Assertions.assertEquals("pphkixkykxds", model.nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("emmucfxh", model.nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("lmiiiovg", model.nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("zqedikdfrdbi", model.deviceMetadata()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeviceConfiguration model - = new DeviceConfiguration().withNicDetails(Arrays.asList(new NicDetail().withAdapterName("aqvlgafcqusr") - .withInterfaceDescription("etnwsdtutnw") - .withComponentId("uycvuzhyrmewip") - .withDriverVersion("ekdxuku") - .withIp4Address("sjjxundxgketw") - .withSubnetMask("hzjhf") - .withDefaultGateway("hvvmuvgpmun") - .withDnsServers(Arrays.asList("xvmhf")) - .withDefaultIsolationId("zjyi"))).withDeviceMetadata("as"); + DeviceConfiguration model = new DeviceConfiguration().withNicDetails(Arrays.asList( + new NicDetail().withAdapterName("sxze") + .withInterfaceDescription("axwk") + .withComponentId("ykhv") + .withDriverVersion("xepmrut") + .withIp4Address("abaobnslujdjltym") + .withSubnetMask("vguihywar") + .withDefaultGateway("pphkixkykxds") + .withDnsServers(Arrays.asList("emmucfxh", "kkflrmymyincqlhr", "s")) + .withDefaultIsolationId("lmiiiovg"), + new NicDetail().withAdapterName("gxuugqkctotio") + .withInterfaceDescription("xteqdptjgwdtg") + .withComponentId("ranblwphqlkccu") + .withDriverVersion("ygqwahoiu") + .withIp4Address("gniiprglvaw") + .withSubnetMask("z") + .withDefaultGateway("fypiv") + .withDnsServers(Arrays.asList("bjpmcubk", "ifoxxkubvphav", "mhbrbqgvg")) + .withDefaultIsolationId("pbbttefjoknss"))) + .withDeviceMetadata("zqedikdfrdbi"); model = BinaryData.fromObject(model).toObject(DeviceConfiguration.class); - Assertions.assertEquals("aqvlgafcqusr", model.nicDetails().get(0).adapterName()); - Assertions.assertEquals("etnwsdtutnw", model.nicDetails().get(0).interfaceDescription()); - Assertions.assertEquals("uycvuzhyrmewip", model.nicDetails().get(0).componentId()); - Assertions.assertEquals("ekdxuku", model.nicDetails().get(0).driverVersion()); - Assertions.assertEquals("sjjxundxgketw", model.nicDetails().get(0).ip4Address()); - Assertions.assertEquals("hzjhf", model.nicDetails().get(0).subnetMask()); - Assertions.assertEquals("hvvmuvgpmun", model.nicDetails().get(0).defaultGateway()); - Assertions.assertEquals("xvmhf", model.nicDetails().get(0).dnsServers().get(0)); - Assertions.assertEquals("zjyi", model.nicDetails().get(0).defaultIsolationId()); - Assertions.assertEquals("as", model.deviceMetadata()); + Assertions.assertEquals("sxze", model.nicDetails().get(0).adapterName()); + Assertions.assertEquals("axwk", model.nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("ykhv", model.nicDetails().get(0).componentId()); + Assertions.assertEquals("xepmrut", model.nicDetails().get(0).driverVersion()); + Assertions.assertEquals("abaobnslujdjltym", model.nicDetails().get(0).ip4Address()); + Assertions.assertEquals("vguihywar", model.nicDetails().get(0).subnetMask()); + Assertions.assertEquals("pphkixkykxds", model.nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("emmucfxh", model.nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("lmiiiovg", model.nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("zqedikdfrdbi", model.deviceMetadata()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskActionStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskActionStatusTests.java deleted file mode 100644 index 354f755d26e5..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskActionStatusTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.DiskActionStatus; - -public final class DiskActionStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskActionStatus model = BinaryData.fromString( - "{\"status\":\"fyaytvsly\",\"steps\":[{\"name\":\"niuarlcjiwgsxfai\",\"description\":\"wd\",\"fullStepIndex\":\"jjgnfgr\",\"startTimeUtc\":\"barc\",\"endTimeUtc\":\"aefzqsy\",\"status\":\"w\",\"steps\":[{\"name\":\"ytesm\",\"description\":\"crtfodqhuauzm\",\"fullStepIndex\":\"vrtrfz\",\"startTimeUtc\":\"ezvhj\",\"endTimeUtc\":\"xdyyrud\",\"status\":\"hswtvdkxbqssgfe\",\"steps\":[{},{},{},{}],\"exception\":[\"b\"]},{\"name\":\"fqjchivdrij\",\"description\":\"xndmuvar\",\"fullStepIndex\":\"mzjotprrmuh\",\"startTimeUtc\":\"htuzlxiwyopgar\",\"endTimeUtc\":\"ctwrapcz\",\"status\":\"jqyvzesipi\",\"steps\":[{},{}],\"exception\":[\"yo\"]},{\"name\":\"a\",\"description\":\"ndazabu\",\"fullStepIndex\":\"tsewkaupwhlz\",\"startTimeUtc\":\"kremgjl\",\"endTimeUtc\":\"vdorsirx\",\"status\":\"yrkqa\",\"steps\":[{},{},{},{}],\"exception\":[\"freprfvm\",\"inwteyrqsh\"]},{\"name\":\"bcejopylbl\",\"description\":\"prrw\",\"fullStepIndex\":\"pimtc\",\"startTimeUtc\":\"fx\",\"endTimeUtc\":\"ytzfsl\",\"status\":\"zhqikm\",\"steps\":[{},{},{},{}],\"exception\":[\"qemcdi\",\"isklbonxxupjxv\",\"rk\",\"kgenjqnnpjwkosn\"]}],\"exception\":[\"gfoujj\",\"xgdqmrlhnzkwops\",\"nyinxuprrxyxw\",\"ezbfqployuek\"]},{\"name\":\"pv\",\"description\":\"trsvjmnsvujnjkt\",\"fullStepIndex\":\"lefcjis\",\"startTimeUtc\":\"kdb\",\"endTimeUtc\":\"tfbjampq\",\"status\":\"lannmxynlsuqbw\",\"steps\":[{\"name\":\"k\",\"description\":\"vpatrgjjk\",\"fullStepIndex\":\"i\",\"startTimeUtc\":\"hoksmmculwk\",\"endTimeUtc\":\"cru\",\"status\":\"krjflsgaojb\",\"steps\":[{},{}],\"exception\":[\"doctpz\",\"ujzflmcd\",\"gxceluj\"]}],\"exception\":[\"lluunxh\",\"wlfxzfw\",\"geupcknece\",\"kgrvfpsjd\"]},{\"name\":\"gsytqpdzfyxcn\",\"description\":\"woxcgzbejqfb\",\"fullStepIndex\":\"opfjx\",\"startTimeUtc\":\"drpazqjkrfmbw\",\"endTimeUtc\":\"fcuuugtjigpg\",\"status\":\"iawohfmhn\",\"steps\":[{\"name\":\"cjjkmqenh\",\"description\":\"dzrpvsgl\",\"fullStepIndex\":\"ovslvivqsuvwtenb\",\"startTimeUtc\":\"i\",\"endTimeUtc\":\"khcyoaqxuk\",\"status\":\"cjuftekio\",\"steps\":[{}],\"exception\":[\"ewfhvpxjh\"]},{\"name\":\"ub\",\"description\":\"zabbwzgv\",\"fullStepIndex\":\"aix\",\"startTimeUtc\":\"ckixsps\",\"endTimeUtc\":\"gavkmv\",\"status\":\"zerejr\",\"steps\":[{},{},{},{}],\"exception\":[\"yetjxryo\",\"taeitwhlbecgihz\"]},{\"name\":\"emnrrabovrwwxy\",\"description\":\"jhspboxhifpps\",\"fullStepIndex\":\"eswyhh\",\"startTimeUtc\":\"fjuajxwwvcmmpe\",\"endTimeUtc\":\"y\",\"status\":\"vcmlaexbzbquf\",\"steps\":[{}],\"exception\":[\"jzay\",\"ldrorhyogzmsimeh\",\"cuuwdhtqqhyhnimx\",\"nsugisn\"]},{\"name\":\"wnwngh\",\"description\":\"ovke\",\"fullStepIndex\":\"micjixxfsf\",\"startTimeUtc\":\"rtnuguefxxijteb\",\"endTimeUtc\":\"eywetkrhlolmcn\",\"status\":\"pfgsvbbvaqdljnp\",\"steps\":[{}],\"exception\":[\"rdetawevxehuekdx\"]}],\"exception\":[\"vdovbrb\",\"erlpr\"]}]}") - .toObject(DiskActionStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskConfigurationTests.java deleted file mode 100644 index 0905225318d0..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskConfigurationTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.DiskConfiguration; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; -import com.azure.resourcemanager.azurestackhci.models.DiskVolumeConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiskConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskConfiguration model = BinaryData.fromString( - "{\"volumes\":[{\"sizeInBytes\":\"vzopaxmfmvsm\",\"path\":\"woxfaxdtnqifbsa\",\"fileSystem\":\"fat\"}]}") - .toObject(DiskConfiguration.class); - Assertions.assertEquals("vzopaxmfmvsm", model.volumes().get(0).sizeInBytes()); - Assertions.assertEquals("woxfaxdtnqifbsa", model.volumes().get(0).path()); - Assertions.assertEquals(DiskFileSystemType.FAT, model.volumes().get(0).fileSystem()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskConfiguration model = new DiskConfiguration() - .withVolumes(Arrays.asList(new DiskVolumeConfiguration().withSizeInBytes("vzopaxmfmvsm") - .withPath("woxfaxdtnqifbsa") - .withFileSystem(DiskFileSystemType.FAT))); - model = BinaryData.fromObject(model).toObject(DiskConfiguration.class); - Assertions.assertEquals("vzopaxmfmvsm", model.volumes().get(0).sizeInBytes()); - Assertions.assertEquals("woxfaxdtnqifbsa", model.volumes().get(0).path()); - Assertions.assertEquals(DiskFileSystemType.FAT, model.volumes().get(0).fileSystem()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskDeploymentStepTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskDeploymentStepTests.java deleted file mode 100644 index 9f4cfd776a77..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskDeploymentStepTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.DiskDeploymentStep; - -public final class DiskDeploymentStepTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskDeploymentStep model = BinaryData.fromString( - "{\"name\":\"qccddcbny\",\"description\":\"jccxwbp\",\"fullStepIndex\":\"ykdigqzlrznda\",\"startTimeUtc\":\"nidmjqmvytg\",\"endTimeUtc\":\"qlarhqt\",\"status\":\"caz\",\"steps\":[{\"name\":\"dzffzjwztsmpchg\",\"description\":\"y\",\"fullStepIndex\":\"gfyatig\",\"startTimeUtc\":\"frrkdknczgorywnv\",\"endTimeUtc\":\"tv\",\"status\":\"evdlh\",\"steps\":[{\"name\":\"arbp\",\"description\":\"ssrlvkpkpk\",\"fullStepIndex\":\"maccebxxopyi\",\"startTimeUtc\":\"vspeslhwyykgvr\",\"endTimeUtc\":\"pumdd\",\"status\":\"ajk\",\"steps\":[{}],\"exception\":[\"tpfcudvafnbfbqv\",\"nqnxhgkordwzej\",\"ecwzvcmbpwdluda\"]},{\"name\":\"rldidwmtff\",\"description\":\"tzl\",\"fullStepIndex\":\"chubagw\",\"startTimeUtc\":\"zuvigvl\",\"endTimeUtc\":\"frbzakp\",\"status\":\"cqra\",\"steps\":[{},{}],\"exception\":[\"suc\",\"ximcwqx\",\"nqjgsatkyv\",\"cb\"]},{\"name\":\"gcru\",\"description\":\"hirc\",\"fullStepIndex\":\"cvsvk\",\"startTimeUtc\":\"bjolpyoklkv\",\"endTimeUtc\":\"nadvhml\",\"status\":\"oi\",\"steps\":[{},{}],\"exception\":[\"bhtpsy\",\"oqemqw\",\"qszz\",\"yksik\"]}],\"exception\":[\"nvmw\",\"vg\"]}],\"exception\":[\"rbkompnbnfgyw\",\"o\",\"bepgcmahiwfry\",\"w\"]}") - .toObject(DiskDeploymentStep.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskJobReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskJobReportedPropertiesTests.java deleted file mode 100644 index 551794d8f30d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskJobReportedPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.DiskJobReportedProperties; - -public final class DiskJobReportedPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskJobReportedProperties model = BinaryData.fromString( - "{\"percentComplete\":1048510095,\"validationStatus\":{\"status\":\"nmzpas\",\"steps\":[{\"name\":\"jfiuofpi\",\"description\":\"dzlvssqywj\",\"fullStepIndex\":\"a\",\"startTimeUtc\":\"yhydvikmfn\",\"endTimeUtc\":\"millxgjs\",\"status\":\"zwgsoriobije\",\"steps\":[{\"name\":\"euynh\",\"description\":\"kayrgwy\",\"fullStepIndex\":\"io\",\"startTimeUtc\":\"weoftnorw\",\"endTimeUtc\":\"gsioc\",\"status\":\"kmv\",\"steps\":[{}],\"exception\":[\"zfffhtjnwo\"]}],\"exception\":[\"fjxtvlxxzqfc\",\"rr\"]},{\"name\":\"mxeezwyh\",\"description\":\"bjiqegmxdbsoh\",\"fullStepIndex\":\"hpyvdkgdet\",\"startTimeUtc\":\"wcanzbjekwuyckyv\",\"endTimeUtc\":\"nsm\",\"status\":\"fiwjbctvbp\",\"steps\":[{\"name\":\"jtotdxposcs\",\"description\":\"wuusiecktybh\",\"fullStepIndex\":\"xidhhxomil\",\"startTimeUtc\":\"xj\",\"endTimeUtc\":\"ugxwjwilmqrslaat\",\"status\":\"twujjzgx\",\"steps\":[{},{}],\"exception\":[\"xr\",\"gtvh\"]},{\"name\":\"qqy\",\"description\":\"kkt\",\"fullStepIndex\":\"zejogmkorvvmvm\",\"startTimeUtc\":\"fnqh\",\"endTimeUtc\":\"snosnqliwkmzojf\",\"status\":\"yalhtgm\",\"steps\":[{}],\"exception\":[\"bjbhrpgiqsttc\",\"crcmmaixp\"]}],\"exception\":[\"wifhbksldttohq\",\"lna\"]},{\"name\":\"tgs\",\"description\":\"ikvllrhtpmgl\",\"fullStepIndex\":\"oi\",\"startTimeUtc\":\"trawrqkza\",\"endTimeUtc\":\"unmpaklwzl\",\"status\":\"epr\",\"steps\":[{\"name\":\"l\",\"description\":\"aszfjs\",\"fullStepIndex\":\"cbduxapgrcqebmvr\",\"startTimeUtc\":\"omlnws\",\"endTimeUtc\":\"vdlsflxkqesdfeds\",\"status\":\"zancoinmp\",\"steps\":[{},{},{},{}],\"exception\":[\"i\",\"kltvdhqnufbx\",\"e\"]},{\"name\":\"bntojovfny\",\"description\":\"dhuihaouwudhuao\",\"fullStepIndex\":\"jkehwvumosqi\",\"startTimeUtc\":\"amqprlo\",\"endTimeUtc\":\"ugejcvjkjyczcmt\",\"status\":\"elajdyol\",\"steps\":[{}],\"exception\":[\"qfmzsizzhravrc\",\"kjymgqbgcxh\",\"qxgzxler\",\"km\"]},{\"name\":\"ghskirh\",\"description\":\"upkcbkfukdljqnvt\",\"fullStepIndex\":\"ydsh\",\"startTimeUtc\":\"afyalo\",\"endTimeUtc\":\"wz\",\"status\":\"znyufpqzs\",\"steps\":[{},{},{}],\"exception\":[\"fyjfd\"]}],\"exception\":[\"yvndjokgwesym\",\"qh\",\"qpfzlpejtznxlue\"]},{\"name\":\"jqbbgsimwejlw\",\"description\":\"bpjzobdwbcpraswk\",\"fullStepIndex\":\"ydtnaczkfwfatgaw\",\"startTimeUtc\":\"nskivdwgt\",\"endTimeUtc\":\"umecsaaq\",\"status\":\"qbdiuycsbskowkr\",\"steps\":[{\"name\":\"rb\",\"description\":\"tmqowiuasfgqg\",\"fullStepIndex\":\"yhfaimqvd\",\"startTimeUtc\":\"ozkgyfpeoehg\",\"endTimeUtc\":\"qmskkixv\",\"status\":\"jxplh\",\"steps\":[{},{}],\"exception\":[\"yntvzjyielbq\",\"vvbq\"]},{\"name\":\"nmpecqxgiqasifub\",\"description\":\"nstlpwqpjn\",\"fullStepIndex\":\"khtupsvyou\",\"startTimeUtc\":\"uiyxfwkztsmsfb\",\"endTimeUtc\":\"yllznfhkqytkztad\",\"status\":\"gfzdgjfcycrsvl\",\"steps\":[{},{},{},{}],\"exception\":[\"gqkzjuqw\",\"ajquzxpixhyoi\",\"nfdbgsoscienezf\"]},{\"name\":\"ennmf\",\"description\":\"pjnrtekwwnthro\",\"fullStepIndex\":\"dudsyiurztvktj\",\"startTimeUtc\":\"fecqkoqyouerga\",\"endTimeUtc\":\"puzxkpyehhfdyldh\",\"status\":\"edzfzqiyuqhtdere\",\"steps\":[{}],\"exception\":[\"kzwhpj\"]}],\"exception\":[\"xedzn\",\"xrfomcke\"]}]},\"deploymentStatus\":{\"status\":\"yifop\",\"steps\":[{\"name\":\"tpdyzoutxfptof\",\"description\":\"nuywe\",\"fullStepIndex\":\"gvad\",\"startTimeUtc\":\"aqwvkgjpytpmpvdn\",\"endTimeUtc\":\"e\",\"status\":\"ufb\",\"steps\":[{\"name\":\"nukkfaxzsvb\",\"description\":\"yjisskobq\",\"fullStepIndex\":\"lflioewyhxessm\",\"startTimeUtc\":\"kdpsqeqfbd\",\"endTimeUtc\":\"dsesbrujb\",\"status\":\"ppktlpdibfmthiea\",\"steps\":[{},{}],\"exception\":[\"nminzqplgtki\",\"onikzsrzfffjilzf\",\"pntogkensckh\",\"mcarm\"]},{\"name\":\"fxxkwykuqdndxl\",\"description\":\"h\",\"fullStepIndex\":\"gapvdgtfpeerscdx\",\"startTimeUtc\":\"rnjr\",\"endTimeUtc\":\"fmbgacn\",\"status\":\"fdtncmspsanma\",\"steps\":[{},{}],\"exception\":[\"qiqmlfvhlq\"]},{\"name\":\"kkqjmxptueipuug\",\"description\":\"drqmrp\",\"fullStepIndex\":\"uuonjkkxukguehvv\",\"startTimeUtc\":\"joegcjojlleuidp\",\"endTimeUtc\":\"onvhgnhtmepl\",\"status\":\"pjbap\",\"steps\":[{},{},{},{}],\"exception\":[\"kvavucgj\",\"ua\",\"qpmnu\",\"zhrchx\"]}],\"exception\":[\"zdmh\",\"wlvi\"]},{\"name\":\"mxm\",\"description\":\"tqd\",\"fullStepIndex\":\"ipdviscotyxb\",\"startTimeUtc\":\"ifefndslv\",\"endTimeUtc\":\"oemwsi\",\"status\":\"ailwdqmqfyd\",\"steps\":[{\"name\":\"fxlkd\",\"description\":\"wgnamkuuy\",\"fullStepIndex\":\"yuafixlxic\",\"startTimeUtc\":\"pthdcfmf\",\"endTimeUtc\":\"fasfod\",\"status\":\"palvngtw\",\"steps\":[{},{}],\"exception\":[\"gqrnt\",\"umdrcjlvkrkegty\",\"zuppiyx\"]}],\"exception\":[\"iydd\",\"eqzqvabmhvs\",\"xduetbapfc\",\"ewxtrl\"]},{\"name\":\"pxyazk\",\"description\":\"ir\",\"fullStepIndex\":\"xvb\",\"startTimeUtc\":\"wh\",\"endTimeUtc\":\"gbth\",\"status\":\"ritjbu\",\"steps\":[{\"name\":\"unozfvualjthoiv\",\"description\":\"wsn\",\"fullStepIndex\":\"rfihscj\",\"startTimeUtc\":\"kmhzbh\",\"endTimeUtc\":\"hf\",\"status\":\"i\",\"steps\":[{}],\"exception\":[\"em\"]},{\"name\":\"nuqqkotauratnicp\",\"description\":\"zsclefyrletn\",\"fullStepIndex\":\"lmfdg\",\"startTimeUtc\":\"bbuypwovvvsflee\",\"endTimeUtc\":\"oqayrehjuqwv\",\"status\":\"xrlzhpziha\",\"steps\":[{}],\"exception\":[\"zlxnqzubf\",\"nfdbgmkfwmjcwt\"]},{\"name\":\"fhxwyr\",\"description\":\"rehzlrynjpcha\",\"fullStepIndex\":\"aep\",\"startTimeUtc\":\"ajubo\",\"endTimeUtc\":\"ywevtjrieikmw\",\"status\":\"oklf\",\"steps\":[{}],\"exception\":[\"gucbmt\",\"ed\",\"cnnstjcyy\",\"vtzrxzhclecwwtz\"]},{\"name\":\"cloyhy\",\"description\":\"gi\",\"fullStepIndex\":\"zgyresgzsdt\",\"startTimeUtc\":\"byorjplb\",\"endTimeUtc\":\"ychakvy\",\"status\":\"bqvum\",\"steps\":[{}],\"exception\":[\"iuepmaxfnzlpqmp\",\"t\"]}],\"exception\":[\"vulb\",\"mrtuxyp\"]},{\"name\":\"fcaeooifqdyw\",\"description\":\"lobha\",\"fullStepIndex\":\"momfecorkfroc\",\"startTimeUtc\":\"mx\",\"endTimeUtc\":\"j\",\"status\":\"ezb\",\"steps\":[{\"name\":\"lslu\",\"description\":\"qfygpny\",\"fullStepIndex\":\"dzuqscag\",\"startTimeUtc\":\"voupr\",\"endTimeUtc\":\"tqzsslhmgwfnivr\",\"status\":\"fduiolhgyqvpb\",\"steps\":[{},{}],\"exception\":[\"z\",\"cfzlu\",\"zdquurbo\",\"mvhvz\"]},{\"name\":\"l\",\"description\":\"rnqujywzcqy\",\"fullStepIndex\":\"mnwsvh\",\"startTimeUtc\":\"gqiwy\",\"endTimeUtc\":\"tobdrrpnre\",\"status\":\"unsbfjhhlw\",\"steps\":[{},{},{},{}],\"exception\":[\"geattbzkg\"]},{\"name\":\"qnwqstt\",\"description\":\"uvcysjeufjxf\",\"fullStepIndex\":\"ditfnon\",\"startTimeUtc\":\"yuxlvrhprrv\",\"endTimeUtc\":\"onleqflvtl\",\"status\":\"bs\",\"steps\":[{}],\"exception\":[\"kuninttlnrjds\",\"dbuziciqppoqvg\"]},{\"name\":\"e\",\"description\":\"hwfwjnox\",\"fullStepIndex\":\"xtfnress\",\"startTimeUtc\":\"pg\",\"endTimeUtc\":\"ncjmgvsnvbtq\",\"status\":\"fmjymjnh\",\"steps\":[{},{},{},{}],\"exception\":[\"lbsu\",\"ub\",\"x\"]}],\"exception\":[\"lhzwh\",\"ukvbosjjfdizhr\"]}]}}") - .toObject(DiskJobReportedProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskReportedPropertiesTests.java deleted file mode 100644 index 9ed9f2f1a592..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskReportedPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.DiskReportedProperties; - -public final class DiskReportedPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskReportedProperties model = BinaryData.fromString( - "{\"diskName\":\"wfldsiuorinik\",\"model\":\"dpk\",\"manufacturer\":\"iwm\",\"isSupported\":false,\"serialNumber\":\"rx\",\"firmwareVersion\":\"qvvyczyay\",\"sizeInBytes\":\"tg\",\"storageType\":\"SAN\",\"diskType\":\"Other\",\"busLocation\":\"hragpxmib\",\"unallocatedSizeInBytes\":\"nupoyryefqmwovyz\",\"state\":\"Missing\",\"volumes\":[{\"sizeInBytes\":\"fpbjc\",\"path\":\"gvyieztkutnjil\",\"fileSystem\":\"kkreh\",\"partitionId\":\"tmjoduifvu\",\"partitionNumber\":83965567,\"offsetInBytes\":431595129062361243,\"name\":\"vjlgdez\",\"isBoot\":false,\"sizeRemainingInBytes\":\"ahoyiyaxqvj\",\"resourceName\":\"i\"},{\"sizeInBytes\":\"czkddn\",\"path\":\"vbooqbmdqrxy\",\"fileSystem\":\"ae\",\"partitionId\":\"cflwtjdtlr\",\"partitionNumber\":958463332,\"offsetInBytes\":1122075083974363856,\"name\":\"cuxd\",\"isBoot\":false,\"sizeRemainingInBytes\":\"ipsdudgcozzomehx\",\"resourceName\":\"ntolamlb\"}]}") - .toObject(DiskReportedProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskVolumeConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskVolumeConfigurationTests.java deleted file mode 100644 index 73a7d0b7437b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskVolumeConfigurationTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; -import com.azure.resourcemanager.azurestackhci.models.DiskVolumeConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DiskVolumeConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskVolumeConfiguration model - = BinaryData.fromString("{\"sizeInBytes\":\"iauesugmocpcjy\",\"path\":\"boel\",\"fileSystem\":\"fat32\"}") - .toObject(DiskVolumeConfiguration.class); - Assertions.assertEquals("iauesugmocpcjy", model.sizeInBytes()); - Assertions.assertEquals("boel", model.path()); - Assertions.assertEquals(DiskFileSystemType.FAT32, model.fileSystem()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskVolumeConfiguration model = new DiskVolumeConfiguration().withSizeInBytes("iauesugmocpcjy") - .withPath("boel") - .withFileSystem(DiskFileSystemType.FAT32); - model = BinaryData.fromObject(model).toObject(DiskVolumeConfiguration.class); - Assertions.assertEquals("iauesugmocpcjy", model.sizeInBytes()); - Assertions.assertEquals("boel", model.path()); - Assertions.assertEquals(DiskFileSystemType.FAT32, model.fileSystem()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskVolumeReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskVolumeReportedPropertiesTests.java deleted file mode 100644 index 5c4f236d2bd1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DiskVolumeReportedPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.DiskVolumeReportedProperties; - -public final class DiskVolumeReportedPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskVolumeReportedProperties model = BinaryData.fromString( - "{\"sizeInBytes\":\"uxkqllczipvwdt\",\"path\":\"kzdqiqdlratrkwxo\",\"fileSystem\":\"wxsuy\",\"partitionId\":\"nhrfgslgl\",\"partitionNumber\":384208738,\"offsetInBytes\":4858254683598494902,\"name\":\"ihuioaeo\",\"isBoot\":false,\"sizeRemainingInBytes\":\"tfeyvk\",\"resourceName\":\"gdd\"}") - .toObject(DiskVolumeReportedProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DnsZonesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DnsZonesTests.java index f038c8702643..c96df6ff6334 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DnsZonesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/DnsZonesTests.java @@ -12,17 +12,19 @@ public final class DnsZonesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DnsZones model = BinaryData.fromString("{\"dnsZoneName\":\"crkvcikhnv\",\"dnsForwarder\":[\"qgxqquezikyw\"]}") + DnsZones model = BinaryData + .fromString("{\"dnsZoneName\":\"fphsdyhtozfikdow\",\"dnsForwarder\":[\"uvxzxclvi\",\"hhqzonosgg\"]}") .toObject(DnsZones.class); - Assertions.assertEquals("crkvcikhnv", model.dnsZoneName()); - Assertions.assertEquals("qgxqquezikyw", model.dnsForwarder().get(0)); + Assertions.assertEquals("fphsdyhtozfikdow", model.dnsZoneName()); + Assertions.assertEquals("uvxzxclvi", model.dnsForwarder().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DnsZones model = new DnsZones().withDnsZoneName("crkvcikhnv").withDnsForwarder(Arrays.asList("qgxqquezikyw")); + DnsZones model = new DnsZones().withDnsZoneName("fphsdyhtozfikdow") + .withDnsForwarder(Arrays.asList("uvxzxclvi", "hhqzonosgg")); model = BinaryData.fromObject(model).toObject(DnsZones.class); - Assertions.assertEquals("crkvcikhnv", model.dnsZoneName()); - Assertions.assertEquals("qgxqquezikyw", model.dnsForwarder().get(0)); + Assertions.assertEquals("fphsdyhtozfikdow", model.dnsZoneName()); + Assertions.assertEquals("uvxzxclvi", model.dnsForwarder().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceActionStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceActionStatusTests.java new file mode 100644 index 000000000000..b076b2724935 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceActionStatusTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.EceActionStatus; + +public final class EceActionStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EceActionStatus model = BinaryData.fromString( + "{\"status\":\"mfxumvfcluyovw\",\"steps\":[{\"name\":\"fezzxscyhwzdg\",\"description\":\"ujb\",\"fullStepIndex\":\"omvzzbtd\",\"startTimeUtc\":\"vp\",\"endTimeUtc\":\"yujviylwdshfssn\",\"status\":\"gy\",\"steps\":[{\"name\":\"msgaoj\",\"description\":\"wncot\",\"fullStepIndex\":\"fhir\",\"startTimeUtc\":\"ymoxoftpipiwyczu\",\"endTimeUtc\":\"a\",\"status\":\"qjlihhyuspska\",\"steps\":[{},{},{},{}],\"exception\":[\"fwdgzxulucvp\",\"mrsreuzvxurisjnh\"]},{\"name\":\"txifqj\",\"description\":\"xmrhu\",\"fullStepIndex\":\"wp\",\"startTimeUtc\":\"sutrgjup\",\"endTimeUtc\":\"utpwoqhihejqgw\",\"status\":\"nfqn\",\"steps\":[{},{},{}],\"exception\":[\"xjvfoimwksl\"]},{\"name\":\"cizjxvydfceacvl\",\"description\":\"ygdyftumrtw\",\"fullStepIndex\":\"wjslbiwkojgcyzt\",\"startTimeUtc\":\"mznbaeqphch\",\"endTimeUtc\":\"rn\",\"status\":\"x\",\"steps\":[{},{},{},{}],\"exception\":[\"ykqgaifmvik\",\"bydvkhbejdz\",\"xcv\",\"srhnjivo\"]}],\"exception\":[\"novqfzge\",\"jdftuljltd\",\"ceamtm\",\"zuo\"]},{\"name\":\"jw\",\"description\":\"wqiok\",\"fullStepIndex\":\"sx\",\"startTimeUtc\":\"jmsvpkjp\",\"endTimeUtc\":\"kwcf\",\"status\":\"ljyxgtczhe\",\"steps\":[{\"name\":\"dshmkxmaehvbbx\",\"description\":\"iplt\",\"fullStepIndex\":\"htba\",\"startTimeUtc\":\"gx\",\"endTimeUtc\":\"rc\",\"status\":\"yklyhpluodpvruud\",\"steps\":[{}],\"exception\":[\"thost\"]},{\"name\":\"tstvdxeclzedq\",\"description\":\"vh\",\"fullStepIndex\":\"h\",\"startTimeUtc\":\"odqkdlwwqfb\",\"endTimeUtc\":\"lkxt\",\"status\":\"jfsmlmbtxhwgfwsr\",\"steps\":[{},{},{}],\"exception\":[\"ezbrhubskh\",\"dyg\",\"ookk\"]},{\"name\":\"qjbvleorfmlu\",\"description\":\"tqzfavyv\",\"fullStepIndex\":\"qybaryeua\",\"startTimeUtc\":\"kq\",\"endTimeUtc\":\"qgzsles\",\"status\":\"bhernntiew\",\"steps\":[{}],\"exception\":[\"quwrbehwag\",\"hbuffkmrq\",\"mvvhmxtdrjfuta\"]},{\"name\":\"ebjvewzcjzn\",\"description\":\"cpmguaadraufact\",\"fullStepIndex\":\"hzovaj\",\"startTimeUtc\":\"iuxxpshneekulfg\",\"endTimeUtc\":\"qubkw\",\"status\":\"enr\",\"steps\":[{},{}],\"exception\":[\"jbazpjuohminy\",\"lnorwmdu\",\"wpklvxw\",\"ygdxpgpqchis\"]}],\"exception\":[\"nnbj\",\"rxgibbd\"]},{\"name\":\"confozauors\",\"description\":\"okwbqplh\",\"fullStepIndex\":\"nuuepzlrp\",\"startTimeUtc\":\"zsoldwey\",\"endTimeUtc\":\"dunvmnnrwrbiorkt\",\"status\":\"ywjhhgdnhx\",\"steps\":[{\"name\":\"fomiloxgg\",\"description\":\"fi\",\"fullStepIndex\":\"dieuzaofj\",\"startTimeUtc\":\"vcyy\",\"endTimeUtc\":\"fgdo\",\"status\":\"ubiipuipwoqonma\",\"steps\":[{}],\"exception\":[\"izsh\",\"vcimpev\",\"gmblrri\"]},{\"name\":\"ywdxsmic\",\"description\":\"rwfscjfnynszquj\",\"fullStepIndex\":\"dvoqyt\",\"startTimeUtc\":\"yo\",\"endTimeUtc\":\"blgyavutpthj\",\"status\":\"oismsksbpimlqol\",\"steps\":[{},{},{},{}],\"exception\":[\"xxlxsffgcvizq\",\"dwl\",\"w\",\"youpfgfbkj\"]},{\"name\":\"dyhgkfminsg\",\"description\":\"zfttsttktlahb\",\"fullStepIndex\":\"ctxtgzukxi\",\"startTimeUtc\":\"m\",\"endTimeUtc\":\"gqqqxh\",\"status\":\"xrxc\",\"steps\":[{},{}],\"exception\":[\"av\",\"k\",\"dzf\"]}],\"exception\":[\"ivjlfrqttbajlka\"]},{\"name\":\"wxyiopidkqq\",\"description\":\"uvscxkdmligov\",\"fullStepIndex\":\"rxkpmloazuruoc\",\"startTimeUtc\":\"oorb\",\"endTimeUtc\":\"oybfhjxakvvj\",\"status\":\"lordilmywwtkgkxn\",\"steps\":[{\"name\":\"b\",\"description\":\"vudtjuewbcihx\",\"fullStepIndex\":\"whcjyxcc\",\"startTimeUtc\":\"vpayakkudzpx\",\"endTimeUtc\":\"jplmagstcy\",\"status\":\"pfkyrkdbdgiogsj\",\"steps\":[{},{}],\"exception\":[\"jnobaiyh\",\"d\",\"iacegfnmn\",\"fpmvmemfnczd\"]}],\"exception\":[\"b\",\"lxlllchpo\",\"bzevwrd\"]}]}") + .toObject(EceActionStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceReportedPropertiesTests.java new file mode 100644 index 000000000000..bf8811c0725b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EceReportedPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.EceReportedProperties; + +public final class EceReportedPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EceReportedProperties model = BinaryData.fromString( + "{\"validationStatus\":{\"status\":\"foqouicybx\",\"steps\":[{\"name\":\"szufoxciqopidoa\",\"description\":\"iodhkhazxkhnz\",\"fullStepIndex\":\"nlwntoe\",\"startTimeUtc\":\"kdwbwhkszz\",\"endTimeUtc\":\"rvexztvb\",\"status\":\"gsfraoyzkoow\",\"steps\":[{\"name\":\"guxawqaldsyuuxi\",\"description\":\"rqf\",\"fullStepIndex\":\"wyznkbyku\",\"startTimeUtc\":\"pfhpagmhrskdsnfd\",\"endTimeUtc\":\"oakgtdlmkkzev\",\"status\":\"hewpusdsttwv\",\"steps\":[{},{},{}],\"exception\":[\"ejdcngqqmoakuf\",\"m\"]},{\"name\":\"rwr\",\"description\":\"rtwaenuuzko\",\"fullStepIndex\":\"minrfdw\",\"startTimeUtc\":\"uhhziuiefozbhdm\",\"endTimeUtc\":\"l\",\"status\":\"qhoftrmaequiah\",\"steps\":[{},{},{},{}],\"exception\":[\"faoqzpiyylhal\",\"swhccsphk\",\"ivwitqscywugg\",\"oluhczbwemh\"]},{\"name\":\"rsbrgzdwm\",\"description\":\"eypqwdxggicccn\",\"fullStepIndex\":\"huexmk\",\"startTimeUtc\":\"lstvlzywe\",\"endTimeUtc\":\"zrncsdt\",\"status\":\"u\",\"steps\":[{},{},{},{}],\"exception\":[\"sfgytguslfead\",\"ygqukyhejh\",\"isxgfp\",\"lolp\"]},{\"name\":\"ksrpqv\",\"description\":\"zraehtwd\",\"fullStepIndex\":\"ftswibyrcdlbhsh\",\"startTimeUtc\":\"p\",\"endTimeUtc\":\"cstwity\",\"status\":\"evxccedcp\",\"steps\":[{},{},{}],\"exception\":[\"dnwzxltjcvnhltiu\"]}],\"exception\":[\"navvwx\",\"ibyqunyowxwlmdj\"]}]},\"deploymentStatus\":{\"status\":\"fgbvfvpdbo\",\"steps\":[{\"name\":\"zsjqlh\",\"description\":\"r\",\"fullStepIndex\":\"deibqip\",\"startTimeUtc\":\"ghvxndzwmkrefa\",\"endTimeUtc\":\"jorwkqnyhgbij\",\"status\":\"ivfxzsjabibsyst\",\"steps\":[{\"name\":\"djpvkvpbjxbkz\",\"description\":\"kd\",\"fullStepIndex\":\"cjabudurgkakmo\",\"startTimeUtc\":\"hjjklff\",\"endTimeUtc\":\"ouw\",\"status\":\"gzrf\",\"steps\":[{},{},{},{}],\"exception\":[\"bizikayuhq\",\"bjbsybb\",\"wrv\"]},{\"name\":\"dgmfpgvmpipasl\",\"description\":\"aqfxss\",\"fullStepIndex\":\"u\",\"startTimeUtc\":\"bdsrez\",\"endTimeUtc\":\"rhneuyowq\",\"status\":\"wyt\",\"steps\":[{}],\"exception\":[\"rcgp\",\"kpzi\",\"ejzanlfz\"]},{\"name\":\"av\",\"description\":\"bzonok\",\"fullStepIndex\":\"rjqc\",\"startTimeUtc\":\"gzpfrla\",\"endTimeUtc\":\"zrnw\",\"status\":\"indfpwpjyl\",\"steps\":[{},{},{},{}],\"exception\":[\"flsjc\"]}],\"exception\":[\"zfjvfbgofe\",\"jagrqmqhldvr\",\"iiojnal\",\"hfkvtvsexsowuel\"]},{\"name\":\"hhahhxvrhmzkwpjg\",\"description\":\"spughftqsxhq\",\"fullStepIndex\":\"j\",\"startTimeUtc\":\"kndxdigrjgu\",\"endTimeUtc\":\"zdmsyqtfi\",\"status\":\"hbotzingamvppho\",\"steps\":[{\"name\":\"udphqamvdkfwyn\",\"description\":\"vtbvkayh\",\"fullStepIndex\":\"nvyq\",\"startTimeUtc\":\"tkzwpcnpwzc\",\"endTimeUtc\":\"esgvvsccyaj\",\"status\":\"qfhwyg\",\"steps\":[{},{},{}],\"exception\":[\"kfxu\"]},{\"name\":\"mdwzrmuhapfcqdps\",\"description\":\"qvpsvuoymg\",\"fullStepIndex\":\"elvezrypq\",\"startTimeUtc\":\"feo\",\"endTimeUtc\":\"rqwky\",\"status\":\"ob\",\"steps\":[{},{}],\"exception\":[\"dkow\",\"pbqpcrfkbwccsn\",\"vcdwxlpqekftn\",\"htjsying\"]}],\"exception\":[\"atmtdhtmdvy\",\"gikdgsz\",\"w\"]},{\"name\":\"irryuzhlh\",\"description\":\"oqrvqqaatjin\",\"fullStepIndex\":\"goupmfiibfg\",\"startTimeUtc\":\"ioolvrwxkvtkkgll\",\"endTimeUtc\":\"jygvjayvbl\",\"status\":\"vkzuhbxvvyhgso\",\"steps\":[{\"name\":\"qufegxuvwzfbn\",\"description\":\"mctlpdngitv\",\"fullStepIndex\":\"mhrixkwmyijejve\",\"startTimeUtc\":\"hbpnaixexccbd\",\"endTimeUtc\":\"ax\",\"status\":\"exdrrvqahqkg\",\"steps\":[{},{}],\"exception\":[\"jnhyjsvf\",\"cxzbfvoowvr\",\"mtg\",\"qp\"]},{\"name\":\"ostronz\",\"description\":\"hgfipnsxkmcw\",\"fullStepIndex\":\"krrjrea\",\"startTimeUtc\":\"tsgumhj\",\"endTimeUtc\":\"ikkx\",\"status\":\"lo\",\"steps\":[{},{},{}],\"exception\":[\"uzlm\",\"felfktg\"]},{\"name\":\"crpw\",\"description\":\"eznoig\",\"fullStepIndex\":\"njwmwkpnbsazejj\",\"startTimeUtc\":\"kagfhsxtt\",\"endTimeUtc\":\"gzxnfaazpxdtnk\",\"status\":\"kqjjlwuenvrkp\",\"steps\":[{},{},{},{}],\"exception\":[\"bre\",\"qaaysjkixqt\"]}],\"exception\":[\"tezlwff\",\"iakp\"]},{\"name\":\"qqmtedltmmji\",\"description\":\"eozphv\",\"fullStepIndex\":\"uyqncygupkvipmd\",\"startTimeUtc\":\"wx\",\"endTimeUtc\":\"pevzhfst\",\"status\":\"xhojuj\",\"steps\":[{\"name\":\"lmcuvhixb\",\"description\":\"yfwnylr\",\"fullStepIndex\":\"o\",\"startTimeUtc\":\"ttpkiwkkbnujrywv\",\"endTimeUtc\":\"lbfpncurd\",\"status\":\"wiithtywub\",\"steps\":[{},{},{}],\"exception\":[\"wqknfdn\"]},{\"name\":\"jchrdgoihxumw\",\"description\":\"ond\",\"fullStepIndex\":\"luudfdlwggytsb\",\"startTimeUtc\":\"ovvtgseinqfiu\",\"endTimeUtc\":\"qknp\",\"status\":\"gnepttwqmsni\",\"steps\":[{}],\"exception\":[\"qnrojlpijnkrxfrd\",\"hcrat\",\"zzronasx\",\"ft\"]},{\"name\":\"qyzhf\",\"description\":\"esgogc\",\"fullStepIndex\":\"onnxkrlgnyhm\",\"startTimeUtc\":\"sxkkg\",\"endTimeUtc\":\"rrghxjbdhqxvcxgf\",\"status\":\"dsofbshrns\",\"steps\":[{},{}],\"exception\":[\"dvzyybycnun\",\"jsrtk\"]},{\"name\":\"wnopqgikyzirtx\",\"description\":\"uxzejntpsew\",\"fullStepIndex\":\"oi\",\"startTimeUtc\":\"ukry\",\"endTimeUtc\":\"tqmieox\",\"status\":\"ggufhyaomtb\",\"steps\":[{},{}],\"exception\":[\"grvk\",\"fo\"]}],\"exception\":[\"hpjbib\"]}]}}") + .toObject(EceReportedProperties.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceDisksTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceDisksTests.java index 58b4c63d757e..2bd90a43d184 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceDisksTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceDisksTests.java @@ -11,7 +11,7 @@ public final class EdgeDeviceDisksTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EdgeDeviceDisks model = BinaryData.fromString( - "{\"id\":\"epbnwgfm\",\"sizeInBytes\":\"gcgbjb\",\"type\":\"lfgtdysnaquflqbc\",\"model\":\"hamzjrwdkqze\",\"manufacturer\":\"jleziunjx\",\"isSupported\":true}") + "{\"id\":\"lod\",\"sizeInBytes\":\"euzanhs\",\"type\":\"hse\",\"model\":\"phpzfngqjcl\",\"manufacturer\":\"ftujwjjufw\",\"isSupported\":false}") .toObject(EdgeDeviceDisks.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceInnerTests.java index 2e28465e29bf..a57a6b5bb8fd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceInnerTests.java @@ -10,10 +10,9 @@ public final class EdgeDeviceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EdgeDeviceInner model = BinaryData - .fromString( - "{\"kind\":\"EdgeDevice\",\"id\":\"cpmguaadraufact\",\"name\":\"ahzovajjziuxxp\",\"type\":\"hneekul\"}") - .toObject(EdgeDeviceInner.class); + EdgeDeviceInner model + = BinaryData.fromString("{\"kind\":\"EdgeDevice\",\"id\":\"np\",\"name\":\"w\",\"type\":\"ehtuevrhr\"}") + .toObject(EdgeDeviceInner.class); } @org.junit.jupiter.api.Test diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobInnerTests.java index 2c279a3e843b..37da46bc6136 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobInnerTests.java @@ -11,7 +11,7 @@ public final class EdgeDeviceJobInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EdgeDeviceJobInner model = BinaryData - .fromString("{\"kind\":\"EdgeDeviceJob\",\"id\":\"fdlwg\",\"name\":\"ytsbwtovv\",\"type\":\"gseinq\"}") + .fromString("{\"kind\":\"EdgeDeviceJob\",\"id\":\"zysdzh\",\"name\":\"zwwva\",\"type\":\"qyuvvfonkp\"}") .toObject(EdgeDeviceJobInner.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobListResultTests.java index f9bcb977952a..aed7b1b8c0fa 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobListResultTests.java @@ -12,8 +12,8 @@ public final class EdgeDeviceJobListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EdgeDeviceJobListResult model = BinaryData.fromString( - "{\"value\":[{\"kind\":\"EdgeDeviceJob\",\"id\":\"lmbtxhwgfwsrt\",\"name\":\"wcoezbrhub\",\"type\":\"kh\"},{\"kind\":\"EdgeDeviceJob\",\"id\":\"ygo\",\"name\":\"okkqfqjbvleo\",\"type\":\"fmluiqtqzfavyvn\"},{\"kind\":\"EdgeDeviceJob\",\"id\":\"ybar\",\"name\":\"euayjkqabqgzsles\",\"type\":\"cbhernntiewdj\"},{\"kind\":\"EdgeDeviceJob\",\"id\":\"bquwrbehw\",\"name\":\"gohbuffkmrq\",\"type\":\"mvvhmxtdrjfuta\"}],\"nextLink\":\"ebjvewzcjzn\"}") + "{\"value\":[{\"kind\":\"EdgeDeviceJob\",\"id\":\"eizjcpeogkhnmg\",\"name\":\"ro\",\"type\":\"xddbhfhpfpaz\"}],\"nextLink\":\"oywjxhpdulont\"}") .toObject(EdgeDeviceJobListResult.class); - Assertions.assertEquals("ebjvewzcjzn", model.nextLink()); + Assertions.assertEquals("oywjxhpdulont", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateMockTests.java index bd06da5913bf..98bab2691713 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsCreateOrUpdateMockTests.java @@ -20,7 +20,8 @@ public final class EdgeDeviceJobsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - String responseStr = "{\"kind\":\"EdgeDeviceJob\",\"id\":\"tnwzruzs\",\"name\":\"owxcsmxtl\",\"type\":\"a\"}"; + String responseStr + = "{\"kind\":\"EdgeDeviceJob\",\"id\":\"tvktjhffecqko\",\"name\":\"youergaghp\",\"type\":\"zxkpyehhfdyld\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +31,8 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EdgeDeviceJob response = manager.edgeDeviceJobs() - .createOrUpdate("c", "s", "lzbki", new EdgeDeviceJobInner(), com.azure.core.util.Context.NONE); + .createOrUpdate("zjuqwqajquzxpi", "hyoipnfdbgso", "cienezfvbenn", new EdgeDeviceJobInner(), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.java index c9b1d38cc93a..30151764f941 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class EdgeDeviceJobsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"kind\":\"EdgeDeviceJob\",\"id\":\"zz\",\"name\":\"xwjoqfzwand\",\"type\":\"hduwdvolxtqmr\"}"; + = "{\"kind\":\"EdgeDeviceJob\",\"id\":\"yllznfhkqytkztad\",\"name\":\"pgfzdgjfcyc\",\"type\":\"svloyyhigq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EdgeDeviceJob response = manager.edgeDeviceJobs() - .getWithResponse("dprpensbmzjrituk", "ym", "bfex", com.azure.core.util.Context.NONE) + .getWithResponse("ifubnsnstlpwqp", "nxjkhtupsvyouw", "uiyxfwkztsmsfb", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.java index fc8d8d017c52..9788f3be3323 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceJobsListByEdgeDeviceMockTests.java @@ -21,7 +21,7 @@ public final class EdgeDeviceJobsListByEdgeDeviceMockTests { @Test public void testListByEdgeDevice() throws Exception { String responseStr - = "{\"value\":[{\"kind\":\"EdgeDeviceJob\",\"id\":\"zkwh\",\"name\":\"jsqwhaefefvv\",\"type\":\"x\"}]}"; + = "{\"value\":[{\"kind\":\"EdgeDeviceJob\",\"id\":\"kzwhpj\",\"name\":\"w\",\"type\":\"xedzn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testListByEdgeDevice() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.edgeDeviceJobs() - .listByEdgeDevice("pnvcebsp", "iryomhkdwuwedupb", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.edgeDeviceJobs().listByEdgeDevice("gyedzfzqi", "uqhtdereuno", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceListResultTests.java index 0f177ccbb6bd..162f68c6d985 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDeviceListResultTests.java @@ -12,8 +12,8 @@ public final class EdgeDeviceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EdgeDeviceListResult model = BinaryData.fromString( - "{\"value\":[{\"kind\":\"EdgeDevice\",\"id\":\"bnseqacjjvpilg\",\"name\":\"ooqjagmditgueio\",\"type\":\"kjbsah\"},{\"kind\":\"EdgeDevice\",\"id\":\"dt\",\"name\":\"delqacslmoto\",\"type\":\"bnfxofvc\"}],\"nextLink\":\"gdirazf\"}") + "{\"value\":[{\"kind\":\"EdgeDevice\",\"id\":\"htssruqnmdvhazc\",\"name\":\"jy\",\"type\":\"iqswbqer\"},{\"kind\":\"EdgeDevice\",\"id\":\"xiytxtdgukvl\",\"name\":\"pktgdstyouambew\",\"type\":\"esw\"}],\"nextLink\":\"weg\"}") .toObject(EdgeDeviceListResult.class); - Assertions.assertEquals("gdirazf", model.nextLink()); + Assertions.assertEquals("weg", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicePropertiesTests.java index 8b8f04f0277e..0323af51b4bc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicePropertiesTests.java @@ -15,71 +15,70 @@ public final class EdgeDevicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EdgeDeviceProperties model = BinaryData.fromString( - "{\"deviceConfiguration\":{\"nicDetails\":[{\"adapterName\":\"lxubyj\",\"interfaceDescription\":\"fmmfblcqcu\",\"componentId\":\"gqibrtalmetttw\",\"driverVersion\":\"slqxi\",\"ip4Address\":\"rmooizqse\",\"subnetMask\":\"xiutcx\",\"defaultGateway\":\"zhyrpeto\",\"dnsServers\":[\"joxslhvnhla\",\"rqnkkzjcjbtr\"],\"defaultIsolationId\":\"ehvvib\"},{\"adapterName\":\"jj\",\"interfaceDescription\":\"oqbeitpkxzt\",\"componentId\":\"ob\",\"driverVersion\":\"ft\",\"ip4Address\":\"gfcwqmpimaqxzhem\",\"subnetMask\":\"h\",\"defaultGateway\":\"uj\",\"dnsServers\":[\"wkozz\"],\"defaultIsolationId\":\"ulkb\"},{\"adapterName\":\"pfajnjwltlwtjj\",\"interfaceDescription\":\"ktalhsnvkcdmxz\",\"componentId\":\"oaimlnw\",\"driverVersion\":\"aomylwea\",\"ip4Address\":\"lcsethwwnpj\",\"subnetMask\":\"fz\",\"defaultGateway\":\"pchwa\",\"dnsServers\":[\"ousnfepgfewe\",\"wlyxgncxyk\"],\"defaultIsolationId\":\"djhlimm\"},{\"adapterName\":\"x\",\"interfaceDescription\":\"bcporxvxcjzhqizx\",\"componentId\":\"xtgqscjavftjuh\",\"driverVersion\":\"azkmtgguwp\",\"ip4Address\":\"r\",\"subnetMask\":\"civmmg\",\"defaultGateway\":\"cf\",\"dnsServers\":[\"xgkn\",\"uvyinzqodfvpgs\"],\"defaultIsolationId\":\"xgsg\"}],\"deviceMetadata\":\"fgzdjtxvz\"},\"provisioningState\":\"Error\"}") + "{\"deviceConfiguration\":{\"nicDetails\":[{\"adapterName\":\"tomflrytswfpf\",\"interfaceDescription\":\"gycxnmskwhqjjys\",\"componentId\":\"rlpshhkv\",\"driverVersion\":\"dwqslsrhmpqvw\",\"ip4Address\":\"kondcb\",\"subnetMask\":\"imuvqejosovyrrl\",\"defaultGateway\":\"esi\",\"dnsServers\":[\"tljqobbpih\",\"hcecybmrqbr\",\"bbmpxdlvykfre\",\"crse\"],\"defaultIsolationId\":\"jksghudg\"},{\"adapterName\":\"xog\",\"interfaceDescription\":\"gsv\",\"componentId\":\"jkxibda\",\"driverVersion\":\"rkmdyom\",\"ip4Address\":\"fbvfbhdy\",\"subnetMask\":\"hpwpgddeimawzovg\",\"defaultGateway\":\"um\",\"dnsServers\":[\"jcjcazt\",\"wsnsqowx\",\"comlikytwvczc\",\"wka\"],\"defaultIsolationId\":\"ejyfdvlvhbwrnfx\"},{\"adapterName\":\"ddpqt\",\"interfaceDescription\":\"hn\",\"componentId\":\"aoyankcoeqswa\",\"driverVersion\":\"ltytmhdr\",\"ip4Address\":\"nnhdrl\",\"subnetMask\":\"gjc\",\"defaultGateway\":\"guxhem\",\"dnsServers\":[\"waeeczgfb\",\"kklelssxblycs\",\"zujksrlsmdes\"],\"defaultIsolationId\":\"lpvmjcdoewbidy\"}],\"deviceMetadata\":\"eowxvgpi\"},\"provisioningState\":\"DisableInProgress\"}") .toObject(EdgeDeviceProperties.class); - Assertions.assertEquals("lxubyj", model.deviceConfiguration().nicDetails().get(0).adapterName()); - Assertions.assertEquals("fmmfblcqcu", model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); - Assertions.assertEquals("gqibrtalmetttw", model.deviceConfiguration().nicDetails().get(0).componentId()); - Assertions.assertEquals("slqxi", model.deviceConfiguration().nicDetails().get(0).driverVersion()); - Assertions.assertEquals("rmooizqse", model.deviceConfiguration().nicDetails().get(0).ip4Address()); - Assertions.assertEquals("xiutcx", model.deviceConfiguration().nicDetails().get(0).subnetMask()); - Assertions.assertEquals("zhyrpeto", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); - Assertions.assertEquals("joxslhvnhla", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); - Assertions.assertEquals("ehvvib", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); - Assertions.assertEquals("fgzdjtxvz", model.deviceConfiguration().deviceMetadata()); + Assertions.assertEquals("tomflrytswfpf", model.deviceConfiguration().nicDetails().get(0).adapterName()); + Assertions.assertEquals("gycxnmskwhqjjys", + model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("rlpshhkv", model.deviceConfiguration().nicDetails().get(0).componentId()); + Assertions.assertEquals("dwqslsrhmpqvw", model.deviceConfiguration().nicDetails().get(0).driverVersion()); + Assertions.assertEquals("kondcb", model.deviceConfiguration().nicDetails().get(0).ip4Address()); + Assertions.assertEquals("imuvqejosovyrrl", model.deviceConfiguration().nicDetails().get(0).subnetMask()); + Assertions.assertEquals("esi", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("tljqobbpih", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("jksghudg", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("eowxvgpi", model.deviceConfiguration().deviceMetadata()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EdgeDeviceProperties model - = new EdgeDeviceProperties().withDeviceConfiguration(new DeviceConfiguration().withNicDetails(Arrays.asList( - new NicDetail().withAdapterName("lxubyj") - .withInterfaceDescription("fmmfblcqcu") - .withComponentId("gqibrtalmetttw") - .withDriverVersion("slqxi") - .withIp4Address("rmooizqse") - .withSubnetMask("xiutcx") - .withDefaultGateway("zhyrpeto") - .withDnsServers(Arrays.asList("joxslhvnhla", "rqnkkzjcjbtr")) - .withDefaultIsolationId("ehvvib"), - new NicDetail().withAdapterName("jj") - .withInterfaceDescription("oqbeitpkxzt") - .withComponentId("ob") - .withDriverVersion("ft") - .withIp4Address("gfcwqmpimaqxzhem") - .withSubnetMask("h") - .withDefaultGateway("uj") - .withDnsServers(Arrays.asList("wkozz")) - .withDefaultIsolationId("ulkb"), - new NicDetail().withAdapterName("pfajnjwltlwtjj") - .withInterfaceDescription("ktalhsnvkcdmxz") - .withComponentId("oaimlnw") - .withDriverVersion("aomylwea") - .withIp4Address("lcsethwwnpj") - .withSubnetMask("fz") - .withDefaultGateway("pchwa") - .withDnsServers(Arrays.asList("ousnfepgfewe", "wlyxgncxyk")) - .withDefaultIsolationId("djhlimm"), - new NicDetail().withAdapterName("x") - .withInterfaceDescription("bcporxvxcjzhqizx") - .withComponentId("xtgqscjavftjuh") - .withDriverVersion("azkmtgguwp") - .withIp4Address("r") - .withSubnetMask("civmmg") - .withDefaultGateway("cf") - .withDnsServers(Arrays.asList("xgkn", "uvyinzqodfvpgs")) - .withDefaultIsolationId("xgsg"))) - .withDeviceMetadata("fgzdjtxvz")); + = new EdgeDeviceProperties() + .withDeviceConfiguration( + new DeviceConfiguration() + .withNicDetails( + Arrays + .asList( + new NicDetail().withAdapterName("tomflrytswfpf") + .withInterfaceDescription("gycxnmskwhqjjys") + .withComponentId("rlpshhkv") + .withDriverVersion("dwqslsrhmpqvw") + .withIp4Address("kondcb") + .withSubnetMask("imuvqejosovyrrl") + .withDefaultGateway("esi") + .withDnsServers( + Arrays.asList("tljqobbpih", "hcecybmrqbr", "bbmpxdlvykfre", "crse")) + .withDefaultIsolationId("jksghudg"), + new NicDetail().withAdapterName("xog") + .withInterfaceDescription("gsv") + .withComponentId("jkxibda") + .withDriverVersion("rkmdyom") + .withIp4Address("fbvfbhdy") + .withSubnetMask("hpwpgddeimawzovg") + .withDefaultGateway("um") + .withDnsServers(Arrays.asList("jcjcazt", "wsnsqowx", "comlikytwvczc", "wka")) + .withDefaultIsolationId("ejyfdvlvhbwrnfx"), + new NicDetail().withAdapterName("ddpqt") + .withInterfaceDescription("hn") + .withComponentId("aoyankcoeqswa") + .withDriverVersion("ltytmhdr") + .withIp4Address("nnhdrl") + .withSubnetMask("gjc") + .withDefaultGateway("guxhem") + .withDnsServers(Arrays.asList("waeeczgfb", "kklelssxblycs", "zujksrlsmdes")) + .withDefaultIsolationId("lpvmjcdoewbidy"))) + .withDeviceMetadata("eowxvgpi")); model = BinaryData.fromObject(model).toObject(EdgeDeviceProperties.class); - Assertions.assertEquals("lxubyj", model.deviceConfiguration().nicDetails().get(0).adapterName()); - Assertions.assertEquals("fmmfblcqcu", model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); - Assertions.assertEquals("gqibrtalmetttw", model.deviceConfiguration().nicDetails().get(0).componentId()); - Assertions.assertEquals("slqxi", model.deviceConfiguration().nicDetails().get(0).driverVersion()); - Assertions.assertEquals("rmooizqse", model.deviceConfiguration().nicDetails().get(0).ip4Address()); - Assertions.assertEquals("xiutcx", model.deviceConfiguration().nicDetails().get(0).subnetMask()); - Assertions.assertEquals("zhyrpeto", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); - Assertions.assertEquals("joxslhvnhla", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); - Assertions.assertEquals("ehvvib", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); - Assertions.assertEquals("fgzdjtxvz", model.deviceConfiguration().deviceMetadata()); + Assertions.assertEquals("tomflrytswfpf", model.deviceConfiguration().nicDetails().get(0).adapterName()); + Assertions.assertEquals("gycxnmskwhqjjys", + model.deviceConfiguration().nicDetails().get(0).interfaceDescription()); + Assertions.assertEquals("rlpshhkv", model.deviceConfiguration().nicDetails().get(0).componentId()); + Assertions.assertEquals("dwqslsrhmpqvw", model.deviceConfiguration().nicDetails().get(0).driverVersion()); + Assertions.assertEquals("kondcb", model.deviceConfiguration().nicDetails().get(0).ip4Address()); + Assertions.assertEquals("imuvqejosovyrrl", model.deviceConfiguration().nicDetails().get(0).subnetMask()); + Assertions.assertEquals("esi", model.deviceConfiguration().nicDetails().get(0).defaultGateway()); + Assertions.assertEquals("tljqobbpih", model.deviceConfiguration().nicDetails().get(0).dnsServers().get(0)); + Assertions.assertEquals("jksghudg", model.deviceConfiguration().nicDetails().get(0).defaultIsolationId()); + Assertions.assertEquals("eowxvgpi", model.deviceConfiguration().deviceMetadata()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateMockTests.java index c86520143290..a6bc50d32364 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateMockTests.java @@ -20,8 +20,7 @@ public final class EdgeDevicesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"kind\":\"EdgeDevice\",\"id\":\"vmptedeue\",\"name\":\"thshnfiyg\",\"type\":\"gpkkhpj\"}"; + String responseStr = "{\"kind\":\"EdgeDevice\",\"id\":\"jisskob\",\"name\":\"ocl\",\"type\":\"l\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +30,7 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EdgeDevice response = manager.edgeDevices() - .createOrUpdate("lewgsltut", "uvedwuuqbmen", new EdgeDeviceInner(), com.azure.core.util.Context.NONE); + .createOrUpdate("kgjpytpmpvdnoge", "lufbortb", new EdgeDeviceInner(), com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetWithResponseMockTests.java index 7cb269f1b49b..3f29aa44ea88 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class EdgeDevicesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"kind\":\"EdgeDevice\",\"id\":\"vfxnzpf\",\"name\":\"fupktw\",\"type\":\"dpsegivytabvbbk\"}"; + = "{\"kind\":\"EdgeDevice\",\"id\":\"tpdyzoutxfptof\",\"name\":\"gnuywezygva\",\"type\":\"gaaqw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EdgeDevice response = manager.edgeDevices() - .getWithResponse("bnmcvaqycd", "dobues", com.azure.core.util.Context.NONE) + .getWithResponse("xrfomcke", "vmyifopxf", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListMockTests.java index b2afad522174..29f4a8f4accb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListMockTests.java @@ -21,7 +21,7 @@ public final class EdgeDevicesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"kind\":\"EdgeDevice\",\"id\":\"mtrdlpxiww\",\"name\":\"ecpvfpnrzikvo\",\"type\":\"loeohy\"}]}"; + = "{\"value\":[{\"kind\":\"EdgeDevice\",\"id\":\"qeq\",\"name\":\"bdxmd\",\"type\":\"esbrujbjpppktl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,8 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.edgeDevices().list("glaqlmi", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.edgeDevices().list("oewyhxessmvrkd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateMockTests.java index ead1682cf3bd..6ca3a4ea92c9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateMockTests.java @@ -21,7 +21,7 @@ public final class EdgeDevicesValidateMockTests { @Test public void testValidate() throws Exception { - String responseStr = "{\"status\":\"yrqvelrmd\"}"; + String responseStr = "{\"status\":\"jilzfbpntogke\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testValidate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ValidateResponse response = manager.edgeDevices() - .validate("ivxdifbwblijhp", "ukxgoyxontbwdq", - new ValidateRequest().withEdgeDeviceIds(Arrays.asList("rosuqrrldxfuae")) - .withAdditionalInfo("wxatktwjrppi"), + .validate("dibfmthi", "at", + new ValidateRequest().withEdgeDeviceIds(Arrays.asList("jrnm", "nzqplgtkihonikzs")) + .withAdditionalInfo("f"), com.azure.core.util.Context.NONE); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineAdapterPropertyOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineAdapterPropertyOverridesTests.java deleted file mode 100644 index 27183776e527..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineAdapterPropertyOverridesTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineAdapterPropertyOverrides; - -public final class EdgeMachineAdapterPropertyOverridesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineAdapterPropertyOverrides model = BinaryData - .fromString( - "{\"jumboPacket\":\"lrrskap\",\"networkDirect\":\"wie\",\"networkDirectTechnology\":\"uyader\"}") - .toObject(EdgeMachineAdapterPropertyOverrides.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingListResultTests.java deleted file mode 100644 index d73295aaad8b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingListResultTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDeploymentSettingListResult; -import com.azure.resourcemanager.azurestackhci.models.NodeStorageType; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachineDeploymentSettingListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineDeploymentSettingListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Error\",\"deploymentConfiguration\":{\"version\":\"zadcrxyla\",\"scaleUnits\":[{\"deploymentData\":{\"storageType\":\"S2D\"}},{\"deploymentData\":{\"storageType\":\"SANFC\"}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"elff\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"wh\",\"steps\":[{}]}}},\"id\":\"wpsshrm\",\"name\":\"kcclpctuo\",\"type\":\"kscxjfsgmospoe\"},{\"properties\":{\"provisioningState\":\"DisableInProgress\",\"deploymentConfiguration\":{\"version\":\"cowscuyfqlam\",\"scaleUnits\":[{\"deploymentData\":{\"storageType\":\"SANISCSI\"}},{\"deploymentData\":{\"storageType\":\"SANFC\"}},{\"deploymentData\":{\"storageType\":\"SANFC\"}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"afuzpnxqpwnik\",\"steps\":[{},{}]},\"deploymentStatus\":{\"status\":\"grb\",\"steps\":[{},{},{}]}}},\"id\":\"vgoo\",\"name\":\"qsazmzlpcxi\",\"type\":\"mhxxrqicfzfvwjd\"},{\"properties\":{\"provisioningState\":\"Disconnected\",\"deploymentConfiguration\":{\"version\":\"yeyoafinmpnqu\",\"scaleUnits\":[{\"deploymentData\":{\"storageType\":\"S2D\"}},{\"deploymentData\":{\"storageType\":\"SANISCSI\"}},{\"deploymentData\":{\"storageType\":\"SANISCSI\"}},{\"deploymentData\":{\"storageType\":\"SANFC\"}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"yluobdx\",\"steps\":[{},{}]},\"deploymentStatus\":{\"status\":\"clcvqs\",\"steps\":[{}]}}},\"id\":\"ylcvwbzmfx\",\"name\":\"ry\",\"type\":\"fjxlpiy\"}],\"nextLink\":\"npfydrfb\"}") - .toObject(EdgeMachineDeploymentSettingListResult.class); - Assertions.assertEquals("zadcrxyla", model.value().get(0).properties().deploymentConfiguration().version()); - Assertions.assertEquals(NodeStorageType.S2D, - model.value() - .get(0) - .properties() - .deploymentConfiguration() - .scaleUnits() - .get(0) - .deploymentData() - .storageType()); - Assertions.assertEquals("npfydrfb", model.nextLink()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsCreateOrUpdateMockTests.java deleted file mode 100644 index ab8d3ca3890a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentConfiguration; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSetting; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSettingProperties; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineScaleUnits; -import com.azure.resourcemanager.azurestackhci.models.NodeStorageType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineDeploymentSettingsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentConfiguration\":{\"version\":\"jipssvnonijcq\",\"scaleUnits\":[{\"deploymentData\":{\"storageType\":\"S2D\"}},{\"deploymentData\":{\"storageType\":\"SANFC\"}},{\"deploymentData\":{\"storageType\":\"SANISCSI\"}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"gpdqqbto\",\"steps\":[{},{},{}]},\"deploymentStatus\":{\"status\":\"zxl\",\"steps\":[{},{}]}}},\"id\":\"arhwettohgpzwx\",\"name\":\"vtkzbh\",\"type\":\"zxpus\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EdgeMachineDeploymentSetting response = manager.edgeMachineDeploymentSettings() - .define("qi") - .withExistingEdgeMachine("fz", "qmbinpxmiwt") - .withProperties(new EdgeMachineDeploymentSettingProperties() - .withDeploymentConfiguration(new EdgeMachineDeploymentConfiguration().withVersion("ukcdnzoxlabu") - .withScaleUnits(Arrays.asList( - new EdgeMachineScaleUnits() - .withDeploymentData(new EdgeMachineDeploymentData().withStorageType(NodeStorageType.S2D)), - new EdgeMachineScaleUnits().withDeploymentData( - new EdgeMachineDeploymentData().withStorageType(NodeStorageType.SAN_FC)))))) - .create(); - - Assertions.assertEquals("jipssvnonijcq", response.properties().deploymentConfiguration().version()); - Assertions.assertEquals(NodeStorageType.S2D, - response.properties().deploymentConfiguration().scaleUnits().get(0).deploymentData().storageType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsGetWithResponseMockTests.java deleted file mode 100644 index 55d77bb1fcc7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsGetWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSetting; -import com.azure.resourcemanager.azurestackhci.models.NodeStorageType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineDeploymentSettingsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"deploymentConfiguration\":{\"version\":\"itxrrgkwiyoyh\",\"scaleUnits\":[{\"deploymentData\":{\"storageType\":\"SANFC\"}},{\"deploymentData\":{\"storageType\":\"SANFC\"}},{\"deploymentData\":{\"storageType\":\"SANFC\"}},{\"deploymentData\":{\"storageType\":\"S2D\"}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"kwoytcach\",\"steps\":[{},{}]},\"deploymentStatus\":{\"status\":\"uewlfwfiikqcdnzs\",\"steps\":[{},{},{},{}]}}},\"id\":\"gne\",\"name\":\"o\",\"type\":\"mcrxlyzoaho\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EdgeMachineDeploymentSetting response = manager.edgeMachineDeploymentSettings() - .getWithResponse("eaeyzwloqrmgdhym", "pvlxtywu", "hj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("itxrrgkwiyoyh", response.properties().deploymentConfiguration().version()); - Assertions.assertEquals(NodeStorageType.SAN_FC, - response.properties().deploymentConfiguration().scaleUnits().get(0).deploymentData().storageType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsListByEdgeMachineMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsListByEdgeMachineMockTests.java deleted file mode 100644 index 899a3517b0db..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDeploymentSettingsListByEdgeMachineMockTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDeploymentSetting; -import com.azure.resourcemanager.azurestackhci.models.NodeStorageType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineDeploymentSettingsListByEdgeMachineMockTests { - @Test - public void testListByEdgeMachine() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"deploymentConfiguration\":{\"version\":\"lpphcstmrycpana\",\"scaleUnits\":[{\"deploymentData\":{\"storageType\":\"SANISCSI\"}}]},\"reportedProperties\":{\"validationStatus\":{\"status\":\"rin\",\"steps\":[{},{},{},{}]},\"deploymentStatus\":{\"status\":\"zzxqbgqnzmzctbxz\",\"steps\":[{},{}]}}},\"id\":\"fpucvbdozw\",\"name\":\"sk\",\"type\":\"e\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.edgeMachineDeploymentSettings() - .listByEdgeMachine("ufakrxjjwnbrmdwt", "rnlsyiaanistc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lpphcstmrycpana", - response.iterator().next().properties().deploymentConfiguration().version()); - Assertions.assertEquals(NodeStorageType.SAN_ISCSI, - response.iterator() - .next() - .properties() - .deploymentConfiguration() - .scaleUnits() - .get(0) - .deploymentData() - .storageType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskInnerTests.java deleted file mode 100644 index e2884123c1e8..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskInnerTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineDiskInner; -import com.azure.resourcemanager.azurestackhci.models.DiskConfiguration; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; -import com.azure.resourcemanager.azurestackhci.models.DiskVolumeConfiguration; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachineDiskInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineDiskInner model = BinaryData.fromString( - "{\"properties\":{\"diskConfiguration\":{\"volumes\":[{\"sizeInBytes\":\"dwvmqxiyookyfo\",\"path\":\"kbnzxbypfq\",\"fileSystem\":\"ext4\"},{\"sizeInBytes\":\"ixwrgrk\",\"path\":\"derfrswqikwepwog\",\"fileSystem\":\"ext4\"},{\"sizeInBytes\":\"cwn\",\"path\":\"htfmcqbsudzpgc\",\"fileSystem\":\"fat\"},{\"sizeInBytes\":\"gfqumjdjxhzghgo\",\"path\":\"kynrceqavf\",\"fileSystem\":\"xfs\"}]},\"reportedProperties\":{\"diskName\":\"mxjdnaju\",\"model\":\"jyyqmkw\",\"manufacturer\":\"vcwloqd\",\"isSupported\":true,\"serialNumber\":\"uxxrwzobuzms\",\"firmwareVersion\":\"amt\",\"sizeInBytes\":\"kwppthuzdprmimr\",\"storageType\":\"S2D\",\"diskType\":\"SCM\",\"busLocation\":\"fxyemhkftbaewh\",\"unallocatedSizeInBytes\":\"cloamfmxtllflt\",\"state\":\"Missing\",\"volumes\":[{\"sizeInBytes\":\"rfijhggabq\",\"path\":\"amklilirwdv\",\"fileSystem\":\"hsdp\",\"partitionId\":\"uhktq\",\"partitionNumber\":874249294,\"offsetInBytes\":3999635265542877325,\"name\":\"xrdfddtu\",\"isBoot\":false,\"sizeRemainingInBytes\":\"tavczc\",\"resourceName\":\"fweapyfmlx\"},{\"sizeInBytes\":\"jphrasp\",\"path\":\"leimixlmdbgicehf\",\"fileSystem\":\"mdrjuqbpxt\",\"partitionId\":\"lj\",\"partitionNumber\":2091786595,\"offsetInBytes\":8418832447798876358,\"name\":\"wfqtyyqipr\",\"isBoot\":true,\"sizeRemainingInBytes\":\"ngbso\",\"resourceName\":\"ckmiig\"},{\"sizeInBytes\":\"kuckgkdskswtiiq\",\"path\":\"qikclsmalns\",\"fileSystem\":\"oykdno\",\"partitionId\":\"axwmgzru\",\"partitionNumber\":1839915087,\"offsetInBytes\":4299465518863046872,\"name\":\"nlleiqbcbgvsbts\",\"isBoot\":true,\"sizeRemainingInBytes\":\"xa\",\"resourceName\":\"xuvj\"},{\"sizeInBytes\":\"mnrqstjcmetwml\",\"path\":\"cvnpv\",\"fileSystem\":\"hgjnaq\",\"partitionId\":\"i\",\"partitionNumber\":887260516,\"offsetInBytes\":4918572561515707608,\"name\":\"dsvmwbitekdtf\",\"isBoot\":true,\"sizeRemainingInBytes\":\"iy\",\"resourceName\":\"qich\"}]},\"provisioningState\":\"PartiallySucceeded\"},\"id\":\"zdqekivycpzcvd\",\"name\":\"zulrqt\",\"type\":\"htre\"}") - .toObject(EdgeMachineDiskInner.class); - Assertions.assertEquals("dwvmqxiyookyfo", - model.properties().diskConfiguration().volumes().get(0).sizeInBytes()); - Assertions.assertEquals("kbnzxbypfq", model.properties().diskConfiguration().volumes().get(0).path()); - Assertions.assertEquals(DiskFileSystemType.EXT4, - model.properties().diskConfiguration().volumes().get(0).fileSystem()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EdgeMachineDiskInner model = new EdgeMachineDiskInner().withProperties( - new EdgeMachineDiskProperties().withDiskConfiguration(new DiskConfiguration().withVolumes(Arrays.asList( - new DiskVolumeConfiguration().withSizeInBytes("dwvmqxiyookyfo") - .withPath("kbnzxbypfq") - .withFileSystem(DiskFileSystemType.EXT4), - new DiskVolumeConfiguration().withSizeInBytes("ixwrgrk") - .withPath("derfrswqikwepwog") - .withFileSystem(DiskFileSystemType.EXT4), - new DiskVolumeConfiguration().withSizeInBytes("cwn") - .withPath("htfmcqbsudzpgc") - .withFileSystem(DiskFileSystemType.FAT), - new DiskVolumeConfiguration().withSizeInBytes("gfqumjdjxhzghgo") - .withPath("kynrceqavf") - .withFileSystem(DiskFileSystemType.XFS))))); - model = BinaryData.fromObject(model).toObject(EdgeMachineDiskInner.class); - Assertions.assertEquals("dwvmqxiyookyfo", - model.properties().diskConfiguration().volumes().get(0).sizeInBytes()); - Assertions.assertEquals("kbnzxbypfq", model.properties().diskConfiguration().volumes().get(0).path()); - Assertions.assertEquals(DiskFileSystemType.EXT4, - model.properties().diskConfiguration().volumes().get(0).fileSystem()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskListResultTests.java deleted file mode 100644 index 5a417dd7df44..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskListResultTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineDiskListResult; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachineDiskListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineDiskListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"diskConfiguration\":{\"volumes\":[{\"sizeInBytes\":\"xbeuuqu\",\"path\":\"kzwtjwwguzytij\"},{\"sizeInBytes\":\"xfn\",\"path\":\"ndegjdydhqkkkbj\"},{\"sizeInBytes\":\"ckcatuqbhpo\",\"path\":\"cnxtpzdlysei\"},{\"sizeInBytes\":\"toakatprytgrhz\",\"path\":\"qfdpf\"}]},\"reportedProperties\":{\"diskName\":\"ptvcs\",\"model\":\"kutzct\",\"manufacturer\":\"qgdirda\",\"isSupported\":true,\"serialNumber\":\"jgcf\",\"firmwareVersion\":\"xtbw\",\"sizeInBytes\":\"irmu\",\"storageType\":\"SAN\",\"diskType\":\"Unknown\",\"busLocation\":\"mdofgeoagfuoft\",\"unallocatedSizeInBytes\":\"odwxmdajwiygmgs\",\"state\":\"Online\",\"volumes\":[{},{},{}]},\"provisioningState\":\"Connected\"},\"id\":\"lrstgfczlj\",\"name\":\"n\",\"type\":\"idt\"}],\"nextLink\":\"amyyznmrgcdogcv\"}") - .toObject(EdgeMachineDiskListResult.class); - Assertions.assertEquals("xbeuuqu", - model.value().get(0).properties().diskConfiguration().volumes().get(0).sizeInBytes()); - Assertions.assertEquals("kzwtjwwguzytij", - model.value().get(0).properties().diskConfiguration().volumes().get(0).path()); - Assertions.assertEquals("amyyznmrgcdogcv", model.nextLink()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPropertiesTests.java deleted file mode 100644 index 435d000b0133..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDiskPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.DiskConfiguration; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; -import com.azure.resourcemanager.azurestackhci.models.DiskVolumeConfiguration; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachineDiskPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineDiskProperties model = BinaryData.fromString( - "{\"diskConfiguration\":{\"volumes\":[{\"sizeInBytes\":\"pryfmxmdutzfkgi\",\"path\":\"no\",\"fileSystem\":\"vfat\"},{\"sizeInBytes\":\"cgndjgdp\",\"path\":\"iggq\",\"fileSystem\":\"fat\"}]},\"reportedProperties\":{\"diskName\":\"cbuulpyufl\",\"model\":\"fsh\",\"manufacturer\":\"jcyohigimw\",\"isSupported\":true,\"serialNumber\":\"lkq\",\"firmwareVersion\":\"vkixnmbzmecu\",\"sizeInBytes\":\"zwimbzayspz\",\"storageType\":\"SAN\",\"diskType\":\"Other\",\"busLocation\":\"fphmdzxplg\",\"unallocatedSizeInBytes\":\"vdvatlzmgsc\",\"state\":\"Online\",\"volumes\":[{\"sizeInBytes\":\"kkzovlzdm\",\"path\":\"mfwsxafofu\",\"fileSystem\":\"rimm\",\"partitionId\":\"zwdehkkmvhz\",\"partitionNumber\":919056845,\"offsetInBytes\":4124300054285438266,\"name\":\"vaprtgelgw\",\"isBoot\":true,\"sizeRemainingInBytes\":\"fyaqandmymnqo\",\"resourceName\":\"umov\"}]},\"provisioningState\":\"Updating\"}") - .toObject(EdgeMachineDiskProperties.class); - Assertions.assertEquals("pryfmxmdutzfkgi", model.diskConfiguration().volumes().get(0).sizeInBytes()); - Assertions.assertEquals("no", model.diskConfiguration().volumes().get(0).path()); - Assertions.assertEquals(DiskFileSystemType.VFAT, model.diskConfiguration().volumes().get(0).fileSystem()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EdgeMachineDiskProperties model - = new EdgeMachineDiskProperties().withDiskConfiguration(new DiskConfiguration().withVolumes(Arrays.asList( - new DiskVolumeConfiguration().withSizeInBytes("pryfmxmdutzfkgi") - .withPath("no") - .withFileSystem(DiskFileSystemType.VFAT), - new DiskVolumeConfiguration().withSizeInBytes("cgndjgdp") - .withPath("iggq") - .withFileSystem(DiskFileSystemType.FAT)))); - model = BinaryData.fromObject(model).toObject(EdgeMachineDiskProperties.class); - Assertions.assertEquals("pryfmxmdutzfkgi", model.diskConfiguration().volumes().get(0).sizeInBytes()); - Assertions.assertEquals("no", model.diskConfiguration().volumes().get(0).path()); - Assertions.assertEquals(DiskFileSystemType.VFAT, model.diskConfiguration().volumes().get(0).fileSystem()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksCreateOrUpdateMockTests.java deleted file mode 100644 index 30bffc711971..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksCreateOrUpdateMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.DiskConfiguration; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; -import com.azure.resourcemanager.azurestackhci.models.DiskVolumeConfiguration; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDisk; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDiskProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineDisksCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"diskConfiguration\":{\"volumes\":[{\"sizeInBytes\":\"polnvgpppdilbdvx\",\"path\":\"fhlzzgaps\",\"fileSystem\":\"fat\"}]},\"reportedProperties\":{\"diskName\":\"lscrm\",\"model\":\"uuzywkgouxnroyh\",\"manufacturer\":\"esywywnvgy\",\"isSupported\":false,\"serialNumber\":\"frzcwuejmxl\",\"firmwareVersion\":\"ln\",\"sizeInBytes\":\"rgrlhchra\",\"storageType\":\"S2D\",\"diskType\":\"SATA\",\"busLocation\":\"xqtvmvzpniqwxmr\",\"unallocatedSizeInBytes\":\"nkgtlh\",\"state\":\"Missing\",\"volumes\":[{\"sizeInBytes\":\"ioiyecz\",\"path\":\"zmsvzngheqzhehg\",\"fileSystem\":\"mnoyzgnbny\",\"partitionId\":\"uzypkfcd\",\"partitionNumber\":2146985297,\"offsetInBytes\":4934103582232511442,\"name\":\"xotnoil\",\"isBoot\":false,\"sizeRemainingInBytes\":\"hyefqhxytsqm\",\"resourceName\":\"cacwaaqakv\"},{\"sizeInBytes\":\"y\",\"path\":\"xra\",\"fileSystem\":\"lreq\",\"partitionId\":\"cmmdtshz\",\"partitionNumber\":1411651772,\"offsetInBytes\":9083417829134538400,\"name\":\"babowrcyrnmj\",\"isBoot\":false,\"sizeRemainingInBytes\":\"x\",\"resourceName\":\"kkagvejhmnaph\"},{\"sizeInBytes\":\"kmpeajzz\",\"path\":\"avamzmzfntte\",\"fileSystem\":\"ftxyt\",\"partitionId\":\"ypjdrjli\",\"partitionNumber\":1716687176,\"offsetInBytes\":4947538386208699719,\"name\":\"ehjjirvjqxavqm\",\"isBoot\":true,\"sizeRemainingInBytes\":\"cfsffdralihhss\",\"resourceName\":\"gyzhcv\"}]},\"provisioningState\":\"Succeeded\"},\"id\":\"rjlndxr\",\"name\":\"yzvti\",\"type\":\"jtpdru\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EdgeMachineDisk response = manager.edgeMachineDisks() - .define("dzccqtwsrbfbsd") - .withExistingEdgeMachine("jk", "hophqwo") - .withProperties( - new EdgeMachineDiskProperties().withDiskConfiguration(new DiskConfiguration().withVolumes(Arrays.asList( - new DiskVolumeConfiguration().withSizeInBytes("fbvex") - .withPath("vnhhmfsnqpvjtshl") - .withFileSystem(DiskFileSystemType.EXT4), - new DiskVolumeConfiguration().withSizeInBytes("sksd") - .withPath("mhwt") - .withFileSystem(DiskFileSystemType.FAT32), - new DiskVolumeConfiguration().withSizeInBytes("pwfbwoetxiz") - .withPath("fwxhflgdunga") - .withFileSystem(DiskFileSystemType.NTFS))))) - .create(); - - Assertions.assertEquals("polnvgpppdilbdvx", - response.properties().diskConfiguration().volumes().get(0).sizeInBytes()); - Assertions.assertEquals("fhlzzgaps", response.properties().diskConfiguration().volumes().get(0).path()); - Assertions.assertEquals(DiskFileSystemType.FAT, - response.properties().diskConfiguration().volumes().get(0).fileSystem()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksGetWithResponseMockTests.java deleted file mode 100644 index 858ebf006a9f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksGetWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDisk; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineDisksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"diskConfiguration\":{\"volumes\":[{\"sizeInBytes\":\"rzs\",\"path\":\"wasfw\",\"fileSystem\":\"xfs\"},{\"sizeInBytes\":\"ybmfqdnppfcfguam\",\"path\":\"vamuvkgd\",\"fileSystem\":\"fat32\"},{\"sizeInBytes\":\"bblukgctvn\",\"path\":\"pjvsyydjlhduk\",\"fileSystem\":\"fat\"}]},\"reportedProperties\":{\"diskName\":\"eegxhu\",\"model\":\"jwum\",\"manufacturer\":\"dymeqvnxpfy\",\"isSupported\":false,\"serialNumber\":\"pnonxem\",\"firmwareVersion\":\"pzhnatwvgcmcv\",\"sizeInBytes\":\"lwwefevtwllqypm\",\"storageType\":\"SAN\",\"diskType\":\"NVMe\",\"busLocation\":\"wgkzuh\",\"unallocatedSizeInBytes\":\"hx\",\"state\":\"Missing\",\"volumes\":[{\"sizeInBytes\":\"q\",\"path\":\"yfmmk\",\"fileSystem\":\"hrooyzho\",\"partitionId\":\"vyuepacoeroh\",\"partitionNumber\":397426975,\"offsetInBytes\":6911099339207443377,\"name\":\"fkbsycbdymb\",\"isBoot\":true,\"sizeRemainingInBytes\":\"nlqtqyv\",\"resourceName\":\"b\"}]},\"provisioningState\":\"PartiallySucceeded\"},\"id\":\"dvfjd\",\"name\":\"qephtoshqt\",\"type\":\"arjwgu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EdgeMachineDisk response = manager.edgeMachineDisks() - .getWithResponse("erndzzywxqraqxtk", "eetnn", "fputlks", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rzs", response.properties().diskConfiguration().volumes().get(0).sizeInBytes()); - Assertions.assertEquals("wasfw", response.properties().diskConfiguration().volumes().get(0).path()); - Assertions.assertEquals(DiskFileSystemType.XFS, - response.properties().diskConfiguration().volumes().get(0).fileSystem()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksListMockTests.java deleted file mode 100644 index d1ae26771949..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineDisksListMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.DiskFileSystemType; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineDisk; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineDisksListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"diskConfiguration\":{\"volumes\":[{\"sizeInBytes\":\"iflrvfeowctshw\",\"path\":\"rhhasabvauz\",\"fileSystem\":\"fat\"},{\"sizeInBytes\":\"umkbpgcilbwtp\",\"path\":\"bjlpfwuq\",\"fileSystem\":\"fat\"}]},\"reportedProperties\":{\"diskName\":\"iten\",\"model\":\"kslizmpnxghamr\",\"manufacturer\":\"anchqotmmxlm\",\"isSupported\":true,\"serialNumber\":\"yvjzbjwvt\",\"firmwareVersion\":\"kbbypqs\",\"sizeInBytes\":\"sbeqieiuxhj\",\"storageType\":\"SAN\",\"diskType\":\"NVMe\",\"busLocation\":\"njjhrgkj\",\"unallocatedSizeInBytes\":\"cpihlzyxvtajfj\",\"state\":\"Offline\",\"volumes\":[{\"sizeInBytes\":\"ekurdgcpzanaqve\",\"path\":\"n\",\"fileSystem\":\"elr\",\"partitionId\":\"nb\",\"partitionNumber\":380646011,\"offsetInBytes\":385995378588041393,\"name\":\"fbageg\",\"isBoot\":true,\"sizeRemainingInBytes\":\"tckiwxggf\",\"resourceName\":\"ijxmdboe\"},{\"sizeInBytes\":\"hxhahuq\",\"path\":\"nvzsodmokrqd\",\"fileSystem\":\"gkqyjkotypcj\",\"partitionId\":\"yzzl\",\"partitionNumber\":1728777912,\"offsetInBytes\":3279391448937178526,\"name\":\"dbrbmc\",\"isBoot\":false,\"sizeRemainingInBytes\":\"prsmivapesbfz\",\"resourceName\":\"ejrwwsfvt\"},{\"sizeInBytes\":\"qxtmbl\",\"path\":\"cleuovel\",\"fileSystem\":\"prbxjtezujtou\",\"partitionId\":\"de\",\"partitionNumber\":1341608157,\"offsetInBytes\":8530478887783156900,\"name\":\"jciexuwemtgtgeb\",\"isBoot\":false,\"sizeRemainingInBytes\":\"gsks\",\"resourceName\":\"sxehaxi\"}]},\"provisioningState\":\"Connected\"},\"id\":\"xolknshgwakptb\",\"name\":\"mbglmnlbnatln\",\"type\":\"hzzcdkxortdzzvhb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.edgeMachineDisks().list("rcnxaeypyqoi", "fyasyddqbwscjw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("iflrvfeowctshw", - response.iterator().next().properties().diskConfiguration().volumes().get(0).sizeInBytes()); - Assertions.assertEquals("rhhasabvauz", - response.iterator().next().properties().diskConfiguration().volumes().get(0).path()); - Assertions.assertEquals(DiskFileSystemType.FAT, - response.iterator().next().properties().diskConfiguration().volumes().get(0).fileSystem()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineHostNetworkIntentTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineHostNetworkIntentTests.java deleted file mode 100644 index 3d6f54c8923c..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineHostNetworkIntentTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineHostNetworkIntent; - -public final class EdgeMachineHostNetworkIntentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineHostNetworkIntent model = BinaryData.fromString( - "{\"scope\":5977542394978629008,\"intentType\":8884215235999360681,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":true,\"intentName\":\"mbwiinjdllwktl\",\"intentAdapters\":[\"wavvqxuajgcqwuly\",\"kgfcfdruws\",\"kxx\",\"clhuulriqbyokv\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"x\",\"loadBalancingAlgorithm\":\"rsltt\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"jwsuoardnag\",\"priorityValue8021Action_SMB\":\"pufpbpgnrholhu\",\"bandwidthPercentage_SMB\":\"fwxi\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"olsyjprxsl\",\"networkDirect\":\"dmcvhtbbz\",\"networkDirectTechnology\":\"f\"}}") - .toObject(EdgeMachineHostNetworkIntent.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineHostNetworkTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineHostNetworkTests.java deleted file mode 100644 index 151dc1f86e7a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineHostNetworkTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineHostNetwork; - -public final class EdgeMachineHostNetworkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineHostNetwork model = BinaryData.fromString( - "{\"intents\":[{\"scope\":5455352807985408435,\"intentType\":3194811368713703685,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":false,\"intentName\":\"yyzlwhbwzjnu\",\"intentAdapters\":[\"fgmdqgnnbzr\",\"ftedzuubjtvgjsx\",\"tyjjvavdpwwobt\",\"phtitsffofwanmhk\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"azcg\",\"loadBalancingAlgorithm\":\"friwgybjp\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"cvgllixdg\",\"priorityValue8021Action_SMB\":\"fgw\",\"bandwidthPercentage_SMB\":\"qkjvxprwpxsoohu\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"klt\",\"networkDirect\":\"uugggzlfbgrd\",\"networkDirectTechnology\":\"ubsrtmdylperpilt\"}},{\"scope\":6550807107386928378,\"intentType\":3382490722844965298,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":false,\"intentName\":\"vtshuvf\",\"intentAdapters\":[\"ivmuqkevzgjyp\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"pdxxzetwwz\",\"loadBalancingAlgorithm\":\"otnxlkfhglh\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"wecr\",\"priorityValue8021Action_SMB\":\"hpcselqxovp\",\"bandwidthPercentage_SMB\":\"ibuk\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"lrmlccmetjscz\",\"networkDirect\":\"fqbqnasd\",\"networkDirectTechnology\":\"enz\"}},{\"scope\":721263855009579953,\"intentType\":7030858784999924637,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":false,\"intentName\":\"shezs\",\"intentAdapters\":[\"lrupjovmo\",\"sayebra\",\"wzlpzbtz\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"ip\",\"loadBalancingAlgorithm\":\"dyepfno\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"acfpztgazwyqej\",\"priorityValue8021Action_SMB\":\"aokctgkp\",\"bandwidthPercentage_SMB\":\"kqzkcyzmff\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"cixrhlcqvh\",\"networkDirect\":\"jgoiutgwrmka\",\"networkDirectTechnology\":\"qha\"}}],\"storageNetworks\":[{\"name\":\"a\",\"networkAdapterName\":\"hncogmipnml\",\"storageVlanId\":\"mvlbhikeaqgrv\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"xpupdtsdf\",\"ipv4Address\":\"i\",\"subnetMask\":\"ocwiqbuoutmpyzgl\"}]},{\"name\":\"f\",\"networkAdapterName\":\"bgbwwz\",\"storageVlanId\":\"ajfwnncfm\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"gjj\",\"ipv4Address\":\"h\",\"subnetMask\":\"lwixvtbou\"},{\"physicalNode\":\"xtndopgjttbasua\",\"ipv4Address\":\"pdlndbeaqbkixvv\",\"subnetMask\":\"ynpbbfqvzfjmspu\"},{\"physicalNode\":\"feuzjljmphfkye\",\"ipv4Address\":\"lgjzmi\",\"subnetMask\":\"ydoccnxshanzb\"}]}],\"storageConnectivitySwitchless\":false,\"enableStorageAutoIp\":true}") - .toObject(EdgeMachineHostNetwork.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkProfileTests.java deleted file mode 100644 index 7badb1041910..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNetworkProfileTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNetworkProfile; - -public final class EdgeMachineNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineNetworkProfile model = BinaryData.fromString( - "{\"nicDetails\":[{\"adapterName\":\"jxljtxbusq\",\"interfaceDescription\":\"xxniuisdzhgbd\",\"componentId\":\"pagsecnad\",\"driverVersion\":\"wqrgxfllmqi\",\"ip4Address\":\"ezoell\",\"subnetMask\":\"kiiwvmtu\",\"defaultGateway\":\"pymdjfuax\",\"dnsServers\":[\"vqpilrguncanldu\",\"zorxsb\"],\"defaultIsolationId\":\"aqklxy\",\"macAddress\":\"kqv\",\"slot\":\"epdxcltuubwyvpj\",\"switchName\":\"wcpjqduqgi\",\"nicType\":\"xkydfbwlja\",\"vlanId\":\"uerkjddvrg\",\"nicStatus\":\"egftcvb\",\"rdmaCapability\":\"Enabled\"},{\"adapterName\":\"ksdwgdnk\",\"interfaceDescription\":\"gmwdh\",\"componentId\":\"buvczldbglzoutb\",\"driverVersion\":\"qgz\",\"ip4Address\":\"ajclyzgsnorbjg\",\"subnetMask\":\"zjotvmrxkhlo\",\"defaultGateway\":\"vjb\",\"dnsServers\":[\"diqayfl\",\"iyu\"],\"defaultIsolationId\":\"n\",\"macAddress\":\"dtelvhyibdrqrs\",\"slot\":\"buubpyrowt\",\"switchName\":\"xztfwfqchvczevj\",\"nicType\":\"cta\",\"vlanId\":\"yvrtp\",\"nicStatus\":\"emhzc\",\"rdmaCapability\":\"Disabled\"},{\"adapterName\":\"pdqhqyhwqwemv\",\"interfaceDescription\":\"abckmzeoxinhgre\",\"componentId\":\"twhlpuzjpce\",\"driverVersion\":\"nzangprbfaxy\",\"ip4Address\":\"lbciphmsexro\",\"subnetMask\":\"ndktxfv\",\"defaultGateway\":\"feeqgpkrietbgnix\",\"dnsServers\":[\"wzkyf\",\"nwpiwxeiicrm\"],\"defaultIsolationId\":\"pk\",\"macAddress\":\"maxxijvskwsdgkjg\",\"slot\":\"cwrase\",\"switchName\":\"efcvo\",\"nicType\":\"woqartwy\",\"vlanId\":\"i\",\"nicStatus\":\"advatdavuqmcb\",\"rdmaCapability\":\"Enabled\"},{\"adapterName\":\"ob\",\"interfaceDescription\":\"quvjez\",\"componentId\":\"umvpsimioyoigl\",\"driverVersion\":\"iqwnnraclibbfq\",\"ip4Address\":\"pkl\",\"subnetMask\":\"ydgnha\",\"defaultGateway\":\"wuk\",\"dnsServers\":[\"gpmnmabe\",\"dqilwgdfpf\"],\"defaultIsolationId\":\"pcvs\",\"macAddress\":\"l\",\"slot\":\"rvwerfwxbsmtb\",\"switchName\":\"jehhci\",\"nicType\":\"wdv\",\"vlanId\":\"brekqhsqhtf\",\"nicStatus\":\"pqbye\",\"rdmaCapability\":\"Enabled\"}],\"switchDetails\":[{\"switchName\":\"dqigmg\",\"switchType\":\"inztxl\",\"extensions\":[{\"switchId\":\"njcmr\",\"extensionName\":\"fmkhcqtwmlmhjnqt\",\"extensionEnabled\":true},{\"switchId\":\"j\",\"extensionName\":\"vragpokddx\",\"extensionEnabled\":true},{\"switchId\":\"kvgu\",\"extensionName\":\"tpt\",\"extensionEnabled\":false}]},{\"switchName\":\"kqynspgbvo\",\"switchType\":\"bkkwvdxae\",\"extensions\":[{\"switchId\":\"myr\",\"extensionName\":\"ialzbnobrqlp\",\"extensionEnabled\":true},{\"switchId\":\"rpzuyudivbx\",\"extensionName\":\"sqeaeonqelwg\",\"extensionEnabled\":false}]}],\"hostNetwork\":{\"intents\":[{\"scope\":6009846586832609082,\"intentType\":108676092644840007,\"isComputeIntentSet\":true,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":false,\"intentName\":\"zvfkneerz\",\"intentAdapters\":[\"knsjulugd\",\"bnhrxlelfjhkeiz\",\"pihtdmiwjekpt\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"bjzcqymlcfnzhm\",\"loadBalancingAlgorithm\":\"urlgwqkpmmzps\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"awi\",\"priorityValue8021Action_SMB\":\"momsgvvj\",\"bandwidthPercentage_SMB\":\"vlrlohewjjmajn\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"ionsw\",\"networkDirect\":\"qkzfz\",\"networkDirectTechnology\":\"jo\"}},{\"scope\":1432751551834899885,\"intentType\":7885067144436864388,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"wkbfokxkhupzer\",\"intentAdapters\":[\"jblcdrmyfcemftz\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"a\",\"loadBalancingAlgorithm\":\"gekdfqnht\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"rczfjjnnuxxr\",\"priorityValue8021Action_SMB\":\"mhmnulwemp\",\"bandwidthPercentage_SMB\":\"ifrhjulrsul\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"usnaw\",\"networkDirect\":\"hgz\",\"networkDirectTechnology\":\"friyrg\"}},{\"scope\":3600186933053942141,\"intentType\":2864062613393333187,\"isComputeIntentSet\":true,\"isStorageIntentSet\":false,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"lpcqydeykvskic\",\"intentAdapters\":[\"rjeizik\",\"qaboohxbms\",\"ycqsxr\",\"d\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"qaeo\",\"loadBalancingAlgorithm\":\"jh\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"vhhdaurgho\",\"priorityValue8021Action_SMB\":\"aexbkhxjxjo\",\"bandwidthPercentage_SMB\":\"lqxr\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"obektmbozo\",\"networkDirect\":\"zamicb\",\"networkDirectTechnology\":\"wcdgzsez\"}},{\"scope\":2617357989509706962,\"intentType\":4712040510936540545,\"isComputeIntentSet\":true,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":false,\"isNetworkIntentType\":true,\"intentName\":\"ixlhupm\",\"intentAdapters\":[\"hzbdnpxpkcd\",\"reyxelyicghf\",\"rufssjyg\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"kb\",\"loadBalancingAlgorithm\":\"mmgmqf\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"qcpdwjgquxwey\",\"priorityValue8021Action_SMB\":\"andkd\",\"bandwidthPercentage_SMB\":\"jhunhghcg\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"nquoxsotireimse\",\"networkDirect\":\"fsxstcyil\",\"networkDirectTechnology\":\"zmmx\"}}],\"storageNetworks\":[{\"name\":\"quzexokjxebjvbz\",\"networkAdapterName\":\"zabwmvog\",\"storageVlanId\":\"svlpgidn\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"aqidoyzltgiomqo\",\"ipv4Address\":\"epiaeapfsergd\",\"subnetMask\":\"eqn\"},{\"physicalNode\":\"yheqwb\",\"ipv4Address\":\"qncjubkhjozfymcw\",\"subnetMask\":\"upyvqyvliq\"},{\"physicalNode\":\"psejbsvsiaies\",\"ipv4Address\":\"ddzydisnu\",\"subnetMask\":\"ywyjlnldpxot\"},{\"physicalNode\":\"iiaocqib\",\"ipv4Address\":\"ihweeb\",\"subnetMask\":\"hryvcjwqwoqsra\"}]},{\"name\":\"hdhzybspijhfr\",\"networkAdapterName\":\"dkkagvwukhsusmm\",\"storageVlanId\":\"fmz\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"zzhnijmriprlkd\",\"ipv4Address\":\"yttlrcxiv\",\"subnetMask\":\"kutpu\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":false},\"sdnProperties\":{\"sdnStatus\":\"Disabled\",\"sdnDomainName\":\"ynbpvzlqywauy\",\"sdnApiAddress\":\"jckhmocgj\"}}") - .toObject(EdgeMachineNetworkProfile.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNicDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNicDetailTests.java deleted file mode 100644 index bca12f72390f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineNicDetailTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineNicDetail; - -public final class EdgeMachineNicDetailTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineNicDetail model = BinaryData.fromString( - "{\"adapterName\":\"gouarhwvixqq\",\"interfaceDescription\":\"ljky\",\"componentId\":\"jrclrvtzq\",\"driverVersion\":\"bctbhp\",\"ip4Address\":\"xpc\",\"subnetMask\":\"dnyeita\",\"defaultGateway\":\"qady\",\"dnsServers\":[\"ahwriuomzczfk\",\"ceevsa\",\"xwspcaxikhfjq\",\"bglcxkxgzzromvy\"],\"defaultIsolationId\":\"sem\",\"macAddress\":\"esrfsvpinkzpatq\",\"slot\":\"iswxspv\",\"switchName\":\"ojazbbgspfte\",\"nicType\":\"b\",\"vlanId\":\"vpvdylytcovqse\",\"nicStatus\":\"rf\",\"rdmaCapability\":\"Enabled\"}") - .toObject(EdgeMachineNicDetail.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinePatchTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinePatchTests.java deleted file mode 100644 index 5108032f05a3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinePatchTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachinePatch; -import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachinePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachinePatch model = BinaryData.fromString( - "{\"tags\":{\"ffffg\":\"ytfvpctfji\",\"ejjk\":\"uhznwhvuldbk\"},\"identity\":{\"principalId\":\"awgazmxjqifh\",\"tenantId\":\"jsbcml\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"alahf\":{\"principalId\":\"bhuroolkolirhhm\",\"clientId\":\"usuzgfjzcvaaxo\"}}}}") - .toObject(EdgeMachinePatch.class); - Assertions.assertEquals("ytfvpctfji", model.tags().get("ffffg")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EdgeMachinePatch model = new EdgeMachinePatch().withTags(mapOf("ffffg", "ytfvpctfji", "ejjk", "uhznwhvuldbk")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("alahf", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(EdgeMachinePatch.class); - Assertions.assertEquals("ytfvpctfji", model.tags().get("ffffg")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineRemoteSupportNodeSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineRemoteSupportNodeSettingsTests.java deleted file mode 100644 index e6361fd780f3..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineRemoteSupportNodeSettingsTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineRemoteSupportNodeSettings; - -public final class EdgeMachineRemoteSupportNodeSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineRemoteSupportNodeSettings model = BinaryData.fromString( - "{\"state\":\"hwudlxeei\",\"createdAt\":\"2021-01-08T01:59:39Z\",\"updatedAt\":\"2021-08-25T15:27:16Z\",\"connectionStatus\":\"ejhq\",\"connectionErrorMessage\":\"msibzo\"}") - .toObject(EdgeMachineRemoteSupportNodeSettings.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecurityComplianceStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecurityComplianceStatusTests.java deleted file mode 100644 index b1c6f3533c5d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecurityComplianceStatusTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityComplianceStatus; - -public final class EdgeMachineSecurityComplianceStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineSecurityComplianceStatus model = BinaryData.fromString( - "{\"fipsStatus\":\"Pending\",\"secureBootStatus\":\"Compliant\",\"encryptionAtRestStatus\":\"Pending\",\"seLinuxPolicyStatus\":\"Compliant\",\"securityBaselineStatus\":\"Compliant\"}") - .toObject(EdgeMachineSecurityComplianceStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecurityPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecurityPropertiesTests.java deleted file mode 100644 index f0533cd6873a..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecurityPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityProperties; - -public final class EdgeMachineSecurityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineSecurityProperties model = BinaryData.fromString( - "{\"provisioningState\":\"DisableInProgress\",\"securityComplianceStatus\":{\"fipsStatus\":\"Compliant\",\"secureBootStatus\":\"Pending\",\"encryptionAtRestStatus\":\"Pending\",\"seLinuxPolicyStatus\":\"Pending\",\"securityBaselineStatus\":\"Compliant\"},\"registrationTimestamp\":\"2021-01-25T05:53:36Z\",\"lastSyncTimestamp\":\"2021-10-09T17:50:02Z\"}") - .toObject(EdgeMachineSecurityProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EdgeMachineSecurityProperties model = new EdgeMachineSecurityProperties(); - model = BinaryData.fromObject(model).toObject(EdgeMachineSecurityProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsInnerTests.java deleted file mode 100644 index 393b06b28d9f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineSecuritySettingsInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityProperties; - -public final class EdgeMachineSecuritySettingsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineSecuritySettingsInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"securityComplianceStatus\":{\"fipsStatus\":\"Pending\",\"secureBootStatus\":\"Pending\",\"encryptionAtRestStatus\":\"Pending\",\"seLinuxPolicyStatus\":\"Compliant\",\"securityBaselineStatus\":\"Pending\"},\"registrationTimestamp\":\"2021-11-05T13:46:30Z\",\"lastSyncTimestamp\":\"2021-02-17T11:05:49Z\"},\"id\":\"eggzgrn\",\"name\":\"tlfozuumrtgjqgac\",\"type\":\"ntns\"}") - .toObject(EdgeMachineSecuritySettingsInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EdgeMachineSecuritySettingsInner model - = new EdgeMachineSecuritySettingsInner().withProperties(new EdgeMachineSecurityProperties()); - model = BinaryData.fromObject(model).toObject(EdgeMachineSecuritySettingsInner.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsListResultTests.java deleted file mode 100644 index 6a65cdf9f156..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineSecuritySettingsListResult; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachineSecuritySettingsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineSecuritySettingsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"PartiallyConnected\",\"securityComplianceStatus\":{\"fipsStatus\":\"NonCompliant\",\"secureBootStatus\":\"Pending\",\"encryptionAtRestStatus\":\"Compliant\",\"seLinuxPolicyStatus\":\"Pending\",\"securityBaselineStatus\":\"NonCompliant\"},\"registrationTimestamp\":\"2021-04-21T05:52:33Z\",\"lastSyncTimestamp\":\"2021-03-03T02:41:36Z\"},\"id\":\"tofelfhpfixo\",\"name\":\"kkzdfivsu\",\"type\":\"ybsrwzzmrgtxdh\"},{\"properties\":{\"provisioningState\":\"Deleted\",\"securityComplianceStatus\":{\"fipsStatus\":\"Compliant\",\"secureBootStatus\":\"Pending\",\"encryptionAtRestStatus\":\"NonCompliant\",\"seLinuxPolicyStatus\":\"Compliant\",\"securityBaselineStatus\":\"Compliant\"},\"registrationTimestamp\":\"2021-05-07T00:22:59Z\",\"lastSyncTimestamp\":\"2020-12-28T17:39:26Z\"},\"id\":\"agjhxerxlobkdbtq\",\"name\":\"vmmnii\",\"type\":\"yholhjns\"}],\"nextLink\":\"ggicnqwlctm\"}") - .toObject(EdgeMachineSecuritySettingsListResult.class); - Assertions.assertEquals("ggicnqwlctm", model.nextLink()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsCreateOrUpdateMockTests.java deleted file mode 100644 index 80f5fa533a5e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecurityProperties; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecuritySettings; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineSecuritySettingsOperationsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"securityComplianceStatus\":{\"fipsStatus\":\"Compliant\",\"secureBootStatus\":\"Compliant\",\"encryptionAtRestStatus\":\"Pending\",\"seLinuxPolicyStatus\":\"Pending\",\"securityBaselineStatus\":\"Compliant\"},\"registrationTimestamp\":\"2021-04-18T16:18:57Z\",\"lastSyncTimestamp\":\"2021-12-03T12:32:39Z\"},\"id\":\"nvq\",\"name\":\"cbyfi\",\"type\":\"blnlmpuyypaggpai\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EdgeMachineSecuritySettings response = manager.edgeMachineSecuritySettingsOperations() - .define("rjriybfbydrlqllb") - .withExistingEdgeMachine("yvqbeqp", "cnusnylfhi") - .withProperties(new EdgeMachineSecurityProperties()) - .create(); - - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsGetWithResponseMockTests.java deleted file mode 100644 index 071280df36b1..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecuritySettings; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineSecuritySettingsOperationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"PartiallyConnected\",\"securityComplianceStatus\":{\"fipsStatus\":\"NonCompliant\",\"secureBootStatus\":\"Pending\",\"encryptionAtRestStatus\":\"Pending\",\"seLinuxPolicyStatus\":\"NonCompliant\",\"securityBaselineStatus\":\"Compliant\"},\"registrationTimestamp\":\"2021-05-17T08:52:10Z\",\"lastSyncTimestamp\":\"2021-06-24T02:24:51Z\"},\"id\":\"vcntpoeeytrs\",\"name\":\"jzmzuicsgg\",\"type\":\"xzn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EdgeMachineSecuritySettings response = manager.edgeMachineSecuritySettingsOperations() - .getWithResponse("izchmb", "zgi", "rkjkn", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsListByEdgeMachineMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsListByEdgeMachineMockTests.java deleted file mode 100644 index 3ee337340c6f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineSecuritySettingsOperationsListByEdgeMachineMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineSecuritySettings; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineSecuritySettingsOperationsListByEdgeMachineMockTests { - @Test - public void testListByEdgeMachine() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"securityComplianceStatus\":{\"fipsStatus\":\"Compliant\",\"secureBootStatus\":\"NonCompliant\",\"encryptionAtRestStatus\":\"Pending\",\"seLinuxPolicyStatus\":\"Pending\",\"securityBaselineStatus\":\"Pending\"},\"registrationTimestamp\":\"2021-05-01T16:52:54Z\",\"lastSyncTimestamp\":\"2021-06-13T02:33:51Z\"},\"id\":\"fzoidy\",\"name\":\"eprevcjukfal\",\"type\":\"ceechc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.edgeMachineSecuritySettingsOperations() - .listByEdgeMachine("p", "mkqbylbbnjldicq", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineStorageAdapterIpInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineStorageAdapterIpInfoTests.java deleted file mode 100644 index 9f8934b0ebeb..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineStorageAdapterIpInfoTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineStorageAdapterIpInfo; - -public final class EdgeMachineStorageAdapterIpInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineStorageAdapterIpInfo model = BinaryData - .fromString("{\"physicalNode\":\"xmjbxcbccwkqmtxa\",\"ipv4Address\":\"qis\",\"subnetMask\":\"p\"}") - .toObject(EdgeMachineStorageAdapterIpInfo.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineStorageNetworkTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineStorageNetworkTests.java deleted file mode 100644 index ac4c95f7e36f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineStorageNetworkTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineStorageNetwork; - -public final class EdgeMachineStorageNetworkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineStorageNetwork model = BinaryData.fromString( - "{\"name\":\"fokyks\",\"networkAdapterName\":\"myc\",\"storageVlanId\":\"r\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"zznnuif\",\"ipv4Address\":\"sejegprkjgu\",\"subnetMask\":\"jmwvvbtuqkxxi\"},{\"physicalNode\":\"gxql\",\"ipv4Address\":\"k\",\"subnetMask\":\"jgxieqfkyfh\"},{\"physicalNode\":\"vjaqu\",\"ipv4Address\":\"yynvskpa\",\"subnetMask\":\"mgeu\"}]}") - .toObject(EdgeMachineStorageNetwork.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineValidateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineValidateRequestTests.java deleted file mode 100644 index 5f9cebbc11ce..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineValidateRequestTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachineValidateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineValidateRequest model = BinaryData - .fromString( - "{\"edgeMachineIds\":[\"obllmsnwgwimaan\",\"akhtmhobcyanrfvq\"],\"additionalInfo\":\"khgvoogxkfnao\"}") - .toObject(EdgeMachineValidateRequest.class); - Assertions.assertEquals("obllmsnwgwimaan", model.edgeMachineIds().get(0)); - Assertions.assertEquals("khgvoogxkfnao", model.additionalInfo()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EdgeMachineValidateRequest model - = new EdgeMachineValidateRequest().withEdgeMachineIds(Arrays.asList("obllmsnwgwimaan", "akhtmhobcyanrfvq")) - .withAdditionalInfo("khgvoogxkfnao"); - model = BinaryData.fromObject(model).toObject(EdgeMachineValidateRequest.class); - Assertions.assertEquals("obllmsnwgwimaan", model.edgeMachineIds().get(0)); - Assertions.assertEquals("khgvoogxkfnao", model.additionalInfo()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineValidateResponseInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineValidateResponseInnerTests.java deleted file mode 100644 index 14b7c52e0625..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineValidateResponseInnerTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineValidateResponseInner; - -public final class EdgeMachineValidateResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineValidateResponseInner model - = BinaryData.fromString("{\"status\":\"ymhcctopuo\"}").toObject(EdgeMachineValidateResponseInner.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVirtualSwitchConfigurationOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVirtualSwitchConfigurationOverridesTests.java deleted file mode 100644 index 34af91523189..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVirtualSwitchConfigurationOverridesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVirtualSwitchConfigurationOverrides; - -public final class EdgeMachineVirtualSwitchConfigurationOverridesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineVirtualSwitchConfigurationOverrides model - = BinaryData.fromString("{\"enableIov\":\"uwzb\",\"loadBalancingAlgorithm\":\"cqzgihotjecohmx\"}") - .toObject(EdgeMachineVirtualSwitchConfigurationOverrides.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumeInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumeInnerTests.java deleted file mode 100644 index d5e8d0e7800d..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumeInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeMachineVolumeInner; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumeProperties; -import com.azure.resourcemanager.azurestackhci.models.VolumeConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachineVolumeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineVolumeInner model = BinaryData.fromString( - "{\"properties\":{\"volumeConfiguration\":{\"reserved\":\"to\"},\"reportedProperties\":{\"partitionId\":\"httnzqs\",\"offsetInBytes\":915039604928425021,\"name\":\"gszplus\",\"path\":\"kpdzzmssgpgv\",\"parentDiskId\":\"yejidbdqzsqun\",\"isBoot\":true,\"sizeInBytes\":\"tlvvwsnmrkkyjt\",\"sizeRemainingInBytes\":\"pwpwfkcauxuva\",\"fileSystem\":\"pfpdof\"},\"provisioningState\":\"InProgress\"},\"id\":\"lbtxluevsolzw\",\"name\":\"lfngojfsqebuuxj\",\"type\":\"hfxfjwpdkktpmb\"}") - .toObject(EdgeMachineVolumeInner.class); - Assertions.assertEquals("to", model.properties().volumeConfiguration().reserved()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EdgeMachineVolumeInner model = new EdgeMachineVolumeInner().withProperties( - new EdgeMachineVolumeProperties().withVolumeConfiguration(new VolumeConfiguration().withReserved("to"))); - model = BinaryData.fromObject(model).toObject(EdgeMachineVolumeInner.class); - Assertions.assertEquals("to", model.properties().volumeConfiguration().reserved()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumeListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumeListResultTests.java deleted file mode 100644 index 6b663c79963f..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumeListResultTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.implementation.models.EdgeMachineVolumeListResult; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachineVolumeListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineVolumeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"volumeConfiguration\":{\"reserved\":\"oxdjxldnaryy\"},\"reportedProperties\":{\"partitionId\":\"kd\",\"offsetInBytes\":6209803042659390914,\"name\":\"w\",\"path\":\"vxvzaledoyqxlun\",\"parentDiskId\":\"th\",\"isBoot\":true,\"sizeInBytes\":\"qxmyzkl\",\"sizeRemainingInBytes\":\"a\",\"fileSystem\":\"ohrvmz\"},\"provisioningState\":\"PartiallySucceeded\"},\"id\":\"zadi\",\"name\":\"znllaslk\",\"type\":\"khjqjpvbaihxjtg\"}],\"nextLink\":\"taiy\"}") - .toObject(EdgeMachineVolumeListResult.class); - Assertions.assertEquals("oxdjxldnaryy", model.value().get(0).properties().volumeConfiguration().reserved()); - Assertions.assertEquals("taiy", model.nextLink()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumePropertiesTests.java deleted file mode 100644 index 2ed9fb05e3a2..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumePropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumeProperties; -import com.azure.resourcemanager.azurestackhci.models.VolumeConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class EdgeMachineVolumePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineVolumeProperties model = BinaryData.fromString( - "{\"volumeConfiguration\":{\"reserved\":\"mbrwg\"},\"reportedProperties\":{\"partitionId\":\"ljbkhxsdplau\",\"offsetInBytes\":7531303904609703315,\"name\":\"weqjfyxydgto\",\"path\":\"qbvwglgw\",\"parentDiskId\":\"vxakglh\",\"isBoot\":true,\"sizeInBytes\":\"rfgamqiydvxcgdh\",\"sizeRemainingInBytes\":\"goqg\",\"fileSystem\":\"yqyxyjrcbqpbis\"},\"provisioningState\":\"PartiallySucceeded\"}") - .toObject(EdgeMachineVolumeProperties.class); - Assertions.assertEquals("mbrwg", model.volumeConfiguration().reserved()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EdgeMachineVolumeProperties model = new EdgeMachineVolumeProperties() - .withVolumeConfiguration(new VolumeConfiguration().withReserved("mbrwg")); - model = BinaryData.fromObject(model).toObject(EdgeMachineVolumeProperties.class); - Assertions.assertEquals("mbrwg", model.volumeConfiguration().reserved()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesCreateOrUpdateMockTests.java deleted file mode 100644 index 33237ed56e85..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolume; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolumeProperties; -import com.azure.resourcemanager.azurestackhci.models.VolumeConfiguration; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineVolumesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"volumeConfiguration\":{\"reserved\":\"mmczupdcbg\"},\"reportedProperties\":{\"partitionId\":\"sdbk\",\"offsetInBytes\":5156085999852568552,\"name\":\"umgsiv\",\"path\":\"kscwbshfihvl\",\"parentDiskId\":\"ceylaulpuexyigxz\",\"isBoot\":true,\"sizeInBytes\":\"xdslspgnndef\",\"sizeRemainingInBytes\":\"sbyhwlvsvs\",\"fileSystem\":\"taprqtfkmvzrkp\"},\"provisioningState\":\"Succeeded\"},\"id\":\"dwfcuhbgftfv\",\"name\":\"ukkmv\",\"type\":\"enegpdqrjylw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EdgeMachineVolume response = manager.edgeMachineVolumes() - .define("gubqkfnoxhvoyj") - .withExistingEdgeMachine("fbvhgykzov", "tvymdqaymqmyrn") - .withProperties( - new EdgeMachineVolumeProperties().withVolumeConfiguration(new VolumeConfiguration().withReserved("r"))) - .create(); - - Assertions.assertEquals("mmczupdcbg", response.properties().volumeConfiguration().reserved()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesGetWithResponseMockTests.java deleted file mode 100644 index c239068c4f43..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesGetWithResponseMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolume; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineVolumesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"volumeConfiguration\":{\"reserved\":\"teccxfn\"},\"reportedProperties\":{\"partitionId\":\"tmca\",\"offsetInBytes\":6250041364610896393,\"name\":\"fhjikqcnbdqitghn\",\"path\":\"lzvrchmy\",\"parentDiskId\":\"grmwyvhdiy\",\"isBoot\":true,\"sizeInBytes\":\"qqgrbrhhvipgti\",\"sizeRemainingInBytes\":\"aoylwhfm\",\"fileSystem\":\"weasgypjix\"},\"provisioningState\":\"Disconnected\"},\"id\":\"ad\",\"name\":\"d\",\"type\":\"qeuwdvclsxdqdch\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EdgeMachineVolume response = manager.edgeMachineVolumes() - .getWithResponse("xaxoyj", "h", "twedi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("teccxfn", response.properties().volumeConfiguration().reserved()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesListMockTests.java deleted file mode 100644 index 516d35ae0267..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineVolumesListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineVolume; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachineVolumesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"volumeConfiguration\":{\"reserved\":\"xqwqykmvugf\"},\"reportedProperties\":{\"partitionId\":\"hoxurhc\",\"offsetInBytes\":3353435076315365400,\"name\":\"hwtamvmbg\",\"path\":\"xh\",\"parentDiskId\":\"uhke\",\"isBoot\":false,\"sizeInBytes\":\"qic\",\"sizeRemainingInBytes\":\"dxvbeqzjdwxt\",\"fileSystem\":\"pdwnee\"},\"provisioningState\":\"Succeeded\"},\"id\":\"lxug\",\"name\":\"rwvn\",\"type\":\"faofkvfruxz\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.edgeMachineVolumes().list("zibixrgsrwxxqkwa", "gcbgdgosi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xqwqykmvugf", - response.iterator().next().properties().volumeConfiguration().reserved()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineWorkloadInventoryItemTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineWorkloadInventoryItemTests.java deleted file mode 100644 index c4fa8f86341b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachineWorkloadInventoryItemTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineWorkloadInventoryItem; - -public final class EdgeMachineWorkloadInventoryItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EdgeMachineWorkloadInventoryItem model = BinaryData.fromString( - "{\"workloadId\":\"lwivqt\",\"name\":\"lhl\",\"resourceId\":\"coybaj\",\"workloadType\":\"qubfajcyw\",\"state\":\"qwmchqohtfxc\",\"virtualProcessorCount\":\"pukiymjzpwdlvwt\",\"memoryInBytes\":\"smosaonhqnam\"}") - .toObject(EdgeMachineWorkloadInventoryItem.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesValidateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesValidateMockTests.java deleted file mode 100644 index cf01bd0ece78..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/EdgeMachinesValidateMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateRequest; -import com.azure.resourcemanager.azurestackhci.models.EdgeMachineValidateResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EdgeMachinesValidateMockTests { - @Test - public void testValidate() throws Exception { - String responseStr = "{\"status\":\"imbdqraokdarluob\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - EdgeMachineValidateResponse response = manager.edgeMachines() - .validate("g", "pupjhltylyuudvbg", - new EdgeMachineValidateRequest().withEdgeMachineIds(Arrays.asList("lzjsbkpcutzazi")) - .withAdditionalInfo("pokns"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionListTests.java index d00e2610cd75..2095e9a5b47f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionListTests.java @@ -12,14 +12,14 @@ public final class ExtensionListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"extensionParameters\":{\"forceUpdateTag\":\"kccrrvwey\",\"publisher\":\"oy\",\"type\":\"k\",\"typeHandlerVersion\":\"aimmoiroqb\",\"autoUpgradeMinorVersion\":true,\"settings\":\"\\\"dataragapyyrmfsvbp\\\"\",\"protectedSettings\":\"\\\"databopfppdbwnup\\\"\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Canceled\",\"perNodeExtensionDetails\":[{\"name\":\"sjcaacfdmmcpugm\",\"extension\":\"qepvufhbzeh\",\"typeHandlerVersion\":\"hoqhnl\",\"state\":\"NotSpecified\",\"instanceView\":{}}],\"managedBy\":\"Azure\"},\"id\":\"eaclgschorimk\",\"name\":\"srrm\",\"type\":\"ucsofldpuviyf\"},{\"properties\":{\"provisioningState\":\"Disconnected\",\"extensionParameters\":{\"forceUpdateTag\":\"lhbhl\",\"publisher\":\"mxuq\",\"type\":\"s\",\"typeHandlerVersion\":\"kcudfbsfarfsiowl\",\"autoUpgradeMinorVersion\":false,\"settings\":\"\\\"dataqpvwgfst\\\"\",\"protectedSettings\":\"\\\"dataqyki\\\"\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"NotSpecified\",\"perNodeExtensionDetails\":[{\"name\":\"fcluqvo\",\"extension\":\"ycjimryvwgcwwpbm\",\"typeHandlerVersion\":\"w\",\"state\":\"InProgress\",\"instanceView\":{}},{\"name\":\"xwefohecbvopwndy\",\"extension\":\"eallklmtkhlo\",\"typeHandlerVersion\":\"x\",\"state\":\"Error\",\"instanceView\":{}},{\"name\":\"dfjmzsyzfhotlh\",\"extension\":\"cyychunsjlp\",\"typeHandlerVersion\":\"twszhvvuic\",\"state\":\"Updating\",\"instanceView\":{}}],\"managedBy\":\"User\"},\"id\":\"hwrbfdpyflubh\",\"name\":\"jgl\",\"type\":\"ocu\"}],\"nextLink\":\"lw\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"extensionParameters\":{\"forceUpdateTag\":\"wwtjfdoesxxhmwc\",\"publisher\":\"ck\",\"type\":\"ikxkxhneg\",\"typeHandlerVersion\":\"jzrbhtmeplv\",\"autoUpgradeMinorVersion\":false,\"settings\":\"\\\"databrlbpgs\\\"\",\"protectedSettings\":\"\\\"dataagnchjhgemuowaky\\\"\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Updating\",\"perNodeExtensionDetails\":[{\"name\":\"cgqtag\",\"extension\":\"clssoljomevtfyc\",\"typeHandlerVersion\":\"bvgjcodkkgj\",\"state\":\"Provisioning\",\"instanceView\":{}}],\"managedBy\":\"User\"},\"id\":\"k\",\"name\":\"z\",\"type\":\"cufqbvntnrgmqs\"},{\"properties\":{\"provisioningState\":\"Error\",\"extensionParameters\":{\"forceUpdateTag\":\"xgnlykmx\",\"publisher\":\"wzvmdoksqd\",\"type\":\"wlwxlboncqbazqic\",\"typeHandlerVersion\":\"hygtv\",\"autoUpgradeMinorVersion\":true,\"settings\":\"\\\"dataanepubd\\\"\",\"protectedSettings\":\"\\\"dataxyqvg\\\"\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Disconnected\",\"perNodeExtensionDetails\":[{\"name\":\"ohkxdxuw\",\"extension\":\"ifmcwnosbzlehg\",\"typeHandlerVersion\":\"kb\",\"state\":\"Updating\",\"instanceView\":{}}],\"managedBy\":\"Azure\"},\"id\":\"jy\",\"name\":\"xpvelszerqzevxo\",\"type\":\"eintxwaljglzobl\"},{\"properties\":{\"provisioningState\":\"Disconnected\",\"extensionParameters\":{\"forceUpdateTag\":\"qulhmzy\",\"publisher\":\"hdvafjrqpjiyrqjc\",\"type\":\"a\",\"typeHandlerVersion\":\"mzwdfk\",\"autoUpgradeMinorVersion\":false,\"settings\":\"\\\"dataorpdltbqct\\\"\",\"protectedSettings\":\"\\\"datafg\\\"\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Deleting\",\"perNodeExtensionDetails\":[{\"name\":\"dgvpyig\",\"extension\":\"qqil\",\"typeHandlerVersion\":\"cduwjoedx\",\"state\":\"Deleting\",\"instanceView\":{}},{\"name\":\"i\",\"extension\":\"aurwwgilfjq\",\"typeHandlerVersion\":\"cdmkxwxdcvjw\",\"state\":\"Accepted\",\"instanceView\":{}},{\"name\":\"keciqchxrtuicd\",\"extension\":\"wdfmmpzhzzwvywr\",\"typeHandlerVersion\":\"ngydgr\",\"state\":\"NotSpecified\",\"instanceView\":{}}],\"managedBy\":\"Azure\"},\"id\":\"qao\",\"name\":\"djrkclamggl\",\"type\":\"lmf\"},{\"properties\":{\"provisioningState\":\"Connected\",\"extensionParameters\":{\"forceUpdateTag\":\"ykglt\",\"publisher\":\"xhqf\",\"type\":\"ka\",\"typeHandlerVersion\":\"jsxtlgflwfgziiuc\",\"autoUpgradeMinorVersion\":true,\"settings\":\"\\\"dataeatlijjjrtvamcas\\\"\",\"protectedSettings\":\"\\\"datanxkvccxetyvku\\\"\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Creating\",\"perNodeExtensionDetails\":[{\"name\":\"k\",\"extension\":\"qo\",\"typeHandlerVersion\":\"wpin\",\"state\":\"Creating\",\"instanceView\":{}}],\"managedBy\":\"User\"},\"id\":\"xbhmed\",\"name\":\"ilb\",\"type\":\"ywfcfxzi\"}],\"nextLink\":\"zi\"}") .toObject(ExtensionList.class); - Assertions.assertEquals("kccrrvwey", model.value().get(0).forceUpdateTag()); - Assertions.assertEquals("oy", model.value().get(0).publisher()); - Assertions.assertEquals("k", model.value().get(0).typePropertiesType()); - Assertions.assertEquals("aimmoiroqb", model.value().get(0).typeHandlerVersion()); - Assertions.assertTrue(model.value().get(0).autoUpgradeMinorVersion()); - Assertions.assertTrue(model.value().get(0).enableAutomaticUpgrade()); - Assertions.assertEquals("lw", model.nextLink()); + Assertions.assertEquals("wwtjfdoesxxhmwc", model.value().get(0).forceUpdateTag()); + Assertions.assertEquals("ck", model.value().get(0).publisher()); + Assertions.assertEquals("ikxkxhneg", model.value().get(0).typePropertiesType()); + Assertions.assertEquals("jzrbhtmeplv", model.value().get(0).typeHandlerVersion()); + Assertions.assertFalse(model.value().get(0).autoUpgradeMinorVersion()); + Assertions.assertFalse(model.value().get(0).enableAutomaticUpgrade()); + Assertions.assertEquals("zi", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionParametersTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionParametersTests.java index 61c2e5c018e7..3c8424098029 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionParametersTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionParametersTests.java @@ -12,31 +12,31 @@ public final class ExtensionParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionParameters model = BinaryData.fromString( - "{\"forceUpdateTag\":\"cnpqwteht\",\"publisher\":\"vrh\",\"type\":\"jyoogwxh\",\"typeHandlerVersion\":\"duugwbsre\",\"autoUpgradeMinorVersion\":true,\"settings\":\"\\\"datakfuarenlv\\\"\",\"protectedSettings\":\"\\\"datatklnvnafvvkyfed\\\"\",\"enableAutomaticUpgrade\":true}") + "{\"forceUpdateTag\":\"iuas\",\"publisher\":\"rowsocnequy\",\"type\":\"jboq\",\"typeHandlerVersion\":\"mtqjkqevadrmm\",\"autoUpgradeMinorVersion\":true,\"settings\":\"\\\"datawvcmj\\\"\",\"protectedSettings\":\"\\\"dataxiid\\\"\",\"enableAutomaticUpgrade\":true}") .toObject(ExtensionParameters.class); - Assertions.assertEquals("cnpqwteht", model.forceUpdateTag()); - Assertions.assertEquals("vrh", model.publisher()); - Assertions.assertEquals("jyoogwxh", model.type()); - Assertions.assertEquals("duugwbsre", model.typeHandlerVersion()); + Assertions.assertEquals("iuas", model.forceUpdateTag()); + Assertions.assertEquals("rowsocnequy", model.publisher()); + Assertions.assertEquals("jboq", model.type()); + Assertions.assertEquals("mtqjkqevadrmm", model.typeHandlerVersion()); Assertions.assertTrue(model.autoUpgradeMinorVersion()); Assertions.assertTrue(model.enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionParameters model = new ExtensionParameters().withForceUpdateTag("cnpqwteht") - .withPublisher("vrh") - .withType("jyoogwxh") - .withTypeHandlerVersion("duugwbsre") + ExtensionParameters model = new ExtensionParameters().withForceUpdateTag("iuas") + .withPublisher("rowsocnequy") + .withType("jboq") + .withTypeHandlerVersion("mtqjkqevadrmm") .withAutoUpgradeMinorVersion(true) - .withSettings("\"datakfuarenlv\"") - .withProtectedSettings("\"datatklnvnafvvkyfed\"") + .withSettings("\"datawvcmj\"") + .withProtectedSettings("\"dataxiid\"") .withEnableAutomaticUpgrade(true); model = BinaryData.fromObject(model).toObject(ExtensionParameters.class); - Assertions.assertEquals("cnpqwteht", model.forceUpdateTag()); - Assertions.assertEquals("vrh", model.publisher()); - Assertions.assertEquals("jyoogwxh", model.type()); - Assertions.assertEquals("duugwbsre", model.typeHandlerVersion()); + Assertions.assertEquals("iuas", model.forceUpdateTag()); + Assertions.assertEquals("rowsocnequy", model.publisher()); + Assertions.assertEquals("jboq", model.type()); + Assertions.assertEquals("mtqjkqevadrmm", model.typeHandlerVersion()); Assertions.assertTrue(model.autoUpgradeMinorVersion()); Assertions.assertTrue(model.enableAutomaticUpgrade()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchParametersTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchParametersTests.java index 466813920fa1..e0dcbcf78416 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchParametersTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchParametersTests.java @@ -12,20 +12,20 @@ public final class ExtensionPatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionPatchParameters model = BinaryData.fromString( - "{\"typeHandlerVersion\":\"zqcyknap\",\"enableAutomaticUpgrade\":false,\"settings\":\"\\\"datauicdhzbdybwwg\\\"\",\"protectedSettings\":\"\\\"datavibidmhmwffpl\\\"\"}") + "{\"typeHandlerVersion\":\"hocn\",\"enableAutomaticUpgrade\":false,\"settings\":\"\\\"datajhngxnoq\\\"\",\"protectedSettings\":\"\\\"datatdisnjevhdlmyd\\\"\"}") .toObject(ExtensionPatchParameters.class); - Assertions.assertEquals("zqcyknap", model.typeHandlerVersion()); + Assertions.assertEquals("hocn", model.typeHandlerVersion()); Assertions.assertFalse(model.enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionPatchParameters model = new ExtensionPatchParameters().withTypeHandlerVersion("zqcyknap") + ExtensionPatchParameters model = new ExtensionPatchParameters().withTypeHandlerVersion("hocn") .withEnableAutomaticUpgrade(false) - .withSettings("\"datauicdhzbdybwwg\"") - .withProtectedSettings("\"datavibidmhmwffpl\""); + .withSettings("\"datajhngxnoq\"") + .withProtectedSettings("\"datatdisnjevhdlmyd\""); model = BinaryData.fromObject(model).toObject(ExtensionPatchParameters.class); - Assertions.assertEquals("zqcyknap", model.typeHandlerVersion()); + Assertions.assertEquals("hocn", model.typeHandlerVersion()); Assertions.assertFalse(model.enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchPropertiesTests.java index d2a94d8e5eac..8cfefbbe9479 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchPropertiesTests.java @@ -13,21 +13,21 @@ public final class ExtensionPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionPatchProperties model = BinaryData.fromString( - "{\"extensionParameters\":{\"typeHandlerVersion\":\"xzopjhbzxl\",\"enableAutomaticUpgrade\":false,\"settings\":\"\\\"datad\\\"\",\"protectedSettings\":\"\\\"datatfgxqbawpcb\\\"\"}}") + "{\"extensionParameters\":{\"typeHandlerVersion\":\"yuuatvlmbjwcolbm\",\"enableAutomaticUpgrade\":false,\"settings\":\"\\\"dataw\\\"\",\"protectedSettings\":\"\\\"datacpahprzrvxhm\\\"\"}}") .toObject(ExtensionPatchProperties.class); - Assertions.assertEquals("xzopjhbzxl", model.extensionParameters().typeHandlerVersion()); + Assertions.assertEquals("yuuatvlmbjwcolbm", model.extensionParameters().typeHandlerVersion()); Assertions.assertFalse(model.extensionParameters().enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExtensionPatchProperties model = new ExtensionPatchProperties() - .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("xzopjhbzxl") + .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("yuuatvlmbjwcolbm") .withEnableAutomaticUpgrade(false) - .withSettings("\"datad\"") - .withProtectedSettings("\"datatfgxqbawpcb\"")); + .withSettings("\"dataw\"") + .withProtectedSettings("\"datacpahprzrvxhm\"")); model = BinaryData.fromObject(model).toObject(ExtensionPatchProperties.class); - Assertions.assertEquals("xzopjhbzxl", model.extensionParameters().typeHandlerVersion()); + Assertions.assertEquals("yuuatvlmbjwcolbm", model.extensionParameters().typeHandlerVersion()); Assertions.assertFalse(model.extensionParameters().enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchTests.java index 13b97792cb2b..41c65090af1c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionPatchTests.java @@ -13,21 +13,21 @@ public final class ExtensionPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionPatch model = BinaryData.fromString( - "{\"properties\":{\"extensionParameters\":{\"typeHandlerVersion\":\"bcrymodizrx\",\"enableAutomaticUpgrade\":true,\"settings\":\"\\\"datad\\\"\",\"protectedSettings\":\"\\\"dataazpmkmlmv\\\"\"}}}") + "{\"properties\":{\"extensionParameters\":{\"typeHandlerVersion\":\"btfmhklbnldpvcbh\",\"enableAutomaticUpgrade\":false,\"settings\":\"\\\"dataquwusq\\\"\",\"protectedSettings\":\"\\\"datatrpb\\\"\"}}}") .toObject(ExtensionPatch.class); - Assertions.assertEquals("bcrymodizrx", model.extensionParameters().typeHandlerVersion()); - Assertions.assertTrue(model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("btfmhklbnldpvcbh", model.extensionParameters().typeHandlerVersion()); + Assertions.assertFalse(model.extensionParameters().enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExtensionPatch model = new ExtensionPatch() - .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("bcrymodizrx") - .withEnableAutomaticUpgrade(true) - .withSettings("\"datad\"") - .withProtectedSettings("\"dataazpmkmlmv\"")); + .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("btfmhklbnldpvcbh") + .withEnableAutomaticUpgrade(false) + .withSettings("\"dataquwusq\"") + .withProtectedSettings("\"datatrpb\"")); model = BinaryData.fromObject(model).toObject(ExtensionPatch.class); - Assertions.assertEquals("bcrymodizrx", model.extensionParameters().typeHandlerVersion()); - Assertions.assertTrue(model.extensionParameters().enableAutomaticUpgrade()); + Assertions.assertEquals("btfmhklbnldpvcbh", model.extensionParameters().typeHandlerVersion()); + Assertions.assertFalse(model.extensionParameters().enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionProfileTests.java index e839f18193e7..7067e9d8e609 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionProfileTests.java @@ -11,7 +11,7 @@ public final class ExtensionProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionProfile model = BinaryData.fromString( - "{\"extensions\":[{\"extensionName\":\"nlj\",\"state\":\"Deleted\",\"errorDetails\":[{\"exception\":\"hcmavmqfo\"},{\"exception\":\"or\"},{\"exception\":\"gyyprotwy\"},{\"exception\":\"ndm\"}],\"extensionResourceId\":\"hu\",\"typeHandlerVersion\":\"mjkavlgorbmft\",\"managedBy\":\"Azure\"},{\"extensionName\":\"zfjltfvnzcyjto\",\"state\":\"Canceled\",\"errorDetails\":[{\"exception\":\"pbdbzqgqqi\"},{\"exception\":\"dsvqwt\"},{\"exception\":\"ky\"},{\"exception\":\"cysihs\"}],\"extensionResourceId\":\"cw\",\"typeHandlerVersion\":\"ohsdtmcd\",\"managedBy\":\"Azure\"},{\"extensionName\":\"cohdx\",\"state\":\"Succeeded\",\"errorDetails\":[{\"exception\":\"uapcvhdbevwqqxe\"},{\"exception\":\"ko\"},{\"exception\":\"zinkfkbgbzbowxeq\"}],\"extensionResourceId\":\"ljmygvkzqkjjeokb\",\"typeHandlerVersion\":\"fezrx\",\"managedBy\":\"Azure\"},{\"extensionName\":\"rtle\",\"state\":\"Canceled\",\"errorDetails\":[{\"exception\":\"wvz\"},{\"exception\":\"zvd\"}],\"extensionResourceId\":\"zdix\",\"typeHandlerVersion\":\"q\",\"managedBy\":\"Azure\"}]}") + "{\"extensions\":[{\"extensionName\":\"mxu\",\"state\":\"Creating\",\"errorDetails\":[{\"exception\":\"qg\"}],\"extensionResourceId\":\"fnozoeoqbvjh\",\"typeHandlerVersion\":\"f\",\"managedBy\":\"User\"},{\"extensionName\":\"qjchntas\",\"state\":\"Deleting\",\"errorDetails\":[{\"exception\":\"ulpzealb\"},{\"exception\":\"kyojwyvfk\"},{\"exception\":\"tsu\"},{\"exception\":\"xsgxjcmmzrrs\"}],\"extensionResourceId\":\"biwsd\",\"typeHandlerVersion\":\"pxqwo\",\"managedBy\":\"Azure\"},{\"extensionName\":\"jxcjrmmuabwib\",\"state\":\"Deleted\",\"errorDetails\":[{\"exception\":\"nmc\"},{\"exception\":\"foyzbamwineof\"}],\"extensionResourceId\":\"kak\",\"typeHandlerVersion\":\"ldtve\",\"managedBy\":\"User\"},{\"extensionName\":\"lz\",\"state\":\"Deleted\",\"errorDetails\":[{\"exception\":\"uxgvttxpnr\"}],\"extensionResourceId\":\"zaamrdixtrekid\",\"typeHandlerVersion\":\"yskbruff\",\"managedBy\":\"Azure\"}]}") .toObject(ExtensionProfile.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionUpgradeParametersTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionUpgradeParametersTests.java index bb62ddc146cf..ac9e855e987b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionUpgradeParametersTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionUpgradeParametersTests.java @@ -12,14 +12,14 @@ public final class ExtensionUpgradeParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionUpgradeParameters model - = BinaryData.fromString("{\"targetVersion\":\"memhooclutnpq\"}").toObject(ExtensionUpgradeParameters.class); - Assertions.assertEquals("memhooclutnpq", model.targetVersion()); + = BinaryData.fromString("{\"targetVersion\":\"wypusuvjsl\"}").toObject(ExtensionUpgradeParameters.class); + Assertions.assertEquals("wypusuvjsl", model.targetVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionUpgradeParameters model = new ExtensionUpgradeParameters().withTargetVersion("memhooclutnpq"); + ExtensionUpgradeParameters model = new ExtensionUpgradeParameters().withTargetVersion("wypusuvjsl"); model = BinaryData.fromObject(model).toObject(ExtensionUpgradeParameters.class); - Assertions.assertEquals("memhooclutnpq", model.targetVersion()); + Assertions.assertEquals("wypusuvjsl", model.targetVersion()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateMockTests.java index 65d1abe1286f..84eae9075bbc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateMockTests.java @@ -21,7 +21,7 @@ public final class ExtensionsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"extensionParameters\":{\"forceUpdateTag\":\"ossj\",\"publisher\":\"vxpzwdqzuhfgt\",\"type\":\"czhfjdcc\",\"typeHandlerVersion\":\"yuvb\",\"autoUpgradeMinorVersion\":false,\"settings\":\"\\\"datajcgjtjkntomnl\\\"\",\"protectedSettings\":\"\\\"datahcdb\\\"\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Canceled\",\"perNodeExtensionDetails\":[{\"name\":\"eyvidcowlrmbdct\",\"extension\":\"avej\",\"typeHandlerVersion\":\"zvwkryzgavplndm\",\"state\":\"PartiallySucceeded\",\"instanceView\":{\"name\":\"kiskyyyaeknfffy\",\"type\":\"daw\",\"typeHandlerVersion\":\"mlcufb\",\"status\":{}}},{\"name\":\"utfofhoajjyl\",\"extension\":\"qyjnu\",\"typeHandlerVersion\":\"vlqq\",\"state\":\"Moving\",\"instanceView\":{\"name\":\"eevogirrpwnq\",\"type\":\"uxeu\",\"typeHandlerVersion\":\"dssijuaxxf\",\"status\":{}}},{\"name\":\"pkcpws\",\"extension\":\"nnmjun\",\"typeHandlerVersion\":\"lxcltjhbcycg\",\"state\":\"Provisioning\",\"instanceView\":{\"name\":\"ihxv\",\"type\":\"cwwfopxp\",\"typeHandlerVersion\":\"xns\",\"status\":{}}},{\"name\":\"whzqqgugw\",\"extension\":\"xahtqmmkdhwqc\",\"typeHandlerVersion\":\"ebagmfpkephuj\",\"state\":\"PartiallySucceeded\",\"instanceView\":{\"name\":\"vkke\",\"type\":\"gvypaxpj\",\"typeHandlerVersion\":\"illgnu\",\"status\":{}}}],\"managedBy\":\"Azure\"},\"id\":\"ffbuqxknvm\",\"name\":\"g\",\"type\":\"bg\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"extensionParameters\":{\"forceUpdateTag\":\"ylslurb\",\"publisher\":\"ygpnyhgdzuqsca\",\"type\":\"yvouprsytq\",\"typeHandlerVersion\":\"slhmgw\",\"autoUpgradeMinorVersion\":true,\"settings\":\"\\\"datarxpfdui\\\"\",\"protectedSettings\":\"\\\"datahgyqvpbfj\\\"\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"PartiallyConnected\",\"perNodeExtensionDetails\":[{\"name\":\"luczdquurbo\",\"extension\":\"vhvzielbprnqu\",\"typeHandlerVersion\":\"wzcqygg\",\"state\":\"Connected\",\"instanceView\":{\"name\":\"hbngqiwyej\",\"type\":\"bdrrpnrehkunsb\",\"typeHandlerVersion\":\"hhlwtpk\",\"status\":{}}},{\"name\":\"eattbzkgtzqnw\",\"extension\":\"ttewuvcysjeu\",\"typeHandlerVersion\":\"x\",\"state\":\"Deleting\",\"instanceView\":{\"name\":\"tfnonpi\",\"type\":\"xlvrhprrvbwonleq\",\"typeHandlerVersion\":\"vtlrvbstph\",\"status\":{}}},{\"name\":\"uninttlnrjdszd\",\"extension\":\"ziciqppoqvgpn\",\"typeHandlerVersion\":\"uhwfwj\",\"state\":\"PartiallySucceeded\",\"instanceView\":{\"name\":\"xtfnress\",\"type\":\"pg\",\"typeHandlerVersion\":\"ncjmgvsnvbtq\",\"status\":{}}}],\"managedBy\":\"User\"},\"id\":\"ym\",\"name\":\"n\",\"type\":\"jluqllbsupu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,23 +31,23 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Extension response = manager.extensions() - .define("hdbitq") - .withExistingArcSetting("gebzqzmcsviujo", "zdvmsnao", "xsxoxvimdvet") - .withForceUpdateTag("gomrihumgrmsdbv") - .withPublisher("gfygfkgxbdpb") - .withTypePropertiesType("hwbdpsesboynpy") - .withTypeHandlerVersion("orrvk") + .define("uywevtjrieikmwl") + .withExistingArcSetting("zl", "ynjpchamkaepl", "ajubo") + .withForceUpdateTag("isyxgucbmtredsc") + .withPublisher("stjcyyuvtzr") + .withTypePropertiesType("hcle") + .withTypeHandlerVersion("wtzqzcloyhy") .withAutoUpgradeMinorVersion(false) - .withSettings("\"datatanetinqxdhnpjn\"") - .withProtectedSettings("\"datajighd\"") + .withSettings("\"datadhz\"") + .withProtectedSettings("\"datare\"") .withEnableAutomaticUpgrade(false) .create(); - Assertions.assertEquals("ossj", response.forceUpdateTag()); - Assertions.assertEquals("vxpzwdqzuhfgt", response.publisher()); - Assertions.assertEquals("czhfjdcc", response.typePropertiesType()); - Assertions.assertEquals("yuvb", response.typeHandlerVersion()); - Assertions.assertFalse(response.autoUpgradeMinorVersion()); - Assertions.assertFalse(response.enableAutomaticUpgrade()); + Assertions.assertEquals("ylslurb", response.forceUpdateTag()); + Assertions.assertEquals("ygpnyhgdzuqsca", response.publisher()); + Assertions.assertEquals("yvouprsytq", response.typePropertiesType()); + Assertions.assertEquals("slhmgw", response.typeHandlerVersion()); + Assertions.assertTrue(response.autoUpgradeMinorVersion()); + Assertions.assertTrue(response.enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteMockTests.java index 1a8033c842b2..627421c8222c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteMockTests.java @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.extensions() - .delete("cymgbfmdquyyaes", "jxnavpyxqbkxdtb", "kihai", "zkefkzlxv", com.azure.core.util.Context.NONE); + manager.extensions().delete("au", "drcjlvkrkegty", "zuppiyx", "zmiyddeeqzq", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetWithResponseMockTests.java index 94e25f66f1de..543bbbeaa46c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ExtensionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"extensionParameters\":{\"forceUpdateTag\":\"iqoomiswkqw\",\"publisher\":\"wsnliy\",\"type\":\"ghuqzgpdglkfvd\",\"typeHandlerVersion\":\"gavtfy\",\"autoUpgradeMinorVersion\":false,\"settings\":\"\\\"dataf\\\"\",\"protectedSettings\":\"\\\"dataukryxpi\\\"\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Accepted\",\"perNodeExtensionDetails\":[{\"name\":\"dmcedlik\",\"extension\":\"kyoddoqkanqtrkic\",\"typeHandlerVersion\":\"qyrgqmndk\",\"state\":\"Succeeded\",\"instanceView\":{\"name\":\"rhvifqeqf\",\"type\":\"nackitlw\",\"typeHandlerVersion\":\"bylpzjeldaq\",\"status\":{}}},{\"name\":\"nilnijhwcbr\",\"extension\":\"ypo\",\"typeHandlerVersion\":\"pkbvzpkodngvnq\",\"state\":\"PartiallySucceeded\",\"instanceView\":{\"name\":\"twgnldxuczl\",\"type\":\"b\",\"typeHandlerVersion\":\"cznrirpiiuvcqo\",\"status\":{}}},{\"name\":\"wucqsdgbxcwtvmij\",\"extension\":\"pkkjlamyvwprjm\",\"typeHandlerVersion\":\"h\",\"state\":\"NotSpecified\",\"instanceView\":{\"name\":\"hxjpp\",\"type\":\"qe\",\"typeHandlerVersion\":\"zfppvolzayjwdu\",\"status\":{}}}],\"managedBy\":\"Azure\"},\"id\":\"rklatwiuuj\",\"name\":\"sujkr\",\"type\":\"gxeegxbnjnczepd\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"extensionParameters\":{\"forceUpdateTag\":\"t\",\"publisher\":\"eerscdxrnrnjrcu\",\"type\":\"bgacnr\",\"typeHandlerVersion\":\"dtncmsps\",\"autoUpgradeMinorVersion\":false,\"settings\":\"\\\"datameub\\\"\",\"protectedSettings\":\"\\\"dataiqmlfvhlqcskkqj\\\"\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"Deleted\",\"perNodeExtensionDetails\":[{\"name\":\"uugkw\",\"extension\":\"qmrpahuuonjk\",\"typeHandlerVersion\":\"ukguehvvp\",\"state\":\"Connected\",\"instanceView\":{\"name\":\"cjo\",\"type\":\"leuidpmton\",\"typeHandlerVersion\":\"gnhtmeplhbpjbap\",\"status\":{}}},{\"name\":\"mmkvav\",\"extension\":\"gjiuaiqpmnufzhrc\",\"typeHandlerVersion\":\"wwuzd\",\"state\":\"Succeeded\",\"instanceView\":{\"name\":\"vivjm\",\"type\":\"litqdsjipdvi\",\"typeHandlerVersion\":\"otyxbrii\",\"status\":{}}},{\"name\":\"ndslvrqoemwsie\",\"extension\":\"ilwdqmqfy\",\"typeHandlerVersion\":\"otmfxlkdlgwgna\",\"state\":\"PartiallyConnected\",\"instanceView\":{\"name\":\"i\",\"type\":\"uafixlxicwgp\",\"typeHandlerVersion\":\"dc\",\"status\":{}}}],\"managedBy\":\"User\"},\"id\":\"fasfod\",\"name\":\"opalvngtwyu\",\"type\":\"kwgqrn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Extension response = manager.extensions() - .getWithResponse("izhvks", "ojklwjpzw", "ncw", "smpyeyzolbfnfly", com.azure.core.util.Context.NONE) + .getWithResponse("sckhbmc", "rmoyfxxkwykuq", "ndx", "ykhkg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("iqoomiswkqw", response.forceUpdateTag()); - Assertions.assertEquals("wsnliy", response.publisher()); - Assertions.assertEquals("ghuqzgpdglkfvd", response.typePropertiesType()); - Assertions.assertEquals("gavtfy", response.typeHandlerVersion()); + Assertions.assertEquals("t", response.forceUpdateTag()); + Assertions.assertEquals("eerscdxrnrnjrcu", response.publisher()); + Assertions.assertEquals("bgacnr", response.typePropertiesType()); + Assertions.assertEquals("dtncmsps", response.typeHandlerVersion()); Assertions.assertFalse(response.autoUpgradeMinorVersion()); - Assertions.assertTrue(response.enableAutomaticUpgrade()); + Assertions.assertFalse(response.enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingMockTests.java index 9462b0da65e7..d81bce57c992 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingMockTests.java @@ -22,7 +22,7 @@ public final class ExtensionsListByArcSettingMockTests { @Test public void testListByArcSetting() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"extensionParameters\":{\"forceUpdateTag\":\"fytkhhkemrv\",\"publisher\":\"eoj\",\"type\":\"yulglh\",\"typeHandlerVersion\":\"wrukl\",\"autoUpgradeMinorVersion\":false,\"settings\":\"\\\"datasp\\\"\",\"protectedSettings\":\"\\\"dataogypbztgaexj\\\"\",\"enableAutomaticUpgrade\":false},\"aggregateState\":\"UpgradeFailedRollbackSucceeded\",\"perNodeExtensionDetails\":[{\"name\":\"zimbwttmhl\",\"extension\":\"ycyxrnwukfa\",\"typeHandlerVersion\":\"pdwzjggkwdep\",\"state\":\"PartiallySucceeded\",\"instanceView\":{\"name\":\"yfiqiidxcorjvudy\",\"type\":\"trttcuayiqy\",\"typeHandlerVersion\":\"kmmxzifbqgqexo\",\"status\":{}}},{\"name\":\"rtgqrqkk\",\"extension\":\"ygkuo\",\"typeHandlerVersion\":\"wainp\",\"state\":\"Failed\",\"instanceView\":{\"name\":\"hxiewh\",\"type\":\"yjt\",\"typeHandlerVersion\":\"gzyvext\",\"status\":{}}},{\"name\":\"lroldowuwhdlrif\",\"extension\":\"zttcbiich\",\"typeHandlerVersion\":\"udsozodwjcfqoy\",\"state\":\"Failed\",\"instanceView\":{\"name\":\"cymzrlcfgdwzau\",\"type\":\"dheadnyciwz\",\"typeHandlerVersion\":\"lykqadfge\",\"status\":{}}},{\"name\":\"oha\",\"extension\":\"rizmadjrsbgail\",\"typeHandlerVersion\":\"ovqmxqsxofx\",\"state\":\"Accepted\",\"instanceView\":{\"name\":\"okgltsx\",\"type\":\"iob\",\"typeHandlerVersion\":\"ebruptlsrvqz\",\"status\":{}}}],\"managedBy\":\"Azure\"},\"id\":\"srnjlvgrghnh\",\"name\":\"oxrqhjninpeswv\",\"type\":\"hq\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"extensionParameters\":{\"forceUpdateTag\":\"zkjp\",\"publisher\":\"gzxvbczw\",\"type\":\"egbthm\",\"typeHandlerVersion\":\"i\",\"autoUpgradeMinorVersion\":true,\"settings\":\"\\\"dataiggrunoz\\\"\",\"protectedSettings\":\"\\\"datau\\\"\",\"enableAutomaticUpgrade\":true},\"aggregateState\":\"Canceled\",\"perNodeExtensionDetails\":[{\"name\":\"sdwsngkrfi\",\"extension\":\"cjvakmh\",\"typeHandlerVersion\":\"hwahfbw\",\"state\":\"PartiallyConnected\",\"instanceView\":{\"name\":\"x\",\"type\":\"vynuqqkotauratn\",\"typeHandlerVersion\":\"ppfzsclef\",\"status\":{}}},{\"name\":\"etndqlmfdggnbbu\",\"extension\":\"wovvv\",\"typeHandlerVersion\":\"leev\",\"state\":\"Succeeded\",\"instanceView\":{\"name\":\"rehjuqwvapx\",\"type\":\"zhpzihacenqqzlx\",\"typeHandlerVersion\":\"zubfo\",\"status\":{}}}],\"managedBy\":\"User\"},\"id\":\"mkfw\",\"name\":\"jcw\",\"type\":\"ewfhxwyrkbre\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testListByArcSetting() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.extensions() - .listByArcSetting("ozcgoeozlib", "bnunzuysajvvqlho", "yonelivgtibtkqjq", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.extensions().listByArcSetting("abm", "vsexduetb", "pfczewxtrl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fytkhhkemrv", response.iterator().next().forceUpdateTag()); - Assertions.assertEquals("eoj", response.iterator().next().publisher()); - Assertions.assertEquals("yulglh", response.iterator().next().typePropertiesType()); - Assertions.assertEquals("wrukl", response.iterator().next().typeHandlerVersion()); - Assertions.assertFalse(response.iterator().next().autoUpgradeMinorVersion()); - Assertions.assertFalse(response.iterator().next().enableAutomaticUpgrade()); + Assertions.assertEquals("zkjp", response.iterator().next().forceUpdateTag()); + Assertions.assertEquals("gzxvbczw", response.iterator().next().publisher()); + Assertions.assertEquals("egbthm", response.iterator().next().typePropertiesType()); + Assertions.assertEquals("i", response.iterator().next().typeHandlerVersion()); + Assertions.assertTrue(response.iterator().next().autoUpgradeMinorVersion()); + Assertions.assertTrue(response.iterator().next().enableAutomaticUpgrade()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileTests.java deleted file mode 100644 index 5134a3c7c497..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.HardwareProfile; - -public final class HardwareProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HardwareProfile model = BinaryData.fromString( - "{\"cpuCores\":8392649473152993816,\"cpuSockets\":7800744422417050580,\"memoryCapacityInGb\":5099301963974111826,\"model\":\"kerdkdkgawqwj\",\"manufacturer\":\"ldfkcefeygzqpjoi\",\"serialNumber\":\"mnaybdjnxumentq\",\"processorType\":\"tw\",\"architecture\":\"arm64\"}") - .toObject(HardwareProfile.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciCollectLogJobPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciCollectLogJobPropertiesTests.java new file mode 100644 index 000000000000..acd79446547b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciCollectLogJobPropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.HciCollectLogJobProperties; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class HciCollectLogJobPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HciCollectLogJobProperties model = BinaryData.fromString( + "{\"jobType\":\"CollectLog\",\"fromDate\":\"2021-02-25T08:06:28Z\",\"toDate\":\"2021-04-07T19:06:46Z\",\"lastLogGenerated\":\"2021-05-12T14:22:49Z\",\"reportedProperties\":{\"percentComplete\":1432155819,\"validationStatus\":{\"status\":\"pnvdxz\",\"steps\":[{\"name\":\"frbbc\",\"description\":\"qagt\",\"fullStepIndex\":\"dhlfkqojpykvgt\",\"startTimeUtc\":\"cnifm\",\"endTimeUtc\":\"sdymbrn\",\"status\":\"u\",\"steps\":[{},{},{}],\"exception\":[\"fwgckhocxvdfffw\"]},{\"name\":\"qrouda\",\"description\":\"avehhrvkbunzo\",\"fullStepIndex\":\"dhcxgkmoy\",\"startTimeUtc\":\"dyuib\",\"endTimeUtc\":\"fdn\",\"status\":\"ydvfvfcjnae\",\"steps\":[{},{},{},{}],\"exception\":[\"hmgorffukiscv\",\"mzhwplefaxvxi\",\"cbtgnhnz\"]},{\"name\":\"qxtjjfzqlqhyca\",\"description\":\"dggxdbeesmi\",\"fullStepIndex\":\"nlrariaawiuagy\",\"startTimeUtc\":\"qfby\",\"endTimeUtc\":\"rfgi\",\"status\":\"tcojocqwo\",\"steps\":[{},{},{}],\"exception\":[\"vusfzld\",\"ozuxylfsbtkadpys\",\"wn\",\"tgkbugrjqctojc\"]}]},\"deploymentStatus\":{\"status\":\"of\",\"steps\":[{\"name\":\"efojyqdhcupl\",\"description\":\"lcwkhihihlhz\",\"fullStepIndex\":\"qtz\",\"startTimeUtc\":\"rgnowcjhfgm\",\"endTimeUtc\":\"cact\",\"status\":\"wotey\",\"steps\":[{},{},{},{}],\"exception\":[\"qovekqvgqou\",\"ifzmpjwyivqi\",\"f\",\"cvhrfsp\"]},{\"name\":\"agr\",\"description\":\"ikteusqczkvyk\",\"fullStepIndex\":\"ubyjaffmmf\",\"startTimeUtc\":\"cqc\",\"endTimeUtc\":\"bgq\",\"status\":\"rtalmet\",\"steps\":[{},{}],\"exception\":[\"slqxi\",\"hrmooi\",\"qseypxiutcxa\",\"zhyrpeto\"]},{\"name\":\"bjoxs\",\"description\":\"vnh\",\"fullStepIndex\":\"brqnkkzjcjb\",\"startTimeUtc\":\"gaehvvibrxjjst\",\"endTimeUtc\":\"beitpkx\",\"status\":\"moob\",\"steps\":[{}],\"exception\":[\"dgfcwqmp\",\"maqxzhemjyh\"]},{\"name\":\"uj\",\"description\":\"t\",\"fullStepIndex\":\"ozzwculkba\",\"startTimeUtc\":\"fajnjwltlwtjjguk\",\"endTimeUtc\":\"lhsnvkcdmx\",\"status\":\"poaimlnwiaaomyl\",\"steps\":[{}],\"exception\":[\"lcsethwwnpj\",\"l\",\"zswpchwa\"]}]},\"logCollectionSessionDetails\":[{\"startTime\":\"usnfepgfewet\",\"endTime\":\"yxgncxykxhdjhli\",\"timeCollected\":\"bcxf\",\"logSize\":507931039,\"status\":\"Succeeded\",\"correlationId\":\"xvxcjzhq\"},{\"startTime\":\"xfpxtgqscja\",\"endTime\":\"t\",\"timeCollected\":\"hdqazkmtgguwp\",\"logSize\":178594902,\"status\":\"Succeeded\",\"correlationId\":\"ivmmghfcfiwrxgk\"}]},\"deploymentMode\":\"Deploy\",\"provisioningState\":\"Accepted\",\"jobId\":\"nzqodfvpg\",\"startTimeUtc\":\"2021-05-18T14:08:31Z\",\"endTimeUtc\":\"2021-02-22T17:56:41Z\",\"status\":\"Failed\"}") + .toObject(HciCollectLogJobProperties.class); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T08:06:28Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-07T19:06:46Z"), model.toDate()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HciCollectLogJobProperties model = new HciCollectLogJobProperties().withDeploymentMode(DeploymentMode.DEPLOY) + .withFromDate(OffsetDateTime.parse("2021-02-25T08:06:28Z")) + .withToDate(OffsetDateTime.parse("2021-04-07T19:06:46Z")); + model = BinaryData.fromObject(model).toObject(HciCollectLogJobProperties.class); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T08:06:28Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-07T19:06:46Z"), model.toDate()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceAdapterPropertyOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceAdapterPropertyOverridesTests.java index 45d3ba7c802e..ac79e10ef081 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceAdapterPropertyOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceAdapterPropertyOverridesTests.java @@ -11,7 +11,7 @@ public final class HciEdgeDeviceAdapterPropertyOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceAdapterPropertyOverrides model = BinaryData - .fromString("{\"jumboPacket\":\"w\",\"networkDirect\":\"ilkmk\",\"networkDirectTechnology\":\"olvdnd\"}") + .fromString("{\"jumboPacket\":\"x\",\"networkDirect\":\"m\",\"networkDirectTechnology\":\"jivyqlkjuv\"}") .toObject(HciEdgeDeviceAdapterPropertyOverrides.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceArcExtensionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceArcExtensionTests.java index 9d2d4c3bd62f..5e0582181494 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceArcExtensionTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceArcExtensionTests.java @@ -11,7 +11,7 @@ public final class HciEdgeDeviceArcExtensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceArcExtension model = BinaryData.fromString( - "{\"extensionName\":\"awopqh\",\"state\":\"Failed\",\"errorDetails\":[{\"exception\":\"cgsbost\"}],\"extensionResourceId\":\"lnd\",\"typeHandlerVersion\":\"tutmzl\",\"managedBy\":\"Azure\"}") + "{\"extensionName\":\"k\",\"state\":\"Failed\",\"errorDetails\":[{\"exception\":\"hrpqhv\"},{\"exception\":\"lcouqehbhbcdszir\"}],\"extensionResourceId\":\"an\",\"typeHandlerVersion\":\"ypmbltoormkfq\",\"managedBy\":\"Azure\"}") .toObject(HciEdgeDeviceArcExtension.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceHostNetworkTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceHostNetworkTests.java index cd8876a73ed7..dbd988d43970 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceHostNetworkTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceHostNetworkTests.java @@ -11,7 +11,7 @@ public final class HciEdgeDeviceHostNetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceHostNetwork model = BinaryData.fromString( - "{\"intents\":[{\"scope\":947940587713808603,\"intentType\":2389735072802521585,\"isComputeIntentSet\":false,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":true,\"intentName\":\"pbswvefloccsrm\",\"intentAdapters\":[\"hmipgawtxxpkyjc\",\"cjxgrytf\",\"pcycilrmcaykg\",\"noxuztrksx\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"cpfnznthjtwkja\",\"loadBalancingAlgorithm\":\"rxuzvoam\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"os\",\"priorityValue8021Action_SMB\":\"bzahgxqd\",\"bandwidthPercentage_SMB\":\"rtltla\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"katbhjm\",\"networkDirect\":\"nbsoqeqalarv\",\"networkDirectTechnology\":\"gunbtgfebwlnbm\"}},{\"scope\":2175635853059687814,\"intentType\":8264329169866250117,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":false,\"intentName\":\"glgou\",\"intentAdapters\":[\"mjjyuojq\",\"obaxkjeytu\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"kwr\",\"loadBalancingAlgorithm\":\"nkqbhsyrq\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"denxau\",\"priorityValue8021Action_SMB\":\"pakdkifmjnnawt\",\"bandwidthPercentage_SMB\":\"bpxuckpggqoweyi\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"sn\",\"networkDirect\":\"fl\",\"networkDirectTechnology\":\"mpizru\"}},{\"scope\":4881754570538060934,\"intentType\":5682367962414128287,\"isComputeIntentSet\":true,\"isStorageIntentSet\":false,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":true,\"intentName\":\"mkzjvkviir\",\"intentAdapters\":[\"grwsdp\",\"ra\",\"zvzbglbyv\",\"ctctbrxkjz\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"fmsh\",\"loadBalancingAlgorithm\":\"fbkgozxwopdby\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"aclnapxbiygnugj\",\"priorityValue8021Action_SMB\":\"fsmfcttuxuuyi\",\"bandwidthPercentage_SMB\":\"lq\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"rehmr\",\"networkDirect\":\"hvsujztc\",\"networkDirectTechnology\":\"tqjtwhauu\"}}],\"storageNetworks\":[{\"name\":\"njle\",\"networkAdapterName\":\"xsmrpddouifamow\",\"storageVlanId\":\"iynknlq\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"piwhxqs\",\"ipv4Address\":\"tmaaj\",\"subnetMask\":\"huxy\"},{\"physicalNode\":\"jvmtygjbmz\",\"ipv4Address\":\"spsp\",\"subnetMask\":\"c\"}]},{\"name\":\"kyjpmspbps\",\"networkAdapterName\":\"fppyogtieyujtvcz\",\"storageVlanId\":\"n\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"munjdxvglnkvx\",\"ipv4Address\":\"paglqivbgk\",\"subnetMask\":\"khpzvuqdflv\"},{\"physicalNode\":\"iypfp\",\"ipv4Address\":\"cpzgpxtiv\",\"subnetMask\":\"knidib\"},{\"physicalNode\":\"jxgpnrhgovfg\",\"ipv4Address\":\"kqmhhaowjr\",\"subnetMask\":\"vuporqzdfuydzv\"}]},{\"name\":\"vxcnqmxqps\",\"networkAdapterName\":\"kmvkhl\",\"storageVlanId\":\"dhbemzqkzszu\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"glxxhljfpgpic\",\"ipv4Address\":\"nzhrgmqgjsxvpqcb\",\"subnetMask\":\"mbodthsqqgvri\"},{\"physicalNode\":\"a\",\"ipv4Address\":\"lacjfrnxo\",\"subnetMask\":\"xauzlwvsgmwohqfz\"}]}],\"storageConnectivitySwitchless\":false,\"enableStorageAutoIp\":false}") + "{\"intents\":[{\"scope\":4462133379998681984,\"intentType\":6580751925996690350,\"isComputeIntentSet\":true,\"isStorageIntentSet\":true,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":false,\"intentName\":\"yl\",\"intentAdapters\":[\"gvxvatv\",\"rkdlb\",\"bqxvhcsyhzlwxae\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"exdnd\",\"loadBalancingAlgorithm\":\"dwead\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"ntopa\",\"priorityValue8021Action_SMB\":\"tmvmmagoaqylkjz\",\"bandwidthPercentage_SMB\":\"iua\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"xitp\",\"networkDirect\":\"nzcpdltkr\",\"networkDirectTechnology\":\"jmtbd\"}},{\"scope\":6034499635104274405,\"intentType\":6830690050891777137,\"isComputeIntentSet\":false,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"ujlfyoumpcky\",\"intentAdapters\":[\"cdigpt\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"mqxuc\",\"loadBalancingAlgorithm\":\"ijo\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"tgjcy\",\"priorityValue8021Action_SMB\":\"zjd\",\"bandwidthPercentage_SMB\":\"qjbtxjeaoqaqbzgy\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"uatbwbqamteuliy\",\"networkDirect\":\"pkcvmwf\",\"networkDirectTechnology\":\"xxe\"}},{\"scope\":3601335985506918888,\"intentType\":8838975018818130961,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"ojxjmcsmyqwix\",\"intentAdapters\":[\"wnkwywzwo\",\"alickduoi\",\"tamtyv\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"wzawnvsbcfhzagxn\",\"loadBalancingAlgorithm\":\"ycvdimw\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"zgyufutrwp\",\"priorityValue8021Action_SMB\":\"ryekzkd\",\"bandwidthPercentage_SMB\":\"eotta\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"xwwhnh\",\"networkDirect\":\"fv\",\"networkDirectTechnology\":\"dpmiljpn\"}}],\"storageNetworks\":[{\"name\":\"dqllzsauzpjlxeeh\",\"networkAdapterName\":\"iqhzlr\",\"storageVlanId\":\"mezx\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"hmx\",\"ipv4Address\":\"dsajrednwyysh\",\"subnetMask\":\"w\"},{\"physicalNode\":\"evuafpwzyifrk\",\"ipv4Address\":\"ltxeqip\",\"subnetMask\":\"zdyi\"},{\"physicalNode\":\"fayorpravkjoges\",\"ipv4Address\":\"bnsmjkwynqxaek\",\"subnetMask\":\"ykvwjtqpkevmyltj\"},{\"physicalNode\":\"spxklu\",\"ipv4Address\":\"clf\",\"subnetMask\":\"annnoytzposewx\"}]},{\"name\":\"pxvkqma\",\"networkAdapterName\":\"xvpif\",\"storageVlanId\":\"aifyzyzeyuubeids\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"toi\",\"ipv4Address\":\"gygvfltgvdiho\",\"subnetMask\":\"krxwet\"},{\"physicalNode\":\"drcyrucpcun\",\"ipv4Address\":\"zdqumoe\",\"subnetMask\":\"dnaienhqhskndnel\"}]}],\"storageConnectivitySwitchless\":false,\"enableStorageAutoIp\":true}") .toObject(HciEdgeDeviceHostNetwork.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceIntentsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceIntentsTests.java index f30e254edb5e..291b7abcdfc0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceIntentsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceIntentsTests.java @@ -11,7 +11,7 @@ public final class HciEdgeDeviceIntentsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceIntents model = BinaryData.fromString( - "{\"scope\":1247235738822120409,\"intentType\":3861099179671719869,\"isComputeIntentSet\":false,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":true,\"isOnlyStretch\":false,\"isNetworkIntentType\":false,\"intentName\":\"iattgplu\",\"intentAdapters\":[\"tangcfhnykzcu\",\"swvxwlmzqwmv\",\"xnjmxm\",\"uqudtcvclxyn\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"fabuiyjibu\",\"loadBalancingAlgorithm\":\"hdugneiknpg\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"uqh\",\"priorityValue8021Action_SMB\":\"tozipqwj\",\"bandwidthPercentage_SMB\":\"mur\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"wpktvqylkmqpzoyh\",\"networkDirect\":\"bcg\",\"networkDirectTechnology\":\"cloxo\"}}") + "{\"scope\":2743688893859509048,\"intentType\":3913275475453480434,\"isComputeIntentSet\":true,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":true,\"isStretchIntentSet\":true,\"isOnlyStretch\":false,\"isNetworkIntentType\":false,\"intentName\":\"lyxnucaephb\",\"intentAdapters\":[\"qp\",\"tv\",\"qsdtcjbctvivuzq\",\"mtuowogtgitsqhzv\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"banf\",\"loadBalancingAlgorithm\":\"ds\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"atkdbmwnrd\",\"priorityValue8021Action_SMB\":\"ibqbnaomhjrm\",\"bandwidthPercentage_SMB\":\"hmaxljalfi\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"bc\",\"networkDirect\":\"cd\",\"networkDirectTechnology\":\"xqcwgax\"}}") .toObject(HciEdgeDeviceIntents.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobPropertiesTests.java index fd09166cc58e..09fc5f16ab15 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobPropertiesTests.java @@ -13,15 +13,15 @@ public final class HciEdgeDeviceJobPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceJobProperties model = BinaryData.fromString( - "{\"jobType\":\"HciEdgeDeviceJobProperties\",\"deploymentMode\":\"Validate\",\"provisioningState\":\"Provisioning\",\"jobId\":\"f\",\"startTimeUtc\":\"2021-09-21T00:40:30Z\",\"endTimeUtc\":\"2021-01-07T15:46:38Z\",\"status\":\"ValidationSuccess\"}") + "{\"jobType\":\"HciEdgeDeviceJobProperties\",\"deploymentMode\":\"Deploy\",\"provisioningState\":\"Updating\",\"jobId\":\"njdgkynscliq\",\"startTimeUtc\":\"2020-12-25T01:29:23Z\",\"endTimeUtc\":\"2021-03-22T17:48:05Z\",\"status\":\"Succeeded\"}") .toObject(HciEdgeDeviceJobProperties.class); - Assertions.assertEquals(DeploymentMode.VALIDATE, model.deploymentMode()); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HciEdgeDeviceJobProperties model = new HciEdgeDeviceJobProperties().withDeploymentMode(DeploymentMode.VALIDATE); + HciEdgeDeviceJobProperties model = new HciEdgeDeviceJobProperties().withDeploymentMode(DeploymentMode.DEPLOY); model = BinaryData.fromObject(model).toObject(HciEdgeDeviceJobProperties.class); - Assertions.assertEquals(DeploymentMode.VALIDATE, model.deploymentMode()); + Assertions.assertEquals(DeploymentMode.DEPLOY, model.deploymentMode()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobTests.java index bdd8f9edcf84..81cc4345d603 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceJobTests.java @@ -14,16 +14,16 @@ public final class HciEdgeDeviceJobTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceJob model = BinaryData.fromString( - "{\"kind\":\"HCI\",\"properties\":{\"jobType\":\"HciEdgeDeviceJobProperties\",\"deploymentMode\":\"Deploy\",\"provisioningState\":\"PartiallyConnected\",\"jobId\":\"knpirgnepttwq\",\"startTimeUtc\":\"2021-03-07T19:44:42Z\",\"endTimeUtc\":\"2021-07-30T07:00:24Z\",\"status\":\"Canceled\"},\"id\":\"mqnrojlpijnkr\",\"name\":\"frddhcrati\",\"type\":\"zronasxift\"}") + "{\"kind\":\"HCI\",\"properties\":{\"jobType\":\"HciEdgeDeviceJobProperties\",\"deploymentMode\":\"Validate\",\"provisioningState\":\"Canceled\",\"jobId\":\"vyl\",\"startTimeUtc\":\"2021-08-24T01:27:04Z\",\"endTimeUtc\":\"2021-01-10T05:31:28Z\",\"status\":\"ValidationInProgress\"},\"id\":\"mncsttijfybvp\",\"name\":\"ekrsgs\",\"type\":\"b\"}") .toObject(HciEdgeDeviceJob.class); - Assertions.assertEquals(DeploymentMode.DEPLOY, model.properties().deploymentMode()); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.properties().deploymentMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { HciEdgeDeviceJob model = new HciEdgeDeviceJob() - .withProperties(new HciEdgeDeviceJobProperties().withDeploymentMode(DeploymentMode.DEPLOY)); + .withProperties(new HciEdgeDeviceJobProperties().withDeploymentMode(DeploymentMode.VALIDATE)); model = BinaryData.fromObject(model).toObject(HciEdgeDeviceJob.class); - Assertions.assertEquals(DeploymentMode.DEPLOY, model.properties().deploymentMode()); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.properties().deploymentMode()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageAdapterIpInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageAdapterIpInfoTests.java index 26d753dcce28..ef45c7c5e3df 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageAdapterIpInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageAdapterIpInfoTests.java @@ -11,7 +11,7 @@ public final class HciEdgeDeviceStorageAdapterIpInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceStorageAdapterIpInfo model = BinaryData - .fromString("{\"physicalNode\":\"vmfqhppubo\",\"ipv4Address\":\"epdfgkmtdherng\",\"subnetMask\":\"c\"}") + .fromString("{\"physicalNode\":\"reuykbbmnwagl\",\"ipv4Address\":\"xoe\",\"subnetMask\":\"nqlnfwmyymvqd\"}") .toObject(HciEdgeDeviceStorageAdapterIpInfo.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageNetworksTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageNetworksTests.java index 8c67e9ff72a6..4bc0b6473f14 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageNetworksTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceStorageNetworksTests.java @@ -11,7 +11,7 @@ public final class HciEdgeDeviceStorageNetworksTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceStorageNetworks model = BinaryData.fromString( - "{\"name\":\"auo\",\"networkAdapterName\":\"huartv\",\"storageVlanId\":\"ukyefchnmnahmnxh\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"irwrwe\",\"ipv4Address\":\"xffi\",\"subnetMask\":\"xwrsnew\"},{\"physicalNode\":\"zqvbubqm\",\"ipv4Address\":\"hsycxhxzgaz\",\"subnetMask\":\"abo\"}]}") + "{\"name\":\"bmslzoyov\",\"networkAdapterName\":\"dbpqvybefgvm\",\"storageVlanId\":\"okcvtlubses\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"artr\",\"ipv4Address\":\"nlp\",\"subnetMask\":\"ykycndzfqi\"}]}") .toObject(HciEdgeDeviceStorageNetworks.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceVirtualSwitchConfigurationOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceVirtualSwitchConfigurationOverridesTests.java index f0fcae645fab..fb0242bd94a5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceVirtualSwitchConfigurationOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciEdgeDeviceVirtualSwitchConfigurationOverridesTests.java @@ -11,7 +11,7 @@ public final class HciEdgeDeviceVirtualSwitchConfigurationOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciEdgeDeviceVirtualSwitchConfigurationOverrides model - = BinaryData.fromString("{\"enableIov\":\"qinjipnwjf\",\"loadBalancingAlgorithm\":\"qlafcbahhpzpofoi\"}") + = BinaryData.fromString("{\"enableIov\":\"vaknokzwjj\",\"loadBalancingAlgorithm\":\"ltixldzyyfytpq\"}") .toObject(HciEdgeDeviceVirtualSwitchConfigurationOverrides.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciHardwareProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciHardwareProfileTests.java index c57b7116e202..942a7104b0e4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciHardwareProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciHardwareProfileTests.java @@ -11,6 +11,6 @@ public final class HciHardwareProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciHardwareProfile model - = BinaryData.fromString("{\"processorType\":\"ntkwcegy\"}").toObject(HciHardwareProfile.class); + = BinaryData.fromString("{\"processorType\":\"k\"}").toObject(HciHardwareProfile.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNetworkProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNetworkProfileTests.java index 6f7e8c3fb1af..a66a8b32428b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNetworkProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNetworkProfileTests.java @@ -11,7 +11,7 @@ public final class HciNetworkProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciNetworkProfile model = BinaryData.fromString( - "{\"nicDetails\":[{\"adapterName\":\"cwwyyur\",\"interfaceDescription\":\"chpp\",\"componentId\":\"rsnm\",\"driverVersion\":\"ayzejnhlbkpbz\",\"ip4Address\":\"piljhahzvech\",\"subnetMask\":\"bnwieholew\",\"defaultGateway\":\"iuubwefqsf\",\"dnsServers\":[\"qtferrqwexjkmf\",\"apjwogqqnobpudcd\"],\"defaultIsolationId\":\"tqwpwya\",\"macAddress\":\"zasqbucljgkyexao\",\"slot\":\"yaipidsda\",\"switchName\":\"tx\",\"nicType\":\"jumfqwazlnq\",\"vlanId\":\"cjngzqdqxtbjwgny\",\"nicStatus\":\"sf\",\"rdmaCapability\":\"Disabled\"},{\"adapterName\":\"uik\",\"interfaceDescription\":\"ajqglcf\",\"componentId\":\"l\",\"driverVersion\":\"ryxynqnzrd\",\"ip4Address\":\"ovw\",\"subnetMask\":\"nptgoeiybba\",\"defaultGateway\":\"fhvfsl\",\"dnsServers\":[\"tjlrigjksky\",\"ioovzidsxwaab\"],\"defaultIsolationId\":\"ifrygzn\",\"macAddress\":\"axri\",\"slot\":\"zob\",\"switchName\":\"pxl\",\"nicType\":\"lnelxieixynl\",\"vlanId\":\"ecwcrojphslhcawj\",\"nicStatus\":\"i\",\"rdmaCapability\":\"Disabled\"}],\"switchDetails\":[{\"switchName\":\"igorqjbttzhragl\",\"switchType\":\"fhonqjujeickpzvc\",\"extensions\":[{\"switchId\":\"xelnwc\",\"extensionName\":\"yjede\",\"extensionEnabled\":false},{\"switchId\":\"f\",\"extensionName\":\"qscazuawxtz\",\"extensionEnabled\":true},{\"switchId\":\"mwabzxrvxc\",\"extensionName\":\"hsphaivmxyas\",\"extensionEnabled\":true},{\"switchId\":\"sgzwywakoihknsm\",\"extensionName\":\"lmljhlnymzotq\",\"extensionEnabled\":true}]}],\"hostNetwork\":{\"intents\":[{\"scope\":5743410274486004649,\"intentType\":5717479368047501147,\"isComputeIntentSet\":false,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":true,\"isOnlyStretch\":false,\"isNetworkIntentType\":false,\"intentName\":\"ujlzqnhcvsqltn\",\"intentAdapters\":[\"bgsxgnxfyqonmpq\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"fdbxiqxeiiqbim\",\"loadBalancingAlgorithm\":\"mwwinhehfqpofv\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"embnkbw\",\"priorityValue8021Action_SMB\":\"vxkdivqihebwtswb\",\"bandwidthPercentage_SMB\":\"wfmdurage\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"jfelisdjubggbqig\",\"networkDirect\":\"kbsazgak\",\"networkDirectTechnology\":\"cyrcmjdmspo\"}}],\"storageNetworks\":[{\"name\":\"uhrylniofr\",\"networkAdapterName\":\"bzjedmstk\",\"storageVlanId\":\"l\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"uiiznktwfansnvpd\",\"ipv4Address\":\"mik\",\"subnetMask\":\"tbzbkiwbuqnyophz\"},{\"physicalNode\":\"l\",\"ipv4Address\":\"crpfbcunez\",\"subnetMask\":\"e\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":false},\"sdnProperties\":{\"sdnStatus\":\"Disabled\",\"sdnDomainName\":\"wx\",\"sdnApiAddress\":\"etnpsihcl\"}}") + "{\"nicDetails\":[{\"adapterName\":\"sibjgs\",\"interfaceDescription\":\"xxahmrnadzyqegxy\",\"componentId\":\"pinbmhwbjijkgqxn\",\"driverVersion\":\"bkezn\",\"ip4Address\":\"ujvaannggi\",\"subnetMask\":\"wkdtaawxwf\",\"defaultGateway\":\"aumrrqmbzmqkrat\",\"dnsServers\":[\"wbjsidbirkf\",\"kso\"],\"defaultIsolationId\":\"gogewijymrh\",\"macAddress\":\"u\",\"slot\":\"zkye\",\"switchName\":\"f\",\"nicType\":\"hhhqosm\",\"vlanId\":\"jkutycyarnr\",\"nicStatus\":\"hguabzoghktdp\",\"rdmaCapability\":\"Enabled\"},{\"adapterName\":\"coe\",\"interfaceDescription\":\"nhzqrottjzcfy\",\"componentId\":\"pt\",\"driverVersion\":\"lohap\",\"ip4Address\":\"nfszpyglqdhmrjz\",\"subnetMask\":\"l\",\"defaultGateway\":\"pjby\",\"dnsServers\":[\"joqcjenkyhfqzvsq\",\"fxjelg\",\"mpzqjhhhq\",\"uwyvcacoyvi\"],\"defaultIsolationId\":\"s\",\"macAddress\":\"usjszlbscm\",\"slot\":\"zijiufehgmv\",\"switchName\":\"nwyvq\",\"nicType\":\"rerlniy\",\"vlanId\":\"lyfwxzutg\",\"nicStatus\":\"twhghmupgxyjtc\",\"rdmaCapability\":\"Disabled\"}],\"switchDetails\":[{\"switchName\":\"jf\",\"switchType\":\"benbbkl\",\"extensions\":[{\"switchId\":\"ucafedd\",\"extensionName\":\"nlzafwxudgnh\",\"extensionEnabled\":true}]},{\"switchName\":\"rtalvnbw\",\"switchType\":\"bemeluclvd\",\"extensions\":[{\"switchId\":\"yrdnqod\",\"extensionName\":\"hhxhq\",\"extensionEnabled\":true},{\"switchId\":\"vzoqgyipemchgavs\",\"extensionName\":\"uejdtxptlg\",\"extensionEnabled\":true},{\"switchId\":\"omew\",\"extensionName\":\"s\",\"extensionEnabled\":false},{\"switchId\":\"hqawmo\",\"extensionName\":\"ancz\",\"extensionEnabled\":true}]},{\"switchName\":\"rrslblxydkx\",\"switchType\":\"vvbxiwkgfbqljnq\",\"extensions\":[{\"switchId\":\"h\",\"extensionName\":\"okulehurqlrqf\",\"extensionEnabled\":true},{\"switchId\":\"yur\",\"extensionName\":\"hy\",\"extensionEnabled\":false},{\"switchId\":\"av\",\"extensionName\":\"qdbrxmrgc\",\"extensionEnabled\":false}]}],\"hostNetwork\":{\"intents\":[{\"scope\":1106569210264329065,\"intentType\":316638403801617867,\"isComputeIntentSet\":false,\"isStorageIntentSet\":true,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":true,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"cblevpmc\",\"intentAdapters\":[\"yxkyxlz\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"zzlt\",\"loadBalancingAlgorithm\":\"hbzffovwmbjlzqs\"},\"overrideQosPolicy\":true,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"dwnapf\",\"priorityValue8021Action_SMB\":\"wow\",\"bandwidthPercentage_SMB\":\"ptnuwjtkschgc\"},\"overrideAdapterProperty\":false,\"adapterPropertyOverrides\":{\"jumboPacket\":\"eseyqr\",\"networkDirect\":\"y\",\"networkDirectTechnology\":\"dotjvdk\"}},{\"scope\":6806801799141694869,\"intentType\":9198876347580255785,\"isComputeIntentSet\":true,\"isStorageIntentSet\":false,\"isOnlyStorage\":false,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":true,\"intentName\":\"txfkndlqvt\",\"intentAdapters\":[\"vgmmbugtyw\",\"tmqa\",\"kueatgroeshoy\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"fqxkfaoyteh\",\"loadBalancingAlgorithm\":\"uvjmv\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"ckygroejnndljdju\",\"priorityValue8021Action_SMB\":\"br\",\"bandwidthPercentage_SMB\":\"qyn\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"faqegplwryshwddk\",\"networkDirect\":\"xgkqusybwp\",\"networkDirectTechnology\":\"acarvvlf\"}},{\"scope\":5479508191284455272,\"intentType\":2382166218278045043,\"isComputeIntentSet\":false,\"isStorageIntentSet\":false,\"isOnlyStorage\":true,\"isManagementIntentSet\":false,\"isStretchIntentSet\":false,\"isOnlyStretch\":false,\"isNetworkIntentType\":false,\"intentName\":\"lsxkd\",\"intentAdapters\":[\"apfgsdpcvessm\",\"hhkuuip\",\"dqq\"],\"overrideVirtualSwitchConfiguration\":true,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"alblhtjqvq\",\"loadBalancingAlgorithm\":\"wehtaemxh\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"vusxiv\",\"priorityValue8021Action_SMB\":\"rryveimipskdy\",\"bandwidthPercentage_SMB\":\"tv\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"ftjvvruxwigsye\",\"networkDirect\":\"qdsmjtg\",\"networkDirectTechnology\":\"gdgkki\"}},{\"scope\":6629316380331862518,\"intentType\":8101531016610738380,\"isComputeIntentSet\":false,\"isStorageIntentSet\":true,\"isOnlyStorage\":true,\"isManagementIntentSet\":true,\"isStretchIntentSet\":false,\"isOnlyStretch\":true,\"isNetworkIntentType\":false,\"intentName\":\"mqfl\",\"intentAdapters\":[\"bdgwumgxdgd\"],\"overrideVirtualSwitchConfiguration\":false,\"virtualSwitchConfigurationOverrides\":{\"enableIov\":\"dexjddvjs\",\"loadBalancingAlgorithm\":\"wotmmwllcolsrsxa\"},\"overrideQosPolicy\":false,\"qosPolicyOverrides\":{\"priorityValue8021Action_Cluster\":\"excgjokjljnhvl\",\"priorityValue8021Action_SMB\":\"bekpeeksnbksdqhj\",\"bandwidthPercentage_SMB\":\"klxesl\"},\"overrideAdapterProperty\":true,\"adapterPropertyOverrides\":{\"jumboPacket\":\"tcpoqma\",\"networkDirect\":\"wqjwgok\",\"networkDirectTechnology\":\"ejjjkxybwfdb\"}}],\"storageNetworks\":[{\"name\":\"tensvkzykj\",\"networkAdapterName\":\"kns\",\"storageVlanId\":\"wushcdp\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"qrmgjfbpkuw\",\"ipv4Address\":\"oiojfizfavkjzwfb\",\"subnetMask\":\"aykmmf\"}]},{\"name\":\"bfw\",\"networkAdapterName\":\"zxmdew\",\"storageVlanId\":\"sxkrpl\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"ejwwviyoyps\",\"ipv4Address\":\"brnnhjxsqw\",\"subnetMask\":\"qkbiwet\"}]},{\"name\":\"zycyqiqyhg\",\"networkAdapterName\":\"etzlexbsfledynoj\",\"storageVlanId\":\"iuwfbzkkdtnhqsy\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"elpkpbafvafhlbyl\",\"ipv4Address\":\"bevxrhyzd\",\"subnetMask\":\"rsofpltdbmairrh\"},{\"physicalNode\":\"fnrac\",\"ipv4Address\":\"pqigtuujwouhd\",\"subnetMask\":\"s\"},{\"physicalNode\":\"rb\",\"ipv4Address\":\"xsjybvitvqk\",\"subnetMask\":\"az\"},{\"physicalNode\":\"mtggmu\",\"ipv4Address\":\"ch\",\"subnetMask\":\"fnkf\"}]},{\"name\":\"lv\",\"networkAdapterName\":\"oakizvoai\",\"storageVlanId\":\"a\",\"storageAdapterIPInfo\":[{\"physicalNode\":\"wiguyxlyk\",\"ipv4Address\":\"hvxzcwxhmp\",\"subnetMask\":\"tl\"},{\"physicalNode\":\"xaonwivkcqh\",\"ipv4Address\":\"hxknlccrmmkyupi\",\"subnetMask\":\"byqjfkakfqfrkem\"},{\"physicalNode\":\"ldudxjascowv\",\"ipv4Address\":\"jkpdxphlkksnm\",\"subnetMask\":\"vyfijdkzuqnw\"},{\"physicalNode\":\"thuqolyahluq\",\"ipv4Address\":\"ulsutrjbhxy\",\"subnetMask\":\"hyqezvqq\"}]}],\"storageConnectivitySwitchless\":true,\"enableStorageAutoIp\":true}}") .toObject(HciNetworkProfile.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNicDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNicDetailTests.java index 3a5574691af0..8f243f12d24a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNicDetailTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciNicDetailTests.java @@ -11,7 +11,7 @@ public final class HciNicDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciNicDetail model = BinaryData.fromString( - "{\"adapterName\":\"zvaylptrsqqw\",\"interfaceDescription\":\"cmwqkchcxwa\",\"componentId\":\"ewzjkjexfd\",\"driverVersion\":\"vhpsylkkshkbffmb\",\"ip4Address\":\"zjrgyww\",\"subnetMask\":\"jx\",\"defaultGateway\":\"ptfujgicgaaoept\",\"dnsServers\":[\"utdewemxs\",\"vru\",\"nz\"],\"defaultIsolationId\":\"gehkfkimrtixokff\",\"macAddress\":\"inljqepqwhixmo\",\"slot\":\"tshi\",\"switchName\":\"gvelfc\",\"nicType\":\"uccbirdsvuw\",\"vlanId\":\"b\",\"nicStatus\":\"gstmninwjizciln\",\"rdmaCapability\":\"Disabled\"}") + "{\"adapterName\":\"bcvex\",\"interfaceDescription\":\"uquowtljvfwhr\",\"componentId\":\"gkhyxvrqtvbczsu\",\"driverVersion\":\"dgglmepjpfs\",\"ip4Address\":\"kgsangpszng\",\"subnetMask\":\"p\",\"defaultGateway\":\"lkvec\",\"dnsServers\":[\"cngoadyedmzrg\",\"foknubnoitp\",\"pz\"],\"defaultIsolationId\":\"gdgxvcoqraswug\",\"macAddress\":\"pqitwe\",\"slot\":\"l\",\"switchName\":\"skbuhzaca\",\"nicType\":\"yltcoqcuj\",\"vlanId\":\"sxzakuejkm\",\"nicStatus\":\"iztjof\",\"rdmaCapability\":\"Disabled\"}") .toObject(HciNicDetail.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciOsProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciOsProfileTests.java index 9b4f1a774f01..bce1f8c7e802 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciOsProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciOsProfileTests.java @@ -10,7 +10,8 @@ public final class HciOsProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - HciOsProfile model = BinaryData.fromString("{\"bootType\":\"fphwpnu\",\"assemblyVersion\":\"iywzejy\"}") - .toObject(HciOsProfile.class); + HciOsProfile model + = BinaryData.fromString("{\"bootType\":\"bhfckdvezcrcssb\",\"assemblyVersion\":\"ddubbnqfblhkal\"}") + .toObject(HciOsProfile.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciRemoteSupportJobPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciRemoteSupportJobPropertiesTests.java new file mode 100644 index 000000000000..177731275683 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciRemoteSupportJobPropertiesTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.HciRemoteSupportJobProperties; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportAccessLevel; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportType; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class HciRemoteSupportJobPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HciRemoteSupportJobProperties model = BinaryData.fromString( + "{\"jobType\":\"RemoteSupport\",\"accessLevel\":\"None\",\"expirationTimestamp\":\"2021-03-23T11:52:12Z\",\"type\":\"Revoke\",\"reportedProperties\":{\"percentComplete\":544551306,\"validationStatus\":{\"status\":\"kpbz\",\"steps\":[{\"name\":\"ljhah\",\"description\":\"echndbnwieholew\",\"fullStepIndex\":\"iuubwefqsf\",\"startTimeUtc\":\"aqtferr\",\"endTimeUtc\":\"ex\",\"status\":\"mfxapjwogqqno\",\"steps\":[{},{},{},{}],\"exception\":[\"dabtqwp\",\"yawbzasqbu\",\"ljgkyex\"]},{\"name\":\"guyaip\",\"description\":\"sdaultxij\",\"fullStepIndex\":\"mfqwa\",\"startTimeUtc\":\"nqnm\",\"endTimeUtc\":\"ngz\",\"status\":\"qxtbjwgnyf\",\"steps\":[{},{},{}],\"exception\":[\"vtuikzhajq\",\"lcfhmlrqryxy\"]},{\"name\":\"nzrdpsovwxz\",\"description\":\"tgoe\",\"fullStepIndex\":\"bbabp\",\"startTimeUtc\":\"vf\",\"endTimeUtc\":\"kvntjlrigjkskyri\",\"status\":\"vzidsxwaab\",\"steps\":[{},{}],\"exception\":[\"ygznmmaxrizk\",\"obgop\",\"lhslnelxieixyn\"]}]},\"deploymentStatus\":{\"status\":\"ecwcrojphslhcawj\",\"steps\":[{\"name\":\"dwfmvigorqjb\",\"description\":\"zhraglkafh\",\"fullStepIndex\":\"qjujeickpzvcp\",\"startTimeUtc\":\"mxelnwcltyjed\",\"endTimeUtc\":\"xm\",\"status\":\"mkqscaz\",\"steps\":[{},{},{}],\"exception\":[\"z\",\"puamwabzxr\",\"xcushs\",\"haivm\"]}]},\"nodeSettings\":{\"state\":\"sflvgsgzwywakoih\",\"createdAt\":\"2021-01-04T00:33:47Z\",\"updatedAt\":\"2021-02-04T00:10:52Z\",\"connectionStatus\":\"lmljhlnymzotq\",\"connectionErrorMessage\":\"yuzcbmqqvxmvw\"},\"sessionDetails\":[{\"sessionId\":\"yxonsupe\",\"sessionStartTime\":\"2021-09-05T01:45:37Z\",\"sessionEndTime\":\"2021-08-29T22:01:49Z\",\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"vsqltnzoibgsxg\"}]},\"deploymentMode\":\"Validate\",\"provisioningState\":\"Disconnected\",\"jobId\":\"nmpqoxwdofdb\",\"startTimeUtc\":\"2020-12-26T13:10:46Z\",\"endTimeUtc\":\"2021-09-08T01:58:43Z\",\"status\":\"DeploymentInProgress\"}") + .toObject(HciRemoteSupportJobProperties.class); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.deploymentMode()); + Assertions.assertEquals(RemoteSupportAccessLevel.NONE, model.accessLevel()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T11:52:12Z"), model.expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.REVOKE, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HciRemoteSupportJobProperties model + = new HciRemoteSupportJobProperties().withDeploymentMode(DeploymentMode.VALIDATE) + .withAccessLevel(RemoteSupportAccessLevel.NONE) + .withExpirationTimestamp(OffsetDateTime.parse("2021-03-23T11:52:12Z")) + .withType(RemoteSupportType.REVOKE); + model = BinaryData.fromObject(model).toObject(HciRemoteSupportJobProperties.class); + Assertions.assertEquals(DeploymentMode.VALIDATE, model.deploymentMode()); + Assertions.assertEquals(RemoteSupportAccessLevel.NONE, model.accessLevel()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T11:52:12Z"), model.expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.REVOKE, model.type()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciStorageProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciStorageProfileTests.java index 8ff221de0fc4..662ed2f4c2fd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciStorageProfileTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciStorageProfileTests.java @@ -11,7 +11,7 @@ public final class HciStorageProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciStorageProfile model = BinaryData.fromString( - "{\"poolableDisksCount\":1910453689912487458,\"disks\":[{\"id\":\"wrpqafgfugsnnf\",\"sizeInBytes\":\"et\",\"type\":\"ypococtfjgtixr\",\"model\":\"zuyt\",\"manufacturer\":\"mlmuowol\",\"isSupported\":false},{\"id\":\"iropionszon\",\"sizeInBytes\":\"ngajinnixjawrtmj\",\"type\":\"myccx\",\"model\":\"hcoxov\",\"manufacturer\":\"khenlus\",\"isSupported\":false},{\"id\":\"dtjxtxrdcqt\",\"sizeInBytes\":\"idttgepus\",\"type\":\"yjtcvuwk\",\"model\":\"iziesfuughtuq\",\"manufacturer\":\"cjxeygt\",\"isSupported\":false},{\"id\":\"uicbuewmrsw\",\"sizeInBytes\":\"lx\",\"type\":\"rhwpus\",\"model\":\"baqehgpdoh\",\"manufacturer\":\"qatucoigebxnc\",\"isSupported\":true}]}") + "{\"poolableDisksCount\":5513165918276447064,\"disks\":[{\"id\":\"nictteajo\",\"sizeInBytes\":\"ygspnbonhpczykm\",\"type\":\"p\",\"model\":\"xqcsehch\",\"manufacturer\":\"ufmpqumqyjgy\",\"isSupported\":true}]}") .toObject(HciStorageProfile.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciValidationFailureDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciValidationFailureDetailTests.java index f8d56eb965e4..1a8d89f85bbf 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciValidationFailureDetailTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HciValidationFailureDetailTests.java @@ -11,6 +11,6 @@ public final class HciValidationFailureDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HciValidationFailureDetail model - = BinaryData.fromString("{\"exception\":\"lvfhrbbp\"}").toObject(HciValidationFailureDetail.class); + = BinaryData.fromString("{\"exception\":\"dykalsygaolnjpnn\"}").toObject(HciValidationFailureDetail.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InfrastructureNetworkTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InfrastructureNetworkTests.java index 7fdaf1e6daf6..48388ca34adc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InfrastructureNetworkTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InfrastructureNetworkTests.java @@ -16,46 +16,40 @@ public final class InfrastructureNetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InfrastructureNetwork model = BinaryData.fromString( - "{\"subnetMask\":\"oxafn\",\"gateway\":\"lpichk\",\"ipPools\":[{\"startingAddress\":\"cdyhbpkkpwdreqn\",\"endingAddress\":\"vq\"},{\"startingAddress\":\"vljxywsu\",\"endingAddress\":\"yrs\"},{\"startingAddress\":\"sytgadgvraea\",\"endingAddress\":\"e\"},{\"startingAddress\":\"zar\",\"endingAddress\":\"lquuijfqkacewii\"}],\"dnsServerConfig\":\"UseDnsServer\",\"dnsZones\":[{\"dnsZoneName\":\"ibwwiftohqkv\",\"dnsForwarder\":[\"ksgplsa\",\"nynfsynljphuo\",\"xodlqiyntorzih\",\"eosjswsr\"]},{\"dnsZoneName\":\"lyzrpzbchckqqzqi\",\"dnsForwarder\":[\"ysuiizynkedya\",\"rwyhqmibzyhwitsm\"]},{\"dnsZoneName\":\"yynpcdpumnzgmwz\",\"dnsForwarder\":[\"biknsorgjhxbld\",\"lwwrl\"]}],\"dnsServers\":[\"tncvokot\"],\"useDhcp\":false}") + "{\"subnetMask\":\"kdltfzxmhhvhg\",\"gateway\":\"eodkwobda\",\"ipPools\":[{\"startingAddress\":\"bqdxbx\",\"endingAddress\":\"kbogqxndlkzgx\"},{\"startingAddress\":\"ripl\",\"endingAddress\":\"odxun\"},{\"startingAddress\":\"ebxmubyynt\",\"endingAddress\":\"rbqtkoie\"}],\"dnsServerConfig\":\"UseDnsServer\",\"dnsZones\":[{\"dnsZoneName\":\"q\",\"dnsForwarder\":[\"tmuwlauwzi\",\"xbmp\",\"cjefuzmu\",\"pbttdum\"]}],\"dnsServers\":[\"pxebmnzbt\"],\"useDhcp\":true}") .toObject(InfrastructureNetwork.class); - Assertions.assertEquals("oxafn", model.subnetMask()); - Assertions.assertEquals("lpichk", model.gateway()); - Assertions.assertEquals("cdyhbpkkpwdreqn", model.ipPools().get(0).startingAddress()); - Assertions.assertEquals("vq", model.ipPools().get(0).endingAddress()); + Assertions.assertEquals("kdltfzxmhhvhg", model.subnetMask()); + Assertions.assertEquals("eodkwobda", model.gateway()); + Assertions.assertEquals("bqdxbx", model.ipPools().get(0).startingAddress()); + Assertions.assertEquals("kbogqxndlkzgx", model.ipPools().get(0).endingAddress()); Assertions.assertEquals(DnsServerConfig.USE_DNS_SERVER, model.dnsServerConfig()); - Assertions.assertEquals("ibwwiftohqkv", model.dnsZones().get(0).dnsZoneName()); - Assertions.assertEquals("ksgplsa", model.dnsZones().get(0).dnsForwarder().get(0)); - Assertions.assertEquals("tncvokot", model.dnsServers().get(0)); - Assertions.assertFalse(model.useDhcp()); + Assertions.assertEquals("q", model.dnsZones().get(0).dnsZoneName()); + Assertions.assertEquals("tmuwlauwzi", model.dnsZones().get(0).dnsForwarder().get(0)); + Assertions.assertEquals("pxebmnzbt", model.dnsServers().get(0)); + Assertions.assertTrue(model.useDhcp()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InfrastructureNetwork model = new InfrastructureNetwork().withSubnetMask("oxafn") - .withGateway("lpichk") - .withIpPools(Arrays.asList(new IpPools().withStartingAddress("cdyhbpkkpwdreqn").withEndingAddress("vq"), - new IpPools().withStartingAddress("vljxywsu").withEndingAddress("yrs"), - new IpPools().withStartingAddress("sytgadgvraea").withEndingAddress("e"), - new IpPools().withStartingAddress("zar").withEndingAddress("lquuijfqkacewii"))) + InfrastructureNetwork model = new InfrastructureNetwork().withSubnetMask("kdltfzxmhhvhg") + .withGateway("eodkwobda") + .withIpPools(Arrays.asList(new IpPools().withStartingAddress("bqdxbx").withEndingAddress("kbogqxndlkzgx"), + new IpPools().withStartingAddress("ripl").withEndingAddress("odxun"), + new IpPools().withStartingAddress("ebxmubyynt").withEndingAddress("rbqtkoie"))) .withDnsServerConfig(DnsServerConfig.USE_DNS_SERVER) - .withDnsZones(Arrays.asList( - new DnsZones().withDnsZoneName("ibwwiftohqkv") - .withDnsForwarder(Arrays.asList("ksgplsa", "nynfsynljphuo", "xodlqiyntorzih", "eosjswsr")), - new DnsZones().withDnsZoneName("lyzrpzbchckqqzqi") - .withDnsForwarder(Arrays.asList("ysuiizynkedya", "rwyhqmibzyhwitsm")), - new DnsZones().withDnsZoneName("yynpcdpumnzgmwz") - .withDnsForwarder(Arrays.asList("biknsorgjhxbld", "lwwrl")))) - .withDnsServers(Arrays.asList("tncvokot")) - .withUseDhcp(false); + .withDnsZones(Arrays.asList(new DnsZones().withDnsZoneName("q") + .withDnsForwarder(Arrays.asList("tmuwlauwzi", "xbmp", "cjefuzmu", "pbttdum")))) + .withDnsServers(Arrays.asList("pxebmnzbt")) + .withUseDhcp(true); model = BinaryData.fromObject(model).toObject(InfrastructureNetwork.class); - Assertions.assertEquals("oxafn", model.subnetMask()); - Assertions.assertEquals("lpichk", model.gateway()); - Assertions.assertEquals("cdyhbpkkpwdreqn", model.ipPools().get(0).startingAddress()); - Assertions.assertEquals("vq", model.ipPools().get(0).endingAddress()); + Assertions.assertEquals("kdltfzxmhhvhg", model.subnetMask()); + Assertions.assertEquals("eodkwobda", model.gateway()); + Assertions.assertEquals("bqdxbx", model.ipPools().get(0).startingAddress()); + Assertions.assertEquals("kbogqxndlkzgx", model.ipPools().get(0).endingAddress()); Assertions.assertEquals(DnsServerConfig.USE_DNS_SERVER, model.dnsServerConfig()); - Assertions.assertEquals("ibwwiftohqkv", model.dnsZones().get(0).dnsZoneName()); - Assertions.assertEquals("ksgplsa", model.dnsZones().get(0).dnsForwarder().get(0)); - Assertions.assertEquals("tncvokot", model.dnsServers().get(0)); - Assertions.assertFalse(model.useDhcp()); + Assertions.assertEquals("q", model.dnsZones().get(0).dnsZoneName()); + Assertions.assertEquals("tmuwlauwzi", model.dnsZones().get(0).dnsForwarder().get(0)); + Assertions.assertEquals("pxebmnzbt", model.dnsServers().get(0)); + Assertions.assertTrue(model.useDhcp()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpAddressRangeTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpAddressRangeTests.java deleted file mode 100644 index 07ddd19d8e44..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpAddressRangeTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; -import org.junit.jupiter.api.Assertions; - -public final class IpAddressRangeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpAddressRange model - = BinaryData.fromString("{\"startIp\":\"zaj\",\"endIp\":\"nsjhwjuyxxb\"}").toObject(IpAddressRange.class); - Assertions.assertEquals("zaj", model.startIp()); - Assertions.assertEquals("nsjhwjuyxxb", model.endIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpAddressRange model = new IpAddressRange().withStartIp("zaj").withEndIp("nsjhwjuyxxb"); - model = BinaryData.fromObject(model).toObject(IpAddressRange.class); - Assertions.assertEquals("zaj", model.startIp()); - Assertions.assertEquals("nsjhwjuyxxb", model.endIp()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolsTests.java index d618e13e0576..bd20d122db5a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolsTests.java @@ -11,17 +11,17 @@ public final class IpPoolsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpPools model = BinaryData.fromString("{\"startingAddress\":\"yhgsy\",\"endingAddress\":\"ogjltdtbnnhad\"}") + IpPools model = BinaryData.fromString("{\"startingAddress\":\"glkfg\",\"endingAddress\":\"dneu\"}") .toObject(IpPools.class); - Assertions.assertEquals("yhgsy", model.startingAddress()); - Assertions.assertEquals("ogjltdtbnnhad", model.endingAddress()); + Assertions.assertEquals("glkfg", model.startingAddress()); + Assertions.assertEquals("dneu", model.endingAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPools model = new IpPools().withStartingAddress("yhgsy").withEndingAddress("ogjltdtbnnhad"); + IpPools model = new IpPools().withStartingAddress("glkfg").withEndingAddress("dneu"); model = BinaryData.fromObject(model).toObject(IpPools.class); - Assertions.assertEquals("yhgsy", model.startingAddress()); - Assertions.assertEquals("ogjltdtbnnhad", model.endingAddress()); + Assertions.assertEquals("glkfg", model.startingAddress()); + Assertions.assertEquals("dneu", model.endingAddress()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiAdapterIPConfigTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiAdapterIPConfigTests.java deleted file mode 100644 index 54668a4e3873..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiAdapterIPConfigTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterIPConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiTargetPortalAddress; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IscsiAdapterIPConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IscsiAdapterIPConfig model = BinaryData.fromString( - "{\"networkAdapterName\":\"ynbkdnnyufxuzms\",\"vlanId\":1756231775,\"addressPrefix\":\"rbrnxh\",\"targetPortalAddresses\":[{\"ipAddress\":\"fikjkxaravwwu\",\"nextHop\":\"nje\"},{\"ipAddress\":\"htrxbozp\",\"nextHop\":\"cnwjzbqblxr\"},{\"ipAddress\":\"vdsvoqizawwsds\",\"nextHop\":\"gfhjxsawoo\"},{\"ipAddress\":\"ffhx\",\"nextHop\":\"kmwzrdqyoy\"}]}") - .toObject(IscsiAdapterIPConfig.class); - Assertions.assertEquals("ynbkdnnyufxuzms", model.networkAdapterName()); - Assertions.assertEquals(1756231775, model.vlanId()); - Assertions.assertEquals("rbrnxh", model.addressPrefix()); - Assertions.assertEquals("fikjkxaravwwu", model.targetPortalAddresses().get(0).ipAddress()); - Assertions.assertEquals("nje", model.targetPortalAddresses().get(0).nextHop()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IscsiAdapterIPConfig model = new IscsiAdapterIPConfig().withNetworkAdapterName("ynbkdnnyufxuzms") - .withVlanId(1756231775) - .withAddressPrefix("rbrnxh") - .withTargetPortalAddresses( - Arrays.asList(new IscsiTargetPortalAddress().withIpAddress("fikjkxaravwwu").withNextHop("nje"), - new IscsiTargetPortalAddress().withIpAddress("htrxbozp").withNextHop("cnwjzbqblxr"), - new IscsiTargetPortalAddress().withIpAddress("vdsvoqizawwsds").withNextHop("gfhjxsawoo"), - new IscsiTargetPortalAddress().withIpAddress("ffhx").withNextHop("kmwzrdqyoy"))); - model = BinaryData.fromObject(model).toObject(IscsiAdapterIPConfig.class); - Assertions.assertEquals("ynbkdnnyufxuzms", model.networkAdapterName()); - Assertions.assertEquals(1756231775, model.vlanId()); - Assertions.assertEquals("rbrnxh", model.addressPrefix()); - Assertions.assertEquals("fikjkxaravwwu", model.targetPortalAddresses().get(0).ipAddress()); - Assertions.assertEquals("nje", model.targetPortalAddresses().get(0).nextHop()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiAdapterPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiAdapterPropertiesTests.java deleted file mode 100644 index 0ec19196ecca..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiAdapterPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterProperties; -import org.junit.jupiter.api.Assertions; - -public final class IscsiAdapterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IscsiAdapterProperties model = BinaryData.fromString( - "{\"priorityValue8021ActionIscsi\":230803509,\"bandwidthPercentageIscsi\":593185294,\"jumboPacket\":225410271}") - .toObject(IscsiAdapterProperties.class); - Assertions.assertEquals(230803509, model.priorityValue8021ActionIscsi()); - Assertions.assertEquals(593185294, model.bandwidthPercentageIscsi()); - Assertions.assertEquals(225410271, model.jumboPacket()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IscsiAdapterProperties model = new IscsiAdapterProperties().withPriorityValue8021ActionIscsi(230803509) - .withBandwidthPercentageIscsi(593185294) - .withJumboPacket(225410271); - model = BinaryData.fromObject(model).toObject(IscsiAdapterProperties.class); - Assertions.assertEquals(230803509, model.priorityValue8021ActionIscsi()); - Assertions.assertEquals(593185294, model.bandwidthPercentageIscsi()); - Assertions.assertEquals(225410271, model.jumboPacket()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiChapSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiChapSettingsTests.java deleted file mode 100644 index 865d6db89043..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiChapSettingsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IscsiChapSettings; -import com.azure.resourcemanager.azurestackhci.models.IscsiChapType; -import org.junit.jupiter.api.Assertions; - -public final class IscsiChapSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IscsiChapSettings model = BinaryData.fromString("{\"chapType\":\"NoChap\"}").toObject(IscsiChapSettings.class); - Assertions.assertEquals(IscsiChapType.NO_CHAP, model.chapType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IscsiChapSettings model = new IscsiChapSettings().withChapType(IscsiChapType.NO_CHAP); - model = BinaryData.fromObject(model).toObject(IscsiChapSettings.class); - Assertions.assertEquals(IscsiChapType.NO_CHAP, model.chapType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiConfigTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiConfigTests.java deleted file mode 100644 index 58f8193a6159..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiConfigTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterIPConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterProperties; -import com.azure.resourcemanager.azurestackhci.models.IscsiChapSettings; -import com.azure.resourcemanager.azurestackhci.models.IscsiChapType; -import com.azure.resourcemanager.azurestackhci.models.IscsiConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiNetworkConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiTargetPortalAddress; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IscsiConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IscsiConfig model = BinaryData.fromString( - "{\"iScsiNetworkConfig\":{\"adapterProperties\":{\"priorityValue8021ActionIscsi\":1601710879,\"bandwidthPercentageIscsi\":555211550,\"jumboPacket\":719857622},\"adapterIPConfig\":[{\"networkAdapterName\":\"kx\",\"vlanId\":308292000,\"addressPrefix\":\"fgxmbr\",\"targetPortalAddresses\":[{\"ipAddress\":\"ibio\",\"nextHop\":\"qsykq\"}]}]},\"chapSettings\":{\"chapType\":\"OneWay\"},\"initiatorIqn\":\"rtxtfdag\"}") - .toObject(IscsiConfig.class); - Assertions.assertEquals(1601710879, - model.iScsiNetworkConfig().adapterProperties().priorityValue8021ActionIscsi()); - Assertions.assertEquals(555211550, model.iScsiNetworkConfig().adapterProperties().bandwidthPercentageIscsi()); - Assertions.assertEquals(719857622, model.iScsiNetworkConfig().adapterProperties().jumboPacket()); - Assertions.assertEquals("kx", model.iScsiNetworkConfig().adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(308292000, model.iScsiNetworkConfig().adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("fgxmbr", model.iScsiNetworkConfig().adapterIPConfig().get(0).addressPrefix()); - Assertions.assertEquals("ibio", - model.iScsiNetworkConfig().adapterIPConfig().get(0).targetPortalAddresses().get(0).ipAddress()); - Assertions.assertEquals("qsykq", - model.iScsiNetworkConfig().adapterIPConfig().get(0).targetPortalAddresses().get(0).nextHop()); - Assertions.assertEquals(IscsiChapType.ONE_WAY, model.chapSettings().chapType()); - Assertions.assertEquals("rtxtfdag", model.initiatorIqn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IscsiConfig model - = new IscsiConfig() - .withIScsiNetworkConfig( - new IscsiNetworkConfig() - .withAdapterProperties(new IscsiAdapterProperties().withPriorityValue8021ActionIscsi(1601710879) - .withBandwidthPercentageIscsi(555211550) - .withJumboPacket(719857622)) - .withAdapterIPConfig(Arrays.asList(new IscsiAdapterIPConfig().withNetworkAdapterName("kx") - .withVlanId(308292000) - .withAddressPrefix("fgxmbr") - .withTargetPortalAddresses(Arrays - .asList(new IscsiTargetPortalAddress().withIpAddress("ibio").withNextHop("qsykq")))))) - .withChapSettings(new IscsiChapSettings().withChapType(IscsiChapType.ONE_WAY)) - .withInitiatorIqn("rtxtfdag"); - model = BinaryData.fromObject(model).toObject(IscsiConfig.class); - Assertions.assertEquals(1601710879, - model.iScsiNetworkConfig().adapterProperties().priorityValue8021ActionIscsi()); - Assertions.assertEquals(555211550, model.iScsiNetworkConfig().adapterProperties().bandwidthPercentageIscsi()); - Assertions.assertEquals(719857622, model.iScsiNetworkConfig().adapterProperties().jumboPacket()); - Assertions.assertEquals("kx", model.iScsiNetworkConfig().adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(308292000, model.iScsiNetworkConfig().adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("fgxmbr", model.iScsiNetworkConfig().adapterIPConfig().get(0).addressPrefix()); - Assertions.assertEquals("ibio", - model.iScsiNetworkConfig().adapterIPConfig().get(0).targetPortalAddresses().get(0).ipAddress()); - Assertions.assertEquals("qsykq", - model.iScsiNetworkConfig().adapterIPConfig().get(0).targetPortalAddresses().get(0).nextHop()); - Assertions.assertEquals(IscsiChapType.ONE_WAY, model.chapSettings().chapType()); - Assertions.assertEquals("rtxtfdag", model.initiatorIqn()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiNetworkConfigTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiNetworkConfigTests.java deleted file mode 100644 index bac969097f8b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiNetworkConfigTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterIPConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiAdapterProperties; -import com.azure.resourcemanager.azurestackhci.models.IscsiNetworkConfig; -import com.azure.resourcemanager.azurestackhci.models.IscsiTargetPortalAddress; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IscsiNetworkConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IscsiNetworkConfig model = BinaryData.fromString( - "{\"adapterProperties\":{\"priorityValue8021ActionIscsi\":435673974,\"bandwidthPercentageIscsi\":1355007892,\"jumboPacket\":252642598},\"adapterIPConfig\":[{\"networkAdapterName\":\"kounzsiy\",\"vlanId\":702778662,\"addressPrefix\":\"ymfpopikz\",\"targetPortalAddresses\":[{\"ipAddress\":\"nfywtkq\",\"nextHop\":\"sdlkhcz\"},{\"ipAddress\":\"pmgfjculojhhylx\",\"nextHop\":\"vfiyymot\"}]},{\"networkAdapterName\":\"bybwjmtftcvelnir\",\"vlanId\":1944485459,\"addressPrefix\":\"nstp\",\"targetPortalAddresses\":[{\"ipAddress\":\"bj\",\"nextHop\":\"vswmehfxrtt\"},{\"ipAddress\":\"msennqfabqcama\",\"nextHop\":\"ctcxs\"}]}]}") - .toObject(IscsiNetworkConfig.class); - Assertions.assertEquals(435673974, model.adapterProperties().priorityValue8021ActionIscsi()); - Assertions.assertEquals(1355007892, model.adapterProperties().bandwidthPercentageIscsi()); - Assertions.assertEquals(252642598, model.adapterProperties().jumboPacket()); - Assertions.assertEquals("kounzsiy", model.adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(702778662, model.adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("ymfpopikz", model.adapterIPConfig().get(0).addressPrefix()); - Assertions.assertEquals("nfywtkq", model.adapterIPConfig().get(0).targetPortalAddresses().get(0).ipAddress()); - Assertions.assertEquals("sdlkhcz", model.adapterIPConfig().get(0).targetPortalAddresses().get(0).nextHop()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IscsiNetworkConfig model - = new IscsiNetworkConfig() - .withAdapterProperties(new IscsiAdapterProperties().withPriorityValue8021ActionIscsi(435673974) - .withBandwidthPercentageIscsi(1355007892) - .withJumboPacket(252642598)) - .withAdapterIPConfig( - Arrays.asList( - new IscsiAdapterIPConfig().withNetworkAdapterName("kounzsiy") - .withVlanId(702778662) - .withAddressPrefix("ymfpopikz") - .withTargetPortalAddresses(Arrays - .asList(new IscsiTargetPortalAddress().withIpAddress("nfywtkq").withNextHop("sdlkhcz"), - new IscsiTargetPortalAddress().withIpAddress("pmgfjculojhhylx") - .withNextHop("vfiyymot"))), - new IscsiAdapterIPConfig().withNetworkAdapterName("bybwjmtftcvelnir") - .withVlanId(1944485459) - .withAddressPrefix("nstp") - .withTargetPortalAddresses(Arrays.asList( - new IscsiTargetPortalAddress().withIpAddress("bj").withNextHop("vswmehfxrtt"), - new IscsiTargetPortalAddress().withIpAddress("msennqfabqcama").withNextHop("ctcxs"))))); - model = BinaryData.fromObject(model).toObject(IscsiNetworkConfig.class); - Assertions.assertEquals(435673974, model.adapterProperties().priorityValue8021ActionIscsi()); - Assertions.assertEquals(1355007892, model.adapterProperties().bandwidthPercentageIscsi()); - Assertions.assertEquals(252642598, model.adapterProperties().jumboPacket()); - Assertions.assertEquals("kounzsiy", model.adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(702778662, model.adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("ymfpopikz", model.adapterIPConfig().get(0).addressPrefix()); - Assertions.assertEquals("nfywtkq", model.adapterIPConfig().get(0).targetPortalAddresses().get(0).ipAddress()); - Assertions.assertEquals("sdlkhcz", model.adapterIPConfig().get(0).targetPortalAddresses().get(0).nextHop()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiTargetPortalAddressTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiTargetPortalAddressTests.java deleted file mode 100644 index 60f95e082066..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IscsiTargetPortalAddressTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IscsiTargetPortalAddress; -import org.junit.jupiter.api.Assertions; - -public final class IscsiTargetPortalAddressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IscsiTargetPortalAddress model = BinaryData.fromString("{\"ipAddress\":\"rn\",\"nextHop\":\"ocjnzdaiovrbhr\"}") - .toObject(IscsiTargetPortalAddress.class); - Assertions.assertEquals("rn", model.ipAddress()); - Assertions.assertEquals("ocjnzdaiovrbhr", model.nextHop()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IscsiTargetPortalAddress model - = new IscsiTargetPortalAddress().withIpAddress("rn").withNextHop("ocjnzdaiovrbhr"); - model = BinaryData.fromObject(model).toObject(IscsiTargetPortalAddress.class); - Assertions.assertEquals("rn", model.ipAddress()); - Assertions.assertEquals("ocjnzdaiovrbhr", model.nextHop()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IsolatedVmAttestationConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IsolatedVmAttestationConfigurationTests.java index b43a5dd65bf5..164b4f008164 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IsolatedVmAttestationConfigurationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IsolatedVmAttestationConfigurationTests.java @@ -11,7 +11,7 @@ public final class IsolatedVmAttestationConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IsolatedVmAttestationConfiguration model = BinaryData.fromString( - "{\"attestationResourceId\":\"oekqvk\",\"relyingPartyServiceEndpoint\":\"nsmvbxwyj\",\"attestationServiceEndpoint\":\"lh\"}") + "{\"attestationResourceId\":\"lmoyrx\",\"relyingPartyServiceEndpoint\":\"fudwpznt\",\"attestationServiceEndpoint\":\"dzhlrq\"}") .toObject(IsolatedVmAttestationConfiguration.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LifecycleStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LifecycleStatusTests.java deleted file mode 100644 index c8b30799bd15..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LifecycleStatusTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.LifecycleStatus; - -public final class LifecycleStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LifecycleStatus model = BinaryData.fromString( - "{\"status\":\"AwaitingConnection\",\"stage\":\"glcjkayspthzod\",\"lastUpdatedUtc\":\"2021-09-15T01:29:54Z\",\"message\":\"lmjtg\",\"recommendedSteps\":[\"oskkfmk\",\"fdjxyxg\",\"kkqvjcteoedl\",\"slskkz\"]}") - .toObject(LifecycleStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LocalAvailabilityZonesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LocalAvailabilityZonesTests.java index 4cc0de3b2281..c6a16a10aeda 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LocalAvailabilityZonesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LocalAvailabilityZonesTests.java @@ -12,20 +12,19 @@ public final class LocalAvailabilityZonesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LocalAvailabilityZones model = BinaryData - .fromString( - "{\"localAvailabilityZoneName\":\"lwptfdy\",\"nodes\":[\"qbuaceopzfqr\",\"huaoppp\",\"qeqxo\"]}") - .toObject(LocalAvailabilityZones.class); - Assertions.assertEquals("lwptfdy", model.localAvailabilityZoneName()); - Assertions.assertEquals("qbuaceopzfqr", model.nodes().get(0)); + LocalAvailabilityZones model + = BinaryData.fromString("{\"localAvailabilityZoneName\":\"fadmws\",\"nodes\":[\"gvxp\"]}") + .toObject(LocalAvailabilityZones.class); + Assertions.assertEquals("fadmws", model.localAvailabilityZoneName()); + Assertions.assertEquals("gvxp", model.nodes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LocalAvailabilityZones model = new LocalAvailabilityZones().withLocalAvailabilityZoneName("lwptfdy") - .withNodes(Arrays.asList("qbuaceopzfqr", "huaoppp", "qeqxo")); + LocalAvailabilityZones model + = new LocalAvailabilityZones().withLocalAvailabilityZoneName("fadmws").withNodes(Arrays.asList("gvxp")); model = BinaryData.fromObject(model).toObject(LocalAvailabilityZones.class); - Assertions.assertEquals("lwptfdy", model.localAvailabilityZoneName()); - Assertions.assertEquals("qbuaceopzfqr", model.nodes().get(0)); + Assertions.assertEquals("fadmws", model.localAvailabilityZoneName()); + Assertions.assertEquals("gvxp", model.nodes().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionJobSessionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionJobSessionTests.java index 9fcc96feff76..a66e57f7cbb7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionJobSessionTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionJobSessionTests.java @@ -11,7 +11,7 @@ public final class LogCollectionJobSessionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogCollectionJobSession model = BinaryData.fromString( - "{\"startTime\":\"i\",\"endTime\":\"nhn\",\"timeCollected\":\"xifqjzgxm\",\"logSize\":983459975,\"status\":\"Failed\",\"correlationId\":\"pcesutrg\"}") + "{\"startTime\":\"atutmzlbiojlvfhr\",\"endTime\":\"pn\",\"timeCollected\":\"vcwwyyurmochppr\",\"logSize\":474630322,\"status\":\"NotStarted\",\"correlationId\":\"k\"}") .toObject(LogCollectionJobSession.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionReportedPropertiesTests.java new file mode 100644 index 000000000000..aa20f3e8cd3a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionReportedPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.LogCollectionReportedProperties; + +public final class LogCollectionReportedPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogCollectionReportedProperties model = BinaryData.fromString( + "{\"percentComplete\":243452563,\"validationStatus\":{\"status\":\"zdjtxvzflbqv\",\"steps\":[{\"name\":\"lgafcqusrdve\",\"description\":\"wsdtutnwl\",\"fullStepIndex\":\"ycvuzhyrmewipmv\",\"startTimeUtc\":\"dxukuqgsjjxundxg\",\"endTimeUtc\":\"twzhhzjhfjmhv\",\"status\":\"uvgp\",\"steps\":[{\"name\":\"qsxvmhf\",\"description\":\"zjyi\",\"fullStepIndex\":\"as\",\"startTimeUtc\":\"udypohyuems\",\"endTimeUtc\":\"nsqyrpfoobrltt\",\"status\":\"sjnygqdnfwqzdzgt\",\"steps\":[{},{}],\"exception\":[\"nfhqlyvijouwivk\",\"oyzunbixxr\",\"ikvcpwp\",\"clrcivtsox\"]},{\"name\":\"kenx\",\"description\":\"yyefrpmpdnqqs\",\"fullStepIndex\":\"waoqvmmb\",\"startTimeUtc\":\"qfr\",\"endTimeUtc\":\"lkzmegnitgvkxl\",\"status\":\"qdrfegcealzxwhc\",\"steps\":[{},{}],\"exception\":[\"oyqhlwig\"]}],\"exception\":[\"bkbxgomfa\",\"uwasqvd\",\"e\"]},{\"name\":\"guxak\",\"description\":\"qzhzbezkgimsi\",\"fullStepIndex\":\"asi\",\"startTimeUtc\":\"dyvvjskgfmocwahp\",\"endTimeUtc\":\"atjeaahh\",\"status\":\"hhnakzybbj\",\"steps\":[{\"name\":\"ksyxkyxvxevblbje\",\"description\":\"ljlageuaulxu\",\"fullStepIndex\":\"mjbnk\",\"startTimeUtc\":\"xynenl\",\"endTimeUtc\":\"xeizzg\",\"status\":\"lnsrmffe\",\"steps\":[{},{},{},{}],\"exception\":[\"tpiymerteea\"]}],\"exception\":[\"qiekkkzddrt\",\"g\",\"ojbmxv\",\"vrefdeesv\"]},{\"name\":\"uij\",\"description\":\"txsu\",\"fullStepIndex\":\"rtujwsawddjibab\",\"startTimeUtc\":\"ititvtzeexavoxt\",\"endTimeUtc\":\"lecdmdqbw\",\"status\":\"pqtgsfjac\",\"steps\":[{\"name\":\"hxudbxvodht\",\"description\":\"irudh\",\"fullStepIndex\":\"mes\",\"startTimeUtc\":\"dlpagzrcxfail\",\"endTimeUtc\":\"xwmdboxd\",\"status\":\"sftufqobrjlna\",\"steps\":[{}],\"exception\":[\"knh\",\"kizvytn\",\"zvulj\",\"aaeranokqgukk\"]},{\"name\":\"nvbroylaxx\",\"description\":\"cdisd\",\"fullStepIndex\":\"fj\",\"startTimeUtc\":\"svgjrwhryvy\",\"endTimeUtc\":\"t\",\"status\":\"lxgccknfnwmbtm\",\"steps\":[{},{},{}],\"exception\":[\"dhttzaefedxihchr\",\"hk\",\"crjdqnsdfzpbgtg\",\"ylkdghrje\"]},{\"name\":\"tl\",\"description\":\"ez\",\"fullStepIndex\":\"hokvbwnh\",\"startTimeUtc\":\"qlgehg\",\"endTimeUtc\":\"ipifhpfeoajvg\",\"status\":\"txjcsheafidlt\",\"steps\":[{}],\"exception\":[\"smkss\",\"h\",\"iftxfkf\",\"egprhptil\"]},{\"name\":\"cbiqtgdqoh\",\"description\":\"wsldrizetpwbr\",\"fullStepIndex\":\"llibphbqzmizak\",\"startTimeUtc\":\"ankjpdnjzh\",\"endTimeUtc\":\"oylhjlmuoyxprimr\",\"status\":\"pteecjme\",\"steps\":[{}],\"exception\":[\"vasylwxdzau\",\"weoohguufuzboyj\"]}],\"exception\":[\"wtzolbaemwmdxmeb\",\"jscjpahl\"]},{\"name\":\"eabfqxnm\",\"description\":\"qtibxyijddtv\",\"fullStepIndex\":\"ttadijae\",\"startTimeUtc\":\"mrsieekp\",\"endTimeUtc\":\"zaapmudqmeqwi\",\"status\":\"ibudqwy\",\"steps\":[{\"name\":\"ybpmzznrtffyaq\",\"description\":\"mhh\",\"fullStepIndex\":\"oqaqhvseufuq\",\"startTimeUtc\":\"xpdlcgqlsis\",\"endTimeUtc\":\"qfrddgam\",\"status\":\"hiosrsjuiv\",\"steps\":[{},{},{}],\"exception\":[\"yirnxzhcz\",\"xrxzbujrtr\"]},{\"name\":\"vwrevkhgnlnzon\",\"description\":\"rpiqywncv\",\"fullStepIndex\":\"szcofizeht\",\"startTimeUtc\":\"gbjkvreljeamur\",\"endTimeUtc\":\"mlovuanashcxl\",\"status\":\"jerbdkelvidizozs\",\"steps\":[{},{}],\"exception\":[\"jmonfdgn\",\"n\"]},{\"name\":\"puuw\",\"description\":\"tvuqjctzenkeifzz\",\"fullStepIndex\":\"kdasvflyhbxcudch\",\"startTimeUtc\":\"srboldforobw\",\"endTimeUtc\":\"vizbfhfo\",\"status\":\"acqpbtuodxesza\",\"steps\":[{},{}],\"exception\":[\"wumuaslzk\",\"rrwoycqucwyhahn\",\"mdr\",\"ywuhpsvfuur\"]},{\"name\":\"lwexxwl\",\"description\":\"niexzsrzpgepq\",\"fullStepIndex\":\"bb\",\"startTimeUtc\":\"pgdakchzyvli\",\"endTimeUtc\":\"nrkcxkj\",\"status\":\"nxm\",\"steps\":[{},{},{}],\"exception\":[\"wq\",\"ntvlwijpsttexo\",\"qpwcyyufmh\"]}],\"exception\":[\"cuwmqsp\"]}]},\"deploymentStatus\":{\"status\":\"qzhlctddunq\",\"steps\":[{\"name\":\"pchrqbn\",\"description\":\"rcgegydcwboxjum\",\"fullStepIndex\":\"qoli\",\"startTimeUtc\":\"raiouaubrjtl\",\"endTimeUtc\":\"xfuojrn\",\"status\":\"flrzpas\",\"steps\":[{\"name\":\"uimzdlyjd\",\"description\":\"wmkyoqufdvruzsl\",\"fullStepIndex\":\"j\",\"startTimeUtc\":\"ctfnmdxotng\",\"endTimeUtc\":\"gugey\",\"status\":\"hgrky\",\"steps\":[{}],\"exception\":[\"snmfpphojeevy\",\"yhsgz\"]},{\"name\":\"zbgomfgbeg\",\"description\":\"gleohi\",\"fullStepIndex\":\"tnluankrr\",\"startTimeUtc\":\"eeebtijvacv\",\"endTimeUtc\":\"qzbqqxlajrnwxa\",\"status\":\"veh\",\"steps\":[{},{}],\"exception\":[\"oafgaoql\",\"faey\",\"inmfgvxirp\",\"hriypoqeyhlqhy\"]},{\"name\":\"rlpyznuciqdsmexi\",\"description\":\"dfuxtya\",\"fullStepIndex\":\"ibmi\",\"startTimeUtc\":\"nnust\",\"endTimeUtc\":\"ljhnmgixhcmav\",\"status\":\"foudor\",\"steps\":[{},{},{}],\"exception\":[\"prot\",\"ypundmbxhugc\"]},{\"name\":\"k\",\"description\":\"lgorb\",\"fullStepIndex\":\"tp\",\"startTimeUtc\":\"tzfjltf\",\"endTimeUtc\":\"zcyjtot\",\"status\":\"opv\",\"steps\":[{},{},{}],\"exception\":[\"qgqqihedsvqwthmk\"]}],\"exception\":[\"cysihs\",\"qcwdhoh\"]}]},\"logCollectionSessionDetails\":[{\"startTime\":\"cdzsu\",\"endTime\":\"ohdxbzlmcmu\",\"timeCollected\":\"cvhd\",\"logSize\":60129740,\"status\":\"Failed\",\"correlationId\":\"xeyskonqzinkfkbg\"},{\"startTime\":\"bowxe\",\"endTime\":\"clj\",\"timeCollected\":\"gvkzqkjjeokbze\",\"logSize\":50022372,\"status\":\"Canceled\",\"correlationId\":\"czurtlei\"},{\"startTime\":\"xbkwv\",\"endTime\":\"nzvdfbzdixzmq\",\"timeCollected\":\"odawopqhewjptmcg\",\"logSize\":888576031,\"status\":\"Succeeded\",\"correlationId\":\"eln\"}]}") + .toObject(LogCollectionReportedProperties.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestPropertiesTests.java index 9c6af41f65e4..fa85a20e06ce 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestPropertiesTests.java @@ -13,19 +13,19 @@ public final class LogCollectionRequestPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogCollectionRequestProperties model - = BinaryData.fromString("{\"fromDate\":\"2021-01-25T18:04:58Z\",\"toDate\":\"2021-11-13T04:56:11Z\"}") + = BinaryData.fromString("{\"fromDate\":\"2021-03-07T17:24:46Z\",\"toDate\":\"2021-08-12T15:23:33Z\"}") .toObject(LogCollectionRequestProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-25T18:04:58Z"), model.fromDate()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-13T04:56:11Z"), model.toDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-07T17:24:46Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T15:23:33Z"), model.toDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LogCollectionRequestProperties model - = new LogCollectionRequestProperties().withFromDate(OffsetDateTime.parse("2021-01-25T18:04:58Z")) - .withToDate(OffsetDateTime.parse("2021-11-13T04:56:11Z")); + = new LogCollectionRequestProperties().withFromDate(OffsetDateTime.parse("2021-03-07T17:24:46Z")) + .withToDate(OffsetDateTime.parse("2021-08-12T15:23:33Z")); model = BinaryData.fromObject(model).toObject(LogCollectionRequestProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-25T18:04:58Z"), model.fromDate()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-13T04:56:11Z"), model.toDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-07T17:24:46Z"), model.fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T15:23:33Z"), model.toDate()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestTests.java index 9167213c3def..846b0e4253a4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogCollectionRequestTests.java @@ -14,19 +14,19 @@ public final class LogCollectionRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogCollectionRequest model = BinaryData - .fromString("{\"properties\":{\"fromDate\":\"2021-01-01T23:39:14Z\",\"toDate\":\"2021-07-17T14:14:51Z\"}}") + .fromString("{\"properties\":{\"fromDate\":\"2021-07-10T06:08:41Z\",\"toDate\":\"2021-03-04T21:23:46Z\"}}") .toObject(LogCollectionRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T23:39:14Z"), model.properties().fromDate()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-17T14:14:51Z"), model.properties().toDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T06:08:41Z"), model.properties().fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T21:23:46Z"), model.properties().toDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LogCollectionRequest model = new LogCollectionRequest().withProperties( - new LogCollectionRequestProperties().withFromDate(OffsetDateTime.parse("2021-01-01T23:39:14Z")) - .withToDate(OffsetDateTime.parse("2021-07-17T14:14:51Z"))); + new LogCollectionRequestProperties().withFromDate(OffsetDateTime.parse("2021-07-10T06:08:41Z")) + .withToDate(OffsetDateTime.parse("2021-03-04T21:23:46Z"))); model = BinaryData.fromObject(model).toObject(LogCollectionRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T23:39:14Z"), model.properties().fromDate()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-17T14:14:51Z"), model.properties().toDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T06:08:41Z"), model.properties().fromDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T21:23:46Z"), model.properties().toDate()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ManagedServiceIdentityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ManagedServiceIdentityTests.java index 879ff72bde6b..e98cc7bd3fcc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ManagedServiceIdentityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ManagedServiceIdentityTests.java @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"dahzxctobg\",\"tenantId\":\"dmoizpostmg\",\"type\":\"None\",\"userAssignedIdentities\":{\"divkrt\":{\"principalId\":\"nrmfqjhhk\",\"clientId\":\"pvjymjhxxjyng\"},\"uvjfdxxive\":{\"principalId\":\"bxqz\",\"clientId\":\"zjf\"},\"wvxysl\":{\"principalId\":\"t\",\"clientId\":\"aqtdoqmcbx\"}}}") + "{\"principalId\":\"omzlfmi\",\"tenantId\":\"wbnb\",\"type\":\"None\",\"userAssignedIdentities\":{\"uhashsfwx\":{\"principalId\":\"wkz\",\"clientId\":\"liourqhak\"},\"ovbvmeueciv\":{\"principalId\":\"owzxcu\",\"clientId\":\"cjooxdjebwpucwwf\"},\"it\":{\"principalId\":\"zceuojgjrw\",\"clientId\":\"eiotwmcdytdx\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); } @@ -24,8 +24,8 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("divkrt", new UserAssignedIdentity(), "uvjfdxxive", - new UserAssignedIdentity(), "wvxysl", new UserAssignedIdentity())); + .withUserAssignedIdentities(mapOf("uhashsfwx", new UserAssignedIdentity(), "ovbvmeueciv", + new UserAssignedIdentity(), "it", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterActionStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterActionStatusTests.java deleted file mode 100644 index 907157cbd189..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterActionStatusTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapterActionStatus; - -public final class NetworkAdapterActionStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkAdapterActionStatus model = BinaryData.fromString( - "{\"status\":\"lhvtozyagj\",\"steps\":[{\"name\":\"bylhy\",\"description\":\"gffklvqzr\",\"fullStepIndex\":\"rdgscnvqeonsgn\",\"startTimeUtc\":\"lwmezyohxpthceop\",\"endTimeUtc\":\"vtwfvesobpbokhm\",\"status\":\"cdyarnggcjfwblqh\",\"steps\":[{\"name\":\"mcolmu\",\"description\":\"yvaosdkluwz\",\"fullStepIndex\":\"ygz\",\"startTimeUtc\":\"yevjhubnobguq\",\"endTimeUtc\":\"qsq\",\"status\":\"dmioyjpnmlvi\",\"steps\":[{},{},{}],\"exception\":[\"pmcvqdvrd\"]},{\"name\":\"xyr\",\"description\":\"hgvqojbxaotcgbz\",\"fullStepIndex\":\"btplefoi\",\"startTimeUtc\":\"idoxznvgvdtmuuv\",\"endTimeUtc\":\"wsxmrszb\",\"status\":\"imxlpnerxrzuty\",\"steps\":[{},{}],\"exception\":[\"aqmnbxqaehtd\"]},{\"name\":\"mbnvynfaooeacted\",\"description\":\"lsk\",\"fullStepIndex\":\"ddida\",\"startTimeUtc\":\"llrqmtlpbyxro\",\"endTimeUtc\":\"uyqyp\",\"status\":\"mnoiicsudy\",\"steps\":[{},{},{},{}],\"exception\":[\"talxrdsj\",\"h\",\"luqwgusxxhd\"]},{\"name\":\"pjwyblvtbdmvs\",\"description\":\"idaelqpvekmkwjfb\",\"fullStepIndex\":\"loggdusxursu\",\"startTimeUtc\":\"uxcjkcoqwczsyiq\",\"endTimeUtc\":\"z\",\"status\":\"ihvaang\",\"steps\":[{},{},{}],\"exception\":[\"rfdmfdvbbaexx\"]}],\"exception\":[\"tgdf\",\"kauigvm\",\"a\"]},{\"name\":\"czfedyuep\",\"description\":\"pl\",\"fullStepIndex\":\"dajjvywe\",\"startTimeUtc\":\"fkumcfjxoky\",\"endTimeUtc\":\"syasvfnkwmygjjek\",\"status\":\"nfdrugjqyck\",\"steps\":[{\"name\":\"rdtulcrcjdklotcs\",\"description\":\"mzoonsvobchkxfpw\",\"fullStepIndex\":\"yslb\",\"startTimeUtc\":\"glmnnk\",\"endTimeUtc\":\"ayqshwyqxridttbs\",\"status\":\"jmkgxqwqueuuylzt\",\"steps\":[{},{},{},{}],\"exception\":[\"evjykofvezefkhkq\",\"wqlepjj\",\"kca\"]},{\"name\":\"wz\",\"description\":\"togffjwajnrtwz\",\"fullStepIndex\":\"qkifmxawostfz\",\"startTimeUtc\":\"hrkmjqncfv\",\"endTimeUtc\":\"cnhemvwfnq\",\"status\":\"ypvndrw\",\"steps\":[{}],\"exception\":[\"ggrssgwjfkain\",\"muymvec\"]}],\"exception\":[\"scbgmu\",\"aictdscnkzzohn\",\"ddclzeqozr\"]},{\"name\":\"lbz\",\"description\":\"xbnjrqvzyuexoz\",\"fullStepIndex\":\"ynp\",\"startTimeUtc\":\"eudpab\",\"endTimeUtc\":\"euwzosgyjxvc\",\"status\":\"sormrex\",\"steps\":[{\"name\":\"b\",\"description\":\"gzygbaduveco\",\"fullStepIndex\":\"dqhzrtdba\",\"startTimeUtc\":\"limzfvppk\",\"endTimeUtc\":\"sif\",\"status\":\"clngy\",\"steps\":[{},{},{}],\"exception\":[\"ombcdtajdopggo\",\"wj\",\"qtrotpvclp\"]},{\"name\":\"yrlmwkptsk\",\"description\":\"jgvhxcc\",\"fullStepIndex\":\"kakmkookbputmgvm\",\"startTimeUtc\":\"akmlwktfowzkroyr\",\"endTimeUtc\":\"r\",\"status\":\"lzqjimejtgzjxx\",\"steps\":[{}],\"exception\":[\"zuqloiwyayyzivr\",\"itcdqlhchwhrk\",\"jlei\",\"ibfiplhxfnsm\"]}],\"exception\":[\"owly\"]},{\"name\":\"zmudsqcm\",\"description\":\"x\",\"fullStepIndex\":\"buwodmachbkv\",\"startTimeUtc\":\"pbjrmvgoqplehm\",\"endTimeUtc\":\"kzdllczdprwnhkgq\",\"status\":\"oxsstc\",\"steps\":[{\"name\":\"kfrrynj\",\"description\":\"mhlym\",\"fullStepIndex\":\"ukxrke\",\"startTimeUtc\":\"pequlrlzaudgjtf\",\"endTimeUtc\":\"lakkucddwnhcz\",\"status\":\"toucgj\",\"steps\":[{},{},{}],\"exception\":[\"ayhic\"]}],\"exception\":[\"wvgwkslvli\"]}]}") - .toObject(NetworkAdapterActionStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterDeploymentStepTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterDeploymentStepTests.java deleted file mode 100644 index c3661a0f80a7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterDeploymentStepTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapterDeploymentStep; - -public final class NetworkAdapterDeploymentStepTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkAdapterDeploymentStep model = BinaryData.fromString( - "{\"name\":\"dvbiabvnsrg\",\"description\":\"zyqxadyfhbmwkh\",\"fullStepIndex\":\"qttbspvkhgla\",\"startTimeUtc\":\"sgyzstujrzxr\",\"endTimeUtc\":\"sf\",\"status\":\"lduyehiiittugyuq\",\"steps\":[{\"name\":\"axu\",\"description\":\"qa\",\"fullStepIndex\":\"sozjvxdzciggbnv\",\"startTimeUtc\":\"o\",\"endTimeUtc\":\"alzyxwhoeamo\",\"status\":\"bdoeysf\",\"steps\":[{\"name\":\"twuuhauegnk\",\"description\":\"nfeubt\",\"fullStepIndex\":\"yrkwfugiph\",\"startTimeUtc\":\"kuumnqdurhzzfo\",\"endTimeUtc\":\"eoq\",\"status\":\"vwlujopwnib\",\"steps\":[{},{}],\"exception\":[\"tjdqumqvfm\"]},{\"name\":\"ad\",\"description\":\"gctxegtvgwyur\",\"fullStepIndex\":\"lfnzzryizwbxg\",\"startTimeUtc\":\"bxlayunomirhpf\",\"endTimeUtc\":\"enqlamwmgewayx\",\"status\":\"nbcpjstbhemhcucs\",\"steps\":[{},{}],\"exception\":[\"bxufeapd\",\"bzyvbsua\",\"ulpodkaxpf\"]},{\"name\":\"kzhmhj\",\"description\":\"lt\",\"fullStepIndex\":\"luqrojadhfztlray\",\"startTimeUtc\":\"kg\",\"endTimeUtc\":\"yh\",\"status\":\"bkuwpzqxlc\",\"steps\":[{}],\"exception\":[\"ecjvxf\",\"qufqizj\"]}],\"exception\":[\"wo\",\"a\",\"eyyjmjj\"]}],\"exception\":[\"xpxhnzlslekc\",\"tgzkjtyqpd\"]}") - .toObject(NetworkAdapterDeploymentStep.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterJobReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterJobReportedPropertiesTests.java deleted file mode 100644 index 7d7fd955ba88..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterJobReportedPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapterJobReportedProperties; - -public final class NetworkAdapterJobReportedPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkAdapterJobReportedProperties model = BinaryData.fromString( - "{\"percentComplete\":2036050921,\"validationStatus\":{\"status\":\"jeuxsphlo\",\"steps\":[{\"name\":\"ijpdvzvfbhwbdquf\",\"description\":\"gnrglaqrwyamb\",\"fullStepIndex\":\"afebzxfkjq\",\"startTimeUtc\":\"ibhlenntrv\",\"endTimeUtc\":\"psabdu\",\"status\":\"zmlghny\",\"steps\":[{\"name\":\"yeuuk\",\"description\":\"dixqbo\",\"fullStepIndex\":\"vhh\",\"startTimeUtc\":\"qe\",\"endTimeUtc\":\"txgrzn\",\"status\":\"inmtsdixchwkibm\",\"steps\":[{},{}],\"exception\":[\"cjc\",\"gair\"]},{\"name\":\"qzoof\",\"description\":\"qjsvep\",\"fullStepIndex\":\"htleberpyljek\",\"startTimeUtc\":\"qnwjjq\",\"endTimeUtc\":\"wkdnjrxgkrhwiehy\",\"status\":\"nowawonoehrguqlh\",\"steps\":[{},{}],\"exception\":[\"jzmpy\"]}],\"exception\":[\"yfazbkocb\",\"gvthrmxkbcjww\",\"xomraw\"]},{\"name\":\"keboo\",\"description\":\"l\",\"fullStepIndex\":\"cagaedaoiqc\",\"startTimeUtc\":\"gdtwgabd\",\"endTimeUtc\":\"kuz\",\"status\":\"jecooyvhtu\",\"steps\":[{\"name\":\"lniibncg\",\"description\":\"dvcdq\",\"fullStepIndex\":\"tzbpyfao\",\"startTimeUtc\":\"f\",\"endTimeUtc\":\"tncwmhjobzrfpr\",\"status\":\"dc\",\"steps\":[{},{},{}],\"exception\":[\"cvbzwgwhgkgsoa\",\"oorssatfy\",\"ipufdmxuqbdq\"]},{\"name\":\"sttuxv\",\"description\":\"q\",\"fullStepIndex\":\"opbtsixhgv\",\"startTimeUtc\":\"xmndztgsqjayqmar\",\"endTimeUtc\":\"eibpgbrhbjdqkn\",\"status\":\"nmotpuwnnoh\",\"steps\":[{},{},{},{}],\"exception\":[\"ocfrjuypw\",\"iulaynosugk\"]}],\"exception\":[\"xttpfs\",\"wgsghqucumldd\",\"uqmllfeothxu\"]}]},\"deploymentStatus\":{\"status\":\"grjdlj\",\"steps\":[{\"name\":\"vkrbzkuastaxklpr\",\"description\":\"l\",\"fullStepIndex\":\"l\",\"startTimeUtc\":\"izwxvs\",\"endTimeUtc\":\"sgfy\",\"status\":\"ky\",\"steps\":[{\"name\":\"fxcz\",\"description\":\"cckwrtwle\",\"fullStepIndex\":\"veszrtlhpdhw\",\"startTimeUtc\":\"ctac\",\"endTimeUtc\":\"njfmbbfnvjxit\",\"status\":\"vnk\",\"steps\":[{},{}],\"exception\":[\"s\",\"n\",\"hql\",\"oqksyiibhyxwbgbu\"]},{\"name\":\"vqdorbccqcd\",\"description\":\"hojvlirkn\",\"fullStepIndex\":\"osa\",\"startTimeUtc\":\"dtnagzlgpyaix\",\"endTimeUtc\":\"zqjjt\",\"status\":\"uy\",\"steps\":[{},{},{}],\"exception\":[\"kacybdueurgmcdcp\",\"shlojermh\",\"icsbfdjhyaakn\",\"ukib\"]}],\"exception\":[\"lhphzwxq\",\"ejp\"]}]}}") - .toObject(NetworkAdapterJobReportedProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterProvisioningStatusTests.java deleted file mode 100644 index a343e68be152..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterProvisioningStatusTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapterProvisioningStatus; - -public final class NetworkAdapterProvisioningStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkAdapterProvisioningStatus model - = BinaryData.fromString("{\"operationId\":\"qtcmiwdwisv\",\"status\":\"Succeeded\"}") - .toObject(NetworkAdapterProvisioningStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterTests.java deleted file mode 100644 index 12fe9e778573..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkAdapterTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; -import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkAdapterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkAdapter model = BinaryData.fromString( - "{\"ipAssignmentType\":\"Automatic\",\"ipAddress\":\"czeuntgx\",\"adapterName\":\"ca\",\"macAddress\":\"tiekoifuvnyttz\",\"ipAddressRange\":{\"startIp\":\"xgyrihlgmgbehlqt\",\"endIp\":\"nrflkndrndpg\"},\"gateway\":\"odhda\",\"subnetMask\":\"twfhi\",\"dnsAddressArray\":[\"gsabvcipowzafc\",\"uumljcirvpefyc\",\"veitit\"],\"vlanId\":\"s\"}") - .toObject(NetworkAdapter.class); - Assertions.assertEquals(IpAssignmentType.AUTOMATIC, model.ipAssignmentType()); - Assertions.assertEquals("czeuntgx", model.ipAddress()); - Assertions.assertEquals("ca", model.adapterName()); - Assertions.assertEquals("tiekoifuvnyttz", model.macAddress()); - Assertions.assertEquals("xgyrihlgmgbehlqt", model.ipAddressRange().startIp()); - Assertions.assertEquals("nrflkndrndpg", model.ipAddressRange().endIp()); - Assertions.assertEquals("odhda", model.gateway()); - Assertions.assertEquals("twfhi", model.subnetMask()); - Assertions.assertEquals("gsabvcipowzafc", model.dnsAddressArray().get(0)); - Assertions.assertEquals("s", model.vlanId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkAdapter model = new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) - .withIpAddress("czeuntgx") - .withAdapterName("ca") - .withMacAddress("tiekoifuvnyttz") - .withIpAddressRange(new IpAddressRange().withStartIp("xgyrihlgmgbehlqt").withEndIp("nrflkndrndpg")) - .withGateway("odhda") - .withSubnetMask("twfhi") - .withDnsAddressArray(Arrays.asList("gsabvcipowzafc", "uumljcirvpefyc", "veitit")) - .withVlanId("s"); - model = BinaryData.fromObject(model).toObject(NetworkAdapter.class); - Assertions.assertEquals(IpAssignmentType.AUTOMATIC, model.ipAssignmentType()); - Assertions.assertEquals("czeuntgx", model.ipAddress()); - Assertions.assertEquals("ca", model.adapterName()); - Assertions.assertEquals("tiekoifuvnyttz", model.macAddress()); - Assertions.assertEquals("xgyrihlgmgbehlqt", model.ipAddressRange().startIp()); - Assertions.assertEquals("nrflkndrndpg", model.ipAddressRange().endIp()); - Assertions.assertEquals("odhda", model.gateway()); - Assertions.assertEquals("twfhi", model.subnetMask()); - Assertions.assertEquals("gsabvcipowzafc", model.dnsAddressArray().get(0)); - Assertions.assertEquals("s", model.vlanId()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkConfigurationTests.java deleted file mode 100644 index 1fe86cae0fb9..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkConfigurationTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; -import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; -import com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkConfiguration model = BinaryData.fromString( - "{\"networkAdapters\":[{\"ipAssignmentType\":\"Automatic\",\"ipAddress\":\"dsjtdlpbni\",\"adapterName\":\"gazlsvbz\",\"macAddress\":\"puoee\",\"ipAddressRange\":{\"startIp\":\"jcciklhsyek\",\"endIp\":\"drenxol\"},\"gateway\":\"yehqbeivdlhydwb\",\"subnetMask\":\"fgrlpun\",\"dnsAddressArray\":[\"lkesmm\",\"athu\",\"ta\"],\"vlanId\":\"e\"},{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"iwllbvgwzsffted\",\"adapterName\":\"snkt\",\"macAddress\":\"gravaqogfkbebauz\",\"ipAddressRange\":{\"startIp\":\"btxxwpfhnjzud\",\"endIp\":\"tpzkgmeboywhcz\"},\"gateway\":\"rhmngqbedy\",\"subnetMask\":\"s\",\"dnsAddressArray\":[\"nykdi\",\"jch\",\"rmpwctofld\",\"eacdhztx\"],\"vlanId\":\"rfgdrwj\"},{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"whfjsrwqrxe\",\"adapterName\":\"gcwvrrmdqntycna\",\"macAddress\":\"hvmaxgnuyeamcmhu\",\"ipAddressRange\":{\"startIp\":\"jecehokwc\",\"endIp\":\"qtwloes\"},\"gateway\":\"ggvrbnyrukoilaci\",\"subnetMask\":\"wjleip\",\"dnsAddressArray\":[\"wyxpzruzyth\"],\"vlanId\":\"kwhbgxve\"},{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"ulnxdmnit\",\"adapterName\":\"jdtvmclyymffhmj\",\"macAddress\":\"dnyxfzuvrz\",\"ipAddressRange\":{\"startIp\":\"qmzjqrbrpvnmdy\",\"endIp\":\"oebojtjppg\"},\"gateway\":\"ohoqkpjtnqjilayw\",\"subnetMask\":\"cwm\",\"dnsAddressArray\":[\"ri\",\"mhxdqaolfy\",\"nkkbjpjvlywltmfw\",\"bbjwhlw\"],\"vlanId\":\"fnqzocr\"}]}") - .toObject(NetworkConfiguration.class); - Assertions.assertEquals(IpAssignmentType.AUTOMATIC, model.networkAdapters().get(0).ipAssignmentType()); - Assertions.assertEquals("dsjtdlpbni", model.networkAdapters().get(0).ipAddress()); - Assertions.assertEquals("gazlsvbz", model.networkAdapters().get(0).adapterName()); - Assertions.assertEquals("puoee", model.networkAdapters().get(0).macAddress()); - Assertions.assertEquals("jcciklhsyek", model.networkAdapters().get(0).ipAddressRange().startIp()); - Assertions.assertEquals("drenxol", model.networkAdapters().get(0).ipAddressRange().endIp()); - Assertions.assertEquals("yehqbeivdlhydwb", model.networkAdapters().get(0).gateway()); - Assertions.assertEquals("fgrlpun", model.networkAdapters().get(0).subnetMask()); - Assertions.assertEquals("lkesmm", model.networkAdapters().get(0).dnsAddressArray().get(0)); - Assertions.assertEquals("e", model.networkAdapters().get(0).vlanId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkConfiguration model - = new NetworkConfiguration() - .withNetworkAdapters( - Arrays - .asList( - new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) - .withIpAddress("dsjtdlpbni") - .withAdapterName("gazlsvbz") - .withMacAddress("puoee") - .withIpAddressRange( - new IpAddressRange().withStartIp("jcciklhsyek").withEndIp("drenxol")) - .withGateway("yehqbeivdlhydwb") - .withSubnetMask("fgrlpun") - .withDnsAddressArray(Arrays.asList("lkesmm", "athu", "ta")) - .withVlanId("e"), - new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) - .withIpAddress("iwllbvgwzsffted") - .withAdapterName("snkt") - .withMacAddress("gravaqogfkbebauz") - .withIpAddressRange( - new IpAddressRange().withStartIp("btxxwpfhnjzud").withEndIp("tpzkgmeboywhcz")) - .withGateway("rhmngqbedy") - .withSubnetMask("s") - .withDnsAddressArray(Arrays.asList("nykdi", "jch", "rmpwctofld", "eacdhztx")) - .withVlanId("rfgdrwj"), - new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) - .withIpAddress("whfjsrwqrxe") - .withAdapterName("gcwvrrmdqntycna") - .withMacAddress("hvmaxgnuyeamcmhu") - .withIpAddressRange(new IpAddressRange().withStartIp("jecehokwc").withEndIp("qtwloes")) - .withGateway("ggvrbnyrukoilaci") - .withSubnetMask("wjleip") - .withDnsAddressArray(Arrays.asList("wyxpzruzyth")) - .withVlanId("kwhbgxve"), - new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) - .withIpAddress("ulnxdmnit") - .withAdapterName("jdtvmclyymffhmj") - .withMacAddress("dnyxfzuvrz") - .withIpAddressRange( - new IpAddressRange().withStartIp("qmzjqrbrpvnmdy").withEndIp("oebojtjppg")) - .withGateway("ohoqkpjtnqjilayw") - .withSubnetMask("cwm") - .withDnsAddressArray(Arrays.asList("ri", "mhxdqaolfy", "nkkbjpjvlywltmfw", "bbjwhlw")) - .withVlanId("fnqzocr"))); - model = BinaryData.fromObject(model).toObject(NetworkConfiguration.class); - Assertions.assertEquals(IpAssignmentType.AUTOMATIC, model.networkAdapters().get(0).ipAssignmentType()); - Assertions.assertEquals("dsjtdlpbni", model.networkAdapters().get(0).ipAddress()); - Assertions.assertEquals("gazlsvbz", model.networkAdapters().get(0).adapterName()); - Assertions.assertEquals("puoee", model.networkAdapters().get(0).macAddress()); - Assertions.assertEquals("jcciklhsyek", model.networkAdapters().get(0).ipAddressRange().startIp()); - Assertions.assertEquals("drenxol", model.networkAdapters().get(0).ipAddressRange().endIp()); - Assertions.assertEquals("yehqbeivdlhydwb", model.networkAdapters().get(0).gateway()); - Assertions.assertEquals("fgrlpun", model.networkAdapters().get(0).subnetMask()); - Assertions.assertEquals("lkesmm", model.networkAdapters().get(0).dnsAddressArray().get(0)); - Assertions.assertEquals("e", model.networkAdapters().get(0).vlanId()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkControllerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkControllerTests.java index 0ad0142c8520..6ed2fb2c15c5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkControllerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkControllerTests.java @@ -12,21 +12,21 @@ public final class NetworkControllerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkController model = BinaryData.fromString( - "{\"macAddressPoolStart\":\"jivfxzsjabib\",\"macAddressPoolStop\":\"stawfsdjpvkv\",\"networkVirtualizationEnabled\":true}") + "{\"macAddressPoolStart\":\"oakggkfpag\",\"macAddressPoolStop\":\"wpu\",\"networkVirtualizationEnabled\":true}") .toObject(NetworkController.class); - Assertions.assertEquals("jivfxzsjabib", model.macAddressPoolStart()); - Assertions.assertEquals("stawfsdjpvkv", model.macAddressPoolStop()); + Assertions.assertEquals("oakggkfpag", model.macAddressPoolStart()); + Assertions.assertEquals("wpu", model.macAddressPoolStop()); Assertions.assertTrue(model.networkVirtualizationEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkController model = new NetworkController().withMacAddressPoolStart("jivfxzsjabib") - .withMacAddressPoolStop("stawfsdjpvkv") + NetworkController model = new NetworkController().withMacAddressPoolStart("oakggkfpag") + .withMacAddressPoolStop("wpu") .withNetworkVirtualizationEnabled(true); model = BinaryData.fromObject(model).toObject(NetworkController.class); - Assertions.assertEquals("jivfxzsjabib", model.macAddressPoolStart()); - Assertions.assertEquals("stawfsdjpvkv", model.macAddressPoolStop()); + Assertions.assertEquals("oakggkfpag", model.macAddressPoolStart()); + Assertions.assertEquals("wpu", model.macAddressPoolStop()); Assertions.assertTrue(model.networkVirtualizationEnabled()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NextBillingModelTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NextBillingModelTests.java index 94e7fa876dc9..3dc82912d8fb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NextBillingModelTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NextBillingModelTests.java @@ -12,10 +12,10 @@ public final class NextBillingModelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NextBillingModel model = BinaryData.fromString( - "{\"billingModel\":\"laulppg\",\"capabilitiesEnabled\":[\"pnapnyiropuh\",\"igvpgylg\",\"git\",\"medjvcslynqwwncw\"],\"trialDaysRemaining\":12.541216843737912}") + "{\"billingModel\":\"yvjusrtslhsp\",\"capabilitiesEnabled\":[\"emaofmxagkvt\",\"elmqk\",\"hahvljuahaq\",\"hcdhmdual\"],\"trialDaysRemaining\":52.6878090627963}") .toObject(NextBillingModel.class); - Assertions.assertEquals("laulppg", model.billingModel()); - Assertions.assertEquals("pnapnyiropuh", model.capabilitiesEnabled().get(0)); - Assertions.assertEquals(12.541216843737912D, model.trialDaysRemaining()); + Assertions.assertEquals("yvjusrtslhsp", model.billingModel()); + Assertions.assertEquals("emaofmxagkvt", model.capabilitiesEnabled().get(0)); + Assertions.assertEquals(52.6878090627963D, model.trialDaysRemaining()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NicDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NicDetailTests.java index f92af7bf692f..7a36cdb708ec 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NicDetailTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NicDetailTests.java @@ -13,39 +13,39 @@ public final class NicDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NicDetail model = BinaryData.fromString( - "{\"adapterName\":\"udypohyuems\",\"interfaceDescription\":\"nsqyrpfoobrltt\",\"componentId\":\"sjnygqdnfwqzdzgt\",\"driverVersion\":\"axhnfh\",\"ip4Address\":\"yvi\",\"subnetMask\":\"uwivkxoy\",\"defaultGateway\":\"nbixxrti\",\"dnsServers\":[\"pwpgclrci\",\"tso\"],\"defaultIsolationId\":\"rkenx\"}") + "{\"adapterName\":\"rjgeih\",\"interfaceDescription\":\"lg\",\"componentId\":\"fiwzcxmjpbyep\",\"driverVersion\":\"gt\",\"ip4Address\":\"j\",\"subnetMask\":\"cmyfqipgxhnpo\",\"defaultGateway\":\"qwcabvnui\",\"dnsServers\":[\"yaswlpaugmr\"],\"defaultIsolationId\":\"jlrxwtoaukhfk\"}") .toObject(NicDetail.class); - Assertions.assertEquals("udypohyuems", model.adapterName()); - Assertions.assertEquals("nsqyrpfoobrltt", model.interfaceDescription()); - Assertions.assertEquals("sjnygqdnfwqzdzgt", model.componentId()); - Assertions.assertEquals("axhnfh", model.driverVersion()); - Assertions.assertEquals("yvi", model.ip4Address()); - Assertions.assertEquals("uwivkxoy", model.subnetMask()); - Assertions.assertEquals("nbixxrti", model.defaultGateway()); - Assertions.assertEquals("pwpgclrci", model.dnsServers().get(0)); - Assertions.assertEquals("rkenx", model.defaultIsolationId()); + Assertions.assertEquals("rjgeih", model.adapterName()); + Assertions.assertEquals("lg", model.interfaceDescription()); + Assertions.assertEquals("fiwzcxmjpbyep", model.componentId()); + Assertions.assertEquals("gt", model.driverVersion()); + Assertions.assertEquals("j", model.ip4Address()); + Assertions.assertEquals("cmyfqipgxhnpo", model.subnetMask()); + Assertions.assertEquals("qwcabvnui", model.defaultGateway()); + Assertions.assertEquals("yaswlpaugmr", model.dnsServers().get(0)); + Assertions.assertEquals("jlrxwtoaukhfk", model.defaultIsolationId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NicDetail model = new NicDetail().withAdapterName("udypohyuems") - .withInterfaceDescription("nsqyrpfoobrltt") - .withComponentId("sjnygqdnfwqzdzgt") - .withDriverVersion("axhnfh") - .withIp4Address("yvi") - .withSubnetMask("uwivkxoy") - .withDefaultGateway("nbixxrti") - .withDnsServers(Arrays.asList("pwpgclrci", "tso")) - .withDefaultIsolationId("rkenx"); + NicDetail model = new NicDetail().withAdapterName("rjgeih") + .withInterfaceDescription("lg") + .withComponentId("fiwzcxmjpbyep") + .withDriverVersion("gt") + .withIp4Address("j") + .withSubnetMask("cmyfqipgxhnpo") + .withDefaultGateway("qwcabvnui") + .withDnsServers(Arrays.asList("yaswlpaugmr")) + .withDefaultIsolationId("jlrxwtoaukhfk"); model = BinaryData.fromObject(model).toObject(NicDetail.class); - Assertions.assertEquals("udypohyuems", model.adapterName()); - Assertions.assertEquals("nsqyrpfoobrltt", model.interfaceDescription()); - Assertions.assertEquals("sjnygqdnfwqzdzgt", model.componentId()); - Assertions.assertEquals("axhnfh", model.driverVersion()); - Assertions.assertEquals("yvi", model.ip4Address()); - Assertions.assertEquals("uwivkxoy", model.subnetMask()); - Assertions.assertEquals("nbixxrti", model.defaultGateway()); - Assertions.assertEquals("pwpgclrci", model.dnsServers().get(0)); - Assertions.assertEquals("rkenx", model.defaultIsolationId()); + Assertions.assertEquals("rjgeih", model.adapterName()); + Assertions.assertEquals("lg", model.interfaceDescription()); + Assertions.assertEquals("fiwzcxmjpbyep", model.componentId()); + Assertions.assertEquals("gt", model.driverVersion()); + Assertions.assertEquals("j", model.ip4Address()); + Assertions.assertEquals("cmyfqipgxhnpo", model.subnetMask()); + Assertions.assertEquals("qwcabvnui", model.defaultGateway()); + Assertions.assertEquals("yaswlpaugmr", model.dnsServers().get(0)); + Assertions.assertEquals("jlrxwtoaukhfk", model.defaultIsolationId()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ObservabilityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ObservabilityTests.java index f00e28dfafb2..2f6954865ee1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ObservabilityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ObservabilityTests.java @@ -12,20 +12,20 @@ public final class ObservabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Observability model - = BinaryData.fromString("{\"streamingDataClient\":false,\"euLocation\":true,\"episodicDataUpload\":true}") + = BinaryData.fromString("{\"streamingDataClient\":false,\"euLocation\":false,\"episodicDataUpload\":false}") .toObject(Observability.class); Assertions.assertFalse(model.streamingDataClient()); - Assertions.assertTrue(model.euLocation()); - Assertions.assertTrue(model.episodicDataUpload()); + Assertions.assertFalse(model.euLocation()); + Assertions.assertFalse(model.episodicDataUpload()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { Observability model - = new Observability().withStreamingDataClient(false).withEuLocation(true).withEpisodicDataUpload(true); + = new Observability().withStreamingDataClient(false).withEuLocation(false).withEpisodicDataUpload(false); model = BinaryData.fromObject(model).toObject(Observability.class); Assertions.assertFalse(model.streamingDataClient()); - Assertions.assertTrue(model.euLocation()); - Assertions.assertTrue(model.episodicDataUpload()); + Assertions.assertFalse(model.euLocation()); + Assertions.assertFalse(model.episodicDataUpload()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferInnerTests.java index 151ac59c4dd3..2f74e8126321 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferInnerTests.java @@ -12,13 +12,13 @@ public final class OfferInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OfferInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"anyktzlcuiywg\",\"publisherId\":\"wgndrvynhzgpp\",\"content\":\"cgyncocpecf\",\"contentVersion\":\"mcoo\",\"skuMappings\":[{\"catalogPlanId\":\"zevgb\",\"marketplaceSkuId\":\"jqabcypmivkwlzuv\",\"marketplaceSkuVersions\":[\"wnfnbacf\",\"onlebxetqgtzxdpn\"]},{\"catalogPlanId\":\"qqwx\",\"marketplaceSkuId\":\"feallnwsu\",\"marketplaceSkuVersions\":[\"njampm\",\"gnzscxaqwo\",\"chcbonqvpkvlrxnj\"]},{\"catalogPlanId\":\"seiphe\",\"marketplaceSkuId\":\"lokeyy\",\"marketplaceSkuVersions\":[\"jbdlwtgrhpdjpju\"]},{\"catalogPlanId\":\"sxazjpq\",\"marketplaceSkuId\":\"gual\",\"marketplaceSkuVersions\":[\"xhejjzzvdud\",\"wdslfhotwmcy\",\"pwlbjnpg\"]}]},\"id\":\"ftadehxnltyfs\",\"name\":\"ppusuesnzwdejba\",\"type\":\"orxzdmohctbqvud\"}") + "{\"properties\":{\"provisioningState\":\"bngui\",\"publisherId\":\"wu\",\"content\":\"gazxuf\",\"contentVersion\":\"uckyf\",\"skuMappings\":[{\"catalogPlanId\":\"idf\",\"marketplaceSkuId\":\"wdzuhtymwisd\",\"marketplaceSkuVersions\":[\"hwxmnteiwa\",\"pvkmijcmmxdcuf\",\"fsrpymzidnse\",\"cxtbzsg\"]},{\"catalogPlanId\":\"c\",\"marketplaceSkuId\":\"newmdwzjeiachbo\",\"marketplaceSkuVersions\":[\"lnrosfqp\",\"eeh\",\"zvypyqrimzinp\",\"swjdkirso\"]},{\"catalogPlanId\":\"qxhcrmn\",\"marketplaceSkuId\":\"jtckwhdso\",\"marketplaceSkuVersions\":[\"yip\"]}]},\"id\":\"sqwpgrjb\",\"name\":\"norcjxvsnbyxqab\",\"type\":\"mocpc\"}") .toObject(OfferInner.class); - Assertions.assertEquals("wgndrvynhzgpp", model.publisherId()); - Assertions.assertEquals("cgyncocpecf", model.content()); - Assertions.assertEquals("mcoo", model.contentVersion()); - Assertions.assertEquals("zevgb", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("jqabcypmivkwlzuv", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("wnfnbacf", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("wu", model.publisherId()); + Assertions.assertEquals("gazxuf", model.content()); + Assertions.assertEquals("uckyf", model.contentVersion()); + Assertions.assertEquals("idf", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("wdzuhtymwisd", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("hwxmnteiwa", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferListTests.java index 8af6399c2b04..4eaf0cca4f01 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferListTests.java @@ -12,14 +12,15 @@ public final class OfferListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OfferList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"bpxjmfl\",\"publisherId\":\"vnchrkcci\",\"content\":\"zjuqkhrsaj\",\"contentVersion\":\"ku\",\"skuMappings\":[{\"catalogPlanId\":\"kg\",\"marketplaceSkuId\":\"auu\",\"marketplaceSkuVersions\":[\"mvxi\",\"duugidyjr\"]}]},\"id\":\"byao\",\"name\":\"v\",\"type\":\"xc\"},{\"properties\":{\"provisioningState\":\"pclhocohslk\",\"publisherId\":\"leggzfbu\",\"content\":\"mvfaxkffeiith\",\"contentVersion\":\"m\",\"skuMappings\":[{\"catalogPlanId\":\"shxmzsbbzoggigrx\",\"marketplaceSkuId\":\"ur\",\"marketplaceSkuVersions\":[\"xjnspy\",\"ptkoenkoukn\",\"udwtiukbl\"]},{\"catalogPlanId\":\"gkpocipazyxoe\",\"marketplaceSkuId\":\"kgjn\",\"marketplaceSkuVersions\":[\"cgygev\",\"zntypmrb\",\"izcdrqjsd\"]}]},\"id\":\"dnfyhxdeoejzicwi\",\"name\":\"sjttgzfbish\",\"type\":\"bkh\"},{\"properties\":{\"provisioningState\":\"eyeam\",\"publisherId\":\"hagalpbuxwgipwh\",\"content\":\"ow\",\"contentVersion\":\"shwankixzbinje\",\"skuMappings\":[{\"catalogPlanId\":\"mryw\",\"marketplaceSkuId\":\"zoqftiyqzrnkcqvy\",\"marketplaceSkuVersions\":[\"hzls\",\"cohoq\",\"nwvlryavwhheunmm\"]},{\"catalogPlanId\":\"gyxzk\",\"marketplaceSkuId\":\"ocukoklyax\",\"marketplaceSkuVersions\":[\"nuqszfkbey\"]},{\"catalogPlanId\":\"wrmjmwvvjektc\",\"marketplaceSkuId\":\"enhwlrs\",\"marketplaceSkuVersions\":[\"zpwv\",\"qdqgbi\",\"ylihkaetckt\",\"fcivfsnkym\"]}]},\"id\":\"tqhjfbebrjcx\",\"name\":\"rfuwutt\",\"type\":\"xfvjrbirp\"},{\"properties\":{\"provisioningState\":\"pcyvahfnljkyqx\",\"publisherId\":\"uujqgidokgjljyo\",\"content\":\"vcltbgsncgh\",\"contentVersion\":\"esz\",\"skuMappings\":[{\"catalogPlanId\":\"jhtxfvgxbfsmxne\",\"marketplaceSkuId\":\"pvecxgodeb\",\"marketplaceSkuVersions\":[\"krbm\"]},{\"catalogPlanId\":\"kgriwflzlfbx\",\"marketplaceSkuId\":\"uzycispnqza\",\"marketplaceSkuVersions\":[\"kbrpyydhibnuq\",\"kpikadrgvt\"]},{\"catalogPlanId\":\"gnbuy\",\"marketplaceSkuId\":\"ijggmebfsiar\",\"marketplaceSkuVersions\":[\"rcvpnazzmhjrunmp\",\"ttdbhrbnl\",\"nkxmyskpbhenbtk\"]}]},\"id\":\"ywn\",\"name\":\"tnrsyn\",\"type\":\"qidybyx\"}],\"nextLink\":\"fclhaaxdbabphlwr\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"mcl\",\"publisherId\":\"ijcoejctb\",\"content\":\"qsqsy\",\"contentVersion\":\"kbfkg\",\"skuMappings\":[{\"catalogPlanId\":\"exxppofmxaxcfjp\",\"marketplaceSkuId\":\"dtocj\",\"marketplaceSkuVersions\":[\"vpmouexhdzxib\",\"eojnxqbzvddn\"]},{\"catalogPlanId\":\"ndei\",\"marketplaceSkuId\":\"twnpzaoqvuhrhcf\",\"marketplaceSkuVersions\":[\"ddglm\"]},{\"catalogPlanId\":\"hjq\",\"marketplaceSkuId\":\"pyeicxm\",\"marketplaceSkuVersions\":[\"wqvhkhixuigdt\",\"pbobjo\"]}]},\"id\":\"m\",\"name\":\"w\",\"type\":\"a\"},{\"properties\":{\"provisioningState\":\"hrzayvvtpgvdf\",\"publisherId\":\"otkftutqxlngx\",\"content\":\"fgugnxkrxdqmid\",\"contentVersion\":\"hzrvqd\",\"skuMappings\":[{\"catalogPlanId\":\"jybige\",\"marketplaceSkuId\":\"qfbow\",\"marketplaceSkuVersions\":[\"nyktzlcuiy\",\"gqywgndrv\",\"nhzgpphrcgyn\",\"ocpecfvmmco\"]}]},\"id\":\"sxlzevgbmqj\",\"name\":\"abcypmivk\",\"type\":\"lzu\"},{\"properties\":{\"provisioningState\":\"fwnfnb\",\"publisherId\":\"fionl\",\"content\":\"x\",\"contentVersion\":\"qgtz\",\"skuMappings\":[{\"catalogPlanId\":\"qbqqwxr\",\"marketplaceSkuId\":\"eallnwsubisnj\",\"marketplaceSkuVersions\":[\"mngnzscxaqw\"]},{\"catalogPlanId\":\"chcbonqvpkvlrxnj\",\"marketplaceSkuId\":\"seiphe\",\"marketplaceSkuVersions\":[\"okeyyienj\",\"dlwtgrhpdj\"]},{\"catalogPlanId\":\"umasxazjpq\",\"marketplaceSkuId\":\"gual\",\"marketplaceSkuVersions\":[\"xhejjzzvdud\",\"wdslfhotwmcy\",\"pwlbjnpg\"]}]},\"id\":\"ftadehxnltyfs\",\"name\":\"ppusuesnzwdejba\",\"type\":\"orxzdmohctbqvud\"},{\"properties\":{\"provisioningState\":\"ndnvo\",\"publisherId\":\"ujjugwdkcglh\",\"content\":\"azjdyggd\",\"contentVersion\":\"ixhbkuofqweykhm\",\"skuMappings\":[{\"catalogPlanId\":\"fyexfwhy\",\"marketplaceSkuId\":\"i\",\"marketplaceSkuVersions\":[\"vdcsitynn\",\"amdecte\",\"f\"]},{\"catalogPlanId\":\"scjeypv\",\"marketplaceSkuId\":\"zrkgqhcjrefovg\",\"marketplaceSkuVersions\":[\"sle\"]},{\"catalogPlanId\":\"vxyqjpkcattpngjc\",\"marketplaceSkuId\":\"czsqpjhvm\",\"marketplaceSkuVersions\":[\"v\",\"ysou\",\"q\"]},{\"catalogPlanId\":\"a\",\"marketplaceSkuId\":\"ae\",\"marketplaceSkuVersions\":[\"hy\",\"ltrpmopj\",\"cma\",\"u\"]}]},\"id\":\"thfuiuaodsfcpkvx\",\"name\":\"dpuozmyz\",\"type\":\"dagfuaxbezyiuok\"}],\"nextLink\":\"whrdxwzywqsmbsu\"}") .toObject(OfferList.class); - Assertions.assertEquals("vnchrkcci", model.value().get(0).publisherId()); - Assertions.assertEquals("zjuqkhrsaj", model.value().get(0).content()); - Assertions.assertEquals("ku", model.value().get(0).contentVersion()); - Assertions.assertEquals("kg", model.value().get(0).skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("auu", model.value().get(0).skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("mvxi", model.value().get(0).skuMappings().get(0).marketplaceSkuVersions().get(0)); - Assertions.assertEquals("fclhaaxdbabphlwr", model.nextLink()); + Assertions.assertEquals("ijcoejctb", model.value().get(0).publisherId()); + Assertions.assertEquals("qsqsy", model.value().get(0).content()); + Assertions.assertEquals("kbfkg", model.value().get(0).contentVersion()); + Assertions.assertEquals("exxppofmxaxcfjp", model.value().get(0).skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("dtocj", model.value().get(0).skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("vpmouexhdzxib", + model.value().get(0).skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("whrdxwzywqsmbsu", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferPropertiesTests.java index 02531dc978fb..745c8f31f0c0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OfferPropertiesTests.java @@ -12,13 +12,13 @@ public final class OfferPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OfferProperties model = BinaryData.fromString( - "{\"provisioningState\":\"dndnvow\",\"publisherId\":\"jjugwdkcglhslaz\",\"content\":\"yggdtjixh\",\"contentVersion\":\"uofqwe\",\"skuMappings\":[{\"catalogPlanId\":\"enevfyexfwhybci\",\"marketplaceSkuId\":\"yvdcsitynnaa\",\"marketplaceSkuVersions\":[\"ctehfiqscjey\",\"vhezrkgqhcj\"]},{\"catalogPlanId\":\"fovgmkqsleyyvxy\",\"marketplaceSkuId\":\"pkc\",\"marketplaceSkuVersions\":[\"pngjcrcczsqpjhvm\",\"ajvnysounqe\",\"a\",\"oaeupfhyhltrpmo\"]},{\"catalogPlanId\":\"mcmatuokthfuiu\",\"marketplaceSkuId\":\"dsfcpkvxodpuoz\",\"marketplaceSkuVersions\":[\"ydagfuaxbe\",\"yiuokktwh\",\"dxwzywqsmbsurexi\",\"o\"]},{\"catalogPlanId\":\"ocfs\",\"marketplaceSkuId\":\"s\",\"marketplaceSkuVersions\":[\"dystkiiuxhqyud\",\"o\",\"rq\",\"b\"]}]}") + "{\"provisioningState\":\"hurzafblj\",\"publisherId\":\"pbtoqcjmkl\",\"content\":\"vbqid\",\"contentVersion\":\"ajzyul\",\"skuMappings\":[{\"catalogPlanId\":\"jkrlkhbzhfepg\",\"marketplaceSkuId\":\"qex\",\"marketplaceSkuVersions\":[\"c\",\"scpai\",\"rhhbcs\",\"l\"]}]}") .toObject(OfferProperties.class); - Assertions.assertEquals("jjugwdkcglhslaz", model.publisherId()); - Assertions.assertEquals("yggdtjixh", model.content()); - Assertions.assertEquals("uofqwe", model.contentVersion()); - Assertions.assertEquals("enevfyexfwhybci", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("yvdcsitynnaa", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("ctehfiqscjey", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("pbtoqcjmkl", model.publisherId()); + Assertions.assertEquals("vbqid", model.content()); + Assertions.assertEquals("ajzyul", model.contentVersion()); + Assertions.assertEquals("jkrlkhbzhfepg", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("qex", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("c", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetWithResponseMockTests.java index c5d4c0778800..a48f90c81fa8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class OffersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"cel\",\"publisherId\":\"n\",\"content\":\"dnjyhzfax\",\"contentVersion\":\"dvuelumodpegqxso\",\"skuMappings\":[{\"catalogPlanId\":\"zrqoxzyhlbeqvh\",\"marketplaceSkuId\":\"b\",\"marketplaceSkuVersions\":[\"xslajggfzgaefha\"]},{\"catalogPlanId\":\"mibuyd\",\"marketplaceSkuId\":\"urn\",\"marketplaceSkuVersions\":[\"pdyttqmiu\",\"jplosebmh\"]}]},\"id\":\"uqmtxynof\",\"name\":\"qobfixngxebihe\",\"type\":\"hnkingiqcdol\"}"; + = "{\"properties\":{\"provisioningState\":\"qplwg\",\"publisherId\":\"m\",\"content\":\"wrjlvzkl\",\"contentVersion\":\"bgikyjtkakvlbi\",\"skuMappings\":[{\"catalogPlanId\":\"pzaptuosk\",\"marketplaceSkuId\":\"izjixwfgcd\",\"marketplaceSkuVersions\":[\"kcxwnujvqynvavi\",\"mdmuqoh\",\"ihraxqudd\",\"wjc\"]},{\"catalogPlanId\":\"brhlhpvzadb\",\"marketplaceSkuId\":\"nnin\",\"marketplaceSkuVersions\":[\"xrzfrmvztiucwvi\"]},{\"catalogPlanId\":\"lukh\",\"marketplaceSkuId\":\"cqx\",\"marketplaceSkuVersions\":[\"v\",\"a\"]},{\"catalogPlanId\":\"qcbpokstsinv\",\"marketplaceSkuId\":\"ovjyhd\",\"marketplaceSkuVersions\":[\"rdvcehqwhit\",\"nmxgnm\"]}]},\"id\":\"zbuwvorbalkjnbk\",\"name\":\"dhlltqstqkqsyg\",\"type\":\"iynecovagz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Offer response = manager.offers() - .getWithResponse("mwevguyflnxel", "jkfzcdetowwezh", "fkdilb", "qlqac", "fqbir", - com.azure.core.util.Context.NONE) + .getWithResponse("nzuz", "bgk", "cscpiuzvkunh", "i", "juktirzkaugpucd", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("n", response.publisherId()); - Assertions.assertEquals("dnjyhzfax", response.content()); - Assertions.assertEquals("dvuelumodpegqxso", response.contentVersion()); - Assertions.assertEquals("zrqoxzyhlbeqvh", response.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("b", response.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("xslajggfzgaefha", response.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("m", response.publisherId()); + Assertions.assertEquals("wrjlvzkl", response.content()); + Assertions.assertEquals("bgikyjtkakvlbi", response.contentVersion()); + Assertions.assertEquals("pzaptuosk", response.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("izjixwfgcd", response.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("kcxwnujvqynvavi", response.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterMockTests.java index 7683b8779d91..f005f9abddcc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterMockTests.java @@ -22,7 +22,7 @@ public final class OffersListByClusterMockTests { @Test public void testListByCluster() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"fybntmvehoh\",\"publisherId\":\"yuvbgtzqzqweu\",\"content\":\"ybnai\",\"contentVersion\":\"hpq\",\"skuMappings\":[{\"catalogPlanId\":\"eoge\",\"marketplaceSkuId\":\"rcn\",\"marketplaceSkuVersions\":[\"ncpr\",\"csjvjnkoiznzsqbi\"]},{\"catalogPlanId\":\"augicovjtmvwrmjx\",\"marketplaceSkuId\":\"uod\",\"marketplaceSkuVersions\":[\"zbassqfyy\",\"wppeygk\",\"zbloasybxhqvovd\",\"mhttuvsqjsrvj\"]}]},\"id\":\"taqgxqbfkcein\",\"name\":\"nrecjbiywevsf\",\"type\":\"drmnszdosmjsqs\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"gxhcxnwjtpfdzxco\",\"publisherId\":\"fwofwakukzkdtz\",\"content\":\"oednlwglihezomuc\",\"contentVersion\":\"g\",\"skuMappings\":[{\"catalogPlanId\":\"onetbzdrdpue\",\"marketplaceSkuId\":\"kgtlzl\",\"marketplaceSkuVersions\":[\"lxcznn\",\"zkbnbmxl\",\"mwt\"]},{\"catalogPlanId\":\"eqzusitoqcahfs\",\"marketplaceSkuId\":\"jmlreesrfwsszvlc\",\"marketplaceSkuVersions\":[\"solntfxxcrqmipf\",\"wfo\",\"gizmshxxbaizabu\",\"nvgskjtoxjd\"]}]},\"id\":\"sjznvhx\",\"name\":\"qmqipaydhfnzoc\",\"type\":\"mtfshksnyzmspa\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testListByCluster() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.offers().listByCluster("qznghx", "kyqzjsdkpvnr", "zwpf", com.azure.core.util.Context.NONE); + = manager.offers().listByCluster("ftvhkmoogj", "hskb", "gmjgrul", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yuvbgtzqzqweu", response.iterator().next().publisherId()); - Assertions.assertEquals("ybnai", response.iterator().next().content()); - Assertions.assertEquals("hpq", response.iterator().next().contentVersion()); - Assertions.assertEquals("eoge", response.iterator().next().skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("rcn", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("ncpr", + Assertions.assertEquals("fwofwakukzkdtz", response.iterator().next().publisherId()); + Assertions.assertEquals("oednlwglihezomuc", response.iterator().next().content()); + Assertions.assertEquals("g", response.iterator().next().contentVersion()); + Assertions.assertEquals("onetbzdrdpue", response.iterator().next().skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("kgtlzl", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("lxcznn", response.iterator().next().skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherMockTests.java index a9fb46c388b9..00f9c56c35bb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherMockTests.java @@ -22,7 +22,7 @@ public final class OffersListByPublisherMockTests { @Test public void testListByPublisher() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"newnuwk\",\"publisherId\":\"zzetlvhdy\",\"content\":\"lvwywjvrlgqp\",\"contentVersion\":\"lzpddarcbcdw\",\"skuMappings\":[{\"catalogPlanId\":\"ebajadknms\",\"marketplaceSkuId\":\"doprwkampy\",\"marketplaceSkuVersions\":[\"bldz\",\"iudrcycmwhuzym\"]},{\"catalogPlanId\":\"hihqknlvkmnbzko\",\"marketplaceSkuId\":\"iildcpu\",\"marketplaceSkuVersions\":[\"quxsyjofp\",\"vedrobujn\",\"gybuxmqxigid\"]}]},\"id\":\"l\",\"name\":\"jgcpskgrhnytslg\",\"type\":\"az\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"audoej\",\"publisherId\":\"ghsxjpyt\",\"content\":\"qbalahovuuwxhme\",\"contentVersion\":\"nhjiotiffb\",\"skuMappings\":[{\"catalogPlanId\":\"kegxcypxbbfe\",\"marketplaceSkuId\":\"ilyrzoxp\",\"marketplaceSkuVersions\":[\"lfr\"]},{\"catalogPlanId\":\"qownkiuajewnahw\",\"marketplaceSkuId\":\"jjmztnlmsoodtmv\",\"marketplaceSkuVersions\":[\"hdyswcrptveajc\",\"xvl\",\"srg\",\"rfizr\"]},{\"catalogPlanId\":\"wlp\",\"marketplaceSkuId\":\"uqhrlmcskykp\",\"marketplaceSkuVersions\":[\"fixcnpcfykkpy\"]},{\"catalogPlanId\":\"pawmpjprdp\",\"marketplaceSkuId\":\"pcfpcfj\",\"marketplaceSkuVersions\":[\"lgzawkgyepeyamnn\",\"dmdiawpzxkzrntm\",\"ctdhuosgwq\",\"sq\"]}]},\"id\":\"i\",\"name\":\"qodvqgcnbhcbmj\",\"type\":\"ztibniyntsxjmfm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,13 @@ public void testListByPublisher() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.offers() - .listByPublisher("pgup", "jlbsmndafbncuyj", "ykcnhpplzhc", "zxjziuu", com.azure.core.util.Context.NONE); + .listByPublisher("heu", "anlxunpq", "ckqiawzlzk", "aslgacizuxlrarwp", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zzetlvhdy", response.iterator().next().publisherId()); - Assertions.assertEquals("lvwywjvrlgqp", response.iterator().next().content()); - Assertions.assertEquals("lzpddarcbcdw", response.iterator().next().contentVersion()); - Assertions.assertEquals("ebajadknms", response.iterator().next().skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("doprwkampy", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("bldz", - response.iterator().next().skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("ghsxjpyt", response.iterator().next().publisherId()); + Assertions.assertEquals("qbalahovuuwxhme", response.iterator().next().content()); + Assertions.assertEquals("nhjiotiffb", response.iterator().next().contentVersion()); + Assertions.assertEquals("kegxcypxbbfe", response.iterator().next().skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("ilyrzoxp", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("lfr", response.iterator().next().skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OnboardingConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OnboardingConfigurationTests.java deleted file mode 100644 index b7627a7edfe8..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OnboardingConfigurationTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OnboardingConfiguration; -import com.azure.resourcemanager.azurestackhci.models.OnboardingResourceType; -import org.junit.jupiter.api.Assertions; - -public final class OnboardingConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnboardingConfiguration model = BinaryData.fromString( - "{\"type\":\"HybridComputeMachine\",\"resourceId\":\"gwxfkzsi\",\"location\":\"uvbdujgcwxvec\",\"tenantId\":\"wjtrdxriza\",\"arcVirtualMachineId\":\"bgiark\"}") - .toObject(OnboardingConfiguration.class); - Assertions.assertEquals(OnboardingResourceType.HYBRID_COMPUTE_MACHINE, model.type()); - Assertions.assertEquals("gwxfkzsi", model.resourceId()); - Assertions.assertEquals("uvbdujgcwxvec", model.location()); - Assertions.assertEquals("wjtrdxriza", model.tenantId()); - Assertions.assertEquals("bgiark", model.arcVirtualMachineId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnboardingConfiguration model - = new OnboardingConfiguration().withType(OnboardingResourceType.HYBRID_COMPUTE_MACHINE) - .withResourceId("gwxfkzsi") - .withLocation("uvbdujgcwxvec") - .withTenantId("wjtrdxriza") - .withArcVirtualMachineId("bgiark"); - model = BinaryData.fromObject(model).toObject(OnboardingConfiguration.class); - Assertions.assertEquals(OnboardingResourceType.HYBRID_COMPUTE_MACHINE, model.type()); - Assertions.assertEquals("gwxfkzsi", model.resourceId()); - Assertions.assertEquals("uvbdujgcwxvec", model.location()); - Assertions.assertEquals("wjtrdxriza", model.tenantId()); - Assertions.assertEquals("bgiark", model.arcVirtualMachineId()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java index ac7855e13009..6053508f7d54 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java @@ -11,7 +11,7 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"xaolth\",\"resource\":\"rgqjbpfzfsinzg\",\"operation\":\"cjrwzoxxjtfellu\",\"description\":\"zitonpeqfpjkjl\"}") + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .toObject(OperationDisplay.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java index 344e6b2e75fa..e03da23ccb4f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java @@ -11,7 +11,7 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"slwejdpvw\",\"isDataAction\":false,\"display\":{\"provider\":\"soacctazakl\",\"resource\":\"ahbc\",\"operation\":\"ffdfdosygexpa\",\"description\":\"akhmsbzjhcrz\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") .toObject(OperationInner.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java index 800fb71ea4fa..fd66c85ae5f5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java @@ -12,8 +12,8 @@ public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"hfcbjysa\",\"isDataAction\":false,\"display\":{\"provider\":\"qhabifpikxwcz\",\"resource\":\"scnpqxuhivy\",\"operation\":\"iwbybrkxvdumjg\",\"description\":\"fwvuk\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"cs\",\"isDataAction\":false,\"display\":{\"provider\":\"nyejhkryhtnap\",\"resource\":\"wlokjyem\",\"operation\":\"vnipjox\",\"description\":\"nchgej\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"ilzyd\",\"isDataAction\":false,\"display\":{\"provider\":\"yahux\",\"resource\":\"pmqnja\",\"operation\":\"ixjsprozvcputeg\",\"description\":\"wmfdatscmdvpjhul\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"jozkrwfndiod\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") .toObject(OperationListResult.class); - Assertions.assertEquals("jozkrwfndiod", model.nextLink()); + Assertions.assertEquals("kfo", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java index df706772649a..a246fb241dbd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"ytzuaedrl\",\"isDataAction\":false,\"display\":{\"provider\":\"myrhkvx\",\"resource\":\"miemqyftgpqos\",\"operation\":\"fqvjmghpakbqyhls\",\"description\":\"nfbmeqagkncjm\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"a\",\"isDataAction\":false,\"display\":{\"provider\":\"ajcywhjqw\",\"resource\":\"hqohtfxcpup\",\"operation\":\"i\",\"description\":\"j\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OptionalServicesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OptionalServicesTests.java index e8a3d2e59f73..0180ae9f7d11 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OptionalServicesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OptionalServicesTests.java @@ -11,15 +11,14 @@ public final class OptionalServicesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OptionalServices model - = BinaryData.fromString("{\"customLocation\":\"cjabudurgkakmo\"}").toObject(OptionalServices.class); - Assertions.assertEquals("cjabudurgkakmo", model.customLocation()); + OptionalServices model = BinaryData.fromString("{\"customLocation\":\"k\"}").toObject(OptionalServices.class); + Assertions.assertEquals("k", model.customLocation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OptionalServices model = new OptionalServices().withCustomLocation("cjabudurgkakmo"); + OptionalServices model = new OptionalServices().withCustomLocation("k"); model = BinaryData.fromObject(model).toObject(OptionalServices.class); - Assertions.assertEquals("cjabudurgkakmo", model.customLocation()); + Assertions.assertEquals("k", model.customLocation()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageInnerTests.java deleted file mode 100644 index 78e3bd297f89..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.OsImageInner; -import com.azure.resourcemanager.azurestackhci.models.Architecture; -import com.azure.resourcemanager.azurestackhci.models.SolutionType; -import org.junit.jupiter.api.Assertions; - -public final class OsImageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OsImageInner model = BinaryData.fromString( - "{\"properties\":{\"validatedSolutionRecipeVersion\":\"hq\",\"composedImageVersion\":\"gjxpybczmehmt\",\"composedImageIsoUrl\":\"pbsphrupidgs\",\"composedImageIsoHash\":\"bejhphoycmsxa\",\"architecture\":\"arm64\",\"solutionType\":\"HCI\"},\"id\":\"mtqio\",\"name\":\"jzehtb\",\"type\":\"ufpo\"}") - .toObject(OsImageInner.class); - Assertions.assertEquals("hq", model.properties().validatedSolutionRecipeVersion()); - Assertions.assertEquals("gjxpybczmehmt", model.properties().composedImageVersion()); - Assertions.assertEquals("pbsphrupidgs", model.properties().composedImageIsoUrl()); - Assertions.assertEquals("bejhphoycmsxa", model.properties().composedImageIsoHash()); - Assertions.assertEquals(Architecture.ARM64, model.properties().architecture()); - Assertions.assertEquals(SolutionType.HCI, model.properties().solutionType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageListResultTests.java deleted file mode 100644 index 89c326b63e79..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImageListResultTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.implementation.models.OsImageListResult; -import com.azure.resourcemanager.azurestackhci.models.Architecture; -import com.azure.resourcemanager.azurestackhci.models.SolutionType; -import org.junit.jupiter.api.Assertions; - -public final class OsImageListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OsImageListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"validatedSolutionRecipeVersion\":\"jnqglhqgnu\",\"composedImageVersion\":\"oo\",\"composedImageIsoUrl\":\"wifsq\",\"composedImageIsoHash\":\"aagdfmg\",\"architecture\":\"amd64\",\"solutionType\":\"AzureLinux\"},\"id\":\"rifkwm\",\"name\":\"vktsizntocipao\",\"type\":\"ajpsquc\"},{\"properties\":{\"validatedSolutionRecipeVersion\":\"yf\",\"composedImageVersion\":\"fogknygjofjdde\",\"composedImageIsoUrl\":\"rd\",\"composedImageIsoHash\":\"pewnw\",\"architecture\":\"amd64\",\"solutionType\":\"AzureLinux\"},\"id\":\"yflusarhmofc\",\"name\":\"hs\",\"type\":\"yurkdtmlxhekuksj\"},{\"properties\":{\"validatedSolutionRecipeVersion\":\"kc\",\"composedImageVersion\":\"parcry\",\"composedImageIsoUrl\":\"nzwuxzd\",\"composedImageIsoHash\":\"a\",\"architecture\":\"arm64\",\"solutionType\":\"AzureLinux\"},\"id\":\"hfpmrqobmtukknr\",\"name\":\"rtihfxtijbpz\",\"type\":\"gnwzsymglzufc\"}],\"nextLink\":\"kohdbiha\"}") - .toObject(OsImageListResult.class); - Assertions.assertEquals("jnqglhqgnu", model.value().get(0).properties().validatedSolutionRecipeVersion()); - Assertions.assertEquals("oo", model.value().get(0).properties().composedImageVersion()); - Assertions.assertEquals("wifsq", model.value().get(0).properties().composedImageIsoUrl()); - Assertions.assertEquals("aagdfmg", model.value().get(0).properties().composedImageIsoHash()); - Assertions.assertEquals(Architecture.AMD64, model.value().get(0).properties().architecture()); - Assertions.assertEquals(SolutionType.AZURE_LINUX, model.value().get(0).properties().solutionType()); - Assertions.assertEquals("kohdbiha", model.nextLink()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagePropertiesTests.java deleted file mode 100644 index b463fc3b8ddd..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagePropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.Architecture; -import com.azure.resourcemanager.azurestackhci.models.OsImageProperties; -import com.azure.resourcemanager.azurestackhci.models.SolutionType; -import org.junit.jupiter.api.Assertions; - -public final class OsImagePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OsImageProperties model = BinaryData.fromString( - "{\"validatedSolutionRecipeVersion\":\"oizh\",\"composedImageVersion\":\"rxybqsoq\",\"composedImageIsoUrl\":\"gkdmb\",\"composedImageIsoHash\":\"zlobcufpd\",\"architecture\":\"amd64\",\"solutionType\":\"AzureLinux\"}") - .toObject(OsImageProperties.class); - Assertions.assertEquals("oizh", model.validatedSolutionRecipeVersion()); - Assertions.assertEquals("rxybqsoq", model.composedImageVersion()); - Assertions.assertEquals("gkdmb", model.composedImageIsoUrl()); - Assertions.assertEquals("zlobcufpd", model.composedImageIsoHash()); - Assertions.assertEquals(Architecture.AMD64, model.architecture()); - Assertions.assertEquals(SolutionType.AZURE_LINUX, model.solutionType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetWithResponseMockTests.java deleted file mode 100644 index 003485d4a5e0..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesGetWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Architecture; -import com.azure.resourcemanager.azurestackhci.models.OsImage; -import com.azure.resourcemanager.azurestackhci.models.SolutionType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OsImagesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"validatedSolutionRecipeVersion\":\"sjnpckpluj\",\"composedImageVersion\":\"uonbdawsaop\",\"composedImageIsoUrl\":\"vmnb\",\"composedImageIsoHash\":\"jarsbbdddwok\",\"architecture\":\"arm64\",\"solutionType\":\"AzureLinux\"},\"id\":\"qk\",\"name\":\"yqjvzvc\",\"type\":\"rdspzesfkqqxu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - OsImage response - = manager.osImages().getWithResponse("iqissene", "rusyzai", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("sjnpckpluj", response.properties().validatedSolutionRecipeVersion()); - Assertions.assertEquals("uonbdawsaop", response.properties().composedImageVersion()); - Assertions.assertEquals("vmnb", response.properties().composedImageIsoUrl()); - Assertions.assertEquals("jarsbbdddwok", response.properties().composedImageIsoHash()); - Assertions.assertEquals(Architecture.ARM64, response.properties().architecture()); - Assertions.assertEquals(SolutionType.AZURE_LINUX, response.properties().solutionType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceMockTests.java deleted file mode 100644 index 6fa2c2aab702..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsImagesListBySubscriptionLocationResourceMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Architecture; -import com.azure.resourcemanager.azurestackhci.models.OsImage; -import com.azure.resourcemanager.azurestackhci.models.SolutionType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OsImagesListBySubscriptionLocationResourceMockTests { - @Test - public void testListBySubscriptionLocationResource() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"validatedSolutionRecipeVersion\":\"cdwukokgoojjf\",\"composedImageVersion\":\"tubcmu\",\"composedImageIsoUrl\":\"gbtzvxxvsbcu\",\"composedImageIsoHash\":\"krfnkcni\",\"architecture\":\"arm64\",\"solutionType\":\"HCI\"},\"id\":\"furqm\",\"name\":\"mwwpnt\",\"type\":\"motahbqsvnk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AzureStackHciManager manager = AzureStackHciManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.osImages().listBySubscriptionLocationResource("vzflbrous", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cdwukokgoojjf", - response.iterator().next().properties().validatedSolutionRecipeVersion()); - Assertions.assertEquals("tubcmu", response.iterator().next().properties().composedImageVersion()); - Assertions.assertEquals("gbtzvxxvsbcu", response.iterator().next().properties().composedImageIsoUrl()); - Assertions.assertEquals("krfnkcni", response.iterator().next().properties().composedImageIsoHash()); - Assertions.assertEquals(Architecture.ARM64, response.iterator().next().properties().architecture()); - Assertions.assertEquals(SolutionType.HCI, response.iterator().next().properties().solutionType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileTests.java deleted file mode 100644 index 9b690957b092..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OsProfile; - -public final class OsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OsProfile model = BinaryData.fromString( - "{\"bootType\":\"gftrqrejdaahuqim\",\"assemblyVersion\":\"ahlfxlmuifmuadj\",\"osType\":\"snc\",\"osSku\":\"iioshjgcz\",\"osVersion\":\"ybnxgztlcgc\",\"buildNumber\":\"chfjvmywjzebe\",\"baseImageVersion\":\"vlbefvwclj\",\"imageVersion\":\"pylrwoxzgwpsy\"}") - .toObject(OsProfile.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PackageVersionInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PackageVersionInfoTests.java index 59ab79ea4ed0..1ff66cfb31a7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PackageVersionInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PackageVersionInfoTests.java @@ -13,21 +13,22 @@ public final class PackageVersionInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PackageVersionInfo model = BinaryData - .fromString("{\"packageType\":\"lq\",\"version\":\"w\",\"lastUpdated\":\"2021-07-23T09:42:49Z\"}") + .fromString( + "{\"packageType\":\"aebfsyrled\",\"version\":\"ustbvtqigdx\",\"lastUpdated\":\"2021-05-12T12:38:19Z\"}") .toObject(PackageVersionInfo.class); - Assertions.assertEquals("lq", model.packageType()); - Assertions.assertEquals("w", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T09:42:49Z"), model.lastUpdated()); + Assertions.assertEquals("aebfsyrled", model.packageType()); + Assertions.assertEquals("ustbvtqigdx", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T12:38:19Z"), model.lastUpdated()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PackageVersionInfo model = new PackageVersionInfo().withPackageType("lq") - .withVersion("w") - .withLastUpdated(OffsetDateTime.parse("2021-07-23T09:42:49Z")); + PackageVersionInfo model = new PackageVersionInfo().withPackageType("aebfsyrled") + .withVersion("ustbvtqigdx") + .withLastUpdated(OffsetDateTime.parse("2021-05-12T12:38:19Z")); model = BinaryData.fromObject(model).toObject(PackageVersionInfo.class); - Assertions.assertEquals("lq", model.packageType()); - Assertions.assertEquals("w", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T09:42:49Z"), model.lastUpdated()); + Assertions.assertEquals("aebfsyrled", model.packageType()); + Assertions.assertEquals("ustbvtqigdx", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T12:38:19Z"), model.lastUpdated()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeRemoteSupportSessionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeRemoteSupportSessionTests.java index 441ba6e36574..5159a340bd0f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeRemoteSupportSessionTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeRemoteSupportSessionTests.java @@ -11,7 +11,7 @@ public final class PerNodeRemoteSupportSessionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PerNodeRemoteSupportSession model = BinaryData.fromString( - "{\"sessionStartTime\":\"2021-02-13T18:52:29Z\",\"sessionEndTime\":\"2021-03-05T20:16:51Z\",\"nodeName\":\"sgwbnbbeld\",\"duration\":547140611004295932,\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"io\"}") + "{\"sessionStartTime\":\"2021-02-21T10:02:12Z\",\"sessionEndTime\":\"2021-10-04T02:04:35Z\",\"nodeName\":\"zzmhjrunmpxttd\",\"duration\":5727391604733227130,\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"nkxmyskpbhenbtk\"}") .toObject(PerNodeRemoteSupportSession.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeStateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeStateTests.java index 98c67a8c7825..5fed50546674 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeStateTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PerNodeStateTests.java @@ -11,7 +11,7 @@ public final class PerNodeStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PerNodeState model = BinaryData.fromString( - "{\"name\":\"wgcu\",\"arcInstance\":\"tumkdosvqwhbm\",\"arcNodeServicePrincipalObjectId\":\"bbjfddgmbmbexp\",\"state\":\"Connected\"}") + "{\"name\":\"theotusiv\",\"arcInstance\":\"v\",\"arcNodeServicePrincipalObjectId\":\"iqihn\",\"state\":\"Creating\"}") .toObject(PerNodeState.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PhysicalNodesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PhysicalNodesTests.java index 651957c62bd5..9ee5e622eece 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PhysicalNodesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/PhysicalNodesTests.java @@ -12,16 +12,16 @@ public final class PhysicalNodesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PhysicalNodes model - = BinaryData.fromString("{\"name\":\"xkalla\",\"ipv4Address\":\"elwuipi\"}").toObject(PhysicalNodes.class); - Assertions.assertEquals("xkalla", model.name()); - Assertions.assertEquals("elwuipi", model.ipv4Address()); + = BinaryData.fromString("{\"name\":\"c\",\"ipv4Address\":\"fwdsj\"}").toObject(PhysicalNodes.class); + Assertions.assertEquals("c", model.name()); + Assertions.assertEquals("fwdsj", model.ipv4Address()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PhysicalNodes model = new PhysicalNodes().withName("xkalla").withIpv4Address("elwuipi"); + PhysicalNodes model = new PhysicalNodes().withName("c").withIpv4Address("fwdsj"); model = BinaryData.fromObject(model).toObject(PhysicalNodes.class); - Assertions.assertEquals("xkalla", model.name()); - Assertions.assertEquals("elwuipi", model.ipv4Address()); + Assertions.assertEquals("c", model.name()); + Assertions.assertEquals("fwdsj", model.ipv4Address()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/QosPolicyOverridesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/QosPolicyOverridesTests.java index fb8c2c68a665..6e9f45e47a90 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/QosPolicyOverridesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/QosPolicyOverridesTests.java @@ -12,21 +12,21 @@ public final class QosPolicyOverridesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QosPolicyOverrides model = BinaryData.fromString( - "{\"priorityValue8021Action_Cluster\":\"xwabmqoe\",\"priorityValue8021Action_SMB\":\"ifrvtpu\",\"bandwidthPercentage_SMB\":\"jmqlgkfb\"}") + "{\"priorityValue8021Action_Cluster\":\"hfjx\",\"priorityValue8021Action_SMB\":\"szkkfoqre\",\"bandwidthPercentage_SMB\":\"kzikfjawneaivxwc\"}") .toObject(QosPolicyOverrides.class); - Assertions.assertEquals("xwabmqoe", model.priorityValue8021ActionCluster()); - Assertions.assertEquals("ifrvtpu", model.priorityValue8021ActionSmb()); - Assertions.assertEquals("jmqlgkfb", model.bandwidthPercentageSmb()); + Assertions.assertEquals("hfjx", model.priorityValue8021ActionCluster()); + Assertions.assertEquals("szkkfoqre", model.priorityValue8021ActionSmb()); + Assertions.assertEquals("kzikfjawneaivxwc", model.bandwidthPercentageSmb()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QosPolicyOverrides model = new QosPolicyOverrides().withPriorityValue8021ActionCluster("xwabmqoe") - .withPriorityValue8021ActionSmb("ifrvtpu") - .withBandwidthPercentageSmb("jmqlgkfb"); + QosPolicyOverrides model = new QosPolicyOverrides().withPriorityValue8021ActionCluster("hfjx") + .withPriorityValue8021ActionSmb("szkkfoqre") + .withBandwidthPercentageSmb("kzikfjawneaivxwc"); model = BinaryData.fromObject(model).toObject(QosPolicyOverrides.class); - Assertions.assertEquals("xwabmqoe", model.priorityValue8021ActionCluster()); - Assertions.assertEquals("ifrvtpu", model.priorityValue8021ActionSmb()); - Assertions.assertEquals("jmqlgkfb", model.bandwidthPercentageSmb()); + Assertions.assertEquals("hfjx", model.priorityValue8021ActionCluster()); + Assertions.assertEquals("szkkfoqre", model.priorityValue8021ActionSmb()); + Assertions.assertEquals("kzikfjawneaivxwc", model.bandwidthPercentageSmb()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RawCertificateDataTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RawCertificateDataTests.java index e75d9a6a9cb0..05c24ebaadc2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RawCertificateDataTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RawCertificateDataTests.java @@ -13,16 +13,16 @@ public final class RawCertificateDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RawCertificateData model - = BinaryData.fromString("{\"certificates\":[\"bmnzbtbhjpgl\",\"fgohdneuelfphs\",\"yhtozfikdowwqu\",\"v\"]}") + = BinaryData.fromString("{\"certificates\":[\"u\",\"ivkrtsw\",\"xqzvszjfa\",\"vjfdx\"]}") .toObject(RawCertificateData.class); - Assertions.assertEquals("bmnzbtbhjpgl", model.certificates().get(0)); + Assertions.assertEquals("u", model.certificates().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RawCertificateData model = new RawCertificateData() - .withCertificates(Arrays.asList("bmnzbtbhjpgl", "fgohdneuelfphs", "yhtozfikdowwqu", "v")); + RawCertificateData model + = new RawCertificateData().withCertificates(Arrays.asList("u", "ivkrtsw", "xqzvszjfa", "vjfdx")); model = BinaryData.fromObject(model).toObject(RawCertificateData.class); - Assertions.assertEquals("bmnzbtbhjpgl", model.certificates().get(0)); + Assertions.assertEquals("u", model.certificates().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestPropertiesTests.java index 9bb85a31913f..d434b8186acd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestPropertiesTests.java @@ -13,16 +13,16 @@ public final class ReconcileArcSettingsRequestPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReconcileArcSettingsRequestProperties model - = BinaryData.fromString("{\"clusterNodes\":[\"lefgugnxk\",\"xdqmidtthzrvqdra\",\"hjybigehoqfbo\"]}") + = BinaryData.fromString("{\"clusterNodes\":[\"yxwjkcp\",\"bnwbxgjvtbvpyssz\",\"nruj\",\"guhmuouqfpr\"]}") .toObject(ReconcileArcSettingsRequestProperties.class); - Assertions.assertEquals("lefgugnxk", model.clusterNodes().get(0)); + Assertions.assertEquals("yxwjkcp", model.clusterNodes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ReconcileArcSettingsRequestProperties model = new ReconcileArcSettingsRequestProperties() - .withClusterNodes(Arrays.asList("lefgugnxk", "xdqmidtthzrvqdra", "hjybigehoqfbo")); + .withClusterNodes(Arrays.asList("yxwjkcp", "bnwbxgjvtbvpyssz", "nruj", "guhmuouqfpr")); model = BinaryData.fromObject(model).toObject(ReconcileArcSettingsRequestProperties.class); - Assertions.assertEquals("lefgugnxk", model.clusterNodes().get(0)); + Assertions.assertEquals("yxwjkcp", model.clusterNodes().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestTests.java index 7dff22e11fa2..be3e6ef4d55c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReconcileArcSettingsRequestTests.java @@ -13,17 +13,19 @@ public final class ReconcileArcSettingsRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ReconcileArcSettingsRequest model - = BinaryData.fromString("{\"properties\":{\"clusterNodes\":[\"f\",\"iotkftutqxl\"]}}") - .toObject(ReconcileArcSettingsRequest.class); - Assertions.assertEquals("f", model.properties().clusterNodes().get(0)); + ReconcileArcSettingsRequest model = BinaryData + .fromString( + "{\"properties\":{\"clusterNodes\":[\"lgbquxig\",\"yjgzjaoyfhrtxiln\",\"rkujy\",\"vlejuvfqa\"]}}") + .toObject(ReconcileArcSettingsRequest.class); + Assertions.assertEquals("lgbquxig", model.properties().clusterNodes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ReconcileArcSettingsRequest model = new ReconcileArcSettingsRequest().withProperties( - new ReconcileArcSettingsRequestProperties().withClusterNodes(Arrays.asList("f", "iotkftutqxl"))); + ReconcileArcSettingsRequest model + = new ReconcileArcSettingsRequest().withProperties(new ReconcileArcSettingsRequestProperties() + .withClusterNodes(Arrays.asList("lgbquxig", "yjgzjaoyfhrtxiln", "rkujy", "vlejuvfqa"))); model = BinaryData.fromObject(model).toObject(ReconcileArcSettingsRequest.class); - Assertions.assertEquals("f", model.properties().clusterNodes().get(0)); + Assertions.assertEquals("lgbquxig", model.properties().clusterNodes().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobNodeSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobNodeSettingsTests.java index b80b128568d7..20a4ce96a735 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobNodeSettingsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobNodeSettingsTests.java @@ -11,7 +11,7 @@ public final class RemoteSupportJobNodeSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportJobNodeSettings model = BinaryData.fromString( - "{\"state\":\"zibt\",\"createdAt\":\"2021-12-06T02:46:28Z\",\"updatedAt\":\"2021-02-15T06:11:31Z\",\"connectionStatus\":\"tstvdxeclzedq\",\"connectionErrorMessage\":\"vh\"}") + "{\"state\":\"ohkpigqfu\",\"createdAt\":\"2021-01-29T13:25:56Z\",\"updatedAt\":\"2021-10-25T00:56:26Z\",\"connectionStatus\":\"kwklsnoxaxmq\",\"connectionErrorMessage\":\"alhhjnhgwydyynfs\"}") .toObject(RemoteSupportJobNodeSettings.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobReportedPropertiesTests.java new file mode 100644 index 000000000000..60154cb343a5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportJobReportedPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.azurestackhci.models.RemoteSupportJobReportedProperties; + +public final class RemoteSupportJobReportedPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RemoteSupportJobReportedProperties model = BinaryData.fromString( + "{\"percentComplete\":1026918524,\"validationStatus\":{\"status\":\"htmwwinh\",\"steps\":[{\"name\":\"pofvwb\",\"description\":\"lembnkbwvqvxkdi\",\"fullStepIndex\":\"ihebwtsw\",\"startTimeUtc\":\"uwfmduragegizvc\",\"endTimeUtc\":\"elisdjub\",\"status\":\"bqigkx\",\"steps\":[{\"name\":\"zgakgacyrcmj\",\"description\":\"spofapvuhry\",\"fullStepIndex\":\"iofrzgbzjedmstk\",\"startTimeUtc\":\"l\",\"endTimeUtc\":\"bcuiiz\",\"status\":\"twfans\",\"steps\":[{},{},{},{}],\"exception\":[\"bmikost\",\"z\",\"kiwbuqnyoph\"]},{\"name\":\"yls\",\"description\":\"rpfbcunezz\",\"fullStepIndex\":\"zelfwyfwl\",\"startTimeUtc\":\"jwetnpsihcla\",\"endTimeUtc\":\"va\",\"status\":\"pt\",\"steps\":[{},{}],\"exception\":[\"ztcmwq\",\"chcxwaxfewzj\",\"jexfdeqvhp\"]},{\"name\":\"lkkshkbffmbmx\",\"description\":\"rgywwp\",\"fullStepIndex\":\"xs\",\"startTimeUtc\":\"tf\",\"endTimeUtc\":\"gicgaaoepttaq\",\"status\":\"dewemxswv\",\"steps\":[{},{},{}],\"exception\":[\"zjgehkfkim\",\"tixo\",\"ffqyinlj\"]},{\"name\":\"pqwhixmonst\",\"description\":\"i\",\"fullStepIndex\":\"gvelfc\",\"startTimeUtc\":\"uccbirdsvuw\",\"endTimeUtc\":\"b\",\"status\":\"gstmninwjizciln\",\"steps\":[{},{},{},{}],\"exception\":[\"ejjtbxqmul\"]}],\"exception\":[\"xqzv\",\"ers\"]}]},\"deploymentStatus\":{\"status\":\"ucrwnami\",\"steps\":[{\"name\":\"rqbsmswziq\",\"description\":\"uhok\",\"fullStepIndex\":\"uswhvhczznvfbycj\",\"startTimeUtc\":\"jww\",\"endTimeUtc\":\"z\",\"status\":\"mwmxqhndvnoamld\",\"steps\":[{\"name\":\"ohdjhhflzok\",\"description\":\"ox\",\"fullStepIndex\":\"lnjetaglt\",\"startTimeUtc\":\"oatftgzpnpbswvef\",\"endTimeUtc\":\"ccsrmozihmipgaw\",\"status\":\"xp\",\"steps\":[{},{},{},{}],\"exception\":[\"cjxgrytf\",\"pcycilrmcaykg\",\"noxuztrksx\",\"pndfcpfnznt\"]},{\"name\":\"twk\",\"description\":\"osrxuzvoa\",\"fullStepIndex\":\"tcqiosmg\",\"startTimeUtc\":\"ahgx\",\"endTimeUtc\":\"lyrtltlaprlt\",\"status\":\"atbhjmznn\",\"steps\":[{}],\"exception\":[\"qalarvlagunbtg\"]},{\"name\":\"bwln\",\"description\":\"hyreeu\",\"fullStepIndex\":\"qavbpdqmj\",\"startTimeUtc\":\"yyzglgouwtlmjjy\",\"endTimeUtc\":\"j\",\"status\":\"obaxkjeytu\",\"steps\":[{},{}],\"exception\":[\"kwr\",\"snkq\",\"hsyrqunj\"]},{\"name\":\"denxau\",\"description\":\"pakdkifmjnnawt\",\"fullStepIndex\":\"bpxuckpggqoweyi\",\"startTimeUtc\":\"hlisngw\",\"endTimeUtc\":\"qqmpizruwnpqx\",\"status\":\"iwfcngjsa\",\"steps\":[{},{}],\"exception\":[\"tmkzjvkviirhgfgr\",\"sdp\",\"ra\"]}],\"exception\":[\"zb\",\"lbyvictctbrxkjzw\",\"gxffmshkwf\"]},{\"name\":\"gozxw\",\"description\":\"dby\",\"fullStepIndex\":\"izqaclnapxbiyg\",\"startTimeUtc\":\"gjkn\",\"endTimeUtc\":\"mfcttux\",\"status\":\"yilflqoiquvrehmr\",\"steps\":[{\"name\":\"sujz\",\"description\":\"zytqjtwhauunfpr\",\"fullStepIndex\":\"letlx\",\"startTimeUtc\":\"rpddouifamo\",\"endTimeUtc\":\"z\",\"status\":\"nknlqwzdvpi\",\"steps\":[{},{},{},{}],\"exception\":[\"zdtmaajquhuxylrj\",\"m\",\"ygjbmzyospspsh\"]},{\"name\":\"fkyjpmspbpssdfpp\",\"description\":\"gt\",\"fullStepIndex\":\"yujtvczkcnyx\",\"startTimeUtc\":\"munjdxvglnkvx\",\"endTimeUtc\":\"paglqivbgk\",\"status\":\"khpzvuqdflv\",\"steps\":[{},{}],\"exception\":[\"fpubcpzgpxti\",\"hjknidibg\",\"jxgpnrhgovfg\"]}],\"exception\":[\"qmhhaowj\",\"mzvupor\",\"zdfuydzvkfvxcnqm\"]},{\"name\":\"psw\",\"description\":\"mvkhlggd\",\"fullStepIndex\":\"em\",\"startTimeUtc\":\"kzsz\",\"endTimeUtc\":\"iwtglxxhljfpg\",\"status\":\"crmnzhrgmqgjs\",\"steps\":[{\"name\":\"cbfrm\",\"description\":\"dths\",\"fullStepIndex\":\"gvriibakclac\",\"startTimeUtc\":\"rnxousxauzlwvsg\",\"endTimeUtc\":\"ohqfzizv\",\"status\":\"mmkjsvthnwpztek\",\"steps\":[{},{}],\"exception\":[\"biattgplucfotan\",\"c\"]},{\"name\":\"nykzcugswvxwlm\",\"description\":\"wmvtxnjm\",\"fullStepIndex\":\"cuqudtcvclxy\",\"startTimeUtc\":\"dkvgfabuiyjibuzp\",\"endTimeUtc\":\"ugneikn\",\"status\":\"oxgjiuqhibt\",\"steps\":[{}],\"exception\":[\"wjedmurrxxgew\"]},{\"name\":\"tvqylkmqpzoyhlfb\",\"description\":\"wgcloxoebqinji\",\"fullStepIndex\":\"wjfuj\",\"startTimeUtc\":\"afcba\",\"endTimeUtc\":\"pzpofoiyjw\",\"status\":\"ilkmk\",\"steps\":[{},{}],\"exception\":[\"dndviauogp\",\"uartvti\",\"kyefchnmnahmnxhk\"]},{\"name\":\"qirwrweoox\",\"description\":\"i\",\"fullStepIndex\":\"xwrsnew\",\"startTimeUtc\":\"zqvbubqm\",\"endTimeUtc\":\"hsycxhxzgaz\",\"status\":\"abo\",\"steps\":[{},{},{}],\"exception\":[\"qhppubowsepdfgk\",\"tdherngbtcjuahok\",\"tobkauxofshfph\"]}],\"exception\":[\"ulaiywzejywhs\",\"wkojpllndnpd\",\"rpqaf\",\"fugsnnfhyetefy\"]},{\"name\":\"coc\",\"description\":\"jgtixr\",\"fullStepIndex\":\"zuyt\",\"startTimeUtc\":\"mlmuowol\",\"endTimeUtc\":\"uir\",\"status\":\"ionszonwp\",\"steps\":[{\"name\":\"innixjawrtmjfj\",\"description\":\"ccxlzhcoxovnek\",\"fullStepIndex\":\"nlusfnrd\",\"startTimeUtc\":\"xtxrdcqtjvidt\",\"endTimeUtc\":\"epu\",\"status\":\"vyjtcvu\",\"steps\":[{}],\"exception\":[\"zies\",\"uughtuqfecjxeyg\",\"uhxu\",\"cbuewmrswnjlxuz\"]},{\"name\":\"wpusxjbaqehg\",\"description\":\"ohzjqatucoigeb\",\"fullStepIndex\":\"cnwfepbnwgfmxjg\",\"startTimeUtc\":\"bjb\",\"endTimeUtc\":\"lfgtdysnaquflqbc\",\"status\":\"hamzjrwdkqze\",\"steps\":[{},{},{}],\"exception\":[\"zi\",\"njxdfzantk\",\"cegyamlbnseqacj\",\"vpilg\"]},{\"name\":\"oq\",\"description\":\"gmditgueiookjbs\",\"fullStepIndex\":\"rtdtpdelq\",\"startTimeUtc\":\"slmot\",\"endTimeUtc\":\"bnfxofvc\",\"status\":\"gdirazf\",\"steps\":[{},{},{},{}],\"exception\":[\"ab\"]},{\"name\":\"ujtmvcopexcmjurb\",\"description\":\"hlkyqltqsrog\",\"fullStepIndex\":\"wkffdjkt\",\"startTimeUtc\":\"sidfv\",\"endTimeUtc\":\"g\",\"status\":\"n\",\"steps\":[{}],\"exception\":[\"kbusqo\"]}],\"exception\":[\"ikayiansharuj\",\"ji\",\"xfz\",\"j\"]}]},\"nodeSettings\":{\"state\":\"vwkpqh\",\"createdAt\":\"2021-07-09T12:00:41Z\",\"updatedAt\":\"2021-10-28T18:12:29Z\",\"connectionStatus\":\"gbqe\",\"connectionErrorMessage\":\"ekewvnqvcdlguauc\"},\"sessionDetails\":[{\"sessionId\":\"wnlaxpu\",\"sessionStartTime\":\"2021-08-11T07:22:41Z\",\"sessionEndTime\":\"2021-03-29T08:00:54Z\",\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"vitac\"},{\"sessionId\":\"mfcsserx\",\"sessionStartTime\":\"2021-07-27T01:35:03Z\",\"sessionEndTime\":\"2021-11-15T21:15:02Z\",\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"wntsjgqrsxy\"},{\"sessionId\":\"uuuybnchrsziz\",\"sessionStartTime\":\"2021-08-13T18:21:04Z\",\"sessionEndTime\":\"2021-01-02T08:52:54Z\",\"accessLevel\":\"None\",\"transcriptLocation\":\"ndnbfqy\"},{\"sessionId\":\"agfl\",\"sessionStartTime\":\"2021-08-16T21:07:39Z\",\"sessionEndTime\":\"2021-09-08T12:11:32Z\",\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"hzjmucftbyrp\"}]}") + .toObject(RemoteSupportJobReportedProperties.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportNodeSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportNodeSettingsTests.java index b21ae3f99152..f3f580447ce6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportNodeSettingsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportNodeSettingsTests.java @@ -11,7 +11,7 @@ public final class RemoteSupportNodeSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportNodeSettings model = BinaryData.fromString( - "{\"arcResourceId\":\"gkvtmelmqkrhah\",\"state\":\"juahaquhcdhmdual\",\"createdAt\":\"2021-09-25T15:01:42Z\",\"updatedAt\":\"2021-03-14T13:57:14Z\",\"connectionStatus\":\"fadmws\",\"connectionErrorMessage\":\"r\",\"transcriptLocation\":\"xpvgo\"}") + "{\"arcResourceId\":\"pnq\",\"state\":\"hmgkbrpyy\",\"createdAt\":\"2021-01-23T15:12:07Z\",\"updatedAt\":\"2020-12-25T06:53:33Z\",\"connectionStatus\":\"qqkpikadrg\",\"connectionErrorMessage\":\"qagnbuyn\",\"transcriptLocation\":\"jggmebfsiarbu\"}") .toObject(RemoteSupportNodeSettings.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportPropertiesTests.java index 42e5626c5135..46533566b1bb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportPropertiesTests.java @@ -11,7 +11,7 @@ public final class RemoteSupportPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportProperties model = BinaryData.fromString( - "{\"accessLevel\":\"Diagnostics\",\"expirationTimeStamp\":\"2021-07-13T13:10:02Z\",\"remoteSupportType\":\"Enable\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"lphox\",\"state\":\"crpab\",\"createdAt\":\"2021-05-19T18:27:36Z\",\"updatedAt\":\"2021-06-14T01:08:13Z\",\"connectionStatus\":\"jta\",\"connectionErrorMessage\":\"ugxywpmueef\",\"transcriptLocation\":\"wfqkquj\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-08-09T22:38:08Z\",\"sessionEndTime\":\"2021-08-06T06:20:20Z\",\"nodeName\":\"bglaocqxtccm\",\"duration\":2435462499036948101,\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"lmoyrx\"},{\"sessionStartTime\":\"2021-08-04T10:24:08Z\",\"sessionEndTime\":\"2021-07-05T08:36:14Z\",\"nodeName\":\"pz\",\"duration\":6478150774243714531,\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"lrqjbhckfr\"},{\"sessionStartTime\":\"2021-03-13T18:04:17Z\",\"sessionEndTime\":\"2021-11-29T20:48:55Z\",\"nodeName\":\"kyv\",\"duration\":1245497822937083948,\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"bpzkafkuwbc\"},{\"sessionStartTime\":\"2021-05-07T17:14:51Z\",\"sessionEndTime\":\"2021-12-08T08:00:45Z\",\"nodeName\":\"hhseyv\",\"duration\":5056571461891526745,\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"hspkdeemao\"}],\"remoteSupportProvisioningState\":\"None\"}") + "{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-11-25T14:54:19Z\",\"remoteSupportType\":\"Enable\",\"remoteSupportNodeSettings\":[{\"arcResourceId\":\"fyhxde\",\"state\":\"jzicwifsjt\",\"createdAt\":\"2021-05-15T05:25:36Z\",\"updatedAt\":\"2021-01-09T20:44:17Z\",\"connectionStatus\":\"shcbkhajdeyeamdp\",\"connectionErrorMessage\":\"g\",\"transcriptLocation\":\"pbuxwgipwhon\"},{\"arcResourceId\":\"kgshwa\",\"state\":\"ixzbinjeputtmryw\",\"createdAt\":\"2021-04-17T17:28:27Z\",\"updatedAt\":\"2021-04-28T10:57:32Z\",\"connectionStatus\":\"iyqzrnk\",\"connectionErrorMessage\":\"vyxlwhzlsicohoqq\",\"transcriptLocation\":\"vlryavwhheunmmq\"},{\"arcResourceId\":\"yxzk\",\"state\":\"ocukoklyax\",\"createdAt\":\"2021-06-15T16:54:54Z\",\"updatedAt\":\"2021-08-29T22:44:57Z\",\"connectionStatus\":\"szfkbe\",\"connectionErrorMessage\":\"ewrmjmwvvjektc\",\"transcriptLocation\":\"enhwlrs\"},{\"arcResourceId\":\"rzpwvlqdqgbiq\",\"state\":\"ihkaetcktvfc\",\"createdAt\":\"2021-07-13T01:18:13Z\",\"updatedAt\":\"2021-09-20T06:05:50Z\",\"connectionStatus\":\"ymuctqhjfbebrj\",\"connectionErrorMessage\":\"erfuwuttt\",\"transcriptLocation\":\"vjrbirphxepcyvah\"}],\"remoteSupportSessionDetails\":[{\"sessionStartTime\":\"2021-05-16T05:23:49Z\",\"sessionEndTime\":\"2021-01-31T22:23:26Z\",\"nodeName\":\"j\",\"duration\":8484849300760600701,\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"dokgjl\"},{\"sessionStartTime\":\"2021-09-19T17:18:46Z\",\"sessionEndTime\":\"2021-06-21T09:19:47Z\",\"nodeName\":\"cltbgsncghkjesz\",\"duration\":4319774285609495271,\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"xfvgxbfsmxne\"},{\"sessionStartTime\":\"2021-06-27T07:15:28Z\",\"sessionEndTime\":\"2021-08-21T22:28:45Z\",\"nodeName\":\"xgodebfqkkrbmp\",\"duration\":2258346716262102949,\"accessLevel\":\"DiagnosticsAndRepair\",\"transcriptLocation\":\"lzlfbxzpuz\"}],\"remoteSupportProvisioningState\":\"GrantInProgress\"}") .toObject(RemoteSupportProperties.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestPropertiesTests.java index 52850b4b555a..48e0e621caaf 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestPropertiesTests.java @@ -14,19 +14,19 @@ public final class RemoteSupportRequestPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportRequestProperties model = BinaryData.fromString( - "{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-07-02T08:11:46Z\",\"remoteSupportType\":\"Revoke\"}") + "{\"accessLevel\":\"Diagnostics\",\"expirationTimeStamp\":\"2021-09-05T10:31:13Z\",\"remoteSupportType\":\"Enable\"}") .toObject(RemoteSupportRequestProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T08:11:46Z"), model.expirationTimestamp()); - Assertions.assertEquals(RemoteSupportType.REVOKE, model.remoteSupportType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T10:31:13Z"), model.expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.ENABLE, model.remoteSupportType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RemoteSupportRequestProperties model - = new RemoteSupportRequestProperties().withExpirationTimestamp(OffsetDateTime.parse("2021-07-02T08:11:46Z")) - .withRemoteSupportType(RemoteSupportType.REVOKE); + = new RemoteSupportRequestProperties().withExpirationTimestamp(OffsetDateTime.parse("2021-09-05T10:31:13Z")) + .withRemoteSupportType(RemoteSupportType.ENABLE); model = BinaryData.fromObject(model).toObject(RemoteSupportRequestProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T08:11:46Z"), model.expirationTimestamp()); - Assertions.assertEquals(RemoteSupportType.REVOKE, model.remoteSupportType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T10:31:13Z"), model.expirationTimestamp()); + Assertions.assertEquals(RemoteSupportType.ENABLE, model.remoteSupportType()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestTests.java index d42e5ce2021f..d1eaf20ec252 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportRequestTests.java @@ -15,19 +15,19 @@ public final class RemoteSupportRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportRequest model = BinaryData.fromString( - "{\"properties\":{\"accessLevel\":\"Diagnostics\",\"expirationTimeStamp\":\"2021-08-11T14:17:34Z\",\"remoteSupportType\":\"Enable\"}}") + "{\"properties\":{\"accessLevel\":\"DiagnosticsAndRepair\",\"expirationTimeStamp\":\"2021-09-23T00:43:42Z\",\"remoteSupportType\":\"Enable\"}}") .toObject(RemoteSupportRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T14:17:34Z"), model.properties().expirationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T00:43:42Z"), model.properties().expirationTimestamp()); Assertions.assertEquals(RemoteSupportType.ENABLE, model.properties().remoteSupportType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RemoteSupportRequest model = new RemoteSupportRequest().withProperties( - new RemoteSupportRequestProperties().withExpirationTimestamp(OffsetDateTime.parse("2021-08-11T14:17:34Z")) + new RemoteSupportRequestProperties().withExpirationTimestamp(OffsetDateTime.parse("2021-09-23T00:43:42Z")) .withRemoteSupportType(RemoteSupportType.ENABLE)); model = BinaryData.fromObject(model).toObject(RemoteSupportRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T14:17:34Z"), model.properties().expirationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T00:43:42Z"), model.properties().expirationTimestamp()); Assertions.assertEquals(RemoteSupportType.ENABLE, model.properties().remoteSupportType()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportSessionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportSessionTests.java index cceec31fb483..ed303eeec007 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportSessionTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RemoteSupportSessionTests.java @@ -11,7 +11,7 @@ public final class RemoteSupportSessionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RemoteSupportSession model = BinaryData.fromString( - "{\"sessionId\":\"h\",\"sessionStartTime\":\"2021-02-21T17:52:27Z\",\"sessionEndTime\":\"2021-07-07T17:09:43Z\",\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"wwqfbumlkxtrqj\"}") + "{\"sessionId\":\"hgbvqtan\",\"sessionStartTime\":\"2021-01-09T06:54:15Z\",\"sessionEndTime\":\"2021-10-28T03:20:51Z\",\"accessLevel\":\"Diagnostics\",\"transcriptLocation\":\"hp\"}") .toObject(RemoteSupportSession.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RepairServerJobServerDetailsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RepairServerJobServerDetailsTests.java deleted file mode 100644 index 63d33dedaa74..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RepairServerJobServerDetailsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.RepairServerJobServerDetails; -import org.junit.jupiter.api.Assertions; - -public final class RepairServerJobServerDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RepairServerJobServerDetails model - = BinaryData.fromString("{\"serverName\":\"yese\",\"serverResourceId\":\"ugc\"}") - .toObject(RepairServerJobServerDetails.class); - Assertions.assertEquals("yese", model.serverName()); - Assertions.assertEquals("ugc", model.serverResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RepairServerJobServerDetails model - = new RepairServerJobServerDetails().withServerName("yese").withServerResourceId("ugc"); - model = BinaryData.fromObject(model).toObject(RepairServerJobServerDetails.class); - Assertions.assertEquals("yese", model.serverName()); - Assertions.assertEquals("ugc", model.serverResourceId()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReportedPropertiesTests.java index 5d99e8d784c4..ec644936a3ad 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReportedPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ReportedPropertiesTests.java @@ -11,7 +11,7 @@ public final class ReportedPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReportedProperties model = BinaryData.fromString( - "{\"deviceState\":\"Connected\",\"extensionProfile\":{\"extensions\":[{\"extensionName\":\"czbgomfgbeg\",\"state\":\"Updating\",\"errorDetails\":[{\"exception\":\"hibetnluankrr\"},{\"exception\":\"eeebtijvacv\"}],\"extensionResourceId\":\"qzbqqxlajrnwxa\",\"typeHandlerVersion\":\"veh\",\"managedBy\":\"User\"},{\"extensionName\":\"xoafgaoqltfae\",\"state\":\"Deleted\",\"errorDetails\":[{\"exception\":\"gv\"},{\"exception\":\"r\"},{\"exception\":\"hriypoqeyhlqhy\"},{\"exception\":\"rlpyznuciqdsmexi\"}],\"extensionResourceId\":\"dfuxtya\",\"typeHandlerVersion\":\"ibmi\",\"managedBy\":\"User\"}]},\"lastSyncTimestamp\":\"2021-11-04T01:45:47Z\"}") + "{\"deviceState\":\"Disconnected\",\"extensionProfile\":{\"extensions\":[{\"extensionName\":\"gzwx\",\"state\":\"Moving\",\"errorDetails\":[{\"exception\":\"og\"},{\"exception\":\"zyvneezaifghtmo\"},{\"exception\":\"tlffhzbkr\"}],\"extensionResourceId\":\"jjavfq\",\"typeHandlerVersion\":\"hnqoewdo\",\"managedBy\":\"User\"},{\"extensionName\":\"tesypvidbztjh\",\"state\":\"Moving\",\"errorDetails\":[{\"exception\":\"nynkbwet\"},{\"exception\":\"uhpsprkzyaupia\"},{\"exception\":\"xnafbw\"},{\"exception\":\"oohtuovmaonurjtu\"}],\"extensionResourceId\":\"hihpvecmsl\",\"typeHandlerVersion\":\"bl\",\"managedBy\":\"Azure\"},{\"extensionName\":\"tbsjuscvsf\",\"state\":\"NotSpecified\",\"errorDetails\":[{\"exception\":\"gxuupbezqccydrtc\"},{\"exception\":\"kdqkkyihzt\"},{\"exception\":\"qm\"},{\"exception\":\"zgwldoychillcec\"}],\"extensionResourceId\":\"huwaoaguhic\",\"typeHandlerVersion\":\"lizst\",\"managedBy\":\"User\"},{\"extensionName\":\"vhrweftkwqejpmv\",\"state\":\"Accepted\",\"errorDetails\":[{\"exception\":\"pwamcxtczhupeuk\"},{\"exception\":\"jduyyespydjfb\"},{\"exception\":\"yv\"}],\"extensionResourceId\":\"ulrtywikdmh\",\"typeHandlerVersion\":\"kuflgbh\",\"managedBy\":\"Azure\"}]},\"lastSyncTimestamp\":\"2021-03-07T09:54:18Z\"}") .toObject(ReportedProperties.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanAdapterIPConfigTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanAdapterIPConfigTests.java index ea63da870328..3181285bdfd7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanAdapterIPConfigTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanAdapterIPConfigTests.java @@ -12,24 +12,24 @@ public final class SanAdapterIPConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SanAdapterIPConfig model = BinaryData.fromString( - "{\"name\":\"fvpdbo\",\"networkAdapterName\":\"cizsjqlhkrribdei\",\"vlanId\":1262026177,\"addressPrefix\":\"qkgh\"}") + "{\"name\":\"hemms\",\"networkAdapterName\":\"dkcrodt\",\"vlanId\":1997229408,\"addressPrefix\":\"wj\"}") .toObject(SanAdapterIPConfig.class); - Assertions.assertEquals("fvpdbo", model.name()); - Assertions.assertEquals("cizsjqlhkrribdei", model.networkAdapterName()); - Assertions.assertEquals(1262026177, model.vlanId()); - Assertions.assertEquals("qkgh", model.addressPrefix()); + Assertions.assertEquals("hemms", model.name()); + Assertions.assertEquals("dkcrodt", model.networkAdapterName()); + Assertions.assertEquals(1997229408, model.vlanId()); + Assertions.assertEquals("wj", model.addressPrefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SanAdapterIPConfig model = new SanAdapterIPConfig().withName("fvpdbo") - .withNetworkAdapterName("cizsjqlhkrribdei") - .withVlanId(1262026177) - .withAddressPrefix("qkgh"); + SanAdapterIPConfig model = new SanAdapterIPConfig().withName("hemms") + .withNetworkAdapterName("dkcrodt") + .withVlanId(1997229408) + .withAddressPrefix("wj"); model = BinaryData.fromObject(model).toObject(SanAdapterIPConfig.class); - Assertions.assertEquals("fvpdbo", model.name()); - Assertions.assertEquals("cizsjqlhkrribdei", model.networkAdapterName()); - Assertions.assertEquals(1262026177, model.vlanId()); - Assertions.assertEquals("qkgh", model.addressPrefix()); + Assertions.assertEquals("hemms", model.name()); + Assertions.assertEquals("dkcrodt", model.networkAdapterName()); + Assertions.assertEquals(1997229408, model.vlanId()); + Assertions.assertEquals("wj", model.addressPrefix()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanAdapterPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanAdapterPropertiesTests.java index 071f147c2663..3a51b0603ec4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanAdapterPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanAdapterPropertiesTests.java @@ -12,24 +12,24 @@ public final class SanAdapterPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SanAdapterProperties model = BinaryData.fromString( - "{\"priorityValue8021ActionCluster\":1597116231,\"priorityValue8021ActionSmb\":351776134,\"bandwidthPercentageSmb\":425671915,\"jumboPacket\":185014481}") + "{\"priorityValue8021ActionCluster\":445064797,\"priorityValue8021ActionSmb\":2101936696,\"bandwidthPercentageSmb\":1225956555,\"jumboPacket\":2091031438}") .toObject(SanAdapterProperties.class); - Assertions.assertEquals(1597116231, model.priorityValue8021ActionCluster()); - Assertions.assertEquals(351776134, model.priorityValue8021ActionSmb()); - Assertions.assertEquals(425671915, model.bandwidthPercentageSmb()); - Assertions.assertEquals(185014481, model.jumboPacket()); + Assertions.assertEquals(445064797, model.priorityValue8021ActionCluster()); + Assertions.assertEquals(2101936696, model.priorityValue8021ActionSmb()); + Assertions.assertEquals(1225956555, model.bandwidthPercentageSmb()); + Assertions.assertEquals(2091031438, model.jumboPacket()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SanAdapterProperties model = new SanAdapterProperties().withPriorityValue8021ActionCluster(1597116231) - .withPriorityValue8021ActionSmb(351776134) - .withBandwidthPercentageSmb(425671915) - .withJumboPacket(185014481); + SanAdapterProperties model = new SanAdapterProperties().withPriorityValue8021ActionCluster(445064797) + .withPriorityValue8021ActionSmb(2101936696) + .withBandwidthPercentageSmb(1225956555) + .withJumboPacket(2091031438); model = BinaryData.fromObject(model).toObject(SanAdapterProperties.class); - Assertions.assertEquals(1597116231, model.priorityValue8021ActionCluster()); - Assertions.assertEquals(351776134, model.priorityValue8021ActionSmb()); - Assertions.assertEquals(425671915, model.bandwidthPercentageSmb()); - Assertions.assertEquals(185014481, model.jumboPacket()); + Assertions.assertEquals(445064797, model.priorityValue8021ActionCluster()); + Assertions.assertEquals(2101936696, model.priorityValue8021ActionSmb()); + Assertions.assertEquals(1225956555, model.bandwidthPercentageSmb()); + Assertions.assertEquals(2091031438, model.jumboPacket()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanClusterNetworkConfigTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanClusterNetworkConfigTests.java index a7b064d2eae6..55ce3494ec0a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanClusterNetworkConfigTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanClusterNetworkConfigTests.java @@ -15,50 +15,42 @@ public final class SanClusterNetworkConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SanClusterNetworkConfig model = BinaryData.fromString( - "{\"adapterProperties\":{\"priorityValue8021ActionCluster\":1411475506,\"priorityValue8021ActionSmb\":94882707,\"bandwidthPercentageSmb\":1329412149,\"jumboPacket\":172588492},\"adapterIPConfig\":[{\"name\":\"gytguslfead\",\"networkAdapterName\":\"gq\",\"vlanId\":860507177,\"addressPrefix\":\"ejhzisxg\"},{\"name\":\"elolppvksrpqvuj\",\"networkAdapterName\":\"aehtwd\",\"vlanId\":1778813982,\"addressPrefix\":\"swibyr\"},{\"name\":\"l\",\"networkAdapterName\":\"shfwpracstwity\",\"vlanId\":56359046,\"addressPrefix\":\"xccedcpnmdyodn\"},{\"name\":\"xltjcvnhltiu\",\"networkAdapterName\":\"xnavvwxq\",\"vlanId\":165046754,\"addressPrefix\":\"unyowxwl\"}]}") + "{\"adapterProperties\":{\"priorityValue8021ActionCluster\":965192802,\"priorityValue8021ActionSmb\":1150856748,\"bandwidthPercentageSmb\":1389326915,\"jumboPacket\":1580176854},\"adapterIPConfig\":[{\"name\":\"vpdtiirqtdqoa\",\"networkAdapterName\":\"r\",\"vlanId\":1201300359,\"addressPrefix\":\"squyfxrxxlep\"},{\"name\":\"amxjezwlw\",\"networkAdapterName\":\"xuqlcvydypat\",\"vlanId\":350928008,\"addressPrefix\":\"ojknio\"}]}") .toObject(SanClusterNetworkConfig.class); - Assertions.assertEquals(1411475506, model.adapterProperties().priorityValue8021ActionCluster()); - Assertions.assertEquals(94882707, model.adapterProperties().priorityValue8021ActionSmb()); - Assertions.assertEquals(1329412149, model.adapterProperties().bandwidthPercentageSmb()); - Assertions.assertEquals(172588492, model.adapterProperties().jumboPacket()); - Assertions.assertEquals("gytguslfead", model.adapterIPConfig().get(0).name()); - Assertions.assertEquals("gq", model.adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(860507177, model.adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("ejhzisxg", model.adapterIPConfig().get(0).addressPrefix()); + Assertions.assertEquals(965192802, model.adapterProperties().priorityValue8021ActionCluster()); + Assertions.assertEquals(1150856748, model.adapterProperties().priorityValue8021ActionSmb()); + Assertions.assertEquals(1389326915, model.adapterProperties().bandwidthPercentageSmb()); + Assertions.assertEquals(1580176854, model.adapterProperties().jumboPacket()); + Assertions.assertEquals("vpdtiirqtdqoa", model.adapterIPConfig().get(0).name()); + Assertions.assertEquals("r", model.adapterIPConfig().get(0).networkAdapterName()); + Assertions.assertEquals(1201300359, model.adapterIPConfig().get(0).vlanId()); + Assertions.assertEquals("squyfxrxxlep", model.adapterIPConfig().get(0).addressPrefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SanClusterNetworkConfig model = new SanClusterNetworkConfig() - .withAdapterProperties(new SanAdapterProperties().withPriorityValue8021ActionCluster(1411475506) - .withPriorityValue8021ActionSmb(94882707) - .withBandwidthPercentageSmb(1329412149) - .withJumboPacket(172588492)) + .withAdapterProperties(new SanAdapterProperties().withPriorityValue8021ActionCluster(965192802) + .withPriorityValue8021ActionSmb(1150856748) + .withBandwidthPercentageSmb(1389326915) + .withJumboPacket(1580176854)) .withAdapterIPConfig(Arrays.asList( - new SanAdapterIPConfig().withName("gytguslfead") - .withNetworkAdapterName("gq") - .withVlanId(860507177) - .withAddressPrefix("ejhzisxg"), - new SanAdapterIPConfig().withName("elolppvksrpqvuj") - .withNetworkAdapterName("aehtwd") - .withVlanId(1778813982) - .withAddressPrefix("swibyr"), - new SanAdapterIPConfig().withName("l") - .withNetworkAdapterName("shfwpracstwity") - .withVlanId(56359046) - .withAddressPrefix("xccedcpnmdyodn"), - new SanAdapterIPConfig().withName("xltjcvnhltiu") - .withNetworkAdapterName("xnavvwxq") - .withVlanId(165046754) - .withAddressPrefix("unyowxwl"))); + new SanAdapterIPConfig().withName("vpdtiirqtdqoa") + .withNetworkAdapterName("r") + .withVlanId(1201300359) + .withAddressPrefix("squyfxrxxlep"), + new SanAdapterIPConfig().withName("amxjezwlw") + .withNetworkAdapterName("xuqlcvydypat") + .withVlanId(350928008) + .withAddressPrefix("ojknio"))); model = BinaryData.fromObject(model).toObject(SanClusterNetworkConfig.class); - Assertions.assertEquals(1411475506, model.adapterProperties().priorityValue8021ActionCluster()); - Assertions.assertEquals(94882707, model.adapterProperties().priorityValue8021ActionSmb()); - Assertions.assertEquals(1329412149, model.adapterProperties().bandwidthPercentageSmb()); - Assertions.assertEquals(172588492, model.adapterProperties().jumboPacket()); - Assertions.assertEquals("gytguslfead", model.adapterIPConfig().get(0).name()); - Assertions.assertEquals("gq", model.adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(860507177, model.adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("ejhzisxg", model.adapterIPConfig().get(0).addressPrefix()); + Assertions.assertEquals(965192802, model.adapterProperties().priorityValue8021ActionCluster()); + Assertions.assertEquals(1150856748, model.adapterProperties().priorityValue8021ActionSmb()); + Assertions.assertEquals(1389326915, model.adapterProperties().bandwidthPercentageSmb()); + Assertions.assertEquals(1580176854, model.adapterProperties().jumboPacket()); + Assertions.assertEquals("vpdtiirqtdqoa", model.adapterIPConfig().get(0).name()); + Assertions.assertEquals("r", model.adapterIPConfig().get(0).networkAdapterName()); + Assertions.assertEquals(1201300359, model.adapterIPConfig().get(0).vlanId()); + Assertions.assertEquals("squyfxrxxlep", model.adapterIPConfig().get(0).addressPrefix()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanNetworksTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanNetworksTests.java index 5a405be3578a..bccaad72f1c8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanNetworksTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SanNetworksTests.java @@ -16,56 +16,56 @@ public final class SanNetworksTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SanNetworks model = BinaryData.fromString( - "{\"clusterNetworkConfig\":{\"adapterProperties\":{\"priorityValue8021ActionCluster\":840228808,\"priorityValue8021ActionSmb\":127978460,\"bandwidthPercentageSmb\":328261823,\"jumboPacket\":349751254},\"adapterIPConfig\":[{\"name\":\"rtwaenuuzko\",\"networkAdapterName\":\"minrfdw\",\"vlanId\":1704063633,\"addressPrefix\":\"hziuiefozbhdms\"},{\"name\":\"mzqhoftrmaequi\",\"networkAdapterName\":\"xicslfao\",\"vlanId\":1934851491,\"addressPrefix\":\"yylhalnswhccsp\"},{\"name\":\"aivwitqscywu\",\"networkAdapterName\":\"woluhczbwemhair\",\"vlanId\":538424722,\"addressPrefix\":\"z\"},{\"name\":\"msweypqwdxggicc\",\"networkAdapterName\":\"xqhuexm\",\"vlanId\":735026566,\"addressPrefix\":\"stvlzywemhzrnc\"}]}}") + "{\"clusterNetworkConfig\":{\"adapterProperties\":{\"priorityValue8021ActionCluster\":1081662268,\"priorityValue8021ActionSmb\":535447173,\"bandwidthPercentageSmb\":88116741,\"jumboPacket\":999279087},\"adapterIPConfig\":[{\"name\":\"ugjhky\",\"networkAdapterName\":\"beddgssofw\",\"vlanId\":1153520576,\"addressPrefix\":\"alkrmn\"},{\"name\":\"jpxac\",\"networkAdapterName\":\"udfnbyxba\",\"vlanId\":1598677133,\"addressPrefix\":\"yvayffimrzr\"},{\"name\":\"zqogse\",\"networkAdapterName\":\"evfdnwnwm\",\"vlanId\":473497877,\"addressPrefix\":\"yyceuzsoi\"},{\"name\":\"ud\",\"networkAdapterName\":\"rx\",\"vlanId\":1839855586,\"addressPrefix\":\"zvaytdwkqbr\"}]}}") .toObject(SanNetworks.class); - Assertions.assertEquals(840228808, + Assertions.assertEquals(1081662268, model.clusterNetworkConfig().adapterProperties().priorityValue8021ActionCluster()); - Assertions.assertEquals(127978460, + Assertions.assertEquals(535447173, model.clusterNetworkConfig().adapterProperties().priorityValue8021ActionSmb()); - Assertions.assertEquals(328261823, model.clusterNetworkConfig().adapterProperties().bandwidthPercentageSmb()); - Assertions.assertEquals(349751254, model.clusterNetworkConfig().adapterProperties().jumboPacket()); - Assertions.assertEquals("rtwaenuuzko", model.clusterNetworkConfig().adapterIPConfig().get(0).name()); - Assertions.assertEquals("minrfdw", model.clusterNetworkConfig().adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(1704063633, model.clusterNetworkConfig().adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("hziuiefozbhdms", - model.clusterNetworkConfig().adapterIPConfig().get(0).addressPrefix()); + Assertions.assertEquals(88116741, model.clusterNetworkConfig().adapterProperties().bandwidthPercentageSmb()); + Assertions.assertEquals(999279087, model.clusterNetworkConfig().adapterProperties().jumboPacket()); + Assertions.assertEquals("ugjhky", model.clusterNetworkConfig().adapterIPConfig().get(0).name()); + Assertions.assertEquals("beddgssofw", + model.clusterNetworkConfig().adapterIPConfig().get(0).networkAdapterName()); + Assertions.assertEquals(1153520576, model.clusterNetworkConfig().adapterIPConfig().get(0).vlanId()); + Assertions.assertEquals("alkrmn", model.clusterNetworkConfig().adapterIPConfig().get(0).addressPrefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SanNetworks model = new SanNetworks().withClusterNetworkConfig(new SanClusterNetworkConfig() - .withAdapterProperties(new SanAdapterProperties().withPriorityValue8021ActionCluster(840228808) - .withPriorityValue8021ActionSmb(127978460) - .withBandwidthPercentageSmb(328261823) - .withJumboPacket(349751254)) + .withAdapterProperties(new SanAdapterProperties().withPriorityValue8021ActionCluster(1081662268) + .withPriorityValue8021ActionSmb(535447173) + .withBandwidthPercentageSmb(88116741) + .withJumboPacket(999279087)) .withAdapterIPConfig(Arrays.asList( - new SanAdapterIPConfig().withName("rtwaenuuzko") - .withNetworkAdapterName("minrfdw") - .withVlanId(1704063633) - .withAddressPrefix("hziuiefozbhdms"), - new SanAdapterIPConfig().withName("mzqhoftrmaequi") - .withNetworkAdapterName("xicslfao") - .withVlanId(1934851491) - .withAddressPrefix("yylhalnswhccsp"), - new SanAdapterIPConfig().withName("aivwitqscywu") - .withNetworkAdapterName("woluhczbwemhair") - .withVlanId(538424722) - .withAddressPrefix("z"), - new SanAdapterIPConfig().withName("msweypqwdxggicc") - .withNetworkAdapterName("xqhuexm") - .withVlanId(735026566) - .withAddressPrefix("stvlzywemhzrnc")))); + new SanAdapterIPConfig().withName("ugjhky") + .withNetworkAdapterName("beddgssofw") + .withVlanId(1153520576) + .withAddressPrefix("alkrmn"), + new SanAdapterIPConfig().withName("jpxac") + .withNetworkAdapterName("udfnbyxba") + .withVlanId(1598677133) + .withAddressPrefix("yvayffimrzr"), + new SanAdapterIPConfig().withName("zqogse") + .withNetworkAdapterName("evfdnwnwm") + .withVlanId(473497877) + .withAddressPrefix("yyceuzsoi"), + new SanAdapterIPConfig().withName("ud") + .withNetworkAdapterName("rx") + .withVlanId(1839855586) + .withAddressPrefix("zvaytdwkqbr")))); model = BinaryData.fromObject(model).toObject(SanNetworks.class); - Assertions.assertEquals(840228808, + Assertions.assertEquals(1081662268, model.clusterNetworkConfig().adapterProperties().priorityValue8021ActionCluster()); - Assertions.assertEquals(127978460, + Assertions.assertEquals(535447173, model.clusterNetworkConfig().adapterProperties().priorityValue8021ActionSmb()); - Assertions.assertEquals(328261823, model.clusterNetworkConfig().adapterProperties().bandwidthPercentageSmb()); - Assertions.assertEquals(349751254, model.clusterNetworkConfig().adapterProperties().jumboPacket()); - Assertions.assertEquals("rtwaenuuzko", model.clusterNetworkConfig().adapterIPConfig().get(0).name()); - Assertions.assertEquals("minrfdw", model.clusterNetworkConfig().adapterIPConfig().get(0).networkAdapterName()); - Assertions.assertEquals(1704063633, model.clusterNetworkConfig().adapterIPConfig().get(0).vlanId()); - Assertions.assertEquals("hziuiefozbhdms", - model.clusterNetworkConfig().adapterIPConfig().get(0).addressPrefix()); + Assertions.assertEquals(88116741, model.clusterNetworkConfig().adapterProperties().bandwidthPercentageSmb()); + Assertions.assertEquals(999279087, model.clusterNetworkConfig().adapterProperties().jumboPacket()); + Assertions.assertEquals("ugjhky", model.clusterNetworkConfig().adapterIPConfig().get(0).name()); + Assertions.assertEquals("beddgssofw", + model.clusterNetworkConfig().adapterIPConfig().get(0).networkAdapterName()); + Assertions.assertEquals(1153520576, model.clusterNetworkConfig().adapterIPConfig().get(0).vlanId()); + Assertions.assertEquals("alkrmn", model.clusterNetworkConfig().adapterIPConfig().get(0).addressPrefix()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbeDeploymentInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbeDeploymentInfoTests.java index ccb2e5ff7a94..e0f0da25d4e7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbeDeploymentInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbeDeploymentInfoTests.java @@ -13,27 +13,27 @@ public final class SbeDeploymentInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SbeDeploymentInfo model = BinaryData.fromString( - "{\"version\":\"gofel\",\"family\":\"grqmqhldvrii\",\"publisher\":\"jnalghf\",\"sbeManifestSource\":\"tvsexsowuel\",\"sbeManifestCreationDate\":\"2021-11-06T19:32:24Z\"}") + "{\"version\":\"ifrvtpu\",\"family\":\"jmqlgkfb\",\"publisher\":\"doaon\",\"sbeManifestSource\":\"jcntuj\",\"sbeManifestCreationDate\":\"2021-09-05T12:18:35Z\"}") .toObject(SbeDeploymentInfo.class); - Assertions.assertEquals("gofel", model.version()); - Assertions.assertEquals("grqmqhldvrii", model.family()); - Assertions.assertEquals("jnalghf", model.publisher()); - Assertions.assertEquals("tvsexsowuel", model.sbeManifestSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T19:32:24Z"), model.sbeManifestCreationDate()); + Assertions.assertEquals("ifrvtpu", model.version()); + Assertions.assertEquals("jmqlgkfb", model.family()); + Assertions.assertEquals("doaon", model.publisher()); + Assertions.assertEquals("jcntuj", model.sbeManifestSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T12:18:35Z"), model.sbeManifestCreationDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SbeDeploymentInfo model = new SbeDeploymentInfo().withVersion("gofel") - .withFamily("grqmqhldvrii") - .withPublisher("jnalghf") - .withSbeManifestSource("tvsexsowuel") - .withSbeManifestCreationDate(OffsetDateTime.parse("2021-11-06T19:32:24Z")); + SbeDeploymentInfo model = new SbeDeploymentInfo().withVersion("ifrvtpu") + .withFamily("jmqlgkfb") + .withPublisher("doaon") + .withSbeManifestSource("jcntuj") + .withSbeManifestCreationDate(OffsetDateTime.parse("2021-09-05T12:18:35Z")); model = BinaryData.fromObject(model).toObject(SbeDeploymentInfo.class); - Assertions.assertEquals("gofel", model.version()); - Assertions.assertEquals("grqmqhldvrii", model.family()); - Assertions.assertEquals("jnalghf", model.publisher()); - Assertions.assertEquals("tvsexsowuel", model.sbeManifestSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T19:32:24Z"), model.sbeManifestCreationDate()); + Assertions.assertEquals("ifrvtpu", model.version()); + Assertions.assertEquals("jmqlgkfb", model.family()); + Assertions.assertEquals("doaon", model.publisher()); + Assertions.assertEquals("jcntuj", model.sbeManifestSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T12:18:35Z"), model.sbeManifestCreationDate()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbePartnerPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbePartnerPropertiesTests.java index d9774c31f8a3..d8268eea40b7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbePartnerPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SbePartnerPropertiesTests.java @@ -11,17 +11,17 @@ public final class SbePartnerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SbePartnerProperties model = BinaryData.fromString("{\"name\":\"ahhxvrh\",\"value\":\"kwpjgwwspughftqs\"}") - .toObject(SbePartnerProperties.class); - Assertions.assertEquals("ahhxvrh", model.name()); - Assertions.assertEquals("kwpjgwwspughftqs", model.value()); + SbePartnerProperties model + = BinaryData.fromString("{\"name\":\"ed\",\"value\":\"wwa\"}").toObject(SbePartnerProperties.class); + Assertions.assertEquals("ed", model.name()); + Assertions.assertEquals("wwa", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SbePartnerProperties model = new SbePartnerProperties().withName("ahhxvrh").withValue("kwpjgwwspughftqs"); + SbePartnerProperties model = new SbePartnerProperties().withName("ed").withValue("wwa"); model = BinaryData.fromObject(model).toObject(SbePartnerProperties.class); - Assertions.assertEquals("ahhxvrh", model.name()); - Assertions.assertEquals("kwpjgwwspughftqs", model.value()); + Assertions.assertEquals("ed", model.name()); + Assertions.assertEquals("wwa", model.value()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnIntegrationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnIntegrationTests.java index 057f6064a4a7..d5a6143ebb3d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnIntegrationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnIntegrationTests.java @@ -13,22 +13,22 @@ public final class SdnIntegrationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SdnIntegration model = BinaryData.fromString( - "{\"networkController\":{\"macAddressPoolStart\":\"dzwmkrefajpj\",\"macAddressPoolStop\":\"wkqnyhg\",\"networkVirtualizationEnabled\":false}}") + "{\"networkController\":{\"macAddressPoolStart\":\"tkacj\",\"macAddressPoolStop\":\"f\",\"networkVirtualizationEnabled\":false}}") .toObject(SdnIntegration.class); - Assertions.assertEquals("dzwmkrefajpj", model.networkController().macAddressPoolStart()); - Assertions.assertEquals("wkqnyhg", model.networkController().macAddressPoolStop()); + Assertions.assertEquals("tkacj", model.networkController().macAddressPoolStart()); + Assertions.assertEquals("f", model.networkController().macAddressPoolStop()); Assertions.assertFalse(model.networkController().networkVirtualizationEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SdnIntegration model - = new SdnIntegration().withNetworkController(new NetworkController().withMacAddressPoolStart("dzwmkrefajpj") - .withMacAddressPoolStop("wkqnyhg") + = new SdnIntegration().withNetworkController(new NetworkController().withMacAddressPoolStart("tkacj") + .withMacAddressPoolStop("f") .withNetworkVirtualizationEnabled(false)); model = BinaryData.fromObject(model).toObject(SdnIntegration.class); - Assertions.assertEquals("dzwmkrefajpj", model.networkController().macAddressPoolStart()); - Assertions.assertEquals("wkqnyhg", model.networkController().macAddressPoolStop()); + Assertions.assertEquals("tkacj", model.networkController().macAddressPoolStart()); + Assertions.assertEquals("f", model.networkController().macAddressPoolStop()); Assertions.assertFalse(model.networkController().networkVirtualizationEnabled()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnPropertiesTests.java deleted file mode 100644 index 50cab606f15b..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SdnPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.SdnProperties; - -public final class SdnPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SdnProperties model = BinaryData - .fromString("{\"sdnStatus\":\"Enabled\",\"sdnDomainName\":\"okqtobk\",\"sdnApiAddress\":\"xof\"}") - .toObject(SdnProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityComplianceStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityComplianceStatusTests.java index c4c5e481c469..f0587e2758ed 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityComplianceStatusTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityComplianceStatusTests.java @@ -11,7 +11,7 @@ public final class SecurityComplianceStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecurityComplianceStatus model = BinaryData.fromString( - "{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-09-19T06:36:50Z\"}") + "{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-10-16T13:41:26Z\"}") .toObject(SecurityComplianceStatus.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityPropertiesTests.java index 29abcfdddb14..3db8e9e27cec 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecurityPropertiesTests.java @@ -13,12 +13,12 @@ public final class SecurityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecurityProperties model = BinaryData.fromString( - "{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-11-27T19:58:41Z\"},\"provisioningState\":\"Creating\"}") + "{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Compliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-04-23T07:40:20Z\"},\"provisioningState\":\"PartiallyConnected\"}") .toObject(SecurityProperties.class); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.securedCoreComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.wdacComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.smbEncryptionForIntraClusterTrafficComplianceAssignment()); } @@ -26,13 +26,14 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { SecurityProperties model = new SecurityProperties() .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withSmbEncryptionForIntraClusterTrafficComplianceAssignment(ComplianceAssignmentType.AUDIT); + .withWdacComplianceAssignment(ComplianceAssignmentType.AUDIT) + .withSmbEncryptionForIntraClusterTrafficComplianceAssignment( + ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT); model = BinaryData.fromObject(model).toObject(SecurityProperties.class); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.securedCoreComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.wdacComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.smbEncryptionForIntraClusterTrafficComplianceAssignment()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingInnerTests.java index 97e776d514c5..a9a8d40c589d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingInnerTests.java @@ -13,11 +13,11 @@ public final class SecuritySettingInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecuritySettingInner model = BinaryData.fromString( - "{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-07-23T01:12:37Z\"},\"provisioningState\":\"InProgress\"},\"id\":\"rye\",\"name\":\"ylmbkzudni\",\"type\":\"rfih\"}") + "{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-10-25T06:29:25Z\"},\"provisioningState\":\"Disconnected\"},\"id\":\"acfrgna\",\"name\":\"bab\",\"type\":\"fbktyjmfczlf\"}") .toObject(SecuritySettingInner.class); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.securedCoreComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.wdacComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.smbEncryptionForIntraClusterTrafficComplianceAssignment()); } @@ -25,12 +25,13 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { SecuritySettingInner model = new SecuritySettingInner().withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withWdacComplianceAssignment(ComplianceAssignmentType.AUDIT) - .withSmbEncryptionForIntraClusterTrafficComplianceAssignment(ComplianceAssignmentType.AUDIT); + .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) + .withSmbEncryptionForIntraClusterTrafficComplianceAssignment( + ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT); model = BinaryData.fromObject(model).toObject(SecuritySettingInner.class); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.securedCoreComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.wdacComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, model.smbEncryptionForIntraClusterTrafficComplianceAssignment()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingListResultTests.java index bfa5c0a4e4ac..8d8c4b4843fe 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingListResultTests.java @@ -13,13 +13,12 @@ public final class SecuritySettingListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecuritySettingListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-08-04T14:13:44Z\"},\"provisioningState\":\"NotSpecified\"},\"id\":\"qaxsipietgbebjf\",\"name\":\"lbmoichd\",\"type\":\"pnfpubntnbat\"}],\"nextLink\":\"iqsowsaaelc\"}") + "{\"value\":[{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-06-30T05:25:56Z\"},\"provisioningState\":\"Creating\"},\"id\":\"z\",\"name\":\"shxgonoy\",\"type\":\"fq\"},{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-09-08T23:52:38Z\"},\"provisioningState\":\"Provisioning\"},\"id\":\"uoqujlyeg\",\"name\":\"avn\",\"type\":\"gflqqbtnyjp\"},{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-09-11T00:49:13Z\"},\"provisioningState\":\"Updating\"},\"id\":\"kottlwuhvajmailf\",\"name\":\"mjjz\",\"type\":\"kzwjiqullq\"},{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"Compliant\",\"dataAtRestEncrypted\":\"NonCompliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-05-12T11:06:20Z\"},\"provisioningState\":\"PartiallySucceeded\"},\"id\":\"tfnnxrk\",\"name\":\"dj\",\"type\":\"ynnfmuiii\"}],\"nextLink\":\"pfoh\"}") .toObject(SecuritySettingListResult.class); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.value().get(0).securedCoreComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, - model.value().get(0).wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, + Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.value().get(0).wdacComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.AUDIT, model.value().get(0).smbEncryptionForIntraClusterTrafficComplianceAssignment()); - Assertions.assertEquals("iqsowsaaelc", model.nextLink()); + Assertions.assertEquals("pfoh", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateMockTests.java index 6cc62e552d9e..1d8db80b33fc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateMockTests.java @@ -22,7 +22,7 @@ public final class SecuritySettingsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-02-26T02:54:30Z\"},\"provisioningState\":\"Succeeded\"},\"id\":\"rlfqm\",\"name\":\"j\",\"type\":\"wynbfvvc\"}"; + = "{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Compliant\",\"lastUpdated\":\"2021-12-03T19:28:38Z\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ckremgjlmsvdorsi\",\"name\":\"xxhyrkqakofa\",\"type\":\"freprfvm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SecuritySetting response = manager.securitySettings() - .define("fwfctqvey") - .withExistingCluster("gj", "hy") - .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) - .withWdacComplianceAssignment(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) + .define("vardlmzjotprrm") + .withExistingCluster("wfqjch", "vdrijanxndm") + .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) + .withWdacComplianceAssignment(ComplianceAssignmentType.AUDIT) .withSmbEncryptionForIntraClusterTrafficComplianceAssignment( ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT) .create(); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetWithResponseMockTests.java index 91ee18683f61..8ed3858f694c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class SecuritySettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-11-10T15:56:33Z\"},\"provisioningState\":\"PartiallySucceeded\"},\"id\":\"otumbmwgft\",\"name\":\"hfgmuxuqiagsko\",\"type\":\"kuqirhskxpao\"}"; + = "{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"Audit\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Pending\",\"wdacCompliance\":\"Compliant\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"NonCompliant\",\"lastUpdated\":\"2021-10-12T13:25:20Z\"},\"provisioningState\":\"Deleted\"},\"id\":\"arlcjiwgsxfaiocw\",\"name\":\"gujjgn\",\"type\":\"grzxbarcbpaefzqs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SecuritySetting response = manager.securitySettings() - .getWithResponse("yojfchicpare", "zoksgqhb", "ojuxil", com.azure.core.util.Context.NONE) + .getWithResponse("dxckdl", "zwhcukvb", "sjjfd", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.securedCoreComplianceAssignment()); + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, + response.securedCoreComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.wdacComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.AUDIT, response.smbEncryptionForIntraClusterTrafficComplianceAssignment()); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersMockTests.java index f6f5c96893e2..6c37170fcbf9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersMockTests.java @@ -23,7 +23,7 @@ public final class SecuritySettingsListByClustersMockTests { @Test public void testListByClusters() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"securedCoreComplianceAssignment\":\"Audit\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"Audit\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"NonCompliant\",\"wdacCompliance\":\"NonCompliant\",\"dataAtRestEncrypted\":\"Compliant\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-03-16T15:34:27Z\"},\"provisioningState\":\"Connected\"},\"id\":\"knbdzwilsxry\",\"name\":\"qjzlwrduxntp\",\"type\":\"x\"}]}"; + = "{\"value\":[{\"properties\":{\"securedCoreComplianceAssignment\":\"ApplyAndAutoCorrect\",\"wdacComplianceAssignment\":\"ApplyAndAutoCorrect\",\"smbEncryptionForIntraClusterTrafficComplianceAssignment\":\"ApplyAndAutoCorrect\",\"securityComplianceStatus\":{\"securedCoreCompliance\":\"Compliant\",\"wdacCompliance\":\"Pending\",\"dataAtRestEncrypted\":\"Pending\",\"dataInTransitProtected\":\"Pending\",\"lastUpdated\":\"2021-07-12T00:26:02Z\"},\"provisioningState\":\"Deleted\"},\"id\":\"udxdyyrudmahswt\",\"name\":\"dkxbq\",\"type\":\"sgfenffdxb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testListByClusters() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.securitySettings().listByClusters("kgvnlfu", "yxfzibrl", com.azure.core.util.Context.NONE); + = manager.securitySettings().listByClusters("mjw", "njcytesmfucrtfod", com.azure.core.util.Context.NONE); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, response.iterator().next().securedCoreComplianceAssignment()); Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, response.iterator().next().wdacComplianceAssignment()); - Assertions.assertEquals(ComplianceAssignmentType.AUDIT, + Assertions.assertEquals(ComplianceAssignmentType.APPLY_AND_AUTO_CORRECT, response.iterator().next().smbEncryptionForIntraClusterTrafficComplianceAssignment()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ServiceConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ServiceConfigurationTests.java index d2a5a488261f..bd7982780a32 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ServiceConfigurationTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ServiceConfigurationTests.java @@ -12,18 +12,18 @@ public final class ServiceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServiceConfiguration model = BinaryData.fromString("{\"serviceName\":\"WAC\",\"port\":5108229152426032776}") + ServiceConfiguration model = BinaryData.fromString("{\"serviceName\":\"WAC\",\"port\":9010569490634453588}") .toObject(ServiceConfiguration.class); Assertions.assertEquals(ServiceName.WAC, model.serviceName()); - Assertions.assertEquals(5108229152426032776L, model.port()); + Assertions.assertEquals(9010569490634453588L, model.port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceConfiguration model - = new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(5108229152426032776L); + = new ServiceConfiguration().withServiceName(ServiceName.WAC).withPort(9010569490634453588L); model = BinaryData.fromObject(model).toObject(ServiceConfiguration.class); Assertions.assertEquals(ServiceName.WAC, model.serviceName()); - Assertions.assertEquals(5108229152426032776L, model.port()); + Assertions.assertEquals(9010569490634453588L, model.port()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SiteDetailsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SiteDetailsTests.java deleted file mode 100644 index d10c8e0c497e..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SiteDetailsTests.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; -import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; -import com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration; -import com.azure.resourcemanager.azurestackhci.models.SiteDetails; -import com.azure.resourcemanager.azurestackhci.models.StorageConfiguration; -import com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration; -import com.azure.resourcemanager.azurestackhci.models.TimeConfiguration; -import com.azure.resourcemanager.azurestackhci.models.WebProxyConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SiteDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SiteDetails model = BinaryData.fromString( - "{\"siteResourceId\":\"e\",\"deviceConfiguration\":{\"network\":{\"networkAdapters\":[{\"ipAssignmentType\":\"Automatic\",\"ipAddress\":\"iv\",\"adapterName\":\"wwwncknr\",\"macAddress\":\"ajlskzptj\",\"ipAddressRange\":{\"startIp\":\"lwe\",\"endIp\":\"cyrthxqlehm\"},\"gateway\":\"cje\",\"subnetMask\":\"ue\",\"dnsAddressArray\":[\"am\",\"fejvqn\"],\"vlanId\":\"mbqdabzfivfo\"},{\"ipAssignmentType\":\"Automatic\",\"ipAddress\":\"sthhzagjfwy\",\"adapterName\":\"lhgenuzejgvkv\",\"macAddress\":\"aqszllrzl\",\"ipAddressRange\":{\"startIp\":\"mdqgmihzpimcqr\",\"endIp\":\"nxtminklog\"},\"gateway\":\"vtza\",\"subnetMask\":\"zvqnsqktcmbjwzzo\",\"dnsAddressArray\":[\"kybtglwkzpgajsqj\",\"emqbmfuvqarwzxuq\"],\"vlanId\":\"bluimmbw\"},{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"gtdmbvx\",\"adapterName\":\"raokqkbudb\",\"macAddress\":\"aokbavlyttaaknwf\",\"ipAddressRange\":{\"startIp\":\"ebsmhpdujdigato\",\"endIp\":\"ekscbctnanqimwbz\"},\"gateway\":\"dcldpkawnsnl\",\"subnetMask\":\"mouxwksqmudmfco\",\"dnsAddressArray\":[\"cziu\",\"wswjrkbqsjh\",\"tqqvy\",\"scyrfwbivqv\"],\"vlanId\":\"fuy\"}]},\"hostName\":\"vbhlimbyqecro\",\"webProxy\":{\"connectionUri\":\"ikcdrdaasax\",\"port\":\"bsmfkwiyjvz\",\"bypassList\":[\"srnawnvzmln\",\"oywsxvjabjqqaxu\",\"vym\",\"nudn\"]},\"time\":{\"primaryTimeServer\":\"bhjxwxqweuipmpv\",\"secondaryTimeServer\":\"m\",\"timeZone\":\"nsqxtltc\"},\"storage\":{\"partitionSize\":\"dpqgfhyrfr\"}}}") - .toObject(SiteDetails.class); - Assertions.assertEquals("e", model.siteResourceId()); - Assertions.assertEquals(IpAssignmentType.AUTOMATIC, - model.deviceConfiguration().network().networkAdapters().get(0).ipAssignmentType()); - Assertions.assertEquals("iv", model.deviceConfiguration().network().networkAdapters().get(0).ipAddress()); - Assertions.assertEquals("wwwncknr", - model.deviceConfiguration().network().networkAdapters().get(0).adapterName()); - Assertions.assertEquals("ajlskzptj", - model.deviceConfiguration().network().networkAdapters().get(0).macAddress()); - Assertions.assertEquals("lwe", - model.deviceConfiguration().network().networkAdapters().get(0).ipAddressRange().startIp()); - Assertions.assertEquals("cyrthxqlehm", - model.deviceConfiguration().network().networkAdapters().get(0).ipAddressRange().endIp()); - Assertions.assertEquals("cje", model.deviceConfiguration().network().networkAdapters().get(0).gateway()); - Assertions.assertEquals("ue", model.deviceConfiguration().network().networkAdapters().get(0).subnetMask()); - Assertions.assertEquals("am", - model.deviceConfiguration().network().networkAdapters().get(0).dnsAddressArray().get(0)); - Assertions.assertEquals("mbqdabzfivfo", - model.deviceConfiguration().network().networkAdapters().get(0).vlanId()); - Assertions.assertEquals("vbhlimbyqecro", model.deviceConfiguration().hostName()); - Assertions.assertEquals("ikcdrdaasax", model.deviceConfiguration().webProxy().connectionUri()); - Assertions.assertEquals("bsmfkwiyjvz", model.deviceConfiguration().webProxy().port()); - Assertions.assertEquals("srnawnvzmln", model.deviceConfiguration().webProxy().bypassList().get(0)); - Assertions.assertEquals("bhjxwxqweuipmpv", model.deviceConfiguration().time().primaryTimeServer()); - Assertions.assertEquals("m", model.deviceConfiguration().time().secondaryTimeServer()); - Assertions.assertEquals("nsqxtltc", model.deviceConfiguration().time().timeZone()); - Assertions.assertEquals("dpqgfhyrfr", model.deviceConfiguration().storage().partitionSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SiteDetails model - = new SiteDetails().withSiteResourceId("e") - .withDeviceConfiguration( - new TargetDeviceConfiguration() - .withNetwork( - new NetworkConfiguration().withNetworkAdapters(Arrays.asList( - new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) - .withIpAddress("iv") - .withAdapterName("wwwncknr") - .withMacAddress("ajlskzptj") - .withIpAddressRange( - new IpAddressRange().withStartIp("lwe").withEndIp("cyrthxqlehm")) - .withGateway("cje") - .withSubnetMask("ue") - .withDnsAddressArray(Arrays.asList("am", "fejvqn")) - .withVlanId("mbqdabzfivfo"), - new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) - .withIpAddress("sthhzagjfwy") - .withAdapterName("lhgenuzejgvkv") - .withMacAddress("aqszllrzl") - .withIpAddressRange( - new IpAddressRange().withStartIp("mdqgmihzpimcqr").withEndIp("nxtminklog")) - .withGateway("vtza") - .withSubnetMask("zvqnsqktcmbjwzzo") - .withDnsAddressArray(Arrays.asList("kybtglwkzpgajsqj", "emqbmfuvqarwzxuq")) - .withVlanId("bluimmbw"), - new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) - .withIpAddress("gtdmbvx") - .withAdapterName("raokqkbudb") - .withMacAddress("aokbavlyttaaknwf") - .withIpAddressRange(new IpAddressRange().withStartIp("ebsmhpdujdigato") - .withEndIp("ekscbctnanqimwbz")) - .withGateway("dcldpkawnsnl") - .withSubnetMask("mouxwksqmudmfco") - .withDnsAddressArray(Arrays.asList("cziu", "wswjrkbqsjh", "tqqvy", "scyrfwbivqv")) - .withVlanId("fuy")))) - .withHostName("vbhlimbyqecro") - .withWebProxy(new WebProxyConfiguration().withConnectionUri("ikcdrdaasax") - .withPort("bsmfkwiyjvz") - .withBypassList(Arrays.asList("srnawnvzmln", "oywsxvjabjqqaxu", "vym", "nudn"))) - .withTime(new TimeConfiguration().withPrimaryTimeServer("bhjxwxqweuipmpv") - .withSecondaryTimeServer("m") - .withTimeZone("nsqxtltc")) - .withStorage(new StorageConfiguration().withPartitionSize("dpqgfhyrfr"))); - model = BinaryData.fromObject(model).toObject(SiteDetails.class); - Assertions.assertEquals("e", model.siteResourceId()); - Assertions.assertEquals(IpAssignmentType.AUTOMATIC, - model.deviceConfiguration().network().networkAdapters().get(0).ipAssignmentType()); - Assertions.assertEquals("iv", model.deviceConfiguration().network().networkAdapters().get(0).ipAddress()); - Assertions.assertEquals("wwwncknr", - model.deviceConfiguration().network().networkAdapters().get(0).adapterName()); - Assertions.assertEquals("ajlskzptj", - model.deviceConfiguration().network().networkAdapters().get(0).macAddress()); - Assertions.assertEquals("lwe", - model.deviceConfiguration().network().networkAdapters().get(0).ipAddressRange().startIp()); - Assertions.assertEquals("cyrthxqlehm", - model.deviceConfiguration().network().networkAdapters().get(0).ipAddressRange().endIp()); - Assertions.assertEquals("cje", model.deviceConfiguration().network().networkAdapters().get(0).gateway()); - Assertions.assertEquals("ue", model.deviceConfiguration().network().networkAdapters().get(0).subnetMask()); - Assertions.assertEquals("am", - model.deviceConfiguration().network().networkAdapters().get(0).dnsAddressArray().get(0)); - Assertions.assertEquals("mbqdabzfivfo", - model.deviceConfiguration().network().networkAdapters().get(0).vlanId()); - Assertions.assertEquals("vbhlimbyqecro", model.deviceConfiguration().hostName()); - Assertions.assertEquals("ikcdrdaasax", model.deviceConfiguration().webProxy().connectionUri()); - Assertions.assertEquals("bsmfkwiyjvz", model.deviceConfiguration().webProxy().port()); - Assertions.assertEquals("srnawnvzmln", model.deviceConfiguration().webProxy().bypassList().get(0)); - Assertions.assertEquals("bhjxwxqweuipmpv", model.deviceConfiguration().time().primaryTimeServer()); - Assertions.assertEquals("m", model.deviceConfiguration().time().secondaryTimeServer()); - Assertions.assertEquals("nsqxtltc", model.deviceConfiguration().time().timeZone()); - Assertions.assertEquals("dpqgfhyrfr", model.deviceConfiguration().storage().partitionSize()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuInnerTests.java index 24d8629748b0..243a206a9e4a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuInnerTests.java @@ -12,14 +12,14 @@ public final class SkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"cjuhplrvkm\",\"publisherId\":\"wmj\",\"offerId\":\"gfggcvkyylizrzbj\",\"content\":\"fxsfuztlvtmv\",\"contentVersion\":\"bwidql\",\"skuMappings\":[{\"catalogPlanId\":\"oveofizrvjfnmj\",\"marketplaceSkuId\":\"lwyzgib\",\"marketplaceSkuVersions\":[\"jrllf\"]},{\"catalogPlanId\":\"uidjpuuyjucej\",\"marketplaceSkuId\":\"zoeovvtzejet\",\"marketplaceSkuVersions\":[\"nt\"]}]},\"id\":\"yjuzkdb\",\"name\":\"zolxrzvhqjwtr\",\"type\":\"tgvgzp\"}") + "{\"properties\":{\"provisioningState\":\"kxbbcbrwjiutgnj\",\"publisherId\":\"beewoi\",\"offerId\":\"rvzb\",\"content\":\"yrsrziuctixgb\",\"contentVersion\":\"uifr\",\"skuMappings\":[{\"catalogPlanId\":\"apezkiswqjmdghs\",\"marketplaceSkuId\":\"arybjufptbjc\",\"marketplaceSkuVersions\":[\"ciuiyqvldaswv\",\"pisqqzlgcndhzx\",\"rfc\",\"srhkhgsnxuwwkpph\"]},{\"catalogPlanId\":\"sbzxl\",\"marketplaceSkuId\":\"xomeikjclwzacn\",\"marketplaceSkuVersions\":[\"fsuqtaazyqbxy\",\"oyfpuq\",\"iqezxlhdj\"]},{\"catalogPlanId\":\"dcadwvpsozjiihjr\",\"marketplaceSkuId\":\"bmrzoepnx\",\"marketplaceSkuVersions\":[\"wnjkgvfn\"]},{\"catalogPlanId\":\"aursqftibtyi\",\"marketplaceSkuId\":\"yvp\",\"marketplaceSkuVersions\":[\"qjpnqnoowsbed\",\"nrexkxbhxv\"]}]},\"id\":\"nul\",\"name\":\"mnhjevdyzn\",\"type\":\"ajsvk\"}") .toObject(SkuInner.class); - Assertions.assertEquals("wmj", model.publisherId()); - Assertions.assertEquals("gfggcvkyylizrzbj", model.offerId()); - Assertions.assertEquals("fxsfuztlvtmv", model.content()); - Assertions.assertEquals("bwidql", model.contentVersion()); - Assertions.assertEquals("oveofizrvjfnmj", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("lwyzgib", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("jrllf", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("beewoi", model.publisherId()); + Assertions.assertEquals("rvzb", model.offerId()); + Assertions.assertEquals("yrsrziuctixgb", model.content()); + Assertions.assertEquals("uifr", model.contentVersion()); + Assertions.assertEquals("apezkiswqjmdghs", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("arybjufptbjc", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("ciuiyqvldaswv", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuListTests.java index c9c4b595542e..ff9b39f6c277 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuListTests.java @@ -12,16 +12,15 @@ public final class SkuListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"cxnmskwhqjjyslu\",\"publisherId\":\"pshhkvpedwqslsr\",\"offerId\":\"pq\",\"content\":\"wskondcbrwimuvqe\",\"contentVersion\":\"so\",\"skuMappings\":[{\"catalogPlanId\":\"leaesi\",\"marketplaceSkuId\":\"qtljqobbpihehc\",\"marketplaceSkuVersions\":[\"bmrqbrjbbmp\",\"dlvykfrex\",\"rseqwjksghudgz\"]},{\"catalogPlanId\":\"ogjggsvoujkxibda\",\"marketplaceSkuId\":\"rkmdyom\",\"marketplaceSkuVersions\":[\"bv\",\"bhdyir\"]},{\"catalogPlanId\":\"wpg\",\"marketplaceSkuId\":\"eimawzovgkkumui\",\"marketplaceSkuVersions\":[\"jcazt\"]}]},\"id\":\"snsqowxwcoml\",\"name\":\"kytwvcz\",\"type\":\"swkacvej\"},{\"properties\":{\"provisioningState\":\"vlvhbwrnfxtgd\",\"publisherId\":\"qthe\",\"offerId\":\"mnaoy\",\"content\":\"kcoeqswank\",\"contentVersion\":\"ytmhdroznnhdrlkt\",\"skuMappings\":[{\"catalogPlanId\":\"gguxhemlwyw\",\"marketplaceSkuId\":\"eczgfb\",\"marketplaceSkuVersions\":[\"lelssxblycsxzujk\",\"rlsmdesqplpvmjc\"]},{\"catalogPlanId\":\"ewbidyvteowxv\",\"marketplaceSkuId\":\"iudeu\",\"marketplaceSkuVersions\":[\"xzecpaxwkufykhvu\"]},{\"catalogPlanId\":\"epmrut\",\"marketplaceSkuId\":\"abaobnslujdjltym\",\"marketplaceSkuVersions\":[\"guihywar\",\"spphk\",\"xkykxdssjp\"]}]},\"id\":\"mucfxhikkf\",\"name\":\"rmymyincqlhr\",\"type\":\"s\"},{\"properties\":{\"provisioningState\":\"miii\",\"publisherId\":\"gqcg\",\"offerId\":\"ugqkctotiowlxteq\",\"content\":\"tjgwdtguk\",\"contentVersion\":\"nblwphqlkcc\",\"skuMappings\":[{\"catalogPlanId\":\"gqwa\",\"marketplaceSkuId\":\"iul\",\"marketplaceSkuVersions\":[\"iip\",\"glvawuwzdufypivl\",\"bbjpmcubkmif\"]},{\"catalogPlanId\":\"xkubvphavpmhbrbq\",\"marketplaceSkuId\":\"govpbbtte\",\"marketplaceSkuVersions\":[\"knssqyzqed\",\"kdfrdbiqmrjgeihf\",\"lg\",\"wfiwzcxmj\"]}]},\"id\":\"yephmgtvljvrcmyf\",\"name\":\"i\",\"type\":\"gxhnpomyqwcabv\"},{\"properties\":{\"provisioningState\":\"leeyaswl\",\"publisherId\":\"ugmrmf\",\"offerId\":\"rxwtoaukhfkvc\",\"content\":\"izmoaeds\",\"contentVersion\":\"wuived\",\"skuMappings\":[{\"catalogPlanId\":\"eewxeiqbpsmg\",\"marketplaceSkuId\":\"guamlj\",\"marketplaceSkuVersions\":[\"gmsplzgaufcshhv\",\"ewgnxkympqanxrj\",\"ixt\"]},{\"catalogPlanId\":\"taoypnyghshxc\",\"marketplaceSkuId\":\"hkgmnsg\",\"marketplaceSkuVersions\":[\"ycphdrwjjkhvyo\",\"ac\",\"u\"]},{\"catalogPlanId\":\"xnqmhrpqpdfwm\",\"marketplaceSkuId\":\"isqcssffxuifmcs\",\"marketplaceSkuVersions\":[\"bkdq\",\"rdzsylollgtrczzy\",\"mxzjijpvua\"]}]},\"id\":\"kihcirlde\",\"name\":\"xrdcoxnbkkja\",\"type\":\"urnnqbnqbpiz\"}],\"nextLink\":\"ltgrdogypxrxv\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"bjkdtfohf\",\"publisherId\":\"gzvkiwrsiwdyj\",\"offerId\":\"rykcrraueekcsue\",\"content\":\"gdda\",\"contentVersion\":\"cbgydlqi\",\"skuMappings\":[{\"catalogPlanId\":\"hmptyrilkfbn\",\"marketplaceSkuId\":\"qxvztpbnfnqtxjt\",\"marketplaceSkuVersions\":[\"lswbnf\",\"depld\"]},{\"catalogPlanId\":\"jnsfzygleexahvmy\",\"marketplaceSkuId\":\"sbrcary\",\"marketplaceSkuVersions\":[\"j\",\"yvoaqajuvehzp\",\"dmkrrb\",\"mpfu\"]},{\"catalogPlanId\":\"be\",\"marketplaceSkuId\":\"ybpmf\",\"marketplaceSkuVersions\":[\"nunmpzkrv\",\"yifkdschlzvf\"]},{\"catalogPlanId\":\"tnkjjwgcwnphb\",\"marketplaceSkuId\":\"fyrtogmhmjp\",\"marketplaceSkuVersions\":[\"dfpdqwtygevg\"]}]},\"id\":\"sehar\",\"name\":\"ifvqnr\",\"type\":\"tmbpjp\"},{\"properties\":{\"provisioningState\":\"wjhrsidqpxlbtpa\",\"publisherId\":\"tngatwmykyu\",\"offerId\":\"ym\",\"content\":\"mfjhpycvjqdvdwkq\",\"contentVersion\":\"drlefgnaavuag\",\"skuMappings\":[{\"catalogPlanId\":\"aou\",\"marketplaceSkuId\":\"pdctuhspfefyi\",\"marketplaceSkuVersions\":[\"yeuyldph\",\"tybkcgs\"]},{\"catalogPlanId\":\"h\",\"marketplaceSkuId\":\"lnm\",\"marketplaceSkuVersions\":[\"efxexlf\",\"i\",\"txtjrrlkmds\",\"jhhxdlajf\"]},{\"catalogPlanId\":\"cxscvslxlh\",\"marketplaceSkuId\":\"vkrmukmyjmkx\",\"marketplaceSkuVersions\":[\"csl\",\"jfkqidn\"]}]},\"id\":\"o\",\"name\":\"xjhqxcsqhtkb\",\"type\":\"nqlrng\"},{\"properties\":{\"provisioningState\":\"biipsnawwlqkznx\",\"publisherId\":\"llxricc\",\"offerId\":\"wmuqqoajxeiygle\",\"content\":\"wvaexhdctr\",\"contentVersion\":\"qnkbrupobehdm\",\"skuMappings\":[{\"catalogPlanId\":\"cvumepjpbi\",\"marketplaceSkuId\":\"zpphepif\",\"marketplaceSkuVersions\":[\"eqir\",\"cjclykcgxv\",\"pjlvczuoda\",\"punettepdjxq\"]},{\"catalogPlanId\":\"koynuiylpckae\",\"marketplaceSkuId\":\"edveskwxegqp\",\"marketplaceSkuVersions\":[\"fn\",\"hctmjtsgh\"]}]},\"id\":\"c\",\"name\":\"cp\",\"type\":\"arpzeqacdldtzm\"}],\"nextLink\":\"pefcpcz\"}") .toObject(SkuList.class); - Assertions.assertEquals("pshhkvpedwqslsr", model.value().get(0).publisherId()); - Assertions.assertEquals("pq", model.value().get(0).offerId()); - Assertions.assertEquals("wskondcbrwimuvqe", model.value().get(0).content()); - Assertions.assertEquals("so", model.value().get(0).contentVersion()); - Assertions.assertEquals("leaesi", model.value().get(0).skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("qtljqobbpihehc", model.value().get(0).skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("bmrqbrjbbmp", - model.value().get(0).skuMappings().get(0).marketplaceSkuVersions().get(0)); - Assertions.assertEquals("ltgrdogypxrxv", model.nextLink()); + Assertions.assertEquals("gzvkiwrsiwdyj", model.value().get(0).publisherId()); + Assertions.assertEquals("rykcrraueekcsue", model.value().get(0).offerId()); + Assertions.assertEquals("gdda", model.value().get(0).content()); + Assertions.assertEquals("cbgydlqi", model.value().get(0).contentVersion()); + Assertions.assertEquals("hmptyrilkfbn", model.value().get(0).skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("qxvztpbnfnqtxjt", model.value().get(0).skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("lswbnf", model.value().get(0).skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("pefcpcz", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuMappingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuMappingsTests.java index b560118b439f..e1af34937cf2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuMappingsTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuMappingsTests.java @@ -12,10 +12,10 @@ public final class SkuMappingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuMappings model = BinaryData.fromString( - "{\"catalogPlanId\":\"czvyifq\",\"marketplaceSkuId\":\"kdvjsll\",\"marketplaceSkuVersions\":[\"vdfwatkpn\",\"ulexxbczwtr\",\"wiqzbqjvsovmyo\",\"acspkwl\"]}") + "{\"catalogPlanId\":\"majtjaod\",\"marketplaceSkuId\":\"bnbdxkqpxokajion\",\"marketplaceSkuVersions\":[\"ex\",\"stxgc\",\"odgmaajrmvdjwz\"]}") .toObject(SkuMappings.class); - Assertions.assertEquals("czvyifq", model.catalogPlanId()); - Assertions.assertEquals("kdvjsll", model.marketplaceSkuId()); - Assertions.assertEquals("vdfwatkpn", model.marketplaceSkuVersions().get(0)); + Assertions.assertEquals("majtjaod", model.catalogPlanId()); + Assertions.assertEquals("bnbdxkqpxokajion", model.marketplaceSkuId()); + Assertions.assertEquals("ex", model.marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuPropertiesTests.java index e85155bc72cf..a9a0296ad7fd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkuPropertiesTests.java @@ -12,14 +12,14 @@ public final class SkuPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuProperties model = BinaryData.fromString( - "{\"provisioningState\":\"rkolawjm\",\"publisherId\":\"mwrokcdxfzzzwyja\",\"offerId\":\"tlhguynuchl\",\"content\":\"ltxdwhmozu\",\"contentVersion\":\"zvlnsnnjz\",\"skuMappings\":[{\"catalogPlanId\":\"olpy\",\"marketplaceSkuId\":\"amxqzragpgdphtv\",\"marketplaceSkuVersions\":[\"a\"]},{\"catalogPlanId\":\"lejchcsr\",\"marketplaceSkuId\":\"knmzlanrupdwvnp\",\"marketplaceSkuVersions\":[\"zqtpjhmq\",\"hvthlaiwdcxsm\",\"zzhz\",\"txetlgydl\"]},{\"catalogPlanId\":\"vlnnpx\",\"marketplaceSkuId\":\"afiqgeaarbgjekg\",\"marketplaceSkuVersions\":[\"byu\",\"idwcwvmzegjon\",\"hj\",\"rwgdnqzbrfks\"]},{\"catalogPlanId\":\"hzmtksjc\",\"marketplaceSkuId\":\"digsxcdgl\",\"marketplaceSkuVersions\":[\"keuachtomf\",\"rytswfpf\"]}]}") + "{\"provisioningState\":\"mqozzkivy\",\"publisherId\":\"rl\",\"offerId\":\"zji\",\"content\":\"qfhefkwabsol\",\"contentVersion\":\"nqqlmgnl\",\"skuMappings\":[{\"catalogPlanId\":\"xtelexhvu\",\"marketplaceSkuId\":\"ozoolzq\",\"marketplaceSkuVersions\":[\"rkuz\",\"bc\"]},{\"catalogPlanId\":\"dtsnxawqytllhdyz\",\"marketplaceSkuId\":\"ckze\",\"marketplaceSkuVersions\":[\"akckywym\"]}]}") .toObject(SkuProperties.class); - Assertions.assertEquals("mwrokcdxfzzzwyja", model.publisherId()); - Assertions.assertEquals("tlhguynuchl", model.offerId()); - Assertions.assertEquals("ltxdwhmozu", model.content()); - Assertions.assertEquals("zvlnsnnjz", model.contentVersion()); - Assertions.assertEquals("olpy", model.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("amxqzragpgdphtv", model.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("a", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("rl", model.publisherId()); + Assertions.assertEquals("zji", model.offerId()); + Assertions.assertEquals("qfhefkwabsol", model.content()); + Assertions.assertEquals("nqqlmgnl", model.contentVersion()); + Assertions.assertEquals("xtelexhvu", model.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("ozoolzq", model.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("rkuz", model.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetWithResponseMockTests.java index cba57cd18f43..386cb096f7e7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SkusGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"tjwrvewojo\",\"publisherId\":\"xqetxtdqius\",\"offerId\":\"uzljvgjijzqj\",\"content\":\"jsazmjsis\",\"contentVersion\":\"qhcmecagsbfei\",\"skuMappings\":[{\"catalogPlanId\":\"jygllfkchhgsjuzz\",\"marketplaceSkuId\":\"jlwmqc\",\"marketplaceSkuVersions\":[\"baamkkhdhpmk\",\"duj\"]},{\"catalogPlanId\":\"puqzdy\",\"marketplaceSkuId\":\"yws\",\"marketplaceSkuVersions\":[\"pzhryhezxizdsyx\",\"fjilbuazccouhw\"]}]},\"id\":\"kdf\",\"name\":\"jsk\",\"type\":\"rb\"}"; + = "{\"properties\":{\"provisioningState\":\"gobliqemcdiiisk\",\"publisherId\":\"onxxupjx\",\"offerId\":\"rk\",\"content\":\"genj\",\"contentVersion\":\"npjwkosnyxigfou\",\"skuMappings\":[{\"catalogPlanId\":\"gdqmrlhnzkwop\",\"marketplaceSkuId\":\"nyinxuprrxyxw\",\"marketplaceSkuVersions\":[\"bf\",\"ployuekdcpvu\"]},{\"catalogPlanId\":\"rsvjmnsvujnjktv\",\"marketplaceSkuId\":\"efcjisepkdbxot\",\"marketplaceSkuVersions\":[\"ampqocl\",\"nnmxynlsuqbwzstr\",\"tgvpatr\"]}]},\"id\":\"jktfinf\",\"name\":\"oksmmculwk\",\"type\":\"icruo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,16 +31,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Sku response = manager.skus() - .getWithResponse("vurkmjufavvln", "bsotmynklnmrznm", "vrkkfcwxizkstxne", "keipxutc", "vriuvnfazxtvs", - "yyaeiivj", com.azure.core.util.Context.NONE) + .getWithResponse("inwteyrqsh", "xbcejop", "lblfs", "rrwcsp", "mtcvvf", "rdytzfslxizhq", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xqetxtdqius", response.publisherId()); - Assertions.assertEquals("uzljvgjijzqj", response.offerId()); - Assertions.assertEquals("jsazmjsis", response.content()); - Assertions.assertEquals("qhcmecagsbfei", response.contentVersion()); - Assertions.assertEquals("jygllfkchhgsjuzz", response.skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("jlwmqc", response.skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("baamkkhdhpmk", response.skuMappings().get(0).marketplaceSkuVersions().get(0)); + Assertions.assertEquals("onxxupjx", response.publisherId()); + Assertions.assertEquals("rk", response.offerId()); + Assertions.assertEquals("genj", response.content()); + Assertions.assertEquals("npjwkosnyxigfou", response.contentVersion()); + Assertions.assertEquals("gdqmrlhnzkwop", response.skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("nyinxuprrxyxw", response.skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("bf", response.skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferMockTests.java index 83bdde97bd2b..0b0268082987 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferMockTests.java @@ -22,7 +22,7 @@ public final class SkusListByOfferMockTests { @Test public void testListByOffer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"thueocsgvuqzgbjw\",\"publisherId\":\"udmpwewpmioleaj\",\"offerId\":\"esgyzwph\",\"content\":\"kscecmbaajdfwrd\",\"contentVersion\":\"lvzkfekde\",\"skuMappings\":[{\"catalogPlanId\":\"qtllbhjjpduibs\",\"marketplaceSkuId\":\"rqnneqryp\",\"marketplaceSkuVersions\":[\"vshhovtuercpzhb\",\"cxybtdzy\",\"xhaoegjzgpljbnw\",\"zsrazcbybic\"]},{\"catalogPlanId\":\"xhjpuapasizzfm\",\"marketplaceSkuId\":\"ykwu\",\"marketplaceSkuVersions\":[\"otennd\"]},{\"catalogPlanId\":\"thdzitjzffph\",\"marketplaceSkuId\":\"wjqvs\",\"marketplaceSkuVersions\":[\"onadez\",\"z\",\"vfybxmmrvnuvqk\",\"rsguogkcbr\"]},{\"catalogPlanId\":\"p\",\"marketplaceSkuId\":\"bensjflwpft\",\"marketplaceSkuVersions\":[\"tmvifgcv\",\"im\"]}]},\"id\":\"bmticxgosnxajp\",\"name\":\"cdfmzxaoxlhmvjc\",\"type\":\"nlsbnucqxhpaqo\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"eupcknecexkgrv\",\"publisherId\":\"sjdmngsytqpdzfyx\",\"offerId\":\"wawoxcgzbejqf\",\"content\":\"fopfjxdwdrpazqjk\",\"contentVersion\":\"mbwotfcuu\",\"skuMappings\":[{\"catalogPlanId\":\"igpgayiawoh\",\"marketplaceSkuId\":\"hnnzme\",\"marketplaceSkuVersions\":[\"kmqenh\",\"idzr\",\"vs\",\"lo\"]},{\"catalogPlanId\":\"vslvivqsuvwten\",\"marketplaceSkuId\":\"pijpkhc\",\"marketplaceSkuVersions\":[\"qxukuicj\",\"f\",\"ekiooanduewfhv\",\"x\"]},{\"catalogPlanId\":\"xzubfjzabbwzgv\",\"marketplaceSkuId\":\"aix\",\"marketplaceSkuVersions\":[\"kixsps\",\"igavk\"]},{\"catalogPlanId\":\"yxzerejr\",\"marketplaceSkuId\":\"zjbyetjxryopta\",\"marketplaceSkuVersions\":[\"whlbecgihzbpem\",\"rrabovrwwxywp\",\"hspbo\"]}]},\"id\":\"ifp\",\"name\":\"skpeswyhhmifjua\",\"type\":\"xwwvcmmpeg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,16 @@ public void testListByOffer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.skus() - .listByOffer("zepirtv", "piqdqbvxqto", "pwbopvhcbt", "aprjxcon", "ick", com.azure.core.util.Context.NONE); + .listByOffer("krjflsgaojb", "qpqsdoctpzpuj", "flmcdsgxc", "lujiswlluunxhfw", "fxzf", + com.azure.core.util.Context.NONE); - Assertions.assertEquals("udmpwewpmioleaj", response.iterator().next().publisherId()); - Assertions.assertEquals("esgyzwph", response.iterator().next().offerId()); - Assertions.assertEquals("kscecmbaajdfwrd", response.iterator().next().content()); - Assertions.assertEquals("lvzkfekde", response.iterator().next().contentVersion()); - Assertions.assertEquals("qtllbhjjpduibs", response.iterator().next().skuMappings().get(0).catalogPlanId()); - Assertions.assertEquals("rqnneqryp", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); - Assertions.assertEquals("vshhovtuercpzhb", + Assertions.assertEquals("sjdmngsytqpdzfyx", response.iterator().next().publisherId()); + Assertions.assertEquals("wawoxcgzbejqf", response.iterator().next().offerId()); + Assertions.assertEquals("fopfjxdwdrpazqjk", response.iterator().next().content()); + Assertions.assertEquals("mbwotfcuu", response.iterator().next().contentVersion()); + Assertions.assertEquals("igpgayiawoh", response.iterator().next().skuMappings().get(0).catalogPlanId()); + Assertions.assertEquals("hnnzme", response.iterator().next().skuMappings().get(0).marketplaceSkuId()); + Assertions.assertEquals("kmqenh", response.iterator().next().skuMappings().get(0).marketplaceSkuVersions().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestPropertiesTests.java index 86c067306dd7..edc3c287a8e0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssuranceChangeRequestPropertiesTests.java @@ -13,16 +13,16 @@ public final class SoftwareAssuranceChangeRequestPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SoftwareAssuranceChangeRequestProperties model - = BinaryData.fromString("{\"softwareAssuranceIntent\":\"Enable\"}") + = BinaryData.fromString("{\"softwareAssuranceIntent\":\"Disable\"}") .toObject(SoftwareAssuranceChangeRequestProperties.class); - Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, model.softwareAssuranceIntent()); + Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, model.softwareAssuranceIntent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SoftwareAssuranceChangeRequestProperties model = new SoftwareAssuranceChangeRequestProperties() - .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.ENABLE); + .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.DISABLE); model = BinaryData.fromObject(model).toObject(SoftwareAssuranceChangeRequestProperties.class); - Assertions.assertEquals(SoftwareAssuranceIntent.ENABLE, model.softwareAssuranceIntent()); + Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, model.softwareAssuranceIntent()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssurancePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssurancePropertiesTests.java index da353a938cca..6405f414bd56 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssurancePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SoftwareAssurancePropertiesTests.java @@ -13,7 +13,7 @@ public final class SoftwareAssurancePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SoftwareAssuranceProperties model = BinaryData.fromString( - "{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-10-14T11:42:47Z\"}") + "{\"softwareAssuranceStatus\":\"Disabled\",\"softwareAssuranceIntent\":\"Disable\",\"lastUpdated\":\"2021-05-01T06:56:52Z\"}") .toObject(SoftwareAssuranceProperties.class); Assertions.assertEquals(SoftwareAssuranceIntent.DISABLE, model.softwareAssuranceIntent()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StepTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StepTests.java index de9a69d2cd65..63b5e4b062ad 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StepTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StepTests.java @@ -14,153 +14,163 @@ public final class StepTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Step model = BinaryData.fromString( - "{\"name\":\"oaguhic\",\"description\":\"lizst\",\"errorMessage\":\"sjvh\",\"status\":\"eftkwqe\",\"startTimeUtc\":\"2021-09-20T03:07:47Z\",\"endTimeUtc\":\"2021-12-09T22:39:35Z\",\"lastUpdatedTimeUtc\":\"2021-09-05T09:38:44Z\",\"expectedExecutionTime\":\"aepwamcxtcz\",\"steps\":[{\"name\":\"uknijduyye\",\"description\":\"ydjfb\",\"errorMessage\":\"yv\",\"status\":\"ulrtywikdmh\",\"startTimeUtc\":\"2021-06-23T09:58:16Z\",\"endTimeUtc\":\"2021-06-20T02:09:46Z\",\"lastUpdatedTimeUtc\":\"2021-06-12T20:26:25Z\",\"expectedExecutionTime\":\"hgauacdixmxufrs\",\"steps\":[{\"name\":\"gdkfnoz\",\"description\":\"oqbvjhvefgwbmqj\",\"errorMessage\":\"ntasfaymxbu\",\"status\":\"zealbmqkyo\",\"startTimeUtc\":\"2021-02-05T18:36:14Z\",\"endTimeUtc\":\"2021-12-04T15:32:33Z\",\"lastUpdatedTimeUtc\":\"2021-08-27T22:04:20Z\",\"expectedExecutionTime\":\"tsu\",\"steps\":[{},{},{}]},{\"name\":\"gxjc\",\"description\":\"zrrscub\",\"errorMessage\":\"sd\",\"status\":\"pxqwo\",\"startTimeUtc\":\"2021-06-12T06:08:58Z\",\"endTimeUtc\":\"2021-09-20T06:50:41Z\",\"lastUpdatedTimeUtc\":\"2021-03-03T11:14:29Z\",\"expectedExecutionTime\":\"rmmuabwibvjo\",\"steps\":[{},{},{}]},{\"name\":\"mcyefoyzbam\",\"description\":\"neo\",\"errorMessage\":\"fkak\",\"status\":\"ldtve\",\"startTimeUtc\":\"2021-01-09T05:30:45Z\",\"endTimeUtc\":\"2021-05-03T22:13:18Z\",\"lastUpdatedTimeUtc\":\"2021-03-19T15:36:01Z\",\"expectedExecutionTime\":\"jknyu\",\"steps\":[{}]}]},{\"name\":\"txpnrupza\",\"description\":\"rdixt\",\"errorMessage\":\"kidswys\",\"status\":\"ruffgllukk\",\"startTimeUtc\":\"2021-08-03T14:58:49Z\",\"endTimeUtc\":\"2021-07-17T07:58:07Z\",\"lastUpdatedTimeUtc\":\"2021-09-14T02:31:15Z\",\"expectedExecutionTime\":\"qhvmblcouqe\",\"steps\":[{\"name\":\"cdsziryrand\",\"description\":\"pmbltoormkfql\",\"errorMessage\":\"ldykalsygaolnjp\",\"status\":\"bmjk\",\"startTimeUtc\":\"2021-03-23T11:57:04Z\",\"endTimeUtc\":\"2021-11-15T02:45:09Z\",\"lastUpdatedTimeUtc\":\"2021-06-16T22:07:38Z\",\"expectedExecutionTime\":\"xxahmrnadzyqegxy\",\"steps\":[{},{},{},{}]},{\"name\":\"nbm\",\"description\":\"bjijkgqxnh\",\"errorMessage\":\"keznjaujvaa\",\"status\":\"ggiycwkdtaawxwf\",\"startTimeUtc\":\"2021-05-27T21:19:02Z\",\"endTimeUtc\":\"2021-08-31T11:37:22Z\",\"lastUpdatedTimeUtc\":\"2021-01-24T09:38:53Z\",\"expectedExecutionTime\":\"mbzmqk\",\"steps\":[{},{},{}]},{\"name\":\"nxwbjsidbirkfp\",\"description\":\"okdgoge\",\"errorMessage\":\"jymrhbg\",\"status\":\"ozkyewnfnzh\",\"startTimeUtc\":\"2021-03-12T14:10:09Z\",\"endTimeUtc\":\"2021-10-27T04:54:24Z\",\"lastUpdatedTimeUtc\":\"2021-01-04T18:23:18Z\",\"expectedExecutionTime\":\"jkutycyarnr\",\"steps\":[{},{},{},{}]}]}]}") + "{\"name\":\"qqax\",\"description\":\"vym\",\"errorMessage\":\"udndoabhjxw\",\"status\":\"weuipmpvksmi\",\"startTimeUtc\":\"2021-05-24T16:00:43Z\",\"endTimeUtc\":\"2021-03-01T08:32:38Z\",\"lastUpdatedTimeUtc\":\"2021-09-18T05:20:09Z\",\"expectedExecutionTime\":\"clkrdpq\",\"steps\":[{\"name\":\"rfrakkld\",\"description\":\"c\",\"errorMessage\":\"cmfcnrjajq\",\"status\":\"txjtielnzqgx\",\"startTimeUtc\":\"2021-03-26T06:17:48Z\",\"endTimeUtc\":\"2021-01-07T03:50:05Z\",\"lastUpdatedTimeUtc\":\"2021-03-31T13:59:04Z\",\"expectedExecutionTime\":\"pqagynoiprn\",\"steps\":[{\"name\":\"incryqxzx\",\"description\":\"zi\",\"errorMessage\":\"qimiymqr\",\"status\":\"guhfupe\",\"startTimeUtc\":\"2021-04-25T04:36:14Z\",\"endTimeUtc\":\"2021-10-20T04:19:59Z\",\"lastUpdatedTimeUtc\":\"2021-09-23T06:34:16Z\",\"expectedExecutionTime\":\"bpkflanfkgxs\",\"steps\":[{}]}]},{\"name\":\"uzowpuohdkcpr\",\"description\":\"kxrzt\",\"errorMessage\":\"chlutixmqru\",\"status\":\"izcbfzmcrunfhiuc\",\"startTimeUtc\":\"2021-10-12T05:29:04Z\",\"endTimeUtc\":\"2021-07-28T03:39:03Z\",\"lastUpdatedTimeUtc\":\"2021-10-03T05:59:53Z\",\"expectedExecutionTime\":\"ktkrumzuedky\",\"steps\":[{\"name\":\"xo\",\"description\":\"kxiuxqggvqr\",\"errorMessage\":\"yhlwcjsqg\",\"status\":\"hffbxrq\",\"startTimeUtc\":\"2021-04-12T00:51:48Z\",\"endTimeUtc\":\"2021-05-21T04:38:39Z\",\"lastUpdatedTimeUtc\":\"2021-02-11T11:24:24Z\",\"expectedExecutionTime\":\"sdxeqztvxwmwwmjs\",\"steps\":[{}]}]},{\"name\":\"wwa\",\"description\":\"cleqioulndhzyo\",\"errorMessage\":\"jhtollh\",\"status\":\"idmytzln\",\"startTimeUtc\":\"2021-08-15T23:34:01Z\",\"endTimeUtc\":\"2021-11-27T15:39:59Z\",\"lastUpdatedTimeUtc\":\"2021-12-06T10:04:08Z\",\"expectedExecutionTime\":\"oanfbcswqagyw\",\"steps\":[{\"name\":\"gvjrktpgaeuky\",\"description\":\"ohpmwhqn\",\"errorMessage\":\"sklhsidsjtdlp\",\"status\":\"injgazlsvbzfcpuo\",\"startTimeUtc\":\"2021-08-10T18:21:08Z\",\"endTimeUtc\":\"2021-09-21T07:05Z\",\"lastUpdatedTimeUtc\":\"2021-09-19T23:33:20Z\",\"expectedExecutionTime\":\"klhsyekrdrenxol\",\"steps\":[{},{},{},{}]},{\"name\":\"h\",\"description\":\"eivdlhy\",\"errorMessage\":\"bdbfgrlp\",\"status\":\"ytjlkesmmpath\",\"startTimeUtc\":\"2021-06-18T16:13:03Z\",\"endTimeUtc\":\"2021-04-15T07:19:42Z\",\"lastUpdatedTimeUtc\":\"2021-07-17T14:30:25Z\",\"expectedExecutionTime\":\"niiwllbvgwz\",\"steps\":[{}]},{\"name\":\"edous\",\"description\":\"tjtgravaqogfkb\",\"errorMessage\":\"auzlqbtxxw\",\"status\":\"h\",\"startTimeUtc\":\"2021-01-18T16:08:35Z\",\"endTimeUtc\":\"2021-04-25T18:33:04Z\",\"lastUpdatedTimeUtc\":\"2021-07-31T04:59:21Z\",\"expectedExecutionTime\":\"zkg\",\"steps\":[{}]},{\"name\":\"ywhczzq\",\"description\":\"mngqbe\",\"errorMessage\":\"gis\",\"status\":\"wnykdidjchlrmpw\",\"startTimeUtc\":\"2021-04-01T15:33:13Z\",\"endTimeUtc\":\"2021-11-26T04:54:01Z\",\"lastUpdatedTimeUtc\":\"2021-01-29T04:57:07Z\",\"expectedExecutionTime\":\"acdhztxkbr\",\"steps\":[{},{}]}]}]}") .toObject(Step.class); - Assertions.assertEquals("oaguhic", model.name()); - Assertions.assertEquals("lizst", model.description()); - Assertions.assertEquals("sjvh", model.errorMessage()); - Assertions.assertEquals("eftkwqe", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-20T03:07:47Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-09T22:39:35Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T09:38:44Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("aepwamcxtcz", model.expectedExecutionTime()); - Assertions.assertEquals("uknijduyye", model.steps().get(0).name()); - Assertions.assertEquals("ydjfb", model.steps().get(0).description()); - Assertions.assertEquals("yv", model.steps().get(0).errorMessage()); - Assertions.assertEquals("ulrtywikdmh", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-23T09:58:16Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-20T02:09:46Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-12T20:26:25Z"), + Assertions.assertEquals("qqax", model.name()); + Assertions.assertEquals("vym", model.description()); + Assertions.assertEquals("udndoabhjxw", model.errorMessage()); + Assertions.assertEquals("weuipmpvksmi", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T16:00:43Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T08:32:38Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T05:20:09Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("clkrdpq", model.expectedExecutionTime()); + Assertions.assertEquals("rfrakkld", model.steps().get(0).name()); + Assertions.assertEquals("c", model.steps().get(0).description()); + Assertions.assertEquals("cmfcnrjajq", model.steps().get(0).errorMessage()); + Assertions.assertEquals("txjtielnzqgx", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T06:17:48Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-07T03:50:05Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T13:59:04Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("hgauacdixmxufrs", model.steps().get(0).expectedExecutionTime()); - Assertions.assertEquals("gdkfnoz", model.steps().get(0).steps().get(0).name()); - Assertions.assertEquals("oqbvjhvefgwbmqj", model.steps().get(0).steps().get(0).description()); - Assertions.assertEquals("ntasfaymxbu", model.steps().get(0).steps().get(0).errorMessage()); - Assertions.assertEquals("zealbmqkyo", model.steps().get(0).steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-05T18:36:14Z"), + Assertions.assertEquals("pqagynoiprn", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("incryqxzx", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("zi", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("qimiymqr", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("guhfupe", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T04:36:14Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T15:32:33Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T04:19:59Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T22:04:20Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T06:34:16Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("tsu", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("bpkflanfkgxs", model.steps().get(0).steps().get(0).expectedExecutionTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { Step model - = new Step().withName("oaguhic") - .withDescription("lizst") - .withErrorMessage("sjvh") - .withStatus("eftkwqe") - .withStartTimeUtc(OffsetDateTime.parse("2021-09-20T03:07:47Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-12-09T22:39:35Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-05T09:38:44Z")) - .withExpectedExecutionTime("aepwamcxtcz") + = new Step().withName("qqax") + .withDescription("vym") + .withErrorMessage("udndoabhjxw") + .withStatus("weuipmpvksmi") + .withStartTimeUtc(OffsetDateTime.parse("2021-05-24T16:00:43Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-03-01T08:32:38Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-18T05:20:09Z")) + .withExpectedExecutionTime("clkrdpq") .withSteps( Arrays .asList( - new Step().withName("uknijduyye") - .withDescription("ydjfb") - .withErrorMessage("yv") - .withStatus("ulrtywikdmh") - .withStartTimeUtc(OffsetDateTime.parse("2021-06-23T09:58:16Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-06-20T02:09:46Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-12T20:26:25Z")) - .withExpectedExecutionTime("hgauacdixmxufrs") + new Step().withName("rfrakkld") + .withDescription("c") + .withErrorMessage("cmfcnrjajq") + .withStatus("txjtielnzqgx") + .withStartTimeUtc(OffsetDateTime.parse("2021-03-26T06:17:48Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-01-07T03:50:05Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-31T13:59:04Z")) + .withExpectedExecutionTime("pqagynoiprn") .withSteps( - Arrays.asList( - new Step().withName("gdkfnoz") - .withDescription("oqbvjhvefgwbmqj") - .withErrorMessage("ntasfaymxbu") - .withStatus("zealbmqkyo") - .withStartTimeUtc(OffsetDateTime.parse("2021-02-05T18:36:14Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-12-04T15:32:33Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-27T22:04:20Z")) - .withExpectedExecutionTime("tsu") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())), - new Step().withName("gxjc") - .withDescription("zrrscub") - .withErrorMessage("sd") - .withStatus("pxqwo") - .withStartTimeUtc(OffsetDateTime.parse("2021-06-12T06:08:58Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-09-20T06:50:41Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-03T11:14:29Z")) - .withExpectedExecutionTime("rmmuabwibvjo") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())), - new Step().withName("mcyefoyzbam") - .withDescription("neo") - .withErrorMessage("fkak") - .withStatus("ldtve") - .withStartTimeUtc(OffsetDateTime.parse("2021-01-09T05:30:45Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-05-03T22:13:18Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-19T15:36:01Z")) - .withExpectedExecutionTime("jknyu") + Arrays + .asList(new Step().withName("incryqxzx") + .withDescription("zi") + .withErrorMessage("qimiymqr") + .withStatus("guhfupe") + .withStartTimeUtc(OffsetDateTime.parse("2021-04-25T04:36:14Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-10-20T04:19:59Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-23T06:34:16Z")) + .withExpectedExecutionTime("bpkflanfkgxs") .withSteps(Arrays.asList(new Step())))), - new Step().withName("txpnrupza") - .withDescription("rdixt") - .withErrorMessage("kidswys") - .withStatus("ruffgllukk") - .withStartTimeUtc(OffsetDateTime.parse("2021-08-03T14:58:49Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-07-17T07:58:07Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-14T02:31:15Z")) - .withExpectedExecutionTime("qhvmblcouqe") + new Step().withName("uzowpuohdkcpr") + .withDescription("kxrzt") + .withErrorMessage("chlutixmqru") + .withStatus("izcbfzmcrunfhiuc") + .withStartTimeUtc(OffsetDateTime.parse("2021-10-12T05:29:04Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-07-28T03:39:03Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-03T05:59:53Z")) + .withExpectedExecutionTime("ktkrumzuedky") + .withSteps( + Arrays + .asList(new Step().withName("xo") + .withDescription("kxiuxqggvqr") + .withErrorMessage("yhlwcjsqg") + .withStatus("hffbxrq") + .withStartTimeUtc(OffsetDateTime.parse("2021-04-12T00:51:48Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-21T04:38:39Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-11T11:24:24Z")) + .withExpectedExecutionTime("sdxeqztvxwmwwmjs") + .withSteps(Arrays.asList(new Step())))), + new Step().withName("wwa") + .withDescription("cleqioulndhzyo") + .withErrorMessage("jhtollh") + .withStatus("idmytzln") + .withStartTimeUtc(OffsetDateTime.parse("2021-08-15T23:34:01Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-11-27T15:39:59Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-12-06T10:04:08Z")) + .withExpectedExecutionTime("oanfbcswqagyw") .withSteps(Arrays.asList( - new Step().withName("cdsziryrand") - .withDescription("pmbltoormkfql") - .withErrorMessage("ldykalsygaolnjp") - .withStatus("bmjk") - .withStartTimeUtc(OffsetDateTime.parse("2021-03-23T11:57:04Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-11-15T02:45:09Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-16T22:07:38Z")) - .withExpectedExecutionTime("xxahmrnadzyqegxy") + new Step().withName("gvjrktpgaeuky") + .withDescription("ohpmwhqn") + .withErrorMessage("sklhsidsjtdlp") + .withStatus("injgazlsvbzfcpuo") + .withStartTimeUtc(OffsetDateTime.parse("2021-08-10T18:21:08Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-09-21T07:05Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-19T23:33:20Z")) + .withExpectedExecutionTime("klhsyekrdrenxol") .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), - new Step().withName("nbm") - .withDescription("bjijkgqxnh") - .withErrorMessage("keznjaujvaa") - .withStatus("ggiycwkdtaawxwf") - .withStartTimeUtc(OffsetDateTime.parse("2021-05-27T21:19:02Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-08-31T11:37:22Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-24T09:38:53Z")) - .withExpectedExecutionTime("mbzmqk") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())), - new Step().withName("nxwbjsidbirkfp") - .withDescription("okdgoge") - .withErrorMessage("jymrhbg") - .withStatus("ozkyewnfnzh") - .withStartTimeUtc(OffsetDateTime.parse("2021-03-12T14:10:09Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-10-27T04:54:24Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-04T18:23:18Z")) - .withExpectedExecutionTime("jkutycyarnr") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())))))); + new Step().withName("h") + .withDescription("eivdlhy") + .withErrorMessage("bdbfgrlp") + .withStatus("ytjlkesmmpath") + .withStartTimeUtc(OffsetDateTime.parse("2021-06-18T16:13:03Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-04-15T07:19:42Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-17T14:30:25Z")) + .withExpectedExecutionTime("niiwllbvgwz") + .withSteps(Arrays.asList(new Step())), + new Step().withName("edous") + .withDescription("tjtgravaqogfkb") + .withErrorMessage("auzlqbtxxw") + .withStatus("h") + .withStartTimeUtc(OffsetDateTime.parse("2021-01-18T16:08:35Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-04-25T18:33:04Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-31T04:59:21Z")) + .withExpectedExecutionTime("zkg") + .withSteps(Arrays.asList(new Step())), + new Step().withName("ywhczzq") + .withDescription("mngqbe") + .withErrorMessage("gis") + .withStatus("wnykdidjchlrmpw") + .withStartTimeUtc(OffsetDateTime.parse("2021-04-01T15:33:13Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-11-26T04:54:01Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-29T04:57:07Z")) + .withExpectedExecutionTime("acdhztxkbr") + .withSteps(Arrays.asList(new Step(), new Step())))))); model = BinaryData.fromObject(model).toObject(Step.class); - Assertions.assertEquals("oaguhic", model.name()); - Assertions.assertEquals("lizst", model.description()); - Assertions.assertEquals("sjvh", model.errorMessage()); - Assertions.assertEquals("eftkwqe", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-20T03:07:47Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-09T22:39:35Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T09:38:44Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("aepwamcxtcz", model.expectedExecutionTime()); - Assertions.assertEquals("uknijduyye", model.steps().get(0).name()); - Assertions.assertEquals("ydjfb", model.steps().get(0).description()); - Assertions.assertEquals("yv", model.steps().get(0).errorMessage()); - Assertions.assertEquals("ulrtywikdmh", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-23T09:58:16Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-20T02:09:46Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-12T20:26:25Z"), + Assertions.assertEquals("qqax", model.name()); + Assertions.assertEquals("vym", model.description()); + Assertions.assertEquals("udndoabhjxw", model.errorMessage()); + Assertions.assertEquals("weuipmpvksmi", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T16:00:43Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T08:32:38Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T05:20:09Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("clkrdpq", model.expectedExecutionTime()); + Assertions.assertEquals("rfrakkld", model.steps().get(0).name()); + Assertions.assertEquals("c", model.steps().get(0).description()); + Assertions.assertEquals("cmfcnrjajq", model.steps().get(0).errorMessage()); + Assertions.assertEquals("txjtielnzqgx", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T06:17:48Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-07T03:50:05Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T13:59:04Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("hgauacdixmxufrs", model.steps().get(0).expectedExecutionTime()); - Assertions.assertEquals("gdkfnoz", model.steps().get(0).steps().get(0).name()); - Assertions.assertEquals("oqbvjhvefgwbmqj", model.steps().get(0).steps().get(0).description()); - Assertions.assertEquals("ntasfaymxbu", model.steps().get(0).steps().get(0).errorMessage()); - Assertions.assertEquals("zealbmqkyo", model.steps().get(0).steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-05T18:36:14Z"), + Assertions.assertEquals("pqagynoiprn", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("incryqxzx", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("zi", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("qimiymqr", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("guhfupe", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T04:36:14Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T15:32:33Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T04:19:59Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T22:04:20Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T06:34:16Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("tsu", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("bpkflanfkgxs", model.steps().get(0).steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageConfigurationTests.java deleted file mode 100644 index af000e4c1c55..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageConfigurationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.StorageConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class StorageConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageConfiguration model - = BinaryData.fromString("{\"partitionSize\":\"wakwseivmakxhys\"}").toObject(StorageConfiguration.class); - Assertions.assertEquals("wakwseivmakxhys", model.partitionSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageConfiguration model = new StorageConfiguration().withPartitionSize("wakwseivmakxhys"); - model = BinaryData.fromObject(model).toObject(StorageConfiguration.class); - Assertions.assertEquals("wakwseivmakxhys", model.partitionSize()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageInitiatorTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageInitiatorTests.java deleted file mode 100644 index 2f684fb0f2c6..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageInitiatorTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.StorageInitiator; - -public final class StorageInitiatorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageInitiator model = BinaryData.fromString( - "{\"initiatorType\":\"iSCSI\",\"initiatorIdentifier\":\"ultassae\",\"portWorldWideName\":\"wnaze\",\"ethernetAdapterName\":\"bkajlcyizy\",\"ethernetAdapterMacAddress\":\"cvxodkrvfsxxby\",\"operationalStatus\":\"sqlv\"}") - .toObject(StorageInitiator.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileTests.java deleted file mode 100644 index cb3234249014..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.StorageProfile; - -public final class StorageProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageProfile model - = BinaryData.fromString("{\"poolableDisksCount\":4099757386895740189}").toObject(StorageProfile.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageS2dConfigTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageS2dConfigTests.java index f8b6cc5d093d..bbac9ca2e851 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageS2dConfigTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageS2dConfigTests.java @@ -14,18 +14,18 @@ public final class StorageS2dConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageS2dConfig model - = BinaryData.fromString("{\"volumeType\":\"ThinProvisioned\",\"overprovisioningRatio\":\"2\"}") + = BinaryData.fromString("{\"volumeType\":\"ThinProvisioned\",\"overprovisioningRatio\":\"1\"}") .toObject(StorageS2dConfig.class); Assertions.assertEquals(VolumeType.THIN_PROVISIONED, model.volumeType()); - Assertions.assertEquals(OverprovisioningRatio.TWO, model.overprovisioningRatio()); + Assertions.assertEquals(OverprovisioningRatio.ONE, model.overprovisioningRatio()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageS2dConfig model = new StorageS2dConfig().withVolumeType(VolumeType.THIN_PROVISIONED) - .withOverprovisioningRatio(OverprovisioningRatio.TWO); + .withOverprovisioningRatio(OverprovisioningRatio.ONE); model = BinaryData.fromObject(model).toObject(StorageS2dConfig.class); Assertions.assertEquals(VolumeType.THIN_PROVISIONED, model.volumeType()); - Assertions.assertEquals(OverprovisioningRatio.TWO, model.overprovisioningRatio()); + Assertions.assertEquals(OverprovisioningRatio.ONE, model.overprovisioningRatio()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageSanConfigTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageSanConfigTests.java index 6c7838e7dddb..3f13ac8f75fe 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageSanConfigTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageSanConfigTests.java @@ -12,18 +12,17 @@ public final class StorageSanConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageSanConfig model - = BinaryData.fromString("{\"infraVolLunId\":\"qgbdbuta\",\"infraPerfLunId\":\"fbtkuwhhmhyk\"}") + = BinaryData.fromString("{\"infraVolLunId\":\"aokonzmnsik\",\"infraPerfLunId\":\"kqze\"}") .toObject(StorageSanConfig.class); - Assertions.assertEquals("qgbdbuta", model.infraVolLunId()); - Assertions.assertEquals("fbtkuwhhmhyk", model.infraPerfLunId()); + Assertions.assertEquals("aokonzmnsik", model.infraVolLunId()); + Assertions.assertEquals("kqze", model.infraPerfLunId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StorageSanConfig model - = new StorageSanConfig().withInfraVolLunId("qgbdbuta").withInfraPerfLunId("fbtkuwhhmhyk"); + StorageSanConfig model = new StorageSanConfig().withInfraVolLunId("aokonzmnsik").withInfraPerfLunId("kqze"); model = BinaryData.fromObject(model).toObject(StorageSanConfig.class); - Assertions.assertEquals("qgbdbuta", model.infraVolLunId()); - Assertions.assertEquals("fbtkuwhhmhyk", model.infraPerfLunId()); + Assertions.assertEquals("aokonzmnsik", model.infraVolLunId()); + Assertions.assertEquals("kqze", model.infraPerfLunId()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageTests.java index e9f6369a21e6..1fc31465b510 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageTests.java @@ -17,29 +17,29 @@ public final class StorageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Storage model = BinaryData.fromString( - "{\"configurationMode\":\"qxwbpokulpiu\",\"storageType\":\"S2D\",\"s2d\":{\"volumeType\":\"ThinProvisioned\",\"overprovisioningRatio\":\"1\"},\"san\":{\"infraVolLunId\":\"obyu\",\"infraPerfLunId\":\"rpqlp\"}}") + "{\"configurationMode\":\"emwabnet\",\"storageType\":\"SAN\",\"s2d\":{\"volumeType\":\"Fixed\",\"overprovisioningRatio\":\"0\"},\"san\":{\"infraVolLunId\":\"vwiwubmwmbesld\",\"infraPerfLunId\":\"wwtppj\"}}") .toObject(Storage.class); - Assertions.assertEquals("qxwbpokulpiu", model.configurationMode()); - Assertions.assertEquals(StorageType.S2D, model.storageType()); - Assertions.assertEquals(VolumeType.THIN_PROVISIONED, model.s2d().volumeType()); - Assertions.assertEquals(OverprovisioningRatio.ONE, model.s2d().overprovisioningRatio()); - Assertions.assertEquals("obyu", model.san().infraVolLunId()); - Assertions.assertEquals("rpqlp", model.san().infraPerfLunId()); + Assertions.assertEquals("emwabnet", model.configurationMode()); + Assertions.assertEquals(StorageType.SAN, model.storageType()); + Assertions.assertEquals(VolumeType.FIXED, model.s2d().volumeType()); + Assertions.assertEquals(OverprovisioningRatio.ZERO, model.s2d().overprovisioningRatio()); + Assertions.assertEquals("vwiwubmwmbesld", model.san().infraVolLunId()); + Assertions.assertEquals("wwtppj", model.san().infraPerfLunId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Storage model = new Storage().withConfigurationMode("qxwbpokulpiu") - .withStorageType(StorageType.S2D) - .withS2d(new StorageS2dConfig().withVolumeType(VolumeType.THIN_PROVISIONED) - .withOverprovisioningRatio(OverprovisioningRatio.ONE)) - .withSan(new StorageSanConfig().withInfraVolLunId("obyu").withInfraPerfLunId("rpqlp")); + Storage model = new Storage().withConfigurationMode("emwabnet") + .withStorageType(StorageType.SAN) + .withS2d(new StorageS2dConfig().withVolumeType(VolumeType.FIXED) + .withOverprovisioningRatio(OverprovisioningRatio.ZERO)) + .withSan(new StorageSanConfig().withInfraVolLunId("vwiwubmwmbesld").withInfraPerfLunId("wwtppj")); model = BinaryData.fromObject(model).toObject(Storage.class); - Assertions.assertEquals("qxwbpokulpiu", model.configurationMode()); - Assertions.assertEquals(StorageType.S2D, model.storageType()); - Assertions.assertEquals(VolumeType.THIN_PROVISIONED, model.s2d().volumeType()); - Assertions.assertEquals(OverprovisioningRatio.ONE, model.s2d().overprovisioningRatio()); - Assertions.assertEquals("obyu", model.san().infraVolLunId()); - Assertions.assertEquals("rpqlp", model.san().infraPerfLunId()); + Assertions.assertEquals("emwabnet", model.configurationMode()); + Assertions.assertEquals(StorageType.SAN, model.storageType()); + Assertions.assertEquals(VolumeType.FIXED, model.s2d().volumeType()); + Assertions.assertEquals(OverprovisioningRatio.ZERO, model.s2d().overprovisioningRatio()); + Assertions.assertEquals("vwiwubmwmbesld", model.san().infraVolLunId()); + Assertions.assertEquals("wwtppj", model.san().infraPerfLunId()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchDetailTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchDetailTests.java index 12762d8e1c5d..01a11105d3fc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchDetailTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchDetailTests.java @@ -11,7 +11,7 @@ public final class SwitchDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SwitchDetail model = BinaryData.fromString( - "{\"switchName\":\"h\",\"switchType\":\"jtbxqmuluxlx\",\"extensions\":[{\"switchId\":\"ers\",\"extensionName\":\"cucrwnamikze\",\"extensionEnabled\":false},{\"switchId\":\"smswziqgfuh\",\"extensionName\":\"zruswh\",\"extensionEnabled\":true},{\"switchId\":\"znvfbycjsxjww\",\"extensionName\":\"z\",\"extensionEnabled\":true}]}") + "{\"switchName\":\"vjufycsjmlbe\",\"switchType\":\"ej\",\"extensions\":[{\"switchId\":\"xeg\",\"extensionName\":\"ortudawlpjfel\",\"extensionEnabled\":true},{\"switchId\":\"ptcbgqnzmnh\",\"extensionName\":\"lialwcjgckbbcccg\",\"extensionEnabled\":true}]}") .toObject(SwitchDetail.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchExtensionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchExtensionTests.java index ddfe7f452cc8..c42b8aea013e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchExtensionTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SwitchExtensionTests.java @@ -11,8 +11,7 @@ public final class SwitchExtensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SwitchExtension model = BinaryData - .fromString( - "{\"switchId\":\"mxqhndvnoamldse\",\"extensionName\":\"ohdjhhflzok\",\"extensionEnabled\":false}") + .fromString("{\"switchId\":\"oxnyuffatsg\",\"extensionName\":\"ipwcxbyu\",\"extensionEnabled\":true}") .toObject(SwitchExtension.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TargetDeviceConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TargetDeviceConfigurationTests.java deleted file mode 100644 index 81f65e5e4882..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TargetDeviceConfigurationTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpAddressRange; -import com.azure.resourcemanager.azurestackhci.models.IpAssignmentType; -import com.azure.resourcemanager.azurestackhci.models.NetworkAdapter; -import com.azure.resourcemanager.azurestackhci.models.NetworkConfiguration; -import com.azure.resourcemanager.azurestackhci.models.StorageConfiguration; -import com.azure.resourcemanager.azurestackhci.models.TargetDeviceConfiguration; -import com.azure.resourcemanager.azurestackhci.models.TimeConfiguration; -import com.azure.resourcemanager.azurestackhci.models.WebProxyConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TargetDeviceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetDeviceConfiguration model = BinaryData.fromString( - "{\"network\":{\"networkAdapters\":[{\"ipAssignmentType\":\"Automatic\",\"ipAddress\":\"rcwfcmfcnrjajq\",\"adapterName\":\"txjtielnzqgx\",\"macAddress\":\"fbbmtlp\",\"ipAddressRange\":{\"startIp\":\"gynoiprnzcali\",\"endIp\":\"cryqxzx\"},\"gateway\":\"zi\",\"subnetMask\":\"qimiymqr\",\"dnsAddressArray\":[\"u\",\"fupetasvv\"],\"vlanId\":\"sbpkf\"},{\"ipAssignmentType\":\"Manual\",\"ipAddress\":\"fkg\",\"adapterName\":\"yao\",\"macAddress\":\"zowpuohdkcprgukx\",\"ipAddressRange\":{\"startIp\":\"tiochlutixmqr\",\"endIp\":\"djizcbf\"},\"gateway\":\"crunfhi\",\"subnetMask\":\"nmfbc\",\"dnsAddressArray\":[\"ktkrumzuedky\",\"bfvxovqkxiuxq\",\"gvqrnhyhlwcj\",\"qggjhf\"],\"vlanId\":\"xrqrkijpeuqlsd\"}]},\"hostName\":\"qztvx\",\"webProxy\":{\"connectionUri\":\"wmjswenaww\",\"port\":\"ecleqioulndhzyo\",\"bypassList\":[\"ht\",\"llhsvidmyt\"]},\"time\":{\"primaryTimeServer\":\"glxpnovyoanfbcsw\",\"secondaryTimeServer\":\"gywvtxig\",\"timeZone\":\"rktpgaeu\"},\"storage\":{\"partitionSize\":\"wohpmwhqnucs\"}}") - .toObject(TargetDeviceConfiguration.class); - Assertions.assertEquals(IpAssignmentType.AUTOMATIC, - model.network().networkAdapters().get(0).ipAssignmentType()); - Assertions.assertEquals("rcwfcmfcnrjajq", model.network().networkAdapters().get(0).ipAddress()); - Assertions.assertEquals("txjtielnzqgx", model.network().networkAdapters().get(0).adapterName()); - Assertions.assertEquals("fbbmtlp", model.network().networkAdapters().get(0).macAddress()); - Assertions.assertEquals("gynoiprnzcali", model.network().networkAdapters().get(0).ipAddressRange().startIp()); - Assertions.assertEquals("cryqxzx", model.network().networkAdapters().get(0).ipAddressRange().endIp()); - Assertions.assertEquals("zi", model.network().networkAdapters().get(0).gateway()); - Assertions.assertEquals("qimiymqr", model.network().networkAdapters().get(0).subnetMask()); - Assertions.assertEquals("u", model.network().networkAdapters().get(0).dnsAddressArray().get(0)); - Assertions.assertEquals("sbpkf", model.network().networkAdapters().get(0).vlanId()); - Assertions.assertEquals("qztvx", model.hostName()); - Assertions.assertEquals("wmjswenaww", model.webProxy().connectionUri()); - Assertions.assertEquals("ecleqioulndhzyo", model.webProxy().port()); - Assertions.assertEquals("ht", model.webProxy().bypassList().get(0)); - Assertions.assertEquals("glxpnovyoanfbcsw", model.time().primaryTimeServer()); - Assertions.assertEquals("gywvtxig", model.time().secondaryTimeServer()); - Assertions.assertEquals("rktpgaeu", model.time().timeZone()); - Assertions.assertEquals("wohpmwhqnucs", model.storage().partitionSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetDeviceConfiguration model - = new TargetDeviceConfiguration() - .withNetwork( - new NetworkConfiguration() - .withNetworkAdapters(Arrays.asList( - new NetworkAdapter().withIpAssignmentType(IpAssignmentType.AUTOMATIC) - .withIpAddress("rcwfcmfcnrjajq") - .withAdapterName("txjtielnzqgx") - .withMacAddress("fbbmtlp") - .withIpAddressRange( - new IpAddressRange().withStartIp("gynoiprnzcali").withEndIp("cryqxzx")) - .withGateway("zi") - .withSubnetMask("qimiymqr") - .withDnsAddressArray(Arrays.asList("u", "fupetasvv")) - .withVlanId("sbpkf"), - new NetworkAdapter().withIpAssignmentType(IpAssignmentType.MANUAL) - .withIpAddress("fkg") - .withAdapterName("yao") - .withMacAddress("zowpuohdkcprgukx") - .withIpAddressRange( - new IpAddressRange().withStartIp("tiochlutixmqr").withEndIp("djizcbf")) - .withGateway("crunfhi") - .withSubnetMask("nmfbc") - .withDnsAddressArray( - Arrays.asList("ktkrumzuedky", "bfvxovqkxiuxq", "gvqrnhyhlwcj", "qggjhf")) - .withVlanId("xrqrkijpeuqlsd")))) - .withHostName("qztvx") - .withWebProxy(new WebProxyConfiguration().withConnectionUri("wmjswenaww") - .withPort("ecleqioulndhzyo") - .withBypassList(Arrays.asList("ht", "llhsvidmyt"))) - .withTime(new TimeConfiguration().withPrimaryTimeServer("glxpnovyoanfbcsw") - .withSecondaryTimeServer("gywvtxig") - .withTimeZone("rktpgaeu")) - .withStorage(new StorageConfiguration().withPartitionSize("wohpmwhqnucs")); - model = BinaryData.fromObject(model).toObject(TargetDeviceConfiguration.class); - Assertions.assertEquals(IpAssignmentType.AUTOMATIC, - model.network().networkAdapters().get(0).ipAssignmentType()); - Assertions.assertEquals("rcwfcmfcnrjajq", model.network().networkAdapters().get(0).ipAddress()); - Assertions.assertEquals("txjtielnzqgx", model.network().networkAdapters().get(0).adapterName()); - Assertions.assertEquals("fbbmtlp", model.network().networkAdapters().get(0).macAddress()); - Assertions.assertEquals("gynoiprnzcali", model.network().networkAdapters().get(0).ipAddressRange().startIp()); - Assertions.assertEquals("cryqxzx", model.network().networkAdapters().get(0).ipAddressRange().endIp()); - Assertions.assertEquals("zi", model.network().networkAdapters().get(0).gateway()); - Assertions.assertEquals("qimiymqr", model.network().networkAdapters().get(0).subnetMask()); - Assertions.assertEquals("u", model.network().networkAdapters().get(0).dnsAddressArray().get(0)); - Assertions.assertEquals("sbpkf", model.network().networkAdapters().get(0).vlanId()); - Assertions.assertEquals("qztvx", model.hostName()); - Assertions.assertEquals("wmjswenaww", model.webProxy().connectionUri()); - Assertions.assertEquals("ecleqioulndhzyo", model.webProxy().port()); - Assertions.assertEquals("ht", model.webProxy().bypassList().get(0)); - Assertions.assertEquals("glxpnovyoanfbcsw", model.time().primaryTimeServer()); - Assertions.assertEquals("gywvtxig", model.time().secondaryTimeServer()); - Assertions.assertEquals("rktpgaeu", model.time().timeZone()); - Assertions.assertEquals("wohpmwhqnucs", model.storage().partitionSize()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TimeConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TimeConfigurationTests.java deleted file mode 100644 index f8d237d1ea01..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/TimeConfigurationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.TimeConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class TimeConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TimeConfiguration model = BinaryData.fromString( - "{\"primaryTimeServer\":\"nojisgglmvok\",\"secondaryTimeServer\":\"uztjct\",\"timeZone\":\"pvbkaehxsmzyg\"}") - .toObject(TimeConfiguration.class); - Assertions.assertEquals("nojisgglmvok", model.primaryTimeServer()); - Assertions.assertEquals("uztjct", model.secondaryTimeServer()); - Assertions.assertEquals("pvbkaehxsmzyg", model.timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TimeConfiguration model = new TimeConfiguration().withPrimaryTimeServer("nojisgglmvok") - .withSecondaryTimeServer("uztjct") - .withTimeZone("pvbkaehxsmzyg"); - model = BinaryData.fromObject(model).toObject(TimeConfiguration.class); - Assertions.assertEquals("nojisgglmvok", model.primaryTimeServer()); - Assertions.assertEquals("uztjct", model.secondaryTimeServer()); - Assertions.assertEquals("pvbkaehxsmzyg", model.timeZone()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateListTests.java index 3926cb6ec0f5..c33cadfc91d9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateListTests.java @@ -19,49 +19,49 @@ public final class UpdateListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Error\",\"installedDate\":\"2021-10-06T14:05:03Z\",\"description\":\"skbrreqynkc\",\"minSbeVersionRequired\":\"sfaq\",\"state\":\"Recalled\",\"prerequisites\":[{\"updateType\":\"ysh\",\"version\":\"d\",\"packageName\":\"bxgkqusy\"},{\"updateType\":\"ptdacarvvl\",\"version\":\"tymtpoiwenazer\",\"packageName\":\"zrsq\"}],\"componentVersions\":[{\"packageType\":\"kdnwqapfgsdpcve\",\"version\":\"mzhhkuuipldqqc\",\"lastUpdated\":\"2021-11-22T10:53:48Z\"},{\"packageType\":\"alblhtjqvq\",\"version\":\"wehtaemxh\",\"lastUpdated\":\"2021-10-17T06:46:55Z\"},{\"packageType\":\"ev\",\"version\":\"xivzrrry\",\"lastUpdated\":\"2021-05-10T08:48:58Z\"},{\"packageType\":\"ipsk\",\"version\":\"zatvfuzka\",\"lastUpdated\":\"2021-04-12T15:01:43Z\"}],\"rebootRequired\":\"Unknown\",\"healthState\":\"Warning\",\"healthCheckResult\":[{\"name\":\"gsyeipqdsmjtg\",\"displayName\":\"gdgkki\",\"tags\":{},\"healthCheckTags\":\"\\\"datalkcsmknhwtbbae\\\"\",\"title\":\"rvvmqfloygb\",\"status\":\"ValidationInProgress\",\"severity\":\"Informational\",\"description\":\"xdgd\",\"remediation\":\"abgdexj\",\"targetResourceID\":\"vjsaqwotm\",\"targetResourceName\":\"llcolsrsxapte\",\"targetResourceType\":\"excgjokjljnhvl\",\"timestamp\":\"2021-08-01T12:22:11Z\",\"additionalData\":\"kpeeksnbksdqhj\",\"healthCheckSource\":\"klxesl\"},{\"name\":\"hustcpoqmavnwqjw\",\"displayName\":\"knlejjjkxybwfd\",\"tags\":{},\"healthCheckTags\":\"\\\"databztensvkzykjtj\\\"\",\"title\":\"sxfwushcdp\",\"status\":\"NotConnectedRecently\",\"severity\":\"Informational\",\"description\":\"mgjfbpkuwxeoio\",\"remediation\":\"izfavkjzwf\",\"targetResourceID\":\"yay\",\"targetResourceName\":\"mfzsbf\",\"targetResourceType\":\"rzx\",\"timestamp\":\"2021-09-29T23:48:39Z\",\"additionalData\":\"srsx\",\"healthCheckSource\":\"plbjaze\"},{\"name\":\"w\",\"displayName\":\"yoyp\",\"tags\":{},\"healthCheckTags\":\"\\\"databrnnhjxsqw\\\"\",\"title\":\"qkbiwet\",\"status\":\"ValidationFailed\",\"severity\":\"Critical\",\"description\":\"qiqyhgfsetzlexbs\",\"remediation\":\"e\",\"targetResourceID\":\"no\",\"targetResourceName\":\"ziu\",\"targetResourceType\":\"bzkkd\",\"timestamp\":\"2021-01-16T18:12:39Z\",\"additionalData\":\"sycljsel\",\"healthCheckSource\":\"pbafvafhlbylc\"}],\"healthCheckDate\":\"2021-05-04T18:16:01Z\",\"packagePath\":\"xrhyzdfwrsofplt\",\"packageSizeInMb\":36.63084919503835,\"displayName\":\"rrhvhfnracwnpq\",\"version\":\"tuujwouh\",\"publisher\":\"wsigrbjbxsj\",\"releaseLink\":\"vitvqkjyaz\",\"availabilityType\":\"Notify\",\"packageType\":\"ggmuwdcho\",\"additionalProperties\":\"nkf\",\"updateStateProperties\":{\"progressPercentage\":3.7961767071743147,\"notifyMessage\":\"oakizvoai\"}},\"location\":\"a\",\"id\":\"nuwiguyxlykwph\",\"name\":\"xzcwxhmpejt\",\"type\":\"ke\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"installedDate\":\"2021-09-17T09:38:18Z\",\"description\":\"kcq\",\"minSbeVersionRequired\":\"xhxknlc\",\"state\":\"ReadyToInstall\",\"prerequisites\":[{\"updateType\":\"upijubyqjfkakfq\",\"version\":\"kemyil\",\"packageName\":\"dxjascowvfdj\"},{\"updateType\":\"dxphlk\",\"version\":\"nmgzvyfijdkzuqnw\",\"packageName\":\"thuqolyahluq\"},{\"updateType\":\"ulsutrjbhxy\",\"version\":\"hyqezvqq\",\"packageName\":\"drftbcvexreuquo\"}],\"componentVersions\":[{\"packageType\":\"vfwhreagkhyxv\",\"version\":\"tvbczsulm\",\"lastUpdated\":\"2021-06-28T04:25:20Z\"},{\"packageType\":\"mepjpf\",\"version\":\"ykgsangpszng\",\"lastUpdated\":\"2021-01-04T07:03:19Z\"},{\"packageType\":\"ylkvecjuj\",\"version\":\"goadyedmzr\",\"lastUpdated\":\"2021-09-13T17:00:43Z\"}],\"rebootRequired\":\"False\",\"healthState\":\"InProgress\",\"healthCheckResult\":[{\"name\":\"itpkpztrgdg\",\"displayName\":\"coqra\",\"tags\":{},\"healthCheckTags\":\"\\\"datagyxpqit\\\"\",\"title\":\"ialwv\",\"status\":\"DeploymentFailed\",\"severity\":\"Informational\",\"description\":\"acaqtyltcoqcu\",\"remediation\":\"dsxzakuejkmvb\",\"targetResourceID\":\"tjo\",\"targetResourceName\":\"cvovjufyc\",\"targetResourceType\":\"mlbemy\",\"timestamp\":\"2021-08-26T00:52:57Z\",\"additionalData\":\"iuxegth\",\"healthCheckSource\":\"tudaw\"},{\"name\":\"jfel\",\"displayName\":\"rpptcbgqnzmnhiil\",\"tags\":{},\"healthCheckTags\":\"\\\"dataw\\\"\",\"title\":\"gckbb\",\"status\":\"DeploymentFailed\",\"severity\":\"Warning\",\"description\":\"raoxnyuff\",\"remediation\":\"sgftipwc\",\"targetResourceID\":\"yubhiqdx\",\"targetResourceName\":\"rnpnuhzafccnuh\",\"targetResourceType\":\"gbylbuig\",\"timestamp\":\"2021-11-05T02:21:15Z\",\"additionalData\":\"tvcrkdlbnbqxvh\",\"healthCheckSource\":\"yhzlwxaeaovurexd\"},{\"name\":\"sbdweaderzmwnt\",\"displayName\":\"agttm\",\"tags\":{},\"healthCheckTags\":\"\\\"dataagoaqylkjztji\\\"\",\"title\":\"zjcg\",\"status\":\"NotSpecified\",\"severity\":\"Hidden\",\"description\":\"inzcpdltkrlgj\",\"remediation\":\"bd\",\"targetResourceID\":\"cqguef\",\"targetResourceName\":\"ompheqdur\",\"targetResourceType\":\"yujlfyoumpckyecl\",\"timestamp\":\"2021-02-12T08:53:41Z\",\"additionalData\":\"ptajbrzmq\",\"healthCheckSource\":\"cycijoclxiut\"}],\"healthCheckDate\":\"2021-08-12T23:35:09Z\",\"packagePath\":\"z\",\"packageSizeInMb\":46.23556213994268,\"displayName\":\"r\",\"version\":\"btxjeaoqaqbzg\",\"publisher\":\"fwwvuatbwbqam\",\"releaseLink\":\"uliyslpkcv\",\"availabilityType\":\"Online\",\"packageType\":\"uxx\",\"additionalProperties\":\"myw\",\"updateStateProperties\":{\"progressPercentage\":65.9285396876913,\"notifyMessage\":\"miciij\"}},\"location\":\"kzfbojxjmcsmyq\",\"id\":\"xv\",\"name\":\"pwnkwywzwo\",\"type\":\"alickduoi\"},{\"properties\":{\"provisioningState\":\"Disconnected\",\"installedDate\":\"2021-05-12T19:00:31Z\",\"description\":\"sknxrwzawnvsbcf\",\"minSbeVersionRequired\":\"agxnvhycvdimw\",\"state\":\"HealthCheckFailed\",\"prerequisites\":[{\"updateType\":\"gy\",\"version\":\"utrwpweryekz\",\"packageName\":\"hmeott\"}],\"componentVersions\":[{\"packageType\":\"osxw\",\"version\":\"nhjtf\",\"lastUpdated\":\"2021-04-23T01:35:01Z\"},{\"packageType\":\"pmil\",\"version\":\"nwynudq\",\"lastUpdated\":\"2021-05-19T05:47:49Z\"}],\"rebootRequired\":\"False\",\"healthState\":\"Failure\",\"healthCheckResult\":[{\"name\":\"xee\",\"displayName\":\"xiqhzlraymezxlsk\",\"tags\":{},\"healthCheckTags\":\"\\\"dataxrfdsajre\\\"\",\"title\":\"wyyshtuwgm\",\"status\":\"ValidationSuccess\",\"severity\":\"Hidden\",\"description\":\"wzyif\",\"remediation\":\"gwltxeqip\",\"targetResourceID\":\"zdyi\",\"targetResourceName\":\"fayorpravkjoges\",\"targetResourceType\":\"bnsmjkwynqxaek\",\"timestamp\":\"2021-07-10T07:16:32Z\",\"additionalData\":\"vwjtqpkevmyltjc\",\"healthCheckSource\":\"pxklurccl\"},{\"name\":\"xa\",\"displayName\":\"noytzposewxigp\",\"tags\":{},\"healthCheckTags\":\"\\\"dataqm\\\"\",\"title\":\"pxvpifdfaif\",\"status\":\"DeploymentSuccess\",\"severity\":\"Warning\",\"description\":\"uubeid\",\"remediation\":\"l\",\"targetResourceID\":\"toi\",\"targetResourceName\":\"gygvfltgvdiho\",\"targetResourceType\":\"krxwet\",\"timestamp\":\"2021-03-03T08:34:14Z\",\"additionalData\":\"cy\",\"healthCheckSource\":\"cpcunnuzdqum\"},{\"name\":\"nod\",\"displayName\":\"ienhqhskndnelq\",\"tags\":{},\"healthCheckTags\":\"\\\"datadlknwfoanniyop\\\"\",\"title\":\"xivcnrlyxnu\",\"status\":\"ValidationFailed\",\"severity\":\"Informational\",\"description\":\"lkwq\",\"remediation\":\"tv\",\"targetResourceID\":\"sdtcjbctvivuzqym\",\"targetResourceName\":\"owog\",\"targetResourceType\":\"it\",\"timestamp\":\"2021-04-26T21:28:46Z\",\"additionalData\":\"vbrzcdb\",\"healthCheckSource\":\"fzndscxmxeatkd\"}],\"healthCheckDate\":\"2021-06-16T10:55:30Z\",\"packagePath\":\"rdjyibqb\",\"packageSizeInMb\":56.701472803305386,\"displayName\":\"jrmkuhmaxljalf\",\"version\":\"cjmobcanc\",\"publisher\":\"xxqcwgaxf\",\"releaseLink\":\"aknokzwjjzrl\",\"availabilityType\":\"Notify\",\"packageType\":\"dzyyfytpq\",\"additionalProperties\":\"x\",\"updateStateProperties\":{\"progressPercentage\":14.258834353690963,\"notifyMessage\":\"ivyqlkjuvsmbmsl\"}},\"location\":\"yovwzdbpqv\",\"id\":\"efgv\",\"name\":\"x\",\"type\":\"okcvtlubses\"}],\"nextLink\":\"cua\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"installedDate\":\"2021-04-21T04:59:48Z\",\"description\":\"wg\",\"minSbeVersionRequired\":\"tmk\",\"state\":\"Preparing\",\"prerequisites\":[{\"updateType\":\"waqxofqovc\",\"version\":\"qbplvfiduszte\",\"packageName\":\"byjgmsfepx\"},{\"updateType\":\"hpqadagrhrdicxdw\",\"version\":\"fowxwyovcxjsgbi\",\"packageName\":\"ukdveksbuhoduc\"},{\"updateType\":\"lscrdpibfdyjduss\",\"version\":\"szekbh\",\"packageName\":\"kaaggkreh\"}],\"componentVersions\":[{\"packageType\":\"uybffljfiim\",\"version\":\"oags\",\"lastUpdated\":\"2021-10-28T18:29:57Z\"},{\"packageType\":\"dusr\",\"version\":\"xfavsqwudoh\",\"lastUpdated\":\"2021-05-08T17:26:42Z\"},{\"packageType\":\"mnlikpsi\",\"version\":\"feypofqpmb\",\"lastUpdated\":\"2021-04-29T20:00Z\"}],\"rebootRequired\":\"Unknown\",\"healthState\":\"InProgress\",\"healthCheckResult\":[{\"name\":\"tjxophgerhsmv\",\"displayName\":\"htwzmqilr\",\"tags\":{},\"healthCheckTags\":\"\\\"datasfnim\\\"\",\"title\":\"y\",\"status\":\"NotConnectedRecently\",\"severity\":\"Hidden\",\"description\":\"ruwaedry\",\"remediation\":\"mlqoinhzduew\",\"targetResourceID\":\"apfjiik\",\"targetResourceName\":\"diqfliejhpclbi\",\"targetResourceType\":\"fsbw\",\"timestamp\":\"2021-07-15T00:02:56Z\",\"additionalData\":\"bv\",\"healthCheckSource\":\"pbwxgoooxz\"},{\"name\":\"admskx\",\"displayName\":\"pdgzigjsugswhg\",\"tags\":{},\"healthCheckTags\":\"\\\"datadkwwn\\\"\",\"title\":\"foct\",\"status\":\"NotSpecified\",\"severity\":\"Hidden\",\"description\":\"uvwsxbgnvk\",\"remediation\":\"vqchoadhrs\",\"targetResourceID\":\"vzvsp\",\"targetResourceName\":\"dsrgfajg\",\"targetResourceType\":\"rsubklrxhjnl\",\"timestamp\":\"2021-06-10T19:55:50Z\",\"additionalData\":\"jdvqy\",\"healthCheckSource\":\"eqq\"},{\"name\":\"aruwdxvqzxoebw\",\"displayName\":\"xbibanbaupw\",\"tags\":{},\"healthCheckTags\":\"\\\"datapak\\\"\",\"title\":\"zkxbzrpejplss\",\"status\":\"ValidationSuccess\",\"severity\":\"Warning\",\"description\":\"kgsuxunrswgk\",\"remediation\":\"hboyikebhuhks\",\"targetResourceID\":\"wlokhueoijyzcq\",\"targetResourceName\":\"zqzu\",\"targetResourceType\":\"s\",\"timestamp\":\"2021-11-14T02:47:31Z\",\"additionalData\":\"y\",\"healthCheckSource\":\"wtfxpt\"}],\"healthCheckDate\":\"2021-07-05T16:10:08Z\",\"packagePath\":\"amkncfgy\",\"packageSizeInMb\":78.30618813295126,\"displayName\":\"xocuullojkpoyhgw\",\"version\":\"j\",\"publisher\":\"dbdljz\",\"releaseLink\":\"yrcvuqbsgzlrq\",\"availabilityType\":\"Online\",\"packageType\":\"qogdx\",\"additionalProperties\":\"sfpyxx\",\"updateStateProperties\":{\"progressPercentage\":76.25242672371442,\"notifyMessage\":\"cominxojjluxx\"}},\"location\":\"ilz\",\"id\":\"zzqjmu\",\"name\":\"za\",\"type\":\"ovribq\"},{\"properties\":{\"provisioningState\":\"Moving\",\"installedDate\":\"2021-07-04T10:51Z\",\"description\":\"vwta\",\"minSbeVersionRequired\":\"kcqwwxwjyofgwh\",\"state\":\"HealthCheckExpired\",\"prerequisites\":[{\"updateType\":\"ljssm\",\"version\":\"sn\",\"packageName\":\"kpwolg\"},{\"updateType\":\"ubxbteogfgfiijr\",\"version\":\"wlefksxqceazfpxg\",\"packageName\":\"qvzvlu\"}],\"componentVersions\":[{\"packageType\":\"ios\",\"version\":\"cyvaifppuacvfy\",\"lastUpdated\":\"2021-09-15T10:21:10Z\"}],\"rebootRequired\":\"True\",\"healthState\":\"Success\",\"healthCheckResult\":[{\"name\":\"hsoymhpvtyqf\",\"displayName\":\"ehdpboujstkfvvds\",\"tags\":{},\"healthCheckTags\":\"\\\"datadedsuenygnxcgjtf\\\"\",\"title\":\"quktrfnslnl\",\"status\":\"ConnectedRecently\",\"severity\":\"Critical\",\"description\":\"trwntfmtbgw\",\"remediation\":\"xwnaz\",\"targetResourceID\":\"rrdreyzjwhset\",\"targetResourceName\":\"jwzzqseuzu\",\"targetResourceType\":\"y\",\"timestamp\":\"2021-03-10T05:54:24Z\",\"additionalData\":\"hyqqzzdcy\",\"healthCheckSource\":\"ystewfopa\"},{\"name\":\"azgbsqgpe\",\"displayName\":\"c\",\"tags\":{},\"healthCheckTags\":\"\\\"datamdpv\\\"\",\"title\":\"glq\",\"status\":\"ValidationSuccess\",\"severity\":\"Critical\",\"description\":\"clctzey\",\"remediation\":\"mndcov\",\"targetResourceID\":\"zqauxzan\",\"targetResourceName\":\"kvfruwkudr\",\"targetResourceType\":\"pftxudqyeme\",\"timestamp\":\"2021-06-22T20:51:58Z\",\"additionalData\":\"ucmci\",\"healthCheckSource\":\"nee\"}],\"healthCheckDate\":\"2021-03-13T18:42:12Z\",\"packagePath\":\"uwcgxefnoha\",\"packageSizeInMb\":43.87312527239556,\"displayName\":\"izerw\",\"version\":\"dasmxu\",\"publisher\":\"fbngfcocef\",\"releaseLink\":\"riylfmpztra\",\"availabilityType\":\"Local\",\"packageType\":\"hlcdc\",\"additionalProperties\":\"regp\",\"updateStateProperties\":{\"progressPercentage\":31.933976701671753,\"notifyMessage\":\"vr\"}},\"location\":\"nvgyshqrdgrtwme\",\"id\":\"zlpykcfazzwjcay\",\"name\":\"rzrr\",\"type\":\"nsyby\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"installedDate\":\"2021-09-20T13:23:20Z\",\"description\":\"ghsrleinkfscjfn\",\"minSbeVersionRequired\":\"wvuagfqwtl\",\"state\":\"Ready\",\"prerequisites\":[{\"updateType\":\"e\",\"version\":\"trklzmijajwol\",\"packageName\":\"s\"}],\"componentVersions\":[{\"packageType\":\"mpynwlslr\",\"version\":\"gtzjcv\",\"lastUpdated\":\"2021-06-29T16:13:51Z\"}],\"rebootRequired\":\"True\",\"healthState\":\"InProgress\",\"healthCheckResult\":[{\"name\":\"ovyxpavidnie\",\"displayName\":\"ffcvvyezslpuxgcb\",\"tags\":{},\"healthCheckTags\":\"\\\"dataalpnp\\\"\",\"title\":\"trkxgpazwu\",\"status\":\"DeploymentInProgress\",\"severity\":\"Hidden\",\"description\":\"jo\",\"remediation\":\"elhldi\",\"targetResourceID\":\"zz\",\"targetResourceName\":\"lmfaewzgiudjp\",\"targetResourceType\":\"qhttqhnmhkre\",\"timestamp\":\"2021-03-27T07:39:58Z\",\"additionalData\":\"uxh\",\"healthCheckSource\":\"dgcruxspinymm\"}],\"healthCheckDate\":\"2021-11-09T19:31:40Z\",\"packagePath\":\"kmikpaz\",\"packageSizeInMb\":91.17733727570042,\"displayName\":\"uvjipfd\",\"version\":\"axdvwzaehp\",\"publisher\":\"thd\",\"releaseLink\":\"mvetatlakfq\",\"availabilityType\":\"Notify\",\"packageType\":\"giksbbvto\",\"additionalProperties\":\"rpogwphchg\",\"updateStateProperties\":{\"progressPercentage\":39.18665867748948,\"notifyMessage\":\"kfac\"}},\"location\":\"mbf\",\"id\":\"umeezbxvqxb\",\"name\":\"uvwc\",\"type\":\"asgom\"}],\"nextLink\":\"jzwxuqgovsxpwwz\"}") .toObject(UpdateList.class); - Assertions.assertEquals("a", model.value().get(0).location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-06T14:05:03Z"), model.value().get(0).installedDate()); - Assertions.assertEquals("skbrreqynkc", model.value().get(0).description()); - Assertions.assertEquals("sfaq", model.value().get(0).minSbeVersionRequired()); - Assertions.assertEquals(State.RECALLED, model.value().get(0).state()); - Assertions.assertEquals("ysh", model.value().get(0).prerequisites().get(0).updateType()); - Assertions.assertEquals("d", model.value().get(0).prerequisites().get(0).version()); - Assertions.assertEquals("bxgkqusy", model.value().get(0).prerequisites().get(0).packageName()); - Assertions.assertEquals("kdnwqapfgsdpcve", model.value().get(0).componentVersions().get(0).packageType()); - Assertions.assertEquals("mzhhkuuipldqqc", model.value().get(0).componentVersions().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-22T10:53:48Z"), + Assertions.assertEquals("ilz", model.value().get(0).location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-21T04:59:48Z"), model.value().get(0).installedDate()); + Assertions.assertEquals("wg", model.value().get(0).description()); + Assertions.assertEquals("tmk", model.value().get(0).minSbeVersionRequired()); + Assertions.assertEquals(State.PREPARING, model.value().get(0).state()); + Assertions.assertEquals("waqxofqovc", model.value().get(0).prerequisites().get(0).updateType()); + Assertions.assertEquals("qbplvfiduszte", model.value().get(0).prerequisites().get(0).version()); + Assertions.assertEquals("byjgmsfepx", model.value().get(0).prerequisites().get(0).packageName()); + Assertions.assertEquals("uybffljfiim", model.value().get(0).componentVersions().get(0).packageType()); + Assertions.assertEquals("oags", model.value().get(0).componentVersions().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-28T18:29:57Z"), model.value().get(0).componentVersions().get(0).lastUpdated()); Assertions.assertEquals(RebootRequirement.UNKNOWN, model.value().get(0).rebootRequired()); - Assertions.assertEquals(HealthState.WARNING, model.value().get(0).healthState()); - Assertions.assertEquals("gsyeipqdsmjtg", model.value().get(0).healthCheckResult().get(0).name()); - Assertions.assertEquals("gdgkki", model.value().get(0).healthCheckResult().get(0).displayName()); - Assertions.assertEquals("rvvmqfloygb", model.value().get(0).healthCheckResult().get(0).title()); - Assertions.assertEquals(Status.VALIDATION_IN_PROGRESS, + Assertions.assertEquals(HealthState.IN_PROGRESS, model.value().get(0).healthState()); + Assertions.assertEquals("tjxophgerhsmv", model.value().get(0).healthCheckResult().get(0).name()); + Assertions.assertEquals("htwzmqilr", model.value().get(0).healthCheckResult().get(0).displayName()); + Assertions.assertEquals("y", model.value().get(0).healthCheckResult().get(0).title()); + Assertions.assertEquals(Status.NOT_CONNECTED_RECENTLY, model.value().get(0).healthCheckResult().get(0).status()); - Assertions.assertEquals(Severity.INFORMATIONAL, model.value().get(0).healthCheckResult().get(0).severity()); - Assertions.assertEquals("xdgd", model.value().get(0).healthCheckResult().get(0).description()); - Assertions.assertEquals("abgdexj", model.value().get(0).healthCheckResult().get(0).remediation()); - Assertions.assertEquals("vjsaqwotm", model.value().get(0).healthCheckResult().get(0).targetResourceId()); - Assertions.assertEquals("llcolsrsxapte", model.value().get(0).healthCheckResult().get(0).targetResourceName()); - Assertions.assertEquals("excgjokjljnhvl", model.value().get(0).healthCheckResult().get(0).targetResourceType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T12:22:11Z"), + Assertions.assertEquals(Severity.HIDDEN, model.value().get(0).healthCheckResult().get(0).severity()); + Assertions.assertEquals("ruwaedry", model.value().get(0).healthCheckResult().get(0).description()); + Assertions.assertEquals("mlqoinhzduew", model.value().get(0).healthCheckResult().get(0).remediation()); + Assertions.assertEquals("apfjiik", model.value().get(0).healthCheckResult().get(0).targetResourceId()); + Assertions.assertEquals("diqfliejhpclbi", model.value().get(0).healthCheckResult().get(0).targetResourceName()); + Assertions.assertEquals("fsbw", model.value().get(0).healthCheckResult().get(0).targetResourceType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-15T00:02:56Z"), model.value().get(0).healthCheckResult().get(0).timestamp()); - Assertions.assertEquals("kpeeksnbksdqhj", model.value().get(0).healthCheckResult().get(0).additionalData()); - Assertions.assertEquals("klxesl", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T18:16:01Z"), model.value().get(0).healthCheckDate()); - Assertions.assertEquals("xrhyzdfwrsofplt", model.value().get(0).packagePath()); - Assertions.assertEquals(36.63084919503835D, model.value().get(0).packageSizeInMb()); - Assertions.assertEquals("rrhvhfnracwnpq", model.value().get(0).displayName()); - Assertions.assertEquals("tuujwouh", model.value().get(0).version()); - Assertions.assertEquals("wsigrbjbxsj", model.value().get(0).publisher()); - Assertions.assertEquals("vitvqkjyaz", model.value().get(0).releaseLink()); - Assertions.assertEquals(AvailabilityType.NOTIFY, model.value().get(0).availabilityType()); - Assertions.assertEquals("ggmuwdcho", model.value().get(0).packageType()); - Assertions.assertEquals("nkf", model.value().get(0).additionalProperties()); - Assertions.assertEquals(3.7961767071743147D, model.value().get(0).progressPercentage()); - Assertions.assertEquals("oakizvoai", model.value().get(0).notifyMessage()); - Assertions.assertEquals("cua", model.nextLink()); + Assertions.assertEquals("bv", model.value().get(0).healthCheckResult().get(0).additionalData()); + Assertions.assertEquals("pbwxgoooxz", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-05T16:10:08Z"), model.value().get(0).healthCheckDate()); + Assertions.assertEquals("amkncfgy", model.value().get(0).packagePath()); + Assertions.assertEquals(78.30618813295126D, model.value().get(0).packageSizeInMb()); + Assertions.assertEquals("xocuullojkpoyhgw", model.value().get(0).displayName()); + Assertions.assertEquals("j", model.value().get(0).version()); + Assertions.assertEquals("dbdljz", model.value().get(0).publisher()); + Assertions.assertEquals("yrcvuqbsgzlrq", model.value().get(0).releaseLink()); + Assertions.assertEquals(AvailabilityType.ONLINE, model.value().get(0).availabilityType()); + Assertions.assertEquals("qogdx", model.value().get(0).packageType()); + Assertions.assertEquals("sfpyxx", model.value().get(0).additionalProperties()); + Assertions.assertEquals(76.25242672371442D, model.value().get(0).progressPercentage()); + Assertions.assertEquals("cominxojjluxx", model.value().get(0).notifyMessage()); + Assertions.assertEquals("jzwxuqgovsxpwwz", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatePrerequisiteTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatePrerequisiteTests.java index 95282f0a0479..7d143251ce06 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatePrerequisiteTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatePrerequisiteTests.java @@ -12,20 +12,21 @@ public final class UpdatePrerequisiteTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdatePrerequisite model = BinaryData - .fromString("{\"updateType\":\"jv\",\"version\":\"wiswskukjtasbvw\",\"packageName\":\"pkxkdtxfk\"}") + .fromString("{\"updateType\":\"ixiezeag\",\"version\":\"eituugedhfpjs\",\"packageName\":\"zmblsyjdeol\"}") .toObject(UpdatePrerequisite.class); - Assertions.assertEquals("jv", model.updateType()); - Assertions.assertEquals("wiswskukjtasbvw", model.version()); - Assertions.assertEquals("pkxkdtxfk", model.packageName()); + Assertions.assertEquals("ixiezeag", model.updateType()); + Assertions.assertEquals("eituugedhfpjs", model.version()); + Assertions.assertEquals("zmblsyjdeol", model.packageName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdatePrerequisite model - = new UpdatePrerequisite().withUpdateType("jv").withVersion("wiswskukjtasbvw").withPackageName("pkxkdtxfk"); + UpdatePrerequisite model = new UpdatePrerequisite().withUpdateType("ixiezeag") + .withVersion("eituugedhfpjs") + .withPackageName("zmblsyjdeol"); model = BinaryData.fromObject(model).toObject(UpdatePrerequisite.class); - Assertions.assertEquals("jv", model.updateType()); - Assertions.assertEquals("wiswskukjtasbvw", model.version()); - Assertions.assertEquals("pkxkdtxfk", model.packageName()); + Assertions.assertEquals("ixiezeag", model.updateType()); + Assertions.assertEquals("eituugedhfpjs", model.version()); + Assertions.assertEquals("zmblsyjdeol", model.packageName()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunInnerTests.java index ea14ff540197..0593f73bff5f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunInnerTests.java @@ -16,97 +16,106 @@ public final class UpdateRunInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateRunInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"timeStarted\":\"2021-08-20T04:37:56Z\",\"lastUpdatedTime\":\"2021-01-03T03:13:45Z\",\"duration\":\"tafsrbxrblmliowx\",\"state\":\"Failed\",\"progress\":{\"name\":\"xwqagnepzw\",\"description\":\"lsbs\",\"errorMessage\":\"qqagwwr\",\"status\":\"omzisglrrcz\",\"startTimeUtc\":\"2021-04-28T15:57:15Z\",\"endTimeUtc\":\"2021-08-08T05:26:55Z\",\"lastUpdatedTimeUtc\":\"2021-07-10T01:34:25Z\",\"expectedExecutionTime\":\"jadhqoawj\",\"steps\":[{\"name\":\"eayfbpcmspl\",\"description\":\"rrueqthwmg\",\"errorMessage\":\"b\",\"status\":\"bbxi\",\"startTimeUtc\":\"2021-03-27T01:36:05Z\",\"endTimeUtc\":\"2021-10-09T23:24:03Z\",\"lastUpdatedTimeUtc\":\"2021-10-27T05:31:04Z\",\"expectedExecutionTime\":\"opedbwdpyqyybxub\",\"steps\":[{},{}]},{\"name\":\"fcbqwremjela\",\"description\":\"cigeleohdbvqvw\",\"errorMessage\":\"jopwbeonrlkwz\",\"status\":\"ybxc\",\"startTimeUtc\":\"2020-12-30T04:48:18Z\",\"endTimeUtc\":\"2021-09-28T09:02:15Z\",\"lastUpdatedTimeUtc\":\"2021-09-13T10:02:23Z\",\"expectedExecutionTime\":\"oqfyiaseqch\",\"steps\":[{},{},{}]},{\"name\":\"zrazisgyk\",\"description\":\"emv\",\"errorMessage\":\"bwzohmnrxxbs\",\"status\":\"klinhmdptysprq\",\"startTimeUtc\":\"2021-07-09T02:19:10Z\",\"endTimeUtc\":\"2021-06-26T23:35:47Z\",\"lastUpdatedTimeUtc\":\"2021-02-28T20:58:10Z\",\"expectedExecutionTime\":\"slsvjgpliu\",\"steps\":[{},{},{}]}]}},\"location\":\"oyxqvapcohhou\",\"id\":\"pqojxcx\",\"name\":\"rzdcgdzbenribcaw\",\"type\":\"tzqdd\"}") + "{\"properties\":{\"provisioningState\":\"Updating\",\"timeStarted\":\"2021-11-01T13:44:40Z\",\"lastUpdatedTime\":\"2021-06-17T19:50:57Z\",\"duration\":\"zupfkhuytuszxhm\",\"state\":\"Failed\",\"progress\":{\"name\":\"gw\",\"description\":\"ukvzwydwttha\",\"errorMessage\":\"gkskjivbss\",\"status\":\"jqf\",\"startTimeUtc\":\"2021-04-27T07:16:52Z\",\"endTimeUtc\":\"2021-03-04T20:35:42Z\",\"lastUpdatedTimeUtc\":\"2021-05-07T21:44:35Z\",\"expectedExecutionTime\":\"eumilhw\",\"steps\":[{\"name\":\"dexyionofninbdb\",\"description\":\"xcwqqrsmpc\",\"errorMessage\":\"prtug\",\"status\":\"bzbcyksiv\",\"startTimeUtc\":\"2021-04-14T03:40:53Z\",\"endTimeUtc\":\"2021-02-20T10:28:50Z\",\"lastUpdatedTimeUtc\":\"2021-08-13T11:45:23Z\",\"expectedExecutionTime\":\"fcmkr\",\"steps\":[{},{},{},{}]},{\"name\":\"cwjjxsgmbawvif\",\"description\":\"kecifhocjxwklo\",\"errorMessage\":\"rvtxvcmufunlc\",\"status\":\"xvi\",\"startTimeUtc\":\"2021-01-12T19:33:42Z\",\"endTimeUtc\":\"2021-05-14T15:23:24Z\",\"lastUpdatedTimeUtc\":\"2021-01-27T12:25:58Z\",\"expectedExecutionTime\":\"vrquv\",\"steps\":[{},{},{},{}]},{\"name\":\"lpmcrdc\",\"description\":\"ljtiahxmfqryarv\",\"errorMessage\":\"zqbglcjkays\",\"status\":\"hz\",\"startTimeUtc\":\"2021-08-14T21:08:47Z\",\"endTimeUtc\":\"2021-06-25T09:17:51Z\",\"lastUpdatedTimeUtc\":\"2021-11-23T13:13:15Z\",\"expectedExecutionTime\":\"tgblioskkfmk\",\"steps\":[{},{},{},{}]},{\"name\":\"xyxgbkkqv\",\"description\":\"teoedl\",\"errorMessage\":\"lskkzpxvj\",\"status\":\"dpvocojhpcn\",\"startTimeUtc\":\"2021-02-18T09:54:57Z\",\"endTimeUtc\":\"2021-08-22T03:29:14Z\",\"lastUpdatedTimeUtc\":\"2021-12-04T05:54:44Z\",\"expectedExecutionTime\":\"texvzilmhivzk\",\"steps\":[{},{}]}]}},\"location\":\"cknrzda\",\"id\":\"skzptjxulweucyr\",\"name\":\"hxqlehmcgcjeinue\",\"type\":\"oka\"}") .toObject(UpdateRunInner.class); - Assertions.assertEquals("oyxqvapcohhou", model.location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T04:37:56Z"), model.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-03T03:13:45Z"), model.lastUpdatedTime()); - Assertions.assertEquals("tafsrbxrblmliowx", model.duration()); + Assertions.assertEquals("cknrzda", model.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T13:44:40Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T19:50:57Z"), model.lastUpdatedTime()); + Assertions.assertEquals("zupfkhuytuszxhm", model.duration()); Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.state()); - Assertions.assertEquals("xwqagnepzw", model.namePropertiesName()); - Assertions.assertEquals("lsbs", model.description()); - Assertions.assertEquals("qqagwwr", model.errorMessage()); - Assertions.assertEquals("omzisglrrcz", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T15:57:15Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-08T05:26:55Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T01:34:25Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("jadhqoawj", model.expectedExecutionTime()); - Assertions.assertEquals("eayfbpcmspl", model.steps().get(0).name()); - Assertions.assertEquals("rrueqthwmg", model.steps().get(0).description()); - Assertions.assertEquals("b", model.steps().get(0).errorMessage()); - Assertions.assertEquals("bbxi", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T01:36:05Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-09T23:24:03Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T05:31:04Z"), + Assertions.assertEquals("gw", model.namePropertiesName()); + Assertions.assertEquals("ukvzwydwttha", model.description()); + Assertions.assertEquals("gkskjivbss", model.errorMessage()); + Assertions.assertEquals("jqf", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T07:16:52Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T20:35:42Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-07T21:44:35Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("eumilhw", model.expectedExecutionTime()); + Assertions.assertEquals("dexyionofninbdb", model.steps().get(0).name()); + Assertions.assertEquals("xcwqqrsmpc", model.steps().get(0).description()); + Assertions.assertEquals("prtug", model.steps().get(0).errorMessage()); + Assertions.assertEquals("bzbcyksiv", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-14T03:40:53Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T10:28:50Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-13T11:45:23Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("opedbwdpyqyybxub", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("fcmkr", model.steps().get(0).expectedExecutionTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateRunInner model = new UpdateRunInner().withLocation("oyxqvapcohhou") - .withTimeStarted(OffsetDateTime.parse("2021-08-20T04:37:56Z")) - .withLastUpdatedTime(OffsetDateTime.parse("2021-01-03T03:13:45Z")) - .withDuration("tafsrbxrblmliowx") + UpdateRunInner model = new UpdateRunInner().withLocation("cknrzda") + .withTimeStarted(OffsetDateTime.parse("2021-11-01T13:44:40Z")) + .withLastUpdatedTime(OffsetDateTime.parse("2021-06-17T19:50:57Z")) + .withDuration("zupfkhuytuszxhm") .withState(UpdateRunPropertiesState.FAILED) - .withNamePropertiesName("xwqagnepzw") - .withDescription("lsbs") - .withErrorMessage("qqagwwr") - .withStatus("omzisglrrcz") - .withStartTimeUtc(OffsetDateTime.parse("2021-04-28T15:57:15Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-08-08T05:26:55Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-10T01:34:25Z")) - .withExpectedExecutionTime("jadhqoawj") + .withNamePropertiesName("gw") + .withDescription("ukvzwydwttha") + .withErrorMessage("gkskjivbss") + .withStatus("jqf") + .withStartTimeUtc(OffsetDateTime.parse("2021-04-27T07:16:52Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-03-04T20:35:42Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-07T21:44:35Z")) + .withExpectedExecutionTime("eumilhw") .withSteps(Arrays.asList( - new Step().withName("eayfbpcmspl") - .withDescription("rrueqthwmg") - .withErrorMessage("b") - .withStatus("bbxi") - .withStartTimeUtc(OffsetDateTime.parse("2021-03-27T01:36:05Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-10-09T23:24:03Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-27T05:31:04Z")) - .withExpectedExecutionTime("opedbwdpyqyybxub") - .withSteps(Arrays.asList(new Step(), new Step())), - new Step().withName("fcbqwremjela") - .withDescription("cigeleohdbvqvw") - .withErrorMessage("jopwbeonrlkwz") - .withStatus("ybxc") - .withStartTimeUtc(OffsetDateTime.parse("2020-12-30T04:48:18Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-09-28T09:02:15Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-13T10:02:23Z")) - .withExpectedExecutionTime("oqfyiaseqch") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())), - new Step().withName("zrazisgyk") - .withDescription("emv") - .withErrorMessage("bwzohmnrxxbs") - .withStatus("klinhmdptysprq") - .withStartTimeUtc(OffsetDateTime.parse("2021-07-09T02:19:10Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-06-26T23:35:47Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-28T20:58:10Z")) - .withExpectedExecutionTime("slsvjgpliu") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())))); + new Step().withName("dexyionofninbdb") + .withDescription("xcwqqrsmpc") + .withErrorMessage("prtug") + .withStatus("bzbcyksiv") + .withStartTimeUtc(OffsetDateTime.parse("2021-04-14T03:40:53Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-02-20T10:28:50Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-13T11:45:23Z")) + .withExpectedExecutionTime("fcmkr") + .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), + new Step().withName("cwjjxsgmbawvif") + .withDescription("kecifhocjxwklo") + .withErrorMessage("rvtxvcmufunlc") + .withStatus("xvi") + .withStartTimeUtc(OffsetDateTime.parse("2021-01-12T19:33:42Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-14T15:23:24Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-01-27T12:25:58Z")) + .withExpectedExecutionTime("vrquv") + .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), + new Step().withName("lpmcrdc") + .withDescription("ljtiahxmfqryarv") + .withErrorMessage("zqbglcjkays") + .withStatus("hz") + .withStartTimeUtc(OffsetDateTime.parse("2021-08-14T21:08:47Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-06-25T09:17:51Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-11-23T13:13:15Z")) + .withExpectedExecutionTime("tgblioskkfmk") + .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), + new Step().withName("xyxgbkkqv") + .withDescription("teoedl") + .withErrorMessage("lskkzpxvj") + .withStatus("dpvocojhpcn") + .withStartTimeUtc(OffsetDateTime.parse("2021-02-18T09:54:57Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-08-22T03:29:14Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-12-04T05:54:44Z")) + .withExpectedExecutionTime("texvzilmhivzk") + .withSteps(Arrays.asList(new Step(), new Step())))); model = BinaryData.fromObject(model).toObject(UpdateRunInner.class); - Assertions.assertEquals("oyxqvapcohhou", model.location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T04:37:56Z"), model.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-03T03:13:45Z"), model.lastUpdatedTime()); - Assertions.assertEquals("tafsrbxrblmliowx", model.duration()); + Assertions.assertEquals("cknrzda", model.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T13:44:40Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T19:50:57Z"), model.lastUpdatedTime()); + Assertions.assertEquals("zupfkhuytuszxhm", model.duration()); Assertions.assertEquals(UpdateRunPropertiesState.FAILED, model.state()); - Assertions.assertEquals("xwqagnepzw", model.namePropertiesName()); - Assertions.assertEquals("lsbs", model.description()); - Assertions.assertEquals("qqagwwr", model.errorMessage()); - Assertions.assertEquals("omzisglrrcz", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T15:57:15Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-08T05:26:55Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T01:34:25Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("jadhqoawj", model.expectedExecutionTime()); - Assertions.assertEquals("eayfbpcmspl", model.steps().get(0).name()); - Assertions.assertEquals("rrueqthwmg", model.steps().get(0).description()); - Assertions.assertEquals("b", model.steps().get(0).errorMessage()); - Assertions.assertEquals("bbxi", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T01:36:05Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-09T23:24:03Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T05:31:04Z"), + Assertions.assertEquals("gw", model.namePropertiesName()); + Assertions.assertEquals("ukvzwydwttha", model.description()); + Assertions.assertEquals("gkskjivbss", model.errorMessage()); + Assertions.assertEquals("jqf", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T07:16:52Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T20:35:42Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-07T21:44:35Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("eumilhw", model.expectedExecutionTime()); + Assertions.assertEquals("dexyionofninbdb", model.steps().get(0).name()); + Assertions.assertEquals("xcwqqrsmpc", model.steps().get(0).description()); + Assertions.assertEquals("prtug", model.steps().get(0).errorMessage()); + Assertions.assertEquals("bzbcyksiv", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-14T03:40:53Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T10:28:50Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-13T11:45:23Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("opedbwdpyqyybxub", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("fcmkr", model.steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunListTests.java index deb5153d0a49..bc5a80242fb9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunListTests.java @@ -14,22 +14,22 @@ public final class UpdateRunListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateRunList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"timeStarted\":\"2021-02-09T18:52:05Z\",\"lastUpdatedTime\":\"2021-04-13T09:35:08Z\",\"duration\":\"t\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"hcoeocnhzq\",\"description\":\"ttjzcfyjzpt\",\"errorMessage\":\"lohap\",\"status\":\"nfszpyglqdhmrjz\",\"startTimeUtc\":\"2021-01-07T09:10:16Z\",\"endTimeUtc\":\"2021-08-24T22:27:38Z\",\"lastUpdatedTimeUtc\":\"2021-10-17T16:35:15Z\",\"expectedExecutionTime\":\"yypsjoqc\",\"steps\":[{},{}]}},\"location\":\"yhfqzvsqxfxje\",\"id\":\"cmpzqjhhhqx\",\"name\":\"w\",\"type\":\"vcacoyv\"}],\"nextLink\":\"bsizus\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"timeStarted\":\"2021-11-14T00:01:46Z\",\"lastUpdatedTime\":\"2021-04-12T17:31:30Z\",\"duration\":\"jsrwqrxetf\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"r\",\"description\":\"qnt\",\"errorMessage\":\"nawthvm\",\"status\":\"gnuyeamcmhu\",\"startTimeUtc\":\"2021-08-04T19:36:01Z\",\"endTimeUtc\":\"2021-02-03T11:57:38Z\",\"lastUpdatedTimeUtc\":\"2021-06-02T09:22:48Z\",\"expectedExecutionTime\":\"k\",\"steps\":[{},{},{},{}]}},\"location\":\"twloesqr\",\"id\":\"vrbnyrukoil\",\"name\":\"ciduwjle\",\"type\":\"pjlh\"},{\"properties\":{\"provisioningState\":\"Failed\",\"timeStarted\":\"2021-07-30T22:46:37Z\",\"lastUpdatedTime\":\"2021-08-26T17:06:24Z\",\"duration\":\"thqkkwhbgxvellv\",\"state\":\"Failed\",\"progress\":{\"name\":\"mnitmujd\",\"description\":\"mcl\",\"errorMessage\":\"mffhmjpddnyxfzuv\",\"status\":\"mzqmzjqrb\",\"startTimeUtc\":\"2021-07-14T11:36:59Z\",\"endTimeUtc\":\"2021-08-06T19:00:47Z\",\"lastUpdatedTimeUtc\":\"2021-06-22T19:33:29Z\",\"expectedExecutionTime\":\"oebojtjppg\",\"steps\":[{},{},{},{}]}},\"location\":\"o\",\"id\":\"pjtnqjilaywkdcw\",\"name\":\"qsyrilmhxdqao\",\"type\":\"fylnkkbjpjv\"}],\"nextLink\":\"wltmfwobbjwhlwyj\"}") .toObject(UpdateRunList.class); - Assertions.assertEquals("yhfqzvsqxfxje", model.value().get(0).location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T18:52:05Z"), model.value().get(0).timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T09:35:08Z"), model.value().get(0).lastUpdatedTime()); - Assertions.assertEquals("t", model.value().get(0).duration()); + Assertions.assertEquals("twloesqr", model.value().get(0).location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-14T00:01:46Z"), model.value().get(0).timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T17:31:30Z"), model.value().get(0).lastUpdatedTime()); + Assertions.assertEquals("jsrwqrxetf", model.value().get(0).duration()); Assertions.assertEquals(UpdateRunPropertiesState.SUCCEEDED, model.value().get(0).state()); - Assertions.assertEquals("hcoeocnhzq", model.value().get(0).namePropertiesName()); - Assertions.assertEquals("ttjzcfyjzpt", model.value().get(0).description()); - Assertions.assertEquals("lohap", model.value().get(0).errorMessage()); - Assertions.assertEquals("nfszpyglqdhmrjz", model.value().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-07T09:10:16Z"), model.value().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T22:27:38Z"), model.value().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T16:35:15Z"), + Assertions.assertEquals("r", model.value().get(0).namePropertiesName()); + Assertions.assertEquals("qnt", model.value().get(0).description()); + Assertions.assertEquals("nawthvm", model.value().get(0).errorMessage()); + Assertions.assertEquals("gnuyeamcmhu", model.value().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T19:36:01Z"), model.value().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T11:57:38Z"), model.value().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-02T09:22:48Z"), model.value().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("yypsjoqc", model.value().get(0).expectedExecutionTime()); - Assertions.assertEquals("bsizus", model.nextLink()); + Assertions.assertEquals("k", model.value().get(0).expectedExecutionTime()); + Assertions.assertEquals("wltmfwobbjwhlwyj", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunPropertiesTests.java index b86bf6c6d143..36f60c0e446f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunPropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunPropertiesTests.java @@ -16,172 +16,124 @@ public final class UpdateRunPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateRunProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Connected\",\"timeStarted\":\"2021-04-30T19:25:35Z\",\"lastUpdatedTime\":\"2021-10-09T23:53:03Z\",\"duration\":\"amtuatmzwcjjnc\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"izvg\",\"description\":\"atzuuv\",\"errorMessage\":\"ngrebwg\",\"status\":\"httzlswvajqfutlx\",\"startTimeUtc\":\"2021-09-04T23:17:48Z\",\"endTimeUtc\":\"2021-12-02T18:43:19Z\",\"lastUpdatedTimeUtc\":\"2021-05-09T16:07:18Z\",\"expectedExecutionTime\":\"wqrjzfrg\",\"steps\":[{\"name\":\"hcmbuocnjrohmbp\",\"description\":\"yx\",\"errorMessage\":\"eblydyv\",\"status\":\"kmrocxne\",\"startTimeUtc\":\"2021-06-21T09:21:47Z\",\"endTimeUtc\":\"2021-07-26T11:57:58Z\",\"lastUpdatedTimeUtc\":\"2020-12-23T03:02:40Z\",\"expectedExecutionTime\":\"fpyapucygvoavyu\",\"steps\":[{\"name\":\"lghieegjlgvvpase\",\"description\":\"gbuxantuygdh\",\"errorMessage\":\"qipir\",\"status\":\"wrq\",\"startTimeUtc\":\"2021-07-03T05:49:55Z\",\"endTimeUtc\":\"2021-01-26T14:21:23Z\",\"lastUpdatedTimeUtc\":\"2021-02-28T23:07:33Z\",\"expectedExecutionTime\":\"nlexw\",\"steps\":[{}]},{\"name\":\"pibkephuu\",\"description\":\"rctat\",\"errorMessage\":\"intqpbrlcyr\",\"status\":\"czkgofxyfsrucvcr\",\"startTimeUtc\":\"2021-07-16T04:56:07Z\",\"endTimeUtc\":\"2021-06-14T17:45:27Z\",\"lastUpdatedTimeUtc\":\"2021-02-02T01:36:05Z\",\"expectedExecutionTime\":\"t\",\"steps\":[{},{},{},{}]},{\"name\":\"qnrmvvfko\",\"description\":\"lghktuidvrm\",\"errorMessage\":\"lpdwwexymzvlazi\",\"status\":\"hpwvqsgnyyuu\",\"startTimeUtc\":\"2021-02-05T15:02:26Z\",\"endTimeUtc\":\"2021-08-05T12:58:24Z\",\"lastUpdatedTimeUtc\":\"2021-08-17T11:49:20Z\",\"expectedExecutionTime\":\"meyyvpkpatlb\",\"steps\":[{},{}]}]},{\"name\":\"gsksrfhf\",\"description\":\"lmknbnxwcdom\",\"errorMessage\":\"vfqawzfgbrttuiac\",\"status\":\"iexhajl\",\"startTimeUtc\":\"2021-09-28T09:45:01Z\",\"endTimeUtc\":\"2021-10-01T04:07:55Z\",\"lastUpdatedTimeUtc\":\"2021-05-12T17:44:48Z\",\"expectedExecutionTime\":\"uttdiygbp\",\"steps\":[{\"name\":\"wmtxkyctwwgz\",\"description\":\"jlmec\",\"errorMessage\":\"gygzyvn\",\"status\":\"zaifghtmoqqtlff\",\"startTimeUtc\":\"2020-12-26T15:29:31Z\",\"endTimeUtc\":\"2021-09-13T09:34:50Z\",\"lastUpdatedTimeUtc\":\"2021-06-18T18:40:18Z\",\"expectedExecutionTime\":\"javfqn\",\"steps\":[{}]},{\"name\":\"oe\",\"description\":\"ogiyetes\",\"errorMessage\":\"vidbztjhqtfb\",\"status\":\"nynkbwet\",\"startTimeUtc\":\"2021-11-23T03:30:21Z\",\"endTimeUtc\":\"2021-07-10T00:36:33Z\",\"lastUpdatedTimeUtc\":\"2021-09-10T08:52:06Z\",\"expectedExecutionTime\":\"kzyaup\",\"steps\":[{},{},{},{}]}]},{\"name\":\"xnafbw\",\"description\":\"oohtuovmaonurjtu\",\"errorMessage\":\"hihpvecmsl\",\"status\":\"bl\",\"startTimeUtc\":\"2021-05-31T14:15:41Z\",\"endTimeUtc\":\"2021-09-05T22:08:49Z\",\"lastUpdatedTimeUtc\":\"2021-03-22T04:26:33Z\",\"expectedExecutionTime\":\"uscv\",\"steps\":[{\"name\":\"gctmgxuupbezq\",\"description\":\"ydrtc\",\"errorMessage\":\"kdqkkyihzt\",\"status\":\"qm\",\"startTimeUtc\":\"2021-04-24T15:43:16Z\",\"endTimeUtc\":\"2021-09-14T21:29:44Z\",\"lastUpdatedTimeUtc\":\"2021-10-15T20:49:57Z\",\"expectedExecutionTime\":\"ychillcecfe\",\"steps\":[{},{}]}]}]}}") + "{\"provisioningState\":\"PartiallyConnected\",\"timeStarted\":\"2021-06-27T09:50:58Z\",\"lastUpdatedTime\":\"2021-05-06T06:12:47Z\",\"duration\":\"ttmbqdabzfiv\",\"state\":\"InProgress\",\"progress\":{\"name\":\"sthhzagjfwy\",\"description\":\"lhgenuzejgvkv\",\"errorMessage\":\"aqszllrzl\",\"status\":\"mdqgmihzpimcqr\",\"startTimeUtc\":\"2021-10-24T06:08:21Z\",\"endTimeUtc\":\"2021-08-05T23:31:29Z\",\"lastUpdatedTimeUtc\":\"2021-07-18T21:16:44Z\",\"expectedExecutionTime\":\"logxsvtzar\",\"steps\":[{\"name\":\"nsqktc\",\"description\":\"jwzzoslpk\",\"errorMessage\":\"tglwkzpgajsqjc\",\"status\":\"qbmfuvqarwz\",\"startTimeUtc\":\"2021-06-28T19:41:36Z\",\"endTimeUtc\":\"2021-07-16T14:19:09Z\",\"lastUpdatedTimeUtc\":\"2021-10-06T23:58:53Z\",\"expectedExecutionTime\":\"immbwxsfgtdm\",\"steps\":[{\"name\":\"kraokq\",\"description\":\"ud\",\"errorMessage\":\"waokbavlytta\",\"status\":\"nwfrkebsmhpd\",\"startTimeUtc\":\"2021-09-18T17:56:39Z\",\"endTimeUtc\":\"2021-09-23T19:09Z\",\"lastUpdatedTimeUtc\":\"2021-09-14T12:04:58Z\",\"expectedExecutionTime\":\"lekscbctnanqi\",\"steps\":[{},{}]}]},{\"name\":\"xpdcldpkawnsnl\",\"description\":\"mouxwksqmudmfco\",\"errorMessage\":\"icziuswswjrkb\",\"status\":\"jhbtqq\",\"startTimeUtc\":\"2021-09-26T14:35:38Z\",\"endTimeUtc\":\"2021-05-28T05:56:34Z\",\"lastUpdatedTimeUtc\":\"2021-09-14T02:43Z\",\"expectedExecutionTime\":\"wbivqvogfuyzwvbh\",\"steps\":[{\"name\":\"yqe\",\"description\":\"ood\",\"errorMessage\":\"kcdrdaasaxxobsm\",\"status\":\"wiyjvzuko\",\"startTimeUtc\":\"2021-10-16T19:11:15Z\",\"endTimeUtc\":\"2021-10-15T02:16:46Z\",\"lastUpdatedTimeUtc\":\"2021-12-02T20:18:37Z\",\"expectedExecutionTime\":\"mlnkoywsxv\",\"steps\":[{},{},{},{}]}]}]}}") .toObject(UpdateRunProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-30T19:25:35Z"), model.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-09T23:53:03Z"), model.lastUpdatedTime()); - Assertions.assertEquals("amtuatmzwcjjnc", model.duration()); - Assertions.assertEquals(UpdateRunPropertiesState.SUCCEEDED, model.state()); - Assertions.assertEquals("izvg", model.name()); - Assertions.assertEquals("atzuuv", model.description()); - Assertions.assertEquals("ngrebwg", model.errorMessage()); - Assertions.assertEquals("httzlswvajqfutlx", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-04T23:17:48Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T18:43:19Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-09T16:07:18Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("wqrjzfrg", model.expectedExecutionTime()); - Assertions.assertEquals("hcmbuocnjrohmbp", model.steps().get(0).name()); - Assertions.assertEquals("yx", model.steps().get(0).description()); - Assertions.assertEquals("eblydyv", model.steps().get(0).errorMessage()); - Assertions.assertEquals("kmrocxne", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T09:21:47Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T11:57:58Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T03:02:40Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T09:50:58Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T06:12:47Z"), model.lastUpdatedTime()); + Assertions.assertEquals("ttmbqdabzfiv", model.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.IN_PROGRESS, model.state()); + Assertions.assertEquals("sthhzagjfwy", model.name()); + Assertions.assertEquals("lhgenuzejgvkv", model.description()); + Assertions.assertEquals("aqszllrzl", model.errorMessage()); + Assertions.assertEquals("mdqgmihzpimcqr", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T06:08:21Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T23:31:29Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T21:16:44Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("logxsvtzar", model.expectedExecutionTime()); + Assertions.assertEquals("nsqktc", model.steps().get(0).name()); + Assertions.assertEquals("jwzzoslpk", model.steps().get(0).description()); + Assertions.assertEquals("tglwkzpgajsqjc", model.steps().get(0).errorMessage()); + Assertions.assertEquals("qbmfuvqarwz", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T19:41:36Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-16T14:19:09Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-06T23:58:53Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("fpyapucygvoavyu", model.steps().get(0).expectedExecutionTime()); - Assertions.assertEquals("lghieegjlgvvpase", model.steps().get(0).steps().get(0).name()); - Assertions.assertEquals("gbuxantuygdh", model.steps().get(0).steps().get(0).description()); - Assertions.assertEquals("qipir", model.steps().get(0).steps().get(0).errorMessage()); - Assertions.assertEquals("wrq", model.steps().get(0).steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T05:49:55Z"), + Assertions.assertEquals("immbwxsfgtdm", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("kraokq", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("ud", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("waokbavlytta", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("nwfrkebsmhpd", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T17:56:39Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-26T14:21:23Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T19:09Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-28T23:07:33Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T12:04:58Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("nlexw", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("lekscbctnanqi", model.steps().get(0).steps().get(0).expectedExecutionTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UpdateRunProperties model - = new UpdateRunProperties().withTimeStarted(OffsetDateTime.parse("2021-04-30T19:25:35Z")) - .withLastUpdatedTime(OffsetDateTime.parse("2021-10-09T23:53:03Z")) - .withDuration("amtuatmzwcjjnc") - .withState(UpdateRunPropertiesState.SUCCEEDED) - .withName("izvg") - .withDescription("atzuuv") - .withErrorMessage("ngrebwg") - .withStatus("httzlswvajqfutlx") - .withStartTimeUtc(OffsetDateTime.parse("2021-09-04T23:17:48Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-12-02T18:43:19Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-09T16:07:18Z")) - .withExpectedExecutionTime("wqrjzfrg") - .withSteps( - Arrays - .asList( - new Step().withName("hcmbuocnjrohmbp") - .withDescription("yx") - .withErrorMessage("eblydyv") - .withStatus("kmrocxne") - .withStartTimeUtc(OffsetDateTime.parse("2021-06-21T09:21:47Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-07-26T11:57:58Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2020-12-23T03:02:40Z")) - .withExpectedExecutionTime("fpyapucygvoavyu") - .withSteps(Arrays.asList( - new Step().withName("lghieegjlgvvpase") - .withDescription("gbuxantuygdh") - .withErrorMessage("qipir") - .withStatus("wrq") - .withStartTimeUtc(OffsetDateTime.parse("2021-07-03T05:49:55Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-01-26T14:21:23Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-28T23:07:33Z")) - .withExpectedExecutionTime("nlexw") - .withSteps(Arrays.asList(new Step())), - new Step().withName("pibkephuu") - .withDescription("rctat") - .withErrorMessage("intqpbrlcyr") - .withStatus("czkgofxyfsrucvcr") - .withStartTimeUtc(OffsetDateTime.parse("2021-07-16T04:56:07Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-06-14T17:45:27Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-02-02T01:36:05Z")) - .withExpectedExecutionTime("t") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())), - new Step().withName("qnrmvvfko") - .withDescription("lghktuidvrm") - .withErrorMessage("lpdwwexymzvlazi") - .withStatus("hpwvqsgnyyuu") - .withStartTimeUtc(OffsetDateTime.parse("2021-02-05T15:02:26Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-08-05T12:58:24Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-08-17T11:49:20Z")) - .withExpectedExecutionTime("meyyvpkpatlb") - .withSteps(Arrays.asList(new Step(), new Step())))), - new Step().withName("gsksrfhf") - .withDescription("lmknbnxwcdom") - .withErrorMessage("vfqawzfgbrttuiac") - .withStatus("iexhajl") - .withStartTimeUtc(OffsetDateTime.parse("2021-09-28T09:45:01Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-10-01T04:07:55Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-12T17:44:48Z")) - .withExpectedExecutionTime("uttdiygbp") - .withSteps(Arrays.asList( - new Step().withName("wmtxkyctwwgz") - .withDescription("jlmec") - .withErrorMessage("gygzyvn") - .withStatus("zaifghtmoqqtlff") - .withStartTimeUtc(OffsetDateTime.parse("2020-12-26T15:29:31Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-09-13T09:34:50Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-06-18T18:40:18Z")) - .withExpectedExecutionTime("javfqn") - .withSteps(Arrays.asList(new Step())), - new Step().withName("oe") - .withDescription("ogiyetes") - .withErrorMessage("vidbztjhqtfb") - .withStatus("nynkbwet") - .withStartTimeUtc(OffsetDateTime.parse("2021-11-23T03:30:21Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-07-10T00:36:33Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-10T08:52:06Z")) - .withExpectedExecutionTime("kzyaup") - .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())))), - new Step().withName("xnafbw") - .withDescription("oohtuovmaonurjtu") - .withErrorMessage("hihpvecmsl") - .withStatus("bl") - .withStartTimeUtc(OffsetDateTime.parse("2021-05-31T14:15:41Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-09-05T22:08:49Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-22T04:26:33Z")) - .withExpectedExecutionTime("uscv") - .withSteps(Arrays.asList(new Step().withName("gctmgxuupbezq") - .withDescription("ydrtc") - .withErrorMessage("kdqkkyihzt") - .withStatus("qm") - .withStartTimeUtc(OffsetDateTime.parse("2021-04-24T15:43:16Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-09-14T21:29:44Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-15T20:49:57Z")) - .withExpectedExecutionTime("ychillcecfe") - .withSteps(Arrays.asList(new Step(), new Step())))))); + = new UpdateRunProperties().withTimeStarted(OffsetDateTime.parse("2021-06-27T09:50:58Z")) + .withLastUpdatedTime(OffsetDateTime.parse("2021-05-06T06:12:47Z")) + .withDuration("ttmbqdabzfiv") + .withState(UpdateRunPropertiesState.IN_PROGRESS) + .withName("sthhzagjfwy") + .withDescription("lhgenuzejgvkv") + .withErrorMessage("aqszllrzl") + .withStatus("mdqgmihzpimcqr") + .withStartTimeUtc(OffsetDateTime.parse("2021-10-24T06:08:21Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-08-05T23:31:29Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-18T21:16:44Z")) + .withExpectedExecutionTime("logxsvtzar") + .withSteps(Arrays.asList( + new Step().withName("nsqktc") + .withDescription("jwzzoslpk") + .withErrorMessage("tglwkzpgajsqjc") + .withStatus("qbmfuvqarwz") + .withStartTimeUtc(OffsetDateTime.parse("2021-06-28T19:41:36Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-07-16T14:19:09Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-10-06T23:58:53Z")) + .withExpectedExecutionTime("immbwxsfgtdm") + .withSteps(Arrays.asList(new Step().withName("kraokq") + .withDescription("ud") + .withErrorMessage("waokbavlytta") + .withStatus("nwfrkebsmhpd") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-18T17:56:39Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-09-23T19:09Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-14T12:04:58Z")) + .withExpectedExecutionTime("lekscbctnanqi") + .withSteps(Arrays.asList(new Step(), new Step())))), + new Step().withName("xpdcldpkawnsnl") + .withDescription("mouxwksqmudmfco") + .withErrorMessage("icziuswswjrkb") + .withStatus("jhbtqq") + .withStartTimeUtc(OffsetDateTime.parse("2021-09-26T14:35:38Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-05-28T05:56:34Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-09-14T02:43Z")) + .withExpectedExecutionTime("wbivqvogfuyzwvbh") + .withSteps(Arrays.asList(new Step().withName("yqe") + .withDescription("ood") + .withErrorMessage("kcdrdaasaxxobsm") + .withStatus("wiyjvzuko") + .withStartTimeUtc(OffsetDateTime.parse("2021-10-16T19:11:15Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-10-15T02:16:46Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-12-02T20:18:37Z")) + .withExpectedExecutionTime("mlnkoywsxv") + .withSteps(Arrays.asList(new Step(), new Step(), new Step(), new Step())))))); model = BinaryData.fromObject(model).toObject(UpdateRunProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-30T19:25:35Z"), model.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-09T23:53:03Z"), model.lastUpdatedTime()); - Assertions.assertEquals("amtuatmzwcjjnc", model.duration()); - Assertions.assertEquals(UpdateRunPropertiesState.SUCCEEDED, model.state()); - Assertions.assertEquals("izvg", model.name()); - Assertions.assertEquals("atzuuv", model.description()); - Assertions.assertEquals("ngrebwg", model.errorMessage()); - Assertions.assertEquals("httzlswvajqfutlx", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-04T23:17:48Z"), model.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T18:43:19Z"), model.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-09T16:07:18Z"), model.lastUpdatedTimeUtc()); - Assertions.assertEquals("wqrjzfrg", model.expectedExecutionTime()); - Assertions.assertEquals("hcmbuocnjrohmbp", model.steps().get(0).name()); - Assertions.assertEquals("yx", model.steps().get(0).description()); - Assertions.assertEquals("eblydyv", model.steps().get(0).errorMessage()); - Assertions.assertEquals("kmrocxne", model.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T09:21:47Z"), model.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T11:57:58Z"), model.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T03:02:40Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T09:50:58Z"), model.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T06:12:47Z"), model.lastUpdatedTime()); + Assertions.assertEquals("ttmbqdabzfiv", model.duration()); + Assertions.assertEquals(UpdateRunPropertiesState.IN_PROGRESS, model.state()); + Assertions.assertEquals("sthhzagjfwy", model.name()); + Assertions.assertEquals("lhgenuzejgvkv", model.description()); + Assertions.assertEquals("aqszllrzl", model.errorMessage()); + Assertions.assertEquals("mdqgmihzpimcqr", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T06:08:21Z"), model.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T23:31:29Z"), model.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T21:16:44Z"), model.lastUpdatedTimeUtc()); + Assertions.assertEquals("logxsvtzar", model.expectedExecutionTime()); + Assertions.assertEquals("nsqktc", model.steps().get(0).name()); + Assertions.assertEquals("jwzzoslpk", model.steps().get(0).description()); + Assertions.assertEquals("tglwkzpgajsqjc", model.steps().get(0).errorMessage()); + Assertions.assertEquals("qbmfuvqarwz", model.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T19:41:36Z"), model.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-16T14:19:09Z"), model.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-06T23:58:53Z"), model.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("fpyapucygvoavyu", model.steps().get(0).expectedExecutionTime()); - Assertions.assertEquals("lghieegjlgvvpase", model.steps().get(0).steps().get(0).name()); - Assertions.assertEquals("gbuxantuygdh", model.steps().get(0).steps().get(0).description()); - Assertions.assertEquals("qipir", model.steps().get(0).steps().get(0).errorMessage()); - Assertions.assertEquals("wrq", model.steps().get(0).steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T05:49:55Z"), + Assertions.assertEquals("immbwxsfgtdm", model.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("kraokq", model.steps().get(0).steps().get(0).name()); + Assertions.assertEquals("ud", model.steps().get(0).steps().get(0).description()); + Assertions.assertEquals("waokbavlytta", model.steps().get(0).steps().get(0).errorMessage()); + Assertions.assertEquals("nwfrkebsmhpd", model.steps().get(0).steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T17:56:39Z"), model.steps().get(0).steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-26T14:21:23Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T19:09Z"), model.steps().get(0).steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-28T23:07:33Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T12:04:58Z"), model.steps().get(0).steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("nlexw", model.steps().get(0).steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("lekscbctnanqi", model.steps().get(0).steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteMockTests.java index 8347574b516c..26870101b746 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteMockTests.java @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updateRuns().delete("xbfckmoal", "axvwxtxuzh", "ojyffwflbkjc", "z", com.azure.core.util.Context.NONE); + manager.updateRuns() + .delete("zvcmbpwd", "udayprldidwmtf", "bvtzldzchub", "gwn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetWithResponseMockTests.java index cb210f64bfcf..549cc2df0c9b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class UpdateRunsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"DisableInProgress\",\"timeStarted\":\"2021-04-04T00:23:35Z\",\"lastUpdatedTime\":\"2021-10-04T01:37:36Z\",\"duration\":\"cnpxiema\",\"state\":\"Failed\",\"progress\":{\"name\":\"ek\",\"description\":\"n\",\"errorMessage\":\"rysgktfm\",\"status\":\"nqbblrtbofzgh\",\"startTimeUtc\":\"2021-10-17T17:29:58Z\",\"endTimeUtc\":\"2021-01-30T05:23:47Z\",\"lastUpdatedTimeUtc\":\"2021-04-23T14:39:45Z\",\"expectedExecutionTime\":\"ynohocqxug\",\"steps\":[{\"name\":\"d\",\"description\":\"rfbplvhmhu\",\"errorMessage\":\"sdjlzbdmdd\",\"status\":\"qe\",\"startTimeUtc\":\"2021-07-26T14:05:52Z\",\"endTimeUtc\":\"2021-09-16T06:56:04Z\",\"lastUpdatedTimeUtc\":\"2021-09-02T04:58:50Z\",\"expectedExecutionTime\":\"vp\",\"steps\":[{},{},{}]},{\"name\":\"rs\",\"description\":\"gclme\",\"errorMessage\":\"fjqzyhzydyvtuq\",\"status\":\"r\",\"startTimeUtc\":\"2021-05-22T22:09:58Z\",\"endTimeUtc\":\"2021-01-21T05:09:40Z\",\"lastUpdatedTimeUtc\":\"2021-06-24T13:20:38Z\",\"expectedExecutionTime\":\"igtvjxsocsvjekej\",\"steps\":[{},{},{}]}]}},\"location\":\"jdcwuzs\",\"id\":\"fyixe\",\"name\":\"masjnfgngxa\",\"type\":\"jeeyv\"}"; + = "{\"properties\":{\"provisioningState\":\"Moving\",\"timeStarted\":\"2021-10-24T06:48:31Z\",\"lastUpdatedTime\":\"2021-03-06T10:08:22Z\",\"duration\":\"zmsimehtcu\",\"state\":\"Failed\",\"progress\":{\"name\":\"qqhyhnimxtns\",\"description\":\"isnomwnwnghoj\",\"errorMessage\":\"keyymicjixxfs\",\"status\":\"crtnuguefxxi\",\"startTimeUtc\":\"2021-02-05T20:42:55Z\",\"endTimeUtc\":\"2021-11-18T19:42:51Z\",\"lastUpdatedTimeUtc\":\"2021-01-25T03:11:05Z\",\"expectedExecutionTime\":\"wetkrhlolmc\",\"steps\":[{\"name\":\"fgsvbbvaqdljnpet\",\"description\":\"n\",\"errorMessage\":\"etawevx\",\"status\":\"uek\",\"startTimeUtc\":\"2021-02-11T15:06:23Z\",\"endTimeUtc\":\"2021-02-25T01:13:27Z\",\"lastUpdatedTimeUtc\":\"2021-05-09T00:20:59Z\",\"expectedExecutionTime\":\"vbrblerlprdaqc\",\"steps\":[{}]},{\"name\":\"bnygdjc\",\"description\":\"wbpwy\",\"errorMessage\":\"digqzlrzn\",\"status\":\"sdnidmjqmvy\",\"startTimeUtc\":\"2021-09-09T07:15:08Z\",\"endTimeUtc\":\"2021-11-25T03:22:42Z\",\"lastUpdatedTimeUtc\":\"2021-05-27T05:28:01Z\",\"expectedExecutionTime\":\"hqtwv\",\"steps\":[{},{},{}]},{\"name\":\"kdzdzffzjw\",\"description\":\"smpc\",\"errorMessage\":\"gryelgfyat\",\"status\":\"fgfrrkdknc\",\"startTimeUtc\":\"2021-04-28T15:45:04Z\",\"endTimeUtc\":\"2021-04-06T21:52:47Z\",\"lastUpdatedTimeUtc\":\"2021-06-20T17:04:54Z\",\"expectedExecutionTime\":\"ojtvmdev\",\"steps\":[{},{},{}]},{\"name\":\"vbkar\",\"description\":\"yhssrlvkpkpkocm\",\"errorMessage\":\"cebxx\",\"status\":\"yicyvspeslhwy\",\"startTimeUtc\":\"2021-08-08T03:39:12Z\",\"endTimeUtc\":\"2021-09-28T12:29:51Z\",\"lastUpdatedTimeUtc\":\"2021-05-17T15:33:30Z\",\"expectedExecutionTime\":\"umddhgajkrdy\",\"steps\":[{},{},{},{}]}]}},\"location\":\"fcudvafnbfbqv\",\"id\":\"qnxhgk\",\"name\":\"rdw\",\"type\":\"ejpec\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,30 +32,30 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UpdateRun response = manager.updateRuns() - .getWithResponse("bvejo", "soxovlznkleld", "qdlqqhntqrykkxak", "uuptii", com.azure.core.util.Context.NONE) + .getWithResponse("y", "qvcml", "exbzbqufpnezsjza", "m", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jdcwuzs", response.location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T00:23:35Z"), response.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-04T01:37:36Z"), response.lastUpdatedTime()); - Assertions.assertEquals("cnpxiema", response.duration()); + Assertions.assertEquals("fcudvafnbfbqv", response.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T06:48:31Z"), response.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T10:08:22Z"), response.lastUpdatedTime()); + Assertions.assertEquals("zmsimehtcu", response.duration()); Assertions.assertEquals(UpdateRunPropertiesState.FAILED, response.state()); - Assertions.assertEquals("ek", response.namePropertiesName()); - Assertions.assertEquals("n", response.description()); - Assertions.assertEquals("rysgktfm", response.errorMessage()); - Assertions.assertEquals("nqbblrtbofzgh", response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T17:29:58Z"), response.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T05:23:47Z"), response.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-23T14:39:45Z"), response.lastUpdatedTimeUtc()); - Assertions.assertEquals("ynohocqxug", response.expectedExecutionTime()); - Assertions.assertEquals("d", response.steps().get(0).name()); - Assertions.assertEquals("rfbplvhmhu", response.steps().get(0).description()); - Assertions.assertEquals("sdjlzbdmdd", response.steps().get(0).errorMessage()); - Assertions.assertEquals("qe", response.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T14:05:52Z"), response.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T06:56:04Z"), response.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-02T04:58:50Z"), + Assertions.assertEquals("qqhyhnimxtns", response.namePropertiesName()); + Assertions.assertEquals("isnomwnwnghoj", response.description()); + Assertions.assertEquals("keyymicjixxfs", response.errorMessage()); + Assertions.assertEquals("crtnuguefxxi", response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-05T20:42:55Z"), response.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T19:42:51Z"), response.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-25T03:11:05Z"), response.lastUpdatedTimeUtc()); + Assertions.assertEquals("wetkrhlolmc", response.expectedExecutionTime()); + Assertions.assertEquals("fgsvbbvaqdljnpet", response.steps().get(0).name()); + Assertions.assertEquals("n", response.steps().get(0).description()); + Assertions.assertEquals("etawevx", response.steps().get(0).errorMessage()); + Assertions.assertEquals("uek", response.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-11T15:06:23Z"), response.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T01:13:27Z"), response.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-09T00:20:59Z"), response.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("vp", response.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("vbrblerlprdaqc", response.steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListMockTests.java index dc6caa2762da..634a7d30e6d3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListMockTests.java @@ -23,7 +23,7 @@ public final class UpdateRunsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"DisableInProgress\",\"timeStarted\":\"2021-06-30T15:11:20Z\",\"lastUpdatedTime\":\"2021-09-30T17:41:45Z\",\"duration\":\"rmxca\",\"state\":\"InProgress\",\"progress\":{\"name\":\"mfbozpjyxe\",\"description\":\"pqcwdnnjjthpsn\",\"errorMessage\":\"bycympohxubnnpn\",\"status\":\"bcxnouspdyzssjlm\",\"startTimeUtc\":\"2021-09-29T18:07:24Z\",\"endTimeUtc\":\"2021-01-31T04:55:12Z\",\"lastUpdatedTimeUtc\":\"2021-10-13T10:36:35Z\",\"expectedExecutionTime\":\"spjlfzh\",\"steps\":[{\"name\":\"qxcrbc\",\"description\":\"y\",\"errorMessage\":\"mmsszzcctvkognht\",\"status\":\"gwnnwcnvpnyldjdk\",\"startTimeUtc\":\"2021-01-12T17:05:17Z\",\"endTimeUtc\":\"2021-06-07T00:50:51Z\",\"lastUpdatedTimeUtc\":\"2020-12-21T08:19:46Z\",\"expectedExecutionTime\":\"xio\",\"steps\":[{},{},{},{}]}]}},\"location\":\"jl\",\"id\":\"oqejexfd\",\"name\":\"huhdku\",\"type\":\"gywadrklpdyehjr\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\",\"timeStarted\":\"2021-06-20T02:22:24Z\",\"lastUpdatedTime\":\"2021-12-08T04:39:55Z\",\"duration\":\"cmximcwq\",\"state\":\"InProgress\",\"progress\":{\"name\":\"gs\",\"description\":\"kyvscbgngcrus\",\"errorMessage\":\"ircpgcvsvkk\",\"status\":\"jolpyoklkvuz\",\"startTimeUtc\":\"2021-05-22T08:45:26Z\",\"endTimeUtc\":\"2021-07-24T00:39:17Z\",\"lastUpdatedTimeUtc\":\"2021-08-13T19:40:22Z\",\"expectedExecutionTime\":\"eoigowxxbhtpsyio\",\"steps\":[{\"name\":\"w\",\"description\":\"szzgyk\",\"errorMessage\":\"kawanvm\",\"status\":\"vg\",\"startTimeUtc\":\"2021-06-23T16:24:20Z\",\"endTimeUtc\":\"2021-07-23T21:28:35Z\",\"lastUpdatedTimeUtc\":\"2021-10-03T11:26:12Z\",\"expectedExecutionTime\":\"pnbn\",\"steps\":[{}]},{\"name\":\"e\",\"description\":\"bepgcmahiwfry\",\"errorMessage\":\"kchkapit\",\"status\":\"shfyf\",\"startTimeUtc\":\"2021-07-14T12:56:17Z\",\"endTimeUtc\":\"2021-06-05T01:56:09Z\",\"lastUpdatedTimeUtc\":\"2021-03-03T21:12:32Z\",\"expectedExecutionTime\":\"wh\",\"steps\":[{}]},{\"name\":\"dgbggcjxzh\",\"description\":\"ivwehsudym\",\"errorMessage\":\"bhdosmbngkql\",\"status\":\"zduvxdmx\",\"startTimeUtc\":\"2021-03-04T07:27:11Z\",\"endTimeUtc\":\"2021-03-23T12:51:21Z\",\"lastUpdatedTimeUtc\":\"2021-01-27T21:21:01Z\",\"expectedExecutionTime\":\"rsenxoi\",\"steps\":[{},{},{},{}]}]}},\"location\":\"dmiplois\",\"id\":\"zsoxznntwgk\",\"name\":\"yohpsapzupzwwytb\",\"type\":\"jzghximkg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,34 +33,34 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.updateRuns().list("iyg", "cyzcjefpubaldj", "gldry", com.azure.core.util.Context.NONE); + = manager.updateRuns().list("zuvigvl", "hfrbzakpjt", "q", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jl", response.iterator().next().location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-30T15:11:20Z"), response.iterator().next().timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-30T17:41:45Z"), + Assertions.assertEquals("dmiplois", response.iterator().next().location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-20T02:22:24Z"), response.iterator().next().timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T04:39:55Z"), response.iterator().next().lastUpdatedTime()); - Assertions.assertEquals("rmxca", response.iterator().next().duration()); + Assertions.assertEquals("cmximcwq", response.iterator().next().duration()); Assertions.assertEquals(UpdateRunPropertiesState.IN_PROGRESS, response.iterator().next().state()); - Assertions.assertEquals("mfbozpjyxe", response.iterator().next().namePropertiesName()); - Assertions.assertEquals("pqcwdnnjjthpsn", response.iterator().next().description()); - Assertions.assertEquals("bycympohxubnnpn", response.iterator().next().errorMessage()); - Assertions.assertEquals("bcxnouspdyzssjlm", response.iterator().next().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T18:07:24Z"), + Assertions.assertEquals("gs", response.iterator().next().namePropertiesName()); + Assertions.assertEquals("kyvscbgngcrus", response.iterator().next().description()); + Assertions.assertEquals("ircpgcvsvkk", response.iterator().next().errorMessage()); + Assertions.assertEquals("jolpyoklkvuz", response.iterator().next().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-22T08:45:26Z"), response.iterator().next().startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-31T04:55:12Z"), response.iterator().next().endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T10:36:35Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T00:39:17Z"), response.iterator().next().endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-13T19:40:22Z"), response.iterator().next().lastUpdatedTimeUtc()); - Assertions.assertEquals("spjlfzh", response.iterator().next().expectedExecutionTime()); - Assertions.assertEquals("qxcrbc", response.iterator().next().steps().get(0).name()); - Assertions.assertEquals("y", response.iterator().next().steps().get(0).description()); - Assertions.assertEquals("mmsszzcctvkognht", response.iterator().next().steps().get(0).errorMessage()); - Assertions.assertEquals("gwnnwcnvpnyldjdk", response.iterator().next().steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-12T17:05:17Z"), + Assertions.assertEquals("eoigowxxbhtpsyio", response.iterator().next().expectedExecutionTime()); + Assertions.assertEquals("w", response.iterator().next().steps().get(0).name()); + Assertions.assertEquals("szzgyk", response.iterator().next().steps().get(0).description()); + Assertions.assertEquals("kawanvm", response.iterator().next().steps().get(0).errorMessage()); + Assertions.assertEquals("vg", response.iterator().next().steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-23T16:24:20Z"), response.iterator().next().steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-07T00:50:51Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T21:28:35Z"), response.iterator().next().steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T08:19:46Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-10-03T11:26:12Z"), response.iterator().next().steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("xio", response.iterator().next().steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("pnbn", response.iterator().next().steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutWithResponseMockTests.java index 6d9b6f7679ef..36a72038d14a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class UpdateRunsPutWithResponseMockTests { @Test public void testPutWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Error\",\"timeStarted\":\"2021-08-06T00:41:14Z\",\"lastUpdatedTime\":\"2021-11-20T20:38:45Z\",\"duration\":\"ukxtuytgcp\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"oegyc\",\"description\":\"em\",\"errorMessage\":\"rcclclfkfvyjo\",\"status\":\"wrvp\",\"startTimeUtc\":\"2021-12-03T23:40:48Z\",\"endTimeUtc\":\"2021-05-17T02:23:35Z\",\"lastUpdatedTimeUtc\":\"2021-10-14T09:52:15Z\",\"expectedExecutionTime\":\"ebvsewfzvvpay\",\"steps\":[{\"name\":\"zdcyandblkbnt\",\"description\":\"pvdfmoqqc\",\"errorMessage\":\"vxuos\",\"status\":\"ffa\",\"startTimeUtc\":\"2021-01-31T05:40:59Z\",\"endTimeUtc\":\"2021-10-22T11:53:37Z\",\"lastUpdatedTimeUtc\":\"2021-05-09T02:51:16Z\",\"expectedExecutionTime\":\"zjsnyfowyj\",\"steps\":[{},{}]},{\"name\":\"kiubeqk\",\"description\":\"tlrglhxso\",\"errorMessage\":\"guhbnhogsezreneg\",\"status\":\"dtyzpx\",\"startTimeUtc\":\"2021-06-28T01:27:28Z\",\"endTimeUtc\":\"2021-09-28T11:16:50Z\",\"lastUpdatedTimeUtc\":\"2021-10-10T00:31:54Z\",\"expectedExecutionTime\":\"gemudupeh\",\"steps\":[{},{},{}]}]}},\"location\":\"dfv\",\"id\":\"ypezammpk\",\"name\":\"pvnpeukgnmfakeqn\",\"type\":\"tromlcsvk\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleted\",\"timeStarted\":\"2021-11-11T04:06:51Z\",\"lastUpdatedTime\":\"2021-02-08T20:22:47Z\",\"duration\":\"jigcwtspanb\",\"state\":\"Succeeded\",\"progress\":{\"name\":\"vchefpgeedyy\",\"description\":\"uholaemwcgimmri\",\"errorMessage\":\"absqqlon\",\"status\":\"aowcahdkm\",\"startTimeUtc\":\"2021-04-17T17:08:34Z\",\"endTimeUtc\":\"2021-05-23T07:26:56Z\",\"lastUpdatedTimeUtc\":\"2021-10-12T22:00:51Z\",\"expectedExecutionTime\":\"ezbfsjwf\",\"steps\":[{\"name\":\"kvb\",\"description\":\"kbsvbwy\",\"errorMessage\":\"ygnbknhjgclxaxwc\",\"status\":\"asp\",\"startTimeUtc\":\"2021-11-22T12:59:45Z\",\"endTimeUtc\":\"2021-12-04T06:25:26Z\",\"lastUpdatedTimeUtc\":\"2021-02-27T03:03:12Z\",\"expectedExecutionTime\":\"ghdoaqipmnxclf\",\"steps\":[{},{}]},{\"name\":\"rnmuvwvpuofddtbf\",\"description\":\"kjcnginxdvmaoyq\",\"errorMessage\":\"vg\",\"status\":\"zmxynofxlt\",\"startTimeUtc\":\"2021-05-04T10:23:33Z\",\"endTimeUtc\":\"2021-01-29T19:21:32Z\",\"lastUpdatedTimeUtc\":\"2021-03-25T01:53:29Z\",\"expectedExecutionTime\":\"zujsjirkrp\",\"steps\":[{},{},{},{}]},{\"name\":\"h\",\"description\":\"of\",\"errorMessage\":\"ivd\",\"status\":\"kykpaxnls\",\"startTimeUtc\":\"2021-01-10T22:09:22Z\",\"endTimeUtc\":\"2021-01-10T02:46:52Z\",\"lastUpdatedTimeUtc\":\"2021-05-19T16:26:12Z\",\"expectedExecutionTime\":\"cptbzetxygxxicee\",\"steps\":[{},{}]}]}},\"location\":\"yuveoxmpz\",\"id\":\"ahdr\",\"name\":\"vhaztkxbivz\",\"type\":\"gxmbrygmwibiosiq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,53 +34,63 @@ public void testPutWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UpdateRun response = manager.updateRuns() - .define("ymlhklmnjqzm") - .withExistingUpdate("cflvxbocaywmfvuh", "molhveol", "gsfmhwdxqu") - .withRegion("islxyljzbk") - .withTimeStarted(OffsetDateTime.parse("2021-11-24T11:06:38Z")) - .withLastUpdatedTime(OffsetDateTime.parse("2021-07-28T12:44:03Z")) - .withDuration("qgqrbthbfpiq") - .withState(UpdateRunPropertiesState.UNKNOWN) - .withNamePropertiesName("ogwfvkywz") - .withDescription("eiaddpkhuvnlmdcn") - .withErrorMessage("iexmizunzbqvioy") - .withStatus("tfqhhvvwzprjaaai") - .withStartTimeUtc(OffsetDateTime.parse("2021-01-01T06:11:14Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-10-17T01:06:37Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-05T12:58:52Z")) - .withExpectedExecutionTime("yaqtlocnw") - .withSteps(Arrays.asList(new Step().withName("vzuzqcrl") - .withDescription("rvbzgyhenfsfy") - .withErrorMessage("cowmhn") - .withStatus("fbywjiaaosla") - .withStartTimeUtc(OffsetDateTime.parse("2021-03-28T21:15:26Z")) - .withEndTimeUtc(OffsetDateTime.parse("2021-05-20T00:12:54Z")) - .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-07-03T15:08:30Z")) - .withExpectedExecutionTime("tbjortztkajqhsns") - .withSteps(Arrays.asList(new Step(), new Step(), new Step())))) + .define("jkyjrexw") + .withExistingUpdate("mxpqkjnpyriwn", "ot", "xmmqmt") + .withRegion("icnq") + .withTimeStarted(OffsetDateTime.parse("2021-04-26T09:36:56Z")) + .withLastUpdatedTime(OffsetDateTime.parse("2021-06-30T06:28:45Z")) + .withDuration("daubheeggzgr") + .withState(UpdateRunPropertiesState.FAILED) + .withNamePropertiesName("ozuumr") + .withDescription("jqgacantnsyx") + .withErrorMessage("jmka") + .withStatus("claz") + .withStartTimeUtc(OffsetDateTime.parse("2021-10-28T16:18:37Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-09-18T07:01:12Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-03T03:32:35Z")) + .withExpectedExecutionTime("mas") + .withSteps(Arrays.asList( + new Step().withName("ydscdkxwd") + .withDescription("jcbhaahnt") + .withErrorMessage("elfhpf") + .withStatus("oskkz") + .withStartTimeUtc(OffsetDateTime.parse("2021-12-05T05:20:59Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-10-19T23:43:43Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-03-29T22:10:14Z")) + .withExpectedExecutionTime("bsrwzzmrg") + .withSteps(Arrays.asList(new Step(), new Step(), new Step())), + new Step().withName("mfppinmg") + .withDescription("esmkwtzgf") + .withErrorMessage("gjhxerxl") + .withStatus("kdbtq") + .withStartTimeUtc(OffsetDateTime.parse("2021-04-16T22:59:09Z")) + .withEndTimeUtc(OffsetDateTime.parse("2021-11-30T06:55:24Z")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2021-05-08T18:21:20Z")) + .withExpectedExecutionTime("yholhjns") + .withSteps(Arrays.asList(new Step(), new Step(), new Step())))) .create(); - Assertions.assertEquals("dfv", response.location()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T00:41:14Z"), response.timeStarted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-20T20:38:45Z"), response.lastUpdatedTime()); - Assertions.assertEquals("ukxtuytgcp", response.duration()); + Assertions.assertEquals("yuveoxmpz", response.location()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-11T04:06:51Z"), response.timeStarted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T20:22:47Z"), response.lastUpdatedTime()); + Assertions.assertEquals("jigcwtspanb", response.duration()); Assertions.assertEquals(UpdateRunPropertiesState.SUCCEEDED, response.state()); - Assertions.assertEquals("oegyc", response.namePropertiesName()); - Assertions.assertEquals("em", response.description()); - Assertions.assertEquals("rcclclfkfvyjo", response.errorMessage()); - Assertions.assertEquals("wrvp", response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T23:40:48Z"), response.startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T02:23:35Z"), response.endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-14T09:52:15Z"), response.lastUpdatedTimeUtc()); - Assertions.assertEquals("ebvsewfzvvpay", response.expectedExecutionTime()); - Assertions.assertEquals("zdcyandblkbnt", response.steps().get(0).name()); - Assertions.assertEquals("pvdfmoqqc", response.steps().get(0).description()); - Assertions.assertEquals("vxuos", response.steps().get(0).errorMessage()); - Assertions.assertEquals("ffa", response.steps().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-31T05:40:59Z"), response.steps().get(0).startTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T11:53:37Z"), response.steps().get(0).endTimeUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-09T02:51:16Z"), + Assertions.assertEquals("vchefpgeedyy", response.namePropertiesName()); + Assertions.assertEquals("uholaemwcgimmri", response.description()); + Assertions.assertEquals("absqqlon", response.errorMessage()); + Assertions.assertEquals("aowcahdkm", response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T17:08:34Z"), response.startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T07:26:56Z"), response.endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T22:00:51Z"), response.lastUpdatedTimeUtc()); + Assertions.assertEquals("ezbfsjwf", response.expectedExecutionTime()); + Assertions.assertEquals("kvb", response.steps().get(0).name()); + Assertions.assertEquals("kbsvbwy", response.steps().get(0).description()); + Assertions.assertEquals("ygnbknhjgclxaxwc", response.steps().get(0).errorMessage()); + Assertions.assertEquals("asp", response.steps().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-22T12:59:45Z"), response.steps().get(0).startTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T06:25:26Z"), response.steps().get(0).endTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-27T03:03:12Z"), response.steps().get(0).lastUpdatedTimeUtc()); - Assertions.assertEquals("zjsnyfowyj", response.steps().get(0).expectedExecutionTime()); + Assertions.assertEquals("ghdoaqipmnxclf", response.steps().get(0).expectedExecutionTime()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateStatePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateStatePropertiesTests.java index 806b2f9bac49..8ef66d23706c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateStatePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateStatePropertiesTests.java @@ -12,18 +12,18 @@ public final class UpdateStatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateStateProperties model - = BinaryData.fromString("{\"progressPercentage\":26.59303673753066,\"notifyMessage\":\"mvqmtdwckygroej\"}") + = BinaryData.fromString("{\"progressPercentage\":93.58240473511927,\"notifyMessage\":\"pq\"}") .toObject(UpdateStateProperties.class); - Assertions.assertEquals(26.59303673753066D, model.progressPercentage()); - Assertions.assertEquals("mvqmtdwckygroej", model.notifyMessage()); + Assertions.assertEquals(93.58240473511927D, model.progressPercentage()); + Assertions.assertEquals("pq", model.notifyMessage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateStateProperties model = new UpdateStateProperties().withProgressPercentage(26.59303673753066D) - .withNotifyMessage("mvqmtdwckygroej"); + UpdateStateProperties model + = new UpdateStateProperties().withProgressPercentage(93.58240473511927D).withNotifyMessage("pq"); model = BinaryData.fromObject(model).toObject(UpdateStateProperties.class); - Assertions.assertEquals(26.59303673753066D, model.progressPercentage()); - Assertions.assertEquals("mvqmtdwckygroej", model.notifyMessage()); + Assertions.assertEquals(93.58240473511927D, model.progressPercentage()); + Assertions.assertEquals("pq", model.notifyMessage()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesListTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesListTests.java index 277eb83c7933..48e8a16a7c09 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesListTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesListTests.java @@ -17,37 +17,38 @@ public final class UpdateSummariesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateSummariesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"oemFamily\":\"ymdvhhplkh\",\"currentOemVersion\":\"dkatveqmgk\",\"hardwareModel\":\"w\",\"packageVersions\":[{\"packageType\":\"ryearmhpwbu\",\"version\":\"vsmfas\",\"lastUpdated\":\"2021-07-02T01:15:29Z\"},{\"packageType\":\"hqpoilosja\",\"version\":\"cez\",\"lastUpdated\":\"2021-08-27T19:49:27Z\"},{\"packageType\":\"mhllpokj\",\"version\":\"hztmsm\",\"lastUpdated\":\"2021-03-29T13:16:50Z\"},{\"packageType\":\"cflcez\",\"version\":\"wvwiftdjtvbfpfh\",\"lastUpdated\":\"2021-02-09T05:43Z\"}],\"currentVersion\":\"syqcjnqswxdowum\",\"currentSbeVersion\":\"ukrcdiohcl\",\"lastUpdated\":\"2021-11-06T06:51:03Z\",\"lastChecked\":\"2021-07-09T06:06:59Z\",\"healthState\":\"Success\",\"healthCheckResult\":[{\"name\":\"weddpnyzc\",\"displayName\":\"jsmka\",\"tags\":{},\"healthCheckTags\":\"\\\"dataq\\\"\",\"title\":\"nwvpaqbqxf\",\"status\":\"Disconnected\",\"severity\":\"Informational\",\"description\":\"ddofxnfb\",\"remediation\":\"yyrqaedwov\",\"targetResourceID\":\"ytjgoeayokrw\",\"targetResourceName\":\"ihwpadhedbfobd\",\"targetResourceType\":\"vothmkhjaoz\",\"timestamp\":\"2021-04-29T01:59:49Z\",\"additionalData\":\"cnjhbpoelhsc\",\"healthCheckSource\":\"hrhjvszfqbokndw\"}],\"healthCheckDate\":\"2021-05-30T01:02:57Z\",\"state\":\"Unknown\"},\"location\":\"joevzzuf\",\"id\":\"dxmlynzlyvapbkr\",\"name\":\"uog\",\"type\":\"tdlt\"},{\"properties\":{\"provisioningState\":\"PartiallySucceeded\",\"oemFamily\":\"izij\",\"currentOemVersion\":\"ylzeohlpsftq\",\"hardwareModel\":\"vmhvbvvcpwtqs\",\"packageVersions\":[{\"packageType\":\"hmz\",\"version\":\"ffetevrnt\",\"lastUpdated\":\"2021-12-02T19:18:28Z\"},{\"packageType\":\"acycsyo\",\"version\":\"tkhfhfs\",\"lastUpdated\":\"2021-10-16T09:46:27Z\"}],\"currentVersion\":\"sxrmhn\",\"currentSbeVersion\":\"zhvpr\",\"lastUpdated\":\"2021-06-02T06:21Z\",\"lastChecked\":\"2021-10-17T13:24:06Z\",\"healthState\":\"Failure\",\"healthCheckResult\":[{\"name\":\"hk\",\"displayName\":\"obzgott\",\"tags\":{},\"healthCheckTags\":\"\\\"dataadzighmmtbt\\\"\",\"title\":\"u\",\"status\":\"NotSpecified\",\"severity\":\"Hidden\",\"description\":\"abeurdeewlsux\",\"remediation\":\"bwkdwjyjiznioroo\",\"targetResourceID\":\"ftaspmcr\",\"targetResourceName\":\"huf\",\"targetResourceType\":\"n\",\"timestamp\":\"2021-03-07T12:19:04Z\",\"additionalData\":\"inuwqxungrob\",\"healthCheckSource\":\"fmsxjwdy\"}],\"healthCheckDate\":\"2021-01-14T10:53:06Z\",\"state\":\"UpdateInProgress\"},\"location\":\"jowz\",\"id\":\"eerclbltbhpw\",\"name\":\"chy\",\"type\":\"urjwmvwryvdifkii\"},{\"properties\":{\"provisioningState\":\"Failed\",\"oemFamily\":\"ccwmecbtxsytrtex\",\"currentOemVersion\":\"wmrqjyw\",\"hardwareModel\":\"hvycfjncindi\",\"packageVersions\":[{\"packageType\":\"ajwjuriarsbcll\",\"version\":\"hzcknjxiz\",\"lastUpdated\":\"2021-01-19T18:45:22Z\"}],\"currentVersion\":\"ygzkztxfexwacyy\",\"currentSbeVersion\":\"lxppd\",\"lastUpdated\":\"2021-05-18T23:17:09Z\",\"lastChecked\":\"2021-01-22T08:07Z\",\"healthState\":\"Error\",\"healthCheckResult\":[{\"name\":\"u\",\"displayName\":\"b\",\"tags\":{},\"healthCheckTags\":\"\\\"datajytqdcizeqqfo\\\"\",\"title\":\"nopm\",\"status\":\"DeploymentSuccess\",\"severity\":\"Hidden\",\"description\":\"o\",\"remediation\":\"lyo\",\"targetResourceID\":\"yfbkmv\",\"targetResourceName\":\"zmxojzsvmai\",\"targetResourceType\":\"q\",\"timestamp\":\"2021-04-27T16:12:57Z\",\"additionalData\":\"ejthgeecbpergwlc\",\"healthCheckSource\":\"hbamyqsok\"},{\"name\":\"pugzjwdi\",\"displayName\":\"rjixiujzkcsexg\",\"tags\":{},\"healthCheckTags\":\"\\\"dataw\\\"\",\"title\":\"ykkbxktxbbwl\",\"status\":\"DeploymentSuccess\",\"severity\":\"Critical\",\"description\":\"nvuqddlggbqaolgz\",\"remediation\":\"akdlkvggc\",\"targetResourceID\":\"nsffetp\",\"targetResourceName\":\"ixwewzlscgsmep\",\"targetResourceType\":\"vxgv\",\"timestamp\":\"2021-02-27T04:50:37Z\",\"additionalData\":\"thhx\",\"healthCheckSource\":\"ev\"}],\"healthCheckDate\":\"2021-09-03T10:50:36Z\",\"state\":\"NeedsAttention\"},\"location\":\"fhgannvwxqhpjhub\",\"id\":\"xvzg\",\"name\":\"ybvrhh\",\"type\":\"galgxnwfm\"},{\"properties\":{\"provisioningState\":\"PartiallyConnected\",\"oemFamily\":\"uebpamq\",\"currentOemVersion\":\"cssanybzzghv\",\"hardwareModel\":\"eum\",\"packageVersions\":[{\"packageType\":\"cdhlywkho\",\"version\":\"junzxezriwg\",\"lastUpdated\":\"2021-04-22T15:05:16Z\"},{\"packageType\":\"pcqk\",\"version\":\"aapxjh\",\"lastUpdated\":\"2021-08-15T21:30:36Z\"},{\"packageType\":\"benwsdfp\",\"version\":\"aahlfr\",\"lastUpdated\":\"2021-08-15T12:55:26Z\"}],\"currentVersion\":\"pmvzpireszya\",\"currentSbeVersion\":\"omlbm\",\"lastUpdated\":\"2021-08-01T10:05:02Z\",\"lastChecked\":\"2021-11-08T05:51:08Z\",\"healthState\":\"Unknown\",\"healthCheckResult\":[{\"name\":\"jjl\",\"displayName\":\"yeahhhutpulnrfcq\",\"tags\":{},\"healthCheckTags\":\"\\\"datacih\\\"\",\"title\":\"nowrerjpx\",\"status\":\"NotSpecified\",\"severity\":\"Informational\",\"description\":\"yqqidqimlgbbfjm\",\"remediation\":\"jvxlhmpmh\",\"targetResourceID\":\"t\",\"targetResourceName\":\"phqeofy\",\"targetResourceType\":\"snlow\",\"timestamp\":\"2021-07-27T18:47:40Z\",\"additionalData\":\"qixuancc\",\"healthCheckSource\":\"jfdgfqp\"},{\"name\":\"u\",\"displayName\":\"jhcfaa\",\"tags\":{},\"healthCheckTags\":\"\\\"dataci\\\"\",\"title\":\"mufzgugrbl\",\"status\":\"Error\",\"severity\":\"Warning\",\"description\":\"snqebaotbp\",\"remediation\":\"csmanxxr\",\"targetResourceID\":\"fmd\",\"targetResourceName\":\"cvtamqwzmnobfe\",\"targetResourceType\":\"psibxovuqo\",\"timestamp\":\"2021-07-06T09:18:49Z\",\"additionalData\":\"blndycl\",\"healthCheckSource\":\"ycvtqnzjcy\"},{\"name\":\"zhemb\",\"displayName\":\"wnalbadpis\",\"tags\":{},\"healthCheckTags\":\"\\\"dataeajvmvvlooubsfx\\\"\",\"title\":\"jeop\",\"status\":\"DeploymentFailed\",\"severity\":\"Warning\",\"description\":\"omlupfaz\",\"remediation\":\"jcdhus\",\"targetResourceID\":\"dwzrgdqyxajc\",\"targetResourceName\":\"rcavqcwyzoqzkmq\",\"targetResourceType\":\"wsjnkiixepb\",\"timestamp\":\"2021-10-23T05:17:29Z\",\"additionalData\":\"wwgfgsqxilef\",\"healthCheckSource\":\"sewrzne\"},{\"name\":\"qynttwknh\",\"displayName\":\"ks\",\"tags\":{},\"healthCheckTags\":\"\\\"dataogjmqjhgcyd\\\"\",\"title\":\"nm\",\"status\":\"NotSpecified\",\"severity\":\"Hidden\",\"description\":\"fcriqxzix\",\"remediation\":\"lxwmvcdkucpx\",\"targetResourceID\":\"afr\",\"targetResourceName\":\"gorogeuvmk\",\"targetResourceType\":\"pnr\",\"timestamp\":\"2021-05-06T10:10:27Z\",\"additionalData\":\"mlzofrsnqpljpete\",\"healthCheckSource\":\"tikelpmwgr\"}],\"healthCheckDate\":\"2021-02-25T04:39:08Z\",\"state\":\"UpdateAvailable\"},\"location\":\"hvo\",\"id\":\"jzscuezalivdf\",\"name\":\"gq\",\"type\":\"hewcffrx\"}],\"nextLink\":\"ezkhzp\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"oemFamily\":\"ximwgxqldeko\",\"currentOemVersion\":\"gxieqfkyfhi\",\"hardwareModel\":\"jaqupbyynvskpaj\",\"packageVersions\":[{\"packageType\":\"umexmj\",\"version\":\"cbccwkqmt\",\"lastUpdated\":\"2021-04-29T14:27:12Z\"},{\"packageType\":\"qis\",\"version\":\"p\",\"lastUpdated\":\"2021-01-10T12:35:38Z\"}],\"currentVersion\":\"rqre\",\"currentSbeVersion\":\"aahu\",\"lastUpdated\":\"2021-01-17T03:41:36Z\",\"lastChecked\":\"2021-08-03T10:17:37Z\",\"healthState\":\"Error\",\"healthCheckResult\":[{\"name\":\"lmuifmua\",\"displayName\":\"nfsncs\",\"tags\":{},\"healthCheckTags\":\"\\\"dataoshjgcze\\\"\",\"title\":\"bnxgzt\",\"status\":\"ValidationFailed\",\"severity\":\"Informational\",\"description\":\"chfjvmywjzebe\",\"remediation\":\"vlbefvwclj\",\"targetResourceID\":\"pylrwoxzgwpsy\",\"targetResourceName\":\"ijeypdvrbkerdkdk\",\"targetResourceType\":\"wqwjxil\",\"timestamp\":\"2021-10-10T22:24:09Z\",\"additionalData\":\"efey\",\"healthCheckSource\":\"q\"}],\"healthCheckDate\":\"2021-11-29T12:05:15Z\",\"state\":\"PreparationFailed\"},\"location\":\"mnaybdjnxumentq\",\"id\":\"tw\",\"name\":\"ymxymu\",\"type\":\"wi\"}],\"nextLink\":\"towlhlsycoyb\"}") .toObject(UpdateSummariesList.class); - Assertions.assertEquals("joevzzuf", model.value().get(0).location()); - Assertions.assertEquals("ymdvhhplkh", model.value().get(0).oemFamily()); - Assertions.assertEquals("dkatveqmgk", model.value().get(0).currentOemVersion()); - Assertions.assertEquals("w", model.value().get(0).hardwareModel()); - Assertions.assertEquals("ryearmhpwbu", model.value().get(0).packageVersions().get(0).packageType()); - Assertions.assertEquals("vsmfas", model.value().get(0).packageVersions().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T01:15:29Z"), + Assertions.assertEquals("mnaybdjnxumentq", model.value().get(0).location()); + Assertions.assertEquals("ximwgxqldeko", model.value().get(0).oemFamily()); + Assertions.assertEquals("gxieqfkyfhi", model.value().get(0).currentOemVersion()); + Assertions.assertEquals("jaqupbyynvskpaj", model.value().get(0).hardwareModel()); + Assertions.assertEquals("umexmj", model.value().get(0).packageVersions().get(0).packageType()); + Assertions.assertEquals("cbccwkqmt", model.value().get(0).packageVersions().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T14:27:12Z"), model.value().get(0).packageVersions().get(0).lastUpdated()); - Assertions.assertEquals("syqcjnqswxdowum", model.value().get(0).currentVersion()); - Assertions.assertEquals("ukrcdiohcl", model.value().get(0).currentSbeVersion()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T06:51:03Z"), model.value().get(0).lastUpdated()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-09T06:06:59Z"), model.value().get(0).lastChecked()); - Assertions.assertEquals(HealthState.SUCCESS, model.value().get(0).healthState()); - Assertions.assertEquals("weddpnyzc", model.value().get(0).healthCheckResult().get(0).name()); - Assertions.assertEquals("jsmka", model.value().get(0).healthCheckResult().get(0).displayName()); - Assertions.assertEquals("nwvpaqbqxf", model.value().get(0).healthCheckResult().get(0).title()); - Assertions.assertEquals(Status.DISCONNECTED, model.value().get(0).healthCheckResult().get(0).status()); + Assertions.assertEquals("rqre", model.value().get(0).currentVersion()); + Assertions.assertEquals("aahu", model.value().get(0).currentSbeVersion()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-17T03:41:36Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T10:17:37Z"), model.value().get(0).lastChecked()); + Assertions.assertEquals(HealthState.ERROR, model.value().get(0).healthState()); + Assertions.assertEquals("lmuifmua", model.value().get(0).healthCheckResult().get(0).name()); + Assertions.assertEquals("nfsncs", model.value().get(0).healthCheckResult().get(0).displayName()); + Assertions.assertEquals("bnxgzt", model.value().get(0).healthCheckResult().get(0).title()); + Assertions.assertEquals(Status.VALIDATION_FAILED, model.value().get(0).healthCheckResult().get(0).status()); Assertions.assertEquals(Severity.INFORMATIONAL, model.value().get(0).healthCheckResult().get(0).severity()); - Assertions.assertEquals("ddofxnfb", model.value().get(0).healthCheckResult().get(0).description()); - Assertions.assertEquals("yyrqaedwov", model.value().get(0).healthCheckResult().get(0).remediation()); - Assertions.assertEquals("ytjgoeayokrw", model.value().get(0).healthCheckResult().get(0).targetResourceId()); - Assertions.assertEquals("ihwpadhedbfobd", model.value().get(0).healthCheckResult().get(0).targetResourceName()); - Assertions.assertEquals("vothmkhjaoz", model.value().get(0).healthCheckResult().get(0).targetResourceType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T01:59:49Z"), + Assertions.assertEquals("chfjvmywjzebe", model.value().get(0).healthCheckResult().get(0).description()); + Assertions.assertEquals("vlbefvwclj", model.value().get(0).healthCheckResult().get(0).remediation()); + Assertions.assertEquals("pylrwoxzgwpsy", model.value().get(0).healthCheckResult().get(0).targetResourceId()); + Assertions.assertEquals("ijeypdvrbkerdkdk", + model.value().get(0).healthCheckResult().get(0).targetResourceName()); + Assertions.assertEquals("wqwjxil", model.value().get(0).healthCheckResult().get(0).targetResourceType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T22:24:09Z"), model.value().get(0).healthCheckResult().get(0).timestamp()); - Assertions.assertEquals("cnjhbpoelhsc", model.value().get(0).healthCheckResult().get(0).additionalData()); - Assertions.assertEquals("hrhjvszfqbokndw", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-30T01:02:57Z"), model.value().get(0).healthCheckDate()); - Assertions.assertEquals(UpdateSummariesPropertiesState.UNKNOWN, model.value().get(0).state()); - Assertions.assertEquals("ezkhzp", model.nextLink()); + Assertions.assertEquals("efey", model.value().get(0).healthCheckResult().get(0).additionalData()); + Assertions.assertEquals("q", model.value().get(0).healthCheckResult().get(0).healthCheckSource()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-29T12:05:15Z"), model.value().get(0).healthCheckDate()); + Assertions.assertEquals(UpdateSummariesPropertiesState.PREPARATION_FAILED, model.value().get(0).state()); + Assertions.assertEquals("towlhlsycoyb", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationsDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationsDeleteMockTests.java index d31bec7bdc26..6937458e2ed0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationsDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updateSummariesOperations().delete("qivbigdrqg", "etboyztgnmux", com.azure.core.util.Context.NONE); + manager.updateSummariesOperations().delete("fcssanybzzghvd", "eum", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteMockTests.java index 4b83181a9ad3..7f5b73b95453 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updates().delete("gyphheovejkpalec", "tlthrt", "pu", com.azure.core.util.Context.NONE); + manager.updates().delete("psshr", "nkcclpctuog", "scxjfsgmosp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostMockTests.java index 67cd9d17e56a..e2f85f2fc82d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostMockTests.java @@ -27,7 +27,7 @@ public void testPost() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updates().post("zbdbrlbo", "ltyo", "acbibtk", com.azure.core.util.Context.NONE); + manager.updates().post("wqgmhmqmiwxz", "v", "zu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UploadCertificateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UploadCertificateRequestTests.java index bec02404a2bc..f2a44628ab6a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UploadCertificateRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UploadCertificateRequestTests.java @@ -13,16 +13,17 @@ public final class UploadCertificateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UploadCertificateRequest model = BinaryData.fromString("{\"properties\":{\"certificates\":[\"p\"]}}") - .toObject(UploadCertificateRequest.class); - Assertions.assertEquals("p", model.properties().certificates().get(0)); + UploadCertificateRequest model + = BinaryData.fromString("{\"properties\":{\"certificates\":[\"xbpvjymjhx\",\"j\"]}}") + .toObject(UploadCertificateRequest.class); + Assertions.assertEquals("xbpvjymjhx", model.properties().certificates().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UploadCertificateRequest model = new UploadCertificateRequest() - .withProperties(new RawCertificateData().withCertificates(Arrays.asList("p"))); + .withProperties(new RawCertificateData().withCertificates(Arrays.asList("xbpvjymjhx", "j"))); model = BinaryData.fromObject(model).toObject(UploadCertificateRequest.class); - Assertions.assertEquals("p", model.properties().certificates().get(0)); + Assertions.assertEquals("xbpvjymjhx", model.properties().certificates().get(0)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UserAssignedIdentityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UserAssignedIdentityTests.java index bd67cdb44f16..eaf56d8d8b03 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UserAssignedIdentityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/UserAssignedIdentityTests.java @@ -10,7 +10,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"hsfxoblytkb\",\"clientId\":\"pe\"}") + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"rjaw\",\"clientId\":\"wgxhn\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateRequestTests.java index 6305c337ca7e..35741c05a88e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateRequestTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateRequestTests.java @@ -13,18 +13,18 @@ public final class ValidateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidateRequest model - = BinaryData.fromString("{\"edgeDeviceIds\":[\"ejwabmdujtmvco\"],\"additionalInfo\":\"xcmjurbu\"}") + = BinaryData.fromString("{\"edgeDeviceIds\":[\"uteyxeyguq\"],\"additionalInfo\":\"ijiitns\"}") .toObject(ValidateRequest.class); - Assertions.assertEquals("ejwabmdujtmvco", model.edgeDeviceIds().get(0)); - Assertions.assertEquals("xcmjurbu", model.additionalInfo()); + Assertions.assertEquals("uteyxeyguq", model.edgeDeviceIds().get(0)); + Assertions.assertEquals("ijiitns", model.additionalInfo()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ValidateRequest model - = new ValidateRequest().withEdgeDeviceIds(Arrays.asList("ejwabmdujtmvco")).withAdditionalInfo("xcmjurbu"); + = new ValidateRequest().withEdgeDeviceIds(Arrays.asList("uteyxeyguq")).withAdditionalInfo("ijiitns"); model = BinaryData.fromObject(model).toObject(ValidateRequest.class); - Assertions.assertEquals("ejwabmdujtmvco", model.edgeDeviceIds().get(0)); - Assertions.assertEquals("xcmjurbu", model.additionalInfo()); + Assertions.assertEquals("uteyxeyguq", model.edgeDeviceIds().get(0)); + Assertions.assertEquals("ijiitns", model.additionalInfo()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateResponseInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateResponseInnerTests.java index f060e9658a8a..e53af341a400 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateResponseInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidateResponseInnerTests.java @@ -11,6 +11,6 @@ public final class ValidateResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidateResponseInner model - = BinaryData.fromString("{\"status\":\"lkyqltqsrog\"}").toObject(ValidateResponseInner.class); + = BinaryData.fromString("{\"status\":\"lz\"}").toObject(ValidateResponseInner.class); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilitiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilitiesTests.java index f5c4f59cc5a1..d578f80e15e8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilitiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilitiesTests.java @@ -12,9 +12,9 @@ public final class ValidatedSolutionRecipeCapabilitiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidatedSolutionRecipeCapabilities model = BinaryData.fromString( - "{\"clusterCapabilities\":[{\"capabilityName\":\"vpsozjiihjri\"},{\"capabilityName\":\"bmrzoepnx\"}],\"nodeCapabilities\":[{\"capabilityName\":\"v\"},{\"capabilityName\":\"njkgvfnmx\"},{\"capabilityName\":\"ursqf\"},{\"capabilityName\":\"ibtyibuyvpirfqjp\"}]}") + "{\"clusterCapabilities\":[{\"capabilityName\":\"atjhdhzybspijhf\"},{\"capabilityName\":\"zgdkkagvwu\"},{\"capabilityName\":\"hsusmmor\"},{\"capabilityName\":\"mzhwilzzhni\"}],\"nodeCapabilities\":[{\"capabilityName\":\"riprlkdneytt\"},{\"capabilityName\":\"rcxivcbkut\"}]}") .toObject(ValidatedSolutionRecipeCapabilities.class); - Assertions.assertEquals("vpsozjiihjri", model.clusterCapabilities().get(0).capabilityName()); - Assertions.assertEquals("v", model.nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("atjhdhzybspijhf", model.clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("riprlkdneytt", model.nodeCapabilities().get(0).capabilityName()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilityTests.java index b089766d54c0..f189fd492f0d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilityTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeCapabilityTests.java @@ -11,8 +11,8 @@ public final class ValidatedSolutionRecipeCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ValidatedSolutionRecipeCapability model = BinaryData.fromString("{\"capabilityName\":\"qnoowsbedenrex\"}") + ValidatedSolutionRecipeCapability model = BinaryData.fromString("{\"capabilityName\":\"umltwjflu\"}") .toObject(ValidatedSolutionRecipeCapability.class); - Assertions.assertEquals("qnoowsbedenrex", model.capabilityName()); + Assertions.assertEquals("umltwjflu", model.capabilityName()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentMetadataTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentMetadataTests.java index cf851fae949a..8285b570493d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentMetadataTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentMetadataTests.java @@ -12,18 +12,18 @@ public final class ValidatedSolutionRecipeComponentMetadataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidatedSolutionRecipeComponentMetadata model = BinaryData.fromString( - "{\"extensionType\":\"nunmpzkrv\",\"publisher\":\"ifkdschlzvf\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"jwg\",\"ring\":\"nphbkgfyrt\",\"releaseTrain\":\"mhmjpjs\",\"link\":\"fp\",\"name\":\"wtyg\",\"expectedHash\":\"gwmseharxifv\",\"previewSource\":\"rxtmbpjptnvw\"}") + "{\"extensionType\":\"k\",\"publisher\":\"xprwpxs\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":false,\"catalog\":\"lcsklt\",\"ring\":\"uugggzlfbgrd\",\"releaseTrain\":\"ubsrtmdylperpilt\",\"link\":\"zgczfcmfpfbode\",\"name\":\"esrgvtshuvftwai\",\"expectedHash\":\"uqk\",\"previewSource\":\"zgjypanhxmpdxxz\"}") .toObject(ValidatedSolutionRecipeComponentMetadata.class); - Assertions.assertEquals("nunmpzkrv", model.extensionType()); - Assertions.assertEquals("ifkdschlzvf", model.publisher()); - Assertions.assertTrue(model.enableAutomaticUpgrade()); + Assertions.assertEquals("k", model.extensionType()); + Assertions.assertEquals("xprwpxs", model.publisher()); + Assertions.assertFalse(model.enableAutomaticUpgrade()); Assertions.assertFalse(model.lcmUpdate()); - Assertions.assertEquals("jwg", model.catalog()); - Assertions.assertEquals("nphbkgfyrt", model.ring()); - Assertions.assertEquals("mhmjpjs", model.releaseTrain()); - Assertions.assertEquals("fp", model.link()); - Assertions.assertEquals("wtyg", model.name()); - Assertions.assertEquals("gwmseharxifv", model.expectedHash()); - Assertions.assertEquals("rxtmbpjptnvw", model.previewSource()); + Assertions.assertEquals("lcsklt", model.catalog()); + Assertions.assertEquals("uugggzlfbgrd", model.ring()); + Assertions.assertEquals("ubsrtmdylperpilt", model.releaseTrain()); + Assertions.assertEquals("zgczfcmfpfbode", model.link()); + Assertions.assertEquals("esrgvtshuvftwai", model.name()); + Assertions.assertEquals("uqk", model.expectedHash()); + Assertions.assertEquals("zgjypanhxmpdxxz", model.previewSource()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentPayloadTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentPayloadTests.java index a48096d4b2d1..9f61be14c764 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentPayloadTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentPayloadTests.java @@ -11,12 +11,12 @@ public final class ValidatedSolutionRecipeComponentPayloadTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ValidatedSolutionRecipeComponentPayload model = BinaryData.fromString( - "{\"identifier\":\"sjjzyvoaqajuveh\",\"hash\":\"ptdmkrrbhmpful\",\"fileName\":\"be\",\"url\":\"gybpmfb\"}") + ValidatedSolutionRecipeComponentPayload model = BinaryData + .fromString("{\"identifier\":\"riwgybjp\",\"hash\":\"zokscvg\",\"fileName\":\"lix\",\"url\":\"gbyfgwe\"}") .toObject(ValidatedSolutionRecipeComponentPayload.class); - Assertions.assertEquals("sjjzyvoaqajuveh", model.identifier()); - Assertions.assertEquals("ptdmkrrbhmpful", model.hash()); - Assertions.assertEquals("be", model.fileName()); - Assertions.assertEquals("gybpmfb", model.url()); + Assertions.assertEquals("riwgybjp", model.identifier()); + Assertions.assertEquals("zokscvg", model.hash()); + Assertions.assertEquals("lix", model.fileName()); + Assertions.assertEquals("gbyfgwe", model.url()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentTests.java index e80436d6cd84..c6cbf6dbf6eb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeComponentTests.java @@ -12,27 +12,27 @@ public final class ValidatedSolutionRecipeComponentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidatedSolutionRecipeComponent model = BinaryData.fromString( - "{\"name\":\"xbhxvucnulgmnhj\",\"type\":\"vdyznf\",\"requiredVersion\":\"svkskmqoz\",\"installOrder\":8436274600840597969,\"tags\":[\"hjrliizjixlqfh\",\"fkwa\",\"solronqqlm\"],\"payloads\":[{\"identifier\":\"qxsjxte\",\"hash\":\"exhvuqbozoolz\",\"fileName\":\"ocarkuzlbcnndt\",\"url\":\"nx\"},{\"identifier\":\"wqy\",\"hash\":\"llhdyzm\",\"fileName\":\"ckze\",\"url\":\"nxakckyw\"},{\"identifier\":\"mxgaabjkdtfohfao\",\"hash\":\"zvkiwrsiwdy\",\"fileName\":\"quryk\",\"url\":\"rra\"}],\"metadata\":{\"extensionType\":\"kcsueho\",\"publisher\":\"dac\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"lqidywmhm\",\"ring\":\"yrilkfb\",\"releaseTrain\":\"qqxvztpbn\",\"link\":\"qtxjtomalswbnfdd\",\"name\":\"ldwq\",\"expectedHash\":\"sfzygleexahv\",\"previewSource\":\"whsbrcary\"}}") + "{\"name\":\"ynbpvzlqywauy\",\"type\":\"njc\",\"requiredVersion\":\"mocgjshg\",\"installOrder\":256149552719104453,\"tags\":[\"wvixq\",\"ggljkybsjrclrv\",\"z\",\"nrbctbhpjhxpcvrd\"],\"payloads\":[{\"identifier\":\"it\",\"hash\":\"n\",\"fileName\":\"qady\",\"url\":\"zjahwriuomz\"},{\"identifier\":\"zfkiceevsaaxwsp\",\"hash\":\"axikhfjqebglcxk\",\"fileName\":\"gzzromv\",\"url\":\"g\"},{\"identifier\":\"sem\",\"hash\":\"mesrfsvpi\",\"fileName\":\"kzpatqtdi\",\"url\":\"wxspvckojaz\"},{\"identifier\":\"bgspf\",\"hash\":\"esubzpvpv\",\"fileName\":\"ylytcovqseusr\",\"url\":\"j\"}],\"metadata\":{\"extensionType\":\"zfxnxmlbmuos\",\"publisher\":\"jmdihdcyyyzlw\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":false,\"catalog\":\"ufzrfgmdqgnnbzrt\",\"ring\":\"edzuub\",\"releaseTrain\":\"vgjs\",\"link\":\"tyjjvavdpwwobt\",\"name\":\"htitsffofwan\",\"expectedHash\":\"k\",\"previewSource\":\"auwazcgwd\"}}") .toObject(ValidatedSolutionRecipeComponent.class); - Assertions.assertEquals("xbhxvucnulgmnhj", model.name()); - Assertions.assertEquals("vdyznf", model.type()); - Assertions.assertEquals("svkskmqoz", model.requiredVersion()); - Assertions.assertEquals(8436274600840597969L, model.installOrder()); - Assertions.assertEquals("hjrliizjixlqfh", model.tags().get(0)); - Assertions.assertEquals("qxsjxte", model.payloads().get(0).identifier()); - Assertions.assertEquals("exhvuqbozoolz", model.payloads().get(0).hash()); - Assertions.assertEquals("ocarkuzlbcnndt", model.payloads().get(0).fileName()); - Assertions.assertEquals("nx", model.payloads().get(0).url()); - Assertions.assertEquals("kcsueho", model.metadata().extensionType()); - Assertions.assertEquals("dac", model.metadata().publisher()); - Assertions.assertTrue(model.metadata().enableAutomaticUpgrade()); + Assertions.assertEquals("ynbpvzlqywauy", model.name()); + Assertions.assertEquals("njc", model.type()); + Assertions.assertEquals("mocgjshg", model.requiredVersion()); + Assertions.assertEquals(256149552719104453L, model.installOrder()); + Assertions.assertEquals("wvixq", model.tags().get(0)); + Assertions.assertEquals("it", model.payloads().get(0).identifier()); + Assertions.assertEquals("n", model.payloads().get(0).hash()); + Assertions.assertEquals("qady", model.payloads().get(0).fileName()); + Assertions.assertEquals("zjahwriuomz", model.payloads().get(0).url()); + Assertions.assertEquals("zfxnxmlbmuos", model.metadata().extensionType()); + Assertions.assertEquals("jmdihdcyyyzlw", model.metadata().publisher()); + Assertions.assertFalse(model.metadata().enableAutomaticUpgrade()); Assertions.assertFalse(model.metadata().lcmUpdate()); - Assertions.assertEquals("lqidywmhm", model.metadata().catalog()); - Assertions.assertEquals("yrilkfb", model.metadata().ring()); - Assertions.assertEquals("qqxvztpbn", model.metadata().releaseTrain()); - Assertions.assertEquals("qtxjtomalswbnfdd", model.metadata().link()); - Assertions.assertEquals("ldwq", model.metadata().name()); - Assertions.assertEquals("sfzygleexahv", model.metadata().expectedHash()); - Assertions.assertEquals("whsbrcary", model.metadata().previewSource()); + Assertions.assertEquals("ufzrfgmdqgnnbzrt", model.metadata().catalog()); + Assertions.assertEquals("edzuub", model.metadata().ring()); + Assertions.assertEquals("vgjs", model.metadata().releaseTrain()); + Assertions.assertEquals("tyjjvavdpwwobt", model.metadata().link()); + Assertions.assertEquals("htitsffofwan", model.metadata().name()); + Assertions.assertEquals("k", model.metadata().expectedHash()); + Assertions.assertEquals("auwazcgwd", model.metadata().previewSource()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeContentTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeContentTests.java index 54d5f5fa4aee..c7f8f66d0293 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeContentTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeContentTests.java @@ -12,31 +12,31 @@ public final class ValidatedSolutionRecipeContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidatedSolutionRecipeContent model = BinaryData.fromString( - "{\"info\":{\"solutionType\":\"wdfmmpzhzzwvywr\",\"version\":\"yngydgrpxncaki\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"ndjrkclamggl\"},{\"capabilityName\":\"lmf\"},{\"capabilityName\":\"jdoq\"}],\"nodeCapabilities\":[{\"capabilityName\":\"kgltyg\"},{\"capabilityName\":\"hqfgqkayejsx\"}]},\"components\":[{\"name\":\"gflwfgziiucijj\",\"type\":\"eatlijjjrtvamcas\",\"requiredVersion\":\"nxkvccxetyvku\",\"installOrder\":5943308970966611837,\"tags\":[\"ohikkgqogjwpinde\",\"vabbx\"],\"payloads\":[{\"identifier\":\"edeilb\",\"hash\":\"ywfcfxzi\",\"fileName\":\"zzihvwy\",\"url\":\"usuv\"},{\"identifier\":\"slczwciidjsllf\",\"hash\":\"yvdmvx\",\"fileName\":\"dqacfrgnawbabgf\",\"url\":\"ktyjmf\"}],\"metadata\":{\"extensionType\":\"fsyqkfrbzgowoxq\",\"publisher\":\"ea\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"gxhlusr\",\"ring\":\"i\",\"releaseTrain\":\"mjceagbjqvls\",\"link\":\"ywzash\",\"name\":\"onoyjf\",\"expectedHash\":\"puby\",\"previewSource\":\"clkfkee\"}},{\"name\":\"gv\",\"type\":\"pemtuoqu\",\"requiredVersion\":\"yegq\",\"installOrder\":4498558270885623267,\"tags\":[\"flqqbtnyjpylxd\",\"fvabmvmsxba\",\"vwjcnkottlwuh\"],\"payloads\":[{\"identifier\":\"mailfemjj\",\"hash\":\"akz\",\"fileName\":\"jiqul\",\"url\":\"qx\"},{\"identifier\":\"dmvr\",\"hash\":\"cm\",\"fileName\":\"erndbrnyeofltfnn\",\"url\":\"rkadjfynnfmuiiir\"},{\"identifier\":\"pfoh\",\"hash\":\"kfkxbbcbrwjiut\",\"fileName\":\"njizb\",\"url\":\"ewoi\"},{\"identifier\":\"mrvz\",\"hash\":\"juyrsrziuctixg\",\"fileName\":\"d\",\"url\":\"uifr\"}],\"metadata\":{\"extensionType\":\"aapezkiswqjmdghs\",\"publisher\":\"arybjufptbjc\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"iyqvldaswv\",\"ring\":\"i\",\"releaseTrain\":\"qzlgcndhzxrrfcfs\",\"link\":\"khgsnxuwwkpphefs\",\"name\":\"xlb\",\"expectedHash\":\"omeikjcl\",\"previewSource\":\"acnmwpfsuqtaaz\"}}]}") + "{\"info\":{\"solutionType\":\"nawmhhgzotfriyrg\",\"version\":\"oe\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"wxxyxhighctx\"}],\"nodeCapabilities\":[{\"capabilityName\":\"molpcqyde\"},{\"capabilityName\":\"kvskiczdfrjei\"},{\"capabilityName\":\"ikgqaboohxbms\"}]},\"components\":[{\"name\":\"cqsxrmdvewu\",\"type\":\"qaeo\",\"requiredVersion\":\"jh\",\"installOrder\":4689452746504162390,\"tags\":[\"vhhdaurgho\",\"xaex\",\"k\"],\"payloads\":[{\"identifier\":\"xjoezlqxrkdknko\",\"hash\":\"ektm\",\"fileName\":\"o\",\"url\":\"omtzamicb\"},{\"identifier\":\"gwcd\",\"hash\":\"zseznuxkeuairaa\",\"fileName\":\"m\",\"url\":\"lqjbedpfixlhupmo\"}],\"metadata\":{\"extensionType\":\"z\",\"publisher\":\"npx\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"eyxel\",\"ring\":\"cghf\",\"releaseTrain\":\"ufssjyghsfxr\",\"link\":\"hammgmqfmefgv\",\"name\":\"pd\",\"expectedHash\":\"gquxweysland\",\"previewSource\":\"cdjhunhg\"}},{\"name\":\"cgawnrrnquo\",\"type\":\"sotirei\",\"requiredVersion\":\"eobfsxstcyilbvzm\",\"installOrder\":8218144211334199969,\"tags\":[\"lq\",\"zexokjxeb\"],\"payloads\":[{\"identifier\":\"zinzabwmvogljsvl\",\"hash\":\"gi\",\"fileName\":\"nwcehaqidoyzl\",\"url\":\"giomqo\"}],\"metadata\":{\"extensionType\":\"pia\",\"publisher\":\"pfsergdtpeqna\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"b\",\"ring\":\"qncjubkhjozfymcw\",\"releaseTrain\":\"upyvqyvliq\",\"link\":\"psejbsvsiaies\",\"name\":\"ddzydisnu\",\"expectedHash\":\"ywyjlnldpxot\",\"previewSource\":\"iiaocqib\"}}]}") .toObject(ValidatedSolutionRecipeContent.class); - Assertions.assertEquals("wdfmmpzhzzwvywr", model.info().solutionType()); - Assertions.assertEquals("yngydgrpxncaki", model.info().version()); - Assertions.assertEquals("ndjrkclamggl", model.capabilities().clusterCapabilities().get(0).capabilityName()); - Assertions.assertEquals("kgltyg", model.capabilities().nodeCapabilities().get(0).capabilityName()); - Assertions.assertEquals("gflwfgziiucijj", model.components().get(0).name()); - Assertions.assertEquals("eatlijjjrtvamcas", model.components().get(0).type()); - Assertions.assertEquals("nxkvccxetyvku", model.components().get(0).requiredVersion()); - Assertions.assertEquals(5943308970966611837L, model.components().get(0).installOrder()); - Assertions.assertEquals("ohikkgqogjwpinde", model.components().get(0).tags().get(0)); - Assertions.assertEquals("edeilb", model.components().get(0).payloads().get(0).identifier()); - Assertions.assertEquals("ywfcfxzi", model.components().get(0).payloads().get(0).hash()); - Assertions.assertEquals("zzihvwy", model.components().get(0).payloads().get(0).fileName()); - Assertions.assertEquals("usuv", model.components().get(0).payloads().get(0).url()); - Assertions.assertEquals("fsyqkfrbzgowoxq", model.components().get(0).metadata().extensionType()); - Assertions.assertEquals("ea", model.components().get(0).metadata().publisher()); + Assertions.assertEquals("nawmhhgzotfriyrg", model.info().solutionType()); + Assertions.assertEquals("oe", model.info().version()); + Assertions.assertEquals("wxxyxhighctx", model.capabilities().clusterCapabilities().get(0).capabilityName()); + Assertions.assertEquals("molpcqyde", model.capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("cqsxrmdvewu", model.components().get(0).name()); + Assertions.assertEquals("qaeo", model.components().get(0).type()); + Assertions.assertEquals("jh", model.components().get(0).requiredVersion()); + Assertions.assertEquals(4689452746504162390L, model.components().get(0).installOrder()); + Assertions.assertEquals("vhhdaurgho", model.components().get(0).tags().get(0)); + Assertions.assertEquals("xjoezlqxrkdknko", model.components().get(0).payloads().get(0).identifier()); + Assertions.assertEquals("ektm", model.components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("o", model.components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("omtzamicb", model.components().get(0).payloads().get(0).url()); + Assertions.assertEquals("z", model.components().get(0).metadata().extensionType()); + Assertions.assertEquals("npx", model.components().get(0).metadata().publisher()); Assertions.assertTrue(model.components().get(0).metadata().enableAutomaticUpgrade()); Assertions.assertFalse(model.components().get(0).metadata().lcmUpdate()); - Assertions.assertEquals("gxhlusr", model.components().get(0).metadata().catalog()); - Assertions.assertEquals("i", model.components().get(0).metadata().ring()); - Assertions.assertEquals("mjceagbjqvls", model.components().get(0).metadata().releaseTrain()); - Assertions.assertEquals("ywzash", model.components().get(0).metadata().link()); - Assertions.assertEquals("onoyjf", model.components().get(0).metadata().name()); - Assertions.assertEquals("puby", model.components().get(0).metadata().expectedHash()); - Assertions.assertEquals("clkfkee", model.components().get(0).metadata().previewSource()); + Assertions.assertEquals("eyxel", model.components().get(0).metadata().catalog()); + Assertions.assertEquals("cghf", model.components().get(0).metadata().ring()); + Assertions.assertEquals("ufssjyghsfxr", model.components().get(0).metadata().releaseTrain()); + Assertions.assertEquals("hammgmqfmefgv", model.components().get(0).metadata().link()); + Assertions.assertEquals("pd", model.components().get(0).metadata().name()); + Assertions.assertEquals("gquxweysland", model.components().get(0).metadata().expectedHash()); + Assertions.assertEquals("cdjhunhg", model.components().get(0).metadata().previewSource()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInfoTests.java index d146c77c9deb..9ee00fa0d86d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInfoTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInfoTests.java @@ -12,9 +12,9 @@ public final class ValidatedSolutionRecipeInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidatedSolutionRecipeInfo model - = BinaryData.fromString("{\"solutionType\":\"qbxyxoyfpuqqi\",\"version\":\"ezxlhdjzqdca\"}") + = BinaryData.fromString("{\"solutionType\":\"jihw\",\"version\":\"ebiphryvcjwqwoq\"}") .toObject(ValidatedSolutionRecipeInfo.class); - Assertions.assertEquals("qbxyxoyfpuqqi", model.solutionType()); - Assertions.assertEquals("ezxlhdjzqdca", model.version()); + Assertions.assertEquals("jihw", model.solutionType()); + Assertions.assertEquals("ebiphryvcjwqwoq", model.version()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInnerTests.java index abed3a1efc8a..ef67e0cd921d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInnerTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeInnerTests.java @@ -12,47 +12,46 @@ public final class ValidatedSolutionRecipeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidatedSolutionRecipeInner model = BinaryData.fromString( - "{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"ykycndzfqi\",\"version\":\"jreuykbbmn\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"ltbxoeeonqlnfw\"},{\"capabilityName\":\"y\"},{\"capabilityName\":\"mvqdbpbhfckdvez\"}],\"nodeCapabilities\":[{\"capabilityName\":\"cssbzhddu\"},{\"capabilityName\":\"bnqfblhk\"},{\"capabilityName\":\"lehpavawu\"},{\"capabilityName\":\"iqjtiogqgdmin\"}]},\"components\":[{\"name\":\"tteajohiygs\",\"type\":\"n\",\"requiredVersion\":\"n\",\"installOrder\":1292241455575202273,\"tags\":[\"kmktpvwxqcseh\"],\"payloads\":[{\"identifier\":\"hufmpq\",\"hash\":\"mqyjgy\",\"fileName\":\"zulo\",\"url\":\"saeuzanhsfnhsenw\"},{\"identifier\":\"hpzfngqj\",\"hash\":\"lidftujwjj\",\"fileName\":\"fwbeqrkuorh\",\"url\":\"ssruqnmdvhazcvj\"},{\"identifier\":\"tiq\",\"hash\":\"wbqerzwxiytxtd\",\"fileName\":\"ukvlb\",\"url\":\"ktg\"},{\"identifier\":\"styoua\",\"hash\":\"bewreswmowegmmut\",\"fileName\":\"yxey\",\"url\":\"uqi\"}],\"metadata\":{\"extensionType\":\"ii\",\"publisher\":\"spxlzde\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"waiufanra\",\"ring\":\"fueqfrojs\",\"releaseTrain\":\"grhydk\",\"link\":\"ywezskiecafyg\",\"name\":\"xieqv\",\"expectedHash\":\"makli\",\"previewSource\":\"cahyhx\"}},{\"name\":\"lyb\",\"type\":\"awoijp\",\"requiredVersion\":\"tblxpkkwjdjodqhy\",\"installOrder\":3066440508113939798,\"tags\":[\"rem\"],\"payloads\":[{\"identifier\":\"lizhceumoqodkad\",\"hash\":\"pyi\",\"fileName\":\"ngqladywrx\",\"url\":\"hydt\"},{\"identifier\":\"uvvadswzsnu\",\"hash\":\"emlowuowhl\",\"fileName\":\"lnwy\",\"url\":\"mouvbl\"}],\"metadata\":{\"extensionType\":\"kzkltrfowt\",\"publisher\":\"rfmvlihcvjdrqcrj\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":false,\"catalog\":\"kvhd\",\"ring\":\"wyojbfqzdkfnjyi\",\"releaseTrain\":\"afr\",\"link\":\"qxmbjroumzzn\",\"name\":\"l\",\"expectedHash\":\"rhuzgfxonjtpu\",\"previewSource\":\"l\"}},{\"name\":\"wpvtiotzbpdbol\",\"type\":\"gryfqiuasig\",\"requiredVersion\":\"wsocnequygdjbo\",\"installOrder\":4384071584198022994,\"tags\":[\"qjkqevadrmmwi\",\"awvcmjzkxiid\",\"scz\"],\"payloads\":[{\"identifier\":\"s\",\"hash\":\"oqiqazugamx\",\"fileName\":\"krrcoiisbamnpp\",\"url\":\"cekuz\"},{\"identifier\":\"dsbezaxyfu\",\"hash\":\"zxuizhyhnepkpe\",\"fileName\":\"iarxqiubxdukec\",\"url\":\"xdazv\"},{\"identifier\":\"hctmmkosz\",\"hash\":\"dblnsntrp\",\"fileName\":\"aqkiofkb\",\"url\":\"fmhklbnld\"},{\"identifier\":\"vcb\",\"hash\":\"hez\",\"fileName\":\"quwusq\",\"url\":\"utrpbr\"}],\"metadata\":{\"extensionType\":\"uuatvlmbjwcol\",\"publisher\":\"x\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"cpahprzrvxhm\",\"ring\":\"hocn\",\"releaseTrain\":\"cmj\",\"link\":\"gxnoqrxtdis\",\"name\":\"evhdlmydid\",\"expectedHash\":\"epfwwt\",\"previewSource\":\"doesxxhmwcdb\"}}]},\"signature\":\"yo\"},\"id\":\"xkxhnegknjzrbhtm\",\"name\":\"plvukaobrlbpg\",\"type\":\"nbagnchj\"}") + "{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"gfredmlscg\",\"version\":\"ll\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"aovjow\"}],\"nodeCapabilities\":[{\"capabilityName\":\"hpa\"},{\"capabilityName\":\"acomlyotg\"}]},\"components\":[{\"name\":\"sxnsrqorcge\",\"type\":\"mv\",\"requiredVersion\":\"bxeetqujxcxxqn\",\"installOrder\":2051583075223159829,\"tags\":[\"e\",\"wqurc\",\"ojmrvvxwjongzse\",\"qqrsil\"],\"payloads\":[{\"identifier\":\"skx\",\"hash\":\"kansbvriaqgvt\",\"fileName\":\"jrulfucte\",\"url\":\"rthcfjzh\"},{\"identifier\":\"lyubqjrostvrjeq\",\"hash\":\"tzzbeq\",\"fileName\":\"ztr\",\"url\":\"alx\"}],\"metadata\":{\"extensionType\":\"absr\",\"publisher\":\"sn\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"iwkkvya\",\"ring\":\"kvvcsemsvuvdjkq\",\"releaseTrain\":\"tqmm\",\"link\":\"vrjjxnw\",\"name\":\"chp\",\"expectedHash\":\"xlehzlxpgfquwzp\",\"previewSource\":\"ibelwcerwkw\"}},{\"name\":\"pjxljtxb\",\"type\":\"sqtbxxniu\",\"requiredVersion\":\"dzhgbdgzpags\",\"installOrder\":4837074309871662154,\"tags\":[\"buwq\"],\"payloads\":[{\"identifier\":\"fllmqiy\",\"hash\":\"ezoell\",\"fileName\":\"kki\",\"url\":\"w\"},{\"identifier\":\"mtum\",\"hash\":\"pymdjfuax\",\"fileName\":\"oqvqpilr\",\"url\":\"uncanlduwzorx\"},{\"identifier\":\"bm\",\"hash\":\"aqklxy\",\"fileName\":\"x\",\"url\":\"qvfqepdxc\"}],\"metadata\":{\"extensionType\":\"ubwyv\",\"publisher\":\"bowcpjqduqgi\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":false,\"catalog\":\"fbwljavhuerkjdd\",\"ring\":\"gliegftcvbiif\",\"releaseTrain\":\"sdwgdnkefgmwd\",\"link\":\"eb\",\"name\":\"czldbglzoutbaaqg\",\"expectedHash\":\"kajclyzgsn\",\"previewSource\":\"bjgmnzj\"}},{\"name\":\"t\",\"type\":\"mrxkhlobvv\",\"requiredVersion\":\"hvhd\",\"installOrder\":3516890594999470957,\"tags\":[\"luiyuosnuudte\",\"vhyibdrqrsw\",\"buubpyrowt\"],\"payloads\":[{\"identifier\":\"ztfwfqchvcz\",\"hash\":\"vjnn\",\"fileName\":\"tagfyvrtpqp\",\"url\":\"mhzcgkrepdqh\"},{\"identifier\":\"yhwqw\",\"hash\":\"mvxqab\",\"fileName\":\"km\",\"url\":\"eoxinhgre\"},{\"identifier\":\"h\",\"hash\":\"whlpuzjpceezn\",\"fileName\":\"angp\",\"url\":\"bfaxyxzlbc\"},{\"identifier\":\"phmsexroq\",\"hash\":\"ndktxfv\",\"fileName\":\"nfee\",\"url\":\"gpkrie\"}],\"metadata\":{\"extensionType\":\"nixxo\",\"publisher\":\"zk\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"iwxeiicrmpep\",\"ring\":\"dm\",\"releaseTrain\":\"xijvskwsdgkjgyac\",\"link\":\"asekwefcvoinw\",\"name\":\"artwyxqic\",\"expectedHash\":\"dvatdavuqm\",\"previewSource\":\"ymsfobjlqu\"}}]},\"signature\":\"ezcjumvpsi\"},\"id\":\"oyoiglkmiqw\",\"name\":\"nracli\",\"type\":\"bfqpspkladyd\"}") .toObject(ValidatedSolutionRecipeInner.class); - Assertions.assertEquals("ykycndzfqi", model.properties().recipeContent().info().solutionType()); - Assertions.assertEquals("jreuykbbmn", model.properties().recipeContent().info().version()); - Assertions.assertEquals("ltbxoeeonqlnfw", + Assertions.assertEquals("gfredmlscg", model.properties().recipeContent().info().solutionType()); + Assertions.assertEquals("ll", model.properties().recipeContent().info().version()); + Assertions.assertEquals("aovjow", model.properties().recipeContent().capabilities().clusterCapabilities().get(0).capabilityName()); - Assertions.assertEquals("cssbzhddu", + Assertions.assertEquals("hpa", model.properties().recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); - Assertions.assertEquals("tteajohiygs", model.properties().recipeContent().components().get(0).name()); - Assertions.assertEquals("n", model.properties().recipeContent().components().get(0).type()); - Assertions.assertEquals("n", model.properties().recipeContent().components().get(0).requiredVersion()); - Assertions.assertEquals(1292241455575202273L, + Assertions.assertEquals("sxnsrqorcge", model.properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("mv", model.properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("bxeetqujxcxxqn", + model.properties().recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(2051583075223159829L, model.properties().recipeContent().components().get(0).installOrder()); - Assertions.assertEquals("kmktpvwxqcseh", model.properties().recipeContent().components().get(0).tags().get(0)); - Assertions.assertEquals("hufmpq", + Assertions.assertEquals("e", model.properties().recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("skx", model.properties().recipeContent().components().get(0).payloads().get(0).identifier()); - Assertions.assertEquals("mqyjgy", + Assertions.assertEquals("kansbvriaqgvt", model.properties().recipeContent().components().get(0).payloads().get(0).hash()); - Assertions.assertEquals("zulo", + Assertions.assertEquals("jrulfucte", model.properties().recipeContent().components().get(0).payloads().get(0).fileName()); - Assertions.assertEquals("saeuzanhsfnhsenw", + Assertions.assertEquals("rthcfjzh", model.properties().recipeContent().components().get(0).payloads().get(0).url()); - Assertions.assertEquals("ii", + Assertions.assertEquals("absr", model.properties().recipeContent().components().get(0).metadata().extensionType()); - Assertions.assertEquals("spxlzde", - model.properties().recipeContent().components().get(0).metadata().publisher()); + Assertions.assertEquals("sn", model.properties().recipeContent().components().get(0).metadata().publisher()); Assertions .assertTrue(model.properties().recipeContent().components().get(0).metadata().enableAutomaticUpgrade()); Assertions.assertFalse(model.properties().recipeContent().components().get(0).metadata().lcmUpdate()); - Assertions.assertEquals("waiufanra", - model.properties().recipeContent().components().get(0).metadata().catalog()); - Assertions.assertEquals("fueqfrojs", model.properties().recipeContent().components().get(0).metadata().ring()); - Assertions.assertEquals("grhydk", + Assertions.assertEquals("iwkkvya", model.properties().recipeContent().components().get(0).metadata().catalog()); + Assertions.assertEquals("kvvcsemsvuvdjkq", + model.properties().recipeContent().components().get(0).metadata().ring()); + Assertions.assertEquals("tqmm", model.properties().recipeContent().components().get(0).metadata().releaseTrain()); - Assertions.assertEquals("ywezskiecafyg", - model.properties().recipeContent().components().get(0).metadata().link()); - Assertions.assertEquals("xieqv", model.properties().recipeContent().components().get(0).metadata().name()); - Assertions.assertEquals("makli", + Assertions.assertEquals("vrjjxnw", model.properties().recipeContent().components().get(0).metadata().link()); + Assertions.assertEquals("chp", model.properties().recipeContent().components().get(0).metadata().name()); + Assertions.assertEquals("xlehzlxpgfquwzp", model.properties().recipeContent().components().get(0).metadata().expectedHash()); - Assertions.assertEquals("cahyhx", + Assertions.assertEquals("ibelwcerwkw", model.properties().recipeContent().components().get(0).metadata().previewSource()); - Assertions.assertEquals("yo", model.properties().signature()); + Assertions.assertEquals("ezcjumvpsi", model.properties().signature()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeListResultTests.java index 6caea7c43f84..c722b57fd22f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeListResultTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipeListResultTests.java @@ -12,12 +12,12 @@ public final class ValidatedSolutionRecipeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidatedSolutionRecipeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"sidqpxlbtpakft\",\"version\":\"gatwmykyu\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"mdwmf\"}],\"nodeCapabilities\":[{\"capabilityName\":\"pycvjqdvdwkqpldr\"},{\"capabilityName\":\"efgnaavuagnt\"},{\"capabilityName\":\"taoutnpdct\"},{\"capabilityName\":\"hspfefyihd\"}]},\"components\":[{\"name\":\"euyldphmt\",\"type\":\"bkcgsuthhllnm\",\"tags\":[]},{\"name\":\"y\",\"type\":\"efxexlf\",\"tags\":[]}]},\"signature\":\"atxtjrrlkmdskjhh\"},\"id\":\"lajfoxcxscvslxlh\",\"name\":\"a\",\"type\":\"krmukmyjmkxett\"},{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"lojfkqidnqto\",\"version\":\"xjhqxcsqhtkb\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"l\"}],\"nodeCapabilities\":[{\"capabilityName\":\"gldmbiipsnaww\"},{\"capabilityName\":\"qkzn\"},{\"capabilityName\":\"hhl\"}]},\"components\":[{\"name\":\"ricctkwmuqqoa\",\"type\":\"xeiyglesr\",\"tags\":[]},{\"name\":\"vaexh\",\"type\":\"ctrceqnkbr\",\"tags\":[]},{\"name\":\"pobe\",\"type\":\"dmljzacvumepjp\",\"tags\":[]}]},\"signature\":\"bn\"},\"id\":\"phepifexleqirc\",\"name\":\"jclykcg\",\"type\":\"vrpjlvczuodacp\"}],\"nextLink\":\"ettepdjxqe\"}") + "{\"value\":[{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"wzjwotnxlkfhg\",\"version\":\"h\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"x\"},{\"capabilityName\":\"wecr\"},{\"capabilityName\":\"nhpcselqx\"},{\"capabilityName\":\"vppqi\"}],\"nodeCapabilities\":[{\"capabilityName\":\"kklvzrlrmlccmet\"},{\"capabilityName\":\"scz\"},{\"capabilityName\":\"vfqbqna\"}]},\"components\":[{\"name\":\"sye\",\"type\":\"zsieuscplhyvd\",\"tags\":[]},{\"name\":\"xlyzkxit\",\"type\":\"shezs\",\"tags\":[]},{\"name\":\"kol\",\"type\":\"upjo\",\"tags\":[]},{\"name\":\"mozsayebrazwz\",\"type\":\"pzbtzuyk\",\"tags\":[]}]},\"signature\":\"ip\"},\"id\":\"dyepfno\",\"name\":\"mbezacfpztg\",\"type\":\"zwyqejga\"},{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"kctgkp\",\"version\":\"gkqzkcyzmffngdyf\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"rhlc\"},{\"capabilityName\":\"vhoej\"},{\"capabilityName\":\"oiutgwrmkahpq\"},{\"capabilityName\":\"azyntacihncogm\"}],\"nodeCapabilities\":[{\"capabilityName\":\"nmliqmvlbhi\"},{\"capabilityName\":\"eaqgrvgpomxpupd\"}]},\"components\":[{\"name\":\"dfj\",\"type\":\"i\",\"tags\":[]},{\"name\":\"socwiqbuout\",\"type\":\"py\",\"tags\":[]},{\"name\":\"gleofjsbgbw\",\"type\":\"zvdajfwnncf\",\"tags\":[]}]},\"signature\":\"ciqgjjrlhiqlwixv\"},\"id\":\"ougu\",\"name\":\"tnd\",\"type\":\"pg\"}],\"nextLink\":\"tbasu\"}") .toObject(ValidatedSolutionRecipeListResult.class); - Assertions.assertEquals("sidqpxlbtpakft", + Assertions.assertEquals("wzjwotnxlkfhg", model.value().get(0).properties().recipeContent().info().solutionType()); - Assertions.assertEquals("gatwmykyu", model.value().get(0).properties().recipeContent().info().version()); - Assertions.assertEquals("mdwmf", + Assertions.assertEquals("h", model.value().get(0).properties().recipeContent().info().version()); + Assertions.assertEquals("x", model.value() .get(0) .properties() @@ -26,7 +26,7 @@ public void testDeserialize() throws Exception { .clusterCapabilities() .get(0) .capabilityName()); - Assertions.assertEquals("pycvjqdvdwkqpldr", + Assertions.assertEquals("kklvzrlrmlccmet", model.value() .get(0) .properties() @@ -35,11 +35,10 @@ public void testDeserialize() throws Exception { .nodeCapabilities() .get(0) .capabilityName()); - Assertions.assertEquals("euyldphmt", - model.value().get(0).properties().recipeContent().components().get(0).name()); - Assertions.assertEquals("bkcgsuthhllnm", + Assertions.assertEquals("sye", model.value().get(0).properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("zsieuscplhyvd", model.value().get(0).properties().recipeContent().components().get(0).type()); - Assertions.assertEquals("atxtjrrlkmdskjhh", model.value().get(0).properties().signature()); - Assertions.assertEquals("ettepdjxqe", model.nextLink()); + Assertions.assertEquals("ip", model.value().get(0).properties().signature()); + Assertions.assertEquals("tbasu", model.nextLink()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipePropertiesTests.java index 8b24e55f80bc..1f0d80770f4d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipePropertiesTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipePropertiesTests.java @@ -12,36 +12,35 @@ public final class ValidatedSolutionRecipePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidatedSolutionRecipeProperties model = BinaryData.fromString( - "{\"recipeContent\":{\"info\":{\"solutionType\":\"g\",\"version\":\"muowakywalhjy\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"gqtagd\"},{\"capabilityName\":\"clssoljomevtfyc\"}],\"nodeCapabilities\":[{\"capabilityName\":\"bvgjcodkkgj\"},{\"capabilityName\":\"iytssikizbc\"}]},\"components\":[{\"name\":\"q\",\"type\":\"vntnrgmqso\",\"requiredVersion\":\"cekxgnly\",\"installOrder\":1676934956424054590,\"tags\":[\"wzvmdoksqd\",\"iw\",\"wxlboncqbazqicq\",\"hygtv\"],\"payloads\":[{\"identifier\":\"janepubdpkx\",\"hash\":\"qvgx\",\"fileName\":\"aodetv\",\"url\":\"hkxdxuwsaifmc\"},{\"identifier\":\"nosbz\",\"hash\":\"ehgcvkbcknjo\",\"fileName\":\"gjyy\",\"url\":\"pvelszerqze\"},{\"identifier\":\"xoqeintxwalj\",\"hash\":\"lzoblqwaafr\",\"fileName\":\"ulhmzyq\",\"url\":\"hdvafjrqpjiyrqjc\"}],\"metadata\":{\"extensionType\":\"xwmzwdfkbnrz\",\"publisher\":\"pdltbq\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":false,\"catalog\":\"xxsaetgz\",\"ring\":\"vpyigdaqq\",\"releaseTrain\":\"zdcduwjoedxng\",\"link\":\"aifpaurwwgil\",\"name\":\"qqa\",\"expectedHash\":\"mkxwxdcvjwcyziak\",\"previewSource\":\"iqch\"}}]},\"signature\":\"tuicds\"}") + "{\"recipeContent\":{\"info\":{\"solutionType\":\"nhautwukexzgpmnm\",\"version\":\"be\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"ilwgdfpfqfpcvstc\"},{\"capabilityName\":\"gq\"},{\"capabilityName\":\"vwerfwxbsmtb\"},{\"capabilityName\":\"jj\"}],\"nodeCapabilities\":[{\"capabilityName\":\"hci\"}]},\"components\":[{\"name\":\"wdv\",\"type\":\"tbrekqhsqhtf\",\"requiredVersion\":\"pqbye\",\"installOrder\":1475427696908395660,\"tags\":[\"wdqi\",\"mghg\"],\"payloads\":[{\"identifier\":\"txlujkhnjcmr\",\"hash\":\"kfmkhcqtwmlmhjn\",\"fileName\":\"tqeahje\",\"url\":\"vragpokddx\"}],\"metadata\":{\"extensionType\":\"h\",\"publisher\":\"guavtptb\",\"enableAutomaticUpgrade\":false,\"lcmUpdate\":true,\"catalog\":\"n\",\"ring\":\"gbvoffbkk\",\"releaseTrain\":\"dxaexqokmyrljia\",\"link\":\"bn\",\"name\":\"rqlpbcjtrpz\",\"expectedHash\":\"udivbxnhsqeaeonq\",\"previewSource\":\"wgdhu\"}},{\"name\":\"uzytz\",\"type\":\"rogatmolj\",\"requiredVersion\":\"wmpinmzv\",\"installOrder\":3704342621094835503,\"tags\":[\"rzztrk\",\"sj\"],\"payloads\":[{\"identifier\":\"gdy\",\"hash\":\"nhrxlel\",\"fileName\":\"jhkeizcp\",\"url\":\"htdm\"},{\"identifier\":\"wjekptycaydbj\",\"hash\":\"c\",\"fileName\":\"ymlcfnzhmhsurlg\",\"url\":\"qkpmmzpstau\"},{\"identifier\":\"lawiubmomsgvvjhv\",\"hash\":\"lrlohewjjmajnkdf\",\"fileName\":\"q\",\"url\":\"onswae\"}],\"metadata\":{\"extensionType\":\"fzqxjo\",\"publisher\":\"ohtotryegp\",\"enableAutomaticUpgrade\":true,\"lcmUpdate\":true,\"catalog\":\"xznlwkbfokxk\",\"ring\":\"p\",\"releaseTrain\":\"rufgjblcdrmyfcem\",\"link\":\"zgyykyalug\",\"name\":\"dfqnhttwdowrczfj\",\"expectedHash\":\"nuxxrkkm\",\"previewSource\":\"nulwempdci\"}}]},\"signature\":\"hjulrsulwzpflu\"}") .toObject(ValidatedSolutionRecipeProperties.class); - Assertions.assertEquals("g", model.recipeContent().info().solutionType()); - Assertions.assertEquals("muowakywalhjy", model.recipeContent().info().version()); - Assertions.assertEquals("gqtagd", + Assertions.assertEquals("nhautwukexzgpmnm", model.recipeContent().info().solutionType()); + Assertions.assertEquals("be", model.recipeContent().info().version()); + Assertions.assertEquals("ilwgdfpfqfpcvstc", model.recipeContent().capabilities().clusterCapabilities().get(0).capabilityName()); - Assertions.assertEquals("bvgjcodkkgj", - model.recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); - Assertions.assertEquals("q", model.recipeContent().components().get(0).name()); - Assertions.assertEquals("vntnrgmqso", model.recipeContent().components().get(0).type()); - Assertions.assertEquals("cekxgnly", model.recipeContent().components().get(0).requiredVersion()); - Assertions.assertEquals(1676934956424054590L, model.recipeContent().components().get(0).installOrder()); - Assertions.assertEquals("wzvmdoksqd", model.recipeContent().components().get(0).tags().get(0)); - Assertions.assertEquals("janepubdpkx", + Assertions.assertEquals("hci", model.recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); + Assertions.assertEquals("wdv", model.recipeContent().components().get(0).name()); + Assertions.assertEquals("tbrekqhsqhtf", model.recipeContent().components().get(0).type()); + Assertions.assertEquals("pqbye", model.recipeContent().components().get(0).requiredVersion()); + Assertions.assertEquals(1475427696908395660L, model.recipeContent().components().get(0).installOrder()); + Assertions.assertEquals("wdqi", model.recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("txlujkhnjcmr", model.recipeContent().components().get(0).payloads().get(0).identifier()); - Assertions.assertEquals("qvgx", model.recipeContent().components().get(0).payloads().get(0).hash()); - Assertions.assertEquals("aodetv", model.recipeContent().components().get(0).payloads().get(0).fileName()); - Assertions.assertEquals("hkxdxuwsaifmc", model.recipeContent().components().get(0).payloads().get(0).url()); - Assertions.assertEquals("xwmzwdfkbnrz", model.recipeContent().components().get(0).metadata().extensionType()); - Assertions.assertEquals("pdltbq", model.recipeContent().components().get(0).metadata().publisher()); + Assertions.assertEquals("kfmkhcqtwmlmhjn", model.recipeContent().components().get(0).payloads().get(0).hash()); + Assertions.assertEquals("tqeahje", model.recipeContent().components().get(0).payloads().get(0).fileName()); + Assertions.assertEquals("vragpokddx", model.recipeContent().components().get(0).payloads().get(0).url()); + Assertions.assertEquals("h", model.recipeContent().components().get(0).metadata().extensionType()); + Assertions.assertEquals("guavtptb", model.recipeContent().components().get(0).metadata().publisher()); Assertions.assertFalse(model.recipeContent().components().get(0).metadata().enableAutomaticUpgrade()); - Assertions.assertFalse(model.recipeContent().components().get(0).metadata().lcmUpdate()); - Assertions.assertEquals("xxsaetgz", model.recipeContent().components().get(0).metadata().catalog()); - Assertions.assertEquals("vpyigdaqq", model.recipeContent().components().get(0).metadata().ring()); - Assertions.assertEquals("zdcduwjoedxng", model.recipeContent().components().get(0).metadata().releaseTrain()); - Assertions.assertEquals("aifpaurwwgil", model.recipeContent().components().get(0).metadata().link()); - Assertions.assertEquals("qqa", model.recipeContent().components().get(0).metadata().name()); - Assertions.assertEquals("mkxwxdcvjwcyziak", + Assertions.assertTrue(model.recipeContent().components().get(0).metadata().lcmUpdate()); + Assertions.assertEquals("n", model.recipeContent().components().get(0).metadata().catalog()); + Assertions.assertEquals("gbvoffbkk", model.recipeContent().components().get(0).metadata().ring()); + Assertions.assertEquals("dxaexqokmyrljia", model.recipeContent().components().get(0).metadata().releaseTrain()); + Assertions.assertEquals("bn", model.recipeContent().components().get(0).metadata().link()); + Assertions.assertEquals("rqlpbcjtrpz", model.recipeContent().components().get(0).metadata().name()); + Assertions.assertEquals("udivbxnhsqeaeonq", model.recipeContent().components().get(0).metadata().expectedHash()); - Assertions.assertEquals("iqch", model.recipeContent().components().get(0).metadata().previewSource()); - Assertions.assertEquals("tuicds", model.signature()); + Assertions.assertEquals("wgdhu", model.recipeContent().components().get(0).metadata().previewSource()); + Assertions.assertEquals("hjulrsulwzpflu", model.signature()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetWithResponseMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetWithResponseMockTests.java index ab8848da502b..32609439d081 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetWithResponseMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ValidatedSolutionRecipesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"nharhbd\",\"version\":\"sbyplskhwfju\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"bqpsezsggd\"}],\"nodeCapabilities\":[{\"capabilityName\":\"tfcbrtsrdplqdyza\"},{\"capabilityName\":\"iasfzrguz\"},{\"capabilityName\":\"iyvsbfsi\"},{\"capabilityName\":\"vabd\"}]},\"components\":[{\"name\":\"ljgxot\",\"type\":\"dam\",\"requiredVersion\":\"yaosthulzu\",\"installOrder\":5713970325133766218,\"tags\":[\"pxldlnocs\",\"ygimiz\",\"ukjbwmgk\"],\"payloads\":[{\"identifier\":\"mspppoeszthjt\",\"hash\":\"yjskdiylg\",\"fileName\":\"zuqix\",\"url\":\"sybqowgvmxwbo\"},{\"identifier\":\"xdhkoex\",\"hash\":\"rhgnakajwscmneev\",\"fileName\":\"umqeu\",\"url\":\"zyyhmgqaeivjqutx\"}],\"metadata\":{}},{\"name\":\"gbzgfhzdzahktxv\",\"type\":\"bicfecthotbkjwhz\",\"requiredVersion\":\"xjvtwkyjdpayxo\",\"installOrder\":9146484406972913405,\"tags\":[\"zrgqztjfkgbtqqjo\",\"synn\"],\"payloads\":[{\"identifier\":\"onjqhdheosx\",\"hash\":\"wfudmpf\",\"fileName\":\"wypphtjtntcwgpd\",\"url\":\"bglaecctokfspvjr\"}],\"metadata\":{}}]},\"signature\":\"kvrmp\"},\"id\":\"typtwjw\",\"name\":\"y\",\"type\":\"eohgmcmdjm\"}"; + = "{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"xvmdr\",\"version\":\"ynbgovazoymdvhhp\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"wwd\"},{\"capabilityName\":\"atveqm\"},{\"capabilityName\":\"k\"}],\"nodeCapabilities\":[{\"capabilityName\":\"w\"},{\"capabilityName\":\"eyxr\"}]},\"components\":[{\"name\":\"armhpwbuklv\",\"type\":\"mfasgtlvhqpoilos\",\"requiredVersion\":\"emcezevftm\",\"installOrder\":40147385548700135,\"tags\":[\"kjyghztms\",\"iwtp\"],\"payloads\":[{\"identifier\":\"cez\",\"hash\":\"wwvwiftdjtv\",\"fileName\":\"fpf\",\"url\":\"ruptsyqcjnq\"},{\"identifier\":\"wxdowum\",\"hash\":\"qukr\",\"fileName\":\"diohclqddn\",\"url\":\"fknebwedd\"},{\"identifier\":\"nyzcwyjsmk\",\"hash\":\"qldqabn\",\"fileName\":\"vpaqbqxfb\",\"url\":\"igcfddofxnf\"}],\"metadata\":{}}]},\"signature\":\"yyrqaedwov\"},\"id\":\"ytjgoeayokrw\",\"name\":\"mihwpadhedb\",\"type\":\"o\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,30 +31,30 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ValidatedSolutionRecipe response = manager.validatedSolutionRecipes() - .getWithResponse("zukekytkzvt", "maatvogpyc", com.azure.core.util.Context.NONE) + .getWithResponse("gw", "hlx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nharhbd", response.properties().recipeContent().info().solutionType()); - Assertions.assertEquals("sbyplskhwfju", response.properties().recipeContent().info().version()); - Assertions.assertEquals("bqpsezsggd", + Assertions.assertEquals("xvmdr", response.properties().recipeContent().info().solutionType()); + Assertions.assertEquals("ynbgovazoymdvhhp", response.properties().recipeContent().info().version()); + Assertions.assertEquals("wwd", response.properties().recipeContent().capabilities().clusterCapabilities().get(0).capabilityName()); - Assertions.assertEquals("tfcbrtsrdplqdyza", + Assertions.assertEquals("w", response.properties().recipeContent().capabilities().nodeCapabilities().get(0).capabilityName()); - Assertions.assertEquals("ljgxot", response.properties().recipeContent().components().get(0).name()); - Assertions.assertEquals("dam", response.properties().recipeContent().components().get(0).type()); - Assertions.assertEquals("yaosthulzu", + Assertions.assertEquals("armhpwbuklv", response.properties().recipeContent().components().get(0).name()); + Assertions.assertEquals("mfasgtlvhqpoilos", response.properties().recipeContent().components().get(0).type()); + Assertions.assertEquals("emcezevftm", response.properties().recipeContent().components().get(0).requiredVersion()); - Assertions.assertEquals(5713970325133766218L, + Assertions.assertEquals(40147385548700135L, response.properties().recipeContent().components().get(0).installOrder()); - Assertions.assertEquals("pxldlnocs", response.properties().recipeContent().components().get(0).tags().get(0)); - Assertions.assertEquals("mspppoeszthjt", + Assertions.assertEquals("kjyghztms", response.properties().recipeContent().components().get(0).tags().get(0)); + Assertions.assertEquals("cez", response.properties().recipeContent().components().get(0).payloads().get(0).identifier()); - Assertions.assertEquals("yjskdiylg", + Assertions.assertEquals("wwvwiftdjtv", response.properties().recipeContent().components().get(0).payloads().get(0).hash()); - Assertions.assertEquals("zuqix", + Assertions.assertEquals("fpf", response.properties().recipeContent().components().get(0).payloads().get(0).fileName()); - Assertions.assertEquals("sybqowgvmxwbo", + Assertions.assertEquals("ruptsyqcjnq", response.properties().recipeContent().components().get(0).payloads().get(0).url()); - Assertions.assertEquals("kvrmp", response.properties().signature()); + Assertions.assertEquals("yyrqaedwov", response.properties().signature()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests.java index c9aa863c74e8..6bb117225fa4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ValidatedSolutionRecipesListBySubscriptionLocationResourceMockTests.java @@ -22,7 +22,7 @@ public final class ValidatedSolutionRecipesListBySubscriptionLocationResourceMoc @Test public void testListBySubscriptionLocationResource() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"zzioxbgomvuepr\",\"version\":\"m\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"nw\"},{\"capabilityName\":\"gzuoxixtxxx\"},{\"capabilityName\":\"jsehbknnrnk\"},{\"capabilityName\":\"jfawpcbsogz\"}],\"nodeCapabilities\":[{\"capabilityName\":\"czbnivcohsxvppkj\"},{\"capabilityName\":\"alkd\"},{\"capabilityName\":\"ewhotvbmyzuqfdq\"}]},\"components\":[{\"name\":\"trjtoqs\",\"type\":\"hhqngjndkv\",\"requiredVersion\":\"xlffqgdodnkqyip\",\"installOrder\":5332318125075051856,\"tags\":[\"dazmdzesimeft\",\"drfzjlflzagvdava\",\"xiefcorzbidaeb\"],\"payloads\":[{\"identifier\":\"icew\",\"hash\":\"fajw\",\"fileName\":\"ylciobb\",\"url\":\"wwsr\"},{\"identifier\":\"eqx\",\"hash\":\"ecuuuex\",\"fileName\":\"mnteevfg\",\"url\":\"xfezraqsddko\"}],\"metadata\":{}},{\"name\":\"gxqfkyr\",\"type\":\"gmzzeglwdzfs\",\"requiredVersion\":\"fegaok\",\"installOrder\":1200072992435902439,\"tags\":[\"ra\"],\"payloads\":[{\"identifier\":\"uklx\",\"hash\":\"el\",\"fileName\":\"zpyqbwhuecx\",\"url\":\"gsingmhpavsfg\"},{\"identifier\":\"rvqrwwbdrwroqk\",\"hash\":\"jnzpqhqqsa\",\"fileName\":\"kyu\",\"url\":\"fameaasjqenhekza\"}],\"metadata\":{}},{\"name\":\"geytlplslfc\",\"type\":\"e\",\"requiredVersion\":\"suowtolkyqf\",\"installOrder\":3981822910933013593,\"tags\":[\"hnxzmfvmw\",\"nrtc\",\"rawwhyxf\"],\"payloads\":[{\"identifier\":\"bydmvwnbun\",\"hash\":\"odtevzshqykebmps\",\"fileName\":\"aezc\",\"url\":\"dkckr\"}],\"metadata\":{}}]},\"signature\":\"qdmhcejstfs\"},\"id\":\"cjakgkqwx\",\"name\":\"dsoqzhxwdjoxwkb\",\"type\":\"hsobvcnsbioez\"}]}"; + = "{\"value\":[{\"properties\":{\"recipeContent\":{\"info\":{\"solutionType\":\"ozvbwfc\",\"version\":\"jhbp\"},\"capabilities\":{\"clusterCapabilities\":[{\"capabilityName\":\"hscmyhrhjvszfqbo\"},{\"capabilityName\":\"ndwpppqw\"}],\"nodeCapabilities\":[{\"capabilityName\":\"oevzzufytdxmly\"},{\"capabilityName\":\"zlyvapbkrbuog\"}]},\"components\":[{\"name\":\"dltlcu\",\"type\":\"aizijvaylzeohlp\",\"requiredVersion\":\"tqkrvmhvbvvcpwtq\",\"installOrder\":5396436300631814121,\"tags\":[\"hmz\",\"dffetevr\"],\"payloads\":[{\"identifier\":\"k\",\"hash\":\"wacycsyotctkhf\",\"fileName\":\"fsatvcsx\",\"url\":\"mhnmizhvprhqqw\"},{\"identifier\":\"ublehhkplobz\",\"hash\":\"ottaksadz\",\"fileName\":\"ghmmtbtdvucfvvra\",\"url\":\"beurdeewl\"},{\"identifier\":\"uxpcbwkdwj\",\"hash\":\"jiznioroofmftas\",\"fileName\":\"mcreihu\",\"url\":\"trnighm\"},{\"identifier\":\"nuwqxungro\",\"hash\":\"gwfmsxjwdylwxm\",\"fileName\":\"zjow\",\"url\":\"ugeerclbltbhpwac\"}],\"metadata\":{}}]},\"signature\":\"urjwmvwryvdifkii\"},\"id\":\"pruccwme\",\"name\":\"btxsytrtexeg\",\"type\":\"mrqjywi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testListBySubscriptionLocationResource() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.validatedSolutionRecipes() - .listBySubscriptionLocationResource("phwfnugsl", com.azure.core.util.Context.NONE); + .listBySubscriptionLocationResource("dczvothmkh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zzioxbgomvuepr", + Assertions.assertEquals("ozvbwfc", response.iterator().next().properties().recipeContent().info().solutionType()); - Assertions.assertEquals("m", response.iterator().next().properties().recipeContent().info().version()); - Assertions.assertEquals("nw", + Assertions.assertEquals("jhbp", response.iterator().next().properties().recipeContent().info().version()); + Assertions.assertEquals("hscmyhrhjvszfqbo", response.iterator() .next() .properties() @@ -46,7 +46,7 @@ public void testListBySubscriptionLocationResource() throws Exception { .clusterCapabilities() .get(0) .capabilityName()); - Assertions.assertEquals("czbnivcohsxvppkj", + Assertions.assertEquals("oevzzufytdxmly", response.iterator() .next() .properties() @@ -55,24 +55,24 @@ public void testListBySubscriptionLocationResource() throws Exception { .nodeCapabilities() .get(0) .capabilityName()); - Assertions.assertEquals("trjtoqs", + Assertions.assertEquals("dltlcu", response.iterator().next().properties().recipeContent().components().get(0).name()); - Assertions.assertEquals("hhqngjndkv", + Assertions.assertEquals("aizijvaylzeohlp", response.iterator().next().properties().recipeContent().components().get(0).type()); - Assertions.assertEquals("xlffqgdodnkqyip", + Assertions.assertEquals("tqkrvmhvbvvcpwtq", response.iterator().next().properties().recipeContent().components().get(0).requiredVersion()); - Assertions.assertEquals(5332318125075051856L, + Assertions.assertEquals(5396436300631814121L, response.iterator().next().properties().recipeContent().components().get(0).installOrder()); - Assertions.assertEquals("dazmdzesimeft", + Assertions.assertEquals("hmz", response.iterator().next().properties().recipeContent().components().get(0).tags().get(0)); - Assertions.assertEquals("icew", + Assertions.assertEquals("k", response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).identifier()); - Assertions.assertEquals("fajw", + Assertions.assertEquals("wacycsyotctkhf", response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).hash()); - Assertions.assertEquals("ylciobb", + Assertions.assertEquals("fsatvcsx", response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).fileName()); - Assertions.assertEquals("wwsr", + Assertions.assertEquals("mhnmizhvprhqqw", response.iterator().next().properties().recipeContent().components().get(0).payloads().get(0).url()); - Assertions.assertEquals("qdmhcejstfs", response.iterator().next().properties().signature()); + Assertions.assertEquals("urjwmvwryvdifkii", response.iterator().next().properties().signature()); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VolumeConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VolumeConfigurationTests.java deleted file mode 100644 index d1177a997e79..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VolumeConfigurationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VolumeConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class VolumeConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeConfiguration model - = BinaryData.fromString("{\"reserved\":\"joxtdahne\"}").toObject(VolumeConfiguration.class); - Assertions.assertEquals("joxtdahne", model.reserved()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeConfiguration model = new VolumeConfiguration().withReserved("joxtdahne"); - model = BinaryData.fromObject(model).toObject(VolumeConfiguration.class); - Assertions.assertEquals("joxtdahne", model.reserved()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VolumeReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VolumeReportedPropertiesTests.java deleted file mode 100644 index 5b32f8ca84d7..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VolumeReportedPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VolumeReportedProperties; - -public final class VolumeReportedPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeReportedProperties model = BinaryData.fromString( - "{\"partitionId\":\"ovt\",\"offsetInBytes\":8746079753488682103,\"name\":\"vfwjlo\",\"path\":\"ekfsrm\",\"parentDiskId\":\"klajvcfocz\",\"isBoot\":false,\"sizeInBytes\":\"jovtkwxnhwhhn\",\"sizeRemainingInBytes\":\"rzaaoee\",\"fileSystem\":\"mjenvjeatea\"}") - .toObject(VolumeReportedProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WebProxyConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WebProxyConfigurationTests.java deleted file mode 100644 index eb6eb9652ccc..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WebProxyConfigurationTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.WebProxyConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WebProxyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebProxyConfiguration model = BinaryData.fromString( - "{\"connectionUri\":\"vmv\",\"port\":\"ytuadxkxeqbwp\",\"bypassList\":[\"h\",\"ksarcdrnxsluvl\",\"ladltxkpbqhvfd\",\"qjwkrhwz\"]}") - .toObject(WebProxyConfiguration.class); - Assertions.assertEquals("vmv", model.connectionUri()); - Assertions.assertEquals("ytuadxkxeqbwp", model.port()); - Assertions.assertEquals("h", model.bypassList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebProxyConfiguration model = new WebProxyConfiguration().withConnectionUri("vmv") - .withPort("ytuadxkxeqbwp") - .withBypassList(Arrays.asList("h", "ksarcdrnxsluvl", "ladltxkpbqhvfd", "qjwkrhwz")); - model = BinaryData.fromObject(model).toObject(WebProxyConfiguration.class); - Assertions.assertEquals("vmv", model.connectionUri()); - Assertions.assertEquals("ytuadxkxeqbwp", model.port()); - Assertions.assertEquals("h", model.bypassList().get(0)); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WifiConfigurationReportedPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WifiConfigurationReportedPropertiesTests.java deleted file mode 100644 index 3ab6442dd1d4..000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/WifiConfigurationReportedPropertiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.AuthenticationType; -import com.azure.resourcemanager.azurestackhci.models.EAPMethod; -import com.azure.resourcemanager.azurestackhci.models.WifiConfigurationReportedProperties; -import org.junit.jupiter.api.Assertions; - -public final class WifiConfigurationReportedPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WifiConfigurationReportedProperties model = BinaryData.fromString( - "{\"ssid\":\"lajamca\",\"authenticationType\":\"WPA2-Personal\",\"eapMethod\":\"EAP-TLS\",\"signalStrength\":1122530351,\"lastSuccessfulConnectionTimestamp\":\"rryklleynqan\",\"connectionState\":\"Disconnecting\",\"username\":\"glclwa\"}") - .toObject(WifiConfigurationReportedProperties.class); - Assertions.assertEquals("lajamca", model.ssid()); - Assertions.assertEquals(AuthenticationType.WPA2_PERSONAL, model.authenticationType()); - Assertions.assertEquals(EAPMethod.EAP_TLS, model.eapMethod()); - Assertions.assertEquals("glclwa", model.username()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/tsp-location.yaml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/tsp-location.yaml index c438ecce79c1..060bebfaf05b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/tsp-location.yaml +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI -commit: 8219d0886c5cf87c1e9a8702e70a3205d26d5a8b +commit: 675a8ce1a1d7489731bc8bd05d8d3e7d865434e0 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml index ad00383057fd..7dbcdf12033d 100644 --- a/sdk/batch/azure-resourcemanager-batch/pom.xml +++ b/sdk/batch/azure-resourcemanager-batch/pom.xml @@ -77,7 +77,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test diff --git a/sdk/clientcore/core/src/test/java/io/clientcore/core/http/client/JdkHttpClientBuilderIT.java b/sdk/clientcore/core/src/test/java/io/clientcore/core/http/client/JdkHttpClientBuilderIT.java index 715dae89efe8..c870f5b6cd28 100644 --- a/sdk/clientcore/core/src/test/java/io/clientcore/core/http/client/JdkHttpClientBuilderIT.java +++ b/sdk/clientcore/core/src/test/java/io/clientcore/core/http/client/JdkHttpClientBuilderIT.java @@ -88,7 +88,6 @@ public void buildWithHttpProxyFromEnvConfiguration() throws IOException { Configuration configuration = Configuration.from(new TestConfigurationSource() .put(Configuration.HTTP_PROXY, "http://" + PROXY_USER_INFO + proxyEndpoint.getHost() + ":" + proxyEndpoint.getPort()) - .put(Configuration.HTTPS_PROXY, "") .put("java.net.useSystemProxies", "true")); HttpClient httpClient = new JdkHttpClientBuilder().configuration(configuration).build(); diff --git a/sdk/clientcore/core/src/test/java/io/clientcore/core/http/models/ProxyOptionsTests.java b/sdk/clientcore/core/src/test/java/io/clientcore/core/http/models/ProxyOptionsTests.java index 9617412cd76d..152e59e29785 100644 --- a/sdk/clientcore/core/src/test/java/io/clientcore/core/http/models/ProxyOptionsTests.java +++ b/sdk/clientcore/core/src/test/java/io/clientcore/core/http/models/ProxyOptionsTests.java @@ -234,35 +234,53 @@ public void invalidHttpPortEnvironmentConfigDefault(String port) { private static Stream loadFromEnvironmentSupplier() { return Stream.of( // Basic Azure HTTPS proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTPS_PROXY_HOST_ONLY, null, true), PROXY_HOST, 443, - null, null, null), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.HTTPS_PROXY, AZURE_HTTPS_PROXY_HOST_ONLY)), + PROXY_HOST, 443, null, null, null), // Username only Azure HTTPS proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTPS_PROXY_WITH_USERNAME, null, true), PROXY_HOST, - 443, null, null, null), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.HTTPS_PROXY, AZURE_HTTPS_PROXY_WITH_USERNAME)), + PROXY_HOST, 443, null, null, null), // Complete Azure HTTPS proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTPS_PROXY_WITH_USER_AND_PASS, null, true), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.HTTPS_PROXY, AZURE_HTTPS_PROXY_WITH_USER_AND_PASS)), PROXY_HOST, 443, FAKE_PROXY_USER_PLACEHOLDER, FAKE_PROXY_PASSWORD_PLACEHOLDER, null), // Azure HTTPS proxy with non-proxying hosts. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTPS_PROXY_HOST_ONLY, NON_PROXY_HOSTS, true), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.HTTPS_PROXY, AZURE_HTTPS_PROXY_HOST_ONLY) + .put(Configuration.NO_PROXY, NON_PROXY_HOSTS)), PROXY_HOST, 443, null, null, "(" + NON_PROXY_HOSTS + ")"), // Basic Azure HTTP proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTP_PROXY_HOST_ONLY, null, false), PROXY_HOST, 80, - null, null, null), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.HTTP_PROXY, AZURE_HTTP_PROXY_HOST_ONLY)), + PROXY_HOST, 80, null, null, null), // Username only Azure HTTP proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTP_PROXY_WITH_USERNAME, null, false), PROXY_HOST, - 80, null, null, null), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.HTTP_PROXY, AZURE_HTTP_PROXY_WITH_USERNAME)), + PROXY_HOST, 80, null, null, null), // Complete Azure HTTP proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTP_PROXY_WITH_USER_AND_PASS, null, false), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.HTTP_PROXY, AZURE_HTTP_PROXY_WITH_USER_AND_PASS)), PROXY_HOST, 80, FAKE_PROXY_USER_PLACEHOLDER, FAKE_PROXY_PASSWORD_PLACEHOLDER, null), // Azure HTTP proxy with non-proxying hosts. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTP_PROXY_HOST_ONLY, NON_PROXY_HOSTS, false), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.HTTP_PROXY, AZURE_HTTP_PROXY_HOST_ONLY) + .put(Configuration.NO_PROXY, NON_PROXY_HOSTS)), PROXY_HOST, 80, null, null, "(" + NON_PROXY_HOSTS + ")"), /* @@ -424,8 +442,10 @@ private static Stream nonProxyHostsSupplier() { /* * This emulates loading an environment formatted proxy. */ - Configuration environmentProxyConfiguration - = setJavaSystemProxyPrerequisiteToTrue("http://localhost:7777", noProxyNonProxyHosts, true); + TestConfigurationSource envSource + = new TestConfigurationSource().put(Configuration.HTTPS_PROXY, "http://localhost:7777") + .put(Configuration.NO_PROXY, noProxyNonProxyHosts); + Configuration environmentProxyConfiguration = setJavaSystemProxyPrerequisiteToTrue(envSource); Pattern environmentProxyConfigurationPattern = compile(fromConfiguration(environmentProxyConfiguration).getNonProxyHosts(), Pattern.CASE_INSENSITIVE); @@ -485,22 +505,7 @@ public void sanitizeJavaHttpNonProxyHostsDoesNotSplitEscapedPipes() { assertEquals("(" + nonProxyHosts + ")", ProxyOptions.sanitizeNoProxy(nonProxyHosts)); } - private static Configuration setJavaSystemProxyPrerequisiteToTrue(String proxy, String nonProxyHosts, - boolean isHttps) { - TestConfigurationSource testSource = new TestConfigurationSource().put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true") - // Use empty string when non-proxy hosts is null or empty to ensure that the environment configuration - // doesn't attempt to fall back to loading from System.properties or System.env. - .put(Configuration.NO_PROXY, CoreUtils.isNullOrEmpty(nonProxyHosts) ? "" : nonProxyHosts); - - if (isHttps) { - testSource.put(Configuration.HTTPS_PROXY, proxy); - } else { - testSource.put(Configuration.HTTP_PROXY, proxy) - // Same as with non-proxy hosts, set HTTPS_PROXY to empty when testing HTTP_PROXY as HTTPS is checked - // first and could fall back to loading from System.properties or System.env. - .put(Configuration.HTTPS_PROXY, ""); - } - - return Configuration.from(EMPTY_SOURCE, EMPTY_SOURCE, testSource); + private static Configuration setJavaSystemProxyPrerequisiteToTrue(TestConfigurationSource source) { + return Configuration.from(EMPTY_SOURCE, EMPTY_SOURCE, source.put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")); } } diff --git a/sdk/clientcore/cspell.yml b/sdk/clientcore/cspell.yml index a285a56a850d..1874e7c0202f 100644 --- a/sdk/clientcore/cspell.yml +++ b/sdk/clientcore/cspell.yml @@ -14,7 +14,6 @@ words: - "erroronmissingdir" - "fqcn" - "httpheadename" - - "jpms" - "lmolkova" - "replayablity" - "serializables" diff --git a/sdk/clientcore/http-netty4/CHANGELOG.md b/sdk/clientcore/http-netty4/CHANGELOG.md index 98163b423958..13dd08af78ab 100644 --- a/sdk/clientcore/http-netty4/CHANGELOG.md +++ b/sdk/clientcore/http-netty4/CHANGELOG.md @@ -9,7 +9,3 @@ ### Bugs Fixed ### Other Changes - -- Upgraded Netty to `4.2.19.Final`, using I/O handler factories for event loops while preserving pooled buffer allocation - unless `io.netty.allocator.type` is explicitly configured. -- Preserved HTTP/2 response decompression with Netty's separate compression module when using Java modules. diff --git a/sdk/clientcore/http-netty4/README.md b/sdk/clientcore/http-netty4/README.md index 0ddb20b9b73f..3007dd75d140 100644 --- a/sdk/clientcore/http-netty4/README.md +++ b/sdk/clientcore/http-netty4/README.md @@ -20,42 +20,6 @@ Client Core Netty HTTP client is a plugin for the `io.clientcore.core` HTTP clie ## Key concepts -### Native transports on the module path - -On JDK 11 or later, Netty 4.2's epoll/kqueue transport classes and platform-specific JNI libraries -are **separate explicit Java modules**. Putting their JARs on the module path does not resolve them -automatically. When a named-module application wants `http-netty4` to select a native transport, -add a matching Netty native classifier as a **runtime** dependency; this package only declares the -native classifiers as test dependencies. For example, on Linux x86_64: - -```xml - - io.netty - netty-transport-native-epoll - ${netty.version} - linux-x86_64 - -``` - -Define `${netty.version}` in your POM or replace it with the Netty version aligned with this client. -The native classifier dependency also brings in -the corresponding `netty-transport-classes-*` JAR. Resolve **both** the class and native-resource -modules when launching the application: - -| Platform and classifier | Launch option | -| --- | --- | -| Linux x86_64 (`netty-transport-native-epoll:linux-x86_64`) | `--add-modules=io.netty.transport.classes.epoll,io.netty.transport.epoll.linux.x86_64` | -| macOS x86_64 (`netty-transport-native-kqueue:osx-x86_64`) | `--add-modules=io.netty.transport.classes.kqueue,io.netty.transport.kqueue.osx.x86_64` | - -For other architectures, supply the matching native classifier and use its module name as reported by -`jar --describe-module --file --release 11`; see -[Netty's native transport guide](https://netty.io/wiki/native-transports.html#using-the-native-transports) -for classifier details. Resolving only the class module does not -expose the bundled JNI library; adding `requires static` to a library descriptor does not make -either module a runtime root. Without usable native transport the client falls back to JDK NIO. -Neither Java 8 nor classpath applications need these JPMS launch options. Module resolution by -itself does not establish that native I/O works on the current OS. - ## Examples ### Create a Simple Client diff --git a/sdk/clientcore/http-netty4/pom.xml b/sdk/clientcore/http-netty4/pom.xml index 69bc62ffad74..31bf16223b97 100644 --- a/sdk/clientcore/http-netty4/pom.xml +++ b/sdk/clientcore/http-netty4/pom.xml @@ -56,7 +56,7 @@ io.clientcore.core.implementation*,io.clientcore.core.models,io.clientcore.core.util,io.clientcore.core.util* - 4.2.19.Final + 4.1.138.Final @@ -69,52 +69,52 @@ io.netty netty-buffer - 4.2.19.Final + 4.1.138.Final io.netty - netty-codec-base - 4.2.19.Final + netty-codec + 4.1.138.Final io.netty netty-codec-http - 4.2.19.Final + 4.1.138.Final io.netty netty-codec-http2 - 4.2.19.Final + 4.1.138.Final io.netty netty-common - 4.2.19.Final + 4.1.138.Final io.netty netty-handler - 4.2.19.Final + 4.1.138.Final io.netty netty-handler-proxy - 4.2.19.Final + 4.1.138.Final io.netty netty-resolver - 4.2.19.Final + 4.1.138.Final io.netty netty-resolver-dns - 4.2.19.Final + 4.1.138.Final io.netty netty-transport - 4.2.19.Final + 4.1.138.Final @@ -126,18 +126,32 @@ test + + io.netty + netty-transport-native-unix-common + 4.1.138.Final + linux-x86_64 + test + io.netty netty-transport-native-epoll - 4.2.19.Final + 4.1.138.Final linux-x86_64 test + + io.netty + netty-transport-native-unix-common + 4.1.138.Final + osx-x86_64 + test + io.netty netty-transport-native-kqueue - 4.2.19.Final + 4.1.138.Final osx-x86_64 test @@ -209,16 +223,16 @@ - io.netty:netty-buffer:[4.2.19.Final] - io.netty:netty-codec-base:[4.2.19.Final] - io.netty:netty-codec-http:[4.2.19.Final] - io.netty:netty-codec-http2:[4.2.19.Final] - io.netty:netty-common:[4.2.19.Final] - io.netty:netty-handler:[4.2.19.Final] - io.netty:netty-handler-proxy:[4.2.19.Final] - io.netty:netty-resolver:[4.2.19.Final] - io.netty:netty-resolver-dns:[4.2.19.Final] - io.netty:netty-transport:[4.2.19.Final] + io.netty:netty-buffer:[4.1.138.Final] + io.netty:netty-codec:[4.1.138.Final] + io.netty:netty-codec-http:[4.1.138.Final] + io.netty:netty-codec-http2:[4.1.138.Final] + io.netty:netty-common:[4.1.138.Final] + io.netty:netty-handler:[4.1.138.Final] + io.netty:netty-handler-proxy:[4.1.138.Final] + io.netty:netty-resolver:[4.1.138.Final] + io.netty:netty-resolver-dns:[4.1.138.Final] + io.netty:netty-transport:[4.1.138.Final] diff --git a/sdk/clientcore/http-netty4/spotbugs-exclude.xml b/sdk/clientcore/http-netty4/spotbugs-exclude.xml index 3ab9dae484d8..57b36d11db67 100644 --- a/sdk/clientcore/http-netty4/spotbugs-exclude.xml +++ b/sdk/clientcore/http-netty4/spotbugs-exclude.xml @@ -62,10 +62,6 @@ - - - - diff --git a/sdk/clientcore/http-netty4/src/main/java/io/clientcore/http/netty4/NettyHttpClientBuilder.java b/sdk/clientcore/http-netty4/src/main/java/io/clientcore/http/netty4/NettyHttpClientBuilder.java index ef38cddf23ee..68c163abd001 100644 --- a/sdk/clientcore/http-netty4/src/main/java/io/clientcore/http/netty4/NettyHttpClientBuilder.java +++ b/sdk/clientcore/http-netty4/src/main/java/io/clientcore/http/netty4/NettyHttpClientBuilder.java @@ -12,22 +12,15 @@ import io.clientcore.http.netty4.implementation.ChannelInitializationProxyHandler; import io.clientcore.http.netty4.implementation.Netty4ConnectionPool; import io.netty.bootstrap.Bootstrap; -import io.netty.buffer.ByteBufAllocator; -import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.Channel; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; -import io.netty.channel.IoEventLoopGroup; -import io.netty.channel.IoHandler; -import io.netty.channel.IoHandlerFactory; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; import io.netty.util.concurrent.DefaultThreadFactory; -import io.netty.util.internal.SystemPropertyUtil; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -43,35 +36,35 @@ public class NettyHttpClientBuilder { private static final String EPOLL = "io.netty.channel.epoll.Epoll"; private static final String EPOLL_CHANNEL = "io.netty.channel.epoll.EpollSocketChannel"; - private static final String EPOLL_IO_HANDLER = "io.netty.channel.epoll.EpollIoHandler"; + private static final String EPOLL_EVENT_LOOP_GROUP = "io.netty.channel.epoll.EpollEventLoopGroup"; private static final boolean IS_EPOLL_AVAILABLE; private static final Class EPOLL_CHANNEL_CLASS; - private static final Class EPOLL_IO_HANDLER_CLASS; - private static final MethodHandle EPOLL_IO_HANDLER_FACTORY_CREATOR; + private static final Class EPOLL_EVENT_LOOP_GROUP_CLASS; + private static final MethodHandle EPOLL_EVENT_LOOP_GROUP_CREATOR; private static final String KQUEUE = "io.netty.channel.kqueue.KQueue"; private static final String KQUEUE_CHANNEL = "io.netty.channel.kqueue.KQueueSocketChannel"; - private static final String KQUEUE_IO_HANDLER = "io.netty.channel.kqueue.KQueueIoHandler"; + private static final String KQUEUE_EVENT_LOOP_GROUP = "io.netty.channel.kqueue.KQueueEventLoopGroup"; private static final boolean IS_KQUEUE_AVAILABLE; private static final Class KQUEUE_CHANNEL_CLASS; - private static final Class KQUEUE_IO_HANDLER_CLASS; - private static final MethodHandle KQUEUE_IO_HANDLER_FACTORY_CREATOR; + private static final Class KQUEUE_EVENT_LOOP_GROUP_CLASS; + private static final MethodHandle KQUEUE_EVENT_LOOP_GROUP_CREATOR; static { // Inspect the class path to determine is native transports are available. // If they are, this will determine runtime behaviors. boolean isEpollAvailable; Class epollChannelClass; - Class epollIoHandlerClass; - MethodHandle epollIoHandlerFactoryCreator; + Class epollEventLoopGroupClass; + MethodHandle epollEventLoopGroupCreator; try { Class epollClass = Class.forName(EPOLL); isEpollAvailable = (boolean) epollClass.getDeclaredMethod("isAvailable").invoke(null); epollChannelClass = getChannelClass(EPOLL_CHANNEL); - epollIoHandlerClass = Class.forName(EPOLL_IO_HANDLER).asSubclass(IoHandler.class); - epollIoHandlerFactoryCreator - = MethodHandles.publicLookup().unreflect(epollIoHandlerClass.getDeclaredMethod("newFactory")); + epollEventLoopGroupClass = Class.forName(EPOLL_EVENT_LOOP_GROUP); + epollEventLoopGroupCreator = MethodHandles.publicLookup() + .unreflectConstructor(epollEventLoopGroupClass.getDeclaredConstructor(ThreadFactory.class)); LOGGER.atVerbose() .addKeyValue("epollAvailable", isEpollAvailable) .log("Lookup for Epoll completed without error."); @@ -84,27 +77,27 @@ public class NettyHttpClientBuilder { LOGGER.atVerbose().log("Epoll is unavailable and won't be used."); isEpollAvailable = false; epollChannelClass = null; - epollIoHandlerClass = null; - epollIoHandlerFactoryCreator = null; + epollEventLoopGroupClass = null; + epollEventLoopGroupCreator = null; } IS_EPOLL_AVAILABLE = isEpollAvailable; EPOLL_CHANNEL_CLASS = epollChannelClass; - EPOLL_IO_HANDLER_CLASS = epollIoHandlerClass; - EPOLL_IO_HANDLER_FACTORY_CREATOR = epollIoHandlerFactoryCreator; + EPOLL_EVENT_LOOP_GROUP_CLASS = epollEventLoopGroupClass; + EPOLL_EVENT_LOOP_GROUP_CREATOR = epollEventLoopGroupCreator; boolean isKqueueAvailable; Class kqueueChannelClass; - Class kqueueIoHandlerClass; - MethodHandle kqueueIoHandlerFactoryCreator; + Class kqueueEventLoopGroupClass; + MethodHandle kqueueEventLoopGroupCreator; try { Class kqueueClass = Class.forName(KQUEUE); isKqueueAvailable = (boolean) kqueueClass.getDeclaredMethod("isAvailable").invoke(null); kqueueChannelClass = getChannelClass(KQUEUE_CHANNEL); - kqueueIoHandlerClass = Class.forName(KQUEUE_IO_HANDLER).asSubclass(IoHandler.class); - kqueueIoHandlerFactoryCreator - = MethodHandles.publicLookup().unreflect(kqueueIoHandlerClass.getDeclaredMethod("newFactory")); + kqueueEventLoopGroupClass = Class.forName(KQUEUE_EVENT_LOOP_GROUP); + kqueueEventLoopGroupCreator = MethodHandles.publicLookup() + .unreflectConstructor(kqueueEventLoopGroupClass.getDeclaredConstructor(ThreadFactory.class)); LOGGER.atVerbose() .addKeyValue("kqueueAvailable", isKqueueAvailable) .log("Lookup for KQueue completed without error."); @@ -117,14 +110,14 @@ public class NettyHttpClientBuilder { LOGGER.atVerbose().log("KQueue is unavailable and won't be used."); isKqueueAvailable = false; kqueueChannelClass = null; - kqueueIoHandlerClass = null; - kqueueIoHandlerFactoryCreator = null; + kqueueEventLoopGroupClass = null; + kqueueEventLoopGroupCreator = null; } IS_KQUEUE_AVAILABLE = isKqueueAvailable; KQUEUE_CHANNEL_CLASS = kqueueChannelClass; - KQUEUE_IO_HANDLER_CLASS = kqueueIoHandlerClass; - KQUEUE_IO_HANDLER_FACTORY_CREATOR = kqueueIoHandlerFactoryCreator; + KQUEUE_EVENT_LOOP_GROUP_CLASS = kqueueEventLoopGroupClass; + KQUEUE_EVENT_LOOP_GROUP_CREATOR = kqueueEventLoopGroupCreator; } @SuppressWarnings("unchecked") @@ -161,10 +154,10 @@ public NettyHttpClientBuilder() { * Sets the event loop group for the Netty client. *

      * By default, if no {@code eventLoopGroup} is configured and no native transports are available (Epoll KQueue) - * a {@link MultiThreadIoEventLoopGroup} using {@link NioIoHandler} will be used. + * {@link NioEventLoopGroup} will be used. *

      - * If native transports are available, the {@link IoHandlerFactory} for the native transport will be - * chosen over {@link NioIoHandler}. + * If native transports are available, the {@link EventLoopGroup} implementation for the native transport will be + * chosen over {@link NioEventLoopGroup}. * * @param eventLoopGroup The event loop group. * @return The updated builder. @@ -384,9 +377,9 @@ public NettyHttpClientBuilder maxPendingAcquires(int maxPendingAcquires) { */ public HttpClient build() { EventLoopGroup group = getEventLoopGroupToUse(this.eventLoopGroup, this.channelClass, IS_EPOLL_AVAILABLE, - EPOLL_IO_HANDLER_FACTORY_CREATOR, IS_KQUEUE_AVAILABLE, KQUEUE_IO_HANDLER_FACTORY_CREATOR); + EPOLL_EVENT_LOOP_GROUP_CREATOR, IS_KQUEUE_AVAILABLE, KQUEUE_EVENT_LOOP_GROUP_CREATOR); Class channelClass - = getChannelClass(this.channelClass, group, IS_EPOLL_AVAILABLE, IS_KQUEUE_AVAILABLE); + = getChannelClass(this.channelClass, group.getClass(), IS_EPOLL_AVAILABLE, IS_KQUEUE_AVAILABLE); // Leave breadcrumbs about the NettyHttpClient configuration, in case troubleshooting is needed. LoggingEvent loggingEvent = LOGGER.atVerbose() @@ -408,13 +401,6 @@ public HttpClient build() { Bootstrap bootstrap = new Bootstrap().group(group) .channel(channelClass) .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, (int) getTimeoutMillis(connectTimeout, 10_000)); - bootstrap.option(ChannelOption.ALLOCATOR, - // If io.netty.allocator.type was configured, respect the configuration. Otherwise, fallback to the default - // setting from Netty 4.1 which was the pooled allocator. In the future, this should be validated for if - // this should use the new Netty 4.2 default which is an adaptive allocator. - SystemPropertyUtil.contains("io.netty.allocator.type") - ? ByteBufAllocator.DEFAULT - : PooledByteBufAllocator.DEFAULT); // Disable auto-read as we want to control when and how data is read from the channel. bootstrap.option(ChannelOption.AUTO_READ, false); // Enable TCP keep-alive to proactively detect and clean up stale connections in the pool. This helps evict @@ -469,52 +455,47 @@ ProxyOptions getProxyOptions() { static EventLoopGroup getEventLoopGroupToUse(EventLoopGroup configuredGroup, Class configuredChannelClass, boolean isEpollAvailable, - MethodHandle epollIoHandlerFactoryCreator, boolean isKqueueAvailable, - MethodHandle kqueueIoHandlerFactoryCreator) { + MethodHandle epollEventLoopGroupCreator, boolean isKqueueAvailable, MethodHandle kqueueEventLoopGroupCreator) { if (configuredGroup != null) { return configuredGroup; } ThreadFactory threadFactory = new DefaultThreadFactory("clientcore-netty-client", true); - // Use Epoll if available and 'channelClass' wasn't configured or was configured to + // Use EpollEventLoopGroup if Epoll is available and 'channelClass' wasn't configured or was configured to // EpollSocketChannel. if (isEpollAvailable && (configuredChannelClass == null || configuredChannelClass == EPOLL_CHANNEL_CLASS)) { try { - return new MultiThreadIoEventLoopGroup(threadFactory, - (IoHandlerFactory) epollIoHandlerFactoryCreator.invoke()); + return (EventLoopGroup) epollEventLoopGroupCreator.invoke(threadFactory); } catch (Throwable ex) { - LOGGER.atVerbose().setThrowable(ex).log("Failed to create an Epoll event loop group."); + LOGGER.atVerbose().setThrowable(ex).log("Failed to create an EpollEventLoopGroup."); } } - // Use KQueue if available and 'channelClass' wasn't configured or was configured to + // Use KQueueEventLoopGroup if KQueue is available and 'channelClass' wasn't configured or was configured to // KQueueSocketChannel. if (isKqueueAvailable && (configuredChannelClass == null || configuredChannelClass == KQUEUE_CHANNEL_CLASS)) { try { - return new MultiThreadIoEventLoopGroup(threadFactory, - (IoHandlerFactory) kqueueIoHandlerFactoryCreator.invoke()); + return (EventLoopGroup) kqueueEventLoopGroupCreator.invoke(threadFactory); } catch (Throwable ex) { - LOGGER.atVerbose().setThrowable(ex).log("Failed to create a KQueue event loop group."); + LOGGER.atVerbose().setThrowable(ex).log("Failed to create a KQueueEventLoopGroup."); } } - // Fall back to NIO. - return new MultiThreadIoEventLoopGroup(threadFactory, NioIoHandler.newFactory()); + // Fallback to NioEventLoopGroup. + return new NioEventLoopGroup(threadFactory); } static Class getChannelClass(Class configuredChannelClass, - EventLoopGroup configuredGroup, boolean isEpollAvailable, boolean isKqueueAvailable) { + Class configuredGroupClass, boolean isEpollAvailable, boolean isKqueueAvailable) { if (configuredChannelClass != null) { // If the Channel class was manually set, use it. return configuredChannelClass; - } else if (isEpollAvailable - && configuredGroup instanceof IoEventLoopGroup - && ((IoEventLoopGroup) configuredGroup).isIoType(EPOLL_IO_HANDLER_CLASS)) { + } else if (isEpollAvailable && configuredGroupClass == EPOLL_EVENT_LOOP_GROUP_CLASS) { + // If Epoll is available and the EventLoopGroup is EpollEventLoopGroup, use EpollSocketChannel. return EPOLL_CHANNEL_CLASS; - } else if (isKqueueAvailable - && configuredGroup instanceof IoEventLoopGroup - && ((IoEventLoopGroup) configuredGroup).isIoType(KQUEUE_IO_HANDLER_CLASS)) { + } else if (isKqueueAvailable && configuredGroupClass == KQUEUE_EVENT_LOOP_GROUP_CLASS) { + // If KQueue is available and the EventLoopGroup is KQueueEventLoopGroup, use KQueueSocketChannel. return KQUEUE_CHANNEL_CLASS; } else { // Fallback to NioSocketChannel. diff --git a/sdk/clientcore/http-netty4/src/main/java/io/clientcore/http/netty4/implementation/Netty4Utility.java b/sdk/clientcore/http-netty4/src/main/java/io/clientcore/http/netty4/implementation/Netty4Utility.java index 4bdffdc966f8..f0d7835c190f 100644 --- a/sdk/clientcore/http-netty4/src/main/java/io/clientcore/http/netty4/implementation/Netty4Utility.java +++ b/sdk/clientcore/http-netty4/src/main/java/io/clientcore/http/netty4/implementation/Netty4Utility.java @@ -85,12 +85,10 @@ public final class Netty4Utility { // Non-native dependencies are required while native dependencies are optional. Without the native dependencies // the SDK will fall back to using the JDK implementations. private static final List REQUIRED_NETTY_VERSION_ARTIFACTS - = Arrays.asList("netty-buffer", "netty-codec-base", "netty-codec-compression", "netty-codec-dns", - "netty-codec-socks", "netty-codec-http", "netty-codec-http2", "netty-common", "netty-handler", - "netty-handler-proxy", "netty-resolver", "netty-resolver-dns", "netty-transport"); - private static final List OPTIONAL_NETTY_VERSION_ARTIFACTS - = Arrays.asList("netty-transport-native-unix-common", "netty-transport-native-epoll", - "netty-transport-native-kqueue", "netty-transport-classes-epoll", "netty-transport-classes-kqueue"); + = Arrays.asList("netty-buffer", "netty-codec", "netty-codec-http", "netty-codec-http2", "netty-common", + "netty-handler", "netty-handler-proxy", "netty-resolver", "netty-resolver-dns", "netty-transport"); + private static final List OPTIONAL_NETTY_VERSION_ARTIFACTS = Arrays + .asList("netty-transport-native-unix-common", "netty-transport-native-epoll", "netty-transport-native-kqueue"); private static final int TWO_FIFTY_SIX_KB = 256 * 1024; diff --git a/sdk/clientcore/http-netty4/src/main/java/module-info.java b/sdk/clientcore/http-netty4/src/main/java/module-info.java index a9e31d53266b..2ab0fc5e7223 100644 --- a/sdk/clientcore/http-netty4/src/main/java/module-info.java +++ b/sdk/clientcore/http-netty4/src/main/java/module-info.java @@ -14,7 +14,6 @@ requires io.netty.common; requires io.netty.handler.proxy; requires io.netty.codec; - requires io.netty.codec.compression; requires io.netty.resolver; requires io.netty.codec.http2; requires java.sql; diff --git a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/NettyHttp2HttpClientTests.java b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/NettyHttp2HttpClientTests.java index 7a454a7650fe..dba6aa10bbea 100644 --- a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/NettyHttp2HttpClientTests.java +++ b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/NettyHttp2HttpClientTests.java @@ -17,21 +17,12 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Timeout; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.nio.charset.StandardCharsets; import java.security.SecureRandom; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import java.util.zip.DeflaterOutputStream; -import java.util.zip.GZIPOutputStream; import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; @Timeout(value = 3, unit = TimeUnit.MINUTES) public class NettyHttp2HttpClientTests extends HttpClientTests { @@ -102,31 +93,4 @@ public void canSendBinaryDataDebug() { assertArrayEquals(expectedBytes, response.getValue().toBytes()); } } - - @ParameterizedTest - @ValueSource(strings = { "gzip", "deflate" }) - public void decompressesResponse(String contentEncoding) throws IOException { - byte[] expected = "Compressed HTTP/2 response".getBytes(StandardCharsets.UTF_8); - ByteArrayOutputStream compressed = new ByteArrayOutputStream(); - try (OutputStream compressor = "gzip".equals(contentEncoding) - ? new GZIPOutputStream(compressed) - : new DeflaterOutputStream(compressed)) { - compressor.write(expected); - } - byte[] compressedBytes = compressed.toByteArray(); - LocalTestServer compressedServer - = new LocalTestServer(HttpProtocolVersion.HTTP_2, true, (request, response, requestBody) -> { - response.setHeader("Content-Encoding", contentEncoding); - response.setContentLength(compressedBytes.length); - response.getOutputStream().write(compressedBytes); - }); - compressedServer.start(); - try (Response response = getHttpClient() - .send(new HttpRequest().setMethod(HttpMethod.GET).setUri(compressedServer.getHttpsUri()))) { - assertEquals(200, response.getStatusCode()); - assertArrayEquals(expected, response.getValue().toBytes()); - } finally { - compressedServer.stop(); - } - } } diff --git a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/NettyHttpClientBuilderTests.java b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/NettyHttpClientBuilderTests.java index ac0e01e2f2ad..a417ef32f253 100644 --- a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/NettyHttpClientBuilderTests.java +++ b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/NettyHttpClientBuilderTests.java @@ -13,23 +13,15 @@ import io.clientcore.core.utils.configuration.Configuration; import io.clientcore.http.netty4.implementation.NettyHttpClientLocalTestServer; import io.netty.bootstrap.BootstrapConfig; -import io.netty.buffer.ByteBufAllocator; -import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.Channel; -import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; -import io.netty.channel.IoEventLoopGroup; -import io.netty.channel.IoHandler; -import io.netty.channel.IoHandlerFactory; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.epoll.EpollIoHandler; +import io.netty.channel.epoll.EpollEventLoopGroup; import io.netty.channel.epoll.EpollSocketChannel; -import io.netty.channel.kqueue.KQueueIoHandler; +import io.netty.channel.kqueue.KQueueEventLoopGroup; import io.netty.channel.kqueue.KQueueSocketChannel; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; -import io.netty.resolver.DefaultAddressResolverGroup; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Timeout; import org.junit.jupiter.api.condition.EnabledOnOs; @@ -46,6 +38,7 @@ import java.time.Duration; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; import java.util.stream.Stream; @@ -57,13 +50,6 @@ import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.atLeastOnce; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoInteractions; -import static org.mockito.Mockito.when; /** * Tests {@link NettyHttpClientBuilder}. @@ -210,7 +196,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { arguments.add( Configuration.from(new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://localhost:12345") - .put(Configuration.HTTPS_PROXY, "") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"))); /* @@ -222,7 +207,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { arguments.add( Configuration.from(new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://1:1@localhost:12345") - .put(Configuration.HTTPS_PROXY, "") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"))); /* @@ -238,7 +222,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { .from(baseJavaProxyConfigurationSupplier.get().put(JAVA_NON_PROXY_HOSTS, rawJavaNonProxyHosts))); arguments.add( Configuration.from(new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://localhost:12345") - .put(Configuration.HTTPS_PROXY, "") .put(Configuration.NO_PROXY, rawEnvNonProxyHosts) .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"))); @@ -251,7 +234,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { .put(JAVA_HTTP_PROXY_PASSWORD, "1"))); arguments.add( Configuration.from(new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://1:1@localhost:12345") - .put(Configuration.HTTPS_PROXY, "") .put(Configuration.NO_PROXY, rawEnvNonProxyHosts) .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"))); @@ -304,16 +286,12 @@ private static Stream buildWithExplicitConfigurationProxySupplier @Test public void buildEventLoopClient() { String expectedThreadName = "testEventLoop"; - EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(1, - (Runnable r) -> new Thread(r, expectedThreadName), NioIoHandler.newFactory()); - - try { - NettyHttpClient nettyClient - = (NettyHttpClient) new NettyHttpClientBuilder().eventLoopGroup(eventLoopGroup).build(); - assertSame(eventLoopGroup, nettyClient.getBootstrap().config().group()); - } finally { - eventLoopGroup.shutdownGracefully(0, 5, TimeUnit.SECONDS).syncUninterruptibly(); - } + NioEventLoopGroup eventLoopGroup = new NioEventLoopGroup(1, (Runnable r) -> new Thread(r, expectedThreadName)); + + NettyHttpClient nettyClient + = (NettyHttpClient) new NettyHttpClientBuilder().eventLoopGroup(eventLoopGroup).build(); + + assertSame(eventLoopGroup, nettyClient.getBootstrap().config().group()); } @ParameterizedTest @@ -329,27 +307,13 @@ private static Stream getTimeoutMillisSupplier() { Arguments.of(Duration.ofNanos(1), TimeUnit.MILLISECONDS.toMillis(1))); } - @Test - public void preservesAllocatorAndResolverDefaults() { - NettyHttpClient client = (NettyHttpClient) new NettyHttpClientBuilder().build(); - try { - ByteBufAllocator expectedAllocator = System.getProperty("io.netty.allocator.type") == null - ? PooledByteBufAllocator.DEFAULT - : ByteBufAllocator.DEFAULT; - assertSame(expectedAllocator, client.getBootstrap().config().options().get(ChannelOption.ALLOCATOR)); - assertSame(DefaultAddressResolverGroup.INSTANCE, client.getBootstrap().config().resolver()); - } finally { - client.getBootstrap().config().group().shutdownGracefully(0, 5, TimeUnit.SECONDS).syncUninterruptibly(); - } - } - @Test @EnabledOnOs(OS.WINDOWS) public void windowsUseNioByDefault() { NettyHttpClient nettyHttpClient = (NettyHttpClient) new NettyHttpClientBuilder().build(); BootstrapConfig config = nettyHttpClient.getBootstrap().config(); - assertTrue(assertInstanceOf(IoEventLoopGroup.class, config.group()).isIoType(NioIoHandler.class)); + assertInstanceOf(NioEventLoopGroup.class, config.group()); assertInstanceOf(NioSocketChannel.class, config.channelFactory().newChannel()); } @@ -359,7 +323,7 @@ public void macUsesKQueueByDefault() { NettyHttpClient nettyHttpClient = (NettyHttpClient) new NettyHttpClientBuilder().build(); BootstrapConfig config = nettyHttpClient.getBootstrap().config(); - assertTrue(assertInstanceOf(IoEventLoopGroup.class, config.group()).isIoType(KQueueIoHandler.class)); + assertInstanceOf(KQueueEventLoopGroup.class, config.group()); assertInstanceOf(KQueueSocketChannel.class, config.channelFactory().newChannel()); } @@ -368,11 +332,11 @@ public void macUsesKQueueByDefault() { public void macUsesNioIfConfigured() { NettyHttpClient nettyHttpClient = (NettyHttpClient) new NettyHttpClientBuilder().channelClass(NioSocketChannel.class) - .eventLoopGroup(new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory())) + .eventLoopGroup(new NioEventLoopGroup()) .build(); BootstrapConfig config = nettyHttpClient.getBootstrap().config(); - assertTrue(assertInstanceOf(IoEventLoopGroup.class, config.group()).isIoType(NioIoHandler.class)); + assertInstanceOf(NioEventLoopGroup.class, config.group()); assertInstanceOf(NioSocketChannel.class, config.channelFactory().newChannel()); } @@ -382,7 +346,7 @@ public void linuxUsesEpollByDefault() { NettyHttpClient nettyHttpClient = (NettyHttpClient) new NettyHttpClientBuilder().build(); BootstrapConfig config = nettyHttpClient.getBootstrap().config(); - assertTrue(assertInstanceOf(IoEventLoopGroup.class, config.group()).isIoType(EpollIoHandler.class)); + assertInstanceOf(EpollEventLoopGroup.class, config.group()); assertInstanceOf(EpollSocketChannel.class, config.channelFactory().newChannel()); } @@ -391,61 +355,24 @@ public void linuxUsesEpollByDefault() { public void linuxUsesNioIfConfigured() { NettyHttpClient nettyHttpClient = (NettyHttpClient) new NettyHttpClientBuilder().channelClass(NioSocketChannel.class) - .eventLoopGroup(new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory())) + .eventLoopGroup(new NioEventLoopGroup()) .build(); BootstrapConfig config = nettyHttpClient.getBootstrap().config(); - assertTrue(assertInstanceOf(IoEventLoopGroup.class, config.group()).isIoType(NioIoHandler.class)); + assertInstanceOf(NioEventLoopGroup.class, config.group()); assertInstanceOf(NioSocketChannel.class, config.channelFactory().newChannel()); } @ParameterizedTest @MethodSource("getEventLoopGroupToUseSupplier") - public void getEventLoopGroupToUse(String expectedTransport, boolean configureGroup, - Class configuredChannelClass, boolean isEpollAvailable, boolean epollFails, - boolean isKqueueAvailable, boolean kqueueFails) { - IoHandlerFactory epollFactory = mockIoHandlerFactory(); - IoHandlerFactory kqueueFactory = mockIoHandlerFactory(); - MethodHandle exceptionCreator - = MethodHandles.throwException(IoHandlerFactory.class, IllegalStateException.class) - .bindTo(new IllegalStateException("Native transport unavailable")); - MethodHandle epollCreator - = epollFails ? exceptionCreator : MethodHandles.constant(IoHandlerFactory.class, epollFactory); - MethodHandle kqueueCreator - = kqueueFails ? exceptionCreator : MethodHandles.constant(IoHandlerFactory.class, kqueueFactory); - EventLoopGroup configuredGroup - = configureGroup ? new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory()) : null; - EventLoopGroup eventLoopGroup = NettyHttpClientBuilder.getEventLoopGroupToUse(configuredGroup, - configuredChannelClass, isEpollAvailable, epollCreator, isKqueueAvailable, kqueueCreator); - - try { - assertInstanceOf(MultiThreadIoEventLoopGroup.class, eventLoopGroup); - if (configuredGroup != null) { - assertSame(configuredGroup, eventLoopGroup); - } - if ("epoll".equals(expectedTransport)) { - verify(epollFactory, atLeastOnce()).newHandler(any()); - verifyNoInteractions(kqueueFactory); - } else if ("kqueue".equals(expectedTransport)) { - verify(kqueueFactory, atLeastOnce()).newHandler(any()); - verifyNoInteractions(epollFactory); - } else { - verifyNoInteractions(epollFactory, kqueueFactory); - } - assertTrue(assertInstanceOf(IoEventLoopGroup.class, eventLoopGroup).isIoType(NioIoHandler.class)); - if (configuredGroup == null) { - assertTrue(eventLoopGroup.next() - .submit(() -> Thread.currentThread().isDaemon()) - .syncUninterruptibly() - .getNow()); - assertTrue(eventLoopGroup.next() - .submit(() -> Thread.currentThread().getName().startsWith("clientcore-netty-client")) - .syncUninterruptibly() - .getNow()); - } - } finally { - eventLoopGroup.shutdownGracefully(0, 5, TimeUnit.SECONDS).syncUninterruptibly(); - } + public void getEventLoopGroupToUse(Class expected, EventLoopGroup configuredGroup, + Class configuredChannelClass, boolean isEpollAvailable, + MethodHandle epollEventLoopGroupCreator, boolean isKqueueAvailable, MethodHandle kqueueEventLoopGroupCreator) { + EventLoopGroup eventLoopGroup + = NettyHttpClientBuilder.getEventLoopGroupToUse(configuredGroup, configuredChannelClass, isEpollAvailable, + epollEventLoopGroupCreator, isKqueueAvailable, kqueueEventLoopGroupCreator); + + assertInstanceOf(expected, eventLoopGroup); } @Test @@ -477,60 +404,128 @@ public void testMaximumHttpVersion() throws NoSuchFieldException, IllegalAccessE assertEquals(HttpProtocolVersion.HTTP_2, httpVersionField.get(clientv2)); } - private static Stream getEventLoopGroupToUseSupplier() { - return Stream.of(Arguments.of("nio", true, null, true, true, true, true), - Arguments.of("epoll", false, null, true, false, false, false), - Arguments.of("epoll", false, EpollSocketChannel.class, true, false, false, false), - Arguments.of("nio", false, null, true, true, false, false), - Arguments.of("kqueue", false, null, false, false, true, false), - Arguments.of("kqueue", false, KQueueSocketChannel.class, false, false, true, false), - Arguments.of("nio", false, null, false, false, true, true), - Arguments.of("epoll", false, null, true, false, true, false), - Arguments.of("kqueue", false, KQueueSocketChannel.class, true, false, true, false), - Arguments.of("kqueue", false, null, true, true, true, false), - Arguments.of("nio", false, null, true, true, true, true), - Arguments.of("epoll", false, EpollSocketChannel.class, true, false, true, false), - Arguments.of("nio", false, NioSocketChannel.class, true, true, true, true), - Arguments.of("nio", false, null, false, false, false, false)); + private static Stream getEventLoopGroupToUseSupplier() throws ReflectiveOperationException { + // Doesn't matter what this is calling, just needs to throw an exception. + // This will as it doesn't accept the arguments that it will be called with. + MethodHandle exceptionCreator + = MethodHandles.publicLookup().unreflectConstructor(NioEventLoopGroup.class.getDeclaredConstructor()); + + // NOTE: This test doesn't use EpollEventLoopGroup or KQueueEventLoopGroup directly, but rather uses different + // EventLoopGroup classes as the creation of those requires native libraries to be loaded. + // This is a workaround to avoid loading the native libraries in the test, as not all OSes can support the + // native transports. + MethodHandle epollCreator = MethodHandles.publicLookup() + .unreflectConstructor(MockEpollEventLoopGroup.class.getDeclaredConstructor(ThreadFactory.class)); + MethodHandle kqueueCreator = MethodHandles.publicLookup() + .unreflectConstructor(MockKQueueEventLoopGroup.class.getDeclaredConstructor(ThreadFactory.class)); + + // EventLoopGroup is configured, use it. + Arguments configuredGroup + = Arguments.of(NioEventLoopGroup.class, new NioEventLoopGroup(), null, false, null, false, null); + + // Epoll is available and nothing is configured, use EpollEventLoopGroup. + Arguments epollGroup = Arguments.of(MockEpollEventLoopGroup.class, null, null, true, epollCreator, false, null); + + // Epoll is available and EpollSocketChannel is configured, use EpollEventLoopGroup. + Arguments epollChannelGroup = Arguments.of(MockEpollEventLoopGroup.class, null, EpollSocketChannel.class, true, + epollCreator, false, null); + + // Epoll is available but throws an exception, use NioEventLoopGroup. + Arguments epollExceptionGroup + = Arguments.of(NioEventLoopGroup.class, null, null, true, exceptionCreator, false, null); + + // KQueue is available and nothing is configured, use KQueueEventLoopGroup. + Arguments kqueueGroup + = Arguments.of(MockKQueueEventLoopGroup.class, null, null, false, null, true, kqueueCreator); + + // KQueue is available and KQueueSocketChannel is configured, use KQueueEventLoopGroup. + Arguments kqueueChannelGroup = Arguments.of(MockKQueueEventLoopGroup.class, null, KQueueSocketChannel.class, + false, null, true, kqueueCreator); + + // KQueue is available but throws an exception, use NioEventLoopGroup. + Arguments kqueueExceptionGroup + = Arguments.of(NioEventLoopGroup.class, null, null, false, null, true, exceptionCreator); + + // Both Epoll and KQueue are available, use EpollEventLoopGroup. + Arguments epollAndKqueueGroup + = Arguments.of(MockEpollEventLoopGroup.class, null, null, true, epollCreator, true, kqueueCreator); + + // Both Epoll and KQueue are available but channel class is set to KQueueSocketChannel, use + // KQueueEventLoopGroup. + Arguments epollAndKqueueChannelGroup = Arguments.of(MockKQueueEventLoopGroup.class, null, + KQueueSocketChannel.class, true, epollCreator, true, kqueueCreator); + + // Both Epoll and KQueue are available but throws an exception, use NioEventLoopGroup. + Arguments epollAndKqueueExceptionGroup + = Arguments.of(NioEventLoopGroup.class, null, null, true, exceptionCreator, true, exceptionCreator); + + // Both Epoll and KQueue are available but channel class is set to EpollSocketChannel, use + // EpollEventLoopGroup. + Arguments epollAndKqueueChannelExceptionGroup = Arguments.of(MockEpollEventLoopGroup.class, null, + EpollSocketChannel.class, true, epollCreator, true, kqueueCreator); + + // Both Epoll and KQueue are available but channel class is set to NioSocketChannel, use + // NioEventLoopGroup. + Arguments epollAndKqueueChannelNioGroup = Arguments.of(NioEventLoopGroup.class, null, NioSocketChannel.class, + true, epollCreator, true, kqueueCreator); + + return Stream.of(configuredGroup, epollGroup, epollChannelGroup, epollExceptionGroup, kqueueGroup, + kqueueChannelGroup, kqueueExceptionGroup, epollAndKqueueGroup, epollAndKqueueChannelGroup, + epollAndKqueueExceptionGroup, epollAndKqueueChannelExceptionGroup, epollAndKqueueChannelNioGroup); } - private static IoHandlerFactory mockIoHandlerFactory() { - // Delegate to NIO so factory selection can be tested without loading native libraries. - IoHandlerFactory delegate = NioIoHandler.newFactory(); - IoHandlerFactory factory = mock(IoHandlerFactory.class); - when(factory.newHandler(any())).thenAnswer(invocation -> delegate.newHandler(invocation.getArgument(0))); - return factory; + public static final class MockEpollEventLoopGroup extends NioEventLoopGroup { + public MockEpollEventLoopGroup(ThreadFactory threadFactory) { + super(threadFactory); + } + } + + public static final class MockKQueueEventLoopGroup extends NioEventLoopGroup { + public MockKQueueEventLoopGroup(ThreadFactory threadFactory) { + super(threadFactory); + } } @ParameterizedTest @MethodSource("getChannelClassSupplier") public void getChannelClass(Class expected, Class configuredChannelClass, - EventLoopGroup configuredGroup, boolean isEpollAvailable, boolean isKqueueAvailable) { + Class congiguredGroupClass, boolean isEpollAvailable, boolean isKqueueAvailable) { Class channelClass = NettyHttpClientBuilder.getChannelClass(configuredChannelClass, - configuredGroup, isEpollAvailable, isKqueueAvailable); + congiguredGroupClass, isEpollAvailable, isKqueueAvailable); assertEquals(expected, channelClass); } private static Stream getChannelClassSupplier() { - IoEventLoopGroup nioGroup = mockIoEventLoopGroup(NioIoHandler.class); - IoEventLoopGroup epollGroup = mockIoEventLoopGroup(EpollIoHandler.class); - IoEventLoopGroup kqueueGroup = mockIoEventLoopGroup(KQueueIoHandler.class); - - return Stream.of(Arguments.of(NioSocketChannel.class, NioSocketChannel.class, epollGroup, true, true), - Arguments.of(EpollSocketChannel.class, null, epollGroup, true, false), - Arguments.of(KQueueSocketChannel.class, null, kqueueGroup, false, true), - Arguments.of(NioSocketChannel.class, null, nioGroup, true, false), - Arguments.of(NioSocketChannel.class, null, nioGroup, false, true), - Arguments.of(NioSocketChannel.class, null, nioGroup, true, true), - Arguments.of(EpollSocketChannel.class, null, epollGroup, true, true), - Arguments.of(KQueueSocketChannel.class, null, kqueueGroup, true, true), - Arguments.of(NioSocketChannel.class, null, mock(EventLoopGroup.class), true, true)); - } + // Channel class is configured, use it. + Arguments configuredChannel = Arguments.of(NioSocketChannel.class, NioSocketChannel.class, null, false, false); + + // Epoll is available and EventLoopGroup is EpollEventLoopGroup, use EpollSocketChannel. + Arguments epollChannel = Arguments.of(EpollSocketChannel.class, null, EpollEventLoopGroup.class, true, false); + + // KQueue is available and EventLoopGroup is KQueueEventLoopGroup, use KQueueSocketChannel. + Arguments kqueueChannel + = Arguments.of(KQueueSocketChannel.class, null, KQueueEventLoopGroup.class, false, true); + + // Epoll is available and EventLoopGroup is NioEventLoopGroup, use NioSocketChannel. + Arguments epollNioChannel = Arguments.of(NioSocketChannel.class, null, NioEventLoopGroup.class, true, false); + + // KQueue is available and EventLoopGroup is NioEventLoopGroup, use NioSocketChannel. + Arguments kqueueNioChannel = Arguments.of(NioSocketChannel.class, null, NioEventLoopGroup.class, false, true); + + // Both Epoll and KQueue are available and EventLoopGroup is NioEventLoopGroup, use NioSocketChannel. + Arguments epollAndKqueueNioChannel + = Arguments.of(NioSocketChannel.class, null, NioEventLoopGroup.class, true, true); + + // Both Epoll and KQueue are available and EventLoopGroup is EpollEventLoopGroup, use EpollSocketChannel. + Arguments epollAndKqueueEpollChannel + = Arguments.of(EpollSocketChannel.class, null, EpollEventLoopGroup.class, true, true); + + // Both Epoll and KQueue are available and EventLoopGroup is KQueueEventLoopGroup, use KQueueSocketChannel. + Arguments epollAndKqueueKqueueChannel + = Arguments.of(KQueueSocketChannel.class, null, KQueueEventLoopGroup.class, true, true); - private static IoEventLoopGroup mockIoEventLoopGroup(Class ioHandlerClass) { - IoEventLoopGroup group = mock(IoEventLoopGroup.class); - when(group.isIoType(ioHandlerClass)).thenReturn(true); - return group; + return Stream.of(configuredChannel, epollChannel, kqueueChannel, epollNioChannel, kqueueNioChannel, + epollAndKqueueNioChannel, epollAndKqueueEpollChannel, epollAndKqueueKqueueChannel); } } diff --git a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4ConnectionPoolTests.java b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4ConnectionPoolTests.java index 25f02cd4d45f..ba84eb3e9035 100644 --- a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4ConnectionPoolTests.java +++ b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4ConnectionPoolTests.java @@ -10,8 +10,7 @@ import io.netty.channel.Channel; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.util.concurrent.Future; import org.junit.jupiter.api.AfterAll; @@ -64,7 +63,7 @@ public class Netty4ConnectionPoolTests { public static void startTestServerAndEventLoopGroup() { server = NettyHttpClientLocalTestServer.getServer(); server.start(); - eventLoopGroup = new MultiThreadIoEventLoopGroup(2, NioIoHandler.newFactory()); + eventLoopGroup = new NioEventLoopGroup(2); bootstrap = new Bootstrap().group(eventLoopGroup).channel(NioSocketChannel.class); bootstrap.option(ChannelOption.AUTO_READ, false); SocketAddress socketAddress = new InetSocketAddress("localhost", server.getPort()); diff --git a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4Http11ChannelBinaryDataTests.java b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4Http11ChannelBinaryDataTests.java index aa9a0ad8cf2d..02ccf7538c9b 100644 --- a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4Http11ChannelBinaryDataTests.java +++ b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4Http11ChannelBinaryDataTests.java @@ -50,7 +50,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; @@ -261,7 +260,6 @@ public void closeAfterDrainingDisconnectsChannel() { TestMockChannel realChannel = new TestMockChannel(); new DefaultEventLoop().register(realChannel); Channel spiedChannel = spy(realChannel); - doReturn(realChannel.pipeline()).when(spiedChannel).pipeline(); Runnable cleanupTask = () -> { spiedChannel.disconnect(); spiedChannel.close(); diff --git a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4PipelineCleanupHandlerTests.java b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4PipelineCleanupHandlerTests.java index 6df2d35cffac..afd24f2ab29a 100644 --- a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4PipelineCleanupHandlerTests.java +++ b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4PipelineCleanupHandlerTests.java @@ -293,11 +293,6 @@ public int getCloseCallCount() { } private static class MockEventLoop extends DefaultEventLoop { - @Override - public boolean inEventLoop(Thread thread) { - return true; - } - @Override public void execute(Runnable task) { if (task == null) { diff --git a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4UtilityTests.java b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4UtilityTests.java index ffa52f66e01c..468f57acffd0 100644 --- a/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4UtilityTests.java +++ b/sdk/clientcore/http-netty4/src/test/java/io/clientcore/http/netty4/implementation/Netty4UtilityTests.java @@ -2,22 +2,15 @@ // Licensed under the MIT License. package io.clientcore.http.netty4.implementation; -import io.clientcore.core.http.client.HttpProtocolVersion; import io.clientcore.core.http.models.HttpHeader; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; import io.clientcore.core.utils.CoreUtils; -import io.netty.buffer.UnpooledByteBufAllocator; import io.netty.handler.codec.http.DefaultHttpHeaders; import io.netty.handler.codec.http.HttpHeaderNames; -import io.netty.handler.ssl.SslContext; -import io.netty.handler.ssl.SslProvider; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Timeout; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.EnumSource; -import javax.net.ssl.SSLException; import java.util.Arrays; import java.util.Map; import java.util.concurrent.TimeUnit; @@ -29,32 +22,11 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertLinesMatch; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertTrue; @Timeout(value = 3, unit = TimeUnit.MINUTES) public class Netty4UtilityTests { - @ParameterizedTest - @EnumSource(HttpProtocolVersion.class) - public void sslContextEnablesHostnameVerification(HttpProtocolVersion protocolVersion) throws SSLException { - SslContext context - = Netty4Utility.buildSslContext(protocolVersion, builder -> builder.sslProvider(SslProvider.JDK)); - assertEquals("HTTPS", - context.newEngine(UnpooledByteBufAllocator.DEFAULT, "localhost", 443) - .getSSLParameters() - .getEndpointIdentificationAlgorithm()); - } - - @Test - public void sslContextHonorsHostnameVerificationModifier() throws SSLException { - SslContext context = Netty4Utility.buildSslContext(HttpProtocolVersion.HTTP_1_1, - builder -> builder.sslProvider(SslProvider.JDK).endpointIdentificationAlgorithm(null)); - assertNull(context.newEngine(UnpooledByteBufAllocator.DEFAULT, "localhost", 443) - .getSSLParameters() - .getEndpointIdentificationAlgorithm()); - } - @Test public void validateNettyVersionsWithWhatThePomSpecifies() { Map pomVersions = CoreUtils.getProperties(PROPERTIES_FILE_NAME); diff --git a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilderTests.java b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilderTests.java index 9498ba652691..a68b162b07d6 100644 --- a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilderTests.java +++ b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilderTests.java @@ -505,7 +505,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { Configuration simpleEnvProxy = Configuration.from(new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://localhost:12345") - .put(Configuration.HTTPS_PROXY, "") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")); arguments.add(Arguments.of(true, simpleEnvProxy, defaultUri)); @@ -521,7 +520,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { Configuration envProxyWithAuthentication = Configuration.from(EMPTY_SOURCE, EMPTY_SOURCE, new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://1:1@localhost:12345") - .put(Configuration.HTTPS_PROXY, "") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")); arguments.add(Arguments.of(true, envProxyWithAuthentication, defaultUri)); @@ -546,7 +544,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { = () -> baseJavaProxyConfigurationSupplier.get().put(JAVA_NON_PROXY_HOSTS, rawJavaNonProxyHosts); Supplier envNonProxyHostsSupplier = () -> new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://localhost:12345") - .put(Configuration.HTTPS_PROXY, "") .put(Configuration.NO_PROXY, rawEnvNonProxyHosts) .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"); List> nonProxyHostsSuppliers @@ -571,7 +568,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { = () -> javaNonProxyHostsSupplier.get().put(JAVA_HTTP_PROXY_USER, "1").put(JAVA_HTTP_PROXY_PASSWORD, "1"); Supplier authenticatedEnvNonProxyHostsSupplier = () -> new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://1:1@localhost:12345") - .put(Configuration.HTTPS_PROXY, "") .put(Configuration.NO_PROXY, rawEnvNonProxyHosts) .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"); List> authenticatedNonProxyHostsSuppliers diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/CHANGELOG.md b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/CHANGELOG.md index a25914ea325e..9ae73fc13810 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/CHANGELOG.md +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/CHANGELOG.md @@ -1,22 +1,5 @@ # Release History -## 1.1.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0 (2026-10-15) - -- Azure Resource Manager CloudHealth client library for Java. This package contains Microsoft Azure SDK for CloudHealth Management SDK. Package api-version 2026-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Other Changes -- First GA release. - ## 1.0.0-beta.5 (2026-09-25) - Azure Resource Manager CloudHealth client library for Java. This package contains Microsoft Azure SDK for CloudHealth Management SDK. Package api-version 2026-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/README.md b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/README.md index 15c4bfd57629..ba7190bf7a0f 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/README.md +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/README.md @@ -2,7 +2,7 @@ Azure Resource Manager CloudHealth client library for Java. -This package contains Microsoft Azure SDK for CloudHealth Management SDK. Package api-version 2026-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for CloudHealth Management SDK. Package api-version 2026-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-cloudhealth - 1.0.0 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/SAMPLE.md b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/SAMPLE.md index d486a2d1c117..77976f098dfa 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/SAMPLE.md +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/SAMPLE.md @@ -64,7 +64,7 @@ import com.azure.resourcemanager.cloudhealth.models.ManagedIdentityAuthenticatio */ public final class AuthenticationSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/AuthenticationSettings_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/AuthenticationSettings_CreateOrUpdate.json */ /** * Sample code: AuthenticationSettings_CreateOrUpdate. @@ -92,7 +92,7 @@ public final class AuthenticationSettingsCreateOrUpdateSamples { */ public final class AuthenticationSettingsDeleteSamples { /* - * x-ms-original-file: 2026-11-01/AuthenticationSettings_Delete.json + * x-ms-original-file: 2026-10-01-preview/AuthenticationSettings_Delete.json */ /** * Sample code: AuthenticationSettings_Delete. @@ -114,7 +114,7 @@ public final class AuthenticationSettingsDeleteSamples { */ public final class AuthenticationSettingsGetSamples { /* - * x-ms-original-file: 2026-11-01/AuthenticationSettings_Get.json + * x-ms-original-file: 2026-10-01-preview/AuthenticationSettings_Get.json */ /** * Sample code: AuthenticationSettings_Get. @@ -136,7 +136,7 @@ public final class AuthenticationSettingsGetSamples { */ public final class AuthenticationSettingsListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/AuthenticationSettings_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/AuthenticationSettings_ListByHealthModel.json */ /** * Sample code: AuthenticationSettings_ListByHealthModel. @@ -165,7 +165,7 @@ import com.azure.resourcemanager.cloudhealth.models.ResourceHealthAvailabilitySt */ public final class DiscoveryRulesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/DiscoveryRules_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/DiscoveryRules_CreateOrUpdate.json */ /** * Sample code: DiscoveryRules_CreateOrUpdate. @@ -196,7 +196,7 @@ public final class DiscoveryRulesCreateOrUpdateSamples { */ public final class DiscoveryRulesDeleteSamples { /* - * x-ms-original-file: 2026-11-01/DiscoveryRules_Delete.json + * x-ms-original-file: 2026-10-01-preview/DiscoveryRules_Delete.json */ /** * Sample code: DiscoveryRules_Delete. @@ -218,7 +218,7 @@ public final class DiscoveryRulesDeleteSamples { */ public final class DiscoveryRulesGetSamples { /* - * x-ms-original-file: 2026-11-01/DiscoveryRules_Get.json + * x-ms-original-file: 2026-10-01-preview/DiscoveryRules_Get.json */ /** * Sample code: DiscoveryRules_Get. @@ -241,7 +241,7 @@ public final class DiscoveryRulesGetSamples { */ public final class DiscoveryRulesListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/DiscoveryRules_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/DiscoveryRules_ListByHealthModel.json */ /** * Sample code: DiscoveryRules_ListByHealthModel. @@ -268,7 +268,7 @@ import java.util.Map; */ public final class EntitiesAddDataAnnotationSamples { /* - * x-ms-original-file: 2026-11-01/Entities_AddDataAnnotation.json + * x-ms-original-file: 2026-10-01-preview/Entities_AddDataAnnotation.json */ /** * Sample code: Entities_AddDataAnnotation. @@ -336,7 +336,7 @@ import java.util.Map; */ public final class EntitiesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/Entities_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/Entities_CreateOrUpdate.json */ /** * Sample code: Entities_CreateOrUpdate. @@ -480,7 +480,7 @@ public final class EntitiesCreateOrUpdateSamples { */ public final class EntitiesDeleteSamples { /* - * x-ms-original-file: 2026-11-01/Entities_Delete.json + * x-ms-original-file: 2026-10-01-preview/Entities_Delete.json */ /** * Sample code: Entities_Delete. @@ -502,7 +502,7 @@ public final class EntitiesDeleteSamples { */ public final class EntitiesGetSamples { /* - * x-ms-original-file: 2026-11-01/Entities_Get.json + * x-ms-original-file: 2026-10-01-preview/Entities_Get.json */ /** * Sample code: Entities_Get. @@ -527,7 +527,7 @@ import java.time.OffsetDateTime; */ public final class EntitiesGetDataAnnotationsSamples { /* - * x-ms-original-file: 2026-11-01/Entities_GetDataAnnotations.json + * x-ms-original-file: 2026-10-01-preview/Entities_GetDataAnnotations.json */ /** * Sample code: Entities_GetDataAnnotations. @@ -555,7 +555,7 @@ import java.time.OffsetDateTime; */ public final class EntitiesGetHistorySamples { /* - * x-ms-original-file: 2026-11-01/Entities_GetHistory.json + * x-ms-original-file: 2026-10-01-preview/Entities_GetHistory.json */ /** * Sample code: Entities_GetHistory. @@ -584,7 +584,7 @@ import java.time.OffsetDateTime; */ public final class EntitiesGetSignalHistorySamples { /* - * x-ms-original-file: 2026-11-01/Entities_GetSignalHistory.json + * x-ms-original-file: 2026-10-01-preview/Entities_GetSignalHistory.json */ /** * Sample code: Entities_GetSignalHistory. @@ -611,7 +611,7 @@ public final class EntitiesGetSignalHistorySamples { */ public final class EntitiesGetSignalRecommendationsSamples { /* - * x-ms-original-file: 2026-11-01/Entities_GetSignalRecommendations.json + * x-ms-original-file: 2026-10-01-preview/Entities_GetSignalRecommendations.json */ /** * Sample code: Entities_GetSignalRecommendations. @@ -641,7 +641,7 @@ import com.azure.resourcemanager.cloudhealth.models.ThresholdRuleV2; */ public final class EntitiesIngestHealthReportSamples { /* - * x-ms-original-file: 2026-11-01/Entities_IngestHealthReport.json + * x-ms-original-file: 2026-10-01-preview/Entities_IngestHealthReport.json */ /** * Sample code: Entities_IngestHealthReport. @@ -675,7 +675,7 @@ public final class EntitiesIngestHealthReportSamples { */ public final class EntitiesListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/Entities_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/Entities_ListByHealthModel.json */ /** * Sample code: Entities_ListByHealthModel. @@ -702,7 +702,7 @@ import java.util.Map; */ public final class HealthModelsCreateSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_Create.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_Create.json */ /** * Sample code: HealthModels_Create. @@ -742,7 +742,7 @@ public final class HealthModelsCreateSamples { */ public final class HealthModelsDeleteSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_Delete.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_Delete.json */ /** * Sample code: HealthModels_Delete. @@ -763,7 +763,7 @@ public final class HealthModelsDeleteSamples { */ public final class HealthModelsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_Get.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_Get.json */ /** * Sample code: HealthModels_Get. @@ -785,7 +785,7 @@ public final class HealthModelsGetByResourceGroupSamples { */ public final class HealthModelsListSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_ListBySubscription.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_ListBySubscription.json */ /** * Sample code: HealthModels_ListBySubscription. @@ -807,7 +807,7 @@ public final class HealthModelsListSamples { */ public final class HealthModelsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_ListByResourceGroup.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_ListByResourceGroup.json */ /** * Sample code: HealthModels_ListByResourceGroup. @@ -833,7 +833,7 @@ import java.util.Map; */ public final class HealthModelsUpdateSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_Update.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_Update.json */ /** * Sample code: HealthModels_Update. @@ -869,7 +869,7 @@ public final class HealthModelsUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-11-01/Operations_List.json + * x-ms-original-file: 2026-10-01-preview/Operations_List.json */ /** * Sample code: Operations_List. @@ -894,7 +894,7 @@ import java.util.Map; */ public final class RelationshipsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/Relationships_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/Relationships_CreateOrUpdate.json */ /** * Sample code: Relationships_CreateOrUpdate. @@ -934,7 +934,7 @@ public final class RelationshipsCreateOrUpdateSamples { */ public final class RelationshipsDeleteSamples { /* - * x-ms-original-file: 2026-11-01/Relationships_Delete.json + * x-ms-original-file: 2026-10-01-preview/Relationships_Delete.json */ /** * Sample code: Relationships_Delete. @@ -957,7 +957,7 @@ public final class RelationshipsDeleteSamples { */ public final class RelationshipsGetSamples { /* - * x-ms-original-file: 2026-11-01/Relationships_Get.json + * x-ms-original-file: 2026-10-01-preview/Relationships_Get.json */ /** * Sample code: Relationships_Get. @@ -981,7 +981,7 @@ public final class RelationshipsGetSamples { */ public final class RelationshipsListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/Relationships_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/Relationships_ListByHealthModel.json */ /** * Sample code: Relationships_ListByHealthModel. @@ -1014,7 +1014,7 @@ import java.util.Map; */ public final class SignalDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/SignalDefinitions_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/SignalDefinitions_CreateOrUpdate.json */ /** * Sample code: SignalDefinitions_CreateOrUpdate. @@ -1064,7 +1064,7 @@ public final class SignalDefinitionsCreateOrUpdateSamples { */ public final class SignalDefinitionsDeleteSamples { /* - * x-ms-original-file: 2026-11-01/SignalDefinitions_Delete.json + * x-ms-original-file: 2026-10-01-preview/SignalDefinitions_Delete.json */ /** * Sample code: SignalDefinitions_Delete. @@ -1086,7 +1086,7 @@ public final class SignalDefinitionsDeleteSamples { */ public final class SignalDefinitionsGetSamples { /* - * x-ms-original-file: 2026-11-01/SignalDefinitions_Get.json + * x-ms-original-file: 2026-10-01-preview/SignalDefinitions_Get.json */ /** * Sample code: SignalDefinitions_Get. @@ -1109,7 +1109,7 @@ public final class SignalDefinitionsGetSamples { */ public final class SignalDefinitionsListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/SignalDefinitions_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/SignalDefinitions_ListByHealthModel.json */ /** * Sample code: SignalDefinitions_ListByHealthModel. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/pom.xml b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/pom.xml index 9c411de44a02..bfd8b7193715 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/pom.xml +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-cloudhealth - 1.1.0-beta.1 + 1.0.0-beta.5 jar Microsoft Azure SDK for CloudHealth Management - This package contains Microsoft Azure SDK for CloudHealth Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2026-11-01. + This package contains Microsoft Azure SDK for CloudHealth Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2026-10-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthManagementClientImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthManagementClientImpl.java index d21e15cc1192..2436547391f9 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthManagementClientImpl.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthManagementClientImpl.java @@ -247,7 +247,7 @@ public DiscoveryRulesClient getDiscoveryRules() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-11-01"; + this.apiVersion = "2026-10-01-preview"; this.operations = new OperationsClientImpl(this); this.healthModels = new HealthModelsClientImpl(this); this.signalDefinitions = new SignalDefinitionsClientImpl(this); diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/resources/META-INF/azure-resourcemanager-cloudhealth_metadata.json b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/resources/META-INF/azure-resourcemanager-cloudhealth_metadata.json index c05dc7bcfa51..b6d79024054d 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/resources/META-INF/azure-resourcemanager-cloudhealth_metadata.json +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/resources/META-INF/azure-resourcemanager-cloudhealth_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.CloudHealth":"2026-11-01"},"crossLanguagePackageId":"Microsoft.CloudHealth","crossLanguageVersion":"720e8e1cbe68","crossLanguageDefinitions":{"com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient":"Microsoft.CloudHealth.AuthenticationSettings","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.beginCreateOrUpdate":"Microsoft.CloudHealth.AuthenticationSettings.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.beginDelete":"Microsoft.CloudHealth.AuthenticationSettings.delete","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.createOrUpdate":"Microsoft.CloudHealth.AuthenticationSettings.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.delete":"Microsoft.CloudHealth.AuthenticationSettings.delete","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.get":"Microsoft.CloudHealth.AuthenticationSettings.get","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.getWithResponse":"Microsoft.CloudHealth.AuthenticationSettings.get","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.listByHealthModel":"Microsoft.CloudHealth.AuthenticationSettings.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.CloudHealthManagementClient":"Microsoft.CloudHealth","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient":"Microsoft.CloudHealth.DiscoveryRules","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.beginCreateOrUpdate":"Microsoft.CloudHealth.DiscoveryRules.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.beginDelete":"Microsoft.CloudHealth.DiscoveryRules.delete","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.createOrUpdate":"Microsoft.CloudHealth.DiscoveryRules.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.delete":"Microsoft.CloudHealth.DiscoveryRules.delete","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.get":"Microsoft.CloudHealth.DiscoveryRules.get","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.getWithResponse":"Microsoft.CloudHealth.DiscoveryRules.get","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.listByHealthModel":"Microsoft.CloudHealth.DiscoveryRules.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient":"Microsoft.CloudHealth.Entities","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.addDataAnnotation":"Microsoft.CloudHealth.Entities.addDataAnnotation","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.addDataAnnotationWithResponse":"Microsoft.CloudHealth.Entities.addDataAnnotation","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.beginCreateOrUpdate":"Microsoft.CloudHealth.Entities.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.beginDelete":"Microsoft.CloudHealth.Entities.delete","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.createOrUpdate":"Microsoft.CloudHealth.Entities.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.delete":"Microsoft.CloudHealth.Entities.delete","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.get":"Microsoft.CloudHealth.Entities.get","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getDataAnnotations":"Microsoft.CloudHealth.Entities.getDataAnnotations","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getDataAnnotationsWithResponse":"Microsoft.CloudHealth.Entities.getDataAnnotations","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getHistory":"Microsoft.CloudHealth.Entities.getHistory","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getHistoryWithResponse":"Microsoft.CloudHealth.Entities.getHistory","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getSignalHistory":"Microsoft.CloudHealth.Entities.getSignalHistory","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getSignalHistoryWithResponse":"Microsoft.CloudHealth.Entities.getSignalHistory","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getSignalRecommendations":"Microsoft.CloudHealth.Entities.getSignalRecommendations","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getSignalRecommendationsWithResponse":"Microsoft.CloudHealth.Entities.getSignalRecommendations","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getWithResponse":"Microsoft.CloudHealth.Entities.get","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.ingestHealthReport":"Microsoft.CloudHealth.Entities.ingestHealthReport","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.ingestHealthReportWithResponse":"Microsoft.CloudHealth.Entities.ingestHealthReport","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.listByHealthModel":"Microsoft.CloudHealth.Entities.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient":"Microsoft.CloudHealth.HealthModels","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.beginCreate":"Microsoft.CloudHealth.HealthModels.create","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.beginDelete":"Microsoft.CloudHealth.HealthModels.delete","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.beginUpdate":"Microsoft.CloudHealth.HealthModels.update","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.create":"Microsoft.CloudHealth.HealthModels.create","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.delete":"Microsoft.CloudHealth.HealthModels.delete","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.getByResourceGroup":"Microsoft.CloudHealth.HealthModels.get","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.getByResourceGroupWithResponse":"Microsoft.CloudHealth.HealthModels.get","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.list":"Microsoft.CloudHealth.HealthModels.listBySubscription","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.listByResourceGroup":"Microsoft.CloudHealth.HealthModels.listByResourceGroup","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.update":"Microsoft.CloudHealth.HealthModels.update","com.azure.resourcemanager.cloudhealth.fluent.OperationsClient":"Microsoft.CloudHealth.Operations","com.azure.resourcemanager.cloudhealth.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient":"Microsoft.CloudHealth.Relationships","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.beginCreateOrUpdate":"Microsoft.CloudHealth.Relationships.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.beginDelete":"Microsoft.CloudHealth.Relationships.delete","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.createOrUpdate":"Microsoft.CloudHealth.Relationships.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.delete":"Microsoft.CloudHealth.Relationships.delete","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.get":"Microsoft.CloudHealth.Relationships.get","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.getWithResponse":"Microsoft.CloudHealth.Relationships.get","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.listByHealthModel":"Microsoft.CloudHealth.Relationships.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient":"Microsoft.CloudHealth.SignalDefinitions","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.beginCreateOrUpdate":"Microsoft.CloudHealth.SignalDefinitions.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.beginDelete":"Microsoft.CloudHealth.SignalDefinitions.delete","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.createOrUpdate":"Microsoft.CloudHealth.SignalDefinitions.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.delete":"Microsoft.CloudHealth.SignalDefinitions.delete","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.get":"Microsoft.CloudHealth.SignalDefinitions.get","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.getWithResponse":"Microsoft.CloudHealth.SignalDefinitions.get","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.listByHealthModel":"Microsoft.CloudHealth.SignalDefinitions.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.models.AuthenticationSettingInner":"Microsoft.CloudHealth.AuthenticationSetting","com.azure.resourcemanager.cloudhealth.fluent.models.DataAnnotationInner":"Microsoft.CloudHealth.DataAnnotation","com.azure.resourcemanager.cloudhealth.fluent.models.DiscoveryRuleInner":"Microsoft.CloudHealth.DiscoveryRule","com.azure.resourcemanager.cloudhealth.fluent.models.EntityHistoryResponseInner":"Microsoft.CloudHealth.EntityHistoryResponse","com.azure.resourcemanager.cloudhealth.fluent.models.EntityInner":"Microsoft.CloudHealth.Entity","com.azure.resourcemanager.cloudhealth.fluent.models.GetDataAnnotationsResponseInner":"Microsoft.CloudHealth.GetDataAnnotationsResponse","com.azure.resourcemanager.cloudhealth.fluent.models.GetSignalRecommendationsResponseInner":"Microsoft.CloudHealth.GetSignalRecommendationsResponse","com.azure.resourcemanager.cloudhealth.fluent.models.HealthModelInner":"Microsoft.CloudHealth.HealthModel","com.azure.resourcemanager.cloudhealth.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.cloudhealth.fluent.models.RelationshipInner":"Microsoft.CloudHealth.Relationship","com.azure.resourcemanager.cloudhealth.fluent.models.SignalDefinitionInner":"Microsoft.CloudHealth.SignalDefinition","com.azure.resourcemanager.cloudhealth.fluent.models.SignalHistoryResponseInner":"Microsoft.CloudHealth.SignalHistoryResponse","com.azure.resourcemanager.cloudhealth.implementation.CloudHealthManagementClientBuilder":"Microsoft.CloudHealth","com.azure.resourcemanager.cloudhealth.implementation.models.AuthenticationSettingListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.DiscoveryRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.EntityListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.HealthModelListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.cloudhealth.implementation.models.RelationshipListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.SignalDefinitionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.cloudhealth.models.AddDataAnnotationRequest":"Microsoft.CloudHealth.AddDataAnnotationRequest","com.azure.resourcemanager.cloudhealth.models.AggregationType":"Microsoft.CloudHealth.AggregationType","com.azure.resourcemanager.cloudhealth.models.AggregationUnit":"Microsoft.CloudHealth.AggregationUnit","com.azure.resourcemanager.cloudhealth.models.AlertConfiguration":"Microsoft.CloudHealth.AlertConfiguration","com.azure.resourcemanager.cloudhealth.models.AlertSeverity":"Microsoft.CloudHealth.AlertSeverity","com.azure.resourcemanager.cloudhealth.models.ApplicationInsightsTopologySpecification":"Microsoft.CloudHealth.ApplicationInsightsTopologySpecification","com.azure.resourcemanager.cloudhealth.models.AuthenticationKind":"Microsoft.CloudHealth.AuthenticationKind","com.azure.resourcemanager.cloudhealth.models.AuthenticationSettingProperties":"Microsoft.CloudHealth.AuthenticationSettingProperties","com.azure.resourcemanager.cloudhealth.models.AzureMonitorWorkspaceSignals":"Microsoft.CloudHealth.AzureMonitorWorkspaceSignals","com.azure.resourcemanager.cloudhealth.models.AzureResourceHealthSignal":"Microsoft.CloudHealth.AzureResourceHealthSignal","com.azure.resourcemanager.cloudhealth.models.AzureResourceHealthSignalStatus":"Microsoft.CloudHealth.AzureResourceHealthSignalStatus","com.azure.resourcemanager.cloudhealth.models.AzureResourceMetricRecommendationConfiguration":"Microsoft.CloudHealth.AzureResourceMetricRecommendationConfiguration","com.azure.resourcemanager.cloudhealth.models.AzureResourceSignal":"Microsoft.CloudHealth.AzureResourceSignal","com.azure.resourcemanager.cloudhealth.models.AzureResourceSignals":"Microsoft.CloudHealth.AzureResourceSignals","com.azure.resourcemanager.cloudhealth.models.DependenciesSignalGroupV2":"Microsoft.CloudHealth.DependenciesSignalGroupV2","com.azure.resourcemanager.cloudhealth.models.DiscoveryError":"Microsoft.CloudHealth.DiscoveryError","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleKind":"Microsoft.CloudHealth.DiscoveryRuleKind","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleProperties":"Microsoft.CloudHealth.DiscoveryRuleProperties","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleRecommendedSignalsBehavior":"Microsoft.CloudHealth.DiscoveryRuleRecommendedSignalsBehavior","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleRelationshipDiscoveryBehavior":"Microsoft.CloudHealth.DiscoveryRuleRelationshipDiscoveryBehavior","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleSpecification":"Microsoft.CloudHealth.DiscoveryRuleSpecification","com.azure.resourcemanager.cloudhealth.models.DynamicThresholdSensitivity":"Microsoft.CloudHealth.DynamicThresholdSensitivity","com.azure.resourcemanager.cloudhealth.models.EntityAlerts":"Microsoft.CloudHealth.EntityAlerts","com.azure.resourcemanager.cloudhealth.models.EntityCoordinates":"Microsoft.CloudHealth.EntityCoordinates","com.azure.resourcemanager.cloudhealth.models.EntityHistoryRequest":"Microsoft.CloudHealth.EntityHistoryRequest","com.azure.resourcemanager.cloudhealth.models.EntityImpact":"Microsoft.CloudHealth.EntityImpact","com.azure.resourcemanager.cloudhealth.models.EntityProperties":"Microsoft.CloudHealth.EntityProperties","com.azure.resourcemanager.cloudhealth.models.EvaluationRule":"Microsoft.CloudHealth.EvaluationRule","com.azure.resourcemanager.cloudhealth.models.ExternalSignal":"Microsoft.CloudHealth.ExternalSignal","com.azure.resourcemanager.cloudhealth.models.ExternalSignalGroup":"Microsoft.CloudHealth.ExternalSignalGroup","com.azure.resourcemanager.cloudhealth.models.GetDataAnnotationsRequest":"Microsoft.CloudHealth.GetDataAnnotationsRequest","com.azure.resourcemanager.cloudhealth.models.HealthModelProperties":"Microsoft.CloudHealth.HealthModelProperties","com.azure.resourcemanager.cloudhealth.models.HealthModelProvisioningState":"Microsoft.CloudHealth.HealthModelProvisioningState","com.azure.resourcemanager.cloudhealth.models.HealthModelUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.cloudhealth.models.HealthReportEvaluationRule":"Microsoft.CloudHealth.HealthReportEvaluationRule","com.azure.resourcemanager.cloudhealth.models.HealthReportRequest":"Microsoft.CloudHealth.HealthReportRequest","com.azure.resourcemanager.cloudhealth.models.HealthState":"Microsoft.CloudHealth.HealthState","com.azure.resourcemanager.cloudhealth.models.HealthStateTransition":"Microsoft.CloudHealth.HealthStateTransition","com.azure.resourcemanager.cloudhealth.models.IconDefinition":"Microsoft.CloudHealth.IconDefinition","com.azure.resourcemanager.cloudhealth.models.LogAnalyticsQueryRecommendationConfiguration":"Microsoft.CloudHealth.LogAnalyticsQueryRecommendationConfiguration","com.azure.resourcemanager.cloudhealth.models.LogAnalyticsQuerySignalDefinitionProperties":"Microsoft.CloudHealth.LogAnalyticsQuerySignalDefinitionProperties","com.azure.resourcemanager.cloudhealth.models.LogAnalyticsSignal":"Microsoft.CloudHealth.LogAnalyticsSignal","com.azure.resourcemanager.cloudhealth.models.LogAnalyticsSignals":"Microsoft.CloudHealth.LogAnalyticsSignals","com.azure.resourcemanager.cloudhealth.models.ManagedIdentityAuthenticationSettingProperties":"Microsoft.CloudHealth.ManagedIdentityAuthenticationSettingProperties","com.azure.resourcemanager.cloudhealth.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.cloudhealth.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.cloudhealth.models.MetricAggregationType":"Microsoft.CloudHealth.MetricAggregationType","com.azure.resourcemanager.cloudhealth.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.cloudhealth.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.cloudhealth.models.PrometheusMetricsRecommendationConfiguration":"Microsoft.CloudHealth.PrometheusMetricsRecommendationConfiguration","com.azure.resourcemanager.cloudhealth.models.PrometheusMetricsSignal":"Microsoft.CloudHealth.PrometheusMetricsSignal","com.azure.resourcemanager.cloudhealth.models.PrometheusMetricsSignalDefinitionProperties":"Microsoft.CloudHealth.PrometheusMetricsSignalDefinitionProperties","com.azure.resourcemanager.cloudhealth.models.RefreshInterval":"Microsoft.CloudHealth.RefreshInterval","com.azure.resourcemanager.cloudhealth.models.RelationshipProperties":"Microsoft.CloudHealth.RelationshipProperties","com.azure.resourcemanager.cloudhealth.models.ResourceGraphQuerySpecification":"Microsoft.CloudHealth.ResourceGraphQuerySpecification","com.azure.resourcemanager.cloudhealth.models.ResourceHealthAvailabilityState":"Microsoft.CloudHealth.ResourceHealthAvailabilityState","com.azure.resourcemanager.cloudhealth.models.ResourceHealthAvailabilityStateSignalBehavior":"Microsoft.CloudHealth.ResourceHealthAvailabilityStateSignalBehavior","com.azure.resourcemanager.cloudhealth.models.ResourceHealthCategory":"Microsoft.CloudHealth.ResourceHealthCategory","com.azure.resourcemanager.cloudhealth.models.ResourceHealthReasonChronicity":"Microsoft.CloudHealth.ResourceHealthReasonChronicity","com.azure.resourcemanager.cloudhealth.models.ResourceHealthReasonType":"Microsoft.CloudHealth.ResourceHealthReasonType","com.azure.resourcemanager.cloudhealth.models.ResourceMetricSignalDefinitionProperties":"Microsoft.CloudHealth.ResourceMetricSignalDefinitionProperties","com.azure.resourcemanager.cloudhealth.models.SignalAggregationGroup":"Microsoft.CloudHealth.SignalAggregationGroup","com.azure.resourcemanager.cloudhealth.models.SignalConfiguration":"Microsoft.CloudHealth.SignalConfiguration","com.azure.resourcemanager.cloudhealth.models.SignalDefinitionProperties":"Microsoft.CloudHealth.SignalDefinitionProperties","com.azure.resourcemanager.cloudhealth.models.SignalGroups":"Microsoft.CloudHealth.SignalGroups","com.azure.resourcemanager.cloudhealth.models.SignalHistoryDataPoint":"Microsoft.CloudHealth.SignalHistoryDataPoint","com.azure.resourcemanager.cloudhealth.models.SignalHistoryRequest":"Microsoft.CloudHealth.SignalHistoryRequest","com.azure.resourcemanager.cloudhealth.models.SignalInstanceProperties":"Microsoft.CloudHealth.SignalInstanceProperties","com.azure.resourcemanager.cloudhealth.models.SignalKind":"Microsoft.CloudHealth.SignalKind","com.azure.resourcemanager.cloudhealth.models.SignalOperator":"Microsoft.CloudHealth.SignalOperator","com.azure.resourcemanager.cloudhealth.models.SignalRecommendationConfiguration":"Microsoft.CloudHealth.SignalRecommendationConfiguration","com.azure.resourcemanager.cloudhealth.models.SignalRecommendationKind":"Microsoft.CloudHealth.SignalRecommendationKind","com.azure.resourcemanager.cloudhealth.models.SignalStatus":"Microsoft.CloudHealth.SignalStatus","com.azure.resourcemanager.cloudhealth.models.ThresholdRuleV2":"Microsoft.CloudHealth.ThresholdRuleV2","com.azure.resourcemanager.cloudhealth.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity"},"generatedFiles":["src/main/java/com/azure/resourcemanager/cloudhealth/CloudHealthManager.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/AuthenticationSettingsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/CloudHealthManagementClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/DiscoveryRulesClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/EntitiesClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/HealthModelsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/RelationshipsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/SignalDefinitionsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/AuthenticationSettingInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/DataAnnotationInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/DiscoveryRuleInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/EntityHistoryResponseInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/EntityInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/GetDataAnnotationsResponseInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/GetSignalRecommendationsResponseInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/HealthModelInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/RelationshipInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/SignalDefinitionInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/SignalHistoryResponseInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/package-info.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthManagementClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DataAnnotationImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRuleImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntityHistoryResponseImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntityImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/GetDataAnnotationsResponseImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/GetSignalRecommendationsResponseImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/RelationshipImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/RelationshipsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/RelationshipsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/SignalDefinitionImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/SignalDefinitionsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/SignalDefinitionsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/SignalHistoryResponseImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/AuthenticationSettingListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/DiscoveryRuleListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/EntityListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/HealthModelListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/RelationshipListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/SignalDefinitionListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/package-info.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ActionType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AddDataAnnotationRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AggregationType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AggregationUnit.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AlertConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AlertSeverity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ApplicationInsightsTopologySpecification.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AuthenticationKind.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AuthenticationSetting.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AuthenticationSettingProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AuthenticationSettings.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureMonitorWorkspaceSignals.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceHealthSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceHealthSignalStatus.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceMetricRecommendationConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceSignals.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DataAnnotation.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DependenciesSignalGroupV2.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryError.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRule.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleKind.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleRecommendedSignalsBehavior.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleRelationshipDiscoveryBehavior.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleSpecification.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRules.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DynamicThresholdSensitivity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Entities.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Entity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityAlerts.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityCoordinates.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityHistoryRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityHistoryResponse.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityImpact.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EvaluationRule.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ExternalSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ExternalSignalGroup.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/GetDataAnnotationsRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/GetDataAnnotationsResponse.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/GetSignalRecommendationsResponse.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModel.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModelProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModelProvisioningState.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModelUpdate.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModels.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthReportEvaluationRule.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthReportRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthState.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthStateTransition.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/IconDefinition.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/LogAnalyticsQueryRecommendationConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/LogAnalyticsQuerySignalDefinitionProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/LogAnalyticsSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/LogAnalyticsSignals.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ManagedIdentityAuthenticationSettingProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Operation.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Operations.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Origin.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/PrometheusMetricsRecommendationConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/PrometheusMetricsSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/PrometheusMetricsSignalDefinitionProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/RefreshInterval.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Relationship.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/RelationshipProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Relationships.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceGraphQuerySpecification.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthAvailabilityState.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthAvailabilityStateSignalBehavior.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthCategory.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthReasonChronicity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthReasonType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceMetricSignalDefinitionProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalAggregationGroup.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalDefinition.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalDefinitionProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalDefinitions.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalGroups.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalHistoryDataPoint.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalHistoryRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalHistoryResponse.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalInstanceProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalKind.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalOperator.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalRecommendationConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalRecommendationKind.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalStatus.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ThresholdRuleV2.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/package-info.java","src/main/java/com/azure/resourcemanager/cloudhealth/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.CloudHealth":"2026-10-01-preview"},"crossLanguagePackageId":"Microsoft.CloudHealth","crossLanguageVersion":"8abc309e1be4","crossLanguageDefinitions":{"com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient":"Microsoft.CloudHealth.AuthenticationSettings","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.beginCreateOrUpdate":"Microsoft.CloudHealth.AuthenticationSettings.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.beginDelete":"Microsoft.CloudHealth.AuthenticationSettings.delete","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.createOrUpdate":"Microsoft.CloudHealth.AuthenticationSettings.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.delete":"Microsoft.CloudHealth.AuthenticationSettings.delete","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.get":"Microsoft.CloudHealth.AuthenticationSettings.get","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.getWithResponse":"Microsoft.CloudHealth.AuthenticationSettings.get","com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient.listByHealthModel":"Microsoft.CloudHealth.AuthenticationSettings.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.CloudHealthManagementClient":"Microsoft.CloudHealth","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient":"Microsoft.CloudHealth.DiscoveryRules","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.beginCreateOrUpdate":"Microsoft.CloudHealth.DiscoveryRules.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.beginDelete":"Microsoft.CloudHealth.DiscoveryRules.delete","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.createOrUpdate":"Microsoft.CloudHealth.DiscoveryRules.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.delete":"Microsoft.CloudHealth.DiscoveryRules.delete","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.get":"Microsoft.CloudHealth.DiscoveryRules.get","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.getWithResponse":"Microsoft.CloudHealth.DiscoveryRules.get","com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient.listByHealthModel":"Microsoft.CloudHealth.DiscoveryRules.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient":"Microsoft.CloudHealth.Entities","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.addDataAnnotation":"Microsoft.CloudHealth.Entities.addDataAnnotation","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.addDataAnnotationWithResponse":"Microsoft.CloudHealth.Entities.addDataAnnotation","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.beginCreateOrUpdate":"Microsoft.CloudHealth.Entities.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.beginDelete":"Microsoft.CloudHealth.Entities.delete","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.createOrUpdate":"Microsoft.CloudHealth.Entities.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.delete":"Microsoft.CloudHealth.Entities.delete","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.get":"Microsoft.CloudHealth.Entities.get","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getDataAnnotations":"Microsoft.CloudHealth.Entities.getDataAnnotations","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getDataAnnotationsWithResponse":"Microsoft.CloudHealth.Entities.getDataAnnotations","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getHistory":"Microsoft.CloudHealth.Entities.getHistory","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getHistoryWithResponse":"Microsoft.CloudHealth.Entities.getHistory","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getSignalHistory":"Microsoft.CloudHealth.Entities.getSignalHistory","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getSignalHistoryWithResponse":"Microsoft.CloudHealth.Entities.getSignalHistory","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getSignalRecommendations":"Microsoft.CloudHealth.Entities.getSignalRecommendations","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getSignalRecommendationsWithResponse":"Microsoft.CloudHealth.Entities.getSignalRecommendations","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.getWithResponse":"Microsoft.CloudHealth.Entities.get","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.ingestHealthReport":"Microsoft.CloudHealth.Entities.ingestHealthReport","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.ingestHealthReportWithResponse":"Microsoft.CloudHealth.Entities.ingestHealthReport","com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient.listByHealthModel":"Microsoft.CloudHealth.Entities.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient":"Microsoft.CloudHealth.HealthModels","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.beginCreate":"Microsoft.CloudHealth.HealthModels.create","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.beginDelete":"Microsoft.CloudHealth.HealthModels.delete","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.beginUpdate":"Microsoft.CloudHealth.HealthModels.update","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.create":"Microsoft.CloudHealth.HealthModels.create","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.delete":"Microsoft.CloudHealth.HealthModels.delete","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.getByResourceGroup":"Microsoft.CloudHealth.HealthModels.get","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.getByResourceGroupWithResponse":"Microsoft.CloudHealth.HealthModels.get","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.list":"Microsoft.CloudHealth.HealthModels.listBySubscription","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.listByResourceGroup":"Microsoft.CloudHealth.HealthModels.listByResourceGroup","com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient.update":"Microsoft.CloudHealth.HealthModels.update","com.azure.resourcemanager.cloudhealth.fluent.OperationsClient":"Microsoft.CloudHealth.Operations","com.azure.resourcemanager.cloudhealth.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient":"Microsoft.CloudHealth.Relationships","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.beginCreateOrUpdate":"Microsoft.CloudHealth.Relationships.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.beginDelete":"Microsoft.CloudHealth.Relationships.delete","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.createOrUpdate":"Microsoft.CloudHealth.Relationships.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.delete":"Microsoft.CloudHealth.Relationships.delete","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.get":"Microsoft.CloudHealth.Relationships.get","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.getWithResponse":"Microsoft.CloudHealth.Relationships.get","com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient.listByHealthModel":"Microsoft.CloudHealth.Relationships.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient":"Microsoft.CloudHealth.SignalDefinitions","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.beginCreateOrUpdate":"Microsoft.CloudHealth.SignalDefinitions.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.beginDelete":"Microsoft.CloudHealth.SignalDefinitions.delete","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.createOrUpdate":"Microsoft.CloudHealth.SignalDefinitions.createOrUpdate","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.delete":"Microsoft.CloudHealth.SignalDefinitions.delete","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.get":"Microsoft.CloudHealth.SignalDefinitions.get","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.getWithResponse":"Microsoft.CloudHealth.SignalDefinitions.get","com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient.listByHealthModel":"Microsoft.CloudHealth.SignalDefinitions.listByHealthModel","com.azure.resourcemanager.cloudhealth.fluent.models.AuthenticationSettingInner":"Microsoft.CloudHealth.AuthenticationSetting","com.azure.resourcemanager.cloudhealth.fluent.models.DataAnnotationInner":"Microsoft.CloudHealth.DataAnnotation","com.azure.resourcemanager.cloudhealth.fluent.models.DiscoveryRuleInner":"Microsoft.CloudHealth.DiscoveryRule","com.azure.resourcemanager.cloudhealth.fluent.models.EntityHistoryResponseInner":"Microsoft.CloudHealth.EntityHistoryResponse","com.azure.resourcemanager.cloudhealth.fluent.models.EntityInner":"Microsoft.CloudHealth.Entity","com.azure.resourcemanager.cloudhealth.fluent.models.GetDataAnnotationsResponseInner":"Microsoft.CloudHealth.GetDataAnnotationsResponse","com.azure.resourcemanager.cloudhealth.fluent.models.GetSignalRecommendationsResponseInner":"Microsoft.CloudHealth.GetSignalRecommendationsResponse","com.azure.resourcemanager.cloudhealth.fluent.models.HealthModelInner":"Microsoft.CloudHealth.HealthModel","com.azure.resourcemanager.cloudhealth.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.cloudhealth.fluent.models.RelationshipInner":"Microsoft.CloudHealth.Relationship","com.azure.resourcemanager.cloudhealth.fluent.models.SignalDefinitionInner":"Microsoft.CloudHealth.SignalDefinition","com.azure.resourcemanager.cloudhealth.fluent.models.SignalHistoryResponseInner":"Microsoft.CloudHealth.SignalHistoryResponse","com.azure.resourcemanager.cloudhealth.implementation.CloudHealthManagementClientBuilder":"Microsoft.CloudHealth","com.azure.resourcemanager.cloudhealth.implementation.models.AuthenticationSettingListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.DiscoveryRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.EntityListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.HealthModelListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.cloudhealth.implementation.models.RelationshipListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.implementation.models.SignalDefinitionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.cloudhealth.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.cloudhealth.models.AddDataAnnotationRequest":"Microsoft.CloudHealth.AddDataAnnotationRequest","com.azure.resourcemanager.cloudhealth.models.AggregationType":"Microsoft.CloudHealth.AggregationType","com.azure.resourcemanager.cloudhealth.models.AggregationUnit":"Microsoft.CloudHealth.AggregationUnit","com.azure.resourcemanager.cloudhealth.models.AlertConfiguration":"Microsoft.CloudHealth.AlertConfiguration","com.azure.resourcemanager.cloudhealth.models.AlertSeverity":"Microsoft.CloudHealth.AlertSeverity","com.azure.resourcemanager.cloudhealth.models.ApplicationInsightsTopologySpecification":"Microsoft.CloudHealth.ApplicationInsightsTopologySpecification","com.azure.resourcemanager.cloudhealth.models.AuthenticationKind":"Microsoft.CloudHealth.AuthenticationKind","com.azure.resourcemanager.cloudhealth.models.AuthenticationSettingProperties":"Microsoft.CloudHealth.AuthenticationSettingProperties","com.azure.resourcemanager.cloudhealth.models.AzureMonitorWorkspaceSignals":"Microsoft.CloudHealth.AzureMonitorWorkspaceSignals","com.azure.resourcemanager.cloudhealth.models.AzureResourceHealthSignal":"Microsoft.CloudHealth.AzureResourceHealthSignal","com.azure.resourcemanager.cloudhealth.models.AzureResourceHealthSignalStatus":"Microsoft.CloudHealth.AzureResourceHealthSignalStatus","com.azure.resourcemanager.cloudhealth.models.AzureResourceMetricRecommendationConfiguration":"Microsoft.CloudHealth.AzureResourceMetricRecommendationConfiguration","com.azure.resourcemanager.cloudhealth.models.AzureResourceSignal":"Microsoft.CloudHealth.AzureResourceSignal","com.azure.resourcemanager.cloudhealth.models.AzureResourceSignals":"Microsoft.CloudHealth.AzureResourceSignals","com.azure.resourcemanager.cloudhealth.models.DependenciesSignalGroupV2":"Microsoft.CloudHealth.DependenciesSignalGroupV2","com.azure.resourcemanager.cloudhealth.models.DiscoveryError":"Microsoft.CloudHealth.DiscoveryError","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleKind":"Microsoft.CloudHealth.DiscoveryRuleKind","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleProperties":"Microsoft.CloudHealth.DiscoveryRuleProperties","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleRecommendedSignalsBehavior":"Microsoft.CloudHealth.DiscoveryRuleRecommendedSignalsBehavior","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleRelationshipDiscoveryBehavior":"Microsoft.CloudHealth.DiscoveryRuleRelationshipDiscoveryBehavior","com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleSpecification":"Microsoft.CloudHealth.DiscoveryRuleSpecification","com.azure.resourcemanager.cloudhealth.models.DynamicThresholdSensitivity":"Microsoft.CloudHealth.DynamicThresholdSensitivity","com.azure.resourcemanager.cloudhealth.models.EntityAlerts":"Microsoft.CloudHealth.EntityAlerts","com.azure.resourcemanager.cloudhealth.models.EntityCoordinates":"Microsoft.CloudHealth.EntityCoordinates","com.azure.resourcemanager.cloudhealth.models.EntityHistoryRequest":"Microsoft.CloudHealth.EntityHistoryRequest","com.azure.resourcemanager.cloudhealth.models.EntityImpact":"Microsoft.CloudHealth.EntityImpact","com.azure.resourcemanager.cloudhealth.models.EntityProperties":"Microsoft.CloudHealth.EntityProperties","com.azure.resourcemanager.cloudhealth.models.EvaluationRule":"Microsoft.CloudHealth.EvaluationRule","com.azure.resourcemanager.cloudhealth.models.ExternalSignal":"Microsoft.CloudHealth.ExternalSignal","com.azure.resourcemanager.cloudhealth.models.ExternalSignalGroup":"Microsoft.CloudHealth.ExternalSignalGroup","com.azure.resourcemanager.cloudhealth.models.GetDataAnnotationsRequest":"Microsoft.CloudHealth.GetDataAnnotationsRequest","com.azure.resourcemanager.cloudhealth.models.HealthModelProperties":"Microsoft.CloudHealth.HealthModelProperties","com.azure.resourcemanager.cloudhealth.models.HealthModelProvisioningState":"Microsoft.CloudHealth.HealthModelProvisioningState","com.azure.resourcemanager.cloudhealth.models.HealthModelUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.cloudhealth.models.HealthReportEvaluationRule":"Microsoft.CloudHealth.HealthReportEvaluationRule","com.azure.resourcemanager.cloudhealth.models.HealthReportRequest":"Microsoft.CloudHealth.HealthReportRequest","com.azure.resourcemanager.cloudhealth.models.HealthState":"Microsoft.CloudHealth.HealthState","com.azure.resourcemanager.cloudhealth.models.HealthStateTransition":"Microsoft.CloudHealth.HealthStateTransition","com.azure.resourcemanager.cloudhealth.models.IconDefinition":"Microsoft.CloudHealth.IconDefinition","com.azure.resourcemanager.cloudhealth.models.LogAnalyticsQueryRecommendationConfiguration":"Microsoft.CloudHealth.LogAnalyticsQueryRecommendationConfiguration","com.azure.resourcemanager.cloudhealth.models.LogAnalyticsQuerySignalDefinitionProperties":"Microsoft.CloudHealth.LogAnalyticsQuerySignalDefinitionProperties","com.azure.resourcemanager.cloudhealth.models.LogAnalyticsSignal":"Microsoft.CloudHealth.LogAnalyticsSignal","com.azure.resourcemanager.cloudhealth.models.LogAnalyticsSignals":"Microsoft.CloudHealth.LogAnalyticsSignals","com.azure.resourcemanager.cloudhealth.models.ManagedIdentityAuthenticationSettingProperties":"Microsoft.CloudHealth.ManagedIdentityAuthenticationSettingProperties","com.azure.resourcemanager.cloudhealth.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.cloudhealth.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.cloudhealth.models.MetricAggregationType":"Microsoft.CloudHealth.MetricAggregationType","com.azure.resourcemanager.cloudhealth.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.cloudhealth.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.cloudhealth.models.PrometheusMetricsRecommendationConfiguration":"Microsoft.CloudHealth.PrometheusMetricsRecommendationConfiguration","com.azure.resourcemanager.cloudhealth.models.PrometheusMetricsSignal":"Microsoft.CloudHealth.PrometheusMetricsSignal","com.azure.resourcemanager.cloudhealth.models.PrometheusMetricsSignalDefinitionProperties":"Microsoft.CloudHealth.PrometheusMetricsSignalDefinitionProperties","com.azure.resourcemanager.cloudhealth.models.RefreshInterval":"Microsoft.CloudHealth.RefreshInterval","com.azure.resourcemanager.cloudhealth.models.RelationshipProperties":"Microsoft.CloudHealth.RelationshipProperties","com.azure.resourcemanager.cloudhealth.models.ResourceGraphQuerySpecification":"Microsoft.CloudHealth.ResourceGraphQuerySpecification","com.azure.resourcemanager.cloudhealth.models.ResourceHealthAvailabilityState":"Microsoft.CloudHealth.ResourceHealthAvailabilityState","com.azure.resourcemanager.cloudhealth.models.ResourceHealthAvailabilityStateSignalBehavior":"Microsoft.CloudHealth.ResourceHealthAvailabilityStateSignalBehavior","com.azure.resourcemanager.cloudhealth.models.ResourceHealthCategory":"Microsoft.CloudHealth.ResourceHealthCategory","com.azure.resourcemanager.cloudhealth.models.ResourceHealthReasonChronicity":"Microsoft.CloudHealth.ResourceHealthReasonChronicity","com.azure.resourcemanager.cloudhealth.models.ResourceHealthReasonType":"Microsoft.CloudHealth.ResourceHealthReasonType","com.azure.resourcemanager.cloudhealth.models.ResourceMetricSignalDefinitionProperties":"Microsoft.CloudHealth.ResourceMetricSignalDefinitionProperties","com.azure.resourcemanager.cloudhealth.models.SignalAggregationGroup":"Microsoft.CloudHealth.SignalAggregationGroup","com.azure.resourcemanager.cloudhealth.models.SignalConfiguration":"Microsoft.CloudHealth.SignalConfiguration","com.azure.resourcemanager.cloudhealth.models.SignalDefinitionProperties":"Microsoft.CloudHealth.SignalDefinitionProperties","com.azure.resourcemanager.cloudhealth.models.SignalGroups":"Microsoft.CloudHealth.SignalGroups","com.azure.resourcemanager.cloudhealth.models.SignalHistoryDataPoint":"Microsoft.CloudHealth.SignalHistoryDataPoint","com.azure.resourcemanager.cloudhealth.models.SignalHistoryRequest":"Microsoft.CloudHealth.SignalHistoryRequest","com.azure.resourcemanager.cloudhealth.models.SignalInstanceProperties":"Microsoft.CloudHealth.SignalInstanceProperties","com.azure.resourcemanager.cloudhealth.models.SignalKind":"Microsoft.CloudHealth.SignalKind","com.azure.resourcemanager.cloudhealth.models.SignalOperator":"Microsoft.CloudHealth.SignalOperator","com.azure.resourcemanager.cloudhealth.models.SignalRecommendationConfiguration":"Microsoft.CloudHealth.SignalRecommendationConfiguration","com.azure.resourcemanager.cloudhealth.models.SignalRecommendationKind":"Microsoft.CloudHealth.SignalRecommendationKind","com.azure.resourcemanager.cloudhealth.models.SignalStatus":"Microsoft.CloudHealth.SignalStatus","com.azure.resourcemanager.cloudhealth.models.ThresholdRuleV2":"Microsoft.CloudHealth.ThresholdRuleV2","com.azure.resourcemanager.cloudhealth.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity"},"generatedFiles":["src/main/java/com/azure/resourcemanager/cloudhealth/CloudHealthManager.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/AuthenticationSettingsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/CloudHealthManagementClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/DiscoveryRulesClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/EntitiesClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/HealthModelsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/RelationshipsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/SignalDefinitionsClient.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/AuthenticationSettingInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/DataAnnotationInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/DiscoveryRuleInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/EntityHistoryResponseInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/EntityInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/GetDataAnnotationsResponseInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/GetSignalRecommendationsResponseInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/HealthModelInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/RelationshipInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/SignalDefinitionInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/SignalHistoryResponseInner.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/cloudhealth/fluent/package-info.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthManagementClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DataAnnotationImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRuleImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntityHistoryResponseImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntityImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/GetDataAnnotationsResponseImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/GetSignalRecommendationsResponseImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/RelationshipImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/RelationshipsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/RelationshipsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/SignalDefinitionImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/SignalDefinitionsClientImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/SignalDefinitionsImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/SignalHistoryResponseImpl.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/AuthenticationSettingListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/DiscoveryRuleListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/EntityListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/HealthModelListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/RelationshipListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/models/SignalDefinitionListResult.java","src/main/java/com/azure/resourcemanager/cloudhealth/implementation/package-info.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ActionType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AddDataAnnotationRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AggregationType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AggregationUnit.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AlertConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AlertSeverity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ApplicationInsightsTopologySpecification.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AuthenticationKind.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AuthenticationSetting.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AuthenticationSettingProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AuthenticationSettings.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureMonitorWorkspaceSignals.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceHealthSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceHealthSignalStatus.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceMetricRecommendationConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/AzureResourceSignals.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DataAnnotation.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DependenciesSignalGroupV2.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryError.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRule.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleKind.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleRecommendedSignalsBehavior.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleRelationshipDiscoveryBehavior.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRuleSpecification.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DiscoveryRules.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/DynamicThresholdSensitivity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Entities.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Entity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityAlerts.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityCoordinates.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityHistoryRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityHistoryResponse.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityImpact.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EntityProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/EvaluationRule.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ExternalSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ExternalSignalGroup.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/GetDataAnnotationsRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/GetDataAnnotationsResponse.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/GetSignalRecommendationsResponse.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModel.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModelProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModelProvisioningState.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModelUpdate.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthModels.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthReportEvaluationRule.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthReportRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthState.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/HealthStateTransition.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/IconDefinition.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/LogAnalyticsQueryRecommendationConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/LogAnalyticsQuerySignalDefinitionProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/LogAnalyticsSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/LogAnalyticsSignals.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ManagedIdentityAuthenticationSettingProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Operation.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Operations.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Origin.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/PrometheusMetricsRecommendationConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/PrometheusMetricsSignal.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/PrometheusMetricsSignalDefinitionProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/RefreshInterval.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Relationship.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/RelationshipProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/Relationships.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceGraphQuerySpecification.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthAvailabilityState.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthAvailabilityStateSignalBehavior.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthCategory.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthReasonChronicity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceHealthReasonType.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ResourceMetricSignalDefinitionProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalAggregationGroup.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalDefinition.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalDefinitionProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalDefinitions.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalGroups.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalHistoryDataPoint.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalHistoryRequest.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalHistoryResponse.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalInstanceProperties.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalKind.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalOperator.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalRecommendationConfiguration.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalRecommendationKind.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/SignalStatus.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/ThresholdRuleV2.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/cloudhealth/models/package-info.java","src/main/java/com/azure/resourcemanager/cloudhealth/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsCreateOrUpdateSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsCreateOrUpdateSamples.java index a8a4b7be9e1d..86d101acf1bb 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsCreateOrUpdateSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class AuthenticationSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/AuthenticationSettings_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/AuthenticationSettings_CreateOrUpdate.json */ /** * Sample code: AuthenticationSettings_CreateOrUpdate. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsDeleteSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsDeleteSamples.java index 5aa563ab99cf..5c11a7f7c67c 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsDeleteSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AuthenticationSettingsDeleteSamples { /* - * x-ms-original-file: 2026-11-01/AuthenticationSettings_Delete.json + * x-ms-original-file: 2026-10-01-preview/AuthenticationSettings_Delete.json */ /** * Sample code: AuthenticationSettings_Delete. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsGetSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsGetSamples.java index 4d54c6f505e2..bab2dd5c0a62 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsGetSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AuthenticationSettingsGetSamples { /* - * x-ms-original-file: 2026-11-01/AuthenticationSettings_Get.json + * x-ms-original-file: 2026-10-01-preview/AuthenticationSettings_Get.json */ /** * Sample code: AuthenticationSettings_Get. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsListByHealthModelSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsListByHealthModelSamples.java index bfa18cc5c94c..6964d988704d 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsListByHealthModelSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/AuthenticationSettingsListByHealthModelSamples.java @@ -9,7 +9,7 @@ */ public final class AuthenticationSettingsListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/AuthenticationSettings_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/AuthenticationSettings_ListByHealthModel.json */ /** * Sample code: AuthenticationSettings_ListByHealthModel. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesCreateOrUpdateSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesCreateOrUpdateSamples.java index cad7c463d5e9..93e4e293c624 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesCreateOrUpdateSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class DiscoveryRulesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/DiscoveryRules_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/DiscoveryRules_CreateOrUpdate.json */ /** * Sample code: DiscoveryRules_CreateOrUpdate. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesDeleteSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesDeleteSamples.java index c9a17bda13eb..cd7309646270 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesDeleteSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class DiscoveryRulesDeleteSamples { /* - * x-ms-original-file: 2026-11-01/DiscoveryRules_Delete.json + * x-ms-original-file: 2026-10-01-preview/DiscoveryRules_Delete.json */ /** * Sample code: DiscoveryRules_Delete. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesGetSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesGetSamples.java index 6c8f35725dbe..4ef25240d30f 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesGetSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesGetSamples.java @@ -9,7 +9,7 @@ */ public final class DiscoveryRulesGetSamples { /* - * x-ms-original-file: 2026-11-01/DiscoveryRules_Get.json + * x-ms-original-file: 2026-10-01-preview/DiscoveryRules_Get.json */ /** * Sample code: DiscoveryRules_Get. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesListByHealthModelSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesListByHealthModelSamples.java index 35422e688ffe..20b5f4ec65db 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesListByHealthModelSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/DiscoveryRulesListByHealthModelSamples.java @@ -9,7 +9,7 @@ */ public final class DiscoveryRulesListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/DiscoveryRules_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/DiscoveryRules_ListByHealthModel.json */ /** * Sample code: DiscoveryRules_ListByHealthModel. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesAddDataAnnotationSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesAddDataAnnotationSamples.java index e60acb3ed315..864801a1943a 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesAddDataAnnotationSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesAddDataAnnotationSamples.java @@ -13,7 +13,7 @@ */ public final class EntitiesAddDataAnnotationSamples { /* - * x-ms-original-file: 2026-11-01/Entities_AddDataAnnotation.json + * x-ms-original-file: 2026-10-01-preview/Entities_AddDataAnnotation.json */ /** * Sample code: Entities_AddDataAnnotation. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesCreateOrUpdateSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesCreateOrUpdateSamples.java index a3536436ee78..83a2be8ea4d0 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesCreateOrUpdateSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesCreateOrUpdateSamples.java @@ -38,7 +38,7 @@ */ public final class EntitiesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/Entities_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/Entities_CreateOrUpdate.json */ /** * Sample code: Entities_CreateOrUpdate. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesDeleteSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesDeleteSamples.java index 8c64c80b380e..ea529262a417 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesDeleteSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class EntitiesDeleteSamples { /* - * x-ms-original-file: 2026-11-01/Entities_Delete.json + * x-ms-original-file: 2026-10-01-preview/Entities_Delete.json */ /** * Sample code: Entities_Delete. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetDataAnnotationsSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetDataAnnotationsSamples.java index 7b308be47630..84dc7d774ed2 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetDataAnnotationsSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetDataAnnotationsSamples.java @@ -12,7 +12,7 @@ */ public final class EntitiesGetDataAnnotationsSamples { /* - * x-ms-original-file: 2026-11-01/Entities_GetDataAnnotations.json + * x-ms-original-file: 2026-10-01-preview/Entities_GetDataAnnotations.json */ /** * Sample code: Entities_GetDataAnnotations. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetHistorySamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetHistorySamples.java index da4b80c9b089..40da7d33ffd2 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetHistorySamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetHistorySamples.java @@ -12,7 +12,7 @@ */ public final class EntitiesGetHistorySamples { /* - * x-ms-original-file: 2026-11-01/Entities_GetHistory.json + * x-ms-original-file: 2026-10-01-preview/Entities_GetHistory.json */ /** * Sample code: Entities_GetHistory. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSamples.java index 3397ab13ca6e..338dbc2ca64d 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSamples.java @@ -9,7 +9,7 @@ */ public final class EntitiesGetSamples { /* - * x-ms-original-file: 2026-11-01/Entities_Get.json + * x-ms-original-file: 2026-10-01-preview/Entities_Get.json */ /** * Sample code: Entities_Get. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSignalHistorySamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSignalHistorySamples.java index 218dffbe0bf0..6c5f711462e2 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSignalHistorySamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSignalHistorySamples.java @@ -12,7 +12,7 @@ */ public final class EntitiesGetSignalHistorySamples { /* - * x-ms-original-file: 2026-11-01/Entities_GetSignalHistory.json + * x-ms-original-file: 2026-10-01-preview/Entities_GetSignalHistory.json */ /** * Sample code: Entities_GetSignalHistory. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSignalRecommendationsSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSignalRecommendationsSamples.java index 0a5a7198794a..904301e71c9c 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSignalRecommendationsSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesGetSignalRecommendationsSamples.java @@ -9,7 +9,7 @@ */ public final class EntitiesGetSignalRecommendationsSamples { /* - * x-ms-original-file: 2026-11-01/Entities_GetSignalRecommendations.json + * x-ms-original-file: 2026-10-01-preview/Entities_GetSignalRecommendations.json */ /** * Sample code: Entities_GetSignalRecommendations. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesIngestHealthReportSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesIngestHealthReportSamples.java index 8e6d57a26dbe..0db9d945c049 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesIngestHealthReportSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesIngestHealthReportSamples.java @@ -15,7 +15,7 @@ */ public final class EntitiesIngestHealthReportSamples { /* - * x-ms-original-file: 2026-11-01/Entities_IngestHealthReport.json + * x-ms-original-file: 2026-10-01-preview/Entities_IngestHealthReport.json */ /** * Sample code: Entities_IngestHealthReport. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesListByHealthModelSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesListByHealthModelSamples.java index 527347a77889..499821d084a7 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesListByHealthModelSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/EntitiesListByHealthModelSamples.java @@ -9,7 +9,7 @@ */ public final class EntitiesListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/Entities_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/Entities_ListByHealthModel.json */ /** * Sample code: Entities_ListByHealthModel. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsCreateSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsCreateSamples.java index a1864be741d3..76aa807dac3b 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsCreateSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsCreateSamples.java @@ -15,7 +15,7 @@ */ public final class HealthModelsCreateSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_Create.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_Create.json */ /** * Sample code: HealthModels_Create. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsDeleteSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsDeleteSamples.java index d3a70d5bed66..7c531a1d55f9 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsDeleteSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class HealthModelsDeleteSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_Delete.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_Delete.json */ /** * Sample code: HealthModels_Delete. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsGetByResourceGroupSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsGetByResourceGroupSamples.java index 28a77af268ed..9ee931008a0a 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsGetByResourceGroupSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class HealthModelsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_Get.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_Get.json */ /** * Sample code: HealthModels_Get. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsListByResourceGroupSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsListByResourceGroupSamples.java index 441aeffcaff7..18ad948297d2 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsListByResourceGroupSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class HealthModelsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_ListByResourceGroup.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_ListByResourceGroup.json */ /** * Sample code: HealthModels_ListByResourceGroup. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsListSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsListSamples.java index 845145acc4d7..65af599bc2d7 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsListSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsListSamples.java @@ -9,7 +9,7 @@ */ public final class HealthModelsListSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_ListBySubscription.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_ListBySubscription.json */ /** * Sample code: HealthModels_ListBySubscription. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsUpdateSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsUpdateSamples.java index 920922b06d0b..475063f50035 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsUpdateSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/HealthModelsUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class HealthModelsUpdateSamples { /* - * x-ms-original-file: 2026-11-01/HealthModels_Update.json + * x-ms-original-file: 2026-10-01-preview/HealthModels_Update.json */ /** * Sample code: HealthModels_Update. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/OperationsListSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/OperationsListSamples.java index ed84f9a55207..b9d6a59c6e8e 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/OperationsListSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-11-01/Operations_List.json + * x-ms-original-file: 2026-10-01-preview/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsCreateOrUpdateSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsCreateOrUpdateSamples.java index 5aa881c6c569..fdc00de75527 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsCreateOrUpdateSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class RelationshipsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/Relationships_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/Relationships_CreateOrUpdate.json */ /** * Sample code: Relationships_CreateOrUpdate. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsDeleteSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsDeleteSamples.java index 33ea5c10a7b0..80de69841e81 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsDeleteSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class RelationshipsDeleteSamples { /* - * x-ms-original-file: 2026-11-01/Relationships_Delete.json + * x-ms-original-file: 2026-10-01-preview/Relationships_Delete.json */ /** * Sample code: Relationships_Delete. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsGetSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsGetSamples.java index 79ab8e650beb..523190e786b6 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsGetSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsGetSamples.java @@ -9,7 +9,7 @@ */ public final class RelationshipsGetSamples { /* - * x-ms-original-file: 2026-11-01/Relationships_Get.json + * x-ms-original-file: 2026-10-01-preview/Relationships_Get.json */ /** * Sample code: Relationships_Get. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsListByHealthModelSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsListByHealthModelSamples.java index ec96192da457..9b82a5432c30 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsListByHealthModelSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/RelationshipsListByHealthModelSamples.java @@ -9,7 +9,7 @@ */ public final class RelationshipsListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/Relationships_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/Relationships_ListByHealthModel.json */ /** * Sample code: Relationships_ListByHealthModel. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsCreateOrUpdateSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsCreateOrUpdateSamples.java index 58d031994525..cb59f6b9da58 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsCreateOrUpdateSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ */ public final class SignalDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-11-01/SignalDefinitions_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/SignalDefinitions_CreateOrUpdate.json */ /** * Sample code: SignalDefinitions_CreateOrUpdate. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsDeleteSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsDeleteSamples.java index c591f5e13b8c..40abedbc6ed9 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsDeleteSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SignalDefinitionsDeleteSamples { /* - * x-ms-original-file: 2026-11-01/SignalDefinitions_Delete.json + * x-ms-original-file: 2026-10-01-preview/SignalDefinitions_Delete.json */ /** * Sample code: SignalDefinitions_Delete. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsGetSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsGetSamples.java index a1da3797fd5a..5b1e19c84033 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsGetSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class SignalDefinitionsGetSamples { /* - * x-ms-original-file: 2026-11-01/SignalDefinitions_Get.json + * x-ms-original-file: 2026-10-01-preview/SignalDefinitions_Get.json */ /** * Sample code: SignalDefinitions_Get. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsListByHealthModelSamples.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsListByHealthModelSamples.java index 1d6d59fda70f..81b8bb40e7df 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsListByHealthModelSamples.java +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/samples/java/com/azure/resourcemanager/cloudhealth/generated/SignalDefinitionsListByHealthModelSamples.java @@ -9,7 +9,7 @@ */ public final class SignalDefinitionsListByHealthModelSamples { /* - * x-ms-original-file: 2026-11-01/SignalDefinitions_ListByHealthModel.json + * x-ms-original-file: 2026-10-01-preview/SignalDefinitions_ListByHealthModel.json */ /** * Sample code: SignalDefinitions_ListByHealthModel. diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/tsp-location.yaml b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/tsp-location.yaml index 1bd71b91c6e4..7dcc99323ee3 100644 --- a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/tsp-location.yaml +++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/cloudhealth/resource-manager/Microsoft.CloudHealth/CloudHealth -commit: d218330c5a3b727df9504ba852e97259479e8fef +commit: b338edc19a204c7989cceedef66987d7b3f35c3f repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md index ddaa3419c4c2..bb60a7fd6ae2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.5.0-beta.6 (Unreleased) +## 1.5.0-beta.5 (Unreleased) ### Features Added @@ -10,300 +10,6 @@ ### Other Changes -## 1.5.0-beta.5 (2026-10-10) - -- Azure Resource Manager CognitiveServices client library for Java. This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package api-version 2026-09-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Breaking Changes - -#### `models.Workbench$Definition` was modified - -* `withRegion(java.lang.String)` was removed -* `withTags(java.util.Map)` was removed -* `withRegion(com.azure.core.management.Region)` was removed - -#### `models.Workbench$Update` was modified - -* `withTags(java.util.Map)` was removed -* `withProperties(models.WorkbenchProperties)` was removed - -#### `models.Compute$Update` was modified - -* `withTags(java.util.Map)` was removed - -#### `models.WorkbenchProperties` was modified - -* `models.ComputeProvisioningState provisioningState()` -> `models.WorkbenchProvisioningState provisioningState()` - -#### `models.Compute$Definition` was modified - -* `withTags(java.util.Map)` was removed - -#### `models.RaiPolicies` was modified - -* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `delete(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed - -#### `models.Compute` was modified - -* `tags()` was removed - -#### `models.Workbench` was modified - -* `regionName()` was removed -* `tags()` was removed -* `location()` was removed -* `region()` was removed - -### Features Added - -* `models.CostControlPatchProperties` was added - -* `models.CostControlPeriod` was added - -* `models.RaiAcsInterventionPoint` was added - -* `models.CostControlsCreateOrUpdateHeaders` was added - -* `models.RaiBinding$UpdateStages` was added - -* `models.RaiAcsPolicyTarget` was added - -* `models.RaiBindings` was added - -* `models.CostControlDimension` was added - -* `models.CostControlPatch` was added - -* `models.CostControlsGetHeaders` was added - -* `models.CostControlThresholdType` was added - -* `models.RaiPoliciesCreateOrUpdateResponse` was added - -* `models.WorkbenchProvisioningState` was added - -* `models.RaiRegos` was added - -* `models.RaiAcsManifest` was added - -* `models.RaiRegosGetHeaders` was added - -* `models.RaiAcsEmptyObject` was added - -* `models.RaiAcsPolicyDefinitionType` was added - -* `models.CostControlUnit` was added - -* `models.RaiBindingsCreateOrUpdateHeaders` was added - -* `models.AdapterDeployment$Update` was added - -* `models.AdapterDeployment$DefinitionStages` was added - -* `models.CostControlConnections` was added - -* `models.RaiBinding` was added - -* `models.RaiBindingProperties` was added - -* `models.RaiAcsInterventionPoints` was added - -* `models.RaiRegosCreateOrUpdateResponse` was added - -* `models.CostControl$Update` was added - -* `models.AdapterDeploymentsGetHeaders` was added - -* `models.RaiRegoReference` was added - -* `models.AdapterDeployment` was added - -* `models.WorkbenchUpdateProperties` was added - -* `models.RaiBindingsGetResponse` was added - -* `models.RaiRego$UpdateStages` was added - -* `models.CostControlRule` was added - -* `models.RaiAcsToolInterventionPoint` was added - -* `models.RaiAcsToolDefinition` was added - -* `models.CostControlThresholdAction` was added - -* `models.CostControl$Definition` was added - -* `models.AdapterDeploymentLastOperation` was added - -* `models.AdapterDeployment$UpdateStages` was added - -* `models.RaiPolicyFormat` was added - -* `models.CostControl$UpdateStages` was added - -* `models.RaiBindingsGetHeaders` was added - -* `models.RaiRegosGetResponse` was added - -* `models.RaiAcsModerationSubjectFormat` was added - -* `models.CostControlMatch` was added - -* `models.RaiAcsPolicyTargetKind` was added - -* `models.AdapterDeploymentOperationType` was added - -* `models.RaiBinding$Definition` was added - -* `models.RaiBinding$Update` was added - -* `models.AdapterDeploymentOperationState` was added - -* `models.RaiRegoEncoding` was added - -* `models.RaiBindingsCreateOrUpdateResponse` was added - -* `models.RaiAcsToolNameSelector` was added - -* `models.RaiPoliciesGetHeaders` was added - -* `models.CostControlProperties` was added - -* `models.RaiRego` was added - -* `models.WorkbenchUpdate` was added - -* `models.RaiRego$Definition` was added - -* `models.RaiAcsPolicyBinding` was added - -* `models.RaiAcsHarmConfiguration` was added - -* `models.AdapterDeployment$Definition` was added - -* `models.AdapterDeploymentProperties` was added - -* `models.AdapterDeploymentsGetResponse` was added - -* `models.CostControls` was added - -* `models.WorkbenchStatus` was added - -* `models.RaiPolicyCustomExternalSafetyProviderReference` was added - -* `models.CostControlDimensionType` was added - -* `models.CostControlsUpdateResponse` was added - -* `models.RaiPoliciesGetResponse` was added - -* `models.RaiBinding$DefinitionStages` was added - -* `models.CostControl$DefinitionStages` was added - -* `models.RaiRegoProperties` was added - -* `models.RaiAcsModerationBindingExtension` was added - -* `models.GatedModelAccessProperties` was added - -* `models.CostControlThreshold` was added - -* `models.RaiAcsRegoPolicyDefinition` was added - -* `models.RaiRego$DefinitionStages` was added - -* `models.RaiPoliciesCreateOrUpdateHeaders` was added - -* `models.CostControlsGetResponse` was added - -* `models.RaiRego$Update` was added - -* `models.RaiRegosCreateOrUpdateHeaders` was added - -* `models.CostControl` was added - -* `models.RaiAcsHarmCategory` was added - -* `models.CostControlsCreateOrUpdateResponse` was added - -* `models.AdapterDeployments` was added - -* `models.CostControlsUpdateHeaders` was added - -#### `models.RaiPolicy$Definition` was modified - -* `withIfMatch(java.lang.String)` was added -* `withIfNoneMatch(java.lang.String)` was added - -#### `CognitiveServicesManager` was modified - -* `costControls()` was added -* `raiBindings()` was added -* `adapterDeployments()` was added -* `raiRegos()` was added - -#### `models.Workbench$Update` was modified - -* `withProperties(models.WorkbenchUpdateProperties)` was added - -#### `models.WorkbenchProperties` was modified - -* `withInstanceType(java.lang.String)` was added -* `instanceType()` was added -* `gpuCount()` was added -* `status()` was added -* `withGpuCount(java.lang.Integer)` was added - -#### `models.AccountProperties` was modified - -* `costControlIds()` was added -* `costControlConnections()` was added -* `withCostControlConnections(models.CostControlConnections)` was added -* `withCostControlIds(java.util.List)` was added - -#### `models.ConnectionCategory` was modified - -* `OPEN_API` was added - -#### `models.RaiPolicyProperties` was modified - -* `withFormat(models.RaiPolicyFormat)` was added -* `withCustomExternalSafetyProviders(java.util.List)` was added -* `withAcs(models.RaiAcsManifest)` was added -* `acs()` was added -* `withAcsRegos(java.util.List)` was added -* `format()` was added -* `acsRegos()` was added -* `customExternalSafetyProviders()` was added - -#### `models.DeploymentProperties` was modified - -* `withCostControlIds(java.util.List)` was added -* `costControlIds()` was added - -#### `models.RaiPolicies` was modified - -* `deleteByIdWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added -* `delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added - -#### `models.ManagedComputeDeploymentProperties` was modified - -* `gatedModelAccess()` was added -* `withGatedModelAccess(models.GatedModelAccessProperties)` was added - -#### `models.RaiPolicy$Update` was modified - -* `withIfNoneMatch(java.lang.String)` was added -* `withIfMatch(java.lang.String)` was added - -#### `models.Usage` was modified - -* `type()` was added -* `id()` was added - ## 1.5.0-beta.4 (2026-08-27) - Azure Resource Manager CognitiveServices client library for Java. This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package api-version 2026-07-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md index cddd1f88e30a..e29ec4810a34 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md @@ -2,7 +2,7 @@ Azure Resource Manager CognitiveServices client library for Java. -This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package api-version 2026-09-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package api-version 2026-07-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-cognitiveservices - 1.5.0-beta.5 + 1.5.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md index b82e2ab06e3d..26e075361620 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md @@ -31,13 +31,6 @@ - [RegenerateKey](#accounts_regeneratekey) - [Update](#accounts_update) -## AdapterDeployments - -- [CreateOrUpdate](#adapterdeployments_createorupdate) -- [Delete](#adapterdeployments_delete) -- [Get](#adapterdeployments_get) -- [List](#adapterdeployments_list) - ## AgentApplications - [CreateOrUpdate](#agentapplications_createorupdate) @@ -100,14 +93,6 @@ - [Start](#computes_start) - [Stop](#computes_stop) -## CostControls - -- [CreateOrUpdate](#costcontrols_createorupdate) -- [Delete](#costcontrols_delete) -- [Get](#costcontrols_get) -- [List](#costcontrols_list) -- [Update](#costcontrols_update) - ## DefenderForAISettings - [CreateOrUpdate](#defenderforaisettings_createorupdate) @@ -241,13 +226,6 @@ - [List](#quotatiers_list) - [Update](#quotatiers_update) -## RaiBindings - -- [CreateOrUpdate](#raibindings_createorupdate) -- [Delete](#raibindings_delete) -- [Get](#raibindings_get) -- [List](#raibindings_list) - ## RaiBlocklistItems - [BatchAdd](#raiblocklistitems_batchadd) @@ -286,13 +264,6 @@ - [Get](#raipolicies_get) - [List](#raipolicies_list) -## RaiRegos - -- [CreateOrUpdate](#rairegos_createorupdate) -- [Delete](#rairegos_delete) -- [Get](#rairegos_get) -- [List](#rairegos_list) - ## RaiToolLabels - [CreateOrUpdate](#raitoollabels_createorupdate) @@ -351,7 +322,7 @@ import com.azure.resourcemanager.cognitiveservices.models.CapabilityHostProperti */ public final class AccountCapabilityHostsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountCapabilityHost/createOrUpdate.json + * x-ms-original-file: 2026-07-15-preview/AccountCapabilityHost/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Account CapabilityHost. @@ -379,7 +350,7 @@ public final class AccountCapabilityHostsCreateOrUpdateSamples { */ public final class AccountCapabilityHostsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountCapabilityHost/delete.json + * x-ms-original-file: 2026-07-15-preview/AccountCapabilityHost/delete.json */ /** * Sample code: Delete Account CapabilityHost. @@ -402,7 +373,7 @@ public final class AccountCapabilityHostsDeleteSamples { */ public final class AccountCapabilityHostsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountCapabilityHost/get.json + * x-ms-original-file: 2026-07-15-preview/AccountCapabilityHost/get.json */ /** * Sample code: Get Account CapabilityHost. @@ -425,7 +396,7 @@ public final class AccountCapabilityHostsGetSamples { */ public final class AccountCapabilityHostsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountCapabilityHost/list.json + * x-ms-original-file: 2026-07-15-preview/AccountCapabilityHost/list.json */ /** * Sample code: List Account CapabilityHosts. @@ -451,7 +422,7 @@ import java.time.OffsetDateTime; */ public final class AccountConnectionsCreateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/create.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/create.json */ /** * Sample code: CreateAccountConnection. @@ -479,7 +450,7 @@ public final class AccountConnectionsCreateSamples { */ public final class AccountConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/delete.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/delete.json */ /** * Sample code: DeleteAccountConnection. @@ -502,7 +473,7 @@ public final class AccountConnectionsDeleteSamples { */ public final class AccountConnectionsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/get.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/get.json */ /** * Sample code: GetAccountConnection. @@ -525,7 +496,7 @@ public final class AccountConnectionsGetSamples { */ public final class AccountConnectionsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/list.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/list.json */ /** * Sample code: ListAccountConnections. @@ -557,7 +528,7 @@ import java.util.Map; */ public final class AccountConnectionsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/update.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/update.json */ /** * Sample code: UpdateAccountConnection. @@ -616,7 +587,7 @@ import java.util.Map; */ public final class AccountsCreateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateAccountMin.json + * x-ms-original-file: 2026-07-15-preview/CreateAccountMin.json */ /** * Sample code: Create Account Min. @@ -636,7 +607,7 @@ public final class AccountsCreateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/CreateAccount.json + * x-ms-original-file: 2026-07-15-preview/CreateAccount.json */ /** * Sample code: Create Account. @@ -668,7 +639,7 @@ public final class AccountsCreateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/CreateAccountWithAgentHostingConfiguration.json + * x-ms-original-file: 2026-07-15-preview/CreateAccountWithAgentHostingConfiguration.json */ /** * Sample code: Create a Foundry account with customer-owned AKS hosting. @@ -722,7 +693,7 @@ public final class AccountsCreateSamples { */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteAccount.json + * x-ms-original-file: 2026-07-15-preview/DeleteAccount.json */ /** * Sample code: Delete Account. @@ -749,7 +720,7 @@ import java.util.Arrays; */ public final class AccountsEvaluateDeploymentPoliciesSamples { /* - * x-ms-original-file: 2026-09-15-preview/EvaluateDeploymentPolicies.json + * x-ms-original-file: 2026-07-15-preview/EvaluateDeploymentPolicies.json */ /** * Sample code: EvaluateDeploymentPolicies. @@ -784,7 +755,7 @@ public final class AccountsEvaluateDeploymentPoliciesSamples { */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetAccount.json + * x-ms-original-file: 2026-07-15-preview/GetAccount.json */ /** * Sample code: Get Account. @@ -806,7 +777,7 @@ public final class AccountsGetByResourceGroupSamples { */ public final class AccountsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListAccountsBySubscription.json + * x-ms-original-file: 2026-07-15-preview/ListAccountsBySubscription.json */ /** * Sample code: List Accounts by Subscription. @@ -828,7 +799,7 @@ public final class AccountsListSamples { */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListAccountsByResourceGroup.json + * x-ms-original-file: 2026-07-15-preview/ListAccountsByResourceGroup.json */ /** * Sample code: List Accounts by Resource Group. @@ -850,7 +821,7 @@ public final class AccountsListByResourceGroupSamples { */ public final class AccountsListKeysSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListKeys.json + * x-ms-original-file: 2026-07-15-preview/ListKeys.json */ /** * Sample code: List Keys. @@ -871,7 +842,7 @@ public final class AccountsListKeysSamples { */ public final class AccountsListModelsSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListAccountModels.json + * x-ms-original-file: 2026-07-15-preview/ListAccountModels.json */ /** * Sample code: List AccountModels. @@ -892,7 +863,7 @@ public final class AccountsListModelsSamples { */ public final class AccountsListSkusSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListSkus.json + * x-ms-original-file: 2026-07-15-preview/ListSkus.json */ /** * Sample code: List SKUs. @@ -913,7 +884,7 @@ public final class AccountsListSkusSamples { */ public final class AccountsListUsagesSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetUsages.json + * x-ms-original-file: 2026-07-15-preview/GetUsages.json */ /** * Sample code: Get Usages. @@ -926,7 +897,7 @@ public final class AccountsListUsagesSamples { } /* - * x-ms-original-file: 2026-09-15-preview/GetUsagesClassicScope.json + * x-ms-original-file: 2026-07-15-preview/GetUsagesClassicScope.json */ /** * Sample code: Get Usages Classic Scope. @@ -940,7 +911,7 @@ public final class AccountsListUsagesSamples { } /* - * x-ms-original-file: 2026-09-15-preview/GetUsagesDataZoneScope.json + * x-ms-original-file: 2026-07-15-preview/GetUsagesDataZoneScope.json */ /** * Sample code: Get Usages DataZone Scope. @@ -954,7 +925,7 @@ public final class AccountsListUsagesSamples { } /* - * x-ms-original-file: 2026-09-15-preview/GetUsagesGlobalScope.json + * x-ms-original-file: 2026-07-15-preview/GetUsagesGlobalScope.json */ /** * Sample code: Get Usages Global Scope. @@ -980,7 +951,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameter */ public final class AccountsRegenerateKeySamples { /* - * x-ms-original-file: 2026-09-15-preview/RegenerateKey.json + * x-ms-original-file: 2026-07-15-preview/RegenerateKey.json */ /** * Sample code: Regenerate Keys. @@ -999,8 +970,6 @@ public final class AccountsRegenerateKeySamples { ```java import com.azure.resourcemanager.cognitiveservices.models.Account; -import com.azure.resourcemanager.cognitiveservices.models.AccountProperties; -import com.azure.resourcemanager.cognitiveservices.models.CostControlConnections; import com.azure.resourcemanager.cognitiveservices.models.Sku; /** @@ -1008,7 +977,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku; */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateAccount.json + * x-ms-original-file: 2026-07-15-preview/UpdateAccount.json */ /** * Sample code: Update Account. @@ -1019,114 +988,7 @@ public final class AccountsUpdateSamples { Account resource = manager.accounts() .getByResourceGroupWithResponse("bvttest", "bingSearch", com.azure.core.util.Context.NONE) .getValue(); - resource.update() - .withProperties(new AccountProperties().withCostControlConnections(new CostControlConnections() - .withAppInsightsConnectionId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/bingSearch/connections/myAppInsightsConnection") - .withEventGridConnectionId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/bingSearch/connections/myEventGridConnection"))) - .withSku(new Sku().withName("S2")) - .apply(); - } -} -``` - -### AdapterDeployments_CreateOrUpdate - -```java -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentProperties; - -/** - * Samples for AdapterDeployments CreateOrUpdate. - */ -public final class AdapterDeploymentsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateAdapterDeployment.json - */ - /** - * Sample code: CreateOrUpdateAdapterDeployment. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - createOrUpdateAdapterDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.adapterDeployments() - .define("adapterDeploymentName") - .withExistingAccount("resourceGroupName", "accountName") - .withProperties(new AdapterDeploymentProperties() - .withSourceModelId("azureai://accounts/accountName/projects/projectName/models/modelName/versions/1") - .withTargetDeploymentName("managedComputeDeploymentName")) - .create(); - } -} -``` - -### AdapterDeployments_Delete - -```java -/** - * Samples for AdapterDeployments Delete. - */ -public final class AdapterDeploymentsDeleteSamples { - /* - * x-ms-original-file: 2026-09-15-preview/DeleteAdapterDeployment.json - */ - /** - * Sample code: DeleteAdapterDeployment. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - deleteAdapterDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.adapterDeployments() - .delete("resourceGroupName", "accountName", "adapterDeploymentName", "\"0x8D1234567890ABC\"", - com.azure.core.util.Context.NONE); - } -} -``` - -### AdapterDeployments_Get - -```java -/** - * Samples for AdapterDeployments Get. - */ -public final class AdapterDeploymentsGetSamples { - /* - * x-ms-original-file: 2026-09-15-preview/GetAdapterDeployment.json - */ - /** - * Sample code: GetAdapterDeployment. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - getAdapterDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.adapterDeployments() - .getWithResponse("resourceGroupName", "accountName", "adapterDeploymentName", - com.azure.core.util.Context.NONE); - } -} -``` - -### AdapterDeployments_List - -```java -/** - * Samples for AdapterDeployments List. - */ -public final class AdapterDeploymentsListSamples { - /* - * x-ms-original-file: 2026-09-15-preview/ListAdapterDeployments.json - */ - /** - * Sample code: ListAdapterDeployments. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - listAdapterDeployments(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.adapterDeployments().list("resourceGroupName", "accountName", com.azure.core.util.Context.NONE); + resource.update().withSku(new Sku().withName("S2")).apply(); } } ``` @@ -1143,7 +1005,7 @@ import java.util.Map; */ public final class AgentApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/createOrUpdate.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/createOrUpdate.json */ /** * Sample code: Create or Update Account Agent Application. @@ -1184,7 +1046,7 @@ public final class AgentApplicationsCreateOrUpdateSamples { */ public final class AgentApplicationsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/delete.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/delete.json */ /** * Sample code: Delete Account Agent Application. @@ -1208,7 +1070,7 @@ public final class AgentApplicationsDeleteSamples { */ public final class AgentApplicationsDisableSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/disable.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/disable.json */ /** * Sample code: Disable Agent Application. @@ -1232,7 +1094,7 @@ public final class AgentApplicationsDisableSamples { */ public final class AgentApplicationsEnableSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/enable.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/enable.json */ /** * Sample code: Enable Agent Application. @@ -1256,7 +1118,7 @@ public final class AgentApplicationsEnableSamples { */ public final class AgentApplicationsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/get.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/get.json */ /** * Sample code: Get Account Agent Application. @@ -1282,7 +1144,7 @@ import java.util.Arrays; */ public final class AgentApplicationsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/list.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/list.json */ /** * Sample code: List Account Agent Applications. @@ -1306,7 +1168,7 @@ public final class AgentApplicationsListSamples { */ public final class AgentApplicationsListAgentsSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/listAgents.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/listAgents.json */ /** * Sample code: List Agents for Agent Application. @@ -1337,7 +1199,7 @@ import java.util.Arrays; */ public final class AgentDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/createOrUpdate.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/createOrUpdate.json */ /** * Sample code: Create or Update Agent Deployment. @@ -1369,7 +1231,7 @@ public final class AgentDeploymentsCreateOrUpdateSamples { */ public final class AgentDeploymentsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/delete.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/delete.json */ /** * Sample code: Delete Agent Deployment. @@ -1393,7 +1255,7 @@ public final class AgentDeploymentsDeleteSamples { */ public final class AgentDeploymentsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/get.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/get.json */ /** * Sample code: Get Agent Deployment. @@ -1418,7 +1280,7 @@ public final class AgentDeploymentsGetSamples { */ public final class AgentDeploymentsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/list.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/list.json */ /** * Sample code: List Agent Deployments. @@ -1442,7 +1304,7 @@ public final class AgentDeploymentsListSamples { */ public final class AgentDeploymentsStartSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/start.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/start.json */ /** * Sample code: Start Agent Deployment. @@ -1466,7 +1328,7 @@ public final class AgentDeploymentsStartSamples { */ public final class AgentDeploymentsStopSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/stop.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/stop.json */ /** * Sample code: Stop Agent Deployment. @@ -1502,7 +1364,7 @@ import java.util.Map; */ public final class ArcDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateArcDeployment.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateArcDeployment.json */ /** * Sample code: CreateOrUpdateArcDeployment. @@ -1530,7 +1392,7 @@ public final class ArcDeploymentsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateArcDeploymentWithTemplate.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateArcDeploymentWithTemplate.json */ /** * Sample code: CreateOrUpdateArcDeploymentWithTemplate. @@ -1580,7 +1442,7 @@ public final class ArcDeploymentsCreateOrUpdateSamples { */ public final class ArcDeploymentsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteArcDeployment.json + * x-ms-original-file: 2026-07-15-preview/DeleteArcDeployment.json */ /** * Sample code: DeleteArcDeployment. @@ -1603,7 +1465,7 @@ public final class ArcDeploymentsDeleteSamples { */ public final class ArcDeploymentsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetArcDeployment.json + * x-ms-original-file: 2026-07-15-preview/GetArcDeployment.json */ /** * Sample code: GetArcDeployment. @@ -1625,7 +1487,7 @@ public final class ArcDeploymentsGetSamples { */ public final class ArcDeploymentsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListArcDeployments.json + * x-ms-original-file: 2026-07-15-preview/ListArcDeployments.json */ /** * Sample code: ListArcDeployments. @@ -1655,7 +1517,7 @@ import java.util.Map; */ public final class ArcDeploymentsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateArcDeployment.json + * x-ms-original-file: 2026-07-15-preview/UpdateArcDeployment.json */ /** * Sample code: UpdateArcDeployment. @@ -1704,7 +1566,7 @@ import com.azure.resourcemanager.cognitiveservices.models.HostingModel; */ public final class CommitmentPlansCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/PutCommitmentPlan.json */ /** * Sample code: PutCommitmentPlan. @@ -1732,7 +1594,7 @@ public final class CommitmentPlansCreateOrUpdateSamples { */ public final class CommitmentPlansCreateOrUpdateAssociationSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateSharedCommitmentPlanAssociation.json + * x-ms-original-file: 2026-07-15-preview/CreateSharedCommitmentPlanAssociation.json */ /** * Sample code: PutCommitmentPlan. @@ -1763,7 +1625,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku; */ public final class CommitmentPlansCreateOrUpdatePlanSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateSharedCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/CreateSharedCommitmentPlan.json */ /** * Sample code: Create Commitment Plan. @@ -1795,7 +1657,7 @@ public final class CommitmentPlansCreateOrUpdatePlanSamples { */ public final class CommitmentPlansDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/DeleteCommitmentPlan.json */ /** * Sample code: DeleteCommitmentPlan. @@ -1818,7 +1680,7 @@ public final class CommitmentPlansDeleteSamples { */ public final class CommitmentPlansDeleteAssociationSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteSharedCommitmentPlanAssociation.json + * x-ms-original-file: 2026-07-15-preview/DeleteSharedCommitmentPlanAssociation.json */ /** * Sample code: DeleteCommitmentPlan. @@ -1842,7 +1704,7 @@ public final class CommitmentPlansDeleteAssociationSamples { */ public final class CommitmentPlansDeletePlanSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteSharedCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/DeleteSharedCommitmentPlan.json */ /** * Sample code: Delete Commitment Plan. @@ -1865,7 +1727,7 @@ public final class CommitmentPlansDeletePlanSamples { */ public final class CommitmentPlansGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/GetCommitmentPlan.json */ /** * Sample code: GetCommitmentPlan. @@ -1888,7 +1750,7 @@ public final class CommitmentPlansGetSamples { */ public final class CommitmentPlansGetAssociationSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetSharedCommitmentPlanAssociation.json + * x-ms-original-file: 2026-07-15-preview/GetSharedCommitmentPlanAssociation.json */ /** * Sample code: GetCommitmentPlan. @@ -1911,7 +1773,7 @@ public final class CommitmentPlansGetAssociationSamples { */ public final class CommitmentPlansGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetSharedCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/GetSharedCommitmentPlan.json */ /** * Sample code: Get Commitment Plan. @@ -1934,7 +1796,7 @@ public final class CommitmentPlansGetByResourceGroupSamples { */ public final class CommitmentPlansListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListCommitmentPlans.json + * x-ms-original-file: 2026-07-15-preview/ListCommitmentPlans.json */ /** * Sample code: ListCommitmentPlans. @@ -1956,7 +1818,7 @@ public final class CommitmentPlansListSamples { */ public final class CommitmentPlansListAssociationsSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListSharedCommitmentPlanAssociations.json + * x-ms-original-file: 2026-07-15-preview/ListSharedCommitmentPlanAssociations.json */ /** * Sample code: ListCommitmentPlans. @@ -1979,7 +1841,7 @@ public final class CommitmentPlansListAssociationsSamples { */ public final class CommitmentPlansListByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListSharedCommitmentPlansByResourceGroup.json + * x-ms-original-file: 2026-07-15-preview/ListSharedCommitmentPlansByResourceGroup.json */ /** * Sample code: List Commitment Plans by Resource Group. @@ -2001,7 +1863,7 @@ public final class CommitmentPlansListByResourceGroupSamples { */ public final class CommitmentPlansListPlansBySubscriptionSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListSharedCommitmentPlansBySubscription.json + * x-ms-original-file: 2026-07-15-preview/ListSharedCommitmentPlansBySubscription.json */ /** * Sample code: List Accounts by Subscription. @@ -2027,7 +1889,7 @@ import java.util.Map; */ public final class CommitmentPlansUpdatePlanSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateSharedCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/UpdateSharedCommitmentPlan.json */ /** * Sample code: Create Commitment Plan. @@ -2064,7 +1926,7 @@ public final class CommitmentPlansUpdatePlanSamples { */ public final class CommitmentTiersListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListCommitmentTiers.json + * x-ms-original-file: 2026-07-15-preview/ListCommitmentTiers.json */ /** * Sample code: ListCommitmentTiers. @@ -2086,7 +1948,7 @@ public final class CommitmentTiersListSamples { */ public final class ComputeOperationsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetComputeOperationStatus.json + * x-ms-original-file: 2026-07-15-preview/GetComputeOperationStatus.json */ /** * Sample code: GetComputeOperationStatus. @@ -2121,7 +1983,7 @@ import java.util.Map; */ public final class ComputesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/PutContainerInstanceCompute.json */ /** * Sample code: PutContainerInstanceCompute. @@ -2147,7 +2009,7 @@ public final class ComputesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/PutCompute.json + * x-ms-original-file: 2026-07-15-preview/PutCompute.json */ /** * Sample code: PutCompute. @@ -2189,7 +2051,7 @@ public final class ComputesCreateOrUpdateSamples { */ public final class ComputesDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteCompute.json + * x-ms-original-file: 2026-07-15-preview/DeleteCompute.json */ /** * Sample code: DeleteCompute. @@ -2210,7 +2072,7 @@ public final class ComputesDeleteSamples { */ public final class ComputesGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/GetContainerInstanceCompute.json */ /** * Sample code: GetContainerInstanceCompute. @@ -2225,7 +2087,7 @@ public final class ComputesGetSamples { } /* - * x-ms-original-file: 2026-09-15-preview/GetCompute.json + * x-ms-original-file: 2026-07-15-preview/GetCompute.json */ /** * Sample code: GetCompute. @@ -2247,7 +2109,7 @@ public final class ComputesGetSamples { */ public final class ComputesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListComputes.json + * x-ms-original-file: 2026-07-15-preview/ListComputes.json */ /** * Sample code: ListComputes. @@ -2268,7 +2130,7 @@ public final class ComputesListSamples { */ public final class ComputesRestartSamples { /* - * x-ms-original-file: 2026-09-15-preview/RestartContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/RestartContainerInstanceCompute.json */ /** * Sample code: RestartContainerInstanceCompute. @@ -2291,7 +2153,7 @@ public final class ComputesRestartSamples { */ public final class ComputesStartSamples { /* - * x-ms-original-file: 2026-09-15-preview/StartContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/StartContainerInstanceCompute.json */ /** * Sample code: StartContainerInstanceCompute. @@ -2314,7 +2176,7 @@ public final class ComputesStartSamples { */ public final class ComputesStopSamples { /* - * x-ms-original-file: 2026-09-15-preview/StopContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/StopContainerInstanceCompute.json */ /** * Sample code: StopContainerInstanceCompute. @@ -2329,242 +2191,6 @@ public final class ComputesStopSamples { } ``` -### CostControls_CreateOrUpdate - -```java -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimension; -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimensionType; -import com.azure.resourcemanager.cognitiveservices.models.CostControlMatch; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPeriod; -import com.azure.resourcemanager.cognitiveservices.models.CostControlProperties; -import com.azure.resourcemanager.cognitiveservices.models.CostControlRule; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThreshold; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdAction; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdType; -import com.azure.resourcemanager.cognitiveservices.models.CostControlUnit; -import java.util.Arrays; - -/** - * Samples for CostControls CreateOrUpdate. - */ -public final class CostControlsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/createOrUpdate.json - */ - /** - * Sample code: Create a cost control with all settings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void createACostControlWithAllSettings( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls() - .define("production-agents") - .withExistingAccount("foundry-resource-group", "foundry-account") - .withProperties(new CostControlProperties().withDisplayName("Production agent monthly budget") - .withRules(Arrays.asList(new CostControlRule().withName("monthly-agent-budget") - .withCounterKey(new CostControlDimension().withType(CostControlDimensionType.AGENT)) - .withUnit(CostControlUnit.USD) - .withAmount(1000.0) - .withPeriod(CostControlPeriod.MONTH) - .withRecurring(true) - .withMatch(new CostControlMatch().withAgentResourceIds(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/accounts/foundry-account/project/production/agent/customer-support-agent", - "/subscriptions/00000000-1111-2222-3333-444444444444/accounts/foundry-account/project/production/agent/sales-assistant-agent")) - .withIdentityObjectIds(Arrays.asList("11111111-2222-3333-4444-555555555555")) - .withSessionIds(Arrays.asList("production-session")) - .withProjectIds(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/projects/production"))) - .withThresholds(Arrays.asList( - new CostControlThreshold().withType(CostControlThresholdType.PERCENTAGE) - .withValue(80.0) - .withAction(CostControlThresholdAction.ALERT), - new CostControlThreshold().withType(CostControlThresholdType.ABSOLUTE) - .withValue(1000.0) - .withAction(CostControlThresholdAction.BLOCK))), - new CostControlRule().withName("daily-account-budget") - .withCounterKey(new CostControlDimension().withType(CostControlDimensionType.ACCOUNT)) - .withUnit(CostControlUnit.USD) - .withAmount(100.0) - .withPeriod(CostControlPeriod.DAY) - .withRecurring(true) - .withThresholds( - Arrays.asList(new CostControlThreshold().withType(CostControlThresholdType.PERCENTAGE) - .withValue(90.0) - .withAction(CostControlThresholdAction.ALERT)))))) - .withIfNoneMatch("*") - .create(); - } -} -``` - -### CostControls_Delete - -```java -/** - * Samples for CostControls Delete. - */ -public final class CostControlsDeleteSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/delete.json - */ - /** - * Sample code: Delete a cost control conditionally. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - deleteACostControlConditionally(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls() - .deleteWithResponse("foundry-resource-group", "foundry-account", "production-agents", - "\"00000000-0000-0000-0000-000000000002\"", com.azure.core.util.Context.NONE); - } -} -``` - -### CostControls_Get - -```java -/** - * Samples for CostControls Get. - */ -public final class CostControlsGetSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/get.json - */ - /** - * Sample code: Get a cost control with all settings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - getACostControlWithAllSettings(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls() - .getWithResponse("foundry-resource-group", "foundry-account", "production-agents", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/getLegacy.json - */ - /** - * Sample code: Read a legacy cost control without authoring its legacy values. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void readALegacyCostControlWithoutAuthoringItsLegacyValues( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls() - .getWithResponse("foundry-resource-group", "foundry-account", "legacy-budget", - com.azure.core.util.Context.NONE); - } -} -``` - -### CostControls_List - -```java -/** - * Samples for CostControls List. - */ -public final class CostControlsListSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/list.json - */ - /** - * Sample code: List cost controls with all settings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - listCostControlsWithAllSettings(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls().list("foundry-resource-group", "foundry-account", com.azure.core.util.Context.NONE); - } -} -``` - -### CostControls_Update - -```java -import com.azure.resourcemanager.cognitiveservices.models.CostControl; -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimension; -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimensionType; -import com.azure.resourcemanager.cognitiveservices.models.CostControlMatch; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPatchProperties; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPeriod; -import com.azure.resourcemanager.cognitiveservices.models.CostControlRule; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThreshold; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdAction; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdType; -import com.azure.resourcemanager.cognitiveservices.models.CostControlUnit; -import java.util.Arrays; - -/** - * Samples for CostControls Update. - */ -public final class CostControlsUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/update.json - */ - /** - * Sample code: Update all configurable cost control settings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateAllConfigurableCostControlSettings( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - CostControl resource = manager.costControls() - .getWithResponse("foundry-resource-group", "foundry-account", "production-agents", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new CostControlPatchProperties().withDisplayName("Updated production agent budget") - .withRules(Arrays.asList(new CostControlRule().withName("monthly-agent-budget") - .withCounterKey(new CostControlDimension().withType(CostControlDimensionType.AGENT)) - .withUnit(CostControlUnit.USD) - .withAmount(1500.0) - .withPeriod(CostControlPeriod.MONTH) - .withRecurring(true) - .withMatch(new CostControlMatch().withAgentResourceIds(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/accounts/foundry-account/project/production/agent/customer-support-agent", - "/subscriptions/00000000-1111-2222-3333-444444444444/accounts/foundry-account/project/production/agent/sales-assistant-agent")) - .withIdentityObjectIds(Arrays.asList("11111111-2222-3333-4444-555555555555")) - .withSessionIds(Arrays.asList("production-session")) - .withProjectIds(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/projects/production"))) - .withThresholds(Arrays.asList( - new CostControlThreshold().withType(CostControlThresholdType.PERCENTAGE) - .withValue(80.0) - .withAction(CostControlThresholdAction.ALERT), - new CostControlThreshold().withType(CostControlThresholdType.ABSOLUTE) - .withValue(1500.0) - .withAction(CostControlThresholdAction.BLOCK)))))) - .withIfMatch("\"00000000-0000-0000-0000-000000000001\"") - .apply(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/updateMetadata.json - */ - /** - * Sample code: Update metadata while preserving legacy rules. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateMetadataWhilePreservingLegacyRules( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - CostControl resource = manager.costControls() - .getWithResponse("foundry-resource-group", "foundry-account", "legacy-budget", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new CostControlPatchProperties().withDisplayName("Renamed legacy budget")) - .withIfMatch("\"00000000-0000-0000-0000-000000000001\"") - .apply(); - } -} -``` - ### DefenderForAISettings_CreateOrUpdate ```java @@ -2575,7 +2201,7 @@ import com.azure.resourcemanager.cognitiveservices.models.DefenderForAISettingSt */ public final class DefenderForAISettingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutDefenderForAISetting.json + * x-ms-original-file: 2026-07-15-preview/PutDefenderForAISetting.json */ /** * Sample code: PutDefenderForAISetting. @@ -2601,7 +2227,7 @@ public final class DefenderForAISettingsCreateOrUpdateSamples { */ public final class DefenderForAISettingsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetDefenderForAISetting.json + * x-ms-original-file: 2026-07-15-preview/GetDefenderForAISetting.json */ /** * Sample code: GetDefenderForAISetting. @@ -2624,7 +2250,7 @@ public final class DefenderForAISettingsGetSamples { */ public final class DefenderForAISettingsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListDefenderForAISetting.json + * x-ms-original-file: 2026-07-15-preview/ListDefenderForAISetting.json */ /** * Sample code: ListDefenderForAISetting. @@ -2649,7 +2275,7 @@ import com.azure.resourcemanager.cognitiveservices.models.DefenderForAISettingSt */ public final class DefenderForAISettingsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateDefenderForAISetting.json + * x-ms-original-file: 2026-07-15-preview/UpdateDefenderForAISetting.json */ /** * Sample code: UpdateDefenderForAISetting. @@ -2674,7 +2300,7 @@ public final class DefenderForAISettingsUpdateSamples { */ public final class DeletedAccountsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetDeletedAccount.json + * x-ms-original-file: 2026-07-15-preview/GetDeletedAccount.json */ /** * Sample code: Get Account. @@ -2696,7 +2322,7 @@ public final class DeletedAccountsGetSamples { */ public final class DeletedAccountsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListDeletedAccountsBySubscription.json + * x-ms-original-file: 2026-07-15-preview/ListDeletedAccountsBySubscription.json */ /** * Sample code: List Deleted Accounts by Subscription. @@ -2718,7 +2344,7 @@ public final class DeletedAccountsListSamples { */ public final class DeletedAccountsPurgeSamples { /* - * x-ms-original-file: 2026-09-15-preview/PurgeDeletedAccount.json + * x-ms-original-file: 2026-07-15-preview/PurgeDeletedAccount.json */ /** * Sample code: Delete Account. @@ -2746,7 +2372,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku; */ public final class DeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutDeployment.json + * x-ms-original-file: 2026-07-15-preview/PutDeployment.json */ /** * Sample code: PutDeployment. @@ -2766,7 +2392,7 @@ public final class DeploymentsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/PutDeploymentWithSpeculativeDecoding.json + * x-ms-original-file: 2026-07-15-preview/PutDeploymentWithSpeculativeDecoding.json */ /** * Sample code: PutDeploymentWithSpeculativeDecoding. @@ -2803,7 +2429,7 @@ public final class DeploymentsCreateOrUpdateSamples { */ public final class DeploymentsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteDeployment.json + * x-ms-original-file: 2026-07-15-preview/DeleteDeployment.json */ /** * Sample code: DeleteDeployment. @@ -2825,7 +2451,7 @@ public final class DeploymentsDeleteSamples { */ public final class DeploymentsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetDeployment.json + * x-ms-original-file: 2026-07-15-preview/GetDeployment.json */ /** * Sample code: GetDeployment. @@ -2847,7 +2473,7 @@ public final class DeploymentsGetSamples { */ public final class DeploymentsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListDeployments.json + * x-ms-original-file: 2026-07-15-preview/ListDeployments.json */ /** * Sample code: ListDeployments. @@ -2868,7 +2494,7 @@ public final class DeploymentsListSamples { */ public final class DeploymentsListSkusSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListDeploymentSkus.json + * x-ms-original-file: 2026-07-15-preview/ListDeploymentSkus.json */ /** * Sample code: ListDeploymentSkus. @@ -2891,7 +2517,7 @@ public final class DeploymentsListSkusSamples { */ public final class DeploymentsPauseSamples { /* - * x-ms-original-file: 2026-09-15-preview/PauseDeployment.json + * x-ms-original-file: 2026-07-15-preview/PauseDeployment.json */ /** * Sample code: PauseDeployment. @@ -2913,7 +2539,7 @@ public final class DeploymentsPauseSamples { */ public final class DeploymentsResumeSamples { /* - * x-ms-original-file: 2026-09-15-preview/ResumeDeployment.json + * x-ms-original-file: 2026-07-15-preview/ResumeDeployment.json */ /** * Sample code: ResumeDeployment. @@ -2938,7 +2564,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku; */ public final class DeploymentsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateDeployment.json + * x-ms-original-file: 2026-07-15-preview/UpdateDeployment.json */ /** * Sample code: UpdateDeployment. @@ -2967,7 +2593,7 @@ import com.azure.resourcemanager.cognitiveservices.models.KeyVaultProperties; */ public final class EncryptionScopesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutEncryptionScope.json + * x-ms-original-file: 2026-07-15-preview/PutEncryptionScope.json */ /** * Sample code: PutEncryptionScope. @@ -2999,7 +2625,7 @@ public final class EncryptionScopesCreateOrUpdateSamples { */ public final class EncryptionScopesDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteEncryptionScope.json + * x-ms-original-file: 2026-07-15-preview/DeleteEncryptionScope.json */ /** * Sample code: DeleteEncryptionScope. @@ -3022,7 +2648,7 @@ public final class EncryptionScopesDeleteSamples { */ public final class EncryptionScopesGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetEncryptionScope.json + * x-ms-original-file: 2026-07-15-preview/GetEncryptionScope.json */ /** * Sample code: GetEncryptionScope. @@ -3046,7 +2672,7 @@ public final class EncryptionScopesGetSamples { */ public final class EncryptionScopesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListEncryptionScopes.json + * x-ms-original-file: 2026-07-15-preview/ListEncryptionScopes.json */ /** * Sample code: ListEncryptionScopes. @@ -3068,7 +2694,7 @@ public final class EncryptionScopesListSamples { */ public final class LocationBasedModelCapacitiesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListLocationBasedModelCapacitiesGlobalScope.json + * x-ms-original-file: 2026-07-15-preview/ListLocationBasedModelCapacitiesGlobalScope.json */ /** * Sample code: ListLocationBasedModelCapacities Global Scope. @@ -3081,7 +2707,7 @@ public final class LocationBasedModelCapacitiesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListLocationBasedModelCapacitiesClassicScope.json + * x-ms-original-file: 2026-07-15-preview/ListLocationBasedModelCapacitiesClassicScope.json */ /** * Sample code: ListLocationBasedModelCapacities Classic Scope. @@ -3094,7 +2720,7 @@ public final class LocationBasedModelCapacitiesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListLocationBasedModelCapacitiesDataZoneScope.json + * x-ms-original-file: 2026-07-15-preview/ListLocationBasedModelCapacitiesDataZoneScope.json */ /** * Sample code: ListLocationBasedModelCapacities DataZone Scope. @@ -3107,7 +2733,7 @@ public final class LocationBasedModelCapacitiesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListLocationBasedModelCapacities.json + * x-ms-original-file: 2026-07-15-preview/ListLocationBasedModelCapacities.json */ /** * Sample code: ListLocationBasedModelCapacities. @@ -3129,7 +2755,7 @@ public final class LocationBasedModelCapacitiesListSamples { */ public final class ManagedComputeCapacitiesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListManagedComputeCapacities.json + * x-ms-original-file: 2026-07-15-preview/ListManagedComputeCapacities.json */ /** * Sample code: List Managed Compute Capacities. @@ -3147,7 +2773,6 @@ public final class ManagedComputeCapacitiesListSamples { ```java import com.azure.resourcemanager.cognitiveservices.models.DeploymentModelVersionUpgradeOption; -import com.azure.resourcemanager.cognitiveservices.models.GatedModelAccessProperties; import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties; import com.azure.resourcemanager.cognitiveservices.models.Sku; @@ -3156,7 +2781,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku; */ public final class ManagedComputeDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateManagedComputeDeployment.json */ /** * Sample code: CreateOrUpdateManagedComputeDeployment. @@ -3173,15 +2798,13 @@ public final class ManagedComputeDeploymentsCreateOrUpdateSamples { .withDeploymentTemplate( "azureml://registries/azureml-openai-oss/deploymenttemplates/gpt-oss-120b-short-context/versions/1") .withAcceleratorType("H100_80GB") - .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE) - .withGatedModelAccess(new GatedModelAccessProperties().withConnectionId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/projects/my-project/connections/my-hf-connection"))) + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)) .withSku(new Sku().withName("GlobalManagedCompute").withCapacity(1)) .create(); } /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateVmManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateVmManagedComputeDeployment.json */ /** * Sample code: CreateOrUpdateVmManagedComputeDeployment. @@ -3196,8 +2819,6 @@ public final class ManagedComputeDeploymentsCreateOrUpdateSamples { .withProperties(new ManagedComputeDeploymentProperties() .withModel("azureml://registries/azureml-openai-oss/models/gpt-oss-120b/versions/4") .withDeploymentTemplate("projects/my-project/deploymentTemplates/gpt-oss-120b-vllm-tuned/versions/2") - .withGatedModelAccess(new GatedModelAccessProperties().withConnectionId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/projects/my-project/connections/my-hf-connection")) .withComputeId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/computes/my-h100-pool") .withPriority("High")) @@ -3215,7 +2836,7 @@ public final class ManagedComputeDeploymentsCreateOrUpdateSamples { */ public final class ManagedComputeDeploymentsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/DeleteManagedComputeDeployment.json */ /** * Sample code: DeleteManagedComputeDeployment. @@ -3238,7 +2859,7 @@ public final class ManagedComputeDeploymentsDeleteSamples { */ public final class ManagedComputeDeploymentsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetVmManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/GetVmManagedComputeDeployment.json */ /** * Sample code: GetVmManagedComputeDeployment. @@ -3252,7 +2873,7 @@ public final class ManagedComputeDeploymentsGetSamples { } /* - * x-ms-original-file: 2026-09-15-preview/GetManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/GetManagedComputeDeployment.json */ /** * Sample code: GetManagedComputeDeployment. @@ -3275,7 +2896,7 @@ public final class ManagedComputeDeploymentsGetSamples { */ public final class ManagedComputeDeploymentsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListVmManagedComputeDeployments.json + * x-ms-original-file: 2026-07-15-preview/ListVmManagedComputeDeployments.json */ /** * Sample code: ListVmManagedComputeDeployments. @@ -3288,7 +2909,7 @@ public final class ManagedComputeDeploymentsListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListManagedComputeDeployments.json + * x-ms-original-file: 2026-07-15-preview/ListManagedComputeDeployments.json */ /** * Sample code: ListManagedComputeDeployments. @@ -3313,7 +2934,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku; */ public final class ManagedComputeDeploymentsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateVmManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/UpdateVmManagedComputeDeployment.json */ /** * Sample code: UpdateVmManagedComputeDeployment. @@ -3329,7 +2950,7 @@ public final class ManagedComputeDeploymentsUpdateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/UpdateManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/UpdateManagedComputeDeployment.json */ /** * Sample code: UpdateManagedComputeDeployment. @@ -3354,7 +2975,7 @@ public final class ManagedComputeDeploymentsUpdateSamples { */ public final class ManagedComputeUsagesOperationGroupListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListManagedComputeUsages.json + * x-ms-original-file: 2026-07-15-preview/ListManagedComputeUsages.json */ /** * Sample code: List Managed Compute Usages. @@ -3378,7 +2999,7 @@ import com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkProvisio */ public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/provisionManagedNetwork.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/provisionManagedNetwork.json */ /** * Sample code: Provision ManagedNetwork. @@ -3402,7 +3023,7 @@ public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { */ public final class ManagedNetworkSettingsOperationDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/deleteManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/deleteManagedNetworkV2.json */ /** * Sample code: Delete ManagedNetworkSettings. @@ -3425,7 +3046,7 @@ public final class ManagedNetworkSettingsOperationDeleteSamples { */ public final class ManagedNetworkSettingsOperationGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/getManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/getManagedNetworkV2.json */ /** * Sample code: Get ManagedNetworkSettings. @@ -3448,7 +3069,7 @@ public final class ManagedNetworkSettingsOperationGetSamples { */ public final class ManagedNetworkSettingsOperationListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/listManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/listManagedNetworkV2.json */ /** * Sample code: List ManagedNetworkSettings. @@ -3481,7 +3102,7 @@ import java.util.Map; */ public final class ManagedNetworkSettingsOperationPatchSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/patchManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/patchManagedNetworkV2.json */ /** * Sample code: Patch ManagedNetworkSettings. @@ -3534,7 +3155,7 @@ import java.util.Map; */ public final class ManagedNetworkSettingsOperationPutSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/createOrUpdateManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/createOrUpdateManagedNetworkV2.json */ /** * Sample code: Put ManagedNetworkSettings. @@ -3577,7 +3198,7 @@ public final class ManagedNetworkSettingsOperationPutSamples { */ public final class ModelCapacitiesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListModelCapacities.json + * x-ms-original-file: 2026-07-15-preview/ListModelCapacities.json */ /** * Sample code: ListModelCapacities. @@ -3590,7 +3211,7 @@ public final class ModelCapacitiesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListModelCapacitiesDataZoneScope.json + * x-ms-original-file: 2026-07-15-preview/ListModelCapacitiesDataZoneScope.json */ /** * Sample code: ListModelCapacities DataZone Scope. @@ -3603,7 +3224,7 @@ public final class ModelCapacitiesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListModelCapacitiesGlobalScope.json + * x-ms-original-file: 2026-07-15-preview/ListModelCapacitiesGlobalScope.json */ /** * Sample code: ListModelCapacities Global Scope. @@ -3616,7 +3237,7 @@ public final class ModelCapacitiesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListModelCapacitiesClassicScope.json + * x-ms-original-file: 2026-07-15-preview/ListModelCapacitiesClassicScope.json */ /** * Sample code: ListModelCapacities Classic Scope. @@ -3638,7 +3259,7 @@ public final class ModelCapacitiesListSamples { */ public final class ModelsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListLocationModels.json + * x-ms-original-file: 2026-07-15-preview/ListLocationModels.json */ /** * Sample code: ListLocationModels. @@ -3660,7 +3281,7 @@ public final class ModelsListSamples { */ public final class NetworkSecurityPerimeterConfigurationsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetNetworkSecurityPerimeterConfigurations.json + * x-ms-original-file: 2026-07-15-preview/GetNetworkSecurityPerimeterConfigurations.json */ /** * Sample code: GetNetworkSecurityPerimeterConfigurations. @@ -3684,7 +3305,7 @@ public final class NetworkSecurityPerimeterConfigurationsGetSamples { */ public final class NetworkSecurityPerimeterConfigurationsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListNetworkSecurityPerimeterConfigurations.json + * x-ms-original-file: 2026-07-15-preview/ListNetworkSecurityPerimeterConfigurations.json */ /** * Sample code: ListNetworkSecurityPerimeterConfigurations. @@ -3707,7 +3328,7 @@ public final class NetworkSecurityPerimeterConfigurationsListSamples { */ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { /* - * x-ms-original-file: 2026-09-15-preview/ReconcileNetworkSecurityPerimeterConfigurations.json + * x-ms-original-file: 2026-07-15-preview/ReconcileNetworkSecurityPerimeterConfigurations.json */ /** * Sample code: ReconcileNetworkSecurityPerimeterConfigurations. @@ -3730,7 +3351,7 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetOperations.json + * x-ms-original-file: 2026-07-15-preview/GetOperations.json */ /** * Sample code: Get Operations. @@ -3755,7 +3376,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RuleStatus; */ public final class OutboundRuleCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/createOrUpdateRuleV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/createOrUpdateRuleV2.json */ /** * Sample code: CreateOrUpdate OutboundRule. @@ -3783,7 +3404,7 @@ public final class OutboundRuleCreateOrUpdateSamples { */ public final class OutboundRuleDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/deleteRuleV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/deleteRuleV2.json */ /** * Sample code: Delete OutboundRule. @@ -3806,7 +3427,7 @@ public final class OutboundRuleDeleteSamples { */ public final class OutboundRuleGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/getRuleV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/getRuleV2.json */ /** * Sample code: Get OutboundRule. @@ -3829,7 +3450,7 @@ public final class OutboundRuleGetSamples { */ public final class OutboundRuleListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/listRuleV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/listRuleV2.json */ /** * Sample code: List OutboundRules. @@ -3859,7 +3480,7 @@ import java.util.Map; */ public final class OutboundRulesOperationPostSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/postOutboundRulesV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/postOutboundRulesV2.json */ /** * Sample code: Post OutboundRules. @@ -3904,7 +3525,7 @@ import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkServiceConn */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutPrivateEndpointConnection.json + * x-ms-original-file: 2026-07-15-preview/PutPrivateEndpointConnection.json */ /** * Sample code: PutPrivateEndpointConnection. @@ -3932,7 +3553,7 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeletePrivateEndpointConnection.json + * x-ms-original-file: 2026-07-15-preview/DeletePrivateEndpointConnection.json */ /** * Sample code: DeletePrivateEndpointConnection. @@ -3955,7 +3576,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetPrivateEndpointConnection.json + * x-ms-original-file: 2026-07-15-preview/GetPrivateEndpointConnection.json */ /** * Sample code: GetPrivateEndpointConnection. @@ -3978,7 +3599,7 @@ public final class PrivateEndpointConnectionsGetSamples { */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListPrivateEndpointConnections.json + * x-ms-original-file: 2026-07-15-preview/ListPrivateEndpointConnections.json */ /** * Sample code: GetPrivateEndpointConnection. @@ -4000,7 +3621,7 @@ public final class PrivateEndpointConnectionsListSamples { */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListPrivateLinkResources.json + * x-ms-original-file: 2026-07-15-preview/ListPrivateLinkResources.json */ /** * Sample code: ListPrivateLinkResources. @@ -4025,7 +3646,7 @@ import java.util.Arrays; */ public final class ProjectCapabilityHostsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectCapabilityHost/createOrUpdate.json + * x-ms-original-file: 2026-07-15-preview/ProjectCapabilityHost/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Project CapabilityHost. @@ -4055,7 +3676,7 @@ public final class ProjectCapabilityHostsCreateOrUpdateSamples { */ public final class ProjectCapabilityHostsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectCapabilityHost/delete.json + * x-ms-original-file: 2026-07-15-preview/ProjectCapabilityHost/delete.json */ /** * Sample code: Delete Project CapabilityHost. @@ -4078,7 +3699,7 @@ public final class ProjectCapabilityHostsDeleteSamples { */ public final class ProjectCapabilityHostsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectCapabilityHost/get.json + * x-ms-original-file: 2026-07-15-preview/ProjectCapabilityHost/get.json */ /** * Sample code: Get Project CapabilityHost. @@ -4102,7 +3723,7 @@ public final class ProjectCapabilityHostsGetSamples { */ public final class ProjectCapabilityHostsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectCapabilityHost/list.json + * x-ms-original-file: 2026-07-15-preview/ProjectCapabilityHost/list.json */ /** * Sample code: List Project CapabilityHosts. @@ -4129,7 +3750,7 @@ import java.time.OffsetDateTime; */ public final class ProjectConnectionsCreateSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/create.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/create.json */ /** * Sample code: CreateProjectConnection. @@ -4157,7 +3778,7 @@ public final class ProjectConnectionsCreateSamples { */ public final class ProjectConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/delete.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/delete.json */ /** * Sample code: DeleteProjectConnection. @@ -4181,7 +3802,7 @@ public final class ProjectConnectionsDeleteSamples { */ public final class ProjectConnectionsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/get.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/get.json */ /** * Sample code: GetProjectConnection. @@ -4205,7 +3826,7 @@ public final class ProjectConnectionsGetSamples { */ public final class ProjectConnectionsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/list.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/list.json */ /** * Sample code: ListProjectConnection. @@ -4237,7 +3858,7 @@ import java.util.Map; */ public final class ProjectConnectionsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/update.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/update.json */ /** * Sample code: UpdateProjectConnection. @@ -4285,7 +3906,7 @@ import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType; */ public final class ProjectsCreateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateProjectMin.json + * x-ms-original-file: 2026-07-15-preview/CreateProjectMin.json */ /** * Sample code: Create Project Min. @@ -4303,7 +3924,7 @@ public final class ProjectsCreateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/CreateProject.json + * x-ms-original-file: 2026-07-15-preview/CreateProject.json */ /** * Sample code: Create Project. @@ -4335,7 +3956,7 @@ public final class ProjectsCreateSamples { */ public final class ProjectsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteProject.json + * x-ms-original-file: 2026-07-15-preview/DeleteProject.json */ /** * Sample code: Delete Project. @@ -4356,7 +3977,7 @@ public final class ProjectsDeleteSamples { */ public final class ProjectsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetProject.json + * x-ms-original-file: 2026-07-15-preview/GetProject.json */ /** * Sample code: Get Project. @@ -4378,7 +3999,7 @@ public final class ProjectsGetSamples { */ public final class ProjectsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListProjects.json + * x-ms-original-file: 2026-07-15-preview/ListProjects.json */ /** * Sample code: List Project. @@ -4402,7 +4023,7 @@ import com.azure.resourcemanager.cognitiveservices.models.ProjectProperties; */ public final class ProjectsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateProjects.json + * x-ms-original-file: 2026-07-15-preview/UpdateProjects.json */ /** * Sample code: Update Project. @@ -4429,7 +4050,7 @@ import com.azure.resourcemanager.cognitiveservices.models.TierUpgradePolicy; */ public final class QuotaTiersCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateQuotaTier.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateQuotaTier.json */ /** * Sample code: Update the quota tier resource for a subscription. @@ -4454,7 +4075,7 @@ public final class QuotaTiersCreateOrUpdateSamples { */ public final class QuotaTiersGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetQuotaTier.json + * x-ms-original-file: 2026-07-15-preview/GetQuotaTier.json */ /** * Sample code: Get the Quota Tier information for a subscription. @@ -4476,7 +4097,7 @@ public final class QuotaTiersGetSamples { */ public final class QuotaTiersListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListQuotaTiers.json + * x-ms-original-file: 2026-07-15-preview/ListQuotaTiers.json */ /** * Sample code: List the Quota Tier for a subscription. @@ -4502,7 +4123,7 @@ import com.azure.resourcemanager.cognitiveservices.models.TierUpgradePolicy; */ public final class QuotaTiersUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateQuotaTier.json + * x-ms-original-file: 2026-07-15-preview/UpdateQuotaTier.json */ /** * Sample code: Update the quota tier resource for a subscription. @@ -4520,125 +4141,6 @@ public final class QuotaTiersUpdateSamples { } ``` -### RaiBindings_CreateOrUpdate - -```java -import com.azure.resourcemanager.cognitiveservices.models.RaiBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingProperties; - -/** - * Samples for RaiBindings CreateOrUpdate. - */ -public final class RaiBindingsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/PutRaiBinding.json - */ - /** - * Sample code: Bind an Azure OpenAI deployment to an ACS policy. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void bindAnAzureOpenAIDeploymentToAnACSPolicy( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiBindings() - .define("chat-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiBindingProperties().withBoundResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group/providers/Microsoft.CognitiveServices/accounts/aoai-account/deployments/chat-prod") - .withTargetPolicyName("agent-guard")) - .withIfNoneMatch("*") - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/UpdateRaiBinding.json - */ - /** - * Sample code: Update a RAI binding target conditionally across subscriptions. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateARAIBindingTargetConditionallyAcrossSubscriptions( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - RaiBinding resource = manager.raiBindings() - .getWithResponse("resource-group", "safety-account", "chat-guard", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new RaiBindingProperties().withBoundResourceId( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/target-resource-group/providers/Microsoft.CognitiveServices/accounts/aoai-account/deployments/chat-canary") - .withTargetPolicyName("agent-guard-v2")) - .withIfMatch("\"00000000-0000-0000-0000-000000000002\"") - .apply(); - } -} -``` - -### RaiBindings_Delete - -```java -/** - * Samples for RaiBindings Delete. - */ -public final class RaiBindingsDeleteSamples { - /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiBinding.json - */ - /** - * Sample code: Delete a RAI binding. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void deleteARAIBinding(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiBindings() - .deleteWithResponse("resource-group", "safety-account", "chat-guard", - "\"00000000-0000-0000-0000-000000000002\"", com.azure.core.util.Context.NONE); - } -} -``` - -### RaiBindings_Get - -```java -/** - * Samples for RaiBindings Get. - */ -public final class RaiBindingsGetSamples { - /* - * x-ms-original-file: 2026-09-15-preview/GetRaiBinding.json - */ - /** - * Sample code: Get a RAI binding. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void getARAIBinding(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiBindings() - .getWithResponse("resource-group", "safety-account", "chat-guard", com.azure.core.util.Context.NONE); - } -} -``` - -### RaiBindings_List - -```java -/** - * Samples for RaiBindings List. - */ -public final class RaiBindingsListSamples { - /* - * x-ms-original-file: 2026-09-15-preview/ListRaiBindings.json - */ - /** - * Sample code: List RAI bindings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void listRAIBindings(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiBindings().list("resource-group", "safety-account", 50, com.azure.core.util.Context.NONE); - } -} -``` - ### RaiBlocklistItems_BatchAdd ```java @@ -4651,7 +4153,7 @@ import java.util.Arrays; */ public final class RaiBlocklistItemsBatchAddSamples { /* - * x-ms-original-file: 2026-09-15-preview/AddRaiBlocklistItems.json + * x-ms-original-file: 2026-07-15-preview/AddRaiBlocklistItems.json */ /** * Sample code: AddRaiBlocklistItems. @@ -4683,7 +4185,7 @@ import java.util.Arrays; */ public final class RaiBlocklistItemsBatchDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiBlocklistItems.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiBlocklistItems.json */ /** * Sample code: DeleteRaiBlocklistItems. @@ -4709,7 +4211,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistItemProper */ public final class RaiBlocklistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiBlocklistItem.json + * x-ms-original-file: 2026-07-15-preview/PutRaiBlocklistItem.json */ /** * Sample code: PutRaiBlocklistItem. @@ -4735,7 +4237,7 @@ public final class RaiBlocklistItemsCreateOrUpdateSamples { */ public final class RaiBlocklistItemsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiBlocklistItem.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiBlocklistItem.json */ /** * Sample code: DeleteRaiBlocklistItem. @@ -4759,7 +4261,7 @@ public final class RaiBlocklistItemsDeleteSamples { */ public final class RaiBlocklistItemsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiBlocklistItem.json + * x-ms-original-file: 2026-07-15-preview/GetRaiBlocklistItem.json */ /** * Sample code: GetRaiBlocklistItem. @@ -4783,7 +4285,7 @@ public final class RaiBlocklistItemsGetSamples { */ public final class RaiBlocklistItemsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListBlocklistItems.json + * x-ms-original-file: 2026-07-15-preview/ListBlocklistItems.json */ /** * Sample code: ListBlocklistItems. @@ -4808,7 +4310,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistProperties */ public final class RaiBlocklistsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiBlocklist.json + * x-ms-original-file: 2026-07-15-preview/PutRaiBlocklist.json */ /** * Sample code: PutRaiBlocklist. @@ -4833,7 +4335,7 @@ public final class RaiBlocklistsCreateOrUpdateSamples { */ public final class RaiBlocklistsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiBlocklist.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiBlocklist.json */ /** * Sample code: DeleteRaiBlocklist. @@ -4856,7 +4358,7 @@ public final class RaiBlocklistsDeleteSamples { */ public final class RaiBlocklistsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiBlocklist.json + * x-ms-original-file: 2026-07-15-preview/GetRaiBlocklist.json */ /** * Sample code: GetRaiBlocklist. @@ -4878,7 +4380,7 @@ public final class RaiBlocklistsGetSamples { */ public final class RaiBlocklistsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListBlocklists.json + * x-ms-original-file: 2026-07-15-preview/ListBlocklists.json */ /** * Sample code: ListBlocklists. @@ -4899,7 +4401,7 @@ public final class RaiBlocklistsListSamples { */ public final class RaiContentFiltersGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiContentFilter.json + * x-ms-original-file: 2026-07-15-preview/GetRaiContentFilter.json */ /** * Sample code: GetRaiContentFilters. @@ -4921,7 +4423,7 @@ public final class RaiContentFiltersGetSamples { */ public final class RaiContentFiltersListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiContentFilters.json + * x-ms-original-file: 2026-07-15-preview/ListRaiContentFilters.json */ /** * Sample code: ListRaiContentFilters. @@ -4946,7 +4448,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiExternalSafetyProvi */ public final class RaiExternalSafetyProviderCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiExternalSafetyProvider.json + * x-ms-original-file: 2026-07-15-preview/PutRaiExternalSafetyProvider.json */ /** * Sample code: PutRaiExternalSafetyProvider. @@ -4977,7 +4479,7 @@ public final class RaiExternalSafetyProviderCreateOrUpdateSamples { */ public final class RaiExternalSafetyProviderDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiExternalSafetyProvider.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiExternalSafetyProvider.json */ /** * Sample code: DeleteRaiTopic. @@ -4998,7 +4500,7 @@ public final class RaiExternalSafetyProviderDeleteSamples { */ public final class RaiExternalSafetyProviderGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiExternalSafetyProvider.json + * x-ms-original-file: 2026-07-15-preview/GetRaiExternalSafetyProvider.json */ /** * Sample code: GetRaiExternalSafetyProvider. @@ -5020,7 +4522,7 @@ public final class RaiExternalSafetyProviderGetSamples { */ public final class RaiExternalSafetyProvidersOperationListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiExternalSafetyProviders.json + * x-ms-original-file: 2026-07-15-preview/ListRaiExternalSafetyProviders.json */ /** * Sample code: ListRaiExternalSafetyProviders. @@ -5037,26 +4539,7 @@ public final class RaiExternalSafetyProvidersOperationListSamples { ### RaiPolicies_CreateOrUpdate ```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; -import com.azure.resourcemanager.cognitiveservices.models.CustomBlocklistConfig; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoints; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsManifest; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsRegoPolicyDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderOperation; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderTransform; @@ -5073,22 +4556,16 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressScheme; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentFilter; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyCustomExternalSafetyProviderReference; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyProperties; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoReference; -import java.io.IOException; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; /** * Samples for RaiPolicies CreateOrUpdate. */ public final class RaiPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/PutRaiPolicy.json */ /** * Sample code: PutRaiPolicy. @@ -5162,143 +4639,7 @@ public final class RaiPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/PutRaiPolicyAcs.json - */ - /** - * Sample code: Create an ACS policy with optional policy dependencies. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void createAnACSPolicyWithOptionalPolicyDependencies( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) throws IOException { - manager.raiPolicies() - .define("agent-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs(new RaiAcsManifest().withAgentControlSpecificationVersion("0.4.0-alpha.1") - .withMetadata(mapOf("name", "agent-guard")) - .withPolicies(mapOf("input-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.input_guard.verdict"), - "tool-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.tool_guard.verdict"))) - .withInterventionPoints(new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.INPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("input-guard") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList(new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROMPT_INJECTION)))))) - .withPreToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("tool-guard")) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME)) - .withPostToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("tool-guard")) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME))) - .withTools(mapOf("web_search", - new RaiAcsToolDefinition().withId("web_search") - .withType("retrieval") - .withDescription("Search approved public documentation") - .withSecurityLabels(Arrays.asList("network_egress", "untrusted_content")) - .withClearance("public") - .withAdditionalProperties(mapOf("allowed_domains", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("[\"learn.microsoft.com\"]", Object.class, SerializerEncoding.JSON))), - "wire_transfer", - new RaiAcsToolDefinition().withId("wire_transfer") - .withType("financial_action") - .withSecurityLabels(Arrays.asList("financial_write")) - .withClearance("confidential") - .withAdditionalProperties(mapOf()))) - .withAnnotators(new RaiAcsEmptyObject())) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("input-guard"), - new RaiRegoReference().withRegoName("tool-guard"))) - .withCustomBlocklists(Arrays.asList(new CustomBlocklistConfig().withBlocklistName("blocked-terms") - .withBlocking(true) - .withSource(RaiPolicyContentSource.PROMPT))) - .withCustomExternalSafetyProviders(Arrays.asList(new RaiPolicyCustomExternalSafetyProviderReference() - .withExternalSafetyProviderName("contoso-safety-provider") - .withManagedIdentityResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/safety-provider-identity") - .withSource(RaiPolicyContentSource.PROMPT) - .withBlocking(true)))) - .withIfNoneMatch("*") - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/UpdateRaiPolicyAcs.json - */ - /** - * Sample code: Replace an ACS policy conditionally. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void replaceAnACSPolicyConditionally( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) throws IOException { - manager.raiPolicies() - .define("agent-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs(new RaiAcsManifest().withAgentControlSpecificationVersion("0.4.0-alpha.1") - .withPolicies(mapOf("input-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.input_guard.verdict"), - "tool-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.tool_guard.verdict"))) - .withInterventionPoints(new RaiAcsInterventionPoints().withInput(new RaiAcsInterventionPoint() - .withPolicyTarget(RaiAcsPolicyTarget.INPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("input-guard") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.HATE) - .withHarmConfigId("Hate_Text_MultiSev"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROMPT_INJECTION)))))) - .withPreToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("tool-guard")) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME)) - .withPostToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("tool-guard")) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME))) - .withTools(mapOf("web_search", - new RaiAcsToolDefinition().withId("web_search") - .withType("retrieval") - .withDescription("Search approved public documentation and approved partner sites") - .withSecurityLabels(Arrays.asList("network_egress", "untrusted_content")) - .withClearance("public") - .withAdditionalProperties(mapOf("allowed_domains", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("[\"learn.microsoft.com\",\"support.microsoft.com\"]", Object.class, - SerializerEncoding.JSON))), - "wire_transfer", - new RaiAcsToolDefinition().withId("wire_transfer") - .withType("financial_action") - .withSecurityLabels(Arrays.asList("financial_write")) - .withClearance("confidential") - .withAdditionalProperties(mapOf())))) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("input-guard"), - new RaiRegoReference().withRegoName("tool-guard"))) - .withCustomBlocklists(Arrays.asList()) - .withCustomExternalSafetyProviders(Arrays.asList())) - .withIfMatch("\"00000000-0000-0000-0000-000000000003\"") - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/PutRaiPolicyWithEgress.json + * x-ms-original-file: 2026-07-15-preview/PutRaiPolicyWithEgress.json */ /** * Sample code: PutRaiPolicyWithEgress. @@ -5347,45 +4688,6 @@ public final class RaiPoliciesCreateOrUpdateSamples { .withPath("/v2/"))))))) .create(); } - - /* - * x-ms-original-file: 2026-09-15-preview/PutRaiPolicyAcsWithoutTools.json - */ - /** - * Sample code: Create an ACS policy without a tool catalog. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void createAnACSPolicyWithoutAToolCatalog( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiPolicies() - .define("input-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs(new RaiAcsManifest().withAgentControlSpecificationVersion("0.4.0-alpha.1") - .withPolicies(mapOf("input-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.input_guard.verdict"))) - .withInterventionPoints(new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.INPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("input-guard"))))) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("input-guard")))) - .withIfNoneMatch("*") - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } } ``` @@ -5397,21 +4699,7 @@ public final class RaiPoliciesCreateOrUpdateSamples { */ public final class RaiPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiPolicyAcs.json - */ - /** - * Sample code: Delete an ACS policy. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void deleteAnACSPolicy(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiPolicies() - .delete("resource-group", "safety-account", "agent-guard", "\"00000000-0000-0000-0000-000000000003\"", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiPolicy.json */ /** * Sample code: DeleteRaiPolicy. @@ -5420,7 +4708,7 @@ public final class RaiPoliciesDeleteSamples { */ public static void deleteRaiPolicy(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { manager.raiPolicies() - .delete("resourceGroupName", "accountName", "raiPolicyName", null, com.azure.core.util.Context.NONE); + .delete("resourceGroupName", "accountName", "raiPolicyName", com.azure.core.util.Context.NONE); } } ``` @@ -5433,7 +4721,7 @@ public final class RaiPoliciesDeleteSamples { */ public final class RaiPoliciesGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/GetRaiPolicy.json */ /** * Sample code: GetRaiPolicy. @@ -5444,19 +4732,6 @@ public final class RaiPoliciesGetSamples { manager.raiPolicies() .getWithResponse("resourceGroupName", "accountName", "raiPolicyName", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: 2026-09-15-preview/GetRaiPolicyAcs.json - */ - /** - * Sample code: Get an ACS policy. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void getAnACSPolicy(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiPolicies() - .getWithResponse("resource-group", "safety-account", "agent-guard", com.azure.core.util.Context.NONE); - } } ``` @@ -5468,7 +4743,7 @@ public final class RaiPoliciesGetSamples { */ public final class RaiPoliciesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiPolicies.json + * x-ms-original-file: 2026-07-15-preview/ListRaiPolicies.json */ /** * Sample code: ListRaiPolicies. @@ -5481,142 +4756,6 @@ public final class RaiPoliciesListSamples { } ``` -### RaiRegos_CreateOrUpdate - -```java -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoEncoding; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RaiRegos CreateOrUpdate. - */ -public final class RaiRegosCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/UpdateRaiRego.json - */ - /** - * Sample code: Replace a reusable Rego artifact conditionally. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void replaceAReusableRegoArtifactConditionally( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos() - .define("input-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiRegoProperties().withEncoding(RaiRegoEncoding.NONE) - .withRego( - "package input_guard\n\nimport rego.v1\n\ndefault verdict := {\"decision\": \"allow\"}\n\nblocking_signal if {\n input.snapshot.moderation.harm.PromptInjection.detected\n}\n\nblocking_signal if {\n input.snapshot.moderation.harm.Hate.severity >= 4\n}\n\nverdict := {\"decision\": \"deny\", \"reason\": \"unsafe_input\"} if {\n blocking_signal\n}")) - .withIfMatch("\"00000000-0000-0000-0000-000000000001\"") - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/PutRaiRego.json - */ - /** - * Sample code: Create a reusable Rego artifact. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - createAReusableRegoArtifact(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos() - .define("input-guard") - .withExistingAccount("resource-group", "safety-account") - .withTags(mapOf("environment", "production")) - .withProperties(new RaiRegoProperties().withEncoding(RaiRegoEncoding.NONE) - .withRego( - "package input_guard\n\nimport rego.v1\n\ndefault verdict := {\"decision\": \"allow\"}\n\nverdict := {\"decision\": \"deny\", \"reason\": \"prompt_injection_detected\"} if {\n input.snapshot.moderation.harm.PromptInjection.detected\n}")) - .withIfNoneMatch("*") - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### RaiRegos_Delete - -```java -/** - * Samples for RaiRegos Delete. - */ -public final class RaiRegosDeleteSamples { - /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiRego.json - */ - /** - * Sample code: Delete a reusable Rego artifact. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - deleteAReusableRegoArtifact(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos() - .deleteWithResponse("resource-group", "safety-account", "input-guard", - "\"00000000-0000-0000-0000-000000000001\"", com.azure.core.util.Context.NONE); - } -} -``` - -### RaiRegos_Get - -```java -/** - * Samples for RaiRegos Get. - */ -public final class RaiRegosGetSamples { - /* - * x-ms-original-file: 2026-09-15-preview/GetRaiRego.json - */ - /** - * Sample code: Get a reusable Rego artifact. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - getAReusableRegoArtifact(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos() - .getWithResponse("resource-group", "safety-account", "input-guard", com.azure.core.util.Context.NONE); - } -} -``` - -### RaiRegos_List - -```java -/** - * Samples for RaiRegos List. - */ -public final class RaiRegosListSamples { - /* - * x-ms-original-file: 2026-09-15-preview/ListRaiRegos.json - */ - /** - * Sample code: List reusable Rego artifacts. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - listReusableRegoArtifacts(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos().list("resource-group", "safety-account", 10, com.azure.core.util.Context.NONE); - } -} -``` - ### RaiToolLabels_CreateOrUpdate ```java @@ -5632,7 +4771,7 @@ import java.util.Map; */ public final class RaiToolLabelsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiToolLabel.json + * x-ms-original-file: 2026-07-15-preview/PutRaiToolLabel.json */ /** * Sample code: PutRaiToolLabel. @@ -5676,7 +4815,7 @@ public final class RaiToolLabelsCreateOrUpdateSamples { */ public final class RaiToolLabelsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiToolLabel.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiToolLabel.json */ /** * Sample code: DeleteRaiToolLabel. @@ -5699,7 +4838,7 @@ public final class RaiToolLabelsDeleteSamples { */ public final class RaiToolLabelsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiToolLabel.json + * x-ms-original-file: 2026-07-15-preview/GetRaiToolLabel.json */ /** * Sample code: GetRaiToolLabel. @@ -5721,7 +4860,7 @@ public final class RaiToolLabelsGetSamples { */ public final class RaiToolLabelsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiToolLabels.json + * x-ms-original-file: 2026-07-15-preview/ListRaiToolLabels.json */ /** * Sample code: ListRaiToolLabels. @@ -5744,7 +4883,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiTopicProperties; */ public final class RaiTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiTopic.json + * x-ms-original-file: 2026-07-15-preview/PutRaiTopic.json */ /** * Sample code: PutRaiTopic. @@ -5771,7 +4910,7 @@ public final class RaiTopicsCreateOrUpdateSamples { */ public final class RaiTopicsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiTopic.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiTopic.json */ /** * Sample code: DeleteRaiTopic. @@ -5793,7 +4932,7 @@ public final class RaiTopicsDeleteSamples { */ public final class RaiTopicsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiTopic.json + * x-ms-original-file: 2026-07-15-preview/GetRaiTopic.json */ /** * Sample code: GetRaiTopic. @@ -5815,7 +4954,7 @@ public final class RaiTopicsGetSamples { */ public final class RaiTopicsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiTopics.json + * x-ms-original-file: 2026-07-15-preview/ListRaiTopics.json */ /** * Sample code: ListRaiTopics. @@ -5842,7 +4981,7 @@ import java.util.Arrays; */ public final class ResourceProviderCalculateModelCapacitySamples { /* - * x-ms-original-file: 2026-09-15-preview/CalculateModelCapacity.json + * x-ms-original-file: 2026-07-15-preview/CalculateModelCapacity.json */ /** * Sample code: Calculate Model Capacity. @@ -5877,7 +5016,7 @@ import com.azure.resourcemanager.cognitiveservices.models.CheckDomainAvailabilit */ public final class ResourceProviderCheckDomainAvailabilitySamples { /* - * x-ms-original-file: 2026-09-15-preview/CheckDomainAvailability.json + * x-ms-original-file: 2026-07-15-preview/CheckDomainAvailability.json */ /** * Sample code: Check SKU Availability. @@ -5906,7 +5045,7 @@ import java.util.Arrays; */ public final class ResourceProviderCheckSkuAvailabilitySamples { /* - * x-ms-original-file: 2026-09-15-preview/CheckSkuAvailability.json + * x-ms-original-file: 2026-07-15-preview/CheckSkuAvailability.json */ /** * Sample code: Check SKU Availability. @@ -5933,7 +5072,7 @@ public final class ResourceProviderCheckSkuAvailabilitySamples { */ public final class ResourceSkusListSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetSkus.json + * x-ms-original-file: 2026-07-15-preview/GetSkus.json */ /** * Sample code: Regenerate Keys. @@ -5962,7 +5101,7 @@ import java.util.Arrays; */ public final class SubscriptionRaiPolicyCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutSubscriptionRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/PutSubscriptionRaiPolicy.json */ /** * Sample code: PutRaiPolicy. @@ -6045,7 +5184,7 @@ public final class SubscriptionRaiPolicyCreateOrUpdateSamples { */ public final class SubscriptionRaiPolicyDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteSubscriptionRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/DeleteSubscriptionRaiPolicy.json */ /** * Sample code: DeleteRaiPolicy. @@ -6066,7 +5205,7 @@ public final class SubscriptionRaiPolicyDeleteSamples { */ public final class SubscriptionRaiPolicyGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetSubscriptionRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/GetSubscriptionRaiPolicy.json */ /** * Sample code: GetRaiPolicy. @@ -6089,7 +5228,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiExternalSafetyProvi */ public final class TestRaiExternalSafetyProviderCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/TestRaiExternalSafetyProvider.json + * x-ms-original-file: 2026-07-15-preview/TestRaiExternalSafetyProvider.json */ /** * Sample code: TestRaiExternalSafetyProvider. @@ -6122,7 +5261,7 @@ public final class TestRaiExternalSafetyProviderCreateOrUpdateSamples { */ public final class UsagesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListUsages.json + * x-ms-original-file: 2026-07-15-preview/ListUsages.json */ /** * Sample code: Get Usages. @@ -6134,7 +5273,7 @@ public final class UsagesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListUsagesClassicScope.json + * x-ms-original-file: 2026-07-15-preview/ListUsagesClassicScope.json */ /** * Sample code: Get Usages Classic Scope. @@ -6147,7 +5286,7 @@ public final class UsagesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListUsagesDataZoneScope.json + * x-ms-original-file: 2026-07-15-preview/ListUsagesDataZoneScope.json */ /** * Sample code: Get Usages DataZone Scope. @@ -6160,20 +5299,7 @@ public final class UsagesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListUsagesWithResourceMetadata.json - */ - /** - * Sample code: Get Usages With Resource Metadata. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - getUsagesWithResourceMetadata(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.usages().list("WestUS", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-15-preview/ListUsagesGlobalScope.json + * x-ms-original-file: 2026-07-15-preview/ListUsagesGlobalScope.json */ /** * Sample code: Get Usages Global Scope. @@ -6203,26 +5329,7 @@ import java.util.Map; */ public final class WorkbenchesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutWorkbenchPending.json - */ - /** - * Sample code: PutWorkbenchPending. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - putWorkbenchPending(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.workbenches() - .define("myWorkbench") - .withExistingProject("rgcognitiveservices", "myAccount", "myProject") - .withProperties(new WorkbenchProperties().withTargetClusterId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.CognitiveServices/accounts/myAccount/computes/myCluster") - .withImageLink("mcr.microsoft.com/azureml/curated/pytorch-gpu:latest")) - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/PutWorkbench.json + * x-ms-original-file: 2026-07-15-preview/PutWorkbench.json */ /** * Sample code: PutWorkbench. @@ -6234,13 +5341,12 @@ public final class WorkbenchesCreateOrUpdateSamples { .define("myWorkbench") .withExistingProject("rgcognitiveservices", "myAccount", "myProject") .withProperties(new WorkbenchProperties().withTargetClusterId( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/vc-rg/providers/Microsoft.MachineLearningServices/virtualClusters/test-vc") + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.CognitiveServices/accounts/myAccount/computes/myCluster") .withImageLink("mcr.microsoft.com/azureml/curated/pytorch-gpu:latest") - .withInstanceType("Singularity.ND12_H100_v5-n1") - .withGpuCount(1) .withIdleTimeBeforeShutdown("PT30M") .withDatasetId("dataset-12345") .withSshSettings(new SshSettings().withSshPublicKey("fakeTokenPlaceholder").withAdminEnabled(true))) + .withRegion("eastus") .withIdentity(new Identity().withType(ResourceIdentityType.USER_ASSIGNED) .withUserAssignedIdentities(mapOf( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", @@ -6270,7 +5376,7 @@ public final class WorkbenchesCreateOrUpdateSamples { */ public final class WorkbenchesDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteWorkbench.json + * x-ms-original-file: 2026-07-15-preview/DeleteWorkbench.json */ /** * Sample code: DeleteWorkbench. @@ -6292,7 +5398,7 @@ public final class WorkbenchesDeleteSamples { */ public final class WorkbenchesGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetWorkbench.json + * x-ms-original-file: 2026-07-15-preview/GetWorkbench.json */ /** * Sample code: GetWorkbench. @@ -6315,7 +5421,7 @@ public final class WorkbenchesGetSamples { */ public final class WorkbenchesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListWorkbenches.json + * x-ms-original-file: 2026-07-15-preview/ListWorkbenches.json */ /** * Sample code: ListWorkbenches. @@ -6336,7 +5442,7 @@ public final class WorkbenchesListSamples { */ public final class WorkbenchesRestartSamples { /* - * x-ms-original-file: 2026-09-15-preview/RestartWorkbench.json + * x-ms-original-file: 2026-07-15-preview/RestartWorkbench.json */ /** * Sample code: RestartWorkbench. @@ -6358,7 +5464,7 @@ public final class WorkbenchesRestartSamples { */ public final class WorkbenchesStartSamples { /* - * x-ms-original-file: 2026-09-15-preview/StartWorkbench.json + * x-ms-original-file: 2026-07-15-preview/StartWorkbench.json */ /** * Sample code: StartWorkbench. @@ -6380,7 +5486,7 @@ public final class WorkbenchesStartSamples { */ public final class WorkbenchesStopSamples { /* - * x-ms-original-file: 2026-09-15-preview/StopWorkbench.json + * x-ms-original-file: 2026-07-15-preview/StopWorkbench.json */ /** * Sample code: StopWorkbench. @@ -6397,11 +5503,9 @@ public final class WorkbenchesStopSamples { ### Workbenches_Update ```java -import com.azure.resourcemanager.cognitiveservices.models.Identity; -import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType; -import com.azure.resourcemanager.cognitiveservices.models.UserAssignedIdentity; +import com.azure.resourcemanager.cognitiveservices.models.SshSettings; import com.azure.resourcemanager.cognitiveservices.models.Workbench; -import com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdateProperties; +import com.azure.resourcemanager.cognitiveservices.models.WorkbenchProperties; import java.util.HashMap; import java.util.Map; @@ -6410,65 +5514,29 @@ import java.util.Map; */ public final class WorkbenchesUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateWorkbenchComputeProperties.json + * x-ms-original-file: 2026-07-15-preview/UpdateWorkbench.json */ /** - * Sample code: UpdateWorkbenchComputeProperties. + * Sample code: UpdateWorkbench. * * @param manager Entry point to CognitiveServicesManager. */ - public static void - updateWorkbenchComputeProperties(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { + public static void updateWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { Workbench resource = manager.workbenches() .getWithResponse("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withProperties(new WorkbenchUpdateProperties().withTargetClusterId( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/vc-rg/providers/Microsoft.MachineLearningServices/virtualClusters/test-vc") + .withTags(mapOf("environment", "production")) + .withProperties(new WorkbenchProperties().withTargetClusterId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.CognitiveServices/accounts/myAccount/computes/myCluster") + .withImageLink("mcr.microsoft.com/azureml/curated/pytorch-gpu:v2") .withIdleTimeBeforeShutdown("PT1H") - .withInstanceType("Singularity.ND12_H100_v5-n1") - .withGpuCount(1)) - .withIdentity(new Identity().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - new UserAssignedIdentity()))) + .withDatasetId("dataset-67890") + .withSshSettings(new SshSettings().withSshPublicKey("fakeTokenPlaceholder").withAdminEnabled(true))) .apply(); } - /* - * x-ms-original-file: 2026-09-15-preview/UpdateWorkbench.json - */ - /** - * Sample code: UpdateWorkbench. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - Workbench resource = manager.workbenches() - .getWithResponse("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withProperties(new WorkbenchUpdateProperties().withIdleTimeBeforeShutdown("PT1H")).apply(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/UpdateWorkbenchResetComputeProperties.json - */ - /** - * Sample code: UpdateWorkbenchResetComputeProperties. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateWorkbenchResetComputeProperties( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - Workbench resource = manager.workbenches() - .getWithResponse("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withProperties(new WorkbenchUpdateProperties()).apply(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml index 5cca432d01aa..e2ffd82d701f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-cognitiveservices - 1.5.0-beta.6 + 1.5.0-beta.5 jar Microsoft Azure SDK for CognitiveServices Management - This package contains Microsoft Azure SDK for CognitiveServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Cognitive Services Management Client. Package api-version 2026-09-15-preview. + This package contains Microsoft Azure SDK for CognitiveServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Cognitive Services Management Client. Package api-version 2026-07-15-preview. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java index 97b72830c765..f6a97fdfe1a4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java @@ -28,7 +28,6 @@ import com.azure.resourcemanager.cognitiveservices.implementation.AccountCapabilityHostsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.AccountConnectionsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.AccountsImpl; -import com.azure.resourcemanager.cognitiveservices.implementation.AdapterDeploymentsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.AgentApplicationsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.AgentDeploymentsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.ArcDeploymentsImpl; @@ -37,7 +36,6 @@ import com.azure.resourcemanager.cognitiveservices.implementation.CommitmentTiersImpl; import com.azure.resourcemanager.cognitiveservices.implementation.ComputeOperationsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.ComputesImpl; -import com.azure.resourcemanager.cognitiveservices.implementation.CostControlsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.DefenderForAISettingsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.DeletedAccountsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.DeploymentsImpl; @@ -60,14 +58,12 @@ import com.azure.resourcemanager.cognitiveservices.implementation.ProjectConnectionsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.ProjectsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.QuotaTiersImpl; -import com.azure.resourcemanager.cognitiveservices.implementation.RaiBindingsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.RaiBlocklistItemsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.RaiBlocklistsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.RaiContentFiltersImpl; import com.azure.resourcemanager.cognitiveservices.implementation.RaiExternalSafetyProvidersImpl; import com.azure.resourcemanager.cognitiveservices.implementation.RaiExternalSafetyProvidersOperationsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.RaiPoliciesImpl; -import com.azure.resourcemanager.cognitiveservices.implementation.RaiRegosImpl; import com.azure.resourcemanager.cognitiveservices.implementation.RaiToolLabelsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.RaiTopicsImpl; import com.azure.resourcemanager.cognitiveservices.implementation.ResourceProvidersImpl; @@ -79,7 +75,6 @@ import com.azure.resourcemanager.cognitiveservices.models.AccountCapabilityHosts; import com.azure.resourcemanager.cognitiveservices.models.AccountConnections; import com.azure.resourcemanager.cognitiveservices.models.Accounts; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeployments; import com.azure.resourcemanager.cognitiveservices.models.AgentApplications; import com.azure.resourcemanager.cognitiveservices.models.AgentDeployments; import com.azure.resourcemanager.cognitiveservices.models.ArcDeployments; @@ -87,7 +82,6 @@ import com.azure.resourcemanager.cognitiveservices.models.CommitmentTiers; import com.azure.resourcemanager.cognitiveservices.models.ComputeOperations; import com.azure.resourcemanager.cognitiveservices.models.Computes; -import com.azure.resourcemanager.cognitiveservices.models.CostControls; import com.azure.resourcemanager.cognitiveservices.models.DefenderForAISettings; import com.azure.resourcemanager.cognitiveservices.models.DeletedAccounts; import com.azure.resourcemanager.cognitiveservices.models.Deployments; @@ -110,14 +104,12 @@ import com.azure.resourcemanager.cognitiveservices.models.ProjectConnections; import com.azure.resourcemanager.cognitiveservices.models.Projects; import com.azure.resourcemanager.cognitiveservices.models.QuotaTiers; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindings; import com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistItems; import com.azure.resourcemanager.cognitiveservices.models.RaiBlocklists; import com.azure.resourcemanager.cognitiveservices.models.RaiContentFilters; import com.azure.resourcemanager.cognitiveservices.models.RaiExternalSafetyProviders; import com.azure.resourcemanager.cognitiveservices.models.RaiExternalSafetyProvidersOperations; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicies; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegos; import com.azure.resourcemanager.cognitiveservices.models.RaiToolLabels; import com.azure.resourcemanager.cognitiveservices.models.RaiTopics; import com.azure.resourcemanager.cognitiveservices.models.ResourceProviders; @@ -159,10 +151,6 @@ public final class CognitiveServicesManager { private SubscriptionRaiPolicies subscriptionRaiPolicies; - private RaiRegos raiRegos; - - private RaiBindings raiBindings; - private RaiBlocklistItems raiBlocklistItems; private RaiBlocklists raiBlocklists; @@ -191,8 +179,6 @@ public final class CognitiveServicesManager { private ManagedComputeDeployments managedComputeDeployments; - private AdapterDeployments adapterDeployments; - private ComputeOperations computeOperations; private ManagedComputeUsagesOperationGroups managedComputeUsagesOperationGroups; @@ -203,8 +189,6 @@ public final class CognitiveServicesManager { private ManagedComputeCapacities managedComputeCapacities; - private CostControls costControls; - private PrivateLinkResources privateLinkResources; private TestRaiExternalSafetyProviders testRaiExternalSafetyProviders; @@ -576,30 +560,6 @@ public SubscriptionRaiPolicies subscriptionRaiPolicies() { return subscriptionRaiPolicies; } - /** - * Gets the resource collection API of RaiRegos. It manages RaiRego. - * - * @return Resource collection API of RaiRegos. - */ - public RaiRegos raiRegos() { - if (this.raiRegos == null) { - this.raiRegos = new RaiRegosImpl(clientObject.getRaiRegos(), this); - } - return raiRegos; - } - - /** - * Gets the resource collection API of RaiBindings. It manages RaiBinding. - * - * @return Resource collection API of RaiBindings. - */ - public RaiBindings raiBindings() { - if (this.raiBindings == null) { - this.raiBindings = new RaiBindingsImpl(clientObject.getRaiBindings(), this); - } - return raiBindings; - } - /** * Gets the resource collection API of RaiBlocklistItems. It manages RaiBlocklistItem. * @@ -771,18 +731,6 @@ public ManagedComputeDeployments managedComputeDeployments() { return managedComputeDeployments; } - /** - * Gets the resource collection API of AdapterDeployments. It manages AdapterDeployment. - * - * @return Resource collection API of AdapterDeployments. - */ - public AdapterDeployments adapterDeployments() { - if (this.adapterDeployments == null) { - this.adapterDeployments = new AdapterDeploymentsImpl(clientObject.getAdapterDeployments(), this); - } - return adapterDeployments; - } - /** * Gets the resource collection API of ComputeOperations. * @@ -845,18 +793,6 @@ public ManagedComputeCapacities managedComputeCapacities() { return managedComputeCapacities; } - /** - * Gets the resource collection API of CostControls. It manages CostControl. - * - * @return Resource collection API of CostControls. - */ - public CostControls costControls() { - if (this.costControls == null) { - this.costControls = new CostControlsImpl(clientObject.getCostControls(), this); - } - return costControls; - } - /** * Gets the resource collection API of PrivateLinkResources. * diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AdapterDeploymentsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AdapterDeploymentsClient.java deleted file mode 100644 index 88fbcdc973e2..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AdapterDeploymentsClient.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentsGetResponse; - -/** - * An instance of this class provides access to all the operations defined in AdapterDeploymentsClient. - */ -public interface AdapterDeploymentsClient { - /** - * Gets an adapter deployment by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AdapterDeploymentsGetResponse getWithResponse(String resourceGroupName, String accountName, - String adapterDeploymentName, Context context); - - /** - * Gets an adapter deployment by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AdapterDeploymentInner get(String resourceGroupName, String accountName, String adapterDeploymentName); - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an independently managed LoRA adapter attached to a managed compute - * deployment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AdapterDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, String adapterDeploymentName, AdapterDeploymentInner resource); - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an independently managed LoRA adapter attached to a managed compute - * deployment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AdapterDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, String adapterDeploymentName, AdapterDeploymentInner resource, String ifMatch, - String ifNoneMatch, Context context); - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an independently managed LoRA adapter attached to a managed compute deployment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AdapterDeploymentInner createOrUpdate(String resourceGroupName, String accountName, String adapterDeploymentName, - AdapterDeploymentInner resource); - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an independently managed LoRA adapter attached to a managed compute deployment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AdapterDeploymentInner createOrUpdate(String resourceGroupName, String accountName, String adapterDeploymentName, - AdapterDeploymentInner resource, String ifMatch, String ifNoneMatch, Context context); - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String adapterDeploymentName); - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String adapterDeploymentName, String ifMatch, Context context); - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String adapterDeploymentName); - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String adapterDeploymentName, String ifMatch, - Context context); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java index 883a9204c692..a19c56c75f8a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java @@ -116,20 +116,6 @@ public interface CognitiveServicesManagementClient { */ SubscriptionRaiPoliciesClient getSubscriptionRaiPolicies(); - /** - * Gets the RaiRegosClient object to access its operations. - * - * @return the RaiRegosClient object. - */ - RaiRegosClient getRaiRegos(); - - /** - * Gets the RaiBindingsClient object to access its operations. - * - * @return the RaiBindingsClient object. - */ - RaiBindingsClient getRaiBindings(); - /** * Gets the RaiBlocklistItemsClient object to access its operations. * @@ -228,13 +214,6 @@ public interface CognitiveServicesManagementClient { */ ManagedComputeDeploymentsClient getManagedComputeDeployments(); - /** - * Gets the AdapterDeploymentsClient object to access its operations. - * - * @return the AdapterDeploymentsClient object. - */ - AdapterDeploymentsClient getAdapterDeployments(); - /** * Gets the ComputeOperationsClient object to access its operations. * @@ -270,13 +249,6 @@ public interface CognitiveServicesManagementClient { */ ManagedComputeCapacitiesClient getManagedComputeCapacities(); - /** - * Gets the CostControlsClient object to access its operations. - * - * @return the CostControlsClient object. - */ - CostControlsClient getCostControls(); - /** * Gets the PrivateLinkResourcesClient object to access its operations. * diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CostControlsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CostControlsClient.java deleted file mode 100644 index d52ccc81313d..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CostControlsClient.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.CostControlInner; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPatch; -import com.azure.resourcemanager.cognitiveservices.models.CostControlsCreateOrUpdateResponse; -import com.azure.resourcemanager.cognitiveservices.models.CostControlsGetResponse; -import com.azure.resourcemanager.cognitiveservices.models.CostControlsUpdateResponse; - -/** - * An instance of this class provides access to all the operations defined in CostControlsClient. - */ -public interface CostControlsClient { - /** - * Gets a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CostControlsGetResponse getWithResponse(String resourceGroupName, String accountName, String costControlName, - Context context); - - /** - * Gets a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CostControlInner get(String resourceGroupName, String accountName, String costControlName); - - /** - * Creates or replaces a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param resource Resource create parameters. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @param ifNoneMatch Proceeds only when the current entity tag does not match this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CostControlsCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, String accountName, - String costControlName, CostControlInner resource, String ifMatch, String ifNoneMatch, Context context); - - /** - * Creates or replaces a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CostControlInner createOrUpdate(String resourceGroupName, String accountName, String costControlName, - CostControlInner resource); - - /** - * Updates selected properties of a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param properties The resource properties to be updated. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CostControlsUpdateResponse updateWithResponse(String resourceGroupName, String accountName, String costControlName, - CostControlPatch properties, String ifMatch, Context context); - - /** - * Updates selected properties of a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CostControlInner update(String resourceGroupName, String accountName, String costControlName, - CostControlPatch properties); - - /** - * Deletes a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String costControlName, - String ifMatch, Context context); - - /** - * Deletes a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String costControlName); - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Context context); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiBindingsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiBindingsClient.java deleted file mode 100644 index fdc4187ad3fd..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiBindingsClient.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingsCreateOrUpdateResponse; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingsGetResponse; - -/** - * An instance of this class provides access to all the operations defined in RaiBindingsClient. - */ -public interface RaiBindingsClient { - /** - * Gets one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RaiBindingsGetResponse getWithResponse(String resourceGroupName, String accountName, String raiBindingName, - Context context); - - /** - * Gets one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RaiBindingInner get(String resourceGroupName, String accountName, String raiBindingName); - - /** - * Creates or replaces one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param raiBinding The RAI binding. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped binding from an Azure resource to an Agent Control Specification policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RaiBindingsCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, String accountName, - String raiBindingName, RaiBindingInner raiBinding, String ifMatch, String ifNoneMatch, Context context); - - /** - * Creates or replaces one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param raiBinding The RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped binding from an Azure resource to an Agent Control Specification policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RaiBindingInner createOrUpdate(String resourceGroupName, String accountName, String raiBindingName, - RaiBindingInner raiBinding); - - /** - * Deletes one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String raiBindingName, - String ifMatch, Context context); - - /** - * Deletes one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String raiBindingName); - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of RAI bindings to return. Defaults to 50. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiPoliciesClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiPoliciesClient.java index 1926e694837c..d850bea71a3a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiPoliciesClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiPoliciesClient.java @@ -7,12 +7,11 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiPolicyInner; -import com.azure.resourcemanager.cognitiveservices.models.RaiPoliciesCreateOrUpdateResponse; -import com.azure.resourcemanager.cognitiveservices.models.RaiPoliciesGetResponse; /** * An instance of this class provides access to all the operations defined in RaiPoliciesClient. @@ -28,10 +27,10 @@ public interface RaiPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Content Filters associated with the Azure OpenAI account. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RaiPoliciesGetResponse getWithResponse(String resourceGroupName, String accountName, String raiPolicyName, + Response getWithResponse(String resourceGroupName, String accountName, String raiPolicyName, Context context); /** @@ -55,17 +54,15 @@ RaiPoliciesGetResponse getWithResponse(String resourceGroupName, String accountN * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. * @param raiPolicy Properties describing the Content Filters. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cognitive Services RaiPolicy. + * @return cognitive Services RaiPolicy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RaiPoliciesCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, String accountName, - String raiPolicyName, RaiPolicyInner raiPolicy, String ifMatch, String ifNoneMatch, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String raiPolicyName, RaiPolicyInner raiPolicy, Context context); /** * Update the state of specified Content Filters associated with the Azure OpenAI account. @@ -103,7 +100,6 @@ RaiPolicyInner createOrUpdate(String resourceGroupName, String accountName, Stri * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,7 +108,7 @@ RaiPolicyInner createOrUpdate(String resourceGroupName, String accountName, Stri */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String raiPolicyName, - String ifMatch, Context context); + Context context); /** * Deletes the specified Content Filters associated with the Azure OpenAI account. @@ -133,14 +129,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String raiPolicyName, String ifMatch, Context context); + void delete(String resourceGroupName, String accountName, String raiPolicyName, Context context); /** * Gets the content filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiRegosClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiRegosClient.java deleted file mode 100644 index ac6064047563..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiRegosClient.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegosCreateOrUpdateResponse; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegosGetResponse; - -/** - * An instance of this class provides access to all the operations defined in RaiRegosClient. - */ -public interface RaiRegosClient { - /** - * Gets one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RaiRegosGetResponse getWithResponse(String resourceGroupName, String accountName, String raiRegoName, - Context context); - - /** - * Gets one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RaiRegoInner get(String resourceGroupName, String accountName, String raiRegoName); - - /** - * Creates or replaces one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param raiRego The reusable Rego artifact. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped reusable Rego artifact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RaiRegosCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, String accountName, - String raiRegoName, RaiRegoInner raiRego, String ifMatch, String ifNoneMatch, Context context); - - /** - * Creates or replaces one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param raiRego The reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped reusable Rego artifact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RaiRegoInner createOrUpdate(String resourceGroupName, String accountName, String raiRegoName, RaiRegoInner raiRego); - - /** - * Deletes one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String raiRegoName, String ifMatch, - Context context); - - /** - * Deletes one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String raiRegoName); - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of reusable Rego artifacts to return. Defaults to 10. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/WorkbenchesClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/WorkbenchesClient.java index 451195afcba8..ada1d7322cf3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/WorkbenchesClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/WorkbenchesClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cognitiveservices.fluent.models.WorkbenchInner; -import com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdate; /** * An instance of this class provides access to all the operations defined in WorkbenchesClient. @@ -124,6 +123,24 @@ WorkbenchInner createOrUpdate(String resourceGroupName, String accountName, Stri WorkbenchInner createOrUpdate(String resourceGroupName, String accountName, String projectName, String workbenchName, WorkbenchInner resource, Context context); + /** + * Updates a workbench associated with the project. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param projectName The name of Cognitive Services account's project. + * @param workbenchName The name of the workbench associated with the project. + * @param properties The workbench properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of workbench resource under a Cognitive Services project. + * Provides interactive compute with data access for AI development. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkbenchInner> beginUpdate(String resourceGroupName, String accountName, + String projectName, String workbenchName, WorkbenchInner properties); + /** * Updates a workbench associated with the project. * @@ -136,12 +153,30 @@ WorkbenchInner createOrUpdate(String resourceGroupName, String accountName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of workbench resource under a Cognitive Services project. + * Provides interactive compute with data access for AI development. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkbenchInner> beginUpdate(String resourceGroupName, String accountName, + String projectName, String workbenchName, WorkbenchInner properties, Context context); + + /** + * Updates a workbench associated with the project. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param projectName The name of Cognitive Services account's project. + * @param workbenchName The name of the workbench associated with the project. + * @param properties The workbench properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return workbench resource under a Cognitive Services project. - * Provides interactive compute with data access for AI development along with {@link Response}. + * Provides interactive compute with data access for AI development. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String accountName, String projectName, - String workbenchName, WorkbenchUpdate properties, Context context); + WorkbenchInner update(String resourceGroupName, String accountName, String projectName, String workbenchName, + WorkbenchInner properties); /** * Updates a workbench associated with the project. @@ -151,6 +186,7 @@ Response updateWithResponse(String resourceGroupName, String acc * @param projectName The name of Cognitive Services account's project. * @param workbenchName The name of the workbench associated with the project. * @param properties The workbench properties to update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -159,7 +195,7 @@ Response updateWithResponse(String resourceGroupName, String acc */ @ServiceMethod(returns = ReturnType.SINGLE) WorkbenchInner update(String resourceGroupName, String accountName, String projectName, String workbenchName, - WorkbenchUpdate properties); + WorkbenchInner properties, Context context); /** * Deletes the specified workbench associated with the project. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AdapterDeploymentInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AdapterDeploymentInner.java deleted file mode 100644 index a92444067c0e..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AdapterDeploymentInner.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentProperties; -import java.io.IOException; - -/** - * An independently managed LoRA adapter attached to a managed compute deployment. - */ -@Fluent -public final class AdapterDeploymentInner extends ProxyResource { - /* - * Properties of the Cognitive Services adapter deployment. - */ - private AdapterDeploymentProperties properties; - - /* - * The concurrency token for this adapter deployment. - */ - private String etag; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of AdapterDeploymentInner class. - */ - public AdapterDeploymentInner() { - } - - /** - * Get the properties property: Properties of the Cognitive Services adapter deployment. - * - * @return the properties value. - */ - public AdapterDeploymentProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the Cognitive Services adapter deployment. - * - * @param properties the properties value to set. - * @return the AdapterDeploymentInner object itself. - */ - public AdapterDeploymentInner withProperties(AdapterDeploymentProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the etag property: The concurrency token for this adapter deployment. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdapterDeploymentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdapterDeploymentInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AdapterDeploymentInner. - */ - public static AdapterDeploymentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdapterDeploymentInner deserializedAdapterDeploymentInner = new AdapterDeploymentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAdapterDeploymentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAdapterDeploymentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAdapterDeploymentInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedAdapterDeploymentInner.properties = AdapterDeploymentProperties.fromJson(reader); - } else if ("etag".equals(fieldName)) { - deserializedAdapterDeploymentInner.etag = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedAdapterDeploymentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAdapterDeploymentInner; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeInner.java index 0727b7ec8078..db792a492799 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeInner.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.cognitiveservices.models.ComputeProperties; import com.azure.resourcemanager.cognitiveservices.models.Identity; import java.io.IOException; +import java.util.Map; /** * Cognitive Services compute resource. Supports polymorphic compute types @@ -30,6 +31,11 @@ public final class ComputeInner extends ProxyResource { */ private String etag; + /* + * Resource tags. + */ + private Map tags; + /* * The kind (type) of compute resource. */ @@ -97,6 +103,26 @@ public String etag() { return this.etag; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ComputeInner object itself. + */ + public ComputeInner withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the kind property: The kind (type) of compute resource. * @@ -183,6 +209,7 @@ public String id() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); @@ -214,6 +241,9 @@ public static ComputeInner fromJson(JsonReader jsonReader) throws IOException { deserializedComputeInner.properties = ComputeProperties.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedComputeInner.etag = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedComputeInner.tags = tags; } else if ("kind".equals(fieldName)) { deserializedComputeInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CostControlInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CostControlInner.java deleted file mode 100644 index 18b6e8be4693..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CostControlInner.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.cognitiveservices.models.CostControlProperties; -import java.io.IOException; - -/** - * A cost control owned by a Cognitive Services account. - */ -@Fluent -public final class CostControlInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private CostControlProperties properties; - - /* - * The entity tag used for optimistic concurrency. - */ - private String etag; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of CostControlInner class. - */ - public CostControlInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public CostControlProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the CostControlInner object itself. - */ - public CostControlInner withProperties(CostControlProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the etag property: The entity tag used for optimistic concurrency. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CostControlInner. - */ - public static CostControlInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlInner deserializedCostControlInner = new CostControlInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedCostControlInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedCostControlInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCostControlInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedCostControlInner.properties = CostControlProperties.fromJson(reader); - } else if ("etag".equals(fieldName)) { - deserializedCostControlInner.etag = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedCostControlInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlInner; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiBindingInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiBindingInner.java deleted file mode 100644 index 4dea8a201043..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiBindingInner.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingProperties; -import java.io.IOException; -import java.util.Map; - -/** - * An account-scoped binding from an Azure resource to an Agent Control Specification policy. - */ -@Fluent -public final class RaiBindingInner extends ProxyResource { - /* - * Properties of the RAI binding. - */ - private RaiBindingProperties properties; - - /* - * Resource ETag. - */ - private String etag; - - /* - * Resource tags. - */ - private Map tags; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of RaiBindingInner class. - */ - public RaiBindingInner() { - } - - /** - * Get the properties property: Properties of the RAI binding. - * - * @return the properties value. - */ - public RaiBindingProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the RAI binding. - * - * @param properties the properties value to set. - * @return the RaiBindingInner object itself. - */ - public RaiBindingInner withProperties(RaiBindingProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the etag property: Resource ETag. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the RaiBindingInner object itself. - */ - public RaiBindingInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiBindingInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiBindingInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiBindingInner. - */ - public static RaiBindingInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiBindingInner deserializedRaiBindingInner = new RaiBindingInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRaiBindingInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRaiBindingInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRaiBindingInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRaiBindingInner.properties = RaiBindingProperties.fromJson(reader); - } else if ("etag".equals(fieldName)) { - deserializedRaiBindingInner.etag = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedRaiBindingInner.tags = tags; - } else if ("systemData".equals(fieldName)) { - deserializedRaiBindingInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiBindingInner; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiRegoInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiRegoInner.java deleted file mode 100644 index 3d7a9690d901..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiRegoInner.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoProperties; -import java.io.IOException; -import java.util.Map; - -/** - * An account-scoped reusable Rego artifact. - */ -@Fluent -public final class RaiRegoInner extends ProxyResource { - /* - * Properties of the reusable Rego artifact. - */ - private RaiRegoProperties properties; - - /* - * Resource ETag. - */ - private String etag; - - /* - * Resource tags. - */ - private Map tags; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of RaiRegoInner class. - */ - public RaiRegoInner() { - } - - /** - * Get the properties property: Properties of the reusable Rego artifact. - * - * @return the properties value. - */ - public RaiRegoProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the reusable Rego artifact. - * - * @param properties the properties value to set. - * @return the RaiRegoInner object itself. - */ - public RaiRegoInner withProperties(RaiRegoProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the etag property: Resource ETag. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the RaiRegoInner object itself. - */ - public RaiRegoInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiRegoInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiRegoInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiRegoInner. - */ - public static RaiRegoInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiRegoInner deserializedRaiRegoInner = new RaiRegoInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRaiRegoInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRaiRegoInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRaiRegoInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRaiRegoInner.properties = RaiRegoProperties.fromJson(reader); - } else if ("etag".equals(fieldName)) { - deserializedRaiRegoInner.etag = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedRaiRegoInner.tags = tags; - } else if ("systemData".equals(fieldName)) { - deserializedRaiRegoInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiRegoInner; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageInner.java index bbddea771f21..ac3133cde24b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageInner.java @@ -20,17 +20,6 @@ */ @Immutable public final class UsageInner implements JsonSerializable { - /* - * Fully qualified resource ID for the usage. Ex - - * /subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/usages/{usageName} - */ - private String id; - - /* - * The type of the usage resource. E.g. "Microsoft.CognitiveServices/locations/usages" - */ - private String type; - /* * The unit of the metric. */ @@ -82,25 +71,6 @@ public final class UsageInner implements JsonSerializable { private UsageInner() { } - /** - * Get the id property: Fully qualified resource ID for the usage. Ex - - * /subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/usages/{usageName}. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the type property: The type of the usage resource. E.g. "Microsoft.CognitiveServices/locations/usages". - * - * @return the type value. - */ - public String type() { - return this.type; - } - /** * Get the unit property: The unit of the metric. * @@ -215,11 +185,7 @@ public static UsageInner fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("id".equals(fieldName)) { - deserializedUsageInner.id = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedUsageInner.type = reader.getString(); - } else if ("unit".equals(fieldName)) { + if ("unit".equals(fieldName)) { deserializedUsageInner.unit = UnitType.fromString(reader.getString()); } else if ("name".equals(fieldName)) { deserializedUsageInner.name = MetricName.fromJson(reader); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/WorkbenchInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/WorkbenchInner.java index 69e3f23b23fe..861a72603d33 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/WorkbenchInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/WorkbenchInner.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Identity; import com.azure.resourcemanager.cognitiveservices.models.WorkbenchProperties; import java.io.IOException; +import java.util.Map; /** * Workbench resource under a Cognitive Services project. @@ -30,6 +31,16 @@ public final class WorkbenchInner extends ProxyResource { */ private String etag; + /* + * The location of the workbench resource. + */ + private String location; + + /* + * Resource tags. + */ + private Map tags; + /* * Identity for the resource. */ @@ -90,6 +101,46 @@ public String etag() { return this.etag; } + /** + * Get the location property: The location of the workbench resource. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location of the workbench resource. + * + * @param location the location value to set. + * @return the WorkbenchInner object itself. + */ + public WorkbenchInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the WorkbenchInner object itself. + */ + public WorkbenchInner withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the identity property: Identity for the resource. * @@ -156,6 +207,8 @@ public String id() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -186,6 +239,11 @@ public static WorkbenchInner fromJson(JsonReader jsonReader) throws IOException deserializedWorkbenchInner.properties = WorkbenchProperties.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedWorkbenchInner.etag = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedWorkbenchInner.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWorkbenchInner.tags = tags; } else if ("identity".equals(fieldName)) { deserializedWorkbenchInner.identity = Identity.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentImpl.java deleted file mode 100644 index 6630abe32bbf..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentImpl.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeployment; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentProperties; - -public final class AdapterDeploymentImpl - implements AdapterDeployment, AdapterDeployment.Definition, AdapterDeployment.Update { - private AdapterDeploymentInner innerObject; - - private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public AdapterDeploymentProperties properties() { - return this.innerModel().properties(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public AdapterDeploymentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String adapterDeploymentName; - - private String createIfMatch; - - private String createIfNoneMatch; - - private String updateIfMatch; - - private String updateIfNoneMatch; - - public AdapterDeploymentImpl withExistingAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public AdapterDeployment create() { - this.innerObject = serviceManager.serviceClient() - .getAdapterDeployments() - .createOrUpdate(resourceGroupName, accountName, adapterDeploymentName, this.innerModel(), createIfMatch, - createIfNoneMatch, Context.NONE); - return this; - } - - public AdapterDeployment create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAdapterDeployments() - .createOrUpdate(resourceGroupName, accountName, adapterDeploymentName, this.innerModel(), createIfMatch, - createIfNoneMatch, context); - return this; - } - - AdapterDeploymentImpl(String name, - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerObject = new AdapterDeploymentInner(); - this.serviceManager = serviceManager; - this.adapterDeploymentName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; - } - - public AdapterDeploymentImpl update() { - this.updateIfMatch = null; - this.updateIfNoneMatch = null; - return this; - } - - public AdapterDeployment apply() { - this.innerObject = serviceManager.serviceClient() - .getAdapterDeployments() - .createOrUpdate(resourceGroupName, accountName, adapterDeploymentName, this.innerModel(), updateIfMatch, - updateIfNoneMatch, Context.NONE); - return this; - } - - public AdapterDeployment apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAdapterDeployments() - .createOrUpdate(resourceGroupName, accountName, adapterDeploymentName, this.innerModel(), updateIfMatch, - updateIfNoneMatch, context); - return this; - } - - AdapterDeploymentImpl(AdapterDeploymentInner innerObject, - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts"); - this.adapterDeploymentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "adapterDeployments"); - } - - public AdapterDeployment refresh() { - this.innerObject = serviceManager.serviceClient() - .getAdapterDeployments() - .getWithResponse(resourceGroupName, accountName, adapterDeploymentName, Context.NONE) - .getValue(); - return this; - } - - public AdapterDeployment refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAdapterDeployments() - .getWithResponse(resourceGroupName, accountName, adapterDeploymentName, context) - .getValue(); - return this; - } - - public AdapterDeploymentImpl withProperties(AdapterDeploymentProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public AdapterDeploymentImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public AdapterDeploymentImpl withIfNoneMatch(String ifNoneMatch) { - if (isInCreateMode()) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } else { - this.updateIfNoneMatch = ifNoneMatch; - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsClientImpl.java deleted file mode 100644 index 65c48fd16bd0..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsClientImpl.java +++ /dev/null @@ -1,1039 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient; -import com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner; -import com.azure.resourcemanager.cognitiveservices.implementation.models.AdapterDeploymentListResult; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentsGetResponse; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in AdapterDeploymentsClient. - */ -public final class AdapterDeploymentsClientImpl implements AdapterDeploymentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final AdapterDeploymentsService service; - - /** - * The service client containing this operation class. - */ - private final CognitiveServicesManagementClientImpl client; - - /** - * Initializes an instance of AdapterDeploymentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AdapterDeploymentsClientImpl(CognitiveServicesManagementClientImpl client) { - this.service = RestProxy.create(AdapterDeploymentsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for CognitiveServicesManagementClientAdapterDeployments to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "CognitiveServicesManagementClientAdapterDeployments") - public interface AdapterDeploymentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/adapterDeployments/{adapterDeploymentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("adapterDeploymentName") String adapterDeploymentName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/adapterDeployments/{adapterDeploymentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - AdapterDeploymentsGetResponse getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("adapterDeploymentName") String adapterDeploymentName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/adapterDeployments/{adapterDeploymentName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("adapterDeploymentName") String adapterDeploymentName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") AdapterDeploymentInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/adapterDeployments/{adapterDeploymentName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("adapterDeploymentName") String adapterDeploymentName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") AdapterDeploymentInner resource, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/adapterDeployments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/adapterDeployments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/adapterDeployments/{adapterDeploymentName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("adapterDeploymentName") String adapterDeploymentName, @HeaderParam("If-Match") String ifMatch, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/adapterDeployments/{adapterDeploymentName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("adapterDeploymentName") String adapterDeploymentName, @HeaderParam("If-Match") String ifMatch, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets an adapter deployment by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String accountName, - String adapterDeploymentName) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, adapterDeploymentName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an adapter deployment by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, - String adapterDeploymentName) { - return getWithResponseAsync(resourceGroupName, accountName, adapterDeploymentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an adapter deployment by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AdapterDeploymentsGetResponse getWithResponse(String resourceGroupName, String accountName, - String adapterDeploymentName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, adapterDeploymentName, accept, context); - } - - /** - * Gets an adapter deployment by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AdapterDeploymentInner get(String resourceGroupName, String accountName, String adapterDeploymentName) { - return getWithResponse(resourceGroupName, accountName, adapterDeploymentName, Context.NONE).getValue(); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an independently managed LoRA adapter attached to a managed compute deployment along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String adapterDeploymentName, AdapterDeploymentInner resource, String ifMatch, - String ifNoneMatch) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, adapterDeploymentName, ifMatch, - ifNoneMatch, contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an independently managed LoRA adapter attached to a managed compute deployment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String adapterDeploymentName, AdapterDeploymentInner resource, String ifMatch, String ifNoneMatch) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, adapterDeploymentName, ifMatch, - ifNoneMatch, contentType, accept, resource, Context.NONE); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an independently managed LoRA adapter attached to a managed compute deployment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String adapterDeploymentName, AdapterDeploymentInner resource, String ifMatch, String ifNoneMatch, - Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, adapterDeploymentName, ifMatch, - ifNoneMatch, contentType, accept, resource, context); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an independently managed LoRA adapter attached to a managed compute - * deployment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AdapterDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, String adapterDeploymentName, AdapterDeploymentInner resource, - String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, accountName, - adapterDeploymentName, resource, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AdapterDeploymentInner.class, AdapterDeploymentInner.class, - this.client.getContext()); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an independently managed LoRA adapter attached to a managed compute - * deployment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AdapterDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, String adapterDeploymentName, AdapterDeploymentInner resource) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, accountName, - adapterDeploymentName, resource, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AdapterDeploymentInner.class, AdapterDeploymentInner.class, - this.client.getContext()); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an independently managed LoRA adapter attached to a managed compute - * deployment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AdapterDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, String adapterDeploymentName, AdapterDeploymentInner resource, - String ifMatch, String ifNoneMatch) { - Response response = createOrUpdateWithResponse(resourceGroupName, accountName, - adapterDeploymentName, resource, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - AdapterDeploymentInner.class, AdapterDeploymentInner.class, Context.NONE); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an independently managed LoRA adapter attached to a managed compute - * deployment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AdapterDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, String adapterDeploymentName, AdapterDeploymentInner resource) { - final String ifMatch = null; - final String ifNoneMatch = null; - Response response = createOrUpdateWithResponse(resourceGroupName, accountName, - adapterDeploymentName, resource, ifMatch, ifNoneMatch); - return this.client.getLroResult(response, - AdapterDeploymentInner.class, AdapterDeploymentInner.class, Context.NONE); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an independently managed LoRA adapter attached to a managed compute - * deployment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AdapterDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String accountName, String adapterDeploymentName, AdapterDeploymentInner resource, - String ifMatch, String ifNoneMatch, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, accountName, - adapterDeploymentName, resource, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(response, - AdapterDeploymentInner.class, AdapterDeploymentInner.class, context); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an independently managed LoRA adapter attached to a managed compute deployment on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String adapterDeploymentName, AdapterDeploymentInner resource, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, adapterDeploymentName, resource, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an independently managed LoRA adapter attached to a managed compute deployment on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String adapterDeploymentName, AdapterDeploymentInner resource) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, accountName, adapterDeploymentName, resource, ifMatch, - ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an independently managed LoRA adapter attached to a managed compute deployment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AdapterDeploymentInner createOrUpdate(String resourceGroupName, String accountName, - String adapterDeploymentName, AdapterDeploymentInner resource) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdate(resourceGroupName, accountName, adapterDeploymentName, resource, ifMatch, - ifNoneMatch).getFinalResult(); - } - - /** - * Creates an adapter deployment or re-targets it to another compatible - * managed compute deployment. The source model ID is immutable. - * Returns 201 for a new adapter or 200 for an existing adapter, including retries. - * Either response may require polling while provisioning is in progress. - * After polling completes, retrieve the final resource from the original resource URL. - * Omit conditional headers to allow either creation or update. - * To create only when absent, send If-None-Match: *. - * To update only a matching version, send If-Match with the ETag returned by GET. - * Conditional requests, including retries, return 412 if the precondition is not met. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param resource The complete adapter deployment resource to create or re-target. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an independently managed LoRA adapter attached to a managed compute deployment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AdapterDeploymentInner createOrUpdate(String resourceGroupName, String accountName, - String adapterDeploymentName, AdapterDeploymentInner resource, String ifMatch, String ifNoneMatch, - Context context) { - return beginCreateOrUpdate(resourceGroupName, accountName, adapterDeploymentName, resource, ifMatch, - ifNoneMatch, context).getFinalResult(); - } - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String accountName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String accountName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String accountName, - Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String adapterDeploymentName, String ifMatch) { - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, adapterDeploymentName, ifMatch, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String accountName, - String adapterDeploymentName, String ifMatch) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, adapterDeploymentName, ifMatch, - Context.NONE); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String accountName, - String adapterDeploymentName, String ifMatch, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, adapterDeploymentName, ifMatch, context); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String adapterDeploymentName, String ifMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, adapterDeploymentName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String adapterDeploymentName) { - final String ifMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, adapterDeploymentName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String adapterDeploymentName, String ifMatch) { - Response response - = deleteWithResponse(resourceGroupName, accountName, adapterDeploymentName, ifMatch); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String adapterDeploymentName) { - final String ifMatch = null; - Response response - = deleteWithResponse(resourceGroupName, accountName, adapterDeploymentName, ifMatch); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String adapterDeploymentName, String ifMatch, Context context) { - Response response - = deleteWithResponse(resourceGroupName, accountName, adapterDeploymentName, ifMatch, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String adapterDeploymentName, - String ifMatch) { - return beginDeleteAsync(resourceGroupName, accountName, adapterDeploymentName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String adapterDeploymentName) { - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, accountName, adapterDeploymentName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String adapterDeploymentName) { - final String ifMatch = null; - beginDelete(resourceGroupName, accountName, adapterDeploymentName, ifMatch).getFinalResult(); - } - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String adapterDeploymentName, String ifMatch, - Context context) { - beginDelete(resourceGroupName, accountName, adapterDeploymentName, ifMatch, context).getFinalResult(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsImpl.java deleted file mode 100644 index 542326a80106..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient; -import com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeployment; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeployments; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentsGetResponse; - -public final class AdapterDeploymentsImpl implements AdapterDeployments { - private static final ClientLogger LOGGER = new ClientLogger(AdapterDeploymentsImpl.class); - - private final AdapterDeploymentsClient innerClient; - - private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager; - - public AdapterDeploymentsImpl(AdapterDeploymentsClient innerClient, - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String accountName, - String adapterDeploymentName, Context context) { - AdapterDeploymentsGetResponse inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, adapterDeploymentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AdapterDeploymentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public AdapterDeployment get(String resourceGroupName, String accountName, String adapterDeploymentName) { - AdapterDeploymentInner inner = this.serviceClient().get(resourceGroupName, accountName, adapterDeploymentName); - if (inner != null) { - return new AdapterDeploymentImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AdapterDeploymentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, accountName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AdapterDeploymentImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String accountName, String adapterDeploymentName) { - this.serviceClient().delete(resourceGroupName, accountName, adapterDeploymentName); - } - - public void delete(String resourceGroupName, String accountName, String adapterDeploymentName, String ifMatch, - Context context) { - this.serviceClient().delete(resourceGroupName, accountName, adapterDeploymentName, ifMatch, context); - } - - public AdapterDeployment getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String adapterDeploymentName = ResourceManagerUtils.getValueFromIdByName(id, "adapterDeployments"); - if (adapterDeploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'adapterDeployments'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, adapterDeploymentName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String adapterDeploymentName = ResourceManagerUtils.getValueFromIdByName(id, "adapterDeployments"); - if (adapterDeploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'adapterDeployments'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, adapterDeploymentName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String adapterDeploymentName = ResourceManagerUtils.getValueFromIdByName(id, "adapterDeployments"); - if (adapterDeploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'adapterDeployments'.", id))); - } - String localIfMatch = null; - this.delete(resourceGroupName, accountName, adapterDeploymentName, localIfMatch, Context.NONE); - } - - public void deleteByIdWithResponse(String id, String ifMatch, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String adapterDeploymentName = ResourceManagerUtils.getValueFromIdByName(id, "adapterDeployments"); - if (adapterDeploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'adapterDeployments'.", id))); - } - this.delete(resourceGroupName, accountName, adapterDeploymentName, ifMatch, context); - } - - private AdapterDeploymentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() { - return this.serviceManager; - } - - public AdapterDeploymentImpl define(String name) { - return new AdapterDeploymentImpl(name, this.manager()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java index 465ef8b845b0..48aa850bcb5c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java @@ -29,7 +29,6 @@ import com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient; import com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient; import com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient; -import com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient; import com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient; import com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient; import com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient; @@ -38,7 +37,6 @@ import com.azure.resourcemanager.cognitiveservices.fluent.CommitmentTiersClient; import com.azure.resourcemanager.cognitiveservices.fluent.ComputeOperationsClient; import com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient; -import com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient; import com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient; import com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient; import com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient; @@ -61,14 +59,12 @@ import com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient; import com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient; import com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient; -import com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient; import com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient; import com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient; import com.azure.resourcemanager.cognitiveservices.fluent.RaiContentFiltersClient; import com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient; import com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersOperationsClient; import com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient; -import com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient; import com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient; import com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient; import com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient; @@ -315,34 +311,6 @@ public SubscriptionRaiPoliciesClient getSubscriptionRaiPolicies() { return this.subscriptionRaiPolicies; } - /** - * The RaiRegosClient object to access its operations. - */ - private final RaiRegosClient raiRegos; - - /** - * Gets the RaiRegosClient object to access its operations. - * - * @return the RaiRegosClient object. - */ - public RaiRegosClient getRaiRegos() { - return this.raiRegos; - } - - /** - * The RaiBindingsClient object to access its operations. - */ - private final RaiBindingsClient raiBindings; - - /** - * Gets the RaiBindingsClient object to access its operations. - * - * @return the RaiBindingsClient object. - */ - public RaiBindingsClient getRaiBindings() { - return this.raiBindings; - } - /** * The RaiBlocklistItemsClient object to access its operations. */ @@ -539,20 +507,6 @@ public ManagedComputeDeploymentsClient getManagedComputeDeployments() { return this.managedComputeDeployments; } - /** - * The AdapterDeploymentsClient object to access its operations. - */ - private final AdapterDeploymentsClient adapterDeployments; - - /** - * Gets the AdapterDeploymentsClient object to access its operations. - * - * @return the AdapterDeploymentsClient object. - */ - public AdapterDeploymentsClient getAdapterDeployments() { - return this.adapterDeployments; - } - /** * The ComputeOperationsClient object to access its operations. */ @@ -623,20 +577,6 @@ public ManagedComputeCapacitiesClient getManagedComputeCapacities() { return this.managedComputeCapacities; } - /** - * The CostControlsClient object to access its operations. - */ - private final CostControlsClient costControls; - - /** - * Gets the CostControlsClient object to access its operations. - * - * @return the CostControlsClient object. - */ - public CostControlsClient getCostControls() { - return this.costControls; - } - /** * The PrivateLinkResourcesClient object to access its operations. */ @@ -892,7 +832,7 @@ public ModelCapacitiesClient getModelCapacities() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-09-15-preview"; + this.apiVersion = "2026-07-15-preview"; this.resourceProviders = new ResourceProvidersClientImpl(this); this.operations = new OperationsClientImpl(this); this.accounts = new AccountsClientImpl(this); @@ -903,8 +843,6 @@ public ModelCapacitiesClient getModelCapacities() { this.encryptionScopes = new EncryptionScopesClientImpl(this); this.raiPolicies = new RaiPoliciesClientImpl(this); this.subscriptionRaiPolicies = new SubscriptionRaiPoliciesClientImpl(this); - this.raiRegos = new RaiRegosClientImpl(this); - this.raiBindings = new RaiBindingsClientImpl(this); this.raiBlocklistItems = new RaiBlocklistItemsClientImpl(this); this.raiBlocklists = new RaiBlocklistsClientImpl(this); this.raiTopics = new RaiTopicsClientImpl(this); @@ -919,13 +857,11 @@ public ModelCapacitiesClient getModelCapacities() { this.arcDeployments = new ArcDeploymentsClientImpl(this); this.agentApplications = new AgentApplicationsClientImpl(this); this.managedComputeDeployments = new ManagedComputeDeploymentsClientImpl(this); - this.adapterDeployments = new AdapterDeploymentsClientImpl(this); this.computeOperations = new ComputeOperationsClientImpl(this); this.managedComputeUsagesOperationGroups = new ManagedComputeUsagesOperationGroupsClientImpl(this); this.computes = new ComputesClientImpl(this); this.workbenches = new WorkbenchesClientImpl(this); this.managedComputeCapacities = new ManagedComputeCapacitiesClientImpl(this); - this.costControls = new CostControlsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.testRaiExternalSafetyProviders = new TestRaiExternalSafetyProvidersClientImpl(this); this.raiExternalSafetyProviders = new RaiExternalSafetyProvidersClientImpl(this); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeImpl.java index b9a6c98e5340..06e5d6652cd6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeImpl.java @@ -10,6 +10,8 @@ import com.azure.resourcemanager.cognitiveservices.models.Compute; import com.azure.resourcemanager.cognitiveservices.models.ComputeProperties; import com.azure.resourcemanager.cognitiveservices.models.Identity; +import java.util.Collections; +import java.util.Map; public final class ComputeImpl implements Compute, Compute.Definition, Compute.Update { private ComputeInner innerObject; @@ -36,6 +38,15 @@ public String etag() { return this.innerModel().etag(); } + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + public String kind() { return this.innerModel().kind(); } @@ -164,6 +175,11 @@ public ComputeImpl withProperties(ComputeProperties properties) { return this; } + public ComputeImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + public ComputeImpl withKind(String kind) { this.innerModel().withKind(kind); return this; diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlImpl.java deleted file mode 100644 index c93b02b5a399..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlImpl.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.CostControlInner; -import com.azure.resourcemanager.cognitiveservices.models.CostControl; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPatch; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPatchProperties; -import com.azure.resourcemanager.cognitiveservices.models.CostControlProperties; - -public final class CostControlImpl implements CostControl, CostControl.Definition, CostControl.Update { - private CostControlInner innerObject; - - private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public CostControlProperties properties() { - return this.innerModel().properties(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CostControlInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String costControlName; - - private String createIfMatch; - - private String createIfNoneMatch; - - private String updateIfMatch; - - private CostControlPatch updateProperties; - - public CostControlImpl withExistingAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public CostControl create() { - this.innerObject = serviceManager.serviceClient() - .getCostControls() - .createOrUpdateWithResponse(resourceGroupName, accountName, costControlName, this.innerModel(), - createIfMatch, createIfNoneMatch, Context.NONE) - .getValue(); - return this; - } - - public CostControl create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCostControls() - .createOrUpdateWithResponse(resourceGroupName, accountName, costControlName, this.innerModel(), - createIfMatch, createIfNoneMatch, context) - .getValue(); - return this; - } - - CostControlImpl(String name, com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerObject = new CostControlInner(); - this.serviceManager = serviceManager; - this.costControlName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; - } - - public CostControlImpl update() { - this.updateIfMatch = null; - this.updateProperties = new CostControlPatch(); - return this; - } - - public CostControl apply() { - this.innerObject = serviceManager.serviceClient() - .getCostControls() - .updateWithResponse(resourceGroupName, accountName, costControlName, updateProperties, updateIfMatch, - Context.NONE) - .getValue(); - return this; - } - - public CostControl apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCostControls() - .updateWithResponse(resourceGroupName, accountName, costControlName, updateProperties, updateIfMatch, - context) - .getValue(); - return this; - } - - CostControlImpl(CostControlInner innerObject, - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts"); - this.costControlName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "costControls"); - } - - public CostControl refresh() { - this.innerObject = serviceManager.serviceClient() - .getCostControls() - .getWithResponse(resourceGroupName, accountName, costControlName, Context.NONE) - .getValue(); - return this; - } - - public CostControl refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCostControls() - .getWithResponse(resourceGroupName, accountName, costControlName, context) - .getValue(); - return this; - } - - public CostControlImpl withProperties(CostControlProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public CostControlImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public CostControlImpl withIfNoneMatch(String ifNoneMatch) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } - - public CostControlImpl withProperties(CostControlPatchProperties properties) { - this.updateProperties.withProperties(properties); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsClientImpl.java deleted file mode 100644 index 574aa204ce76..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsClientImpl.java +++ /dev/null @@ -1,683 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient; -import com.azure.resourcemanager.cognitiveservices.fluent.models.CostControlInner; -import com.azure.resourcemanager.cognitiveservices.implementation.models.CostControlListResult; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPatch; -import com.azure.resourcemanager.cognitiveservices.models.CostControlsCreateOrUpdateResponse; -import com.azure.resourcemanager.cognitiveservices.models.CostControlsGetResponse; -import com.azure.resourcemanager.cognitiveservices.models.CostControlsUpdateResponse; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CostControlsClient. - */ -public final class CostControlsClientImpl implements CostControlsClient { - /** - * The proxy service used to perform REST calls. - */ - private final CostControlsService service; - - /** - * The service client containing this operation class. - */ - private final CognitiveServicesManagementClientImpl client; - - /** - * Initializes an instance of CostControlsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CostControlsClientImpl(CognitiveServicesManagementClientImpl client) { - this.service - = RestProxy.create(CostControlsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for CognitiveServicesManagementClientCostControls to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "CognitiveServicesManagementClientCostControls") - public interface CostControlsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls/{costControlName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("costControlName") String costControlName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls/{costControlName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - CostControlsGetResponse getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("costControlName") String costControlName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls/{costControlName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("costControlName") String costControlName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") CostControlInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls/{costControlName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - CostControlsCreateOrUpdateResponse createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("costControlName") String costControlName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") CostControlInner resource, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls/{costControlName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("costControlName") String costControlName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") CostControlPatch properties, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls/{costControlName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - CostControlsUpdateResponse updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("costControlName") String costControlName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") CostControlPatch properties, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls/{costControlName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("costControlName") String costControlName, @HeaderParam("If-Match") String ifMatch, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls/{costControlName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("costControlName") String costControlName, @HeaderParam("If-Match") String ifMatch, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/costControls") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String accountName, - String costControlName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, costControlName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String costControlName) { - return getWithResponseAsync(resourceGroupName, accountName, costControlName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CostControlsGetResponse getWithResponse(String resourceGroupName, String accountName, String costControlName, - Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, costControlName, accept, context); - } - - /** - * Gets a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CostControlInner get(String resourceGroupName, String accountName, String costControlName) { - return getWithResponse(resourceGroupName, accountName, costControlName, Context.NONE).getValue(); - } - - /** - * Creates or replaces a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param resource Resource create parameters. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @param ifNoneMatch Proceeds only when the current entity tag does not match this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String costControlName, CostControlInner resource, String ifMatch, String ifNoneMatch) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, costControlName, ifMatch, ifNoneMatch, - contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or replaces a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String costControlName, CostControlInner resource) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, costControlName, resource, ifMatch, - ifNoneMatch).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or replaces a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param resource Resource create parameters. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @param ifNoneMatch Proceeds only when the current entity tag does not match this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CostControlsCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, String accountName, - String costControlName, CostControlInner resource, String ifMatch, String ifNoneMatch, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, costControlName, ifMatch, ifNoneMatch, - contentType, accept, resource, context); - } - - /** - * Creates or replaces a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CostControlInner createOrUpdate(String resourceGroupName, String accountName, String costControlName, - CostControlInner resource) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateWithResponse(resourceGroupName, accountName, costControlName, resource, ifMatch, - ifNoneMatch, Context.NONE).getValue(); - } - - /** - * Updates selected properties of a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param properties The resource properties to be updated. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, String accountName, - String costControlName, CostControlPatch properties, String ifMatch) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, costControlName, ifMatch, contentType, - accept, properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates selected properties of a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String costControlName, - CostControlPatch properties) { - final String ifMatch = null; - return updateWithResponseAsync(resourceGroupName, accountName, costControlName, properties, ifMatch) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates selected properties of a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param properties The resource properties to be updated. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CostControlsUpdateResponse updateWithResponse(String resourceGroupName, String accountName, - String costControlName, CostControlPatch properties, String ifMatch, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, costControlName, ifMatch, contentType, - accept, properties, context); - } - - /** - * Updates selected properties of a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control owned by a Cognitive Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CostControlInner update(String resourceGroupName, String accountName, String costControlName, - CostControlPatch properties) { - final String ifMatch = null; - return updateWithResponse(resourceGroupName, accountName, costControlName, properties, ifMatch, Context.NONE) - .getValue(); - } - - /** - * Deletes a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String costControlName, String ifMatch) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, costControlName, ifMatch, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String costControlName) { - final String ifMatch = null; - return deleteWithResponseAsync(resourceGroupName, accountName, costControlName, ifMatch) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String costControlName, - String ifMatch, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, costControlName, ifMatch, context); - } - - /** - * Deletes a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String costControlName) { - final String ifMatch = null; - deleteWithResponse(resourceGroupName, accountName, costControlName, ifMatch, Context.NONE); - } - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String accountName) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String accountName, - Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsImpl.java deleted file mode 100644 index 1ba84f7f8a5b..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient; -import com.azure.resourcemanager.cognitiveservices.fluent.models.CostControlInner; -import com.azure.resourcemanager.cognitiveservices.models.CostControl; -import com.azure.resourcemanager.cognitiveservices.models.CostControls; -import com.azure.resourcemanager.cognitiveservices.models.CostControlsGetResponse; - -public final class CostControlsImpl implements CostControls { - private static final ClientLogger LOGGER = new ClientLogger(CostControlsImpl.class); - - private final CostControlsClient innerClient; - - private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager; - - public CostControlsImpl(CostControlsClient innerClient, - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String accountName, String costControlName, - Context context) { - CostControlsGetResponse inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, costControlName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CostControlImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CostControl get(String resourceGroupName, String accountName, String costControlName) { - CostControlInner inner = this.serviceClient().get(resourceGroupName, accountName, costControlName); - if (inner != null) { - return new CostControlImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String costControlName, - String ifMatch, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, accountName, costControlName, ifMatch, context); - } - - public void delete(String resourceGroupName, String accountName, String costControlName) { - this.serviceClient().delete(resourceGroupName, accountName, costControlName); - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CostControlImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CostControlImpl(inner1, this.manager())); - } - - public CostControl getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String costControlName = ResourceManagerUtils.getValueFromIdByName(id, "costControls"); - if (costControlName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'costControls'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, costControlName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String costControlName = ResourceManagerUtils.getValueFromIdByName(id, "costControls"); - if (costControlName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'costControls'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, costControlName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String costControlName = ResourceManagerUtils.getValueFromIdByName(id, "costControls"); - if (costControlName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'costControls'.", id))); - } - String localIfMatch = null; - this.deleteWithResponse(resourceGroupName, accountName, costControlName, localIfMatch, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, String ifMatch, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String costControlName = ResourceManagerUtils.getValueFromIdByName(id, "costControls"); - if (costControlName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'costControls'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, costControlName, ifMatch, context); - } - - private CostControlsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() { - return this.serviceManager; - } - - public CostControlImpl define(String name) { - return new CostControlImpl(name, this.manager()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingImpl.java deleted file mode 100644 index da929f2477df..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingImpl.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner; -import com.azure.resourcemanager.cognitiveservices.models.RaiBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingProperties; -import java.util.Collections; -import java.util.Map; - -public final class RaiBindingImpl implements RaiBinding, RaiBinding.Definition, RaiBinding.Update { - private RaiBindingInner innerObject; - - private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public RaiBindingProperties properties() { - return this.innerModel().properties(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public RaiBindingInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String raiBindingName; - - private String createIfMatch; - - private String createIfNoneMatch; - - private String updateIfMatch; - - private String updateIfNoneMatch; - - public RaiBindingImpl withExistingAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public RaiBinding create() { - this.innerObject = serviceManager.serviceClient() - .getRaiBindings() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiBindingName, this.innerModel(), - createIfMatch, createIfNoneMatch, Context.NONE) - .getValue(); - return this; - } - - public RaiBinding create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRaiBindings() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiBindingName, this.innerModel(), - createIfMatch, createIfNoneMatch, context) - .getValue(); - return this; - } - - RaiBindingImpl(String name, com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerObject = new RaiBindingInner(); - this.serviceManager = serviceManager; - this.raiBindingName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; - } - - public RaiBindingImpl update() { - this.updateIfMatch = null; - this.updateIfNoneMatch = null; - return this; - } - - public RaiBinding apply() { - this.innerObject = serviceManager.serviceClient() - .getRaiBindings() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiBindingName, this.innerModel(), - updateIfMatch, updateIfNoneMatch, Context.NONE) - .getValue(); - return this; - } - - public RaiBinding apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRaiBindings() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiBindingName, this.innerModel(), - updateIfMatch, updateIfNoneMatch, context) - .getValue(); - return this; - } - - RaiBindingImpl(RaiBindingInner innerObject, - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts"); - this.raiBindingName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "raiBindings"); - } - - public RaiBinding refresh() { - this.innerObject = serviceManager.serviceClient() - .getRaiBindings() - .getWithResponse(resourceGroupName, accountName, raiBindingName, Context.NONE) - .getValue(); - return this; - } - - public RaiBinding refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRaiBindings() - .getWithResponse(resourceGroupName, accountName, raiBindingName, context) - .getValue(); - return this; - } - - public RaiBindingImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public RaiBindingImpl withProperties(RaiBindingProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public RaiBindingImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public RaiBindingImpl withIfNoneMatch(String ifNoneMatch) { - if (isInCreateMode()) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } else { - this.updateIfNoneMatch = ifNoneMatch; - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsClientImpl.java deleted file mode 100644 index b7a03cb72070..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsClientImpl.java +++ /dev/null @@ -1,597 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner; -import com.azure.resourcemanager.cognitiveservices.implementation.models.RaiBindingListResult; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingsCreateOrUpdateResponse; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingsGetResponse; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in RaiBindingsClient. - */ -public final class RaiBindingsClientImpl implements RaiBindingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final RaiBindingsService service; - - /** - * The service client containing this operation class. - */ - private final CognitiveServicesManagementClientImpl client; - - /** - * Initializes an instance of RaiBindingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RaiBindingsClientImpl(CognitiveServicesManagementClientImpl client) { - this.service - = RestProxy.create(RaiBindingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for CognitiveServicesManagementClientRaiBindings to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "CognitiveServicesManagementClientRaiBindings") - public interface RaiBindingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBindings/{raiBindingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiBindingName") String raiBindingName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBindings/{raiBindingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - RaiBindingsGetResponse getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiBindingName") String raiBindingName, @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBindings/{raiBindingName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiBindingName") String raiBindingName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") RaiBindingInner raiBinding, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBindings/{raiBindingName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - RaiBindingsCreateOrUpdateResponse createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiBindingName") String raiBindingName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") RaiBindingInner raiBinding, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBindings/{raiBindingName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiBindingName") String raiBindingName, @HeaderParam("If-Match") String ifMatch, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBindings/{raiBindingName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiBindingName") String raiBindingName, @HeaderParam("If-Match") String ifMatch, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBindings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBindings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String accountName, - String raiBindingName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiBindingName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String raiBindingName) { - return getWithResponseAsync(resourceGroupName, accountName, raiBindingName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RaiBindingsGetResponse getWithResponse(String resourceGroupName, String accountName, String raiBindingName, - Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, raiBindingName, accept, context); - } - - /** - * Gets one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RaiBindingInner get(String resourceGroupName, String accountName, String raiBindingName) { - return getWithResponse(resourceGroupName, accountName, raiBindingName, Context.NONE).getValue(); - } - - /** - * Creates or replaces one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param raiBinding The RAI binding. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped binding from an Azure resource to an Agent Control Specification policy on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String raiBindingName, RaiBindingInner raiBinding, String ifMatch, String ifNoneMatch) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiBindingName, ifMatch, ifNoneMatch, - contentType, accept, raiBinding, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or replaces one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param raiBinding The RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped binding from an Azure resource to an Agent Control Specification policy on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String raiBindingName, RaiBindingInner raiBinding) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, raiBindingName, raiBinding, ifMatch, - ifNoneMatch).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or replaces one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param raiBinding The RAI binding. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped binding from an Azure resource to an Agent Control Specification policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RaiBindingsCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, String accountName, - String raiBindingName, RaiBindingInner raiBinding, String ifMatch, String ifNoneMatch, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiBindingName, ifMatch, ifNoneMatch, - contentType, accept, raiBinding, context); - } - - /** - * Creates or replaces one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param raiBinding The RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped binding from an Azure resource to an Agent Control Specification policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RaiBindingInner createOrUpdate(String resourceGroupName, String accountName, String raiBindingName, - RaiBindingInner raiBinding) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateWithResponse(resourceGroupName, accountName, raiBindingName, raiBinding, ifMatch, - ifNoneMatch, Context.NONE).getValue(); - } - - /** - * Deletes one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String raiBindingName, String ifMatch) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiBindingName, ifMatch, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String raiBindingName) { - final String ifMatch = null; - return deleteWithResponseAsync(resourceGroupName, accountName, raiBindingName, ifMatch) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String raiBindingName, - String ifMatch, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiBindingName, ifMatch, context); - } - - /** - * Deletes one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String raiBindingName) { - final String ifMatch = null; - deleteWithResponse(resourceGroupName, accountName, raiBindingName, ifMatch, Context.NONE); - } - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of RAI bindings to return. Defaults to 50. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - Integer top) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of RAI bindings to return. Defaults to 50. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of RAI bindings to return. Defaults to 50. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String accountName, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of RAI bindings to return. Defaults to 50. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String accountName, Integer top, - Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, top, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, top), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of RAI bindings to return. Defaults to 50. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Integer top, - Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, top, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsImpl.java deleted file mode 100644 index acdba6f64c76..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner; -import com.azure.resourcemanager.cognitiveservices.models.RaiBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindings; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingsGetResponse; - -public final class RaiBindingsImpl implements RaiBindings { - private static final ClientLogger LOGGER = new ClientLogger(RaiBindingsImpl.class); - - private final RaiBindingsClient innerClient; - - private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager; - - public RaiBindingsImpl(RaiBindingsClient innerClient, - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String accountName, String raiBindingName, - Context context) { - RaiBindingsGetResponse inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, raiBindingName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RaiBindingImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RaiBinding get(String resourceGroupName, String accountName, String raiBindingName) { - RaiBindingInner inner = this.serviceClient().get(resourceGroupName, accountName, raiBindingName); - if (inner != null) { - return new RaiBindingImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String raiBindingName, - String ifMatch, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, accountName, raiBindingName, ifMatch, context); - } - - public void delete(String resourceGroupName, String accountName, String raiBindingName) { - this.serviceClient().delete(resourceGroupName, accountName, raiBindingName); - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RaiBindingImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RaiBindingImpl(inner1, this.manager())); - } - - public RaiBinding getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String raiBindingName = ResourceManagerUtils.getValueFromIdByName(id, "raiBindings"); - if (raiBindingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'raiBindings'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, raiBindingName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String raiBindingName = ResourceManagerUtils.getValueFromIdByName(id, "raiBindings"); - if (raiBindingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'raiBindings'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, raiBindingName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String raiBindingName = ResourceManagerUtils.getValueFromIdByName(id, "raiBindings"); - if (raiBindingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'raiBindings'.", id))); - } - String localIfMatch = null; - this.deleteWithResponse(resourceGroupName, accountName, raiBindingName, localIfMatch, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, String ifMatch, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String raiBindingName = ResourceManagerUtils.getValueFromIdByName(id, "raiBindings"); - if (raiBindingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'raiBindings'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, raiBindingName, ifMatch, context); - } - - private RaiBindingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() { - return this.serviceManager; - } - - public RaiBindingImpl define(String name) { - return new RaiBindingImpl(name, this.manager()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesClientImpl.java index 92533d6dd989..18707212ee39 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesClientImpl.java @@ -35,8 +35,6 @@ import com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiPolicyInner; import com.azure.resourcemanager.cognitiveservices.implementation.models.RaiPolicyListResult; -import com.azure.resourcemanager.cognitiveservices.models.RaiPoliciesCreateOrUpdateResponse; -import com.azure.resourcemanager.cognitiveservices.models.RaiPoliciesGetResponse; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -77,7 +75,7 @@ public interface RaiPoliciesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono get(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("raiPolicyName") String raiPolicyName, @HeaderParam("Accept") String accept, Context context); @@ -86,7 +84,7 @@ Mono get(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - RaiPoliciesGetResponse getSync(@HostParam("endpoint") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("raiPolicyName") String raiPolicyName, @HeaderParam("Accept") String accept, Context context); @@ -94,22 +92,20 @@ RaiPoliciesGetResponse getSync(@HostParam("endpoint") String endpoint, @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono createOrUpdate(@HostParam("endpoint") String endpoint, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiPolicyName") String raiPolicyName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @PathParam("raiPolicyName") String raiPolicyName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") RaiPolicyInner raiPolicy, Context context); @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - RaiPoliciesCreateOrUpdateResponse createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiPolicyName") String raiPolicyName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @PathParam("raiPolicyName") String raiPolicyName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") RaiPolicyInner raiPolicy, Context context); @@ -120,7 +116,7 @@ RaiPoliciesCreateOrUpdateResponse createOrUpdateSync(@HostParam("endpoint") Stri Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiPolicyName") String raiPolicyName, @HeaderParam("If-Match") String ifMatch, Context context); + @PathParam("raiPolicyName") String raiPolicyName, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies/{raiPolicyName}") @@ -129,7 +125,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiPolicyName") String raiPolicyName, @HeaderParam("If-Match") String ifMatch, Context context); + @PathParam("raiPolicyName") String raiPolicyName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiPolicies") @@ -173,11 +169,11 @@ Response listNextSync(@PathParam(value = "nextLink", encode * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Content Filters associated with the Azure OpenAI account on successful completion of - * {@link Mono}. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String accountName, + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, String raiPolicyName) { final String accept = "application/json"; return FluxUtil @@ -214,10 +210,10 @@ private Mono getAsync(String resourceGroupName, String accountNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Content Filters associated with the Azure OpenAI account. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RaiPoliciesGetResponse getWithResponse(String resourceGroupName, String accountName, String raiPolicyName, + public Response getWithResponse(String resourceGroupName, String accountName, String raiPolicyName, Context context) { final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -247,22 +243,20 @@ public RaiPolicyInner get(String resourceGroupName, String accountName, String r * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. * @param raiPolicy Properties describing the Content Filters. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cognitive Services RaiPolicy on successful completion of {@link Mono}. + * @return cognitive Services RaiPolicy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String raiPolicyName, RaiPolicyInner raiPolicy, String ifMatch, String ifNoneMatch) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String accountName, + String raiPolicyName, RaiPolicyInner raiPolicy) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, ifMatch, ifNoneMatch, - contentType, accept, raiPolicy, context)) + this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, contentType, accept, + raiPolicy, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -281,10 +275,8 @@ private Mono createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String accountName, String raiPolicyName, RaiPolicyInner raiPolicy) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, raiPolicyName, raiPolicy, ifMatch, - ifNoneMatch).flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, accountName, raiPolicyName, raiPolicy) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -294,22 +286,20 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. * @param raiPolicy Properties describing the Content Filters. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cognitive Services RaiPolicy. + * @return cognitive Services RaiPolicy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RaiPoliciesCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, String accountName, - String raiPolicyName, RaiPolicyInner raiPolicy, String ifMatch, String ifNoneMatch, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String raiPolicyName, RaiPolicyInner raiPolicy, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, ifMatch, ifNoneMatch, - contentType, accept, raiPolicy, context); + this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, contentType, accept, + raiPolicy, context); } /** @@ -327,10 +317,8 @@ public RaiPoliciesCreateOrUpdateResponse createOrUpdateWithResponse(String resou @ServiceMethod(returns = ReturnType.SINGLE) public RaiPolicyInner createOrUpdate(String resourceGroupName, String accountName, String raiPolicyName, RaiPolicyInner raiPolicy) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, raiPolicy, ifMatch, - ifNoneMatch, Context.NONE).getValue(); + return createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, raiPolicy, Context.NONE) + .getValue(); } /** @@ -339,7 +327,6 @@ public RaiPolicyInner createOrUpdate(String resourceGroupName, String accountNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -347,10 +334,10 @@ public RaiPolicyInner createOrUpdate(String resourceGroupName, String accountNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String raiPolicyName, String ifMatch) { + String raiPolicyName) { return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, ifMatch, context)) + this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -360,17 +347,16 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String accountName, String raiPolicyName, - String ifMatch) { + private Response deleteWithResponse(String resourceGroupName, String accountName, + String raiPolicyName) { return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, ifMatch, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, Context.NONE); } /** @@ -379,7 +365,6 @@ private Response deleteWithResponse(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -388,30 +373,9 @@ private Response deleteWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String accountName, String raiPolicyName, - String ifMatch, Context context) { + Context context) { return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, ifMatch, context); - } - - /** - * Deletes the specified Content Filters associated with the Azure OpenAI account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String raiPolicyName, String ifMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, raiPolicyName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + this.client.getSubscriptionId(), resourceGroupName, accountName, raiPolicyName, context); } /** @@ -428,32 +392,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, String raiPolicyName) { - final String ifMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, raiPolicyName, ifMatch); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, raiPolicyName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } - /** - * Deletes the specified Content Filters associated with the Azure OpenAI account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String raiPolicyName, String ifMatch) { - Response response = deleteWithResponse(resourceGroupName, accountName, raiPolicyName, ifMatch); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - /** * Deletes the specified Content Filters associated with the Azure OpenAI account. * @@ -468,8 +411,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String raiPolicyName) { - final String ifMatch = null; - Response response = deleteWithResponse(resourceGroupName, accountName, raiPolicyName, ifMatch); + Response response = deleteWithResponse(resourceGroupName, accountName, raiPolicyName); return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } @@ -479,7 +421,6 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -488,30 +429,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String raiPolicyName, String ifMatch, Context context) { - Response response - = deleteWithResponse(resourceGroupName, accountName, raiPolicyName, ifMatch, context); + String raiPolicyName, Context context) { + Response response = deleteWithResponse(resourceGroupName, accountName, raiPolicyName, context); return this.client.getLroResult(response, Void.class, Void.class, context); } - /** - * Deletes the specified Content Filters associated with the Azure OpenAI account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String raiPolicyName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, accountName, raiPolicyName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Deletes the specified Content Filters associated with the Azure OpenAI account. * @@ -525,8 +447,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String raiPolicyName) { - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, accountName, raiPolicyName, ifMatch).last() + return beginDeleteAsync(resourceGroupName, accountName, raiPolicyName).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -542,8 +463,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String accountName, String raiPolicyName) { - final String ifMatch = null; - beginDelete(resourceGroupName, accountName, raiPolicyName, ifMatch).getFinalResult(); + beginDelete(resourceGroupName, accountName, raiPolicyName).getFinalResult(); } /** @@ -552,16 +472,14 @@ public void delete(String resourceGroupName, String accountName, String raiPolic * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String raiPolicyName, String ifMatch, - Context context) { - beginDelete(resourceGroupName, accountName, raiPolicyName, ifMatch, context).getFinalResult(); + public void delete(String resourceGroupName, String accountName, String raiPolicyName, Context context) { + beginDelete(resourceGroupName, accountName, raiPolicyName, context).getFinalResult(); } /** diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesImpl.java index 1f153ce5d1ae..4dc60d07cbe5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesImpl.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiPolicyInner; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicies; -import com.azure.resourcemanager.cognitiveservices.models.RaiPoliciesGetResponse; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicy; public final class RaiPoliciesImpl implements RaiPolicies { @@ -30,14 +29,10 @@ public RaiPoliciesImpl(RaiPoliciesClient innerClient, public Response getWithResponse(String resourceGroupName, String accountName, String raiPolicyName, Context context) { - RaiPoliciesGetResponse inner + Response inner = this.serviceClient().getWithResponse(resourceGroupName, accountName, raiPolicyName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RaiPolicyImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RaiPolicyImpl(inner.getValue(), this.manager())); } public RaiPolicy get(String resourceGroupName, String accountName, String raiPolicyName) { @@ -53,9 +48,8 @@ public void delete(String resourceGroupName, String accountName, String raiPolic this.serviceClient().delete(resourceGroupName, accountName, raiPolicyName); } - public void delete(String resourceGroupName, String accountName, String raiPolicyName, String ifMatch, - Context context) { - this.serviceClient().delete(resourceGroupName, accountName, raiPolicyName, ifMatch, context); + public void delete(String resourceGroupName, String accountName, String raiPolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, raiPolicyName, context); } public PagedIterable list(String resourceGroupName, String accountName) { @@ -122,11 +116,10 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); } - String localIfMatch = null; - this.delete(resourceGroupName, accountName, raiPolicyName, localIfMatch, Context.NONE); + this.delete(resourceGroupName, accountName, raiPolicyName, Context.NONE); } - public void deleteByIdWithResponse(String id, String ifMatch, Context context) { + public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -142,7 +135,7 @@ public void deleteByIdWithResponse(String id, String ifMatch, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); } - this.delete(resourceGroupName, accountName, raiPolicyName, ifMatch, context); + this.delete(resourceGroupName, accountName, raiPolicyName, context); } private RaiPoliciesClient serviceClient() { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPolicyImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPolicyImpl.java index 13f31a3c2893..c25bc5dc0472 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPolicyImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPolicyImpl.java @@ -68,14 +68,6 @@ private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager man private String raiPolicyName; - private String createIfMatch; - - private String createIfNoneMatch; - - private String updateIfMatch; - - private String updateIfNoneMatch; - public RaiPolicyImpl withExistingAccount(String resourceGroupName, String accountName) { this.resourceGroupName = resourceGroupName; this.accountName = accountName; @@ -85,8 +77,7 @@ public RaiPolicyImpl withExistingAccount(String resourceGroupName, String accoun public RaiPolicy create() { this.innerObject = serviceManager.serviceClient() .getRaiPolicies() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, this.innerModel(), createIfMatch, - createIfNoneMatch, Context.NONE) + .createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -94,8 +85,7 @@ public RaiPolicy create() { public RaiPolicy create(Context context) { this.innerObject = serviceManager.serviceClient() .getRaiPolicies() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, this.innerModel(), createIfMatch, - createIfNoneMatch, context) + .createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, this.innerModel(), context) .getValue(); return this; } @@ -104,21 +94,16 @@ public RaiPolicy create(Context context) { this.innerObject = new RaiPolicyInner(); this.serviceManager = serviceManager; this.raiPolicyName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; } public RaiPolicyImpl update() { - this.updateIfMatch = null; - this.updateIfNoneMatch = null; return this; } public RaiPolicy apply() { this.innerObject = serviceManager.serviceClient() .getRaiPolicies() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, this.innerModel(), updateIfMatch, - updateIfNoneMatch, Context.NONE) + .createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -126,8 +111,7 @@ public RaiPolicy apply() { public RaiPolicy apply(Context context) { this.innerObject = serviceManager.serviceClient() .getRaiPolicies() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, this.innerModel(), updateIfMatch, - updateIfNoneMatch, context) + .createOrUpdateWithResponse(resourceGroupName, accountName, raiPolicyName, this.innerModel(), context) .getValue(); return this; } @@ -166,28 +150,4 @@ public RaiPolicyImpl withProperties(RaiPolicyProperties properties) { this.innerModel().withProperties(properties); return this; } - - public RaiPolicyImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public RaiPolicyImpl withIfNoneMatch(String ifNoneMatch) { - if (isInCreateMode()) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } else { - this.updateIfNoneMatch = ifNoneMatch; - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegoImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegoImpl.java deleted file mode 100644 index 270a4cd0ec3c..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegoImpl.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner; -import com.azure.resourcemanager.cognitiveservices.models.RaiRego; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoProperties; -import java.util.Collections; -import java.util.Map; - -public final class RaiRegoImpl implements RaiRego, RaiRego.Definition, RaiRego.Update { - private RaiRegoInner innerObject; - - private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public RaiRegoProperties properties() { - return this.innerModel().properties(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public RaiRegoInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String raiRegoName; - - private String createIfMatch; - - private String createIfNoneMatch; - - private String updateIfMatch; - - private String updateIfNoneMatch; - - public RaiRegoImpl withExistingAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public RaiRego create() { - this.innerObject = serviceManager.serviceClient() - .getRaiRegos() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiRegoName, this.innerModel(), createIfMatch, - createIfNoneMatch, Context.NONE) - .getValue(); - return this; - } - - public RaiRego create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRaiRegos() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiRegoName, this.innerModel(), createIfMatch, - createIfNoneMatch, context) - .getValue(); - return this; - } - - RaiRegoImpl(String name, com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerObject = new RaiRegoInner(); - this.serviceManager = serviceManager; - this.raiRegoName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; - } - - public RaiRegoImpl update() { - this.updateIfMatch = null; - this.updateIfNoneMatch = null; - return this; - } - - public RaiRego apply() { - this.innerObject = serviceManager.serviceClient() - .getRaiRegos() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiRegoName, this.innerModel(), updateIfMatch, - updateIfNoneMatch, Context.NONE) - .getValue(); - return this; - } - - public RaiRego apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRaiRegos() - .createOrUpdateWithResponse(resourceGroupName, accountName, raiRegoName, this.innerModel(), updateIfMatch, - updateIfNoneMatch, context) - .getValue(); - return this; - } - - RaiRegoImpl(RaiRegoInner innerObject, - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts"); - this.raiRegoName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "raiRegos"); - } - - public RaiRego refresh() { - this.innerObject = serviceManager.serviceClient() - .getRaiRegos() - .getWithResponse(resourceGroupName, accountName, raiRegoName, Context.NONE) - .getValue(); - return this; - } - - public RaiRego refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRaiRegos() - .getWithResponse(resourceGroupName, accountName, raiRegoName, context) - .getValue(); - return this; - } - - public RaiRegoImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public RaiRegoImpl withProperties(RaiRegoProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public RaiRegoImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public RaiRegoImpl withIfNoneMatch(String ifNoneMatch) { - if (isInCreateMode()) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } else { - this.updateIfNoneMatch = ifNoneMatch; - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosClientImpl.java deleted file mode 100644 index 5c50836d2f75..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosClientImpl.java +++ /dev/null @@ -1,590 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner; -import com.azure.resourcemanager.cognitiveservices.implementation.models.RaiRegoListResult; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegosCreateOrUpdateResponse; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegosGetResponse; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in RaiRegosClient. - */ -public final class RaiRegosClientImpl implements RaiRegosClient { - /** - * The proxy service used to perform REST calls. - */ - private final RaiRegosService service; - - /** - * The service client containing this operation class. - */ - private final CognitiveServicesManagementClientImpl client; - - /** - * Initializes an instance of RaiRegosClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RaiRegosClientImpl(CognitiveServicesManagementClientImpl client) { - this.service = RestProxy.create(RaiRegosService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for CognitiveServicesManagementClientRaiRegos to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "CognitiveServicesManagementClientRaiRegos") - public interface RaiRegosService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiRegos/{raiRegoName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiRegoName") String raiRegoName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiRegos/{raiRegoName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - RaiRegosGetResponse getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiRegoName") String raiRegoName, @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiRegos/{raiRegoName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiRegoName") String raiRegoName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") RaiRegoInner raiRego, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiRegos/{raiRegoName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - RaiRegosCreateOrUpdateResponse createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiRegoName") String raiRegoName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") RaiRegoInner raiRego, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiRegos/{raiRegoName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiRegoName") String raiRegoName, @HeaderParam("If-Match") String ifMatch, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiRegos/{raiRegoName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("raiRegoName") String raiRegoName, @HeaderParam("If-Match") String ifMatch, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiRegos") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiRegos") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String accountName, - String raiRegoName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiRegoName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String raiRegoName) { - return getWithResponseAsync(resourceGroupName, accountName, raiRegoName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RaiRegosGetResponse getWithResponse(String resourceGroupName, String accountName, String raiRegoName, - Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, raiRegoName, accept, context); - } - - /** - * Gets one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RaiRegoInner get(String resourceGroupName, String accountName, String raiRegoName) { - return getWithResponse(resourceGroupName, accountName, raiRegoName, Context.NONE).getValue(); - } - - /** - * Creates or replaces one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param raiRego The reusable Rego artifact. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped reusable Rego artifact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String raiRegoName, RaiRegoInner raiRego, String ifMatch, String ifNoneMatch) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiRegoName, ifMatch, ifNoneMatch, - contentType, accept, raiRego, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or replaces one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param raiRego The reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped reusable Rego artifact on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, String raiRegoName, - RaiRegoInner raiRego) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, raiRegoName, raiRego, ifMatch, - ifNoneMatch).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or replaces one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param raiRego The reusable Rego artifact. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped reusable Rego artifact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RaiRegosCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, String accountName, - String raiRegoName, RaiRegoInner raiRego, String ifMatch, String ifNoneMatch, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiRegoName, ifMatch, ifNoneMatch, - contentType, accept, raiRego, context); - } - - /** - * Creates or replaces one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param raiRego The reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an account-scoped reusable Rego artifact. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RaiRegoInner createOrUpdate(String resourceGroupName, String accountName, String raiRegoName, - RaiRegoInner raiRego) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateWithResponse(resourceGroupName, accountName, raiRegoName, raiRego, ifMatch, ifNoneMatch, - Context.NONE).getValue(); - } - - /** - * Deletes one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String raiRegoName, String ifMatch) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiRegoName, ifMatch, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String raiRegoName) { - final String ifMatch = null; - return deleteWithResponseAsync(resourceGroupName, accountName, raiRegoName, ifMatch) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String raiRegoName, - String ifMatch, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, raiRegoName, ifMatch, context); - } - - /** - * Deletes one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String raiRegoName) { - final String ifMatch = null; - deleteWithResponse(resourceGroupName, accountName, raiRegoName, ifMatch, Context.NONE); - } - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of reusable Rego artifacts to return. Defaults to 10. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - Integer top) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of reusable Rego artifacts to return. Defaults to 10. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of reusable Rego artifacts to return. Defaults to 10. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String accountName, Integer top) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, top, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of reusable Rego artifacts to return. Defaults to 10. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String accountName, Integer top, - Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, top, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, top), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of reusable Rego artifacts to return. Defaults to 10. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Integer top, - Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, top, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosImpl.java deleted file mode 100644 index 8ff85931715f..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner; -import com.azure.resourcemanager.cognitiveservices.models.RaiRego; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegos; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegosGetResponse; - -public final class RaiRegosImpl implements RaiRegos { - private static final ClientLogger LOGGER = new ClientLogger(RaiRegosImpl.class); - - private final RaiRegosClient innerClient; - - private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager; - - public RaiRegosImpl(RaiRegosClient innerClient, - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String accountName, String raiRegoName, - Context context) { - RaiRegosGetResponse inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, raiRegoName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RaiRegoImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RaiRego get(String resourceGroupName, String accountName, String raiRegoName) { - RaiRegoInner inner = this.serviceClient().get(resourceGroupName, accountName, raiRegoName); - if (inner != null) { - return new RaiRegoImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String raiRegoName, - String ifMatch, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, raiRegoName, ifMatch, context); - } - - public void delete(String resourceGroupName, String accountName, String raiRegoName) { - this.serviceClient().delete(resourceGroupName, accountName, raiRegoName); - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RaiRegoImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RaiRegoImpl(inner1, this.manager())); - } - - public RaiRego getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String raiRegoName = ResourceManagerUtils.getValueFromIdByName(id, "raiRegos"); - if (raiRegoName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'raiRegos'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, raiRegoName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String raiRegoName = ResourceManagerUtils.getValueFromIdByName(id, "raiRegos"); - if (raiRegoName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'raiRegos'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, raiRegoName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String raiRegoName = ResourceManagerUtils.getValueFromIdByName(id, "raiRegos"); - if (raiRegoName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'raiRegos'.", id))); - } - String localIfMatch = null; - this.deleteWithResponse(resourceGroupName, accountName, raiRegoName, localIfMatch, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, String ifMatch, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); - } - String raiRegoName = ResourceManagerUtils.getValueFromIdByName(id, "raiRegos"); - if (raiRegoName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'raiRegos'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, raiRegoName, ifMatch, context); - } - - private RaiRegosClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() { - return this.serviceManager; - } - - public RaiRegoImpl define(String name) { - return new RaiRegoImpl(name, this.manager()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsageImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsageImpl.java index 9559425847e7..02b9771cb138 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsageImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsageImpl.java @@ -22,14 +22,6 @@ public final class UsageImpl implements Usage { this.serviceManager = serviceManager; } - public String id() { - return this.innerModel().id(); - } - - public String type() { - return this.innerModel().type(); - } - public UnitType unit() { return this.innerModel().unit(); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchImpl.java index eb4e1cfe80b3..3763baf1c763 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchImpl.java @@ -4,14 +4,15 @@ package com.azure.resourcemanager.cognitiveservices.implementation; +import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.cognitiveservices.fluent.models.WorkbenchInner; import com.azure.resourcemanager.cognitiveservices.models.Identity; import com.azure.resourcemanager.cognitiveservices.models.Workbench; import com.azure.resourcemanager.cognitiveservices.models.WorkbenchProperties; -import com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdate; -import com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdateProperties; +import java.util.Collections; +import java.util.Map; public final class WorkbenchImpl implements Workbench, Workbench.Definition, Workbench.Update { private WorkbenchInner innerObject; @@ -38,6 +39,19 @@ public String etag() { return this.innerModel().etag(); } + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + public Identity identity() { return this.innerModel().identity(); } @@ -46,6 +60,14 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -66,8 +88,6 @@ private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager man private String workbenchName; - private WorkbenchUpdate updateProperties; - public WorkbenchImpl withExistingProject(String resourceGroupName, String accountName, String projectName) { this.resourceGroupName = resourceGroupName; this.accountName = accountName; @@ -97,24 +117,20 @@ public Workbench create(Context context) { } public WorkbenchImpl update() { - this.updateProperties = new WorkbenchUpdate(); return this; } public Workbench apply() { this.innerObject = serviceManager.serviceClient() .getWorkbenches() - .updateWithResponse(resourceGroupName, accountName, projectName, workbenchName, updateProperties, - Context.NONE) - .getValue(); + .update(resourceGroupName, accountName, projectName, workbenchName, this.innerModel(), Context.NONE); return this; } public Workbench apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkbenches() - .updateWithResponse(resourceGroupName, accountName, projectName, workbenchName, updateProperties, context) - .getValue(); + .update(resourceGroupName, accountName, projectName, workbenchName, this.innerModel(), context); return this; } @@ -173,22 +189,23 @@ public WorkbenchImpl withProperties(WorkbenchProperties properties) { return this; } - public WorkbenchImpl withIdentity(Identity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateProperties.withIdentity(identity); - return this; - } + public WorkbenchImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; } - public WorkbenchImpl withProperties(WorkbenchUpdateProperties properties) { - this.updateProperties.withProperties(properties); + public WorkbenchImpl withRegion(String location) { + this.innerModel().withLocation(location); return this; } - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; + public WorkbenchImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public WorkbenchImpl withIdentity(Identity identity) { + this.innerModel().withIdentity(identity); + return this; } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchesClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchesClientImpl.java index 4cea129280ef..8f7f63f65fd4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchesClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchesClientImpl.java @@ -37,7 +37,6 @@ import com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.WorkbenchInner; import com.azure.resourcemanager.cognitiveservices.implementation.models.WorkbenchListResult; -import com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -115,24 +114,24 @@ Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @BodyParam("application/json") WorkbenchInner resource, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/workbenches/{workbenchName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("projectName") String projectName, @PathParam("workbenchName") String workbenchName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") WorkbenchUpdate properties, Context context); + @BodyParam("application/json") WorkbenchInner properties, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/workbenches/{workbenchName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("projectName") String projectName, @PathParam("workbenchName") String workbenchName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") WorkbenchUpdate properties, Context context); + @BodyParam("application/json") WorkbenchInner properties, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/workbenches/{workbenchName}") @@ -554,8 +553,8 @@ public WorkbenchInner createOrUpdate(String resourceGroupName, String accountNam * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - String projectName, String workbenchName, WorkbenchUpdate properties) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String projectName, String workbenchName, WorkbenchInner properties) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -577,13 +576,16 @@ private Mono> updateWithResponseAsync(String resourceGr * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return workbench resource under a Cognitive Services project. - * Provides interactive compute with data access for AI development on successful completion of {@link Mono}. + * Provides interactive compute with data access for AI development along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String projectName, - String workbenchName, WorkbenchUpdate properties) { - return updateWithResponseAsync(resourceGroupName, accountName, projectName, workbenchName, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response updateWithResponse(String resourceGroupName, String accountName, String projectName, + String workbenchName, WorkbenchInner properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, projectName, workbenchName, contentType, + accept, properties, Context.NONE); } /** @@ -602,8 +604,8 @@ private Mono updateAsync(String resourceGroupName, String accoun * Provides interactive compute with data access for AI development along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String accountName, String projectName, - String workbenchName, WorkbenchUpdate properties, Context context) { + private Response updateWithResponse(String resourceGroupName, String accountName, String projectName, + String workbenchName, WorkbenchInner properties, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -611,6 +613,97 @@ public Response updateWithResponse(String resourceGroupName, Str accept, properties, context); } + /** + * Updates a workbench associated with the project. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param projectName The name of Cognitive Services account's project. + * @param workbenchName The name of the workbench associated with the project. + * @param properties The workbench properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of workbench resource under a Cognitive Services project. + * Provides interactive compute with data access for AI development. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkbenchInner> beginUpdateAsync(String resourceGroupName, + String accountName, String projectName, String workbenchName, WorkbenchInner properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, projectName, workbenchName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkbenchInner.class, WorkbenchInner.class, this.client.getContext()); + } + + /** + * Updates a workbench associated with the project. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param projectName The name of Cognitive Services account's project. + * @param workbenchName The name of the workbench associated with the project. + * @param properties The workbench properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of workbench resource under a Cognitive Services project. + * Provides interactive compute with data access for AI development. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkbenchInner> beginUpdate(String resourceGroupName, + String accountName, String projectName, String workbenchName, WorkbenchInner properties) { + Response response + = updateWithResponse(resourceGroupName, accountName, projectName, workbenchName, properties); + return this.client.getLroResult(response, WorkbenchInner.class, + WorkbenchInner.class, Context.NONE); + } + + /** + * Updates a workbench associated with the project. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param projectName The name of Cognitive Services account's project. + * @param workbenchName The name of the workbench associated with the project. + * @param properties The workbench properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of workbench resource under a Cognitive Services project. + * Provides interactive compute with data access for AI development. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkbenchInner> beginUpdate(String resourceGroupName, + String accountName, String projectName, String workbenchName, WorkbenchInner properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, accountName, projectName, workbenchName, properties, context); + return this.client.getLroResult(response, WorkbenchInner.class, + WorkbenchInner.class, context); + } + + /** + * Updates a workbench associated with the project. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param projectName The name of Cognitive Services account's project. + * @param workbenchName The name of the workbench associated with the project. + * @param properties The workbench properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return workbench resource under a Cognitive Services project. + * Provides interactive compute with data access for AI development on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String projectName, + String workbenchName, WorkbenchInner properties) { + return beginUpdateAsync(resourceGroupName, accountName, projectName, workbenchName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + /** * Updates a workbench associated with the project. * @@ -627,9 +720,30 @@ public Response updateWithResponse(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkbenchInner update(String resourceGroupName, String accountName, String projectName, String workbenchName, - WorkbenchUpdate properties) { - return updateWithResponse(resourceGroupName, accountName, projectName, workbenchName, properties, Context.NONE) - .getValue(); + WorkbenchInner properties) { + return beginUpdate(resourceGroupName, accountName, projectName, workbenchName, properties).getFinalResult(); + } + + /** + * Updates a workbench associated with the project. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param projectName The name of Cognitive Services account's project. + * @param workbenchName The name of the workbench associated with the project. + * @param properties The workbench properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return workbench resource under a Cognitive Services project. + * Provides interactive compute with data access for AI development. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkbenchInner update(String resourceGroupName, String accountName, String projectName, String workbenchName, + WorkbenchInner properties, Context context) { + return beginUpdate(resourceGroupName, accountName, projectName, workbenchName, properties, context) + .getFinalResult(); } /** diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AdapterDeploymentListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AdapterDeploymentListResult.java deleted file mode 100644 index f6e9ae04b74f..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AdapterDeploymentListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated collection of adapter deployments. - */ -@Immutable -public final class AdapterDeploymentListResult implements JsonSerializable { - /* - * Adapter deployments in this page. - */ - private List value; - - /* - * URL used to retrieve the next page, when one exists. - */ - private String nextLink; - - /** - * Creates an instance of AdapterDeploymentListResult class. - */ - private AdapterDeploymentListResult() { - } - - /** - * Get the value property: Adapter deployments in this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL used to retrieve the next page, when one exists. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdapterDeploymentListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdapterDeploymentListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AdapterDeploymentListResult. - */ - public static AdapterDeploymentListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdapterDeploymentListResult deserializedAdapterDeploymentListResult = new AdapterDeploymentListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> AdapterDeploymentInner.fromJson(reader1)); - deserializedAdapterDeploymentListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAdapterDeploymentListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAdapterDeploymentListResult; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CostControlListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CostControlListResult.java deleted file mode 100644 index 66ce06c532c9..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CostControlListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.cognitiveservices.fluent.models.CostControlInner; -import java.io.IOException; -import java.util.List; - -/** - * A page of cost controls. - */ -@Immutable -public final class CostControlListResult implements JsonSerializable { - /* - * The link used to get the next page of cost controls. - */ - private String nextLink; - - /* - * The cost controls in this page. - */ - private List value; - - /** - * Creates an instance of CostControlListResult class. - */ - private CostControlListResult() { - } - - /** - * Get the nextLink property: The link used to get the next page of cost controls. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: The cost controls in this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CostControlListResult. - */ - public static CostControlListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlListResult deserializedCostControlListResult = new CostControlListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> CostControlInner.fromJson(reader1)); - deserializedCostControlListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedCostControlListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlListResult; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiBindingListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiBindingListResult.java deleted file mode 100644 index 044707bf0dbb..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiBindingListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner; -import java.io.IOException; -import java.util.List; - -/** - * The list of account-scoped RAI bindings. - */ -@Immutable -public final class RaiBindingListResult implements JsonSerializable { - /* - * The link used to get the next page. - */ - private String nextLink; - - /* - * The RAI bindings in this page. - */ - private List value; - - /** - * Creates an instance of RaiBindingListResult class. - */ - private RaiBindingListResult() { - } - - /** - * Get the nextLink property: The link used to get the next page. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: The RAI bindings in this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiBindingListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiBindingListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiBindingListResult. - */ - public static RaiBindingListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiBindingListResult deserializedRaiBindingListResult = new RaiBindingListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> RaiBindingInner.fromJson(reader1)); - deserializedRaiBindingListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedRaiBindingListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiBindingListResult; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiRegoListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiRegoListResult.java deleted file mode 100644 index 00b4ea419089..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiRegoListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner; -import java.io.IOException; -import java.util.List; - -/** - * The list of account-scoped reusable Rego resources. - */ -@Immutable -public final class RaiRegoListResult implements JsonSerializable { - /* - * The link used to get the next page. - */ - private String nextLink; - - /* - * The Rego resources in this page. - */ - private List value; - - /** - * Creates an instance of RaiRegoListResult class. - */ - private RaiRegoListResult() { - } - - /** - * Get the nextLink property: The link used to get the next page. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: The Rego resources in this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiRegoListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiRegoListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiRegoListResult. - */ - public static RaiRegoListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiRegoListResult deserializedRaiRegoListResult = new RaiRegoListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> RaiRegoInner.fromJson(reader1)); - deserializedRaiRegoListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedRaiRegoListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiRegoListResult; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java index e1c16b71adc4..33f254e8a999 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java @@ -222,19 +222,6 @@ public final class AccountProperties implements JsonSerializable agentHostingConfigurations; - /* - * The full resource IDs of cost controls directly attached to this account. - * At the moment the service only supports a single cost control. This will be expanded in future API versions. - */ - private List costControlIds; - - /* - * The account-level connections used to publish cost control telemetry and events. Application Insights is optional - * for attachment, accounting, and enforcement and can be configured later. Event Grid must be configured before - * attaching a cost control with an alert threshold. - */ - private CostControlConnections costControlConnections; - /** * Creates an instance of AccountProperties class. */ @@ -880,52 +867,6 @@ public List agentHostingConfigurations() { return this; } - /** - * Get the costControlIds property: The full resource IDs of cost controls directly attached to this account. - * At the moment the service only supports a single cost control. This will be expanded in future API versions. - * - * @return the costControlIds value. - */ - public List costControlIds() { - return this.costControlIds; - } - - /** - * Set the costControlIds property: The full resource IDs of cost controls directly attached to this account. - * At the moment the service only supports a single cost control. This will be expanded in future API versions. - * - * @param costControlIds the costControlIds value to set. - * @return the AccountProperties object itself. - */ - public AccountProperties withCostControlIds(List costControlIds) { - this.costControlIds = costControlIds; - return this; - } - - /** - * Get the costControlConnections property: The account-level connections used to publish cost control telemetry and - * events. Application Insights is optional for attachment, accounting, and enforcement and can be configured later. - * Event Grid must be configured before attaching a cost control with an alert threshold. - * - * @return the costControlConnections value. - */ - public CostControlConnections costControlConnections() { - return this.costControlConnections; - } - - /** - * Set the costControlConnections property: The account-level connections used to publish cost control telemetry and - * events. Application Insights is optional for attachment, accounting, and enforcement and can be configured later. - * Event Grid must be configured before attaching a cost control with an alert threshold. - * - * @param costControlConnections the costControlConnections value to set. - * @return the AccountProperties object itself. - */ - public AccountProperties withCostControlConnections(CostControlConnections costControlConnections) { - this.costControlConnections = costControlConnections; - return this; - } - /** * {@inheritDoc} */ @@ -962,9 +903,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("capabilitySettings", this.capabilitySettings); jsonWriter.writeArrayField("agentHostingConfigurations", this.agentHostingConfigurations, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("costControlIds", this.costControlIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("costControlConnections", this.costControlConnections); return jsonWriter.writeEndObject(); } @@ -1078,11 +1016,6 @@ public static AccountProperties fromJson(JsonReader jsonReader) throws IOExcepti List agentHostingConfigurations = reader.readArray(reader1 -> AgentHostingConfiguration.fromJson(reader1)); deserializedAccountProperties.agentHostingConfigurations = agentHostingConfigurations; - } else if ("costControlIds".equals(fieldName)) { - List costControlIds = reader.readArray(reader1 -> reader1.getString()); - deserializedAccountProperties.costControlIds = costControlIds; - } else if ("costControlConnections".equals(fieldName)) { - deserializedAccountProperties.costControlConnections = CostControlConnections.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployment.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployment.java deleted file mode 100644 index a7257e288829..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployment.java +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner; - -/** - * An immutable client-side representation of AdapterDeployment. - */ -public interface AdapterDeployment { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Properties of the Cognitive Services adapter deployment. - * - * @return the properties value. - */ - AdapterDeploymentProperties properties(); - - /** - * Gets the etag property: The concurrency token for this adapter deployment. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner object. - * - * @return the inner object. - */ - AdapterDeploymentInner innerModel(); - - /** - * The entirety of the AdapterDeployment definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The AdapterDeployment definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the AdapterDeployment definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the AdapterDeployment definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @return the next definition stage. - */ - WithCreate withExistingAccount(String resourceGroupName, String accountName); - } - - /** - * The stage of the AdapterDeployment definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithProperties, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { - /** - * Executes the create request. - * - * @return the created resource. - */ - AdapterDeployment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - AdapterDeployment create(Context context); - } - - /** - * The stage of the AdapterDeployment definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Properties of the Cognitive Services adapter deployment.. - * - * @param properties Properties of the Cognitive Services adapter deployment. - * @return the next definition stage. - */ - WithCreate withProperties(AdapterDeploymentProperties properties); - } - - /** - * The stage of the AdapterDeployment definition allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: Proceed only when the current adapter deployment ETag matches this - * value.. - * - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @return the next definition stage. - */ - WithCreate withIfMatch(String ifMatch); - } - - /** - * The stage of the AdapterDeployment definition allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Proceed only when no current adapter deployment ETag matches this - * value.. - * - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @return the next definition stage. - */ - WithCreate withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Begins update for the AdapterDeployment resource. - * - * @return the stage of resource update. - */ - AdapterDeployment.Update update(); - - /** - * The template for AdapterDeployment update. - */ - interface Update extends UpdateStages.WithProperties, UpdateStages.WithIfMatch, UpdateStages.WithIfNoneMatch { - /** - * Executes the update request. - * - * @return the updated resource. - */ - AdapterDeployment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - AdapterDeployment apply(Context context); - } - - /** - * The AdapterDeployment update stages. - */ - interface UpdateStages { - /** - * The stage of the AdapterDeployment update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Properties of the Cognitive Services adapter deployment.. - * - * @param properties Properties of the Cognitive Services adapter deployment. - * @return the next definition stage. - */ - Update withProperties(AdapterDeploymentProperties properties); - } - - /** - * The stage of the AdapterDeployment update allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: Proceed only when the current adapter deployment ETag matches this - * value.. - * - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - - /** - * The stage of the AdapterDeployment update allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Proceed only when no current adapter deployment ETag matches this - * value.. - * - * @param ifNoneMatch Proceed only when no current adapter deployment ETag matches this value. - * @return the next definition stage. - */ - Update withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - AdapterDeployment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - AdapterDeployment refresh(Context context); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentLastOperation.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentLastOperation.java deleted file mode 100644 index c16032700358..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentLastOperation.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * The most recently requested adapter lifecycle operation. - */ -@Immutable -public final class AdapterDeploymentLastOperation implements JsonSerializable { - /* - * The type of lifecycle operation. - */ - private AdapterDeploymentOperationType type; - - /* - * The current or terminal operation state. - */ - private AdapterDeploymentOperationState status; - - /* - * The target deployment requested by a create or re-target operation. - */ - private String requestedTargetDeploymentName; - - /* - * The time at which the operation started. - */ - private OffsetDateTime startedAt; - - /* - * The time at which the operation reached a terminal state. - */ - private OffsetDateTime completedAt; - - /** - * Creates an instance of AdapterDeploymentLastOperation class. - */ - private AdapterDeploymentLastOperation() { - } - - /** - * Get the type property: The type of lifecycle operation. - * - * @return the type value. - */ - public AdapterDeploymentOperationType type() { - return this.type; - } - - /** - * Get the status property: The current or terminal operation state. - * - * @return the status value. - */ - public AdapterDeploymentOperationState status() { - return this.status; - } - - /** - * Get the requestedTargetDeploymentName property: The target deployment requested by a create or re-target - * operation. - * - * @return the requestedTargetDeploymentName value. - */ - public String requestedTargetDeploymentName() { - return this.requestedTargetDeploymentName; - } - - /** - * Get the startedAt property: The time at which the operation started. - * - * @return the startedAt value. - */ - public OffsetDateTime startedAt() { - return this.startedAt; - } - - /** - * Get the completedAt property: The time at which the operation reached a terminal state. - * - * @return the completedAt value. - */ - public OffsetDateTime completedAt() { - return this.completedAt; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("startedAt", - this.startedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startedAt)); - jsonWriter.writeStringField("requestedTargetDeploymentName", this.requestedTargetDeploymentName); - jsonWriter.writeStringField("completedAt", - this.completedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.completedAt)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdapterDeploymentLastOperation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdapterDeploymentLastOperation if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AdapterDeploymentLastOperation. - */ - public static AdapterDeploymentLastOperation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdapterDeploymentLastOperation deserializedAdapterDeploymentLastOperation - = new AdapterDeploymentLastOperation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedAdapterDeploymentLastOperation.type - = AdapterDeploymentOperationType.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedAdapterDeploymentLastOperation.status - = AdapterDeploymentOperationState.fromString(reader.getString()); - } else if ("startedAt".equals(fieldName)) { - deserializedAdapterDeploymentLastOperation.startedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("requestedTargetDeploymentName".equals(fieldName)) { - deserializedAdapterDeploymentLastOperation.requestedTargetDeploymentName = reader.getString(); - } else if ("completedAt".equals(fieldName)) { - deserializedAdapterDeploymentLastOperation.completedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedAdapterDeploymentLastOperation; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationState.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationState.java deleted file mode 100644 index b8869e926f4d..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationState.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Lifecycle operation states reported by an adapter deployment. - */ -public final class AdapterDeploymentOperationState extends ExpandableStringEnum { - /** - * The operation was accepted. - */ - public static final AdapterDeploymentOperationState ACCEPTED = fromString("Accepted"); - - /** - * The operation is running. - */ - public static final AdapterDeploymentOperationState RUNNING = fromString("Running"); - - /** - * The operation completed successfully. - */ - public static final AdapterDeploymentOperationState SUCCEEDED = fromString("Succeeded"); - - /** - * The operation failed. - */ - public static final AdapterDeploymentOperationState FAILED = fromString("Failed"); - - /** - * Creates a new instance of AdapterDeploymentOperationState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AdapterDeploymentOperationState() { - } - - /** - * Creates or finds a AdapterDeploymentOperationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding AdapterDeploymentOperationState. - */ - public static AdapterDeploymentOperationState fromString(String name) { - return fromString(name, AdapterDeploymentOperationState.class); - } - - /** - * Gets known AdapterDeploymentOperationState values. - * - * @return known AdapterDeploymentOperationState values. - */ - public static Collection values() { - return values(AdapterDeploymentOperationState.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationType.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationType.java deleted file mode 100644 index 453e41d919d0..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Lifecycle operation types reported by an adapter deployment. - */ -public final class AdapterDeploymentOperationType extends ExpandableStringEnum { - /** - * Creates the adapter deployment. - */ - public static final AdapterDeploymentOperationType CREATE = fromString("Create"); - - /** - * Re-targets the adapter deployment. - */ - public static final AdapterDeploymentOperationType UPDATE = fromString("Update"); - - /** - * Deletes the adapter deployment. - */ - public static final AdapterDeploymentOperationType DELETE = fromString("Delete"); - - /** - * Creates a new instance of AdapterDeploymentOperationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AdapterDeploymentOperationType() { - } - - /** - * Creates or finds a AdapterDeploymentOperationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AdapterDeploymentOperationType. - */ - public static AdapterDeploymentOperationType fromString(String name) { - return fromString(name, AdapterDeploymentOperationType.class); - } - - /** - * Gets known AdapterDeploymentOperationType values. - * - * @return known AdapterDeploymentOperationType values. - */ - public static Collection values() { - return values(AdapterDeploymentOperationType.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentProperties.java deleted file mode 100644 index 2eab3de9126f..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentProperties.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of an adapter deployment. - */ -@Fluent -public final class AdapterDeploymentProperties implements JsonSerializable { - /* - * The immutable Project Models version produced by Foundry fine-tuning. - * The identifier uses the Azure AI project model URI format. - * Model and version segments use ASCII letters, digits, periods, underscores, and hyphens. - * The service validates LoRA weight type, protected status, provenance, - * compatibility metadata, and registration state. - */ - private String sourceModelId; - - /* - * The name of the compatible managed compute parent deployment. - * The service resolves this name within the adapter's owning account; full - * Azure Resource Manager resource IDs and cross-account references are not accepted. It cannot - * equal the adapter deployment's resource name. Updating this value - * re-targets the adapter while its source model remains unchanged. - */ - private String targetDeploymentName; - - /* - * The managed compute deployment currently serving the adapter. - * During re-targeting this remains the prior deployment until atomic cutover. - */ - private String activeTargetDeploymentName; - - /* - * The provisioning state of the adapter deployment. - */ - private ProvisioningState provisioningState; - - /* - * Information about the most recently requested lifecycle operation. - */ - private AdapterDeploymentLastOperation lastOperation; - - /** - * Creates an instance of AdapterDeploymentProperties class. - */ - public AdapterDeploymentProperties() { - } - - /** - * Get the sourceModelId property: The immutable Project Models version produced by Foundry fine-tuning. - * The identifier uses the Azure AI project model URI format. - * Model and version segments use ASCII letters, digits, periods, underscores, and hyphens. - * The service validates LoRA weight type, protected status, provenance, - * compatibility metadata, and registration state. - * - * @return the sourceModelId value. - */ - public String sourceModelId() { - return this.sourceModelId; - } - - /** - * Set the sourceModelId property: The immutable Project Models version produced by Foundry fine-tuning. - * The identifier uses the Azure AI project model URI format. - * Model and version segments use ASCII letters, digits, periods, underscores, and hyphens. - * The service validates LoRA weight type, protected status, provenance, - * compatibility metadata, and registration state. - * - * @param sourceModelId the sourceModelId value to set. - * @return the AdapterDeploymentProperties object itself. - */ - public AdapterDeploymentProperties withSourceModelId(String sourceModelId) { - this.sourceModelId = sourceModelId; - return this; - } - - /** - * Get the targetDeploymentName property: The name of the compatible managed compute parent deployment. - * The service resolves this name within the adapter's owning account; full - * Azure Resource Manager resource IDs and cross-account references are not accepted. It cannot - * equal the adapter deployment's resource name. Updating this value - * re-targets the adapter while its source model remains unchanged. - * - * @return the targetDeploymentName value. - */ - public String targetDeploymentName() { - return this.targetDeploymentName; - } - - /** - * Set the targetDeploymentName property: The name of the compatible managed compute parent deployment. - * The service resolves this name within the adapter's owning account; full - * Azure Resource Manager resource IDs and cross-account references are not accepted. It cannot - * equal the adapter deployment's resource name. Updating this value - * re-targets the adapter while its source model remains unchanged. - * - * @param targetDeploymentName the targetDeploymentName value to set. - * @return the AdapterDeploymentProperties object itself. - */ - public AdapterDeploymentProperties withTargetDeploymentName(String targetDeploymentName) { - this.targetDeploymentName = targetDeploymentName; - return this; - } - - /** - * Get the activeTargetDeploymentName property: The managed compute deployment currently serving the adapter. - * During re-targeting this remains the prior deployment until atomic cutover. - * - * @return the activeTargetDeploymentName value. - */ - public String activeTargetDeploymentName() { - return this.activeTargetDeploymentName; - } - - /** - * Get the provisioningState property: The provisioning state of the adapter deployment. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the lastOperation property: Information about the most recently requested lifecycle operation. - * - * @return the lastOperation value. - */ - public AdapterDeploymentLastOperation lastOperation() { - return this.lastOperation; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceModelId", this.sourceModelId); - jsonWriter.writeStringField("targetDeploymentName", this.targetDeploymentName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdapterDeploymentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdapterDeploymentProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AdapterDeploymentProperties. - */ - public static AdapterDeploymentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdapterDeploymentProperties deserializedAdapterDeploymentProperties = new AdapterDeploymentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceModelId".equals(fieldName)) { - deserializedAdapterDeploymentProperties.sourceModelId = reader.getString(); - } else if ("targetDeploymentName".equals(fieldName)) { - deserializedAdapterDeploymentProperties.targetDeploymentName = reader.getString(); - } else if ("activeTargetDeploymentName".equals(fieldName)) { - deserializedAdapterDeploymentProperties.activeTargetDeploymentName = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedAdapterDeploymentProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("lastOperation".equals(fieldName)) { - deserializedAdapterDeploymentProperties.lastOperation - = AdapterDeploymentLastOperation.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAdapterDeploymentProperties; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployments.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployments.java deleted file mode 100644 index 67d28d869bf1..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployments.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of AdapterDeployments. - */ -public interface AdapterDeployments { - /** - * Gets an adapter deployment by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name. - */ - Response getWithResponse(String resourceGroupName, String accountName, - String adapterDeploymentName, Context context); - - /** - * Gets an adapter deployment by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name. - */ - AdapterDeployment get(String resourceGroupName, String accountName, String adapterDeploymentName); - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists adapter deployments associated with the Cognitive Services account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated collection of adapter deployments as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String adapterDeploymentName); - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param adapterDeploymentName The account-unique adapter deployment name and inference identity. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String adapterDeploymentName, String ifMatch, - Context context); - - /** - * Gets an adapter deployment by name. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name. - */ - AdapterDeployment getById(String id); - - /** - * Gets an adapter deployment by name. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an adapter deployment by name. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Drains requests and deletes an adapter deployment and its serving snapshot. - * - * @param id the resource ID. - * @param ifMatch Proceed only when the current adapter deployment ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, String ifMatch, Context context); - - /** - * Begins definition for a new AdapterDeployment resource. - * - * @param name resource name. - * @return the first stage of the new AdapterDeployment definition. - */ - AdapterDeployment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetHeaders.java deleted file mode 100644 index 04c89a29dc6d..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The AdapterDeploymentsGetHeaders model. - */ -@Immutable -public final class AdapterDeploymentsGetHeaders { - /* - * The ETag property. - */ - private final String etag; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of AdapterDeploymentsGetHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public AdapterDeploymentsGetHeaders(HttpHeaders rawHeaders) { - this.etag = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etag property: The ETag property. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetResponse.java deleted file mode 100644 index a6ef003d89c8..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner; - -/** - * Contains all response data for the get operation. - */ -public final class AdapterDeploymentsGetResponse - extends ResponseBase { - /** - * Creates an instance of AdapterDeploymentsGetResponse. - * - * @param request the request which resulted in this AdapterDeploymentsGetResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public AdapterDeploymentsGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - AdapterDeploymentInner value, AdapterDeploymentsGetHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public AdapterDeploymentInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Compute.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Compute.java index be81ea46179f..fec37b303a02 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Compute.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Compute.java @@ -7,6 +7,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.cognitiveservices.fluent.models.ComputeInner; +import java.util.Map; /** * An immutable client-side representation of Compute. @@ -48,6 +49,13 @@ public interface Compute { */ String etag(); + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + /** * Gets the kind property: The kind (type) of compute resource. * @@ -133,7 +141,8 @@ interface WithProperties { * The stage of the Compute definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithKind, DefinitionStages.WithIdentity { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithKind, DefinitionStages.WithIdentity { /** * Executes the create request. * @@ -150,6 +159,19 @@ interface WithCreate extends DefinitionStages.WithKind, DefinitionStages.WithIde Compute create(Context context); } + /** + * The stage of the Compute definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** * The stage of the Compute definition allowing to specify kind. */ @@ -187,7 +209,8 @@ interface WithIdentity { /** * The template for Compute update. */ - interface Update extends UpdateStages.WithProperties, UpdateStages.WithKind, UpdateStages.WithIdentity { + interface Update + extends UpdateStages.WithTags, UpdateStages.WithProperties, UpdateStages.WithKind, UpdateStages.WithIdentity { /** * Executes the update request. * @@ -208,6 +231,19 @@ interface Update extends UpdateStages.WithProperties, UpdateStages.WithKind, Upd * The Compute update stages. */ interface UpdateStages { + /** + * The stage of the Compute update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** * The stage of the Compute update allowing to specify properties. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionCategory.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionCategory.java index 2de7f4633f36..c1ec3524a1a4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionCategory.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionCategory.java @@ -386,11 +386,6 @@ public final class ConnectionCategory extends ExpandableStringEnum { - /* - * Gets or sets the full resource ID of the optional Application Insights connection. - */ - private String appInsightsConnectionId; - - /* - * The full resource ID of the Event Grid connection used for cost control alerts. This connection must be - * configured when an attached cost control contains an alert threshold action and cannot be removed while such an - * action remains attached. - */ - private String eventGridConnectionId; - - /** - * Creates an instance of CostControlConnections class. - */ - public CostControlConnections() { - } - - /** - * Get the appInsightsConnectionId property: Gets or sets the full resource ID of the optional Application Insights - * connection. - * - * @return the appInsightsConnectionId value. - */ - public String appInsightsConnectionId() { - return this.appInsightsConnectionId; - } - - /** - * Set the appInsightsConnectionId property: Gets or sets the full resource ID of the optional Application Insights - * connection. - * - * @param appInsightsConnectionId the appInsightsConnectionId value to set. - * @return the CostControlConnections object itself. - */ - public CostControlConnections withAppInsightsConnectionId(String appInsightsConnectionId) { - this.appInsightsConnectionId = appInsightsConnectionId; - return this; - } - - /** - * Get the eventGridConnectionId property: The full resource ID of the Event Grid connection used for cost control - * alerts. This connection must be configured when an attached cost control contains an alert threshold action and - * cannot be removed while such an action remains attached. - * - * @return the eventGridConnectionId value. - */ - public String eventGridConnectionId() { - return this.eventGridConnectionId; - } - - /** - * Set the eventGridConnectionId property: The full resource ID of the Event Grid connection used for cost control - * alerts. This connection must be configured when an attached cost control contains an alert threshold action and - * cannot be removed while such an action remains attached. - * - * @param eventGridConnectionId the eventGridConnectionId value to set. - * @return the CostControlConnections object itself. - */ - public CostControlConnections withEventGridConnectionId(String eventGridConnectionId) { - this.eventGridConnectionId = eventGridConnectionId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("appInsightsConnectionId", this.appInsightsConnectionId); - jsonWriter.writeStringField("eventGridConnectionId", this.eventGridConnectionId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlConnections from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlConnections if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CostControlConnections. - */ - public static CostControlConnections fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlConnections deserializedCostControlConnections = new CostControlConnections(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("appInsightsConnectionId".equals(fieldName)) { - deserializedCostControlConnections.appInsightsConnectionId = reader.getString(); - } else if ("eventGridConnectionId".equals(fieldName)) { - deserializedCostControlConnections.eventGridConnectionId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlConnections; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimension.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimension.java deleted file mode 100644 index b7fab5f6e372..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimension.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A request dimension used to partition cost control consumption. - */ -@Fluent -public final class CostControlDimension implements JsonSerializable { - /* - * The kind of request dimension. - */ - private CostControlDimensionType type; - - /* - * Gets or sets the attribute path retained for legacy Custom counters. - * Authored rules cannot select Custom; built-in dimensions must omit this property. - */ - private String attribute; - - /** - * Creates an instance of CostControlDimension class. - */ - public CostControlDimension() { - } - - /** - * Get the type property: The kind of request dimension. - * - * @return the type value. - */ - public CostControlDimensionType type() { - return this.type; - } - - /** - * Set the type property: The kind of request dimension. - * - * @param type the type value to set. - * @return the CostControlDimension object itself. - */ - public CostControlDimension withType(CostControlDimensionType type) { - this.type = type; - return this; - } - - /** - * Get the attribute property: Gets or sets the attribute path retained for legacy Custom counters. - * Authored rules cannot select Custom; built-in dimensions must omit this property. - * - * @return the attribute value. - */ - public String attribute() { - return this.attribute; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlDimension from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlDimension if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CostControlDimension. - */ - public static CostControlDimension fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlDimension deserializedCostControlDimension = new CostControlDimension(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedCostControlDimension.type = CostControlDimensionType.fromString(reader.getString()); - } else if ("attribute".equals(fieldName)) { - deserializedCostControlDimension.attribute = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlDimension; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimensionType.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimensionType.java deleted file mode 100644 index bb6e8ae2013a..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimensionType.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Cost control counter dimensions, including Custom retained for legacy read compatibility. - */ -public final class CostControlDimensionType extends ExpandableStringEnum { - /** - * Consumption is partitioned by the stable Foundry agent ID. - */ - public static final CostControlDimensionType AGENT = fromString("Agent"); - - /** - * Consumption is partitioned by the authenticated principal object ID. - */ - public static final CostControlDimensionType IDENTITY = fromString("Identity"); - - /** - * Consumption is partitioned by the Foundry session ID. - */ - public static final CostControlDimensionType SESSION = fromString("Session"); - - /** - * Consumption is partitioned by the Foundry project resource ID. - */ - public static final CostControlDimensionType PROJECT = fromString("Project"); - - /** - * Consumption is partitioned by the owning Cognitive Services account. - */ - public static final CostControlDimensionType ACCOUNT = fromString("Account"); - - /** - * Legacy read-only dimension using `CostControlDimension.Attribute`. - * New Custom counter authoring is reserved for future support. - */ - public static final CostControlDimensionType CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of CostControlDimensionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CostControlDimensionType() { - } - - /** - * Creates or finds a CostControlDimensionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CostControlDimensionType. - */ - public static CostControlDimensionType fromString(String name) { - return fromString(name, CostControlDimensionType.class); - } - - /** - * Gets known CostControlDimensionType values. - * - * @return known CostControlDimensionType values. - */ - public static Collection values() { - return values(CostControlDimensionType.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlMatch.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlMatch.java deleted file mode 100644 index 6b88c928cbb9..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlMatch.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Gets or sets optional match arrays keyed by `agentResourceIds`, `identityObjectIds`, - * `sessionIds`, or `projectIds`. Each array contains 1 to 20 non-empty values. - * Agent resource IDs use - * /subscriptions/{subscription_guid}/accounts/{account-name}/project/{project-name}/agent/{agent_name}. - * Legacy dotted identity, session, and project keys remain accepted, but cannot be combined with their canonical key. - */ -@Fluent -public final class CostControlMatch implements JsonSerializable { - /* - * Agent resource IDs use - * /subscriptions/{subscription_guid}/accounts/{account-name}/project/{project-name}/agent/{agent_name}. - */ - private List agentResourceIds; - - /* - * The authenticated principal object IDs to match. - */ - private List identityObjectIds; - - /* - * The Foundry session IDs to match. - */ - private List sessionIds; - - /* - * The Foundry project resource IDs to match. - */ - private List projectIds; - - /** - * Creates an instance of CostControlMatch class. - */ - public CostControlMatch() { - } - - /** - * Get the agentResourceIds property: Agent resource IDs use - * /subscriptions/{subscription_guid}/accounts/{account-name}/project/{project-name}/agent/{agent_name}. - * - * @return the agentResourceIds value. - */ - public List agentResourceIds() { - return this.agentResourceIds; - } - - /** - * Set the agentResourceIds property: Agent resource IDs use - * /subscriptions/{subscription_guid}/accounts/{account-name}/project/{project-name}/agent/{agent_name}. - * - * @param agentResourceIds the agentResourceIds value to set. - * @return the CostControlMatch object itself. - */ - public CostControlMatch withAgentResourceIds(List agentResourceIds) { - this.agentResourceIds = agentResourceIds; - return this; - } - - /** - * Get the identityObjectIds property: The authenticated principal object IDs to match. - * - * @return the identityObjectIds value. - */ - public List identityObjectIds() { - return this.identityObjectIds; - } - - /** - * Set the identityObjectIds property: The authenticated principal object IDs to match. - * - * @param identityObjectIds the identityObjectIds value to set. - * @return the CostControlMatch object itself. - */ - public CostControlMatch withIdentityObjectIds(List identityObjectIds) { - this.identityObjectIds = identityObjectIds; - return this; - } - - /** - * Get the sessionIds property: The Foundry session IDs to match. - * - * @return the sessionIds value. - */ - public List sessionIds() { - return this.sessionIds; - } - - /** - * Set the sessionIds property: The Foundry session IDs to match. - * - * @param sessionIds the sessionIds value to set. - * @return the CostControlMatch object itself. - */ - public CostControlMatch withSessionIds(List sessionIds) { - this.sessionIds = sessionIds; - return this; - } - - /** - * Get the projectIds property: The Foundry project resource IDs to match. - * - * @return the projectIds value. - */ - public List projectIds() { - return this.projectIds; - } - - /** - * Set the projectIds property: The Foundry project resource IDs to match. - * - * @param projectIds the projectIds value to set. - * @return the CostControlMatch object itself. - */ - public CostControlMatch withProjectIds(List projectIds) { - this.projectIds = projectIds; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("agentResourceIds", this.agentResourceIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("identityObjectIds", this.identityObjectIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sessionIds", this.sessionIds, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("projectIds", this.projectIds, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlMatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlMatch if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CostControlMatch. - */ - public static CostControlMatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlMatch deserializedCostControlMatch = new CostControlMatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("agentResourceIds".equals(fieldName)) { - List agentResourceIds = reader.readArray(reader1 -> reader1.getString()); - deserializedCostControlMatch.agentResourceIds = agentResourceIds; - } else if ("identityObjectIds".equals(fieldName)) { - List identityObjectIds = reader.readArray(reader1 -> reader1.getString()); - deserializedCostControlMatch.identityObjectIds = identityObjectIds; - } else if ("sessionIds".equals(fieldName)) { - List sessionIds = reader.readArray(reader1 -> reader1.getString()); - deserializedCostControlMatch.sessionIds = sessionIds; - } else if ("projectIds".equals(fieldName)) { - List projectIds = reader.readArray(reader1 -> reader1.getString()); - deserializedCostControlMatch.projectIds = projectIds; - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlMatch; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatch.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatch.java deleted file mode 100644 index 68a68bc60eb4..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatch.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The request used to update a cost control. - */ -@Fluent -public final class CostControlPatch implements JsonSerializable { - /* - * The cost control properties to update. - */ - private CostControlPatchProperties properties; - - /** - * Creates an instance of CostControlPatch class. - */ - public CostControlPatch() { - } - - /** - * Get the properties property: The cost control properties to update. - * - * @return the properties value. - */ - public CostControlPatchProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The cost control properties to update. - * - * @param properties the properties value to set. - * @return the CostControlPatch object itself. - */ - public CostControlPatch withProperties(CostControlPatchProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlPatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlPatch if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CostControlPatch. - */ - public static CostControlPatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlPatch deserializedCostControlPatch = new CostControlPatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedCostControlPatch.properties = CostControlPatchProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlPatch; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatchProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatchProperties.java deleted file mode 100644 index 1bfd278cbff2..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatchProperties.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The properties that can be changed on a cost control. - */ -@Fluent -public final class CostControlPatchProperties implements JsonSerializable { - /* - * An optional human-readable name for the cost control. Set this property to null to clear it. - */ - private String displayName; - - /* - * The complete replacement set of cost control rules. - */ - private List rules; - - /** - * Creates an instance of CostControlPatchProperties class. - */ - public CostControlPatchProperties() { - } - - /** - * Get the displayName property: An optional human-readable name for the cost control. Set this property to null to - * clear it. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: An optional human-readable name for the cost control. Set this property to null to - * clear it. - * - * @param displayName the displayName value to set. - * @return the CostControlPatchProperties object itself. - */ - public CostControlPatchProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the rules property: The complete replacement set of cost control rules. - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules property: The complete replacement set of cost control rules. - * - * @param rules the rules value to set. - * @return the CostControlPatchProperties object itself. - */ - public CostControlPatchProperties withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlPatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlPatchProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CostControlPatchProperties. - */ - public static CostControlPatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlPatchProperties deserializedCostControlPatchProperties = new CostControlPatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("displayName".equals(fieldName)) { - deserializedCostControlPatchProperties.displayName = reader.getString(); - } else if ("rules".equals(fieldName)) { - List rules = reader.readArray(reader1 -> CostControlRule.fromJson(reader1)); - deserializedCostControlPatchProperties.rules = rules; - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlPatchProperties; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPeriod.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPeriod.java deleted file mode 100644 index 8d3cfb9e9358..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPeriod.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Calendar-aligned UTC renewal periods, including legacy values retained for read compatibility. - */ -public final class CostControlPeriod extends ExpandableStringEnum { - /** - * Legacy read-only period renewing at the start of the next UTC minute. - */ - public static final CostControlPeriod MINUTE = fromString("Minute"); - - /** - * Legacy read-only period renewing at the start of the next UTC hour. - */ - public static final CostControlPeriod HOUR = fromString("Hour"); - - /** - * Renews daily at 00:00 UTC. - */ - public static final CostControlPeriod DAY = fromString("Day"); - - /** - * Renews Monday at 00:00 UTC. - */ - public static final CostControlPeriod WEEK = fromString("Week"); - - /** - * Renews on the first day of each month at 00:00 UTC. - */ - public static final CostControlPeriod MONTH = fromString("Month"); - - /** - * Legacy read-only period renewing January 1 at 00:00 UTC. - */ - public static final CostControlPeriod YEAR = fromString("Year"); - - /** - * Creates a new instance of CostControlPeriod value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CostControlPeriod() { - } - - /** - * Creates or finds a CostControlPeriod from its string representation. - * - * @param name a name to look for. - * @return the corresponding CostControlPeriod. - */ - public static CostControlPeriod fromString(String name) { - return fromString(name, CostControlPeriod.class); - } - - /** - * Gets known CostControlPeriod values. - * - * @return known CostControlPeriod values. - */ - public static Collection values() { - return values(CostControlPeriod.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlProperties.java deleted file mode 100644 index 0713f9905b82..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlProperties.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The customer-authored settings of a cost control. - */ -@Fluent -public final class CostControlProperties implements JsonSerializable { - /* - * An optional human-readable name for the cost control. - */ - private String displayName; - - /* - * The rules enforced by the cost control. - */ - private List rules; - - /** - * Creates an instance of CostControlProperties class. - */ - public CostControlProperties() { - } - - /** - * Get the displayName property: An optional human-readable name for the cost control. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: An optional human-readable name for the cost control. - * - * @param displayName the displayName value to set. - * @return the CostControlProperties object itself. - */ - public CostControlProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the rules property: The rules enforced by the cost control. - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules property: The rules enforced by the cost control. - * - * @param rules the rules value to set. - * @return the CostControlProperties object itself. - */ - public CostControlProperties withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("displayName", this.displayName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CostControlProperties. - */ - public static CostControlProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlProperties deserializedCostControlProperties = new CostControlProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rules".equals(fieldName)) { - List rules = reader.readArray(reader1 -> CostControlRule.fromJson(reader1)); - deserializedCostControlProperties.rules = rules; - } else if ("displayName".equals(fieldName)) { - deserializedCostControlProperties.displayName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlProperties; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlRule.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlRule.java deleted file mode 100644 index 412e64e880d3..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlRule.java +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A cost limit and the population to which it applies. - */ -@Fluent -public final class CostControlRule implements JsonSerializable { - /* - * The stable rule identifier, unique within the cost control without regard to case. - */ - private String name; - - /* - * Gets or sets the single built-in dimension used to partition consumption. - * Custom dimensions are retained only for legacy reads and metadata-only updates. - * Legacy singleton arrays are accepted on read; serialization always emits an object. - * To track another field, create another rule. - */ - private CostControlDimension counterKey; - - /* - * The unit used for the cost control amount and absolute thresholds. - */ - private CostControlUnit unit; - - /* - * The maximum consumption allowed by this rule, expressed in the selected unit. - */ - private double amount; - - /* - * Gets or sets the calendar-aligned UTC renewal period. Authored rules support Day, Week, or Month. - * This field is required for recurring rules and must be omitted for non-recurring rules. - * Legacy stored minute, hour, and year periods are preserved when reading definitions. - */ - private CostControlPeriod period; - - /* - * Whether the cost control renews. The default is true. - */ - private Boolean recurring; - - /* - * Gets or sets optional match arrays keyed by `agentResourceIds`, `identityObjectIds`, - * `sessionIds`, or `projectIds`. Each array contains 1 to 20 non-empty values. - * Agent resource IDs use - * /subscriptions/{subscription_guid}/accounts/{account-name}/project/{project-name}/agent/{agent_name}. - * Legacy dotted identity, session, and project keys remain accepted, but cannot be combined with their canonical - * key. - */ - private CostControlMatch match; - - /* - * Gets or sets optional thresholds. Omitted or empty thresholds track usage without explicit actions. - * Authored thresholds must explicitly specify Alert or Block; Audit is retained for legacy reads. - */ - private List thresholds; - - /** - * Creates an instance of CostControlRule class. - */ - public CostControlRule() { - } - - /** - * Get the name property: The stable rule identifier, unique within the cost control without regard to case. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The stable rule identifier, unique within the cost control without regard to case. - * - * @param name the name value to set. - * @return the CostControlRule object itself. - */ - public CostControlRule withName(String name) { - this.name = name; - return this; - } - - /** - * Get the counterKey property: Gets or sets the single built-in dimension used to partition consumption. - * Custom dimensions are retained only for legacy reads and metadata-only updates. - * Legacy singleton arrays are accepted on read; serialization always emits an object. - * To track another field, create another rule. - * - * @return the counterKey value. - */ - public CostControlDimension counterKey() { - return this.counterKey; - } - - /** - * Set the counterKey property: Gets or sets the single built-in dimension used to partition consumption. - * Custom dimensions are retained only for legacy reads and metadata-only updates. - * Legacy singleton arrays are accepted on read; serialization always emits an object. - * To track another field, create another rule. - * - * @param counterKey the counterKey value to set. - * @return the CostControlRule object itself. - */ - public CostControlRule withCounterKey(CostControlDimension counterKey) { - this.counterKey = counterKey; - return this; - } - - /** - * Get the unit property: The unit used for the cost control amount and absolute thresholds. - * - * @return the unit value. - */ - public CostControlUnit unit() { - return this.unit; - } - - /** - * Set the unit property: The unit used for the cost control amount and absolute thresholds. - * - * @param unit the unit value to set. - * @return the CostControlRule object itself. - */ - public CostControlRule withUnit(CostControlUnit unit) { - this.unit = unit; - return this; - } - - /** - * Get the amount property: The maximum consumption allowed by this rule, expressed in the selected unit. - * - * @return the amount value. - */ - public double amount() { - return this.amount; - } - - /** - * Set the amount property: The maximum consumption allowed by this rule, expressed in the selected unit. - * - * @param amount the amount value to set. - * @return the CostControlRule object itself. - */ - public CostControlRule withAmount(double amount) { - this.amount = amount; - return this; - } - - /** - * Get the period property: Gets or sets the calendar-aligned UTC renewal period. Authored rules support Day, Week, - * or Month. - * This field is required for recurring rules and must be omitted for non-recurring rules. - * Legacy stored minute, hour, and year periods are preserved when reading definitions. - * - * @return the period value. - */ - public CostControlPeriod period() { - return this.period; - } - - /** - * Set the period property: Gets or sets the calendar-aligned UTC renewal period. Authored rules support Day, Week, - * or Month. - * This field is required for recurring rules and must be omitted for non-recurring rules. - * Legacy stored minute, hour, and year periods are preserved when reading definitions. - * - * @param period the period value to set. - * @return the CostControlRule object itself. - */ - public CostControlRule withPeriod(CostControlPeriod period) { - this.period = period; - return this; - } - - /** - * Get the recurring property: Whether the cost control renews. The default is true. - * - * @return the recurring value. - */ - public Boolean recurring() { - return this.recurring; - } - - /** - * Set the recurring property: Whether the cost control renews. The default is true. - * - * @param recurring the recurring value to set. - * @return the CostControlRule object itself. - */ - public CostControlRule withRecurring(Boolean recurring) { - this.recurring = recurring; - return this; - } - - /** - * Get the match property: Gets or sets optional match arrays keyed by `agentResourceIds`, `identityObjectIds`, - * `sessionIds`, or `projectIds`. Each array contains 1 to 20 non-empty values. - * Agent resource IDs use - * /subscriptions/{subscription_guid}/accounts/{account-name}/project/{project-name}/agent/{agent_name}. - * Legacy dotted identity, session, and project keys remain accepted, but cannot be combined with their canonical - * key. - * - * @return the match value. - */ - public CostControlMatch match() { - return this.match; - } - - /** - * Set the match property: Gets or sets optional match arrays keyed by `agentResourceIds`, `identityObjectIds`, - * `sessionIds`, or `projectIds`. Each array contains 1 to 20 non-empty values. - * Agent resource IDs use - * /subscriptions/{subscription_guid}/accounts/{account-name}/project/{project-name}/agent/{agent_name}. - * Legacy dotted identity, session, and project keys remain accepted, but cannot be combined with their canonical - * key. - * - * @param match the match value to set. - * @return the CostControlRule object itself. - */ - public CostControlRule withMatch(CostControlMatch match) { - this.match = match; - return this; - } - - /** - * Get the thresholds property: Gets or sets optional thresholds. Omitted or empty thresholds track usage without - * explicit actions. - * Authored thresholds must explicitly specify Alert or Block; Audit is retained for legacy reads. - * - * @return the thresholds value. - */ - public List thresholds() { - return this.thresholds; - } - - /** - * Set the thresholds property: Gets or sets optional thresholds. Omitted or empty thresholds track usage without - * explicit actions. - * Authored thresholds must explicitly specify Alert or Block; Audit is retained for legacy reads. - * - * @param thresholds the thresholds value to set. - * @return the CostControlRule object itself. - */ - public CostControlRule withThresholds(List thresholds) { - this.thresholds = thresholds; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("counterKey", this.counterKey); - jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString()); - jsonWriter.writeDoubleField("amount", this.amount); - jsonWriter.writeStringField("period", this.period == null ? null : this.period.toString()); - jsonWriter.writeBooleanField("recurring", this.recurring); - jsonWriter.writeJsonField("match", this.match); - jsonWriter.writeArrayField("thresholds", this.thresholds, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlRule if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CostControlRule. - */ - public static CostControlRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlRule deserializedCostControlRule = new CostControlRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedCostControlRule.name = reader.getString(); - } else if ("counterKey".equals(fieldName)) { - deserializedCostControlRule.counterKey = CostControlDimension.fromJson(reader); - } else if ("unit".equals(fieldName)) { - deserializedCostControlRule.unit = CostControlUnit.fromString(reader.getString()); - } else if ("amount".equals(fieldName)) { - deserializedCostControlRule.amount = reader.getDouble(); - } else if ("period".equals(fieldName)) { - deserializedCostControlRule.period = CostControlPeriod.fromString(reader.getString()); - } else if ("recurring".equals(fieldName)) { - deserializedCostControlRule.recurring = reader.getNullable(JsonReader::getBoolean); - } else if ("match".equals(fieldName)) { - deserializedCostControlRule.match = CostControlMatch.fromJson(reader); - } else if ("thresholds".equals(fieldName)) { - List thresholds - = reader.readArray(reader1 -> CostControlThreshold.fromJson(reader1)); - deserializedCostControlRule.thresholds = thresholds; - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlRule; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThreshold.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThreshold.java deleted file mode 100644 index 5119fe12d69e..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThreshold.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * An action evaluated when cost control consumption reaches a threshold. - */ -@Fluent -public final class CostControlThreshold implements JsonSerializable { - /* - * How the threshold value is interpreted. - */ - private CostControlThresholdType type; - - /* - * Gets or sets the threshold value. Legacy Audit definitions retain their stored values; - * new thresholds support only Alert or Block. - */ - private double value; - - /* - * Gets or sets the threshold action. Authored thresholds must explicitly specify Alert or Block. - * Legacy stored definitions with omitted actions continue to read as Audit. - */ - private CostControlThresholdAction action; - - /** - * Creates an instance of CostControlThreshold class. - */ - public CostControlThreshold() { - } - - /** - * Get the type property: How the threshold value is interpreted. - * - * @return the type value. - */ - public CostControlThresholdType type() { - return this.type; - } - - /** - * Set the type property: How the threshold value is interpreted. - * - * @param type the type value to set. - * @return the CostControlThreshold object itself. - */ - public CostControlThreshold withType(CostControlThresholdType type) { - this.type = type; - return this; - } - - /** - * Get the value property: Gets or sets the threshold value. Legacy Audit definitions retain their stored values; - * new thresholds support only Alert or Block. - * - * @return the value value. - */ - public double value() { - return this.value; - } - - /** - * Set the value property: Gets or sets the threshold value. Legacy Audit definitions retain their stored values; - * new thresholds support only Alert or Block. - * - * @param value the value value to set. - * @return the CostControlThreshold object itself. - */ - public CostControlThreshold withValue(double value) { - this.value = value; - return this; - } - - /** - * Get the action property: Gets or sets the threshold action. Authored thresholds must explicitly specify Alert or - * Block. - * Legacy stored definitions with omitted actions continue to read as Audit. - * - * @return the action value. - */ - public CostControlThresholdAction action() { - return this.action; - } - - /** - * Set the action property: Gets or sets the threshold action. Authored thresholds must explicitly specify Alert or - * Block. - * Legacy stored definitions with omitted actions continue to read as Audit. - * - * @param action the action value to set. - * @return the CostControlThreshold object itself. - */ - public CostControlThreshold withAction(CostControlThresholdAction action) { - this.action = action; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeDoubleField("value", this.value); - jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CostControlThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CostControlThreshold if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CostControlThreshold. - */ - public static CostControlThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CostControlThreshold deserializedCostControlThreshold = new CostControlThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedCostControlThreshold.type = CostControlThresholdType.fromString(reader.getString()); - } else if ("value".equals(fieldName)) { - deserializedCostControlThreshold.value = reader.getDouble(); - } else if ("action".equals(fieldName)) { - deserializedCostControlThreshold.action = CostControlThresholdAction.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCostControlThreshold; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdAction.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdAction.java deleted file mode 100644 index 8f8f17341bc2..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdAction.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The supported actions when a threshold is reached. - */ -public final class CostControlThresholdAction extends ExpandableStringEnum { - /** - * Legacy read-only action retained to deserialize existing definitions without changing their semantics. - */ - public static final CostControlThresholdAction AUDIT = fromString("Audit"); - - /** - * Emits a customer-facing alert without blocking requests. - */ - public static final CostControlThresholdAction ALERT = fromString("Alert"); - - /** - * Blocks the request without emitting a customer-facing alert. - */ - public static final CostControlThresholdAction BLOCK = fromString("Block"); - - /** - * Creates a new instance of CostControlThresholdAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CostControlThresholdAction() { - } - - /** - * Creates or finds a CostControlThresholdAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding CostControlThresholdAction. - */ - public static CostControlThresholdAction fromString(String name) { - return fromString(name, CostControlThresholdAction.class); - } - - /** - * Gets known CostControlThresholdAction values. - * - * @return known CostControlThresholdAction values. - */ - public static Collection values() { - return values(CostControlThresholdAction.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdType.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdType.java deleted file mode 100644 index 572fd6f65f5b..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The supported threshold value interpretations. - */ -public final class CostControlThresholdType extends ExpandableStringEnum { - /** - * The value is a percentage of the configured rule amount. - */ - public static final CostControlThresholdType PERCENTAGE = fromString("Percentage"); - - /** - * The value is expressed in the rule's unit. - */ - public static final CostControlThresholdType ABSOLUTE = fromString("Absolute"); - - /** - * Creates a new instance of CostControlThresholdType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CostControlThresholdType() { - } - - /** - * Creates or finds a CostControlThresholdType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CostControlThresholdType. - */ - public static CostControlThresholdType fromString(String name) { - return fromString(name, CostControlThresholdType.class); - } - - /** - * Gets known CostControlThresholdType values. - * - * @return known CostControlThresholdType values. - */ - public static Collection values() { - return values(CostControlThresholdType.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlUnit.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlUnit.java deleted file mode 100644 index 7f9c0dadb9e9..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlUnit.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The supported unit for cost control amounts and thresholds. - */ -public final class CostControlUnit extends ExpandableStringEnum { - /** - * Estimated cost in United States dollars. - */ - public static final CostControlUnit USD = fromString("Usd"); - - /** - * Creates a new instance of CostControlUnit value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CostControlUnit() { - } - - /** - * Creates or finds a CostControlUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding CostControlUnit. - */ - public static CostControlUnit fromString(String name) { - return fromString(name, CostControlUnit.class); - } - - /** - * Gets known CostControlUnit values. - * - * @return known CostControlUnit values. - */ - public static Collection values() { - return values(CostControlUnit.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControls.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControls.java deleted file mode 100644 index 2bc9c4142f0c..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControls.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of CostControls. - */ -public interface CostControls { - /** - * Gets a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control. - */ - Response getWithResponse(String resourceGroupName, String accountName, String costControlName, - Context context); - - /** - * Gets a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control. - */ - CostControl get(String resourceGroupName, String accountName, String costControlName); - - /** - * Deletes a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String costControlName, - String ifMatch, Context context); - - /** - * Deletes a cost control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param costControlName The name of the CostControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String costControlName); - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists the cost controls owned by an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a page of cost controls as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, Context context); - - /** - * Gets a cost control. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control. - */ - CostControl getById(String id); - - /** - * Gets a cost control. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cost control. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a cost control. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a cost control. - * - * @param id the resource ID. - * @param ifMatch Proceeds only when the current entity tag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, String ifMatch, Context context); - - /** - * Begins definition for a new CostControl resource. - * - * @param name resource name. - * @return the first stage of the new CostControl definition. - */ - CostControl.DefinitionStages.Blank define(String name); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateHeaders.java deleted file mode 100644 index 095e426630be..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The CostControlsCreateOrUpdateHeaders model. - */ -@Immutable -public final class CostControlsCreateOrUpdateHeaders { - /* - * The ETag property. - */ - private final String etag; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of CostControlsCreateOrUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public CostControlsCreateOrUpdateHeaders(HttpHeaders rawHeaders) { - this.etag = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etag property: The ETag property. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateResponse.java deleted file mode 100644 index 5d5a7afb2626..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.CostControlInner; - -/** - * Contains all response data for the createOrUpdate operation. - */ -public final class CostControlsCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of CostControlsCreateOrUpdateResponse. - * - * @param request the request which resulted in this CostControlsCreateOrUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CostControlsCreateOrUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - CostControlInner value, CostControlsCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public CostControlInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetHeaders.java deleted file mode 100644 index 22e54a3cf453..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The CostControlsGetHeaders model. - */ -@Immutable -public final class CostControlsGetHeaders { - /* - * The ETag property. - */ - private final String etag; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of CostControlsGetHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public CostControlsGetHeaders(HttpHeaders rawHeaders) { - this.etag = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etag property: The ETag property. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetResponse.java deleted file mode 100644 index 1edf1f9e9967..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.CostControlInner; - -/** - * Contains all response data for the get operation. - */ -public final class CostControlsGetResponse extends ResponseBase { - /** - * Creates an instance of CostControlsGetResponse. - * - * @param request the request which resulted in this CostControlsGetResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CostControlsGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, CostControlInner value, - CostControlsGetHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public CostControlInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateHeaders.java deleted file mode 100644 index aae77ae9ab08..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The CostControlsUpdateHeaders model. - */ -@Immutable -public final class CostControlsUpdateHeaders { - /* - * The ETag property. - */ - private final String etag; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of CostControlsUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public CostControlsUpdateHeaders(HttpHeaders rawHeaders) { - this.etag = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etag property: The ETag property. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateResponse.java deleted file mode 100644 index 828a81d2dfc9..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.CostControlInner; - -/** - * Contains all response data for the update operation. - */ -public final class CostControlsUpdateResponse extends ResponseBase { - /** - * Creates an instance of CostControlsUpdateResponse. - * - * @param request the request which resulted in this CostControlsUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CostControlsUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - CostControlInner value, CostControlsUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public CostControlInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java index 3da0646a9aee..9699f4c1962d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java @@ -115,12 +115,6 @@ public final class DeploymentProperties implements JsonSerializable costControlIds; - /** * Creates an instance of DeploymentProperties class. */ @@ -456,28 +450,6 @@ public DeploymentProperties withRouting(DeploymentRouting routing) { return this; } - /** - * Get the costControlIds property: The full resource IDs of cost controls directly attached to this deployment. - * At the moment the service only supports a single cost control. This will be expanded in future API versions. - * - * @return the costControlIds value. - */ - public List costControlIds() { - return this.costControlIds; - } - - /** - * Set the costControlIds property: The full resource IDs of cost controls directly attached to this deployment. - * At the moment the service only supports a single cost control. This will be expanded in future API versions. - * - * @param costControlIds the costControlIds value to set. - * @return the DeploymentProperties object itself. - */ - public DeploymentProperties withCostControlIds(List costControlIds) { - this.costControlIds = costControlIds; - return this; - } - /** * {@inheritDoc} */ @@ -499,8 +471,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("deploymentState", this.deploymentState == null ? null : this.deploymentState.toString()); jsonWriter.writeJsonField("routing", this.routing); - jsonWriter.writeArrayField("costControlIds", this.costControlIds, - (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -561,9 +531,6 @@ public static DeploymentProperties fromJson(JsonReader jsonReader) throws IOExce deserializedDeploymentProperties.deploymentState = DeploymentState.fromString(reader.getString()); } else if ("routing".equals(fieldName)) { deserializedDeploymentProperties.routing = DeploymentRouting.fromJson(reader); - } else if ("costControlIds".equals(fieldName)) { - List costControlIds = reader.readArray(reader1 -> reader1.getString()); - deserializedDeploymentProperties.costControlIds = costControlIds; } else { reader.skipChildren(); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/GatedModelAccessProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/GatedModelAccessProperties.java deleted file mode 100644 index f94a264dbfc1..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/GatedModelAccessProperties.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Gated model access configuration for a managed compute deployment. - */ -@Fluent -public final class GatedModelAccessProperties implements JsonSerializable { - /* - * The fully qualified Azure resource ID of the project connection used to authorize access to a gated model during - * deployment creation. - */ - private String connectionId; - - /** - * Creates an instance of GatedModelAccessProperties class. - */ - public GatedModelAccessProperties() { - } - - /** - * Get the connectionId property: The fully qualified Azure resource ID of the project connection used to authorize - * access to a gated model during deployment creation. - * - * @return the connectionId value. - */ - public String connectionId() { - return this.connectionId; - } - - /** - * Set the connectionId property: The fully qualified Azure resource ID of the project connection used to authorize - * access to a gated model during deployment creation. - * - * @param connectionId the connectionId value to set. - * @return the GatedModelAccessProperties object itself. - */ - public GatedModelAccessProperties withConnectionId(String connectionId) { - this.connectionId = connectionId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("connectionId", this.connectionId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GatedModelAccessProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GatedModelAccessProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the GatedModelAccessProperties. - */ - public static GatedModelAccessProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GatedModelAccessProperties deserializedGatedModelAccessProperties = new GatedModelAccessProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connectionId".equals(fieldName)) { - deserializedGatedModelAccessProperties.connectionId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedGatedModelAccessProperties; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentProperties.java index ee92bd314830..cc49338f0fa1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentProperties.java @@ -42,11 +42,6 @@ public final class ManagedComputeDeploymentProperties implements JsonSerializabl */ private DeploymentModelVersionUpgradeOption versionUpgradeOption; - /* - * Configuration used to authorize access to a gated model during deployment creation. - */ - private GatedModelAccessProperties gatedModelAccess; - /* * Deployment capabilities represented as key-value pairs. * Example: { assetsV2: "true" }. @@ -188,28 +183,6 @@ public DeploymentModelVersionUpgradeOption versionUpgradeOption() { return this; } - /** - * Get the gatedModelAccess property: Configuration used to authorize access to a gated model during deployment - * creation. - * - * @return the gatedModelAccess value. - */ - public GatedModelAccessProperties gatedModelAccess() { - return this.gatedModelAccess; - } - - /** - * Set the gatedModelAccess property: Configuration used to authorize access to a gated model during deployment - * creation. - * - * @param gatedModelAccess the gatedModelAccess value to set. - * @return the ManagedComputeDeploymentProperties object itself. - */ - public ManagedComputeDeploymentProperties withGatedModelAccess(GatedModelAccessProperties gatedModelAccess) { - this.gatedModelAccess = gatedModelAccess; - return this; - } - /** * Get the capabilities property: Deployment capabilities represented as key-value pairs. * Example: { assetsV2: "true" }. @@ -324,7 +297,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("acceleratorType", this.acceleratorType); jsonWriter.writeStringField("versionUpgradeOption", this.versionUpgradeOption == null ? null : this.versionUpgradeOption.toString()); - jsonWriter.writeJsonField("gatedModelAccess", this.gatedModelAccess); jsonWriter.writeStringField("computeId", this.computeId); jsonWriter.writeStringField("priority", this.priority); return jsonWriter.writeEndObject(); @@ -356,9 +328,6 @@ public static ManagedComputeDeploymentProperties fromJson(JsonReader jsonReader) } else if ("versionUpgradeOption".equals(fieldName)) { deserializedManagedComputeDeploymentProperties.versionUpgradeOption = DeploymentModelVersionUpgradeOption.fromString(reader.getString()); - } else if ("gatedModelAccess".equals(fieldName)) { - deserializedManagedComputeDeploymentProperties.gatedModelAccess - = GatedModelAccessProperties.fromJson(reader); } else if ("capabilities".equals(fieldName)) { Map capabilities = reader.readMap(reader1 -> reader1.getString()); deserializedManagedComputeDeploymentProperties.capabilities = capabilities; diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsEmptyObject.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsEmptyObject.java deleted file mode 100644 index 91fbac18a7a3..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsEmptyObject.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * An object that must contain no properties. - */ -@Immutable -public final class RaiAcsEmptyObject implements JsonSerializable { - /** - * Creates an instance of RaiAcsEmptyObject class. - */ - public RaiAcsEmptyObject() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsEmptyObject from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsEmptyObject if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RaiAcsEmptyObject. - */ - public static RaiAcsEmptyObject fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsEmptyObject deserializedRaiAcsEmptyObject = new RaiAcsEmptyObject(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - reader.skipChildren(); - } - - return deserializedRaiAcsEmptyObject; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmCategory.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmCategory.java deleted file mode 100644 index 051e18096863..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmCategory.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Harm categories supported by the Unified Moderate text profile. - */ -public final class RaiAcsHarmCategory extends ExpandableStringEnum { - /** - * Hate-related content. - */ - public static final RaiAcsHarmCategory HATE = fromString("Hate"); - - /** - * Self-harm-related content. - */ - public static final RaiAcsHarmCategory SELF_HARM = fromString("SelfHarm"); - - /** - * Sexual content. - */ - public static final RaiAcsHarmCategory SEXUAL = fromString("Sexual"); - - /** - * Violent content. - */ - public static final RaiAcsHarmCategory VIOLENCE = fromString("Violence"); - - /** - * Prompt-injection content. - */ - public static final RaiAcsHarmCategory PROMPT_INJECTION = fromString("PromptInjection"); - - /** - * Protected text material. - */ - public static final RaiAcsHarmCategory PROTECTED_MATERIAL_TEXT = fromString("ProtectedMaterialText"); - - /** - * Protected source-code material. - */ - public static final RaiAcsHarmCategory PROTECTED_MATERIAL_CODE = fromString("ProtectedMaterialCode"); - - /** - * Creates a new instance of RaiAcsHarmCategory value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RaiAcsHarmCategory() { - } - - /** - * Creates or finds a RaiAcsHarmCategory from its string representation. - * - * @param name a name to look for. - * @return the corresponding RaiAcsHarmCategory. - */ - public static RaiAcsHarmCategory fromString(String name) { - return fromString(name, RaiAcsHarmCategory.class); - } - - /** - * Gets known RaiAcsHarmCategory values. - * - * @return known RaiAcsHarmCategory values. - */ - public static Collection values() { - return values(RaiAcsHarmCategory.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmConfiguration.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmConfiguration.java deleted file mode 100644 index 6d2b43682a76..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmConfiguration.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Selects one Azure AI Content Safety harm-detector configuration. - */ -@Fluent -public final class RaiAcsHarmConfiguration implements JsonSerializable { - /* - * The logical harm category exposed under input.snapshot.moderation.harm. - */ - private RaiAcsHarmCategory category; - - /* - * The Azure AI Content Safety detector configuration identifier. When supplied, it must be the - * configuration supported for the selected category. - */ - private String harmConfigId; - - /** - * Creates an instance of RaiAcsHarmConfiguration class. - */ - public RaiAcsHarmConfiguration() { - } - - /** - * Get the category property: The logical harm category exposed under input.snapshot.moderation.harm. - * - * @return the category value. - */ - public RaiAcsHarmCategory category() { - return this.category; - } - - /** - * Set the category property: The logical harm category exposed under input.snapshot.moderation.harm. - * - * @param category the category value to set. - * @return the RaiAcsHarmConfiguration object itself. - */ - public RaiAcsHarmConfiguration withCategory(RaiAcsHarmCategory category) { - this.category = category; - return this; - } - - /** - * Get the harmConfigId property: The Azure AI Content Safety detector configuration identifier. When supplied, it - * must be the - * configuration supported for the selected category. - * - * @return the harmConfigId value. - */ - public String harmConfigId() { - return this.harmConfigId; - } - - /** - * Set the harmConfigId property: The Azure AI Content Safety detector configuration identifier. When supplied, it - * must be the - * configuration supported for the selected category. - * - * @param harmConfigId the harmConfigId value to set. - * @return the RaiAcsHarmConfiguration object itself. - */ - public RaiAcsHarmConfiguration withHarmConfigId(String harmConfigId) { - this.harmConfigId = harmConfigId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", this.category == null ? null : this.category.toString()); - jsonWriter.writeStringField("harm_config_id", this.harmConfigId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsHarmConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsHarmConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiAcsHarmConfiguration. - */ - public static RaiAcsHarmConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsHarmConfiguration deserializedRaiAcsHarmConfiguration = new RaiAcsHarmConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedRaiAcsHarmConfiguration.category = RaiAcsHarmCategory.fromString(reader.getString()); - } else if ("harm_config_id".equals(fieldName)) { - deserializedRaiAcsHarmConfiguration.harmConfigId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiAcsHarmConfiguration; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoint.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoint.java deleted file mode 100644 index f02dd79dead8..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoint.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Binds one logical policy to an Agent Control Specification intervention point. - */ -@Fluent -public final class RaiAcsInterventionPoint implements JsonSerializable { - /* - * The canonical Agent Hooks snapshot path projected as the policy target. - */ - private RaiAcsPolicyTarget policyTarget; - - /* - * The semantic kind of the projected policy target. - */ - private RaiAcsPolicyTargetKind policyTargetKind; - - /* - * The logical policy evaluated at this intervention point. - */ - private RaiAcsPolicyBinding policy; - - /* - * Standard Agent Control Specification annotation bindings are disabled; when present, this object must be empty. - */ - private RaiAcsEmptyObject annotations; - - /** - * Creates an instance of RaiAcsInterventionPoint class. - */ - public RaiAcsInterventionPoint() { - } - - /** - * Get the policyTarget property: The canonical Agent Hooks snapshot path projected as the policy target. - * - * @return the policyTarget value. - */ - public RaiAcsPolicyTarget policyTarget() { - return this.policyTarget; - } - - /** - * Set the policyTarget property: The canonical Agent Hooks snapshot path projected as the policy target. - * - * @param policyTarget the policyTarget value to set. - * @return the RaiAcsInterventionPoint object itself. - */ - public RaiAcsInterventionPoint withPolicyTarget(RaiAcsPolicyTarget policyTarget) { - this.policyTarget = policyTarget; - return this; - } - - /** - * Get the policyTargetKind property: The semantic kind of the projected policy target. - * - * @return the policyTargetKind value. - */ - public RaiAcsPolicyTargetKind policyTargetKind() { - return this.policyTargetKind; - } - - /** - * Set the policyTargetKind property: The semantic kind of the projected policy target. - * - * @param policyTargetKind the policyTargetKind value to set. - * @return the RaiAcsInterventionPoint object itself. - */ - public RaiAcsInterventionPoint withPolicyTargetKind(RaiAcsPolicyTargetKind policyTargetKind) { - this.policyTargetKind = policyTargetKind; - return this; - } - - /** - * Get the policy property: The logical policy evaluated at this intervention point. - * - * @return the policy value. - */ - public RaiAcsPolicyBinding policy() { - return this.policy; - } - - /** - * Set the policy property: The logical policy evaluated at this intervention point. - * - * @param policy the policy value to set. - * @return the RaiAcsInterventionPoint object itself. - */ - public RaiAcsInterventionPoint withPolicy(RaiAcsPolicyBinding policy) { - this.policy = policy; - return this; - } - - /** - * Get the annotations property: Standard Agent Control Specification annotation bindings are disabled; when - * present, this object must be empty. - * - * @return the annotations value. - */ - public RaiAcsEmptyObject annotations() { - return this.annotations; - } - - /** - * Set the annotations property: Standard Agent Control Specification annotation bindings are disabled; when - * present, this object must be empty. - * - * @param annotations the annotations value to set. - * @return the RaiAcsInterventionPoint object itself. - */ - public RaiAcsInterventionPoint withAnnotations(RaiAcsEmptyObject annotations) { - this.annotations = annotations; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("policy_target", this.policyTarget == null ? null : this.policyTarget.toString()); - jsonWriter.writeStringField("policy_target_kind", - this.policyTargetKind == null ? null : this.policyTargetKind.toString()); - jsonWriter.writeJsonField("policy", this.policy); - jsonWriter.writeJsonField("annotations", this.annotations); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsInterventionPoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsInterventionPoint if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiAcsInterventionPoint. - */ - public static RaiAcsInterventionPoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsInterventionPoint deserializedRaiAcsInterventionPoint = new RaiAcsInterventionPoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("policy_target".equals(fieldName)) { - deserializedRaiAcsInterventionPoint.policyTarget - = RaiAcsPolicyTarget.fromString(reader.getString()); - } else if ("policy_target_kind".equals(fieldName)) { - deserializedRaiAcsInterventionPoint.policyTargetKind - = RaiAcsPolicyTargetKind.fromString(reader.getString()); - } else if ("policy".equals(fieldName)) { - deserializedRaiAcsInterventionPoint.policy = RaiAcsPolicyBinding.fromJson(reader); - } else if ("annotations".equals(fieldName)) { - deserializedRaiAcsInterventionPoint.annotations = RaiAcsEmptyObject.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiAcsInterventionPoint; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoints.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoints.java deleted file mode 100644 index 65f27800dd44..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoints.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Intervention points supported by the Azure AI Content Safety Unified Moderate host profile. - */ -@Fluent -public final class RaiAcsInterventionPoints implements JsonSerializable { - /* - * The policy evaluated for user input. - */ - private RaiAcsInterventionPoint input; - - /* - * The policy evaluated before a tool call. - */ - private RaiAcsToolInterventionPoint preToolCall; - - /* - * The policy evaluated after a tool call. - */ - private RaiAcsToolInterventionPoint postToolCall; - - /* - * The policy evaluated for final output. - */ - private RaiAcsInterventionPoint output; - - /** - * Creates an instance of RaiAcsInterventionPoints class. - */ - public RaiAcsInterventionPoints() { - } - - /** - * Get the input property: The policy evaluated for user input. - * - * @return the input value. - */ - public RaiAcsInterventionPoint input() { - return this.input; - } - - /** - * Set the input property: The policy evaluated for user input. - * - * @param input the input value to set. - * @return the RaiAcsInterventionPoints object itself. - */ - public RaiAcsInterventionPoints withInput(RaiAcsInterventionPoint input) { - this.input = input; - return this; - } - - /** - * Get the preToolCall property: The policy evaluated before a tool call. - * - * @return the preToolCall value. - */ - public RaiAcsToolInterventionPoint preToolCall() { - return this.preToolCall; - } - - /** - * Set the preToolCall property: The policy evaluated before a tool call. - * - * @param preToolCall the preToolCall value to set. - * @return the RaiAcsInterventionPoints object itself. - */ - public RaiAcsInterventionPoints withPreToolCall(RaiAcsToolInterventionPoint preToolCall) { - this.preToolCall = preToolCall; - return this; - } - - /** - * Get the postToolCall property: The policy evaluated after a tool call. - * - * @return the postToolCall value. - */ - public RaiAcsToolInterventionPoint postToolCall() { - return this.postToolCall; - } - - /** - * Set the postToolCall property: The policy evaluated after a tool call. - * - * @param postToolCall the postToolCall value to set. - * @return the RaiAcsInterventionPoints object itself. - */ - public RaiAcsInterventionPoints withPostToolCall(RaiAcsToolInterventionPoint postToolCall) { - this.postToolCall = postToolCall; - return this; - } - - /** - * Get the output property: The policy evaluated for final output. - * - * @return the output value. - */ - public RaiAcsInterventionPoint output() { - return this.output; - } - - /** - * Set the output property: The policy evaluated for final output. - * - * @param output the output value to set. - * @return the RaiAcsInterventionPoints object itself. - */ - public RaiAcsInterventionPoints withOutput(RaiAcsInterventionPoint output) { - this.output = output; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("input", this.input); - jsonWriter.writeJsonField("pre_tool_call", this.preToolCall); - jsonWriter.writeJsonField("post_tool_call", this.postToolCall); - jsonWriter.writeJsonField("output", this.output); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsInterventionPoints from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsInterventionPoints if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RaiAcsInterventionPoints. - */ - public static RaiAcsInterventionPoints fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsInterventionPoints deserializedRaiAcsInterventionPoints = new RaiAcsInterventionPoints(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("input".equals(fieldName)) { - deserializedRaiAcsInterventionPoints.input = RaiAcsInterventionPoint.fromJson(reader); - } else if ("pre_tool_call".equals(fieldName)) { - deserializedRaiAcsInterventionPoints.preToolCall = RaiAcsToolInterventionPoint.fromJson(reader); - } else if ("post_tool_call".equals(fieldName)) { - deserializedRaiAcsInterventionPoints.postToolCall = RaiAcsToolInterventionPoint.fromJson(reader); - } else if ("output".equals(fieldName)) { - deserializedRaiAcsInterventionPoints.output = RaiAcsInterventionPoint.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiAcsInterventionPoints; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsManifest.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsManifest.java deleted file mode 100644 index a1117455bab7..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsManifest.java +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The closed Rego-only Agent Control Specification (ACS) profile supported by - * Azure AI Content Safety Unified Moderate. - */ -@Fluent -public final class RaiAcsManifest implements JsonSerializable { - /* - * The declared Agent Control Specification manifest version. - */ - private String agentControlSpecificationVersion; - - /* - * Non-policy manifest metadata. - */ - private Map metadata; - - /* - * Named Rego policies in this manifest. - */ - private Map policies; - - /* - * Agent Control Specification intervention-point bindings. At least one intervention point is required. - */ - private RaiAcsInterventionPoints interventionPoints; - - /* - * Static tool catalog keyed by canonical tool name. The catalog may be omitted or empty when no - * tool selector is configured. A tool selector requires a non-empty catalog, and an unknown - * selected key fails closed. - */ - private Map tools; - - /* - * Standard Agent Control Specification annotator dispatch is disabled; when present, this object must be empty. - */ - private RaiAcsEmptyObject annotators; - - /** - * Creates an instance of RaiAcsManifest class. - */ - public RaiAcsManifest() { - } - - /** - * Get the agentControlSpecificationVersion property: The declared Agent Control Specification manifest version. - * - * @return the agentControlSpecificationVersion value. - */ - public String agentControlSpecificationVersion() { - return this.agentControlSpecificationVersion; - } - - /** - * Set the agentControlSpecificationVersion property: The declared Agent Control Specification manifest version. - * - * @param agentControlSpecificationVersion the agentControlSpecificationVersion value to set. - * @return the RaiAcsManifest object itself. - */ - public RaiAcsManifest withAgentControlSpecificationVersion(String agentControlSpecificationVersion) { - this.agentControlSpecificationVersion = agentControlSpecificationVersion; - return this; - } - - /** - * Get the metadata property: Non-policy manifest metadata. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Non-policy manifest metadata. - * - * @param metadata the metadata value to set. - * @return the RaiAcsManifest object itself. - */ - public RaiAcsManifest withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the policies property: Named Rego policies in this manifest. - * - * @return the policies value. - */ - public Map policies() { - return this.policies; - } - - /** - * Set the policies property: Named Rego policies in this manifest. - * - * @param policies the policies value to set. - * @return the RaiAcsManifest object itself. - */ - public RaiAcsManifest withPolicies(Map policies) { - this.policies = policies; - return this; - } - - /** - * Get the interventionPoints property: Agent Control Specification intervention-point bindings. At least one - * intervention point is required. - * - * @return the interventionPoints value. - */ - public RaiAcsInterventionPoints interventionPoints() { - return this.interventionPoints; - } - - /** - * Set the interventionPoints property: Agent Control Specification intervention-point bindings. At least one - * intervention point is required. - * - * @param interventionPoints the interventionPoints value to set. - * @return the RaiAcsManifest object itself. - */ - public RaiAcsManifest withInterventionPoints(RaiAcsInterventionPoints interventionPoints) { - this.interventionPoints = interventionPoints; - return this; - } - - /** - * Get the tools property: Static tool catalog keyed by canonical tool name. The catalog may be omitted or empty - * when no - * tool selector is configured. A tool selector requires a non-empty catalog, and an unknown - * selected key fails closed. - * - * @return the tools value. - */ - public Map tools() { - return this.tools; - } - - /** - * Set the tools property: Static tool catalog keyed by canonical tool name. The catalog may be omitted or empty - * when no - * tool selector is configured. A tool selector requires a non-empty catalog, and an unknown - * selected key fails closed. - * - * @param tools the tools value to set. - * @return the RaiAcsManifest object itself. - */ - public RaiAcsManifest withTools(Map tools) { - this.tools = tools; - return this; - } - - /** - * Get the annotators property: Standard Agent Control Specification annotator dispatch is disabled; when present, - * this object must be empty. - * - * @return the annotators value. - */ - public RaiAcsEmptyObject annotators() { - return this.annotators; - } - - /** - * Set the annotators property: Standard Agent Control Specification annotator dispatch is disabled; when present, - * this object must be empty. - * - * @param annotators the annotators value to set. - * @return the RaiAcsManifest object itself. - */ - public RaiAcsManifest withAnnotators(RaiAcsEmptyObject annotators) { - this.annotators = annotators; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("agent_control_specification_version", this.agentControlSpecificationVersion); - jsonWriter.writeMapField("policies", this.policies, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("intervention_points", this.interventionPoints); - jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("tools", this.tools, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("annotators", this.annotators); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsManifest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsManifest if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiAcsManifest. - */ - public static RaiAcsManifest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsManifest deserializedRaiAcsManifest = new RaiAcsManifest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("agent_control_specification_version".equals(fieldName)) { - deserializedRaiAcsManifest.agentControlSpecificationVersion = reader.getString(); - } else if ("policies".equals(fieldName)) { - Map policies - = reader.readMap(reader1 -> RaiAcsRegoPolicyDefinition.fromJson(reader1)); - deserializedRaiAcsManifest.policies = policies; - } else if ("intervention_points".equals(fieldName)) { - deserializedRaiAcsManifest.interventionPoints = RaiAcsInterventionPoints.fromJson(reader); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedRaiAcsManifest.metadata = metadata; - } else if ("tools".equals(fieldName)) { - Map tools - = reader.readMap(reader1 -> RaiAcsToolDefinition.fromJson(reader1)); - deserializedRaiAcsManifest.tools = tools; - } else if ("annotators".equals(fieldName)) { - deserializedRaiAcsManifest.annotators = RaiAcsEmptyObject.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiAcsManifest; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationBindingExtension.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationBindingExtension.java deleted file mode 100644 index d7d6f5f63ed1..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationBindingExtension.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Azure AI Content Safety moderation work performed before the Agent Control - * Specification runtime evaluates the selected Rego query. - */ -@Fluent -public final class RaiAcsModerationBindingExtension implements JsonSerializable { - /* - * How the selected policy target is represented to moderation capabilities. - */ - private RaiAcsModerationSubjectFormat subjectFormat; - - /* - * Harm signals requested for this intervention point. - */ - private List harmConfigs; - - /** - * Creates an instance of RaiAcsModerationBindingExtension class. - */ - public RaiAcsModerationBindingExtension() { - } - - /** - * Get the subjectFormat property: How the selected policy target is represented to moderation capabilities. - * - * @return the subjectFormat value. - */ - public RaiAcsModerationSubjectFormat subjectFormat() { - return this.subjectFormat; - } - - /** - * Set the subjectFormat property: How the selected policy target is represented to moderation capabilities. - * - * @param subjectFormat the subjectFormat value to set. - * @return the RaiAcsModerationBindingExtension object itself. - */ - public RaiAcsModerationBindingExtension withSubjectFormat(RaiAcsModerationSubjectFormat subjectFormat) { - this.subjectFormat = subjectFormat; - return this; - } - - /** - * Get the harmConfigs property: Harm signals requested for this intervention point. - * - * @return the harmConfigs value. - */ - public List harmConfigs() { - return this.harmConfigs; - } - - /** - * Set the harmConfigs property: Harm signals requested for this intervention point. - * - * @param harmConfigs the harmConfigs value to set. - * @return the RaiAcsModerationBindingExtension object itself. - */ - public RaiAcsModerationBindingExtension withHarmConfigs(List harmConfigs) { - this.harmConfigs = harmConfigs; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("subject_format", - this.subjectFormat == null ? null : this.subjectFormat.toString()); - jsonWriter.writeArrayField("harm_configs", this.harmConfigs, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsModerationBindingExtension from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsModerationBindingExtension if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiAcsModerationBindingExtension. - */ - public static RaiAcsModerationBindingExtension fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsModerationBindingExtension deserializedRaiAcsModerationBindingExtension - = new RaiAcsModerationBindingExtension(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("subject_format".equals(fieldName)) { - deserializedRaiAcsModerationBindingExtension.subjectFormat - = RaiAcsModerationSubjectFormat.fromString(reader.getString()); - } else if ("harm_configs".equals(fieldName)) { - List harmConfigs - = reader.readArray(reader1 -> RaiAcsHarmConfiguration.fromJson(reader1)); - deserializedRaiAcsModerationBindingExtension.harmConfigs = harmConfigs; - } else { - reader.skipChildren(); - } - } - - return deserializedRaiAcsModerationBindingExtension; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationSubjectFormat.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationSubjectFormat.java deleted file mode 100644 index 42187ca49258..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationSubjectFormat.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The representation sent to Azure AI Content Safety moderation capabilities. - */ -public final class RaiAcsModerationSubjectFormat extends ExpandableStringEnum { - /** - * Moderates the selected policy target as text. - */ - public static final RaiAcsModerationSubjectFormat TEXT = fromString("text"); - - /** - * Moderates the canonical JSON representation of the selected policy target. - */ - public static final RaiAcsModerationSubjectFormat CANONICAL_JSON = fromString("canonical_json"); - - /** - * Creates a new instance of RaiAcsModerationSubjectFormat value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RaiAcsModerationSubjectFormat() { - } - - /** - * Creates or finds a RaiAcsModerationSubjectFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding RaiAcsModerationSubjectFormat. - */ - public static RaiAcsModerationSubjectFormat fromString(String name) { - return fromString(name, RaiAcsModerationSubjectFormat.class); - } - - /** - * Gets known RaiAcsModerationSubjectFormat values. - * - * @return known RaiAcsModerationSubjectFormat values. - */ - public static Collection values() { - return values(RaiAcsModerationSubjectFormat.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyBinding.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyBinding.java deleted file mode 100644 index f9d057694fce..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyBinding.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Identifies the logical policy evaluated at an Agent Control Specification intervention point. - */ -@Fluent -public final class RaiAcsPolicyBinding implements JsonSerializable { - /* - * The logical policy identifier. - */ - private String id; - - /* - * An optional intervention-specific Rego query override. - */ - private String query; - - /* - * Optional Azure AI Content Safety moderation capabilities invoked before Rego evaluation. - */ - private RaiAcsModerationBindingExtension aacsModeration; - - /** - * Creates an instance of RaiAcsPolicyBinding class. - */ - public RaiAcsPolicyBinding() { - } - - /** - * Get the id property: The logical policy identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The logical policy identifier. - * - * @param id the id value to set. - * @return the RaiAcsPolicyBinding object itself. - */ - public RaiAcsPolicyBinding withId(String id) { - this.id = id; - return this; - } - - /** - * Get the query property: An optional intervention-specific Rego query override. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: An optional intervention-specific Rego query override. - * - * @param query the query value to set. - * @return the RaiAcsPolicyBinding object itself. - */ - public RaiAcsPolicyBinding withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the aacsModeration property: Optional Azure AI Content Safety moderation capabilities invoked before Rego - * evaluation. - * - * @return the aacsModeration value. - */ - public RaiAcsModerationBindingExtension aacsModeration() { - return this.aacsModeration; - } - - /** - * Set the aacsModeration property: Optional Azure AI Content Safety moderation capabilities invoked before Rego - * evaluation. - * - * @param aacsModeration the aacsModeration value to set. - * @return the RaiAcsPolicyBinding object itself. - */ - public RaiAcsPolicyBinding withAacsModeration(RaiAcsModerationBindingExtension aacsModeration) { - this.aacsModeration = aacsModeration; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("query", this.query); - jsonWriter.writeJsonField("aacs_moderation", this.aacsModeration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsPolicyBinding from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsPolicyBinding if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiAcsPolicyBinding. - */ - public static RaiAcsPolicyBinding fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsPolicyBinding deserializedRaiAcsPolicyBinding = new RaiAcsPolicyBinding(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRaiAcsPolicyBinding.id = reader.getString(); - } else if ("query".equals(fieldName)) { - deserializedRaiAcsPolicyBinding.query = reader.getString(); - } else if ("aacs_moderation".equals(fieldName)) { - deserializedRaiAcsPolicyBinding.aacsModeration = RaiAcsModerationBindingExtension.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiAcsPolicyBinding; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyDefinitionType.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyDefinitionType.java deleted file mode 100644 index 47f10ed99cf3..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyDefinitionType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The policy language supported by the Azure AI Content Safety Unified Moderate host profile. - */ -public final class RaiAcsPolicyDefinitionType extends ExpandableStringEnum { - /** - * A policy evaluated by Rego. - */ - public static final RaiAcsPolicyDefinitionType REGO = fromString("rego"); - - /** - * Creates a new instance of RaiAcsPolicyDefinitionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RaiAcsPolicyDefinitionType() { - } - - /** - * Creates or finds a RaiAcsPolicyDefinitionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RaiAcsPolicyDefinitionType. - */ - public static RaiAcsPolicyDefinitionType fromString(String name) { - return fromString(name, RaiAcsPolicyDefinitionType.class); - } - - /** - * Gets known RaiAcsPolicyDefinitionType values. - * - * @return known RaiAcsPolicyDefinitionType values. - */ - public static Collection values() { - return values(RaiAcsPolicyDefinitionType.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTarget.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTarget.java deleted file mode 100644 index 819c9b8a0496..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTarget.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Canonical policy targets supported by the Azure AI Content Safety Unified Moderate host profile. - */ -public final class RaiAcsPolicyTarget extends ExpandableStringEnum { - /** - * Selects the incoming user input. - */ - public static final RaiAcsPolicyTarget INPUT = fromString("$snap.input"); - - /** - * Selects the assistant output. - */ - public static final RaiAcsPolicyTarget OUTPUT = fromString("$snap.output"); - - /** - * Selects tool-call arguments. - */ - public static final RaiAcsPolicyTarget TOOL_ARGUMENTS = fromString("$snap.tool_call.args"); - - /** - * Selects a tool result. - */ - public static final RaiAcsPolicyTarget TOOL_RESULT = fromString("$snap.tool_result.value"); - - /** - * Creates a new instance of RaiAcsPolicyTarget value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RaiAcsPolicyTarget() { - } - - /** - * Creates or finds a RaiAcsPolicyTarget from its string representation. - * - * @param name a name to look for. - * @return the corresponding RaiAcsPolicyTarget. - */ - public static RaiAcsPolicyTarget fromString(String name) { - return fromString(name, RaiAcsPolicyTarget.class); - } - - /** - * Gets known RaiAcsPolicyTarget values. - * - * @return known RaiAcsPolicyTarget values. - */ - public static Collection values() { - return values(RaiAcsPolicyTarget.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTargetKind.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTargetKind.java deleted file mode 100644 index a417306f1d01..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTargetKind.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Canonical target kinds supported by the Azure AI Content Safety Unified Moderate host profile. - */ -public final class RaiAcsPolicyTargetKind extends ExpandableStringEnum { - /** - * The target contains user input. - */ - public static final RaiAcsPolicyTargetKind USER_INPUT = fromString("user_input"); - - /** - * The target contains assistant output. - */ - public static final RaiAcsPolicyTargetKind ASSISTANT_OUTPUT = fromString("assistant_output"); - - /** - * The target contains tool-call arguments. - */ - public static final RaiAcsPolicyTargetKind TOOL_ARGUMENTS = fromString("tool_args"); - - /** - * The target contains a tool result. - */ - public static final RaiAcsPolicyTargetKind TOOL_RESULT = fromString("tool_result"); - - /** - * Creates a new instance of RaiAcsPolicyTargetKind value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RaiAcsPolicyTargetKind() { - } - - /** - * Creates or finds a RaiAcsPolicyTargetKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding RaiAcsPolicyTargetKind. - */ - public static RaiAcsPolicyTargetKind fromString(String name) { - return fromString(name, RaiAcsPolicyTargetKind.class); - } - - /** - * Gets known RaiAcsPolicyTargetKind values. - * - * @return known RaiAcsPolicyTargetKind values. - */ - public static Collection values() { - return values(RaiAcsPolicyTargetKind.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsRegoPolicyDefinition.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsRegoPolicyDefinition.java deleted file mode 100644 index 046d888e4e90..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsRegoPolicyDefinition.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Rego policy definition in the Azure AI Content Safety Unified Moderate host profile. - */ -@Fluent -public final class RaiAcsRegoPolicyDefinition implements JsonSerializable { - /* - * The policy language. This profile supports only Rego. - */ - private RaiAcsPolicyDefinitionType type; - - /* - * The fully qualified Rego query evaluated for this policy. - */ - private String query; - - /** - * Creates an instance of RaiAcsRegoPolicyDefinition class. - */ - public RaiAcsRegoPolicyDefinition() { - } - - /** - * Get the type property: The policy language. This profile supports only Rego. - * - * @return the type value. - */ - public RaiAcsPolicyDefinitionType type() { - return this.type; - } - - /** - * Set the type property: The policy language. This profile supports only Rego. - * - * @param type the type value to set. - * @return the RaiAcsRegoPolicyDefinition object itself. - */ - public RaiAcsRegoPolicyDefinition withType(RaiAcsPolicyDefinitionType type) { - this.type = type; - return this; - } - - /** - * Get the query property: The fully qualified Rego query evaluated for this policy. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The fully qualified Rego query evaluated for this policy. - * - * @param query the query value to set. - * @return the RaiAcsRegoPolicyDefinition object itself. - */ - public RaiAcsRegoPolicyDefinition withQuery(String query) { - this.query = query; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("query", this.query); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsRegoPolicyDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsRegoPolicyDefinition if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiAcsRegoPolicyDefinition. - */ - public static RaiAcsRegoPolicyDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsRegoPolicyDefinition deserializedRaiAcsRegoPolicyDefinition = new RaiAcsRegoPolicyDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedRaiAcsRegoPolicyDefinition.type - = RaiAcsPolicyDefinitionType.fromString(reader.getString()); - } else if ("query".equals(fieldName)) { - deserializedRaiAcsRegoPolicyDefinition.query = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiAcsRegoPolicyDefinition; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolDefinition.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolDefinition.java deleted file mode 100644 index 400e675ad3e9..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolDefinition.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -/** - * Static policy metadata for one Agent Control Specification tool catalog entry. - */ -@Fluent -public final class RaiAcsToolDefinition implements JsonSerializable { - /* - * Optional host-defined tool identifier. The catalog map key, not this value, controls tool lookup. - */ - private String id; - - /* - * Optional host-defined tool type. - */ - private String type; - - /* - * Human-readable policy metadata. - */ - private String description; - - /* - * Labels describing the sink or capability. - */ - private List securityLabels; - - /* - * Maximum sensitivity or host-defined clearance metadata. - */ - private String clearance; - - /* - * Static policy metadata for one Agent Control Specification tool catalog entry. - */ - private Map additionalProperties; - - /** - * Creates an instance of RaiAcsToolDefinition class. - */ - public RaiAcsToolDefinition() { - } - - /** - * Get the id property: Optional host-defined tool identifier. The catalog map key, not this value, controls tool - * lookup. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Optional host-defined tool identifier. The catalog map key, not this value, controls tool - * lookup. - * - * @param id the id value to set. - * @return the RaiAcsToolDefinition object itself. - */ - public RaiAcsToolDefinition withId(String id) { - this.id = id; - return this; - } - - /** - * Get the type property: Optional host-defined tool type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Optional host-defined tool type. - * - * @param type the type value to set. - * @return the RaiAcsToolDefinition object itself. - */ - public RaiAcsToolDefinition withType(String type) { - this.type = type; - return this; - } - - /** - * Get the description property: Human-readable policy metadata. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Human-readable policy metadata. - * - * @param description the description value to set. - * @return the RaiAcsToolDefinition object itself. - */ - public RaiAcsToolDefinition withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the securityLabels property: Labels describing the sink or capability. - * - * @return the securityLabels value. - */ - public List securityLabels() { - return this.securityLabels; - } - - /** - * Set the securityLabels property: Labels describing the sink or capability. - * - * @param securityLabels the securityLabels value to set. - * @return the RaiAcsToolDefinition object itself. - */ - public RaiAcsToolDefinition withSecurityLabels(List securityLabels) { - this.securityLabels = securityLabels; - return this; - } - - /** - * Get the clearance property: Maximum sensitivity or host-defined clearance metadata. - * - * @return the clearance value. - */ - public String clearance() { - return this.clearance; - } - - /** - * Set the clearance property: Maximum sensitivity or host-defined clearance metadata. - * - * @param clearance the clearance value to set. - * @return the RaiAcsToolDefinition object itself. - */ - public RaiAcsToolDefinition withClearance(String clearance) { - this.clearance = clearance; - return this; - } - - /** - * Get the additionalProperties property: Static policy metadata for one Agent Control Specification tool catalog - * entry. - * - * @return the additionalProperties value. - */ - public Map additionalProperties() { - return this.additionalProperties; - } - - /** - * Set the additionalProperties property: Static policy metadata for one Agent Control Specification tool catalog - * entry. - * - * @param additionalProperties the additionalProperties value to set. - * @return the RaiAcsToolDefinition object itself. - */ - public RaiAcsToolDefinition withAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeArrayField("security_labels", this.securityLabels, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("clearance", this.clearance); - if (additionalProperties != null) { - for (Map.Entry additionalProperty : additionalProperties.entrySet()) { - jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); - } - } - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsToolDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsToolDefinition if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RaiAcsToolDefinition. - */ - public static RaiAcsToolDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsToolDefinition deserializedRaiAcsToolDefinition = new RaiAcsToolDefinition(); - Map additionalProperties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRaiAcsToolDefinition.id = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRaiAcsToolDefinition.type = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedRaiAcsToolDefinition.description = reader.getString(); - } else if ("security_labels".equals(fieldName)) { - List securityLabels = reader.readArray(reader1 -> reader1.getString()); - deserializedRaiAcsToolDefinition.securityLabels = securityLabels; - } else if ("clearance".equals(fieldName)) { - deserializedRaiAcsToolDefinition.clearance = reader.getString(); - } else { - if (additionalProperties == null) { - additionalProperties = new LinkedHashMap<>(); - } - - additionalProperties.put(fieldName, reader.readUntyped()); - } - } - deserializedRaiAcsToolDefinition.additionalProperties = additionalProperties; - - return deserializedRaiAcsToolDefinition; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolInterventionPoint.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolInterventionPoint.java deleted file mode 100644 index d25515d7ed12..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolInterventionPoint.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Binds one logical policy to a tool-call intervention point. - */ -@Fluent -public final class RaiAcsToolInterventionPoint implements JsonSerializable { - /* - * The canonical Agent Hooks snapshot path projected as the policy target. - */ - private RaiAcsPolicyTarget policyTarget; - - /* - * The semantic kind of the projected policy target. - */ - private RaiAcsPolicyTargetKind policyTargetKind; - - /* - * The logical policy evaluated at this intervention point. - */ - private RaiAcsPolicyBinding policy; - - /* - * Standard Agent Control Specification annotation bindings are disabled; when present, this object must be empty. - */ - private RaiAcsEmptyObject annotations; - - /* - * Selects the tool catalog key from the raw Agent Hooks snapshot using an extensible snapshot path. - */ - private RaiAcsToolNameSelector toolNameFrom; - - /** - * Creates an instance of RaiAcsToolInterventionPoint class. - */ - public RaiAcsToolInterventionPoint() { - } - - /** - * Get the policyTarget property: The canonical Agent Hooks snapshot path projected as the policy target. - * - * @return the policyTarget value. - */ - public RaiAcsPolicyTarget policyTarget() { - return this.policyTarget; - } - - /** - * Set the policyTarget property: The canonical Agent Hooks snapshot path projected as the policy target. - * - * @param policyTarget the policyTarget value to set. - * @return the RaiAcsToolInterventionPoint object itself. - */ - public RaiAcsToolInterventionPoint withPolicyTarget(RaiAcsPolicyTarget policyTarget) { - this.policyTarget = policyTarget; - return this; - } - - /** - * Get the policyTargetKind property: The semantic kind of the projected policy target. - * - * @return the policyTargetKind value. - */ - public RaiAcsPolicyTargetKind policyTargetKind() { - return this.policyTargetKind; - } - - /** - * Set the policyTargetKind property: The semantic kind of the projected policy target. - * - * @param policyTargetKind the policyTargetKind value to set. - * @return the RaiAcsToolInterventionPoint object itself. - */ - public RaiAcsToolInterventionPoint withPolicyTargetKind(RaiAcsPolicyTargetKind policyTargetKind) { - this.policyTargetKind = policyTargetKind; - return this; - } - - /** - * Get the policy property: The logical policy evaluated at this intervention point. - * - * @return the policy value. - */ - public RaiAcsPolicyBinding policy() { - return this.policy; - } - - /** - * Set the policy property: The logical policy evaluated at this intervention point. - * - * @param policy the policy value to set. - * @return the RaiAcsToolInterventionPoint object itself. - */ - public RaiAcsToolInterventionPoint withPolicy(RaiAcsPolicyBinding policy) { - this.policy = policy; - return this; - } - - /** - * Get the annotations property: Standard Agent Control Specification annotation bindings are disabled; when - * present, this object must be empty. - * - * @return the annotations value. - */ - public RaiAcsEmptyObject annotations() { - return this.annotations; - } - - /** - * Set the annotations property: Standard Agent Control Specification annotation bindings are disabled; when - * present, this object must be empty. - * - * @param annotations the annotations value to set. - * @return the RaiAcsToolInterventionPoint object itself. - */ - public RaiAcsToolInterventionPoint withAnnotations(RaiAcsEmptyObject annotations) { - this.annotations = annotations; - return this; - } - - /** - * Get the toolNameFrom property: Selects the tool catalog key from the raw Agent Hooks snapshot using an extensible - * snapshot path. - * - * @return the toolNameFrom value. - */ - public RaiAcsToolNameSelector toolNameFrom() { - return this.toolNameFrom; - } - - /** - * Set the toolNameFrom property: Selects the tool catalog key from the raw Agent Hooks snapshot using an extensible - * snapshot path. - * - * @param toolNameFrom the toolNameFrom value to set. - * @return the RaiAcsToolInterventionPoint object itself. - */ - public RaiAcsToolInterventionPoint withToolNameFrom(RaiAcsToolNameSelector toolNameFrom) { - this.toolNameFrom = toolNameFrom; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("policy_target", this.policyTarget == null ? null : this.policyTarget.toString()); - jsonWriter.writeStringField("policy_target_kind", - this.policyTargetKind == null ? null : this.policyTargetKind.toString()); - jsonWriter.writeJsonField("policy", this.policy); - jsonWriter.writeJsonField("annotations", this.annotations); - jsonWriter.writeStringField("tool_name_from", this.toolNameFrom == null ? null : this.toolNameFrom.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiAcsToolInterventionPoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiAcsToolInterventionPoint if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiAcsToolInterventionPoint. - */ - public static RaiAcsToolInterventionPoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiAcsToolInterventionPoint deserializedRaiAcsToolInterventionPoint = new RaiAcsToolInterventionPoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("policy_target".equals(fieldName)) { - deserializedRaiAcsToolInterventionPoint.policyTarget - = RaiAcsPolicyTarget.fromString(reader.getString()); - } else if ("policy_target_kind".equals(fieldName)) { - deserializedRaiAcsToolInterventionPoint.policyTargetKind - = RaiAcsPolicyTargetKind.fromString(reader.getString()); - } else if ("policy".equals(fieldName)) { - deserializedRaiAcsToolInterventionPoint.policy = RaiAcsPolicyBinding.fromJson(reader); - } else if ("annotations".equals(fieldName)) { - deserializedRaiAcsToolInterventionPoint.annotations = RaiAcsEmptyObject.fromJson(reader); - } else if ("tool_name_from".equals(fieldName)) { - deserializedRaiAcsToolInterventionPoint.toolNameFrom - = RaiAcsToolNameSelector.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiAcsToolInterventionPoint; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolNameSelector.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolNameSelector.java deleted file mode 100644 index 4b06812b4540..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolNameSelector.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Snapshot paths for selecting a tool catalog entry. - * The listed values are recognized by the Azure AI Content Safety Unified Moderate host profile; other values are - * allowed for forward compatibility. - */ -public final class RaiAcsToolNameSelector extends ExpandableStringEnum { - /** - * Selects the tool-call name from the canonical snapshot root. - */ - public static final RaiAcsToolNameSelector TOOL_CALL_NAME = fromString("$snap.tool_call.name"); - - /** - * Selects the tool-call name through the snapshot-root alias. - */ - public static final RaiAcsToolNameSelector TOOL_CALL_NAME_ALIAS = fromString("$.tool_call.name"); - - /** - * Creates a new instance of RaiAcsToolNameSelector value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RaiAcsToolNameSelector() { - } - - /** - * Creates or finds a RaiAcsToolNameSelector from its string representation. - * - * @param name a name to look for. - * @return the corresponding RaiAcsToolNameSelector. - */ - public static RaiAcsToolNameSelector fromString(String name) { - return fromString(name, RaiAcsToolNameSelector.class); - } - - /** - * Gets known RaiAcsToolNameSelector values. - * - * @return known RaiAcsToolNameSelector values. - */ - public static Collection values() { - return values(RaiAcsToolNameSelector.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBinding.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBinding.java deleted file mode 100644 index 418bd4ce2c1e..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBinding.java +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner; -import java.util.Map; - -/** - * An immutable client-side representation of RaiBinding. - */ -public interface RaiBinding { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Properties of the RAI binding. - * - * @return the properties value. - */ - RaiBindingProperties properties(); - - /** - * Gets the etag property: Resource ETag. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner object. - * - * @return the inner object. - */ - RaiBindingInner innerModel(); - - /** - * The entirety of the RaiBinding definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The RaiBinding definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the RaiBinding definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the RaiBinding definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @return the next definition stage. - */ - WithCreate withExistingAccount(String resourceGroupName, String accountName); - } - - /** - * The stage of the RaiBinding definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties, - DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { - /** - * Executes the create request. - * - * @return the created resource. - */ - RaiBinding create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - RaiBinding create(Context context); - } - - /** - * The stage of the RaiBinding definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the RaiBinding definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Properties of the RAI binding.. - * - * @param properties Properties of the RAI binding. - * @return the next definition stage. - */ - WithCreate withProperties(RaiBindingProperties properties); - } - - /** - * The stage of the RaiBinding definition allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: Proceed only when the current resource ETag matches this value.. - * - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @return the next definition stage. - */ - WithCreate withIfMatch(String ifMatch); - } - - /** - * The stage of the RaiBinding definition allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Proceed only when no current resource ETag matches this value.. - * - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @return the next definition stage. - */ - WithCreate withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Begins update for the RaiBinding resource. - * - * @return the stage of resource update. - */ - RaiBinding.Update update(); - - /** - * The template for RaiBinding update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties, UpdateStages.WithIfMatch, - UpdateStages.WithIfNoneMatch { - /** - * Executes the update request. - * - * @return the updated resource. - */ - RaiBinding apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - RaiBinding apply(Context context); - } - - /** - * The RaiBinding update stages. - */ - interface UpdateStages { - /** - * The stage of the RaiBinding update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the RaiBinding update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Properties of the RAI binding.. - * - * @param properties Properties of the RAI binding. - * @return the next definition stage. - */ - Update withProperties(RaiBindingProperties properties); - } - - /** - * The stage of the RaiBinding update allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: Proceed only when the current resource ETag matches this value.. - * - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - - /** - * The stage of the RaiBinding update allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Proceed only when no current resource ETag matches this value.. - * - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @return the next definition stage. - */ - Update withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - RaiBinding refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - RaiBinding refresh(Context context); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingProperties.java deleted file mode 100644 index 45bcb1bb5a05..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingProperties.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of a binding from an Azure resource to an Agent Control Specification policy. - */ -@Fluent -public final class RaiBindingProperties implements JsonSerializable { - /* - * A valid Azure Resource Manager resource ID of the resource to bind to the target RAI policy. - */ - private String boundResourceId; - - /* - * The same-account Agent Control Specification policy name targeted by the binding. - */ - private String targetPolicyName; - - /** - * Creates an instance of RaiBindingProperties class. - */ - public RaiBindingProperties() { - } - - /** - * Get the boundResourceId property: A valid Azure Resource Manager resource ID of the resource to bind to the - * target RAI policy. - * - * @return the boundResourceId value. - */ - public String boundResourceId() { - return this.boundResourceId; - } - - /** - * Set the boundResourceId property: A valid Azure Resource Manager resource ID of the resource to bind to the - * target RAI policy. - * - * @param boundResourceId the boundResourceId value to set. - * @return the RaiBindingProperties object itself. - */ - public RaiBindingProperties withBoundResourceId(String boundResourceId) { - this.boundResourceId = boundResourceId; - return this; - } - - /** - * Get the targetPolicyName property: The same-account Agent Control Specification policy name targeted by the - * binding. - * - * @return the targetPolicyName value. - */ - public String targetPolicyName() { - return this.targetPolicyName; - } - - /** - * Set the targetPolicyName property: The same-account Agent Control Specification policy name targeted by the - * binding. - * - * @param targetPolicyName the targetPolicyName value to set. - * @return the RaiBindingProperties object itself. - */ - public RaiBindingProperties withTargetPolicyName(String targetPolicyName) { - this.targetPolicyName = targetPolicyName; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("boundResourceId", this.boundResourceId); - jsonWriter.writeStringField("targetPolicyName", this.targetPolicyName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiBindingProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiBindingProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiBindingProperties. - */ - public static RaiBindingProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiBindingProperties deserializedRaiBindingProperties = new RaiBindingProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("boundResourceId".equals(fieldName)) { - deserializedRaiBindingProperties.boundResourceId = reader.getString(); - } else if ("targetPolicyName".equals(fieldName)) { - deserializedRaiBindingProperties.targetPolicyName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiBindingProperties; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindings.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindings.java deleted file mode 100644 index 391940cdf214..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindings.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of RaiBindings. - */ -public interface RaiBindings { - /** - * Gets one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding. - */ - Response getWithResponse(String resourceGroupName, String accountName, String raiBindingName, - Context context); - - /** - * Gets one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding. - */ - RaiBinding get(String resourceGroupName, String accountName, String raiBindingName); - - /** - * Deletes one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String raiBindingName, - String ifMatch, Context context); - - /** - * Deletes one RAI binding. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiBindingName The name of the RAI binding. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String raiBindingName); - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists RAI bindings on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of RAI bindings to return. Defaults to 50. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped RAI bindings as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); - - /** - * Gets one RAI binding. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding. - */ - RaiBinding getById(String id); - - /** - * Gets one RAI binding. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one RAI binding. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes one RAI binding. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes one RAI binding. - * - * @param id the resource ID. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, String ifMatch, Context context); - - /** - * Begins definition for a new RaiBinding resource. - * - * @param name resource name. - * @return the first stage of the new RaiBinding definition. - */ - RaiBinding.DefinitionStages.Blank define(String name); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateHeaders.java deleted file mode 100644 index b14162f92cc1..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The RaiBindingsCreateOrUpdateHeaders model. - */ -@Immutable -public final class RaiBindingsCreateOrUpdateHeaders { - /* - * The ETag property. - */ - private final String etagHeader; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of RaiBindingsCreateOrUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public RaiBindingsCreateOrUpdateHeaders(HttpHeaders rawHeaders) { - this.etagHeader = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etagHeader property: The ETag property. - * - * @return the etagHeader value. - */ - public String etagHeader() { - return this.etagHeader; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateResponse.java deleted file mode 100644 index 786764cf4efa..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner; - -/** - * Contains all response data for the createOrUpdate operation. - */ -public final class RaiBindingsCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of RaiBindingsCreateOrUpdateResponse. - * - * @param request the request which resulted in this RaiBindingsCreateOrUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public RaiBindingsCreateOrUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - RaiBindingInner value, RaiBindingsCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public RaiBindingInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetHeaders.java deleted file mode 100644 index 2e44d805a533..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The RaiBindingsGetHeaders model. - */ -@Immutable -public final class RaiBindingsGetHeaders { - /* - * The ETag property. - */ - private final String etagHeader; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of RaiBindingsGetHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public RaiBindingsGetHeaders(HttpHeaders rawHeaders) { - this.etagHeader = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etagHeader property: The ETag property. - * - * @return the etagHeader value. - */ - public String etagHeader() { - return this.etagHeader; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetResponse.java deleted file mode 100644 index b86da3506585..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner; - -/** - * Contains all response data for the get operation. - */ -public final class RaiBindingsGetResponse extends ResponseBase { - /** - * Creates an instance of RaiBindingsGetResponse. - * - * @param request the request which resulted in this RaiBindingsGetResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public RaiBindingsGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, RaiBindingInner value, - RaiBindingsGetHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public RaiBindingInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicies.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicies.java index 8e83b0c38212..999254099e2b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicies.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicies.java @@ -22,7 +22,7 @@ public interface RaiPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Content Filters associated with the Azure OpenAI account. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String accountName, String raiPolicyName, Context context); @@ -58,13 +58,12 @@ Response getWithResponse(String resourceGroupName, String accountName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The name of Cognitive Services account. * @param raiPolicyName The name of the RaiPolicy associated with the Cognitive Services Account. - * @param ifMatch Proceed only when the current resource ETag matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String accountName, String raiPolicyName, String ifMatch, Context context); + void delete(String resourceGroupName, String accountName, String raiPolicyName, Context context); /** * Gets the content filters associated with the Azure OpenAI account. @@ -100,7 +99,7 @@ Response getWithResponse(String resourceGroupName, String accountName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Content Filters associated with the Azure OpenAI account. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response}. */ RaiPolicy getById(String id); @@ -112,7 +111,7 @@ Response getWithResponse(String resourceGroupName, String accountName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Content Filters associated with the Azure OpenAI account. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -130,13 +129,12 @@ Response getWithResponse(String resourceGroupName, String accountName * Deletes the specified Content Filters associated with the Azure OpenAI account. * * @param id the resource ID. - * @param ifMatch Proceed only when the current resource ETag matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByIdWithResponse(String id, String ifMatch, Context context); + void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new RaiPolicy resource. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateHeaders.java deleted file mode 100644 index 87fc882fafa1..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The RaiPoliciesCreateOrUpdateHeaders model. - */ -@Immutable -public final class RaiPoliciesCreateOrUpdateHeaders { - /* - * The ETag property. - */ - private final String etagHeader; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of RaiPoliciesCreateOrUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public RaiPoliciesCreateOrUpdateHeaders(HttpHeaders rawHeaders) { - this.etagHeader = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etagHeader property: The ETag property. - * - * @return the etagHeader value. - */ - public String etagHeader() { - return this.etagHeader; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateResponse.java deleted file mode 100644 index ad3c61b48a93..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiPolicyInner; - -/** - * Contains all response data for the createOrUpdate operation. - */ -public final class RaiPoliciesCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of RaiPoliciesCreateOrUpdateResponse. - * - * @param request the request which resulted in this RaiPoliciesCreateOrUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public RaiPoliciesCreateOrUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - RaiPolicyInner value, RaiPoliciesCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public RaiPolicyInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetHeaders.java deleted file mode 100644 index a019dda18980..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The RaiPoliciesGetHeaders model. - */ -@Immutable -public final class RaiPoliciesGetHeaders { - /* - * The ETag property. - */ - private final String etagHeader; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of RaiPoliciesGetHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public RaiPoliciesGetHeaders(HttpHeaders rawHeaders) { - this.etagHeader = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etagHeader property: The ETag property. - * - * @return the etagHeader value. - */ - public String etagHeader() { - return this.etagHeader; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetResponse.java deleted file mode 100644 index e3ceda2b3f64..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiPolicyInner; - -/** - * Contains all response data for the get operation. - */ -public final class RaiPoliciesGetResponse extends ResponseBase { - /** - * Creates an instance of RaiPoliciesGetResponse. - * - * @param request the request which resulted in this RaiPoliciesGetResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public RaiPoliciesGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, RaiPolicyInner value, - RaiPoliciesGetHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public RaiPolicyInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicy.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicy.java index c7cbb48398ac..02ba26aba154 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicy.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicy.java @@ -111,8 +111,7 @@ interface WithParentResource { * The stage of the RaiPolicy definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties, - DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. * @@ -154,32 +153,6 @@ interface WithProperties { */ WithCreate withProperties(RaiPolicyProperties properties); } - - /** - * The stage of the RaiPolicy definition allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: Proceed only when the current resource ETag matches this value.. - * - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @return the next definition stage. - */ - WithCreate withIfMatch(String ifMatch); - } - - /** - * The stage of the RaiPolicy definition allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Proceed only when no current resource ETag matches this value.. - * - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @return the next definition stage. - */ - WithCreate withIfNoneMatch(String ifNoneMatch); - } } /** @@ -192,8 +165,7 @@ interface WithIfNoneMatch { /** * The template for RaiPolicy update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties, UpdateStages.WithIfMatch, - UpdateStages.WithIfNoneMatch { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -239,32 +211,6 @@ interface WithProperties { */ Update withProperties(RaiPolicyProperties properties); } - - /** - * The stage of the RaiPolicy update allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: Proceed only when the current resource ETag matches this value.. - * - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - - /** - * The stage of the RaiPolicy update allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Proceed only when no current resource ETag matches this value.. - * - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @return the next definition stage. - */ - Update withIfNoneMatch(String ifNoneMatch); - } } /** diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyCustomExternalSafetyProviderReference.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyCustomExternalSafetyProviderReference.java deleted file mode 100644 index f529fa009d32..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyCustomExternalSafetyProviderReference.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A customer-visible reference to a subscription-level external safety provider. - */ -@Fluent -public final class RaiPolicyCustomExternalSafetyProviderReference - implements JsonSerializable { - /* - * The registered external safety-provider name. - */ - private String externalSafetyProviderName; - - /* - * Optional managed identity used when invoking the external safety provider. - */ - private String managedIdentityResourceId; - - /* - * The request stage at which the provider runs. - */ - private RaiPolicyContentSource source; - - /* - * Whether a provider rejection blocks the request. - */ - private Boolean blocking; - - /** - * Creates an instance of RaiPolicyCustomExternalSafetyProviderReference class. - */ - public RaiPolicyCustomExternalSafetyProviderReference() { - } - - /** - * Get the externalSafetyProviderName property: The registered external safety-provider name. - * - * @return the externalSafetyProviderName value. - */ - public String externalSafetyProviderName() { - return this.externalSafetyProviderName; - } - - /** - * Set the externalSafetyProviderName property: The registered external safety-provider name. - * - * @param externalSafetyProviderName the externalSafetyProviderName value to set. - * @return the RaiPolicyCustomExternalSafetyProviderReference object itself. - */ - public RaiPolicyCustomExternalSafetyProviderReference - withExternalSafetyProviderName(String externalSafetyProviderName) { - this.externalSafetyProviderName = externalSafetyProviderName; - return this; - } - - /** - * Get the managedIdentityResourceId property: Optional managed identity used when invoking the external safety - * provider. - * - * @return the managedIdentityResourceId value. - */ - public String managedIdentityResourceId() { - return this.managedIdentityResourceId; - } - - /** - * Set the managedIdentityResourceId property: Optional managed identity used when invoking the external safety - * provider. - * - * @param managedIdentityResourceId the managedIdentityResourceId value to set. - * @return the RaiPolicyCustomExternalSafetyProviderReference object itself. - */ - public RaiPolicyCustomExternalSafetyProviderReference - withManagedIdentityResourceId(String managedIdentityResourceId) { - this.managedIdentityResourceId = managedIdentityResourceId; - return this; - } - - /** - * Get the source property: The request stage at which the provider runs. - * - * @return the source value. - */ - public RaiPolicyContentSource source() { - return this.source; - } - - /** - * Set the source property: The request stage at which the provider runs. - * - * @param source the source value to set. - * @return the RaiPolicyCustomExternalSafetyProviderReference object itself. - */ - public RaiPolicyCustomExternalSafetyProviderReference withSource(RaiPolicyContentSource source) { - this.source = source; - return this; - } - - /** - * Get the blocking property: Whether a provider rejection blocks the request. - * - * @return the blocking value. - */ - public Boolean blocking() { - return this.blocking; - } - - /** - * Set the blocking property: Whether a provider rejection blocks the request. - * - * @param blocking the blocking value to set. - * @return the RaiPolicyCustomExternalSafetyProviderReference object itself. - */ - public RaiPolicyCustomExternalSafetyProviderReference withBlocking(Boolean blocking) { - this.blocking = blocking; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("externalSafetyProviderName", this.externalSafetyProviderName); - jsonWriter.writeStringField("source", this.source == null ? null : this.source.toString()); - jsonWriter.writeStringField("managedIdentityResourceId", this.managedIdentityResourceId); - jsonWriter.writeBooleanField("blocking", this.blocking); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiPolicyCustomExternalSafetyProviderReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiPolicyCustomExternalSafetyProviderReference if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiPolicyCustomExternalSafetyProviderReference. - */ - public static RaiPolicyCustomExternalSafetyProviderReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiPolicyCustomExternalSafetyProviderReference deserializedRaiPolicyCustomExternalSafetyProviderReference - = new RaiPolicyCustomExternalSafetyProviderReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("externalSafetyProviderName".equals(fieldName)) { - deserializedRaiPolicyCustomExternalSafetyProviderReference.externalSafetyProviderName - = reader.getString(); - } else if ("source".equals(fieldName)) { - deserializedRaiPolicyCustomExternalSafetyProviderReference.source - = RaiPolicyContentSource.fromString(reader.getString()); - } else if ("managedIdentityResourceId".equals(fieldName)) { - deserializedRaiPolicyCustomExternalSafetyProviderReference.managedIdentityResourceId - = reader.getString(); - } else if ("blocking".equals(fieldName)) { - deserializedRaiPolicyCustomExternalSafetyProviderReference.blocking - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiPolicyCustomExternalSafetyProviderReference; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyFormat.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyFormat.java deleted file mode 100644 index ff4afe18c395..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyFormat.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The public representation used by a RAI policy body. - */ -public final class RaiPolicyFormat extends ExpandableStringEnum { - /** - * A legacy content-filter policy. - */ - public static final RaiPolicyFormat CONTENT_FILTERS = fromString("ContentFilters"); - - /** - * An Agent Control Specification policy. - */ - public static final RaiPolicyFormat ACS = fromString("ACS"); - - /** - * Creates a new instance of RaiPolicyFormat value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RaiPolicyFormat() { - } - - /** - * Creates or finds a RaiPolicyFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding RaiPolicyFormat. - */ - public static RaiPolicyFormat fromString(String name) { - return fromString(name, RaiPolicyFormat.class); - } - - /** - * Gets known RaiPolicyFormat values. - * - * @return known RaiPolicyFormat values. - */ - public static Collection values() { - return values(RaiPolicyFormat.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyProperties.java index e29758790642..d2883b1856ad 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyProperties.java @@ -17,22 +17,6 @@ */ @Fluent public final class RaiPolicyProperties implements JsonSerializable { - /* - * The policy representation. Omission selects ContentFilters when creating a policy. ACS policy - * creation and replacement require ACS. - */ - private RaiPolicyFormat format; - - /* - * The ACS manifest. Required by service validation when format is ACS. - */ - private RaiAcsManifest acs; - - /* - * Reusable same-account Rego resources loaded with the ACS manifest. - */ - private List acsRegos; - /* * Content Filters policy type. */ @@ -64,11 +48,6 @@ public final class RaiPolicyProperties implements JsonSerializable safetyProviders; - /* - * Optional external safety-provider references used by this policy. - */ - private List customExternalSafetyProviders; - /* * Egress (outbound network) policy controlling which external endpoints sandboxed * agents can reach. Includes rules with Allow/Deny/Transform/Rewrite actions. @@ -81,70 +60,6 @@ public final class RaiPolicyProperties implements JsonSerializable acsRegos() { - return this.acsRegos; - } - - /** - * Set the acsRegos property: Reusable same-account Rego resources loaded with the ACS manifest. - * - * @param acsRegos the acsRegos value to set. - * @return the RaiPolicyProperties object itself. - */ - public RaiPolicyProperties withAcsRegos(List acsRegos) { - this.acsRegos = acsRegos; - return this; - } - /** * Get the type property: Content Filters policy type. * @@ -258,27 +173,6 @@ public RaiPolicyProperties withSafetyProviders(List safety return this; } - /** - * Get the customExternalSafetyProviders property: Optional external safety-provider references used by this policy. - * - * @return the customExternalSafetyProviders value. - */ - public List customExternalSafetyProviders() { - return this.customExternalSafetyProviders; - } - - /** - * Set the customExternalSafetyProviders property: Optional external safety-provider references used by this policy. - * - * @param customExternalSafetyProviders the customExternalSafetyProviders value to set. - * @return the RaiPolicyProperties object itself. - */ - public RaiPolicyProperties withCustomExternalSafetyProviders( - List customExternalSafetyProviders) { - this.customExternalSafetyProviders = customExternalSafetyProviders; - return this; - } - /** * Get the egressPolicy property: Egress (outbound network) policy controlling which external endpoints sandboxed * agents can reach. Includes rules with Allow/Deny/Transform/Rewrite actions. @@ -307,9 +201,6 @@ public RaiPolicyProperties withEgressPolicy(RaiEgressPolicyConfig egressPolicy) @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("format", this.format == null ? null : this.format.toString()); - jsonWriter.writeJsonField("acs", this.acs); - jsonWriter.writeArrayField("acsRegos", this.acsRegos, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeStringField("basePolicyName", this.basePolicyName); jsonWriter.writeArrayField("contentFilters", this.contentFilters, @@ -318,8 +209,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("safetyProviders", this.safetyProviders, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("customExternalSafetyProviders", this.customExternalSafetyProviders, - (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("egressPolicy", this.egressPolicy); return jsonWriter.writeEndObject(); } @@ -339,14 +228,7 @@ public static RaiPolicyProperties fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("format".equals(fieldName)) { - deserializedRaiPolicyProperties.format = RaiPolicyFormat.fromString(reader.getString()); - } else if ("acs".equals(fieldName)) { - deserializedRaiPolicyProperties.acs = RaiAcsManifest.fromJson(reader); - } else if ("acsRegos".equals(fieldName)) { - List acsRegos = reader.readArray(reader1 -> RaiRegoReference.fromJson(reader1)); - deserializedRaiPolicyProperties.acsRegos = acsRegos; - } else if ("type".equals(fieldName)) { + if ("type".equals(fieldName)) { deserializedRaiPolicyProperties.type = RaiPolicyType.fromString(reader.getString()); } else if ("mode".equals(fieldName)) { deserializedRaiPolicyProperties.mode = RaiPolicyMode.fromString(reader.getString()); @@ -364,10 +246,6 @@ public static RaiPolicyProperties fromJson(JsonReader jsonReader) throws IOExcep List safetyProviders = reader.readArray(reader1 -> SafetyProviderConfig.fromJson(reader1)); deserializedRaiPolicyProperties.safetyProviders = safetyProviders; - } else if ("customExternalSafetyProviders".equals(fieldName)) { - List customExternalSafetyProviders - = reader.readArray(reader1 -> RaiPolicyCustomExternalSafetyProviderReference.fromJson(reader1)); - deserializedRaiPolicyProperties.customExternalSafetyProviders = customExternalSafetyProviders; } else if ("egressPolicy".equals(fieldName)) { deserializedRaiPolicyProperties.egressPolicy = RaiEgressPolicyConfig.fromJson(reader); } else { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRego.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRego.java deleted file mode 100644 index 7d1c998a3801..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRego.java +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner; -import java.util.Map; - -/** - * An immutable client-side representation of RaiRego. - */ -public interface RaiRego { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Properties of the reusable Rego artifact. - * - * @return the properties value. - */ - RaiRegoProperties properties(); - - /** - * Gets the etag property: Resource ETag. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner object. - * - * @return the inner object. - */ - RaiRegoInner innerModel(); - - /** - * The entirety of the RaiRego definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The RaiRego definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the RaiRego definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the RaiRego definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @return the next definition stage. - */ - WithCreate withExistingAccount(String resourceGroupName, String accountName); - } - - /** - * The stage of the RaiRego definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties, - DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { - /** - * Executes the create request. - * - * @return the created resource. - */ - RaiRego create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - RaiRego create(Context context); - } - - /** - * The stage of the RaiRego definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the RaiRego definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Properties of the reusable Rego artifact.. - * - * @param properties Properties of the reusable Rego artifact. - * @return the next definition stage. - */ - WithCreate withProperties(RaiRegoProperties properties); - } - - /** - * The stage of the RaiRego definition allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: Proceed only when the current resource ETag matches this value.. - * - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @return the next definition stage. - */ - WithCreate withIfMatch(String ifMatch); - } - - /** - * The stage of the RaiRego definition allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Proceed only when no current resource ETag matches this value.. - * - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @return the next definition stage. - */ - WithCreate withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Begins update for the RaiRego resource. - * - * @return the stage of resource update. - */ - RaiRego.Update update(); - - /** - * The template for RaiRego update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties, UpdateStages.WithIfMatch, - UpdateStages.WithIfNoneMatch { - /** - * Executes the update request. - * - * @return the updated resource. - */ - RaiRego apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - RaiRego apply(Context context); - } - - /** - * The RaiRego update stages. - */ - interface UpdateStages { - /** - * The stage of the RaiRego update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the RaiRego update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Properties of the reusable Rego artifact.. - * - * @param properties Properties of the reusable Rego artifact. - * @return the next definition stage. - */ - Update withProperties(RaiRegoProperties properties); - } - - /** - * The stage of the RaiRego update allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: Proceed only when the current resource ETag matches this value.. - * - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - - /** - * The stage of the RaiRego update allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Proceed only when no current resource ETag matches this value.. - * - * @param ifNoneMatch Proceed only when no current resource ETag matches this value. - * @return the next definition stage. - */ - Update withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - RaiRego refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - RaiRego refresh(Context context); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoEncoding.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoEncoding.java deleted file mode 100644 index 230568139163..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoEncoding.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The transport encoding of reusable Rego source. - */ -public final class RaiRegoEncoding extends ExpandableStringEnum { - /** - * The Rego property contains plain UTF-8 source. - */ - public static final RaiRegoEncoding NONE = fromString("None"); - - /** - * The Rego property contains Base64-encoded UTF-8 source. - */ - public static final RaiRegoEncoding BASE64 = fromString("Base64"); - - /** - * Creates a new instance of RaiRegoEncoding value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RaiRegoEncoding() { - } - - /** - * Creates or finds a RaiRegoEncoding from its string representation. - * - * @param name a name to look for. - * @return the corresponding RaiRegoEncoding. - */ - public static RaiRegoEncoding fromString(String name) { - return fromString(name, RaiRegoEncoding.class); - } - - /** - * Gets known RaiRegoEncoding values. - * - * @return known RaiRegoEncoding values. - */ - public static Collection values() { - return values(RaiRegoEncoding.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoProperties.java deleted file mode 100644 index 9b2e9371d457..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of an account-scoped reusable Rego resource. - */ -@Fluent -public final class RaiRegoProperties implements JsonSerializable { - /* - * How the Rego source is encoded on the wire. The default is None. - */ - private RaiRegoEncoding encoding; - - /* - * Rego source in the selected transport encoding. - */ - private String rego; - - /** - * Creates an instance of RaiRegoProperties class. - */ - public RaiRegoProperties() { - } - - /** - * Get the encoding property: How the Rego source is encoded on the wire. The default is None. - * - * @return the encoding value. - */ - public RaiRegoEncoding encoding() { - return this.encoding; - } - - /** - * Set the encoding property: How the Rego source is encoded on the wire. The default is None. - * - * @param encoding the encoding value to set. - * @return the RaiRegoProperties object itself. - */ - public RaiRegoProperties withEncoding(RaiRegoEncoding encoding) { - this.encoding = encoding; - return this; - } - - /** - * Get the rego property: Rego source in the selected transport encoding. - * - * @return the rego value. - */ - public String rego() { - return this.rego; - } - - /** - * Set the rego property: Rego source in the selected transport encoding. - * - * @param rego the rego value to set. - * @return the RaiRegoProperties object itself. - */ - public RaiRegoProperties withRego(String rego) { - this.rego = rego; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("rego", this.rego); - jsonWriter.writeStringField("encoding", this.encoding == null ? null : this.encoding.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiRegoProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiRegoProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiRegoProperties. - */ - public static RaiRegoProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiRegoProperties deserializedRaiRegoProperties = new RaiRegoProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rego".equals(fieldName)) { - deserializedRaiRegoProperties.rego = reader.getString(); - } else if ("encoding".equals(fieldName)) { - deserializedRaiRegoProperties.encoding = RaiRegoEncoding.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiRegoProperties; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoReference.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoReference.java deleted file mode 100644 index 4f6b3689380b..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoReference.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * References one reusable Rego resource on the same account. - */ -@Fluent -public final class RaiRegoReference implements JsonSerializable { - /* - * The same-account Rego resource name. - */ - private String regoName; - - /** - * Creates an instance of RaiRegoReference class. - */ - public RaiRegoReference() { - } - - /** - * Get the regoName property: The same-account Rego resource name. - * - * @return the regoName value. - */ - public String regoName() { - return this.regoName; - } - - /** - * Set the regoName property: The same-account Rego resource name. - * - * @param regoName the regoName value to set. - * @return the RaiRegoReference object itself. - */ - public RaiRegoReference withRegoName(String regoName) { - this.regoName = regoName; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("regoName", this.regoName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RaiRegoReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RaiRegoReference if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RaiRegoReference. - */ - public static RaiRegoReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RaiRegoReference deserializedRaiRegoReference = new RaiRegoReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("regoName".equals(fieldName)) { - deserializedRaiRegoReference.regoName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRaiRegoReference; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegos.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegos.java deleted file mode 100644 index 544c359ade23..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegos.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of RaiRegos. - */ -public interface RaiRegos { - /** - * Gets one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact. - */ - Response getWithResponse(String resourceGroupName, String accountName, String raiRegoName, - Context context); - - /** - * Gets one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact. - */ - RaiRego get(String resourceGroupName, String accountName, String raiRegoName); - - /** - * Deletes one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String raiRegoName, String ifMatch, - Context context); - - /** - * Deletes one reusable Rego artifact. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param raiRegoName The name of the reusable Rego artifact. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String raiRegoName); - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists reusable Rego artifacts on an account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of Cognitive Services account. - * @param top The maximum number of reusable Rego artifacts to return. Defaults to 10. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of account-scoped reusable Rego resources as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); - - /** - * Gets one reusable Rego artifact. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact. - */ - RaiRego getById(String id); - - /** - * Gets one reusable Rego artifact. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return one reusable Rego artifact. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes one reusable Rego artifact. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes one reusable Rego artifact. - * - * @param id the resource ID. - * @param ifMatch Proceed only when the current resource ETag matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, String ifMatch, Context context); - - /** - * Begins definition for a new RaiRego resource. - * - * @param name resource name. - * @return the first stage of the new RaiRego definition. - */ - RaiRego.DefinitionStages.Blank define(String name); -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateHeaders.java deleted file mode 100644 index 2ba23e9f33a3..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The RaiRegosCreateOrUpdateHeaders model. - */ -@Immutable -public final class RaiRegosCreateOrUpdateHeaders { - /* - * The ETag property. - */ - private final String etagHeader; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of RaiRegosCreateOrUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public RaiRegosCreateOrUpdateHeaders(HttpHeaders rawHeaders) { - this.etagHeader = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etagHeader property: The ETag property. - * - * @return the etagHeader value. - */ - public String etagHeader() { - return this.etagHeader; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateResponse.java deleted file mode 100644 index ea3545f26da3..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner; - -/** - * Contains all response data for the createOrUpdate operation. - */ -public final class RaiRegosCreateOrUpdateResponse extends ResponseBase { - /** - * Creates an instance of RaiRegosCreateOrUpdateResponse. - * - * @param request the request which resulted in this RaiRegosCreateOrUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public RaiRegosCreateOrUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - RaiRegoInner value, RaiRegosCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public RaiRegoInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetHeaders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetHeaders.java deleted file mode 100644 index c1b70a750830..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetHeaders.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The RaiRegosGetHeaders model. - */ -@Immutable -public final class RaiRegosGetHeaders { - /* - * The ETag property. - */ - private final String etagHeader; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of RaiRegosGetHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public RaiRegosGetHeaders(HttpHeaders rawHeaders) { - this.etagHeader = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etagHeader property: The ETag property. - * - * @return the etagHeader value. - */ - public String etagHeader() { - return this.etagHeader; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetResponse.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetResponse.java deleted file mode 100644 index 708d2a40ffcd..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner; - -/** - * Contains all response data for the get operation. - */ -public final class RaiRegosGetResponse extends ResponseBase { - /** - * Creates an instance of RaiRegosGetResponse. - * - * @param request the request which resulted in this RaiRegosGetResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public RaiRegosGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, RaiRegoInner value, - RaiRegosGetHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public RaiRegoInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java index 39af3a0da0be..0c1e1c38ee39 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java @@ -10,21 +10,6 @@ * An immutable client-side representation of Usage. */ public interface Usage { - /** - * Gets the id property: Fully qualified resource ID for the usage. Ex - - * /subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/usages/{usageName}. - * - * @return the id value. - */ - String id(); - - /** - * Gets the type property: The type of the usage resource. E.g. "Microsoft.CognitiveServices/locations/usages". - * - * @return the type value. - */ - String type(); - /** * Gets the unit property: The unit of the metric. * diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Workbench.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Workbench.java index 434ff573cdbf..812d823b0eea 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Workbench.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Workbench.java @@ -4,9 +4,11 @@ package com.azure.resourcemanager.cognitiveservices.models; +import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.cognitiveservices.fluent.models.WorkbenchInner; +import java.util.Map; /** * An immutable client-side representation of Workbench. @@ -47,6 +49,20 @@ public interface Workbench { */ String etag(); + /** + * Gets the location property: The location of the workbench resource. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + /** * Gets the identity property: Identity for the resource. * @@ -61,6 +77,20 @@ public interface Workbench { */ SystemData systemData(); + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + /** * Gets the name of the resource group. * @@ -124,7 +154,8 @@ interface WithProperties { * The stage of the Workbench definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithIdentity { + interface WithCreate + extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithIdentity { /** * Executes the create request. * @@ -141,6 +172,40 @@ interface WithCreate extends DefinitionStages.WithIdentity { Workbench create(Context context); } + /** + * The stage of the Workbench definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The location of the workbench resource. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The location of the workbench resource. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + + /** + * The stage of the Workbench definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** * The stage of the Workbench definition allowing to specify identity. */ @@ -165,7 +230,7 @@ interface WithIdentity { /** * The template for Workbench update. */ - interface Update extends UpdateStages.WithProperties, UpdateStages.WithIdentity { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties, UpdateStages.WithIdentity { /** * Executes the update request. * @@ -186,17 +251,30 @@ interface Update extends UpdateStages.WithProperties, UpdateStages.WithIdentity * The Workbench update stages. */ interface UpdateStages { + /** + * The stage of the Workbench update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** * The stage of the Workbench update allowing to specify properties. */ interface WithProperties { /** - * Specifies the properties property: Properties of the workbench to update.. + * Specifies the properties property: Properties of the workbench resource.. * - * @param properties Properties of the workbench to update. + * @param properties Properties of the workbench resource. * @return the next definition stage. */ - Update withProperties(WorkbenchUpdateProperties properties); + Update withProperties(WorkbenchProperties properties); } /** @@ -204,14 +282,9 @@ interface WithProperties { */ interface WithIdentity { /** - * Specifies the identity property: Identity for the resource. May be changed while the workbench is running - * only when properties is omitted or null; the change takes effect after restart. If a properties object is - * supplied, including an empty object or timeout-only update, changing identity requires the workbench to - * be stopped.. + * Specifies the identity property: Identity for the resource.. * - * @param identity Identity for the resource. May be changed while the workbench is running only when - * properties is omitted or null; the change takes effect after restart. If a properties object is supplied, - * including an empty object or timeout-only update, changing identity requires the workbench to be stopped. + * @param identity Identity for the resource. * @return the next definition stage. */ Update withIdentity(Identity identity); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProperties.java index e493c6d2d4ef..f654dd8acd71 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProperties.java @@ -21,42 +21,27 @@ @Fluent public final class WorkbenchProperties implements JsonSerializable { /* - * Resource ID of the Foundry Compute or virtual cluster that hosts this workbench. Changing the cluster requires - * the workbench to be stopped. + * ARM resource ID of the parent cluster that hosts this workbench. */ private String targetClusterId; /* - * Container image URI (e.g., MCR or ACR image path) for the workbench. Immutable after creation. + * Container image URI (e.g., MCR or ACR image path) for the workbench. */ private String imageLink; - /* - * For virtual clusters, an exact Singularity instance type or a full-node Azure VM size. If omitted on creation, - * defaults to Singularity.D4_v3. Foundry Compute ignores this override and uses the pool configuration. Changing - * the instance type requires the workbench to be stopped. - */ - private String instanceType; - - /* - * GPU count for GPU pools or vCPU count for CPU pools. Must be 1, 2, 4, 8, or a positive multiple of 8. A full-node - * Azure VM size permits partition selection; omission uses the full node. For an exact Singularity instance type, a - * supplied count must match that type; the Singularity.D4_v3 fallback accepts 4. - */ - private Integer gpuCount; - /* * ISO 8601 duration before the idle workbench is automatically shut down (e.g., 'PT30M'). */ private String idleTimeBeforeShutdown; /* - * The dataset ID to mount for the workbench. Set only during creation. + * The dataset ID to mount for the workbench. */ private String datasetId; /* - * SSH configuration for remote access to the workbench. Set only during creation. + * SSH configuration for remote access to the workbench. */ private SshSettings sshSettings; @@ -71,15 +56,9 @@ public final class WorkbenchProperties implements JsonSerializable errors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); deserializedWorkbenchProperties.errors = errors; diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProvisioningState.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProvisioningState.java deleted file mode 100644 index 2ecb9c7800f9..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProvisioningState.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of a workbench resource, independent of runtime lifecycle status. - */ -public final class WorkbenchProvisioningState extends ExpandableStringEnum { - /** - * The workbench resource is being created. - */ - public static final WorkbenchProvisioningState CREATING = fromString("Creating"); - - /** - * The workbench resource has been provisioned. - */ - public static final WorkbenchProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Provisioning of the workbench resource failed. - */ - public static final WorkbenchProvisioningState FAILED = fromString("Failed"); - - /** - * Provisioning of the workbench resource was canceled. - */ - public static final WorkbenchProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of WorkbenchProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WorkbenchProvisioningState() { - } - - /** - * Creates or finds a WorkbenchProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding WorkbenchProvisioningState. - */ - public static WorkbenchProvisioningState fromString(String name) { - return fromString(name, WorkbenchProvisioningState.class); - } - - /** - * Gets known WorkbenchProvisioningState values. - * - * @return known WorkbenchProvisioningState values. - */ - public static Collection values() { - return values(WorkbenchProvisioningState.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchStatus.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchStatus.java deleted file mode 100644 index 7814402e7c92..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchStatus.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Runtime lifecycle status of a workbench. - */ -public final class WorkbenchStatus extends ExpandableStringEnum { - /** - * The runtime status is unknown. - */ - public static final WorkbenchStatus UNKNOWN = fromString("Unknown"); - - /** - * The runtime is being created. - */ - public static final WorkbenchStatus CREATING = fromString("Creating"); - - /** - * The runtime is starting. - */ - public static final WorkbenchStatus STARTING = fromString("Starting"); - - /** - * The runtime is running. - */ - public static final WorkbenchStatus RUNNING = fromString("Running"); - - /** - * The runtime is stopping. - */ - public static final WorkbenchStatus STOPPING = fromString("Stopping"); - - /** - * The runtime is stopped. - */ - public static final WorkbenchStatus STOPPED = fromString("Stopped"); - - /** - * The runtime is restarting. - */ - public static final WorkbenchStatus RESTARTING = fromString("Restarting"); - - /** - * The runtime is being updated. - */ - public static final WorkbenchStatus UPDATING = fromString("Updating"); - - /** - * The runtime is being deleted. - */ - public static final WorkbenchStatus DELETING = fromString("Deleting"); - - /** - * The runtime has failed. - */ - public static final WorkbenchStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of WorkbenchStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WorkbenchStatus() { - } - - /** - * Creates or finds a WorkbenchStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding WorkbenchStatus. - */ - public static WorkbenchStatus fromString(String name) { - return fromString(name, WorkbenchStatus.class); - } - - /** - * Gets known WorkbenchStatus values. - * - * @return known WorkbenchStatus values. - */ - public static Collection values() { - return values(WorkbenchStatus.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdate.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdate.java deleted file mode 100644 index 2e1d176ffb3e..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdate.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The mutable fields of a workbench resource. - */ -@Fluent -public final class WorkbenchUpdate implements JsonSerializable { - /* - * Properties of the workbench to update. - */ - private WorkbenchUpdateProperties properties; - - /* - * Identity for the resource. May be changed while the workbench is running only when properties is omitted or null; - * the change takes effect after restart. If a properties object is supplied, including an empty object or - * timeout-only update, changing identity requires the workbench to be stopped. - */ - private Identity identity; - - /** - * Creates an instance of WorkbenchUpdate class. - */ - public WorkbenchUpdate() { - } - - /** - * Get the properties property: Properties of the workbench to update. - * - * @return the properties value. - */ - public WorkbenchUpdateProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the workbench to update. - * - * @param properties the properties value to set. - * @return the WorkbenchUpdate object itself. - */ - public WorkbenchUpdate withProperties(WorkbenchUpdateProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: Identity for the resource. May be changed while the workbench is running only when - * properties is omitted or null; the change takes effect after restart. If a properties object is supplied, - * including an empty object or timeout-only update, changing identity requires the workbench to be stopped. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Set the identity property: Identity for the resource. May be changed while the workbench is running only when - * properties is omitted or null; the change takes effect after restart. If a properties object is supplied, - * including an empty object or timeout-only update, changing identity requires the workbench to be stopped. - * - * @param identity the identity value to set. - * @return the WorkbenchUpdate object itself. - */ - public WorkbenchUpdate withIdentity(Identity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkbenchUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkbenchUpdate if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkbenchUpdate. - */ - public static WorkbenchUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkbenchUpdate deserializedWorkbenchUpdate = new WorkbenchUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedWorkbenchUpdate.properties = WorkbenchUpdateProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedWorkbenchUpdate.identity = Identity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkbenchUpdate; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdateProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdateProperties.java deleted file mode 100644 index bbe9b26a3b78..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdateProperties.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Mutable properties for a Workbench resource. - */ -@Fluent -public final class WorkbenchUpdateProperties implements JsonSerializable { - /* - * Resource ID of the Foundry Compute or virtual cluster that hosts this workbench. Changing the cluster requires - * the workbench to be stopped. - */ - private String targetClusterId; - - /* - * ISO 8601 duration before the idle workbench is automatically shut down (e.g., 'PT30M'). - */ - private String idleTimeBeforeShutdown; - - /* - * For virtual clusters, an exact Singularity instance type or a full-node Azure VM size. Omit to preserve the - * current value; null resets to the Singularity.D4_v3 fallback. Foundry Compute ignores this override and uses the - * pool configuration. An actual instance type change requires the workbench to be stopped. - */ - private String instanceType; - - /* - * GPU count for GPU pools or vCPU count for CPU pools. Must be 1, 2, 4, 8, or a positive multiple of 8. Omit to - * preserve the current value; null clears the override to use the full node or the instance type's default count. - * Full-node Azure VM sizes permit partition selection. A supplied count must match an exact Singularity instance - * type; the Singularity.D4_v3 fallback accepts 4. - */ - private Integer gpuCount; - - /** - * Creates an instance of WorkbenchUpdateProperties class. - */ - public WorkbenchUpdateProperties() { - } - - /** - * Get the targetClusterId property: Resource ID of the Foundry Compute or virtual cluster that hosts this - * workbench. Changing the cluster requires the workbench to be stopped. - * - * @return the targetClusterId value. - */ - public String targetClusterId() { - return this.targetClusterId; - } - - /** - * Set the targetClusterId property: Resource ID of the Foundry Compute or virtual cluster that hosts this - * workbench. Changing the cluster requires the workbench to be stopped. - * - * @param targetClusterId the targetClusterId value to set. - * @return the WorkbenchUpdateProperties object itself. - */ - public WorkbenchUpdateProperties withTargetClusterId(String targetClusterId) { - this.targetClusterId = targetClusterId; - return this; - } - - /** - * Get the idleTimeBeforeShutdown property: ISO 8601 duration before the idle workbench is automatically shut down - * (e.g., 'PT30M'). - * - * @return the idleTimeBeforeShutdown value. - */ - public String idleTimeBeforeShutdown() { - return this.idleTimeBeforeShutdown; - } - - /** - * Set the idleTimeBeforeShutdown property: ISO 8601 duration before the idle workbench is automatically shut down - * (e.g., 'PT30M'). - * - * @param idleTimeBeforeShutdown the idleTimeBeforeShutdown value to set. - * @return the WorkbenchUpdateProperties object itself. - */ - public WorkbenchUpdateProperties withIdleTimeBeforeShutdown(String idleTimeBeforeShutdown) { - this.idleTimeBeforeShutdown = idleTimeBeforeShutdown; - return this; - } - - /** - * Get the instanceType property: For virtual clusters, an exact Singularity instance type or a full-node Azure VM - * size. Omit to preserve the current value; null resets to the Singularity.D4_v3 fallback. Foundry Compute ignores - * this override and uses the pool configuration. An actual instance type change requires the workbench to be - * stopped. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: For virtual clusters, an exact Singularity instance type or a full-node Azure VM - * size. Omit to preserve the current value; null resets to the Singularity.D4_v3 fallback. Foundry Compute ignores - * this override and uses the pool configuration. An actual instance type change requires the workbench to be - * stopped. - * - * @param instanceType the instanceType value to set. - * @return the WorkbenchUpdateProperties object itself. - */ - public WorkbenchUpdateProperties withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Get the gpuCount property: GPU count for GPU pools or vCPU count for CPU pools. Must be 1, 2, 4, 8, or a positive - * multiple of 8. Omit to preserve the current value; null clears the override to use the full node or the instance - * type's default count. Full-node Azure VM sizes permit partition selection. A supplied count must match an exact - * Singularity instance type; the Singularity.D4_v3 fallback accepts 4. - * - * @return the gpuCount value. - */ - public Integer gpuCount() { - return this.gpuCount; - } - - /** - * Set the gpuCount property: GPU count for GPU pools or vCPU count for CPU pools. Must be 1, 2, 4, 8, or a positive - * multiple of 8. Omit to preserve the current value; null clears the override to use the full node or the instance - * type's default count. Full-node Azure VM sizes permit partition selection. A supplied count must match an exact - * Singularity instance type; the Singularity.D4_v3 fallback accepts 4. - * - * @param gpuCount the gpuCount value to set. - * @return the WorkbenchUpdateProperties object itself. - */ - public WorkbenchUpdateProperties withGpuCount(Integer gpuCount) { - this.gpuCount = gpuCount; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetClusterId", this.targetClusterId); - jsonWriter.writeStringField("idleTimeBeforeShutdown", this.idleTimeBeforeShutdown); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("gpuCount", this.gpuCount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkbenchUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkbenchUpdateProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkbenchUpdateProperties. - */ - public static WorkbenchUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkbenchUpdateProperties deserializedWorkbenchUpdateProperties = new WorkbenchUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetClusterId".equals(fieldName)) { - deserializedWorkbenchUpdateProperties.targetClusterId = reader.getString(); - } else if ("idleTimeBeforeShutdown".equals(fieldName)) { - deserializedWorkbenchUpdateProperties.idleTimeBeforeShutdown = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedWorkbenchUpdateProperties.instanceType = reader.getString(); - } else if ("gpuCount".equals(fieldName)) { - deserializedWorkbenchUpdateProperties.gpuCount = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkbenchUpdateProperties; - }); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/resources/META-INF/azure-resourcemanager-cognitiveservices_metadata.json b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/resources/META-INF/azure-resourcemanager-cognitiveservices_metadata.json index 10c61ec3eb62..ea33b93901e1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/resources/META-INF/azure-resourcemanager-cognitiveservices_metadata.json +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/resources/META-INF/azure-resourcemanager-cognitiveservices_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.CognitiveServices":"2026-09-15-preview"},"crossLanguagePackageId":"Microsoft.CognitiveServices","crossLanguageVersion":"2d5b65e6b610","crossLanguageDefinitions":{"com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.beginDelete":"Microsoft.CognitiveServices.CapabilityHosts.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.createOrUpdate":"Microsoft.CognitiveServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.delete":"Microsoft.CognitiveServices.CapabilityHosts.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.get":"Microsoft.CognitiveServices.CapabilityHosts.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.getWithResponse":"Microsoft.CognitiveServices.CapabilityHosts.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.list":"Microsoft.CognitiveServices.CapabilityHosts.list","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.create":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.createWithResponse":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.delete":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.deleteWithResponse":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.get":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.getWithResponse":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.list":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.list","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.update":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.updateWithResponse":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient":"Microsoft.CognitiveServices.Accounts","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.beginCreate":"Microsoft.CognitiveServices.Accounts.create","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.beginDelete":"Microsoft.CognitiveServices.Accounts.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.beginUpdate":"Microsoft.CognitiveServices.Accounts.update","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.create":"Microsoft.CognitiveServices.Accounts.create","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.delete":"Microsoft.CognitiveServices.Accounts.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.evaluateDeploymentPolicies":"Microsoft.CognitiveServices.Accounts.evaluateDeploymentPolicies","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.evaluateDeploymentPoliciesWithResponse":"Microsoft.CognitiveServices.Accounts.evaluateDeploymentPolicies","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.getByResourceGroup":"Microsoft.CognitiveServices.Accounts.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.CognitiveServices.Accounts.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.list":"Microsoft.CognitiveServices.Accounts.list","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listByResourceGroup":"Microsoft.CognitiveServices.Accounts.listByResourceGroup","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listKeys":"Microsoft.CognitiveServices.Accounts.listKeys","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listKeysWithResponse":"Microsoft.CognitiveServices.Accounts.listKeys","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listModels":"Microsoft.CognitiveServices.Accounts.listModels","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listSkus":"Microsoft.CognitiveServices.Accounts.listSkus","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listSkusWithResponse":"Microsoft.CognitiveServices.Accounts.listSkus","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listUsages":"Microsoft.CognitiveServices.Accounts.listUsages","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listUsagesWithResponse":"Microsoft.CognitiveServices.Accounts.listUsages","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.regenerateKey":"Microsoft.CognitiveServices.Accounts.regenerateKey","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.regenerateKeyWithResponse":"Microsoft.CognitiveServices.Accounts.regenerateKey","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.update":"Microsoft.CognitiveServices.Accounts.update","com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient":"Microsoft.CognitiveServices.AdapterDeployments","com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.AdapterDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient.beginDelete":"Microsoft.CognitiveServices.AdapterDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient.createOrUpdate":"Microsoft.CognitiveServices.AdapterDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient.delete":"Microsoft.CognitiveServices.AdapterDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient.get":"Microsoft.CognitiveServices.AdapterDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient.getWithResponse":"Microsoft.CognitiveServices.AdapterDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.AdapterDeploymentsClient.list":"Microsoft.CognitiveServices.AdapterDeployments.list","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient":"Microsoft.CognitiveServices.AgentApplications","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.AgentApplications.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.beginDelete":"Microsoft.CognitiveServices.AgentApplications.delete","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.createOrUpdate":"Microsoft.CognitiveServices.AgentApplications.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.delete":"Microsoft.CognitiveServices.AgentApplications.delete","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.disable":"Microsoft.CognitiveServices.AgentApplications.disable","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.disableWithResponse":"Microsoft.CognitiveServices.AgentApplications.disable","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.enable":"Microsoft.CognitiveServices.AgentApplications.enable","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.enableWithResponse":"Microsoft.CognitiveServices.AgentApplications.enable","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.get":"Microsoft.CognitiveServices.AgentApplications.get","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.getWithResponse":"Microsoft.CognitiveServices.AgentApplications.get","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.list":"Microsoft.CognitiveServices.AgentApplications.list","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.listAgents":"Microsoft.CognitiveServices.AgentApplications.listAgents","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.listAgentsWithResponse":"Microsoft.CognitiveServices.AgentApplications.listAgents","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.AgentDeploymentResources.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.beginDelete":"Microsoft.CognitiveServices.AgentDeploymentResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.createOrUpdate":"Microsoft.CognitiveServices.AgentDeploymentResources.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.delete":"Microsoft.CognitiveServices.AgentDeploymentResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.get":"Microsoft.CognitiveServices.AgentDeploymentResources.get","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.getWithResponse":"Microsoft.CognitiveServices.AgentDeploymentResources.get","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.list":"Microsoft.CognitiveServices.AgentDeploymentResources.list","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.start":"Microsoft.CognitiveServices.AgentDeploymentResources.start","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.startWithResponse":"Microsoft.CognitiveServices.AgentDeploymentResources.start","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.stop":"Microsoft.CognitiveServices.AgentDeploymentResources.stop","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.stopWithResponse":"Microsoft.CognitiveServices.AgentDeploymentResources.stop","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient":"Microsoft.CognitiveServices.ArcDeployments","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.ArcDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.beginDelete":"Microsoft.CognitiveServices.ArcDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.beginUpdate":"Microsoft.CognitiveServices.ArcDeployments.update","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.createOrUpdate":"Microsoft.CognitiveServices.ArcDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.delete":"Microsoft.CognitiveServices.ArcDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.get":"Microsoft.CognitiveServices.ArcDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.getWithResponse":"Microsoft.CognitiveServices.ArcDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.list":"Microsoft.CognitiveServices.ArcDeployments.list","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.update":"Microsoft.CognitiveServices.ArcDeployments.update","com.azure.resourcemanager.cognitiveservices.fluent.CognitiveServicesManagementClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient":"Microsoft.CognitiveServices.CommitmentPlans","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginCreateOrUpdateAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.createOrUpdateAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginCreateOrUpdatePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.createOrUpdatePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginDelete":"Microsoft.CognitiveServices.CommitmentPlans.delete","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginDeleteAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.deleteAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginDeletePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.deletePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginUpdatePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.updatePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.createOrUpdate":"Microsoft.CognitiveServices.CommitmentPlans.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.createOrUpdateAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.createOrUpdateAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.createOrUpdatePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.createOrUpdatePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.CommitmentPlans.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.delete":"Microsoft.CognitiveServices.CommitmentPlans.delete","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.deleteAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.deleteAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.deletePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.deletePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.get":"Microsoft.CognitiveServices.CommitmentPlans.get","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.getAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getAssociationWithResponse":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.getAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getByResourceGroup":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.getPlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getByResourceGroupWithResponse":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.getPlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getWithResponse":"Microsoft.CognitiveServices.CommitmentPlans.get","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.list":"Microsoft.CognitiveServices.CommitmentPlans.list","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.listAssociations":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.listAssociations","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.listByResourceGroup":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.listPlansByResourceGroup","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.listPlansBySubscription":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.listPlansBySubscription","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.updatePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.updatePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentTiersClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentTiersClient.list":"Microsoft.CognitiveServices.CommitmentTiersOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.ComputeOperationsClient":"Microsoft.CognitiveServices.ComputeOperations","com.azure.resourcemanager.cognitiveservices.fluent.ComputeOperationsClient.get":"Microsoft.CognitiveServices.ComputeOperations.get","com.azure.resourcemanager.cognitiveservices.fluent.ComputeOperationsClient.getWithResponse":"Microsoft.CognitiveServices.ComputeOperations.get","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient":"Microsoft.CognitiveServices.Computes","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.Computes.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginDelete":"Microsoft.CognitiveServices.Computes.delete","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginRestart":"Microsoft.CognitiveServices.Computes.restart","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginStart":"Microsoft.CognitiveServices.Computes.start","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginStop":"Microsoft.CognitiveServices.Computes.stop","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.createOrUpdate":"Microsoft.CognitiveServices.Computes.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.delete":"Microsoft.CognitiveServices.Computes.delete","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.get":"Microsoft.CognitiveServices.Computes.get","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.getWithResponse":"Microsoft.CognitiveServices.Computes.get","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.list":"Microsoft.CognitiveServices.Computes.list","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.restart":"Microsoft.CognitiveServices.Computes.restart","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.start":"Microsoft.CognitiveServices.Computes.start","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.stop":"Microsoft.CognitiveServices.Computes.stop","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient":"Microsoft.CognitiveServices.CostControls","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient.createOrUpdate":"Microsoft.CognitiveServices.CostControls.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.CostControls.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient.delete":"Microsoft.CognitiveServices.CostControls.delete","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient.deleteWithResponse":"Microsoft.CognitiveServices.CostControls.delete","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient.get":"Microsoft.CognitiveServices.CostControls.get","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient.getWithResponse":"Microsoft.CognitiveServices.CostControls.get","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient.list":"Microsoft.CognitiveServices.CostControls.list","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient.update":"Microsoft.CognitiveServices.CostControls.update","com.azure.resourcemanager.cognitiveservices.fluent.CostControlsClient.updateWithResponse":"Microsoft.CognitiveServices.CostControls.update","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient":"Microsoft.CognitiveServices.DefenderForAISettings","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.createOrUpdate":"Microsoft.CognitiveServices.DefenderForAISettings.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.DefenderForAISettings.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.get":"Microsoft.CognitiveServices.DefenderForAISettings.get","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.getWithResponse":"Microsoft.CognitiveServices.DefenderForAISettings.get","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.list":"Microsoft.CognitiveServices.DefenderForAISettings.list","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.update":"Microsoft.CognitiveServices.DefenderForAISettings.update","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.updateWithResponse":"Microsoft.CognitiveServices.DefenderForAISettings.update","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient":"Microsoft.CognitiveServices.DeletedAccounts","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.beginPurge":"Microsoft.CognitiveServices.DeletedAccounts.purge","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.get":"Microsoft.CognitiveServices.DeletedAccounts.get","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.getWithResponse":"Microsoft.CognitiveServices.DeletedAccounts.get","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.list":"Microsoft.CognitiveServices.DeletedAccounts.list","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.purge":"Microsoft.CognitiveServices.DeletedAccounts.purge","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient":"Microsoft.CognitiveServices.Deployments","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.Deployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.beginDelete":"Microsoft.CognitiveServices.Deployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.beginUpdate":"Microsoft.CognitiveServices.Deployments.update","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.createOrUpdate":"Microsoft.CognitiveServices.Deployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.delete":"Microsoft.CognitiveServices.Deployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.get":"Microsoft.CognitiveServices.Deployments.get","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.getWithResponse":"Microsoft.CognitiveServices.Deployments.get","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.list":"Microsoft.CognitiveServices.Deployments.list","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.listSkus":"Microsoft.CognitiveServices.Deployments.listSkus","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.pause":"Microsoft.CognitiveServices.Deployments.pause","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.pauseWithResponse":"Microsoft.CognitiveServices.Deployments.pause","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.resume":"Microsoft.CognitiveServices.Deployments.resume","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.resumeWithResponse":"Microsoft.CognitiveServices.Deployments.resume","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.update":"Microsoft.CognitiveServices.Deployments.update","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient":"Microsoft.CognitiveServices.EncryptionScopes","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.beginDelete":"Microsoft.CognitiveServices.EncryptionScopes.delete","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.createOrUpdate":"Microsoft.CognitiveServices.EncryptionScopes.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.EncryptionScopes.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.delete":"Microsoft.CognitiveServices.EncryptionScopes.delete","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.get":"Microsoft.CognitiveServices.EncryptionScopes.get","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.getWithResponse":"Microsoft.CognitiveServices.EncryptionScopes.get","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.list":"Microsoft.CognitiveServices.EncryptionScopes.list","com.azure.resourcemanager.cognitiveservices.fluent.LocationBasedModelCapacitiesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.LocationBasedModelCapacitiesClient.list":"Microsoft.CognitiveServices.LocationBasedModelCapacitiesOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeCapacitiesClient":"Microsoft.CognitiveServices.ManagedComputeCapacities","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeCapacitiesClient.list":"Microsoft.CognitiveServices.ManagedComputeCapacities.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient":"Microsoft.CognitiveServices.ManagedComputeDeployments","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.ManagedComputeDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.beginDelete":"Microsoft.CognitiveServices.ManagedComputeDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.beginUpdate":"Microsoft.CognitiveServices.ManagedComputeDeployments.update","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.createOrUpdate":"Microsoft.CognitiveServices.ManagedComputeDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.delete":"Microsoft.CognitiveServices.ManagedComputeDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.get":"Microsoft.CognitiveServices.ManagedComputeDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.getWithResponse":"Microsoft.CognitiveServices.ManagedComputeDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.list":"Microsoft.CognitiveServices.ManagedComputeDeployments.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.update":"Microsoft.CognitiveServices.ManagedComputeDeployments.update","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeUsagesOperationGroupsClient":"Microsoft.CognitiveServices.ManagedComputeUsagesOperationGroup","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeUsagesOperationGroupsClient.list":"Microsoft.CognitiveServices.ManagedComputeUsagesOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkProvisionsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkProvisionsClient.beginProvisionManagedNetwork":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.provisionManagedNetwork","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkProvisionsClient.provisionManagedNetwork":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.provisionManagedNetwork","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.beginDelete":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.beginPatch":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.beginPut":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.delete":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.get":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.getWithResponse":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.list":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.patch":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.put":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.cognitiveservices.fluent.ModelCapacitiesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ModelCapacitiesClient.list":"Microsoft.CognitiveServices.ModelCapacitiesOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.ModelsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ModelsClient.list":"Microsoft.CognitiveServices.ModelsOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.beginReconcile":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.reconcile","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.get":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.get","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.getWithResponse":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.get","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.list":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.list","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.reconcile":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.reconcile","com.azure.resourcemanager.cognitiveservices.fluent.OperationsClient":"Microsoft.CognitiveServices.Operations","com.azure.resourcemanager.cognitiveservices.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.beginDelete":"Microsoft.CognitiveServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.createOrUpdate":"Microsoft.CognitiveServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.delete":"Microsoft.CognitiveServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.get":"Microsoft.CognitiveServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.getWithResponse":"Microsoft.CognitiveServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.list":"Microsoft.CognitiveServices.OutboundRuleBasicResources.list","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesOperationsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesOperationsClient.post":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.post","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient":"Microsoft.CognitiveServices.PrivateEndpointConnections","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.CognitiveServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.createOrUpdate":"Microsoft.CognitiveServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.CognitiveServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.CognitiveServices.PrivateEndpointConnections.get","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.CognitiveServices.PrivateEndpointConnections.get","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.CognitiveServices.PrivateEndpointConnections.list","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.listWithResponse":"Microsoft.CognitiveServices.PrivateEndpointConnections.list","com.azure.resourcemanager.cognitiveservices.fluent.PrivateLinkResourcesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.PrivateLinkResourcesClient.list":"Microsoft.CognitiveServices.Accounts.privateLinkResourcesList","com.azure.resourcemanager.cognitiveservices.fluent.PrivateLinkResourcesClient.listWithResponse":"Microsoft.CognitiveServices.Accounts.privateLinkResourcesList","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient":"Microsoft.CognitiveServices.ProjectCapabilityHosts","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.ProjectCapabilityHosts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.beginDelete":"Microsoft.CognitiveServices.ProjectCapabilityHosts.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.createOrUpdate":"Microsoft.CognitiveServices.ProjectCapabilityHosts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.delete":"Microsoft.CognitiveServices.ProjectCapabilityHosts.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.get":"Microsoft.CognitiveServices.ProjectCapabilityHosts.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.getWithResponse":"Microsoft.CognitiveServices.ProjectCapabilityHosts.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.list":"Microsoft.CognitiveServices.ProjectCapabilityHosts.list","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient":"Microsoft.CognitiveServices.ProjectConnections","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.create":"Microsoft.CognitiveServices.ProjectConnections.create","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.createWithResponse":"Microsoft.CognitiveServices.ProjectConnections.create","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.delete":"Microsoft.CognitiveServices.ProjectConnections.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.deleteWithResponse":"Microsoft.CognitiveServices.ProjectConnections.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.get":"Microsoft.CognitiveServices.ProjectConnections.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.getWithResponse":"Microsoft.CognitiveServices.ProjectConnections.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.list":"Microsoft.CognitiveServices.ProjectConnections.list","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.update":"Microsoft.CognitiveServices.ProjectConnections.update","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.updateWithResponse":"Microsoft.CognitiveServices.ProjectConnections.update","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient":"Microsoft.CognitiveServices.Projects","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.beginCreate":"Microsoft.CognitiveServices.Projects.create","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.beginDelete":"Microsoft.CognitiveServices.Projects.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.beginUpdate":"Microsoft.CognitiveServices.Projects.update","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.create":"Microsoft.CognitiveServices.Projects.create","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.delete":"Microsoft.CognitiveServices.Projects.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.get":"Microsoft.CognitiveServices.Projects.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.getWithResponse":"Microsoft.CognitiveServices.Projects.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.list":"Microsoft.CognitiveServices.Projects.list","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.update":"Microsoft.CognitiveServices.Projects.update","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient":"Microsoft.CognitiveServices.QuotaTiers","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.createOrUpdate":"Microsoft.CognitiveServices.QuotaTiers.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.QuotaTiers.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.get":"Microsoft.CognitiveServices.QuotaTiers.get","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.getWithResponse":"Microsoft.CognitiveServices.QuotaTiers.get","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.list":"Microsoft.CognitiveServices.QuotaTiers.listBySubscription","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.update":"Microsoft.CognitiveServices.QuotaTiers.update","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.updateWithResponse":"Microsoft.CognitiveServices.QuotaTiers.update","com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient":"Microsoft.CognitiveServices.RaiBindings","com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient.createOrUpdate":"Microsoft.CognitiveServices.RaiBindings.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiBindings.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient.delete":"Microsoft.CognitiveServices.RaiBindings.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient.deleteWithResponse":"Microsoft.CognitiveServices.RaiBindings.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient.get":"Microsoft.CognitiveServices.RaiBindings.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient.getWithResponse":"Microsoft.CognitiveServices.RaiBindings.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBindingsClient.list":"Microsoft.CognitiveServices.RaiBindings.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient":"Microsoft.CognitiveServices.RaiBlocklistItems","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.batchAdd":"Microsoft.CognitiveServices.RaiBlocklists.batchAdd","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.batchAddWithResponse":"Microsoft.CognitiveServices.RaiBlocklists.batchAdd","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.batchDelete":"Microsoft.CognitiveServices.RaiBlocklists.batchDelete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.batchDeleteWithResponse":"Microsoft.CognitiveServices.RaiBlocklists.batchDelete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.beginDelete":"Microsoft.CognitiveServices.RaiBlocklistItems.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.createOrUpdate":"Microsoft.CognitiveServices.RaiBlocklistItems.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiBlocklistItems.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.delete":"Microsoft.CognitiveServices.RaiBlocklistItems.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.get":"Microsoft.CognitiveServices.RaiBlocklistItems.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.getWithResponse":"Microsoft.CognitiveServices.RaiBlocklistItems.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.list":"Microsoft.CognitiveServices.RaiBlocklistItems.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient":"Microsoft.CognitiveServices.RaiBlocklists","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.beginDelete":"Microsoft.CognitiveServices.RaiBlocklists.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.createOrUpdate":"Microsoft.CognitiveServices.RaiBlocklists.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiBlocklists.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.delete":"Microsoft.CognitiveServices.RaiBlocklists.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.get":"Microsoft.CognitiveServices.RaiBlocklists.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.getWithResponse":"Microsoft.CognitiveServices.RaiBlocklists.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.list":"Microsoft.CognitiveServices.RaiBlocklists.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiContentFiltersClient":"Microsoft.CognitiveServices.RaiContentFilters","com.azure.resourcemanager.cognitiveservices.fluent.RaiContentFiltersClient.get":"Microsoft.CognitiveServices.RaiContentFilters.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiContentFiltersClient.getWithResponse":"Microsoft.CognitiveServices.RaiContentFilters.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiContentFiltersClient.list":"Microsoft.CognitiveServices.RaiContentFilters.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.beginDelete":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.createOrUpdate":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.delete":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.get":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.getWithResponse":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersOperationsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersOperationsClient.list":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient":"Microsoft.CognitiveServices.RaiPolicies","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.beginDelete":"Microsoft.CognitiveServices.RaiPolicies.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.createOrUpdate":"Microsoft.CognitiveServices.RaiPolicies.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiPolicies.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.delete":"Microsoft.CognitiveServices.RaiPolicies.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.get":"Microsoft.CognitiveServices.RaiPolicies.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.getWithResponse":"Microsoft.CognitiveServices.RaiPolicies.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.list":"Microsoft.CognitiveServices.RaiPolicies.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient":"Microsoft.CognitiveServices.RaiRegos","com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient.createOrUpdate":"Microsoft.CognitiveServices.RaiRegos.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiRegos.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient.delete":"Microsoft.CognitiveServices.RaiRegos.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient.deleteWithResponse":"Microsoft.CognitiveServices.RaiRegos.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient.get":"Microsoft.CognitiveServices.RaiRegos.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient.getWithResponse":"Microsoft.CognitiveServices.RaiRegos.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiRegosClient.list":"Microsoft.CognitiveServices.RaiRegos.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient":"Microsoft.CognitiveServices.RaiToolLabels","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.beginDelete":"Microsoft.CognitiveServices.RaiToolLabels.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.createOrUpdate":"Microsoft.CognitiveServices.RaiToolLabels.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiToolLabels.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.delete":"Microsoft.CognitiveServices.RaiToolLabels.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.get":"Microsoft.CognitiveServices.RaiToolLabels.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.getWithResponse":"Microsoft.CognitiveServices.RaiToolLabels.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.list":"Microsoft.CognitiveServices.RaiToolLabels.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient":"Microsoft.CognitiveServices.RaiTopics","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.beginDelete":"Microsoft.CognitiveServices.RaiTopics.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.createOrUpdate":"Microsoft.CognitiveServices.RaiTopics.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiTopics.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.delete":"Microsoft.CognitiveServices.RaiTopics.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.get":"Microsoft.CognitiveServices.RaiTopics.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.getWithResponse":"Microsoft.CognitiveServices.RaiTopics.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.list":"Microsoft.CognitiveServices.RaiTopics.list","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.calculateModelCapacity":"Microsoft.CognitiveServices.calculateModelCapacity","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.calculateModelCapacityWithResponse":"Microsoft.CognitiveServices.calculateModelCapacity","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.checkDomainAvailability":"Microsoft.CognitiveServices.checkDomainAvailability","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.checkDomainAvailabilityWithResponse":"Microsoft.CognitiveServices.checkDomainAvailability","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.checkSkuAvailability":"Microsoft.CognitiveServices.checkSkuAvailability","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.checkSkuAvailabilityWithResponse":"Microsoft.CognitiveServices.checkSkuAvailability","com.azure.resourcemanager.cognitiveservices.fluent.ResourceSkusClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ResourceSkusClient.list":"Microsoft.CognitiveServices.ResourceSkusOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient":"Microsoft.CognitiveServices.SubscriptionRaiPolicy","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.beginDelete":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.delete","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.createOrUpdate":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.delete":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.delete","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.get":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.get","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.getWithResponse":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.get","com.azure.resourcemanager.cognitiveservices.fluent.TestRaiExternalSafetyProvidersClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.TestRaiExternalSafetyProvidersClient.createOrUpdate":"Microsoft.CognitiveServices.Accounts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.TestRaiExternalSafetyProvidersClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.Accounts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.UsagesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.UsagesClient.list":"Microsoft.CognitiveServices.UsagesOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient":"Microsoft.CognitiveServices.Workbenches","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.Workbenches.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginDelete":"Microsoft.CognitiveServices.Workbenches.delete","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginRestart":"Microsoft.CognitiveServices.Workbenches.restart","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginStart":"Microsoft.CognitiveServices.Workbenches.start","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginStop":"Microsoft.CognitiveServices.Workbenches.stop","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.createOrUpdate":"Microsoft.CognitiveServices.Workbenches.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.delete":"Microsoft.CognitiveServices.Workbenches.delete","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.get":"Microsoft.CognitiveServices.Workbenches.get","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.getWithResponse":"Microsoft.CognitiveServices.Workbenches.get","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.list":"Microsoft.CognitiveServices.Workbenches.list","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.restart":"Microsoft.CognitiveServices.Workbenches.restart","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.start":"Microsoft.CognitiveServices.Workbenches.start","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.stop":"Microsoft.CognitiveServices.Workbenches.stop","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.update":"Microsoft.CognitiveServices.Workbenches.update","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.updateWithResponse":"Microsoft.CognitiveServices.Workbenches.update","com.azure.resourcemanager.cognitiveservices.fluent.models.AccountInner":"Microsoft.CognitiveServices.Account","com.azure.resourcemanager.cognitiveservices.fluent.models.AccountModelInner":"Microsoft.CognitiveServices.AccountModel","com.azure.resourcemanager.cognitiveservices.fluent.models.AccountSkuListResultInner":"Microsoft.CognitiveServices.AccountSkuListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner":"Microsoft.CognitiveServices.AdapterDeployment","com.azure.resourcemanager.cognitiveservices.fluent.models.AgentApplicationInner":"Microsoft.CognitiveServices.AgentApplication","com.azure.resourcemanager.cognitiveservices.fluent.models.AgentDeploymentInner":"Microsoft.CognitiveServices.AgentDeployment","com.azure.resourcemanager.cognitiveservices.fluent.models.AgentReferenceResourceArmPaginatedResultInner":"Microsoft.CognitiveServices.AgentReferenceResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.fluent.models.ApiKeysInner":"Microsoft.CognitiveServices.ApiKeys","com.azure.resourcemanager.cognitiveservices.fluent.models.ArcDeploymentInner":"Microsoft.CognitiveServices.ArcDeployment","com.azure.resourcemanager.cognitiveservices.fluent.models.CalculateModelCapacityResultInner":"Microsoft.CognitiveServices.CalculateModelCapacityResult","com.azure.resourcemanager.cognitiveservices.fluent.models.CapabilityHostInner":"Microsoft.CognitiveServices.CapabilityHost","com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentPlanAccountAssociationInner":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociation","com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentPlanAccountAssociationProperties":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociationProperties","com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentPlanInner":"Microsoft.CognitiveServices.CommitmentPlan","com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentTierInner":"Microsoft.CognitiveServices.CommitmentTier","com.azure.resourcemanager.cognitiveservices.fluent.models.ComputeInner":"Microsoft.CognitiveServices.Compute","com.azure.resourcemanager.cognitiveservices.fluent.models.ComputeOperationStatusInner":"Microsoft.CognitiveServices.ComputeOperationStatus","com.azure.resourcemanager.cognitiveservices.fluent.models.ConnectionPropertiesV2BasicResourceInner":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResource","com.azure.resourcemanager.cognitiveservices.fluent.models.CostControlInner":"Microsoft.CognitiveServices.CostControl","com.azure.resourcemanager.cognitiveservices.fluent.models.DefenderForAISettingInner":"Microsoft.CognitiveServices.DefenderForAISetting","com.azure.resourcemanager.cognitiveservices.fluent.models.DefenderForAISettingProperties":"Microsoft.CognitiveServices.DefenderForAISettingProperties","com.azure.resourcemanager.cognitiveservices.fluent.models.DeploymentInner":"Microsoft.CognitiveServices.Deployment","com.azure.resourcemanager.cognitiveservices.fluent.models.DomainAvailabilityInner":"Microsoft.CognitiveServices.DomainAvailability","com.azure.resourcemanager.cognitiveservices.fluent.models.EncryptionScopeInner":"Microsoft.CognitiveServices.EncryptionScope","com.azure.resourcemanager.cognitiveservices.fluent.models.EvaluateDeploymentPoliciesResponseInner":"Microsoft.CognitiveServices.EvaluateDeploymentPoliciesResponse","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeCapacityInner":"Microsoft.CognitiveServices.ManagedComputeCapacity","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeDeploymentInner":"Microsoft.CognitiveServices.ManagedComputeDeployment","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeUsageInner":"Microsoft.CognitiveServices.ManagedComputeUsage","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedNetworkProvisionStatusInner":"Microsoft.CognitiveServices.ManagedNetworkProvisionStatus","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedNetworkSettingsBasicResourceInner":"Microsoft.CognitiveServices.ManagedNetworkSettingsBasicResource","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedNetworkSettingsInner":"Microsoft.CognitiveServices.ManagedNetworkSettings","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResource","com.azure.resourcemanager.cognitiveservices.fluent.models.ModelCapacityListResultValueItemInner":"Microsoft.CognitiveServices.ModelCapacityListResultValueItem","com.azure.resourcemanager.cognitiveservices.fluent.models.ModelInner":"Microsoft.CognitiveServices.Model","com.azure.resourcemanager.cognitiveservices.fluent.models.NetworkSecurityPerimeterConfigurationInner":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfiguration","com.azure.resourcemanager.cognitiveservices.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.cognitiveservices.fluent.models.OutboundRuleBasicResourceInner":"Microsoft.CognitiveServices.OutboundRuleBasicResource","com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateEndpointConnectionInner":"Microsoft.CognitiveServices.PrivateEndpointConnection","com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateEndpointConnectionListResultInner":"Microsoft.CognitiveServices.PrivateEndpointConnectionListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateLinkResourceListResultInner":"Microsoft.CognitiveServices.PrivateLinkResourceListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.ProjectCapabilityHostInner":"Microsoft.CognitiveServices.ProjectCapabilityHost","com.azure.resourcemanager.cognitiveservices.fluent.models.ProjectInner":"Microsoft.CognitiveServices.Project","com.azure.resourcemanager.cognitiveservices.fluent.models.QuotaTierInner":"Microsoft.CognitiveServices.QuotaTier","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner":"Microsoft.CognitiveServices.RaiBinding","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBlocklistInner":"Microsoft.CognitiveServices.RaiBlocklist","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBlocklistItemInner":"Microsoft.CognitiveServices.RaiBlocklistItem","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiContentFilterInner":"Microsoft.CognitiveServices.RaiContentFilter","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiExternalSafetyProviderSchemaInner":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchema","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiPolicyInner":"Microsoft.CognitiveServices.RaiPolicy","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner":"Microsoft.CognitiveServices.RaiRego","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiToolLabelInner":"Microsoft.CognitiveServices.RaiToolLabel","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiTopicInner":"Microsoft.CognitiveServices.RaiTopic","com.azure.resourcemanager.cognitiveservices.fluent.models.ResourceSkuInner":"Microsoft.CognitiveServices.ResourceSku","com.azure.resourcemanager.cognitiveservices.fluent.models.SkuAvailabilityListResultInner":"Microsoft.CognitiveServices.SkuAvailabilityListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.SkuResourceInner":"Microsoft.CognitiveServices.SkuResource","com.azure.resourcemanager.cognitiveservices.fluent.models.UsageInner":"Microsoft.CognitiveServices.Usage","com.azure.resourcemanager.cognitiveservices.fluent.models.UsageListResultInner":"Microsoft.CognitiveServices.UsageListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.WorkbenchInner":"Microsoft.CognitiveServices.Workbench","com.azure.resourcemanager.cognitiveservices.implementation.CognitiveServicesManagementClientBuilder":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.implementation.models.AccountListResult":"Microsoft.CognitiveServices.AccountListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.AccountModelListResult":"Microsoft.CognitiveServices.AccountModelListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.AdapterDeploymentListResult":"Microsoft.CognitiveServices.AdapterDeploymentListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.AgentApplicationResourceArmPaginatedResult":"Microsoft.CognitiveServices.AgentApplicationResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.AgentDeploymentResourceArmPaginatedResult":"Microsoft.CognitiveServices.AgentDeploymentResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ArcDeploymentListResult":"Microsoft.CognitiveServices.ArcDeploymentListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.CapabilityHostResourceArmPaginatedResult":"Microsoft.CognitiveServices.CapabilityHostResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.CommitmentPlanAccountAssociationListResult":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociationListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.CommitmentPlanListResult":"Microsoft.CognitiveServices.CommitmentPlanListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.CommitmentTierListResult":"Microsoft.CognitiveServices.CommitmentTierListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ComputeListResult":"Microsoft.CognitiveServices.ComputeListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ConnectionPropertiesV2BasicResourceArmPaginatedResult":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.CostControlListResult":"Microsoft.CognitiveServices.CostControlListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.DefenderForAISettingResult":"Microsoft.CognitiveServices.DefenderForAISettingResult","com.azure.resourcemanager.cognitiveservices.implementation.models.DeploymentListResult":"Microsoft.CognitiveServices.DeploymentListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.DeploymentSkuListResult":"Microsoft.CognitiveServices.DeploymentSkuListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.EncryptionScopeListResult":"Microsoft.CognitiveServices.EncryptionScopeListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedComputeCapacityListResult":"Microsoft.CognitiveServices.ManagedComputeCapacityListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedComputeDeploymentListResult":"Microsoft.CognitiveServices.ManagedComputeDeploymentListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedComputeUsageListResult":"Microsoft.CognitiveServices.ManagedComputeUsageListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedNetworkListResult":"Microsoft.CognitiveServices.ManagedNetworkListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ModelCapacityListResult":"Microsoft.CognitiveServices.ModelCapacityListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ModelListResult":"Microsoft.CognitiveServices.ModelListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.NetworkSecurityPerimeterConfigurationList":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurationList","com.azure.resourcemanager.cognitiveservices.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.OutboundRuleListResult":"Microsoft.CognitiveServices.OutboundRuleListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ProjectCapabilityHostResourceArmPaginatedResult":"Microsoft.CognitiveServices.ProjectCapabilityHostResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ProjectListResult":"Microsoft.CognitiveServices.ProjectListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.QuotaTierListResult":"Microsoft.CognitiveServices.QuotaTierListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiBindingListResult":"Microsoft.CognitiveServices.RaiBindingListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiBlockListItemsResult":"Microsoft.CognitiveServices.RaiBlockListItemsResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiBlockListResult":"Microsoft.CognitiveServices.RaiBlockListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiContentFilterListResult":"Microsoft.CognitiveServices.RaiContentFilterListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiExternalSafetyProviderResult":"Microsoft.CognitiveServices.RaiExternalSafetyProviderResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiPolicyListResult":"Microsoft.CognitiveServices.RaiPolicyListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiRegoListResult":"Microsoft.CognitiveServices.RaiRegoListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiToolLabelResult":"Microsoft.CognitiveServices.RaiToolLabelResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiTopicResult":"Microsoft.CognitiveServices.RaiTopicResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ResourceSkuListResult":"Microsoft.CognitiveServices.ResourceSkuListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.WorkbenchListResult":"Microsoft.CognitiveServices.WorkbenchListResult","com.azure.resourcemanager.cognitiveservices.models.AadAuthTypeConnectionProperties":"Microsoft.CognitiveServices.AADAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.AbusePenalty":"Microsoft.CognitiveServices.AbusePenalty","com.azure.resourcemanager.cognitiveservices.models.AbusePenaltyAction":"Microsoft.CognitiveServices.AbusePenaltyAction","com.azure.resourcemanager.cognitiveservices.models.AccessKeyAuthTypeConnectionProperties":"Microsoft.CognitiveServices.AccessKeyAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.AccountKeyAuthTypeConnectionProperties":"Microsoft.CognitiveServices.AccountKeyAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.AccountProperties":"Microsoft.CognitiveServices.AccountProperties","com.azure.resourcemanager.cognitiveservices.models.AccountSku":"Microsoft.CognitiveServices.AccountSku","com.azure.resourcemanager.cognitiveservices.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentLastOperation":"Microsoft.CognitiveServices.AdapterDeploymentLastOperation","com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentOperationState":"Microsoft.CognitiveServices.AdapterDeploymentOperationState","com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentOperationType":"Microsoft.CognitiveServices.AdapterDeploymentOperationType","com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentProperties":"Microsoft.CognitiveServices.AdapterDeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentsGetHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.AgentDeploymentProperties":"Microsoft.CognitiveServices.AgentDeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.AgentDeploymentProvisioningState":"Microsoft.CognitiveServices.AgentDeploymentProvisioningState","com.azure.resourcemanager.cognitiveservices.models.AgentDeploymentState":"Microsoft.CognitiveServices.AgentDeploymentState","com.azure.resourcemanager.cognitiveservices.models.AgentDeploymentType":"Microsoft.CognitiveServices.AgentDeploymentType","com.azure.resourcemanager.cognitiveservices.models.AgentHostingConfiguration":"Microsoft.CognitiveServices.AgentHostingConfiguration","com.azure.resourcemanager.cognitiveservices.models.AgentHostingType":"Microsoft.CognitiveServices.AgentHostingType","com.azure.resourcemanager.cognitiveservices.models.AgentProtocol":"Microsoft.CognitiveServices.AgentProtocol","com.azure.resourcemanager.cognitiveservices.models.AgentProtocolVersion":"Microsoft.CognitiveServices.AgentProtocolVersion","com.azure.resourcemanager.cognitiveservices.models.AgentReference":"Microsoft.CognitiveServices.AgentReference","com.azure.resourcemanager.cognitiveservices.models.AgentReferenceProperties":"Microsoft.CognitiveServices.AgentReferenceProperties","com.azure.resourcemanager.cognitiveservices.models.AgenticApplicationProperties":"Microsoft.CognitiveServices.AgenticApplicationProperties","com.azure.resourcemanager.cognitiveservices.models.AgenticApplicationProvisioningState":"Microsoft.CognitiveServices.AgenticApplicationProvisioningState","com.azure.resourcemanager.cognitiveservices.models.ApiKeyAuthConnectionProperties":"Microsoft.CognitiveServices.ApiKeyAuthConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.ApiProperties":"Microsoft.CognitiveServices.ApiProperties","com.azure.resourcemanager.cognitiveservices.models.ApplicationAuthorizationPolicy":"Microsoft.CognitiveServices.ApplicationAuthorizationPolicy","com.azure.resourcemanager.cognitiveservices.models.ApplicationTrafficRoutingPolicy":"Microsoft.CognitiveServices.ApplicationTrafficRoutingPolicy","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentComputeType":"Microsoft.CognitiveServices.ArcDeploymentComputeType","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentCpuMemoryResourceRequirements":"Microsoft.CognitiveServices.ArcDeploymentCpuMemoryResourceRequirements","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentKubernetesResources":"Microsoft.CognitiveServices.ArcDeploymentKubernetesResources","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentModel":"Microsoft.CognitiveServices.ArcDeploymentModel","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentPatchCpuMemoryResourceRequirements":"Microsoft.CognitiveServices.ArcDeploymentPatchCpuMemoryResourceRequirements","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentPatchKubernetesResources":"Microsoft.CognitiveServices.ArcDeploymentPatchKubernetesResources","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentProperties":"Microsoft.CognitiveServices.ArcDeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentProvisioningDetails":"Microsoft.CognitiveServices.ArcDeploymentProvisioningDetails","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentResourceRequirements":"Microsoft.CognitiveServices.ArcDeploymentResourceRequirements","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentRuntime":"Microsoft.CognitiveServices.ArcDeploymentRuntime","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentSku":"Microsoft.CognitiveServices.ArcDeploymentSku","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentSkuName":"Microsoft.CognitiveServices.ArcDeploymentSkuName","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentUpdate":"Microsoft.CognitiveServices.ArcDeploymentUpdate","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentUpdateProperties":"Microsoft.CognitiveServices.ArcDeploymentUpdateProperties","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentVllmParameters":"Microsoft.CognitiveServices.ArcDeploymentVllmParameters","com.azure.resourcemanager.cognitiveservices.models.AssignedIdentity":"Microsoft.CognitiveServices.AssignedIdentity","com.azure.resourcemanager.cognitiveservices.models.BillingMeterInfo":"Microsoft.CognitiveServices.BillingMeterInfo","com.azure.resourcemanager.cognitiveservices.models.BuiltInAuthorizationScheme":"Microsoft.CognitiveServices.BuiltInAuthorizationScheme","com.azure.resourcemanager.cognitiveservices.models.ByPassSelection":"Microsoft.CognitiveServices.ByPassSelection","com.azure.resourcemanager.cognitiveservices.models.CalculateModelCapacityParameter":"Microsoft.CognitiveServices.CalculateModelCapacityParameter","com.azure.resourcemanager.cognitiveservices.models.CalculateModelCapacityResultEstimatedCapacity":"Microsoft.CognitiveServices.CalculateModelCapacityResultEstimatedCapacity","com.azure.resourcemanager.cognitiveservices.models.CallRateLimit":"Microsoft.CognitiveServices.CallRateLimit","com.azure.resourcemanager.cognitiveservices.models.CapabilityHostKind":"Microsoft.CognitiveServices.CapabilityHostKind","com.azure.resourcemanager.cognitiveservices.models.CapabilityHostProperties":"Microsoft.CognitiveServices.CapabilityHostProperties","com.azure.resourcemanager.cognitiveservices.models.CapabilityHostProvisioningState":"Microsoft.CognitiveServices.CapabilityHostProvisioningState","com.azure.resourcemanager.cognitiveservices.models.CapabilitySettings":"Microsoft.CognitiveServices.CapabilitySettings","com.azure.resourcemanager.cognitiveservices.models.CapacityConfig":"Microsoft.CognitiveServices.CapacityConfig","com.azure.resourcemanager.cognitiveservices.models.ChannelsBuiltInAuthorizationPolicy":"Microsoft.CognitiveServices.ChannelsBuiltInAuthorizationPolicy","com.azure.resourcemanager.cognitiveservices.models.CheckDomainAvailabilityParameter":"Microsoft.CognitiveServices.CheckDomainAvailabilityParameter","com.azure.resourcemanager.cognitiveservices.models.CheckSkuAvailabilityParameter":"Microsoft.CognitiveServices.CheckSkuAvailabilityParameter","com.azure.resourcemanager.cognitiveservices.models.ClusterComputeProperties":"Microsoft.CognitiveServices.ClusterComputeProperties","com.azure.resourcemanager.cognitiveservices.models.CommitmentCost":"Microsoft.CognitiveServices.CommitmentCost","com.azure.resourcemanager.cognitiveservices.models.CommitmentPeriod":"Microsoft.CognitiveServices.CommitmentPeriod","com.azure.resourcemanager.cognitiveservices.models.CommitmentPlanAssociation":"Microsoft.CognitiveServices.CommitmentPlanAssociation","com.azure.resourcemanager.cognitiveservices.models.CommitmentPlanProperties":"Microsoft.CognitiveServices.CommitmentPlanProperties","com.azure.resourcemanager.cognitiveservices.models.CommitmentPlanProvisioningState":"Microsoft.CognitiveServices.CommitmentPlanProvisioningState","com.azure.resourcemanager.cognitiveservices.models.CommitmentQuota":"Microsoft.CognitiveServices.CommitmentQuota","com.azure.resourcemanager.cognitiveservices.models.ComputeOperationStatusProperties":"Microsoft.CognitiveServices.ComputeOperationStatusProperties","com.azure.resourcemanager.cognitiveservices.models.ComputeOperationStatusType":"Microsoft.CognitiveServices.ComputeOperationStatusType","com.azure.resourcemanager.cognitiveservices.models.ComputeProperties":"Microsoft.CognitiveServices.ComputeProperties","com.azure.resourcemanager.cognitiveservices.models.ComputeProvisioningState":"Microsoft.CognitiveServices.ComputeProvisioningState","com.azure.resourcemanager.cognitiveservices.models.ComputeType":"Microsoft.CognitiveServices.ComputeType","com.azure.resourcemanager.cognitiveservices.models.ConnectionAccessKey":"Microsoft.CognitiveServices.ConnectionAccessKey","com.azure.resourcemanager.cognitiveservices.models.ConnectionAccountKey":"Microsoft.CognitiveServices.ConnectionAccountKey","com.azure.resourcemanager.cognitiveservices.models.ConnectionApiKey":"Microsoft.CognitiveServices.ConnectionApiKey","com.azure.resourcemanager.cognitiveservices.models.ConnectionAuthType":"Microsoft.CognitiveServices.ConnectionAuthType","com.azure.resourcemanager.cognitiveservices.models.ConnectionCategory":"Microsoft.CognitiveServices.ConnectionCategory","com.azure.resourcemanager.cognitiveservices.models.ConnectionGroup":"Microsoft.CognitiveServices.ConnectionGroup","com.azure.resourcemanager.cognitiveservices.models.ConnectionManagedIdentity":"Microsoft.CognitiveServices.ConnectionManagedIdentity","com.azure.resourcemanager.cognitiveservices.models.ConnectionOAuth2":"Microsoft.CognitiveServices.ConnectionOAuth2","com.azure.resourcemanager.cognitiveservices.models.ConnectionPersonalAccessToken":"Microsoft.CognitiveServices.ConnectionPersonalAccessToken","com.azure.resourcemanager.cognitiveservices.models.ConnectionPropertiesV2":"Microsoft.CognitiveServices.ConnectionPropertiesV2","com.azure.resourcemanager.cognitiveservices.models.ConnectionServicePrincipal":"Microsoft.CognitiveServices.ConnectionServicePrincipal","com.azure.resourcemanager.cognitiveservices.models.ConnectionSharedAccessSignature":"Microsoft.CognitiveServices.ConnectionSharedAccessSignature","com.azure.resourcemanager.cognitiveservices.models.ConnectionUpdateContent":"Microsoft.CognitiveServices.ConnectionUpdateContent","com.azure.resourcemanager.cognitiveservices.models.ConnectionUsernamePassword":"Microsoft.CognitiveServices.ConnectionUsernamePassword","com.azure.resourcemanager.cognitiveservices.models.ConnectivityEndpoints":"Microsoft.CognitiveServices.ConnectivityEndpoints","com.azure.resourcemanager.cognitiveservices.models.ContainerInstanceComputeProperties":"Microsoft.CognitiveServices.ContainerInstanceComputeProperties","com.azure.resourcemanager.cognitiveservices.models.ContentLevel":"Microsoft.CognitiveServices.ContentLevel","com.azure.resourcemanager.cognitiveservices.models.CostControlConnections":"Microsoft.CognitiveServices.CostControlConnections","com.azure.resourcemanager.cognitiveservices.models.CostControlDimension":"Microsoft.CognitiveServices.CostControlDimension","com.azure.resourcemanager.cognitiveservices.models.CostControlDimensionType":"Microsoft.CognitiveServices.CostControlDimensionType","com.azure.resourcemanager.cognitiveservices.models.CostControlMatch":"Microsoft.CognitiveServices.CostControlMatch","com.azure.resourcemanager.cognitiveservices.models.CostControlPatch":"Microsoft.CognitiveServices.CostControlPatch","com.azure.resourcemanager.cognitiveservices.models.CostControlPatchProperties":"Microsoft.CognitiveServices.CostControlPatchProperties","com.azure.resourcemanager.cognitiveservices.models.CostControlPeriod":"Microsoft.CognitiveServices.CostControlPeriod","com.azure.resourcemanager.cognitiveservices.models.CostControlProperties":"Microsoft.CognitiveServices.CostControlProperties","com.azure.resourcemanager.cognitiveservices.models.CostControlRule":"Microsoft.CognitiveServices.CostControlRule","com.azure.resourcemanager.cognitiveservices.models.CostControlThreshold":"Microsoft.CognitiveServices.CostControlThreshold","com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdAction":"Microsoft.CognitiveServices.CostControlThresholdAction","com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdType":"Microsoft.CognitiveServices.CostControlThresholdType","com.azure.resourcemanager.cognitiveservices.models.CostControlUnit":"Microsoft.CognitiveServices.CostControlUnit","com.azure.resourcemanager.cognitiveservices.models.CostControlsCreateOrUpdateHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.CostControlsGetHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.CostControlsUpdateHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.CustomBlocklistConfig":"Microsoft.CognitiveServices.CustomBlocklistConfig","com.azure.resourcemanager.cognitiveservices.models.CustomKeys":"Microsoft.CognitiveServices.CustomKeys","com.azure.resourcemanager.cognitiveservices.models.CustomKeysConnectionProperties":"Microsoft.CognitiveServices.CustomKeysConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.DefenderForAISettingState":"Microsoft.CognitiveServices.DefenderForAISettingState","com.azure.resourcemanager.cognitiveservices.models.DeploymentCapacitySettings":"Microsoft.CognitiveServices.DeploymentCapacitySettings","com.azure.resourcemanager.cognitiveservices.models.DeploymentModel":"Microsoft.CognitiveServices.DeploymentModel","com.azure.resourcemanager.cognitiveservices.models.DeploymentModelVersionUpgradeOption":"Microsoft.CognitiveServices.DeploymentModelVersionUpgradeOption","com.azure.resourcemanager.cognitiveservices.models.DeploymentPolicyEvaluationResult":"Microsoft.CognitiveServices.DeploymentPolicyEvaluationResult","com.azure.resourcemanager.cognitiveservices.models.DeploymentProperties":"Microsoft.CognitiveServices.DeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.DeploymentProvisioningState":"Microsoft.CognitiveServices.DeploymentProvisioningState","com.azure.resourcemanager.cognitiveservices.models.DeploymentRouting":"Microsoft.CognitiveServices.DeploymentRouting","com.azure.resourcemanager.cognitiveservices.models.DeploymentScaleSettings":"Microsoft.CognitiveServices.DeploymentScaleSettings","com.azure.resourcemanager.cognitiveservices.models.DeploymentScaleType":"Microsoft.CognitiveServices.DeploymentScaleType","com.azure.resourcemanager.cognitiveservices.models.DeploymentSizeCapacity":"Microsoft.CognitiveServices.DeploymentSizeCapacity","com.azure.resourcemanager.cognitiveservices.models.DeploymentSpeculativeDecoding":"Microsoft.CognitiveServices.DeploymentSpeculativeDecoding","com.azure.resourcemanager.cognitiveservices.models.DeploymentState":"Microsoft.CognitiveServices.DeploymentState","com.azure.resourcemanager.cognitiveservices.models.DeprecationStatus":"Microsoft.CognitiveServices.DeprecationStatus","com.azure.resourcemanager.cognitiveservices.models.Encryption":"Microsoft.CognitiveServices.Encryption","com.azure.resourcemanager.cognitiveservices.models.EncryptionScopeProperties":"Microsoft.CognitiveServices.EncryptionScopeProperties","com.azure.resourcemanager.cognitiveservices.models.EncryptionScopeProvisioningState":"Microsoft.CognitiveServices.EncryptionScopeProvisioningState","com.azure.resourcemanager.cognitiveservices.models.EncryptionScopeState":"Microsoft.CognitiveServices.EncryptionScopeState","com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesDeployment":"Microsoft.CognitiveServices.EvaluateDeploymentPoliciesDeployment","com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesDeploymentProperties":"Microsoft.CognitiveServices.EvaluateDeploymentPoliciesDeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesRequest":"Microsoft.CognitiveServices.EvaluateDeploymentPoliciesRequest","com.azure.resourcemanager.cognitiveservices.models.FirewallSku":"Microsoft.CognitiveServices.FirewallSku","com.azure.resourcemanager.cognitiveservices.models.FoundryAutoUpgrade":"Microsoft.CognitiveServices.FoundryAutoUpgrade","com.azure.resourcemanager.cognitiveservices.models.FoundryAutoUpgradeMode":"Microsoft.CognitiveServices.FoundryAutoUpgradeMode","com.azure.resourcemanager.cognitiveservices.models.FqdnOutboundRule":"Microsoft.CognitiveServices.FqdnOutboundRule","com.azure.resourcemanager.cognitiveservices.models.GatedModelAccessProperties":"Microsoft.CognitiveServices.GatedModelAccessProperties","com.azure.resourcemanager.cognitiveservices.models.HostedAgentDeployment":"Microsoft.CognitiveServices.HostedAgentDeployment","com.azure.resourcemanager.cognitiveservices.models.HostingModel":"Microsoft.CognitiveServices.HostingModel","com.azure.resourcemanager.cognitiveservices.models.Identity":"Microsoft.CognitiveServices.Identity","com.azure.resourcemanager.cognitiveservices.models.IdentityKind":"Microsoft.CognitiveServices.IdentityKind","com.azure.resourcemanager.cognitiveservices.models.IdentityManagementType":"Microsoft.CognitiveServices.IdentityManagementType","com.azure.resourcemanager.cognitiveservices.models.IdentityProvisioningState":"Microsoft.CognitiveServices.IdentityProvisioningState","com.azure.resourcemanager.cognitiveservices.models.IpRule":"Microsoft.CognitiveServices.IpRule","com.azure.resourcemanager.cognitiveservices.models.IsolationMode":"Microsoft.CognitiveServices.IsolationMode","com.azure.resourcemanager.cognitiveservices.models.KeyName":"Microsoft.CognitiveServices.KeyName","com.azure.resourcemanager.cognitiveservices.models.KeySource":"Microsoft.CognitiveServices.KeySource","com.azure.resourcemanager.cognitiveservices.models.KeyVaultProperties":"Microsoft.CognitiveServices.KeyVaultProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedAgentDeployment":"Microsoft.CognitiveServices.ManagedAgentDeployment","com.azure.resourcemanager.cognitiveservices.models.ManagedClusterAgentHostingConfiguration":"Microsoft.CognitiveServices.ManagedClusterAgentHostingConfiguration","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeCapacityProperties":"Microsoft.CognitiveServices.ManagedComputeCapacityProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentInfo":"Microsoft.CognitiveServices.ManagedComputeDeploymentInfo","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties":"Microsoft.CognitiveServices.ManagedComputeDeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProvisioningDetails":"Microsoft.CognitiveServices.ManagedComputeDeploymentProvisioningDetails","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentRoutes":"Microsoft.CognitiveServices.ManagedComputeDeploymentRoutes","com.azure.resourcemanager.cognitiveservices.models.ManagedIdentityAuthTypeConnectionProperties":"Microsoft.CognitiveServices.ManagedIdentityAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkKind":"Microsoft.CognitiveServices.ManagedNetworkKind","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkProvisionOptions":"Microsoft.CognitiveServices.ManagedNetworkProvisionOptions","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkProvisioningState":"Microsoft.CognitiveServices.ManagedNetworkProvisioningState","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkSettingsEx":"Microsoft.CognitiveServices.ManagedNetworkSettingsEx","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkSettingsProperties":"Microsoft.CognitiveServices.ManagedNetworkSettingsProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkStatus":"Microsoft.CognitiveServices.ManagedNetworkStatus","com.azure.resourcemanager.cognitiveservices.models.ManagedPERequirement":"Microsoft.CognitiveServices.ManagedPERequirement","com.azure.resourcemanager.cognitiveservices.models.ManagedPEStatus":"Microsoft.CognitiveServices.ManagedPEStatus","com.azure.resourcemanager.cognitiveservices.models.MetricName":"Microsoft.CognitiveServices.MetricName","com.azure.resourcemanager.cognitiveservices.models.ModelCapacityCalculatorWorkload":"Microsoft.CognitiveServices.ModelCapacityCalculatorWorkload","com.azure.resourcemanager.cognitiveservices.models.ModelCapacityCalculatorWorkloadRequestParam":"Microsoft.CognitiveServices.ModelCapacityCalculatorWorkloadRequestParam","com.azure.resourcemanager.cognitiveservices.models.ModelDeprecationInfo":"Microsoft.CognitiveServices.ModelDeprecationInfo","com.azure.resourcemanager.cognitiveservices.models.ModelLifecycleStatus":"Microsoft.CognitiveServices.ModelLifecycleStatus","com.azure.resourcemanager.cognitiveservices.models.ModelSku":"Microsoft.CognitiveServices.ModelSku","com.azure.resourcemanager.cognitiveservices.models.ModelSkuCapacityProperties":"Microsoft.CognitiveServices.ModelSkuCapacityProperties","com.azure.resourcemanager.cognitiveservices.models.MultiRegionSettings":"Microsoft.CognitiveServices.MultiRegionSettings","com.azure.resourcemanager.cognitiveservices.models.NetworkInjection":"Microsoft.CognitiveServices.NetworkInjection","com.azure.resourcemanager.cognitiveservices.models.NetworkRuleAction":"Microsoft.CognitiveServices.NetworkRuleAction","com.azure.resourcemanager.cognitiveservices.models.NetworkRuleSet":"Microsoft.CognitiveServices.NetworkRuleSet","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeter":"Microsoft.CognitiveServices.NetworkSecurityPerimeter","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterAccessRule":"Microsoft.CognitiveServices.NetworkSecurityPerimeterAccessRule","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterAccessRuleProperties":"Microsoft.CognitiveServices.NetworkSecurityPerimeterAccessRuleProperties","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem":"Microsoft.CognitiveServices.NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterConfigurationAssociationInfo":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurationAssociationInfo","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterConfigurationProperties":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurationProperties","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterProfileInfo":"Microsoft.CognitiveServices.NetworkSecurityPerimeterProfileInfo","com.azure.resourcemanager.cognitiveservices.models.NoneAuthTypeConnectionProperties":"Microsoft.CognitiveServices.NoneAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.NspAccessRuleDirection":"Microsoft.CognitiveServices.NspAccessRuleDirection","com.azure.resourcemanager.cognitiveservices.models.OAuth2AuthTypeConnectionProperties":"Microsoft.CognitiveServices.OAuth2AuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.cognitiveservices.models.OrganizationSharedBuiltInAuthorizationPolicy":"Microsoft.CognitiveServices.OrganizationSharedBuiltInAuthorizationPolicy","com.azure.resourcemanager.cognitiveservices.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.cognitiveservices.models.OutboundRule":"Microsoft.CognitiveServices.OutboundRule","com.azure.resourcemanager.cognitiveservices.models.PatAuthTypeConnectionProperties":"Microsoft.CognitiveServices.PATAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.PatchResourceSku":"Microsoft.CognitiveServices.PatchResourceSku","com.azure.resourcemanager.cognitiveservices.models.PatchResourceTags":"Microsoft.CognitiveServices.PatchResourceTags","com.azure.resourcemanager.cognitiveservices.models.PatchResourceTagsAndSku":"Microsoft.CognitiveServices.PatchResourceTagsAndSku","com.azure.resourcemanager.cognitiveservices.models.PolicyAssignmentEvaluationDetails":"Microsoft.CognitiveServices.PolicyAssignmentEvaluationDetails","com.azure.resourcemanager.cognitiveservices.models.PolicyEvaluationOutcome":"Microsoft.CognitiveServices.PolicyEvaluationOutcome","com.azure.resourcemanager.cognitiveservices.models.PolicyExpressionEvaluationDetails":"Microsoft.CognitiveServices.PolicyExpressionEvaluationDetails","com.azure.resourcemanager.cognitiveservices.models.Pool":"Microsoft.CognitiveServices.Pool","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpoint":"Azure.ResourceManager.CommonTypes.PrivateEndpoint","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnectionProperties":"Microsoft.CognitiveServices.PrivateEndpointConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnectionProvisioningState":"Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointOutboundRule":"Microsoft.CognitiveServices.PrivateEndpointOutboundRule","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointOutboundRuleDestination":"Microsoft.CognitiveServices.PrivateEndpointOutboundRuleDestination","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointServiceConnectionStatus":"Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus","com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResource":"Microsoft.CognitiveServices.PrivateLinkResource","com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResourceProperties":"Microsoft.CognitiveServices.PrivateLinkResourceProperties","com.azure.resourcemanager.cognitiveservices.models.PrivateLinkServiceConnectionState":"Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState","com.azure.resourcemanager.cognitiveservices.models.ProjectCapabilityHostProperties":"Microsoft.CognitiveServices.ProjectCapabilityHostProperties","com.azure.resourcemanager.cognitiveservices.models.ProjectProperties":"Microsoft.CognitiveServices.ProjectProperties","com.azure.resourcemanager.cognitiveservices.models.ProvisioningIssue":"Microsoft.CognitiveServices.ProvisioningIssue","com.azure.resourcemanager.cognitiveservices.models.ProvisioningIssueProperties":"Microsoft.CognitiveServices.ProvisioningIssueProperties","com.azure.resourcemanager.cognitiveservices.models.ProvisioningState":"Microsoft.CognitiveServices.ProvisioningState","com.azure.resourcemanager.cognitiveservices.models.PublicNetworkAccess":"Microsoft.CognitiveServices.PublicNetworkAccess","com.azure.resourcemanager.cognitiveservices.models.QuotaLimit":"Microsoft.CognitiveServices.QuotaLimit","com.azure.resourcemanager.cognitiveservices.models.QuotaScopeType":"Microsoft.CognitiveServices.QuotaScopeType","com.azure.resourcemanager.cognitiveservices.models.QuotaTierProperties":"Microsoft.CognitiveServices.QuotaTierProperties","com.azure.resourcemanager.cognitiveservices.models.QuotaTierUpgradeEligibilityInfo":"Microsoft.CognitiveServices.QuotaTierUpgradeEligibilityInfo","com.azure.resourcemanager.cognitiveservices.models.QuotaUsageStatus":"Microsoft.CognitiveServices.QuotaUsageStatus","com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject":"Microsoft.CognitiveServices.RaiAcsEmptyObject","com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory":"Microsoft.CognitiveServices.RaiAcsHarmCategory","com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration":"Microsoft.CognitiveServices.RaiAcsHarmConfiguration","com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint":"Microsoft.CognitiveServices.RaiAcsInterventionPoint","com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoints":"Microsoft.CognitiveServices.RaiAcsInterventionPoints","com.azure.resourcemanager.cognitiveservices.models.RaiAcsManifest":"Microsoft.CognitiveServices.RaiAcsManifest","com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension":"Microsoft.CognitiveServices.RaiAcsModerationBindingExtension","com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat":"Microsoft.CognitiveServices.RaiAcsModerationSubjectFormat","com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding":"Microsoft.CognitiveServices.RaiAcsPolicyBinding","com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType":"Microsoft.CognitiveServices.RaiAcsPolicyDefinitionType","com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget":"Microsoft.CognitiveServices.RaiAcsPolicyTarget","com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind":"Microsoft.CognitiveServices.RaiAcsPolicyTargetKind","com.azure.resourcemanager.cognitiveservices.models.RaiAcsRegoPolicyDefinition":"Microsoft.CognitiveServices.RaiAcsRegoPolicyDefinition","com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolDefinition":"Microsoft.CognitiveServices.RaiAcsToolDefinition","com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint":"Microsoft.CognitiveServices.RaiAcsToolInterventionPoint","com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector":"Microsoft.CognitiveServices.RaiAcsToolNameSelector","com.azure.resourcemanager.cognitiveservices.models.RaiActionType":"Microsoft.CognitiveServices.RaiActionType","com.azure.resourcemanager.cognitiveservices.models.RaiBindingProperties":"Microsoft.CognitiveServices.RaiBindingProperties","com.azure.resourcemanager.cognitiveservices.models.RaiBindingsCreateOrUpdateHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.RaiBindingsGetHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistConfig":"Microsoft.CognitiveServices.RaiBlocklistConfig","com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistItemBulkRequest":"Microsoft.CognitiveServices.RaiBlocklistItemBulkRequest","com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistItemProperties":"Microsoft.CognitiveServices.RaiBlocklistItemProperties","com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistProperties":"Microsoft.CognitiveServices.RaiBlocklistProperties","com.azure.resourcemanager.cognitiveservices.models.RaiContentFilterProperties":"Microsoft.CognitiveServices.RaiContentFilterProperties","com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction":"Microsoft.CognitiveServices.RaiEgressDefaultAction","com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderOperation":"Microsoft.CognitiveServices.RaiEgressHeaderOperation","com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderTransform":"Microsoft.CognitiveServices.RaiEgressHeaderTransform","com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderValueRef":"Microsoft.CognitiveServices.RaiEgressHeaderValueRef","com.azure.resourcemanager.cognitiveservices.models.RaiEgressManagedIdentityRef":"Microsoft.CognitiveServices.RaiEgressManagedIdentityRef","com.azure.resourcemanager.cognitiveservices.models.RaiEgressMode":"Microsoft.CognitiveServices.RaiEgressMode","com.azure.resourcemanager.cognitiveservices.models.RaiEgressPolicyConfig":"Microsoft.CognitiveServices.RaiEgressPolicyConfig","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRewriteTarget":"Microsoft.CognitiveServices.RaiEgressRewriteTarget","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRule":"Microsoft.CognitiveServices.RaiEgressRule","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleAction":"Microsoft.CognitiveServices.RaiEgressRuleAction","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleActionType":"Microsoft.CognitiveServices.RaiEgressRuleActionType","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleMatch":"Microsoft.CognitiveServices.RaiEgressRuleMatch","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleType":"Microsoft.CognitiveServices.RaiEgressRuleType","com.azure.resourcemanager.cognitiveservices.models.RaiEgressScheme":"Microsoft.CognitiveServices.RaiEgressScheme","com.azure.resourcemanager.cognitiveservices.models.RaiEgressSecretRef":"Microsoft.CognitiveServices.RaiEgressSecretRef","com.azure.resourcemanager.cognitiveservices.models.RaiExternalSafetyProviderSchemaProperties":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemaProperties","com.azure.resourcemanager.cognitiveservices.models.RaiMonitorConfig":"Microsoft.CognitiveServices.RaiMonitorConfig","com.azure.resourcemanager.cognitiveservices.models.RaiPoliciesCreateOrUpdateHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.RaiPoliciesGetHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentFilter":"Microsoft.CognitiveServices.RaiPolicyContentFilter","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource":"Microsoft.CognitiveServices.RaiPolicyContentSource","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyCustomExternalSafetyProviderReference":"Microsoft.CognitiveServices.RaiPolicyCustomExternalSafetyProviderReference","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat":"Microsoft.CognitiveServices.RaiPolicyFormat","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode":"Microsoft.CognitiveServices.RaiPolicyMode","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyProperties":"Microsoft.CognitiveServices.RaiPolicyProperties","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyType":"Microsoft.CognitiveServices.RaiPolicyType","com.azure.resourcemanager.cognitiveservices.models.RaiRegoEncoding":"Microsoft.CognitiveServices.RaiRegoEncoding","com.azure.resourcemanager.cognitiveservices.models.RaiRegoProperties":"Microsoft.CognitiveServices.RaiRegoProperties","com.azure.resourcemanager.cognitiveservices.models.RaiRegoReference":"Microsoft.CognitiveServices.RaiRegoReference","com.azure.resourcemanager.cognitiveservices.models.RaiRegosCreateOrUpdateHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.RaiRegosGetHeaders":null,"com.azure.resourcemanager.cognitiveservices.models.RaiSafetyProviderConfig":"Microsoft.CognitiveServices.RaiSafetyProviderConfig","com.azure.resourcemanager.cognitiveservices.models.RaiToolLabelProperties":"Microsoft.CognitiveServices.RaiToolLabelProperties","com.azure.resourcemanager.cognitiveservices.models.RaiToolLabelPropertiesAccountScope":"Microsoft.CognitiveServices.RaiToolLabelPropertiesAccountScope","com.azure.resourcemanager.cognitiveservices.models.RaiToolLabelPropertiesProjectScopesItem":"Microsoft.CognitiveServices.RaiToolLabelPropertiesProjectScopesItem","com.azure.resourcemanager.cognitiveservices.models.RaiTopicProperties":"Microsoft.CognitiveServices.RaiTopicProperties","com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameters":"Microsoft.CognitiveServices.RegenerateKeyParameters","com.azure.resourcemanager.cognitiveservices.models.RegionSetting":"Microsoft.CognitiveServices.RegionSetting","com.azure.resourcemanager.cognitiveservices.models.ReplacementConfig":"Microsoft.CognitiveServices.ReplacementConfig","com.azure.resourcemanager.cognitiveservices.models.RequestMatchPattern":"Microsoft.CognitiveServices.RequestMatchPattern","com.azure.resourcemanager.cognitiveservices.models.ResourceBase":"Microsoft.CognitiveServices.ResourceBase","com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType":"Microsoft.CognitiveServices.ResourceIdentityType","com.azure.resourcemanager.cognitiveservices.models.ResourceSkuRestrictionInfo":"Microsoft.CognitiveServices.ResourceSkuRestrictionInfo","com.azure.resourcemanager.cognitiveservices.models.ResourceSkuRestrictions":"Microsoft.CognitiveServices.ResourceSkuRestrictions","com.azure.resourcemanager.cognitiveservices.models.ResourceSkuRestrictionsReasonCode":"Microsoft.CognitiveServices.ResourceSkuRestrictionsReasonCode","com.azure.resourcemanager.cognitiveservices.models.ResourceSkuRestrictionsType":"Microsoft.CognitiveServices.ResourceSkuRestrictionsType","com.azure.resourcemanager.cognitiveservices.models.RoleBasedBuiltInAuthorizationPolicy":"Microsoft.CognitiveServices.RoleBasedBuiltInAuthorizationPolicy","com.azure.resourcemanager.cognitiveservices.models.RoutingMethods":"Microsoft.CognitiveServices.RoutingMethods","com.azure.resourcemanager.cognitiveservices.models.RoutingMode":"Microsoft.CognitiveServices.RoutingMode","com.azure.resourcemanager.cognitiveservices.models.RuleAction":"Microsoft.CognitiveServices.RuleAction","com.azure.resourcemanager.cognitiveservices.models.RuleCategory":"Microsoft.CognitiveServices.RuleCategory","com.azure.resourcemanager.cognitiveservices.models.RuleStatus":"Microsoft.CognitiveServices.RuleStatus","com.azure.resourcemanager.cognitiveservices.models.RuleType":"Microsoft.CognitiveServices.RuleType","com.azure.resourcemanager.cognitiveservices.models.SafetyProviderConfig":"Microsoft.CognitiveServices.SafetyProviderConfig","com.azure.resourcemanager.cognitiveservices.models.SasAuthTypeConnectionProperties":"Microsoft.CognitiveServices.SASAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.ScenarioType":"Microsoft.CognitiveServices.ScenarioType","com.azure.resourcemanager.cognitiveservices.models.ServicePrincipalAuthTypeConnectionProperties":"Microsoft.CognitiveServices.ServicePrincipalAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.ServiceTagOutboundRule":"Microsoft.CognitiveServices.ServiceTagOutboundRule","com.azure.resourcemanager.cognitiveservices.models.ServiceTagOutboundRuleDestination":"Microsoft.CognitiveServices.ServiceTagOutboundRuleDestination","com.azure.resourcemanager.cognitiveservices.models.ServiceTier":"Microsoft.CognitiveServices.ServiceTier","com.azure.resourcemanager.cognitiveservices.models.Sku":"Microsoft.CognitiveServices.Sku","com.azure.resourcemanager.cognitiveservices.models.SkuAvailability":"Microsoft.CognitiveServices.SkuAvailability","com.azure.resourcemanager.cognitiveservices.models.SkuCapability":"Microsoft.CognitiveServices.SkuCapability","com.azure.resourcemanager.cognitiveservices.models.SkuChangeInfo":"Microsoft.CognitiveServices.SkuChangeInfo","com.azure.resourcemanager.cognitiveservices.models.SkuTier":"Microsoft.CognitiveServices.SkuTier","com.azure.resourcemanager.cognitiveservices.models.SshSettings":"Microsoft.CognitiveServices.SshSettings","com.azure.resourcemanager.cognitiveservices.models.ThrottlingRule":"Microsoft.CognitiveServices.ThrottlingRule","com.azure.resourcemanager.cognitiveservices.models.TierUpgradePolicy":"Microsoft.CognitiveServices.TierUpgradePolicy","com.azure.resourcemanager.cognitiveservices.models.TrafficRoutingProtocol":"Microsoft.CognitiveServices.TrafficRoutingProtocol","com.azure.resourcemanager.cognitiveservices.models.TrafficRoutingRule":"Microsoft.CognitiveServices.TrafficRoutingRule","com.azure.resourcemanager.cognitiveservices.models.UnitType":"Microsoft.CognitiveServices.UnitType","com.azure.resourcemanager.cognitiveservices.models.UpgradeAvailabilityStatus":"Microsoft.CognitiveServices.UpgradeAvailabilityStatus","com.azure.resourcemanager.cognitiveservices.models.UserAssignedIdentity":"Microsoft.CognitiveServices.UserAssignedIdentity","com.azure.resourcemanager.cognitiveservices.models.UserOwnedAmlWorkspace":"Microsoft.CognitiveServices.UserOwnedAmlWorkspace","com.azure.resourcemanager.cognitiveservices.models.UserOwnedStorage":"Microsoft.CognitiveServices.UserOwnedStorage","com.azure.resourcemanager.cognitiveservices.models.UsernamePasswordAuthTypeConnectionProperties":"Microsoft.CognitiveServices.UsernamePasswordAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.VersionedAgentReference":"Microsoft.CognitiveServices.VersionedAgentReference","com.azure.resourcemanager.cognitiveservices.models.VirtualNetworkRule":"Microsoft.CognitiveServices.VirtualNetworkRule","com.azure.resourcemanager.cognitiveservices.models.VmPriority":"Microsoft.CognitiveServices.VmPriority","com.azure.resourcemanager.cognitiveservices.models.WorkbenchProperties":"Microsoft.CognitiveServices.WorkbenchProperties","com.azure.resourcemanager.cognitiveservices.models.WorkbenchProvisioningState":"Microsoft.CognitiveServices.WorkbenchProvisioningState","com.azure.resourcemanager.cognitiveservices.models.WorkbenchStatus":"Microsoft.CognitiveServices.WorkbenchStatus","com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdate":"Microsoft.CognitiveServices.WorkbenchUpdate","com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdateProperties":"Microsoft.CognitiveServices.WorkbenchUpdateProperties"},"generatedFiles":["src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountCapabilityHostsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountConnectionsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AdapterDeploymentsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AgentApplicationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AgentDeploymentsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ArcDeploymentsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentPlansClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentTiersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ComputeOperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ComputesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CostControlsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DefenderForAISettingsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeletedAccountsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeploymentsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/EncryptionScopesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/LocationBasedModelCapacitiesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeCapacitiesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeDeploymentsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeUsagesOperationGroupsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedNetworkProvisionsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedNetworkSettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ModelCapacitiesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ModelsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/NetworkSecurityPerimeterConfigurationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OutboundRulesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OutboundRulesOperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ProjectCapabilityHostsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ProjectConnectionsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ProjectsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/QuotaTiersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiBindingsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiBlocklistItemsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiBlocklistsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiContentFiltersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiExternalSafetyProvidersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiExternalSafetyProvidersOperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiRegosClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiToolLabelsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiTopicsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceProvidersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/SubscriptionRaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/TestRaiExternalSafetyProvidersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/WorkbenchesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountModelInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountSkuListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AdapterDeploymentInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AgentApplicationInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AgentDeploymentInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AgentReferenceResourceArmPaginatedResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ApiKeysInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ArcDeploymentInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CalculateModelCapacityResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CapabilityHostInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanAccountAssociationInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanAccountAssociationProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentTierInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeOperationStatusInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ConnectionPropertiesV2BasicResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CostControlInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DefenderForAISettingInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DefenderForAISettingProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DeploymentInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DomainAvailabilityInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/EncryptionScopeInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/EvaluateDeploymentPoliciesResponseInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeCapacityInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeDeploymentInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeUsageInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedNetworkProvisionStatusInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedNetworkSettingsBasicResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedNetworkSettingsInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedNetworkSettingsPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ModelCapacityListResultValueItemInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ModelInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OutboundRuleBasicResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ProjectCapabilityHostInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ProjectInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/QuotaTierInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiBindingInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiBlocklistInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiBlocklistItemInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiContentFilterInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiExternalSafetyProviderSchemaInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiPolicyInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiRegoInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiToolLabelInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiTopicInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ResourceSkuInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/SkuAvailabilityListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/SkuResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/WorkbenchInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/package-info.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountCapabilityHostsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountCapabilityHostsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountConnectionsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountModelImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountSkuListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AdapterDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentApplicationImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentApplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentApplicationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentDeploymentImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentReferenceResourceArmPaginatedResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ApiKeysImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ArcDeploymentImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ArcDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ArcDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CalculateModelCapacityResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CapabilityHostImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlanAccountAssociationImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlanImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTierImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeOperationStatusImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeOperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ConnectionPropertiesV2BasicResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CostControlsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DefenderForAISettingImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DefenderForAISettingsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DefenderForAISettingsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DomainAvailabilityImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EncryptionScopeImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EncryptionScopesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EncryptionScopesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EvaluateDeploymentPoliciesResponseImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/LocationBasedModelCapacitiesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/LocationBasedModelCapacitiesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacityImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeUsageImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeUsagesOperationGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeUsagesOperationGroupsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkProvisionStatusImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkProvisionsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkProvisionsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsOperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelCapacitiesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelCapacitiesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelCapacityListResultValueItemImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/NetworkSecurityPerimeterConfigurationImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/NetworkSecurityPerimeterConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRuleBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRulesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRulesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRulesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRulesOperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourceListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectCapabilityHostImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectCapabilityHostsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectCapabilityHostsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectConnectionsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/QuotaTierImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/QuotaTiersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/QuotaTiersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBindingsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistItemImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistItemsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistItemsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiContentFilterImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiContentFiltersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiContentFiltersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProviderSchemaImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProvidersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProvidersOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProvidersOperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPolicyImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegoImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiRegosImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiToolLabelImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiToolLabelsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiToolLabelsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiTopicImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiTopicsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiTopicsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkuImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/SkuAvailabilityListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/SkuResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/SubscriptionRaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/SubscriptionRaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/TestRaiExternalSafetyProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/TestRaiExternalSafetyProvidersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsageImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsageListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsagesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AccountListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AccountModelListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AdapterDeploymentListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AgentApplicationResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AgentDeploymentResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ArcDeploymentListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CapabilityHostResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CommitmentPlanAccountAssociationListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CommitmentPlanListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CommitmentTierListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ComputeListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ConnectionPropertiesV2BasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CostControlListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/DefenderForAISettingResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/DeploymentListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/DeploymentSkuListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/EncryptionScopeListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ManagedComputeCapacityListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ManagedComputeDeploymentListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ManagedComputeUsageListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ManagedNetworkListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ModelCapacityListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ModelListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/NetworkSecurityPerimeterConfigurationList.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/OutboundRuleListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ProjectCapabilityHostResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ProjectListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/QuotaTierListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiBindingListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiBlockListItemsResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiBlockListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiContentFilterListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiExternalSafetyProviderResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiPolicyListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiRegoListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiToolLabelResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiTopicResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ResourceSkuListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/WorkbenchListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/package-info.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AadAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AbusePenalty.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AbusePenaltyAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccessKeyAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Account.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountCapabilityHosts.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountConnections.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountKeyAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountSkuListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Accounts.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ActionType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentLastOperation.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentOperationType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeployments.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AdapterDeploymentsGetResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentApplication.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentApplications.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeploymentProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeploymentState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeploymentType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeployments.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentHostingConfiguration.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentHostingType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentProtocol.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentProtocolVersion.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentReference.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentReferenceProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentReferenceResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgenticApplicationProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgenticApplicationProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiKeyAuthConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiKeys.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApplicationAuthorizationPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApplicationTrafficRoutingPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentComputeType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentCpuMemoryResourceRequirements.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentKubernetesResources.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentModel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentPatchCpuMemoryResourceRequirements.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentPatchKubernetesResources.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentProvisioningDetails.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentResourceRequirements.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentRuntime.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentSkuName.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentUpdate.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentUpdateProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentVllmParameters.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeployments.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AssignedIdentity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/BillingMeterInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/BuiltInAuthorizationScheme.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ByPassSelection.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CalculateModelCapacityParameter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CalculateModelCapacityResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CalculateModelCapacityResultEstimatedCapacity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CallRateLimit.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilityHost.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilityHostKind.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilityHostProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilityHostProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilitySettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapacityConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ChannelsBuiltInAuthorizationPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckDomainAvailabilityParameter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckSkuAvailabilityParameter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ClusterComputeProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentCost.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPeriod.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlan.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanAccountAssociation.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanAssociation.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlans.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentQuota.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTier.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTiers.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Compute.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeOperationStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeOperationStatusProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeOperationStatusType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeOperations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Computes.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionAccessKey.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionAccountKey.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionApiKey.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionAuthType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionCategory.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionGroup.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionManagedIdentity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionOAuth2.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionPersonalAccessToken.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionPropertiesV2.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionPropertiesV2BasicResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionServicePrincipal.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionSharedAccessSignature.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionUpdateContent.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionUsernamePassword.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectivityEndpoints.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ContainerInstanceComputeProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ContentLevel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlConnections.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimension.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlDimensionType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlMatch.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatch.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPatchProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlPeriod.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThreshold.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlThresholdType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlUnit.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControls.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsCreateOrUpdateResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsGetResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CostControlsUpdateResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CustomBlocklistConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CustomKeys.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CustomKeysConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DefenderForAISetting.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DefenderForAISettingState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DefenderForAISettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeletedAccounts.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Deployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentCapacitySettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentModel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentModelVersionUpgradeOption.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentPolicyEvaluationResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentRouting.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentScaleSettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentScaleType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentSizeCapacity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentSpeculativeDecoding.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Deployments.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeprecationStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DomainAvailability.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Encryption.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScope.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScopeProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScopeProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScopeState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScopes.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EvaluateDeploymentPoliciesDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EvaluateDeploymentPoliciesDeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EvaluateDeploymentPoliciesRequest.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EvaluateDeploymentPoliciesResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/FirewallSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/FoundryAutoUpgrade.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/FoundryAutoUpgradeMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/FqdnOutboundRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/GatedModelAccessProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/HostedAgentDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/HostingModel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IdentityKind.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IdentityManagementType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IdentityProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IpRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IsolationMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeyName.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeySource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/LocationBasedModelCapacities.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedAgentDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedClusterAgentHostingConfiguration.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeCapacities.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeCapacity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeCapacityProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentProvisioningDetails.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentRoutes.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeployments.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeUsage.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeUsagesOperationGroups.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedIdentityAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkKind.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkProvisionOptions.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkProvisionStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkProvisions.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsBasicResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsEx.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsOperations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedPERequirement.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedPEStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/MetricName.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Model.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelCapacities.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelCapacityCalculatorWorkload.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelCapacityCalculatorWorkloadRequestParam.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelCapacityListResultValueItem.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelDeprecationInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelLifecycleStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelSkuCapacityProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Models.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/MultiRegionSettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkInjection.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkRuleAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterAccessRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterAccessRuleProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterConfiguration.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterConfigurationAssociationInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterConfigurations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterProfileInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NoneAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NspAccessRuleDirection.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OAuth2AuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Operation.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Operations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OrganizationSharedBuiltInAuthorizationPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Origin.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OutboundRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OutboundRuleBasicResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OutboundRules.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OutboundRulesOperations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PatAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PatchResourceSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PatchResourceTags.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PatchResourceTagsAndSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PolicyAssignmentEvaluationDetails.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PolicyEvaluationOutcome.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PolicyExpressionEvaluationDetails.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Pool.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointOutboundRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointOutboundRuleDestination.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Project.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectCapabilityHost.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectCapabilityHostProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectCapabilityHosts.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectConnections.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Projects.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaLimit.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaScopeType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaTier.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaTierProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaTierUpgradeEligibilityInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaTiers.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaUsageStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsEmptyObject.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmCategory.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsHarmConfiguration.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoint.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsInterventionPoints.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsManifest.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationBindingExtension.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsModerationSubjectFormat.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyBinding.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyDefinitionType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTarget.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsPolicyTargetKind.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsRegoPolicyDefinition.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolDefinition.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolInterventionPoint.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiAcsToolNameSelector.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiActionType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBinding.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsCreateOrUpdateResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBindingsGetResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklist.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistItem.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistItemBulkRequest.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistItemProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistItems.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklists.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiContentFilter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiContentFilterProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiContentFilters.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressDefaultAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressHeaderOperation.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressHeaderTransform.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressHeaderValueRef.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressManagedIdentityRef.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressPolicyConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRewriteTarget.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRuleAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRuleActionType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRuleMatch.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRuleType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressScheme.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressSecretRef.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiExternalSafetyProviderSchema.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiExternalSafetyProviderSchemaProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiExternalSafetyProviders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiExternalSafetyProvidersOperations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiMonitorConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicies.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesCreateOrUpdateResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPoliciesGetResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyContentFilter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyContentSource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyCustomExternalSafetyProviderReference.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyFormat.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRego.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoEncoding.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegoReference.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegos.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosCreateOrUpdateResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetHeaders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiRegosGetResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiSafetyProviderConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabelProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabelPropertiesAccountScope.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabelPropertiesProjectScopesItem.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabels.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiTopic.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiTopicProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiTopics.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RegenerateKeyParameters.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RegionSetting.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ReplacementConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RequestMatchPattern.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceBase.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceProviders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictions.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionsReasonCode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionsType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RoleBasedBuiltInAuthorizationPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RoutingMethods.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RoutingMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RuleAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RuleCategory.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RuleStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RuleType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SafetyProviderConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SasAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ScenarioType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ServicePrincipalAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ServiceTagOutboundRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ServiceTagOutboundRuleDestination.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ServiceTier.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Sku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuAvailability.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuAvailabilityListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuCapability.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuChangeInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuTier.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SshSettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SubscriptionRaiPolicies.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/TestRaiExternalSafetyProviders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ThrottlingRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/TierUpgradePolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/TrafficRoutingProtocol.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/TrafficRoutingRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UnitType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UpgradeAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UsageListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usages.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserOwnedAmlWorkspace.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserOwnedStorage.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UsernamePasswordAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/VersionedAgentReference.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/VirtualNetworkRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/VmPriority.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Workbench.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdate.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchUpdateProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Workbenches.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/package-info.java","src/main/java/com/azure/resourcemanager/cognitiveservices/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.CognitiveServices":"2026-07-15-preview"},"crossLanguagePackageId":"Microsoft.CognitiveServices","crossLanguageVersion":"fb8f6c5a7aec","crossLanguageDefinitions":{"com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.beginDelete":"Microsoft.CognitiveServices.CapabilityHosts.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.createOrUpdate":"Microsoft.CognitiveServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.delete":"Microsoft.CognitiveServices.CapabilityHosts.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.get":"Microsoft.CognitiveServices.CapabilityHosts.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.getWithResponse":"Microsoft.CognitiveServices.CapabilityHosts.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountCapabilityHostsClient.list":"Microsoft.CognitiveServices.CapabilityHosts.list","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.create":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.createWithResponse":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.delete":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.deleteWithResponse":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.get":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.getWithResponse":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.list":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.list","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.update":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.cognitiveservices.fluent.AccountConnectionsClient.updateWithResponse":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient":"Microsoft.CognitiveServices.Accounts","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.beginCreate":"Microsoft.CognitiveServices.Accounts.create","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.beginDelete":"Microsoft.CognitiveServices.Accounts.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.beginUpdate":"Microsoft.CognitiveServices.Accounts.update","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.create":"Microsoft.CognitiveServices.Accounts.create","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.delete":"Microsoft.CognitiveServices.Accounts.delete","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.evaluateDeploymentPolicies":"Microsoft.CognitiveServices.Accounts.evaluateDeploymentPolicies","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.evaluateDeploymentPoliciesWithResponse":"Microsoft.CognitiveServices.Accounts.evaluateDeploymentPolicies","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.getByResourceGroup":"Microsoft.CognitiveServices.Accounts.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.CognitiveServices.Accounts.get","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.list":"Microsoft.CognitiveServices.Accounts.list","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listByResourceGroup":"Microsoft.CognitiveServices.Accounts.listByResourceGroup","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listKeys":"Microsoft.CognitiveServices.Accounts.listKeys","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listKeysWithResponse":"Microsoft.CognitiveServices.Accounts.listKeys","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listModels":"Microsoft.CognitiveServices.Accounts.listModels","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listSkus":"Microsoft.CognitiveServices.Accounts.listSkus","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listSkusWithResponse":"Microsoft.CognitiveServices.Accounts.listSkus","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listUsages":"Microsoft.CognitiveServices.Accounts.listUsages","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.listUsagesWithResponse":"Microsoft.CognitiveServices.Accounts.listUsages","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.regenerateKey":"Microsoft.CognitiveServices.Accounts.regenerateKey","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.regenerateKeyWithResponse":"Microsoft.CognitiveServices.Accounts.regenerateKey","com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient.update":"Microsoft.CognitiveServices.Accounts.update","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient":"Microsoft.CognitiveServices.AgentApplications","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.AgentApplications.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.beginDelete":"Microsoft.CognitiveServices.AgentApplications.delete","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.createOrUpdate":"Microsoft.CognitiveServices.AgentApplications.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.delete":"Microsoft.CognitiveServices.AgentApplications.delete","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.disable":"Microsoft.CognitiveServices.AgentApplications.disable","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.disableWithResponse":"Microsoft.CognitiveServices.AgentApplications.disable","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.enable":"Microsoft.CognitiveServices.AgentApplications.enable","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.enableWithResponse":"Microsoft.CognitiveServices.AgentApplications.enable","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.get":"Microsoft.CognitiveServices.AgentApplications.get","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.getWithResponse":"Microsoft.CognitiveServices.AgentApplications.get","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.list":"Microsoft.CognitiveServices.AgentApplications.list","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.listAgents":"Microsoft.CognitiveServices.AgentApplications.listAgents","com.azure.resourcemanager.cognitiveservices.fluent.AgentApplicationsClient.listAgentsWithResponse":"Microsoft.CognitiveServices.AgentApplications.listAgents","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.AgentDeploymentResources.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.beginDelete":"Microsoft.CognitiveServices.AgentDeploymentResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.createOrUpdate":"Microsoft.CognitiveServices.AgentDeploymentResources.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.delete":"Microsoft.CognitiveServices.AgentDeploymentResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.get":"Microsoft.CognitiveServices.AgentDeploymentResources.get","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.getWithResponse":"Microsoft.CognitiveServices.AgentDeploymentResources.get","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.list":"Microsoft.CognitiveServices.AgentDeploymentResources.list","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.start":"Microsoft.CognitiveServices.AgentDeploymentResources.start","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.startWithResponse":"Microsoft.CognitiveServices.AgentDeploymentResources.start","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.stop":"Microsoft.CognitiveServices.AgentDeploymentResources.stop","com.azure.resourcemanager.cognitiveservices.fluent.AgentDeploymentsClient.stopWithResponse":"Microsoft.CognitiveServices.AgentDeploymentResources.stop","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient":"Microsoft.CognitiveServices.ArcDeployments","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.ArcDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.beginDelete":"Microsoft.CognitiveServices.ArcDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.beginUpdate":"Microsoft.CognitiveServices.ArcDeployments.update","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.createOrUpdate":"Microsoft.CognitiveServices.ArcDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.delete":"Microsoft.CognitiveServices.ArcDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.get":"Microsoft.CognitiveServices.ArcDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.getWithResponse":"Microsoft.CognitiveServices.ArcDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.list":"Microsoft.CognitiveServices.ArcDeployments.list","com.azure.resourcemanager.cognitiveservices.fluent.ArcDeploymentsClient.update":"Microsoft.CognitiveServices.ArcDeployments.update","com.azure.resourcemanager.cognitiveservices.fluent.CognitiveServicesManagementClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient":"Microsoft.CognitiveServices.CommitmentPlans","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginCreateOrUpdateAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.createOrUpdateAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginCreateOrUpdatePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.createOrUpdatePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginDelete":"Microsoft.CognitiveServices.CommitmentPlans.delete","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginDeleteAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.deleteAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginDeletePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.deletePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.beginUpdatePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.updatePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.createOrUpdate":"Microsoft.CognitiveServices.CommitmentPlans.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.createOrUpdateAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.createOrUpdateAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.createOrUpdatePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.createOrUpdatePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.CommitmentPlans.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.delete":"Microsoft.CognitiveServices.CommitmentPlans.delete","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.deleteAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.deleteAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.deletePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.deletePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.get":"Microsoft.CognitiveServices.CommitmentPlans.get","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getAssociation":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.getAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getAssociationWithResponse":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.getAssociation","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getByResourceGroup":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.getPlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getByResourceGroupWithResponse":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.getPlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.getWithResponse":"Microsoft.CognitiveServices.CommitmentPlans.get","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.list":"Microsoft.CognitiveServices.CommitmentPlans.list","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.listAssociations":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociations.listAssociations","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.listByResourceGroup":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.listPlansByResourceGroup","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.listPlansBySubscription":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.listPlansBySubscription","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient.updatePlan":"Microsoft.CognitiveServices.CommitmentPlanOperationGroup.updatePlan","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentTiersClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.CommitmentTiersClient.list":"Microsoft.CognitiveServices.CommitmentTiersOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.ComputeOperationsClient":"Microsoft.CognitiveServices.ComputeOperations","com.azure.resourcemanager.cognitiveservices.fluent.ComputeOperationsClient.get":"Microsoft.CognitiveServices.ComputeOperations.get","com.azure.resourcemanager.cognitiveservices.fluent.ComputeOperationsClient.getWithResponse":"Microsoft.CognitiveServices.ComputeOperations.get","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient":"Microsoft.CognitiveServices.Computes","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.Computes.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginDelete":"Microsoft.CognitiveServices.Computes.delete","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginRestart":"Microsoft.CognitiveServices.Computes.restart","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginStart":"Microsoft.CognitiveServices.Computes.start","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.beginStop":"Microsoft.CognitiveServices.Computes.stop","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.createOrUpdate":"Microsoft.CognitiveServices.Computes.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.delete":"Microsoft.CognitiveServices.Computes.delete","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.get":"Microsoft.CognitiveServices.Computes.get","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.getWithResponse":"Microsoft.CognitiveServices.Computes.get","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.list":"Microsoft.CognitiveServices.Computes.list","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.restart":"Microsoft.CognitiveServices.Computes.restart","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.start":"Microsoft.CognitiveServices.Computes.start","com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient.stop":"Microsoft.CognitiveServices.Computes.stop","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient":"Microsoft.CognitiveServices.DefenderForAISettings","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.createOrUpdate":"Microsoft.CognitiveServices.DefenderForAISettings.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.DefenderForAISettings.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.get":"Microsoft.CognitiveServices.DefenderForAISettings.get","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.getWithResponse":"Microsoft.CognitiveServices.DefenderForAISettings.get","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.list":"Microsoft.CognitiveServices.DefenderForAISettings.list","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.update":"Microsoft.CognitiveServices.DefenderForAISettings.update","com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient.updateWithResponse":"Microsoft.CognitiveServices.DefenderForAISettings.update","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient":"Microsoft.CognitiveServices.DeletedAccounts","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.beginPurge":"Microsoft.CognitiveServices.DeletedAccounts.purge","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.get":"Microsoft.CognitiveServices.DeletedAccounts.get","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.getWithResponse":"Microsoft.CognitiveServices.DeletedAccounts.get","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.list":"Microsoft.CognitiveServices.DeletedAccounts.list","com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient.purge":"Microsoft.CognitiveServices.DeletedAccounts.purge","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient":"Microsoft.CognitiveServices.Deployments","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.Deployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.beginDelete":"Microsoft.CognitiveServices.Deployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.beginUpdate":"Microsoft.CognitiveServices.Deployments.update","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.createOrUpdate":"Microsoft.CognitiveServices.Deployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.delete":"Microsoft.CognitiveServices.Deployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.get":"Microsoft.CognitiveServices.Deployments.get","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.getWithResponse":"Microsoft.CognitiveServices.Deployments.get","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.list":"Microsoft.CognitiveServices.Deployments.list","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.listSkus":"Microsoft.CognitiveServices.Deployments.listSkus","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.pause":"Microsoft.CognitiveServices.Deployments.pause","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.pauseWithResponse":"Microsoft.CognitiveServices.Deployments.pause","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.resume":"Microsoft.CognitiveServices.Deployments.resume","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.resumeWithResponse":"Microsoft.CognitiveServices.Deployments.resume","com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient.update":"Microsoft.CognitiveServices.Deployments.update","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient":"Microsoft.CognitiveServices.EncryptionScopes","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.beginDelete":"Microsoft.CognitiveServices.EncryptionScopes.delete","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.createOrUpdate":"Microsoft.CognitiveServices.EncryptionScopes.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.EncryptionScopes.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.delete":"Microsoft.CognitiveServices.EncryptionScopes.delete","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.get":"Microsoft.CognitiveServices.EncryptionScopes.get","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.getWithResponse":"Microsoft.CognitiveServices.EncryptionScopes.get","com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient.list":"Microsoft.CognitiveServices.EncryptionScopes.list","com.azure.resourcemanager.cognitiveservices.fluent.LocationBasedModelCapacitiesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.LocationBasedModelCapacitiesClient.list":"Microsoft.CognitiveServices.LocationBasedModelCapacitiesOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeCapacitiesClient":"Microsoft.CognitiveServices.ManagedComputeCapacities","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeCapacitiesClient.list":"Microsoft.CognitiveServices.ManagedComputeCapacities.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient":"Microsoft.CognitiveServices.ManagedComputeDeployments","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.ManagedComputeDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.beginDelete":"Microsoft.CognitiveServices.ManagedComputeDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.beginUpdate":"Microsoft.CognitiveServices.ManagedComputeDeployments.update","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.createOrUpdate":"Microsoft.CognitiveServices.ManagedComputeDeployments.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.delete":"Microsoft.CognitiveServices.ManagedComputeDeployments.delete","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.get":"Microsoft.CognitiveServices.ManagedComputeDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.getWithResponse":"Microsoft.CognitiveServices.ManagedComputeDeployments.get","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.list":"Microsoft.CognitiveServices.ManagedComputeDeployments.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient.update":"Microsoft.CognitiveServices.ManagedComputeDeployments.update","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeUsagesOperationGroupsClient":"Microsoft.CognitiveServices.ManagedComputeUsagesOperationGroup","com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeUsagesOperationGroupsClient.list":"Microsoft.CognitiveServices.ManagedComputeUsagesOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkProvisionsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkProvisionsClient.beginProvisionManagedNetwork":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.provisionManagedNetwork","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkProvisionsClient.provisionManagedNetwork":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.provisionManagedNetwork","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.beginDelete":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.beginPatch":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.beginPut":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.delete":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.get":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.getWithResponse":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.list":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.list","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.patch":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient.put":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.cognitiveservices.fluent.ModelCapacitiesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ModelCapacitiesClient.list":"Microsoft.CognitiveServices.ModelCapacitiesOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.ModelsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ModelsClient.list":"Microsoft.CognitiveServices.ModelsOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.beginReconcile":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.reconcile","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.get":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.get","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.getWithResponse":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.get","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.list":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.list","com.azure.resourcemanager.cognitiveservices.fluent.NetworkSecurityPerimeterConfigurationsClient.reconcile":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurations.reconcile","com.azure.resourcemanager.cognitiveservices.fluent.OperationsClient":"Microsoft.CognitiveServices.Operations","com.azure.resourcemanager.cognitiveservices.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.beginDelete":"Microsoft.CognitiveServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.createOrUpdate":"Microsoft.CognitiveServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.delete":"Microsoft.CognitiveServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.get":"Microsoft.CognitiveServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.getWithResponse":"Microsoft.CognitiveServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesClient.list":"Microsoft.CognitiveServices.OutboundRuleBasicResources.list","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesOperationsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.OutboundRulesOperationsClient.post":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResources.post","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient":"Microsoft.CognitiveServices.PrivateEndpointConnections","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.CognitiveServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.createOrUpdate":"Microsoft.CognitiveServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.CognitiveServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.CognitiveServices.PrivateEndpointConnections.get","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.CognitiveServices.PrivateEndpointConnections.get","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.CognitiveServices.PrivateEndpointConnections.list","com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient.listWithResponse":"Microsoft.CognitiveServices.PrivateEndpointConnections.list","com.azure.resourcemanager.cognitiveservices.fluent.PrivateLinkResourcesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.PrivateLinkResourcesClient.list":"Microsoft.CognitiveServices.Accounts.privateLinkResourcesList","com.azure.resourcemanager.cognitiveservices.fluent.PrivateLinkResourcesClient.listWithResponse":"Microsoft.CognitiveServices.Accounts.privateLinkResourcesList","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient":"Microsoft.CognitiveServices.ProjectCapabilityHosts","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.ProjectCapabilityHosts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.beginDelete":"Microsoft.CognitiveServices.ProjectCapabilityHosts.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.createOrUpdate":"Microsoft.CognitiveServices.ProjectCapabilityHosts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.delete":"Microsoft.CognitiveServices.ProjectCapabilityHosts.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.get":"Microsoft.CognitiveServices.ProjectCapabilityHosts.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.getWithResponse":"Microsoft.CognitiveServices.ProjectCapabilityHosts.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectCapabilityHostsClient.list":"Microsoft.CognitiveServices.ProjectCapabilityHosts.list","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient":"Microsoft.CognitiveServices.ProjectConnections","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.create":"Microsoft.CognitiveServices.ProjectConnections.create","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.createWithResponse":"Microsoft.CognitiveServices.ProjectConnections.create","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.delete":"Microsoft.CognitiveServices.ProjectConnections.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.deleteWithResponse":"Microsoft.CognitiveServices.ProjectConnections.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.get":"Microsoft.CognitiveServices.ProjectConnections.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.getWithResponse":"Microsoft.CognitiveServices.ProjectConnections.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.list":"Microsoft.CognitiveServices.ProjectConnections.list","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.update":"Microsoft.CognitiveServices.ProjectConnections.update","com.azure.resourcemanager.cognitiveservices.fluent.ProjectConnectionsClient.updateWithResponse":"Microsoft.CognitiveServices.ProjectConnections.update","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient":"Microsoft.CognitiveServices.Projects","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.beginCreate":"Microsoft.CognitiveServices.Projects.create","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.beginDelete":"Microsoft.CognitiveServices.Projects.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.beginUpdate":"Microsoft.CognitiveServices.Projects.update","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.create":"Microsoft.CognitiveServices.Projects.create","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.delete":"Microsoft.CognitiveServices.Projects.delete","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.get":"Microsoft.CognitiveServices.Projects.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.getWithResponse":"Microsoft.CognitiveServices.Projects.get","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.list":"Microsoft.CognitiveServices.Projects.list","com.azure.resourcemanager.cognitiveservices.fluent.ProjectsClient.update":"Microsoft.CognitiveServices.Projects.update","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient":"Microsoft.CognitiveServices.QuotaTiers","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.createOrUpdate":"Microsoft.CognitiveServices.QuotaTiers.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.QuotaTiers.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.get":"Microsoft.CognitiveServices.QuotaTiers.get","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.getWithResponse":"Microsoft.CognitiveServices.QuotaTiers.get","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.list":"Microsoft.CognitiveServices.QuotaTiers.listBySubscription","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.update":"Microsoft.CognitiveServices.QuotaTiers.update","com.azure.resourcemanager.cognitiveservices.fluent.QuotaTiersClient.updateWithResponse":"Microsoft.CognitiveServices.QuotaTiers.update","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient":"Microsoft.CognitiveServices.RaiBlocklistItems","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.batchAdd":"Microsoft.CognitiveServices.RaiBlocklists.batchAdd","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.batchAddWithResponse":"Microsoft.CognitiveServices.RaiBlocklists.batchAdd","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.batchDelete":"Microsoft.CognitiveServices.RaiBlocklists.batchDelete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.batchDeleteWithResponse":"Microsoft.CognitiveServices.RaiBlocklists.batchDelete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.beginDelete":"Microsoft.CognitiveServices.RaiBlocklistItems.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.createOrUpdate":"Microsoft.CognitiveServices.RaiBlocklistItems.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiBlocklistItems.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.delete":"Microsoft.CognitiveServices.RaiBlocklistItems.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.get":"Microsoft.CognitiveServices.RaiBlocklistItems.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.getWithResponse":"Microsoft.CognitiveServices.RaiBlocklistItems.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistItemsClient.list":"Microsoft.CognitiveServices.RaiBlocklistItems.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient":"Microsoft.CognitiveServices.RaiBlocklists","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.beginDelete":"Microsoft.CognitiveServices.RaiBlocklists.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.createOrUpdate":"Microsoft.CognitiveServices.RaiBlocklists.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiBlocklists.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.delete":"Microsoft.CognitiveServices.RaiBlocklists.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.get":"Microsoft.CognitiveServices.RaiBlocklists.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.getWithResponse":"Microsoft.CognitiveServices.RaiBlocklists.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiBlocklistsClient.list":"Microsoft.CognitiveServices.RaiBlocklists.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiContentFiltersClient":"Microsoft.CognitiveServices.RaiContentFilters","com.azure.resourcemanager.cognitiveservices.fluent.RaiContentFiltersClient.get":"Microsoft.CognitiveServices.RaiContentFilters.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiContentFiltersClient.getWithResponse":"Microsoft.CognitiveServices.RaiContentFilters.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiContentFiltersClient.list":"Microsoft.CognitiveServices.RaiContentFilters.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.beginDelete":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.createOrUpdate":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.delete":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.get":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersClient.getWithResponse":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersOperationsClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.RaiExternalSafetyProvidersOperationsClient.list":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemas.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient":"Microsoft.CognitiveServices.RaiPolicies","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.beginDelete":"Microsoft.CognitiveServices.RaiPolicies.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.createOrUpdate":"Microsoft.CognitiveServices.RaiPolicies.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiPolicies.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.delete":"Microsoft.CognitiveServices.RaiPolicies.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.get":"Microsoft.CognitiveServices.RaiPolicies.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.getWithResponse":"Microsoft.CognitiveServices.RaiPolicies.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiPoliciesClient.list":"Microsoft.CognitiveServices.RaiPolicies.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient":"Microsoft.CognitiveServices.RaiToolLabels","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.beginDelete":"Microsoft.CognitiveServices.RaiToolLabels.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.createOrUpdate":"Microsoft.CognitiveServices.RaiToolLabels.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiToolLabels.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.delete":"Microsoft.CognitiveServices.RaiToolLabels.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.get":"Microsoft.CognitiveServices.RaiToolLabels.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.getWithResponse":"Microsoft.CognitiveServices.RaiToolLabels.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiToolLabelsClient.list":"Microsoft.CognitiveServices.RaiToolLabels.list","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient":"Microsoft.CognitiveServices.RaiTopics","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.beginDelete":"Microsoft.CognitiveServices.RaiTopics.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.createOrUpdate":"Microsoft.CognitiveServices.RaiTopics.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.RaiTopics.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.delete":"Microsoft.CognitiveServices.RaiTopics.delete","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.get":"Microsoft.CognitiveServices.RaiTopics.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.getWithResponse":"Microsoft.CognitiveServices.RaiTopics.get","com.azure.resourcemanager.cognitiveservices.fluent.RaiTopicsClient.list":"Microsoft.CognitiveServices.RaiTopics.list","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.calculateModelCapacity":"Microsoft.CognitiveServices.calculateModelCapacity","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.calculateModelCapacityWithResponse":"Microsoft.CognitiveServices.calculateModelCapacity","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.checkDomainAvailability":"Microsoft.CognitiveServices.checkDomainAvailability","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.checkDomainAvailabilityWithResponse":"Microsoft.CognitiveServices.checkDomainAvailability","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.checkSkuAvailability":"Microsoft.CognitiveServices.checkSkuAvailability","com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient.checkSkuAvailabilityWithResponse":"Microsoft.CognitiveServices.checkSkuAvailability","com.azure.resourcemanager.cognitiveservices.fluent.ResourceSkusClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.ResourceSkusClient.list":"Microsoft.CognitiveServices.ResourceSkusOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient":"Microsoft.CognitiveServices.SubscriptionRaiPolicy","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.beginDelete":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.delete","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.createOrUpdate":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.delete":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.delete","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.get":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.get","com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient.getWithResponse":"Microsoft.CognitiveServices.SubscriptionRaiPolicy.get","com.azure.resourcemanager.cognitiveservices.fluent.TestRaiExternalSafetyProvidersClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.TestRaiExternalSafetyProvidersClient.createOrUpdate":"Microsoft.CognitiveServices.Accounts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.TestRaiExternalSafetyProvidersClient.createOrUpdateWithResponse":"Microsoft.CognitiveServices.Accounts.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.UsagesClient":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.fluent.UsagesClient.list":"Microsoft.CognitiveServices.UsagesOperationGroup.list","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient":"Microsoft.CognitiveServices.Workbenches","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginCreateOrUpdate":"Microsoft.CognitiveServices.Workbenches.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginDelete":"Microsoft.CognitiveServices.Workbenches.delete","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginRestart":"Microsoft.CognitiveServices.Workbenches.restart","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginStart":"Microsoft.CognitiveServices.Workbenches.start","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginStop":"Microsoft.CognitiveServices.Workbenches.stop","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.beginUpdate":"Microsoft.CognitiveServices.Workbenches.update","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.createOrUpdate":"Microsoft.CognitiveServices.Workbenches.createOrUpdate","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.delete":"Microsoft.CognitiveServices.Workbenches.delete","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.get":"Microsoft.CognitiveServices.Workbenches.get","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.getWithResponse":"Microsoft.CognitiveServices.Workbenches.get","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.list":"Microsoft.CognitiveServices.Workbenches.list","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.restart":"Microsoft.CognitiveServices.Workbenches.restart","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.start":"Microsoft.CognitiveServices.Workbenches.start","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.stop":"Microsoft.CognitiveServices.Workbenches.stop","com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient.update":"Microsoft.CognitiveServices.Workbenches.update","com.azure.resourcemanager.cognitiveservices.fluent.models.AccountInner":"Microsoft.CognitiveServices.Account","com.azure.resourcemanager.cognitiveservices.fluent.models.AccountModelInner":"Microsoft.CognitiveServices.AccountModel","com.azure.resourcemanager.cognitiveservices.fluent.models.AccountSkuListResultInner":"Microsoft.CognitiveServices.AccountSkuListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.AgentApplicationInner":"Microsoft.CognitiveServices.AgentApplication","com.azure.resourcemanager.cognitiveservices.fluent.models.AgentDeploymentInner":"Microsoft.CognitiveServices.AgentDeployment","com.azure.resourcemanager.cognitiveservices.fluent.models.AgentReferenceResourceArmPaginatedResultInner":"Microsoft.CognitiveServices.AgentReferenceResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.fluent.models.ApiKeysInner":"Microsoft.CognitiveServices.ApiKeys","com.azure.resourcemanager.cognitiveservices.fluent.models.ArcDeploymentInner":"Microsoft.CognitiveServices.ArcDeployment","com.azure.resourcemanager.cognitiveservices.fluent.models.CalculateModelCapacityResultInner":"Microsoft.CognitiveServices.CalculateModelCapacityResult","com.azure.resourcemanager.cognitiveservices.fluent.models.CapabilityHostInner":"Microsoft.CognitiveServices.CapabilityHost","com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentPlanAccountAssociationInner":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociation","com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentPlanAccountAssociationProperties":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociationProperties","com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentPlanInner":"Microsoft.CognitiveServices.CommitmentPlan","com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentTierInner":"Microsoft.CognitiveServices.CommitmentTier","com.azure.resourcemanager.cognitiveservices.fluent.models.ComputeInner":"Microsoft.CognitiveServices.Compute","com.azure.resourcemanager.cognitiveservices.fluent.models.ComputeOperationStatusInner":"Microsoft.CognitiveServices.ComputeOperationStatus","com.azure.resourcemanager.cognitiveservices.fluent.models.ConnectionPropertiesV2BasicResourceInner":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResource","com.azure.resourcemanager.cognitiveservices.fluent.models.DefenderForAISettingInner":"Microsoft.CognitiveServices.DefenderForAISetting","com.azure.resourcemanager.cognitiveservices.fluent.models.DefenderForAISettingProperties":"Microsoft.CognitiveServices.DefenderForAISettingProperties","com.azure.resourcemanager.cognitiveservices.fluent.models.DeploymentInner":"Microsoft.CognitiveServices.Deployment","com.azure.resourcemanager.cognitiveservices.fluent.models.DomainAvailabilityInner":"Microsoft.CognitiveServices.DomainAvailability","com.azure.resourcemanager.cognitiveservices.fluent.models.EncryptionScopeInner":"Microsoft.CognitiveServices.EncryptionScope","com.azure.resourcemanager.cognitiveservices.fluent.models.EvaluateDeploymentPoliciesResponseInner":"Microsoft.CognitiveServices.EvaluateDeploymentPoliciesResponse","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeCapacityInner":"Microsoft.CognitiveServices.ManagedComputeCapacity","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeDeploymentInner":"Microsoft.CognitiveServices.ManagedComputeDeployment","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeUsageInner":"Microsoft.CognitiveServices.ManagedComputeUsage","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedNetworkProvisionStatusInner":"Microsoft.CognitiveServices.ManagedNetworkProvisionStatus","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedNetworkSettingsBasicResourceInner":"Microsoft.CognitiveServices.ManagedNetworkSettingsBasicResource","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedNetworkSettingsInner":"Microsoft.CognitiveServices.ManagedNetworkSettings","com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner":"Microsoft.CognitiveServices.ManagedNetworkSettingsPropertiesBasicResource","com.azure.resourcemanager.cognitiveservices.fluent.models.ModelCapacityListResultValueItemInner":"Microsoft.CognitiveServices.ModelCapacityListResultValueItem","com.azure.resourcemanager.cognitiveservices.fluent.models.ModelInner":"Microsoft.CognitiveServices.Model","com.azure.resourcemanager.cognitiveservices.fluent.models.NetworkSecurityPerimeterConfigurationInner":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfiguration","com.azure.resourcemanager.cognitiveservices.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.cognitiveservices.fluent.models.OutboundRuleBasicResourceInner":"Microsoft.CognitiveServices.OutboundRuleBasicResource","com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateEndpointConnectionInner":"Microsoft.CognitiveServices.PrivateEndpointConnection","com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateEndpointConnectionListResultInner":"Microsoft.CognitiveServices.PrivateEndpointConnectionListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateLinkResourceListResultInner":"Microsoft.CognitiveServices.PrivateLinkResourceListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.ProjectCapabilityHostInner":"Microsoft.CognitiveServices.ProjectCapabilityHost","com.azure.resourcemanager.cognitiveservices.fluent.models.ProjectInner":"Microsoft.CognitiveServices.Project","com.azure.resourcemanager.cognitiveservices.fluent.models.QuotaTierInner":"Microsoft.CognitiveServices.QuotaTier","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBlocklistInner":"Microsoft.CognitiveServices.RaiBlocklist","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBlocklistItemInner":"Microsoft.CognitiveServices.RaiBlocklistItem","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiContentFilterInner":"Microsoft.CognitiveServices.RaiContentFilter","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiExternalSafetyProviderSchemaInner":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchema","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiPolicyInner":"Microsoft.CognitiveServices.RaiPolicy","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiToolLabelInner":"Microsoft.CognitiveServices.RaiToolLabel","com.azure.resourcemanager.cognitiveservices.fluent.models.RaiTopicInner":"Microsoft.CognitiveServices.RaiTopic","com.azure.resourcemanager.cognitiveservices.fluent.models.ResourceSkuInner":"Microsoft.CognitiveServices.ResourceSku","com.azure.resourcemanager.cognitiveservices.fluent.models.SkuAvailabilityListResultInner":"Microsoft.CognitiveServices.SkuAvailabilityListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.SkuResourceInner":"Microsoft.CognitiveServices.SkuResource","com.azure.resourcemanager.cognitiveservices.fluent.models.UsageInner":"Microsoft.CognitiveServices.Usage","com.azure.resourcemanager.cognitiveservices.fluent.models.UsageListResultInner":"Microsoft.CognitiveServices.UsageListResult","com.azure.resourcemanager.cognitiveservices.fluent.models.WorkbenchInner":"Microsoft.CognitiveServices.Workbench","com.azure.resourcemanager.cognitiveservices.implementation.CognitiveServicesManagementClientBuilder":"Microsoft.CognitiveServices","com.azure.resourcemanager.cognitiveservices.implementation.models.AccountListResult":"Microsoft.CognitiveServices.AccountListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.AccountModelListResult":"Microsoft.CognitiveServices.AccountModelListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.AgentApplicationResourceArmPaginatedResult":"Microsoft.CognitiveServices.AgentApplicationResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.AgentDeploymentResourceArmPaginatedResult":"Microsoft.CognitiveServices.AgentDeploymentResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ArcDeploymentListResult":"Microsoft.CognitiveServices.ArcDeploymentListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.CapabilityHostResourceArmPaginatedResult":"Microsoft.CognitiveServices.CapabilityHostResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.CommitmentPlanAccountAssociationListResult":"Microsoft.CognitiveServices.CommitmentPlanAccountAssociationListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.CommitmentPlanListResult":"Microsoft.CognitiveServices.CommitmentPlanListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.CommitmentTierListResult":"Microsoft.CognitiveServices.CommitmentTierListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ComputeListResult":"Microsoft.CognitiveServices.ComputeListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ConnectionPropertiesV2BasicResourceArmPaginatedResult":"Microsoft.CognitiveServices.ConnectionPropertiesV2BasicResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.DefenderForAISettingResult":"Microsoft.CognitiveServices.DefenderForAISettingResult","com.azure.resourcemanager.cognitiveservices.implementation.models.DeploymentListResult":"Microsoft.CognitiveServices.DeploymentListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.DeploymentSkuListResult":"Microsoft.CognitiveServices.DeploymentSkuListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.EncryptionScopeListResult":"Microsoft.CognitiveServices.EncryptionScopeListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedComputeCapacityListResult":"Microsoft.CognitiveServices.ManagedComputeCapacityListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedComputeDeploymentListResult":"Microsoft.CognitiveServices.ManagedComputeDeploymentListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedComputeUsageListResult":"Microsoft.CognitiveServices.ManagedComputeUsageListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedNetworkListResult":"Microsoft.CognitiveServices.ManagedNetworkListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ModelCapacityListResult":"Microsoft.CognitiveServices.ModelCapacityListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ModelListResult":"Microsoft.CognitiveServices.ModelListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.NetworkSecurityPerimeterConfigurationList":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurationList","com.azure.resourcemanager.cognitiveservices.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.OutboundRuleListResult":"Microsoft.CognitiveServices.OutboundRuleListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ProjectCapabilityHostResourceArmPaginatedResult":"Microsoft.CognitiveServices.ProjectCapabilityHostResourceArmPaginatedResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ProjectListResult":"Microsoft.CognitiveServices.ProjectListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.QuotaTierListResult":"Microsoft.CognitiveServices.QuotaTierListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiBlockListItemsResult":"Microsoft.CognitiveServices.RaiBlockListItemsResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiBlockListResult":"Microsoft.CognitiveServices.RaiBlockListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiContentFilterListResult":"Microsoft.CognitiveServices.RaiContentFilterListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiExternalSafetyProviderResult":"Microsoft.CognitiveServices.RaiExternalSafetyProviderResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiPolicyListResult":"Microsoft.CognitiveServices.RaiPolicyListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiToolLabelResult":"Microsoft.CognitiveServices.RaiToolLabelResult","com.azure.resourcemanager.cognitiveservices.implementation.models.RaiTopicResult":"Microsoft.CognitiveServices.RaiTopicResult","com.azure.resourcemanager.cognitiveservices.implementation.models.ResourceSkuListResult":"Microsoft.CognitiveServices.ResourceSkuListResult","com.azure.resourcemanager.cognitiveservices.implementation.models.WorkbenchListResult":"Microsoft.CognitiveServices.WorkbenchListResult","com.azure.resourcemanager.cognitiveservices.models.AadAuthTypeConnectionProperties":"Microsoft.CognitiveServices.AADAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.AbusePenalty":"Microsoft.CognitiveServices.AbusePenalty","com.azure.resourcemanager.cognitiveservices.models.AbusePenaltyAction":"Microsoft.CognitiveServices.AbusePenaltyAction","com.azure.resourcemanager.cognitiveservices.models.AccessKeyAuthTypeConnectionProperties":"Microsoft.CognitiveServices.AccessKeyAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.AccountKeyAuthTypeConnectionProperties":"Microsoft.CognitiveServices.AccountKeyAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.AccountProperties":"Microsoft.CognitiveServices.AccountProperties","com.azure.resourcemanager.cognitiveservices.models.AccountSku":"Microsoft.CognitiveServices.AccountSku","com.azure.resourcemanager.cognitiveservices.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.cognitiveservices.models.AgentDeploymentProperties":"Microsoft.CognitiveServices.AgentDeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.AgentDeploymentProvisioningState":"Microsoft.CognitiveServices.AgentDeploymentProvisioningState","com.azure.resourcemanager.cognitiveservices.models.AgentDeploymentState":"Microsoft.CognitiveServices.AgentDeploymentState","com.azure.resourcemanager.cognitiveservices.models.AgentDeploymentType":"Microsoft.CognitiveServices.AgentDeploymentType","com.azure.resourcemanager.cognitiveservices.models.AgentHostingConfiguration":"Microsoft.CognitiveServices.AgentHostingConfiguration","com.azure.resourcemanager.cognitiveservices.models.AgentHostingType":"Microsoft.CognitiveServices.AgentHostingType","com.azure.resourcemanager.cognitiveservices.models.AgentProtocol":"Microsoft.CognitiveServices.AgentProtocol","com.azure.resourcemanager.cognitiveservices.models.AgentProtocolVersion":"Microsoft.CognitiveServices.AgentProtocolVersion","com.azure.resourcemanager.cognitiveservices.models.AgentReference":"Microsoft.CognitiveServices.AgentReference","com.azure.resourcemanager.cognitiveservices.models.AgentReferenceProperties":"Microsoft.CognitiveServices.AgentReferenceProperties","com.azure.resourcemanager.cognitiveservices.models.AgenticApplicationProperties":"Microsoft.CognitiveServices.AgenticApplicationProperties","com.azure.resourcemanager.cognitiveservices.models.AgenticApplicationProvisioningState":"Microsoft.CognitiveServices.AgenticApplicationProvisioningState","com.azure.resourcemanager.cognitiveservices.models.ApiKeyAuthConnectionProperties":"Microsoft.CognitiveServices.ApiKeyAuthConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.ApiProperties":"Microsoft.CognitiveServices.ApiProperties","com.azure.resourcemanager.cognitiveservices.models.ApplicationAuthorizationPolicy":"Microsoft.CognitiveServices.ApplicationAuthorizationPolicy","com.azure.resourcemanager.cognitiveservices.models.ApplicationTrafficRoutingPolicy":"Microsoft.CognitiveServices.ApplicationTrafficRoutingPolicy","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentComputeType":"Microsoft.CognitiveServices.ArcDeploymentComputeType","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentCpuMemoryResourceRequirements":"Microsoft.CognitiveServices.ArcDeploymentCpuMemoryResourceRequirements","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentKubernetesResources":"Microsoft.CognitiveServices.ArcDeploymentKubernetesResources","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentModel":"Microsoft.CognitiveServices.ArcDeploymentModel","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentPatchCpuMemoryResourceRequirements":"Microsoft.CognitiveServices.ArcDeploymentPatchCpuMemoryResourceRequirements","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentPatchKubernetesResources":"Microsoft.CognitiveServices.ArcDeploymentPatchKubernetesResources","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentProperties":"Microsoft.CognitiveServices.ArcDeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentProvisioningDetails":"Microsoft.CognitiveServices.ArcDeploymentProvisioningDetails","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentResourceRequirements":"Microsoft.CognitiveServices.ArcDeploymentResourceRequirements","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentRuntime":"Microsoft.CognitiveServices.ArcDeploymentRuntime","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentSku":"Microsoft.CognitiveServices.ArcDeploymentSku","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentSkuName":"Microsoft.CognitiveServices.ArcDeploymentSkuName","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentUpdate":"Microsoft.CognitiveServices.ArcDeploymentUpdate","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentUpdateProperties":"Microsoft.CognitiveServices.ArcDeploymentUpdateProperties","com.azure.resourcemanager.cognitiveservices.models.ArcDeploymentVllmParameters":"Microsoft.CognitiveServices.ArcDeploymentVllmParameters","com.azure.resourcemanager.cognitiveservices.models.AssignedIdentity":"Microsoft.CognitiveServices.AssignedIdentity","com.azure.resourcemanager.cognitiveservices.models.BillingMeterInfo":"Microsoft.CognitiveServices.BillingMeterInfo","com.azure.resourcemanager.cognitiveservices.models.BuiltInAuthorizationScheme":"Microsoft.CognitiveServices.BuiltInAuthorizationScheme","com.azure.resourcemanager.cognitiveservices.models.ByPassSelection":"Microsoft.CognitiveServices.ByPassSelection","com.azure.resourcemanager.cognitiveservices.models.CalculateModelCapacityParameter":"Microsoft.CognitiveServices.CalculateModelCapacityParameter","com.azure.resourcemanager.cognitiveservices.models.CalculateModelCapacityResultEstimatedCapacity":"Microsoft.CognitiveServices.CalculateModelCapacityResultEstimatedCapacity","com.azure.resourcemanager.cognitiveservices.models.CallRateLimit":"Microsoft.CognitiveServices.CallRateLimit","com.azure.resourcemanager.cognitiveservices.models.CapabilityHostKind":"Microsoft.CognitiveServices.CapabilityHostKind","com.azure.resourcemanager.cognitiveservices.models.CapabilityHostProperties":"Microsoft.CognitiveServices.CapabilityHostProperties","com.azure.resourcemanager.cognitiveservices.models.CapabilityHostProvisioningState":"Microsoft.CognitiveServices.CapabilityHostProvisioningState","com.azure.resourcemanager.cognitiveservices.models.CapabilitySettings":"Microsoft.CognitiveServices.CapabilitySettings","com.azure.resourcemanager.cognitiveservices.models.CapacityConfig":"Microsoft.CognitiveServices.CapacityConfig","com.azure.resourcemanager.cognitiveservices.models.ChannelsBuiltInAuthorizationPolicy":"Microsoft.CognitiveServices.ChannelsBuiltInAuthorizationPolicy","com.azure.resourcemanager.cognitiveservices.models.CheckDomainAvailabilityParameter":"Microsoft.CognitiveServices.CheckDomainAvailabilityParameter","com.azure.resourcemanager.cognitiveservices.models.CheckSkuAvailabilityParameter":"Microsoft.CognitiveServices.CheckSkuAvailabilityParameter","com.azure.resourcemanager.cognitiveservices.models.ClusterComputeProperties":"Microsoft.CognitiveServices.ClusterComputeProperties","com.azure.resourcemanager.cognitiveservices.models.CommitmentCost":"Microsoft.CognitiveServices.CommitmentCost","com.azure.resourcemanager.cognitiveservices.models.CommitmentPeriod":"Microsoft.CognitiveServices.CommitmentPeriod","com.azure.resourcemanager.cognitiveservices.models.CommitmentPlanAssociation":"Microsoft.CognitiveServices.CommitmentPlanAssociation","com.azure.resourcemanager.cognitiveservices.models.CommitmentPlanProperties":"Microsoft.CognitiveServices.CommitmentPlanProperties","com.azure.resourcemanager.cognitiveservices.models.CommitmentPlanProvisioningState":"Microsoft.CognitiveServices.CommitmentPlanProvisioningState","com.azure.resourcemanager.cognitiveservices.models.CommitmentQuota":"Microsoft.CognitiveServices.CommitmentQuota","com.azure.resourcemanager.cognitiveservices.models.ComputeOperationStatusProperties":"Microsoft.CognitiveServices.ComputeOperationStatusProperties","com.azure.resourcemanager.cognitiveservices.models.ComputeOperationStatusType":"Microsoft.CognitiveServices.ComputeOperationStatusType","com.azure.resourcemanager.cognitiveservices.models.ComputeProperties":"Microsoft.CognitiveServices.ComputeProperties","com.azure.resourcemanager.cognitiveservices.models.ComputeProvisioningState":"Microsoft.CognitiveServices.ComputeProvisioningState","com.azure.resourcemanager.cognitiveservices.models.ComputeType":"Microsoft.CognitiveServices.ComputeType","com.azure.resourcemanager.cognitiveservices.models.ConnectionAccessKey":"Microsoft.CognitiveServices.ConnectionAccessKey","com.azure.resourcemanager.cognitiveservices.models.ConnectionAccountKey":"Microsoft.CognitiveServices.ConnectionAccountKey","com.azure.resourcemanager.cognitiveservices.models.ConnectionApiKey":"Microsoft.CognitiveServices.ConnectionApiKey","com.azure.resourcemanager.cognitiveservices.models.ConnectionAuthType":"Microsoft.CognitiveServices.ConnectionAuthType","com.azure.resourcemanager.cognitiveservices.models.ConnectionCategory":"Microsoft.CognitiveServices.ConnectionCategory","com.azure.resourcemanager.cognitiveservices.models.ConnectionGroup":"Microsoft.CognitiveServices.ConnectionGroup","com.azure.resourcemanager.cognitiveservices.models.ConnectionManagedIdentity":"Microsoft.CognitiveServices.ConnectionManagedIdentity","com.azure.resourcemanager.cognitiveservices.models.ConnectionOAuth2":"Microsoft.CognitiveServices.ConnectionOAuth2","com.azure.resourcemanager.cognitiveservices.models.ConnectionPersonalAccessToken":"Microsoft.CognitiveServices.ConnectionPersonalAccessToken","com.azure.resourcemanager.cognitiveservices.models.ConnectionPropertiesV2":"Microsoft.CognitiveServices.ConnectionPropertiesV2","com.azure.resourcemanager.cognitiveservices.models.ConnectionServicePrincipal":"Microsoft.CognitiveServices.ConnectionServicePrincipal","com.azure.resourcemanager.cognitiveservices.models.ConnectionSharedAccessSignature":"Microsoft.CognitiveServices.ConnectionSharedAccessSignature","com.azure.resourcemanager.cognitiveservices.models.ConnectionUpdateContent":"Microsoft.CognitiveServices.ConnectionUpdateContent","com.azure.resourcemanager.cognitiveservices.models.ConnectionUsernamePassword":"Microsoft.CognitiveServices.ConnectionUsernamePassword","com.azure.resourcemanager.cognitiveservices.models.ConnectivityEndpoints":"Microsoft.CognitiveServices.ConnectivityEndpoints","com.azure.resourcemanager.cognitiveservices.models.ContainerInstanceComputeProperties":"Microsoft.CognitiveServices.ContainerInstanceComputeProperties","com.azure.resourcemanager.cognitiveservices.models.ContentLevel":"Microsoft.CognitiveServices.ContentLevel","com.azure.resourcemanager.cognitiveservices.models.CustomBlocklistConfig":"Microsoft.CognitiveServices.CustomBlocklistConfig","com.azure.resourcemanager.cognitiveservices.models.CustomKeys":"Microsoft.CognitiveServices.CustomKeys","com.azure.resourcemanager.cognitiveservices.models.CustomKeysConnectionProperties":"Microsoft.CognitiveServices.CustomKeysConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.DefenderForAISettingState":"Microsoft.CognitiveServices.DefenderForAISettingState","com.azure.resourcemanager.cognitiveservices.models.DeploymentCapacitySettings":"Microsoft.CognitiveServices.DeploymentCapacitySettings","com.azure.resourcemanager.cognitiveservices.models.DeploymentModel":"Microsoft.CognitiveServices.DeploymentModel","com.azure.resourcemanager.cognitiveservices.models.DeploymentModelVersionUpgradeOption":"Microsoft.CognitiveServices.DeploymentModelVersionUpgradeOption","com.azure.resourcemanager.cognitiveservices.models.DeploymentPolicyEvaluationResult":"Microsoft.CognitiveServices.DeploymentPolicyEvaluationResult","com.azure.resourcemanager.cognitiveservices.models.DeploymentProperties":"Microsoft.CognitiveServices.DeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.DeploymentProvisioningState":"Microsoft.CognitiveServices.DeploymentProvisioningState","com.azure.resourcemanager.cognitiveservices.models.DeploymentRouting":"Microsoft.CognitiveServices.DeploymentRouting","com.azure.resourcemanager.cognitiveservices.models.DeploymentScaleSettings":"Microsoft.CognitiveServices.DeploymentScaleSettings","com.azure.resourcemanager.cognitiveservices.models.DeploymentScaleType":"Microsoft.CognitiveServices.DeploymentScaleType","com.azure.resourcemanager.cognitiveservices.models.DeploymentSizeCapacity":"Microsoft.CognitiveServices.DeploymentSizeCapacity","com.azure.resourcemanager.cognitiveservices.models.DeploymentSpeculativeDecoding":"Microsoft.CognitiveServices.DeploymentSpeculativeDecoding","com.azure.resourcemanager.cognitiveservices.models.DeploymentState":"Microsoft.CognitiveServices.DeploymentState","com.azure.resourcemanager.cognitiveservices.models.DeprecationStatus":"Microsoft.CognitiveServices.DeprecationStatus","com.azure.resourcemanager.cognitiveservices.models.Encryption":"Microsoft.CognitiveServices.Encryption","com.azure.resourcemanager.cognitiveservices.models.EncryptionScopeProperties":"Microsoft.CognitiveServices.EncryptionScopeProperties","com.azure.resourcemanager.cognitiveservices.models.EncryptionScopeProvisioningState":"Microsoft.CognitiveServices.EncryptionScopeProvisioningState","com.azure.resourcemanager.cognitiveservices.models.EncryptionScopeState":"Microsoft.CognitiveServices.EncryptionScopeState","com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesDeployment":"Microsoft.CognitiveServices.EvaluateDeploymentPoliciesDeployment","com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesDeploymentProperties":"Microsoft.CognitiveServices.EvaluateDeploymentPoliciesDeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesRequest":"Microsoft.CognitiveServices.EvaluateDeploymentPoliciesRequest","com.azure.resourcemanager.cognitiveservices.models.FirewallSku":"Microsoft.CognitiveServices.FirewallSku","com.azure.resourcemanager.cognitiveservices.models.FoundryAutoUpgrade":"Microsoft.CognitiveServices.FoundryAutoUpgrade","com.azure.resourcemanager.cognitiveservices.models.FoundryAutoUpgradeMode":"Microsoft.CognitiveServices.FoundryAutoUpgradeMode","com.azure.resourcemanager.cognitiveservices.models.FqdnOutboundRule":"Microsoft.CognitiveServices.FqdnOutboundRule","com.azure.resourcemanager.cognitiveservices.models.HostedAgentDeployment":"Microsoft.CognitiveServices.HostedAgentDeployment","com.azure.resourcemanager.cognitiveservices.models.HostingModel":"Microsoft.CognitiveServices.HostingModel","com.azure.resourcemanager.cognitiveservices.models.Identity":"Microsoft.CognitiveServices.Identity","com.azure.resourcemanager.cognitiveservices.models.IdentityKind":"Microsoft.CognitiveServices.IdentityKind","com.azure.resourcemanager.cognitiveservices.models.IdentityManagementType":"Microsoft.CognitiveServices.IdentityManagementType","com.azure.resourcemanager.cognitiveservices.models.IdentityProvisioningState":"Microsoft.CognitiveServices.IdentityProvisioningState","com.azure.resourcemanager.cognitiveservices.models.IpRule":"Microsoft.CognitiveServices.IpRule","com.azure.resourcemanager.cognitiveservices.models.IsolationMode":"Microsoft.CognitiveServices.IsolationMode","com.azure.resourcemanager.cognitiveservices.models.KeyName":"Microsoft.CognitiveServices.KeyName","com.azure.resourcemanager.cognitiveservices.models.KeySource":"Microsoft.CognitiveServices.KeySource","com.azure.resourcemanager.cognitiveservices.models.KeyVaultProperties":"Microsoft.CognitiveServices.KeyVaultProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedAgentDeployment":"Microsoft.CognitiveServices.ManagedAgentDeployment","com.azure.resourcemanager.cognitiveservices.models.ManagedClusterAgentHostingConfiguration":"Microsoft.CognitiveServices.ManagedClusterAgentHostingConfiguration","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeCapacityProperties":"Microsoft.CognitiveServices.ManagedComputeCapacityProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentInfo":"Microsoft.CognitiveServices.ManagedComputeDeploymentInfo","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties":"Microsoft.CognitiveServices.ManagedComputeDeploymentProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProvisioningDetails":"Microsoft.CognitiveServices.ManagedComputeDeploymentProvisioningDetails","com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentRoutes":"Microsoft.CognitiveServices.ManagedComputeDeploymentRoutes","com.azure.resourcemanager.cognitiveservices.models.ManagedIdentityAuthTypeConnectionProperties":"Microsoft.CognitiveServices.ManagedIdentityAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkKind":"Microsoft.CognitiveServices.ManagedNetworkKind","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkProvisionOptions":"Microsoft.CognitiveServices.ManagedNetworkProvisionOptions","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkProvisioningState":"Microsoft.CognitiveServices.ManagedNetworkProvisioningState","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkSettingsEx":"Microsoft.CognitiveServices.ManagedNetworkSettingsEx","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkSettingsProperties":"Microsoft.CognitiveServices.ManagedNetworkSettingsProperties","com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkStatus":"Microsoft.CognitiveServices.ManagedNetworkStatus","com.azure.resourcemanager.cognitiveservices.models.ManagedPERequirement":"Microsoft.CognitiveServices.ManagedPERequirement","com.azure.resourcemanager.cognitiveservices.models.ManagedPEStatus":"Microsoft.CognitiveServices.ManagedPEStatus","com.azure.resourcemanager.cognitiveservices.models.MetricName":"Microsoft.CognitiveServices.MetricName","com.azure.resourcemanager.cognitiveservices.models.ModelCapacityCalculatorWorkload":"Microsoft.CognitiveServices.ModelCapacityCalculatorWorkload","com.azure.resourcemanager.cognitiveservices.models.ModelCapacityCalculatorWorkloadRequestParam":"Microsoft.CognitiveServices.ModelCapacityCalculatorWorkloadRequestParam","com.azure.resourcemanager.cognitiveservices.models.ModelDeprecationInfo":"Microsoft.CognitiveServices.ModelDeprecationInfo","com.azure.resourcemanager.cognitiveservices.models.ModelLifecycleStatus":"Microsoft.CognitiveServices.ModelLifecycleStatus","com.azure.resourcemanager.cognitiveservices.models.ModelSku":"Microsoft.CognitiveServices.ModelSku","com.azure.resourcemanager.cognitiveservices.models.ModelSkuCapacityProperties":"Microsoft.CognitiveServices.ModelSkuCapacityProperties","com.azure.resourcemanager.cognitiveservices.models.MultiRegionSettings":"Microsoft.CognitiveServices.MultiRegionSettings","com.azure.resourcemanager.cognitiveservices.models.NetworkInjection":"Microsoft.CognitiveServices.NetworkInjection","com.azure.resourcemanager.cognitiveservices.models.NetworkRuleAction":"Microsoft.CognitiveServices.NetworkRuleAction","com.azure.resourcemanager.cognitiveservices.models.NetworkRuleSet":"Microsoft.CognitiveServices.NetworkRuleSet","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeter":"Microsoft.CognitiveServices.NetworkSecurityPerimeter","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterAccessRule":"Microsoft.CognitiveServices.NetworkSecurityPerimeterAccessRule","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterAccessRuleProperties":"Microsoft.CognitiveServices.NetworkSecurityPerimeterAccessRuleProperties","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem":"Microsoft.CognitiveServices.NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterConfigurationAssociationInfo":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurationAssociationInfo","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterConfigurationProperties":"Microsoft.CognitiveServices.NetworkSecurityPerimeterConfigurationProperties","com.azure.resourcemanager.cognitiveservices.models.NetworkSecurityPerimeterProfileInfo":"Microsoft.CognitiveServices.NetworkSecurityPerimeterProfileInfo","com.azure.resourcemanager.cognitiveservices.models.NoneAuthTypeConnectionProperties":"Microsoft.CognitiveServices.NoneAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.NspAccessRuleDirection":"Microsoft.CognitiveServices.NspAccessRuleDirection","com.azure.resourcemanager.cognitiveservices.models.OAuth2AuthTypeConnectionProperties":"Microsoft.CognitiveServices.OAuth2AuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.cognitiveservices.models.OrganizationSharedBuiltInAuthorizationPolicy":"Microsoft.CognitiveServices.OrganizationSharedBuiltInAuthorizationPolicy","com.azure.resourcemanager.cognitiveservices.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.cognitiveservices.models.OutboundRule":"Microsoft.CognitiveServices.OutboundRule","com.azure.resourcemanager.cognitiveservices.models.PatAuthTypeConnectionProperties":"Microsoft.CognitiveServices.PATAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.PatchResourceSku":"Microsoft.CognitiveServices.PatchResourceSku","com.azure.resourcemanager.cognitiveservices.models.PatchResourceTags":"Microsoft.CognitiveServices.PatchResourceTags","com.azure.resourcemanager.cognitiveservices.models.PatchResourceTagsAndSku":"Microsoft.CognitiveServices.PatchResourceTagsAndSku","com.azure.resourcemanager.cognitiveservices.models.PolicyAssignmentEvaluationDetails":"Microsoft.CognitiveServices.PolicyAssignmentEvaluationDetails","com.azure.resourcemanager.cognitiveservices.models.PolicyEvaluationOutcome":"Microsoft.CognitiveServices.PolicyEvaluationOutcome","com.azure.resourcemanager.cognitiveservices.models.PolicyExpressionEvaluationDetails":"Microsoft.CognitiveServices.PolicyExpressionEvaluationDetails","com.azure.resourcemanager.cognitiveservices.models.Pool":"Microsoft.CognitiveServices.Pool","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpoint":"Azure.ResourceManager.CommonTypes.PrivateEndpoint","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnectionProperties":"Microsoft.CognitiveServices.PrivateEndpointConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnectionProvisioningState":"Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointOutboundRule":"Microsoft.CognitiveServices.PrivateEndpointOutboundRule","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointOutboundRuleDestination":"Microsoft.CognitiveServices.PrivateEndpointOutboundRuleDestination","com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointServiceConnectionStatus":"Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus","com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResource":"Microsoft.CognitiveServices.PrivateLinkResource","com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResourceProperties":"Microsoft.CognitiveServices.PrivateLinkResourceProperties","com.azure.resourcemanager.cognitiveservices.models.PrivateLinkServiceConnectionState":"Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState","com.azure.resourcemanager.cognitiveservices.models.ProjectCapabilityHostProperties":"Microsoft.CognitiveServices.ProjectCapabilityHostProperties","com.azure.resourcemanager.cognitiveservices.models.ProjectProperties":"Microsoft.CognitiveServices.ProjectProperties","com.azure.resourcemanager.cognitiveservices.models.ProvisioningIssue":"Microsoft.CognitiveServices.ProvisioningIssue","com.azure.resourcemanager.cognitiveservices.models.ProvisioningIssueProperties":"Microsoft.CognitiveServices.ProvisioningIssueProperties","com.azure.resourcemanager.cognitiveservices.models.ProvisioningState":"Microsoft.CognitiveServices.ProvisioningState","com.azure.resourcemanager.cognitiveservices.models.PublicNetworkAccess":"Microsoft.CognitiveServices.PublicNetworkAccess","com.azure.resourcemanager.cognitiveservices.models.QuotaLimit":"Microsoft.CognitiveServices.QuotaLimit","com.azure.resourcemanager.cognitiveservices.models.QuotaScopeType":"Microsoft.CognitiveServices.QuotaScopeType","com.azure.resourcemanager.cognitiveservices.models.QuotaTierProperties":"Microsoft.CognitiveServices.QuotaTierProperties","com.azure.resourcemanager.cognitiveservices.models.QuotaTierUpgradeEligibilityInfo":"Microsoft.CognitiveServices.QuotaTierUpgradeEligibilityInfo","com.azure.resourcemanager.cognitiveservices.models.QuotaUsageStatus":"Microsoft.CognitiveServices.QuotaUsageStatus","com.azure.resourcemanager.cognitiveservices.models.RaiActionType":"Microsoft.CognitiveServices.RaiActionType","com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistConfig":"Microsoft.CognitiveServices.RaiBlocklistConfig","com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistItemBulkRequest":"Microsoft.CognitiveServices.RaiBlocklistItemBulkRequest","com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistItemProperties":"Microsoft.CognitiveServices.RaiBlocklistItemProperties","com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistProperties":"Microsoft.CognitiveServices.RaiBlocklistProperties","com.azure.resourcemanager.cognitiveservices.models.RaiContentFilterProperties":"Microsoft.CognitiveServices.RaiContentFilterProperties","com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction":"Microsoft.CognitiveServices.RaiEgressDefaultAction","com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderOperation":"Microsoft.CognitiveServices.RaiEgressHeaderOperation","com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderTransform":"Microsoft.CognitiveServices.RaiEgressHeaderTransform","com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderValueRef":"Microsoft.CognitiveServices.RaiEgressHeaderValueRef","com.azure.resourcemanager.cognitiveservices.models.RaiEgressManagedIdentityRef":"Microsoft.CognitiveServices.RaiEgressManagedIdentityRef","com.azure.resourcemanager.cognitiveservices.models.RaiEgressMode":"Microsoft.CognitiveServices.RaiEgressMode","com.azure.resourcemanager.cognitiveservices.models.RaiEgressPolicyConfig":"Microsoft.CognitiveServices.RaiEgressPolicyConfig","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRewriteTarget":"Microsoft.CognitiveServices.RaiEgressRewriteTarget","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRule":"Microsoft.CognitiveServices.RaiEgressRule","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleAction":"Microsoft.CognitiveServices.RaiEgressRuleAction","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleActionType":"Microsoft.CognitiveServices.RaiEgressRuleActionType","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleMatch":"Microsoft.CognitiveServices.RaiEgressRuleMatch","com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleType":"Microsoft.CognitiveServices.RaiEgressRuleType","com.azure.resourcemanager.cognitiveservices.models.RaiEgressScheme":"Microsoft.CognitiveServices.RaiEgressScheme","com.azure.resourcemanager.cognitiveservices.models.RaiEgressSecretRef":"Microsoft.CognitiveServices.RaiEgressSecretRef","com.azure.resourcemanager.cognitiveservices.models.RaiExternalSafetyProviderSchemaProperties":"Microsoft.CognitiveServices.RaiExternalSafetyProviderSchemaProperties","com.azure.resourcemanager.cognitiveservices.models.RaiMonitorConfig":"Microsoft.CognitiveServices.RaiMonitorConfig","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentFilter":"Microsoft.CognitiveServices.RaiPolicyContentFilter","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource":"Microsoft.CognitiveServices.RaiPolicyContentSource","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode":"Microsoft.CognitiveServices.RaiPolicyMode","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyProperties":"Microsoft.CognitiveServices.RaiPolicyProperties","com.azure.resourcemanager.cognitiveservices.models.RaiPolicyType":"Microsoft.CognitiveServices.RaiPolicyType","com.azure.resourcemanager.cognitiveservices.models.RaiSafetyProviderConfig":"Microsoft.CognitiveServices.RaiSafetyProviderConfig","com.azure.resourcemanager.cognitiveservices.models.RaiToolLabelProperties":"Microsoft.CognitiveServices.RaiToolLabelProperties","com.azure.resourcemanager.cognitiveservices.models.RaiToolLabelPropertiesAccountScope":"Microsoft.CognitiveServices.RaiToolLabelPropertiesAccountScope","com.azure.resourcemanager.cognitiveservices.models.RaiToolLabelPropertiesProjectScopesItem":"Microsoft.CognitiveServices.RaiToolLabelPropertiesProjectScopesItem","com.azure.resourcemanager.cognitiveservices.models.RaiTopicProperties":"Microsoft.CognitiveServices.RaiTopicProperties","com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameters":"Microsoft.CognitiveServices.RegenerateKeyParameters","com.azure.resourcemanager.cognitiveservices.models.RegionSetting":"Microsoft.CognitiveServices.RegionSetting","com.azure.resourcemanager.cognitiveservices.models.ReplacementConfig":"Microsoft.CognitiveServices.ReplacementConfig","com.azure.resourcemanager.cognitiveservices.models.RequestMatchPattern":"Microsoft.CognitiveServices.RequestMatchPattern","com.azure.resourcemanager.cognitiveservices.models.ResourceBase":"Microsoft.CognitiveServices.ResourceBase","com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType":"Microsoft.CognitiveServices.ResourceIdentityType","com.azure.resourcemanager.cognitiveservices.models.ResourceSkuRestrictionInfo":"Microsoft.CognitiveServices.ResourceSkuRestrictionInfo","com.azure.resourcemanager.cognitiveservices.models.ResourceSkuRestrictions":"Microsoft.CognitiveServices.ResourceSkuRestrictions","com.azure.resourcemanager.cognitiveservices.models.ResourceSkuRestrictionsReasonCode":"Microsoft.CognitiveServices.ResourceSkuRestrictionsReasonCode","com.azure.resourcemanager.cognitiveservices.models.ResourceSkuRestrictionsType":"Microsoft.CognitiveServices.ResourceSkuRestrictionsType","com.azure.resourcemanager.cognitiveservices.models.RoleBasedBuiltInAuthorizationPolicy":"Microsoft.CognitiveServices.RoleBasedBuiltInAuthorizationPolicy","com.azure.resourcemanager.cognitiveservices.models.RoutingMethods":"Microsoft.CognitiveServices.RoutingMethods","com.azure.resourcemanager.cognitiveservices.models.RoutingMode":"Microsoft.CognitiveServices.RoutingMode","com.azure.resourcemanager.cognitiveservices.models.RuleAction":"Microsoft.CognitiveServices.RuleAction","com.azure.resourcemanager.cognitiveservices.models.RuleCategory":"Microsoft.CognitiveServices.RuleCategory","com.azure.resourcemanager.cognitiveservices.models.RuleStatus":"Microsoft.CognitiveServices.RuleStatus","com.azure.resourcemanager.cognitiveservices.models.RuleType":"Microsoft.CognitiveServices.RuleType","com.azure.resourcemanager.cognitiveservices.models.SafetyProviderConfig":"Microsoft.CognitiveServices.SafetyProviderConfig","com.azure.resourcemanager.cognitiveservices.models.SasAuthTypeConnectionProperties":"Microsoft.CognitiveServices.SASAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.ScenarioType":"Microsoft.CognitiveServices.ScenarioType","com.azure.resourcemanager.cognitiveservices.models.ServicePrincipalAuthTypeConnectionProperties":"Microsoft.CognitiveServices.ServicePrincipalAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.ServiceTagOutboundRule":"Microsoft.CognitiveServices.ServiceTagOutboundRule","com.azure.resourcemanager.cognitiveservices.models.ServiceTagOutboundRuleDestination":"Microsoft.CognitiveServices.ServiceTagOutboundRuleDestination","com.azure.resourcemanager.cognitiveservices.models.ServiceTier":"Microsoft.CognitiveServices.ServiceTier","com.azure.resourcemanager.cognitiveservices.models.Sku":"Microsoft.CognitiveServices.Sku","com.azure.resourcemanager.cognitiveservices.models.SkuAvailability":"Microsoft.CognitiveServices.SkuAvailability","com.azure.resourcemanager.cognitiveservices.models.SkuCapability":"Microsoft.CognitiveServices.SkuCapability","com.azure.resourcemanager.cognitiveservices.models.SkuChangeInfo":"Microsoft.CognitiveServices.SkuChangeInfo","com.azure.resourcemanager.cognitiveservices.models.SkuTier":"Microsoft.CognitiveServices.SkuTier","com.azure.resourcemanager.cognitiveservices.models.SshSettings":"Microsoft.CognitiveServices.SshSettings","com.azure.resourcemanager.cognitiveservices.models.ThrottlingRule":"Microsoft.CognitiveServices.ThrottlingRule","com.azure.resourcemanager.cognitiveservices.models.TierUpgradePolicy":"Microsoft.CognitiveServices.TierUpgradePolicy","com.azure.resourcemanager.cognitiveservices.models.TrafficRoutingProtocol":"Microsoft.CognitiveServices.TrafficRoutingProtocol","com.azure.resourcemanager.cognitiveservices.models.TrafficRoutingRule":"Microsoft.CognitiveServices.TrafficRoutingRule","com.azure.resourcemanager.cognitiveservices.models.UnitType":"Microsoft.CognitiveServices.UnitType","com.azure.resourcemanager.cognitiveservices.models.UpgradeAvailabilityStatus":"Microsoft.CognitiveServices.UpgradeAvailabilityStatus","com.azure.resourcemanager.cognitiveservices.models.UserAssignedIdentity":"Microsoft.CognitiveServices.UserAssignedIdentity","com.azure.resourcemanager.cognitiveservices.models.UserOwnedAmlWorkspace":"Microsoft.CognitiveServices.UserOwnedAmlWorkspace","com.azure.resourcemanager.cognitiveservices.models.UserOwnedStorage":"Microsoft.CognitiveServices.UserOwnedStorage","com.azure.resourcemanager.cognitiveservices.models.UsernamePasswordAuthTypeConnectionProperties":"Microsoft.CognitiveServices.UsernamePasswordAuthTypeConnectionProperties","com.azure.resourcemanager.cognitiveservices.models.VersionedAgentReference":"Microsoft.CognitiveServices.VersionedAgentReference","com.azure.resourcemanager.cognitiveservices.models.VirtualNetworkRule":"Microsoft.CognitiveServices.VirtualNetworkRule","com.azure.resourcemanager.cognitiveservices.models.VmPriority":"Microsoft.CognitiveServices.VmPriority","com.azure.resourcemanager.cognitiveservices.models.WorkbenchProperties":"Microsoft.CognitiveServices.WorkbenchProperties"},"generatedFiles":["src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountCapabilityHostsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountConnectionsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AgentApplicationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AgentDeploymentsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ArcDeploymentsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentPlansClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentTiersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ComputeOperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ComputesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DefenderForAISettingsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeletedAccountsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeploymentsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/EncryptionScopesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/LocationBasedModelCapacitiesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeCapacitiesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeDeploymentsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeUsagesOperationGroupsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedNetworkProvisionsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedNetworkSettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ModelCapacitiesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ModelsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/NetworkSecurityPerimeterConfigurationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OutboundRulesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OutboundRulesOperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ProjectCapabilityHostsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ProjectConnectionsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ProjectsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/QuotaTiersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiBlocklistItemsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiBlocklistsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiContentFiltersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiExternalSafetyProvidersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiExternalSafetyProvidersOperationsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiToolLabelsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/RaiTopicsClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceProvidersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/SubscriptionRaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/TestRaiExternalSafetyProvidersClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/WorkbenchesClient.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountModelInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountSkuListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AgentApplicationInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AgentDeploymentInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AgentReferenceResourceArmPaginatedResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ApiKeysInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ArcDeploymentInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CalculateModelCapacityResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CapabilityHostInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanAccountAssociationInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanAccountAssociationProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentTierInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeOperationStatusInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ConnectionPropertiesV2BasicResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DefenderForAISettingInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DefenderForAISettingProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DeploymentInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DomainAvailabilityInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/EncryptionScopeInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/EvaluateDeploymentPoliciesResponseInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeCapacityInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeDeploymentInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeUsageInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedNetworkProvisionStatusInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedNetworkSettingsBasicResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedNetworkSettingsInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedNetworkSettingsPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ModelCapacityListResultValueItemInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ModelInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OutboundRuleBasicResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ProjectCapabilityHostInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ProjectInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/QuotaTierInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiBlocklistInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiBlocklistItemInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiContentFilterInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiExternalSafetyProviderSchemaInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiPolicyInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiToolLabelInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/RaiTopicInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ResourceSkuInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/SkuAvailabilityListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/SkuResourceInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageListResultInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/WorkbenchInner.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/package-info.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountCapabilityHostsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountCapabilityHostsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountConnectionsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountModelImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountSkuListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentApplicationImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentApplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentApplicationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentDeploymentImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AgentReferenceResourceArmPaginatedResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ApiKeysImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ArcDeploymentImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ArcDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ArcDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CalculateModelCapacityResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CapabilityHostImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlanAccountAssociationImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlanImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTierImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeOperationStatusImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeOperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ConnectionPropertiesV2BasicResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DefenderForAISettingImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DefenderForAISettingsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DefenderForAISettingsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DomainAvailabilityImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EncryptionScopeImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EncryptionScopesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EncryptionScopesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EvaluateDeploymentPoliciesResponseImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/LocationBasedModelCapacitiesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/LocationBasedModelCapacitiesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacityImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeUsageImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeUsagesOperationGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeUsagesOperationGroupsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkProvisionStatusImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkProvisionsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkProvisionsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsOperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedNetworkSettingsPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelCapacitiesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelCapacitiesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelCapacityListResultValueItemImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ModelsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/NetworkSecurityPerimeterConfigurationImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/NetworkSecurityPerimeterConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRuleBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRulesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRulesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRulesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OutboundRulesOperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourceListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectCapabilityHostImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectCapabilityHostsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectCapabilityHostsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectConnectionsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ProjectsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/QuotaTierImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/QuotaTiersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/QuotaTiersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistItemImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistItemsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistItemsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiBlocklistsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiContentFilterImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiContentFiltersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiContentFiltersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProviderSchemaImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProvidersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProvidersOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiExternalSafetyProvidersOperationsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiPolicyImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiToolLabelImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiToolLabelsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiToolLabelsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiTopicImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiTopicsClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/RaiTopicsImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkuImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/SkuAvailabilityListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/SkuResourceImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/SubscriptionRaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/SubscriptionRaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/TestRaiExternalSafetyProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/TestRaiExternalSafetyProvidersImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsageImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsageListResultImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/UsagesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchesClientImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/WorkbenchesImpl.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AccountListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AccountModelListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AgentApplicationResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/AgentDeploymentResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ArcDeploymentListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CapabilityHostResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CommitmentPlanAccountAssociationListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CommitmentPlanListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/CommitmentTierListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ComputeListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ConnectionPropertiesV2BasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/DefenderForAISettingResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/DeploymentListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/DeploymentSkuListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/EncryptionScopeListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ManagedComputeCapacityListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ManagedComputeDeploymentListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ManagedComputeUsageListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ManagedNetworkListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ModelCapacityListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ModelListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/NetworkSecurityPerimeterConfigurationList.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/OutboundRuleListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ProjectCapabilityHostResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ProjectListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/QuotaTierListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiBlockListItemsResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiBlockListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiContentFilterListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiExternalSafetyProviderResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiPolicyListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiToolLabelResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/RaiTopicResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/ResourceSkuListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/models/WorkbenchListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/package-info.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AadAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AbusePenalty.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AbusePenaltyAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccessKeyAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Account.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountCapabilityHosts.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountConnections.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountKeyAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountSkuListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Accounts.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ActionType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentApplication.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentApplications.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeploymentProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeploymentState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeploymentType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentDeployments.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentHostingConfiguration.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentHostingType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentProtocol.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentProtocolVersion.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentReference.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentReferenceProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgentReferenceResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgenticApplicationProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AgenticApplicationProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiKeyAuthConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiKeys.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApplicationAuthorizationPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApplicationTrafficRoutingPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentComputeType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentCpuMemoryResourceRequirements.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentKubernetesResources.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentModel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentPatchCpuMemoryResourceRequirements.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentPatchKubernetesResources.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentProvisioningDetails.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentResourceRequirements.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentRuntime.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentSkuName.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentUpdate.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentUpdateProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeploymentVllmParameters.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ArcDeployments.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/AssignedIdentity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/BillingMeterInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/BuiltInAuthorizationScheme.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ByPassSelection.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CalculateModelCapacityParameter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CalculateModelCapacityResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CalculateModelCapacityResultEstimatedCapacity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CallRateLimit.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilityHost.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilityHostKind.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilityHostProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilityHostProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapabilitySettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CapacityConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ChannelsBuiltInAuthorizationPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckDomainAvailabilityParameter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckSkuAvailabilityParameter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ClusterComputeProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentCost.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPeriod.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlan.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanAccountAssociation.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanAssociation.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlans.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentQuota.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTier.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTiers.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Compute.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeOperationStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeOperationStatusProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeOperationStatusType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeOperations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ComputeType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Computes.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionAccessKey.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionAccountKey.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionApiKey.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionAuthType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionCategory.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionGroup.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionManagedIdentity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionOAuth2.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionPersonalAccessToken.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionPropertiesV2.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionPropertiesV2BasicResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionServicePrincipal.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionSharedAccessSignature.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionUpdateContent.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectionUsernamePassword.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ConnectivityEndpoints.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ContainerInstanceComputeProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ContentLevel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CustomBlocklistConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CustomKeys.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/CustomKeysConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DefenderForAISetting.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DefenderForAISettingState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DefenderForAISettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeletedAccounts.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Deployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentCapacitySettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentModel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentModelVersionUpgradeOption.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentPolicyEvaluationResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentRouting.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentScaleSettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentScaleType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentSizeCapacity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentSpeculativeDecoding.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Deployments.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeprecationStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/DomainAvailability.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Encryption.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScope.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScopeProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScopeProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScopeState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EncryptionScopes.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EvaluateDeploymentPoliciesDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EvaluateDeploymentPoliciesDeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EvaluateDeploymentPoliciesRequest.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/EvaluateDeploymentPoliciesResponse.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/FirewallSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/FoundryAutoUpgrade.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/FoundryAutoUpgradeMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/FqdnOutboundRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/HostedAgentDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/HostingModel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IdentityKind.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IdentityManagementType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IdentityProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IpRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/IsolationMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeyName.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeySource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/LocationBasedModelCapacities.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedAgentDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedClusterAgentHostingConfiguration.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeCapacities.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeCapacity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeCapacityProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeployment.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentProvisioningDetails.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeploymentRoutes.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeDeployments.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeUsage.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedComputeUsagesOperationGroups.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedIdentityAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkKind.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkProvisionOptions.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkProvisionStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkProvisions.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsBasicResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsEx.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsOperations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkSettingsPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedNetworkStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedPERequirement.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ManagedPEStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/MetricName.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Model.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelCapacities.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelCapacityCalculatorWorkload.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelCapacityCalculatorWorkloadRequestParam.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelCapacityListResultValueItem.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelDeprecationInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelLifecycleStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelSkuCapacityProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Models.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/MultiRegionSettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkInjection.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkRuleAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterAccessRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterAccessRuleProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterConfiguration.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterConfigurationAssociationInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterConfigurations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkSecurityPerimeterProfileInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NoneAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/NspAccessRuleDirection.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OAuth2AuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Operation.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Operations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OrganizationSharedBuiltInAuthorizationPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Origin.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OutboundRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OutboundRuleBasicResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OutboundRules.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/OutboundRulesOperations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PatAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PatchResourceSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PatchResourceTags.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PatchResourceTagsAndSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PolicyAssignmentEvaluationDetails.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PolicyEvaluationOutcome.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PolicyExpressionEvaluationDetails.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Pool.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointOutboundRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointOutboundRuleDestination.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Project.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectCapabilityHost.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectCapabilityHostProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectCapabilityHosts.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectConnections.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProjectProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Projects.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaLimit.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaScopeType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaTier.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaTierProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaTierUpgradeEligibilityInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaTiers.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaUsageStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiActionType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklist.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistItem.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistItemBulkRequest.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistItemProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistItems.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklistProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiBlocklists.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiContentFilter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiContentFilterProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiContentFilters.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressDefaultAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressHeaderOperation.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressHeaderTransform.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressHeaderValueRef.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressManagedIdentityRef.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressPolicyConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRewriteTarget.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRuleAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRuleActionType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRuleMatch.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressRuleType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressScheme.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiEgressSecretRef.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiExternalSafetyProviderSchema.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiExternalSafetyProviderSchemaProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiExternalSafetyProviders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiExternalSafetyProvidersOperations.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiMonitorConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicies.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyContentFilter.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyContentSource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiPolicyType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiSafetyProviderConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabel.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabelProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabelPropertiesAccountScope.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabelPropertiesProjectScopesItem.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiToolLabels.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiTopic.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiTopicProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RaiTopics.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RegenerateKeyParameters.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RegionSetting.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ReplacementConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RequestMatchPattern.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceBase.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceProviders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictions.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionsReasonCode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionsType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RoleBasedBuiltInAuthorizationPolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RoutingMethods.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RoutingMode.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RuleAction.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RuleCategory.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RuleStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/RuleType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SafetyProviderConfig.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SasAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ScenarioType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ServicePrincipalAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ServiceTagOutboundRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ServiceTagOutboundRuleDestination.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ServiceTier.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Sku.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuAvailability.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuAvailabilityListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuCapability.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuChangeInfo.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuResource.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuTier.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SshSettings.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/SubscriptionRaiPolicies.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/TestRaiExternalSafetyProviders.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/ThrottlingRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/TierUpgradePolicy.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/TrafficRoutingProtocol.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/TrafficRoutingRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UnitType.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UpgradeAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UsageListResult.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usages.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserOwnedAmlWorkspace.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserOwnedStorage.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/UsernamePasswordAuthTypeConnectionProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/VersionedAgentReference.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/VirtualNetworkRule.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/VmPriority.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Workbench.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/WorkbenchProperties.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/Workbenches.java","src/main/java/com/azure/resourcemanager/cognitiveservices/models/package-info.java","src/main/java/com/azure/resourcemanager/cognitiveservices/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cognitiveservices/proxy-config.json b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cognitiveservices/proxy-config.json index c379e316b1d8..70c01bdb6226 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cognitiveservices/proxy-config.json +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cognitiveservices/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.cognitiveservices.implementation.AccountCapabilityHostsClientImpl$AccountCapabilityHostsService"],["com.azure.resourcemanager.cognitiveservices.implementation.AccountConnectionsClientImpl$AccountConnectionsService"],["com.azure.resourcemanager.cognitiveservices.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.cognitiveservices.implementation.AdapterDeploymentsClientImpl$AdapterDeploymentsService"],["com.azure.resourcemanager.cognitiveservices.implementation.AgentApplicationsClientImpl$AgentApplicationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.AgentDeploymentsClientImpl$AgentDeploymentsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ArcDeploymentsClientImpl$ArcDeploymentsService"],["com.azure.resourcemanager.cognitiveservices.implementation.CommitmentPlansClientImpl$CommitmentPlansService"],["com.azure.resourcemanager.cognitiveservices.implementation.CommitmentTiersClientImpl$CommitmentTiersService"],["com.azure.resourcemanager.cognitiveservices.implementation.ComputeOperationsClientImpl$ComputeOperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ComputesClientImpl$ComputesService"],["com.azure.resourcemanager.cognitiveservices.implementation.CostControlsClientImpl$CostControlsService"],["com.azure.resourcemanager.cognitiveservices.implementation.DefenderForAISettingsClientImpl$DefenderForAISettingsService"],["com.azure.resourcemanager.cognitiveservices.implementation.DeletedAccountsClientImpl$DeletedAccountsService"],["com.azure.resourcemanager.cognitiveservices.implementation.DeploymentsClientImpl$DeploymentsService"],["com.azure.resourcemanager.cognitiveservices.implementation.EncryptionScopesClientImpl$EncryptionScopesService"],["com.azure.resourcemanager.cognitiveservices.implementation.LocationBasedModelCapacitiesClientImpl$LocationBasedModelCapacitiesService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedComputeCapacitiesClientImpl$ManagedComputeCapacitiesService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedComputeDeploymentsClientImpl$ManagedComputeDeploymentsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedComputeUsagesOperationGroupsClientImpl$ManagedComputeUsagesOperationGroupsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedNetworkProvisionsClientImpl$ManagedNetworkProvisionsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedNetworkSettingsOperationsClientImpl$ManagedNetworkSettingsOperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ModelCapacitiesClientImpl$ModelCapacitiesService"],["com.azure.resourcemanager.cognitiveservices.implementation.ModelsClientImpl$ModelsService"],["com.azure.resourcemanager.cognitiveservices.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.OutboundRulesClientImpl$OutboundRulesService"],["com.azure.resourcemanager.cognitiveservices.implementation.OutboundRulesOperationsClientImpl$OutboundRulesOperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.cognitiveservices.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.cognitiveservices.implementation.ProjectCapabilityHostsClientImpl$ProjectCapabilityHostsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ProjectConnectionsClientImpl$ProjectConnectionsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ProjectsClientImpl$ProjectsService"],["com.azure.resourcemanager.cognitiveservices.implementation.QuotaTiersClientImpl$QuotaTiersService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiBindingsClientImpl$RaiBindingsService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiBlocklistItemsClientImpl$RaiBlocklistItemsService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiBlocklistsClientImpl$RaiBlocklistsService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiContentFiltersClientImpl$RaiContentFiltersService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiExternalSafetyProvidersClientImpl$RaiExternalSafetyProvidersService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiExternalSafetyProvidersOperationsClientImpl$RaiExternalSafetyProvidersOperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiPoliciesClientImpl$RaiPoliciesService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiRegosClientImpl$RaiRegosService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiToolLabelsClientImpl$RaiToolLabelsService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiTopicsClientImpl$RaiTopicsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.cognitiveservices.implementation.ResourceSkusClientImpl$ResourceSkusService"],["com.azure.resourcemanager.cognitiveservices.implementation.SubscriptionRaiPoliciesClientImpl$SubscriptionRaiPoliciesService"],["com.azure.resourcemanager.cognitiveservices.implementation.TestRaiExternalSafetyProvidersClientImpl$TestRaiExternalSafetyProvidersService"],["com.azure.resourcemanager.cognitiveservices.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.cognitiveservices.implementation.WorkbenchesClientImpl$WorkbenchesService"]] \ No newline at end of file +[["com.azure.resourcemanager.cognitiveservices.implementation.AccountCapabilityHostsClientImpl$AccountCapabilityHostsService"],["com.azure.resourcemanager.cognitiveservices.implementation.AccountConnectionsClientImpl$AccountConnectionsService"],["com.azure.resourcemanager.cognitiveservices.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.cognitiveservices.implementation.AgentApplicationsClientImpl$AgentApplicationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.AgentDeploymentsClientImpl$AgentDeploymentsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ArcDeploymentsClientImpl$ArcDeploymentsService"],["com.azure.resourcemanager.cognitiveservices.implementation.CommitmentPlansClientImpl$CommitmentPlansService"],["com.azure.resourcemanager.cognitiveservices.implementation.CommitmentTiersClientImpl$CommitmentTiersService"],["com.azure.resourcemanager.cognitiveservices.implementation.ComputeOperationsClientImpl$ComputeOperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ComputesClientImpl$ComputesService"],["com.azure.resourcemanager.cognitiveservices.implementation.DefenderForAISettingsClientImpl$DefenderForAISettingsService"],["com.azure.resourcemanager.cognitiveservices.implementation.DeletedAccountsClientImpl$DeletedAccountsService"],["com.azure.resourcemanager.cognitiveservices.implementation.DeploymentsClientImpl$DeploymentsService"],["com.azure.resourcemanager.cognitiveservices.implementation.EncryptionScopesClientImpl$EncryptionScopesService"],["com.azure.resourcemanager.cognitiveservices.implementation.LocationBasedModelCapacitiesClientImpl$LocationBasedModelCapacitiesService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedComputeCapacitiesClientImpl$ManagedComputeCapacitiesService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedComputeDeploymentsClientImpl$ManagedComputeDeploymentsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedComputeUsagesOperationGroupsClientImpl$ManagedComputeUsagesOperationGroupsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedNetworkProvisionsClientImpl$ManagedNetworkProvisionsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ManagedNetworkSettingsOperationsClientImpl$ManagedNetworkSettingsOperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ModelCapacitiesClientImpl$ModelCapacitiesService"],["com.azure.resourcemanager.cognitiveservices.implementation.ModelsClientImpl$ModelsService"],["com.azure.resourcemanager.cognitiveservices.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.OutboundRulesClientImpl$OutboundRulesService"],["com.azure.resourcemanager.cognitiveservices.implementation.OutboundRulesOperationsClientImpl$OutboundRulesOperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.cognitiveservices.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.cognitiveservices.implementation.ProjectCapabilityHostsClientImpl$ProjectCapabilityHostsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ProjectConnectionsClientImpl$ProjectConnectionsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ProjectsClientImpl$ProjectsService"],["com.azure.resourcemanager.cognitiveservices.implementation.QuotaTiersClientImpl$QuotaTiersService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiBlocklistItemsClientImpl$RaiBlocklistItemsService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiBlocklistsClientImpl$RaiBlocklistsService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiContentFiltersClientImpl$RaiContentFiltersService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiExternalSafetyProvidersClientImpl$RaiExternalSafetyProvidersService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiExternalSafetyProvidersOperationsClientImpl$RaiExternalSafetyProvidersOperationsService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiPoliciesClientImpl$RaiPoliciesService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiToolLabelsClientImpl$RaiToolLabelsService"],["com.azure.resourcemanager.cognitiveservices.implementation.RaiTopicsClientImpl$RaiTopicsService"],["com.azure.resourcemanager.cognitiveservices.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.cognitiveservices.implementation.ResourceSkusClientImpl$ResourceSkusService"],["com.azure.resourcemanager.cognitiveservices.implementation.SubscriptionRaiPoliciesClientImpl$SubscriptionRaiPoliciesService"],["com.azure.resourcemanager.cognitiveservices.implementation.TestRaiExternalSafetyProvidersClientImpl$TestRaiExternalSafetyProvidersService"],["com.azure.resourcemanager.cognitiveservices.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.cognitiveservices.implementation.WorkbenchesClientImpl$WorkbenchesService"]] \ No newline at end of file diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsCreateOrUpdateSamples.java index 55d01531def9..5d254dbf3c07 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class AccountCapabilityHostsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountCapabilityHost/createOrUpdate.json + * x-ms-original-file: 2026-07-15-preview/AccountCapabilityHost/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Account CapabilityHost. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsDeleteSamples.java index bc63f0921188..671ce356f055 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AccountCapabilityHostsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountCapabilityHost/delete.json + * x-ms-original-file: 2026-07-15-preview/AccountCapabilityHost/delete.json */ /** * Sample code: Delete Account CapabilityHost. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsGetSamples.java index 68279e6adb22..6a3a782bdc6f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AccountCapabilityHostsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountCapabilityHost/get.json + * x-ms-original-file: 2026-07-15-preview/AccountCapabilityHost/get.json */ /** * Sample code: Get Account CapabilityHost. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsListSamples.java index 492075803965..fbedf2b6b13f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsListSamples.java @@ -9,7 +9,7 @@ */ public final class AccountCapabilityHostsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountCapabilityHost/list.json + * x-ms-original-file: 2026-07-15-preview/AccountCapabilityHost/list.json */ /** * Sample code: List Account CapabilityHosts. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsCreateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsCreateSamples.java index 87a04f8497b6..5c5fc92248a4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsCreateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsCreateSamples.java @@ -13,7 +13,7 @@ */ public final class AccountConnectionsCreateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/create.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/create.json */ /** * Sample code: CreateAccountConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsDeleteSamples.java index 3bee1f02a51a..f492ac9cb791 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AccountConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/delete.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/delete.json */ /** * Sample code: DeleteAccountConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsGetSamples.java index 4a7f7bf4643e..ecfe3e702a49 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AccountConnectionsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/get.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/get.json */ /** * Sample code: GetAccountConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsListSamples.java index 48fe1be8a224..1636e774d06c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class AccountConnectionsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/list.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/list.json */ /** * Sample code: ListAccountConnections. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsUpdateSamples.java index d38fc93db833..cc695fa918bd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class AccountConnectionsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AccountConnection/update.json + * x-ms-original-file: 2026-07-15-preview/AccountConnection/update.json */ /** * Sample code: UpdateAccountConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java index a9450e098ed1..19b8557cc0ad 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java @@ -24,7 +24,7 @@ */ public final class AccountsCreateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateAccountMin.json + * x-ms-original-file: 2026-07-15-preview/CreateAccountMin.json */ /** * Sample code: Create Account Min. @@ -44,7 +44,7 @@ public static void createAccountMin(com.azure.resourcemanager.cognitiveservices. } /* - * x-ms-original-file: 2026-09-15-preview/CreateAccount.json + * x-ms-original-file: 2026-07-15-preview/CreateAccount.json */ /** * Sample code: Create Account. @@ -76,7 +76,7 @@ public static void createAccount(com.azure.resourcemanager.cognitiveservices.Cog } /* - * x-ms-original-file: 2026-09-15-preview/CreateAccountWithAgentHostingConfiguration.json + * x-ms-original-file: 2026-07-15-preview/CreateAccountWithAgentHostingConfiguration.json */ /** * Sample code: Create a Foundry account with customer-owned AKS hosting. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java index a301f61e8407..0339d756b2cf 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteAccount.json + * x-ms-original-file: 2026-07-15-preview/DeleteAccount.json */ /** * Sample code: Delete Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsEvaluateDeploymentPoliciesSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsEvaluateDeploymentPoliciesSamples.java index 1a5b927b336a..804478e798d0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsEvaluateDeploymentPoliciesSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsEvaluateDeploymentPoliciesSamples.java @@ -15,7 +15,7 @@ */ public final class AccountsEvaluateDeploymentPoliciesSamples { /* - * x-ms-original-file: 2026-09-15-preview/EvaluateDeploymentPolicies.json + * x-ms-original-file: 2026-07-15-preview/EvaluateDeploymentPolicies.json */ /** * Sample code: EvaluateDeploymentPolicies. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java index f0429349cf85..ab1548137351 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetAccount.json + * x-ms-original-file: 2026-07-15-preview/GetAccount.json */ /** * Sample code: Get Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java index 927976da4c16..2434b9accd7b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListAccountsByResourceGroup.json + * x-ms-original-file: 2026-07-15-preview/ListAccountsByResourceGroup.json */ /** * Sample code: List Accounts by Resource Group. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java index d351b74c08f9..4352d46a42c9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsListKeysSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListKeys.json + * x-ms-original-file: 2026-07-15-preview/ListKeys.json */ /** * Sample code: List Keys. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListModelsSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListModelsSamples.java index 90f0e43d90dd..a21bc1ae403b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListModelsSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListModelsSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsListModelsSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListAccountModels.json + * x-ms-original-file: 2026-07-15-preview/ListAccountModels.json */ /** * Sample code: List AccountModels. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java index a1ccc3e4aa95..58bb145adc76 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListAccountsBySubscription.json + * x-ms-original-file: 2026-07-15-preview/ListAccountsBySubscription.json */ /** * Sample code: List Accounts by Subscription. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java index 9a54884d7b4c..ba57ee59e830 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsListSkusSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListSkus.json + * x-ms-original-file: 2026-07-15-preview/ListSkus.json */ /** * Sample code: List SKUs. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java index b9c9a4297d3f..47e1456ea5d3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsListUsagesSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetUsages.json + * x-ms-original-file: 2026-07-15-preview/GetUsages.json */ /** * Sample code: Get Usages. @@ -22,7 +22,7 @@ public static void getUsages(com.azure.resourcemanager.cognitiveservices.Cogniti } /* - * x-ms-original-file: 2026-09-15-preview/GetUsagesClassicScope.json + * x-ms-original-file: 2026-07-15-preview/GetUsagesClassicScope.json */ /** * Sample code: Get Usages Classic Scope. @@ -36,7 +36,7 @@ public static void getUsages(com.azure.resourcemanager.cognitiveservices.Cogniti } /* - * x-ms-original-file: 2026-09-15-preview/GetUsagesDataZoneScope.json + * x-ms-original-file: 2026-07-15-preview/GetUsagesDataZoneScope.json */ /** * Sample code: Get Usages DataZone Scope. @@ -50,7 +50,7 @@ public static void getUsages(com.azure.resourcemanager.cognitiveservices.Cogniti } /* - * x-ms-original-file: 2026-09-15-preview/GetUsagesGlobalScope.json + * x-ms-original-file: 2026-07-15-preview/GetUsagesGlobalScope.json */ /** * Sample code: Get Usages Global Scope. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java index 96be89e0e588..75edb655c10c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java @@ -12,7 +12,7 @@ */ public final class AccountsRegenerateKeySamples { /* - * x-ms-original-file: 2026-09-15-preview/RegenerateKey.json + * x-ms-original-file: 2026-07-15-preview/RegenerateKey.json */ /** * Sample code: Regenerate Keys. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java index cfeb07885fdd..56e6eb93a5b5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.cognitiveservices.generated; import com.azure.resourcemanager.cognitiveservices.models.Account; -import com.azure.resourcemanager.cognitiveservices.models.AccountProperties; -import com.azure.resourcemanager.cognitiveservices.models.CostControlConnections; import com.azure.resourcemanager.cognitiveservices.models.Sku; /** @@ -14,7 +12,7 @@ */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateAccount.json + * x-ms-original-file: 2026-07-15-preview/UpdateAccount.json */ /** * Sample code: Update Account. @@ -25,13 +23,6 @@ public static void updateAccount(com.azure.resourcemanager.cognitiveservices.Cog Account resource = manager.accounts() .getByResourceGroupWithResponse("bvttest", "bingSearch", com.azure.core.util.Context.NONE) .getValue(); - resource.update() - .withProperties(new AccountProperties().withCostControlConnections(new CostControlConnections() - .withAppInsightsConnectionId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/bingSearch/connections/myAppInsightsConnection") - .withEventGridConnectionId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/bvttest/providers/Microsoft.CognitiveServices/accounts/bingSearch/connections/myEventGridConnection"))) - .withSku(new Sku().withName("S2")) - .apply(); + resource.update().withSku(new Sku().withName("S2")).apply(); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsCreateOrUpdateSamples.java deleted file mode 100644 index f36af3b674c5..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentProperties; - -/** - * Samples for AdapterDeployments CreateOrUpdate. - */ -public final class AdapterDeploymentsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateAdapterDeployment.json - */ - /** - * Sample code: CreateOrUpdateAdapterDeployment. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - createOrUpdateAdapterDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.adapterDeployments() - .define("adapterDeploymentName") - .withExistingAccount("resourceGroupName", "accountName") - .withProperties(new AdapterDeploymentProperties() - .withSourceModelId("azureai://accounts/accountName/projects/projectName/models/modelName/versions/1") - .withTargetDeploymentName("managedComputeDeploymentName")) - .create(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsDeleteSamples.java deleted file mode 100644 index 7ca2f5c5eaa7..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for AdapterDeployments Delete. - */ -public final class AdapterDeploymentsDeleteSamples { - /* - * x-ms-original-file: 2026-09-15-preview/DeleteAdapterDeployment.json - */ - /** - * Sample code: DeleteAdapterDeployment. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - deleteAdapterDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.adapterDeployments() - .delete("resourceGroupName", "accountName", "adapterDeploymentName", "\"0x8D1234567890ABC\"", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsGetSamples.java deleted file mode 100644 index 758bdd120ee0..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for AdapterDeployments Get. - */ -public final class AdapterDeploymentsGetSamples { - /* - * x-ms-original-file: 2026-09-15-preview/GetAdapterDeployment.json - */ - /** - * Sample code: GetAdapterDeployment. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - getAdapterDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.adapterDeployments() - .getWithResponse("resourceGroupName", "accountName", "adapterDeploymentName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsListSamples.java deleted file mode 100644 index a3d4407cd671..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for AdapterDeployments List. - */ -public final class AdapterDeploymentsListSamples { - /* - * x-ms-original-file: 2026-09-15-preview/ListAdapterDeployments.json - */ - /** - * Sample code: ListAdapterDeployments. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - listAdapterDeployments(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.adapterDeployments().list("resourceGroupName", "accountName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsCreateOrUpdateSamples.java index d2d120d479e3..d6497d03c080 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class AgentApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/createOrUpdate.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/createOrUpdate.json */ /** * Sample code: Create or Update Account Agent Application. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDeleteSamples.java index 48af57cacb21..ac60bb43995e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AgentApplicationsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/delete.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/delete.json */ /** * Sample code: Delete Account Agent Application. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDisableSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDisableSamples.java index ad7e42c59b16..7851186972f6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDisableSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDisableSamples.java @@ -9,7 +9,7 @@ */ public final class AgentApplicationsDisableSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/disable.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/disable.json */ /** * Sample code: Disable Agent Application. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsEnableSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsEnableSamples.java index 35f9eef51374..202618de889f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsEnableSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsEnableSamples.java @@ -9,7 +9,7 @@ */ public final class AgentApplicationsEnableSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/enable.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/enable.json */ /** * Sample code: Enable Agent Application. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsGetSamples.java index b8f25b1175b9..79f690788216 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AgentApplicationsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/get.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/get.json */ /** * Sample code: Get Account Agent Application. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListAgentsSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListAgentsSamples.java index 1ef06a1e61d5..5da902fafb0c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListAgentsSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListAgentsSamples.java @@ -9,7 +9,7 @@ */ public final class AgentApplicationsListAgentsSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/listAgents.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/listAgents.json */ /** * Sample code: List Agents for Agent Application. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListSamples.java index 87abd2ec2a0e..bfbe608e279a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListSamples.java @@ -11,7 +11,7 @@ */ public final class AgentApplicationsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentApplication/list.json + * x-ms-original-file: 2026-07-15-preview/AgentApplication/list.json */ /** * Sample code: List Account Agent Applications. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsCreateOrUpdateSamples.java index fed612bbecd6..2d282960ee0d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class AgentDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/createOrUpdate.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/createOrUpdate.json */ /** * Sample code: Create or Update Agent Deployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsDeleteSamples.java index 57ad2c165914..bc74cafec5d9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AgentDeploymentsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/delete.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/delete.json */ /** * Sample code: Delete Agent Deployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsGetSamples.java index 818b09a003bb..8257d05ed871 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AgentDeploymentsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/get.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/get.json */ /** * Sample code: Get Agent Deployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsListSamples.java index 8a31f642f595..6adb58b85460 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsListSamples.java @@ -9,7 +9,7 @@ */ public final class AgentDeploymentsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/list.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/list.json */ /** * Sample code: List Agent Deployments. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStartSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStartSamples.java index fd06a9716aa2..5444d5872429 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStartSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStartSamples.java @@ -9,7 +9,7 @@ */ public final class AgentDeploymentsStartSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/start.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/start.json */ /** * Sample code: Start Agent Deployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStopSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStopSamples.java index cabb0019d0b9..bcd37941675a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStopSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStopSamples.java @@ -9,7 +9,7 @@ */ public final class AgentDeploymentsStopSamples { /* - * x-ms-original-file: 2026-09-15-preview/AgentDeployment/stop.json + * x-ms-original-file: 2026-07-15-preview/AgentDeployment/stop.json */ /** * Sample code: Stop Agent Deployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsCreateOrUpdateSamples.java index 485f94daeba0..445f71adcba6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsCreateOrUpdateSamples.java @@ -21,7 +21,7 @@ */ public final class ArcDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateArcDeployment.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateArcDeployment.json */ /** * Sample code: CreateOrUpdateArcDeployment. @@ -49,7 +49,7 @@ public final class ArcDeploymentsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateArcDeploymentWithTemplate.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateArcDeploymentWithTemplate.json */ /** * Sample code: CreateOrUpdateArcDeploymentWithTemplate. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsDeleteSamples.java index 65f6c2854c09..50d69c36178a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ArcDeploymentsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteArcDeployment.json + * x-ms-original-file: 2026-07-15-preview/DeleteArcDeployment.json */ /** * Sample code: DeleteArcDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsGetSamples.java index 2d69bebea7aa..9dd30d6d2e98 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ArcDeploymentsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetArcDeployment.json + * x-ms-original-file: 2026-07-15-preview/GetArcDeployment.json */ /** * Sample code: GetArcDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsListSamples.java index c6bac7923130..0d23bb4c9390 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ArcDeploymentsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListArcDeployments.json + * x-ms-original-file: 2026-07-15-preview/ListArcDeployments.json */ /** * Sample code: ListArcDeployments. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsUpdateSamples.java index f842811b43cb..c87b64dcaabc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class ArcDeploymentsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateArcDeployment.json + * x-ms-original-file: 2026-07-15-preview/UpdateArcDeployment.json */ /** * Sample code: UpdateArcDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateAssociationSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateAssociationSamples.java index 03cbcff0a32d..8539f46af412 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateAssociationSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateAssociationSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansCreateOrUpdateAssociationSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateSharedCommitmentPlanAssociation.json + * x-ms-original-file: 2026-07-15-preview/CreateSharedCommitmentPlanAssociation.json */ /** * Sample code: PutCommitmentPlan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdatePlanSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdatePlanSamples.java index a066115abee3..7b1e1604debf 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdatePlanSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdatePlanSamples.java @@ -14,7 +14,7 @@ */ public final class CommitmentPlansCreateOrUpdatePlanSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateSharedCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/CreateSharedCommitmentPlan.json */ /** * Sample code: Create Commitment Plan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateSamples.java index 0cdb37a7436a..fe295d90f3d4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class CommitmentPlansCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/PutCommitmentPlan.json */ /** * Sample code: PutCommitmentPlan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteAssociationSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteAssociationSamples.java index b416423cc92c..1af8b587030d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteAssociationSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteAssociationSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansDeleteAssociationSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteSharedCommitmentPlanAssociation.json + * x-ms-original-file: 2026-07-15-preview/DeleteSharedCommitmentPlanAssociation.json */ /** * Sample code: DeleteCommitmentPlan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeletePlanSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeletePlanSamples.java index 53c8407e9184..59dfb22384f3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeletePlanSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeletePlanSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansDeletePlanSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteSharedCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/DeleteSharedCommitmentPlan.json */ /** * Sample code: Delete Commitment Plan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteSamples.java index 755e6ffb8dca..38f1df42a841 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/DeleteCommitmentPlan.json */ /** * Sample code: DeleteCommitmentPlan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetAssociationSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetAssociationSamples.java index 438806b86884..1b297d2ceb4e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetAssociationSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetAssociationSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansGetAssociationSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetSharedCommitmentPlanAssociation.json + * x-ms-original-file: 2026-07-15-preview/GetSharedCommitmentPlanAssociation.json */ /** * Sample code: GetCommitmentPlan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetByResourceGroupSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetByResourceGroupSamples.java index 49dfdf630f5d..2269071eb235 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetByResourceGroupSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetSharedCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/GetSharedCommitmentPlan.json */ /** * Sample code: Get Commitment Plan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetSamples.java index bb4496e13cbd..03a5359423d7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/GetCommitmentPlan.json */ /** * Sample code: GetCommitmentPlan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListAssociationsSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListAssociationsSamples.java index 47218a02bdd8..94bf9da36a0a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListAssociationsSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListAssociationsSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansListAssociationsSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListSharedCommitmentPlanAssociations.json + * x-ms-original-file: 2026-07-15-preview/ListSharedCommitmentPlanAssociations.json */ /** * Sample code: ListCommitmentPlans. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListByResourceGroupSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListByResourceGroupSamples.java index 118485c6ceea..c72ed290bf85 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListByResourceGroupSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansListByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListSharedCommitmentPlansByResourceGroup.json + * x-ms-original-file: 2026-07-15-preview/ListSharedCommitmentPlansByResourceGroup.json */ /** * Sample code: List Commitment Plans by Resource Group. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListPlansBySubscriptionSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListPlansBySubscriptionSamples.java index 7d9bbfbeeb2f..5d15fffddf0c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListPlansBySubscriptionSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListPlansBySubscriptionSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansListPlansBySubscriptionSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListSharedCommitmentPlansBySubscription.json + * x-ms-original-file: 2026-07-15-preview/ListSharedCommitmentPlansBySubscription.json */ /** * Sample code: List Accounts by Subscription. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListSamples.java index 47073be6dba9..075747ee365d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentPlansListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListCommitmentPlans.json + * x-ms-original-file: 2026-07-15-preview/ListCommitmentPlans.json */ /** * Sample code: ListCommitmentPlans. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansUpdatePlanSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansUpdatePlanSamples.java index ef2239a00152..cb00f3f93747 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansUpdatePlanSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansUpdatePlanSamples.java @@ -13,7 +13,7 @@ */ public final class CommitmentPlansUpdatePlanSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateSharedCommitmentPlan.json + * x-ms-original-file: 2026-07-15-preview/UpdateSharedCommitmentPlan.json */ /** * Sample code: Create Commitment Plan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListSamples.java index 7c036b93b3f8..a2a5ae207556 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListSamples.java @@ -9,7 +9,7 @@ */ public final class CommitmentTiersListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListCommitmentTiers.json + * x-ms-original-file: 2026-07-15-preview/ListCommitmentTiers.json */ /** * Sample code: ListCommitmentTiers. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputeOperationsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputeOperationsGetSamples.java index 86054c208e4c..24f8de72b4e6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputeOperationsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputeOperationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ComputeOperationsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetComputeOperationStatus.json + * x-ms-original-file: 2026-07-15-preview/GetComputeOperationStatus.json */ /** * Sample code: GetComputeOperationStatus. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesCreateOrUpdateSamples.java index 6f60dcaed9cd..10102049c49c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesCreateOrUpdateSamples.java @@ -21,7 +21,7 @@ */ public final class ComputesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/PutContainerInstanceCompute.json */ /** * Sample code: PutContainerInstanceCompute. @@ -47,7 +47,7 @@ public final class ComputesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/PutCompute.json + * x-ms-original-file: 2026-07-15-preview/PutCompute.json */ /** * Sample code: PutCompute. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesDeleteSamples.java index 7851efdbe11d..24a920a2f2fe 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ComputesDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteCompute.json + * x-ms-original-file: 2026-07-15-preview/DeleteCompute.json */ /** * Sample code: DeleteCompute. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesGetSamples.java index 6b6b5abf14ad..c33fb0ad02b0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ComputesGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/GetContainerInstanceCompute.json */ /** * Sample code: GetContainerInstanceCompute. @@ -24,7 +24,7 @@ public final class ComputesGetSamples { } /* - * x-ms-original-file: 2026-09-15-preview/GetCompute.json + * x-ms-original-file: 2026-07-15-preview/GetCompute.json */ /** * Sample code: GetCompute. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesListSamples.java index dad190453084..bcbf20748361 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesListSamples.java @@ -9,7 +9,7 @@ */ public final class ComputesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListComputes.json + * x-ms-original-file: 2026-07-15-preview/ListComputes.json */ /** * Sample code: ListComputes. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesRestartSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesRestartSamples.java index 345ac1f65259..ed9e6970379b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesRestartSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesRestartSamples.java @@ -9,7 +9,7 @@ */ public final class ComputesRestartSamples { /* - * x-ms-original-file: 2026-09-15-preview/RestartContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/RestartContainerInstanceCompute.json */ /** * Sample code: RestartContainerInstanceCompute. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesStartSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesStartSamples.java index 0c1b16928815..313cdb6d1f45 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesStartSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesStartSamples.java @@ -9,7 +9,7 @@ */ public final class ComputesStartSamples { /* - * x-ms-original-file: 2026-09-15-preview/StartContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/StartContainerInstanceCompute.json */ /** * Sample code: StartContainerInstanceCompute. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesStopSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesStopSamples.java index 66c2d68ad060..2aca9192c40b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesStopSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ComputesStopSamples.java @@ -9,7 +9,7 @@ */ public final class ComputesStopSamples { /* - * x-ms-original-file: 2026-09-15-preview/StopContainerInstanceCompute.json + * x-ms-original-file: 2026-07-15-preview/StopContainerInstanceCompute.json */ /** * Sample code: StopContainerInstanceCompute. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsCreateOrUpdateSamples.java deleted file mode 100644 index 51eb6ba04aab..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsCreateOrUpdateSamples.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimension; -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimensionType; -import com.azure.resourcemanager.cognitiveservices.models.CostControlMatch; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPeriod; -import com.azure.resourcemanager.cognitiveservices.models.CostControlProperties; -import com.azure.resourcemanager.cognitiveservices.models.CostControlRule; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThreshold; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdAction; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdType; -import com.azure.resourcemanager.cognitiveservices.models.CostControlUnit; -import java.util.Arrays; - -/** - * Samples for CostControls CreateOrUpdate. - */ -public final class CostControlsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/createOrUpdate.json - */ - /** - * Sample code: Create a cost control with all settings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void createACostControlWithAllSettings( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls() - .define("production-agents") - .withExistingAccount("foundry-resource-group", "foundry-account") - .withProperties(new CostControlProperties().withDisplayName("Production agent monthly budget") - .withRules(Arrays.asList(new CostControlRule().withName("monthly-agent-budget") - .withCounterKey(new CostControlDimension().withType(CostControlDimensionType.AGENT)) - .withUnit(CostControlUnit.USD) - .withAmount(1000.0) - .withPeriod(CostControlPeriod.MONTH) - .withRecurring(true) - .withMatch(new CostControlMatch().withAgentResourceIds(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/accounts/foundry-account/project/production/agent/customer-support-agent", - "/subscriptions/00000000-1111-2222-3333-444444444444/accounts/foundry-account/project/production/agent/sales-assistant-agent")) - .withIdentityObjectIds(Arrays.asList("11111111-2222-3333-4444-555555555555")) - .withSessionIds(Arrays.asList("production-session")) - .withProjectIds(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/projects/production"))) - .withThresholds(Arrays.asList( - new CostControlThreshold().withType(CostControlThresholdType.PERCENTAGE) - .withValue(80.0) - .withAction(CostControlThresholdAction.ALERT), - new CostControlThreshold().withType(CostControlThresholdType.ABSOLUTE) - .withValue(1000.0) - .withAction(CostControlThresholdAction.BLOCK))), - new CostControlRule().withName("daily-account-budget") - .withCounterKey(new CostControlDimension().withType(CostControlDimensionType.ACCOUNT)) - .withUnit(CostControlUnit.USD) - .withAmount(100.0) - .withPeriod(CostControlPeriod.DAY) - .withRecurring(true) - .withThresholds( - Arrays.asList(new CostControlThreshold().withType(CostControlThresholdType.PERCENTAGE) - .withValue(90.0) - .withAction(CostControlThresholdAction.ALERT)))))) - .withIfNoneMatch("*") - .create(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsDeleteSamples.java deleted file mode 100644 index 73c4f8dd76dd..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for CostControls Delete. - */ -public final class CostControlsDeleteSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/delete.json - */ - /** - * Sample code: Delete a cost control conditionally. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - deleteACostControlConditionally(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls() - .deleteWithResponse("foundry-resource-group", "foundry-account", "production-agents", - "\"00000000-0000-0000-0000-000000000002\"", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsGetSamples.java deleted file mode 100644 index c3823c807874..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsGetSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for CostControls Get. - */ -public final class CostControlsGetSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/get.json - */ - /** - * Sample code: Get a cost control with all settings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - getACostControlWithAllSettings(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls() - .getWithResponse("foundry-resource-group", "foundry-account", "production-agents", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/getLegacy.json - */ - /** - * Sample code: Read a legacy cost control without authoring its legacy values. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void readALegacyCostControlWithoutAuthoringItsLegacyValues( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls() - .getWithResponse("foundry-resource-group", "foundry-account", "legacy-budget", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsListSamples.java deleted file mode 100644 index 63e7c0417e1d..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for CostControls List. - */ -public final class CostControlsListSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/list.json - */ - /** - * Sample code: List cost controls with all settings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - listCostControlsWithAllSettings(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.costControls().list("foundry-resource-group", "foundry-account", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsUpdateSamples.java deleted file mode 100644 index e0fec2a778d4..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsUpdateSamples.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.resourcemanager.cognitiveservices.models.CostControl; -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimension; -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimensionType; -import com.azure.resourcemanager.cognitiveservices.models.CostControlMatch; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPatchProperties; -import com.azure.resourcemanager.cognitiveservices.models.CostControlPeriod; -import com.azure.resourcemanager.cognitiveservices.models.CostControlRule; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThreshold; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdAction; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdType; -import com.azure.resourcemanager.cognitiveservices.models.CostControlUnit; -import java.util.Arrays; - -/** - * Samples for CostControls Update. - */ -public final class CostControlsUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/update.json - */ - /** - * Sample code: Update all configurable cost control settings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateAllConfigurableCostControlSettings( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - CostControl resource = manager.costControls() - .getWithResponse("foundry-resource-group", "foundry-account", "production-agents", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new CostControlPatchProperties().withDisplayName("Updated production agent budget") - .withRules(Arrays.asList(new CostControlRule().withName("monthly-agent-budget") - .withCounterKey(new CostControlDimension().withType(CostControlDimensionType.AGENT)) - .withUnit(CostControlUnit.USD) - .withAmount(1500.0) - .withPeriod(CostControlPeriod.MONTH) - .withRecurring(true) - .withMatch(new CostControlMatch().withAgentResourceIds(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/accounts/foundry-account/project/production/agent/customer-support-agent", - "/subscriptions/00000000-1111-2222-3333-444444444444/accounts/foundry-account/project/production/agent/sales-assistant-agent")) - .withIdentityObjectIds(Arrays.asList("11111111-2222-3333-4444-555555555555")) - .withSessionIds(Arrays.asList("production-session")) - .withProjectIds(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/projects/production"))) - .withThresholds(Arrays.asList( - new CostControlThreshold().withType(CostControlThresholdType.PERCENTAGE) - .withValue(80.0) - .withAction(CostControlThresholdAction.ALERT), - new CostControlThreshold().withType(CostControlThresholdType.ABSOLUTE) - .withValue(1500.0) - .withAction(CostControlThresholdAction.BLOCK)))))) - .withIfMatch("\"00000000-0000-0000-0000-000000000001\"") - .apply(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/CostControl/updateMetadata.json - */ - /** - * Sample code: Update metadata while preserving legacy rules. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateMetadataWhilePreservingLegacyRules( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - CostControl resource = manager.costControls() - .getWithResponse("foundry-resource-group", "foundry-account", "legacy-budget", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new CostControlPatchProperties().withDisplayName("Renamed legacy budget")) - .withIfMatch("\"00000000-0000-0000-0000-000000000001\"") - .apply(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsCreateOrUpdateSamples.java index af018aa4d6c0..2613226553c1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class DefenderForAISettingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutDefenderForAISetting.json + * x-ms-original-file: 2026-07-15-preview/PutDefenderForAISetting.json */ /** * Sample code: PutDefenderForAISetting. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsGetSamples.java index ed9a2e11fdff..a54d38923216 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DefenderForAISettingsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetDefenderForAISetting.json + * x-ms-original-file: 2026-07-15-preview/GetDefenderForAISetting.json */ /** * Sample code: GetDefenderForAISetting. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsListSamples.java index 5cb0d72386e7..c8eccc4f7448 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsListSamples.java @@ -9,7 +9,7 @@ */ public final class DefenderForAISettingsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListDefenderForAISetting.json + * x-ms-original-file: 2026-07-15-preview/ListDefenderForAISetting.json */ /** * Sample code: ListDefenderForAISetting. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsUpdateSamples.java index 3984f29c0bd3..2eea08b864f9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class DefenderForAISettingsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateDefenderForAISetting.json + * x-ms-original-file: 2026-07-15-preview/UpdateDefenderForAISetting.json */ /** * Sample code: UpdateDefenderForAISetting. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java index e1a18dbc899b..221cf829a493 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DeletedAccountsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetDeletedAccount.json + * x-ms-original-file: 2026-07-15-preview/GetDeletedAccount.json */ /** * Sample code: Get Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java index 05a0034d01f1..9b35695aa670 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java @@ -9,7 +9,7 @@ */ public final class DeletedAccountsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListDeletedAccountsBySubscription.json + * x-ms-original-file: 2026-07-15-preview/ListDeletedAccountsBySubscription.json */ /** * Sample code: List Deleted Accounts by Subscription. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java index 058c4542a0e8..2fcf14c9aed9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java @@ -9,7 +9,7 @@ */ public final class DeletedAccountsPurgeSamples { /* - * x-ms-original-file: 2026-09-15-preview/PurgeDeletedAccount.json + * x-ms-original-file: 2026-07-15-preview/PurgeDeletedAccount.json */ /** * Sample code: Delete Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsCreateOrUpdateSamples.java index c6c1e61bd0b2..3d4d285a6a86 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class DeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutDeployment.json + * x-ms-original-file: 2026-07-15-preview/PutDeployment.json */ /** * Sample code: PutDeployment. @@ -36,7 +36,7 @@ public static void putDeployment(com.azure.resourcemanager.cognitiveservices.Cog } /* - * x-ms-original-file: 2026-09-15-preview/PutDeploymentWithSpeculativeDecoding.json + * x-ms-original-file: 2026-07-15-preview/PutDeploymentWithSpeculativeDecoding.json */ /** * Sample code: PutDeploymentWithSpeculativeDecoding. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteSamples.java index 960c4a6e62c6..b02d666c743b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class DeploymentsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteDeployment.json + * x-ms-original-file: 2026-07-15-preview/DeleteDeployment.json */ /** * Sample code: DeleteDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsGetSamples.java index d07f0823e1d3..7bf71cb22867 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DeploymentsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetDeployment.json + * x-ms-original-file: 2026-07-15-preview/GetDeployment.json */ /** * Sample code: GetDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSamples.java index 7649273c73e0..3faf2f75ede1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSamples.java @@ -9,7 +9,7 @@ */ public final class DeploymentsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListDeployments.json + * x-ms-original-file: 2026-07-15-preview/ListDeployments.json */ /** * Sample code: ListDeployments. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSkusSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSkusSamples.java index 53c2aa901a2a..1889d8f60864 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSkusSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSkusSamples.java @@ -9,7 +9,7 @@ */ public final class DeploymentsListSkusSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListDeploymentSkus.json + * x-ms-original-file: 2026-07-15-preview/ListDeploymentSkus.json */ /** * Sample code: ListDeploymentSkus. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsPauseSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsPauseSamples.java index abef49eeca4f..44b950a95fa7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsPauseSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsPauseSamples.java @@ -9,7 +9,7 @@ */ public final class DeploymentsPauseSamples { /* - * x-ms-original-file: 2026-09-15-preview/PauseDeployment.json + * x-ms-original-file: 2026-07-15-preview/PauseDeployment.json */ /** * Sample code: PauseDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsResumeSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsResumeSamples.java index fc2829f2a3c9..12e960947794 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsResumeSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsResumeSamples.java @@ -9,7 +9,7 @@ */ public final class DeploymentsResumeSamples { /* - * x-ms-original-file: 2026-09-15-preview/ResumeDeployment.json + * x-ms-original-file: 2026-07-15-preview/ResumeDeployment.json */ /** * Sample code: ResumeDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsUpdateSamples.java index 2c381e1ba2cd..62845e0cf85d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class DeploymentsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateDeployment.json + * x-ms-original-file: 2026-07-15-preview/UpdateDeployment.json */ /** * Sample code: UpdateDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesCreateOrUpdateSamples.java index 7ee8f4f65ec3..d480d2189085 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class EncryptionScopesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutEncryptionScope.json + * x-ms-original-file: 2026-07-15-preview/PutEncryptionScope.json */ /** * Sample code: PutEncryptionScope. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesDeleteSamples.java index 5707d42ed74e..474bf19a06ad 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class EncryptionScopesDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteEncryptionScope.json + * x-ms-original-file: 2026-07-15-preview/DeleteEncryptionScope.json */ /** * Sample code: DeleteEncryptionScope. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesGetSamples.java index 20bd09e98676..15122c738c60 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesGetSamples.java @@ -9,7 +9,7 @@ */ public final class EncryptionScopesGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetEncryptionScope.json + * x-ms-original-file: 2026-07-15-preview/GetEncryptionScope.json */ /** * Sample code: GetEncryptionScope. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesListSamples.java index e806d8bed509..e253cdb5d64a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/EncryptionScopesListSamples.java @@ -9,7 +9,7 @@ */ public final class EncryptionScopesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListEncryptionScopes.json + * x-ms-original-file: 2026-07-15-preview/ListEncryptionScopes.json */ /** * Sample code: ListEncryptionScopes. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/LocationBasedModelCapacitiesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/LocationBasedModelCapacitiesListSamples.java index 02d8fd59d5f3..92fe4d0d9d3c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/LocationBasedModelCapacitiesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/LocationBasedModelCapacitiesListSamples.java @@ -9,7 +9,7 @@ */ public final class LocationBasedModelCapacitiesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListLocationBasedModelCapacitiesGlobalScope.json + * x-ms-original-file: 2026-07-15-preview/ListLocationBasedModelCapacitiesGlobalScope.json */ /** * Sample code: ListLocationBasedModelCapacities Global Scope. @@ -22,7 +22,7 @@ public static void listLocationBasedModelCapacitiesGlobalScope( } /* - * x-ms-original-file: 2026-09-15-preview/ListLocationBasedModelCapacitiesClassicScope.json + * x-ms-original-file: 2026-07-15-preview/ListLocationBasedModelCapacitiesClassicScope.json */ /** * Sample code: ListLocationBasedModelCapacities Classic Scope. @@ -35,7 +35,7 @@ public static void listLocationBasedModelCapacitiesClassicScope( } /* - * x-ms-original-file: 2026-09-15-preview/ListLocationBasedModelCapacitiesDataZoneScope.json + * x-ms-original-file: 2026-07-15-preview/ListLocationBasedModelCapacitiesDataZoneScope.json */ /** * Sample code: ListLocationBasedModelCapacities DataZone Scope. @@ -48,7 +48,7 @@ public static void listLocationBasedModelCapacitiesDataZoneScope( } /* - * x-ms-original-file: 2026-09-15-preview/ListLocationBasedModelCapacities.json + * x-ms-original-file: 2026-07-15-preview/ListLocationBasedModelCapacities.json */ /** * Sample code: ListLocationBasedModelCapacities. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacitiesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacitiesListSamples.java index 188edc12f303..226b09ed281f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacitiesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacitiesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedComputeCapacitiesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListManagedComputeCapacities.json + * x-ms-original-file: 2026-07-15-preview/ListManagedComputeCapacities.json */ /** * Sample code: List Managed Compute Capacities. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsCreateOrUpdateSamples.java index bd0586463c16..407addcf4f0e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsCreateOrUpdateSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.cognitiveservices.generated; import com.azure.resourcemanager.cognitiveservices.models.DeploymentModelVersionUpgradeOption; -import com.azure.resourcemanager.cognitiveservices.models.GatedModelAccessProperties; import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties; import com.azure.resourcemanager.cognitiveservices.models.Sku; @@ -14,7 +13,7 @@ */ public final class ManagedComputeDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateManagedComputeDeployment.json */ /** * Sample code: CreateOrUpdateManagedComputeDeployment. @@ -31,15 +30,13 @@ public static void createOrUpdateManagedComputeDeployment( .withDeploymentTemplate( "azureml://registries/azureml-openai-oss/deploymenttemplates/gpt-oss-120b-short-context/versions/1") .withAcceleratorType("H100_80GB") - .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE) - .withGatedModelAccess(new GatedModelAccessProperties().withConnectionId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/projects/my-project/connections/my-hf-connection"))) + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)) .withSku(new Sku().withName("GlobalManagedCompute").withCapacity(1)) .create(); } /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateVmManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateVmManagedComputeDeployment.json */ /** * Sample code: CreateOrUpdateVmManagedComputeDeployment. @@ -54,8 +51,6 @@ public static void createOrUpdateVmManagedComputeDeployment( .withProperties(new ManagedComputeDeploymentProperties() .withModel("azureml://registries/azureml-openai-oss/models/gpt-oss-120b/versions/4") .withDeploymentTemplate("projects/my-project/deploymentTemplates/gpt-oss-120b-vllm-tuned/versions/2") - .withGatedModelAccess(new GatedModelAccessProperties().withConnectionId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/projects/my-project/connections/my-hf-connection")) .withComputeId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/computes/my-h100-pool") .withPriority("High")) diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsDeleteSamples.java index 61030a915d5c..bf9707989bf0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedComputeDeploymentsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/DeleteManagedComputeDeployment.json */ /** * Sample code: DeleteManagedComputeDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsGetSamples.java index 2b2db219d108..779d250794c7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedComputeDeploymentsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetVmManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/GetVmManagedComputeDeployment.json */ /** * Sample code: GetVmManagedComputeDeployment. @@ -23,7 +23,7 @@ public final class ManagedComputeDeploymentsGetSamples { } /* - * x-ms-original-file: 2026-09-15-preview/GetManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/GetManagedComputeDeployment.json */ /** * Sample code: GetManagedComputeDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsListSamples.java index 065c70896574..065718505450 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedComputeDeploymentsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListVmManagedComputeDeployments.json + * x-ms-original-file: 2026-07-15-preview/ListVmManagedComputeDeployments.json */ /** * Sample code: ListVmManagedComputeDeployments. @@ -22,7 +22,7 @@ public final class ManagedComputeDeploymentsListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListManagedComputeDeployments.json + * x-ms-original-file: 2026-07-15-preview/ListManagedComputeDeployments.json */ /** * Sample code: ListManagedComputeDeployments. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsUpdateSamples.java index 8cf00d02179b..242ed9c26efe 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ManagedComputeDeploymentsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateVmManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/UpdateVmManagedComputeDeployment.json */ /** * Sample code: UpdateVmManagedComputeDeployment. @@ -28,7 +28,7 @@ public final class ManagedComputeDeploymentsUpdateSamples { } /* - * x-ms-original-file: 2026-09-15-preview/UpdateManagedComputeDeployment.json + * x-ms-original-file: 2026-07-15-preview/UpdateManagedComputeDeployment.json */ /** * Sample code: UpdateManagedComputeDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsagesOperationGroupListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsagesOperationGroupListSamples.java index 121f05e54b6f..e3008cfbd683 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsagesOperationGroupListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsagesOperationGroupListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedComputeUsagesOperationGroupListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListManagedComputeUsages.json + * x-ms-original-file: 2026-07-15-preview/ListManagedComputeUsages.json */ /** * Sample code: List Managed Compute Usages. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java index a5881dcb9455..685fc28c7609 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/provisionManagedNetwork.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/provisionManagedNetwork.json */ /** * Sample code: Provision ManagedNetwork. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationDeleteSamples.java index 944e10db12b6..85e6a9d549f4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNetworkSettingsOperationDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/deleteManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/deleteManagedNetworkV2.json */ /** * Sample code: Delete ManagedNetworkSettings. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationGetSamples.java index bb198fbbeaea..6b1e29591b24 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNetworkSettingsOperationGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/getManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/getManagedNetworkV2.json */ /** * Sample code: Get ManagedNetworkSettings. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationListSamples.java index fad6889be982..e1b91f328c00 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNetworkSettingsOperationListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/listManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/listManagedNetworkV2.json */ /** * Sample code: List ManagedNetworkSettings. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationPatchSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationPatchSamples.java index 6fa6d1ad4856..ccf27d51808b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationPatchSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationPatchSamples.java @@ -19,7 +19,7 @@ */ public final class ManagedNetworkSettingsOperationPatchSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/patchManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/patchManagedNetworkV2.json */ /** * Sample code: Patch ManagedNetworkSettings. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationPutSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationPutSamples.java index 03eb816f4280..2be6245340c1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationPutSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationPutSamples.java @@ -18,7 +18,7 @@ */ public final class ManagedNetworkSettingsOperationPutSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/createOrUpdateManagedNetworkV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/createOrUpdateManagedNetworkV2.json */ /** * Sample code: Put ManagedNetworkSettings. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacitiesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacitiesListSamples.java index 5e87c90f9779..381204bce43d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacitiesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacitiesListSamples.java @@ -9,7 +9,7 @@ */ public final class ModelCapacitiesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListModelCapacities.json + * x-ms-original-file: 2026-07-15-preview/ListModelCapacities.json */ /** * Sample code: ListModelCapacities. @@ -22,7 +22,7 @@ public final class ModelCapacitiesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListModelCapacitiesDataZoneScope.json + * x-ms-original-file: 2026-07-15-preview/ListModelCapacitiesDataZoneScope.json */ /** * Sample code: ListModelCapacities DataZone Scope. @@ -35,7 +35,7 @@ public final class ModelCapacitiesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListModelCapacitiesGlobalScope.json + * x-ms-original-file: 2026-07-15-preview/ListModelCapacitiesGlobalScope.json */ /** * Sample code: ListModelCapacities Global Scope. @@ -48,7 +48,7 @@ public final class ModelCapacitiesListSamples { } /* - * x-ms-original-file: 2026-09-15-preview/ListModelCapacitiesClassicScope.json + * x-ms-original-file: 2026-07-15-preview/ListModelCapacitiesClassicScope.json */ /** * Sample code: ListModelCapacities Classic Scope. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ModelsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ModelsListSamples.java index 434a290577be..05aaf205547a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ModelsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ModelsListSamples.java @@ -9,7 +9,7 @@ */ public final class ModelsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListLocationModels.json + * x-ms-original-file: 2026-07-15-preview/ListLocationModels.json */ /** * Sample code: ListLocationModels. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java index e3c6c30a3cce..1fb54eb7ba0e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityPerimeterConfigurationsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetNetworkSecurityPerimeterConfigurations.json + * x-ms-original-file: 2026-07-15-preview/GetNetworkSecurityPerimeterConfigurations.json */ /** * Sample code: GetNetworkSecurityPerimeterConfigurations. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsListSamples.java index d1a2a3d9bb6e..78e826b3308e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityPerimeterConfigurationsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListNetworkSecurityPerimeterConfigurations.json + * x-ms-original-file: 2026-07-15-preview/ListNetworkSecurityPerimeterConfigurations.json */ /** * Sample code: ListNetworkSecurityPerimeterConfigurations. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java index 7b40c1c744c7..e8fee56b2352 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { /* - * x-ms-original-file: 2026-09-15-preview/ReconcileNetworkSecurityPerimeterConfigurations.json + * x-ms-original-file: 2026-07-15-preview/ReconcileNetworkSecurityPerimeterConfigurations.json */ /** * Sample code: ReconcileNetworkSecurityPerimeterConfigurations. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java index 242b2a1f1ea2..90883da2f7f0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetOperations.json + * x-ms-original-file: 2026-07-15-preview/GetOperations.json */ /** * Sample code: Get Operations. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleCreateOrUpdateSamples.java index 3e2fa63fbb3f..53cfdbc7fdc7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class OutboundRuleCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/createOrUpdateRuleV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/createOrUpdateRuleV2.json */ /** * Sample code: CreateOrUpdate OutboundRule. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleDeleteSamples.java index c4c8800976d6..41f259a93073 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class OutboundRuleDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/deleteRuleV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/deleteRuleV2.json */ /** * Sample code: Delete OutboundRule. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleGetSamples.java index 4a15b01456ca..533b737cf31c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleGetSamples.java @@ -9,7 +9,7 @@ */ public final class OutboundRuleGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/getRuleV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/getRuleV2.json */ /** * Sample code: Get OutboundRule. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleListSamples.java index 2321d5c7394c..83283b86e143 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleListSamples.java @@ -9,7 +9,7 @@ */ public final class OutboundRuleListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/listRuleV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/listRuleV2.json */ /** * Sample code: List OutboundRules. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesOperationPostSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesOperationPostSamples.java index 5871598e7201..89b6737b55a7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesOperationPostSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesOperationPostSamples.java @@ -18,7 +18,7 @@ */ public final class OutboundRulesOperationPostSamples { /* - * x-ms-original-file: 2026-09-15-preview/ManagedNetwork/postOutboundRulesV2.json + * x-ms-original-file: 2026-07-15-preview/ManagedNetwork/postOutboundRulesV2.json */ /** * Sample code: Post OutboundRules. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 61cc05fdf432..69b62707fe4f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutPrivateEndpointConnection.json + * x-ms-original-file: 2026-07-15-preview/PutPrivateEndpointConnection.json */ /** * Sample code: PutPrivateEndpointConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java index b36f5800f950..d2e53036b4c8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeletePrivateEndpointConnection.json + * x-ms-original-file: 2026-07-15-preview/DeletePrivateEndpointConnection.json */ /** * Sample code: DeletePrivateEndpointConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java index bc9cc35b0d4e..c6848d0f04d8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetPrivateEndpointConnection.json + * x-ms-original-file: 2026-07-15-preview/GetPrivateEndpointConnection.json */ /** * Sample code: GetPrivateEndpointConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java index 6ee1a792b03e..980414346b1a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListPrivateEndpointConnections.json + * x-ms-original-file: 2026-07-15-preview/ListPrivateEndpointConnections.json */ /** * Sample code: GetPrivateEndpointConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java index d004999aad3f..ff6a6110aa10 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListPrivateLinkResources.json + * x-ms-original-file: 2026-07-15-preview/ListPrivateLinkResources.json */ /** * Sample code: ListPrivateLinkResources. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsCreateOrUpdateSamples.java index 5bf9c8132fc8..bfdfbc7a88a1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ProjectCapabilityHostsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectCapabilityHost/createOrUpdate.json + * x-ms-original-file: 2026-07-15-preview/ProjectCapabilityHost/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Project CapabilityHost. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsDeleteSamples.java index 7764caa89df4..071d389248b0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ProjectCapabilityHostsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectCapabilityHost/delete.json + * x-ms-original-file: 2026-07-15-preview/ProjectCapabilityHost/delete.json */ /** * Sample code: Delete Project CapabilityHost. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsGetSamples.java index cb41413c8d8c..89d955f3c9e7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ProjectCapabilityHostsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectCapabilityHost/get.json + * x-ms-original-file: 2026-07-15-preview/ProjectCapabilityHost/get.json */ /** * Sample code: Get Project CapabilityHost. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsListSamples.java index 2169977cfa0a..838613baf633 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsListSamples.java @@ -9,7 +9,7 @@ */ public final class ProjectCapabilityHostsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectCapabilityHost/list.json + * x-ms-original-file: 2026-07-15-preview/ProjectCapabilityHost/list.json */ /** * Sample code: List Project CapabilityHosts. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsCreateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsCreateSamples.java index 18e9bab26470..d28421dcbab4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsCreateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsCreateSamples.java @@ -14,7 +14,7 @@ */ public final class ProjectConnectionsCreateSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/create.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/create.json */ /** * Sample code: CreateProjectConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsDeleteSamples.java index 8377964e11c4..fab801fd0ac3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ProjectConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/delete.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/delete.json */ /** * Sample code: DeleteProjectConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsGetSamples.java index 5c8530198ae9..3a21da874f30 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ProjectConnectionsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/get.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/get.json */ /** * Sample code: GetProjectConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsListSamples.java index defef5c0ed80..a72f02732f45 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ProjectConnectionsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/list.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/list.json */ /** * Sample code: ListProjectConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsUpdateSamples.java index 0ea284b4cf46..83118dd6ba08 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class ProjectConnectionsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/ProjectConnection/update.json + * x-ms-original-file: 2026-07-15-preview/ProjectConnection/update.json */ /** * Sample code: UpdateProjectConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsCreateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsCreateSamples.java index 9d534d2d1778..b5b01437ae69 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsCreateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsCreateSamples.java @@ -14,7 +14,7 @@ */ public final class ProjectsCreateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateProjectMin.json + * x-ms-original-file: 2026-07-15-preview/CreateProjectMin.json */ /** * Sample code: Create Project Min. @@ -32,7 +32,7 @@ public static void createProjectMin(com.azure.resourcemanager.cognitiveservices. } /* - * x-ms-original-file: 2026-09-15-preview/CreateProject.json + * x-ms-original-file: 2026-07-15-preview/CreateProject.json */ /** * Sample code: Create Project. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsDeleteSamples.java index e89ed6cc247b..56c3b147fd77 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ProjectsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteProject.json + * x-ms-original-file: 2026-07-15-preview/DeleteProject.json */ /** * Sample code: Delete Project. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsGetSamples.java index 57130db609d6..2eabbd3a52f5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ProjectsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetProject.json + * x-ms-original-file: 2026-07-15-preview/GetProject.json */ /** * Sample code: Get Project. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsListSamples.java index f331ff423136..e470e30f56d9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsListSamples.java @@ -9,7 +9,7 @@ */ public final class ProjectsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListProjects.json + * x-ms-original-file: 2026-07-15-preview/ListProjects.json */ /** * Sample code: List Project. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsUpdateSamples.java index ca7779dfe636..585e7866b345 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ProjectsUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateProjects.json + * x-ms-original-file: 2026-07-15-preview/UpdateProjects.json */ /** * Sample code: Update Project. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersCreateOrUpdateSamples.java index b0e3a88d8bb4..41223c5a4a61 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class QuotaTiersCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/CreateOrUpdateQuotaTier.json + * x-ms-original-file: 2026-07-15-preview/CreateOrUpdateQuotaTier.json */ /** * Sample code: Update the quota tier resource for a subscription. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersGetSamples.java index 32399df3a783..07851d5aed6f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersGetSamples.java @@ -9,7 +9,7 @@ */ public final class QuotaTiersGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetQuotaTier.json + * x-ms-original-file: 2026-07-15-preview/GetQuotaTier.json */ /** * Sample code: Get the Quota Tier information for a subscription. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersListSamples.java index 6c270809cc46..eac1d7c0dfa8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersListSamples.java @@ -9,7 +9,7 @@ */ public final class QuotaTiersListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListQuotaTiers.json + * x-ms-original-file: 2026-07-15-preview/ListQuotaTiers.json */ /** * Sample code: List the Quota Tier for a subscription. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersUpdateSamples.java index 35edd5c12fed..7056e687005b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class QuotaTiersUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateQuotaTier.json + * x-ms-original-file: 2026-07-15-preview/UpdateQuotaTier.json */ /** * Sample code: Update the quota tier resource for a subscription. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsCreateOrUpdateSamples.java deleted file mode 100644 index 7ee730f1f26b..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.resourcemanager.cognitiveservices.models.RaiBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingProperties; - -/** - * Samples for RaiBindings CreateOrUpdate. - */ -public final class RaiBindingsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/PutRaiBinding.json - */ - /** - * Sample code: Bind an Azure OpenAI deployment to an ACS policy. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void bindAnAzureOpenAIDeploymentToAnACSPolicy( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiBindings() - .define("chat-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiBindingProperties().withBoundResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group/providers/Microsoft.CognitiveServices/accounts/aoai-account/deployments/chat-prod") - .withTargetPolicyName("agent-guard")) - .withIfNoneMatch("*") - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/UpdateRaiBinding.json - */ - /** - * Sample code: Update a RAI binding target conditionally across subscriptions. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateARAIBindingTargetConditionallyAcrossSubscriptions( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - RaiBinding resource = manager.raiBindings() - .getWithResponse("resource-group", "safety-account", "chat-guard", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new RaiBindingProperties().withBoundResourceId( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/target-resource-group/providers/Microsoft.CognitiveServices/accounts/aoai-account/deployments/chat-canary") - .withTargetPolicyName("agent-guard-v2")) - .withIfMatch("\"00000000-0000-0000-0000-000000000002\"") - .apply(); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsDeleteSamples.java deleted file mode 100644 index 4c1eda12ddea..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for RaiBindings Delete. - */ -public final class RaiBindingsDeleteSamples { - /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiBinding.json - */ - /** - * Sample code: Delete a RAI binding. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void deleteARAIBinding(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiBindings() - .deleteWithResponse("resource-group", "safety-account", "chat-guard", - "\"00000000-0000-0000-0000-000000000002\"", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsGetSamples.java deleted file mode 100644 index efff12b1c863..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for RaiBindings Get. - */ -public final class RaiBindingsGetSamples { - /* - * x-ms-original-file: 2026-09-15-preview/GetRaiBinding.json - */ - /** - * Sample code: Get a RAI binding. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void getARAIBinding(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiBindings() - .getWithResponse("resource-group", "safety-account", "chat-guard", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsListSamples.java deleted file mode 100644 index 829585c4f53a..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for RaiBindings List. - */ -public final class RaiBindingsListSamples { - /* - * x-ms-original-file: 2026-09-15-preview/ListRaiBindings.json - */ - /** - * Sample code: List RAI bindings. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void listRAIBindings(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiBindings().list("resource-group", "safety-account", 50, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchAddSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchAddSamples.java index e8125184a72c..0a8f3c75a014 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchAddSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchAddSamples.java @@ -13,7 +13,7 @@ */ public final class RaiBlocklistItemsBatchAddSamples { /* - * x-ms-original-file: 2026-09-15-preview/AddRaiBlocklistItems.json + * x-ms-original-file: 2026-07-15-preview/AddRaiBlocklistItems.json */ /** * Sample code: AddRaiBlocklistItems. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchDeleteSamples.java index bee31b37a6b2..629948d94328 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchDeleteSamples.java @@ -11,7 +11,7 @@ */ public final class RaiBlocklistItemsBatchDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiBlocklistItems.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiBlocklistItems.json */ /** * Sample code: DeleteRaiBlocklistItems. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsCreateOrUpdateSamples.java index a19a4adc3f61..65a8f0bac6ef 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class RaiBlocklistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiBlocklistItem.json + * x-ms-original-file: 2026-07-15-preview/PutRaiBlocklistItem.json */ /** * Sample code: PutRaiBlocklistItem. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsDeleteSamples.java index d83c76aec6e9..cfecf60ae5d0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class RaiBlocklistItemsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiBlocklistItem.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiBlocklistItem.json */ /** * Sample code: DeleteRaiBlocklistItem. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsGetSamples.java index 4cc8eae362c3..234b20805887 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsGetSamples.java @@ -9,7 +9,7 @@ */ public final class RaiBlocklistItemsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiBlocklistItem.json + * x-ms-original-file: 2026-07-15-preview/GetRaiBlocklistItem.json */ /** * Sample code: GetRaiBlocklistItem. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsListSamples.java index daf990c8615b..c6bce5e4c3a6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsListSamples.java @@ -9,7 +9,7 @@ */ public final class RaiBlocklistItemsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListBlocklistItems.json + * x-ms-original-file: 2026-07-15-preview/ListBlocklistItems.json */ /** * Sample code: ListBlocklistItems. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsCreateOrUpdateSamples.java index f59f1357d371..7e6459bd126f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class RaiBlocklistsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiBlocklist.json + * x-ms-original-file: 2026-07-15-preview/PutRaiBlocklist.json */ /** * Sample code: PutRaiBlocklist. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsDeleteSamples.java index 7055f7489bc1..fa4285a6c059 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class RaiBlocklistsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiBlocklist.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiBlocklist.json */ /** * Sample code: DeleteRaiBlocklist. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsGetSamples.java index f205302f64fb..090d51fe0321 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsGetSamples.java @@ -9,7 +9,7 @@ */ public final class RaiBlocklistsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiBlocklist.json + * x-ms-original-file: 2026-07-15-preview/GetRaiBlocklist.json */ /** * Sample code: GetRaiBlocklist. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsListSamples.java index 7f5fb7d3035e..68b5192dd5fb 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsListSamples.java @@ -9,7 +9,7 @@ */ public final class RaiBlocklistsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListBlocklists.json + * x-ms-original-file: 2026-07-15-preview/ListBlocklists.json */ /** * Sample code: ListBlocklists. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersGetSamples.java index 667a79141b37..c8da20242841 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersGetSamples.java @@ -9,7 +9,7 @@ */ public final class RaiContentFiltersGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiContentFilter.json + * x-ms-original-file: 2026-07-15-preview/GetRaiContentFilter.json */ /** * Sample code: GetRaiContentFilters. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersListSamples.java index 9a264cdec54d..0c5d2a1dade2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersListSamples.java @@ -9,7 +9,7 @@ */ public final class RaiContentFiltersListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiContentFilters.json + * x-ms-original-file: 2026-07-15-preview/ListRaiContentFilters.json */ /** * Sample code: ListRaiContentFilters. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderCreateOrUpdateSamples.java index 99b3ed10ad13..de3e757a670d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class RaiExternalSafetyProviderCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiExternalSafetyProvider.json + * x-ms-original-file: 2026-07-15-preview/PutRaiExternalSafetyProvider.json */ /** * Sample code: PutRaiExternalSafetyProvider. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderDeleteSamples.java index 67e630a69267..52854a0719c2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class RaiExternalSafetyProviderDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiExternalSafetyProvider.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiExternalSafetyProvider.json */ /** * Sample code: DeleteRaiTopic. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderGetSamples.java index 59d4cf8d2f05..733e562199f5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProviderGetSamples.java @@ -9,7 +9,7 @@ */ public final class RaiExternalSafetyProviderGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiExternalSafetyProvider.json + * x-ms-original-file: 2026-07-15-preview/GetRaiExternalSafetyProvider.json */ /** * Sample code: GetRaiExternalSafetyProvider. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProvidersOperationListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProvidersOperationListSamples.java index 3884b7b62abd..09f9800495d9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProvidersOperationListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiExternalSafetyProvidersOperationListSamples.java @@ -9,7 +9,7 @@ */ public final class RaiExternalSafetyProvidersOperationListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiExternalSafetyProviders.json + * x-ms-original-file: 2026-07-15-preview/ListRaiExternalSafetyProviders.json */ /** * Sample code: ListRaiExternalSafetyProviders. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesCreateOrUpdateSamples.java index b9a40f6a422f..89d8af3fd2f4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesCreateOrUpdateSamples.java @@ -4,26 +4,7 @@ package com.azure.resourcemanager.cognitiveservices.generated; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; -import com.azure.resourcemanager.cognitiveservices.models.CustomBlocklistConfig; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoints; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsManifest; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsRegoPolicyDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderOperation; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderTransform; @@ -40,22 +21,16 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiEgressScheme; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentFilter; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyCustomExternalSafetyProviderReference; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyProperties; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoReference; -import java.io.IOException; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; /** * Samples for RaiPolicies CreateOrUpdate. */ public final class RaiPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/PutRaiPolicy.json */ /** * Sample code: PutRaiPolicy. @@ -129,143 +104,7 @@ public static void putRaiPolicy(com.azure.resourcemanager.cognitiveservices.Cogn } /* - * x-ms-original-file: 2026-09-15-preview/PutRaiPolicyAcs.json - */ - /** - * Sample code: Create an ACS policy with optional policy dependencies. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void createAnACSPolicyWithOptionalPolicyDependencies( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) throws IOException { - manager.raiPolicies() - .define("agent-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs(new RaiAcsManifest().withAgentControlSpecificationVersion("0.4.0-alpha.1") - .withMetadata(mapOf("name", "agent-guard")) - .withPolicies(mapOf("input-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.input_guard.verdict"), - "tool-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.tool_guard.verdict"))) - .withInterventionPoints(new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.INPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("input-guard") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList(new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROMPT_INJECTION)))))) - .withPreToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("tool-guard")) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME)) - .withPostToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("tool-guard")) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME))) - .withTools(mapOf("web_search", - new RaiAcsToolDefinition().withId("web_search") - .withType("retrieval") - .withDescription("Search approved public documentation") - .withSecurityLabels(Arrays.asList("network_egress", "untrusted_content")) - .withClearance("public") - .withAdditionalProperties(mapOf("allowed_domains", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("[\"learn.microsoft.com\"]", Object.class, SerializerEncoding.JSON))), - "wire_transfer", - new RaiAcsToolDefinition().withId("wire_transfer") - .withType("financial_action") - .withSecurityLabels(Arrays.asList("financial_write")) - .withClearance("confidential") - .withAdditionalProperties(mapOf()))) - .withAnnotators(new RaiAcsEmptyObject())) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("input-guard"), - new RaiRegoReference().withRegoName("tool-guard"))) - .withCustomBlocklists(Arrays.asList(new CustomBlocklistConfig().withBlocklistName("blocked-terms") - .withBlocking(true) - .withSource(RaiPolicyContentSource.PROMPT))) - .withCustomExternalSafetyProviders(Arrays.asList(new RaiPolicyCustomExternalSafetyProviderReference() - .withExternalSafetyProviderName("contoso-safety-provider") - .withManagedIdentityResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/safety-provider-identity") - .withSource(RaiPolicyContentSource.PROMPT) - .withBlocking(true)))) - .withIfNoneMatch("*") - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/UpdateRaiPolicyAcs.json - */ - /** - * Sample code: Replace an ACS policy conditionally. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void replaceAnACSPolicyConditionally( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) throws IOException { - manager.raiPolicies() - .define("agent-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs(new RaiAcsManifest().withAgentControlSpecificationVersion("0.4.0-alpha.1") - .withPolicies(mapOf("input-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.input_guard.verdict"), - "tool-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.tool_guard.verdict"))) - .withInterventionPoints(new RaiAcsInterventionPoints().withInput(new RaiAcsInterventionPoint() - .withPolicyTarget(RaiAcsPolicyTarget.INPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("input-guard") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.HATE) - .withHarmConfigId("Hate_Text_MultiSev"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROMPT_INJECTION)))))) - .withPreToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("tool-guard")) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME)) - .withPostToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("tool-guard")) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME))) - .withTools(mapOf("web_search", - new RaiAcsToolDefinition().withId("web_search") - .withType("retrieval") - .withDescription("Search approved public documentation and approved partner sites") - .withSecurityLabels(Arrays.asList("network_egress", "untrusted_content")) - .withClearance("public") - .withAdditionalProperties(mapOf("allowed_domains", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("[\"learn.microsoft.com\",\"support.microsoft.com\"]", Object.class, - SerializerEncoding.JSON))), - "wire_transfer", - new RaiAcsToolDefinition().withId("wire_transfer") - .withType("financial_action") - .withSecurityLabels(Arrays.asList("financial_write")) - .withClearance("confidential") - .withAdditionalProperties(mapOf())))) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("input-guard"), - new RaiRegoReference().withRegoName("tool-guard"))) - .withCustomBlocklists(Arrays.asList()) - .withCustomExternalSafetyProviders(Arrays.asList())) - .withIfMatch("\"00000000-0000-0000-0000-000000000003\"") - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/PutRaiPolicyWithEgress.json + * x-ms-original-file: 2026-07-15-preview/PutRaiPolicyWithEgress.json */ /** * Sample code: PutRaiPolicyWithEgress. @@ -314,43 +153,4 @@ public static void replaceAnACSPolicyConditionally( .withPath("/v2/"))))))) .create(); } - - /* - * x-ms-original-file: 2026-09-15-preview/PutRaiPolicyAcsWithoutTools.json - */ - /** - * Sample code: Create an ACS policy without a tool catalog. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void createAnACSPolicyWithoutAToolCatalog( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiPolicies() - .define("input-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs(new RaiAcsManifest().withAgentControlSpecificationVersion("0.4.0-alpha.1") - .withPolicies(mapOf("input-guard", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("data.input_guard.verdict"))) - .withInterventionPoints(new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.INPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("input-guard"))))) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("input-guard")))) - .withIfNoneMatch("*") - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesDeleteSamples.java index dae19f164ee3..aa2fbbf1cef7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesDeleteSamples.java @@ -9,21 +9,7 @@ */ public final class RaiPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiPolicyAcs.json - */ - /** - * Sample code: Delete an ACS policy. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void deleteAnACSPolicy(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiPolicies() - .delete("resource-group", "safety-account", "agent-guard", "\"00000000-0000-0000-0000-000000000003\"", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiPolicy.json */ /** * Sample code: DeleteRaiPolicy. @@ -32,6 +18,6 @@ public static void deleteAnACSPolicy(com.azure.resourcemanager.cognitiveservices */ public static void deleteRaiPolicy(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { manager.raiPolicies() - .delete("resourceGroupName", "accountName", "raiPolicyName", null, com.azure.core.util.Context.NONE); + .delete("resourceGroupName", "accountName", "raiPolicyName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesGetSamples.java index 25608145c7f8..1a0ee3ab2dbf 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesGetSamples.java @@ -9,7 +9,7 @@ */ public final class RaiPoliciesGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/GetRaiPolicy.json */ /** * Sample code: GetRaiPolicy. @@ -20,17 +20,4 @@ public static void getRaiPolicy(com.azure.resourcemanager.cognitiveservices.Cogn manager.raiPolicies() .getWithResponse("resourceGroupName", "accountName", "raiPolicyName", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: 2026-09-15-preview/GetRaiPolicyAcs.json - */ - /** - * Sample code: Get an ACS policy. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void getAnACSPolicy(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiPolicies() - .getWithResponse("resource-group", "safety-account", "agent-guard", com.azure.core.util.Context.NONE); - } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesListSamples.java index 7568dfb09c89..3e7fe14b1363 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesListSamples.java @@ -9,7 +9,7 @@ */ public final class RaiPoliciesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiPolicies.json + * x-ms-original-file: 2026-07-15-preview/ListRaiPolicies.json */ /** * Sample code: ListRaiPolicies. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosCreateOrUpdateSamples.java deleted file mode 100644 index 827416c10ef2..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosCreateOrUpdateSamples.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoEncoding; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RaiRegos CreateOrUpdate. - */ -public final class RaiRegosCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-09-15-preview/UpdateRaiRego.json - */ - /** - * Sample code: Replace a reusable Rego artifact conditionally. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void replaceAReusableRegoArtifactConditionally( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos() - .define("input-guard") - .withExistingAccount("resource-group", "safety-account") - .withProperties(new RaiRegoProperties().withEncoding(RaiRegoEncoding.NONE) - .withRego( - "package input_guard\n\nimport rego.v1\n\ndefault verdict := {\"decision\": \"allow\"}\n\nblocking_signal if {\n input.snapshot.moderation.harm.PromptInjection.detected\n}\n\nblocking_signal if {\n input.snapshot.moderation.harm.Hate.severity >= 4\n}\n\nverdict := {\"decision\": \"deny\", \"reason\": \"unsafe_input\"} if {\n blocking_signal\n}")) - .withIfMatch("\"00000000-0000-0000-0000-000000000001\"") - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/PutRaiRego.json - */ - /** - * Sample code: Create a reusable Rego artifact. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - createAReusableRegoArtifact(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos() - .define("input-guard") - .withExistingAccount("resource-group", "safety-account") - .withTags(mapOf("environment", "production")) - .withProperties(new RaiRegoProperties().withEncoding(RaiRegoEncoding.NONE) - .withRego( - "package input_guard\n\nimport rego.v1\n\ndefault verdict := {\"decision\": \"allow\"}\n\nverdict := {\"decision\": \"deny\", \"reason\": \"prompt_injection_detected\"} if {\n input.snapshot.moderation.harm.PromptInjection.detected\n}")) - .withIfNoneMatch("*") - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosDeleteSamples.java deleted file mode 100644 index d49f1faa7fb6..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for RaiRegos Delete. - */ -public final class RaiRegosDeleteSamples { - /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiRego.json - */ - /** - * Sample code: Delete a reusable Rego artifact. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - deleteAReusableRegoArtifact(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos() - .deleteWithResponse("resource-group", "safety-account", "input-guard", - "\"00000000-0000-0000-0000-000000000001\"", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosGetSamples.java deleted file mode 100644 index 878947ce720f..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for RaiRegos Get. - */ -public final class RaiRegosGetSamples { - /* - * x-ms-original-file: 2026-09-15-preview/GetRaiRego.json - */ - /** - * Sample code: Get a reusable Rego artifact. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - getAReusableRegoArtifact(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos() - .getWithResponse("resource-group", "safety-account", "input-guard", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosListSamples.java deleted file mode 100644 index bd011fa492ac..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -/** - * Samples for RaiRegos List. - */ -public final class RaiRegosListSamples { - /* - * x-ms-original-file: 2026-09-15-preview/ListRaiRegos.json - */ - /** - * Sample code: List reusable Rego artifacts. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - listReusableRegoArtifacts(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.raiRegos().list("resource-group", "safety-account", 10, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsCreateOrUpdateSamples.java index 00d34c8f2c8d..62dda7f0b22d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class RaiToolLabelsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiToolLabel.json + * x-ms-original-file: 2026-07-15-preview/PutRaiToolLabel.json */ /** * Sample code: PutRaiToolLabel. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsDeleteSamples.java index 5cf50217f9af..5f5e2a08ec0e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class RaiToolLabelsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiToolLabel.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiToolLabel.json */ /** * Sample code: DeleteRaiToolLabel. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsGetSamples.java index 07eb2bcd5d73..8c4183392995 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsGetSamples.java @@ -9,7 +9,7 @@ */ public final class RaiToolLabelsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiToolLabel.json + * x-ms-original-file: 2026-07-15-preview/GetRaiToolLabel.json */ /** * Sample code: GetRaiToolLabel. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsListSamples.java index d87a06418477..b31e3e3edddd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsListSamples.java @@ -9,7 +9,7 @@ */ public final class RaiToolLabelsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiToolLabels.json + * x-ms-original-file: 2026-07-15-preview/ListRaiToolLabels.json */ /** * Sample code: ListRaiToolLabels. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsCreateOrUpdateSamples.java index b8478e64ad44..56477725935a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class RaiTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutRaiTopic.json + * x-ms-original-file: 2026-07-15-preview/PutRaiTopic.json */ /** * Sample code: PutRaiTopic. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsDeleteSamples.java index 45641ef89119..affcf515ed1a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class RaiTopicsDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteRaiTopic.json + * x-ms-original-file: 2026-07-15-preview/DeleteRaiTopic.json */ /** * Sample code: DeleteRaiTopic. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsGetSamples.java index a0cd71cb7c0c..5992d1959ae6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsGetSamples.java @@ -9,7 +9,7 @@ */ public final class RaiTopicsGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetRaiTopic.json + * x-ms-original-file: 2026-07-15-preview/GetRaiTopic.json */ /** * Sample code: GetRaiTopic. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsListSamples.java index 78351c40debc..d0eec72ee1e3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsListSamples.java @@ -9,7 +9,7 @@ */ public final class RaiTopicsListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListRaiTopics.json + * x-ms-original-file: 2026-07-15-preview/ListRaiTopics.json */ /** * Sample code: ListRaiTopics. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCalculateModelCapacitySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCalculateModelCapacitySamples.java index 93ca08c056f6..56d321001d91 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCalculateModelCapacitySamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCalculateModelCapacitySamples.java @@ -15,7 +15,7 @@ */ public final class ResourceProviderCalculateModelCapacitySamples { /* - * x-ms-original-file: 2026-09-15-preview/CalculateModelCapacity.json + * x-ms-original-file: 2026-07-15-preview/CalculateModelCapacity.json */ /** * Sample code: Calculate Model Capacity. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java index 84422e6b6884..93e815b4fed7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java @@ -11,7 +11,7 @@ */ public final class ResourceProviderCheckDomainAvailabilitySamples { /* - * x-ms-original-file: 2026-09-15-preview/CheckDomainAvailability.json + * x-ms-original-file: 2026-07-15-preview/CheckDomainAvailability.json */ /** * Sample code: Check SKU Availability. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java index 1923cc42d226..29232471dcdc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java @@ -12,7 +12,7 @@ */ public final class ResourceProviderCheckSkuAvailabilitySamples { /* - * x-ms-original-file: 2026-09-15-preview/CheckSkuAvailability.json + * x-ms-original-file: 2026-07-15-preview/CheckSkuAvailability.json */ /** * Sample code: Check SKU Availability. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java index fd344421d4bd..1ebf8702a768 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java @@ -9,7 +9,7 @@ */ public final class ResourceSkusListSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetSkus.json + * x-ms-original-file: 2026-07-15-preview/GetSkus.json */ /** * Sample code: Regenerate Keys. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyCreateOrUpdateSamples.java index cc43b2797991..adbe7f7b41f3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class SubscriptionRaiPolicyCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutSubscriptionRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/PutSubscriptionRaiPolicy.json */ /** * Sample code: PutRaiPolicy. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyDeleteSamples.java index 55d6f0ebc00c..b24e2c9d2384 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SubscriptionRaiPolicyDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteSubscriptionRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/DeleteSubscriptionRaiPolicy.json */ /** * Sample code: DeleteRaiPolicy. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyGetSamples.java index a0681291dc39..ee362b07f887 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPolicyGetSamples.java @@ -9,7 +9,7 @@ */ public final class SubscriptionRaiPolicyGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetSubscriptionRaiPolicy.json + * x-ms-original-file: 2026-07-15-preview/GetSubscriptionRaiPolicy.json */ /** * Sample code: GetRaiPolicy. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/TestRaiExternalSafetyProviderCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/TestRaiExternalSafetyProviderCreateOrUpdateSamples.java index c262230ed1d3..8fc619137a27 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/TestRaiExternalSafetyProviderCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/TestRaiExternalSafetyProviderCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class TestRaiExternalSafetyProviderCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/TestRaiExternalSafetyProvider.json + * x-ms-original-file: 2026-07-15-preview/TestRaiExternalSafetyProvider.json */ /** * Sample code: TestRaiExternalSafetyProvider. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/UsagesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/UsagesListSamples.java index c65fa6edc30a..d9e5d4c9cf0f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/UsagesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/UsagesListSamples.java @@ -9,7 +9,7 @@ */ public final class UsagesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListUsages.json + * x-ms-original-file: 2026-07-15-preview/ListUsages.json */ /** * Sample code: Get Usages. @@ -21,7 +21,7 @@ public static void getUsages(com.azure.resourcemanager.cognitiveservices.Cogniti } /* - * x-ms-original-file: 2026-09-15-preview/ListUsagesClassicScope.json + * x-ms-original-file: 2026-07-15-preview/ListUsagesClassicScope.json */ /** * Sample code: Get Usages Classic Scope. @@ -34,7 +34,7 @@ public static void getUsages(com.azure.resourcemanager.cognitiveservices.Cogniti } /* - * x-ms-original-file: 2026-09-15-preview/ListUsagesDataZoneScope.json + * x-ms-original-file: 2026-07-15-preview/ListUsagesDataZoneScope.json */ /** * Sample code: Get Usages DataZone Scope. @@ -47,20 +47,7 @@ public static void getUsages(com.azure.resourcemanager.cognitiveservices.Cogniti } /* - * x-ms-original-file: 2026-09-15-preview/ListUsagesWithResourceMetadata.json - */ - /** - * Sample code: Get Usages With Resource Metadata. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - getUsagesWithResourceMetadata(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.usages().list("WestUS", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-15-preview/ListUsagesGlobalScope.json + * x-ms-original-file: 2026-07-15-preview/ListUsagesGlobalScope.json */ /** * Sample code: Get Usages Global Scope. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesCreateOrUpdateSamples.java index fdd93b6208f2..ad2bbb767add 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesCreateOrUpdateSamples.java @@ -17,26 +17,7 @@ */ public final class WorkbenchesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/PutWorkbenchPending.json - */ - /** - * Sample code: PutWorkbenchPending. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void - putWorkbenchPending(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - manager.workbenches() - .define("myWorkbench") - .withExistingProject("rgcognitiveservices", "myAccount", "myProject") - .withProperties(new WorkbenchProperties().withTargetClusterId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.CognitiveServices/accounts/myAccount/computes/myCluster") - .withImageLink("mcr.microsoft.com/azureml/curated/pytorch-gpu:latest")) - .create(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/PutWorkbench.json + * x-ms-original-file: 2026-07-15-preview/PutWorkbench.json */ /** * Sample code: PutWorkbench. @@ -48,13 +29,12 @@ public static void putWorkbench(com.azure.resourcemanager.cognitiveservices.Cogn .define("myWorkbench") .withExistingProject("rgcognitiveservices", "myAccount", "myProject") .withProperties(new WorkbenchProperties().withTargetClusterId( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/vc-rg/providers/Microsoft.MachineLearningServices/virtualClusters/test-vc") + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.CognitiveServices/accounts/myAccount/computes/myCluster") .withImageLink("mcr.microsoft.com/azureml/curated/pytorch-gpu:latest") - .withInstanceType("Singularity.ND12_H100_v5-n1") - .withGpuCount(1) .withIdleTimeBeforeShutdown("PT30M") .withDatasetId("dataset-12345") .withSshSettings(new SshSettings().withSshPublicKey("fakeTokenPlaceholder").withAdminEnabled(true))) + .withRegion("eastus") .withIdentity(new Identity().withType(ResourceIdentityType.USER_ASSIGNED) .withUserAssignedIdentities(mapOf( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesDeleteSamples.java index 3f333f973098..5003a3185ae7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class WorkbenchesDeleteSamples { /* - * x-ms-original-file: 2026-09-15-preview/DeleteWorkbench.json + * x-ms-original-file: 2026-07-15-preview/DeleteWorkbench.json */ /** * Sample code: DeleteWorkbench. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesGetSamples.java index e1c6ebc33cb9..dc1a8d4a4afd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesGetSamples.java @@ -9,7 +9,7 @@ */ public final class WorkbenchesGetSamples { /* - * x-ms-original-file: 2026-09-15-preview/GetWorkbench.json + * x-ms-original-file: 2026-07-15-preview/GetWorkbench.json */ /** * Sample code: GetWorkbench. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesListSamples.java index ef11385281e9..1a72a2562bbf 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesListSamples.java @@ -9,7 +9,7 @@ */ public final class WorkbenchesListSamples { /* - * x-ms-original-file: 2026-09-15-preview/ListWorkbenches.json + * x-ms-original-file: 2026-07-15-preview/ListWorkbenches.json */ /** * Sample code: ListWorkbenches. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesRestartSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesRestartSamples.java index 433401585aac..1cc12ce90ac9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesRestartSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesRestartSamples.java @@ -9,7 +9,7 @@ */ public final class WorkbenchesRestartSamples { /* - * x-ms-original-file: 2026-09-15-preview/RestartWorkbench.json + * x-ms-original-file: 2026-07-15-preview/RestartWorkbench.json */ /** * Sample code: RestartWorkbench. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesStartSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesStartSamples.java index 83fc594ca623..4f61d9270357 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesStartSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesStartSamples.java @@ -9,7 +9,7 @@ */ public final class WorkbenchesStartSamples { /* - * x-ms-original-file: 2026-09-15-preview/StartWorkbench.json + * x-ms-original-file: 2026-07-15-preview/StartWorkbench.json */ /** * Sample code: StartWorkbench. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesStopSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesStopSamples.java index d7544f2aae76..dc322ab61a4b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesStopSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesStopSamples.java @@ -9,7 +9,7 @@ */ public final class WorkbenchesStopSamples { /* - * x-ms-original-file: 2026-09-15-preview/StopWorkbench.json + * x-ms-original-file: 2026-07-15-preview/StopWorkbench.json */ /** * Sample code: StopWorkbench. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesUpdateSamples.java index 2ea6767f368f..f570575401f4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchesUpdateSamples.java @@ -4,11 +4,9 @@ package com.azure.resourcemanager.cognitiveservices.generated; -import com.azure.resourcemanager.cognitiveservices.models.Identity; -import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType; -import com.azure.resourcemanager.cognitiveservices.models.UserAssignedIdentity; +import com.azure.resourcemanager.cognitiveservices.models.SshSettings; import com.azure.resourcemanager.cognitiveservices.models.Workbench; -import com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdateProperties; +import com.azure.resourcemanager.cognitiveservices.models.WorkbenchProperties; import java.util.HashMap; import java.util.Map; @@ -17,65 +15,29 @@ */ public final class WorkbenchesUpdateSamples { /* - * x-ms-original-file: 2026-09-15-preview/UpdateWorkbenchComputeProperties.json + * x-ms-original-file: 2026-07-15-preview/UpdateWorkbench.json */ /** - * Sample code: UpdateWorkbenchComputeProperties. + * Sample code: UpdateWorkbench. * * @param manager Entry point to CognitiveServicesManager. */ - public static void - updateWorkbenchComputeProperties(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { + public static void updateWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { Workbench resource = manager.workbenches() .getWithResponse("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withProperties(new WorkbenchUpdateProperties().withTargetClusterId( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/vc-rg/providers/Microsoft.MachineLearningServices/virtualClusters/test-vc") + .withTags(mapOf("environment", "production")) + .withProperties(new WorkbenchProperties().withTargetClusterId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.CognitiveServices/accounts/myAccount/computes/myCluster") + .withImageLink("mcr.microsoft.com/azureml/curated/pytorch-gpu:v2") .withIdleTimeBeforeShutdown("PT1H") - .withInstanceType("Singularity.ND12_H100_v5-n1") - .withGpuCount(1)) - .withIdentity(new Identity().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - new UserAssignedIdentity()))) + .withDatasetId("dataset-67890") + .withSshSettings(new SshSettings().withSshPublicKey("fakeTokenPlaceholder").withAdminEnabled(true))) .apply(); } - /* - * x-ms-original-file: 2026-09-15-preview/UpdateWorkbench.json - */ - /** - * Sample code: UpdateWorkbench. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - Workbench resource = manager.workbenches() - .getWithResponse("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withProperties(new WorkbenchUpdateProperties().withIdleTimeBeforeShutdown("PT1H")).apply(); - } - - /* - * x-ms-original-file: 2026-09-15-preview/UpdateWorkbenchResetComputeProperties.json - */ - /** - * Sample code: UpdateWorkbenchResetComputeProperties. - * - * @param manager Entry point to CognitiveServicesManager. - */ - public static void updateWorkbenchResetComputeProperties( - com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { - Workbench resource = manager.workbenches() - .getWithResponse("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withProperties(new WorkbenchUpdateProperties()).apply(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AadAuthTypeConnectionPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AadAuthTypeConnectionPropertiesTests.java index 89fb2a944bb9..e914d5f55930 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AadAuthTypeConnectionPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AadAuthTypeConnectionPropertiesTests.java @@ -19,45 +19,44 @@ public final class AadAuthTypeConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AadAuthTypeConnectionProperties model = BinaryData.fromString( - "{\"authType\":\"AAD\",\"category\":\"Sftp\",\"createdByWorkspaceArmId\":\"kizvoa\",\"error\":\"naqln\",\"expiryTime\":\"2021-09-28T23:49:16Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":false,\"metadata\":{\"xzcwxhmpejt\":\"kwph\",\"aonwivkcqhrxh\":\"ke\",\"jubyqjfkakfq\":\"knlccrmmkyup\",\"yildudxjascow\":\"rke\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Active\",\"sharedUserList\":[\"xphlkksnmg\",\"vyfijdkzuqnw\"],\"target\":\"thuqolyahluq\",\"useWorkspaceManagedIdentity\":true}") + "{\"authType\":\"AAD\",\"category\":\"Couchbase\",\"createdByWorkspaceArmId\":\"pirpiwrqof\",\"error\":\"o\",\"expiryTime\":\"2021-06-19T10:30:26Z\",\"group\":\"ServicesAndApps\",\"isSharedToAll\":false,\"metadata\":{\"erctatoyin\":\"cbjpibkephuu\",\"rduczkgofxyfs\":\"qpbrlc\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"pcjttbstvjeaqn\",\"mvvfko\",\"mlghktuidvrmazlp\",\"wwexymzvlazipbh\"],\"target\":\"vqs\",\"useWorkspaceManagedIdentity\":false}") .toObject(AadAuthTypeConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.SFTP, model.category()); - Assertions.assertEquals("naqln", model.error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-28T23:49:16Z"), model.expiryTime()); + Assertions.assertEquals(ConnectionCategory.COUCHBASE, model.category()); + Assertions.assertEquals("o", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T10:30:26Z"), model.expiryTime()); Assertions.assertFalse(model.isSharedToAll()); - Assertions.assertEquals("kwph", model.metadata().get("xzcwxhmpejt")); + Assertions.assertEquals("cbjpibkephuu", model.metadata().get("erctatoyin")); Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.peRequirement()); - Assertions.assertEquals(ManagedPEStatus.ACTIVE, model.peStatus()); - Assertions.assertEquals("xphlkksnmg", model.sharedUserList().get(0)); - Assertions.assertEquals("thuqolyahluq", model.target()); - Assertions.assertTrue(model.useWorkspaceManagedIdentity()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.peStatus()); + Assertions.assertEquals("pcjttbstvjeaqn", model.sharedUserList().get(0)); + Assertions.assertEquals("vqs", model.target()); + Assertions.assertFalse(model.useWorkspaceManagedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AadAuthTypeConnectionProperties model - = new AadAuthTypeConnectionProperties().withCategory(ConnectionCategory.SFTP) - .withError("naqln") - .withExpiryTime(OffsetDateTime.parse("2021-09-28T23:49:16Z")) + = new AadAuthTypeConnectionProperties().withCategory(ConnectionCategory.COUCHBASE) + .withError("o") + .withExpiryTime(OffsetDateTime.parse("2021-06-19T10:30:26Z")) .withIsSharedToAll(false) - .withMetadata(mapOf("xzcwxhmpejt", "kwph", "aonwivkcqhrxh", "ke", "jubyqjfkakfq", "knlccrmmkyup", - "yildudxjascow", "rke")) + .withMetadata(mapOf("erctatoyin", "cbjpibkephuu", "rduczkgofxyfs", "qpbrlc")) .withPeRequirement(ManagedPERequirement.NOT_REQUIRED) - .withPeStatus(ManagedPEStatus.ACTIVE) - .withSharedUserList(Arrays.asList("xphlkksnmg", "vyfijdkzuqnw")) - .withTarget("thuqolyahluq") - .withUseWorkspaceManagedIdentity(true); + .withPeStatus(ManagedPEStatus.NOT_APPLICABLE) + .withSharedUserList(Arrays.asList("pcjttbstvjeaqn", "mvvfko", "mlghktuidvrmazlp", "wwexymzvlazipbh")) + .withTarget("vqs") + .withUseWorkspaceManagedIdentity(false); model = BinaryData.fromObject(model).toObject(AadAuthTypeConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.SFTP, model.category()); - Assertions.assertEquals("naqln", model.error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-28T23:49:16Z"), model.expiryTime()); + Assertions.assertEquals(ConnectionCategory.COUCHBASE, model.category()); + Assertions.assertEquals("o", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T10:30:26Z"), model.expiryTime()); Assertions.assertFalse(model.isSharedToAll()); - Assertions.assertEquals("kwph", model.metadata().get("xzcwxhmpejt")); + Assertions.assertEquals("cbjpibkephuu", model.metadata().get("erctatoyin")); Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.peRequirement()); - Assertions.assertEquals(ManagedPEStatus.ACTIVE, model.peStatus()); - Assertions.assertEquals("xphlkksnmg", model.sharedUserList().get(0)); - Assertions.assertEquals("thuqolyahluq", model.target()); - Assertions.assertTrue(model.useWorkspaceManagedIdentity()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.peStatus()); + Assertions.assertEquals("pcjttbstvjeaqn", model.sharedUserList().get(0)); + Assertions.assertEquals("vqs", model.target()); + Assertions.assertFalse(model.useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsCreateOrUpdateMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsCreateOrUpdateMockTests.java index f45bfac78edf..42a784d21003 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsCreateOrUpdateMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsCreateOrUpdateMockTests.java @@ -26,7 +26,7 @@ public final class AccountCapabilityHostsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"aiServicesConnections\":[\"bxaxoyjyhutwe\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"vktecc\",\"provisioningState\":\"Succeeded\",\"storageConnections\":[\"ntmcaxb\",\"pmfhjikqcnbdq\"],\"threadStorageConnections\":[\"h\",\"melzvrch\"],\"vectorStoreConnections\":[\"cgrmwyvhd\",\"yplgq\"],\"enablePublicHostingEnvironment\":false,\"description\":\"brhhvipgt\",\"tags\":{\"bweasgypjixd\":\"aoylwhfm\",\"lsxdqdchnzibixrg\":\"obadydwqeuwdv\",\"sijiqexqwqykm\":\"rwxxqkwargcbgdg\",\"nkvthwta\":\"ugflhdhoxurhc\"}},\"id\":\"m\",\"name\":\"gyvxhfmuhkezuucq\",\"type\":\"cocdxvbeqzjd\"}"; + = "{\"properties\":{\"aiServicesConnections\":[\"bk\",\"ftusdwmnrt\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"cnnrovome\",\"provisioningState\":\"Succeeded\",\"storageConnections\":[\"cvwqzocs\",\"shennmsgpywdib\"],\"threadStorageConnections\":[\"nr\",\"alvwrh\"],\"vectorStoreConnections\":[\"brbknuubxcwoj\",\"upqdv\",\"py\"],\"enablePublicHostingEnvironment\":true,\"description\":\"fifujg\",\"tags\":{\"ybpchrtczwjcujyz\":\"wlxmwefc\",\"i\":\"vyrjqdjlgk\"}},\"id\":\"xeuwiiircvnfg\",\"name\":\"dviw\",\"type\":\"ohktxagfujdbqjny\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,28 +36,28 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapabilityHost response = manager.accountCapabilityHosts() - .define("pkfcdfu") - .withExistingAccount("heqzhehgvmm", "oyzgnbnypluz") - .withProperties(new CapabilityHostProperties().withDescription("hjjirvj") - .withTags(mapOf("sffdralihhssc", "vqmdmrac")) - .withAiServicesConnections(Arrays.asList("zvxotnoilqcdvhy", "fqhxytsqmbwcacwa", "qakvokya", "xra")) + .define("esbomphz") + .withExistingAccount("ufl", "syzzdcrolr") + .withProperties(new CapabilityHostProperties().withDescription("cydjh") + .withTags(mapOf("bxblrdol", "serwiyndurdonkg")) + .withAiServicesConnections(Arrays.asList("u", "wjivtbuszbdjrdfe", "jywdalis", "eqngcayd")) .withCapabilityHostKind(CapabilityHostKind.AGENTS) - .withCustomerSubnet("eqbrcmmdtsh") - .withStorageConnections(Arrays.asList("cznbabow", "cyrnmjwko", "x", "zkkagvej")) - .withThreadStorageConnections(Arrays.asList("ap", "rskmpeajzzypavam", "mzfntteyrf")) - .withVectorStoreConnections(Arrays.asList("tjaypjdrjlijkkv")) - .withEnablePublicHostingEnvironment(true)) + .withCustomerSubnet("ooulpoz") + .withStorageConnections(Arrays.asList("cl", "rsi")) + .withThreadStorageConnections(Arrays.asList("bldpoiaffjkrtn", "revimxmaxcj")) + .withVectorStoreConnections(Arrays.asList("tygvdwd", "oqtbfkvuozbzc", "nqekwankl")) + .withEnablePublicHostingEnvironment(false)) .create(); - Assertions.assertEquals("brhhvipgt", response.properties().description()); - Assertions.assertEquals("aoylwhfm", response.properties().tags().get("bweasgypjixd")); - Assertions.assertEquals("bxaxoyjyhutwe", response.properties().aiServicesConnections().get(0)); + Assertions.assertEquals("fifujg", response.properties().description()); + Assertions.assertEquals("wlxmwefc", response.properties().tags().get("ybpchrtczwjcujyz")); + Assertions.assertEquals("bk", response.properties().aiServicesConnections().get(0)); Assertions.assertEquals(CapabilityHostKind.AGENTS, response.properties().capabilityHostKind()); - Assertions.assertEquals("vktecc", response.properties().customerSubnet()); - Assertions.assertEquals("ntmcaxb", response.properties().storageConnections().get(0)); - Assertions.assertEquals("h", response.properties().threadStorageConnections().get(0)); - Assertions.assertEquals("cgrmwyvhd", response.properties().vectorStoreConnections().get(0)); - Assertions.assertFalse(response.properties().enablePublicHostingEnvironment()); + Assertions.assertEquals("cnnrovome", response.properties().customerSubnet()); + Assertions.assertEquals("cvwqzocs", response.properties().storageConnections().get(0)); + Assertions.assertEquals("nr", response.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("brbknuubxcwoj", response.properties().vectorStoreConnections().get(0)); + Assertions.assertTrue(response.properties().enablePublicHostingEnvironment()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsGetWithResponseMockTests.java index 9c2b020cda21..2600d67dd39c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class AccountCapabilityHostsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"aiServicesConnections\":[\"kqjarlazbtgtzpca\",\"rmzoujfgt\",\"xuupczegqnaidvs\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"oggkztzttjnknpb\",\"provisioningState\":\"Canceled\",\"storageConnections\":[\"obc\",\"obnaqei\",\"pliqlyug\",\"nnhzjmkff\"],\"threadStorageConnections\":[\"mnvmujy\"],\"vectorStoreConnections\":[\"wlpxm\",\"iytdeg\"],\"enablePublicHostingEnvironment\":true,\"description\":\"bkilxstekbirhyv\",\"tags\":{\"ffiuklt\":\"vriemors\"}},\"id\":\"gio\",\"name\":\"uoxcsd\",\"type\":\"oxhdenm\"}"; + = "{\"properties\":{\"aiServicesConnections\":[\"ylmnqunkygb\",\"tmsgkwedwl\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"gbg\",\"provisioningState\":\"Failed\",\"storageConnections\":[\"rpjimvrrqfi\",\"pkwmamrlfizjud\"],\"threadStorageConnections\":[\"ih\"],\"vectorStoreConnections\":[\"gyhylqyafewcmod\"],\"enablePublicHostingEnvironment\":false,\"description\":\"ytxnxrqx\",\"tags\":{\"vpjxsdhweignybff\":\"eargvfvkhbjh\",\"vconysebjijfhp\":\"cwwynepktvmw\",\"alokb\":\"nikouox\"}},\"id\":\"kyporsynieunby\",\"name\":\"lgfaphwuu\",\"type\":\"wtsaynrtvj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,17 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapabilityHost response = manager.accountCapabilityHosts() - .getWithResponse("xvevwxmnbwaxa", "xgnpyhtu", "alpqildnaokexznp", com.azure.core.util.Context.NONE) + .getWithResponse("dwvog", "ffjdhgslormhbt", "fcvxkylhc", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bkilxstekbirhyv", response.properties().description()); - Assertions.assertEquals("vriemors", response.properties().tags().get("ffiuklt")); - Assertions.assertEquals("kqjarlazbtgtzpca", response.properties().aiServicesConnections().get(0)); + Assertions.assertEquals("ytxnxrqx", response.properties().description()); + Assertions.assertEquals("eargvfvkhbjh", response.properties().tags().get("vpjxsdhweignybff")); + Assertions.assertEquals("ylmnqunkygb", response.properties().aiServicesConnections().get(0)); Assertions.assertEquals(CapabilityHostKind.AGENTS, response.properties().capabilityHostKind()); - Assertions.assertEquals("oggkztzttjnknpb", response.properties().customerSubnet()); - Assertions.assertEquals("obc", response.properties().storageConnections().get(0)); - Assertions.assertEquals("mnvmujy", response.properties().threadStorageConnections().get(0)); - Assertions.assertEquals("wlpxm", response.properties().vectorStoreConnections().get(0)); - Assertions.assertTrue(response.properties().enablePublicHostingEnvironment()); + Assertions.assertEquals("gbg", response.properties().customerSubnet()); + Assertions.assertEquals("rpjimvrrqfi", response.properties().storageConnections().get(0)); + Assertions.assertEquals("ih", response.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("gyhylqyafewcmod", response.properties().vectorStoreConnections().get(0)); + Assertions.assertFalse(response.properties().enablePublicHostingEnvironment()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsListMockTests.java index b1416d41328b..ea0528719fe1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountCapabilityHostsListMockTests.java @@ -23,7 +23,7 @@ public final class AccountCapabilityHostsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"aiServicesConnections\":[\"xvvmrnjrdi\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"swsychdc\",\"provisioningState\":\"Succeeded\",\"storageConnections\":[\"pncjqbgbnoqnowv\"],\"threadStorageConnections\":[\"ytzgwjekyqirv\"],\"vectorStoreConnections\":[\"lnvgpppdilbdvx\"],\"enablePublicHostingEnvironment\":true,\"description\":\"zzgapspxwwblscrm\",\"tags\":{\"wkgouxnro\":\"uz\",\"esywywnvgy\":\"ht\",\"nzyrgrlhchrau\":\"scifrzcwuejmxlfz\",\"xmrg\":\"jovlxqtvmvzpniq\"}},\"id\":\"kgtlhzkrazki\",\"name\":\"iy\",\"type\":\"cznvzmsvzn\"}]}"; + = "{\"value\":[{\"properties\":{\"aiServicesConnections\":[\"bmdivixzhpjgq\",\"miaoaweacfx\",\"ubuhruetcnxriqz\",\"dckhsq\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"surnowobwx\",\"provisioningState\":\"Failed\",\"storageConnections\":[\"kohlsfjfouqj\",\"zheahuv\"],\"threadStorageConnections\":[\"qkvadmjhymud\",\"maajzd\",\"bhsermclyqwwu\",\"yqkaaptb\"],\"vectorStoreConnections\":[\"kb\",\"bptw\",\"bloccu\"],\"enablePublicHostingEnvironment\":true,\"description\":\"zbns\",\"tags\":{\"beuybutcdzjf\":\"qnps\",\"tqmmijgpqfkwna\":\"tvpeyxdyuxurxr\",\"g\":\"ikczscymqfv\",\"zvp\":\"pqnyumzapdok\"}},\"id\":\"knfzqnzbflbqmhb\",\"name\":\"yxxvwedhagqbbse\",\"type\":\"ea\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +33,19 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.accountCapabilityHosts().list("ogxg", "ggyciwbnqi", com.azure.core.util.Context.NONE); + = manager.accountCapabilityHosts().list("qreeo", "vqjmrnblihs", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zzgapspxwwblscrm", response.iterator().next().properties().description()); - Assertions.assertEquals("uz", response.iterator().next().properties().tags().get("wkgouxnro")); - Assertions.assertEquals("xvvmrnjrdi", response.iterator().next().properties().aiServicesConnections().get(0)); + Assertions.assertEquals("zbns", response.iterator().next().properties().description()); + Assertions.assertEquals("qnps", response.iterator().next().properties().tags().get("beuybutcdzjf")); + Assertions.assertEquals("bmdivixzhpjgq", + response.iterator().next().properties().aiServicesConnections().get(0)); Assertions.assertEquals(CapabilityHostKind.AGENTS, response.iterator().next().properties().capabilityHostKind()); - Assertions.assertEquals("swsychdc", response.iterator().next().properties().customerSubnet()); - Assertions.assertEquals("pncjqbgbnoqnowv", response.iterator().next().properties().storageConnections().get(0)); - Assertions.assertEquals("ytzgwjekyqirv", + Assertions.assertEquals("surnowobwx", response.iterator().next().properties().customerSubnet()); + Assertions.assertEquals("kohlsfjfouqj", response.iterator().next().properties().storageConnections().get(0)); + Assertions.assertEquals("qkvadmjhymud", response.iterator().next().properties().threadStorageConnections().get(0)); - Assertions.assertEquals("lnvgpppdilbdvx", - response.iterator().next().properties().vectorStoreConnections().get(0)); + Assertions.assertEquals("kb", response.iterator().next().properties().vectorStoreConnections().get(0)); Assertions.assertTrue(response.iterator().next().properties().enablePublicHostingEnvironment()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsCreateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsCreateWithResponseMockTests.java index d3c9669b9dad..89a66a99276c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsCreateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsCreateWithResponseMockTests.java @@ -28,7 +28,7 @@ public final class AccountConnectionsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Hubspot\",\"createdByWorkspaceArmId\":\"hophqwo\",\"error\":\"zccqtwsrb\",\"expiryTime\":\"2021-10-30T15:53:19Z\",\"group\":\"ServicesAndApps\",\"isSharedToAll\":true,\"metadata\":{\"vnhhmfsnqpvjtshl\":\"fbvex\",\"yppwfbwoet\":\"vrsksdzmhwt\",\"xhflgdu\":\"izrf\"},\"peRequirement\":\"Required\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"a\",\"bxsnx\"],\"target\":\"sznfstmprvgra\",\"useWorkspaceManagedIdentity\":true},\"id\":\"twomlp\",\"name\":\"zlqboomzg\",\"type\":\"rolhsfddk\"}"; + = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Office365\",\"createdByWorkspaceArmId\":\"nfgvlx\",\"error\":\"mnctigp\",\"expiryTime\":\"2021-07-28T16:55:32Z\",\"group\":\"Azure\",\"isSharedToAll\":false,\"metadata\":{\"prtqjytd\":\"tgk\",\"jsbg\":\"fefuhbdwb\",\"bpbltcwsexh\":\"lamoaxcaytnpk\",\"fhdxyfhxohzbzhha\":\"eocnqoubvepvlrys\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"Active\",\"sharedUserList\":[\"kdslcofuvtfu\"],\"target\":\"ouisakl\",\"useWorkspaceManagedIdentity\":true},\"id\":\"dxqfussubzssp\",\"name\":\"jvailfauyvxpqw\",\"type\":\"kqdgwbztrth\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,29 +38,30 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ConnectionPropertiesV2BasicResource response = manager.accountConnections() - .define("dbrbmc") - .withExistingAccount("mokrqdbsgkqyjko", "ypcjxhyzzlocjhzp") - .withProperties(new ConnectionPropertiesV2().withCategory(ConnectionCategory.APP_INSIGHTS) - .withError("ejrwwsfvt") - .withExpiryTime(OffsetDateTime.parse("2021-05-09T08:19:55Z")) + .define("ajrfgimom") + .withExistingAccount("ahwcorewcnn", "axqjf") + .withProperties(new ConnectionPropertiesV2().withCategory(ConnectionCategory.AZURE_MY_SQL_DB) + .withError("nvussuqk") + .withExpiryTime(OffsetDateTime.parse("2021-09-13T06:00:23Z")) .withIsSharedToAll(true) - .withMetadata(mapOf("e", "fc", "bxjtezujtou", "ovelvsp", "emt", "odexwmvssrjciexu")) - .withPeRequirement(ManagedPERequirement.NOT_REQUIRED) - .withPeStatus(ManagedPEStatus.INACTIVE) - .withSharedUserList(Arrays.asList("mcgsks")) - .withTarget("sxehaxi") - .withUseWorkspaceManagedIdentity(true)) + .withMetadata(mapOf("rtlikff", "qbyeywpmoh", "qrf", "dzt", "zdteqjmyqxuhg", "gynzfw", "wrrlccklyf", + "axnyprijyoxxjxbs")) + .withPeRequirement(ManagedPERequirement.REQUIRED) + .withPeStatus(ManagedPEStatus.ACTIVE) + .withSharedUserList(Arrays.asList("emqom")) + .withTarget("alknuyapvibzic") + .withUseWorkspaceManagedIdentity(false)) .create(); - Assertions.assertEquals(ConnectionCategory.HUBSPOT, response.properties().category()); - Assertions.assertEquals("zccqtwsrb", response.properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-30T15:53:19Z"), response.properties().expiryTime()); - Assertions.assertTrue(response.properties().isSharedToAll()); - Assertions.assertEquals("fbvex", response.properties().metadata().get("vnhhmfsnqpvjtshl")); - Assertions.assertEquals(ManagedPERequirement.REQUIRED, response.properties().peRequirement()); - Assertions.assertEquals(ManagedPEStatus.INACTIVE, response.properties().peStatus()); - Assertions.assertEquals("a", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("sznfstmprvgra", response.properties().target()); + Assertions.assertEquals(ConnectionCategory.OFFICE365, response.properties().category()); + Assertions.assertEquals("mnctigp", response.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-28T16:55:32Z"), response.properties().expiryTime()); + Assertions.assertFalse(response.properties().isSharedToAll()); + Assertions.assertEquals("tgk", response.properties().metadata().get("prtqjytd")); + Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, response.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.ACTIVE, response.properties().peStatus()); + Assertions.assertEquals("kdslcofuvtfu", response.properties().sharedUserList().get(0)); + Assertions.assertEquals("ouisakl", response.properties().target()); Assertions.assertTrue(response.properties().useWorkspaceManagedIdentity()); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsDeleteWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsDeleteWithResponseMockTests.java index 16232d34cf38..31293d0a46ed 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsDeleteWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsDeleteWithResponseMockTests.java @@ -27,8 +27,7 @@ public void testDeleteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.accountConnections() - .deleteWithResponse("xaeypyqoizf", "asyddqbwscjwyy", "omiflrvfeowc", com.azure.core.util.Context.NONE); + manager.accountConnections().deleteWithResponse("ypb", "imh", "bozvo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsGetWithResponseMockTests.java index 3803be0f63df..faedd0ba0db9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsGetWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class AccountConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Presto\",\"createdByWorkspaceArmId\":\"kzuhkshxjkckwbq\",\"error\":\"yfmmk\",\"expiryTime\":\"2021-10-10T23:57:50Z\",\"group\":\"ServicesAndApps\",\"isSharedToAll\":true,\"metadata\":{\"a\":\"obnvyue\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Active\",\"sharedUserList\":[\"xtigukfkbsyc\",\"dymbnpeenlq\"],\"target\":\"yvlfbs\",\"useWorkspaceManagedIdentity\":false},\"id\":\"vfj\",\"name\":\"sqephtoshqtua\",\"type\":\"jwgujrc\"}"; + = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"SalesforceServiceCloud\",\"createdByWorkspaceArmId\":\"ouan\",\"error\":\"u\",\"expiryTime\":\"2021-08-29T07:55:21Z\",\"group\":\"File\",\"isSharedToAll\":true,\"metadata\":{\"ti\":\"wb\",\"hfljeyodpiovn\":\"qbzbwbgwzh\",\"yakzuafapwxsvd\":\"hr\",\"wtgntimznupb\":\"atjiobnirgoextqd\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"odsqv\",\"edaakghcrzmm\",\"jyvdhdgdiwmlg\",\"tmfetqjisjmolzca\"],\"target\":\"kakhgkrv\",\"useWorkspaceManagedIdentity\":false},\"id\":\"vytvjejq\",\"name\":\"wfusqp\",\"type\":\"zxkczb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,18 +34,18 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ConnectionPropertiesV2BasicResource response = manager.accountConnections() - .getWithResponse("mcvdjlwwefevtwll", "ypmjc", "y", com.azure.core.util.Context.NONE) + .getWithResponse("gkwxjsjquvohufzd", "srpjuv", "zacrzhnsbylgmgbh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ConnectionCategory.PRESTO, response.properties().category()); - Assertions.assertEquals("yfmmk", response.properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T23:57:50Z"), response.properties().expiryTime()); + Assertions.assertEquals(ConnectionCategory.SALESFORCE_SERVICE_CLOUD, response.properties().category()); + Assertions.assertEquals("u", response.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T07:55:21Z"), response.properties().expiryTime()); Assertions.assertTrue(response.properties().isSharedToAll()); - Assertions.assertEquals("obnvyue", response.properties().metadata().get("a")); - Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, response.properties().peRequirement()); - Assertions.assertEquals(ManagedPEStatus.ACTIVE, response.properties().peStatus()); - Assertions.assertEquals("xtigukfkbsyc", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("yvlfbs", response.properties().target()); + Assertions.assertEquals("wb", response.properties().metadata().get("ti")); + Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, response.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, response.properties().peStatus()); + Assertions.assertEquals("odsqv", response.properties().sharedUserList().get(0)); + Assertions.assertEquals("kakhgkrv", response.properties().target()); Assertions.assertFalse(response.properties().useWorkspaceManagedIdentity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsListMockTests.java index eb78da781d93..ac7b5a489d78 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountConnectionsListMockTests.java @@ -25,7 +25,7 @@ public final class AccountConnectionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Odbc\",\"createdByWorkspaceArmId\":\"iten\",\"error\":\"kslizmpnxghamr\",\"expiryTime\":\"2021-02-28T18:00:45Z\",\"group\":\"File\",\"isSharedToAll\":true,\"metadata\":{\"jzbjwvtuekbbypqs\":\"mmxlmxejwy\",\"juwndal\":\"psbeqieiux\",\"ihl\":\"jjhrgkjjpc\",\"ekurdgcpzanaqve\":\"yxvtajfjatoid\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Active\",\"sharedUserList\":[\"rnanbrpkoc\",\"xfbagegjtjltcki\"],\"target\":\"ggfagijxmdboef\",\"useWorkspaceManagedIdentity\":false},\"id\":\"ah\",\"name\":\"qeinv\",\"type\":\"so\"}]}"; + = "{\"value\":[{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"AzureTableStorage\",\"createdByWorkspaceArmId\":\"nviulbylmgjzr\",\"error\":\"wpbgumwhmxp\",\"expiryTime\":\"2021-08-01T16:06:08Z\",\"group\":\"Azure\",\"isSharedToAll\":false,\"metadata\":{\"c\":\"psmgom\"},\"peRequirement\":\"Required\",\"peStatus\":\"Active\",\"sharedUserList\":[\"j\",\"xok\",\"xamqecjrzvlcivqx\"],\"target\":\"mklphxwww\",\"useWorkspaceManagedIdentity\":false},\"id\":\"bgnfbrzj\",\"name\":\"fsunh\",\"type\":\"evlahxczywyw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,20 +35,19 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.accountConnections() - .list("shwfrhhas", "bvau", "nwwumkbpg", "ilbwtpwbjlpfwuq", true, com.azure.core.util.Context.NONE); + .list("rtcl", "h", "jcyuzlybqsci", "vylkvckcafnwq", true, com.azure.core.util.Context.NONE); - Assertions.assertEquals(ConnectionCategory.ODBC, response.iterator().next().properties().category()); - Assertions.assertEquals("kslizmpnxghamr", response.iterator().next().properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-28T18:00:45Z"), + Assertions.assertEquals(ConnectionCategory.AZURE_TABLE_STORAGE, + response.iterator().next().properties().category()); + Assertions.assertEquals("wpbgumwhmxp", response.iterator().next().properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T16:06:08Z"), response.iterator().next().properties().expiryTime()); - Assertions.assertTrue(response.iterator().next().properties().isSharedToAll()); - Assertions.assertEquals("mmxlmxejwy", - response.iterator().next().properties().metadata().get("jzbjwvtuekbbypqs")); - Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, - response.iterator().next().properties().peRequirement()); + Assertions.assertFalse(response.iterator().next().properties().isSharedToAll()); + Assertions.assertEquals("psmgom", response.iterator().next().properties().metadata().get("c")); + Assertions.assertEquals(ManagedPERequirement.REQUIRED, response.iterator().next().properties().peRequirement()); Assertions.assertEquals(ManagedPEStatus.ACTIVE, response.iterator().next().properties().peStatus()); - Assertions.assertEquals("rnanbrpkoc", response.iterator().next().properties().sharedUserList().get(0)); - Assertions.assertEquals("ggfagijxmdboef", response.iterator().next().properties().target()); + Assertions.assertEquals("j", response.iterator().next().properties().sharedUserList().get(0)); + Assertions.assertEquals("mklphxwww", response.iterator().next().properties().target()); Assertions.assertFalse(response.iterator().next().properties().useWorkspaceManagedIdentity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountSkuListResultInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountSkuListResultInnerTests.java index e8445efe9583..388622860887 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountSkuListResultInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountSkuListResultInnerTests.java @@ -13,13 +13,13 @@ public final class AccountSkuListResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccountSkuListResultInner model = BinaryData.fromString( - "{\"value\":[{\"resourceType\":\"f\",\"sku\":{\"name\":\"keyyi\",\"tier\":\"Basic\",\"size\":\"dlwtgrhpdj\",\"family\":\"umasxazjpq\",\"capacity\":973371108}}]}") + "{\"value\":[{\"resourceType\":\"pheoflokeyy\",\"sku\":{\"name\":\"nj\",\"tier\":\"Basic\",\"size\":\"tgrhpdjpjumas\",\"family\":\"zj\",\"capacity\":1063088657}},{\"resourceType\":\"gual\",\"sku\":{\"name\":\"xxhejjzzvd\",\"tier\":\"Free\",\"size\":\"dslfhotwmcy\",\"family\":\"wlbjnpgacftade\",\"capacity\":2035779275}},{\"resourceType\":\"tyfsoppusuesn\",\"sku\":{\"name\":\"dejbavo\",\"tier\":\"Standard\",\"size\":\"mohctb\",\"family\":\"udwxdndnvowguj\",\"capacity\":408024361}},{\"resourceType\":\"dkcglhsl\",\"sku\":{\"name\":\"jdyggdtji\",\"tier\":\"Free\",\"size\":\"uofqwe\",\"family\":\"hmenevfyexfwhybc\",\"capacity\":1547255739}}]}") .toObject(AccountSkuListResultInner.class); - Assertions.assertEquals("f", model.value().get(0).resourceType()); - Assertions.assertEquals("keyyi", model.value().get(0).sku().name()); + Assertions.assertEquals("pheoflokeyy", model.value().get(0).resourceType()); + Assertions.assertEquals("nj", model.value().get(0).sku().name()); Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("dlwtgrhpdj", model.value().get(0).sku().size()); - Assertions.assertEquals("umasxazjpq", model.value().get(0).sku().family()); - Assertions.assertEquals(973371108, model.value().get(0).sku().capacity()); + Assertions.assertEquals("tgrhpdjpjumas", model.value().get(0).sku().size()); + Assertions.assertEquals("zj", model.value().get(0).sku().family()); + Assertions.assertEquals(1063088657, model.value().get(0).sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountSkuTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountSkuTests.java index 643aa6225ffc..15da2e367c98 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountSkuTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountSkuTests.java @@ -13,13 +13,13 @@ public final class AccountSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccountSku model = BinaryData.fromString( - "{\"resourceType\":\"alhbx\",\"sku\":{\"name\":\"e\",\"tier\":\"Enterprise\",\"size\":\"v\",\"family\":\"dgwdslfhot\",\"capacity\":470013493}}") + "{\"resourceType\":\"vdcsitynn\",\"sku\":{\"name\":\"mdectehfiqscjey\",\"tier\":\"Premium\",\"size\":\"zrkgqhcjrefovg\",\"family\":\"qsl\",\"capacity\":1641560645}}") .toObject(AccountSku.class); - Assertions.assertEquals("alhbx", model.resourceType()); - Assertions.assertEquals("e", model.sku().name()); - Assertions.assertEquals(SkuTier.ENTERPRISE, model.sku().tier()); - Assertions.assertEquals("v", model.sku().size()); - Assertions.assertEquals("dgwdslfhot", model.sku().family()); - Assertions.assertEquals(470013493, model.sku().capacity()); + Assertions.assertEquals("vdcsitynn", model.resourceType()); + Assertions.assertEquals("mdectehfiqscjey", model.sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); + Assertions.assertEquals("zrkgqhcjrefovg", model.sku().size()); + Assertions.assertEquals("qsl", model.sku().family()); + Assertions.assertEquals(1641560645, model.sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteMockTests.java index 3814292f63a9..66614b024334 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.accounts().delete("avqdorbccqcd", "thojvlirknucos", com.azure.core.util.Context.NONE); + manager.accounts().delete("uoxudnmckaprh", "nqi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsEvaluateDeploymentPoliciesWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsEvaluateDeploymentPoliciesWithResponseMockTests.java index be36d67cee5d..a8b165669c7c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsEvaluateDeploymentPoliciesWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsEvaluateDeploymentPoliciesWithResponseMockTests.java @@ -27,7 +27,7 @@ public final class AccountsEvaluateDeploymentPoliciesWithResponseMockTests { @Test public void testEvaluateDeploymentPoliciesWithResponse() throws Exception { String responseStr - = "{\"results\":{\"kxrkemjpeq\":{\"evaluationOutcome\":\"NonCompliant\",\"errorMessage\":\"mumk\",\"nonCompliantAssignments\":[{\"assignmentId\":\"czd\",\"policyDefinitionId\":\"wnhkgq\",\"policySetDefinitionId\":\"oxsstc\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"kfrrynj\",\"effect\":\"mhlym\",\"expressionEvaluations\":[{},{}]}]},\"walzyxwhoeamoeo\":{\"evaluationOutcome\":\"NonCompliant\",\"errorMessage\":\"zaudgjtfbclakkuc\",\"nonCompliantAssignments\":[{\"assignmentId\":\"hczbuto\",\"policyDefinitionId\":\"gjtirjwayhic\",\"policySetDefinitionId\":\"wwvg\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"vlizedvb\",\"effect\":\"bvn\",\"expressionEvaluations\":[{}]},{\"assignmentId\":\"kzyqxadyfhbmw\",\"policyDefinitionId\":\"ojqttbsp\",\"policySetDefinitionId\":\"hg\",\"evaluationOutcome\":\"Compliant\",\"nonComplianceReason\":\"sgyzstujrzxr\",\"effect\":\"sf\",\"expressionEvaluations\":[{},{},{},{}]},{\"assignmentId\":\"uyehiiittugyuqwr\",\"policyDefinitionId\":\"axu\",\"policySetDefinitionId\":\"qa\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"zjvxdzcigg\",\"effect\":\"vt\",\"expressionEvaluations\":[{},{},{},{}]}]}}}"; + = "{\"results\":{\"tgirnb\":{\"evaluationOutcome\":\"NonCompliant\",\"errorMessage\":\"xi\",\"nonCompliantAssignments\":[{\"assignmentId\":\"fyzavfrbypicdb\",\"policyDefinitionId\":\"dj\",\"policySetDefinitionId\":\"qh\",\"evaluationOutcome\":\"Compliant\",\"nonComplianceReason\":\"zpdgonjhxshthmgp\",\"effect\":\"qulpt\",\"expressionEvaluations\":[{},{},{},{}]},{\"assignmentId\":\"pxtzhigqqbtimpk\",\"policyDefinitionId\":\"lornsihqh\",\"policySetDefinitionId\":\"smusuaawj\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"jnfczmnniixy\",\"effect\":\"qban\",\"expressionEvaluations\":[{},{}]}]}}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,49 +36,34 @@ public void testEvaluateDeploymentPoliciesWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - EvaluateDeploymentPoliciesResponse response - = manager.accounts() - .evaluateDeploymentPoliciesWithResponse("oqtrotpvclpo", "yrlmwkptsk", - new EvaluateDeploymentPoliciesRequest() - .withDeployments( - Arrays - .asList( - new EvaluateDeploymentPoliciesDeployment().withName("jgvhxcc") - .withProperties( - new EvaluateDeploymentPoliciesDeploymentProperties() - .withModel(new DeploymentModel().withPublisher("kakmkookbputmgvm") - .withFormat("akmlwktfowzkroyr") - .withName("r") - .withVersion("lzqjimejtgzjxx") - .withSource("e") - .withSourceAccount("zuqloiwyayyzivr")) - .withRaiPolicyName("cdq")), - new EvaluateDeploymentPoliciesDeployment().withName("hchwhrktjleif") - .withProperties(new EvaluateDeploymentPoliciesDeploymentProperties() - .withModel(new DeploymentModel().withPublisher("fiplhx") - .withFormat("smyc") - .withName("wlyeyz") - .withVersion("dsqcmhnxl") - .withSource("uwod") - .withSourceAccount("c")) - .withRaiPolicyName("vnrpbjrmvg")))), - com.azure.core.util.Context.NONE) - .getValue(); + EvaluateDeploymentPoliciesResponse response = manager.accounts() + .evaluateDeploymentPoliciesWithResponse("ztsdetjygow", "fcqpol", + new EvaluateDeploymentPoliciesRequest() + .withDeployments(Arrays.asList(new EvaluateDeploymentPoliciesDeployment().withName("gysdgzyyb") + .withProperties(new EvaluateDeploymentPoliciesDeploymentProperties() + .withModel(new DeploymentModel().withPublisher("xlvocptvdx") + .withFormat("eigmlil") + .withName("ghjhjvmabzzbwa") + .withVersion("fmdafbgymqtnap") + .withSource("ojxrjnbsconxavi") + .withSourceAccount("eychbji")) + .withRaiPolicyName("sgnwdxzedpq")))), + com.azure.core.util.Context.NONE) + .getValue(); Assertions.assertEquals(PolicyEvaluationOutcome.NON_COMPLIANT, - response.results().get("kxrkemjpeq").evaluationOutcome()); - Assertions.assertEquals("mumk", response.results().get("kxrkemjpeq").errorMessage()); - Assertions.assertEquals("czd", - response.results().get("kxrkemjpeq").nonCompliantAssignments().get(0).assignmentId()); - Assertions.assertEquals("wnhkgq", - response.results().get("kxrkemjpeq").nonCompliantAssignments().get(0).policyDefinitionId()); - Assertions.assertEquals("oxsstc", - response.results().get("kxrkemjpeq").nonCompliantAssignments().get(0).policySetDefinitionId()); - Assertions.assertEquals(PolicyEvaluationOutcome.ERROR, - response.results().get("kxrkemjpeq").nonCompliantAssignments().get(0).evaluationOutcome()); - Assertions.assertEquals("kfrrynj", - response.results().get("kxrkemjpeq").nonCompliantAssignments().get(0).nonComplianceReason()); - Assertions.assertEquals("mhlym", - response.results().get("kxrkemjpeq").nonCompliantAssignments().get(0).effect()); + response.results().get("tgirnb").evaluationOutcome()); + Assertions.assertEquals("xi", response.results().get("tgirnb").errorMessage()); + Assertions.assertEquals("fyzavfrbypicdb", + response.results().get("tgirnb").nonCompliantAssignments().get(0).assignmentId()); + Assertions.assertEquals("dj", + response.results().get("tgirnb").nonCompliantAssignments().get(0).policyDefinitionId()); + Assertions.assertEquals("qh", + response.results().get("tgirnb").nonCompliantAssignments().get(0).policySetDefinitionId()); + Assertions.assertEquals(PolicyEvaluationOutcome.COMPLIANT, + response.results().get("tgirnb").nonCompliantAssignments().get(0).evaluationOutcome()); + Assertions.assertEquals("zpdgonjhxshthmgp", + response.results().get("tgirnb").nonCompliantAssignments().get(0).nonComplianceReason()); + Assertions.assertEquals("qulpt", response.results().get("tgirnb").nonCompliantAssignments().get(0).effect()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusWithResponseMockTests.java index e19bdbc1ffef..b13b7a873097 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class AccountsListSkusWithResponseMockTests { @Test public void testListSkusWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"resourceType\":\"zxmbt\",\"sku\":{\"name\":\"efoi\",\"tier\":\"Free\",\"size\":\"oxznvgvd\",\"family\":\"uuvdawsx\",\"capacity\":200373066}},{\"resourceType\":\"bknimxl\",\"sku\":{\"name\":\"erxrzutylcurza\",\"tier\":\"Enterprise\",\"size\":\"xqaehtd\",\"family\":\"mbnvynfaooeacted\",\"capacity\":736880781}},{\"resourceType\":\"kakddidahzllrqm\",\"sku\":{\"name\":\"pbyxroiduyqy\",\"tier\":\"Basic\",\"size\":\"noiicsu\",\"family\":\"hbrj\",\"capacity\":121440006}},{\"resourceType\":\"xrdsjrholuqwg\",\"sku\":{\"name\":\"xxhdodpjwybl\",\"tier\":\"Free\",\"size\":\"mvsbyidaelqpve\",\"family\":\"kwjfbotloggdusxu\",\"capacity\":261969173}}]}"; + = "{\"value\":[{\"resourceType\":\"cbjqqwmtqsm\",\"sku\":{\"name\":\"sazuxejgwecywnfy\",\"tier\":\"Enterprise\",\"size\":\"czs\",\"family\":\"q\",\"capacity\":574281119}},{\"resourceType\":\"dbbo\",\"sku\":{\"name\":\"yvrmkjm\",\"tier\":\"Free\",\"size\":\"chwudlxee\",\"family\":\"tpmnoe\",\"capacity\":1026884990}},{\"resourceType\":\"fmsibzoyrfgxkyd\",\"sku\":{\"name\":\"yp\",\"tier\":\"Premium\",\"size\":\"mtywhla\",\"family\":\"p\",\"capacity\":1568923478}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testListSkusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AccountSkuListResult response - = manager.accounts().listSkusWithResponse("gvqoj", "xao", com.azure.core.util.Context.NONE).getValue(); + = manager.accounts().listSkusWithResponse("vgjbfio", "pn", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("zxmbt", response.value().get(0).resourceType()); - Assertions.assertEquals("efoi", response.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.value().get(0).sku().tier()); - Assertions.assertEquals("oxznvgvd", response.value().get(0).sku().size()); - Assertions.assertEquals("uuvdawsx", response.value().get(0).sku().family()); - Assertions.assertEquals(200373066, response.value().get(0).sku().capacity()); + Assertions.assertEquals("cbjqqwmtqsm", response.value().get(0).resourceType()); + Assertions.assertEquals("sazuxejgwecywnfy", response.value().get(0).sku().name()); + Assertions.assertEquals(SkuTier.ENTERPRISE, response.value().get(0).sku().tier()); + Assertions.assertEquals("czs", response.value().get(0).sku().size()); + Assertions.assertEquals("q", response.value().get(0).sku().family()); + Assertions.assertEquals(574281119, response.value().get(0).sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesWithResponseMockTests.java index 977bc13a0c96..719894548853 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class AccountsListUsagesWithResponseMockTests { @Test public void testListUsagesWithResponse() throws Exception { String responseStr - = "{\"nextLink\":\"dv\",\"value\":[{\"id\":\"xxjfwtgdfkkauig\",\"type\":\"u\",\"unit\":\"Bytes\",\"name\":{\"value\":\"fedyuep\",\"localizedValue\":\"pl\"},\"quotaPeriod\":\"dajjvywe\",\"limit\":62.741653382345945,\"currentValue\":70.02630540490246,\"nextResetTime\":\"jxokyelsyasvfnkw\",\"status\":\"Blocked\",\"scopeType\":\"Global\",\"scopeId\":\"krknf\"},{\"id\":\"ugjqyckgtxkrdt\",\"type\":\"crcjdklotcsubmz\",\"unit\":\"CountPerSecond\",\"name\":{\"value\":\"obc\",\"localizedValue\":\"xfpwhd\"},\"quotaPeriod\":\"lbkl\",\"limit\":69.69849179534083,\"currentValue\":81.61973737472454,\"nextResetTime\":\"ayqshwyqxridttbs\",\"status\":\"Unknown\",\"scopeType\":\"Classic\",\"scopeId\":\"xqwqueu\"},{\"id\":\"lztpziizevjykof\",\"type\":\"zefkhkqtwqlepjj\",\"unit\":\"CountPerSecond\",\"name\":{\"value\":\"fwzcntogffjwaj\",\"localizedValue\":\"tw\"},\"quotaPeriod\":\"aqkifmxawostfz\",\"limit\":56.95162547504806,\"currentValue\":3.4441823930215443,\"nextResetTime\":\"ncfv\",\"status\":\"InOverage\",\"scopeType\":\"Classic\",\"scopeId\":\"mvwfnqqwy\"},{\"id\":\"ndrw\",\"type\":\"od\",\"unit\":\"Seconds\",\"name\":{\"value\":\"sgwjfkainj\",\"localizedValue\":\"ymvecvztscbg\"},\"quotaPeriod\":\"saictds\",\"limit\":58.963965291137164,\"currentValue\":79.97125688380567,\"nextResetTime\":\"rddclzeqozrehlb\",\"status\":\"Blocked\",\"scopeType\":\"Global\",\"scopeId\":\"jrqvzyuexozon\"}]}"; + = "{\"nextLink\":\"atwfauj\",\"value\":[{\"unit\":\"Milliseconds\",\"name\":{\"value\":\"r\",\"localizedValue\":\"gddhjkrukizyhgs\"},\"quotaPeriod\":\"nqskt\",\"limit\":52.50280800542966,\"currentValue\":25.39356583900255,\"nextResetTime\":\"gweeiwd\",\"status\":\"Included\",\"scopeType\":\"DataZone\",\"scopeId\":\"bf\"},{\"unit\":\"Seconds\",\"name\":{\"value\":\"tunmlhxd\",\"localizedValue\":\"klciichgjsysm\"},\"quotaPeriod\":\"o\",\"limit\":99.37963130435838,\"currentValue\":53.5735232788603,\"nextResetTime\":\"ifc\",\"status\":\"Unknown\",\"scopeType\":\"Regional\",\"scopeId\":\"gcwx\"},{\"unit\":\"Count\",\"name\":{\"value\":\"wjtrdxriza\",\"localizedValue\":\"bgiark\"},\"quotaPeriod\":\"kpgdqxwabzrwiq\",\"limit\":12.102028897079531,\"currentValue\":55.41303683641783,\"nextResetTime\":\"osqkptjqgk\",\"status\":\"Blocked\",\"scopeType\":\"DataZone\",\"scopeId\":\"nwhedxkpbqwun\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,19 +34,19 @@ public void testListUsagesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UsageListResult response = manager.accounts() - .listUsagesWithResponse("ivuxcjkcoqwczs", "iqrizfwihvaan", "qtnhjrfd", com.azure.core.util.Context.NONE) + .listUsagesWithResponse("ewp", "jlfxampqcrzgeuq", "b", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dv", response.nextLink()); - Assertions.assertEquals(UnitType.BYTES, response.value().get(0).unit()); - Assertions.assertEquals("fedyuep", response.value().get(0).name().value()); - Assertions.assertEquals("pl", response.value().get(0).name().localizedValue()); - Assertions.assertEquals("dajjvywe", response.value().get(0).quotaPeriod()); - Assertions.assertEquals(62.741653382345945D, response.value().get(0).limit()); - Assertions.assertEquals(70.02630540490246D, response.value().get(0).currentValue()); - Assertions.assertEquals("jxokyelsyasvfnkw", response.value().get(0).nextResetTime()); - Assertions.assertEquals(QuotaUsageStatus.BLOCKED, response.value().get(0).status()); - Assertions.assertEquals(QuotaScopeType.GLOBAL, response.value().get(0).scopeType()); - Assertions.assertEquals("krknf", response.value().get(0).scopeId()); + Assertions.assertEquals("atwfauj", response.nextLink()); + Assertions.assertEquals(UnitType.MILLISECONDS, response.value().get(0).unit()); + Assertions.assertEquals("r", response.value().get(0).name().value()); + Assertions.assertEquals("gddhjkrukizyhgs", response.value().get(0).name().localizedValue()); + Assertions.assertEquals("nqskt", response.value().get(0).quotaPeriod()); + Assertions.assertEquals(52.50280800542966D, response.value().get(0).limit()); + Assertions.assertEquals(25.39356583900255D, response.value().get(0).currentValue()); + Assertions.assertEquals("gweeiwd", response.value().get(0).nextResetTime()); + Assertions.assertEquals(QuotaUsageStatus.INCLUDED, response.value().get(0).status()); + Assertions.assertEquals(QuotaScopeType.DATA_ZONE, response.value().get(0).scopeType()); + Assertions.assertEquals("bf", response.value().get(0).scopeId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentInnerTests.java deleted file mode 100644 index c96025425120..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.fluent.models.AdapterDeploymentInner; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentProperties; -import org.junit.jupiter.api.Assertions; - -public final class AdapterDeploymentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdapterDeploymentInner model = BinaryData.fromString( - "{\"properties\":{\"sourceModelId\":\"kbeba\",\"targetDeploymentName\":\"zlqbtxxwpfhn\",\"activeTargetDeploymentName\":\"udrtpzkgme\",\"provisioningState\":\"Failed\",\"lastOperation\":{\"type\":\"Create\",\"status\":\"Failed\",\"requestedTargetDeploymentName\":\"zq\",\"startedAt\":\"2021-06-09T16:10:21Z\",\"completedAt\":\"2021-01-05T10:10:26Z\"}},\"etag\":\"qbedygisrzwn\",\"id\":\"d\",\"name\":\"djchlr\",\"type\":\"pwctofl\"}") - .toObject(AdapterDeploymentInner.class); - Assertions.assertEquals("kbeba", model.properties().sourceModelId()); - Assertions.assertEquals("zlqbtxxwpfhn", model.properties().targetDeploymentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdapterDeploymentInner model = new AdapterDeploymentInner().withProperties( - new AdapterDeploymentProperties().withSourceModelId("kbeba").withTargetDeploymentName("zlqbtxxwpfhn")); - model = BinaryData.fromObject(model).toObject(AdapterDeploymentInner.class); - Assertions.assertEquals("kbeba", model.properties().sourceModelId()); - Assertions.assertEquals("zlqbtxxwpfhn", model.properties().targetDeploymentName()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentLastOperationTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentLastOperationTests.java deleted file mode 100644 index a08917d1938f..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentLastOperationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentLastOperation; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentOperationState; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentOperationType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class AdapterDeploymentLastOperationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdapterDeploymentLastOperation model = BinaryData.fromString( - "{\"type\":\"Update\",\"status\":\"Failed\",\"requestedTargetDeploymentName\":\"cnawth\",\"startedAt\":\"2021-04-06T22:43:53Z\",\"completedAt\":\"2021-07-10T21:24:04Z\"}") - .toObject(AdapterDeploymentLastOperation.class); - Assertions.assertEquals(AdapterDeploymentOperationType.UPDATE, model.type()); - Assertions.assertEquals(AdapterDeploymentOperationState.FAILED, model.status()); - Assertions.assertEquals("cnawth", model.requestedTargetDeploymentName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T22:43:53Z"), model.startedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T21:24:04Z"), model.completedAt()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentListResultTests.java deleted file mode 100644 index 3e3689fe772a..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.implementation.models.AdapterDeploymentListResult; -import org.junit.jupiter.api.Assertions; - -public final class AdapterDeploymentListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdapterDeploymentListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"sourceModelId\":\"u\",\"targetDeploymentName\":\"eamc\",\"activeTargetDeploymentName\":\"udf\",\"provisioningState\":\"Deleting\",\"lastOperation\":{\"type\":\"Create\",\"status\":\"Succeeded\",\"requestedTargetDeploymentName\":\"wcpqtwl\",\"startedAt\":\"2021-01-04T01:49:48Z\",\"completedAt\":\"2021-03-21T11:46:26Z\"}},\"etag\":\"ggvrbnyrukoilaci\",\"id\":\"wjleip\",\"name\":\"lh\",\"type\":\"yxpzruzythqk\"},{\"properties\":{\"sourceModelId\":\"hbgxvel\",\"targetDeploymentName\":\"vulnxdmn\",\"activeTargetDeploymentName\":\"mujd\",\"provisioningState\":\"ResolvingDNS\",\"lastOperation\":{\"type\":\"Update\",\"status\":\"Succeeded\",\"requestedTargetDeploymentName\":\"mffhmjpddnyxfzuv\",\"startedAt\":\"2021-02-20T19:46:15Z\",\"completedAt\":\"2021-10-05T13:43:26Z\"}},\"etag\":\"mzjqrbr\",\"id\":\"nmdyfoebo\",\"name\":\"tjpp\",\"type\":\"laohoqkp\"},{\"properties\":{\"sourceModelId\":\"nqjilaywk\",\"targetDeploymentName\":\"cwm\",\"activeTargetDeploymentName\":\"yrilmhxdqaolf\",\"provisioningState\":\"Accepted\",\"lastOperation\":{\"type\":\"Delete\",\"status\":\"Running\",\"requestedTargetDeploymentName\":\"pjvlywltmfwo\",\"startedAt\":\"2021-01-01T16:59:15Z\",\"completedAt\":\"2021-10-31T21:24:03Z\"}},\"etag\":\"lwyjfnqzocrdz\",\"id\":\"zeunt\",\"name\":\"xdncaqtt\",\"type\":\"ekoifuvnyttzgi\"}],\"nextLink\":\"yri\"}") - .toObject(AdapterDeploymentListResult.class); - Assertions.assertEquals("yri", model.nextLink()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentPropertiesTests.java deleted file mode 100644 index c2d72f8a099f..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentProperties; -import org.junit.jupiter.api.Assertions; - -public final class AdapterDeploymentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdapterDeploymentProperties model = BinaryData.fromString( - "{\"sourceModelId\":\"seac\",\"targetDeploymentName\":\"hztxkbrfgd\",\"activeTargetDeploymentName\":\"jiye\",\"provisioningState\":\"Succeeded\",\"lastOperation\":{\"type\":\"Create\",\"status\":\"Accepted\",\"requestedTargetDeploymentName\":\"qrxetfgcwvr\",\"startedAt\":\"2021-06-08T13:30:09Z\",\"completedAt\":\"2021-11-23T04:06:09Z\"}}") - .toObject(AdapterDeploymentProperties.class); - Assertions.assertEquals("seac", model.sourceModelId()); - Assertions.assertEquals("hztxkbrfgd", model.targetDeploymentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdapterDeploymentProperties model - = new AdapterDeploymentProperties().withSourceModelId("seac").withTargetDeploymentName("hztxkbrfgd"); - model = BinaryData.fromObject(model).toObject(AdapterDeploymentProperties.class); - Assertions.assertEquals("seac", model.sourceModelId()); - Assertions.assertEquals("hztxkbrfgd", model.targetDeploymentName()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsCreateOrUpdateMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsCreateOrUpdateMockTests.java deleted file mode 100644 index a51568e0809d..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeployment; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeploymentProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdapterDeploymentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"sourceModelId\":\"akgixhqjq\",\"targetDeploymentName\":\"gqwbbxiwtwfgo\",\"activeTargetDeploymentName\":\"alvemn\",\"provisioningState\":\"Succeeded\",\"lastOperation\":{\"type\":\"Delete\",\"status\":\"Accepted\",\"requestedTargetDeploymentName\":\"yydsyweoh\",\"startedAt\":\"2021-03-20T17:25:03Z\",\"completedAt\":\"2021-10-15T16:50:59Z\"}},\"etag\":\"vonvbftswcdop\",\"id\":\"eptvdticcaflgzwk\",\"name\":\"pxdkbtwoqhgppwxn\",\"type\":\"kfzrxxf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - AdapterDeployment response = manager.adapterDeployments() - .define("tgngwnxjftecg") - .withExistingAccount("fildcgbfouzfbp", "cryvidbzdylbvj") - .withProperties(new AdapterDeploymentProperties().withSourceModelId("zsqmpdqcakzbyqh") - .withTargetDeploymentName("athxoyxuu")) - .withIfMatch("tlyspjymwicc") - .withIfNoneMatch("rncfu") - .create(); - - Assertions.assertEquals("akgixhqjq", response.properties().sourceModelId()); - Assertions.assertEquals("gqwbbxiwtwfgo", response.properties().targetDeploymentName()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsGetWithResponseMockTests.java deleted file mode 100644 index 07647df8639b..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeployment; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdapterDeploymentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"sourceModelId\":\"tfelfchnuf\",\"targetDeploymentName\":\"sjgbfbbach\",\"activeTargetDeploymentName\":\"czzunfnbphceeiv\",\"provisioningState\":\"ExtensionUnreachable\",\"lastOperation\":{\"type\":\"Delete\",\"status\":\"Accepted\",\"requestedTargetDeploymentName\":\"ghcnuqhqpvt\",\"startedAt\":\"2021-11-01T16:06:16Z\",\"completedAt\":\"2021-01-31T05:25:51Z\"}},\"etag\":\"clggagygntbfytn\",\"id\":\"nihuzzju\",\"name\":\"vwgbzdtorbiwn\",\"type\":\"fzdpxctsucrxd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - AdapterDeployment response = manager.adapterDeployments() - .getWithResponse("asfzhzzcarc", "uoxyipdthjf", "nhwsgns", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tfelfchnuf", response.properties().sourceModelId()); - Assertions.assertEquals("sjgbfbbach", response.properties().targetDeploymentName()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsListMockTests.java deleted file mode 100644 index 02ffd10b1ef6..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AdapterDeploymentsListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import com.azure.resourcemanager.cognitiveservices.models.AdapterDeployment; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdapterDeploymentsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"sourceModelId\":\"tyl\",\"targetDeploymentName\":\"uudvbgvzlzjsb\",\"activeTargetDeploymentName\":\"cutzaz\",\"provisioningState\":\"Succeeded\",\"lastOperation\":{\"type\":\"Delete\",\"status\":\"Failed\",\"requestedTargetDeploymentName\":\"seaimbdq\",\"startedAt\":\"2020-12-28T18:21:25Z\",\"completedAt\":\"2021-03-07T03:41:08Z\"}},\"etag\":\"arluobbvalq\",\"id\":\"knyujxysvclfjy\",\"name\":\"lvildlfflleir\",\"type\":\"txfq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.adapterDeployments().list("ejobjzrlwtidcnz", "lgmpupj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tyl", response.iterator().next().properties().sourceModelId()); - Assertions.assertEquals("uudvbgvzlzjsb", response.iterator().next().properties().targetDeploymentName()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDisableWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDisableWithResponseMockTests.java index 87abd553d8c6..77cb66ba7ddf 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDisableWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsDisableWithResponseMockTests.java @@ -28,8 +28,7 @@ public void testDisableWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.agentApplications() - .disableWithResponse("gazhlrdxpc", "autfzptrcdzy", "rtffvpkdxcy", "wenbqvpr", - com.azure.core.util.Context.NONE); + .disableWithResponse("iunnep", "wz", "zkueruwcjomipvw", "a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsEnableWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsEnableWithResponseMockTests.java index 32e068d921d8..55f66b5c5d01 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsEnableWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsEnableWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testEnableWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.agentApplications() - .enableWithResponse("ryhmmglv", "b", "nkpsvokkyankxvc", "tfgfbhnkxasomaf", + .enableWithResponse("akeszsuuvul", "qcwggchxvl", "gfbrv", "cicaovphirlzbi", com.azure.core.util.Context.NONE); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListAgentsWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListAgentsWithResponseMockTests.java index 0af2a370c4c3..73bc94b5b0e2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListAgentsWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentApplicationsListAgentsWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class AgentApplicationsListAgentsWithResponseMockTests { @Test public void testListAgentsWithResponse() throws Exception { String responseStr - = "{\"nextLink\":\"bunso\",\"value\":[{\"properties\":{\"agentId\":\"zshqykebmpshaezc\",\"agentName\":\"kckrnovqdmh\"},\"id\":\"jstfs\",\"name\":\"a\",\"type\":\"jakgk\"},{\"properties\":{\"agentId\":\"xqdsoqz\",\"agentName\":\"wdjox\"},\"id\":\"bdhsobv\",\"name\":\"nsbioe\",\"type\":\"nlfhnfzxtfzqyu\"},{\"properties\":{\"agentId\":\"k\",\"agentName\":\"cwdyt\"},\"id\":\"rlcmwbejyw\",\"name\":\"wvnhwwkrmqev\",\"type\":\"hha\"},{\"properties\":{\"agentId\":\"fudfyziru\",\"agentName\":\"gnjxiakgyjm\"},\"id\":\"mxg\",\"name\":\"kyluyug\",\"type\":\"brdcvoloxtvqcb\"}]}"; + = "{\"nextLink\":\"rcmelycpgokut\",\"value\":[{\"properties\":{\"agentId\":\"bn\",\"agentName\":\"nv\"},\"id\":\"hfuzzlapyixlvz\",\"name\":\"gulaebxiauqs\",\"type\":\"ptessjlw\"},{\"properties\":{\"agentId\":\"atpvbl\",\"agentName\":\"xgxqayga\"},\"id\":\"kvc\",\"name\":\"wpvlcjbvyezjwjkq\",\"type\":\"nbwhiieyoz\"},{\"properties\":{\"agentId\":\"cwf\",\"agentName\":\"cwnbcgqefgzjvbx\"},\"id\":\"bg\",\"name\":\"arxt\",\"type\":\"uc\"},{\"properties\":{\"agentId\":\"gvkdlhuduk\",\"agentName\":\"joafm\"},\"id\":\"exulvoepknarseia\",\"name\":\"csqoacbuqdgs\",\"type\":\"pleqfgkxenvszglv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,12 @@ public void testListAgentsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AgentReferenceResourceArmPaginatedResult response = manager.agentApplications() - .listAgentsWithResponse("nx", "mfv", "wunrtcsra", "whyxfshmbydmv", com.azure.core.util.Context.NONE) + .listAgentsWithResponse("aphifkfrpm", "lubpebrmjjnfpght", "ttpkims", "hnkkhbykrs", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bunso", response.nextLink()); - Assertions.assertEquals("zshqykebmpshaezc", response.value().get(0).properties().agentId()); - Assertions.assertEquals("kckrnovqdmh", response.value().get(0).properties().agentName()); + Assertions.assertEquals("rcmelycpgokut", response.nextLink()); + Assertions.assertEquals("bn", response.value().get(0).properties().agentId()); + Assertions.assertEquals("nv", response.value().get(0).properties().agentName()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentInnerTests.java index 4a0bebac7115..34510a6b6d94 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentInnerTests.java @@ -20,46 +20,47 @@ public final class AgentDeploymentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AgentDeploymentInner model = BinaryData.fromString( - "{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"wi\",\"deploymentId\":\"towlhlsycoyb\",\"state\":\"Starting\",\"protocols\":[{\"protocol\":\"Responses\",\"version\":\"ajcywhjqw\"},{\"protocol\":\"A2A\",\"version\":\"oh\"},{\"protocol\":\"Agent\",\"version\":\"pupukiymjzp\"}],\"agents\":[{\"agentVersion\":\"wtiw\",\"agentId\":\"osaonhqnamppu\",\"agentName\":\"assae\"}],\"provisioningState\":\"Canceled\",\"description\":\"a\",\"tags\":{\"aj\":\"jb\"}},\"id\":\"yizyddcvxodk\",\"name\":\"vfsxx\",\"type\":\"ydesqlvgec\"}") + "{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"nygnxcgjtfrnquk\",\"deploymentId\":\"fnslnlrxsmy\",\"state\":\"Stopping\",\"protocols\":[{\"protocol\":\"Responses\",\"version\":\"tbgwjdxwnazkur\"}],\"agents\":[{\"agentVersion\":\"yzjwhsetwwjwzzq\",\"agentId\":\"uzu\",\"agentName\":\"y\"},{\"agentVersion\":\"yqhyqqzzdcykey\",\"agentId\":\"ewfopazdazg\",\"agentName\":\"qgpewqcfutmdpvoz\"}],\"provisioningState\":\"Failed\",\"description\":\"bknlzcl\",\"tags\":{\"zqauxzan\":\"eyowmndcovd\",\"fruwkud\":\"mk\",\"ucmci\":\"bcpftxudqyemebun\",\"ohaitranizerwgud\":\"tneemmjauwcgxef\"}},\"id\":\"mxubvfbngfcoce\",\"name\":\"hpriylfm\",\"type\":\"ztraud\"}") .toObject(AgentDeploymentInner.class); - Assertions.assertEquals("a", model.properties().description()); - Assertions.assertEquals("jb", model.properties().tags().get("aj")); - Assertions.assertEquals("wi", model.properties().displayName()); - Assertions.assertEquals("towlhlsycoyb", model.properties().deploymentId()); - Assertions.assertEquals(AgentDeploymentState.STARTING, model.properties().state()); + Assertions.assertEquals("bknlzcl", model.properties().description()); + Assertions.assertEquals("eyowmndcovd", model.properties().tags().get("zqauxzan")); + Assertions.assertEquals("nygnxcgjtfrnquk", model.properties().displayName()); + Assertions.assertEquals("fnslnlrxsmy", model.properties().deploymentId()); + Assertions.assertEquals(AgentDeploymentState.STOPPING, model.properties().state()); Assertions.assertEquals(AgentProtocol.RESPONSES, model.properties().protocols().get(0).protocol()); - Assertions.assertEquals("ajcywhjqw", model.properties().protocols().get(0).version()); - Assertions.assertEquals("osaonhqnamppu", model.properties().agents().get(0).agentId()); - Assertions.assertEquals("assae", model.properties().agents().get(0).agentName()); - Assertions.assertEquals("wtiw", model.properties().agents().get(0).agentVersion()); + Assertions.assertEquals("tbgwjdxwnazkur", model.properties().protocols().get(0).version()); + Assertions.assertEquals("uzu", model.properties().agents().get(0).agentId()); + Assertions.assertEquals("y", model.properties().agents().get(0).agentName()); + Assertions.assertEquals("yzjwhsetwwjwzzq", model.properties().agents().get(0).agentVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AgentDeploymentInner model - = new AgentDeploymentInner().withProperties(new AgentDeploymentProperties().withDescription("a") - .withTags(mapOf("aj", "jb")) - .withDisplayName("wi") - .withDeploymentId("towlhlsycoyb") - .withState(AgentDeploymentState.STARTING) - .withProtocols(Arrays.asList( - new AgentProtocolVersion().withProtocol(AgentProtocol.RESPONSES).withVersion("ajcywhjqw"), - new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("oh"), - new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("pupukiymjzp"))) - .withAgents(Arrays.asList(new VersionedAgentReference().withAgentId("osaonhqnamppu") - .withAgentName("assae") - .withAgentVersion("wtiw")))); + AgentDeploymentInner model = new AgentDeploymentInner().withProperties(new AgentDeploymentProperties() + .withDescription("bknlzcl") + .withTags(mapOf("zqauxzan", "eyowmndcovd", "fruwkud", "mk", "ucmci", "bcpftxudqyemebun", "ohaitranizerwgud", + "tneemmjauwcgxef")) + .withDisplayName("nygnxcgjtfrnquk") + .withDeploymentId("fnslnlrxsmy") + .withState(AgentDeploymentState.STOPPING) + .withProtocols(Arrays + .asList(new AgentProtocolVersion().withProtocol(AgentProtocol.RESPONSES).withVersion("tbgwjdxwnazkur"))) + .withAgents(Arrays.asList( + new VersionedAgentReference().withAgentId("uzu").withAgentName("y").withAgentVersion("yzjwhsetwwjwzzq"), + new VersionedAgentReference().withAgentId("ewfopazdazg") + .withAgentName("qgpewqcfutmdpvoz") + .withAgentVersion("yqhyqqzzdcykey")))); model = BinaryData.fromObject(model).toObject(AgentDeploymentInner.class); - Assertions.assertEquals("a", model.properties().description()); - Assertions.assertEquals("jb", model.properties().tags().get("aj")); - Assertions.assertEquals("wi", model.properties().displayName()); - Assertions.assertEquals("towlhlsycoyb", model.properties().deploymentId()); - Assertions.assertEquals(AgentDeploymentState.STARTING, model.properties().state()); + Assertions.assertEquals("bknlzcl", model.properties().description()); + Assertions.assertEquals("eyowmndcovd", model.properties().tags().get("zqauxzan")); + Assertions.assertEquals("nygnxcgjtfrnquk", model.properties().displayName()); + Assertions.assertEquals("fnslnlrxsmy", model.properties().deploymentId()); + Assertions.assertEquals(AgentDeploymentState.STOPPING, model.properties().state()); Assertions.assertEquals(AgentProtocol.RESPONSES, model.properties().protocols().get(0).protocol()); - Assertions.assertEquals("ajcywhjqw", model.properties().protocols().get(0).version()); - Assertions.assertEquals("osaonhqnamppu", model.properties().agents().get(0).agentId()); - Assertions.assertEquals("assae", model.properties().agents().get(0).agentName()); - Assertions.assertEquals("wtiw", model.properties().agents().get(0).agentVersion()); + Assertions.assertEquals("tbgwjdxwnazkur", model.properties().protocols().get(0).version()); + Assertions.assertEquals("uzu", model.properties().agents().get(0).agentId()); + Assertions.assertEquals("y", model.properties().agents().get(0).agentName()); + Assertions.assertEquals("yzjwhsetwwjwzzq", model.properties().agents().get(0).agentVersion()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentPropertiesTests.java index 4c52df4b939b..5400f0ada3b9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentPropertiesTests.java @@ -19,45 +19,50 @@ public final class AgentDeploymentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AgentDeploymentProperties model = BinaryData.fromString( - "{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"goljtzxnmxs\",\"deploymentId\":\"bygoo\",\"state\":\"Starting\",\"protocols\":[{\"protocol\":\"A2A\",\"version\":\"azyj\"},{\"protocol\":\"Responses\",\"version\":\"ao\"},{\"protocol\":\"Agent\",\"version\":\"sdk\"}],\"agents\":[{\"agentVersion\":\"asgmatrnzpd\",\"agentId\":\"daaktuj\",\"agentName\":\"zboimyfpqdo\"}],\"provisioningState\":\"Updating\",\"description\":\"nwyytfv\",\"tags\":{\"vuldbkkejjk\":\"fjikffffgkuhznw\",\"azmxjqi\":\"igaw\",\"jjsbcmlzaahzbhur\":\"h\",\"lirh\":\"olk\"}}") + "{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"hlcdc\",\"deploymentId\":\"regp\",\"state\":\"Running\",\"protocols\":[{\"protocol\":\"A2A\",\"version\":\"ztnvgy\"},{\"protocol\":\"Agent\",\"version\":\"dgrtwmew\"},{\"protocol\":\"Agent\",\"version\":\"ykcfazz\"},{\"protocol\":\"Agent\",\"version\":\"yerzrransybyl\"}],\"agents\":[{\"agentVersion\":\"zrghsrleink\",\"agentId\":\"cjfncjwvuagfq\",\"agentName\":\"ltngvmreupt\"},{\"agentVersion\":\"lzmijajwolxfsv\",\"agentId\":\"h\",\"agentName\":\"ynwlslrcigtzjcv\"}],\"provisioningState\":\"Creating\",\"description\":\"a\",\"tags\":{\"xpavid\":\"ssov\",\"fcvvy\":\"ievw\",\"xgcbdsvalpnpt\":\"zslp\"}}") .toObject(AgentDeploymentProperties.class); - Assertions.assertEquals("nwyytfv", model.description()); - Assertions.assertEquals("fjikffffgkuhznw", model.tags().get("vuldbkkejjk")); - Assertions.assertEquals("goljtzxnmxs", model.displayName()); - Assertions.assertEquals("bygoo", model.deploymentId()); - Assertions.assertEquals(AgentDeploymentState.STARTING, model.state()); + Assertions.assertEquals("a", model.description()); + Assertions.assertEquals("ssov", model.tags().get("xpavid")); + Assertions.assertEquals("hlcdc", model.displayName()); + Assertions.assertEquals("regp", model.deploymentId()); + Assertions.assertEquals(AgentDeploymentState.RUNNING, model.state()); Assertions.assertEquals(AgentProtocol.A2A, model.protocols().get(0).protocol()); - Assertions.assertEquals("azyj", model.protocols().get(0).version()); - Assertions.assertEquals("daaktuj", model.agents().get(0).agentId()); - Assertions.assertEquals("zboimyfpqdo", model.agents().get(0).agentName()); - Assertions.assertEquals("asgmatrnzpd", model.agents().get(0).agentVersion()); + Assertions.assertEquals("ztnvgy", model.protocols().get(0).version()); + Assertions.assertEquals("cjfncjwvuagfq", model.agents().get(0).agentId()); + Assertions.assertEquals("ltngvmreupt", model.agents().get(0).agentName()); + Assertions.assertEquals("zrghsrleink", model.agents().get(0).agentVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AgentDeploymentProperties model = new AgentDeploymentProperties().withDescription("nwyytfv") - .withTags( - mapOf("vuldbkkejjk", "fjikffffgkuhznw", "azmxjqi", "igaw", "jjsbcmlzaahzbhur", "h", "lirh", "olk")) - .withDisplayName("goljtzxnmxs") - .withDeploymentId("bygoo") - .withState(AgentDeploymentState.STARTING) - .withProtocols(Arrays.asList(new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("azyj"), - new AgentProtocolVersion().withProtocol(AgentProtocol.RESPONSES).withVersion("ao"), - new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("sdk"))) - .withAgents(Arrays.asList(new VersionedAgentReference().withAgentId("daaktuj") - .withAgentName("zboimyfpqdo") - .withAgentVersion("asgmatrnzpd"))); + AgentDeploymentProperties model = new AgentDeploymentProperties().withDescription("a") + .withTags(mapOf("xpavid", "ssov", "fcvvy", "ievw", "xgcbdsvalpnpt", "zslp")) + .withDisplayName("hlcdc") + .withDeploymentId("regp") + .withState(AgentDeploymentState.RUNNING) + .withProtocols( + Arrays.asList(new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("ztnvgy"), + new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("dgrtwmew"), + new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("ykcfazz"), + new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("yerzrransybyl"))) + .withAgents(Arrays.asList( + new VersionedAgentReference().withAgentId("cjfncjwvuagfq") + .withAgentName("ltngvmreupt") + .withAgentVersion("zrghsrleink"), + new VersionedAgentReference().withAgentId("h") + .withAgentName("ynwlslrcigtzjcv") + .withAgentVersion("lzmijajwolxfsv"))); model = BinaryData.fromObject(model).toObject(AgentDeploymentProperties.class); - Assertions.assertEquals("nwyytfv", model.description()); - Assertions.assertEquals("fjikffffgkuhznw", model.tags().get("vuldbkkejjk")); - Assertions.assertEquals("goljtzxnmxs", model.displayName()); - Assertions.assertEquals("bygoo", model.deploymentId()); - Assertions.assertEquals(AgentDeploymentState.STARTING, model.state()); + Assertions.assertEquals("a", model.description()); + Assertions.assertEquals("ssov", model.tags().get("xpavid")); + Assertions.assertEquals("hlcdc", model.displayName()); + Assertions.assertEquals("regp", model.deploymentId()); + Assertions.assertEquals(AgentDeploymentState.RUNNING, model.state()); Assertions.assertEquals(AgentProtocol.A2A, model.protocols().get(0).protocol()); - Assertions.assertEquals("azyj", model.protocols().get(0).version()); - Assertions.assertEquals("daaktuj", model.agents().get(0).agentId()); - Assertions.assertEquals("zboimyfpqdo", model.agents().get(0).agentName()); - Assertions.assertEquals("asgmatrnzpd", model.agents().get(0).agentVersion()); + Assertions.assertEquals("ztnvgy", model.protocols().get(0).version()); + Assertions.assertEquals("cjfncjwvuagfq", model.agents().get(0).agentId()); + Assertions.assertEquals("ltngvmreupt", model.agents().get(0).agentName()); + Assertions.assertEquals("zrghsrleink", model.agents().get(0).agentVersion()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentResourceArmPaginatedResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentResourceArmPaginatedResultTests.java index fc0b8ec35e67..542cab91742c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentResourceArmPaginatedResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentResourceArmPaginatedResultTests.java @@ -14,18 +14,18 @@ public final class AgentDeploymentResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AgentDeploymentResourceArmPaginatedResult model = BinaryData.fromString( - "{\"nextLink\":\"hpadkmdzg\",\"value\":[{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"vctkbbx\",\"deploymentId\":\"arlsirn\",\"state\":\"Deleted\",\"protocols\":[{\"protocol\":\"A2A\",\"version\":\"ngsux\"},{\"protocol\":\"Agent\",\"version\":\"myqjog\"}],\"agents\":[{\"agentVersion\":\"idjanormovdxxur\",\"agentId\":\"ujmoi\",\"agentName\":\"nwemhdeeljslkyo\"},{\"agentVersion\":\"sfzjuegrhrhtsle\",\"agentId\":\"vxjnxv\",\"agentName\":\"bfiobpnjodfc\"}],\"provisioningState\":\"Creating\",\"description\":\"wmtqsmoxsaz\",\"tags\":{\"inqbdnddbbozs\":\"jgwecywnfyszzacz\",\"lxeeiht\":\"vrmkjmyitrchwu\"}},\"id\":\"noejhqlfmsibz\",\"name\":\"yrfgxkyd\",\"type\":\"mypgfqvmty\"},{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"lakxpejpewp\",\"deploymentId\":\"lfxampqc\",\"state\":\"Starting\",\"protocols\":[{\"protocol\":\"A2A\",\"version\":\"piatwfaujegqd\"},{\"protocol\":\"Responses\",\"version\":\"akgddhjkrukizy\"},{\"protocol\":\"Agent\",\"version\":\"tnqsktx\"},{\"protocol\":\"Responses\",\"version\":\"bqggw\"}],\"agents\":[{\"agentVersion\":\"dhd\",\"agentId\":\"cgbfzuscstun\",\"agentName\":\"hxdfbkl\"},{\"agentVersion\":\"ich\",\"agentId\":\"sysmvxodgw\",\"agentName\":\"kzsifcuvb\"},{\"agentVersion\":\"jgc\",\"agentId\":\"vecb\",\"agentName\":\"jtrdxr\"},{\"agentVersion\":\"agbbgia\",\"agentId\":\"sy\",\"agentName\":\"gdqxwabzrw\"}],\"provisioningState\":\"Updating\",\"description\":\"ha\",\"tags\":{\"ifmmainwh\":\"dosqkptjqg\",\"kp\":\"d\",\"izazz\":\"qwuntob\"}},\"id\":\"wgvydjufb\",\"name\":\"klblaxp\",\"type\":\"gjwdab\"},{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"fdxaglzfytlbtlq\",\"deploymentId\":\"pxouvmr\",\"state\":\"Updating\",\"protocols\":[{\"protocol\":\"A2A\",\"version\":\"pzkgxfxfmyrqsd\"},{\"protocol\":\"Responses\",\"version\":\"szanmhwgpte\"}],\"agents\":[{\"agentVersion\":\"wki\",\"agentId\":\"skw\",\"agentName\":\"sdetjygowifcqpol\"},{\"agentVersion\":\"gysdgzyyb\",\"agentId\":\"xlvocptvdx\",\"agentName\":\"eigmlil\"},{\"agentVersion\":\"ghjhjvmabzzbwa\",\"agentId\":\"fmdafbgymqtnap\",\"agentName\":\"ojxrjnbsconxavi\"},{\"agentVersion\":\"eychbji\",\"agentId\":\"fsgnw\",\"agentName\":\"zed\"}],\"provisioningState\":\"Canceled\",\"description\":\"fb\",\"tags\":{\"bypicdbkpdj\":\"ipmlnfyzavf\"}},\"id\":\"qh\",\"name\":\"mqazpdgonjh\",\"type\":\"shthmgpczqu\"},{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"t\",\"deploymentId\":\"vcpxtzhigqqbtimp\",\"state\":\"Stopped\",\"protocols\":[{\"protocol\":\"Agent\",\"version\":\"ihqhudsmusua\"}],\"agents\":[{\"agentVersion\":\"kxwj\",\"agentId\":\"czmnniixy\",\"agentName\":\"qban\"}],\"provisioningState\":\"Updating\",\"description\":\"gir\",\"tags\":{\"dorgmynltw\":\"mgm\",\"tmfoeajogsyxwet\":\"p\"}},\"id\":\"fddrvlkpzwbhnrec\",\"name\":\"hdidrmuhkahmjedb\",\"type\":\"ucvkhhwmjpjbw\"}]}") + "{\"nextLink\":\"chp\",\"value\":[{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"ehzl\",\"deploymentId\":\"gfquwz\",\"state\":\"Failed\",\"protocols\":[{\"protocol\":\"Agent\",\"version\":\"cerwkwbpjxljtxbu\"},{\"protocol\":\"Agent\",\"version\":\"xxniuisdzhgbd\"}],\"agents\":[{\"agentVersion\":\"gsecnadbuwqrgx\",\"agentId\":\"lmqiynezoel\",\"agentName\":\"kki\"},{\"agentVersion\":\"vmtumxpym\",\"agentId\":\"fua\",\"agentName\":\"oqvqpilr\"},{\"agentVersion\":\"ncanlduwzor\",\"agentId\":\"bm\",\"agentName\":\"qk\"}],\"provisioningState\":\"Creating\",\"description\":\"x\",\"tags\":{\"xcltuubwyvp\":\"fqep\",\"exkydfb\":\"bowcpjqduqgi\"}},\"id\":\"javh\",\"name\":\"erkjddv\",\"type\":\"gliegftcvbiif\"},{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"sdwgdnkefgmwd\",\"deploymentId\":\"eb\",\"state\":\"Updating\",\"protocols\":[{\"protocol\":\"Responses\",\"version\":\"lzoutbaaqgzekaj\"},{\"protocol\":\"Agent\",\"version\":\"gsnorbjgmnzjotv\"},{\"protocol\":\"A2A\",\"version\":\"hlobvvjbhv\"}],\"agents\":[{\"agentVersion\":\"ayfluiyuosnu\",\"agentId\":\"t\",\"agentName\":\"vhyibdrqrsw\"},{\"agentVersion\":\"uubpyrow\",\"agentId\":\"oxztfwfqch\",\"agentName\":\"zevjnnctag\"}],\"provisioningState\":\"Updating\",\"description\":\"tpqpemhzcgkrep\",\"tags\":{\"xqabckmzeoxi\":\"qyhwqwem\",\"pceeznzangprbf\":\"hgreohtwhlpuz\"}},\"id\":\"yxzlbciphmse\",\"name\":\"roqr\",\"type\":\"dktxfv\"},{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"feeqgpkrietbgnix\",\"deploymentId\":\"wwzkyf\",\"state\":\"Deleted\",\"protocols\":[{\"protocol\":\"Agent\",\"version\":\"ii\"},{\"protocol\":\"Responses\",\"version\":\"e\"},{\"protocol\":\"Agent\",\"version\":\"maxxijvskwsdgkjg\"}],\"agents\":[{\"agentVersion\":\"rasek\",\"agentId\":\"fcvoinwoqar\",\"agentName\":\"yxqicladv\"},{\"agentVersion\":\"davuqmcbyms\",\"agentId\":\"bjlquv\",\"agentName\":\"zcjumvpsimioyoig\"}],\"provisioningState\":\"Canceled\",\"description\":\"q\",\"tags\":{\"ydgnha\":\"raclibbfqpspkla\",\"gpmnmabe\":\"twukex\"}},\"id\":\"qilwgdfpfqfpcvs\",\"name\":\"clg\",\"type\":\"rvwerfwxbsmtb\"},{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"jehhci\",\"deploymentId\":\"wdv\",\"state\":\"Deleting\",\"protocols\":[{\"protocol\":\"Agent\",\"version\":\"sqhtfpw\"},{\"protocol\":\"Agent\",\"version\":\"ejuwyqwdqigmghgi\"}],\"agents\":[{\"agentVersion\":\"lujkhn\",\"agentId\":\"mrnkfmkhcqtwml\",\"agentName\":\"jnqtqe\"},{\"agentVersion\":\"j\",\"agentId\":\"vragpokddx\",\"agentName\":\"hhkvguavtptbk\"},{\"agentVersion\":\"kqynspgbvo\",\"agentId\":\"bkkwvdxae\",\"agentName\":\"okmyr\"}],\"provisioningState\":\"Failed\",\"description\":\"lzbnobrqlpbcjt\",\"tags\":{\"aeonqelwgdh\":\"uyudivbxnhsq\",\"atmoljiywmpinmzv\":\"ruzytzaro\",\"lugdybnhrxlelf\":\"kneerzztrknsj\"}},\"id\":\"k\",\"name\":\"izcpihtdmiw\",\"type\":\"ekpt\"}]}") .toObject(AgentDeploymentResourceArmPaginatedResult.class); - Assertions.assertEquals("hpadkmdzg", model.nextLink()); - Assertions.assertEquals("wmtqsmoxsaz", model.value().get(0).properties().description()); - Assertions.assertEquals("jgwecywnfyszzacz", model.value().get(0).properties().tags().get("inqbdnddbbozs")); - Assertions.assertEquals("vctkbbx", model.value().get(0).properties().displayName()); - Assertions.assertEquals("arlsirn", model.value().get(0).properties().deploymentId()); - Assertions.assertEquals(AgentDeploymentState.DELETED, model.value().get(0).properties().state()); - Assertions.assertEquals(AgentProtocol.A2A, model.value().get(0).properties().protocols().get(0).protocol()); - Assertions.assertEquals("ngsux", model.value().get(0).properties().protocols().get(0).version()); - Assertions.assertEquals("ujmoi", model.value().get(0).properties().agents().get(0).agentId()); - Assertions.assertEquals("nwemhdeeljslkyo", model.value().get(0).properties().agents().get(0).agentName()); - Assertions.assertEquals("idjanormovdxxur", model.value().get(0).properties().agents().get(0).agentVersion()); + Assertions.assertEquals("chp", model.nextLink()); + Assertions.assertEquals("x", model.value().get(0).properties().description()); + Assertions.assertEquals("fqep", model.value().get(0).properties().tags().get("xcltuubwyvp")); + Assertions.assertEquals("ehzl", model.value().get(0).properties().displayName()); + Assertions.assertEquals("gfquwz", model.value().get(0).properties().deploymentId()); + Assertions.assertEquals(AgentDeploymentState.FAILED, model.value().get(0).properties().state()); + Assertions.assertEquals(AgentProtocol.AGENT, model.value().get(0).properties().protocols().get(0).protocol()); + Assertions.assertEquals("cerwkwbpjxljtxbu", model.value().get(0).properties().protocols().get(0).version()); + Assertions.assertEquals("lmqiynezoel", model.value().get(0).properties().agents().get(0).agentId()); + Assertions.assertEquals("kki", model.value().get(0).properties().agents().get(0).agentName()); + Assertions.assertEquals("gsecnadbuwqrgx", model.value().get(0).properties().agents().get(0).agentVersion()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsCreateOrUpdateMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsCreateOrUpdateMockTests.java index 804ebb0cec7a..a299eda4b930 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsCreateOrUpdateMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsCreateOrUpdateMockTests.java @@ -29,7 +29,7 @@ public final class AgentDeploymentsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"cfcncrv\",\"deploymentId\":\"u\",\"state\":\"Failed\",\"protocols\":[{\"protocol\":\"Agent\",\"version\":\"eowoszzw\"}],\"agents\":[{\"agentVersion\":\"gfxvchmuby\",\"agentId\":\"qhgnmsvjfgrpr\",\"agentName\":\"ircbajxjrbvyr\"},{\"agentVersion\":\"uatxkznlwlmbxo\",\"agentId\":\"evdayvx\",\"agentName\":\"xiy\"},{\"agentVersion\":\"grgkjalrjwaezply\",\"agentId\":\"psbomt\",\"agentName\":\"p\"}],\"provisioningState\":\"Succeeded\",\"description\":\"c\",\"tags\":{\"pasckpgb\":\"iwe\",\"mxtoejtqvq\":\"lyxbwslxg\",\"zxoluzntbpca\":\"tmlidk\"}},\"id\":\"pxq\",\"name\":\"xipe\",\"type\":\"rplf\"}"; + = "{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"rqvelrmdcizhvksb\",\"deploymentId\":\"klwjpz\",\"state\":\"Running\",\"protocols\":[{\"protocol\":\"A2A\",\"version\":\"pyeyzolbfnflytf\"},{\"protocol\":\"Responses\",\"version\":\"iqoomiswkqw\"},{\"protocol\":\"A2A\",\"version\":\"nliyznghuq\"}],\"agents\":[{\"agentVersion\":\"glkfvdwrgav\",\"agentId\":\"yzse\",\"agentName\":\"m\"},{\"agentVersion\":\"kryxpi\",\"agentId\":\"apeakfdmcedl\",\"agentName\":\"lxkyoddoq\"}],\"provisioningState\":\"Succeeded\",\"description\":\"trkicwhqyr\",\"tags\":{\"urhvifqeqfs\":\"ndkrww\",\"ebylpzjelda\":\"nackitlw\",\"cbrdsypotn\":\"wjunilnijh\",\"jgsbtwgnld\":\"kbvzpkodngvnq\"}},\"id\":\"czlh\",\"name\":\"b\",\"type\":\"ycznrirpii\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,30 +39,39 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AgentDeployment response = manager.agentDeployments() - .define("ajydjbjgip") - .withExistingApplication("wimtcceeeuquu", "czzc", "jwx", "bkirgknhfwlajw") - .withProperties(new AgentDeploymentProperties().withDescription("in") - .withTags(mapOf("tiivz", "dxw")) - .withDisplayName("pewyzhydtkbmtrs") - .withDeploymentId("lviaigarma") - .withState(AgentDeploymentState.UPDATING) - .withProtocols(Arrays - .asList(new AgentProtocolVersion().withProtocol(AgentProtocol.RESPONSES).withVersion("iccwbqy"))) - .withAgents(Arrays.asList(new VersionedAgentReference().withAgentId("iswe") - .withAgentName("vsxaup") - .withAgentVersion("bjgiynqr")))) + .define("yiog") + .withExistingApplication("volxtqmricdsflzb", "i", "mjfgoxedrmra", "hvchvv") + .withProperties(new AgentDeploymentProperties().withDescription("edeuenthshnf") + .withTags(mapOf("h", "pgpkkhpjnglaqlm", "ecpvfpnrzikvo", "mtrdlpxiww", "ivxdifbwblijhp", "loeohy", "xr", + "ukxgoyxontbwdq")) + .withDisplayName("tnwzruzs") + .withDeploymentId("wxcsmx") + .withState(AgentDeploymentState.STOPPING) + .withProtocols(Arrays.asList( + new AgentProtocolVersion().withProtocol(AgentProtocol.RESPONSES).withVersion("cebspc"), + new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("mhkdwuwedupbkm"), + new AgentProtocolVersion().withProtocol(AgentProtocol.RESPONSES).withVersion("jjsqwhaefefv"), + new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("bnmcvaqycd"))) + .withAgents(Arrays.asList( + new VersionedAgentReference().withAgentId("pfdfu").withAgentName("tw").withAgentVersion("uesdyvfx"), + new VersionedAgentReference().withAgentId("vytabvbbk") + .withAgentName("ewgs") + .withAgentVersion("pse"), + new VersionedAgentReference().withAgentId("bmenxcqs") + .withAgentName("clykcrudekkbnjre") + .withAgentVersion("utbuvedwu")))) .create(); - Assertions.assertEquals("c", response.properties().description()); - Assertions.assertEquals("iwe", response.properties().tags().get("pasckpgb")); - Assertions.assertEquals("cfcncrv", response.properties().displayName()); - Assertions.assertEquals("u", response.properties().deploymentId()); - Assertions.assertEquals(AgentDeploymentState.FAILED, response.properties().state()); - Assertions.assertEquals(AgentProtocol.AGENT, response.properties().protocols().get(0).protocol()); - Assertions.assertEquals("eowoszzw", response.properties().protocols().get(0).version()); - Assertions.assertEquals("qhgnmsvjfgrpr", response.properties().agents().get(0).agentId()); - Assertions.assertEquals("ircbajxjrbvyr", response.properties().agents().get(0).agentName()); - Assertions.assertEquals("gfxvchmuby", response.properties().agents().get(0).agentVersion()); + Assertions.assertEquals("trkicwhqyr", response.properties().description()); + Assertions.assertEquals("ndkrww", response.properties().tags().get("urhvifqeqfs")); + Assertions.assertEquals("rqvelrmdcizhvksb", response.properties().displayName()); + Assertions.assertEquals("klwjpz", response.properties().deploymentId()); + Assertions.assertEquals(AgentDeploymentState.RUNNING, response.properties().state()); + Assertions.assertEquals(AgentProtocol.A2A, response.properties().protocols().get(0).protocol()); + Assertions.assertEquals("pyeyzolbfnflytf", response.properties().protocols().get(0).version()); + Assertions.assertEquals("yzse", response.properties().agents().get(0).agentId()); + Assertions.assertEquals("m", response.properties().agents().get(0).agentName()); + Assertions.assertEquals("glkfvdwrgav", response.properties().agents().get(0).agentVersion()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsGetWithResponseMockTests.java index a1cf61df25b5..3f305b042189 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsGetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class AgentDeploymentsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"xpu\",\"deploymentId\":\"dmwnfhmjusuqn\",\"state\":\"Running\",\"protocols\":[{\"protocol\":\"Responses\",\"version\":\"dhekaqnirmidtv\"}],\"agents\":[{\"agentVersion\":\"sz\",\"agentId\":\"qygkx\",\"agentName\":\"fojlclpumv\"},{\"agentVersion\":\"bod\",\"agentId\":\"vykduumw\",\"agentName\":\"umjvegpdxtsaujt\"},{\"agentVersion\":\"ojybolqoxuptsli\",\"agentId\":\"mlkwk\",\"agentName\":\"invamtykxsz\"},{\"agentVersion\":\"kfxcsqmz\",\"agentId\":\"zktkdpczeo\",\"agentName\":\"lrg\"}],\"provisioningState\":\"Deleting\",\"description\":\"mhvqpkedaxk\",\"tags\":{\"odaweo\":\"rfjid\",\"yfjcypazwi\":\"avfyihuzsbpw\"}},\"id\":\"dlzgkoo\",\"name\":\"grlw\",\"type\":\"amesit\"}"; + = "{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"lks\",\"deploymentId\":\"sutacuctihavish\",\"state\":\"Deleting\",\"protocols\":[{\"protocol\":\"Responses\",\"version\":\"qququxlph\"}],\"agents\":[{\"agentVersion\":\"lexoweorocr\",\"agentId\":\"cgym\",\"agentName\":\"bqpfyrv\"},{\"agentVersion\":\"vijvwmrgcnzhr\",\"agentId\":\"cxfmbzquuutqmhb\",\"agentName\":\"yzycgcmbkygv\"},{\"agentVersion\":\"dqosxzmdzly\",\"agentId\":\"fufkekzfk\",\"agentName\":\"xh\"},{\"agentVersion\":\"vmnkgghvsryjok\",\"agentId\":\"wvb\",\"agentName\":\"arxsvmfpabw\"}],\"provisioningState\":\"Failed\",\"description\":\"fgqpud\",\"tags\":{\"x\":\"gieabbf\",\"gsnuhwy\":\"avlozu\",\"skemqqerw\":\"jsfmaxcebnbe\"}},\"id\":\"pjpvemdfkhttu\",\"name\":\"brxz\",\"type\":\"hyt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +33,19 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AgentDeployment response = manager.agentDeployments() - .getWithResponse("cqcjozzjku", "pdqqbtok", "ocuzxllbpwa", "hwettohgpzwx", "vtkzbh", + .getWithResponse("tcqxmyvkxixypavi", "jczgohv", "suwichmxczbyfkoc", "mzdctsnlwscrngt", "gxrolw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mhvqpkedaxk", response.properties().description()); - Assertions.assertEquals("rfjid", response.properties().tags().get("odaweo")); - Assertions.assertEquals("xpu", response.properties().displayName()); - Assertions.assertEquals("dmwnfhmjusuqn", response.properties().deploymentId()); - Assertions.assertEquals(AgentDeploymentState.RUNNING, response.properties().state()); + Assertions.assertEquals("fgqpud", response.properties().description()); + Assertions.assertEquals("gieabbf", response.properties().tags().get("x")); + Assertions.assertEquals("lks", response.properties().displayName()); + Assertions.assertEquals("sutacuctihavish", response.properties().deploymentId()); + Assertions.assertEquals(AgentDeploymentState.DELETING, response.properties().state()); Assertions.assertEquals(AgentProtocol.RESPONSES, response.properties().protocols().get(0).protocol()); - Assertions.assertEquals("dhekaqnirmidtv", response.properties().protocols().get(0).version()); - Assertions.assertEquals("qygkx", response.properties().agents().get(0).agentId()); - Assertions.assertEquals("fojlclpumv", response.properties().agents().get(0).agentName()); - Assertions.assertEquals("sz", response.properties().agents().get(0).agentVersion()); + Assertions.assertEquals("qququxlph", response.properties().protocols().get(0).version()); + Assertions.assertEquals("cgym", response.properties().agents().get(0).agentId()); + Assertions.assertEquals("bqpfyrv", response.properties().agents().get(0).agentName()); + Assertions.assertEquals("lexoweorocr", response.properties().agents().get(0).agentVersion()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsListMockTests.java index 1d84eb66a823..4ce29562986b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsListMockTests.java @@ -25,7 +25,7 @@ public final class AgentDeploymentsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"hrr\",\"deploymentId\":\"gbbjl\",\"state\":\"Stopping\",\"protocols\":[{\"protocol\":\"A2A\",\"version\":\"i\"}],\"agents\":[{\"agentVersion\":\"iumt\",\"agentId\":\"l\",\"agentName\":\"cf\"},{\"agentVersion\":\"rn\",\"agentId\":\"qpkayqivbigdrqg\",\"agentName\":\"tboyztgnmu\"},{\"agentVersion\":\"pwp\",\"agentId\":\"m\",\"agentName\":\"mtgwhzbbd\"}],\"provisioningState\":\"Failed\",\"description\":\"ncofei\",\"tags\":{\"ljonmajokbxxc\":\"ibdt\",\"uepmewsjpgbml\":\"khxjwtkftgzl\",\"makkshrnaxkcz\":\"xjhgvtepvrunu\"}},\"id\":\"ohdig\",\"name\":\"yuo\",\"type\":\"ftsamo\"}]}"; + = "{\"value\":[{\"properties\":{\"deploymentType\":\"AgentDeploymentProperties\",\"displayName\":\"uwozfvz\",\"deploymentId\":\"upcvq\",\"state\":\"Stopping\",\"protocols\":[{\"protocol\":\"Responses\",\"version\":\"hcmcgm\"}],\"agents\":[{\"agentVersion\":\"vqxuyiarznhdqse\",\"agentId\":\"dlmajpuyxo\",\"agentName\":\"rmzgccynb\"},{\"agentVersion\":\"msiehedmmvoneeyr\",\"agentId\":\"a\",\"agentName\":\"tzayqw\"},{\"agentVersion\":\"igeblsp\",\"agentId\":\"d\",\"agentName\":\"iwwveeozbjk\"},{\"agentVersion\":\"p\",\"agentId\":\"dnuehxwltssjdywb\",\"agentName\":\"lgerxactsawvxci\"}],\"provisioningState\":\"Failed\",\"description\":\"jrmplzmsl\",\"tags\":{\"lfswarmybwmro\":\"knyfuysjhvrr\"}},\"id\":\"eysyqnipehfwwcbf\",\"name\":\"xia\",\"type\":\"uvjucfjisosfzlnr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,20 +35,20 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.agentDeployments() - .list("qadewhuwxk", "xiatfam", "naif", "lxccprkiyf", 1484524293, "whom", - Arrays.asList("xgtu", "bvfquzihirqvv", "e", "yd"), "aqoktssgvqxer", false, - com.azure.core.util.Context.NONE); + .list("bjkjge", "cwtfmabvbmn", "twofxfmhlvy", "nslbqr", 1078631113, "qkie", Arrays.asList("jgqqrugwesps"), + "vsms", true, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ncofei", response.iterator().next().properties().description()); - Assertions.assertEquals("ibdt", response.iterator().next().properties().tags().get("ljonmajokbxxc")); - Assertions.assertEquals("hrr", response.iterator().next().properties().displayName()); - Assertions.assertEquals("gbbjl", response.iterator().next().properties().deploymentId()); + Assertions.assertEquals("jrmplzmsl", response.iterator().next().properties().description()); + Assertions.assertEquals("knyfuysjhvrr", response.iterator().next().properties().tags().get("lfswarmybwmro")); + Assertions.assertEquals("uwozfvz", response.iterator().next().properties().displayName()); + Assertions.assertEquals("upcvq", response.iterator().next().properties().deploymentId()); Assertions.assertEquals(AgentDeploymentState.STOPPING, response.iterator().next().properties().state()); - Assertions.assertEquals(AgentProtocol.A2A, + Assertions.assertEquals(AgentProtocol.RESPONSES, response.iterator().next().properties().protocols().get(0).protocol()); - Assertions.assertEquals("i", response.iterator().next().properties().protocols().get(0).version()); - Assertions.assertEquals("l", response.iterator().next().properties().agents().get(0).agentId()); - Assertions.assertEquals("cf", response.iterator().next().properties().agents().get(0).agentName()); - Assertions.assertEquals("iumt", response.iterator().next().properties().agents().get(0).agentVersion()); + Assertions.assertEquals("hcmcgm", response.iterator().next().properties().protocols().get(0).version()); + Assertions.assertEquals("dlmajpuyxo", response.iterator().next().properties().agents().get(0).agentId()); + Assertions.assertEquals("rmzgccynb", response.iterator().next().properties().agents().get(0).agentName()); + Assertions.assertEquals("vqxuyiarznhdqse", + response.iterator().next().properties().agents().get(0).agentVersion()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStartWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStartWithResponseMockTests.java index 602c6d393f44..4e125b7f76a6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStartWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStartWithResponseMockTests.java @@ -28,7 +28,8 @@ public void testStartWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.agentDeployments() - .startWithResponse("wqbak", "vxerowuzvrnnbeg", "af", "onmtoj", "g", com.azure.core.util.Context.NONE); + .startWithResponse("xnfyzgu", "xfh", "jixgofqdqws", "mihuvrqp", "xdoicqpkntly", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStopWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStopWithResponseMockTests.java index 3b6c08996505..5b1e8a931d98 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStopWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentDeploymentsStopWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testStopWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.agentDeployments() - .stopWithResponse("ofmazhkqqs", "knaqszbwgp", "dmwiwevveswg", "hbq", "hdldarg", + .stopWithResponse("prpensbmz", "ritukoym", "bfex", "izzjxwj", "qfzwanduhduw", com.azure.core.util.Context.NONE); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentProtocolVersionTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentProtocolVersionTests.java index cf904c5f3d63..d0031f521a97 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentProtocolVersionTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentProtocolVersionTests.java @@ -12,17 +12,18 @@ public final class AgentProtocolVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AgentProtocolVersion model = BinaryData.fromString("{\"protocol\":\"A2A\",\"version\":\"qxwetjtd\"}") + AgentProtocolVersion model = BinaryData.fromString("{\"protocol\":\"A2A\",\"version\":\"yanxkvvcs\"}") .toObject(AgentProtocolVersion.class); Assertions.assertEquals(AgentProtocol.A2A, model.protocol()); - Assertions.assertEquals("qxwetjtd", model.version()); + Assertions.assertEquals("yanxkvvcs", model.version()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AgentProtocolVersion model = new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("qxwetjtd"); + AgentProtocolVersion model + = new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("yanxkvvcs"); model = BinaryData.fromObject(model).toObject(AgentProtocolVersion.class); Assertions.assertEquals(AgentProtocol.A2A, model.protocol()); - Assertions.assertEquals("qxwetjtd", model.version()); + Assertions.assertEquals("yanxkvvcs", model.version()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferencePropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferencePropertiesTests.java index 0d3ce76dfddf..68e98df792bd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferencePropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferencePropertiesTests.java @@ -11,18 +11,19 @@ public final class AgentReferencePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AgentReferenceProperties model = BinaryData.fromString("{\"agentId\":\"xawqy\",\"agentName\":\"lhdyzmyckzex\"}") - .toObject(AgentReferenceProperties.class); - Assertions.assertEquals("xawqy", model.agentId()); - Assertions.assertEquals("lhdyzmyckzex", model.agentName()); + AgentReferenceProperties model + = BinaryData.fromString("{\"agentId\":\"uatbwbqamteuliy\",\"agentName\":\"pkcvmwf\"}") + .toObject(AgentReferenceProperties.class); + Assertions.assertEquals("uatbwbqamteuliy", model.agentId()); + Assertions.assertEquals("pkcvmwf", model.agentName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AgentReferenceProperties model - = new AgentReferenceProperties().withAgentId("xawqy").withAgentName("lhdyzmyckzex"); + = new AgentReferenceProperties().withAgentId("uatbwbqamteuliy").withAgentName("pkcvmwf"); model = BinaryData.fromObject(model).toObject(AgentReferenceProperties.class); - Assertions.assertEquals("xawqy", model.agentId()); - Assertions.assertEquals("lhdyzmyckzex", model.agentName()); + Assertions.assertEquals("uatbwbqamteuliy", model.agentId()); + Assertions.assertEquals("pkcvmwf", model.agentName()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferenceResourceArmPaginatedResultInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferenceResourceArmPaginatedResultInnerTests.java index e3315831ee1f..ccbf266555a4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferenceResourceArmPaginatedResultInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferenceResourceArmPaginatedResultInnerTests.java @@ -12,10 +12,10 @@ public final class AgentReferenceResourceArmPaginatedResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AgentReferenceResourceArmPaginatedResultInner model = BinaryData.fromString( - "{\"nextLink\":\"jptnvwjhrsidqpx\",\"value\":[{\"properties\":{\"agentId\":\"akftng\",\"agentName\":\"wmykyutry\"},\"id\":\"wmfjhp\",\"name\":\"cvjqdv\",\"type\":\"wkqp\"},{\"properties\":{\"agentId\":\"rlefgnaavu\",\"agentName\":\"n\"},\"id\":\"taoutnpdct\",\"name\":\"hspfefyihd\",\"type\":\"yeuyldph\"}]}") + "{\"nextLink\":\"yzeyuubeid\",\"value\":[{\"properties\":{\"agentId\":\"ytoithgygvfl\",\"agentName\":\"vdihoynkrx\"},\"id\":\"twk\",\"name\":\"rcyrucpcunnu\",\"type\":\"dqumoenodnai\"}]}") .toObject(AgentReferenceResourceArmPaginatedResultInner.class); - Assertions.assertEquals("jptnvwjhrsidqpx", model.nextLink()); - Assertions.assertEquals("akftng", model.value().get(0).properties().agentId()); - Assertions.assertEquals("wmykyutry", model.value().get(0).properties().agentName()); + Assertions.assertEquals("yzeyuubeid", model.nextLink()); + Assertions.assertEquals("ytoithgygvfl", model.value().get(0).properties().agentId()); + Assertions.assertEquals("vdihoynkrx", model.value().get(0).properties().agentName()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferenceTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferenceTests.java index 703a99d48746..2d016503997a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferenceTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AgentReferenceTests.java @@ -12,9 +12,9 @@ public final class AgentReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AgentReference model = BinaryData.fromString( - "{\"properties\":{\"agentId\":\"ybkcgsuthhllnmwy\",\"agentName\":\"fxexlfciatxtjrr\"},\"id\":\"mdskjhhxdlajfoxc\",\"name\":\"scv\",\"type\":\"lxlhuavkrm\"}") + "{\"properties\":{\"agentId\":\"hqhsknd\",\"agentName\":\"lqkaadlknwf\"},\"id\":\"nniyopetxi\",\"name\":\"cnrly\",\"type\":\"nucaephblkwqpat\"}") .toObject(AgentReference.class); - Assertions.assertEquals("ybkcgsuthhllnmwy", model.properties().agentId()); - Assertions.assertEquals("fxexlfciatxtjrr", model.properties().agentName()); + Assertions.assertEquals("hqhsknd", model.properties().agentId()); + Assertions.assertEquals("lqkaadlknwf", model.properties().agentName()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ApplicationTrafficRoutingPolicyTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ApplicationTrafficRoutingPolicyTests.java index 5c216cd9705b..749dc3d72cb5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ApplicationTrafficRoutingPolicyTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ApplicationTrafficRoutingPolicyTests.java @@ -15,28 +15,41 @@ public final class ApplicationTrafficRoutingPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTrafficRoutingPolicy model = BinaryData.fromString( - "{\"protocol\":\"FixedRatio\",\"rules\":[{\"ruleId\":\"aueekcsueh\",\"description\":\"ddacbcbgydlqidy\",\"deploymentId\":\"hmptyrilkfbn\",\"trafficPercentage\":1690234008}]}") + "{\"protocol\":\"FixedRatio\",\"rules\":[{\"ruleId\":\"qwixvcpwnk\",\"description\":\"wzwofalickduo\",\"deploymentId\":\"tamtyv\",\"trafficPercentage\":384634481},{\"ruleId\":\"rwzawnvs\",\"description\":\"fhzag\",\"deploymentId\":\"vhycvdimwrzregzg\",\"trafficPercentage\":1808851477},{\"ruleId\":\"trwpw\",\"description\":\"ye\",\"deploymentId\":\"kdhmeottawjyosx\",\"trafficPercentage\":1246274609},{\"ruleId\":\"h\",\"description\":\"fv\",\"deploymentId\":\"dpmiljpn\",\"trafficPercentage\":1686524732}]}") .toObject(ApplicationTrafficRoutingPolicy.class); Assertions.assertEquals(TrafficRoutingProtocol.FIXED_RATIO, model.protocol()); - Assertions.assertEquals("aueekcsueh", model.rules().get(0).ruleId()); - Assertions.assertEquals("ddacbcbgydlqidy", model.rules().get(0).description()); - Assertions.assertEquals("hmptyrilkfbn", model.rules().get(0).deploymentId()); - Assertions.assertEquals(1690234008, model.rules().get(0).trafficPercentage()); + Assertions.assertEquals("qwixvcpwnk", model.rules().get(0).ruleId()); + Assertions.assertEquals("wzwofalickduo", model.rules().get(0).description()); + Assertions.assertEquals("tamtyv", model.rules().get(0).deploymentId()); + Assertions.assertEquals(384634481, model.rules().get(0).trafficPercentage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTrafficRoutingPolicy model = new ApplicationTrafficRoutingPolicy().withProtocol(TrafficRoutingProtocol.FIXED_RATIO) - .withRules(Arrays.asList(new TrafficRoutingRule().withRuleId("aueekcsueh") - .withDescription("ddacbcbgydlqidy") - .withDeploymentId("hmptyrilkfbn") - .withTrafficPercentage(1690234008))); + .withRules(Arrays.asList( + new TrafficRoutingRule().withRuleId("qwixvcpwnk") + .withDescription("wzwofalickduo") + .withDeploymentId("tamtyv") + .withTrafficPercentage(384634481), + new TrafficRoutingRule().withRuleId("rwzawnvs") + .withDescription("fhzag") + .withDeploymentId("vhycvdimwrzregzg") + .withTrafficPercentage(1808851477), + new TrafficRoutingRule().withRuleId("trwpw") + .withDescription("ye") + .withDeploymentId("kdhmeottawjyosx") + .withTrafficPercentage(1246274609), + new TrafficRoutingRule().withRuleId("h") + .withDescription("fv") + .withDeploymentId("dpmiljpn") + .withTrafficPercentage(1686524732))); model = BinaryData.fromObject(model).toObject(ApplicationTrafficRoutingPolicy.class); Assertions.assertEquals(TrafficRoutingProtocol.FIXED_RATIO, model.protocol()); - Assertions.assertEquals("aueekcsueh", model.rules().get(0).ruleId()); - Assertions.assertEquals("ddacbcbgydlqidy", model.rules().get(0).description()); - Assertions.assertEquals("hmptyrilkfbn", model.rules().get(0).deploymentId()); - Assertions.assertEquals(1690234008, model.rules().get(0).trafficPercentage()); + Assertions.assertEquals("qwixvcpwnk", model.rules().get(0).ruleId()); + Assertions.assertEquals("wzwofalickduo", model.rules().get(0).description()); + Assertions.assertEquals("tamtyv", model.rules().get(0).deploymentId()); + Assertions.assertEquals(384634481, model.rules().get(0).trafficPercentage()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentCpuMemoryResourceRequirementsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentCpuMemoryResourceRequirementsTests.java index e695deb08d35..e29478af6539 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentCpuMemoryResourceRequirementsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentCpuMemoryResourceRequirementsTests.java @@ -12,18 +12,18 @@ public final class ArcDeploymentCpuMemoryResourceRequirementsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentCpuMemoryResourceRequirements model - = BinaryData.fromString("{\"cpu\":\"janepubdpkx\",\"memory\":\"qvgx\"}") + = BinaryData.fromString("{\"cpu\":\"brnnhjxsqw\",\"memory\":\"hqkb\"}") .toObject(ArcDeploymentCpuMemoryResourceRequirements.class); - Assertions.assertEquals("janepubdpkx", model.cpu()); - Assertions.assertEquals("qvgx", model.memory()); + Assertions.assertEquals("brnnhjxsqw", model.cpu()); + Assertions.assertEquals("hqkb", model.memory()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ArcDeploymentCpuMemoryResourceRequirements model - = new ArcDeploymentCpuMemoryResourceRequirements().withCpu("janepubdpkx").withMemory("qvgx"); + = new ArcDeploymentCpuMemoryResourceRequirements().withCpu("brnnhjxsqw").withMemory("hqkb"); model = BinaryData.fromObject(model).toObject(ArcDeploymentCpuMemoryResourceRequirements.class); - Assertions.assertEquals("janepubdpkx", model.cpu()); - Assertions.assertEquals("qvgx", model.memory()); + Assertions.assertEquals("brnnhjxsqw", model.cpu()); + Assertions.assertEquals("hqkb", model.memory()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentInnerTests.java index bf65133e3865..847496201329 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentInnerTests.java @@ -24,60 +24,59 @@ public final class ArcDeploymentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentInner model = BinaryData.fromString( - "{\"properties\":{\"model\":{\"format\":\"ollgry\",\"name\":\"qiuasigrows\"},\"extensionId\":\"c\",\"runtime\":\"onnx-genai\",\"compute\":\"cpu\",\"deploymentTemplate\":\"ygdjboqgrmtqjk\",\"vllmParameters\":{\"tensorParallelSize\":2048591758,\"maxModelLen\":806934110,\"gpuMemoryUtilization\":53.878,\"enforceEager\":false},\"replicas\":7044640,\"resources\":{\"requests\":{\"cpu\":\"wvcmj\",\"memory\":\"kxiidisczskoswo\"},\"limits\":{\"cpu\":\"azugamxzkrrcoi\",\"memory\":\"bamnppcc\",\"gpu\":6478909}},\"nodeSelector\":{\"zxuizhyhnepkpe\":\"dsbezaxyfu\",\"xdazv\":\"iarxqiubxdukec\"},\"deploymentState\":\"Paused\",\"raiPolicyName\":\"mmkoszudb\",\"provisioningState\":\"Creating\",\"provisioningDetails\":{\"message\":\"rpcaqkiofkbtf\",\"lastOperationTimestamp\":\"2021-03-25T16:21:47Z\"},\"inferenceEndpoint\":\"bnldpvcbh\",\"capabilities\":{\"wusqx\":\"yq\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"pbrruyu\",\"id\":\"tvlmbjwcolbmxlb\",\"name\":\"w\",\"type\":\"pcpahprzrvxhmtf\"}") + "{\"properties\":{\"model\":{\"format\":\"kwiswskukjtas\",\"name\":\"vwisp\"},\"extensionId\":\"xkdtxfkndlqvtwkn\",\"runtime\":\"vllm\",\"compute\":\"cpu\",\"deploymentTemplate\":\"bugtywatmqa\",\"vllmParameters\":{\"tensorParallelSize\":783807092,\"maxModelLen\":1683033093,\"gpuMemoryUtilization\":60.073463,\"enforceEager\":true},\"replicas\":98605712,\"resources\":{\"requests\":{\"cpu\":\"oygzcbyfqxkfao\",\"memory\":\"tehqpuvjmvq\"},\"limits\":{\"cpu\":\"wckygr\",\"memory\":\"jn\",\"gpu\":1138069123}},\"nodeSelector\":{\"ceysfaqeg\":\"juskbrreqyn\"},\"deploymentState\":\"Running\",\"raiPolicyName\":\"ysh\",\"provisioningState\":\"Canceled\",\"provisioningDetails\":{\"message\":\"bxgkqusy\",\"lastOperationTimestamp\":\"2020-12-26T05:36:32Z\"},\"inferenceEndpoint\":\"dacarvvlfnty\",\"capabilities\":{\"lsxkd\":\"oiwenazerohzrsq\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"apfgsdpcvessm\",\"id\":\"h\",\"name\":\"uuipldq\",\"type\":\"ctekval\"}") .toObject(ArcDeploymentInner.class); - Assertions.assertEquals("ollgry", model.properties().model().format()); - Assertions.assertEquals("qiuasigrows", model.properties().model().name()); - Assertions.assertEquals("c", model.properties().extensionId()); - Assertions.assertEquals(ArcDeploymentRuntime.ONNX, model.properties().runtime()); + Assertions.assertEquals("kwiswskukjtas", model.properties().model().format()); + Assertions.assertEquals("vwisp", model.properties().model().name()); + Assertions.assertEquals("xkdtxfkndlqvtwkn", model.properties().extensionId()); + Assertions.assertEquals(ArcDeploymentRuntime.VLLM, model.properties().runtime()); Assertions.assertEquals(ArcDeploymentComputeType.CPU, model.properties().compute()); - Assertions.assertEquals("ygdjboqgrmtqjk", model.properties().deploymentTemplate()); - Assertions.assertEquals(7044640, model.properties().replicas()); - Assertions.assertEquals("wvcmj", model.properties().resources().requests().cpu()); - Assertions.assertEquals("kxiidisczskoswo", model.properties().resources().requests().memory()); - Assertions.assertEquals("azugamxzkrrcoi", model.properties().resources().limits().cpu()); - Assertions.assertEquals("bamnppcc", model.properties().resources().limits().memory()); - Assertions.assertEquals(6478909, model.properties().resources().limits().gpu()); - Assertions.assertEquals("dsbezaxyfu", model.properties().nodeSelector().get("zxuizhyhnepkpe")); - Assertions.assertEquals(DeploymentState.PAUSED, model.properties().deploymentState()); - Assertions.assertEquals("mmkoszudb", model.properties().raiPolicyName()); + Assertions.assertEquals("bugtywatmqa", model.properties().deploymentTemplate()); + Assertions.assertEquals(98605712, model.properties().replicas()); + Assertions.assertEquals("oygzcbyfqxkfao", model.properties().resources().requests().cpu()); + Assertions.assertEquals("tehqpuvjmvq", model.properties().resources().requests().memory()); + Assertions.assertEquals("wckygr", model.properties().resources().limits().cpu()); + Assertions.assertEquals("jn", model.properties().resources().limits().memory()); + Assertions.assertEquals(1138069123, model.properties().resources().limits().gpu()); + Assertions.assertEquals("juskbrreqyn", model.properties().nodeSelector().get("ceysfaqeg")); + Assertions.assertEquals(DeploymentState.RUNNING, model.properties().deploymentState()); + Assertions.assertEquals("ysh", model.properties().raiPolicyName()); Assertions.assertEquals(ArcDeploymentSkuName.ARC, model.sku().name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ArcDeploymentInner model = new ArcDeploymentInner().withProperties(new ArcDeploymentProperties() - .withModel(new ArcDeploymentModel().withFormat("ollgry").withName("qiuasigrows")) - .withExtensionId("c") - .withRuntime(ArcDeploymentRuntime.ONNX) + .withModel(new ArcDeploymentModel().withFormat("kwiswskukjtas").withName("vwisp")) + .withExtensionId("xkdtxfkndlqvtwkn") + .withRuntime(ArcDeploymentRuntime.VLLM) .withCompute(ArcDeploymentComputeType.CPU) - .withDeploymentTemplate("ygdjboqgrmtqjk") - .withReplicas(7044640) + .withDeploymentTemplate("bugtywatmqa") + .withReplicas(98605712) .withResources(new ArcDeploymentKubernetesResources() - .withRequests( - new ArcDeploymentCpuMemoryResourceRequirements().withCpu("wvcmj").withMemory("kxiidisczskoswo")) - .withLimits(new ArcDeploymentResourceRequirements().withCpu("azugamxzkrrcoi") - .withMemory("bamnppcc") - .withGpu(6478909))) - .withNodeSelector(mapOf("zxuizhyhnepkpe", "dsbezaxyfu", "xdazv", "iarxqiubxdukec")) - .withDeploymentState(DeploymentState.PAUSED) - .withRaiPolicyName("mmkoszudb")).withSku(new ArcDeploymentSku().withName(ArcDeploymentSkuName.ARC)); + .withRequests(new ArcDeploymentCpuMemoryResourceRequirements().withCpu("oygzcbyfqxkfao") + .withMemory("tehqpuvjmvq")) + .withLimits( + new ArcDeploymentResourceRequirements().withCpu("wckygr").withMemory("jn").withGpu(1138069123))) + .withNodeSelector(mapOf("ceysfaqeg", "juskbrreqyn")) + .withDeploymentState(DeploymentState.RUNNING) + .withRaiPolicyName("ysh")).withSku(new ArcDeploymentSku().withName(ArcDeploymentSkuName.ARC)); model = BinaryData.fromObject(model).toObject(ArcDeploymentInner.class); - Assertions.assertEquals("ollgry", model.properties().model().format()); - Assertions.assertEquals("qiuasigrows", model.properties().model().name()); - Assertions.assertEquals("c", model.properties().extensionId()); - Assertions.assertEquals(ArcDeploymentRuntime.ONNX, model.properties().runtime()); + Assertions.assertEquals("kwiswskukjtas", model.properties().model().format()); + Assertions.assertEquals("vwisp", model.properties().model().name()); + Assertions.assertEquals("xkdtxfkndlqvtwkn", model.properties().extensionId()); + Assertions.assertEquals(ArcDeploymentRuntime.VLLM, model.properties().runtime()); Assertions.assertEquals(ArcDeploymentComputeType.CPU, model.properties().compute()); - Assertions.assertEquals("ygdjboqgrmtqjk", model.properties().deploymentTemplate()); - Assertions.assertEquals(7044640, model.properties().replicas()); - Assertions.assertEquals("wvcmj", model.properties().resources().requests().cpu()); - Assertions.assertEquals("kxiidisczskoswo", model.properties().resources().requests().memory()); - Assertions.assertEquals("azugamxzkrrcoi", model.properties().resources().limits().cpu()); - Assertions.assertEquals("bamnppcc", model.properties().resources().limits().memory()); - Assertions.assertEquals(6478909, model.properties().resources().limits().gpu()); - Assertions.assertEquals("dsbezaxyfu", model.properties().nodeSelector().get("zxuizhyhnepkpe")); - Assertions.assertEquals(DeploymentState.PAUSED, model.properties().deploymentState()); - Assertions.assertEquals("mmkoszudb", model.properties().raiPolicyName()); + Assertions.assertEquals("bugtywatmqa", model.properties().deploymentTemplate()); + Assertions.assertEquals(98605712, model.properties().replicas()); + Assertions.assertEquals("oygzcbyfqxkfao", model.properties().resources().requests().cpu()); + Assertions.assertEquals("tehqpuvjmvq", model.properties().resources().requests().memory()); + Assertions.assertEquals("wckygr", model.properties().resources().limits().cpu()); + Assertions.assertEquals("jn", model.properties().resources().limits().memory()); + Assertions.assertEquals(1138069123, model.properties().resources().limits().gpu()); + Assertions.assertEquals("juskbrreqyn", model.properties().nodeSelector().get("ceysfaqeg")); + Assertions.assertEquals(DeploymentState.RUNNING, model.properties().deploymentState()); + Assertions.assertEquals("ysh", model.properties().raiPolicyName()); Assertions.assertEquals(ArcDeploymentSkuName.ARC, model.sku().name()); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentKubernetesResourcesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentKubernetesResourcesTests.java index d3ecd50fedd6..2eee1bc0cddd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentKubernetesResourcesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentKubernetesResourcesTests.java @@ -14,27 +14,27 @@ public final class ArcDeploymentKubernetesResourcesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentKubernetesResources model = BinaryData.fromString( - "{\"requests\":{\"cpu\":\"xcpwzvmdok\",\"memory\":\"qdtiwlwxlb\"},\"limits\":{\"cpu\":\"qba\",\"memory\":\"icqchygtv\",\"gpu\":324303179}}") + "{\"requests\":{\"cpu\":\"yay\",\"memory\":\"mmfz\"},\"limits\":{\"cpu\":\"wxrzxmdewsrsxkrp\",\"memory\":\"jazejwwviyoyp\",\"gpu\":2055673505}}") .toObject(ArcDeploymentKubernetesResources.class); - Assertions.assertEquals("xcpwzvmdok", model.requests().cpu()); - Assertions.assertEquals("qdtiwlwxlb", model.requests().memory()); - Assertions.assertEquals("qba", model.limits().cpu()); - Assertions.assertEquals("icqchygtv", model.limits().memory()); - Assertions.assertEquals(324303179, model.limits().gpu()); + Assertions.assertEquals("yay", model.requests().cpu()); + Assertions.assertEquals("mmfz", model.requests().memory()); + Assertions.assertEquals("wxrzxmdewsrsxkrp", model.limits().cpu()); + Assertions.assertEquals("jazejwwviyoyp", model.limits().memory()); + Assertions.assertEquals(2055673505, model.limits().gpu()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ArcDeploymentKubernetesResources model = new ArcDeploymentKubernetesResources() - .withRequests( - new ArcDeploymentCpuMemoryResourceRequirements().withCpu("xcpwzvmdok").withMemory("qdtiwlwxlb")) - .withLimits( - new ArcDeploymentResourceRequirements().withCpu("qba").withMemory("icqchygtv").withGpu(324303179)); + .withRequests(new ArcDeploymentCpuMemoryResourceRequirements().withCpu("yay").withMemory("mmfz")) + .withLimits(new ArcDeploymentResourceRequirements().withCpu("wxrzxmdewsrsxkrp") + .withMemory("jazejwwviyoyp") + .withGpu(2055673505)); model = BinaryData.fromObject(model).toObject(ArcDeploymentKubernetesResources.class); - Assertions.assertEquals("xcpwzvmdok", model.requests().cpu()); - Assertions.assertEquals("qdtiwlwxlb", model.requests().memory()); - Assertions.assertEquals("qba", model.limits().cpu()); - Assertions.assertEquals("icqchygtv", model.limits().memory()); - Assertions.assertEquals(324303179, model.limits().gpu()); + Assertions.assertEquals("yay", model.requests().cpu()); + Assertions.assertEquals("mmfz", model.requests().memory()); + Assertions.assertEquals("wxrzxmdewsrsxkrp", model.limits().cpu()); + Assertions.assertEquals("jazejwwviyoyp", model.limits().memory()); + Assertions.assertEquals(2055673505, model.limits().gpu()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentListResultTests.java index bb2955be9357..e162aa88ef71 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentListResultTests.java @@ -12,8 +12,8 @@ public final class ArcDeploymentListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentListResult model = BinaryData.fromString( - "{\"nextLink\":\"am\",\"value\":[{\"properties\":{\"model\":{\"format\":\"szknxkvccxe\",\"name\":\"yvkunmign\"},\"extensionId\":\"hi\",\"runtime\":\"vllm\",\"compute\":\"cpu\",\"deploymentTemplate\":\"ogjwpindedvabbxb\",\"vllmParameters\":{\"tensorParallelSize\":779572725,\"maxModelLen\":785027108,\"gpuMemoryUtilization\":57.75319,\"enforceEager\":false},\"replicas\":277548984,\"resources\":{\"requests\":{\"cpu\":\"cfxzirzzih\",\"memory\":\"wypusuvjsl\"},\"limits\":{\"cpu\":\"ciidjs\",\"memory\":\"fryvdmvxadqac\",\"gpu\":564752223}},\"nodeSelector\":{\"zlfsyqkfrbzgowo\":\"wbabgfbktyjmf\"},\"deploymentState\":\"Running\",\"raiPolicyName\":\"ea\",\"provisioningState\":\"Succeeded\",\"provisioningDetails\":{\"message\":\"qg\",\"lastOperationTimestamp\":\"2021-07-15T21:16:05Z\"},\"inferenceEndpoint\":\"srv\",\"capabilities\":{\"jceagb\":\"i\",\"xgo\":\"qvlsumywzas\",\"yznclkfkee\":\"oyjfqipu\",\"pemtuoqu\":\"gv\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"egqavnigflqqb\",\"id\":\"yjpylxdbfva\",\"name\":\"mvmsxbae\",\"type\":\"wjcnkottl\"}]}") + "{\"nextLink\":\"gzv\",\"value\":[{\"properties\":{\"model\":{\"format\":\"ij\",\"name\":\"kzuqnwsith\"},\"extensionId\":\"q\",\"runtime\":\"vllm\",\"compute\":\"cpu\",\"deploymentTemplate\":\"hluqwquls\",\"vllmParameters\":{\"tensorParallelSize\":342595066,\"maxModelLen\":456770215,\"gpuMemoryUtilization\":95.208206,\"enforceEager\":true},\"replicas\":1990714971,\"resources\":{\"requests\":{\"cpu\":\"qezv\",\"memory\":\"qugdrftbcvexreuq\"},\"limits\":{\"cpu\":\"tljvfwhreagkhyx\",\"memory\":\"qtvbczsu\",\"gpu\":588050684}},\"nodeSelector\":{\"eykgsangpszngaf\":\"lmepjpf\",\"lkvec\":\"g\"},\"deploymentState\":\"Paused\",\"raiPolicyName\":\"ngoadyedmzr\",\"provisioningState\":\"ResolvingDNS\",\"provisioningDetails\":{\"message\":\"nub\",\"lastOperationTimestamp\":\"2021-11-26T00:13:36Z\"},\"inferenceEndpoint\":\"pkpztrg\",\"capabilities\":{\"we\":\"vcoqraswugyxpqi\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"wvskbuhzacaqtylt\",\"id\":\"qcujpd\",\"name\":\"xzak\",\"type\":\"ejkm\"}]}") .toObject(ArcDeploymentListResult.class); - Assertions.assertEquals("am", model.nextLink()); + Assertions.assertEquals("gzv", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentModelTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentModelTests.java index 49df65d405a7..f6eb95d871e9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentModelTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentModelTests.java @@ -12,16 +12,16 @@ public final class ArcDeploymentModelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentModel model - = BinaryData.fromString("{\"format\":\"fqb\",\"name\":\"ntnrgmqsorh\"}").toObject(ArcDeploymentModel.class); - Assertions.assertEquals("fqb", model.format()); - Assertions.assertEquals("ntnrgmqsorh", model.name()); + = BinaryData.fromString("{\"format\":\"bpkuwxeoio\",\"name\":\"fiz\"}").toObject(ArcDeploymentModel.class); + Assertions.assertEquals("bpkuwxeoio", model.format()); + Assertions.assertEquals("fiz", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcDeploymentModel model = new ArcDeploymentModel().withFormat("fqb").withName("ntnrgmqsorh"); + ArcDeploymentModel model = new ArcDeploymentModel().withFormat("bpkuwxeoio").withName("fiz"); model = BinaryData.fromObject(model).toObject(ArcDeploymentModel.class); - Assertions.assertEquals("fqb", model.format()); - Assertions.assertEquals("ntnrgmqsorh", model.name()); + Assertions.assertEquals("bpkuwxeoio", model.format()); + Assertions.assertEquals("fiz", model.name()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPatchCpuMemoryResourceRequirementsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPatchCpuMemoryResourceRequirementsTests.java index cf2258377137..f688345873dd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPatchCpuMemoryResourceRequirementsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPatchCpuMemoryResourceRequirementsTests.java @@ -12,18 +12,18 @@ public final class ArcDeploymentPatchCpuMemoryResourceRequirementsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentPatchCpuMemoryResourceRequirements model - = BinaryData.fromString("{\"cpu\":\"lwfgziiu\",\"memory\":\"jjceatlijjjr\"}") + = BinaryData.fromString("{\"cpu\":\"jascowvfdjkpd\",\"memory\":\"hlkks\"}") .toObject(ArcDeploymentPatchCpuMemoryResourceRequirements.class); - Assertions.assertEquals("lwfgziiu", model.cpu()); - Assertions.assertEquals("jjceatlijjjr", model.memory()); + Assertions.assertEquals("jascowvfdjkpd", model.cpu()); + Assertions.assertEquals("hlkks", model.memory()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ArcDeploymentPatchCpuMemoryResourceRequirements model - = new ArcDeploymentPatchCpuMemoryResourceRequirements().withCpu("lwfgziiu").withMemory("jjceatlijjjr"); + = new ArcDeploymentPatchCpuMemoryResourceRequirements().withCpu("jascowvfdjkpd").withMemory("hlkks"); model = BinaryData.fromObject(model).toObject(ArcDeploymentPatchCpuMemoryResourceRequirements.class); - Assertions.assertEquals("lwfgziiu", model.cpu()); - Assertions.assertEquals("jjceatlijjjr", model.memory()); + Assertions.assertEquals("jascowvfdjkpd", model.cpu()); + Assertions.assertEquals("hlkks", model.memory()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPatchKubernetesResourcesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPatchKubernetesResourcesTests.java index 3dce7f7b3223..1f94670e5206 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPatchKubernetesResourcesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPatchKubernetesResourcesTests.java @@ -14,28 +14,27 @@ public final class ArcDeploymentPatchKubernetesResourcesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentPatchKubernetesResources model = BinaryData.fromString( - "{\"requests\":{\"cpu\":\"gyngydgrpxncak\",\"memory\":\"aondjrkclamgg\"},\"limits\":{\"cpu\":\"mfejdoqeykglty\",\"memory\":\"hqfgqkayejsx\",\"gpu\":1396514650}}") + "{\"requests\":{\"cpu\":\"knlccrmmkyup\",\"memory\":\"ubyqj\"},\"limits\":{\"cpu\":\"kfq\",\"memory\":\"kemyil\",\"gpu\":1066286485}}") .toObject(ArcDeploymentPatchKubernetesResources.class); - Assertions.assertEquals("gyngydgrpxncak", model.requests().cpu()); - Assertions.assertEquals("aondjrkclamgg", model.requests().memory()); - Assertions.assertEquals("mfejdoqeykglty", model.limits().cpu()); - Assertions.assertEquals("hqfgqkayejsx", model.limits().memory()); - Assertions.assertEquals(1396514650, model.limits().gpu()); + Assertions.assertEquals("knlccrmmkyup", model.requests().cpu()); + Assertions.assertEquals("ubyqj", model.requests().memory()); + Assertions.assertEquals("kfq", model.limits().cpu()); + Assertions.assertEquals("kemyil", model.limits().memory()); + Assertions.assertEquals(1066286485, model.limits().gpu()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ArcDeploymentPatchKubernetesResources model = new ArcDeploymentPatchKubernetesResources() - .withRequests(new ArcDeploymentPatchCpuMemoryResourceRequirements().withCpu("gyngydgrpxncak") - .withMemory("aondjrkclamgg")) - .withLimits(new ArcDeploymentResourceRequirements().withCpu("mfejdoqeykglty") - .withMemory("hqfgqkayejsx") - .withGpu(1396514650)); + .withRequests( + new ArcDeploymentPatchCpuMemoryResourceRequirements().withCpu("knlccrmmkyup").withMemory("ubyqj")) + .withLimits( + new ArcDeploymentResourceRequirements().withCpu("kfq").withMemory("kemyil").withGpu(1066286485)); model = BinaryData.fromObject(model).toObject(ArcDeploymentPatchKubernetesResources.class); - Assertions.assertEquals("gyngydgrpxncak", model.requests().cpu()); - Assertions.assertEquals("aondjrkclamgg", model.requests().memory()); - Assertions.assertEquals("mfejdoqeykglty", model.limits().cpu()); - Assertions.assertEquals("hqfgqkayejsx", model.limits().memory()); - Assertions.assertEquals(1396514650, model.limits().gpu()); + Assertions.assertEquals("knlccrmmkyup", model.requests().cpu()); + Assertions.assertEquals("ubyqj", model.requests().memory()); + Assertions.assertEquals("kfq", model.limits().cpu()); + Assertions.assertEquals("kemyil", model.limits().memory()); + Assertions.assertEquals(1066286485, model.limits().gpu()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPropertiesTests.java index 7a1d6da340d3..c6d276be78bb 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentPropertiesTests.java @@ -21,57 +21,60 @@ public final class ArcDeploymentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentProperties model = BinaryData.fromString( - "{\"model\":{\"format\":\"ocnxz\",\"name\":\"mj\"},\"extensionId\":\"ngxno\",\"runtime\":\"vllm\",\"compute\":\"cpu\",\"deploymentTemplate\":\"disnj\",\"vllmParameters\":{\"tensorParallelSize\":132652639,\"maxModelLen\":651918591,\"gpuMemoryUtilization\":15.758014,\"enforceEager\":true},\"replicas\":1625170254,\"resources\":{\"requests\":{\"cpu\":\"epfwwt\",\"memory\":\"f\"},\"limits\":{\"cpu\":\"sxxh\",\"memory\":\"cdbcky\",\"gpu\":206183996}},\"nodeSelector\":{\"gknjzr\":\"xhn\",\"me\":\"h\",\"gsnbagnchjh\":\"lvukaobrlb\"},\"deploymentState\":\"Paused\",\"raiPolicyName\":\"owa\",\"provisioningState\":\"Moving\",\"provisioningDetails\":{\"message\":\"hjym\",\"lastOperationTimestamp\":\"2021-11-11T12:48:42Z\"},\"inferenceEndpoint\":\"tagdrc\",\"capabilities\":{\"omevtfycn\":\"ol\",\"iytssikizbc\":\"bvgjcodkkgj\"}}") + "{\"model\":{\"format\":\"l\",\"name\":\"tjqvqyvweht\"},\"extensionId\":\"emxhzzy\",\"runtime\":\"vllm\",\"compute\":\"gpu\",\"deploymentTemplate\":\"sxivzrrryvei\",\"vllmParameters\":{\"tensorParallelSize\":346536506,\"maxModelLen\":682586629,\"gpuMemoryUtilization\":56.047173,\"enforceEager\":false},\"replicas\":1347350770,\"resources\":{\"requests\":{\"cpu\":\"uzkaftjvvruxwi\",\"memory\":\"syeipqd\"},\"limits\":{\"cpu\":\"tgrqgdgkkile\",\"memory\":\"kcsmk\",\"gpu\":1416929583}},\"nodeSelector\":{\"ygbdgwumgxdgdhpa\":\"baedorvvmqfl\",\"vjsaqwotm\":\"gdexjd\",\"xaptefhexcgjok\":\"wllcolsr\"},\"deploymentState\":\"Paused\",\"raiPolicyName\":\"hv\",\"provisioningState\":\"Accepted\",\"provisioningDetails\":{\"message\":\"kpeeksnbksdqhj\",\"lastOperationTimestamp\":\"2021-06-27T10:41:24Z\"},\"inferenceEndpoint\":\"xeslkhhustcpoqm\",\"capabilities\":{\"lejjjkxy\":\"wqjwgok\",\"kjbztensvkzykj\":\"wfd\",\"hcdpkupnqrmgj\":\"jknsxfwu\"}}") .toObject(ArcDeploymentProperties.class); - Assertions.assertEquals("ocnxz", model.model().format()); - Assertions.assertEquals("mj", model.model().name()); - Assertions.assertEquals("ngxno", model.extensionId()); + Assertions.assertEquals("l", model.model().format()); + Assertions.assertEquals("tjqvqyvweht", model.model().name()); + Assertions.assertEquals("emxhzzy", model.extensionId()); Assertions.assertEquals(ArcDeploymentRuntime.VLLM, model.runtime()); - Assertions.assertEquals(ArcDeploymentComputeType.CPU, model.compute()); - Assertions.assertEquals("disnj", model.deploymentTemplate()); - Assertions.assertEquals(1625170254, model.replicas()); - Assertions.assertEquals("epfwwt", model.resources().requests().cpu()); - Assertions.assertEquals("f", model.resources().requests().memory()); - Assertions.assertEquals("sxxh", model.resources().limits().cpu()); - Assertions.assertEquals("cdbcky", model.resources().limits().memory()); - Assertions.assertEquals(206183996, model.resources().limits().gpu()); - Assertions.assertEquals("xhn", model.nodeSelector().get("gknjzr")); + Assertions.assertEquals(ArcDeploymentComputeType.GPU, model.compute()); + Assertions.assertEquals("sxivzrrryvei", model.deploymentTemplate()); + Assertions.assertEquals(1347350770, model.replicas()); + Assertions.assertEquals("uzkaftjvvruxwi", model.resources().requests().cpu()); + Assertions.assertEquals("syeipqd", model.resources().requests().memory()); + Assertions.assertEquals("tgrqgdgkkile", model.resources().limits().cpu()); + Assertions.assertEquals("kcsmk", model.resources().limits().memory()); + Assertions.assertEquals(1416929583, model.resources().limits().gpu()); + Assertions.assertEquals("baedorvvmqfl", model.nodeSelector().get("ygbdgwumgxdgdhpa")); Assertions.assertEquals(DeploymentState.PAUSED, model.deploymentState()); - Assertions.assertEquals("owa", model.raiPolicyName()); + Assertions.assertEquals("hv", model.raiPolicyName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ArcDeploymentProperties model = new ArcDeploymentProperties() - .withModel(new ArcDeploymentModel().withFormat("ocnxz").withName("mj")) - .withExtensionId("ngxno") + .withModel(new ArcDeploymentModel().withFormat("l").withName("tjqvqyvweht")) + .withExtensionId("emxhzzy") .withRuntime(ArcDeploymentRuntime.VLLM) - .withCompute(ArcDeploymentComputeType.CPU) - .withDeploymentTemplate("disnj") - .withReplicas(1625170254) + .withCompute(ArcDeploymentComputeType.GPU) + .withDeploymentTemplate("sxivzrrryvei") + .withReplicas(1347350770) .withResources(new ArcDeploymentKubernetesResources() - .withRequests(new ArcDeploymentCpuMemoryResourceRequirements().withCpu("epfwwt").withMemory("f")) - .withLimits( - new ArcDeploymentResourceRequirements().withCpu("sxxh").withMemory("cdbcky").withGpu(206183996))) - .withNodeSelector(mapOf("gknjzr", "xhn", "me", "h", "gsnbagnchjh", "lvukaobrlb")) + .withRequests( + new ArcDeploymentCpuMemoryResourceRequirements().withCpu("uzkaftjvvruxwi").withMemory("syeipqd")) + .withLimits(new ArcDeploymentResourceRequirements().withCpu("tgrqgdgkkile") + .withMemory("kcsmk") + .withGpu(1416929583))) + .withNodeSelector( + mapOf("ygbdgwumgxdgdhpa", "baedorvvmqfl", "vjsaqwotm", "gdexjd", "xaptefhexcgjok", "wllcolsr")) .withDeploymentState(DeploymentState.PAUSED) - .withRaiPolicyName("owa"); + .withRaiPolicyName("hv"); model = BinaryData.fromObject(model).toObject(ArcDeploymentProperties.class); - Assertions.assertEquals("ocnxz", model.model().format()); - Assertions.assertEquals("mj", model.model().name()); - Assertions.assertEquals("ngxno", model.extensionId()); + Assertions.assertEquals("l", model.model().format()); + Assertions.assertEquals("tjqvqyvweht", model.model().name()); + Assertions.assertEquals("emxhzzy", model.extensionId()); Assertions.assertEquals(ArcDeploymentRuntime.VLLM, model.runtime()); - Assertions.assertEquals(ArcDeploymentComputeType.CPU, model.compute()); - Assertions.assertEquals("disnj", model.deploymentTemplate()); - Assertions.assertEquals(1625170254, model.replicas()); - Assertions.assertEquals("epfwwt", model.resources().requests().cpu()); - Assertions.assertEquals("f", model.resources().requests().memory()); - Assertions.assertEquals("sxxh", model.resources().limits().cpu()); - Assertions.assertEquals("cdbcky", model.resources().limits().memory()); - Assertions.assertEquals(206183996, model.resources().limits().gpu()); - Assertions.assertEquals("xhn", model.nodeSelector().get("gknjzr")); + Assertions.assertEquals(ArcDeploymentComputeType.GPU, model.compute()); + Assertions.assertEquals("sxivzrrryvei", model.deploymentTemplate()); + Assertions.assertEquals(1347350770, model.replicas()); + Assertions.assertEquals("uzkaftjvvruxwi", model.resources().requests().cpu()); + Assertions.assertEquals("syeipqd", model.resources().requests().memory()); + Assertions.assertEquals("tgrqgdgkkile", model.resources().limits().cpu()); + Assertions.assertEquals("kcsmk", model.resources().limits().memory()); + Assertions.assertEquals(1416929583, model.resources().limits().gpu()); + Assertions.assertEquals("baedorvvmqfl", model.nodeSelector().get("ygbdgwumgxdgdhpa")); Assertions.assertEquals(DeploymentState.PAUSED, model.deploymentState()); - Assertions.assertEquals("owa", model.raiPolicyName()); + Assertions.assertEquals("hv", model.raiPolicyName()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentProvisioningDetailsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentProvisioningDetailsTests.java index d80dafff2d2d..9b2739d35f4d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentProvisioningDetailsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentProvisioningDetailsTests.java @@ -12,10 +12,10 @@ public final class ArcDeploymentProvisioningDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ArcDeploymentProvisioningDetails model - = BinaryData.fromString("{\"message\":\"c\",\"lastOperationTimestamp\":\"2021-10-29T13:53:51Z\"}") - .toObject(ArcDeploymentProvisioningDetails.class); - Assertions.assertEquals("c", model.message()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T13:53:51Z"), model.lastOperationTimestamp()); + ArcDeploymentProvisioningDetails model = BinaryData + .fromString("{\"message\":\"pziuwfbzkkdtnh\",\"lastOperationTimestamp\":\"2021-09-26T00:23:44Z\"}") + .toObject(ArcDeploymentProvisioningDetails.class); + Assertions.assertEquals("pziuwfbzkkdtnh", model.message()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T00:23:44Z"), model.lastOperationTimestamp()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentResourceRequirementsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentResourceRequirementsTests.java index 4bbac6cc599e..8c888ac73162 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentResourceRequirementsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentResourceRequirementsTests.java @@ -12,20 +12,21 @@ public final class ArcDeploymentResourceRequirementsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentResourceRequirements model - = BinaryData.fromString("{\"cpu\":\"od\",\"memory\":\"vohkxdxuws\",\"gpu\":2006589225}") + = BinaryData.fromString("{\"cpu\":\"etpozycyqiq\",\"memory\":\"gfsetzlexbsfled\",\"gpu\":246722999}") .toObject(ArcDeploymentResourceRequirements.class); - Assertions.assertEquals("od", model.cpu()); - Assertions.assertEquals("vohkxdxuws", model.memory()); - Assertions.assertEquals(2006589225, model.gpu()); + Assertions.assertEquals("etpozycyqiq", model.cpu()); + Assertions.assertEquals("gfsetzlexbsfled", model.memory()); + Assertions.assertEquals(246722999, model.gpu()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcDeploymentResourceRequirements model - = new ArcDeploymentResourceRequirements().withCpu("od").withMemory("vohkxdxuws").withGpu(2006589225); + ArcDeploymentResourceRequirements model = new ArcDeploymentResourceRequirements().withCpu("etpozycyqiq") + .withMemory("gfsetzlexbsfled") + .withGpu(246722999); model = BinaryData.fromObject(model).toObject(ArcDeploymentResourceRequirements.class); - Assertions.assertEquals("od", model.cpu()); - Assertions.assertEquals("vohkxdxuws", model.memory()); - Assertions.assertEquals(2006589225, model.gpu()); + Assertions.assertEquals("etpozycyqiq", model.cpu()); + Assertions.assertEquals("gfsetzlexbsfled", model.memory()); + Assertions.assertEquals(246722999, model.gpu()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentUpdatePropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentUpdatePropertiesTests.java index e064fdf8acfb..cb4cf6e51fb5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentUpdatePropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentUpdatePropertiesTests.java @@ -17,36 +17,32 @@ public final class ArcDeploymentUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentUpdateProperties model = BinaryData.fromString( - "{\"replicas\":1906212019,\"resources\":{\"requests\":{\"cpu\":\"dfkbnrzorpdltbq\",\"memory\":\"qjf\"},\"limits\":{\"cpu\":\"saetgzdgvpyig\",\"memory\":\"qqil\",\"gpu\":15308107}},\"nodeSelector\":{\"xngucaifpaurwwgi\":\"wjoe\",\"cdmkxwxdcvjw\":\"fjqq\",\"cdsiwdfmmpzhzzwv\":\"yziakeciqchxrtu\"}}") + "{\"replicas\":308344292,\"resources\":{\"requests\":{\"cpu\":\"mtggmu\",\"memory\":\"ch\"},\"limits\":{\"cpu\":\"nkf\",\"memory\":\"lv\",\"gpu\":133463775}},\"nodeSelector\":{\"uyxlykwphvxzcw\":\"izvoaiknaqlnuwi\",\"vkcqhr\":\"hmpejtlkexaonw\"}}") .toObject(ArcDeploymentUpdateProperties.class); - Assertions.assertEquals(1906212019, model.replicas()); - Assertions.assertEquals("dfkbnrzorpdltbq", model.resources().requests().cpu()); - Assertions.assertEquals("qjf", model.resources().requests().memory()); - Assertions.assertEquals("saetgzdgvpyig", model.resources().limits().cpu()); - Assertions.assertEquals("qqil", model.resources().limits().memory()); - Assertions.assertEquals(15308107, model.resources().limits().gpu()); - Assertions.assertEquals("wjoe", model.nodeSelector().get("xngucaifpaurwwgi")); + Assertions.assertEquals(308344292, model.replicas()); + Assertions.assertEquals("mtggmu", model.resources().requests().cpu()); + Assertions.assertEquals("ch", model.resources().requests().memory()); + Assertions.assertEquals("nkf", model.resources().limits().cpu()); + Assertions.assertEquals("lv", model.resources().limits().memory()); + Assertions.assertEquals(133463775, model.resources().limits().gpu()); + Assertions.assertEquals("izvoaiknaqlnuwi", model.nodeSelector().get("uyxlykwphvxzcw")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcDeploymentUpdateProperties model = new ArcDeploymentUpdateProperties().withReplicas(1906212019) + ArcDeploymentUpdateProperties model = new ArcDeploymentUpdateProperties().withReplicas(308344292) .withResources(new ArcDeploymentPatchKubernetesResources() - .withRequests( - new ArcDeploymentPatchCpuMemoryResourceRequirements().withCpu("dfkbnrzorpdltbq").withMemory("qjf")) - .withLimits(new ArcDeploymentResourceRequirements().withCpu("saetgzdgvpyig") - .withMemory("qqil") - .withGpu(15308107))) - .withNodeSelector( - mapOf("xngucaifpaurwwgi", "wjoe", "cdmkxwxdcvjw", "fjqq", "cdsiwdfmmpzhzzwv", "yziakeciqchxrtu")); + .withRequests(new ArcDeploymentPatchCpuMemoryResourceRequirements().withCpu("mtggmu").withMemory("ch")) + .withLimits(new ArcDeploymentResourceRequirements().withCpu("nkf").withMemory("lv").withGpu(133463775))) + .withNodeSelector(mapOf("uyxlykwphvxzcw", "izvoaiknaqlnuwi", "vkcqhr", "hmpejtlkexaonw")); model = BinaryData.fromObject(model).toObject(ArcDeploymentUpdateProperties.class); - Assertions.assertEquals(1906212019, model.replicas()); - Assertions.assertEquals("dfkbnrzorpdltbq", model.resources().requests().cpu()); - Assertions.assertEquals("qjf", model.resources().requests().memory()); - Assertions.assertEquals("saetgzdgvpyig", model.resources().limits().cpu()); - Assertions.assertEquals("qqil", model.resources().limits().memory()); - Assertions.assertEquals(15308107, model.resources().limits().gpu()); - Assertions.assertEquals("wjoe", model.nodeSelector().get("xngucaifpaurwwgi")); + Assertions.assertEquals(308344292, model.replicas()); + Assertions.assertEquals("mtggmu", model.resources().requests().cpu()); + Assertions.assertEquals("ch", model.resources().requests().memory()); + Assertions.assertEquals("nkf", model.resources().limits().cpu()); + Assertions.assertEquals("lv", model.resources().limits().memory()); + Assertions.assertEquals(133463775, model.resources().limits().gpu()); + Assertions.assertEquals("izvoaiknaqlnuwi", model.nodeSelector().get("uyxlykwphvxzcw")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentUpdateTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentUpdateTests.java index c27abf6dd81d..1609e98dc570 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentUpdateTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentUpdateTests.java @@ -18,35 +18,35 @@ public final class ArcDeploymentUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentUpdate model = BinaryData.fromString( - "{\"properties\":{\"replicas\":17245047,\"resources\":{\"requests\":{\"cpu\":\"cvk\",\"memory\":\"knjolgjyyxpve\"},\"limits\":{\"cpu\":\"erqzevxo\",\"memory\":\"intxwa\",\"gpu\":55008091}},\"nodeSelector\":{\"lqwa\":\"o\",\"afjrqpjiyrqjcrg\":\"frqulhmzyqbhd\"}}}") + "{\"properties\":{\"replicas\":149068707,\"resources\":{\"requests\":{\"cpu\":\"kpbafvafhl\",\"memory\":\"lc\"},\"limits\":{\"cpu\":\"vxrh\",\"memory\":\"d\",\"gpu\":1616798113}},\"nodeSelector\":{\"bmairrhvhfnracwn\":\"fplt\",\"grbjbxsjybvitvqk\":\"qigtuujwouhdaws\"}}}") .toObject(ArcDeploymentUpdate.class); - Assertions.assertEquals(17245047, model.properties().replicas()); - Assertions.assertEquals("cvk", model.properties().resources().requests().cpu()); - Assertions.assertEquals("knjolgjyyxpve", model.properties().resources().requests().memory()); - Assertions.assertEquals("erqzevxo", model.properties().resources().limits().cpu()); - Assertions.assertEquals("intxwa", model.properties().resources().limits().memory()); - Assertions.assertEquals(55008091, model.properties().resources().limits().gpu()); - Assertions.assertEquals("o", model.properties().nodeSelector().get("lqwa")); + Assertions.assertEquals(149068707, model.properties().replicas()); + Assertions.assertEquals("kpbafvafhl", model.properties().resources().requests().cpu()); + Assertions.assertEquals("lc", model.properties().resources().requests().memory()); + Assertions.assertEquals("vxrh", model.properties().resources().limits().cpu()); + Assertions.assertEquals("d", model.properties().resources().limits().memory()); + Assertions.assertEquals(1616798113, model.properties().resources().limits().gpu()); + Assertions.assertEquals("fplt", model.properties().nodeSelector().get("bmairrhvhfnracwn")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArcDeploymentUpdate model = new ArcDeploymentUpdate().withProperties(new ArcDeploymentUpdateProperties() - .withReplicas(17245047) - .withResources(new ArcDeploymentPatchKubernetesResources() - .withRequests( - new ArcDeploymentPatchCpuMemoryResourceRequirements().withCpu("cvk").withMemory("knjolgjyyxpve")) - .withLimits( - new ArcDeploymentResourceRequirements().withCpu("erqzevxo").withMemory("intxwa").withGpu(55008091))) - .withNodeSelector(mapOf("lqwa", "o", "afjrqpjiyrqjcrg", "frqulhmzyqbhd"))); + ArcDeploymentUpdate model + = new ArcDeploymentUpdate().withProperties(new ArcDeploymentUpdateProperties().withReplicas(149068707) + .withResources(new ArcDeploymentPatchKubernetesResources() + .withRequests( + new ArcDeploymentPatchCpuMemoryResourceRequirements().withCpu("kpbafvafhl").withMemory("lc")) + .withLimits( + new ArcDeploymentResourceRequirements().withCpu("vxrh").withMemory("d").withGpu(1616798113))) + .withNodeSelector(mapOf("bmairrhvhfnracwn", "fplt", "grbjbxsjybvitvqk", "qigtuujwouhdaws"))); model = BinaryData.fromObject(model).toObject(ArcDeploymentUpdate.class); - Assertions.assertEquals(17245047, model.properties().replicas()); - Assertions.assertEquals("cvk", model.properties().resources().requests().cpu()); - Assertions.assertEquals("knjolgjyyxpve", model.properties().resources().requests().memory()); - Assertions.assertEquals("erqzevxo", model.properties().resources().limits().cpu()); - Assertions.assertEquals("intxwa", model.properties().resources().limits().memory()); - Assertions.assertEquals(55008091, model.properties().resources().limits().gpu()); - Assertions.assertEquals("o", model.properties().nodeSelector().get("lqwa")); + Assertions.assertEquals(149068707, model.properties().replicas()); + Assertions.assertEquals("kpbafvafhl", model.properties().resources().requests().cpu()); + Assertions.assertEquals("lc", model.properties().resources().requests().memory()); + Assertions.assertEquals("vxrh", model.properties().resources().limits().cpu()); + Assertions.assertEquals("d", model.properties().resources().limits().memory()); + Assertions.assertEquals(1616798113, model.properties().resources().limits().gpu()); + Assertions.assertEquals("fplt", model.properties().nodeSelector().get("bmairrhvhfnracwn")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentVllmParametersTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentVllmParametersTests.java index 99f8733fa45a..03a5b230fa83 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentVllmParametersTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentVllmParametersTests.java @@ -12,11 +12,11 @@ public final class ArcDeploymentVllmParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArcDeploymentVllmParameters model = BinaryData.fromString( - "{\"tensorParallelSize\":2101549304,\"maxModelLen\":1540955255,\"gpuMemoryUtilization\":75.94109,\"enforceEager\":false}") + "{\"tensorParallelSize\":1229023980,\"maxModelLen\":1191862536,\"gpuMemoryUtilization\":90.277695,\"enforceEager\":true}") .toObject(ArcDeploymentVllmParameters.class); - Assertions.assertEquals(2101549304, model.tensorParallelSize()); - Assertions.assertEquals(1540955255, model.maxModelLen()); - Assertions.assertEquals(75.94109F, model.gpuMemoryUtilization()); - Assertions.assertFalse(model.enforceEager()); + Assertions.assertEquals(1229023980, model.tensorParallelSize()); + Assertions.assertEquals(1191862536, model.maxModelLen()); + Assertions.assertEquals(90.277695F, model.gpuMemoryUtilization()); + Assertions.assertTrue(model.enforceEager()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsCreateOrUpdateMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsCreateOrUpdateMockTests.java index e511136e9d07..70b43fd07d9a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsCreateOrUpdateMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsCreateOrUpdateMockTests.java @@ -33,7 +33,7 @@ public final class ArcDeploymentsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"model\":{\"format\":\"zsggd\",\"name\":\"ftfcbrtsrdplqdy\"},\"extensionId\":\"aciasfzrgu\",\"runtime\":\"vllm\",\"compute\":\"gpu\",\"deploymentTemplate\":\"vsbfs\",\"vllmParameters\":{\"tensorParallelSize\":930052467,\"maxModelLen\":849485811,\"gpuMemoryUtilization\":44.925488,\"enforceEager\":true},\"replicas\":362407467,\"resources\":{\"requests\":{\"cpu\":\"otudamkiyaosthul\",\"memory\":\"u\"},\"limits\":{\"cpu\":\"gspxldlnoc\",\"memory\":\"ygimiz\",\"gpu\":2047629132}},\"nodeSelector\":{\"ksr\":\"wm\",\"yjskdiylg\":\"mspppoeszthjt\",\"sybqowgvmxwbo\":\"zuqix\"},\"deploymentState\":\"Paused\",\"raiPolicyName\":\"koe\",\"provisioningState\":\"Succeeded\",\"provisioningDetails\":{\"message\":\"nakaj\",\"lastOperationTimestamp\":\"2021-01-28T23:58:18Z\"},\"inferenceEndpoint\":\"ne\",\"capabilities\":{\"zyyhmgqaeivjqutx\":\"umqeu\",\"xvcbicfecthotbk\":\"bgbzgfhzdzahk\",\"pxjvtwk\":\"whz\",\"pqiwuzr\":\"jdpayx\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"tjfkgbtqqjobsy\",\"id\":\"en\",\"name\":\"onjqhdheosx\",\"type\":\"wfudmpf\"}"; + = "{\"properties\":{\"model\":{\"format\":\"avv\",\"name\":\"vxwve\"},\"extensionId\":\"enlrjcsmwevgu\",\"runtime\":\"onnx-genai\",\"compute\":\"gpu\",\"deploymentTemplate\":\"xelrjk\",\"vllmParameters\":{\"tensorParallelSize\":2118676021,\"maxModelLen\":1981453249,\"gpuMemoryUtilization\":70.24505,\"enforceEager\":false},\"replicas\":1599065009,\"resources\":{\"requests\":{\"cpu\":\"yfkd\",\"memory\":\"lbwqlq\"},\"limits\":{\"cpu\":\"fqbir\",\"memory\":\"bcel\",\"gpu\":80272315}},\"nodeSelector\":{\"kdv\":\"dnjyhzfax\",\"modpe\":\"el\",\"qoxzyhlbeqvhskb\":\"qxsorchaz\",\"gf\":\"pwxslaj\"},\"deploymentState\":\"Running\",\"raiPolicyName\":\"fha\",\"provisioningState\":\"Succeeded\",\"provisioningDetails\":{\"message\":\"uydwiurnicu\",\"lastOperationTimestamp\":\"2021-05-24T22:24:07Z\"},\"inferenceEndpoint\":\"tqmiuvjplosebm\",\"capabilities\":{\"qobfixngxebihe\":\"uqmtxynof\",\"pgup\":\"hnkingiqcdol\",\"ykcnhpplzhc\":\"jlbsmndafbncuyj\",\"rlnewnuwkkfzzetl\":\"zxjziuu\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"yxzlv\",\"id\":\"wjvrlgqpwwlzpd\",\"name\":\"arcbcdwhslxebaja\",\"type\":\"knmstbdoprwkamp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -43,41 +43,40 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcDeployment response = manager.arcDeployments() - .define("eylfi") - .withExistingAccount("iecup", "wxdsokrlnr") + .define("cfferznzc") + .withExistingAccount("kiy", "qbjsdjpgxeysgw") .withProperties(new ArcDeploymentProperties() - .withModel(new ArcDeploymentModel().withFormat("ulddgiqlnhcxwww").withName("unknsgvxhxrmeatr")) - .withExtensionId("c") + .withModel(new ArcDeploymentModel().withFormat("ivoveomkhfeqcoop").withName("fpohimgckycjpeeb")) + .withExtensionId("nbz") .withRuntime(ArcDeploymentRuntime.ONNX) .withCompute(ArcDeploymentComputeType.GPU) - .withDeploymentTemplate("vifb") - .withReplicas(1797715969) + .withDeploymentTemplate("loutnp") + .withReplicas(1653260262) .withResources(new ArcDeploymentKubernetesResources() - .withRequests( - new ArcDeploymentCpuMemoryResourceRequirements().withCpu("coufk").withMemory("mbhukdfpknvk")) + .withRequests(new ArcDeploymentCpuMemoryResourceRequirements().withCpu("dmwk").withMemory("upf")) .withLimits( - new ArcDeploymentResourceRequirements().withCpu("zje").withMemory("hmeo").withGpu(1765045998))) - .withNodeSelector(mapOf("kkfxm", "rkn", "qphfvsftsstw", "qeqk", "cachdtezgfctu", "p")) + new ArcDeploymentResourceRequirements().withCpu("d").withMemory("zaui").withGpu(1086143371))) + .withNodeSelector(mapOf("cikswhcamwu", "dyzdsy")) .withDeploymentState(DeploymentState.PAUSED) - .withRaiPolicyName("qrzvuxnx")) + .withRaiPolicyName("kcgsfcmvh")) .withSku(new ArcDeploymentSku().withName(ArcDeploymentSkuName.ARC)) .create(); - Assertions.assertEquals("zsggd", response.properties().model().format()); - Assertions.assertEquals("ftfcbrtsrdplqdy", response.properties().model().name()); - Assertions.assertEquals("aciasfzrgu", response.properties().extensionId()); - Assertions.assertEquals(ArcDeploymentRuntime.VLLM, response.properties().runtime()); + Assertions.assertEquals("avv", response.properties().model().format()); + Assertions.assertEquals("vxwve", response.properties().model().name()); + Assertions.assertEquals("enlrjcsmwevgu", response.properties().extensionId()); + Assertions.assertEquals(ArcDeploymentRuntime.ONNX, response.properties().runtime()); Assertions.assertEquals(ArcDeploymentComputeType.GPU, response.properties().compute()); - Assertions.assertEquals("vsbfs", response.properties().deploymentTemplate()); - Assertions.assertEquals(362407467, response.properties().replicas()); - Assertions.assertEquals("otudamkiyaosthul", response.properties().resources().requests().cpu()); - Assertions.assertEquals("u", response.properties().resources().requests().memory()); - Assertions.assertEquals("gspxldlnoc", response.properties().resources().limits().cpu()); - Assertions.assertEquals("ygimiz", response.properties().resources().limits().memory()); - Assertions.assertEquals(2047629132, response.properties().resources().limits().gpu()); - Assertions.assertEquals("wm", response.properties().nodeSelector().get("ksr")); - Assertions.assertEquals(DeploymentState.PAUSED, response.properties().deploymentState()); - Assertions.assertEquals("koe", response.properties().raiPolicyName()); + Assertions.assertEquals("xelrjk", response.properties().deploymentTemplate()); + Assertions.assertEquals(1599065009, response.properties().replicas()); + Assertions.assertEquals("yfkd", response.properties().resources().requests().cpu()); + Assertions.assertEquals("lbwqlq", response.properties().resources().requests().memory()); + Assertions.assertEquals("fqbir", response.properties().resources().limits().cpu()); + Assertions.assertEquals("bcel", response.properties().resources().limits().memory()); + Assertions.assertEquals(80272315, response.properties().resources().limits().gpu()); + Assertions.assertEquals("dnjyhzfax", response.properties().nodeSelector().get("kdv")); + Assertions.assertEquals(DeploymentState.RUNNING, response.properties().deploymentState()); + Assertions.assertEquals("fha", response.properties().raiPolicyName()); Assertions.assertEquals(ArcDeploymentSkuName.ARC, response.sku().name()); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsGetWithResponseMockTests.java index f9797f7835f3..fdc01521ea62 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsGetWithResponseMockTests.java @@ -25,7 +25,7 @@ public final class ArcDeploymentsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"model\":{\"format\":\"xlawmvdyqab\",\"name\":\"ropxfqd\"},\"extensionId\":\"llznyjyuwqlzw\",\"runtime\":\"onnx-genai\",\"compute\":\"cpu\",\"deploymentTemplate\":\"h\",\"vllmParameters\":{\"tensorParallelSize\":1167647739,\"maxModelLen\":2110606835,\"gpuMemoryUtilization\":15.328026,\"enforceEager\":false},\"replicas\":1341264663,\"resources\":{\"requests\":{\"cpu\":\"doxdegacdedpkw\",\"memory\":\"to\"},\"limits\":{\"cpu\":\"dcidpdaq\",\"memory\":\"mn\",\"gpu\":2078665010}},\"nodeSelector\":{\"ure\":\"qqclsaqifep\",\"fpxeswctlfytb\":\"vivkiglioklsu\"},\"deploymentState\":\"Paused\",\"raiPolicyName\":\"vnpbgcesfddfclmo\",\"provisioningState\":\"Succeeded\",\"provisioningDetails\":{\"message\":\"ofkbcjzzww\",\"lastOperationTimestamp\":\"2021-10-19T04:29:40Z\"},\"inferenceEndpoint\":\"btd\",\"capabilities\":{\"yoxmyqzyqepg\":\"ixccnkfsog\",\"luokc\":\"bzd\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"xdddpwmgwxwu\",\"id\":\"jvqglaxse\",\"name\":\"svvvgyphheovej\",\"type\":\"palec\"}"; + = "{\"properties\":{\"model\":{\"format\":\"swxvjelei\",\"name\":\"qhdxtwwulkryb\"},\"extensionId\":\"aevyk\",\"runtime\":\"onnx-genai\",\"compute\":\"gpu\",\"deploymentTemplate\":\"crqkwakkc\",\"vllmParameters\":{\"tensorParallelSize\":1885531635,\"maxModelLen\":296640333,\"gpuMemoryUtilization\":2.098912,\"enforceEager\":false},\"replicas\":1622415709,\"resources\":{\"requests\":{\"cpu\":\"ibsdqbdyblpe\",\"memory\":\"t\"},\"limits\":{\"cpu\":\"pgweoqhbjqlqf\",\"memory\":\"erufollcshjuc\",\"gpu\":467385506}},\"nodeSelector\":{\"jeazrahelhbimyii\":\"jjvtpnerx\",\"osizk\":\"qamcthtpqgfz\",\"xofgrutvnpccxz\":\"iuvflgzhcwjgwahc\",\"mhzghhhkvnnjdtu\":\"vx\"},\"deploymentState\":\"Running\",\"raiPolicyName\":\"hnjvpmxnhtmzstql\",\"provisioningState\":\"Failed\",\"provisioningDetails\":{\"message\":\"wvtlgxy\",\"lastOperationTimestamp\":\"2021-10-19T13:07:53Z\"},\"inferenceEndpoint\":\"equ\",\"capabilities\":{\"ubotbvufrkw\":\"yyopoaytwwgw\",\"owewjskr\":\"iemimdtn\",\"p\":\"eedddrftfquu\",\"igeeuwbr\":\"lhs\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"xfedqnetdqw\",\"id\":\"xoqgvbzpggpw\",\"name\":\"eyobqaj\",\"type\":\"jirvavrvkgpo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,24 +35,24 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ArcDeployment response = manager.arcDeployments() - .getWithResponse("mfakeqn", "tromlcsvk", "fpsrowshvfxj", com.azure.core.util.Context.NONE) + .getWithResponse("vyvuoikdlpsx", "tug", "wimqnryclocfm", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xlawmvdyqab", response.properties().model().format()); - Assertions.assertEquals("ropxfqd", response.properties().model().name()); - Assertions.assertEquals("llznyjyuwqlzw", response.properties().extensionId()); + Assertions.assertEquals("swxvjelei", response.properties().model().format()); + Assertions.assertEquals("qhdxtwwulkryb", response.properties().model().name()); + Assertions.assertEquals("aevyk", response.properties().extensionId()); Assertions.assertEquals(ArcDeploymentRuntime.ONNX, response.properties().runtime()); - Assertions.assertEquals(ArcDeploymentComputeType.CPU, response.properties().compute()); - Assertions.assertEquals("h", response.properties().deploymentTemplate()); - Assertions.assertEquals(1341264663, response.properties().replicas()); - Assertions.assertEquals("doxdegacdedpkw", response.properties().resources().requests().cpu()); - Assertions.assertEquals("to", response.properties().resources().requests().memory()); - Assertions.assertEquals("dcidpdaq", response.properties().resources().limits().cpu()); - Assertions.assertEquals("mn", response.properties().resources().limits().memory()); - Assertions.assertEquals(2078665010, response.properties().resources().limits().gpu()); - Assertions.assertEquals("qqclsaqifep", response.properties().nodeSelector().get("ure")); - Assertions.assertEquals(DeploymentState.PAUSED, response.properties().deploymentState()); - Assertions.assertEquals("vnpbgcesfddfclmo", response.properties().raiPolicyName()); + Assertions.assertEquals(ArcDeploymentComputeType.GPU, response.properties().compute()); + Assertions.assertEquals("crqkwakkc", response.properties().deploymentTemplate()); + Assertions.assertEquals(1622415709, response.properties().replicas()); + Assertions.assertEquals("ibsdqbdyblpe", response.properties().resources().requests().cpu()); + Assertions.assertEquals("t", response.properties().resources().requests().memory()); + Assertions.assertEquals("pgweoqhbjqlqf", response.properties().resources().limits().cpu()); + Assertions.assertEquals("erufollcshjuc", response.properties().resources().limits().memory()); + Assertions.assertEquals(467385506, response.properties().resources().limits().gpu()); + Assertions.assertEquals("jjvtpnerx", response.properties().nodeSelector().get("jeazrahelhbimyii")); + Assertions.assertEquals(DeploymentState.RUNNING, response.properties().deploymentState()); + Assertions.assertEquals("hnjvpmxnhtmzstql", response.properties().raiPolicyName()); Assertions.assertEquals(ArcDeploymentSkuName.ARC, response.sku().name()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsListMockTests.java index 5a260465d515..51d62185d1e1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ArcDeploymentsListMockTests.java @@ -26,7 +26,7 @@ public final class ArcDeploymentsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"model\":{\"format\":\"fssrgrq\",\"name\":\"fnquollouurmuz\"},\"extensionId\":\"mbqqiehdhj\",\"runtime\":\"vllm\",\"compute\":\"cpu\",\"deploymentTemplate\":\"wnaxoxl\",\"vllmParameters\":{\"tensorParallelSize\":529599534,\"maxModelLen\":1581296532,\"gpuMemoryUtilization\":1.3326705,\"enforceEager\":false},\"replicas\":780928397,\"resources\":{\"requests\":{\"cpu\":\"vpaglyyh\",\"memory\":\"g\"},\"limits\":{\"cpu\":\"spmlutyj\",\"memory\":\"kedputocrb\",\"gpu\":1545684337}},\"nodeSelector\":{\"hgcmljzksqi\":\"mdrgcuzjmvkrwrjc\",\"hcaqpv\":\"ybqjvfio\",\"dswbsskgq\":\"szopeuku\",\"fsjbpwjwz\":\"emosq\"},\"deploymentState\":\"Running\",\"raiPolicyName\":\"dzymzkhxfpzcuud\",\"provisioningState\":\"Failed\",\"provisioningDetails\":{\"message\":\"j\",\"lastOperationTimestamp\":\"2021-03-16T23:40:13Z\"},\"inferenceEndpoint\":\"ibweua\",\"capabilities\":{\"coqxtvytzqlyldj\":\"xlz\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"xyrazz\",\"id\":\"jv\",\"name\":\"szbdbrlbozltyol\",\"type\":\"cbibtk\"}]}"; + = "{\"value\":[{\"properties\":{\"model\":{\"format\":\"epqmjmoplukfykk\",\"name\":\"hsovadkrmj\"},\"extensionId\":\"mwqpdkesjqbzkqm\",\"runtime\":\"onnx-genai\",\"compute\":\"cpu\",\"deploymentTemplate\":\"riwbwggij\",\"vllmParameters\":{\"tensorParallelSize\":654093679,\"maxModelLen\":665702563,\"gpuMemoryUtilization\":81.03699,\"enforceEager\":true},\"replicas\":1255377388,\"resources\":{\"requests\":{\"cpu\":\"sbzrhdugquhtrgzf\",\"memory\":\"unjf\"},\"limits\":{\"cpu\":\"hiycbause\",\"memory\":\"czkvihvtuw\",\"gpu\":1287551818}},\"nodeSelector\":{\"wwunqhc\":\"zszoszjgzunkfnys\",\"slhip\":\"avoj\",\"vchyluqalpcufj\":\"ukvbljpxpr\",\"tiztqds\":\"f\"},\"deploymentState\":\"Running\",\"raiPolicyName\":\"hs\",\"provisioningState\":\"Canceled\",\"provisioningDetails\":{\"message\":\"ritrcwb\",\"lastOperationTimestamp\":\"2020-12-25T06:15:34Z\"},\"inferenceEndpoint\":\"yyefmxwoqotiiqb\",\"capabilities\":{\"mtistyikjh\":\"srv\",\"pypkennycntrq\":\"rlx\",\"oxtdyqavfx\":\"xwtdmbqjtsuhqh\"}},\"sku\":{\"name\":\"Arc\"},\"etag\":\"zxsyaks\",\"id\":\"paamihwb\",\"name\":\"hvwt\",\"type\":\"pbgchcgsfzhb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,24 +36,25 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.arcDeployments().list("tlthrt", "pu", com.azure.core.util.Context.NONE); + = manager.arcDeployments().list("plbjuvlnhxnr", "jhinaegesbx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fssrgrq", response.iterator().next().properties().model().format()); - Assertions.assertEquals("fnquollouurmuz", response.iterator().next().properties().model().name()); - Assertions.assertEquals("mbqqiehdhj", response.iterator().next().properties().extensionId()); - Assertions.assertEquals(ArcDeploymentRuntime.VLLM, response.iterator().next().properties().runtime()); + Assertions.assertEquals("epqmjmoplukfykk", response.iterator().next().properties().model().format()); + Assertions.assertEquals("hsovadkrmj", response.iterator().next().properties().model().name()); + Assertions.assertEquals("mwqpdkesjqbzkqm", response.iterator().next().properties().extensionId()); + Assertions.assertEquals(ArcDeploymentRuntime.ONNX, response.iterator().next().properties().runtime()); Assertions.assertEquals(ArcDeploymentComputeType.CPU, response.iterator().next().properties().compute()); - Assertions.assertEquals("wnaxoxl", response.iterator().next().properties().deploymentTemplate()); - Assertions.assertEquals(780928397, response.iterator().next().properties().replicas()); - Assertions.assertEquals("vpaglyyh", response.iterator().next().properties().resources().requests().cpu()); - Assertions.assertEquals("g", response.iterator().next().properties().resources().requests().memory()); - Assertions.assertEquals("spmlutyj", response.iterator().next().properties().resources().limits().cpu()); - Assertions.assertEquals("kedputocrb", response.iterator().next().properties().resources().limits().memory()); - Assertions.assertEquals(1545684337, response.iterator().next().properties().resources().limits().gpu()); - Assertions.assertEquals("mdrgcuzjmvkrwrjc", - response.iterator().next().properties().nodeSelector().get("hgcmljzksqi")); + Assertions.assertEquals("riwbwggij", response.iterator().next().properties().deploymentTemplate()); + Assertions.assertEquals(1255377388, response.iterator().next().properties().replicas()); + Assertions.assertEquals("sbzrhdugquhtrgzf", + response.iterator().next().properties().resources().requests().cpu()); + Assertions.assertEquals("unjf", response.iterator().next().properties().resources().requests().memory()); + Assertions.assertEquals("hiycbause", response.iterator().next().properties().resources().limits().cpu()); + Assertions.assertEquals("czkvihvtuw", response.iterator().next().properties().resources().limits().memory()); + Assertions.assertEquals(1287551818, response.iterator().next().properties().resources().limits().gpu()); + Assertions.assertEquals("zszoszjgzunkfnys", + response.iterator().next().properties().nodeSelector().get("wwunqhc")); Assertions.assertEquals(DeploymentState.RUNNING, response.iterator().next().properties().deploymentState()); - Assertions.assertEquals("dzymzkhxfpzcuud", response.iterator().next().properties().raiPolicyName()); + Assertions.assertEquals("hs", response.iterator().next().properties().raiPolicyName()); Assertions.assertEquals(ArcDeploymentSkuName.ARC, response.iterator().next().sku().name()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AssignedIdentityTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AssignedIdentityTests.java index 858de2f6a72a..ba1ade0e25c0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AssignedIdentityTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/AssignedIdentityTests.java @@ -14,30 +14,30 @@ public final class AssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AssignedIdentity model = BinaryData.fromString( - "{\"kind\":\"None\",\"type\":\"User\",\"clientId\":\"kck\",\"principalId\":\"wymxgaabjk\",\"tenantId\":\"tfohf\",\"subject\":\"gzvkiwrsiwdyj\",\"provisioningState\":\"Canceled\"}") + "{\"kind\":\"AgentInstance\",\"type\":\"System\",\"clientId\":\"xe\",\"principalId\":\"myw\",\"tenantId\":\"ormcqmic\",\"subject\":\"jqpkzfbo\",\"provisioningState\":\"Deleting\"}") .toObject(AssignedIdentity.class); - Assertions.assertEquals(IdentityKind.NONE, model.kind()); - Assertions.assertEquals(IdentityManagementType.USER, model.type()); - Assertions.assertEquals("kck", model.clientId()); - Assertions.assertEquals("wymxgaabjk", model.principalId()); - Assertions.assertEquals("tfohf", model.tenantId()); - Assertions.assertEquals("gzvkiwrsiwdyj", model.subject()); + Assertions.assertEquals(IdentityKind.AGENT_INSTANCE, model.kind()); + Assertions.assertEquals(IdentityManagementType.SYSTEM, model.type()); + Assertions.assertEquals("xe", model.clientId()); + Assertions.assertEquals("myw", model.principalId()); + Assertions.assertEquals("ormcqmic", model.tenantId()); + Assertions.assertEquals("jqpkzfbo", model.subject()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AssignedIdentity model = new AssignedIdentity().withKind(IdentityKind.NONE) - .withType(IdentityManagementType.USER) - .withClientId("kck") - .withPrincipalId("wymxgaabjk") - .withTenantId("tfohf") - .withSubject("gzvkiwrsiwdyj"); + AssignedIdentity model = new AssignedIdentity().withKind(IdentityKind.AGENT_INSTANCE) + .withType(IdentityManagementType.SYSTEM) + .withClientId("xe") + .withPrincipalId("myw") + .withTenantId("ormcqmic") + .withSubject("jqpkzfbo"); model = BinaryData.fromObject(model).toObject(AssignedIdentity.class); - Assertions.assertEquals(IdentityKind.NONE, model.kind()); - Assertions.assertEquals(IdentityManagementType.USER, model.type()); - Assertions.assertEquals("kck", model.clientId()); - Assertions.assertEquals("wymxgaabjk", model.principalId()); - Assertions.assertEquals("tfohf", model.tenantId()); - Assertions.assertEquals("gzvkiwrsiwdyj", model.subject()); + Assertions.assertEquals(IdentityKind.AGENT_INSTANCE, model.kind()); + Assertions.assertEquals(IdentityManagementType.SYSTEM, model.type()); + Assertions.assertEquals("xe", model.clientId()); + Assertions.assertEquals("myw", model.principalId()); + Assertions.assertEquals("ormcqmic", model.tenantId()); + Assertions.assertEquals("jqpkzfbo", model.subject()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/BillingMeterInfoTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/BillingMeterInfoTests.java index 38e9678996a8..0e0d0237e980 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/BillingMeterInfoTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/BillingMeterInfoTests.java @@ -12,10 +12,10 @@ public final class BillingMeterInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BillingMeterInfo model - = BinaryData.fromString("{\"name\":\"clha\",\"meterId\":\"dbabp\",\"unit\":\"wrqlfktsthsuco\"}") + = BinaryData.fromString("{\"name\":\"t\",\"meterId\":\"wwrq\",\"unit\":\"edckzywbiexzfey\"}") .toObject(BillingMeterInfo.class); - Assertions.assertEquals("clha", model.name()); - Assertions.assertEquals("dbabp", model.meterId()); - Assertions.assertEquals("wrqlfktsthsuco", model.unit()); + Assertions.assertEquals("t", model.name()); + Assertions.assertEquals("wwrq", model.meterId()); + Assertions.assertEquals("edckzywbiexzfey", model.unit()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostInnerTests.java index 535831599e86..bd5c5f540266 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostInnerTests.java @@ -17,42 +17,41 @@ public final class CapabilityHostInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityHostInner model = BinaryData.fromString( - "{\"properties\":{\"aiServicesConnections\":[\"erkjddv\",\"gliegftcvbiif\",\"ksdwgdnk\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"wdhcebuvczldb\",\"provisioningState\":\"Creating\",\"storageConnections\":[\"t\",\"aaqgzeka\",\"clyzgs\"],\"threadStorageConnections\":[\"bjgmnzj\",\"t\"],\"vectorStoreConnections\":[\"xkhlobvvjbhv\",\"diqayfl\"],\"enablePublicHostingEnvironment\":false,\"description\":\"osnuudtelv\",\"tags\":{\"qrsw\":\"bd\",\"oxztfwfqch\":\"buubpyrowt\",\"tagfyvrtpqp\":\"czevjnn\",\"yhwqw\":\"mhzcgkrepdqh\"}},\"id\":\"vx\",\"name\":\"abckmzeoxinhgre\",\"type\":\"h\"}") + "{\"properties\":{\"aiServicesConnections\":[\"ksk\",\"i\",\"bs\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"qfukpeexpgeumi\",\"provisioningState\":\"Deleting\",\"storageConnections\":[\"trdexyionofnin\",\"dbzsx\"],\"threadStorageConnections\":[\"qrs\",\"pcbbprtugav\",\"zbcyksiv\",\"fogdrtbfcm\"],\"vectorStoreConnections\":[\"tsjcwjjxs\",\"mb\"],\"enablePublicHostingEnvironment\":true,\"description\":\"fdxkecifhocjxwkl\",\"tags\":{\"xxvir\":\"rvtxvcmufunlc\",\"rquv\":\"eyngjg\"}},\"id\":\"gglpmcrdcuelj\",\"name\":\"iahxmfqryarvs\",\"type\":\"zqbglcjkays\"}") .toObject(CapabilityHostInner.class); - Assertions.assertEquals("osnuudtelv", model.properties().description()); - Assertions.assertEquals("bd", model.properties().tags().get("qrsw")); - Assertions.assertEquals("erkjddv", model.properties().aiServicesConnections().get(0)); + Assertions.assertEquals("fdxkecifhocjxwkl", model.properties().description()); + Assertions.assertEquals("rvtxvcmufunlc", model.properties().tags().get("xxvir")); + Assertions.assertEquals("ksk", model.properties().aiServicesConnections().get(0)); Assertions.assertEquals(CapabilityHostKind.AGENTS, model.properties().capabilityHostKind()); - Assertions.assertEquals("wdhcebuvczldb", model.properties().customerSubnet()); - Assertions.assertEquals("t", model.properties().storageConnections().get(0)); - Assertions.assertEquals("bjgmnzj", model.properties().threadStorageConnections().get(0)); - Assertions.assertEquals("xkhlobvvjbhv", model.properties().vectorStoreConnections().get(0)); - Assertions.assertFalse(model.properties().enablePublicHostingEnvironment()); + Assertions.assertEquals("qfukpeexpgeumi", model.properties().customerSubnet()); + Assertions.assertEquals("trdexyionofnin", model.properties().storageConnections().get(0)); + Assertions.assertEquals("qrs", model.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("tsjcwjjxs", model.properties().vectorStoreConnections().get(0)); + Assertions.assertTrue(model.properties().enablePublicHostingEnvironment()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapabilityHostInner model - = new CapabilityHostInner().withProperties(new CapabilityHostProperties().withDescription("osnuudtelv") - .withTags( - mapOf("qrsw", "bd", "oxztfwfqch", "buubpyrowt", "tagfyvrtpqp", "czevjnn", "yhwqw", "mhzcgkrepdqh")) - .withAiServicesConnections(Arrays.asList("erkjddv", "gliegftcvbiif", "ksdwgdnk")) + CapabilityHostInner model = new CapabilityHostInner() + .withProperties(new CapabilityHostProperties().withDescription("fdxkecifhocjxwkl") + .withTags(mapOf("xxvir", "rvtxvcmufunlc", "rquv", "eyngjg")) + .withAiServicesConnections(Arrays.asList("ksk", "i", "bs")) .withCapabilityHostKind(CapabilityHostKind.AGENTS) - .withCustomerSubnet("wdhcebuvczldb") - .withStorageConnections(Arrays.asList("t", "aaqgzeka", "clyzgs")) - .withThreadStorageConnections(Arrays.asList("bjgmnzj", "t")) - .withVectorStoreConnections(Arrays.asList("xkhlobvvjbhv", "diqayfl")) - .withEnablePublicHostingEnvironment(false)); + .withCustomerSubnet("qfukpeexpgeumi") + .withStorageConnections(Arrays.asList("trdexyionofnin", "dbzsx")) + .withThreadStorageConnections(Arrays.asList("qrs", "pcbbprtugav", "zbcyksiv", "fogdrtbfcm")) + .withVectorStoreConnections(Arrays.asList("tsjcwjjxs", "mb")) + .withEnablePublicHostingEnvironment(true)); model = BinaryData.fromObject(model).toObject(CapabilityHostInner.class); - Assertions.assertEquals("osnuudtelv", model.properties().description()); - Assertions.assertEquals("bd", model.properties().tags().get("qrsw")); - Assertions.assertEquals("erkjddv", model.properties().aiServicesConnections().get(0)); + Assertions.assertEquals("fdxkecifhocjxwkl", model.properties().description()); + Assertions.assertEquals("rvtxvcmufunlc", model.properties().tags().get("xxvir")); + Assertions.assertEquals("ksk", model.properties().aiServicesConnections().get(0)); Assertions.assertEquals(CapabilityHostKind.AGENTS, model.properties().capabilityHostKind()); - Assertions.assertEquals("wdhcebuvczldb", model.properties().customerSubnet()); - Assertions.assertEquals("t", model.properties().storageConnections().get(0)); - Assertions.assertEquals("bjgmnzj", model.properties().threadStorageConnections().get(0)); - Assertions.assertEquals("xkhlobvvjbhv", model.properties().vectorStoreConnections().get(0)); - Assertions.assertFalse(model.properties().enablePublicHostingEnvironment()); + Assertions.assertEquals("qfukpeexpgeumi", model.properties().customerSubnet()); + Assertions.assertEquals("trdexyionofnin", model.properties().storageConnections().get(0)); + Assertions.assertEquals("qrs", model.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("tsjcwjjxs", model.properties().vectorStoreConnections().get(0)); + Assertions.assertTrue(model.properties().enablePublicHostingEnvironment()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostPropertiesTests.java index e9ea42369aa9..32299bfc2571 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostPropertiesTests.java @@ -16,40 +16,40 @@ public final class CapabilityHostPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityHostProperties model = BinaryData.fromString( - "{\"aiServicesConnections\":[\"lpuzjpcee\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"ng\",\"provisioningState\":\"Deleting\",\"storageConnections\":[\"xyxz\",\"bcip\",\"msexroqr\"],\"threadStorageConnections\":[\"txfvonfe\",\"qgpkrie\",\"bgnixxoww\"],\"vectorStoreConnections\":[\"fwnwpiwx\",\"ii\"],\"enablePublicHostingEnvironment\":true,\"description\":\"e\",\"tags\":{\"xxij\":\"dm\",\"yacwrasekwefc\":\"skwsdgkj\",\"nwoqartwy\":\"o\",\"tdavuqmcbymsfobj\":\"qicladv\"}}") + "{\"aiServicesConnections\":[\"zodubtlm\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"lioskkfmkmfdjx\",\"provisioningState\":\"Creating\",\"storageConnections\":[\"kqvjcteoedlr\",\"lskkzpxvj\",\"zdpv\"],\"threadStorageConnections\":[\"jhpcn\",\"bxzfs\",\"ggytexvzilmhivz\",\"wwwncknr\"],\"vectorStoreConnections\":[\"jlskzptjxulweu\",\"yrth\",\"qlehmcgcjeinu\"],\"enablePublicHostingEnvironment\":false,\"description\":\"am\",\"tags\":{\"bqd\":\"jvqntt\",\"ysthhza\":\"bzfivfok\"}}") .toObject(CapabilityHostProperties.class); - Assertions.assertEquals("e", model.description()); - Assertions.assertEquals("dm", model.tags().get("xxij")); - Assertions.assertEquals("lpuzjpcee", model.aiServicesConnections().get(0)); + Assertions.assertEquals("am", model.description()); + Assertions.assertEquals("jvqntt", model.tags().get("bqd")); + Assertions.assertEquals("zodubtlm", model.aiServicesConnections().get(0)); Assertions.assertEquals(CapabilityHostKind.AGENTS, model.capabilityHostKind()); - Assertions.assertEquals("ng", model.customerSubnet()); - Assertions.assertEquals("xyxz", model.storageConnections().get(0)); - Assertions.assertEquals("txfvonfe", model.threadStorageConnections().get(0)); - Assertions.assertEquals("fwnwpiwx", model.vectorStoreConnections().get(0)); - Assertions.assertTrue(model.enablePublicHostingEnvironment()); + Assertions.assertEquals("lioskkfmkmfdjx", model.customerSubnet()); + Assertions.assertEquals("kqvjcteoedlr", model.storageConnections().get(0)); + Assertions.assertEquals("jhpcn", model.threadStorageConnections().get(0)); + Assertions.assertEquals("jlskzptjxulweu", model.vectorStoreConnections().get(0)); + Assertions.assertFalse(model.enablePublicHostingEnvironment()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapabilityHostProperties model = new CapabilityHostProperties().withDescription("e") - .withTags(mapOf("xxij", "dm", "yacwrasekwefc", "skwsdgkj", "nwoqartwy", "o", "tdavuqmcbymsfobj", "qicladv")) - .withAiServicesConnections(Arrays.asList("lpuzjpcee")) + CapabilityHostProperties model = new CapabilityHostProperties().withDescription("am") + .withTags(mapOf("bqd", "jvqntt", "ysthhza", "bzfivfok")) + .withAiServicesConnections(Arrays.asList("zodubtlm")) .withCapabilityHostKind(CapabilityHostKind.AGENTS) - .withCustomerSubnet("ng") - .withStorageConnections(Arrays.asList("xyxz", "bcip", "msexroqr")) - .withThreadStorageConnections(Arrays.asList("txfvonfe", "qgpkrie", "bgnixxoww")) - .withVectorStoreConnections(Arrays.asList("fwnwpiwx", "ii")) - .withEnablePublicHostingEnvironment(true); + .withCustomerSubnet("lioskkfmkmfdjx") + .withStorageConnections(Arrays.asList("kqvjcteoedlr", "lskkzpxvj", "zdpv")) + .withThreadStorageConnections(Arrays.asList("jhpcn", "bxzfs", "ggytexvzilmhivz", "wwwncknr")) + .withVectorStoreConnections(Arrays.asList("jlskzptjxulweu", "yrth", "qlehmcgcjeinu")) + .withEnablePublicHostingEnvironment(false); model = BinaryData.fromObject(model).toObject(CapabilityHostProperties.class); - Assertions.assertEquals("e", model.description()); - Assertions.assertEquals("dm", model.tags().get("xxij")); - Assertions.assertEquals("lpuzjpcee", model.aiServicesConnections().get(0)); + Assertions.assertEquals("am", model.description()); + Assertions.assertEquals("jvqntt", model.tags().get("bqd")); + Assertions.assertEquals("zodubtlm", model.aiServicesConnections().get(0)); Assertions.assertEquals(CapabilityHostKind.AGENTS, model.capabilityHostKind()); - Assertions.assertEquals("ng", model.customerSubnet()); - Assertions.assertEquals("xyxz", model.storageConnections().get(0)); - Assertions.assertEquals("txfvonfe", model.threadStorageConnections().get(0)); - Assertions.assertEquals("fwnwpiwx", model.vectorStoreConnections().get(0)); - Assertions.assertTrue(model.enablePublicHostingEnvironment()); + Assertions.assertEquals("lioskkfmkmfdjx", model.customerSubnet()); + Assertions.assertEquals("kqvjcteoedlr", model.storageConnections().get(0)); + Assertions.assertEquals("jhpcn", model.threadStorageConnections().get(0)); + Assertions.assertEquals("jlskzptjxulweu", model.vectorStoreConnections().get(0)); + Assertions.assertFalse(model.enablePublicHostingEnvironment()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostResourceArmPaginatedResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostResourceArmPaginatedResultTests.java index 18f58f3fc92d..a232666679c3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostResourceArmPaginatedResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapabilityHostResourceArmPaginatedResultTests.java @@ -13,17 +13,17 @@ public final class CapabilityHostResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityHostResourceArmPaginatedResult model = BinaryData.fromString( - "{\"nextLink\":\"uvjezcjumvps\",\"value\":[{\"properties\":{\"aiServicesConnections\":[\"oiglk\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"nnraclibbfqpspkl\",\"provisioningState\":\"Deleting\",\"storageConnections\":[\"nhautwukexzgpmnm\",\"be\",\"dqilwgdfpf\",\"fpcvstclgqrvwerf\"],\"threadStorageConnections\":[\"smtbljjehhcif\",\"wdv\",\"tbrekqhsqhtf\"],\"vectorStoreConnections\":[\"qbyeju\",\"yqwdqi\"],\"enablePublicHostingEnvironment\":false,\"description\":\"ginz\",\"tags\":{\"qtwmlmhjnqtqeahj\":\"ujkhnjcmrnkfmkh\",\"vgua\":\"dvragpokddxejhh\"}},\"id\":\"ptbkewk\",\"name\":\"yn\",\"type\":\"pgb\"},{\"properties\":{\"aiServicesConnections\":[\"fbkkwvdxaexq\",\"kmyrljialzbnobr\",\"lpbcjtrpz\",\"yudivbxnhsqeaeo\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"wgdhu\",\"provisioningState\":\"Updating\",\"storageConnections\":[\"za\",\"ogatmoljiy\",\"mpinmzvfkneerzzt\",\"knsjulugd\"],\"threadStorageConnections\":[\"h\",\"xlelfjh\"],\"vectorStoreConnections\":[\"z\",\"pihtdmiwjekpt\",\"caydbjzcqymlcfnz\"],\"enablePublicHostingEnvironment\":false,\"description\":\"urlgwqkpmmzps\",\"tags\":{\"vvjhvvlrlohewjj\":\"olawiubmoms\"}},\"id\":\"jnkdflqion\",\"name\":\"waeqkzfzqxjosho\",\"type\":\"totryegpkhxrme\"},{\"properties\":{\"aiServicesConnections\":[\"lwkbfok\",\"khup\",\"erufgjblcdrmy\",\"cemftzgyykyalu\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"fqnh\",\"provisioningState\":\"Failed\",\"storageConnections\":[\"wrczfjjnnuxxrk\",\"mhmnulwemp\",\"cifrhjulrsulwzpf\",\"usnaw\"],\"threadStorageConnections\":[\"gzotfriyrgkoekvz\"],\"vectorStoreConnections\":[\"yxhighc\",\"xb\",\"molpcqyde\",\"kvskiczdfrjei\"],\"enablePublicHostingEnvironment\":false,\"description\":\"qaboohxbms\",\"tags\":{\"qaeo\":\"qsxrmdvewu\",\"hhdau\":\"pjhgejkb\",\"exbkhx\":\"ghoox\"}},\"id\":\"joezlqxrkdknkobe\",\"name\":\"tmbozomtzamicbig\",\"type\":\"cdgzseznux\"}]}") + "{\"nextLink\":\"fwy\",\"value\":[{\"properties\":{\"aiServicesConnections\":[\"enuzejg\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"baqszllrzlsmmd\",\"provisioningState\":\"Succeeded\",\"storageConnections\":[\"zpimcqrhn\",\"t\"],\"threadStorageConnections\":[\"klogx\",\"vtza\",\"hzvqnsqktcmbjwz\",\"oslpky\"],\"vectorStoreConnections\":[\"lwkzpgajsqjcem\",\"bmfuvqarwzxu\",\"rebluimmbwxsf\"],\"enablePublicHostingEnvironment\":true,\"description\":\"b\",\"tags\":{\"budbt\":\"kraokq\",\"ke\":\"aokbavlyttaaknwf\",\"p\":\"sm\",\"gatolekscbctnan\":\"ujd\"}},\"id\":\"mwbzxpdc\",\"name\":\"dpkawnsnl\",\"type\":\"imouxwksqmudmfco\"},{\"properties\":{\"aiServicesConnections\":[\"cziu\",\"wswjrkbqsjh\",\"tqqvy\",\"scyrfwbivqv\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"yzwvbhlimbyqec\",\"provisioningState\":\"Succeeded\",\"storageConnections\":[\"ikcdrdaasax\",\"obsmf\"],\"threadStorageConnections\":[\"yjvzukosr\",\"awn\"],\"vectorStoreConnections\":[\"lnk\",\"ywsxvjabjqqaxu\",\"vym\"],\"enablePublicHostingEnvironment\":true,\"description\":\"ndoabhjxwxqweuip\",\"tags\":{\"lkrdpqgfhy\":\"ksmitnsqxtlt\"}},\"id\":\"rakkld\",\"name\":\"rcwfcmfcnrjajq\",\"type\":\"atxjtiel\"},{\"properties\":{\"aiServicesConnections\":[\"gxxgfb\",\"mtlpqagyno\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"zcalincryq\",\"provisioningState\":\"Creating\",\"storageConnections\":[\"zi\"],\"threadStorageConnections\":[\"imiymqruqgu\",\"fupetasvv\"],\"vectorStoreConnections\":[\"bpkflanfkgxs\",\"aowuzo\"],\"enablePublicHostingEnvironment\":true,\"description\":\"hdkcprgu\",\"tags\":{\"mqrud\":\"ztiochluti\",\"mfbcpaqktkrum\":\"izcbfzmcrunfhiuc\",\"dkyzbfvxov\":\"u\",\"hyhlwcjsqg\":\"kxiuxqggvqr\"}},\"id\":\"hffbxrq\",\"name\":\"kijpeuqlsdxeqztv\",\"type\":\"wmwwmjswen\"},{\"properties\":{\"aiServicesConnections\":[\"amecle\",\"ioulndhzyoe\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"ollhsvidmyt\",\"provisioningState\":\"Failed\",\"storageConnections\":[\"xpno\",\"yoan\",\"bcswqagyw\"],\"threadStorageConnections\":[\"igvjrktp\",\"aeukyawohpm\",\"hqnucs\",\"lhsidsjtdl\"],\"vectorStoreConnections\":[\"injgazlsvbzfcpuo\",\"e\",\"wjcciklhsy\"],\"enablePublicHostingEnvironment\":false,\"description\":\"renxolriyehqbe\",\"tags\":{\"ytjlkesmmpath\":\"lhydwbdbfgrlpu\"}},\"id\":\"ta\",\"name\":\"deani\",\"type\":\"wllbv\"}]}") .toObject(CapabilityHostResourceArmPaginatedResult.class); - Assertions.assertEquals("uvjezcjumvps", model.nextLink()); - Assertions.assertEquals("ginz", model.value().get(0).properties().description()); - Assertions.assertEquals("ujkhnjcmrnkfmkh", model.value().get(0).properties().tags().get("qtwmlmhjnqtqeahj")); - Assertions.assertEquals("oiglk", model.value().get(0).properties().aiServicesConnections().get(0)); + Assertions.assertEquals("fwy", model.nextLink()); + Assertions.assertEquals("b", model.value().get(0).properties().description()); + Assertions.assertEquals("kraokq", model.value().get(0).properties().tags().get("budbt")); + Assertions.assertEquals("enuzejg", model.value().get(0).properties().aiServicesConnections().get(0)); Assertions.assertEquals(CapabilityHostKind.AGENTS, model.value().get(0).properties().capabilityHostKind()); - Assertions.assertEquals("nnraclibbfqpspkl", model.value().get(0).properties().customerSubnet()); - Assertions.assertEquals("nhautwukexzgpmnm", model.value().get(0).properties().storageConnections().get(0)); - Assertions.assertEquals("smtbljjehhcif", model.value().get(0).properties().threadStorageConnections().get(0)); - Assertions.assertEquals("qbyeju", model.value().get(0).properties().vectorStoreConnections().get(0)); - Assertions.assertFalse(model.value().get(0).properties().enablePublicHostingEnvironment()); + Assertions.assertEquals("baqszllrzlsmmd", model.value().get(0).properties().customerSubnet()); + Assertions.assertEquals("zpimcqrhn", model.value().get(0).properties().storageConnections().get(0)); + Assertions.assertEquals("klogx", model.value().get(0).properties().threadStorageConnections().get(0)); + Assertions.assertEquals("lwkzpgajsqjcem", model.value().get(0).properties().vectorStoreConnections().get(0)); + Assertions.assertTrue(model.value().get(0).properties().enablePublicHostingEnvironment()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapacityConfigTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapacityConfigTests.java index 3459cfaeb487..7a0d7181be48 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapacityConfigTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CapacityConfigTests.java @@ -12,12 +12,12 @@ public final class CapacityConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityConfig model = BinaryData.fromString( - "{\"minimum\":1641130583,\"maximum\":123803740,\"step\":1309072810,\"default\":2063322926,\"allowedValues\":[1012286032]}") + "{\"minimum\":1003967781,\"maximum\":1927626418,\"step\":801364840,\"default\":296949281,\"allowedValues\":[2042838071,1572561560,591118108,533461500]}") .toObject(CapacityConfig.class); - Assertions.assertEquals(1641130583, model.minimum()); - Assertions.assertEquals(123803740, model.maximum()); - Assertions.assertEquals(1309072810, model.step()); - Assertions.assertEquals(2063322926, model.defaultProperty()); - Assertions.assertEquals(1012286032, model.allowedValues().get(0)); + Assertions.assertEquals(1003967781, model.minimum()); + Assertions.assertEquals(1927626418, model.maximum()); + Assertions.assertEquals(801364840, model.step()); + Assertions.assertEquals(296949281, model.defaultProperty()); + Assertions.assertEquals(2042838071, model.allowedValues().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentCostTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentCostTests.java index 07990a5a3c4b..ab6f7a6c0fb0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentCostTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentCostTests.java @@ -12,9 +12,9 @@ public final class CommitmentCostTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommitmentCost model - = BinaryData.fromString("{\"commitmentMeterId\":\"osgwqpsqazihqo\",\"overageMeterId\":\"qgcnbhcbmjk\"}") + = BinaryData.fromString("{\"commitmentMeterId\":\"ddzydisnu\",\"overageMeterId\":\"ywyjlnldpxot\"}") .toObject(CommitmentCost.class); - Assertions.assertEquals("osgwqpsqazihqo", model.commitmentMeterId()); - Assertions.assertEquals("qgcnbhcbmjk", model.overageMeterId()); + Assertions.assertEquals("ddzydisnu", model.commitmentMeterId()); + Assertions.assertEquals("ywyjlnldpxot", model.overageMeterId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPeriodTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPeriodTests.java index e2b24684a2ec..2e957f1920b1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPeriodTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPeriodTests.java @@ -12,17 +12,17 @@ public final class CommitmentPeriodTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommitmentPeriod model = BinaryData.fromString( - "{\"tier\":\"puqujmqlgkfbtn\",\"count\":1601819937,\"quota\":{\"quantity\":6187820984312370265,\"unit\":\"cn\"},\"startDate\":\"jitcjedftwwaez\",\"endDate\":\"jvdcpzfoqouic\"}") + "{\"tier\":\"oefki\",\"count\":841009999,\"quota\":{\"quantity\":137695562924143561,\"unit\":\"jmqlgkfb\"},\"startDate\":\"doaon\",\"endDate\":\"jcntuj\"}") .toObject(CommitmentPeriod.class); - Assertions.assertEquals("puqujmqlgkfbtn", model.tier()); - Assertions.assertEquals(1601819937, model.count()); + Assertions.assertEquals("oefki", model.tier()); + Assertions.assertEquals(841009999, model.count()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CommitmentPeriod model = new CommitmentPeriod().withTier("puqujmqlgkfbtn").withCount(1601819937); + CommitmentPeriod model = new CommitmentPeriod().withTier("oefki").withCount(841009999); model = BinaryData.fromObject(model).toObject(CommitmentPeriod.class); - Assertions.assertEquals("puqujmqlgkfbtn", model.tier()); - Assertions.assertEquals(1601819937, model.count()); + Assertions.assertEquals("oefki", model.tier()); + Assertions.assertEquals(841009999, model.count()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationInnerTests.java index 4864d74d268e..b55f612356c0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationInnerTests.java @@ -14,20 +14,20 @@ public final class CommitmentPlanAccountAssociationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommitmentPlanAccountAssociationInner model = BinaryData.fromString( - "{\"properties\":{\"accountId\":\"qvpsvuoymg\"},\"etag\":\"elvezrypq\",\"tags\":{\"edkowepbqpcrfk\":\"eokerqwkyhkobopg\"},\"id\":\"ccsnjvcdwxlpq\",\"name\":\"kftnkhtjsyin\",\"type\":\"wfqatmtd\"}") + "{\"properties\":{\"accountId\":\"ronzmyhgfip\"},\"etag\":\"xkmcwaekrrjre\",\"tags\":{\"lik\":\"tsgumhj\"},\"id\":\"wslolbqp\",\"name\":\"uzlm\",\"type\":\"felfktg\"}") .toObject(CommitmentPlanAccountAssociationInner.class); - Assertions.assertEquals("eokerqwkyhkobopg", model.tags().get("edkowepbqpcrfk")); - Assertions.assertEquals("qvpsvuoymg", model.accountId()); + Assertions.assertEquals("tsgumhj", model.tags().get("lik")); + Assertions.assertEquals("ronzmyhgfip", model.accountId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CommitmentPlanAccountAssociationInner model - = new CommitmentPlanAccountAssociationInner().withTags(mapOf("edkowepbqpcrfk", "eokerqwkyhkobopg")) - .withAccountId("qvpsvuoymg"); + = new CommitmentPlanAccountAssociationInner().withTags(mapOf("lik", "tsgumhj")) + .withAccountId("ronzmyhgfip"); model = BinaryData.fromObject(model).toObject(CommitmentPlanAccountAssociationInner.class); - Assertions.assertEquals("eokerqwkyhkobopg", model.tags().get("edkowepbqpcrfk")); - Assertions.assertEquals("qvpsvuoymg", model.accountId()); + Assertions.assertEquals("tsgumhj", model.tags().get("lik")); + Assertions.assertEquals("ronzmyhgfip", model.accountId()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationListResultTests.java index 033fa8178ae9..e328ca8b6fd0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationListResultTests.java @@ -12,8 +12,8 @@ public final class CommitmentPlanAccountAssociationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommitmentPlanAccountAssociationListResult model = BinaryData.fromString( - "{\"nextLink\":\"ikdgszywkbir\",\"value\":[{\"properties\":{\"accountId\":\"lhkjoqrvqq\"},\"etag\":\"t\",\"tags\":{\"oupmfii\":\"rv\",\"x\":\"fggjioolvr\",\"kkgll\":\"v\",\"uhbxvvy\":\"wjygvjayvblmhvk\"},\"id\":\"s\",\"name\":\"pbyrqufegxu\",\"type\":\"wz\"},{\"properties\":{\"accountId\":\"hlmctlpdngitvgb\"},\"etag\":\"rixkwmyijejve\",\"tags\":{\"xhcexdrrvqahq\":\"bpnaixexccbdre\",\"jnhyjsvf\":\"ghtpw\",\"mtg\":\"cxzbfvoowvr\",\"y\":\"qp\"},\"id\":\"tronzmyhgfi\",\"name\":\"nsxkmcwaekrrjr\",\"type\":\"afxtsgum\"},{\"properties\":{\"accountId\":\"lik\"},\"etag\":\"wslolbqp\",\"tags\":{\"elfk\":\"lmv\",\"njwmwkpnbsazejj\":\"gplcrpwjxeznoigb\",\"augzxnfaazpxdtn\":\"qkagfhsxt\"},\"id\":\"mkqjj\",\"name\":\"wuenvr\",\"type\":\"pyouaibrebqaays\"}]}") + "{\"nextLink\":\"eznoig\",\"value\":[{\"properties\":{\"accountId\":\"mw\"},\"etag\":\"nbsazejjoqkag\",\"tags\":{\"xdtnkdmkqjjlw\":\"xttaugzxnfaaz\",\"aysjkixqtnqttez\":\"envrkpyouaibrebq\"},\"id\":\"fffiak\",\"name\":\"jpqqmted\",\"type\":\"tmmjihyeozph\"},{\"properties\":{\"accountId\":\"uyqncygupkvipmd\"},\"etag\":\"wx\",\"tags\":{\"xhojuj\":\"evzhfsto\",\"hixbjxyfwnyl\":\"ypelmcu\"},\"id\":\"ool\",\"name\":\"ttpkiwkkbnujrywv\",\"type\":\"y\"},{\"properties\":{\"accountId\":\"pncur\"},\"etag\":\"iwii\",\"tags\":{\"cbihwqk\":\"ywub\",\"umwctondz\":\"fdntwjchrdgoih\",\"tov\":\"luudfdlwggytsb\"},\"id\":\"gseinq\",\"name\":\"iufxqknpir\",\"type\":\"nepttwqmsni\"},{\"properties\":{\"accountId\":\"dmqnrojlpij\"},\"etag\":\"rxfrddhc\",\"tags\":{\"hftwesgog\":\"izzronasxiftozqy\",\"sxkkg\":\"zhonnxkrlgnyhmo\",\"rghxjb\":\"h\"},\"id\":\"qxvcxgfrpdsofb\",\"name\":\"hrnsvbu\",\"type\":\"wdvzyy\"}]}") .toObject(CommitmentPlanAccountAssociationListResult.class); - Assertions.assertEquals("ikdgszywkbir", model.nextLink()); + Assertions.assertEquals("eznoig", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationPropertiesTests.java index 08d6e6510a24..cdf8fc16f6b7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanAccountAssociationPropertiesTests.java @@ -11,16 +11,16 @@ public final class CommitmentPlanAccountAssociationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CommitmentPlanAccountAssociationProperties model = BinaryData.fromString("{\"accountId\":\"mdvy\"}") + CommitmentPlanAccountAssociationProperties model = BinaryData.fromString("{\"accountId\":\"crpw\"}") .toObject(CommitmentPlanAccountAssociationProperties.class); - Assertions.assertEquals("mdvy", model.accountId()); + Assertions.assertEquals("crpw", model.accountId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CommitmentPlanAccountAssociationProperties model - = new CommitmentPlanAccountAssociationProperties().withAccountId("mdvy"); + = new CommitmentPlanAccountAssociationProperties().withAccountId("crpw"); model = BinaryData.fromObject(model).toObject(CommitmentPlanAccountAssociationProperties.class); - Assertions.assertEquals("mdvy", model.accountId()); + Assertions.assertEquals("crpw", model.accountId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanInnerTests.java index d7a517f5de01..2c30ffced456 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanInnerTests.java @@ -19,60 +19,60 @@ public final class CommitmentPlanInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommitmentPlanInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Accepted\",\"commitmentPlanGuid\":\"ajxq\",\"hostingModel\":\"ConnectedContainer\",\"planType\":\"ky\",\"current\":{\"tier\":\"eddgssofw\",\"count\":1153520576,\"quota\":{\"quantity\":3973281254631070018,\"unit\":\"mnjijpxacqqudf\"},\"startDate\":\"yxbaaabjyvayf\",\"endDate\":\"m\"},\"autoRenew\":false,\"next\":{\"tier\":\"zqogse\",\"count\":218306871,\"quota\":{\"quantity\":3349292627980189663,\"unit\":\"nw\"},\"startDate\":\"wzsyyceuzs\",\"endDate\":\"bjudpfrxtrthzv\"},\"last\":{\"tier\":\"dwkqbrq\",\"count\":965192802,\"quota\":{\"quantity\":134576264669262403,\"unit\":\"iilivpdtiirqtd\"},\"startDate\":\"axoruzfgsquy\",\"endDate\":\"rxxle\"},\"provisioningIssues\":[\"amxjezwlw\",\"wxuqlcvydypatdoo\",\"ojknio\"]},\"tags\":{\"vdkcrodtj\":\"oebwnujhemms\"},\"location\":\"fw\",\"etag\":\"fltkacjv\",\"kind\":\"kdlfoa\",\"sku\":{\"name\":\"gkfpaga\",\"tier\":\"Premium\",\"size\":\"lpqblylsyxk\",\"family\":\"nsj\",\"capacity\":560645314},\"id\":\"iagxsdszuempsbz\",\"name\":\"f\",\"type\":\"beyvpnqicvinvkjj\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"commitmentPlanGuid\":\"qal\",\"hostingModel\":\"ProvisionedWeb\",\"planType\":\"jijpxac\",\"current\":{\"tier\":\"dfnbyxbaaabjyv\",\"count\":2087674757,\"quota\":{\"quantity\":952375100795367564,\"unit\":\"rtuzqogs\"},\"startDate\":\"nevfdnw\",\"endDate\":\"mewzsyyc\"},\"autoRenew\":true,\"next\":{\"tier\":\"i\",\"count\":414197490,\"quota\":{\"quantity\":7807862752001472042,\"unit\":\"trthzvaytdwkqbr\"},\"startDate\":\"bpaxhexiilivpdt\",\"endDate\":\"r\"},\"last\":{\"tier\":\"qoaxoruzfgs\",\"count\":1249324480,\"quota\":{\"quantity\":4821324674520333878,\"unit\":\"l\"},\"startDate\":\"tramxjez\",\"endDate\":\"wnwxuqlcvyd\"},\"provisioningIssues\":[\"tdooaoj\",\"niodkooeb\",\"nuj\",\"emmsbvdkc\"]},\"tags\":{\"jlfltkacjvefkdlf\":\"tjinf\",\"owpulpq\":\"akggkfpag\"},\"location\":\"ylsyxkqjnsje\",\"etag\":\"tiagx\",\"kind\":\"sz\",\"sku\":{\"name\":\"mpsbzkfzbeyv\",\"tier\":\"Free\",\"size\":\"cvinvkjjxdxrbuuk\",\"family\":\"lewyhmlwpaz\",\"capacity\":1765730251},\"id\":\"fn\",\"name\":\"ckw\",\"type\":\"fz\"}") .toObject(CommitmentPlanInner.class); - Assertions.assertEquals("ajxq", model.properties().commitmentPlanGuid()); - Assertions.assertEquals(HostingModel.CONNECTED_CONTAINER, model.properties().hostingModel()); - Assertions.assertEquals("ky", model.properties().planType()); - Assertions.assertEquals("eddgssofw", model.properties().current().tier()); - Assertions.assertEquals(1153520576, model.properties().current().count()); - Assertions.assertFalse(model.properties().autoRenew()); - Assertions.assertEquals("zqogse", model.properties().next().tier()); - Assertions.assertEquals(218306871, model.properties().next().count()); - Assertions.assertEquals("oebwnujhemms", model.tags().get("vdkcrodtj")); - Assertions.assertEquals("fw", model.location()); - Assertions.assertEquals("kdlfoa", model.kind()); - Assertions.assertEquals("gkfpaga", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("lpqblylsyxk", model.sku().size()); - Assertions.assertEquals("nsj", model.sku().family()); - Assertions.assertEquals(560645314, model.sku().capacity()); + Assertions.assertEquals("qal", model.properties().commitmentPlanGuid()); + Assertions.assertEquals(HostingModel.PROVISIONED_WEB, model.properties().hostingModel()); + Assertions.assertEquals("jijpxac", model.properties().planType()); + Assertions.assertEquals("dfnbyxbaaabjyv", model.properties().current().tier()); + Assertions.assertEquals(2087674757, model.properties().current().count()); + Assertions.assertTrue(model.properties().autoRenew()); + Assertions.assertEquals("i", model.properties().next().tier()); + Assertions.assertEquals(414197490, model.properties().next().count()); + Assertions.assertEquals("tjinf", model.tags().get("jlfltkacjvefkdlf")); + Assertions.assertEquals("ylsyxkqjnsje", model.location()); + Assertions.assertEquals("sz", model.kind()); + Assertions.assertEquals("mpsbzkfzbeyv", model.sku().name()); + Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); + Assertions.assertEquals("cvinvkjjxdxrbuuk", model.sku().size()); + Assertions.assertEquals("lewyhmlwpaz", model.sku().family()); + Assertions.assertEquals(1765730251, model.sku().capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CommitmentPlanInner model = new CommitmentPlanInner() - .withProperties(new CommitmentPlanProperties().withCommitmentPlanGuid("ajxq") - .withHostingModel(HostingModel.CONNECTED_CONTAINER) - .withPlanType("ky") - .withCurrent(new CommitmentPeriod().withTier("eddgssofw").withCount(1153520576)) - .withAutoRenew(false) - .withNext(new CommitmentPeriod().withTier("zqogse").withCount(218306871))) - .withTags(mapOf("vdkcrodtj", "oebwnujhemms")) - .withLocation("fw") - .withKind("kdlfoa") - .withSku(new Sku().withName("gkfpaga") - .withTier(SkuTier.PREMIUM) - .withSize("lpqblylsyxk") - .withFamily("nsj") - .withCapacity(560645314)); + .withProperties(new CommitmentPlanProperties().withCommitmentPlanGuid("qal") + .withHostingModel(HostingModel.PROVISIONED_WEB) + .withPlanType("jijpxac") + .withCurrent(new CommitmentPeriod().withTier("dfnbyxbaaabjyv").withCount(2087674757)) + .withAutoRenew(true) + .withNext(new CommitmentPeriod().withTier("i").withCount(414197490))) + .withTags(mapOf("jlfltkacjvefkdlf", "tjinf", "owpulpq", "akggkfpag")) + .withLocation("ylsyxkqjnsje") + .withKind("sz") + .withSku(new Sku().withName("mpsbzkfzbeyv") + .withTier(SkuTier.FREE) + .withSize("cvinvkjjxdxrbuuk") + .withFamily("lewyhmlwpaz") + .withCapacity(1765730251)); model = BinaryData.fromObject(model).toObject(CommitmentPlanInner.class); - Assertions.assertEquals("ajxq", model.properties().commitmentPlanGuid()); - Assertions.assertEquals(HostingModel.CONNECTED_CONTAINER, model.properties().hostingModel()); - Assertions.assertEquals("ky", model.properties().planType()); - Assertions.assertEquals("eddgssofw", model.properties().current().tier()); - Assertions.assertEquals(1153520576, model.properties().current().count()); - Assertions.assertFalse(model.properties().autoRenew()); - Assertions.assertEquals("zqogse", model.properties().next().tier()); - Assertions.assertEquals(218306871, model.properties().next().count()); - Assertions.assertEquals("oebwnujhemms", model.tags().get("vdkcrodtj")); - Assertions.assertEquals("fw", model.location()); - Assertions.assertEquals("kdlfoa", model.kind()); - Assertions.assertEquals("gkfpaga", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("lpqblylsyxk", model.sku().size()); - Assertions.assertEquals("nsj", model.sku().family()); - Assertions.assertEquals(560645314, model.sku().capacity()); + Assertions.assertEquals("qal", model.properties().commitmentPlanGuid()); + Assertions.assertEquals(HostingModel.PROVISIONED_WEB, model.properties().hostingModel()); + Assertions.assertEquals("jijpxac", model.properties().planType()); + Assertions.assertEquals("dfnbyxbaaabjyv", model.properties().current().tier()); + Assertions.assertEquals(2087674757, model.properties().current().count()); + Assertions.assertTrue(model.properties().autoRenew()); + Assertions.assertEquals("i", model.properties().next().tier()); + Assertions.assertEquals(414197490, model.properties().next().count()); + Assertions.assertEquals("tjinf", model.tags().get("jlfltkacjvefkdlf")); + Assertions.assertEquals("ylsyxkqjnsje", model.location()); + Assertions.assertEquals("sz", model.kind()); + Assertions.assertEquals("mpsbzkfzbeyv", model.sku().name()); + Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); + Assertions.assertEquals("cvinvkjjxdxrbuuk", model.sku().size()); + Assertions.assertEquals("lewyhmlwpaz", model.sku().family()); + Assertions.assertEquals(1765730251, model.sku().capacity()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanListResultTests.java index a75e3199ac5e..c8f9c28cfc36 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanListResultTests.java @@ -12,8 +12,8 @@ public final class CommitmentPlanListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommitmentPlanListResult model = BinaryData.fromString( - "{\"nextLink\":\"ufoxc\",\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"commitmentPlanGuid\":\"amcio\",\"hostingModel\":\"ProvisionedWeb\",\"planType\":\"azxkhnzbonlwnto\",\"current\":{\"tier\":\"kdwbwhkszz\",\"count\":2022074677,\"quota\":{\"quantity\":9021745847558937122,\"unit\":\"vbtqgsfraoyzk\"},\"startDate\":\"wtl\",\"endDate\":\"guxawqaldsyuuxi\"},\"autoRenew\":false,\"next\":{\"tier\":\"obwyznkb\",\"count\":1828204425,\"quota\":{\"quantity\":8888415937713510387,\"unit\":\"pagmhrskdsnf\"},\"startDate\":\"doakgtdlmkkzevdl\",\"endDate\":\"wpusdsttwvogv\"},\"last\":{\"tier\":\"jdcngqqm\",\"count\":1462328661,\"quota\":{\"quantity\":1659361847593192412,\"unit\":\"zr\"},\"startDate\":\"dgrtwaenuuzkopbm\",\"endDate\":\"rfdwoyu\"},\"provisioningIssues\":[\"iuiefozbhdmsm\",\"mzqhoftrmaequi\",\"hxicslfaoqz\"]},\"tags\":{\"ph\":\"ylhalnswhcc\",\"gwol\":\"aivwitqscywu\",\"zbwemh\":\"h\",\"sbrgz\":\"i\"},\"location\":\"msweypqwdxggicc\",\"etag\":\"xqhuexm\",\"kind\":\"tlstvlzywem\",\"sku\":{\"name\":\"rncsdtclu\",\"tier\":\"Free\",\"size\":\"bsfgytguslfea\",\"family\":\"ygqukyhejh\",\"capacity\":435176888},\"id\":\"gfpelolppvksrpqv\",\"name\":\"jzraehtwdwrf\",\"type\":\"swibyr\"},{\"properties\":{\"provisioningState\":\"Creating\",\"commitmentPlanGuid\":\"shfwpracstwity\",\"hostingModel\":\"DisconnectedContainer\",\"planType\":\"xccedcpnmdyodn\",\"current\":{\"tier\":\"ltjcvnhltiugcxna\",\"count\":1627588082,\"quota\":{\"quantity\":7914247727564577085,\"unit\":\"qunyowxwlmdjr\"},\"startDate\":\"fgbvfvpdbo\",\"endDate\":\"cizsjqlhkrribdei\"},\"autoRenew\":true,\"next\":{\"tier\":\"kghv\",\"count\":1070567995,\"quota\":{\"quantity\":6707470318378730108,\"unit\":\"efajpj\"},\"startDate\":\"wkqnyhg\",\"endDate\":\"j\"},\"last\":{\"tier\":\"vfxzsjab\",\"count\":804108375,\"quota\":{\"quantity\":3600159393956753307,\"unit\":\"fsdjpvkvp\"},\"startDate\":\"xbkzbzkdvncj\",\"endDate\":\"udurgkakmokz\"},\"provisioningIssues\":[\"klff\"]},\"tags\":{\"bizikayuhq\":\"uwqlgzrfzeey\"},\"location\":\"jbsybbqw\",\"etag\":\"t\",\"kind\":\"gmfpgvmp\",\"sku\":{\"name\":\"as\",\"tier\":\"Standard\",\"size\":\"qfxssmwutw\",\"family\":\"srezp\",\"capacity\":481709550},\"id\":\"euyowqkd\",\"name\":\"ytisibir\",\"type\":\"gpikpzimejza\"},{\"properties\":{\"provisioningState\":\"Failed\",\"commitmentPlanGuid\":\"iavrm\",\"hostingModel\":\"Web\",\"planType\":\"okixrjqcir\",\"current\":{\"tier\":\"frl\",\"count\":1438056618,\"quota\":{\"quantity\":7826236026433540602,\"unit\":\"iin\"},\"startDate\":\"pwp\",\"endDate\":\"lwbtlhf\"},\"autoRenew\":false,\"next\":{\"tier\":\"hszfjvfb\",\"count\":44629525,\"quota\":{\"quantity\":4051356742453567951,\"unit\":\"rqmq\"},\"startDate\":\"dvriiiojnal\",\"endDate\":\"fk\"},\"last\":{\"tier\":\"sexso\",\"count\":434184024,\"quota\":{\"quantity\":8648478002542338192,\"unit\":\"ahhxvrh\"},\"startDate\":\"kwpjgwwspughftqs\",\"endDate\":\"qxujxukndxd\"},\"provisioningIssues\":[\"jguufzdm\",\"yqtfihwh\",\"otzi\",\"gamv\"]},\"tags\":{\"zqzudph\":\"o\"},\"location\":\"mvdk\",\"etag\":\"ynwcvtbv\",\"kind\":\"yhmtnvyqiat\",\"sku\":{\"name\":\"wp\",\"tier\":\"Basic\",\"size\":\"zcjaesgvvsccy\",\"family\":\"g\",\"capacity\":1755588129},\"id\":\"wygzlvdnkfxusem\",\"name\":\"wzrmuh\",\"type\":\"pfcqdp\"}]}") + "{\"nextLink\":\"waezkojvd\",\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"commitmentPlanGuid\":\"uicybxarzgszuf\",\"hostingModel\":\"DisconnectedContainer\",\"planType\":\"q\",\"current\":{\"tier\":\"doamciodhkha\",\"count\":157531111,\"quota\":{\"quantity\":8226405962302008930,\"unit\":\"nlwntoe\"},\"startDate\":\"kdwbwhkszz\",\"endDate\":\"rvexztvb\"},\"autoRenew\":true,\"next\":{\"tier\":\"ra\",\"count\":2100359325,\"quota\":{\"quantity\":6934781293491405600,\"unit\":\"lmnguxaw\"},\"startDate\":\"ldsyuuximerqfob\",\"endDate\":\"znkbykutwpfhpagm\"},\"last\":{\"tier\":\"kdsnfdsdoakgtdl\",\"count\":1535187364,\"quota\":{\"quantity\":7189695523322242946,\"unit\":\"hewpusdsttwv\"},\"startDate\":\"vbbejdcng\",\"endDate\":\"m\"},\"provisioningIssues\":[\"ufgmjzrwrdg\",\"twaenuuzko\"]},\"tags\":{\"hziuiefozbhdms\":\"inrfdwoyu\",\"zqhof\":\"l\"},\"location\":\"maequiahxicslfa\",\"etag\":\"z\",\"kind\":\"yylhalnswhccsp\",\"sku\":{\"name\":\"aivwitqscywu\",\"tier\":\"Standard\",\"size\":\"luhczbw\",\"family\":\"hairsbrgzdwms\",\"capacity\":893814048},\"id\":\"qwdxggicc\",\"name\":\"n\",\"type\":\"qhuexm\"},{\"properties\":{\"provisioningState\":\"Moving\",\"commitmentPlanGuid\":\"tvlz\",\"hostingModel\":\"DisconnectedContainer\",\"planType\":\"hz\",\"current\":{\"tier\":\"sdtclusiypbs\",\"count\":1861224364,\"quota\":{\"quantity\":7838664702645676425,\"unit\":\"feadcygq\"},\"startDate\":\"yhejhzisxgfp\",\"endDate\":\"olppvksrpqvujz\"},\"autoRenew\":true,\"next\":{\"tier\":\"w\",\"count\":234231133,\"quota\":{\"quantity\":6178652880729547644,\"unit\":\"byrcdlbhshfwp\"},\"startDate\":\"cstwity\",\"endDate\":\"evxccedcp\"},\"last\":{\"tier\":\"yodnwzxltj\",\"count\":424916927,\"quota\":{\"quantity\":598622795111508954,\"unit\":\"gcxn\"},\"startDate\":\"vwxqibyqunyo\",\"endDate\":\"wlmdjrkv\"},\"provisioningIssues\":[\"vfvpdbodaciz\",\"j\",\"lhkrribdeibqipqk\"]},\"tags\":{\"refajpjorwkqnyh\":\"xndzwm\",\"j\":\"b\"},\"location\":\"ivfxzsjabibsyst\",\"etag\":\"fsdjpvkvp\",\"kind\":\"xbkzbzkdvncj\",\"sku\":{\"name\":\"udurgkakmokz\",\"tier\":\"Premium\",\"size\":\"lffhmouwqlg\",\"family\":\"fzeeyebizik\",\"capacity\":2107900105},\"id\":\"qlbjbsybbqwrvt\",\"name\":\"dgmfpgvmpipasl\",\"type\":\"haq\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"commitmentPlanGuid\":\"wutwbdsre\",\"hostingModel\":\"DisconnectedContainer\",\"planType\":\"hneuyowqkd\",\"current\":{\"tier\":\"i\",\"count\":431891008,\"quota\":{\"quantity\":4920144220560546408,\"unit\":\"ikpzimejza\"},\"startDate\":\"fzxiavrmb\",\"endDate\":\"nokixrjqcirgz\"},\"autoRenew\":true,\"next\":{\"tier\":\"zszrnwoiindfpw\",\"count\":2003190846,\"quota\":{\"quantity\":1464641146056052310,\"unit\":\"h\"},\"startDate\":\"sj\",\"endDate\":\"hszfjvfb\"},\"last\":{\"tier\":\"eljag\",\"count\":128121457,\"quota\":{\"quantity\":8325086939855725582,\"unit\":\"riiiojnalghfkv\"},\"startDate\":\"sexso\",\"endDate\":\"el\"},\"provisioningIssues\":[\"hahhxvrhmzkwpj\",\"wws\",\"ughftqsx\",\"qxujxukndxd\"]},\"tags\":{\"yqtfihwh\":\"jguufzdm\",\"gamv\":\"otzi\",\"dphqamv\":\"phoszqz\",\"vtbvkayh\":\"kfwynw\"},\"location\":\"nvyq\",\"etag\":\"tkzwpcnpwzc\",\"kind\":\"esgvvsccyaj\",\"sku\":{\"name\":\"qfhwyg\",\"tier\":\"Standard\",\"size\":\"nk\",\"family\":\"usemdwzrmuhap\",\"capacity\":857980637},\"id\":\"psqxq\",\"name\":\"psvuoymgc\",\"type\":\"elvezrypq\"},{\"properties\":{\"provisioningState\":\"Moving\",\"commitmentPlanGuid\":\"kerqwkyh\",\"hostingModel\":\"ProvisionedWeb\",\"planType\":\"pg\",\"current\":{\"tier\":\"k\",\"count\":615107136,\"quota\":{\"quantity\":5074641707512401409,\"unit\":\"rfkbwccsnjvcdwxl\"},\"startDate\":\"ekftnkhtj\",\"endDate\":\"i\"},\"autoRenew\":false,\"next\":{\"tier\":\"atmtdhtmdvy\",\"count\":932898449,\"quota\":{\"quantity\":6469861763062162700,\"unit\":\"ywkbirryuzhlhkjo\"},\"startDate\":\"vqqaatjinrvgo\",\"endDate\":\"mfiibfggj\"},\"last\":{\"tier\":\"lvrwxkvtkk\",\"count\":1409023771,\"quota\":{\"quantity\":1471495737284359378,\"unit\":\"vjayvblmhvkzu\"},\"startDate\":\"xvvy\",\"endDate\":\"s\"},\"provisioningIssues\":[\"yrqufegxuvwz\",\"bnhlmc\"]},\"tags\":{\"itvgbmhrixkwm\":\"dn\"},\"location\":\"jejveg\",\"etag\":\"bpnaixexccbdre\",\"kind\":\"hcexdrrvqa\",\"sku\":{\"name\":\"kghtpwijnh\",\"tier\":\"Premium\",\"size\":\"f\",\"family\":\"xzb\",\"capacity\":1564652638},\"id\":\"wvrvmtg\",\"name\":\"qp\",\"type\":\"y\"}]}") .toObject(CommitmentPlanListResult.class); - Assertions.assertEquals("ufoxc", model.nextLink()); + Assertions.assertEquals("waezkojvd", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanPropertiesTests.java index ea0a8d71d938..2cdecb9a079d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlanPropertiesTests.java @@ -14,34 +14,34 @@ public final class CommitmentPlanPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommitmentPlanProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Accepted\",\"commitmentPlanGuid\":\"buukzclewyhml\",\"hostingModel\":\"Web\",\"planType\":\"tzpofncckwyfzq\",\"current\":{\"tier\":\"xbuy\",\"count\":903263764,\"quota\":{\"quantity\":3336688530797945721,\"unit\":\"tpp\"},\"startDate\":\"o\",\"endDate\":\"or\"},\"autoRenew\":false,\"next\":{\"tier\":\"lmncw\",\"count\":980549756,\"quota\":{\"quantity\":4217034770382613848,\"unit\":\"bnwdcfh\"},\"startDate\":\"qdpfuvglsbjjca\",\"endDate\":\"xbvtvudu\"},\"last\":{\"tier\":\"ormrlxqtvcofudfl\",\"count\":360831817,\"quota\":{\"quantity\":8171649502486820994,\"unit\":\"knnqvsaznq\"},\"startDate\":\"orudsgsa\",\"endDate\":\"kycgrauwj\"},\"provisioningIssues\":[\"aeburuvdmo\",\"s\",\"zlxwabmqoefkifr\"]}") + "{\"provisioningState\":\"Creating\",\"commitmentPlanGuid\":\"xbuy\",\"hostingModel\":\"Web\",\"planType\":\"feqztppriol\",\"current\":{\"tier\":\"jaltolmnc\",\"count\":1429171965,\"quota\":{\"quantity\":6340441917616417480,\"unit\":\"dbnw\"},\"startDate\":\"fhucqdpfuv\",\"endDate\":\"sbjjc\"},\"autoRenew\":false,\"next\":{\"tier\":\"vtvudutncormr\",\"count\":1360670450,\"quota\":{\"quantity\":5281574535669148481,\"unit\":\"udflvkgjubgdknn\"},\"startDate\":\"saznqntoruds\",\"endDate\":\"a\"},\"last\":{\"tier\":\"yc\",\"count\":698533794,\"quota\":{\"quantity\":346907447541912599,\"unit\":\"taeburuvdm\"},\"startDate\":\"s\",\"endDate\":\"l\"},\"provisioningIssues\":[\"b\"]}") .toObject(CommitmentPlanProperties.class); - Assertions.assertEquals("buukzclewyhml", model.commitmentPlanGuid()); + Assertions.assertEquals("xbuy", model.commitmentPlanGuid()); Assertions.assertEquals(HostingModel.WEB, model.hostingModel()); - Assertions.assertEquals("tzpofncckwyfzq", model.planType()); - Assertions.assertEquals("xbuy", model.current().tier()); - Assertions.assertEquals(903263764, model.current().count()); + Assertions.assertEquals("feqztppriol", model.planType()); + Assertions.assertEquals("jaltolmnc", model.current().tier()); + Assertions.assertEquals(1429171965, model.current().count()); Assertions.assertFalse(model.autoRenew()); - Assertions.assertEquals("lmncw", model.next().tier()); - Assertions.assertEquals(980549756, model.next().count()); + Assertions.assertEquals("vtvudutncormr", model.next().tier()); + Assertions.assertEquals(1360670450, model.next().count()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CommitmentPlanProperties model = new CommitmentPlanProperties().withCommitmentPlanGuid("buukzclewyhml") + CommitmentPlanProperties model = new CommitmentPlanProperties().withCommitmentPlanGuid("xbuy") .withHostingModel(HostingModel.WEB) - .withPlanType("tzpofncckwyfzq") - .withCurrent(new CommitmentPeriod().withTier("xbuy").withCount(903263764)) + .withPlanType("feqztppriol") + .withCurrent(new CommitmentPeriod().withTier("jaltolmnc").withCount(1429171965)) .withAutoRenew(false) - .withNext(new CommitmentPeriod().withTier("lmncw").withCount(980549756)); + .withNext(new CommitmentPeriod().withTier("vtvudutncormr").withCount(1360670450)); model = BinaryData.fromObject(model).toObject(CommitmentPlanProperties.class); - Assertions.assertEquals("buukzclewyhml", model.commitmentPlanGuid()); + Assertions.assertEquals("xbuy", model.commitmentPlanGuid()); Assertions.assertEquals(HostingModel.WEB, model.hostingModel()); - Assertions.assertEquals("tzpofncckwyfzq", model.planType()); - Assertions.assertEquals("xbuy", model.current().tier()); - Assertions.assertEquals(903263764, model.current().count()); + Assertions.assertEquals("feqztppriol", model.planType()); + Assertions.assertEquals("jaltolmnc", model.current().tier()); + Assertions.assertEquals(1429171965, model.current().count()); Assertions.assertFalse(model.autoRenew()); - Assertions.assertEquals("lmncw", model.next().tier()); - Assertions.assertEquals(980549756, model.next().count()); + Assertions.assertEquals("vtvudutncormr", model.next().tier()); + Assertions.assertEquals(1360670450, model.next().count()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateAssociationMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateAssociationMockTests.java index 4852f3f75816..8defb0fd2fa0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateAssociationMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateAssociationMockTests.java @@ -23,7 +23,7 @@ public final class CommitmentPlansCreateOrUpdateAssociationMockTests { @Test public void testCreateOrUpdateAssociation() throws Exception { String responseStr - = "{\"properties\":{\"accountId\":\"digqzlrzn\"},\"etag\":\"sdnidmjqmvy\",\"tags\":{\"d\":\"iqlarhqtwvcaze\",\"ryelgfyatigfg\":\"dzffzjwztsmpchg\",\"wnvojtvmdev\":\"rrkdknczgor\",\"rbpyhssrl\":\"lhqvbk\"},\"id\":\"pkpkocm\",\"name\":\"ccebxxopyicyvspe\",\"type\":\"lhwyykgvrccpumd\"}"; + = "{\"properties\":{\"accountId\":\"chgy\"},\"etag\":\"zdqekivycpzcvd\",\"tags\":{\"lpryf\":\"lrqtbhtrezp\",\"ccgndjgdprig\":\"xmdutzfkgilnou\"},\"id\":\"qyeqfcbuulpyuflq\",\"name\":\"fsh\",\"type\":\"ujcyohigimwdc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,14 @@ public void testCreateOrUpdateAssociation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CommitmentPlanAccountAssociation response = manager.commitmentPlans() - .defineAssociation("wdhtqqhyhnimxtn") - .withExistingCommitmentPlan("dror", "yogzmsimehtcu") - .withTags( - mapOf("veywetkrhlolmcn", "rtnuguefxxijteb", "npetlrnrde", "epfgsvbbvaqdl", "vxehuekdxljzvdo", "aw")) - .withAccountId("isnomwnwnghoj") + .defineAssociation("ykdnonaaxwmg") + .withExistingCommitmentPlan("cqikclsm", "lnssw") + .withTags(mapOf("uvjhxmnrqstjc", "bgvsbtsertoxadh", "vdhgjnaqyqip", "etwmlgicvnp")) + .withAccountId("jlqcwny") .create(); - Assertions.assertEquals("iqlarhqtwvcaze", response.tags().get("d")); - Assertions.assertEquals("digqzlrzn", response.accountId()); + Assertions.assertEquals("lrqtbhtrezp", response.tags().get("lpryf")); + Assertions.assertEquals("chgy", response.accountId()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdatePlanMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdatePlanMockTests.java index 5e7fbcf4c157..c1c5f5969f8f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdatePlanMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdatePlanMockTests.java @@ -28,7 +28,7 @@ public final class CommitmentPlansCreateOrUpdatePlanMockTests { @Test public void testCreateOrUpdatePlan() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"commitmentPlanGuid\":\"lsgaojbtqpq\",\"hostingModel\":\"Web\",\"planType\":\"tpzp\",\"current\":{\"tier\":\"flmcdsgxc\",\"count\":454800186,\"quota\":{\"quantity\":8443053117966889313,\"unit\":\"lu\"},\"startDate\":\"xhfwlfxzfwuge\",\"endDate\":\"cknecexkgr\"},\"autoRenew\":false,\"next\":{\"tier\":\"d\",\"count\":1334890599,\"quota\":{\"quantity\":8169073221852083731,\"unit\":\"dzfyxcnwawoxcg\"},\"startDate\":\"ejqfbi\",\"endDate\":\"pfjxdwdrpazq\"},\"last\":{\"tier\":\"fmbwotfcuuugt\",\"count\":276814944,\"quota\":{\"quantity\":419716933310202424,\"unit\":\"awohfmhnnzmec\"},\"startDate\":\"kmqenh\",\"endDate\":\"dzrpvsgl\"},\"provisioningIssues\":[\"vslvivqsuvwten\",\"gpijpk\",\"cyoaqxukui\",\"juf\"]},\"tags\":{\"x\":\"iooanduewfhv\",\"gvzua\":\"hxzubfjzabbw\",\"gavkmv\":\"xcdckixspsa\"},\"location\":\"zerejr\",\"etag\":\"zjbyetjxryopta\",\"kind\":\"twhlbecgih\",\"sku\":{\"name\":\"pemnrrabo\",\"tier\":\"Premium\",\"size\":\"xywpjhspboxhif\",\"family\":\"skpeswyhhmifjua\",\"capacity\":699507270},\"id\":\"vcmmpeglyuq\",\"name\":\"cmlae\",\"type\":\"bzbqufpnezsjzaym\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"commitmentPlanGuid\":\"kbnzxbypfq\",\"hostingModel\":\"Web\",\"planType\":\"xwrgrkkderfr\",\"current\":{\"tier\":\"ikwepwogggicw\",\"count\":1352786731,\"quota\":{\"quantity\":5507767180935367692,\"unit\":\"bsudzpgchzpgfqu\"},\"startDate\":\"djxh\",\"endDate\":\"hgod\"},\"autoRenew\":true,\"next\":{\"tier\":\"eqavfdbdfmmxj\",\"count\":1336586550,\"quota\":{\"quantity\":5774923470651910813,\"unit\":\"y\"},\"startDate\":\"mk\",\"endDate\":\"hvcw\"},\"last\":{\"tier\":\"dejkluxxrwzobuz\",\"count\":681387184,\"quota\":{\"quantity\":5392724913502171925,\"unit\":\"tkwppthuzd\"},\"startDate\":\"mimrljdpoqfxyemh\",\"endDate\":\"tbaewhte\"},\"provisioningIssues\":[\"amfmxtllfl\",\"ymqcnrrfijhgga\",\"qbgamkli\",\"irw\"]},\"tags\":{\"rxqwqnjxrd\":\"fhsdpzouhkt\",\"czcxdfw\":\"ddtullygta\",\"yf\":\"a\"},\"location\":\"xrljphraspi\",\"etag\":\"eimixlmdbgicehf\",\"kind\":\"mdrjuqbpxt\",\"sku\":{\"name\":\"lj\",\"tier\":\"Basic\",\"size\":\"paxwfqty\",\"family\":\"iprclt\",\"capacity\":1610316502},\"id\":\"s\",\"name\":\"ljckmiigz\",\"type\":\"kuckgkdskswtiiq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,40 +38,40 @@ public void testCreateOrUpdatePlan() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CommitmentPlan response = manager.commitmentPlans() - .definePlan("apczdojqyv") - .withExistingResourceGroup("pgarpfctw") - .withRegion("vjmnsv") - .withTags(mapOf("cpvuft", "fqployuek")) - .withProperties(new CommitmentPlanProperties().withCommitmentPlanGuid("iysnjqyowaadc") - .withHostingModel(HostingModel.WEB) - .withPlanType("a") - .withCurrent(new CommitmentPeriod().withTier("dtsewkaupwhlzyc").withCount(1607277135)) + .definePlan("sfpnimt") + .withExistingResourceGroup("moeobdoe") + .withRegion("cweakfec") + .withTags(mapOf("jadhfztl", "hjdqltdeluqr", "udbkuwpzq", "aysrkgzky")) + .withProperties(new CommitmentPlanProperties().withCommitmentPlanGuid("uegn") + .withHostingModel(HostingModel.CONNECTED_CONTAINER) + .withPlanType("feu") + .withCurrent(new CommitmentPeriod().withTier("jyrkwfug").withCount(932903430)) .withAutoRenew(false) - .withNext(new CommitmentPeriod().withTier("rqshixb").withCount(1948583037))) - .withKind("efcjisepkdbxot") - .withSku(new Sku().withName("jampqoclannm") + .withNext(new CommitmentPeriod().withTier("tjdqumqvfm").withCount(352920520))) + .withKind("ooajeyyjmjjx") + .withSku(new Sku().withName("xpxhnzlslekc") .withTier(SkuTier.PREMIUM) - .withSize("suqbwzstr") - .withFamily("gvp") - .withCapacity(2133148382)) + .withSize("kj") + .withFamily("qpdwad") + .withCapacity(360604152)) .create(); - Assertions.assertEquals("lsgaojbtqpq", response.properties().commitmentPlanGuid()); + Assertions.assertEquals("kbnzxbypfq", response.properties().commitmentPlanGuid()); Assertions.assertEquals(HostingModel.WEB, response.properties().hostingModel()); - Assertions.assertEquals("tpzp", response.properties().planType()); - Assertions.assertEquals("flmcdsgxc", response.properties().current().tier()); - Assertions.assertEquals(454800186, response.properties().current().count()); - Assertions.assertFalse(response.properties().autoRenew()); - Assertions.assertEquals("d", response.properties().next().tier()); - Assertions.assertEquals(1334890599, response.properties().next().count()); - Assertions.assertEquals("iooanduewfhv", response.tags().get("x")); - Assertions.assertEquals("zerejr", response.location()); - Assertions.assertEquals("twhlbecgih", response.kind()); - Assertions.assertEquals("pemnrrabo", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("xywpjhspboxhif", response.sku().size()); - Assertions.assertEquals("skpeswyhhmifjua", response.sku().family()); - Assertions.assertEquals(699507270, response.sku().capacity()); + Assertions.assertEquals("xwrgrkkderfr", response.properties().planType()); + Assertions.assertEquals("ikwepwogggicw", response.properties().current().tier()); + Assertions.assertEquals(1352786731, response.properties().current().count()); + Assertions.assertTrue(response.properties().autoRenew()); + Assertions.assertEquals("eqavfdbdfmmxj", response.properties().next().tier()); + Assertions.assertEquals(1336586550, response.properties().next().count()); + Assertions.assertEquals("fhsdpzouhkt", response.tags().get("rxqwqnjxrd")); + Assertions.assertEquals("xrljphraspi", response.location()); + Assertions.assertEquals("mdrjuqbpxt", response.kind()); + Assertions.assertEquals("lj", response.sku().name()); + Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); + Assertions.assertEquals("paxwfqty", response.sku().size()); + Assertions.assertEquals("iprclt", response.sku().family()); + Assertions.assertEquals(1610316502, response.sku().capacity()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateWithResponseMockTests.java index 136d848c9e95..a254495692b5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateWithResponseMockTests.java @@ -29,7 +29,7 @@ public final class CommitmentPlansCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"commitmentPlanGuid\":\"jyczcmtagelajdyo\",\"hostingModel\":\"DisconnectedContainer\",\"planType\":\"yxqfmzsizzhravr\",\"current\":{\"tier\":\"jymgqbgcxhn\",\"count\":1913452551,\"quota\":{\"quantity\":51680354034094643,\"unit\":\"mkmergh\"},\"startDate\":\"irhnpupkcbkfukd\",\"endDate\":\"qnv\"},\"autoRenew\":false,\"next\":{\"tier\":\"shkp\",\"count\":1965532334,\"quota\":{\"quantity\":6941515466476110465,\"unit\":\"wz\"},\"startDate\":\"znyufpqzs\",\"endDate\":\"fgufyjfdkqiy\"},\"last\":{\"tier\":\"jokgwesymzqh\",\"count\":60069861,\"quota\":{\"quantity\":3125398613160843998,\"unit\":\"j\"},\"startDate\":\"nxlue\",\"endDate\":\"jqbbgsimwejlw\"},\"provisioningIssues\":[\"pjzobdwbcpr\",\"swku\",\"ydtnaczkfwfatgaw\",\"hnskivdwgtqcume\"]},\"tags\":{\"iuycsbskowk\":\"aqgoqb\",\"rb\":\"bhz\",\"asfgqgucyhfaimqv\":\"htmqowi\",\"oehgfmqmskkixvlz\":\"ruozkgyfp\"},\"location\":\"plhpevasynt\",\"etag\":\"jy\",\"kind\":\"lbqrvvbqvknmpecq\",\"sku\":{\"name\":\"iqasif\",\"tier\":\"Premium\",\"size\":\"nstlpwqpjn\",\"family\":\"khtupsvyou\",\"capacity\":1561703244},\"id\":\"yxfwkztsmsfb\",\"name\":\"vy\",\"type\":\"lznfhkqytkztado\"}"; + = "{\"properties\":{\"provisioningState\":\"Accepted\",\"commitmentPlanGuid\":\"ghnysvlpyeuu\",\"hostingModel\":\"DisconnectedContainer\",\"planType\":\"ixqbolxvhhyqqeg\",\"current\":{\"tier\":\"grznmginmtsd\",\"count\":1395159631,\"quota\":{\"quantity\":314595308736482845,\"unit\":\"m\"},\"startDate\":\"ymncjc\",\"endDate\":\"airwcqzoofj\"},\"autoRenew\":true,\"next\":{\"tier\":\"epfbhtleberpylje\",\"count\":1905710795,\"quota\":{\"quantity\":4716995123278594660,\"unit\":\"qxowkdn\"},\"startDate\":\"xgkrh\",\"endDate\":\"ehycpn\"},\"last\":{\"tier\":\"wonoehr\",\"count\":1876292693,\"quota\":{\"quantity\":7132888662744661758,\"unit\":\"fbjzmpyr\"},\"startDate\":\"yfazbkocb\",\"endDate\":\"vthrmxkb\"},\"provisioningIssues\":[\"wdxomrawp\",\"keboo\",\"fly\"]},\"tags\":{\"lm\":\"gaedaoiq\",\"cooyvhtuqb\":\"dtwgabdxfkuzbwj\"},\"location\":\"lniibncg\",\"etag\":\"dvcdq\",\"kind\":\"tzbpyfao\",\"sku\":{\"name\":\"f\",\"tier\":\"Standard\",\"size\":\"cwmhjobzrfpr\",\"family\":\"dc\",\"capacity\":810182715},\"id\":\"tcvbzwgwhgk\",\"name\":\"soauoorssatfyb\",\"type\":\"pufdmxuqbdqn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,41 +39,41 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CommitmentPlan response = manager.commitmentPlans() - .createOrUpdateWithResponse("rslaatep", "wuj", "zgxqgqwlxr", + .createOrUpdateWithResponse("xq", "wrswyiljp", "bkgx", new CommitmentPlanInner() - .withProperties(new CommitmentPlanProperties().withCommitmentPlanGuid("vtqqy") + .withProperties(new CommitmentPlanProperties().withCommitmentPlanGuid("xre") .withHostingModel(HostingModel.WEB) - .withPlanType("teozejo") - .withCurrent(new CommitmentPeriod().withTier("orvvmvmcofnqh").withCount(1873528883)) - .withAutoRenew(true) - .withNext(new CommitmentPeriod().withTier("azg").withCount(709978094))) - .withTags(mapOf("epr", "klwzlw", "zfjsxscbd", "ejzltka", "nwsb", "xapgrcqebmvrdjom")) - .withLocation("dls") - .withKind("esdfedsb") - .withSku(new Sku().withName("ancoinmphymcqid") + .withPlanType("mcnltmwytkujsqyc") + .withCurrent(new CommitmentPeriod().withTier("xfabl").withCount(115043021)) + .withAutoRenew(false) + .withNext(new CommitmentPeriod().withTier("vumspbfsf").withCount(1780620224))) + .withTags(mapOf("trhthvazjpwex", "wugexojfccyl", "probzzxezmnrkjgp", "dr")) + .withLocation("uxsphlokfpm") + .withKind("vfbhwb") + .withSku(new Sku().withName("ufvcgnrgl") .withTier(SkuTier.BASIC) - .withSize("dhqnufbxweiib") - .withFamily("ojovfnybydh") - .withCapacity(1716722377)), + .withSize("yambhb") + .withFamily("ebzx") + .withCapacity(1013124028)), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jyczcmtagelajdyo", response.properties().commitmentPlanGuid()); + Assertions.assertEquals("ghnysvlpyeuu", response.properties().commitmentPlanGuid()); Assertions.assertEquals(HostingModel.DISCONNECTED_CONTAINER, response.properties().hostingModel()); - Assertions.assertEquals("yxqfmzsizzhravr", response.properties().planType()); - Assertions.assertEquals("jymgqbgcxhn", response.properties().current().tier()); - Assertions.assertEquals(1913452551, response.properties().current().count()); - Assertions.assertFalse(response.properties().autoRenew()); - Assertions.assertEquals("shkp", response.properties().next().tier()); - Assertions.assertEquals(1965532334, response.properties().next().count()); - Assertions.assertEquals("aqgoqb", response.tags().get("iuycsbskowk")); - Assertions.assertEquals("plhpevasynt", response.location()); - Assertions.assertEquals("lbqrvvbqvknmpecq", response.kind()); - Assertions.assertEquals("iqasif", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("nstlpwqpjn", response.sku().size()); - Assertions.assertEquals("khtupsvyou", response.sku().family()); - Assertions.assertEquals(1561703244, response.sku().capacity()); + Assertions.assertEquals("ixqbolxvhhyqqeg", response.properties().planType()); + Assertions.assertEquals("grznmginmtsd", response.properties().current().tier()); + Assertions.assertEquals(1395159631, response.properties().current().count()); + Assertions.assertTrue(response.properties().autoRenew()); + Assertions.assertEquals("epfbhtleberpylje", response.properties().next().tier()); + Assertions.assertEquals(1905710795, response.properties().next().count()); + Assertions.assertEquals("gaedaoiq", response.tags().get("lm")); + Assertions.assertEquals("lniibncg", response.location()); + Assertions.assertEquals("tzbpyfao", response.kind()); + Assertions.assertEquals("f", response.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); + Assertions.assertEquals("cwmhjobzrfpr", response.sku().size()); + Assertions.assertEquals("dc", response.sku().family()); + Assertions.assertEquals(810182715, response.sku().capacity()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteAssociationMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteAssociationMockTests.java index 5db6325d1963..12aa180b5687 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteAssociationMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteAssociationMockTests.java @@ -27,7 +27,8 @@ public void testDeleteAssociation() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.commitmentPlans().deleteAssociation("w", "njcytesmfucrtfod", "hua", com.azure.core.util.Context.NONE); + manager.commitmentPlans() + .deleteAssociation("mjpequlr", "zaudgjtfbclakkuc", "dwnhczbutoucgjti", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteMockTests.java index 66f9052b93c9..8c57ffe04b13 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteMockTests.java @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.commitmentPlans() - .delete("gfzdgjfcycrsvl", "yyhigqkzjuqw", "ajquzxpixhyoi", com.azure.core.util.Context.NONE); + manager.commitmentPlans().delete("sttuxv", "fqayopbtsix", "gvbhxmndztgs", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeletePlanMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeletePlanMockTests.java index be8d7ac287b7..e25ac93d1271 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeletePlanMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeletePlanMockTests.java @@ -27,7 +27,7 @@ public void testDeletePlan() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.commitmentPlans().deletePlan("ewxtrl", "bpxya", com.azure.core.util.Context.NONE); + manager.commitmentPlans().deletePlan("udyhbrj", "talxrdsj", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetAssociationWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetAssociationWithResponseMockTests.java index 2250254f7eeb..44b8d82d8296 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetAssociationWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetAssociationWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class CommitmentPlansGetAssociationWithResponseMockTests { @Test public void testGetAssociationWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"accountId\":\"dizhrjqfyaytvsly\"},\"etag\":\"cgniuarlc\",\"tags\":{\"iocwdgujj\":\"gsxf\"},\"id\":\"fgrzx\",\"name\":\"arcbpae\",\"type\":\"zqsym\"}"; + = "{\"properties\":{\"accountId\":\"ac\"},\"etag\":\"kvnrpbjrmvgoqpl\",\"tags\":{\"llcz\":\"umkz\"},\"id\":\"rwnhkgqggoxsst\",\"name\":\"ivrakfrryn\",\"type\":\"cwmhlymgnukxrk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetAssociationWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CommitmentPlanAccountAssociation response = manager.commitmentPlans() - .getAssociationWithResponse("x", "kdlhzwhc", "kvbos", com.azure.core.util.Context.NONE) + .getAssociationWithResponse("wlyeyz", "udsqcmhnx", "zbuw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gsxf", response.tags().get("iocwdgujj")); - Assertions.assertEquals("dizhrjqfyaytvsly", response.accountId()); + Assertions.assertEquals("umkz", response.tags().get("llcz")); + Assertions.assertEquals("ac", response.accountId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetByResourceGroupWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetByResourceGroupWithResponseMockTests.java index 77ed5de27192..357fe4ffa253 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetByResourceGroupWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetByResourceGroupWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class CommitmentPlansGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Moving\",\"commitmentPlanGuid\":\"skkqjmxptuei\",\"hostingModel\":\"Web\",\"planType\":\"kwdrqmrp\",\"current\":{\"tier\":\"uonjkk\",\"count\":453532420,\"quota\":{\"quantity\":579511915547435369,\"unit\":\"vpxjoegcj\"},\"startDate\":\"lleuidpmtonvhgn\",\"endDate\":\"me\"},\"autoRenew\":true,\"next\":{\"tier\":\"jba\",\"count\":1308169461,\"quota\":{\"quantity\":8858029119721851024,\"unit\":\"a\"},\"startDate\":\"c\",\"endDate\":\"iuaiqpm\"},\"last\":{\"tier\":\"zhrchx\",\"count\":1363959368,\"quota\":{\"quantity\":2851107843272978632,\"unit\":\"wlvi\"},\"startDate\":\"mxm\",\"endDate\":\"tqd\"},\"provisioningIssues\":[\"pdviscotyxbrii\",\"efndslvrqoemwsi\",\"eailwdqmqf\"]},\"tags\":{\"kuuyiuyuaf\":\"otmfxlkdlgwgna\",\"hdcfm\":\"xlxicwgp\"},\"location\":\"cfasfodropal\",\"etag\":\"gt\",\"kind\":\"us\",\"sku\":{\"name\":\"gqrnt\",\"tier\":\"Standard\",\"size\":\"rcjlvkrkegtyczup\",\"family\":\"yxlz\",\"capacity\":1784085385},\"id\":\"deeqzqvabmh\",\"name\":\"s\",\"type\":\"xduetbapfc\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"commitmentPlanGuid\":\"qt\",\"hostingModel\":\"DisconnectedContainer\",\"planType\":\"ilhvtozyagjj\",\"current\":{\"tier\":\"bylhy\",\"count\":225747362,\"quota\":{\"quantity\":5888657924737855461,\"unit\":\"q\"},\"startDate\":\"wtrdgs\",\"endDate\":\"vq\"},\"autoRenew\":true,\"next\":{\"tier\":\"nwxlwm\",\"count\":1689763711,\"quota\":{\"quantity\":3736560033386256218,\"unit\":\"hceopvkvtwf\"},\"startDate\":\"sobpbo\",\"endDate\":\"mmlcdyarng\"},\"last\":{\"tier\":\"fwblqhxka\",\"count\":1866211644,\"quota\":{\"quantity\":8716346518382932716,\"unit\":\"pyvaosdkluwzx\"},\"startDate\":\"gzvtyevjhubno\",\"endDate\":\"uqisqsqkpd\"},\"provisioningIssues\":[\"y\",\"pnml\",\"iqcpszpmcvq\"]},\"tags\":{\"aotcgbzxmbtp\":\"dmvxyrxdhgvqojb\",\"yidoxznvg\":\"efoi\",\"wsxmrszb\":\"dtmuuvd\"},\"location\":\"imxlpnerxrzuty\",\"etag\":\"urzaqmn\",\"kind\":\"qaeht\",\"sku\":{\"name\":\"jmbnvynf\",\"tier\":\"Standard\",\"size\":\"actedcglskak\",\"family\":\"id\",\"capacity\":270132942},\"id\":\"lrqmtlp\",\"name\":\"yxroiduyqypffmno\",\"type\":\"ic\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,24 +33,24 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CommitmentPlan response = manager.commitmentPlans() - .getByResourceGroupWithResponse("fdtncmspsanma", "eubkqiqmlf", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("ukib", "iglh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("skkqjmxptuei", response.properties().commitmentPlanGuid()); - Assertions.assertEquals(HostingModel.WEB, response.properties().hostingModel()); - Assertions.assertEquals("kwdrqmrp", response.properties().planType()); - Assertions.assertEquals("uonjkk", response.properties().current().tier()); - Assertions.assertEquals(453532420, response.properties().current().count()); + Assertions.assertEquals("qt", response.properties().commitmentPlanGuid()); + Assertions.assertEquals(HostingModel.DISCONNECTED_CONTAINER, response.properties().hostingModel()); + Assertions.assertEquals("ilhvtozyagjj", response.properties().planType()); + Assertions.assertEquals("bylhy", response.properties().current().tier()); + Assertions.assertEquals(225747362, response.properties().current().count()); Assertions.assertTrue(response.properties().autoRenew()); - Assertions.assertEquals("jba", response.properties().next().tier()); - Assertions.assertEquals(1308169461, response.properties().next().count()); - Assertions.assertEquals("otmfxlkdlgwgna", response.tags().get("kuuyiuyuaf")); - Assertions.assertEquals("cfasfodropal", response.location()); - Assertions.assertEquals("us", response.kind()); - Assertions.assertEquals("gqrnt", response.sku().name()); + Assertions.assertEquals("nwxlwm", response.properties().next().tier()); + Assertions.assertEquals(1689763711, response.properties().next().count()); + Assertions.assertEquals("dmvxyrxdhgvqojb", response.tags().get("aotcgbzxmbtp")); + Assertions.assertEquals("imxlpnerxrzuty", response.location()); + Assertions.assertEquals("qaeht", response.kind()); + Assertions.assertEquals("jmbnvynf", response.sku().name()); Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("rcjlvkrkegtyczup", response.sku().size()); - Assertions.assertEquals("yxlz", response.sku().family()); - Assertions.assertEquals(1784085385, response.sku().capacity()); + Assertions.assertEquals("actedcglskak", response.sku().size()); + Assertions.assertEquals("id", response.sku().family()); + Assertions.assertEquals(270132942, response.sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetWithResponseMockTests.java index b8b72d0f3290..2c62bf414244 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class CommitmentPlansGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"commitmentPlanGuid\":\"zmk\",\"hostingModel\":\"ProvisionedWeb\",\"planType\":\"xx\",\"current\":{\"tier\":\"ehkho\",\"count\":476508124,\"quota\":{\"quantity\":6977365937395422215,\"unit\":\"owpcbapnpxraqawb\"},\"startDate\":\"spfeylqlocvvuje\",\"endDate\":\"yglxrkgjnm\"},\"autoRenew\":false,\"next\":{\"tier\":\"avxjfiuofpiei\",\"count\":600988126,\"quota\":{\"quantity\":2831530137367294313,\"unit\":\"wjopackyhydvik\"},\"startDate\":\"ngpmillxgjsci\",\"endDate\":\"gsoriobij\"},\"last\":{\"tier\":\"dye\",\"count\":1621346505,\"quota\":{\"quantity\":5843727238923943844,\"unit\":\"yrgwy\"},\"startDate\":\"io\",\"endDate\":\"weoftnorw\"},\"provisioningIssues\":[\"s\",\"octqkmvjanxvzf\"]},\"tags\":{\"wosstfjxtvlxx\":\"tj\",\"iomxeezw\":\"qfcwr\",\"egmxdbsohc\":\"hjmbji\",\"z\":\"hpyvdkgdet\"},\"location\":\"anzbjekwuyckyvn\",\"etag\":\"smuffiwjb\",\"kind\":\"vbp\",\"sku\":{\"name\":\"jqjtotd\",\"tier\":\"Enterprise\",\"size\":\"cslhwuusi\",\"family\":\"ktybh\",\"capacity\":498691248},\"id\":\"dhhxomil\",\"name\":\"dxjxdu\",\"type\":\"xwjwilm\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"commitmentPlanGuid\":\"cvcewb\",\"hostingModel\":\"DisconnectedContainer\",\"planType\":\"gsjs\",\"current\":{\"tier\":\"rncmazdfsqxh\",\"count\":982275641,\"quota\":{\"quantity\":7906872327025920638,\"unit\":\"r\"},\"startDate\":\"vgrszr\",\"endDate\":\"tdrcwgzwl\"},\"autoRenew\":false,\"next\":{\"tier\":\"hfixa\",\"count\":175973002,\"quota\":{\"quantity\":5695898263810949122,\"unit\":\"mhpfywvy\"},\"startDate\":\"qpzfzxsoxin\",\"endDate\":\"jlzkdrocqsxy\"},\"last\":{\"tier\":\"tcmiwd\",\"count\":1711042937,\"quota\":{\"quantity\":3118135325605234660,\"unit\":\"lajamca\"},\"startDate\":\"hftpzcrrykll\",\"endDate\":\"nqanhkigglclwal\"},\"provisioningIssues\":[\"bhgzphetxdq\"]},\"tags\":{\"qzjval\":\"cta\",\"ibiwksdegyxsb\":\"cx\"},\"location\":\"zvoikvntwczf\",\"etag\":\"ushlcxpblalh\",\"kind\":\"zpfkis\",\"sku\":{\"name\":\"idqzsaaoqdsgpto\",\"tier\":\"Standard\",\"size\":\"fiafc\",\"family\":\"r\",\"capacity\":1211454767},\"id\":\"jzzca\",\"name\":\"ijolbuauktwieope\",\"type\":\"e\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,24 +33,24 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CommitmentPlan response = manager.commitmentPlans() - .getWithResponse("yms", "vyljurkeposehqq", "lmpctwj", com.azure.core.util.Context.NONE) + .getWithResponse("bjop", "ouhbq", "zkqxsalu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zmk", response.properties().commitmentPlanGuid()); - Assertions.assertEquals(HostingModel.PROVISIONED_WEB, response.properties().hostingModel()); - Assertions.assertEquals("xx", response.properties().planType()); - Assertions.assertEquals("ehkho", response.properties().current().tier()); - Assertions.assertEquals(476508124, response.properties().current().count()); + Assertions.assertEquals("cvcewb", response.properties().commitmentPlanGuid()); + Assertions.assertEquals(HostingModel.DISCONNECTED_CONTAINER, response.properties().hostingModel()); + Assertions.assertEquals("gsjs", response.properties().planType()); + Assertions.assertEquals("rncmazdfsqxh", response.properties().current().tier()); + Assertions.assertEquals(982275641, response.properties().current().count()); Assertions.assertFalse(response.properties().autoRenew()); - Assertions.assertEquals("avxjfiuofpiei", response.properties().next().tier()); - Assertions.assertEquals(600988126, response.properties().next().count()); - Assertions.assertEquals("tj", response.tags().get("wosstfjxtvlxx")); - Assertions.assertEquals("anzbjekwuyckyvn", response.location()); - Assertions.assertEquals("vbp", response.kind()); - Assertions.assertEquals("jqjtotd", response.sku().name()); - Assertions.assertEquals(SkuTier.ENTERPRISE, response.sku().tier()); - Assertions.assertEquals("cslhwuusi", response.sku().size()); - Assertions.assertEquals("ktybh", response.sku().family()); - Assertions.assertEquals(498691248, response.sku().capacity()); + Assertions.assertEquals("hfixa", response.properties().next().tier()); + Assertions.assertEquals(175973002, response.properties().next().count()); + Assertions.assertEquals("cta", response.tags().get("qzjval")); + Assertions.assertEquals("zvoikvntwczf", response.location()); + Assertions.assertEquals("zpfkis", response.kind()); + Assertions.assertEquals("idqzsaaoqdsgpto", response.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); + Assertions.assertEquals("fiafc", response.sku().size()); + Assertions.assertEquals("r", response.sku().family()); + Assertions.assertEquals(1211454767, response.sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListAssociationsMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListAssociationsMockTests.java index dd1e230e1454..85dc401af598 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListAssociationsMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListAssociationsMockTests.java @@ -22,7 +22,7 @@ public final class CommitmentPlansListAssociationsMockTests { @Test public void testListAssociations() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"accountId\":\"yrudmahswtvd\"},\"etag\":\"bqssgfen\",\"tags\":{\"qjchivd\":\"xbvw\",\"xndmuvar\":\"ija\"},\"id\":\"mzjotprrmuh\",\"name\":\"uhtuz\",\"type\":\"xiwy\"}]}"; + = "{\"value\":[{\"properties\":{\"accountId\":\"izedvbiabvns\"},\"etag\":\"ekzyqxadyfhb\",\"tags\":{\"aqjsgyzstujr\":\"hojqttbspvkhg\",\"sf\":\"xrk\",\"qwrldaxur\":\"rlduyehiiittugy\"},\"id\":\"azcsozjvx\",\"name\":\"zciggbnvtxofwa\",\"type\":\"zyxwhoe\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListAssociations() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.commitmentPlans().listAssociations("zmzivrtrfzhhez", "hjud", com.azure.core.util.Context.NONE); + = manager.commitmentPlans().listAssociations("jwayhi", "qqwwvgwks", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xbvw", response.iterator().next().tags().get("qjchivd")); - Assertions.assertEquals("yrudmahswtvd", response.iterator().next().accountId()); + Assertions.assertEquals("hojqttbspvkhg", response.iterator().next().tags().get("aqjsgyzstujr")); + Assertions.assertEquals("izedvbiabvns", response.iterator().next().accountId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListByResourceGroupMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListByResourceGroupMockTests.java index 62db20b1f72b..1b545e7ba0d8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListByResourceGroupMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListByResourceGroupMockTests.java @@ -24,7 +24,7 @@ public final class CommitmentPlansListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"commitmentPlanGuid\":\"thmsritjbuig\",\"hostingModel\":\"ProvisionedWeb\",\"planType\":\"ozfvualjt\",\"current\":{\"tier\":\"vsdwsngkrfihscj\",\"count\":1558194925,\"quota\":{\"quantity\":8165037457184408783,\"unit\":\"wahfbwihbn\"},\"startDate\":\"em\",\"endDate\":\"nuqqkotauratnicp\"},\"autoRenew\":true,\"next\":{\"tier\":\"le\",\"count\":428838512,\"quota\":{\"quantity\":7461045408759500850,\"unit\":\"qlmfdg\"},\"startDate\":\"bbuypwovvvsflee\",\"endDate\":\"oqayrehjuqwv\"},\"last\":{\"tier\":\"rlzh\",\"count\":1181285194,\"quota\":{\"quantity\":1006431391406735688,\"unit\":\"qqzlxnqzubfo\"},\"startDate\":\"dbgmkfwmjcwte\",\"endDate\":\"hxwyrkbrehzlryn\"},\"provisioningIssues\":[\"ha\",\"kaeplrajubowu\",\"wevtjrieikmwla\",\"klfnisyxgucbmt\"]},\"tags\":{\"cyyuvtzrxzhclec\":\"scnnst\",\"pgidhzgyresgzsdt\":\"wtzqzcloyhy\"},\"location\":\"byorjplb\",\"etag\":\"ychakvy\",\"kind\":\"bqvum\",\"sku\":{\"name\":\"qj\",\"tier\":\"Enterprise\",\"size\":\"pmaxfnzlpqmpf\",\"family\":\"efvulblmr\",\"capacity\":2124568593},\"id\":\"prhfcaeo\",\"name\":\"ifq\",\"type\":\"ywjflobh\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"commitmentPlanGuid\":\"gusxxhdod\",\"hostingModel\":\"ConnectedContainer\",\"planType\":\"blvtb\",\"current\":{\"tier\":\"sbyidaelqpv\",\"count\":71103289,\"quota\":{\"quantity\":3319809436356294651,\"unit\":\"o\"},\"startDate\":\"oggdusxursui\",\"endDate\":\"xcjkcoqwczsy\"},\"autoRenew\":true,\"next\":{\"tier\":\"fwihvaan\",\"count\":384790753,\"quota\":{\"quantity\":1717661200146183306,\"unit\":\"dmfdvbbaexxjfwtg\"},\"startDate\":\"kkauigvmuafmc\",\"endDate\":\"edyueps\"},\"last\":{\"tier\":\"tidajjvyweocf\",\"count\":860123281,\"quota\":{\"quantity\":8583730318789378707,\"unit\":\"kyelsyasvfnkwmy\"},\"startDate\":\"jekrknfd\",\"endDate\":\"gjqyckgtxkrdtulc\"},\"provisioningIssues\":[\"dklotcsubmzo\"]},\"tags\":{\"chkxfpwhdysl\":\"vo\",\"qshwyqxridt\":\"klglmnnkkwa\",\"gxq\":\"bsaqjm\"},\"location\":\"ueuuylztpz\",\"etag\":\"zevjykofve\",\"kind\":\"fkhkqtwqlep\",\"sku\":{\"name\":\"zkca\",\"tier\":\"Free\",\"size\":\"c\",\"family\":\"o\",\"capacity\":1982419722},\"id\":\"wajnrtwzvaqkifm\",\"name\":\"awostfzknhr\",\"type\":\"m\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,23 +34,24 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.commitmentPlans().listByResourceGroup("kjpirgzxvbczw", com.azure.core.util.Context.NONE); + = manager.commitmentPlans().listByResourceGroup("h", com.azure.core.util.Context.NONE); - Assertions.assertEquals("thmsritjbuig", response.iterator().next().properties().commitmentPlanGuid()); - Assertions.assertEquals(HostingModel.PROVISIONED_WEB, response.iterator().next().properties().hostingModel()); - Assertions.assertEquals("ozfvualjt", response.iterator().next().properties().planType()); - Assertions.assertEquals("vsdwsngkrfihscj", response.iterator().next().properties().current().tier()); - Assertions.assertEquals(1558194925, response.iterator().next().properties().current().count()); + Assertions.assertEquals("gusxxhdod", response.iterator().next().properties().commitmentPlanGuid()); + Assertions.assertEquals(HostingModel.CONNECTED_CONTAINER, + response.iterator().next().properties().hostingModel()); + Assertions.assertEquals("blvtb", response.iterator().next().properties().planType()); + Assertions.assertEquals("sbyidaelqpv", response.iterator().next().properties().current().tier()); + Assertions.assertEquals(71103289, response.iterator().next().properties().current().count()); Assertions.assertTrue(response.iterator().next().properties().autoRenew()); - Assertions.assertEquals("le", response.iterator().next().properties().next().tier()); - Assertions.assertEquals(428838512, response.iterator().next().properties().next().count()); - Assertions.assertEquals("scnnst", response.iterator().next().tags().get("cyyuvtzrxzhclec")); - Assertions.assertEquals("byorjplb", response.iterator().next().location()); - Assertions.assertEquals("bqvum", response.iterator().next().kind()); - Assertions.assertEquals("qj", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.ENTERPRISE, response.iterator().next().sku().tier()); - Assertions.assertEquals("pmaxfnzlpqmpf", response.iterator().next().sku().size()); - Assertions.assertEquals("efvulblmr", response.iterator().next().sku().family()); - Assertions.assertEquals(2124568593, response.iterator().next().sku().capacity()); + Assertions.assertEquals("fwihvaan", response.iterator().next().properties().next().tier()); + Assertions.assertEquals(384790753, response.iterator().next().properties().next().count()); + Assertions.assertEquals("vo", response.iterator().next().tags().get("chkxfpwhdysl")); + Assertions.assertEquals("ueuuylztpz", response.iterator().next().location()); + Assertions.assertEquals("fkhkqtwqlep", response.iterator().next().kind()); + Assertions.assertEquals("zkca", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); + Assertions.assertEquals("c", response.iterator().next().sku().size()); + Assertions.assertEquals("o", response.iterator().next().sku().family()); + Assertions.assertEquals(1982419722, response.iterator().next().sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListMockTests.java index ad1f85d4604d..d0ae0ba2456d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListMockTests.java @@ -24,7 +24,7 @@ public final class CommitmentPlansListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"commitmentPlanGuid\":\"kwwnthropmdud\",\"hostingModel\":\"ConnectedContainer\",\"planType\":\"rzt\",\"current\":{\"tier\":\"jhf\",\"count\":645995465,\"quota\":{\"quantity\":3121890628281685252,\"unit\":\"ouergaghp\"},\"startDate\":\"xkpyehhfdyldh\",\"endDate\":\"edzfzqiyuqhtdere\"},\"autoRenew\":false,\"next\":{\"tier\":\"kzwhpj\",\"count\":1952223877,\"quota\":{\"quantity\":3059948025256932914,\"unit\":\"mxrfomckew\"},\"startDate\":\"yifop\",\"endDate\":\"jjtpdyzoutxfptof\"},\"last\":{\"tier\":\"uywezygvadg\",\"count\":1313276357,\"quota\":{\"quantity\":7480466499693071564,\"unit\":\"pytpmpvdnogehlu\"},\"startDate\":\"ortbnukkfax\",\"endDate\":\"vbxxyjisskobqoc\"},\"provisioningIssues\":[\"ioewyhxes\"]},\"tags\":{\"xm\":\"rkdpsqeqfb\",\"rujbjpppktlp\":\"ses\",\"mthieatnejrnmin\":\"ib\"},\"location\":\"plgtkihonikzsrzf\",\"etag\":\"jilzfbpntogke\",\"kind\":\"ck\",\"sku\":{\"name\":\"mcarm\",\"tier\":\"Enterprise\",\"size\":\"xkwyk\",\"family\":\"dndx\",\"capacity\":470451433},\"id\":\"kggapvdgtfpeer\",\"name\":\"cd\",\"type\":\"rnrnjrcufmbgacnr\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"commitmentPlanGuid\":\"pgbrhbjdqknhq\",\"hostingModel\":\"Web\",\"planType\":\"puwnnohmmzngocfr\",\"current\":{\"tier\":\"pwyiulayno\",\"count\":946012017,\"quota\":{\"quantity\":7150761293896543518,\"unit\":\"ttpfsmwgsgh\"},\"startDate\":\"cum\",\"endDate\":\"dau\"},\"autoRenew\":false,\"next\":{\"tier\":\"eot\",\"count\":1721265983,\"quota\":{\"quantity\":8612690025875075532,\"unit\":\"jdljlkqhvkrb\"},\"startDate\":\"uast\",\"endDate\":\"klpruulhglt\"},\"last\":{\"tier\":\"wx\",\"count\":987112633,\"quota\":{\"quantity\":4872804332618414524,\"unit\":\"yskye\"},\"startDate\":\"afxcz\",\"endDate\":\"cckwrtwle\"},\"provisioningIssues\":[\"eszr\",\"lhpdhwynctaczcnj\",\"mbbfnv\"]},\"tags\":{\"nkrtikl\":\"tzo\",\"hql\":\"mn\"},\"location\":\"qksyiibhyxwbgbu\",\"etag\":\"vqdorbccqcd\",\"kind\":\"hojvlirkn\",\"sku\":{\"name\":\"osa\",\"tier\":\"Enterprise\",\"size\":\"nagzlg\",\"family\":\"aixihzqjjtsmuyd\",\"capacity\":1244552542},\"id\":\"kacybdueurgmcdcp\",\"name\":\"shlojermh\",\"type\":\"icsbfdjhyaakn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,24 +34,23 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.commitmentPlans().list("nfdbgsoscienezf", "bennmfkbp", com.azure.core.util.Context.NONE); + = manager.commitmentPlans().list("jay", "mar", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kwwnthropmdud", response.iterator().next().properties().commitmentPlanGuid()); - Assertions.assertEquals(HostingModel.CONNECTED_CONTAINER, - response.iterator().next().properties().hostingModel()); - Assertions.assertEquals("rzt", response.iterator().next().properties().planType()); - Assertions.assertEquals("jhf", response.iterator().next().properties().current().tier()); - Assertions.assertEquals(645995465, response.iterator().next().properties().current().count()); + Assertions.assertEquals("pgbrhbjdqknhq", response.iterator().next().properties().commitmentPlanGuid()); + Assertions.assertEquals(HostingModel.WEB, response.iterator().next().properties().hostingModel()); + Assertions.assertEquals("puwnnohmmzngocfr", response.iterator().next().properties().planType()); + Assertions.assertEquals("pwyiulayno", response.iterator().next().properties().current().tier()); + Assertions.assertEquals(946012017, response.iterator().next().properties().current().count()); Assertions.assertFalse(response.iterator().next().properties().autoRenew()); - Assertions.assertEquals("kzwhpj", response.iterator().next().properties().next().tier()); - Assertions.assertEquals(1952223877, response.iterator().next().properties().next().count()); - Assertions.assertEquals("rkdpsqeqfb", response.iterator().next().tags().get("xm")); - Assertions.assertEquals("plgtkihonikzsrzf", response.iterator().next().location()); - Assertions.assertEquals("ck", response.iterator().next().kind()); - Assertions.assertEquals("mcarm", response.iterator().next().sku().name()); + Assertions.assertEquals("eot", response.iterator().next().properties().next().tier()); + Assertions.assertEquals(1721265983, response.iterator().next().properties().next().count()); + Assertions.assertEquals("tzo", response.iterator().next().tags().get("nkrtikl")); + Assertions.assertEquals("qksyiibhyxwbgbu", response.iterator().next().location()); + Assertions.assertEquals("hojvlirkn", response.iterator().next().kind()); + Assertions.assertEquals("osa", response.iterator().next().sku().name()); Assertions.assertEquals(SkuTier.ENTERPRISE, response.iterator().next().sku().tier()); - Assertions.assertEquals("xkwyk", response.iterator().next().sku().size()); - Assertions.assertEquals("dndx", response.iterator().next().sku().family()); - Assertions.assertEquals(470451433, response.iterator().next().sku().capacity()); + Assertions.assertEquals("nagzlg", response.iterator().next().sku().size()); + Assertions.assertEquals("aixihzqjjtsmuyd", response.iterator().next().sku().family()); + Assertions.assertEquals(1244552542, response.iterator().next().sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListPlansBySubscriptionMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListPlansBySubscriptionMockTests.java index 4b5329debaf2..97d3250e0d99 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListPlansBySubscriptionMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListPlansBySubscriptionMockTests.java @@ -24,7 +24,7 @@ public final class CommitmentPlansListPlansBySubscriptionMockTests { @Test public void testListPlansBySubscription() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"commitmentPlanGuid\":\"mfecorkfrocgbmxl\",\"hostingModel\":\"ProvisionedWeb\",\"planType\":\"ezb\",\"current\":{\"tier\":\"ylslurb\",\"count\":1489872631,\"quota\":{\"quantity\":3152608503378309618,\"unit\":\"gdz\"},\"startDate\":\"sc\",\"endDate\":\"qyvoupr\"},\"autoRenew\":true,\"next\":{\"tier\":\"ss\",\"count\":701327966,\"quota\":{\"quantity\":4251050188749376214,\"unit\":\"vrxpfdu\"},\"startDate\":\"lhg\",\"endDate\":\"vpbfjpoqzuc\"},\"last\":{\"tier\":\"ucz\",\"count\":1475019917,\"quota\":{\"quantity\":5525172486162820362,\"unit\":\"mvhvz\"},\"startDate\":\"l\",\"endDate\":\"rnqujywzcqy\"},\"provisioningIssues\":[\"nwsvhbngqiwye\",\"tobdrrpnre\"]},\"tags\":{\"tt\":\"nsbfjhhlwtpkvege\",\"qsttewuvcysjeuf\":\"zkgtzqn\",\"lpditfnonpi\":\"x\"},\"location\":\"xlvrhprrvbwonleq\",\"etag\":\"vtlrvbstph\",\"kind\":\"kuninttlnrjds\",\"sku\":{\"name\":\"buziciqppoqvgp\",\"tier\":\"Basic\",\"size\":\"hwfwjnox\",\"family\":\"xtfnress\",\"capacity\":283413893},\"id\":\"ckncjmgvsnvbtqd\",\"name\":\"fmjymjnh\",\"type\":\"luqllbsupub\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"commitmentPlanGuid\":\"vdscnhemv\",\"hostingModel\":\"ConnectedContainer\",\"planType\":\"qwypvndrwb\",\"current\":{\"tier\":\"tggrss\",\"count\":1869224076,\"quota\":{\"quantity\":2080855753944211216,\"unit\":\"jmu\"},\"startDate\":\"vecvzts\",\"endDate\":\"gmusaictdscnkzzo\"},\"autoRenew\":true,\"next\":{\"tier\":\"clzeq\",\"count\":855961418,\"quota\":{\"quantity\":2685772204942604455,\"unit\":\"qixbnjrqvzyuexo\"},\"startDate\":\"nynpameudpabcre\",\"endDate\":\"zosgyjxvcvasorm\"},\"last\":{\"tier\":\"zvdube\",\"count\":1122211076,\"quota\":{\"quantity\":4468547287343585935,\"unit\":\"uvecovsd\"},\"startDate\":\"zrtdbakr\",\"endDate\":\"mz\"},\"provisioningIssues\":[\"pkeqsifj\",\"clngy\",\"nhr\",\"ombcdtajdopggo\"]},\"tags\":{\"yrlmwkptsk\":\"oqtrotpvclpo\"},\"location\":\"jgvhxcc\",\"etag\":\"kakmkookbputmgvm\",\"kind\":\"akmlwktfowzkroyr\",\"sku\":{\"name\":\"r\",\"tier\":\"Basic\",\"size\":\"qjimejtgzjxxlfej\",\"family\":\"uqloiwyayyzivrmi\",\"capacity\":801413968},\"id\":\"lhchwhrktjleif\",\"name\":\"bfi\",\"type\":\"lhxfnsmycj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,21 +36,22 @@ public void testListPlansBySubscription() throws Exception { PagedIterable response = manager.commitmentPlans().listPlansBySubscription(com.azure.core.util.Context.NONE); - Assertions.assertEquals("mfecorkfrocgbmxl", response.iterator().next().properties().commitmentPlanGuid()); - Assertions.assertEquals(HostingModel.PROVISIONED_WEB, response.iterator().next().properties().hostingModel()); - Assertions.assertEquals("ezb", response.iterator().next().properties().planType()); - Assertions.assertEquals("ylslurb", response.iterator().next().properties().current().tier()); - Assertions.assertEquals(1489872631, response.iterator().next().properties().current().count()); + Assertions.assertEquals("vdscnhemv", response.iterator().next().properties().commitmentPlanGuid()); + Assertions.assertEquals(HostingModel.CONNECTED_CONTAINER, + response.iterator().next().properties().hostingModel()); + Assertions.assertEquals("qwypvndrwb", response.iterator().next().properties().planType()); + Assertions.assertEquals("tggrss", response.iterator().next().properties().current().tier()); + Assertions.assertEquals(1869224076, response.iterator().next().properties().current().count()); Assertions.assertTrue(response.iterator().next().properties().autoRenew()); - Assertions.assertEquals("ss", response.iterator().next().properties().next().tier()); - Assertions.assertEquals(701327966, response.iterator().next().properties().next().count()); - Assertions.assertEquals("nsbfjhhlwtpkvege", response.iterator().next().tags().get("tt")); - Assertions.assertEquals("xlvrhprrvbwonleq", response.iterator().next().location()); - Assertions.assertEquals("kuninttlnrjds", response.iterator().next().kind()); - Assertions.assertEquals("buziciqppoqvgp", response.iterator().next().sku().name()); + Assertions.assertEquals("clzeq", response.iterator().next().properties().next().tier()); + Assertions.assertEquals(855961418, response.iterator().next().properties().next().count()); + Assertions.assertEquals("oqtrotpvclpo", response.iterator().next().tags().get("yrlmwkptsk")); + Assertions.assertEquals("jgvhxcc", response.iterator().next().location()); + Assertions.assertEquals("akmlwktfowzkroyr", response.iterator().next().kind()); + Assertions.assertEquals("r", response.iterator().next().sku().name()); Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("hwfwjnox", response.iterator().next().sku().size()); - Assertions.assertEquals("xtfnress", response.iterator().next().sku().family()); - Assertions.assertEquals(283413893, response.iterator().next().sku().capacity()); + Assertions.assertEquals("qjimejtgzjxxlfej", response.iterator().next().sku().size()); + Assertions.assertEquals("uqloiwyayyzivrmi", response.iterator().next().sku().family()); + Assertions.assertEquals(801413968, response.iterator().next().sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentQuotaTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentQuotaTests.java index 6dbf38eaebda..6f9da6fe2e87 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentQuotaTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentQuotaTests.java @@ -11,9 +11,9 @@ public final class CommitmentQuotaTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CommitmentQuota model = BinaryData.fromString("{\"quantity\":6615741978857229687,\"unit\":\"zg\"}") + CommitmentQuota model = BinaryData.fromString("{\"quantity\":456815432362653733,\"unit\":\"df\"}") .toObject(CommitmentQuota.class); - Assertions.assertEquals(6615741978857229687L, model.quantity()); - Assertions.assertEquals("zg", model.unit()); + Assertions.assertEquals(456815432362653733L, model.quantity()); + Assertions.assertEquals("df", model.unit()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTierInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTierInnerTests.java index 41df248fa8c1..cdc5c67405da 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTierInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTierInnerTests.java @@ -13,17 +13,17 @@ public final class CommitmentTierInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommitmentTierInner model = BinaryData.fromString( - "{\"kind\":\"kpfuofix\",\"skuName\":\"pcfykkpy\",\"hostingModel\":\"DisconnectedContainer\",\"planType\":\"wmpjprd\",\"tier\":\"rpcfpcfjfwzl\",\"maxCount\":1236886507,\"quota\":{\"quantity\":2253041768553861097,\"unit\":\"peyamnnidmdiaw\"},\"cost\":{\"commitmentMeterId\":\"kzrn\",\"overageMeterId\":\"kctd\"}}") + "{\"kind\":\"l\",\"skuName\":\"iomqoqpepiaea\",\"hostingModel\":\"ConnectedContainer\",\"planType\":\"rgdtpeqnacyheqw\",\"tier\":\"qq\",\"maxCount\":1737059096,\"quota\":{\"quantity\":4637890487093031437,\"unit\":\"ozf\"},\"cost\":{\"commitmentMeterId\":\"wmbupyvqyvliq\",\"overageMeterId\":\"psejbsvsiaies\"}}") .toObject(CommitmentTierInner.class); - Assertions.assertEquals("kpfuofix", model.kind()); - Assertions.assertEquals("pcfykkpy", model.skuName()); - Assertions.assertEquals(HostingModel.DISCONNECTED_CONTAINER, model.hostingModel()); - Assertions.assertEquals("wmpjprd", model.planType()); - Assertions.assertEquals("rpcfpcfjfwzl", model.tier()); - Assertions.assertEquals(1236886507, model.maxCount()); - Assertions.assertEquals(2253041768553861097L, model.quota().quantity()); - Assertions.assertEquals("peyamnnidmdiaw", model.quota().unit()); - Assertions.assertEquals("kzrn", model.cost().commitmentMeterId()); - Assertions.assertEquals("kctd", model.cost().overageMeterId()); + Assertions.assertEquals("l", model.kind()); + Assertions.assertEquals("iomqoqpepiaea", model.skuName()); + Assertions.assertEquals(HostingModel.CONNECTED_CONTAINER, model.hostingModel()); + Assertions.assertEquals("rgdtpeqnacyheqw", model.planType()); + Assertions.assertEquals("qq", model.tier()); + Assertions.assertEquals(1737059096, model.maxCount()); + Assertions.assertEquals(4637890487093031437L, model.quota().quantity()); + Assertions.assertEquals("ozf", model.quota().unit()); + Assertions.assertEquals("wmbupyvqyvliq", model.cost().commitmentMeterId()); + Assertions.assertEquals("psejbsvsiaies", model.cost().overageMeterId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTierListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTierListResultTests.java index 02b0eb9ddc5b..f9d650dd6a47 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTierListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTierListResultTests.java @@ -12,8 +12,8 @@ public final class CommitmentTierListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommitmentTierListResult model = BinaryData.fromString( - "{\"nextLink\":\"ilyrzoxp\",\"value\":[{\"kind\":\"frolq\",\"skuName\":\"nkiuajewnah\",\"hostingModel\":\"ProvisionedWeb\",\"planType\":\"jmztnlmso\",\"tier\":\"tmvecdhdyswcrptv\",\"maxCount\":514575285,\"quota\":{\"quantity\":2680840819981566847,\"unit\":\"gsrgkrfizr\"},\"cost\":{\"commitmentMeterId\":\"lptyuqhr\",\"overageMeterId\":\"cs\"}}]}") + "{\"nextLink\":\"mefgvqcpdwjgqux\",\"value\":[{\"kind\":\"landkdcdjhunhgh\",\"skuName\":\"awnrrnquoxsotir\",\"hostingModel\":\"ProvisionedWeb\",\"planType\":\"eobfsxstcyilbvzm\",\"tier\":\"cjzlquzexokjxebj\",\"maxCount\":1964355203,\"quota\":{\"quantity\":8319276055113449087,\"unit\":\"wmvogljsv\"},\"cost\":{\"commitmentMeterId\":\"idnwceha\",\"overageMeterId\":\"do\"}}]}") .toObject(CommitmentTierListResult.class); - Assertions.assertEquals("ilyrzoxp", model.nextLink()); + Assertions.assertEquals("mefgvqcpdwjgqux", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListMockTests.java index 819d87bb4dc6..0e19d48aa835 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListMockTests.java @@ -23,7 +23,7 @@ public final class CommitmentTiersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"kind\":\"kbyws\",\"skuName\":\"qfmxbdjkmn\",\"hostingModel\":\"ProvisionedWeb\",\"planType\":\"nowxhyvdbrdvsv\",\"tier\":\"btycvl\",\"maxCount\":1541135169,\"quota\":{\"quantity\":2461501474778652233,\"unit\":\"rcthypepxs\"},\"cost\":{\"commitmentMeterId\":\"d\",\"overageMeterId\":\"csdvkymktc\"}}]}"; + = "{\"value\":[{\"kind\":\"dwz\",\"skuName\":\"gkw\",\"hostingModel\":\"Web\",\"planType\":\"mz\",\"tier\":\"yfiqiidxcorjvudy\",\"maxCount\":804075156,\"quota\":{\"quantity\":122012109169706075,\"unit\":\"ayiq\"},\"cost\":{\"commitmentMeterId\":\"kmmxzifbqgqexo\",\"overageMeterId\":\"zrt\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,17 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.commitmentTiers().list("ldhfrerkqpyf", com.azure.core.util.Context.NONE); + = manager.commitmentTiers().list("ukfaj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kbyws", response.iterator().next().kind()); - Assertions.assertEquals("qfmxbdjkmn", response.iterator().next().skuName()); - Assertions.assertEquals(HostingModel.PROVISIONED_WEB, response.iterator().next().hostingModel()); - Assertions.assertEquals("nowxhyvdbrdvsv", response.iterator().next().planType()); - Assertions.assertEquals("btycvl", response.iterator().next().tier()); - Assertions.assertEquals(1541135169, response.iterator().next().maxCount()); - Assertions.assertEquals(2461501474778652233L, response.iterator().next().quota().quantity()); - Assertions.assertEquals("rcthypepxs", response.iterator().next().quota().unit()); - Assertions.assertEquals("d", response.iterator().next().cost().commitmentMeterId()); - Assertions.assertEquals("csdvkymktc", response.iterator().next().cost().overageMeterId()); + Assertions.assertEquals("dwz", response.iterator().next().kind()); + Assertions.assertEquals("gkw", response.iterator().next().skuName()); + Assertions.assertEquals(HostingModel.WEB, response.iterator().next().hostingModel()); + Assertions.assertEquals("mz", response.iterator().next().planType()); + Assertions.assertEquals("yfiqiidxcorjvudy", response.iterator().next().tier()); + Assertions.assertEquals(804075156, response.iterator().next().maxCount()); + Assertions.assertEquals(122012109169706075L, response.iterator().next().quota().quantity()); + Assertions.assertEquals("ayiq", response.iterator().next().quota().unit()); + Assertions.assertEquals("kmmxzifbqgqexo", response.iterator().next().cost().commitmentMeterId()); + Assertions.assertEquals("zrt", response.iterator().next().cost().overageMeterId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionManagedIdentityTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionManagedIdentityTests.java index 17713d53f9d0..986395bb0de9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionManagedIdentityTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionManagedIdentityTests.java @@ -12,18 +12,18 @@ public final class ConnectionManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectionManagedIdentity model - = BinaryData.fromString("{\"clientId\":\"ftjvvruxwigsye\",\"resourceId\":\"qdsmjtg\"}") + = BinaryData.fromString("{\"clientId\":\"mbscbbx\",\"resourceId\":\"dhxiidlopedbwd\"}") .toObject(ConnectionManagedIdentity.class); - Assertions.assertEquals("ftjvvruxwigsye", model.clientId()); - Assertions.assertEquals("qdsmjtg", model.resourceId()); + Assertions.assertEquals("mbscbbx", model.clientId()); + Assertions.assertEquals("dhxiidlopedbwd", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ConnectionManagedIdentity model - = new ConnectionManagedIdentity().withClientId("ftjvvruxwigsye").withResourceId("qdsmjtg"); + = new ConnectionManagedIdentity().withClientId("mbscbbx").withResourceId("dhxiidlopedbwd"); model = BinaryData.fromObject(model).toObject(ConnectionManagedIdentity.class); - Assertions.assertEquals("ftjvvruxwigsye", model.clientId()); - Assertions.assertEquals("qdsmjtg", model.resourceId()); + Assertions.assertEquals("mbscbbx", model.clientId()); + Assertions.assertEquals("dhxiidlopedbwd", model.resourceId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPersonalAccessTokenTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPersonalAccessTokenTests.java index b56d14514407..b31b44687c45 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPersonalAccessTokenTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPersonalAccessTokenTests.java @@ -12,14 +12,14 @@ public final class ConnectionPersonalAccessTokenTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectionPersonalAccessToken model - = BinaryData.fromString("{\"pat\":\"xhzzyse\"}").toObject(ConnectionPersonalAccessToken.class); - Assertions.assertEquals("xhzzyse", model.pat()); + = BinaryData.fromString("{\"pat\":\"hhltnjadhqo\"}").toObject(ConnectionPersonalAccessToken.class); + Assertions.assertEquals("hhltnjadhqo", model.pat()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectionPersonalAccessToken model = new ConnectionPersonalAccessToken().withPat("xhzzyse"); + ConnectionPersonalAccessToken model = new ConnectionPersonalAccessToken().withPat("hhltnjadhqo"); model = BinaryData.fromObject(model).toObject(ConnectionPersonalAccessToken.class); - Assertions.assertEquals("xhzzyse", model.pat()); + Assertions.assertEquals("hhltnjadhqo", model.pat()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java index 2ac226bffb19..153f590f01b1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java @@ -16,20 +16,19 @@ public final class ConnectionPropertiesV2BasicResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectionPropertiesV2BasicResourceArmPaginatedResult model = BinaryData.fromString( - "{\"nextLink\":\"yxp\",\"value\":[{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"SapCloudForCustomer\",\"createdByWorkspaceArmId\":\"alwvskbu\",\"error\":\"acaqtyltcoqcu\",\"expiryTime\":\"2021-02-04T08:54:35Z\",\"group\":\"File\",\"isSharedToAll\":false,\"metadata\":{\"bizt\":\"ejkm\",\"bemyeji\":\"ofqcvovjufycsjm\",\"rtudawlpjfel\":\"iuxegth\",\"bgqnz\":\"erppt\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Active\",\"sharedUserList\":[\"alwcjgckbb\",\"ccgzpraoxnyu\"],\"target\":\"a\",\"useWorkspaceManagedIdentity\":false},\"id\":\"tipwcxbyubhiqd\",\"name\":\"yurnpnuhzafc\",\"type\":\"nuhiig\"},{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"AzureMariaDb\",\"createdByWorkspaceArmId\":\"ui\",\"error\":\"xvatvcr\",\"expiryTime\":\"2021-01-29T22:04:49Z\",\"group\":\"File\",\"isSharedToAll\":true,\"metadata\":{\"syhzlwx\":\"h\"},\"peRequirement\":\"Required\",\"peStatus\":\"Active\",\"sharedUserList\":[\"exdnd\",\"bdweade\",\"zmwntopagt\"],\"target\":\"v\",\"useWorkspaceManagedIdentity\":true},\"id\":\"oaq\",\"name\":\"lkjztjiuazjc\",\"type\":\"mxitpfinzcpd\"},{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Marketo\",\"createdByWorkspaceArmId\":\"lgjmtbd\",\"error\":\"cqguef\",\"expiryTime\":\"2021-12-05T12:23:33Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"metadata\":{\"kyeclcdigpta\":\"urelyujlfyoump\",\"utgjcyz\":\"brzmqxucycijoclx\",\"r\":\"zjd\"},\"peRequirement\":\"Required\",\"peStatus\":\"Active\",\"sharedUserList\":[\"aoqaqbzgyhfwwv\",\"atbwbqam\",\"e\"],\"target\":\"iyslpkcvmwfaux\",\"useWorkspaceManagedIdentity\":true},\"id\":\"ywbo\",\"name\":\"mcqmiciijqp\",\"type\":\"zfboj\"},{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"AIServices\",\"createdByWorkspaceArmId\":\"smyqwixvcpwnkwyw\",\"error\":\"ofalickduoiqtam\",\"expiryTime\":\"2021-08-02T07:49:48Z\",\"group\":\"AzureAI\",\"isSharedToAll\":true,\"metadata\":{\"nvhycvdimwrz\":\"zawnvsbcfhzag\",\"zgyufutrwp\":\"e\",\"yos\":\"eryekzkdhmeottaw\",\"pmil\":\"wwhnhjtfvpn\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"dqllzsauzpjlxeeh\",\"xiqhzlraymezxlsk\"],\"target\":\"mxrfdsa\",\"useWorkspaceManagedIdentity\":true},\"id\":\"nw\",\"name\":\"yshtuwgmev\",\"type\":\"afpwzyifrkgwl\"}]}") + "{\"nextLink\":\"tmoqqtlffhzb\",\"value\":[{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Square\",\"createdByWorkspaceArmId\":\"avfqnvhnqoewdogi\",\"error\":\"tesypvidbztjh\",\"expiryTime\":\"2021-02-22T18:19:17Z\",\"group\":\"Azure\",\"isSharedToAll\":false,\"metadata\":{\"hpsprkzyaupiac\":\"kbwetnj\"},\"peRequirement\":\"Required\",\"peStatus\":\"Active\",\"sharedUserList\":[\"qroohtu\"],\"target\":\"maonurj\",\"useWorkspaceManagedIdentity\":false},\"id\":\"hihpvecmsl\",\"name\":\"lbl\",\"type\":\"jxl\"}]}") .toObject(ConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals("yxp", model.nextLink()); - Assertions.assertEquals(ConnectionCategory.SAP_CLOUD_FOR_CUSTOMER, - model.value().get(0).properties().category()); - Assertions.assertEquals("acaqtyltcoqcu", model.value().get(0).properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-04T08:54:35Z"), + Assertions.assertEquals("tmoqqtlffhzb", model.nextLink()); + Assertions.assertEquals(ConnectionCategory.SQUARE, model.value().get(0).properties().category()); + Assertions.assertEquals("tesypvidbztjh", model.value().get(0).properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T18:19:17Z"), model.value().get(0).properties().expiryTime()); Assertions.assertFalse(model.value().get(0).properties().isSharedToAll()); - Assertions.assertEquals("ejkm", model.value().get(0).properties().metadata().get("bizt")); - Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.value().get(0).properties().peRequirement()); + Assertions.assertEquals("kbwetnj", model.value().get(0).properties().metadata().get("hpsprkzyaupiac")); + Assertions.assertEquals(ManagedPERequirement.REQUIRED, model.value().get(0).properties().peRequirement()); Assertions.assertEquals(ManagedPEStatus.ACTIVE, model.value().get(0).properties().peStatus()); - Assertions.assertEquals("alwcjgckbb", model.value().get(0).properties().sharedUserList().get(0)); - Assertions.assertEquals("a", model.value().get(0).properties().target()); + Assertions.assertEquals("qroohtu", model.value().get(0).properties().sharedUserList().get(0)); + Assertions.assertEquals("maonurj", model.value().get(0).properties().target()); Assertions.assertFalse(model.value().get(0).properties().useWorkspaceManagedIdentity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2BasicResourceInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2BasicResourceInnerTests.java index b099006ec3ac..4ddc7d171750 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2BasicResourceInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2BasicResourceInnerTests.java @@ -20,45 +20,44 @@ public final class ConnectionPropertiesV2BasicResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectionPropertiesV2BasicResourceInner model = BinaryData.fromString( - "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"ManagedOnlineEndpoint\",\"createdByWorkspaceArmId\":\"ltafhbzffo\",\"error\":\"mbj\",\"expiryTime\":\"2021-01-16T02:54:57Z\",\"group\":\"File\",\"isSharedToAll\":true,\"metadata\":{\"qwowftptnuw\":\"dwnapf\",\"seyqrhvyeldotjv\":\"tkschgcgqyhl\",\"vwisp\":\"kwiswskukjtas\",\"gmmbu\":\"xkdtxfkndlqvtwkn\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"qaqkuea\",\"groeshoyg\",\"cbyfqxkf\",\"oytehqpuvjm\"],\"target\":\"mtdwcky\",\"useWorkspaceManagedIdentity\":true},\"id\":\"jn\",\"name\":\"dljdjuskb\",\"type\":\"req\"}") + "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Office365\",\"createdByWorkspaceArmId\":\"gmsplzgaufcshhv\",\"error\":\"wgnxkympqanxrj\",\"expiryTime\":\"2021-11-18T11:18:58Z\",\"group\":\"NoSQL\",\"isSharedToAll\":true,\"metadata\":{\"lhkgmnsghp\":\"ypnyghshxc\",\"ac\":\"ycphdrwjjkhvyo\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"mhrpqpdfw\",\"kois\"],\"target\":\"ssffxuifmc\",\"useWorkspaceManagedIdentity\":false},\"id\":\"bkdq\",\"name\":\"rdzsylollgtrczzy\",\"type\":\"mxzjijpvua\"}") .toObject(ConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.MANAGED_ONLINE_ENDPOINT, model.properties().category()); - Assertions.assertEquals("mbj", model.properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T02:54:57Z"), model.properties().expiryTime()); + Assertions.assertEquals(ConnectionCategory.OFFICE365, model.properties().category()); + Assertions.assertEquals("wgnxkympqanxrj", model.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T11:18:58Z"), model.properties().expiryTime()); Assertions.assertTrue(model.properties().isSharedToAll()); - Assertions.assertEquals("dwnapf", model.properties().metadata().get("qwowftptnuw")); - Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, model.properties().peRequirement()); - Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.properties().peStatus()); - Assertions.assertEquals("qaqkuea", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("mtdwcky", model.properties().target()); - Assertions.assertTrue(model.properties().useWorkspaceManagedIdentity()); + Assertions.assertEquals("ypnyghshxc", model.properties().metadata().get("lhkgmnsghp")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.properties().peStatus()); + Assertions.assertEquals("mhrpqpdfw", model.properties().sharedUserList().get(0)); + Assertions.assertEquals("ssffxuifmc", model.properties().target()); + Assertions.assertFalse(model.properties().useWorkspaceManagedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ConnectionPropertiesV2BasicResourceInner model = new ConnectionPropertiesV2BasicResourceInner() - .withProperties(new ConnectionPropertiesV2().withCategory(ConnectionCategory.MANAGED_ONLINE_ENDPOINT) - .withError("mbj") - .withExpiryTime(OffsetDateTime.parse("2021-01-16T02:54:57Z")) + .withProperties(new ConnectionPropertiesV2().withCategory(ConnectionCategory.OFFICE365) + .withError("wgnxkympqanxrj") + .withExpiryTime(OffsetDateTime.parse("2021-11-18T11:18:58Z")) .withIsSharedToAll(true) - .withMetadata(mapOf("qwowftptnuw", "dwnapf", "seyqrhvyeldotjv", "tkschgcgqyhl", "vwisp", - "kwiswskukjtas", "gmmbu", "xkdtxfkndlqvtwkn")) - .withPeRequirement(ManagedPERequirement.NOT_APPLICABLE) - .withPeStatus(ManagedPEStatus.NOT_APPLICABLE) - .withSharedUserList(Arrays.asList("qaqkuea", "groeshoyg", "cbyfqxkf", "oytehqpuvjm")) - .withTarget("mtdwcky") - .withUseWorkspaceManagedIdentity(true)); + .withMetadata(mapOf("lhkgmnsghp", "ypnyghshxc", "ac", "ycphdrwjjkhvyo")) + .withPeRequirement(ManagedPERequirement.NOT_REQUIRED) + .withPeStatus(ManagedPEStatus.INACTIVE) + .withSharedUserList(Arrays.asList("mhrpqpdfw", "kois")) + .withTarget("ssffxuifmc") + .withUseWorkspaceManagedIdentity(false)); model = BinaryData.fromObject(model).toObject(ConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.MANAGED_ONLINE_ENDPOINT, model.properties().category()); - Assertions.assertEquals("mbj", model.properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-16T02:54:57Z"), model.properties().expiryTime()); + Assertions.assertEquals(ConnectionCategory.OFFICE365, model.properties().category()); + Assertions.assertEquals("wgnxkympqanxrj", model.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T11:18:58Z"), model.properties().expiryTime()); Assertions.assertTrue(model.properties().isSharedToAll()); - Assertions.assertEquals("dwnapf", model.properties().metadata().get("qwowftptnuw")); - Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, model.properties().peRequirement()); - Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.properties().peStatus()); - Assertions.assertEquals("qaqkuea", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("mtdwcky", model.properties().target()); - Assertions.assertTrue(model.properties().useWorkspaceManagedIdentity()); + Assertions.assertEquals("ypnyghshxc", model.properties().metadata().get("lhkgmnsghp")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.properties().peStatus()); + Assertions.assertEquals("mhrpqpdfw", model.properties().sharedUserList().get(0)); + Assertions.assertEquals("ssffxuifmc", model.properties().target()); + Assertions.assertFalse(model.properties().useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2Tests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2Tests.java index 67209d6e4959..e9730f4e76b9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2Tests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionPropertiesV2Tests.java @@ -19,43 +19,43 @@ public final class ConnectionPropertiesV2Tests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectionPropertiesV2 model = BinaryData.fromString( - "{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Git\",\"createdByWorkspaceArmId\":\"eysfaqegplw\",\"error\":\"shwddkvbxgk\",\"expiryTime\":\"2021-09-13T14:02:46Z\",\"group\":\"Azure\",\"isSharedToAll\":true,\"metadata\":{\"tymtpoiwenazer\":\"acarvvlf\",\"qalsxkd\":\"hzr\",\"vessm\":\"wqapfgsdp\"},\"peRequirement\":\"Required\",\"peStatus\":\"Active\",\"sharedUserList\":[\"pldqqct\"],\"target\":\"valblhtjqv\",\"useWorkspaceManagedIdentity\":false}") + "{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Salesforce\",\"createdByWorkspaceArmId\":\"hci\",\"error\":\"defxrdc\",\"expiryTime\":\"2021-10-21T15:59:45Z\",\"group\":\"Database\",\"isSharedToAll\":false,\"metadata\":{\"qltgrd\":\"urnnqbnqbpiz\",\"a\":\"gypxrxvbfihwuhvc\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"lmliowxihspnxwqa\"],\"target\":\"epzwaklsbsbqq\",\"useWorkspaceManagedIdentity\":true}") .toObject(ConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.GIT, model.category()); - Assertions.assertEquals("shwddkvbxgk", model.error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:02:46Z"), model.expiryTime()); - Assertions.assertTrue(model.isSharedToAll()); - Assertions.assertEquals("acarvvlf", model.metadata().get("tymtpoiwenazer")); - Assertions.assertEquals(ManagedPERequirement.REQUIRED, model.peRequirement()); - Assertions.assertEquals(ManagedPEStatus.ACTIVE, model.peStatus()); - Assertions.assertEquals("pldqqct", model.sharedUserList().get(0)); - Assertions.assertEquals("valblhtjqv", model.target()); - Assertions.assertFalse(model.useWorkspaceManagedIdentity()); + Assertions.assertEquals(ConnectionCategory.SALESFORCE, model.category()); + Assertions.assertEquals("defxrdc", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T15:59:45Z"), model.expiryTime()); + Assertions.assertFalse(model.isSharedToAll()); + Assertions.assertEquals("urnnqbnqbpiz", model.metadata().get("qltgrd")); + Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.peStatus()); + Assertions.assertEquals("lmliowxihspnxwqa", model.sharedUserList().get(0)); + Assertions.assertEquals("epzwaklsbsbqq", model.target()); + Assertions.assertTrue(model.useWorkspaceManagedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectionPropertiesV2 model = new ConnectionPropertiesV2().withCategory(ConnectionCategory.GIT) - .withError("shwddkvbxgk") - .withExpiryTime(OffsetDateTime.parse("2021-09-13T14:02:46Z")) - .withIsSharedToAll(true) - .withMetadata(mapOf("tymtpoiwenazer", "acarvvlf", "qalsxkd", "hzr", "vessm", "wqapfgsdp")) - .withPeRequirement(ManagedPERequirement.REQUIRED) - .withPeStatus(ManagedPEStatus.ACTIVE) - .withSharedUserList(Arrays.asList("pldqqct")) - .withTarget("valblhtjqv") - .withUseWorkspaceManagedIdentity(false); + ConnectionPropertiesV2 model = new ConnectionPropertiesV2().withCategory(ConnectionCategory.SALESFORCE) + .withError("defxrdc") + .withExpiryTime(OffsetDateTime.parse("2021-10-21T15:59:45Z")) + .withIsSharedToAll(false) + .withMetadata(mapOf("qltgrd", "urnnqbnqbpiz", "a", "gypxrxvbfihwuhvc")) + .withPeRequirement(ManagedPERequirement.NOT_APPLICABLE) + .withPeStatus(ManagedPEStatus.NOT_APPLICABLE) + .withSharedUserList(Arrays.asList("lmliowxihspnxwqa")) + .withTarget("epzwaklsbsbqq") + .withUseWorkspaceManagedIdentity(true); model = BinaryData.fromObject(model).toObject(ConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.GIT, model.category()); - Assertions.assertEquals("shwddkvbxgk", model.error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:02:46Z"), model.expiryTime()); - Assertions.assertTrue(model.isSharedToAll()); - Assertions.assertEquals("acarvvlf", model.metadata().get("tymtpoiwenazer")); - Assertions.assertEquals(ManagedPERequirement.REQUIRED, model.peRequirement()); - Assertions.assertEquals(ManagedPEStatus.ACTIVE, model.peStatus()); - Assertions.assertEquals("pldqqct", model.sharedUserList().get(0)); - Assertions.assertEquals("valblhtjqv", model.target()); - Assertions.assertFalse(model.useWorkspaceManagedIdentity()); + Assertions.assertEquals(ConnectionCategory.SALESFORCE, model.category()); + Assertions.assertEquals("defxrdc", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T15:59:45Z"), model.expiryTime()); + Assertions.assertFalse(model.isSharedToAll()); + Assertions.assertEquals("urnnqbnqbpiz", model.metadata().get("qltgrd")); + Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.peStatus()); + Assertions.assertEquals("lmliowxihspnxwqa", model.sharedUserList().get(0)); + Assertions.assertEquals("epzwaklsbsbqq", model.target()); + Assertions.assertTrue(model.useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionSharedAccessSignatureTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionSharedAccessSignatureTests.java index 90c5c480b09f..16e8c1fe003e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionSharedAccessSignatureTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionSharedAccessSignatureTests.java @@ -12,14 +12,14 @@ public final class ConnectionSharedAccessSignatureTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectionSharedAccessSignature model - = BinaryData.fromString("{\"sas\":\"ybwfdbkjb\"}").toObject(ConnectionSharedAccessSignature.class); - Assertions.assertEquals("ybwfdbkjb", model.sas()); + = BinaryData.fromString("{\"sas\":\"zxojpslsv\"}").toObject(ConnectionSharedAccessSignature.class); + Assertions.assertEquals("zxojpslsv", model.sas()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectionSharedAccessSignature model = new ConnectionSharedAccessSignature().withSas("ybwfdbkjb"); + ConnectionSharedAccessSignature model = new ConnectionSharedAccessSignature().withSas("zxojpslsv"); model = BinaryData.fromObject(model).toObject(ConnectionSharedAccessSignature.class); - Assertions.assertEquals("ybwfdbkjb", model.sas()); + Assertions.assertEquals("zxojpslsv", model.sas()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionUpdateContentTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionUpdateContentTests.java index 5ad514de02cd..5dbd34831045 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionUpdateContentTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectionUpdateContentTests.java @@ -20,44 +20,43 @@ public final class ConnectionUpdateContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectionUpdateContent model = BinaryData.fromString( - "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Spark\",\"createdByWorkspaceArmId\":\"rjb\",\"error\":\"ykfhyqezvqqugdrf\",\"expiryTime\":\"2021-07-24T11:55:41Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"metadata\":{\"khyxvrqtvbcz\":\"quowtljvfwhrea\",\"pjpfseykgs\":\"ulmdgglm\",\"lkvec\":\"ngpszngafpg\",\"dyedmzrgjfo\":\"ujcngo\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"tp\",\"pz\",\"rgdg\"],\"target\":\"coqra\",\"useWorkspaceManagedIdentity\":false}}") + "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"GoogleCloudStorage\",\"createdByWorkspaceArmId\":\"ivensrpmeyyvpk\",\"error\":\"tlbijpzg\",\"expiryTime\":\"2021-10-22T08:48:44Z\",\"group\":\"NoSQL\",\"isSharedToAll\":true,\"metadata\":{\"pvfqawz\":\"lmknbnxwcdom\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"iac\",\"kiexhajlfnthiq\",\"yuttdiygbpvnwswm\",\"xkyctwwgzwx\"],\"target\":\"mecvogygzyvneeza\",\"useWorkspaceManagedIdentity\":false}}") .toObject(ConnectionUpdateContent.class); - Assertions.assertEquals(ConnectionCategory.SPARK, model.properties().category()); - Assertions.assertEquals("ykfhyqezvqqugdrf", model.properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T11:55:41Z"), model.properties().expiryTime()); + Assertions.assertEquals(ConnectionCategory.GOOGLE_CLOUD_STORAGE, model.properties().category()); + Assertions.assertEquals("tlbijpzg", model.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T08:48:44Z"), model.properties().expiryTime()); Assertions.assertTrue(model.properties().isSharedToAll()); - Assertions.assertEquals("quowtljvfwhrea", model.properties().metadata().get("khyxvrqtvbcz")); + Assertions.assertEquals("lmknbnxwcdom", model.properties().metadata().get("pvfqawz")); Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, model.properties().peRequirement()); - Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.properties().peStatus()); - Assertions.assertEquals("tp", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("coqra", model.properties().target()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.properties().peStatus()); + Assertions.assertEquals("iac", model.properties().sharedUserList().get(0)); + Assertions.assertEquals("mecvogygzyvneeza", model.properties().target()); Assertions.assertFalse(model.properties().useWorkspaceManagedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ConnectionUpdateContent model = new ConnectionUpdateContent() - .withProperties(new ConnectionPropertiesV2().withCategory(ConnectionCategory.SPARK) - .withError("ykfhyqezvqqugdrf") - .withExpiryTime(OffsetDateTime.parse("2021-07-24T11:55:41Z")) + .withProperties(new ConnectionPropertiesV2().withCategory(ConnectionCategory.GOOGLE_CLOUD_STORAGE) + .withError("tlbijpzg") + .withExpiryTime(OffsetDateTime.parse("2021-10-22T08:48:44Z")) .withIsSharedToAll(true) - .withMetadata(mapOf("khyxvrqtvbcz", "quowtljvfwhrea", "pjpfseykgs", "ulmdgglm", "lkvec", "ngpszngafpg", - "dyedmzrgjfo", "ujcngo")) + .withMetadata(mapOf("pvfqawz", "lmknbnxwcdom")) .withPeRequirement(ManagedPERequirement.NOT_APPLICABLE) - .withPeStatus(ManagedPEStatus.INACTIVE) - .withSharedUserList(Arrays.asList("tp", "pz", "rgdg")) - .withTarget("coqra") + .withPeStatus(ManagedPEStatus.NOT_APPLICABLE) + .withSharedUserList(Arrays.asList("iac", "kiexhajlfnthiq", "yuttdiygbpvnwswm", "xkyctwwgzwx")) + .withTarget("mecvogygzyvneeza") .withUseWorkspaceManagedIdentity(false)); model = BinaryData.fromObject(model).toObject(ConnectionUpdateContent.class); - Assertions.assertEquals(ConnectionCategory.SPARK, model.properties().category()); - Assertions.assertEquals("ykfhyqezvqqugdrf", model.properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T11:55:41Z"), model.properties().expiryTime()); + Assertions.assertEquals(ConnectionCategory.GOOGLE_CLOUD_STORAGE, model.properties().category()); + Assertions.assertEquals("tlbijpzg", model.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T08:48:44Z"), model.properties().expiryTime()); Assertions.assertTrue(model.properties().isSharedToAll()); - Assertions.assertEquals("quowtljvfwhrea", model.properties().metadata().get("khyxvrqtvbcz")); + Assertions.assertEquals("lmknbnxwcdom", model.properties().metadata().get("pvfqawz")); Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, model.properties().peRequirement()); - Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.properties().peStatus()); - Assertions.assertEquals("tp", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("coqra", model.properties().target()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.properties().peStatus()); + Assertions.assertEquals("iac", model.properties().sharedUserList().get(0)); + Assertions.assertEquals("mecvogygzyvneeza", model.properties().target()); Assertions.assertFalse(model.properties().useWorkspaceManagedIdentity()); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectivityEndpointsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectivityEndpointsTests.java index 5f7629930700..1b42c69b2778 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectivityEndpointsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ConnectivityEndpointsTests.java @@ -10,7 +10,7 @@ public final class ConnectivityEndpointsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ConnectivityEndpoints model = BinaryData.fromString("{\"publicIpAddress\":\"qgsdr\",\"sshPort\":2142698844}") + ConnectivityEndpoints model = BinaryData.fromString("{\"publicIpAddress\":\"bgvopemt\",\"sshPort\":219160192}") .toObject(ConnectivityEndpoints.class); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlConnectionsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlConnectionsTests.java deleted file mode 100644 index 94eca6c349ee..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlConnectionsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.CostControlConnections; -import org.junit.jupiter.api.Assertions; - -public final class CostControlConnectionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CostControlConnections model - = BinaryData.fromString("{\"appInsightsConnectionId\":\"vhkhixu\",\"eventGridConnectionId\":\"dtopbob\"}") - .toObject(CostControlConnections.class); - Assertions.assertEquals("vhkhixu", model.appInsightsConnectionId()); - Assertions.assertEquals("dtopbob", model.eventGridConnectionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CostControlConnections model - = new CostControlConnections().withAppInsightsConnectionId("vhkhixu").withEventGridConnectionId("dtopbob"); - model = BinaryData.fromObject(model).toObject(CostControlConnections.class); - Assertions.assertEquals("vhkhixu", model.appInsightsConnectionId()); - Assertions.assertEquals("dtopbob", model.eventGridConnectionId()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlDimensionTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlDimensionTests.java deleted file mode 100644 index ca28a9dba9ec..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlDimensionTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimension; -import com.azure.resourcemanager.cognitiveservices.models.CostControlDimensionType; -import org.junit.jupiter.api.Assertions; - -public final class CostControlDimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CostControlDimension model = BinaryData.fromString("{\"type\":\"Agent\",\"attribute\":\"txudqyeme\"}") - .toObject(CostControlDimension.class); - Assertions.assertEquals(CostControlDimensionType.AGENT, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CostControlDimension model = new CostControlDimension().withType(CostControlDimensionType.AGENT); - model = BinaryData.fromObject(model).toObject(CostControlDimension.class); - Assertions.assertEquals(CostControlDimensionType.AGENT, model.type()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlMatchTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlMatchTests.java deleted file mode 100644 index 931f11e2d2c0..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlMatchTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.CostControlMatch; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CostControlMatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CostControlMatch model = BinaryData.fromString( - "{\"agentResourceIds\":[\"aucmcirtnee\",\"mjauwcgx\",\"fnohaitran\"],\"identityObjectIds\":[\"rwgudasmxub\",\"fbngfcocef\"],\"sessionIds\":[\"iylfmpztrau\",\"svhl\",\"dculregp\"],\"projectIds\":[\"ojhvrz\"]}") - .toObject(CostControlMatch.class); - Assertions.assertEquals("aucmcirtnee", model.agentResourceIds().get(0)); - Assertions.assertEquals("rwgudasmxub", model.identityObjectIds().get(0)); - Assertions.assertEquals("iylfmpztrau", model.sessionIds().get(0)); - Assertions.assertEquals("ojhvrz", model.projectIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CostControlMatch model - = new CostControlMatch().withAgentResourceIds(Arrays.asList("aucmcirtnee", "mjauwcgx", "fnohaitran")) - .withIdentityObjectIds(Arrays.asList("rwgudasmxub", "fbngfcocef")) - .withSessionIds(Arrays.asList("iylfmpztrau", "svhl", "dculregp")) - .withProjectIds(Arrays.asList("ojhvrz")); - model = BinaryData.fromObject(model).toObject(CostControlMatch.class); - Assertions.assertEquals("aucmcirtnee", model.agentResourceIds().get(0)); - Assertions.assertEquals("rwgudasmxub", model.identityObjectIds().get(0)); - Assertions.assertEquals("iylfmpztrau", model.sessionIds().get(0)); - Assertions.assertEquals("ojhvrz", model.projectIds().get(0)); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlThresholdTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlThresholdTests.java deleted file mode 100644 index 323f45c6d13b..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlThresholdTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThreshold; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdAction; -import com.azure.resourcemanager.cognitiveservices.models.CostControlThresholdType; -import org.junit.jupiter.api.Assertions; - -public final class CostControlThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CostControlThreshold model - = BinaryData.fromString("{\"type\":\"Absolute\",\"value\":26.683339328176004,\"action\":\"Audit\"}") - .toObject(CostControlThreshold.class); - Assertions.assertEquals(CostControlThresholdType.ABSOLUTE, model.type()); - Assertions.assertEquals(26.683339328176004, model.value()); - Assertions.assertEquals(CostControlThresholdAction.AUDIT, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CostControlThreshold model = new CostControlThreshold().withType(CostControlThresholdType.ABSOLUTE) - .withValue(26.683339328176004) - .withAction(CostControlThresholdAction.AUDIT); - model = BinaryData.fromObject(model).toObject(CostControlThreshold.class); - Assertions.assertEquals(CostControlThresholdType.ABSOLUTE, model.type()); - Assertions.assertEquals(26.683339328176004, model.value()); - Assertions.assertEquals(CostControlThresholdAction.AUDIT, model.action()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsDeleteWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsDeleteWithResponseMockTests.java deleted file mode 100644 index afb5b27b31a1..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CostControlsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CostControlsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.costControls() - .deleteWithResponse("kjfkxnwtzs", "oeqcrjvcjskqsfn", "iwap", "unhdikatzmtuv", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CustomBlocklistConfigTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CustomBlocklistConfigTests.java index 36f2008bf9e8..0d403d913884 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CustomBlocklistConfigTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/CustomBlocklistConfigTests.java @@ -13,21 +13,21 @@ public final class CustomBlocklistConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomBlocklistConfig model - = BinaryData.fromString("{\"source\":\"Completion\",\"blocklistName\":\"jzh\",\"blocking\":true}") + = BinaryData.fromString("{\"source\":\"PostToolCall\",\"blocklistName\":\"alywjhhgdn\",\"blocking\":false}") .toObject(CustomBlocklistConfig.class); - Assertions.assertEquals("jzh", model.blocklistName()); - Assertions.assertTrue(model.blocking()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, model.source()); + Assertions.assertEquals("alywjhhgdn", model.blocklistName()); + Assertions.assertFalse(model.blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.source()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomBlocklistConfig model = new CustomBlocklistConfig().withBlocklistName("jzh") - .withBlocking(true) - .withSource(RaiPolicyContentSource.COMPLETION); + CustomBlocklistConfig model = new CustomBlocklistConfig().withBlocklistName("alywjhhgdn") + .withBlocking(false) + .withSource(RaiPolicyContentSource.POST_TOOL_CALL); model = BinaryData.fromObject(model).toObject(CustomBlocklistConfig.class); - Assertions.assertEquals("jzh", model.blocklistName()); - Assertions.assertTrue(model.blocking()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, model.source()); + Assertions.assertEquals("alywjhhgdn", model.blocklistName()); + Assertions.assertFalse(model.blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.source()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingInnerTests.java index b450ae976ebd..00e2c2e3d331 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingInnerTests.java @@ -15,20 +15,20 @@ public final class DefenderForAISettingInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DefenderForAISettingInner model = BinaryData.fromString( - "{\"properties\":{\"state\":\"Enabled\"},\"etag\":\"sprkzyaupiac\",\"tags\":{\"urjtumghi\":\"afbwqroohtuovmao\"},\"id\":\"ve\",\"name\":\"mslclblyjxlt\",\"type\":\"sjuscvsfxigctmg\"}") + "{\"properties\":{\"state\":\"Disabled\"},\"etag\":\"fldpuviyfc\",\"tags\":{\"qi\":\"eolhbhlvbmx\",\"tkcudfbsfarfsiow\":\"s\"},\"id\":\"jxnqp\",\"name\":\"wgfstmhqykizm\",\"type\":\"ksaoafcluqvox\"}") .toObject(DefenderForAISettingInner.class); - Assertions.assertEquals("afbwqroohtuovmao", model.tags().get("urjtumghi")); - Assertions.assertEquals(DefenderForAISettingState.ENABLED, model.state()); + Assertions.assertEquals("eolhbhlvbmx", model.tags().get("qi")); + Assertions.assertEquals(DefenderForAISettingState.DISABLED, model.state()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DefenderForAISettingInner model - = new DefenderForAISettingInner().withTags(mapOf("urjtumghi", "afbwqroohtuovmao")) - .withState(DefenderForAISettingState.ENABLED); + = new DefenderForAISettingInner().withTags(mapOf("qi", "eolhbhlvbmx", "tkcudfbsfarfsiow", "s")) + .withState(DefenderForAISettingState.DISABLED); model = BinaryData.fromObject(model).toObject(DefenderForAISettingInner.class); - Assertions.assertEquals("afbwqroohtuovmao", model.tags().get("urjtumghi")); - Assertions.assertEquals(DefenderForAISettingState.ENABLED, model.state()); + Assertions.assertEquals("eolhbhlvbmx", model.tags().get("qi")); + Assertions.assertEquals(DefenderForAISettingState.DISABLED, model.state()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingResultTests.java index 76877c2dad87..130e0af2d05e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingResultTests.java @@ -13,10 +13,10 @@ public final class DefenderForAISettingResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DefenderForAISettingResult model = BinaryData.fromString( - "{\"nextLink\":\"bezqccydr\",\"value\":[{\"properties\":{\"state\":\"Disabled\"},\"etag\":\"kkyihzt\",\"tags\":{\"illcecfehu\":\"mgqzgwldoyc\"},\"id\":\"oaguhic\",\"name\":\"llizs\",\"type\":\"ac\"},{\"properties\":{\"state\":\"Disabled\"},\"etag\":\"weftkwq\",\"tags\":{\"haep\":\"mvss\",\"cxtczhupeukn\":\"a\",\"c\":\"jduyyespydjfb\"},\"id\":\"hhulrtywikdm\",\"name\":\"lakuflgbhgauacd\",\"type\":\"xmxufrsryjqgdk\"},{\"properties\":{\"state\":\"Disabled\"},\"etag\":\"eoqbvjhvefgwbmqj\",\"tags\":{\"mqkyojwyvfkmbts\":\"tasfaymxbulpzeal\",\"rrscubiwsdrnp\":\"ahxsgxjcmm\",\"jrmmuabwib\":\"qwodiffjx\"},\"id\":\"ogjo\",\"name\":\"mcyefoyzbam\",\"type\":\"in\"}]}") + "{\"nextLink\":\"im\",\"value\":[{\"properties\":{\"state\":\"Disabled\"},\"etag\":\"wpbmzgwesydsxwef\",\"tags\":{\"mtkhlowkxxpvbr\":\"cbvopwndyqleallk\"},\"id\":\"jmzsyzfh\",\"name\":\"tlhikcyychun\",\"type\":\"jlpjrtwszhv\"}]}") .toObject(DefenderForAISettingResult.class); - Assertions.assertEquals("bezqccydr", model.nextLink()); - Assertions.assertEquals("mgqzgwldoyc", model.value().get(0).tags().get("illcecfehu")); + Assertions.assertEquals("im", model.nextLink()); + Assertions.assertEquals("cbvopwndyqleallk", model.value().get(0).tags().get("mtkhlowkxxpvbr")); Assertions.assertEquals(DefenderForAISettingState.DISABLED, model.value().get(0).state()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsCreateOrUpdateWithResponseMockTests.java index 8f9dda45fcc0..abc5bd15ce43 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsCreateOrUpdateWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class DefenderForAISettingsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Enabled\"},\"etag\":\"kdw\",\"tags\":{\"aefe\":\"dupbkmzkwhjjsqw\"},\"id\":\"vkxdbnmcvaqy\",\"name\":\"dzdobuesdy\",\"type\":\"fxnzp\"}"; + = "{\"properties\":{\"state\":\"Disabled\"},\"etag\":\"rxylaypd\",\"tags\":{\"jdfrwpsshrmnkccl\":\"velffohuriw\",\"uogkscxjfsgm\":\"c\",\"qcowscuyfql\":\"spoebnx\"},\"id\":\"fbqhsujkaf\",\"name\":\"zpnxqpwni\",\"type\":\"xkcajgrbrc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,14 +34,14 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DefenderForAISetting response = manager.defenderForAISettings() - .define("qfzwanduhduw") - .withExistingAccount("koymhbfexmizzjx", "j") - .withTags(mapOf("umjfgoxedrmrazhv", "flzbk")) - .withState(DefenderForAISettingState.DISABLED) + .define("oq") + .withExistingAccount("xbozpcjcnwjz", "qblxrnwvds") + .withTags(mapOf("ooauffhxfqkmwzr", "hjxsa", "oybmrno", "q")) + .withState(DefenderForAISettingState.ENABLED) .create(); - Assertions.assertEquals("dupbkmzkwhjjsqw", response.tags().get("aefe")); - Assertions.assertEquals(DefenderForAISettingState.ENABLED, response.state()); + Assertions.assertEquals("velffohuriw", response.tags().get("jdfrwpsshrmnkccl")); + Assertions.assertEquals(DefenderForAISettingState.DISABLED, response.state()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsGetWithResponseMockTests.java index dc961ac01975..c3eb2e2b16d9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class DefenderForAISettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Disabled\"},\"etag\":\"y\",\"tags\":{\"nbuvms\":\"majpuyxoafrmzgcc\",\"mmvoneeyr\":\"ehe\",\"ddigeblsplzdss\":\"parxtzayq\",\"izdnuehx\":\"wwveeozbjkjq\"},\"id\":\"tssjd\",\"name\":\"wbnklgerx\",\"type\":\"ctsawvxcimpthjrm\"}"; + = "{\"properties\":{\"state\":\"Enabled\"},\"etag\":\"wt\",\"tags\":{\"dlkhczygpm\":\"w\"},\"id\":\"jculojhhylx\",\"name\":\"evfiyymotu\",\"type\":\"bybwjmtftcvelnir\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DefenderForAISetting response = manager.defenderForAISettings() - .getWithResponse("cgmlmpn", "qxuyi", "rzn", com.azure.core.util.Context.NONE) + .getWithResponse("ounzsiywh", "bym", "popikzeb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("majpuyxoafrmzgcc", response.tags().get("nbuvms")); - Assertions.assertEquals(DefenderForAISettingState.DISABLED, response.state()); + Assertions.assertEquals("w", response.tags().get("dlkhczygpm")); + Assertions.assertEquals(DefenderForAISettingState.ENABLED, response.state()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsListMockTests.java index 3c9d9b0337a7..a263cdf107c2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DefenderForAISettingsListMockTests.java @@ -23,7 +23,7 @@ public final class DefenderForAISettingsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"state\":\"Enabled\"},\"etag\":\"tg\",\"tags\":{\"nxiajuvj\":\"yqnipehfwwcb\",\"yzguaxfhvjixg\":\"cfjisosfzlnraxn\",\"dqwsjmihuvrqp\":\"f\"},\"id\":\"do\",\"name\":\"cqpkntlydprpens\",\"type\":\"mzjrit\"}]}"; + = "{\"value\":[{\"properties\":{\"state\":\"Disabled\"},\"etag\":\"j\",\"tags\":{\"sennqfabq\":\"swmehfxrttxb\",\"ectcxsfmbzdx\":\"ama\",\"yufxuzmsvzyq\":\"synbkdn\"},\"id\":\"rnxhjtlxfikjk\",\"name\":\"ara\",\"type\":\"wwuasnjeglht\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.defenderForAISettings() - .list("lzmslubnknyfuy", "jhvrrllfswarmy", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.defenderForAISettings().list("pk", "nstp", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yqnipehfwwcb", response.iterator().next().tags().get("nxiajuvj")); - Assertions.assertEquals(DefenderForAISettingState.ENABLED, response.iterator().next().state()); + Assertions.assertEquals("swmehfxrttxb", response.iterator().next().tags().get("sennqfabq")); + Assertions.assertEquals(DefenderForAISettingState.DISABLED, response.iterator().next().state()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeMockTests.java index cf050aa4af97..0fc03a2d37fa 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeMockTests.java @@ -27,7 +27,7 @@ public void testPurge() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.deletedAccounts().purge("qymjzucwwmejjqhd", "wvmqxi", "ookyfoz", com.azure.core.util.Context.NONE); + manager.deletedAccounts().purge("cbvzarmqcb", "okstsinvagovjyh", "rxbrdv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentCapacitySettingsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentCapacitySettingsTests.java index 51159a62148f..3c1ece0fe142 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentCapacitySettingsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentCapacitySettingsTests.java @@ -12,18 +12,18 @@ public final class DeploymentCapacitySettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentCapacitySettings model - = BinaryData.fromString("{\"designatedCapacity\":1902041203,\"priority\":1752726450}") + = BinaryData.fromString("{\"designatedCapacity\":1020158274,\"priority\":1305719459}") .toObject(DeploymentCapacitySettings.class); - Assertions.assertEquals(1902041203, model.designatedCapacity()); - Assertions.assertEquals(1752726450, model.priority()); + Assertions.assertEquals(1020158274, model.designatedCapacity()); + Assertions.assertEquals(1305719459, model.priority()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentCapacitySettings model - = new DeploymentCapacitySettings().withDesignatedCapacity(1902041203).withPriority(1752726450); + = new DeploymentCapacitySettings().withDesignatedCapacity(1020158274).withPriority(1305719459); model = BinaryData.fromObject(model).toObject(DeploymentCapacitySettings.class); - Assertions.assertEquals(1902041203, model.designatedCapacity()); - Assertions.assertEquals(1752726450, model.priority()); + Assertions.assertEquals(1020158274, model.designatedCapacity()); + Assertions.assertEquals(1305719459, model.priority()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentPolicyEvaluationResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentPolicyEvaluationResultTests.java index c2ff41aebb35..30eaf62a986c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentPolicyEvaluationResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentPolicyEvaluationResultTests.java @@ -13,27 +13,28 @@ public final class DeploymentPolicyEvaluationResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentPolicyEvaluationResult model = BinaryData.fromString( - "{\"evaluationOutcome\":\"NonCompliant\",\"errorMessage\":\"t\",\"nonCompliantAssignments\":[{\"assignmentId\":\"ebwwaloayqc\",\"policyDefinitionId\":\"rtzju\",\"policySetDefinitionId\":\"wyzmhtxon\",\"evaluationOutcome\":\"Compliant\",\"nonComplianceReason\":\"avjcbpwx\",\"effect\":\"srknftguv\",\"expressionEvaluations\":[{\"expression\":\"prwmdyvxqt\",\"expressionKind\":\"riwwroy\",\"operator\":\"exrmcqibycnojvk\",\"result\":\"e\",\"targetValue\":\"sgzvahapjyzhpv\",\"expressionValue\":\"zcjrvxdjzlmwlx\"},{\"expression\":\"ug\",\"expressionKind\":\"zovawjvz\",\"operator\":\"luthn\",\"result\":\"rnxipei\",\"targetValue\":\"jzuaejxdultskzbb\",\"expressionValue\":\"zumveekgpwo\"},{\"expression\":\"hkfpbs\",\"expressionKind\":\"ofd\",\"operator\":\"uusdttouwa\",\"result\":\"ekqvkeln\",\"targetValue\":\"vbxwyjsflhh\",\"expressionValue\":\"aln\"}]},{\"assignmentId\":\"xisxyawjoyaqcsl\",\"policyDefinitionId\":\"pkii\",\"policySetDefinitionId\":\"yexz\",\"evaluationOutcome\":\"Compliant\",\"nonComplianceReason\":\"xhnrztfolhb\",\"effect\":\"knalaulppg\",\"expressionEvaluations\":[{\"expression\":\"napnyiropuhpigv\",\"expressionKind\":\"ylgqgitxmedjvcsl\",\"operator\":\"qwwncw\",\"result\":\"hxg\",\"targetValue\":\"rmgucnap\",\"expressionValue\":\"eoellwptfdygp\"},{\"expression\":\"b\",\"expressionKind\":\"ceopzfqrhhuaopp\",\"operator\":\"qeqxo\",\"result\":\"dahzxctobg\",\"targetValue\":\"dmoizpostmg\",\"expressionValue\":\"fbunrmfqjhhk\"},{\"expression\":\"pvjymjhxxjyng\",\"expressionKind\":\"ivkrtsw\",\"operator\":\"qzvszjf\",\"result\":\"vjfdx\",\"targetValue\":\"vetvt\",\"expressionValue\":\"aqtdoqmcbx\"},{\"expression\":\"vxysl\",\"expressionKind\":\"hsfxoblytkb\",\"operator\":\"pe\",\"result\":\"wfbkrvrns\",\"targetValue\":\"hqjohxcrsbfova\",\"expressionValue\":\"ruvw\"}]},{\"assignmentId\":\"sqfsubcgjbirxb\",\"policyDefinitionId\":\"bsrfbj\",\"policySetDefinitionId\":\"twss\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"pvjzbe\",\"effect\":\"l\",\"expressionEvaluations\":[{\"expression\":\"qqnvwpmq\",\"expressionKind\":\"ruoujmk\",\"operator\":\"hwqytj\",\"result\":\"bnw\",\"targetValue\":\"wgdrjervnaenqp\",\"expressionValue\":\"indoygmifthnzd\"},{\"expression\":\"sl\",\"expressionKind\":\"ayqigynduhav\",\"operator\":\"lkthu\",\"result\":\"qolbgyc\",\"targetValue\":\"iertgccymvaolp\",\"expressionValue\":\"lqlfm\"}]},{\"assignmentId\":\"n\",\"policyDefinitionId\":\"glzpswiydm\",\"policySetDefinitionId\":\"yhz\",\"evaluationOutcome\":\"Compliant\",\"nonComplianceReason\":\"adbzmnvdfznud\",\"effect\":\"dvxzbncblylpst\",\"expressionEvaluations\":[{\"expression\":\"xsrz\",\"expressionKind\":\"ucerscdntnevfi\",\"operator\":\"mygtdssls\",\"result\":\"mweriofzpy\",\"targetValue\":\"emwabnet\",\"expressionValue\":\"hszhedplvwiwu\"}]}]}") + "{\"evaluationOutcome\":\"Compliant\",\"errorMessage\":\"xisxyawjoyaqcsl\",\"nonCompliantAssignments\":[{\"assignmentId\":\"iidzyexzne\",\"policyDefinitionId\":\"xhnrztfolhb\",\"policySetDefinitionId\":\"knalaulppg\",\"evaluationOutcome\":\"Compliant\",\"nonComplianceReason\":\"napnyiropuhpigv\",\"effect\":\"ylgqgitxmedjvcsl\",\"expressionEvaluations\":[{\"expression\":\"wncwzzhxgktrmg\",\"expressionKind\":\"napkteoellw\",\"operator\":\"fdygpfqbuaceopz\",\"result\":\"rhhuaopppcqeqx\",\"targetValue\":\"z\",\"expressionValue\":\"hzxct\"},{\"expression\":\"gbkdmoizpos\",\"expressionKind\":\"grcfb\",\"operator\":\"rmfqjhhkxbpvj\",\"result\":\"jhxxjyn\",\"targetValue\":\"divkrt\",\"expressionValue\":\"bxqz\"}]}]}") .toObject(DeploymentPolicyEvaluationResult.class); - Assertions.assertEquals(PolicyEvaluationOutcome.NON_COMPLIANT, model.evaluationOutcome()); - Assertions.assertEquals("t", model.errorMessage()); - Assertions.assertEquals("ebwwaloayqc", model.nonCompliantAssignments().get(0).assignmentId()); - Assertions.assertEquals("rtzju", model.nonCompliantAssignments().get(0).policyDefinitionId()); - Assertions.assertEquals("wyzmhtxon", model.nonCompliantAssignments().get(0).policySetDefinitionId()); + Assertions.assertEquals(PolicyEvaluationOutcome.COMPLIANT, model.evaluationOutcome()); + Assertions.assertEquals("xisxyawjoyaqcsl", model.errorMessage()); + Assertions.assertEquals("iidzyexzne", model.nonCompliantAssignments().get(0).assignmentId()); + Assertions.assertEquals("xhnrztfolhb", model.nonCompliantAssignments().get(0).policyDefinitionId()); + Assertions.assertEquals("knalaulppg", model.nonCompliantAssignments().get(0).policySetDefinitionId()); Assertions.assertEquals(PolicyEvaluationOutcome.COMPLIANT, model.nonCompliantAssignments().get(0).evaluationOutcome()); - Assertions.assertEquals("avjcbpwx", model.nonCompliantAssignments().get(0).nonComplianceReason()); - Assertions.assertEquals("srknftguv", model.nonCompliantAssignments().get(0).effect()); - Assertions.assertEquals("prwmdyvxqt", + Assertions.assertEquals("napnyiropuhpigv", model.nonCompliantAssignments().get(0).nonComplianceReason()); + Assertions.assertEquals("ylgqgitxmedjvcsl", model.nonCompliantAssignments().get(0).effect()); + Assertions.assertEquals("wncwzzhxgktrmg", model.nonCompliantAssignments().get(0).expressionEvaluations().get(0).expression()); - Assertions.assertEquals("riwwroy", + Assertions.assertEquals("napkteoellw", model.nonCompliantAssignments().get(0).expressionEvaluations().get(0).expressionKind()); - Assertions.assertEquals("exrmcqibycnojvk", + Assertions.assertEquals("fdygpfqbuaceopz", model.nonCompliantAssignments().get(0).expressionEvaluations().get(0).operator()); - Assertions.assertEquals("e", model.nonCompliantAssignments().get(0).expressionEvaluations().get(0).result()); - Assertions.assertEquals("sgzvahapjyzhpv", + Assertions.assertEquals("rhhuaopppcqeqx", + model.nonCompliantAssignments().get(0).expressionEvaluations().get(0).result()); + Assertions.assertEquals("z", model.nonCompliantAssignments().get(0).expressionEvaluations().get(0).targetValue()); - Assertions.assertEquals("zcjrvxdjzlmwlx", + Assertions.assertEquals("hzxct", model.nonCompliantAssignments().get(0).expressionEvaluations().get(0).expressionValue()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentScaleSettingsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentScaleSettingsTests.java index 19669b445a53..2c3214d217e3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentScaleSettingsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentScaleSettingsTests.java @@ -13,18 +13,18 @@ public final class DeploymentScaleSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentScaleSettings model - = BinaryData.fromString("{\"scaleType\":\"Standard\",\"capacity\":217402337,\"activeCapacity\":1985211204}") + = BinaryData.fromString("{\"scaleType\":\"Standard\",\"capacity\":164113652,\"activeCapacity\":204480929}") .toObject(DeploymentScaleSettings.class); Assertions.assertEquals(DeploymentScaleType.STANDARD, model.scaleType()); - Assertions.assertEquals(217402337, model.capacity()); + Assertions.assertEquals(164113652, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentScaleSettings model - = new DeploymentScaleSettings().withScaleType(DeploymentScaleType.STANDARD).withCapacity(217402337); + = new DeploymentScaleSettings().withScaleType(DeploymentScaleType.STANDARD).withCapacity(164113652); model = BinaryData.fromObject(model).toObject(DeploymentScaleSettings.class); Assertions.assertEquals(DeploymentScaleType.STANDARD, model.scaleType()); - Assertions.assertEquals(217402337, model.capacity()); + Assertions.assertEquals(164113652, model.capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentSizeCapacityTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentSizeCapacityTests.java index 1bafc0554124..425eba1aa39b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentSizeCapacityTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentSizeCapacityTests.java @@ -11,7 +11,7 @@ public final class DeploymentSizeCapacityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSizeCapacity model = BinaryData.fromString( - "{\"modelInstanceAcceleratorCount\":1822653661,\"totalAvailableCapacity\":793667123,\"largestDeploymentCapacity\":591375504}") + "{\"modelInstanceAcceleratorCount\":267543853,\"totalAvailableCapacity\":95279837,\"largestDeploymentCapacity\":2087712194}") .toObject(DeploymentSizeCapacity.class); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentSkuListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentSkuListResultTests.java index d2eb82751395..39192f5cfc99 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentSkuListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentSkuListResultTests.java @@ -12,8 +12,8 @@ public final class DeploymentSkuListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentSkuListResult model = BinaryData.fromString( - "{\"nextLink\":\"ygdvwv\",\"value\":[{\"resourceType\":\"hgwxrtfudx\",\"sku\":{\"name\":\"xg\",\"tier\":\"Free\",\"size\":\"vrvmnpkukghim\",\"family\":\"lxgwimfnjhf\",\"capacity\":1453079674},\"capacity\":{\"minimum\":279128548,\"maximum\":1364854501,\"step\":1767053067,\"default\":739435613,\"allowedValues\":[1631223460,1941529863]}},{\"resourceType\":\"ikf\",\"sku\":{\"name\":\"wneaiv\",\"tier\":\"Enterprise\",\"size\":\"elpcirelsfeaenwa\",\"family\":\"atklddxbjhwuaa\",\"capacity\":1246118617},\"capacity\":{\"minimum\":1294061553,\"maximum\":1892687086,\"step\":1616817744,\"default\":113481876,\"allowedValues\":[1679765822,106141655,946948591]}},{\"resourceType\":\"glrvimjwosytxi\",\"sku\":{\"name\":\"skfc\",\"tier\":\"Free\",\"size\":\"miekkezzikhlyfjh\",\"family\":\"qgge\",\"capacity\":248292806},\"capacity\":{\"minimum\":253317009,\"maximum\":663695580,\"step\":624778524,\"default\":2007776195,\"allowedValues\":[1233334035,65677300,1541394178,190978742]}}]}") + "{\"nextLink\":\"g\",\"value\":[{\"resourceType\":\"fudxepxgyqagvrv\",\"sku\":{\"name\":\"pkukghi\",\"tier\":\"Enterprise\",\"size\":\"xgwim\",\"family\":\"jhfjxwm\",\"capacity\":1343784830},\"capacity\":{\"minimum\":1767053067,\"maximum\":739435613,\"step\":1563203885,\"default\":1941529863,\"allowedValues\":[508782992]}},{\"resourceType\":\"jawneaiv\",\"sku\":{\"name\":\"czelpcirel\",\"tier\":\"Free\",\"size\":\"enwabfatk\",\"family\":\"dxbjhwuaanozj\",\"capacity\":443965325},\"capacity\":{\"minimum\":1616817744,\"maximum\":113481876,\"step\":171728083,\"default\":106141655,\"allowedValues\":[1536946764]}},{\"resourceType\":\"rvimjwosytxitcsk\",\"sku\":{\"name\":\"k\",\"tier\":\"Premium\",\"size\":\"iekkezz\",\"family\":\"hlyfjhdgqgg\",\"capacity\":1278183507},\"capacity\":{\"minimum\":1747128451,\"maximum\":1375872720,\"step\":2021053825,\"default\":277220596,\"allowedValues\":[1644880180,1233334035,65677300,1541394178]}}]}") .toObject(DeploymentSkuListResult.class); - Assertions.assertEquals("ygdvwv", model.nextLink()); + Assertions.assertEquals("g", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteMockTests.java index 1c3b4e633dbd..e86aae1a37f6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.deployments().delete("oyycuxdtz", "q", "psdudgco", com.azure.core.util.Context.NONE); + manager.deployments().delete("urejqrshzzbg", "ll", "xiqqzjkoxdupna", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSkusMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSkusMockTests.java index b6e63c06f916..9ab1484b5a59 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSkusMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSkusMockTests.java @@ -23,7 +23,7 @@ public final class DeploymentsListSkusMockTests { @Test public void testListSkus() throws Exception { String responseStr - = "{\"value\":[{\"resourceType\":\"tzjgcfjfxtbwj\",\"sku\":{\"name\":\"rmuydgfttmdofg\",\"tier\":\"Standard\",\"size\":\"fuof\",\"family\":\"xodwxm\",\"capacity\":1870102340},\"capacity\":{\"minimum\":1903941433,\"maximum\":1306802369,\"step\":1540896749,\"default\":23615940,\"allowedValues\":[574698055,599346072,2050951187,1654770372]}}]}"; + = "{\"value\":[{\"resourceType\":\"lniwmcpmrrd\",\"sku\":{\"name\":\"v\",\"tier\":\"Basic\",\"size\":\"phbeaeqjz\",\"family\":\"kdclacroczf\",\"capacity\":658643480},\"capacity\":{\"minimum\":1548447923,\"maximum\":1811102732,\"step\":729943436,\"default\":1719736823,\"allowedValues\":[1405110298,1138740146,348446577,1331091838]}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,19 +32,19 @@ public void testListSkus() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.deployments() - .listSkus("rytgrhzbqfdpfawr", "tvcshtkutzcttb", "gdirda", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.deployments().listSkus("ayscseydzje", "exmnv", "vmuw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("tzjgcfjfxtbwj", response.iterator().next().resourceType()); - Assertions.assertEquals("rmuydgfttmdofg", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals("fuof", response.iterator().next().sku().size()); - Assertions.assertEquals("xodwxm", response.iterator().next().sku().family()); - Assertions.assertEquals(1870102340, response.iterator().next().sku().capacity()); - Assertions.assertEquals(1903941433, response.iterator().next().capacity().minimum()); - Assertions.assertEquals(1306802369, response.iterator().next().capacity().maximum()); - Assertions.assertEquals(1540896749, response.iterator().next().capacity().step()); - Assertions.assertEquals(23615940, response.iterator().next().capacity().defaultProperty()); - Assertions.assertEquals(574698055, response.iterator().next().capacity().allowedValues().get(0)); + Assertions.assertEquals("lniwmcpmrrd", response.iterator().next().resourceType()); + Assertions.assertEquals("v", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); + Assertions.assertEquals("phbeaeqjz", response.iterator().next().sku().size()); + Assertions.assertEquals("kdclacroczf", response.iterator().next().sku().family()); + Assertions.assertEquals(658643480, response.iterator().next().sku().capacity()); + Assertions.assertEquals(1548447923, response.iterator().next().capacity().minimum()); + Assertions.assertEquals(1811102732, response.iterator().next().capacity().maximum()); + Assertions.assertEquals(729943436, response.iterator().next().capacity().step()); + Assertions.assertEquals(1719736823, response.iterator().next().capacity().defaultProperty()); + Assertions.assertEquals(1405110298, response.iterator().next().capacity().allowedValues().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/EvaluateDeploymentPoliciesRequestTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/EvaluateDeploymentPoliciesRequestTests.java index 5436b134d516..bc8378f427ed 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/EvaluateDeploymentPoliciesRequestTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/EvaluateDeploymentPoliciesRequestTests.java @@ -16,70 +16,38 @@ public final class EvaluateDeploymentPoliciesRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EvaluateDeploymentPoliciesRequest model = BinaryData.fromString( - "{\"deployments\":[{\"name\":\"walm\",\"properties\":{\"model\":{\"publisher\":\"yoxa\",\"format\":\"dkzjancuxrh\",\"name\":\"bavxbniwdjswzt\",\"version\":\"bpg\",\"source\":\"ytxhp\",\"sourceAccount\":\"bzpfzab\",\"callRateLimit\":{\"count\":99.19059,\"renewalPeriod\":98.16212,\"rules\":[{}]}},\"raiPolicyName\":\"tyq\"}},{\"name\":\"klbb\",\"properties\":{\"model\":{\"publisher\":\"plwzbhvgyugu\",\"format\":\"vmkfssxqu\",\"name\":\"fpl\",\"version\":\"gsxnkjzkdeslpv\",\"source\":\"pwiyig\",\"sourceAccount\":\"pkdwzbai\",\"callRateLimit\":{\"count\":81.695045,\"renewalPeriod\":31.908703,\"rules\":[{},{},{},{}]}},\"raiPolicyName\":\"qupedeojnab\"}},{\"name\":\"khsmtxpsiebt\",\"properties\":{\"model\":{\"publisher\":\"vpesapskrdqmhjjd\",\"format\":\"ldwkyzxuutkn\",\"name\":\"scwsv\",\"version\":\"otogtwrupqs\",\"source\":\"nmic\",\"sourceAccount\":\"vce\",\"callRateLimit\":{\"count\":40.508373,\"renewalPeriod\":97.97487,\"rules\":[{},{},{},{}]}},\"raiPolicyName\":\"tyfjfcnjbkcnxdhb\"}},{\"name\":\"tkphywpnvjtoqn\",\"properties\":{\"model\":{\"publisher\":\"mclfplphoxuscr\",\"format\":\"bgyepsbj\",\"name\":\"zq\",\"version\":\"xywpmueefjzwfqkq\",\"source\":\"ids\",\"sourceAccount\":\"onobglaocqx\",\"callRateLimit\":{\"count\":90.26907,\"renewalPeriod\":62.299984,\"rules\":[{}]}},\"raiPolicyName\":\"ytlmoyrxvwfud\"}}]}") + "{\"deployments\":[{\"name\":\"pgn\",\"properties\":{\"model\":{\"publisher\":\"txhp\",\"format\":\"bzpfzab\",\"name\":\"cuh\",\"version\":\"tcty\",\"source\":\"klbb\",\"sourceAccount\":\"plwzbhvgyugu\",\"callRateLimit\":{\"count\":90.33446,\"renewalPeriod\":73.602875,\"rules\":[{}]}},\"raiPolicyName\":\"qukkfp\"}}]}") .toObject(EvaluateDeploymentPoliciesRequest.class); - Assertions.assertEquals("walm", model.deployments().get(0).name()); - Assertions.assertEquals("yoxa", model.deployments().get(0).properties().model().publisher()); - Assertions.assertEquals("dkzjancuxrh", model.deployments().get(0).properties().model().format()); - Assertions.assertEquals("bavxbniwdjswzt", model.deployments().get(0).properties().model().name()); - Assertions.assertEquals("bpg", model.deployments().get(0).properties().model().version()); - Assertions.assertEquals("ytxhp", model.deployments().get(0).properties().model().source()); - Assertions.assertEquals("bzpfzab", model.deployments().get(0).properties().model().sourceAccount()); - Assertions.assertEquals("tyq", model.deployments().get(0).properties().raiPolicyName()); + Assertions.assertEquals("pgn", model.deployments().get(0).name()); + Assertions.assertEquals("txhp", model.deployments().get(0).properties().model().publisher()); + Assertions.assertEquals("bzpfzab", model.deployments().get(0).properties().model().format()); + Assertions.assertEquals("cuh", model.deployments().get(0).properties().model().name()); + Assertions.assertEquals("tcty", model.deployments().get(0).properties().model().version()); + Assertions.assertEquals("klbb", model.deployments().get(0).properties().model().source()); + Assertions.assertEquals("plwzbhvgyugu", model.deployments().get(0).properties().model().sourceAccount()); + Assertions.assertEquals("qukkfp", model.deployments().get(0).properties().raiPolicyName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EvaluateDeploymentPoliciesRequest model - = new EvaluateDeploymentPoliciesRequest() - .withDeployments( - Arrays - .asList( - new EvaluateDeploymentPoliciesDeployment().withName("walm") - .withProperties( - new EvaluateDeploymentPoliciesDeploymentProperties() - .withModel(new DeploymentModel().withPublisher("yoxa") - .withFormat("dkzjancuxrh") - .withName("bavxbniwdjswzt") - .withVersion("bpg") - .withSource("ytxhp") - .withSourceAccount("bzpfzab")) - .withRaiPolicyName("tyq")), - new EvaluateDeploymentPoliciesDeployment().withName("klbb") - .withProperties(new EvaluateDeploymentPoliciesDeploymentProperties().withModel( - new DeploymentModel().withPublisher("plwzbhvgyugu") - .withFormat("vmkfssxqu") - .withName("fpl") - .withVersion("gsxnkjzkdeslpv") - .withSource("pwiyig") - .withSourceAccount("pkdwzbai")) - .withRaiPolicyName("qupedeojnab")), - new EvaluateDeploymentPoliciesDeployment().withName("khsmtxpsiebt") - .withProperties(new EvaluateDeploymentPoliciesDeploymentProperties() - .withModel(new DeploymentModel().withPublisher("vpesapskrdqmhjjd") - .withFormat("ldwkyzxuutkn") - .withName("scwsv") - .withVersion("otogtwrupqs") - .withSource("nmic") - .withSourceAccount("vce")) - .withRaiPolicyName("tyfjfcnjbkcnxdhb")), - new EvaluateDeploymentPoliciesDeployment().withName("tkphywpnvjtoqn") - .withProperties(new EvaluateDeploymentPoliciesDeploymentProperties() - .withModel(new DeploymentModel().withPublisher("mclfplphoxuscr") - .withFormat("bgyepsbj") - .withName("zq") - .withVersion("xywpmueefjzwfqkq") - .withSource("ids") - .withSourceAccount("onobglaocqx")) - .withRaiPolicyName("ytlmoyrxvwfud")))); + EvaluateDeploymentPoliciesRequest model = new EvaluateDeploymentPoliciesRequest() + .withDeployments(Arrays.asList(new EvaluateDeploymentPoliciesDeployment().withName("pgn") + .withProperties(new EvaluateDeploymentPoliciesDeploymentProperties() + .withModel(new DeploymentModel().withPublisher("txhp") + .withFormat("bzpfzab") + .withName("cuh") + .withVersion("tcty") + .withSource("klbb") + .withSourceAccount("plwzbhvgyugu")) + .withRaiPolicyName("qukkfp")))); model = BinaryData.fromObject(model).toObject(EvaluateDeploymentPoliciesRequest.class); - Assertions.assertEquals("walm", model.deployments().get(0).name()); - Assertions.assertEquals("yoxa", model.deployments().get(0).properties().model().publisher()); - Assertions.assertEquals("dkzjancuxrh", model.deployments().get(0).properties().model().format()); - Assertions.assertEquals("bavxbniwdjswzt", model.deployments().get(0).properties().model().name()); - Assertions.assertEquals("bpg", model.deployments().get(0).properties().model().version()); - Assertions.assertEquals("ytxhp", model.deployments().get(0).properties().model().source()); - Assertions.assertEquals("bzpfzab", model.deployments().get(0).properties().model().sourceAccount()); - Assertions.assertEquals("tyq", model.deployments().get(0).properties().raiPolicyName()); + Assertions.assertEquals("pgn", model.deployments().get(0).name()); + Assertions.assertEquals("txhp", model.deployments().get(0).properties().model().publisher()); + Assertions.assertEquals("bzpfzab", model.deployments().get(0).properties().model().format()); + Assertions.assertEquals("cuh", model.deployments().get(0).properties().model().name()); + Assertions.assertEquals("tcty", model.deployments().get(0).properties().model().version()); + Assertions.assertEquals("klbb", model.deployments().get(0).properties().model().source()); + Assertions.assertEquals("plwzbhvgyugu", model.deployments().get(0).properties().model().sourceAccount()); + Assertions.assertEquals("qukkfp", model.deployments().get(0).properties().raiPolicyName()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/EvaluateDeploymentPoliciesResponseInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/EvaluateDeploymentPoliciesResponseInnerTests.java index ac8c7ea5ebb4..e401536e3334 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/EvaluateDeploymentPoliciesResponseInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/EvaluateDeploymentPoliciesResponseInnerTests.java @@ -13,22 +13,19 @@ public final class EvaluateDeploymentPoliciesResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EvaluateDeploymentPoliciesResponseInner model = BinaryData.fromString( - "{\"results\":{\"wxzvlvqhjkb\":{\"evaluationOutcome\":\"Compliant\",\"errorMessage\":\"baliourqhakauha\",\"nonCompliantAssignments\":[{\"assignmentId\":\"wxosowzxcug\",\"policyDefinitionId\":\"jooxdjebw\",\"policySetDefinitionId\":\"cwwfvovbvme\",\"evaluationOutcome\":\"NonCompliant\",\"nonComplianceReason\":\"vyhzceuojgjrwj\",\"effect\":\"iotwmcdytdxwit\",\"expressionEvaluations\":[{}]},{\"assignmentId\":\"awgqwgxhni\",\"policyDefinitionId\":\"x\",\"policySetDefinitionId\":\"kpycgklwndnhjd\",\"evaluationOutcome\":\"NonCompliant\",\"nonComplianceReason\":\"vylwzbtdhxuj\",\"effect\":\"bm\",\"expressionEvaluations\":[{},{},{}]},{\"assignmentId\":\"wpr\",\"policyDefinitionId\":\"lve\",\"policySetDefinitionId\":\"lupj\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"xobbcswsrt\",\"effect\":\"iplrbpbewtghfgb\",\"expressionEvaluations\":[{}]}]}}}") + "{\"results\":{\"pv\":{\"evaluationOutcome\":\"Error\",\"errorMessage\":\"plpho\",\"nonCompliantAssignments\":[{\"assignmentId\":\"rpabg\",\"policyDefinitionId\":\"psbjta\",\"policySetDefinitionId\":\"ugxywpmueef\",\"evaluationOutcome\":\"NonCompliant\",\"nonComplianceReason\":\"qkqujidsu\",\"effect\":\"nobglaocq\",\"expressionEvaluations\":[{}]},{\"assignmentId\":\"mgyudxytlmoyrxv\",\"policyDefinitionId\":\"u\",\"policySetDefinitionId\":\"pz\",\"evaluationOutcome\":\"Compliant\",\"nonComplianceReason\":\"dzhlrq\",\"effect\":\"hckfrlhrx\",\"expressionEvaluations\":[{}]},{\"assignmentId\":\"vpycanuzbp\",\"policyDefinitionId\":\"afkuwb\",\"policySetDefinitionId\":\"nwbmeh\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"v\",\"effect\":\"srtslhspkdeem\",\"expressionEvaluations\":[{}]},{\"assignmentId\":\"xagkvtmelmqkrh\",\"policyDefinitionId\":\"vljua\",\"policySetDefinitionId\":\"quhcdhmduala\",\"evaluationOutcome\":\"Compliant\",\"nonComplianceReason\":\"vfadmws\",\"effect\":\"r\",\"expressionEvaluations\":[{},{}]}]},\"pjmkhfxobbc\":{\"evaluationOutcome\":\"Error\",\"errorMessage\":\"lf\",\"nonCompliantAssignments\":[{\"assignmentId\":\"wbnb\",\"policyDefinitionId\":\"ldawkzbaliourqha\",\"policySetDefinitionId\":\"uhashsfwx\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"z\",\"effect\":\"ugicjooxdjebw\",\"expressionEvaluations\":[{},{},{}]},{\"assignmentId\":\"wfvovbv\",\"policyDefinitionId\":\"uecivyhz\",\"policySetDefinitionId\":\"uojgj\",\"evaluationOutcome\":\"NonCompliant\",\"nonComplianceReason\":\"eiotwmcdytdx\",\"effect\":\"txnrjaw\",\"expressionEvaluations\":[{},{}]},{\"assignmentId\":\"xhniskxfbkpycgk\",\"policyDefinitionId\":\"ndnhj\",\"policySetDefinitionId\":\"uwhvylwzbtdhxujz\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"ow\",\"effect\":\"przqlveu\",\"expressionEvaluations\":[{}]}]},\"uthnnprnxipeilpj\":{\"evaluationOutcome\":\"NonCompliant\",\"errorMessage\":\"tjrip\",\"nonCompliantAssignments\":[{\"assignmentId\":\"bewtghfg\",\"policyDefinitionId\":\"c\",\"policySetDefinitionId\":\"xzvlvqhjkbegib\",\"evaluationOutcome\":\"NonCompliant\",\"nonComplianceReason\":\"iebwwaloayqcgwrt\",\"effect\":\"uzgwyzmhtx\",\"expressionEvaluations\":[{},{},{},{}]},{\"assignmentId\":\"ts\",\"policyDefinitionId\":\"jcbpwxqpsrknft\",\"policySetDefinitionId\":\"vriuhprwmdyvx\",\"evaluationOutcome\":\"NonCompliant\",\"nonComplianceReason\":\"riwwroy\",\"effect\":\"exrmcqibycnojvk\",\"expressionEvaluations\":[{}]},{\"assignmentId\":\"qsgzvahapj\",\"policyDefinitionId\":\"hpvgqz\",\"policySetDefinitionId\":\"rvxdjzlmw\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"ug\",\"effect\":\"zovawjvz\",\"expressionEvaluations\":[{},{}]}]},\"bxwyjsflhhcaa\":{\"evaluationOutcome\":\"Error\",\"errorMessage\":\"jxdultskzbbtdzu\",\"nonCompliantAssignments\":[{\"assignmentId\":\"kgpwoz\",\"policyDefinitionId\":\"kfpbs\",\"policySetDefinitionId\":\"ofd\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"sd\",\"effect\":\"ouwaboekqvkeln\",\"expressionEvaluations\":[{},{},{}]}]}}}") .toObject(EvaluateDeploymentPoliciesResponseInner.class); - Assertions.assertEquals(PolicyEvaluationOutcome.COMPLIANT, - model.results().get("wxzvlvqhjkb").evaluationOutcome()); - Assertions.assertEquals("baliourqhakauha", model.results().get("wxzvlvqhjkb").errorMessage()); - Assertions.assertEquals("wxosowzxcug", - model.results().get("wxzvlvqhjkb").nonCompliantAssignments().get(0).assignmentId()); - Assertions.assertEquals("jooxdjebw", - model.results().get("wxzvlvqhjkb").nonCompliantAssignments().get(0).policyDefinitionId()); - Assertions.assertEquals("cwwfvovbvme", - model.results().get("wxzvlvqhjkb").nonCompliantAssignments().get(0).policySetDefinitionId()); + Assertions.assertEquals(PolicyEvaluationOutcome.ERROR, model.results().get("pv").evaluationOutcome()); + Assertions.assertEquals("plpho", model.results().get("pv").errorMessage()); + Assertions.assertEquals("rpabg", model.results().get("pv").nonCompliantAssignments().get(0).assignmentId()); + Assertions.assertEquals("psbjta", + model.results().get("pv").nonCompliantAssignments().get(0).policyDefinitionId()); + Assertions.assertEquals("ugxywpmueef", + model.results().get("pv").nonCompliantAssignments().get(0).policySetDefinitionId()); Assertions.assertEquals(PolicyEvaluationOutcome.NON_COMPLIANT, - model.results().get("wxzvlvqhjkb").nonCompliantAssignments().get(0).evaluationOutcome()); - Assertions.assertEquals("vyhzceuojgjrwj", - model.results().get("wxzvlvqhjkb").nonCompliantAssignments().get(0).nonComplianceReason()); - Assertions.assertEquals("iotwmcdytdxwit", - model.results().get("wxzvlvqhjkb").nonCompliantAssignments().get(0).effect()); + model.results().get("pv").nonCompliantAssignments().get(0).evaluationOutcome()); + Assertions.assertEquals("qkqujidsu", + model.results().get("pv").nonCompliantAssignments().get(0).nonComplianceReason()); + Assertions.assertEquals("nobglaocq", model.results().get("pv").nonCompliantAssignments().get(0).effect()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/FqdnOutboundRuleTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/FqdnOutboundRuleTests.java index d2ce73cbebc6..e37cef7f75b5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/FqdnOutboundRuleTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/FqdnOutboundRuleTests.java @@ -14,21 +14,21 @@ public final class FqdnOutboundRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FqdnOutboundRule model = BinaryData.fromString( - "{\"type\":\"FQDN\",\"destination\":\"eobfsxstcyilbvzm\",\"category\":\"Dependency\",\"status\":\"Provisioning\",\"errorInformation\":\"quzexokjxebjvbz\",\"parentRuleNames\":[\"abwmvogljsv\",\"pgidnw\"]}") + "{\"type\":\"FQDN\",\"destination\":\"qnt\",\"category\":\"Recommended\",\"status\":\"Provisioning\",\"errorInformation\":\"hvmaxgnuyeamcmhu\",\"parentRuleNames\":[\"ecehokw\",\"pqtwloesqrggvrb\",\"yrukoi\"]}") .toObject(FqdnOutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.category()); Assertions.assertEquals(RuleStatus.PROVISIONING, model.status()); - Assertions.assertEquals("eobfsxstcyilbvzm", model.destination()); + Assertions.assertEquals("qnt", model.destination()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FqdnOutboundRule model = new FqdnOutboundRule().withCategory(RuleCategory.DEPENDENCY) + FqdnOutboundRule model = new FqdnOutboundRule().withCategory(RuleCategory.RECOMMENDED) .withStatus(RuleStatus.PROVISIONING) - .withDestination("eobfsxstcyilbvzm"); + .withDestination("qnt"); model = BinaryData.fromObject(model).toObject(FqdnOutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.category()); Assertions.assertEquals(RuleStatus.PROVISIONING, model.status()); - Assertions.assertEquals("eobfsxstcyilbvzm", model.destination()); + Assertions.assertEquals("qnt", model.destination()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/GatedModelAccessPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/GatedModelAccessPropertiesTests.java deleted file mode 100644 index 88d0ecaca454..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/GatedModelAccessPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.GatedModelAccessProperties; -import org.junit.jupiter.api.Assertions; - -public final class GatedModelAccessPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GatedModelAccessProperties model - = BinaryData.fromString("{\"connectionId\":\"bfcmkrfts\"}").toObject(GatedModelAccessProperties.class); - Assertions.assertEquals("bfcmkrfts", model.connectionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GatedModelAccessProperties model = new GatedModelAccessProperties().withConnectionId("bfcmkrfts"); - model = BinaryData.fromObject(model).toObject(GatedModelAccessProperties.class); - Assertions.assertEquals("bfcmkrfts", model.connectionId()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/HostedAgentDeploymentTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/HostedAgentDeploymentTests.java index cdc8a4762480..eaa74f633d07 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/HostedAgentDeploymentTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/HostedAgentDeploymentTests.java @@ -19,51 +19,59 @@ public final class HostedAgentDeploymentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HostedAgentDeployment model = BinaryData.fromString( - "{\"deploymentType\":\"Hosted\",\"minReplicas\":62009585,\"maxReplicas\":1512054259,\"displayName\":\"wimaaneakhtmh\",\"deploymentId\":\"cyanrfvqtvkhgv\",\"state\":\"Updating\",\"protocols\":[{\"protocol\":\"A2A\",\"version\":\"oaqymhcctopuowyr\"},{\"protocol\":\"A2A\",\"version\":\"yhquhc\"},{\"protocol\":\"Agent\",\"version\":\"vhajpxec\"}],\"agents\":[{\"agentVersion\":\"hscozawmvgxsmpk\",\"agentId\":\"wirfljf\",\"agentName\":\"xqou\"}],\"provisioningState\":\"Failed\",\"description\":\"nmckaprhkn\",\"tags\":{\"ihkkyowl\":\"jgencdgmoque\",\"ldxwhieproqksm\":\"jouw\",\"yotnplfacqo\":\"xmcvprstvkitbfjt\"}}") + "{\"deploymentType\":\"Hosted\",\"minReplicas\":836747859,\"maxReplicas\":1807188661,\"displayName\":\"aovjow\",\"deploymentId\":\"hpa\",\"state\":\"Deleting\",\"protocols\":[{\"protocol\":\"Responses\",\"version\":\"t\"},{\"protocol\":\"Agent\",\"version\":\"xns\"}],\"agents\":[{\"agentVersion\":\"cg\",\"agentId\":\"mv\",\"agentName\":\"bxeetqujxcxxqn\"},{\"agentVersion\":\"qjkedwqurc\",\"agentId\":\"jmrvvxwjongz\",\"agentName\":\"hqqrsilcch\"},{\"agentVersion\":\"xxkan\",\"agentId\":\"vri\",\"agentName\":\"gv\"},{\"agentVersion\":\"jrulfucte\",\"agentId\":\"thcfj\",\"agentName\":\"xlyubqjrostv\"}],\"provisioningState\":\"Deleting\",\"description\":\"mtzzbeq\",\"tags\":{\"srwrsnrhpqati\":\"rxalxrdha\"}}") .toObject(HostedAgentDeployment.class); - Assertions.assertEquals("nmckaprhkn", model.description()); - Assertions.assertEquals("jgencdgmoque", model.tags().get("ihkkyowl")); - Assertions.assertEquals("wimaaneakhtmh", model.displayName()); - Assertions.assertEquals("cyanrfvqtvkhgv", model.deploymentId()); - Assertions.assertEquals(AgentDeploymentState.UPDATING, model.state()); - Assertions.assertEquals(AgentProtocol.A2A, model.protocols().get(0).protocol()); - Assertions.assertEquals("oaqymhcctopuowyr", model.protocols().get(0).version()); - Assertions.assertEquals("wirfljf", model.agents().get(0).agentId()); - Assertions.assertEquals("xqou", model.agents().get(0).agentName()); - Assertions.assertEquals("hscozawmvgxsmpk", model.agents().get(0).agentVersion()); - Assertions.assertEquals(62009585, model.minReplicas()); - Assertions.assertEquals(1512054259, model.maxReplicas()); + Assertions.assertEquals("mtzzbeq", model.description()); + Assertions.assertEquals("rxalxrdha", model.tags().get("srwrsnrhpqati")); + Assertions.assertEquals("aovjow", model.displayName()); + Assertions.assertEquals("hpa", model.deploymentId()); + Assertions.assertEquals(AgentDeploymentState.DELETING, model.state()); + Assertions.assertEquals(AgentProtocol.RESPONSES, model.protocols().get(0).protocol()); + Assertions.assertEquals("t", model.protocols().get(0).version()); + Assertions.assertEquals("mv", model.agents().get(0).agentId()); + Assertions.assertEquals("bxeetqujxcxxqn", model.agents().get(0).agentName()); + Assertions.assertEquals("cg", model.agents().get(0).agentVersion()); + Assertions.assertEquals(836747859, model.minReplicas()); + Assertions.assertEquals(1807188661, model.maxReplicas()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HostedAgentDeployment model = new HostedAgentDeployment().withDescription("nmckaprhkn") - .withTags(mapOf("ihkkyowl", "jgencdgmoque", "ldxwhieproqksm", "jouw", "yotnplfacqo", "xmcvprstvkitbfjt")) - .withDisplayName("wimaaneakhtmh") - .withDeploymentId("cyanrfvqtvkhgv") - .withState(AgentDeploymentState.UPDATING) - .withProtocols(Arrays.asList( - new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("oaqymhcctopuowyr"), - new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("yhquhc"), - new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("vhajpxec"))) - .withAgents(Arrays.asList(new VersionedAgentReference().withAgentId("wirfljf") - .withAgentName("xqou") - .withAgentVersion("hscozawmvgxsmpk"))) - .withMinReplicas(62009585) - .withMaxReplicas(1512054259); + HostedAgentDeployment model + = new HostedAgentDeployment().withDescription("mtzzbeq") + .withTags(mapOf("srwrsnrhpqati", "rxalxrdha")) + .withDisplayName("aovjow") + .withDeploymentId("hpa") + .withState(AgentDeploymentState.DELETING) + .withProtocols(Arrays.asList( + new AgentProtocolVersion().withProtocol(AgentProtocol.RESPONSES).withVersion("t"), + new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("xns"))) + .withAgents(Arrays.asList( + new VersionedAgentReference().withAgentId("mv") + .withAgentName("bxeetqujxcxxqn") + .withAgentVersion("cg"), + new VersionedAgentReference().withAgentId("jmrvvxwjongz") + .withAgentName("hqqrsilcch") + .withAgentVersion("qjkedwqurc"), + new VersionedAgentReference().withAgentId("vri").withAgentName("gv").withAgentVersion("xxkan"), + new VersionedAgentReference().withAgentId("thcfj") + .withAgentName("xlyubqjrostv") + .withAgentVersion("jrulfucte"))) + .withMinReplicas(836747859) + .withMaxReplicas(1807188661); model = BinaryData.fromObject(model).toObject(HostedAgentDeployment.class); - Assertions.assertEquals("nmckaprhkn", model.description()); - Assertions.assertEquals("jgencdgmoque", model.tags().get("ihkkyowl")); - Assertions.assertEquals("wimaaneakhtmh", model.displayName()); - Assertions.assertEquals("cyanrfvqtvkhgv", model.deploymentId()); - Assertions.assertEquals(AgentDeploymentState.UPDATING, model.state()); - Assertions.assertEquals(AgentProtocol.A2A, model.protocols().get(0).protocol()); - Assertions.assertEquals("oaqymhcctopuowyr", model.protocols().get(0).version()); - Assertions.assertEquals("wirfljf", model.agents().get(0).agentId()); - Assertions.assertEquals("xqou", model.agents().get(0).agentName()); - Assertions.assertEquals("hscozawmvgxsmpk", model.agents().get(0).agentVersion()); - Assertions.assertEquals(62009585, model.minReplicas()); - Assertions.assertEquals(1512054259, model.maxReplicas()); + Assertions.assertEquals("mtzzbeq", model.description()); + Assertions.assertEquals("rxalxrdha", model.tags().get("srwrsnrhpqati")); + Assertions.assertEquals("aovjow", model.displayName()); + Assertions.assertEquals("hpa", model.deploymentId()); + Assertions.assertEquals(AgentDeploymentState.DELETING, model.state()); + Assertions.assertEquals(AgentProtocol.RESPONSES, model.protocols().get(0).protocol()); + Assertions.assertEquals("t", model.protocols().get(0).version()); + Assertions.assertEquals("mv", model.agents().get(0).agentId()); + Assertions.assertEquals("bxeetqujxcxxqn", model.agents().get(0).agentName()); + Assertions.assertEquals("cg", model.agents().get(0).agentVersion()); + Assertions.assertEquals(836747859, model.minReplicas()); + Assertions.assertEquals(1807188661, model.maxReplicas()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/IdentityTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/IdentityTests.java index ab39a2a624f9..0e8de6389b06 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/IdentityTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/IdentityTests.java @@ -16,18 +16,17 @@ public final class IdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Identity model = BinaryData.fromString( - "{\"type\":\"UserAssigned\",\"tenantId\":\"vvtpgvdfgio\",\"principalId\":\"ftutqxlngxlefgu\",\"userAssignedIdentities\":{\"hzrvqd\":{\"principalId\":\"rxdq\",\"clientId\":\"dt\"},\"fbowskanyk\":{\"principalId\":\"bhj\",\"clientId\":\"igeho\"}}}") + "{\"type\":\"None\",\"tenantId\":\"uhrzayvvt\",\"principalId\":\"vdfgiotk\",\"userAssignedIdentities\":{\"thz\":{\"principalId\":\"qxlngx\",\"clientId\":\"fgugnxkrxdqmid\"},\"yktz\":{\"principalId\":\"qdrabhjybigehoqf\",\"clientId\":\"wska\"}}}") .toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Identity model = new Identity().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("hzrvqd", new UserAssignedIdentity(), "fbowskanyk", new UserAssignedIdentity())); + Identity model = new Identity().withType(ResourceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("thz", new UserAssignedIdentity(), "yktz", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/LocationBasedModelCapacitiesListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/LocationBasedModelCapacitiesListMockTests.java index 1b8a4465cf28..566caf871492 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/LocationBasedModelCapacitiesListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/LocationBasedModelCapacitiesListMockTests.java @@ -23,7 +23,7 @@ public final class LocationBasedModelCapacitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"location\":\"sxexawxoibdctj\",\"properties\":{\"model\":{\"publisher\":\"qqqeetsqaclc\",\"format\":\"rofyyraiai\",\"name\":\"kewqwamptld\",\"version\":\"orzljhnxfkffng\",\"source\":\"illoirm\",\"sourceAccount\":\"d\",\"callRateLimit\":{\"count\":8.565807,\"renewalPeriod\":21.073235,\"rules\":[{}]}},\"skuName\":\"knr\",\"availableCapacity\":73.112564,\"availableFinetuneCapacity\":7.9895916,\"scopeId\":\"tk\",\"scopeType\":\"Classic\"},\"id\":\"ii\",\"name\":\"inlic\",\"type\":\"moyoioxdwff\"}]}"; + = "{\"value\":[{\"location\":\"rtwwyjmgvrlhfxmr\",\"properties\":{\"model\":{\"publisher\":\"h\",\"format\":\"jywkdy\",\"name\":\"szavuafanefictp\",\"version\":\"l\",\"source\":\"ssjbzv\",\"sourceAccount\":\"zw\",\"callRateLimit\":{\"count\":90.5169,\"renewalPeriod\":19.60774,\"rules\":[{},{},{},{}]}},\"skuName\":\"aczhfjdccjn\",\"availableCapacity\":91.759254,\"availableFinetuneCapacity\":95.68183,\"scopeId\":\"uhjcgj\",\"scopeType\":\"Global\"},\"id\":\"tomnlzthc\",\"name\":\"bszsbzrrxey\",\"type\":\"idcow\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +33,19 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.locationBasedModelCapacities() - .list("jmsngmluyr", "kpismmrmrj", "jthizsabcylz", "ietumzenkrdr", com.azure.core.util.Context.NONE); + .list("mpjbh", "yenfspetxeu", "wkhdlckdoxocj", "devzpfr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sxexawxoibdctj", response.iterator().next().location()); - Assertions.assertEquals("qqqeetsqaclc", response.iterator().next().properties().model().publisher()); - Assertions.assertEquals("rofyyraiai", response.iterator().next().properties().model().format()); - Assertions.assertEquals("kewqwamptld", response.iterator().next().properties().model().name()); - Assertions.assertEquals("orzljhnxfkffng", response.iterator().next().properties().model().version()); - Assertions.assertEquals("illoirm", response.iterator().next().properties().model().source()); - Assertions.assertEquals("d", response.iterator().next().properties().model().sourceAccount()); - Assertions.assertEquals("knr", response.iterator().next().properties().skuName()); - Assertions.assertEquals(73.112564F, response.iterator().next().properties().availableCapacity()); - Assertions.assertEquals(7.9895916F, response.iterator().next().properties().availableFinetuneCapacity()); - Assertions.assertEquals("tk", response.iterator().next().properties().scopeId()); - Assertions.assertEquals(QuotaScopeType.CLASSIC, response.iterator().next().properties().scopeType()); + Assertions.assertEquals("rtwwyjmgvrlhfxmr", response.iterator().next().location()); + Assertions.assertEquals("h", response.iterator().next().properties().model().publisher()); + Assertions.assertEquals("jywkdy", response.iterator().next().properties().model().format()); + Assertions.assertEquals("szavuafanefictp", response.iterator().next().properties().model().name()); + Assertions.assertEquals("l", response.iterator().next().properties().model().version()); + Assertions.assertEquals("ssjbzv", response.iterator().next().properties().model().source()); + Assertions.assertEquals("zw", response.iterator().next().properties().model().sourceAccount()); + Assertions.assertEquals("aczhfjdccjn", response.iterator().next().properties().skuName()); + Assertions.assertEquals(91.759254F, response.iterator().next().properties().availableCapacity()); + Assertions.assertEquals(95.68183F, response.iterator().next().properties().availableFinetuneCapacity()); + Assertions.assertEquals("uhjcgj", response.iterator().next().properties().scopeId()); + Assertions.assertEquals(QuotaScopeType.GLOBAL, response.iterator().next().properties().scopeType()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedAgentDeploymentTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedAgentDeploymentTests.java index e7a45b3a5ff9..9043ef06e72f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedAgentDeploymentTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedAgentDeploymentTests.java @@ -19,52 +19,53 @@ public final class ManagedAgentDeploymentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedAgentDeployment model = BinaryData.fromString( - "{\"deploymentType\":\"Managed\",\"displayName\":\"ojusuzgfjzcva\",\"deploymentId\":\"oialahfxwccokdx\",\"state\":\"Stopping\",\"protocols\":[{\"protocol\":\"Agent\",\"version\":\"nuhhoqeqshav\"},{\"protocol\":\"A2A\",\"version\":\"xyrqo\"},{\"protocol\":\"A2A\",\"version\":\"bbnkgzukwdrnz\"},{\"protocol\":\"A2A\",\"version\":\"fceyjn\"}],\"agents\":[{\"agentVersion\":\"fuyf\",\"agentId\":\"pfiddhl\",\"agentName\":\"fz\"},{\"agentVersion\":\"yjmqrf\",\"agentId\":\"ocuselqk\",\"agentName\":\"azrhxudd\"},{\"agentVersion\":\"dtffisjmrkkhm\",\"agentId\":\"mdlgy\",\"agentName\":\"xokwtjawhvagnqfq\"}],\"provisioningState\":\"Creating\",\"description\":\"vmyolcaym\",\"tags\":{\"qdnzyza\":\"tvsnvl\",\"othymgobl\":\"atuwqkokbc\"}}") + "{\"deploymentType\":\"Managed\",\"displayName\":\"rkxgpazwugxyqvnj\",\"deploymentId\":\"felhldiuhzzgqlm\",\"state\":\"Stopped\",\"protocols\":[{\"protocol\":\"Agent\",\"version\":\"djpxpqht\"}],\"agents\":[{\"agentVersion\":\"mhk\",\"agentId\":\"zsdsuxheqdgcrux\",\"agentName\":\"inymmqgwokmikp\"},{\"agentVersion\":\"fbmjxuvji\",\"agentId\":\"dvhaxdvw\",\"agentName\":\"ehpphthdklmveta\"},{\"agentVersion\":\"akfqoixwgiksb\",\"agentId\":\"tooxrpog\",\"agentName\":\"hchgjtnhtukf\"},{\"agentVersion\":\"ihmbfntume\",\"agentId\":\"bxvqxbnuvw\",\"agentName\":\"asgom\"}],\"provisioningState\":\"Succeeded\",\"description\":\"wxuq\",\"tags\":{\"gfredmlscg\":\"sxpwwztjfmkkh\"}}") .toObject(ManagedAgentDeployment.class); - Assertions.assertEquals("vmyolcaym", model.description()); - Assertions.assertEquals("tvsnvl", model.tags().get("qdnzyza")); - Assertions.assertEquals("ojusuzgfjzcva", model.displayName()); - Assertions.assertEquals("oialahfxwccokdx", model.deploymentId()); - Assertions.assertEquals(AgentDeploymentState.STOPPING, model.state()); + Assertions.assertEquals("wxuq", model.description()); + Assertions.assertEquals("sxpwwztjfmkkh", model.tags().get("gfredmlscg")); + Assertions.assertEquals("rkxgpazwugxyqvnj", model.displayName()); + Assertions.assertEquals("felhldiuhzzgqlm", model.deploymentId()); + Assertions.assertEquals(AgentDeploymentState.STOPPED, model.state()); Assertions.assertEquals(AgentProtocol.AGENT, model.protocols().get(0).protocol()); - Assertions.assertEquals("nuhhoqeqshav", model.protocols().get(0).version()); - Assertions.assertEquals("pfiddhl", model.agents().get(0).agentId()); - Assertions.assertEquals("fz", model.agents().get(0).agentName()); - Assertions.assertEquals("fuyf", model.agents().get(0).agentVersion()); + Assertions.assertEquals("djpxpqht", model.protocols().get(0).version()); + Assertions.assertEquals("zsdsuxheqdgcrux", model.agents().get(0).agentId()); + Assertions.assertEquals("inymmqgwokmikp", model.agents().get(0).agentName()); + Assertions.assertEquals("mhk", model.agents().get(0).agentVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedAgentDeployment model - = new ManagedAgentDeployment().withDescription("vmyolcaym") - .withTags(mapOf("qdnzyza", "tvsnvl", "othymgobl", "atuwqkokbc")) - .withDisplayName("ojusuzgfjzcva") - .withDeploymentId("oialahfxwccokdx") - .withState(AgentDeploymentState.STOPPING) - .withProtocols(Arrays.asList( - new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("nuhhoqeqshav"), - new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("xyrqo"), - new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("bbnkgzukwdrnz"), - new AgentProtocolVersion().withProtocol(AgentProtocol.A2A).withVersion("fceyjn"))) - .withAgents(Arrays.asList( - new VersionedAgentReference().withAgentId("pfiddhl").withAgentName("fz").withAgentVersion("fuyf"), - new VersionedAgentReference().withAgentId("ocuselqk") - .withAgentName("azrhxudd") - .withAgentVersion("yjmqrf"), - new VersionedAgentReference().withAgentId("mdlgy") - .withAgentName("xokwtjawhvagnqfq") - .withAgentVersion("dtffisjmrkkhm"))); + ManagedAgentDeployment model = new ManagedAgentDeployment().withDescription("wxuq") + .withTags(mapOf("gfredmlscg", "sxpwwztjfmkkh")) + .withDisplayName("rkxgpazwugxyqvnj") + .withDeploymentId("felhldiuhzzgqlm") + .withState(AgentDeploymentState.STOPPED) + .withProtocols( + Arrays.asList(new AgentProtocolVersion().withProtocol(AgentProtocol.AGENT).withVersion("djpxpqht"))) + .withAgents(Arrays.asList( + new VersionedAgentReference().withAgentId("zsdsuxheqdgcrux") + .withAgentName("inymmqgwokmikp") + .withAgentVersion("mhk"), + new VersionedAgentReference().withAgentId("dvhaxdvw") + .withAgentName("ehpphthdklmveta") + .withAgentVersion("fbmjxuvji"), + new VersionedAgentReference().withAgentId("tooxrpog") + .withAgentName("hchgjtnhtukf") + .withAgentVersion("akfqoixwgiksb"), + new VersionedAgentReference().withAgentId("bxvqxbnuvw") + .withAgentName("asgom") + .withAgentVersion("ihmbfntume"))); model = BinaryData.fromObject(model).toObject(ManagedAgentDeployment.class); - Assertions.assertEquals("vmyolcaym", model.description()); - Assertions.assertEquals("tvsnvl", model.tags().get("qdnzyza")); - Assertions.assertEquals("ojusuzgfjzcva", model.displayName()); - Assertions.assertEquals("oialahfxwccokdx", model.deploymentId()); - Assertions.assertEquals(AgentDeploymentState.STOPPING, model.state()); + Assertions.assertEquals("wxuq", model.description()); + Assertions.assertEquals("sxpwwztjfmkkh", model.tags().get("gfredmlscg")); + Assertions.assertEquals("rkxgpazwugxyqvnj", model.displayName()); + Assertions.assertEquals("felhldiuhzzgqlm", model.deploymentId()); + Assertions.assertEquals(AgentDeploymentState.STOPPED, model.state()); Assertions.assertEquals(AgentProtocol.AGENT, model.protocols().get(0).protocol()); - Assertions.assertEquals("nuhhoqeqshav", model.protocols().get(0).version()); - Assertions.assertEquals("pfiddhl", model.agents().get(0).agentId()); - Assertions.assertEquals("fz", model.agents().get(0).agentName()); - Assertions.assertEquals("fuyf", model.agents().get(0).agentVersion()); + Assertions.assertEquals("djpxpqht", model.protocols().get(0).version()); + Assertions.assertEquals("zsdsuxheqdgcrux", model.agents().get(0).agentId()); + Assertions.assertEquals("inymmqgwokmikp", model.agents().get(0).agentName()); + Assertions.assertEquals("mhk", model.agents().get(0).agentVersion()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacitiesListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacitiesListMockTests.java index 43a598004c6d..52452cc9b716 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacitiesListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacitiesListMockTests.java @@ -21,7 +21,7 @@ public final class ManagedComputeCapacitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"acceleratorType\":\"q\",\"availableAccelerators\":826103329,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":1787091989,\"totalAvailableCapacity\":1781910575,\"largestDeploymentCapacity\":1396971172},{\"modelInstanceAcceleratorCount\":938598529,\"totalAvailableCapacity\":2032206441,\"largestDeploymentCapacity\":1373335670}]},\"id\":\"zuflfpiuufhpdn\",\"name\":\"okqrgivbhmnimj\",\"type\":\"yhbjfnmmib\"}]}"; + = "{\"value\":[{\"properties\":{\"acceleratorType\":\"ffmwt\",\"availableAccelerators\":343799142,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":949275917,\"totalAvailableCapacity\":282917917,\"largestDeploymentCapacity\":837947153}]},\"id\":\"iefwlnm\",\"name\":\"kffcnuestbsl\",\"type\":\"e\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.managedComputeCapacities() - .list("yfqgtodgkllefm", "zdcsrvbbn", "sgfyxhs", com.azure.core.util.Context.NONE); + .list("lxswtdapsm", "rmnrijefmrtwxc", "vdsp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityInnerTests.java index 0b1d84e2e2a1..9e8afcf06b51 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityInnerTests.java @@ -11,7 +11,7 @@ public final class ManagedComputeCapacityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeCapacityInner model = BinaryData.fromString( - "{\"properties\":{\"acceleratorType\":\"vvdshxcdedsue\",\"availableAccelerators\":1734780864,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":256799716,\"totalAvailableCapacity\":1746149150,\"largestDeploymentCapacity\":2115933258},{\"modelInstanceAcceleratorCount\":799423459,\"totalAvailableCapacity\":727676756,\"largestDeploymentCapacity\":337154986}]},\"id\":\"nslnlrxsmyltrwnt\",\"name\":\"mtbgwjdxwna\",\"type\":\"kurrdreyzjwh\"}") + "{\"properties\":{\"acceleratorType\":\"nul\",\"availableAccelerators\":639452188,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":1442225209,\"totalAvailableCapacity\":1778225754,\"largestDeploymentCapacity\":748960211},{\"modelInstanceAcceleratorCount\":1183506490,\"totalAvailableCapacity\":108799022,\"largestDeploymentCapacity\":2019149203}]},\"id\":\"kmq\",\"name\":\"zzkivyhjr\",\"type\":\"iizjixlqfhefkwa\"}") .toObject(ManagedComputeCapacityInner.class); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityListResultTests.java index 29fbbe1fe746..f66543f57b2b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityListResultTests.java @@ -12,8 +12,8 @@ public final class ManagedComputeCapacityListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeCapacityListResult model = BinaryData.fromString( - "{\"nextLink\":\"lflec\",\"value\":[{\"properties\":{\"acceleratorType\":\"ojjlu\",\"availableAccelerators\":232504450,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":1865280403,\"totalAvailableCapacity\":1748147802,\"largestDeploymentCapacity\":2009291490}]},\"id\":\"jmueza\",\"name\":\"ovribq\",\"type\":\"otokhtvwtaznk\"},{\"properties\":{\"acceleratorType\":\"wxwjyofgwhnkb\",\"availableAccelerators\":381560579,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":1412672233,\"totalAvailableCapacity\":795985008,\"largestDeploymentCapacity\":485145114},{\"modelInstanceAcceleratorCount\":638318099,\"totalAvailableCapacity\":1476698814,\"largestDeploymentCapacity\":771716822},{\"modelInstanceAcceleratorCount\":1147966928,\"totalAvailableCapacity\":336501816,\"largestDeploymentCapacity\":1781275613},{\"modelInstanceAcceleratorCount\":1718710790,\"totalAvailableCapacity\":638292491,\"largestDeploymentCapacity\":806037760}]},\"id\":\"fgfiij\",\"name\":\"ykwlefksxqceazf\",\"type\":\"xgnmqvzvluyq\"},{\"properties\":{\"acceleratorType\":\"ossscyva\",\"availableAccelerators\":949998803,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":1974468005,\"totalAvailableCapacity\":769350911,\"largestDeploymentCapacity\":2085589712},{\"modelInstanceAcceleratorCount\":108074541,\"totalAvailableCapacity\":1382121759,\"largestDeploymentCapacity\":117233906}]},\"id\":\"jdhsoy\",\"name\":\"hpvtyqftteh\",\"type\":\"pboujs\"}]}") + "{\"nextLink\":\"vka\",\"value\":[{\"properties\":{\"acceleratorType\":\"iswqjmdgh\",\"availableAccelerators\":329956196,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":1780423084,\"totalAvailableCapacity\":1171351655,\"largestDeploymentCapacity\":191485279}]},\"id\":\"bjczjnciuiyqvlda\",\"name\":\"wvppi\",\"type\":\"qqzlgcndhz\"},{\"properties\":{\"acceleratorType\":\"fcfsrhkhgsnx\",\"availableAccelerators\":139269436,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":1267562691,\"totalAvailableCapacity\":311859897,\"largestDeploymentCapacity\":1365767793},{\"modelInstanceAcceleratorCount\":764395735,\"totalAvailableCapacity\":2072400742,\"largestDeploymentCapacity\":1434461575},{\"modelInstanceAcceleratorCount\":1317450189,\"totalAvailableCapacity\":742319225,\"largestDeploymentCapacity\":1956229880}]},\"id\":\"lwzacn\",\"name\":\"wpfsuqtaaz\",\"type\":\"qbxyxoyfpuqqi\"},{\"properties\":{\"acceleratorType\":\"xlhdj\",\"availableAccelerators\":2111129704,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":1475001847,\"totalAvailableCapacity\":146751507,\"largestDeploymentCapacity\":1860751032}]},\"id\":\"j\",\"name\":\"ih\",\"type\":\"riybmrz\"},{\"properties\":{\"acceleratorType\":\"nxwdvwnjkg\",\"availableAccelerators\":747264503,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":1225431377,\"totalAvailableCapacity\":1366323774,\"largestDeploymentCapacity\":1962598517},{\"modelInstanceAcceleratorCount\":1995307303,\"totalAvailableCapacity\":2077014867,\"largestDeploymentCapacity\":124235200}]},\"id\":\"uyvpirf\",\"name\":\"jpnqnoowsbeden\",\"type\":\"exkxbhx\"}]}") .toObject(ManagedComputeCapacityListResult.class); - Assertions.assertEquals("lflec", model.nextLink()); + Assertions.assertEquals("vka", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityPropertiesTests.java index 9d53809f8c8c..9f481a3b41ca 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeCapacityPropertiesTests.java @@ -11,7 +11,7 @@ public final class ManagedComputeCapacityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeCapacityProperties model = BinaryData.fromString( - "{\"acceleratorType\":\"twwjwzzq\",\"availableAccelerators\":757200141,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":925467052,\"totalAvailableCapacity\":668235801,\"largestDeploymentCapacity\":1557390880},{\"modelInstanceAcceleratorCount\":266145265,\"totalAvailableCapacity\":1392769660,\"largestDeploymentCapacity\":98431225},{\"modelInstanceAcceleratorCount\":2045605742,\"totalAvailableCapacity\":1299066708,\"largestDeploymentCapacity\":303561669}]}") + "{\"acceleratorType\":\"olro\",\"availableAccelerators\":939213609,\"deploymentSizeCapacities\":[{\"modelInstanceAcceleratorCount\":747691713,\"totalAvailableCapacity\":1765457014,\"largestDeploymentCapacity\":1608092819},{\"modelInstanceAcceleratorCount\":91707091,\"totalAvailableCapacity\":1622527750,\"largestDeploymentCapacity\":1114664926},{\"modelInstanceAcceleratorCount\":1458682570,\"totalAvailableCapacity\":819255519,\"largestDeploymentCapacity\":4557833}]}") .toObject(ManagedComputeCapacityProperties.class); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentInfoTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentInfoTests.java index 327b0ea7fdea..9390529d1896 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentInfoTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentInfoTests.java @@ -12,12 +12,12 @@ public final class ManagedComputeDeploymentInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeDeploymentInfo model = BinaryData.fromString( - "{\"deploymentId\":\"fowgwbtmkekx\",\"projectId\":\"zwaqxofqo\",\"modelId\":\"hiq\",\"acceleratorCount\":8686772661570892251,\"instanceCount\":543465427}") + "{\"deploymentId\":\"gflwfgziiucijj\",\"projectId\":\"atlijjjr\",\"modelId\":\"am\",\"acceleratorCount\":2854978944712666849,\"instanceCount\":1253205768}") .toObject(ManagedComputeDeploymentInfo.class); - Assertions.assertEquals("fowgwbtmkekx", model.deploymentId()); - Assertions.assertEquals("zwaqxofqo", model.projectId()); - Assertions.assertEquals("hiq", model.modelId()); - Assertions.assertEquals(8686772661570892251L, model.acceleratorCount()); - Assertions.assertEquals(543465427, model.instanceCount()); + Assertions.assertEquals("gflwfgziiucijj", model.deploymentId()); + Assertions.assertEquals("atlijjjr", model.projectId()); + Assertions.assertEquals("am", model.modelId()); + Assertions.assertEquals(2854978944712666849L, model.acceleratorCount()); + Assertions.assertEquals(1253205768, model.instanceCount()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentInnerTests.java index 74bb77bcbdeb..e20f30f27f7b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentInnerTests.java @@ -7,7 +7,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeDeploymentInner; import com.azure.resourcemanager.cognitiveservices.models.DeploymentModelVersionUpgradeOption; -import com.azure.resourcemanager.cognitiveservices.models.GatedModelAccessProperties; import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties; import com.azure.resourcemanager.cognitiveservices.models.Sku; import com.azure.resourcemanager.cognitiveservices.models.SkuTier; @@ -17,51 +16,48 @@ public final class ManagedComputeDeploymentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeDeploymentInner model = BinaryData.fromString( - "{\"properties\":{\"model\":\"myjmkxettcslojfk\",\"deploymentTemplate\":\"dnqtoqxjhqx\",\"acceleratorType\":\"qhtkbt\",\"versionUpgradeOption\":\"OnceNewDefaultVersionAvailable\",\"gatedModelAccess\":{\"connectionId\":\"ngldmbiipsn\"},\"capabilities\":{\"wmuqqoajxeiygle\":\"lqkznxhhllxricct\"},\"computeId\":\"wvaexhdctr\",\"priority\":\"qnkbrupobehdm\",\"acceleratorsPerInstance\":1092481539,\"totalAccelerators\":424664268,\"provisioningState\":\"Moving\",\"provisioningDetails\":{\"message\":\"pjpbibnzpp\",\"lastOperationTimestamp\":\"2021-09-15T09:12:16Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"exleqirccjcl\",\"swagger\":\"cgxvrpj\",\"messagesApiScoringPath\":\"czuod\"}},\"sku\":{\"name\":\"punettepdjxq\",\"tier\":\"Free\",\"size\":\"ynu\",\"family\":\"lpckaewsedves\",\"capacity\":1665407892},\"etag\":\"gqphrgfnzhctmjts\",\"id\":\"pbcbcpzar\",\"name\":\"zeq\",\"type\":\"cdl\"}") + "{\"properties\":{\"model\":\"qsdtcjbctvivuzq\",\"deploymentTemplate\":\"tuowogtgitsqh\",\"acceleratorType\":\"b\",\"versionUpgradeOption\":\"OnceCurrentVersionExpired\",\"capabilities\":{\"bmwnrdjyibqb\":\"anfzndscxmxeatk\"},\"computeId\":\"omhjrmkuhm\",\"priority\":\"ljalfihcjmobc\",\"acceleratorsPerInstance\":367738618,\"totalAccelerators\":1814973271,\"provisioningState\":\"ResolvingDNS\",\"provisioningDetails\":{\"message\":\"wgaxfgvaknokzwj\",\"lastOperationTimestamp\":\"2020-12-29T19:13:55Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"ixldzyyfy\",\"swagger\":\"qsix\",\"messagesApiScoringPath\":\"m\"}},\"sku\":{\"name\":\"jivyqlkjuv\",\"tier\":\"Standard\",\"size\":\"slzoyov\",\"family\":\"dbpqvybefgvm\",\"capacity\":783627315},\"etag\":\"cvtlubseskvc\",\"id\":\"rtrh\",\"name\":\"nlp\",\"type\":\"rykycndzfqivjr\"}") .toObject(ManagedComputeDeploymentInner.class); - Assertions.assertEquals("myjmkxettcslojfk", model.properties().model()); - Assertions.assertEquals("dnqtoqxjhqx", model.properties().deploymentTemplate()); - Assertions.assertEquals("qhtkbt", model.properties().acceleratorType()); - Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE, + Assertions.assertEquals("qsdtcjbctvivuzq", model.properties().model()); + Assertions.assertEquals("tuowogtgitsqh", model.properties().deploymentTemplate()); + Assertions.assertEquals("b", model.properties().acceleratorType()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED, model.properties().versionUpgradeOption()); - Assertions.assertEquals("ngldmbiipsn", model.properties().gatedModelAccess().connectionId()); - Assertions.assertEquals("wvaexhdctr", model.properties().computeId()); - Assertions.assertEquals("qnkbrupobehdm", model.properties().priority()); - Assertions.assertEquals("punettepdjxq", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("ynu", model.sku().size()); - Assertions.assertEquals("lpckaewsedves", model.sku().family()); - Assertions.assertEquals(1665407892, model.sku().capacity()); + Assertions.assertEquals("omhjrmkuhm", model.properties().computeId()); + Assertions.assertEquals("ljalfihcjmobc", model.properties().priority()); + Assertions.assertEquals("jivyqlkjuv", model.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); + Assertions.assertEquals("slzoyov", model.sku().size()); + Assertions.assertEquals("dbpqvybefgvm", model.sku().family()); + Assertions.assertEquals(783627315, model.sku().capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedComputeDeploymentInner model = new ManagedComputeDeploymentInner() - .withProperties(new ManagedComputeDeploymentProperties().withModel("myjmkxettcslojfk") - .withDeploymentTemplate("dnqtoqxjhqx") - .withAcceleratorType("qhtkbt") - .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE) - .withGatedModelAccess(new GatedModelAccessProperties().withConnectionId("ngldmbiipsn")) - .withComputeId("wvaexhdctr") - .withPriority("qnkbrupobehdm")) - .withSku(new Sku().withName("punettepdjxq") - .withTier(SkuTier.FREE) - .withSize("ynu") - .withFamily("lpckaewsedves") - .withCapacity(1665407892)); + .withProperties(new ManagedComputeDeploymentProperties().withModel("qsdtcjbctvivuzq") + .withDeploymentTemplate("tuowogtgitsqh") + .withAcceleratorType("b") + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED) + .withComputeId("omhjrmkuhm") + .withPriority("ljalfihcjmobc")) + .withSku(new Sku().withName("jivyqlkjuv") + .withTier(SkuTier.STANDARD) + .withSize("slzoyov") + .withFamily("dbpqvybefgvm") + .withCapacity(783627315)); model = BinaryData.fromObject(model).toObject(ManagedComputeDeploymentInner.class); - Assertions.assertEquals("myjmkxettcslojfk", model.properties().model()); - Assertions.assertEquals("dnqtoqxjhqx", model.properties().deploymentTemplate()); - Assertions.assertEquals("qhtkbt", model.properties().acceleratorType()); - Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE, + Assertions.assertEquals("qsdtcjbctvivuzq", model.properties().model()); + Assertions.assertEquals("tuowogtgitsqh", model.properties().deploymentTemplate()); + Assertions.assertEquals("b", model.properties().acceleratorType()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED, model.properties().versionUpgradeOption()); - Assertions.assertEquals("ngldmbiipsn", model.properties().gatedModelAccess().connectionId()); - Assertions.assertEquals("wvaexhdctr", model.properties().computeId()); - Assertions.assertEquals("qnkbrupobehdm", model.properties().priority()); - Assertions.assertEquals("punettepdjxq", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("ynu", model.sku().size()); - Assertions.assertEquals("lpckaewsedves", model.sku().family()); - Assertions.assertEquals(1665407892, model.sku().capacity()); + Assertions.assertEquals("omhjrmkuhm", model.properties().computeId()); + Assertions.assertEquals("ljalfihcjmobc", model.properties().priority()); + Assertions.assertEquals("jivyqlkjuv", model.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); + Assertions.assertEquals("slzoyov", model.sku().size()); + Assertions.assertEquals("dbpqvybefgvm", model.sku().family()); + Assertions.assertEquals(783627315, model.sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentListResultTests.java index 14fe0bd625c1..5085eff6cf9d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentListResultTests.java @@ -12,8 +12,8 @@ public final class ManagedComputeDeploymentListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeDeploymentListResult model = BinaryData.fromString( - "{\"nextLink\":\"yarvsxzqbglcjk\",\"value\":[{\"properties\":{\"model\":\"thzodubtlmjtgbl\",\"deploymentTemplate\":\"skkfmk\",\"acceleratorType\":\"djxyxgbkkqvjcteo\",\"versionUpgradeOption\":\"NoAutoUpgrade\",\"gatedModelAccess\":{\"connectionId\":\"slskkz\"},\"capabilities\":{\"xzfsnggytexvzilm\":\"jnzdpvocojhpcna\",\"kwwwnckn\":\"iv\",\"weucyrth\":\"zdajlskzptjxu\",\"hokamvfej\":\"qlehmcgcjeinu\"},\"computeId\":\"nttmbq\",\"priority\":\"bzfivfok\",\"acceleratorsPerInstance\":552775156,\"totalAccelerators\":60893338,\"provisioningState\":\"Moving\",\"provisioningDetails\":{\"message\":\"jfwyyrlhgenuze\",\"lastOperationTimestamp\":\"2021-07-25T18:07:22Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"eba\",\"swagger\":\"zllrz\",\"messagesApiScoringPath\":\"mmdqgmihzpimc\"}},\"sku\":{\"name\":\"hnxtmin\",\"tier\":\"Basic\",\"size\":\"xsvtzarhzvqnsqk\",\"family\":\"mbjwzzoslpkyb\",\"capacity\":1502522516},\"etag\":\"kzpgaj\",\"id\":\"jcemqbmfuvqar\",\"name\":\"z\",\"type\":\"uqrebluimmbwx\"},{\"properties\":{\"model\":\"gtdmbvx\",\"deploymentTemplate\":\"raokqkbudb\",\"acceleratorType\":\"aokbavlyttaaknwf\",\"versionUpgradeOption\":\"OnceCurrentVersionExpired\",\"gatedModelAccess\":{\"connectionId\":\"sm\"},\"capabilities\":{\"gatolekscbctnan\":\"ujd\",\"wnsnlaimouxwks\":\"imwbzxpdcldpk\",\"fco\":\"mud\",\"kbqsjhbtqqvyfscy\":\"bicziuswswj\"},\"computeId\":\"wbivqvogfuyzwvbh\",\"priority\":\"mb\",\"acceleratorsPerInstance\":758207769,\"totalAccelerators\":61752137,\"provisioningState\":\"Canceled\",\"provisioningDetails\":{\"message\":\"ikcdrdaasax\",\"lastOperationTimestamp\":\"2021-10-24T15:50:42Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"fkwiyjv\",\"swagger\":\"ko\",\"messagesApiScoringPath\":\"nawnvz\"}},\"sku\":{\"name\":\"n\",\"tier\":\"Premium\",\"size\":\"sxvjabjqqaxuyvy\",\"family\":\"nudn\",\"capacity\":1318096549},\"etag\":\"hjxwxq\",\"id\":\"uipmpvks\",\"name\":\"itnsqxtltc\",\"type\":\"krdpqgfhyrfr\"},{\"properties\":{\"model\":\"kldgrcwfcmfc\",\"deploymentTemplate\":\"jajqmatxjt\",\"acceleratorType\":\"ln\",\"versionUpgradeOption\":\"OnceNewDefaultVersionAvailable\",\"gatedModelAccess\":{\"connectionId\":\"xgfb\"},\"capabilities\":{\"iprnzcalincry\":\"lpqagyn\",\"ruqg\":\"xzxaqzibmqimiym\",\"lanfkgxsya\":\"hfupetasvvoqsbpk\"},\"computeId\":\"uzowpuohdkcpr\",\"priority\":\"kxrzt\",\"acceleratorsPerInstance\":610550361,\"totalAccelerators\":1684820607,\"provisioningState\":\"Deleting\",\"provisioningDetails\":{\"message\":\"mqrud\",\"lastOperationTimestamp\":\"2021-03-15T07:40:38Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"f\",\"swagger\":\"crunfhi\",\"messagesApiScoringPath\":\"nmfbc\"}},\"sku\":{\"name\":\"qktkrumzuedkyzbf\",\"tier\":\"Basic\",\"size\":\"qkxiuxqggvqrn\",\"family\":\"hlwcjsqg\",\"capacity\":1771167858},\"etag\":\"f\",\"id\":\"rqrkijpeuqlsdx\",\"name\":\"qztvx\",\"type\":\"mwwmjswenaww\"},{\"properties\":{\"model\":\"ecleqioulndhzyo\",\"deploymentTemplate\":\"jhtollh\",\"acceleratorType\":\"idmytzln\",\"versionUpgradeOption\":\"OnceCurrentVersionExpired\",\"gatedModelAccess\":{\"connectionId\":\"novyoanfbcs\"},\"capabilities\":{\"jrktpgaeukya\":\"gywvtxig\"},\"computeId\":\"hpmwhqnucsk\",\"priority\":\"sidsjtd\",\"acceleratorsPerInstance\":1867807455,\"totalAccelerators\":2047376191,\"provisioningState\":\"Failed\",\"provisioningDetails\":{\"message\":\"zlsvbzfcpuoeed\",\"lastOperationTimestamp\":\"2021-03-08T02:25:35Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"klhsyekrdrenxol\",\"swagger\":\"yehqbeivdlhydwb\",\"messagesApiScoringPath\":\"fgrlpun\"}},\"sku\":{\"name\":\"jlkesmmpath\",\"tier\":\"Premium\",\"size\":\"h\",\"family\":\"an\",\"capacity\":1176158584},\"etag\":\"lbvgwzsf\",\"id\":\"edous\",\"name\":\"ktjtgra\",\"type\":\"aqo\"}]}") + "{\"nextLink\":\"tdgukvlbp\",\"value\":[{\"properties\":{\"model\":\"styoua\",\"deploymentTemplate\":\"ewres\",\"acceleratorType\":\"owegmmutey\",\"versionUpgradeOption\":\"OnceNewDefaultVersionAvailable\",\"capabilities\":{\"ygr\":\"qigijiitnspxlzde\"},\"computeId\":\"waiufanra\",\"priority\":\"fueqfrojs\",\"acceleratorsPerInstance\":1563200607,\"totalAccelerators\":223945470,\"provisioningState\":\"Succeeded\",\"provisioningDetails\":{\"message\":\"gywezskiec\",\"lastOperationTimestamp\":\"2021-11-27T05:54:53Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"m\",\"swagger\":\"eqvdsm\",\"messagesApiScoringPath\":\"lixqcah\"}},\"sku\":{\"name\":\"xalybxawoijpo\",\"tier\":\"Basic\",\"size\":\"xpkk\",\"family\":\"djodqhy\",\"capacity\":713961317},\"etag\":\"n\",\"id\":\"mehllizhceu\",\"name\":\"oqodkadpp\",\"type\":\"ibngqladyw\"},{\"properties\":{\"model\":\"whydt\",\"deploymentTemplate\":\"vvadswzs\",\"acceleratorType\":\"yemlowuowhlxln\",\"versionUpgradeOption\":\"NoAutoUpgrade\",\"capabilities\":{\"okzkltr\":\"uvblg\",\"rqcrjidhftukvh\":\"owtdvrfmvlihcvj\"},\"computeId\":\"lwyojbfqzdkfnj\",\"priority\":\"xhafratqx\",\"acceleratorsPerInstance\":1980966470,\"totalAccelerators\":736323206,\"provisioningState\":\"Succeeded\",\"provisioningDetails\":{\"message\":\"n\",\"lastOperationTimestamp\":\"2020-12-30T11:20:16Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"rhuzgfxonjtpu\",\"swagger\":\"l\",\"messagesApiScoringPath\":\"pvti\"}},\"sku\":{\"name\":\"zbpdbo\",\"tier\":\"Premium\",\"size\":\"yfqiuasig\",\"family\":\"wsocnequygdjbo\",\"capacity\":1020746209},\"etag\":\"tqjkqevad\",\"id\":\"mwiuawvcm\",\"name\":\"z\",\"type\":\"xiid\"},{\"properties\":{\"model\":\"czskoswoqiqazu\",\"deploymentTemplate\":\"mxzkr\",\"acceleratorType\":\"oiisbamnppcce\",\"versionUpgradeOption\":\"OnceCurrentVersionExpired\",\"capabilities\":{\"hnepkpeti\":\"sbezaxyfukzxuizh\",\"iubxdukec\":\"rx\",\"hctmmkosz\":\"xdazv\"},\"computeId\":\"blnsntrpcaqk\",\"priority\":\"f\",\"acceleratorsPerInstance\":1365764794,\"totalAccelerators\":1694520267,\"provisioningState\":\"Deleting\",\"provisioningDetails\":{\"message\":\"nldpvcbhhezyquwu\",\"lastOperationTimestamp\":\"2021-09-21T06:40:14Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"rp\",\"swagger\":\"r\",\"messagesApiScoringPath\":\"uuatvlmbjwcol\"}},\"sku\":{\"name\":\"x\",\"tier\":\"Standard\",\"size\":\"tpc\",\"family\":\"hprzrvxhmtfho\",\"capacity\":578306822},\"etag\":\"cmj\",\"id\":\"gxnoqrxtdis\",\"name\":\"jevhdlmydidw\",\"type\":\"epfwwt\"}]}") .toObject(ManagedComputeDeploymentListResult.class); - Assertions.assertEquals("yarvsxzqbglcjk", model.nextLink()); + Assertions.assertEquals("tdgukvlbp", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentPropertiesTests.java index 68a337d5d4f4..1922cd2ac86c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentPropertiesTests.java @@ -6,7 +6,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.cognitiveservices.models.DeploymentModelVersionUpgradeOption; -import com.azure.resourcemanager.cognitiveservices.models.GatedModelAccessProperties; import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties; import org.junit.jupiter.api.Assertions; @@ -14,35 +13,32 @@ public final class ManagedComputeDeploymentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeDeploymentProperties model = BinaryData.fromString( - "{\"model\":\"tz\",\"deploymentTemplate\":\"ypefcpczshnuqnda\",\"acceleratorType\":\"upfkhuytuszxhmtv\",\"versionUpgradeOption\":\"OnceCurrentVersionExpired\",\"gatedModelAccess\":{\"connectionId\":\"w\"},\"capabilities\":{\"thaokgkskj\":\"kvzwydw\",\"shajqf\":\"vb\",\"uitrdexyiono\":\"kpeexpgeumilh\"},\"computeId\":\"inbd\",\"priority\":\"s\",\"acceleratorsPerInstance\":1883901064,\"totalAccelerators\":561070880,\"provisioningState\":\"Moving\",\"provisioningDetails\":{\"message\":\"cbbprtugav\",\"lastOperationTimestamp\":\"2021-10-30T08:37:59Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"ks\",\"swagger\":\"mf\",\"messagesApiScoringPath\":\"dr\"}}") + "{\"model\":\"uykbbmn\",\"deploymentTemplate\":\"gltbxoeeo\",\"acceleratorType\":\"lnf\",\"versionUpgradeOption\":\"OnceCurrentVersionExpired\",\"capabilities\":{\"vezcrcssbzhdd\":\"vqdbpbhfck\",\"nqfblhkalehpava\":\"b\",\"minict\":\"ugiqjtiogqg\",\"pnbonhpcz\":\"eajohiyg\"},\"computeId\":\"mktp\",\"priority\":\"xqcsehch\",\"acceleratorsPerInstance\":862870831,\"totalAccelerators\":1044721974,\"provisioningState\":\"ExtensionUnreachable\",\"provisioningDetails\":{\"message\":\"q\",\"lastOperationTimestamp\":\"2021-11-26T08:10:47Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"zulo\",\"swagger\":\"aeuzanh\",\"messagesApiScoringPath\":\"nhsenwphpzfng\"}}") .toObject(ManagedComputeDeploymentProperties.class); - Assertions.assertEquals("tz", model.model()); - Assertions.assertEquals("ypefcpczshnuqnda", model.deploymentTemplate()); - Assertions.assertEquals("upfkhuytuszxhmtv", model.acceleratorType()); + Assertions.assertEquals("uykbbmn", model.model()); + Assertions.assertEquals("gltbxoeeo", model.deploymentTemplate()); + Assertions.assertEquals("lnf", model.acceleratorType()); Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED, model.versionUpgradeOption()); - Assertions.assertEquals("w", model.gatedModelAccess().connectionId()); - Assertions.assertEquals("inbd", model.computeId()); - Assertions.assertEquals("s", model.priority()); + Assertions.assertEquals("mktp", model.computeId()); + Assertions.assertEquals("xqcsehch", model.priority()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedComputeDeploymentProperties model = new ManagedComputeDeploymentProperties().withModel("tz") - .withDeploymentTemplate("ypefcpczshnuqnda") - .withAcceleratorType("upfkhuytuszxhmtv") + ManagedComputeDeploymentProperties model = new ManagedComputeDeploymentProperties().withModel("uykbbmn") + .withDeploymentTemplate("gltbxoeeo") + .withAcceleratorType("lnf") .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED) - .withGatedModelAccess(new GatedModelAccessProperties().withConnectionId("w")) - .withComputeId("inbd") - .withPriority("s"); + .withComputeId("mktp") + .withPriority("xqcsehch"); model = BinaryData.fromObject(model).toObject(ManagedComputeDeploymentProperties.class); - Assertions.assertEquals("tz", model.model()); - Assertions.assertEquals("ypefcpczshnuqnda", model.deploymentTemplate()); - Assertions.assertEquals("upfkhuytuszxhmtv", model.acceleratorType()); + Assertions.assertEquals("uykbbmn", model.model()); + Assertions.assertEquals("gltbxoeeo", model.deploymentTemplate()); + Assertions.assertEquals("lnf", model.acceleratorType()); Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED, model.versionUpgradeOption()); - Assertions.assertEquals("w", model.gatedModelAccess().connectionId()); - Assertions.assertEquals("inbd", model.computeId()); - Assertions.assertEquals("s", model.priority()); + Assertions.assertEquals("mktp", model.computeId()); + Assertions.assertEquals("xqcsehch", model.priority()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentProvisioningDetailsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentProvisioningDetailsTests.java index 2e134a19bdfc..c45de6b5812a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentProvisioningDetailsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentProvisioningDetailsTests.java @@ -13,9 +13,9 @@ public final class ManagedComputeDeploymentProvisioningDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeDeploymentProvisioningDetails model - = BinaryData.fromString("{\"message\":\"wjjxsgm\",\"lastOperationTimestamp\":\"2021-09-19T21:59:04Z\"}") + = BinaryData.fromString("{\"message\":\"clid\",\"lastOperationTimestamp\":\"2021-11-22T02:24:35Z\"}") .toObject(ManagedComputeDeploymentProvisioningDetails.class); - Assertions.assertEquals("wjjxsgm", model.message()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T21:59:04Z"), model.lastOperationTimestamp()); + Assertions.assertEquals("clid", model.message()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-22T02:24:35Z"), model.lastOperationTimestamp()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentRoutesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentRoutesTests.java index a3e3c4ff10fd..5ad906c1ce3e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentRoutesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentRoutesTests.java @@ -11,11 +11,12 @@ public final class ManagedComputeDeploymentRoutesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ManagedComputeDeploymentRoutes model = BinaryData.fromString( - "{\"chatCompletionsScoringPath\":\"ifdxkecifhocjxw\",\"swagger\":\"ooz\",\"messagesApiScoringPath\":\"txvcm\"}") + ManagedComputeDeploymentRoutes model = BinaryData + .fromString( + "{\"chatCompletionsScoringPath\":\"wjjufwbe\",\"swagger\":\"k\",\"messagesApiScoringPath\":\"rhtssr\"}") .toObject(ManagedComputeDeploymentRoutes.class); - Assertions.assertEquals("ifdxkecifhocjxw", model.chatCompletionsScoringPath()); - Assertions.assertEquals("ooz", model.swagger()); - Assertions.assertEquals("txvcm", model.messagesApiScoringPath()); + Assertions.assertEquals("wjjufwbe", model.chatCompletionsScoringPath()); + Assertions.assertEquals("k", model.swagger()); + Assertions.assertEquals("rhtssr", model.messagesApiScoringPath()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsCreateOrUpdateMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsCreateOrUpdateMockTests.java index b906406a923c..a4c2cbe5b2d4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsCreateOrUpdateMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsCreateOrUpdateMockTests.java @@ -11,7 +11,6 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; import com.azure.resourcemanager.cognitiveservices.models.DeploymentModelVersionUpgradeOption; -import com.azure.resourcemanager.cognitiveservices.models.GatedModelAccessProperties; import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeployment; import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties; import com.azure.resourcemanager.cognitiveservices.models.Sku; @@ -26,7 +25,7 @@ public final class ManagedComputeDeploymentsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"model\":\"yyxhxjvoy\",\"deploymentTemplate\":\"aqqjh\",\"acceleratorType\":\"hfaobqnjcsb\",\"versionUpgradeOption\":\"OnceNewDefaultVersionAvailable\",\"gatedModelAccess\":{\"connectionId\":\"dqwssydvwrybivyw\"},\"capabilities\":{\"j\":\"njuvtz\",\"tjfdzfmnpbdrc\":\"dlxbaeyocpkv\",\"vdtuoamqobqeh\":\"bjxnnnoztn\",\"f\":\"pshtisy\"},\"computeId\":\"ctrzjwnzwckzebm\",\"priority\":\"wdxgyypm\",\"acceleratorsPerInstance\":1338867016,\"totalAccelerators\":1763246546,\"provisioningState\":\"Succeeded\",\"provisioningDetails\":{\"message\":\"catkuhs\",\"lastOperationTimestamp\":\"2021-05-05T23:28:06Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"vvi\",\"swagger\":\"yeshoxfzzjdmu\",\"messagesApiScoringPath\":\"usx\"}},\"sku\":{\"name\":\"gozwplxzgzumno\",\"tier\":\"Free\",\"size\":\"kkbyg\",\"family\":\"i\",\"capacity\":804728233},\"etag\":\"shy\",\"id\":\"nh\",\"name\":\"tyiz\",\"type\":\"nzsurqco\"}"; + = "{\"properties\":{\"model\":\"hh\",\"deploymentTemplate\":\"fndcbsyhlud\",\"acceleratorType\":\"kkovohwv\",\"versionUpgradeOption\":\"OnceNewDefaultVersionAvailable\",\"capabilities\":{\"mdtacntjn\":\"vtdu\"},\"computeId\":\"fhvqiias\",\"priority\":\"ws\",\"acceleratorsPerInstance\":801756456,\"totalAccelerators\":741814913,\"provisioningState\":\"Succeeded\",\"provisioningDetails\":{\"message\":\"xhhqsxjbj\",\"lastOperationTimestamp\":\"2021-05-11T23:26:14Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"gl\",\"swagger\":\"trefeclfl\",\"messagesApiScoringPath\":\"jffzwncvdefxonzt\"}},\"sku\":{\"name\":\"jptnnt\",\"tier\":\"Free\",\"size\":\"qpzjvnpjrrh\",\"family\":\"sjbi\",\"capacity\":345612933},\"etag\":\"viqehmdqvaol\",\"id\":\"xdfsfvkjc\",\"name\":\"m\",\"type\":\"rsvxphtjnhptj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,34 +35,32 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedComputeDeployment response = manager.managedComputeDeployments() - .define("tnipaptgv") - .withExistingAccount("i", "dxywabk") - .withProperties(new ManagedComputeDeploymentProperties().withModel("qyjukkajn") - .withDeploymentTemplate("wltonopffem") - .withAcceleratorType("fhhaw") - .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE) - .withGatedModelAccess(new GatedModelAccessProperties().withConnectionId("z")) - .withComputeId("rmt") - .withPriority("gjmpd")) - .withSku(new Sku().withName("xuvatzwn") - .withTier(SkuTier.BASIC) - .withSize("iitvjcmimbmsw") - .withFamily("bbbjoypplod") - .withCapacity(236143812)) + .define("itlynkwfsa") + .withExistingAccount("guxcmmhip", "vsk") + .withProperties(new ManagedComputeDeploymentProperties().withModel("gfgbmcvmhidyliu") + .withDeploymentTemplate("klna") + .withAcceleratorType("dnxqeonm") + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED) + .withComputeId("cndjzwhajo") + .withPriority("pqokhdyncra")) + .withSku(new Sku().withName("tjizwhpnbmajvvy") + .withTier(SkuTier.STANDARD) + .withSize("x") + .withFamily("kzixbk") + .withCapacity(2007505628)) .create(); - Assertions.assertEquals("yyxhxjvoy", response.properties().model()); - Assertions.assertEquals("aqqjh", response.properties().deploymentTemplate()); - Assertions.assertEquals("hfaobqnjcsb", response.properties().acceleratorType()); + Assertions.assertEquals("hh", response.properties().model()); + Assertions.assertEquals("fndcbsyhlud", response.properties().deploymentTemplate()); + Assertions.assertEquals("kkovohwv", response.properties().acceleratorType()); Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE, response.properties().versionUpgradeOption()); - Assertions.assertEquals("dqwssydvwrybivyw", response.properties().gatedModelAccess().connectionId()); - Assertions.assertEquals("ctrzjwnzwckzebm", response.properties().computeId()); - Assertions.assertEquals("wdxgyypm", response.properties().priority()); - Assertions.assertEquals("gozwplxzgzumno", response.sku().name()); + Assertions.assertEquals("fhvqiias", response.properties().computeId()); + Assertions.assertEquals("ws", response.properties().priority()); + Assertions.assertEquals("jptnnt", response.sku().name()); Assertions.assertEquals(SkuTier.FREE, response.sku().tier()); - Assertions.assertEquals("kkbyg", response.sku().size()); - Assertions.assertEquals("i", response.sku().family()); - Assertions.assertEquals(804728233, response.sku().capacity()); + Assertions.assertEquals("qpzjvnpjrrh", response.sku().size()); + Assertions.assertEquals("sjbi", response.sku().family()); + Assertions.assertEquals(345612933, response.sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsDeleteMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsDeleteMockTests.java index e7a972576646..37f1967c2eaa 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsDeleteMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsDeleteMockTests.java @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.managedComputeDeployments().delete("abhvxjuaivxzn", "rnygti", "kg", com.azure.core.util.Context.NONE); + manager.managedComputeDeployments() + .delete("dsnjzpchiypb", "hmihikt", "ozewbr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsGetWithResponseMockTests.java index 95480c2f3742..8d3c348ae9e1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsGetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class ManagedComputeDeploymentsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"model\":\"rsddcuqddldaoyv\",\"deploymentTemplate\":\"tqewqjojesxjhty\",\"acceleratorType\":\"wqocygoyineuax\",\"versionUpgradeOption\":\"NoAutoUpgrade\",\"gatedModelAccess\":{\"connectionId\":\"itr\"},\"capabilities\":{\"oyxfoafzdypzlx\":\"lw\"},\"computeId\":\"ndhgwhlbp\",\"priority\":\"ajzqxavmitnwl\",\"acceleratorsPerInstance\":2076796219,\"totalAccelerators\":443805300,\"provisioningState\":\"Creating\",\"provisioningDetails\":{\"message\":\"tyyddbhat\",\"lastOperationTimestamp\":\"2021-07-09T01:31:18Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"gnqtjtnnrjewih\",\"swagger\":\"gaahmdfsp\",\"messagesApiScoringPath\":\"nxqxzxt\"}},\"sku\":{\"name\":\"tnzr\",\"tier\":\"Standard\",\"size\":\"iclhdwienvt\",\"family\":\"zjyfk\",\"capacity\":542992160},\"etag\":\"ghaknklt\",\"id\":\"wppvihbmwrv\",\"name\":\"vdrohu\",\"type\":\"ob\"}"; + = "{\"properties\":{\"model\":\"kyhtrrqwfyyb\",\"deploymentTemplate\":\"mjjrnogyk\",\"acceleratorType\":\"dlavsavgthk\",\"versionUpgradeOption\":\"OnceNewDefaultVersionAvailable\",\"capabilities\":{\"xjblajy\":\"ufkbzbf\",\"dj\":\"dnbycsbtoisa\",\"zxgnywxu\":\"ofsv\",\"mszcfy\":\"mlfjymgw\"},\"computeId\":\"peqregfur\",\"priority\":\"agknxmaovrg\",\"acceleratorsPerInstance\":638364626,\"totalAccelerators\":474739358,\"provisioningState\":\"Accepted\",\"provisioningDetails\":{\"message\":\"vqkycj\",\"lastOperationTimestamp\":\"2021-02-15T19:49:06Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"qxxsd\",\"swagger\":\"fwtyd\",\"messagesApiScoringPath\":\"mabhgc\"}},\"sku\":{\"name\":\"jqzhpvhxpba\",\"tier\":\"Standard\",\"size\":\"ullgfyogtqsc\",\"family\":\"vqerqxkomwdzpzl\",\"capacity\":1922365541},\"etag\":\"x\",\"id\":\"pwwvmbjecfw\",\"name\":\"bghnkfrwx\",\"type\":\"hl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,20 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedComputeDeployment response = manager.managedComputeDeployments() - .getWithResponse("hprgf", "hfz", "hrurmrfyyqjcnib", com.azure.core.util.Context.NONE) + .getWithResponse("l", "xvpstizsyqagqll", "brvaid", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("rsddcuqddldaoyv", response.properties().model()); - Assertions.assertEquals("tqewqjojesxjhty", response.properties().deploymentTemplate()); - Assertions.assertEquals("wqocygoyineuax", response.properties().acceleratorType()); - Assertions.assertEquals(DeploymentModelVersionUpgradeOption.NO_AUTO_UPGRADE, + Assertions.assertEquals("kyhtrrqwfyyb", response.properties().model()); + Assertions.assertEquals("mjjrnogyk", response.properties().deploymentTemplate()); + Assertions.assertEquals("dlavsavgthk", response.properties().acceleratorType()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE, response.properties().versionUpgradeOption()); - Assertions.assertEquals("itr", response.properties().gatedModelAccess().connectionId()); - Assertions.assertEquals("ndhgwhlbp", response.properties().computeId()); - Assertions.assertEquals("ajzqxavmitnwl", response.properties().priority()); - Assertions.assertEquals("tnzr", response.sku().name()); + Assertions.assertEquals("peqregfur", response.properties().computeId()); + Assertions.assertEquals("agknxmaovrg", response.properties().priority()); + Assertions.assertEquals("jqzhpvhxpba", response.sku().name()); Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("iclhdwienvt", response.sku().size()); - Assertions.assertEquals("zjyfk", response.sku().family()); - Assertions.assertEquals(542992160, response.sku().capacity()); + Assertions.assertEquals("ullgfyogtqsc", response.sku().size()); + Assertions.assertEquals("vqerqxkomwdzpzl", response.sku().family()); + Assertions.assertEquals(1922365541, response.sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsListMockTests.java index 2747bb95a4d5..b730ab7d63c1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeDeploymentsListMockTests.java @@ -24,7 +24,7 @@ public final class ManagedComputeDeploymentsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"model\":\"dclt\",\"deploymentTemplate\":\"ieileemw\",\"acceleratorType\":\"ehldopj\",\"versionUpgradeOption\":\"OnceNewDefaultVersionAvailable\",\"gatedModelAccess\":{\"connectionId\":\"bw\"},\"capabilities\":{\"d\":\"kkmibnmdp\"},\"computeId\":\"wtgzwmzhcm\",\"priority\":\"oqavstyzavkyjjl\",\"acceleratorsPerInstance\":972648046,\"totalAccelerators\":2088281469,\"provisioningState\":\"Deleting\",\"provisioningDetails\":{\"message\":\"gzldvvdkop\",\"lastOperationTimestamp\":\"2021-07-09T05:41:22Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"t\",\"swagger\":\"oip\",\"messagesApiScoringPath\":\"nerwhem\"}},\"sku\":{\"name\":\"dsssfzsgzguspej\",\"tier\":\"Enterprise\",\"size\":\"gxhwispso\",\"family\":\"blw\",\"capacity\":1563786965},\"etag\":\"qx\",\"id\":\"tuxirppbii\",\"name\":\"hlygkvuixwo\",\"type\":\"kr\"}]}"; + = "{\"value\":[{\"properties\":{\"model\":\"qbjxgjwsrerukbuu\",\"deploymentTemplate\":\"izwkwkjx\",\"acceleratorType\":\"acedikqel\",\"versionUpgradeOption\":\"OnceCurrentVersionExpired\",\"capabilities\":{\"ommki\":\"bevgbn\",\"mzyjjyut\":\"hypw\",\"i\":\"mzqlnaag\",\"fqiywhxpsb\":\"j\"},\"computeId\":\"ialezaydpu\",\"priority\":\"degefxlieggoto\",\"acceleratorsPerInstance\":1802423608,\"totalAccelerators\":1258550316,\"provisioningState\":\"Succeeded\",\"provisioningDetails\":{\"message\":\"zkah\",\"lastOperationTimestamp\":\"2021-10-30T11:32:58Z\"},\"routes\":{\"chatCompletionsScoringPath\":\"fmkcu\",\"swagger\":\"hdgwuzrono\",\"messagesApiScoringPath\":\"hz\"}},\"sku\":{\"name\":\"dn\",\"tier\":\"Standard\",\"size\":\"dcikgxk\",\"family\":\"zfzdjekeb\",\"capacity\":1623904508},\"etag\":\"zsjwyfixirgcj\",\"id\":\"iwu\",\"name\":\"pjkakrxifqnf\",\"type\":\"orxsqtzngxbsale\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +34,19 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.managedComputeDeployments().list("obmkphvdlorxz", "qdi", com.azure.core.util.Context.NONE); + = manager.managedComputeDeployments().list("rjzgkbrauxbo", "fq", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dclt", response.iterator().next().properties().model()); - Assertions.assertEquals("ieileemw", response.iterator().next().properties().deploymentTemplate()); - Assertions.assertEquals("ehldopj", response.iterator().next().properties().acceleratorType()); - Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE, + Assertions.assertEquals("qbjxgjwsrerukbuu", response.iterator().next().properties().model()); + Assertions.assertEquals("izwkwkjx", response.iterator().next().properties().deploymentTemplate()); + Assertions.assertEquals("acedikqel", response.iterator().next().properties().acceleratorType()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED, response.iterator().next().properties().versionUpgradeOption()); - Assertions.assertEquals("bw", response.iterator().next().properties().gatedModelAccess().connectionId()); - Assertions.assertEquals("wtgzwmzhcm", response.iterator().next().properties().computeId()); - Assertions.assertEquals("oqavstyzavkyjjl", response.iterator().next().properties().priority()); - Assertions.assertEquals("dsssfzsgzguspej", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.ENTERPRISE, response.iterator().next().sku().tier()); - Assertions.assertEquals("gxhwispso", response.iterator().next().sku().size()); - Assertions.assertEquals("blw", response.iterator().next().sku().family()); - Assertions.assertEquals(1563786965, response.iterator().next().sku().capacity()); + Assertions.assertEquals("ialezaydpu", response.iterator().next().properties().computeId()); + Assertions.assertEquals("degefxlieggoto", response.iterator().next().properties().priority()); + Assertions.assertEquals("dn", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); + Assertions.assertEquals("dcikgxk", response.iterator().next().sku().size()); + Assertions.assertEquals("zfzdjekeb", response.iterator().next().sku().family()); + Assertions.assertEquals(1623904508, response.iterator().next().sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsageInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsageInnerTests.java index e1b908063a26..00e3274b5c16 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsageInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsageInnerTests.java @@ -13,16 +13,16 @@ public final class ManagedComputeUsageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeUsageInner model = BinaryData.fromString( - "{\"id\":\"eagmceituug\",\"name\":{\"value\":\"fpjstlzmb\",\"localizedValue\":\"yjdeolctaebfs\"},\"type\":\"ledjcustbvtqigd\",\"unit\":\"Percent\",\"limit\":97.0592512722313,\"currentValue\":98.97008949582057,\"offerScope\":\"osehxlzsxez\",\"deployments\":[{\"deploymentId\":\"waaeskyfjl\",\"projectId\":\"eqtoyrpl\",\"modelId\":\"lajmllp\",\"acceleratorCount\":371598371868666796,\"instanceCount\":528311226}]}") + "{\"id\":\"pa\",\"name\":{\"value\":\"wgilfjqqac\",\"localizedValue\":\"kxwxdcvjwcyziake\"},\"type\":\"qchxrtuic\",\"unit\":\"CountPerSecond\",\"limit\":72.74596280759863,\"currentValue\":95.98056526755447,\"offerScope\":\"hzzwvywrgyngy\",\"deployments\":[{\"deploymentId\":\"x\",\"projectId\":\"akiqa\",\"modelId\":\"djrkclamggl\",\"acceleratorCount\":6536212634590682609,\"instanceCount\":952584421},{\"deploymentId\":\"oqeykglt\",\"projectId\":\"xhqf\",\"modelId\":\"ka\",\"acceleratorCount\":9210406858833590150,\"instanceCount\":225659950}]}") .toObject(ManagedComputeUsageInner.class); - Assertions.assertEquals(UnitType.PERCENT, model.unit()); - Assertions.assertEquals(97.0592512722313D, model.limit()); - Assertions.assertEquals(98.97008949582057D, model.currentValue()); - Assertions.assertEquals("osehxlzsxez", model.offerScope()); - Assertions.assertEquals("waaeskyfjl", model.deployments().get(0).deploymentId()); - Assertions.assertEquals("eqtoyrpl", model.deployments().get(0).projectId()); - Assertions.assertEquals("lajmllp", model.deployments().get(0).modelId()); - Assertions.assertEquals(371598371868666796L, model.deployments().get(0).acceleratorCount()); - Assertions.assertEquals(528311226, model.deployments().get(0).instanceCount()); + Assertions.assertEquals(UnitType.COUNT_PER_SECOND, model.unit()); + Assertions.assertEquals(72.74596280759863D, model.limit()); + Assertions.assertEquals(95.98056526755447D, model.currentValue()); + Assertions.assertEquals("hzzwvywrgyngy", model.offerScope()); + Assertions.assertEquals("x", model.deployments().get(0).deploymentId()); + Assertions.assertEquals("akiqa", model.deployments().get(0).projectId()); + Assertions.assertEquals("djrkclamggl", model.deployments().get(0).modelId()); + Assertions.assertEquals(6536212634590682609L, model.deployments().get(0).acceleratorCount()); + Assertions.assertEquals(952584421, model.deployments().get(0).instanceCount()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsageListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsageListResultTests.java index 150af6635052..0ffa6db96dd2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsageListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsageListResultTests.java @@ -13,17 +13,17 @@ public final class ManagedComputeUsageListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeUsageListResult model = BinaryData.fromString( - "{\"nextLink\":\"daqotwfh\",\"value\":[{\"id\":\"gsabvcipowzafc\",\"name\":{\"value\":\"mlj\",\"localizedValue\":\"rvpe\"},\"type\":\"cdveititj\",\"unit\":\"BytesPerSecond\",\"limit\":78.84989722816364,\"currentValue\":63.07791994748785,\"offerScope\":\"hwjuyxxbxqvmvua\",\"deployments\":[{\"deploymentId\":\"dxk\",\"projectId\":\"qbwpntghyk\",\"modelId\":\"rcdrnxsluvlzlad\",\"acceleratorCount\":1152409483284224675,\"instanceCount\":1000238415}]},{\"id\":\"hvfdqqj\",\"name\":{\"value\":\"hwzdanojisgglmv\",\"localizedValue\":\"atuztjct\"},\"type\":\"pvbkaehxsmzyg\",\"unit\":\"Seconds\",\"limit\":85.67244649908501,\"currentValue\":33.866255511234236,\"offerScope\":\"makxhys\",\"deployments\":[{\"deploymentId\":\"ux\",\"projectId\":\"bectvtfjmskdch\",\"modelId\":\"iubavlzwpvgm\",\"acceleratorCount\":129021540036272066,\"instanceCount\":1487786222},{\"deploymentId\":\"mgok\",\"projectId\":\"gjqafkmkrokzr\",\"modelId\":\"qetwpqrtvaozn\",\"acceleratorCount\":9076719183257661592,\"instanceCount\":1482907808}]}]}") + "{\"nextLink\":\"aobrlbp\",\"value\":[{\"id\":\"agnchjhgemuowaky\",\"name\":{\"value\":\"hjym\",\"localizedValue\":\"gqtagd\"},\"type\":\"lss\",\"unit\":\"CountPerSecond\",\"limit\":85.41505522944007,\"currentValue\":15.510263025378402,\"offerScope\":\"cnlbv\",\"deployments\":[{\"deploymentId\":\"dkkgjiiytssikizb\",\"projectId\":\"fqb\",\"modelId\":\"tnrgmqsorhce\",\"acceleratorCount\":6618352425256942325,\"instanceCount\":464953682},{\"deploymentId\":\"mxcpwzvmdoks\",\"projectId\":\"tiwlwxlboncqb\",\"modelId\":\"qicqchygt\",\"acceleratorCount\":7288669493601270091,\"instanceCount\":1673817670}]},{\"id\":\"epubdp\",\"name\":{\"value\":\"qvgx\",\"localizedValue\":\"od\"},\"type\":\"vohkxdxuws\",\"unit\":\"BytesPerSecond\",\"limit\":2.108350394212466,\"currentValue\":24.178420071771068,\"offerScope\":\"zlehgcvkbcknjolg\",\"deployments\":[{\"deploymentId\":\"pvelszerqze\",\"projectId\":\"o\",\"modelId\":\"intxwa\",\"acceleratorCount\":236257950288457433,\"instanceCount\":97445138},{\"deploymentId\":\"lqwa\",\"projectId\":\"r\",\"modelId\":\"lhm\",\"acceleratorCount\":1237200805001740489,\"instanceCount\":826879471},{\"deploymentId\":\"afjrqpjiyrqjcrg\",\"projectId\":\"wmzwdfkbnrzorpdl\",\"modelId\":\"qctqjfg\",\"acceleratorCount\":4737842499987221352,\"instanceCount\":1607767052},{\"deploymentId\":\"zdgvpyigdaqqilz\",\"projectId\":\"d\",\"modelId\":\"joedx\",\"acceleratorCount\":7647766636981575765,\"instanceCount\":190011848}]}]}") .toObject(ManagedComputeUsageListResult.class); - Assertions.assertEquals("daqotwfh", model.nextLink()); - Assertions.assertEquals(UnitType.BYTES_PER_SECOND, model.value().get(0).unit()); - Assertions.assertEquals(78.84989722816364D, model.value().get(0).limit()); - Assertions.assertEquals(63.07791994748785D, model.value().get(0).currentValue()); - Assertions.assertEquals("hwjuyxxbxqvmvua", model.value().get(0).offerScope()); - Assertions.assertEquals("dxk", model.value().get(0).deployments().get(0).deploymentId()); - Assertions.assertEquals("qbwpntghyk", model.value().get(0).deployments().get(0).projectId()); - Assertions.assertEquals("rcdrnxsluvlzlad", model.value().get(0).deployments().get(0).modelId()); - Assertions.assertEquals(1152409483284224675L, model.value().get(0).deployments().get(0).acceleratorCount()); - Assertions.assertEquals(1000238415, model.value().get(0).deployments().get(0).instanceCount()); + Assertions.assertEquals("aobrlbp", model.nextLink()); + Assertions.assertEquals(UnitType.COUNT_PER_SECOND, model.value().get(0).unit()); + Assertions.assertEquals(85.41505522944007D, model.value().get(0).limit()); + Assertions.assertEquals(15.510263025378402D, model.value().get(0).currentValue()); + Assertions.assertEquals("cnlbv", model.value().get(0).offerScope()); + Assertions.assertEquals("dkkgjiiytssikizb", model.value().get(0).deployments().get(0).deploymentId()); + Assertions.assertEquals("fqb", model.value().get(0).deployments().get(0).projectId()); + Assertions.assertEquals("tnrgmqsorhce", model.value().get(0).deployments().get(0).modelId()); + Assertions.assertEquals(6618352425256942325L, model.value().get(0).deployments().get(0).acceleratorCount()); + Assertions.assertEquals(464953682, model.value().get(0).deployments().get(0).instanceCount()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsagesOperationGroupsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsagesOperationGroupsListMockTests.java index f2ba508ecc71..7404de214a2a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsagesOperationGroupsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedComputeUsagesOperationGroupsListMockTests.java @@ -23,7 +23,7 @@ public final class ManagedComputeUsagesOperationGroupsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"kmpebfhlgeehb\",\"name\":{\"value\":\"plnl\",\"localizedValue\":\"feszunbua\"},\"type\":\"oubukqmie\",\"unit\":\"CountPerSecond\",\"limit\":31.70518496683885,\"currentValue\":86.93412373008658,\"offerScope\":\"uzyt\",\"deployments\":[{\"deploymentId\":\"dhzbjecdsysxnk\",\"projectId\":\"v\",\"modelId\":\"lsevzc\",\"acceleratorCount\":8509675682036776108,\"instanceCount\":1652790329},{\"deploymentId\":\"dwqymxsfqe\",\"projectId\":\"dqe\",\"modelId\":\"vmsaqhviawg\",\"acceleratorCount\":1799657040793786417,\"instanceCount\":1379759175},{\"deploymentId\":\"zfz\",\"projectId\":\"gpbcbkcpympd\",\"modelId\":\"e\",\"acceleratorCount\":4486389317041166997,\"instanceCount\":1994155276}]}]}"; + = "{\"value\":[{\"id\":\"qoyimxp\",\"name\":{\"value\":\"tteagbgacnqpju\",\"localizedValue\":\"vud\"},\"type\":\"lpbybkisb\",\"unit\":\"Milliseconds\",\"limit\":96.66093645341567,\"currentValue\":23.715688206182318,\"offerScope\":\"jrau\",\"deployments\":[{\"deploymentId\":\"znurttu\",\"projectId\":\"aaxxdcdjmdkqtxfr\",\"modelId\":\"ecxstowa\",\"acceleratorCount\":4515477228323203458,\"instanceCount\":918294664}]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,17 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.managedComputeUsagesOperationGroups().list("tqmlzuwtbdzqa", com.azure.core.util.Context.NONE); + = manager.managedComputeUsagesOperationGroups().list("rgyzcslazp", com.azure.core.util.Context.NONE); - Assertions.assertEquals(UnitType.COUNT_PER_SECOND, response.iterator().next().unit()); - Assertions.assertEquals(31.70518496683885D, response.iterator().next().limit()); - Assertions.assertEquals(86.93412373008658D, response.iterator().next().currentValue()); - Assertions.assertEquals("uzyt", response.iterator().next().offerScope()); - Assertions.assertEquals("dhzbjecdsysxnk", response.iterator().next().deployments().get(0).deploymentId()); - Assertions.assertEquals("v", response.iterator().next().deployments().get(0).projectId()); - Assertions.assertEquals("lsevzc", response.iterator().next().deployments().get(0).modelId()); - Assertions.assertEquals(8509675682036776108L, + Assertions.assertEquals(UnitType.MILLISECONDS, response.iterator().next().unit()); + Assertions.assertEquals(96.66093645341567D, response.iterator().next().limit()); + Assertions.assertEquals(23.715688206182318D, response.iterator().next().currentValue()); + Assertions.assertEquals("jrau", response.iterator().next().offerScope()); + Assertions.assertEquals("znurttu", response.iterator().next().deployments().get(0).deploymentId()); + Assertions.assertEquals("aaxxdcdjmdkqtxfr", response.iterator().next().deployments().get(0).projectId()); + Assertions.assertEquals("ecxstowa", response.iterator().next().deployments().get(0).modelId()); + Assertions.assertEquals(4515477228323203458L, response.iterator().next().deployments().get(0).acceleratorCount()); - Assertions.assertEquals(1652790329, response.iterator().next().deployments().get(0).instanceCount()); + Assertions.assertEquals(918294664, response.iterator().next().deployments().get(0).instanceCount()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkListResultTests.java index 02ca51473a4a..a104da2d4b47 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkListResultTests.java @@ -16,15 +16,15 @@ public final class ManagedNetworkListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedNetworkListResult model = BinaryData.fromString( - "{\"nextLink\":\"lriqbyokvjgbzs\",\"value\":[{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowOnlyApprovedOutbound\",\"AllowInternetOutbound\",\"AllowInternetOutbound\",\"AllowInternetOutbound\"],\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"wsuoardnagttpu\",\"outboundRules\":{\"pgnrho\":{\"type\":\"OutboundRule\"},\"hujbfwxiplk\":{\"type\":\"OutboundRule\"},\"solsyjprxslwhdm\":{\"type\":\"OutboundRule\"},\"vhtbbzjhfvh\":{\"type\":\"OutboundRule\"}},\"status\":{\"status\":\"Inactive\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"gihotjeco\",\"provisioningState\":\"Deleting\"},\"provisioningState\":\"Updating\"},\"id\":\"rrskapbxwieexuy\",\"name\":\"derltfokyksyim\",\"type\":\"ccgrvkcxzznn\"}]}") + "{\"nextLink\":\"nbau\",\"value\":[{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"Disabled\",\"Disabled\"],\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"xbzrpejplssanb\",\"outboundRules\":{\"kgsuxunrswgk\":{\"type\":\"OutboundRule\"},\"jhboyikebhuhks\":{\"type\":\"OutboundRule\"},\"gwl\":{\"type\":\"OutboundRule\"},\"kh\":{\"type\":\"OutboundRule\"}},\"status\":{\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"ypzqzufgsyfej\",\"provisioningState\":\"Failed\"},\"provisioningState\":\"Deferred\"},\"id\":\"xptpqaya\",\"name\":\"k\",\"type\":\"cf\"}]}") .toObject(ManagedNetworkListResult.class); - Assertions.assertEquals("lriqbyokvjgbzs", model.nextLink()); + Assertions.assertEquals("nbau", model.nextLink()); Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.value().get(0).properties().managedNetwork().isolationMode()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.value().get(0).properties().managedNetwork().status().status()); - Assertions.assertEquals(FirewallSku.STANDARD, model.value().get(0).properties().managedNetwork().firewallSku()); - Assertions.assertEquals(ManagedNetworkKind.V2, + Assertions.assertEquals(FirewallSku.BASIC, model.value().get(0).properties().managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, model.value().get(0).properties().managedNetwork().managedNetworkKind()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java index 548a0d701471..703db6778a83 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java @@ -22,7 +22,7 @@ public final class ManagedNetworkProvisionsProvisionManagedNetworkMockTests { @Test public void testProvisionManagedNetwork() throws Exception { - String responseStr = "{\"status\":\"Active\"}"; + String responseStr = "{\"status\":\"Inactive\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testProvisionManagedNetwork() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedNetworkProvisionStatus response = manager.managedNetworkProvisions() - .provisionManagedNetwork("thzw", "ipssv", "o", new ManagedNetworkProvisionOptions(), + .provisionManagedNetwork("uaz", "gfcnxc", "g", new ManagedNetworkProvisionOptions(), com.azure.core.util.Context.NONE); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, response.status()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, response.status()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsBasicResourceInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsBasicResourceInnerTests.java index 9524fe545a14..492998c048e1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsBasicResourceInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsBasicResourceInnerTests.java @@ -23,36 +23,36 @@ public final class ManagedNetworkSettingsBasicResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedNetworkSettingsBasicResourceInner model = BinaryData.fromString( - "{\"properties\":{\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"sejegprkjgu\",\"outboundRules\":{\"wvjaq\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Provisioning\",\"errorInformation\":\"tu\",\"parentRuleNames\":[\"ximwgxqldeko\",\"jgxieqfkyfh\"]},\"dahlfxlmuifmuadj\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Deleting\",\"errorInformation\":\"vsk\",\"parentRuleNames\":[\"bmgeumexmjbxcbc\",\"wkqm\",\"xapeqiscrpi\",\"gftrqrejdaahuqim\"]},\"tjchfjvmy\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Provisioning\",\"errorInformation\":\"kiioshj\",\"parentRuleNames\":[\"etybnxgzt\",\"cg\"]},\"qwjxi\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Provisioning\",\"errorInformation\":\"cu\",\"parentRuleNames\":[\"efvwcljkxpylrwo\",\"z\",\"wpsyxjij\",\"ypdvrbkerdkdkga\"]}},\"status\":{\"status\":\"Inactive\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"gzqpjoi\",\"provisioningState\":\"Updating\"},\"id\":\"aybdjnxumentqon\",\"name\":\"why\",\"type\":\"xym\"}") + "{\"properties\":{\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"snxoc\",\"outboundRules\":{\"nq\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\",\"errorInformation\":\"oy\",\"parentRuleNames\":[\"wdjuxdbdljzgdy\",\"cvuq\",\"sgzlrqhb\"]},\"ezay\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\",\"errorInformation\":\"sfpyxx\",\"parentRuleNames\":[\"flecominxojjl\",\"xxdhilzzdzzqjm\"]},\"tsnld\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Provisioning\",\"errorInformation\":\"lotokh\",\"parentRuleNames\":[\"taznkcqwwxwjyof\",\"whnkbtl\",\"ljssm\"]},\"uacvfy\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Deleting\",\"errorInformation\":\"isubxbteog\",\"parentRuleNames\":[\"iijrykwlefksxq\",\"eazfpxgnmqvzvlu\",\"q\",\"aiossscyvaifp\"]}},\"status\":{\"status\":\"Inactive\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"dhsoymhpv\",\"provisioningState\":\"Succeeded\"},\"id\":\"ttehdp\",\"name\":\"ou\",\"type\":\"stkfvvdshxcdeds\"}") .toObject(ManagedNetworkSettingsBasicResourceInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.properties().isolationMode()); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.properties().outboundRules().get("wvjaq").category()); - Assertions.assertEquals(RuleStatus.PROVISIONING, model.properties().outboundRules().get("wvjaq").status()); + Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.properties().isolationMode()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.properties().outboundRules().get("nq").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.properties().outboundRules().get("nq").status()); Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.properties().status().status()); - Assertions.assertEquals(FirewallSku.STANDARD, model.properties().firewallSku()); - Assertions.assertEquals(ManagedNetworkKind.V1, model.properties().managedNetworkKind()); + Assertions.assertEquals(FirewallSku.BASIC, model.properties().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V2, model.properties().managedNetworkKind()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedNetworkSettingsBasicResourceInner model = new ManagedNetworkSettingsBasicResourceInner() - .withProperties(new ManagedNetworkSettingsInner().withIsolationMode(IsolationMode.ALLOW_INTERNET_OUTBOUND) - .withOutboundRules(mapOf("wvjaq", - new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.PROVISIONING), - "dahlfxlmuifmuadj", - new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.DELETING), "tjchfjvmy", - new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.PROVISIONING), "qwjxi", - new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.PROVISIONING))) + ManagedNetworkSettingsBasicResourceInner model = new ManagedNetworkSettingsBasicResourceInner().withProperties( + new ManagedNetworkSettingsInner().withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("nq", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE), "ezay", + new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE), "tsnld", + new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.PROVISIONING), + "uacvfy", + new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.DELETING))) .withStatus(new ManagedNetworkProvisionStatusInner().withStatus(ManagedNetworkStatus.INACTIVE)) - .withFirewallSku(FirewallSku.STANDARD) - .withManagedNetworkKind(ManagedNetworkKind.V1)); + .withFirewallSku(FirewallSku.BASIC) + .withManagedNetworkKind(ManagedNetworkKind.V2)); model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsBasicResourceInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.properties().isolationMode()); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.properties().outboundRules().get("wvjaq").category()); - Assertions.assertEquals(RuleStatus.PROVISIONING, model.properties().outboundRules().get("wvjaq").status()); + Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.properties().isolationMode()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.properties().outboundRules().get("nq").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.properties().outboundRules().get("nq").status()); Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.properties().status().status()); - Assertions.assertEquals(FirewallSku.STANDARD, model.properties().firewallSku()); - Assertions.assertEquals(ManagedNetworkKind.V1, model.properties().managedNetworkKind()); + Assertions.assertEquals(FirewallSku.BASIC, model.properties().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V2, model.properties().managedNetworkKind()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsExTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsExTests.java index c58a28634b8f..d7f88981ab40 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsExTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsExTests.java @@ -22,32 +22,36 @@ public final class ManagedNetworkSettingsExTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedNetworkSettingsEx model = BinaryData.fromString( - "{\"changeableIsolationModes\":[\"AllowInternetOutbound\",\"AllowOnlyApprovedOutbound\",\"AllowInternetOutbound\",\"AllowOnlyApprovedOutbound\"],\"isolationMode\":\"Disabled\",\"networkId\":\"brazwzlpzbtzu\",\"outboundRules\":{\"ngdyfcixrhlcq\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Deleting\",\"errorInformation\":\"dyepfno\",\"parentRuleNames\":[\"ezacfpztga\",\"wyqejgaao\",\"ctgkppgkqzkcyzmf\"]},\"mliqmvlb\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Failed\",\"errorInformation\":\"oiutgwrmkahpq\",\"parentRuleNames\":[\"yntacihnco\",\"mip\"]},\"yzgleofjs\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Failed\",\"errorInformation\":\"grvgpomxp\",\"parentRuleNames\":[\"tsdfjyieso\",\"wiqbuoutm\"]}},\"status\":{\"status\":\"Inactive\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"j\",\"provisioningState\":\"Deferred\"}") + "{\"changeableIsolationModes\":[\"Disabled\"],\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"vcxjsgbipcukdvek\",\"outboundRules\":{\"lkaaggkr\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Deleting\",\"errorInformation\":\"hvlscrdp\",\"parentRuleNames\":[\"dyjdussp\",\"szekbh\"]},\"dusr\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Deleting\",\"errorInformation\":\"uybffljfiim\",\"parentRuleNames\":[\"agsqta\"]},\"phgerhsmvgoh\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Provisioning\",\"errorInformation\":\"sqwudohzilfmnli\",\"parentRuleNames\":[\"i\",\"s\",\"eypofqpm\",\"hyqgsdrmmttjx\"]},\"liejhpc\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Provisioning\",\"errorInformation\":\"lrixysfnimsq\",\"parentRuleNames\":[\"wmhkruwaedrympml\",\"oinhzdue\",\"ihapfjiiknjdiq\"]}},\"status\":{\"status\":\"Inactive\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"ce\",\"provisioningState\":\"Failed\"}") .toObject(ManagedNetworkSettingsEx.class); - Assertions.assertEquals(IsolationMode.DISABLED, model.isolationMode()); - Assertions.assertEquals(RuleCategory.REQUIRED, model.outboundRules().get("ngdyfcixrhlcq").category()); - Assertions.assertEquals(RuleStatus.DELETING, model.outboundRules().get("ngdyfcixrhlcq").status()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.isolationMode()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("lkaaggkr").category()); + Assertions.assertEquals(RuleStatus.DELETING, model.outboundRules().get("lkaaggkr").status()); Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status().status()); - Assertions.assertEquals(FirewallSku.BASIC, model.firewallSku()); + Assertions.assertEquals(FirewallSku.STANDARD, model.firewallSku()); Assertions.assertEquals(ManagedNetworkKind.V2, model.managedNetworkKind()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedNetworkSettingsEx model = new ManagedNetworkSettingsEx().withIsolationMode(IsolationMode.DISABLED) - .withOutboundRules(mapOf("ngdyfcixrhlcq", - new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.DELETING), "mliqmvlb", - new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.FAILED), "yzgleofjs", - new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.FAILED))) - .withStatus(new ManagedNetworkProvisionStatusInner().withStatus(ManagedNetworkStatus.INACTIVE)) - .withFirewallSku(FirewallSku.BASIC) - .withManagedNetworkKind(ManagedNetworkKind.V2); + ManagedNetworkSettingsEx model + = new ManagedNetworkSettingsEx().withIsolationMode(IsolationMode.ALLOW_INTERNET_OUTBOUND) + .withOutboundRules(mapOf("lkaaggkr", + new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.DELETING), "dusr", + new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.DELETING), + "phgerhsmvgoh", + new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.PROVISIONING), + "liejhpc", + new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.PROVISIONING))) + .withStatus(new ManagedNetworkProvisionStatusInner().withStatus(ManagedNetworkStatus.INACTIVE)) + .withFirewallSku(FirewallSku.STANDARD) + .withManagedNetworkKind(ManagedNetworkKind.V2); model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsEx.class); - Assertions.assertEquals(IsolationMode.DISABLED, model.isolationMode()); - Assertions.assertEquals(RuleCategory.REQUIRED, model.outboundRules().get("ngdyfcixrhlcq").category()); - Assertions.assertEquals(RuleStatus.DELETING, model.outboundRules().get("ngdyfcixrhlcq").status()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.isolationMode()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("lkaaggkr").category()); + Assertions.assertEquals(RuleStatus.DELETING, model.outboundRules().get("lkaaggkr").status()); Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status().status()); - Assertions.assertEquals(FirewallSku.BASIC, model.firewallSku()); + Assertions.assertEquals(FirewallSku.STANDARD, model.firewallSku()); Assertions.assertEquals(ManagedNetworkKind.V2, model.managedNetworkKind()); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsInnerTests.java index abf308a44065..08baab2050d6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsInnerTests.java @@ -22,11 +22,11 @@ public final class ManagedNetworkSettingsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedNetworkSettingsInner model = BinaryData.fromString( - "{\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"maciqgjjrl\",\"outboundRules\":{\"qvzfj\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\",\"errorInformation\":\"tbouguxtnd\",\"parentRuleNames\":[\"jtt\",\"asualapdlndbea\",\"bkixvvlwyn\",\"bb\"]},\"uydoccnx\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Inactive\",\"errorInformation\":\"feuzjljmphfkye\",\"parentRuleNames\":[\"gj\",\"mi\"]},\"g\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Failed\",\"errorInformation\":\"uiadhbatecaatsdo\",\"parentRuleNames\":[\"iucbda\",\"mbwiinjdllwktl\",\"pow\",\"vvqxua\"]}},\"status\":{\"status\":\"Active\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"fcfdruwsikxx\",\"provisioningState\":\"Succeeded\"}") + "{\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"pbwxgoooxz\",\"outboundRules\":{\"hoadhrsxqvzv\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\",\"errorInformation\":\"knpdgzigjsu\",\"parentRuleNames\":[\"hgsaodkwwn\",\"afoctohz\",\"aquvwsxbgnvkervq\"]},\"kw\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\",\"errorInformation\":\"r\",\"parentRuleNames\":[\"jglzrsubklrxhjnl\",\"cetjdvq\",\"dieq\"]}},\"status\":{\"status\":\"Active\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"xoebwg\",\"provisioningState\":\"Deleted\"}") .toObject(ManagedNetworkSettingsInner.class); Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.isolationMode()); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.outboundRules().get("qvzfj").category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("qvzfj").status()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.outboundRules().get("hoadhrsxqvzv").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("hoadhrsxqvzv").status()); Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); Assertions.assertEquals(FirewallSku.STANDARD, model.firewallSku()); Assertions.assertEquals(ManagedNetworkKind.V2, model.managedNetworkKind()); @@ -36,17 +36,16 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { ManagedNetworkSettingsInner model = new ManagedNetworkSettingsInner().withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) - .withOutboundRules(mapOf("qvzfj", - new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.INACTIVE), - "uydoccnx", new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.INACTIVE), - "g", new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.FAILED))) + .withOutboundRules(mapOf("hoadhrsxqvzv", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE), "kw", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE))) .withStatus(new ManagedNetworkProvisionStatusInner().withStatus(ManagedNetworkStatus.ACTIVE)) .withFirewallSku(FirewallSku.STANDARD) .withManagedNetworkKind(ManagedNetworkKind.V2); model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsInner.class); Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.isolationMode()); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.outboundRules().get("qvzfj").category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("qvzfj").status()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.outboundRules().get("hoadhrsxqvzv").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("hoadhrsxqvzv").status()); Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); Assertions.assertEquals(FirewallSku.STANDARD, model.firewallSku()); Assertions.assertEquals(ManagedNetworkKind.V2, model.managedNetworkKind()); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsGetWithResponseMockTests.java index d97fa2df448d..9a3868702adc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsGetWithResponseMockTests.java @@ -27,7 +27,7 @@ public final class ManagedNetworkSettingsOperationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowInternetOutbound\",\"AllowInternetOutbound\",\"AllowOnlyApprovedOutbound\"],\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"krnp\",\"outboundRules\":{\"zqjfsk\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Failed\",\"errorInformation\":\"ipj\",\"parentRuleNames\":[\"vdpfgwd\",\"miaelnpbiecl\",\"nddvjlpbj\"]},\"gv\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Inactive\",\"errorInformation\":\"rwknsbgh\",\"parentRuleNames\":[\"rzwiypz\",\"yhkecebt\"]},\"lhibfm\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\",\"errorInformation\":\"fdywqrqcowken\",\"parentRuleNames\":[\"cifflxqqn\",\"gtcuyuwgnyjd\",\"ujticwmlf\"]}},\"status\":{\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"kufpvvdgnmeio\",\"provisioningState\":\"Failed\"},\"provisioningState\":\"Updating\"},\"id\":\"ibcf\",\"name\":\"fyqzaisfofgvmrkm\",\"type\":\"ifmyzb\"}"; + = "{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowInternetOutbound\"],\"isolationMode\":\"Disabled\",\"networkId\":\"myqyyfrridzfps\",\"outboundRules\":{\"vvoydwedggwg\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Failed\",\"errorInformation\":\"mlxrqkekn\",\"parentRuleNames\":[\"qafz\",\"ptriysjrgtruwpu\",\"p\",\"rcek\"]},\"rxirq\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Failed\",\"errorInformation\":\"tzadrjbjngoarsr\",\"parentRuleNames\":[\"i\",\"mzc\",\"niapypi\"]},\"ytkbce\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Deleting\",\"errorInformation\":\"stuinytkmlfupjzc\",\"parentRuleNames\":[\"zj\",\"yxjg\",\"hxuerrd\",\"kt\"]}},\"status\":{\"status\":\"Inactive\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"j\",\"provisioningState\":\"Succeeded\"},\"provisioningState\":\"Deleted\"},\"id\":\"vlhnhhcikhleb\",\"name\":\"jgylsac\",\"type\":\"giflr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,16 +37,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedNetworkSettingsPropertiesBasicResource response = manager.managedNetworkSettingsOperations() - .getWithResponse("jkykqf", "kmcykxmysmk", "ndnrihpjaxhcb", com.azure.core.util.Context.NONE) + .getWithResponse("blcyeqdobobaq", "abebckc", "srsixwn", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, - response.properties().managedNetwork().isolationMode()); - Assertions.assertEquals(RuleCategory.REQUIRED, - response.properties().managedNetwork().outboundRules().get("zqjfsk").category()); + Assertions.assertEquals(IsolationMode.DISABLED, response.properties().managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.DEPENDENCY, + response.properties().managedNetwork().outboundRules().get("vvoydwedggwg").category()); Assertions.assertEquals(RuleStatus.FAILED, - response.properties().managedNetwork().outboundRules().get("zqjfsk").status()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, response.properties().managedNetwork().status().status()); + response.properties().managedNetwork().outboundRules().get("vvoydwedggwg").status()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, + response.properties().managedNetwork().status().status()); Assertions.assertEquals(FirewallSku.BASIC, response.properties().managedNetwork().firewallSku()); Assertions.assertEquals(ManagedNetworkKind.V2, response.properties().managedNetwork().managedNetworkKind()); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsListMockTests.java index f17825f0a619..c55ab0e350af 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsListMockTests.java @@ -28,7 +28,7 @@ public final class ManagedNetworkSettingsOperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowOnlyApprovedOutbound\",\"Disabled\"],\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"zbpcwtwtrch\",\"outboundRules\":{\"zyqokbgum\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Provisioning\",\"errorInformation\":\"esqsqmie\",\"parentRuleNames\":[\"p\",\"qchf\",\"tykkvjjlba\",\"cu\"]},\"cn\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Active\",\"errorInformation\":\"xxizc\",\"parentRuleNames\":[\"uzginrkjkn\",\"zfsul\",\"ybhozlsbufnhb\"]},\"fwl\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Provisioning\",\"errorInformation\":\"trsljzmzuic\",\"parentRuleNames\":[\"sxznbppmkqby\",\"bbnjldicqoman\"]},\"eechcayvqbeqp\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Deleting\",\"errorInformation\":\"yahfoyfz\",\"parentRuleNames\":[\"yaeprevcj\",\"kfalw\"]}},\"status\":{\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"hicrjriy\",\"provisioningState\":\"Updating\"},\"provisioningState\":\"Succeeded\"},\"id\":\"lqllbofsn\",\"name\":\"ocyb\",\"type\":\"hxgiknr\"}]}"; + = "{\"value\":[{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowInternetOutbound\"],\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"wzhlutjsjz\",\"outboundRules\":{\"aipu\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Inactive\",\"errorInformation\":\"u\",\"parentRuleNames\":[\"akosysycvldee\",\"cb\"]},\"dczmrjgobekx\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\",\"errorInformation\":\"gbvbbdledfflzv\",\"parentRuleNames\":[\"azzxfjveugpxz\",\"empupbscboxra\"]},\"viiebe\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Provisioning\",\"errorInformation\":\"ecafdrzzbskiwrjs\",\"parentRuleNames\":[\"mseesacuicnvqiqs\",\"ivmrfap\",\"ndrmmnlhnkmx\",\"qkekcd\"]},\"ruyk\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Failed\",\"errorInformation\":\"qymcwt\",\"parentRuleNames\":[\"ceplbrzgkuorwpq\",\"stwe\",\"b\",\"ts\"]}},\"status\":{\"status\":\"Active\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"yjyflsmsbnlyoi\",\"provisioningState\":\"Deleting\"},\"provisioningState\":\"Failed\"},\"id\":\"qthykcvoev\",\"name\":\"wfzotkxx\",\"type\":\"wwooxgbsdzcg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,20 +38,19 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.managedNetworkSettingsOperations() - .list("hdnhhcmt", "lptbdponhblqi", com.azure.core.util.Context.NONE); + = manager.managedNetworkSettingsOperations().list("ygotoh", "wtoi", com.azure.core.util.Context.NONE); - Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, response.iterator().next().properties().managedNetwork().isolationMode()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, - response.iterator().next().properties().managedNetwork().outboundRules().get("zyqokbgum").category()); - Assertions.assertEquals(RuleStatus.PROVISIONING, - response.iterator().next().properties().managedNetwork().outboundRules().get("zyqokbgum").status()); + Assertions.assertEquals(RuleCategory.REQUIRED, + response.iterator().next().properties().managedNetwork().outboundRules().get("aipu").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, + response.iterator().next().properties().managedNetwork().outboundRules().get("aipu").status()); Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, response.iterator().next().properties().managedNetwork().status().status()); - Assertions.assertEquals(FirewallSku.BASIC, + Assertions.assertEquals(FirewallSku.STANDARD, response.iterator().next().properties().managedNetwork().firewallSku()); - Assertions.assertEquals(ManagedNetworkKind.V1, + Assertions.assertEquals(ManagedNetworkKind.V2, response.iterator().next().properties().managedNetwork().managedNetworkKind()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsPutMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsPutMockTests.java index 020f64134391..1aa5838d4531 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsPutMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsOperationsPutMockTests.java @@ -33,7 +33,7 @@ public final class ManagedNetworkSettingsOperationsPutMockTests { @Test public void testPut() throws Exception { String responseStr - = "{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"Disabled\"],\"isolationMode\":\"Disabled\",\"networkId\":\"xzjkpifpucvbd\",\"outboundRules\":{\"rdukcdn\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Deleting\",\"errorInformation\":\"afzsq\",\"parentRuleNames\":[\"npxmiwtkqifp\"]}},\"status\":{\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"wgb\",\"provisioningState\":\"Deferred\"},\"provisioningState\":\"Succeeded\"},\"id\":\"mqsugqcglmadfz\",\"name\":\"ofxvqlauuagwa\",\"type\":\"fmcerfxfeiqba\"}"; + = "{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowOnlyApprovedOutbound\",\"AllowOnlyApprovedOutbound\"],\"isolationMode\":\"Disabled\",\"networkId\":\"wfl\",\"outboundRules\":{\"p\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Failed\",\"errorInformation\":\"rxhywlrkqsqvvd\",\"parentRuleNames\":[\"fjdajdqxy\",\"xxyfrdjidcetfvgw\",\"wsldigwouppvyd\",\"qsvclrsnxf\"]},\"tiqmcjbsmkirp\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Deleting\",\"errorInformation\":\"mdmtfxxe\",\"parentRuleNames\":[\"xzxlcqzfxa\"]},\"xlmxozesndo\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Provisioning\",\"errorInformation\":\"m\",\"parentRuleNames\":[\"omeobwkeuzltenlb\"]}},\"status\":{\"status\":\"Inactive\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"ixymckik\",\"provisioningState\":\"Deleting\"},\"provisioningState\":\"Succeeded\"},\"id\":\"hwishyfmrzcqf\",\"name\":\"vnkyakck\",\"type\":\"ehognsddjkkdede\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -43,28 +43,29 @@ public void testPut() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedNetworkSettingsPropertiesBasicResource response = manager.managedNetworkSettingsOperations() - .define("uxd") - .withExistingAccount("ugseiqbroq", "feamz") + .define("oibm") + .withExistingAccount("vypjhubdmgobxe", "ujcqgzwvxwiu") .withProperties(new ManagedNetworkSettingsProperties().withManagedNetwork(new ManagedNetworkSettingsEx() - .withIsolationMode(IsolationMode.ALLOW_INTERNET_OUTBOUND) - .withOutboundRules(mapOf("pvlxtywu", - new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.INACTIVE), - "qoivxcodw", new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.DELETING), - "ufakrxjjwnbrmdwt", - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.DELETING))) + .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("cy", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE), + "ibpybqei", + new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.PROVISIONING), "rfqd", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.PROVISIONING))) .withStatus(new ManagedNetworkProvisionStatusInner().withStatus(ManagedNetworkStatus.ACTIVE)) .withFirewallSku(FirewallSku.BASIC) .withManagedNetworkKind(ManagedNetworkKind.V2))) .create(); Assertions.assertEquals(IsolationMode.DISABLED, response.properties().managedNetwork().isolationMode()); - Assertions.assertEquals(RuleCategory.REQUIRED, - response.properties().managedNetwork().outboundRules().get("rdukcdn").category()); - Assertions.assertEquals(RuleStatus.DELETING, - response.properties().managedNetwork().outboundRules().get("rdukcdn").status()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, response.properties().managedNetwork().status().status()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, + response.properties().managedNetwork().outboundRules().get("p").category()); + Assertions.assertEquals(RuleStatus.FAILED, + response.properties().managedNetwork().outboundRules().get("p").status()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, + response.properties().managedNetwork().status().status()); Assertions.assertEquals(FirewallSku.BASIC, response.properties().managedNetwork().firewallSku()); - Assertions.assertEquals(ManagedNetworkKind.V2, response.properties().managedNetwork().managedNetworkKind()); + Assertions.assertEquals(ManagedNetworkKind.V1, response.properties().managedNetwork().managedNetworkKind()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsPropertiesBasicResourceInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsPropertiesBasicResourceInnerTests.java index c7fedc8de545..029ddcc4968b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsPropertiesBasicResourceInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsPropertiesBasicResourceInnerTests.java @@ -24,15 +24,14 @@ public final class ManagedNetworkSettingsPropertiesBasicResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedNetworkSettingsPropertiesBasicResourceInner model = BinaryData.fromString( - "{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowInternetOutbound\",\"AllowInternetOutbound\",\"AllowOnlyApprovedOutbound\"],\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"zbbgspftesubzpvp\",\"outboundRules\":{\"swkjmdihdcyyyz\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\",\"errorInformation\":\"vqseus\",\"parentRuleNames\":[\"bdxzfxnxmlbmu\"]},\"tftedz\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Provisioning\",\"errorInformation\":\"jnufzrf\",\"parentRuleNames\":[\"qgnnbz\"]},\"hks\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\",\"errorInformation\":\"gjsxmty\",\"parentRuleNames\":[\"avdpwwobtdphtits\",\"fofwan\"]},\"wewqkj\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\",\"errorInformation\":\"cgwdfriwgybjp\",\"parentRuleNames\":[\"kscvgllixdgbyf\"]}},\"status\":{\"status\":\"Inactive\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"ohutxlcsk\",\"provisioningState\":\"Deleted\"},\"provisioningState\":\"Failed\"},\"id\":\"ggg\",\"name\":\"lfb\",\"type\":\"rdcgu\"}") + "{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"Disabled\",\"Disabled\",\"AllowOnlyApprovedOutbound\",\"Disabled\"],\"isolationMode\":\"Disabled\",\"networkId\":\"nx\",\"outboundRules\":{\"xsmzygdf\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\",\"errorInformation\":\"dltxkpbq\",\"parentRuleNames\":[\"dqqjwkrhwzdano\",\"isgglmvokat\",\"ztjctibpvbkae\"]}},\"status\":{\"status\":\"Active\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"akxhysowlj\",\"provisioningState\":\"Failed\"},\"provisioningState\":\"Deferred\"},\"id\":\"ctvtf\",\"name\":\"mskdch\",\"type\":\"aiubavlzwpvgmfa\"}") .toObject(ManagedNetworkSettingsPropertiesBasicResourceInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, - model.properties().managedNetwork().isolationMode()); - Assertions.assertEquals(RuleCategory.RECOMMENDED, - model.properties().managedNetwork().outboundRules().get("swkjmdihdcyyyz").category()); + Assertions.assertEquals(IsolationMode.DISABLED, model.properties().managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.DEPENDENCY, + model.properties().managedNetwork().outboundRules().get("xsmzygdf").category()); Assertions.assertEquals(RuleStatus.INACTIVE, - model.properties().managedNetwork().outboundRules().get("swkjmdihdcyyyz").status()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.properties().managedNetwork().status().status()); + model.properties().managedNetwork().outboundRules().get("xsmzygdf").status()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.properties().managedNetwork().status().status()); Assertions.assertEquals(FirewallSku.STANDARD, model.properties().managedNetwork().firewallSku()); Assertions.assertEquals(ManagedNetworkKind.V2, model.properties().managedNetwork().managedNetworkKind()); } @@ -41,26 +40,20 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { ManagedNetworkSettingsPropertiesBasicResourceInner model = new ManagedNetworkSettingsPropertiesBasicResourceInner() - .withProperties(new ManagedNetworkSettingsProperties().withManagedNetwork(new ManagedNetworkSettingsEx() - .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) - .withOutboundRules(mapOf("swkjmdihdcyyyz", - new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE), - "tftedz", - new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.PROVISIONING), - "hks", new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.ACTIVE), - "wewqkj", - new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.INACTIVE))) - .withStatus(new ManagedNetworkProvisionStatusInner().withStatus(ManagedNetworkStatus.INACTIVE)) - .withFirewallSku(FirewallSku.STANDARD) - .withManagedNetworkKind(ManagedNetworkKind.V2))); + .withProperties(new ManagedNetworkSettingsProperties() + .withManagedNetwork(new ManagedNetworkSettingsEx().withIsolationMode(IsolationMode.DISABLED) + .withOutboundRules(mapOf("xsmzygdf", + new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.INACTIVE))) + .withStatus(new ManagedNetworkProvisionStatusInner().withStatus(ManagedNetworkStatus.ACTIVE)) + .withFirewallSku(FirewallSku.STANDARD) + .withManagedNetworkKind(ManagedNetworkKind.V2))); model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsPropertiesBasicResourceInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, - model.properties().managedNetwork().isolationMode()); - Assertions.assertEquals(RuleCategory.RECOMMENDED, - model.properties().managedNetwork().outboundRules().get("swkjmdihdcyyyz").category()); + Assertions.assertEquals(IsolationMode.DISABLED, model.properties().managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.DEPENDENCY, + model.properties().managedNetwork().outboundRules().get("xsmzygdf").category()); Assertions.assertEquals(RuleStatus.INACTIVE, - model.properties().managedNetwork().outboundRules().get("swkjmdihdcyyyz").status()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.properties().managedNetwork().status().status()); + model.properties().managedNetwork().outboundRules().get("xsmzygdf").status()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.properties().managedNetwork().status().status()); Assertions.assertEquals(FirewallSku.STANDARD, model.properties().managedNetwork().firewallSku()); Assertions.assertEquals(ManagedNetworkKind.V2, model.properties().managedNetwork().managedNetworkKind()); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsPropertiesTests.java index c26cd3d0e98d..904344b581b3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ManagedNetworkSettingsPropertiesTests.java @@ -23,35 +23,40 @@ public final class ManagedNetworkSettingsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedNetworkSettingsProperties model = BinaryData.fromString( - "{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowInternetOutbound\",\"AllowInternetOutbound\",\"Disabled\"],\"isolationMode\":\"Disabled\",\"networkId\":\"rpilt\",\"outboundRules\":{\"ai\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Deleting\",\"errorInformation\":\"mf\",\"parentRuleNames\":[\"ode\",\"resrgvtshuvft\"]},\"x\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Failed\",\"errorInformation\":\"vzgjyp\",\"parentRuleNames\":[\"xmpdxxzetww\",\"jwotnxlkfhglhrf\"]},\"mlccmetjscz\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\",\"errorInformation\":\"nhpcselqx\",\"parentRuleNames\":[\"pqibukklv\",\"rl\"]},\"vdgxly\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\",\"errorInformation\":\"nasd\",\"parentRuleNames\":[\"nzsieuscplh\"]}},\"status\":{\"status\":\"Active\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"zsvko\",\"provisioningState\":\"Failed\"},\"provisioningState\":\"Deleted\"}") + "{\"managedNetwork\":{\"changeableIsolationModes\":[\"Disabled\",\"AllowOnlyApprovedOutbound\",\"AllowInternetOutbound\",\"AllowOnlyApprovedOutbound\"],\"isolationMode\":\"Disabled\",\"networkId\":\"gjqafkmkrokzr\",\"outboundRules\":{\"stbvtqig\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Provisioning\",\"errorInformation\":\"rtvaoznqni\",\"parentRuleNames\":[\"zeagmceituuge\",\"hfpjstlzmbls\",\"jdeolctae\",\"fsyrledjc\"]},\"es\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Failed\",\"errorInformation\":\"eafgfosehxlzsxe\",\"parentRuleNames\":[\"kkwa\"]},\"mkekxpkzwaqxo\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Active\",\"errorInformation\":\"zeqtoyrplixlajml\",\"parentRuleNames\":[\"uevhamfo\",\"gwb\"]},\"ihpq\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Provisioning\",\"errorInformation\":\"iqbplvfidusz\",\"parentRuleNames\":[\"xbyjgmsfe\",\"x\"]}},\"status\":{\"status\":\"Inactive\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"cx\",\"provisioningState\":\"Succeeded\"},\"provisioningState\":\"Deleted\"}") .toObject(ManagedNetworkSettingsProperties.class); Assertions.assertEquals(IsolationMode.DISABLED, model.managedNetwork().isolationMode()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.managedNetwork().outboundRules().get("ai").category()); - Assertions.assertEquals(RuleStatus.DELETING, model.managedNetwork().outboundRules().get("ai").status()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.managedNetwork().status().status()); - Assertions.assertEquals(FirewallSku.STANDARD, model.managedNetwork().firewallSku()); - Assertions.assertEquals(ManagedNetworkKind.V2, model.managedNetwork().managedNetworkKind()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, + model.managedNetwork().outboundRules().get("stbvtqig").category()); + Assertions.assertEquals(RuleStatus.PROVISIONING, + model.managedNetwork().outboundRules().get("stbvtqig").status()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, model.managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, model.managedNetwork().managedNetworkKind()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedNetworkSettingsProperties model = new ManagedNetworkSettingsProperties() .withManagedNetwork(new ManagedNetworkSettingsEx().withIsolationMode(IsolationMode.DISABLED) - .withOutboundRules(mapOf("ai", - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.DELETING), "x", - new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.FAILED), "mlccmetjscz", - new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE), "vdgxly", - new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE))) - .withStatus(new ManagedNetworkProvisionStatusInner().withStatus(ManagedNetworkStatus.ACTIVE)) - .withFirewallSku(FirewallSku.STANDARD) - .withManagedNetworkKind(ManagedNetworkKind.V2)); + .withOutboundRules(mapOf("stbvtqig", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.PROVISIONING), "es", + new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.FAILED), + "mkekxpkzwaqxo", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.ACTIVE), "ihpq", + new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.PROVISIONING))) + .withStatus(new ManagedNetworkProvisionStatusInner().withStatus(ManagedNetworkStatus.INACTIVE)) + .withFirewallSku(FirewallSku.BASIC) + .withManagedNetworkKind(ManagedNetworkKind.V1)); model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsProperties.class); Assertions.assertEquals(IsolationMode.DISABLED, model.managedNetwork().isolationMode()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.managedNetwork().outboundRules().get("ai").category()); - Assertions.assertEquals(RuleStatus.DELETING, model.managedNetwork().outboundRules().get("ai").status()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.managedNetwork().status().status()); - Assertions.assertEquals(FirewallSku.STANDARD, model.managedNetwork().firewallSku()); - Assertions.assertEquals(ManagedNetworkKind.V2, model.managedNetwork().managedNetworkKind()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, + model.managedNetwork().outboundRules().get("stbvtqig").category()); + Assertions.assertEquals(RuleStatus.PROVISIONING, + model.managedNetwork().outboundRules().get("stbvtqig").status()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, model.managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, model.managedNetwork().managedNetworkKind()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/MetricNameTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/MetricNameTests.java index c85c90520db8..68f9e834a101 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/MetricNameTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/MetricNameTests.java @@ -11,9 +11,9 @@ public final class MetricNameTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MetricName model = BinaryData.fromString("{\"value\":\"xieduugidyjrr\",\"localizedValue\":\"y\"}") - .toObject(MetricName.class); - Assertions.assertEquals("xieduugidyjrr", model.value()); - Assertions.assertEquals("y", model.localizedValue()); + MetricName model + = BinaryData.fromString("{\"value\":\"lkevle\",\"localizedValue\":\"zfbuhf\"}").toObject(MetricName.class); + Assertions.assertEquals("lkevle", model.value()); + Assertions.assertEquals("zfbuhf", model.localizedValue()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacitiesListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacitiesListMockTests.java index 161a1424bd27..cf717d4f7542 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacitiesListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacitiesListMockTests.java @@ -23,7 +23,7 @@ public final class ModelCapacitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"location\":\"bqveht\",\"properties\":{\"model\":{\"publisher\":\"vkdvcgowrd\",\"format\":\"dddwzd\",\"name\":\"bcztamkyrkwsthp\",\"version\":\"ocffx\",\"source\":\"nodqqzjbfyrosw\",\"sourceAccount\":\"qdf\",\"callRateLimit\":{\"count\":52.70727,\"renewalPeriod\":47.240604,\"rules\":[{},{},{},{}]}},\"skuName\":\"ypztus\",\"availableCapacity\":8.66816,\"availableFinetuneCapacity\":94.70374,\"scopeId\":\"cloepjzaqbo\",\"scopeType\":\"Global\"},\"id\":\"zbursku\",\"name\":\"fudbkvu\",\"type\":\"ngjoasnz\"}]}"; + = "{\"value\":[{\"location\":\"a\",\"properties\":{\"model\":{\"publisher\":\"dmdfiekkis\",\"format\":\"yyaeknf\",\"name\":\"yshdawjlmlcufb\",\"version\":\"iutfofhoajjylsy\",\"source\":\"jnufzvlqquy\",\"sourceAccount\":\"ceevogir\",\"callRateLimit\":{\"count\":55.93503,\"renewalPeriod\":33.72317,\"rules\":[{}]}},\"skuName\":\"eujmdssijuaxxf\",\"availableCapacity\":63.979065,\"availableFinetuneCapacity\":97.65318,\"scopeId\":\"pw\",\"scopeType\":\"DataZone\"},\"id\":\"nmj\",\"name\":\"n\",\"type\":\"tl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +33,19 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.modelCapacities().list("yzqke", "curr", "uecokyduqzusc", com.azure.core.util.Context.NONE); + = manager.modelCapacities().list("rmbd", "tqxavejoez", "wkry", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bqveht", response.iterator().next().location()); - Assertions.assertEquals("vkdvcgowrd", response.iterator().next().properties().model().publisher()); - Assertions.assertEquals("dddwzd", response.iterator().next().properties().model().format()); - Assertions.assertEquals("bcztamkyrkwsthp", response.iterator().next().properties().model().name()); - Assertions.assertEquals("ocffx", response.iterator().next().properties().model().version()); - Assertions.assertEquals("nodqqzjbfyrosw", response.iterator().next().properties().model().source()); - Assertions.assertEquals("qdf", response.iterator().next().properties().model().sourceAccount()); - Assertions.assertEquals("ypztus", response.iterator().next().properties().skuName()); - Assertions.assertEquals(8.66816F, response.iterator().next().properties().availableCapacity()); - Assertions.assertEquals(94.70374F, response.iterator().next().properties().availableFinetuneCapacity()); - Assertions.assertEquals("cloepjzaqbo", response.iterator().next().properties().scopeId()); - Assertions.assertEquals(QuotaScopeType.GLOBAL, response.iterator().next().properties().scopeType()); + Assertions.assertEquals("a", response.iterator().next().location()); + Assertions.assertEquals("dmdfiekkis", response.iterator().next().properties().model().publisher()); + Assertions.assertEquals("yyaeknf", response.iterator().next().properties().model().format()); + Assertions.assertEquals("yshdawjlmlcufb", response.iterator().next().properties().model().name()); + Assertions.assertEquals("iutfofhoajjylsy", response.iterator().next().properties().model().version()); + Assertions.assertEquals("jnufzvlqquy", response.iterator().next().properties().model().source()); + Assertions.assertEquals("ceevogir", response.iterator().next().properties().model().sourceAccount()); + Assertions.assertEquals("eujmdssijuaxxf", response.iterator().next().properties().skuName()); + Assertions.assertEquals(63.979065F, response.iterator().next().properties().availableCapacity()); + Assertions.assertEquals(97.65318F, response.iterator().next().properties().availableFinetuneCapacity()); + Assertions.assertEquals("pw", response.iterator().next().properties().scopeId()); + Assertions.assertEquals(QuotaScopeType.DATA_ZONE, response.iterator().next().properties().scopeType()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacityListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacityListResultTests.java index 80b68c1f7450..257e8b8ae56c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacityListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelCapacityListResultTests.java @@ -12,8 +12,8 @@ public final class ModelCapacityListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ModelCapacityListResult model = BinaryData.fromString( - "{\"nextLink\":\"ejparn\",\"value\":[{\"location\":\"szrbwtdrcwg\",\"properties\":{\"model\":{\"publisher\":\"xzlh\",\"format\":\"ix\",\"name\":\"fculzjrmhpfyw\",\"version\":\"ldqpzf\",\"source\":\"soxinu\",\"sourceAccount\":\"lzkdrocqsxy\",\"callRateLimit\":{\"count\":35.51247,\"renewalPeriod\":65.89392,\"rules\":[{},{}]}},\"skuName\":\"w\",\"availableCapacity\":11.198884,\"availableFinetuneCapacity\":16.903442,\"scopeId\":\"ylajam\",\"scopeType\":\"Regional\"},\"id\":\"hftpzcrrykll\",\"name\":\"ynqanhkigglc\",\"type\":\"walhvubh\"},{\"location\":\"phetxdqc\",\"properties\":{\"model\":{\"publisher\":\"ajqzj\",\"format\":\"lecxbibiwks\",\"name\":\"gyxs\",\"version\":\"pzvoikv\",\"source\":\"wczfzwushlcx\",\"sourceAccount\":\"lalhhezpfkiss\",\"callRateLimit\":{\"count\":38.68417,\"renewalPeriod\":24.60627,\"rules\":[{}]}},\"skuName\":\"qdsgptotxj\",\"availableCapacity\":12.192118,\"availableFinetuneCapacity\":52.62468,\"scopeId\":\"nlrtbfijzz\",\"scopeType\":\"Regional\"},\"id\":\"jolb\",\"name\":\"a\",\"type\":\"ktwieope\"},{\"location\":\"lxqdwr\",\"properties\":{\"model\":{\"publisher\":\"ljpibkgxyxyauxre\",\"format\":\"obmc\",\"name\":\"tmwytkujsqycm\",\"version\":\"xfabl\",\"source\":\"pwbmwhria\",\"sourceAccount\":\"wrycgnwpl\",\"callRateLimit\":{\"count\":81.074066,\"renewalPeriod\":48.368866,\"rules\":[{}]}},\"skuName\":\"bibticuhqvum\",\"availableCapacity\":14.480978,\"availableFinetuneCapacity\":41.853035,\"scopeId\":\"eqbbewfcuqfpy\",\"scopeType\":\"Global\"},\"id\":\"rmtmvwi\",\"name\":\"uweyyjshcyb\",\"type\":\"fuppoxprc\"},{\"location\":\"ouujxdiikmoxre\",\"properties\":{\"model\":{\"publisher\":\"vlrxikjmoywlun\",\"format\":\"pcwybsz\",\"name\":\"cnpatpft\",\"version\":\"ebwf\",\"source\":\"xorpwal\",\"sourceAccount\":\"wugexojfccyl\",\"callRateLimit\":{\"count\":62.62593,\"renewalPeriod\":70.358536,\"rules\":[{},{},{},{}]}},\"skuName\":\"jpwexcdrz\",\"availableCapacity\":3.0361652,\"availableFinetuneCapacity\":57.52574,\"scopeId\":\"xezm\",\"scopeType\":\"Classic\"},\"id\":\"gpjeuxsphlokfp\",\"name\":\"ijpdvzvfbhwbdquf\",\"type\":\"cgnrglaqrwy\"}]}") + "{\"nextLink\":\"xtndopgjttbasua\",\"value\":[{\"location\":\"lndbeaqbkixv\",\"properties\":{\"model\":{\"publisher\":\"npbbfqv\",\"format\":\"jmspugzfeuzjlj\",\"name\":\"hfkyez\",\"version\":\"gj\",\"source\":\"icuydoccn\",\"sourceAccount\":\"hanzbuiad\",\"callRateLimit\":{\"count\":29.116756,\"renewalPeriod\":98.16142,\"rules\":[{},{},{},{}]}},\"skuName\":\"sdohz\",\"availableCapacity\":38.27954,\"availableFinetuneCapacity\":47.67353,\"scopeId\":\"aombwiinjdl\",\"scopeType\":\"Regional\"},\"id\":\"le\",\"name\":\"owavvqxuajgcqw\",\"type\":\"lynkgfcfdruw\"},{\"location\":\"kxx\",\"properties\":{\"model\":{\"publisher\":\"uulriqbyokvj\",\"format\":\"zsxebr\",\"name\":\"ttfyhcdjwsuoard\",\"version\":\"gttpufpbpgnrho\",\"source\":\"ujbfwxiplkys\",\"sourceAccount\":\"syjprxslwhdmcvh\",\"callRateLimit\":{\"count\":79.78195,\"renewalPeriod\":80.45885,\"rules\":[{}]}},\"skuName\":\"uwzb\",\"availableCapacity\":88.85879,\"availableFinetuneCapacity\":44.972122,\"scopeId\":\"ihotjecohmxv\",\"scopeType\":\"Classic\"},\"id\":\"skapbxwie\",\"name\":\"xuy\",\"type\":\"derltfokyksyim\"},{\"location\":\"cgrvkcxzznnuifer\",\"properties\":{\"model\":{\"publisher\":\"gprkjgu\",\"format\":\"jmwvvbtuqkxxi\",\"name\":\"gxql\",\"version\":\"k\",\"source\":\"jgxieqfkyfh\",\"sourceAccount\":\"vjaqu\",\"callRateLimit\":{\"count\":91.532326,\"renewalPeriod\":16.762383,\"rules\":[{},{},{}]}},\"skuName\":\"a\",\"availableCapacity\":20.578909,\"availableFinetuneCapacity\":60.977978,\"scopeId\":\"me\",\"scopeType\":\"Classic\"},\"id\":\"xcbccwkqmt\",\"name\":\"apeqiscrpil\",\"type\":\"ftr\"},{\"location\":\"ejdaahuqimld\",\"properties\":{\"model\":{\"publisher\":\"xlm\",\"format\":\"fmuad\",\"name\":\"fsn\",\"version\":\"kiioshj\",\"source\":\"zetybn\",\"sourceAccount\":\"ztlcgc\",\"callRateLimit\":{\"count\":21.128391,\"renewalPeriod\":3.5691857,\"rules\":[{}]}},\"skuName\":\"wjzebecuvlb\",\"availableCapacity\":40.972473,\"availableFinetuneCapacity\":48.056595,\"scopeId\":\"jkxpylrwoxzgwpsy\",\"scopeType\":\"Classic\"},\"id\":\"eypdvrbk\",\"name\":\"rdkdkgaw\",\"type\":\"wjxildfkcefeyg\"}]}") .toObject(ModelCapacityListResult.class); - Assertions.assertEquals("ejparn", model.nextLink()); + Assertions.assertEquals("xtndopgjttbasua", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelDeprecationInfoTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelDeprecationInfoTests.java index cd930f6712f4..70bbb7112e62 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelDeprecationInfoTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelDeprecationInfoTests.java @@ -14,10 +14,10 @@ public final class ModelDeprecationInfoTests { public void testDeserialize() throws Exception { ModelDeprecationInfo model = BinaryData .fromString( - "{\"fineTune\":\"nyyazttbtwwrqpue\",\"inference\":\"kzywbiex\",\"deprecationStatus\":\"Tentative\"}") + "{\"fineTune\":\"axibxujw\",\"inference\":\"qwalmuzyoxaepd\",\"deprecationStatus\":\"Planned\"}") .toObject(ModelDeprecationInfo.class); - Assertions.assertEquals("nyyazttbtwwrqpue", model.fineTune()); - Assertions.assertEquals("kzywbiex", model.inference()); - Assertions.assertEquals(DeprecationStatus.TENTATIVE, model.deprecationStatus()); + Assertions.assertEquals("axibxujw", model.fineTune()); + Assertions.assertEquals("qwalmuzyoxaepd", model.inference()); + Assertions.assertEquals(DeprecationStatus.PLANNED, model.deprecationStatus()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelListResultTests.java index d73cbc4c396a..2e589016cd62 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ModelListResultTests.java @@ -15,43 +15,43 @@ public final class ModelListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ModelListResult model = BinaryData.fromString( - "{\"nextLink\":\"ibniynts\",\"value\":[{\"model\":{\"baseModel\":{\"publisher\":\"ftvhkmoogj\",\"format\":\"skbwgm\",\"name\":\"rulcfogx\",\"version\":\"xnwjtpfdzxcouz\",\"source\":\"ofwakukzk\",\"sourceAccount\":\"zxsoednl\",\"callRateLimit\":{\"count\":60.60254,\"renewalPeriod\":26.263512,\"rules\":[{}]}},\"isDefaultVersion\":true,\"skus\":[{\"name\":\"g\",\"usageName\":\"nione\",\"deprecationDate\":\"2021-06-04T18:47:13Z\",\"capacity\":{},\"rateLimits\":[{},{},{},{}],\"cost\":[{},{},{}]},{\"name\":\"nxkgt\",\"usageName\":\"lmtrlxcznnhz\",\"deprecationDate\":\"2021-01-19T08:56:15Z\",\"capacity\":{},\"rateLimits\":[{},{},{},{}],\"cost\":[{},{},{}]},{\"name\":\"wtyg\",\"usageName\":\"zusitoqcahfs\",\"deprecationDate\":\"2021-05-06T03:06:39Z\",\"capacity\":{},\"rateLimits\":[{},{},{}],\"cost\":[{},{},{},{}]}],\"maxCapacity\":1249189328,\"capabilities\":{\"isolntfxxcrqmip\":\"sszvlcw\",\"xxbaizabuln\":\"jwfoygizms\"},\"finetuneCapabilities\":{\"toxjdzj\":\"k\",\"paydhfn\":\"jznvhxqqmq\"},\"deprecation\":{\"fineTune\":\"xmtf\",\"inference\":\"k\",\"deprecationStatus\":\"Tentative\"},\"replacementConfig\":{\"targetModelName\":\"spamwbwmbnls\",\"targetModelVersion\":\"efiqdktwtkv\",\"autoUpgradeStartDate\":\"2021-10-30T00:19:27Z\",\"upgradeOnExpiryLeadTimeDays\":1629072439},\"modelCatalogAssetId\":\"iwoynguu\",\"lifecycleStatus\":\"Legacy\",\"publisher\":\"adpcmhjhausy\",\"format\":\"ekymffztsilscvqs\",\"name\":\"iihfymkoui\",\"version\":\"eseuugci\",\"source\":\"hogsmgbvmtd\",\"sourceAccount\":\"qbe\",\"callRateLimit\":{\"count\":64.9586,\"renewalPeriod\":97.1226,\"rules\":[{}]}},\"kind\":\"btvkbi\",\"skuName\":\"nhtfgfi\",\"description\":\"dyhi\"},{\"model\":{\"baseModel\":{\"publisher\":\"zmuhbcak\",\"format\":\"hokhoitwhrjsdmm\",\"name\":\"dnckidbjpglhz\",\"version\":\"xzbawkikc\",\"source\":\"fhbssdpjeyoqxded\",\"sourceAccount\":\"f\",\"callRateLimit\":{\"count\":49.15312,\"renewalPeriod\":25.653631,\"rules\":[{},{},{}]}},\"isDefaultVersion\":true,\"skus\":[{\"name\":\"shzz\",\"usageName\":\"ullc\",\"deprecationDate\":\"2021-01-09T15:56:52Z\",\"capacity\":{},\"rateLimits\":[{},{},{}],\"cost\":[{}]},{\"name\":\"dupnamglr\",\"usageName\":\"i\",\"deprecationDate\":\"2021-01-25T13:28:57Z\",\"capacity\":{},\"rateLimits\":[{},{}],\"cost\":[{},{}]},{\"name\":\"erdqqigd\",\"usageName\":\"kghpcv\",\"deprecationDate\":\"2021-11-04T00:49:10Z\",\"capacity\":{},\"rateLimits\":[{},{}],\"cost\":[{},{},{}]},{\"name\":\"yhhmvfxl\",\"usageName\":\"jajodmkrr\",\"deprecationDate\":\"2021-09-24T11:45:58Z\",\"capacity\":{},\"rateLimits\":[{},{}],\"cost\":[{},{},{}]}],\"maxCapacity\":1774178765,\"capabilities\":{\"bwlyvxc\":\"jqgir\",\"stvzuzhasupml\":\"pqvctsfaeuhwwsk\"},\"finetuneCapabilities\":{\"kptgongruat\":\"pgzvzqazvbka\",\"beqngubabyjde\":\"yiysjqheni\",\"ey\":\"ysc\"},\"deprecation\":{\"fineTune\":\"emexmnvkvmuwr\",\"inference\":\"n\",\"deprecationStatus\":\"Planned\"},\"replacementConfig\":{\"targetModelName\":\"m\",\"targetModelVersion\":\"dlhvdv\",\"autoUpgradeStartDate\":\"2021-12-05T01:23:16Z\",\"upgradeOnExpiryLeadTimeDays\":1254419987},\"modelCatalogAssetId\":\"aeqjzmhkd\",\"lifecycleStatus\":\"Preview\",\"publisher\":\"o\",\"format\":\"fmunerkelu\",\"name\":\"shxzezb\",\"version\":\"zudl\",\"source\":\"zskejcgwfsgqksty\",\"sourceAccount\":\"upyuijp\",\"callRateLimit\":{\"count\":76.91486,\"renewalPeriod\":35.432613,\"rules\":[{}]}},\"kind\":\"mazpzdqwuzvcmc\",\"skuName\":\"xizekuvfrjwucao\",\"description\":\"vajbvbnkrdemdid\"},{\"model\":{\"baseModel\":{\"publisher\":\"idgzwdydamis\",\"format\":\"ztdivykpxkq\",\"name\":\"tpjfojiunrlshxuk\",\"version\":\"ykd\",\"source\":\"iboancdrcoanvx\",\"sourceAccount\":\"dxonckbn\",\"callRateLimit\":{\"count\":54.44108,\"renewalPeriod\":83.8753,\"rules\":[{},{}]}},\"isDefaultVersion\":true,\"skus\":[{\"name\":\"izxzpzweghl\",\"usageName\":\"bogvgfklqiy\",\"deprecationDate\":\"2021-12-06T12:49:11Z\",\"capacity\":{},\"rateLimits\":[{},{}],\"cost\":[{},{},{},{}]}],\"maxCapacity\":1011382871,\"capabilities\":{\"dsmovpimy\":\"strkzxsgtznsvl\",\"xn\":\"dnox\",\"xolousdv\":\"qaqotnn\"},\"finetuneCapabilities\":{\"wz\":\"tqm\",\"qgkujds\":\"drpizfulgyctsdb\",\"eurbtigapdyarik\":\"oxrqw\",\"kfqbriqulwwt\":\"ejdpdfhtwm\"},\"deprecation\":{\"fineTune\":\"eqkvyhzokpoyu\",\"inference\":\"uensn\",\"deprecationStatus\":\"Tentative\"},\"replacementConfig\":{\"targetModelName\":\"mpoejnglpwsada\",\"targetModelVersion\":\"sumxpezcoioyj\",\"autoUpgradeStartDate\":\"2021-04-29T14:56:08Z\",\"upgradeOnExpiryLeadTimeDays\":292448552},\"modelCatalogAssetId\":\"qdnxkeedcnw\",\"lifecycleStatus\":\"Stable\",\"publisher\":\"qzkvemyzdpczaq\",\"format\":\"ifdbmptrwt\",\"name\":\"uisamona\",\"version\":\"izexroqsqj\",\"source\":\"rmthsplwst\",\"sourceAccount\":\"srgxfq\",\"callRateLimit\":{\"count\":56.152622,\"renewalPeriod\":79.716934,\"rules\":[{},{},{},{}]}},\"kind\":\"gzwhsxyrujmtik\",\"skuName\":\"likyohz\",\"description\":\"yqhfnkv\"}]}") + "{\"nextLink\":\"iiaocqib\",\"value\":[{\"model\":{\"baseModel\":{\"publisher\":\"ebiphryvcjwqwoq\",\"format\":\"atjhdhzybspijhf\",\"name\":\"gdkkagvwukh\",\"version\":\"s\",\"source\":\"orfmzhwilzz\",\"sourceAccount\":\"ijmri\",\"callRateLimit\":{\"count\":9.338742,\"renewalPeriod\":34.58658,\"rules\":[{},{},{}]}},\"isDefaultVersion\":true,\"skus\":[{\"name\":\"xivcbkutpumlt\",\"usageName\":\"fluxynbpvz\",\"deprecationDate\":\"2021-11-06T22:59:04Z\",\"capacity\":{},\"rateLimits\":[{}],\"cost\":[{},{},{}]},{\"name\":\"jckhmocgj\",\"usageName\":\"gouarhwvixqq\",\"deprecationDate\":\"2021-08-18T02:17:30Z\",\"capacity\":{},\"rateLimits\":[{},{}],\"cost\":[{},{},{}]},{\"name\":\"rcl\",\"usageName\":\"tzqnrbctbhpjh\",\"deprecationDate\":\"2021-11-19T15:32:51Z\",\"capacity\":{},\"rateLimits\":[{},{}],\"cost\":[{}]}],\"maxCapacity\":350896528,\"capabilities\":{\"qady\":\"n\",\"zfkiceevsaaxwsp\":\"zjahwriuomz\",\"gzzromv\":\"axikhfjqebglcxk\"},\"finetuneCapabilities\":{\"mesrfsvpi\":\"sem\",\"wxspvckojaz\":\"kzpatqtdi\",\"esubzpvpv\":\"bgspf\",\"j\":\"ylytcovqseusr\"},\"deprecation\":{\"fineTune\":\"zfxnxmlbmuos\",\"inference\":\"jmdihdcyyyzlw\",\"deprecationStatus\":\"Planned\"},\"replacementConfig\":{\"targetModelName\":\"nufzr\",\"targetModelVersion\":\"m\",\"autoUpgradeStartDate\":\"2021-11-26T02:57:42Z\",\"upgradeOnExpiryLeadTimeDays\":2081506259},\"modelCatalogAssetId\":\"zrtftedzuubjt\",\"lifecycleStatus\":\"Stable\",\"publisher\":\"mt\",\"format\":\"jvavdpwwo\",\"name\":\"d\",\"version\":\"titsf\",\"source\":\"fwanm\",\"sourceAccount\":\"scauwazcgwdfr\",\"callRateLimit\":{\"count\":56.09862,\"renewalPeriod\":49.748295,\"rules\":[{},{},{}]}},\"kind\":\"ok\",\"skuName\":\"vgllixdgby\",\"description\":\"wewqkj\"},{\"model\":{\"baseModel\":{\"publisher\":\"wpxsoo\",\"format\":\"txlcsk\",\"name\":\"e\",\"version\":\"ugggzlfbgrdcgu\",\"source\":\"rtmdylperpil\",\"sourceAccount\":\"jzgc\",\"callRateLimit\":{\"count\":7.448292,\"renewalPeriod\":17.87706,\"rules\":[{},{}]}},\"isDefaultVersion\":false,\"skus\":[{\"name\":\"esrgvtshuvftwai\",\"usageName\":\"uqk\",\"deprecationDate\":\"2021-10-04T03:47:15Z\",\"capacity\":{},\"rateLimits\":[{},{},{},{}],\"cost\":[{}]},{\"name\":\"hxmpdxxz\",\"usageName\":\"wwzjwotnxlkfhglh\",\"deprecationDate\":\"2021-09-22T13:44:39Z\",\"capacity\":{},\"rateLimits\":[{}],\"cost\":[{},{}]}],\"maxCapacity\":290691191,\"capabilities\":{\"lqxov\":\"pcs\",\"rl\":\"pqibukklv\",\"vfqbqna\":\"mlccmetjscz\"},\"finetuneCapabilities\":{\"yvdgxlyzk\":\"yenzsieuscpl\"},\"deprecation\":{\"fineTune\":\"dshezs\",\"inference\":\"olrupjovm\",\"deprecationStatus\":\"Planned\"},\"replacementConfig\":{\"targetModelName\":\"ebrazwzlpzbtzuyk\",\"targetModelVersion\":\"ip\",\"autoUpgradeStartDate\":\"2021-10-02T12:24Z\",\"upgradeOnExpiryLeadTimeDays\":1563881536},\"modelCatalogAssetId\":\"fnocmbe\",\"lifecycleStatus\":\"GenerallyAvailable\",\"publisher\":\"ztgaz\",\"format\":\"qejg\",\"name\":\"okctgkppgkqzkc\",\"version\":\"mffngdyfcixr\",\"source\":\"cqvhoejgoiutgwrm\",\"sourceAccount\":\"hpqhazyntacihn\",\"callRateLimit\":{\"count\":18.39289,\"renewalPeriod\":32.78885,\"rules\":[{},{}]}},\"kind\":\"iqm\",\"skuName\":\"bhikeaqgr\",\"description\":\"pomxpu\"}]}") .toObject(ModelListResult.class); - Assertions.assertEquals("ibniynts", model.nextLink()); - Assertions.assertEquals("adpcmhjhausy", model.value().get(0).model().publisher()); - Assertions.assertEquals("ekymffztsilscvqs", model.value().get(0).model().format()); - Assertions.assertEquals("iihfymkoui", model.value().get(0).model().name()); - Assertions.assertEquals("eseuugci", model.value().get(0).model().version()); - Assertions.assertEquals("hogsmgbvmtd", model.value().get(0).model().source()); - Assertions.assertEquals("qbe", model.value().get(0).model().sourceAccount()); - Assertions.assertEquals("ftvhkmoogj", model.value().get(0).model().baseModel().publisher()); - Assertions.assertEquals("skbwgm", model.value().get(0).model().baseModel().format()); - Assertions.assertEquals("rulcfogx", model.value().get(0).model().baseModel().name()); - Assertions.assertEquals("xnwjtpfdzxcouz", model.value().get(0).model().baseModel().version()); - Assertions.assertEquals("ofwakukzk", model.value().get(0).model().baseModel().source()); - Assertions.assertEquals("zxsoednl", model.value().get(0).model().baseModel().sourceAccount()); + Assertions.assertEquals("iiaocqib", model.nextLink()); + Assertions.assertEquals("mt", model.value().get(0).model().publisher()); + Assertions.assertEquals("jvavdpwwo", model.value().get(0).model().format()); + Assertions.assertEquals("d", model.value().get(0).model().name()); + Assertions.assertEquals("titsf", model.value().get(0).model().version()); + Assertions.assertEquals("fwanm", model.value().get(0).model().source()); + Assertions.assertEquals("scauwazcgwdfr", model.value().get(0).model().sourceAccount()); + Assertions.assertEquals("ebiphryvcjwqwoq", model.value().get(0).model().baseModel().publisher()); + Assertions.assertEquals("atjhdhzybspijhf", model.value().get(0).model().baseModel().format()); + Assertions.assertEquals("gdkkagvwukh", model.value().get(0).model().baseModel().name()); + Assertions.assertEquals("s", model.value().get(0).model().baseModel().version()); + Assertions.assertEquals("orfmzhwilzz", model.value().get(0).model().baseModel().source()); + Assertions.assertEquals("ijmri", model.value().get(0).model().baseModel().sourceAccount()); Assertions.assertTrue(model.value().get(0).model().isDefaultVersion()); - Assertions.assertEquals("g", model.value().get(0).model().skus().get(0).name()); - Assertions.assertEquals("nione", model.value().get(0).model().skus().get(0).usageName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-04T18:47:13Z"), + Assertions.assertEquals("xivcbkutpumlt", model.value().get(0).model().skus().get(0).name()); + Assertions.assertEquals("fluxynbpvz", model.value().get(0).model().skus().get(0).usageName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T22:59:04Z"), model.value().get(0).model().skus().get(0).deprecationDate()); - Assertions.assertEquals(1249189328, model.value().get(0).model().maxCapacity()); - Assertions.assertEquals("sszvlcw", model.value().get(0).model().capabilities().get("isolntfxxcrqmip")); - Assertions.assertEquals("k", model.value().get(0).model().finetuneCapabilities().get("toxjdzj")); - Assertions.assertEquals("xmtf", model.value().get(0).model().deprecation().fineTune()); - Assertions.assertEquals("k", model.value().get(0).model().deprecation().inference()); - Assertions.assertEquals(DeprecationStatus.TENTATIVE, + Assertions.assertEquals(350896528, model.value().get(0).model().maxCapacity()); + Assertions.assertEquals("n", model.value().get(0).model().capabilities().get("qady")); + Assertions.assertEquals("sem", model.value().get(0).model().finetuneCapabilities().get("mesrfsvpi")); + Assertions.assertEquals("zfxnxmlbmuos", model.value().get(0).model().deprecation().fineTune()); + Assertions.assertEquals("jmdihdcyyyzlw", model.value().get(0).model().deprecation().inference()); + Assertions.assertEquals(DeprecationStatus.PLANNED, model.value().get(0).model().deprecation().deprecationStatus()); - Assertions.assertEquals("spamwbwmbnls", model.value().get(0).model().replacementConfig().targetModelName()); - Assertions.assertEquals("efiqdktwtkv", model.value().get(0).model().replacementConfig().targetModelVersion()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-30T00:19:27Z"), + Assertions.assertEquals("nufzr", model.value().get(0).model().replacementConfig().targetModelName()); + Assertions.assertEquals("m", model.value().get(0).model().replacementConfig().targetModelVersion()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T02:57:42Z"), model.value().get(0).model().replacementConfig().autoUpgradeStartDate()); - Assertions.assertEquals(1629072439, + Assertions.assertEquals(2081506259, model.value().get(0).model().replacementConfig().upgradeOnExpiryLeadTimeDays()); - Assertions.assertEquals("iwoynguu", model.value().get(0).model().modelCatalogAssetId()); - Assertions.assertEquals(ModelLifecycleStatus.LEGACY, model.value().get(0).model().lifecycleStatus()); - Assertions.assertEquals("btvkbi", model.value().get(0).kind()); - Assertions.assertEquals("nhtfgfi", model.value().get(0).skuName()); - Assertions.assertEquals("dyhi", model.value().get(0).description()); + Assertions.assertEquals("zrtftedzuubjt", model.value().get(0).model().modelCatalogAssetId()); + Assertions.assertEquals(ModelLifecycleStatus.STABLE, model.value().get(0).model().lifecycleStatus()); + Assertions.assertEquals("ok", model.value().get(0).kind()); + Assertions.assertEquals("vgllixdgby", model.value().get(0).skuName()); + Assertions.assertEquals("wewqkj", model.value().get(0).description()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItemTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItemTests.java index 1ab8f04507ba..7cbe15ea04e9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItemTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItemTests.java @@ -11,8 +11,9 @@ public final class NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem model = BinaryData.fromString("{\"id\":\"yghs\"}") - .toObject(NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem.class); - Assertions.assertEquals("yghs", model.id()); + NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem model + = BinaryData.fromString("{\"id\":\"xjbaqehgpdohzjq\"}") + .toObject(NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem.class); + Assertions.assertEquals("xjbaqehgpdohzjq", model.id()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRulePropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRulePropertiesTests.java index 04d221645e7d..de7b6aa3e4d8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRulePropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRulePropertiesTests.java @@ -13,14 +13,14 @@ public final class NetworkSecurityPerimeterAccessRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterAccessRuleProperties model = BinaryData.fromString( - "{\"direction\":\"Outbound\",\"addressPrefixes\":[\"jpbyephmgtv\"],\"subscriptions\":[{\"id\":\"cmyfqipgxhnpo\"},{\"id\":\"qwcabvnui\"},{\"id\":\"ey\"},{\"id\":\"wlpaugmrmfjlrxwt\"}],\"networkSecurityPerimeters\":[{\"id\":\"hfkvcisizmoaedsx\",\"perimeterGuid\":\"uivedwcgyeewxeiq\",\"location\":\"smgomguaml\"},{\"id\":\"l\",\"perimeterGuid\":\"msplzgaufcshhvn\",\"location\":\"gnxkympqan\"}],\"fullyQualifiedDomainNames\":[\"kixtwbtaoy\"]}") + "{\"direction\":\"Inbound\",\"addressPrefixes\":[\"cq\",\"jvidttge\",\"uslvyjtcvuwkasi\"],\"subscriptions\":[{\"id\":\"fuughtuqfec\"},{\"id\":\"ey\"}],\"networkSecurityPerimeters\":[{\"id\":\"xu\",\"perimeterGuid\":\"buew\",\"location\":\"s\"}],\"fullyQualifiedDomainNames\":[\"lx\",\"zrhwp\"]}") .toObject(NetworkSecurityPerimeterAccessRuleProperties.class); - Assertions.assertEquals(NspAccessRuleDirection.OUTBOUND, model.direction()); - Assertions.assertEquals("jpbyephmgtv", model.addressPrefixes().get(0)); - Assertions.assertEquals("cmyfqipgxhnpo", model.subscriptions().get(0).id()); - Assertions.assertEquals("hfkvcisizmoaedsx", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("uivedwcgyeewxeiq", model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("smgomguaml", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("kixtwbtaoy", model.fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals(NspAccessRuleDirection.INBOUND, model.direction()); + Assertions.assertEquals("cq", model.addressPrefixes().get(0)); + Assertions.assertEquals("fuughtuqfec", model.subscriptions().get(0).id()); + Assertions.assertEquals("xu", model.networkSecurityPerimeters().get(0).id()); + Assertions.assertEquals("buew", model.networkSecurityPerimeters().get(0).perimeterGuid()); + Assertions.assertEquals("s", model.networkSecurityPerimeters().get(0).location()); + Assertions.assertEquals("lx", model.fullyQualifiedDomainNames().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRuleTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRuleTests.java index fcbb416183b7..a4f6db5c27a4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRuleTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterAccessRuleTests.java @@ -13,15 +13,15 @@ public final class NetworkSecurityPerimeterAccessRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterAccessRule model = BinaryData.fromString( - "{\"name\":\"nabaobnslujd\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"mvguihywart\",\"pphkixkykxds\"],\"subscriptions\":[{\"id\":\"mmuc\"},{\"id\":\"hikkflrmy\"},{\"id\":\"incqlhriswsl\"}],\"networkSecurityPerimeters\":[{\"id\":\"ovgqcgxuugqkctot\",\"perimeterGuid\":\"wlxte\",\"location\":\"ptjgwdt\"},{\"id\":\"kranblwphqlkcc\",\"perimeterGuid\":\"gygqwah\",\"location\":\"ulwgniiprglvawuw\"},{\"id\":\"ufypiv\",\"perimeterGuid\":\"bbjpmcubkmif\",\"location\":\"xkubvphavpmhbrbq\"}],\"fullyQualifiedDomainNames\":[\"ovpbbttefjoknssq\",\"zqedikdfrdbi\",\"mrjgeihfqlggwfi\"]}}") + "{\"name\":\"erngbtcjuahokqto\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"fshfph\",\"pnulaiywzej\",\"whslwkoj\",\"llndnpd\"],\"subscriptions\":[{\"id\":\"afgfugsnn\"},{\"id\":\"yetefyp\"},{\"id\":\"octfjgtixrjvzuyt\"},{\"id\":\"mlmuowol\"}],\"networkSecurityPerimeters\":[{\"id\":\"ropions\",\"perimeterGuid\":\"nw\",\"location\":\"gajinnixjawrtmj\"}],\"fullyQualifiedDomainNames\":[\"yccxlzhcox\",\"vnekhenlusfnrdtj\"]}}") .toObject(NetworkSecurityPerimeterAccessRule.class); - Assertions.assertEquals("nabaobnslujd", model.name()); + Assertions.assertEquals("erngbtcjuahokqto", model.name()); Assertions.assertEquals(NspAccessRuleDirection.OUTBOUND, model.properties().direction()); - Assertions.assertEquals("mvguihywart", model.properties().addressPrefixes().get(0)); - Assertions.assertEquals("mmuc", model.properties().subscriptions().get(0).id()); - Assertions.assertEquals("ovgqcgxuugqkctot", model.properties().networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("wlxte", model.properties().networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("ptjgwdt", model.properties().networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("ovpbbttefjoknssq", model.properties().fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals("fshfph", model.properties().addressPrefixes().get(0)); + Assertions.assertEquals("afgfugsnn", model.properties().subscriptions().get(0).id()); + Assertions.assertEquals("ropions", model.properties().networkSecurityPerimeters().get(0).id()); + Assertions.assertEquals("nw", model.properties().networkSecurityPerimeters().get(0).perimeterGuid()); + Assertions.assertEquals("gajinnixjawrtmj", model.properties().networkSecurityPerimeters().get(0).location()); + Assertions.assertEquals("yccxlzhcox", model.properties().fullyQualifiedDomainNames().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationAssociationInfoTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationAssociationInfoTests.java index e63cdc2a5106..fbf3d8ade8ff 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationAssociationInfoTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationAssociationInfoTests.java @@ -12,9 +12,9 @@ public final class NetworkSecurityPerimeterConfigurationAssociationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationAssociationInfo model - = BinaryData.fromString("{\"name\":\"omacluzvxnqmhr\",\"accessMode\":\"pd\"}") + = BinaryData.fromString("{\"name\":\"gtdysnaqu\",\"accessMode\":\"qbctqha\"}") .toObject(NetworkSecurityPerimeterConfigurationAssociationInfo.class); - Assertions.assertEquals("omacluzvxnqmhr", model.name()); - Assertions.assertEquals("pd", model.accessMode()); + Assertions.assertEquals("gtdysnaqu", model.name()); + Assertions.assertEquals("qbctqha", model.accessMode()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationInnerTests.java index 19b01099ae74..0ee705ca7253 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationInnerTests.java @@ -13,29 +13,30 @@ public final class NetworkSecurityPerimeterConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"q\",\"provisioningIssues\":[{\"name\":\"renlvhhtklnvnafv\",\"properties\":{\"issueType\":\"f\",\"severity\":\"ev\",\"description\":\"oslc\",\"suggestedResourceIds\":[\"p\"],\"suggestedAccessRules\":[{},{},{}]}},{\"name\":\"minqcym\",\"properties\":{\"issueType\":\"gn\",\"severity\":\"xxewu\",\"description\":\"nvudbchaqdtvqecr\",\"suggestedResourceIds\":[\"mxxdtddmflh\",\"ytxzvtznapxbanno\",\"voxczytpr\",\"nwvroevytlyokrr\"],\"suggestedAccessRules\":[{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"vnsasbcrymodi\",\"perimeterGuid\":\"xkl\",\"location\":\"d\"},\"resourceAssociation\":{\"name\":\"zpmkmlmvev\",\"accessMode\":\"zopjhbzxliohr\"},\"profile\":{\"name\":\"tfgxqbawpcb\",\"accessRulesVersion\":8885208380156245591,\"accessRules\":[{\"name\":\"napqo\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"hz\",\"dyb\",\"wgbdvibidmhmwffp\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"ck\"]}},{\"name\":\"rrvwey\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"k\",\"haim\",\"oir\",\"qboshbra\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"fsv\",\"pavbo\"]}},{\"name\":\"ppdbwnupgahxkum\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"cfdmmcpugmehqe\",\"vufhbzehewhoq\",\"nlbqnbldxeaclg\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"krsrrmoucs\",\"fldpuviyfc\",\"abeolhbhlvbm\",\"uqibsxtkcu\"]}},{\"name\":\"b\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"iowl\",\"jxnqp\",\"wgfstmhqykizm\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"cluqvo\",\"mycjimryvwgcwwp\"]}}],\"diagnosticSettingsVersion\":3665873837701448622,\"enabledLogCategories\":[\"sydsxwefohe\",\"bvopwndyqle\"]}},\"id\":\"lklmtkhlo\",\"name\":\"kxxpvbrd\",\"type\":\"jmzsyzfh\"}") + "{\"properties\":{\"provisioningState\":\"f\",\"provisioningIssues\":[{\"name\":\"cazuaw\",\"properties\":{\"issueType\":\"x\",\"severity\":\"amwabzxrvxcushsp\",\"description\":\"ivmxyasfl\",\"suggestedResourceIds\":[\"gzwywak\",\"ihknsmjbl\",\"ljhlnymzotq\",\"ryuzcbmqqv\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"fgtayxonsup\",\"properties\":{\"issueType\":\"lzqnhcvs\",\"severity\":\"tnzoibgsxgnxfy\",\"description\":\"nmpqoxwdofdb\",\"suggestedResourceIds\":[\"xeiiq\",\"imht\",\"wwinhehf\",\"pofvwb\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"mbnkb\",\"properties\":{\"issueType\":\"vxkdivqihebwtswb\",\"severity\":\"wfmdurage\",\"description\":\"zvcjfelisdjubggb\",\"suggestedResourceIds\":[\"kxkbsazgakgacyr\",\"m\",\"dmspof\"],\"suggestedAccessRules\":[{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"rylniofrzg\",\"perimeterGuid\":\"jed\",\"location\":\"tkvnlvxbcuiiznkt\"},\"resourceAssociation\":{\"name\":\"nsnvpd\",\"accessMode\":\"mik\"},\"profile\":{\"name\":\"bzbkiw\",\"accessRulesVersion\":2906864622240498001,\"accessRules\":[{\"name\":\"hzfylsgcrpfbc\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"e\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"wl\",\"xjwet\",\"psihcla\"]}},{\"name\":\"va\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"qqwzt\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"cxwaxfewz\",\"kjexfdeqvhp\",\"ylkkshkbffmbm\"]}},{\"name\":\"jrgywwpgjxsn\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"icgaao\",\"pttaqutd\",\"wemxswvruunzz\",\"gehkfkimrtixokff\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"epqw\",\"ixmonstshiyxg\",\"elfclducc\"]}}],\"diagnosticSettingsVersion\":2866973722356621195,\"enabledLogCategories\":[\"uwc\",\"b\",\"egstmninwjizci\",\"nghgshej\"]}},\"id\":\"bxqmu\",\"name\":\"uxlxqzvners\",\"type\":\"ycucrwnamikzeb\"}") .toObject(NetworkSecurityPerimeterConfigurationInner.class); - Assertions.assertEquals("renlvhhtklnvnafv", model.properties().provisioningIssues().get(0).name()); - Assertions.assertEquals("f", model.properties().provisioningIssues().get(0).properties().issueType()); - Assertions.assertEquals("ev", model.properties().provisioningIssues().get(0).properties().severity()); - Assertions.assertEquals("oslc", model.properties().provisioningIssues().get(0).properties().description()); - Assertions.assertEquals("p", + Assertions.assertEquals("cazuaw", model.properties().provisioningIssues().get(0).name()); + Assertions.assertEquals("x", model.properties().provisioningIssues().get(0).properties().issueType()); + Assertions.assertEquals("amwabzxrvxcushsp", + model.properties().provisioningIssues().get(0).properties().severity()); + Assertions.assertEquals("ivmxyasfl", model.properties().provisioningIssues().get(0).properties().description()); + Assertions.assertEquals("gzwywak", model.properties().provisioningIssues().get(0).properties().suggestedResourceIds().get(0)); - Assertions.assertEquals("vnsasbcrymodi", model.properties().networkSecurityPerimeter().id()); - Assertions.assertEquals("xkl", model.properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("d", model.properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("zpmkmlmvev", model.properties().resourceAssociation().name()); - Assertions.assertEquals("zopjhbzxliohr", model.properties().resourceAssociation().accessMode()); - Assertions.assertEquals("tfgxqbawpcb", model.properties().profile().name()); - Assertions.assertEquals(8885208380156245591L, model.properties().profile().accessRulesVersion()); - Assertions.assertEquals("napqo", model.properties().profile().accessRules().get(0).name()); - Assertions.assertEquals(NspAccessRuleDirection.INBOUND, + Assertions.assertEquals("rylniofrzg", model.properties().networkSecurityPerimeter().id()); + Assertions.assertEquals("jed", model.properties().networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("tkvnlvxbcuiiznkt", model.properties().networkSecurityPerimeter().location()); + Assertions.assertEquals("nsnvpd", model.properties().resourceAssociation().name()); + Assertions.assertEquals("mik", model.properties().resourceAssociation().accessMode()); + Assertions.assertEquals("bzbkiw", model.properties().profile().name()); + Assertions.assertEquals(2906864622240498001L, model.properties().profile().accessRulesVersion()); + Assertions.assertEquals("hzfylsgcrpfbc", model.properties().profile().accessRules().get(0).name()); + Assertions.assertEquals(NspAccessRuleDirection.OUTBOUND, model.properties().profile().accessRules().get(0).properties().direction()); - Assertions.assertEquals("hz", + Assertions.assertEquals("e", model.properties().profile().accessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("ck", + Assertions.assertEquals("wl", model.properties().profile().accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals(3665873837701448622L, model.properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("sydsxwefohe", model.properties().profile().enabledLogCategories().get(0)); + Assertions.assertEquals(2866973722356621195L, model.properties().profile().diagnosticSettingsVersion()); + Assertions.assertEquals("uwc", model.properties().profile().enabledLogCategories().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationListTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationListTests.java index c5106be82e2d..7bdcbe563aaf 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationListTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationListTests.java @@ -12,20 +12,20 @@ public final class NetworkSecurityPerimeterConfigurationListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"iidlop\",\"provisioningIssues\":[{\"name\":\"dpyqyybxubmd\",\"properties\":{}},{\"name\":\"cbq\",\"properties\":{}},{\"name\":\"mjel\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"igeleohd\",\"perimeterGuid\":\"qvwzkjopwbeonrl\",\"location\":\"zdqyb\"},\"resourceAssociation\":{\"name\":\"akxcptsoqfyiaseq\",\"accessMode\":\"krtt\"},\"profile\":{\"name\":\"zisgykiuemvanb\",\"accessRulesVersion\":4404563811417107033,\"accessRules\":[{},{},{}],\"diagnosticSettingsVersion\":5046468733811756631,\"enabledLogCategories\":[\"ojklin\",\"mdptys\",\"rqsgnzx\",\"jp\"]}},\"id\":\"svjgpliufiqwoyxq\",\"name\":\"apcohhouc\",\"type\":\"pqojxcx\"},{\"properties\":{\"provisioningState\":\"dcgdzbenribca\",\"provisioningIssues\":[{\"name\":\"qd\",\"properties\":{}},{\"name\":\"wflj\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"mtuatmzwcjjncqtj\",\"perimeterGuid\":\"izvg\",\"location\":\"atzuuv\"},\"resourceAssociation\":{\"name\":\"grebwggahttzlsw\",\"accessMode\":\"jqfutlxj\"},\"profile\":{\"name\":\"asunwqrjzfrgq\",\"accessRulesVersion\":6777298963629593601,\"accessRules\":[{},{},{},{}],\"diagnosticSettingsVersion\":4844988856975209980,\"enabledLogCategories\":[\"jrohmbpyryxameb\",\"ydyvkfkmro\",\"xne\"]}},\"id\":\"sm\",\"name\":\"odlfpyapucygvo\",\"type\":\"vyuns\"},{\"properties\":{\"provisioningState\":\"ghiee\",\"provisioningIssues\":[{\"name\":\"vvpa\",\"properties\":{}},{\"name\":\"sgb\",\"properties\":{}},{\"name\":\"ntuygdhgaqipir\",\"properties\":{}},{\"name\":\"rqofulopmjnlexwh\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"ibkeph\",\"perimeterGuid\":\"uerct\",\"location\":\"oyin\"},\"resourceAssociation\":{\"name\":\"brlc\",\"accessMode\":\"duczkgof\"},\"profile\":{\"name\":\"srucvcrrpcjtt\",\"accessRulesVersion\":672080261957905946,\"accessRules\":[{},{},{},{}],\"diagnosticSettingsVersion\":84582581386660525,\"enabledLogCategories\":[\"vvf\",\"oxmlghktuidv\"]}},\"id\":\"azlp\",\"name\":\"wwexymzvlazipbh\",\"type\":\"wvqsgny\"},{\"properties\":{\"provisioningState\":\"ziven\",\"provisioningIssues\":[{\"name\":\"eyyvpkpatl\",\"properties\":{}},{\"name\":\"pzgsk\",\"properties\":{}},{\"name\":\"hfvolmknb\",\"properties\":{}},{\"name\":\"cdommpvfqaw\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"rttuiaclkiexha\",\"perimeterGuid\":\"fnth\",\"location\":\"fyut\"},\"resourceAssociation\":{\"name\":\"ygbpvnwswmt\",\"accessMode\":\"yctww\"},\"profile\":{\"name\":\"xjlme\",\"accessRulesVersion\":2194319301618511717,\"accessRules\":[{},{}],\"diagnosticSettingsVersion\":7690750367032193661,\"enabledLogCategories\":[\"ezaifghtmo\",\"qtlffhzbk\",\"kjj\",\"avfqnvhnqoewdogi\"]}},\"id\":\"tesypvidbztjh\",\"name\":\"t\",\"type\":\"b\"}],\"nextLink\":\"nynkbwet\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"u\",\"provisioningIssues\":[{\"name\":\"kccrrvwey\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"yukphaimmoiroq\",\"perimeterGuid\":\"shbraga\",\"location\":\"yrmfsvbpav\"},\"resourceAssociation\":{\"name\":\"fppdbwnu\",\"accessMode\":\"ahxku\"},\"profile\":{\"name\":\"jcaacfdmmcpugm\",\"accessRulesVersion\":2799453974287418624,\"accessRules\":[{},{},{},{}],\"diagnosticSettingsVersion\":5118985133701326059,\"enabledLogCategories\":[\"ehewhoqh\"]}},\"id\":\"bqnbl\",\"name\":\"xeaclgsc\",\"type\":\"orim\"}],\"nextLink\":\"srrm\"}") .toObject(NetworkSecurityPerimeterConfigurationList.class); - Assertions.assertEquals("dpyqyybxubmd", model.value().get(0).properties().provisioningIssues().get(0).name()); - Assertions.assertEquals("igeleohd", model.value().get(0).properties().networkSecurityPerimeter().id()); - Assertions.assertEquals("qvwzkjopwbeonrl", + Assertions.assertEquals("kccrrvwey", model.value().get(0).properties().provisioningIssues().get(0).name()); + Assertions.assertEquals("yukphaimmoiroq", model.value().get(0).properties().networkSecurityPerimeter().id()); + Assertions.assertEquals("shbraga", model.value().get(0).properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("zdqyb", model.value().get(0).properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("akxcptsoqfyiaseq", model.value().get(0).properties().resourceAssociation().name()); - Assertions.assertEquals("krtt", model.value().get(0).properties().resourceAssociation().accessMode()); - Assertions.assertEquals("zisgykiuemvanb", model.value().get(0).properties().profile().name()); - Assertions.assertEquals(4404563811417107033L, model.value().get(0).properties().profile().accessRulesVersion()); - Assertions.assertEquals(5046468733811756631L, + Assertions.assertEquals("yrmfsvbpav", model.value().get(0).properties().networkSecurityPerimeter().location()); + Assertions.assertEquals("fppdbwnu", model.value().get(0).properties().resourceAssociation().name()); + Assertions.assertEquals("ahxku", model.value().get(0).properties().resourceAssociation().accessMode()); + Assertions.assertEquals("jcaacfdmmcpugm", model.value().get(0).properties().profile().name()); + Assertions.assertEquals(2799453974287418624L, model.value().get(0).properties().profile().accessRulesVersion()); + Assertions.assertEquals(5118985133701326059L, model.value().get(0).properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("ojklin", model.value().get(0).properties().profile().enabledLogCategories().get(0)); - Assertions.assertEquals("nynkbwet", model.nextLink()); + Assertions.assertEquals("ehewhoqh", model.value().get(0).properties().profile().enabledLogCategories().get(0)); + Assertions.assertEquals("srrm", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java index e1fb97632f91..77b398ccf889 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java @@ -13,30 +13,30 @@ public final class NetworkSecurityPerimeterConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"lhikcyychunsj\",\"provisioningIssues\":[{\"name\":\"twszhvvuic\",\"properties\":{\"issueType\":\"trrmhwrb\",\"severity\":\"pyf\",\"description\":\"bhvjglr\",\"suggestedResourceIds\":[\"yzlwh\",\"memhooclutnpq\"],\"suggestedAccessRules\":[{\"name\":\"zjkmmykyujxs\",\"properties\":{}},{\"name\":\"srrryejylmbkzu\",\"properties\":{}}]}},{\"name\":\"grfihotjewlp\",\"properties\":{\"issueType\":\"zj\",\"severity\":\"refqy\",\"description\":\"otoihiqa\",\"suggestedResourceIds\":[\"iwfbrkwpzdqtvhcs\"],\"suggestedAccessRules\":[{\"name\":\"qaxsipietgbebjf\",\"properties\":{}},{\"name\":\"moichdlpnfpubntn\",\"properties\":{}}]}}],\"networkSecurityPerimeter\":{\"id\":\"viqsowsaaelcattc\",\"perimeterGuid\":\"hplrvkmjcwmjvlg\",\"location\":\"gcvkyyli\"},\"resourceAssociation\":{\"name\":\"bjpsfxsfuztlvtm\",\"accessMode\":\"gbwidqlvh\"},\"profile\":{\"name\":\"veo\",\"accessRulesVersion\":9219250864027024422,\"accessRules\":[{\"name\":\"nmjmvlwyzgiblk\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"ojuidjpuuyjucej\",\"kzoeovvtzejetj\",\"ln\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"k\",\"bqzolxr\",\"vhqjwtrhtgvg\"]}},{\"name\":\"c\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"w\",\"mjsmwr\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"zz\",\"yjaf\"]}},{\"name\":\"lhguyn\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"ltxdwhmozu\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"n\",\"jzfpafolpymwamx\",\"zragpg\",\"phtvdu\"]}}],\"diagnosticSettingsVersion\":5705610585664223430,\"enabledLogCategories\":[\"jchcsrlzknmzla\",\"rupdwvnphcnzq\",\"pjhmqrhvthl\"]}}") + "{\"provisioningState\":\"bsmswziqgf\",\"provisioningIssues\":[{\"name\":\"zruswh\",\"properties\":{\"issueType\":\"zznvfbyc\",\"severity\":\"xjww\",\"description\":\"z\",\"suggestedResourceIds\":[\"wmxqhndvnoamlds\",\"haohdjhhflzokxc\",\"xpelnjetagltsx\",\"atftgzpnpbsw\"],\"suggestedAccessRules\":[{\"name\":\"occsr\",\"properties\":{}},{\"name\":\"ihmipgawtxxpk\",\"properties\":{}},{\"name\":\"xcjxgrytfmpcy\",\"properties\":{}}]}},{\"name\":\"rmcaykgg\",\"properties\":{\"issueType\":\"uztrksxwpndfcpf\",\"severity\":\"nthjtwkjaosrxuzv\",\"description\":\"mktcqiosmgbza\",\"suggestedResourceIds\":[\"qdlyrtl\",\"laprlt\",\"katbhjm\",\"nnbsoqeqa\"],\"suggestedAccessRules\":[{\"name\":\"lagun\",\"properties\":{}},{\"name\":\"febwlnbmhyreeudz\",\"properties\":{}},{\"name\":\"bpdqmjxlyy\",\"properties\":{}},{\"name\":\"gouwtlmj\",\"properties\":{}}]}}],\"networkSecurityPerimeter\":{\"id\":\"j\",\"perimeterGuid\":\"obaxkjeytu\",\"location\":\"bfjkw\"},\"resourceAssociation\":{\"name\":\"nkqbhsyrq\",\"accessMode\":\"jqhden\"},\"profile\":{\"name\":\"l\",\"accessRulesVersion\":9137448360522101229,\"accessRules\":[{\"name\":\"fmjnnawtqa\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"p\",\"gqoweyirdhlisn\",\"wfl\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"uwnpqxpxiwfcng\",\"saasiixtmkzj\",\"kv\"]}},{\"name\":\"rhgfgrwsdpgrat\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"byvi\",\"tctbrxkjzwrgxffm\",\"hkwfbkgozxwop\",\"bydpizqaclnapxb\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"knfsmfcttuxuuyil\"]}}],\"diagnosticSettingsVersion\":8008907163889108924,\"enabledLogCategories\":[\"uvr\",\"hmrnjhvsuj\"]}}") .toObject(NetworkSecurityPerimeterConfigurationProperties.class); - Assertions.assertEquals("twszhvvuic", model.provisioningIssues().get(0).name()); - Assertions.assertEquals("trrmhwrb", model.provisioningIssues().get(0).properties().issueType()); - Assertions.assertEquals("pyf", model.provisioningIssues().get(0).properties().severity()); - Assertions.assertEquals("bhvjglr", model.provisioningIssues().get(0).properties().description()); - Assertions.assertEquals("yzlwh", model.provisioningIssues().get(0).properties().suggestedResourceIds().get(0)); - Assertions.assertEquals("zjkmmykyujxs", + Assertions.assertEquals("zruswh", model.provisioningIssues().get(0).name()); + Assertions.assertEquals("zznvfbyc", model.provisioningIssues().get(0).properties().issueType()); + Assertions.assertEquals("xjww", model.provisioningIssues().get(0).properties().severity()); + Assertions.assertEquals("z", model.provisioningIssues().get(0).properties().description()); + Assertions.assertEquals("wmxqhndvnoamlds", + model.provisioningIssues().get(0).properties().suggestedResourceIds().get(0)); + Assertions.assertEquals("occsr", model.provisioningIssues().get(0).properties().suggestedAccessRules().get(0).name()); - Assertions.assertEquals("viqsowsaaelcattc", model.networkSecurityPerimeter().id()); - Assertions.assertEquals("hplrvkmjcwmjvlg", model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("gcvkyyli", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("bjpsfxsfuztlvtm", model.resourceAssociation().name()); - Assertions.assertEquals("gbwidqlvh", model.resourceAssociation().accessMode()); - Assertions.assertEquals("veo", model.profile().name()); - Assertions.assertEquals(9219250864027024422L, model.profile().accessRulesVersion()); - Assertions.assertEquals("nmjmvlwyzgiblk", model.profile().accessRules().get(0).name()); + Assertions.assertEquals("j", model.networkSecurityPerimeter().id()); + Assertions.assertEquals("obaxkjeytu", model.networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("bfjkw", model.networkSecurityPerimeter().location()); + Assertions.assertEquals("nkqbhsyrq", model.resourceAssociation().name()); + Assertions.assertEquals("jqhden", model.resourceAssociation().accessMode()); + Assertions.assertEquals("l", model.profile().name()); + Assertions.assertEquals(9137448360522101229L, model.profile().accessRulesVersion()); + Assertions.assertEquals("fmjnnawtqa", model.profile().accessRules().get(0).name()); Assertions.assertEquals(NspAccessRuleDirection.OUTBOUND, model.profile().accessRules().get(0).properties().direction()); - Assertions.assertEquals("ojuidjpuuyjucej", - model.profile().accessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("k", + Assertions.assertEquals("p", model.profile().accessRules().get(0).properties().addressPrefixes().get(0)); + Assertions.assertEquals("uwnpqxpxiwfcng", model.profile().accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals(5705610585664223430L, model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("jchcsrlzknmzla", model.profile().enabledLogCategories().get(0)); + Assertions.assertEquals(8008907163889108924L, model.profile().diagnosticSettingsVersion()); + Assertions.assertEquals("uvr", model.profile().enabledLogCategories().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java index a25e4c462088..0625e0503d12 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class NetworkSecurityPerimeterConfigurationsGetWithResponseMockTest @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"akosysycvldee\",\"provisioningIssues\":[{\"name\":\"aipu\",\"properties\":{\"issueType\":\"fkegbvbbdledf\",\"severity\":\"zvsluazzxfjve\",\"description\":\"pxzee\",\"suggestedResourceIds\":[\"pbscboxr\",\"qdczmrjgobekx\",\"heowsecaf\",\"rzzbs\"],\"suggestedAccessRules\":[{},{}]}},{\"name\":\"jsb\",\"properties\":{\"issueType\":\"seesacuicnvq\",\"severity\":\"suivmrf\",\"description\":\"tnd\",\"suggestedResourceIds\":[\"nlh\",\"k\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"kekc\",\"properties\":{\"issueType\":\"iiebe\",\"severity\":\"fzavqym\",\"description\":\"tsiucepl\",\"suggestedResourceIds\":[\"gkuorwpqbst\",\"e\",\"b\",\"ts\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"kkiela\",\"properties\":{\"issueType\":\"oyjyflsmsbn\",\"severity\":\"oifgdfzjqthykcv\",\"description\":\"vcwfz\",\"suggestedResourceIds\":[\"xxlwwooxgbsdz\",\"gcvypjhu\"],\"suggestedAccessRules\":[{},{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"bxehujcqgzwvx\",\"perimeterGuid\":\"uaoibm\",\"location\":\"lqrl\"},\"resourceAssociation\":{\"name\":\"uky\",\"accessMode\":\"xrjiqoqovqhg\"},\"profile\":{\"name\":\"xuwudgcyqr\",\"accessRulesVersion\":1830995899712200084,\"accessRules\":[{\"name\":\"dnqivahfcqw\",\"properties\":{}},{\"name\":\"ebp\",\"properties\":{}},{\"name\":\"iyoypoedkspwwibp\",\"properties\":{}}],\"diagnosticSettingsVersion\":2877359021254224088,\"enabledLogCategories\":[\"uyxsxte\",\"ikhznfffnhcg\",\"aqsr\",\"rfqd\"]}},\"id\":\"krgsdcob\",\"name\":\"mgqlwyqznbbyzpo\",\"type\":\"zfutgpbygbnb\"}"; + = "{\"properties\":{\"provisioningState\":\"nlzuvigvlghf\",\"provisioningIssues\":[{\"name\":\"kpjtcqraqpoj\",\"properties\":{\"issueType\":\"cmximcwq\",\"severity\":\"nqjgsatkyv\",\"description\":\"bgngcrusxhirc\",\"suggestedResourceIds\":[\"vsvkkjbjolpyo\",\"lkvuznadvh\"],\"suggestedAccessRules\":[{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"igowxxbhtpsyioqe\",\"perimeterGuid\":\"w\",\"location\":\"szzgyk\"},\"resourceAssociation\":{\"name\":\"awanvmwdvgjq\",\"accessMode\":\"bkompnbnfgyweoj\"},\"profile\":{\"name\":\"gcmahi\",\"accessRulesVersion\":6933152071516059418,\"accessRules\":[{\"name\":\"ch\",\"properties\":{}}],\"diagnosticSettingsVersion\":8990184772651358168,\"enabledLogCategories\":[\"shfyf\",\"t\"]}},\"id\":\"j\",\"name\":\"pzwhjunfdgbggc\",\"type\":\"x\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,26 +31,26 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() - .getWithResponse("lrcygotohzwto", "dhbxitrapwzhl", "tjsjzelsriemvu", com.azure.core.util.Context.NONE) + .getWithResponse("ecwzvcmbpwdluda", "prldidwm", "ffbvtzldzchub", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("aipu", response.properties().provisioningIssues().get(0).name()); - Assertions.assertEquals("fkegbvbbdledf", - response.properties().provisioningIssues().get(0).properties().issueType()); - Assertions.assertEquals("zvsluazzxfjve", + Assertions.assertEquals("kpjtcqraqpoj", response.properties().provisioningIssues().get(0).name()); + Assertions.assertEquals("cmximcwq", response.properties().provisioningIssues().get(0).properties().issueType()); + Assertions.assertEquals("nqjgsatkyv", response.properties().provisioningIssues().get(0).properties().severity()); - Assertions.assertEquals("pxzee", response.properties().provisioningIssues().get(0).properties().description()); - Assertions.assertEquals("pbscboxr", + Assertions.assertEquals("bgngcrusxhirc", + response.properties().provisioningIssues().get(0).properties().description()); + Assertions.assertEquals("vsvkkjbjolpyo", response.properties().provisioningIssues().get(0).properties().suggestedResourceIds().get(0)); - Assertions.assertEquals("bxehujcqgzwvx", response.properties().networkSecurityPerimeter().id()); - Assertions.assertEquals("uaoibm", response.properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("lqrl", response.properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("uky", response.properties().resourceAssociation().name()); - Assertions.assertEquals("xrjiqoqovqhg", response.properties().resourceAssociation().accessMode()); - Assertions.assertEquals("xuwudgcyqr", response.properties().profile().name()); - Assertions.assertEquals(1830995899712200084L, response.properties().profile().accessRulesVersion()); - Assertions.assertEquals("dnqivahfcqw", response.properties().profile().accessRules().get(0).name()); - Assertions.assertEquals(2877359021254224088L, response.properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("uyxsxte", response.properties().profile().enabledLogCategories().get(0)); + Assertions.assertEquals("igowxxbhtpsyioqe", response.properties().networkSecurityPerimeter().id()); + Assertions.assertEquals("w", response.properties().networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("szzgyk", response.properties().networkSecurityPerimeter().location()); + Assertions.assertEquals("awanvmwdvgjq", response.properties().resourceAssociation().name()); + Assertions.assertEquals("bkompnbnfgyweoj", response.properties().resourceAssociation().accessMode()); + Assertions.assertEquals("gcmahi", response.properties().profile().name()); + Assertions.assertEquals(6933152071516059418L, response.properties().profile().accessRulesVersion()); + Assertions.assertEquals("ch", response.properties().profile().accessRules().get(0).name()); + Assertions.assertEquals(8990184772651358168L, response.properties().profile().diagnosticSettingsVersion()); + Assertions.assertEquals("shfyf", response.properties().profile().enabledLogCategories().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java index 1ee0e96eb55d..6ac38c47d74f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java @@ -22,7 +22,7 @@ public final class NetworkSecurityPerimeterConfigurationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"ywlrkqsqvvdkfpfj\",\"provisioningIssues\":[{\"name\":\"qxymxxyfrdjidce\",\"properties\":{\"issueType\":\"gwfwsldigwouppvy\",\"severity\":\"qsvclrsnxf\",\"description\":\"p\",\"suggestedResourceIds\":[\"clmdmtfxxepzpx\",\"xlcqzfxa\"],\"suggestedAccessRules\":[{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"cj\",\"perimeterGuid\":\"mkirpqn\",\"location\":\"udmhkcomeobwk\"},\"resourceAssociation\":{\"name\":\"ltenlbfxlm\",\"accessMode\":\"zesndoduomtx\"},\"profile\":{\"name\":\"ixymckik\",\"accessRulesVersion\":2119087865917649608,\"accessRules\":[{\"name\":\"wis\",\"properties\":{}},{\"name\":\"mrzcqfevnkyakc\",\"properties\":{}}],\"diagnosticSettingsVersion\":112718878748646694,\"enabledLogCategories\":[\"sddjkkdedesua\",\"ogfcnxcxgxum\"]}},\"id\":\"qxmyvkxixypavi\",\"name\":\"jczgohv\",\"type\":\"suwichmxczbyfkoc\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"ngkqlgxzduvxd\",\"provisioningIssues\":[{\"name\":\"atmdmn\",\"properties\":{\"issueType\":\"nxoirxy\",\"severity\":\"miploisj\",\"description\":\"so\",\"suggestedResourceIds\":[\"ntwgkvyo\",\"psapzu\"],\"suggestedAccessRules\":[{},{},{}]}},{\"name\":\"ytbdjzgh\",\"properties\":{\"issueType\":\"kgfmxpqkjnpyr\",\"severity\":\"ntotcxmmqm\",\"description\":\"jkyjrexw\",\"suggestedResourceIds\":[\"bexfted\",\"ubheeggzgrnqtl\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"umrtgjqg\",\"properties\":{\"issueType\":\"ntns\",\"severity\":\"z\",\"description\":\"mkanbc\",\"suggestedResourceIds\":[\"ofmex\",\"te\",\"as\",\"manydscdkxwdpw\"],\"suggestedAccessRules\":[{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"ahntofelfhpfixos\",\"perimeterGuid\":\"z\",\"location\":\"iv\"},\"resourceAssociation\":{\"name\":\"ybsrwzzmrgtxdh\",\"accessMode\":\"ppinmgikesmkwt\"},\"profile\":{\"name\":\"ragj\",\"accessRulesVersion\":7238716764212333897,\"accessRules\":[{\"name\":\"bkdbtq\",\"properties\":{}},{\"name\":\"mniiqyholh\",\"properties\":{}},{\"name\":\"kb\",\"properties\":{}},{\"name\":\"cnqwlctmw\",\"properties\":{}}],\"diagnosticSettingsVersion\":4501742542532679866,\"enabledLogCategories\":[\"qgvxrktjcjigcw\",\"sp\",\"nbqx\"]}},\"id\":\"evchefp\",\"name\":\"eedyybruholaem\",\"type\":\"cgimmrim\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,16 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkSecurityPerimeterConfigurations() - .list("moiqg", "zpvqewflwzhxzuxe", com.azure.core.util.Context.NONE); + .list("hblivwehsudym", "mbhdo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("qxymxxyfrdjidce", - response.iterator().next().properties().provisioningIssues().get(0).name()); - Assertions.assertEquals("gwfwsldigwouppvy", + Assertions.assertEquals("atmdmn", response.iterator().next().properties().provisioningIssues().get(0).name()); + Assertions.assertEquals("nxoirxy", response.iterator().next().properties().provisioningIssues().get(0).properties().issueType()); - Assertions.assertEquals("qsvclrsnxf", + Assertions.assertEquals("miploisj", response.iterator().next().properties().provisioningIssues().get(0).properties().severity()); - Assertions.assertEquals("p", + Assertions.assertEquals("so", response.iterator().next().properties().provisioningIssues().get(0).properties().description()); - Assertions.assertEquals("clmdmtfxxepzpx", + Assertions.assertEquals("ntwgkvyo", response.iterator() .next() .properties() @@ -51,21 +50,22 @@ public void testList() throws Exception { .properties() .suggestedResourceIds() .get(0)); - Assertions.assertEquals("cj", response.iterator().next().properties().networkSecurityPerimeter().id()); - Assertions.assertEquals("mkirpqn", + Assertions.assertEquals("ahntofelfhpfixos", + response.iterator().next().properties().networkSecurityPerimeter().id()); + Assertions.assertEquals("z", response.iterator().next().properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("udmhkcomeobwk", - response.iterator().next().properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("ltenlbfxlm", response.iterator().next().properties().resourceAssociation().name()); - Assertions.assertEquals("zesndoduomtx", + Assertions.assertEquals("iv", response.iterator().next().properties().networkSecurityPerimeter().location()); + Assertions.assertEquals("ybsrwzzmrgtxdh", response.iterator().next().properties().resourceAssociation().name()); + Assertions.assertEquals("ppinmgikesmkwt", response.iterator().next().properties().resourceAssociation().accessMode()); - Assertions.assertEquals("ixymckik", response.iterator().next().properties().profile().name()); - Assertions.assertEquals(2119087865917649608L, + Assertions.assertEquals("ragj", response.iterator().next().properties().profile().name()); + Assertions.assertEquals(7238716764212333897L, response.iterator().next().properties().profile().accessRulesVersion()); - Assertions.assertEquals("wis", response.iterator().next().properties().profile().accessRules().get(0).name()); - Assertions.assertEquals(112718878748646694L, + Assertions.assertEquals("bkdbtq", + response.iterator().next().properties().profile().accessRules().get(0).name()); + Assertions.assertEquals(4501742542532679866L, response.iterator().next().properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("sddjkkdedesua", + Assertions.assertEquals("qgvxrktjcjigcw", response.iterator().next().properties().profile().enabledLogCategories().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java index 17466661b6f7..7ab894bab037 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java @@ -21,7 +21,7 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileMockTests { @Test public void testReconcile() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"x\",\"properties\":{\"issueType\":\"qququxlph\",\"severity\":\"rxlexoweorocr\",\"description\":\"cgym\",\"suggestedResourceIds\":[\"qpfy\",\"vhtvijvwmrg\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"rpl\",\"properties\":{\"issueType\":\"mbzquu\",\"severity\":\"q\",\"description\":\"btqyzycgcmbkygv\",\"suggestedResourceIds\":[\"qo\",\"xzmdzlybqf\",\"fk\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"ki\",\"properties\":{\"issueType\":\"sevm\",\"severity\":\"gg\",\"description\":\"sryjokvl\",\"suggestedResourceIds\":[\"jsarx\",\"vmf\",\"a\"],\"suggestedAccessRules\":[{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"gfgqpudhgxgiea\",\"perimeterGuid\":\"fpxxav\",\"location\":\"zukgsnuhwyxj\"},\"resourceAssociation\":{\"name\":\"axcebnbeosk\",\"accessMode\":\"qqerwqxpj\"},\"profile\":{\"name\":\"mdfkhttuobr\",\"accessRulesVersion\":4109932572314414436,\"accessRules\":[{\"name\":\"bjkjge\",\"properties\":{}},{\"name\":\"t\",\"properties\":{}},{\"name\":\"bvbmnhtwofxfmhl\",\"properties\":{}},{\"name\":\"nslbqr\",\"properties\":{}}],\"diagnosticSettingsVersion\":7940166137323106740,\"enabledLogCategories\":[\"hj\",\"qqrugwespscvs\",\"spt\"]}},\"id\":\"wozfvza\",\"name\":\"upcvq\",\"type\":\"xcvwioqhc\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"wfczglkvbg\",\"properties\":{\"issueType\":\"svbw\",\"severity\":\"tygnbknh\",\"description\":\"clxaxw\",\"suggestedResourceIds\":[\"asp\",\"dzkucszghdoaqip\",\"nxclfrsbzrnmuv\",\"vp\"],\"suggestedAccessRules\":[{},{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"tb\",\"perimeterGuid\":\"ekjcnginxdvma\",\"location\":\"qxfvgyx\"},\"resourceAssociation\":{\"name\":\"ynofxlttxoq\",\"accessMode\":\"dnzujsj\"},\"profile\":{\"name\":\"rpskcjhmmo\",\"accessRulesVersion\":1008488468196047858,\"accessRules\":[{\"name\":\"tkykpaxnlsfgnys\",\"properties\":{}},{\"name\":\"cptbzetxygxxicee\",\"properties\":{}},{\"name\":\"wyuveoxmp\",\"properties\":{}},{\"name\":\"ahdr\",\"properties\":{}}],\"diagnosticSettingsVersion\":7911690425491207252,\"enabledLogCategories\":[\"xbiv\"]}},\"id\":\"gxmbrygmwibiosiq\",\"name\":\"ykqfdqwdrtx\",\"type\":\"fdaglmrcokzzert\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,25 +31,23 @@ public void testReconcile() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() - .reconcile("mzdctsnlwscrngt", "gxrolw", "plksdksutacucti", com.azure.core.util.Context.NONE); + .reconcile("absqqlon", "z", "ow", com.azure.core.util.Context.NONE); - Assertions.assertEquals("x", response.properties().provisioningIssues().get(0).name()); - Assertions.assertEquals("qququxlph", - response.properties().provisioningIssues().get(0).properties().issueType()); - Assertions.assertEquals("rxlexoweorocr", - response.properties().provisioningIssues().get(0).properties().severity()); - Assertions.assertEquals("cgym", response.properties().provisioningIssues().get(0).properties().description()); - Assertions.assertEquals("qpfy", + Assertions.assertEquals("wfczglkvbg", response.properties().provisioningIssues().get(0).name()); + Assertions.assertEquals("svbw", response.properties().provisioningIssues().get(0).properties().issueType()); + Assertions.assertEquals("tygnbknh", response.properties().provisioningIssues().get(0).properties().severity()); + Assertions.assertEquals("clxaxw", response.properties().provisioningIssues().get(0).properties().description()); + Assertions.assertEquals("asp", response.properties().provisioningIssues().get(0).properties().suggestedResourceIds().get(0)); - Assertions.assertEquals("gfgqpudhgxgiea", response.properties().networkSecurityPerimeter().id()); - Assertions.assertEquals("fpxxav", response.properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("zukgsnuhwyxj", response.properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("axcebnbeosk", response.properties().resourceAssociation().name()); - Assertions.assertEquals("qqerwqxpj", response.properties().resourceAssociation().accessMode()); - Assertions.assertEquals("mdfkhttuobr", response.properties().profile().name()); - Assertions.assertEquals(4109932572314414436L, response.properties().profile().accessRulesVersion()); - Assertions.assertEquals("bjkjge", response.properties().profile().accessRules().get(0).name()); - Assertions.assertEquals(7940166137323106740L, response.properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("hj", response.properties().profile().enabledLogCategories().get(0)); + Assertions.assertEquals("tb", response.properties().networkSecurityPerimeter().id()); + Assertions.assertEquals("ekjcnginxdvma", response.properties().networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("qxfvgyx", response.properties().networkSecurityPerimeter().location()); + Assertions.assertEquals("ynofxlttxoq", response.properties().resourceAssociation().name()); + Assertions.assertEquals("dnzujsj", response.properties().resourceAssociation().accessMode()); + Assertions.assertEquals("rpskcjhmmo", response.properties().profile().name()); + Assertions.assertEquals(1008488468196047858L, response.properties().profile().accessRulesVersion()); + Assertions.assertEquals("tkykpaxnlsfgnys", response.properties().profile().accessRules().get(0).name()); + Assertions.assertEquals(7911690425491207252L, response.properties().profile().diagnosticSettingsVersion()); + Assertions.assertEquals("xbiv", response.properties().profile().enabledLogCategories().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterProfileInfoTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterProfileInfoTests.java index 7b0e5220cc3a..a824614f81bb 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterProfileInfoTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterProfileInfoTests.java @@ -13,21 +13,22 @@ public final class NetworkSecurityPerimeterProfileInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterProfileInfo model = BinaryData.fromString( - "{\"name\":\"mkoisqcssf\",\"accessRulesVersion\":5162262866060166844,\"accessRules\":[{\"name\":\"s\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"qzrdzsylollg\",\"rc\",\"zydmxzjijpvuaurk\"],\"subscriptions\":[{\"id\":\"rldefxrdcox\"}],\"networkSecurityPerimeters\":[{\"id\":\"ja\",\"perimeterGuid\":\"rnnqb\",\"location\":\"bpizxqltgr\"},{\"id\":\"gypxrxvbfihwuhvc\",\"perimeterGuid\":\"fsrb\",\"location\":\"blml\"},{\"id\":\"wxihs\",\"perimeterGuid\":\"xwqagnepzw\",\"location\":\"lsbs\"},{\"id\":\"qqagwwr\",\"perimeterGuid\":\"omzisglrrcz\",\"location\":\"k\"}],\"fullyQualifiedDomainNames\":[\"tnjadhq\"]}}],\"diagnosticSettingsVersion\":3850226317863867705,\"enabledLogCategories\":[\"yueayfbpcmsp\",\"byrrueqth\",\"mg\",\"mbscbbx\"]}") + "{\"name\":\"jrwdkqz\",\"accessRulesVersion\":1926968686358266429,\"accessRules\":[{\"name\":\"iunjxdf\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"cegyamlbnseqacj\",\"vpilg\",\"ooqjagmditgueio\"],\"subscriptions\":[{\"id\":\"sahrtdtpdel\"},{\"id\":\"cslmotoebnfxo\"},{\"id\":\"cjkgdirazftxej\"}],\"networkSecurityPerimeters\":[{\"id\":\"dujtmvcope\",\"perimeterGuid\":\"m\",\"location\":\"rbuhhlky\"},{\"id\":\"tqsrogtuwkff\",\"perimeterGuid\":\"ktsysidfvclglxn\",\"location\":\"ijtk\"},{\"id\":\"sqo\",\"perimeterGuid\":\"fikayiansharujtj\",\"location\":\"xfz\"},{\"id\":\"qttv\",\"perimeterGuid\":\"pqhjpenuygbqeqq\",\"location\":\"ewvnqvcdlgu\"}],\"fullyQualifiedDomainNames\":[\"mfdjwn\",\"axpunjqikczvv\",\"tacgxmfc\"]}},{\"name\":\"er\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"xhlw\",\"tsjgqrsx\"],\"subscriptions\":[{\"id\":\"uuybnchrsz\"},{\"id\":\"oyuelyetn\"},{\"id\":\"bf\"}],\"networkSecurityPerimeters\":[{\"id\":\"agfl\",\"perimeterGuid\":\"gm\",\"location\":\"wahzjmucftbyr\"},{\"id\":\"rohkpigqfusu\",\"perimeterGuid\":\"zmkw\",\"location\":\"snoxaxmqeqa\"}],\"fullyQualifiedDomainNames\":[\"jnhgwydyyn\",\"svkhgbv\",\"ta\",\"arfdlpukhpyrnei\"]}},{\"name\":\"cpeogkhnmgbrou\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"hpfpazjzoywjxhp\"],\"subscriptions\":[{\"id\":\"ntacn\"},{\"id\":\"w\"},{\"id\":\"htuevrhrljy\"}],\"networkSecurityPerimeters\":[{\"id\":\"xh\",\"perimeterGuid\":\"duugwbsre\",\"location\":\"fqkfuarenl\"},{\"id\":\"htkln\",\"perimeterGuid\":\"afvvk\",\"location\":\"edev\"},{\"id\":\"oslc\",\"perimeterGuid\":\"y\",\"location\":\"kkhminqcymczngn\"},{\"id\":\"xxewu\",\"perimeterGuid\":\"nvudbchaqdtvqecr\",\"location\":\"tmxxdtddmflhuy\"}],\"fullyQualifiedDomainNames\":[\"vtzn\"]}},{\"name\":\"xbannovvoxc\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"nwvroevytlyokrr\",\"o\",\"uxvnsasbcrymodi\",\"rxklobdxnazpmk\"],\"subscriptions\":[{\"id\":\"evfxzopjhbzxlioh\"}],\"networkSecurityPerimeters\":[{\"id\":\"tfgxqbawpcb\",\"perimeterGuid\":\"zqcyknap\",\"location\":\"fyuicdh\"}],\"fullyQualifiedDomainNames\":[\"ybww\"]}}],\"diagnosticSettingsVersion\":517845365470569087,\"enabledLogCategories\":[\"idmhmwf\"]}") .toObject(NetworkSecurityPerimeterProfileInfo.class); - Assertions.assertEquals("mkoisqcssf", model.name()); - Assertions.assertEquals(5162262866060166844L, model.accessRulesVersion()); - Assertions.assertEquals("s", model.accessRules().get(0).name()); + Assertions.assertEquals("jrwdkqz", model.name()); + Assertions.assertEquals(1926968686358266429L, model.accessRulesVersion()); + Assertions.assertEquals("iunjxdf", model.accessRules().get(0).name()); Assertions.assertEquals(NspAccessRuleDirection.INBOUND, model.accessRules().get(0).properties().direction()); - Assertions.assertEquals("qzrdzsylollg", model.accessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("rldefxrdcox", model.accessRules().get(0).properties().subscriptions().get(0).id()); - Assertions.assertEquals("ja", model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("rnnqb", + Assertions.assertEquals("cegyamlbnseqacj", model.accessRules().get(0).properties().addressPrefixes().get(0)); + Assertions.assertEquals("sahrtdtpdel", model.accessRules().get(0).properties().subscriptions().get(0).id()); + Assertions.assertEquals("dujtmvcope", + model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).id()); + Assertions.assertEquals("m", model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("bpizxqltgr", + Assertions.assertEquals("rbuhhlky", model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("tnjadhq", model.accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals(3850226317863867705L, model.diagnosticSettingsVersion()); - Assertions.assertEquals("yueayfbpcmsp", model.enabledLogCategories().get(0)); + Assertions.assertEquals("mfdjwn", model.accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals(517845365470569087L, model.diagnosticSettingsVersion()); + Assertions.assertEquals("idmhmwf", model.enabledLogCategories().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterTests.java index ca070ce6fb6d..6f60b6d5306f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NetworkSecurityPerimeterTests.java @@ -12,10 +12,10 @@ public final class NetworkSecurityPerimeterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeter model - = BinaryData.fromString("{\"id\":\"cyl\",\"perimeterGuid\":\"gmnsghpxy\",\"location\":\"hdrwjjkh\"}") + = BinaryData.fromString("{\"id\":\"ucoig\",\"perimeterGuid\":\"xncnwfe\",\"location\":\"nwgfmxjgcgbjbgd\"}") .toObject(NetworkSecurityPerimeter.class); - Assertions.assertEquals("cyl", model.id()); - Assertions.assertEquals("gmnsghpxy", model.perimeterGuid()); - Assertions.assertEquals("hdrwjjkh", model.location()); + Assertions.assertEquals("ucoig", model.id()); + Assertions.assertEquals("xncnwfe", model.perimeterGuid()); + Assertions.assertEquals("nwgfmxjgcgbjbgd", model.location()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NoneAuthTypeConnectionPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NoneAuthTypeConnectionPropertiesTests.java index b0c440e9c2cd..90f319b102d9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NoneAuthTypeConnectionPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/NoneAuthTypeConnectionPropertiesTests.java @@ -19,44 +19,44 @@ public final class NoneAuthTypeConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NoneAuthTypeConnectionProperties model = BinaryData.fromString( - "{\"authType\":\"None\",\"category\":\"Greenplum\",\"createdByWorkspaceArmId\":\"bbaedorvvm\",\"error\":\"loyg\",\"expiryTime\":\"2021-09-06T23:54:43Z\",\"group\":\"Database\",\"isSharedToAll\":true,\"metadata\":{\"saq\":\"gdhpabgdexjddv\",\"lcol\":\"otmmw\",\"xcgjokjljnhvlq\":\"rsxaptefh\"},\"peRequirement\":\"Required\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"ksnbksdqhjv\",\"klxesl\",\"hhus\",\"cpoq\"],\"target\":\"vnwqjwgo\",\"useWorkspaceManagedIdentity\":false}") + "{\"authType\":\"None\",\"category\":\"AzureOpenAI\",\"createdByWorkspaceArmId\":\"igeleohd\",\"error\":\"qvwzkjopwbeonrl\",\"expiryTime\":\"2021-11-02T12:37:58Z\",\"group\":\"File\",\"isSharedToAll\":false,\"metadata\":{\"seqchkrt\":\"eakxcptsoqfyi\",\"uem\":\"zrazisgyk\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"hmnr\"],\"target\":\"bsojk\",\"useWorkspaceManagedIdentity\":true}") .toObject(NoneAuthTypeConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.GREENPLUM, model.category()); - Assertions.assertEquals("loyg", model.error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T23:54:43Z"), model.expiryTime()); - Assertions.assertTrue(model.isSharedToAll()); - Assertions.assertEquals("gdhpabgdexjddv", model.metadata().get("saq")); - Assertions.assertEquals(ManagedPERequirement.REQUIRED, model.peRequirement()); - Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.peStatus()); - Assertions.assertEquals("ksnbksdqhjv", model.sharedUserList().get(0)); - Assertions.assertEquals("vnwqjwgo", model.target()); - Assertions.assertFalse(model.useWorkspaceManagedIdentity()); + Assertions.assertEquals(ConnectionCategory.AZURE_OPEN_AI, model.category()); + Assertions.assertEquals("qvwzkjopwbeonrl", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-02T12:37:58Z"), model.expiryTime()); + Assertions.assertFalse(model.isSharedToAll()); + Assertions.assertEquals("eakxcptsoqfyi", model.metadata().get("seqchkrt")); + Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.peStatus()); + Assertions.assertEquals("hmnr", model.sharedUserList().get(0)); + Assertions.assertEquals("bsojk", model.target()); + Assertions.assertTrue(model.useWorkspaceManagedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NoneAuthTypeConnectionProperties model - = new NoneAuthTypeConnectionProperties().withCategory(ConnectionCategory.GREENPLUM) - .withError("loyg") - .withExpiryTime(OffsetDateTime.parse("2021-09-06T23:54:43Z")) - .withIsSharedToAll(true) - .withMetadata(mapOf("saq", "gdhpabgdexjddv", "lcol", "otmmw", "xcgjokjljnhvlq", "rsxaptefh")) - .withPeRequirement(ManagedPERequirement.REQUIRED) - .withPeStatus(ManagedPEStatus.NOT_APPLICABLE) - .withSharedUserList(Arrays.asList("ksnbksdqhjv", "klxesl", "hhus", "cpoq")) - .withTarget("vnwqjwgo") - .withUseWorkspaceManagedIdentity(false); + = new NoneAuthTypeConnectionProperties().withCategory(ConnectionCategory.AZURE_OPEN_AI) + .withError("qvwzkjopwbeonrl") + .withExpiryTime(OffsetDateTime.parse("2021-11-02T12:37:58Z")) + .withIsSharedToAll(false) + .withMetadata(mapOf("seqchkrt", "eakxcptsoqfyi", "uem", "zrazisgyk")) + .withPeRequirement(ManagedPERequirement.NOT_APPLICABLE) + .withPeStatus(ManagedPEStatus.INACTIVE) + .withSharedUserList(Arrays.asList("hmnr")) + .withTarget("bsojk") + .withUseWorkspaceManagedIdentity(true); model = BinaryData.fromObject(model).toObject(NoneAuthTypeConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.GREENPLUM, model.category()); - Assertions.assertEquals("loyg", model.error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T23:54:43Z"), model.expiryTime()); - Assertions.assertTrue(model.isSharedToAll()); - Assertions.assertEquals("gdhpabgdexjddv", model.metadata().get("saq")); - Assertions.assertEquals(ManagedPERequirement.REQUIRED, model.peRequirement()); - Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.peStatus()); - Assertions.assertEquals("ksnbksdqhjv", model.sharedUserList().get(0)); - Assertions.assertEquals("vnwqjwgo", model.target()); - Assertions.assertFalse(model.useWorkspaceManagedIdentity()); + Assertions.assertEquals(ConnectionCategory.AZURE_OPEN_AI, model.category()); + Assertions.assertEquals("qvwzkjopwbeonrl", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-02T12:37:58Z"), model.expiryTime()); + Assertions.assertFalse(model.isSharedToAll()); + Assertions.assertEquals("eakxcptsoqfyi", model.metadata().get("seqchkrt")); + Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.peStatus()); + Assertions.assertEquals("hmnr", model.sharedUserList().get(0)); + Assertions.assertEquals("bsojk", model.target()); + Assertions.assertTrue(model.useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListMockTests.java index b175aaa7811c..3c1bc6f7a6cc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"wgsghqucumldd\",\"isDataAction\":false,\"display\":{\"provider\":\"lfeothxuarigr\",\"resource\":\"ljlkqhvk\",\"operation\":\"zkuastaxklp\",\"description\":\"ulhgltoiz\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"hmwdmdlgyqixokw\",\"isDataAction\":false,\"display\":{\"provider\":\"vagnqfqqdlcvmyo\",\"resource\":\"aymjchtvsnvlaq\",\"operation\":\"z\",\"description\":\"awatuwqkokbczo\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleBasicResourceInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleBasicResourceInnerTests.java index 272b2257e324..4b08d1059d5c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleBasicResourceInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleBasicResourceInnerTests.java @@ -15,18 +15,18 @@ public final class OutboundRuleBasicResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutboundRuleBasicResourceInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Failed\",\"errorInformation\":\"aabmdlqjb\",\"parentRuleNames\":[\"f\",\"xlhupmomihzbdnp\",\"pkcdpreyxely\"]},\"id\":\"ghflrufssjyghsf\",\"name\":\"rkbhammgmqfm\",\"type\":\"fgvqcpdw\"}") + "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Provisioning\",\"errorInformation\":\"tedousnktjtgrava\",\"parentRuleNames\":[\"fkbebauzl\",\"btxxwpfhnjzud\",\"tpzkgmeboywhcz\",\"qrhm\"]},\"id\":\"qbedygisrzwn\",\"name\":\"kdidjc\",\"type\":\"lrmpwctofldse\"}") .toObject(OutboundRuleBasicResourceInner.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.properties().category()); - Assertions.assertEquals(RuleStatus.FAILED, model.properties().status()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.properties().category()); + Assertions.assertEquals(RuleStatus.PROVISIONING, model.properties().status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OutboundRuleBasicResourceInner model = new OutboundRuleBasicResourceInner() - .withProperties(new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.FAILED)); + OutboundRuleBasicResourceInner model = new OutboundRuleBasicResourceInner().withProperties( + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.PROVISIONING)); model = BinaryData.fromObject(model).toObject(OutboundRuleBasicResourceInner.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.properties().category()); - Assertions.assertEquals(RuleStatus.FAILED, model.properties().status()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.properties().category()); + Assertions.assertEquals(RuleStatus.PROVISIONING, model.properties().status()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleListResultTests.java index 7b42ab79e2f4..924f23b0946a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleListResultTests.java @@ -14,10 +14,10 @@ public final class OutboundRuleListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutboundRuleListResult model = BinaryData.fromString( - "{\"nextLink\":\"nbpvzlq\",\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Failed\",\"errorInformation\":\"ckhmocgjshgouarh\",\"parentRuleNames\":[\"xqqggljky\"]},\"id\":\"jrclrvtzq\",\"name\":\"rbctbhpjhxpcvrd\",\"type\":\"y\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Provisioning\",\"errorInformation\":\"qady\",\"parentRuleNames\":[\"ahwriuomzczfk\",\"ceevsa\",\"xwspcaxikhfjq\",\"bglcxkxgzzromvy\"]},\"id\":\"sem\",\"name\":\"mesrfsvpi\",\"type\":\"kzpatqtdi\"}]}") + "{\"nextLink\":\"umljcirvpef\",\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Provisioning\",\"errorInformation\":\"tjnsx\",\"parentRuleNames\":[\"lnsjhw\",\"uyx\"]},\"id\":\"xqvmvuay\",\"name\":\"uadx\",\"type\":\"xeqbwp\"}]}") .toObject(OutboundRuleListResult.class); - Assertions.assertEquals("nbpvzlq", model.nextLink()); + Assertions.assertEquals("umljcirvpef", model.nextLink()); Assertions.assertEquals(RuleCategory.REQUIRED, model.value().get(0).properties().category()); - Assertions.assertEquals(RuleStatus.FAILED, model.value().get(0).properties().status()); + Assertions.assertEquals(RuleStatus.PROVISIONING, model.value().get(0).properties().status()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleTests.java index 43acb66030a6..83d7cf4f58bb 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRuleTests.java @@ -14,17 +14,18 @@ public final class OutboundRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutboundRule model = BinaryData.fromString( - "{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Deleting\",\"errorInformation\":\"eysl\",\"parentRuleNames\":[\"kdcdjhunhgh\",\"gawnrrnquo\",\"sotirei\"]}") + "{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Provisioning\",\"errorInformation\":\"xkbrfg\",\"parentRuleNames\":[\"jiye\",\"hfjsrwqrxetf\",\"cwv\",\"r\"]}") .toObject(OutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); - Assertions.assertEquals(RuleStatus.DELETING, model.status()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.category()); + Assertions.assertEquals(RuleStatus.PROVISIONING, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OutboundRule model = new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.DELETING); + OutboundRule model + = new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.PROVISIONING); model = BinaryData.fromObject(model).toObject(OutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); - Assertions.assertEquals(RuleStatus.DELETING, model.status()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.category()); + Assertions.assertEquals(RuleStatus.PROVISIONING, model.status()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesCreateOrUpdateMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesCreateOrUpdateMockTests.java index 7e8e9a0cc29d..354172d768c2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesCreateOrUpdateMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesCreateOrUpdateMockTests.java @@ -24,7 +24,7 @@ public final class OutboundRulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\",\"errorInformation\":\"qrjylwq\",\"parentRuleNames\":[\"mjhhxls\"]},\"id\":\"ehztbejrdzwy\",\"name\":\"tdpfz\",\"type\":\"ufifnjwjh\"}"; + = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Deleting\",\"errorInformation\":\"thlokmxwawfu\",\"parentRuleNames\":[\"gejjxum\",\"wynjmoozm\",\"uktdrsjtmnkxjouw\",\"zcfdtstiaxtyrnu\"]},\"id\":\"fhepis\",\"name\":\"bcmlroiommems\",\"type\":\"q\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,12 +34,12 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); OutboundRuleBasicResource response = manager.outboundRules() - .define("puexyigxzty") - .withExistingManagedNetwork("ufsdbkuxkdiu", "gsivxwkscwbsh", "ihvlmsceylau") - .withProperties(new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.DELETING)) + .define("exnguwnrdpuz") + .withExistingManagedNetwork("xaqjyihjcwwvaos", "kfavhkhpsp", "weifdyfa") + .withProperties(new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE)) .create(); - Assertions.assertEquals(RuleCategory.DEPENDENCY, response.properties().category()); - Assertions.assertEquals(RuleStatus.ACTIVE, response.properties().status()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, response.properties().category()); + Assertions.assertEquals(RuleStatus.DELETING, response.properties().status()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesGetWithResponseMockTests.java index 7a702ec2a74d..f5bfd8b02d54 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesGetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class OutboundRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Deleting\",\"errorInformation\":\"qaymqmyrnzgubqkf\",\"parentRuleNames\":[\"hvoyjdgfkrqsjrv\"]},\"id\":\"kxrdeex\",\"name\":\"ej\",\"type\":\"gu\"}"; + = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\",\"errorInformation\":\"lqliiqeanuwgjnof\",\"parentRuleNames\":[\"y\",\"gseb\"]},\"id\":\"y\",\"name\":\"tevaebzm\",\"type\":\"ywhr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); OutboundRuleBasicResource response = manager.outboundRules() - .getWithResponse("xtutpdwneec", "ytlxugjr", "vnffaofkvfruxz", "fbvhgykzov", - com.azure.core.util.Context.NONE) + .getWithResponse("xbvxgx", "q", "asfeooq", "tpvev", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(RuleCategory.REQUIRED, response.properties().category()); - Assertions.assertEquals(RuleStatus.DELETING, response.properties().status()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, response.properties().category()); + Assertions.assertEquals(RuleStatus.INACTIVE, response.properties().status()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesListMockTests.java index 60dd7dbed52a..8487cd97aab1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/OutboundRulesListMockTests.java @@ -24,7 +24,7 @@ public final class OutboundRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Failed\",\"errorInformation\":\"dr\",\"parentRuleNames\":[\"hsxw\",\"xrz\",\"dacrq\"]},\"id\":\"k\",\"name\":\"gqysyaj\",\"type\":\"mczupdcbg\"}]}"; + = "{\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Deleting\",\"errorInformation\":\"tenfdvdoearywusr\",\"parentRuleNames\":[\"dt\",\"syfezfsmyljd\",\"yyrwnmwtqi\"]},\"id\":\"knnkyn\",\"name\":\"s\",\"type\":\"dtfwhjfph\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,10 +33,10 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.outboundRules() - .list("nxbohpzurn", "oytkbeadyfenro", "oijoxcbpkiwse", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.outboundRules().list("k", "jvaedogz", "ugxbxxgjogcph", com.azure.core.util.Context.NONE); - Assertions.assertEquals(RuleCategory.USER_DEFINED, response.iterator().next().properties().category()); - Assertions.assertEquals(RuleStatus.FAILED, response.iterator().next().properties().status()); + Assertions.assertEquals(RuleCategory.DEPENDENCY, response.iterator().next().properties().category()); + Assertions.assertEquals(RuleStatus.DELETING, response.iterator().next().properties().status()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceSkuTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceSkuTests.java index 466389c2ace7..e41862d4bd43 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceSkuTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceSkuTests.java @@ -14,27 +14,27 @@ public final class PatchResourceSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PatchResourceSku model = BinaryData.fromString( - "{\"sku\":{\"name\":\"unlcpxxv\",\"tier\":\"Basic\",\"size\":\"yngjgvrquvpygglp\",\"family\":\"rdcueljtiahx\",\"capacity\":254125103}}") + "{\"sku\":{\"name\":\"nmdvha\",\"tier\":\"Standard\",\"size\":\"ytiq\",\"family\":\"bqerzwx\",\"capacity\":959013845}}") .toObject(PatchResourceSku.class); - Assertions.assertEquals("unlcpxxv", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("yngjgvrquvpygglp", model.sku().size()); - Assertions.assertEquals("rdcueljtiahx", model.sku().family()); - Assertions.assertEquals(254125103, model.sku().capacity()); + Assertions.assertEquals("nmdvha", model.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); + Assertions.assertEquals("ytiq", model.sku().size()); + Assertions.assertEquals("bqerzwx", model.sku().family()); + Assertions.assertEquals(959013845, model.sku().capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PatchResourceSku model = new PatchResourceSku().withSku(new Sku().withName("unlcpxxv") - .withTier(SkuTier.BASIC) - .withSize("yngjgvrquvpygglp") - .withFamily("rdcueljtiahx") - .withCapacity(254125103)); + PatchResourceSku model = new PatchResourceSku().withSku(new Sku().withName("nmdvha") + .withTier(SkuTier.STANDARD) + .withSize("ytiq") + .withFamily("bqerzwx") + .withCapacity(959013845)); model = BinaryData.fromObject(model).toObject(PatchResourceSku.class); - Assertions.assertEquals("unlcpxxv", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("yngjgvrquvpygglp", model.sku().size()); - Assertions.assertEquals("rdcueljtiahx", model.sku().family()); - Assertions.assertEquals(254125103, model.sku().capacity()); + Assertions.assertEquals("nmdvha", model.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); + Assertions.assertEquals("ytiq", model.sku().size()); + Assertions.assertEquals("bqerzwx", model.sku().family()); + Assertions.assertEquals(959013845, model.sku().capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceTagsAndSkuTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceTagsAndSkuTests.java index 9e949dbcf827..c37aa14c6013 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceTagsAndSkuTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceTagsAndSkuTests.java @@ -16,32 +16,32 @@ public final class PatchResourceTagsAndSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PatchResourceTagsAndSku model = BinaryData.fromString( - "{\"sku\":{\"name\":\"lsa\",\"tier\":\"Basic\",\"size\":\"fsynljphuop\",\"family\":\"dlqiyntorzih\",\"capacity\":1679809360},\"tags\":{\"yzrpzbchckqqzq\":\"swsrms\",\"ysuiizynkedya\":\"ox\",\"pyy\":\"rwyhqmibzyhwitsm\"}}") + "{\"sku\":{\"name\":\"ipfpubji\",\"tier\":\"Standard\",\"size\":\"f\",\"family\":\"hqkvpuvksgplsak\",\"capacity\":34213968},\"tags\":{\"ph\":\"ynl\",\"odlqiyntor\":\"op\",\"swsrms\":\"ihleos\",\"ox\":\"yzrpzbchckqqzq\"}}") .toObject(PatchResourceTagsAndSku.class); - Assertions.assertEquals("swsrms", model.tags().get("yzrpzbchckqqzq")); - Assertions.assertEquals("lsa", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("fsynljphuop", model.sku().size()); - Assertions.assertEquals("dlqiyntorzih", model.sku().family()); - Assertions.assertEquals(1679809360, model.sku().capacity()); + Assertions.assertEquals("ynl", model.tags().get("ph")); + Assertions.assertEquals("ipfpubji", model.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); + Assertions.assertEquals("f", model.sku().size()); + Assertions.assertEquals("hqkvpuvksgplsak", model.sku().family()); + Assertions.assertEquals(34213968, model.sku().capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PatchResourceTagsAndSku model = new PatchResourceTagsAndSku() - .withTags(mapOf("yzrpzbchckqqzq", "swsrms", "ysuiizynkedya", "ox", "pyy", "rwyhqmibzyhwitsm")) - .withSku(new Sku().withName("lsa") - .withTier(SkuTier.BASIC) - .withSize("fsynljphuop") - .withFamily("dlqiyntorzih") - .withCapacity(1679809360)); + .withTags(mapOf("ph", "ynl", "odlqiyntor", "op", "swsrms", "ihleos", "ox", "yzrpzbchckqqzq")) + .withSku(new Sku().withName("ipfpubji") + .withTier(SkuTier.STANDARD) + .withSize("f") + .withFamily("hqkvpuvksgplsak") + .withCapacity(34213968)); model = BinaryData.fromObject(model).toObject(PatchResourceTagsAndSku.class); - Assertions.assertEquals("swsrms", model.tags().get("yzrpzbchckqqzq")); - Assertions.assertEquals("lsa", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("fsynljphuop", model.sku().size()); - Assertions.assertEquals("dlqiyntorzih", model.sku().family()); - Assertions.assertEquals(1679809360, model.sku().capacity()); + Assertions.assertEquals("ynl", model.tags().get("ph")); + Assertions.assertEquals("ipfpubji", model.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); + Assertions.assertEquals("f", model.sku().size()); + Assertions.assertEquals("hqkvpuvksgplsak", model.sku().family()); + Assertions.assertEquals(34213968, model.sku().capacity()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceTagsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceTagsTests.java index 58b7b484c3b0..3db7bb5693bc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceTagsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PatchResourceTagsTests.java @@ -13,16 +13,18 @@ public final class PatchResourceTagsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PatchResourceTags model - = BinaryData.fromString("{\"tags\":{\"nmabik\":\"dpumnzgmw\"}}").toObject(PatchResourceTags.class); - Assertions.assertEquals("dpumnzgmw", model.tags().get("nmabik")); + PatchResourceTags model = BinaryData.fromString( + "{\"tags\":{\"yatrwy\":\"uiizynke\",\"ibzyhwitsmyp\":\"q\",\"biknsorgjhxbld\":\"ynpcdpumnzgmwznm\",\"dmtnc\":\"lwwrl\"}}") + .toObject(PatchResourceTags.class); + Assertions.assertEquals("uiizynke", model.tags().get("yatrwy")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PatchResourceTags model = new PatchResourceTags().withTags(mapOf("nmabik", "dpumnzgmw")); + PatchResourceTags model = new PatchResourceTags().withTags( + mapOf("yatrwy", "uiizynke", "ibzyhwitsmyp", "q", "biknsorgjhxbld", "ynpcdpumnzgmwznm", "dmtnc", "lwwrl")); model = BinaryData.fromObject(model).toObject(PatchResourceTags.class); - Assertions.assertEquals("dpumnzgmw", model.tags().get("nmabik")); + Assertions.assertEquals("uiizynke", model.tags().get("yatrwy")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PolicyAssignmentEvaluationDetailsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PolicyAssignmentEvaluationDetailsTests.java index 97ca2f638af9..05887341ef6c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PolicyAssignmentEvaluationDetailsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PolicyAssignmentEvaluationDetailsTests.java @@ -13,19 +13,19 @@ public final class PolicyAssignmentEvaluationDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PolicyAssignmentEvaluationDetails model = BinaryData.fromString( - "{\"assignmentId\":\"wmbesldnkw\",\"policyDefinitionId\":\"pp\",\"policySetDefinitionId\":\"lcxog\",\"evaluationOutcome\":\"Compliant\",\"nonComplianceReason\":\"nzmnsikvm\",\"effect\":\"ze\",\"expressionEvaluations\":[{\"expression\":\"l\",\"expressionKind\":\"zxmhhvhgu\",\"operator\":\"odkwobd\",\"result\":\"xtibqdxbxwakbog\",\"targetValue\":\"ndlkzgxhurip\",\"expressionValue\":\"podxunkb\"},{\"expression\":\"xmubyyntwlrbq\",\"expressionKind\":\"oievseotgqrlltm\",\"operator\":\"lauwzizxbmpgcjef\",\"result\":\"muvp\",\"targetValue\":\"tdum\",\"expressionValue\":\"p\"},{\"expression\":\"ebmnzbtbhjpglk\",\"expressionKind\":\"ohdneuel\",\"operator\":\"hsd\",\"result\":\"t\",\"targetValue\":\"fikdowwqu\",\"expressionValue\":\"xzxcl\"},{\"expression\":\"thhqzonosggbh\",\"expressionKind\":\"hfwdsjnkaljutiis\",\"operator\":\"cffgdkzzewk\",\"result\":\"hqcrailvpnpp\",\"targetValue\":\"flrwd\",\"expressionValue\":\"dlxyjrxs\"}]}") + "{\"assignmentId\":\"zjf\",\"policyDefinitionId\":\"vjfdx\",\"policySetDefinitionId\":\"vetvt\",\"evaluationOutcome\":\"Error\",\"nonComplianceReason\":\"tdo\",\"effect\":\"cbxvwvxyslqbh\",\"expressionEvaluations\":[{\"expression\":\"blytk\",\"expressionKind\":\"mpew\",\"operator\":\"fbkrvrnsvs\",\"result\":\"johxcrsb\",\"targetValue\":\"vasrruvwb\",\"expressionValue\":\"qfsubcgjbirx\"},{\"expression\":\"ybsrfbjfdtwss\",\"expressionKind\":\"ftpvjzbexil\",\"operator\":\"nfqqnvwp\",\"result\":\"taruoujmkcj\",\"targetValue\":\"qytjrybnwjewgd\",\"expressionValue\":\"ervnaenqpehi\"},{\"expression\":\"oygmift\",\"expressionKind\":\"zdnds\",\"operator\":\"nayqi\",\"result\":\"nduhavhqlkthum\",\"targetValue\":\"olbgycduiertgccy\",\"expressionValue\":\"aolps\"}]}") .toObject(PolicyAssignmentEvaluationDetails.class); - Assertions.assertEquals("wmbesldnkw", model.assignmentId()); - Assertions.assertEquals("pp", model.policyDefinitionId()); - Assertions.assertEquals("lcxog", model.policySetDefinitionId()); - Assertions.assertEquals(PolicyEvaluationOutcome.COMPLIANT, model.evaluationOutcome()); - Assertions.assertEquals("nzmnsikvm", model.nonComplianceReason()); - Assertions.assertEquals("ze", model.effect()); - Assertions.assertEquals("l", model.expressionEvaluations().get(0).expression()); - Assertions.assertEquals("zxmhhvhgu", model.expressionEvaluations().get(0).expressionKind()); - Assertions.assertEquals("odkwobd", model.expressionEvaluations().get(0).operator()); - Assertions.assertEquals("xtibqdxbxwakbog", model.expressionEvaluations().get(0).result()); - Assertions.assertEquals("ndlkzgxhurip", model.expressionEvaluations().get(0).targetValue()); - Assertions.assertEquals("podxunkb", model.expressionEvaluations().get(0).expressionValue()); + Assertions.assertEquals("zjf", model.assignmentId()); + Assertions.assertEquals("vjfdx", model.policyDefinitionId()); + Assertions.assertEquals("vetvt", model.policySetDefinitionId()); + Assertions.assertEquals(PolicyEvaluationOutcome.ERROR, model.evaluationOutcome()); + Assertions.assertEquals("tdo", model.nonComplianceReason()); + Assertions.assertEquals("cbxvwvxyslqbh", model.effect()); + Assertions.assertEquals("blytk", model.expressionEvaluations().get(0).expression()); + Assertions.assertEquals("mpew", model.expressionEvaluations().get(0).expressionKind()); + Assertions.assertEquals("fbkrvrnsvs", model.expressionEvaluations().get(0).operator()); + Assertions.assertEquals("johxcrsb", model.expressionEvaluations().get(0).result()); + Assertions.assertEquals("vasrruvwb", model.expressionEvaluations().get(0).targetValue()); + Assertions.assertEquals("qfsubcgjbirx", model.expressionEvaluations().get(0).expressionValue()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PolicyExpressionEvaluationDetailsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PolicyExpressionEvaluationDetailsTests.java index 45726a7289a9..0bd3396e83f9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PolicyExpressionEvaluationDetailsTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PolicyExpressionEvaluationDetailsTests.java @@ -12,13 +12,13 @@ public final class PolicyExpressionEvaluationDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PolicyExpressionEvaluationDetails model = BinaryData.fromString( - "{\"expression\":\"afcnih\",\"expressionKind\":\"qapnedgfbcv\",\"operator\":\"vq\",\"result\":\"keqdcvdrhvoods\",\"targetValue\":\"bobzdopcjwvnhd\",\"expressionValue\":\"wmgxcxrsl\"}") + "{\"expression\":\"qlfmmdnbb\",\"expressionKind\":\"zpswiydmc\",\"operator\":\"hzdxssadbzm\",\"result\":\"dfznudaodv\",\"targetValue\":\"bncblylpstdbhhx\",\"expressionValue\":\"zdzucerscdntnevf\"}") .toObject(PolicyExpressionEvaluationDetails.class); - Assertions.assertEquals("afcnih", model.expression()); - Assertions.assertEquals("qapnedgfbcv", model.expressionKind()); - Assertions.assertEquals("vq", model.operator()); - Assertions.assertEquals("keqdcvdrhvoods", model.result()); - Assertions.assertEquals("bobzdopcjwvnhd", model.targetValue()); - Assertions.assertEquals("wmgxcxrsl", model.expressionValue()); + Assertions.assertEquals("qlfmmdnbb", model.expression()); + Assertions.assertEquals("zpswiydmc", model.expressionKind()); + Assertions.assertEquals("hzdxssadbzm", model.operator()); + Assertions.assertEquals("dfznudaodv", model.result()); + Assertions.assertEquals("bncblylpstdbhhx", model.targetValue()); + Assertions.assertEquals("zdzucerscdntnevf", model.expressionValue()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PoolTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PoolTests.java index 0580f63c830e..f82bab491a1b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PoolTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PoolTests.java @@ -12,23 +12,25 @@ public final class PoolTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Pool model = BinaryData - .fromString("{\"name\":\"n\",\"vmPriority\":\"Spot\",\"instanceType\":\"ff\",\"nodeCount\":39369666}") + Pool model = BinaryData.fromString( + "{\"name\":\"l\",\"vmPriority\":\"Regular\",\"instanceType\":\"qkfrbzgowoxqmj\",\"nodeCount\":642254793}") .toObject(Pool.class); - Assertions.assertEquals("n", model.name()); - Assertions.assertEquals(VmPriority.SPOT, model.vmPriority()); - Assertions.assertEquals("ff", model.instanceType()); - Assertions.assertEquals(39369666, model.nodeCount()); + Assertions.assertEquals("l", model.name()); + Assertions.assertEquals(VmPriority.REGULAR, model.vmPriority()); + Assertions.assertEquals("qkfrbzgowoxqmj", model.instanceType()); + Assertions.assertEquals(642254793, model.nodeCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Pool model - = new Pool().withName("n").withVmPriority(VmPriority.SPOT).withInstanceType("ff").withNodeCount(39369666); + Pool model = new Pool().withName("l") + .withVmPriority(VmPriority.REGULAR) + .withInstanceType("qkfrbzgowoxqmj") + .withNodeCount(642254793); model = BinaryData.fromObject(model).toObject(Pool.class); - Assertions.assertEquals("n", model.name()); - Assertions.assertEquals(VmPriority.SPOT, model.vmPriority()); - Assertions.assertEquals("ff", model.instanceType()); - Assertions.assertEquals(39369666, model.nodeCount()); + Assertions.assertEquals("l", model.name()); + Assertions.assertEquals(VmPriority.REGULAR, model.vmPriority()); + Assertions.assertEquals("qkfrbzgowoxqmj", model.instanceType()); + Assertions.assertEquals(642254793, model.nodeCount()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionListResultInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionListResultInnerTests.java index 0c8d210cfd00..939c7bdafe44 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionListResultInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionListResultInnerTests.java @@ -13,15 +13,15 @@ public final class PrivateEndpointConnectionListResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionListResultInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"oegrpkhjwn\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"luicpdggkzzlvmbm\",\"actionsRequired\":\"xmodf\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"wsbpfvm\"]},\"etag\":\"hrfou\",\"location\":\"taakc\",\"id\":\"iyzvqtmnub\",\"name\":\"xkp\",\"type\":\"ksmond\"}]}") + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"tdss\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"mweriofzpy\",\"actionsRequired\":\"emwabnet\"},\"provisioningState\":\"Failed\",\"groupIds\":[\"h\",\"d\",\"lvwiwubmwmbesl\"]},\"etag\":\"k\",\"location\":\"tppjflcx\",\"id\":\"aokonzmnsik\",\"name\":\"mkqzeqqkdltfzxmh\",\"type\":\"v\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"eodkwobda\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"bqdxbx\",\"actionsRequired\":\"kbogqxndlkzgx\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"lbpodxunk\",\"ebxmubyynt\",\"lrb\"]},\"etag\":\"koievseo\",\"location\":\"q\",\"id\":\"ltmuwlauwzizx\",\"name\":\"mpgcjefuzmuvpbt\",\"type\":\"d\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"p\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"mnzb\",\"actionsRequired\":\"hjpglkf\"},\"provisioningState\":\"Deleting\",\"groupIds\":[\"euel\",\"phsdyhto\",\"fikdowwqu\",\"v\"]},\"etag\":\"xclvit\",\"location\":\"qzonosggbhcohf\",\"id\":\"sjnkal\",\"name\":\"utiiswacf\",\"type\":\"gdkz\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"fvhqc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"vpnpp\",\"actionsRequired\":\"flrwd\"},\"provisioningState\":\"Creating\",\"groupIds\":[\"yjrxsagafcnih\",\"wqapnedgfbcvk\",\"vq\",\"pkeqdcvdrhvoo\"]},\"etag\":\"otbobzdopcj\",\"location\":\"nhdldwmgxcx\",\"id\":\"lpmutwuoegrpkhj\",\"name\":\"niyqslui\",\"type\":\"pdggkzzlvm\"}]}") .toObject(PrivateEndpointConnectionListResultInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.value().get(0).properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("luicpdggkzzlvmbm", + Assertions.assertEquals("mweriofzpy", model.value().get(0).properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("xmodf", + Assertions.assertEquals("emwabnet", model.value().get(0).properties().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("wsbpfvm", model.value().get(0).properties().groupIds().get(0)); - Assertions.assertEquals("taakc", model.value().get(0).location()); + Assertions.assertEquals("h", model.value().get(0).properties().groupIds().get(0)); + Assertions.assertEquals("tppjflcx", model.value().get(0).location()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java index a34aa5165721..423cc8e95c04 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java @@ -26,7 +26,7 @@ public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"kfyaqandmymnq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"movsfbpbvz\",\"actionsRequired\":\"axmfmvsmcwoxfa\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"i\"]},\"etag\":\"satroia\",\"location\":\"sugmocpcjyc\",\"id\":\"elrgttwfldsiuo\",\"name\":\"ini\",\"type\":\"cedpksriwmmtmqrx\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"ygeqzusito\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"fsgbjmlreesrf\",\"actionsRequired\":\"szvlcwlisolntfx\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"ipfjwfoygizmshx\",\"baizabulnvgskjto\"]},\"etag\":\"dzjs\",\"location\":\"nvhxqqmqip\",\"id\":\"dhfnzocxmtfshksn\",\"name\":\"zmspamwbwm\",\"type\":\"nlslcef\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,23 +37,24 @@ public void testCreateOrUpdate() throws Exception { PrivateEndpointConnection response = manager.privateEndpointConnections() - .define("wdcsk") - .withExistingAccount("qjfshtujcyo", "igi") - .withRegion("rimm") + .define("g") + .withExistingAccount("ntsxjmfmeftvh", "moogjrhskbwgm") + .withRegion("dr") .withProperties(new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("zayspzvriet") - .withActionsRequired("phmdzxplgtp")) - .withGroupIds(Arrays.asList("lzmgschnzrs", "kkzovlzdm"))) + .withDescription("dzxcouzfwo") + .withActionsRequired("akuk")) + .withGroupIds(Arrays.asList("xsoednlw", "li"))) .create(); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("movsfbpbvz", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("axmfmvsmcwoxfa", + Assertions.assertEquals("fsgbjmlreesrf", + response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("szvlcwlisolntfx", response.properties().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("i", response.properties().groupIds().get(0)); - Assertions.assertEquals("sugmocpcjyc", response.location()); + Assertions.assertEquals("ipfjwfoygizmshx", response.properties().groupIds().get(0)); + Assertions.assertEquals("nvhxqqmqip", response.location()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteMockTests.java index 80572d2d1396..6d2d2d914ad4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteMockTests.java @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.privateEndpointConnections() - .delete("uxxrwzobuzms", "g", "mtdtkwppthuzd", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections().delete("fetwi", "y", "zox", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index c0c12dd5c0fa..28a9b749330d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"kderf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ikwepwogggicw\",\"actionsRequired\":\"htfmcqbsudzpgc\"},\"provisioningState\":\"Creating\",\"groupIds\":[\"qumjdjxhzghgod\"]},\"etag\":\"nrceqavfdbdfmmx\",\"location\":\"naj\",\"id\":\"pjyyqmkwlhvc\",\"name\":\"loqd\",\"type\":\"jk\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"dhlltqstqkqsyg\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ecovagzkheubanlx\",\"actionsRequired\":\"pqcckqiawzlz\"},\"provisioningState\":\"Failed\",\"groupIds\":[\"gacizuxlrarw\"]},\"etag\":\"wsaudoejtighsxj\",\"location\":\"tnkqbala\",\"id\":\"vuuwxhmeh\",\"name\":\"nhjiotiffb\",\"type\":\"cngkegxcypxb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("bn", "x", "ypfqpgaixw", com.azure.core.util.Context.NONE) + .getWithResponse("ehqwhitxnmxgn", "guzbuw", "orbalkj", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ikwepwogggicw", + Assertions.assertEquals("ecovagzkheubanlx", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("htfmcqbsudzpgc", + Assertions.assertEquals("pqcckqiawzlz", response.properties().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("qumjdjxhzghgod", response.properties().groupIds().get(0)); - Assertions.assertEquals("naj", response.location()); + Assertions.assertEquals("gacizuxlrarw", response.properties().groupIds().get(0)); + Assertions.assertEquals("tnkqbala", response.location()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListWithResponseMockTests.java index 4c8dd3ff230f..71a5b6a5bd51 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class PrivateEndpointConnectionsListWithResponseMockTests { @Test public void testListWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"mxtllfl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"cn\",\"actionsRequired\":\"fijhgga\"},\"provisioningState\":\"Deleting\",\"groupIds\":[\"mkli\",\"irw\",\"vffhs\"]},\"etag\":\"zouhktqrxq\",\"location\":\"njxrd\",\"id\":\"dtullygtavczcxdf\",\"name\":\"eapyfmlxrlj\",\"type\":\"h\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ifleimixlmd\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ehfgsm\",\"actionsRequired\":\"juqbpx\"},\"provisioningState\":\"Failed\",\"groupIds\":[\"mtznpaxwfqtyyqi\",\"rcltungbsoljckm\",\"i\"]},\"etag\":\"b\",\"location\":\"ckgk\",\"id\":\"ksw\",\"name\":\"iiqqcqikclsmalns\",\"type\":\"woykdnonaaxwm\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"jlqcwny\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"iqbcbgv\",\"actionsRequired\":\"t\"},\"provisioningState\":\"Failed\",\"groupIds\":[\"xa\"]},\"etag\":\"xuvj\",\"location\":\"mnrqstjcmetwml\",\"id\":\"cvnpv\",\"name\":\"dhgjnaqyqi\",\"type\":\"slz\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"svmwbi\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"tfo\",\"actionsRequired\":\"fiybxqich\"},\"provisioningState\":\"Deleting\",\"groupIds\":[\"dqekivycpzcvd\",\"zulrqt\",\"htre\",\"pzl\"]},\"etag\":\"yfmx\",\"location\":\"utzfkgilnoudc\",\"id\":\"nd\",\"name\":\"gdpri\",\"type\":\"gqqyeqfcbuulpyuf\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"nahwk\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ztnlmsoo\",\"actionsRequired\":\"mvecdhdyswcr\"},\"provisioningState\":\"Failed\",\"groupIds\":[\"jczxvlgsrg\",\"rfizr\"]},\"etag\":\"wlp\",\"location\":\"uqhrlmcskykp\",\"id\":\"ofix\",\"name\":\"npcfyk\",\"type\":\"pyycpawm\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"dpwrp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"fjfw\",\"actionsRequired\":\"gzawk\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"yamnnidmdiawp\"]},\"etag\":\"kzrn\",\"location\":\"kctd\",\"id\":\"osgwqpsqazihqo\",\"name\":\"vqgcnbhcbm\",\"type\":\"kztibni\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testListWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnectionListResult response = manager.privateEndpointConnections() - .listWithResponse("rmimrljdpoqfxyem", "kftbaewhte", com.azure.core.util.Context.NONE) + .listWithResponse("dxqlfrolq", "wnk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, response.value().get(0).properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("cn", + Assertions.assertEquals("ztnlmsoo", response.value().get(0).properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("fijhgga", + Assertions.assertEquals("mvecdhdyswcr", response.value().get(0).properties().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("mkli", response.value().get(0).properties().groupIds().get(0)); - Assertions.assertEquals("njxrd", response.value().get(0).location()); + Assertions.assertEquals("jczxvlgsrg", response.value().get(0).properties().groupIds().get(0)); + Assertions.assertEquals("uqhrlmcskykp", response.value().get(0).location()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointOutboundRuleDestinationTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointOutboundRuleDestinationTests.java index 7ca88decd289..e8818acdced9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointOutboundRuleDestinationTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointOutboundRuleDestinationTests.java @@ -12,19 +12,19 @@ public final class PrivateEndpointOutboundRuleDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointOutboundRuleDestination model - = BinaryData.fromString("{\"serviceResourceId\":\"aieswhddzy\",\"subresourceTarget\":\"snuepywyjln\"}") + = BinaryData.fromString("{\"serviceResourceId\":\"pp\",\"subresourceTarget\":\"aohoqkpjtnq\"}") .toObject(PrivateEndpointOutboundRuleDestination.class); - Assertions.assertEquals("aieswhddzy", model.serviceResourceId()); - Assertions.assertEquals("snuepywyjln", model.subresourceTarget()); + Assertions.assertEquals("pp", model.serviceResourceId()); + Assertions.assertEquals("aohoqkpjtnq", model.subresourceTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointOutboundRuleDestination model - = new PrivateEndpointOutboundRuleDestination().withServiceResourceId("aieswhddzy") - .withSubresourceTarget("snuepywyjln"); + = new PrivateEndpointOutboundRuleDestination().withServiceResourceId("pp") + .withSubresourceTarget("aohoqkpjtnq"); model = BinaryData.fromObject(model).toObject(PrivateEndpointOutboundRuleDestination.class); - Assertions.assertEquals("aieswhddzy", model.serviceResourceId()); - Assertions.assertEquals("snuepywyjln", model.subresourceTarget()); + Assertions.assertEquals("pp", model.serviceResourceId()); + Assertions.assertEquals("aohoqkpjtnq", model.subresourceTarget()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointOutboundRuleTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointOutboundRuleTests.java index 35ed1076a321..747adbcdeed2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointOutboundRuleTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointOutboundRuleTests.java @@ -16,27 +16,27 @@ public final class PrivateEndpointOutboundRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointOutboundRule model = BinaryData.fromString( - "{\"type\":\"PrivateEndpoint\",\"destination\":{\"serviceResourceId\":\"aqidoyzltgiomqo\",\"subresourceTarget\":\"epiaeapfsergd\"},\"fqdns\":[\"qnacyheq\"],\"category\":\"Recommended\",\"status\":\"Active\",\"errorInformation\":\"cjubkhjozfymcwm\",\"parentRuleNames\":[\"yvqyvliqiips\",\"jbsv\"]}") + "{\"type\":\"PrivateEndpoint\",\"destination\":{\"serviceResourceId\":\"iduw\",\"subresourceTarget\":\"e\"},\"fqdns\":[\"lh\",\"yxpzruzythqk\",\"whbgxvellvul\",\"xdm\"],\"category\":\"UserDefined\",\"status\":\"Failed\",\"errorInformation\":\"dtvm\",\"parentRuleNames\":[\"ymffhmjpddnyx\",\"zuvrzmzqmz\",\"qrbrpvnmdyfoeboj\"]}") .toObject(PrivateEndpointOutboundRule.class); - Assertions.assertEquals(RuleCategory.RECOMMENDED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("aqidoyzltgiomqo", model.destination().serviceResourceId()); - Assertions.assertEquals("epiaeapfsergd", model.destination().subresourceTarget()); - Assertions.assertEquals("qnacyheq", model.fqdns().get(0)); + Assertions.assertEquals(RuleCategory.USER_DEFINED, model.category()); + Assertions.assertEquals(RuleStatus.FAILED, model.status()); + Assertions.assertEquals("iduw", model.destination().serviceResourceId()); + Assertions.assertEquals("e", model.destination().subresourceTarget()); + Assertions.assertEquals("lh", model.fqdns().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointOutboundRule model = new PrivateEndpointOutboundRule().withCategory(RuleCategory.RECOMMENDED) - .withStatus(RuleStatus.ACTIVE) - .withDestination(new PrivateEndpointOutboundRuleDestination().withServiceResourceId("aqidoyzltgiomqo") - .withSubresourceTarget("epiaeapfsergd")) - .withFqdns(Arrays.asList("qnacyheq")); + PrivateEndpointOutboundRule model = new PrivateEndpointOutboundRule().withCategory(RuleCategory.USER_DEFINED) + .withStatus(RuleStatus.FAILED) + .withDestination( + new PrivateEndpointOutboundRuleDestination().withServiceResourceId("iduw").withSubresourceTarget("e")) + .withFqdns(Arrays.asList("lh", "yxpzruzythqk", "whbgxvellvul", "xdm")); model = BinaryData.fromObject(model).toObject(PrivateEndpointOutboundRule.class); - Assertions.assertEquals(RuleCategory.RECOMMENDED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("aqidoyzltgiomqo", model.destination().serviceResourceId()); - Assertions.assertEquals("epiaeapfsergd", model.destination().subresourceTarget()); - Assertions.assertEquals("qnacyheq", model.fqdns().get(0)); + Assertions.assertEquals(RuleCategory.USER_DEFINED, model.category()); + Assertions.assertEquals(RuleStatus.FAILED, model.status()); + Assertions.assertEquals("iduw", model.destination().serviceResourceId()); + Assertions.assertEquals("e", model.destination().subresourceTarget()); + Assertions.assertEquals("lh", model.fqdns().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourceListResultInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourceListResultInnerTests.java index 9dd61d72b96c..dcd765319a78 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourceListResultInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourceListResultInnerTests.java @@ -12,8 +12,8 @@ public final class PrivateLinkResourceListResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceListResultInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"lslrcigtzjc\",\"requiredMembers\":[\"qlapsnsso\",\"yxpavidnie\"],\"requiredZoneNames\":[\"fcvvy\",\"zslp\",\"xgcbdsvalpnpt\",\"trkxgpazwu\"],\"displayName\":\"yqvnjobfe\"},\"id\":\"ldiuhzzgqlm\",\"name\":\"aewzgiudjp\",\"type\":\"pqht\"},{\"properties\":{\"groupId\":\"nmhkrezsd\",\"requiredMembers\":[\"heqdgcru\"],\"requiredZoneNames\":[\"inymmqgwokmikp\",\"zfbmjxuv\",\"ipfdvhaxdvwzaehp\",\"hthdklmvetatlakf\"],\"displayName\":\"ixwgiksbbvtooxrp\"},\"id\":\"wp\",\"name\":\"chgjtnhtukfacih\",\"type\":\"bfntumeezbxvq\"},{\"properties\":{\"groupId\":\"uvwc\",\"requiredMembers\":[\"gomtm\",\"zwxuqgovsx\"],\"requiredZoneNames\":[\"zt\",\"fmkk\"],\"displayName\":\"gfredmlscg\"},\"id\":\"lccnaovjowaz\",\"name\":\"p\",\"type\":\"bacom\"},{\"properties\":{\"groupId\":\"t\",\"requiredMembers\":[\"sxnsrqorcge\",\"mv\",\"ebx\"],\"requiredZoneNames\":[\"qu\",\"xcxxqndcqjkedw\",\"urcgojmrvvxwj\",\"ngz\"],\"displayName\":\"hqqrsilcch\"},\"id\":\"xxkan\",\"name\":\"bvriaqgvtojrulfu\",\"type\":\"tejrthc\"}]}") + "{\"value\":[{\"properties\":{\"groupId\":\"rkuz\",\"requiredMembers\":[\"nndtsnxa\"],\"requiredZoneNames\":[\"tllh\",\"yzm\",\"ckze\"],\"displayName\":\"xak\"},\"id\":\"ywymxgaabj\",\"name\":\"dtfohfaog\",\"type\":\"vkiwrsiwdyjqu\"},{\"properties\":{\"groupId\":\"crraueekcsu\",\"requiredMembers\":[\"gdda\"],\"requiredZoneNames\":[\"bgydlqidywm\",\"mptyrilkfbnrqqxv\"],\"displayName\":\"pbnfnqtx\"},\"id\":\"omals\",\"name\":\"bnfddep\",\"type\":\"dwq\"},{\"properties\":{\"groupId\":\"f\",\"requiredMembers\":[\"leexahvmywh\"],\"requiredZoneNames\":[\"carycsjjzyvoaqa\",\"uvehzptd\",\"krrbhmpful\"],\"displayName\":\"efgybpmfbfununmp\"},\"id\":\"rvfyifkdsch\",\"name\":\"zvfictnk\",\"type\":\"jwg\"},{\"properties\":{\"groupId\":\"ph\",\"requiredMembers\":[\"fyrtogmhmjp\",\"scdfpdqw\",\"ygevgwmseharx\",\"fv\"],\"requiredZoneNames\":[\"x\",\"mbpjptnvwjh\",\"sidqpxlbtpakft\"],\"displayName\":\"atw\"},\"id\":\"kyutrymdwmfjhpyc\",\"name\":\"jqdvdwkqpldrlefg\",\"type\":\"aavuagntetaout\"}]}") .toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals("fcvvy", model.value().get(0).properties().requiredZoneNames().get(0)); + Assertions.assertEquals("tllh", model.value().get(0).properties().requiredZoneNames().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcePropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcePropertiesTests.java index 59491a9e20ae..92ecfe12b002 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcePropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcePropertiesTests.java @@ -12,8 +12,8 @@ public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"jxnw\",\"requiredMembers\":[\"hpojxl\"],\"requiredZoneNames\":[\"lx\"],\"displayName\":\"fquwzpwiibel\"}") + "{\"groupId\":\"biipsnawwlqkznx\",\"requiredMembers\":[\"lxri\",\"ctkwmuqqoajxeiyg\"],\"requiredZoneNames\":[\"rwvaexhdc\",\"rceqnkbrupob\",\"hdmljz\",\"cvumepjpbi\"],\"displayName\":\"zpphepif\"}") .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("lx", model.requiredZoneNames().get(0)); + Assertions.assertEquals("rwvaexhdc", model.requiredZoneNames().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourceTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourceTests.java index 748d4c65886c..65ff5b85f1f3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourceTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourceTests.java @@ -12,8 +12,8 @@ public final class PrivateLinkResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResource model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"hxlyubqjrostvrje\",\"requiredMembers\":[\"z\",\"beqrztrx\"],\"requiredZoneNames\":[\"rdhabsr\"],\"displayName\":\"sn\"},\"id\":\"pqatiwkkvyanxkv\",\"name\":\"csemsvuvd\",\"type\":\"kqxetqmmliv\"}") + "{\"properties\":{\"groupId\":\"ctuhspfefyihduye\",\"requiredMembers\":[\"dphmtybkcgsuth\",\"llnmwyn\",\"fxexlfciatxtjrr\"],\"requiredZoneNames\":[\"dskjhhxdlaj\",\"oxcxscvslx\",\"hu\",\"vkrmukmyjmkx\"],\"displayName\":\"tcsloj\"},\"id\":\"qid\",\"name\":\"qtoqxjhqxcsq\",\"type\":\"tkbtnqlrngl\"}") .toObject(PrivateLinkResource.class); - Assertions.assertEquals("rdhabsr", model.properties().requiredZoneNames().get(0)); + Assertions.assertEquals("dskjhhxdlaj", model.properties().requiredZoneNames().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListWithResponseMockTests.java index 81c1675e52ec..d38122d40f47 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class PrivateLinkResourcesListWithResponseMockTests { @Test public void testListWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"gbvuy\",\"requiredMembers\":[\"mbwep\",\"lnuom\",\"xhdkhmemx\"],\"requiredZoneNames\":[\"apesnbyoullyfz\",\"nxrmxxjv\",\"batjgzkm\"],\"displayName\":\"wzlmpxfmd\"},\"id\":\"i\",\"name\":\"mmdzphxulx\",\"type\":\"cbdnpfcg\"},{\"properties\":{\"groupId\":\"towqxxcp\",\"requiredMembers\":[\"pzloovhatiywtcv\",\"uzpk\",\"eomotq\",\"ql\"],\"requiredZoneNames\":[\"i\",\"gq\"],\"displayName\":\"k\"},\"id\":\"pfv\",\"name\":\"sqmmetwtlafnkjte\",\"type\":\"bdpnuvhgcgrllyy\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"ncrdo\",\"requiredMembers\":[\"ysecp\",\"khxd\",\"yhqtzcvimmwcko\"],\"requiredZoneNames\":[\"fymtrtsvxupqtzck\",\"bcbkgnrfr\"],\"displayName\":\"chj\"},\"id\":\"cqzahgtvbgdob\",\"name\":\"morzolxosg\",\"type\":\"htrxueqbmxqfgv\"},{\"properties\":{\"groupId\":\"qs\",\"requiredMembers\":[\"esgcsqos\",\"cxlngoufpi\"],\"requiredZoneNames\":[\"mfxzspf\"],\"displayName\":\"slazipplxgtdu\"},\"id\":\"ty\",\"name\":\"i\",\"type\":\"drznlaxozqthkwxf\"},{\"properties\":{\"groupId\":\"zizyxdu\",\"requiredMembers\":[\"qzb\",\"qcakmfckviyj\"],\"requiredZoneNames\":[\"mnsbq\",\"itwhmucjiu\",\"cxyvehykl\",\"lyqdvpqfbxgyc\"],\"displayName\":\"usdmtxq\"},\"id\":\"fn\",\"name\":\"heywvfopkyllrey\",\"type\":\"nj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkResourceListResult response = manager.privateLinkResources() - .listWithResponse("txtmrmgftjvi", "lohlgrjcxhhfhzns", com.azure.core.util.Context.NONE) + .listWithResponse("dnccotelik", "iytehhxtzxqdwbym", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("apesnbyoullyfz", response.value().get(0).properties().requiredZoneNames().get(0)); + Assertions.assertEquals("fymtrtsvxupqtzck", response.value().get(0).properties().requiredZoneNames().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostInnerTests.java index f3acfa425b60..4441aadd571b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostInnerTests.java @@ -14,26 +14,28 @@ public final class ProjectCapabilityHostInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProjectCapabilityHostInner model = BinaryData.fromString( - "{\"properties\":{\"aiServicesConnections\":[\"qipxgzdyimsf\",\"yorpr\",\"vk\"],\"vectorStoreConnections\":[\"eslabnsmjkwynq\",\"aekqsykvwj\",\"qpkevmyltjc\"],\"storageConnections\":[\"xklurcclfgxannno\",\"t\",\"posew\"],\"threadStorageConnections\":[\"pxvkqma\",\"pxvpifdfaif\",\"zyzeyuubeidsz\",\"fytoi\"],\"provisioningState\":\"Failed\"},\"id\":\"gvfltgvdihoynkr\",\"name\":\"wetwkdr\",\"type\":\"yrucpcunnuzdq\"}") + "{\"properties\":{\"aiServicesConnections\":[\"juscvsfx\",\"gctmgxuupbezq\",\"cydrtceukdqkk\",\"ihztgeqmgqzgwldo\"],\"vectorStoreConnections\":[\"illcecfehu\",\"aoaguhicqlli\"],\"storageConnections\":[\"ac\"],\"threadStorageConnections\":[\"hrweftkw\",\"ejpmvssehaepwa\",\"cxtczhupeukn\",\"jduyyespydjfb\"],\"provisioningState\":\"Updating\"},\"id\":\"hhulrtywikdm\",\"name\":\"lakuflgbhgauacd\",\"type\":\"xmxufrsryjqgdk\"}") .toObject(ProjectCapabilityHostInner.class); - Assertions.assertEquals("qipxgzdyimsf", model.properties().aiServicesConnections().get(0)); - Assertions.assertEquals("eslabnsmjkwynq", model.properties().vectorStoreConnections().get(0)); - Assertions.assertEquals("xklurcclfgxannno", model.properties().storageConnections().get(0)); - Assertions.assertEquals("pxvkqma", model.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("juscvsfx", model.properties().aiServicesConnections().get(0)); + Assertions.assertEquals("illcecfehu", model.properties().vectorStoreConnections().get(0)); + Assertions.assertEquals("ac", model.properties().storageConnections().get(0)); + Assertions.assertEquals("hrweftkw", model.properties().threadStorageConnections().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ProjectCapabilityHostInner model = new ProjectCapabilityHostInner().withProperties(new ProjectCapabilityHostProperties() - .withAiServicesConnections(Arrays.asList("qipxgzdyimsf", "yorpr", "vk")) - .withVectorStoreConnections(Arrays.asList("eslabnsmjkwynq", "aekqsykvwj", "qpkevmyltjc")) - .withStorageConnections(Arrays.asList("xklurcclfgxannno", "t", "posew")) - .withThreadStorageConnections(Arrays.asList("pxvkqma", "pxvpifdfaif", "zyzeyuubeidsz", "fytoi"))); + .withAiServicesConnections( + Arrays.asList("juscvsfx", "gctmgxuupbezq", "cydrtceukdqkk", "ihztgeqmgqzgwldo")) + .withVectorStoreConnections(Arrays.asList("illcecfehu", "aoaguhicqlli")) + .withStorageConnections(Arrays.asList("ac")) + .withThreadStorageConnections( + Arrays.asList("hrweftkw", "ejpmvssehaepwa", "cxtczhupeukn", "jduyyespydjfb"))); model = BinaryData.fromObject(model).toObject(ProjectCapabilityHostInner.class); - Assertions.assertEquals("qipxgzdyimsf", model.properties().aiServicesConnections().get(0)); - Assertions.assertEquals("eslabnsmjkwynq", model.properties().vectorStoreConnections().get(0)); - Assertions.assertEquals("xklurcclfgxannno", model.properties().storageConnections().get(0)); - Assertions.assertEquals("pxvkqma", model.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("juscvsfx", model.properties().aiServicesConnections().get(0)); + Assertions.assertEquals("illcecfehu", model.properties().vectorStoreConnections().get(0)); + Assertions.assertEquals("ac", model.properties().storageConnections().get(0)); + Assertions.assertEquals("hrweftkw", model.properties().threadStorageConnections().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostPropertiesTests.java index 35b6f7ac413c..4a65d855ba2a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostPropertiesTests.java @@ -13,25 +13,25 @@ public final class ProjectCapabilityHostPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProjectCapabilityHostProperties model = BinaryData.fromString( - "{\"aiServicesConnections\":[\"enodna\",\"enhqhskndnelq\",\"aadl\"],\"vectorStoreConnections\":[\"foanniyopetx\"],\"storageConnections\":[\"nrlyxnuc\",\"ephblkwqpatvbqs\"],\"threadStorageConnections\":[\"jbc\",\"vivuzqymtuowo\"],\"provisioningState\":\"Creating\"}") + "{\"aiServicesConnections\":[\"zoeo\"],\"vectorStoreConnections\":[\"jhvefgwbmqjchnt\",\"sf\",\"ymxbulpzealb\"],\"storageConnections\":[\"yojwyvfkmbtsu\",\"hxsgxj\",\"mmzrrscub\"],\"threadStorageConnections\":[\"drnpxqwodiff\"],\"provisioningState\":\"Deleting\"}") .toObject(ProjectCapabilityHostProperties.class); - Assertions.assertEquals("enodna", model.aiServicesConnections().get(0)); - Assertions.assertEquals("foanniyopetx", model.vectorStoreConnections().get(0)); - Assertions.assertEquals("nrlyxnuc", model.storageConnections().get(0)); - Assertions.assertEquals("jbc", model.threadStorageConnections().get(0)); + Assertions.assertEquals("zoeo", model.aiServicesConnections().get(0)); + Assertions.assertEquals("jhvefgwbmqjchnt", model.vectorStoreConnections().get(0)); + Assertions.assertEquals("yojwyvfkmbtsu", model.storageConnections().get(0)); + Assertions.assertEquals("drnpxqwodiff", model.threadStorageConnections().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProjectCapabilityHostProperties model = new ProjectCapabilityHostProperties() - .withAiServicesConnections(Arrays.asList("enodna", "enhqhskndnelq", "aadl")) - .withVectorStoreConnections(Arrays.asList("foanniyopetx")) - .withStorageConnections(Arrays.asList("nrlyxnuc", "ephblkwqpatvbqs")) - .withThreadStorageConnections(Arrays.asList("jbc", "vivuzqymtuowo")); + ProjectCapabilityHostProperties model + = new ProjectCapabilityHostProperties().withAiServicesConnections(Arrays.asList("zoeo")) + .withVectorStoreConnections(Arrays.asList("jhvefgwbmqjchnt", "sf", "ymxbulpzealb")) + .withStorageConnections(Arrays.asList("yojwyvfkmbtsu", "hxsgxj", "mmzrrscub")) + .withThreadStorageConnections(Arrays.asList("drnpxqwodiff")); model = BinaryData.fromObject(model).toObject(ProjectCapabilityHostProperties.class); - Assertions.assertEquals("enodna", model.aiServicesConnections().get(0)); - Assertions.assertEquals("foanniyopetx", model.vectorStoreConnections().get(0)); - Assertions.assertEquals("nrlyxnuc", model.storageConnections().get(0)); - Assertions.assertEquals("jbc", model.threadStorageConnections().get(0)); + Assertions.assertEquals("zoeo", model.aiServicesConnections().get(0)); + Assertions.assertEquals("jhvefgwbmqjchnt", model.vectorStoreConnections().get(0)); + Assertions.assertEquals("yojwyvfkmbtsu", model.storageConnections().get(0)); + Assertions.assertEquals("drnpxqwodiff", model.threadStorageConnections().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostResourceArmPaginatedResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostResourceArmPaginatedResultTests.java index 66127f4b47c8..c59642f92091 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostResourceArmPaginatedResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostResourceArmPaginatedResultTests.java @@ -12,12 +12,12 @@ public final class ProjectCapabilityHostResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProjectCapabilityHostResourceArmPaginatedResult model = BinaryData.fromString( - "{\"nextLink\":\"tsqhzvbrzcdban\",\"value\":[{\"properties\":{\"aiServicesConnections\":[\"cxmxeatkdb\",\"wnrdjyibqbnaom\"],\"vectorStoreConnections\":[\"mk\",\"hmaxljalfi\"],\"storageConnections\":[\"mobcan\",\"de\"],\"threadStorageConnections\":[\"cwg\",\"xf\",\"vaknokzwjj\",\"r\"],\"provisioningState\":\"Creating\"},\"id\":\"l\",\"name\":\"zyyfy\",\"type\":\"pqsixymmp\"},{\"properties\":{\"aiServicesConnections\":[\"vyqlkjuvsmbmslzo\",\"ovwzdbpqvybefg\",\"mx\",\"okcvtlubses\"],\"vectorStoreConnections\":[\"uartrhunlpiryky\"],\"storageConnections\":[\"zf\",\"ivjreuyk\",\"bmnwa\"],\"threadStorageConnections\":[\"bxoeeonql\",\"fwmyymv\"],\"provisioningState\":\"Deleting\"},\"id\":\"bhfckdvezcrcssb\",\"name\":\"hddubbnqfbl\",\"type\":\"kalehp\"},{\"properties\":{\"aiServicesConnections\":[\"wugiqjti\",\"gqgdminictteajoh\",\"ygspnbonhpczykm\"],\"vectorStoreConnections\":[\"vw\"],\"storageConnections\":[\"sehch\",\"hufmpq\",\"mqyjgy\"],\"threadStorageConnections\":[\"lod\",\"aeuzanh\",\"fnhsenwphp\",\"fngq\"],\"provisioningState\":\"Canceled\"},\"id\":\"dftujwjjufwbeqr\",\"name\":\"uorhtssruqnmdvh\",\"type\":\"zcvjytiqswbqerz\"}]}") + "{\"nextLink\":\"rmmuabwibvjo\",\"value\":[{\"properties\":{\"aiServicesConnections\":[\"cyefoyzbamwine\",\"fvfkak\",\"oldtvevboclzhz\"],\"vectorStoreConnections\":[\"yuxgvttxpnrupz\"],\"storageConnections\":[\"rdixt\",\"ekidswyskb\",\"uffgllukkutvlx\"],\"threadStorageConnections\":[\"qhvmblcouqe\",\"bhbcdszir\",\"randoypmb\",\"t\"],\"provisioningState\":\"Canceled\"},\"id\":\"kfqlwx\",\"name\":\"dykalsygaolnjpnn\",\"type\":\"m\"},{\"properties\":{\"aiServicesConnections\":[\"ibjgsjjxxahm\",\"nadzyq\"],\"vectorStoreConnections\":[\"yi\",\"pinbmhwbjijkgqxn\",\"mbk\"],\"storageConnections\":[\"jauj\",\"aan\",\"ggiycwkdtaawxwf\"],\"threadStorageConnections\":[\"umrrqmbzm\",\"kratbnxwbj\",\"idbirkfpkso\",\"dgo\"],\"provisioningState\":\"Canceled\"},\"id\":\"jymrhbg\",\"name\":\"zozk\",\"type\":\"ewnf\"},{\"properties\":{\"aiServicesConnections\":[\"hhqosmffjku\",\"ycyarnroohg\"],\"vectorStoreConnections\":[\"zoghktdpyczhc\"],\"storageConnections\":[\"cnhz\",\"rottjzcfyjzptw\",\"lohap\",\"infsz\"],\"threadStorageConnections\":[\"lqdhmrjzr\",\"l\"],\"provisioningState\":\"Failed\"},\"id\":\"byypsjoqcjenky\",\"name\":\"fq\",\"type\":\"vsqxfxjelgcmpzqj\"}]}") .toObject(ProjectCapabilityHostResourceArmPaginatedResult.class); - Assertions.assertEquals("tsqhzvbrzcdban", model.nextLink()); - Assertions.assertEquals("cxmxeatkdb", model.value().get(0).properties().aiServicesConnections().get(0)); - Assertions.assertEquals("mk", model.value().get(0).properties().vectorStoreConnections().get(0)); - Assertions.assertEquals("mobcan", model.value().get(0).properties().storageConnections().get(0)); - Assertions.assertEquals("cwg", model.value().get(0).properties().threadStorageConnections().get(0)); + Assertions.assertEquals("rmmuabwibvjo", model.nextLink()); + Assertions.assertEquals("cyefoyzbamwine", model.value().get(0).properties().aiServicesConnections().get(0)); + Assertions.assertEquals("yuxgvttxpnrupz", model.value().get(0).properties().vectorStoreConnections().get(0)); + Assertions.assertEquals("rdixt", model.value().get(0).properties().storageConnections().get(0)); + Assertions.assertEquals("qhvmblcouqe", model.value().get(0).properties().threadStorageConnections().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsCreateOrUpdateMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsCreateOrUpdateMockTests.java index 9b467d2f94be..b402ed531e57 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsCreateOrUpdateMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsCreateOrUpdateMockTests.java @@ -23,7 +23,7 @@ public final class ProjectCapabilityHostsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"aiServicesConnections\":[\"hbfpiqnrjocogw\",\"vkywzrqeiaddpkh\"],\"vectorStoreConnections\":[\"lmdcnutiexmizu\",\"zbqvioyn\",\"tfqhhvvwzprjaaai\"],\"storageConnections\":[\"tvavlyaqtl\",\"cn\"],\"threadStorageConnections\":[\"fzvz\",\"zqcrlkorvbzg\",\"henfsfyq\"],\"provisioningState\":\"Succeeded\"},\"id\":\"mhnozfby\",\"name\":\"jiaaosla\",\"type\":\"agwaakktbjort\"}"; + = "{\"properties\":{\"aiServicesConnections\":[\"jtqbgysi\",\"thnvxwtdqtcbjd\"],\"vectorStoreConnections\":[\"yhkxun\"],\"storageConnections\":[\"jqgbbjvov\",\"a\",\"hgjsmbcsloy\"],\"threadStorageConnections\":[\"bdg\",\"he\",\"onsdunr\"],\"provisioningState\":\"Succeeded\"},\"id\":\"uatqhgzuyxtrvfdb\",\"name\":\"skgqjbvitptpvsf\",\"type\":\"avdhpiw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,18 +32,20 @@ public void testCreateOrUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ProjectCapabilityHost response = manager.projectCapabilityHosts() - .define("crgyoimmsszz") - .withExistingProject("yzssjlmykdyg", "vgspjlfzhjngwqx", "r") - .withProperties(new ProjectCapabilityHostProperties().withAiServicesConnections(Arrays.asList("vkognhtv")) - .withVectorStoreConnections(Arrays.asList("nnwcnvpnyl", "jdkjvdr")) - .withStorageConnections(Arrays.asList("kxiox", "nrjlqdoqejexf", "lhuhdkubgyw")) - .withThreadStorageConnections(Arrays.asList("klpdyehjrwcflvx", "ocaywmfvuhz", "olhve", "lngsfmh"))) - .create(); + ProjectCapabilityHost response + = manager.projectCapabilityHosts() + .define("uvqhxtozfgdkw") + .withExistingProject("rho", "rkkvxundqzbv", "p") + .withProperties(new ProjectCapabilityHostProperties() + .withAiServicesConnections(Arrays.asList("rklpiigfuzk", "utui")) + .withVectorStoreConnections(Arrays.asList("lzjwaqdzq", "dewuwxyl", "zzzevtzqwczoc")) + .withStorageConnections(Arrays.asList("ekmuynfpkyvnhiy")) + .withThreadStorageConnections(Arrays.asList("orksl", "raqkiwlw", "fflaqwm"))) + .create(); - Assertions.assertEquals("hbfpiqnrjocogw", response.properties().aiServicesConnections().get(0)); - Assertions.assertEquals("lmdcnutiexmizu", response.properties().vectorStoreConnections().get(0)); - Assertions.assertEquals("tvavlyaqtl", response.properties().storageConnections().get(0)); - Assertions.assertEquals("fzvz", response.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("jtqbgysi", response.properties().aiServicesConnections().get(0)); + Assertions.assertEquals("yhkxun", response.properties().vectorStoreConnections().get(0)); + Assertions.assertEquals("jqgbbjvov", response.properties().storageConnections().get(0)); + Assertions.assertEquals("bdg", response.properties().threadStorageConnections().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsGetWithResponseMockTests.java index f4e4173313bd..95b47847004e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ProjectCapabilityHostsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"aiServicesConnections\":[\"ykkxa\",\"r\",\"uptiicgvpzgyxcc\",\"pxiema\"],\"vectorStoreConnections\":[\"tjekxsnnb\",\"ysgkt\",\"mocnqbbl\",\"tbofzghfuifw\"],\"storageConnections\":[\"ynohocqxug\",\"xugdcrrfb\",\"lv\",\"mhurosdjlzbdmddg\"],\"threadStorageConnections\":[\"uyaorservpv\",\"sorsbegcl\",\"ex\"],\"provisioningState\":\"Failed\"},\"id\":\"zyhzydyvtuqvi\",\"name\":\"lunssky\",\"type\":\"igtvjxsocsvjekej\"}"; + = "{\"properties\":{\"aiServicesConnections\":[\"l\",\"j\"],\"vectorStoreConnections\":[\"gcem\"],\"storageConnections\":[\"zdv\",\"ljubvfjyz\",\"f\"],\"threadStorageConnections\":[\"fnivlutggma\",\"cxauhvcgzxhklsqx\"],\"provisioningState\":\"Succeeded\"},\"id\":\"y\",\"name\":\"ktsrjyxxoxwfzbkv\",\"type\":\"cnxfxphs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProjectCapabilityHost response = manager.projectCapabilityHosts() - .getWithResponse("xh", "aqoqbvejoysoxovl", "nkleldk", "dlqqhn", com.azure.core.util.Context.NONE) + .getWithResponse("qagkncjmybn", "evztnjawrhul", "mmqmbwppx", "rxbkitzmnhitax", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ykkxa", response.properties().aiServicesConnections().get(0)); - Assertions.assertEquals("tjekxsnnb", response.properties().vectorStoreConnections().get(0)); - Assertions.assertEquals("ynohocqxug", response.properties().storageConnections().get(0)); - Assertions.assertEquals("uyaorservpv", response.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("l", response.properties().aiServicesConnections().get(0)); + Assertions.assertEquals("gcem", response.properties().vectorStoreConnections().get(0)); + Assertions.assertEquals("zdv", response.properties().storageConnections().get(0)); + Assertions.assertEquals("fnivlutggma", response.properties().threadStorageConnections().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsListMockTests.java index 9eec1b4ae7ed..3504e7268ff2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectCapabilityHostsListMockTests.java @@ -22,7 +22,7 @@ public final class ProjectCapabilityHostsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"aiServicesConnections\":[\"moal\",\"axvwxtxuzh\"],\"vectorStoreConnections\":[\"yffwflbkjcdzu\",\"ygtc\",\"z\"],\"storageConnections\":[\"fpubaldjc\",\"ldry\",\"lrlkbh\",\"irmxcaujbfomf\"],\"threadStorageConnections\":[\"pjy\",\"e\",\"ppqcwdnn\",\"jthp\"],\"provisioningState\":\"Failed\"},\"id\":\"bycympohxubnnpn\",\"name\":\"ebcxn\",\"type\":\"usp\"}]}"; + = "{\"value\":[{\"properties\":{\"aiServicesConnections\":[\"tihtgrafjajvkyxm\"],\"vectorStoreConnections\":[\"zvogtde\",\"j\"],\"storageConnections\":[\"mkvaeu\",\"qdwxhhlbmyphfxn\"],\"threadStorageConnections\":[\"hewokyqsfkxf\",\"ywbihqbtodjfyx\",\"vkvwzdmvddqw\"],\"provisioningState\":\"Failed\"},\"id\":\"yoz\",\"name\":\"za\",\"type\":\"njdvv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,14 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.projectCapabilityHosts() - .list("hxzjdcwuzs", "yfyixecmasjnfgng", "aojeeyvfxb", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.projectCapabilityHosts().list("wbebsnbwutlv", "wm", "u", com.azure.core.util.Context.NONE); - Assertions.assertEquals("moal", response.iterator().next().properties().aiServicesConnections().get(0)); - Assertions.assertEquals("yffwflbkjcdzu", - response.iterator().next().properties().vectorStoreConnections().get(0)); - Assertions.assertEquals("fpubaldjc", response.iterator().next().properties().storageConnections().get(0)); - Assertions.assertEquals("pjy", response.iterator().next().properties().threadStorageConnections().get(0)); + Assertions.assertEquals("tihtgrafjajvkyxm", + response.iterator().next().properties().aiServicesConnections().get(0)); + Assertions.assertEquals("zvogtde", response.iterator().next().properties().vectorStoreConnections().get(0)); + Assertions.assertEquals("mkvaeu", response.iterator().next().properties().storageConnections().get(0)); + Assertions.assertEquals("hewokyqsfkxf", + response.iterator().next().properties().threadStorageConnections().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsCreateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsCreateWithResponseMockTests.java index 8d309e1bc53f..b2e636d09e41 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsCreateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsCreateWithResponseMockTests.java @@ -29,7 +29,7 @@ public final class ProjectConnectionsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Odbc\",\"createdByWorkspaceArmId\":\"rlrjugcfebpiucen\",\"error\":\"rllld\",\"expiryTime\":\"2021-05-26T23:31:22Z\",\"group\":\"Azure\",\"isSharedToAll\":false,\"metadata\":{\"tpfxxgjahyxfwf\":\"sxryiqjzlwrdux\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"bkqynlzx\",\"melupjckiehd\",\"vfoy\"],\"target\":\"xxffgmcuanszeerv\",\"useWorkspaceManagedIdentity\":false},\"id\":\"sapvbcqpfu\",\"name\":\"ekijhminen\",\"type\":\"bivpyrkvor\"}"; + = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"RemoteA2A\",\"createdByWorkspaceArmId\":\"fzgugrbl\",\"error\":\"l\",\"expiryTime\":\"2021-06-19T02:14:08Z\",\"group\":\"Database\",\"isSharedToAll\":true,\"metadata\":{\"sman\":\"otbptg\",\"ecvtamqwzmno\":\"xrwqfmd\",\"wpsibxovuqoq\":\"fe\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"yclwgycvtqn\",\"jc\"],\"target\":\"qzhembtbw\",\"useWorkspaceManagedIdentity\":false},\"id\":\"adpi\",\"name\":\"jdleajvmvvlooubs\",\"type\":\"xipjeopskgocjom\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,33 +38,32 @@ public void testCreateWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ConnectionPropertiesV2BasicResource response - = manager.projectConnections() - .createWithResponse("cltjhbcycgqa", "csihxvtacwwf", "pxpry", "nsbubwhzqqgugwlu", - new ConnectionPropertiesV2BasicResourceInner().withProperties(new ConnectionPropertiesV2() - .withCategory(ConnectionCategory.REMOTE_A2A) - .withError("pkephujeucosvkke") - .withExpiryTime(OffsetDateTime.parse("2021-08-27T14:05:19Z")) - .withIsSharedToAll(false) - .withMetadata( - mapOf("zfpffbuqxknvmcgm", "jpyillgnue", "zoksgqhb", "gzyojfchicpare", "zblkc", "ojuxil")) - .withPeRequirement(ManagedPERequirement.NOT_REQUIRED) - .withPeStatus(ManagedPEStatus.ACTIVE) - .withSharedUserList(Arrays.asList("wtkbptsflot")) - .withTarget("bmwgftshfgmuxu") - .withUseWorkspaceManagedIdentity(true)), - com.azure.core.util.Context.NONE) - .getValue(); + ConnectionPropertiesV2BasicResource response = manager.projectConnections() + .createWithResponse("nzxezriwgo", "wapcqksaaapxjhc", "tibenwsd", "pvdaahlfrcqklp", + new ConnectionPropertiesV2BasicResourceInner().withProperties(new ConnectionPropertiesV2() + .withCategory(ConnectionCategory.SALESFORCE_MARKETING_CLOUD) + .withError("l") + .withExpiryTime(OffsetDateTime.parse("2021-10-27T14:56:22Z")) + .withIsSharedToAll(true) + .withMetadata( + mapOf("cjjlwkyeahhhut", "e", "inowrerjpxp", "ulnrfcqufmcih", "lgbbfjmdgjvxlh", "chdwyqqidqi")) + .withPeRequirement(ManagedPERequirement.REQUIRED) + .withPeStatus(ManagedPEStatus.INACTIVE) + .withSharedUserList(Arrays.asList("yaphqeofytlsnlo")) + .withTarget("cmcqixuan") + .withUseWorkspaceManagedIdentity(true)), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals(ConnectionCategory.ODBC, response.properties().category()); - Assertions.assertEquals("rllld", response.properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-26T23:31:22Z"), response.properties().expiryTime()); - Assertions.assertFalse(response.properties().isSharedToAll()); - Assertions.assertEquals("sxryiqjzlwrdux", response.properties().metadata().get("tpfxxgjahyxfwf")); - Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, response.properties().peRequirement()); - Assertions.assertEquals(ManagedPEStatus.INACTIVE, response.properties().peStatus()); - Assertions.assertEquals("bkqynlzx", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("xxffgmcuanszeerv", response.properties().target()); + Assertions.assertEquals(ConnectionCategory.REMOTE_A2A, response.properties().category()); + Assertions.assertEquals("l", response.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T02:14:08Z"), response.properties().expiryTime()); + Assertions.assertTrue(response.properties().isSharedToAll()); + Assertions.assertEquals("otbptg", response.properties().metadata().get("sman")); + Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, response.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, response.properties().peStatus()); + Assertions.assertEquals("yclwgycvtqn", response.properties().sharedUserList().get(0)); + Assertions.assertEquals("qzhembtbw", response.properties().target()); Assertions.assertFalse(response.properties().useWorkspaceManagedIdentity()); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsDeleteWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsDeleteWithResponseMockTests.java index 37f50b1c060d..570e23e815d5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsDeleteWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsDeleteWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.projectConnections() - .deleteWithResponse("jkscecmbaajdfw", "dkqlvzkf", "kdesb", "jqtl", com.azure.core.util.Context.NONE); + .deleteWithResponse("rusyzai", "npsjnpc", "plujyduonb", "awsaoplvvmnbkx", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsGetWithResponseMockTests.java index 7a7392d1aeae..0ae523cdacbe 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsGetWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class ProjectConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"PayPal\",\"createdByWorkspaceArmId\":\"vbtcuhjcgjtjknt\",\"error\":\"nlzt\",\"expiryTime\":\"2021-08-30T00:33:04Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":false,\"metadata\":{\"xeyvidcowlrm\":\"r\",\"xavejo\":\"dct\",\"fiekkiskyyy\":\"zvwkryzgavplndm\",\"fffyshdawjlmlcuf\":\"ek\"},\"peRequirement\":\"Required\",\"peStatus\":\"Active\",\"sharedUserList\":[\"of\",\"oajjyl\",\"yqyjnufzvl\"],\"target\":\"uyhbceev\",\"useWorkspaceManagedIdentity\":true},\"id\":\"rpwnqtvuxe\",\"name\":\"jmdssijuaxxfdly\",\"type\":\"kcpwsrqnnmjundtl\"}"; + = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"BingLLMSearch\",\"createdByWorkspaceArmId\":\"ubak\",\"error\":\"kvggcmfns\",\"expiryTime\":\"2021-04-04T21:05:29Z\",\"group\":\"ServicesAndApps\",\"isSharedToAll\":false,\"metadata\":{\"nqvxgvohd\":\"wewzlscgsme\",\"oevvu\":\"thhx\",\"annvwx\":\"eepfh\",\"bvrhh\":\"hpjhubohxvzga\"},\"peRequirement\":\"Required\",\"peStatus\":\"Active\",\"sharedUserList\":[\"wfmzvztau\",\"bpamq\"],\"target\":\"cssanybzzghv\",\"useWorkspaceManagedIdentity\":false},\"id\":\"myjsvcdhly\",\"name\":\"kh\",\"type\":\"okj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,19 +34,18 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ConnectionPropertiesV2BasicResource response = manager.projectConnections() - .getWithResponse("wkdywkszavuafan", "fictptplkossjbzv", "pzwdqzuhfgti", "czhfjdcc", - com.azure.core.util.Context.NONE) + .getWithResponse("sykkbxktxbbwl", "nwzoknvu", "ddlggb", "a", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ConnectionCategory.PAY_PAL, response.properties().category()); - Assertions.assertEquals("nlzt", response.properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T00:33:04Z"), response.properties().expiryTime()); + Assertions.assertEquals(ConnectionCategory.BING_LLMSEARCH, response.properties().category()); + Assertions.assertEquals("kvggcmfns", response.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T21:05:29Z"), response.properties().expiryTime()); Assertions.assertFalse(response.properties().isSharedToAll()); - Assertions.assertEquals("r", response.properties().metadata().get("xeyvidcowlrm")); + Assertions.assertEquals("wewzlscgsme", response.properties().metadata().get("nqvxgvohd")); Assertions.assertEquals(ManagedPERequirement.REQUIRED, response.properties().peRequirement()); Assertions.assertEquals(ManagedPEStatus.ACTIVE, response.properties().peStatus()); - Assertions.assertEquals("of", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("uyhbceev", response.properties().target()); - Assertions.assertTrue(response.properties().useWorkspaceManagedIdentity()); + Assertions.assertEquals("wfmzvztau", response.properties().sharedUserList().get(0)); + Assertions.assertEquals("cssanybzzghv", response.properties().target()); + Assertions.assertFalse(response.properties().useWorkspaceManagedIdentity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsListMockTests.java index ec9845ac36a5..bcb3de7869d3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsListMockTests.java @@ -25,7 +25,7 @@ public final class ProjectConnectionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"ContainerRegistry\",\"createdByWorkspaceArmId\":\"dzycxhaoegjzgplj\",\"error\":\"wczsrazcbybic\",\"expiryTime\":\"2021-03-27T06:25:11Z\",\"group\":\"Azure\",\"isSharedToAll\":true,\"metadata\":{\"otennd\":\"asizzfmugykwuyc\",\"jzffp\":\"gthdzi\",\"adezmzxvf\":\"erwjqvswtwo\",\"o\":\"bxmmrvnuvqkrrsg\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"Active\",\"sharedUserList\":[\"p\",\"abensjflwpftvv\",\"tmvifgcv\",\"im\"],\"target\":\"bmticxgosnxajp\",\"useWorkspaceManagedIdentity\":false},\"id\":\"mzxaoxlhmvj\",\"name\":\"nn\",\"type\":\"sbnuc\"}]}"; + = "{\"value\":[{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"AzureDatabricksDeltaLake\",\"createdByWorkspaceArmId\":\"wukokgoojj\",\"error\":\"ktubcmunhg\",\"expiryTime\":\"2021-10-05T16:13:21Z\",\"group\":\"Database\",\"isSharedToAll\":false,\"metadata\":{\"cnihkswxmfurqmw\":\"cuufkrfn\",\"t\":\"wwp\",\"mytzuaedrlh\":\"motahbqsvnk\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"hkvxz\"],\"target\":\"i\",\"useWorkspaceManagedIdentity\":true},\"id\":\"ftgpqoswgf\",\"name\":\"vjmghpakbqyhl\",\"type\":\"ornfbm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,20 +35,21 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.projectConnections() - .list("b", "jjpduibsrrrq", "neqrypyur", "shhovtuer", "pzhbw", true, com.azure.core.util.Context.NONE); + .list("arsbbdddwokqxail", "qk", "yqjvzvc", "rdspzesfkqqxu", "vzflbrous", false, + com.azure.core.util.Context.NONE); - Assertions.assertEquals(ConnectionCategory.CONTAINER_REGISTRY, + Assertions.assertEquals(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE, response.iterator().next().properties().category()); - Assertions.assertEquals("wczsrazcbybic", response.iterator().next().properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T06:25:11Z"), + Assertions.assertEquals("ktubcmunhg", response.iterator().next().properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-05T16:13:21Z"), response.iterator().next().properties().expiryTime()); - Assertions.assertTrue(response.iterator().next().properties().isSharedToAll()); - Assertions.assertEquals("asizzfmugykwuyc", response.iterator().next().properties().metadata().get("otennd")); + Assertions.assertFalse(response.iterator().next().properties().isSharedToAll()); + Assertions.assertEquals("cuufkrfn", response.iterator().next().properties().metadata().get("cnihkswxmfurqmw")); Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, response.iterator().next().properties().peRequirement()); - Assertions.assertEquals(ManagedPEStatus.ACTIVE, response.iterator().next().properties().peStatus()); - Assertions.assertEquals("p", response.iterator().next().properties().sharedUserList().get(0)); - Assertions.assertEquals("bmticxgosnxajp", response.iterator().next().properties().target()); - Assertions.assertFalse(response.iterator().next().properties().useWorkspaceManagedIdentity()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, response.iterator().next().properties().peStatus()); + Assertions.assertEquals("hkvxz", response.iterator().next().properties().sharedUserList().get(0)); + Assertions.assertEquals("i", response.iterator().next().properties().target()); + Assertions.assertTrue(response.iterator().next().properties().useWorkspaceManagedIdentity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsUpdateWithResponseMockTests.java index 2af41690a257..7c7e1666f9f6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectConnectionsUpdateWithResponseMockTests.java @@ -29,7 +29,7 @@ public final class ProjectConnectionsUpdateWithResponseMockTests { @Test public void testUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"Zoho\",\"createdByWorkspaceArmId\":\"yws\",\"error\":\"rpzhr\",\"expiryTime\":\"2021-01-01T13:44:39Z\",\"group\":\"Azure\",\"isSharedToAll\":false,\"metadata\":{\"jilbuazcco\":\"yxb\",\"vjsknrbxz\":\"hwivkd\",\"tv\":\"pi\"},\"peRequirement\":\"Required\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"vxqtolpw\",\"opvhcbtzaprjxc\",\"ntickfki\"],\"target\":\"ueocs\",\"useWorkspaceManagedIdentity\":true},\"id\":\"zgbjwvrudmp\",\"name\":\"ewpmioleaja\",\"type\":\"esgyzwph\"}"; + = "{\"properties\":{\"authType\":\"ConnectionPropertiesV2\",\"category\":\"BingLLMSearch\",\"createdByWorkspaceArmId\":\"xzix\",\"error\":\"lxwmvcdkucpx\",\"expiryTime\":\"2021-06-12T02:15:20Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"metadata\":{\"jseml\":\"rogeuvmkrspnr\",\"ljpetexutikelpmw\":\"ofrsnq\"},\"peRequirement\":\"Required\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"dhvos\",\"jzscuezalivdf\"],\"target\":\"qj\",\"useWorkspaceManagedIdentity\":false},\"id\":\"f\",\"name\":\"rxggezkhzp\",\"type\":\"iqissene\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,32 +39,31 @@ public void testUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ConnectionPropertiesV2BasicResource response = manager.projectConnections() - .updateWithResponse("fqmljewynb", "vvcwvurkmjufavvl", "pbsotmynkl", "mrznmtvrkk", + .updateWithResponse("upfazusj", "dhuslgdwz", "gdqyxajc", "grcavqc", new ConnectionUpdateContent() - .withProperties(new ConnectionPropertiesV2().withCategory(ConnectionCategory.HDFS) - .withError("xutcbvriuvnfazx") - .withExpiryTime(OffsetDateTime.parse("2021-05-21T04:39:38Z")) - .withIsSharedToAll(false) - .withMetadata(mapOf("wojoqf", "vjqkqtjwrv", "gjijzqjhljsazm", "qetxtdqiuspguzlj", - "gsbfeiirpnjy", "sisfqqhcmec")) - .withPeRequirement(ManagedPERequirement.REQUIRED) + .withProperties(new ConnectionPropertiesV2().withCategory(ConnectionCategory.AZURE_MARIA_DB) + .withError("cwwsj") + .withExpiryTime(OffsetDateTime.parse("2021-06-17T04:47:14Z")) + .withIsSharedToAll(true) + .withMetadata(mapOf("sqxile", "tqqwwgf")) + .withPeRequirement(ManagedPERequirement.NOT_APPLICABLE) .withPeStatus(ManagedPEStatus.ACTIVE) - .withSharedUserList(Arrays.asList("hgsju", "zcajlwmqc", "cabaam")) - .withTarget("hdhpmkxdujkxpu") + .withSharedUserList(Arrays.asList("znequq", "nttwk", "hajksbsyogjmqjhg")) + .withTarget("dijnmcvjbs") .withUseWorkspaceManagedIdentity(true)), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ConnectionCategory.ZOHO, response.properties().category()); - Assertions.assertEquals("rpzhr", response.properties().error()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T13:44:39Z"), response.properties().expiryTime()); - Assertions.assertFalse(response.properties().isSharedToAll()); - Assertions.assertEquals("yxb", response.properties().metadata().get("jilbuazcco")); + Assertions.assertEquals(ConnectionCategory.BING_LLMSEARCH, response.properties().category()); + Assertions.assertEquals("lxwmvcdkucpx", response.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-12T02:15:20Z"), response.properties().expiryTime()); + Assertions.assertTrue(response.properties().isSharedToAll()); + Assertions.assertEquals("rogeuvmkrspnr", response.properties().metadata().get("jseml")); Assertions.assertEquals(ManagedPERequirement.REQUIRED, response.properties().peRequirement()); - Assertions.assertEquals(ManagedPEStatus.INACTIVE, response.properties().peStatus()); - Assertions.assertEquals("vxqtolpw", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("ueocs", response.properties().target()); - Assertions.assertTrue(response.properties().useWorkspaceManagedIdentity()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, response.properties().peStatus()); + Assertions.assertEquals("dhvos", response.properties().sharedUserList().get(0)); + Assertions.assertEquals("qj", response.properties().target()); + Assertions.assertFalse(response.properties().useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectInnerTests.java index 7b0a8244a434..b56b0c1ff513 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectInnerTests.java @@ -19,40 +19,40 @@ public final class ProjectInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProjectInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"kak\",\"description\":\"ldtve\",\"endpoints\":{\"hzjkn\":\"cl\",\"pzaamrdixtreki\":\"uxgvttxpnr\"},\"isDefault\":true,\"capabilitySettings\":{\"documentStore\":\"kbr\",\"vectorStore\":\"fgllukkutvlx\",\"blobStore\":\"pqhvmblcouqehbhb\"}},\"tags\":{\"mbltoo\":\"ziryrandoy\",\"alsygao\":\"mkfqlwxldy\",\"sibjgs\":\"njpnnbmj\"},\"location\":\"xxahmrnadzyqegxy\",\"etag\":\"pinbmhwbjijkgqxn\",\"identity\":{\"type\":\"UserAssigned\",\"tenantId\":\"znj\",\"principalId\":\"jvaannggiycwkd\",\"userAssignedIdentities\":{\"mrrqmbzmqkratb\":{\"principalId\":\"xw\",\"clientId\":\"ka\"},\"ijymrhbguzozky\":{\"principalId\":\"wbjsidbirkf\",\"clientId\":\"sokdgoge\"}}},\"id\":\"nfnzhhh\",\"name\":\"o\",\"type\":\"mffjkutycyarn\"}") + "{\"properties\":{\"provisioningState\":\"Creating\",\"displayName\":\"hvtrrmhwrbfdpyf\",\"description\":\"bhvjglr\",\"endpoints\":{\"memhooclutnpq\":\"yzlwh\",\"jk\":\"emc\"},\"isDefault\":false,\"capabilitySettings\":{\"documentStore\":\"ujxsglhsr\",\"vectorStore\":\"yejylmbkzudnigrf\",\"blobStore\":\"otjewlpxuzzjgnre\"}},\"tags\":{\"oihiqak\":\"hqo\",\"brkwpzdqt\":\"diw\",\"aqa\":\"hcspo\",\"tgbebj\":\"sipi\"},\"location\":\"lbmoichd\",\"etag\":\"nfpubntnbatz\",\"identity\":{\"type\":\"SystemAssigned\",\"tenantId\":\"wsaae\",\"principalId\":\"attcju\",\"userAssignedIdentities\":{\"sfxsf\":{\"principalId\":\"vkmjcwmjvlgf\",\"clientId\":\"cvkyylizrzbj\"},\"eofiz\":{\"principalId\":\"tl\",\"clientId\":\"mvagbwidqlvhuko\"}}},\"id\":\"jfnmjmvlwyz\",\"name\":\"iblkujr\",\"type\":\"lfojuidjp\"}") .toObject(ProjectInner.class); - Assertions.assertEquals("kak", model.properties().displayName()); - Assertions.assertEquals("ldtve", model.properties().description()); - Assertions.assertEquals("kbr", model.properties().capabilitySettings().documentStore()); - Assertions.assertEquals("fgllukkutvlx", model.properties().capabilitySettings().vectorStore()); - Assertions.assertEquals("pqhvmblcouqehbhb", model.properties().capabilitySettings().blobStore()); - Assertions.assertEquals("ziryrandoy", model.tags().get("mbltoo")); - Assertions.assertEquals("xxahmrnadzyqegxy", model.location()); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("hvtrrmhwrbfdpyf", model.properties().displayName()); + Assertions.assertEquals("bhvjglr", model.properties().description()); + Assertions.assertEquals("ujxsglhsr", model.properties().capabilitySettings().documentStore()); + Assertions.assertEquals("yejylmbkzudnigrf", model.properties().capabilitySettings().vectorStore()); + Assertions.assertEquals("otjewlpxuzzjgnre", model.properties().capabilitySettings().blobStore()); + Assertions.assertEquals("hqo", model.tags().get("oihiqak")); + Assertions.assertEquals("lbmoichd", model.location()); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ProjectInner model = new ProjectInner() - .withProperties(new ProjectProperties().withDisplayName("kak") - .withDescription("ldtve") - .withCapabilitySettings(new CapabilitySettings().withDocumentStore("kbr") - .withVectorStore("fgllukkutvlx") - .withBlobStore("pqhvmblcouqehbhb"))) - .withTags(mapOf("mbltoo", "ziryrandoy", "alsygao", "mkfqlwxldy", "sibjgs", "njpnnbmj")) - .withLocation("xxahmrnadzyqegxy") - .withIdentity(new Identity().withType(ResourceIdentityType.USER_ASSIGNED) + .withProperties(new ProjectProperties().withDisplayName("hvtrrmhwrbfdpyf") + .withDescription("bhvjglr") + .withCapabilitySettings(new CapabilitySettings().withDocumentStore("ujxsglhsr") + .withVectorStore("yejylmbkzudnigrf") + .withBlobStore("otjewlpxuzzjgnre"))) + .withTags(mapOf("oihiqak", "hqo", "brkwpzdqt", "diw", "aqa", "hcspo", "tgbebj", "sipi")) + .withLocation("lbmoichd") + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities( - mapOf("mrrqmbzmqkratb", new UserAssignedIdentity(), "ijymrhbguzozky", new UserAssignedIdentity()))); + mapOf("sfxsf", new UserAssignedIdentity(), "eofiz", new UserAssignedIdentity()))); model = BinaryData.fromObject(model).toObject(ProjectInner.class); - Assertions.assertEquals("kak", model.properties().displayName()); - Assertions.assertEquals("ldtve", model.properties().description()); - Assertions.assertEquals("kbr", model.properties().capabilitySettings().documentStore()); - Assertions.assertEquals("fgllukkutvlx", model.properties().capabilitySettings().vectorStore()); - Assertions.assertEquals("pqhvmblcouqehbhb", model.properties().capabilitySettings().blobStore()); - Assertions.assertEquals("ziryrandoy", model.tags().get("mbltoo")); - Assertions.assertEquals("xxahmrnadzyqegxy", model.location()); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("hvtrrmhwrbfdpyf", model.properties().displayName()); + Assertions.assertEquals("bhvjglr", model.properties().description()); + Assertions.assertEquals("ujxsglhsr", model.properties().capabilitySettings().documentStore()); + Assertions.assertEquals("yejylmbkzudnigrf", model.properties().capabilitySettings().vectorStore()); + Assertions.assertEquals("otjewlpxuzzjgnre", model.properties().capabilitySettings().blobStore()); + Assertions.assertEquals("hqo", model.tags().get("oihiqak")); + Assertions.assertEquals("lbmoichd", model.location()); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectListResultTests.java index 65430d8c0497..ab643f0595bd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectListResultTests.java @@ -12,8 +12,8 @@ public final class ProjectListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProjectListResult model = BinaryData.fromString( - "{\"nextLink\":\"l\",\"value\":[{\"properties\":{\"provisioningState\":\"ResolvingDNS\",\"displayName\":\"psjoqcjenk\",\"description\":\"fq\",\"endpoints\":{\"elgcmpzqjhhhqx\":\"qxfx\",\"vcacoyv\":\"w\",\"lzijiufehgmvflnw\":\"vbsizusjszlbscm\",\"kxrerlniylylyfwx\":\"v\"},\"isDefault\":true,\"capabilitySettings\":{\"documentStore\":\"ztwhghmupg\",\"vectorStore\":\"jtcdxabbujftaben\",\"blobStore\":\"klqpx\"}},\"tags\":{\"wxudgn\":\"afeddwwnlza\",\"gpbemeluclvdjju\":\"gookrtalvnb\"},\"location\":\"rdnqodxahhxhqf\",\"etag\":\"nvzoqgyipemch\",\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"tenantId\":\"zuejd\",\"principalId\":\"ptlghwzhomewjjst\",\"userAssignedIdentities\":{\"vvbxiwkgfbqljnq\":{\"principalId\":\"qawmoaianc\",\"clientId\":\"vodrrslblxydkxr\"},\"weyurkphyjd\":{\"principalId\":\"ychocokulehu\",\"clientId\":\"lrqff\"},\"bapxkiyfjjkb\":{\"principalId\":\"av\",\"clientId\":\"qdbrxmrgc\"}}},\"id\":\"buscgduus\",\"name\":\"oycblevpmc\",\"type\":\"ujyxkyxlzgsj\"}]}") + "{\"nextLink\":\"awjmjsmw\",\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"zzzwy\",\"description\":\"fitlhguynuchl\",\"endpoints\":{\"hmoz\":\"txd\",\"ns\":\"sgzv\",\"fpafolpymwamxq\":\"nj\"},\"isDefault\":false,\"capabilitySettings\":{\"documentStore\":\"gdphtvdula\",\"vectorStore\":\"lejchcsr\",\"blobStore\":\"knmzlanrupdwvnp\"}},\"tags\":{\"hvthlaiwdcxsm\":\"zqtpjhmq\",\"txetlgydl\":\"zzhz\",\"rbgjekglkl\":\"qvlnnpxybafiqgea\",\"eg\":\"yulidwcwvm\"},\"location\":\"nfhjirwgdnqzbr\",\"etag\":\"spzhzmtksjc\",\"identity\":{\"type\":\"UserAssigned\",\"tenantId\":\"sxcdgljplkeuach\",\"principalId\":\"mflrytswfpfmdgyc\",\"userAssignedIdentities\":{\"wqslsrhmpqvw\":{\"principalId\":\"kwhqj\",\"clientId\":\"slurlpshhkvpe\"},\"a\":{\"principalId\":\"kondcb\",\"clientId\":\"imuvqejosovyrrl\"},\"bbmpxdlvykfre\":{\"principalId\":\"inuqtljq\",\"clientId\":\"bpihehcecybmrqbr\"}}},\"id\":\"rseqwjksghudgz\",\"name\":\"xog\",\"type\":\"ggsvoujkxibdaf\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"yomkxfbvfbhdy\",\"description\":\"hpwpgddeimawzovg\",\"endpoints\":{\"sqowxwc\":\"muikjcjcaztbws\"},\"isDefault\":true,\"capabilitySettings\":{\"documentStore\":\"ytwvczcswkacve\",\"vectorStore\":\"fdv\",\"blobStore\":\"hbwrnfxtgddpqth\"}},\"tags\":{\"nkcoeqswankltyt\":\"mnaoy\"},\"location\":\"droznn\",\"etag\":\"rlktgjcsggu\",\"identity\":{\"type\":\"UserAssigned\",\"tenantId\":\"wyw\",\"principalId\":\"eczgfb\",\"userAssignedIdentities\":{\"jcdoewb\":{\"principalId\":\"elssxblycs\",\"clientId\":\"ujksrlsmdesqplpv\"},\"paxwkufyk\":{\"principalId\":\"yvteowxvgpiudeu\",\"clientId\":\"sxze\"}}},\"id\":\"uhxep\",\"name\":\"rutznabaobnsluj\",\"type\":\"jltymkmvguihy\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"displayName\":\"pphkixkykxds\",\"description\":\"pemmucfxhik\",\"endpoints\":{\"s\":\"rmymyincqlhr\",\"iiiovgqcgxuugq\":\"sl\",\"e\":\"ctotiowlx\",\"wphqlkccuzgygqw\":\"dptjgwdtgukranb\"},\"isDefault\":true,\"capabilitySettings\":{\"documentStore\":\"lwgniiprglvawu\",\"vectorStore\":\"d\",\"blobStore\":\"ypivlsbb\"}},\"tags\":{\"oxxkubvp\":\"cubkmi\"},\"location\":\"v\",\"etag\":\"h\",\"identity\":{\"type\":\"UserAssigned\",\"tenantId\":\"vgovpbbttefjokn\",\"principalId\":\"qyzqedikdfrdb\",\"userAssignedIdentities\":{\"vljvrc\":{\"principalId\":\"jgeihfqlggwfi\",\"clientId\":\"cxmjpbyephmg\"},\"myqwcab\":{\"principalId\":\"fqip\",\"clientId\":\"hnp\"},\"swlpaugmrmfj\":{\"principalId\":\"ui\",\"clientId\":\"ey\"},\"jwuive\":{\"principalId\":\"xwtoaukhfkvc\",\"clientId\":\"izmoaeds\"}}},\"id\":\"cgyee\",\"name\":\"xeiqbpsmg\",\"type\":\"mguaml\"}]}") .toObject(ProjectListResult.class); - Assertions.assertEquals("l", model.nextLink()); + Assertions.assertEquals("awjmjsmw", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectPropertiesTests.java index a60749179f10..25f427c6b27d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectPropertiesTests.java @@ -13,27 +13,27 @@ public final class ProjectPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProjectProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Accepted\",\"displayName\":\"g\",\"description\":\"bzog\",\"endpoints\":{\"czhcoeocnh\":\"dp\"},\"isDefault\":true,\"capabilitySettings\":{\"documentStore\":\"tjzcfyjzpt\",\"vectorStore\":\"lohap\",\"blobStore\":\"nfszpyglqdhmrjz\"}}") + "{\"provisioningState\":\"Failed\",\"displayName\":\"ucejikzoeovvtz\",\"description\":\"et\",\"endpoints\":{\"k\":\"nt\"},\"isDefault\":false,\"capabilitySettings\":{\"documentStore\":\"dbqzolxrzvhqjw\",\"vectorStore\":\"htgv\",\"blobStore\":\"pcrrk\"}}") .toObject(ProjectProperties.class); - Assertions.assertEquals("g", model.displayName()); - Assertions.assertEquals("bzog", model.description()); - Assertions.assertEquals("tjzcfyjzpt", model.capabilitySettings().documentStore()); - Assertions.assertEquals("lohap", model.capabilitySettings().vectorStore()); - Assertions.assertEquals("nfszpyglqdhmrjz", model.capabilitySettings().blobStore()); + Assertions.assertEquals("ucejikzoeovvtz", model.displayName()); + Assertions.assertEquals("et", model.description()); + Assertions.assertEquals("dbqzolxrzvhqjw", model.capabilitySettings().documentStore()); + Assertions.assertEquals("htgv", model.capabilitySettings().vectorStore()); + Assertions.assertEquals("pcrrk", model.capabilitySettings().blobStore()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProjectProperties model = new ProjectProperties().withDisplayName("g") - .withDescription("bzog") - .withCapabilitySettings(new CapabilitySettings().withDocumentStore("tjzcfyjzpt") - .withVectorStore("lohap") - .withBlobStore("nfszpyglqdhmrjz")); + ProjectProperties model = new ProjectProperties().withDisplayName("ucejikzoeovvtz") + .withDescription("et") + .withCapabilitySettings(new CapabilitySettings().withDocumentStore("dbqzolxrzvhqjw") + .withVectorStore("htgv") + .withBlobStore("pcrrk")); model = BinaryData.fromObject(model).toObject(ProjectProperties.class); - Assertions.assertEquals("g", model.displayName()); - Assertions.assertEquals("bzog", model.description()); - Assertions.assertEquals("tjzcfyjzpt", model.capabilitySettings().documentStore()); - Assertions.assertEquals("lohap", model.capabilitySettings().vectorStore()); - Assertions.assertEquals("nfszpyglqdhmrjz", model.capabilitySettings().blobStore()); + Assertions.assertEquals("ucejikzoeovvtz", model.displayName()); + Assertions.assertEquals("et", model.description()); + Assertions.assertEquals("dbqzolxrzvhqjw", model.capabilitySettings().documentStore()); + Assertions.assertEquals("htgv", model.capabilitySettings().vectorStore()); + Assertions.assertEquals("pcrrk", model.capabilitySettings().blobStore()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsCreateMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsCreateMockTests.java index d9290ad215ad..e16450c19da6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsCreateMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsCreateMockTests.java @@ -28,7 +28,7 @@ public final class ProjectsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ebzqz\",\"description\":\"sviujojzd\",\"endpoints\":{\"etqhdbitqsby\":\"naosxsxoxvimd\"},\"isDefault\":true,\"capabilitySettings\":{\"documentStore\":\"mrihu\",\"vectorStore\":\"rmsdbvqxgfyg\",\"blobStore\":\"gxbdpbcehwbdpse\"}},\"tags\":{\"orrvk\":\"ynpyt\",\"npjnezjighdumltp\":\"tfctanetinqxd\",\"xvfhuqhn\":\"rzwvwetqff\",\"clmr\":\"qqxjbsot\"},\"location\":\"u\",\"etag\":\"deatwxpx\",\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"tenantId\":\"xbboceksramqch\",\"principalId\":\"gfnlvvkswurxd\",\"userAssignedIdentities\":{\"ivlqcwyzhndqkzst\":{\"principalId\":\"auimnntf\",\"clientId\":\"pwqcnbn\"},\"cimtcaumviud\":{\"principalId\":\"zecdlceirta\",\"clientId\":\"u\"},\"mpjbh\":{\"principalId\":\"sjqrmlujmtun\",\"clientId\":\"fwuzebfq\"},\"xocjcd\":{\"principalId\":\"enfspetxeu\",\"clientId\":\"khdlckd\"}}},\"id\":\"zpf\",\"name\":\"eortwwyjmgvr\",\"type\":\"hfxmrhjnnhbcj\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"dvucfvvra\",\"description\":\"eurdeewlsuxp\",\"endpoints\":{\"fmfta\":\"kdwjyjiznioro\",\"trnighm\":\"pmcreihu\",\"gwfmsxjwdylwxm\":\"nuwqxungro\",\"ugeerclbltbhpwac\":\"zjow\"},\"isDefault\":true,\"capabilitySettings\":{\"documentStore\":\"jwmvwryvdi\",\"vectorStore\":\"ii\",\"blobStore\":\"pruccwme\"}},\"tags\":{\"jywiwhvyc\":\"xsytrtexegwmr\",\"uriarsbcl\":\"jncindiloqkajw\",\"knjxizbaxdy\":\"anhz\",\"xfexwacy\":\"zkz\"},\"location\":\"mlxppdndzkfevuii\",\"etag\":\"ibfkcjytq\",\"identity\":{\"type\":\"None\",\"tenantId\":\"qqfopvno\",\"principalId\":\"otdsfhoxq\",\"userAssignedIdentities\":{\"gbqkvhyejthgeecb\":{\"principalId\":\"zyfbkmvldzmxojz\",\"clientId\":\"ma\"},\"npu\":{\"principalId\":\"rgwlc\",\"clientId\":\"hbamyqsok\"}}},\"id\":\"jwdizcrjixiujz\",\"name\":\"c\",\"type\":\"exgkrsw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,31 +39,29 @@ public void testCreate() throws Exception { Project response = manager.projects() - .define("lwruklfq") - .withExistingAccount("khhk", "mrvkxeojtdyulglh") - .withRegion("nyjtuqgzyvextchs") - .withTags(mapOf("uayiqyl", "orjvudyhgtrtt", "q", "kmmxzifbqgqexo", "fy", "rtgqrqkk", "inpgobothxiew", - "kuobpw")) - .withProperties(new ProjectProperties().withDisplayName("gogypbztgaex") - .withDescription("skvctvu") - .withCapabilitySettings(new CapabilitySettings().withDocumentStore("zjggkwd") - .withVectorStore("emzia") - .withBlobStore("iqii"))) + .define("qukr") + .withExistingAccount("ruptsyqcjnq", "wxdowum") + .withRegion("ufytdxmly") + .withTags(mapOf("cmyhrhjvszfqb", "zvbwfcnjhbpoelh", "pqwojoev", "kndwp")) + .withProperties(new ProjectProperties().withDisplayName("clqddnhfknebw") + .withDescription("dpnyzcwyjsmkaql") + .withCapabilitySettings(new CapabilitySettings().withDocumentStore("pa") + .withVectorStore("edbfo") + .withBlobStore("czvothmkh"))) .withIdentity( - new Identity().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("cfgdwzauz", new UserAssignedIdentity(), "lykqadfge", - new UserAssignedIdentity(), "iljqovqmx", new UserAssignedIdentity(), "kgltsxooiobhieb", + new Identity().withType(ResourceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("tevrntfknwac", new UserAssignedIdentity(), "qwcublehhk", new UserAssignedIdentity()))) .create(); - Assertions.assertEquals("ebzqz", response.properties().displayName()); - Assertions.assertEquals("sviujojzd", response.properties().description()); - Assertions.assertEquals("mrihu", response.properties().capabilitySettings().documentStore()); - Assertions.assertEquals("rmsdbvqxgfyg", response.properties().capabilitySettings().vectorStore()); - Assertions.assertEquals("gxbdpbcehwbdpse", response.properties().capabilitySettings().blobStore()); - Assertions.assertEquals("ynpyt", response.tags().get("orrvk")); - Assertions.assertEquals("u", response.location()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("dvucfvvra", response.properties().displayName()); + Assertions.assertEquals("eurdeewlsuxp", response.properties().description()); + Assertions.assertEquals("jwmvwryvdi", response.properties().capabilitySettings().documentStore()); + Assertions.assertEquals("ii", response.properties().capabilitySettings().vectorStore()); + Assertions.assertEquals("pruccwme", response.properties().capabilitySettings().blobStore()); + Assertions.assertEquals("xsytrtexegwmr", response.tags().get("jywiwhvyc")); + Assertions.assertEquals("mlxppdndzkfevuii", response.location()); + Assertions.assertEquals(ResourceIdentityType.NONE, response.identity().type()); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsDeleteMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsDeleteMockTests.java index 2e21e7f03a17..16228b650bee 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsDeleteMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.projects().delete("rnacki", "lwgebylpzjeldaqw", "unilni", com.azure.core.util.Context.NONE); + manager.projects().delete("zrqnjxm", "vsduydw", "wg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsGetWithResponseMockTests.java index c35e396752bc..e69cdf9d7df9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ProjectsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"ExtensionUnreachable\",\"displayName\":\"lewgsltut\",\"description\":\"vedwuu\",\"endpoints\":{\"kk\":\"enxcqsxwclykcrud\",\"mptedeuenthsh\":\"njre\",\"kkhpjngla\":\"fiygpg\"},\"isDefault\":true,\"capabilitySettings\":{\"documentStore\":\"nmtrd\",\"vectorStore\":\"xiw\",\"blobStore\":\"ecpvfpnrzikvo\"}},\"tags\":{\"bwbl\":\"eohyfivxdi\",\"qrxrosuqrrldxfu\":\"jhpxukxgoyxontbw\",\"ewxatktwjrppi\":\"e\",\"rmd\":\"eyrqve\"},\"location\":\"zhvksbojklwjpz\",\"etag\":\"ncw\",\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"tenantId\":\"ey\",\"principalId\":\"l\",\"userAssignedIdentities\":{\"znghuqzgpdglkf\":{\"principalId\":\"lytfxudui\",\"clientId\":\"omiswkqwopwsnli\"},\"yxpijvapeakfdmc\":{\"principalId\":\"wrgavtfy\",\"clientId\":\"edfmzuk\"},\"a\":{\"principalId\":\"l\",\"clientId\":\"lxkyoddoq\"}}},\"id\":\"trkicwhqyr\",\"name\":\"qmndkr\",\"type\":\"wmurhvifqeqf\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ic\",\"description\":\"f\",\"endpoints\":{\"nqupdkjrzfw\":\"dthkvpyeyoafinm\"},\"isDefault\":true,\"capabilitySettings\":{\"documentStore\":\"bdx\",\"vectorStore\":\"qdcclcv\",\"blobStore\":\"rupaylcvwbzmf\"}},\"tags\":{\"iywqnpfydrfbgcny\":\"ymfjxl\"},\"location\":\"yxmkhmqyncgaul\",\"etag\":\"styygjq\",\"identity\":{\"type\":\"SystemAssigned\",\"tenantId\":\"qg\",\"principalId\":\"mqmiwxzfvvzu\",\"userAssignedIdentities\":{\"dekekzouyveww\":{\"principalId\":\"ufjnbxwb\",\"clientId\":\"dukinhlxh\"},\"te\":{\"principalId\":\"rd\",\"clientId\":\"gldohgcandxfhh\"}}},\"id\":\"dqtdnnc\",\"name\":\"kpljdshvvfkdxc\",\"type\":\"yijjimhi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Project response = manager.projects() - .getWithResponse("df", "pk", "wpdpsegivytab", com.azure.core.util.Context.NONE) + .getWithResponse("svgoocq", "azmzlpcx", "tm", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lewgsltut", response.properties().displayName()); - Assertions.assertEquals("vedwuu", response.properties().description()); - Assertions.assertEquals("nmtrd", response.properties().capabilitySettings().documentStore()); - Assertions.assertEquals("xiw", response.properties().capabilitySettings().vectorStore()); - Assertions.assertEquals("ecpvfpnrzikvo", response.properties().capabilitySettings().blobStore()); - Assertions.assertEquals("eohyfivxdi", response.tags().get("bwbl")); - Assertions.assertEquals("zhvksbojklwjpz", response.location()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("ic", response.properties().displayName()); + Assertions.assertEquals("f", response.properties().description()); + Assertions.assertEquals("bdx", response.properties().capabilitySettings().documentStore()); + Assertions.assertEquals("qdcclcv", response.properties().capabilitySettings().vectorStore()); + Assertions.assertEquals("rupaylcvwbzmf", response.properties().capabilitySettings().blobStore()); + Assertions.assertEquals("ymfjxl", response.tags().get("iywqnpfydrfbgcny")); + Assertions.assertEquals("yxmkhmqyncgaul", response.location()); + Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsListMockTests.java index 399f6b5a856a..ab860db42682 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProjectsListMockTests.java @@ -23,7 +23,7 @@ public final class ProjectsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"displayName\":\"pkod\",\"description\":\"vnqdj\",\"endpoints\":{\"vbqy\":\"twgnldxuczl\",\"iuvcqoqkqwucqs\":\"znrirp\"},\"isDefault\":false,\"capabilitySettings\":{\"documentStore\":\"wtvmijccpkkjl\",\"vectorStore\":\"yvwpr\",\"blobStore\":\"aih\"}},\"tags\":{\"vo\":\"lbhxjppcbqetfzfp\",\"jh\":\"zayjwdu\",\"rwgxeegxbnjnczep\":\"prklatwiuujxsuj\",\"mgbf\":\"pc\"},\"location\":\"quyyaesc\",\"etag\":\"nav\",\"identity\":{\"type\":\"SystemAssigned, UserAssigned\",\"tenantId\":\"kxdtbfkihainzke\",\"principalId\":\"zl\",\"userAssignedIdentities\":{\"vqlhony\":{\"principalId\":\"zcg\",\"clientId\":\"ozlibcbnunzuysaj\"}}},\"id\":\"elivgtibtkqjqjca\",\"name\":\"go\",\"type\":\"y\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"unnqgypuqtnylqu\",\"description\":\"qmvyumgmmuebsnzn\",\"endpoints\":{\"azisvbr\":\"qufmjxcyoseq\",\"on\":\"gcyjpgawepk\",\"brvjztaflv\":\"zpghlrdtbgblxbu\",\"jcq\":\"mfjihv\"},\"isDefault\":false,\"capabilitySettings\":{\"documentStore\":\"uqmmfjewfeqbavdo\",\"vectorStore\":\"wy\",\"blobStore\":\"fm\"}},\"tags\":{\"kwdtlcj\":\"vxgwz\",\"cqzvzrbvgwxhlxr\":\"p\"},\"location\":\"v\",\"etag\":\"rwynb\",\"identity\":{\"type\":\"UserAssigned\",\"tenantId\":\"oymdvhhplk\",\"principalId\":\"wd\",\"userAssignedIdentities\":{\"fasgtlvhqpo\":{\"principalId\":\"eqmgkcswz\",\"clientId\":\"xryearmhpwbuklvs\"},\"hllpokjyghzt\":{\"principalId\":\"osjaemc\",\"clientId\":\"evft\"}}},\"id\":\"miwtpcflcez\",\"name\":\"wwvwiftdjtv\",\"type\":\"fpf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,17 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.projects().list("h", "cbrdsypotn", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.projects().list("uhhqldrdymnswxie", "qwqnghxnimvy", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pkod", response.iterator().next().properties().displayName()); - Assertions.assertEquals("vnqdj", response.iterator().next().properties().description()); - Assertions.assertEquals("wtvmijccpkkjl", + Assertions.assertEquals("unnqgypuqtnylqu", response.iterator().next().properties().displayName()); + Assertions.assertEquals("qmvyumgmmuebsnzn", response.iterator().next().properties().description()); + Assertions.assertEquals("uqmmfjewfeqbavdo", response.iterator().next().properties().capabilitySettings().documentStore()); - Assertions.assertEquals("yvwpr", response.iterator().next().properties().capabilitySettings().vectorStore()); - Assertions.assertEquals("aih", response.iterator().next().properties().capabilitySettings().blobStore()); - Assertions.assertEquals("lbhxjppcbqetfzfp", response.iterator().next().tags().get("vo")); - Assertions.assertEquals("quyyaesc", response.iterator().next().location()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); + Assertions.assertEquals("wy", response.iterator().next().properties().capabilitySettings().vectorStore()); + Assertions.assertEquals("fm", response.iterator().next().properties().capabilitySettings().blobStore()); + Assertions.assertEquals("vxgwz", response.iterator().next().tags().get("kwdtlcj")); + Assertions.assertEquals("v", response.iterator().next().location()); + Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProvisioningIssuePropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProvisioningIssuePropertiesTests.java index 222772cfdb1a..f1444b8341d2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProvisioningIssuePropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProvisioningIssuePropertiesTests.java @@ -13,25 +13,24 @@ public final class ProvisioningIssuePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProvisioningIssueProperties model = BinaryData.fromString( - "{\"issueType\":\"hpwpgddeimawzovg\",\"severity\":\"um\",\"description\":\"kjcjcaztbwsnsqow\",\"suggestedResourceIds\":[\"omlik\",\"twvc\",\"cswkacvejy\",\"dvlvhbwrnfxtgdd\"],\"suggestedAccessRules\":[{\"name\":\"ehnmnaoyankco\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"kltytmhdroz\",\"nhd\"],\"subscriptions\":[{\"id\":\"gjc\"}],\"networkSecurityPerimeters\":[{\"id\":\"xhem\",\"perimeterGuid\":\"ywaeeczgf\",\"location\":\"kklelssxblycs\"},{\"id\":\"ujksrlsmdesqplpv\",\"perimeterGuid\":\"cdoewbidyv\",\"location\":\"owx\"}],\"fullyQualifiedDomainNames\":[\"iudeu\",\"fsxzecp\",\"xw\",\"ufykhvuhxepmru\"]}}]}") + "{\"issueType\":\"hpzvuqdflvoniyp\",\"severity\":\"ubcpzgpxti\",\"description\":\"j\",\"suggestedResourceIds\":[\"dibgqjxgpnrhgov\",\"gpikqmh\",\"ao\"],\"suggestedAccessRules\":[{\"name\":\"zvuporqzdfuydz\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"nq\",\"xqpswok\",\"vkhlggdhbemz\"],\"subscriptions\":[{\"id\":\"zu\"},{\"id\":\"wtglxx\"},{\"id\":\"jfpgpicrmn\"}],\"networkSecurityPerimeters\":[{\"id\":\"mqgjsxvpq\",\"perimeterGuid\":\"frmbodthsqq\",\"location\":\"riibakclacj\"},{\"id\":\"nxo\",\"perimeterGuid\":\"xauzlwvsgmwohqfz\",\"location\":\"vux\"}],\"fullyQualifiedDomainNames\":[\"jsvthnwpzteko\",\"mribiat\",\"gplucfotangcfhny\",\"zcugswvxwlmzqw\"]}},{\"name\":\"tx\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"uqudtcvclxyn\",\"dkvgfabuiyjibuzp\",\"dugneiknp\"],\"subscriptions\":[{\"id\":\"jiuqhibtozi\"},{\"id\":\"wjedmurrxxgew\"}],\"networkSecurityPerimeters\":[{\"id\":\"qylkmqpzoyhlf\",\"perimeterGuid\":\"gwgcl\",\"location\":\"oebqinjipn\"},{\"id\":\"fujqlafcba\",\"perimeterGuid\":\"pzpofoiyjw\",\"location\":\"ilkmk\"},{\"id\":\"olvdnd\",\"perimeterGuid\":\"auo\",\"location\":\"huartv\"},{\"id\":\"ukyefchnmnahmnxh\",\"perimeterGuid\":\"jqirwrw\",\"location\":\"oxffif\"}],\"fullyQualifiedDomainNames\":[\"rsnewmozqvbubqma\",\"hsycxhxzgaz\",\"taboidvmf\",\"hppubowsepdfgkmt\"]}}]}") .toObject(ProvisioningIssueProperties.class); - Assertions.assertEquals("hpwpgddeimawzovg", model.issueType()); - Assertions.assertEquals("um", model.severity()); - Assertions.assertEquals("kjcjcaztbwsnsqow", model.description()); - Assertions.assertEquals("omlik", model.suggestedResourceIds().get(0)); - Assertions.assertEquals("ehnmnaoyankco", model.suggestedAccessRules().get(0).name()); + Assertions.assertEquals("hpzvuqdflvoniyp", model.issueType()); + Assertions.assertEquals("ubcpzgpxti", model.severity()); + Assertions.assertEquals("j", model.description()); + Assertions.assertEquals("dibgqjxgpnrhgov", model.suggestedResourceIds().get(0)); + Assertions.assertEquals("zvuporqzdfuydz", model.suggestedAccessRules().get(0).name()); Assertions.assertEquals(NspAccessRuleDirection.OUTBOUND, model.suggestedAccessRules().get(0).properties().direction()); - Assertions.assertEquals("kltytmhdroz", - model.suggestedAccessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("gjc", model.suggestedAccessRules().get(0).properties().subscriptions().get(0).id()); - Assertions.assertEquals("xhem", + Assertions.assertEquals("nq", model.suggestedAccessRules().get(0).properties().addressPrefixes().get(0)); + Assertions.assertEquals("zu", model.suggestedAccessRules().get(0).properties().subscriptions().get(0).id()); + Assertions.assertEquals("mqgjsxvpq", model.suggestedAccessRules().get(0).properties().networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals("ywaeeczgf", + Assertions.assertEquals("frmbodthsqq", model.suggestedAccessRules().get(0).properties().networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("kklelssxblycs", + Assertions.assertEquals("riibakclacj", model.suggestedAccessRules().get(0).properties().networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("iudeu", + Assertions.assertEquals("jsvthnwpzteko", model.suggestedAccessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProvisioningIssueTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProvisioningIssueTests.java index f857fcd14b83..e0d956a17384 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProvisioningIssueTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ProvisioningIssueTests.java @@ -13,19 +13,19 @@ public final class ProvisioningIssueTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProvisioningIssue model = BinaryData.fromString( - "{\"name\":\"wdcxsmlzzhz\",\"properties\":{\"issueType\":\"etlgydlhqvlnnpx\",\"severity\":\"afiqgeaarbgjekg\",\"description\":\"lbyulidwcwvmze\",\"suggestedResourceIds\":[\"nfhjirwgdnqzbr\"],\"suggestedAccessRules\":[{\"name\":\"zhzmtksjci\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"cdgljplkeuac\",\"tomflrytswfpf\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"mskwhqjjysl\",\"rlpshhkv\"]}},{\"name\":\"dwqslsrhmpqvw\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"cbrwi\",\"uvqejosovyrrle\",\"esi\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"obbpihehc\",\"cy\",\"mrqbrjbbmpxdlv\"]}},{\"name\":\"frexcrseqw\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"dgzhxogj\",\"gsv\",\"u\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"fhrkmdyom\",\"xfbvfb\",\"dy\"]}}]}}") + "{\"name\":\"czytqjtwhauunfpr\",\"properties\":{\"issueType\":\"etlxsm\",\"severity\":\"ddoui\",\"description\":\"mowaziynknlqwzdv\",\"suggestedResourceIds\":[\"hxqszdtmaajquh\"],\"suggestedAccessRules\":[{\"name\":\"rjvmtygjbmzyosp\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"fkyjpmspbpssdfpp\",\"ogtieyujtvczkcny\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"d\",\"vg\",\"nkvxlxpaglqi\",\"bgkc\"]}}]}}") .toObject(ProvisioningIssue.class); - Assertions.assertEquals("wdcxsmlzzhz", model.name()); - Assertions.assertEquals("etlgydlhqvlnnpx", model.properties().issueType()); - Assertions.assertEquals("afiqgeaarbgjekg", model.properties().severity()); - Assertions.assertEquals("lbyulidwcwvmze", model.properties().description()); - Assertions.assertEquals("nfhjirwgdnqzbr", model.properties().suggestedResourceIds().get(0)); - Assertions.assertEquals("zhzmtksjci", model.properties().suggestedAccessRules().get(0).name()); + Assertions.assertEquals("czytqjtwhauunfpr", model.name()); + Assertions.assertEquals("etlxsm", model.properties().issueType()); + Assertions.assertEquals("ddoui", model.properties().severity()); + Assertions.assertEquals("mowaziynknlqwzdv", model.properties().description()); + Assertions.assertEquals("hxqszdtmaajquh", model.properties().suggestedResourceIds().get(0)); + Assertions.assertEquals("rjvmtygjbmzyosp", model.properties().suggestedAccessRules().get(0).name()); Assertions.assertEquals(NspAccessRuleDirection.OUTBOUND, model.properties().suggestedAccessRules().get(0).properties().direction()); - Assertions.assertEquals("cdgljplkeuac", + Assertions.assertEquals("fkyjpmspbpssdfpp", model.properties().suggestedAccessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("mskwhqjjysl", + Assertions.assertEquals("d", model.properties().suggestedAccessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierInnerTests.java index 0183b7761ff4..388588f37691 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierInnerTests.java @@ -14,7 +14,7 @@ public final class QuotaTierInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaTierInner model = BinaryData.fromString( - "{\"properties\":{\"currentTierName\":\"ytxtdgu\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-05-14T02:48:25Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"gdstyouam\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-03-14T15:02:31Z\",\"upgradeUnavailabilityReason\":\"wmowegmmute\"}},\"id\":\"eyguq\",\"name\":\"gijiitnspxlzd\",\"type\":\"sygrijwa\"}") + "{\"properties\":{\"currentTierName\":\"qxuwyvca\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-06-20T08:40:01Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"s\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-10-19T07:33:38Z\",\"upgradeUnavailabilityReason\":\"zlbscmnlziji\"}},\"id\":\"ehgmvflnwyv\",\"name\":\"kxrerlniylylyfwx\",\"type\":\"utgqztwh\"}") .toObject(QuotaTierInner.class); Assertions.assertEquals(TierUpgradePolicy.ONCE_UPGRADE_IS_AVAILABLE, model.properties().tierUpgradePolicy()); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierListResultTests.java index 535f2b616ac9..eaeb5a1158b6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierListResultTests.java @@ -12,8 +12,8 @@ public final class QuotaTierListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaTierListResult model = BinaryData.fromString( - "{\"nextLink\":\"jpodtbl\",\"value\":[{\"properties\":{\"currentTierName\":\"j\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-08-28T12:04:51Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"kincnremeh\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-10-08T06:34:01Z\",\"upgradeUnavailabilityReason\":\"eumoqod\"}},\"id\":\"dppyibngqlady\",\"name\":\"rxwhydtlu\",\"type\":\"vadswzs\"},{\"properties\":{\"currentTierName\":\"emlowuowhl\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-06-28T07:40:34Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"ouvblgmo\",\"upgradeAvailabilityStatus\":\"Available\",\"upgradeApplicableDate\":\"2021-10-31T18:45:37Z\",\"upgradeUnavailabilityReason\":\"fowtdvrfmvlihcvj\"}},\"id\":\"qcrj\",\"name\":\"dhftukvhdxlwy\",\"type\":\"jbfqzdk\"},{\"properties\":{\"currentTierName\":\"yixhafratqxmb\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-09-04T03:31:26Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"n\",\"upgradeAvailabilityStatus\":\"Available\",\"upgradeApplicableDate\":\"2020-12-31T11:36:02Z\",\"upgradeUnavailabilityReason\":\"huzgfxo\"}},\"id\":\"tpusllywp\",\"name\":\"tiotzb\",\"type\":\"d\"}]}") + "{\"nextLink\":\"bemeluclvd\",\"value\":[{\"properties\":{\"currentTierName\":\"rdnqodxahhxhqf\",\"tierUpgradePolicy\":\"NoAutoUpgrade\",\"assignmentDate\":\"2021-09-08T05:38:07Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"gyipem\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-02-09T00:26:50Z\",\"upgradeUnavailabilityReason\":\"czuejdtxptl\"}},\"id\":\"wzhomewjjstl\",\"name\":\"uhqawmoaianc\",\"type\":\"nvodrrs\"},{\"properties\":{\"currentTierName\":\"xydkxrx\",\"tierUpgradePolicy\":\"NoAutoUpgrade\",\"assignmentDate\":\"2021-10-16T10:45:11Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"g\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-12-10T21:52:21Z\",\"upgradeUnavailabilityReason\":\"qkhychocok\"}},\"id\":\"ehurqlr\",\"name\":\"ffaweyur\",\"type\":\"phyjdxravj\"},{\"properties\":{\"currentTierName\":\"brxmrgch\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-09-10T14:09:21Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"fjjkbajb\",\"upgradeAvailabilityStatus\":\"Available\",\"upgradeApplicableDate\":\"2021-06-28T21:28:34Z\",\"upgradeUnavailabilityReason\":\"u\"}},\"id\":\"oycblevpmc\",\"name\":\"ujyxkyxlzgsj\",\"type\":\"kzzltafhbzf\"},{\"properties\":{\"currentTierName\":\"wmbjlzqsczpg\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-01-23T16:07:09Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"d\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-06-09T07:41:46Z\",\"upgradeUnavailabilityReason\":\"ptnuwjtkschgc\"}},\"id\":\"y\",\"name\":\"leseyqrhvyeldo\",\"type\":\"jv\"}]}") .toObject(QuotaTierListResult.class); - Assertions.assertEquals("jpodtbl", model.nextLink()); + Assertions.assertEquals("bemeluclvd", model.nextLink()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierPropertiesTests.java index 7f05d2e41d9d..115f7c5cbed6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierPropertiesTests.java @@ -13,15 +13,16 @@ public final class QuotaTierPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaTierProperties model = BinaryData.fromString( - "{\"currentTierName\":\"fanraybfu\",\"tierUpgradePolicy\":\"NoAutoUpgrade\",\"assignmentDate\":\"2021-04-28T09:36:05Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"ydgr\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-11-05T07:34:40Z\",\"upgradeUnavailabilityReason\":\"ywezskiecafyg\"}}") + "{\"currentTierName\":\"mupgxy\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-10-04T13:22:27Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"bujftaben\",\"upgradeAvailabilityStatus\":\"Available\",\"upgradeApplicableDate\":\"2021-04-04T06:33:35Z\",\"upgradeUnavailabilityReason\":\"xzu\"}}") .toObject(QuotaTierProperties.class); - Assertions.assertEquals(TierUpgradePolicy.NO_AUTO_UPGRADE, model.tierUpgradePolicy()); + Assertions.assertEquals(TierUpgradePolicy.ONCE_UPGRADE_IS_AVAILABLE, model.tierUpgradePolicy()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaTierProperties model = new QuotaTierProperties().withTierUpgradePolicy(TierUpgradePolicy.NO_AUTO_UPGRADE); + QuotaTierProperties model + = new QuotaTierProperties().withTierUpgradePolicy(TierUpgradePolicy.ONCE_UPGRADE_IS_AVAILABLE); model = BinaryData.fromObject(model).toObject(QuotaTierProperties.class); - Assertions.assertEquals(TierUpgradePolicy.NO_AUTO_UPGRADE, model.tierUpgradePolicy()); + Assertions.assertEquals(TierUpgradePolicy.ONCE_UPGRADE_IS_AVAILABLE, model.tierUpgradePolicy()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierUpgradeEligibilityInfoTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierUpgradeEligibilityInfoTests.java index 223fa2a568d6..2cb91bc29be8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierUpgradeEligibilityInfoTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTierUpgradeEligibilityInfoTests.java @@ -14,11 +14,11 @@ public final class QuotaTierUpgradeEligibilityInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaTierUpgradeEligibilityInfo model = BinaryData.fromString( - "{\"nextTierName\":\"xieqv\",\"upgradeAvailabilityStatus\":\"Available\",\"upgradeApplicableDate\":\"2021-06-16T21:34:02Z\",\"upgradeUnavailabilityReason\":\"ixqcahyhxalybxaw\"}") + "{\"nextTierName\":\"feddwwnlza\",\"upgradeAvailabilityStatus\":\"Available\",\"upgradeApplicableDate\":\"2021-09-14T00:32:04Z\",\"upgradeUnavailabilityReason\":\"nhgookrtalvnbw\"}") .toObject(QuotaTierUpgradeEligibilityInfo.class); - Assertions.assertEquals("xieqv", model.nextTierName()); + Assertions.assertEquals("feddwwnlza", model.nextTierName()); Assertions.assertEquals(UpgradeAvailabilityStatus.AVAILABLE, model.upgradeAvailabilityStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-16T21:34:02Z"), model.upgradeApplicableDate()); - Assertions.assertEquals("ixqcahyhxalybxaw", model.upgradeUnavailabilityReason()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T00:32:04Z"), model.upgradeApplicableDate()); + Assertions.assertEquals("nhgookrtalvnbw", model.upgradeUnavailabilityReason()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersCreateOrUpdateWithResponseMockTests.java index 53423731adc2..ceb2ffd265e2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersCreateOrUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersCreateOrUpdateWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class QuotaTiersCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"currentTierName\":\"lhxsoanguhbnho\",\"tierUpgradePolicy\":\"NoAutoUpgrade\",\"assignmentDate\":\"2021-04-11T10:07:49Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"eggpdtyzpxlit\",\"upgradeAvailabilityStatus\":\"Available\",\"upgradeApplicableDate\":\"2020-12-24T02:13:53Z\",\"upgradeUnavailabilityReason\":\"em\"}},\"id\":\"upehs\",\"name\":\"vsdfvhrypez\",\"type\":\"mmpkapvnpeukg\"}"; + = "{\"properties\":{\"currentTierName\":\"tp\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-12-07T13:22:16Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"sunjzijaciwmm\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-11-06T20:01:26Z\",\"upgradeUnavailabilityReason\":\"nbzzsnfz\"}},\"id\":\"iiwsuanzhwsyuif\",\"name\":\"zqqhbtfloilmkfb\",\"type\":\"oiipjpn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,11 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); QuotaTier response = manager.quotaTiers() - .define("dcyandblkb") + .define("vqlcqufylamxo") .withProperties( new QuotaTierProperties().withTierUpgradePolicy(TierUpgradePolicy.ONCE_UPGRADE_IS_AVAILABLE)) .create(); - Assertions.assertEquals(TierUpgradePolicy.NO_AUTO_UPGRADE, response.properties().tierUpgradePolicy()); + Assertions.assertEquals(TierUpgradePolicy.ONCE_UPGRADE_IS_AVAILABLE, response.properties().tierUpgradePolicy()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersGetWithResponseMockTests.java index ec6f4bee876c..5fa64c89e48b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class QuotaTiersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"currentTierName\":\"slxy\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-02-12T18:18:07Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"lfjwxgvtkjctv\",\"upgradeAvailabilityStatus\":\"Available\",\"upgradeApplicableDate\":\"2021-08-24T22:16:14Z\",\"upgradeUnavailabilityReason\":\"zkvfccozvqxsph\"}},\"id\":\"aitrms\",\"name\":\"kxtuytg\",\"type\":\"ptctxpoegyckmemf\"}"; + = "{\"properties\":{\"currentTierName\":\"xyldqt\",\"tierUpgradePolicy\":\"NoAutoUpgrade\",\"assignmentDate\":\"2021-01-10T11:48:10Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"megaj\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-03-16T11:51:23Z\",\"upgradeUnavailabilityReason\":\"mz\"}},\"id\":\"wqkkgeseip\",\"name\":\"gliupqscoob\",\"type\":\"jlcaxsqcomjiqi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); QuotaTier response - = manager.quotaTiers().getWithResponse("tkajqhsnsej", com.azure.core.util.Context.NONE).getValue(); + = manager.quotaTiers().getWithResponse("muwkgjwbyfdw", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(TierUpgradePolicy.ONCE_UPGRADE_IS_AVAILABLE, response.properties().tierUpgradePolicy()); + Assertions.assertEquals(TierUpgradePolicy.NO_AUTO_UPGRADE, response.properties().tierUpgradePolicy()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersListMockTests.java index 2a5f84e5c63b..8b2855615356 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/QuotaTiersListMockTests.java @@ -23,7 +23,7 @@ public final class QuotaTiersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"currentTierName\":\"clclf\",\"tierUpgradePolicy\":\"OnceUpgradeIsAvailable\",\"assignmentDate\":\"2021-01-02T16:25:48Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"mwrv\",\"upgradeAvailabilityStatus\":\"Available\",\"upgradeApplicableDate\":\"2021-03-21T14:22:59Z\",\"upgradeUnavailabilityReason\":\"lx\"}},\"id\":\"b\",\"name\":\"sewfzvv\",\"type\":\"aysqwh\"}]}"; + = "{\"value\":[{\"properties\":{\"currentTierName\":\"evxxkdevpximzii\",\"tierUpgradePolicy\":\"NoAutoUpgrade\",\"assignmentDate\":\"2021-03-23T23:39:22Z\",\"tierUpgradeEligibilityInfo\":{\"nextTierName\":\"vtvodqxxpqhmlqi\",\"upgradeAvailabilityStatus\":\"NotAvailable\",\"upgradeApplicableDate\":\"2021-11-26T19:49:37Z\",\"upgradeUnavailabilityReason\":\"vrj\"}},\"id\":\"notdofqvpbqsdqk\",\"name\":\"sb\",\"type\":\"sbbmitaftazgcx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,7 +34,7 @@ public void testList() throws Exception { PagedIterable response = manager.quotaTiers().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals(TierUpgradePolicy.ONCE_UPGRADE_IS_AVAILABLE, + Assertions.assertEquals(TierUpgradePolicy.NO_AUTO_UPGRADE, response.iterator().next().properties().tierUpgradePolicy()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsEmptyObjectTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsEmptyObjectTests.java deleted file mode 100644 index 42c290663918..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsEmptyObjectTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; - -public final class RaiAcsEmptyObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsEmptyObject model = BinaryData.fromString("{}").toObject(RaiAcsEmptyObject.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsEmptyObject model = new RaiAcsEmptyObject(); - model = BinaryData.fromObject(model).toObject(RaiAcsEmptyObject.class); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsHarmConfigurationTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsHarmConfigurationTests.java deleted file mode 100644 index b42efcf06bdd..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsHarmConfigurationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class RaiAcsHarmConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsHarmConfiguration model - = BinaryData.fromString("{\"category\":\"PromptInjection\",\"harm_config_id\":\"zjcjbtr\"}") - .toObject(RaiAcsHarmConfiguration.class); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, model.category()); - Assertions.assertEquals("zjcjbtr", model.harmConfigId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsHarmConfiguration model = new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROMPT_INJECTION) - .withHarmConfigId("zjcjbtr"); - model = BinaryData.fromObject(model).toObject(RaiAcsHarmConfiguration.class); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, model.category()); - Assertions.assertEquals("zjcjbtr", model.harmConfigId()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsInterventionPointTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsInterventionPointTests.java deleted file mode 100644 index feb4f8ef21f7..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsInterventionPointTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RaiAcsInterventionPointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsInterventionPoint model = BinaryData.fromString( - "{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"yowc\",\"query\":\"qovekqvgqou\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"ProtectedMaterialText\",\"harm_config_id\":\"j\"},{\"category\":\"Violence\",\"harm_config_id\":\"vqikfxcvhrfsphu\"}]}},\"annotations\":{}}") - .toObject(RaiAcsInterventionPoint.class); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, model.policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, model.policyTargetKind()); - Assertions.assertEquals("yowc", model.policy().id()); - Assertions.assertEquals("qovekqvgqou", model.policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT, - model.policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("j", model.policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsInterventionPoint model = new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.OUTPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("yowc") - .withQuery("qovekqvgqou") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT) - .withHarmConfigId("j"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.VIOLENCE) - .withHarmConfigId("vqikfxcvhrfsphu"))))) - .withAnnotations(new RaiAcsEmptyObject()); - model = BinaryData.fromObject(model).toObject(RaiAcsInterventionPoint.class); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, model.policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, model.policyTargetKind()); - Assertions.assertEquals("yowc", model.policy().id()); - Assertions.assertEquals("qovekqvgqou", model.policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT, - model.policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("j", model.policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsInterventionPointsTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsInterventionPointsTests.java deleted file mode 100644 index 016700cb1063..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsInterventionPointsTests.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoints; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RaiAcsInterventionPointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsInterventionPoints model = BinaryData.fromString( - "{\"input\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"is\",\"query\":\"w\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"ProtectedMaterialText\",\"harm_config_id\":\"efaxvxilc\"},{\"category\":\"SelfHarm\",\"harm_config_id\":\"nhnzeyqxt\"},{\"category\":\"Sexual\",\"harm_config_id\":\"zqlqhyc\"}]}},\"annotations\":{}},\"pre_tool_call\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"gxdbeesmie\",\"query\":\"lrariaawiu\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"Violence\",\"harm_config_id\":\"fbylyrfg\"}]}},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"post_tool_call\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"ocqwogfnzjvus\",\"query\":\"ld\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"PromptInjection\",\"harm_config_id\":\"lfsbtkadpysow\"},{\"category\":\"SelfHarm\",\"harm_config_id\":\"gkbugrjqct\"},{\"category\":\"ProtectedMaterialCode\",\"harm_config_id\":\"mi\"},{\"category\":\"Sexual\",\"harm_config_id\":\"ieypef\"}]}},\"annotations\":{},\"tool_name_from\":\"$snap.tool_call.name\"},\"output\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"u\",\"query\":\"cp\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"PromptInjection\",\"harm_config_id\":\"hihlhzdsqtzbs\"},{\"category\":\"ProtectedMaterialCode\",\"harm_config_id\":\"o\"},{\"category\":\"Sexual\",\"harm_config_id\":\"hfgmvecactxm\"}]}},\"annotations\":{}}}") - .toObject(RaiAcsInterventionPoints.class); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, model.input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, model.input().policyTargetKind()); - Assertions.assertEquals("is", model.input().policy().id()); - Assertions.assertEquals("w", model.input().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.input().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT, - model.input().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("efaxvxilc", - model.input().policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, model.preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, model.preToolCall().policyTargetKind()); - Assertions.assertEquals("gxdbeesmie", model.preToolCall().policy().id()); - Assertions.assertEquals("lrariaawiu", model.preToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.preToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.VIOLENCE, - model.preToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("fbylyrfg", - model.preToolCall().policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, model.preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, model.postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, model.postToolCall().policyTargetKind()); - Assertions.assertEquals("ocqwogfnzjvus", model.postToolCall().policy().id()); - Assertions.assertEquals("ld", model.postToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.postToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, - model.postToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("lfsbtkadpysow", - model.postToolCall().policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, model.postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, model.output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, model.output().policyTargetKind()); - Assertions.assertEquals("u", model.output().policy().id()); - Assertions.assertEquals("cp", model.output().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.output().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, - model.output().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("hihlhzdsqtzbs", - model.output().policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsInterventionPoints model = new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("is") - .withQuery("w") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT) - .withHarmConfigId("efaxvxilc"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM) - .withHarmConfigId("nhnzeyqxt"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SEXUAL) - .withHarmConfigId("zqlqhyc"))))) - .withAnnotations(new RaiAcsEmptyObject())) - .withPreToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT) - .withPolicy( - new RaiAcsPolicyBinding().withId("gxdbeesmie") - .withQuery("lrariaawiu") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays - .asList(new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.VIOLENCE) - .withHarmConfigId("fbylyrfg"))))) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS)) - .withPostToolCall(new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("ocqwogfnzjvus") - .withQuery("ld") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROMPT_INJECTION) - .withHarmConfigId("lfsbtkadpysow"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM) - .withHarmConfigId("gkbugrjqct"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_CODE) - .withHarmConfigId("mi"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SEXUAL) - .withHarmConfigId("ieypef"))))) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME)) - .withOutput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.OUTPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("u") - .withQuery("cp") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROMPT_INJECTION) - .withHarmConfigId("hihlhzdsqtzbs"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_CODE) - .withHarmConfigId("o"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SEXUAL) - .withHarmConfigId("hfgmvecactxm"))))) - .withAnnotations(new RaiAcsEmptyObject())); - model = BinaryData.fromObject(model).toObject(RaiAcsInterventionPoints.class); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, model.input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, model.input().policyTargetKind()); - Assertions.assertEquals("is", model.input().policy().id()); - Assertions.assertEquals("w", model.input().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.input().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT, - model.input().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("efaxvxilc", - model.input().policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, model.preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, model.preToolCall().policyTargetKind()); - Assertions.assertEquals("gxdbeesmie", model.preToolCall().policy().id()); - Assertions.assertEquals("lrariaawiu", model.preToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.preToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.VIOLENCE, - model.preToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("fbylyrfg", - model.preToolCall().policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, model.preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, model.postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, model.postToolCall().policyTargetKind()); - Assertions.assertEquals("ocqwogfnzjvus", model.postToolCall().policy().id()); - Assertions.assertEquals("ld", model.postToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.postToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, - model.postToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("lfsbtkadpysow", - model.postToolCall().policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, model.postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, model.output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, model.output().policyTargetKind()); - Assertions.assertEquals("u", model.output().policy().id()); - Assertions.assertEquals("cp", model.output().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.output().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, - model.output().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("hihlhzdsqtzbs", - model.output().policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsManifestTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsManifestTests.java deleted file mode 100644 index b4b9b11a15d8..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsManifestTests.java +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoints; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsManifest; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsRegoPolicyDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RaiAcsManifestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsManifest model = BinaryData.fromString( - "{\"agent_control_specification_version\":\"z\",\"metadata\":{\"xndticokpvzmlqtm\":\"\\\"dataglae\\\"\",\"pkc\":\"\\\"datadgxobfircl\\\"\"},\"policies\":{\"wf\":{\"type\":\"rego\",\"query\":\"zriykhy\"},\"xhom\":{\"type\":\"rego\",\"query\":\"lboxqvkjl\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"dwdigumb\",\"query\":\"aauzzptjazysd\",\"aacs_moderation\":{\"subject_format\":\"text\",\"harm_configs\":[{\"category\":\"ProtectedMaterialText\"},{\"category\":\"Violence\"}]}},\"annotations\":{}},\"pre_tool_call\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"yuvvfonkp\",\"query\":\"qyikvy\",\"aacs_moderation\":{\"subject_format\":\"text\",\"harm_configs\":[{\"category\":\"ProtectedMaterialCode\"},{\"category\":\"Hate\"},{\"category\":\"ProtectedMaterialText\"}]}},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"post_tool_call\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"ttijfybvpoekrs\",\"query\":\"gbdhuzqgnjdg\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"SelfHarm\"},{\"category\":\"SelfHarm\"}]}},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"output\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"xnkomtkubo\",\"query\":\"pnvdxz\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"SelfHarm\"},{\"category\":\"SelfHarm\"}]}},\"annotations\":{}}},\"tools\":{\"aeoisrvh\":{\"id\":\"vqagtltdhlf\",\"type\":\"ojpykvgtrdc\",\"description\":\"fmzzsdymbrny\",\"security_labels\":[\"m\",\"rafwgckhocxvdf\"],\"clearance\":\"wafqroud\",\"ud\":\"\\\"dataavehhrvkbunzo\\\"\",\"hmfdnbzydvfvfcj\":\"\\\"datacxgkmoyxcdyui\\\"\"}},\"annotators\":{}}") - .toObject(RaiAcsManifest.class); - Assertions.assertEquals("z", model.agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, model.policies().get("wf").type()); - Assertions.assertEquals("zriykhy", model.policies().get("wf").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, model.interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - model.interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("dwdigumb", model.interventionPoints().input().policy().id()); - Assertions.assertEquals("aauzzptjazysd", model.interventionPoints().input().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.interventionPoints().input().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT, - model.interventionPoints().input().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, model.interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - model.interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("yuvvfonkp", model.interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals("qyikvy", model.interventionPoints().preToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.interventionPoints().preToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_CODE, - model.interventionPoints().preToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - model.interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - model.interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("ttijfybvpoekrs", model.interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals("gbdhuzqgnjdg", model.interventionPoints().postToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.interventionPoints().postToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.SELF_HARM, - model.interventionPoints().postToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - model.interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, model.interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - model.interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("xnkomtkubo", model.interventionPoints().output().policy().id()); - Assertions.assertEquals("pnvdxz", model.interventionPoints().output().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.interventionPoints().output().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.SELF_HARM, - model.interventionPoints().output().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("vqagtltdhlf", model.tools().get("aeoisrvh").id()); - Assertions.assertEquals("ojpykvgtrdc", model.tools().get("aeoisrvh").type()); - Assertions.assertEquals("fmzzsdymbrny", model.tools().get("aeoisrvh").description()); - Assertions.assertEquals("m", model.tools().get("aeoisrvh").securityLabels().get(0)); - Assertions.assertEquals("wafqroud", model.tools().get("aeoisrvh").clearance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsManifest model = new RaiAcsManifest().withAgentControlSpecificationVersion("z") - .withMetadata(mapOf("xndticokpvzmlqtm", "\"dataglae\"", "pkc", "\"datadgxobfircl\"")) - .withPolicies(mapOf("wf", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO).withQuery("zriykhy"), "xhom", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO).withQuery("lboxqvkjl"))) - .withInterventionPoints( - new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("dwdigumb") - .withQuery("aauzzptjazysd") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.VIOLENCE))))) - .withAnnotations(new RaiAcsEmptyObject())) - .withPreToolCall(new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.OUTPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("yuvvfonkp") - .withQuery("qyikvy") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_CODE), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.HATE), - new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT))))) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS)) - .withPostToolCall(new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("ttijfybvpoekrs") - .withQuery("gbdhuzqgnjdg") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM))))) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS)) - .withOutput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.OUTPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("xnkomtkubo") - .withQuery("pnvdxz") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM))))) - .withAnnotations(new RaiAcsEmptyObject()))) - .withTools(mapOf("aeoisrvh", - new RaiAcsToolDefinition().withId("vqagtltdhlf") - .withType("ojpykvgtrdc") - .withDescription("fmzzsdymbrny") - .withSecurityLabels(Arrays.asList("m", "rafwgckhocxvdf")) - .withClearance("wafqroud") - .withAdditionalProperties( - mapOf("hmfdnbzydvfvfcj", "\"datacxgkmoyxcdyui\"", "ud", "\"dataavehhrvkbunzo\"")))) - .withAnnotators(new RaiAcsEmptyObject()); - model = BinaryData.fromObject(model).toObject(RaiAcsManifest.class); - Assertions.assertEquals("z", model.agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, model.policies().get("wf").type()); - Assertions.assertEquals("zriykhy", model.policies().get("wf").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, model.interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - model.interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("dwdigumb", model.interventionPoints().input().policy().id()); - Assertions.assertEquals("aauzzptjazysd", model.interventionPoints().input().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.interventionPoints().input().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT, - model.interventionPoints().input().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, model.interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - model.interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("yuvvfonkp", model.interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals("qyikvy", model.interventionPoints().preToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.interventionPoints().preToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_CODE, - model.interventionPoints().preToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - model.interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - model.interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("ttijfybvpoekrs", model.interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals("gbdhuzqgnjdg", model.interventionPoints().postToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.interventionPoints().postToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.SELF_HARM, - model.interventionPoints().postToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - model.interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, model.interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - model.interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("xnkomtkubo", model.interventionPoints().output().policy().id()); - Assertions.assertEquals("pnvdxz", model.interventionPoints().output().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.interventionPoints().output().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.SELF_HARM, - model.interventionPoints().output().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("vqagtltdhlf", model.tools().get("aeoisrvh").id()); - Assertions.assertEquals("ojpykvgtrdc", model.tools().get("aeoisrvh").type()); - Assertions.assertEquals("fmzzsdymbrny", model.tools().get("aeoisrvh").description()); - Assertions.assertEquals("m", model.tools().get("aeoisrvh").securityLabels().get(0)); - Assertions.assertEquals("wafqroud", model.tools().get("aeoisrvh").clearance()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsModerationBindingExtensionTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsModerationBindingExtensionTests.java deleted file mode 100644 index c9324fde7a7c..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsModerationBindingExtensionTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RaiAcsModerationBindingExtensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsModerationBindingExtension model = BinaryData.fromString( - "{\"subject_format\":\"text\",\"harm_configs\":[{\"category\":\"SelfHarm\",\"harm_config_id\":\"lqxihhrmooiz\"},{\"category\":\"SelfHarm\",\"harm_config_id\":\"ypxiutcxap\"},{\"category\":\"Sexual\",\"harm_config_id\":\"rpetogebjoxsl\"},{\"category\":\"SelfHarm\",\"harm_config_id\":\"hlabrq\"}]}") - .toObject(RaiAcsModerationBindingExtension.class); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, model.subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.SELF_HARM, model.harmConfigs().get(0).category()); - Assertions.assertEquals("lqxihhrmooiz", model.harmConfigs().get(0).harmConfigId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsModerationBindingExtension model = new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM) - .withHarmConfigId("lqxihhrmooiz"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM).withHarmConfigId("ypxiutcxap"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SEXUAL).withHarmConfigId("rpetogebjoxsl"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM).withHarmConfigId("hlabrq"))); - model = BinaryData.fromObject(model).toObject(RaiAcsModerationBindingExtension.class); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, model.subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.SELF_HARM, model.harmConfigs().get(0).category()); - Assertions.assertEquals("lqxihhrmooiz", model.harmConfigs().get(0).harmConfigId()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsPolicyBindingTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsPolicyBindingTests.java deleted file mode 100644 index c9314735993d..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsPolicyBindingTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RaiAcsPolicyBindingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsPolicyBinding model = BinaryData.fromString( - "{\"id\":\"rttikteusqc\",\"query\":\"vyklxuby\",\"aacs_moderation\":{\"subject_format\":\"text\",\"harm_configs\":[{\"category\":\"PromptInjection\",\"harm_config_id\":\"fblcq\"},{\"category\":\"ProtectedMaterialText\",\"harm_config_id\":\"bgq\"},{\"category\":\"Violence\",\"harm_config_id\":\"talmett\"}]}}") - .toObject(RaiAcsPolicyBinding.class); - Assertions.assertEquals("rttikteusqc", model.id()); - Assertions.assertEquals("vyklxuby", model.query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, model.aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, - model.aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("fblcq", model.aacsModeration().harmConfigs().get(0).harmConfigId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsPolicyBinding model = new RaiAcsPolicyBinding().withId("rttikteusqc") - .withQuery("vyklxuby") - .withAacsModeration( - new RaiAcsModerationBindingExtension().withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROMPT_INJECTION) - .withHarmConfigId("fblcq"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT) - .withHarmConfigId("bgq"), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.VIOLENCE) - .withHarmConfigId("talmett")))); - model = BinaryData.fromObject(model).toObject(RaiAcsPolicyBinding.class); - Assertions.assertEquals("rttikteusqc", model.id()); - Assertions.assertEquals("vyklxuby", model.query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, model.aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, - model.aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("fblcq", model.aacsModeration().harmConfigs().get(0).harmConfigId()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsRegoPolicyDefinitionTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsRegoPolicyDefinitionTests.java deleted file mode 100644 index d0046930eb44..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsRegoPolicyDefinitionTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsRegoPolicyDefinition; -import org.junit.jupiter.api.Assertions; - -public final class RaiAcsRegoPolicyDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsRegoPolicyDefinition model - = BinaryData.fromString("{\"type\":\"rego\",\"query\":\"r\"}").toObject(RaiAcsRegoPolicyDefinition.class); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, model.type()); - Assertions.assertEquals("r", model.query()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsRegoPolicyDefinition model - = new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO).withQuery("r"); - model = BinaryData.fromObject(model).toObject(RaiAcsRegoPolicyDefinition.class); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, model.type()); - Assertions.assertEquals("r", model.query()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsToolDefinitionTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsToolDefinitionTests.java deleted file mode 100644 index 1b74d0983e36..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsToolDefinitionTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolDefinition; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RaiAcsToolDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsToolDefinition model = BinaryData.fromString( - "{\"id\":\"em\",\"type\":\"h\",\"description\":\"uj\",\"security_labels\":[\"wkozz\"],\"clearance\":\"ulkb\",\"alhsnvkc\":\"\\\"datafajnjwltlwtjjguk\\\"\",\"mlnwiaaomylweazu\":\"\\\"datamxzrpoa\\\"\",\"hwwn\":\"\\\"datacse\\\"\",\"ousnfepgfewe\":\"\\\"datajhlfzswpchwahf\\\"\"}") - .toObject(RaiAcsToolDefinition.class); - Assertions.assertEquals("em", model.id()); - Assertions.assertEquals("h", model.type()); - Assertions.assertEquals("uj", model.description()); - Assertions.assertEquals("wkozz", model.securityLabels().get(0)); - Assertions.assertEquals("ulkb", model.clearance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsToolDefinition model = new RaiAcsToolDefinition().withId("em") - .withType("h") - .withDescription("uj") - .withSecurityLabels(Arrays.asList("wkozz")) - .withClearance("ulkb") - .withAdditionalProperties(mapOf("mlnwiaaomylweazu", "\"datamxzrpoa\"", "alhsnvkc", - "\"datafajnjwltlwtjjguk\"", "hwwn", "\"datacse\"", "ousnfepgfewe", "\"datajhlfzswpchwahf\"")); - model = BinaryData.fromObject(model).toObject(RaiAcsToolDefinition.class); - Assertions.assertEquals("em", model.id()); - Assertions.assertEquals("h", model.type()); - Assertions.assertEquals("uj", model.description()); - Assertions.assertEquals("wkozz", model.securityLabels().get(0)); - Assertions.assertEquals("ulkb", model.clearance()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsToolInterventionPointTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsToolInterventionPointTests.java deleted file mode 100644 index bf0d027840b1..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiAcsToolInterventionPointTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RaiAcsToolInterventionPointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiAcsToolInterventionPoint model = BinaryData.fromString( - "{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"hvv\",\"query\":\"rxjjstoqbeitpk\",\"aacs_moderation\":{\"subject_format\":\"text\",\"harm_configs\":[{\"category\":\"ProtectedMaterialText\",\"harm_config_id\":\"bklftidgfcwqmpim\"}]}},\"annotations\":{},\"tool_name_from\":\"$snap.tool_call.name\"}") - .toObject(RaiAcsToolInterventionPoint.class); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, model.policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, model.policyTargetKind()); - Assertions.assertEquals("hvv", model.policy().id()); - Assertions.assertEquals("rxjjstoqbeitpk", model.policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, model.policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT, - model.policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("bklftidgfcwqmpim", - model.policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, model.toolNameFrom()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiAcsToolInterventionPoint model - = new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT) - .withPolicy( - new RaiAcsPolicyBinding().withId("hvv") - .withQuery("rxjjstoqbeitpk") - .withAacsModeration( - new RaiAcsModerationBindingExtension().withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList(new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT) - .withHarmConfigId("bklftidgfcwqmpim"))))) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME); - model = BinaryData.fromObject(model).toObject(RaiAcsToolInterventionPoint.class); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, model.policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, model.policyTargetKind()); - Assertions.assertEquals("hvv", model.policy().id()); - Assertions.assertEquals("rxjjstoqbeitpk", model.policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, model.policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT, - model.policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("bklftidgfcwqmpim", - model.policy().aacsModeration().harmConfigs().get(0).harmConfigId()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, model.toolNameFrom()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingInnerTests.java deleted file mode 100644 index 981d81afde3e..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingInnerTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiBindingInner; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RaiBindingInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiBindingInner model = BinaryData.fromString( - "{\"properties\":{\"boundResourceId\":\"fh\",\"targetPolicyName\":\"l\"},\"etag\":\"ryxynqnzrd\",\"tags\":{\"tgoe\":\"vwxzn\"},\"id\":\"bbabp\",\"name\":\"hv\",\"type\":\"slkvntjl\"}") - .toObject(RaiBindingInner.class); - Assertions.assertEquals("fh", model.properties().boundResourceId()); - Assertions.assertEquals("l", model.properties().targetPolicyName()); - Assertions.assertEquals("vwxzn", model.tags().get("tgoe")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiBindingInner model = new RaiBindingInner() - .withProperties(new RaiBindingProperties().withBoundResourceId("fh").withTargetPolicyName("l")) - .withTags(mapOf("tgoe", "vwxzn")); - model = BinaryData.fromObject(model).toObject(RaiBindingInner.class); - Assertions.assertEquals("fh", model.properties().boundResourceId()); - Assertions.assertEquals("l", model.properties().targetPolicyName()); - Assertions.assertEquals("vwxzn", model.tags().get("tgoe")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingListResultTests.java deleted file mode 100644 index 58aa56d5a1b8..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingListResultTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.implementation.models.RaiBindingListResult; -import org.junit.jupiter.api.Assertions; - -public final class RaiBindingListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiBindingListResult model = BinaryData.fromString( - "{\"nextLink\":\"ifrygzn\",\"value\":[{\"properties\":{\"boundResourceId\":\"xrizkzobgop\",\"targetPolicyName\":\"lhslnelxieixyn\"},\"etag\":\"xecwcro\",\"tags\":{\"fmvigorqjbttzh\":\"slhcawjutifd\",\"juj\":\"aglkafhon\"},\"id\":\"ckpzvcpopmxeln\",\"name\":\"clt\",\"type\":\"jedexxmlf\"},{\"properties\":{\"boundResourceId\":\"qscazuawxtz\",\"targetPolicyName\":\"puamwabzxr\"},\"etag\":\"cush\",\"tags\":{\"zwywako\":\"aivmxyasflvgs\",\"ljhlnymzotq\":\"hknsmjbl\"},\"id\":\"yuzcbmqqvxmvw\",\"name\":\"gtayxonsupeujlz\",\"type\":\"nh\"}]}") - .toObject(RaiBindingListResult.class); - Assertions.assertEquals("ifrygzn", model.nextLink()); - Assertions.assertEquals("xrizkzobgop", model.value().get(0).properties().boundResourceId()); - Assertions.assertEquals("lhslnelxieixyn", model.value().get(0).properties().targetPolicyName()); - Assertions.assertEquals("slhcawjutifd", model.value().get(0).tags().get("fmvigorqjbttzh")); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingPropertiesTests.java deleted file mode 100644 index 6d82cb7c386d..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingProperties; -import org.junit.jupiter.api.Assertions; - -public final class RaiBindingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiBindingProperties model - = BinaryData.fromString("{\"boundResourceId\":\"igjkskyrio\",\"targetPolicyName\":\"vzidsxwaab\"}") - .toObject(RaiBindingProperties.class); - Assertions.assertEquals("igjkskyrio", model.boundResourceId()); - Assertions.assertEquals("vzidsxwaab", model.targetPolicyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiBindingProperties model - = new RaiBindingProperties().withBoundResourceId("igjkskyrio").withTargetPolicyName("vzidsxwaab"); - model = BinaryData.fromObject(model).toObject(RaiBindingProperties.class); - Assertions.assertEquals("igjkskyrio", model.boundResourceId()); - Assertions.assertEquals("vzidsxwaab", model.targetPolicyName()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 001cb463e133..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import com.azure.resourcemanager.cognitiveservices.models.RaiBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiBindingProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RaiBindingsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"boundResourceId\":\"eagbgacnqpjuyt\",\"targetPolicyName\":\"udeylpbybki\"},\"etag\":\"oifm\",\"tags\":{\"au\":\"pwdj\",\"ttuhaaax\":\"fshznu\",\"xstowagehxuihwes\":\"dcdjmdkqtxfrmbe\"},\"id\":\"jaqgblkkn\",\"name\":\"ypmte\",\"type\":\"spsaneyvaerpiob\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - RaiBinding response = manager.raiBindings() - .define("lfl") - .withExistingAccount("sxjbjkewrigl", "qtrefe") - .withTags(mapOf("h", "jr", "agwviqehmdqvaoli", "gsjbi", "m", "xdfsfvkjc", "rkd", "rsvxphtjnhptj")) - .withProperties( - new RaiBindingProperties().withBoundResourceId("jffzwncvdefxonzt").withTargetPolicyName("cjptnn")) - .withIfMatch("rgyzcslazp") - .withIfNoneMatch("kqoyimxpggk") - .create(); - - Assertions.assertEquals("eagbgacnqpjuyt", response.properties().boundResourceId()); - Assertions.assertEquals("udeylpbybki", response.properties().targetPolicyName()); - Assertions.assertEquals("pwdj", response.tags().get("au")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsDeleteWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsDeleteWithResponseMockTests.java deleted file mode 100644 index 5a7eff1539ea..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RaiBindingsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.raiBindings() - .deleteWithResponse("qvzlbbbajdexqu", "wexizbfzetjizwh", "nbmajvvyxtvvx", "akzixb", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsGetWithResponseMockTests.java deleted file mode 100644 index f31c52afd509..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsGetWithResponseMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import com.azure.resourcemanager.cognitiveservices.models.RaiBinding; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RaiBindingsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"boundResourceId\":\"jjaojpzngdrzige\",\"targetPolicyName\":\"wsadsqyu\"},\"etag\":\"khwqdmohheuyuu\",\"tags\":{\"li\":\"yevyigdeipnfizej\",\"dapqokhdy\":\"acndjzwhaj\",\"e\":\"cradxsew\"},\"id\":\"fapmqnmelyksy\",\"name\":\"ihiclmsln\",\"type\":\"n\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - RaiBinding response = manager.raiBindings() - .getWithResponse("idyli", "ajklnac", "dnxqeonm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jjaojpzngdrzige", response.properties().boundResourceId()); - Assertions.assertEquals("wsadsqyu", response.properties().targetPolicyName()); - Assertions.assertEquals("yevyigdeipnfizej", response.tags().get("li")); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsListMockTests.java deleted file mode 100644 index 0f8b1c194be7..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBindingsListMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import com.azure.resourcemanager.cognitiveservices.models.RaiBinding; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RaiBindingsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"boundResourceId\":\"whrmvlaknujmw\",\"targetPolicyName\":\"nrzblxna\"},\"etag\":\"smfndcbsyhludzjk\",\"tags\":{\"rj\":\"ohwv\",\"urmd\":\"dvt\",\"ntjna\":\"a\"},\"id\":\"hvqiiasbtwskkf\",\"name\":\"uyi\",\"type\":\"mxhh\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.raiBindings().list("aybf", "l", 2066718058, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("whrmvlaknujmw", response.iterator().next().properties().boundResourceId()); - Assertions.assertEquals("nrzblxna", response.iterator().next().properties().targetPolicyName()); - Assertions.assertEquals("ohwv", response.iterator().next().tags().get("rj")); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlockListItemsResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlockListItemsResultTests.java index 3a8823a4a9a4..c9c798bb2ca4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlockListItemsResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlockListItemsResultTests.java @@ -12,11 +12,11 @@ public final class RaiBlockListItemsResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiBlockListItemsResult model = BinaryData.fromString( - "{\"nextLink\":\"vwbcblembnkbwv\",\"value\":[{\"properties\":{\"pattern\":\"ivqiheb\",\"isRegex\":true},\"etag\":\"bzuwfmdurag\",\"tags\":{\"igkxkbsazga\":\"zvcjfelisdjubggb\",\"apvu\":\"gacyrcmjdmspo\"},\"id\":\"ylnio\",\"name\":\"rz\",\"type\":\"bzjedmstk\"}]}") + "{\"nextLink\":\"vekqvgqo\",\"value\":[{\"properties\":{\"pattern\":\"mpjw\",\"isRegex\":true},\"etag\":\"ikf\",\"tags\":{\"teusqczkvyklxu\":\"hrfsphuagrtti\",\"fmmfblcqcu\":\"yja\",\"brta\":\"bgq\"},\"id\":\"etttwgdslqxihhr\",\"name\":\"ooizqseyp\",\"type\":\"iut\"},{\"properties\":{\"pattern\":\"pzhyr\",\"isRegex\":true},\"etag\":\"g\",\"tags\":{\"nhl\":\"oxslh\",\"rgaehvvibrxjj\":\"brqnkkzjcjb\",\"lftidgfcwqmpim\":\"toqbeitpkxztmoob\"},\"id\":\"xzhemjyh\",\"name\":\"hujswtwkozzwcul\",\"type\":\"bawpfajnjwltlwt\"},{\"properties\":{\"pattern\":\"uktalhsnvkcdmxz\",\"isRegex\":false},\"etag\":\"imlnwiaaomylw\",\"tags\":{\"l\":\"ulcsethwwnpj\"},\"id\":\"swpchwahfbousn\",\"name\":\"epgfew\",\"type\":\"twly\"}]}") .toObject(RaiBlockListItemsResult.class); - Assertions.assertEquals("vwbcblembnkbwv", model.nextLink()); - Assertions.assertEquals("ivqiheb", model.value().get(0).properties().pattern()); + Assertions.assertEquals("vekqvgqo", model.nextLink()); + Assertions.assertEquals("mpjw", model.value().get(0).properties().pattern()); Assertions.assertTrue(model.value().get(0).properties().isRegex()); - Assertions.assertEquals("zvcjfelisdjubggb", model.value().get(0).tags().get("igkxkbsazga")); + Assertions.assertEquals("hrfsphuagrtti", model.value().get(0).tags().get("teusqczkvyklxu")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlockListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlockListResultTests.java index 699f37a2a3be..074262e26731 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlockListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlockListResultTests.java @@ -12,10 +12,10 @@ public final class RaiBlockListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiBlockListResult model = BinaryData.fromString( - "{\"nextLink\":\"ewzjkjexfd\",\"value\":[{\"properties\":{\"description\":\"sylkks\"},\"etag\":\"bffmbmxz\",\"tags\":{\"icgaao\":\"ywwpgjxsnptfuj\",\"wemxswvruunzz\":\"pttaqutd\",\"yinljqe\":\"gehkfkimrtixokff\"},\"id\":\"whixmonstsh\",\"name\":\"yxgvelfcld\",\"type\":\"ccbi\"},{\"properties\":{\"description\":\"vuwcobiegstmnin\"},\"etag\":\"izcil\",\"tags\":{\"xqzv\":\"gshejjtbxqmulux\",\"ycucrwnamikzeb\":\"ers\"},\"id\":\"bsmswziqgf\",\"name\":\"hokzrusw\",\"type\":\"vhczznvfby\"},{\"properties\":{\"description\":\"xjww\"},\"etag\":\"z\",\"tags\":{\"haohdjhhflzokxc\":\"wmxqhndvnoamlds\",\"atftgzpnpbsw\":\"xpelnjetagltsx\",\"loccsrmozihm\":\"e\",\"rytfmpcycil\":\"pgawtxxpkyjcxcjx\"},\"id\":\"caykggnoxuz\",\"name\":\"rksxwpndfc\",\"type\":\"fnznth\"},{\"properties\":{\"description\":\"kjaosrxuzv\"},\"etag\":\"mktcqiosmgbza\",\"tags\":{\"laprlt\":\"qdlyrtl\",\"nnbsoqeqa\":\"katbhjm\",\"febwlnbmhyreeudz\":\"arvlagunbt\",\"pdqmjxlyyzglgouw\":\"av\"},\"id\":\"mjjyuojq\",\"name\":\"obaxkjeytu\",\"type\":\"lbfjkwr\"}]}") + "{\"nextLink\":\"gafcqu\",\"value\":[{\"properties\":{\"description\":\"t\"},\"etag\":\"sdtutnwlduyc\",\"tags\":{\"kuqgsjjxundxgket\":\"hyrmewipmvekdx\",\"gpmuneqsxvmhfbuz\":\"zhhzjhfjmhvvmu\",\"ms\":\"yihsasbhudypohyu\"},\"id\":\"nsqyrpfoobrltt\",\"name\":\"msjnygqdnfw\",\"type\":\"zdzgtilaxhnfhqly\"},{\"properties\":{\"description\":\"ouwivkxoyzunbixx\"},\"etag\":\"ikvcpwp\",\"tags\":{\"vtsoxf\":\"rc\",\"m\":\"kenx\",\"ao\":\"yefrpmpdnqqska\",\"npqfrtqlkzmeg\":\"vmm\"},\"id\":\"tgvkxlzyqd\",\"name\":\"fegcea\",\"type\":\"zxwhcansymoyqhlw\"}]}") .toObject(RaiBlockListResult.class); - Assertions.assertEquals("ewzjkjexfd", model.nextLink()); - Assertions.assertEquals("sylkks", model.value().get(0).properties().description()); - Assertions.assertEquals("ywwpgjxsnptfuj", model.value().get(0).tags().get("icgaao")); + Assertions.assertEquals("gafcqu", model.nextLink()); + Assertions.assertEquals("t", model.value().get(0).properties().description()); + Assertions.assertEquals("hyrmewipmvekdx", model.value().get(0).tags().get("kuqgsjjxundxgket")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistConfigTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistConfigTests.java index 72d8d218e271..c2a5f36ceb3d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistConfigTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistConfigTests.java @@ -11,17 +11,17 @@ public final class RaiBlocklistConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RaiBlocklistConfig model = BinaryData.fromString("{\"blocklistName\":\"fpxtg\",\"blocking\":false}") + RaiBlocklistConfig model = BinaryData.fromString("{\"blocklistName\":\"ivfomiloxgg\",\"blocking\":false}") .toObject(RaiBlocklistConfig.class); - Assertions.assertEquals("fpxtg", model.blocklistName()); + Assertions.assertEquals("ivfomiloxgg", model.blocklistName()); Assertions.assertFalse(model.blocking()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiBlocklistConfig model = new RaiBlocklistConfig().withBlocklistName("fpxtg").withBlocking(false); + RaiBlocklistConfig model = new RaiBlocklistConfig().withBlocklistName("ivfomiloxgg").withBlocking(false); model = BinaryData.fromObject(model).toObject(RaiBlocklistConfig.class); - Assertions.assertEquals("fpxtg", model.blocklistName()); + Assertions.assertEquals("ivfomiloxgg", model.blocklistName()); Assertions.assertFalse(model.blocking()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistInnerTests.java index 16e125c70f45..443c302d1093 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistInnerTests.java @@ -15,20 +15,20 @@ public final class RaiBlocklistInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiBlocklistInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"ktwfa\"},\"etag\":\"nv\",\"tags\":{\"z\":\"bmikost\",\"fy\":\"kiwbuqnyoph\",\"elfwy\":\"sgcrpfbcunezzce\"},\"id\":\"lwxjwetn\",\"name\":\"sihclafzvaylp\",\"type\":\"rsqqwztcm\"}") + "{\"properties\":{\"description\":\"rxvxcjzh\"},\"etag\":\"zxfpxtgqsc\",\"tags\":{\"qaz\":\"ftjuh\",\"pijrajcivmmghf\":\"mtggu\"},\"id\":\"iwrxgkn\",\"name\":\"uvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"}") .toObject(RaiBlocklistInner.class); - Assertions.assertEquals("ktwfa", model.properties().description()); - Assertions.assertEquals("bmikost", model.tags().get("z")); + Assertions.assertEquals("rxvxcjzh", model.properties().description()); + Assertions.assertEquals("ftjuh", model.tags().get("qaz")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RaiBlocklistInner model - = new RaiBlocklistInner().withProperties(new RaiBlocklistProperties().withDescription("ktwfa")) - .withTags(mapOf("z", "bmikost", "fy", "kiwbuqnyoph", "elfwy", "sgcrpfbcunezzce")); + = new RaiBlocklistInner().withProperties(new RaiBlocklistProperties().withDescription("rxvxcjzh")) + .withTags(mapOf("qaz", "ftjuh", "pijrajcivmmghf", "mtggu")); model = BinaryData.fromObject(model).toObject(RaiBlocklistInner.class); - Assertions.assertEquals("ktwfa", model.properties().description()); - Assertions.assertEquals("bmikost", model.tags().get("z")); + Assertions.assertEquals("rxvxcjzh", model.properties().description()); + Assertions.assertEquals("ftjuh", model.tags().get("qaz")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemBulkRequestTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemBulkRequestTests.java index c5d4ae529937..13a8223e9274 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemBulkRequestTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemBulkRequestTests.java @@ -13,20 +13,20 @@ public final class RaiBlocklistItemBulkRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiBlocklistItemBulkRequest model - = BinaryData.fromString("{\"name\":\"l\",\"properties\":{\"pattern\":\"c\",\"isRegex\":false}}") + = BinaryData.fromString("{\"name\":\"ncxykxhdjhlimm\",\"properties\":{\"pattern\":\"f\",\"isRegex\":true}}") .toObject(RaiBlocklistItemBulkRequest.class); - Assertions.assertEquals("l", model.name()); - Assertions.assertEquals("c", model.properties().pattern()); - Assertions.assertFalse(model.properties().isRegex()); + Assertions.assertEquals("ncxykxhdjhlimm", model.name()); + Assertions.assertEquals("f", model.properties().pattern()); + Assertions.assertTrue(model.properties().isRegex()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiBlocklistItemBulkRequest model = new RaiBlocklistItemBulkRequest().withName("l") - .withProperties(new RaiBlocklistItemProperties().withPattern("c").withIsRegex(false)); + RaiBlocklistItemBulkRequest model = new RaiBlocklistItemBulkRequest().withName("ncxykxhdjhlimm") + .withProperties(new RaiBlocklistItemProperties().withPattern("f").withIsRegex(true)); model = BinaryData.fromObject(model).toObject(RaiBlocklistItemBulkRequest.class); - Assertions.assertEquals("l", model.name()); - Assertions.assertEquals("c", model.properties().pattern()); - Assertions.assertFalse(model.properties().isRegex()); + Assertions.assertEquals("ncxykxhdjhlimm", model.name()); + Assertions.assertEquals("f", model.properties().pattern()); + Assertions.assertTrue(model.properties().isRegex()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemInnerTests.java index 42c0165a74ae..15358dbaa2d7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemInnerTests.java @@ -15,22 +15,22 @@ public final class RaiBlocklistItemInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiBlocklistItemInner model = BinaryData.fromString( - "{\"properties\":{\"pattern\":\"ql\",\"isRegex\":false},\"etag\":\"ibg\",\"tags\":{\"qoxwd\":\"nxfyqonm\"},\"id\":\"dbxiqx\",\"name\":\"iiqbi\",\"type\":\"htmwwinh\"}") + "{\"properties\":{\"pattern\":\"vusfzld\",\"isRegex\":true},\"etag\":\"xylfsb\",\"tags\":{\"s\":\"dp\",\"tgkbugrjqctojc\":\"wn\",\"cuplcplcwkhih\":\"isofieypefojyqd\"},\"id\":\"lhzdsqtzb\",\"name\":\"rgnowcjhfgm\",\"type\":\"ecactx\"}") .toObject(RaiBlocklistItemInner.class); - Assertions.assertEquals("ql", model.properties().pattern()); - Assertions.assertFalse(model.properties().isRegex()); - Assertions.assertEquals("nxfyqonm", model.tags().get("qoxwd")); + Assertions.assertEquals("vusfzld", model.properties().pattern()); + Assertions.assertTrue(model.properties().isRegex()); + Assertions.assertEquals("dp", model.tags().get("s")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RaiBlocklistItemInner model = new RaiBlocklistItemInner() - .withProperties(new RaiBlocklistItemProperties().withPattern("ql").withIsRegex(false)) - .withTags(mapOf("qoxwd", "nxfyqonm")); + .withProperties(new RaiBlocklistItemProperties().withPattern("vusfzld").withIsRegex(true)) + .withTags(mapOf("s", "dp", "tgkbugrjqctojc", "wn", "cuplcplcwkhih", "isofieypefojyqd")); model = BinaryData.fromObject(model).toObject(RaiBlocklistItemInner.class); - Assertions.assertEquals("ql", model.properties().pattern()); - Assertions.assertFalse(model.properties().isRegex()); - Assertions.assertEquals("nxfyqonm", model.tags().get("qoxwd")); + Assertions.assertEquals("vusfzld", model.properties().pattern()); + Assertions.assertTrue(model.properties().isRegex()); + Assertions.assertEquals("dp", model.tags().get("s")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemPropertiesTests.java index 9a79b96bee9c..e6e5ea97aa33 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemPropertiesTests.java @@ -11,17 +11,17 @@ public final class RaiBlocklistItemPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RaiBlocklistItemProperties model - = BinaryData.fromString("{\"pattern\":\"f\",\"isRegex\":false}").toObject(RaiBlocklistItemProperties.class); - Assertions.assertEquals("f", model.pattern()); - Assertions.assertFalse(model.isRegex()); + RaiBlocklistItemProperties model = BinaryData.fromString("{\"pattern\":\"oteyowc\",\"isRegex\":true}") + .toObject(RaiBlocklistItemProperties.class); + Assertions.assertEquals("oteyowc", model.pattern()); + Assertions.assertTrue(model.isRegex()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiBlocklistItemProperties model = new RaiBlocklistItemProperties().withPattern("f").withIsRegex(false); + RaiBlocklistItemProperties model = new RaiBlocklistItemProperties().withPattern("oteyowc").withIsRegex(true); model = BinaryData.fromObject(model).toObject(RaiBlocklistItemProperties.class); - Assertions.assertEquals("f", model.pattern()); - Assertions.assertFalse(model.isRegex()); + Assertions.assertEquals("oteyowc", model.pattern()); + Assertions.assertTrue(model.isRegex()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchAddWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchAddWithResponseMockTests.java index da720c42f519..f04d76a66aff 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchAddWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchAddWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class RaiBlocklistItemsBatchAddWithResponseMockTests { @Test public void testBatchAddWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"mrtwxcevdspt\"},\"etag\":\"ffmwt\",\"tags\":{\"n\":\"mkokqoikxiefw\",\"liejdn\":\"lkffcnuestb\",\"xtzxqdwbymuql\":\"cotelikjiyteh\"},\"id\":\"ncrdo\",\"name\":\"ctysecpekhx\",\"type\":\"byh\"}"; + = "{\"properties\":{\"description\":\"sqeq\"},\"etag\":\"dxmdses\",\"tags\":{\"pktl\":\"jbjp\",\"at\":\"dibfmthi\"},\"id\":\"jrnm\",\"name\":\"nzqplgtkihonikzs\",\"type\":\"zfffjilzfbpnt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,16 +34,17 @@ public void testBatchAddWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiBlocklist response = manager.raiBlocklistItems() - .batchAddWithResponse("rpelpfijtezg", "m", "eszamad", - Arrays.asList( - new RaiBlocklistItemBulkRequest().withName("z") - .withProperties(new RaiBlocklistItemProperties().withPattern("ui").withIsRegex(false)), - new RaiBlocklistItemBulkRequest().withName("tllxsw") - .withProperties(new RaiBlocklistItemProperties().withPattern("psmirmn").withIsRegex(true))), + .batchAddWithResponse("vmyifopxf", "jt", "dyzoutxfptofhg", Arrays.asList( + new RaiBlocklistItemBulkRequest().withName("wezygvadgaaqw") + .withProperties(new RaiBlocklistItemProperties().withPattern("jpytp").withIsRegex(false)), + new RaiBlocklistItemBulkRequest().withName("nogehlufbort") + .withProperties(new RaiBlocklistItemProperties().withPattern("kk").withIsRegex(true)), + new RaiBlocklistItemBulkRequest().withName("svbxxyjisskob") + .withProperties(new RaiBlocklistItemProperties().withPattern("lflioewyhxessm").withIsRegex(true))), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mrtwxcevdspt", response.properties().description()); - Assertions.assertEquals("mkokqoikxiefw", response.tags().get("n")); + Assertions.assertEquals("sqeq", response.properties().description()); + Assertions.assertEquals("jbjp", response.tags().get("pktl")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchDeleteWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchDeleteWithResponseMockTests.java index 7dec52e1d0c2..44a8c5bdcf5e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchDeleteWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsBatchDeleteWithResponseMockTests.java @@ -29,7 +29,7 @@ public void testBatchDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.raiBlocklistItems() - .batchDeleteWithResponse("tzcvimmwckoz", "lfymtrts", "xup", Arrays.asList("zckjbcbkgnrfrj", "chj", "nc"), + .batchDeleteWithResponse("gkensckhbmcarmo", "fxxkwykuqdndxl", "kh", Arrays.asList("gapvdgtfpeerscdx"), com.azure.core.util.Context.NONE); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsCreateOrUpdateWithResponseMockTests.java index df2fb1ab98e1..7b2e44eee76f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsCreateOrUpdateWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class RaiBlocklistItemsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"pattern\":\"drznlaxozqthkwxf\",\"isRegex\":false},\"etag\":\"izyxduyjnqzb\",\"tags\":{\"viyjuca\":\"akmfc\",\"iuh\":\"nsbqoitwhmuc\",\"ehyklelyqdvpqfbx\":\"xy\",\"mtxqlefnohey\":\"ycudus\"},\"id\":\"fopkyll\",\"name\":\"ey\",\"type\":\"nj\"}"; + = "{\"properties\":{\"pattern\":\"mmmkvavucgjiuaiq\",\"isRegex\":false},\"etag\":\"fzhrchx\",\"tags\":{\"wlvi\":\"zdmh\",\"pdviscotyxbrii\":\"jmxmlitqdsj\"},\"id\":\"f\",\"name\":\"dslvrqo\",\"type\":\"mwsieeailwdqmqf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,15 +34,15 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiBlocklistItem response = manager.raiBlocklistItems() - .define("xqfg") - .withExistingRaiBlocklist("zahgtv", "gdobimor", "olxosgihtrxueqb") - .withTags(mapOf("vsl", "mfxzspf")) - .withProperties(new RaiBlocklistItemProperties().withPattern("jqswshesgcs").withIsRegex(true)) + .define("eubkqiqmlf") + .withExistingRaiBlocklist("nrnjrcuf", "bgacnr", "fdtncmspsanma") + .withTags(mapOf("uuonjkkxukguehvv", "eipuugkwdrqmrpa")) + .withProperties(new RaiBlocklistItemProperties().withPattern("qcs").withIsRegex(false)) .create(); - Assertions.assertEquals("drznlaxozqthkwxf", response.properties().pattern()); + Assertions.assertEquals("mmmkvavucgjiuaiq", response.properties().pattern()); Assertions.assertFalse(response.properties().isRegex()); - Assertions.assertEquals("akmfc", response.tags().get("viyjuca")); + Assertions.assertEquals("zdmh", response.tags().get("wlvi")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsGetWithResponseMockTests.java index f0849ab6f8aa..4c53620b4e99 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class RaiBlocklistItemsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"pattern\":\"dr\",\"isRegex\":false},\"etag\":\"m\",\"tags\":{\"wneqjxzizebjr\":\"erwycuhytjwgetfi\",\"tubwggxzsshxli\":\"hgd\"},\"id\":\"sckwh\",\"name\":\"mdoiiyobqzwjal\",\"type\":\"rsofxcacr\"}"; + = "{\"properties\":{\"pattern\":\"xgiqasifubn\",\"isRegex\":false},\"etag\":\"lpwqpjnxjkhtups\",\"tags\":{\"fwkztsms\":\"uweuiy\",\"vy\":\"b\"},\"id\":\"znfhkqytk\",\"name\":\"tadopgfzdg\",\"type\":\"fcycrsvlo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiBlocklistItem response = manager.raiBlocklistItems() - .getWithResponse("hrfbrj", "kjwqdmraqnilp", "qcaig", "zwfwlrfdjwlzseod", com.azure.core.util.Context.NONE) + .getWithResponse("xplhpeva", "yntvzjyielbq", "vvbq", "knmp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dr", response.properties().pattern()); + Assertions.assertEquals("xgiqasifubn", response.properties().pattern()); Assertions.assertFalse(response.properties().isRegex()); - Assertions.assertEquals("erwycuhytjwgetfi", response.tags().get("wneqjxzizebjr")); + Assertions.assertEquals("uweuiy", response.tags().get("fwkztsms")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsListMockTests.java index db9c1abca83e..883335096f32 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistItemsListMockTests.java @@ -22,7 +22,7 @@ public final class RaiBlocklistItemsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"pattern\":\"sxfkzrztirjvqxvw\",\"isRegex\":true},\"etag\":\"xoerjwbuocqfl\",\"tags\":{\"o\":\"rlqxbctatez\",\"lsjxcscnito\":\"dbcqq\",\"jjidodnvltcvmah\":\"mra\",\"bnhi\":\"uwkup\"},\"id\":\"hyzhrcqdfwbifn\",\"name\":\"hlsforsimtf\",\"type\":\"qmmyn\"}]}"; + = "{\"value\":[{\"properties\":{\"pattern\":\"bgsosc\",\"isRegex\":true},\"etag\":\"zfvbennmfkbpj\",\"tags\":{\"urz\":\"ekwwnthropmdudsy\",\"ouergaghp\":\"vktjhffecqkoq\",\"gyedzfzqi\":\"zxkpyehhfdyld\"},\"id\":\"qhtdereunokakzwh\",\"name\":\"jlwyxedzn\",\"type\":\"xrfomcke\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.raiBlocklistItems().list("vjf", "r", "uydldp", com.azure.core.util.Context.NONE); + = manager.raiBlocklistItems().list("yhigqkzjuqwqaj", "uzxp", "xhyoip", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sxfkzrztirjvqxvw", response.iterator().next().properties().pattern()); + Assertions.assertEquals("bgsosc", response.iterator().next().properties().pattern()); Assertions.assertTrue(response.iterator().next().properties().isRegex()); - Assertions.assertEquals("rlqxbctatez", response.iterator().next().tags().get("o")); + Assertions.assertEquals("ekwwnthropmdudsy", response.iterator().next().tags().get("urz")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistPropertiesTests.java index 1a77def06259..83c782b56a29 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistPropertiesTests.java @@ -12,14 +12,14 @@ public final class RaiBlocklistPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiBlocklistProperties model - = BinaryData.fromString("{\"description\":\"kchcxwa\"}").toObject(RaiBlocklistProperties.class); - Assertions.assertEquals("kchcxwa", model.description()); + = BinaryData.fromString("{\"description\":\"flbqvgaq\"}").toObject(RaiBlocklistProperties.class); + Assertions.assertEquals("flbqvgaq", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiBlocklistProperties model = new RaiBlocklistProperties().withDescription("kchcxwa"); + RaiBlocklistProperties model = new RaiBlocklistProperties().withDescription("flbqvgaq"); model = BinaryData.fromObject(model).toObject(RaiBlocklistProperties.class); - Assertions.assertEquals("kchcxwa", model.description()); + Assertions.assertEquals("flbqvgaq", model.description()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsCreateOrUpdateWithResponseMockTests.java index a9e3001bf4f4..81fd21a03178 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsCreateOrUpdateWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class RaiBlocklistsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"fetq\"},\"etag\":\"sjmol\",\"tags\":{\"kakhgkrv\":\"q\",\"qawfusqpf\":\"yycvytvje\",\"zvoortc\":\"xkczbdypbbimhjb\",\"jcyuzlybqsci\":\"nh\"},\"id\":\"ylkvck\",\"name\":\"afnwqh\",\"type\":\"wvcnviulb\"}"; + = "{\"properties\":{\"description\":\"eplrajubowuywevt\"},\"etag\":\"ieikmwlaoklfnis\",\"tags\":{\"tredscnnstjc\":\"ucb\",\"xzhclec\":\"yuvtz\"},\"id\":\"tzqzcloy\",\"name\":\"yup\",\"type\":\"idhz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,14 +34,15 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiBlocklist response = manager.raiBlocklists() - .define("gbhuqczou") - .withExistingAccount("ohufzdtsrpjuvgz", "crzhnsbylg") - .withTags(mapOf("rwyakzuafapwxsv", "hbhfljeyodpiovnl", "oextqdnwtgntimz", "eatjiobnir")) - .withProperties(new RaiBlocklistProperties().withDescription("fulvcxgl")) + .define("wihbnnxemv") + .withExistingAccount("ihscjvakmhzbhw", "hf") + .withTags( + mapOf("tndqlmf", "pfzsclefyrl", "evnoqayrehjuqwva", "ggnbbuypwovvvsfl", "enqqzlxnqzu", "xrlzhpziha")) + .withProperties(new RaiBlocklistProperties().withDescription("qq")) .create(); - Assertions.assertEquals("fetq", response.properties().description()); - Assertions.assertEquals("q", response.tags().get("kakhgkrv")); + Assertions.assertEquals("eplrajubowuywevt", response.properties().description()); + Assertions.assertEquals("ucb", response.tags().get("tredscnnstjc")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsGetWithResponseMockTests.java index 895e1fb7d50b..fbb13166c7b9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class RaiBlocklistsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"vul\"},\"etag\":\"vvjncpmyhtxgdmv\",\"tags\":{\"efb\":\"mixmlwk\",\"fyim\":\"yjrtalqeebu\",\"bywa\":\"oaezktomsgoihlq\",\"ztvn\":\"zbaeeek\"},\"id\":\"fbbtownoljdkxhme\",\"name\":\"yaolclz\",\"type\":\"krdp\"}"; + = "{\"properties\":{\"description\":\"amkuuyiuyuafix\"},\"etag\":\"icwgpthdcfmf\",\"tags\":{\"odropa\":\"as\",\"gt\":\"v\"},\"id\":\"us\",\"name\":\"wgqrntaum\",\"type\":\"rcjlvkrkegtyczup\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiBlocklist response = manager.raiBlocklists() - .getWithResponse("w", "msfwtwrsvevcneq", "wxhqhgkh", com.azure.core.util.Context.NONE) + .getWithResponse("deotmfx", "kd", "g", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vul", response.properties().description()); - Assertions.assertEquals("mixmlwk", response.tags().get("efb")); + Assertions.assertEquals("amkuuyiuyuafix", response.properties().description()); + Assertions.assertEquals("as", response.tags().get("odropa")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsListMockTests.java index 78e59f0ba92e..963948575638 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiBlocklistsListMockTests.java @@ -22,7 +22,7 @@ public final class RaiBlocklistsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"xowvhufcmuaj\"},\"etag\":\"lxphtozf\",\"tags\":{\"tib\":\"wtnnsvrfajyni\",\"ctblfehb\":\"fgzqzhl\",\"rcmeqljxdumhycx\":\"cgyo\",\"d\":\"nebldxag\"},\"id\":\"wcn\",\"name\":\"kwx\",\"type\":\"sjqu\"}]}"; + = "{\"value\":[{\"properties\":{\"description\":\"tbapfcz\"},\"etag\":\"xtrlqbpx\",\"tags\":{\"yegbthms\":\"kjpirgzxvbczw\"},\"id\":\"tjbuiggruno\",\"name\":\"fvua\",\"type\":\"jthoivsdwsngkr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.raiBlocklists().list("yytbpkrpkhq", "tpoenefnoafpcnrx", com.azure.core.util.Context.NONE); + = manager.raiBlocklists().list("iyxlzmiydde", "qzqvabmhvsex", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xowvhufcmuaj", response.iterator().next().properties().description()); - Assertions.assertEquals("wtnnsvrfajyni", response.iterator().next().tags().get("tib")); + Assertions.assertEquals("tbapfcz", response.iterator().next().properties().description()); + Assertions.assertEquals("kjpirgzxvbczw", response.iterator().next().tags().get("yegbthms")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterInnerTests.java index c57efc8bea9b..d2f4dcf34a2c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterInnerTests.java @@ -13,10 +13,10 @@ public final class RaiContentFilterInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiContentFilterInner model = BinaryData.fromString( - "{\"properties\":{\"name\":\"hrszi\",\"isMultiLevelFilter\":false,\"source\":\"PreRun\"},\"id\":\"yetnd\",\"name\":\"bf\",\"type\":\"yggagflnlgmt\"}") + "{\"properties\":{\"name\":\"uy\",\"isMultiLevelFilter\":false,\"source\":\"Prompt\"},\"id\":\"daultxijjumfq\",\"name\":\"azlnqnmcjngzqdqx\",\"type\":\"bjwgnyfus\"}") .toObject(RaiContentFilterInner.class); - Assertions.assertEquals("hrszi", model.properties().name()); + Assertions.assertEquals("uy", model.properties().name()); Assertions.assertFalse(model.properties().isMultiLevelFilter()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, model.properties().source()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, model.properties().source()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterListResultTests.java index e8ce4a414e2e..9818fa0f305f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterListResultTests.java @@ -13,11 +13,11 @@ public final class RaiContentFilterListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiContentFilterListResult model = BinaryData.fromString( - "{\"nextLink\":\"hkpigqfusuckzmkw\",\"value\":[{\"properties\":{\"name\":\"xaxmq\",\"isMultiLevelFilter\":true,\"source\":\"PostToolCall\"},\"id\":\"jnhgwydyyn\",\"name\":\"svkhgbv\",\"type\":\"ta\"},{\"properties\":{\"name\":\"fdlpukhpyr\",\"isMultiLevelFilter\":false,\"source\":\"Completion\"},\"id\":\"pe\",\"name\":\"gkhnmgbrouxddbh\",\"type\":\"hpfpazjzoywjxhp\"},{\"properties\":{\"name\":\"ontacnpq\",\"isMultiLevelFilter\":true,\"source\":\"PostToolCall\"},\"id\":\"evrh\",\"name\":\"ljyoogwx\",\"type\":\"nsduugwbsre\"}]}") + "{\"nextLink\":\"glcfhmlrqryxyn\",\"value\":[{\"properties\":{\"name\":\"p\",\"isMultiLevelFilter\":false,\"source\":\"PreToolCall\"},\"id\":\"nptgoeiybba\",\"name\":\"pfhvfslk\",\"type\":\"ntjlr\"},{\"properties\":{\"name\":\"kskyrioovzid\",\"isMultiLevelFilter\":true,\"source\":\"PreRun\"},\"id\":\"zm\",\"name\":\"frygznmmax\",\"type\":\"izkzobgo\"},{\"properties\":{\"name\":\"hsln\",\"isMultiLevelFilter\":true,\"source\":\"PreToolCall\"},\"id\":\"xynl\",\"name\":\"xecwcro\",\"type\":\"phslhcawjutifdw\"},{\"properties\":{\"name\":\"igorqjbttzhragl\",\"isMultiLevelFilter\":true,\"source\":\"PostRun\"},\"id\":\"qjujeickpzvcp\",\"name\":\"pmxelnwcltyje\",\"type\":\"ex\"}]}") .toObject(RaiContentFilterListResult.class); - Assertions.assertEquals("hkpigqfusuckzmkw", model.nextLink()); - Assertions.assertEquals("xaxmq", model.value().get(0).properties().name()); - Assertions.assertTrue(model.value().get(0).properties().isMultiLevelFilter()); - Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.value().get(0).properties().source()); + Assertions.assertEquals("glcfhmlrqryxyn", model.nextLink()); + Assertions.assertEquals("p", model.value().get(0).properties().name()); + Assertions.assertFalse(model.value().get(0).properties().isMultiLevelFilter()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, model.value().get(0).properties().source()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterPropertiesTests.java index 1d3a3c463610..aab3703818b5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFilterPropertiesTests.java @@ -13,10 +13,10 @@ public final class RaiContentFilterPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiContentFilterProperties model - = BinaryData.fromString("{\"name\":\"ahzjmucftb\",\"isMultiLevelFilter\":true,\"source\":\"Completion\"}") + = BinaryData.fromString("{\"name\":\"svtui\",\"isMultiLevelFilter\":true,\"source\":\"PreToolCall\"}") .toObject(RaiContentFilterProperties.class); - Assertions.assertEquals("ahzjmucftb", model.name()); + Assertions.assertEquals("svtui", model.name()); Assertions.assertTrue(model.isMultiLevelFilter()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, model.source()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, model.source()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersGetWithResponseMockTests.java index ff92277def03..543619ab2011 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class RaiContentFiltersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"name\":\"irqwipze\",\"isMultiLevelFilter\":true,\"source\":\"PreToolCall\"},\"id\":\"ytkmlfupj\",\"name\":\"cxxvzjoyxjgahx\",\"type\":\"errdakt\"}"; + = "{\"properties\":{\"name\":\"kpkocm\",\"isMultiLevelFilter\":false,\"source\":\"Prompt\"},\"id\":\"xop\",\"name\":\"icyvspeslh\",\"type\":\"y\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiContentFilter response = manager.raiContentFilters() - .getWithResponse("mzc", "niapypi", com.azure.core.util.Context.NONE) + .getWithResponse("lhqvbk", "rbpyhssrl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("irqwipze", response.properties().name()); - Assertions.assertTrue(response.properties().isMultiLevelFilter()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, response.properties().source()); + Assertions.assertEquals("kpkocm", response.properties().name()); + Assertions.assertFalse(response.properties().isMultiLevelFilter()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, response.properties().source()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersListMockTests.java index 1d6825c36652..ba923cb10f66 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiContentFiltersListMockTests.java @@ -23,7 +23,7 @@ public final class RaiContentFiltersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"name\":\"vc\",\"isMultiLevelFilter\":true,\"source\":\"PreRun\"},\"id\":\"kmpwyvlhnh\",\"name\":\"c\",\"type\":\"khlebgjgylsacagi\"}]}"; + = "{\"value\":[{\"properties\":{\"name\":\"pumdd\",\"isMultiLevelFilter\":false,\"source\":\"PostRun\"},\"id\":\"dyd\",\"name\":\"tpfcudvafnbfbqv\",\"type\":\"nqnxhgkordwzej\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,10 +33,10 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.raiContentFilters().list("ytkbce", com.azure.core.util.Context.NONE); + = manager.raiContentFilters().list("kgv", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vc", response.iterator().next().properties().name()); - Assertions.assertTrue(response.iterator().next().properties().isMultiLevelFilter()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, response.iterator().next().properties().source()); + Assertions.assertEquals("pumdd", response.iterator().next().properties().name()); + Assertions.assertFalse(response.iterator().next().properties().isMultiLevelFilter()); + Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, response.iterator().next().properties().source()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressManagedIdentityRefTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressManagedIdentityRefTests.java index dd023198c808..68dc52e8c4f8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressManagedIdentityRefTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressManagedIdentityRefTests.java @@ -12,18 +12,18 @@ public final class RaiEgressManagedIdentityRefTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiEgressManagedIdentityRef model - = BinaryData.fromString("{\"resource\":\"vdaeyyguxakjsq\",\"format\":\"zbezkgimsidxasic\"}") + = BinaryData.fromString("{\"resource\":\"stcyohpfkyrkdbd\",\"format\":\"ogsjkmnwqjno\"}") .toObject(RaiEgressManagedIdentityRef.class); - Assertions.assertEquals("vdaeyyguxakjsq", model.resource()); - Assertions.assertEquals("zbezkgimsidxasic", model.format()); + Assertions.assertEquals("stcyohpfkyrkdbd", model.resource()); + Assertions.assertEquals("ogsjkmnwqjno", model.format()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RaiEgressManagedIdentityRef model - = new RaiEgressManagedIdentityRef().withResource("vdaeyyguxakjsq").withFormat("zbezkgimsidxasic"); + = new RaiEgressManagedIdentityRef().withResource("stcyohpfkyrkdbd").withFormat("ogsjkmnwqjno"); model = BinaryData.fromObject(model).toObject(RaiEgressManagedIdentityRef.class); - Assertions.assertEquals("vdaeyyguxakjsq", model.resource()); - Assertions.assertEquals("zbezkgimsidxasic", model.format()); + Assertions.assertEquals("stcyohpfkyrkdbd", model.resource()); + Assertions.assertEquals("ogsjkmnwqjno", model.format()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressPolicyConfigTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressPolicyConfigTests.java index 86b5d242867f..42fdf8e01dd2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressPolicyConfigTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressPolicyConfigTests.java @@ -25,72 +25,68 @@ public final class RaiEgressPolicyConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiEgressPolicyConfig model = BinaryData.fromString( - "{\"mode\":\"Enforced\",\"defaultAction\":\"Allow\",\"description\":\"iwrxgkn\",\"rules\":[{\"name\":\"yinzqodfvpgs\",\"description\":\"xgsg\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"zdjtxvzflbqv\",\"path\":\"qvlgafcqusrdvetn\"},\"action\":{\"actionType\":\"Transform\",\"headers\":[{\"operation\":\"Insert\",\"name\":\"tnwlduycv\",\"value\":\"hyrmewipmvekdx\",\"valueRef\":{}},{\"operation\":\"Set\",\"name\":\"qgsjjxun\",\"value\":\"gketwzhhzjhf\",\"valueRef\":{}},{\"operation\":\"Set\",\"name\":\"vvmu\",\"value\":\"pmuneqsx\",\"valueRef\":{}},{\"operation\":\"Insert\",\"name\":\"fbuzjyihs\",\"value\":\"bhu\",\"valueRef\":{}}],\"rewrite\":{\"scheme\":\"https\",\"host\":\"uemsly\",\"path\":\"qyrp\"}}}]}") + "{\"mode\":\"Enforced\",\"defaultAction\":\"Allow\",\"description\":\"onmacjekniz\",\"rules\":[{\"name\":\"vcimpev\",\"description\":\"mblrrilbywd\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"ccwr\",\"path\":\"scjfnyns\"},\"action\":{\"actionType\":\"Deny\",\"headers\":[{\"operation\":\"Remove\",\"name\":\"zdvoqytibyowbb\",\"value\":\"yavutpthjoxois\",\"valueRef\":{}},{\"operation\":\"Insert\",\"name\":\"sbpimlq\",\"value\":\"jxkcgxxlxsff\",\"valueRef\":{}},{\"operation\":\"Set\",\"name\":\"izqzdwlvwlyou\",\"value\":\"gfbkjubdyh\",\"valueRef\":{}}],\"rewrite\":{\"scheme\":\"http\",\"host\":\"sgow\",\"path\":\"ttsttktlahbqact\"}}}]}") .toObject(RaiEgressPolicyConfig.class); Assertions.assertEquals(RaiEgressMode.ENFORCED, model.mode()); Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, model.defaultAction()); - Assertions.assertEquals("iwrxgkn", model.description()); - Assertions.assertEquals("yinzqodfvpgs", model.rules().get(0).name()); - Assertions.assertEquals("xgsg", model.rules().get(0).description()); + Assertions.assertEquals("onmacjekniz", model.description()); + Assertions.assertEquals("vcimpev", model.rules().get(0).name()); + Assertions.assertEquals("mblrrilbywd", model.rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, model.rules().get(0).ruleType()); - Assertions.assertEquals("zdjtxvzflbqv", model.rules().get(0).match().host()); - Assertions.assertEquals("qvlgafcqusrdvetn", model.rules().get(0).match().path()); - Assertions.assertEquals(RaiEgressRuleActionType.TRANSFORM, model.rules().get(0).action().actionType()); - Assertions.assertEquals(RaiEgressHeaderOperation.INSERT, + Assertions.assertEquals("ccwr", model.rules().get(0).match().host()); + Assertions.assertEquals("scjfnyns", model.rules().get(0).match().path()); + Assertions.assertEquals(RaiEgressRuleActionType.DENY, model.rules().get(0).action().actionType()); + Assertions.assertEquals(RaiEgressHeaderOperation.REMOVE, model.rules().get(0).action().headers().get(0).operation()); - Assertions.assertEquals("tnwlduycv", model.rules().get(0).action().headers().get(0).name()); - Assertions.assertEquals("hyrmewipmvekdx", model.rules().get(0).action().headers().get(0).value()); - Assertions.assertEquals(RaiEgressScheme.HTTPS, model.rules().get(0).action().rewrite().scheme()); - Assertions.assertEquals("uemsly", model.rules().get(0).action().rewrite().host()); - Assertions.assertEquals("qyrp", model.rules().get(0).action().rewrite().path()); + Assertions.assertEquals("zdvoqytibyowbb", model.rules().get(0).action().headers().get(0).name()); + Assertions.assertEquals("yavutpthjoxois", model.rules().get(0).action().headers().get(0).value()); + Assertions.assertEquals(RaiEgressScheme.HTTP, model.rules().get(0).action().rewrite().scheme()); + Assertions.assertEquals("sgow", model.rules().get(0).action().rewrite().host()); + Assertions.assertEquals("ttsttktlahbqact", model.rules().get(0).action().rewrite().path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RaiEgressPolicyConfig model = new RaiEgressPolicyConfig().withMode(RaiEgressMode.ENFORCED) .withDefaultAction(RaiEgressDefaultAction.ALLOW) - .withDescription("iwrxgkn") - .withRules(Arrays.asList(new RaiEgressRule().withName("yinzqodfvpgs") - .withDescription("xgsg") + .withDescription("onmacjekniz") + .withRules(Arrays.asList(new RaiEgressRule().withName("vcimpev") + .withDescription("mblrrilbywd") .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch().withHost("zdjtxvzflbqv").withPath("qvlgafcqusrdvetn")) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.TRANSFORM) + .withMatch(new RaiEgressRuleMatch().withHost("ccwr").withPath("scjfnyns")) + .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY) .withHeaders(Arrays.asList( - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) - .withName("tnwlduycv") - .withValue("hyrmewipmvekdx") + new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.REMOVE) + .withName("zdvoqytibyowbb") + .withValue("yavutpthjoxois") .withValueRef(new RaiEgressHeaderValueRef()), - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.SET) - .withName("qgsjjxun") - .withValue("gketwzhhzjhf") + new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) + .withName("sbpimlq") + .withValue("jxkcgxxlxsff") .withValueRef(new RaiEgressHeaderValueRef()), new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.SET) - .withName("vvmu") - .withValue("pmuneqsx") - .withValueRef(new RaiEgressHeaderValueRef()), - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) - .withName("fbuzjyihs") - .withValue("bhu") + .withName("izqzdwlvwlyou") + .withValue("gfbkjubdyh") .withValueRef(new RaiEgressHeaderValueRef()))) - .withRewrite(new RaiEgressRewriteTarget().withScheme(RaiEgressScheme.HTTPS) - .withHost("uemsly") - .withPath("qyrp"))))); + .withRewrite(new RaiEgressRewriteTarget().withScheme(RaiEgressScheme.HTTP) + .withHost("sgow") + .withPath("ttsttktlahbqact"))))); model = BinaryData.fromObject(model).toObject(RaiEgressPolicyConfig.class); Assertions.assertEquals(RaiEgressMode.ENFORCED, model.mode()); Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, model.defaultAction()); - Assertions.assertEquals("iwrxgkn", model.description()); - Assertions.assertEquals("yinzqodfvpgs", model.rules().get(0).name()); - Assertions.assertEquals("xgsg", model.rules().get(0).description()); + Assertions.assertEquals("onmacjekniz", model.description()); + Assertions.assertEquals("vcimpev", model.rules().get(0).name()); + Assertions.assertEquals("mblrrilbywd", model.rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, model.rules().get(0).ruleType()); - Assertions.assertEquals("zdjtxvzflbqv", model.rules().get(0).match().host()); - Assertions.assertEquals("qvlgafcqusrdvetn", model.rules().get(0).match().path()); - Assertions.assertEquals(RaiEgressRuleActionType.TRANSFORM, model.rules().get(0).action().actionType()); - Assertions.assertEquals(RaiEgressHeaderOperation.INSERT, + Assertions.assertEquals("ccwr", model.rules().get(0).match().host()); + Assertions.assertEquals("scjfnyns", model.rules().get(0).match().path()); + Assertions.assertEquals(RaiEgressRuleActionType.DENY, model.rules().get(0).action().actionType()); + Assertions.assertEquals(RaiEgressHeaderOperation.REMOVE, model.rules().get(0).action().headers().get(0).operation()); - Assertions.assertEquals("tnwlduycv", model.rules().get(0).action().headers().get(0).name()); - Assertions.assertEquals("hyrmewipmvekdx", model.rules().get(0).action().headers().get(0).value()); - Assertions.assertEquals(RaiEgressScheme.HTTPS, model.rules().get(0).action().rewrite().scheme()); - Assertions.assertEquals("uemsly", model.rules().get(0).action().rewrite().host()); - Assertions.assertEquals("qyrp", model.rules().get(0).action().rewrite().path()); + Assertions.assertEquals("zdvoqytibyowbb", model.rules().get(0).action().headers().get(0).name()); + Assertions.assertEquals("yavutpthjoxois", model.rules().get(0).action().headers().get(0).value()); + Assertions.assertEquals(RaiEgressScheme.HTTP, model.rules().get(0).action().rewrite().scheme()); + Assertions.assertEquals("sgow", model.rules().get(0).action().rewrite().host()); + Assertions.assertEquals("ttsttktlahbqact", model.rules().get(0).action().rewrite().path()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressRewriteTargetTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressRewriteTargetTests.java index bc92ecb94bcf..fa549b41c665 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressRewriteTargetTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressRewriteTargetTests.java @@ -13,21 +13,20 @@ public final class RaiEgressRewriteTargetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiEgressRewriteTarget model - = BinaryData.fromString("{\"scheme\":\"https\",\"host\":\"vjskgfmoc\",\"path\":\"hpqgatjeaahhvj\"}") + = BinaryData.fromString("{\"scheme\":\"http\",\"host\":\"hdd\",\"path\":\"acegfnmntf\"}") .toObject(RaiEgressRewriteTarget.class); - Assertions.assertEquals(RaiEgressScheme.HTTPS, model.scheme()); - Assertions.assertEquals("vjskgfmoc", model.host()); - Assertions.assertEquals("hpqgatjeaahhvj", model.path()); + Assertions.assertEquals(RaiEgressScheme.HTTP, model.scheme()); + Assertions.assertEquals("hdd", model.host()); + Assertions.assertEquals("acegfnmntf", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiEgressRewriteTarget model = new RaiEgressRewriteTarget().withScheme(RaiEgressScheme.HTTPS) - .withHost("vjskgfmoc") - .withPath("hpqgatjeaahhvj"); + RaiEgressRewriteTarget model + = new RaiEgressRewriteTarget().withScheme(RaiEgressScheme.HTTP).withHost("hdd").withPath("acegfnmntf"); model = BinaryData.fromObject(model).toObject(RaiEgressRewriteTarget.class); - Assertions.assertEquals(RaiEgressScheme.HTTPS, model.scheme()); - Assertions.assertEquals("vjskgfmoc", model.host()); - Assertions.assertEquals("hpqgatjeaahhvj", model.path()); + Assertions.assertEquals(RaiEgressScheme.HTTP, model.scheme()); + Assertions.assertEquals("hdd", model.host()); + Assertions.assertEquals("acegfnmntf", model.path()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressRuleMatchTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressRuleMatchTests.java index 97705f32af26..a0fbbdb96b1d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressRuleMatchTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiEgressRuleMatchTests.java @@ -11,17 +11,17 @@ public final class RaiEgressRuleMatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RaiEgressRuleMatch model = BinaryData.fromString("{\"host\":\"oxfrkenxpmyyefr\",\"path\":\"pdnqqskawaoqvmmb\"}") - .toObject(RaiEgressRuleMatch.class); - Assertions.assertEquals("oxfrkenxpmyyefr", model.host()); - Assertions.assertEquals("pdnqqskawaoqvmmb", model.path()); + RaiEgressRuleMatch model + = BinaryData.fromString("{\"host\":\"oaz\",\"path\":\"u\"}").toObject(RaiEgressRuleMatch.class); + Assertions.assertEquals("oaz", model.host()); + Assertions.assertEquals("u", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiEgressRuleMatch model = new RaiEgressRuleMatch().withHost("oxfrkenxpmyyefr").withPath("pdnqqskawaoqvmmb"); + RaiEgressRuleMatch model = new RaiEgressRuleMatch().withHost("oaz").withPath("u"); model = BinaryData.fromObject(model).toObject(RaiEgressRuleMatch.class); - Assertions.assertEquals("oxfrkenxpmyyefr", model.host()); - Assertions.assertEquals("pdnqqskawaoqvmmb", model.path()); + Assertions.assertEquals("oaz", model.host()); + Assertions.assertEquals("u", model.path()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesCreateOrUpdateWithResponseMockTests.java index 3ca9b64d84fb..1aa8c61ea7d4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesCreateOrUpdateWithResponseMockTests.java @@ -12,18 +12,6 @@ import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; import com.azure.resourcemanager.cognitiveservices.models.CustomBlocklistConfig; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoints; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsManifest; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsRegoPolicyDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; import com.azure.resourcemanager.cognitiveservices.models.RaiActionType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressMode; @@ -36,11 +24,8 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiPolicy; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentFilter; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyCustomExternalSafetyProviderReference; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyProperties; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoReference; import com.azure.resourcemanager.cognitiveservices.models.SafetyProviderConfig; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -55,7 +40,7 @@ public final class RaiPoliciesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"format\":\"ContentFilters\",\"acs\":{\"agent_control_specification_version\":\"ks\",\"metadata\":{\"jnmcvjbssfcriqx\":\"\\\"dataogjmqjhgcyd\\\"\",\"vcdkucpxpyafrwr\":\"\\\"dataixtdlxw\\\"\"},\"policies\":{\"spnrsjsemlzofrs\":{\"type\":\"rego\",\"query\":\"ogeuvmk\"},\"jp\":{\"type\":\"rego\",\"query\":\"p\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"utikelpmwgrpu\"},\"annotations\":{}},\"pre_tool_call\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"vosgjzscu\"},\"annotations\":{},\"tool_name_from\":\"$snap.tool_call.name\"},\"post_tool_call\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"fwgq\"},\"annotations\":{},\"tool_name_from\":\"$snap.tool_call.name\"},\"output\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"rxggezkhzp\"},\"annotations\":{}}},\"tools\":{\"wwp\":{\"id\":\"senerr\",\"type\":\"yzaivnpsjnpckpl\",\"description\":\"yduonbdawsaopl\",\"security_labels\":[\"nbkxjarsbb\",\"ddwokqxail\",\"qk\",\"yqjvzvc\"],\"clearance\":\"dspzesfkqqxuhv\",\"wukokgoojj\":\"\\\"databrouszxac\\\"\",\"xvs\":\"\\\"datauktubcmunhgbtzv\\\"\",\"cnihkswxmfurqmw\":\"\\\"datacuufkrfn\\\"\"},\"j\":{\"id\":\"um\",\"type\":\"ahbqsvnkxm\",\"description\":\"zuae\",\"security_labels\":[\"hxg\",\"qmyrhkvx\"],\"clearance\":\"miemqyftgpqos\",\"mghpakbqyh\":\"\\\"dataqv\\\"\",\"jm\":\"\\\"datasornfbmeqagkn\\\"\",\"mqmbwpp\":\"\\\"databnyevztnjawrhule\\\"\",\"xjucl\":\"\\\"datairxbkitzmnhit\\\"\"},\"derjennmk\":{\"id\":\"sgc\",\"type\":\"egdzdvylju\",\"description\":\"f\",\"security_labels\":[\"ufl\",\"ifnivlut\",\"g\",\"aacxauhvc\"],\"clearance\":\"xhklsqxt\",\"ktsrjyxxoxwfzbkv\":\"\\\"datay\\\"\",\"wbebsnbwutlv\":\"\\\"datacnxfxphs\\\"\",\"u\":\"\\\"datawm\\\"\",\"mmjczvog\":\"\\\"dataustihtgrafjajvky\\\"\"}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"wq\"},{\"regoName\":\"wxhhlbmyphfx\"},{\"regoName\":\"rpdhewokyqs\"},{\"regoName\":\"kx\"}],\"type\":\"SystemManaged\",\"mode\":\"Default\",\"basePolicyName\":\"hqbtodjfyxbvkv\",\"contentFilters\":[{\"name\":\"vd\",\"enabled\":true,\"severityThreshold\":\"Low\",\"blocking\":false,\"source\":\"PreToolCall\",\"action\":\"ANNOTATING\"}],\"customBlocklists\":[{\"source\":\"Prompt\",\"blocklistName\":\"dvvlrhocrkkvxund\",\"blocking\":false},{\"source\":\"Completion\",\"blocklistName\":\"suvqhxtozfgdkwb\",\"blocking\":true},{\"source\":\"PreRun\",\"blocklistName\":\"iigfuzkeutui\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PostRun\",\"safetyProviderName\":\"qdz\",\"blocking\":false},{\"source\":\"Prompt\",\"safetyProviderName\":\"wxy\",\"blocking\":true},{\"source\":\"PostRun\",\"safetyProviderName\":\"vtzqw\",\"blocking\":false},{\"source\":\"PreRun\",\"safetyProviderName\":\"bek\",\"blocking\":true}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"pkyvnhiysdho\",\"managedIdentityResourceId\":\"slhraqkiwlwkff\",\"source\":\"Completion\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Allow\",\"description\":\"flteatnegef\",\"rules\":[{\"name\":\"njtqbg\",\"description\":\"ibt\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Rewrite\"}},{\"name\":\"wtdqtcbjdbt\",\"description\":\"hkxunsaujqgbb\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Deny\"}},{\"name\":\"oawh\",\"description\":\"smbcsloygsab\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Allow\"}}]}},\"etag\":\"ronsdunr\",\"tags\":{\"vfdbqskgqjbvitpt\":\"zuatqhgzuyxt\"},\"id\":\"sffavdhpiwrmuwk\",\"name\":\"jwbyfdwfbw\",\"type\":\"yldqtmggcpd\"}"; + = "{\"properties\":{\"type\":\"UserManaged\",\"mode\":\"Deferred\",\"basePolicyName\":\"rvmzrqra\",\"contentFilters\":[{\"name\":\"vznllaslkskhjqj\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"PostRun\",\"action\":\"ANNOTATING\"},{\"name\":\"taiy\",\"enabled\":true,\"severityThreshold\":\"High\",\"blocking\":true,\"source\":\"Prompt\",\"action\":\"HITL\"}],\"customBlocklists\":[{\"source\":\"PreRun\",\"blocklistName\":\"nwldfmhljq\",\"blocking\":false},{\"source\":\"PostRun\",\"blocklistName\":\"jc\",\"blocking\":false}],\"safetyProviders\":[{\"source\":\"PreRun\",\"safetyProviderName\":\"buhsxrznmgsda\",\"blocking\":true},{\"source\":\"Prompt\",\"safetyProviderName\":\"efrbhseuerbg\",\"blocking\":false},{\"source\":\"PostToolCall\",\"safetyProviderName\":\"udcaytujrax\",\"blocking\":false}],\"egressPolicy\":{\"mode\":\"Enforced\",\"defaultAction\":\"Allow\",\"description\":\"nsewouxl\",\"rules\":[{\"name\":\"vvyljurkepose\",\"description\":\"qylmpctwjwdsd\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Deny\"}}]}},\"etag\":\"erxxxoteehkhowgo\",\"tags\":{\"c\":\"hxow\",\"p\":\"apnpxraqawbmp\",\"xrkgjn\":\"eylqlocvvujexayg\",\"pieidzlvssqy\":\"zpaslavxjfiuo\"},\"id\":\"opac\",\"name\":\"yhydvikmfn\",\"type\":\"pmillxgjsci\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -65,205 +50,93 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiPolicy response = manager.raiPolicies() - .define("yeurjwmv") - .withExistingAccount("zjow", "ugeerclbltbhpwac") - .withTags(mapOf("azusjcd", "ocjomlup", "j", "uslgdwzrgdqyx")) - .withProperties(new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs(new RaiAcsManifest().withAgentControlSpecificationVersion("ifki") - .withMetadata(mapOf("btxsytrtexeg", "\"datapruccwme\"", "hvycfjncindi", "\"datamrqjywi\"", - "lanhzcknjxizba", "\"dataoqkajwjuriarsbc\"")) - .withPolicies(mapOf("acyyjmlxppdndzkf", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("gzkztxfex"), - "ibfkcjytq", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO).withQuery("uiiu"), - "fopvnopmotdsfhox", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO).withQuery("izeq"), - "ldzmxojzsvmaigb", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("yoazyfbkm"))) - .withInterventionPoints(new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("yejthgeecb")) - .withAnnotations(new RaiAcsEmptyObject())) - .withPreToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("lckihba")) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS)) - .withPostToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("npu")) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME)) - .withOutput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.OUTPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("crjixiujzkcs")) - .withAnnotations(new RaiAcsEmptyObject()))) - .withTools(mapOf("hhxmoevvud", - new RaiAcsToolDefinition().withId("sw") - .withType("ykkbxktxbbwl") - .withDescription("wzoknvu") - .withSecurityLabels(Arrays.asList("lggbqaolgzub")) - .withClearance("dlkvggcmf") - .withAdditionalProperties(mapOf("tpkmixwe", "\"dataf\"", "epnqvxgvohdb", "\"datazlscgs\"")), - "pcqk", - new RaiAcsToolDefinition().withId("pfhga") - .withType("vwxqhpjhu") - .withDescription("hxvzgayb") - .withSecurityLabels(Arrays.asList("hogalg", "nwfmzvzt")) - .withClearance("ebpamq") - .withAdditionalProperties(mapOf("kjunzxezriwgoew", "\"datadhlywkho\"", "vdfeu", - "\"datassanybzzg\"", "v", "\"datayj\"")))) - .withAnnotators(new RaiAcsEmptyObject())) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("pxjhcitibe"))) - .withMode(RaiPolicyMode.DEFAULT) - .withBasePolicyName("vdaahlfrcqklpmvz") + .define("ssgpgvo") + .withExistingAccount("usdekpd", "z") + .withTags(mapOf("uklajvcfoc", "ekfsrm", "kwxnhwhhnoyrza", "hapejov", "xc", "oeehpmjenvjeatea", + "zkdolrndwdbvxvza", "xoxdjxldnaryyi")) + .withProperties(new RaiPolicyProperties().withMode(RaiPolicyMode.DEFAULT) + .withBasePolicyName("dqzsqu") .withContentFilters(Arrays.asList( - new RaiPolicyContentFilter().withName("szyaqgomlbmfgge") + new RaiPolicyContentFilter().withName("ztlvv") .withEnabled(true) + .withSeverityThreshold(ContentLevel.HIGH) + .withBlocking(false) + .withSource(RaiPolicyContentSource.PRE_RUN) + .withAction(RaiActionType.NONE), + new RaiPolicyContentFilter().withName("pwpwfkcauxuva") + .withEnabled(false) .withSeverityThreshold(ContentLevel.MEDIUM) .withBlocking(false) .withSource(RaiPolicyContentSource.COMPLETION) - .withAction(RaiActionType.HITL), - new RaiPolicyContentFilter().withName("e") - .withEnabled(false) - .withSeverityThreshold(ContentLevel.LOW) - .withBlocking(true) - .withSource(RaiPolicyContentSource.PROMPT) - .withAction(RaiActionType.RETRY), - new RaiPolicyContentFilter().withName("cq") - .withEnabled(false) + .withAction(RaiActionType.NONE), + new RaiPolicyContentFilter().withName("lbtxluevsolzw") + .withEnabled(true) .withSeverityThreshold(ContentLevel.HIGH) - .withBlocking(true) - .withSource(RaiPolicyContentSource.PRE_TOOL_CALL) - .withAction(RaiActionType.ANNOTATING))) + .withBlocking(false) + .withSource(RaiPolicyContentSource.POST_RUN) + .withAction(RaiActionType.HITL))) .withCustomBlocklists(Arrays.asList( - new CustomBlocklistConfig().withBlocklistName("xptch") - .withBlocking(true) - .withSource(RaiPolicyContentSource.COMPLETION), - new CustomBlocklistConfig().withBlocklistName("dqimlgbbfjm") - .withBlocking(true) - .withSource(RaiPolicyContentSource.PRE_TOOL_CALL), - new CustomBlocklistConfig().withBlocklistName("hmpmhef") + new CustomBlocklistConfig().withBlocklistName("xhfxfjwpdkkt") .withBlocking(true) - .withSource(RaiPolicyContentSource.POST_TOOL_CALL))) - .withSafetyProviders(Arrays.asList( - new SafetyProviderConfig().withSafetyProviderName("fytlsnl") + .withSource(RaiPolicyContentSource.PROMPT), + new CustomBlocklistConfig().withBlocklistName("mbrwg") .withBlocking(true) - .withSource(RaiPolicyContentSource.PRE_TOOL_CALL), - new SafetyProviderConfig().withSafetyProviderName("qixuancc") - .withBlocking(false) - .withSource(RaiPolicyContentSource.PRE_RUN), - new SafetyProviderConfig().withSafetyProviderName("fqpmquxpj") - .withBlocking(false) - .withSource(RaiPolicyContentSource.POST_TOOL_CALL))) - .withCustomExternalSafetyProviders(Arrays.asList( - new RaiPolicyCustomExternalSafetyProviderReference().withExternalSafetyProviderName("radciovm") - .withManagedIdentityResourceId("zgugrblw") - .withSource(RaiPolicyContentSource.PRE_RUN) - .withBlocking(false))) - .withEgressPolicy( - new RaiEgressPolicyConfig().withMode(RaiEgressMode.AUDIT) - .withDefaultAction(RaiEgressDefaultAction.DENY) - .withDescription("aotbptgcsm") - .withRules(Arrays.asList(new RaiEgressRule().withName("xrwqfmd") - .withDescription("cvtamqwzmnobfe") + .withSource(RaiPolicyContentSource.PRE_TOOL_CALL))) + .withSafetyProviders(Arrays.asList(new SafetyProviderConfig().withSafetyProviderName("xsdpla") + .withBlocking(false) + .withSource(RaiPolicyContentSource.COMPLETION))) + .withEgressPolicy(new RaiEgressPolicyConfig().withMode(RaiEgressMode.AUDIT) + .withDefaultAction(RaiEgressDefaultAction.DENY) + .withDescription("jf") + .withRules(Arrays.asList( + new RaiEgressRule().withName("dgtokvqbvwg") + .withDescription("w") .withRuleType(RaiEgressRuleType.FQDN) .withMatch(new RaiEgressRuleMatch()) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.TRANSFORM)), - new RaiEgressRule().withName("ibxovu") - .withDescription("qjrkbln") - .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch()) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.REWRITE)), - new RaiEgressRule().withName("wgycvtqnzjc") - .withDescription("qzhembtbw") - .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch()) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.ALLOW)), - new RaiEgressRule().withName("adpi") - .withDescription("dleajvmvv") - .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch()) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY)))))) - .withIfMatch("gsqxilefej") - .withIfNoneMatch("ewrznequqynttw") + .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.REWRITE)), + new RaiEgressRule().withName("akglhpsesrfga") + .withDescription("iydvxc") + .withRuleType(RaiEgressRuleType.FQDN) + .withMatch(new RaiEgressRuleMatch()) + .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY)), + new RaiEgressRule().withName("hgoqgsoyqyxyj") + .withDescription("b") + .withRuleType(RaiEgressRuleType.FQDN) + .withMatch(new RaiEgressRuleMatch()) + .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY)), + new RaiEgressRule().withName("spglq") + .withDescription("xtdahneao") + .withRuleType(RaiEgressRuleType.FQDN) + .withMatch(new RaiEgressRuleMatch()) + .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.ALLOW)))))) .create(); - Assertions.assertEquals(RaiPolicyFormat.CONTENT_FILTERS, response.properties().format()); - Assertions.assertEquals("ks", response.properties().acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, - response.properties().acs().policies().get("spnrsjsemlzofrs").type()); - Assertions.assertEquals("ogeuvmk", response.properties().acs().policies().get("spnrsjsemlzofrs").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, - response.properties().acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - response.properties().acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("utikelpmwgrpu", - response.properties().acs().interventionPoints().input().policy().id()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, - response.properties().acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - response.properties().acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("vosgjzscu", - response.properties().acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - response.properties().acs().interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - response.properties().acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, - response.properties().acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("fwgq", response.properties().acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - response.properties().acs().interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.INPUT, - response.properties().acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - response.properties().acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("rxggezkhzp", response.properties().acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("senerr", response.properties().acs().tools().get("wwp").id()); - Assertions.assertEquals("yzaivnpsjnpckpl", response.properties().acs().tools().get("wwp").type()); - Assertions.assertEquals("yduonbdawsaopl", response.properties().acs().tools().get("wwp").description()); - Assertions.assertEquals("nbkxjarsbb", response.properties().acs().tools().get("wwp").securityLabels().get(0)); - Assertions.assertEquals("dspzesfkqqxuhv", response.properties().acs().tools().get("wwp").clearance()); - Assertions.assertEquals("wq", response.properties().acsRegos().get(0).regoName()); - Assertions.assertEquals(RaiPolicyMode.DEFAULT, response.properties().mode()); - Assertions.assertEquals("hqbtodjfyxbvkv", response.properties().basePolicyName()); - Assertions.assertEquals("vd", response.properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyMode.DEFERRED, response.properties().mode()); + Assertions.assertEquals("rvmzrqra", response.properties().basePolicyName()); + Assertions.assertEquals("vznllaslkskhjqj", response.properties().contentFilters().get(0).name()); Assertions.assertTrue(response.properties().contentFilters().get(0).enabled()); - Assertions.assertEquals(ContentLevel.LOW, response.properties().contentFilters().get(0).severityThreshold()); - Assertions.assertFalse(response.properties().contentFilters().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, + Assertions.assertEquals(ContentLevel.MEDIUM, response.properties().contentFilters().get(0).severityThreshold()); + Assertions.assertTrue(response.properties().contentFilters().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, response.properties().contentFilters().get(0).source()); Assertions.assertEquals(RaiActionType.ANNOTATING, response.properties().contentFilters().get(0).action()); - Assertions.assertEquals("dvvlrhocrkkvxund", response.properties().customBlocklists().get(0).blocklistName()); + Assertions.assertEquals("nwldfmhljq", response.properties().customBlocklists().get(0).blocklistName()); Assertions.assertFalse(response.properties().customBlocklists().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PROMPT, + Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, response.properties().customBlocklists().get(0).source()); - Assertions.assertEquals("qdz", response.properties().safetyProviders().get(0).safetyProviderName()); - Assertions.assertFalse(response.properties().safetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, + Assertions.assertEquals("buhsxrznmgsda", response.properties().safetyProviders().get(0).safetyProviderName()); + Assertions.assertTrue(response.properties().safetyProviders().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, response.properties().safetyProviders().get(0).source()); - Assertions.assertEquals("pkyvnhiysdho", - response.properties().customExternalSafetyProviders().get(0).externalSafetyProviderName()); - Assertions.assertEquals("slhraqkiwlwkff", - response.properties().customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, - response.properties().customExternalSafetyProviders().get(0).source()); - Assertions.assertTrue(response.properties().customExternalSafetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiEgressMode.AUDIT, response.properties().egressPolicy().mode()); + Assertions.assertEquals(RaiEgressMode.ENFORCED, response.properties().egressPolicy().mode()); Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, response.properties().egressPolicy().defaultAction()); - Assertions.assertEquals("flteatnegef", response.properties().egressPolicy().description()); - Assertions.assertEquals("njtqbg", response.properties().egressPolicy().rules().get(0).name()); - Assertions.assertEquals("ibt", response.properties().egressPolicy().rules().get(0).description()); + Assertions.assertEquals("nsewouxl", response.properties().egressPolicy().description()); + Assertions.assertEquals("vvyljurkepose", response.properties().egressPolicy().rules().get(0).name()); + Assertions.assertEquals("qylmpctwjwdsd", response.properties().egressPolicy().rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, response.properties().egressPolicy().rules().get(0).ruleType()); - Assertions.assertEquals(RaiEgressRuleActionType.REWRITE, + Assertions.assertEquals(RaiEgressRuleActionType.DENY, response.properties().egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals("zuatqhgzuyxt", response.tags().get("vfdbqskgqjbvitpt")); + Assertions.assertEquals("hxow", response.tags().get("c")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesGetWithResponseMockTests.java index b17f87e853a9..595d03d39356 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesGetWithResponseMockTests.java @@ -11,10 +11,6 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; import com.azure.resourcemanager.cognitiveservices.models.RaiActionType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressMode; @@ -22,7 +18,6 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleType; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicy; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -34,7 +29,7 @@ public final class RaiPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"format\":\"ACS\",\"acs\":{\"agent_control_specification_version\":\"jgsatky\",\"metadata\":{\"gcvsvkkjbjolpy\":\"\\\"databgngcrusxhirc\\\"\"},\"policies\":{\"igowxxbhtpsyioqe\":{\"type\":\"rego\",\"query\":\"kvuznadvhmlie\"},\"qszz\":{\"type\":\"rego\",\"query\":\"w\"},\"jqcrbk\":{\"type\":\"rego\",\"query\":\"ksikawanvmwdv\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"b\"},\"annotations\":{}},\"pre_tool_call\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"e\"},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"post_tool_call\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"mahiw\"},\"annotations\":{},\"tool_name_from\":\"$snap.tool_call.name\"},\"output\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"hkapitsks\"},\"annotations\":{}}},\"tools\":{\"zn\":{\"id\":\"t\",\"type\":\"j\",\"description\":\"zw\",\"security_labels\":[\"nfd\",\"bggcj\",\"zhblivw\"],\"clearance\":\"sudy\",\"xzduvxdmxexat\":\"\\\"databhdosmbngkql\\\"\",\"ddmiploisjkzso\":\"\\\"datadmnrsenxoirx\\\"\"},\"bc\":{\"id\":\"wgkv\",\"type\":\"hpsapzupz\",\"description\":\"ytbdjzgh\",\"security_labels\":[\"kgfmxpqkjnpyr\",\"wntotcxmmqmt\",\"jkyjrexw\"],\"clearance\":\"nbexfted\",\"eggzgrn\":\"\\\"datah\\\"\",\"ntns\":\"\\\"datatlfozuumrtgjqgac\\\"\",\"jmka\":\"\\\"dataxz\\\"\"},\"xerxlobkdb\":{\"id\":\"zofmexvtemaspm\",\"type\":\"ydscdkxwd\",\"description\":\"jcbhaahnt\",\"security_labels\":[\"lf\",\"pfixoskkzd\"],\"clearance\":\"vsujybsrwz\",\"kesmkwtzgfragj\":\"\\\"datagtxdhmfppinmg\\\"\"},\"ow\":{\"id\":\"hvmm\",\"type\":\"iqyholhjnskbgg\",\"description\":\"nq\",\"security_labels\":[\"tmwpblxk\"],\"clearance\":\"qgvxrktjcjigcw\",\"evchefp\":\"\\\"dataanbqxa\\\"\",\"cgimmrim\":\"\\\"dataeedyybruholaem\\\"\",\"z\":\"\\\"dataabsqqlon\\\"\"}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"kmbj\"},{\"regoName\":\"mihrijezbfsj\"},{\"regoName\":\"fczglkvbg\"},{\"regoName\":\"kbsvbwy\"}],\"type\":\"SystemManaged\",\"mode\":\"Default\",\"basePolicyName\":\"knhjgclxaxwcf\",\"contentFilters\":[{\"name\":\"sdzkucszghdoaq\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"Completion\",\"action\":\"BLOCKING\"},{\"name\":\"rnmuvwvpuofddtbf\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"PreRun\",\"action\":\"BLOCKING\"}],\"customBlocklists\":[{\"source\":\"PreToolCall\",\"blocklistName\":\"qxfvgyx\",\"blocking\":true},{\"source\":\"Prompt\",\"blocklistName\":\"fxlttx\",\"blocking\":false}],\"safetyProviders\":[{\"source\":\"Completion\",\"safetyProviderName\":\"jsji\",\"blocking\":true},{\"source\":\"Completion\",\"safetyProviderName\":\"cjhmmofbnivdqtk\",\"blocking\":true}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"nlsfgnyscac\",\"managedIdentityResourceId\":\"tbzetxyg\",\"source\":\"PostToolCall\",\"blocking\":true},{\"externalSafetyProviderName\":\"eecvjwyuveox\",\"managedIdentityResourceId\":\"z\",\"source\":\"Completion\",\"blocking\":false}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Allow\",\"description\":\"ztk\",\"rules\":[{\"name\":\"vz\",\"description\":\"xmbrygmwibiosiq\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}}]}},\"etag\":\"dqwdrtxtfdaglmr\",\"tags\":{\"hubymfp\":\"zzertkounzsiy\",\"nfywtkq\":\"pikzebq\",\"dlkhczygpm\":\"w\",\"lojhhyl\":\"fjc\"},\"id\":\"evfiyymotu\",\"name\":\"bybwjmtftcvelnir\",\"type\":\"pk\"}"; + = "{\"properties\":{\"type\":\"UserManaged\",\"mode\":\"Asynchronous_filter\",\"basePolicyName\":\"mfmvsmc\",\"contentFilters\":[{\"name\":\"axdtnqif\",\"enabled\":false,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"PreToolCall\",\"action\":\"HITL\"},{\"name\":\"gmocpcjycboelrgt\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"PreRun\",\"action\":\"ANNOTATING\"}],\"customBlocklists\":[{\"source\":\"PreToolCall\",\"blocklistName\":\"dpk\",\"blocking\":false},{\"source\":\"PreToolCall\",\"blocklistName\":\"tmqrxrzqv\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PreRun\",\"safetyProviderName\":\"btgmbxi\",\"blocking\":true},{\"source\":\"PostRun\",\"safetyProviderName\":\"pxmib\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Enforced\",\"defaultAction\":\"Allow\",\"description\":\"efqm\",\"rules\":[{\"name\":\"yztxlno\",\"description\":\"pbjceegvy\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Deny\"}},{\"name\":\"kutnjillukkrehy\",\"description\":\"mjodu\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}}]}},\"etag\":\"xfaryrvj\",\"tags\":{\"ahoyiyaxqvj\":\"ezvjq\",\"vovbooqbmdqrx\":\"eiwtczkdd\"},\"id\":\"laetscflwtjdtlr\",\"name\":\"e\",\"type\":\"ooy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -44,77 +39,34 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiPolicy response = manager.raiPolicies() - .getWithResponse("raqp", "jpsucmxi", "cw", com.azure.core.util.Context.NONE) + .getWithResponse("ikfyaqandm", "mnqoqjum", "vsfbp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(RaiPolicyFormat.ACS, response.properties().format()); - Assertions.assertEquals("jgsatky", response.properties().acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, - response.properties().acs().policies().get("igowxxbhtpsyioqe").type()); - Assertions.assertEquals("kvuznadvhmlie", - response.properties().acs().policies().get("igowxxbhtpsyioqe").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.INPUT, - response.properties().acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - response.properties().acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("b", response.properties().acs().interventionPoints().input().policy().id()); - Assertions.assertEquals(RaiAcsPolicyTarget.INPUT, - response.properties().acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - response.properties().acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("e", response.properties().acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - response.properties().acs().interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, - response.properties().acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - response.properties().acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("mahiw", response.properties().acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - response.properties().acs().interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, - response.properties().acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - response.properties().acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("hkapitsks", response.properties().acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("t", response.properties().acs().tools().get("zn").id()); - Assertions.assertEquals("j", response.properties().acs().tools().get("zn").type()); - Assertions.assertEquals("zw", response.properties().acs().tools().get("zn").description()); - Assertions.assertEquals("nfd", response.properties().acs().tools().get("zn").securityLabels().get(0)); - Assertions.assertEquals("sudy", response.properties().acs().tools().get("zn").clearance()); - Assertions.assertEquals("kmbj", response.properties().acsRegos().get(0).regoName()); - Assertions.assertEquals(RaiPolicyMode.DEFAULT, response.properties().mode()); - Assertions.assertEquals("knhjgclxaxwcf", response.properties().basePolicyName()); - Assertions.assertEquals("sdzkucszghdoaq", response.properties().contentFilters().get(0).name()); - Assertions.assertTrue(response.properties().contentFilters().get(0).enabled()); + Assertions.assertEquals(RaiPolicyMode.ASYNCHRONOUS_FILTER, response.properties().mode()); + Assertions.assertEquals("mfmvsmc", response.properties().basePolicyName()); + Assertions.assertEquals("axdtnqif", response.properties().contentFilters().get(0).name()); + Assertions.assertFalse(response.properties().contentFilters().get(0).enabled()); Assertions.assertEquals(ContentLevel.MEDIUM, response.properties().contentFilters().get(0).severityThreshold()); Assertions.assertTrue(response.properties().contentFilters().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, + Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, response.properties().contentFilters().get(0).source()); - Assertions.assertEquals(RaiActionType.BLOCKING, response.properties().contentFilters().get(0).action()); - Assertions.assertEquals("qxfvgyx", response.properties().customBlocklists().get(0).blocklistName()); - Assertions.assertTrue(response.properties().customBlocklists().get(0).blocking()); + Assertions.assertEquals(RaiActionType.HITL, response.properties().contentFilters().get(0).action()); + Assertions.assertEquals("dpk", response.properties().customBlocklists().get(0).blocklistName()); + Assertions.assertFalse(response.properties().customBlocklists().get(0).blocking()); Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, response.properties().customBlocklists().get(0).source()); - Assertions.assertEquals("jsji", response.properties().safetyProviders().get(0).safetyProviderName()); + Assertions.assertEquals("btgmbxi", response.properties().safetyProviders().get(0).safetyProviderName()); Assertions.assertTrue(response.properties().safetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, + Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, response.properties().safetyProviders().get(0).source()); - Assertions.assertEquals("nlsfgnyscac", - response.properties().customExternalSafetyProviders().get(0).externalSafetyProviderName()); - Assertions.assertEquals("tbzetxyg", - response.properties().customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, - response.properties().customExternalSafetyProviders().get(0).source()); - Assertions.assertTrue(response.properties().customExternalSafetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiEgressMode.AUDIT, response.properties().egressPolicy().mode()); + Assertions.assertEquals(RaiEgressMode.ENFORCED, response.properties().egressPolicy().mode()); Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, response.properties().egressPolicy().defaultAction()); - Assertions.assertEquals("ztk", response.properties().egressPolicy().description()); - Assertions.assertEquals("vz", response.properties().egressPolicy().rules().get(0).name()); - Assertions.assertEquals("xmbrygmwibiosiq", response.properties().egressPolicy().rules().get(0).description()); + Assertions.assertEquals("efqm", response.properties().egressPolicy().description()); + Assertions.assertEquals("yztxlno", response.properties().egressPolicy().rules().get(0).name()); + Assertions.assertEquals("pbjceegvy", response.properties().egressPolicy().rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, response.properties().egressPolicy().rules().get(0).ruleType()); - Assertions.assertEquals(RaiEgressRuleActionType.TRANSFORM, + Assertions.assertEquals(RaiEgressRuleActionType.DENY, response.properties().egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals("zzertkounzsiy", response.tags().get("hubymfp")); + Assertions.assertEquals("ezvjq", response.tags().get("ahoyiyaxqvj")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesListMockTests.java index 46197204e47f..c943dd69245b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPoliciesListMockTests.java @@ -12,10 +12,6 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; import com.azure.resourcemanager.cognitiveservices.models.RaiActionType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressMode; @@ -23,7 +19,6 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleType; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicy; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -35,7 +30,7 @@ public final class RaiPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"format\":\"ContentFilters\",\"acs\":{\"agent_control_specification_version\":\"vswmehfxrtt\",\"metadata\":{\"ama\":\"\\\"datasennqfabq\\\"\",\"synbkdn\":\"\\\"dataectcxsfmbzdx\\\"\",\"brnxhjtlxfikj\":\"\\\"datayufxuzmsvzyq\\\"\",\"rxbozp\":\"\\\"dataxaravwwuasnjeglh\\\"\"},\"policies\":{\"qizawwsds\":{\"type\":\"rego\",\"query\":\"nwjzbqblxrnwvdsv\"},\"uffhxf\":{\"type\":\"rego\",\"query\":\"gfhjxsawoo\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"zrdqyoybmr\"},\"annotations\":{}},\"pre_tool_call\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"jnzdaio\"},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"post_tool_call\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"phkvyyz\"},\"annotations\":{},\"tool_name_from\":\"$snap.tool_call.name\"},\"output\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"aypdtyzve\"},\"annotations\":{}}},\"tools\":{\"inmpnqupdkjrzfwk\":{\"id\":\"uriwhjdfrw\",\"type\":\"shrmnkcclpctuog\",\"description\":\"cxjfsgmos\",\"security_labels\":[\"bnxsqc\",\"wscuyfqlam\",\"bqhsujkafu\"],\"clearance\":\"nxqpwnikxkcajgrb\",\"azmzlpcx\":\"\\\"datasvgoocq\\\"\",\"xxr\":\"\\\"datatm\\\"\",\"zfvwjdthkvpyeyoa\":\"\\\"dataic\\\"\"},\"zouyvewwpzrdwc\":{\"id\":\"uobdxw\",\"type\":\"dcclcvqsr\",\"description\":\"ay\",\"security_labels\":[\"w\",\"zmfxlrymfjxlpiy\",\"qnpfydrfb\"],\"clearance\":\"nyxbyxmk\",\"aullfsty\":\"\\\"dataync\\\"\",\"mhmqmiw\":\"\\\"datagjqpulmwq\\\"\",\"fjnbxwbmwd\":\"\\\"datazfvvzucqfg\\\"\",\"xhgdeke\":\"\\\"datakinh\\\"\"},\"on\":{\"id\":\"dohgcandxfhhhte\",\"type\":\"dqtdnnc\",\"description\":\"pljdshvvfkdxcc\",\"security_labels\":[\"jimhijzrqnj\",\"mvvsduy\"],\"clearance\":\"nwgruhhqldr\",\"i\":\"\\\"datansw\\\"\",\"yujrxgunnqgypuqt\":\"\\\"dataxqwqnghxnim\\\"\",\"uebsnznwgsqufmjx\":\"\\\"dataylquevqmvyumgm\\\"\",\"gcyjpgawepk\":\"\\\"datayoseqcazisvbr\\\"\"},\"qpoilos\":{\"id\":\"pghlr\",\"type\":\"bgblxbuibrvjzta\",\"description\":\"vs\",\"security_labels\":[\"ihvfjcqrttjfuq\",\"mfjew\",\"eqba\",\"dostwygufmwe\"],\"clearance\":\"xgwzzkw\",\"gw\":\"\\\"datacjgpvcqzvzrb\\\"\",\"mxvmdrwynbgovazo\":\"\\\"datahlx\\\"\",\"qmgkcswzeyxryea\":\"\\\"datamdvhhplkhwwdkatv\\\"\",\"smfasgtlv\":\"\\\"datamhpwbukl\\\"\"}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"cez\"},{\"regoName\":\"vftmh\"},{\"regoName\":\"l\"},{\"regoName\":\"okjyghzt\"}],\"type\":\"SystemManaged\",\"mode\":\"Asynchronous_filter\",\"basePolicyName\":\"pcflcezswwvwift\",\"contentFilters\":[{\"name\":\"bfpfhruptsyq\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":false,\"source\":\"PostRun\",\"action\":\"RETRY\"},{\"name\":\"xqukrcdio\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"Completion\",\"action\":\"BLOCKING\"}],\"customBlocklists\":[{\"source\":\"Prompt\",\"blocklistName\":\"dpnyzcwyjsmkaql\",\"blocking\":false},{\"source\":\"PostToolCall\",\"blocklistName\":\"vpaqbqxfb\",\"blocking\":true},{\"source\":\"PreRun\",\"blocklistName\":\"dofxn\",\"blocking\":false}],\"safetyProviders\":[{\"source\":\"Prompt\",\"safetyProviderName\":\"aedwov\",\"blocking\":true},{\"source\":\"PostToolCall\",\"safetyProviderName\":\"oeayokrwfmihwpa\",\"blocking\":false},{\"source\":\"Completion\",\"safetyProviderName\":\"o\",\"blocking\":true}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"othm\",\"managedIdentityResourceId\":\"jaoz\",\"source\":\"PostToolCall\",\"blocking\":true},{\"externalSafetyProviderName\":\"cnjhbpoelhsc\",\"managedIdentityResourceId\":\"hrhjvszfqbokndw\",\"source\":\"PostRun\",\"blocking\":false},{\"externalSafetyProviderName\":\"wo\",\"managedIdentityResourceId\":\"evzzufytd\",\"source\":\"PostToolCall\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Deny\",\"description\":\"pbkrbuogg\",\"rules\":[{\"name\":\"tlcuhaizijvayl\",\"description\":\"ohlpsftqkr\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}},{\"name\":\"bvvcpw\",\"description\":\"suspnhmzy\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Rewrite\"}},{\"name\":\"tevrntfknwac\",\"description\":\"syotctkhfhfsatv\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}},{\"name\":\"mhnmizhvprhqqw\",\"description\":\"blehhkplo\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}}]}},\"etag\":\"taksadzighmmt\",\"tags\":{\"urdeewlsuxp\":\"vucfvvraab\",\"m\":\"bwkdwjyjiznioroo\",\"uftrni\":\"taspmcrei\"},\"id\":\"mi\",\"name\":\"uwqxungrobgw\",\"type\":\"msxjwdylwxm\"}]}"; + = "{\"value\":[{\"properties\":{\"type\":\"SystemManaged\",\"mode\":\"Asynchronous_filter\",\"basePolicyName\":\"tolamlbijuxkq\",\"contentFilters\":[{\"name\":\"i\",\"enabled\":true,\"severityThreshold\":\"High\",\"blocking\":true,\"source\":\"PreToolCall\",\"action\":\"None\"},{\"name\":\"qdlratrkw\",\"enabled\":true,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"Prompt\",\"action\":\"None\"},{\"name\":\"hrfgslglhpryjfz\",\"enabled\":true,\"severityThreshold\":\"High\",\"blocking\":false,\"source\":\"PreToolCall\",\"action\":\"ANNOTATING\"}],\"customBlocklists\":[{\"source\":\"Completion\",\"blocklistName\":\"vkbdgddkrhdccxbe\",\"blocking\":true},{\"source\":\"PreToolCall\",\"blocklistName\":\"zwtjwwguzytijc\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PostRun\",\"safetyProviderName\":\"jdydhq\",\"blocking\":true},{\"source\":\"PostRun\",\"safetyProviderName\":\"ckcatuqbhpo\",\"blocking\":false},{\"source\":\"PostToolCall\",\"safetyProviderName\":\"zdlys\",\"blocking\":true},{\"source\":\"PostToolCall\",\"safetyProviderName\":\"katprytgrhzbq\",\"blocking\":false}],\"egressPolicy\":{\"mode\":\"Enforced\",\"defaultAction\":\"Allow\",\"description\":\"vcshtkut\",\"rules\":[{\"name\":\"tbqgdirdamm\",\"description\":\"jgcf\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Rewrite\"}},{\"name\":\"bwjjirmuydgf\",\"description\":\"mdofgeoagfuoft\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Deny\"}}]}},\"etag\":\"xmdajwiy\",\"tags\":{\"czljdnci\":\"sevmdmzenlrstg\",\"yyznmrgcdogcvuc\":\"tjva\"},\"id\":\"to\",\"name\":\"uwhttnzqsaqmeb\",\"type\":\"szp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -44,100 +39,42 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.raiPolicies().list("nstp", "qp", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.raiPolicies().list("cuxd", "zcqipsdudgcozzo", com.azure.core.util.Context.NONE); - Assertions.assertEquals(RaiPolicyFormat.CONTENT_FILTERS, response.iterator().next().properties().format()); - Assertions.assertEquals("vswmehfxrtt", - response.iterator().next().properties().acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, - response.iterator().next().properties().acs().policies().get("qizawwsds").type()); - Assertions.assertEquals("nwjzbqblxrnwvdsv", - response.iterator().next().properties().acs().policies().get("qizawwsds").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - response.iterator().next().properties().acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - response.iterator().next().properties().acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("zrdqyoybmr", - response.iterator().next().properties().acs().interventionPoints().input().policy().id()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - response.iterator().next().properties().acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - response.iterator().next().properties().acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("jnzdaio", - response.iterator().next().properties().acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - response.iterator().next().properties().acs().interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, - response.iterator().next().properties().acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - response.iterator().next().properties().acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("phkvyyz", - response.iterator().next().properties().acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - response.iterator().next().properties().acs().interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - response.iterator().next().properties().acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - response.iterator().next().properties().acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("aypdtyzve", - response.iterator().next().properties().acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("uriwhjdfrw", - response.iterator().next().properties().acs().tools().get("inmpnqupdkjrzfwk").id()); - Assertions.assertEquals("shrmnkcclpctuog", - response.iterator().next().properties().acs().tools().get("inmpnqupdkjrzfwk").type()); - Assertions.assertEquals("cxjfsgmos", - response.iterator().next().properties().acs().tools().get("inmpnqupdkjrzfwk").description()); - Assertions.assertEquals("bnxsqc", - response.iterator().next().properties().acs().tools().get("inmpnqupdkjrzfwk").securityLabels().get(0)); - Assertions.assertEquals("nxqpwnikxkcajgrb", - response.iterator().next().properties().acs().tools().get("inmpnqupdkjrzfwk").clearance()); - Assertions.assertEquals("cez", response.iterator().next().properties().acsRegos().get(0).regoName()); Assertions.assertEquals(RaiPolicyMode.ASYNCHRONOUS_FILTER, response.iterator().next().properties().mode()); - Assertions.assertEquals("pcflcezswwvwift", response.iterator().next().properties().basePolicyName()); - Assertions.assertEquals("bfpfhruptsyq", response.iterator().next().properties().contentFilters().get(0).name()); + Assertions.assertEquals("tolamlbijuxkq", response.iterator().next().properties().basePolicyName()); + Assertions.assertEquals("i", response.iterator().next().properties().contentFilters().get(0).name()); Assertions.assertTrue(response.iterator().next().properties().contentFilters().get(0).enabled()); - Assertions.assertEquals(ContentLevel.MEDIUM, + Assertions.assertEquals(ContentLevel.HIGH, response.iterator().next().properties().contentFilters().get(0).severityThreshold()); - Assertions.assertFalse(response.iterator().next().properties().contentFilters().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, + Assertions.assertTrue(response.iterator().next().properties().contentFilters().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, response.iterator().next().properties().contentFilters().get(0).source()); - Assertions.assertEquals(RaiActionType.RETRY, + Assertions.assertEquals(RaiActionType.NONE, response.iterator().next().properties().contentFilters().get(0).action()); - Assertions.assertEquals("dpnyzcwyjsmkaql", + Assertions.assertEquals("vkbdgddkrhdccxbe", response.iterator().next().properties().customBlocklists().get(0).blocklistName()); - Assertions.assertFalse(response.iterator().next().properties().customBlocklists().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PROMPT, + Assertions.assertTrue(response.iterator().next().properties().customBlocklists().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, response.iterator().next().properties().customBlocklists().get(0).source()); - Assertions.assertEquals("aedwov", + Assertions.assertEquals("jdydhq", response.iterator().next().properties().safetyProviders().get(0).safetyProviderName()); Assertions.assertTrue(response.iterator().next().properties().safetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PROMPT, + Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, response.iterator().next().properties().safetyProviders().get(0).source()); - Assertions.assertEquals("othm", - response.iterator() - .next() - .properties() - .customExternalSafetyProviders() - .get(0) - .externalSafetyProviderName()); - Assertions.assertEquals("jaoz", - response.iterator().next().properties().customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, - response.iterator().next().properties().customExternalSafetyProviders().get(0).source()); - Assertions - .assertTrue(response.iterator().next().properties().customExternalSafetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiEgressMode.AUDIT, response.iterator().next().properties().egressPolicy().mode()); - Assertions.assertEquals(RaiEgressDefaultAction.DENY, + Assertions.assertEquals(RaiEgressMode.ENFORCED, response.iterator().next().properties().egressPolicy().mode()); + Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, response.iterator().next().properties().egressPolicy().defaultAction()); - Assertions.assertEquals("pbkrbuogg", response.iterator().next().properties().egressPolicy().description()); - Assertions.assertEquals("tlcuhaizijvayl", + Assertions.assertEquals("vcshtkut", response.iterator().next().properties().egressPolicy().description()); + Assertions.assertEquals("tbqgdirdamm", response.iterator().next().properties().egressPolicy().rules().get(0).name()); - Assertions.assertEquals("ohlpsftqkr", + Assertions.assertEquals("jgcf", response.iterator().next().properties().egressPolicy().rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, response.iterator().next().properties().egressPolicy().rules().get(0).ruleType()); - Assertions.assertEquals(RaiEgressRuleActionType.TRANSFORM, + Assertions.assertEquals(RaiEgressRuleActionType.REWRITE, response.iterator().next().properties().egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals("vucfvvraab", response.iterator().next().tags().get("urdeewlsuxp")); + Assertions.assertEquals("sevmdmzenlrstg", response.iterator().next().tags().get("czljdnci")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyContentFilterTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyContentFilterTests.java index 3bc4e7a0c8e9..3e8c155efc0d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyContentFilterTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyContentFilterTests.java @@ -15,30 +15,30 @@ public final class RaiPolicyContentFilterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiPolicyContentFilter model = BinaryData.fromString( - "{\"name\":\"djhlimm\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"PostRun\",\"action\":\"BLOCKING\"}") + "{\"name\":\"oldweyuqdu\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":false,\"source\":\"PostToolCall\",\"action\":\"ANNOTATING\"}") .toObject(RaiPolicyContentFilter.class); - Assertions.assertEquals("djhlimm", model.name()); + Assertions.assertEquals("oldweyuqdu", model.name()); Assertions.assertFalse(model.enabled()); Assertions.assertEquals(ContentLevel.LOW, model.severityThreshold()); - Assertions.assertTrue(model.blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, model.source()); - Assertions.assertEquals(RaiActionType.BLOCKING, model.action()); + Assertions.assertFalse(model.blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.source()); + Assertions.assertEquals(RaiActionType.ANNOTATING, model.action()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiPolicyContentFilter model = new RaiPolicyContentFilter().withName("djhlimm") + RaiPolicyContentFilter model = new RaiPolicyContentFilter().withName("oldweyuqdu") .withEnabled(false) .withSeverityThreshold(ContentLevel.LOW) - .withBlocking(true) - .withSource(RaiPolicyContentSource.POST_RUN) - .withAction(RaiActionType.BLOCKING); + .withBlocking(false) + .withSource(RaiPolicyContentSource.POST_TOOL_CALL) + .withAction(RaiActionType.ANNOTATING); model = BinaryData.fromObject(model).toObject(RaiPolicyContentFilter.class); - Assertions.assertEquals("djhlimm", model.name()); + Assertions.assertEquals("oldweyuqdu", model.name()); Assertions.assertFalse(model.enabled()); Assertions.assertEquals(ContentLevel.LOW, model.severityThreshold()); - Assertions.assertTrue(model.blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, model.source()); - Assertions.assertEquals(RaiActionType.BLOCKING, model.action()); + Assertions.assertFalse(model.blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.source()); + Assertions.assertEquals(RaiActionType.ANNOTATING, model.action()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyCustomExternalSafetyProviderReferenceTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyCustomExternalSafetyProviderReferenceTests.java deleted file mode 100644 index ff486b1ec7cd..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyCustomExternalSafetyProviderReferenceTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyCustomExternalSafetyProviderReference; -import org.junit.jupiter.api.Assertions; - -public final class RaiPolicyCustomExternalSafetyProviderReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiPolicyCustomExternalSafetyProviderReference model = BinaryData.fromString( - "{\"externalSafetyProviderName\":\"guwpi\",\"managedIdentityResourceId\":\"ajc\",\"source\":\"PreRun\",\"blocking\":true}") - .toObject(RaiPolicyCustomExternalSafetyProviderReference.class); - Assertions.assertEquals("guwpi", model.externalSafetyProviderName()); - Assertions.assertEquals("ajc", model.managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, model.source()); - Assertions.assertTrue(model.blocking()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiPolicyCustomExternalSafetyProviderReference model - = new RaiPolicyCustomExternalSafetyProviderReference().withExternalSafetyProviderName("guwpi") - .withManagedIdentityResourceId("ajc") - .withSource(RaiPolicyContentSource.PRE_RUN) - .withBlocking(true); - model = BinaryData.fromObject(model).toObject(RaiPolicyCustomExternalSafetyProviderReference.class); - Assertions.assertEquals("guwpi", model.externalSafetyProviderName()); - Assertions.assertEquals("ajc", model.managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, model.source()); - Assertions.assertTrue(model.blocking()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyInnerTests.java index 618f489f0b36..4d3d4d40ffeb 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyInnerTests.java @@ -8,20 +8,6 @@ import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiPolicyInner; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; import com.azure.resourcemanager.cognitiveservices.models.CustomBlocklistConfig; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoints; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsManifest; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsRegoPolicyDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; import com.azure.resourcemanager.cognitiveservices.models.RaiActionType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderOperation; @@ -36,11 +22,8 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleType; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentFilter; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyCustomExternalSafetyProviderReference; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyProperties; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoReference; import com.azure.resourcemanager.cognitiveservices.models.SafetyProviderConfig; import java.util.Arrays; import java.util.HashMap; @@ -51,346 +34,148 @@ public final class RaiPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"format\":\"ACS\",\"acs\":{\"agent_control_specification_version\":\"upev\",\"metadata\":{\"jujbypelmcuvhixb\":\"\\\"datastotxh\\\"\"},\"policies\":{\"yl\":{\"type\":\"rego\",\"query\":\"fw\"},\"ttpkiwkkbnujrywv\":{\"type\":\"rego\",\"query\":\"ool\"},\"iwii\":{\"type\":\"rego\",\"query\":\"lbfpncurd\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"wubxc\",\"query\":\"h\",\"aacs_moderation\":{\"subject_format\":\"text\",\"harm_configs\":[]}},\"annotations\":{}},\"pre_tool_call\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"twjchrdg\",\"query\":\"hxumwctondzj\",\"aacs_moderation\":{\"subject_format\":\"text\",\"harm_configs\":[]}},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"post_tool_call\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"gytsbwtovv\",\"query\":\"seinqfiuf\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[]}},\"annotations\":{},\"tool_name_from\":\"$snap.tool_call.name\"},\"output\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"epttwqmsniff\",\"query\":\"mqnrojlpijnkr\",\"aacs_moderation\":{\"subject_format\":\"text\",\"harm_configs\":[]}},\"annotations\":{}}},\"tools\":{\"sewgioilqukr\":{\"id\":\"ratiz\",\"type\":\"onasxifto\",\"description\":\"yzhftwesgogczh\",\"security_labels\":[\"xkr\",\"gnyhmossxkkg\",\"h\",\"rghxjb\"],\"clearance\":\"qxvcxgfrpdsofb\",\"yybyc\":\"\\\"datansvbuswdv\\\"\",\"ikyzirtxdy\":\"\\\"dataunvjsrtkfawnopq\\\"\",\"ejnt\":\"\\\"datax\\\"\"},\"cotmr\":{\"id\":\"xtqmieoxor\",\"type\":\"ufhyaomtbgh\",\"description\":\"vgrvkffo\",\"security_labels\":[\"hpjbib\"],\"clearance\":\"mfxumvfcluyovw\",\"g\":\"\\\"datakfezzxscyhwz\\\"\",\"vp\":\"\\\"datarujbzbomvzzbtdc\\\"\",\"n\":\"\\\"dataiyujviylwdshfs\\\"\",\"rymsgaojfmw\":\"\\\"databgye\\\"\"}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"ctymoxoftp\"},{\"regoName\":\"piwyczuhxacpqjl\"}],\"type\":\"UserManaged\",\"mode\":\"Default\",\"basePolicyName\":\"pskasdvlmfwdg\",\"contentFilters\":[{\"name\":\"ucvpamrs\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"PostToolCall\",\"action\":\"BLOCKING\"},{\"name\":\"hn\",\"enabled\":true,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"Completion\",\"action\":\"RETRY\"}],\"customBlocklists\":[{\"source\":\"PreToolCall\",\"blocklistName\":\"wp\",\"blocking\":false}],\"safetyProviders\":[{\"source\":\"Completion\",\"safetyProviderName\":\"upauut\",\"blocking\":false},{\"source\":\"Prompt\",\"safetyProviderName\":\"hej\",\"blocking\":false},{\"source\":\"PostRun\",\"safetyProviderName\":\"fqntcyp\",\"blocking\":false},{\"source\":\"PostToolCall\",\"safetyProviderName\":\"imwkslircizj\",\"blocking\":false}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"ceacvlhvygdy\",\"managedIdentityResourceId\":\"umrtwnawjsl\",\"source\":\"PostRun\",\"blocking\":true},{\"externalSafetyProviderName\":\"ojgcyzt\",\"managedIdentityResourceId\":\"mznbaeqphch\",\"source\":\"PreRun\",\"blocking\":false},{\"externalSafetyProviderName\":\"rpxeh\",\"managedIdentityResourceId\":\"rykqgaifmvikl\",\"source\":\"PostToolCall\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Allow\",\"description\":\"znxcvds\",\"rules\":[{\"name\":\"jivolvtnov\",\"description\":\"zgemjdftuljlt\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"amtmcz\",\"path\":\"m\"},\"action\":{\"actionType\":\"Allow\",\"headers\":[{\"operation\":\"Remove\",\"name\":\"wqiok\"},{\"operation\":\"Insert\",\"name\":\"sx\"}],\"rewrite\":{}}},{\"name\":\"jmsvpkjp\",\"description\":\"kwcf\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"yxgtczh\",\"path\":\"dbsdshm\"},\"action\":{\"actionType\":\"Transform\",\"headers\":[{\"operation\":\"Remove\",\"name\":\"hvbbxuripltfnh\"},{\"operation\":\"Set\",\"name\":\"axkgx\"},{\"operation\":\"Remove\",\"name\":\"rc\"}],\"rewrite\":{}}},{\"name\":\"yklyhpluodpvruud\",\"description\":\"zibt\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"gktstvdxeclzedq\",\"path\":\"vh\"},\"action\":{\"actionType\":\"Allow\",\"headers\":[{\"operation\":\"Insert\",\"name\":\"odqkdlwwqfb\"},{\"operation\":\"Remove\",\"name\":\"lkxt\"},{\"operation\":\"Set\",\"name\":\"jfsmlmbtxhwgfwsr\"},{\"operation\":\"Insert\",\"name\":\"wcoezbrhub\"}],\"rewrite\":{}}}]}},\"etag\":\"udygooo\",\"tags\":{\"fmluiqtqzfavyvn\":\"fqjbvleo\",\"jkqa\":\"qybaryeua\",\"cbhernntiewdj\":\"qgzsles\"},\"id\":\"bquwrbehw\",\"name\":\"gohbuffkmrq\",\"type\":\"mvvhmxtdrjfuta\"}") + "{\"properties\":{\"type\":\"SystemManaged\",\"mode\":\"Default\",\"basePolicyName\":\"yaomtb\",\"contentFilters\":[{\"name\":\"vgrvkffo\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"PreToolCall\",\"action\":\"ANNOTATING\"},{\"name\":\"fxumv\",\"enabled\":true,\"severityThreshold\":\"Low\",\"blocking\":false,\"source\":\"Prompt\",\"action\":\"None\"}],\"customBlocklists\":[{\"source\":\"PreRun\",\"blocklistName\":\"xscyhwzdgirujbz\",\"blocking\":true},{\"source\":\"PostToolCall\",\"blocklistName\":\"btdcqvpniyujvi\",\"blocking\":false},{\"source\":\"Completion\",\"blocklistName\":\"fssnrbgyefrymsga\",\"blocking\":true},{\"source\":\"Prompt\",\"blocklistName\":\"cotmr\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PostRun\",\"safetyProviderName\":\"oxoftpipiwycz\",\"blocking\":false},{\"source\":\"Prompt\",\"safetyProviderName\":\"qjlihhyuspska\",\"blocking\":true},{\"source\":\"Completion\",\"safetyProviderName\":\"wdgzxulucv\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Allow\",\"description\":\"vxurisjnhnytxifq\",\"rules\":[{\"name\":\"xmrhu\",\"description\":\"wp\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"trgjupauutpwoqh\",\"path\":\"ejqgw\"},\"action\":{\"actionType\":\"Transform\",\"headers\":[{\"operation\":\"Set\",\"name\":\"n\"},{\"operation\":\"Set\",\"name\":\"ypsxjvfoim\"}],\"rewrite\":{}}},{\"name\":\"slirciz\",\"description\":\"vydfceacvlhvygdy\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"rtwnawjslbi\",\"path\":\"ojgcyzt\"},\"action\":{\"actionType\":\"Deny\",\"headers\":[{\"operation\":\"Set\",\"name\":\"baeqphc\"}],\"rewrite\":{}}},{\"name\":\"nrnrp\",\"description\":\"huwrykqgaifm\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"bydvkhbejdz\",\"path\":\"cvdsrhnj\"},\"action\":{\"actionType\":\"Deny\",\"headers\":[{\"operation\":\"Set\",\"name\":\"tnovqfzgemjdftul\"},{\"operation\":\"Insert\",\"name\":\"tduceamt\"}],\"rewrite\":{}}}]}},\"etag\":\"u\",\"tags\":{\"w\":\"jw\",\"vpkjpr\":\"qioknssxmojm\",\"ql\":\"kwcf\"},\"id\":\"x\",\"name\":\"tczheydbsdshmkx\",\"type\":\"aehvbbxuri\"}") .toObject(RaiPolicyInner.class); - Assertions.assertEquals(RaiPolicyFormat.ACS, model.properties().format()); - Assertions.assertEquals("upev", model.properties().acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, model.properties().acs().policies().get("yl").type()); - Assertions.assertEquals("fw", model.properties().acs().policies().get("yl").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.properties().acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - model.properties().acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("wubxc", model.properties().acs().interventionPoints().input().policy().id()); - Assertions.assertEquals("h", model.properties().acs().interventionPoints().input().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.properties().acs().interventionPoints().input().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.properties().acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - model.properties().acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("twjchrdg", model.properties().acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals("hxumwctondzj", - model.properties().acs().interventionPoints().preToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.properties().acs().interventionPoints().preToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - model.properties().acs().interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.properties().acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - model.properties().acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("gytsbwtovv", - model.properties().acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals("seinqfiuf", - model.properties().acs().interventionPoints().postToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.properties().acs().interventionPoints().postToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - model.properties().acs().interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.properties().acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - model.properties().acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("epttwqmsniff", model.properties().acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("mqnrojlpijnkr", - model.properties().acs().interventionPoints().output().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.properties().acs().interventionPoints().output().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals("ratiz", model.properties().acs().tools().get("sewgioilqukr").id()); - Assertions.assertEquals("onasxifto", model.properties().acs().tools().get("sewgioilqukr").type()); - Assertions.assertEquals("yzhftwesgogczh", model.properties().acs().tools().get("sewgioilqukr").description()); - Assertions.assertEquals("xkr", model.properties().acs().tools().get("sewgioilqukr").securityLabels().get(0)); - Assertions.assertEquals("qxvcxgfrpdsofb", model.properties().acs().tools().get("sewgioilqukr").clearance()); - Assertions.assertEquals("ctymoxoftp", model.properties().acsRegos().get(0).regoName()); Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.properties().mode()); - Assertions.assertEquals("pskasdvlmfwdg", model.properties().basePolicyName()); - Assertions.assertEquals("ucvpamrs", model.properties().contentFilters().get(0).name()); + Assertions.assertEquals("yaomtb", model.properties().basePolicyName()); + Assertions.assertEquals("vgrvkffo", model.properties().contentFilters().get(0).name()); Assertions.assertFalse(model.properties().contentFilters().get(0).enabled()); Assertions.assertEquals(ContentLevel.LOW, model.properties().contentFilters().get(0).severityThreshold()); Assertions.assertTrue(model.properties().contentFilters().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, - model.properties().contentFilters().get(0).source()); - Assertions.assertEquals(RaiActionType.BLOCKING, model.properties().contentFilters().get(0).action()); - Assertions.assertEquals("wp", model.properties().customBlocklists().get(0).blocklistName()); - Assertions.assertFalse(model.properties().customBlocklists().get(0).blocking()); Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, - model.properties().customBlocklists().get(0).source()); - Assertions.assertEquals("upauut", model.properties().safetyProviders().get(0).safetyProviderName()); + model.properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiActionType.ANNOTATING, model.properties().contentFilters().get(0).action()); + Assertions.assertEquals("xscyhwzdgirujbz", model.properties().customBlocklists().get(0).blocklistName()); + Assertions.assertTrue(model.properties().customBlocklists().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, model.properties().customBlocklists().get(0).source()); + Assertions.assertEquals("oxoftpipiwycz", model.properties().safetyProviders().get(0).safetyProviderName()); Assertions.assertFalse(model.properties().safetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, - model.properties().safetyProviders().get(0).source()); - Assertions.assertEquals("ceacvlhvygdy", - model.properties().customExternalSafetyProviders().get(0).externalSafetyProviderName()); - Assertions.assertEquals("umrtwnawjsl", - model.properties().customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, - model.properties().customExternalSafetyProviders().get(0).source()); - Assertions.assertTrue(model.properties().customExternalSafetyProviders().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, model.properties().safetyProviders().get(0).source()); Assertions.assertEquals(RaiEgressMode.AUDIT, model.properties().egressPolicy().mode()); Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, model.properties().egressPolicy().defaultAction()); - Assertions.assertEquals("znxcvds", model.properties().egressPolicy().description()); - Assertions.assertEquals("jivolvtnov", model.properties().egressPolicy().rules().get(0).name()); - Assertions.assertEquals("zgemjdftuljlt", model.properties().egressPolicy().rules().get(0).description()); + Assertions.assertEquals("vxurisjnhnytxifq", model.properties().egressPolicy().description()); + Assertions.assertEquals("xmrhu", model.properties().egressPolicy().rules().get(0).name()); + Assertions.assertEquals("wp", model.properties().egressPolicy().rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, model.properties().egressPolicy().rules().get(0).ruleType()); - Assertions.assertEquals("amtmcz", model.properties().egressPolicy().rules().get(0).match().host()); - Assertions.assertEquals("m", model.properties().egressPolicy().rules().get(0).match().path()); - Assertions.assertEquals(RaiEgressRuleActionType.ALLOW, + Assertions.assertEquals("trgjupauutpwoqh", model.properties().egressPolicy().rules().get(0).match().host()); + Assertions.assertEquals("ejqgw", model.properties().egressPolicy().rules().get(0).match().path()); + Assertions.assertEquals(RaiEgressRuleActionType.TRANSFORM, model.properties().egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals(RaiEgressHeaderOperation.REMOVE, + Assertions.assertEquals(RaiEgressHeaderOperation.SET, model.properties().egressPolicy().rules().get(0).action().headers().get(0).operation()); - Assertions.assertEquals("wqiok", - model.properties().egressPolicy().rules().get(0).action().headers().get(0).name()); - Assertions.assertEquals("fqjbvleo", model.tags().get("fmluiqtqzfavyvn")); + Assertions.assertEquals("n", model.properties().egressPolicy().rules().get(0).action().headers().get(0).name()); + Assertions.assertEquals("jw", model.tags().get("w")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RaiPolicyInner model = new RaiPolicyInner() - .withProperties(new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs(new RaiAcsManifest().withAgentControlSpecificationVersion("upev") - .withMetadata(mapOf("jujbypelmcuvhixb", "\"datastotxh\"")) - .withPolicies(mapOf("yl", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO).withQuery("fw"), - "ttpkiwkkbnujrywv", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO).withQuery("ool"), - "iwii", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("lbfpncurd"))) - .withInterventionPoints(new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("wubxc") - .withQuery("h") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList()))) - .withAnnotations(new RaiAcsEmptyObject())) - .withPreToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("twjchrdg") - .withQuery("hxumwctondzj") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList()))) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS)) - .withPostToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("gytsbwtovv") - .withQuery("seinqfiuf") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList()))) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME)) - .withOutput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("epttwqmsniff") - .withQuery("mqnrojlpijnkr") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList()))) - .withAnnotations(new RaiAcsEmptyObject()))) - .withTools(mapOf("sewgioilqukr", - new RaiAcsToolDefinition().withId("ratiz") - .withType("onasxifto") - .withDescription("yzhftwesgogczh") - .withSecurityLabels(Arrays.asList("xkr", "gnyhmossxkkg", "h", "rghxjb")) - .withClearance("qxvcxgfrpdsofb") - .withAdditionalProperties(mapOf("ejnt", "\"datax\"", "yybyc", "\"datansvbuswdv\"", - "ikyzirtxdy", "\"dataunvjsrtkfawnopq\"")), - "cotmr", - new RaiAcsToolDefinition().withId("xtqmieoxor") - .withType("ufhyaomtbgh") - .withDescription("vgrvkffo") - .withSecurityLabels(Arrays.asList("hpjbib")) - .withClearance("mfxumvfcluyovw") - .withAdditionalProperties(mapOf("rymsgaojfmw", "\"databgye\"", "g", "\"datakfezzxscyhwz\"", - "vp", "\"datarujbzbomvzzbtdc\"", "n", "\"dataiyujviylwdshfs\"")))) - .withAnnotators(new RaiAcsEmptyObject())) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("ctymoxoftp"), - new RaiRegoReference().withRegoName("piwyczuhxacpqjl"))) + .withProperties(new RaiPolicyProperties() .withMode(RaiPolicyMode.DEFAULT) - .withBasePolicyName("pskasdvlmfwdg") + .withBasePolicyName("yaomtb") .withContentFilters(Arrays.asList( - new RaiPolicyContentFilter().withName("ucvpamrs") + new RaiPolicyContentFilter().withName("vgrvkffo") .withEnabled(false) .withSeverityThreshold(ContentLevel.LOW) .withBlocking(true) - .withSource(RaiPolicyContentSource.POST_TOOL_CALL) - .withAction(RaiActionType.BLOCKING), - new RaiPolicyContentFilter().withName("hn") + .withSource(RaiPolicyContentSource.PRE_TOOL_CALL) + .withAction(RaiActionType.ANNOTATING), + new RaiPolicyContentFilter().withName("fxumv") .withEnabled(true) .withSeverityThreshold(ContentLevel.LOW) + .withBlocking(false) + .withSource(RaiPolicyContentSource.PROMPT) + .withAction(RaiActionType.NONE))) + .withCustomBlocklists(Arrays.asList( + new CustomBlocklistConfig().withBlocklistName("xscyhwzdgirujbz") .withBlocking(true) - .withSource(RaiPolicyContentSource.COMPLETION) - .withAction(RaiActionType.RETRY))) - .withCustomBlocklists(Arrays.asList(new CustomBlocklistConfig().withBlocklistName("wp") - .withBlocking(false) - .withSource(RaiPolicyContentSource.PRE_TOOL_CALL))) - .withSafetyProviders(Arrays.asList( - new SafetyProviderConfig().withSafetyProviderName("upauut") + .withSource(RaiPolicyContentSource.PRE_RUN), + new CustomBlocklistConfig().withBlocklistName("btdcqvpniyujvi") .withBlocking(false) + .withSource(RaiPolicyContentSource.POST_TOOL_CALL), + new CustomBlocklistConfig().withBlocklistName("fssnrbgyefrymsga") + .withBlocking(true) .withSource(RaiPolicyContentSource.COMPLETION), - new SafetyProviderConfig().withSafetyProviderName("hej") - .withBlocking(false) - .withSource(RaiPolicyContentSource.PROMPT), - new SafetyProviderConfig().withSafetyProviderName("fqntcyp") + new CustomBlocklistConfig().withBlocklistName("cotmr") + .withBlocking(true) + .withSource(RaiPolicyContentSource.PROMPT))) + .withSafetyProviders(Arrays.asList( + new SafetyProviderConfig().withSafetyProviderName("oxoftpipiwycz") .withBlocking(false) .withSource(RaiPolicyContentSource.POST_RUN), - new SafetyProviderConfig().withSafetyProviderName("imwkslircizj") - .withBlocking(false) - .withSource(RaiPolicyContentSource.POST_TOOL_CALL))) - .withCustomExternalSafetyProviders(Arrays.asList( - new RaiPolicyCustomExternalSafetyProviderReference().withExternalSafetyProviderName("ceacvlhvygdy") - .withManagedIdentityResourceId("umrtwnawjsl") - .withSource(RaiPolicyContentSource.POST_RUN) - .withBlocking(true), - new RaiPolicyCustomExternalSafetyProviderReference().withExternalSafetyProviderName("ojgcyzt") - .withManagedIdentityResourceId("mznbaeqphch") - .withSource(RaiPolicyContentSource.PRE_RUN) - .withBlocking(false), - new RaiPolicyCustomExternalSafetyProviderReference().withExternalSafetyProviderName("rpxeh") - .withManagedIdentityResourceId("rykqgaifmvikl") - .withSource(RaiPolicyContentSource.POST_TOOL_CALL) - .withBlocking(true))) + new SafetyProviderConfig().withSafetyProviderName("qjlihhyuspska") + .withBlocking(true) + .withSource(RaiPolicyContentSource.PROMPT), + new SafetyProviderConfig() + .withSafetyProviderName("wdgzxulucv") + .withBlocking(true) + .withSource(RaiPolicyContentSource.COMPLETION))) .withEgressPolicy(new RaiEgressPolicyConfig().withMode(RaiEgressMode.AUDIT) .withDefaultAction(RaiEgressDefaultAction.ALLOW) - .withDescription("znxcvds") + .withDescription("vxurisjnhnytxifq") .withRules(Arrays.asList( - new RaiEgressRule().withName("jivolvtnov") - .withDescription("zgemjdftuljlt") - .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch().withHost("amtmcz").withPath("m")) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.ALLOW) - .withHeaders(Arrays.asList( - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.REMOVE) - .withName("wqiok"), - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) - .withName("sx"))) - .withRewrite(new RaiEgressRewriteTarget())), - new RaiEgressRule().withName("jmsvpkjp") - .withDescription("kwcf") + new RaiEgressRule().withName("xmrhu") + .withDescription("wp") .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch().withHost("yxgtczh").withPath("dbsdshm")) + .withMatch(new RaiEgressRuleMatch().withHost("trgjupauutpwoqh").withPath("ejqgw")) .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.TRANSFORM) .withHeaders(Arrays.asList( - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.REMOVE) - .withName("hvbbxuripltfnh"), new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.SET) - .withName("axkgx"), - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.REMOVE) - .withName("rc"))) + .withName("n"), + new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.SET) + .withName("ypsxjvfoim"))) .withRewrite(new RaiEgressRewriteTarget())), - new RaiEgressRule().withName("yklyhpluodpvruud") - .withDescription("zibt") + new RaiEgressRule().withName("slirciz") + .withDescription("vydfceacvlhvygdy") .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch().withHost("gktstvdxeclzedq").withPath("vh")) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.ALLOW) + .withMatch(new RaiEgressRuleMatch().withHost("rtwnawjslbi").withPath("ojgcyzt")) + .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY) + .withHeaders(Arrays + .asList(new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.SET) + .withName("baeqphc"))) + .withRewrite(new RaiEgressRewriteTarget())), + new RaiEgressRule().withName("nrnrp") + .withDescription("huwrykqgaifm") + .withRuleType(RaiEgressRuleType.FQDN) + .withMatch(new RaiEgressRuleMatch().withHost("bydvkhbejdz").withPath("cvdsrhnj")) + .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY) .withHeaders(Arrays.asList( - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) - .withName("odqkdlwwqfb"), - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.REMOVE) - .withName("lkxt"), new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.SET) - .withName("jfsmlmbtxhwgfwsr"), + .withName("tnovqfzgemjdftul"), new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) - .withName("wcoezbrhub"))) + .withName("tduceamt"))) .withRewrite(new RaiEgressRewriteTarget())))))) - .withTags(mapOf("fmluiqtqzfavyvn", "fqjbvleo", "jkqa", "qybaryeua", "cbhernntiewdj", "qgzsles")); + .withTags(mapOf("w", "jw", "vpkjpr", "qioknssxmojm", "ql", "kwcf")); model = BinaryData.fromObject(model).toObject(RaiPolicyInner.class); - Assertions.assertEquals(RaiPolicyFormat.ACS, model.properties().format()); - Assertions.assertEquals("upev", model.properties().acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, model.properties().acs().policies().get("yl").type()); - Assertions.assertEquals("fw", model.properties().acs().policies().get("yl").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.properties().acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - model.properties().acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("wubxc", model.properties().acs().interventionPoints().input().policy().id()); - Assertions.assertEquals("h", model.properties().acs().interventionPoints().input().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.properties().acs().interventionPoints().input().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.properties().acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - model.properties().acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("twjchrdg", model.properties().acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals("hxumwctondzj", - model.properties().acs().interventionPoints().preToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.properties().acs().interventionPoints().preToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - model.properties().acs().interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.properties().acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - model.properties().acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("gytsbwtovv", - model.properties().acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals("seinqfiuf", - model.properties().acs().interventionPoints().postToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.properties().acs().interventionPoints().postToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - model.properties().acs().interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.properties().acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - model.properties().acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("epttwqmsniff", model.properties().acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("mqnrojlpijnkr", - model.properties().acs().interventionPoints().output().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.properties().acs().interventionPoints().output().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals("ratiz", model.properties().acs().tools().get("sewgioilqukr").id()); - Assertions.assertEquals("onasxifto", model.properties().acs().tools().get("sewgioilqukr").type()); - Assertions.assertEquals("yzhftwesgogczh", model.properties().acs().tools().get("sewgioilqukr").description()); - Assertions.assertEquals("xkr", model.properties().acs().tools().get("sewgioilqukr").securityLabels().get(0)); - Assertions.assertEquals("qxvcxgfrpdsofb", model.properties().acs().tools().get("sewgioilqukr").clearance()); - Assertions.assertEquals("ctymoxoftp", model.properties().acsRegos().get(0).regoName()); Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.properties().mode()); - Assertions.assertEquals("pskasdvlmfwdg", model.properties().basePolicyName()); - Assertions.assertEquals("ucvpamrs", model.properties().contentFilters().get(0).name()); + Assertions.assertEquals("yaomtb", model.properties().basePolicyName()); + Assertions.assertEquals("vgrvkffo", model.properties().contentFilters().get(0).name()); Assertions.assertFalse(model.properties().contentFilters().get(0).enabled()); Assertions.assertEquals(ContentLevel.LOW, model.properties().contentFilters().get(0).severityThreshold()); Assertions.assertTrue(model.properties().contentFilters().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, - model.properties().contentFilters().get(0).source()); - Assertions.assertEquals(RaiActionType.BLOCKING, model.properties().contentFilters().get(0).action()); - Assertions.assertEquals("wp", model.properties().customBlocklists().get(0).blocklistName()); - Assertions.assertFalse(model.properties().customBlocklists().get(0).blocking()); Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, - model.properties().customBlocklists().get(0).source()); - Assertions.assertEquals("upauut", model.properties().safetyProviders().get(0).safetyProviderName()); + model.properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiActionType.ANNOTATING, model.properties().contentFilters().get(0).action()); + Assertions.assertEquals("xscyhwzdgirujbz", model.properties().customBlocklists().get(0).blocklistName()); + Assertions.assertTrue(model.properties().customBlocklists().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, model.properties().customBlocklists().get(0).source()); + Assertions.assertEquals("oxoftpipiwycz", model.properties().safetyProviders().get(0).safetyProviderName()); Assertions.assertFalse(model.properties().safetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, - model.properties().safetyProviders().get(0).source()); - Assertions.assertEquals("ceacvlhvygdy", - model.properties().customExternalSafetyProviders().get(0).externalSafetyProviderName()); - Assertions.assertEquals("umrtwnawjsl", - model.properties().customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, - model.properties().customExternalSafetyProviders().get(0).source()); - Assertions.assertTrue(model.properties().customExternalSafetyProviders().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, model.properties().safetyProviders().get(0).source()); Assertions.assertEquals(RaiEgressMode.AUDIT, model.properties().egressPolicy().mode()); Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, model.properties().egressPolicy().defaultAction()); - Assertions.assertEquals("znxcvds", model.properties().egressPolicy().description()); - Assertions.assertEquals("jivolvtnov", model.properties().egressPolicy().rules().get(0).name()); - Assertions.assertEquals("zgemjdftuljlt", model.properties().egressPolicy().rules().get(0).description()); + Assertions.assertEquals("vxurisjnhnytxifq", model.properties().egressPolicy().description()); + Assertions.assertEquals("xmrhu", model.properties().egressPolicy().rules().get(0).name()); + Assertions.assertEquals("wp", model.properties().egressPolicy().rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, model.properties().egressPolicy().rules().get(0).ruleType()); - Assertions.assertEquals("amtmcz", model.properties().egressPolicy().rules().get(0).match().host()); - Assertions.assertEquals("m", model.properties().egressPolicy().rules().get(0).match().path()); - Assertions.assertEquals(RaiEgressRuleActionType.ALLOW, + Assertions.assertEquals("trgjupauutpwoqh", model.properties().egressPolicy().rules().get(0).match().host()); + Assertions.assertEquals("ejqgw", model.properties().egressPolicy().rules().get(0).match().path()); + Assertions.assertEquals(RaiEgressRuleActionType.TRANSFORM, model.properties().egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals(RaiEgressHeaderOperation.REMOVE, + Assertions.assertEquals(RaiEgressHeaderOperation.SET, model.properties().egressPolicy().rules().get(0).action().headers().get(0).operation()); - Assertions.assertEquals("wqiok", - model.properties().egressPolicy().rules().get(0).action().headers().get(0).name()); - Assertions.assertEquals("fqjbvleo", model.tags().get("fmluiqtqzfavyvn")); + Assertions.assertEquals("n", model.properties().egressPolicy().rules().get(0).action().headers().get(0).name()); + Assertions.assertEquals("jw", model.tags().get("w")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyListResultTests.java index 0fb6381eccc1..f2ac02b74364 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyListResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyListResultTests.java @@ -7,16 +7,12 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.cognitiveservices.implementation.models.RaiPolicyListResult; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; import com.azure.resourcemanager.cognitiveservices.models.RaiActionType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressMode; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleActionType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleType; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import org.junit.jupiter.api.Assertions; @@ -24,75 +20,39 @@ public final class RaiPolicyListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiPolicyListResult model = BinaryData.fromString( - "{\"nextLink\":\"na\",\"value\":[{\"properties\":{\"format\":\"ContentFilters\",\"acs\":{\"agent_control_specification_version\":\"idjks\",\"metadata\":{\"ljlageuaulxu\":\"\\\"datayxvxevblbjed\\\"\",\"nlsvxeiz\":\"\\\"datasmjbnkppxyn\\\"\",\"ffeycx\":\"\\\"datagwklnsr\\\"\",\"ymerteeammxq\":\"\\\"dataktp\\\"\"},\"policies\":{\"a\":{\"type\":\"rego\",\"query\":\"kkzddrtkgdojbmx\"},\"uij\":{\"type\":\"rego\",\"query\":\"efdeesve\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"s\"}},\"pre_tool_call\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"tujwsawdd\"}},\"post_tool_call\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"bxv\"}},\"output\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"v\"}}},\"tools\":{\"exavoxt\":{},\"glecdmdqbwpypq\":{}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"jacbslhhxudbxvod\"},{\"regoName\":\"tnsi\"},{\"regoName\":\"ud\"},{\"regoName\":\"z\"}],\"type\":\"UserManaged\",\"mode\":\"Deferred\",\"basePolicyName\":\"dlpagzrcxfail\",\"contentFilters\":[{\"name\":\"m\",\"enabled\":true,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"PreRun\",\"action\":\"HITL\"},{\"name\":\"qobr\",\"enabled\":false,\"severityThreshold\":\"Medium\",\"blocking\":false,\"source\":\"Prompt\",\"action\":\"BLOCKING\"}],\"customBlocklists\":[{\"source\":\"Prompt\",\"blocklistName\":\"v\",\"blocking\":true},{\"source\":\"PostToolCall\",\"blocklistName\":\"uljraae\",\"blocking\":false}],\"safetyProviders\":[{\"source\":\"PreRun\",\"safetyProviderName\":\"kkjqnvbroylaxxu\",\"blocking\":true}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"dosfjbjsvgjrw\",\"managedIdentityResourceId\":\"yvycytdclxgcckn\",\"source\":\"PostToolCall\",\"blocking\":true},{\"externalSafetyProviderName\":\"btmvpdvjdhttza\",\"managedIdentityResourceId\":\"edxihchrphkmcrj\",\"source\":\"PostRun\",\"blocking\":false},{\"externalSafetyProviderName\":\"dfzpbgtgkylkdg\",\"managedIdentityResourceId\":\"jeuut\",\"source\":\"Completion\",\"blocking\":false},{\"externalSafetyProviderName\":\"z\",\"managedIdentityResourceId\":\"hokvbwnh\",\"source\":\"Completion\",\"blocking\":false}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Deny\",\"description\":\"ipifhpfeoajvg\",\"rules\":[{\"name\":\"xjcsheafidltu\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Rewrite\"}},{\"name\":\"esmkssjhoiftxfkf\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Allow\"}},{\"name\":\"prhptillu\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Deny\"}},{\"name\":\"qtgdqohmcwsl\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Deny\"}}]}},\"etag\":\"etpwbralll\",\"tags\":{\"n\":\"hbqzmizakakankjp\",\"xprimrsop\":\"zhajoylhjlmuo\"},\"id\":\"ecj\",\"name\":\"eislstvasylwx\",\"type\":\"zaum\"},{\"properties\":{\"format\":\"ContentFilters\",\"acs\":{\"agent_control_specification_version\":\"guufuzboyjathwtz\",\"metadata\":{\"mwmdxmebwjscjpa\":\"\\\"dataa\\\"\"},\"policies\":{\"yijddtvqcttad\":{\"type\":\"rego\",\"query\":\"veabfqxnmwmqtib\"},\"sieekpndzaapm\":{\"type\":\"rego\",\"query\":\"aeukm\"},\"beybpmzznrtffyaq\":{\"type\":\"rego\",\"query\":\"qmeqwigpibudqwyx\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"heioqa\"}},\"pre_tool_call\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"eufuqyrxpdlcgql\"}},\"post_tool_call\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"jqfrddgamquh\"}},\"output\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"sjuivfcdisyir\"}}},\"tools\":{\"hcz\":{},\"xrxzbujrtr\":{},\"qvwre\":{},\"khgn\":{}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"nzlrpiqywncvjt\"},{\"regoName\":\"z\"}],\"type\":\"SystemManaged\",\"mode\":\"Deferred\",\"basePolicyName\":\"htd\",\"contentFilters\":[{\"name\":\"k\",\"enabled\":true,\"severityThreshold\":\"High\",\"blocking\":true,\"source\":\"Prompt\",\"action\":\"ANNOTATING\"},{\"name\":\"mlovuanashcxl\",\"enabled\":true,\"severityThreshold\":\"High\",\"blocking\":false,\"source\":\"PreRun\",\"action\":\"BLOCKING\"},{\"name\":\"di\",\"enabled\":true,\"severityThreshold\":\"High\",\"blocking\":false,\"source\":\"PreRun\",\"action\":\"None\"}],\"customBlocklists\":[{\"source\":\"PostRun\",\"blocklistName\":\"nwncypuuw\",\"blocking\":true},{\"source\":\"PostToolCall\",\"blocklistName\":\"jctzenkei\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"Prompt\",\"safetyProviderName\":\"svflyhbxcudch\",\"blocking\":true},{\"source\":\"PostRun\",\"safetyProviderName\":\"ldforobwj\",\"blocking\":true}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"fhfovv\",\"managedIdentityResourceId\":\"qpbtuodxes\",\"source\":\"PostRun\",\"blocking\":true},{\"externalSafetyProviderName\":\"elawumu\",\"managedIdentityResourceId\":\"lzkwrrwoy\",\"source\":\"PreRun\",\"blocking\":false},{\"externalSafetyProviderName\":\"wyh\",\"managedIdentityResourceId\":\"nomdrkywuhpsv\",\"source\":\"PostToolCall\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Enforced\",\"defaultAction\":\"Deny\",\"description\":\"xwlalniexzsrzpg\",\"rules\":[{\"name\":\"tybbwwpgda\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Rewrite\"}}]}},\"etag\":\"yvlixqnrk\",\"tags\":{\"swqrntvlwijp\":\"jibnxmysu\",\"uncuw\":\"ttexoqqpwcyyufmh\",\"unqndyfpchrqb\":\"qspkcdqzhlctd\",\"boxjumvq\":\"jjrcgegydc\"},\"id\":\"lihrraiouaubr\",\"name\":\"tloqxfuojrn\",\"type\":\"iflrzpasccbiu\"},{\"properties\":{\"format\":\"ContentFilters\",\"acs\":{\"agent_control_specification_version\":\"yjdfqwmky\",\"metadata\":{\"lzo\":\"\\\"datafdvruz\\\"\",\"fnmdxotn\":\"\\\"datahpc\\\"\"},\"policies\":{\"i\":{\"type\":\"rego\",\"query\":\"gugey\"},\"absnmfpp\":{\"type\":\"rego\",\"query\":\"rkyui\"},\"yhyhsgzfczb\":{\"type\":\"rego\",\"query\":\"jee\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"gbeglqgleo\"}},\"pre_tool_call\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"tnluankrr\"}},\"post_tool_call\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"ebtijvacvbmqzbqq\"}},\"output\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"rnwxacevehjkuyxo\"}}},\"tools\":{\"aoqltfaey\":{},\"inmfgvxirp\":{}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"ypoq\"},{\"regoName\":\"yhlqhykprlpyznu\"},{\"regoName\":\"iq\"},{\"regoName\":\"smexiitdf\"}],\"type\":\"SystemManaged\",\"mode\":\"Asynchronous_filter\",\"basePolicyName\":\"iibmi\",\"contentFilters\":[{\"name\":\"ustgnljhnmgixhc\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"PreToolCall\",\"action\":\"ANNOTATING\"},{\"name\":\"cgyypro\",\"enabled\":true,\"severityThreshold\":\"High\",\"blocking\":false,\"source\":\"Prompt\",\"action\":\"None\"}],\"customBlocklists\":[{\"source\":\"PreToolCall\",\"blocklistName\":\"k\",\"blocking\":false},{\"source\":\"Prompt\",\"blocklistName\":\"bmftpmdt\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PostToolCall\",\"safetyProviderName\":\"zcyjtot\",\"blocking\":false},{\"source\":\"PostToolCall\",\"safetyProviderName\":\"bdb\",\"blocking\":true}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"ihed\",\"managedIdentityResourceId\":\"qwthmky\",\"source\":\"PreToolCall\",\"blocking\":false}],\"egressPolicy\":{\"mode\":\"Enforced\",\"defaultAction\":\"Deny\",\"description\":\"cw\",\"rules\":[{\"name\":\"hsdtmc\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Deny\"}},{\"name\":\"ufcohdxbz\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Transform\"}}]}},\"etag\":\"uapcvhdbevwqqxe\",\"tags\":{\"eqocljmygvk\":\"onqzinkfkbgbzbow\"},\"id\":\"kjjeokbz\",\"name\":\"fezrx\",\"type\":\"czurtlei\"}]}") + "{\"nextLink\":\"vm\",\"value\":[{\"properties\":{\"type\":\"SystemManaged\",\"mode\":\"Default\",\"basePolicyName\":\"vbalxlllc\",\"contentFilters\":[{\"name\":\"bzevwrd\",\"enabled\":true,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"PreRun\",\"action\":\"RETRY\"},{\"name\":\"smystuluqypfc\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"PreRun\",\"action\":\"BLOCKING\"},{\"name\":\"jbabwidf\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":false,\"source\":\"PostRun\",\"action\":\"HITL\"}],\"customBlocklists\":[{\"source\":\"PreRun\",\"blocklistName\":\"qddrihpfhoqcaae\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PostRun\",\"safetyProviderName\":\"l\",\"blocking\":false},{\"source\":\"PostRun\",\"safetyProviderName\":\"brm\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Deny\",\"description\":\"zkdnc\",\"rules\":[{\"name\":\"onbzoggculapzwy\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Rewrite\"}},{\"name\":\"ogtqxepnylbf\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Transform\"}},{\"name\":\"lyjt\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Allow\"}},{\"name\":\"fqzhv\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Deny\"}}]}},\"etag\":\"yfm\",\"tags\":{\"fzwiivwzjbhyz\":\"xrkjpvdw\",\"mbtrnegvmnvu\":\"xjrk\"},\"id\":\"qvldspastjbkkd\",\"name\":\"flvestmjlxrrilo\",\"type\":\"apeewchpxlkt\"},{\"properties\":{\"type\":\"SystemManaged\",\"mode\":\"Asynchronous_filter\",\"basePolicyName\":\"slevufuztc\",\"contentFilters\":[{\"name\":\"jtqedcgzulwmm\",\"enabled\":false,\"severityThreshold\":\"High\",\"blocking\":true,\"source\":\"PostRun\",\"action\":\"RETRY\"},{\"name\":\"dzgkr\",\"enabled\":false,\"severityThreshold\":\"High\",\"blocking\":false,\"source\":\"PreToolCall\",\"action\":\"ANNOTATING\"},{\"name\":\"t\",\"enabled\":false,\"severityThreshold\":\"High\",\"blocking\":true,\"source\":\"PreRun\",\"action\":\"ANNOTATING\"}],\"customBlocklists\":[{\"source\":\"Completion\",\"blocklistName\":\"wzqa\",\"blocking\":false},{\"source\":\"PreRun\",\"blocklistName\":\"riglaec\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"Prompt\",\"safetyProviderName\":\"pvz\",\"blocking\":false},{\"source\":\"PostRun\",\"safetyProviderName\":\"dgxobfircl\",\"blocking\":false}],\"egressPolicy\":{\"mode\":\"Enforced\",\"defaultAction\":\"Allow\",\"description\":\"iykhy\",\"rules\":[{\"name\":\"vjlboxqvk\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Allow\"}},{\"name\":\"xhom\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Rewrite\"}},{\"name\":\"hdwdi\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Transform\"}},{\"name\":\"bnraauzzptjazysd\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Deny\"}}]}},\"etag\":\"wwvaiqyuvvfonk\",\"tags\":{\"auy\":\"qyikvy\",\"y\":\"vluwmncsttij\"},\"id\":\"poekrsgsgb\",\"name\":\"huzqgn\",\"type\":\"dgkynscliqhzvhxn\"},{\"properties\":{\"type\":\"SystemManaged\",\"mode\":\"Default\",\"basePolicyName\":\"otppnv\",\"contentFilters\":[{\"name\":\"hihfrbbcevqagtlt\",\"enabled\":false,\"severityThreshold\":\"High\",\"blocking\":true,\"source\":\"PostRun\",\"action\":\"ANNOTATING\"}],\"customBlocklists\":[{\"source\":\"PostToolCall\",\"blocklistName\":\"cnifm\",\"blocking\":false}],\"safetyProviders\":[{\"source\":\"PreRun\",\"safetyProviderName\":\"nysuxmprafwgckh\",\"blocking\":false},{\"source\":\"PostRun\",\"safetyProviderName\":\"ffwafq\",\"blocking\":true},{\"source\":\"PostToolCall\",\"safetyProviderName\":\"pavehhr\",\"blocking\":true},{\"source\":\"PreToolCall\",\"safetyProviderName\":\"oz\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Allow\",\"description\":\"yxcdyuibhmfdnbzy\",\"rules\":[{\"name\":\"vfcjnaeoisrvhmg\",\"ruleType\":\"Fqdn\",\"action\":{\"actionType\":\"Transform\"}}]}},\"etag\":\"ukiscvwmzhw\",\"tags\":{\"btgn\":\"faxvxil\",\"zqlqhyc\":\"nzeyqxtjj\",\"mieknlraria\":\"vodggxdbee\"},\"id\":\"iuagydwqfbylyrfg\",\"name\":\"agt\",\"type\":\"ojocqwogf\"}]}") .toObject(RaiPolicyListResult.class); - Assertions.assertEquals("na", model.nextLink()); - Assertions.assertEquals(RaiPolicyFormat.CONTENT_FILTERS, model.value().get(0).properties().format()); - Assertions.assertEquals("idjks", model.value().get(0).properties().acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, - model.value().get(0).properties().acs().policies().get("a").type()); - Assertions.assertEquals("kkzddrtkgdojbmx", model.value().get(0).properties().acs().policies().get("a").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.INPUT, - model.value().get(0).properties().acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - model.value().get(0).properties().acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("s", - model.value().get(0).properties().acs().interventionPoints().input().policy().id()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.value().get(0).properties().acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, - model.value().get(0).properties().acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("tujwsawdd", - model.value().get(0).properties().acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.value().get(0).properties().acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - model.value().get(0).properties().acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("bxv", - model.value().get(0).properties().acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.value().get(0).properties().acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, - model.value().get(0).properties().acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("v", - model.value().get(0).properties().acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("jacbslhhxudbxvod", model.value().get(0).properties().acsRegos().get(0).regoName()); - Assertions.assertEquals(RaiPolicyMode.DEFERRED, model.value().get(0).properties().mode()); - Assertions.assertEquals("dlpagzrcxfail", model.value().get(0).properties().basePolicyName()); - Assertions.assertEquals("m", model.value().get(0).properties().contentFilters().get(0).name()); + Assertions.assertEquals("vm", model.nextLink()); + Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.value().get(0).properties().mode()); + Assertions.assertEquals("vbalxlllc", model.value().get(0).properties().basePolicyName()); + Assertions.assertEquals("bzevwrd", model.value().get(0).properties().contentFilters().get(0).name()); Assertions.assertTrue(model.value().get(0).properties().contentFilters().get(0).enabled()); Assertions.assertEquals(ContentLevel.LOW, model.value().get(0).properties().contentFilters().get(0).severityThreshold()); Assertions.assertTrue(model.value().get(0).properties().contentFilters().get(0).blocking()); Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, model.value().get(0).properties().contentFilters().get(0).source()); - Assertions.assertEquals(RaiActionType.HITL, model.value().get(0).properties().contentFilters().get(0).action()); - Assertions.assertEquals("v", model.value().get(0).properties().customBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiActionType.RETRY, + model.value().get(0).properties().contentFilters().get(0).action()); + Assertions.assertEquals("qddrihpfhoqcaae", + model.value().get(0).properties().customBlocklists().get(0).blocklistName()); Assertions.assertTrue(model.value().get(0).properties().customBlocklists().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PROMPT, - model.value().get(0).properties().customBlocklists().get(0).source()); - Assertions.assertEquals("kkjqnvbroylaxxu", - model.value().get(0).properties().safetyProviders().get(0).safetyProviderName()); - Assertions.assertTrue(model.value().get(0).properties().safetyProviders().get(0).blocking()); Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, + model.value().get(0).properties().customBlocklists().get(0).source()); + Assertions.assertEquals("l", model.value().get(0).properties().safetyProviders().get(0).safetyProviderName()); + Assertions.assertFalse(model.value().get(0).properties().safetyProviders().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, model.value().get(0).properties().safetyProviders().get(0).source()); - Assertions.assertEquals("dosfjbjsvgjrw", - model.value().get(0).properties().customExternalSafetyProviders().get(0).externalSafetyProviderName()); - Assertions.assertEquals("yvycytdclxgcckn", - model.value().get(0).properties().customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, - model.value().get(0).properties().customExternalSafetyProviders().get(0).source()); - Assertions.assertTrue(model.value().get(0).properties().customExternalSafetyProviders().get(0).blocking()); Assertions.assertEquals(RaiEgressMode.AUDIT, model.value().get(0).properties().egressPolicy().mode()); Assertions.assertEquals(RaiEgressDefaultAction.DENY, model.value().get(0).properties().egressPolicy().defaultAction()); - Assertions.assertEquals("ipifhpfeoajvg", model.value().get(0).properties().egressPolicy().description()); - Assertions.assertEquals("xjcsheafidltu", + Assertions.assertEquals("zkdnc", model.value().get(0).properties().egressPolicy().description()); + Assertions.assertEquals("onbzoggculapzwy", model.value().get(0).properties().egressPolicy().rules().get(0).name()); Assertions.assertEquals(RaiEgressRuleType.FQDN, model.value().get(0).properties().egressPolicy().rules().get(0).ruleType()); Assertions.assertEquals(RaiEgressRuleActionType.REWRITE, model.value().get(0).properties().egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals("hbqzmizakakankjp", model.value().get(0).tags().get("n")); + Assertions.assertEquals("xrkjpvdw", model.value().get(0).tags().get("fzwiivwzjbhyz")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyPropertiesTests.java index 470a2e9e125a..85922e98ec79 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiPolicyPropertiesTests.java @@ -7,22 +7,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; import com.azure.resourcemanager.cognitiveservices.models.CustomBlocklistConfig; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmCategory; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsHarmConfiguration; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoints; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsManifest; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationBindingExtension; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsModerationSubjectFormat; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsRegoPolicyDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; import com.azure.resourcemanager.cognitiveservices.models.RaiActionType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressHeaderOperation; @@ -38,392 +22,162 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiEgressScheme; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentFilter; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyCustomExternalSafetyProviderReference; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyProperties; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoReference; import com.azure.resourcemanager.cognitiveservices.models.SafetyProviderConfig; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class RaiPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiPolicyProperties model = BinaryData.fromString( - "{\"format\":\"ACS\",\"acs\":{\"agent_control_specification_version\":\"jvewzcjznmwcp\",\"metadata\":{\"v\":\"\\\"dataaadraufactkahz\\\"\",\"eekulfgslqubkwd\":\"\\\"datajjziuxxpsh\\\"\",\"sutujba\":\"\\\"dataenr\\\"\",\"orwmduvwpklv\":\"\\\"datapjuohminyfl\\\"\"},\"policies\":{\"epn\":{\"type\":\"rego\",\"query\":\"ygdxpgpqchis\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"rxgibbd\",\"query\":\"confozauors\",\"aacs_moderation\":{\"subject_format\":\"text\",\"harm_configs\":[{\"category\":\"PromptInjection\"},{\"category\":\"Hate\"},{\"category\":\"SelfHarm\"}]}},\"annotations\":{}},\"pre_tool_call\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"vnuuepzl\",\"query\":\"hw\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"Violence\"}]}},\"annotations\":{},\"tool_name_from\":\"$snap.tool_call.name\"},\"post_tool_call\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"unvmnnr\",\"query\":\"biorktal\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"Violence\"}]}},\"annotations\":{},\"tool_name_from\":\"$snap.tool_call.name\"},\"output\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"sivfomilo\",\"query\":\"gdufiqnd\",\"aacs_moderation\":{\"subject_format\":\"canonical_json\",\"harm_configs\":[{\"category\":\"ProtectedMaterialCode\"},{\"category\":\"ProtectedMaterialCode\"},{\"category\":\"ProtectedMaterialText\"}]}},\"annotations\":{}}},\"tools\":{\"xkcgxxlxsffgcvi\":{\"id\":\"cyyysfgdot\",\"type\":\"biipuip\",\"description\":\"qonmacj\",\"security_labels\":[\"izsh\",\"vcimpev\",\"gmblrri\"],\"clearance\":\"ywdxsmic\",\"nszqujiz\":\"\\\"datawfscjfn\\\"\",\"byowbblgyavutp\":\"\\\"datavoqyt\\\"\",\"smsks\":\"\\\"datahjoxo\\\"\",\"lqol\":\"\\\"datapi\\\"\"},\"dzf\":{\"id\":\"zdwlvwlyoupfgfb\",\"type\":\"ubdyhgk\",\"description\":\"in\",\"security_labels\":[\"wzf\",\"tsttktlahbq\",\"ctxtgzukxi\"],\"clearance\":\"m\",\"pjui\":\"\\\"dataqqqxhrnxrx\\\"\",\"k\":\"\\\"dataav\\\"\"},\"vvjgslor\":{\"id\":\"zivj\",\"type\":\"rqttbajlkatnw\",\"description\":\"iopid\",\"security_labels\":[\"fku\",\"s\",\"xkdmligo\",\"ibrxkp\"],\"clearance\":\"oaz\",\"hjxa\":\"\\\"dataocbgoorbteoyb\\\"\"}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"yw\"},{\"regoName\":\"t\"},{\"regoName\":\"gkxnyedabg\"},{\"regoName\":\"vudtjuewbcihx\"}],\"type\":\"UserManaged\",\"mode\":\"Default\",\"basePolicyName\":\"yxccyb\",\"contentFilters\":[{\"name\":\"akkud\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":false,\"source\":\"Completion\",\"action\":\"BLOCKING\"},{\"name\":\"tcyohpfkyrk\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":false,\"source\":\"PreToolCall\",\"action\":\"None\"},{\"name\":\"wqjnob\",\"enabled\":false,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"Prompt\",\"action\":\"HITL\"}],\"customBlocklists\":[{\"source\":\"PostToolCall\",\"blocklistName\":\"tfpmvmemfnczdw\",\"blocking\":false},{\"source\":\"PreToolCall\",\"blocklistName\":\"lllchpodb\",\"blocking\":true},{\"source\":\"PreRun\",\"blocklistName\":\"nhf\",\"blocking\":false},{\"source\":\"PostRun\",\"blocklistName\":\"cswsmystul\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PreToolCall\",\"safetyProviderName\":\"er\",\"blocking\":true},{\"source\":\"PreRun\",\"safetyProviderName\":\"f\",\"blocking\":true}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"widf\",\"managedIdentityResourceId\":\"sspuunnoxyhkx\",\"source\":\"PreRun\",\"blocking\":true},{\"externalSafetyProviderName\":\"rihpfhoq\",\"managedIdentityResourceId\":\"a\",\"source\":\"Prompt\",\"blocking\":true},{\"externalSafetyProviderName\":\"omdjvlpjxxkzbrm\",\"managedIdentityResourceId\":\"eivsiykzkdnc\",\"source\":\"PostRun\",\"blocking\":true},{\"externalSafetyProviderName\":\"nbzoggcu\",\"managedIdentityResourceId\":\"p\",\"source\":\"Completion\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Allow\",\"description\":\"xepnyl\",\"rules\":[{\"name\":\"ajlyjtlvofqzhv\",\"description\":\"ibyfmo\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"kjpvdwxf\",\"path\":\"iivwzjbhyzsxjrka\"},\"action\":{\"actionType\":\"Deny\",\"headers\":[{\"operation\":\"Insert\",\"name\":\"egv\"},{\"operation\":\"Remove\",\"name\":\"vuqeqvldspast\"}],\"rewrite\":{\"scheme\":\"https\",\"host\":\"mflvest\",\"path\":\"lx\"}}},{\"name\":\"ril\",\"description\":\"apeewchpxlkt\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"iycslevuf\",\"path\":\"tcktyhjtqedcgzu\"},\"action\":{\"actionType\":\"Deny\",\"headers\":[{\"operation\":\"Remove\",\"name\":\"qzz\"},{\"operation\":\"Remove\",\"name\":\"jvpglydzgk\"},{\"operation\":\"Insert\",\"name\":\"qeevt\"}],\"rewrite\":{\"scheme\":\"http\",\"host\":\"utnwytpzdmovzvf\",\"path\":\"awzqadfl\"}}}]}}") + "{\"type\":\"SystemManaged\",\"mode\":\"Default\",\"basePolicyName\":\"tbaxk\",\"contentFilters\":[{\"name\":\"rc\",\"enabled\":true,\"severityThreshold\":\"High\",\"blocking\":true,\"source\":\"PostToolCall\",\"action\":\"RETRY\"},{\"name\":\"pvruudlg\",\"enabled\":false,\"severityThreshold\":\"Medium\",\"blocking\":false,\"source\":\"Completion\",\"action\":\"BLOCKING\"}],\"customBlocklists\":[{\"source\":\"Completion\",\"blocklistName\":\"eclze\",\"blocking\":true},{\"source\":\"Prompt\",\"blocklistName\":\"zlhp\",\"blocking\":true},{\"source\":\"PreToolCall\",\"blocklistName\":\"lwwqfbumlkxtrqj\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PostToolCall\",\"safetyProviderName\":\"hwgfwsrt\",\"blocking\":true},{\"source\":\"Prompt\",\"safetyProviderName\":\"brhu\",\"blocking\":false}],\"egressPolicy\":{\"mode\":\"Enforced\",\"defaultAction\":\"Allow\",\"description\":\"ookk\",\"rules\":[{\"name\":\"jb\",\"description\":\"eorfm\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"tqzfavyv\",\"path\":\"qybaryeua\"},\"action\":{\"actionType\":\"Allow\",\"headers\":[{\"operation\":\"Remove\",\"name\":\"bqgzslesjcbhern\"},{\"operation\":\"Insert\",\"name\":\"iew\"},{\"operation\":\"Insert\",\"name\":\"cv\"},{\"operation\":\"Remove\",\"name\":\"uwrbehwagoh\"}],\"rewrite\":{\"scheme\":\"http\",\"host\":\"mrqemvvhmx\",\"path\":\"rjfut\"}}},{\"name\":\"coebjvewzcj\",\"description\":\"m\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"guaadraufactkahz\",\"path\":\"ajjziuxxpshne\"},\"action\":{\"actionType\":\"Deny\",\"headers\":[{\"operation\":\"Set\",\"name\":\"gs\"}],\"rewrite\":{\"scheme\":\"https\",\"host\":\"wdlenrdsut\",\"path\":\"bazpjuohmi\"}}},{\"name\":\"yfln\",\"description\":\"wmd\",\"ruleType\":\"Fqdn\",\"match\":{\"host\":\"klvxwmyg\",\"path\":\"pgpqchiszepnnb\"},\"action\":{\"actionType\":\"Deny\",\"headers\":[{\"operation\":\"Insert\",\"name\":\"ibbdaxconfoza\"},{\"operation\":\"Insert\",\"name\":\"rsukokwbqplh\"}],\"rewrite\":{\"scheme\":\"https\",\"host\":\"epzl\",\"path\":\"hw\"}}}]}}") .toObject(RaiPolicyProperties.class); - Assertions.assertEquals(RaiPolicyFormat.ACS, model.format()); - Assertions.assertEquals("jvewzcjznmwcp", model.acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, model.acs().policies().get("epn").type()); - Assertions.assertEquals("ygdxpgpqchis", model.acs().policies().get("epn").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - model.acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("rxgibbd", model.acs().interventionPoints().input().policy().id()); - Assertions.assertEquals("confozauors", model.acs().interventionPoints().input().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.acs().interventionPoints().input().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, - model.acs().interventionPoints().input().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - model.acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("vnuuepzl", model.acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals("hw", model.acs().interventionPoints().preToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.acs().interventionPoints().preToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.VIOLENCE, - model.acs().interventionPoints().preToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - model.acs().interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, - model.acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("unvmnnr", model.acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals("biorktal", model.acs().interventionPoints().postToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.acs().interventionPoints().postToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.VIOLENCE, - model.acs().interventionPoints().postToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - model.acs().interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - model.acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("sivfomilo", model.acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("gdufiqnd", model.acs().interventionPoints().output().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.acs().interventionPoints().output().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_CODE, - model.acs().interventionPoints().output().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("cyyysfgdot", model.acs().tools().get("xkcgxxlxsffgcvi").id()); - Assertions.assertEquals("biipuip", model.acs().tools().get("xkcgxxlxsffgcvi").type()); - Assertions.assertEquals("qonmacj", model.acs().tools().get("xkcgxxlxsffgcvi").description()); - Assertions.assertEquals("izsh", model.acs().tools().get("xkcgxxlxsffgcvi").securityLabels().get(0)); - Assertions.assertEquals("ywdxsmic", model.acs().tools().get("xkcgxxlxsffgcvi").clearance()); - Assertions.assertEquals("yw", model.acsRegos().get(0).regoName()); Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.mode()); - Assertions.assertEquals("yxccyb", model.basePolicyName()); - Assertions.assertEquals("akkud", model.contentFilters().get(0).name()); + Assertions.assertEquals("tbaxk", model.basePolicyName()); + Assertions.assertEquals("rc", model.contentFilters().get(0).name()); Assertions.assertTrue(model.contentFilters().get(0).enabled()); - Assertions.assertEquals(ContentLevel.MEDIUM, model.contentFilters().get(0).severityThreshold()); - Assertions.assertFalse(model.contentFilters().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, model.contentFilters().get(0).source()); - Assertions.assertEquals(RaiActionType.BLOCKING, model.contentFilters().get(0).action()); - Assertions.assertEquals("tfpmvmemfnczdw", model.customBlocklists().get(0).blocklistName()); - Assertions.assertFalse(model.customBlocklists().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.customBlocklists().get(0).source()); - Assertions.assertEquals("er", model.safetyProviders().get(0).safetyProviderName()); + Assertions.assertEquals(ContentLevel.HIGH, model.contentFilters().get(0).severityThreshold()); + Assertions.assertTrue(model.contentFilters().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.contentFilters().get(0).source()); + Assertions.assertEquals(RaiActionType.RETRY, model.contentFilters().get(0).action()); + Assertions.assertEquals("eclze", model.customBlocklists().get(0).blocklistName()); + Assertions.assertTrue(model.customBlocklists().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, model.customBlocklists().get(0).source()); + Assertions.assertEquals("hwgfwsrt", model.safetyProviders().get(0).safetyProviderName()); Assertions.assertTrue(model.safetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, model.safetyProviders().get(0).source()); - Assertions.assertEquals("widf", model.customExternalSafetyProviders().get(0).externalSafetyProviderName()); - Assertions.assertEquals("sspuunnoxyhkx", - model.customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, model.customExternalSafetyProviders().get(0).source()); - Assertions.assertTrue(model.customExternalSafetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiEgressMode.AUDIT, model.egressPolicy().mode()); + Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.safetyProviders().get(0).source()); + Assertions.assertEquals(RaiEgressMode.ENFORCED, model.egressPolicy().mode()); Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, model.egressPolicy().defaultAction()); - Assertions.assertEquals("xepnyl", model.egressPolicy().description()); - Assertions.assertEquals("ajlyjtlvofqzhv", model.egressPolicy().rules().get(0).name()); - Assertions.assertEquals("ibyfmo", model.egressPolicy().rules().get(0).description()); + Assertions.assertEquals("ookk", model.egressPolicy().description()); + Assertions.assertEquals("jb", model.egressPolicy().rules().get(0).name()); + Assertions.assertEquals("eorfm", model.egressPolicy().rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, model.egressPolicy().rules().get(0).ruleType()); - Assertions.assertEquals("kjpvdwxf", model.egressPolicy().rules().get(0).match().host()); - Assertions.assertEquals("iivwzjbhyzsxjrka", model.egressPolicy().rules().get(0).match().path()); - Assertions.assertEquals(RaiEgressRuleActionType.DENY, + Assertions.assertEquals("tqzfavyv", model.egressPolicy().rules().get(0).match().host()); + Assertions.assertEquals("qybaryeua", model.egressPolicy().rules().get(0).match().path()); + Assertions.assertEquals(RaiEgressRuleActionType.ALLOW, model.egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals(RaiEgressHeaderOperation.INSERT, + Assertions.assertEquals(RaiEgressHeaderOperation.REMOVE, model.egressPolicy().rules().get(0).action().headers().get(0).operation()); - Assertions.assertEquals("egv", model.egressPolicy().rules().get(0).action().headers().get(0).name()); - Assertions.assertEquals(RaiEgressScheme.HTTPS, model.egressPolicy().rules().get(0).action().rewrite().scheme()); - Assertions.assertEquals("mflvest", model.egressPolicy().rules().get(0).action().rewrite().host()); - Assertions.assertEquals("lx", model.egressPolicy().rules().get(0).action().rewrite().path()); + Assertions.assertEquals("bqgzslesjcbhern", + model.egressPolicy().rules().get(0).action().headers().get(0).name()); + Assertions.assertEquals(RaiEgressScheme.HTTP, model.egressPolicy().rules().get(0).action().rewrite().scheme()); + Assertions.assertEquals("mrqemvvhmx", model.egressPolicy().rules().get(0).action().rewrite().host()); + Assertions.assertEquals("rjfut", model.egressPolicy().rules().get(0).action().rewrite().path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiPolicyProperties model - = new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs( - new RaiAcsManifest().withAgentControlSpecificationVersion("jvewzcjznmwcp") - .withMetadata(mapOf("v", "\"dataaadraufactkahz\"", "eekulfgslqubkwd", "\"datajjziuxxpsh\"", - "sutujba", "\"dataenr\"", "orwmduvwpklv", "\"datapjuohminyfl\"")) - .withPolicies(mapOf("epn", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("ygdxpgpqchis"))) - .withInterventionPoints(new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("rxgibbd") - .withQuery("confozauors") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.TEXT) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROMPT_INJECTION), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.HATE), - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.SELF_HARM))))) - .withAnnotations(new RaiAcsEmptyObject())) - .withPreToolCall(new RaiAcsToolInterventionPoint() - .withPolicyTarget(RaiAcsPolicyTarget.TOOL_ARGUMENTS) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS) - .withPolicy(new RaiAcsPolicyBinding().withId("vnuuepzl") - .withQuery("hw") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.VIOLENCE))))) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME)) - .withPostToolCall(new RaiAcsToolInterventionPoint() - .withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("unvmnnr") - .withQuery("biorktal") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration().withCategory(RaiAcsHarmCategory.VIOLENCE))))) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME)) - .withOutput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("sivfomilo") - .withQuery("gdufiqnd") - .withAacsModeration(new RaiAcsModerationBindingExtension() - .withSubjectFormat(RaiAcsModerationSubjectFormat.CANONICAL_JSON) - .withHarmConfigs(Arrays.asList( - new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_CODE), - new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_CODE), - new RaiAcsHarmConfiguration() - .withCategory(RaiAcsHarmCategory.PROTECTED_MATERIAL_TEXT))))) - .withAnnotations(new RaiAcsEmptyObject()))) - .withTools(mapOf("xkcgxxlxsffgcvi", - new RaiAcsToolDefinition().withId("cyyysfgdot") - .withType("biipuip") - .withDescription("qonmacj") - .withSecurityLabels(Arrays.asList("izsh", "vcimpev", "gmblrri")) - .withClearance("ywdxsmic") - .withAdditionalProperties(mapOf("lqol", "\"datapi\"", "smsks", "\"datahjoxo\"", - "byowbblgyavutp", "\"datavoqyt\"", "nszqujiz", "\"datawfscjfn\"")), - "dzf", - new RaiAcsToolDefinition().withId("zdwlvwlyoupfgfb") - .withType("ubdyhgk") - .withDescription("in") - .withSecurityLabels(Arrays.asList("wzf", "tsttktlahbq", "ctxtgzukxi")) - .withClearance("m") - .withAdditionalProperties(mapOf("pjui", "\"dataqqqxhrnxrx\"", "k", "\"dataav\"")), - "vvjgslor", - new RaiAcsToolDefinition().withId("zivj") - .withType("rqttbajlkatnw") - .withDescription("iopid") - .withSecurityLabels(Arrays.asList("fku", "s", "xkdmligo", "ibrxkp")) - .withClearance("oaz") - .withAdditionalProperties(mapOf("hjxa", "\"dataocbgoorbteoyb\"")))) - .withAnnotators(new RaiAcsEmptyObject())) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("yw"), - new RaiRegoReference().withRegoName("t"), new RaiRegoReference().withRegoName("gkxnyedabg"), - new RaiRegoReference().withRegoName("vudtjuewbcihx"))) - .withMode(RaiPolicyMode.DEFAULT) - .withBasePolicyName("yxccyb") - .withContentFilters(Arrays.asList( - new RaiPolicyContentFilter().withName("akkud") - .withEnabled(true) - .withSeverityThreshold(ContentLevel.MEDIUM) - .withBlocking(false) - .withSource(RaiPolicyContentSource.COMPLETION) - .withAction(RaiActionType.BLOCKING), - new RaiPolicyContentFilter().withName("tcyohpfkyrk") - .withEnabled(false) - .withSeverityThreshold(ContentLevel.LOW) - .withBlocking(false) - .withSource(RaiPolicyContentSource.PRE_TOOL_CALL) - .withAction(RaiActionType.NONE), - new RaiPolicyContentFilter().withName("wqjnob") - .withEnabled(false) - .withSeverityThreshold(ContentLevel.MEDIUM) - .withBlocking(true) - .withSource(RaiPolicyContentSource.PROMPT) - .withAction(RaiActionType.HITL))) - .withCustomBlocklists(Arrays.asList( - new CustomBlocklistConfig().withBlocklistName("tfpmvmemfnczdw") - .withBlocking(false) - .withSource(RaiPolicyContentSource.POST_TOOL_CALL), - new CustomBlocklistConfig().withBlocklistName("lllchpodb") - .withBlocking(true) - .withSource(RaiPolicyContentSource.PRE_TOOL_CALL), - new CustomBlocklistConfig().withBlocklistName("nhf") - .withBlocking(false) - .withSource(RaiPolicyContentSource.PRE_RUN), - new CustomBlocklistConfig().withBlocklistName("cswsmystul") - .withBlocking(true) - .withSource(RaiPolicyContentSource.POST_RUN))) - .withSafetyProviders(Arrays.asList( - new SafetyProviderConfig().withSafetyProviderName("er") - .withBlocking(true) - .withSource(RaiPolicyContentSource.PRE_TOOL_CALL), - new SafetyProviderConfig().withSafetyProviderName("f") - .withBlocking(true) - .withSource(RaiPolicyContentSource.PRE_RUN))) - .withCustomExternalSafetyProviders(Arrays.asList( - new RaiPolicyCustomExternalSafetyProviderReference().withExternalSafetyProviderName("widf") - .withManagedIdentityResourceId("sspuunnoxyhkx") - .withSource(RaiPolicyContentSource.PRE_RUN) - .withBlocking(true), - new RaiPolicyCustomExternalSafetyProviderReference().withExternalSafetyProviderName("rihpfhoq") - .withManagedIdentityResourceId("a") - .withSource(RaiPolicyContentSource.PROMPT) - .withBlocking(true), - new RaiPolicyCustomExternalSafetyProviderReference() - .withExternalSafetyProviderName("omdjvlpjxxkzbrm") - .withManagedIdentityResourceId("eivsiykzkdnc") - .withSource(RaiPolicyContentSource.POST_RUN) - .withBlocking(true), - new RaiPolicyCustomExternalSafetyProviderReference().withExternalSafetyProviderName("nbzoggcu") - .withManagedIdentityResourceId("p") - .withSource(RaiPolicyContentSource.COMPLETION) - .withBlocking(true))) - .withEgressPolicy(new RaiEgressPolicyConfig().withMode(RaiEgressMode.AUDIT) - .withDefaultAction(RaiEgressDefaultAction.ALLOW) - .withDescription("xepnyl") - .withRules(Arrays.asList( - new RaiEgressRule().withName("ajlyjtlvofqzhv") - .withDescription("ibyfmo") - .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch().withHost("kjpvdwxf").withPath("iivwzjbhyzsxjrka")) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY) + RaiPolicyProperties model = new RaiPolicyProperties().withMode(RaiPolicyMode.DEFAULT) + .withBasePolicyName("tbaxk") + .withContentFilters(Arrays.asList( + new RaiPolicyContentFilter().withName("rc") + .withEnabled(true) + .withSeverityThreshold(ContentLevel.HIGH) + .withBlocking(true) + .withSource(RaiPolicyContentSource.POST_TOOL_CALL) + .withAction(RaiActionType.RETRY), + new RaiPolicyContentFilter().withName("pvruudlg") + .withEnabled(false) + .withSeverityThreshold(ContentLevel.MEDIUM) + .withBlocking(false) + .withSource(RaiPolicyContentSource.COMPLETION) + .withAction(RaiActionType.BLOCKING))) + .withCustomBlocklists(Arrays.asList( + new CustomBlocklistConfig().withBlocklistName("eclze") + .withBlocking(true) + .withSource(RaiPolicyContentSource.COMPLETION), + new CustomBlocklistConfig().withBlocklistName("zlhp") + .withBlocking(true) + .withSource(RaiPolicyContentSource.PROMPT), + new CustomBlocklistConfig().withBlocklistName("lwwqfbumlkxtrqj") + .withBlocking(true) + .withSource(RaiPolicyContentSource.PRE_TOOL_CALL))) + .withSafetyProviders(Arrays.asList( + new SafetyProviderConfig().withSafetyProviderName("hwgfwsrt") + .withBlocking(true) + .withSource(RaiPolicyContentSource.POST_TOOL_CALL), + new SafetyProviderConfig().withSafetyProviderName("brhu") + .withBlocking(false) + .withSource(RaiPolicyContentSource.PROMPT))) + .withEgressPolicy(new RaiEgressPolicyConfig().withMode(RaiEgressMode.ENFORCED) + .withDefaultAction(RaiEgressDefaultAction.ALLOW) + .withDescription("ookk") + .withRules(Arrays.asList( + new RaiEgressRule().withName("jb") + .withDescription("eorfm") + .withRuleType(RaiEgressRuleType.FQDN) + .withMatch(new RaiEgressRuleMatch().withHost("tqzfavyv").withPath("qybaryeua")) + .withAction( + new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.ALLOW) .withHeaders(Arrays.asList( - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) - .withName("egv"), - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.REMOVE) - .withName("vuqeqvldspast"))) - .withRewrite(new RaiEgressRewriteTarget().withScheme(RaiEgressScheme.HTTPS) - .withHost("mflvest") - .withPath("lx"))), - new RaiEgressRule().withName("ril") - .withDescription("apeewchpxlkt") - .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch().withHost("iycslevuf").withPath("tcktyhjtqedcgzu")) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY) - .withHeaders(Arrays.asList( - new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.REMOVE) - .withName("qzz"), new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.REMOVE) - .withName("jvpglydzgk"), + .withName("bqgzslesjcbhern"), new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) - .withName("qeevt"))) + .withName("iew"), + new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) + .withName("cv"), + new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.REMOVE) + .withName("uwrbehwagoh"))) .withRewrite(new RaiEgressRewriteTarget().withScheme(RaiEgressScheme.HTTP) - .withHost("utnwytpzdmovzvf") - .withPath("awzqadfl")))))); + .withHost("mrqemvvhmx") + .withPath("rjfut"))), + new RaiEgressRule().withName("coebjvewzcj") + .withDescription("m") + .withRuleType(RaiEgressRuleType.FQDN) + .withMatch(new RaiEgressRuleMatch().withHost("guaadraufactkahz").withPath("ajjziuxxpshne")) + .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY) + .withHeaders( + Arrays.asList(new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.SET) + .withName("gs"))) + .withRewrite(new RaiEgressRewriteTarget().withScheme(RaiEgressScheme.HTTPS) + .withHost("wdlenrdsut") + .withPath("bazpjuohmi"))), + new RaiEgressRule().withName("yfln") + .withDescription("wmd") + .withRuleType(RaiEgressRuleType.FQDN) + .withMatch(new RaiEgressRuleMatch().withHost("klvxwmyg").withPath("pgpqchiszepnnb")) + .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY) + .withHeaders(Arrays.asList( + new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) + .withName("ibbdaxconfoza"), + new RaiEgressHeaderTransform().withOperation(RaiEgressHeaderOperation.INSERT) + .withName("rsukokwbqplh"))) + .withRewrite(new RaiEgressRewriteTarget().withScheme(RaiEgressScheme.HTTPS) + .withHost("epzl") + .withPath("hw")))))); model = BinaryData.fromObject(model).toObject(RaiPolicyProperties.class); - Assertions.assertEquals(RaiPolicyFormat.ACS, model.format()); - Assertions.assertEquals("jvewzcjznmwcp", model.acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, model.acs().policies().get("epn").type()); - Assertions.assertEquals("ygdxpgpqchis", model.acs().policies().get("epn").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - model.acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("rxgibbd", model.acs().interventionPoints().input().policy().id()); - Assertions.assertEquals("confozauors", model.acs().interventionPoints().input().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.TEXT, - model.acs().interventionPoints().input().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROMPT_INJECTION, - model.acs().interventionPoints().input().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - model.acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - model.acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("vnuuepzl", model.acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals("hw", model.acs().interventionPoints().preToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.acs().interventionPoints().preToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.VIOLENCE, - model.acs().interventionPoints().preToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - model.acs().interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, - model.acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("unvmnnr", model.acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals("biorktal", model.acs().interventionPoints().postToolCall().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.acs().interventionPoints().postToolCall().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.VIOLENCE, - model.acs().interventionPoints().postToolCall().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME, - model.acs().interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - model.acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - model.acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("sivfomilo", model.acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("gdufiqnd", model.acs().interventionPoints().output().policy().query()); - Assertions.assertEquals(RaiAcsModerationSubjectFormat.CANONICAL_JSON, - model.acs().interventionPoints().output().policy().aacsModeration().subjectFormat()); - Assertions.assertEquals(RaiAcsHarmCategory.PROTECTED_MATERIAL_CODE, - model.acs().interventionPoints().output().policy().aacsModeration().harmConfigs().get(0).category()); - Assertions.assertEquals("cyyysfgdot", model.acs().tools().get("xkcgxxlxsffgcvi").id()); - Assertions.assertEquals("biipuip", model.acs().tools().get("xkcgxxlxsffgcvi").type()); - Assertions.assertEquals("qonmacj", model.acs().tools().get("xkcgxxlxsffgcvi").description()); - Assertions.assertEquals("izsh", model.acs().tools().get("xkcgxxlxsffgcvi").securityLabels().get(0)); - Assertions.assertEquals("ywdxsmic", model.acs().tools().get("xkcgxxlxsffgcvi").clearance()); - Assertions.assertEquals("yw", model.acsRegos().get(0).regoName()); Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.mode()); - Assertions.assertEquals("yxccyb", model.basePolicyName()); - Assertions.assertEquals("akkud", model.contentFilters().get(0).name()); + Assertions.assertEquals("tbaxk", model.basePolicyName()); + Assertions.assertEquals("rc", model.contentFilters().get(0).name()); Assertions.assertTrue(model.contentFilters().get(0).enabled()); - Assertions.assertEquals(ContentLevel.MEDIUM, model.contentFilters().get(0).severityThreshold()); - Assertions.assertFalse(model.contentFilters().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, model.contentFilters().get(0).source()); - Assertions.assertEquals(RaiActionType.BLOCKING, model.contentFilters().get(0).action()); - Assertions.assertEquals("tfpmvmemfnczdw", model.customBlocklists().get(0).blocklistName()); - Assertions.assertFalse(model.customBlocklists().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.customBlocklists().get(0).source()); - Assertions.assertEquals("er", model.safetyProviders().get(0).safetyProviderName()); + Assertions.assertEquals(ContentLevel.HIGH, model.contentFilters().get(0).severityThreshold()); + Assertions.assertTrue(model.contentFilters().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.contentFilters().get(0).source()); + Assertions.assertEquals(RaiActionType.RETRY, model.contentFilters().get(0).action()); + Assertions.assertEquals("eclze", model.customBlocklists().get(0).blocklistName()); + Assertions.assertTrue(model.customBlocklists().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, model.customBlocklists().get(0).source()); + Assertions.assertEquals("hwgfwsrt", model.safetyProviders().get(0).safetyProviderName()); Assertions.assertTrue(model.safetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, model.safetyProviders().get(0).source()); - Assertions.assertEquals("widf", model.customExternalSafetyProviders().get(0).externalSafetyProviderName()); - Assertions.assertEquals("sspuunnoxyhkx", - model.customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, model.customExternalSafetyProviders().get(0).source()); - Assertions.assertTrue(model.customExternalSafetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiEgressMode.AUDIT, model.egressPolicy().mode()); + Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, model.safetyProviders().get(0).source()); + Assertions.assertEquals(RaiEgressMode.ENFORCED, model.egressPolicy().mode()); Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, model.egressPolicy().defaultAction()); - Assertions.assertEquals("xepnyl", model.egressPolicy().description()); - Assertions.assertEquals("ajlyjtlvofqzhv", model.egressPolicy().rules().get(0).name()); - Assertions.assertEquals("ibyfmo", model.egressPolicy().rules().get(0).description()); + Assertions.assertEquals("ookk", model.egressPolicy().description()); + Assertions.assertEquals("jb", model.egressPolicy().rules().get(0).name()); + Assertions.assertEquals("eorfm", model.egressPolicy().rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, model.egressPolicy().rules().get(0).ruleType()); - Assertions.assertEquals("kjpvdwxf", model.egressPolicy().rules().get(0).match().host()); - Assertions.assertEquals("iivwzjbhyzsxjrka", model.egressPolicy().rules().get(0).match().path()); - Assertions.assertEquals(RaiEgressRuleActionType.DENY, + Assertions.assertEquals("tqzfavyv", model.egressPolicy().rules().get(0).match().host()); + Assertions.assertEquals("qybaryeua", model.egressPolicy().rules().get(0).match().path()); + Assertions.assertEquals(RaiEgressRuleActionType.ALLOW, model.egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals(RaiEgressHeaderOperation.INSERT, + Assertions.assertEquals(RaiEgressHeaderOperation.REMOVE, model.egressPolicy().rules().get(0).action().headers().get(0).operation()); - Assertions.assertEquals("egv", model.egressPolicy().rules().get(0).action().headers().get(0).name()); - Assertions.assertEquals(RaiEgressScheme.HTTPS, model.egressPolicy().rules().get(0).action().rewrite().scheme()); - Assertions.assertEquals("mflvest", model.egressPolicy().rules().get(0).action().rewrite().host()); - Assertions.assertEquals("lx", model.egressPolicy().rules().get(0).action().rewrite().path()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("bqgzslesjcbhern", + model.egressPolicy().rules().get(0).action().headers().get(0).name()); + Assertions.assertEquals(RaiEgressScheme.HTTP, model.egressPolicy().rules().get(0).action().rewrite().scheme()); + Assertions.assertEquals("mrqemvvhmx", model.egressPolicy().rules().get(0).action().rewrite().host()); + Assertions.assertEquals("rjfut", model.egressPolicy().rules().get(0).action().rewrite().path()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoInnerTests.java deleted file mode 100644 index b111cea19320..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiRegoInner; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoEncoding; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RaiRegoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiRegoInner model = BinaryData.fromString( - "{\"properties\":{\"encoding\":\"None\",\"rego\":\"kwv\"},\"etag\":\"nzvdfbzdixzmq\",\"tags\":{\"wopqhewjptmcgs\":\"d\",\"mzlbiojlvfhrb\":\"ostzelndlatu\",\"qvcww\":\"pn\",\"mo\":\"yurmochpprprs\"},\"id\":\"yzejnhlbk\",\"name\":\"bzpcpiljhahzvec\",\"type\":\"ndbnwieh\"}") - .toObject(RaiRegoInner.class); - Assertions.assertEquals(RaiRegoEncoding.NONE, model.properties().encoding()); - Assertions.assertEquals("kwv", model.properties().rego()); - Assertions.assertEquals("d", model.tags().get("wopqhewjptmcgs")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiRegoInner model = new RaiRegoInner() - .withProperties(new RaiRegoProperties().withEncoding(RaiRegoEncoding.NONE).withRego("kwv")) - .withTags( - mapOf("wopqhewjptmcgs", "d", "mzlbiojlvfhrb", "ostzelndlatu", "qvcww", "pn", "mo", "yurmochpprprs")); - model = BinaryData.fromObject(model).toObject(RaiRegoInner.class); - Assertions.assertEquals(RaiRegoEncoding.NONE, model.properties().encoding()); - Assertions.assertEquals("kwv", model.properties().rego()); - Assertions.assertEquals("d", model.tags().get("wopqhewjptmcgs")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoListResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoListResultTests.java deleted file mode 100644 index 7bbeb602536f..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoListResultTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.implementation.models.RaiRegoListResult; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoEncoding; -import org.junit.jupiter.api.Assertions; - -public final class RaiRegoListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiRegoListResult model = BinaryData.fromString( - "{\"nextLink\":\"fqsfa\",\"value\":[{\"properties\":{\"encoding\":\"None\",\"rego\":\"e\"},\"etag\":\"q\",\"tags\":{\"qqnobpudcd\":\"jkmfxapjwo\"},\"id\":\"tqwpwya\",\"name\":\"bzasqbucljgkyexa\",\"type\":\"guyaip\"},{\"properties\":{\"encoding\":\"Base64\",\"rego\":\"ault\"},\"etag\":\"jjum\",\"tags\":{\"bjwgnyfus\":\"azlnqnmcjngzqdqx\"},\"id\":\"svtui\",\"name\":\"zh\",\"type\":\"jqg\"}]}") - .toObject(RaiRegoListResult.class); - Assertions.assertEquals("fqsfa", model.nextLink()); - Assertions.assertEquals(RaiRegoEncoding.NONE, model.value().get(0).properties().encoding()); - Assertions.assertEquals("e", model.value().get(0).properties().rego()); - Assertions.assertEquals("jkmfxapjwo", model.value().get(0).tags().get("qqnobpudcd")); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoPropertiesTests.java deleted file mode 100644 index 42e563097788..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoEncoding; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoProperties; -import org.junit.jupiter.api.Assertions; - -public final class RaiRegoPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiRegoProperties model - = BinaryData.fromString("{\"encoding\":\"Base64\",\"rego\":\"wjwiuub\"}").toObject(RaiRegoProperties.class); - Assertions.assertEquals(RaiRegoEncoding.BASE64, model.encoding()); - Assertions.assertEquals("wjwiuub", model.rego()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiRegoProperties model = new RaiRegoProperties().withEncoding(RaiRegoEncoding.BASE64).withRego("wjwiuub"); - model = BinaryData.fromObject(model).toObject(RaiRegoProperties.class); - Assertions.assertEquals(RaiRegoEncoding.BASE64, model.encoding()); - Assertions.assertEquals("wjwiuub", model.rego()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoReferenceTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoReferenceTests.java deleted file mode 100644 index 1e084ee45b19..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegoReferenceTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoReference; -import org.junit.jupiter.api.Assertions; - -public final class RaiRegoReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RaiRegoReference model - = BinaryData.fromString("{\"regoName\":\"wlyxgncxyk\"}").toObject(RaiRegoReference.class); - Assertions.assertEquals("wlyxgncxyk", model.regoName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RaiRegoReference model = new RaiRegoReference().withRegoName("wlyxgncxyk"); - model = BinaryData.fromObject(model).toObject(RaiRegoReference.class); - Assertions.assertEquals("wlyxgncxyk", model.regoName()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index dbbc8db7b65c..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import com.azure.resourcemanager.cognitiveservices.models.RaiRego; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoEncoding; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RaiRegosCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"encoding\":\"None\",\"rego\":\"cjfa\"},\"etag\":\"ulp\",\"tags\":{\"forxsqtz\":\"krxifqn\",\"wguxcmmhipbvskci\":\"gxbsal\"},\"id\":\"y\",\"name\":\"kwfsaangfgbm\",\"type\":\"vm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - RaiRego response = manager.raiRegos() - .define("n") - .withExistingAccount("u", "omzq") - .withTags(mapOf("egefxlieggot", "apialezaydpuzu", "kahhec", "smhssfnwh", "dgwuzron", "nfmkcuft", - "ysodcikgx", "dvhzfkdn")) - .withProperties(new RaiRegoProperties().withEncoding(RaiRegoEncoding.BASE64).withRego("i")) - .withIfMatch("xz") - .withIfNoneMatch("jwyfi") - .create(); - - Assertions.assertEquals(RaiRegoEncoding.NONE, response.properties().encoding()); - Assertions.assertEquals("cjfa", response.properties().rego()); - Assertions.assertEquals("krxifqn", response.tags().get("forxsqtz")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosDeleteWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosDeleteWithResponseMockTests.java deleted file mode 100644 index a85d173e8908..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RaiRegosDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.raiRegos() - .deleteWithResponse("pbadjzeul", "gf", "ogtqscj", "vqerqxkomwdzpzl", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosGetWithResponseMockTests.java deleted file mode 100644 index 9a6f6f1108fd..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosGetWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import com.azure.resourcemanager.cognitiveservices.models.RaiRego; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoEncoding; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RaiRegosGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"encoding\":\"None\",\"rego\":\"fsvpzxg\"},\"etag\":\"wxuymlfjymg\",\"tags\":{\"urd\":\"szcfyzqpeqreg\",\"hlnzffew\":\"agknxmaovrg\"},\"id\":\"kycjcg\",\"name\":\"ipqxxsdyafwtydsm\",\"type\":\"abhgclejqzhpvh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - RaiRego response = manager.raiRegos() - .getWithResponse("uufkbzbfbxjbla", "ybdnbycsb", "oisaz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(RaiRegoEncoding.NONE, response.properties().encoding()); - Assertions.assertEquals("fsvpzxg", response.properties().rego()); - Assertions.assertEquals("szcfyzqpeqreg", response.tags().get("urd")); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosListMockTests.java deleted file mode 100644 index 6b549adcbc19..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiRegosListMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; -import com.azure.resourcemanager.cognitiveservices.models.RaiRego; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoEncoding; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RaiRegosListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"encoding\":\"None\",\"rego\":\"xohlydsn\"},\"etag\":\"pchiypbfhmih\",\"tags\":{\"rjzgkbrauxbo\":\"qozewbr\",\"nqbjxgjwsrer\":\"fq\",\"izwkwkjx\":\"kbuud\",\"dikqelssybz\":\"aac\"},\"id\":\"vgb\",\"name\":\"rommkiqhypwt\",\"type\":\"zyjj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - CognitiveServicesManager manager = CognitiveServicesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.raiRegos().list("cuex", "qpwwvmbjecfwlbgh", 1381709162, com.azure.core.util.Context.NONE); - - Assertions.assertEquals(RaiRegoEncoding.NONE, response.iterator().next().properties().encoding()); - Assertions.assertEquals("xohlydsn", response.iterator().next().properties().rego()); - Assertions.assertEquals("qozewbr", response.iterator().next().tags().get("rjzgkbrauxbo")); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiSafetyProviderConfigTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiSafetyProviderConfigTests.java index 60ae26ad068e..31cd97632e56 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiSafetyProviderConfigTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiSafetyProviderConfigTests.java @@ -11,17 +11,19 @@ public final class RaiSafetyProviderConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RaiSafetyProviderConfig model = BinaryData.fromString("{\"safetyProviderName\":\"k\",\"blocking\":false}") - .toObject(RaiSafetyProviderConfig.class); - Assertions.assertEquals("k", model.safetyProviderName()); - Assertions.assertFalse(model.blocking()); + RaiSafetyProviderConfig model + = BinaryData.fromString("{\"safetyProviderName\":\"yyysfgdotcubi\",\"blocking\":true}") + .toObject(RaiSafetyProviderConfig.class); + Assertions.assertEquals("yyysfgdotcubi", model.safetyProviderName()); + Assertions.assertTrue(model.blocking()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiSafetyProviderConfig model = new RaiSafetyProviderConfig().withSafetyProviderName("k").withBlocking(false); + RaiSafetyProviderConfig model + = new RaiSafetyProviderConfig().withSafetyProviderName("yyysfgdotcubi").withBlocking(true); model = BinaryData.fromObject(model).toObject(RaiSafetyProviderConfig.class); - Assertions.assertEquals("k", model.safetyProviderName()); - Assertions.assertFalse(model.blocking()); + Assertions.assertEquals("yyysfgdotcubi", model.safetyProviderName()); + Assertions.assertTrue(model.blocking()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelInnerTests.java index eb61f7419eda..64fafad17440 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelInnerTests.java @@ -18,41 +18,36 @@ public final class RaiToolLabelInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiToolLabelInner model = BinaryData.fromString( - "{\"properties\":{\"toolConnectionName\":\"kqmhhaowjr\",\"accountScope\":{\"labelValues\":{\"dzvkfvxcnqmxq\":\"porqzdfu\",\"khlg\":\"swokm\",\"iwtglxxhljfpg\":\"dhbemzqkzszu\"}},\"projectScopes\":[{\"project\":\"rmnzhr\",\"labelValues\":{\"hsqqgvriibakcl\":\"qgjsxvpqcbfrmbod\",\"fr\":\"c\",\"vsg\":\"xousxauzl\"}},{\"project\":\"wohqfzizvu\",\"labelValues\":{\"svth\":\"mk\",\"tgplucfota\":\"wpztekovmribia\",\"ykzcugswvxwl\":\"gcfh\",\"njmxmcuqudtcvcl\":\"zqwmvt\"}},{\"project\":\"ynpdkvgfab\",\"labelValues\":{\"knpgoxgjiuq\":\"yjibuzphdugne\"}},{\"project\":\"ibtozipqw\",\"labelValues\":{\"urrxxgewpktv\":\"d\",\"o\":\"ylkmqp\",\"oxoebqi\":\"hlfbcgwgc\"}}]},\"etag\":\"ipnwj\",\"tags\":{\"jwpfilkm\":\"qlafcbahhpzpofoi\",\"dviauogp\":\"kholvd\",\"kyefchnmnahmnxhk\":\"uartvti\",\"ooxf\":\"jqirwrw\"},\"id\":\"fhxwrsne\",\"name\":\"mozqv\",\"type\":\"ubqmamh\"}") + "{\"properties\":{\"toolConnectionName\":\"bpmzzn\",\"accountScope\":{\"labelValues\":{\"eufuqyrxpdlcgql\":\"yaqitmhheioqaqhv\",\"iosrsjuivfcdis\":\"ismjqfrddgamqu\"}},\"projectScopes\":[{\"project\":\"nxzhcze\",\"labelValues\":{\"vk\":\"xzbujrtrhqvwr\",\"zonzlrpiqywnc\":\"gnl\"}},{\"project\":\"jtszcof\",\"labelValues\":{\"tdhgbjkvrelj\":\"e\",\"shcxlpmjerbdk\":\"amurvzmlovuan\"}}]},\"etag\":\"vidizozsdb\",\"tags\":{\"n\":\"jmonfdgn\",\"keifzzhmkdasv\":\"ypuuwwltvuqjctze\"},\"id\":\"yhbxcudchxgs\",\"name\":\"boldforobwj\",\"type\":\"vizbfhfo\"}") .toObject(RaiToolLabelInner.class); - Assertions.assertEquals("kqmhhaowjr", model.properties().toolConnectionName()); - Assertions.assertEquals("porqzdfu", model.properties().accountScope().labelValues().get("dzvkfvxcnqmxq")); - Assertions.assertEquals("rmnzhr", model.properties().projectScopes().get(0).project()); - Assertions.assertEquals("qgjsxvpqcbfrmbod", - model.properties().projectScopes().get(0).labelValues().get("hsqqgvriibakcl")); - Assertions.assertEquals("qlafcbahhpzpofoi", model.tags().get("jwpfilkm")); + Assertions.assertEquals("bpmzzn", model.properties().toolConnectionName()); + Assertions.assertEquals("yaqitmhheioqaqhv", + model.properties().accountScope().labelValues().get("eufuqyrxpdlcgql")); + Assertions.assertEquals("nxzhcze", model.properties().projectScopes().get(0).project()); + Assertions.assertEquals("xzbujrtrhqvwr", model.properties().projectScopes().get(0).labelValues().get("vk")); + Assertions.assertEquals("jmonfdgn", model.tags().get("n")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiToolLabelInner model = new RaiToolLabelInner() - .withProperties(new RaiToolLabelProperties().withToolConnectionName("kqmhhaowjr") - .withAccountScope(new RaiToolLabelPropertiesAccountScope().withLabelValues( - mapOf("dzvkfvxcnqmxq", "porqzdfu", "khlg", "swokm", "iwtglxxhljfpg", "dhbemzqkzszu"))) - .withProjectScopes(Arrays.asList( - new RaiToolLabelPropertiesProjectScopesItem().withProject("rmnzhr") - .withLabelValues(mapOf("hsqqgvriibakcl", "qgjsxvpqcbfrmbod", "fr", "c", "vsg", "xousxauzl")), - new RaiToolLabelPropertiesProjectScopesItem().withProject("wohqfzizvu") - .withLabelValues(mapOf("svth", "mk", "tgplucfota", "wpztekovmribia", "ykzcugswvxwl", "gcfh", - "njmxmcuqudtcvcl", "zqwmvt")), - new RaiToolLabelPropertiesProjectScopesItem().withProject("ynpdkvgfab") - .withLabelValues(mapOf("knpgoxgjiuq", "yjibuzphdugne")), - new RaiToolLabelPropertiesProjectScopesItem().withProject("ibtozipqw") - .withLabelValues(mapOf("urrxxgewpktv", "d", "o", "ylkmqp", "oxoebqi", "hlfbcgwgc"))))) - .withTags(mapOf("jwpfilkm", "qlafcbahhpzpofoi", "dviauogp", "kholvd", "kyefchnmnahmnxhk", "uartvti", "ooxf", - "jqirwrw")); + RaiToolLabelInner model + = new RaiToolLabelInner() + .withProperties(new RaiToolLabelProperties().withToolConnectionName("bpmzzn") + .withAccountScope(new RaiToolLabelPropertiesAccountScope().withLabelValues( + mapOf("eufuqyrxpdlcgql", "yaqitmhheioqaqhv", "iosrsjuivfcdis", "ismjqfrddgamqu"))) + .withProjectScopes(Arrays.asList( + new RaiToolLabelPropertiesProjectScopesItem().withProject("nxzhcze") + .withLabelValues(mapOf("vk", "xzbujrtrhqvwr", "zonzlrpiqywnc", "gnl")), + new RaiToolLabelPropertiesProjectScopesItem().withProject("jtszcof") + .withLabelValues(mapOf("tdhgbjkvrelj", "e", "shcxlpmjerbdk", "amurvzmlovuan"))))) + .withTags(mapOf("n", "jmonfdgn", "keifzzhmkdasv", "ypuuwwltvuqjctze")); model = BinaryData.fromObject(model).toObject(RaiToolLabelInner.class); - Assertions.assertEquals("kqmhhaowjr", model.properties().toolConnectionName()); - Assertions.assertEquals("porqzdfu", model.properties().accountScope().labelValues().get("dzvkfvxcnqmxq")); - Assertions.assertEquals("rmnzhr", model.properties().projectScopes().get(0).project()); - Assertions.assertEquals("qgjsxvpqcbfrmbod", - model.properties().projectScopes().get(0).labelValues().get("hsqqgvriibakcl")); - Assertions.assertEquals("qlafcbahhpzpofoi", model.tags().get("jwpfilkm")); + Assertions.assertEquals("bpmzzn", model.properties().toolConnectionName()); + Assertions.assertEquals("yaqitmhheioqaqhv", + model.properties().accountScope().labelValues().get("eufuqyrxpdlcgql")); + Assertions.assertEquals("nxzhcze", model.properties().projectScopes().get(0).project()); + Assertions.assertEquals("xzbujrtrhqvwr", model.properties().projectScopes().get(0).labelValues().get("vk")); + Assertions.assertEquals("jmonfdgn", model.tags().get("n")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesAccountScopeTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesAccountScopeTests.java index 29faf2643dac..d361e1908546 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesAccountScopeTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesAccountScopeTests.java @@ -13,19 +13,18 @@ public final class RaiToolLabelPropertiesAccountScopeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RaiToolLabelPropertiesAccountScope model = BinaryData.fromString( - "{\"labelValues\":{\"wrtmjfjmy\":\"zonwpngajinnixj\",\"nlusfnrd\":\"cxlzhcoxovnekh\",\"tjvidt\":\"jxtxrdc\",\"uwkasiz\":\"gepuslvyjtc\"}}") + RaiToolLabelPropertiesAccountScope model = BinaryData + .fromString("{\"labelValues\":{\"fuojrngif\":\"aubrjtloq\",\"dfqwmkyoq\":\"rzpasccbiuimzdly\"}}") .toObject(RaiToolLabelPropertiesAccountScope.class); - Assertions.assertEquals("zonwpngajinnixj", model.labelValues().get("wrtmjfjmy")); + Assertions.assertEquals("aubrjtloq", model.labelValues().get("fuojrngif")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiToolLabelPropertiesAccountScope model - = new RaiToolLabelPropertiesAccountScope().withLabelValues(mapOf("wrtmjfjmy", "zonwpngajinnixj", "nlusfnrd", - "cxlzhcoxovnekh", "tjvidt", "jxtxrdc", "uwkasiz", "gepuslvyjtc")); + RaiToolLabelPropertiesAccountScope model = new RaiToolLabelPropertiesAccountScope() + .withLabelValues(mapOf("fuojrngif", "aubrjtloq", "dfqwmkyoq", "rzpasccbiuimzdly")); model = BinaryData.fromObject(model).toObject(RaiToolLabelPropertiesAccountScope.class); - Assertions.assertEquals("zonwpngajinnixj", model.labelValues().get("wrtmjfjmy")); + Assertions.assertEquals("aubrjtloq", model.labelValues().get("fuojrngif")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesProjectScopesItemTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesProjectScopesItemTests.java index 810b51316e20..1d9ee3241066 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesProjectScopesItemTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesProjectScopesItemTests.java @@ -13,22 +13,21 @@ public final class RaiToolLabelPropertiesProjectScopesItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RaiToolLabelPropertiesProjectScopesItem model = BinaryData.fromString( - "{\"project\":\"esfuught\",\"labelValues\":{\"ic\":\"fecjxeygtuhx\",\"usxjbaqehg\":\"uewmrswnjlxuzrhw\",\"tu\":\"dohzjq\",\"gebx\":\"o\"}}") - .toObject(RaiToolLabelPropertiesProjectScopesItem.class); - Assertions.assertEquals("esfuught", model.project()); - Assertions.assertEquals("fecjxeygtuhx", model.labelValues().get("ic")); + RaiToolLabelPropertiesProjectScopesItem model + = BinaryData.fromString("{\"project\":\"fdvruz\",\"labelValues\":{\"otngfdgu\":\"zojhpctfnmd\"}}") + .toObject(RaiToolLabelPropertiesProjectScopesItem.class); + Assertions.assertEquals("fdvruz", model.project()); + Assertions.assertEquals("zojhpctfnmd", model.labelValues().get("otngfdgu")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RaiToolLabelPropertiesProjectScopesItem model - = new RaiToolLabelPropertiesProjectScopesItem().withProject("esfuught") - .withLabelValues( - mapOf("ic", "fecjxeygtuhx", "usxjbaqehg", "uewmrswnjlxuzrhw", "tu", "dohzjq", "gebx", "o")); + = new RaiToolLabelPropertiesProjectScopesItem().withProject("fdvruz") + .withLabelValues(mapOf("otngfdgu", "zojhpctfnmd")); model = BinaryData.fromObject(model).toObject(RaiToolLabelPropertiesProjectScopesItem.class); - Assertions.assertEquals("esfuught", model.project()); - Assertions.assertEquals("fecjxeygtuhx", model.labelValues().get("ic")); + Assertions.assertEquals("fdvruz", model.project()); + Assertions.assertEquals("zojhpctfnmd", model.labelValues().get("otngfdgu")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesTests.java index ca1561088f24..ddc998418691 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelPropertiesTests.java @@ -17,27 +17,32 @@ public final class RaiToolLabelPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiToolLabelProperties model = BinaryData.fromString( - "{\"toolConnectionName\":\"ycxhxzgaztta\",\"accountScope\":{\"labelValues\":{\"sepdfgk\":\"vmfqhppubo\",\"tobkauxofshfph\":\"tdherngbtcjuahok\",\"whslwkoj\":\"pnulaiywzej\"}},\"projectScopes\":[{\"project\":\"ndnpdwrpqafgfug\",\"labelValues\":{\"hyet\":\"n\",\"rjvzuyt\":\"fypococtfjgti\",\"bauiropi\":\"rmlmuowo\"}}]}") + "{\"toolConnectionName\":\"vacqpbtuodxesz\",\"accountScope\":{\"labelValues\":{\"wumuaslzk\":\"l\",\"mdr\":\"rrwoycqucwyhahn\"}},\"projectScopes\":[{\"project\":\"uh\",\"labelValues\":{\"lwexxwl\":\"vfuuru\",\"rzpgep\":\"lniexz\",\"chzyvlixqnrk\":\"tybbwwpgda\",\"uxswqrntvl\":\"xkjibnxmy\"}},{\"project\":\"ijpstte\",\"labelValues\":{\"hruncuwmq\":\"qqpwcyyuf\"}},{\"project\":\"pkcdqzhlct\",\"labelValues\":{\"jjrcgegydc\":\"unqndyfpchrqb\",\"olihrra\":\"boxjumvq\"}}]}") .toObject(RaiToolLabelProperties.class); - Assertions.assertEquals("ycxhxzgaztta", model.toolConnectionName()); - Assertions.assertEquals("vmfqhppubo", model.accountScope().labelValues().get("sepdfgk")); - Assertions.assertEquals("ndnpdwrpqafgfug", model.projectScopes().get(0).project()); - Assertions.assertEquals("n", model.projectScopes().get(0).labelValues().get("hyet")); + Assertions.assertEquals("vacqpbtuodxesz", model.toolConnectionName()); + Assertions.assertEquals("l", model.accountScope().labelValues().get("wumuaslzk")); + Assertions.assertEquals("uh", model.projectScopes().get(0).project()); + Assertions.assertEquals("vfuuru", model.projectScopes().get(0).labelValues().get("lwexxwl")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiToolLabelProperties model = new RaiToolLabelProperties().withToolConnectionName("ycxhxzgaztta") - .withAccountScope(new RaiToolLabelPropertiesAccountScope().withLabelValues( - mapOf("sepdfgk", "vmfqhppubo", "tobkauxofshfph", "tdherngbtcjuahok", "whslwkoj", "pnulaiywzej"))) - .withProjectScopes( - Arrays.asList(new RaiToolLabelPropertiesProjectScopesItem().withProject("ndnpdwrpqafgfug") - .withLabelValues(mapOf("hyet", "n", "rjvzuyt", "fypococtfjgti", "bauiropi", "rmlmuowo")))); + RaiToolLabelProperties model = new RaiToolLabelProperties().withToolConnectionName("vacqpbtuodxesz") + .withAccountScope(new RaiToolLabelPropertiesAccountScope() + .withLabelValues(mapOf("wumuaslzk", "l", "mdr", "rrwoycqucwyhahn"))) + .withProjectScopes(Arrays.asList( + new RaiToolLabelPropertiesProjectScopesItem().withProject("uh") + .withLabelValues(mapOf("lwexxwl", "vfuuru", "rzpgep", "lniexz", "chzyvlixqnrk", "tybbwwpgda", + "uxswqrntvl", "xkjibnxmy")), + new RaiToolLabelPropertiesProjectScopesItem().withProject("ijpstte") + .withLabelValues(mapOf("hruncuwmq", "qqpwcyyuf")), + new RaiToolLabelPropertiesProjectScopesItem().withProject("pkcdqzhlct") + .withLabelValues(mapOf("jjrcgegydc", "unqndyfpchrqb", "olihrra", "boxjumvq")))); model = BinaryData.fromObject(model).toObject(RaiToolLabelProperties.class); - Assertions.assertEquals("ycxhxzgaztta", model.toolConnectionName()); - Assertions.assertEquals("vmfqhppubo", model.accountScope().labelValues().get("sepdfgk")); - Assertions.assertEquals("ndnpdwrpqafgfug", model.projectScopes().get(0).project()); - Assertions.assertEquals("n", model.projectScopes().get(0).labelValues().get("hyet")); + Assertions.assertEquals("vacqpbtuodxesz", model.toolConnectionName()); + Assertions.assertEquals("l", model.accountScope().labelValues().get("wumuaslzk")); + Assertions.assertEquals("uh", model.projectScopes().get(0).project()); + Assertions.assertEquals("vfuuru", model.projectScopes().get(0).labelValues().get("lwexxwl")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelResultTests.java index f23756b95938..44342b07df60 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelResultTests.java @@ -12,15 +12,15 @@ public final class RaiToolLabelResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiToolLabelResult model = BinaryData.fromString( - "{\"nextLink\":\"nwfepbnwg\",\"value\":[{\"properties\":{\"toolConnectionName\":\"gcgbjb\",\"accountScope\":{\"labelValues\":{\"lqbctqhamzjrw\":\"gtdysnaqu\"}},\"projectScopes\":[{\"project\":\"zeqyjleziun\",\"labelValues\":{\"mlbnseq\":\"dfzantkwcegy\",\"m\":\"cjjvpilguooqja\",\"hrtdtpdelq\":\"itgueiookjbs\"}},{\"project\":\"cslmotoebnfxo\",\"labelValues\":{\"ab\":\"cjkgdirazftxej\",\"c\":\"dujtmvcope\"}},{\"project\":\"jurbuhhlkyqltqsr\",\"labelValues\":{\"tsysi\":\"tuwkffdj\",\"lxnfuijtkbusqogs\":\"fvcl\"}},{\"project\":\"ikayiansharuj\",\"labelValues\":{\"yjqtt\":\"iqxf\"}}]},\"etag\":\"kpqhjpenuygbq\",\"tags\":{\"f\":\"ekewvnqvcdlguauc\",\"un\":\"jwnlax\",\"gx\":\"qikczvvita\"},\"id\":\"csserxht\",\"name\":\"soxhlwntsjgqr\",\"type\":\"xypruuuy\"}]}") + "{\"nextLink\":\"yzihgrkyuizabsn\",\"value\":[{\"properties\":{\"toolConnectionName\":\"hojeevy\",\"accountScope\":{\"labelValues\":{\"bgomfgbegl\":\"gzfc\",\"etnluankrrfx\":\"gleohi\"}},\"projectScopes\":[{\"project\":\"btijvacvbm\",\"labelValues\":{\"nw\":\"bqqxlaj\"}},{\"project\":\"acevehjkuyx\",\"labelValues\":{\"tfaeyl\":\"fgaoq\",\"gv\":\"nm\"}},{\"project\":\"irpghriypoqeyh\",\"labelValues\":{\"kprlpyznuc\":\"h\",\"fuxtyasiibmiybnn\":\"qdsmexiit\",\"hnmgixhcm\":\"stgnl\"}},{\"project\":\"vmqfoud\",\"labelValues\":{\"ndm\":\"hcgyyprotwyp\"}}]},\"etag\":\"hu\",\"tags\":{\"or\":\"jkavl\",\"jltfvnzcyjtotpv\":\"mftpmdtz\",\"qwthmky\":\"pvpbdbzqgqqiheds\",\"gqcwdhohsdtmc\":\"bcysih\"},\"id\":\"sufco\",\"name\":\"dxbzlmcmuap\",\"type\":\"vhdbevwqqxey\"},{\"properties\":{\"toolConnectionName\":\"onqzinkfkbgbzbow\",\"accountScope\":{\"labelValues\":{\"ygvkzqkjj\":\"clj\"}},\"projectScopes\":[{\"project\":\"bzefezr\",\"labelValues\":{\"q\":\"czurtlei\",\"zvd\":\"bkwvzg\",\"noda\":\"bzdixzmq\"}},{\"project\":\"opqhewjptmc\",\"labelValues\":{\"dlat\":\"bostzel\",\"hrbbpneqvcwwyy\":\"tmzlbiojlv\"}},{\"project\":\"r\",\"labelValues\":{\"prsnmokayzejn\":\"chpp\",\"pcpil\":\"lbkpb\"}},{\"project\":\"hahzvechndbnwi\",\"labelValues\":{\"ubwefqs\":\"olewjwi\"}}]},\"etag\":\"paq\",\"tags\":{\"fxapjwogqqnobpu\":\"rrqwexjk\"},\"id\":\"dabtqwp\",\"name\":\"yawbzasqbu\",\"type\":\"ljgkyex\"}]}") .toObject(RaiToolLabelResult.class); - Assertions.assertEquals("nwfepbnwg", model.nextLink()); - Assertions.assertEquals("gcgbjb", model.value().get(0).properties().toolConnectionName()); - Assertions.assertEquals("gtdysnaqu", - model.value().get(0).properties().accountScope().labelValues().get("lqbctqhamzjrw")); - Assertions.assertEquals("zeqyjleziun", model.value().get(0).properties().projectScopes().get(0).project()); - Assertions.assertEquals("dfzantkwcegy", - model.value().get(0).properties().projectScopes().get(0).labelValues().get("mlbnseq")); - Assertions.assertEquals("ekewvnqvcdlguauc", model.value().get(0).tags().get("f")); + Assertions.assertEquals("yzihgrkyuizabsn", model.nextLink()); + Assertions.assertEquals("hojeevy", model.value().get(0).properties().toolConnectionName()); + Assertions.assertEquals("gzfc", + model.value().get(0).properties().accountScope().labelValues().get("bgomfgbegl")); + Assertions.assertEquals("btijvacvbm", model.value().get(0).properties().projectScopes().get(0).project()); + Assertions.assertEquals("bqqxlaj", + model.value().get(0).properties().projectScopes().get(0).labelValues().get("nw")); + Assertions.assertEquals("jkavl", model.value().get(0).tags().get("or")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsCreateOrUpdateWithResponseMockTests.java index 35f65fd2f295..1eb230411775 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsCreateOrUpdateWithResponseMockTests.java @@ -27,7 +27,7 @@ public final class RaiToolLabelsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"toolConnectionName\":\"spwweifdyfa\",\"accountScope\":{\"labelValues\":{\"sujtgg\":\"guwnrdpuzlai\"}},\"projectScopes\":[{\"project\":\"zam\",\"labelValues\":{\"liqwzutiyelrnhh\":\"xejpd\",\"hqsznsyov\":\"t\",\"nf\":\"mqcudptoqw\",\"kmxwawfu\":\"kjthl\"}},{\"project\":\"kngejjxumowy\",\"labelValues\":{\"zmxuktdrsjtmnk\":\"mo\",\"tia\":\"jouwfzcfdt\",\"uhcfhepisq\":\"tyr\"}},{\"project\":\"cmlroiommemso\",\"labelValues\":{\"abebckc\":\"blcyeqdobobaq\",\"pjcxbjgfm\":\"srsixwn\",\"dfhmlx\":\"qyyfrridzfpsfyak\",\"ekn\":\"q\"}}]},\"etag\":\"kqafzvptriysjrgt\",\"tags\":{\"dwedg\":\"puqpsrcekdvvo\",\"clvbwatza\":\"w\"},\"id\":\"jbjn\",\"name\":\"oarsrdr\",\"type\":\"i\"}"; + = "{\"properties\":{\"toolConnectionName\":\"isnomwnwnghoj\",\"accountScope\":{\"labelValues\":{\"micjixxfsf\":\"y\"}},\"projectScopes\":[{\"project\":\"tnuguefxxij\",\"labelValues\":{\"lmcnwepfgsv\":\"bdveywetkrhl\",\"qdljnpe\":\"bv\"}},{\"project\":\"l\",\"labelValues\":{\"jzvdovbrblerlp\":\"rdetawevxehuekdx\"}},{\"project\":\"daqccddcbnygd\",\"labelValues\":{\"yykdig\":\"cxwbp\"}},{\"project\":\"zlrz\",\"labelValues\":{\"id\":\"asd\",\"arhqt\":\"jqmvytgkiq\"}}]},\"etag\":\"caz\",\"tags\":{\"tsmpchgg\":\"zdzffzjw\"},\"id\":\"elgfyatigfgfrr\",\"name\":\"dknczgorywn\",\"type\":\"ojtvmdev\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,26 +37,30 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiToolLabel response = manager.raiToolLabels() - .define("ojtu") - .withExistingAccount("gvnrgalvwrhr", "ibrbknuubxc") - .withTags(mapOf("enfdvdoea", "hrm", "yfezfsmyljdzy", "ywusrjzhdtr", "nmwtqiljkn", "r", "s", "kyn")) - .withProperties(new RaiToolLabelProperties().withToolConnectionName("d") - .withAccountScope(new RaiToolLabelPropertiesAccountScope().withLabelValues( - mapOf("owlxmwe", "eevffifujgt", "hrtczwjcujyz", "cbybp", "i", "vyrjqdjlgk", "n", "xxeuwiiirc"))) + .define("yt") + .withExistingAccount("eupcknecexkgrv", "psjdmng") + .withTags( + mapOf("spboxhifp", "ywpj", "xwwvcmmpeg", "skpeswyhhmifjua", "qvcml", "y", "m", "exbzbqufpnezsjza")) + .withProperties(new RaiToolLabelProperties().withToolConnectionName("dzfyxcnwawoxcg") + .withAccountScope(new RaiToolLabelPropertiesAccountScope() + .withLabelValues(mapOf("fjxdwdrp", "qfbifo", "bwotfcuuugtji", "zqjkrf"))) .withProjectScopes(Arrays.asList( - new RaiToolLabelPropertiesProjectScopesItem().withProject("dviw") - .withLabelValues(mapOf("yexb", "hktxagfujdbqj", "tpvev", "xgxqqqasfeooq", "klqlii", "arp", - "nofgijydgsebju", "eanuwg")), - new RaiToolLabelPropertiesProjectScopesItem().withProject("mtevaebzm") - .withLabelValues(mapOf("gxbxxgj", "whrjkejvaedogzo"))))) + new RaiToolLabelPropertiesProjectScopesItem().withProject("ayiawohfm") + .withLabelValues(mapOf("jkmqenhaidzrpv", "nzmec")), + new RaiToolLabelPropertiesProjectScopesItem().withProject("gloiovsl") + .withLabelValues(mapOf("suvw", "v", "i", "enbg", "oa", "pkhc")), + new RaiToolLabelPropertiesProjectScopesItem().withProject("xukuicjuftekio") + .withLabelValues(mapOf("ewfhvpxjh", "nd", "vzuaixc", "zubfjzabbwz")), + new RaiToolLabelPropertiesProjectScopesItem().withProject("ckixsps") + .withLabelValues(mapOf("xzerej", "gavkmv", "eitwhlbecgi", "kpzjbyetjxryopt"))))) .create(); - Assertions.assertEquals("spwweifdyfa", response.properties().toolConnectionName()); - Assertions.assertEquals("guwnrdpuzlai", response.properties().accountScope().labelValues().get("sujtgg")); - Assertions.assertEquals("zam", response.properties().projectScopes().get(0).project()); - Assertions.assertEquals("xejpd", - response.properties().projectScopes().get(0).labelValues().get("liqwzutiyelrnhh")); - Assertions.assertEquals("puqpsrcekdvvo", response.tags().get("dwedg")); + Assertions.assertEquals("isnomwnwnghoj", response.properties().toolConnectionName()); + Assertions.assertEquals("y", response.properties().accountScope().labelValues().get("micjixxfsf")); + Assertions.assertEquals("tnuguefxxij", response.properties().projectScopes().get(0).project()); + Assertions.assertEquals("bdveywetkrhl", + response.properties().projectScopes().get(0).labelValues().get("lmcnwepfgsv")); + Assertions.assertEquals("zdzffzjw", response.tags().get("tsmpchgg")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsGetWithResponseMockTests.java index 53abe82eb6fc..97a7f5d4a9d7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class RaiToolLabelsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"toolConnectionName\":\"qzzdckhsq\",\"accountScope\":{\"labelValues\":{\"xmyokohlsfjf\":\"surnowobwx\",\"ahuvkqxqkvadmjh\":\"uqjpzh\",\"maajzd\":\"mud\",\"yqkaaptb\":\"bhsermclyqwwu\"}},\"projectScopes\":[{\"project\":\"kb\",\"labelValues\":{\"bnsshvq\":\"ptwybloccuhplx\"}},{\"project\":\"pszbeuybutcdzj\",\"labelValues\":{\"tqmmijgpqfkwna\":\"tvpeyxdyuxurxr\"}},{\"project\":\"ikczscymqfv\",\"labelValues\":{\"y\":\"wpq\"}}]},\"etag\":\"z\",\"tags\":{\"pe\":\"okez\",\"yxxvwedhagqbbse\":\"knfzqnzbflbqmhb\"},\"id\":\"ayuflmsyz\",\"name\":\"dcrolrze\",\"type\":\"bo\"}"; + = "{\"properties\":{\"toolConnectionName\":\"waadc\",\"accountScope\":{\"labelValues\":{\"undtsew\":\"a\"}},\"projectScopes\":[{\"project\":\"pwhlzyckr\",\"labelValues\":{\"irxxhyrkqako\":\"gjlmsvdor\"}}]},\"etag\":\"jfrepr\",\"tags\":{\"teyrqshi\":\"kin\",\"sp\":\"bcejopylbl\",\"cspimtcvvfxrdy\":\"r\"},\"id\":\"fs\",\"name\":\"xizhqikmgo\",\"type\":\"liqemcdiiisklbo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiToolLabel response = manager.raiToolLabels() - .getWithResponse("sdbfbmdiv", "xzhpjgqzmiaoawea", "fxaubuhruetcnx", com.azure.core.util.Context.NONE) + .getWithResponse("pgarpfctw", "apczdojqyv", "esipiysnjq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qzzdckhsq", response.properties().toolConnectionName()); - Assertions.assertEquals("surnowobwx", response.properties().accountScope().labelValues().get("xmyokohlsfjf")); - Assertions.assertEquals("kb", response.properties().projectScopes().get(0).project()); - Assertions.assertEquals("ptwybloccuhplx", - response.properties().projectScopes().get(0).labelValues().get("bnsshvq")); - Assertions.assertEquals("okez", response.tags().get("pe")); + Assertions.assertEquals("waadc", response.properties().toolConnectionName()); + Assertions.assertEquals("a", response.properties().accountScope().labelValues().get("undtsew")); + Assertions.assertEquals("pwhlzyckr", response.properties().projectScopes().get(0).project()); + Assertions.assertEquals("gjlmsvdor", + response.properties().projectScopes().get(0).labelValues().get("irxxhyrkqako")); + Assertions.assertEquals("kin", response.tags().get("teyrqshi")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsListMockTests.java index 96ec4a0cb5ae..ecb1a7656a6b 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiToolLabelsListMockTests.java @@ -22,7 +22,7 @@ public final class RaiToolLabelsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"toolConnectionName\":\"ywdal\",\"accountScope\":{\"labelValues\":{\"dz\":\"qngca\",\"p\":\"nloou\"}},\"projectScopes\":[{\"project\":\"dahyclxrsidoeb\",\"labelValues\":{\"revimxmaxcj\":\"poiaffjkrtn\",\"wdsoqtbfkvuozbzc\":\"pitygv\",\"urlcydjhtkjs\":\"nqekwankl\"}},{\"project\":\"rwiyndurdonkgobx\",\"labelValues\":{\"drgnmzaofroef\":\"rdolenrswkn\"}}]},\"etag\":\"kievyrej\",\"tags\":{\"ftusdwmnrt\":\"bk\",\"nrovome\":\"vbuc\"},\"id\":\"wsicvwqzoc\",\"name\":\"f\",\"type\":\"hennmsgpywdib\"}]}"; + = "{\"value\":[{\"properties\":{\"toolConnectionName\":\"genj\",\"accountScope\":{\"labelValues\":{\"ujjcxgdqmrlhn\":\"jwkosnyxigf\",\"xyxwjezbfqplo\":\"kwopswnyinxupr\",\"trsvjmnsvujnjkt\":\"uekdcpvu\"}},\"projectScopes\":[{\"project\":\"efcjisepkdbxot\",\"labelValues\":{\"ynlsuqbwzstrk\":\"jampqoclannm\"}},{\"project\":\"gvp\",\"labelValues\":{\"ulwkq\":\"rgjjktfinfhoksmm\",\"okr\":\"cru\"}}]},\"etag\":\"lsgaojbtqpq\",\"tags\":{\"lmcds\":\"ctpzpujz\"},\"id\":\"celuj\",\"name\":\"swlluunxhfwlfxzf\",\"type\":\"u\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.raiToolLabels().list("phzkymu", "wjivtbuszbdjrdfe", com.azure.core.util.Context.NONE); + = manager.raiToolLabels().list("xxupjxv", "rk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ywdal", response.iterator().next().properties().toolConnectionName()); - Assertions.assertEquals("qngca", - response.iterator().next().properties().accountScope().labelValues().get("dz")); - Assertions.assertEquals("dahyclxrsidoeb", + Assertions.assertEquals("genj", response.iterator().next().properties().toolConnectionName()); + Assertions.assertEquals("jwkosnyxigf", + response.iterator().next().properties().accountScope().labelValues().get("ujjcxgdqmrlhn")); + Assertions.assertEquals("efcjisepkdbxot", response.iterator().next().properties().projectScopes().get(0).project()); - Assertions.assertEquals("poiaffjkrtn", - response.iterator().next().properties().projectScopes().get(0).labelValues().get("revimxmaxcj")); - Assertions.assertEquals("bk", response.iterator().next().tags().get("ftusdwmnrt")); + Assertions.assertEquals("jampqoclannm", + response.iterator().next().properties().projectScopes().get(0).labelValues().get("ynlsuqbwzstrk")); + Assertions.assertEquals("ctpzpujz", response.iterator().next().tags().get("lmcds")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicInnerTests.java index af11b84a3bc6..94a1a577b5b4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicInnerTests.java @@ -16,42 +16,41 @@ public final class RaiTopicInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiTopicInner model = BinaryData.fromString( - "{\"properties\":{\"topicId\":\"kqbh\",\"topicName\":\"rqunjq\",\"description\":\"enx\",\"sampleBlobUrl\":\"l\",\"status\":\"akdkifmjnnawtqab\",\"failedReason\":\"uckpggqoweyir\",\"createdAt\":\"2021-10-13T06:42:41Z\",\"lastModifiedAt\":\"2021-03-03T15:45:16Z\"},\"etag\":\"gwflq\",\"tags\":{\"gjsaasiixtm\":\"izruwnpqxpxiwfc\",\"pgratzvzbglbyvi\":\"zjvkviirhgfgrws\",\"hkwfbkgozxwop\":\"tctbrxkjzwrgxffm\",\"yg\":\"bydpizqaclnapxb\"},\"id\":\"gjkn\",\"name\":\"smfcttuxuuyilfl\",\"type\":\"oiquvrehmrnjhvs\"}") + "{\"properties\":{\"topicId\":\"ivbkbxgomfaj\",\"topicName\":\"asqvd\",\"description\":\"y\",\"sampleBlobUrl\":\"uxakjsqzhzbezk\",\"status\":\"msidxasicddyvv\",\"failedReason\":\"kgfmocwahpq\",\"createdAt\":\"2021-09-10T10:22:32Z\",\"lastModifiedAt\":\"2021-07-27T04:50:29Z\"},\"etag\":\"ahhvjhhna\",\"tags\":{\"xvxevblbjednljla\":\"bbjjidjksyxk\",\"smjbnkppxyn\":\"euaulxu\",\"gwklnsr\":\"nlsvxeiz\"},\"id\":\"feycxcktp\",\"name\":\"ymerteeammxq\",\"type\":\"ekkkzd\"}") .toObject(RaiTopicInner.class); - Assertions.assertEquals("kqbh", model.properties().topicId()); - Assertions.assertEquals("rqunjq", model.properties().topicName()); - Assertions.assertEquals("enx", model.properties().description()); - Assertions.assertEquals("l", model.properties().sampleBlobUrl()); - Assertions.assertEquals("akdkifmjnnawtqab", model.properties().status()); - Assertions.assertEquals("uckpggqoweyir", model.properties().failedReason()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T06:42:41Z"), model.properties().createdAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T15:45:16Z"), model.properties().lastModifiedAt()); - Assertions.assertEquals("izruwnpqxpxiwfc", model.tags().get("gjsaasiixtm")); + Assertions.assertEquals("ivbkbxgomfaj", model.properties().topicId()); + Assertions.assertEquals("asqvd", model.properties().topicName()); + Assertions.assertEquals("y", model.properties().description()); + Assertions.assertEquals("uxakjsqzhzbezk", model.properties().sampleBlobUrl()); + Assertions.assertEquals("msidxasicddyvv", model.properties().status()); + Assertions.assertEquals("kgfmocwahpq", model.properties().failedReason()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T10:22:32Z"), model.properties().createdAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-27T04:50:29Z"), model.properties().lastModifiedAt()); + Assertions.assertEquals("bbjjidjksyxk", model.tags().get("xvxevblbjednljla")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RaiTopicInner model = new RaiTopicInner() - .withProperties(new RaiTopicProperties().withTopicId("kqbh") - .withTopicName("rqunjq") - .withDescription("enx") - .withSampleBlobUrl("l") - .withStatus("akdkifmjnnawtqab") - .withFailedReason("uckpggqoweyir") - .withCreatedAt(OffsetDateTime.parse("2021-10-13T06:42:41Z")) - .withLastModifiedAt(OffsetDateTime.parse("2021-03-03T15:45:16Z"))) - .withTags(mapOf("gjsaasiixtm", "izruwnpqxpxiwfc", "pgratzvzbglbyvi", "zjvkviirhgfgrws", "hkwfbkgozxwop", - "tctbrxkjzwrgxffm", "yg", "bydpizqaclnapxb")); + .withProperties(new RaiTopicProperties().withTopicId("ivbkbxgomfaj") + .withTopicName("asqvd") + .withDescription("y") + .withSampleBlobUrl("uxakjsqzhzbezk") + .withStatus("msidxasicddyvv") + .withFailedReason("kgfmocwahpq") + .withCreatedAt(OffsetDateTime.parse("2021-09-10T10:22:32Z")) + .withLastModifiedAt(OffsetDateTime.parse("2021-07-27T04:50:29Z"))) + .withTags(mapOf("xvxevblbjednljla", "bbjjidjksyxk", "smjbnkppxyn", "euaulxu", "gwklnsr", "nlsvxeiz")); model = BinaryData.fromObject(model).toObject(RaiTopicInner.class); - Assertions.assertEquals("kqbh", model.properties().topicId()); - Assertions.assertEquals("rqunjq", model.properties().topicName()); - Assertions.assertEquals("enx", model.properties().description()); - Assertions.assertEquals("l", model.properties().sampleBlobUrl()); - Assertions.assertEquals("akdkifmjnnawtqab", model.properties().status()); - Assertions.assertEquals("uckpggqoweyir", model.properties().failedReason()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T06:42:41Z"), model.properties().createdAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T15:45:16Z"), model.properties().lastModifiedAt()); - Assertions.assertEquals("izruwnpqxpxiwfc", model.tags().get("gjsaasiixtm")); + Assertions.assertEquals("ivbkbxgomfaj", model.properties().topicId()); + Assertions.assertEquals("asqvd", model.properties().topicName()); + Assertions.assertEquals("y", model.properties().description()); + Assertions.assertEquals("uxakjsqzhzbezk", model.properties().sampleBlobUrl()); + Assertions.assertEquals("msidxasicddyvv", model.properties().status()); + Assertions.assertEquals("kgfmocwahpq", model.properties().failedReason()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T10:22:32Z"), model.properties().createdAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-27T04:50:29Z"), model.properties().lastModifiedAt()); + Assertions.assertEquals("bbjjidjksyxk", model.tags().get("xvxevblbjednljla")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicPropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicPropertiesTests.java index 1933b66c075d..e75492c66f83 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicPropertiesTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicPropertiesTests.java @@ -13,36 +13,36 @@ public final class RaiTopicPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiTopicProperties model = BinaryData.fromString( - "{\"topicId\":\"ztczytq\",\"topicName\":\"w\",\"description\":\"uunfprnjletlxsm\",\"sampleBlobUrl\":\"ddoui\",\"status\":\"mowaziynknlqwzdv\",\"failedReason\":\"w\",\"createdAt\":\"2021-07-20T17:56:39Z\",\"lastModifiedAt\":\"2021-04-10T01:35:04Z\"}") + "{\"topicId\":\"tkgdojbmxva\",\"topicName\":\"efdeesve\",\"description\":\"ijpxtx\",\"sampleBlobUrl\":\"wprtu\",\"status\":\"sawddjibabxvi\",\"failedReason\":\"tvtzeexavoxtfg\",\"createdAt\":\"2021-10-13T21:26:08Z\",\"lastModifiedAt\":\"2021-07-20T08:15:13Z\"}") .toObject(RaiTopicProperties.class); - Assertions.assertEquals("ztczytq", model.topicId()); - Assertions.assertEquals("w", model.topicName()); - Assertions.assertEquals("uunfprnjletlxsm", model.description()); - Assertions.assertEquals("ddoui", model.sampleBlobUrl()); - Assertions.assertEquals("mowaziynknlqwzdv", model.status()); - Assertions.assertEquals("w", model.failedReason()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T17:56:39Z"), model.createdAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T01:35:04Z"), model.lastModifiedAt()); + Assertions.assertEquals("tkgdojbmxva", model.topicId()); + Assertions.assertEquals("efdeesve", model.topicName()); + Assertions.assertEquals("ijpxtx", model.description()); + Assertions.assertEquals("wprtu", model.sampleBlobUrl()); + Assertions.assertEquals("sawddjibabxvi", model.status()); + Assertions.assertEquals("tvtzeexavoxtfg", model.failedReason()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T21:26:08Z"), model.createdAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T08:15:13Z"), model.lastModifiedAt()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RaiTopicProperties model = new RaiTopicProperties().withTopicId("ztczytq") - .withTopicName("w") - .withDescription("uunfprnjletlxsm") - .withSampleBlobUrl("ddoui") - .withStatus("mowaziynknlqwzdv") - .withFailedReason("w") - .withCreatedAt(OffsetDateTime.parse("2021-07-20T17:56:39Z")) - .withLastModifiedAt(OffsetDateTime.parse("2021-04-10T01:35:04Z")); + RaiTopicProperties model = new RaiTopicProperties().withTopicId("tkgdojbmxva") + .withTopicName("efdeesve") + .withDescription("ijpxtx") + .withSampleBlobUrl("wprtu") + .withStatus("sawddjibabxvi") + .withFailedReason("tvtzeexavoxtfg") + .withCreatedAt(OffsetDateTime.parse("2021-10-13T21:26:08Z")) + .withLastModifiedAt(OffsetDateTime.parse("2021-07-20T08:15:13Z")); model = BinaryData.fromObject(model).toObject(RaiTopicProperties.class); - Assertions.assertEquals("ztczytq", model.topicId()); - Assertions.assertEquals("w", model.topicName()); - Assertions.assertEquals("uunfprnjletlxsm", model.description()); - Assertions.assertEquals("ddoui", model.sampleBlobUrl()); - Assertions.assertEquals("mowaziynknlqwzdv", model.status()); - Assertions.assertEquals("w", model.failedReason()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T17:56:39Z"), model.createdAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T01:35:04Z"), model.lastModifiedAt()); + Assertions.assertEquals("tkgdojbmxva", model.topicId()); + Assertions.assertEquals("efdeesve", model.topicName()); + Assertions.assertEquals("ijpxtx", model.description()); + Assertions.assertEquals("wprtu", model.sampleBlobUrl()); + Assertions.assertEquals("sawddjibabxvi", model.status()); + Assertions.assertEquals("tvtzeexavoxtfg", model.failedReason()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T21:26:08Z"), model.createdAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T08:15:13Z"), model.lastModifiedAt()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicResultTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicResultTests.java index 718b53ad76d7..92a1486cd996 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicResultTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicResultTests.java @@ -13,19 +13,19 @@ public final class RaiTopicResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RaiTopicResult model = BinaryData.fromString( - "{\"nextLink\":\"tmaaj\",\"value\":[{\"properties\":{\"topicId\":\"ylr\",\"topicName\":\"m\",\"description\":\"g\",\"sampleBlobUrl\":\"mzyospspshck\",\"status\":\"yjpmspbpssdfppyo\",\"failedReason\":\"ieyujtvc\",\"createdAt\":\"2021-06-10T09:27Z\",\"lastModifiedAt\":\"2021-03-17T21:21:35Z\"},\"etag\":\"rxmunjdxvgln\",\"tags\":{\"hpzvuqdflvoniyp\":\"lxpaglqivbgkcv\"},\"id\":\"ubcpzgpxti\",\"name\":\"hjknidibg\",\"type\":\"jxgpnrhgovfg\"}]}") + "{\"nextLink\":\"qbw\",\"value\":[{\"properties\":{\"topicId\":\"gsfjac\",\"topicName\":\"lhhxudbxvodhtnsi\",\"description\":\"dhzmmesckdlp\",\"sampleBlobUrl\":\"zrcxfailcfxwmdbo\",\"status\":\"fgsftufqob\",\"failedReason\":\"lnacgcc\",\"createdAt\":\"2021-02-22T05:42:06Z\",\"lastModifiedAt\":\"2021-08-14T20:34:23Z\"},\"etag\":\"izvy\",\"tags\":{\"aaeranokqgukk\":\"zvulj\",\"oylaxxul\":\"qnvb\"},\"id\":\"isdos\",\"name\":\"jbjsvgjrwh\",\"type\":\"yvycytdclxgcckn\"},{\"properties\":{\"topicId\":\"mbtmvpdvjdhttzae\",\"topicName\":\"dxihc\",\"description\":\"phkmcrjdqnsdfz\",\"sampleBlobUrl\":\"gtgkylkdghr\",\"status\":\"uutlwxezwzhok\",\"failedReason\":\"wnhhtqlgehgppip\",\"createdAt\":\"2021-04-06T03:44:21Z\",\"lastModifiedAt\":\"2021-01-02T20:54:57Z\"},\"etag\":\"oajvgcxtxjcs\",\"tags\":{\"resmkssjhoiftxfk\":\"fidltug\",\"tillucbiqtg\":\"wegprh\",\"hm\":\"q\"},\"id\":\"sldrizetpwbral\",\"name\":\"libph\",\"type\":\"qzmiza\"},{\"properties\":{\"topicId\":\"ankjpdnjzh\",\"topicName\":\"oylhjlmuoyxprimr\",\"description\":\"pteecjme\",\"sampleBlobUrl\":\"ls\",\"status\":\"asylwx\",\"failedReason\":\"aumweoohguufu\",\"createdAt\":\"2021-04-09T11:15:41Z\",\"lastModifiedAt\":\"2021-04-18T14:21:46Z\"},\"etag\":\"thwtzol\",\"tags\":{\"lxveabfqx\":\"mwmdxmebwjscjpa\",\"ijddtvqc\":\"mwmqtibx\",\"jaeukmrsieekpn\":\"tad\"},\"id\":\"aapm\",\"name\":\"dqmeqwigpibudq\",\"type\":\"yxeb\"}]}") .toObject(RaiTopicResult.class); - Assertions.assertEquals("tmaaj", model.nextLink()); - Assertions.assertEquals("ylr", model.value().get(0).properties().topicId()); - Assertions.assertEquals("m", model.value().get(0).properties().topicName()); - Assertions.assertEquals("g", model.value().get(0).properties().description()); - Assertions.assertEquals("mzyospspshck", model.value().get(0).properties().sampleBlobUrl()); - Assertions.assertEquals("yjpmspbpssdfppyo", model.value().get(0).properties().status()); - Assertions.assertEquals("ieyujtvc", model.value().get(0).properties().failedReason()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-10T09:27Z"), + Assertions.assertEquals("qbw", model.nextLink()); + Assertions.assertEquals("gsfjac", model.value().get(0).properties().topicId()); + Assertions.assertEquals("lhhxudbxvodhtnsi", model.value().get(0).properties().topicName()); + Assertions.assertEquals("dhzmmesckdlp", model.value().get(0).properties().description()); + Assertions.assertEquals("zrcxfailcfxwmdbo", model.value().get(0).properties().sampleBlobUrl()); + Assertions.assertEquals("fgsftufqob", model.value().get(0).properties().status()); + Assertions.assertEquals("lnacgcc", model.value().get(0).properties().failedReason()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T05:42:06Z"), model.value().get(0).properties().createdAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T21:21:35Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-08-14T20:34:23Z"), model.value().get(0).properties().lastModifiedAt()); - Assertions.assertEquals("lxpaglqivbgkcv", model.value().get(0).tags().get("hpzvuqdflvoniyp")); + Assertions.assertEquals("zvulj", model.value().get(0).tags().get("aaeranokqgukk")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsCreateOrUpdateWithResponseMockTests.java index eb237f011016..8c5a5e7fc20c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsCreateOrUpdateWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class RaiTopicsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"topicId\":\"eargvfvkhbjh\",\"topicName\":\"pjxsd\",\"description\":\"eignybffqc\",\"sampleBlobUrl\":\"ynepkt\",\"status\":\"wgvco\",\"failedReason\":\"sebjijf\",\"createdAt\":\"2021-03-20T15:08:59Z\",\"lastModifiedAt\":\"2021-07-23T08:16:15Z\"},\"etag\":\"ouoxfalo\",\"tags\":{\"eunbydlg\":\"kkyporsyn\"},\"id\":\"phwuubwtsayn\",\"name\":\"tvjfqreeoxvqj\",\"type\":\"rnbli\"}"; + = "{\"properties\":{\"topicId\":\"niuarlcjiwgsxfai\",\"topicName\":\"wd\",\"description\":\"jjgnfgr\",\"sampleBlobUrl\":\"barc\",\"status\":\"aefzqsy\",\"failedReason\":\"w\",\"createdAt\":\"2020-12-29T03:07:25Z\",\"lastModifiedAt\":\"2021-08-20T22:54:08Z\"},\"etag\":\"esmfucrtfodq\",\"tags\":{\"ezvhj\":\"uzmzivrtrfzh\",\"swtvd\":\"dxdyyrudma\",\"qjchivd\":\"xbqssgfenffdxbvw\",\"xndmuvar\":\"ija\"},\"id\":\"mzjotprrmuh\",\"name\":\"uhtuz\",\"type\":\"xiwy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,28 +34,28 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiTopic response = manager.raiTopics() - .define("ormh") - .withExistingAccount("uyvxpqwlkqdgwbzt", "thldwvoglffjdhgs") - .withTags(mapOf("yhylqyafew", "zjuddndihupn")) - .withProperties(new RaiTopicProperties().withTopicId("fcvxkylhc") - .withTopicName("dylmnqun") - .withDescription("g") - .withSampleBlobUrl("tmsgkwedwl") - .withStatus("zhgbgbhudh") - .withFailedReason("jimvrrq") - .withCreatedAt(OffsetDateTime.parse("2021-02-18T10:13:32Z")) - .withLastModifiedAt(OffsetDateTime.parse("2021-08-11T15:44:31Z"))) + .define("uninttlnrjdszd") + .withExistingAccount("qflvtlrvbst", "huy") + .withTags(mapOf("lhzwh", "ck")) + .withProperties(new RaiTopicProperties().withTopicId("iciqppo") + .withTopicName("gpnewuhwfwjnox") + .withDescription("xtfnress") + .withSampleBlobUrl("pg") + .withStatus("ncjmgvsnvbtq") + .withFailedReason("fmjymjnh") + .withCreatedAt(OffsetDateTime.parse("2021-08-20T19:49:17Z")) + .withLastModifiedAt(OffsetDateTime.parse("2021-04-04T16:04:52Z"))) .create(); - Assertions.assertEquals("eargvfvkhbjh", response.properties().topicId()); - Assertions.assertEquals("pjxsd", response.properties().topicName()); - Assertions.assertEquals("eignybffqc", response.properties().description()); - Assertions.assertEquals("ynepkt", response.properties().sampleBlobUrl()); - Assertions.assertEquals("wgvco", response.properties().status()); - Assertions.assertEquals("sebjijf", response.properties().failedReason()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T15:08:59Z"), response.properties().createdAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T08:16:15Z"), response.properties().lastModifiedAt()); - Assertions.assertEquals("kkyporsyn", response.tags().get("eunbydlg")); + Assertions.assertEquals("niuarlcjiwgsxfai", response.properties().topicId()); + Assertions.assertEquals("wd", response.properties().topicName()); + Assertions.assertEquals("jjgnfgr", response.properties().description()); + Assertions.assertEquals("barc", response.properties().sampleBlobUrl()); + Assertions.assertEquals("aefzqsy", response.properties().status()); + Assertions.assertEquals("w", response.properties().failedReason()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T03:07:25Z"), response.properties().createdAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T22:54:08Z"), response.properties().lastModifiedAt()); + Assertions.assertEquals("uzmzivrtrfzh", response.tags().get("ezvhj")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsGetWithResponseMockTests.java index 63d75659c18d..f3c49d1ebe2c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class RaiTopicsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"topicId\":\"c\",\"topicName\":\"rvlvvjmx\",\"description\":\"xxam\",\"sampleBlobUrl\":\"cjrzvlcivqx\",\"status\":\"mklphxwww\",\"failedReason\":\"jkbgnfbr\",\"createdAt\":\"2021-06-04T05:28:15Z\",\"lastModifiedAt\":\"2021-11-08T05:00:33Z\"},\"etag\":\"nhaevlahxc\",\"tags\":{\"naaxqjfdajr\":\"ywuahwcorewc\",\"mggewdqbxexfy\":\"gim\",\"lwsfxayzqbyeywpm\":\"nvussuqk\",\"ikffydztk\":\"hnrt\"},\"id\":\"fbgynzfwv\",\"name\":\"dteqjmyqxuhg\",\"type\":\"axnyprijyoxxjxbs\"}"; + = "{\"properties\":{\"topicId\":\"jsiuepmax\",\"topicName\":\"zlpqmpftxefvulb\",\"description\":\"rtux\",\"sampleBlobUrl\":\"rhfcaeooifqdyw\",\"status\":\"lobha\",\"failedReason\":\"momfecorkfroc\",\"createdAt\":\"2021-04-22T09:59:31Z\",\"lastModifiedAt\":\"2021-06-30T16:41:45Z\"},\"etag\":\"j\",\"tags\":{\"qfygpny\":\"zbjesylslur\"},\"id\":\"dzuqscag\",\"name\":\"yvouprsytq\",\"type\":\"ss\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,17 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RaiTopic response = manager.raiTopics() - .getWithResponse("lmgjzrycwpbgum", "hmxpucknsastl", "smg", com.azure.core.util.Context.NONE) + .getWithResponse("yresgzsdtmwbyorj", "lb", "hychakvyrfbqvum", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("c", response.properties().topicId()); - Assertions.assertEquals("rvlvvjmx", response.properties().topicName()); - Assertions.assertEquals("xxam", response.properties().description()); - Assertions.assertEquals("cjrzvlcivqx", response.properties().sampleBlobUrl()); - Assertions.assertEquals("mklphxwww", response.properties().status()); - Assertions.assertEquals("jkbgnfbr", response.properties().failedReason()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-04T05:28:15Z"), response.properties().createdAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T05:00:33Z"), response.properties().lastModifiedAt()); - Assertions.assertEquals("ywuahwcorewc", response.tags().get("naaxqjfdajr")); + Assertions.assertEquals("jsiuepmax", response.properties().topicId()); + Assertions.assertEquals("zlpqmpftxefvulb", response.properties().topicName()); + Assertions.assertEquals("rtux", response.properties().description()); + Assertions.assertEquals("rhfcaeooifqdyw", response.properties().sampleBlobUrl()); + Assertions.assertEquals("lobha", response.properties().status()); + Assertions.assertEquals("momfecorkfroc", response.properties().failedReason()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T09:59:31Z"), response.properties().createdAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-30T16:41:45Z"), response.properties().lastModifiedAt()); + Assertions.assertEquals("zbjesylslur", response.tags().get("qfygpny")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsListMockTests.java index 6d67d9606684..f32187020419 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/RaiTopicsListMockTests.java @@ -22,7 +22,7 @@ public final class RaiTopicsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"topicId\":\"uyapvibzicyvich\",\"topicName\":\"ptkhjxnrkbnv\",\"description\":\"cklzhznfgvlxy\",\"sampleBlobUrl\":\"nctigpksywi\",\"status\":\"lktgkdp\",\"failedReason\":\"qj\",\"createdAt\":\"2021-05-04T14:05:05Z\",\"lastModifiedAt\":\"2021-04-25T03:01:48Z\"},\"etag\":\"fuhbdwbvjsbg\",\"tags\":{\"ltcwsexheeocnqo\":\"moaxcaytnpkvbp\",\"yfhxohzbzhhav\":\"bvepvlryszfhd\",\"ehoui\":\"fuxnvkdslcofuvtf\"},\"id\":\"klhjfddxqfu\",\"name\":\"subzsspmj\",\"type\":\"ailf\"}]}"; + = "{\"value\":[{\"properties\":{\"topicId\":\"yqvpbfjpo\",\"topicName\":\"ucfzluczdquu\",\"description\":\"ormvh\",\"sampleBlobUrl\":\"ielbprnq\",\"status\":\"ywzcqyggmnw\",\"failedReason\":\"hbngqiwyej\",\"createdAt\":\"2021-06-06T06:48:56Z\",\"lastModifiedAt\":\"2021-03-01T05:29:37Z\"},\"etag\":\"pnrehkunsb\",\"tags\":{\"geattbzkg\":\"hlwtpkv\",\"nwqsttewu\":\"z\"},\"id\":\"ysjeufjx\",\"name\":\"lpditfnonpi\",\"type\":\"uxlvrhprrvbwonl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,18 +32,18 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.raiTopics().list("wrrlccklyf", "jmspauemqomxoa", com.azure.core.util.Context.NONE); + = manager.raiTopics().list("hmgw", "nivrxpfduio", com.azure.core.util.Context.NONE); - Assertions.assertEquals("uyapvibzicyvich", response.iterator().next().properties().topicId()); - Assertions.assertEquals("ptkhjxnrkbnv", response.iterator().next().properties().topicName()); - Assertions.assertEquals("cklzhznfgvlxy", response.iterator().next().properties().description()); - Assertions.assertEquals("nctigpksywi", response.iterator().next().properties().sampleBlobUrl()); - Assertions.assertEquals("lktgkdp", response.iterator().next().properties().status()); - Assertions.assertEquals("qj", response.iterator().next().properties().failedReason()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T14:05:05Z"), + Assertions.assertEquals("yqvpbfjpo", response.iterator().next().properties().topicId()); + Assertions.assertEquals("ucfzluczdquu", response.iterator().next().properties().topicName()); + Assertions.assertEquals("ormvh", response.iterator().next().properties().description()); + Assertions.assertEquals("ielbprnq", response.iterator().next().properties().sampleBlobUrl()); + Assertions.assertEquals("ywzcqyggmnw", response.iterator().next().properties().status()); + Assertions.assertEquals("hbngqiwyej", response.iterator().next().properties().failedReason()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T06:48:56Z"), response.iterator().next().properties().createdAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T03:01:48Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T05:29:37Z"), response.iterator().next().properties().lastModifiedAt()); - Assertions.assertEquals("moaxcaytnpkvbp", response.iterator().next().tags().get("ltcwsexheeocnqo")); + Assertions.assertEquals("hlwtpkv", response.iterator().next().tags().get("geattbzkg")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ReplacementConfigTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ReplacementConfigTests.java index f71e26fd4a00..ec4558402a2d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ReplacementConfigTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ReplacementConfigTests.java @@ -13,11 +13,11 @@ public final class ReplacementConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplacementConfig model = BinaryData.fromString( - "{\"targetModelName\":\"ue\",\"targetModelVersion\":\"ibx\",\"autoUpgradeStartDate\":\"2021-07-09T02:08:19Z\",\"upgradeOnExpiryLeadTimeDays\":954772002}") + "{\"targetModelName\":\"ncuxrhdwb\",\"targetModelVersion\":\"xbniwdjs\",\"autoUpgradeStartDate\":\"2021-12-07T05:36:29Z\",\"upgradeOnExpiryLeadTimeDays\":670634549}") .toObject(ReplacementConfig.class); - Assertions.assertEquals("ue", model.targetModelName()); - Assertions.assertEquals("ibx", model.targetModelVersion()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-09T02:08:19Z"), model.autoUpgradeStartDate()); - Assertions.assertEquals(954772002, model.upgradeOnExpiryLeadTimeDays()); + Assertions.assertEquals("ncuxrhdwb", model.targetModelName()); + Assertions.assertEquals("xbniwdjs", model.targetModelVersion()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-07T05:36:29Z"), model.autoUpgradeStartDate()); + Assertions.assertEquals(670634549, model.upgradeOnExpiryLeadTimeDays()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceBaseTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceBaseTests.java index 4998c63e2b99..fb122cf3174d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceBaseTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceBaseTests.java @@ -14,19 +14,19 @@ public final class ResourceBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceBase model = BinaryData.fromString( - "{\"description\":\"olro\",\"tags\":{\"elexhvu\":\"lmgnlqxsjx\",\"zoolzqoca\":\"b\",\"t\":\"kuzlbcnn\"}}") + "{\"description\":\"heqdurelyujlfyou\",\"tags\":{\"brzmqxucycijoclx\":\"kyeclcdigpta\",\"zjd\":\"utgjcyz\",\"jb\":\"r\",\"w\":\"xjeaoqaqbzgyh\"}}") .toObject(ResourceBase.class); - Assertions.assertEquals("olro", model.description()); - Assertions.assertEquals("lmgnlqxsjx", model.tags().get("elexhvu")); + Assertions.assertEquals("heqdurelyujlfyou", model.description()); + Assertions.assertEquals("kyeclcdigpta", model.tags().get("brzmqxucycijoclx")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceBase model = new ResourceBase().withDescription("olro") - .withTags(mapOf("elexhvu", "lmgnlqxsjx", "zoolzqoca", "b", "t", "kuzlbcnn")); + ResourceBase model = new ResourceBase().withDescription("heqdurelyujlfyou") + .withTags(mapOf("brzmqxucycijoclx", "kyeclcdigpta", "zjd", "utgjcyz", "jb", "r", "w", "xjeaoqaqbzgyh")); model = BinaryData.fromObject(model).toObject(ResourceBase.class); - Assertions.assertEquals("olro", model.description()); - Assertions.assertEquals("lmgnlqxsjx", model.tags().get("elexhvu")); + Assertions.assertEquals("heqdurelyujlfyou", model.description()); + Assertions.assertEquals("kyeclcdigpta", model.tags().get("brzmqxucycijoclx")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProvidersCheckDomainAvailabilityWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProvidersCheckDomainAvailabilityWithResponseMockTests.java index 8a22fee7e526..6c0c148febd3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProvidersCheckDomainAvailabilityWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProvidersCheckDomainAvailabilityWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ResourceProvidersCheckDomainAvailabilityWithResponseMockTests @Test public void testCheckDomainAvailabilityWithResponse() throws Exception { String responseStr - = "{\"isSubdomainAvailable\":false,\"reason\":\"cvbzwgwhgkgsoa\",\"subdomainName\":\"orssatfyb\",\"type\":\"ufdmxuq\",\"kind\":\"qna\"}"; + = "{\"isSubdomainAvailable\":false,\"reason\":\"okdxkukmkcz\",\"subdomainName\":\"uhhoqeqshavlj\",\"type\":\"xyrqo\",\"kind\":\"thbb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testCheckDomainAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DomainAvailability response = manager.resourceProviders() - .checkDomainAvailabilityWithResponse(new CheckDomainAvailabilityParameter().withSubdomainName("faofd") - .withType("phtnc") - .withKind("hjobzrfprizdcq"), com.azure.core.util.Context.NONE) + .checkDomainAvailabilityWithResponse( + new CheckDomainAvailabilityParameter().withSubdomainName("su").withType("gfjzcvaax").withKind("alahf"), + com.azure.core.util.Context.NONE) .getValue(); Assertions.assertFalse(response.isSubdomainAvailable()); - Assertions.assertEquals("cvbzwgwhgkgsoa", response.reason()); - Assertions.assertEquals("orssatfyb", response.subdomainName()); - Assertions.assertEquals("ufdmxuq", response.type()); - Assertions.assertEquals("qna", response.kind()); + Assertions.assertEquals("okdxkukmkcz", response.reason()); + Assertions.assertEquals("uhhoqeqshavlj", response.subdomainName()); + Assertions.assertEquals("xyrqo", response.type()); + Assertions.assertEquals("thbb", response.kind()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProvidersCheckSkuAvailabilityWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProvidersCheckSkuAvailabilityWithResponseMockTests.java index e79f085afe23..a50d3b74f667 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProvidersCheckSkuAvailabilityWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProvidersCheckSkuAvailabilityWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class ResourceProvidersCheckSkuAvailabilityWithResponseMockTests { @Test public void testCheckSkuAvailabilityWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"kind\":\"mpyrguyfaz\",\"type\":\"ocbygvthrmxk\",\"skuName\":\"jww\",\"skuAvailable\":false,\"reason\":\"rawppkeboozf\",\"message\":\"acagae\"},{\"kind\":\"oiqclmgdtwgab\",\"type\":\"f\",\"skuName\":\"zbwjecooyvht\",\"skuAvailable\":true,\"reason\":\"elnii\",\"message\":\"cgagdvcdqhftzbp\"}]}"; + = "{\"value\":[{\"kind\":\"bo\",\"type\":\"yfpqd\",\"skuName\":\"kpp\",\"skuAvailable\":false,\"reason\":\"tfvpctfjikff\",\"message\":\"g\"},{\"kind\":\"hznwhvuldbkk\",\"type\":\"jkjigawgaz\",\"skuName\":\"jqifhujjsbcml\",\"skuAvailable\":false,\"reason\":\"zbhur\",\"message\":\"lkolirhhmoj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,18 +33,18 @@ public void testCheckSkuAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SkuAvailabilityListResult response = manager.resourceProviders() - .checkSkuAvailabilityWithResponse("owkdnjr", - new CheckSkuAvailabilityParameter().withSkus(Arrays.asList("krhwieh")) - .withKind("cpnowaw") - .withType("noehrguqlhfwa"), + .checkSkuAvailabilityWithResponse("xv", + new CheckSkuAvailabilityParameter().withSkus(Arrays.asList("yjfucsaod", "nosdkvi")) + .withKind("fasgm") + .withType("trnzpducdaaktu"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mpyrguyfaz", response.value().get(0).kind()); - Assertions.assertEquals("ocbygvthrmxk", response.value().get(0).type()); - Assertions.assertEquals("jww", response.value().get(0).skuName()); + Assertions.assertEquals("bo", response.value().get(0).kind()); + Assertions.assertEquals("yfpqd", response.value().get(0).type()); + Assertions.assertEquals("kpp", response.value().get(0).skuName()); Assertions.assertFalse(response.value().get(0).skuAvailable()); - Assertions.assertEquals("rawppkeboozf", response.value().get(0).reason()); - Assertions.assertEquals("acagae", response.value().get(0).message()); + Assertions.assertEquals("tfvpctfjikff", response.value().get(0).reason()); + Assertions.assertEquals("g", response.value().get(0).message()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkuRestrictionInfoTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkuRestrictionInfoTests.java index 0bab96d5767f..57db11714e57 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkuRestrictionInfoTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkuRestrictionInfoTests.java @@ -11,11 +11,10 @@ public final class ResourceSkuRestrictionInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceSkuRestrictionInfo model = BinaryData - .fromString( - "{\"locations\":[\"hsxjpytnkqbalaho\",\"uuwxhmehjnhjioti\"],\"zones\":[\"bcngkegxc\",\"pxbbfe\"]}") + ResourceSkuRestrictionInfo model = BinaryData.fromString( + "{\"locations\":[\"jbedpfixlhupmomi\",\"z\",\"dnpxpkcdpr\"],\"zones\":[\"elyicghf\",\"rufssjyg\",\"sfxrkbhammgm\"]}") .toObject(ResourceSkuRestrictionInfo.class); - Assertions.assertEquals("hsxjpytnkqbalaho", model.locations().get(0)); - Assertions.assertEquals("bcngkegxc", model.zones().get(0)); + Assertions.assertEquals("jbedpfixlhupmomi", model.locations().get(0)); + Assertions.assertEquals("elyicghf", model.zones().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SafetyProviderConfigTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SafetyProviderConfigTests.java index 7d77b014b00a..f844ea1ce8d9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SafetyProviderConfigTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SafetyProviderConfigTests.java @@ -12,22 +12,22 @@ public final class SafetyProviderConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SafetyProviderConfig model - = BinaryData.fromString("{\"source\":\"PostRun\",\"safetyProviderName\":\"ftjuh\",\"blocking\":true}") - .toObject(SafetyProviderConfig.class); - Assertions.assertEquals("ftjuh", model.safetyProviderName()); - Assertions.assertTrue(model.blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, model.source()); + SafetyProviderConfig model = BinaryData + .fromString("{\"source\":\"PreToolCall\",\"safetyProviderName\":\"dieuzaofj\",\"blocking\":false}") + .toObject(SafetyProviderConfig.class); + Assertions.assertEquals("dieuzaofj", model.safetyProviderName()); + Assertions.assertFalse(model.blocking()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, model.source()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SafetyProviderConfig model = new SafetyProviderConfig().withSafetyProviderName("ftjuh") - .withBlocking(true) - .withSource(RaiPolicyContentSource.POST_RUN); + SafetyProviderConfig model = new SafetyProviderConfig().withSafetyProviderName("dieuzaofj") + .withBlocking(false) + .withSource(RaiPolicyContentSource.PRE_TOOL_CALL); model = BinaryData.fromObject(model).toObject(SafetyProviderConfig.class); - Assertions.assertEquals("ftjuh", model.safetyProviderName()); - Assertions.assertTrue(model.blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, model.source()); + Assertions.assertEquals("dieuzaofj", model.safetyProviderName()); + Assertions.assertFalse(model.blocking()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, model.source()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ServiceTagOutboundRuleDestinationTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ServiceTagOutboundRuleDestinationTests.java index 3dcc011f493d..61e92e5b3fb0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ServiceTagOutboundRuleDestinationTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ServiceTagOutboundRuleDestinationTests.java @@ -14,27 +14,27 @@ public final class ServiceTagOutboundRuleDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceTagOutboundRuleDestination model = BinaryData.fromString( - "{\"serviceTag\":\"khsusmmorf\",\"protocol\":\"hwilz\",\"portRanges\":\"nijmriprlkdne\",\"action\":\"Deny\",\"addressPrefixes\":[\"cxiv\",\"bkut\",\"umltwjflu\"]}") + "{\"serviceTag\":\"ehlq\",\"protocol\":\"nrflkndrndpg\",\"portRanges\":\"odhda\",\"action\":\"Allow\",\"addressPrefixes\":[\"hipx\",\"gsabvcipowzafc\"]}") .toObject(ServiceTagOutboundRuleDestination.class); - Assertions.assertEquals("khsusmmorf", model.serviceTag()); - Assertions.assertEquals("hwilz", model.protocol()); - Assertions.assertEquals("nijmriprlkdne", model.portRanges()); - Assertions.assertEquals(RuleAction.DENY, model.action()); - Assertions.assertEquals("cxiv", model.addressPrefixes().get(0)); + Assertions.assertEquals("ehlq", model.serviceTag()); + Assertions.assertEquals("nrflkndrndpg", model.protocol()); + Assertions.assertEquals("odhda", model.portRanges()); + Assertions.assertEquals(RuleAction.ALLOW, model.action()); + Assertions.assertEquals("hipx", model.addressPrefixes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceTagOutboundRuleDestination model = new ServiceTagOutboundRuleDestination().withServiceTag("khsusmmorf") - .withProtocol("hwilz") - .withPortRanges("nijmriprlkdne") - .withAction(RuleAction.DENY) - .withAddressPrefixes(Arrays.asList("cxiv", "bkut", "umltwjflu")); + ServiceTagOutboundRuleDestination model = new ServiceTagOutboundRuleDestination().withServiceTag("ehlq") + .withProtocol("nrflkndrndpg") + .withPortRanges("odhda") + .withAction(RuleAction.ALLOW) + .withAddressPrefixes(Arrays.asList("hipx", "gsabvcipowzafc")); model = BinaryData.fromObject(model).toObject(ServiceTagOutboundRuleDestination.class); - Assertions.assertEquals("khsusmmorf", model.serviceTag()); - Assertions.assertEquals("hwilz", model.protocol()); - Assertions.assertEquals("nijmriprlkdne", model.portRanges()); - Assertions.assertEquals(RuleAction.DENY, model.action()); - Assertions.assertEquals("cxiv", model.addressPrefixes().get(0)); + Assertions.assertEquals("ehlq", model.serviceTag()); + Assertions.assertEquals("nrflkndrndpg", model.protocol()); + Assertions.assertEquals("odhda", model.portRanges()); + Assertions.assertEquals(RuleAction.ALLOW, model.action()); + Assertions.assertEquals("hipx", model.addressPrefixes().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ServiceTagOutboundRuleTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ServiceTagOutboundRuleTests.java index 7473c4d0f6ac..2b850346e175 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ServiceTagOutboundRuleTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/ServiceTagOutboundRuleTests.java @@ -17,33 +17,33 @@ public final class ServiceTagOutboundRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceTagOutboundRule model = BinaryData.fromString( - "{\"type\":\"ServiceTag\",\"destination\":{\"serviceTag\":\"xottdiia\",\"protocol\":\"qibzji\",\"portRanges\":\"ee\",\"action\":\"Allow\",\"addressPrefixes\":[\"yv\"]},\"category\":\"Dependency\",\"status\":\"Deleting\",\"errorInformation\":\"qsratjhd\",\"parentRuleNames\":[\"b\",\"pijhfrzgdkk\",\"gv\"]}") + "{\"type\":\"ServiceTag\",\"destination\":{\"serviceTag\":\"aywkdcwmqsyril\",\"protocol\":\"xdqaolfylnkkb\",\"portRanges\":\"jvlywl\",\"action\":\"Allow\",\"addressPrefixes\":[\"bbjwhlw\",\"j\",\"nqzocrdzg\"]},\"category\":\"Dependency\",\"status\":\"Deleting\",\"errorInformation\":\"g\",\"parentRuleNames\":[\"ca\",\"ttie\",\"oifuvnyttzgixgy\",\"ihlgm\"]}") .toObject(ServiceTagOutboundRule.class); Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); Assertions.assertEquals(RuleStatus.DELETING, model.status()); - Assertions.assertEquals("xottdiia", model.destination().serviceTag()); - Assertions.assertEquals("qibzji", model.destination().protocol()); - Assertions.assertEquals("ee", model.destination().portRanges()); + Assertions.assertEquals("aywkdcwmqsyril", model.destination().serviceTag()); + Assertions.assertEquals("xdqaolfylnkkb", model.destination().protocol()); + Assertions.assertEquals("jvlywl", model.destination().portRanges()); Assertions.assertEquals(RuleAction.ALLOW, model.destination().action()); - Assertions.assertEquals("yv", model.destination().addressPrefixes().get(0)); + Assertions.assertEquals("bbjwhlw", model.destination().addressPrefixes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceTagOutboundRule model = new ServiceTagOutboundRule().withCategory(RuleCategory.DEPENDENCY) .withStatus(RuleStatus.DELETING) - .withDestination(new ServiceTagOutboundRuleDestination().withServiceTag("xottdiia") - .withProtocol("qibzji") - .withPortRanges("ee") + .withDestination(new ServiceTagOutboundRuleDestination().withServiceTag("aywkdcwmqsyril") + .withProtocol("xdqaolfylnkkb") + .withPortRanges("jvlywl") .withAction(RuleAction.ALLOW) - .withAddressPrefixes(Arrays.asList("yv"))); + .withAddressPrefixes(Arrays.asList("bbjwhlw", "j", "nqzocrdzg"))); model = BinaryData.fromObject(model).toObject(ServiceTagOutboundRule.class); Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); Assertions.assertEquals(RuleStatus.DELETING, model.status()); - Assertions.assertEquals("xottdiia", model.destination().serviceTag()); - Assertions.assertEquals("qibzji", model.destination().protocol()); - Assertions.assertEquals("ee", model.destination().portRanges()); + Assertions.assertEquals("aywkdcwmqsyril", model.destination().serviceTag()); + Assertions.assertEquals("xdqaolfylnkkb", model.destination().protocol()); + Assertions.assertEquals("jvlywl", model.destination().portRanges()); Assertions.assertEquals(RuleAction.ALLOW, model.destination().action()); - Assertions.assertEquals("yv", model.destination().addressPrefixes().get(0)); + Assertions.assertEquals("bbjwhlw", model.destination().addressPrefixes().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SkuResourceInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SkuResourceInnerTests.java index 4ada18d8ebb5..e33c177de357 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SkuResourceInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SkuResourceInnerTests.java @@ -13,18 +13,18 @@ public final class SkuResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuResourceInner model = BinaryData.fromString( - "{\"resourceType\":\"lr\",\"sku\":{\"name\":\"yjmoadsu\",\"tier\":\"Enterprise\",\"size\":\"ywdmjsjqbjh\",\"family\":\"x\",\"capacity\":1337445939},\"capacity\":{\"minimum\":324291601,\"maximum\":1133705641,\"step\":381030924,\"default\":1017473450,\"allowedValues\":[1440361385,1546051716,1081662268,1596538241]}}") + "{\"resourceType\":\"llrxcyjmoad\",\"sku\":{\"name\":\"varmywdmj\",\"tier\":\"Basic\",\"size\":\"jhhyxxrwlycoduhp\",\"family\":\"kgymareqnajxqug\",\"capacity\":432489630},\"capacity\":{\"minimum\":1538408928,\"maximum\":32675843,\"step\":1237082530,\"default\":403214280,\"allowedValues\":[1063119881]}}") .toObject(SkuResourceInner.class); - Assertions.assertEquals("lr", model.resourceType()); - Assertions.assertEquals("yjmoadsu", model.sku().name()); - Assertions.assertEquals(SkuTier.ENTERPRISE, model.sku().tier()); - Assertions.assertEquals("ywdmjsjqbjh", model.sku().size()); - Assertions.assertEquals("x", model.sku().family()); - Assertions.assertEquals(1337445939, model.sku().capacity()); - Assertions.assertEquals(324291601, model.capacity().minimum()); - Assertions.assertEquals(1133705641, model.capacity().maximum()); - Assertions.assertEquals(381030924, model.capacity().step()); - Assertions.assertEquals(1017473450, model.capacity().defaultProperty()); - Assertions.assertEquals(1440361385, model.capacity().allowedValues().get(0)); + Assertions.assertEquals("llrxcyjmoad", model.resourceType()); + Assertions.assertEquals("varmywdmj", model.sku().name()); + Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); + Assertions.assertEquals("jhhyxxrwlycoduhp", model.sku().size()); + Assertions.assertEquals("kgymareqnajxqug", model.sku().family()); + Assertions.assertEquals(432489630, model.sku().capacity()); + Assertions.assertEquals(1538408928, model.capacity().minimum()); + Assertions.assertEquals(32675843, model.capacity().maximum()); + Assertions.assertEquals(1237082530, model.capacity().step()); + Assertions.assertEquals(403214280, model.capacity().defaultProperty()); + Assertions.assertEquals(1063119881, model.capacity().allowedValues().get(0)); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SkuTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SkuTests.java index 3769aed58b77..5e71dbefebb5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SkuTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SkuTests.java @@ -12,25 +12,28 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Sku model = BinaryData - .fromString("{\"name\":\"og\",\"tier\":\"Basic\",\"size\":\"u\",\"family\":\"a\",\"capacity\":1338226566}") + Sku model = BinaryData.fromString( + "{\"name\":\"q\",\"tier\":\"Free\",\"size\":\"ixuigdtopbobj\",\"family\":\"hm\",\"capacity\":115410873}") .toObject(Sku.class); - Assertions.assertEquals("og", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - Assertions.assertEquals("u", model.size()); - Assertions.assertEquals("a", model.family()); - Assertions.assertEquals(1338226566, model.capacity()); + Assertions.assertEquals("q", model.name()); + Assertions.assertEquals(SkuTier.FREE, model.tier()); + Assertions.assertEquals("ixuigdtopbobj", model.size()); + Assertions.assertEquals("hm", model.family()); + Assertions.assertEquals(115410873, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model - = new Sku().withName("og").withTier(SkuTier.BASIC).withSize("u").withFamily("a").withCapacity(1338226566); + Sku model = new Sku().withName("q") + .withTier(SkuTier.FREE) + .withSize("ixuigdtopbobj") + .withFamily("hm") + .withCapacity(115410873); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("og", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - Assertions.assertEquals("u", model.size()); - Assertions.assertEquals("a", model.family()); - Assertions.assertEquals(1338226566, model.capacity()); + Assertions.assertEquals("q", model.name()); + Assertions.assertEquals(SkuTier.FREE, model.tier()); + Assertions.assertEquals("ixuigdtopbobj", model.size()); + Assertions.assertEquals("hm", model.family()); + Assertions.assertEquals(115410873, model.capacity()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPoliciesCreateOrUpdateWithResponseMockTests.java index 562c31746b0c..5eb4c35c1edd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPoliciesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPoliciesCreateOrUpdateWithResponseMockTests.java @@ -13,18 +13,6 @@ import com.azure.resourcemanager.cognitiveservices.fluent.models.RaiPolicyInner; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; import com.azure.resourcemanager.cognitiveservices.models.CustomBlocklistConfig; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsEmptyObject; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsInterventionPoints; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsManifest; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyBinding; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsRegoPolicyDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolDefinition; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolInterventionPoint; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; import com.azure.resourcemanager.cognitiveservices.models.RaiActionType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressMode; @@ -37,11 +25,8 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiPolicy; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentFilter; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyCustomExternalSafetyProviderReference; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyProperties; -import com.azure.resourcemanager.cognitiveservices.models.RaiRegoReference; import com.azure.resourcemanager.cognitiveservices.models.SafetyProviderConfig; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -56,7 +41,7 @@ public final class SubscriptionRaiPoliciesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"format\":\"ACS\",\"acs\":{\"agent_control_specification_version\":\"uvbgtzqzqweuy\",\"metadata\":{\"zeogeatr\":\"\\\"datanairvhpqsv\\\"\",\"rfcs\":\"\\\"datanqnvnc\\\"\",\"zsqbibaaugicovj\":\"\\\"datavjnkoiz\\\"\"},\"policies\":{\"jxyvuo\":{\"type\":\"rego\",\"query\":\"wr\"},\"fyyl\":{\"type\":\"rego\",\"query\":\"xczbass\"},\"o\":{\"type\":\"rego\",\"query\":\"peygkbzb\"},\"ovdpmhttu\":{\"type\":\"rego\",\"query\":\"ybxhq\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"srvjnqt\"},\"annotations\":{}},\"pre_tool_call\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"bfkceincnrecj\"},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"post_tool_call\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"fgdrmns\"},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"output\":{\"policy_target\":\"$snap.input\",\"policy_target_kind\":\"tool_args\",\"policy\":{\"id\":\"qsvzvmxtcwgh\"},\"annotations\":{}}},\"tools\":{\"zpbyfyvynpmggq\":{\"id\":\"hgsulwvgs\",\"type\":\"figvfjjuzkil\",\"description\":\"iwuhyze\",\"security_labels\":[\"yovljlbz\",\"lby\",\"paxhpz\"],\"clearance\":\"ov\",\"esfhshagpahn\":\"\\\"databhanz\\\"\"},\"ebxiauqsuptessj\":{\"id\":\"g\",\"type\":\"vqbugihcdvfoizo\",\"description\":\"loejzsaxzgkqw\",\"security_labels\":[\"ppjnaphifkfr\",\"mplu\",\"p\",\"brmjjn\"],\"clearance\":\"ghtb\",\"khbykrsmhrcme\":\"\\\"datakimskhn\\\"\",\"zbnv\":\"\\\"dataycpgokuthrvyb\\\"\",\"uzzlapyixlvzcgul\":\"\\\"datash\\\"\"},\"rx\":{\"id\":\"jtatpvblskxgxqay\",\"type\":\"slkvcvwp\",\"description\":\"cj\",\"security_labels\":[\"ezjwjkqonb\"],\"clearance\":\"iieyozvrc\",\"xqcbgo\":\"\\\"dataucwnbcgqefgzjv\\\"\"}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"iag\"},{\"regoName\":\"kdlhuduklbjoa\"},{\"regoName\":\"mjfexulvoep\"}],\"type\":\"UserManaged\",\"mode\":\"Blocking\",\"basePolicyName\":\"iancsqoacbuqdgsa\",\"contentFilters\":[{\"name\":\"fgkxenvs\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"PreToolCall\",\"action\":\"BLOCKING\"},{\"name\":\"uvulaqcwggchx\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":false,\"source\":\"PostRun\",\"action\":\"ANNOTATING\"}],\"customBlocklists\":[{\"source\":\"Prompt\",\"blocklistName\":\"hirl\",\"blocking\":true},{\"source\":\"PostRun\",\"blocklistName\":\"nnepkwzzzku\",\"blocking\":false},{\"source\":\"PreRun\",\"blocklistName\":\"omipvwkaujttw\",\"blocking\":false},{\"source\":\"PostToolCall\",\"blocklistName\":\"wofxxdplrel\",\"blocking\":false}],\"safetyProviders\":[{\"source\":\"Completion\",\"safetyProviderName\":\"tuxlbpxrhrfjen\",\"blocking\":true},{\"source\":\"PreRun\",\"safetyProviderName\":\"iktlhqa\",\"blocking\":true},{\"source\":\"Prompt\",\"safetyProviderName\":\"jixy\",\"blocking\":true}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"gzzdwjtacfvvtdp\",\"managedIdentityResourceId\":\"pzfomcsaugbr\",\"source\":\"PostRun\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Deny\",\"description\":\"untethklxwh\",\"rules\":[{\"name\":\"syyhgqokjbmsrk\",\"description\":\"yxxhwrlqom\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Deny\"}},{\"name\":\"ilp\",\"description\":\"brwnrzozs\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}},{\"name\":\"sokliik\",\"description\":\"bvrrbnh\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}},{\"name\":\"hujc\",\"description\":\"yllm\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}}]}},\"etag\":\"izsyq\",\"tags\":{\"dylkyhtr\":\"llcbrva\"},\"id\":\"wf\",\"name\":\"ybptmjjrnogykug\",\"type\":\"lavsavgthkslg\"}"; + = "{\"properties\":{\"type\":\"SystemManaged\",\"mode\":\"Default\",\"basePolicyName\":\"dhuaorhjk\",\"contentFilters\":[{\"name\":\"umo\",\"enabled\":true,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"PreToolCall\",\"action\":\"ANNOTATING\"},{\"name\":\"brugejcvjkjycz\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"Prompt\",\"action\":\"HITL\"},{\"name\":\"l\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"Prompt\",\"action\":\"ANNOTATING\"},{\"name\":\"zhravrcj\",\"enabled\":false,\"severityThreshold\":\"High\",\"blocking\":false,\"source\":\"PreRun\",\"action\":\"ANNOTATING\"}],\"customBlocklists\":[{\"source\":\"PostRun\",\"blocklistName\":\"xle\",\"blocking\":false},{\"source\":\"Prompt\",\"blocklistName\":\"ghskirh\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PreToolCall\",\"safetyProviderName\":\"fukdljqnvtsdyd\",\"blocking\":true},{\"source\":\"PostToolCall\",\"safetyProviderName\":\"yaloowwzizznyufp\",\"blocking\":true},{\"source\":\"PostRun\",\"safetyProviderName\":\"gufy\",\"blocking\":false}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Deny\",\"description\":\"djokgwesym\",\"rules\":[{\"name\":\"rqpfzlp\",\"description\":\"tznxlu\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Rewrite\"}},{\"name\":\"q\",\"description\":\"gsimwe\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}}]}},\"etag\":\"bpjzobdwbcpraswk\",\"tags\":{\"fatgawphnski\":\"dtnaczkf\",\"goqb\":\"dwgtqcumecsaa\",\"bhz\":\"iuycsbskowk\",\"htmqowi\":\"rb\"},\"id\":\"sfgqgucyhfaimqv\",\"name\":\"ruozkgyfp\",\"type\":\"oehgfmqmskkixvlz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -65,196 +50,93 @@ public void testCreateOrUpdateWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - RaiPolicy response = manager.subscriptionRaiPolicies() - .createOrUpdateWithResponse("aaesyyefmxwoqot", new RaiPolicyInner() - .withProperties(new RaiPolicyProperties().withFormat(RaiPolicyFormat.ACS) - .withAcs(new RaiAcsManifest().withAgentControlSpecificationVersion("pasrvrmt") - .withMetadata(mapOf("lxkpypk", "\"datayikjho\"", "b", "\"datannycntrqxxwtd\"", "oxtdyqavfx", - "\"datajtsuhqh\"")) - .withPolicies(mapOf("npaami", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("zxsyaks"), - "wt", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO).withQuery("bgh"), - "qbjsdjpgxeysgw", - new RaiAcsRegoPolicyDefinition().withType(RaiAcsPolicyDefinitionType.REGO) - .withQuery("bgchcgsfzhbjkiy"))) - .withInterventionPoints(new RaiAcsInterventionPoints() - .withInput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.OUTPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("er")) - .withAnnotations(new RaiAcsEmptyObject())) - .withPreToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.OUTPUT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("ivoveomkhfeqcoop")) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS)) - .withPostToolCall( - new RaiAcsToolInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.USER_INPUT) - .withPolicy(new RaiAcsPolicyBinding().withId("gckycjp")) - .withAnnotations(new RaiAcsEmptyObject()) - .withToolNameFrom(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS)) - .withOutput(new RaiAcsInterventionPoint().withPolicyTarget(RaiAcsPolicyTarget.TOOL_RESULT) - .withPolicyTargetKind(RaiAcsPolicyTargetKind.TOOL_RESULT) - .withPolicy(new RaiAcsPolicyBinding().withId("nxsuloutnp")) - .withAnnotations(new RaiAcsEmptyObject()))) - .withTools(mapOf("cnerekyjul", new RaiAcsToolDefinition().withId("qo") - .withType("pncdmwkhup") - .withDescription("sl") - .withSecurityLabels(Arrays.asList("zaui", "nyevdyzdsytciks", "hcamw")) - .withClearance("nfxkcgsfcmvhad") - .withAdditionalProperties(mapOf( - "jtvjkowggxawwd", "\"dataatvyrkljqkqws\"", "bclprgeganihk", "\"databypnkteiidlbov\"")), - "qoxzyhlbeqvhskb", - new RaiAcsToolDefinition().withId("wwnqhqlqgpw") - .withType("vcebavvbvxwv") - .withDescription("enlrjcsmwevgu") - .withSecurityLabels(Arrays.asList("nxelrjkfzcde")) - .withClearance("wwezhyfkdilb") - .withAdditionalProperties(mapOf("qxsorchaz", "\"datamodpe\"", "birtybcelfjn", - "\"dataqacsf\"", "el", "\"dataodnjyhzfaxskdv\"")))) - .withAnnotators(new RaiAcsEmptyObject())) - .withAcsRegos(Arrays.asList(new RaiRegoReference().withRegoName("slajgg"), - new RaiRegoReference().withRegoName("zgaefhawkmib"), new RaiRegoReference().withRegoName("y"), - new RaiRegoReference().withRegoName("wi"))) - .withMode(RaiPolicyMode.DEFAULT) - .withBasePolicyName("pdyttqmiu") - .withContentFilters(Arrays.asList( - new RaiPolicyContentFilter().withName("osebmhht") - .withEnabled(false) - .withSeverityThreshold(ContentLevel.LOW) - .withBlocking(true) - .withSource(RaiPolicyContentSource.PRE_RUN) - .withAction(RaiActionType.RETRY), - new RaiPolicyContentFilter().withName("bfix") - .withEnabled(false) - .withSeverityThreshold(ContentLevel.MEDIUM) - .withBlocking(false) - .withSource(RaiPolicyContentSource.PROMPT) - .withAction(RaiActionType.RETRY), - new RaiPolicyContentFilter().withName("in") - .withEnabled(false) - .withSeverityThreshold(ContentLevel.LOW) - .withBlocking(true) - .withSource(RaiPolicyContentSource.POST_RUN) - .withAction(RaiActionType.RETRY), - new RaiPolicyContentFilter().withName("sjlbsmndaf") - .withEnabled(true) - .withSeverityThreshold(ContentLevel.MEDIUM) - .withBlocking(true) - .withSource(RaiPolicyContentSource.PROMPT) - .withAction(RaiActionType.BLOCKING))) - .withCustomBlocklists(Arrays.asList(new CustomBlocklistConfig().withBlocklistName("hcf") - .withBlocking(true) - .withSource(RaiPolicyContentSource.POST_TOOL_CALL))) - .withSafetyProviders( - Arrays.asList(new SafetyProviderConfig().withSafetyProviderName("rlnewnuwkkfzzetl") - .withBlocking(true) - .withSource(RaiPolicyContentSource.PRE_TOOL_CALL))) - .withCustomExternalSafetyProviders( - Arrays.asList(new RaiPolicyCustomExternalSafetyProviderReference() - .withExternalSafetyProviderName("zlvwyw") - .withManagedIdentityResourceId("rlgqp") - .withSource(RaiPolicyContentSource.PRE_RUN) - .withBlocking(true))) - .withEgressPolicy(new RaiEgressPolicyConfig().withMode(RaiEgressMode.ENFORCED) - .withDefaultAction(RaiEgressDefaultAction.DENY) - .withDescription("bcdwhslx") - .withRules(Arrays.asList( - new RaiEgressRule().withName("j") - .withDescription("knmstbdoprwkamp") - .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch()) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.DENY)), - new RaiEgressRule().withName("bldz") - .withDescription("udrcycm") - .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch()) - .withAction( - new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.TRANSFORM)), - new RaiEgressRule().withName("ymhlhihqknlvkm") - .withDescription("zkopai") - .withRuleType(RaiEgressRuleType.FQDN) - .withMatch(new RaiEgressRuleMatch()) - .withAction(new RaiEgressRuleAction().withActionType(RaiEgressRuleActionType.ALLOW)))))) - .withTags(mapOf("obujnjgyb", "uxsyjofpgved", "skgrhnyt", "xmqxigidullnjgc", "hxhky", "lgsazuqzn")), - com.azure.core.util.Context.NONE) - .getValue(); + RaiPolicy response + = manager.subscriptionRaiPolicies() + .createOrUpdateWithResponse("vmvm", + new RaiPolicyInner() + .withProperties( + new RaiPolicyProperties().withMode(RaiPolicyMode.DEFAULT) + .withBasePolicyName("bsn") + .withContentFilters(Arrays.asList( + new RaiPolicyContentFilter().withName("li") + .withEnabled(false) + .withSeverityThreshold(ContentLevel.MEDIUM) + .withBlocking(false) + .withSource(RaiPolicyContentSource.PRE_TOOL_CALL) + .withAction(RaiActionType.NONE), + new RaiPolicyContentFilter().withName("htgmknazgbj") + .withEnabled(false) + .withSeverityThreshold(ContentLevel.LOW) + .withBlocking(false) + .withSource(RaiPolicyContentSource.PROMPT) + .withAction(RaiActionType.ANNOTATING), + new RaiPolicyContentFilter().withName("crcmmaixp") + .withEnabled(false) + .withSeverityThreshold(ContentLevel.HIGH) + .withBlocking(true) + .withSource(RaiPolicyContentSource.COMPLETION) + .withAction(RaiActionType.ANNOTATING))) + .withCustomBlocklists(Arrays.asList( + new CustomBlocklistConfig().withBlocklistName("qclnaihtg") + .withBlocking(true) + .withSource(RaiPolicyContentSource.COMPLETION), + new CustomBlocklistConfig().withBlocklistName("llrhtpmglx") + .withBlocking(true) + .withSource(RaiPolicyContentSource.PRE_TOOL_CALL), + new CustomBlocklistConfig().withBlocklistName("rawrqkzawbunmp") + .withBlocking(true) + .withSource(RaiPolicyContentSource.PRE_RUN))) + .withSafetyProviders( + Arrays.asList(new SafetyProviderConfig().withSafetyProviderName("epr") + .withBlocking(true) + .withSource(RaiPolicyContentSource.COMPLETION))) + .withEgressPolicy( + new RaiEgressPolicyConfig().withMode(RaiEgressMode.AUDIT) + .withDefaultAction(RaiEgressDefaultAction.ALLOW) + .withDescription("zfjsxscbd") + .withRules(Arrays.asList( + new RaiEgressRule().withName("pg") + .withDescription("qebmvrdjomlnwsb") + .withRuleType(RaiEgressRuleType.FQDN) + .withMatch(new RaiEgressRuleMatch()) + .withAction(new RaiEgressRuleAction() + .withActionType(RaiEgressRuleActionType.DENY)), + new RaiEgressRule().withName("sflxkqesd") + .withDescription("dsbgzan") + .withRuleType(RaiEgressRuleType.FQDN) + .withMatch(new RaiEgressRuleMatch()) + .withAction(new RaiEgressRuleAction() + .withActionType(RaiEgressRuleActionType.REWRITE)))))) + .withTags(mapOf("e", "kltvdhqnufbx")), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals(RaiPolicyFormat.ACS, response.properties().format()); - Assertions.assertEquals("uvbgtzqzqweuy", response.properties().acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, - response.properties().acs().policies().get("jxyvuo").type()); - Assertions.assertEquals("wr", response.properties().acs().policies().get("jxyvuo").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - response.properties().acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, - response.properties().acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("srvjnqt", response.properties().acs().interventionPoints().input().policy().id()); - Assertions.assertEquals(RaiAcsPolicyTarget.INPUT, - response.properties().acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, - response.properties().acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("bfkceincnrecj", - response.properties().acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - response.properties().acs().interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, - response.properties().acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - response.properties().acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("fgdrmns", - response.properties().acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - response.properties().acs().interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.INPUT, - response.properties().acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_ARGUMENTS, - response.properties().acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("qsvzvmxtcwgh", - response.properties().acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("hgsulwvgs", response.properties().acs().tools().get("zpbyfyvynpmggq").id()); - Assertions.assertEquals("figvfjjuzkil", response.properties().acs().tools().get("zpbyfyvynpmggq").type()); - Assertions.assertEquals("iwuhyze", response.properties().acs().tools().get("zpbyfyvynpmggq").description()); - Assertions.assertEquals("yovljlbz", - response.properties().acs().tools().get("zpbyfyvynpmggq").securityLabels().get(0)); - Assertions.assertEquals("ov", response.properties().acs().tools().get("zpbyfyvynpmggq").clearance()); - Assertions.assertEquals("iag", response.properties().acsRegos().get(0).regoName()); - Assertions.assertEquals(RaiPolicyMode.BLOCKING, response.properties().mode()); - Assertions.assertEquals("iancsqoacbuqdgsa", response.properties().basePolicyName()); - Assertions.assertEquals("fgkxenvs", response.properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyMode.DEFAULT, response.properties().mode()); + Assertions.assertEquals("dhuaorhjk", response.properties().basePolicyName()); + Assertions.assertEquals("umo", response.properties().contentFilters().get(0).name()); Assertions.assertTrue(response.properties().contentFilters().get(0).enabled()); Assertions.assertEquals(ContentLevel.MEDIUM, response.properties().contentFilters().get(0).severityThreshold()); Assertions.assertTrue(response.properties().contentFilters().get(0).blocking()); Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, response.properties().contentFilters().get(0).source()); - Assertions.assertEquals(RaiActionType.BLOCKING, response.properties().contentFilters().get(0).action()); - Assertions.assertEquals("hirl", response.properties().customBlocklists().get(0).blocklistName()); - Assertions.assertTrue(response.properties().customBlocklists().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PROMPT, + Assertions.assertEquals(RaiActionType.ANNOTATING, response.properties().contentFilters().get(0).action()); + Assertions.assertEquals("xle", response.properties().customBlocklists().get(0).blocklistName()); + Assertions.assertFalse(response.properties().customBlocklists().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, response.properties().customBlocklists().get(0).source()); - Assertions.assertEquals("tuxlbpxrhrfjen", response.properties().safetyProviders().get(0).safetyProviderName()); + Assertions.assertEquals("fukdljqnvtsdyd", response.properties().safetyProviders().get(0).safetyProviderName()); Assertions.assertTrue(response.properties().safetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, + Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, response.properties().safetyProviders().get(0).source()); - Assertions.assertEquals("gzzdwjtacfvvtdp", - response.properties().customExternalSafetyProviders().get(0).externalSafetyProviderName()); - Assertions.assertEquals("pzfomcsaugbr", - response.properties().customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, - response.properties().customExternalSafetyProviders().get(0).source()); - Assertions.assertTrue(response.properties().customExternalSafetyProviders().get(0).blocking()); Assertions.assertEquals(RaiEgressMode.AUDIT, response.properties().egressPolicy().mode()); Assertions.assertEquals(RaiEgressDefaultAction.DENY, response.properties().egressPolicy().defaultAction()); - Assertions.assertEquals("untethklxwh", response.properties().egressPolicy().description()); - Assertions.assertEquals("syyhgqokjbmsrk", response.properties().egressPolicy().rules().get(0).name()); - Assertions.assertEquals("yxxhwrlqom", response.properties().egressPolicy().rules().get(0).description()); + Assertions.assertEquals("djokgwesym", response.properties().egressPolicy().description()); + Assertions.assertEquals("rqpfzlp", response.properties().egressPolicy().rules().get(0).name()); + Assertions.assertEquals("tznxlu", response.properties().egressPolicy().rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, response.properties().egressPolicy().rules().get(0).ruleType()); - Assertions.assertEquals(RaiEgressRuleActionType.DENY, + Assertions.assertEquals(RaiEgressRuleActionType.REWRITE, response.properties().egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals("llcbrva", response.tags().get("dylkyhtr")); + Assertions.assertEquals("dtnaczkf", response.tags().get("fatgawphnski")); } // Use "Map.of" if available diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPoliciesGetWithResponseMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPoliciesGetWithResponseMockTests.java index 9cedbc73e913..548e04620b8d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPoliciesGetWithResponseMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/SubscriptionRaiPoliciesGetWithResponseMockTests.java @@ -11,10 +11,6 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager; import com.azure.resourcemanager.cognitiveservices.models.ContentLevel; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyDefinitionType; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTarget; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsPolicyTargetKind; -import com.azure.resourcemanager.cognitiveservices.models.RaiAcsToolNameSelector; import com.azure.resourcemanager.cognitiveservices.models.RaiActionType; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressDefaultAction; import com.azure.resourcemanager.cognitiveservices.models.RaiEgressMode; @@ -22,7 +18,6 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiEgressRuleType; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicy; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyContentSource; -import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyFormat; import com.azure.resourcemanager.cognitiveservices.models.RaiPolicyMode; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -34,7 +29,7 @@ public final class SubscriptionRaiPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"format\":\"ContentFilters\",\"acs\":{\"agent_control_specification_version\":\"ymzskwqkkgeseip\",\"metadata\":{\"caxsqcomjiq\":\"\\\"dataiupqscoobkj\\\"\"},\"policies\":{\"zm\":{\"type\":\"rego\",\"query\":\"cevxxkdevpximzi\"},\"hm\":{\"type\":\"rego\",\"query\":\"mduvtvodqxxp\"}},\"intervention_points\":{\"input\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"tbl\"},\"annotations\":{}},\"pre_tool_call\":{\"policy_target\":\"$snap.tool_result.value\",\"policy_target_kind\":\"user_input\",\"policy\":{\"id\":\"azn\"},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"post_tool_call\":{\"policy_target\":\"$snap.output\",\"policy_target_kind\":\"tool_result\",\"policy\":{\"id\":\"pbqs\"},\"annotations\":{},\"tool_name_from\":\"$.tool_call.name\"},\"output\":{\"policy_target\":\"$snap.tool_call.args\",\"policy_target_kind\":\"assistant_output\",\"policy\":{\"id\":\"sbbmitaftazgcx\"},\"annotations\":{}}},\"tools\":{\"ij\":{\"id\":\"quf\",\"type\":\"amxo\",\"description\":\"gc\",\"security_labels\":[\"utehlka\",\"vtipquksxiknsg\",\"fu\",\"swhpcek\"],\"clearance\":\"vmfnnbbxn\",\"cvgifwsunj\":\"\\\"datakkedeetxtp\\\"\"},\"rcxuibsdqbdyblp\":{\"id\":\"iwmmpdtq\",\"type\":\"nbzzsnfz\",\"description\":\"iiwsuanzhwsyuif\",\"security_labels\":[\"qhbtfloil\",\"kfbeoi\",\"pjpngvyvuo\",\"kdlpsxntugfwim\"],\"clearance\":\"ryclo\",\"ifqhdx\":\"\\\"datavswxvjel\\\"\",\"byjecrq\":\"\\\"datawwulkrybpaevy\\\"\",\"lb\":\"\\\"datawakkchsfo\\\"\"},\"zdo\":{\"id\":\"t\",\"type\":\"wpgweoqhbj\",\"description\":\"qfbleruf\",\"security_labels\":[\"c\",\"hjucihbymjj\",\"tpnerxvjea\"],\"clearance\":\"ahelh\",\"tpqg\":\"\\\"datayiieqamct\\\"\"}},\"annotators\":{}},\"acsRegos\":[{\"regoName\":\"d\"}],\"type\":\"UserManaged\",\"mode\":\"Default\",\"basePolicyName\":\"zhcwjgwa\",\"contentFilters\":[{\"name\":\"ofgrutvnp\",\"enabled\":false,\"severityThreshold\":\"Medium\",\"blocking\":true,\"source\":\"PostRun\",\"action\":\"HITL\"},{\"name\":\"hh\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":false,\"source\":\"PostToolCall\",\"action\":\"RETRY\"},{\"name\":\"vhnjvpmxnhtmz\",\"enabled\":true,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"Completion\",\"action\":\"RETRY\"},{\"name\":\"lgxyf\",\"enabled\":false,\"severityThreshold\":\"Low\",\"blocking\":true,\"source\":\"Completion\",\"action\":\"RETRY\"}],\"customBlocklists\":[{\"source\":\"PreToolCall\",\"blocklistName\":\"twwgwqubot\",\"blocking\":true}],\"safetyProviders\":[{\"source\":\"PreRun\",\"safetyProviderName\":\"iemimdtn\",\"blocking\":false},{\"source\":\"PreRun\",\"safetyProviderName\":\"skreeedddrftfquu\",\"blocking\":true},{\"source\":\"Completion\",\"safetyProviderName\":\"iigeeu\",\"blocking\":false},{\"source\":\"PostToolCall\",\"safetyProviderName\":\"xfedqnetdqw\",\"blocking\":true}],\"customExternalSafetyProviders\":[{\"externalSafetyProviderName\":\"gvbzpg\",\"managedIdentityResourceId\":\"wmeyobqajejirv\",\"source\":\"PreRun\",\"blocking\":true},{\"externalSafetyProviderName\":\"kgpogplbjuvlnh\",\"managedIdentityResourceId\":\"rnjhinaeges\",\"source\":\"Completion\",\"blocking\":true},{\"externalSafetyProviderName\":\"pqm\",\"managedIdentityResourceId\":\"oplukfy\",\"source\":\"Prompt\",\"blocking\":true}],\"egressPolicy\":{\"mode\":\"Enforced\",\"defaultAction\":\"Deny\",\"description\":\"rmjx\",\"rules\":[{\"name\":\"pdkesjqbzkqmx\",\"description\":\"o\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Deny\"}},{\"name\":\"wggijtspzjnrrhik\",\"description\":\"bz\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}},{\"name\":\"gquhtrgzfru\",\"description\":\"f\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Transform\"}},{\"name\":\"iycbause\",\"description\":\"czkvihvtuw\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Rewrite\"}}]}},\"etag\":\"zszoszjgzunkfnys\",\"tags\":{\"ojmslhip\":\"unqhcza\",\"vchyluqalpcufj\":\"ukvbljpxpr\"},\"id\":\"xtiztqdstahh\",\"name\":\"saaxxsrit\",\"type\":\"cw\"}"; + = "{\"properties\":{\"type\":\"SystemManaged\",\"mode\":\"Default\",\"basePolicyName\":\"kayrgwy\",\"contentFilters\":[{\"name\":\"pdweoft\",\"enabled\":true,\"severityThreshold\":\"High\",\"blocking\":false,\"source\":\"PreRun\",\"action\":\"RETRY\"}],\"customBlocklists\":[{\"source\":\"PreRun\",\"blocklistName\":\"ja\",\"blocking\":false}],\"safetyProviders\":[{\"source\":\"PostToolCall\",\"safetyProviderName\":\"tj\",\"blocking\":false},{\"source\":\"Prompt\",\"safetyProviderName\":\"fjxtvlxxzqfc\",\"blocking\":true},{\"source\":\"PreRun\",\"safetyProviderName\":\"xeezwyhjmbjiqe\",\"blocking\":false}],\"egressPolicy\":{\"mode\":\"Audit\",\"defaultAction\":\"Allow\",\"description\":\"whpyvdk\",\"rules\":[{\"name\":\"tszwcanzb\",\"description\":\"kwuyck\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Rewrite\"}},{\"name\":\"nsm\",\"description\":\"fiwjbctvbp\",\"ruleType\":\"Fqdn\",\"match\":{},\"action\":{\"actionType\":\"Allow\"}}]}},\"etag\":\"totdxposcslh\",\"tags\":{\"xidhhxomil\":\"siecktybhj\",\"xwjwilm\":\"dxjxdu\",\"wuj\":\"rslaatep\",\"gtvh\":\"zgxqgqwlxr\"},\"id\":\"qqy\",\"name\":\"bkkteo\",\"type\":\"ejogmkor\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -43,77 +38,34 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - RaiPolicy response - = manager.subscriptionRaiPolicies().getWithResponse("megaj", com.azure.core.util.Context.NONE).getValue(); + RaiPolicy response = manager.subscriptionRaiPolicies() + .getWithResponse("wgsoriobijeiydy", com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals(RaiPolicyFormat.CONTENT_FILTERS, response.properties().format()); - Assertions.assertEquals("ymzskwqkkgeseip", response.properties().acs().agentControlSpecificationVersion()); - Assertions.assertEquals(RaiAcsPolicyDefinitionType.REGO, - response.properties().acs().policies().get("zm").type()); - Assertions.assertEquals("cevxxkdevpximzi", response.properties().acs().policies().get("zm").query()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - response.properties().acs().interventionPoints().input().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - response.properties().acs().interventionPoints().input().policyTargetKind()); - Assertions.assertEquals("tbl", response.properties().acs().interventionPoints().input().policy().id()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_RESULT, - response.properties().acs().interventionPoints().preToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.USER_INPUT, - response.properties().acs().interventionPoints().preToolCall().policyTargetKind()); - Assertions.assertEquals("azn", response.properties().acs().interventionPoints().preToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - response.properties().acs().interventionPoints().preToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.OUTPUT, - response.properties().acs().interventionPoints().postToolCall().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.TOOL_RESULT, - response.properties().acs().interventionPoints().postToolCall().policyTargetKind()); - Assertions.assertEquals("pbqs", response.properties().acs().interventionPoints().postToolCall().policy().id()); - Assertions.assertEquals(RaiAcsToolNameSelector.TOOL_CALL_NAME_ALIAS, - response.properties().acs().interventionPoints().postToolCall().toolNameFrom()); - Assertions.assertEquals(RaiAcsPolicyTarget.TOOL_ARGUMENTS, - response.properties().acs().interventionPoints().output().policyTarget()); - Assertions.assertEquals(RaiAcsPolicyTargetKind.ASSISTANT_OUTPUT, - response.properties().acs().interventionPoints().output().policyTargetKind()); - Assertions.assertEquals("sbbmitaftazgcx", - response.properties().acs().interventionPoints().output().policy().id()); - Assertions.assertEquals("quf", response.properties().acs().tools().get("ij").id()); - Assertions.assertEquals("amxo", response.properties().acs().tools().get("ij").type()); - Assertions.assertEquals("gc", response.properties().acs().tools().get("ij").description()); - Assertions.assertEquals("utehlka", response.properties().acs().tools().get("ij").securityLabels().get(0)); - Assertions.assertEquals("vmfnnbbxn", response.properties().acs().tools().get("ij").clearance()); - Assertions.assertEquals("d", response.properties().acsRegos().get(0).regoName()); Assertions.assertEquals(RaiPolicyMode.DEFAULT, response.properties().mode()); - Assertions.assertEquals("zhcwjgwa", response.properties().basePolicyName()); - Assertions.assertEquals("ofgrutvnp", response.properties().contentFilters().get(0).name()); - Assertions.assertFalse(response.properties().contentFilters().get(0).enabled()); - Assertions.assertEquals(ContentLevel.MEDIUM, response.properties().contentFilters().get(0).severityThreshold()); - Assertions.assertTrue(response.properties().contentFilters().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.POST_RUN, - response.properties().contentFilters().get(0).source()); - Assertions.assertEquals(RaiActionType.HITL, response.properties().contentFilters().get(0).action()); - Assertions.assertEquals("twwgwqubot", response.properties().customBlocklists().get(0).blocklistName()); - Assertions.assertTrue(response.properties().customBlocklists().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_TOOL_CALL, + Assertions.assertEquals("kayrgwy", response.properties().basePolicyName()); + Assertions.assertEquals("pdweoft", response.properties().contentFilters().get(0).name()); + Assertions.assertTrue(response.properties().contentFilters().get(0).enabled()); + Assertions.assertEquals(ContentLevel.HIGH, response.properties().contentFilters().get(0).severityThreshold()); + Assertions.assertFalse(response.properties().contentFilters().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, response.properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiActionType.RETRY, response.properties().contentFilters().get(0).action()); + Assertions.assertEquals("ja", response.properties().customBlocklists().get(0).blocklistName()); + Assertions.assertFalse(response.properties().customBlocklists().get(0).blocking()); + Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, response.properties().customBlocklists().get(0).source()); - Assertions.assertEquals("iemimdtn", response.properties().safetyProviders().get(0).safetyProviderName()); + Assertions.assertEquals("tj", response.properties().safetyProviders().get(0).safetyProviderName()); Assertions.assertFalse(response.properties().safetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, + Assertions.assertEquals(RaiPolicyContentSource.POST_TOOL_CALL, response.properties().safetyProviders().get(0).source()); - Assertions.assertEquals("gvbzpg", - response.properties().customExternalSafetyProviders().get(0).externalSafetyProviderName()); - Assertions.assertEquals("wmeyobqajejirv", - response.properties().customExternalSafetyProviders().get(0).managedIdentityResourceId()); - Assertions.assertEquals(RaiPolicyContentSource.PRE_RUN, - response.properties().customExternalSafetyProviders().get(0).source()); - Assertions.assertTrue(response.properties().customExternalSafetyProviders().get(0).blocking()); - Assertions.assertEquals(RaiEgressMode.ENFORCED, response.properties().egressPolicy().mode()); - Assertions.assertEquals(RaiEgressDefaultAction.DENY, response.properties().egressPolicy().defaultAction()); - Assertions.assertEquals("rmjx", response.properties().egressPolicy().description()); - Assertions.assertEquals("pdkesjqbzkqmx", response.properties().egressPolicy().rules().get(0).name()); - Assertions.assertEquals("o", response.properties().egressPolicy().rules().get(0).description()); + Assertions.assertEquals(RaiEgressMode.AUDIT, response.properties().egressPolicy().mode()); + Assertions.assertEquals(RaiEgressDefaultAction.ALLOW, response.properties().egressPolicy().defaultAction()); + Assertions.assertEquals("whpyvdk", response.properties().egressPolicy().description()); + Assertions.assertEquals("tszwcanzb", response.properties().egressPolicy().rules().get(0).name()); + Assertions.assertEquals("kwuyck", response.properties().egressPolicy().rules().get(0).description()); Assertions.assertEquals(RaiEgressRuleType.FQDN, response.properties().egressPolicy().rules().get(0).ruleType()); - Assertions.assertEquals(RaiEgressRuleActionType.DENY, + Assertions.assertEquals(RaiEgressRuleActionType.REWRITE, response.properties().egressPolicy().rules().get(0).action().actionType()); - Assertions.assertEquals("unqhcza", response.tags().get("ojmslhip")); + Assertions.assertEquals("siecktybhj", response.tags().get("xidhhxomil")); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/TrafficRoutingRuleTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/TrafficRoutingRuleTests.java index fcd7a8847063..91a222c9c89a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/TrafficRoutingRuleTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/TrafficRoutingRuleTests.java @@ -12,24 +12,24 @@ public final class TrafficRoutingRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TrafficRoutingRule model = BinaryData.fromString( - "{\"ruleId\":\"vzt\",\"description\":\"nfnqtxjtomals\",\"deploymentId\":\"nfddepldwqjns\",\"trafficPercentage\":1832889654}") + "{\"ruleId\":\"dqllzsauzpjlxeeh\",\"description\":\"iqhzlr\",\"deploymentId\":\"mezx\",\"trafficPercentage\":1703626456}") .toObject(TrafficRoutingRule.class); - Assertions.assertEquals("vzt", model.ruleId()); - Assertions.assertEquals("nfnqtxjtomals", model.description()); - Assertions.assertEquals("nfddepldwqjns", model.deploymentId()); - Assertions.assertEquals(1832889654, model.trafficPercentage()); + Assertions.assertEquals("dqllzsauzpjlxeeh", model.ruleId()); + Assertions.assertEquals("iqhzlr", model.description()); + Assertions.assertEquals("mezx", model.deploymentId()); + Assertions.assertEquals(1703626456, model.trafficPercentage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TrafficRoutingRule model = new TrafficRoutingRule().withRuleId("vzt") - .withDescription("nfnqtxjtomals") - .withDeploymentId("nfddepldwqjns") - .withTrafficPercentage(1832889654); + TrafficRoutingRule model = new TrafficRoutingRule().withRuleId("dqllzsauzpjlxeeh") + .withDescription("iqhzlr") + .withDeploymentId("mezx") + .withTrafficPercentage(1703626456); model = BinaryData.fromObject(model).toObject(TrafficRoutingRule.class); - Assertions.assertEquals("vzt", model.ruleId()); - Assertions.assertEquals("nfnqtxjtomals", model.description()); - Assertions.assertEquals("nfddepldwqjns", model.deploymentId()); - Assertions.assertEquals(1832889654, model.trafficPercentage()); + Assertions.assertEquals("dqllzsauzpjlxeeh", model.ruleId()); + Assertions.assertEquals("iqhzlr", model.description()); + Assertions.assertEquals("mezx", model.deploymentId()); + Assertions.assertEquals(1703626456, model.trafficPercentage()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsageInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsageInnerTests.java index 9caffedd5df2..e32c4a698a8f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsageInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsageInnerTests.java @@ -15,17 +15,17 @@ public final class UsageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsageInner model = BinaryData.fromString( - "{\"id\":\"xbczwtruwiqz\",\"type\":\"j\",\"unit\":\"Bytes\",\"name\":{\"value\":\"yokacspkw\",\"localizedValue\":\"zdobpxjmflbvvnch\"},\"quotaPeriod\":\"cciw\",\"limit\":22.377782651576815,\"currentValue\":22.407160322024012,\"nextResetTime\":\"sa\",\"status\":\"Unknown\",\"scopeType\":\"Regional\",\"scopeId\":\"foskghsauuimj\"}") + "{\"unit\":\"Bytes\",\"name\":{\"value\":\"wzjuqk\",\"localizedValue\":\"sa\"},\"quotaPeriod\":\"wkuofoskghsauu\",\"limit\":35.506862744771716,\"currentValue\":77.80758609860673,\"nextResetTime\":\"duugidyjr\",\"status\":\"Included\",\"scopeType\":\"Regional\",\"scopeId\":\"svexcsonpclhoco\"}") .toObject(UsageInner.class); Assertions.assertEquals(UnitType.BYTES, model.unit()); - Assertions.assertEquals("yokacspkw", model.name().value()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.name().localizedValue()); - Assertions.assertEquals("cciw", model.quotaPeriod()); - Assertions.assertEquals(22.377782651576815D, model.limit()); - Assertions.assertEquals(22.407160322024012D, model.currentValue()); - Assertions.assertEquals("sa", model.nextResetTime()); - Assertions.assertEquals(QuotaUsageStatus.UNKNOWN, model.status()); + Assertions.assertEquals("wzjuqk", model.name().value()); + Assertions.assertEquals("sa", model.name().localizedValue()); + Assertions.assertEquals("wkuofoskghsauu", model.quotaPeriod()); + Assertions.assertEquals(35.506862744771716D, model.limit()); + Assertions.assertEquals(77.80758609860673D, model.currentValue()); + Assertions.assertEquals("duugidyjr", model.nextResetTime()); + Assertions.assertEquals(QuotaUsageStatus.INCLUDED, model.status()); Assertions.assertEquals(QuotaScopeType.REGIONAL, model.scopeType()); - Assertions.assertEquals("foskghsauuimj", model.scopeId()); + Assertions.assertEquals("svexcsonpclhoco", model.scopeId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsageListResultInnerTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsageListResultInnerTests.java index 6dbfc4ea6e72..40b99006b7fb 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsageListResultInnerTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsageListResultInnerTests.java @@ -15,18 +15,18 @@ public final class UsageListResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsageListResultInner model = BinaryData.fromString( - "{\"nextLink\":\"npwlbjnpg\",\"value\":[{\"id\":\"adehxnltyfsopp\",\"type\":\"uesnzwdejbavo\",\"unit\":\"Milliseconds\",\"name\":{\"value\":\"ohctbqvudwx\",\"localizedValue\":\"dnvowg\"},\"quotaPeriod\":\"jugwdkcglhsl\",\"limit\":50.07328511352214,\"currentValue\":18.423533390882408,\"nextResetTime\":\"tjixhbkuofqweyk\",\"status\":\"Unknown\",\"scopeType\":\"Classic\",\"scopeId\":\"fyexfwhy\"},{\"id\":\"i\",\"type\":\"yvdcsitynnaa\",\"unit\":\"Bytes\",\"name\":{\"value\":\"eh\",\"localizedValue\":\"qsc\"},\"quotaPeriod\":\"ypvhezrkg\",\"limit\":1.4245834952011815,\"currentValue\":43.63741417101916,\"nextResetTime\":\"vgmkqsleyyvxyqjp\",\"status\":\"Unknown\",\"scopeType\":\"Classic\",\"scopeId\":\"ngj\"},{\"id\":\"cczsq\",\"type\":\"hvmdajvnysounq\",\"unit\":\"CountPerSecond\",\"name\":{\"value\":\"ae\",\"localizedValue\":\"fhyhltrpmopjmcma\"},\"quotaPeriod\":\"okth\",\"limit\":26.569815760637205,\"currentValue\":95.60014134141919,\"nextResetTime\":\"fcp\",\"status\":\"Unknown\",\"scopeType\":\"Global\",\"scopeId\":\"uozmyzydagfua\"},{\"id\":\"ezyiuokktwhrdxw\",\"type\":\"wqsmbsur\",\"unit\":\"Milliseconds\",\"name\":{\"value\":\"ryocfsfksymdd\",\"localizedValue\":\"tki\"},\"quotaPeriod\":\"xhqyudxorrqnb\",\"limit\":40.67764391393379,\"currentValue\":98.5580280746176,\"nextResetTime\":\"qrvkdv\",\"status\":\"Included\",\"scopeType\":\"Regional\",\"scopeId\":\"vvdfwatkpnpul\"}]}") + "{\"nextLink\":\"xyqj\",\"value\":[{\"unit\":\"Bytes\",\"name\":{\"value\":\"ngj\",\"localizedValue\":\"cczsq\"},\"quotaPeriod\":\"hvmdajvnysounq\",\"limit\":2.2711891093491476,\"currentValue\":9.069007255985827,\"nextResetTime\":\"pfhyhl\",\"status\":\"Blocked\",\"scopeType\":\"Classic\",\"scopeId\":\"jmcmatuokthfu\"},{\"unit\":\"Count\",\"name\":{\"value\":\"sfcpkvxodpuozm\",\"localizedValue\":\"ydagfuaxbe\"},\"quotaPeriod\":\"iu\",\"limit\":22.413429318671486,\"currentValue\":75.16582098477036,\"nextResetTime\":\"xw\",\"status\":\"Blocked\",\"scopeType\":\"Regional\",\"scopeId\":\"bsureximo\"},{\"unit\":\"Seconds\",\"name\":{\"value\":\"sfksy\",\"localizedValue\":\"dystkiiuxhqyud\"},\"quotaPeriod\":\"rrqnbpoczvyifqrv\",\"limit\":72.90862863466027,\"currentValue\":16.56318783055396,\"nextResetTime\":\"mvvd\",\"status\":\"Blocked\",\"scopeType\":\"Classic\",\"scopeId\":\"n\"},{\"unit\":\"Bytes\",\"name\":{\"value\":\"xbczwtruwiqz\",\"localizedValue\":\"j\"},\"quotaPeriod\":\"ovm\",\"limit\":41.58217521612849,\"currentValue\":84.57660128318545,\"nextResetTime\":\"w\",\"status\":\"Unknown\",\"scopeType\":\"DataZone\",\"scopeId\":\"pxjmflbvvnchr\"}]}") .toObject(UsageListResultInner.class); - Assertions.assertEquals("npwlbjnpg", model.nextLink()); - Assertions.assertEquals(UnitType.MILLISECONDS, model.value().get(0).unit()); - Assertions.assertEquals("ohctbqvudwx", model.value().get(0).name().value()); - Assertions.assertEquals("dnvowg", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("jugwdkcglhsl", model.value().get(0).quotaPeriod()); - Assertions.assertEquals(50.07328511352214D, model.value().get(0).limit()); - Assertions.assertEquals(18.423533390882408D, model.value().get(0).currentValue()); - Assertions.assertEquals("tjixhbkuofqweyk", model.value().get(0).nextResetTime()); - Assertions.assertEquals(QuotaUsageStatus.UNKNOWN, model.value().get(0).status()); + Assertions.assertEquals("xyqj", model.nextLink()); + Assertions.assertEquals(UnitType.BYTES, model.value().get(0).unit()); + Assertions.assertEquals("ngj", model.value().get(0).name().value()); + Assertions.assertEquals("cczsq", model.value().get(0).name().localizedValue()); + Assertions.assertEquals("hvmdajvnysounq", model.value().get(0).quotaPeriod()); + Assertions.assertEquals(2.2711891093491476D, model.value().get(0).limit()); + Assertions.assertEquals(9.069007255985827D, model.value().get(0).currentValue()); + Assertions.assertEquals("pfhyhl", model.value().get(0).nextResetTime()); + Assertions.assertEquals(QuotaUsageStatus.BLOCKED, model.value().get(0).status()); Assertions.assertEquals(QuotaScopeType.CLASSIC, model.value().get(0).scopeType()); - Assertions.assertEquals("fyexfwhy", model.value().get(0).scopeId()); + Assertions.assertEquals("jmcmatuokthfu", model.value().get(0).scopeId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsagesListMockTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsagesListMockTests.java index 89b8a3730ed8..f32db93e7d39 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsagesListMockTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UsagesListMockTests.java @@ -25,7 +25,7 @@ public final class UsagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"jvvcrsmwojm\",\"type\":\"c\",\"unit\":\"Milliseconds\",\"name\":{\"value\":\"utqnkeqjftvlt\",\"localizedValue\":\"pec\"},\"quotaPeriod\":\"kbzltnowpajfhx\",\"limit\":89.60906229402926,\"currentValue\":52.95746381716644,\"nextResetTime\":\"zglmuuz\",\"status\":\"Blocked\",\"scopeType\":\"Global\",\"scopeId\":\"pxm\"}]}"; + = "{\"value\":[{\"unit\":\"Bytes\",\"name\":{\"value\":\"rvkxeojtdyulg\",\"localizedValue\":\"elwruk\"},\"quotaPeriod\":\"qfxspxgogyp\",\"limit\":38.2296103314428,\"currentValue\":61.03507490913719,\"nextResetTime\":\"nskvctvuz\",\"status\":\"Blocked\",\"scopeType\":\"Global\",\"scopeId\":\"mhlvrycyxrn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,17 +34,17 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.usages().list("cykzz", "gctygbbmu", com.azure.core.util.Context.NONE); + PagedIterable response = manager.usages().list("ibtkqj", "jcajgofytk", com.azure.core.util.Context.NONE); - Assertions.assertEquals(UnitType.MILLISECONDS, response.iterator().next().unit()); - Assertions.assertEquals("utqnkeqjftvlt", response.iterator().next().name().value()); - Assertions.assertEquals("pec", response.iterator().next().name().localizedValue()); - Assertions.assertEquals("kbzltnowpajfhx", response.iterator().next().quotaPeriod()); - Assertions.assertEquals(89.60906229402926D, response.iterator().next().limit()); - Assertions.assertEquals(52.95746381716644D, response.iterator().next().currentValue()); - Assertions.assertEquals("zglmuuz", response.iterator().next().nextResetTime()); + Assertions.assertEquals(UnitType.BYTES, response.iterator().next().unit()); + Assertions.assertEquals("rvkxeojtdyulg", response.iterator().next().name().value()); + Assertions.assertEquals("elwruk", response.iterator().next().name().localizedValue()); + Assertions.assertEquals("qfxspxgogyp", response.iterator().next().quotaPeriod()); + Assertions.assertEquals(38.2296103314428D, response.iterator().next().limit()); + Assertions.assertEquals(61.03507490913719D, response.iterator().next().currentValue()); + Assertions.assertEquals("nskvctvuz", response.iterator().next().nextResetTime()); Assertions.assertEquals(QuotaUsageStatus.BLOCKED, response.iterator().next().status()); Assertions.assertEquals(QuotaScopeType.GLOBAL, response.iterator().next().scopeType()); - Assertions.assertEquals("pxm", response.iterator().next().scopeId()); + Assertions.assertEquals("mhlvrycyxrn", response.iterator().next().scopeId()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UserAssignedIdentityTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UserAssignedIdentityTests.java index 72b0d60150af..906796250882 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UserAssignedIdentityTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/UserAssignedIdentityTests.java @@ -10,9 +10,8 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model - = BinaryData.fromString("{\"principalId\":\"lcuiywgqywgndr\",\"clientId\":\"nhzgpphrcgyn\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"u\",\"clientId\":\"wgqyw\"}") + .toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/VersionedAgentReferenceTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/VersionedAgentReferenceTests.java index d7b0a573d930..6f3f25a98255 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/VersionedAgentReferenceTests.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/VersionedAgentReferenceTests.java @@ -12,20 +12,20 @@ public final class VersionedAgentReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VersionedAgentReference model - = BinaryData.fromString("{\"agentVersion\":\"u\",\"agentId\":\"doad\",\"agentName\":\"op\"}") + = BinaryData.fromString("{\"agentVersion\":\"svuv\",\"agentId\":\"kqxetqmmliv\",\"agentName\":\"jxnw\"}") .toObject(VersionedAgentReference.class); - Assertions.assertEquals("doad", model.agentId()); - Assertions.assertEquals("op", model.agentName()); - Assertions.assertEquals("u", model.agentVersion()); + Assertions.assertEquals("kqxetqmmliv", model.agentId()); + Assertions.assertEquals("jxnw", model.agentName()); + Assertions.assertEquals("svuv", model.agentVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VersionedAgentReference model - = new VersionedAgentReference().withAgentId("doad").withAgentName("op").withAgentVersion("u"); + = new VersionedAgentReference().withAgentId("kqxetqmmliv").withAgentName("jxnw").withAgentVersion("svuv"); model = BinaryData.fromObject(model).toObject(VersionedAgentReference.class); - Assertions.assertEquals("doad", model.agentId()); - Assertions.assertEquals("op", model.agentName()); - Assertions.assertEquals("u", model.agentVersion()); + Assertions.assertEquals("kqxetqmmliv", model.agentId()); + Assertions.assertEquals("jxnw", model.agentName()); + Assertions.assertEquals("svuv", model.agentVersion()); } } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchUpdatePropertiesTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchUpdatePropertiesTests.java deleted file mode 100644 index e7e2fc6ada29..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchUpdatePropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkbenchUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbenchUpdateProperties model = BinaryData.fromString( - "{\"targetClusterId\":\"ebhuhkslgwlokhu\",\"idleTimeBeforeShutdown\":\"ijyzcqypzqzufgsy\",\"instanceType\":\"jyvdwtfxptpqayam\",\"gpuCount\":480070787}") - .toObject(WorkbenchUpdateProperties.class); - Assertions.assertEquals("ebhuhkslgwlokhu", model.targetClusterId()); - Assertions.assertEquals("ijyzcqypzqzufgsy", model.idleTimeBeforeShutdown()); - Assertions.assertEquals("jyvdwtfxptpqayam", model.instanceType()); - Assertions.assertEquals(480070787, model.gpuCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbenchUpdateProperties model = new WorkbenchUpdateProperties().withTargetClusterId("ebhuhkslgwlokhu") - .withIdleTimeBeforeShutdown("ijyzcqypzqzufgsy") - .withInstanceType("jyvdwtfxptpqayam") - .withGpuCount(480070787); - model = BinaryData.fromObject(model).toObject(WorkbenchUpdateProperties.class); - Assertions.assertEquals("ebhuhkslgwlokhu", model.targetClusterId()); - Assertions.assertEquals("ijyzcqypzqzufgsy", model.idleTimeBeforeShutdown()); - Assertions.assertEquals("jyvdwtfxptpqayam", model.instanceType()); - Assertions.assertEquals(480070787, model.gpuCount()); - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchUpdateTests.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchUpdateTests.java deleted file mode 100644 index 358df35c86a3..000000000000 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/test/java/com/azure/resourcemanager/cognitiveservices/generated/WorkbenchUpdateTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.cognitiveservices.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.cognitiveservices.models.Identity; -import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType; -import com.azure.resourcemanager.cognitiveservices.models.UserAssignedIdentity; -import com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdate; -import com.azure.resourcemanager.cognitiveservices.models.WorkbenchUpdateProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkbenchUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkbenchUpdate model = BinaryData.fromString( - "{\"properties\":{\"targetClusterId\":\"kerv\",\"idleTimeBeforeShutdown\":\"hoadhrsxqvzv\",\"instanceType\":\"abdsr\",\"gpuCount\":1070435847},\"identity\":{\"type\":\"SystemAssigned\",\"tenantId\":\"rsubklrxhjnl\",\"principalId\":\"etjdvqydieqqkwa\",\"userAssignedIdentities\":{\"xbibanbaupw\":{\"principalId\":\"xv\",\"clientId\":\"xoebwg\"},\"s\":{\"principalId\":\"vpaklozkxbz\",\"clientId\":\"ejpl\"},\"xunrswgkpjhboy\":{\"principalId\":\"bttt\",\"clientId\":\"s\"}}}}") - .toObject(WorkbenchUpdate.class); - Assertions.assertEquals("kerv", model.properties().targetClusterId()); - Assertions.assertEquals("hoadhrsxqvzv", model.properties().idleTimeBeforeShutdown()); - Assertions.assertEquals("abdsr", model.properties().instanceType()); - Assertions.assertEquals(1070435847, model.properties().gpuCount()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkbenchUpdate model = new WorkbenchUpdate() - .withProperties(new WorkbenchUpdateProperties().withTargetClusterId("kerv") - .withIdleTimeBeforeShutdown("hoadhrsxqvzv") - .withInstanceType("abdsr") - .withGpuCount(1070435847)) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("xbibanbaupw", new UserAssignedIdentity(), "s", - new UserAssignedIdentity(), "xunrswgkpjhboy", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(WorkbenchUpdate.class); - Assertions.assertEquals("kerv", model.properties().targetClusterId()); - Assertions.assertEquals("hoadhrsxqvzv", model.properties().idleTimeBeforeShutdown()); - Assertions.assertEquals("abdsr", model.properties().instanceType()); - Assertions.assertEquals(1070435847, model.properties().gpuCount()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/tsp-location.yaml b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/tsp-location.yaml index 8f1f11c5ae85..68131bfb7be0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/tsp-location.yaml +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/CognitiveServices -commit: 8554bdf73142233b9584500c9661522d67380638 +directory: specification/cognitiveservices/CognitiveServices.Management +commit: 6e058a0a22c828ca0ebfd5a4826a72addc44f909 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/communication/azure-communication-callingserver/CHANGELOG.md b/sdk/communication/azure-communication-callingserver/CHANGELOG.md new file mode 100644 index 000000000000..012b84f0c4e3 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/CHANGELOG.md @@ -0,0 +1,62 @@ +# Release History + +## 1.0.0-beta.5 (Unreleased) +This is the first version of the restart of Azure Communication Service Calling Server. For more information, please see the [README][read_me]. + +- Name changed to Azure Communication Service Call Automation. +- Feature re-designed. +- Added interfaces from `com.azure.core.client.traits` to `CallAutomationClientBuilder` +- Added `retryOptions` to `CallAutomationClientBuilder` + +### Features Added +- Create outbound call to an Azure Communication Service user or a phone number. +- Answer/Redirect/Reject incoming call from an Azure Communication Service user or a phone number. +- Hangup and terminate the existing call. +- Play audio in the call. +- Call recording. +- Get, add and remove participants from the call. +- Recording download apis. +- Optimized the logic for deserializing types derived from the `CommunicationIdentifier`. + +### Breaking Changes +- Incompatible with previous version of service + +## 1.0.0-beta.4 (2021-10-06) +### Features Added +- Add support for TokenCredential authentication with CallingServerClientBuilder. +- Added support for custom options(Recordingcontenttype, Recordingchanneltype, Recordingformattype) for Mixed Audio feature + +### Bugs Fixed +- Using released version of azure-communication-common. + +### Other Changes +#### Dependency updates +- Upgraded `azure-communication-common` to 1.0.4 + +## 1.0.0-beta.3 (2021-07-26) +### Features Added +- Added RedirectPolicy as a new HttpPolicy to redirect requests based on the HttpResponse. + +## 1.0.0-beta.2 (2021-06-25) +- Updated sdk and apis documentation. + +### Bug Fixes +- Fixed bug with AddParticipant api. + +## 1.0.0-beta.1 (2021-06-24) +This is the first release of Azure Communication Service Calling Server. For more information, please see the [README][read_me]. + +This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for Java GitHub repo](https://github.com/Azure/azure-sdk-for-java/issues). + +### Features Added +- Create outbound call to an Azure Communication Service user or a phone number. +- Hangup and delete the existing call. +- Play audio in the call. +- Out-call apis for call recording including start, pause, resume stop and get state. +- Subscribe to and receive [DTMF][DTMF] dtmfTones via events. +- Add and remove participants from the call. +- Recording download apis. + + +[read_me]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/communication/azure-communication-callingserver/README.md +[DTMF]: https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling diff --git a/sdk/communication/azure-communication-callingserver/README.md b/sdk/communication/azure-communication-callingserver/README.md new file mode 100644 index 000000000000..faff6367bc4f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/README.md @@ -0,0 +1,79 @@ +# Azure Communication CallingServer Service client library for Java + +This package contains a Java SDK for Azure Communication CallingServer Service. Server Test + +[Source code][source] | [Package (Maven)][package] | [API reference documentation][api_documentation] +| [Product documentation][product_docs] + +## Getting started + +### Prerequisites + +- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). +- [Java Development Kit (JDK)](https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable) version 8 or above. +- [Apache Maven](https://maven.apache.org/download.cgi). +- A deployed Communication Services resource. You can use the [Azure Portal](https://learn.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://learn.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up. + +### Include the package + +[//]: # ({x-version-update-start;com.azure:azure-communication-callingserver;current}) +```xml + + com.azure + azure-communication-callingserver + 1.0.0-beta.5 + +``` +[//]: # ({x-version-update-end}) + +## Key concepts +This is the restart of CallingServer Service. It is renamed to Call Automation service and being more intuitive to use. + +`CallAutomationClient` provides the functionality to make call, answer/reject incoming call and redirect a call. + +`CallConnection` provides the functionality to perform actions in an established call connection such as adding participants and terminate the call. + +`CallMedia` introduces media related functionalities into the call. + +`CallRecording` provides the functionality of recording the call. + +`EventHandler` provides the functionality to handle events from the ACS resource. + +## Examples + +To be determined. + +## Troubleshooting + +If you receive a CommunicationErrorException with the message: "Action is invalid when call is not in Established state." This usually means the call has ended. This can occur if the participants all leave +the call, or participants did not accept the call before the call timed out. + +If you fail to start a call because of an HMAC validation error, be sure your access key is correct, and +that you are passing in a valid conversation id. + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + +## Next steps + +- [Read more about CallingServer Call Automation in Azure Communication Services][call_automation_apis_overview] +- [Read more about CallingServer Call Recording in Azure Communication Services][call_recording_overview] +- For a basic guide on how to record and download calls with Event Grid please refer to the [Record and download calls with Event Grid][record_and_download_calls_with_event_grid]. + + +[cla]: https://cla.microsoft.com +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com +[product_docs]: https://learn.microsoft.com/azure/communication-services/ +[package]: https://dev.azure.com/azure-sdk/public/_artifacts/feed/azure-sdk-for-java-communication-interaction +[api_documentation]: https://aka.ms/java-docs +[call_automation_apis_overview]:https://learn.microsoft.com/azure/communication-services/concepts/voice-video-calling/call-automation-apis +[call_recording_overview]:https://learn.microsoft.com/azure/communication-services/concepts/voice-video-calling/call-recording +[record_and_download_calls_with_event_grid]:https://learn.microsoft.com/azure/communication-services/quickstarts/voice-video-calling/download-recording-file-sample +[source]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/communication/azure-communication-callingserver/src diff --git a/sdk/communication/azure-communication-callingserver/checkstyle-suppressions.xml b/sdk/communication/azure-communication-callingserver/checkstyle-suppressions.xml new file mode 100644 index 000000000000..7b28ac343e5b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/checkstyle-suppressions.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/communication/azure-communication-callingserver/ci.yml b/sdk/communication/azure-communication-callingserver/ci.yml new file mode 100644 index 000000000000..d13f4fdeafa5 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/ci.yml @@ -0,0 +1,35 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/communication/azure-communication-callingserver + exclude: + - sdk/communication/azure-communication-callingserver/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/communication/azure-communication-callingserver/ + exclude: + - sdk/communication/azure-communication-callingserver/pom.xml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: communication/azure-communication-callingserver + Artifacts: + - name: azure-communication-callingserver + groupId: com.azure + safeName: azurecommunicationcallingserver diff --git a/sdk/communication/azure-communication-callingserver/pom.xml b/sdk/communication/azure-communication-callingserver/pom.xml new file mode 100644 index 000000000000..8535869eeb82 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/pom.xml @@ -0,0 +1,139 @@ + + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-communication-callingserver + jar + 1.0.0-beta.5 + + Microsoft Azure client library for CallingServer service + + This package contains clients and data structures used to make call with Azure Communication CallingServer Service. + For this release, see notes - https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-callingserver/README.md and https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-callingserver/CHANGELOG.md. + + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + src/main + src/test + 0.75 + 0.65 + false + + + --add-opens com.azure.communication.callingserver/com.azure.communication.callingserver.implementation=ALL-UNNAMED + --add-opens com.azure.communication.common/com.azure.communication.common.implementation=ALL-UNNAMED + + + false + + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + com.azure + azure-communication-common + 1.4.9 + + + com.azure + azure-communication-identity + 1.6.14 + test + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.nimbusds + nimbus-jose-jwt + 9.37.3 + test + + + org.mockito + mockito-core + 4.11.0 + test + + + + + net.bytebuddy + byte-buddy + 1.18.11 + test + + + net.bytebuddy + byte-buddy-agent + 1.18.11 + test + + + com.azure + azure-identity + 1.18.7 + test + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.15 + + + com/azure/communication/callingserver/*.class + + + + + coverage-report + verify + + report + + + + + + + diff --git a/sdk/communication/azure-communication-callingserver/spotbugs-exclude.xml b/sdk/communication/azure-communication-callingserver/spotbugs-exclude.xml new file mode 100644 index 000000000000..34a0720b455c --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/spotbugs-exclude.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationAsyncClient.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationAsyncClient.java new file mode 100644 index 000000000000..fc21491c3775 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationAsyncClient.java @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.AzureCommunicationCallingServerServiceImpl; +import com.azure.communication.callingserver.implementation.CallConnectionsImpl; +import com.azure.communication.callingserver.implementation.ContentsImpl; +import com.azure.communication.callingserver.implementation.ServerCallingsImpl; +import com.azure.communication.callingserver.implementation.ServerCallsImpl; +import com.azure.communication.callingserver.implementation.accesshelpers.CallConnectionPropertiesConstructorProxy; +import com.azure.communication.callingserver.implementation.accesshelpers.ErrorConstructorProxy; +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.CallSourceInternal; +import com.azure.communication.callingserver.implementation.models.MediaStreamingAudioChannelTypeInternal; +import com.azure.communication.callingserver.implementation.models.MediaStreamingConfigurationInternal; +import com.azure.communication.callingserver.implementation.models.MediaStreamingContentTypeInternal; +import com.azure.communication.callingserver.implementation.models.MediaStreamingTransportTypeInternal; +import com.azure.communication.callingserver.models.AnswerCallResult; +import com.azure.communication.callingserver.models.CallRejectReason; +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.callingserver.implementation.models.CreateCallRequestInternal; +import com.azure.communication.callingserver.implementation.models.AnswerCallRequestInternal; +import com.azure.communication.callingserver.implementation.models.RedirectCallRequestInternal; +import com.azure.communication.callingserver.implementation.models.RejectCallRequestInternal; +import com.azure.communication.callingserver.implementation.models.CallRejectReasonInternal; +import com.azure.communication.callingserver.implementation.models.PhoneNumberIdentifierModel; +import com.azure.communication.callingserver.models.CreateCallOptions; +import com.azure.communication.callingserver.models.CreateCallResult; +import com.azure.communication.callingserver.models.MediaStreamingConfiguration; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpPipeline; +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.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.publisher.Mono; + +import java.net.URISyntaxException; +import java.util.List; +import java.util.stream.Collectors; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.core.util.FluxUtil.withContext; + +/** + * Asynchronous client that supports calling server operations. + * + *

      Instantiating a asynchronous CallingServer client

      + * + *

      View {@link CallAutomationClientBuilder this} for additional ways to construct the client.

      + * + * @see CallAutomationClientBuilder + */ +@ServiceClient(builder = CallAutomationClientBuilder.class, isAsync = true) +public final class CallAutomationAsyncClient { + private final CallConnectionsImpl callConnectionInternal; + private final ServerCallingsImpl serverCallingInternal; + private final ServerCallsImpl serverCallsInternal; + private final ContentsImpl contentsInternal; + private final ClientLogger logger; + private final ContentDownloader contentDownloader; + private final HttpPipeline httpPipelineInternal; + private final String resourceEndpoint; + + CallAutomationAsyncClient(AzureCommunicationCallingServerServiceImpl callServiceClient) { + this.callConnectionInternal = callServiceClient.getCallConnections(); + this.serverCallingInternal = callServiceClient.getServerCallings(); + this.serverCallsInternal = callServiceClient.getServerCalls(); + this.contentsInternal = callServiceClient.getContents(); + this.logger = new ClientLogger(CallAutomationAsyncClient.class); + this.contentDownloader + = new ContentDownloader(callServiceClient.getEndpoint(), callServiceClient.getHttpPipeline()); + this.httpPipelineInternal = callServiceClient.getHttpPipeline(); + this.resourceEndpoint = callServiceClient.getEndpoint(); + } + + //region Pre-call Actions + /** + * Create a call connection request from a source identity to a target identity. + * + * @param createCallOptions Options bag for creating a new call. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createCall(CreateCallOptions createCallOptions) { + return createCallWithResponse(createCallOptions).flatMap(FluxUtil::toMono); + } + + /** + * Create a call connection request from a source identity to a target identity. + * + * @param createCallOptions Options bag for creating a new call. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createCallWithResponse(CreateCallOptions createCallOptions) { + return withContext(context -> createCallWithResponseInternal(createCallOptions, context)); + } + + Mono> createCallWithResponseInternal(CreateCallOptions createCallOptions, + Context context) { + try { + context = context == null ? Context.NONE : context; + CreateCallRequestInternal request = getCreateCallRequestInternal(createCallOptions); + + return serverCallingInternal.createCallWithResponseAsync(request, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> { + try { + CallConnectionAsync callConnectionAsync + = getCallConnectionAsync(response.getValue().getCallConnectionId()); + + return new SimpleResponse<>(response, + new CreateCallResult(CallConnectionPropertiesConstructorProxy.create(response.getValue()), + new CallConnection(callConnectionAsync), callConnectionAsync)); + } catch (URISyntaxException e) { + throw logger.logExceptionAsError(new RuntimeException(e)); + } + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + private CreateCallRequestInternal getCreateCallRequestInternal(CreateCallOptions createCallOptions) { + List targetsModel = createCallOptions.getTargets() + .stream() + .map(CommunicationIdentifierConverter::convert) + .collect(Collectors.toList()); + + CallSourceInternal callSourceDto = new CallSourceInternal() + .setIdentifier(CommunicationIdentifierConverter.convert(createCallOptions.getSource())); + if (createCallOptions.getSourceCallerId() != null) { + callSourceDto.setCallerId(new PhoneNumberIdentifierModel().setValue(createCallOptions.getSourceCallerId())); + } + + CreateCallRequestInternal request = new CreateCallRequestInternal().setSource(callSourceDto) + .setTargets(targetsModel) + .setCallbackUri(createCallOptions.getCallbackUrl()) + .setSubject(createCallOptions.getSubject()); + + if (createCallOptions.getMediaStreamingConfiguration() != null) { + MediaStreamingConfigurationInternal streamingConfigurationInternal + = getMediaStreamingConfigurationInternal(createCallOptions.getMediaStreamingConfiguration()); + request.setMediaStreamingConfiguration(streamingConfigurationInternal); + } + return request; + } + + private MediaStreamingConfigurationInternal + getMediaStreamingConfigurationInternal(MediaStreamingConfiguration mediaStreamingConfiguration) { + return new MediaStreamingConfigurationInternal().setTransportUrl(mediaStreamingConfiguration.getTransportUrl()) + .setAudioChannelType(MediaStreamingAudioChannelTypeInternal + .fromString(mediaStreamingConfiguration.getAudioChannelType().toString())) + .setContentType( + MediaStreamingContentTypeInternal.fromString(mediaStreamingConfiguration.getContentType().toString())) + .setTransportType(MediaStreamingTransportTypeInternal + .fromString(mediaStreamingConfiguration.getTransportType().toString())); + } + + /** + * Answer an incoming call + * + * @param incomingCallContext The incoming call context. + * @param callbackUrl The call back url. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono answerCall(String incomingCallContext, String callbackUrl) { + return answerCallWithResponse(incomingCallContext, callbackUrl, null).flatMap(FluxUtil::toMono); + } + + /** + * Create a call connection request from a source identity to a target identity. + * + * @param incomingCallContext The incoming call context. + * @param callbackUrl The call back url. + * @param mediaStreamingConfiguration The MediaStreamingConfiguration. Optional + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> answerCallWithResponse(String incomingCallContext, String callbackUrl, + MediaStreamingConfiguration mediaStreamingConfiguration) { + return withContext(context -> answerCallWithResponseInternal(incomingCallContext, callbackUrl, + mediaStreamingConfiguration, context)); + } + + Mono> answerCallWithResponseInternal(String incomingCallContext, String callbackUrl, + MediaStreamingConfiguration mediaStreamingConfiguration, Context context) { + try { + context = context == null ? Context.NONE : context; + + AnswerCallRequestInternal request + = new AnswerCallRequestInternal().setIncomingCallContext(incomingCallContext) + .setCallbackUri(callbackUrl); + + if (mediaStreamingConfiguration != null) { + MediaStreamingConfigurationInternal mediaStreamingConfigurationInternal + = getMediaStreamingConfigurationInternal(mediaStreamingConfiguration); + + request.setMediaStreamingConfiguration(mediaStreamingConfigurationInternal); + } + + return serverCallingInternal.answerCallWithResponseAsync(request, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> { + try { + CallConnectionAsync callConnectionAsync + = getCallConnectionAsync(response.getValue().getCallConnectionId()); + return new SimpleResponse<>(response, + new AnswerCallResult(CallConnectionPropertiesConstructorProxy.create(response.getValue()), + new CallConnection(callConnectionAsync), callConnectionAsync)); + } catch (URISyntaxException e) { + throw logger.logExceptionAsError(new RuntimeException(e)); + } + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Redirect a call + * + * @param incomingCallContext The incoming call context. + * @param target The target identity. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono redirectCall(String incomingCallContext, CommunicationIdentifier target) { + return redirectCallWithResponse(incomingCallContext, target).flatMap(FluxUtil::toMono); + } + + /** + * Redirect a call + * + * @param incomingCallContext The incoming call context. + * @param target The target identity. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> redirectCallWithResponse(String incomingCallContext, CommunicationIdentifier target) { + return withContext(context -> redirectCallWithResponseInternal(incomingCallContext, target, context)); + } + + Mono> redirectCallWithResponseInternal(String incomingCallContext, CommunicationIdentifier target, + Context context) { + try { + context = context == null ? Context.NONE : context; + + RedirectCallRequestInternal request + = new RedirectCallRequestInternal().setIncomingCallContext(incomingCallContext) + .setTarget(CommunicationIdentifierConverter.convert(target)); + + return serverCallingInternal.redirectCallWithResponseAsync(request, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Reject a call + * + * @param incomingCallContext The incoming call context. + * @param callRejectReason The reason why call is rejected. Optional + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono rejectCall(String incomingCallContext, CallRejectReason callRejectReason) { + return rejectCallWithResponse(incomingCallContext, callRejectReason).flatMap(FluxUtil::toMono); + } + + /** + * Reject a call + * + * @param incomingCallContext The incoming call context. + * @param callRejectReason The reason why call is rejected. Optional + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> rejectCallWithResponse(String incomingCallContext, CallRejectReason callRejectReason) { + return withContext(context -> rejectCallWithResponseInternal(incomingCallContext, callRejectReason, context)); + } + + Mono> rejectCallWithResponseInternal(String incomingCallContext, CallRejectReason callRejectReason, + Context context) { + try { + context = context == null ? Context.NONE : context; + + RejectCallRequestInternal request + = new RejectCallRequestInternal().setIncomingCallContext(incomingCallContext) + .setCallRejectReason(CallRejectReasonInternal.fromString(callRejectReason.toString())); + + return serverCallingInternal.rejectCallWithResponseAsync(request, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + //endregion + + //region Mid-call Actions + /*** + * Returns an object of CallConnectionAsync + * + * @param callConnectionId the id of the call connection + * @return a CallContentAsync. + */ + public CallConnectionAsync getCallConnectionAsync(String callConnectionId) { + return new CallConnectionAsync(callConnectionId, callConnectionInternal, contentsInternal); + } + //endregion + + //region Content management Actions + /*** + * Returns an object of CallRecordingAsync + * + * @return a CallRecordingAsync. + */ + public CallRecordingAsync getCallRecordingAsync() { + return new CallRecordingAsync(serverCallsInternal, contentsInternal, contentDownloader, httpPipelineInternal, + resourceEndpoint); + } + //endregion +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationClient.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationClient.java new file mode 100644 index 000000000000..7a86b654a5e2 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationClient.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.AnswerCallResult; +import com.azure.communication.callingserver.models.CallRejectReason; +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.CreateCallOptions; +import com.azure.communication.callingserver.models.CreateCallResult; +import com.azure.communication.callingserver.models.MediaStreamingConfiguration; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Synchronous client that supports calling server operations. + * + *

      Instantiating a synchronous Calling Server Client

      + * + *

      View {@link CallAutomationClientBuilder this} for additional ways to construct the client.

      + * + * @see CallAutomationClientBuilder + */ +@ServiceClient(builder = CallAutomationClientBuilder.class) +public final class CallAutomationClient { + private final CallAutomationAsyncClient callAutomationAsyncClient; + + CallAutomationClient(CallAutomationAsyncClient callAutomationAsyncClient) { + this.callAutomationAsyncClient = callAutomationAsyncClient; + } + + //region Pre-call Actions + /** + * Create a call connection request from a source identity to a target identity. + * + * @param createCallOptions Options bag for creating a new call. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A CallConnectionDelete object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CreateCallResult createCall(CreateCallOptions createCallOptions) { + return callAutomationAsyncClient.createCall(createCallOptions).block(); + } + + /** + * Create a call connection request from a source identity to a target identity. + * + * @param createCallOptions Options bag for creating a new call. + * @param context The context to associate with this operation. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createCallWithResponse(CreateCallOptions createCallOptions, Context context) { + return callAutomationAsyncClient.createCallWithResponseInternal(createCallOptions, context).block(); + } + + /** + * Answer an incoming call + * + * @param incomingCallContext The incoming call context. + * @param callbackUrl The call back uri. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AnswerCallResult answerCall(String incomingCallContext, String callbackUrl) { + return callAutomationAsyncClient.answerCall(incomingCallContext, callbackUrl).block(); + } + + /** + * Create a call connection request from a source identity to a target identity. + * + * @param incomingCallContext The incoming call context. + * @param callbackUrl The call back uri. + * @param mediaStreamingConfiguration The MediaStreamingConfiguration. Optional + * @param context The context to associate with this operation. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response answerCallWithResponse(String incomingCallContext, String callbackUrl, + MediaStreamingConfiguration mediaStreamingConfiguration, Context context) { + return callAutomationAsyncClient + .answerCallWithResponseInternal(incomingCallContext, callbackUrl, mediaStreamingConfiguration, context) + .block(); + } + + /** + * Redirect a call + * + * @param incomingCallContext The incoming call context. + * @param target The target identity. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Void redirectCall(String incomingCallContext, CommunicationIdentifier target) { + return callAutomationAsyncClient.redirectCall(incomingCallContext, target).block(); + } + + /** + * Redirect a call + * + * @param incomingCallContext The incoming call context. + * @param target The target identity. + * @param context The context to associate with this operation. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response redirectCallWithResponse(String incomingCallContext, CommunicationIdentifier target, + Context context) { + return callAutomationAsyncClient.redirectCallWithResponseInternal(incomingCallContext, target, context).block(); + } + + /** + * Reject a call + * + * @param incomingCallContext The incoming call context. + * @param callRejectReason The reason why call is rejected. Optional + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Void rejectCall(String incomingCallContext, CallRejectReason callRejectReason) { + return callAutomationAsyncClient.rejectCall(incomingCallContext, callRejectReason).block(); + } + + /** + * Reject a call + * + * @param incomingCallContext The incoming call context. + * @param callRejectReason The reason why call is rejected. Optional + * @param context The context to associate with this operation. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful CreateCallConnection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response rejectCallWithResponse(String incomingCallContext, CallRejectReason callRejectReason, + Context context) { + return callAutomationAsyncClient.rejectCallWithResponseInternal(incomingCallContext, callRejectReason, context) + .block(); + } + //endregion + + //region Mid-call Actions + /*** + * Returns an object of CallConnection + * + * @param callConnectionId the id of the call connection + * @return a CallConnection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallConnection getCallConnection(String callConnectionId) { + return new CallConnection(callAutomationAsyncClient.getCallConnectionAsync(callConnectionId)); + } + //endregion + + //region Recording Management actions + /*** + * Returns an object of CallRecording + * + * @return a CallRecording. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallRecording getCallRecording() { + return new CallRecording(callAutomationAsyncClient.getCallRecordingAsync()); + } + //endregion +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationClientBuilder.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationClientBuilder.java new file mode 100644 index 000000000000..9582edd0193f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallAutomationClientBuilder.java @@ -0,0 +1,479 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.AzureCommunicationCallingServerServiceImpl; +import com.azure.communication.callingserver.implementation.AzureCommunicationCallingServerServiceImplBuilder; +import com.azure.communication.callingserver.implementation.CustomHmacAuthenticationPolicy; +import com.azure.communication.common.implementation.CommunicationConnectionString; +import com.azure.communication.common.implementation.HmacAuthenticationPolicy; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.AzureKeyCredentialTrait; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.ConnectionStringTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RedirectPolicy; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Client builder that creates CallAutomationAsyncClient and CallAutomationClient. + * + *

      Instantiating synchronous and asynchronous Calling Server Clients

      + */ + +@ServiceClientBuilder(serviceClients = { CallAutomationClient.class, CallAutomationAsyncClient.class }) +public final class CallAutomationClientBuilder + implements AzureKeyCredentialTrait, ConfigurationTrait, + ConnectionStringTrait, EndpointTrait, + HttpTrait, TokenCredentialTrait { + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; + private static final String APP_CONFIG_PROPERTIES = "azure-communication-callingserver.properties"; + + private final ClientLogger logger = new ClientLogger(CallAutomationClientBuilder.class); + private String connectionString; + private String endpoint; + private String hostName; + private AzureKeyCredential azureKeyCredential; + private TokenCredential tokenCredential; + private HttpClient httpClient; + private HttpLogOptions httpLogOptions = new HttpLogOptions(); + private HttpPipeline pipeline; + private Configuration configuration; + private final Map properties = CoreUtils.getProperties(APP_CONFIG_PROPERTIES); + private final List customPolicies = new ArrayList<>(); + private ClientOptions clientOptions; + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + + /** + * Public default constructor + */ + public CallAutomationClientBuilder() { + + } + + /** + * Set endpoint of the service. + * + * @param endpoint url of the service. + * @return CallAutomationClientBuilder object. + */ + @Override + public CallAutomationClientBuilder endpoint(String endpoint) { + this.endpoint = Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + return this; + } + + /** + * Sets the {@link HttpPipeline} to use for the service client. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + * + * @param pipeline {@link HttpPipeline} to use for sending service requests and receiving responses, + * if a pipeline is not supplied, the + * credential and httpClient fields must be set. + * @return CallAutomationClientBuilder object. + */ + @Override + public CallAutomationClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = Objects.requireNonNull(pipeline, "'pipeline' cannot be null."); + return this; + } + + /** + * Sets the {@link TokenCredential} used to authorize requests sent to the service. Refer to the Azure SDK for Java + * identity and authentication + * documentation for more details on proper usage of the {@link TokenCredential} type. + * + * @param tokenCredential {@link TokenCredential} used to authorize requests sent to the service. + * @return Updated {@link CallAutomationClientBuilder} object. + * @throws NullPointerException If {@code tokenCredential} is null. + */ + @Override + public CallAutomationClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = Objects.requireNonNull(tokenCredential, "'tokenCredential' cannot be null."); + return this; + } + + /** + * Sets the {@link AzureKeyCredential} used to authenticate HTTP requests. + * + * @param keyCredential The {@link AzureKeyCredential} used to authenticate HTTP + * requests. + * @return Updated {@link CallAutomationClientBuilder} object. + * @throws NullPointerException If {@code keyCredential} is null. + */ + @Override + public CallAutomationClientBuilder credential(AzureKeyCredential keyCredential) { + this.azureKeyCredential = Objects.requireNonNull(keyCredential, "'keyCredential' cannot be null."); + return this; + } + + /** + * Set connectionString to use. + * + * @param connectionString connection string to set. + * @return Updated {@link CallAutomationClientBuilder} object. + */ + @Override + public CallAutomationClientBuilder connectionString(String connectionString) { + Objects.requireNonNull(connectionString, "'connectionString' cannot be null."); + this.connectionString = connectionString; + return this; + } + + /** + * Sets the retry policy to use (using the RetryPolicy type). + *

      + * Setting this is mutually exclusive with using {@link #retryOptions(RetryOptions)}. + * + * @param retryPolicy object to be applied + * @return Updated {@link CallAutomationClientBuilder} object. + */ + public CallAutomationClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the {@link RetryOptions} for all the requests made through the client. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + *

      + * Setting this is mutually exclusive with using {@link #retryPolicy(RetryPolicy)}. + * + * @param retryOptions The {@link RetryOptions} to use for all the requests made through the client. + * @return Updated {@link CallAutomationClientBuilder} object. + */ + @Override + public CallAutomationClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * Sets the configuration object used to retrieve environment configuration + * values during building of the client. + * + * @param configuration Configuration store used to retrieve environment + * configurations. + * @return Updated {@link CallAutomationClientBuilder} object. + */ + @Override + public CallAutomationClientBuilder configuration(Configuration configuration) { + this.configuration = Objects.requireNonNull(configuration, "'configuration' cannot be null."); + return this; + } + + /** + * Sets the {@link HttpLogOptions logging configuration} to use when sending and receiving requests to and from + * the service. If a {@code logLevel} is not provided, default value of {@link HttpLogDetailLevel#NONE} is set. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + * + * @param logOptions The {@link HttpLogOptions logging configuration} to use when sending and receiving requests to + * and from the service. + * @return The updated {@link CallAutomationClientBuilder} object. + */ + @Override + public CallAutomationClientBuilder httpLogOptions(HttpLogOptions logOptions) { + this.httpLogOptions = Objects.requireNonNull(logOptions, "'logOptions' cannot be null."); + return this; + } + + /** + * Sets the {@link CallingServerServiceVersion} that is used when making API requests. + *

      + * If a service version is not provided, the service version that will be used will be the latest known service + * version based on the version of the client library being used. If no service version is specified, updating to a + * newer version of the client library will have the result of potentially moving to a newer service version. + *

      + * Targeting a specific service version may also mean that the service will return an error for newer APIs. + * + * @param version {@link CallingServerServiceVersion} of the service to be used when making requests. + * @return Updated CallAutomationClientBuilder object + */ + public CallAutomationClientBuilder serviceVersion(CallingServerServiceVersion version) { + return this; + } + + /** + * Sets the {@link HttpClient} to use for sending and receiving requests to and from the service. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + * + * @param httpClient The {@link HttpClient} to use for requests. + * @return Updated {@link CallAutomationClientBuilder} object. + */ + @Override + public CallAutomationClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Adds a {@link HttpPipelinePolicy pipeline policy} to apply on each request sent. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + * + * @param customPolicy A {@link HttpPipelinePolicy pipeline policy}. + * @return Updated {@link CallAutomationClientBuilder} object. + * @throws NullPointerException If {@code pipelinePolicy} is {@code null}. + */ + @Override + public CallAutomationClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + this.customPolicies.add(Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null.")); + return this; + } + + /** + * Create asynchronous client applying HMACAuthenticationPolicy, + * UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies + * specified by additionalPolicies will be applied after them + * + * @return The updated {@link CallAutomationClientBuilder} object. + * @throws IllegalStateException If both {@link #retryOptions(RetryOptions)} + * and {@link #retryPolicy(RetryPolicy)} have been set. + */ + public CallAutomationAsyncClient buildAsyncClient() { + return new CallAutomationAsyncClient(createServiceImpl()); + } + + /** + * Create synchronous client applying HmacAuthenticationPolicy, UserAgentPolicy, + * RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by + * additionalPolicies will be applied after them. + * + * @return Updated {@link CallAutomationClientBuilder} object. + * @throws IllegalStateException If both {@link #retryOptions(RetryOptions)} + * and {@link #retryPolicy(RetryPolicy)} have been set. + */ + public CallAutomationClient buildClient() { + return new CallAutomationClient(buildAsyncClient()); + } + + private AzureCommunicationCallingServerServiceImpl createServiceImpl() { + boolean isConnectionStringSet = connectionString != null && !connectionString.trim().isEmpty(); + boolean isEndpointSet = endpoint != null && !endpoint.trim().isEmpty(); + boolean isAzureKeyCredentialSet = azureKeyCredential != null; + boolean isTokenCredentialSet = tokenCredential != null; + boolean isCustomEndpointUsed; + + String customEndpointEnabled + = Configuration.getGlobalConfiguration().get("COMMUNICATION_CUSTOM_ENDPOINT_ENABLED", "false"); + isCustomEndpointUsed = Objects.equals(customEndpointEnabled, "true"); + + if (isConnectionStringSet && isEndpointSet && !isCustomEndpointUsed) { + throw logger.logExceptionAsError( + new IllegalArgumentException("Both 'connectionString' and 'endpoint' are set. Just one may be used.")); + } + + if (((!isConnectionStringSet && !isTokenCredentialSet) || !isEndpointSet) && isCustomEndpointUsed) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "Custom Endpoint mode requires 'ConnectionString/TokenCredential' and 'Endpoint' both to be set. Requirement is not fulfilled, changing back to normal mode.")); + } + + if (isConnectionStringSet && isAzureKeyCredentialSet) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "Both 'connectionString' and 'keyCredential' are set. Just one may be used.")); + } + + if (isConnectionStringSet && isTokenCredentialSet) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "Both 'connectionString' and 'tokenCredential' are set. Just one may be used.")); + } + + if (isAzureKeyCredentialSet && isTokenCredentialSet) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "Both 'tokenCredential' and 'keyCredential' are set. Just one may be used.")); + } + + if (isCustomEndpointUsed && !isTokenCredentialSet) { + CommunicationConnectionString connectionStringObject = new CommunicationConnectionString(connectionString); + String accessKey = connectionStringObject.getAccessKey(); + credential(new AzureKeyCredential(accessKey)); + } else if (isConnectionStringSet) { + CommunicationConnectionString connectionStringObject = new CommunicationConnectionString(connectionString); + String endpoint = connectionStringObject.getEndpoint(); + String accessKey = connectionStringObject.getAccessKey(); + endpoint(endpoint).credential(new AzureKeyCredential(accessKey)); + } + + Objects.requireNonNull(endpoint); + if (isTokenCredentialSet) { + try { + hostName = getHostNameFromEndpoint(); + } catch (MalformedURLException e) { + throw logger.logExceptionAsError(new RuntimeException(e.getMessage())); + } + } + + HttpPipeline builderPipeline = pipeline; + if (pipeline == null) { + builderPipeline = createHttpPipeline(httpClient, isCustomEndpointUsed); + } + + AzureCommunicationCallingServerServiceImplBuilder clientBuilder + = new AzureCommunicationCallingServerServiceImplBuilder(); + clientBuilder.endpoint(endpoint).pipeline(builderPipeline); + + return clientBuilder.buildClient(); + } + + /** + * Allows the user to set a variety of client-related options, such as + * user-agent string, headers, etc. + * + * @param clientOptions object to be applied. + * @return Updated {@link CallAutomationClientBuilder} object. + */ + public CallAutomationClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + private List createHttpPipelineAuthPolicies(boolean isCustomEndpointUsed) + throws MalformedURLException { + if (tokenCredential != null && azureKeyCredential != null) { + throw logger.logExceptionAsError( + new IllegalArgumentException("Both 'credential' and 'keyCredential' are set. Just one may be used.")); + } + + List pipelinePolicies = new ArrayList<>(); + if (tokenCredential != null) { + pipelinePolicies + .add(new BearerTokenAuthenticationPolicy(tokenCredential, "https://communication.azure.com//.default")); + Map httpHeaders = new HashMap<>(); + httpHeaders.put("x-ms-host", hostName); + pipelinePolicies.add(new AddHeadersPolicy(new HttpHeaders(httpHeaders))); + } else if (azureKeyCredential != null) { + if (isCustomEndpointUsed) { + String acsEndpoint = (new CommunicationConnectionString(connectionString)).getEndpoint(); + pipelinePolicies + .add(new CustomHmacAuthenticationPolicy(azureKeyCredential, (new URL(acsEndpoint)).getHost())); + } else { + pipelinePolicies.add(new HmacAuthenticationPolicy(azureKeyCredential)); + } + } else { + throw logger.logExceptionAsError( + new IllegalArgumentException("Missing credential information while building a client.")); + } + + return pipelinePolicies; + } + + private HttpPipeline createHttpPipeline(HttpClient httpClient, boolean isCustomEndpointUsed) { + if (pipeline != null) { + return pipeline; + } + + List policyList = new ArrayList<>(); + + ClientOptions buildClientOptions = (clientOptions == null) ? new ClientOptions() : clientOptions; + HttpLogOptions buildLogOptions = (httpLogOptions == null) ? new HttpLogOptions() : httpLogOptions; + + String applicationId = null; + if (!CoreUtils.isNullOrEmpty(buildClientOptions.getApplicationId())) { + applicationId = buildClientOptions.getApplicationId(); + } else if (!CoreUtils.isNullOrEmpty(buildLogOptions.getApplicationId())) { + applicationId = buildLogOptions.getApplicationId(); + } + + // Add required policies + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + policyList.add(new UserAgentPolicy(applicationId, clientName, clientVersion, configuration)); + policyList.add(new RequestIdPolicy()); + policyList.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions)); + policyList.add(new RedirectPolicy()); + try { + policyList.addAll(createHttpPipelineAuthPolicies(isCustomEndpointUsed)); + } catch (Exception e) { + throw logger.logExceptionAsError(new IllegalArgumentException("Invalid ACS Endpoint exception: " + e)); + } + + policyList.add(new CookiePolicy()); + + // Add additional policies + if (!customPolicies.isEmpty()) { + policyList.addAll(customPolicies); + } + + // Add logging policy + policyList.add(new HttpLoggingPolicy(getHttpLogOptions())); + + return new HttpPipelineBuilder().policies(policyList.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + } + + private HttpLogOptions getHttpLogOptions() { + if (httpLogOptions == null) { + httpLogOptions = new HttpLogOptions(); + } + + return httpLogOptions; + } + + private String getHostNameFromEndpoint() throws MalformedURLException { + return new URL(endpoint).getHost(); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallConnection.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallConnection.java new file mode 100644 index 000000000000..17e96fd651e7 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallConnection.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.CallParticipant; +import com.azure.communication.callingserver.models.AddParticipantsOptions; +import com.azure.communication.callingserver.models.AddParticipantsResult; +import com.azure.communication.callingserver.models.CallConnectionProperties; +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.ListParticipantsResult; +import com.azure.communication.callingserver.models.RemoveParticipantsResult; +import com.azure.communication.callingserver.models.TransferCallResult; +import com.azure.communication.callingserver.models.TransferToParticipantCallOptions; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +import java.util.List; + +/** + * CallConnection for mid-call actions + */ +public class CallConnection { + private final CallConnectionAsync callConnectionAsync; + + CallConnection(CallConnectionAsync callConnectionAsync) { + this.callConnectionAsync = callConnectionAsync; + } + + /** + * Get call connection properties. + * + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallConnectionProperties getCallProperties() { + return callConnectionAsync.getCallProperties().block(); + } + + /** + * Get call connection properties. + * + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCallPropertiesWithResponse(Context context) { + return callConnectionAsync.getCallPropertiesWithResponseInternal(context).block(); + } + + /** + * Hangup a call. + * + * @param isForEveryone determine if the call is handed up for all participants. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful hangup request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Void hangUp(boolean isForEveryone) { + return callConnectionAsync.hangUp(isForEveryone).block(); + } + + /** + * Hangup a call. + * + * @param isForEveryone determine if the call is handed up for all participants. + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful hangup request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response hangUpWithResponse(boolean isForEveryone, Context context) { + return callConnectionAsync.hangUpWithResponseInternal(isForEveryone, context).block(); + } + + /** + * Get a specific participant. + * + * @param participantMri The participant. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallParticipant getParticipant(String participantMri) { + return callConnectionAsync.getParticipant(participantMri).block(); + } + + /** + * Get all participants. + * + * @param participantMri The participant. + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getParticipantWithResponse(String participantMri, Context context) { + return callConnectionAsync.getParticipantWithResponseInternal(participantMri, context).block(); + } + + /** + * Get all participants. + * + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListParticipantsResult listParticipants() { + return callConnectionAsync.listParticipants().block(); + } + + /** + * Get all participants. + * + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listParticipantsWithResponse(Context context) { + return callConnectionAsync.listParticipantsWithResponseInternal(context).block(); + } + + /** + * Transfer the call to a participant. + * + * @param transferToParticipantCallOptions Options bag for transferToParticipantCall + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful call termination request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TransferCallResult + transferToParticipantCall(TransferToParticipantCallOptions transferToParticipantCallOptions) { + return callConnectionAsync.transferToParticipantCall(transferToParticipantCallOptions).block(); + } + + /** + * Transfer the call to a participant. + * + * @param transferToParticipantCallOptions Options bag for transferToParticipantCall + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful call termination request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response transferToParticipantCallWithResponse( + TransferToParticipantCallOptions transferToParticipantCallOptions, Context context) { + return callConnectionAsync + .transferToParticipantCallWithResponseInternal(transferToParticipantCallOptions, context) + .block(); + } + + /** + * Add a participant to the call. + * + * @param addParticipantsOptions Options bag for addParticipants + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful add participant request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddParticipantsResult addParticipants(AddParticipantsOptions addParticipantsOptions) { + return callConnectionAsync.addParticipants(addParticipantsOptions).block(); + } + + /** + * Add a participant to the call. + * + * @param addParticipantsOptions Options bag for addParticipants + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful add participant request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response addParticipantsWithResponse(AddParticipantsOptions addParticipantsOptions, + Context context) { + return callConnectionAsync.addParticipantsWithResponseInternal(addParticipantsOptions, context).block(); + } + + /** + * Remove a list of participants from the call. + * + * @param participantsToRemove The identifier list of the participant to be removed. + * @param operationContext The operation context. Optional + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful add participant request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemoveParticipantsResult removeParticipants(List participantsToRemove, + String operationContext) { + return callConnectionAsync.removeParticipants(participantsToRemove, operationContext).block(); + } + + /** + * Remove a list of participant from the call. + * + * @param participantsToRemove The identifier list of the participant to be removed. + * @param operationContext The operation context. Optional + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful add participant request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response removeParticipantsWithResponse( + List participantsToRemove, String operationContext, Context context) { + return callConnectionAsync + .removeParticipantsWithResponseInternal(participantsToRemove, operationContext, context) + .block(); + } + + //region Content management Actions + /*** + * Returns an object of CallContent + * + * @return a CallContentAsync. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallMedia getCallMedia() { + return new CallMedia(callConnectionAsync.getCallMediaAsync()); + } + + //endregion +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallConnectionAsync.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallConnectionAsync.java new file mode 100644 index 000000000000..15447d2501e8 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallConnectionAsync.java @@ -0,0 +1,392 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.CallConnectionsImpl; +import com.azure.communication.callingserver.implementation.ContentsImpl; +import com.azure.communication.callingserver.implementation.accesshelpers.AddParticipantsResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.accesshelpers.CallConnectionPropertiesConstructorProxy; +import com.azure.communication.callingserver.implementation.accesshelpers.ErrorConstructorProxy; +import com.azure.communication.callingserver.implementation.accesshelpers.ListParticipantsResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.accesshelpers.RemoveParticipantsResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.accesshelpers.TransferCallResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.converters.CallParticipantConverter; +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.converters.PhoneNumberIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.AddParticipantsRequestInternal; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.callingserver.implementation.models.RemoveParticipantsRequestInternal; +import com.azure.communication.callingserver.implementation.models.TransferToParticipantRequestInternal; +import com.azure.communication.callingserver.models.AddParticipantsResult; +import com.azure.communication.callingserver.models.CallParticipant; +import com.azure.communication.callingserver.models.AddParticipantsOptions; +import com.azure.communication.callingserver.models.CallConnectionProperties; +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.ListParticipantsResult; +import com.azure.communication.callingserver.models.RemoveParticipantsResult; +import com.azure.communication.callingserver.models.TransferCallResult; +import com.azure.communication.callingserver.models.TransferToParticipantCallOptions; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +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.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.publisher.Mono; + +import java.net.URISyntaxException; +import java.util.List; +import java.util.stream.Collectors; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.core.util.FluxUtil.withContext; + +/** + * CallConnectionAsync for mid-call actions + */ +public class CallConnectionAsync { + private final String callConnectionId; + private final CallConnectionsImpl callConnectionInternal; + private final ContentsImpl contentsInternal; + private final ClientLogger logger; + + CallConnectionAsync(String callConnectionId, CallConnectionsImpl callConnectionInternal, + ContentsImpl contentsInternal) { + this.callConnectionId = callConnectionId; + this.callConnectionInternal = callConnectionInternal; + this.contentsInternal = contentsInternal; + this.logger = new ClientLogger(CallConnectionAsync.class); + } + + /** + * Get call connection properties. + * + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getCallProperties() { + return getCallPropertiesWithResponse().flatMap(FluxUtil::toMono); + } + + /** + * Get call connection properties. + * + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getCallPropertiesWithResponse() { + return withContext(this::getCallPropertiesWithResponseInternal); + } + + Mono> getCallPropertiesWithResponseInternal(Context context) { + try { + context = context == null ? Context.NONE : context; + + return callConnectionInternal.getCallWithResponseAsync(callConnectionId, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> { + try { + return new SimpleResponse<>(response, + CallConnectionPropertiesConstructorProxy.create(response.getValue())); + } catch (URISyntaxException e) { + throw logger.logExceptionAsError(new RuntimeException(e)); + } + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Hangup a call. + * + * @param isForEveryone determine if the call is handed up for all participants. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful hangup request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono hangUp(boolean isForEveryone) { + return hangUpWithResponse(isForEveryone).flatMap(FluxUtil::toMono); + } + + /** + * Hangup a call. + * + * @param isForEveryone determine if the call is handed up for all participants. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful hangup request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> hangUpWithResponse(boolean isForEveryone) { + return withContext(context -> hangUpWithResponseInternal(isForEveryone, context)); + } + + Mono> hangUpWithResponseInternal(boolean isForEveryone, Context context) { + try { + context = context == null ? Context.NONE : context; + + return (isForEveryone + ? callConnectionInternal.terminateCallWithResponseAsync(callConnectionId, context) + : callConnectionInternal.hangupCallWithResponseAsync(callConnectionId, context)) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Get a specific participant. + * + * @param participantMri MRI of the participants to retrieve. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getParticipant(String participantMri) { + return getParticipantWithResponse(participantMri).flatMap(FluxUtil::toMono); + } + + /** + * Get a specific participant. + * + * @param participantMri MRI of the participants to retrieve. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getParticipantWithResponse(String participantMri) { + return withContext(context -> getParticipantWithResponseInternal(participantMri, context)); + } + + Mono> getParticipantWithResponseInternal(String participantMri, Context context) { + try { + context = context == null ? Context.NONE : context; + + return callConnectionInternal.getParticipantWithResponseAsync(callConnectionId, participantMri, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> new SimpleResponse<>(response, CallParticipantConverter.convert(response.getValue()))); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Get all participants. + * + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listParticipants() { + return listParticipantsWithResponse().flatMap(FluxUtil::toMono); + } + + /** + * Get all participants. + * + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful get call connection request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listParticipantsWithResponse() { + return withContext(this::listParticipantsWithResponseInternal); + } + + Mono> listParticipantsWithResponseInternal(Context context) { + try { + context = context == null ? Context.NONE : context; + + return callConnectionInternal.getParticipantsWithResponseAsync(callConnectionId, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> new SimpleResponse<>(response, + ListParticipantsResponseConstructorProxy.create(response.getValue()))); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Transfer the call to a participant. + * + * @param transferToParticipantCallOptions Options bag for transferToParticipantCall + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response payload for a successful call termination request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono + transferToParticipantCall(TransferToParticipantCallOptions transferToParticipantCallOptions) { + return transferToParticipantCallWithResponse(transferToParticipantCallOptions).flatMap(FluxUtil::toMono); + } + + /** + * Transfer the call to a participant. + * + * @param transferToParticipantCallOptions Options bag for transferToParticipantCall + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful call termination request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + transferToParticipantCallWithResponse(TransferToParticipantCallOptions transferToParticipantCallOptions) { + return withContext( + context -> transferToParticipantCallWithResponseInternal(transferToParticipantCallOptions, context)); + } + + Mono> transferToParticipantCallWithResponseInternal( + TransferToParticipantCallOptions transferToParticipantCallOptions, Context context) { + try { + context = context == null ? Context.NONE : context; + + TransferToParticipantRequestInternal request = new TransferToParticipantRequestInternal() + .setTargetParticipant( + CommunicationIdentifierConverter.convert(transferToParticipantCallOptions.getTargetParticipant())) + .setTransfereeCallerId( + PhoneNumberIdentifierConverter.convert(transferToParticipantCallOptions.getTransfereeCallerId())) + .setUserToUserInformation(transferToParticipantCallOptions.getUserToUserInformation()) + .setOperationContext(transferToParticipantCallOptions.getOperationContext()); + + return callConnectionInternal.transferToParticipantWithResponseAsync(callConnectionId, request, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> new SimpleResponse<>(response, + TransferCallResponseConstructorProxy.create(response.getValue()))); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Add a participant to the call. + * + * @param addParticipantsOptions Options bag for addParticipants + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful add participant request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addParticipants(AddParticipantsOptions addParticipantsOptions) { + return addParticipantsWithResponse(addParticipantsOptions).flatMap(FluxUtil::toMono); + } + + /** + * Add a participant to the call. + * + * @param addParticipantsOptions Options bag for addParticipants + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful add participant request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + addParticipantsWithResponse(AddParticipantsOptions addParticipantsOptions) { + return withContext(context -> addParticipantsWithResponseInternal(addParticipantsOptions, context)); + } + + Mono> + addParticipantsWithResponseInternal(AddParticipantsOptions addParticipantsOptions, Context context) { + try { + context = context == null ? Context.NONE : context; + List participantModels = addParticipantsOptions.getParticipants() + .stream() + .map(CommunicationIdentifierConverter::convert) + .collect(Collectors.toList()); + + AddParticipantsRequestInternal request + = new AddParticipantsRequestInternal().setParticipantsToAdd(participantModels) + .setSourceCallerId( + PhoneNumberIdentifierConverter.convert(addParticipantsOptions.getSourceCallerId())) + .setOperationContext(addParticipantsOptions.getOperationContext()); + + // Need to do a null check since it is optional; it might be a null and breaks the get function as well as type casting. + if (addParticipantsOptions.getInvitationTimeout() != null) { + request.setInvitationTimeoutInSeconds((int) addParticipantsOptions.getInvitationTimeout().getSeconds()); + } + + return callConnectionInternal.addParticipantWithResponseAsync(callConnectionId, request, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> new SimpleResponse<>(response, + AddParticipantsResponseConstructorProxy.create(response.getValue()))); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Remove a list of participants from the call. + * + * @param participantsToRemove The identifier list of the participant to be removed. + * @param operationContext The operation context. Optional + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful add participant request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono removeParticipants(List participantsToRemove, + String operationContext) { + return removeParticipantsWithResponse(participantsToRemove, operationContext).flatMap(FluxUtil::toMono); + } + + /** + * Remove a list of participants from the call. + * + * @param participantsToRemove The identifier list of the participant to be removed. + * @param operationContext The operation context. Optional + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful add participant request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + removeParticipantsWithResponse(List participantsToRemove, String operationContext) { + return withContext( + context -> removeParticipantsWithResponseInternal(participantsToRemove, operationContext, context)); + } + + Mono> removeParticipantsWithResponseInternal( + List participantsToRemove, String operationContext, Context context) { + try { + context = context == null ? Context.NONE : context; + List participantModels = participantsToRemove.stream() + .map(CommunicationIdentifierConverter::convert) + .collect(Collectors.toList()); + + RemoveParticipantsRequestInternal request + = new RemoveParticipantsRequestInternal().setParticipantsToRemove(participantModels) + .setOperationContext(operationContext); + + return callConnectionInternal.removeParticipantsWithResponseAsync(callConnectionId, request, context) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> new SimpleResponse<>(response, + RemoveParticipantsResponseConstructorProxy.create(response.getValue()))); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + //region Content management Actions + /*** + * Returns an object of CallContentAsync + * + * @return a CallContentAsync. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallMediaAsync getCallMediaAsync() { + return new CallMediaAsync(callConnectionId, contentsInternal); + } + //endregion +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallMedia.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallMedia.java new file mode 100644 index 000000000000..a7c71aa0c05d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallMedia.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.PlayOptions; +import com.azure.communication.callingserver.models.PlaySource; +import com.azure.communication.callingserver.models.RecognizeOptions; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +import java.util.Collections; +import java.util.List; + +/** + * CallContent. + */ +public class CallMedia { + private final CallMediaAsync callMediaAsync; + + CallMedia(CallMediaAsync callMediaAsync) { + this.callMediaAsync = callMediaAsync; + } + + /** + * Play + * + * @param playSource A {@link PlaySource} representing the source to play. + * @param playTo the targets to play to. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void play(PlaySource playSource, List playTo) { + callMediaAsync.play(playSource, playTo).block(); + } + + /** + * Play to all participants + * + * @param playSource A {@link PlaySource} representing the source to play. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void playToAll(PlaySource playSource) { + callMediaAsync.playToAll(playSource).block(); + } + + /** + * PlayWithResponse + * + * @param playSource A {@link PlaySource} representing the source to play. + * @param playTo the targets to play to. + * @param options play options. + * @param context A {@link Context} representing the request context. + * @return Response for successful play request. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response playWithResponse(PlaySource playSource, List playTo, + PlayOptions options, Context context) { + return callMediaAsync.playWithResponseInternal(playSource, playTo, options, context).block(); + } + + /** + * PlayAllWithResponse + * + * @param playSource A {@link PlaySource} representing the source to play. + * @param options play options. + * @param context A {@link Context} representing the request context. + * @return Response for successful playAll request. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response playToAllWithResponse(PlaySource playSource, PlayOptions options, Context context) { + return callMediaAsync.playWithResponseInternal(playSource, Collections.emptyList(), options, context).block(); + } + + /** + * Recognize tones. + * @param recognizeOptions Optional elements for recognize. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void recognize(RecognizeOptions recognizeOptions) { + callMediaAsync.recognize(recognizeOptions).block(); + } + + /** + * Recognize tones. + * @param recognizeOptions Optional elements for recognize. + * @param context A {@link Context} representing the request context. + * @return Response for a successful recognize request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response recognizeWithResponse(RecognizeOptions recognizeOptions, Context context) { + return callMediaAsync.recognizeWithResponseInternal(recognizeOptions, context).block(); + } + + /** + * Cancels all the queued media operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancelAllMediaOperations() { + cancelAllMediaOperationsWithResponse(null); + } + + /** + * Cancels all the queued media operations + * @param context A {@link Context} representing the request context. + * @return Response for successful playAll request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelAllMediaOperationsWithResponse(Context context) { + return callMediaAsync.cancelAllMediaOperationsWithResponseInternal(context).block(); + } + +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallMediaAsync.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallMediaAsync.java new file mode 100644 index 000000000000..449c6386f4cb --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallMediaAsync.java @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.ContentsImpl; +import com.azure.communication.callingserver.implementation.accesshelpers.ErrorConstructorProxy; +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.DtmfConfigurationsInternal; +import com.azure.communication.callingserver.implementation.models.FileSourceInternal; +import com.azure.communication.callingserver.implementation.models.PlayOptionsInternal; +import com.azure.communication.callingserver.implementation.models.PlayRequest; +import com.azure.communication.callingserver.implementation.models.PlaySourceInternal; +import com.azure.communication.callingserver.implementation.models.PlaySourceTypeInternal; +import com.azure.communication.callingserver.implementation.models.RecognizeConfigurationsInternal; +import com.azure.communication.callingserver.implementation.models.RecognizeInputTypeInternal; +import com.azure.communication.callingserver.implementation.models.RecognizeRequest; +import com.azure.communication.callingserver.implementation.models.StopTonesInternal; +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.DtmfConfigurations; +import com.azure.communication.callingserver.models.FileSource; +import com.azure.communication.callingserver.models.PlayOptions; +import com.azure.communication.callingserver.models.PlaySource; +import com.azure.communication.callingserver.models.RecognizeConfigurations; +import com.azure.communication.callingserver.models.RecognizeOptions; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.publisher.Mono; + +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.core.util.FluxUtil.withContext; + +/** + * CallContent. + */ +public class CallMediaAsync { + private final ContentsImpl contentsInternal; + private final String callConnectionId; + private final ClientLogger logger; + + CallMediaAsync(String callConnectionId, ContentsImpl contentsInternal) { + this.callConnectionId = callConnectionId; + this.contentsInternal = contentsInternal; + this.logger = new ClientLogger(CallMediaAsync.class); + } + + /** + * Play + * + * @param playSource A {@link PlaySource} representing the source to play. + * @param playTo the targets to play to + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Void for successful play request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono play(PlaySource playSource, List playTo) { + return playWithResponse(playSource, playTo, null).flatMap(FluxUtil::toMono); + } + + /** + * Play to all participants + * + * @param playSource A {@link PlaySource} representing the source to play. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Void for successful playAll request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono playToAll(PlaySource playSource) { + return playToAllWithResponse(playSource, null).flatMap(FluxUtil::toMono); + } + + /** + * Play + * + * @param playSource A {@link PlaySource} representing the source to play. + * @param playTo the targets to play to + * @param options play options. + * @return Response for successful play request. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> playWithResponse(PlaySource playSource, List playTo, + PlayOptions options) { + return playWithResponseInternal(playSource, playTo, options, null); + } + + /** + * Play to all participants + * + * @param playSource A {@link PlaySource} representing the source to play. + * @param options play options. + * @return Response for successful playAll request. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> playToAllWithResponse(PlaySource playSource, PlayOptions options) { + return playWithResponseInternal(playSource, Collections.emptyList(), options, null); + } + + /** + * Recognize operation. + * @param recognizeOptions Different attributes for recognize. + * @return Response for successful recognize request. + */ + public Mono recognize(RecognizeOptions recognizeOptions) { + return recognizeWithResponse(recognizeOptions).then(); + } + + /** + * Recognize operation + * @param recognizeOptions Different attributes for recognize. + * @return Response for successful recognize request. + */ + public Mono> recognizeWithResponse(RecognizeOptions recognizeOptions) { + return withContext(context -> recognizeWithResponseInternal(recognizeOptions, context)); + } + + Mono> recognizeWithResponseInternal(RecognizeOptions recognizeOptions, Context context) { + try { + context = context == null ? Context.NONE : context; + + RecognizeConfigurations recognizeConfigurations = recognizeOptions.getRecognizeConfiguration(); + DtmfConfigurationsInternal dtmfConfigurationsInternal = null; + if (recognizeConfigurations.getDtmfConfigurations() != null) { + DtmfConfigurations dtmfConfigurations = recognizeConfigurations.getDtmfConfigurations(); + dtmfConfigurationsInternal + = new DtmfConfigurationsInternal().setMaxTonesToCollect(dtmfConfigurations.getMaxTonesToCollect()); + + if (dtmfConfigurations.getInterToneTimeoutInSeconds() != null) { + dtmfConfigurationsInternal.setInterToneTimeoutInSeconds( + (int) dtmfConfigurations.getInterToneTimeoutInSeconds().getSeconds()); + } + if (dtmfConfigurations.getStopTones() != null) { + dtmfConfigurationsInternal.setStopTones(dtmfConfigurations.getStopTones() + .stream() + .map(stopTones -> StopTonesInternal.fromString(stopTones.toString())) + .collect(Collectors.toList())); + + } + } + RecognizeConfigurationsInternal recognizeConfigurationsInternal + = new RecognizeConfigurationsInternal().setDtmfConfigurations(dtmfConfigurationsInternal) + .setInterruptPromptAndStartRecognition( + recognizeConfigurations.isInterruptPromptAndStartRecognition()) + .setTargetParticipant( + CommunicationIdentifierConverter.convert(recognizeConfigurations.getTargetParticipant())); + if (recognizeConfigurations.getInitialSilenceTimeoutInSeconds() != null) { + recognizeConfigurationsInternal.setInitialSilenceTimeoutInSeconds( + (int) recognizeConfigurations.getInitialSilenceTimeoutInSeconds().getSeconds()); + } + + PlaySourceInternal playSourceInternal = null; + if (recognizeOptions.getPlayPrompt() != null) { + PlaySource playSource = recognizeOptions.getPlayPrompt(); + if (playSource instanceof FileSource) { + playSourceInternal = getPlaySourceInternal((FileSource) playSource); + } + } + RecognizeRequest recognizeRequest = new RecognizeRequest() + .setRecognizeInputType( + RecognizeInputTypeInternal.fromString(recognizeOptions.getRecognizeInputType().toString())) + .setRecognizeConfiguration(recognizeConfigurationsInternal) + .setStopCurrentOperations(recognizeOptions.isStopCurrentOperations()) + .setPlayPrompt(playSourceInternal) + .setOperationContext(recognizeOptions.getOperationContext()); + + return contentsInternal.recognizeWithResponseAsync(callConnectionId, recognizeRequest, context); + + } catch (RuntimeException e) { + return monoError(logger, e); + } + } + + /** + * Cancels all the queued media operations. + * @return Void + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelAllMediaOperations() { + return cancelAllMediaOperationsWithResponse().then(); + } + + /** + * Cancels all the queued media operations + * @return Response for successful playAll request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelAllMediaOperationsWithResponse() { + return cancelAllMediaOperationsWithResponseInternal(null); + } + + Mono> cancelAllMediaOperationsWithResponseInternal(Context context) { + try { + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + return contentsInternal.cancelAllMediaOperationsWithResponseAsync(callConnectionId, contextValue) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create); + }); + + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + Mono> playWithResponseInternal(PlaySource playSource, List playTo, + PlayOptions options, Context context) { + try { + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + PlayRequest request = getPlayRequest(playSource, playTo, options); + return contentsInternal.playWithResponseAsync(callConnectionId, request, contextValue) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create); + }); + + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + PlayRequest getPlayRequest(PlaySource playSource, List playTo, PlayOptions options) { + if (playSource instanceof FileSource) { + PlaySourceInternal playSourceInternal = getPlaySourceInternal((FileSource) playSource); + + PlayRequest request = new PlayRequest().setPlaySourceInfo(playSourceInternal) + .setPlayTo(playTo.stream().map(CommunicationIdentifierConverter::convert).collect(Collectors.toList())); + + if (options != null) { + request.setPlayOptions(new PlayOptionsInternal().setLoop(options.isLoop())); + request.setOperationContext(options.getOperationContext()); + } + + return request; + } + + throw logger.logExceptionAsError(new IllegalArgumentException(playSource.getClass().getCanonicalName())); + } + + private PlaySourceInternal getPlaySourceInternal(FileSource fileSource) { + FileSourceInternal fileSourceInternal = new FileSourceInternal().setUri(fileSource.getUri()); + PlaySourceInternal playSourceInternal = new PlaySourceInternal().setSourceType(PlaySourceTypeInternal.FILE) + .setFileSource(fileSourceInternal) + .setPlaySourceId(fileSource.getPlaySourceId()); + return playSourceInternal; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallRecording.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallRecording.java new file mode 100644 index 000000000000..daacf6443deb --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallRecording.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.DownloadToFileOptions; +import com.azure.communication.callingserver.models.RecordingStateResult; +import com.azure.communication.callingserver.models.StartRecordingOptions; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpRange; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; + +import java.io.OutputStream; +import java.nio.file.Path; +import java.security.InvalidParameterException; +import java.util.Objects; + +/** + * CallRecording. + */ +public class CallRecording { + private final CallRecordingAsync callRecordingAsync; + + CallRecording(CallRecordingAsync callRecordingAsync) { + this.callRecordingAsync = callRecordingAsync; + } + + /** + * Start recording of the call. + * + * @param options A {@link StartRecordingOptions} object containing different options for recording. + * @throws InvalidParameterException is recordingStateCallbackUri is absolute uri. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Result for a successful start recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecordingStateResult startRecording(StartRecordingOptions options) { + return callRecordingAsync.startRecording(options).block(); + } + + /** + * Start recording of the call. + * + * @param options A {@link StartRecordingOptions} object containing different options for recording. + * @param context A {@link Context} representing the request context. + * @throws InvalidParameterException is recordingStateCallbackUri is absolute uri. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Result for a successful start recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startRecordingWithResponse(StartRecordingOptions options, Context context) { + return callRecordingAsync.startRecordingWithResponseInternal(options, context).block(); + } + + /** + * Stop recording of the call. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopRecording(String recordingId) { + callRecordingAsync.stopRecording(recordingId).block(); + } + + /** + * Stop recording of the call. + * + * @param recordingId Recording id to stop. + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful stop recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopRecordingWithResponse(String recordingId, Context context) { + return callRecordingAsync.stopRecordingWithResponseInternal(recordingId, context).block(); + } + + /** + * Pause recording of the call. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void pauseRecording(String recordingId) { + callRecordingAsync.pauseRecording(recordingId).block(); + } + + /** + * Pause recording of the call. + * + * @param recordingId Recording id to stop. + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful pause recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response pauseRecordingWithResponse(String recordingId, Context context) { + return callRecordingAsync.pauseRecordingWithResponseInternal(recordingId, context).block(); + } + + /** + * Resume recording of the call. + * + * @param recordingId The recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resumeRecording(String recordingId) { + callRecordingAsync.resumeRecording(recordingId).block(); + } + + /** + * Resume recording of the call. + * + * @param recordingId The recording id to stop. + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful resume recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resumeRecordingWithResponse(String recordingId, final Context context) { + return callRecordingAsync.resumeRecordingWithResponseInternal(recordingId, context).block(); + } + + /** + * Get the current recording state by recording id. + * + * @param recordingId The recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful get recording state request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecordingStateResult getRecordingState(String recordingId) { + return callRecordingAsync.getRecordingState(recordingId).block(); + } + + /** + * Get the current recording state by recording id. + * + * @param recordingId The recording id to stop. + * @param context A {@link Context} representing the request context. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful get recording state request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRecordingStateWithResponse(String recordingId, Context context) { + return callRecordingAsync.getRecordingStateWithResponseInternal(recordingId, context).block(); + } + + /** + * Download the recording content, e.g. Recording's metadata, Recording video, etc., from + * {@code endpoint} and write it in the {@link OutputStream} passed as parameter. + * @param sourceEndpoint - ACS URL where the content is located. + * @param destinationStream - A stream where to write the downloaded content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void downloadTo(String sourceEndpoint, OutputStream destinationStream) { + downloadToWithResponse(sourceEndpoint, destinationStream, null, null); + } + + /** + * Download the recording content, e.g. Recording's metadata, Recording video, etc., from + * {@code endpoint} and write it in the {@link OutputStream} passed as parameter. + * @param sourceEndpoint - ACS URL where the content is located. + * @param destinationStream - A stream where to write the downloaded content. + * @param httpRange - An optional {@link HttpRange} value containing the range of bytes to download. If missing, + * the whole content will be downloaded. + * @param context A {@link Context} representing the request context. + * @return Response containing the http response information from the download. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response downloadToWithResponse(String sourceEndpoint, OutputStream destinationStream, + HttpRange httpRange, Context context) { + Objects.requireNonNull(sourceEndpoint, "'sourceEndpoint' cannot be null"); + Objects.requireNonNull(destinationStream, "'destinationStream' cannot be null"); + return callRecordingAsync.downloadToWithResponse(sourceEndpoint, destinationStream, httpRange, context).block(); + } + + /** + * Downloads the entire content. + *

      This method supports downloads up to 2GB of data. + * Use {@link #downloadTo(String, OutputStream)} to download larger blobs.

      + * + * @param sourceEndpoint - ACS URL where the content is located. + * @return The content of the blob. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData downloadContent(String sourceEndpoint) { + return callRecordingAsync.downloadContent(sourceEndpoint).block(); + } + + /** + * Downloads the entire content. + *

      This method supports downloads up to 2GB of data. + * Use {@link #downloadToWithResponse(String, OutputStream, HttpRange, Context)} to download larger blobs.

      + * + * @param sourceEndpoint ACS URL where the content is located. + * @param range An optional {@link HttpRange} value containing the range of bytes to download. If missing, + * the whole content will be downloaded. + * @param context A {@link Context} representing the request context. + * @return The content of the blob. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response downloadContentWithResponse(String sourceEndpoint, HttpRange range, Context context) { + return callRecordingAsync.downloadContentWithResponseInternal(sourceEndpoint, range, context).block(); + } + + /** + * Download the content located in {@code endpoint} into a file marked by {@code path}. + * This download will be done using parallel workers. + * @param sourceEndpoint - ACS URL where the content is located. + * @param destinationPath - File location. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void downloadTo(String sourceEndpoint, Path destinationPath) { + DownloadToFileOptions options = new DownloadToFileOptions(); + downloadToWithResponse(sourceEndpoint, destinationPath, options, null); + } + + /** + * Download the content located in {@code endpoint} into a file marked by {@code path}. + * This download will be done using parallel workers. + * @param sourceEndpoint - ACS URL where the content is located. + * @param destinationPath - File location. + * @param options - an optional {@link DownloadToFileOptions} object to modify how the + * download will work. + * @param context A {@link Context} representing the request context. + * @return Response containing the http response information from the download. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response downloadToWithResponse(String sourceEndpoint, Path destinationPath, + DownloadToFileOptions options, final Context context) { + Objects.requireNonNull(sourceEndpoint, "'sourceEndpoint' cannot be null"); + Objects.requireNonNull(destinationPath, "'destinationPath' cannot be null"); + return callRecordingAsync.downloadToWithResponseInternal(sourceEndpoint, destinationPath, options, context) + .block(); + } + + /** + * Delete the content located in the deleteEndpoint + * + * @param deleteEndpoint - ACS URL where the content is located. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRecording(String deleteEndpoint) { + deleteRecordingWithResponse(deleteEndpoint, null); + } + + /** + * Delete the content located in the deleteEndpoint + * + * @param deleteEndpoint - ACS URL where the content is located. + * @param context A {@link Context} representing the request context. + * @return Response for successful delete request.. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteRecordingWithResponse(String deleteEndpoint, Context context) { + return callRecordingAsync.deleteRecordingWithResponseInternal(deleteEndpoint, context).block(); + } + +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallRecordingAsync.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallRecordingAsync.java new file mode 100644 index 000000000000..705b64312ba6 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallRecordingAsync.java @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.ContentsImpl; +import com.azure.communication.callingserver.implementation.ServerCallsImpl; +import com.azure.communication.callingserver.implementation.accesshelpers.ErrorConstructorProxy; +import com.azure.communication.callingserver.implementation.accesshelpers.RecordingStateResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.CallLocatorInternal; +import com.azure.communication.callingserver.implementation.models.CallLocatorKindInternal; +import com.azure.communication.callingserver.implementation.models.ChannelAffinityInternal; +import com.azure.communication.callingserver.implementation.models.RecordingContentInternal; +import com.azure.communication.callingserver.implementation.models.RecordingFormatInternal; +import com.azure.communication.callingserver.implementation.models.RecordingChannelInternal; +import com.azure.communication.callingserver.implementation.models.StartCallRecordingRequestInternal; +import com.azure.communication.callingserver.models.CallLocator; +import com.azure.communication.callingserver.models.CallLocatorKind; +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.DownloadToFileOptions; +import com.azure.communication.callingserver.models.GroupCallLocator; +import com.azure.communication.callingserver.models.ParallelDownloadOptions; +import com.azure.communication.callingserver.models.RecordingStateResult; +import com.azure.communication.callingserver.models.ServerCallLocator; +import com.azure.communication.callingserver.models.StartRecordingOptions; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpRange; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.io.OutputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.channels.AsynchronousFileChannel; +import java.nio.file.OpenOption; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.security.InvalidParameterException; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.stream.Collectors; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.core.util.FluxUtil.withContext; + +/** + * CallRecordingAsync. + */ +public class CallRecordingAsync { + private final ServerCallsImpl serverCallsInternal; + private final ContentsImpl contentsInternal; + private final ClientLogger logger; + private final ContentDownloader contentDownloader; + private final HttpPipeline httpPipelineInternal; + private final String resourceEndpoint; + + CallRecordingAsync(ServerCallsImpl serverCallsInternal, ContentsImpl contentsInternal, + ContentDownloader contentDownloader, HttpPipeline httpPipelineInternal, String resourceEndpoint) { + this.serverCallsInternal = serverCallsInternal; + this.contentsInternal = contentsInternal; + this.contentDownloader = contentDownloader; + this.httpPipelineInternal = httpPipelineInternal; + this.resourceEndpoint = resourceEndpoint; + this.logger = new ClientLogger(CallRecordingAsync.class); + } + + /** + * Start recording of the call. + * + * @param options A {@link StartRecordingOptions} object containing different options for recording. + * @throws InvalidParameterException is recordingStateCallbackUri is absolute uri. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful start recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startRecording(StartRecordingOptions options) { + return startRecordingWithResponse(options).flatMap(response -> Mono.just(response.getValue())); + } + + /** + * Start recording of the call. + * + * @param options A {@link StartRecordingOptions} object containing different options for recording. + * @throws InvalidParameterException is recordingStateCallbackUri is absolute uri. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful start recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> startRecordingWithResponse(StartRecordingOptions options) { + Objects.requireNonNull(options, "'options' cannot be null."); + + return startRecordingWithResponseInternal(options, null); + } + + Mono> startRecordingWithResponseInternal(StartRecordingOptions options, + Context context) { + try { + StartCallRecordingRequestInternal request = getStartCallRecordingRequest(options); + + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + return contentsInternal.recordingWithResponseAsync(request, contextValue) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> new SimpleResponse<>(response, + RecordingStateResponseConstructorProxy.create(response.getValue()))); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + private StartCallRecordingRequestInternal getStartCallRecordingRequest(StartRecordingOptions options) { + CallLocator callLocator = options.getCallLocator(); + CallLocatorInternal callLocatorInternal + = new CallLocatorInternal().setKind(CallLocatorKindInternal.fromString(callLocator.getKind().toString())); + + if (callLocator.getKind() == CallLocatorKind.GROUP_CALL_LOCATOR) { + callLocatorInternal.setGroupCallId(((GroupCallLocator) callLocator).getGroupCallId()); + } else if (callLocator.getKind() == CallLocatorKind.SERVER_CALL_LOCATOR) { + callLocatorInternal.setServerCallId(((ServerCallLocator) callLocator).getServerCallId()); + } else { + throw logger.logExceptionAsError(new InvalidParameterException("callLocator has invalid kind.")); + } + + StartCallRecordingRequestInternal request + = new StartCallRecordingRequestInternal().setCallLocator(callLocatorInternal); + + if (options.getRecordingContent() != null) { + request + .setRecordingContentType(RecordingContentInternal.fromString(options.getRecordingContent().toString())); + } + if (options.getRecordingFormat() != null) { + request.setRecordingFormatType(RecordingFormatInternal.fromString(options.getRecordingFormat().toString())); + } + if (options.getRecordingChannel() != null) { + request + .setRecordingChannelType(RecordingChannelInternal.fromString(options.getRecordingChannel().toString())); + } + if (options.getRecordingStateCallbackUrl() != null) { + request.setRecordingStateCallbackUri(options.getRecordingStateCallbackUrl()); + } + if (options.getChannelAffinity() != null) { + List channelAffinityInternal = options.getChannelAffinity() + .stream() + .map(c -> new ChannelAffinityInternal().setChannel(c.getChannel()) + .setParticipant(CommunicationIdentifierConverter.convert(c.getParticipant()))) + .collect(Collectors.toList()); + request.setChannelAffinity(channelAffinityInternal); + } + + return request; + } + + /** + * Stop recording of the call. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful stop recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stopRecording(String recordingId) { + return stopRecordingWithResponse(recordingId).then(); + } + + /** + * Stop recording of the call. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful stop recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopRecordingWithResponse(String recordingId) { + return stopRecordingWithResponseInternal(recordingId, null); + } + + Mono> stopRecordingWithResponseInternal(String recordingId, Context context) { + try { + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + return serverCallsInternal.stopRecordingWithResponseAsync(recordingId, contextValue) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Pause recording of the call. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful pause recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono pauseRecording(String recordingId) { + return pauseRecordingWithResponse(recordingId).then(); + } + + /** + * Pause recording of the call. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful pause recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> pauseRecordingWithResponse(String recordingId) { + return pauseRecordingWithResponseInternal(recordingId, null); + } + + Mono> pauseRecordingWithResponseInternal(String recordingId, Context context) { + try { + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + return serverCallsInternal.pauseRecordingWithResponseAsync(recordingId, contextValue) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Resume recording of the call. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a successful resume recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resumeRecording(String recordingId) { + return resumeRecordingWithResponse(recordingId).then(); + } + + /** + * Resume recording of the call. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a successful resume recording request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resumeRecordingWithResponse(String recordingId) { + return resumeRecordingWithResponseInternal(recordingId, null); + } + + Mono> resumeRecordingWithResponseInternal(String recordingId, Context context) { + try { + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + return serverCallsInternal.resumeRecordingWithResponseAsync(recordingId, contextValue) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Get current recording state by recording id. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful get recording state request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRecordingState(String recordingId) { + return getRecordingStateWithResponse(recordingId).flatMap(response -> Mono.just(response.getValue())); + } + + /** + * Get current recording state by recording id. + * + * @param recordingId Recording id to stop. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for a successful get recording state request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRecordingStateWithResponse(String recordingId) { + return getRecordingStateWithResponseInternal(recordingId, null); + } + + Mono> getRecordingStateWithResponseInternal(String recordingId, Context context) { + try { + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + return serverCallsInternal.getRecordingPropertiesWithResponseAsync(recordingId, contextValue) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> new SimpleResponse<>(response, + RecordingStateResponseConstructorProxy.create(response.getValue()))); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Download the recording content, e.g. Recording's metadata, Recording video, from the ACS endpoint + * passed as parameter. + * @param sourceEndpoint - URL where the content is located. + * @return A {@link Flux} object containing the byte stream of the content requested. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public Flux downloadStream(String sourceEndpoint) { + return downloadStreamWithResponse(sourceEndpoint, null).map(Response::getValue).flux().flatMap(flux -> flux); + } + + /** + * Download the recording content, (e.g. Recording's metadata, Recording video, etc.) from the {@code endpoint}. + * @param sourceEndpoint - URL where the content is located. + * @param range - An optional {@link HttpRange} value containing the range of bytes to download. If missing, + * the whole content will be downloaded. + * @return A {@link Mono} object containing a {@link Response} with the byte stream of the content requested. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> downloadStreamWithResponse(String sourceEndpoint, HttpRange range) { + return downloadStreamWithResponseInternal(sourceEndpoint, range, null); + } + + Mono>> downloadStreamWithResponseInternal(String sourceEndpoint, HttpRange range, + Context context) { + try { + Objects.requireNonNull(sourceEndpoint, "'sourceEndpoint' cannot be null"); + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + return contentDownloader.downloadStreamWithResponse(sourceEndpoint, range, contextValue); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Reads the entire content. + * + *

      Code Samples

      + * + *

      This method supports downloads up to 2GB of data. + * Use {@link #downloadStream(String)} ()} to download larger blobs.

      + * + * @param sourceEndpoint - URL where the content is located. + * @return A reactive response containing the content data. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono downloadContent(String sourceEndpoint) { + return downloadStreamWithResponse(sourceEndpoint, null) + .flatMap(response -> BinaryData.fromFlux(response.getValue())); + } + + /** + * Reads a range of bytes from a content. + * + *

      This method supports downloads up to 2GB of data. + * Use {@link #downloadStreamWithResponse(String, HttpRange)} + * to download larger blobs.

      + * + * @param sourceEndpoint - URL where the content is located. + * @param range - An optional {@link HttpRange} value containing the range of bytes to download. If missing, + * the whole content will be downloaded. + * @return A reactive response containing the blob data. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> downloadContentWithResponse(String sourceEndpoint, HttpRange range) { + return downloadContentWithResponseInternal(sourceEndpoint, range, null); + } + + Mono> downloadContentWithResponseInternal(String sourceEndpoint, HttpRange range, + Context context) { + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + return downloadStreamWithResponseInternal(sourceEndpoint, range, contextValue) + .flatMap(response -> BinaryData.fromFlux(response.getValue()) + .map(data -> new SimpleResponse<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), data))); + }); + } + + /** + * Download the content located in {@code endpoint} into a file marked by {@code path}. + * This download will be done using parallel workers. + * @param sourceEndpoint - ACS URL where the content is located. + * @param destinationPath - File location. + * @return Response for a successful downloadTo request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono downloadTo(String sourceEndpoint, Path destinationPath) { + try { + DownloadToFileOptions options = new DownloadToFileOptions(); + return downloadToWithResponse(sourceEndpoint, destinationPath, options).then(); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Download the content located in {@code endpoint} into a file marked by {@code path}. + * This download will be done using parallel workers. + * @param sourceEndpoint - ACS URL where the content is located. + * @param destinationPath - File location. + * @param options - an optional {@link DownloadToFileOptions} object to modify how the + * download will work. + * @return Response containing the http response information from the download. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> downloadToWithResponse(String sourceEndpoint, Path destinationPath, + DownloadToFileOptions options) { + return downloadToWithResponseInternal(sourceEndpoint, destinationPath, options, null); + } + + Mono> downloadToWithResponseInternal(String sourceEndpoint, Path destinationPath, + DownloadToFileOptions options, Context context) { + Objects.requireNonNull(sourceEndpoint, "'sourceEndpoint' cannot be null"); + Objects.requireNonNull(destinationPath, "'destinationPath' cannot be null"); + + Set openOptions = new HashSet<>(); + + if (options.isOverwrite()) { + openOptions.add(StandardOpenOption.CREATE); + } else { + openOptions.add(StandardOpenOption.CREATE_NEW); + } + openOptions.add(StandardOpenOption.WRITE); + + try { + AsynchronousFileChannel file = AsynchronousFileChannel.open(destinationPath, openOptions, null); + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + return downloadToWithResponse(sourceEndpoint, destinationPath, file, options, contextValue); + }); + } catch (IOException ex) { + return monoError(logger, new RuntimeException(ex)); + } + } + + Mono> downloadToWithResponse(String sourceEndpoint, OutputStream destinationStream, + HttpRange httpRange, Context context) { + + return contentDownloader.downloadToStreamWithResponse(sourceEndpoint, destinationStream, httpRange, context); + } + + Mono> downloadToWithResponse(String sourceEndpoint, Path destinationPath, + AsynchronousFileChannel fileChannel, DownloadToFileOptions options, Context context) { + ParallelDownloadOptions finalParallelDownloadOptions = options.getParallelDownloadOptions() == null + ? new ParallelDownloadOptions() + : options.getParallelDownloadOptions(); + + return Mono.just(fileChannel) + .flatMap(c -> contentDownloader.downloadToFileWithResponse(sourceEndpoint, c, finalParallelDownloadOptions, + context)) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .doFinally(signalType -> contentDownloader.downloadToFileCleanup(fileChannel, destinationPath, signalType)); + } + + /** + * Delete the content located at the deleteEndpoint + * @param deleteEndpoint - ACS URL where the content is located. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return Response for successful delete request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteRecording(String deleteEndpoint) { + try { + return deleteRecordingWithResponseInternal(deleteEndpoint, null) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .then(); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Delete the content located at the deleteEndpoint + * Recording deletion will be done using parallel workers. + * @param deleteEndpoint - ACS URL where the content is located. + * @throws CallingServerErrorException thrown if the request is rejected by server. + * @return Response for successful delete request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteRecordingWithResponse(String deleteEndpoint) { + return deleteRecordingWithResponseInternal(deleteEndpoint, null); + } + + Mono> deleteRecordingWithResponseInternal(String deleteEndpoint, Context context) { + HttpRequest request = new HttpRequest(HttpMethod.DELETE, deleteEndpoint); + URL urlToSignWith = getUrlToSignRequestWith(deleteEndpoint); + try { + return withContext(contextValue -> { + contextValue = context == null ? contextValue : context; + contextValue = contextValue.addData("hmacSignatureURL", urlToSignWith); + return httpPipelineInternal.send(request, contextValue) + .onErrorMap(HttpResponseException.class, ErrorConstructorProxy::create) + .map(response -> new SimpleResponse<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), null)); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + private URL getUrlToSignRequestWith(String endpoint) { + try { + String path = new URL(endpoint).getPath(); + + if (path.startsWith("/")) { + path = path.substring(1); + } + + return new URL(resourceEndpoint + path); + } catch (MalformedURLException ex) { + throw logger.logExceptionAsError(new IllegalArgumentException(ex)); + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallingServerServiceVersion.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallingServerServiceVersion.java new file mode 100644 index 000000000000..b0d6935df35d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallingServerServiceVersion.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.core.util.ServiceVersion; + +/** + * Versions of CallingServer service supported by this client library. + */ +public enum CallingServerServiceVersion implements ServiceVersion { + /** + * Service version {@code 2022-04-07-preview}. + */ + V2022_04_07_PREVIEW("2022-04-07-preview"), + /** + * Service version {@code 2021-11-15-preview}. + */ + V2021_11_15_PREVIEW("2021-11-15-preview"); + + private final String version; + + CallingServerServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library + * + * @return The latest {@link CallingServerServiceVersion} object. + */ + public static CallingServerServiceVersion getLatest() { + return V2022_04_07_PREVIEW; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ContentDownloader.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ContentDownloader.java new file mode 100644 index 000000000000..8d243e707f03 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ContentDownloader.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.Constants; +import com.azure.communication.callingserver.implementation.accesshelpers.ErrorConstructorProxy; +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.ParallelDownloadOptions; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpRange; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +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.FluxUtil; +import com.azure.core.util.ProgressListener; +import com.azure.core.util.ProgressReporter; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.publisher.SignalType; +import reactor.core.scheduler.Schedulers; +import reactor.util.function.Tuple2; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.UncheckedIOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.channels.AsynchronousFileChannel; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.function.Function; + +import static java.lang.StrictMath.toIntExact; + +class ContentDownloader { + private final String resourceEndpoint; + private final HttpPipeline httpPipeline; + private final ClientLogger logger = new ClientLogger(ContentDownloader.class); + + ContentDownloader(String resourceEndpoint, HttpPipeline httpPipeline) { + this.resourceEndpoint = resourceEndpoint; + this.httpPipeline = httpPipeline; + } + + Mono> downloadToStreamWithResponse(String sourceEndpoint, OutputStream destinationStream, + HttpRange httpRange, Context context) { + return downloadStreamWithResponse(sourceEndpoint, httpRange, context).flatMap(response -> FluxUtil + .writeToOutputStream(response.getValue(), destinationStream) + .thenReturn( + new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null))); + } + + Mono>> downloadStreamWithResponse(String sourceEndpoint, HttpRange httpRange, + Context context) { + Mono httpResponse = makeDownloadRequest(sourceEndpoint, httpRange, context); + return httpResponse.map(response -> { + Flux result = getFluxStream(response, sourceEndpoint, httpRange, context); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), result); + }); + } + + Mono> downloadToFileWithResponse(String sourceEndpoint, AsynchronousFileChannel destinationFile, + ParallelDownloadOptions parallelDownloadOptions, Context context) { + + Function>>> downloadFunc + = range -> downloadStreamWithResponse(sourceEndpoint, range, context); + + return downloadFirstChunk(parallelDownloadOptions, downloadFunc).flatMap(setupTuple2 -> { + long newCount = setupTuple2.getT1(); + int numChunks = calculateNumBlocks(newCount, parallelDownloadOptions.getBlockSize()); + + // In case it is an empty blob, this ensures we still actually perform a download operation. + numChunks = numChunks == 0 ? 1 : numChunks; + + Response> initialResponse = setupTuple2.getT2(); + ProgressListener progressListener = parallelDownloadOptions.getProgressListener(); + ProgressReporter progressReporter + = progressListener == null ? null : ProgressReporter.withProgressListener(progressListener); + return Flux.range(0, numChunks) + .flatMap(chunkNum -> downloadChunk(chunkNum, initialResponse, parallelDownloadOptions, newCount, + downloadFunc, + response -> writeBodyToFile(response, destinationFile, chunkNum, parallelDownloadOptions, + progressReporter == null ? null : progressReporter.createChild()).flux())) + .then(Mono.just(new SimpleResponse<>(initialResponse, null))); + }); + } + + private Flux getFluxStream(HttpResponse httpResponse, String sourceEndpoint, HttpRange httpRange, + Context context) { + return FluxUtil.createRetriableDownloadFlux(() -> getResponseBody(httpResponse), + (Throwable throwable, Long aLong) -> { + if (throwable instanceof CallingServerErrorException) { + CallingServerErrorException exception = (CallingServerErrorException) throwable; + if (exception.getResponse().getStatusCode() == 416) { + return makeDownloadRequest(sourceEndpoint, null, context).map(this::getResponseBody) + .flux() + .flatMap(flux -> flux); + } + } + + HttpRange range; + if (httpRange != null) { + range = new HttpRange(aLong + 1, httpRange.getLength() - aLong - 1); + } else { + range = new HttpRange(aLong + 1); + } + + return makeDownloadRequest(sourceEndpoint, range, context).map(this::getResponseBody) + .flux() + .flatMap(flux -> flux); + }, Constants.ContentDownloader.MAX_RETRIES); + } + + private Flux getResponseBody(HttpResponse response) { + switch (response.getStatusCode()) { + case 200: + case 206: + return response.getBody(); + + case 416: // Retriable with new HttpRange, potentially bytes=0- + return FluxUtil.fluxError(logger, ErrorConstructorProxy + .create(new HttpResponseException(formatExceptionMessage(response), response))); + + default: + throw logger.logExceptionAsError(ErrorConstructorProxy + .create(new HttpResponseException(formatExceptionMessage(response), response))); + } + } + + private String formatExceptionMessage(HttpResponse httpResponse) { + return String.format("Service Request failed!%nStatus: %s", httpResponse.getStatusCode()); + } + + private Mono makeDownloadRequest(String sourceEndpoint, HttpRange httpRange, Context context) { + HttpRequest request = getHttpRequest(sourceEndpoint, httpRange); + URL urlToSignWith = getUrlToSignRequestWith(sourceEndpoint); + + Context finalContext; + if (context == null) { + finalContext = new Context("hmacSignatureURL", urlToSignWith); + } else { + finalContext = context.addData("hmacSignatureURL", urlToSignWith); + } + + return httpPipeline.send(request, finalContext); + } + + private URL getUrlToSignRequestWith(String endpoint) { + try { + String path = new URL(endpoint).getPath(); + + if (path.startsWith("/")) { + path = path.substring(1); + } + + return new URL(resourceEndpoint + path); + } catch (MalformedURLException ex) { + throw logger.logExceptionAsError(new IllegalArgumentException(ex)); + } + } + + private HttpRequest getHttpRequest(String sourceEndpoint, HttpRange httpRange) { + HttpRequest request = new HttpRequest(HttpMethod.GET, sourceEndpoint); + + if (null != httpRange) { + request.setHeader(Constants.HeaderNames.RANGE, httpRange.toString()); + } + + return request; + } + + private Mono>>> downloadFirstChunk( + ParallelDownloadOptions parallelDownloadOptions, + Function>>> downloader) { + return downloader.apply(new HttpRange(0, parallelDownloadOptions.getBlockSize())) + .subscribeOn(Schedulers.boundedElastic()) + .flatMap(response -> { + // Extract the total length of the blob from the contentRange header. e.g. "bytes 1-6/7" + long totalLength + = extractTotalBlobLength(response.getHeaders().getValue(Constants.HeaderNames.CONTENT_RANGE)); + + return Mono.zip(Mono.just(totalLength), Mono.just(response)); + }); + } + + private long extractTotalBlobLength(String contentRange) { + return contentRange == null ? 0 : Long.parseLong(contentRange.split("/")[1]); + } + + private int calculateNumBlocks(long dataSize, long blockLength) { + // Can successfully cast to an int because MaxBlockSize is an int, which this expression must be less than. + int numBlocks = toIntExact(dataSize / blockLength); + // Include an extra block for trailing data. + if (dataSize % blockLength != 0) { + numBlocks++; + } + return numBlocks; + } + + private Flux downloadChunk(Integer chunkNum, Response> initialResponse, + ParallelDownloadOptions parallelDownloadOptions, long newCount, + Function>>> downloader, + Function>, Flux> returnTransformer) { + if (chunkNum == 0) { + return returnTransformer.apply(initialResponse); + } + + // Calculate whether we need a full chunk or something smaller because we are at the end. + long modifier = chunkNum.longValue() * parallelDownloadOptions.getBlockSize(); + long chunkSizeActual = Math.min(parallelDownloadOptions.getBlockSize(), newCount - modifier); + HttpRange chunkRange = new HttpRange(modifier, chunkSizeActual); + + // Make the download call. + return downloader.apply(chunkRange).subscribeOn(Schedulers.boundedElastic()).flatMapMany(returnTransformer); + } + + private static Mono writeBodyToFile(Response> response, AsynchronousFileChannel file, + long chunkNum, ParallelDownloadOptions parallelDownloadOptions, ProgressReporter progressReporter) { + // Extract the body. + Flux data = response.getValue(); + + // Report progress as necessary. + if (progressReporter != null) { + data = addProgressReporting(data, progressReporter); + } + + // Write to the file. + return FluxUtil.writeFile(data, file, chunkNum * parallelDownloadOptions.getBlockSize()); + } + + private static Flux addProgressReporting(Flux data, ProgressReporter progressReporter) { + return Mono.just(progressReporter).flatMapMany(reporter -> { + /* + Each time there is a new subscription, we will rewind the progress. This is desirable specifically + for retries, which resubscribe on each try. The first time this Flux is subscribed to, the + rewind will be a noop as there will have been no progress made. Subsequent rewinds will work as + expected. + */ + reporter.reset(); + + /* + Every time we emit some data, report it to the Tracker, which will pass it on to the end user. + */ + return data.doOnNext(buffer -> progressReporter.reportProgress(buffer.remaining())); + }); + } + + void downloadToFileCleanup(AsynchronousFileChannel channel, Path filePath, SignalType signalType) { + try { + channel.close(); + if (!signalType.equals(SignalType.ON_COMPLETE)) { + Files.deleteIfExists(filePath); + logger.verbose("Downloading to file failed. Cleaning up resources."); + } + } catch (IOException e) { + throw logger.logExceptionAsError(new UncheckedIOException(e)); + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/EventHandler.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/EventHandler.java new file mode 100644 index 000000000000..5ff392f11416 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/EventHandler.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.events.AddParticipantsFailedEvent; +import com.azure.communication.callingserver.models.events.AddParticipantsSucceededEvent; +import com.azure.communication.callingserver.models.events.CallAutomationEventBase; +import com.azure.communication.callingserver.models.events.CallConnectedEvent; +import com.azure.communication.callingserver.models.events.CallDisconnectedEvent; +import com.azure.communication.callingserver.models.events.CallTransferAcceptedEvent; +import com.azure.communication.callingserver.models.events.CallTransferFailedEvent; +import com.azure.communication.callingserver.models.events.ParticipantsUpdatedEvent; +import com.azure.communication.callingserver.models.events.PlayCompleted; +import com.azure.communication.callingserver.models.events.PlayFailed; +import com.azure.communication.callingserver.models.events.RecordingStateChangedEvent; +import com.azure.core.models.CloudEvent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Event handler for taking care of event related tasks. + */ +public final class EventHandler { + private static final ClientLogger LOGGER = new ClientLogger(EventHandler.class); + + /** + * Initializes a new instance of EventHandler. + */ + public EventHandler() { + } + + /*** + * Returns a list of events from request's body. + * + * @param requestBody Body of the event request. + * @throws RuntimeException Any exceptions occurs at runtime. + * @return a list of CallAutomationEventBase + */ + public static List parseEventList(String requestBody) { + List callAutomationBaseEvents; + callAutomationBaseEvents = parseCloudEventList(requestBody); + + return callAutomationBaseEvents; + } + + /*** + * Returns the first(or the only) event of request's body. + * + * @param requestBody Body of the event request. + * @throws RuntimeException Any exceptions occurs at runtime. + * @return the first(or the only) event if request is not empty, otherwise null is returned. + */ + public static CallAutomationEventBase parseEvent(String requestBody) { + List callAutomationBaseEvents = parseEventList(requestBody); + return callAutomationBaseEvents.isEmpty() ? null : callAutomationBaseEvents.get(0); + } + + private static List parseCloudEventList(String requestBody) { + try { + List cloudEvents; + List callAutomationBaseEvents = new ArrayList<>(); + + try { + cloudEvents = CloudEvent.fromString(requestBody); + } catch (RuntimeException e) { + return callAutomationBaseEvents; + } + + for (CloudEvent cloudEvent : cloudEvents) { + CallAutomationEventBase temp + = parseSingleCloudEvent(cloudEvent.getData().toString(), cloudEvent.getType()); + if (temp != null) { + callAutomationBaseEvents.add(temp); + } + } + return callAutomationBaseEvents; + } catch (RuntimeException e) { + throw LOGGER.logExceptionAsError(e); + } + } + + private static CallAutomationEventBase parseSingleCloudEvent(String data, String eventType) { + try (JsonReader jsonReader = JsonProviders.createReader(data)) { + if (Objects.equals(eventType, "Microsoft.Communication.CallConnected")) { + return CallConnectedEvent.fromJson(jsonReader); + } else if (Objects.equals(eventType, "Microsoft.Communication.CallDisconnected")) { + return CallDisconnectedEvent.fromJson(jsonReader); + } else if (Objects.equals(eventType, "Microsoft.Communication.AddParticipantsFailed")) { + return AddParticipantsFailedEvent.fromJson(jsonReader); + } else if (Objects.equals(eventType, "Microsoft.Communication.AddParticipantsSucceeded")) { + return AddParticipantsSucceededEvent.fromJson(jsonReader); + } else if (Objects.equals(eventType, "Microsoft.Communication.CallTransferAccepted")) { + return CallTransferAcceptedEvent.fromJson(jsonReader); + } else if (Objects.equals(eventType, "Microsoft.Communication.CallTransferFailed")) { + return CallTransferFailedEvent.fromJson(jsonReader); + } else if (Objects.equals(eventType, "Microsoft.Communication.ParticipantsUpdated")) { + return ParticipantsUpdatedEvent.fromJson(jsonReader); + } else if (Objects.equals(eventType, "Microsoft.Communication.CallRecordingStateChanged")) { + return RecordingStateChangedEvent.fromJson(jsonReader); + } else if (Objects.equals(eventType, "Microsoft.Communication.PlayCompleted")) { + return PlayCompleted.fromJson(jsonReader); + } else if (Objects.equals(eventType, "Microsoft.Communication.PlayFailed")) { + return PlayFailed.fromJson(jsonReader); + } + + return null; + } catch (RuntimeException e) { + throw LOGGER.logExceptionAsError(e); + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/AzureCommunicationCallingServerServiceImpl.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/AzureCommunicationCallingServerServiceImpl.java new file mode 100644 index 000000000000..7f10577a07c7 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/AzureCommunicationCallingServerServiceImpl.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** Initializes a new instance of the AzureCommunicationCallingServerService type. */ +public final class AzureCommunicationCallingServerServiceImpl { + /** The endpoint of the Azure Communication resource. */ + private final String endpoint; + + /** + * Gets The endpoint of the Azure Communication resource. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The ServerCallingsImpl object to access its operations. */ + private final ServerCallingsImpl serverCallings; + + /** + * Gets the ServerCallingsImpl object to access its operations. + * + * @return the ServerCallingsImpl object. + */ + public ServerCallingsImpl getServerCallings() { + return this.serverCallings; + } + + /** The CallConnectionsImpl object to access its operations. */ + private final CallConnectionsImpl callConnections; + + /** + * Gets the CallConnectionsImpl object to access its operations. + * + * @return the CallConnectionsImpl object. + */ + public CallConnectionsImpl getCallConnections() { + return this.callConnections; + } + + /** The ContentsImpl object to access its operations. */ + private final ContentsImpl contents; + + /** + * Gets the ContentsImpl object to access its operations. + * + * @return the ContentsImpl object. + */ + public ContentsImpl getContents() { + return this.contents; + } + + /** The ServerCallsImpl object to access its operations. */ + private final ServerCallsImpl serverCalls; + + /** + * Gets the ServerCallsImpl object to access its operations. + * + * @return the ServerCallsImpl object. + */ + public ServerCallsImpl getServerCalls() { + return this.serverCalls; + } + + /** + * Initializes an instance of AzureCommunicationCallingServerService client. + * + * @param endpoint The endpoint of the Azure Communication resource. + * @param apiVersion Api Version. + */ + AzureCommunicationCallingServerServiceImpl(String endpoint, String apiVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion); + } + + /** + * Initializes an instance of AzureCommunicationCallingServerService client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The endpoint of the Azure Communication resource. + * @param apiVersion Api Version. + */ + AzureCommunicationCallingServerServiceImpl(HttpPipeline httpPipeline, String endpoint, String apiVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion); + } + + /** + * Initializes an instance of AzureCommunicationCallingServerService client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The endpoint of the Azure Communication resource. + * @param apiVersion Api Version. + */ + AzureCommunicationCallingServerServiceImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + String endpoint, String apiVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + this.serverCallings = new ServerCallingsImpl(this); + this.callConnections = new CallConnectionsImpl(this); + this.contents = new ContentsImpl(this); + this.serverCalls = new ServerCallsImpl(this); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/AzureCommunicationCallingServerServiceImplBuilder.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/AzureCommunicationCallingServerServiceImplBuilder.java new file mode 100644 index 000000000000..950c78f9a770 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/AzureCommunicationCallingServerServiceImplBuilder.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.Configuration; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** A builder for creating a new instance of the AzureCommunicationCallingServerService type. */ +@ServiceClientBuilder(serviceClients = { AzureCommunicationCallingServerServiceImpl.class }) +public final class AzureCommunicationCallingServerServiceImplBuilder { + private static final String SDK_NAME = "name"; + + private static final String SDK_VERSION = "version"; + + private final Map properties = new HashMap<>(); + + /** Create an instance of the AzureCommunicationCallingServerServiceImplBuilder. */ + public AzureCommunicationCallingServerServiceImplBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The endpoint of the Azure Communication resource. + */ + private String endpoint; + + /** + * Sets The endpoint of the Azure Communication resource. + * + * @param endpoint the endpoint value. + * @return the AzureCommunicationCallingServerServiceImplBuilder. + */ + public AzureCommunicationCallingServerServiceImplBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Api Version + */ + private String apiVersion; + + /** + * Sets Api Version. + * + * @param apiVersion the apiVersion value. + * @return the AzureCommunicationCallingServerServiceImplBuilder. + */ + public AzureCommunicationCallingServerServiceImplBuilder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the AzureCommunicationCallingServerServiceImplBuilder. + */ + public AzureCommunicationCallingServerServiceImplBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the AzureCommunicationCallingServerServiceImplBuilder. + */ + public AzureCommunicationCallingServerServiceImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The HTTP client used to send the request. + */ + private HttpClient httpClient; + + /** + * Sets The HTTP client used to send the request. + * + * @param httpClient the httpClient value. + * @return the AzureCommunicationCallingServerServiceImplBuilder. + */ + public AzureCommunicationCallingServerServiceImplBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The configuration store that is used during construction of the service + * client. + */ + private Configuration configuration; + + /** + * Sets The configuration store that is used during construction of the service client. + * + * @param configuration the configuration value. + * @return the AzureCommunicationCallingServerServiceImplBuilder. + */ + public AzureCommunicationCallingServerServiceImplBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + private HttpLogOptions httpLogOptions; + + /** + * Sets The logging configuration for HTTP requests and responses. + * + * @param httpLogOptions the httpLogOptions value. + * @return the AzureCommunicationCallingServerServiceImplBuilder. + */ + public AzureCommunicationCallingServerServiceImplBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if + * applicable. + */ + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the AzureCommunicationCallingServerServiceImplBuilder. + */ + public AzureCommunicationCallingServerServiceImplBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /* + * The list of Http pipeline policies to add. + */ + private final List pipelinePolicies; + + /** + * Adds a custom Http pipeline policy. + * + * @param customPolicy The custom Http pipeline policy to add. + * @return the AzureCommunicationCallingServerServiceImplBuilder. + */ + public AzureCommunicationCallingServerServiceImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { + pipelinePolicies.add(customPolicy); + return this; + } + + /** + * Builds an instance of AzureCommunicationCallingServerServiceImpl with the provided parameters. + * + * @return an instance of AzureCommunicationCallingServerServiceImpl. + */ + public AzureCommunicationCallingServerServiceImpl buildClient() { + if (apiVersion == null) { + this.apiVersion = "2022-04-07-preview"; + } + if (pipeline == null) { + this.pipeline = createHttpPipeline(); + } + if (serializerAdapter == null) { + this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); + } + AzureCommunicationCallingServerServiceImpl client + = new AzureCommunicationCallingServerServiceImpl(pipeline, serializerAdapter, endpoint, apiVersion); + return client; + } + + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + if (httpLogOptions == null) { + httpLogOptions = new HttpLogOptions(); + } + List policies = new ArrayList<>(); + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + policies + .add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); + policies.add(new CookiePolicy()); + policies.addAll(this.pipelinePolicies); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + return httpPipeline; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/CallConnectionsImpl.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/CallConnectionsImpl.java new file mode 100644 index 000000000000..645fc1ce523b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/CallConnectionsImpl.java @@ -0,0 +1,974 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation; + +import com.azure.communication.callingserver.implementation.models.AcsCallParticipantInternal; +import com.azure.communication.callingserver.implementation.models.AddParticipantsRequestInternal; +import com.azure.communication.callingserver.implementation.models.AddParticipantsResponseInternal; +import com.azure.communication.callingserver.implementation.models.CallConnectionPropertiesInternal; +import com.azure.communication.callingserver.implementation.models.GetParticipantsResponseInternal; +import com.azure.communication.callingserver.implementation.models.RemoveParticipantsRequestInternal; +import com.azure.communication.callingserver.implementation.models.RemoveParticipantsResponseInternal; +import com.azure.communication.callingserver.implementation.models.TransferCallResponseInternal; +import com.azure.communication.callingserver.implementation.models.TransferToParticipantRequestInternal; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CallConnections. */ +public final class CallConnectionsImpl { + /** The proxy service used to perform REST calls. */ + private final CallConnectionsService service; + + /** The service client containing this operation class. */ + private final AzureCommunicationCallingServerServiceImpl client; + + /** + * Initializes an instance of CallConnectionsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CallConnectionsImpl(AzureCommunicationCallingServerServiceImpl client) { + this.service + = RestProxy.create(CallConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureCommunicationCallingServerServiceCallConnections to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureCommunicationCa") + public interface CallConnectionsService { + @Get("/calling/callConnections/{callConnectionId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getCall(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Delete("/calling/callConnections/{callConnectionId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> hangupCall(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + Context context); + + @Post("/calling/callConnections/{callConnectionId}:terminate") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> terminateCall(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + Context context); + + @Post("/calling/callConnections/{callConnectionId}:transferToParticipant") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> transferToParticipant(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TransferToParticipantRequestInternal transferToParticipantRequest, + @HeaderParam("Accept") String accept, Context context); + + @Get("/calling/callConnections/{callConnectionId}/participants") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getParticipants(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Post("/calling/callConnections/{callConnectionId}/participants:add") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> addParticipant(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AddParticipantsRequestInternal addParticipantsRequest, + @HeaderParam("Accept") String accept, Context context); + + @Post("/calling/callConnections/{callConnectionId}/participants:remove") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> removeParticipants(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RemoveParticipantsRequestInternal removeParticipantsRequest, + @HeaderParam("Accept") String accept, Context context); + + @Get("/calling/callConnections/{callConnectionId}/participants/{participantMri}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getParticipant(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @PathParam("participantMri") String participantMri, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get call connection. + * + * @param callConnectionId The call connection id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getCallWithResponseAsync(String callConnectionId) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getCall(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), accept, context)); + } + + /** + * Get call connection. + * + * @param callConnectionId The call connection id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getCallWithResponseAsync(String callConnectionId, + Context context) { + final String accept = "application/json"; + return service.getCall(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), accept, + context); + } + + /** + * Get call connection. + * + * @param callConnectionId The call connection id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getCallAsync(String callConnectionId) { + return getCallWithResponseAsync(callConnectionId).flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get call connection. + * + * @param callConnectionId The call connection id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getCallAsync(String callConnectionId, Context context) { + return getCallWithResponseAsync(callConnectionId, context) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get call connection. + * + * @param callConnectionId The call connection id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallConnectionPropertiesInternal getCall(String callConnectionId) { + return getCallAsync(callConnectionId).block(); + } + + /** + * Get call connection. + * + * @param callConnectionId The call connection id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCallWithResponse(String callConnectionId, Context context) { + return getCallWithResponseAsync(callConnectionId, context).block(); + } + + /** + * Hangup the call. + * + * @param callConnectionId The call connection id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> hangupCallWithResponseAsync(String callConnectionId) { + return FluxUtil.withContext(context -> service.hangupCall(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), context)); + } + + /** + * Hangup the call. + * + * @param callConnectionId The call connection id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> hangupCallWithResponseAsync(String callConnectionId, Context context) { + return service.hangupCall(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), context); + } + + /** + * Hangup the call. + * + * @param callConnectionId The call connection id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono hangupCallAsync(String callConnectionId) { + return hangupCallWithResponseAsync(callConnectionId).flatMap((Response res) -> Mono.empty()); + } + + /** + * Hangup the call. + * + * @param callConnectionId The call connection id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono hangupCallAsync(String callConnectionId, Context context) { + return hangupCallWithResponseAsync(callConnectionId, context).flatMap((Response res) -> Mono.empty()); + } + + /** + * Hangup the call. + * + * @param callConnectionId The call connection id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void hangupCall(String callConnectionId) { + hangupCallAsync(callConnectionId).block(); + } + + /** + * Hangup the call. + * + * @param callConnectionId The call connection id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response hangupCallWithResponse(String callConnectionId, Context context) { + return hangupCallWithResponseAsync(callConnectionId, context).block(); + } + + /** + * Terminate a call using CallConnectionId. + * + * @param callConnectionId The terminate call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> terminateCallWithResponseAsync(String callConnectionId) { + return FluxUtil.withContext(context -> service.terminateCall(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), context)); + } + + /** + * Terminate a call using CallConnectionId. + * + * @param callConnectionId The terminate call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> terminateCallWithResponseAsync(String callConnectionId, Context context) { + return service.terminateCall(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), context); + } + + /** + * Terminate a call using CallConnectionId. + * + * @param callConnectionId The terminate call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono terminateCallAsync(String callConnectionId) { + return terminateCallWithResponseAsync(callConnectionId).flatMap((Response res) -> Mono.empty()); + } + + /** + * Terminate a call using CallConnectionId. + * + * @param callConnectionId The terminate call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono terminateCallAsync(String callConnectionId, Context context) { + return terminateCallWithResponseAsync(callConnectionId, context).flatMap((Response res) -> Mono.empty()); + } + + /** + * Terminate a call using CallConnectionId. + * + * @param callConnectionId The terminate call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void terminateCall(String callConnectionId) { + terminateCallAsync(callConnectionId).block(); + } + + /** + * Terminate a call using CallConnectionId. + * + * @param callConnectionId The terminate call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response terminateCallWithResponse(String callConnectionId, Context context) { + return terminateCallWithResponseAsync(callConnectionId, context).block(); + } + + /** + * Transfer the call to a participant. + * + * @param callConnectionId The call connection id. + * @param transferToParticipantRequest The transfer to participant request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> transferToParticipantWithResponseAsync(String callConnectionId, + TransferToParticipantRequestInternal transferToParticipantRequest) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.transferToParticipant(this.client.getEndpoint(), + callConnectionId, this.client.getApiVersion(), transferToParticipantRequest, accept, context)); + } + + /** + * Transfer the call to a participant. + * + * @param callConnectionId The call connection id. + * @param transferToParticipantRequest The transfer to participant request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> transferToParticipantWithResponseAsync(String callConnectionId, + TransferToParticipantRequestInternal transferToParticipantRequest, Context context) { + final String accept = "application/json"; + return service.transferToParticipant(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), + transferToParticipantRequest, accept, context); + } + + /** + * Transfer the call to a participant. + * + * @param callConnectionId The call connection id. + * @param transferToParticipantRequest The transfer to participant request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono transferToParticipantAsync(String callConnectionId, + TransferToParticipantRequestInternal transferToParticipantRequest) { + return transferToParticipantWithResponseAsync(callConnectionId, transferToParticipantRequest) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Transfer the call to a participant. + * + * @param callConnectionId The call connection id. + * @param transferToParticipantRequest The transfer to participant request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono transferToParticipantAsync(String callConnectionId, + TransferToParticipantRequestInternal transferToParticipantRequest, Context context) { + return transferToParticipantWithResponseAsync(callConnectionId, transferToParticipantRequest, context) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Transfer the call to a participant. + * + * @param callConnectionId The call connection id. + * @param transferToParticipantRequest The transfer to participant request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TransferCallResponseInternal transferToParticipant(String callConnectionId, + TransferToParticipantRequestInternal transferToParticipantRequest) { + return transferToParticipantAsync(callConnectionId, transferToParticipantRequest).block(); + } + + /** + * Transfer the call to a participant. + * + * @param callConnectionId The call connection id. + * @param transferToParticipantRequest The transfer to participant request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response transferToParticipantWithResponse(String callConnectionId, + TransferToParticipantRequestInternal transferToParticipantRequest, Context context) { + return transferToParticipantWithResponseAsync(callConnectionId, transferToParticipantRequest, context).block(); + } + + /** + * Get participants from a call. + * + * @param callConnectionId The call connection Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participants from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getParticipantsWithResponseAsync(String callConnectionId) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getParticipants(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), accept, context)); + } + + /** + * Get participants from a call. + * + * @param callConnectionId The call connection Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participants from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getParticipantsWithResponseAsync(String callConnectionId, + Context context) { + final String accept = "application/json"; + return service.getParticipants(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), accept, + context); + } + + /** + * Get participants from a call. + * + * @param callConnectionId The call connection Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participants from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getParticipantsAsync(String callConnectionId) { + return getParticipantsWithResponseAsync(callConnectionId) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get participants from a call. + * + * @param callConnectionId The call connection Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participants from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getParticipantsAsync(String callConnectionId, Context context) { + return getParticipantsWithResponseAsync(callConnectionId, context) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get participants from a call. + * + * @param callConnectionId The call connection Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participants from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GetParticipantsResponseInternal getParticipants(String callConnectionId) { + return getParticipantsAsync(callConnectionId).block(); + } + + /** + * Get participants from a call. + * + * @param callConnectionId The call connection Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participants from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getParticipantsWithResponse(String callConnectionId, + Context context) { + return getParticipantsWithResponseAsync(callConnectionId, context).block(); + } + + /** + * Add participants to the call. + * + * @param callConnectionId The call connection Id. + * @param addParticipantsRequest The add participants request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> addParticipantWithResponseAsync(String callConnectionId, + AddParticipantsRequestInternal addParticipantsRequest) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.addParticipant(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), addParticipantsRequest, accept, context)); + } + + /** + * Add participants to the call. + * + * @param callConnectionId The call connection Id. + * @param addParticipantsRequest The add participants request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> addParticipantWithResponseAsync(String callConnectionId, + AddParticipantsRequestInternal addParticipantsRequest, Context context) { + final String accept = "application/json"; + return service.addParticipant(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), + addParticipantsRequest, accept, context); + } + + /** + * Add participants to the call. + * + * @param callConnectionId The call connection Id. + * @param addParticipantsRequest The add participants request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addParticipantAsync(String callConnectionId, + AddParticipantsRequestInternal addParticipantsRequest) { + return addParticipantWithResponseAsync(callConnectionId, addParticipantsRequest) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Add participants to the call. + * + * @param callConnectionId The call connection Id. + * @param addParticipantsRequest The add participants request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono addParticipantAsync(String callConnectionId, + AddParticipantsRequestInternal addParticipantsRequest, Context context) { + return addParticipantWithResponseAsync(callConnectionId, addParticipantsRequest, context) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Add participants to the call. + * + * @param callConnectionId The call connection Id. + * @param addParticipantsRequest The add participants request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddParticipantsResponseInternal addParticipant(String callConnectionId, + AddParticipantsRequestInternal addParticipantsRequest) { + return addParticipantAsync(callConnectionId, addParticipantsRequest).block(); + } + + /** + * Add participants to the call. + * + * @param callConnectionId The call connection Id. + * @param addParticipantsRequest The add participants request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response addParticipantWithResponse(String callConnectionId, + AddParticipantsRequestInternal addParticipantsRequest, Context context) { + return addParticipantWithResponseAsync(callConnectionId, addParticipantsRequest, context).block(); + } + + /** + * Remove participant from the call using identifier. + * + * @param callConnectionId The call connection id. + * @param removeParticipantsRequest The participants to be removed from the call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> removeParticipantsWithResponseAsync( + String callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.removeParticipants(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), removeParticipantsRequest, accept, context)); + } + + /** + * Remove participant from the call using identifier. + * + * @param callConnectionId The call connection id. + * @param removeParticipantsRequest The participants to be removed from the call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> removeParticipantsWithResponseAsync( + String callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest, Context context) { + final String accept = "application/json"; + return service.removeParticipants(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), + removeParticipantsRequest, accept, context); + } + + /** + * Remove participant from the call using identifier. + * + * @param callConnectionId The call connection id. + * @param removeParticipantsRequest The participants to be removed from the call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono removeParticipantsAsync(String callConnectionId, + RemoveParticipantsRequestInternal removeParticipantsRequest) { + return removeParticipantsWithResponseAsync(callConnectionId, removeParticipantsRequest) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Remove participant from the call using identifier. + * + * @param callConnectionId The call connection id. + * @param removeParticipantsRequest The participants to be removed from the call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono removeParticipantsAsync(String callConnectionId, + RemoveParticipantsRequestInternal removeParticipantsRequest, Context context) { + return removeParticipantsWithResponseAsync(callConnectionId, removeParticipantsRequest, context) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Remove participant from the call using identifier. + * + * @param callConnectionId The call connection id. + * @param removeParticipantsRequest The participants to be removed from the call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemoveParticipantsResponseInternal removeParticipants(String callConnectionId, + RemoveParticipantsRequestInternal removeParticipantsRequest) { + return removeParticipantsAsync(callConnectionId, removeParticipantsRequest).block(); + } + + /** + * Remove participant from the call using identifier. + * + * @param callConnectionId The call connection id. + * @param removeParticipantsRequest The participants to be removed from the call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response removeParticipantsWithResponse(String callConnectionId, + RemoveParticipantsRequestInternal removeParticipantsRequest, Context context) { + return removeParticipantsWithResponseAsync(callConnectionId, removeParticipantsRequest, context).block(); + } + + /** + * Get participant from a call. + * + * @param callConnectionId The call connection Id. + * @param participantMri MRI of the participants to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participant from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getParticipantWithResponseAsync(String callConnectionId, + String participantMri) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getParticipant(this.client.getEndpoint(), callConnectionId, + participantMri, this.client.getApiVersion(), accept, context)); + } + + /** + * Get participant from a call. + * + * @param callConnectionId The call connection Id. + * @param participantMri MRI of the participants to retrieve. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participant from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getParticipantWithResponseAsync(String callConnectionId, + String participantMri, Context context) { + final String accept = "application/json"; + return service.getParticipant(this.client.getEndpoint(), callConnectionId, participantMri, + this.client.getApiVersion(), accept, context); + } + + /** + * Get participant from a call. + * + * @param callConnectionId The call connection Id. + * @param participantMri MRI of the participants to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participant from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getParticipantAsync(String callConnectionId, String participantMri) { + return getParticipantWithResponseAsync(callConnectionId, participantMri) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get participant from a call. + * + * @param callConnectionId The call connection Id. + * @param participantMri MRI of the participants to retrieve. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participant from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getParticipantAsync(String callConnectionId, String participantMri, + Context context) { + return getParticipantWithResponseAsync(callConnectionId, participantMri, context) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get participant from a call. + * + * @param callConnectionId The call connection Id. + * @param participantMri MRI of the participants to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participant from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AcsCallParticipantInternal getParticipant(String callConnectionId, String participantMri) { + return getParticipantAsync(callConnectionId, participantMri).block(); + } + + /** + * Get participant from a call. + * + * @param callConnectionId The call connection Id. + * @param participantMri MRI of the participants to retrieve. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return participant from a call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getParticipantWithResponse(String callConnectionId, + String participantMri, Context context) { + return getParticipantWithResponseAsync(callConnectionId, participantMri, context).block(); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/Constants.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/Constants.java new file mode 100644 index 000000000000..e31a00bb7301 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/Constants.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation; + +/*** + * Constants to be used by CallingServer. + */ +public final class Constants { + public static final int KB = 1024; + public static final int MB = KB * 1024; + + /*** + * Content downloader constants + */ + public static class ContentDownloader { + public static final int DEFAULT_CONCURRENT_TRANSFERS_COUNT = 5; + public static final int DEFAULT_BUFFER_SIZE = 4 * MB; + public static final int DEFAULT_INITIAL_DOWNLOAD_RANGE_SIZE = 256 * MB; + public static final int MAX_RETRIES = 4; + } + + /*** + * HTTP Header Names + */ + public static class HeaderNames { + public static final String RANGE = "Range"; + public static final String CONTENT_RANGE = "Content-Range"; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ContentsImpl.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ContentsImpl.java new file mode 100644 index 000000000000..1bc101ad463b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ContentsImpl.java @@ -0,0 +1,477 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation; + +import com.azure.communication.callingserver.implementation.models.PlayRequest; +import com.azure.communication.callingserver.implementation.models.RecognizeRequest; +import com.azure.communication.callingserver.implementation.models.RecordingStateResponseInternal; +import com.azure.communication.callingserver.implementation.models.StartCallRecordingRequestInternal; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Contents. */ +public final class ContentsImpl { + /** The proxy service used to perform REST calls. */ + private final ContentsService service; + + /** The service client containing this operation class. */ + private final AzureCommunicationCallingServerServiceImpl client; + + /** + * Initializes an instance of ContentsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContentsImpl(AzureCommunicationCallingServerServiceImpl client) { + this.service = RestProxy.create(ContentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureCommunicationCallingServerServiceContents to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureCommunicationCa") + public interface ContentsService { + @Post("/calling/callConnections/{callConnectionId}:play") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> play(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PlayRequest playRequest, Context context); + + @Post("/calling/callConnections/{callConnectionId}:cancelAllMediaOperations") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> cancelAllMediaOperations(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + Context context); + + @Post("/calling/callConnections/{callConnectionId}:recognize") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> recognize(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RecognizeRequest recognizeRequest, Context context); + + @Post("/calling/recordings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> recording(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StartCallRecordingRequestInternal startCallRecording, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Plays audio to participants in the call. + * + * @param callConnectionId The callConnectionId parameter. + * @param playRequest The playRequest parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> playWithResponseAsync(String callConnectionId, PlayRequest playRequest) { + return FluxUtil.withContext(context -> service.play(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), playRequest, context)); + } + + /** + * Plays audio to participants in the call. + * + * @param callConnectionId The callConnectionId parameter. + * @param playRequest The playRequest parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> playWithResponseAsync(String callConnectionId, PlayRequest playRequest, + Context context) { + return service.play(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), playRequest, + context); + } + + /** + * Plays audio to participants in the call. + * + * @param callConnectionId The callConnectionId parameter. + * @param playRequest The playRequest parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono playAsync(String callConnectionId, PlayRequest playRequest) { + return playWithResponseAsync(callConnectionId, playRequest).flatMap((Response res) -> Mono.empty()); + } + + /** + * Plays audio to participants in the call. + * + * @param callConnectionId The callConnectionId parameter. + * @param playRequest The playRequest parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono playAsync(String callConnectionId, PlayRequest playRequest, Context context) { + return playWithResponseAsync(callConnectionId, playRequest, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Plays audio to participants in the call. + * + * @param callConnectionId The callConnectionId parameter. + * @param playRequest The playRequest parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void play(String callConnectionId, PlayRequest playRequest) { + playAsync(callConnectionId, playRequest).block(); + } + + /** + * Plays audio to participants in the call. + * + * @param callConnectionId The callConnectionId parameter. + * @param playRequest The playRequest parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response playWithResponse(String callConnectionId, PlayRequest playRequest, Context context) { + return playWithResponseAsync(callConnectionId, playRequest, context).block(); + } + + /** + * Cancel all media operations in a call. + * + * @param callConnectionId The call connection id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelAllMediaOperationsWithResponseAsync(String callConnectionId) { + return FluxUtil.withContext(context -> service.cancelAllMediaOperations(this.client.getEndpoint(), + callConnectionId, this.client.getApiVersion(), context)); + } + + /** + * Cancel all media operations in a call. + * + * @param callConnectionId The call connection id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelAllMediaOperationsWithResponseAsync(String callConnectionId, Context context) { + return service.cancelAllMediaOperations(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), context); + } + + /** + * Cancel all media operations in a call. + * + * @param callConnectionId The call connection id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelAllMediaOperationsAsync(String callConnectionId) { + return cancelAllMediaOperationsWithResponseAsync(callConnectionId) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Cancel all media operations in a call. + * + * @param callConnectionId The call connection id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelAllMediaOperationsAsync(String callConnectionId, Context context) { + return cancelAllMediaOperationsWithResponseAsync(callConnectionId, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Cancel all media operations in a call. + * + * @param callConnectionId The call connection id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancelAllMediaOperations(String callConnectionId) { + cancelAllMediaOperationsAsync(callConnectionId).block(); + } + + /** + * Cancel all media operations in a call. + * + * @param callConnectionId The call connection id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelAllMediaOperationsWithResponse(String callConnectionId, Context context) { + return cancelAllMediaOperationsWithResponseAsync(callConnectionId, context).block(); + } + + /** + * Recognize media from call. + * + * @param callConnectionId The call connection id. + * @param recognizeRequest The media recognize request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> recognizeWithResponseAsync(String callConnectionId, RecognizeRequest recognizeRequest) { + return FluxUtil.withContext(context -> service.recognize(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), recognizeRequest, context)); + } + + /** + * Recognize media from call. + * + * @param callConnectionId The call connection id. + * @param recognizeRequest The media recognize request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> recognizeWithResponseAsync(String callConnectionId, RecognizeRequest recognizeRequest, + Context context) { + return service.recognize(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), + recognizeRequest, context); + } + + /** + * Recognize media from call. + * + * @param callConnectionId The call connection id. + * @param recognizeRequest The media recognize request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono recognizeAsync(String callConnectionId, RecognizeRequest recognizeRequest) { + return recognizeWithResponseAsync(callConnectionId, recognizeRequest) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Recognize media from call. + * + * @param callConnectionId The call connection id. + * @param recognizeRequest The media recognize request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono recognizeAsync(String callConnectionId, RecognizeRequest recognizeRequest, Context context) { + return recognizeWithResponseAsync(callConnectionId, recognizeRequest, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Recognize media from call. + * + * @param callConnectionId The call connection id. + * @param recognizeRequest The media recognize request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void recognize(String callConnectionId, RecognizeRequest recognizeRequest) { + recognizeAsync(callConnectionId, recognizeRequest).block(); + } + + /** + * Recognize media from call. + * + * @param callConnectionId The call connection id. + * @param recognizeRequest The media recognize request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response recognizeWithResponse(String callConnectionId, RecognizeRequest recognizeRequest, + Context context) { + return recognizeWithResponseAsync(callConnectionId, recognizeRequest, context).block(); + } + + /** + * Start recording the call. + * + * @param startCallRecording The request body of start call recording request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + recordingWithResponseAsync(StartCallRecordingRequestInternal startCallRecording) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.recording(this.client.getEndpoint(), this.client.getApiVersion(), + startCallRecording, accept, context)); + } + + /** + * Start recording the call. + * + * @param startCallRecording The request body of start call recording request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + recordingWithResponseAsync(StartCallRecordingRequestInternal startCallRecording, Context context) { + final String accept = "application/json"; + return service.recording(this.client.getEndpoint(), this.client.getApiVersion(), startCallRecording, accept, + context); + } + + /** + * Start recording the call. + * + * @param startCallRecording The request body of start call recording request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono recordingAsync(StartCallRecordingRequestInternal startCallRecording) { + return recordingWithResponseAsync(startCallRecording) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Start recording the call. + * + * @param startCallRecording The request body of start call recording request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono recordingAsync(StartCallRecordingRequestInternal startCallRecording, + Context context) { + return recordingWithResponseAsync(startCallRecording, context) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Start recording the call. + * + * @param startCallRecording The request body of start call recording request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecordingStateResponseInternal recording(StartCallRecordingRequestInternal startCallRecording) { + return recordingAsync(startCallRecording).block(); + } + + /** + * Start recording the call. + * + * @param startCallRecording The request body of start call recording request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + recordingWithResponse(StartCallRecordingRequestInternal startCallRecording, Context context) { + return recordingWithResponseAsync(startCallRecording, context).block(); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/CustomHmacAuthenticationPolicy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/CustomHmacAuthenticationPolicy.java new file mode 100644 index 000000000000..d2cd6eb5f08e --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/CustomHmacAuthenticationPolicy.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.communication.callingserver.implementation; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipelineCallContext; +import com.azure.core.http.HttpPipelineNextPolicy; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.util.logging.ClientLogger; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.security.InvalidKeyException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.util.Base64; +import java.util.Locale; +import java.util.Objects; + +/** + * HttpPipelinePolicy to append CommunicationClient required headers + */ +public final class CustomHmacAuthenticationPolicy implements HttpPipelinePolicy { + private static final ClientLogger LOGGER = new ClientLogger(CustomHmacAuthenticationPolicy.class); + private static final HttpHeaderName X_FORWARDED_HOST = HttpHeaderName.fromString("X-FORWARDED-HOST"); + private static final HttpHeaderName X_MS_DATE_HEADER = HttpHeaderName.fromString("x-ms-date"); + private static final HttpHeaderName X_MS_STRING_TO_SIGN_HEADER + = HttpHeaderName.fromString("x-ms-hmac-string-to-sign-base64"); + private static final HttpHeaderName CONTENT_HASH_HEADER = HttpHeaderName.fromString("x-ms-content-sha256"); + + // Previously DateTimeFormatter.RFC_1123_DATE_TIME was being used. There + // was an issue with the day of month part. RFC_1123_DATE_TIME does not + // append a leading '0' on days that are less than 10. It is important + // that the locale remain US. In other locals the values that are generated + // for the day and month strings may be different. (e.g. Canada day strings + // have a '.' at the end) + static final DateTimeFormatter HMAC_DATETIMEFORMATTER_PATTERN + = DateTimeFormatter.ofPattern("E, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US); + + private final AzureKeyCredential credential; + private final String acsResource; + + /** + * Created with a non-null client credential + * @param clientCredential client credential with valid access key + * @param acsResource the acs resource endpoint + */ + public CustomHmacAuthenticationPolicy(AzureKeyCredential clientCredential, String acsResource) { + Objects.requireNonNull(clientCredential, "'clientCredential' cannot be a null value."); + this.credential = clientCredential; + this.acsResource = acsResource; + } + + @Override + public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { + final Flux contents = context.getHttpRequest().getBody() == null + ? Flux.just(ByteBuffer.allocate(0)) + : context.getHttpRequest().getBody(); + + if (!"https".equals(context.getHttpRequest().getUrl().getProtocol())) { + return Mono + .error(new RuntimeException("AzureKeyCredential requires a URL using the HTTPS protocol scheme")); + } + + try { + URL hostnameToSignWith = context.getData("hmacSignatureURL") + .filter(alternativeUrl -> alternativeUrl instanceof URL) + .map(alternativeUrl -> (URL) alternativeUrl) + .orElse(context.getHttpRequest().getUrl()); + + return contents.collect(() -> { + try { + return MessageDigest.getInstance("SHA-256"); + } catch (NoSuchAlgorithmException e) { + throw LOGGER.logExceptionAsError(Exceptions.propagate(e)); + } + }, MessageDigest::update).flatMap(messageDigest -> { + addAuthenticationHeaders(acsResource, hostnameToSignWith, + context.getHttpRequest().getHttpMethod().toString(), messageDigest, + context.getHttpRequest().getHeaders()); + + return next.process(); + }); + } catch (RuntimeException r) { + return Mono.error(r); + } + } + + private void addAuthenticationHeaders(String acsResource, URL url, String httpMethod, MessageDigest messageDigest, + HttpHeaders headers) { + final String contentHash = Base64.getEncoder().encodeToString(messageDigest.digest()); + headers.set(X_FORWARDED_HOST, acsResource); + headers.set(HttpHeaderName.HOST, acsResource); + headers.set(CONTENT_HASH_HEADER, contentHash); + String xMsDate = OffsetDateTime.now(ZoneOffset.UTC).format(HMAC_DATETIMEFORMATTER_PATTERN); + headers.set(X_MS_DATE_HEADER, xMsDate); + addSignatureHeader(url, httpMethod, headers, xMsDate, acsResource, contentHash); + } + + private void addSignatureHeader(URL url, String httpMethod, HttpHeaders headers, String xMsDate, String host, + String xMsContentSha256) { + String signedHeaderValues = xMsDate + ";" + host + ";" + xMsContentSha256; + + String pathAndQuery = url.getPath(); + if (url.getQuery() != null) { + pathAndQuery += '?' + url.getQuery(); + } + + // String-To-Sign=HTTP_METHOD + '\n' + path_and_query + '\n' + signed_headers_values + // The line separator has to be \n. Using %n with String.format will result in a 401 from the service. + String stringToSign = httpMethod.toUpperCase(Locale.US) + "\n" + pathAndQuery + "\n" + signedHeaderValues; + + String accessKey = credential.getKey(); + byte[] key = Base64.getDecoder().decode(accessKey); + Mac sha256HMAC; + try { + sha256HMAC = Mac.getInstance("HmacSHA256"); + sha256HMAC.init(new SecretKeySpec(key, "HmacSHA256")); + } catch (NoSuchAlgorithmException | InvalidKeyException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } + + final String signature + = Base64.getEncoder().encodeToString(sha256HMAC.doFinal(stringToSign.getBytes(StandardCharsets.UTF_8))); + String authorization = "HMAC-SHA256 SignedHeaders=x-ms-date;host;x-ms-content-sha256&Signature=" + signature; + headers.set(HttpHeaderName.AUTHORIZATION, authorization); + headers.set(X_MS_STRING_TO_SIGN_HEADER, + Base64.getEncoder().encodeToString(stringToSign.getBytes(StandardCharsets.UTF_8))); + } + +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ServerCallingsImpl.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ServerCallingsImpl.java new file mode 100644 index 000000000000..0c4345d4125e --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ServerCallingsImpl.java @@ -0,0 +1,477 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation; + +import com.azure.communication.callingserver.implementation.models.AnswerCallRequestInternal; +import com.azure.communication.callingserver.implementation.models.CallConnectionPropertiesInternal; +import com.azure.communication.callingserver.implementation.models.CreateCallRequestInternal; +import com.azure.communication.callingserver.implementation.models.RedirectCallRequestInternal; +import com.azure.communication.callingserver.implementation.models.RejectCallRequestInternal; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ServerCallings. */ +public final class ServerCallingsImpl { + /** The proxy service used to perform REST calls. */ + private final ServerCallingsService service; + + /** The service client containing this operation class. */ + private final AzureCommunicationCallingServerServiceImpl client; + + /** + * Initializes an instance of ServerCallingsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ServerCallingsImpl(AzureCommunicationCallingServerServiceImpl client) { + this.service + = RestProxy.create(ServerCallingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureCommunicationCallingServerServiceServerCallings to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureCommunicationCa") + public interface ServerCallingsService { + @Post("/calling/callConnections") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createCall(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CreateCallRequestInternal body, + @HeaderParam("Accept") String accept, Context context); + + @Post("/calling/callConnections:answer") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> answerCall(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AnswerCallRequestInternal answerCallRequest, + @HeaderParam("Accept") String accept, Context context); + + @Post("/calling/callConnections:redirect") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> redirectCall(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RedirectCallRequestInternal redirectCallRequest, Context context); + + @Post("/calling/callConnections:reject") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> rejectCall(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RejectCallRequestInternal rejectCallRequest, Context context); + } + + /** + * Create an outbound call. + * + * @param body The create call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + createCallWithResponseAsync(CreateCallRequestInternal body) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createCall(this.client.getEndpoint(), + this.client.getApiVersion(), body, accept, context)); + } + + /** + * Create an outbound call. + * + * @param body The create call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createCallWithResponseAsync(CreateCallRequestInternal body, + Context context) { + final String accept = "application/json"; + return service.createCall(this.client.getEndpoint(), this.client.getApiVersion(), body, accept, context); + } + + /** + * Create an outbound call. + * + * @param body The create call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createCallAsync(CreateCallRequestInternal body) { + return createCallWithResponseAsync(body).flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create an outbound call. + * + * @param body The create call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createCallAsync(CreateCallRequestInternal body, Context context) { + return createCallWithResponseAsync(body, context).flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create an outbound call. + * + * @param body The create call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallConnectionPropertiesInternal createCall(CreateCallRequestInternal body) { + return createCallAsync(body).block(); + } + + /** + * Create an outbound call. + * + * @param body The create call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createCallWithResponse(CreateCallRequestInternal body, + Context context) { + return createCallWithResponseAsync(body, context).block(); + } + + /** + * Answer a call using the IncomingCallContext from Event Grid. + * + * @param answerCallRequest The answer call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + answerCallWithResponseAsync(AnswerCallRequestInternal answerCallRequest) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.answerCall(this.client.getEndpoint(), + this.client.getApiVersion(), answerCallRequest, accept, context)); + } + + /** + * Answer a call using the IncomingCallContext from Event Grid. + * + * @param answerCallRequest The answer call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + answerCallWithResponseAsync(AnswerCallRequestInternal answerCallRequest, Context context) { + final String accept = "application/json"; + return service.answerCall(this.client.getEndpoint(), this.client.getApiVersion(), answerCallRequest, accept, + context); + } + + /** + * Answer a call using the IncomingCallContext from Event Grid. + * + * @param answerCallRequest The answer call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono answerCallAsync(AnswerCallRequestInternal answerCallRequest) { + return answerCallWithResponseAsync(answerCallRequest) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Answer a call using the IncomingCallContext from Event Grid. + * + * @param answerCallRequest The answer call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono answerCallAsync(AnswerCallRequestInternal answerCallRequest, + Context context) { + return answerCallWithResponseAsync(answerCallRequest, context) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Answer a call using the IncomingCallContext from Event Grid. + * + * @param answerCallRequest The answer call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CallConnectionPropertiesInternal answerCall(AnswerCallRequestInternal answerCallRequest) { + return answerCallAsync(answerCallRequest).block(); + } + + /** + * Answer a call using the IncomingCallContext from Event Grid. + * + * @param answerCallRequest The answer call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + answerCallWithResponse(AnswerCallRequestInternal answerCallRequest, Context context) { + return answerCallWithResponseAsync(answerCallRequest, context).block(); + } + + /** + * Redirect a call. + * + * @param redirectCallRequest The request payload for redirecting the call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> redirectCallWithResponseAsync(RedirectCallRequestInternal redirectCallRequest) { + return FluxUtil.withContext(context -> service.redirectCall(this.client.getEndpoint(), + this.client.getApiVersion(), redirectCallRequest, context)); + } + + /** + * Redirect a call. + * + * @param redirectCallRequest The request payload for redirecting the call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> redirectCallWithResponseAsync(RedirectCallRequestInternal redirectCallRequest, + Context context) { + return service.redirectCall(this.client.getEndpoint(), this.client.getApiVersion(), redirectCallRequest, + context); + } + + /** + * Redirect a call. + * + * @param redirectCallRequest The request payload for redirecting the call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono redirectCallAsync(RedirectCallRequestInternal redirectCallRequest) { + return redirectCallWithResponseAsync(redirectCallRequest).flatMap((Response res) -> Mono.empty()); + } + + /** + * Redirect a call. + * + * @param redirectCallRequest The request payload for redirecting the call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono redirectCallAsync(RedirectCallRequestInternal redirectCallRequest, Context context) { + return redirectCallWithResponseAsync(redirectCallRequest, context) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Redirect a call. + * + * @param redirectCallRequest The request payload for redirecting the call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void redirectCall(RedirectCallRequestInternal redirectCallRequest) { + redirectCallAsync(redirectCallRequest).block(); + } + + /** + * Redirect a call. + * + * @param redirectCallRequest The request payload for redirecting the call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response redirectCallWithResponse(RedirectCallRequestInternal redirectCallRequest, Context context) { + return redirectCallWithResponseAsync(redirectCallRequest, context).block(); + } + + /** + * Reject the call. + * + * @param rejectCallRequest The reject call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> rejectCallWithResponseAsync(RejectCallRequestInternal rejectCallRequest) { + return FluxUtil.withContext(context -> service.rejectCall(this.client.getEndpoint(), + this.client.getApiVersion(), rejectCallRequest, context)); + } + + /** + * Reject the call. + * + * @param rejectCallRequest The reject call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> rejectCallWithResponseAsync(RejectCallRequestInternal rejectCallRequest, + Context context) { + return service.rejectCall(this.client.getEndpoint(), this.client.getApiVersion(), rejectCallRequest, context); + } + + /** + * Reject the call. + * + * @param rejectCallRequest The reject call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono rejectCallAsync(RejectCallRequestInternal rejectCallRequest) { + return rejectCallWithResponseAsync(rejectCallRequest).flatMap((Response res) -> Mono.empty()); + } + + /** + * Reject the call. + * + * @param rejectCallRequest The reject call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono rejectCallAsync(RejectCallRequestInternal rejectCallRequest, Context context) { + return rejectCallWithResponseAsync(rejectCallRequest, context).flatMap((Response res) -> Mono.empty()); + } + + /** + * Reject the call. + * + * @param rejectCallRequest The reject call request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rejectCall(RejectCallRequestInternal rejectCallRequest) { + rejectCallAsync(rejectCallRequest).block(); + } + + /** + * Reject the call. + * + * @param rejectCallRequest The reject call request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response rejectCallWithResponse(RejectCallRequestInternal rejectCallRequest, Context context) { + return rejectCallWithResponseAsync(rejectCallRequest, context).block(); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ServerCallsImpl.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ServerCallsImpl.java new file mode 100644 index 000000000000..60acf5b591d5 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ServerCallsImpl.java @@ -0,0 +1,450 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation; + +import com.azure.communication.callingserver.implementation.models.RecordingStateResponseInternal; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ServerCalls. */ +public final class ServerCallsImpl { + /** The proxy service used to perform REST calls. */ + private final ServerCallsService service; + + /** The service client containing this operation class. */ + private final AzureCommunicationCallingServerServiceImpl client; + + /** + * Initializes an instance of ServerCallsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ServerCallsImpl(AzureCommunicationCallingServerServiceImpl client) { + this.service + = RestProxy.create(ServerCallsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureCommunicationCallingServerServiceServerCalls to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureCommunicationCa") + public interface ServerCallsService { + @Get("/calling/recordings/{recordingId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getRecordingProperties(@HostParam("endpoint") String endpoint, + @PathParam("recordingId") String recordingId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Delete("/calling/recordings/{recordingId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> stopRecording(@HostParam("endpoint") String endpoint, + @PathParam("recordingId") String recordingId, @QueryParam("api-version") String apiVersion, + Context context); + + @Post("/calling/recordings/{recordingId}:pause") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> pauseRecording(@HostParam("endpoint") String endpoint, + @PathParam("recordingId") String recordingId, @QueryParam("api-version") String apiVersion, + Context context); + + @Post("/calling/recordings/{recordingId}:resume") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> resumeRecording(@HostParam("endpoint") String endpoint, + @PathParam("recordingId") String recordingId, @QueryParam("api-version") String apiVersion, + Context context); + } + + /** + * Get call recording properties. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call recording properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRecordingPropertiesWithResponseAsync(String recordingId) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getRecordingProperties(this.client.getEndpoint(), recordingId, + this.client.getApiVersion(), accept, context)); + } + + /** + * Get call recording properties. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call recording properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRecordingPropertiesWithResponseAsync(String recordingId, + Context context) { + final String accept = "application/json"; + return service.getRecordingProperties(this.client.getEndpoint(), recordingId, this.client.getApiVersion(), + accept, context); + } + + /** + * Get call recording properties. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call recording properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRecordingPropertiesAsync(String recordingId) { + return getRecordingPropertiesWithResponseAsync(recordingId) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get call recording properties. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call recording properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRecordingPropertiesAsync(String recordingId, Context context) { + return getRecordingPropertiesWithResponseAsync(recordingId, context) + .flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get call recording properties. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call recording properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecordingStateResponseInternal getRecordingProperties(String recordingId) { + return getRecordingPropertiesAsync(recordingId).block(); + } + + /** + * Get call recording properties. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return call recording properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRecordingPropertiesWithResponse(String recordingId, + Context context) { + return getRecordingPropertiesWithResponseAsync(recordingId, context).block(); + } + + /** + * Stop recording the call. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopRecordingWithResponseAsync(String recordingId) { + return FluxUtil.withContext(context -> service.stopRecording(this.client.getEndpoint(), recordingId, + this.client.getApiVersion(), context)); + } + + /** + * Stop recording the call. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopRecordingWithResponseAsync(String recordingId, Context context) { + return service.stopRecording(this.client.getEndpoint(), recordingId, this.client.getApiVersion(), context); + } + + /** + * Stop recording the call. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stopRecordingAsync(String recordingId) { + return stopRecordingWithResponseAsync(recordingId).flatMap((Response res) -> Mono.empty()); + } + + /** + * Stop recording the call. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stopRecordingAsync(String recordingId, Context context) { + return stopRecordingWithResponseAsync(recordingId, context).flatMap((Response res) -> Mono.empty()); + } + + /** + * Stop recording the call. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopRecording(String recordingId) { + stopRecordingAsync(recordingId).block(); + } + + /** + * Stop recording the call. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopRecordingWithResponse(String recordingId, Context context) { + return stopRecordingWithResponseAsync(recordingId, context).block(); + } + + /** + * Pause recording the call. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> pauseRecordingWithResponseAsync(String recordingId) { + return FluxUtil.withContext(context -> service.pauseRecording(this.client.getEndpoint(), recordingId, + this.client.getApiVersion(), context)); + } + + /** + * Pause recording the call. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> pauseRecordingWithResponseAsync(String recordingId, Context context) { + return service.pauseRecording(this.client.getEndpoint(), recordingId, this.client.getApiVersion(), context); + } + + /** + * Pause recording the call. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono pauseRecordingAsync(String recordingId) { + return pauseRecordingWithResponseAsync(recordingId).flatMap((Response res) -> Mono.empty()); + } + + /** + * Pause recording the call. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono pauseRecordingAsync(String recordingId, Context context) { + return pauseRecordingWithResponseAsync(recordingId, context).flatMap((Response res) -> Mono.empty()); + } + + /** + * Pause recording the call. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void pauseRecording(String recordingId) { + pauseRecordingAsync(recordingId).block(); + } + + /** + * Pause recording the call. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response pauseRecordingWithResponse(String recordingId, Context context) { + return pauseRecordingWithResponseAsync(recordingId, context).block(); + } + + /** + * Resume recording the call. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resumeRecordingWithResponseAsync(String recordingId) { + return FluxUtil.withContext(context -> service.resumeRecording(this.client.getEndpoint(), recordingId, + this.client.getApiVersion(), context)); + } + + /** + * Resume recording the call. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resumeRecordingWithResponseAsync(String recordingId, Context context) { + return service.resumeRecording(this.client.getEndpoint(), recordingId, this.client.getApiVersion(), context); + } + + /** + * Resume recording the call. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resumeRecordingAsync(String recordingId) { + return resumeRecordingWithResponseAsync(recordingId).flatMap((Response res) -> Mono.empty()); + } + + /** + * Resume recording the call. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resumeRecordingAsync(String recordingId, Context context) { + return resumeRecordingWithResponseAsync(recordingId, context).flatMap((Response res) -> Mono.empty()); + } + + /** + * Resume recording the call. + * + * @param recordingId The recording id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resumeRecording(String recordingId) { + resumeRecordingAsync(recordingId).block(); + } + + /** + * Resume recording the call. + * + * @param recordingId The recording id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resumeRecordingWithResponse(String recordingId, Context context) { + return resumeRecordingWithResponseAsync(recordingId, context).block(); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/AddParticipantsResponseConstructorProxy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/AddParticipantsResponseConstructorProxy.java new file mode 100644 index 000000000000..db77c30b4b1a --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/AddParticipantsResponseConstructorProxy.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.accesshelpers; + +import com.azure.communication.callingserver.implementation.models.AddParticipantsResponseInternal; +import com.azure.communication.callingserver.models.AddParticipantsResult; + +/** + * Helper class to access private values of {@link AddParticipantsResult} across package boundaries. + */ +public final class AddParticipantsResponseConstructorProxy { + private static AddParticipantsResponseConstructorAccessor accessor; + + private AddParticipantsResponseConstructorProxy() { + } + + /** + * Type defining the methods to set the non-public properties of a {@link AddParticipantsResponseConstructorAccessor} + * instance. + */ + public interface AddParticipantsResponseConstructorAccessor { + /** + * Creates a new instance of {@link AddParticipantsResult} backed by an internal instance of + * {@link AddParticipantsResult}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link AddParticipantsResult}. + */ + AddParticipantsResult create(AddParticipantsResponseInternal internalResponse); + } + + /** + * The method called from {@link AddParticipantsResult} to set it's accessor. + * + * @param accessor The accessor. + */ + public static void setAccessor(final AddParticipantsResponseConstructorAccessor accessor) { + AddParticipantsResponseConstructorProxy.accessor = accessor; + } + + /** + * Creates a new instance of {@link AddParticipantsResult} backed by an internal instance of + * {@link AddParticipantsResult}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link AddParticipantsResult}. + */ + public static AddParticipantsResult create(AddParticipantsResponseInternal internalResponse) { + // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the + // application accesses BlobDownloadHeaders which triggers the accessor to be configured. So, if the accessor + // is null this effectively pokes the class to set up the accessor. + if (accessor == null) { + new AddParticipantsResult(); + } + + assert accessor != null; + return accessor.create(internalResponse); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/CallConnectionPropertiesConstructorProxy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/CallConnectionPropertiesConstructorProxy.java new file mode 100644 index 000000000000..2d4d86a564f2 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/CallConnectionPropertiesConstructorProxy.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.accesshelpers; + +import com.azure.communication.callingserver.implementation.models.CallConnectionPropertiesInternal; +import com.azure.communication.callingserver.models.CallConnectionProperties; + +import java.net.URISyntaxException; + +/** + * Helper class to access private values of {@link CallConnectionProperties} across package boundaries. + */ +public final class CallConnectionPropertiesConstructorProxy { + private static CallConnectionPropertiesConstructorAccessor accessor; + + private CallConnectionPropertiesConstructorProxy() { + } + + /** + * Type defining the methods to set the non-public properties of a {@link CallConnectionPropertiesConstructorAccessor} + * instance. + */ + public interface CallConnectionPropertiesConstructorAccessor { + /** + * Creates a new instance of {@link CallConnectionProperties} backed by an internal instance of + * {@link CallConnectionProperties}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link CallConnectionProperties}. + */ + CallConnectionProperties create(CallConnectionPropertiesInternal internalResponse) throws URISyntaxException; + } + + /** + * The method called from {@link CallConnectionProperties} to set it's accessor. + * + * @param accessor The accessor. + */ + public static void setAccessor(final CallConnectionPropertiesConstructorAccessor accessor) { + CallConnectionPropertiesConstructorProxy.accessor = accessor; + } + + /** + * Creates a new instance of {@link CallConnectionProperties} backed by an internal instance of + * {@link CallConnectionPropertiesInternal}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link CallConnectionProperties}. + */ + public static CallConnectionProperties create(CallConnectionPropertiesInternal internalResponse) + throws URISyntaxException { + // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the + // application accesses BlobDownloadHeaders which triggers the accessor to be configured. So, if the accessor + // is null this effectively pokes the class to set up the accessor. + if (accessor == null) { + new CallConnectionProperties(); + } + + assert accessor != null; + return accessor.create(internalResponse); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/ErrorConstructorProxy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/ErrorConstructorProxy.java new file mode 100644 index 000000000000..971089a343c8 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/ErrorConstructorProxy.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.accesshelpers; + +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.core.exception.HttpResponseException; + +import java.io.IOException; + +/** + * Helper class to access private values of {@link CallingServerErrorException} across package boundaries. + */ +public final class ErrorConstructorProxy { + private static ErrorConstructorProxy.ErrorConstructorAccessor accessor; + + private ErrorConstructorProxy() { + } + + /** + * Type defining the methods to set the non-public properties of a {@link CallConnectionPropertiesConstructorProxy.CallConnectionPropertiesConstructorAccessor} + * instance. + */ + public interface ErrorConstructorAccessor { + /** + * Creates a new instance of {@link CallingServerErrorException} backed by an internal instance of + * {@link CallingServerErrorException}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link CallingServerErrorException}. + */ + CallingServerErrorException create(HttpResponseException internalResponse) throws IOException; + } + + /** + * The method called from {@link CallingServerErrorException} to set it's accessor. + * + * @param accessor The accessor. + */ + public static void setAccessor(final ErrorConstructorProxy.ErrorConstructorAccessor accessor) { + ErrorConstructorProxy.accessor = accessor; + } + + /** + * Creates a new instance of {@link CallingServerErrorException} backed by an internal instance of + * {@link HttpResponseException}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link CallingServerErrorException}. + */ + public static CallingServerErrorException create(HttpResponseException internalResponse) { + // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the + // application accesses CallingServerErrorException which triggers the accessor to be configured. So, if the + // accessor is null this effectively pokes the class to set up the accessor. + try { + if (accessor == null) { + new CallingServerErrorException(); + } + + return accessor.create(internalResponse); + } catch (IOException ex) { + throw new RuntimeException(ex); + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/ListParticipantsResponseConstructorProxy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/ListParticipantsResponseConstructorProxy.java new file mode 100644 index 000000000000..9b3662bec49b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/ListParticipantsResponseConstructorProxy.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.accesshelpers; + +import com.azure.communication.callingserver.implementation.models.GetParticipantsResponseInternal; +import com.azure.communication.callingserver.models.ListParticipantsResult; + +public final class ListParticipantsResponseConstructorProxy { + private static ListParticipantsResponseConstructorProxy.ListParticipantsResponseConstructorAccessor accessor; + + private ListParticipantsResponseConstructorProxy() { + } + + /** + * Type defining the methods to set the non-public properties of a {@link ListParticipantsResponseConstructorProxy.ListParticipantsResponseConstructorAccessor} + * instance. + */ + public interface ListParticipantsResponseConstructorAccessor { + /** + * Creates a new instance of {@link ListParticipantsResult} backed by an internal instance of + * {@link ListParticipantsResult}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link ListParticipantsResult}. + */ + ListParticipantsResult create(GetParticipantsResponseInternal internalResponse); + } + + /** + * The method called from {@link ListParticipantsResult} to set it's accessor. + * + * @param accessor The accessor. + */ + public static void setAccessor( + final ListParticipantsResponseConstructorProxy.ListParticipantsResponseConstructorAccessor accessor) { + ListParticipantsResponseConstructorProxy.accessor = accessor; + } + + /** + * Creates a new instance of {@link ListParticipantsResult} backed by an internal instance of + * {@link ListParticipantsResult}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link ListParticipantsResult}. + */ + public static ListParticipantsResult create(GetParticipantsResponseInternal internalResponse) { + // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the + // application accesses BlobDownloadHeaders which triggers the accessor to be configured. So, if the accessor + // is null this effectively pokes the class to set up the accessor. + if (accessor == null) { + new ListParticipantsResult(); + } + + assert accessor != null; + return accessor.create(internalResponse); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/RecordingStateResponseConstructorProxy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/RecordingStateResponseConstructorProxy.java new file mode 100644 index 000000000000..6d1e8751175b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/RecordingStateResponseConstructorProxy.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.accesshelpers; + +import com.azure.communication.callingserver.implementation.models.RecordingStateResponseInternal; +import com.azure.communication.callingserver.models.RecordingStateResult; + +/** + * Helper class to access private values of {@link RecordingStateResult} across package boundaries. + */ +public final class RecordingStateResponseConstructorProxy { + private static RecordingStateResponseConstructorAccessor accessor; + + private RecordingStateResponseConstructorProxy() { + } + + /** + * Type defining the methods to set the non-public properties of a {@link RecordingStateResponseConstructorAccessor} + * instance. + */ + public interface RecordingStateResponseConstructorAccessor { + /** + * Creates a new instance of {@link RecordingStateResult} backed by an internal instance of + * {@link RecordingStateResponseInternal}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link RecordingStateResult}. + */ + RecordingStateResult create(RecordingStateResponseInternal internalResponse); + } + + /** + * The method called from {@link RecordingStateResult} to set it's accessor. + * + * @param accessor The accessor. + */ + public static void setAccessor(final RecordingStateResponseConstructorAccessor accessor) { + RecordingStateResponseConstructorProxy.accessor = accessor; + } + + /** + * Creates a new instance of {@link RecordingStateResult} backed by an internal instance of + * {@link RecordingStateResponseInternal}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link RecordingStateResult}. + */ + public static RecordingStateResult create(RecordingStateResponseInternal internalResponse) { + if (accessor == null) { + new RecordingStateResult(); + } + + assert accessor != null; + return accessor.create(internalResponse); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/RemoveParticipantsResponseConstructorProxy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/RemoveParticipantsResponseConstructorProxy.java new file mode 100644 index 000000000000..c96984d63579 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/RemoveParticipantsResponseConstructorProxy.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.accesshelpers; + +import com.azure.communication.callingserver.implementation.models.RemoveParticipantsResponseInternal; +import com.azure.communication.callingserver.models.RemoveParticipantsResult; + +/** + * Helper class to access private values of {@link RemoveParticipantsResult} across package boundaries. + */ +public final class RemoveParticipantsResponseConstructorProxy { + private static RemoveParticipantsResponseConstructorAccessor accessor; + + private RemoveParticipantsResponseConstructorProxy() { + } + + /** + * Type defining the methods to set the non-public properties of a {@link RemoveParticipantsResponseConstructorAccessor} + * instance. + */ + public interface RemoveParticipantsResponseConstructorAccessor { + /** + * Creates a new instance of {@link RemoveParticipantsResult} backed by an internal instance of + * {@link RemoveParticipantsResult}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link RemoveParticipantsResult}. + */ + RemoveParticipantsResult create(RemoveParticipantsResponseInternal internalResponse); + } + + /** + * The method called from {@link RemoveParticipantsResult} to set it's accessor. + * + * @param accessor The accessor. + */ + public static void setAccessor(final RemoveParticipantsResponseConstructorAccessor accessor) { + RemoveParticipantsResponseConstructorProxy.accessor = accessor; + } + + /** + * Creates a new instance of {@link RemoveParticipantsResult} backed by an internal instance of + * {@link RemoveParticipantsResult}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link RemoveParticipantsResult}. + */ + public static RemoveParticipantsResult create(RemoveParticipantsResponseInternal internalResponse) { + // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the + // application accesses BlobDownloadHeaders which triggers the accessor to be configured. So, if the accessor + // is null this effectively pokes the class to set up the accessor. + if (accessor == null) { + new RemoveParticipantsResult(); + } + + assert accessor != null; + return accessor.create(internalResponse); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/TransferCallResponseConstructorProxy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/TransferCallResponseConstructorProxy.java new file mode 100644 index 000000000000..f311518775d6 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/TransferCallResponseConstructorProxy.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.accesshelpers; + +import com.azure.communication.callingserver.implementation.models.TransferCallResponseInternal; +import com.azure.communication.callingserver.models.TransferCallResult; + +/** + * Helper class to access private values of {@link TransferCallResult} across package boundaries. + */ +public final class TransferCallResponseConstructorProxy { + private static TransferCallResponseConstructorAccessor accessor; + + private TransferCallResponseConstructorProxy() { + } + + /** + * Type defining the methods to set the non-public properties of a {@link TransferCallResponseConstructorAccessor} + * instance. + */ + public interface TransferCallResponseConstructorAccessor { + /** + * Creates a new instance of {@link TransferCallResult} backed by an internal instance of + * {@link TransferCallResult}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link TransferCallResult}. + */ + TransferCallResult create(TransferCallResponseInternal internalResponse); + } + + /** + * The method called from {@link TransferCallResult} to set it's accessor. + * + * @param accessor The accessor. + */ + public static void setAccessor(final TransferCallResponseConstructorAccessor accessor) { + TransferCallResponseConstructorProxy.accessor = accessor; + } + + /** + * Creates a new instance of {@link TransferCallResult} backed by an internal instance of + * {@link TransferCallResult}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link TransferCallResult}. + */ + public static TransferCallResult create(TransferCallResponseInternal internalResponse) { + // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the + // application accesses BlobDownloadHeaders which triggers the accessor to be configured. So, if the accessor + // is null this effectively pokes the class to set up the accessor. + if (accessor == null) { + new TransferCallResult(); + } + + assert accessor != null; + return accessor.create(internalResponse); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/package-info.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/package-info.java new file mode 100644 index 000000000000..bdf936a86693 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/accesshelpers/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing access helpers for Azure Communication Calling Server SDK. + */ +package com.azure.communication.callingserver.implementation.accesshelpers; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CallParticipantConverter.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CallParticipantConverter.java new file mode 100644 index 000000000000..f328dffdf5f6 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CallParticipantConverter.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.converters; + +import com.azure.communication.callingserver.implementation.models.AcsCallParticipantInternal; +import com.azure.communication.callingserver.models.CallParticipant; + +/** + * A converter for {@link CallParticipant} + */ +public final class CallParticipantConverter { + + /** + * Converts to {@link CallParticipant}. + */ + public static CallParticipant convert(AcsCallParticipantInternal acsCallParticipantDto) { + + if (acsCallParticipantDto == null) { + return null; + } + + return new CallParticipant(CommunicationIdentifierConverter.convert(acsCallParticipantDto.getIdentifier()), + acsCallParticipantDto.isMuted()); + } + + private CallParticipantConverter() { + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CallSourceConverter.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CallSourceConverter.java new file mode 100644 index 000000000000..da6165581c21 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CallSourceConverter.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.converters; + +import com.azure.communication.callingserver.implementation.models.CallSourceInternal; +import com.azure.communication.callingserver.models.CallSource; + +/** + * A converter for {@link CallSource} + */ +public final class CallSourceConverter { + + /** + * Converts to {@link CallSource}. + */ + public static CallSource convert(CallSourceInternal callSourceDto) { + + if (callSourceDto == null) { + return null; + } + + return new CallSource(CommunicationIdentifierConverter.convert(callSourceDto.getIdentifier())) + .setCallerId(PhoneNumberIdentifierConverter.convert(callSourceDto.getCallerId())); + } + + /** + * Converts to {@link CallSourceInternal}. + */ + public static CallSourceInternal convert(CallSource callSource) { + + if (callSource == null) { + return null; + } + + return new CallSourceInternal() + .setIdentifier(CommunicationIdentifierConverter.convert(callSource.getIdentifier())) + .setCallerId(PhoneNumberIdentifierConverter.convert(callSource.getCallerId())); + } + + private CallSourceConverter() { + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CommunicationIdentifierConverter.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CommunicationIdentifierConverter.java new file mode 100644 index 000000000000..3c7b6ebaf272 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/CommunicationIdentifierConverter.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.converters; + +import com.azure.communication.callingserver.implementation.models.CommunicationCloudEnvironmentModel; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModelKind; +import com.azure.communication.callingserver.implementation.models.CommunicationUserIdentifierModel; +import com.azure.communication.callingserver.implementation.models.MicrosoftTeamsUserIdentifierModel; +import com.azure.communication.callingserver.implementation.models.PhoneNumberIdentifierModel; +import com.azure.communication.common.CommunicationCloudEnvironment; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.communication.common.CommunicationUserIdentifier; +import com.azure.communication.common.MicrosoftTeamsUserIdentifier; +import com.azure.communication.common.PhoneNumberIdentifier; +import com.azure.communication.common.UnknownIdentifier; + +import java.util.ArrayList; +import java.util.Objects; + +/** + * A converter between {@link CommunicationIdentifierModel} and {@link CommunicationIdentifier}. + */ +public class CommunicationIdentifierConverter { + + /** + * Maps from {@link CommunicationIdentifierModel} to {@link CommunicationIdentifier}. + */ + public static CommunicationIdentifier convert(CommunicationIdentifierModel identifier) { + if (identifier == null) { + return null; + } + + assertSingleType(identifier); + String rawId = identifier.getRawId(); + CommunicationIdentifierModelKind kind + = (identifier.getKind() != null) ? identifier.getKind() : extractKind(identifier); + + if (kind == CommunicationIdentifierModelKind.COMMUNICATION_USER && identifier.getCommunicationUser() != null) { + Objects.requireNonNull(identifier.getCommunicationUser().getId(), + "'ID' of the CommunicationIdentifierModel cannot be null."); + return new CommunicationUserIdentifier(identifier.getCommunicationUser().getId()); + } + + if (kind == CommunicationIdentifierModelKind.PHONE_NUMBER && identifier.getPhoneNumber() != null) { + String phoneNumber = identifier.getPhoneNumber().getValue(); + Objects.requireNonNull(phoneNumber, "'PhoneNumber' of the CommunicationIdentifierModel cannot be null."); + Objects.requireNonNull(rawId, "'RawID' of the CommunicationIdentifierModel cannot be null."); + return new PhoneNumberIdentifier(phoneNumber).setRawId(rawId); + } + + if (kind == CommunicationIdentifierModelKind.MICROSOFT_TEAMS_USER + && identifier.getMicrosoftTeamsUser() != null) { + MicrosoftTeamsUserIdentifierModel teamsUserIdentifierModel = identifier.getMicrosoftTeamsUser(); + Objects.requireNonNull(teamsUserIdentifierModel.getUserId(), + "'UserID' of the CommunicationIdentifierModel cannot be null."); + Objects.requireNonNull(teamsUserIdentifierModel.getCloud(), + "'Cloud' of the CommunicationIdentifierModel cannot be null."); + Objects.requireNonNull(rawId, "'RawID' of the CommunicationIdentifierModel cannot be null."); + return new MicrosoftTeamsUserIdentifier(teamsUserIdentifierModel.getUserId(), + teamsUserIdentifierModel.isAnonymous()).setRawId(rawId) + .setCloudEnvironment( + CommunicationCloudEnvironment.fromString(teamsUserIdentifierModel.getCloud().toString())); + } + + Objects.requireNonNull(rawId, "'RawID' of the CommunicationIdentifierModel cannot be null."); + return new UnknownIdentifier(rawId); + } + + /** + * Maps from {@link CommunicationIdentifier} to {@link CommunicationIdentifierModel}. + */ + public static CommunicationIdentifierModel convert(CommunicationIdentifier identifier) + throws IllegalArgumentException { + + if (identifier == null) { + return null; + } + + if (identifier instanceof CommunicationUserIdentifier) { + CommunicationUserIdentifier communicationUserIdentifier = (CommunicationUserIdentifier) identifier; + return new CommunicationIdentifierModel().setRawId(communicationUserIdentifier.getRawId()) + .setCommunicationUser( + new CommunicationUserIdentifierModel().setId(communicationUserIdentifier.getId())); + } + + if (identifier instanceof PhoneNumberIdentifier) { + PhoneNumberIdentifier phoneNumberIdentifier = (PhoneNumberIdentifier) identifier; + return new CommunicationIdentifierModel().setRawId(phoneNumberIdentifier.getRawId()) + .setPhoneNumber(new PhoneNumberIdentifierModel().setValue(phoneNumberIdentifier.getPhoneNumber())); + } + + if (identifier instanceof MicrosoftTeamsUserIdentifier) { + MicrosoftTeamsUserIdentifier teamsUserIdentifier = (MicrosoftTeamsUserIdentifier) identifier; + return new CommunicationIdentifierModel().setRawId(teamsUserIdentifier.getRawId()) + .setMicrosoftTeamsUser( + new MicrosoftTeamsUserIdentifierModel().setIsAnonymous(teamsUserIdentifier.isAnonymous()) + .setUserId(teamsUserIdentifier.getUserId()) + .setCloud(CommunicationCloudEnvironmentModel + .fromString(teamsUserIdentifier.getCloudEnvironment().toString()))); + } + + if (identifier instanceof UnknownIdentifier) { + UnknownIdentifier unknownIdentifier = (UnknownIdentifier) identifier; + return new CommunicationIdentifierModel().setRawId(unknownIdentifier.getId()); + } + + throw new IllegalArgumentException( + String.format("Unknown identifier class '%s'", identifier.getClass().getName())); + } + + private static void assertSingleType(CommunicationIdentifierModel identifier) { + CommunicationUserIdentifierModel communicationUser = identifier.getCommunicationUser(); + PhoneNumberIdentifierModel phoneNumber = identifier.getPhoneNumber(); + MicrosoftTeamsUserIdentifierModel microsoftTeamsUser = identifier.getMicrosoftTeamsUser(); + + ArrayList presentProperties = new ArrayList<>(); + if (communicationUser != null) { + presentProperties.add(communicationUser.getClass().getName()); + } + if (phoneNumber != null) { + presentProperties.add(phoneNumber.getClass().getName()); + } + if (microsoftTeamsUser != null) { + presentProperties.add(microsoftTeamsUser.getClass().getName()); + } + + if (presentProperties.size() > 1) { + throw new IllegalArgumentException(String.format( + "Only one of the identifier models in %s should be present.", String.join(", ", presentProperties))); + } + } + + private static CommunicationIdentifierModelKind extractKind(CommunicationIdentifierModel identifier) { + Objects.requireNonNull(identifier, "CommunicationIdentifierModel cannot be null."); + if (identifier.getCommunicationUser() != null) { + return CommunicationIdentifierModelKind.COMMUNICATION_USER; + } + if (identifier.getPhoneNumber() != null) { + return CommunicationIdentifierModelKind.PHONE_NUMBER; + } + if (identifier.getMicrosoftTeamsUser() != null) { + return CommunicationIdentifierModelKind.MICROSOFT_TEAMS_USER; + } + return CommunicationIdentifierModelKind.UNKNOWN; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/PhoneNumberIdentifierConverter.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/PhoneNumberIdentifierConverter.java new file mode 100644 index 000000000000..c4c78b3faf0b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/PhoneNumberIdentifierConverter.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.implementation.converters; + +import com.azure.communication.callingserver.implementation.models.PhoneNumberIdentifierModel; +import com.azure.communication.common.PhoneNumberIdentifier; + +/** + * A converter for {@link PhoneNumberIdentifier} and {@link PhoneNumberIdentifierModel} + */ +public final class PhoneNumberIdentifierConverter { + + /** + * Converts to {@link PhoneNumberIdentifierModel}. + */ + public static PhoneNumberIdentifierModel convert(PhoneNumberIdentifier phoneNumberIdentifier) { + + PhoneNumberIdentifierModel phoneNumberIdentifierModel + = (phoneNumberIdentifier == null || phoneNumberIdentifier.getPhoneNumber().isEmpty()) + ? null + : CommunicationIdentifierConverter + .convert(new PhoneNumberIdentifier(phoneNumberIdentifier.getPhoneNumber())) + .getPhoneNumber(); + return phoneNumberIdentifierModel; + } + + /** + * Converts to {@link PhoneNumberIdentifier}. + */ + public static PhoneNumberIdentifier convert(PhoneNumberIdentifierModel phoneNumberIdentifierModel) { + + PhoneNumberIdentifier phoneNumberIdentifier + = (phoneNumberIdentifierModel == null || phoneNumberIdentifierModel.getValue().isEmpty()) + ? null + : new PhoneNumberIdentifier(phoneNumberIdentifierModel.getValue()); + + return phoneNumberIdentifier; + } + + private PhoneNumberIdentifierConverter() { + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/package-info.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/package-info.java new file mode 100644 index 000000000000..5cdbdf138591 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/converters/package-info.java @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** Package containing the implementations for AzureCommunicationCallingServerService. null. */ +package com.azure.communication.callingserver.implementation.converters; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AcsCallParticipantInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AcsCallParticipantInternal.java new file mode 100644 index 000000000000..eda7c5815cca --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AcsCallParticipantInternal.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The AcsCallParticipantInternal model. */ +@Fluent +public final class AcsCallParticipantInternal implements JsonSerializable { + /* + * Communication identifier of the participant + */ + private CommunicationIdentifierModel identifier; + + /* + * Is participant muted + */ + private Boolean isMuted; + + /** + * Get the identifier property: Communication identifier of the participant. + * + * @return the identifier value. + */ + public CommunicationIdentifierModel getIdentifier() { + return this.identifier; + } + + /** + * Set the identifier property: Communication identifier of the participant. + * + * @param identifier the identifier value to set. + * @return the AcsCallParticipantInternal object itself. + */ + public AcsCallParticipantInternal setIdentifier(CommunicationIdentifierModel identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the isMuted property: Is participant muted. + * + * @return the isMuted value. + */ + public Boolean isMuted() { + return this.isMuted; + } + + /** + * Set the isMuted property: Is participant muted. + * + * @param isMuted the isMuted value to set. + * @return the AcsCallParticipantInternal object itself. + */ + public AcsCallParticipantInternal setIsMuted(Boolean isMuted) { + this.isMuted = isMuted; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeJsonField("identifier", identifier) + .writeBooleanField("isMuted", isMuted) + .writeEndObject(); + } + + /** + * Reads an instance of {@link AcsCallParticipantInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link AcsCallParticipantInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static AcsCallParticipantInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AcsCallParticipantInternal participant = new AcsCallParticipantInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identifier".equals(fieldName)) { + participant.identifier = CommunicationIdentifierModel.fromJson(reader); + } else if ("isMuted".equals(fieldName)) { + participant.isMuted = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return participant; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AcsEventTypeInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AcsEventTypeInternal.java new file mode 100644 index 000000000000..2fac615bf4c7 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AcsEventTypeInternal.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for AcsEventTypeInternal. */ +public final class AcsEventTypeInternal extends ExpandableStringEnum { + /** Static value unknown for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal UNKNOWN = fromString("unknown"); + + /** Static value callConnected for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal CALL_CONNECTED = fromString("callConnected"); + + /** Static value callDisconnected for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal CALL_DISCONNECTED = fromString("callDisconnected"); + + /** Static value callTransferAccepted for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal CALL_TRANSFER_ACCEPTED = fromString("callTransferAccepted"); + + /** Static value callTransferFailed for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal CALL_TRANSFER_FAILED = fromString("callTransferFailed"); + + /** Static value addParticipantsSucceeded for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal ADD_PARTICIPANTS_SUCCEEDED = fromString("addParticipantsSucceeded"); + + /** Static value addParticipantsFailed for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal ADD_PARTICIPANTS_FAILED = fromString("addParticipantsFailed"); + + /** Static value participantsUpdated for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal PARTICIPANTS_UPDATED = fromString("participantsUpdated"); + + /** Static value recordingStateChanged for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal RECORDING_STATE_CHANGED = fromString("recordingStateChanged"); + + /** Static value playCompleted for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal PLAY_COMPLETED = fromString("playCompleted"); + + /** Static value playFailed for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal PLAY_FAILED = fromString("playFailed"); + + /** Static value recognizeCompleted for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal RECOGNIZE_COMPLETED = fromString("recognizeCompleted"); + + /** Static value recognizeFailed for AcsEventTypeInternal. */ + public static final AcsEventTypeInternal RECOGNIZE_FAILED = fromString("recognizeFailed"); + + /** + * Creates an instance of {@link AcsEventTypeInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link AcsEventTypeInternal} instead. + */ + @Deprecated + public AcsEventTypeInternal() { + } + + /** + * Creates or finds a AcsEventTypeInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding AcsEventTypeInternal. + */ + public static AcsEventTypeInternal fromString(String name) { + return fromString(name, AcsEventTypeInternal.class); + } + + /** @return known AcsEventTypeInternal values. */ + public static Collection values() { + return values(AcsEventTypeInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AddParticipantsRequestInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AddParticipantsRequestInternal.java new file mode 100644 index 000000000000..3945bfd45cf9 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AddParticipantsRequestInternal.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The AddParticipantsRequestInternal model. */ +@Fluent +public final class AddParticipantsRequestInternal implements JsonSerializable { + /* + * The source caller Id that's shown to the PSTN participant being invited. + * Required only when inviting a PSTN participant. + */ + private PhoneNumberIdentifierModel sourceCallerId; + + /* + * The participants to invite. + */ + private List participantsToAdd; + + /* + * Gets or sets the timeout to wait for the invited participant to pickup. + * The maximum value of this is 180 seconds + */ + private Integer invitationTimeoutInSeconds; + + /* + * The operation context. + */ + private String operationContext; + + /** + * Get the sourceCallerId property: The source caller Id that's shown to the PSTN participant being invited. + * Required only when inviting a PSTN participant. + * + * @return the sourceCallerId value. + */ + public PhoneNumberIdentifierModel getSourceCallerId() { + return this.sourceCallerId; + } + + /** + * Set the sourceCallerId property: The source caller Id that's shown to the PSTN participant being invited. + * Required only when inviting a PSTN participant. + * + * @param sourceCallerId the sourceCallerId value to set. + * @return the AddParticipantsRequestInternal object itself. + */ + public AddParticipantsRequestInternal setSourceCallerId(PhoneNumberIdentifierModel sourceCallerId) { + this.sourceCallerId = sourceCallerId; + return this; + } + + /** + * Get the participantsToAdd property: The participants to invite. + * + * @return the participantsToAdd value. + */ + public List getParticipantsToAdd() { + return this.participantsToAdd; + } + + /** + * Set the participantsToAdd property: The participants to invite. + * + * @param participantsToAdd the participantsToAdd value to set. + * @return the AddParticipantsRequestInternal object itself. + */ + public AddParticipantsRequestInternal setParticipantsToAdd(List participantsToAdd) { + this.participantsToAdd = participantsToAdd; + return this; + } + + /** + * Get the invitationTimeoutInSeconds property: Gets or sets the timeout to wait for the invited participant to + * pickup. The maximum value of this is 180 seconds. + * + * @return the invitationTimeoutInSeconds value. + */ + public Integer getInvitationTimeoutInSeconds() { + return this.invitationTimeoutInSeconds; + } + + /** + * Set the invitationTimeoutInSeconds property: Gets or sets the timeout to wait for the invited participant to + * pickup. The maximum value of this is 180 seconds. + * + * @param invitationTimeoutInSeconds the invitationTimeoutInSeconds value to set. + * @return the AddParticipantsRequestInternal object itself. + */ + public AddParticipantsRequestInternal setInvitationTimeoutInSeconds(Integer invitationTimeoutInSeconds) { + this.invitationTimeoutInSeconds = invitationTimeoutInSeconds; + return this; + } + + /** + * Get the operationContext property: The operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The operation context. + * + * @param operationContext the operationContext value to set. + * @return the AddParticipantsRequestInternal object itself. + */ + public AddParticipantsRequestInternal setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeJsonField("sourceCallerId", sourceCallerId) + .writeArrayField("participantsToAdd", participantsToAdd, JsonWriter::writeJson) + .writeNumberField("invitationTimeoutInSeconds", invitationTimeoutInSeconds) + .writeStringField("operationContext", operationContext) + .writeEndObject(); + } + + /** + * Reads an instance of {@link AddParticipantsRequestInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link AddParticipantsRequestInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static AddParticipantsRequestInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddParticipantsRequestInternal request = new AddParticipantsRequestInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceCallerId".equals(fieldName)) { + request.sourceCallerId = PhoneNumberIdentifierModel.fromJson(reader); + } else if ("participantsToAdd".equals(fieldName)) { + request.participantsToAdd = reader.readArray(CommunicationIdentifierModel::fromJson); + } else if ("invitationTimeoutInSeconds".equals(fieldName)) { + request.invitationTimeoutInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("operationContext".equals(fieldName)) { + request.operationContext = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AddParticipantsResponseInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AddParticipantsResponseInternal.java new file mode 100644 index 000000000000..5af821bf6263 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AddParticipantsResponseInternal.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The AddParticipantsResponseInternal model. */ +@Fluent +public final class AddParticipantsResponseInternal implements JsonSerializable { + /* + * The participants property. + */ + private List participants; + + /* + * The operation context provided by client. + */ + private String operationContext; + + /** + * Get the participants property: The participants property. + * + * @return the participants value. + */ + public List getParticipants() { + return this.participants; + } + + /** + * Set the participants property: The participants property. + * + * @param participants the participants value to set. + * @return the AddParticipantsResponseInternal object itself. + */ + public AddParticipantsResponseInternal setParticipants(List participants) { + this.participants = participants; + return this; + } + + /** + * Get the operationContext property: The operation context provided by client. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The operation context provided by client. + * + * @param operationContext the operationContext value to set. + * @return the AddParticipantsResponseInternal object itself. + */ + public AddParticipantsResponseInternal setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeArrayField("participants", participants, JsonWriter::writeJson) + .writeStringField("operationContext", operationContext) + .writeEndObject(); + } + + /** + * Reads an instance of {@link AddParticipantsResponseInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link AddParticipantsResponseInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static AddParticipantsResponseInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddParticipantsResponseInternal response = new AddParticipantsResponseInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("participants".equals(fieldName)) { + response.participants = reader.readArray(AcsCallParticipantInternal::fromJson); + } else if ("operationContext".equals(fieldName)) { + response.operationContext = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return response; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AnswerCallRequestInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AnswerCallRequestInternal.java new file mode 100644 index 000000000000..3c5cacf2ddf0 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/AnswerCallRequestInternal.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The request payload for answering the call. */ +@Fluent +public final class AnswerCallRequestInternal implements JsonSerializable { + /* + * The context associated with the call. + */ + private String incomingCallContext; + + /* + * The callback uri. + */ + private String callbackUri; + + /* + * Media Streaming Configuration. + */ + private MediaStreamingConfigurationInternal mediaStreamingConfiguration; + + /** + * Get the incomingCallContext property: The context associated with the call. + * + * @return the incomingCallContext value. + */ + public String getIncomingCallContext() { + return this.incomingCallContext; + } + + /** + * Set the incomingCallContext property: The context associated with the call. + * + * @param incomingCallContext the incomingCallContext value to set. + * @return the AnswerCallRequestInternal object itself. + */ + public AnswerCallRequestInternal setIncomingCallContext(String incomingCallContext) { + this.incomingCallContext = incomingCallContext; + return this; + } + + /** + * Get the callbackUri property: The callback uri. + * + * @return the callbackUri value. + */ + public String getCallbackUri() { + return this.callbackUri; + } + + /** + * Set the callbackUri property: The callback uri. + * + * @param callbackUri the callbackUri value to set. + * @return the AnswerCallRequestInternal object itself. + */ + public AnswerCallRequestInternal setCallbackUri(String callbackUri) { + this.callbackUri = callbackUri; + return this; + } + + /** + * Get the mediaStreamingConfiguration property: Media Streaming Configuration. + * + * @return the mediaStreamingConfiguration value. + */ + public MediaStreamingConfigurationInternal getMediaStreamingConfiguration() { + return this.mediaStreamingConfiguration; + } + + /** + * Set the mediaStreamingConfiguration property: Media Streaming Configuration. + * + * @param mediaStreamingConfiguration the mediaStreamingConfiguration value to set. + * @return the AnswerCallRequestInternal object itself. + */ + public AnswerCallRequestInternal + setMediaStreamingConfiguration(MediaStreamingConfigurationInternal mediaStreamingConfiguration) { + this.mediaStreamingConfiguration = mediaStreamingConfiguration; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("incomingCallContext", incomingCallContext) + .writeStringField("callbackUri", callbackUri) + .writeJsonField("mediaStreamingConfiguration", mediaStreamingConfiguration) + .writeEndObject(); + } + + /** + * Reads an instance of {@link AnswerCallRequestInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link AnswerCallRequestInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static AnswerCallRequestInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AnswerCallRequestInternal request = new AnswerCallRequestInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("incomingCallContext".equals(fieldName)) { + request.incomingCallContext = reader.getString(); + } else if ("callbackUri".equals(fieldName)) { + request.callbackUri = reader.getString(); + } else if ("mediaStreamingConfiguration".equals(fieldName)) { + request.mediaStreamingConfiguration = MediaStreamingConfigurationInternal.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallConnectionPropertiesInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallConnectionPropertiesInternal.java new file mode 100644 index 000000000000..f0885a98e00e --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallConnectionPropertiesInternal.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; +import java.util.Objects; + +/** The CallConnectionPropertiesInternal model. */ +@Fluent +public final class CallConnectionPropertiesInternal implements JsonSerializable { + /* + * The call connection id. + */ + private String callConnectionId; + + /* + * The server call id. + */ + private String serverCallId; + + /* + * The source of the call. + */ + private CallSourceInternal source; + + /* + * The targets of the call. + */ + private List targets; + + /* + * The state of the call connection. + */ + private CallConnectionStateModelInternal callConnectionState; + + /* + * The subject. + */ + private String subject; + + /* + * The callback URI. + */ + private String callbackUri; + + /* + * SubscriptionId for media streaming + */ + private String mediaSubscriptionId; + + /** + * Get the callConnectionId property: The call connection id. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Set the callConnectionId property: The call connection id. + * + * @param callConnectionId the callConnectionId value to set. + * @return the CallConnectionPropertiesInternal object itself. + */ + public CallConnectionPropertiesInternal setCallConnectionId(String callConnectionId) { + this.callConnectionId = callConnectionId; + return this; + } + + /** + * Get the serverCallId property: The server call id. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: The server call id. + * + * @param serverCallId the serverCallId value to set. + * @return the CallConnectionPropertiesInternal object itself. + */ + public CallConnectionPropertiesInternal setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the source property: The source of the call. + * + * @return the source value. + */ + public CallSourceInternal getSource() { + return this.source; + } + + /** + * Set the source property: The source of the call. + * + * @param source the source value to set. + * @return the CallConnectionPropertiesInternal object itself. + */ + public CallConnectionPropertiesInternal setSource(CallSourceInternal source) { + this.source = source; + return this; + } + + /** + * Get the targets property: The targets of the call. + * + * @return the targets value. + */ + public List getTargets() { + return this.targets; + } + + /** + * Set the targets property: The targets of the call. + * + * @param targets the targets value to set. + * @return the CallConnectionPropertiesInternal object itself. + */ + public CallConnectionPropertiesInternal setTargets(List targets) { + this.targets = targets; + return this; + } + + /** + * Get the callConnectionState property: The state of the call connection. + * + * @return the callConnectionState value. + */ + public CallConnectionStateModelInternal getCallConnectionState() { + return this.callConnectionState; + } + + /** + * Set the callConnectionState property: The state of the call connection. + * + * @param callConnectionState the callConnectionState value to set. + * @return the CallConnectionPropertiesInternal object itself. + */ + public CallConnectionPropertiesInternal + setCallConnectionState(CallConnectionStateModelInternal callConnectionState) { + this.callConnectionState = callConnectionState; + return this; + } + + /** + * Get the subject property: The subject. + * + * @return the subject value. + */ + public String getSubject() { + return this.subject; + } + + /** + * Set the subject property: The subject. + * + * @param subject the subject value to set. + * @return the CallConnectionPropertiesInternal object itself. + */ + public CallConnectionPropertiesInternal setSubject(String subject) { + this.subject = subject; + return this; + } + + /** + * Get the callbackUri property: The callback URI. + * + * @return the callbackUri value. + */ + public String getCallbackUri() { + return this.callbackUri; + } + + /** + * Set the callbackUri property: The callback URI. + * + * @param callbackUri the callbackUri value to set. + * @return the CallConnectionPropertiesInternal object itself. + */ + public CallConnectionPropertiesInternal setCallbackUri(String callbackUri) { + this.callbackUri = callbackUri; + return this; + } + + /** + * Get the mediaSubscriptionId property: SubscriptionId for media streaming. + * + * @return the mediaSubscriptionId value. + */ + public String getMediaSubscriptionId() { + return this.mediaSubscriptionId; + } + + /** + * Set the mediaSubscriptionId property: SubscriptionId for media streaming. + * + * @param mediaSubscriptionId the mediaSubscriptionId value to set. + * @return the CallConnectionPropertiesInternal object itself. + */ + public CallConnectionPropertiesInternal setMediaSubscriptionId(String mediaSubscriptionId) { + this.mediaSubscriptionId = mediaSubscriptionId; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("callConnectionId", callConnectionId) + .writeStringField("serverCallId", serverCallId) + .writeJsonField("source", source) + .writeArrayField("targets", targets, JsonWriter::writeJson) + .writeStringField("callConnectionState", Objects.toString(callConnectionState, null)) + .writeStringField("subject", subject) + .writeStringField("callbackUri", callbackUri) + .writeStringField("mediaSubscriptionId", mediaSubscriptionId) + .writeEndObject(); + } + + /** + * Reads an instance of {@link CallConnectionPropertiesInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link CallConnectionPropertiesInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CallConnectionPropertiesInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CallConnectionPropertiesInternal properties = new CallConnectionPropertiesInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("callConnectionId".equals(fieldName)) { + properties.callConnectionId = reader.getString(); + } else if ("serverCallId".equals(fieldName)) { + properties.serverCallId = reader.getString(); + } else if ("source".equals(fieldName)) { + properties.source = CallSourceInternal.fromJson(reader); + } else if ("targets".equals(fieldName)) { + properties.targets = reader.readArray(CommunicationIdentifierModel::fromJson); + } else if ("callConnectionState".equals(fieldName)) { + properties.callConnectionState = CallConnectionStateModelInternal.fromString(reader.getString()); + } else if ("subject".equals(fieldName)) { + properties.subject = reader.getString(); + } else if ("callbackUri".equals(fieldName)) { + properties.callbackUri = reader.getString(); + } else if ("mediaSubscriptionId".equals(fieldName)) { + properties.mediaSubscriptionId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return properties; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallConnectionStateModelInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallConnectionStateModelInternal.java new file mode 100644 index 000000000000..7a8742fbda73 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallConnectionStateModelInternal.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for CallConnectionStateModelInternal. */ +public final class CallConnectionStateModelInternal extends ExpandableStringEnum { + /** Static value unknown for CallConnectionStateModelInternal. */ + public static final CallConnectionStateModelInternal UNKNOWN = fromString("unknown"); + + /** Static value connecting for CallConnectionStateModelInternal. */ + public static final CallConnectionStateModelInternal CONNECTING = fromString("connecting"); + + /** Static value connected for CallConnectionStateModelInternal. */ + public static final CallConnectionStateModelInternal CONNECTED = fromString("connected"); + + /** Static value transferring for CallConnectionStateModelInternal. */ + public static final CallConnectionStateModelInternal TRANSFERRING = fromString("transferring"); + + /** Static value transferAccepted for CallConnectionStateModelInternal. */ + public static final CallConnectionStateModelInternal TRANSFER_ACCEPTED = fromString("transferAccepted"); + + /** Static value disconnecting for CallConnectionStateModelInternal. */ + public static final CallConnectionStateModelInternal DISCONNECTING = fromString("disconnecting"); + + /** Static value disconnected for CallConnectionStateModelInternal. */ + public static final CallConnectionStateModelInternal DISCONNECTED = fromString("disconnected"); + + /** + * Creates an instance of {@link CallConnectionStateModelInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of + * {@link CallConnectionStateModelInternal} instead. + */ + @Deprecated + public CallConnectionStateModelInternal() { + } + + /** + * Creates or finds a CallConnectionStateModelInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding CallConnectionStateModelInternal. + */ + public static CallConnectionStateModelInternal fromString(String name) { + return fromString(name, CallConnectionStateModelInternal.class); + } + + /** @return known CallConnectionStateModelInternal values. */ + public static Collection values() { + return values(CallConnectionStateModelInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallLocatorInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallLocatorInternal.java new file mode 100644 index 000000000000..5d090e1316ea --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallLocatorInternal.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The locator used for joining or taking action on a call. */ +@Fluent +public final class CallLocatorInternal implements JsonSerializable { + /* + * The group call id + */ + private String groupCallId; + + /* + * The server call id. + */ + private String serverCallId; + + /* + * The call locator kind. + */ + private CallLocatorKindInternal kind; + + /** + * Get the groupCallId property: The group call id. + * + * @return the groupCallId value. + */ + public String getGroupCallId() { + return this.groupCallId; + } + + /** + * Set the groupCallId property: The group call id. + * + * @param groupCallId the groupCallId value to set. + * @return the CallLocatorInternal object itself. + */ + public CallLocatorInternal setGroupCallId(String groupCallId) { + this.groupCallId = groupCallId; + return this; + } + + /** + * Get the serverCallId property: The server call id. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: The server call id. + * + * @param serverCallId the serverCallId value to set. + * @return the CallLocatorInternal object itself. + */ + public CallLocatorInternal setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the kind property: The call locator kind. + * + * @return the kind value. + */ + public CallLocatorKindInternal getKind() { + return this.kind; + } + + /** + * Set the kind property: The call locator kind. + * + * @param kind the kind value to set. + * @return the CallLocatorInternal object itself. + */ + public CallLocatorInternal setKind(CallLocatorKindInternal kind) { + this.kind = kind; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("groupCallId", groupCallId) + .writeStringField("serverCallId", serverCallId) + .writeStringField("kind", Objects.toString(kind, null)) + .writeEndObject(); + } + + /** + * Reads an instance of {@link CallLocatorInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link CallLocatorInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CallLocatorInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CallLocatorInternal callLocatorInternal = new CallLocatorInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupCallId".equals(fieldName)) { + callLocatorInternal.groupCallId = reader.getString(); + } else if ("serverCallId".equals(fieldName)) { + callLocatorInternal.serverCallId = reader.getString(); + } else if ("kind".equals(fieldName)) { + callLocatorInternal.kind = CallLocatorKindInternal.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return callLocatorInternal; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallLocatorKindInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallLocatorKindInternal.java new file mode 100644 index 000000000000..b20f09cd7841 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallLocatorKindInternal.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.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for CallLocatorKindInternal. */ +public final class CallLocatorKindInternal extends ExpandableStringEnum { + /** Static value groupCallLocator for CallLocatorKindInternal. */ + public static final CallLocatorKindInternal GROUP_CALL_LOCATOR = fromString("groupCallLocator"); + + /** Static value serverCallLocator for CallLocatorKindInternal. */ + public static final CallLocatorKindInternal SERVER_CALL_LOCATOR = fromString("serverCallLocator"); + + /** + * Creates an instance of {@link CallLocatorKindInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link CallLocatorKindInternal} + * instead. + */ + @Deprecated + public CallLocatorKindInternal() { + } + + /** + * Creates or finds a CallLocatorKindInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding CallLocatorKindInternal. + */ + public static CallLocatorKindInternal fromString(String name) { + return fromString(name, CallLocatorKindInternal.class); + } + + /** @return known CallLocatorKindInternal values. */ + public static Collection values() { + return values(CallLocatorKindInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallRejectReasonInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallRejectReasonInternal.java new file mode 100644 index 000000000000..7ca5f16b55d9 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallRejectReasonInternal.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for CallRejectReasonInternal. */ +public final class CallRejectReasonInternal extends ExpandableStringEnum { + /** Static value none for CallRejectReasonInternal. */ + public static final CallRejectReasonInternal NONE = fromString("none"); + + /** Static value busy for CallRejectReasonInternal. */ + public static final CallRejectReasonInternal BUSY = fromString("busy"); + + /** Static value forbidden for CallRejectReasonInternal. */ + public static final CallRejectReasonInternal FORBIDDEN = fromString("forbidden"); + + /** + * Creates an instance of {@link CallRejectReasonInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link CallRejectReasonInternal} + * instead. + */ + @Deprecated + public CallRejectReasonInternal() { + } + + /** + * Creates or finds a CallRejectReasonInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding CallRejectReasonInternal. + */ + public static CallRejectReasonInternal fromString(String name) { + return fromString(name, CallRejectReasonInternal.class); + } + + /** @return known CallRejectReasonInternal values. */ + public static Collection values() { + return values(CallRejectReasonInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallSourceInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallSourceInternal.java new file mode 100644 index 000000000000..c9f40c4beeda --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CallSourceInternal.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The CallSourceInternal model. */ +@Fluent +public final class CallSourceInternal implements JsonSerializable { + /* + * The alternate identity of the source of the call if dialing out to a + * pstn number + */ + private PhoneNumberIdentifierModel callerId; + + /* + * The identifier of the source of the call + */ + private CommunicationIdentifierModel identifier; + + /** + * Get the callerId property: The alternate identity of the source of the call if dialing out to a pstn number. + * + * @return the callerId value. + */ + public PhoneNumberIdentifierModel getCallerId() { + return this.callerId; + } + + /** + * Set the callerId property: The alternate identity of the source of the call if dialing out to a pstn number. + * + * @param callerId the callerId value to set. + * @return the CallSourceInternal object itself. + */ + public CallSourceInternal setCallerId(PhoneNumberIdentifierModel callerId) { + this.callerId = callerId; + return this; + } + + /** + * Get the identifier property: The identifier of the source of the call. + * + * @return the identifier value. + */ + public CommunicationIdentifierModel getIdentifier() { + return this.identifier; + } + + /** + * Set the identifier property: The identifier of the source of the call. + * + * @param identifier the identifier value to set. + * @return the CallSourceInternal object itself. + */ + public CallSourceInternal setIdentifier(CommunicationIdentifierModel identifier) { + this.identifier = identifier; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeJsonField("calledId", callerId) + .writeJsonField("identifier", identifier) + .writeEndObject(); + } + + /** + * Reads an instance of {@link CallSourceInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link CallSourceInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CallSourceInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CallSourceInternal source = new CallSourceInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("callerId".equals(fieldName)) { + source.callerId = PhoneNumberIdentifierModel.fromJson(reader); + } else if ("identifier".equals(fieldName)) { + source.identifier = CommunicationIdentifierModel.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return source; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/ChannelAffinityInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/ChannelAffinityInternal.java new file mode 100644 index 000000000000..55012cf1ba0c --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/ChannelAffinityInternal.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** Channel affinity for a participant. */ +@Fluent +public final class ChannelAffinityInternal implements JsonSerializable { + /* + * Channel number to which bitstream from a particular participant will be + * written. + */ + private Integer channel; + + /* + * The identifier for the participant whose bitstream will be written to + * the channel + * represented by the channel number. + */ + private CommunicationIdentifierModel participant; + + /** + * Get the channel property: Channel number to which bitstream from a particular participant will be written. + * + * @return the channel value. + */ + public Integer getChannel() { + return this.channel; + } + + /** + * Set the channel property: Channel number to which bitstream from a particular participant will be written. + * + * @param channel the channel value to set. + * @return the ChannelAffinityInternal object itself. + */ + public ChannelAffinityInternal setChannel(Integer channel) { + this.channel = channel; + return this; + } + + /** + * Get the participant property: The identifier for the participant whose bitstream will be written to the channel + * represented by the channel number. + * + * @return the participant value. + */ + public CommunicationIdentifierModel getParticipant() { + return this.participant; + } + + /** + * Set the participant property: The identifier for the participant whose bitstream will be written to the channel + * represented by the channel number. + * + * @param participant the participant value to set. + * @return the ChannelAffinityInternal object itself. + */ + public ChannelAffinityInternal setParticipant(CommunicationIdentifierModel participant) { + this.participant = participant; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeNumberField("channel", channel) + .writeJsonField("participant", participant) + .writeEndObject(); + } + + /** + * Reads an instance of {@link ChannelAffinityInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link ChannelAffinityInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static ChannelAffinityInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChannelAffinityInternal channelAffinity = new ChannelAffinityInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("channel".equals(fieldName)) { + channelAffinity.channel = reader.getNullable(JsonReader::getInt); + } else if ("participant".equals(fieldName)) { + channelAffinity.participant = CommunicationIdentifierModel.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return channelAffinity; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CollectTonesResult.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CollectTonesResult.java new file mode 100644 index 000000000000..1593de7a1898 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CollectTonesResult.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The CollectTonesResult model. */ +@Fluent +public final class CollectTonesResult implements JsonSerializable { + /* + * The tones property. + */ + private List tones; + + /** + * Get the tones property: The tones property. + * + * @return the tones value. + */ + public List getTones() { + return this.tones; + } + + /** + * Set the tones property: The tones property. + * + * @param tones the tones value to set. + * @return the CollectTonesResult object itself. + */ + public CollectTonesResult setTones(List tones) { + this.tones = tones; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeArrayField("tones", tones, JsonWriter::writeString).writeEndObject(); + } + + /** + * Reads an instance of {@link CollectTonesResult} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link CollectTonesResult}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CollectTonesResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CollectTonesResult result = new CollectTonesResult(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tones".equals(fieldName)) { + result.tones = reader.readArray(JsonReader::getString); + } else { + reader.skipChildren(); + } + } + + return result; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationCloudEnvironmentModel.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationCloudEnvironmentModel.java new file mode 100644 index 000000000000..0708286c6d95 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationCloudEnvironmentModel.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for CommunicationCloudEnvironmentModel. */ +public final class CommunicationCloudEnvironmentModel extends ExpandableStringEnum { + /** Static value public for CommunicationCloudEnvironmentModel. */ + public static final CommunicationCloudEnvironmentModel PUBLIC = fromString("public"); + + /** Static value dod for CommunicationCloudEnvironmentModel. */ + public static final CommunicationCloudEnvironmentModel DOD = fromString("dod"); + + /** Static value gcch for CommunicationCloudEnvironmentModel. */ + public static final CommunicationCloudEnvironmentModel GCCH = fromString("gcch"); + + /** + * Creates an instance of {@link CommunicationCloudEnvironmentModel} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of + * {@link CommunicationCloudEnvironmentModel} instead. + */ + @Deprecated + public CommunicationCloudEnvironmentModel() { + } + + /** + * Creates or finds a CommunicationCloudEnvironmentModel from its string representation. + * + * @param name a name to look for. + * @return the corresponding CommunicationCloudEnvironmentModel. + */ + public static CommunicationCloudEnvironmentModel fromString(String name) { + return fromString(name, CommunicationCloudEnvironmentModel.class); + } + + /** @return known CommunicationCloudEnvironmentModel values. */ + public static Collection values() { + return values(CommunicationCloudEnvironmentModel.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationError.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationError.java new file mode 100644 index 000000000000..e31b308d0a8d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationError.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The CommunicationError model. */ +@Fluent +public final class CommunicationError implements JsonSerializable { + /* + * The code property. + */ + private String code; + + /* + * The message property. + */ + private String message; + + /* + * The target property. + */ + private String target; + + /* + * The details property. + */ + private List details; + + /* + * The innererror property. + */ + private CommunicationError innererror; + + /** + * Get the code property: The code property. + * + * @return the code value. + */ + public String getCode() { + return this.code; + } + + /** + * Set the code property: The code property. + * + * @param code the code value to set. + * @return the CommunicationError object itself. + */ + public CommunicationError setCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: The message property. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: The message property. + * + * @param message the message value to set. + * @return the CommunicationError object itself. + */ + public CommunicationError setMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target property: The target property. + * + * @return the target value. + */ + public String getTarget() { + return this.target; + } + + /** + * Set the target property: The target property. + * + * @param target the target value to set. + * @return the CommunicationError object itself. + */ + public CommunicationError setTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the details property: The details property. + * + * @return the details value. + */ + public List getDetails() { + return this.details; + } + + /** + * Set the details property: The details property. + * + * @param details the details value to set. + * @return the CommunicationError object itself. + */ + public CommunicationError setDetails(List details) { + this.details = details; + return this; + } + + /** + * Get the innererror property: The innererror property. + * + * @return the innererror value. + */ + public CommunicationError getInnererror() { + return this.innererror; + } + + /** + * Set the innererror property: The innererror property. + * + * @param innererror the innererror value to set. + * @return the CommunicationError object itself. + */ + public CommunicationError setInnererror(CommunicationError innererror) { + this.innererror = innererror; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("code", code) + .writeStringField("message", message) + .writeStringField("target", target) + .writeArrayField("details", details, JsonWriter::writeJson) + .writeJsonField("innererror", innererror) + .writeEndObject(); + } + + /** + * Reads an instance of {@link CommunicationError} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link CommunicationError}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CommunicationError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommunicationError error = new CommunicationError(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + error.code = reader.getString(); + } else if ("message".equals(fieldName)) { + error.message = reader.getString(); + } else if ("target".equals(fieldName)) { + error.target = reader.getString(); + } else if ("details".equals(fieldName)) { + error.details = reader.readArray(CommunicationError::fromJson); + } else if ("innererror".equals(fieldName)) { + error.innererror = CommunicationError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return error; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationErrorResponse.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationErrorResponse.java new file mode 100644 index 000000000000..2dacb8c13b3d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationErrorResponse.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The Communication Services error response. */ +@Fluent +public final class CommunicationErrorResponse implements JsonSerializable { + /* + * The error property. + */ + private CommunicationError error; + + /** + * Get the error property: The error property. + * + * @return the error value. + */ + public CommunicationError getError() { + return this.error; + } + + /** + * Set the error property: The error property. + * + * @param error the error value to set. + * @return the CommunicationErrorResponse object itself. + */ + public CommunicationErrorResponse setError(CommunicationError error) { + this.error = error; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeJsonField("error", error).writeEndObject(); + } + + /** + * Reads an instance of {@link CommunicationErrorResponse} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link CommunicationErrorResponse}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CommunicationErrorResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommunicationErrorResponse response = new CommunicationErrorResponse(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + response.error = CommunicationError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return response; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationIdentifierModel.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationIdentifierModel.java new file mode 100644 index 000000000000..4087716fab41 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationIdentifierModel.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The CommunicationIdentifierModel model. */ +@Fluent +public final class CommunicationIdentifierModel implements JsonSerializable { + /* + * Full ID of the identifier. + */ + private String rawId; + + /* + * Type of CommunicationIdentifierModel. + */ + private CommunicationIdentifierModelKind kind; + + /* + * The communication user. + */ + private CommunicationUserIdentifierModel communicationUser; + + /* + * The phone number. + */ + private PhoneNumberIdentifierModel phoneNumber; + + /* + * The Microsoft Teams user. + */ + private MicrosoftTeamsUserIdentifierModel microsoftTeamsUser; + + /** + * Get the rawId property: Full ID of the identifier. + * + * @return the rawId value. + */ + public String getRawId() { + return this.rawId; + } + + /** + * Set the rawId property: Full ID of the identifier. + * + * @param rawId the rawId value to set. + * @return the CommunicationIdentifierModel object itself. + */ + public CommunicationIdentifierModel setRawId(String rawId) { + this.rawId = rawId; + return this; + } + + /** + * Get the kind property: Type of CommunicationIdentifierModel. + * + * @return the kind value. + */ + public CommunicationIdentifierModelKind getKind() { + return this.kind; + } + + /** + * Set the kind property: Type of CommunicationIdentifierModel. + * + * @param kind the kind value to set. + * @return the CommunicationIdentifierModel object itself. + */ + public CommunicationIdentifierModel setKind(CommunicationIdentifierModelKind kind) { + this.kind = kind; + return this; + } + + /** + * Get the communicationUser property: The communication user. + * + * @return the communicationUser value. + */ + public CommunicationUserIdentifierModel getCommunicationUser() { + return this.communicationUser; + } + + /** + * Set the communicationUser property: The communication user. + * + * @param communicationUser the communicationUser value to set. + * @return the CommunicationIdentifierModel object itself. + */ + public CommunicationIdentifierModel setCommunicationUser(CommunicationUserIdentifierModel communicationUser) { + this.communicationUser = communicationUser; + return this; + } + + /** + * Get the phoneNumber property: The phone number. + * + * @return the phoneNumber value. + */ + public PhoneNumberIdentifierModel getPhoneNumber() { + return this.phoneNumber; + } + + /** + * Set the phoneNumber property: The phone number. + * + * @param phoneNumber the phoneNumber value to set. + * @return the CommunicationIdentifierModel object itself. + */ + public CommunicationIdentifierModel setPhoneNumber(PhoneNumberIdentifierModel phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Get the microsoftTeamsUser property: The Microsoft Teams user. + * + * @return the microsoftTeamsUser value. + */ + public MicrosoftTeamsUserIdentifierModel getMicrosoftTeamsUser() { + return this.microsoftTeamsUser; + } + + /** + * Set the microsoftTeamsUser property: The Microsoft Teams user. + * + * @param microsoftTeamsUser the microsoftTeamsUser value to set. + * @return the CommunicationIdentifierModel object itself. + */ + public CommunicationIdentifierModel setMicrosoftTeamsUser(MicrosoftTeamsUserIdentifierModel microsoftTeamsUser) { + this.microsoftTeamsUser = microsoftTeamsUser; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("rawId", rawId) + .writeStringField("kind", Objects.toString(kind, null)) + .writeJsonField("communicationUser", communicationUser) + .writeJsonField("phoneNumber", phoneNumber) + .writeJsonField("microsoftTeamsUser", microsoftTeamsUser) + .writeEndObject(); + } + + /** + * Reads an instance of {@link CommunicationIdentifierModel} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link CommunicationIdentifierModel}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CommunicationIdentifierModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommunicationIdentifierModel model = new CommunicationIdentifierModel(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rawId".equals(fieldName)) { + model.rawId = reader.getString(); + } else if ("kind".equals(fieldName)) { + model.kind = CommunicationIdentifierModelKind.fromString(reader.getString()); + } else if ("communicationUser".equals(fieldName)) { + model.communicationUser = CommunicationUserIdentifierModel.fromJson(reader); + } else if ("phoneNumber".equals(fieldName)) { + model.phoneNumber = PhoneNumberIdentifierModel.fromJson(reader); + } else if ("microsoftTeamsUser".equals(fieldName)) { + model.microsoftTeamsUser = MicrosoftTeamsUserIdentifierModel.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return model; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationIdentifierModelKind.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationIdentifierModelKind.java new file mode 100644 index 000000000000..cbc8569b00de --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationIdentifierModelKind.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for CommunicationIdentifierModelKind. */ +public final class CommunicationIdentifierModelKind extends ExpandableStringEnum { + /** Static value unknown for CommunicationIdentifierModelKind. */ + public static final CommunicationIdentifierModelKind UNKNOWN = fromString("unknown"); + + /** Static value communicationUser for CommunicationIdentifierModelKind. */ + public static final CommunicationIdentifierModelKind COMMUNICATION_USER = fromString("communicationUser"); + + /** Static value phoneNumber for CommunicationIdentifierModelKind. */ + public static final CommunicationIdentifierModelKind PHONE_NUMBER = fromString("phoneNumber"); + + /** Static value microsoftTeamsUser for CommunicationIdentifierModelKind. */ + public static final CommunicationIdentifierModelKind MICROSOFT_TEAMS_USER = fromString("microsoftTeamsUser"); + + /** + * Creates an instance of {@link CommunicationIdentifierModelKind} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of + * {@link CommunicationIdentifierModelKind} instead. + */ + @Deprecated + public CommunicationIdentifierModelKind() { + } + + /** + * Creates or finds a CommunicationIdentifierModelKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding CommunicationIdentifierModelKind. + */ + public static CommunicationIdentifierModelKind fromString(String name) { + return fromString(name, CommunicationIdentifierModelKind.class); + } + + /** @return known CommunicationIdentifierModelKind values. */ + public static Collection values() { + return values(CommunicationIdentifierModelKind.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationUserIdentifierModel.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationUserIdentifierModel.java new file mode 100644 index 000000000000..90afc988cfd2 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CommunicationUserIdentifierModel.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The CommunicationUserIdentifierModel model. */ +@Fluent +public final class CommunicationUserIdentifierModel implements JsonSerializable { + /* + * The id property. + */ + private String id; + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The id property. + * + * @param id the id value to set. + * @return the CommunicationUserIdentifierModel object itself. + */ + public CommunicationUserIdentifierModel setId(String id) { + this.id = id; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeStringField("id", id).writeEndObject(); + } + + /** + * Reads an instance of {@link CommunicationUserIdentifierModel} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link CommunicationUserIdentifierModel}, or null if the {@link JsonReader} was pointing + * to {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CommunicationUserIdentifierModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommunicationUserIdentifierModel model = new CommunicationUserIdentifierModel(); + + while (jsonReader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + model.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return model; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CreateCallRequestInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CreateCallRequestInternal.java new file mode 100644 index 000000000000..7d9b92daf02a --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/CreateCallRequestInternal.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The CreateCallRequestInternal model. */ +@Fluent +public final class CreateCallRequestInternal implements JsonSerializable { + /* + * The targets of the call. + */ + private List targets; + + /* + * The source of the call. + */ + private CallSourceInternal source; + + /* + * The subject. + */ + private String subject; + + /* + * The callback URI. + */ + private String callbackUri; + + /* + * Media Streaming Configuration. + */ + private MediaStreamingConfigurationInternal mediaStreamingConfiguration; + + /** + * Get the targets property: The targets of the call. + * + * @return the targets value. + */ + public List getTargets() { + return this.targets; + } + + /** + * Set the targets property: The targets of the call. + * + * @param targets the targets value to set. + * @return the CreateCallRequestInternal object itself. + */ + public CreateCallRequestInternal setTargets(List targets) { + this.targets = targets; + return this; + } + + /** + * Get the source property: The source of the call. + * + * @return the source value. + */ + public CallSourceInternal getSource() { + return this.source; + } + + /** + * Set the source property: The source of the call. + * + * @param source the source value to set. + * @return the CreateCallRequestInternal object itself. + */ + public CreateCallRequestInternal setSource(CallSourceInternal source) { + this.source = source; + return this; + } + + /** + * Get the subject property: The subject. + * + * @return the subject value. + */ + public String getSubject() { + return this.subject; + } + + /** + * Set the subject property: The subject. + * + * @param subject the subject value to set. + * @return the CreateCallRequestInternal object itself. + */ + public CreateCallRequestInternal setSubject(String subject) { + this.subject = subject; + return this; + } + + /** + * Get the callbackUri property: The callback URI. + * + * @return the callbackUri value. + */ + public String getCallbackUri() { + return this.callbackUri; + } + + /** + * Set the callbackUri property: The callback URI. + * + * @param callbackUri the callbackUri value to set. + * @return the CreateCallRequestInternal object itself. + */ + public CreateCallRequestInternal setCallbackUri(String callbackUri) { + this.callbackUri = callbackUri; + return this; + } + + /** + * Get the mediaStreamingConfiguration property: Media Streaming Configuration. + * + * @return the mediaStreamingConfiguration value. + */ + public MediaStreamingConfigurationInternal getMediaStreamingConfiguration() { + return this.mediaStreamingConfiguration; + } + + /** + * Set the mediaStreamingConfiguration property: Media Streaming Configuration. + * + * @param mediaStreamingConfiguration the mediaStreamingConfiguration value to set. + * @return the CreateCallRequestInternal object itself. + */ + public CreateCallRequestInternal + setMediaStreamingConfiguration(MediaStreamingConfigurationInternal mediaStreamingConfiguration) { + this.mediaStreamingConfiguration = mediaStreamingConfiguration; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeArrayField("targets", targets, JsonWriter::writeJson) + .writeJsonField("source", source) + .writeStringField("subject", subject) + .writeStringField("callbackUri", callbackUri) + .writeJsonField("mediaStreamingConfiguration", mediaStreamingConfiguration) + .writeEndObject(); + } + + /** + * Reads an instance of {@link CreateCallRequestInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link CreateCallRequestInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CreateCallRequestInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CreateCallRequestInternal request = new CreateCallRequestInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targets".equals(fieldName)) { + request.targets = reader.readArray(CommunicationIdentifierModel::fromJson); + } else if ("source".equals(fieldName)) { + request.source = CallSourceInternal.fromJson(reader); + } else if ("subject".equals(fieldName)) { + request.subject = reader.getString(); + } else if ("callbackUri".equals(fieldName)) { + request.callbackUri = reader.getString(); + } else if ("mediaStreamingConfiguration".equals(fieldName)) { + request.mediaStreamingConfiguration = MediaStreamingConfigurationInternal.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/DtmfConfigurationsInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/DtmfConfigurationsInternal.java new file mode 100644 index 000000000000..14ce17d373f5 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/DtmfConfigurationsInternal.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; +import java.util.Objects; + +/** Options for DTMF recognition. */ +@Fluent +public final class DtmfConfigurationsInternal implements JsonSerializable { + /* + * Time to wait between DTMF inputs to stop recognizing. + */ + private Integer interToneTimeoutInSeconds; + + /* + * Maximum number of DTMFs to be collected. + */ + private Integer maxTonesToCollect; + + /* + * List of tones that will stop recognizing. + */ + private List stopTones; + + /** + * Get the interToneTimeoutInSeconds property: Time to wait between DTMF inputs to stop recognizing. + * + * @return the interToneTimeoutInSeconds value. + */ + public Integer getInterToneTimeoutInSeconds() { + return this.interToneTimeoutInSeconds; + } + + /** + * Set the interToneTimeoutInSeconds property: Time to wait between DTMF inputs to stop recognizing. + * + * @param interToneTimeoutInSeconds the interToneTimeoutInSeconds value to set. + * @return the DtmfConfigurationsInternal object itself. + */ + public DtmfConfigurationsInternal setInterToneTimeoutInSeconds(Integer interToneTimeoutInSeconds) { + this.interToneTimeoutInSeconds = interToneTimeoutInSeconds; + return this; + } + + /** + * Get the maxTonesToCollect property: Maximum number of DTMFs to be collected. + * + * @return the maxTonesToCollect value. + */ + public Integer getMaxTonesToCollect() { + return this.maxTonesToCollect; + } + + /** + * Set the maxTonesToCollect property: Maximum number of DTMFs to be collected. + * + * @param maxTonesToCollect the maxTonesToCollect value to set. + * @return the DtmfConfigurationsInternal object itself. + */ + public DtmfConfigurationsInternal setMaxTonesToCollect(Integer maxTonesToCollect) { + this.maxTonesToCollect = maxTonesToCollect; + return this; + } + + /** + * Get the stopTones property: List of tones that will stop recognizing. + * + * @return the stopTones value. + */ + public List getStopTones() { + return this.stopTones; + } + + /** + * Set the stopTones property: List of tones that will stop recognizing. + * + * @param stopTones the stopTones value to set. + * @return the DtmfConfigurationsInternal object itself. + */ + public DtmfConfigurationsInternal setStopTones(List stopTones) { + this.stopTones = stopTones; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeNumberField("interToneTimeoutInSeconds", interToneTimeoutInSeconds) + .writeNumberField("maxTonesToCollect", maxTonesToCollect) + .writeArrayField("stopTones", stopTones, (writer, tone) -> writer.writeString(Objects.toString(tone, null))) + .writeEndObject(); + } + + /** + * Reads an instance of {@link DtmfConfigurationsInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link DtmfConfigurationsInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static DtmfConfigurationsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DtmfConfigurationsInternal configurations = new DtmfConfigurationsInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("interToneTimeoutInSeconds".equals(fieldName)) { + configurations.interToneTimeoutInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("maxTonesToCollect".equals(fieldName)) { + configurations.maxTonesToCollect = reader.getNullable(JsonReader::getInt); + } else if ("stopTones".equals(fieldName)) { + configurations.stopTones = reader.readArray(elem -> StopTonesInternal.fromString(elem.getString())); + } else { + reader.skipChildren(); + } + } + + return configurations; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/FileSourceInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/FileSourceInternal.java new file mode 100644 index 000000000000..9c1820fef0a3 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/FileSourceInternal.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The FileSourceInternal model. */ +@Fluent +public final class FileSourceInternal implements JsonSerializable { + /* + * Uri for the audio file to be played + */ + private String uri; + + /** + * Get the uri property: Uri for the audio file to be played. + * + * @return the uri value. + */ + public String getUri() { + return this.uri; + } + + /** + * Set the uri property: Uri for the audio file to be played. + * + * @param uri the uri value to set. + * @return the FileSourceInternal object itself. + */ + public FileSourceInternal setUri(String uri) { + this.uri = uri; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeStringField("uri", uri).writeEndObject(); + } + + /** + * Reads an instance of {@link FileSourceInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link FileSourceInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static FileSourceInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FileSourceInternal fileSource = new FileSourceInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uri".equals(fieldName)) { + fileSource.uri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return fileSource; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/GetParticipantsResponseInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/GetParticipantsResponseInternal.java new file mode 100644 index 000000000000..85362e589dad --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/GetParticipantsResponseInternal.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The GetParticipantsResponseInternal model. */ +@Fluent +public final class GetParticipantsResponseInternal implements JsonSerializable { + /* + * The values property. + */ + private List values; + + /* + * The nextLink property. + */ + private String nextLink; + + /** + * Get the values property: The values property. + * + * @return the values value. + */ + public List getValues() { + return this.values; + } + + /** + * Set the values property: The values property. + * + * @param values the values value to set. + * @return the GetParticipantsResponseInternal object itself. + */ + public GetParticipantsResponseInternal setValues(List values) { + this.values = values; + return this; + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The nextLink property. + * + * @param nextLink the nextLink value to set. + * @return the GetParticipantsResponseInternal object itself. + */ + public GetParticipantsResponseInternal setNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeArrayField("values", values, JsonWriter::writeJson) + .writeStringField("nextLink", nextLink) + .writeEndObject(); + } + + /** + * Reads an instance of {@link GetParticipantsResponseInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link GetParticipantsResponseInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static GetParticipantsResponseInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GetParticipantsResponseInternal response = new GetParticipantsResponseInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("values".equals(fieldName)) { + response.values = reader.readArray(AcsCallParticipantInternal::fromJson); + } else if ("nextLink".equals(fieldName)) { + response.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return response; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingAudioChannelTypeInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingAudioChannelTypeInternal.java new file mode 100644 index 000000000000..f822a62ca027 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingAudioChannelTypeInternal.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for MediaStreamingAudioChannelTypeInternal. */ +public final class MediaStreamingAudioChannelTypeInternal + extends ExpandableStringEnum { + /** Static value mixed for MediaStreamingAudioChannelTypeInternal. */ + public static final MediaStreamingAudioChannelTypeInternal MIXED = fromString("mixed"); + + /** Static value unmixed for MediaStreamingAudioChannelTypeInternal. */ + public static final MediaStreamingAudioChannelTypeInternal UNMIXED = fromString("unmixed"); + + /** + * Creates an instance of {@link MediaStreamingAudioChannelTypeInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of + * {@link MediaStreamingAudioChannelTypeInternal} instead. + */ + @Deprecated + public MediaStreamingAudioChannelTypeInternal() { + } + + /** + * Creates or finds a MediaStreamingAudioChannelTypeInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding MediaStreamingAudioChannelTypeInternal. + */ + public static MediaStreamingAudioChannelTypeInternal fromString(String name) { + return fromString(name, MediaStreamingAudioChannelTypeInternal.class); + } + + /** @return known MediaStreamingAudioChannelTypeInternal values. */ + public static Collection values() { + return values(MediaStreamingAudioChannelTypeInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingConfigurationInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingConfigurationInternal.java new file mode 100644 index 000000000000..594c3a107353 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingConfigurationInternal.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The MediaStreamingConfigurationInternal model. */ +@Fluent +public final class MediaStreamingConfigurationInternal + implements JsonSerializable { + /* + * Transport URL for media streaming + */ + private String transportUrl; + + /* + * The type of tranport to be used for media streaming, eg. Websocket + */ + private MediaStreamingTransportTypeInternal transportType; + + /* + * Content type to stream, eg. audio, audio/video + */ + private MediaStreamingContentTypeInternal contentType; + + /* + * Audio channel type to stream, eg. unmixed audio, mixed audio + */ + private MediaStreamingAudioChannelTypeInternal audioChannelType; + + /** + * Get the transportUrl property: Transport URL for media streaming. + * + * @return the transportUrl value. + */ + public String getTransportUrl() { + return this.transportUrl; + } + + /** + * Set the transportUrl property: Transport URL for media streaming. + * + * @param transportUrl the transportUrl value to set. + * @return the MediaStreamingConfigurationInternal object itself. + */ + public MediaStreamingConfigurationInternal setTransportUrl(String transportUrl) { + this.transportUrl = transportUrl; + return this; + } + + /** + * Get the transportType property: The type of tranport to be used for media streaming, eg. Websocket. + * + * @return the transportType value. + */ + public MediaStreamingTransportTypeInternal getTransportType() { + return this.transportType; + } + + /** + * Set the transportType property: The type of tranport to be used for media streaming, eg. Websocket. + * + * @param transportType the transportType value to set. + * @return the MediaStreamingConfigurationInternal object itself. + */ + public MediaStreamingConfigurationInternal setTransportType(MediaStreamingTransportTypeInternal transportType) { + this.transportType = transportType; + return this; + } + + /** + * Get the contentType property: Content type to stream, eg. audio, audio/video. + * + * @return the contentType value. + */ + public MediaStreamingContentTypeInternal getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: Content type to stream, eg. audio, audio/video. + * + * @param contentType the contentType value to set. + * @return the MediaStreamingConfigurationInternal object itself. + */ + public MediaStreamingConfigurationInternal setContentType(MediaStreamingContentTypeInternal contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the audioChannelType property: Audio channel type to stream, eg. unmixed audio, mixed audio. + * + * @return the audioChannelType value. + */ + public MediaStreamingAudioChannelTypeInternal getAudioChannelType() { + return this.audioChannelType; + } + + /** + * Set the audioChannelType property: Audio channel type to stream, eg. unmixed audio, mixed audio. + * + * @param audioChannelType the audioChannelType value to set. + * @return the MediaStreamingConfigurationInternal object itself. + */ + public MediaStreamingConfigurationInternal + setAudioChannelType(MediaStreamingAudioChannelTypeInternal audioChannelType) { + this.audioChannelType = audioChannelType; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("transportUrl", transportUrl) + .writeStringField("transportType", Objects.toString(transportType, null)) + .writeStringField("contentType", Objects.toString(contentType, null)) + .writeStringField("audioChannelType", Objects.toString(audioChannelType, null)) + .writeEndObject(); + } + + /** + * Reads an instance of {@link MediaStreamingConfigurationInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link MediaStreamingConfigurationInternal}, or null if the {@link JsonReader} was + * pointing to {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static MediaStreamingConfigurationInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MediaStreamingConfigurationInternal configuration = new MediaStreamingConfigurationInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("transportUrl".equals(fieldName)) { + configuration.transportUrl = reader.getString(); + } else if ("transportType".equals(fieldName)) { + configuration.transportType = MediaStreamingTransportTypeInternal.fromString(reader.getString()); + } else if ("contentType".equals(fieldName)) { + configuration.contentType = MediaStreamingContentTypeInternal.fromString(reader.getString()); + } else if ("audioChannelType".equals(fieldName)) { + configuration.audioChannelType + = MediaStreamingAudioChannelTypeInternal.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return configuration; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingContentTypeInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingContentTypeInternal.java new file mode 100644 index 000000000000..521b8dcb61d3 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingContentTypeInternal.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for MediaStreamingContentTypeInternal. */ +public final class MediaStreamingContentTypeInternal extends ExpandableStringEnum { + /** Static value audio for MediaStreamingContentTypeInternal. */ + public static final MediaStreamingContentTypeInternal AUDIO = fromString("audio"); + + /** + * Creates an instance of {@link MediaStreamingContentTypeInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of + * {@link MediaStreamingContentTypeInternal} instead. + */ + @Deprecated + public MediaStreamingContentTypeInternal() { + } + + /** + * Creates or finds a MediaStreamingContentTypeInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding MediaStreamingContentTypeInternal. + */ + public static MediaStreamingContentTypeInternal fromString(String name) { + return fromString(name, MediaStreamingContentTypeInternal.class); + } + + /** @return known MediaStreamingContentTypeInternal values. */ + public static Collection values() { + return values(MediaStreamingContentTypeInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingTransportTypeInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingTransportTypeInternal.java new file mode 100644 index 000000000000..e1caeabb7ef4 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MediaStreamingTransportTypeInternal.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for MediaStreamingTransportTypeInternal. */ +public final class MediaStreamingTransportTypeInternal + extends ExpandableStringEnum { + /** Static value websocket for MediaStreamingTransportTypeInternal. */ + public static final MediaStreamingTransportTypeInternal WEBSOCKET = fromString("websocket"); + + /** + * Creates an instance of {@link MediaStreamingTransportTypeInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of + * {@link MediaStreamingTransportTypeInternal} instead. + */ + @Deprecated + public MediaStreamingTransportTypeInternal() { + } + + /** + * Creates or finds a MediaStreamingTransportTypeInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding MediaStreamingTransportTypeInternal. + */ + public static MediaStreamingTransportTypeInternal fromString(String name) { + return fromString(name, MediaStreamingTransportTypeInternal.class); + } + + /** @return known MediaStreamingTransportTypeInternal values. */ + public static Collection values() { + return values(MediaStreamingTransportTypeInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MicrosoftTeamsUserIdentifierModel.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MicrosoftTeamsUserIdentifierModel.java new file mode 100644 index 000000000000..01709221b525 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/MicrosoftTeamsUserIdentifierModel.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The MicrosoftTeamsUserIdentifierModel model. */ +@Fluent +public final class MicrosoftTeamsUserIdentifierModel implements JsonSerializable { + /* + * The userId property. + */ + private String userId; + + /* + * The isAnonymous property. + */ + private Boolean isAnonymous; + + /* + * The cloud property. + */ + private CommunicationCloudEnvironmentModel cloud; + + /** + * Get the userId property: The userId property. + * + * @return the userId value. + */ + public String getUserId() { + return this.userId; + } + + /** + * Set the userId property: The userId property. + * + * @param userId the userId value to set. + * @return the MicrosoftTeamsUserIdentifierModel object itself. + */ + public MicrosoftTeamsUserIdentifierModel setUserId(String userId) { + this.userId = userId; + return this; + } + + /** + * Get the isAnonymous property: The isAnonymous property. + * + * @return the isAnonymous value. + */ + public Boolean isAnonymous() { + return this.isAnonymous; + } + + /** + * Set the isAnonymous property: The isAnonymous property. + * + * @param isAnonymous the isAnonymous value to set. + * @return the MicrosoftTeamsUserIdentifierModel object itself. + */ + public MicrosoftTeamsUserIdentifierModel setIsAnonymous(Boolean isAnonymous) { + this.isAnonymous = isAnonymous; + return this; + } + + /** + * Get the cloud property: The cloud property. + * + * @return the cloud value. + */ + public CommunicationCloudEnvironmentModel getCloud() { + return this.cloud; + } + + /** + * Set the cloud property: The cloud property. + * + * @param cloud the cloud value to set. + * @return the MicrosoftTeamsUserIdentifierModel object itself. + */ + public MicrosoftTeamsUserIdentifierModel setCloud(CommunicationCloudEnvironmentModel cloud) { + this.cloud = cloud; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("userId", userId) + .writeBooleanField("isAnonymous", isAnonymous) + .writeStringField("cloud", Objects.toString(cloud, null)) + .writeEndObject(); + } + + /** + * Reads an instance of {@link MicrosoftTeamsUserIdentifierModel} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link MicrosoftTeamsUserIdentifierModel}, or null if the {@link JsonReader} was pointing + * to {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static MicrosoftTeamsUserIdentifierModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftTeamsUserIdentifierModel model = new MicrosoftTeamsUserIdentifierModel(); + + while (jsonReader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userId".equals(fieldName)) { + model.userId = reader.getString(); + } else if ("isAnonymous".equals(fieldName)) { + model.isAnonymous = reader.getNullable(JsonReader::getBoolean); + } else if ("cloud".equals(fieldName)) { + model.cloud = CommunicationCloudEnvironmentModel.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return model; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PhoneNumberIdentifierModel.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PhoneNumberIdentifierModel.java new file mode 100644 index 000000000000..60ea2c51abf1 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PhoneNumberIdentifierModel.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The PhoneNumberIdentifierModel model. */ +@Fluent +public final class PhoneNumberIdentifierModel implements JsonSerializable { + /* + * The value property. + */ + private String value; + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public String getValue() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the PhoneNumberIdentifierModel object itself. + */ + public PhoneNumberIdentifierModel setValue(String value) { + this.value = value; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeStringField("value", value).writeEndObject(); + } + + /** + * Reads an instance of {@link PhoneNumberIdentifierModel} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link PhoneNumberIdentifierModel}, or null if the {@link JsonReader} was pointing + * to {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static PhoneNumberIdentifierModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PhoneNumberIdentifierModel model = new PhoneNumberIdentifierModel(); + + while (jsonReader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + model.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return model; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlayOptionsInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlayOptionsInternal.java new file mode 100644 index 000000000000..36e780f8a88c --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlayOptionsInternal.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The PlayOptionsInternal model. */ +@Fluent +public final class PlayOptionsInternal implements JsonSerializable { + /* + * The option to play the provided audio source in loop when set to true + */ + private boolean loop; + + /** + * Get the loop property: The option to play the provided audio source in loop when set to true. + * + * @return the loop value. + */ + public boolean isLoop() { + return this.loop; + } + + /** + * Set the loop property: The option to play the provided audio source in loop when set to true. + * + * @param loop the loop value to set. + * @return the PlayOptionsInternal object itself. + */ + public PlayOptionsInternal setLoop(boolean loop) { + this.loop = loop; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeBooleanField("loop", loop).writeEndObject(); + } + + /** + * Reads an instance of {@link PlayOptionsInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link PlayOptionsInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static PlayOptionsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlayOptionsInternal options = new PlayOptionsInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loop".equals(fieldName)) { + options.loop = reader.getBoolean(); + } else { + reader.skipChildren(); + } + } + + return options; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlayRequest.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlayRequest.java new file mode 100644 index 000000000000..4a89becaca16 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlayRequest.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The PlayRequest model. */ +@Fluent +public final class PlayRequest implements JsonSerializable { + /* + * The source of the audio to be played. + */ + private PlaySourceInternal playSourceInfo; + + /* + * The list of call participants play provided audio to. Plays to everyone in the call when not provided. + */ + private List playTo; + + /* + * Defines options for playing the audio. + */ + private PlayOptionsInternal playOptions; + + /* + * The value to identify context of the operation. + */ + private String operationContext; + + /** + * Get the playSourceInfo property: The source of the audio to be played. + * + * @return the playSourceInfo value. + */ + public PlaySourceInternal getPlaySourceInfo() { + return this.playSourceInfo; + } + + /** + * Set the playSourceInfo property: The source of the audio to be played. + * + * @param playSourceInfo the playSourceInfo value to set. + * @return the PlayRequest object itself. + */ + public PlayRequest setPlaySourceInfo(PlaySourceInternal playSourceInfo) { + this.playSourceInfo = playSourceInfo; + return this; + } + + /** + * Get the playTo property: The list of call participants play provided audio to. Plays to everyone in the call when + * not provided. + * + * @return the playTo value. + */ + public List getPlayTo() { + return this.playTo; + } + + /** + * Set the playTo property: The list of call participants play provided audio to. Plays to everyone in the call when + * not provided. + * + * @param playTo the playTo value to set. + * @return the PlayRequest object itself. + */ + public PlayRequest setPlayTo(List playTo) { + this.playTo = playTo; + return this; + } + + /** + * Get the playOptions property: Defines options for playing the audio. + * + * @return the playOptions value. + */ + public PlayOptionsInternal getPlayOptions() { + return this.playOptions; + } + + /** + * Set the playOptions property: Defines options for playing the audio. + * + * @param playOptions the playOptions value to set. + * @return the PlayRequest object itself. + */ + public PlayRequest setPlayOptions(PlayOptionsInternal playOptions) { + this.playOptions = playOptions; + return this; + } + + /** + * Get the operationContext property: The value to identify context of the operation. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The value to identify context of the operation. + * + * @param operationContext the operationContext value to set. + * @return the PlayRequest object itself. + */ + public PlayRequest setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeJsonField("playSourceInfo", playSourceInfo) + .writeArrayField("playTo", playTo, JsonWriter::writeJson) + .writeJsonField("playOptions", playOptions) + .writeStringField("operationContext", operationContext) + .writeEndObject(); + } + + /** + * Reads an instance of {@link PlayRequest} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link PlayRequest}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static PlayRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlayRequest request = new PlayRequest(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("playSourceInfo".equals(fieldName)) { + request.playSourceInfo = PlaySourceInternal.fromJson(reader); + } else if ("playTo".equals(fieldName)) { + request.playTo = reader.readArray(CommunicationIdentifierModel::fromJson); + } else if ("playOptions".equals(fieldName)) { + request.playOptions = PlayOptionsInternal.fromJson(reader); + } else if ("operationContext".equals(fieldName)) { + request.operationContext = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlaySourceInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlaySourceInternal.java new file mode 100644 index 000000000000..852b8a213cb7 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlaySourceInternal.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The PlaySourceInternal model. */ +@Fluent +public final class PlaySourceInternal implements JsonSerializable { + /* + * Defines the type of the play source + */ + private PlaySourceTypeInternal sourceType; + + /* + * Defines the identifier to be used for caching related media + */ + private String playSourceId; + + /* + * Defines the file source info to be used for play + */ + private FileSourceInternal fileSource; + + /** + * Get the sourceType property: Defines the type of the play source. + * + * @return the sourceType value. + */ + public PlaySourceTypeInternal getSourceType() { + return this.sourceType; + } + + /** + * Set the sourceType property: Defines the type of the play source. + * + * @param sourceType the sourceType value to set. + * @return the PlaySourceInternal object itself. + */ + public PlaySourceInternal setSourceType(PlaySourceTypeInternal sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the playSourceId property: Defines the identifier to be used for caching related media. + * + * @return the playSourceId value. + */ + public String getPlaySourceId() { + return this.playSourceId; + } + + /** + * Set the playSourceId property: Defines the identifier to be used for caching related media. + * + * @param playSourceId the playSourceId value to set. + * @return the PlaySourceInternal object itself. + */ + public PlaySourceInternal setPlaySourceId(String playSourceId) { + this.playSourceId = playSourceId; + return this; + } + + /** + * Get the fileSource property: Defines the file source info to be used for play. + * + * @return the fileSource value. + */ + public FileSourceInternal getFileSource() { + return this.fileSource; + } + + /** + * Set the fileSource property: Defines the file source info to be used for play. + * + * @param fileSource the fileSource value to set. + * @return the PlaySourceInternal object itself. + */ + public PlaySourceInternal setFileSource(FileSourceInternal fileSource) { + this.fileSource = fileSource; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("sourceType", Objects.toString(sourceType, null)) + .writeStringField("playSourceId", playSourceId) + .writeJsonField("fileSource", fileSource) + .writeEndObject(); + } + + /** + * Reads an instance of {@link PlaySourceInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link PlaySourceInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static PlaySourceInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlaySourceInternal playSource = new PlaySourceInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceType".equals(fieldName)) { + playSource.sourceType = PlaySourceTypeInternal.fromString(reader.getString()); + } else if ("playSourceId".equals(fieldName)) { + playSource.playSourceId = reader.getString(); + } else if ("fileSource".equals(fieldName)) { + playSource.fileSource = FileSourceInternal.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return playSource; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlaySourceTypeInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlaySourceTypeInternal.java new file mode 100644 index 000000000000..b98d88bf1ae0 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/PlaySourceTypeInternal.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for PlaySourceTypeInternal. */ +public final class PlaySourceTypeInternal extends ExpandableStringEnum { + /** Static value file for PlaySourceTypeInternal. */ + public static final PlaySourceTypeInternal FILE = fromString("file"); + + /** + * Creates an instance of {@link PlaySourceTypeInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link PlaySourceTypeInternal} + * instead. + */ + @Deprecated + public PlaySourceTypeInternal() { + } + + /** + * Creates or finds a PlaySourceTypeInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding PlaySourceTypeInternal. + */ + public static PlaySourceTypeInternal fromString(String name) { + return fromString(name, PlaySourceTypeInternal.class); + } + + /** @return known PlaySourceTypeInternal values. */ + public static Collection values() { + return values(PlaySourceTypeInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognitionType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognitionType.java new file mode 100644 index 000000000000..e7a38f7e4c82 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognitionType.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for RecognitionType. */ +public final class RecognitionType extends ExpandableStringEnum { + /** Static value dtmf for RecognitionType. */ + public static final RecognitionType DTMF = fromString("dtmf"); + + /** + * Creates an instance of {@link RecognitionType} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link RecognitionType} instead. + */ + @Deprecated + public RecognitionType() { + } + + /** + * Creates or finds a RecognitionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecognitionType. + */ + public static RecognitionType fromString(String name) { + return fromString(name, RecognitionType.class); + } + + /** @return known RecognitionType values. */ + public static Collection values() { + return values(RecognitionType.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeCompleted.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeCompleted.java new file mode 100644 index 000000000000..6aa2e1780366 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeCompleted.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The RecognizeCompleted model. */ +@Fluent +public final class RecognizeCompleted implements JsonSerializable { + /* + * Operation context + */ + private String operationContext; + + /* + * Determines the sub-type pf the recognize operation + */ + private RecognitionType recognitionType; + + /* + * Defines the result for RecognitionType = Dtmf + */ + private CollectTonesResult collectTonesResult; + + /* + * Defines the code, sub-code and message for the operation + */ + private ResultInformation resultInfo; + + /* + * The type property. + */ + private AcsEventTypeInternal type; + + /* + * Call connection ID. + */ + private String callConnectionId; + + /* + * Server call ID. + */ + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for skype chain ID. + */ + private String correlationId; + + /** + * Get the operationContext property: Operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: Operation context. + * + * @param operationContext the operationContext value to set. + * @return the RecognizeCompleted object itself. + */ + public RecognizeCompleted setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + /** + * Get the recognitionType property: Determines the sub-type pf the recognize operation. + * + * @return the recognitionType value. + */ + public RecognitionType getRecognitionType() { + return this.recognitionType; + } + + /** + * Set the recognitionType property: Determines the sub-type pf the recognize operation. + * + * @param recognitionType the recognitionType value to set. + * @return the RecognizeCompleted object itself. + */ + public RecognizeCompleted setRecognitionType(RecognitionType recognitionType) { + this.recognitionType = recognitionType; + return this; + } + + /** + * Get the collectTonesResult property: Defines the result for RecognitionType = Dtmf. + * + * @return the collectTonesResult value. + */ + public CollectTonesResult getCollectTonesResult() { + return this.collectTonesResult; + } + + /** + * Set the collectTonesResult property: Defines the result for RecognitionType = Dtmf. + * + * @param collectTonesResult the collectTonesResult value to set. + * @return the RecognizeCompleted object itself. + */ + public RecognizeCompleted setCollectTonesResult(CollectTonesResult collectTonesResult) { + this.collectTonesResult = collectTonesResult; + return this; + } + + /** + * Get the resultInfo property: Defines the code, sub-code and message for the operation. + * + * @return the resultInfo value. + */ + public ResultInformation getResultInfo() { + return this.resultInfo; + } + + /** + * Set the resultInfo property: Defines the code, sub-code and message for the operation. + * + * @param resultInfo the resultInfo value to set. + * @return the RecognizeCompleted object itself. + */ + public RecognizeCompleted setResultInfo(ResultInformation resultInfo) { + this.resultInfo = resultInfo; + return this; + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + public AcsEventTypeInternal getType() { + return this.type; + } + + /** + * Set the type property: The type property. + * + * @param type the type value to set. + * @return the RecognizeCompleted object itself. + */ + public RecognizeCompleted setType(AcsEventTypeInternal type) { + this.type = type; + return this; + } + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Set the callConnectionId property: Call connection ID. + * + * @param callConnectionId the callConnectionId value to set. + * @return the RecognizeCompleted object itself. + */ + public RecognizeCompleted setCallConnectionId(String callConnectionId) { + this.callConnectionId = callConnectionId; + return this; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the RecognizeCompleted object itself. + */ + public RecognizeCompleted setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the RecognizeCompleted object itself. + */ + public RecognizeCompleted setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("operationContext", operationContext) + .writeStringField("recognitionType", Objects.toString(recognitionType, null)) + .writeJsonField("collectTonesResult", collectTonesResult) + .writeJsonField("resultInfo", resultInfo) + .writeStringField("type", Objects.toString(type, null)) + .writeStringField("callConnectionId", callConnectionId) + .writeStringField("serverCallId", serverCallId) + .writeStringField("correlationId", correlationId) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RecognizeCompleted} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RecognizeCompleted}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RecognizeCompleted fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecognizeCompleted recognizeCompleted = new RecognizeCompleted(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationContext".equals(fieldName)) { + recognizeCompleted.operationContext = reader.getString(); + } else if ("recognitionType".equals(fieldName)) { + recognizeCompleted.recognitionType = RecognitionType.fromString(reader.getString()); + } else if ("collectTonesResult".equals(fieldName)) { + recognizeCompleted.collectTonesResult = CollectTonesResult.fromJson(reader); + } else if ("resultInfo".equals(fieldName)) { + recognizeCompleted.resultInfo = ResultInformation.fromJson(reader); + } else if ("type".equals(fieldName)) { + recognizeCompleted.type = AcsEventTypeInternal.fromString(reader.getString()); + } else if ("callConnectionId".equals(fieldName)) { + recognizeCompleted.callConnectionId = reader.getString(); + } else if ("serverCallId".equals(fieldName)) { + recognizeCompleted.serverCallId = reader.getString(); + } else if ("correlationId".equals(fieldName)) { + recognizeCompleted.correlationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return recognizeCompleted; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeConfigurationsInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeConfigurationsInternal.java new file mode 100644 index 000000000000..67e2c9bba119 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeConfigurationsInternal.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The RecognizeConfigurationsInternal model. */ +@Fluent +public final class RecognizeConfigurationsInternal implements JsonSerializable { + /* + * Determines if we interrupt the prompt and start recognizing. + */ + private Boolean interruptPromptAndStartRecognition; + + /* + * Time to wait for first input after prompt (if any). + */ + private Integer initialSilenceTimeoutInSeconds; + + /* + * Target participant of DTFM tone recognition. + */ + private CommunicationIdentifierModel targetParticipant; + + /* + * Defines configurations for DTMF. + */ + private DtmfConfigurationsInternal dtmfConfigurations; + + /** + * Get the interruptPromptAndStartRecognition property: Determines if we interrupt the prompt and start recognizing. + * + * @return the interruptPromptAndStartRecognition value. + */ + public Boolean isInterruptPromptAndStartRecognition() { + return this.interruptPromptAndStartRecognition; + } + + /** + * Set the interruptPromptAndStartRecognition property: Determines if we interrupt the prompt and start recognizing. + * + * @param interruptPromptAndStartRecognition the interruptPromptAndStartRecognition value to set. + * @return the RecognizeConfigurationsInternal object itself. + */ + public RecognizeConfigurationsInternal + setInterruptPromptAndStartRecognition(Boolean interruptPromptAndStartRecognition) { + this.interruptPromptAndStartRecognition = interruptPromptAndStartRecognition; + return this; + } + + /** + * Get the initialSilenceTimeoutInSeconds property: Time to wait for first input after prompt (if any). + * + * @return the initialSilenceTimeoutInSeconds value. + */ + public Integer getInitialSilenceTimeoutInSeconds() { + return this.initialSilenceTimeoutInSeconds; + } + + /** + * Set the initialSilenceTimeoutInSeconds property: Time to wait for first input after prompt (if any). + * + * @param initialSilenceTimeoutInSeconds the initialSilenceTimeoutInSeconds value to set. + * @return the RecognizeConfigurationsInternal object itself. + */ + public RecognizeConfigurationsInternal setInitialSilenceTimeoutInSeconds(Integer initialSilenceTimeoutInSeconds) { + this.initialSilenceTimeoutInSeconds = initialSilenceTimeoutInSeconds; + return this; + } + + /** + * Get the targetParticipant property: Target participant of DTFM tone recognition. + * + * @return the targetParticipant value. + */ + public CommunicationIdentifierModel getTargetParticipant() { + return this.targetParticipant; + } + + /** + * Set the targetParticipant property: Target participant of DTFM tone recognition. + * + * @param targetParticipant the targetParticipant value to set. + * @return the RecognizeConfigurationsInternal object itself. + */ + public RecognizeConfigurationsInternal setTargetParticipant(CommunicationIdentifierModel targetParticipant) { + this.targetParticipant = targetParticipant; + return this; + } + + /** + * Get the dtmfConfigurations property: Defines configurations for DTMF. + * + * @return the dtmfConfigurations value. + */ + public DtmfConfigurationsInternal getDtmfConfigurations() { + return this.dtmfConfigurations; + } + + /** + * Set the dtmfConfigurations property: Defines configurations for DTMF. + * + * @param dtmfConfigurations the dtmfConfigurations value to set. + * @return the RecognizeConfigurationsInternal object itself. + */ + public RecognizeConfigurationsInternal setDtmfConfigurations(DtmfConfigurationsInternal dtmfConfigurations) { + this.dtmfConfigurations = dtmfConfigurations; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeBooleanField("interruptPromptAndStartRecognition", interruptPromptAndStartRecognition) + .writeNumberField("initialSilenceTimeoutInSeconds", initialSilenceTimeoutInSeconds) + .writeJsonField("targetParticipant", targetParticipant) + .writeJsonField("dtmfConfigurations", dtmfConfigurations) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RecognizeConfigurationsInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RecognizeConfigurationsInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RecognizeConfigurationsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecognizeConfigurationsInternal configurations = new RecognizeConfigurationsInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("interruptPromptAndStartRecognition".equals(fieldName)) { + configurations.interruptPromptAndStartRecognition = reader.getNullable(JsonReader::getBoolean); + } else if ("initialSilenceTimeoutInSeconds".equals(fieldName)) { + configurations.initialSilenceTimeoutInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("targetParticipant".equals(fieldName)) { + configurations.targetParticipant = CommunicationIdentifierModel.fromJson(reader); + } else if ("dtmfConfigurations".equals(fieldName)) { + configurations.dtmfConfigurations = DtmfConfigurationsInternal.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return configurations; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeFailed.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeFailed.java new file mode 100644 index 000000000000..60d2668a41e1 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeFailed.java @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The RecognizeFailed model. */ +@Fluent +public final class RecognizeFailed implements JsonSerializable { + /* + * Operation context + */ + private String operationContext; + + /* + * Defines the code, sub-code and message for the operation + */ + private ResultInformation resultInfo; + + /* + * The type property. + */ + private AcsEventTypeInternal type; + + /* + * Call connection ID. + */ + private String callConnectionId; + + /* + * Server call ID. + */ + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for skype chain ID. + */ + private String correlationId; + + /** + * Get the operationContext property: Operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: Operation context. + * + * @param operationContext the operationContext value to set. + * @return the RecognizeFailed object itself. + */ + public RecognizeFailed setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + /** + * Get the resultInfo property: Defines the code, sub-code and message for the operation. + * + * @return the resultInfo value. + */ + public ResultInformation getResultInfo() { + return this.resultInfo; + } + + /** + * Set the resultInfo property: Defines the code, sub-code and message for the operation. + * + * @param resultInfo the resultInfo value to set. + * @return the RecognizeFailed object itself. + */ + public RecognizeFailed setResultInfo(ResultInformation resultInfo) { + this.resultInfo = resultInfo; + return this; + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + public AcsEventTypeInternal getType() { + return this.type; + } + + /** + * Set the type property: The type property. + * + * @param type the type value to set. + * @return the RecognizeFailed object itself. + */ + public RecognizeFailed setType(AcsEventTypeInternal type) { + this.type = type; + return this; + } + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Set the callConnectionId property: Call connection ID. + * + * @param callConnectionId the callConnectionId value to set. + * @return the RecognizeFailed object itself. + */ + public RecognizeFailed setCallConnectionId(String callConnectionId) { + this.callConnectionId = callConnectionId; + return this; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the RecognizeFailed object itself. + */ + public RecognizeFailed setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the RecognizeFailed object itself. + */ + public RecognizeFailed setCorrelationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("operationContext", operationContext) + .writeJsonField("resultInfo", resultInfo) + .writeStringField("type", Objects.toString(type, null)) + .writeStringField("callConnectionId", callConnectionId) + .writeStringField("serverCallId", serverCallId) + .writeStringField("correlationId", correlationId) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RecognizeFailed} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RecognizeFailed}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RecognizeFailed fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecognizeFailed recognizeFailed = new RecognizeFailed(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationContext".equals(fieldName)) { + recognizeFailed.operationContext = reader.getString(); + } else if ("resultInfo".equals(fieldName)) { + recognizeFailed.resultInfo = ResultInformation.fromJson(reader); + } else if ("type".equals(fieldName)) { + recognizeFailed.type = AcsEventTypeInternal.fromString(reader.getString()); + } else if ("callConnectionId".equals(fieldName)) { + recognizeFailed.callConnectionId = reader.getString(); + } else if ("serverCallId".equals(fieldName)) { + recognizeFailed.serverCallId = reader.getString(); + } else if ("correlationId".equals(fieldName)) { + recognizeFailed.correlationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return recognizeFailed; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeInputTypeInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeInputTypeInternal.java new file mode 100644 index 000000000000..fd2d53f3aaa1 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeInputTypeInternal.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for RecognizeInputTypeInternal. */ +public final class RecognizeInputTypeInternal extends ExpandableStringEnum { + /** Static value dtmf for RecognizeInputTypeInternal. */ + public static final RecognizeInputTypeInternal DTMF = fromString("dtmf"); + + /** + * Creates an instance of {@link RecognizeInputTypeInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link RecognizeInputTypeInternal} + * instead. + */ + @Deprecated + public RecognizeInputTypeInternal() { + } + + /** + * Creates or finds a RecognizeInputTypeInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecognizeInputTypeInternal. + */ + public static RecognizeInputTypeInternal fromString(String name) { + return fromString(name, RecognizeInputTypeInternal.class); + } + + /** @return known RecognizeInputTypeInternal values. */ + public static Collection values() { + return values(RecognizeInputTypeInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeRequest.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeRequest.java new file mode 100644 index 000000000000..c0505035620d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecognizeRequest.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The RecognizeRequest model. */ +@Fluent +public final class RecognizeRequest implements JsonSerializable { + /* + * Determines the type of the recognition. + */ + private RecognizeInputTypeInternal recognizeInputType; + + /* + * The source of the audio to be played for recognition. + */ + private PlaySourceInternal playPrompt; + + /* + * If set recognize can barge into other existing queued-up/currently-processing requests. + */ + private Boolean stopCurrentOperations; + + /* + * Defines options for recognition. + */ + private RecognizeConfigurationsInternal recognizeConfiguration; + + /* + * The value to identify context of the operation. + */ + private String operationContext; + + /** + * Get the recognizeInputType property: Determines the type of the recognition. + * + * @return the recognizeInputType value. + */ + public RecognizeInputTypeInternal getRecognizeInputType() { + return this.recognizeInputType; + } + + /** + * Set the recognizeInputType property: Determines the type of the recognition. + * + * @param recognizeInputType the recognizeInputType value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeRequest setRecognizeInputType(RecognizeInputTypeInternal recognizeInputType) { + this.recognizeInputType = recognizeInputType; + return this; + } + + /** + * Get the playPrompt property: The source of the audio to be played for recognition. + * + * @return the playPrompt value. + */ + public PlaySourceInternal getPlayPrompt() { + return this.playPrompt; + } + + /** + * Set the playPrompt property: The source of the audio to be played for recognition. + * + * @param playPrompt the playPrompt value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeRequest setPlayPrompt(PlaySourceInternal playPrompt) { + this.playPrompt = playPrompt; + return this; + } + + /** + * Get the stopCurrentOperations property: If set recognize can barge into other existing + * queued-up/currently-processing requests. + * + * @return the stopCurrentOperations value. + */ + public Boolean isStopCurrentOperations() { + return this.stopCurrentOperations; + } + + /** + * Set the stopCurrentOperations property: If set recognize can barge into other existing + * queued-up/currently-processing requests. + * + * @param stopCurrentOperations the stopCurrentOperations value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeRequest setStopCurrentOperations(Boolean stopCurrentOperations) { + this.stopCurrentOperations = stopCurrentOperations; + return this; + } + + /** + * Get the recognizeConfiguration property: Defines options for recognition. + * + * @return the recognizeConfiguration value. + */ + public RecognizeConfigurationsInternal getRecognizeConfiguration() { + return this.recognizeConfiguration; + } + + /** + * Set the recognizeConfiguration property: Defines options for recognition. + * + * @param recognizeConfiguration the recognizeConfiguration value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeRequest setRecognizeConfiguration(RecognizeConfigurationsInternal recognizeConfiguration) { + this.recognizeConfiguration = recognizeConfiguration; + return this; + } + + /** + * Get the operationContext property: The value to identify context of the operation. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The value to identify context of the operation. + * + * @param operationContext the operationContext value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeRequest setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("recognizeInputType", Objects.toString(recognizeInputType, null)) + .writeJsonField("playPrompt", playPrompt) + .writeBooleanField("stopCurrentOperations", stopCurrentOperations) + .writeJsonField("recognizeConfiguration", recognizeConfiguration) + .writeStringField("operationContext", operationContext) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RecognizeRequest} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RecognizeRequest}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RecognizeRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecognizeRequest request = new RecognizeRequest(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recognizeInputType".equals(fieldName)) { + request.recognizeInputType = RecognizeInputTypeInternal.fromString(reader.getString()); + } else if ("playPrompt".equals(fieldName)) { + request.playPrompt = PlaySourceInternal.fromJson(reader); + } else if ("stopCurrentOperations".equals(fieldName)) { + request.stopCurrentOperations = reader.getNullable(JsonReader::getBoolean); + } else if ("recognizeConfiguration".equals(fieldName)) { + request.recognizeConfiguration = RecognizeConfigurationsInternal.fromJson(reader); + } else if ("operationContext".equals(fieldName)) { + request.operationContext = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannelInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannelInternal.java new file mode 100644 index 000000000000..77336089c235 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannelInternal.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.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for RecordingChannelInternal. */ +public final class RecordingChannelInternal extends ExpandableStringEnum { + /** Static value mixed for RecordingChannelInternal. */ + public static final RecordingChannelInternal MIXED = fromString("mixed"); + + /** Static value unmixed for RecordingChannelInternal. */ + public static final RecordingChannelInternal UNMIXED = fromString("unmixed"); + + /** + * Creates an instance of {@link RecordingChannelInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link RecordingChannelInternal} + * instead. + */ + @Deprecated + public RecordingChannelInternal() { + } + + /** + * Creates or finds a RecordingChannelInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecordingChannelInternal. + */ + public static RecordingChannelInternal fromString(String name) { + return fromString(name, RecordingChannelInternal.class); + } + + /** @return known RecordingChannelInternal values. */ + public static Collection values() { + return values(RecordingChannelInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContentInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContentInternal.java new file mode 100644 index 000000000000..1e450d82921b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContentInternal.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.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for RecordingContentInternal. */ +public final class RecordingContentInternal extends ExpandableStringEnum { + /** Static value audio for RecordingContentInternal. */ + public static final RecordingContentInternal AUDIO = fromString("audio"); + + /** Static value audioVideo for RecordingContentInternal. */ + public static final RecordingContentInternal AUDIO_VIDEO = fromString("audioVideo"); + + /** + * Creates an instance of {@link RecordingContentInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link RecordingContentInternal} + * instead. + */ + @Deprecated + public RecordingContentInternal() { + } + + /** + * Creates or finds a RecordingContentInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecordingContentInternal. + */ + public static RecordingContentInternal fromString(String name) { + return fromString(name, RecordingContentInternal.class); + } + + /** @return known RecordingContentInternal values. */ + public static Collection values() { + return values(RecordingContentInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormatInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormatInternal.java new file mode 100644 index 000000000000..fb279cc76618 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormatInternal.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for RecordingFormatInternal. */ +public final class RecordingFormatInternal extends ExpandableStringEnum { + /** Static value wav for RecordingFormatInternal. */ + public static final RecordingFormatInternal WAV = fromString("wav"); + + /** Static value mp3 for RecordingFormatInternal. */ + public static final RecordingFormatInternal MP3 = fromString("mp3"); + + /** Static value mp4 for RecordingFormatInternal. */ + public static final RecordingFormatInternal MP4 = fromString("mp4"); + + /** + * Creates an instance of {@link RecordingFormatInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link RecordingFormatInternal} + * instead. + */ + @Deprecated + public RecordingFormatInternal() { + } + + /** + * Creates or finds a RecordingFormatInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecordingFormatInternal. + */ + public static RecordingFormatInternal fromString(String name) { + return fromString(name, RecordingFormatInternal.class); + } + + /** @return known RecordingFormatInternal values. */ + public static Collection values() { + return values(RecordingFormatInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingStateInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingStateInternal.java new file mode 100644 index 000000000000..2696af88d128 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingStateInternal.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.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for RecordingStateInternal. */ +public final class RecordingStateInternal extends ExpandableStringEnum { + /** Static value active for RecordingStateInternal. */ + public static final RecordingStateInternal ACTIVE = fromString("active"); + + /** Static value inactive for RecordingStateInternal. */ + public static final RecordingStateInternal INACTIVE = fromString("inactive"); + + /** + * Creates an instance of {@link RecordingStateInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link RecordingStateInternal} + * instead. + */ + @Deprecated + public RecordingStateInternal() { + } + + /** + * Creates or finds a RecordingStateInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecordingStateInternal. + */ + public static RecordingStateInternal fromString(String name) { + return fromString(name, RecordingStateInternal.class); + } + + /** @return known RecordingStateInternal values. */ + public static Collection values() { + return values(RecordingStateInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingStateResponseInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingStateResponseInternal.java new file mode 100644 index 000000000000..7c476bf6fcb2 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingStateResponseInternal.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The RecordingStateResponseInternal model. */ +@Fluent +public final class RecordingStateResponseInternal implements JsonSerializable { + /* + * The recordingId property. + */ + private String recordingId; + + /* + * The recordingState property. + */ + private RecordingStateInternal recordingState; + + /** + * Get the recordingId property: The recordingId property. + * + * @return the recordingId value. + */ + public String getRecordingId() { + return this.recordingId; + } + + /** + * Set the recordingId property: The recordingId property. + * + * @param recordingId the recordingId value to set. + * @return the RecordingStateResponseInternal object itself. + */ + public RecordingStateResponseInternal setRecordingId(String recordingId) { + this.recordingId = recordingId; + return this; + } + + /** + * Get the recordingState property: The recordingState property. + * + * @return the recordingState value. + */ + public RecordingStateInternal getRecordingState() { + return this.recordingState; + } + + /** + * Set the recordingState property: The recordingState property. + * + * @param recordingState the recordingState value to set. + * @return the RecordingStateResponseInternal object itself. + */ + public RecordingStateResponseInternal setRecordingState(RecordingStateInternal recordingState) { + this.recordingState = recordingState; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("recordingId", recordingId) + .writeStringField("recordingState", Objects.toString(recordingState, null)) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RecordingStateResponseInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RecordingStateResponseInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RecordingStateResponseInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecordingStateResponseInternal response = new RecordingStateResponseInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recordingId".equals(fieldName)) { + response.recordingId = reader.getString(); + } else if ("recordingState".equals(fieldName)) { + response.recordingState = RecordingStateInternal.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return response; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RedirectCallRequestInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RedirectCallRequestInternal.java new file mode 100644 index 000000000000..9e88b52204cd --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RedirectCallRequestInternal.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The request payload for redirecting the call. */ +@Fluent +public final class RedirectCallRequestInternal implements JsonSerializable { + /* + * The context associated with the call. + */ + private String incomingCallContext; + + /* + * The target identity to redirect the call to. + */ + private CommunicationIdentifierModel target; + + /** + * Get the incomingCallContext property: The context associated with the call. + * + * @return the incomingCallContext value. + */ + public String getIncomingCallContext() { + return this.incomingCallContext; + } + + /** + * Set the incomingCallContext property: The context associated with the call. + * + * @param incomingCallContext the incomingCallContext value to set. + * @return the RedirectCallRequestInternal object itself. + */ + public RedirectCallRequestInternal setIncomingCallContext(String incomingCallContext) { + this.incomingCallContext = incomingCallContext; + return this; + } + + /** + * Get the target property: The target identity to redirect the call to. + * + * @return the target value. + */ + public CommunicationIdentifierModel getTarget() { + return this.target; + } + + /** + * Set the target property: The target identity to redirect the call to. + * + * @param target the target value to set. + * @return the RedirectCallRequestInternal object itself. + */ + public RedirectCallRequestInternal setTarget(CommunicationIdentifierModel target) { + this.target = target; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("incomingCallContext", incomingCallContext) + .writeJsonField("target", target) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RedirectCallRequestInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RedirectCallRequestInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RedirectCallRequestInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RedirectCallRequestInternal request = new RedirectCallRequestInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("incomingCallContext".equals(fieldName)) { + request.incomingCallContext = reader.getString(); + } else if ("target".equals(fieldName)) { + request.target = CommunicationIdentifierModel.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RejectCallRequestInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RejectCallRequestInternal.java new file mode 100644 index 000000000000..4e05a64bddef --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RejectCallRequestInternal.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The request payload for rejecting the call. */ +@Fluent +public final class RejectCallRequestInternal implements JsonSerializable { + /* + * The context associated with the call. + */ + private String incomingCallContext; + + /* + * The rejection reason. + */ + private CallRejectReasonInternal callRejectReason; + + /** + * Get the incomingCallContext property: The context associated with the call. + * + * @return the incomingCallContext value. + */ + public String getIncomingCallContext() { + return this.incomingCallContext; + } + + /** + * Set the incomingCallContext property: The context associated with the call. + * + * @param incomingCallContext the incomingCallContext value to set. + * @return the RejectCallRequestInternal object itself. + */ + public RejectCallRequestInternal setIncomingCallContext(String incomingCallContext) { + this.incomingCallContext = incomingCallContext; + return this; + } + + /** + * Get the callRejectReason property: The rejection reason. + * + * @return the callRejectReason value. + */ + public CallRejectReasonInternal getCallRejectReason() { + return this.callRejectReason; + } + + /** + * Set the callRejectReason property: The rejection reason. + * + * @param callRejectReason the callRejectReason value to set. + * @return the RejectCallRequestInternal object itself. + */ + public RejectCallRequestInternal setCallRejectReason(CallRejectReasonInternal callRejectReason) { + this.callRejectReason = callRejectReason; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("incomingCallContext", incomingCallContext) + .writeStringField("callRejectReason", Objects.toString(callRejectReason, null)) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RejectCallRequestInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RejectCallRequestInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RejectCallRequestInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RejectCallRequestInternal request = new RejectCallRequestInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("incomingCallContext".equals(fieldName)) { + request.incomingCallContext = reader.getString(); + } else if ("callRejectReason".equals(fieldName)) { + request.callRejectReason = CallRejectReasonInternal.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RemoveParticipantsRequestInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RemoveParticipantsRequestInternal.java new file mode 100644 index 000000000000..85614639e0c1 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RemoveParticipantsRequestInternal.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The remove participant by identifier request. */ +@Fluent +public final class RemoveParticipantsRequestInternal implements JsonSerializable { + /* + * The participants to invite. + */ + private List participantsToRemove; + + /* + * The operation context. + */ + private String operationContext; + + /** + * Get the participantsToRemove property: The participants to invite. + * + * @return the participantsToRemove value. + */ + public List getParticipantsToRemove() { + return this.participantsToRemove; + } + + /** + * Set the participantsToRemove property: The participants to invite. + * + * @param participantsToRemove the participantsToRemove value to set. + * @return the RemoveParticipantsRequestInternal object itself. + */ + public RemoveParticipantsRequestInternal + setParticipantsToRemove(List participantsToRemove) { + this.participantsToRemove = participantsToRemove; + return this; + } + + /** + * Get the operationContext property: The operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The operation context. + * + * @param operationContext the operationContext value to set. + * @return the RemoveParticipantsRequestInternal object itself. + */ + public RemoveParticipantsRequestInternal setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeArrayField("participantsToRemove", participantsToRemove, JsonWriter::writeJson) + .writeStringField("operationContext", operationContext) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RemoveParticipantsRequestInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RemoveParticipantsRequestInternal}, or null if the {@link JsonReader} was pointing + * to {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RemoveParticipantsRequestInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RemoveParticipantsRequestInternal request = new RemoveParticipantsRequestInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("participantsToRemove".equals(fieldName)) { + request.participantsToRemove = reader.readArray(CommunicationIdentifierModel::fromJson); + } else if ("operationContext".equals(fieldName)) { + request.operationContext = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RemoveParticipantsResponseInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RemoveParticipantsResponseInternal.java new file mode 100644 index 000000000000..2167c81c5a88 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RemoveParticipantsResponseInternal.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The RemoveParticipantsResponseInternal model. */ +@Fluent +public final class RemoveParticipantsResponseInternal implements JsonSerializable { + /* + * The operation context provided by client. + */ + private String operationContext; + + /** + * Get the operationContext property: The operation context provided by client. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The operation context provided by client. + * + * @param operationContext the operationContext value to set. + * @return the RemoveParticipantsResponseInternal object itself. + */ + public RemoveParticipantsResponseInternal setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeStringField("operationContext", operationContext).writeEndObject(); + } + + /** + * Reads an instance of {@link RemoveParticipantsResponseInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RemoveParticipantsResponseInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RemoveParticipantsResponseInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RemoveParticipantsResponseInternal response = new RemoveParticipantsResponseInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationContext".equals(fieldName)) { + response.operationContext = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return response; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/ResultInformation.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/ResultInformation.java new file mode 100644 index 000000000000..c85e35668e3c --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/ResultInformation.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The ResultInformation model. */ +@Fluent +public final class ResultInformation implements JsonSerializable { + /* + * The code property. + */ + private Integer code; + + /* + * The subCode property. + */ + private Integer subCode; + + /* + * The message property. + */ + private String message; + + /** + * Get the code property: The code property. + * + * @return the code value. + */ + public Integer getCode() { + return this.code; + } + + /** + * Set the code property: The code property. + * + * @param code the code value to set. + * @return the ResultInformation object itself. + */ + public ResultInformation setCode(Integer code) { + this.code = code; + return this; + } + + /** + * Get the subCode property: The subCode property. + * + * @return the subCode value. + */ + public Integer getSubCode() { + return this.subCode; + } + + /** + * Set the subCode property: The subCode property. + * + * @param subCode the subCode value to set. + * @return the ResultInformation object itself. + */ + public ResultInformation setSubCode(Integer subCode) { + this.subCode = subCode; + return this; + } + + /** + * Get the message property: The message property. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: The message property. + * + * @param message the message value to set. + * @return the ResultInformation object itself. + */ + public ResultInformation setMessage(String message) { + this.message = message; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeNumberField("code", code) + .writeNumberField("subCode", subCode) + .writeStringField("message", message) + .writeEndObject(); + } + + /** + * Reads an instance of {@link ResultInformation} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link ResultInformation}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static ResultInformation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResultInformation information = new ResultInformation(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + information.code = reader.getNullable(JsonReader::getInt); + } else if ("subCode".equals(fieldName)) { + information.subCode = reader.getNullable(JsonReader::getInt); + } else if ("message".equals(fieldName)) { + information.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return information; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StartCallRecordingRequestInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StartCallRecordingRequestInternal.java new file mode 100644 index 000000000000..6666bc30b91a --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StartCallRecordingRequestInternal.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; +import java.util.Objects; + +/** The request payload start for call recording operation with call locator. */ +@Fluent +public final class StartCallRecordingRequestInternal implements JsonSerializable { + /* + * The call locator. + */ + private CallLocatorInternal callLocator; + + /* + * The uri to send notifications to. + */ + private String recordingStateCallbackUri; + + /* + * The content type of call recording. + */ + private RecordingContentInternal recordingContentType; + + /* + * The channel type of call recording. + */ + private RecordingChannelInternal recordingChannelType; + + /* + * The format type of call recording. + */ + private RecordingFormatInternal recordingFormatType; + + /* + * The channel affinity of call recording. + */ + private List channelAffinity; + + /** + * Get the callLocator property: The call locator. + * + * @return the callLocator value. + */ + public CallLocatorInternal getCallLocator() { + return this.callLocator; + } + + /** + * Set the callLocator property: The call locator. + * + * @param callLocator the callLocator value to set. + * @return the StartCallRecordingRequestInternal object itself. + */ + public StartCallRecordingRequestInternal setCallLocator(CallLocatorInternal callLocator) { + this.callLocator = callLocator; + return this; + } + + /** + * Get the recordingStateCallbackUri property: The uri to send notifications to. + * + * @return the recordingStateCallbackUri value. + */ + public String getRecordingStateCallbackUri() { + return this.recordingStateCallbackUri; + } + + /** + * Set the recordingStateCallbackUri property: The uri to send notifications to. + * + * @param recordingStateCallbackUri the recordingStateCallbackUri value to set. + * @return the StartCallRecordingRequestInternal object itself. + */ + public StartCallRecordingRequestInternal setRecordingStateCallbackUri(String recordingStateCallbackUri) { + this.recordingStateCallbackUri = recordingStateCallbackUri; + return this; + } + + /** + * Get the recordingContentType property: The content type of call recording. + * + * @return the recordingContentType value. + */ + public RecordingContentInternal getRecordingContentType() { + return this.recordingContentType; + } + + /** + * Set the recordingContentType property: The content type of call recording. + * + * @param recordingContentType the recordingContentType value to set. + * @return the StartCallRecordingRequestInternal object itself. + */ + public StartCallRecordingRequestInternal setRecordingContentType(RecordingContentInternal recordingContentType) { + this.recordingContentType = recordingContentType; + return this; + } + + /** + * Get the recordingChannelType property: The channel type of call recording. + * + * @return the recordingChannelType value. + */ + public RecordingChannelInternal getRecordingChannelType() { + return this.recordingChannelType; + } + + /** + * Set the recordingChannelType property: The channel type of call recording. + * + * @param recordingChannelType the recordingChannelType value to set. + * @return the StartCallRecordingRequestInternal object itself. + */ + public StartCallRecordingRequestInternal setRecordingChannelType(RecordingChannelInternal recordingChannelType) { + this.recordingChannelType = recordingChannelType; + return this; + } + + /** + * Get the recordingFormatType property: The format type of call recording. + * + * @return the recordingFormatType value. + */ + public RecordingFormatInternal getRecordingFormatType() { + return this.recordingFormatType; + } + + /** + * Set the recordingFormatType property: The format type of call recording. + * + * @param recordingFormatType the recordingFormatType value to set. + * @return the StartCallRecordingRequestInternal object itself. + */ + public StartCallRecordingRequestInternal setRecordingFormatType(RecordingFormatInternal recordingFormatType) { + this.recordingFormatType = recordingFormatType; + return this; + } + + /** + * Get the channelAffinity property: The channel affinity of call recording. + * + * @return the channelAffinity value. + */ + public List getChannelAffinity() { + return this.channelAffinity; + } + + /** + * Set the channelAffinity property: The channel affinity of call recording. + * + * @param channelAffinity the channelAffinity value to set. + * @return the StartCallRecordingRequestInternal object itself. + */ + public StartCallRecordingRequestInternal setChannelAffinity(List channelAffinity) { + this.channelAffinity = channelAffinity; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeJsonField("callLocator", callLocator) + .writeStringField("recordingStateCallbackUri", recordingStateCallbackUri) + .writeStringField("recordingContentType", Objects.toString(recordingContentType, null)) + .writeStringField("recordingChannelType", Objects.toString(recordingChannelType, null)) + .writeStringField("recordingFormatType", Objects.toString(recordingFormatType, null)) + .writeArrayField("channelAffinity", channelAffinity, JsonWriter::writeJson) + .writeEndObject(); + } + + /** + * Reads an instance of {@link StartCallRecordingRequestInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link StartCallRecordingRequestInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static StartCallRecordingRequestInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StartCallRecordingRequestInternal request = new StartCallRecordingRequestInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("callLocator".equals(fieldName)) { + request.callLocator = CallLocatorInternal.fromJson(reader); + } else if ("recordingStateCallbackUri".equals(fieldName)) { + request.recordingStateCallbackUri = reader.getString(); + } else if ("recordingContentType".equals(fieldName)) { + request.recordingContentType = RecordingContentInternal.fromString(reader.getString()); + } else if ("recordingChannelType".equals(fieldName)) { + request.recordingChannelType = RecordingChannelInternal.fromString(reader.getString()); + } else if ("recordingFormatType".equals(fieldName)) { + request.recordingFormatType = RecordingFormatInternal.fromString(reader.getString()); + } else if ("channelAffinity".equals(fieldName)) { + request.channelAffinity = reader.readArray(ChannelAffinityInternal::fromJson); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StopTonesInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StopTonesInternal.java new file mode 100644 index 000000000000..8cf8227bab61 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StopTonesInternal.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for StopTonesInternal. */ +public final class StopTonesInternal extends ExpandableStringEnum { + /** Static value zero for StopTonesInternal. */ + public static final StopTonesInternal ZERO = fromString("zero"); + + /** Static value one for StopTonesInternal. */ + public static final StopTonesInternal ONE = fromString("one"); + + /** Static value two for StopTonesInternal. */ + public static final StopTonesInternal TWO = fromString("two"); + + /** Static value three for StopTonesInternal. */ + public static final StopTonesInternal THREE = fromString("three"); + + /** Static value four for StopTonesInternal. */ + public static final StopTonesInternal FOUR = fromString("four"); + + /** Static value five for StopTonesInternal. */ + public static final StopTonesInternal FIVE = fromString("five"); + + /** Static value six for StopTonesInternal. */ + public static final StopTonesInternal SIX = fromString("six"); + + /** Static value seven for StopTonesInternal. */ + public static final StopTonesInternal SEVEN = fromString("seven"); + + /** Static value eight for StopTonesInternal. */ + public static final StopTonesInternal EIGHT = fromString("eight"); + + /** Static value nine for StopTonesInternal. */ + public static final StopTonesInternal NINE = fromString("nine"); + + /** Static value a for StopTonesInternal. */ + public static final StopTonesInternal A = fromString("a"); + + /** Static value b for StopTonesInternal. */ + public static final StopTonesInternal B = fromString("b"); + + /** Static value c for StopTonesInternal. */ + public static final StopTonesInternal C = fromString("c"); + + /** Static value d for StopTonesInternal. */ + public static final StopTonesInternal D = fromString("d"); + + /** Static value pound for StopTonesInternal. */ + public static final StopTonesInternal POUND = fromString("pound"); + + /** Static value asterisk for StopTonesInternal. */ + public static final StopTonesInternal ASTERISK = fromString("asterisk"); + + /** + * Creates an instance of {@link StopTonesInternal} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link StopTonesInternal} instead. + */ + @Deprecated + public StopTonesInternal() { + } + + /** + * Creates or finds a StopTonesInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding StopTonesInternal. + */ + public static StopTonesInternal fromString(String name) { + return fromString(name, StopTonesInternal.class); + } + + /** @return known StopTonesInternal values. */ + public static Collection values() { + return values(StopTonesInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/TransferCallResponseInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/TransferCallResponseInternal.java new file mode 100644 index 000000000000..c931149c8afd --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/TransferCallResponseInternal.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The TransferCallResponseInternal model. */ +@Fluent +public final class TransferCallResponseInternal implements JsonSerializable { + /* + * The operation context provided by client. + */ + private String operationContext; + + /** + * Get the operationContext property: The operation context provided by client. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The operation context provided by client. + * + * @param operationContext the operationContext value to set. + * @return the TransferCallResponseInternal object itself. + */ + public TransferCallResponseInternal setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeStringField("operationContext", operationContext).writeEndObject(); + } + + /** + * Reads an instance of {@link TransferCallResponseInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link TransferCallResponseInternal}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static TransferCallResponseInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TransferCallResponseInternal response = new TransferCallResponseInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationContext".equals(fieldName)) { + response.operationContext = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return response; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/TransferToParticipantRequestInternal.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/TransferToParticipantRequestInternal.java new file mode 100644 index 000000000000..a9af2b48eb28 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/TransferToParticipantRequestInternal.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The transfer call to participant request. */ +@Fluent +public final class TransferToParticipantRequestInternal + implements JsonSerializable { + /* + * The identity of the target where call should be transferred to. + */ + private CommunicationIdentifierModel targetParticipant; + + /* + * The caller ID of the transferee when transferring to PSTN. + */ + private PhoneNumberIdentifierModel transfereeCallerId; + + /* + * The user to user information. + */ + private String userToUserInformation; + + /* + * The operation context. + */ + private String operationContext; + + /** + * Get the targetParticipant property: The identity of the target where call should be transferred to. + * + * @return the targetParticipant value. + */ + public CommunicationIdentifierModel getTargetParticipant() { + return this.targetParticipant; + } + + /** + * Set the targetParticipant property: The identity of the target where call should be transferred to. + * + * @param targetParticipant the targetParticipant value to set. + * @return the TransferToParticipantRequestInternal object itself. + */ + public TransferToParticipantRequestInternal setTargetParticipant(CommunicationIdentifierModel targetParticipant) { + this.targetParticipant = targetParticipant; + return this; + } + + /** + * Get the transfereeCallerId property: The caller ID of the transferee when transferring to PSTN. + * + * @return the transfereeCallerId value. + */ + public PhoneNumberIdentifierModel getTransfereeCallerId() { + return this.transfereeCallerId; + } + + /** + * Set the transfereeCallerId property: The caller ID of the transferee when transferring to PSTN. + * + * @param transfereeCallerId the transfereeCallerId value to set. + * @return the TransferToParticipantRequestInternal object itself. + */ + public TransferToParticipantRequestInternal setTransfereeCallerId(PhoneNumberIdentifierModel transfereeCallerId) { + this.transfereeCallerId = transfereeCallerId; + return this; + } + + /** + * Get the userToUserInformation property: The user to user information. + * + * @return the userToUserInformation value. + */ + public String getUserToUserInformation() { + return this.userToUserInformation; + } + + /** + * Set the userToUserInformation property: The user to user information. + * + * @param userToUserInformation the userToUserInformation value to set. + * @return the TransferToParticipantRequestInternal object itself. + */ + public TransferToParticipantRequestInternal setUserToUserInformation(String userToUserInformation) { + this.userToUserInformation = userToUserInformation; + return this; + } + + /** + * Get the operationContext property: The operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The operation context. + * + * @param operationContext the operationContext value to set. + * @return the TransferToParticipantRequestInternal object itself. + */ + public TransferToParticipantRequestInternal setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeJsonField("targetParticipant", targetParticipant) + .writeJsonField("transfereeCallerId", transfereeCallerId) + .writeStringField("userToUserInformation", userToUserInformation) + .writeStringField("operationContext", operationContext) + .writeEndObject(); + } + + /** + * Reads an instance of {@link TransferToParticipantRequestInternal} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link TransferToParticipantRequestInternal}, or null if the {@link JsonReader} was + * pointing to {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static TransferToParticipantRequestInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TransferToParticipantRequestInternal request = new TransferToParticipantRequestInternal(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetParticipant".equals(fieldName)) { + request.targetParticipant = CommunicationIdentifierModel.fromJson(reader); + } else if ("transfereeCallerId".equals(fieldName)) { + request.transfereeCallerId = PhoneNumberIdentifierModel.fromJson(reader); + } else if ("userToUserInformation".equals(fieldName)) { + request.userToUserInformation = reader.getString(); + } else if ("operationContext".equals(fieldName)) { + request.operationContext = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return request; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/package-info.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/package-info.java new file mode 100644 index 000000000000..ec1f6ed9d86f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for AzureCommunicationCallingServerService. null. */ +package com.azure.communication.callingserver.implementation.models; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/package-info.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/package-info.java new file mode 100644 index 000000000000..e2256c9a00a6 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the implementations for AzureCommunicationCallingServerService. null. */ +package com.azure.communication.callingserver.implementation; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AddParticipantsOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AddParticipantsOptions.java new file mode 100644 index 000000000000..4d3d05684340 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AddParticipantsOptions.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.communication.common.PhoneNumberIdentifier; +import com.azure.core.annotation.Fluent; + +import java.time.Duration; +import java.util.List; + +/** + * The options for adding participants. + */ +@Fluent +public final class AddParticipantsOptions { + /** + * The list of participants to invite. + */ + private final List participants; + + /** + * The operational context + */ + private String operationContext; + + /** + * The source caller Id that's shown to the PSTN participant being invited. + * Required only when inviting a PSTN participant. + */ + private PhoneNumberIdentifier sourceCallerId; + + /** + * The timeout to wait for the invited participant to pickup. + * The maximum value of this is 180 seconds. + */ + private Duration invitationTimeout; + + /** + * Constructor + * + * @param participants The list of participants to invite. + */ + public AddParticipantsOptions(List participants) { + this.participants = participants; + } + + /** + * Get the participants. + * + * @return the list of participants to be added + */ + public List getParticipants() { + return participants; + } + + /** + * Get the operationContext. + * + * @return the operationContext + */ + public String getOperationContext() { + return operationContext; + } + + /** + * Get the sourceCallerId. + * + * @return the sourceCallerId phone identifier. + */ + public PhoneNumberIdentifier getSourceCallerId() { + return sourceCallerId; + } + + /** + * Get the invitationTimeoutInSeconds. + * + * @return the Invitation Timeout In Seconds + */ + public Duration getInvitationTimeout() { + return invitationTimeout; + } + + /** + * Set the operationContext. + * + * @param operationContext the operationContext to set + * @return the AddParticipantsOptions object itself. + */ + public AddParticipantsOptions setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + /** + * Set the sourceCallerId. + * + * @param sourceCallerId Set the source caller Id that's shown to the PSTN participant being invited. + * Required only when inviting a PSTN participant. + * @return the AddParticipantsOptions object itself. + */ + public AddParticipantsOptions setSourceCallerId(PhoneNumberIdentifier sourceCallerId) { + this.sourceCallerId = sourceCallerId; + return this; + } + + /** + * Set the invitationTimeoutInSeconds. + * + * @param invitationTimeout Set the timeout to wait for the invited participant to pickup. + * The maximum value of this is 180 seconds. + * @return the AddParticipantsOptions object itself. + */ + public AddParticipantsOptions setInvitationTimeout(Duration invitationTimeout) { + this.invitationTimeout = invitationTimeout; + return this; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AddParticipantsResult.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AddParticipantsResult.java new file mode 100644 index 000000000000..82b5397bea40 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AddParticipantsResult.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.accesshelpers.AddParticipantsResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.converters.CallParticipantConverter; +import com.azure.communication.callingserver.implementation.models.AddParticipantsResponseInternal; +import com.azure.core.annotation.Immutable; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** The AddParticipantsResult model. */ +@Immutable +public final class AddParticipantsResult { + /* + * The participants property. + */ + private final List participants; + + /* + * The operation context provided by client. + */ + private final String operationContext; + + static { + AddParticipantsResponseConstructorProxy + .setAccessor(new AddParticipantsResponseConstructorProxy.AddParticipantsResponseConstructorAccessor() { + @Override + public AddParticipantsResult create(AddParticipantsResponseInternal internalHeaders) { + return new AddParticipantsResult(internalHeaders); + } + }); + } + + /** + * Public constructor. + * + */ + public AddParticipantsResult() { + this.participants = null; + this.operationContext = null; + } + + /** + * Constructor of the class + * + * @param addParticipantsResponseInternal The response from the addParticipant service + */ + AddParticipantsResult(AddParticipantsResponseInternal addParticipantsResponseInternal) { + Objects.requireNonNull(addParticipantsResponseInternal, "addParticipantsResponseInternal must not be null"); + + this.participants = addParticipantsResponseInternal.getParticipants() + .stream() + .map(CallParticipantConverter::convert) + .collect(Collectors.toList()); + this.operationContext = addParticipantsResponseInternal.getOperationContext(); + } + + /** + * Get the participants property: The participants property. + * + * @return the participants value. + */ + public List getParticipants() { + return this.participants; + } + + /** + * Get the operationContext property: The operation context provided by client. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AnswerCallResult.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AnswerCallResult.java new file mode 100644 index 000000000000..5034df9b5eb7 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/AnswerCallResult.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.CallConnection; +import com.azure.communication.callingserver.CallConnectionAsync; + +/** + * The result of answering a call + */ +public class AnswerCallResult extends CallResult { + + /** + * Constructor + * + * @param callConnectionProperties The callConnectionProperties + * @param callConnection The callConnection + * @param callConnectionAsync The callConnectionAsync + */ + public AnswerCallResult(CallConnectionProperties callConnectionProperties, CallConnection callConnection, + CallConnectionAsync callConnectionAsync) { + super(callConnectionProperties, callConnection, callConnectionAsync); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallConnectionProperties.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallConnectionProperties.java new file mode 100644 index 000000000000..ff6f156dbeb8 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallConnectionProperties.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.accesshelpers.CallConnectionPropertiesConstructorProxy; +import com.azure.communication.callingserver.implementation.converters.CallSourceConverter; +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.CallConnectionPropertiesInternal; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Immutable; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Asynchronous client that supports call connection operations. + */ +@Immutable +public final class CallConnectionProperties { + private final String callConnectionId; + private final String serverCallId; + private final CallSource source; + private final List targets; + private final CallConnectionState callConnectionState; + private final String subject; + private final URI callbackUri; + + static { + CallConnectionPropertiesConstructorProxy + .setAccessor(new CallConnectionPropertiesConstructorProxy.CallConnectionPropertiesConstructorAccessor() { + @Override + public CallConnectionProperties create(CallConnectionPropertiesInternal internalHeaders) + throws URISyntaxException { + return new CallConnectionProperties(internalHeaders); + } + }); + } + + /** + * Public constructor. + * + */ + public CallConnectionProperties() { + this.callConnectionId = null; + this.source = null; + this.serverCallId = null; + this.targets = null; + this.callConnectionState = null; + this.subject = null; + this.callbackUri = null; + } + + /** + * Package-private constructor of the class, used internally. + * + * @param callConnectionPropertiesInternal The internal response of callConnectionProperties + * @throws URISyntaxException exception of invalid URI. + */ + CallConnectionProperties(CallConnectionPropertiesInternal callConnectionPropertiesInternal) + throws URISyntaxException { + this.callConnectionId = callConnectionPropertiesInternal.getCallConnectionId(); + this.source = CallSourceConverter.convert(callConnectionPropertiesInternal.getSource()); + this.serverCallId = callConnectionPropertiesInternal.getServerCallId(); + this.targets = callConnectionPropertiesInternal.getTargets() + .stream() + .map(CommunicationIdentifierConverter::convert) + .collect(Collectors.toList()); + this.callConnectionState + = CallConnectionState.fromString(callConnectionPropertiesInternal.getCallConnectionState().toString()); + this.subject = callConnectionPropertiesInternal.getSubject(); + this.callbackUri = new URI(callConnectionPropertiesInternal.getCallbackUri()); + } + + /** + * Get the source property. + * + * @return source value. + */ + public CallSource getSource() { + return source; + } + + /** + * Get the targets property. + * + * @return list of targets + */ + public List getTargets() { + return targets; + } + + /** + * Get the server call Id. + * + * @return serverCallId value. + */ + public String getServerCallId() { + return serverCallId; + } + + /** + * Get the callConnectionState property. + * + * @return callConnectionState value. + */ + public CallConnectionState getCallConnectionState() { + return callConnectionState; + } + + /** + * Get the subject property. + * + * @return subject value. + */ + public String getSubject() { + return subject; + } + + /** + * Get the callbackUri property. + * + * @return callbackUri value. + */ + public URI getCallbackUri() { + return callbackUri; + } + + /** + * Get the callConnectionId property, which is the call connection id. + * + * @return callConnectionId value. + */ + public String getCallConnectionId() { + return callConnectionId; + } + +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallConnectionState.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallConnectionState.java new file mode 100644 index 000000000000..53187e7d28a0 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallConnectionState.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for CallConnectionState. */ +public final class CallConnectionState extends ExpandableStringEnum { + /** Static value connecting for CallConnectionState. */ + public static final CallConnectionState CONNECTING = fromString("connecting"); + + /** Static value connected for CallConnectionState. */ + public static final CallConnectionState CONNECTED = fromString("connected"); + + /** Static value transferring for CallConnectionState. */ + public static final CallConnectionState TRANSFERRING = fromString("transferring"); + + /** Static value transferAccepted for CallConnectionState. */ + public static final CallConnectionState TRANSFER_ACCEPTED = fromString("transferAccepted"); + + /** Static value disconnecting for CallConnectionState. */ + public static final CallConnectionState DISCONNECTING = fromString("disconnecting"); + + /** Static value disconnected for CallConnectionState. */ + public static final CallConnectionState DISCONNECTED = fromString("disconnected"); + + /** + * Creates or finds a CallConnectionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CallConnectionState. + */ + + public static CallConnectionState fromString(String name) { + return fromString(name, CallConnectionState.class); + } + + /** Return values + * @return known CallConnectionState values. + */ + public static Collection values() { + return values(CallConnectionState.class); + } + + /** + * Private constructor + */ + private CallConnectionState() { + + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallLocator.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallLocator.java new file mode 100644 index 000000000000..bddf25032352 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallLocator.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.models; + +/** The locator used for joining or taking action on a call. */ +public abstract class CallLocator { + /* + * The call locator kind. + */ + private final CallLocatorKind kind; + + /** + * The constructor + * + * @param kind Specify the call locator kind. + */ + CallLocator(CallLocatorKind kind) { + if (kind == CallLocatorKind.GROUP_CALL_LOCATOR || kind == CallLocatorKind.SERVER_CALL_LOCATOR) { + this.kind = kind; + } else { + throw new IllegalArgumentException("Illegal callLocator kind"); + } + } + + /** + * Get the kind property: The call locator kind. + * + * @return the kind value. + */ + public CallLocatorKind getKind() { + return this.kind; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallLocatorKind.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallLocatorKind.java new file mode 100644 index 000000000000..779da106cb17 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallLocatorKind.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for CallLocatorKind. */ +public final class CallLocatorKind extends ExpandableStringEnum { + /** Static value groupCallLocator for CallLocatorKind. */ + public static final CallLocatorKind GROUP_CALL_LOCATOR = fromString("groupCallLocator"); + + /** Static value serverCallLocator for CallLocatorKind. */ + public static final CallLocatorKind SERVER_CALL_LOCATOR = fromString("serverCallLocator"); + + /** + * Creates an instance of {@link CallLocatorKind} with no string value. + * + * @deprecated Please use {@link #fromString(String)} to create an instance of CallLocatorKind. + */ + @Deprecated + public CallLocatorKind() { + } + + /** + * Creates or finds a CallLocatorKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding CallLocatorKind. + */ + public static CallLocatorKind fromString(String name) { + return fromString(name, CallLocatorKind.class); + } + + /** + * Get the collection of CallLocatorKind values. + * @return known CallLocatorKind values. + */ + public static Collection values() { + return values(CallLocatorKind.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallParticipant.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallParticipant.java new file mode 100644 index 000000000000..db888f6fea40 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallParticipant.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Immutable; + +/** The CallParticipant model. */ +@Immutable +public final class CallParticipant { + /* + * Communication identifier of the participant + */ + private final CommunicationIdentifier identifier; + + /* + * Is participant muted + */ + private final Boolean isMuted; + + /** + * Constructor of the class + * + * @param identifier The communication identifier + * @param isMuted The value of isMuted + */ + public CallParticipant(CommunicationIdentifier identifier, Boolean isMuted) { + this.identifier = identifier; + this.isMuted = isMuted; + } + + /** + * Get the identifier property: Communication identifier of the participant. + * + * @return the identifier value. + */ + public CommunicationIdentifier getIdentifier() { + return this.identifier; + } + + /** + * Get the isMuted property: Is participant muted. + * + * @return the isMuted value. + */ + public Boolean isMuted() { + return this.isMuted; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallRejectReason.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallRejectReason.java new file mode 100644 index 000000000000..43156eb8d4c5 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallRejectReason.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** Defines values for CallRejectReason. */ +public final class CallRejectReason extends ExpandableStringEnum { + /** Static value none for CallRejectReason. */ + public static final CallRejectReason NONE = fromString("none"); + + /** Static value busy for CallRejectReason. */ + public static final CallRejectReason BUSY = fromString("busy"); + + /** Static value forbidden for CallRejectReason. */ + public static final CallRejectReason FORBIDDEN = fromString("forbidden"); + + /** + * Creates an instance of {@link CallRejectReason} with no string value. + * + * @deprecated Please use {@link #fromString(String)} to create an instance of CallRejectReason. + */ + @Deprecated + public CallRejectReason() { + } + + /** + * Creates or finds a CallRejectReason from its string representation. + * + * @param name a name to look for. + * @return the corresponding CallRejectReason. + */ + public static CallRejectReason fromString(String name) { + return fromString(name, CallRejectReason.class); + } + + /** + * Get the collection of CallRejectReason values. + * @return known CallRejectReason values. + */ + public static Collection values() { + return values(CallRejectReason.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallResult.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallResult.java new file mode 100644 index 000000000000..ca3ca370d961 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallResult.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.CallConnection; +import com.azure.communication.callingserver.CallConnectionAsync; + +/** + * The abstract class used as parent of [action]CallResult + */ +public abstract class CallResult { + /* + * The callConnectionProperties + */ + private final CallConnectionProperties callConnectionProperties; + + /* + * The callConnection + */ + private final CallConnection callConnection; + + /* + * The callConnectionAsync + */ + private final CallConnectionAsync callConnectionAsync; + + CallResult(CallConnectionProperties callConnectionProperties, CallConnection callConnection, + CallConnectionAsync callConnectionAsync) { + this.callConnectionProperties = callConnectionProperties; + this.callConnection = callConnection; + this.callConnectionAsync = callConnectionAsync; + } + + /** + * Get the callConnectionProperties. + * + * @return the callConnectionProperties. + */ + public CallConnectionProperties getCallConnectionProperties() { + return callConnectionProperties; + } + + /** + * Get the callConnection. + * + * @return the callConnection. + */ + public CallConnection getCallConnection() { + return callConnection; + } + + /** + * Get the callConnectionAsync. + * + * @return the callConnectionAsync. + */ + public CallConnectionAsync getCallConnectionAsync() { + return callConnectionAsync; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallSource.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallSource.java new file mode 100644 index 000000000000..ac2a592d712d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallSource.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.communication.common.PhoneNumberIdentifier; +import com.azure.core.annotation.Fluent; + +/** The CallSource model. */ +@Fluent +public final class CallSource { + /* + * The alternate identity of the source of the call if dialing out to a + * pstn number + */ + private PhoneNumberIdentifier callerId; + + /* + * The identifier property. + */ + private final CommunicationIdentifier identifier; + + /** + * Constructor of the class + * + * @param identifier the identifier value to set. Required. + */ + public CallSource(CommunicationIdentifier identifier) { + this.identifier = identifier; + } + + /** + * Get the callerId property: The alternate identity of the source of the call if dialing out to a pstn number. + * + * @return the callerId value. + */ + public PhoneNumberIdentifier getCallerId() { + return this.callerId; + } + + /** + * Set the callerId property: The alternate identity of the source of the call if dialing out to a pstn number. + * + * @param callerId the callerId value to set. + * @return the CallSource object itself. + */ + public CallSource setCallerId(PhoneNumberIdentifier callerId) { + this.callerId = callerId; + return this; + } + + /** + * Get the identifier property: The identifier property. + * + * @return the identifier value. + */ + public CommunicationIdentifier getIdentifier() { + return this.identifier; + } + +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingOperationStatus.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingOperationStatus.java new file mode 100644 index 000000000000..5e53e04fa7be --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingOperationStatus.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for CallingOperationStatus. */ +public final class CallingOperationStatus extends ExpandableStringEnum { + /** Static value notStarted for CallingOperationStatus. */ + public static final CallingOperationStatus NOT_STARTED = fromString("notStarted"); + + /** Static value running for CallingOperationStatus. */ + public static final CallingOperationStatus RUNNING = fromString("running"); + + /** Static value completed for CallingOperationStatus. */ + public static final CallingOperationStatus COMPLETED = fromString("completed"); + + /** Static value failed for CallingOperationStatus. */ + public static final CallingOperationStatus FAILED = fromString("failed"); + + /** + * Creates or finds a CallingOperationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CallingOperationStatus. + */ + public static CallingOperationStatus fromString(String name) { + return fromString(name, CallingOperationStatus.class); + } + + /** Return the values. + * @return known CallingOperationStatus values. + * */ + public static Collection values() { + return values(CallingOperationStatus.class); + } + + /** + * Private constructor + */ + private CallingOperationStatus() { + + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingServerError.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingServerError.java new file mode 100644 index 000000000000..8e63f2fdd8ea --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingServerError.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Immutable; + +import java.util.List; + +/** The Calling Server error. */ +@Immutable +public final class CallingServerError { + /* + * The error code. + */ + private final String code; + + /* + * The error message. + */ + private final String message; + + /* + * The error target. + */ + private final String target; + + /* + * Further details about specific errors that led to this error. + */ + private final List details; + + /* + * The inner error if any. + */ + private final CallingServerError innerError; + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + public String getCode() { + return code; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + public String getMessage() { + return message; + } + + /** + * Get the target property: The error target. + * + * @return the target value. + */ + public String getTarget() { + return target; + } + + /** + * Get the details property: Further details about specific errors that led to + * this error. + * + * @return the details value. + */ + public List getDetails() { + return details; + } + + /** + * Get the innerError property: The inner error if any. + * + * @return the innerError value. + */ + public CallingServerError getInnerError() { + return innerError; + } + + /** + * Constructs a new CallingServerError + * @param message The message of the original error + * @param code The error code + * @param target The target of the error + * @param details Additional details + * @param innerError The inner error + */ + CallingServerError(String message, String code, String target, List details, + CallingServerError innerError) { + this.message = message; + this.code = code; + this.target = target; + this.details = details; + this.innerError = innerError; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingServerErrorException.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingServerErrorException.java new file mode 100644 index 000000000000..9605d19da065 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CallingServerErrorException.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.accesshelpers.ErrorConstructorProxy; +import com.azure.communication.callingserver.implementation.models.CommunicationError; +import com.azure.core.annotation.Immutable; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import com.azure.json.JsonWriter; + +import java.io.ByteArrayOutputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Exception thrown for an invalid response with {@link CallingServerError} information. + **/ +@Immutable +public final class CallingServerErrorException extends HttpResponseException { + /** + * Initializes a new instance of the CallingServerResponseException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + CallingServerErrorException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the CallingServerErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + CallingServerErrorException(String message, HttpResponse response, CallingServerError value) { + super(message, response, value); + } + + /** + * Public constructor + */ + public CallingServerErrorException() { + super(null, null, null); + } + + static { + ErrorConstructorProxy.setAccessor(internalHeaders -> { + CallingServerError error = null; + if (internalHeaders.getValue() != null) { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + try (JsonWriter writer = JsonProviders.createWriter(outputStream)) { + writer.writeUntyped(internalHeaders.getValue()).flush(); + } + + try (JsonReader jsonReader = JsonProviders.createReader(outputStream.toByteArray())) { + error = convert(CommunicationError.fromJson(jsonReader)); + } + } + return new CallingServerErrorException(internalHeaders.getMessage(), internalHeaders.getResponse(), error); + }); + } + + /** + * Maps from {@link CommunicationError} to {@link CallingServerError}. + */ + private static CallingServerError convert(CommunicationError communicationError) { + if (communicationError == null) { + return null; + } + + List details = new ArrayList<>(); + + if (communicationError.getDetails() != null) { + details = communicationError.getDetails() + .stream() + .map(CallingServerErrorException::convert) + .collect(Collectors.toList()); + } + + return new CallingServerError(communicationError.getMessage(), communicationError.getCode(), + communicationError.getTarget(), details, convert(communicationError.getInnererror())); + } + + @Override + public CallingServerError getValue() { + return (CallingServerError) super.getValue(); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ChannelAffinity.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ChannelAffinity.java new file mode 100644 index 000000000000..847107bec158 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ChannelAffinity.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** Channel affinity for a participant. */ +@Fluent +public final class ChannelAffinity implements JsonSerializable { + /* + * Channel number to which bitstream from a particular participant will be written. + */ + private final Integer channel; + + /* + * The identifier for the participant whose bitstream will be written to the channel represented by the channel + * number. + */ + private final CommunicationIdentifier participant; + + /** + * Constructor + * + * @param channel Either a {@link GroupCallLocator} or {@link ServerCallLocator} for locating the call. + * @param participant Either a {@link GroupCallLocator} or {@link ServerCallLocator} for locating the call. + */ + public ChannelAffinity(Integer channel, CommunicationIdentifier participant) { + this.channel = channel; + this.participant = participant; + } + + /** + * Get the channel property: Channel number to which bitstream from a particular participant will be written. + * + * @return the channel value. + */ + public Integer getChannel() { + return this.channel; + } + + /** + * Get the participant property: The identifier for the participant whose bitstream will be written to the channel + * represented by the channel number. + * + * @return the participant value. + */ + public CommunicationIdentifier getParticipant() { + return this.participant; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeNumberField("channel", channel) + .writeJsonField("participant", CommunicationIdentifierConverter.convert(participant)) + .writeEndObject(); + } + + /** + * Reads an instance of {@link ChannelAffinity} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link ChannelAffinity}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static ChannelAffinity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Integer channel = null; + CommunicationIdentifier participant = null; + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("channel".equals(fieldName)) { + channel = reader.getNullable(JsonReader::getInt); + } else if ("participant".equals(fieldName)) { + participant + = CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(reader)); + } else { + reader.skipChildren(); + } + } + + return new ChannelAffinity(channel, participant); + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CreateCallOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CreateCallOptions.java new file mode 100644 index 000000000000..89522cc81093 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CreateCallOptions.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Fluent; + +import java.util.List; + +/** + * The options for creating a call. + */ +@Fluent +public class CreateCallOptions { + /** + * The source property. + */ + private final CommunicationIdentifier source; + + /** + * The targets of the call. + */ + private final List targets; + + /** + * The call back URI. + */ + private final String callbackUrl; + + /** + * The source caller Id that's shown to the PSTN participant being invited. + * Required only when inviting a PSTN participant. + */ + private String sourceCallerId; + + /** + * The subject + */ + private String subject; + + /** + * Media Streaming Configuration. + */ + private MediaStreamingConfiguration mediaStreamingConfiguration; + + /** + * Constructor + * + * @param source The source property. + * @param targets The targets of the call. + * @param callbackUrl The call back URI. + */ + public CreateCallOptions(CommunicationIdentifier source, List targets, + String callbackUrl) { + this.source = source; + this.targets = targets; + this.callbackUrl = callbackUrl; + } + + /** + * Get the source. + * + * @return the source value. + */ + public CommunicationIdentifier getSource() { + return source; + } + + /** + * Get the targets. + * + * @return the targets list. + */ + public List getTargets() { + return targets; + } + + /** + * Get the call back uri. + * + * @return the call back uri. + */ + public String getCallbackUrl() { + return callbackUrl; + } + + /** + * Get the subject. + * + * @return the subject value. + */ + public String getSubject() { + return subject; + } + + /** + * Get the source caller Id that's shown to the PSTN participant being invited. + * + * @return the sourceCallerId value. + */ + public String getSourceCallerId() { + return sourceCallerId; + } + + /** + * Get the Media Streaming configuration. + * + * @return the mediaStreamingConfiguration. + */ + public MediaStreamingConfiguration getMediaStreamingConfiguration() { + return mediaStreamingConfiguration; + } + + /** + * Set the subject. + * + * @param subject the subject. + * @return the CreateCallOptions object itself. + */ + public CreateCallOptions setSubject(String subject) { + this.subject = subject; + return this; + } + + /** + * Set the sourceCallerId. + * + * @param sourceCallerId The source caller Id that's shown to the PSTN participant being invited. + * Required only when inviting a PSTN participant. + * @return the CreateCallOptions object itself. + */ + public CreateCallOptions setSourceCallerId(String sourceCallerId) { + this.sourceCallerId = sourceCallerId; + return this; + } + + /** + * Set the media streaming configuration. + * + * @param mediaStreamingConfiguration The media streaming configuration. + * @return the CreateCallOptions object itself. + */ + public CreateCallOptions setMediaStreamingConfiguration(MediaStreamingConfiguration mediaStreamingConfiguration) { + this.mediaStreamingConfiguration = mediaStreamingConfiguration; + return this; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CreateCallResult.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CreateCallResult.java new file mode 100644 index 000000000000..fd806737a0ff --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/CreateCallResult.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.CallConnection; +import com.azure.communication.callingserver.CallConnectionAsync; + +/** + * The result of answering a call + */ +public class CreateCallResult extends CallResult { + + /** + * Constructor + * + * @param callConnectionProperties The callConnectionProperties + * @param callConnection The callConnection + * @param callConnectionAsync The callConnectionAsync + */ + public CreateCallResult(CallConnectionProperties callConnectionProperties, CallConnection callConnection, + CallConnectionAsync callConnectionAsync) { + super(callConnectionProperties, callConnection, callConnectionAsync); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/DownloadToFileOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/DownloadToFileOptions.java new file mode 100644 index 000000000000..77e6031ea61d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/DownloadToFileOptions.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Fluent; + +/** + * The options for the downloadTo operations. + */ +@Fluent +public class DownloadToFileOptions { + + /** + * Parallel download options object. + */ + private ParallelDownloadOptions parallelDownloadOptions; + + /** + * Overwrite If file/stream exists + */ + private boolean overwrite; + + /** + * Creates a new instance of {@link DownloadToFileOptions}. + */ + public DownloadToFileOptions() { + } + + /** + * Get the ParallelDownloadOptions + * @return ParallelDownloadOptions + */ + public ParallelDownloadOptions getParallelDownloadOptions() { + return parallelDownloadOptions; + } + + /** + * Overwrite value. + * @return the overwrite value. + */ + public boolean isOverwrite() { + return overwrite; + } + + /** + * Set the parallel download options. + * + * @param parallelDownloadOptions parallel download options. + * @return the DownloadToOptions object itself. + */ + public DownloadToFileOptions setParallelDownloadOptions(ParallelDownloadOptions parallelDownloadOptions) { + this.parallelDownloadOptions = parallelDownloadOptions; + return this; + } + + /** + * Set the overwrite value. + * + * @param overwrite the overwrite value. + * @return the DownloadToOptions object itself. + */ + public DownloadToFileOptions setOverwrite(boolean overwrite) { + this.overwrite = overwrite; + return this; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/DtmfConfigurations.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/DtmfConfigurations.java new file mode 100644 index 000000000000..edfdde1b8d84 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/DtmfConfigurations.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import java.util.Objects; + +/** Options for DTMF recognition. */ +@Fluent +public final class DtmfConfigurations implements JsonSerializable { + /* + * Time to wait between DTMF inputs to stop recognizing. + */ + private Duration interToneTimeoutInSeconds; + + /* + * Maximum number of DTMFs to be collected. + */ + private Integer maxTonesToCollect; + + /* + * List of tones that will stop recognizing. + */ + private List stopTones; + + /** + * Creates a new instance of {@link DtmfConfigurations}. + */ + public DtmfConfigurations() { + } + + /** + * Get the interToneTimeoutInSeconds property: Time to wait between DTMF inputs to stop recognizing. + * + * @return the interToneTimeoutInSeconds value. + */ + public Duration getInterToneTimeoutInSeconds() { + return this.interToneTimeoutInSeconds; + } + + /** + * Set the interToneTimeoutInSeconds property: Time to wait between DTMF inputs to stop recognizing. + * + * @param interToneTimeoutInSeconds the interToneTimeoutInSeconds value to set. + * @return the DtmfConfigurationsInternal object itself. + */ + public DtmfConfigurations setInterToneTimeoutInSeconds(Duration interToneTimeoutInSeconds) { + this.interToneTimeoutInSeconds = interToneTimeoutInSeconds; + return this; + } + + /** + * Get the maxTonesToCollect property: Maximum number of DTMFs to be collected. + * + * @return the maxTonesToCollect value. + */ + public Integer getMaxTonesToCollect() { + return this.maxTonesToCollect; + } + + /** + * Set the maxTonesToCollect property: Maximum number of DTMFs to be collected. + * + * @param maxTonesToCollect the maxTonesToCollect value to set. + * @return the DtmfConfigurationsInternal object itself. + */ + public DtmfConfigurations setMaxTonesToCollect(Integer maxTonesToCollect) { + this.maxTonesToCollect = maxTonesToCollect; + return this; + } + + /** + * Get the stopTones property: List of tones that will stop recognizing. + * + * @return the stopTones value. + */ + public List getStopTones() { + return this.stopTones; + } + + /** + * Set the stopTones property: List of tones that will stop recognizing. + * + * @param stopTones the stopTones value to set. + * @return the DtmfConfigurationsInternal object itself. + */ + public DtmfConfigurations setStopTones(List stopTones) { + this.stopTones = stopTones; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("interToneTimeoutInSeconds", + CoreUtils.durationToStringWithDays(interToneTimeoutInSeconds)) + .writeNumberField("maxTonesToCollect", maxTonesToCollect) + .writeArrayField("stopTones", stopTones, (writer, tone) -> writer.writeString(Objects.toString(tone, null))) + .writeEndObject(); + } + + /** + * Reads an instance of {@link DtmfConfigurations} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link DtmfConfigurations}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static DtmfConfigurations fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DtmfConfigurations configurations = new DtmfConfigurations(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("interToneTimeoutInSeconds".equals(fieldName)) { + configurations.interToneTimeoutInSeconds + = reader.getNullable(nonNull -> Duration.parse(nonNull.getString())); + } else if ("maxTonesToCollect".equals(fieldName)) { + configurations.maxTonesToCollect = reader.getNullable(JsonReader::getInt); + } else if ("stopTones".equals(fieldName)) { + configurations.stopTones = reader.readArray(elem -> StopTones.fromString(elem.getString())); + } else { + reader.skipChildren(); + } + } + + return configurations; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/FileSource.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/FileSource.java new file mode 100644 index 000000000000..88238f646cdf --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/FileSource.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The FileSource model. */ +@Fluent +public final class FileSource extends PlaySource { + /* + * Uri for the audio file to be played + */ + private String uri; + + /** + * Creates a new instance of {@link FileSource}. + */ + public FileSource() { + } + + /** + * Get the uri property: Uri for the audio file to be played. + * + * @return the uri value. + */ + public String getUri() { + return this.uri; + } + + /** + * Set the uri property: Uri for the audio file to be played. + * + * @param uri the uri value to set. + * @return the FileSourceInternal object itself. + */ + public FileSource setUri(String uri) { + this.uri = uri; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("playSourceId", getPlaySourceId()) + .writeStringField("uri", uri) + .writeEndObject(); + } + + /** + * Reads an instance of {@link PlaySource} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link PlaySource}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static PlaySource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FileSource fileSource = new FileSource(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("playSourceId".equals(fieldName)) { + fileSource.setPlaySourceId(reader.getString()); + } else if ("uri".equals(fieldName)) { + fileSource.uri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return fileSource; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/GroupCallLocator.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/GroupCallLocator.java new file mode 100644 index 000000000000..e4466f90ec84 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/GroupCallLocator.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Immutable; + +/** The locator used for joining or taking action on a call. */ +@Immutable +public final class GroupCallLocator extends CallLocator { + /* + * The group call id + */ + private final String groupCallId; + + /** + * Group call locator + * + * @param groupCallId Specify the group call id. + */ + public GroupCallLocator(String groupCallId) { + super(CallLocatorKind.GROUP_CALL_LOCATOR); + this.groupCallId = groupCallId; + } + + /** + * Get the groupCallId property: The group call id. + * + * @return the groupCallId value. + */ + public String getGroupCallId() { + return this.groupCallId; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ListParticipantsResult.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ListParticipantsResult.java new file mode 100644 index 000000000000..ef1ac008d3aa --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ListParticipantsResult.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.accesshelpers.ListParticipantsResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.converters.CallParticipantConverter; +import com.azure.communication.callingserver.implementation.models.GetParticipantsResponseInternal; +import com.azure.core.annotation.Immutable; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** The ListParticipantsResult model. */ +@Immutable +public final class ListParticipantsResult { + /* + * The list of participants in the call. + */ + private final List values; + + static { + ListParticipantsResponseConstructorProxy + .setAccessor(new ListParticipantsResponseConstructorProxy.ListParticipantsResponseConstructorAccessor() { + @Override + public ListParticipantsResult create(GetParticipantsResponseInternal internalHeaders) { + return new ListParticipantsResult(internalHeaders); + } + }); + } + + /** + * Public constructor. + * + */ + public ListParticipantsResult() { + this.values = null; + } + + /** + * Package-private constructor of the class, used internally only. + * + * @param getParticipantsResponseInternal The response from the service. + */ + ListParticipantsResult(GetParticipantsResponseInternal getParticipantsResponseInternal) { + Objects.requireNonNull(getParticipantsResponseInternal, "transferCallResponseInternal must not be null"); + + this.values = getParticipantsResponseInternal.getValues() + .stream() + .map(CallParticipantConverter::convert) + .collect(Collectors.toList()); + } + + /** + * Get the values property: The list of participants in the call. + * + * @return The list of participants in the call. + */ + public List getValues() { + return this.values; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingAudioChannelType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingAudioChannelType.java new file mode 100644 index 000000000000..53bad9b3d2b0 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingAudioChannelType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for MediaStreamingAudioChannelType. */ +public final class MediaStreamingAudioChannelType extends ExpandableStringEnum { + /** Static value mixed for MediaStreamingAudioChannelType. */ + public static final MediaStreamingAudioChannelType MIXED = fromString("mixed"); + + /** Static value unmixed for MediaStreamingAudioChannelType. */ + public static final MediaStreamingAudioChannelType UNMIXED = fromString("unmixed"); + + /** + * Creates an instance of {@link MediaStreamingAudioChannelType} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of + * {@link MediaStreamingAudioChannelType} instead. + */ + @Deprecated + public MediaStreamingAudioChannelType() { + } + + /** + * Creates or finds a MediaStreamingAudioChannelType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MediaStreamingAudioChannelType. + */ + public static MediaStreamingAudioChannelType fromString(String name) { + return fromString(name, MediaStreamingAudioChannelType.class); + } + + /** + * Get the collection of MediaStreamingAudioChannelType values. + * @return known MediaStreamingAudioChannelType values. + */ + public static Collection values() { + return values(MediaStreamingAudioChannelType.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingConfiguration.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingConfiguration.java new file mode 100644 index 000000000000..8bbffce4c034 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingConfiguration.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** The MediaStreamingConfigurationInternal model. */ +@Fluent +public final class MediaStreamingConfiguration implements JsonSerializable { + /* + * Transport URL for media streaming + */ + private final String transportUrl; + + /* + * The type of tranport to be used for media streaming, eg. Websocket + */ + private final MediaStreamingTransportType transportType; + + /* + * Content type to stream, eg. audio, audio/video + */ + private final MediaStreamingContentType contentType; + + /* + * Audio channel type to stream, eg. unmixed audio, mixed audio + */ + private final MediaStreamingAudioChannelType audioChannelType; + + /** + * Creates a new instance of MediaStreamingConfiguration + * @param transportUrl - The Transport URL + * @param transportType - Transport type + * @param contentType - Content Type + * @param audioChannelType - Audio Channel Type + */ + public MediaStreamingConfiguration(String transportUrl, MediaStreamingTransportType transportType, + MediaStreamingContentType contentType, MediaStreamingAudioChannelType audioChannelType) { + this.transportUrl = transportUrl; + this.transportType = transportType; + this.contentType = contentType; + this.audioChannelType = audioChannelType; + } + + /** + * Get the transportUrl property: Transport URL for media streaming. + * + * @return the transportUrl value. + */ + public String getTransportUrl() { + return this.transportUrl; + } + + /** + * Get the transportType property: The type of tranport to be used for media streaming, eg. Websocket. + * + * @return the transportType value. + */ + public MediaStreamingTransportType getTransportType() { + return this.transportType; + } + + /** + * Get the contentType property: Content type to stream, eg. audio, audio/video. + * + * @return the contentType value. + */ + public MediaStreamingContentType getContentType() { + return this.contentType; + } + + /** + * Get the audioChannelType property: Audio channel type to stream, eg. unmixed audio, mixed audio. + * + * @return the audioChannelType value. + */ + public MediaStreamingAudioChannelType getAudioChannelType() { + return this.audioChannelType; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("transportUrl", transportUrl) + .writeStringField("transportType", Objects.toString(transportType, null)) + .writeStringField("contentType", Objects.toString(contentType, null)) + .writeStringField("audioChannelType", Objects.toString(audioChannelType, null)) + .writeEndObject(); + } + + /** + * Reads an instance of {@link MediaStreamingConfiguration} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link MediaStreamingConfiguration}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static MediaStreamingConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String transportUrl = null; + MediaStreamingTransportType transportType = null; + MediaStreamingContentType contentType = null; + MediaStreamingAudioChannelType audioChannelType = null; + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("transportUrl".equals(fieldName)) { + transportUrl = reader.getString(); + } else if ("transportType".equals(fieldName)) { + transportType = MediaStreamingTransportType.fromString(reader.getString()); + } else if ("contentType".equals(fieldName)) { + contentType = MediaStreamingContentType.fromString(reader.getString()); + } else if ("audioChannelType".equals(fieldName)) { + audioChannelType = MediaStreamingAudioChannelType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return new MediaStreamingConfiguration(transportUrl, transportType, contentType, audioChannelType); + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingContentType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingContentType.java new file mode 100644 index 000000000000..e0c8ef8d702f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingContentType.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.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for MediaStreamingContentType. */ +public final class MediaStreamingContentType extends ExpandableStringEnum { + /** Static value audio for MediaStreamingContentType. */ + public static final MediaStreamingContentType AUDIO = fromString("audio"); + + /** + * Creates an instance of {@link MediaStreamingContentType} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link MediaStreamingContentType} + * instead. + */ + @Deprecated + public MediaStreamingContentType() { + } + + /** + * Creates or finds a MediaStreamingContentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MediaStreamingContentType. + */ + public static MediaStreamingContentType fromString(String name) { + return fromString(name, MediaStreamingContentType.class); + } + + /** + * Get the collection of MediaStreamingContentType values. + * @return known MediaStreamingContentType values. + */ + public static Collection values() { + return values(MediaStreamingContentType.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingTransportType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingTransportType.java new file mode 100644 index 000000000000..6af7e0d8440a --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/MediaStreamingTransportType.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.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for MediaStreamingTransportType. */ +public final class MediaStreamingTransportType extends ExpandableStringEnum { + /** Static value websocket for MediaStreamingTransportType. */ + public static final MediaStreamingTransportType WEBSOCKET = fromString("websocket"); + + /** + * Creates an instance of {@link MediaStreamingTransportType} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link MediaStreamingTransportType} + * instead. + */ + @Deprecated + public MediaStreamingTransportType() { + } + + /** + * Creates or finds a MediaStreamingTransportType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MediaStreamingTransportType. + */ + public static MediaStreamingTransportType fromString(String name) { + return fromString(name, MediaStreamingTransportType.class); + } + + /** + * Get the collection of MediaStreamingTransportType values. + * @return known MediaStreamingTransportType values. + */ + public static Collection values() { + return values(MediaStreamingTransportType.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ParallelDownloadOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ParallelDownloadOptions.java new file mode 100644 index 000000000000..bac92c36a6d2 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ParallelDownloadOptions.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.Constants.ContentDownloader; +import com.azure.core.annotation.Fluent; +import com.azure.core.util.ProgressListener; + +import java.util.Locale; + +/** + * This class contains configuration used to parallelize data transfer operations. Note that not all values are used + * by every method which accepts this type. Please refer to the javadoc on specific methods for these cases. + */ +@Fluent +public final class ParallelDownloadOptions { + private static final String PARAMETER_NOT_IN_RANGE = "The value of the parameter '%s' should be between %s and %s."; + + private long blockSize; + private int maxConcurrency; + private ProgressListener progressListener; + + /** + * Creates a new {@link ParallelDownloadOptions} with default parameters applied. + */ + public ParallelDownloadOptions() { + maxConcurrency = 1; + blockSize = ContentDownloader.DEFAULT_BUFFER_SIZE; + } + + /** + * Gets the block size (chunk size) to transfer at a time. + * @return The block size. + */ + public Long getBlockSize() { + return blockSize; + } + + /** + * Sets the block size. + * The block size is the size of each data chunk returned from the service. + * For both applications, If block size is large, download will make fewer network calls, but each + * individual call will receive more data and will therefore take longer. + * + * @param blockSize The block size. + * @return The ParallelDownloadOptions object itself. + */ + public ParallelDownloadOptions setBlockSize(long blockSize) { + assertInBounds("blockSize", blockSize, 1, Long.MAX_VALUE); + this.blockSize = blockSize; + return this; + } + + /** + * Gets the Progress listener for parallel reporting + * @return The progress listener + */ + public ProgressListener getProgressListener() { + return progressListener; + } + + /** + * Sets the {@link ProgressListener}. + * + * @param progressListener The {@link ProgressListener}. + * @return The ParallelDownloadOptions object itself. + */ + public ParallelDownloadOptions setProgressReceiver(ProgressListener progressListener) { + this.progressListener = progressListener; + return this; + } + + /** + * Gets the maximum number of parallel requests that will be issued at any given time. + * @return The max concurrency value. + */ + public int getMaxConcurrency() { + return maxConcurrency; + } + + /** + * Sets the maximum number of parallel requests that will be issued at any given time. + * + * @param maxConcurrency The maximum number of parallel requests that will be issued at any given time as a part of + * a single parallel transfer. This value applies per api. For example, if two calls to downloadTo are made at + * the same time, and each specifies a maxConcurrency of 5, there may be up to 10 outstanding, concurrent requests, + * up to 5 for each of the upload operations. + * The amount of memory consumed by methods which buffer may be up to blockSize * maxConcurrency. + * @return The ParallelDownloadOptions object itself. + */ + public ParallelDownloadOptions setMaxConcurrency(int maxConcurrency) { + assertInBounds("numBuffers", maxConcurrency, 1, Integer.MAX_VALUE); + this.maxConcurrency = maxConcurrency; + return this; + } + + /** + * Asserts that the specified number is in the valid range. The range is inclusive. + * + * @param param Name of the parameter + * @param value Value of the parameter + * @param min The minimum allowed value + * @param max The maximum allowed value + * @throws IllegalArgumentException If {@code value} is less than {@code min} or {@code value} is greater than + * {@code max}. + */ + static void assertInBounds(final String param, final long value, final long min, final long max) { + if (value < min || value > max) { + throw new IllegalArgumentException(String.format(Locale.ROOT, PARAMETER_NOT_IN_RANGE, param, min, max)); + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlayOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlayOptions.java new file mode 100644 index 000000000000..c978131fd92f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlayOptions.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Fluent; + +/** The PlayOptionsInternal model. */ +@Fluent +public final class PlayOptions { + /* + * The option to play the provided audio source in loop when set to true + */ + private boolean loop; + + /* + * The operation context + */ + private String operationContext; + + /** + * Creates a new instance of {@link PlayOptions}. + */ + public PlayOptions() { + } + + /** + * Get the loop property: The option to play the provided audio source in loop when set to true. + * + * @return the loop value. + */ + public boolean isLoop() { + return this.loop; + } + + /** + * Get the operationContext property. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the loop property: The option to play the provided audio source in loop when set to true. + * + * @param loop the loop value to set. + * @return the PlayOptionsInternal object itself. + */ + public PlayOptions setLoop(boolean loop) { + this.loop = loop; + return this; + } + + /** + * Set the operationContext property. + * + * @param operationContext the operationContext value to set. + * @return the PlayOptionsInternal object itself. + */ + public PlayOptions setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlaySource.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlaySource.java new file mode 100644 index 000000000000..02cfa7d0cb2b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlaySource.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The PlaySource model. */ +@Fluent +public abstract class PlaySource implements JsonSerializable { + /* + * Defines the identifier to be used for caching related media + */ + private String playSourceId; + + /** + * Creates a new instance of {@link PlaySource}. + */ + public PlaySource() { + } + + /** + * Get the playSourceId property: Defines the identifier to be used for caching related media. + * + * @return the playSourceId value. + */ + public String getPlaySourceId() { + return this.playSourceId; + } + + /** + * Set the playSourceId property: Defines the identifier to be used for caching related media. + * + * @param playSourceId the playSourceId value to set. + * @return the PlaySourceInternal object itself. + */ + public PlaySource setPlaySourceId(String playSourceId) { + this.playSourceId = playSourceId; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeStringField("playSourceId", playSourceId).writeEndObject(); + } + + /** + * Reads an instance of {@link PlaySource} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link PlaySource}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static PlaySource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String playSourceId = null; + boolean uriFound = false; + String uri = null; + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("playSourceId".equals(fieldName)) { + playSourceId = reader.getString(); + } else if ("uri".equals(fieldName)) { + uriFound = true; + uri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + PlaySource playSource = uriFound ? new FileSource().setUri(uri) : new PlaySource() { + }; + playSource.setPlaySourceId(playSourceId); + return playSource; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlaySourceType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlaySourceType.java new file mode 100644 index 000000000000..937b83158c1f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/PlaySourceType.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for PlaySourceType. */ +public final class PlaySourceType extends ExpandableStringEnum { + /** Static value file for PlaySourceType. */ + public static final PlaySourceType FILE = fromString("file"); + + /** + * Creates an instance of {@link PlaySourceType} with no string value. + * + * @deprecated Please use {@link #fromString(String)} to create an instance of PlaySourceType. + */ + @Deprecated + public PlaySourceType() { + } + + /** + * Creates or finds a PlaySourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PlaySourceType. + */ + public static PlaySourceType fromString(String name) { + return fromString(name, PlaySourceType.class); + } + + /** + * Get the collection of PlaySourceType values. + * @return known PlaySourceType values. + */ + public static Collection values() { + return values(PlaySourceType.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeConfigurations.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeConfigurations.java new file mode 100644 index 000000000000..127a84620904 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeConfigurations.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.Duration; + +/** The RecognizeConfigurations model. */ +@Fluent +public final class RecognizeConfigurations implements JsonSerializable { + /* + * Determines if we interrupt the prompt and start recognizing. + */ + private Boolean interruptPromptAndStartRecognition; + + /* + * Time to wait for first input after prompt (if any). + */ + private Duration initialSilenceTimeoutInSeconds; + + /* + * Target participant of DTFM tone recognition. + */ + private CommunicationIdentifier targetParticipant; + + /* + * Defines configurations for DTMF. + */ + private DtmfConfigurations dtmfConfigurations; + + /** + * Creates a new instance of {@link RecognizeConfigurations}. + */ + public RecognizeConfigurations() { + } + + /** + * Get the interruptPromptAndStartRecognition property: Determines if we interrupt the prompt and start recognizing. + * + * @return the interruptPromptAndStartRecognition value. + */ + public Boolean isInterruptPromptAndStartRecognition() { + return this.interruptPromptAndStartRecognition; + } + + /** + * Set the interruptPromptAndStartRecognition property: Determines if we interrupt the prompt and start recognizing. + * + * @param interruptPromptAndStartRecognition the interruptPromptAndStartRecognition value to set. + * @return the RecognizeConfigurations object itself. + */ + public RecognizeConfigurations setInterruptPromptAndStartRecognition(Boolean interruptPromptAndStartRecognition) { + this.interruptPromptAndStartRecognition = interruptPromptAndStartRecognition; + return this; + } + + /** + * Get the initialSilenceTimeoutInSeconds property: Time to wait for first input after prompt (if any). + * + * @return the initialSilenceTimeoutInSeconds value. + */ + public Duration getInitialSilenceTimeoutInSeconds() { + return this.initialSilenceTimeoutInSeconds; + } + + /** + * Set the initialSilenceTimeoutInSeconds property: Time to wait for first input after prompt (if any). + * + * @param initialSilenceTimeoutInSeconds the initialSilenceTimeoutInSeconds value to set. + * @return the RecognizeConfigurations object itself. + */ + public RecognizeConfigurations setInitialSilenceTimeoutInSeconds(Duration initialSilenceTimeoutInSeconds) { + this.initialSilenceTimeoutInSeconds = initialSilenceTimeoutInSeconds; + return this; + } + + /** + * Get the targetParticipant property: Target participant of DTFM tone recognition. + * + * @return the targetParticipant value. + */ + public CommunicationIdentifier getTargetParticipant() { + return this.targetParticipant; + } + + /** + * Set the targetParticipant property: Target participant of DTFM tone recognition. + * + * @param targetParticipant the targetParticipant value to set. + * @return the RecognizeConfigurations object itself. + */ + public RecognizeConfigurations setTargetParticipant(CommunicationIdentifier targetParticipant) { + this.targetParticipant = targetParticipant; + return this; + } + + /** + * Get the dtmfConfigurations property: Defines configurations for DTMF. + * + * @return the dtmfConfigurations value. + */ + public DtmfConfigurations getDtmfConfigurations() { + return this.dtmfConfigurations; + } + + /** + * Set the dtmfConfigurations property: Defines configurations for DTMF. + * + * @param dtmfConfigurations the dtmfConfigurations value to set. + * @return the RecognizeConfigurations object itself. + */ + public RecognizeConfigurations setDtmfConfigurations(DtmfConfigurations dtmfConfigurations) { + this.dtmfConfigurations = dtmfConfigurations; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeBooleanField("interruptPromptAndStartRecognition", interruptPromptAndStartRecognition) + .writeStringField("initialSilenceTimeoutInSeconds", + CoreUtils.durationToStringWithDays(initialSilenceTimeoutInSeconds)) + .writeJsonField("targetParticipant", CommunicationIdentifierConverter.convert(targetParticipant)) + .writeJsonField("dtmfConfigurations", dtmfConfigurations) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RecognizeConfigurations} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RecognizeConfigurations}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RecognizeConfigurations fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecognizeConfigurations configurations = new RecognizeConfigurations(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("interruptPromptAndStartRecognition".equals(fieldName)) { + configurations.interruptPromptAndStartRecognition = reader.getNullable(JsonReader::getBoolean); + } else if ("initialSilenceTimeoutInSeconds".equals(fieldName)) { + configurations.initialSilenceTimeoutInSeconds + = reader.getNullable(nonNull -> Duration.parse(nonNull.getString())); + } else if ("targetParticipant".equals(fieldName)) { + configurations.targetParticipant + = CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(reader)); + } else if ("dtmfConfigurations".equals(fieldName)) { + configurations.dtmfConfigurations = DtmfConfigurations.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return configurations; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeInputType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeInputType.java new file mode 100644 index 000000000000..5ffa0ebe37cd --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeInputType.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for RecognizeInputTypeInternal. */ +public final class RecognizeInputType extends ExpandableStringEnum { + /** Static value dtmf for RecognizeInputTypeInternal. */ + public static final RecognizeInputType DTMF = fromString("dtmf"); + + /** + * Creates an instance of {@link RecognizeInputType} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link RecognizeInputType} instead. + */ + @Deprecated + public RecognizeInputType() { + } + + /** + * Creates or finds a RecognizeInputTypeInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecognizeInputTypeInternal. + */ + public static RecognizeInputType fromString(String name) { + return fromString(name, RecognizeInputType.class); + } + + /** + * Get the collection of RecognizeInputTypeInternal values. + * @return known RecognizeInputTypeInternal values. + */ + public static Collection values() { + return values(RecognizeInputType.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeOptions.java new file mode 100644 index 000000000000..cc24b3401fa6 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecognizeOptions.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** Options to configure the Recognize operation **/ +public class RecognizeOptions implements JsonSerializable { + /* + * Determines the type of the recognition. + */ + private RecognizeInputType recognizeInputType; + + /* + * The source of the audio to be played for recognition. + */ + private PlaySource playPrompt; + + /* + * If set recognize can barge into other existing + * queued-up/currently-processing requests. + */ + private Boolean stopCurrentOperations; + + /* + * Defines options for recognition. + */ + private RecognizeConfigurations recognizeConfiguration; + + /* + * The value to identify context of the operation. + */ + private String operationContext; + + /** + * Initializes a RecognizeOptions object. + * @param recognizeInputType What input the operation should recognize. + * @param recognizeConfigurations Configurations for the recognize operations. + */ + public RecognizeOptions(RecognizeInputType recognizeInputType, RecognizeConfigurations recognizeConfigurations) { + this.recognizeInputType = recognizeInputType; + this.recognizeConfiguration = recognizeConfigurations; + } + + /** + * Get the recognizeInputType property: Determines the type of the recognition. + * + * @return the recognizeInputType value. + */ + public RecognizeInputType getRecognizeInputType() { + return this.recognizeInputType; + } + + /** + * Set the recognizeInputType property: Determines the type of the recognition. + * + * @param recognizeInputType the recognizeInputType value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeOptions setRecognizeInputType(RecognizeInputType recognizeInputType) { + this.recognizeInputType = recognizeInputType; + return this; + } + + /** + * Get the playPrompt property: The source of the audio to be played for recognition. + * + * @return the playPrompt value. + */ + public PlaySource getPlayPrompt() { + return this.playPrompt; + } + + /** + * Set the playPrompt property: The source of the audio to be played for recognition. + * + * @param playPrompt the playPrompt value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeOptions setPlayPrompt(PlaySource playPrompt) { + this.playPrompt = playPrompt; + return this; + } + + /** + * Get the stopCurrentOperations property: If set recognize can barge into other existing + * queued-up/currently-processing requests. + * + * @return the stopCurrentOperations value. + */ + public Boolean isStopCurrentOperations() { + return this.stopCurrentOperations; + } + + /** + * Set the stopCurrentOperations property: If set recognize can barge into other existing + * queued-up/currently-processing requests. + * + * @param stopCurrentOperations the stopCurrentOperations value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeOptions setStopCurrentOperations(Boolean stopCurrentOperations) { + this.stopCurrentOperations = stopCurrentOperations; + return this; + } + + /** + * Get the recognizeConfiguration property: Defines options for recognition. + * + * @return the recognizeConfiguration value. + */ + public RecognizeConfigurations getRecognizeConfiguration() { + return this.recognizeConfiguration; + } + + /** + * Set the recognizeConfiguration property: Defines options for recognition. + * + * @param recognizeConfiguration the recognizeConfiguration value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeOptions setRecognizeConfiguration(RecognizeConfigurations recognizeConfiguration) { + this.recognizeConfiguration = recognizeConfiguration; + return this; + } + + /** + * Get the operationContext property: The value to identify context of the operation. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Set the operationContext property: The value to identify context of the operation. + * + * @param operationContext the operationContext value to set. + * @return the RecognizeRequest object itself. + */ + public RecognizeOptions setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("recognizeInputType", Objects.toString(recognizeInputType, null)) + .writeJsonField("playPrompt", playPrompt) + .writeBooleanField("stopCurrentOperations", stopCurrentOperations) + .writeJsonField("recognizeConfiguration", recognizeConfiguration) + .writeStringField("operationContext", operationContext) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RecognizeOptions} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RecognizeOptions}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RecognizeOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecognizeInputType recognizeInputType = null; + PlaySource playPrompt = null; + Boolean stopCurrentOperations = null; + RecognizeConfigurations recognizeConfiguration = null; + String operationContext = null; + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recognizeInputType".equals(fieldName)) { + recognizeInputType = RecognizeInputType.fromString(reader.getString()); + } else if ("playPrompt".equals(fieldName)) { + playPrompt = PlaySource.fromJson(reader); + } else if ("stopCurrentOperations".equals(fieldName)) { + stopCurrentOperations = reader.getNullable(JsonReader::getBoolean); + } else if ("recognizeConfiguration".equals(fieldName)) { + recognizeConfiguration = RecognizeConfigurations.fromJson(reader); + } else if ("operationContext".equals(fieldName)) { + operationContext = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return new RecognizeOptions(recognizeInputType, recognizeConfiguration).setPlayPrompt(playPrompt) + .setStopCurrentOperations(stopCurrentOperations) + .setOperationContext(operationContext); + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannel.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannel.java new file mode 100644 index 000000000000..2f4caec881f8 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannel.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** Defines values for RecordingChannel. */ +public final class RecordingChannel extends ExpandableStringEnum { + /** Static value mixed for RecordingChannel. */ + public static final RecordingChannel MIXED = fromString("mixed"); + + /** Static value unmixed for RecordingChannel. */ + public static final RecordingChannel UNMIXED = fromString("unmixed"); + + /** + * Creates an instance of {@link RecordingChannel} with no string value. + * + * @deprecated Please use {@link #fromString(String)} to create an instance of RecordingChannel. + */ + @Deprecated + public RecordingChannel() { + } + + /** + * Creates or finds a RecordingChannel from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecordingChannel. + */ + public static RecordingChannel fromString(String name) { + return fromString(name, RecordingChannel.class); + } + + /** + * Get the collection of RecordingChannel values. + * @return known RecordingChannel values. + */ + public static Collection values() { + return values(RecordingChannel.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContent.java new file mode 100644 index 000000000000..21fdf9c0ba9b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContent.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** Defines values for RecordingContent. */ +public final class RecordingContent extends ExpandableStringEnum { + /** Static value audio for RecordingContent. */ + public static final RecordingContent AUDIO = fromString("audio"); + + /** Static value audioVideo for RecordingContent. */ + public static final RecordingContent AUDIO_VIDEO = fromString("audioVideo"); + + /** + * Creates an instance of {@link RecordingContent} with no string value. + * + * @deprecated Please use {@link #fromString(String)} to create an instance of RecordingContent. + */ + @Deprecated + public RecordingContent() { + } + + /** + * Creates or finds a RecordingContent from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecordingContent. + */ + public static RecordingContent fromString(String name) { + return fromString(name, RecordingContent.class); + } + + /** + * Get the collection of RecordingContent values. + * @return known RecordingContent values. + */ + public static Collection values() { + return values(RecordingContent.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormat.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormat.java new file mode 100644 index 000000000000..57f9f1831c88 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormat.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** Defines values for RecordingFormat. */ +public final class RecordingFormat extends ExpandableStringEnum { + /** Static value wav for RecordingFormat. */ + public static final RecordingFormat WAV = fromString("wav"); + + /** Static value mp3 for RecordingFormat. */ + public static final RecordingFormat MP3 = fromString("mp3"); + + /** Static value mp4 for RecordingFormat. */ + public static final RecordingFormat MP4 = fromString("mp4"); + + /** + * Creates an instance of {@link RecordingFormat} with no string value. + * + * @deprecated Please use {@link #fromString(String)} to create an instance of RecordingFormat. + */ + @Deprecated + public RecordingFormat() { + } + + /** + * Creates or finds a RecordingFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecordingFormat. + */ + public static RecordingFormat fromString(String name) { + return fromString(name, RecordingFormat.class); + } + + /** + * Get the collection of RecordingFormat values. + * @return known RecordingFormat values. + */ + public static Collection values() { + return values(RecordingFormat.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingState.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingState.java new file mode 100644 index 000000000000..eb985a597f97 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingState.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** Defines values for RecordingStateInternal. */ +public final class RecordingState extends ExpandableStringEnum { + /** Static value active for RecordingStateInternal. */ + public static final RecordingState ACTIVE = fromString("active"); + + /** Static value inactive for RecordingStateInternal. */ + public static final RecordingState INACTIVE = fromString("inactive"); + + /** + * Creates an instance of {@link RecordingState} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link RecordingState} instead. + */ + @Deprecated + public RecordingState() { + } + + /** + * Creates or finds a RecordingStateInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecordingStateInternal. + */ + public static RecordingState fromString(String name) { + return fromString(name, RecordingState.class); + } + + /** + * Get the collection of RecordingStateInternal values. + * @return known RecordingStateInternal values. + */ + public static Collection values() { + return values(RecordingState.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingStateResult.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingStateResult.java new file mode 100644 index 000000000000..2aa33be8e522 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingStateResult.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.accesshelpers.RecordingStateResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.models.RecordingStateResponseInternal; +import com.azure.core.annotation.Immutable; + +/** The response payload of start call recording operation. */ +@Immutable +public final class RecordingStateResult { + static { + RecordingStateResponseConstructorProxy.setAccessor(RecordingStateResult::new); + } + /* + * The recording id of the started recording + */ + private final String recordingId; + + private final RecordingState recordingState; + + /** + * Get the recordingId property: The recording id of the started recording. + * + * @return the recordingId value. + */ + public String getRecordingId() { + return this.recordingId; + } + + /** + * Get the RecordingState property: The recording status of the recording. + * + * @return the recordingState value. + */ + public RecordingState getRecordingState() { + return this.recordingState; + } + + /** + * Public constructor. + * + */ + public RecordingStateResult() { + this.recordingId = null; + this.recordingState = null; + } + + /** + * Package-private constructor of the class, used internally only. + * + * @param recordingStateResponseInternal The response from the service + */ + RecordingStateResult(RecordingStateResponseInternal recordingStateResponseInternal) { + this.recordingId = recordingStateResponseInternal.getRecordingId(); + this.recordingState = RecordingState.fromString(recordingStateResponseInternal.getRecordingState().toString()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RemoveParticipantsResult.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RemoveParticipantsResult.java new file mode 100644 index 000000000000..7630191dcf47 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RemoveParticipantsResult.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.accesshelpers.RemoveParticipantsResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.models.RemoveParticipantsResponseInternal; +import com.azure.core.annotation.Immutable; + +import java.util.Objects; + +/** The RemoveParticipantsResult model. */ +@Immutable +public final class RemoveParticipantsResult { + /* + * The operation context provided by client. + */ + private final String operationContext; + + static { + RemoveParticipantsResponseConstructorProxy.setAccessor( + new RemoveParticipantsResponseConstructorProxy.RemoveParticipantsResponseConstructorAccessor() { + @Override + public RemoveParticipantsResult create(RemoveParticipantsResponseInternal internalHeaders) { + return new RemoveParticipantsResult(internalHeaders); + } + }); + } + + /** + * Public constructor. + * + */ + public RemoveParticipantsResult() { + this.operationContext = null; + } + + /** + * Package-private constructor of the class, used internally only. + * + * @param removeParticipantsResponseInternal The response from the service + */ + RemoveParticipantsResult(RemoveParticipantsResponseInternal removeParticipantsResponseInternal) { + Objects.requireNonNull(removeParticipantsResponseInternal, + "removeParticipantsResponseInternal must not be null"); + + this.operationContext = removeParticipantsResponseInternal.getOperationContext(); + } + + /** + * Get the operationContext property: The operation context provided by client. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ServerCallLocator.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ServerCallLocator.java new file mode 100644 index 000000000000..729ed4823927 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ServerCallLocator.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Immutable; + +/** The locator used for joining or taking action on a call. */ +@Immutable +public final class ServerCallLocator extends CallLocator { + /* + * The server call id + */ + private final String serverCallId; + + /** + * Group call locator + * + * @param serverCallId Specify the group call id. + */ + public ServerCallLocator(String serverCallId) { + super(CallLocatorKind.SERVER_CALL_LOCATOR); + this.serverCallId = serverCallId; + } + + /** + * Get the serverCallId property: The server call id. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StartRecordingOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StartRecordingOptions.java new file mode 100644 index 000000000000..b4c4babf6442 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StartRecordingOptions.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.annotation.Fluent; + +import java.util.List; +import java.util.Objects; + +/** + * The options for creating a call. + */ +@Fluent +public class StartRecordingOptions { + /** + * Either a {@link GroupCallLocator} or {@link ServerCallLocator} for locating the call. + */ + private final CallLocator callLocator; + + private String recordingStateCallbackUrl; + + private RecordingChannel recordingChannel; + + private RecordingContent recordingContent; + + private RecordingFormat recordingFormat; + + private List channelAffinity; + + /** + * Constructor + * + * @param callLocator Either a {@link GroupCallLocator} or {@link ServerCallLocator} for locating the call. + */ + public StartRecordingOptions(CallLocator callLocator) { + Objects.requireNonNull(callLocator, "'callLocator' cannot be null."); + + this.callLocator = callLocator; + } + + /** + * Get the call locator. + * + * @return the call locator. + */ + public CallLocator getCallLocator() { + return this.callLocator; + } + + /** + * Uri to send state change callbacks. + * + * @return url to send state change callbacks. + */ + public String getRecordingStateCallbackUrl() { + return recordingStateCallbackUrl; + } + + /** + * Set the recordingStateCallbackUrl + * + * @param recordingStateCallbackUrl to send state change callbacks. + * @return the {@link StartRecordingOptions} + */ + public StartRecordingOptions setRecordingStateCallbackUrl(String recordingStateCallbackUrl) { + this.recordingStateCallbackUrl = recordingStateCallbackUrl; + return this; + } + + /** + * Get the channel property. + * + * @return the channel property. + */ + public RecordingChannel getRecordingChannel() { + return recordingChannel; + } + + /** + * Set the channel property. + * + * @param recordingChannel the {@link RecordingChannel}. + * @return the {@link StartRecordingOptions} + */ + public StartRecordingOptions setRecordingChannel(RecordingChannel recordingChannel) { + this.recordingChannel = recordingChannel; + return this; + } + + /** + * Get the content property. + * + * @return the content property. + */ + public RecordingContent getRecordingContent() { + return recordingContent; + } + + /** + * Set the content property. + * + * @param recordingContent the {@link RecordingContent}. + * @return the {@link StartRecordingOptions} + */ + public StartRecordingOptions setRecordingContent(RecordingContent recordingContent) { + this.recordingContent = recordingContent; + return this; + } + + /** + * Get the recording format. + * + * @return the recording format. + */ + public RecordingFormat getRecordingFormat() { + return recordingFormat; + } + + /** + * Set the recording format property. + * + * @param recordingFormat the {@link RecordingFormat}. + * @return the {@link StartRecordingOptions} + */ + public StartRecordingOptions setRecordingFormat(RecordingFormat recordingFormat) { + this.recordingFormat = recordingFormat; + return this; + } + + /** + * Get the channel affinity. + * + * @return the channel affinity. + */ + public List getChannelAffinity() { + return channelAffinity; + } + + /** + * Sets the channel affinity. + * + * @param channelAffinity the list of {@link ChannelAffinity}. + * @return the {@link StartRecordingOptions} + */ + public StartRecordingOptions setChannelAffinity(List channelAffinity) { + this.channelAffinity = channelAffinity; + return this; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StopTones.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StopTones.java new file mode 100644 index 000000000000..fd5a6b7af710 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StopTones.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for StopTones. */ +public final class StopTones extends ExpandableStringEnum { + /** Static value zero for StopTones. */ + public static final StopTones ZERO = fromString("zero"); + + /** Static value one for StopTones. */ + public static final StopTones ONE = fromString("one"); + + /** Static value two for StopTones. */ + public static final StopTones TWO = fromString("two"); + + /** Static value three for StopTones. */ + public static final StopTones THREE = fromString("three"); + + /** Static value four for StopTones. */ + public static final StopTones FOUR = fromString("four"); + + /** Static value five for StopTones. */ + public static final StopTones FIVE = fromString("five"); + + /** Static value six for StopTones. */ + public static final StopTones SIX = fromString("six"); + + /** Static value seven for StopTones. */ + public static final StopTones SEVEN = fromString("seven"); + + /** Static value eight for StopTones. */ + public static final StopTones EIGHT = fromString("eight"); + + /** Static value nine for StopTones. */ + public static final StopTones NINE = fromString("nine"); + + /** Static value a for StopTones. */ + public static final StopTones A = fromString("a"); + + /** Static value b for StopTones. */ + public static final StopTones B = fromString("b"); + + /** Static value c for StopTones. */ + public static final StopTones C = fromString("c"); + + /** Static value d for StopTones. */ + public static final StopTones D = fromString("d"); + + /** Static value pound for StopTones. */ + public static final StopTones POUND = fromString("pound"); + + /** Static value asterisk for StopTones. */ + public static final StopTones ASTERISK = fromString("asterisk"); + + /** + * Creates an instance of {@link StopTones} with no string value. + * + * @deprecated Use {@link #fromString(String)} to create or get an instance of {@link StopTones} instead. + */ + @Deprecated + public StopTones() { + } + + /** + * Creates or finds a StopTones from its string representation. + * + * @param name a name to look for. + * @return the corresponding StopTones. + */ + public static StopTones fromString(String name) { + return fromString(name, StopTones.class); + } + + /** + * Get the collection of StopTones values. + * @return known StopTones values. + */ + public static Collection values() { + return values(StopTones.class); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/TransferCallResult.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/TransferCallResult.java new file mode 100644 index 000000000000..9ab3c6b6fab2 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/TransferCallResult.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.callingserver.implementation.accesshelpers.TransferCallResponseConstructorProxy; +import com.azure.communication.callingserver.implementation.models.TransferCallResponseInternal; +import com.azure.core.annotation.Immutable; + +import java.util.Objects; + +/** The TransferCallResult model. */ +@Immutable +public final class TransferCallResult { + /* + * The operation context provided by client. + */ + private final String operationContext; + + static { + TransferCallResponseConstructorProxy + .setAccessor(new TransferCallResponseConstructorProxy.TransferCallResponseConstructorAccessor() { + @Override + public TransferCallResult create(TransferCallResponseInternal internalHeaders) { + return new TransferCallResult(internalHeaders); + } + }); + } + + /** + * Public constructor. + * + */ + public TransferCallResult() { + this.operationContext = null; + } + + /** + * Package-private constructor of the class, used internally only. + * + * @param transferCallResponseInternal The response from the service. + */ + TransferCallResult(TransferCallResponseInternal transferCallResponseInternal) { + Objects.requireNonNull(transferCallResponseInternal, "transferCallResponseInternal must not be null"); + + this.operationContext = transferCallResponseInternal.getOperationContext(); + } + + /** + * Get the operationContext property: The operation context provided by client. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/TransferToParticipantCallOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/TransferToParticipantCallOptions.java new file mode 100644 index 000000000000..68f314b36a0e --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/TransferToParticipantCallOptions.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models; + +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.communication.common.PhoneNumberIdentifier; +import com.azure.core.annotation.Fluent; + +/** + * The options for adding participants. + */ +@Fluent +public class TransferToParticipantCallOptions { + /** + * A {@link CommunicationIdentifier} representing the target participant of this transfer. + */ + private final CommunicationIdentifier targetParticipant; + + /** + * The operational context + */ + private String operationContext; + + /** + * A {@link PhoneNumberIdentifier} representing the caller ID of the transferee, if transferring to a pstn number. + */ + private PhoneNumberIdentifier transfereeCallerId; + + /** + * The user to user information. + */ + private String userToUserInformation; + + /** + * Constructor + * + * @param targetParticipant A {@link CommunicationIdentifier} representing the target participant of this transfer. + */ + public TransferToParticipantCallOptions(CommunicationIdentifier targetParticipant) { + this.targetParticipant = targetParticipant; + } + + /** + * Get the target participant. + * + * @return the target participant. + */ + public CommunicationIdentifier getTargetParticipant() { + return targetParticipant; + } + + /** + * Get the operationContext. + * + * @return the operationContext + */ + public String getOperationContext() { + return operationContext; + } + + /** + * Get the transfereeCallerId. + * + * @return the transfereeCallerId. + */ + public PhoneNumberIdentifier getTransfereeCallerId() { + return transfereeCallerId; + } + + /** + * Get the userToUserInformation. + * + * @return the userToUserInformation + */ + public String getUserToUserInformation() { + return userToUserInformation; + } + + /** + * Set the operationContext. + * + * @param operationContext the operationContext to set + * @return the TransferToParticipantCallOptions object itself. + */ + public TransferToParticipantCallOptions setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + /** + * Set the transfereeCallerId. + * + * @param transfereeCallerId A {@link PhoneNumberIdentifier} representing the caller ID of the transferee + * if transferring to a pstn number. + * @return the TransferToParticipantCallOptions object itself. + */ + public TransferToParticipantCallOptions setSourceCallerId(PhoneNumberIdentifier transfereeCallerId) { + this.transfereeCallerId = transfereeCallerId; + return this; + } + + /** + * Set the invitationTimeoutInSeconds. + * + * @param userToUserInformation The user to user information. + * @return the TransferToParticipantCallOptions object itself. + */ + public TransferToParticipantCallOptions setUserToUserInformation(String userToUserInformation) { + this.userToUserInformation = userToUserInformation; + return this; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/AddParticipantsFailedEvent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/AddParticipantsFailedEvent.java new file mode 100644 index 000000000000..2c143a46960f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/AddParticipantsFailedEvent.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callingserver.models.events; + +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The AddParticipantsFailedEvent model. */ +@Immutable +public final class AddParticipantsFailedEvent extends CallAutomationEventBase { + /* + * Operation context + */ + private String operationContext; + + /* + * The resultInfo property. + */ + private ResultInfo resultInfo; + + /* + * Participants failed to be added + */ + private List participants; + + private AddParticipantsFailedEvent() { + } + + /** + * Get the operationContext property: Operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInfo property: The resultInfo property. + * + * @return the resultInfo value. + */ + public ResultInfo getResultInfo() { + return this.resultInfo; + } + + /** + * Get the participants property: Participants failed to be added. + * + * @return the participants value. + */ + public List getParticipants() { + return this.participants; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeStringField("operationContext", operationContext) + .writeJsonField("resultInfo", resultInfo) + .writeEndObject(); + } + + /** + * Reads an instance of {@link AddParticipantsFailedEvent} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link AddParticipantsFailedEvent}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static AddParticipantsFailedEvent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddParticipantsFailedEvent event = new AddParticipantsFailedEvent(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (fromJsonShared(event, fieldName, reader)) { + continue; + } + + if ("operationContext".equals(fieldName)) { + event.operationContext = reader.getString(); + } else if ("resultInfo".equals(fieldName)) { + event.resultInfo = ResultInfo.fromJson(reader); + } else if ("participants".equals(fieldName)) { + event.participants = reader.readArray( + r -> CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(r))); + } else { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/AddParticipantsSucceededEvent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/AddParticipantsSucceededEvent.java new file mode 100644 index 000000000000..46e142132837 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/AddParticipantsSucceededEvent.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The AddParticipantsSucceededEvent model. */ +@Immutable +public final class AddParticipantsSucceededEvent extends CallAutomationEventBase { + /* + * Operation context + */ + private String operationContext; + + /* + * The resultInfo property. + */ + private ResultInfo resultInfo; + + /* + * Participants added + */ + private List participants; + + private AddParticipantsSucceededEvent() { + } + + /** + * Get the operationContext property: Operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInfo property: The resultInfo property. + * + * @return the resultInfo value. + */ + public ResultInfo getResultInfo() { + return this.resultInfo; + } + + /** + * Get the participants property: Participants added. + * + * @return the participants value. + */ + public List getParticipants() { + return this.participants; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeStringField("operationContext", operationContext) + .writeJsonField("resultInfo", resultInfo) + .writeEndObject(); + } + + /** + * Reads an instance of {@link AddParticipantsSucceededEvent} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link AddParticipantsSucceededEvent}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static AddParticipantsSucceededEvent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddParticipantsSucceededEvent event = new AddParticipantsSucceededEvent(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (fromJsonShared(event, fieldName, reader)) { + continue; + } + + if ("operationContext".equals(fieldName)) { + event.operationContext = reader.getString(); + } else if ("resultInfo".equals(fieldName)) { + event.resultInfo = ResultInfo.fromJson(reader); + } else if ("participants".equals(fieldName)) { + event.participants = reader.readArray( + r -> CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(r))); + } else { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallAutomationEventBase.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallAutomationEventBase.java new file mode 100644 index 000000000000..2283906adadb --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallAutomationEventBase.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The base event interface. */ +public abstract class CallAutomationEventBase implements JsonSerializable { + /* + * Call connection ID. + */ + private String callConnectionId; + + /* + * Server call ID. + */ + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for skype chain ID. + */ + private String correlationId; + + CallAutomationEventBase() { + } + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeEndObject(); + } + + JsonWriter toJsonShared(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStringField("callConnectionId", callConnectionId) + .writeStringField("serverCallId", serverCallId) + .writeStringField("correlationId", callConnectionId); + } + + static boolean fromJsonShared(CallAutomationEventBase event, String fieldName, JsonReader jsonReader) + throws IOException { + if ("callConnectionId".equals(fieldName)) { + event.callConnectionId = jsonReader.getString(); + return true; + } else if ("serverCallId".equals(fieldName)) { + event.serverCallId = jsonReader.getString(); + return true; + } else if ("correlationId".equals(fieldName)) { + event.correlationId = jsonReader.getString(); + return true; + } + + return false; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallConnectedEvent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallConnectedEvent.java new file mode 100644 index 000000000000..f29a3c0cc12f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallConnectedEvent.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The CallConnectedEvent model. */ +@Immutable +public final class CallConnectedEvent extends CallAutomationEventBase { + private CallConnectedEvent() { + super(); + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeEndObject(); + } + + /** + * Reads an instance of {@link CallConnectedEvent} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link CallConnectedEvent}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CallConnectedEvent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CallConnectedEvent event = new CallConnectedEvent(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (!fromJsonShared(event, fieldName, reader)) { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallDisconnectedEvent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallDisconnectedEvent.java new file mode 100644 index 000000000000..21c0d60b6922 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallDisconnectedEvent.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The CallDisconnectedEvent model. */ +@Immutable +public final class CallDisconnectedEvent extends CallAutomationEventBase { + private CallDisconnectedEvent() { + super(); + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeEndObject(); + } + + /** + * Reads an instance of {@link CallDisconnectedEvent} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link CallDisconnectedEvent}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CallDisconnectedEvent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CallDisconnectedEvent event = new CallDisconnectedEvent(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (!fromJsonShared(event, fieldName, reader)) { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallTransferAcceptedEvent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallTransferAcceptedEvent.java new file mode 100644 index 000000000000..2dd8482ddf0b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallTransferAcceptedEvent.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The CallTransferAcceptedEvent model. */ +@Immutable +public final class CallTransferAcceptedEvent extends CallAutomationEventBase { + /* + * Operation context + */ + private String operationContext; + + /* + * The resultInfo property. + */ + private ResultInfo resultInfo; + + private CallTransferAcceptedEvent() { + } + + /** + * Get the operationContext property: Operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInfo property: The resultInfo property. + * + * @return the resultInfo value. + */ + public ResultInfo getResultInfo() { + return this.resultInfo; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeStringField("operationContext", operationContext) + .writeJsonField("resultInfo", resultInfo) + .writeEndObject(); + } + + /** + * Reads an instance of {@link CallTransferAcceptedEvent} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link CallTransferAcceptedEvent}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CallTransferAcceptedEvent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CallTransferAcceptedEvent event = new CallTransferAcceptedEvent(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (fromJsonShared(event, fieldName, reader)) { + continue; + } + + if ("operationContext".equals(fieldName)) { + event.operationContext = reader.getString(); + } else if ("resultInfo".equals(fieldName)) { + event.resultInfo = ResultInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallTransferFailedEvent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallTransferFailedEvent.java new file mode 100644 index 000000000000..9734a41800c6 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/CallTransferFailedEvent.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The CallTransferFailedEvent model. */ +@Immutable +public final class CallTransferFailedEvent extends CallAutomationEventBase { + /* + * Operation context + */ + private String operationContext; + + /* + * The resultInfo property. + */ + private ResultInfo resultInfo; + + private CallTransferFailedEvent() { + } + + /** + * Get the operationContext property: Operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInfo property: The resultInfo property. + * + * @return the resultInfo value. + */ + public ResultInfo getResultInfo() { + return this.resultInfo; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeStringField("operationContext", operationContext) + .writeJsonField("resultInfo", resultInfo) + .writeEndObject(); + } + + /** + * Reads an instance of {@link CallTransferFailedEvent} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link CallTransferFailedEvent}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static CallTransferFailedEvent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CallTransferFailedEvent event = new CallTransferFailedEvent(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (fromJsonShared(event, fieldName, reader)) { + continue; + } + + if ("operationContext".equals(fieldName)) { + event.operationContext = reader.getString(); + } else if ("resultInfo".equals(fieldName)) { + event.resultInfo = ResultInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/ParticipantsUpdatedEvent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/ParticipantsUpdatedEvent.java new file mode 100644 index 000000000000..9ecfe07d1021 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/ParticipantsUpdatedEvent.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** The ParticipantsUpdatedEvent model. */ +@Immutable +public final class ParticipantsUpdatedEvent extends CallAutomationEventBase { + /* + * List of current participants in the call. + */ + private List participants; + + private ParticipantsUpdatedEvent() { + } + + /** + * Get the participants property: List of current participants in the call. + * + * @return the participants value. + */ + public List getParticipants() { + return this.participants; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeEndObject(); + } + + /** + * Reads an instance of {@link ParticipantsUpdatedEvent} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link ParticipantsUpdatedEvent}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static ParticipantsUpdatedEvent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParticipantsUpdatedEvent event = new ParticipantsUpdatedEvent(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (fromJsonShared(event, fieldName, reader)) { + continue; + } + + if ("participants".equals(fieldName)) { + event.participants = reader.readArray( + r -> CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(r))); + } else { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/PlayCompleted.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/PlayCompleted.java new file mode 100644 index 000000000000..64dd13edc79b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/PlayCompleted.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The PlayCompleted model. */ +@Immutable +public final class PlayCompleted extends CallAutomationEventBase { + /* + * Operation context + */ + private String operationContext; + + /* + * The resultInfo property. + */ + private ResultInfo resultInfo; + + private PlayCompleted() { + } + + /** + * Get the operationContext property: Operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInfo property: The resultInfo property. + * + * @return the resultInfo value. + */ + public ResultInfo getResultInfo() { + return this.resultInfo; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeStringField("operationContext", operationContext) + .writeJsonField("resultInfo", resultInfo) + .writeEndObject(); + } + + /** + * Reads an instance of {@link PlayCompleted} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link PlayCompleted}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static PlayCompleted fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlayCompleted event = new PlayCompleted(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (fromJsonShared(event, fieldName, reader)) { + continue; + } + + if ("operationContext".equals(fieldName)) { + event.operationContext = reader.getString(); + } else if ("resultInfo".equals(fieldName)) { + event.resultInfo = ResultInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/PlayFailed.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/PlayFailed.java new file mode 100644 index 000000000000..ac6e23751c48 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/PlayFailed.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The PlayFailed model. */ +@Immutable +public final class PlayFailed extends CallAutomationEventBase { + /* + * Operation context + */ + private String operationContext; + + /* + * The resultInfo property. + */ + private ResultInfo resultInfo; + + private PlayFailed() { + } + + /** + * Get the operationContext property: Operation context. + * + * @return the operationContext value. + */ + public String getOperationContext() { + return this.operationContext; + } + + /** + * Get the resultInfo property: The resultInfo property. + * + * @return the resultInfo value. + */ + public ResultInfo getResultInfo() { + return this.resultInfo; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeStringField("operationContext", operationContext) + .writeJsonField("resultInfo", resultInfo) + .writeEndObject(); + } + + /** + * Reads an instance of {@link PlayFailed} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link PlayFailed}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static PlayFailed fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlayFailed event = new PlayFailed(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (fromJsonShared(event, fieldName, reader)) { + continue; + } + + if ("operationContext".equals(fieldName)) { + event.operationContext = reader.getString(); + } else if ("resultInfo".equals(fieldName)) { + event.resultInfo = ResultInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/RecordingStateChangedEvent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/RecordingStateChangedEvent.java new file mode 100644 index 000000000000..a2a9d241433c --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/RecordingStateChangedEvent.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.communication.callingserver.models.RecordingState; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** The RecordingStateChangedEvent model. */ +@Immutable +public final class RecordingStateChangedEvent extends CallAutomationEventBase { + + /** + * Recording Id. + */ + private String recordingId; + + /** + * Recording state. + */ + private RecordingState recordingState; + + /** + * Time of when it started recording. + */ + private OffsetDateTime startDateTime; + + private RecordingStateChangedEvent() { + } + + /** + * Get the recordingId property: Recording Id. + * + * @return the recordingId value. + */ + public String getRecordingId() { + return recordingId; + } + + /** + * Get the recordingState property: Recording State. + * + * @return the recordingState value. + */ + public RecordingState getRecordingState() { + return recordingState; + } + + /** + * Get the startDateTime property: Start Date time. + * + * @return the startDateTime value. + */ + public OffsetDateTime getStartDateTime() { + return startDateTime; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return toJsonShared(jsonWriter.writeStartObject()).writeStringField("recordingId", recordingId) + .writeStringField("state", Objects.toString(recordingState, null)) + .writeEndObject(); + } + + /** + * Reads an instance of {@link RecordingStateChangedEvent} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read from. + * @return An instance of {@link RecordingStateChangedEvent}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RecordingStateChangedEvent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecordingStateChangedEvent event = new RecordingStateChangedEvent(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if (fromJsonShared(event, fieldName, reader)) { + continue; + } + + if ("recordingId".equals(fieldName)) { + event.recordingId = reader.getString(); + } else if ("state".equals(fieldName)) { + event.recordingState = RecordingState.fromString(reader.getString()); + } else if ("startDateTime".equals(fieldName)) { + event.startDateTime = CoreUtils.parseBestOffsetDateTime(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return event; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/ResultInfo.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/ResultInfo.java new file mode 100644 index 000000000000..f5a899a5016a --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/ResultInfo.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver.models.events; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** The ResultInfo model. */ +@Immutable +public final class ResultInfo implements JsonSerializable { + /* + * The code property. + */ + private Integer code; + + /* + * The subCode property. + */ + private Integer subCode; + + /* + * The message property. + */ + private String message; + + private ResultInfo() { + } + + /** + * Get the code property: The code property. + * + * @return the code value. + */ + public Integer getCode() { + return this.code; + } + + /** + * Get the subCode property: The subCode property. + * + * @return the subCode value. + */ + public Integer getSubCode() { + return this.subCode; + } + + /** + * Get the message property: The message property. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeNumberField("code", code) + .writeNumberField("subCode", subCode) + .writeStringField("message", message) + .writeEndObject(); + } + + /** + * Reads an instance of {@link ResultInfo} from the {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link ResultInfo}, or null if the {@link JsonReader} was pointing to + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static ResultInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResultInfo info = new ResultInfo(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + info.code = reader.getNullable(JsonReader::getInt); + } else if ("subCode".equals(fieldName)) { + info.subCode = reader.getNullable(JsonReader::getInt); + } else if ("message".equals(fieldName)) { + info.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return info; + }); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/package-info.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/package-info.java new file mode 100644 index 000000000000..70f422131a10 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/events/package-info.java @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** Package containing events for AzureCommunicationCallingServerService. null. */ +package com.azure.communication.callingserver.models.events; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/package-info.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/package-info.java new file mode 100644 index 000000000000..20e6e767a65f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing classes for AzureCommunicationCallingServerService. null. */ +package com.azure.communication.callingserver.models; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/package-info.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/package-info.java new file mode 100644 index 000000000000..d5cdcaacf91d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/package-info.java @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** Package containing the classes for AzureCommunicationCallingServer. Azure Communication CallingServer Service. */ +package com.azure.communication.callingserver; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/module-info.java b/sdk/communication/azure-communication-callingserver/src/main/java/module-info.java new file mode 100644 index 000000000000..a44160c5645d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/main/java/module-info.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.communication.callingserver { + + requires transitive com.azure.communication.common; + + // public API surface area + exports com.azure.communication.callingserver; + exports com.azure.communication.callingserver.models; + exports com.azure.communication.callingserver.models.events; + + // Opening some packages to azure-core for serialization. + opens com.azure.communication.callingserver.implementation.models to com.azure.core; + opens com.azure.communication.callingserver to com.azure.core; + opens com.azure.communication.callingserver.models to com.azure.core; + opens com.azure.communication.callingserver.models.events to com.azure.core; +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationAsyncClientUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationAsyncClientUnitTests.java new file mode 100644 index 000000000000..b3c5f2f62237 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationAsyncClientUnitTests.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.AnswerCallResult; +import com.azure.communication.callingserver.models.CallRejectReason; +import com.azure.communication.callingserver.models.CreateCallOptions; +import com.azure.communication.callingserver.models.CreateCallResult; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.communication.common.CommunicationUserIdentifier; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class CallAutomationAsyncClientUnitTests extends CallAutomationUnitTestBase { + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void createCall() { + CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>(Collections + .singletonList(new AbstractMap.SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 201)))); + CommunicationUserIdentifier caller = new CommunicationUserIdentifier(CALL_CALLER_ID); + List targets + = new ArrayList<>(Collections.singletonList(new CommunicationUserIdentifier(CALL_TARGET_ID))); + CreateCallOptions callOptions = new CreateCallOptions(caller, targets, CALL_CALLBACK_URL); + callOptions.setSubject(CALL_SUBJECT); + + CreateCallResult createCallResult = callAutomationAsyncClient.createCall(callOptions).block(); + + assertNotNull(createCallResult); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void createCallWithResponse() { + CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>(Collections + .singletonList(new AbstractMap.SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 201)))); + CommunicationUserIdentifier caller = new CommunicationUserIdentifier(CALL_CALLER_ID); + List targets + = new ArrayList<>(Collections.singletonList(new CommunicationUserIdentifier(CALL_TARGET_ID))); + CreateCallOptions callOptions = new CreateCallOptions(caller, targets, CALL_CALLBACK_URL); + callOptions.setSubject(CALL_SUBJECT); + callOptions.setMediaStreamingConfiguration(MEDIA_STREAMING_CONFIGURATION); + + Response createCallResult + = callAutomationAsyncClient.createCallWithResponse(callOptions).block(); + + assertNotNull(createCallResult); + assertEquals(201, createCallResult.getStatusCode()); + assertNotNull(createCallResult.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void answerCall() { + CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>(Collections + .singletonList(new AbstractMap.SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 200)))); + + AnswerCallResult answerCallResult + = callAutomationAsyncClient.answerCall(CALL_INCOMING_CALL_CONTEXT, CALL_CALLBACK_URL).block(); + + assertNotNull(answerCallResult); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void answerCallWithResponse() { + CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>(Collections + .singletonList(new AbstractMap.SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 200)))); + + Response answerCallResult = callAutomationAsyncClient + .answerCallWithResponse(CALL_INCOMING_CALL_CONTEXT, CALL_CALLBACK_URL, MEDIA_STREAMING_CONFIGURATION) + .block(); + + assertNotNull(answerCallResult); + assertEquals(200, answerCallResult.getStatusCode()); + assertNotNull(answerCallResult.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void redirectCall() { + CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient( + new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204)))); + CommunicationUserIdentifier target = new CommunicationUserIdentifier(CALL_TARGET_ID); + + callAutomationAsyncClient.redirectCall(CALL_INCOMING_CALL_CONTEXT, target); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void redirectCallWithResponse() { + CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient( + new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204)))); + CommunicationUserIdentifier target = new CommunicationUserIdentifier(CALL_TARGET_ID); + + Response redirectCallResponse + = callAutomationAsyncClient.redirectCallWithResponse(CALL_INCOMING_CALL_CONTEXT, target).block(); + + assertNotNull(redirectCallResponse); + assertEquals(204, redirectCallResponse.getStatusCode()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void rejectCall() { + CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient( + new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204)))); + + callAutomationAsyncClient.rejectCall(CALL_INCOMING_CALL_CONTEXT, CallRejectReason.BUSY); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void rejectCallWithResponse() { + CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient( + new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204)))); + + Response rejectCallResponse + = callAutomationAsyncClient.rejectCallWithResponse(CALL_INCOMING_CALL_CONTEXT, CallRejectReason.BUSY) + .block(); + + assertNotNull(rejectCallResponse); + assertEquals(204, rejectCallResponse.getStatusCode()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationClientBuilderUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationClientBuilderUnitTests.java new file mode 100644 index 000000000000..b58600d0189e --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationClientBuilderUnitTests.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.communication.callingserver; + +import com.azure.communication.common.implementation.HmacAuthenticationPolicy; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.policy.ExponentialBackoffOptions; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.ClientOptions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class CallAutomationClientBuilderUnitTests { + static final String MOCK_URL = "https://REDACTED.communication.azure.com"; + static final String MOCK_ACCESS_KEY + = "eyKfcHciOiJIUzI1NiIsInR5cCI6IkqXVCJ9eyJzdWIiOiIxMjM0NTY5ODkwIiwibmFtZSI7IkpvaGfQSflKxwRJSMeKKF2QT4fwpMeJf36POk6yJVadUs4s5d"; + static final String MOCK_CONNECTION_STRING + = "endpoint=https://REDACTED.communication.azure.com/;accesskey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaGfQSflKxwRJSMeKKF2QT4fwpMeJf36POk6yJVadQssw5c"; + private static final String APPLICATION_ID = "833bad32-4432-4d41-8bb4"; + private final CallAutomationClientBuilder builder = new CallAutomationClientBuilder(); + + static class NoOpHttpClient implements HttpClient { + @Override + public Mono send(HttpRequest request) { + return Mono.empty(); // NOP + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void missingTokenCredentialTest() throws NullPointerException { + builder.endpoint(MOCK_URL).httpClient(new NoOpHttpClient()); + assertThrows(Exception.class, builder::buildAsyncClient); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void missingUrlTest() throws NullPointerException { + builder.credential(new AzureKeyCredential(MOCK_ACCESS_KEY)).httpClient(new NoOpHttpClient()); + assertThrows(Exception.class, builder::buildAsyncClient); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void nullPipelineTest() { + assertThrows(NullPointerException.class, + () -> builder.connectionString(MOCK_CONNECTION_STRING).httpClient(new NoOpHttpClient()).pipeline(null)); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void nullCustomPolicyTest() { + assertThrows(NullPointerException.class, + () -> builder.connectionString(MOCK_CONNECTION_STRING).httpClient(new NoOpHttpClient()).addPolicy(null)); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void nullConfigurationTest() { + assertThrows(NullPointerException.class, + () -> builder.connectionString(MOCK_CONNECTION_STRING) + .httpClient(new NoOpHttpClient()) + .configuration(null)); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void nullHttpLogOptionsTest() { + assertThrows(NullPointerException.class, + () -> builder.connectionString(MOCK_CONNECTION_STRING) + .httpClient(new NoOpHttpClient()) + .httpLogOptions(null)); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void nullRetryPolicyTest() { + assertThrows(NullPointerException.class, + () -> builder.connectionString(MOCK_CONNECTION_STRING).httpClient(new NoOpHttpClient()).retryPolicy(null)); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void buildPipelineForClient() { + CallAutomationAsyncClient callAutomationAsyncClient = builder.connectionString(MOCK_CONNECTION_STRING) + .httpClient(new NoOpHttpClient()) + .pipeline(new HttpPipelineBuilder().build()) + .buildAsyncClient(); + assertNotNull(callAutomationAsyncClient); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void setHttpLogOptions() { + HttpLogOptions options = new HttpLogOptions().setApplicationId(APPLICATION_ID); + CallAutomationAsyncClient callAutomationAsyncClient = builder.connectionString(MOCK_CONNECTION_STRING) + .httpLogOptions(options) + .httpClient(new NoOpHttpClient()) + .buildAsyncClient(); + assertNotNull(callAutomationAsyncClient); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void setClientOptions() { + ClientOptions options = new ClientOptions().setApplicationId(APPLICATION_ID); + CallAutomationAsyncClient callAutomationAsyncClient = builder.connectionString(MOCK_CONNECTION_STRING) + .clientOptions(options) + .httpClient(new NoOpHttpClient()) + .buildAsyncClient(); + assertNotNull(callAutomationAsyncClient); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void noClientOptionsNoPipeline() { + CallAutomationAsyncClient callAutomationAsyncClient + = builder.connectionString(MOCK_CONNECTION_STRING).httpClient(new NoOpHttpClient()).buildAsyncClient(); + assertNotNull(callAutomationAsyncClient); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void addPolicy() { + AzureKeyCredential credential = new AzureKeyCredential("key"); + CallAutomationAsyncClient callAutomationAsyncClient = builder.connectionString(MOCK_CONNECTION_STRING) + .addPolicy(new HmacAuthenticationPolicy(credential)) + .httpClient(new NoOpHttpClient()) + .pipeline(new HttpPipelineBuilder().build()) + .retryPolicy(new RetryPolicy()) + .buildAsyncClient(); + assertNotNull(callAutomationAsyncClient); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void argumentExceptionOnConnectionStringAndEndpoint() { + assertThrows(IllegalArgumentException.class, + () -> builder.connectionString(MOCK_CONNECTION_STRING) + .endpoint(MOCK_URL) + .httpClient(new NoOpHttpClient()) + .buildAsyncClient()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void argumentExceptionOnEmptyConnectionString() { + assertThrows(NullPointerException.class, + () -> builder.connectionString("").httpClient(new NoOpHttpClient()).buildAsyncClient()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void argumentExceptionOnConnectionStringAndAzureKeyCredential() { + AzureKeyCredential credential = new AzureKeyCredential("key"); + assertThrows(IllegalArgumentException.class, + () -> builder.connectionString(MOCK_CONNECTION_STRING) + .credential(credential) + .httpClient(new NoOpHttpClient()) + .buildAsyncClient()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void argumentExceptionOnConnectionStringAndTokenCredential() { + assertThrows(IllegalArgumentException.class, + () -> builder.connectionString(MOCK_CONNECTION_STRING) + .credential(new MockTokenCredential()) + .httpClient(new NoOpHttpClient()) + .buildAsyncClient()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void argumentExceptionOnAzureKeyCredentialAndTokenCredential() { + AzureKeyCredential credential = new AzureKeyCredential("key"); + assertThrows(IllegalArgumentException.class, + () -> builder.credential(credential) + .credential(new MockTokenCredential()) + .httpClient(new NoOpHttpClient()) + .buildAsyncClient()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void noPipelineWithToken() { + CallAutomationAsyncClient callAutomationAsyncClient = builder.endpoint(MOCK_URL) + .credential(new MockTokenCredential()) + .httpClient(new NoOpHttpClient()) + .buildAsyncClient(); + + assertNotNull(callAutomationAsyncClient); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void noCredential() { + assertThrows(IllegalArgumentException.class, + () -> builder.endpoint(MOCK_URL).httpClient(new NoOpHttpClient()).buildAsyncClient()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void noEndpoint() { + assertThrows(NullPointerException.class, () -> builder.httpClient(new NoOpHttpClient()).buildAsyncClient()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void bothRetryOptionsAndRetryPolicySet() { + assertThrows(IllegalStateException.class, + () -> builder.connectionString(MOCK_CONNECTION_STRING) + .httpClient(new NoOpHttpClient()) + .retryOptions(new RetryOptions(new ExponentialBackoffOptions())) + .retryPolicy(new RetryPolicy()) + .buildClient()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationClientUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationClientUnitTests.java new file mode 100644 index 000000000000..3acb536084ec --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationClientUnitTests.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.AnswerCallResult; +import com.azure.communication.callingserver.models.CallRejectReason; +import com.azure.communication.callingserver.models.CreateCallOptions; +import com.azure.communication.callingserver.models.CreateCallResult; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.communication.common.CommunicationUserIdentifier; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.AbstractMap.SimpleEntry; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class CallAutomationClientUnitTests extends CallAutomationUnitTestBase { + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void createCall() { + CallAutomationClient callAutomationClient = getCallAutomationClient(new ArrayList<>( + Collections.singletonList(new SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 201)))); + CommunicationUserIdentifier caller = new CommunicationUserIdentifier(CALL_CALLER_ID); + List targets + = new ArrayList<>(Collections.singletonList(new CommunicationUserIdentifier(CALL_TARGET_ID))); + CreateCallOptions callOptions = new CreateCallOptions(caller, targets, CALL_CALLBACK_URL); + callOptions.setSubject(CALL_SUBJECT); + + CreateCallResult createCallResult = callAutomationClient.createCall(callOptions); + + assertNotNull(createCallResult); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void createCallWithResponse() { + CallAutomationClient callAutomationClient = getCallAutomationClient(new ArrayList<>( + Collections.singletonList(new SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 201)))); + CommunicationUserIdentifier caller = new CommunicationUserIdentifier(CALL_CALLER_ID); + List targets + = new ArrayList<>(Collections.singletonList(new CommunicationUserIdentifier(CALL_TARGET_ID))); + CreateCallOptions callOptions = new CreateCallOptions(caller, targets, CALL_CALLBACK_URL); + callOptions.setSubject(CALL_SUBJECT); + + Response createCallResult + = callAutomationClient.createCallWithResponse(callOptions, Context.NONE); + + assertNotNull(createCallResult); + assertEquals(201, createCallResult.getStatusCode()); + assertNotNull(createCallResult.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void answerCall() { + CallAutomationClient callAutomationClient = getCallAutomationClient(new ArrayList<>( + Collections.singletonList(new SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 200)))); + + AnswerCallResult answerCallResult + = callAutomationClient.answerCall(CALL_INCOMING_CALL_CONTEXT, CALL_CALLBACK_URL); + + assertNotNull(answerCallResult); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void answerCallWithResponse() { + CallAutomationClient callAutomationClient = getCallAutomationClient(new ArrayList<>( + Collections.singletonList(new SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 200)))); + + Response answerCallResult = callAutomationClient.answerCallWithResponse( + CALL_INCOMING_CALL_CONTEXT, CALL_CALLBACK_URL, MEDIA_STREAMING_CONFIGURATION, Context.NONE); + + assertNotNull(answerCallResult); + assertEquals(200, answerCallResult.getStatusCode()); + assertNotNull(answerCallResult.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void redirectCall() { + CallAutomationClient callAutomationClient + = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204)))); + CommunicationUserIdentifier target = new CommunicationUserIdentifier(CALL_TARGET_ID); + + callAutomationClient.redirectCall(CALL_INCOMING_CALL_CONTEXT, target); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void redirectCallWithResponse() { + CallAutomationClient callAutomationClient + = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204)))); + CommunicationUserIdentifier target = new CommunicationUserIdentifier(CALL_TARGET_ID); + + Response redirectCallResponse + = callAutomationClient.redirectCallWithResponse(CALL_INCOMING_CALL_CONTEXT, target, Context.NONE); + + assertEquals(204, redirectCallResponse.getStatusCode()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void rejectCall() { + CallAutomationClient callAutomationClient + = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204)))); + + callAutomationClient.rejectCall(CALL_INCOMING_CALL_CONTEXT, CallRejectReason.BUSY); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void rejectCallWithResponse() { + CallAutomationClient callAutomationClient + = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204)))); + + Response rejectCallResponse = callAutomationClient.rejectCallWithResponse(CALL_INCOMING_CALL_CONTEXT, + CallRejectReason.BUSY, Context.NONE); + + assertEquals(204, rejectCallResponse.getStatusCode()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationLiveTestBase.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationLiveTestBase.java new file mode 100644 index 000000000000..a485dc26e349 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationLiveTestBase.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.core.credential.AccessToken; +import com.azure.core.credential.TokenCredential; +import com.azure.core.credential.TokenRequestContext; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipelineNextPolicy; +import com.azure.core.http.HttpResponse; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.TestMode; +import com.azure.core.test.annotation.LiveOnly; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.logging.LogLevel; +import com.azure.identity.DefaultAzureCredentialBuilder; +import reactor.core.publisher.Mono; + +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.function.Function; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +// Package marked to be deprecated +@LiveOnly() +public class CallAutomationLiveTestBase extends TestProxyTestBase { + private static final ClientLogger LOGGER = new ClientLogger(CallAutomationLiveTestBase.class); + + protected static final String CONNECTION_STRING = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING", + "endpoint=https://REDACTED.communication.azure.com/;accesskey=QWNjZXNzS2V5"); + + protected static final String ENDPOINT = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_LIVETEST_STATIC_ENDPOINT", "https://REDACTED.communication.azure.com/"); + + protected static final String ENDPOINT_401 = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_LIVETEST_STATIC_ENDPOINT_401", "https://REDACTED.communication.azure.com/"); + + protected static final String METADATA_URL = Configuration.getGlobalConfiguration() + .get("METADATA_URL", + "https://storage.asm.skype.com/v1/objects/0-eus-d2-3cca2175891f21c6c9a5975a12c0141c/content/acsmetadata"); + + protected static final String VIDEO_URL = Configuration.getGlobalConfiguration() + .get("VIDEO_URL", + "https://storage.asm.skype.com/v1/objects/0-eus-d2-3cca2175891f21c6c9a5975a12c0141c/content/video"); + + protected static final String CONTENT_URL_404 = Configuration.getGlobalConfiguration() + .get("CONTENT_URL_404", + "https://storage.asm.skype.com/v1/objects/0-eus-d2-3cca2175891f21c6c9a5975a12c0141d/content/acsmetadata"); + + protected static final String RECORDING_DELETE_URL = Configuration.getGlobalConfiguration() + .get("RECORDING_DELETE_URL", + "https://storage.asm.skype.com/v1/objects/0-eus-d10-598a3ea36bfbc27e68c026b17982af22"); + + protected static final String RECORDING_DELETE_URL_404 = Configuration.getGlobalConfiguration() + .get("RECORDING_DELETE_URL_404", + "https://storage.asm.skype.com/v1/objects/0-eus-d2-3cca2175891f21c6c9a5975a12c0141c"); + + private static final StringJoiner JSON_PROPERTIES_TO_REDACT = new StringJoiner("\":\"|\"", "\"", "\":\"").add("to"); + + private static final Pattern JSON_PROPERTY_VALUE_REDACTION_PATTERN + = Pattern.compile(String.format("(?:%s)(.*?)(?:\",|\"})", JSON_PROPERTIES_TO_REDACT), Pattern.CASE_INSENSITIVE); + + protected CallAutomationClientBuilder getCallingServerClientUsingConnectionString(HttpClient httpClient) { + CallAutomationClientBuilder builder = new CallAutomationClientBuilder().connectionString(CONNECTION_STRING) + .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient); + + if (getTestMode() == TestMode.RECORD) { + List> redactors = new ArrayList<>(); + redactors.add(data -> redact(data, JSON_PROPERTY_VALUE_REDACTION_PATTERN.matcher(data))); + builder.addPolicy(interceptorManager.getRecordPolicy(redactors)); + } + return builder; + } + + protected CallAutomationClientBuilder getCallingServerClientUsingTokenCredential(HttpClient httpClient) { + TokenCredential tokenCredential + = getTestMode() == TestMode.PLAYBACK ? new FakeCredentials() : new DefaultAzureCredentialBuilder().build(); + + CallAutomationClientBuilder builder = new CallAutomationClientBuilder().endpoint(ENDPOINT) + .credential(tokenCredential) + .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient); + + if (getTestMode() == TestMode.RECORD) { + List> redactors = new ArrayList<>(); + redactors.add(data -> redact(data, JSON_PROPERTY_VALUE_REDACTION_PATTERN.matcher(data))); + builder.addPolicy(interceptorManager.getRecordPolicy(redactors)); + } + return builder; + } + + protected CallAutomationClientBuilder getCallingServerClientUsingInvalidTokenCredential(HttpClient httpClient) { + TokenCredential tokenCredential + = getTestMode() == TestMode.PLAYBACK ? new FakeCredentials() : new DefaultAzureCredentialBuilder().build(); + + CallAutomationClientBuilder builder = new CallAutomationClientBuilder().credential(tokenCredential) + .endpoint(ENDPOINT_401) + .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient); + + if (getTestMode() == TestMode.RECORD) { + List> redactors = new ArrayList<>(); + redactors.add(data -> redact(data, JSON_PROPERTY_VALUE_REDACTION_PATTERN.matcher(data))); + builder.addPolicy(interceptorManager.getRecordPolicy(redactors)); + } + return builder; + } + + protected Mono logHeaders(String testName, HttpPipelineNextPolicy next) { + return next.process().flatMap(httpResponse -> { + final HttpResponse bufferedResponse = httpResponse.buffer(); + + /* Should sanitize printed response url */ + LOGGER.log(LogLevel.VERBOSE, + () -> "Chain-ID header for " + testName + " request " + bufferedResponse.getRequest().getUrl() + ": " + + bufferedResponse.getHeaderValue("X-Microsoft-Skype-Chain-ID")); + return Mono.just(bufferedResponse); + }); + } + + static class FakeCredentials implements TokenCredential { + @Override + public Mono getToken(TokenRequestContext tokenRequestContext) { + return Mono.just(new AccessToken("someFakeToken", OffsetDateTime.MAX)); + } + } + + private String redact(String content, Matcher matcher) { + while (matcher.find()) { + String captureGroup = matcher.group(1); + if (!CoreUtils.isNullOrEmpty(captureGroup)) { + content = content.replace(matcher.group(1), "REDACTED"); + } + } + return content; + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationUnitTestBase.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationUnitTestBase.java new file mode 100644 index 000000000000..dd7a73ea13a0 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallAutomationUnitTestBase.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.models.AcsCallParticipantInternal; +import com.azure.communication.callingserver.implementation.models.AddParticipantsResponseInternal; +import com.azure.communication.callingserver.implementation.models.CallConnectionPropertiesInternal; +import com.azure.communication.callingserver.implementation.models.CallConnectionStateModelInternal; +import com.azure.communication.callingserver.implementation.models.CallSourceInternal; +import com.azure.communication.callingserver.implementation.models.GetParticipantsResponseInternal; +import com.azure.communication.callingserver.models.MediaStreamingAudioChannelType; +import com.azure.communication.callingserver.models.MediaStreamingConfiguration; +import com.azure.communication.callingserver.models.MediaStreamingContentType; +import com.azure.communication.callingserver.models.MediaStreamingTransportType; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.json.JsonSerializable; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.AbstractMap.SimpleEntry; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; + +public class CallAutomationUnitTestBase { + static final String MOCK_ENDPOINT = "https://REDACTED.communication.azure.com/"; + static final String MOCK_CONNECTION_STRING = String.format("endpoint=%s;accesskey=eyJhbG", MOCK_ENDPOINT); + static final String CALL_CONNECTION_ID = "callConnectionId"; + static final String CALL_SERVER_CALL_ID = "serverCallId"; + static final String CALL_CALLER_ID = "callerId"; + static final String CALL_TARGET_ID = "targetId"; + static final String CALL_CONNECTION_STATE = "connected"; + static final String CALL_SUBJECT = "subject"; + static final String CALL_CALLBACK_URL = "https://REDACTED.com/events"; + static final String CALL_INCOMING_CALL_CONTEXT = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.REDACTED"; + static final String CALL_OPERATION_CONTEXT = "operationContext"; + + static final MediaStreamingConfiguration MEDIA_STREAMING_CONFIGURATION + = new MediaStreamingConfiguration("https://websocket.url.com", MediaStreamingTransportType.WEBSOCKET, + MediaStreamingContentType.AUDIO, MediaStreamingAudioChannelType.MIXED); + + public static String generateDownloadResult(String content) { + return content; + } + + public static String generateCallProperties(String callConnectionId, String serverCallId, String callerId, + String targetId, String connectionState, String subject, String callbackUri) { + CallConnectionPropertiesInternal result + = new CallConnectionPropertiesInternal().setCallConnectionId(callConnectionId) + .setServerCallId(serverCallId) + .setCallbackUri(callbackUri) + .setSubject(subject) + .setCallConnectionState(CallConnectionStateModelInternal.fromString(connectionState)) + .setSource(new CallSourceInternal().setIdentifier(ModelGenerator.generateUserIdentifierModel(callerId))) + .setTargets( + new ArrayList<>(Collections.singletonList(ModelGenerator.generateUserIdentifierModel(targetId)))); + + return serializeObject(result); + } + + public static String generateGetParticipantResponse(String callerId, boolean isMuted) { + AcsCallParticipantInternal callParticipant + = ModelGenerator.generateAcsCallParticipantInternal(callerId, isMuted); + return serializeObject(callParticipant); + } + + public static String generateListParticipantsResponse() { + GetParticipantsResponseInternal getParticipantsResponseInternal + = new GetParticipantsResponseInternal() + .setValues(new ArrayList<>( + Arrays.asList(ModelGenerator.generateAcsCallParticipantInternal(CALL_CALLER_ID, false), + ModelGenerator.generateAcsCallParticipantInternal(CALL_TARGET_ID, true)))) + .setNextLink(""); + + return serializeObject(getParticipantsResponseInternal); + } + + public static String generateAddParticipantsResponse() { + AddParticipantsResponseInternal addParticipantsResponseInternal = new AddParticipantsResponseInternal() + .setOperationContext(CALL_OPERATION_CONTEXT) + .setParticipants(new ArrayList<>( + Collections.singletonList(ModelGenerator.generateAcsCallParticipantInternal(CALL_TARGET_ID, false)))); + + return serializeObject(addParticipantsResponseInternal); + } + + public static CallAutomationAsyncClient + getCallAutomationAsyncClient(ArrayList> responses) { + HttpClient mockHttpClient = new MockHttpClient(responses); + + return new CallAutomationClientBuilder().httpClient(mockHttpClient) + .connectionString(MOCK_CONNECTION_STRING) + .buildAsyncClient(); + } + + public static CallAutomationClient getCallAutomationClient(ArrayList> responses) { + HttpClient mockHttpClient = new MockHttpClient(responses); + + return new CallAutomationClientBuilder().httpClient(mockHttpClient) + .connectionString(MOCK_CONNECTION_STRING) + .buildClient(); + } + + public static CallConnection getCallConnection(ArrayList> responses) { + CallAutomationClient callAutomationClient = getCallAutomationClient(responses); + return callAutomationClient.getCallConnection("callConnectionId"); + } + + public static CallConnectionAsync getCallConnectionAsync(ArrayList> responses) { + CallAutomationAsyncClient callingServerClient = getCallAutomationAsyncClient(responses); + return callingServerClient.getCallConnectionAsync("callConnectionId"); + } + + public static HttpResponse generateMockResponse(String body, HttpRequest request, int statusCode) { + return new HttpResponse(request) { + @Override + public int getStatusCode() { + return statusCode; + } + + @Override + public String getHeaderValue(String name) { + return null; + } + + @Override + public HttpHeaders getHeaders() { + return new HttpHeaders(); + } + + @Override + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(body.getBytes(StandardCharsets.UTF_8))); + } + + @Override + public Mono getBodyAsByteArray() { + return Mono.just(body.getBytes(StandardCharsets.UTF_8)); + } + + @Override + public Mono getBodyAsString() { + return Mono.just(body); + } + + @Override + public Mono getBodyAsString(Charset charset) { + return Mono.just(body); + } + }; + } + + static String serializeObject(JsonSerializable o) { + try { + return o.toJsonString(); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallConnectionAsyncUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallConnectionAsyncUnitTests.java new file mode 100644 index 000000000000..963ad05e3a92 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallConnectionAsyncUnitTests.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.models.RemoveParticipantsResponseInternal; +import com.azure.communication.callingserver.implementation.models.TransferCallResponseInternal; +import com.azure.communication.callingserver.models.AddParticipantsOptions; +import com.azure.communication.callingserver.models.AddParticipantsResult; +import com.azure.communication.callingserver.models.CallConnectionProperties; +import com.azure.communication.callingserver.models.CallParticipant; +import com.azure.communication.callingserver.models.ListParticipantsResult; +import com.azure.communication.callingserver.models.RemoveParticipantsResult; +import com.azure.communication.callingserver.models.TransferCallResult; +import com.azure.communication.callingserver.models.TransferToParticipantCallOptions; +import com.azure.communication.common.CommunicationUserIdentifier; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.AbstractMap.SimpleEntry; +import java.util.ArrayList; +import java.util.Arrays; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class CallConnectionAsyncUnitTests extends CallAutomationUnitTestBase { + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void getCallProperties() { + CallConnectionAsync callConnectionAsync + = getCallAutomationAsyncClient(new ArrayList>(Arrays + .asList(new SimpleEntry(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 200)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + CallConnectionProperties callConnectionProperties = callConnectionAsync.getCallProperties().block(); + + assertNotNull(callConnectionProperties); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void getCallPropertiesWithResponse() { + CallConnectionAsync callConnectionAsync + = getCallAutomationAsyncClient(new ArrayList>(Arrays + .asList(new SimpleEntry(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 200)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + Response callConnectionProperties + = callConnectionAsync.getCallPropertiesWithResponse().block(); + + assertNotNull(callConnectionProperties); + assertEquals(200, callConnectionProperties.getStatusCode()); + assertNotNull(callConnectionProperties.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void hangUp() { + CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient( + new ArrayList>(Arrays.asList(new SimpleEntry("", 204)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + callConnectionAsync.hangUp(false); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void hangUpWithResponse() { + CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient( + new ArrayList>(Arrays.asList(new SimpleEntry("", 204)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + Response hangUpResponse = callConnectionAsync.hangUpWithResponse(false).block(); + + assertNotNull(hangUpResponse); + assertEquals(204, hangUpResponse.getStatusCode()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void hangUpWithResponseForEveryone() { + CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient( + new ArrayList>(Arrays.asList(new SimpleEntry("", 204)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + Response hangUpResponse = callConnectionAsync.hangUpWithResponse(true).block(); + + assertNotNull(hangUpResponse); + assertEquals(204, hangUpResponse.getStatusCode()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void getParticipant() { + CallConnectionAsync callConnectionAsync + = getCallAutomationAsyncClient(new ArrayList>(Arrays + .asList(new SimpleEntry(generateGetParticipantResponse(CALL_CALLER_ID, false), 200)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + CallParticipant callParticipant = callConnectionAsync.getParticipant(CALL_CALLER_ID).block(); + + assertNotNull(callParticipant); + assertEquals(CALL_CALLER_ID, ((CommunicationUserIdentifier) callParticipant.getIdentifier()).getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void getParticipantWithResponse() { + CallConnectionAsync callConnectionAsync + = getCallAutomationAsyncClient(new ArrayList>(Arrays + .asList(new SimpleEntry(generateGetParticipantResponse(CALL_CALLER_ID, false), 200)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + Response callParticipantResponse + = callConnectionAsync.getParticipantWithResponse(CALL_CALLER_ID).block(); + + assertNotNull(callParticipantResponse); + assertEquals(200, callParticipantResponse.getStatusCode()); + assertNotNull(callParticipantResponse.getValue()); + assertEquals(CALL_CALLER_ID, + ((CommunicationUserIdentifier) callParticipantResponse.getValue().getIdentifier()).getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void listParticipants() { + CallConnectionAsync callConnectionAsync + = getCallAutomationAsyncClient(new ArrayList>( + Arrays.asList(new SimpleEntry(generateListParticipantsResponse(), 200)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + ListParticipantsResult listParticipants = callConnectionAsync.listParticipants().block(); + + assertNotNull(listParticipants); + assertNotNull(listParticipants.getValues()); + assertEquals(CALL_CALLER_ID, + ((CommunicationUserIdentifier) listParticipants.getValues().get(0).getIdentifier()).getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void listParticipantsWithResponse() { + CallConnectionAsync callConnectionAsync + = getCallAutomationAsyncClient(new ArrayList>( + Arrays.asList(new SimpleEntry(generateListParticipantsResponse(), 200)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + Response listParticipantsResultResponse + = callConnectionAsync.listParticipantsWithResponse().block(); + + assertNotNull(listParticipantsResultResponse); + assertEquals(200, listParticipantsResultResponse.getStatusCode()); + assertNotNull(listParticipantsResultResponse.getValue()); + assertEquals(CALL_TARGET_ID, + ((CommunicationUserIdentifier) listParticipantsResultResponse.getValue().getValues().get(1).getIdentifier()) + .getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void transferToParticipantCall() { + CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient( + new ArrayList>(Arrays.asList(new SimpleEntry( + serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + TransferCallResult transferCallResult + = callConnectionAsync + .transferToParticipantCall( + new TransferToParticipantCallOptions(new CommunicationUserIdentifier(CALL_TARGET_ID)) + .setOperationContext(CALL_OPERATION_CONTEXT)) + .block(); + + assertNotNull(transferCallResult); + assertEquals(CALL_OPERATION_CONTEXT, transferCallResult.getOperationContext()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void transferToParticipantCallWithResponse() { + CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient( + new ArrayList>(Arrays.asList(new SimpleEntry( + serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + Response transferCallResultResponse + = callConnectionAsync + .transferToParticipantCallWithResponse( + new TransferToParticipantCallOptions(new CommunicationUserIdentifier(CALL_TARGET_ID)) + .setOperationContext(CALL_OPERATION_CONTEXT)) + .block(); + + assertNotNull(transferCallResultResponse); + assertEquals(202, transferCallResultResponse.getStatusCode()); + assertNotNull(transferCallResultResponse.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void addParticipants() { + CallConnectionAsync callConnectionAsync + = getCallAutomationAsyncClient(new ArrayList>( + Arrays.asList(new SimpleEntry(generateAddParticipantsResponse(), 202)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + AddParticipantsResult addParticipantsResult = callConnectionAsync.addParticipants( + new AddParticipantsOptions(new ArrayList<>(Arrays.asList(new CommunicationUserIdentifier(CALL_TARGET_ID)))) + .setOperationContext(CALL_OPERATION_CONTEXT)) + .block(); + + assertNotNull(addParticipantsResult); + assertEquals(CALL_TARGET_ID, + ((CommunicationUserIdentifier) addParticipantsResult.getParticipants().get(0).getIdentifier()).getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void addParticipantsWithResponse() { + CallConnectionAsync callConnectionAsync + = getCallAutomationAsyncClient(new ArrayList>( + Arrays.asList(new SimpleEntry(generateAddParticipantsResponse(), 202)))) + .getCallConnectionAsync(CALL_CONNECTION_ID); + + Response addParticipantsResultResponse = callConnectionAsync.addParticipantsWithResponse( + new AddParticipantsOptions(new ArrayList<>(Arrays.asList(new CommunicationUserIdentifier(CALL_TARGET_ID)))) + .setOperationContext(CALL_OPERATION_CONTEXT)) + .block(); + + assertNotNull(addParticipantsResultResponse); + assertEquals(202, addParticipantsResultResponse.getStatusCode()); + assertNotNull(addParticipantsResultResponse.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void removeParticipants() { + CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient( + new ArrayList>(Arrays.asList(new SimpleEntry( + serializeObject(new RemoveParticipantsResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), + 202)))).getCallConnectionAsync(CALL_CONNECTION_ID); + + RemoveParticipantsResult removeParticipantsResult + = callConnectionAsync + .removeParticipants(new ArrayList<>(Arrays.asList(new CommunicationUserIdentifier(CALL_TARGET_ID))), + CALL_OPERATION_CONTEXT) + .block(); + + assertNotNull(removeParticipantsResult); + assertEquals(CALL_OPERATION_CONTEXT, removeParticipantsResult.getOperationContext()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void removeParticipantsWithResponse() { + CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient( + new ArrayList>(Arrays.asList(new SimpleEntry( + serializeObject(new RemoveParticipantsResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), + 202)))).getCallConnectionAsync(CALL_CONNECTION_ID); + + Response removeParticipantsResultResponse = callConnectionAsync + .removeParticipantsWithResponse( + new ArrayList<>(Arrays.asList(new CommunicationUserIdentifier(CALL_TARGET_ID))), CALL_OPERATION_CONTEXT) + .block(); + + assertNotNull(removeParticipantsResultResponse); + assertEquals(202, removeParticipantsResultResponse.getStatusCode()); + assertNotNull(removeParticipantsResultResponse.getValue()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallConnectionUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallConnectionUnitTests.java new file mode 100644 index 000000000000..35dd3b868a1f --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallConnectionUnitTests.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.models.RemoveParticipantsResponseInternal; +import com.azure.communication.callingserver.implementation.models.TransferCallResponseInternal; +import com.azure.communication.callingserver.models.AddParticipantsOptions; +import com.azure.communication.callingserver.models.AddParticipantsResult; +import com.azure.communication.callingserver.models.CallConnectionProperties; +import com.azure.communication.callingserver.models.CallParticipant; +import com.azure.communication.callingserver.models.ListParticipantsResult; +import com.azure.communication.callingserver.models.RemoveParticipantsResult; +import com.azure.communication.callingserver.models.TransferCallResult; +import com.azure.communication.callingserver.models.TransferToParticipantCallOptions; +import com.azure.communication.common.CommunicationUserIdentifier; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.Arrays; + +import java.util.AbstractMap.SimpleEntry; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class CallConnectionUnitTests extends CallAutomationUnitTestBase { + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void getCallProperties() { + CallConnection callConnection = getCallAutomationClient(new ArrayList>(Arrays + .asList(new SimpleEntry(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 200)))) + .getCallConnection(CALL_CONNECTION_ID); + + CallConnectionProperties callConnectionProperties = callConnection.getCallProperties(); + + assertNotNull(callConnectionProperties); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void getCallPropertiesWithResponse() { + CallConnection callConnection = getCallAutomationClient(new ArrayList>(Arrays + .asList(new SimpleEntry(generateCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, + CALL_CALLER_ID, CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_SUBJECT, CALL_CALLBACK_URL), 200)))) + .getCallConnection(CALL_CONNECTION_ID); + + Response callConnectionProperties + = callConnection.getCallPropertiesWithResponse(Context.NONE); + + assertNotNull(callConnectionProperties); + assertEquals(200, callConnectionProperties.getStatusCode()); + assertNotNull(callConnectionProperties.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void hangUp() { + CallConnection callConnection = getCallAutomationClient( + new ArrayList>(Arrays.asList(new SimpleEntry("", 204)))) + .getCallConnection(CALL_CONNECTION_ID); + + callConnection.hangUp(false); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void hangUpWithResponse() { + CallConnection callConnection = getCallAutomationClient( + new ArrayList>(Arrays.asList(new SimpleEntry("", 204)))) + .getCallConnection(CALL_CONNECTION_ID); + + Response hangUpResponse = callConnection.hangUpWithResponse(false, Context.NONE); + + assertNotNull(hangUpResponse); + assertEquals(204, hangUpResponse.getStatusCode()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void hangUpWithResponseForEveryone() { + CallConnection callConnection = getCallAutomationClient( + new ArrayList>(Arrays.asList(new SimpleEntry("", 204)))) + .getCallConnection(CALL_CONNECTION_ID); + + Response hangUpResponse = callConnection.hangUpWithResponse(true, Context.NONE); + + assertNotNull(hangUpResponse); + assertEquals(204, hangUpResponse.getStatusCode()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void getParticipant() { + CallConnection callConnection = getCallAutomationClient(new ArrayList>(Arrays + .asList(new SimpleEntry(generateGetParticipantResponse(CALL_CALLER_ID, false), 200)))) + .getCallConnection(CALL_CONNECTION_ID); + + CallParticipant callParticipant = callConnection.getParticipant(CALL_CALLER_ID); + + assertNotNull(callParticipant); + assertEquals(CALL_CALLER_ID, ((CommunicationUserIdentifier) callParticipant.getIdentifier()).getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void getParticipantWithResponse() { + CallConnection callConnection = getCallAutomationClient(new ArrayList>(Arrays + .asList(new SimpleEntry(generateGetParticipantResponse(CALL_CALLER_ID, false), 200)))) + .getCallConnection(CALL_CONNECTION_ID); + + Response callParticipantResponse + = callConnection.getParticipantWithResponse(CALL_CALLER_ID, Context.NONE); + + assertNotNull(callParticipantResponse); + assertEquals(200, callParticipantResponse.getStatusCode()); + assertNotNull(callParticipantResponse.getValue()); + assertEquals(CALL_CALLER_ID, + ((CommunicationUserIdentifier) callParticipantResponse.getValue().getIdentifier()).getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void listParticipants() { + CallConnection callConnection = getCallAutomationClient(new ArrayList>( + Arrays.asList(new SimpleEntry(generateListParticipantsResponse(), 200)))) + .getCallConnection(CALL_CONNECTION_ID); + + ListParticipantsResult listParticipants = callConnection.listParticipants(); + + assertNotNull(listParticipants); + assertNotNull(listParticipants.getValues()); + assertEquals(CALL_CALLER_ID, + ((CommunicationUserIdentifier) listParticipants.getValues().get(0).getIdentifier()).getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void listParticipantsWithResponse() { + CallConnection callConnection = getCallAutomationClient(new ArrayList>( + Arrays.asList(new SimpleEntry(generateListParticipantsResponse(), 200)))) + .getCallConnection(CALL_CONNECTION_ID); + + Response listParticipantsResultResponse + = callConnection.listParticipantsWithResponse(Context.NONE); + + assertNotNull(listParticipantsResultResponse); + assertEquals(200, listParticipantsResultResponse.getStatusCode()); + assertNotNull(listParticipantsResultResponse.getValue()); + assertEquals(CALL_TARGET_ID, + ((CommunicationUserIdentifier) listParticipantsResultResponse.getValue().getValues().get(1).getIdentifier()) + .getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void transferToParticipantCall() { + CallConnection callConnection = getCallAutomationClient( + new ArrayList>(Arrays.asList(new SimpleEntry( + serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) + .getCallConnection(CALL_CONNECTION_ID); + + TransferCallResult transferCallResult = callConnection.transferToParticipantCall( + new TransferToParticipantCallOptions(new CommunicationUserIdentifier(CALL_TARGET_ID)) + .setOperationContext(CALL_OPERATION_CONTEXT)); + + assertNotNull(transferCallResult); + assertEquals(CALL_OPERATION_CONTEXT, transferCallResult.getOperationContext()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void transferToParticipantCallWithResponse() { + CallConnection callConnection = getCallAutomationClient( + new ArrayList>(Arrays.asList(new SimpleEntry( + serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) + .getCallConnection(CALL_CONNECTION_ID); + + Response transferCallResultResponse = callConnection.transferToParticipantCallWithResponse( + new TransferToParticipantCallOptions(new CommunicationUserIdentifier(CALL_TARGET_ID)) + .setOperationContext(CALL_OPERATION_CONTEXT), + Context.NONE); + + assertNotNull(transferCallResultResponse); + assertEquals(202, transferCallResultResponse.getStatusCode()); + assertNotNull(transferCallResultResponse.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void addParticipants() { + CallConnection callConnection = getCallAutomationClient(new ArrayList>( + Arrays.asList(new SimpleEntry(generateAddParticipantsResponse(), 202)))) + .getCallConnection(CALL_CONNECTION_ID); + + AddParticipantsResult addParticipantsResult = callConnection.addParticipants( + new AddParticipantsOptions(new ArrayList<>(Arrays.asList(new CommunicationUserIdentifier(CALL_TARGET_ID)))) + .setOperationContext(CALL_OPERATION_CONTEXT)); + + assertNotNull(addParticipantsResult); + assertEquals(CALL_TARGET_ID, + ((CommunicationUserIdentifier) addParticipantsResult.getParticipants().get(0).getIdentifier()).getId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void addParticipantsWithResponse() { + CallConnection callConnection = getCallAutomationClient(new ArrayList>( + Arrays.asList(new SimpleEntry(generateAddParticipantsResponse(), 202)))) + .getCallConnection(CALL_CONNECTION_ID); + + Response addParticipantsResultResponse = callConnection.addParticipantsWithResponse( + new AddParticipantsOptions(new ArrayList<>(Arrays.asList(new CommunicationUserIdentifier(CALL_TARGET_ID)))) + .setOperationContext(CALL_OPERATION_CONTEXT), + Context.NONE); + + assertNotNull(addParticipantsResultResponse); + assertEquals(202, addParticipantsResultResponse.getStatusCode()); + assertNotNull(addParticipantsResultResponse.getValue()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void removeParticipants() { + CallConnection callConnection = getCallAutomationClient( + new ArrayList>(Arrays.asList(new SimpleEntry( + serializeObject(new RemoveParticipantsResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), + 202)))).getCallConnection(CALL_CONNECTION_ID); + + RemoveParticipantsResult removeParticipantsResult = callConnection.removeParticipants( + new ArrayList<>(Arrays.asList(new CommunicationUserIdentifier(CALL_TARGET_ID))), CALL_OPERATION_CONTEXT); + + assertNotNull(removeParticipantsResult); + assertEquals(CALL_OPERATION_CONTEXT, removeParticipantsResult.getOperationContext()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void removeParticipantsWithResponse() { + CallConnection callConnection = getCallAutomationClient( + new ArrayList>(Arrays.asList(new SimpleEntry( + serializeObject(new RemoveParticipantsResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), + 202)))).getCallConnection(CALL_CONNECTION_ID); + + Response removeParticipantsResultResponse + = callConnection.removeParticipantsWithResponse( + new ArrayList<>(Arrays.asList(new CommunicationUserIdentifier(CALL_TARGET_ID))), CALL_OPERATION_CONTEXT, + Context.NONE); + + assertNotNull(removeParticipantsResultResponse); + assertEquals(202, removeParticipantsResultResponse.getStatusCode()); + assertNotNull(removeParticipantsResultResponse.getValue()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallMediaAsyncUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallMediaAsyncUnitTests.java new file mode 100644 index 000000000000..20d4e534ca89 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallMediaAsyncUnitTests.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.FileSource; +import com.azure.communication.callingserver.models.PlayOptions; +import com.azure.communication.callingserver.models.RecognizeConfigurations; +import com.azure.communication.callingserver.models.RecognizeInputType; +import com.azure.communication.callingserver.models.RecognizeOptions; +import com.azure.communication.common.CommunicationUserIdentifier; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.Collections; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class CallMediaAsyncUnitTests { + + private CallMediaAsync callMedia; + private FileSource playSource; + + private PlayOptions playOptions; + + @BeforeEach + public void setup() { + CallConnectionAsync callConnection = CallAutomationUnitTestBase + .getCallConnectionAsync(new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 202)))); + callMedia = callConnection.getCallMediaAsync(); + + playSource = new FileSource(); + playSource.setPlaySourceId("playSourceId"); + playSource.setUri("filePath"); + + playOptions = new PlayOptions().setLoop(false).setOperationContext("operationContext"); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void playFileWithResponseTest() { + StepVerifier + .create(callMedia.playWithResponse(playSource, + Collections.singletonList(new CommunicationUserIdentifier("id")), playOptions)) + .consumeNextWith(response -> assertEquals(202, response.getStatusCode())) + .verifyComplete(); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void playFileToAllWithResponseTest() { + StepVerifier.create(callMedia.playToAllWithResponse(playSource, playOptions)) + .consumeNextWith(response -> assertEquals(202, response.getStatusCode())) + .verifyComplete(); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void cancelAllOperationsWithResponse() { + StepVerifier.create(callMedia.cancelAllMediaOperationsWithResponse()) + .consumeNextWith(response -> assertEquals(202, response.getStatusCode())) + .verifyComplete(); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void recognizeWithResponse() { + RecognizeOptions recognizeOptions + = new RecognizeOptions(RecognizeInputType.DTMF, new RecognizeConfigurations()); + StepVerifier.create(callMedia.recognizeWithResponse(recognizeOptions)) + .consumeNextWith(response -> assertEquals(202, response.getStatusCode())) + .verifyComplete(); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallMediaUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallMediaUnitTests.java new file mode 100644 index 000000000000..014929a2261d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallMediaUnitTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.FileSource; +import com.azure.communication.callingserver.models.PlayOptions; +import com.azure.communication.callingserver.models.RecognizeConfigurations; +import com.azure.communication.callingserver.models.RecognizeInputType; +import com.azure.communication.callingserver.models.RecognizeOptions; +import com.azure.communication.common.CommunicationUserIdentifier; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.Collections; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class CallMediaUnitTests { + + private CallMedia callMedia; + private FileSource playSource; + private PlayOptions playOptions; + + @BeforeEach + public void setup() { + CallConnection callConnection = CallAutomationUnitTestBase + .getCallConnection(new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 202)))); + callMedia = callConnection.getCallMedia(); + + playSource = new FileSource(); + playSource.setPlaySourceId("playSourceId"); + playSource.setUri("filePath"); + + playOptions = new PlayOptions().setLoop(false).setOperationContext("operationContext"); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void playFileWithResponseTest() { + Response response = callMedia.playWithResponse(playSource, + Collections.singletonList(new CommunicationUserIdentifier("id")), playOptions, Context.NONE); + assertEquals(response.getStatusCode(), 202); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void playFileToAllWithResponseTest() { + Response response = callMedia.playToAllWithResponse(playSource, playOptions, Context.NONE); + assertEquals(response.getStatusCode(), 202); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void cancelAllOperationsWithResponse() { + Response response = callMedia.cancelAllMediaOperationsWithResponse(Context.NONE); + assertEquals(response.getStatusCode(), 202); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void recognizeWithResponseTest() { + RecognizeOptions recognizeOptions + = new RecognizeOptions(RecognizeInputType.DTMF, new RecognizeConfigurations()); + Response response = callMedia.recognizeWithResponse(recognizeOptions, Context.NONE); + assertEquals(response.getStatusCode(), 202); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingAsyncLiveTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingAsyncLiveTests.java new file mode 100644 index 000000000000..52e46949b2fa --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingAsyncLiveTests.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.RecordingState; +import com.azure.communication.callingserver.models.RecordingStateResult; +import com.azure.communication.callingserver.models.ServerCallLocator; +import com.azure.communication.callingserver.models.StartRecordingOptions; +import com.azure.core.http.HttpClient; +import com.azure.core.test.annotation.LiveOnly; +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.fail; + +// Package marked to be deprecated +@LiveOnly() +public class CallRecordingAsyncLiveTests extends CallAutomationLiveTestBase { + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void recordingOperations(HttpClient httpClient) { + CallAutomationAsyncClient client = getCallingServerClientUsingConnectionString(httpClient) + .addPolicy((context, next) -> logHeaders("recordingOperationsAsync", next)) + .buildAsyncClient(); + + try { + String ngrok = "https://localhost"; + String serverCallId = "serverCallId"; + CallRecordingAsync callRecording = client.getCallRecordingAsync(); + RecordingStateResult recordingResponse = callRecording + .startRecording( + new StartRecordingOptions(new ServerCallLocator(serverCallId)).setRecordingStateCallbackUrl(ngrok)) + .block(); + assertNotNull(recordingResponse); + String recordingId = recordingResponse.getRecordingId(); + assertNotNull(recordingId); + + recordingResponse = callRecording.getRecordingState(recordingId).block(); + assertNotNull(recordingResponse); + assertEquals(RecordingState.ACTIVE, recordingResponse.getRecordingState()); + + callRecording.pauseRecording(recordingId); + recordingResponse = callRecording.getRecordingState(recordingId).block(); + assertNotNull(recordingResponse); + assertEquals(RecordingState.INACTIVE, recordingResponse.getRecordingState()); + + callRecording.resumeRecording(recordingId); + recordingResponse = callRecording.getRecordingState(recordingId).block(); + assertNotNull(recordingResponse); + assertEquals(RecordingState.ACTIVE, recordingResponse.getRecordingState()); + + callRecording.stopRecording(recordingId).block(); + assertThrows(CallingServerErrorException.class, () -> callRecording.getRecordingState(recordingId).block()); + } catch (Exception ex) { + fail("Unexpected exception received", ex); + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingAsyncUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingAsyncUnitTests.java new file mode 100644 index 000000000000..37a89131665a --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingAsyncUnitTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.RecordingState; +import com.azure.communication.callingserver.models.RecordingStateResult; +import com.azure.communication.callingserver.models.ServerCallLocator; +import com.azure.communication.callingserver.models.StartRecordingOptions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.reactivestreams.Publisher; +import reactor.test.StepVerifier; + +import java.util.ArrayList; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class CallRecordingAsyncUnitTests extends CallRecordingUnitTestBase { + private CallRecordingAsync callRecording; + + @BeforeEach + public void setup() { + CallAutomationAsyncClient callingServerClient + = CallAutomationUnitTestBase.getCallAutomationAsyncClient(new ArrayList<>()); + callRecording = callingServerClient.getCallRecordingAsync(); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void recordingOperationsTest() { + CallAutomationAsyncClient callingServerClient + = CallAutomationUnitTestBase.getCallAutomationAsyncClient(recordingOperationsResponses); + callRecording = callingServerClient.getCallRecordingAsync(); + + validateRecordingState( + callRecording.startRecording(new StartRecordingOptions(new ServerCallLocator(SERVER_CALL_ID)) + .setRecordingStateCallbackUrl("https://localhost/")), + RecordingState.ACTIVE); + + validateOperationWithRecordingState(callRecording.pauseRecording(RECORDING_ID), RecordingState.INACTIVE); + + validateOperationWithRecordingState(callRecording.resumeRecording(RECORDING_ID), RecordingState.ACTIVE); + + validateOperation(callRecording.stopRecording(RECORDING_ID)); + validateError(CallingServerErrorException.class, callRecording.getRecordingState(RECORDING_ID)); + } + + private void validateRecordingState(Publisher publisher, RecordingState status) { + StepVerifier.create(publisher) + .consumeNextWith(recordingStateResponse -> validateRecording(recordingStateResponse, status)) + .verifyComplete(); + } + + private void validateOperationWithRecordingState(Publisher operation, RecordingState expectedRecordingState) { + validateOperation(operation); + validateRecordingState(callRecording.getRecordingState(RECORDING_ID), expectedRecordingState); + } + + private void validateOperation(Publisher operation) { + StepVerifier.create(operation).verifyComplete(); + } + + private void validateError(Class exception, Publisher publisher) { + StepVerifier.create(publisher) + .consumeErrorWith(error -> assertEquals(error.getClass().toString(), exception.toString())) + .verify(); + } + + private void validateRecording(RecordingStateResult recordingState, RecordingState expectedStatus) { + assertEquals(RECORDING_ID, recordingState.getRecordingId()); + assertEquals(expectedStatus, recordingState.getRecordingState()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingLiveTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingLiveTests.java new file mode 100644 index 000000000000..663a01e28538 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingLiveTests.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.RecordingState; +import com.azure.communication.callingserver.models.RecordingStateResult; +import com.azure.communication.callingserver.models.ServerCallLocator; +import com.azure.communication.callingserver.models.StartRecordingOptions; +import com.azure.core.http.HttpClient; +import com.azure.core.test.annotation.LiveOnly; +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.fail; + +// Package marked to be deprecated +@LiveOnly() +public class CallRecordingLiveTests extends CallAutomationLiveTestBase { + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void recordingOperations(HttpClient httpClient) { + CallAutomationClient client = getCallingServerClientUsingConnectionString(httpClient) + .addPolicy((context, next) -> logHeaders("recordingOperations", next)) + .buildClient(); + + try { + String ngrok = "https://localhost"; + String serverCallId = "serverCallId"; + CallRecording callRecording = client.getCallRecording(); + RecordingStateResult recordingResponse = callRecording.startRecording( + new StartRecordingOptions(new ServerCallLocator(serverCallId)).setRecordingStateCallbackUrl(ngrok)); + assertNotNull(recordingResponse); + String recordingId = recordingResponse.getRecordingId(); + assertNotNull(recordingId); + + recordingResponse = callRecording.getRecordingState(recordingId); + assertNotNull(recordingResponse); + assertEquals(RecordingState.ACTIVE, recordingResponse.getRecordingState()); + + callRecording.pauseRecording(recordingId); + recordingResponse = callRecording.getRecordingState(recordingId); + assertNotNull(recordingResponse); + assertEquals(RecordingState.INACTIVE, recordingResponse.getRecordingState()); + + callRecording.resumeRecording(recordingId); + recordingResponse = callRecording.getRecordingState(recordingId); + assertNotNull(recordingResponse); + assertEquals(RecordingState.ACTIVE, recordingResponse.getRecordingState()); + + callRecording.stopRecording(recordingId); + assertThrows(CallingServerErrorException.class, () -> callRecording.getRecordingState(recordingId)); + } catch (Exception ex) { + fail("Unexpected exception received", ex); + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingUnitTestBase.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingUnitTestBase.java new file mode 100644 index 000000000000..28dce668eff8 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingUnitTestBase.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.models.RecordingStateInternal; +import com.azure.communication.callingserver.implementation.models.RecordingStateResponseInternal; +import com.azure.json.JsonSerializable; + +import java.io.IOException; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.Arrays; + +public class CallRecordingUnitTestBase { + static final String SERVER_CALL_ID + = "aHR0cHM6Ly9jb252LXVzd2UtMDguY29udi5za3lwZS5jb20vY29udi8tby1FWjVpMHJrS3RFTDBNd0FST1J3P2k9ODgmZT02Mzc1Nzc0MTY4MDc4MjQyOTM"; + + static final String RECORDING_ID = "recordingId"; + private final RecordingStateResponseInternal recordingState + = new RecordingStateResponseInternal().setRecordingId(RECORDING_ID); + private final String recordingActive + = serializeObject(recordingState.setRecordingState(RecordingStateInternal.ACTIVE)); + private final String recordingInactive + = serializeObject(recordingState.setRecordingState(RecordingStateInternal.INACTIVE)); + + ArrayList> recordingOperationsResponses + = new ArrayList<>(Arrays.asList(new AbstractMap.SimpleEntry<>(recordingActive, 200), //startRecording + new AbstractMap.SimpleEntry<>("", 202), //pauseRecording + new AbstractMap.SimpleEntry<>(recordingInactive, 200), //getRecordingState + new AbstractMap.SimpleEntry<>("", 202), //resumeRecording + new AbstractMap.SimpleEntry<>(recordingActive, 200), //getRecordingState + new AbstractMap.SimpleEntry<>("", 204), //stopRecording + new AbstractMap.SimpleEntry<>("", 404) //getRecordingState + )); + + private String serializeObject(JsonSerializable o) { + try { + return o.toJsonString(); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingUnitTests.java new file mode 100644 index 000000000000..e7421fc5cab3 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CallRecordingUnitTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.RecordingState; +import com.azure.communication.callingserver.models.RecordingStateResult; +import com.azure.communication.callingserver.models.ServerCallLocator; +import com.azure.communication.callingserver.models.StartRecordingOptions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class CallRecordingUnitTests extends CallRecordingUnitTestBase { + private CallRecording callRecording; + + @BeforeEach + public void setup() { + CallAutomationClient callAutomationClient + = CallAutomationUnitTestBase.getCallAutomationClient(new ArrayList<>()); + callRecording = callAutomationClient.getCallRecording(); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void recordingOperationsTest() { + + CallAutomationClient callAutomationClient + = CallAutomationUnitTestBase.getCallAutomationClient(recordingOperationsResponses); + callRecording = callAutomationClient.getCallRecording(); + + validateRecording(callRecording.startRecording(new StartRecordingOptions(new ServerCallLocator(SERVER_CALL_ID)) + .setRecordingStateCallbackUrl("https://localhost/")), RecordingState.ACTIVE); + + verifyOperationWithRecordingState(() -> callRecording.pauseRecording(RECORDING_ID), RecordingState.INACTIVE); + + verifyOperationWithRecordingState(() -> callRecording.resumeRecording(RECORDING_ID), RecordingState.ACTIVE); + + callRecording.stopRecording(RECORDING_ID); + assertThrows(CallingServerErrorException.class, () -> callRecording.getRecordingState(RECORDING_ID)); + } + + private void verifyOperationWithRecordingState(Runnable operation, RecordingState expectedStatus) { + operation.run(); + RecordingStateResult recordingState = callRecording.getRecordingState(RECORDING_ID); + validateRecording(recordingState, expectedStatus); + } + + private void validateRecording(RecordingStateResult recordingState, RecordingState expectedStatus) { + assertEquals(RECORDING_ID, recordingState.getRecordingId()); + assertEquals(expectedStatus, recordingState.getRecordingState()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CommunicationIdentifierConverterUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CommunicationIdentifierConverterUnitTests.java new file mode 100644 index 000000000000..8ffdeeb2f438 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/CommunicationIdentifierConverterUnitTests.java @@ -0,0 +1,383 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callingserver.implementation.models.CommunicationCloudEnvironmentModel; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModelKind; +import com.azure.communication.callingserver.implementation.models.CommunicationUserIdentifierModel; +import com.azure.communication.callingserver.implementation.models.MicrosoftTeamsUserIdentifierModel; +import com.azure.communication.callingserver.implementation.models.PhoneNumberIdentifierModel; +import com.azure.communication.common.*; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class CommunicationIdentifierConverterUnitTests extends CallAutomationUnitTestBase { + + private final String testUserId = "User Id"; + private final String testRawId = "Raw Id"; + private final String testPhoneNumber = "+12223334444"; + private final String testPhoneNumberRawId = "4:+12223334444"; + private final String testTeamsUserId = "Microsoft Teams User Id"; + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithoutKindCommunicationUser() { + CommunicationUserIdentifierModel communicationUserIdentifierModel + = new CommunicationUserIdentifierModel().setId(testUserId); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setCommunicationUser(communicationUserIdentifierModel) + .setRawId(testRawId); + + CommunicationIdentifier got = CommunicationIdentifierConverter.convert(communicationIdentifierModel); + + CommunicationUserIdentifier expected = new CommunicationUserIdentifier(testUserId); + + assertNull(communicationIdentifierModel.getKind()); + assertEquals(expected, got); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindCommunicationUser() { + CommunicationUserIdentifierModel communicationUserIdentifierModel + = new CommunicationUserIdentifierModel().setId(testUserId); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setCommunicationUser(communicationUserIdentifierModel) + .setKind(CommunicationIdentifierModelKind.COMMUNICATION_USER) + .setRawId(testRawId); + + CommunicationIdentifier got = CommunicationIdentifierConverter.convert(communicationIdentifierModel); + + CommunicationUserIdentifier expected = new CommunicationUserIdentifier(testUserId); + + assertNotNull(communicationIdentifierModel.getKind()); + assertEquals(CommunicationIdentifierModelKind.COMMUNICATION_USER, communicationIdentifierModel.getKind()); + assertEquals(expected, got); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindCommunicationUserNoId() { + CommunicationUserIdentifierModel communicationUserIdentifierModel = new CommunicationUserIdentifierModel(); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setCommunicationUser(communicationUserIdentifierModel) + .setKind(CommunicationIdentifierModelKind.COMMUNICATION_USER) + .setRawId(testRawId); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithoutKindCommunicationUserNoId() { + CommunicationUserIdentifierModel communicationUserIdentifierModel = new CommunicationUserIdentifierModel(); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setCommunicationUser(communicationUserIdentifierModel) + .setRawId(testRawId); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindButNoCommunicationUser() { + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setKind(CommunicationIdentifierModelKind.COMMUNICATION_USER) + .setRawId(testRawId); + + CommunicationIdentifier got = CommunicationIdentifierConverter.convert(communicationIdentifierModel); + + UnknownIdentifier expected = new UnknownIdentifier(testRawId); + + assertNotNull(communicationIdentifierModel.getKind()); + assertEquals(CommunicationIdentifierModelKind.COMMUNICATION_USER, communicationIdentifierModel.getKind()); + assertEquals(expected, got); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithoutKindPhoneNumber() { + PhoneNumberIdentifierModel phoneNumberIdentifierModel + = new PhoneNumberIdentifierModel().setValue(testPhoneNumber); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setPhoneNumber(phoneNumberIdentifierModel) + .setRawId(testPhoneNumberRawId); + + CommunicationIdentifier got = CommunicationIdentifierConverter.convert(communicationIdentifierModel); + + PhoneNumberIdentifier expected = new PhoneNumberIdentifier(testPhoneNumber); + + assertNull(communicationIdentifierModel.getKind()); + assertEquals(expected, got); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindPhoneNumber() { + PhoneNumberIdentifierModel phoneNumberIdentifierModel + = new PhoneNumberIdentifierModel().setValue(testPhoneNumber); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setPhoneNumber(phoneNumberIdentifierModel) + .setKind(CommunicationIdentifierModelKind.PHONE_NUMBER) + .setRawId(testPhoneNumberRawId); + + CommunicationIdentifier got = CommunicationIdentifierConverter.convert(communicationIdentifierModel); + + PhoneNumberIdentifier expected = new PhoneNumberIdentifier(testPhoneNumber); + + assertNotNull(communicationIdentifierModel.getKind()); + assertEquals(CommunicationIdentifierModelKind.PHONE_NUMBER, communicationIdentifierModel.getKind()); + assertEquals(expected, got); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindButNoPhoneNumber() { + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setKind(CommunicationIdentifierModelKind.PHONE_NUMBER) + .setRawId(testRawId); + + CommunicationIdentifier got = CommunicationIdentifierConverter.convert(communicationIdentifierModel); + + UnknownIdentifier expected = new UnknownIdentifier(testRawId); + + assertNotNull(communicationIdentifierModel.getKind()); + assertEquals(CommunicationIdentifierModelKind.PHONE_NUMBER, communicationIdentifierModel.getKind()); + assertEquals(expected, got); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindPhoneNumberNoPhoneValue() { + PhoneNumberIdentifierModel phoneNumberIdentifierModel = new PhoneNumberIdentifierModel(); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setPhoneNumber(phoneNumberIdentifierModel) + .setKind(CommunicationIdentifierModelKind.PHONE_NUMBER) + .setRawId(testPhoneNumberRawId); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithoutKindPhoneNumberNoPhoneValue() { + PhoneNumberIdentifierModel phoneNumberIdentifierModel = new PhoneNumberIdentifierModel(); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setPhoneNumber(phoneNumberIdentifierModel) + .setRawId(testPhoneNumberRawId); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithoutKindMicrosoftTeamsUser() { + MicrosoftTeamsUserIdentifierModel microsoftTeamsUserIdentifierModel + = new MicrosoftTeamsUserIdentifierModel().setUserId(testTeamsUserId) + .setCloud(CommunicationCloudEnvironmentModel.GCCH) + .setIsAnonymous(true); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setMicrosoftTeamsUser(microsoftTeamsUserIdentifierModel) + .setRawId(testRawId); + + CommunicationIdentifier got = CommunicationIdentifierConverter.convert(communicationIdentifierModel); + + MicrosoftTeamsUserIdentifier expected + = new MicrosoftTeamsUserIdentifier(testTeamsUserId).setCloudEnvironment(CommunicationCloudEnvironment.GCCH) + .setRawId(testRawId); + + assertNull(communicationIdentifierModel.getKind()); + assertEquals(expected, got); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindMicrosoftTeamsUser() { + MicrosoftTeamsUserIdentifierModel microsoftTeamsUserIdentifierModel + = new MicrosoftTeamsUserIdentifierModel().setUserId(testTeamsUserId) + .setCloud(CommunicationCloudEnvironmentModel.GCCH) + .setIsAnonymous(true); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setMicrosoftTeamsUser(microsoftTeamsUserIdentifierModel) + .setKind(CommunicationIdentifierModelKind.MICROSOFT_TEAMS_USER) + .setRawId(testRawId); + + CommunicationIdentifier got = CommunicationIdentifierConverter.convert(communicationIdentifierModel); + + MicrosoftTeamsUserIdentifier expected + = new MicrosoftTeamsUserIdentifier(testTeamsUserId).setCloudEnvironment(CommunicationCloudEnvironment.GCCH) + .setRawId(testRawId); + + assertNotNull(communicationIdentifierModel.getKind()); + assertEquals(CommunicationIdentifierModelKind.MICROSOFT_TEAMS_USER, communicationIdentifierModel.getKind()); + assertEquals(expected, got); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindMicrosoftTeamsUserNoUserId() { + MicrosoftTeamsUserIdentifierModel microsoftTeamsUserIdentifierModel + = new MicrosoftTeamsUserIdentifierModel().setCloud(CommunicationCloudEnvironmentModel.GCCH) + .setIsAnonymous(true); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setMicrosoftTeamsUser(microsoftTeamsUserIdentifierModel) + .setKind(CommunicationIdentifierModelKind.MICROSOFT_TEAMS_USER) + .setRawId(testRawId); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithoutKindMicrosoftTeamsUserNoUserId() { + MicrosoftTeamsUserIdentifierModel microsoftTeamsUserIdentifierModel + = new MicrosoftTeamsUserIdentifierModel().setCloud(CommunicationCloudEnvironmentModel.GCCH) + .setIsAnonymous(true); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setMicrosoftTeamsUser(microsoftTeamsUserIdentifierModel) + .setRawId(testRawId); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindMicrosoftTeamsUserNoCloudEnv() { + MicrosoftTeamsUserIdentifierModel microsoftTeamsUserIdentifierModel + = new MicrosoftTeamsUserIdentifierModel().setUserId(testTeamsUserId).setIsAnonymous(true); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setMicrosoftTeamsUser(microsoftTeamsUserIdentifierModel) + .setKind(CommunicationIdentifierModelKind.MICROSOFT_TEAMS_USER) + .setRawId(testRawId); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithoutKindMicrosoftTeamsUserNoCloudEnv() { + MicrosoftTeamsUserIdentifierModel microsoftTeamsUserIdentifierModel + = new MicrosoftTeamsUserIdentifierModel().setUserId(testTeamsUserId).setIsAnonymous(true); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setMicrosoftTeamsUser(microsoftTeamsUserIdentifierModel) + .setRawId(testRawId); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindMicrosoftTeamsUserNoRawId() { + MicrosoftTeamsUserIdentifierModel microsoftTeamsUserIdentifierModel + = new MicrosoftTeamsUserIdentifierModel().setUserId(testTeamsUserId) + .setCloud(CommunicationCloudEnvironmentModel.GCCH) + .setIsAnonymous(true); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setKind(CommunicationIdentifierModelKind.MICROSOFT_TEAMS_USER) + .setMicrosoftTeamsUser(microsoftTeamsUserIdentifierModel); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithoutKindMicrosoftTeamsUserNoRawId() { + MicrosoftTeamsUserIdentifierModel microsoftTeamsUserIdentifierModel + = new MicrosoftTeamsUserIdentifierModel().setUserId(testTeamsUserId) + .setCloud(CommunicationCloudEnvironmentModel.GCCH) + .setIsAnonymous(true); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setMicrosoftTeamsUser(microsoftTeamsUserIdentifierModel); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithKindUnknownAndRawId() { + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setKind(CommunicationIdentifierModelKind.UNKNOWN); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithoutKindUnknownAndRawId() { + CommunicationIdentifierModel communicationIdentifierModel = new CommunicationIdentifierModel(); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof NullPointerException); + } + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void convertWithMultipleTypes() { + CommunicationUserIdentifierModel communicationUserIdentifierModel + = new CommunicationUserIdentifierModel().setId(testUserId); + PhoneNumberIdentifierModel phoneNumberIdentifierModel + = new PhoneNumberIdentifierModel().setValue(testPhoneNumber); + CommunicationIdentifierModel communicationIdentifierModel + = new CommunicationIdentifierModel().setCommunicationUser(communicationUserIdentifierModel) + .setPhoneNumber(phoneNumberIdentifierModel) + .setRawId(testRawId); + + try { + CommunicationIdentifierConverter.convert(communicationIdentifierModel); + } catch (Exception e) { + assert (e instanceof IllegalArgumentException); + } + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DeleteAsyncLiveTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DeleteAsyncLiveTests.java new file mode 100644 index 000000000000..bcb3d7f7880c --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DeleteAsyncLiveTests.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.core.http.HttpClient; +import com.azure.core.test.annotation.LiveOnly; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import reactor.test.StepVerifier; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +// Package marked to be deprecated +@LiveOnly() +public class DeleteAsyncLiveTests extends CallAutomationLiveTestBase { + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void deleteRecordingWithConnectionStringAsyncClient(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationAsyncClient callAutomationAsyncClient + = setupAsyncClient(builder, "deleteRecordingWithConnectionStringAsyncClient"); + deleteRecording(callAutomationAsyncClient); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void deleteRecordingWithTokenCredentialAsyncClient(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingTokenCredential(httpClient); + CallAutomationAsyncClient callAutomationAsyncClient + = setupAsyncClient(builder, "deleteRecordingWithTokenCredentialAsyncClient"); + deleteRecording(callAutomationAsyncClient); + } + + private void deleteRecording(CallAutomationAsyncClient callAutomationAsyncClient) { + StepVerifier + .create(callAutomationAsyncClient.getCallRecordingAsync().deleteRecordingWithResponse(RECORDING_DELETE_URL)) + .consumeNextWith(response -> assertEquals(200, response.getStatusCode())) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void deleteRecording401Async(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingInvalidTokenCredential(httpClient); + CallAutomationAsyncClient callAutomationAsyncClient = setupAsyncClient(builder, "deleteRecording404Async"); + StepVerifier + .create(callAutomationAsyncClient.getCallRecordingAsync().deleteRecordingWithResponse(RECORDING_DELETE_URL)) + .consumeNextWith(response -> assertEquals(401, response.getStatusCode())) + .verifyComplete(); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void deleteRecording404Async(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationAsyncClient callAutomationAsyncClient = setupAsyncClient(builder, "deleteRecording404Async"); + StepVerifier + .create( + callAutomationAsyncClient.getCallRecordingAsync().deleteRecordingWithResponse(RECORDING_DELETE_URL_404)) + .consumeNextWith(response -> assertEquals(404, response.getStatusCode())) + .verifyComplete(); + } + + private CallAutomationAsyncClient setupAsyncClient(CallAutomationClientBuilder builder, String testName) { + return addLoggingPolicy(builder, testName).buildAsyncClient(); + } + + protected CallAutomationClientBuilder addLoggingPolicy(CallAutomationClientBuilder builder, String testName) { + return builder.addPolicy((context, next) -> logHeaders(testName, next)); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DeleteLiveTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DeleteLiveTests.java new file mode 100644 index 000000000000..5139adda938a --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DeleteLiveTests.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.Response; +import com.azure.core.test.annotation.LiveOnly; +import com.azure.core.util.Context; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + +// Package marked to be deprecated +@LiveOnly() +public class DeleteLiveTests extends CallAutomationLiveTestBase { + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void deleteRecordingWithConnectionStringClient(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationClient callAutomationClient = setupClient(builder, "deleteRecordingWithConnectionStringClient"); + deleteRecording(callAutomationClient); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void deleteRecordingWithTokenCredentialClient(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingTokenCredential(httpClient); + CallAutomationClient callAutomationClient = setupClient(builder, "deleteRecordingWithTokenCredentialClient"); + deleteRecording(callAutomationClient); + } + + private void deleteRecording(CallAutomationClient callingServerAsyncClient) { + try { + Response response = callingServerAsyncClient.getCallRecording() + .deleteRecordingWithResponse(RECORDING_DELETE_URL, Context.NONE); + assertEquals(200, response.getStatusCode()); + } catch (Exception e) { + fail("Unexpected exception received", e); + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void deleteRecording401(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingInvalidTokenCredential(httpClient); + CallAutomationClient callAutomationClient = setupClient(builder, "deleteRecording404Async"); + Response response + = callAutomationClient.getCallRecording().deleteRecordingWithResponse(RECORDING_DELETE_URL, Context.NONE); + assertEquals(401, response.getStatusCode()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void deleteRecording404(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationClient callAutomationClient = setupClient(builder, "deleteRecording404Async"); + Response response = callAutomationClient.getCallRecording() + .deleteRecordingWithResponse(RECORDING_DELETE_URL_404, Context.NONE); + assertEquals(404, response.getStatusCode()); + } + + private CallAutomationClient setupClient(CallAutomationClientBuilder builder, String testName) { + return addLoggingPolicy(builder, testName).buildClient(); + } + + protected CallAutomationClientBuilder addLoggingPolicy(CallAutomationClientBuilder builder, String testName) { + return builder.addPolicy((context, next) -> logHeaders(testName, next)); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentAsyncLiveTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentAsyncLiveTests.java new file mode 100644 index 000000000000..882aa8a39df4 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentAsyncLiveTests.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.communication.callingserver.models.DownloadToFileOptions; +import com.azure.communication.callingserver.models.ParallelDownloadOptions; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.logging.LogLevel; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.test.StepVerifier; + +import java.nio.ByteBuffer; +import java.nio.channels.AsynchronousFileChannel; +import java.nio.channels.CompletionHandler; +import java.nio.charset.StandardCharsets; +import java.nio.file.Paths; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.times; + +public class DownloadContentAsyncLiveTests extends CallAutomationLiveTestBase { + private static final ClientLogger LOGGER = new ClientLogger(DownloadContentAsyncLiveTests.class); + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadMetadataWithConnectionStringAsyncClient(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationAsyncClient conversationAsyncClient + = setupAsyncClient(builder, "downloadMetadataWithConnectionStringAsyncClient"); + downloadMetadata(conversationAsyncClient); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadMetadataWithTokenCredentialAsyncClient(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingTokenCredential(httpClient); + CallAutomationAsyncClient conversationAsyncClient + = setupAsyncClient(builder, "downloadMetadataWithTokenCredentialAsyncClient"); + downloadMetadata(conversationAsyncClient); + } + + private void downloadMetadata(CallAutomationAsyncClient conversationAsyncClient) { + + try { + validateMetadata(conversationAsyncClient.getCallRecordingAsync().downloadStream(METADATA_URL)); + } catch (Exception e) { + LOGGER.log(LogLevel.VERBOSE, () -> "Error", e); + throw e; + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadMetadataRetryingAsync(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationAsyncClient conversationAsyncClient = setupAsyncClient(builder, "downloadMetadataRetryingAsync"); + + try { + validateMetadata(conversationAsyncClient.getCallRecordingAsync().downloadStream(METADATA_URL)); + } catch (Exception e) { + LOGGER.log(LogLevel.VERBOSE, () -> "Error", e); + throw e; + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadVideoAsync(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationAsyncClient conversationAsyncClient = setupAsyncClient(builder, "downloadVideoAsync"); + + try { + StepVerifier + .create(conversationAsyncClient.getCallRecordingAsync().downloadStreamWithResponse(VIDEO_URL, null)) + .consumeNextWith(response -> StepVerifier.create(response.getValue()) + .consumeNextWith(byteBuffer -> assertEquals(byteBuffer.array().length, + Integer.parseInt(response.getHeaders().getValue(HttpHeaderName.CONTENT_LENGTH)))) + .verifyComplete()) + .verifyComplete(); + } catch (Exception e) { + LOGGER.log(LogLevel.VERBOSE, () -> "Error", e); + throw e; + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadToFileAsync(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationAsyncClient conversationAsyncClient = setupAsyncClient(builder, "downloadToFileAsync"); + AsynchronousFileChannel channel = Mockito.mock(AsynchronousFileChannel.class); + + doAnswer(invocation -> { + ByteBuffer stream = invocation.getArgument(0); + CompletionHandler completionHandler = invocation.getArgument(3); + completionHandler.completed(439, stream.position(stream.limit())); + return null; + }).doAnswer(invocation -> { + ByteBuffer stream = invocation.getArgument(0); + CompletionHandler completionHandler = invocation.getArgument(3); + completionHandler.completed(438, stream.position(stream.limit())); + return null; + }).when(channel).write(any(ByteBuffer.class), anyLong(), any(), any()); + + ParallelDownloadOptions parallelOptions = new ParallelDownloadOptions().setBlockSize(479L); + DownloadToFileOptions options = new DownloadToFileOptions().setParallelDownloadOptions(parallelOptions); + conversationAsyncClient.getCallRecordingAsync() + .downloadToWithResponse(METADATA_URL, Paths.get("dummyPath"), channel, options, Context.NONE) + .block(); + + Mockito.verify(channel, times(2)).write(any(ByteBuffer.class), anyLong(), any(), any()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadToFileRetryingAsync(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationAsyncClient conversationAsyncClient = setupAsyncClient(builder, "downloadToFileRetryingAsync"); + AsynchronousFileChannel channel = Mockito.mock(AsynchronousFileChannel.class); + + doAnswer(invocation -> { + ByteBuffer stream = invocation.getArgument(0); + String metadata = new String(stream.array(), StandardCharsets.UTF_8); + assertTrue(metadata.contains("0-eus-d2-3cca2175891f21c6c9a5975a12c0141c")); + CompletionHandler completionHandler = invocation.getArgument(3); + completionHandler.completed(957, stream.position(stream.limit())); + return null; + }).when(channel).write(any(ByteBuffer.class), anyLong(), any(), any()); + + conversationAsyncClient.getCallRecordingAsync() + .downloadToWithResponse(METADATA_URL, Paths.get("dummyPath"), channel, new DownloadToFileOptions(), + Context.NONE) + .block(); + + Mockito.verify(channel).write(any(ByteBuffer.class), anyLong(), any(), any()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadContent404Async(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationAsyncClient conversationAsyncClient = setupAsyncClient(builder, "downloadContent404Async"); + StepVerifier + .create(conversationAsyncClient.getCallRecordingAsync().downloadStreamWithResponse(CONTENT_URL_404, null)) + .consumeNextWith(response -> { + assertEquals(404, response.getStatusCode()); + StepVerifier.create(response.getValue()).verifyError(CallingServerErrorException.class); + }) + .verifyComplete(); + } + + private CallAutomationAsyncClient setupAsyncClient(CallAutomationClientBuilder builder, String testName) { + return addLoggingPolicy(builder, testName).buildAsyncClient(); + } + + protected CallAutomationClientBuilder addLoggingPolicy(CallAutomationClientBuilder builder, String testName) { + return builder.addPolicy((context, next) -> logHeaders(testName, next)); + } + + private void validateMetadata(Flux metadataByteBuffer) { + StepVerifier.create(metadataByteBuffer).consumeNextWith(byteBuffer -> { + String metadata = new String(byteBuffer.array(), StandardCharsets.UTF_8); + assertTrue(metadata.contains("0-eus-d2-3cca2175891f21c6c9a5975a12c0141c"), + "Expected " + metadata + " to contain '0-eus-d2-3cca2175891f21c6c9a5975a12c0141c'."); + }).verifyComplete(); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentAsyncUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentAsyncUnitTests.java new file mode 100644 index 000000000000..b5680abebed4 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentAsyncUnitTests.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.nio.file.FileSystems; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collections; +import java.util.UUID; +import java.util.AbstractMap.SimpleEntry; + +import com.azure.communication.callingserver.models.DownloadToFileOptions; +import com.azure.communication.callingserver.models.ParallelDownloadOptions; +import com.azure.core.http.HttpRange; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import reactor.core.publisher.Flux; +import reactor.test.StepVerifier; + +public class DownloadContentAsyncUnitTests { + + private static final String CONTENTS = "VideoContents"; + private static final String AMS_ENDPOINT = "https://url.com"; + + private CallRecordingAsync callRecording; + + @BeforeEach + public void setup() { + CallAutomationAsyncClient callingServerClient + = CallAutomationUnitTestBase.getCallAutomationAsyncClient(new ArrayList<>(Collections + .singletonList(new SimpleEntry<>(CallAutomationUnitTestBase.generateDownloadResult(CONTENTS), 200)))); + callRecording = callingServerClient.getCallRecordingAsync(); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadStream() { + StepVerifier.create(callRecording.downloadStream(AMS_ENDPOINT)).consumeNextWith(byteBuffer -> { + String resultContents = new String(byteBuffer.array(), StandardCharsets.UTF_8); + assertEquals(CONTENTS, resultContents); + }).verifyComplete(); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadStreamWithResponse() { + StepVerifier.create(callRecording.downloadStreamWithResponse(AMS_ENDPOINT, new HttpRange(CONTENTS.length()))) + .consumeNextWith(response -> { + assertEquals(200, response.getStatusCode()); + verifyContents(response.getValue()); + }) + .verifyComplete(); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadStreamWithResponseThrowException() { + CallAutomationAsyncClient callingServerClient = CallAutomationUnitTestBase + .getCallAutomationAsyncClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 416)))); + callRecording = callingServerClient.getCallRecordingAsync(); + + StepVerifier.create(callRecording.downloadStreamWithResponse(AMS_ENDPOINT, new HttpRange(CONTENTS.length()))) + .consumeNextWith( + response -> StepVerifier.create(response.getValue()).verifyError(NullPointerException.class)); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadToWithResponse() throws IOException { + String fileName = "./" + UUID.randomUUID().toString().replace("-", "") + ".txt"; + Path path = FileSystems.getDefault().getPath(fileName); + ParallelDownloadOptions parallelOptions = new ParallelDownloadOptions().setMaxConcurrency(1).setBlockSize(512L); + DownloadToFileOptions options + = new DownloadToFileOptions().setParallelDownloadOptions(parallelOptions).setOverwrite(true); + File file = null; + + try { + StepVerifier.create(callRecording.downloadToWithResponse(AMS_ENDPOINT, path, options)) + .consumeNextWith(response -> assertEquals(200, response.getStatusCode())) + .verifyComplete(); + + file = path.toFile(); + assertTrue(file.exists(), "file does not exist"); + BufferedReader br = new BufferedReader(new FileReader(file)); + assertEquals(CONTENTS, br.readLine()); + br.close(); + } finally { + if (file != null && file.exists()) { + assertTrue(file.delete()); + } + } + } + + private void verifyContents(Flux response) { + StepVerifier.create(response).consumeNextWith(byteBuffer -> { + String resultContents = new String(byteBuffer.array(), StandardCharsets.UTF_8); + assertEquals(CONTENTS, resultContents); + }).verifyComplete(); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentLiveTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentLiveTests.java new file mode 100644 index 000000000000..7c0f474435b9 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentLiveTests.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.CallingServerErrorException; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.Response; +import com.azure.core.test.annotation.LiveOnly; +import com.azure.core.util.Context; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.UncheckedIOException; +import java.io.UnsupportedEncodingException; +import java.nio.charset.StandardCharsets; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; +import static org.mockito.Mockito.doThrow; + +// Package marked to be deprecated +@LiveOnly() +public class DownloadContentLiveTests extends CallAutomationLiveTestBase { + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadMetadataWithConnectionStringClient(HttpClient httpClient) throws UnsupportedEncodingException { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationClient conversationClient = setupClient(builder, "downloadMetadataWithConnectionStringClient"); + downloadMetadata(conversationClient.getCallRecording()); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadMetadataWithTokenCredentialClient(HttpClient httpClient) throws UnsupportedEncodingException { + CallAutomationClientBuilder builder = getCallingServerClientUsingTokenCredential(httpClient); + CallAutomationClient conversationClient = setupClient(builder, "downloadMetadataWithTokenCredentialClient"); + downloadMetadata(conversationClient.getCallRecording()); + } + + private void downloadMetadata(CallRecording callRecording) throws UnsupportedEncodingException { + try { + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + callRecording.downloadTo(METADATA_URL, byteArrayOutputStream); + String metadata = byteArrayOutputStream.toString(StandardCharsets.UTF_8.name()); + assertTrue(metadata.contains("0-eus-d2-3cca2175891f21c6c9a5975a12c0141c"), + "Expected " + metadata + " to contain '0-eus-d2-3cca2175891f21c6c9a5975a12c0141c'."); + } catch (Exception e) { + fail("Unexpected exception received", e); + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadVideo(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationClient conversationClient = setupClient(builder, "downloadVideo"); + + try { + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + Response response = conversationClient.getCallRecording() + .downloadToWithResponse(VIDEO_URL, byteArrayOutputStream, null, Context.NONE); + assertNotNull(response); + assertEquals("application/octet-stream", response.getHeaders().getValue(HttpHeaderName.CONTENT_TYPE)); + assertEquals(byteArrayOutputStream.size(), + Integer.parseInt(response.getHeaders().getValue(HttpHeaderName.CONTENT_LENGTH))); + } catch (Exception e) { + fail("Unexpected exception received", e); + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadContent404(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationClient conversationClient = setupClient(builder, "downloadContent404"); + + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + CallingServerErrorException ex = assertThrows(CallingServerErrorException.class, + () -> conversationClient.getCallRecording().downloadTo(CONTENT_URL_404, byteArrayOutputStream)); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadContentWrongUrl(HttpClient httpClient) { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationClient conversationClient = setupClient(builder, "downloadContentWrongUrl"); + + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + IllegalArgumentException ex = assertThrows(IllegalArgumentException.class, + () -> conversationClient.getCallRecording().downloadTo("wrongurl", byteArrayOutputStream)); + assertNotNull(ex); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + @DisabledIfEnvironmentVariable( + named = "SKIP_LIVE_TEST", + matches = "(?i)(true)", + disabledReason = "Requires human intervention") + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadContentStreamFailure(HttpClient httpClient) throws IOException { + CallAutomationClientBuilder builder = getCallingServerClientUsingConnectionString(httpClient); + CallAutomationClient conversationClient = setupClient(builder, "downloadContent404"); + + OutputStream outputStream = Mockito.mock(OutputStream.class); + doThrow(IOException.class).when(outputStream).write(Mockito.any(), Mockito.anyInt(), Mockito.anyInt()); + assertThrows(UncheckedIOException.class, + () -> conversationClient.getCallRecording().downloadTo(METADATA_URL, outputStream)); + } + + private CallAutomationClient setupClient(CallAutomationClientBuilder builder, String testName) { + return addLoggingPolicy(builder, testName).buildClient(); + } + + protected CallAutomationClientBuilder addLoggingPolicy(CallAutomationClientBuilder builder, String testName) { + return builder.addPolicy((context, next) -> logHeaders(testName, next)); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentUnitTests.java new file mode 100644 index 000000000000..44806bd2aa2d --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/DownloadContentUnitTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Reader; +import java.util.ArrayList; +import java.util.AbstractMap.SimpleEntry; +import java.util.Collections; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class DownloadContentUnitTests { + + private static final String CONTENT = "VideoContents"; + private static final String AMS_ENDPOINT = "https://url.com"; + private CallRecording callRecording; + + @BeforeEach + public void setUp() { + CallAutomationClient callAutomationClient + = CallAutomationUnitTestBase.getCallAutomationClient(new ArrayList<>(Collections + .singletonList(new SimpleEntry<>(CallAutomationUnitTestBase.generateDownloadResult(CONTENT), 200)))); + callRecording = callAutomationClient.getCallRecording(); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadTo() throws IOException { + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + callRecording.downloadTo(AMS_ENDPOINT, stream); + Reader reader = new InputStreamReader(new ByteArrayInputStream(stream.toByteArray())); + BufferedReader b = new BufferedReader(reader); + assertEquals(CONTENT, b.readLine()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void downloadToWithResponse() throws IOException { + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + Response response = callRecording.downloadToWithResponse(AMS_ENDPOINT, stream, null, Context.NONE); + assertEquals(200, response.getStatusCode()); + Reader reader = new InputStreamReader(new ByteArrayInputStream(stream.toByteArray())); + BufferedReader b = new BufferedReader(reader); + assertEquals(CONTENT, b.readLine()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/EventHandlerUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/EventHandlerUnitTests.java new file mode 100644 index 000000000000..6a96f9d41926 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/EventHandlerUnitTests.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.models.RecordingState; +import com.azure.communication.callingserver.models.events.CallAutomationEventBase; +import com.azure.communication.callingserver.models.events.CallConnectedEvent; +import com.azure.communication.callingserver.models.events.ParticipantsUpdatedEvent; +import com.azure.communication.callingserver.models.events.PlayCompleted; +import com.azure.communication.callingserver.models.events.PlayFailed; +import com.azure.communication.callingserver.models.events.RecordingStateChangedEvent; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class EventHandlerUnitTests { + static final String EVENT_PARTICIPANT_UPDATED + = "{\"id\":\"61069ef9-5ca9-457f-ac36-e2bb5e8400ca\",\"source\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/ParticipantsUpdated\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"rawId\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff6-dd51-54b7-a43a0d001998\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff6-dd51-54b7-a43a0d001998\"}},{\"rawId\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff7-1579-99bf-a43a0d0010bc\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff7-1579-99bf-a43a0d0010bc\"}}],\"type\":\"participantsUpdated\",\"callConnectionId\":\"401f3500-62bd-46a9-8c09-9e1b06caca01\",\"correlationId\":\"ebd8bf1f-0794-494f-bdda-913042c06ef7\"},\"time\":\"2022-08-12T03:35:07.9129474+00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/ParticipantsUpdated\"}"; + static final String EVENT_CALL_CONNECTED + = "{\"id\":\"46116fb7-27e0-4a99-9478-a659c8fd4815\",\"source\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/CallConnected\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"type\":\"callConnected\",\"callConnectionId\":\"401f3500-62bd-46a9-8c09-9e1b06caca01\",\"correlationId\":\"ebd8bf1f-0794-494f-bdda-913042c06ef7\"},\"time\":\"2022-08-12T03:35:07.8174402+00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/CallConnected\"}"; + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void parseEvent() { + CallAutomationEventBase callAutomationEventBase = EventHandler.parseEvent(EVENT_PARTICIPANT_UPDATED); + + assertNotNull(callAutomationEventBase); + assertEquals(callAutomationEventBase.getClass(), ParticipantsUpdatedEvent.class); + assertNotNull(((ParticipantsUpdatedEvent) callAutomationEventBase).getParticipants()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void parseEventList() { + List callAutomationEventBaseList + = EventHandler.parseEventList("[" + EVENT_CALL_CONNECTED + "," + EVENT_PARTICIPANT_UPDATED + "]"); + + assertNotNull(callAutomationEventBaseList); + assertEquals(callAutomationEventBaseList.get(0).getClass(), CallConnectedEvent.class); + assertEquals(callAutomationEventBaseList.get(1).getClass(), ParticipantsUpdatedEvent.class); + assertNotNull(callAutomationEventBaseList.get(0).getCallConnectionId()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void parseRecordingStateChangedEvent() { + String receivedEvent = "[\n" + " {\n" + " \"id\": \"bf59843a-888f-47ca-8d1c-885c1f5e71dc\",\n" + + " \"source\": \"calling/recordings/serverCallId/recordingId/recordingId/RecordingStateChanged\",\n" + + " \"type\": \"Microsoft.Communication.CallRecordingStateChanged\",\n" + " \"data\": {\n" + + " \"type\": \"recordingStateChanged\",\n" + " \"recordingId\": \"recordingId\",\n" + + " \"state\": \"active\",\n" + + " \"startDateTime\": \"2022-08-11T23:42:45.4394211+00:00\",\n" + + " \"callConnectionId\": \"callConnectionId\",\n" + + " \"serverCallId\": \"serverCallId\",\n" + " \"correlationId\": \"correlationId\"\n" + + " },\n" + " \"time\": \"2022-08-11T23:42:45.5346632+00:00\",\n" + + " \"specversion\": \"1.0\",\n" + " \"datacontenttype\": \"application/json\",\n" + + " \"subject\": \"calling/recordings/serverCallId/recordingId/recordingId/RecordingStateChanged\"\n" + + " }\n" + "]"; + CallAutomationEventBase event = EventHandler.parseEvent(receivedEvent); + assertNotNull(event); + RecordingStateChangedEvent recordingEvent = (RecordingStateChangedEvent) event; + assertNotNull(recordingEvent); + assertEquals("serverCallId", recordingEvent.getServerCallId()); + assertEquals("recordingId", recordingEvent.getRecordingId()); + assertEquals(RecordingState.ACTIVE, recordingEvent.getRecordingState()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void parsePlayCompletedEvent() { + String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" + + "\"source\": \"calling/callConnections/callConnectionId/PlayCompleted\",\n" + + "\"type\": \"Microsoft.Communication.PlayCompleted\",\n" + "\"data\": {\n" + "\"resultInfo\": {\n" + + "\"code\": 200,\n" + "\"subCode\": 0,\n" + "\"message\": \"Action completed successfully.\"\n" + "},\n" + + "\"type\": \"playCompleted\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" + + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" + + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" + + "\"datacontenttype\": \"application/json\",\n" + + "\"subject\": \"calling/callConnections/callConnectionId/PlayCompleted\"\n" + "}]"; + CallAutomationEventBase event = EventHandler.parseEvent(receivedEvent); + assertNotNull(event); + PlayCompleted playCompleted = (PlayCompleted) event; + assertNotNull(playCompleted); + assertEquals("serverCallId", playCompleted.getServerCallId()); + assertEquals(200, playCompleted.getResultInfo().getCode()); + } + + @Test + @Disabled("Disabling test as calling sever is in the process of decommissioning") + public void parsePlayFailedEvent() { + String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" + + "\"source\": \"calling/callConnections/callConnectionId/PlayFailed\",\n" + + "\"type\": \"Microsoft.Communication.PlayFailed\",\n" + "\"data\": {\n" + "\"resultInfo\": {\n" + + "\"code\": 404,\n" + "\"subCode\": 0,\n" + "\"message\": \"File source was not found\"\n" + "},\n" + + "\"type\": \"playFailed\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" + + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" + + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" + + "\"datacontenttype\": \"application/json\",\n" + + "\"subject\": \"calling/callConnections/callConnectionId/PlayFailed\"\n" + "}]"; + CallAutomationEventBase event = EventHandler.parseEvent(receivedEvent); + assertNotNull(event); + PlayFailed playFailed = (PlayFailed) event; + assertNotNull(playFailed); + assertEquals("serverCallId", playFailed.getServerCallId()); + assertEquals(404, playFailed.getResultInfo().getCode()); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/MockHttpClient.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/MockHttpClient.java new file mode 100644 index 000000000000..681d40d3681b --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/MockHttpClient.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import java.util.ArrayList; +import java.util.List; +import java.util.AbstractMap.SimpleEntry; + +import com.azure.communication.callingserver.implementation.accesshelpers.ErrorConstructorProxy; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; + +import com.azure.core.test.http.NoOpHttpClient; +import reactor.core.publisher.Mono; + +public class MockHttpClient extends NoOpHttpClient { + public static final String THROW_TEST_EXCEPTION = "exception"; + private ArrayList> responses = new ArrayList>(); + private final ArrayList requests = new ArrayList(); + + public MockHttpClient(ArrayList> responses) { + this.responses = responses; + } + + public List getRequests() { + return requests; + } + + @Override + public Mono send(HttpRequest request) { + requests.add(request); + + if (responses.size() > 0) { + SimpleEntry entry = responses.get(0); + responses.remove(entry); + HttpResponse response + = CallAutomationUnitTestBase.generateMockResponse(entry.getKey(), request, entry.getValue()); + if (entry.getKey().startsWith(THROW_TEST_EXCEPTION)) { + return Mono.error(ErrorConstructorProxy.create(new HttpResponseException("Mock error", response))); + } + + return Mono + .just(CallAutomationUnitTestBase.generateMockResponse(entry.getKey(), request, entry.getValue())); + } + + return Mono.just(CallAutomationUnitTestBase.generateMockResponse("", request, 500)); + } +} diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/ModelGenerator.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/ModelGenerator.java new file mode 100644 index 000000000000..4e185a6802ff --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/ModelGenerator.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callingserver; + +import com.azure.communication.callingserver.implementation.models.AcsCallParticipantInternal; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.callingserver.implementation.models.CommunicationIdentifierModelKind; +import com.azure.communication.callingserver.implementation.models.CommunicationUserIdentifierModel; + +public class ModelGenerator { + static CommunicationIdentifierModel generateUserIdentifierModel(String userId) { + return new CommunicationIdentifierModel().setRawId("rawId") + .setKind(CommunicationIdentifierModelKind.COMMUNICATION_USER) + .setCommunicationUser(new CommunicationUserIdentifierModel().setId(userId)); + } + + static AcsCallParticipantInternal generateAcsCallParticipantInternal(String callerId, boolean isMuted) { + return new AcsCallParticipantInternal().setIdentifier(ModelGenerator.generateUserIdentifierModel(callerId)) + .setIsMuted(isMuted); + } +} diff --git a/sdk/communication/azure-communication-callingserver/swagger/README.md b/sdk/communication/azure-communication-callingserver/swagger/README.md new file mode 100644 index 000000000000..79fde0d3d1f0 --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/swagger/README.md @@ -0,0 +1,278 @@ +# Azure Communication Calling Service client library for Java + +> see https://aka.ms/autorest +## Getting Started + +To build the SDK for Server Calling Client, simply Install AutoRest and in this folder, run: + +### Setup +```ps +Fork and clone https://github.com/Azure/autorest.java +git checkout main +git submodule update --init --recursive +mvn package -Dlocal +npm install +npm install -g autorest +``` + +### Generation + +There is one swagger for Calling management APIs. + +```ps +cd +autorest README.md --java --v4 --use=@autorest/java@4.0.20 --use=@autorest/modelerfour@4.15.442 +``` + +## Update generated files for server calling service +To update generated files for calling service, run the following command + +> autorest README.md --java --v4 --use=@autorest/java@4.0.20 --use=@autorest/modelerfour@4.15.442 + +### Code generation settings +``` yaml +tag: package-2022-04-07-preview +require: + - https://github.com/richardcho-msft/azure-rest-api-specs/blob/dev-communication-CallingServer-2022-04-07-preview/specification/communication/data-plane/CallingServer/readme.md +java: true +output-folder: ..\ +license-header: MICROSOFT_MIT_SMALL +namespace: com.azure.communication.callingserver +custom-types: ToneValue,OperationStatus,CallRecordingState,CallConnectionState,EventSubscriptionType,MediaType,RecordingChannelType,RecordingContentType,RecordingFormatType +custom-types-subpackage: models +generate-client-as-impl: true +service-interface-as-public: true +models-subpackage: implementation.models +sync-methods: all +add-context-parameter: true +context-client-method-parameter: true +title: Azure Communication CallingServer Service +directive: +- rename-model: + from: AcsCallParticipant + to: AcsCallParticipantInternal +- rename-model: + from: AddParticipantsRequest + to: AddParticipantsRequestInternal +- rename-model: + from: AddParticipantsResponse + to: AddParticipantsResponseInternal +- rename-model: + from: CallConnectionProperties + to: CallConnectionPropertiesInternal +- rename-model: + from: CallingOperationResultDetails + to: CallingOperationResultDetailsInternal +- rename-model: + from: CallingOperationStatus + to: CallingOperationStatusInternal +- rename-model: + from: CallSource + to: CallSourceInternal +- rename-model: + from: CommunicationCloudEnvironmentModel + to: CommunicationCloudEnvironmentInternal +- rename-model: + from: GetParticipantsResponse + to: GetParticipantsResponseInternal +- rename-model: + from: RemoveParticipantsRequest + to: RemoveParticipantsRequestInternal +- rename-model: + from: RemoveParticipantsResponse + to: RemoveParticipantsResponseInternal +- rename-model: + from: TransferCallResponse + to: TransferCallResponseInternal +- rename-model: + from: TransferToParticipantRequest + to: TransferToParticipantRequestInternal +- rename-model: + from: CreateCallRequest + to: CreateCallRequestInternal +- rename-model: + from: AnswerCallRequest + to: AnswerCallRequestInternal +- rename-model: + from: RedirectCallRequest + to: RedirectCallRequestInternal +- rename-model: + from: RejectCallRequest + to: RejectCallRequestInternal +- rename-model: + from: CallLocator + to: CallLocatorInternal +- rename-model: + from: RecordingIdResponse + to: RecordingIdResponseInternal +- rename-model: + from: RecordingStateResponse + to: RecordingStateResponseInternal +- rename-model: + from: PlayResponse + to: PlayResponseInternal +- rename-model: + from: PlaySource + to: PlaySourceInternal +- rename-model: + from: FileSource + to: FileSourceInternal +- rename-model: + from: PlayOptions + to: PlayOptionsInternal +- rename-model: + from: StartCallRecordingRequest + to: StartCallRecordingRequestInternal +- rename-model: + from: ChannelAffinity + to: ChannelAffinityInternal +- rename-model: + from: DtmfConfigurations + to: DtmfConfigurationsInternal +- rename-model: + from: RecognizeConfigurations + to: RecognizeConfigurationsInternal +- rename-model: + from: MediaStreamingConfiguration + to: MediaStreamingConfigurationInternal + +# Remove models +- remove-model: AddParticipantsFailedEvent +- remove-model: AddParticipantsSucceededEvent +- remove-model: CallConnectedEvent +- remove-model: CallDisconnectedEvent +- remove-model: CallTransferAcceptedEvent +- remove-model: CallTransferFailedEvent +- remove-model: ParticipantsUpdatedEvent +- remove-model: RecordingStateChangedEvent +- remove-model: PlayCompleted +- remove-model: PlayFailed +- remove-model: ResultInfo +``` + +### Rename RecordingChannelType to RecordingChannelInternal +``` yaml +directive: + - from: swagger-document + where: $.definitions.RecordingChannelType + transform: > + $["x-ms-enum"].name = "RecordingChannelInternal"; +``` + +### Rename RecordingContentType to RecordingContentInternal +``` yaml +directive: + - from: swagger-document + where: $.definitions.RecordingContentType + transform: > + $["x-ms-enum"].name = "RecordingContentInternal"; +``` + +### Rename RecordingFormatType to RecordingFormatInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.RecordingFormatType["x-ms-enum"] + transform: > + $.name = "RecordingFormatInternal"; +``` + +### Rename RecordingState to RecordingStateInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.RecordingState["x-ms-enum"] + transform: > + $.name = "RecordingStateInternal"; +``` + +### Rename PlaySourceType to PlaySourceTypeInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.PlaySourceType["x-ms-enum"] + transform: > + $.name = "PlaySourceTypeInternal"; +``` + +### Rename CallLocatorKind to CallLocatorKindInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.CallLocatorKind["x-ms-enum"] + transform: > + $.name = "CallLocatorKindInternal"; +``` + +### Rename CallConnectionStateModel to CallConnectionStateModelInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.CallConnectionStateModel["x-ms-enum"] + transform: > + $.name = "CallConnectionStateModelInternal"; +``` + +### Rename AcsEventType to AcsEventTypeInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.AcsEventType["x-ms-enum"] + transform: > + $.name = "AcsEventTypeInternal"; +``` + +### Rename CallRejectReason to CallRejectReasonInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.CallRejectReason["x-ms-enum"] + transform: > + $.name = "CallRejectReasonInternal"; +``` + +### Rename StopTones to StopTonesInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.StopTones["x-ms-enum"] + transform: > + $.name = "StopTonesInternal"; +``` + + +### Rename RecognizeInputType to RecognizeInputTypeInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.RecognizeInputType["x-ms-enum"] + transform: > + $.name = "RecognizeInputTypeInternal"; +``` + +### Rename MediaStreamingAudioChannelType to MediaStreamingAudioChannelTypeInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.MediaStreamingAudioChannelType["x-ms-enum"] + transform: > + $.name = "MediaStreamingAudioChannelTypeInternal"; +``` + +### Rename MediaStreamingContentType to MediaStreamingContentTypeInternal +``` yaml +directive: +- from: swagger-document + where: $.definitions.MediaStreamingContentType["x-ms-enum"] + transform: > + $.name = "MediaStreamingContentTypeInternal"; +``` + +### Rename MediaStreamingTransportType to MediaStreamingTransportType +``` yaml +directive: +- from: swagger-document + where: $.definitions.MediaStreamingTransportType["x-ms-enum"] + transform: > + $.name = "MediaStreamingTransportTypeInternal"; +``` diff --git a/sdk/communication/azure-communication-callingserver/tests.yml b/sdk/communication/azure-communication-callingserver/tests.yml new file mode 100644 index 000000000000..dbbc185980ce --- /dev/null +++ b/sdk/communication/azure-communication-callingserver/tests.yml @@ -0,0 +1,8 @@ +trigger: none + +extends: + template: /sdk/communication/communication-tests-template.yml + parameters: + PackageName: azure-communication-callingserver + SafeName: azurecommunicationcallingserver + TestMode: 'LIVE' diff --git a/sdk/communication/azure-communication-common/pom.xml b/sdk/communication/azure-communication-common/pom.xml index f52555fe1afd..da9da743a7f2 100644 --- a/sdk/communication/azure-communication-common/pom.xml +++ b/sdk/communication/azure-communication-common/pom.xml @@ -80,6 +80,12 @@ 5.13.4 test
      + + io.projectreactor + reactor-test + 3.7.19 + test + com.azure azure-core-test diff --git a/sdk/communication/azure-communication-jobrouter/pom.xml b/sdk/communication/azure-communication-jobrouter/pom.xml index 810722db9d86..835fd5291fe2 100644 --- a/sdk/communication/azure-communication-jobrouter/pom.xml +++ b/sdk/communication/azure-communication-jobrouter/pom.xml @@ -100,6 +100,20 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + 3.6.3 + + + + + com.azure:* + + + + +
      diff --git a/sdk/communication/pom.xml b/sdk/communication/pom.xml index e751203ec43b..b3834304553d 100644 --- a/sdk/communication/pom.xml +++ b/sdk/communication/pom.xml @@ -10,6 +10,7 @@ 1.0.0 + azure-communication-callingserver azure-communication-callautomation azure-communication-chat azure-communication-common diff --git a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md index 20ca79a07d96..2dc878be4ba7 100644 --- a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md +++ b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.63.0-beta.1 (Unreleased) +## 2.62.0-beta.1 (Unreleased) ### Features Added @@ -10,29 +10,6 @@ ### Other Changes -## 2.62.0 (2026-10-15) - -- Package api-version Compute: 2026-04-01, ComputeDisk: 2026-03-02, ComputeGallery: 2026-03-03, ComputeSku: 2021-07-01. - -### Features Added - -* `models.FlexProfile` was added - -#### `models.VirtualMachineScaleSetIpConfiguration` was modified - -* `privateIPAddressPrefixLength()` was added -* `withPrivateIPAddressPrefixLength(java.lang.Integer)` was added - -#### `models.VirtualMachineScaleSetUpdateIpConfiguration` was modified - -* `privateIPAddressPrefixLength()` was added -* `withPrivateIPAddressPrefixLength(java.lang.Integer)` was added - -#### `models.VirtualMachineNetworkInterfaceIpConfiguration` was modified - -* `privateIPAddressPrefixLength()` was added -* `withPrivateIPAddressPrefixLength(java.lang.Integer)` was added - ## 2.61.2 (2026-10-09) ### Other Changes diff --git a/sdk/compute/azure-resourcemanager-compute/README.md b/sdk/compute/azure-resourcemanager-compute/README.md index dce8f25e6188..c3558625792b 100644 --- a/sdk/compute/azure-resourcemanager-compute/README.md +++ b/sdk/compute/azure-resourcemanager-compute/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-compute - 2.62.0 + 2.61.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/compute/azure-resourcemanager-compute/pom.xml b/sdk/compute/azure-resourcemanager-compute/pom.xml index 5d0d1057b5ed..a93cac23b976 100644 --- a/sdk/compute/azure-resourcemanager-compute/pom.xml +++ b/sdk/compute/azure-resourcemanager-compute/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-compute - 2.63.0-beta.1 + 2.62.0-beta.1 jar Microsoft Azure SDK for Compute Management @@ -76,12 +76,12 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 com.azure.resourcemanager azure-resourcemanager-network - 2.62.0 + 2.61.2 com.azure.resourcemanager diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationGroupsClient.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationGroupsClient.java index 51783bdd84df..b748ca2a2813 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationGroupsClient.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationGroupsClient.java @@ -9,10 +9,7 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.compute.fluent.models.CapacityReservationGroupInner; import com.azure.resourcemanager.compute.models.CapacityReservationGroupInstanceViewTypes; import com.azure.resourcemanager.compute.models.CapacityReservationGroupUpdate; @@ -21,8 +18,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -249,55 +244,7 @@ CapacityReservationGroupInner update(String resourceGroupName, String capacityRe * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, - String capacityReservationGroupName); - - /** - * The operation to delete a capacity reservation group. This operation is allowed only if all the associated - * resources are disassociated from the reservation group and all capacity reservations under the reservation group - * have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param capacityReservationGroupName The name of the capacity reservation group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String capacityReservationGroupName); - - /** - * The operation to delete a capacity reservation group. This operation is allowed only if all the associated - * resources are disassociated from the reservation group and all capacity reservations under the reservation group - * have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param capacityReservationGroupName The name of the capacity reservation group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String capacityReservationGroupName); - - /** - * The operation to delete a capacity reservation group. This operation is allowed only if all the associated - * resources are disassociated from the reservation group and all capacity reservations under the reservation group - * have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param capacityReservationGroupName The name of the capacity reservation group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String capacityReservationGroupName, - Context context); + Mono> deleteWithResponseAsync(String resourceGroupName, String capacityReservationGroupName); /** * The operation to delete a capacity reservation group. This operation is allowed only if all the associated @@ -321,12 +268,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param capacityReservationGroupName The name of the capacity reservation group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String capacityReservationGroupName); + Response deleteWithResponse(String resourceGroupName, String capacityReservationGroupName, Context context); /** * The operation to delete a capacity reservation group. This operation is allowed only if all the associated @@ -335,13 +284,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param capacityReservationGroupName The name of the capacity reservation group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String capacityReservationGroupName, Context context); + void delete(String resourceGroupName, String capacityReservationGroupName); /** * Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java index cb33495ebad5..11a9d0ac6e90 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java @@ -17,7 +17,6 @@ import com.azure.resourcemanager.compute.models.CapacityReservationProfile; import com.azure.resourcemanager.compute.models.DiagnosticsProfile; import com.azure.resourcemanager.compute.models.ExtendedLocation; -import com.azure.resourcemanager.compute.models.FlexProfile; import com.azure.resourcemanager.compute.models.HardwareProfile; import com.azure.resourcemanager.compute.models.InterconnectBlockProfile; import com.azure.resourcemanager.compute.models.NetworkProfile; @@ -347,43 +346,6 @@ public VirtualMachineInner withHardwareProfile(HardwareProfile hardwareProfile) return this; } - /** - * Get the flexProfile property: [Preview Feature] Specifies a FlexProfile for VM size. Azure may deploy a - * compatible alternative VM size based on capacity and placement considerations, and returns the deployed size in - * hardwareProfile.vmSize. A request that adds flexProfile must omit hardwareProfile.vmSize. For a virtual machine - * that uses FlexProfile, a hardwareProfile.vmSize equal to the deployed size is ignored, so a GET response can be - * sent back unchanged. A PATCH request that omits flexProfile keeps it. A PUT request that omits flexProfile and - * sets hardwareProfile.vmSize clears it. This property cannot exist along with a non-null - * properties.availabilitySet, properties.capacityReservation, properties.host, properties.hostGroup, - * properties.proximityPlacementGroup or properties.virtualMachineScaleSet. - * - * @return the flexProfile value. - */ - public FlexProfile flexProfile() { - return this.innerProperties() == null ? null : this.innerProperties().flexProfile(); - } - - /** - * Set the flexProfile property: [Preview Feature] Specifies a FlexProfile for VM size. Azure may deploy a - * compatible alternative VM size based on capacity and placement considerations, and returns the deployed size in - * hardwareProfile.vmSize. A request that adds flexProfile must omit hardwareProfile.vmSize. For a virtual machine - * that uses FlexProfile, a hardwareProfile.vmSize equal to the deployed size is ignored, so a GET response can be - * sent back unchanged. A PATCH request that omits flexProfile keeps it. A PUT request that omits flexProfile and - * sets hardwareProfile.vmSize clears it. This property cannot exist along with a non-null - * properties.availabilitySet, properties.capacityReservation, properties.host, properties.hostGroup, - * properties.proximityPlacementGroup or properties.virtualMachineScaleSet. - * - * @param flexProfile the flexProfile value to set. - * @return the VirtualMachineInner object itself. - */ - public VirtualMachineInner withFlexProfile(FlexProfile flexProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new VirtualMachinePropertiesInner(); - } - this.innerProperties().withFlexProfile(flexProfile); - return this; - } - /** * Get the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets * Scheduled Event related configurations for the virtual machine. diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java index 104e631b4c62..5de34ea9573b 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java @@ -42,12 +42,6 @@ public final class VirtualMachineNetworkInterfaceIPConfigurationProperties */ private IpVersions privateIpAddressVersion; - /* - * The private IP address prefix length. If specified and the allocation method is dynamic, the service will - * allocate a CIDR block instead of a single IP address. - */ - private Integer privateIPAddressPrefixLength; - /* * Specifies an array of references to application security group. */ @@ -159,29 +153,6 @@ public IpVersions privateIpAddressVersion() { return this; } - /** - * Get the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @return the privateIPAddressPrefixLength value. - */ - public Integer privateIPAddressPrefixLength() { - return this.privateIPAddressPrefixLength; - } - - /** - * Set the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @param privateIPAddressPrefixLength the privateIPAddressPrefixLength value to set. - * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties - withPrivateIPAddressPrefixLength(Integer privateIPAddressPrefixLength) { - this.privateIPAddressPrefixLength = privateIPAddressPrefixLength; - return this; - } - /** * Get the applicationSecurityGroups property: Specifies an array of references to application security group. * @@ -275,7 +246,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("publicIPAddressConfiguration", this.publicIpAddressConfiguration); jsonWriter.writeStringField("privateIPAddressVersion", this.privateIpAddressVersion == null ? null : this.privateIpAddressVersion.toString()); - jsonWriter.writeNumberField("privateIPAddressPrefixLength", this.privateIPAddressPrefixLength); jsonWriter.writeArrayField("applicationSecurityGroups", this.applicationSecurityGroups, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("applicationGatewayBackendAddressPools", this.applicationGatewayBackendAddressPools, @@ -314,9 +284,6 @@ public static VirtualMachineNetworkInterfaceIPConfigurationProperties fromJson(J } else if ("privateIPAddressVersion".equals(fieldName)) { deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.privateIpAddressVersion = IpVersions.fromString(reader.getString()); - } else if ("privateIPAddressPrefixLength".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.privateIPAddressPrefixLength - = reader.getNullable(JsonReader::getInt); } else if ("applicationSecurityGroups".equals(fieldName)) { List applicationSecurityGroups = reader.readArray(reader1 -> SubResource.fromJson(reader1)); diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachinePropertiesInner.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachinePropertiesInner.java index 238d1227b21c..cb940a9e110a 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachinePropertiesInner.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachinePropertiesInner.java @@ -16,7 +16,6 @@ import com.azure.resourcemanager.compute.models.BillingProfile; import com.azure.resourcemanager.compute.models.CapacityReservationProfile; import com.azure.resourcemanager.compute.models.DiagnosticsProfile; -import com.azure.resourcemanager.compute.models.FlexProfile; import com.azure.resourcemanager.compute.models.HardwareProfile; import com.azure.resourcemanager.compute.models.InterconnectBlockProfile; import com.azure.resourcemanager.compute.models.NetworkProfile; @@ -41,18 +40,6 @@ public final class VirtualMachinePropertiesInner implements JsonSerializable writer.writeJson(element)); jsonWriter.writeArrayField("applicationSecurityGroups", this.applicationSecurityGroups, @@ -351,9 +321,6 @@ public static VirtualMachineScaleSetIPConfigurationProperties fromJson(JsonReade } else if ("privateIPAddressVersion".equals(fieldName)) { deserializedVirtualMachineScaleSetIPConfigurationProperties.privateIpAddressVersion = IpVersion.fromString(reader.getString()); - } else if ("privateIPAddressPrefixLength".equals(fieldName)) { - deserializedVirtualMachineScaleSetIPConfigurationProperties.privateIPAddressPrefixLength - = reader.getNullable(JsonReader::getInt); } else if ("applicationGatewayBackendAddressPools".equals(fieldName)) { List applicationGatewayBackendAddressPools = reader.readArray(reader1 -> SubResource.fromJson(reader1)); diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateIPConfigurationProperties.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateIPConfigurationProperties.java index 3d5778e6e4ca..a2f540bdb491 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateIPConfigurationProperties.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateIPConfigurationProperties.java @@ -43,12 +43,6 @@ public final class VirtualMachineScaleSetUpdateIPConfigurationProperties */ private IpVersion privateIpAddressVersion; - /* - * The private IP address prefix length. If specified and the allocation method is dynamic, the service will - * allocate a CIDR block instead of a single IP address. - */ - private Integer privateIPAddressPrefixLength; - /* * The application gateway backend address pools. */ @@ -161,29 +155,6 @@ public IpVersion privateIpAddressVersion() { return this; } - /** - * Get the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @return the privateIPAddressPrefixLength value. - */ - public Integer privateIPAddressPrefixLength() { - return this.privateIPAddressPrefixLength; - } - - /** - * Set the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @param privateIPAddressPrefixLength the privateIPAddressPrefixLength value to set. - * @return the VirtualMachineScaleSetUpdateIPConfigurationProperties object itself. - */ - public VirtualMachineScaleSetUpdateIPConfigurationProperties - withPrivateIPAddressPrefixLength(Integer privateIPAddressPrefixLength) { - this.privateIPAddressPrefixLength = privateIPAddressPrefixLength; - return this; - } - /** * Get the applicationGatewayBackendAddressPools property: The application gateway backend address pools. * @@ -293,7 +264,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("publicIPAddressConfiguration", this.publicIpAddressConfiguration); jsonWriter.writeStringField("privateIPAddressVersion", this.privateIpAddressVersion == null ? null : this.privateIpAddressVersion.toString()); - jsonWriter.writeNumberField("privateIPAddressPrefixLength", this.privateIPAddressPrefixLength); jsonWriter.writeArrayField("applicationGatewayBackendAddressPools", this.applicationGatewayBackendAddressPools, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("applicationSecurityGroups", this.applicationSecurityGroups, @@ -334,9 +304,6 @@ public static VirtualMachineScaleSetUpdateIPConfigurationProperties fromJson(Jso } else if ("privateIPAddressVersion".equals(fieldName)) { deserializedVirtualMachineScaleSetUpdateIPConfigurationProperties.privateIpAddressVersion = IpVersion.fromString(reader.getString()); - } else if ("privateIPAddressPrefixLength".equals(fieldName)) { - deserializedVirtualMachineScaleSetUpdateIPConfigurationProperties.privateIPAddressPrefixLength - = reader.getNullable(JsonReader::getInt); } else if ("applicationGatewayBackendAddressPools".equals(fieldName)) { List applicationGatewayBackendAddressPools = reader.readArray(reader1 -> SubResource.fromJson(reader1)); diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java index 874ae2b1e63e..fc0c57756b34 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java @@ -14,7 +14,6 @@ import com.azure.resourcemanager.compute.models.BillingProfile; import com.azure.resourcemanager.compute.models.CapacityReservationProfile; import com.azure.resourcemanager.compute.models.DiagnosticsProfile; -import com.azure.resourcemanager.compute.models.FlexProfile; import com.azure.resourcemanager.compute.models.HardwareProfile; import com.azure.resourcemanager.compute.models.InterconnectBlockProfile; import com.azure.resourcemanager.compute.models.NetworkProfile; @@ -177,43 +176,6 @@ public VirtualMachineUpdateInner withHardwareProfile(HardwareProfile hardwarePro return this; } - /** - * Get the flexProfile property: [Preview Feature] Specifies a FlexProfile for VM size. Azure may deploy a - * compatible alternative VM size based on capacity and placement considerations, and returns the deployed size in - * hardwareProfile.vmSize. A request that adds flexProfile must omit hardwareProfile.vmSize. For a virtual machine - * that uses FlexProfile, a hardwareProfile.vmSize equal to the deployed size is ignored, so a GET response can be - * sent back unchanged. A PATCH request that omits flexProfile keeps it. A PUT request that omits flexProfile and - * sets hardwareProfile.vmSize clears it. This property cannot exist along with a non-null - * properties.availabilitySet, properties.capacityReservation, properties.host, properties.hostGroup, - * properties.proximityPlacementGroup or properties.virtualMachineScaleSet. - * - * @return the flexProfile value. - */ - public FlexProfile flexProfile() { - return this.innerProperties() == null ? null : this.innerProperties().flexProfile(); - } - - /** - * Set the flexProfile property: [Preview Feature] Specifies a FlexProfile for VM size. Azure may deploy a - * compatible alternative VM size based on capacity and placement considerations, and returns the deployed size in - * hardwareProfile.vmSize. A request that adds flexProfile must omit hardwareProfile.vmSize. For a virtual machine - * that uses FlexProfile, a hardwareProfile.vmSize equal to the deployed size is ignored, so a GET response can be - * sent back unchanged. A PATCH request that omits flexProfile keeps it. A PUT request that omits flexProfile and - * sets hardwareProfile.vmSize clears it. This property cannot exist along with a non-null - * properties.availabilitySet, properties.capacityReservation, properties.host, properties.hostGroup, - * properties.proximityPlacementGroup or properties.virtualMachineScaleSet. - * - * @param flexProfile the flexProfile value to set. - * @return the VirtualMachineUpdateInner object itself. - */ - public VirtualMachineUpdateInner withFlexProfile(FlexProfile flexProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new VirtualMachinePropertiesInner(); - } - this.innerProperties().withFlexProfile(flexProfile); - return this; - } - /** * Get the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets * Scheduled Event related configurations for the virtual machine. diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CapacityReservationGroupsClientImpl.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CapacityReservationGroupsClientImpl.java index d5795214cb23..4356a1816308 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CapacityReservationGroupsClientImpl.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CapacityReservationGroupsClientImpl.java @@ -26,11 +26,8 @@ import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.compute.fluent.CapacityReservationGroupsClient; import com.azure.resourcemanager.compute.fluent.models.CapacityReservationGroupInner; import com.azure.resourcemanager.compute.implementation.models.CapacityReservationGroupListResult; @@ -42,8 +39,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -112,9 +107,9 @@ Mono> update(@HostParam("endpoint") Stri @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ApiErrorException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("capacityReservationGroupName") String capacityReservationGroupName, Context context); @@ -619,8 +614,7 @@ public CapacityReservationGroupInner update(String resourceGroupName, String cap * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, - String capacityReservationGroupName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String capacityReservationGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -658,8 +652,8 @@ public Mono>> deleteWithResponseAsync(String resourceG * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String capacityReservationGroupName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String capacityReservationGroupName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -682,87 +676,6 @@ private Mono>> deleteWithResponseAsync(String resource capacityReservationGroupName, context); } - /** - * The operation to delete a capacity reservation group. This operation is allowed only if all the associated - * resources are disassociated from the reservation group and all capacity reservations under the reservation group - * have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param capacityReservationGroupName The name of the capacity reservation group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String capacityReservationGroupName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, capacityReservationGroupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * The operation to delete a capacity reservation group. This operation is allowed only if all the associated - * resources are disassociated from the reservation group and all capacity reservations under the reservation group - * have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param capacityReservationGroupName The name of the capacity reservation group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String capacityReservationGroupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, capacityReservationGroupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * The operation to delete a capacity reservation group. This operation is allowed only if all the associated - * resources are disassociated from the reservation group and all capacity reservations under the reservation group - * have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param capacityReservationGroupName The name of the capacity reservation group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, - String capacityReservationGroupName) { - return this.beginDeleteAsync(resourceGroupName, capacityReservationGroupName).getSyncPoller(); - } - - /** - * The operation to delete a capacity reservation group. This operation is allowed only if all the associated - * resources are disassociated from the reservation group and all capacity reservations under the reservation group - * have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param capacityReservationGroupName The name of the capacity reservation group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String capacityReservationGroupName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, capacityReservationGroupName, context).getSyncPoller(); - } - /** * The operation to delete a capacity reservation group. This operation is allowed only if all the associated * resources are disassociated from the reservation group and all capacity reservations under the reservation group @@ -777,8 +690,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String capacityReservationGroupName) { - return beginDeleteAsync(resourceGroupName, capacityReservationGroupName).last() - .flatMap(this.client::getLroFinalResultOrError); + return deleteWithResponseAsync(resourceGroupName, capacityReservationGroupName) + .flatMap(ignored -> Mono.empty()); } /** @@ -792,12 +705,12 @@ public Mono deleteAsync(String resourceGroupName, String capacityReservati * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String capacityReservationGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, capacityReservationGroupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Response deleteWithResponse(String resourceGroupName, String capacityReservationGroupName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, capacityReservationGroupName, context).block(); } /** @@ -813,24 +726,7 @@ private Mono deleteAsync(String resourceGroupName, String capacityReservat */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String capacityReservationGroupName) { - deleteAsync(resourceGroupName, capacityReservationGroupName).block(); - } - - /** - * The operation to delete a capacity reservation group. This operation is allowed only if all the associated - * resources are disassociated from the reservation group and all capacity reservations under the reservation group - * have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param capacityReservationGroupName The name of the capacity reservation group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ApiErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String capacityReservationGroupName, Context context) { - deleteAsync(resourceGroupName, capacityReservationGroupName, context).block(); + deleteWithResponse(resourceGroupName, capacityReservationGroupName, Context.NONE); } /** diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/FlexProfile.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/FlexProfile.java deleted file mode 100644 index b238c7aec95d..000000000000 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/FlexProfile.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.compute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the FlexProfile for a virtual machine. When set, Azure may deploy a compatible alternative VM size based on - * capacity and placement considerations, and the deployed size is returned in hardwareProfile.vmSize. See the - * properties.flexProfile description for the full usage rules, including how it interacts with hardwareProfile.vmSize. - */ -@Fluent -public final class FlexProfile implements JsonSerializable { - /* - * Specifies the preferred VM size, for example Standard_D4s_v5. Azure may deploy a compatible alternative size - * based on capacity and placement considerations. Supported VM families for FlexProfile may vary by region. The - * recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes - * in a region](https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine - * sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - */ - private String preferredVMSize; - - /** - * Creates an instance of FlexProfile class. - */ - public FlexProfile() { - } - - /** - * Get the preferredVMSize property: Specifies the preferred VM size, for example Standard_D4s_v5. Azure may deploy - * a compatible alternative size based on capacity and placement considerations. Supported VM families for - * FlexProfile may vary by region. The recommended way to get the list of available sizes is using these APIs: [List - * all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/resourceskus/list), - * [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * - * @return the preferredVMSize value. - */ - public String preferredVMSize() { - return this.preferredVMSize; - } - - /** - * Set the preferredVMSize property: Specifies the preferred VM size, for example Standard_D4s_v5. Azure may deploy - * a compatible alternative size based on capacity and placement considerations. Supported VM families for - * FlexProfile may vary by region. The recommended way to get the list of available sizes is using these APIs: [List - * all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/resourceskus/list), - * [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * - * @param preferredVMSize the preferredVMSize value to set. - * @return the FlexProfile object itself. - */ - public FlexProfile withPreferredVMSize(String preferredVMSize) { - this.preferredVMSize = preferredVMSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (preferredVMSize() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property preferredVMSize in model FlexProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FlexProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("preferredVMSize", this.preferredVMSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlexProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlexProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FlexProfile. - */ - public static FlexProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlexProfile deserializedFlexProfile = new FlexProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("preferredVMSize".equals(fieldName)) { - deserializedFlexProfile.preferredVMSize = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFlexProfile; - }); - } -} diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuZoneDetails.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuZoneDetails.java index 2c899bf7dc19..16da9c6ea373 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuZoneDetails.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuZoneDetails.java @@ -87,7 +87,7 @@ public static ResourceSkuZoneDetails fromJson(JsonReader jsonReader) throws IOEx String fieldName = reader.getFieldName(); reader.nextToken(); - if ("Name".equals(fieldName)) { + if ("name".equals(fieldName)) { List name = reader.readArray(reader1 -> reader1.getString()); deserializedResourceSkuZoneDetails.name = name; } else if ("capabilities".equals(fieldName)) { diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RestorePointInstanceView.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RestorePointInstanceView.java index 30312711ad16..f4fe38cfaebe 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RestorePointInstanceView.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/RestorePointInstanceView.java @@ -23,11 +23,7 @@ public final class RestorePointInstanceView implements JsonSerializable diskRestorePoints; /* - * The aggregate status information for the restore point. The list may include separate aggregate entries for - * replication and, in supported API versions, Instant Access, as applicable. For more information about Instant - * Access, see [Use virtual machine restore - * points](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-create-restore-points#instant-access) - * . + * The resource status information. */ private List statuses; @@ -47,10 +43,7 @@ public List diskRestorePoints() { } /** - * Get the statuses property: The aggregate status information for the restore point. The list may include separate - * aggregate entries for replication and, in supported API versions, Instant Access, as applicable. For more - * information about Instant Access, see [Use virtual machine restore - * points](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-create-restore-points#instant-access). + * Get the statuses property: The resource status information. * * @return the statuses value. */ diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceIpConfiguration.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceIpConfiguration.java index 62a95fce2ad6..fe86b5a215df 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceIpConfiguration.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceIpConfiguration.java @@ -164,32 +164,6 @@ public IpVersions privateIpAddressVersion() { return this; } - /** - * Get the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @return the privateIPAddressPrefixLength value. - */ - public Integer privateIPAddressPrefixLength() { - return this.innerProperties() == null ? null : this.innerProperties().privateIPAddressPrefixLength(); - } - - /** - * Set the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @param privateIPAddressPrefixLength the privateIPAddressPrefixLength value to set. - * @return the VirtualMachineNetworkInterfaceIpConfiguration object itself. - */ - public VirtualMachineNetworkInterfaceIpConfiguration - withPrivateIPAddressPrefixLength(Integer privateIPAddressPrefixLength) { - if (this.innerProperties() == null) { - this.innerProperties = new VirtualMachineNetworkInterfaceIPConfigurationProperties(); - } - this.innerProperties().withPrivateIPAddressPrefixLength(privateIPAddressPrefixLength); - return this; - } - /** * Get the applicationSecurityGroups property: Specifies an array of references to application security group. * diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIpConfiguration.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIpConfiguration.java index 3e6a642e9509..9706afc96039 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIpConfiguration.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIpConfiguration.java @@ -164,32 +164,6 @@ public VirtualMachineScaleSetIpConfiguration withPrivateIpAddressVersion(IpVersi return this; } - /** - * Get the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @return the privateIPAddressPrefixLength value. - */ - public Integer privateIPAddressPrefixLength() { - return this.innerProperties() == null ? null : this.innerProperties().privateIPAddressPrefixLength(); - } - - /** - * Set the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @param privateIPAddressPrefixLength the privateIPAddressPrefixLength value to set. - * @return the VirtualMachineScaleSetIpConfiguration object itself. - */ - public VirtualMachineScaleSetIpConfiguration - withPrivateIPAddressPrefixLength(Integer privateIPAddressPrefixLength) { - if (this.innerProperties() == null) { - this.innerProperties = new VirtualMachineScaleSetIPConfigurationProperties(); - } - this.innerProperties().withPrivateIPAddressPrefixLength(privateIPAddressPrefixLength); - return this; - } - /** * Get the applicationGatewayBackendAddressPools property: Specifies an array of references to backend address pools * of application gateways. A scale set can reference backend address pools of multiple application gateways. diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateIpConfiguration.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateIpConfiguration.java index 572e7d0bfd4e..8752a24030bd 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateIpConfiguration.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateIpConfiguration.java @@ -164,32 +164,6 @@ public VirtualMachineScaleSetUpdateIpConfiguration withPrivateIpAddressVersion(I return this; } - /** - * Get the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @return the privateIPAddressPrefixLength value. - */ - public Integer privateIPAddressPrefixLength() { - return this.innerProperties() == null ? null : this.innerProperties().privateIPAddressPrefixLength(); - } - - /** - * Set the privateIPAddressPrefixLength property: The private IP address prefix length. If specified and the - * allocation method is dynamic, the service will allocate a CIDR block instead of a single IP address. - * - * @param privateIPAddressPrefixLength the privateIPAddressPrefixLength value to set. - * @return the VirtualMachineScaleSetUpdateIpConfiguration object itself. - */ - public VirtualMachineScaleSetUpdateIpConfiguration - withPrivateIPAddressPrefixLength(Integer privateIPAddressPrefixLength) { - if (this.innerProperties() == null) { - this.innerProperties = new VirtualMachineScaleSetUpdateIPConfigurationProperties(); - } - this.innerProperties().withPrivateIPAddressPrefixLength(privateIPAddressPrefixLength); - return this; - } - /** * Get the applicationGatewayBackendAddressPools property: The application gateway backend address pools. * diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/resources/META-INF/azure-resourcemanager-compute_metadata.json b/sdk/compute/azure-resourcemanager-compute/src/main/resources/META-INF/azure-resourcemanager-compute_metadata.json index 15cc5c1805ad..32de9a5e7d03 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/resources/META-INF/azure-resourcemanager-compute_metadata.json +++ b/sdk/compute/azure-resourcemanager-compute/src/main/resources/META-INF/azure-resourcemanager-compute_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Compute":"2026-04-01","ComputeDisk":"2026-03-02","ComputeGallery":"2026-03-03","ComputeSku":"2021-07-01"},"crossLanguagePackageId":"Compute","crossLanguageVersion":"2833220a88bf","generatedFiles":["src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationGroupsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CommunityGalleriesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CommunityGalleryImageVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CommunityGalleryImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DiskAccessesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DiskRestorePointsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfileVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfilesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryScriptVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryScriptsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GallerySharingProfilesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/InterconnectBlocksClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/RestorePointCollectionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/RestorePointsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SharedGalleriesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SharedGalleryImageVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SharedGalleryImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SharedGalleryInvitesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SoftDeletedResourcesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/TenantLevelSharedGalleryInvitesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineDiagnosticRunCommandsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesEdgeZonesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetLifeCycleHookEventsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMDiagnosticRunCommandsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMRunCommandsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/AccessUriInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationGroupInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationGroupProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryIdentifier.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostGroupInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostGroupProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskAccessInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskAccessProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskEncryptionSetInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskEncryptionSetUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskRestorePointInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskRestorePointProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/EncryptionSetProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryScriptInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryScriptProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryScriptVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryScriptVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/InterconnectBlockInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/LogAnalyticsOperationResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/NetworkInterfaceReferenceProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ProximityPlacementGroupInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ProximityPlacementGroupProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RecoveryWalkResponseInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ResourceSkuInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointCollectionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointCollectionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RetrieveBootDiagnosticsDataResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RollingUpgradeStatusInfoInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RollingUpgradeStatusInfoProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandDocumentBaseInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandDocumentInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryIdentifier.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharingUpdateInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyGenerateKeyPairResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyResourceInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyResourceProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/UpgradeOperationHistoricalStatusInfoInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VMScaleSetLifecycleHookEventInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VMScaleSetLifecycleHookEventProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineAssessPatchesResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineCaptureResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineDiagnosticRunCommandInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionsListResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageResourceInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInstallPatchesResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInstanceViewInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineNetworkInterfaceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachinePropertiesInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachinePublicIPAddressConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineRunCommandInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineRunCommandProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetExtensionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetExtensionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetIPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetInstanceViewInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetNetworkConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetPublicIPAddressConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetSkuInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateIPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateNetworkConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMExtensionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMExtensionsListResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMInstanceViewInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMPropertiesInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineSizeInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VmImagesInEdgeZoneListResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/compute/fluent/package-info.java","src/main/java/com/azure/resourcemanager/compute/implementation/AvailabilitySetsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CapacityReservationGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CapacityReservationsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleriesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImageVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DedicatedHostGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DedicatedHostsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DiskAccessesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DiskEncryptionSetsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DiskRestorePointsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DisksClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleriesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfileVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryScriptVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryScriptsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GallerySharingProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/ImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/InterconnectBlocksClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/LogAnalyticsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/ProximityPlacementGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/ResourceSkusClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/RestorePointCollectionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/RestorePointsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleriesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImageVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryInvitesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SoftDeletedResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SshPublicKeysClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/TenantLevelSharedGalleryInvitesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineDiagnosticRunCommandsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImagesEdgeZonesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineRunCommandsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetLifeCycleHookEventsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetRollingUpgradesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMDiagnosticRunCommandsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMRunCommandsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineSizesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/AvailabilitySetListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/CapacityReservationGroupListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/CapacityReservationListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/CommunityGalleryImageList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/CommunityGalleryImageVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DedicatedHostGroupListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DedicatedHostListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DedicatedHostSizeListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DiskAccessList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DiskEncryptionSetList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DiskList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DiskRestorePointList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryApplicationList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryApplicationVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryImageList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryImageVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryInVMAccessControlProfileList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryInVMAccessControlProfileVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryScriptList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryScriptVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GallerySoftDeletedResourceList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ImageListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/InterconnectBlockListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ListUsagesResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ProximityPlacementGroupListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ResourceSkusResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ResourceUriList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/RestorePointCollectionListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/RunCommandListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SharedGalleryImageList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SharedGalleryImageVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SharedGalleryList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SnapshotList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SshPublicKeysGroupListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VMScaleSetLifecycleHookEventListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineDiagnosticRunCommandsListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineRunCommandsListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetExtensionListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetListOSUpgradeHistory.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetListSkusResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetListWithLinkResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetVMListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineSizeListResult.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRules.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesMode.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesPrivilege.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRole.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRoleAssignment.java","src/main/java/com/azure/resourcemanager/compute/models/AccessLevel.java","src/main/java/com/azure/resourcemanager/compute/models/ActionType.java","src/main/java/com/azure/resourcemanager/compute/models/AdditionalCapabilities.java","src/main/java/com/azure/resourcemanager/compute/models/AdditionalDiskProperties.java","src/main/java/com/azure/resourcemanager/compute/models/AdditionalReplicaSet.java","src/main/java/com/azure/resourcemanager/compute/models/AdditionalUnattendContent.java","src/main/java/com/azure/resourcemanager/compute/models/AggregatedReplicationState.java","src/main/java/com/azure/resourcemanager/compute/models/AllInstancesDown.java","src/main/java/com/azure/resourcemanager/compute/models/AllocationStrategy.java","src/main/java/com/azure/resourcemanager/compute/models/AlternativeOption.java","src/main/java/com/azure/resourcemanager/compute/models/AlternativeType.java","src/main/java/com/azure/resourcemanager/compute/models/ApiEntityReference.java","src/main/java/com/azure/resourcemanager/compute/models/ApiError.java","src/main/java/com/azure/resourcemanager/compute/models/ApiErrorException.java","src/main/java/com/azure/resourcemanager/compute/models/ApplicationProfile.java","src/main/java/com/azure/resourcemanager/compute/models/Architecture.java","src/main/java/com/azure/resourcemanager/compute/models/ArchitectureTypes.java","src/main/java/com/azure/resourcemanager/compute/models/AttachDetachDataDisksRequest.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticOSUpgradePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticOSUpgradeProperties.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticRepairsPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticSkuMigrationPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticZoneRebalancingPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AvailabilityPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AvailabilityPolicyDiskDelay.java","src/main/java/com/azure/resourcemanager/compute/models/AvailabilitySetSkuTypes.java","src/main/java/com/azure/resourcemanager/compute/models/AvailabilitySetUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/AvailablePatchSummary.java","src/main/java/com/azure/resourcemanager/compute/models/BillingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/BootDiagnostics.java","src/main/java/com/azure/resourcemanager/compute/models/BootDiagnosticsInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/CachingTypes.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupInstanceViewTypes.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceViewTypes.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceViewWithName.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationProfile.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationStateInfo.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationType.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationUtilization.java","src/main/java/com/azure/resourcemanager/compute/models/CommunityGalleryImageIdentifier.java","src/main/java/com/azure/resourcemanager/compute/models/CommunityGalleryInfo.java","src/main/java/com/azure/resourcemanager/compute/models/CommunityGalleryMetadata.java","src/main/java/com/azure/resourcemanager/compute/models/ComponentNames.java","src/main/java/com/azure/resourcemanager/compute/models/ConfidentialVMEncryptionType.java","src/main/java/com/azure/resourcemanager/compute/models/ConfidentialVMVersion.java","src/main/java/com/azure/resourcemanager/compute/models/ConsistencyModeTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ConvertToVirtualMachineScaleSetInput.java","src/main/java/com/azure/resourcemanager/compute/models/CopyCompletionError.java","src/main/java/com/azure/resourcemanager/compute/models/CopyCompletionErrorReason.java","src/main/java/com/azure/resourcemanager/compute/models/CreationData.java","src/main/java/com/azure/resourcemanager/compute/models/DataAccessAuthMode.java","src/main/java/com/azure/resourcemanager/compute/models/DataDisk.java","src/main/java/com/azure/resourcemanager/compute/models/DataDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/DataDiskImageEncryption.java","src/main/java/com/azure/resourcemanager/compute/models/DataDiskImageSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/DataDisksToAttach.java","src/main/java/com/azure/resourcemanager/compute/models/DataDisksToDetach.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostAllocatableVM.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostAvailableCapacity.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupPropertiesAdditionalCapabilities.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostInstanceViewWithName.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostLicenseTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DefaultVirtualMachineScaleSetInfo.java","src/main/java/com/azure/resourcemanager/compute/models/DeleteOptions.java","src/main/java/com/azure/resourcemanager/compute/models/DiagnosticsProfile.java","src/main/java/com/azure/resourcemanager/compute/models/DiffDiskOptions.java","src/main/java/com/azure/resourcemanager/compute/models/DiffDiskPlacement.java","src/main/java/com/azure/resourcemanager/compute/models/DiffDiskSettings.java","src/main/java/com/azure/resourcemanager/compute/models/Disallowed.java","src/main/java/com/azure/resourcemanager/compute/models/DisallowedConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/DiskAccessUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DiskApiVersion.java","src/main/java/com/azure/resourcemanager/compute/models/DiskAvailabilityPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/DiskControllerTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskCreateOption.java","src/main/java/com/azure/resourcemanager/compute/models/DiskCreateOptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskDeleteOptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskDetachOptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetIdentityType.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetParameters.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetType.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSettings.java","src/main/java/com/azure/resourcemanager/compute/models/DiskImageEncryption.java","src/main/java/com/azure/resourcemanager/compute/models/DiskInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/DiskPurchasePlan.java","src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointAttributes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointReplicationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/DiskSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/DiskSecurityTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskSku.java","src/main/java/com/azure/resourcemanager/compute/models/DiskState.java","src/main/java/com/azure/resourcemanager/compute/models/DiskStorageAccountTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DomainNameLabelScopeTypes.java","src/main/java/com/azure/resourcemanager/compute/models/EdgeZoneStorageAccountType.java","src/main/java/com/azure/resourcemanager/compute/models/Encryption.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionImages.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionSetIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionSettingsCollection.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionSettingsElement.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionType.java","src/main/java/com/azure/resourcemanager/compute/models/EndpointAccess.java","src/main/java/com/azure/resourcemanager/compute/models/EndpointTypes.java","src/main/java/com/azure/resourcemanager/compute/models/EventGridAndResourceGraph.java","src/main/java/com/azure/resourcemanager/compute/models/ExecutedValidation.java","src/main/java/com/azure/resourcemanager/compute/models/ExecutionState.java","src/main/java/com/azure/resourcemanager/compute/models/ExpandTypeForListVMs.java","src/main/java/com/azure/resourcemanager/compute/models/ExpandTypesForGetCapacityReservationGroups.java","src/main/java/com/azure/resourcemanager/compute/models/ExpandTypesForGetVMScaleSets.java","src/main/java/com/azure/resourcemanager/compute/models/ExpandTypesForListVMs.java","src/main/java/com/azure/resourcemanager/compute/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/compute/models/ExtendedLocationType.java","src/main/java/com/azure/resourcemanager/compute/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ExtensionFeatureMetadata.java","src/main/java/com/azure/resourcemanager/compute/models/ExtensionFeatureTag.java","src/main/java/com/azure/resourcemanager/compute/models/ExternalHealthPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/FileFormat.java","src/main/java/com/azure/resourcemanager/compute/models/FlexProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationCustomAction.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationCustomActionParameter.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationCustomActionParameterType.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationScriptRebootBehavior.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionPublishingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionSafetyProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactPublishingProfileBase.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactSafetyProfileBase.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactVersionFullSource.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactVersionSource.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryDataDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryDiskImageSource.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryExpandParams.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryExtendedLocation.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryExtendedLocationType.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryIdentifier.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageFeature.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageIdentifier.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionPublishingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionSafetyProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionState.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionUefiSettings.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileProperties.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryOSDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryProvisioningState.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfilePropertiesBase.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfileVersionPropertiesBase.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptParameter.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptParameterType.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptVersionPublishingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptVersionSafetyProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptVersionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GallerySharingPermissionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryTargetExtendedLocation.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GenericGalleryParameter.java","src/main/java/com/azure/resourcemanager/compute/models/GrantAccessData.java","src/main/java/com/azure/resourcemanager/compute/models/HardwareProfile.java","src/main/java/com/azure/resourcemanager/compute/models/HighSpeedInterconnectPlacement.java","src/main/java/com/azure/resourcemanager/compute/models/HostCaching.java","src/main/java/com/azure/resourcemanager/compute/models/HostEndpointSettings.java","src/main/java/com/azure/resourcemanager/compute/models/HyperVGeneration.java","src/main/java/com/azure/resourcemanager/compute/models/HyperVGenerationType.java","src/main/java/com/azure/resourcemanager/compute/models/HyperVGenerationTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ImageDataDisk.java","src/main/java/com/azure/resourcemanager/compute/models/ImageDeprecationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ImageDisk.java","src/main/java/com/azure/resourcemanager/compute/models/ImageDiskReference.java","src/main/java/com/azure/resourcemanager/compute/models/ImageMetadataProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ImageOSDisk.java","src/main/java/com/azure/resourcemanager/compute/models/ImagePurchasePlan.java","src/main/java/com/azure/resourcemanager/compute/models/ImageReference.java","src/main/java/com/azure/resourcemanager/compute/models/ImageState.java","src/main/java/com/azure/resourcemanager/compute/models/ImageStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ImageUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/ImageVersionSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ImmutabilityPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ImmutabilityPolicyData.java","src/main/java/com/azure/resourcemanager/compute/models/ImmutabilityPolicyLockData.java","src/main/java/com/azure/resourcemanager/compute/models/ImmutabilityPolicyType.java","src/main/java/com/azure/resourcemanager/compute/models/InnerError.java","src/main/java/com/azure/resourcemanager/compute/models/InstanceViewStatus.java","src/main/java/com/azure/resourcemanager/compute/models/InstanceViewTypes.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockExpandTypes.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockProfile.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockProperties.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectGroupProfile.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/IntervalInMins.java","src/main/java/com/azure/resourcemanager/compute/models/IpVersion.java","src/main/java/com/azure/resourcemanager/compute/models/IpVersions.java","src/main/java/com/azure/resourcemanager/compute/models/KeyForDiskEncryptionSet.java","src/main/java/com/azure/resourcemanager/compute/models/KeyVaultAndKeyReference.java","src/main/java/com/azure/resourcemanager/compute/models/KeyVaultAndSecretReference.java","src/main/java/com/azure/resourcemanager/compute/models/KeyVaultKeyReference.java","src/main/java/com/azure/resourcemanager/compute/models/KeyVaultSecretReference.java","src/main/java/com/azure/resourcemanager/compute/models/LastPatchInstallationSummary.java","src/main/java/com/azure/resourcemanager/compute/models/LifecycleHook.java","src/main/java/com/azure/resourcemanager/compute/models/LifecycleHookAction.java","src/main/java/com/azure/resourcemanager/compute/models/LifecycleHookActionState.java","src/main/java/com/azure/resourcemanager/compute/models/LifecycleHooksProfile.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxParameters.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxPatchAssessmentMode.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxPatchSettings.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxVMGuestPatchMode.java","src/main/java/com/azure/resourcemanager/compute/models/ListVersionsExpandOptions.java","src/main/java/com/azure/resourcemanager/compute/models/LogAnalyticsInputBase.java","src/main/java/com/azure/resourcemanager/compute/models/LogAnalyticsOutput.java","src/main/java/com/azure/resourcemanager/compute/models/MaintenanceOperationResultCodeTypes.java","src/main/java/com/azure/resourcemanager/compute/models/MaintenanceRedeployStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ManagedDiskParameters.java","src/main/java/com/azure/resourcemanager/compute/models/MaxInstancePercentPerZonePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/MetadataKeyValue.java","src/main/java/com/azure/resourcemanager/compute/models/MetadataType.java","src/main/java/com/azure/resourcemanager/compute/models/MigrateToVirtualMachineScaleSetInput.java","src/main/java/com/azure/resourcemanager/compute/models/MigrateVMAvailabilityZoneInput.java","src/main/java/com/azure/resourcemanager/compute/models/MigrateVMToVirtualMachineScaleSetInput.java","src/main/java/com/azure/resourcemanager/compute/models/Mode.java","src/main/java/com/azure/resourcemanager/compute/models/Modes.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkAccessPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkApiVersion.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkInterfaceAuxiliaryMode.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkInterfaceAuxiliarySku.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkInterfaceReference.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkProfile.java","src/main/java/com/azure/resourcemanager/compute/models/OSDisk.java","src/main/java/com/azure/resourcemanager/compute/models/OSDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/OSDiskImageEncryption.java","src/main/java/com/azure/resourcemanager/compute/models/OSDiskImageSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/OSImageNotificationProfile.java","src/main/java/com/azure/resourcemanager/compute/models/OSProfile.java","src/main/java/com/azure/resourcemanager/compute/models/OSProfileProvisioningData.java","src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemStateTypes.java","src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemType.java","src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemTypes.java","src/main/java/com/azure/resourcemanager/compute/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/compute/models/OperationRecoverySettings.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationMode.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceNames.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceOperationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceState.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceStateAction.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceStateInput.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceSummary.java","src/main/java/com/azure/resourcemanager/compute/models/Origin.java","src/main/java/com/azure/resourcemanager/compute/models/PassNames.java","src/main/java/com/azure/resourcemanager/compute/models/PatchAssessmentState.java","src/main/java/com/azure/resourcemanager/compute/models/PatchInstallationDetail.java","src/main/java/com/azure/resourcemanager/compute/models/PatchInstallationState.java","src/main/java/com/azure/resourcemanager/compute/models/PatchOperationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/PatchSettings.java","src/main/java/com/azure/resourcemanager/compute/models/PirCommunityGalleryResource.java","src/main/java/com/azure/resourcemanager/compute/models/PirResource.java","src/main/java/com/azure/resourcemanager/compute/models/PirSharedGalleryResource.java","src/main/java/com/azure/resourcemanager/compute/models/Placement.java","src/main/java/com/azure/resourcemanager/compute/models/Plan.java","src/main/java/com/azure/resourcemanager/compute/models/PlatformAttribute.java","src/main/java/com/azure/resourcemanager/compute/models/PolicyViolation.java","src/main/java/com/azure/resourcemanager/compute/models/PolicyViolationCategory.java","src/main/java/com/azure/resourcemanager/compute/models/PriorityMixPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/compute/models/ProcessorMode.java","src/main/java/com/azure/resourcemanager/compute/models/PropertyUpdatesInProgress.java","src/main/java/com/azure/resourcemanager/compute/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ProvisionedBandwidthCopyOption.java","src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupPropertiesIntent.java","src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupType.java","src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/ProxyAgentSettings.java","src/main/java/com/azure/resourcemanager/compute/models/PublicIpAddressSku.java","src/main/java/com/azure/resourcemanager/compute/models/PublicIpAddressSkuName.java","src/main/java/com/azure/resourcemanager/compute/models/PublicIpAddressSkuTier.java","src/main/java/com/azure/resourcemanager/compute/models/PublicIpAllocationMethod.java","src/main/java/com/azure/resourcemanager/compute/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/compute/models/PurchasePlan.java","src/main/java/com/azure/resourcemanager/compute/models/RebalanceBehavior.java","src/main/java/com/azure/resourcemanager/compute/models/RebalanceStrategy.java","src/main/java/com/azure/resourcemanager/compute/models/RecommendedMachineConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/RegionalReplicationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/RegionalSharingStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ReimageRecoveryPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ReleaseCategory.java","src/main/java/com/azure/resourcemanager/compute/models/RepairAction.java","src/main/java/com/azure/resourcemanager/compute/models/ReplicationMode.java","src/main/java/com/azure/resourcemanager/compute/models/ReplicationState.java","src/main/java/com/azure/resourcemanager/compute/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ReplicationStatusTypes.java","src/main/java/com/azure/resourcemanager/compute/models/RequestRateByIntervalInput.java","src/main/java/com/azure/resourcemanager/compute/models/ReservationState.java","src/main/java/com/azure/resourcemanager/compute/models/ReservationType.java","src/main/java/com/azure/resourcemanager/compute/models/ResiliencyPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ResiliencyProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ResilientVMCreationPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ResilientVMDeletionPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ResilientVMDeletionStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceIdOptionsForGetCapacityReservationGroups.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceRange.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSharingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuCapabilities.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuCapacity.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuCapacityScaleType.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuCosts.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuLocationInfo.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuRestrictionInfo.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuRestrictions.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuRestrictionsReasonCode.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuRestrictionsType.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuZoneDetails.java","src/main/java/com/azure/resourcemanager/compute/models/RestartRecoveryPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionExpandOptions.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionSourceProperties.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointEncryption.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointEncryptionType.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointExpandOptions.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointSourceMetadata.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointSourceVMDataDisk.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointSourceVMStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointSourceVmosDisk.java","src/main/java/com/azure/resourcemanager/compute/models/RollbackStatusInfo.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradeActionType.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradeProgressInfo.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradeRunningStatus.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradeStatusCode.java","src/main/java/com/azure/resourcemanager/compute/models/RunCommandInput.java","src/main/java/com/azure/resourcemanager/compute/models/RunCommandInputParameter.java","src/main/java/com/azure/resourcemanager/compute/models/RunCommandManagedIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/RunCommandParameterDefinition.java","src/main/java/com/azure/resourcemanager/compute/models/RunProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ScaleInPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ScheduleProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ScheduledEventsAdditionalPublishingTargets.java","src/main/java/com/azure/resourcemanager/compute/models/ScheduledEventsPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ScheduledEventsProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ScriptShellTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ScriptSource.java","src/main/java/com/azure/resourcemanager/compute/models/SecretsProvisioningComponent.java","src/main/java/com/azure/resourcemanager/compute/models/SecretsProvisioningComponentName.java","src/main/java/com/azure/resourcemanager/compute/models/SecretsProvisioningSettings.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityEncryptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityPostureReference.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityPostureReferenceUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SelectPermissions.java","src/main/java/com/azure/resourcemanager/compute/models/ServiceArtifactReference.java","src/main/java/com/azure/resourcemanager/compute/models/SettingNames.java","src/main/java/com/azure/resourcemanager/compute/models/ShareInfoElement.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryDataDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryHostCaching.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryImageVersionStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryOSDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/SharedToValues.java","src/main/java/com/azure/resourcemanager/compute/models/SharingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SharingProfileGroup.java","src/main/java/com/azure/resourcemanager/compute/models/SharingProfileGroupTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SharingState.java","src/main/java/com/azure/resourcemanager/compute/models/SharingStatus.java","src/main/java/com/azure/resourcemanager/compute/models/SharingUpdateOperationTypes.java","src/main/java/com/azure/resourcemanager/compute/models/Sku.java","src/main/java/com/azure/resourcemanager/compute/models/SkuProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SkuProfileVMSize.java","src/main/java/com/azure/resourcemanager/compute/models/SnapshotAccessState.java","src/main/java/com/azure/resourcemanager/compute/models/SnapshotSku.java","src/main/java/com/azure/resourcemanager/compute/models/SnapshotStorageAccountTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SnapshotUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/SoftDeletePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/SoftDeletedArtifactTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SourceVault.java","src/main/java/com/azure/resourcemanager/compute/models/SpotRestorePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/SshConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/SshEncryptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SshGenerateKeyPairInputParameters.java","src/main/java/com/azure/resourcemanager/compute/models/SshPublicKey.java","src/main/java/com/azure/resourcemanager/compute/models/SshPublicKeyUpdateResource.java","src/main/java/com/azure/resourcemanager/compute/models/StartRecoveryPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/StatusLevelTypes.java","src/main/java/com/azure/resourcemanager/compute/models/StorageAccountStrategy.java","src/main/java/com/azure/resourcemanager/compute/models/StorageAccountType.java","src/main/java/com/azure/resourcemanager/compute/models/StorageAccountTypes.java","src/main/java/com/azure/resourcemanager/compute/models/StorageAlignmentStatus.java","src/main/java/com/azure/resourcemanager/compute/models/StorageFaultDomainAlignmentType.java","src/main/java/com/azure/resourcemanager/compute/models/StorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SubResourceReadOnly.java","src/main/java/com/azure/resourcemanager/compute/models/SubResourceWithColocationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/SupportedCapabilities.java","src/main/java/com/azure/resourcemanager/compute/models/SupportedSecurityOption.java","src/main/java/com/azure/resourcemanager/compute/models/TargetRegion.java","src/main/java/com/azure/resourcemanager/compute/models/TerminateNotificationProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ThrottledRequestsInput.java","src/main/java/com/azure/resourcemanager/compute/models/UefiKey.java","src/main/java/com/azure/resourcemanager/compute/models/UefiKeySignatures.java","src/main/java/com/azure/resourcemanager/compute/models/UefiKeyType.java","src/main/java/com/azure/resourcemanager/compute/models/UefiSettings.java","src/main/java/com/azure/resourcemanager/compute/models/UefiSignatureTemplateName.java","src/main/java/com/azure/resourcemanager/compute/models/UpdateResource.java","src/main/java/com/azure/resourcemanager/compute/models/UpdateResourceDefinition.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeMode.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeOperationHistoricalStatusInfoProperties.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeOperationHistoryStatus.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeOperationInvoker.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeState.java","src/main/java/com/azure/resourcemanager/compute/models/UrgencyLevel.java","src/main/java/com/azure/resourcemanager/compute/models/UsageName.java","src/main/java/com/azure/resourcemanager/compute/models/UserArtifactManage.java","src/main/java/com/azure/resourcemanager/compute/models/UserArtifactSettings.java","src/main/java/com/azure/resourcemanager/compute/models/UserArtifactSource.java","src/main/java/com/azure/resourcemanager/compute/models/UserInitiatedReboot.java","src/main/java/com/azure/resourcemanager/compute/models/UserInitiatedRedeploy.java","src/main/java/com/azure/resourcemanager/compute/models/VMDiskSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VMGalleryApplication.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchClassificationLinux.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchClassificationWindows.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchRebootBehavior.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchRebootSetting.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchRebootStatus.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetConvertToSinglePlacementGroupInput.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventAdditionalContext.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventState.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventTargetResource.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventType.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetScaleOutInput.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetScaleOutInputProperties.java","src/main/java/com/azure/resourcemanager/compute/models/VMSizeProperties.java","src/main/java/com/azure/resourcemanager/compute/models/ValidationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ValidationsProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VaultCertificate.java","src/main/java/com/azure/resourcemanager/compute/models/VaultSecretGroup.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualHardDisk.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineAgentInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineCaptureParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineDiskDelayAction.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineDiskNetworkAccessPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineDiskProperties.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineEvictionPolicyTypes.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionHandlerInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineHealthStatus.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineIdentityUserAssignedIdentities.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineImageFeature.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineInstallPatchesParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineIpTag.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceIpConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachinePatchStatus.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachinePriorityTypes.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachinePublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachinePublicIpAddressDnsSettingsConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineReimageParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandScriptSource.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetDataDisk.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetExtensionProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetExtensionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetHardwareProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetInstanceViewStatusesSummary.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIpConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIpTag.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetManagedDiskParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetMigrationInfo.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetNetworkConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetNetworkProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetOSDisk.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetOSProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetPublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetReimageParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetScaleInRules.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetSkuCapacity.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetSkuScaleType.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateIpConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateNetworkConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateNetworkProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateOSDisk.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateOSProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdatePublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateVMProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMExtensionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMExtensionsSummary.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMInstanceIDs.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMInstanceRequiredIDs.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMNetworkProfileConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMProtectionPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMReimageParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineSizeTypes.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineSoftwarePatchProperties.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineStatusCodeCount.java","src/main/java/com/azure/resourcemanager/compute/models/VmDiskTypes.java","src/main/java/com/azure/resourcemanager/compute/models/WinRMConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/WinRMListener.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsParameters.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsPatchAssessmentMode.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsVMGuestPatchMode.java","src/main/java/com/azure/resourcemanager/compute/models/ZonalPlatformFaultDomainAlignMode.java","src/main/java/com/azure/resourcemanager/compute/models/ZoneAllocationPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ZoneMovement.java","src/main/java/com/azure/resourcemanager/compute/models/ZonePlacementPolicyType.java","src/main/java/com/azure/resourcemanager/compute/models/package-info.java","src/main/java/com/azure/resourcemanager/compute/package-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Compute":"2026-04-01","ComputeDisk":"2026-03-02","ComputeGallery":"2026-03-03","ComputeSku":"2021-07-01"},"crossLanguagePackageId":"Compute","crossLanguageVersion":"8d018ae98667","generatedFiles":["src/main/java/com/azure/resourcemanager/compute/fluent/AvailabilitySetsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationGroupsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CommunityGalleriesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CommunityGalleryImageVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/CommunityGalleryImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostGroupsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DiskAccessesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DiskEncryptionSetsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DiskRestorePointsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleriesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryApplicationsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImageVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfileVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryInVMAccessControlProfilesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryScriptVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GalleryScriptsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/GallerySharingProfilesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/ImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/InterconnectBlocksClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/ProximityPlacementGroupsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/ResourceSkusClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/RestorePointCollectionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/RestorePointsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SharedGalleriesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SharedGalleryImageVersionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SharedGalleryImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SharedGalleryInvitesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SoftDeletedResourcesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/SshPublicKeysClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/TenantLevelSharedGalleryInvitesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineDiagnosticRunCommandsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineImagesEdgeZonesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetExtensionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetLifeCycleHookEventsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetRollingUpgradesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMDiagnosticRunCommandsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMExtensionsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMRunCommandsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineSizesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/AccessUriInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationGroupInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationGroupProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CapacityReservationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryIdentifier.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostGroupInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostGroupProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DedicatedHostProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskAccessInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskAccessProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskEncryptionSetInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskEncryptionSetUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskRestorePointInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskRestorePointProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/EncryptionSetProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryApplicationVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryImageVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInVMAccessControlProfileVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryScriptInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryScriptProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryScriptVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GalleryScriptVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/GallerySoftDeletedResourceProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/InterconnectBlockInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/LogAnalyticsOperationResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/NetworkInterfaceReferenceProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ProximityPlacementGroupInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ProximityPlacementGroupProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RecoveryWalkResponseInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/ResourceSkuInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointCollectionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointCollectionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RestorePointProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RetrieveBootDiagnosticsDataResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RollingUpgradeStatusInfoInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RollingUpgradeStatusInfoProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandDocumentBaseInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandDocumentInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/RunCommandResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryIdentifier.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageVersionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryImageVersionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharedGalleryProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SharingUpdateInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyGenerateKeyPairResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyResourceInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/SshPublicKeyResourceProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/UpgradeOperationHistoricalStatusInfoInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VMScaleSetLifecycleHookEventInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VMScaleSetLifecycleHookEventProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineAssessPatchesResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineCaptureResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineDiagnosticRunCommandInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineExtensionsListResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineImageResourceInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInstallPatchesResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineInstanceViewInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineNetworkInterfaceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachinePropertiesInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachinePublicIPAddressConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineRunCommandInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineRunCommandProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetExtensionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetExtensionProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetIPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetInstanceViewInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetNetworkConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetPublicIPAddressConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetSkuInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateIPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateNetworkConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMExtensionInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMExtensionsListResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMInstanceViewInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetVMPropertiesInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineSizeInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineUpdateInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/VmImagesInEdgeZoneListResultInner.java","src/main/java/com/azure/resourcemanager/compute/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/compute/fluent/package-info.java","src/main/java/com/azure/resourcemanager/compute/implementation/AvailabilitySetsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CapacityReservationGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CapacityReservationsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleriesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImageVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/CommunityGalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DedicatedHostGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DedicatedHostsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DiskAccessesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DiskEncryptionSetsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DiskRestorePointsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/DisksClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleriesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryApplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImageVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfileVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryInVMAccessControlProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryScriptVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GalleryScriptsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/GallerySharingProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/ImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/InterconnectBlocksClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/LogAnalyticsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/ProximityPlacementGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/ResourceSkusClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/RestorePointCollectionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/RestorePointsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleriesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImageVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SharedGalleryInvitesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SoftDeletedResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/SshPublicKeysClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/TenantLevelSharedGalleryInvitesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineDiagnosticRunCommandsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImagesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineImagesEdgeZonesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineRunCommandsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetLifeCycleHookEventsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetRollingUpgradesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMDiagnosticRunCommandsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMRunCommandsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetsClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineSizesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/AvailabilitySetListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/CapacityReservationGroupListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/CapacityReservationListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/CommunityGalleryImageList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/CommunityGalleryImageVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DedicatedHostGroupListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DedicatedHostListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DedicatedHostSizeListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DiskAccessList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DiskEncryptionSetList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DiskList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/DiskRestorePointList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryApplicationList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryApplicationVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryImageList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryImageVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryInVMAccessControlProfileList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryInVMAccessControlProfileVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryScriptList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GalleryScriptVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/GallerySoftDeletedResourceList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ImageListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/InterconnectBlockListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ListUsagesResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ProximityPlacementGroupListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ResourceSkusResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/ResourceUriList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/RestorePointCollectionListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/RunCommandListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SharedGalleryImageList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SharedGalleryImageVersionList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SharedGalleryList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SnapshotList.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/SshPublicKeysGroupListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VMScaleSetLifecycleHookEventListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineDiagnosticRunCommandsListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineRunCommandsListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetExtensionListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetListOSUpgradeHistory.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetListSkusResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetListWithLinkResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineScaleSetVMListResult.java","src/main/java/com/azure/resourcemanager/compute/implementation/models/VirtualMachineSizeListResult.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRules.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesMode.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesPrivilege.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRole.java","src/main/java/com/azure/resourcemanager/compute/models/AccessControlRulesRoleAssignment.java","src/main/java/com/azure/resourcemanager/compute/models/AccessLevel.java","src/main/java/com/azure/resourcemanager/compute/models/ActionType.java","src/main/java/com/azure/resourcemanager/compute/models/AdditionalCapabilities.java","src/main/java/com/azure/resourcemanager/compute/models/AdditionalDiskProperties.java","src/main/java/com/azure/resourcemanager/compute/models/AdditionalReplicaSet.java","src/main/java/com/azure/resourcemanager/compute/models/AdditionalUnattendContent.java","src/main/java/com/azure/resourcemanager/compute/models/AggregatedReplicationState.java","src/main/java/com/azure/resourcemanager/compute/models/AllInstancesDown.java","src/main/java/com/azure/resourcemanager/compute/models/AllocationStrategy.java","src/main/java/com/azure/resourcemanager/compute/models/AlternativeOption.java","src/main/java/com/azure/resourcemanager/compute/models/AlternativeType.java","src/main/java/com/azure/resourcemanager/compute/models/ApiEntityReference.java","src/main/java/com/azure/resourcemanager/compute/models/ApiError.java","src/main/java/com/azure/resourcemanager/compute/models/ApiErrorException.java","src/main/java/com/azure/resourcemanager/compute/models/ApplicationProfile.java","src/main/java/com/azure/resourcemanager/compute/models/Architecture.java","src/main/java/com/azure/resourcemanager/compute/models/ArchitectureTypes.java","src/main/java/com/azure/resourcemanager/compute/models/AttachDetachDataDisksRequest.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticOSUpgradePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticOSUpgradeProperties.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticRepairsPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticSkuMigrationPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AutomaticZoneRebalancingPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AvailabilityPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/AvailabilityPolicyDiskDelay.java","src/main/java/com/azure/resourcemanager/compute/models/AvailabilitySetSkuTypes.java","src/main/java/com/azure/resourcemanager/compute/models/AvailabilitySetUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/AvailablePatchSummary.java","src/main/java/com/azure/resourcemanager/compute/models/BillingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/BootDiagnostics.java","src/main/java/com/azure/resourcemanager/compute/models/BootDiagnosticsInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/CachingTypes.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupInstanceViewTypes.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationGroupUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceViewTypes.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationInstanceViewWithName.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationProfile.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationStateInfo.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationType.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/CapacityReservationUtilization.java","src/main/java/com/azure/resourcemanager/compute/models/CommunityGalleryImageIdentifier.java","src/main/java/com/azure/resourcemanager/compute/models/CommunityGalleryInfo.java","src/main/java/com/azure/resourcemanager/compute/models/CommunityGalleryMetadata.java","src/main/java/com/azure/resourcemanager/compute/models/ComponentNames.java","src/main/java/com/azure/resourcemanager/compute/models/ConfidentialVMEncryptionType.java","src/main/java/com/azure/resourcemanager/compute/models/ConfidentialVMVersion.java","src/main/java/com/azure/resourcemanager/compute/models/ConsistencyModeTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ConvertToVirtualMachineScaleSetInput.java","src/main/java/com/azure/resourcemanager/compute/models/CopyCompletionError.java","src/main/java/com/azure/resourcemanager/compute/models/CopyCompletionErrorReason.java","src/main/java/com/azure/resourcemanager/compute/models/CreationData.java","src/main/java/com/azure/resourcemanager/compute/models/DataAccessAuthMode.java","src/main/java/com/azure/resourcemanager/compute/models/DataDisk.java","src/main/java/com/azure/resourcemanager/compute/models/DataDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/DataDiskImageEncryption.java","src/main/java/com/azure/resourcemanager/compute/models/DataDiskImageSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/DataDisksToAttach.java","src/main/java/com/azure/resourcemanager/compute/models/DataDisksToDetach.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostAllocatableVM.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostAvailableCapacity.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupPropertiesAdditionalCapabilities.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostGroupUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostInstanceViewWithName.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostLicenseTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DedicatedHostUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DefaultVirtualMachineScaleSetInfo.java","src/main/java/com/azure/resourcemanager/compute/models/DeleteOptions.java","src/main/java/com/azure/resourcemanager/compute/models/DiagnosticsProfile.java","src/main/java/com/azure/resourcemanager/compute/models/DiffDiskOptions.java","src/main/java/com/azure/resourcemanager/compute/models/DiffDiskPlacement.java","src/main/java/com/azure/resourcemanager/compute/models/DiffDiskSettings.java","src/main/java/com/azure/resourcemanager/compute/models/Disallowed.java","src/main/java/com/azure/resourcemanager/compute/models/DisallowedConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/DiskAccessUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DiskApiVersion.java","src/main/java/com/azure/resourcemanager/compute/models/DiskAvailabilityPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/DiskControllerTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskCreateOption.java","src/main/java/com/azure/resourcemanager/compute/models/DiskCreateOptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskDeleteOptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskDetachOptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetIdentityType.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetParameters.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetType.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSetUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DiskEncryptionSettings.java","src/main/java/com/azure/resourcemanager/compute/models/DiskImageEncryption.java","src/main/java/com/azure/resourcemanager/compute/models/DiskInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/DiskPurchasePlan.java","src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointAttributes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/DiskRestorePointReplicationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/DiskSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/DiskSecurityTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskSku.java","src/main/java/com/azure/resourcemanager/compute/models/DiskState.java","src/main/java/com/azure/resourcemanager/compute/models/DiskStorageAccountTypes.java","src/main/java/com/azure/resourcemanager/compute/models/DiskUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/DomainNameLabelScopeTypes.java","src/main/java/com/azure/resourcemanager/compute/models/EdgeZoneStorageAccountType.java","src/main/java/com/azure/resourcemanager/compute/models/Encryption.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionImages.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionSetIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionSettingsCollection.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionSettingsElement.java","src/main/java/com/azure/resourcemanager/compute/models/EncryptionType.java","src/main/java/com/azure/resourcemanager/compute/models/EndpointAccess.java","src/main/java/com/azure/resourcemanager/compute/models/EndpointTypes.java","src/main/java/com/azure/resourcemanager/compute/models/EventGridAndResourceGraph.java","src/main/java/com/azure/resourcemanager/compute/models/ExecutedValidation.java","src/main/java/com/azure/resourcemanager/compute/models/ExecutionState.java","src/main/java/com/azure/resourcemanager/compute/models/ExpandTypeForListVMs.java","src/main/java/com/azure/resourcemanager/compute/models/ExpandTypesForGetCapacityReservationGroups.java","src/main/java/com/azure/resourcemanager/compute/models/ExpandTypesForGetVMScaleSets.java","src/main/java/com/azure/resourcemanager/compute/models/ExpandTypesForListVMs.java","src/main/java/com/azure/resourcemanager/compute/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/compute/models/ExtendedLocationType.java","src/main/java/com/azure/resourcemanager/compute/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ExtensionFeatureMetadata.java","src/main/java/com/azure/resourcemanager/compute/models/ExtensionFeatureTag.java","src/main/java/com/azure/resourcemanager/compute/models/ExternalHealthPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/FileFormat.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationCustomAction.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationCustomActionParameter.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationCustomActionParameterType.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationScriptRebootBehavior.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionPublishingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionSafetyProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryApplicationVersionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactPublishingProfileBase.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactSafetyProfileBase.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactVersionFullSource.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryArtifactVersionSource.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryDataDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryDiskImageSource.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryExpandParams.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryExtendedLocation.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryExtendedLocationType.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryIdentifier.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageFeature.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageIdentifier.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionPublishingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionSafetyProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionState.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionUefiSettings.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryImageVersionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileProperties.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryInVMAccessControlProfileVersionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryOSDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryProvisioningState.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfilePropertiesBase.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryResourceProfileVersionPropertiesBase.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptParameter.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptParameterType.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptVersionPublishingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptVersionSafetyProfile.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryScriptVersionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GallerySharingPermissionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryTargetExtendedLocation.java","src/main/java/com/azure/resourcemanager/compute/models/GalleryUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/GenericGalleryParameter.java","src/main/java/com/azure/resourcemanager/compute/models/GrantAccessData.java","src/main/java/com/azure/resourcemanager/compute/models/HardwareProfile.java","src/main/java/com/azure/resourcemanager/compute/models/HighSpeedInterconnectPlacement.java","src/main/java/com/azure/resourcemanager/compute/models/HostCaching.java","src/main/java/com/azure/resourcemanager/compute/models/HostEndpointSettings.java","src/main/java/com/azure/resourcemanager/compute/models/HyperVGeneration.java","src/main/java/com/azure/resourcemanager/compute/models/HyperVGenerationType.java","src/main/java/com/azure/resourcemanager/compute/models/HyperVGenerationTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ImageDataDisk.java","src/main/java/com/azure/resourcemanager/compute/models/ImageDeprecationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ImageDisk.java","src/main/java/com/azure/resourcemanager/compute/models/ImageDiskReference.java","src/main/java/com/azure/resourcemanager/compute/models/ImageMetadataProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ImageOSDisk.java","src/main/java/com/azure/resourcemanager/compute/models/ImagePurchasePlan.java","src/main/java/com/azure/resourcemanager/compute/models/ImageReference.java","src/main/java/com/azure/resourcemanager/compute/models/ImageState.java","src/main/java/com/azure/resourcemanager/compute/models/ImageStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ImageUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/ImageVersionSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ImmutabilityPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ImmutabilityPolicyData.java","src/main/java/com/azure/resourcemanager/compute/models/ImmutabilityPolicyLockData.java","src/main/java/com/azure/resourcemanager/compute/models/ImmutabilityPolicyType.java","src/main/java/com/azure/resourcemanager/compute/models/InnerError.java","src/main/java/com/azure/resourcemanager/compute/models/InstanceViewStatus.java","src/main/java/com/azure/resourcemanager/compute/models/InstanceViewTypes.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockExpandTypes.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockProfile.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockProperties.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectBlockUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectGroupProfile.java","src/main/java/com/azure/resourcemanager/compute/models/InterconnectInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/IntervalInMins.java","src/main/java/com/azure/resourcemanager/compute/models/IpVersion.java","src/main/java/com/azure/resourcemanager/compute/models/IpVersions.java","src/main/java/com/azure/resourcemanager/compute/models/KeyForDiskEncryptionSet.java","src/main/java/com/azure/resourcemanager/compute/models/KeyVaultAndKeyReference.java","src/main/java/com/azure/resourcemanager/compute/models/KeyVaultAndSecretReference.java","src/main/java/com/azure/resourcemanager/compute/models/KeyVaultKeyReference.java","src/main/java/com/azure/resourcemanager/compute/models/KeyVaultSecretReference.java","src/main/java/com/azure/resourcemanager/compute/models/LastPatchInstallationSummary.java","src/main/java/com/azure/resourcemanager/compute/models/LifecycleHook.java","src/main/java/com/azure/resourcemanager/compute/models/LifecycleHookAction.java","src/main/java/com/azure/resourcemanager/compute/models/LifecycleHookActionState.java","src/main/java/com/azure/resourcemanager/compute/models/LifecycleHooksProfile.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxParameters.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxPatchAssessmentMode.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxPatchSettings.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java","src/main/java/com/azure/resourcemanager/compute/models/LinuxVMGuestPatchMode.java","src/main/java/com/azure/resourcemanager/compute/models/ListVersionsExpandOptions.java","src/main/java/com/azure/resourcemanager/compute/models/LogAnalyticsInputBase.java","src/main/java/com/azure/resourcemanager/compute/models/LogAnalyticsOutput.java","src/main/java/com/azure/resourcemanager/compute/models/MaintenanceOperationResultCodeTypes.java","src/main/java/com/azure/resourcemanager/compute/models/MaintenanceRedeployStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ManagedDiskParameters.java","src/main/java/com/azure/resourcemanager/compute/models/MaxInstancePercentPerZonePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/MetadataKeyValue.java","src/main/java/com/azure/resourcemanager/compute/models/MetadataType.java","src/main/java/com/azure/resourcemanager/compute/models/MigrateToVirtualMachineScaleSetInput.java","src/main/java/com/azure/resourcemanager/compute/models/MigrateVMAvailabilityZoneInput.java","src/main/java/com/azure/resourcemanager/compute/models/MigrateVMToVirtualMachineScaleSetInput.java","src/main/java/com/azure/resourcemanager/compute/models/Mode.java","src/main/java/com/azure/resourcemanager/compute/models/Modes.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkAccessPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkApiVersion.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkInterfaceAuxiliaryMode.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkInterfaceAuxiliarySku.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkInterfaceReference.java","src/main/java/com/azure/resourcemanager/compute/models/NetworkProfile.java","src/main/java/com/azure/resourcemanager/compute/models/OSDisk.java","src/main/java/com/azure/resourcemanager/compute/models/OSDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/OSDiskImageEncryption.java","src/main/java/com/azure/resourcemanager/compute/models/OSDiskImageSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/OSImageNotificationProfile.java","src/main/java/com/azure/resourcemanager/compute/models/OSProfile.java","src/main/java/com/azure/resourcemanager/compute/models/OSProfileProvisioningData.java","src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemStateTypes.java","src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemType.java","src/main/java/com/azure/resourcemanager/compute/models/OperatingSystemTypes.java","src/main/java/com/azure/resourcemanager/compute/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/compute/models/OperationRecoverySettings.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationMode.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceNames.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceOperationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceState.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceStateAction.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceStateInput.java","src/main/java/com/azure/resourcemanager/compute/models/OrchestrationServiceSummary.java","src/main/java/com/azure/resourcemanager/compute/models/Origin.java","src/main/java/com/azure/resourcemanager/compute/models/PassNames.java","src/main/java/com/azure/resourcemanager/compute/models/PatchAssessmentState.java","src/main/java/com/azure/resourcemanager/compute/models/PatchInstallationDetail.java","src/main/java/com/azure/resourcemanager/compute/models/PatchInstallationState.java","src/main/java/com/azure/resourcemanager/compute/models/PatchOperationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/PatchSettings.java","src/main/java/com/azure/resourcemanager/compute/models/PirCommunityGalleryResource.java","src/main/java/com/azure/resourcemanager/compute/models/PirResource.java","src/main/java/com/azure/resourcemanager/compute/models/PirSharedGalleryResource.java","src/main/java/com/azure/resourcemanager/compute/models/Placement.java","src/main/java/com/azure/resourcemanager/compute/models/Plan.java","src/main/java/com/azure/resourcemanager/compute/models/PlatformAttribute.java","src/main/java/com/azure/resourcemanager/compute/models/PolicyViolation.java","src/main/java/com/azure/resourcemanager/compute/models/PolicyViolationCategory.java","src/main/java/com/azure/resourcemanager/compute/models/PriorityMixPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/compute/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/compute/models/ProcessorMode.java","src/main/java/com/azure/resourcemanager/compute/models/PropertyUpdatesInProgress.java","src/main/java/com/azure/resourcemanager/compute/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ProvisionedBandwidthCopyOption.java","src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupPropertiesIntent.java","src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupType.java","src/main/java/com/azure/resourcemanager/compute/models/ProximityPlacementGroupUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/ProxyAgentSettings.java","src/main/java/com/azure/resourcemanager/compute/models/PublicIpAddressSku.java","src/main/java/com/azure/resourcemanager/compute/models/PublicIpAddressSkuName.java","src/main/java/com/azure/resourcemanager/compute/models/PublicIpAddressSkuTier.java","src/main/java/com/azure/resourcemanager/compute/models/PublicIpAllocationMethod.java","src/main/java/com/azure/resourcemanager/compute/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/compute/models/PurchasePlan.java","src/main/java/com/azure/resourcemanager/compute/models/RebalanceBehavior.java","src/main/java/com/azure/resourcemanager/compute/models/RebalanceStrategy.java","src/main/java/com/azure/resourcemanager/compute/models/RecommendedMachineConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/RegionalReplicationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/RegionalSharingStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ReimageRecoveryPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ReleaseCategory.java","src/main/java/com/azure/resourcemanager/compute/models/RepairAction.java","src/main/java/com/azure/resourcemanager/compute/models/ReplicationMode.java","src/main/java/com/azure/resourcemanager/compute/models/ReplicationState.java","src/main/java/com/azure/resourcemanager/compute/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ReplicationStatusTypes.java","src/main/java/com/azure/resourcemanager/compute/models/RequestRateByIntervalInput.java","src/main/java/com/azure/resourcemanager/compute/models/ReservationState.java","src/main/java/com/azure/resourcemanager/compute/models/ReservationType.java","src/main/java/com/azure/resourcemanager/compute/models/ResiliencyPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ResiliencyProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ResilientVMCreationPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ResilientVMDeletionPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ResilientVMDeletionStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceIdOptionsForGetCapacityReservationGroups.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceRange.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSharingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuCapabilities.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuCapacity.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuCapacityScaleType.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuCosts.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuLocationInfo.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuRestrictionInfo.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuRestrictions.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuRestrictionsReasonCode.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuRestrictionsType.java","src/main/java/com/azure/resourcemanager/compute/models/ResourceSkuZoneDetails.java","src/main/java/com/azure/resourcemanager/compute/models/RestartRecoveryPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionExpandOptions.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionSourceProperties.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointCollectionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointEncryption.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointEncryptionType.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointExpandOptions.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointSourceMetadata.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointSourceVMDataDisk.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointSourceVMStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/RestorePointSourceVmosDisk.java","src/main/java/com/azure/resourcemanager/compute/models/RollbackStatusInfo.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradeActionType.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradeProgressInfo.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradeRunningStatus.java","src/main/java/com/azure/resourcemanager/compute/models/RollingUpgradeStatusCode.java","src/main/java/com/azure/resourcemanager/compute/models/RunCommandInput.java","src/main/java/com/azure/resourcemanager/compute/models/RunCommandInputParameter.java","src/main/java/com/azure/resourcemanager/compute/models/RunCommandManagedIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/RunCommandParameterDefinition.java","src/main/java/com/azure/resourcemanager/compute/models/RunProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ScaleInPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ScheduleProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ScheduledEventsAdditionalPublishingTargets.java","src/main/java/com/azure/resourcemanager/compute/models/ScheduledEventsPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ScheduledEventsProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ScriptShellTypes.java","src/main/java/com/azure/resourcemanager/compute/models/ScriptSource.java","src/main/java/com/azure/resourcemanager/compute/models/SecretsProvisioningComponent.java","src/main/java/com/azure/resourcemanager/compute/models/SecretsProvisioningComponentName.java","src/main/java/com/azure/resourcemanager/compute/models/SecretsProvisioningSettings.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityEncryptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityPostureReference.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityPostureReferenceUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SecurityTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SelectPermissions.java","src/main/java/com/azure/resourcemanager/compute/models/ServiceArtifactReference.java","src/main/java/com/azure/resourcemanager/compute/models/SettingNames.java","src/main/java/com/azure/resourcemanager/compute/models/ShareInfoElement.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryDataDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryHostCaching.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryImageVersionStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SharedGalleryOSDiskImage.java","src/main/java/com/azure/resourcemanager/compute/models/SharedToValues.java","src/main/java/com/azure/resourcemanager/compute/models/SharingProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SharingProfileGroup.java","src/main/java/com/azure/resourcemanager/compute/models/SharingProfileGroupTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SharingState.java","src/main/java/com/azure/resourcemanager/compute/models/SharingStatus.java","src/main/java/com/azure/resourcemanager/compute/models/SharingUpdateOperationTypes.java","src/main/java/com/azure/resourcemanager/compute/models/Sku.java","src/main/java/com/azure/resourcemanager/compute/models/SkuProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SkuProfileVMSize.java","src/main/java/com/azure/resourcemanager/compute/models/SnapshotAccessState.java","src/main/java/com/azure/resourcemanager/compute/models/SnapshotSku.java","src/main/java/com/azure/resourcemanager/compute/models/SnapshotStorageAccountTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SnapshotUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/SoftDeletePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/SoftDeletedArtifactTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SourceVault.java","src/main/java/com/azure/resourcemanager/compute/models/SpotRestorePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/SshConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/SshEncryptionTypes.java","src/main/java/com/azure/resourcemanager/compute/models/SshGenerateKeyPairInputParameters.java","src/main/java/com/azure/resourcemanager/compute/models/SshPublicKey.java","src/main/java/com/azure/resourcemanager/compute/models/SshPublicKeyUpdateResource.java","src/main/java/com/azure/resourcemanager/compute/models/StartRecoveryPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/StatusLevelTypes.java","src/main/java/com/azure/resourcemanager/compute/models/StorageAccountStrategy.java","src/main/java/com/azure/resourcemanager/compute/models/StorageAccountType.java","src/main/java/com/azure/resourcemanager/compute/models/StorageAccountTypes.java","src/main/java/com/azure/resourcemanager/compute/models/StorageAlignmentStatus.java","src/main/java/com/azure/resourcemanager/compute/models/StorageFaultDomainAlignmentType.java","src/main/java/com/azure/resourcemanager/compute/models/StorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/SubResourceReadOnly.java","src/main/java/com/azure/resourcemanager/compute/models/SubResourceWithColocationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/SupportedCapabilities.java","src/main/java/com/azure/resourcemanager/compute/models/SupportedSecurityOption.java","src/main/java/com/azure/resourcemanager/compute/models/TargetRegion.java","src/main/java/com/azure/resourcemanager/compute/models/TerminateNotificationProfile.java","src/main/java/com/azure/resourcemanager/compute/models/ThrottledRequestsInput.java","src/main/java/com/azure/resourcemanager/compute/models/UefiKey.java","src/main/java/com/azure/resourcemanager/compute/models/UefiKeySignatures.java","src/main/java/com/azure/resourcemanager/compute/models/UefiKeyType.java","src/main/java/com/azure/resourcemanager/compute/models/UefiSettings.java","src/main/java/com/azure/resourcemanager/compute/models/UefiSignatureTemplateName.java","src/main/java/com/azure/resourcemanager/compute/models/UpdateResource.java","src/main/java/com/azure/resourcemanager/compute/models/UpdateResourceDefinition.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeMode.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeOperationHistoricalStatusInfoProperties.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeOperationHistoryStatus.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeOperationInvoker.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradePolicy.java","src/main/java/com/azure/resourcemanager/compute/models/UpgradeState.java","src/main/java/com/azure/resourcemanager/compute/models/UrgencyLevel.java","src/main/java/com/azure/resourcemanager/compute/models/UsageName.java","src/main/java/com/azure/resourcemanager/compute/models/UserArtifactManage.java","src/main/java/com/azure/resourcemanager/compute/models/UserArtifactSettings.java","src/main/java/com/azure/resourcemanager/compute/models/UserArtifactSource.java","src/main/java/com/azure/resourcemanager/compute/models/UserInitiatedReboot.java","src/main/java/com/azure/resourcemanager/compute/models/UserInitiatedRedeploy.java","src/main/java/com/azure/resourcemanager/compute/models/VMDiskSecurityProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VMGalleryApplication.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchClassificationLinux.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchClassificationWindows.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchRebootBehavior.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchRebootSetting.java","src/main/java/com/azure/resourcemanager/compute/models/VMGuestPatchRebootStatus.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetConvertToSinglePlacementGroupInput.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventAdditionalContext.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventState.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventTargetResource.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventType.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetLifecycleHookEventUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetScaleOutInput.java","src/main/java/com/azure/resourcemanager/compute/models/VMScaleSetScaleOutInputProperties.java","src/main/java/com/azure/resourcemanager/compute/models/VMSizeProperties.java","src/main/java/com/azure/resourcemanager/compute/models/ValidationStatus.java","src/main/java/com/azure/resourcemanager/compute/models/ValidationsProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VaultCertificate.java","src/main/java/com/azure/resourcemanager/compute/models/VaultSecretGroup.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualHardDisk.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineAgentInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineCaptureParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineDiskDelayAction.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineDiskNetworkAccessPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineDiskProperties.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineEvictionPolicyTypes.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionHandlerInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineExtensionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineHealthStatus.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineIdentityUserAssignedIdentities.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineImageFeature.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineInstallPatchesParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineIpTag.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineNetworkInterfaceIpConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachinePatchStatus.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachinePriorityTypes.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachinePublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachinePublicIpAddressDnsSettingsConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineReimageParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandInstanceView.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandScriptSource.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineRunCommandUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetDataDisk.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetExtensionProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetExtensionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetHardwareProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIdentity.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetInstanceViewStatusesSummary.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIpConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIpTag.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetManagedDiskParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetMigrationInfo.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetNetworkConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetNetworkProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetOSDisk.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetOSProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetPublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetReimageParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetScaleInRules.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetSkuCapacity.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetSkuScaleType.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateIpConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateNetworkConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateNetworkProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateOSDisk.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateOSProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdatePublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateStorageProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateVMProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMExtensionUpdate.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMExtensionsSummary.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMInstanceIDs.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMInstanceRequiredIDs.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMNetworkProfileConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMProfile.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMProtectionPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetVMReimageParameters.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineSizeTypes.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineSoftwarePatchProperties.java","src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineStatusCodeCount.java","src/main/java/com/azure/resourcemanager/compute/models/VmDiskTypes.java","src/main/java/com/azure/resourcemanager/compute/models/WinRMConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/WinRMListener.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsConfiguration.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsParameters.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsPatchAssessmentMode.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java","src/main/java/com/azure/resourcemanager/compute/models/WindowsVMGuestPatchMode.java","src/main/java/com/azure/resourcemanager/compute/models/ZonalPlatformFaultDomainAlignMode.java","src/main/java/com/azure/resourcemanager/compute/models/ZoneAllocationPolicy.java","src/main/java/com/azure/resourcemanager/compute/models/ZoneMovement.java","src/main/java/com/azure/resourcemanager/compute/models/ZonePlacementPolicyType.java","src/main/java/com/azure/resourcemanager/compute/models/package-info.java","src/main/java/com/azure/resourcemanager/compute/package-info.java"]} \ No newline at end of file diff --git a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/CapacityReservationGroupsDeleteSamples.java b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/CapacityReservationGroupsDeleteSamples.java index 12acc73d3ca4..d7084f0d9b67 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/CapacityReservationGroupsDeleteSamples.java +++ b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/CapacityReservationGroupsDeleteSamples.java @@ -20,7 +20,7 @@ public final class CapacityReservationGroupsDeleteSamples { capacityReservationGroupDeleteMinimumSetGen(com.azure.resourcemanager.compute.ComputeManager manager) { manager.serviceClient() .getCapacityReservationGroups() - .delete("rgcompute", "aaaaaaaaaaaaaaaaaaaaaaaaaa", com.azure.core.util.Context.NONE); + .deleteWithResponse("rgcompute", "aaaaaaaaaaaaaaaaaaaaaaaaaa", com.azure.core.util.Context.NONE); } /* @@ -35,6 +35,6 @@ public final class CapacityReservationGroupsDeleteSamples { capacityReservationGroupDeleteMaximumSetGen(com.azure.resourcemanager.compute.ComputeManager manager) { manager.serviceClient() .getCapacityReservationGroups() - .delete("rgcompute", "a", com.azure.core.util.Context.NONE); + .deleteWithResponse("rgcompute", "a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsUpdateSamples.java b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsUpdateSamples.java index 843c29163a63..954ecd07fcef 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsUpdateSamples.java +++ b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsUpdateSamples.java @@ -224,7 +224,6 @@ public static void virtualMachineScaleSetUpdateMaximumSetGen( .withDomainNameLabel("aaaaaaaaaaaaaaaaaa")) .withDeleteOption(DeleteOptions.DELETE)) .withPrivateIpAddressVersion(IpVersion.IPV4) - .withPrivateIPAddressPrefixLength(28) .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId( "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"))) .withApplicationSecurityGroups(Arrays.asList(new SubResource().withId( diff --git a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesCreateOrUpdateSamples.java b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesCreateOrUpdateSamples.java index 3d07506cf781..0c177b995846 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesCreateOrUpdateSamples.java +++ b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesCreateOrUpdateSamples.java @@ -28,7 +28,6 @@ import com.azure.resourcemanager.compute.models.DomainNameLabelScopeTypes; import com.azure.resourcemanager.compute.models.EncryptionIdentity; import com.azure.resourcemanager.compute.models.EventGridAndResourceGraph; -import com.azure.resourcemanager.compute.models.FlexProfile; import com.azure.resourcemanager.compute.models.HardwareProfile; import com.azure.resourcemanager.compute.models.HostEndpointSettings; import com.azure.resourcemanager.compute.models.ImageReference; @@ -186,43 +185,6 @@ public static void createAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOS( null, null, com.azure.core.util.Context.NONE); } - /* - * x-ms-original-file: 2026-04-01/virtualMachineExamples/VirtualMachine_Create_WithFlexProfile.json - */ - /** - * Sample code: Create a VM with a FlexProfile. - * - * @param manager Entry point to ComputeManager. - */ - public static void createAVMWithAFlexProfile(com.azure.resourcemanager.compute.ComputeManager manager) { - manager.serviceClient() - .getVirtualMachines() - .createOrUpdate("myResourceGroup", "myVM", - new VirtualMachineInner().withLocation("westus") - .withTags(mapOf("department", "engineering", "project", "alpha")) - .withFlexProfile(new FlexProfile().withPreferredVMSize("Standard_D4s_v5")) - .withStorageProfile( - new StorageProfile() - .withImageReference(new ImageReference().withPublisher("Canonical") - .withOffer("0001-com-ubuntu-server-focal") - .withSku("20_04-lts-gen2") - .withVersion("latest")) - .withOsDisk(new OSDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withManagedDisk(new ManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)))) - .withOsProfile(new OSProfile().withComputerName("myVM") - .withAdminUsername("azureuser") - .withLinuxConfiguration(new LinuxConfiguration().withDisablePasswordAuthentication(true) - .withSsh(new SshConfiguration().withPublicKeys( - Arrays.asList(new SshPublicKey().withPath("/home/azureuser/.ssh/authorized_keys") - .withKeyData("fakeTokenPlaceholder")))))) - .withNetworkProfile( - new NetworkProfile().withNetworkInterfaces(Arrays.asList(new NetworkInterfaceReference().withId( - "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic") - .withPrimary(true)))), - null, null, com.azure.core.util.Context.NONE); - } - /* * x-ms-original-file: * 2026-04-01/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithPatchSettingModesOfAutomaticByPlatform.json diff --git a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesGetByResourceGroupSamples.java b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesGetByResourceGroupSamples.java index c15f58969b4e..d97232dcf98d 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesGetByResourceGroupSamples.java +++ b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesGetByResourceGroupSamples.java @@ -100,18 +100,4 @@ public static void getAVirtualMachine(com.azure.resourcemanager.compute.ComputeM .getByResourceGroupWithResponse("myResourceGroup", "myVM", InstanceViewTypes.USER_DATA, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: 2026-04-01/virtualMachineExamples/VirtualMachine_Get_WithFlexProfile.json - */ - /** - * Sample code: Get a virtual machine with a FlexProfile. - * - * @param manager Entry point to ComputeManager. - */ - public static void getAVirtualMachineWithAFlexProfile(com.azure.resourcemanager.compute.ComputeManager manager) { - manager.serviceClient() - .getVirtualMachines() - .getByResourceGroupWithResponse("myResourceGroup", "myVM", null, com.azure.core.util.Context.NONE); - } } diff --git a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesUpdateSamples.java b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesUpdateSamples.java index bfbe26c12b91..d754e98f9418 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesUpdateSamples.java +++ b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesUpdateSamples.java @@ -9,7 +9,6 @@ import com.azure.resourcemanager.compute.models.DataDisk; import com.azure.resourcemanager.compute.models.DiskCreateOptionTypes; import com.azure.resourcemanager.compute.models.DiskDetachOptionTypes; -import com.azure.resourcemanager.compute.models.FlexProfile; import com.azure.resourcemanager.compute.models.HardwareProfile; import com.azure.resourcemanager.compute.models.ImageReference; import com.azure.resourcemanager.compute.models.ManagedDiskParameters; @@ -26,23 +25,6 @@ * Samples for VirtualMachines Update. */ public final class VirtualMachinesUpdateSamples { - /* - * x-ms-original-file: 2026-04-01/virtualMachineExamples/VirtualMachine_Update_WithFlexProfile.json - */ - /** - * Sample code: Update a VM's FlexProfile. - * - * @param manager Entry point to ComputeManager. - */ - public static void updateAVMSFlexProfile(com.azure.resourcemanager.compute.ComputeManager manager) { - manager.serviceClient() - .getVirtualMachines() - .update("myResourceGroup", "myVM", - new VirtualMachineUpdateInner() - .withFlexProfile(new FlexProfile().withPreferredVMSize("Standard_D8s_v5")), - null, null, com.azure.core.util.Context.NONE); - } - /* * x-ms-original-file: * 2026-04-01/virtualMachineExamples/VirtualMachine_Update_DetachDataDiskUsingToBeDetachedProperty.json diff --git a/sdk/compute/azure-resourcemanager-compute/tsp-location.yaml b/sdk/compute/azure-resourcemanager-compute/tsp-location.yaml index 72850354fe42..37edba47c04b 100644 --- a/sdk/compute/azure-resourcemanager-compute/tsp-location.yaml +++ b/sdk/compute/azure-resourcemanager-compute/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/compute/resource-manager/Microsoft.Compute/Compute -commit: d218330c5a3b727df9504ba852e97259479e8fef +commit: eac980067e41d5e5f8b0e9a4aa0e3359f2790912 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/pom.xml b/sdk/computefleet/azure-resourcemanager-computefleet/pom.xml index cdace2973899..35680d12cbd4 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/pom.xml +++ b/sdk/computefleet/azure-resourcemanager-computefleet/pom.xml @@ -84,7 +84,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.62.0 + 2.61.2 test diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/CHANGELOG.md b/sdk/computeschedule/azure-resourcemanager-computeschedule/CHANGELOG.md index 67227fc8c124..2171f64b005e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/CHANGELOG.md +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0-beta.3 (Unreleased) +## 1.2.0-beta.2 (Unreleased) ### Features Added @@ -10,444 +10,6 @@ ### Other Changes -## 1.2.0-beta.2 (2026-06-04) - -- Azure Resource Manager Compute Schedule client library for Java. This package contains Microsoft Azure SDK for Compute Schedule Management SDK. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2026-04-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Breaking Changes - -#### `models.OccurrenceResultSummary` was modified - -* `validate()` was removed - -#### `models.ScheduledActionUpdateProperties` was modified - -* `validate()` was removed - -#### `models.RetryPolicy` was modified - -* `validate()` was removed - -#### `models.SubmitDeallocateRequest` was modified - -* `validate()` was removed - -#### `models.ExecuteDeallocateRequest` was modified - -* `validate()` was removed - -#### `models.OccurrenceExtensionProperties` was modified - -* `validate()` was removed - -#### `models.DelayRequest` was modified - -* `validate()` was removed - -#### `models.ResourceAttachRequest` was modified - -* `validate()` was removed - -#### `models.ExecuteCreateRequest` was modified - -* `validate()` was removed - -#### `models.CancelOccurrenceRequest` was modified - -* `validate()` was removed - -#### `models.InnerError` was modified - -* `validate()` was removed - -#### `models.ResourceResultSummary` was modified - -* `validate()` was removed - -#### `models.GetOperationErrorsRequest` was modified - -* `validate()` was removed - -#### `models.ScheduledActionProperties` was modified - -* `validate()` was removed - -#### `models.ResourceProvisionPayload` was modified - -* `withBaseProfile(java.util.Map)` was removed -* `baseProfile()` was removed -* `validate()` was removed -* `withResourceOverrides(java.util.List)` was removed -* `resourceOverrides()` was removed - -#### `models.OccurrenceProperties` was modified - -* `validate()` was removed - -#### `models.OperationErrorDetails` was modified - -* `validate()` was removed - -#### `models.OperationDisplay` was modified - -* `validate()` was removed - -#### `models.ExecuteDeleteRequest` was modified - -* `validate()` was removed - -#### `models.ExecuteStartRequest` was modified - -* `validate()` was removed - -#### `models.ResourceOperation` was modified - -* `validate()` was removed - -#### `models.ScheduledActionsSchedule` was modified - -* `validate()` was removed - -#### `models.SubmitHibernateRequest` was modified - -* `validate()` was removed - -#### `models.CancelOperationsRequest` was modified - -* `validate()` was removed - -#### `models.ResourceDetachRequest` was modified - -* `validate()` was removed - -#### `models.Resources` was modified - -* `validate()` was removed - -#### `models.ResourceStatus` was modified - -* `validate()` was removed - -#### `models.ExecutionParameters` was modified - -* `validate()` was removed - -#### `models.Error` was modified - -* `validate()` was removed - -#### `models.GetOperationStatusRequest` was modified - -* `validate()` was removed - -#### `models.ExecuteHibernateRequest` was modified - -* `validate()` was removed - -#### `models.ScheduledActionResources` was modified - -* `models.ScheduledActionProperties properties()` -> `models.ScheduledActionsExtensionProperties properties()` - -#### `models.ResourceOperationError` was modified - -* `validate()` was removed - -#### `models.OperationErrorsResult` was modified - -* `validate()` was removed - -#### `models.NotificationProperties` was modified - -* `validate()` was removed - -#### `models.SubmitStartRequest` was modified - -* `validate()` was removed - -#### `models.ResourceOperationDetails` was modified - -* `validate()` was removed - -#### `models.ResourcePatchRequest` was modified - -* `validate()` was removed - -#### `models.Schedule` was modified - -* `validate()` was removed - -#### `models.ScheduledActionUpdate` was modified - -* `validate()` was removed - -### Features Added - -* `models.StorageProfile` was added - -* `models.VirtualMachineNetworkInterfaceConfiguration` was added - -* `models.VaultSecretGroup` was added - -* `models.VmSizeProperties` was added - -* `models.SecurityEncryptionTypes` was added - -* `models.VMGalleryApplication` was added - -* `models.CapacityReservationProfile` was added - -* `models.DiffDiskOptions` was added - -* `models.WindowsVMGuestPatchAutomaticByPlatformSettings` was added - -* `models.UserInitiatedRedeploy` was added - -* `models.VirtualMachinePublicIPAddressConfigurationProperties` was added - -* `models.SshPublicKey` was added - -* `models.TerminateNotificationProfile` was added - -* `models.ZonePlacementPolicyType` was added - -* `models.DeleteOptions` was added - -* `models.FallbackOperationInfo` was added - -* `models.DiffDiskPlacement` was added - -* `models.ScheduledEventsAdditionalPublishingTargets` was added - -* `models.BulkActionVmExtensionProperties` was added - -* `models.PublicIPAddressSkuName` was added - -* `models.Modes` was added - -* `models.VirtualMachineNetworkInterfaceConfigurationProperties` was added - -* `models.FlexProperties` was added - -* `models.AllInstancesDown` was added - -* `models.SecurityProfile` was added - -* `models.ZoneAllocationPolicy` was added - -* `models.LinuxConfiguration` was added - -* `models.ScheduledEventsProfile` was added - -* `models.HostEndpointSettings` was added - -* `models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration` was added - -* `models.WinRMListener` was added - -* `models.ScheduledActionsExtensionProperties` was added - -* `models.PriorityType` was added - -* `models.ApiEntityReference` was added - -* `models.WindowsConfiguration` was added - -* `models.OSProfile` was added - -* `models.StorageAccountTypes` was added - -* `models.ExtendedLocationType` was added - -* `models.SecurityTypes` was added - -* `models.UefiSettings` was added - -* `models.ResourceIdentityType` was added - -* `models.NetworkApiVersion` was added - -* `models.DiagnosticsProfile` was added - -* `models.VirtualMachineIdentity` was added - -* `models.ImageReference` was added - -* `models.NetworkInterfaceAuxiliarySku` was added - -* `models.ScheduledEventsPolicy` was added - -* `models.VaultCertificate` was added - -* `models.ProtocolTypes` was added - -* `models.NetworkProfile` was added - -* `models.Mode` was added - -* `models.VMDiskSecurityProfile` was added - -* `models.NetworkInterfaceReference` was added - -* `models.UserInitiatedReboot` was added - -* `models.ProxyAgentSettings` was added - -* `models.CachingTypes` was added - -* `models.VirtualMachineNetworkInterfaceIPConfiguration` was added - -* `models.BulkVMConfiguration` was added - -* `models.PublicIPAllocationMethod` was added - -* `models.CreateFlexResourceOperationResponse` was added - -* `models.DiffDiskSettings` was added - -* `models.DomainNameLabelScopeTypes` was added - -* `models.AdditionalUnattendContent` was added - -* `models.KeyVaultSecretReference` was added - -* `models.KeyVaultKeyReference` was added - -* `models.EventGridAndResourceGraph` was added - -* `models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting` was added - -* `models.OperatingSystemTypes` was added - -* `models.AdditionalUnattendContentComponentName` was added - -* `models.DiskEncryptionSettings` was added - -* `models.DiskDetachOptionTypes` was added - -* `models.BootDiagnostics` was added - -* `models.PriorityProfile` was added - -* `models.HardwareProfile` was added - -* `models.NetworkInterfaceAuxiliaryMode` was added - -* `models.WinRMConfiguration` was added - -* `models.PublicIPAddressSku` was added - -* `models.Placement` was added - -* `models.LinuxVMGuestPatchAutomaticByPlatformSettings` was added - -* `models.SshConfiguration` was added - -* `models.UserAssignedIdentitiesValue` was added - -* `models.BulkActionVMExtension` was added - -* `models.OSDisk` was added - -* `models.VmSizeProfile` was added - -* `models.NetworkInterfaceReferenceProperties` was added - -* `models.Plan` was added - -* `models.ManagedDiskParameters` was added - -* `models.DiskDeleteOptionTypes` was added - -* `models.LinuxPatchSettings` was added - -* `models.BulkActionVMProperties` was added - -* `models.AdditionalCapabilities` was added - -* `models.ApplicationProfile` was added - -* `models.PatchSettings` was added - -* `models.AllocationStrategy` was added - -* `models.PublicIPAddressSkuTier` was added - -* `models.EncryptionIdentity` was added - -* `models.OSImageNotificationProfile` was added - -* `models.VirtualMachinePublicIPAddressDnsSettingsConfiguration` was added - -* `models.WindowsVMGuestPatchMode` was added - -* `models.LinuxVMGuestPatchMode` was added - -* `models.WindowsPatchAssessmentMode` was added - -* `models.IPVersions` was added - -* `models.LinuxPatchAssessmentMode` was added - -* `models.VirtualMachineIpTag` was added - -* `models.DiskCreateOptionTypes` was added - -* `models.SettingNames` was added - -* `models.AdditionalUnattendContentPassName` was added - -* `models.ResourceProvisionFlexPayload` was added - -* `models.VirtualMachineNetworkInterfaceIPConfigurationProperties` was added - -* `models.ExecuteCreateFlexRequest` was added - -* `models.VirtualMachinePublicIPAddressConfiguration` was added - -* `models.DiskEncryptionSetParameters` was added - -* `models.ZonePreference` was added - -* `models.VirtualHardDisk` was added - -* `models.DiskControllerTypes` was added - -* `models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting` was added - -* `models.DataDisk` was added - -* `models.DistributionStrategy` was added - -* `models.OsType` was added - -* `models.ExtendedLocation` was added - -#### `models.RetryPolicy` was modified - -* `onFailureAction()` was added -* `withOnFailureAction(models.ResourceOperationType)` was added - -#### `models.ResourceOperationType` was modified - -* `DELETE` was added -* `CREATE` was added - -#### `models.ScheduledActions` was modified - -* `virtualMachinesExecuteCreateFlex(java.lang.String,models.ExecuteCreateFlexRequest)` was added -* `virtualMachinesExecuteCreateFlexWithResponse(java.lang.String,models.ExecuteCreateFlexRequest,com.azure.core.util.Context)` was added - -#### `models.ResourceProvisionPayload` was modified - -* `withVirtualMachineBaseProfile(models.BulkVMConfiguration)` was added -* `virtualMachineBaseProfile()` was added -* `virtualMachineOverrides()` was added -* `withVirtualMachineOverrides(java.util.List)` was added - -#### `models.ResourceOperationDetails` was modified - -* `fallbackOperationInfo()` was added - ## 1.2.0-beta.1 (2025-07-24) - Azure Resource Manager Compute Schedule client library for Java. This package contains Microsoft Azure SDK for Compute Schedule Management SDK. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2025-04-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/README.md b/sdk/computeschedule/azure-resourcemanager-computeschedule/README.md index e009893720fb..68e1deac90cd 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/README.md +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Compute Schedule client library for Java. -This package contains Microsoft Azure SDK for Compute Schedule Management SDK. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2026-04-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Compute Schedule Management SDK. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2025-04-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-computeschedule - 1.2.0-beta.2 + 1.2.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/SAMPLE.md b/sdk/computeschedule/azure-resourcemanager-computeschedule/SAMPLE.md index adb96422ad3a..addb072e737c 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/SAMPLE.md +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/SAMPLE.md @@ -39,7 +39,6 @@ - [Update](#scheduledactions_update) - [VirtualMachinesCancelOperations](#scheduledactions_virtualmachinescanceloperations) - [VirtualMachinesExecuteCreate](#scheduledactions_virtualmachinesexecutecreate) -- [VirtualMachinesExecuteCreateFlex](#scheduledactions_virtualmachinesexecutecreateflex) - [VirtualMachinesExecuteDeallocate](#scheduledactions_virtualmachinesexecutedeallocate) - [VirtualMachinesExecuteDelete](#scheduledactions_virtualmachinesexecutedelete) - [VirtualMachinesExecuteHibernate](#scheduledactions_virtualmachinesexecutehibernate) @@ -57,23 +56,7 @@ */ public final class OccurrenceExtensionListOccurrenceByVmsSamples { /* - * x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MinimumSet_Gen.json - */ - /** - * Sample code: OccurrenceExtension_ListOccurrenceByVms_MinimumSet. - * - * @param manager Entry point to ComputeScheduleManager. - */ - public static void occurrenceExtensionListOccurrenceByVmsMinimumSet( - com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.occurrenceExtensions() - .listOccurrenceByVms( - "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json */ /** * Sample code: OccurrenceExtension_ListOccurrenceByVms_MaximumSet. @@ -82,10 +65,7 @@ public final class OccurrenceExtensionListOccurrenceByVmsSamples { */ public static void occurrenceExtensionListOccurrenceByVmsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.occurrenceExtensions() - .listOccurrenceByVms( - "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", - com.azure.core.util.Context.NONE); + manager.occurrenceExtensions().listOccurrenceByVms("sazvpabfud", com.azure.core.util.Context.NONE); } } ``` @@ -101,7 +81,7 @@ import java.util.Arrays; */ public final class OccurrencesCancelSamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Cancel_MaximumSet. @@ -111,9 +91,9 @@ public final class OccurrencesCancelSamples { public static void occurrencesCancelMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .cancelWithResponse("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", + .cancelWithResponse("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", new CancelOccurrenceRequest().withResourceIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), + "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), com.azure.core.util.Context.NONE); } } @@ -131,7 +111,7 @@ import java.util.Arrays; */ public final class OccurrencesDelaySamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Delay_MaximumSet. @@ -141,10 +121,10 @@ public final class OccurrencesDelaySamples { public static void occurrencesDelayMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .delay("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", - new DelayRequest().withDelay(OffsetDateTime.parse("2026-03-12T02:39:48.148Z")) - .withResourceIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), + .delay("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", new DelayRequest() + .withDelay(OffsetDateTime.parse("2025-05-22T17:00:00.000-07:00")) + .withResourceIds(Arrays.asList( + "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), com.azure.core.util.Context.NONE); } } @@ -158,7 +138,7 @@ public final class OccurrencesDelaySamples { */ public final class OccurrencesGetSamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_Get_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Get_MaximumSet. @@ -168,7 +148,7 @@ public final class OccurrencesGetSamples { public static void occurrencesGetMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .getWithResponse("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", + .getWithResponse("rgcomputeschedule", "myScheduledAction", "67b5bada-4772-43fc-8dbb-402476d98a45", com.azure.core.util.Context.NONE); } } @@ -182,7 +162,7 @@ public final class OccurrencesGetSamples { */ public final class OccurrencesListByScheduledActionSamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json */ /** * Sample code: Occurrences_ListByScheduledAction_MaximumSet. @@ -192,7 +172,7 @@ public final class OccurrencesListByScheduledActionSamples { public static void occurrencesListByScheduledActionMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .listByScheduledAction("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + .listByScheduledAction("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } ``` @@ -205,7 +185,7 @@ public final class OccurrencesListByScheduledActionSamples { */ public final class OccurrencesListResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json */ /** * Sample code: Occurrences_ListResources_MaximumSet. @@ -215,7 +195,7 @@ public final class OccurrencesListResourcesSamples { public static void occurrencesListResourcesMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .listResources("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", + .listResources("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", com.azure.core.util.Context.NONE); } } @@ -229,7 +209,7 @@ public final class OccurrencesListResourcesSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-04-15-preview/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumSet. @@ -242,7 +222,7 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: 2026-04-15-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet. @@ -264,7 +244,7 @@ public final class OperationsListSamples { */ public final class ScheduledActionExtensionListByVmsSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json */ /** * Sample code: ScheduledActionExtension_ListByVms_MaximumSet. @@ -273,14 +253,11 @@ public final class ScheduledActionExtensionListByVmsSamples { */ public static void scheduledActionExtensionListByVmsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActionExtensions() - .listByVms( - "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", - com.azure.core.util.Context.NONE); + manager.scheduledActionExtensions().listByVms("sazvpabfud", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json */ /** * Sample code: ScheduledActionExtension_ListByVms_MinimumSet. @@ -289,10 +266,7 @@ public final class ScheduledActionExtensionListByVmsSamples { */ public static void scheduledActionExtensionListByVmsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActionExtensions() - .listByVms( - "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", - com.azure.core.util.Context.NONE); + manager.scheduledActionExtensions().listByVms("sazvpabfud", com.azure.core.util.Context.NONE); } } ``` @@ -312,7 +286,7 @@ import java.util.Arrays; */ public final class ScheduledActionsAttachResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_AttachResources_MaximumSet. @@ -322,11 +296,11 @@ public final class ScheduledActionsAttachResourcesSamples { public static void scheduledActionsAttachResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .attachResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourceAttachRequest() + .attachResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourceAttachRequest() .withResources(Arrays.asList(new ScheduledActionResourceInner().withResourceId( "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") + Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))))), @@ -346,7 +320,7 @@ import java.util.Arrays; */ public final class ScheduledActionsCancelNextOccurrenceSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_CancelNextOccurrence_MaximumSet. @@ -356,9 +330,9 @@ public final class ScheduledActionsCancelNextOccurrenceSamples { public static void scheduledActionsCancelNextOccurrenceMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .cancelNextOccurrenceWithResponse("rgcomputeschedule", "scheduled-action-01", + .cancelNextOccurrenceWithResponse("rgcomputeschedule", "myScheduledAction", new CancelOccurrenceRequest().withResourceIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), + "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), com.azure.core.util.Context.NONE); } } @@ -374,7 +348,6 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties; @@ -391,7 +364,7 @@ import java.util.Map; */ public final class ScheduledActionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_CreateOrUpdate_MaximumSet. @@ -401,27 +374,25 @@ public final class ScheduledActionsCreateOrUpdateSamples { public static void scheduledActionsCreateOrUpdateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .define("scheduled-action-01") - .withRegion("eastus2") + .define("myScheduledAction") + .withRegion("vmuhgdgipeypkcv") .withExistingResourceGroup("rgcomputeschedule") - .withTags(mapOf("environment", "production")) + .withTags(mapOf("key2102", "fakeTokenPlaceholder")) .withProperties(new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2026-03-12T02:39:45.061Z")) - .withEndTime(OffsetDateTime.parse("2026-03-12T02:39:45.062Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("12:00:00") - .withTimeZone("America/Los_Angeles") + .withStartTime(OffsetDateTime.parse("2025-04-17T00:23:55.281Z")) + .withEndTime(OffsetDateTime.parse("2025-04-17T00:23:55.286Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("19:00:00") + .withTimeZone("g") .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) .withRequestedMonths(Arrays.asList(Month.JANUARY)) - .withRequestedDaysOfTheMonth(Arrays.asList(1)) + .withRequestedDaysOfTheMonth(Arrays.asList(15)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withDeadlineType(DeadlineType.UNKNOWN)) .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") + Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) @@ -451,7 +422,7 @@ public final class ScheduledActionsCreateOrUpdateSamples { */ public final class ScheduledActionsDeleteSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Delete_MaximumSet. @@ -460,7 +431,7 @@ public final class ScheduledActionsDeleteSamples { */ public static void scheduledActionsDeleteMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActions().delete("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + manager.scheduledActions().delete("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } ``` @@ -476,7 +447,7 @@ import java.util.Arrays; */ public final class ScheduledActionsDetachResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_DetachResources_MaximumSet. @@ -486,9 +457,9 @@ public final class ScheduledActionsDetachResourcesSamples { public static void scheduledActionsDetachResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .detachResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", + .detachResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourceDetachRequest().withResources(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), + "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), com.azure.core.util.Context.NONE); } } @@ -502,7 +473,7 @@ public final class ScheduledActionsDetachResourcesSamples { */ public final class ScheduledActionsDisableSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Disable_MaximumSet. @@ -512,7 +483,7 @@ public final class ScheduledActionsDisableSamples { public static void scheduledActionsDisableMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .disableWithResponse("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + .disableWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } ``` @@ -525,7 +496,7 @@ public final class ScheduledActionsDisableSamples { */ public final class ScheduledActionsEnableSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Enable_MaximumSet. @@ -535,7 +506,7 @@ public final class ScheduledActionsEnableSamples { public static void scheduledActionsEnableMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .enableWithResponse("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + .enableWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } ``` @@ -548,7 +519,7 @@ public final class ScheduledActionsEnableSamples { */ public final class ScheduledActionsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Get_MaximumSet. @@ -558,8 +529,7 @@ public final class ScheduledActionsGetByResourceGroupSamples { public static void scheduledActionsGetMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .getByResourceGroupWithResponse("rgcomputeschedule", "scheduled-action-01", - com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } ``` @@ -572,7 +542,7 @@ public final class ScheduledActionsGetByResourceGroupSamples { */ public final class ScheduledActionsListSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListBySubscription_MaximumSet. @@ -585,7 +555,7 @@ public final class ScheduledActionsListSamples { } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_ListBySubscription_MinimumSet. @@ -607,7 +577,7 @@ public final class ScheduledActionsListSamples { */ public final class ScheduledActionsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListByResourceGroup_MaximumSet. @@ -620,7 +590,7 @@ public final class ScheduledActionsListByResourceGroupSamples { } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_ListByResourceGroup_MinimumSet. @@ -642,7 +612,7 @@ public final class ScheduledActionsListByResourceGroupSamples { */ public final class ScheduledActionsListResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListResources_MaximumSet. @@ -652,7 +622,7 @@ public final class ScheduledActionsListResourcesSamples { public static void scheduledActionsListResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .listResources("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + .listResources("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } ``` @@ -672,7 +642,7 @@ import java.util.Arrays; */ public final class ScheduledActionsPatchResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_PatchResources_MaximumSet. @@ -682,11 +652,11 @@ public final class ScheduledActionsPatchResourcesSamples { public static void scheduledActionsPatchResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .patchResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourcePatchRequest() + .patchResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourcePatchRequest() .withResources(Arrays.asList(new ScheduledActionResourceInner().withResourceId( "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") + Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))))), @@ -703,7 +673,7 @@ public final class ScheduledActionsPatchResourcesSamples { */ public final class ScheduledActionsTriggerManualOccurrenceSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_TriggerManualOccurrence_MaximumSet. @@ -713,7 +683,7 @@ public final class ScheduledActionsTriggerManualOccurrenceSamples { public static void scheduledActionsTriggerManualOccurrenceMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .triggerManualOccurrenceWithResponse("rgcomputeschedule", "my-scheduled-action", + .triggerManualOccurrenceWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } @@ -729,7 +699,6 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; @@ -747,7 +716,7 @@ import java.util.Map; */ public final class ScheduledActionsUpdateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Update_MaximumSet. @@ -757,28 +726,25 @@ public final class ScheduledActionsUpdateSamples { public static void scheduledActionsUpdateMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { ScheduledAction resource = manager.scheduledActions() - .getByResourceGroupWithResponse("rgcomputeschedule", "scheduled-action-01", - com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("environment", "staging")) + .withTags(mapOf("key9989", "fakeTokenPlaceholder")) .withProperties(new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2026-03-12T02:39:45.818Z")) - .withEndTime(OffsetDateTime.parse("2026-03-12T02:39:45.818Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("12:00:00") - .withTimeZone("America/Los_Angeles") + .withStartTime(OffsetDateTime.parse("2025-04-17T00:23:58.149Z")) + .withEndTime(OffsetDateTime.parse("2025-04-17T00:23:58.149Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("19:00:00") + .withTimeZone("bni") .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) .withRequestedMonths(Arrays.asList(Month.JANUARY)) - .withRequestedDaysOfTheMonth(Arrays.asList(1)) + .withRequestedDaysOfTheMonth(Arrays.asList(15)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withDeadlineType(DeadlineType.UNKNOWN)) .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") + Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) @@ -811,7 +777,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesCancelOperations_MinimumSet. @@ -821,14 +787,14 @@ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { public static void scheduledActionsVirtualMachinesCancelOperationsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesCancelOperationsWithResponse("eastus2", - new CancelOperationsRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + .virtualMachinesCancelOperationsWithResponse("fhdunfivmjiltaiakwhhwdgemfcld", + new CancelOperationsRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesCancelOperations_MaximumSet. @@ -838,9 +804,9 @@ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { public static void scheduledActionsVirtualMachinesCancelOperationsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesCancelOperationsWithResponse("eastus2", - new CancelOperationsRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + .virtualMachinesCancelOperationsWithResponse("nivsvluajruxhmsfgmxjnl", + new CancelOperationsRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } @@ -849,46 +815,12 @@ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { ### ScheduledActions_VirtualMachinesExecuteCreate ```java -import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; -import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; -import com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension; -import com.azure.resourcemanager.computeschedule.models.BulkActionVMProperties; -import com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties; -import com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration; -import com.azure.resourcemanager.computeschedule.models.CachingTypes; -import com.azure.resourcemanager.computeschedule.models.DataDisk; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; -import com.azure.resourcemanager.computeschedule.models.DiskControllerTypes; -import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; -import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.ImageReference; -import com.azure.resourcemanager.computeschedule.models.LinuxConfiguration; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; -import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; -import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; -import com.azure.resourcemanager.computeschedule.models.NetworkProfile; -import com.azure.resourcemanager.computeschedule.models.OSDisk; -import com.azure.resourcemanager.computeschedule.models.OSProfile; -import com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import com.azure.resourcemanager.computeschedule.models.SecurityProfile; -import com.azure.resourcemanager.computeschedule.models.SecurityTypes; -import com.azure.resourcemanager.computeschedule.models.SshConfiguration; -import com.azure.resourcemanager.computeschedule.models.SshPublicKey; -import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; -import com.azure.resourcemanager.computeschedule.models.StorageProfile; -import com.azure.resourcemanager.computeschedule.models.UefiSettings; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -898,368 +830,83 @@ import java.util.Map; */ public final class ScheduledActionsVirtualMachinesExecuteCreateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen - generated by [MaximumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteCreateMaximumSet( + public static void scheduledActionsVirtualMachinesExecuteCreateMaximumSetGenGeneratedByMaximumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteCreateWithResponse("eastus2", - new ExecuteCreateRequest() - .withResourceConfigParameters( - new ResourceProvisionPayload() - .withVirtualMachineBaseProfile( - new BulkVMConfiguration().withName("baseVmConfig") - .withComputeApiVersion("2024-07-01") - .withResourceGroupName("myResourceGroup") - .withZones(Arrays.asList("1")) - .withIdentity( - new VirtualMachineIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withTags(mapOf("environment", "production", "department", "engineering")) - .withProperties( - new BulkActionVMProperties() - .withStorageProfile(new StorageProfile() - .withImageReference(new ImageReference().withPublisher("Canonical") - .withOffer("0001-com-ubuntu-server-jammy") - .withSku("22_04-lts-gen2") - .withVersion("latest")) - .withOsDisk(new OSDisk().withOsType(OperatingSystemTypes.LINUX) - .withName("myOsDisk") - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(128) - .withManagedDisk(new ManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE)) - .withDataDisks( - Arrays.asList(new DataDisk().withLun(0) - .withName("myDataDisk-0") - .withCaching(CachingTypes.READ_ONLY) - .withCreateOption(DiskCreateOptionTypes.EMPTY) - .withDiskSizeGB(256) - .withManagedDisk( - new ManagedDiskParameters().withStorageAccountType( - StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withDiskControllerType(DiskControllerTypes.SCSI)) - .withAdditionalCapabilities( - new AdditionalCapabilities().withUltraSSDEnabled(false) - .withHibernationEnabled(false)) - .withOsProfile(new OSProfile().withComputerName("myVM") - .withAdminUsername("azureuser") - .withLinuxConfiguration( - new LinuxConfiguration().withDisablePasswordAuthentication(true) - .withSsh(new SshConfiguration() - .withPublicKeys(Arrays.asList(new SshPublicKey() - .withPath("/home/azureuser/.ssh/authorized_keys") - .withKeyData("fakeTokenPlaceholder")))) - .withProvisionVMAgent(true) - .withPatchSettings(new LinuxPatchSettings() - .withPatchMode(LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) - .withAssessmentMode( - LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM))) - .withAllowExtensionOperations(true)) - .withNetworkProfile(new NetworkProfile().withNetworkInterfaces( - Arrays.asList(new NetworkInterfaceReference().withId( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic") - .withProperties( - new NetworkInterfaceReferenceProperties().withPrimary(true) - .withDeleteOption(DeleteOptions.DELETE))))) - .withSecurityProfile(new SecurityProfile() - .withUefiSettings(new UefiSettings().withSecureBootEnabled(true) - .withVTpmEnabled(true)) - .withSecurityType(SecurityTypes.TRUSTED_LAUNCH)) - .withDiagnosticsProfile(new DiagnosticsProfile() - .withBootDiagnostics(new BootDiagnostics().withEnabled(true)))) - .withVmExtensions( - Arrays.asList(new BulkActionVMExtension().withName("AzureMonitorLinuxAgent") - .withProperties(new BulkActionVmExtensionProperties() - .withPublisher("Microsoft.Azure.Monitor") - .withType("AzureMonitorLinuxAgent") - .withTypeHandlerVersion("1.0") - .withAutoUpgradeMinorVersion(true) - .withEnableAutomaticUpgrade(true) - .withSettings(mapOf()) - .withSuppressFailures(false))))) - .withVirtualMachineOverrides(Arrays.asList(new BulkVMConfiguration() - .withName("overrideVmConfig-0") - .withComputeApiVersion("2024-07-01") - .withZones(Arrays.asList("2")) - .withTags(mapOf("environment", "production", "department", "engineering", "role", - "web-server")) - .withProperties(new BulkActionVMProperties() - .withStorageProfile(new StorageProfile().withOsDisk( - new OSDisk() - .withOsType(OperatingSystemTypes.LINUX) - .withName("overrideOsDisk") - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(256) - .withManagedDisk(new ManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withNetworkProfile(new NetworkProfile() - .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceReference().withId( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override") - .withProperties(new NetworkInterfaceReferenceProperties().withPrimary(true) - .withDeleteOption(DeleteOptions.DELETE)))))))) - .withResourceCount(3) - .withResourcePrefix("myBulkVm")) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) - .withCorrelationid("01234567-89ab-cdef-0123-456789abcdef"), - com.azure.core.util.Context.NONE); + .virtualMachinesExecuteCreateWithResponse("oslhbouzgevzpeydssyelhw", new ExecuteCreateRequest() + .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf("hardwareProfile", + BinaryData.fromBytes("{name=F1}".getBytes(StandardCharsets.UTF_8)), "provisioningState", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "storageProfile", + BinaryData.fromBytes("{osDisk={osType=0}}".getBytes(StandardCharsets.UTF_8)), "vmExtensions", + BinaryData.fromBytes( + "[{autoUpgradeMinorVersion=true, protectedSettings=SomeDecryptedSecretValue, provisioningState=0, enableAutomaticUpgrade=true, publisher=Microsoft.Azure.Monitor, type=AzureMonitorLinuxAgent, typeHandlerVersion=1.0}, {name=myExtensionName}]" + .getBytes(StandardCharsets.UTF_8)), + "resourcegroupName", + BinaryData.fromBytes("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B".getBytes(StandardCharsets.UTF_8)), + "computeApiVersion", BinaryData.fromBytes("2024-07-01".getBytes(StandardCharsets.UTF_8)))) + .withResourceOverrides(Arrays.asList(mapOf("name", + BinaryData.fromBytes("myFleet_523".getBytes(StandardCharsets.UTF_8)), "location", + BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", + BinaryData.fromBytes( + "{hardwareProfile={vmSize=Standard_F1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" + .getBytes(StandardCharsets.UTF_8)), + "zones", BinaryData.fromBytes("[1]".getBytes(StandardCharsets.UTF_8))), + mapOf("name", BinaryData.fromBytes("myFleet_524".getBytes(StandardCharsets.UTF_8)), "location", + BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", + BinaryData.fromBytes( + "{hardwareProfile={vmSize=Standard_G1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" + .getBytes(StandardCharsets.UTF_8)), + "zones", BinaryData.fromBytes("[2]".getBytes(StandardCharsets.UTF_8))))) + .withResourceCount(2) + .withResourcePrefix("TL1")) + .withExecutionParameters(new ExecutionParameters() + .withRetryPolicy(new RetryPolicy().withRetryCount(5).withRetryWindowInMinutes(40))) + .withCorrelationid("dfe927c5-16a6-40b7-a0f7-8524975ed642"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteCreateMinimumSet( + public static void scheduledActionsVirtualMachinesExecuteCreateMinimumSetGenGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteCreateWithResponse("eastus2", - new ExecuteCreateRequest() - .withResourceConfigParameters(new ResourceProvisionPayload().withResourceCount(3)) - .withExecutionParameters(new ExecutionParameters()), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### ScheduledActions_VirtualMachinesExecuteCreateFlex - -```java -import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; -import com.azure.resourcemanager.computeschedule.models.AllocationStrategy; -import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; -import com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension; -import com.azure.resourcemanager.computeschedule.models.BulkActionVMProperties; -import com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties; -import com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration; -import com.azure.resourcemanager.computeschedule.models.CachingTypes; -import com.azure.resourcemanager.computeschedule.models.DataDisk; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; -import com.azure.resourcemanager.computeschedule.models.DiskControllerTypes; -import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; -import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; -import com.azure.resourcemanager.computeschedule.models.DistributionStrategy; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexRequest; -import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.FlexProperties; -import com.azure.resourcemanager.computeschedule.models.ImageReference; -import com.azure.resourcemanager.computeschedule.models.LinuxConfiguration; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; -import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; -import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; -import com.azure.resourcemanager.computeschedule.models.NetworkProfile; -import com.azure.resourcemanager.computeschedule.models.OSDisk; -import com.azure.resourcemanager.computeschedule.models.OSProfile; -import com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.OsType; -import com.azure.resourcemanager.computeschedule.models.PriorityProfile; -import com.azure.resourcemanager.computeschedule.models.PriorityType; -import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; -import com.azure.resourcemanager.computeschedule.models.ResourceProvisionFlexPayload; -import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import com.azure.resourcemanager.computeschedule.models.SecurityProfile; -import com.azure.resourcemanager.computeschedule.models.SecurityTypes; -import com.azure.resourcemanager.computeschedule.models.SshConfiguration; -import com.azure.resourcemanager.computeschedule.models.SshPublicKey; -import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; -import com.azure.resourcemanager.computeschedule.models.StorageProfile; -import com.azure.resourcemanager.computeschedule.models.UefiSettings; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; -import com.azure.resourcemanager.computeschedule.models.VmSizeProfile; -import com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy; -import com.azure.resourcemanager.computeschedule.models.ZonePreference; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ScheduledActions VirtualMachinesExecuteCreateFlex. - */ -public final class ScheduledActionsVirtualMachinesExecuteCreateFlexSamples { - /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MaximumSet_Gen.json - */ - /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreateFlex_MaximumSet. - * - * @param manager Entry point to ComputeScheduleManager. - */ - public static void scheduledActionsVirtualMachinesExecuteCreateFlexMaximumSet( - com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActions() - .virtualMachinesExecuteCreateFlexWithResponse("eastus2", - new ExecuteCreateFlexRequest() - .withResourceConfigParameters( - new ResourceProvisionFlexPayload() - .withVirtualMachineBaseProfile( - new BulkVMConfiguration().withName("baseFlexVmConfig") - .withComputeApiVersion("2024-07-01") - .withResourceGroupName("myResourceGroup") - .withZones(Arrays.asList("1")) - .withIdentity( - new VirtualMachineIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withTags(mapOf("environment", "production", "department", "engineering")) - .withProperties( - new BulkActionVMProperties() - .withStorageProfile(new StorageProfile() - .withImageReference(new ImageReference().withPublisher("Canonical") - .withOffer("0001-com-ubuntu-server-jammy") - .withSku("22_04-lts-gen2") - .withVersion("latest")) - .withOsDisk(new OSDisk().withOsType(OperatingSystemTypes.LINUX) - .withName("myOsDisk") - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(128) - .withManagedDisk(new ManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE)) - .withDataDisks( - Arrays.asList(new DataDisk().withLun(0) - .withName("myDataDisk-0") - .withCaching(CachingTypes.READ_ONLY) - .withCreateOption(DiskCreateOptionTypes.EMPTY) - .withDiskSizeGB(256) - .withManagedDisk( - new ManagedDiskParameters().withStorageAccountType( - StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withDiskControllerType(DiskControllerTypes.SCSI)) - .withAdditionalCapabilities( - new AdditionalCapabilities().withUltraSSDEnabled(false) - .withHibernationEnabled(false)) - .withOsProfile(new OSProfile().withComputerName("myFlexVM") - .withAdminUsername("azureuser") - .withLinuxConfiguration( - new LinuxConfiguration().withDisablePasswordAuthentication(true) - .withSsh(new SshConfiguration() - .withPublicKeys(Arrays.asList(new SshPublicKey() - .withPath("/home/azureuser/.ssh/authorized_keys") - .withKeyData("fakeTokenPlaceholder")))) - .withProvisionVMAgent(true) - .withPatchSettings(new LinuxPatchSettings() - .withPatchMode(LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) - .withAssessmentMode( - LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM))) - .withAllowExtensionOperations(true)) - .withNetworkProfile(new NetworkProfile().withNetworkInterfaces( - Arrays.asList(new NetworkInterfaceReference().withId( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic") - .withProperties( - new NetworkInterfaceReferenceProperties().withPrimary(true) - .withDeleteOption(DeleteOptions.DELETE))))) - .withSecurityProfile(new SecurityProfile() - .withUefiSettings(new UefiSettings().withSecureBootEnabled(true) - .withVTpmEnabled(true)) - .withSecurityType(SecurityTypes.TRUSTED_LAUNCH)) - .withDiagnosticsProfile(new DiagnosticsProfile() - .withBootDiagnostics(new BootDiagnostics().withEnabled(true)))) - .withVmExtensions( - Arrays.asList(new BulkActionVMExtension().withName("AzureMonitorLinuxAgent") - .withProperties(new BulkActionVmExtensionProperties() - .withPublisher("Microsoft.Azure.Monitor") - .withType("AzureMonitorLinuxAgent") - .withTypeHandlerVersion("1.0") - .withAutoUpgradeMinorVersion(true) - .withEnableAutomaticUpgrade(true) - .withSettings(mapOf()) - .withSuppressFailures(false))))) - .withVirtualMachineOverrides(Arrays.asList(new BulkVMConfiguration() - .withName("overrideFlexVmConfig-0") - .withComputeApiVersion("2024-07-01") - .withZones(Arrays.asList("2")) - .withTags(mapOf("environment", "production", "department", "engineering", "role", - "web-server")) - .withProperties(new BulkActionVMProperties() - .withStorageProfile(new StorageProfile().withOsDisk( - new OSDisk() - .withOsType(OperatingSystemTypes.LINUX) - .withName("overrideOsDisk") - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(256) - .withManagedDisk(new ManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withNetworkProfile(new NetworkProfile() - .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceReference().withId( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override") - .withProperties(new NetworkInterfaceReferenceProperties().withPrimary(true) - .withDeleteOption(DeleteOptions.DELETE)))))))) - .withResourceCount(24) - .withResourcePrefix("myFlexVm") - .withFlexProperties(new FlexProperties() - .withVmSizeProfiles( - Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3").withRank(24), - new VmSizeProfile().withName("Standard_D2s_v3").withRank(24))) - .withOsType(OsType.WINDOWS) - .withPriorityProfile(new PriorityProfile().withType(PriorityType.REGULAR) - .withAllocationStrategy(AllocationStrategy.LOWEST_PRICE)) - .withZoneAllocationPolicy(new ZoneAllocationPolicy() - .withDistributionStrategy(DistributionStrategy.BEST_EFFORT_SINGLE_ZONE) - .withZonePreferences( - Arrays.asList(new ZonePreference().withZone("1").withRank(21)))))) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MinimumSet_Gen.json - */ - /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreateFlex_MinimumSet. - * - * @param manager Entry point to ComputeScheduleManager. - */ - public static void scheduledActionsVirtualMachinesExecuteCreateFlexMinimumSet( - com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActions() - .virtualMachinesExecuteCreateFlexWithResponse("eastus2", new ExecuteCreateFlexRequest() - .withResourceConfigParameters(new ResourceProvisionFlexPayload().withResourceCount(24) - .withFlexProperties(new FlexProperties() - .withVmSizeProfiles(Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3").withRank(24), - new VmSizeProfile().withName("Standard_D2s_v3").withRank(24))) - .withOsType(OsType.WINDOWS) - .withPriorityProfile(new PriorityProfile()))) + .virtualMachinesExecuteCreateWithResponse("useast", new ExecuteCreateRequest() + .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf("hardwareProfile", + BinaryData.fromBytes("{name=F1}".getBytes(StandardCharsets.UTF_8)), "provisioningState", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "storageProfile", + BinaryData.fromBytes("{osDisk={osType=0}}".getBytes(StandardCharsets.UTF_8)), "vmExtensions", + BinaryData.fromBytes( + "[{autoUpgradeMinorVersion=true, protectedSettings=SomeDecryptedSecretValue, provisioningState=0, enableAutomaticUpgrade=true, publisher=Microsoft.Azure.Monitor, type=AzureMonitorLinuxAgent, typeHandlerVersion=1.0}, {name=myExtensionName}]" + .getBytes(StandardCharsets.UTF_8)), + "resourcegroupName", + BinaryData.fromBytes("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B".getBytes(StandardCharsets.UTF_8)), + "computeApiVersion", BinaryData.fromBytes("2024-07-01".getBytes(StandardCharsets.UTF_8)))) + .withResourceOverrides(Arrays.asList(mapOf("name", + BinaryData.fromBytes("myFleet_523".getBytes(StandardCharsets.UTF_8)), "location", + BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", + BinaryData.fromBytes( + "{hardwareProfile={vmSize=Standard_F1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" + .getBytes(StandardCharsets.UTF_8)), + "zones", BinaryData.fromBytes("[1]".getBytes(StandardCharsets.UTF_8))), + mapOf("name", BinaryData.fromBytes("myFleet_524".getBytes(StandardCharsets.UTF_8)), "location", + BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", + BinaryData.fromBytes( + "{hardwareProfile={vmSize=Standard_G1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" + .getBytes(StandardCharsets.UTF_8)), + "zones", BinaryData.fromBytes("[2]".getBytes(StandardCharsets.UTF_8))))) + .withResourceCount(2)) .withExecutionParameters(new ExecutionParameters()), com.azure.core.util.Context.NONE); } @@ -1283,7 +930,6 @@ public final class ScheduledActionsVirtualMachinesExecuteCreateFlexSamples { import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -1293,7 +939,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet. @@ -1303,15 +949,15 @@ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { public static void scheduledActionsVirtualMachinesExecuteDeallocateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeallocateWithResponse("eastus2", new ExecuteDeallocateRequest() + .virtualMachinesExecuteDeallocateWithResponse("qqfrkswrovcice", new ExecuteDeallocateRequest() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet. @@ -1321,15 +967,13 @@ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { public static void scheduledActionsVirtualMachinesExecuteDeallocateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeallocateWithResponse("eastus2", new ExecuteDeallocateRequest() + .virtualMachinesExecuteDeallocateWithResponse("ykcaptgboliddcfyaiuimj", new ExecuteDeallocateRequest() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } ``` @@ -1339,8 +983,6 @@ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { ```java import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -1350,44 +992,43 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesExecuteDeleteSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteDeleteMinimumSet( + public static void scheduledActionsVirtualMachinesExecuteDeleteMinimumSetGenGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeleteWithResponse("eastus2", new ExecuteDeleteRequest() + .virtualMachinesExecuteDeleteWithResponse("east", new ExecuteDeleteRequest() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))), + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen - generated by [MaximumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteDeleteMaximumSet( + public static void scheduledActionsVirtualMachinesExecuteDeleteMaximumSetGenGeneratedByMaximumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeleteWithResponse("eastus2", new ExecuteDeleteRequest() - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .virtualMachinesExecuteDeleteWithResponse("east", new ExecuteDeleteRequest() + .withExecutionParameters(new ExecutionParameters() + .withRetryPolicy(new RetryPolicy().withRetryCount(2).withRetryWindowInMinutes(4))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890") - .withForceDeletion(true), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("dfe927c5-16a6-40b7-a0f7-8524975ed642") + .withForceDeletion(false), com.azure.core.util.Context.NONE); } } ``` @@ -1398,7 +1039,6 @@ public final class ScheduledActionsVirtualMachinesExecuteDeleteSamples { import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -1408,25 +1048,25 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesExecuteHibernateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteHibernateMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesExecuteHibernateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteHibernateWithResponse("eastus2", new ExecuteHibernateRequest() + .virtualMachinesExecuteHibernateWithResponse("xtmm", new ExecuteHibernateRequest() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet. @@ -1436,15 +1076,13 @@ public final class ScheduledActionsVirtualMachinesExecuteHibernateSamples { public static void scheduledActionsVirtualMachinesExecuteHibernateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteHibernateWithResponse("eastus2", new ExecuteHibernateRequest() + .virtualMachinesExecuteHibernateWithResponse("gztd", new ExecuteHibernateRequest() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } ``` @@ -1455,7 +1093,6 @@ public final class ScheduledActionsVirtualMachinesExecuteHibernateSamples { import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -1465,7 +1102,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesExecuteStartSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MaximumSet. @@ -1475,33 +1112,31 @@ public final class ScheduledActionsVirtualMachinesExecuteStartSamples { public static void scheduledActionsVirtualMachinesExecuteStartMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteStartWithResponse("eastus2", new ExecuteStartRequest() + .virtualMachinesExecuteStartWithResponse("qk", new ExecuteStartRequest() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteStartMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesExecuteStartMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteStartWithResponse("eastus2", new ExecuteStartRequest() + .virtualMachinesExecuteStartWithResponse("fbdewllahrteoavajbomjc", new ExecuteStartRequest() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } ``` @@ -1517,34 +1152,34 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesGetOperationErrorsSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet. + * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen - generated by [MaximumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationErrorsMaximumSet( + public static void scheduledActionsVirtualMachinesGetOperationErrorsMaximumSetGenGeneratedByMaximumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationErrorsWithResponse("eastus2", - new GetOperationErrorsRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")), + .virtualMachinesGetOperationErrorsWithResponse("ennweqswbghorrgzbet", + new GetOperationErrorsRequest().withOperationIds(Arrays.asList("ksufjznokhsbowdupyt")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationErrorsMinimumSet( + public static void scheduledActionsVirtualMachinesGetOperationErrorsMinimumSetGenGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationErrorsWithResponse("eastus2", - new GetOperationErrorsRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")), + .virtualMachinesGetOperationErrorsWithResponse("gcdqwzmxtcn", + new GetOperationErrorsRequest().withOperationIds(Arrays.asList("ksufjznokhsbowdupyt")), com.azure.core.util.Context.NONE); } } @@ -1561,7 +1196,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet. @@ -1571,26 +1206,26 @@ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { public static void scheduledActionsVirtualMachinesGetOperationStatusMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationStatusWithResponse("eastus2", - new GetOperationStatusRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + .virtualMachinesGetOperationStatusWithResponse("ntfcikxsmthfkdhdcjpevmydzu", + new GetOperationStatusRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationStatusMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesGetOperationStatusMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationStatusWithResponse("eastus2", - new GetOperationStatusRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + .virtualMachinesGetOperationStatusWithResponse("ykvvjfoopmkwznctgaiblzvea", + new GetOperationStatusRequest().withOperationIds(Arrays.asList("duhqnwosjzexcfwfhryvy")) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } @@ -1602,7 +1237,6 @@ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; @@ -1615,7 +1249,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet. @@ -1625,39 +1259,37 @@ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { public static void scheduledActionsVirtualMachinesSubmitDeallocateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitDeallocateWithResponse("eastus2", new SubmitDeallocateRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withTimezone("America/Los_Angeles") - .withTimeZone("America/Los_Angeles") + .virtualMachinesSubmitDeallocateWithResponse("ycipx", new SubmitDeallocateRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitDeallocateMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesSubmitDeallocateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitDeallocateWithResponse("eastus2", new SubmitDeallocateRequest() - .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitDeallocateWithResponse("zrcmkxsbuxsxxulky", new SubmitDeallocateRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") + .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } ``` @@ -1668,7 +1300,6 @@ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; @@ -1681,26 +1312,28 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesSubmitHibernateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitHibernateMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesSubmitHibernateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitHibernateWithResponse("eastus2", new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitHibernateWithResponse("zuevcqpgdohzbjodhachtr", new SubmitHibernateRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") + .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet. @@ -1710,20 +1343,16 @@ public final class ScheduledActionsVirtualMachinesSubmitHibernateSamples { public static void scheduledActionsVirtualMachinesSubmitHibernateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitHibernateWithResponse("eastus2", new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withTimezone("America/Los_Angeles") - .withTimeZone("America/Los_Angeles") + .virtualMachinesSubmitHibernateWithResponse("rhadyapnyvmobwg", new SubmitHibernateRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } ``` @@ -1734,7 +1363,6 @@ public final class ScheduledActionsVirtualMachinesSubmitHibernateSamples { import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; @@ -1747,7 +1375,7 @@ import java.util.Arrays; */ public final class ScheduledActionsVirtualMachinesSubmitStartSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MaximumSet. @@ -1757,39 +1385,37 @@ public final class ScheduledActionsVirtualMachinesSubmitStartSamples { public static void scheduledActionsVirtualMachinesSubmitStartMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitStartWithResponse("eastus2", new SubmitStartRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withTimezone("America/Los_Angeles") - .withTimeZone("America/Los_Angeles") + .virtualMachinesSubmitStartWithResponse("pxtvvk", new SubmitStartRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitStartMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesSubmitStartMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitStartWithResponse("eastus2", new SubmitStartRequest() - .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitStartWithResponse("ufrcsuw", new SubmitStartRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") + .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/pom.xml b/sdk/computeschedule/azure-resourcemanager-computeschedule/pom.xml index cde714240e40..e1285072c0b1 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/pom.xml +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/pom.xml @@ -3,7 +3,7 @@ ~ Licensed under the MIT License. ~ Code generated by Microsoft (R) TypeSpec Code Generator. --> - + 4.0.0 com.azure @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-computeschedule - 1.2.0-beta.3 + 1.2.0-beta.2 jar Microsoft Azure SDK for Compute Schedule Management - This package contains Microsoft Azure SDK for Compute Schedule Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2026-04-15-preview. + This package contains Microsoft Azure SDK for Compute Schedule Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft.ComputeSchedule Resource Provider management API. Package api-version 2025-04-15-preview. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java index 8aa00437ee04..0ede96423a8c 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner; -import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner; @@ -26,7 +25,6 @@ import com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest; import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexRequest; import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; @@ -231,39 +229,8 @@ StartResourceOperationResponseInner virtualMachinesExecuteStart(String locationp ExecuteStartRequest requestBody); /** - * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, - * this operation is triggered as soon as Computeschedule receives it. - * - * @param locationparameter The location name. - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from a create flex request along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response virtualMachinesExecuteCreateFlexWithResponse( - String locationparameter, ExecuteCreateFlexRequest body, Context context); - - /** - * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, - * this operation is triggered as soon as Computeschedule receives it. - * - * @param locationparameter The location name. - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from a create flex request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CreateFlexResourceOperationResponseInner virtualMachinesExecuteCreateFlex(String locationparameter, - ExecuteCreateFlexRequest body); - - /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -278,8 +245,8 @@ Response virtualMachinesExecuteCreateWithR ExecuteCreateRequest requestBody, Context context); /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -293,8 +260,8 @@ CreateResourceOperationResponseInner virtualMachinesExecuteCreate(String locatio ExecuteCreateRequest requestBody); /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -309,8 +276,8 @@ Response virtualMachinesExecuteDeleteWithR ExecuteDeleteRequest requestBody, Context context); /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java deleted file mode 100644 index 82db97de60e0..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.computeschedule.models.ResourceOperation; -import java.io.IOException; -import java.util.List; - -/** - * The response from a create flex request. - */ -@Immutable -public final class CreateFlexResourceOperationResponseInner - implements JsonSerializable { - /* - * The description of the operation response - */ - private String description; - - /* - * The type of resources used in the create flex request eg virtual machines - */ - private String type; - - /* - * The location of the create flex request eg westus - */ - private String location; - - /* - * The results from the create flex request if no errors exist - */ - private List results; - - /** - * Creates an instance of CreateFlexResourceOperationResponseInner class. - */ - private CreateFlexResourceOperationResponseInner() { - } - - /** - * Get the description property: The description of the operation response. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the type property: The type of resources used in the create flex request eg virtual machines. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the location property: The location of the create flex request eg westus. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the results property: The results from the create flex request if no errors exist. - * - * @return the results value. - */ - public List results() { - return this.results; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateFlexResourceOperationResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateFlexResourceOperationResponseInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CreateFlexResourceOperationResponseInner. - */ - public static CreateFlexResourceOperationResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateFlexResourceOperationResponseInner deserializedCreateFlexResourceOperationResponseInner - = new CreateFlexResourceOperationResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedCreateFlexResourceOperationResponseInner.description = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCreateFlexResourceOperationResponseInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedCreateFlexResourceOperationResponseInner.location = reader.getString(); - } else if ("results".equals(fieldName)) { - List results = reader.readArray(reader1 -> ResourceOperation.fromJson(reader1)); - deserializedCreateFlexResourceOperationResponseInner.results = results; - } else { - reader.skipChildren(); - } - } - - return deserializedCreateFlexResourceOperationResponseInner; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java index dca530582200..4cae7956077d 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java @@ -217,7 +217,7 @@ public OccurrenceExtensionsClient getOccurrenceExtensions() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-04-15-preview"; + this.apiVersion = "2025-04-15-preview"; this.operations = new OperationsClientImpl(this); this.scheduledActions = new ScheduledActionsClientImpl(this); this.scheduledActionExtensions = new ScheduledActionExtensionsClientImpl(this); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java deleted file mode 100644 index 25802b6047be..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.implementation; - -import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; -import com.azure.resourcemanager.computeschedule.models.CreateFlexResourceOperationResponse; -import com.azure.resourcemanager.computeschedule.models.ResourceOperation; -import java.util.Collections; -import java.util.List; - -public final class CreateFlexResourceOperationResponseImpl implements CreateFlexResourceOperationResponse { - private CreateFlexResourceOperationResponseInner innerObject; - - private final com.azure.resourcemanager.computeschedule.ComputeScheduleManager serviceManager; - - CreateFlexResourceOperationResponseImpl(CreateFlexResourceOperationResponseInner innerObject, - com.azure.resourcemanager.computeschedule.ComputeScheduleManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String description() { - return this.innerModel().description(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public List results() { - List inner = this.innerModel().results(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public CreateFlexResourceOperationResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java index 256f3423140b..1f0a60a73914 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java @@ -36,7 +36,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient; import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner; -import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner; @@ -52,7 +51,6 @@ import com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionListResult; import com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest; import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexRequest; import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; @@ -223,26 +221,6 @@ Response virtualMachinesExecuteStartSync( @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteStartRequest requestBody, Context context); - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreateFlex") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> virtualMachinesExecuteCreateFlex( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteCreateFlexRequest body, - Context context); - - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreateFlex") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response virtualMachinesExecuteCreateFlexSync( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationparameter") String locationparameter, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExecuteCreateFlexRequest body, - Context context); - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -1143,88 +1121,8 @@ public StartResourceOperationResponseInner virtualMachinesExecuteStart(String lo } /** - * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, - * this operation is triggered as soon as Computeschedule receives it. - * - * @param locationparameter The location name. - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from a create flex request along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - virtualMachinesExecuteCreateFlexWithResponseAsync(String locationparameter, ExecuteCreateFlexRequest body) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.virtualMachinesExecuteCreateFlex(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), locationparameter, contentType, accept, - body, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, - * this operation is triggered as soon as Computeschedule receives it. - * - * @param locationparameter The location name. - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from a create flex request on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono - virtualMachinesExecuteCreateFlexAsync(String locationparameter, ExecuteCreateFlexRequest body) { - return virtualMachinesExecuteCreateFlexWithResponseAsync(locationparameter, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, - * this operation is triggered as soon as Computeschedule receives it. - * - * @param locationparameter The location name. - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from a create flex request along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response virtualMachinesExecuteCreateFlexWithResponse( - String locationparameter, ExecuteCreateFlexRequest body, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.virtualMachinesExecuteCreateFlexSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationparameter, contentType, accept, body, context); - } - - /** - * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, - * this operation is triggered as soon as Computeschedule receives it. - * - * @param locationparameter The location name. - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from a create flex request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CreateFlexResourceOperationResponseInner virtualMachinesExecuteCreateFlex(String locationparameter, - ExecuteCreateFlexRequest body) { - return virtualMachinesExecuteCreateFlexWithResponse(locationparameter, body, Context.NONE).getValue(); - } - - /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1246,8 +1144,8 @@ public CreateFlexResourceOperationResponseInner virtualMachinesExecuteCreateFlex } /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1264,8 +1162,8 @@ private Mono virtualMachinesExecuteCreateA } /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1285,8 +1183,8 @@ public Response virtualMachinesExecuteCrea } /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1302,8 +1200,8 @@ public CreateResourceOperationResponseInner virtualMachinesExecuteCreate(String } /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1325,8 +1223,8 @@ public CreateResourceOperationResponseInner virtualMachinesExecuteCreate(String } /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1343,8 +1241,8 @@ private Mono virtualMachinesExecuteDeleteA } /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -1364,8 +1262,8 @@ public Response virtualMachinesExecuteDele } /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java index d815f9717efd..64c4a1121324 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java @@ -11,7 +11,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient; import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner; -import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner; import com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner; @@ -26,11 +25,9 @@ import com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest; import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest; import com.azure.resourcemanager.computeschedule.models.CancelOperationsResponse; -import com.azure.resourcemanager.computeschedule.models.CreateFlexResourceOperationResponse; import com.azure.resourcemanager.computeschedule.models.CreateResourceOperationResponse; import com.azure.resourcemanager.computeschedule.models.DeallocateResourceOperationResponse; import com.azure.resourcemanager.computeschedule.models.DeleteResourceOperationResponse; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexRequest; import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; @@ -181,25 +178,6 @@ public StartResourceOperationResponse virtualMachinesExecuteStart(String locatio } } - public Response virtualMachinesExecuteCreateFlexWithResponse( - String locationparameter, ExecuteCreateFlexRequest body, Context context) { - Response inner - = this.serviceClient().virtualMachinesExecuteCreateFlexWithResponse(locationparameter, body, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CreateFlexResourceOperationResponseImpl(inner.getValue(), this.manager())); - } - - public CreateFlexResourceOperationResponse virtualMachinesExecuteCreateFlex(String locationparameter, - ExecuteCreateFlexRequest body) { - CreateFlexResourceOperationResponseInner inner - = this.serviceClient().virtualMachinesExecuteCreateFlex(locationparameter, body); - if (inner != null) { - return new CreateFlexResourceOperationResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response virtualMachinesExecuteCreateWithResponse(String locationparameter, ExecuteCreateRequest requestBody, Context context) { Response inner diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java deleted file mode 100644 index d08e9fb8725b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Enables or disables a capability on the virtual machine or virtual machine scale set. - */ -@Fluent -public final class AdditionalCapabilities implements JsonSerializable { - /* - * The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage - * account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual - * machine or virtual machine scale set only if this property is enabled. - */ - private Boolean ultraSSDEnabled; - - /* - * The flag that enables or disables hibernation capability on the VM. - */ - private Boolean hibernationEnabled; - - /** - * Creates an instance of AdditionalCapabilities class. - */ - public AdditionalCapabilities() { - } - - /** - * Get the ultraSSDEnabled property: The flag that enables or disables a capability to have one or more managed data - * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type - * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. - * - * @return the ultraSSDEnabled value. - */ - public Boolean ultraSSDEnabled() { - return this.ultraSSDEnabled; - } - - /** - * Set the ultraSSDEnabled property: The flag that enables or disables a capability to have one or more managed data - * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type - * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. - * - * @param ultraSSDEnabled the ultraSSDEnabled value to set. - * @return the AdditionalCapabilities object itself. - */ - public AdditionalCapabilities withUltraSSDEnabled(Boolean ultraSSDEnabled) { - this.ultraSSDEnabled = ultraSSDEnabled; - return this; - } - - /** - * Get the hibernationEnabled property: The flag that enables or disables hibernation capability on the VM. - * - * @return the hibernationEnabled value. - */ - public Boolean hibernationEnabled() { - return this.hibernationEnabled; - } - - /** - * Set the hibernationEnabled property: The flag that enables or disables hibernation capability on the VM. - * - * @param hibernationEnabled the hibernationEnabled value to set. - * @return the AdditionalCapabilities object itself. - */ - public AdditionalCapabilities withHibernationEnabled(Boolean hibernationEnabled) { - this.hibernationEnabled = hibernationEnabled; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("ultraSSDEnabled", this.ultraSSDEnabled); - jsonWriter.writeBooleanField("hibernationEnabled", this.hibernationEnabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdditionalCapabilities from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdditionalCapabilities if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdditionalCapabilities. - */ - public static AdditionalCapabilities fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdditionalCapabilities deserializedAdditionalCapabilities = new AdditionalCapabilities(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ultraSSDEnabled".equals(fieldName)) { - deserializedAdditionalCapabilities.ultraSSDEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("hibernationEnabled".equals(fieldName)) { - deserializedAdditionalCapabilities.hibernationEnabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAdditionalCapabilities; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java deleted file mode 100644 index 48bcca829ee8..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by - * Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. - */ -@Fluent -public final class AdditionalUnattendContent implements JsonSerializable { - /* - * The pass name. Currently, the only allowable value is OobeSystem. - */ - private AdditionalUnattendContentPassName passName; - - /* - * The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. - */ - private AdditionalUnattendContentComponentName componentName; - - /* - * Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and - * AutoLogon. - */ - private SettingNames settingName; - - /* - * Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. - * The XML must be less than 4KB and must include the root element for the setting or feature that is being - * inserted. - */ - private String content; - - /** - * Creates an instance of AdditionalUnattendContent class. - */ - public AdditionalUnattendContent() { - } - - /** - * Get the passName property: The pass name. Currently, the only allowable value is OobeSystem. - * - * @return the passName value. - */ - public AdditionalUnattendContentPassName passName() { - return this.passName; - } - - /** - * Set the passName property: The pass name. Currently, the only allowable value is OobeSystem. - * - * @param passName the passName value to set. - * @return the AdditionalUnattendContent object itself. - */ - public AdditionalUnattendContent withPassName(AdditionalUnattendContentPassName passName) { - this.passName = passName; - return this; - } - - /** - * Get the componentName property: The component name. Currently, the only allowable value is - * Microsoft-Windows-Shell-Setup. - * - * @return the componentName value. - */ - public AdditionalUnattendContentComponentName componentName() { - return this.componentName; - } - - /** - * Set the componentName property: The component name. Currently, the only allowable value is - * Microsoft-Windows-Shell-Setup. - * - * @param componentName the componentName value to set. - * @return the AdditionalUnattendContent object itself. - */ - public AdditionalUnattendContent withComponentName(AdditionalUnattendContentComponentName componentName) { - this.componentName = componentName; - return this; - } - - /** - * Get the settingName property: Specifies the name of the setting to which the content applies. Possible values - * are: FirstLogonCommands and AutoLogon. - * - * @return the settingName value. - */ - public SettingNames settingName() { - return this.settingName; - } - - /** - * Set the settingName property: Specifies the name of the setting to which the content applies. Possible values - * are: FirstLogonCommands and AutoLogon. - * - * @param settingName the settingName value to set. - * @return the AdditionalUnattendContent object itself. - */ - public AdditionalUnattendContent withSettingName(SettingNames settingName) { - this.settingName = settingName; - return this; - } - - /** - * Get the content property: Specifies the XML formatted content that is added to the unattend.xml file for the - * specified path and component. The XML must be less than 4KB and must include the root element for the setting or - * feature that is being inserted. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: Specifies the XML formatted content that is added to the unattend.xml file for the - * specified path and component. The XML must be less than 4KB and must include the root element for the setting or - * feature that is being inserted. - * - * @param content the content value to set. - * @return the AdditionalUnattendContent object itself. - */ - public AdditionalUnattendContent withContent(String content) { - this.content = content; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("passName", this.passName == null ? null : this.passName.toString()); - jsonWriter.writeStringField("componentName", this.componentName == null ? null : this.componentName.toString()); - jsonWriter.writeStringField("settingName", this.settingName == null ? null : this.settingName.toString()); - jsonWriter.writeStringField("content", this.content); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdditionalUnattendContent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdditionalUnattendContent if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdditionalUnattendContent. - */ - public static AdditionalUnattendContent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdditionalUnattendContent deserializedAdditionalUnattendContent = new AdditionalUnattendContent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("passName".equals(fieldName)) { - deserializedAdditionalUnattendContent.passName - = AdditionalUnattendContentPassName.fromString(reader.getString()); - } else if ("componentName".equals(fieldName)) { - deserializedAdditionalUnattendContent.componentName - = AdditionalUnattendContentComponentName.fromString(reader.getString()); - } else if ("settingName".equals(fieldName)) { - deserializedAdditionalUnattendContent.settingName = SettingNames.fromString(reader.getString()); - } else if ("content".equals(fieldName)) { - deserializedAdditionalUnattendContent.content = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAdditionalUnattendContent; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java deleted file mode 100644 index d51a42cf1f02..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -/** - * Defines values for AdditionalUnattendContentComponentName. - */ -public enum AdditionalUnattendContentComponentName { - /** - * Enum value Microsoft-Windows-Shell-Setup. - */ - MICROSOFT_WINDOWS_SHELL_SETUP("Microsoft-Windows-Shell-Setup"); - - /** - * The actual serialized value for a AdditionalUnattendContentComponentName instance. - */ - private final String value; - - AdditionalUnattendContentComponentName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AdditionalUnattendContentComponentName instance. - * - * @param value the serialized value to parse. - * @return the parsed AdditionalUnattendContentComponentName object, or null if unable to parse. - */ - public static AdditionalUnattendContentComponentName fromString(String value) { - if (value == null) { - return null; - } - AdditionalUnattendContentComponentName[] items = AdditionalUnattendContentComponentName.values(); - for (AdditionalUnattendContentComponentName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java deleted file mode 100644 index 876285e32a86..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -/** - * Defines values for AdditionalUnattendContentPassName. - */ -public enum AdditionalUnattendContentPassName { - /** - * Enum value OobeSystem. - */ - OOBE_SYSTEM("OobeSystem"); - - /** - * The actual serialized value for a AdditionalUnattendContentPassName instance. - */ - private final String value; - - AdditionalUnattendContentPassName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AdditionalUnattendContentPassName instance. - * - * @param value the serialized value to parse. - * @return the parsed AdditionalUnattendContentPassName object, or null if unable to parse. - */ - public static AdditionalUnattendContentPassName fromString(String value) { - if (value == null) { - return null; - } - AdditionalUnattendContentPassName[] items = AdditionalUnattendContentPassName.values(); - for (AdditionalUnattendContentPassName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java deleted file mode 100644 index 822a79848ceb..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies if Scheduled Events should be auto-approved when all instances are down. - */ -@Fluent -public final class AllInstancesDown implements JsonSerializable { - /* - * Specifies if Scheduled Events should be auto-approved when all instances are down. Its default value is true. - */ - private Boolean automaticallyApprove; - - /** - * Creates an instance of AllInstancesDown class. - */ - public AllInstancesDown() { - } - - /** - * Get the automaticallyApprove property: Specifies if Scheduled Events should be auto-approved when all instances - * are down. Its default value is true. - * - * @return the automaticallyApprove value. - */ - public Boolean automaticallyApprove() { - return this.automaticallyApprove; - } - - /** - * Set the automaticallyApprove property: Specifies if Scheduled Events should be auto-approved when all instances - * are down. Its default value is true. - * - * @param automaticallyApprove the automaticallyApprove value to set. - * @return the AllInstancesDown object itself. - */ - public AllInstancesDown withAutomaticallyApprove(Boolean automaticallyApprove) { - this.automaticallyApprove = automaticallyApprove; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("automaticallyApprove", this.automaticallyApprove); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AllInstancesDown from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AllInstancesDown if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AllInstancesDown. - */ - public static AllInstancesDown fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AllInstancesDown deserializedAllInstancesDown = new AllInstancesDown(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("automaticallyApprove".equals(fieldName)) { - deserializedAllInstancesDown.automaticallyApprove = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAllInstancesDown; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java deleted file mode 100644 index a7a4e8d4ecd8..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The allocation strategy for VM size selection. - */ -public final class AllocationStrategy extends ExpandableStringEnum { - /** - * Platform prioritizes VM sizes with the lowest hourly cost. - */ - public static final AllocationStrategy LOWEST_PRICE = fromString("LowestPrice"); - - /** - * Customer specifies a rank for each VM size, platform uses VM sizes in rank order. - */ - public static final AllocationStrategy PRIORITIZED = fromString("Prioritized"); - - /** - * Platform prioritizes VM sizes with the highest available capacity first. - */ - public static final AllocationStrategy CAPACITY_OPTIMIZED = fromString("CapacityOptimized"); - - /** - * Creates a new instance of AllocationStrategy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AllocationStrategy() { - } - - /** - * Creates or finds a AllocationStrategy from its string representation. - * - * @param name a name to look for. - * @return the corresponding AllocationStrategy. - */ - public static AllocationStrategy fromString(String name) { - return fromString(name, AllocationStrategy.class); - } - - /** - * Gets known AllocationStrategy values. - * - * @return known AllocationStrategy values. - */ - public static Collection values() { - return values(AllocationStrategy.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java deleted file mode 100644 index 969e284eb930..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The API entity reference. - */ -@Fluent -public final class ApiEntityReference implements JsonSerializable { - /* - * The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - */ - private String id; - - /** - * Creates an instance of ApiEntityReference class. - */ - public ApiEntityReference() { - } - - /** - * Get the id property: The ARM resource id in the form of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ARM resource id in the form of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - * - * @param id the id value to set. - * @return the ApiEntityReference object itself. - */ - public ApiEntityReference withId(String id) { - this.id = id; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApiEntityReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApiEntityReference if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ApiEntityReference. - */ - public static ApiEntityReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApiEntityReference deserializedApiEntityReference = new ApiEntityReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedApiEntityReference.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedApiEntityReference; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java deleted file mode 100644 index 6a3f012506aa..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Contains the list of gallery applications that should be made available to the VM. - */ -@Fluent -public final class ApplicationProfile implements JsonSerializable { - /* - * Specifies the gallery applications that should be made available to the VM - */ - private List galleryApplications; - - /** - * Creates an instance of ApplicationProfile class. - */ - public ApplicationProfile() { - } - - /** - * Get the galleryApplications property: Specifies the gallery applications that should be made available to the VM. - * - * @return the galleryApplications value. - */ - public List galleryApplications() { - return this.galleryApplications; - } - - /** - * Set the galleryApplications property: Specifies the gallery applications that should be made available to the VM. - * - * @param galleryApplications the galleryApplications value to set. - * @return the ApplicationProfile object itself. - */ - public ApplicationProfile withGalleryApplications(List galleryApplications) { - this.galleryApplications = galleryApplications; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("galleryApplications", this.galleryApplications, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplicationProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplicationProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ApplicationProfile. - */ - public static ApplicationProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplicationProfile deserializedApplicationProfile = new ApplicationProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("galleryApplications".equals(fieldName)) { - List galleryApplications - = reader.readArray(reader1 -> VMGalleryApplication.fromJson(reader1)); - deserializedApplicationProfile.galleryApplications = galleryApplications; - } else { - reader.skipChildren(); - } - } - - return deserializedApplicationProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java deleted file mode 100644 index d8e30f370852..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. - * You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the - * hypervisor. - */ -@Fluent -public final class BootDiagnostics implements JsonSerializable { - /* - * Whether boot diagnostics should be enabled on the Virtual Machine. - */ - private Boolean enabled; - - /* - * Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified - * while enabling boot diagnostics, managed storage will be used. - */ - private String storageUri; - - /** - * Creates an instance of BootDiagnostics class. - */ - public BootDiagnostics() { - } - - /** - * Get the enabled property: Whether boot diagnostics should be enabled on the Virtual Machine. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Whether boot diagnostics should be enabled on the Virtual Machine. - * - * @param enabled the enabled value to set. - * @return the BootDiagnostics object itself. - */ - public BootDiagnostics withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the storageUri property: Uri of the storage account to use for placing the console output and screenshot. If - * storageUri is not specified while enabling boot diagnostics, managed storage will be used. - * - * @return the storageUri value. - */ - public String storageUri() { - return this.storageUri; - } - - /** - * Set the storageUri property: Uri of the storage account to use for placing the console output and screenshot. If - * storageUri is not specified while enabling boot diagnostics, managed storage will be used. - * - * @param storageUri the storageUri value to set. - * @return the BootDiagnostics object itself. - */ - public BootDiagnostics withStorageUri(String storageUri) { - this.storageUri = storageUri; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("storageUri", this.storageUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BootDiagnostics from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BootDiagnostics if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BootDiagnostics. - */ - public static BootDiagnostics fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BootDiagnostics deserializedBootDiagnostics = new BootDiagnostics(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedBootDiagnostics.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("storageUri".equals(fieldName)) { - deserializedBootDiagnostics.storageUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBootDiagnostics; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java deleted file mode 100644 index b39dd1f23789..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines a virtual machine extension. - */ -@Fluent -public final class BulkActionVMExtension implements JsonSerializable { - /* - * The name of the virtual machine extension. - */ - private String name; - - /* - * Properties of the virtual machine extension. - */ - private BulkActionVmExtensionProperties properties; - - /** - * Creates an instance of BulkActionVMExtension class. - */ - public BulkActionVMExtension() { - } - - /** - * Get the name property: The name of the virtual machine extension. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the virtual machine extension. - * - * @param name the name value to set. - * @return the BulkActionVMExtension object itself. - */ - public BulkActionVMExtension withName(String name) { - this.name = name; - return this; - } - - /** - * Get the properties property: Properties of the virtual machine extension. - * - * @return the properties value. - */ - public BulkActionVmExtensionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the virtual machine extension. - * - * @param properties the properties value to set. - * @return the BulkActionVMExtension object itself. - */ - public BulkActionVMExtension withProperties(BulkActionVmExtensionProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BulkActionVMExtension from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BulkActionVMExtension if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BulkActionVMExtension. - */ - public static BulkActionVMExtension fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BulkActionVMExtension deserializedBulkActionVMExtension = new BulkActionVMExtension(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedBulkActionVMExtension.name = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedBulkActionVMExtension.properties = BulkActionVmExtensionProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBulkActionVMExtension; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProperties.java deleted file mode 100644 index 38fa0601e546..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProperties.java +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the properties of a Virtual Machine for create. - */ -@Fluent -public final class BulkActionVMProperties implements JsonSerializable { - /* - * Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations - * for the virtual machine. - */ - private ScheduledEventsPolicy scheduledEventsPolicy; - - /* - * Specifies the storage settings for the virtual machine disks. - */ - private StorageProfile storageProfile; - - /* - * Specifies additional capabilities enabled or disabled on the virtual machine. - */ - private AdditionalCapabilities additionalCapabilities; - - /* - * Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be - * changed once VM is provisioned. - */ - private OSProfile osProfile; - - /* - * Specifies the network interfaces of the virtual machine. - */ - private NetworkProfile networkProfile; - - /* - * Specifies the hardware profile for the virtual machine. - */ - private HardwareProfile hardwareProfile; - - /* - * Specifies the Security related profile settings for the virtual machine. - */ - private SecurityProfile securityProfile; - - /* - * Specifies the boot diagnostic settings state. Minimum compute api-version: 2015-06-15. - */ - private DiagnosticsProfile diagnosticsProfile; - - /* - * Specifies that the image or disk that is being used was licensed on-premises.

      Possible values for - * Windows Server operating system are:

      Windows_Client

      Windows_Server

      Possible values for - * Linux Server operating system are:

      RHEL_BYOS (for RHEL)

      SLES_BYOS (for SUSE)

      For more - * information, see [Azure Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

      [Azure - * Hybrid Use Benefit for Linux - * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

      Minimum - * api-version: 2015-06-15 - */ - private String licenseType; - - /* - * Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 - * minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). - * Minimum compute api-version: 2020-06-01. - */ - private String extensionsTimeBudget; - - /* - * Specifies Scheduled Event related configurations. - */ - private ScheduledEventsProfile scheduledEventsProfile; - - /* - * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum compute - * api-version: 2021-03-01. - */ - private String userData; - - /* - * Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum compute - * api-version: 2021-04-01. - */ - private CapacityReservationProfile capacityReservation; - - /* - * Specifies the gallery applications that should be made available to the VM. - */ - private ApplicationProfile applicationProfile; - - /** - * Creates an instance of BulkActionVMProperties class. - */ - public BulkActionVMProperties() { - } - - /** - * Get the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets - * Scheduled Event related configurations for the virtual machine. - * - * @return the scheduledEventsPolicy value. - */ - public ScheduledEventsPolicy scheduledEventsPolicy() { - return this.scheduledEventsPolicy; - } - - /** - * Set the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets - * Scheduled Event related configurations for the virtual machine. - * - * @param scheduledEventsPolicy the scheduledEventsPolicy value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withScheduledEventsPolicy(ScheduledEventsPolicy scheduledEventsPolicy) { - this.scheduledEventsPolicy = scheduledEventsPolicy; - return this; - } - - /** - * Get the storageProfile property: Specifies the storage settings for the virtual machine disks. - * - * @return the storageProfile value. - */ - public StorageProfile storageProfile() { - return this.storageProfile; - } - - /** - * Set the storageProfile property: Specifies the storage settings for the virtual machine disks. - * - * @param storageProfile the storageProfile value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withStorageProfile(StorageProfile storageProfile) { - this.storageProfile = storageProfile; - return this; - } - - /** - * Get the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual - * machine. - * - * @return the additionalCapabilities value. - */ - public AdditionalCapabilities additionalCapabilities() { - return this.additionalCapabilities; - } - - /** - * Set the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual - * machine. - * - * @param additionalCapabilities the additionalCapabilities value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withAdditionalCapabilities(AdditionalCapabilities additionalCapabilities) { - this.additionalCapabilities = additionalCapabilities; - return this; - } - - /** - * Get the osProfile property: Specifies the operating system settings used while creating the virtual machine. Some - * of the settings cannot be changed once VM is provisioned. - * - * @return the osProfile value. - */ - public OSProfile osProfile() { - return this.osProfile; - } - - /** - * Set the osProfile property: Specifies the operating system settings used while creating the virtual machine. Some - * of the settings cannot be changed once VM is provisioned. - * - * @param osProfile the osProfile value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withOsProfile(OSProfile osProfile) { - this.osProfile = osProfile; - return this; - } - - /** - * Get the networkProfile property: Specifies the network interfaces of the virtual machine. - * - * @return the networkProfile value. - */ - public NetworkProfile networkProfile() { - return this.networkProfile; - } - - /** - * Set the networkProfile property: Specifies the network interfaces of the virtual machine. - * - * @param networkProfile the networkProfile value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withNetworkProfile(NetworkProfile networkProfile) { - this.networkProfile = networkProfile; - return this; - } - - /** - * Get the hardwareProfile property: Specifies the hardware profile for the virtual machine. - * - * @return the hardwareProfile value. - */ - public HardwareProfile hardwareProfile() { - return this.hardwareProfile; - } - - /** - * Set the hardwareProfile property: Specifies the hardware profile for the virtual machine. - * - * @param hardwareProfile the hardwareProfile value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withHardwareProfile(HardwareProfile hardwareProfile) { - this.hardwareProfile = hardwareProfile; - return this; - } - - /** - * Get the securityProfile property: Specifies the Security related profile settings for the virtual machine. - * - * @return the securityProfile value. - */ - public SecurityProfile securityProfile() { - return this.securityProfile; - } - - /** - * Set the securityProfile property: Specifies the Security related profile settings for the virtual machine. - * - * @param securityProfile the securityProfile value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withSecurityProfile(SecurityProfile securityProfile) { - this.securityProfile = securityProfile; - return this; - } - - /** - * Get the diagnosticsProfile property: Specifies the boot diagnostic settings state. Minimum compute api-version: - * 2015-06-15. - * - * @return the diagnosticsProfile value. - */ - public DiagnosticsProfile diagnosticsProfile() { - return this.diagnosticsProfile; - } - - /** - * Set the diagnosticsProfile property: Specifies the boot diagnostic settings state. Minimum compute api-version: - * 2015-06-15. - * - * @param diagnosticsProfile the diagnosticsProfile value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withDiagnosticsProfile(DiagnosticsProfile diagnosticsProfile) { - this.diagnosticsProfile = diagnosticsProfile; - return this; - } - - /** - * Get the licenseType property: Specifies that the image or disk that is being used was licensed on-premises. - * <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client - * <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: - * <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more - * information, see [Azure Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) - * <br><br> [Azure Hybrid Use Benefit for Linux - * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> - * Minimum api-version: 2015-06-15. - * - * @return the licenseType value. - */ - public String licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: Specifies that the image or disk that is being used was licensed on-premises. - * <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client - * <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: - * <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more - * information, see [Azure Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) - * <br><br> [Azure Hybrid Use Benefit for Linux - * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> - * Minimum api-version: 2015-06-15. - * - * @param licenseType the licenseType value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withLicenseType(String licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the extensionsTimeBudget property: Specifies the time alloted for all extensions to start. The time duration - * should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default - * value is 90 minutes (PT1H30M). Minimum compute api-version: 2020-06-01. - * - * @return the extensionsTimeBudget value. - */ - public String extensionsTimeBudget() { - return this.extensionsTimeBudget; - } - - /** - * Set the extensionsTimeBudget property: Specifies the time alloted for all extensions to start. The time duration - * should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default - * value is 90 minutes (PT1H30M). Minimum compute api-version: 2020-06-01. - * - * @param extensionsTimeBudget the extensionsTimeBudget value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withExtensionsTimeBudget(String extensionsTimeBudget) { - this.extensionsTimeBudget = extensionsTimeBudget; - return this; - } - - /** - * Get the scheduledEventsProfile property: Specifies Scheduled Event related configurations. - * - * @return the scheduledEventsProfile value. - */ - public ScheduledEventsProfile scheduledEventsProfile() { - return this.scheduledEventsProfile; - } - - /** - * Set the scheduledEventsProfile property: Specifies Scheduled Event related configurations. - * - * @param scheduledEventsProfile the scheduledEventsProfile value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withScheduledEventsProfile(ScheduledEventsProfile scheduledEventsProfile) { - this.scheduledEventsProfile = scheduledEventsProfile; - return this; - } - - /** - * Get the userData property: UserData for the VM, which must be base-64 encoded. Customer should not pass any - * secrets in here. Minimum compute api-version: 2021-03-01. - * - * @return the userData value. - */ - public String userData() { - return this.userData; - } - - /** - * Set the userData property: UserData for the VM, which must be base-64 encoded. Customer should not pass any - * secrets in here. Minimum compute api-version: 2021-03-01. - * - * @param userData the userData value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withUserData(String userData) { - this.userData = userData; - return this; - } - - /** - * Get the capacityReservation property: Specifies information about the capacity reservation that is used to - * allocate virtual machine. Minimum compute api-version: 2021-04-01. - * - * @return the capacityReservation value. - */ - public CapacityReservationProfile capacityReservation() { - return this.capacityReservation; - } - - /** - * Set the capacityReservation property: Specifies information about the capacity reservation that is used to - * allocate virtual machine. Minimum compute api-version: 2021-04-01. - * - * @param capacityReservation the capacityReservation value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withCapacityReservation(CapacityReservationProfile capacityReservation) { - this.capacityReservation = capacityReservation; - return this; - } - - /** - * Get the applicationProfile property: Specifies the gallery applications that should be made available to the VM. - * - * @return the applicationProfile value. - */ - public ApplicationProfile applicationProfile() { - return this.applicationProfile; - } - - /** - * Set the applicationProfile property: Specifies the gallery applications that should be made available to the VM. - * - * @param applicationProfile the applicationProfile value to set. - * @return the BulkActionVMProperties object itself. - */ - public BulkActionVMProperties withApplicationProfile(ApplicationProfile applicationProfile) { - this.applicationProfile = applicationProfile; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("scheduledEventsPolicy", this.scheduledEventsPolicy); - jsonWriter.writeJsonField("storageProfile", this.storageProfile); - jsonWriter.writeJsonField("additionalCapabilities", this.additionalCapabilities); - jsonWriter.writeJsonField("osProfile", this.osProfile); - jsonWriter.writeJsonField("networkProfile", this.networkProfile); - jsonWriter.writeJsonField("hardwareProfile", this.hardwareProfile); - jsonWriter.writeJsonField("securityProfile", this.securityProfile); - jsonWriter.writeJsonField("diagnosticsProfile", this.diagnosticsProfile); - jsonWriter.writeStringField("licenseType", this.licenseType); - jsonWriter.writeStringField("extensionsTimeBudget", this.extensionsTimeBudget); - jsonWriter.writeJsonField("scheduledEventsProfile", this.scheduledEventsProfile); - jsonWriter.writeStringField("userData", this.userData); - jsonWriter.writeJsonField("capacityReservation", this.capacityReservation); - jsonWriter.writeJsonField("applicationProfile", this.applicationProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BulkActionVMProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BulkActionVMProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the BulkActionVMProperties. - */ - public static BulkActionVMProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BulkActionVMProperties deserializedBulkActionVMProperties = new BulkActionVMProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scheduledEventsPolicy".equals(fieldName)) { - deserializedBulkActionVMProperties.scheduledEventsPolicy = ScheduledEventsPolicy.fromJson(reader); - } else if ("storageProfile".equals(fieldName)) { - deserializedBulkActionVMProperties.storageProfile = StorageProfile.fromJson(reader); - } else if ("additionalCapabilities".equals(fieldName)) { - deserializedBulkActionVMProperties.additionalCapabilities = AdditionalCapabilities.fromJson(reader); - } else if ("osProfile".equals(fieldName)) { - deserializedBulkActionVMProperties.osProfile = OSProfile.fromJson(reader); - } else if ("networkProfile".equals(fieldName)) { - deserializedBulkActionVMProperties.networkProfile = NetworkProfile.fromJson(reader); - } else if ("hardwareProfile".equals(fieldName)) { - deserializedBulkActionVMProperties.hardwareProfile = HardwareProfile.fromJson(reader); - } else if ("securityProfile".equals(fieldName)) { - deserializedBulkActionVMProperties.securityProfile = SecurityProfile.fromJson(reader); - } else if ("diagnosticsProfile".equals(fieldName)) { - deserializedBulkActionVMProperties.diagnosticsProfile = DiagnosticsProfile.fromJson(reader); - } else if ("licenseType".equals(fieldName)) { - deserializedBulkActionVMProperties.licenseType = reader.getString(); - } else if ("extensionsTimeBudget".equals(fieldName)) { - deserializedBulkActionVMProperties.extensionsTimeBudget = reader.getString(); - } else if ("scheduledEventsProfile".equals(fieldName)) { - deserializedBulkActionVMProperties.scheduledEventsProfile = ScheduledEventsProfile.fromJson(reader); - } else if ("userData".equals(fieldName)) { - deserializedBulkActionVMProperties.userData = reader.getString(); - } else if ("capacityReservation".equals(fieldName)) { - deserializedBulkActionVMProperties.capacityReservation - = CapacityReservationProfile.fromJson(reader); - } else if ("applicationProfile".equals(fieldName)) { - deserializedBulkActionVMProperties.applicationProfile = ApplicationProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBulkActionVMProperties; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java deleted file mode 100644 index 5ca78f1575e2..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java +++ /dev/null @@ -1,415 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.BinaryData; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Describes the properties of a Virtual Machine Extension. - */ -@Fluent -public final class BulkActionVmExtensionProperties implements JsonSerializable { - /* - * How the extension handler should be forced to update even if the extension configuration has not changed. - */ - private String forceUpdateTag; - - /* - * The name of the extension handler publisher. - */ - private String publisher; - - /* - * Specifies the type of the extension; an example is 'CustomScriptExtension'. - */ - private String type; - - /* - * Specifies the version of the script handler. - */ - private String typeHandlerVersion; - - /* - * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once - * deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set - * to true. - */ - private Boolean autoUpgradeMinorVersion; - - /* - * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of - * the extension available. - */ - private Boolean enableAutomaticUpgrade; - - /* - * JSON formatted public settings for the extension. - */ - private Map settings; - - /* - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at - * all. - */ - private Map protectedSettings; - - /* - * Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not - * connecting to the VM will not be suppressed regardless of this value). The default is false. - */ - private Boolean suppressFailures; - - /* - * The extensions protected settings that are passed by reference, and consumed from key vault - */ - private KeyVaultSecretReference protectedSettingsFromKeyVault; - - /* - * Collection of extension names after which this extension needs to be provisioned. - */ - private List provisionAfterExtensions; - - /** - * Creates an instance of BulkActionVmExtensionProperties class. - */ - public BulkActionVmExtensionProperties() { - } - - /** - * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension - * configuration has not changed. - * - * @return the forceUpdateTag value. - */ - public String forceUpdateTag() { - return this.forceUpdateTag; - } - - /** - * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension - * configuration has not changed. - * - * @param forceUpdateTag the forceUpdateTag value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withForceUpdateTag(String forceUpdateTag) { - this.forceUpdateTag = forceUpdateTag; - return this; - } - - /** - * Get the publisher property: The name of the extension handler publisher. - * - * @return the publisher value. - */ - public String publisher() { - return this.publisher; - } - - /** - * Set the publisher property: The name of the extension handler publisher. - * - * @param publisher the publisher value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - /** - * Get the type property: Specifies the type of the extension; an example is 'CustomScriptExtension'. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Specifies the type of the extension; an example is 'CustomScriptExtension'. - * - * @param type the type value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withType(String type) { - this.type = type; - return this; - } - - /** - * Get the typeHandlerVersion property: Specifies the version of the script handler. - * - * @return the typeHandlerVersion value. - */ - public String typeHandlerVersion() { - return this.typeHandlerVersion; - } - - /** - * Set the typeHandlerVersion property: Specifies the version of the script handler. - * - * @param typeHandlerVersion the typeHandlerVersion value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withTypeHandlerVersion(String typeHandlerVersion) { - this.typeHandlerVersion = typeHandlerVersion; - return this; - } - - /** - * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one - * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. - * - * @return the autoUpgradeMinorVersion value. - */ - public Boolean autoUpgradeMinorVersion() { - return this.autoUpgradeMinorVersion; - } - - /** - * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one - * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. - * - * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { - this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; - return this; - } - - /** - * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the - * platform if there is a newer version of the extension available. - * - * @return the enableAutomaticUpgrade value. - */ - public Boolean enableAutomaticUpgrade() { - return this.enableAutomaticUpgrade; - } - - /** - * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the - * platform if there is a newer version of the extension available. - * - * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { - this.enableAutomaticUpgrade = enableAutomaticUpgrade; - return this; - } - - /** - * Get the settings property: JSON formatted public settings for the extension. - * - * @return the settings value. - */ - public Map settings() { - return this.settings; - } - - /** - * Set the settings property: JSON formatted public settings for the extension. - * - * @param settings the settings value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withSettings(Map settings) { - this.settings = settings; - return this; - } - - /** - * Get the protectedSettings property: The extension can contain either protectedSettings or - * protectedSettingsFromKeyVault or no protected settings at all. - * - * @return the protectedSettings value. - */ - public Map protectedSettings() { - return this.protectedSettings; - } - - /** - * Set the protectedSettings property: The extension can contain either protectedSettings or - * protectedSettingsFromKeyVault or no protected settings at all. - * - * @param protectedSettings the protectedSettings value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withProtectedSettings(Map protectedSettings) { - this.protectedSettings = protectedSettings; - return this; - } - - /** - * Get the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed - * (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The - * default is false. - * - * @return the suppressFailures value. - */ - public Boolean suppressFailures() { - return this.suppressFailures; - } - - /** - * Set the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed - * (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The - * default is false. - * - * @param suppressFailures the suppressFailures value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withSuppressFailures(Boolean suppressFailures) { - this.suppressFailures = suppressFailures; - return this; - } - - /** - * Get the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference, - * and consumed from key vault. - * - * @return the protectedSettingsFromKeyVault value. - */ - public KeyVaultSecretReference protectedSettingsFromKeyVault() { - return this.protectedSettingsFromKeyVault; - } - - /** - * Set the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference, - * and consumed from key vault. - * - * @param protectedSettingsFromKeyVault the protectedSettingsFromKeyVault value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties - withProtectedSettingsFromKeyVault(KeyVaultSecretReference protectedSettingsFromKeyVault) { - this.protectedSettingsFromKeyVault = protectedSettingsFromKeyVault; - return this; - } - - /** - * Get the provisionAfterExtensions property: Collection of extension names after which this extension needs to be - * provisioned. - * - * @return the provisionAfterExtensions value. - */ - public List provisionAfterExtensions() { - return this.provisionAfterExtensions; - } - - /** - * Set the provisionAfterExtensions property: Collection of extension names after which this extension needs to be - * provisioned. - * - * @param provisionAfterExtensions the provisionAfterExtensions value to set. - * @return the BulkActionVmExtensionProperties object itself. - */ - public BulkActionVmExtensionProperties withProvisionAfterExtensions(List provisionAfterExtensions) { - this.provisionAfterExtensions = provisionAfterExtensions; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("forceUpdateTag", this.forceUpdateTag); - jsonWriter.writeStringField("publisher", this.publisher); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeStringField("typeHandlerVersion", this.typeHandlerVersion); - jsonWriter.writeBooleanField("autoUpgradeMinorVersion", this.autoUpgradeMinorVersion); - jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); - jsonWriter.writeMapField("settings", this.settings, (writer, element) -> { - if (element == null) { - writer.writeNull(); - } else { - element.writeTo(writer); - } - }); - jsonWriter.writeMapField("protectedSettings", this.protectedSettings, (writer, element) -> { - if (element == null) { - writer.writeNull(); - } else { - element.writeTo(writer); - } - }); - jsonWriter.writeBooleanField("suppressFailures", this.suppressFailures); - jsonWriter.writeJsonField("protectedSettingsFromKeyVault", this.protectedSettingsFromKeyVault); - jsonWriter.writeArrayField("provisionAfterExtensions", this.provisionAfterExtensions, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BulkActionVmExtensionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BulkActionVmExtensionProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BulkActionVmExtensionProperties. - */ - public static BulkActionVmExtensionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BulkActionVmExtensionProperties deserializedBulkActionVmExtensionProperties - = new BulkActionVmExtensionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("forceUpdateTag".equals(fieldName)) { - deserializedBulkActionVmExtensionProperties.forceUpdateTag = reader.getString(); - } else if ("publisher".equals(fieldName)) { - deserializedBulkActionVmExtensionProperties.publisher = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedBulkActionVmExtensionProperties.type = reader.getString(); - } else if ("typeHandlerVersion".equals(fieldName)) { - deserializedBulkActionVmExtensionProperties.typeHandlerVersion = reader.getString(); - } else if ("autoUpgradeMinorVersion".equals(fieldName)) { - deserializedBulkActionVmExtensionProperties.autoUpgradeMinorVersion - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableAutomaticUpgrade".equals(fieldName)) { - deserializedBulkActionVmExtensionProperties.enableAutomaticUpgrade - = reader.getNullable(JsonReader::getBoolean); - } else if ("settings".equals(fieldName)) { - Map settings = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); - deserializedBulkActionVmExtensionProperties.settings = settings; - } else if ("protectedSettings".equals(fieldName)) { - Map protectedSettings = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); - deserializedBulkActionVmExtensionProperties.protectedSettings = protectedSettings; - } else if ("suppressFailures".equals(fieldName)) { - deserializedBulkActionVmExtensionProperties.suppressFailures - = reader.getNullable(JsonReader::getBoolean); - } else if ("protectedSettingsFromKeyVault".equals(fieldName)) { - deserializedBulkActionVmExtensionProperties.protectedSettingsFromKeyVault - = KeyVaultSecretReference.fromJson(reader); - } else if ("provisionAfterExtensions".equals(fieldName)) { - List provisionAfterExtensions = reader.readArray(reader1 -> reader1.getString()); - deserializedBulkActionVmExtensionProperties.provisionAfterExtensions = provisionAfterExtensions; - } else { - reader.skipChildren(); - } - } - - return deserializedBulkActionVmExtensionProperties; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java deleted file mode 100644 index 19cce502b1c9..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Specifies the configuration for a virtual machine operation. - */ -@Fluent -public final class BulkVMConfiguration implements JsonSerializable { - /* - * Identifier for created virtual machine. If not passed, it will be created from resource prefix. - */ - private String name; - - /* - * Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machines. - */ - private String computeApiVersion; - - /* - * Resource group name for the virtual machine. - */ - private String resourceGroupName; - - /* - * The availability zones. - */ - private List zones; - - /* - * The marketplace image plan used for the virtual machine. - */ - private Plan plan; - - /* - * The identity of the virtual machine, if configured. - */ - private VirtualMachineIdentity identity; - - /* - * The extended location of the Virtual Machine. - */ - private ExtendedLocation extendedLocation; - - /* - * Placement constraints for virtual machine hardware placement. - */ - private Placement placement; - - /* - * Resource tags to apply to the virtual machines created by this bulk action. - */ - private Map tags; - - /* - * Specifies the properties of the virtual machine to be created. - */ - private BulkActionVMProperties properties; - - /* - * Virtual Machine Extensions Array to be applied to the Virtual Machines. - */ - private List vmExtensions; - - /** - * Creates an instance of BulkVMConfiguration class. - */ - public BulkVMConfiguration() { - } - - /** - * Get the name property: Identifier for created virtual machine. If not passed, it will be created from resource - * prefix. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Identifier for created virtual machine. If not passed, it will be created from resource - * prefix. - * - * @param name the name value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withName(String name) { - this.name = name; - return this; - } - - /** - * Get the computeApiVersion property: Specifies the Microsoft.Compute API version to use when creating underlying - * Virtual Machines. - * - * @return the computeApiVersion value. - */ - public String computeApiVersion() { - return this.computeApiVersion; - } - - /** - * Set the computeApiVersion property: Specifies the Microsoft.Compute API version to use when creating underlying - * Virtual Machines. - * - * @param computeApiVersion the computeApiVersion value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withComputeApiVersion(String computeApiVersion) { - this.computeApiVersion = computeApiVersion; - return this; - } - - /** - * Get the resourceGroupName property: Resource group name for the virtual machine. - * - * @return the resourceGroupName value. - */ - public String resourceGroupName() { - return this.resourceGroupName; - } - - /** - * Set the resourceGroupName property: Resource group name for the virtual machine. - * - * @param resourceGroupName the resourceGroupName value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withResourceGroupName(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - /** - * Get the zones property: The availability zones. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones property: The availability zones. - * - * @param zones the zones value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withZones(List zones) { - this.zones = zones; - return this; - } - - /** - * Get the plan property: The marketplace image plan used for the virtual machine. - * - * @return the plan value. - */ - public Plan plan() { - return this.plan; - } - - /** - * Set the plan property: The marketplace image plan used for the virtual machine. - * - * @param plan the plan value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withPlan(Plan plan) { - this.plan = plan; - return this; - } - - /** - * Get the identity property: The identity of the virtual machine, if configured. - * - * @return the identity value. - */ - public VirtualMachineIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the virtual machine, if configured. - * - * @param identity the identity value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withIdentity(VirtualMachineIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the extendedLocation property: The extended location of the Virtual Machine. - * - * @return the extendedLocation value. - */ - public ExtendedLocation extendedLocation() { - return this.extendedLocation; - } - - /** - * Set the extendedLocation property: The extended location of the Virtual Machine. - * - * @param extendedLocation the extendedLocation value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * Get the placement property: Placement constraints for virtual machine hardware placement. - * - * @return the placement value. - */ - public Placement placement() { - return this.placement; - } - - /** - * Set the placement property: Placement constraints for virtual machine hardware placement. - * - * @param placement the placement value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withPlacement(Placement placement) { - this.placement = placement; - return this; - } - - /** - * Get the tags property: Resource tags to apply to the virtual machines created by this bulk action. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags to apply to the virtual machines created by this bulk action. - * - * @param tags the tags value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the properties property: Specifies the properties of the virtual machine to be created. - * - * @return the properties value. - */ - public BulkActionVMProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Specifies the properties of the virtual machine to be created. - * - * @param properties the properties value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withProperties(BulkActionVMProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the vmExtensions property: Virtual Machine Extensions Array to be applied to the Virtual Machines. - * - * @return the vmExtensions value. - */ - public List vmExtensions() { - return this.vmExtensions; - } - - /** - * Set the vmExtensions property: Virtual Machine Extensions Array to be applied to the Virtual Machines. - * - * @param vmExtensions the vmExtensions value to set. - * @return the BulkVMConfiguration object itself. - */ - public BulkVMConfiguration withVmExtensions(List vmExtensions) { - this.vmExtensions = vmExtensions; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("computeApiVersion", this.computeApiVersion); - jsonWriter.writeStringField("resourceGroupName", this.resourceGroupName); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("plan", this.plan); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); - jsonWriter.writeJsonField("placement", this.placement); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeArrayField("vmExtensions", this.vmExtensions, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BulkVMConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BulkVMConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BulkVMConfiguration. - */ - public static BulkVMConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BulkVMConfiguration deserializedBulkVMConfiguration = new BulkVMConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedBulkVMConfiguration.name = reader.getString(); - } else if ("computeApiVersion".equals(fieldName)) { - deserializedBulkVMConfiguration.computeApiVersion = reader.getString(); - } else if ("resourceGroupName".equals(fieldName)) { - deserializedBulkVMConfiguration.resourceGroupName = reader.getString(); - } else if ("zones".equals(fieldName)) { - List zones = reader.readArray(reader1 -> reader1.getString()); - deserializedBulkVMConfiguration.zones = zones; - } else if ("plan".equals(fieldName)) { - deserializedBulkVMConfiguration.plan = Plan.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedBulkVMConfiguration.identity = VirtualMachineIdentity.fromJson(reader); - } else if ("extendedLocation".equals(fieldName)) { - deserializedBulkVMConfiguration.extendedLocation = ExtendedLocation.fromJson(reader); - } else if ("placement".equals(fieldName)) { - deserializedBulkVMConfiguration.placement = Placement.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBulkVMConfiguration.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedBulkVMConfiguration.properties = BulkActionVMProperties.fromJson(reader); - } else if ("vmExtensions".equals(fieldName)) { - List vmExtensions - = reader.readArray(reader1 -> BulkActionVMExtension.fromJson(reader1)); - deserializedBulkVMConfiguration.vmExtensions = vmExtensions; - } else { - reader.skipChildren(); - } - } - - return deserializedBulkVMConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java deleted file mode 100644 index 590fc0022cf3..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values - * are: **None for Standard storage. ReadOnly for Premium storage**. - */ -public final class CachingTypes extends ExpandableStringEnum { - /** - * Caching type:None. - */ - public static final CachingTypes NONE = fromString("None"); - - /** - * Caching type:ReadOnly. - */ - public static final CachingTypes READ_ONLY = fromString("ReadOnly"); - - /** - * Caching type:ReadWrite. - */ - public static final CachingTypes READ_WRITE = fromString("ReadWrite"); - - /** - * Creates a new instance of CachingTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CachingTypes() { - } - - /** - * Creates or finds a CachingTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding CachingTypes. - */ - public static CachingTypes fromString(String name) { - return fromString(name, CachingTypes.class); - } - - /** - * Gets known CachingTypes values. - * - * @return known CachingTypes values. - */ - public static Collection values() { - return values(CachingTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java deleted file mode 100644 index 522dbded989e..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The parameters of a capacity reservation Profile. - */ -@Fluent -public final class CapacityReservationProfile implements JsonSerializable { - /* - * Specifies the capacity reservation group resource id that should be used for allocating the virtual machine - * provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details. - */ - private SubResource capacityReservationGroup; - - /** - * Creates an instance of CapacityReservationProfile class. - */ - public CapacityReservationProfile() { - } - - /** - * Get the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be - * used for allocating the virtual machine provided enough capacity has been reserved. Please refer to - * https://aka.ms/CapacityReservation for more details. - * - * @return the capacityReservationGroup value. - */ - public SubResource capacityReservationGroup() { - return this.capacityReservationGroup; - } - - /** - * Set the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be - * used for allocating the virtual machine provided enough capacity has been reserved. Please refer to - * https://aka.ms/CapacityReservation for more details. - * - * @param capacityReservationGroup the capacityReservationGroup value to set. - * @return the CapacityReservationProfile object itself. - */ - public CapacityReservationProfile withCapacityReservationGroup(SubResource capacityReservationGroup) { - this.capacityReservationGroup = capacityReservationGroup; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("capacityReservationGroup", this.capacityReservationGroup); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CapacityReservationProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CapacityReservationProfile if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CapacityReservationProfile. - */ - public static CapacityReservationProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CapacityReservationProfile deserializedCapacityReservationProfile = new CapacityReservationProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("capacityReservationGroup".equals(fieldName)) { - deserializedCapacityReservationProfile.capacityReservationGroup = SubResource.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCapacityReservationProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java deleted file mode 100644 index 3af9769b67c0..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner; -import java.util.List; - -/** - * An immutable client-side representation of CreateFlexResourceOperationResponse. - */ -public interface CreateFlexResourceOperationResponse { - /** - * Gets the description property: The description of the operation response. - * - * @return the description value. - */ - String description(); - - /** - * Gets the type property: The type of resources used in the create flex request eg virtual machines. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The location of the create flex request eg westus. - * - * @return the location value. - */ - String location(); - - /** - * Gets the results property: The results from the create flex request if no errors exist. - * - * @return the results value. - */ - List results(); - - /** - * Gets the inner com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner - * object. - * - * @return the inner object. - */ - CreateFlexResourceOperationResponseInner innerModel(); -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java deleted file mode 100644 index 795cd80053e2..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java +++ /dev/null @@ -1,459 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a data disk. - */ -@Fluent -public final class DataDisk implements JsonSerializable { - /* - * Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and - * therefore must be unique for each data disk attached to a VM. - */ - private int lun; - - /* - * The disk name. - */ - private String name; - - /* - * The virtual hard disk. - */ - private VirtualHardDisk vhd; - - /* - * The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the - * virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. - */ - private VirtualHardDisk image; - - /* - * Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: - * None for Standard storage. ReadOnly for Premium storage. - */ - private CachingTypes caching; - - /* - * Specifies whether writeAccelerator should be enabled or disabled on the disk. - */ - private Boolean writeAcceleratorEnabled; - - /* - * Specifies how the virtual machine disk should be created. Possible values are Attach, FromImage, Empty, Copy, - * Restore. - */ - private DiskCreateOptionTypes createOption; - - /* - * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk - * in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value - * cannot be larger than 1023. - */ - private Integer diskSizeGB; - - /* - * The managed disk parameters. - */ - private ManagedDiskParameters managedDisk; - - /* - * The source resource identifier. It can be a snapshot, or disk restore point from which to create a disk. - */ - private ApiEntityReference sourceResource; - - /* - * Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset. - */ - private Boolean toBeDetached; - - /* - * Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment - * from the virtual machine. Supported values: ForceDetach. This feature is still in preview. To force-detach a data - * disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. - */ - private DiskDetachOptionTypes detachOption; - - /* - * Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: Delete, Detach. - * The default value is set to Detach. - */ - private DiskDeleteOptionTypes deleteOption; - - /** - * Creates an instance of DataDisk class. - */ - public DataDisk() { - } - - /** - * Get the lun property: Specifies the logical unit number of the data disk. This value is used to identify data - * disks within the VM and therefore must be unique for each data disk attached to a VM. - * - * @return the lun value. - */ - public int lun() { - return this.lun; - } - - /** - * Set the lun property: Specifies the logical unit number of the data disk. This value is used to identify data - * disks within the VM and therefore must be unique for each data disk attached to a VM. - * - * @param lun the lun value to set. - * @return the DataDisk object itself. - */ - public DataDisk withLun(int lun) { - this.lun = lun; - return this; - } - - /** - * Get the name property: The disk name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The disk name. - * - * @param name the name value to set. - * @return the DataDisk object itself. - */ - public DataDisk withName(String name) { - this.name = name; - return this; - } - - /** - * Get the vhd property: The virtual hard disk. - * - * @return the vhd value. - */ - public VirtualHardDisk vhd() { - return this.vhd; - } - - /** - * Set the vhd property: The virtual hard disk. - * - * @param vhd the vhd value to set. - * @return the DataDisk object itself. - */ - public DataDisk withVhd(VirtualHardDisk vhd) { - this.vhd = vhd; - return this; - } - - /** - * Get the image property: The source user image virtual hard disk. The virtual hard disk will be copied before - * being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * - * @return the image value. - */ - public VirtualHardDisk image() { - return this.image; - } - - /** - * Set the image property: The source user image virtual hard disk. The virtual hard disk will be copied before - * being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * - * @param image the image value to set. - * @return the DataDisk object itself. - */ - public DataDisk withImage(VirtualHardDisk image) { - this.image = image; - return this; - } - - /** - * Get the caching property: Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The - * defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. - * - * @return the caching value. - */ - public CachingTypes caching() { - return this.caching; - } - - /** - * Set the caching property: Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The - * defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. - * - * @param caching the caching value to set. - * @return the DataDisk object itself. - */ - public DataDisk withCaching(CachingTypes caching) { - this.caching = caching; - return this; - } - - /** - * Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the - * disk. - * - * @return the writeAcceleratorEnabled value. - */ - public Boolean writeAcceleratorEnabled() { - return this.writeAcceleratorEnabled; - } - - /** - * Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the - * disk. - * - * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set. - * @return the DataDisk object itself. - */ - public DataDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { - this.writeAcceleratorEnabled = writeAcceleratorEnabled; - return this; - } - - /** - * Get the createOption property: Specifies how the virtual machine disk should be created. Possible values are - * Attach, FromImage, Empty, Copy, Restore. - * - * @return the createOption value. - */ - public DiskCreateOptionTypes createOption() { - return this.createOption; - } - - /** - * Set the createOption property: Specifies how the virtual machine disk should be created. Possible values are - * Attach, FromImage, Empty, Copy, Restore. - * - * @param createOption the createOption value to set. - * @return the DataDisk object itself. - */ - public DataDisk withCreateOption(DiskCreateOptionTypes createOption) { - this.createOption = createOption; - return this; - } - - /** - * Get the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x - * 1024^3 for the disk and the value cannot be larger than 1023. - * - * @return the diskSizeGB value. - */ - public Integer diskSizeGB() { - return this.diskSizeGB; - } - - /** - * Set the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x - * 1024^3 for the disk and the value cannot be larger than 1023. - * - * @param diskSizeGB the diskSizeGB value to set. - * @return the DataDisk object itself. - */ - public DataDisk withDiskSizeGB(Integer diskSizeGB) { - this.diskSizeGB = diskSizeGB; - return this; - } - - /** - * Get the managedDisk property: The managed disk parameters. - * - * @return the managedDisk value. - */ - public ManagedDiskParameters managedDisk() { - return this.managedDisk; - } - - /** - * Set the managedDisk property: The managed disk parameters. - * - * @param managedDisk the managedDisk value to set. - * @return the DataDisk object itself. - */ - public DataDisk withManagedDisk(ManagedDiskParameters managedDisk) { - this.managedDisk = managedDisk; - return this; - } - - /** - * Get the sourceResource property: The source resource identifier. It can be a snapshot, or disk restore point from - * which to create a disk. - * - * @return the sourceResource value. - */ - public ApiEntityReference sourceResource() { - return this.sourceResource; - } - - /** - * Set the sourceResource property: The source resource identifier. It can be a snapshot, or disk restore point from - * which to create a disk. - * - * @param sourceResource the sourceResource value to set. - * @return the DataDisk object itself. - */ - public DataDisk withSourceResource(ApiEntityReference sourceResource) { - this.sourceResource = sourceResource; - return this; - } - - /** - * Get the toBeDetached property: Specifies whether the data disk is in process of detachment from the - * VirtualMachine/VirtualMachineScaleset. - * - * @return the toBeDetached value. - */ - public Boolean toBeDetached() { - return this.toBeDetached; - } - - /** - * Set the toBeDetached property: Specifies whether the data disk is in process of detachment from the - * VirtualMachine/VirtualMachineScaleset. - * - * @param toBeDetached the toBeDetached value to set. - * @return the DataDisk object itself. - */ - public DataDisk withToBeDetached(Boolean toBeDetached) { - this.toBeDetached = toBeDetached; - return this; - } - - /** - * Get the detachOption property: Specifies the detach behavior to be used while detaching a disk or which is - * already in the process of detachment from the virtual machine. Supported values: ForceDetach. This feature is - * still in preview. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: - * 'ForceDetach'. - * - * @return the detachOption value. - */ - public DiskDetachOptionTypes detachOption() { - return this.detachOption; - } - - /** - * Set the detachOption property: Specifies the detach behavior to be used while detaching a disk or which is - * already in the process of detachment from the virtual machine. Supported values: ForceDetach. This feature is - * still in preview. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: - * 'ForceDetach'. - * - * @param detachOption the detachOption value to set. - * @return the DataDisk object itself. - */ - public DataDisk withDetachOption(DiskDetachOptionTypes detachOption) { - this.detachOption = detachOption; - return this; - } - - /** - * Get the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion. - * Possible values are: Delete, Detach. The default value is set to Detach. - * - * @return the deleteOption value. - */ - public DiskDeleteOptionTypes deleteOption() { - return this.deleteOption; - } - - /** - * Set the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion. - * Possible values are: Delete, Detach. The default value is set to Detach. - * - * @param deleteOption the deleteOption value to set. - * @return the DataDisk object itself. - */ - public DataDisk withDeleteOption(DiskDeleteOptionTypes deleteOption) { - this.deleteOption = deleteOption; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("lun", this.lun); - jsonWriter.writeStringField("createOption", this.createOption == null ? null : this.createOption.toString()); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("vhd", this.vhd); - jsonWriter.writeJsonField("image", this.image); - jsonWriter.writeStringField("caching", this.caching == null ? null : this.caching.toString()); - jsonWriter.writeBooleanField("writeAcceleratorEnabled", this.writeAcceleratorEnabled); - jsonWriter.writeNumberField("diskSizeGB", this.diskSizeGB); - jsonWriter.writeJsonField("managedDisk", this.managedDisk); - jsonWriter.writeJsonField("sourceResource", this.sourceResource); - jsonWriter.writeBooleanField("toBeDetached", this.toBeDetached); - jsonWriter.writeStringField("detachOption", this.detachOption == null ? null : this.detachOption.toString()); - jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataDisk from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataDisk if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DataDisk. - */ - public static DataDisk fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataDisk deserializedDataDisk = new DataDisk(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("lun".equals(fieldName)) { - deserializedDataDisk.lun = reader.getInt(); - } else if ("createOption".equals(fieldName)) { - deserializedDataDisk.createOption = DiskCreateOptionTypes.fromString(reader.getString()); - } else if ("name".equals(fieldName)) { - deserializedDataDisk.name = reader.getString(); - } else if ("vhd".equals(fieldName)) { - deserializedDataDisk.vhd = VirtualHardDisk.fromJson(reader); - } else if ("image".equals(fieldName)) { - deserializedDataDisk.image = VirtualHardDisk.fromJson(reader); - } else if ("caching".equals(fieldName)) { - deserializedDataDisk.caching = CachingTypes.fromString(reader.getString()); - } else if ("writeAcceleratorEnabled".equals(fieldName)) { - deserializedDataDisk.writeAcceleratorEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("diskSizeGB".equals(fieldName)) { - deserializedDataDisk.diskSizeGB = reader.getNullable(JsonReader::getInt); - } else if ("managedDisk".equals(fieldName)) { - deserializedDataDisk.managedDisk = ManagedDiskParameters.fromJson(reader); - } else if ("sourceResource".equals(fieldName)) { - deserializedDataDisk.sourceResource = ApiEntityReference.fromJson(reader); - } else if ("toBeDetached".equals(fieldName)) { - deserializedDataDisk.toBeDetached = reader.getNullable(JsonReader::getBoolean); - } else if ("detachOption".equals(fieldName)) { - deserializedDataDisk.detachOption = DiskDetachOptionTypes.fromString(reader.getString()); - } else if ("deleteOption".equals(fieldName)) { - deserializedDataDisk.deleteOption = DiskDeleteOptionTypes.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDataDisk; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java deleted file mode 100644 index c4159c02582f..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specify what happens to the network interface when the VM is deleted. - */ -public final class DeleteOptions extends ExpandableStringEnum { - /** - * Delete network interface when the VM is deleted. - */ - public static final DeleteOptions DELETE = fromString("Delete"); - - /** - * Detach network interface when the VM is deleted. - */ - public static final DeleteOptions DETACH = fromString("Detach"); - - /** - * Creates a new instance of DeleteOptions value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DeleteOptions() { - } - - /** - * Creates or finds a DeleteOptions from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeleteOptions. - */ - public static DeleteOptions fromString(String name) { - return fromString(name, DeleteOptions.class); - } - - /** - * Gets known DeleteOptions values. - * - * @return known DeleteOptions values. - */ - public static Collection values() { - return values(DeleteOptions.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java deleted file mode 100644 index 3262fc2212ee..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the boot diagnostic settings state. Minimum compute api-version: 2015-06-15. - */ -@Fluent -public final class DiagnosticsProfile implements JsonSerializable { - /* - * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM - * status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and - * subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a - * screenshot of the VM from the hypervisor. - */ - private BootDiagnostics bootDiagnostics; - - /** - * Creates an instance of DiagnosticsProfile class. - */ - public DiagnosticsProfile() { - } - - /** - * Get the bootDiagnostics property: Boot Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage - * account is in the same region and subscription as the VM. You can easily view the output of your console log. - * Azure also enables you to see a screenshot of the VM from the hypervisor. - * - * @return the bootDiagnostics value. - */ - public BootDiagnostics bootDiagnostics() { - return this.bootDiagnostics; - } - - /** - * Set the bootDiagnostics property: Boot Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage - * account is in the same region and subscription as the VM. You can easily view the output of your console log. - * Azure also enables you to see a screenshot of the VM from the hypervisor. - * - * @param bootDiagnostics the bootDiagnostics value to set. - * @return the DiagnosticsProfile object itself. - */ - public DiagnosticsProfile withBootDiagnostics(BootDiagnostics bootDiagnostics) { - this.bootDiagnostics = bootDiagnostics; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("bootDiagnostics", this.bootDiagnostics); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticsProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticsProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticsProfile. - */ - public static DiagnosticsProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticsProfile deserializedDiagnosticsProfile = new DiagnosticsProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("bootDiagnostics".equals(fieldName)) { - deserializedDiagnosticsProfile.bootDiagnostics = BootDiagnostics.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticsProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java deleted file mode 100644 index 0c3253c6f6e2..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the ephemeral disk option for operating system disk. - */ -public final class DiffDiskOptions extends ExpandableStringEnum { - /** - * Local Ephemeral disk option: Local. - */ - public static final DiffDiskOptions LOCAL = fromString("Local"); - - /** - * Creates a new instance of DiffDiskOptions value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiffDiskOptions() { - } - - /** - * Creates or finds a DiffDiskOptions from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiffDiskOptions. - */ - public static DiffDiskOptions fromString(String name) { - return fromString(name, DiffDiskOptions.class); - } - - /** - * Gets known DiffDiskOptions values. - * - * @return known DiffDiskOptions values. - */ - public static Collection values() { - return values(DiffDiskOptions.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java deleted file mode 100644 index dc8578158fb3..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to - * choose the location i.e, cache disk, resource disk or nvme disk space for Ephemeral OS disk provisioning. For more - * information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM - * at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at - * https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. Minimum api-version for - * NvmeDisk: 2024-03-01. - */ -public final class DiffDiskPlacement extends ExpandableStringEnum { - /** - * CacheDisk disk placement. - */ - public static final DiffDiskPlacement CACHE_DISK = fromString("CacheDisk"); - - /** - * ResourceDisk disk placement. - */ - public static final DiffDiskPlacement RESOURCE_DISK = fromString("ResourceDisk"); - - /** - * NvmeDisk disk placement. - */ - public static final DiffDiskPlacement NVME_DISK = fromString("NvmeDisk"); - - /** - * Creates a new instance of DiffDiskPlacement value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiffDiskPlacement() { - } - - /** - * Creates or finds a DiffDiskPlacement from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiffDiskPlacement. - */ - public static DiffDiskPlacement fromString(String name) { - return fromString(name, DiffDiskPlacement.class); - } - - /** - * Gets known DiffDiskPlacement values. - * - * @return known DiffDiskPlacement values. - */ - public static Collection values() { - return values(DiffDiskPlacement.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java deleted file mode 100644 index ab3ac92d9d24..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the parameters of ephemeral disk settings that can be specified for operating system disk. Note: The - * ephemeral disk settings can only be specified for managed disk. - */ -@Fluent -public final class DiffDiskSettings implements JsonSerializable { - /* - * Specifies the ephemeral disk settings for operating system disk. - */ - private DiffDiskOptions option; - - /* - * Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, - * NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or - * NvmeDisk is used. Minimum api-version for NvmeDisk: 2024-03-01. - */ - private DiffDiskPlacement placement; - - /** - * Creates an instance of DiffDiskSettings class. - */ - public DiffDiskSettings() { - } - - /** - * Get the option property: Specifies the ephemeral disk settings for operating system disk. - * - * @return the option value. - */ - public DiffDiskOptions option() { - return this.option; - } - - /** - * Set the option property: Specifies the ephemeral disk settings for operating system disk. - * - * @param option the option value to set. - * @return the DiffDiskSettings object itself. - */ - public DiffDiskSettings withOption(DiffDiskOptions option) { - this.option = option; - return this; - } - - /** - * Get the placement property: Specifies the ephemeral disk placement for operating system disk. Possible values - * are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM - * size otherwise ResourceDisk or NvmeDisk is used. Minimum api-version for NvmeDisk: 2024-03-01. - * - * @return the placement value. - */ - public DiffDiskPlacement placement() { - return this.placement; - } - - /** - * Set the placement property: Specifies the ephemeral disk placement for operating system disk. Possible values - * are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM - * size otherwise ResourceDisk or NvmeDisk is used. Minimum api-version for NvmeDisk: 2024-03-01. - * - * @param placement the placement value to set. - * @return the DiffDiskSettings object itself. - */ - public DiffDiskSettings withPlacement(DiffDiskPlacement placement) { - this.placement = placement; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("option", this.option == null ? null : this.option.toString()); - jsonWriter.writeStringField("placement", this.placement == null ? null : this.placement.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiffDiskSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiffDiskSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiffDiskSettings. - */ - public static DiffDiskSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiffDiskSettings deserializedDiffDiskSettings = new DiffDiskSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("option".equals(fieldName)) { - deserializedDiffDiskSettings.option = DiffDiskOptions.fromString(reader.getString()); - } else if ("placement".equals(fieldName)) { - deserializedDiffDiskSettings.placement = DiffDiskPlacement.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDiffDiskSettings; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java deleted file mode 100644 index b38e3af74da0..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported - * for virtual machines whose operating system disk and VM sku supports Generation 2 - * (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability - * returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 - * (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more information about Disk Controller Types - * supported please refer to https://aka.ms/azure-diskcontrollertypes. - */ -public final class DiskControllerTypes extends ExpandableStringEnum { - /** - * SCSI disk controller type. - */ - public static final DiskControllerTypes SCSI = fromString("SCSI"); - - /** - * NVMe disk controller type. - */ - public static final DiskControllerTypes NVME = fromString("NVMe"); - - /** - * Creates a new instance of DiskControllerTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskControllerTypes() { - } - - /** - * Creates or finds a DiskControllerTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskControllerTypes. - */ - public static DiskControllerTypes fromString(String name) { - return fromString(name, DiskControllerTypes.class); - } - - /** - * Gets known DiskControllerTypes values. - * - * @return known DiskControllerTypes values. - */ - public static Collection values() { - return values(DiskControllerTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java deleted file mode 100644 index f352658cdcad..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies how the virtual machine disk should be created. Possible values are **Attach:** This value is used when you - * are using a specialized disk to create the virtual machine. **FromImage:** This value is used when you are using an - * image to create the virtual machine. If you are using a platform image, you should also use the imageReference - * element described above. If you are using a marketplace image, you should also use the plan element previously - * described. **Empty:** This value is used when creating an empty data disk. **Copy:** This value is used to create a - * data disk from a snapshot or another disk. **Restore:** This value is used to create a data disk from a disk restore - * point. - */ -public final class DiskCreateOptionTypes extends ExpandableStringEnum { - /** - * Create disk FromImage. - */ - public static final DiskCreateOptionTypes FROM_IMAGE = fromString("FromImage"); - - /** - * Empty value. - */ - public static final DiskCreateOptionTypes EMPTY = fromString("Empty"); - - /** - * Create disk by Attach. - */ - public static final DiskCreateOptionTypes ATTACH = fromString("Attach"); - - /** - * Create disk by Copy. - */ - public static final DiskCreateOptionTypes COPY = fromString("Copy"); - - /** - * Create disk by Restore. - */ - public static final DiskCreateOptionTypes RESTORE = fromString("Restore"); - - /** - * Creates a new instance of DiskCreateOptionTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskCreateOptionTypes() { - } - - /** - * Creates or finds a DiskCreateOptionTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskCreateOptionTypes. - */ - public static DiskCreateOptionTypes fromString(String name) { - return fromString(name, DiskCreateOptionTypes.class); - } - - /** - * Gets known DiskCreateOptionTypes values. - * - * @return known DiskCreateOptionTypes values. - */ - public static Collection values() { - return values(DiskCreateOptionTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java deleted file mode 100644 index 1a714071ccfd..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the behavior of the managed disk when the VM gets deleted, for example whether the managed disk is deleted - * or detached. Supported values are: **Delete.** If this value is used, the managed disk is deleted when VM gets - * deleted. **Detach.** If this value is used, the managed disk is retained after VM gets deleted. Minimum api-version: - * 2021-03-01. - */ -public final class DiskDeleteOptionTypes extends ExpandableStringEnum { - /** - * Delete the disk upon VM deletion. - */ - public static final DiskDeleteOptionTypes DELETE = fromString("Delete"); - - /** - * Detach the disk upon VM deletion. - */ - public static final DiskDeleteOptionTypes DETACH = fromString("Detach"); - - /** - * Creates a new instance of DiskDeleteOptionTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskDeleteOptionTypes() { - } - - /** - * Creates or finds a DiskDeleteOptionTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskDeleteOptionTypes. - */ - public static DiskDeleteOptionTypes fromString(String name) { - return fromString(name, DiskDeleteOptionTypes.class); - } - - /** - * Gets known DiskDeleteOptionTypes values. - * - * @return known DiskDeleteOptionTypes values. - */ - public static Collection values() { - return values(DiskDeleteOptionTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java deleted file mode 100644 index e3fde217f364..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from - * the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for - * managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure - * from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach - * the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature - * is still in preview**. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: - * 'ForceDetach'. - */ -public final class DiskDetachOptionTypes extends ExpandableStringEnum { - /** - * ForceDetach the disk. - */ - public static final DiskDetachOptionTypes FORCE_DETACH = fromString("ForceDetach"); - - /** - * Creates a new instance of DiskDetachOptionTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskDetachOptionTypes() { - } - - /** - * Creates or finds a DiskDetachOptionTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskDetachOptionTypes. - */ - public static DiskDetachOptionTypes fromString(String name) { - return fromString(name, DiskDetachOptionTypes.class); - } - - /** - * Gets known DiskDetachOptionTypes values. - * - * @return known DiskDetachOptionTypes values. - */ - public static Collection values() { - return values(DiskDetachOptionTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java deleted file mode 100644 index 06dd0e471d71..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** - * The disk encryption set resource id can only be specified for managed disk. Please refer - * https://aka.ms/mdssewithcmkoverview for more details. - */ -@Fluent -public final class DiskEncryptionSetParameters extends SubResource { - /** - * Creates an instance of DiskEncryptionSetParameters class. - */ - public DiskEncryptionSetParameters() { - } - - /** - * {@inheritDoc} - */ - @Override - public DiskEncryptionSetParameters withId(String id) { - super.withId(id); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskEncryptionSetParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskEncryptionSetParameters if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskEncryptionSetParameters. - */ - public static DiskEncryptionSetParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskEncryptionSetParameters deserializedDiskEncryptionSetParameters = new DiskEncryptionSetParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDiskEncryptionSetParameters.withId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskEncryptionSetParameters; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java deleted file mode 100644 index 2606a03b6321..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a Encryption Settings for a Disk. - */ -@Fluent -public final class DiskEncryptionSettings implements JsonSerializable { - /* - * Specifies the location of the disk encryption key, which is a Key Vault Secret. - */ - private KeyVaultSecretReference diskEncryptionKey; - - /* - * Specifies the location of the key encryption key in Key Vault. - */ - private KeyVaultKeyReference keyEncryptionKey; - - /* - * Specifies whether disk encryption should be enabled on the virtual machine. - */ - private Boolean enabled; - - /** - * Creates an instance of DiskEncryptionSettings class. - */ - public DiskEncryptionSettings() { - } - - /** - * Get the diskEncryptionKey property: Specifies the location of the disk encryption key, which is a Key Vault - * Secret. - * - * @return the diskEncryptionKey value. - */ - public KeyVaultSecretReference diskEncryptionKey() { - return this.diskEncryptionKey; - } - - /** - * Set the diskEncryptionKey property: Specifies the location of the disk encryption key, which is a Key Vault - * Secret. - * - * @param diskEncryptionKey the diskEncryptionKey value to set. - * @return the DiskEncryptionSettings object itself. - */ - public DiskEncryptionSettings withDiskEncryptionKey(KeyVaultSecretReference diskEncryptionKey) { - this.diskEncryptionKey = diskEncryptionKey; - return this; - } - - /** - * Get the keyEncryptionKey property: Specifies the location of the key encryption key in Key Vault. - * - * @return the keyEncryptionKey value. - */ - public KeyVaultKeyReference keyEncryptionKey() { - return this.keyEncryptionKey; - } - - /** - * Set the keyEncryptionKey property: Specifies the location of the key encryption key in Key Vault. - * - * @param keyEncryptionKey the keyEncryptionKey value to set. - * @return the DiskEncryptionSettings object itself. - */ - public DiskEncryptionSettings withKeyEncryptionKey(KeyVaultKeyReference keyEncryptionKey) { - this.keyEncryptionKey = keyEncryptionKey; - return this; - } - - /** - * Get the enabled property: Specifies whether disk encryption should be enabled on the virtual machine. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Specifies whether disk encryption should be enabled on the virtual machine. - * - * @param enabled the enabled value to set. - * @return the DiskEncryptionSettings object itself. - */ - public DiskEncryptionSettings withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("diskEncryptionKey", this.diskEncryptionKey); - jsonWriter.writeJsonField("keyEncryptionKey", this.keyEncryptionKey); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskEncryptionSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskEncryptionSettings if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskEncryptionSettings. - */ - public static DiskEncryptionSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskEncryptionSettings deserializedDiskEncryptionSettings = new DiskEncryptionSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskEncryptionKey".equals(fieldName)) { - deserializedDiskEncryptionSettings.diskEncryptionKey = KeyVaultSecretReference.fromJson(reader); - } else if ("keyEncryptionKey".equals(fieldName)) { - deserializedDiskEncryptionSettings.keyEncryptionKey = KeyVaultKeyReference.fromJson(reader); - } else if ("enabled".equals(fieldName)) { - deserializedDiskEncryptionSettings.enabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskEncryptionSettings; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java deleted file mode 100644 index ce5e89c044ce..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The distribution strategy for zone allocation. - */ -public final class DistributionStrategy extends ExpandableStringEnum { - /** - * Platform attempts to place as many VMs as possible in a single zone, falls back to multiple zones if needed. - */ - public static final DistributionStrategy BEST_EFFORT_SINGLE_ZONE = fromString("BestEffortSingleZone"); - - /** - * Platform uses customer-provided zone rankings to allocate VMs. - */ - public static final DistributionStrategy PRIORITIZED = fromString("Prioritized"); - - /** - * Platform attempts to evenly distribute VMs across all available zones with best effort. - */ - public static final DistributionStrategy BEST_EFFORT_BALANCED = fromString("BestEffortBalanced"); - - /** - * Platform must evenly distribute VMs across zones, request is rejected if exact balance cannot be achieved. - */ - public static final DistributionStrategy STRICT_BALANCED = fromString("StrictBalanced"); - - /** - * Creates a new instance of DistributionStrategy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DistributionStrategy() { - } - - /** - * Creates or finds a DistributionStrategy from its string representation. - * - * @param name a name to look for. - * @return the corresponding DistributionStrategy. - */ - public static DistributionStrategy fromString(String name) { - return fromString(name, DistributionStrategy.class); - } - - /** - * Gets known DistributionStrategy values. - * - * @return known DistributionStrategy values. - */ - public static Collection values() { - return values(DistributionStrategy.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java deleted file mode 100644 index 3bc6eafa2ed3..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy - * from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will - * be created. - */ -public final class DomainNameLabelScopeTypes extends ExpandableStringEnum { - /** - * TenantReuse scope type. - */ - public static final DomainNameLabelScopeTypes TENANT_REUSE = fromString("TenantReuse"); - - /** - * SubscriptionReuse scope type. - */ - public static final DomainNameLabelScopeTypes SUBSCRIPTION_REUSE = fromString("SubscriptionReuse"); - - /** - * ResourceGroupReuse scope type. - */ - public static final DomainNameLabelScopeTypes RESOURCE_GROUP_REUSE = fromString("ResourceGroupReuse"); - - /** - * NoReuse scope type. - */ - public static final DomainNameLabelScopeTypes NO_REUSE = fromString("NoReuse"); - - /** - * Creates a new instance of DomainNameLabelScopeTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DomainNameLabelScopeTypes() { - } - - /** - * Creates or finds a DomainNameLabelScopeTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding DomainNameLabelScopeTypes. - */ - public static DomainNameLabelScopeTypes fromString(String name) { - return fromString(name, DomainNameLabelScopeTypes.class); - } - - /** - * Gets known DomainNameLabelScopeTypes values. - * - * @return known DomainNameLabelScopeTypes values. - */ - public static Collection values() { - return values(DomainNameLabelScopeTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java deleted file mode 100644 index 14cc7845ba19..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the Managed Identity used by ADE to get access token for keyvault operations. - */ -@Fluent -public final class EncryptionIdentity implements JsonSerializable { - /* - * Specifies ARM Resource ID of one of the user identities associated with the VM. - */ - private String userAssignedIdentityResourceId; - - /** - * Creates an instance of EncryptionIdentity class. - */ - public EncryptionIdentity() { - } - - /** - * Get the userAssignedIdentityResourceId property: Specifies ARM Resource ID of one of the user identities - * associated with the VM. - * - * @return the userAssignedIdentityResourceId value. - */ - public String userAssignedIdentityResourceId() { - return this.userAssignedIdentityResourceId; - } - - /** - * Set the userAssignedIdentityResourceId property: Specifies ARM Resource ID of one of the user identities - * associated with the VM. - * - * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. - * @return the EncryptionIdentity object itself. - */ - public EncryptionIdentity withUserAssignedIdentityResourceId(String userAssignedIdentityResourceId) { - this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("userAssignedIdentityResourceId", this.userAssignedIdentityResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionIdentity if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EncryptionIdentity. - */ - public static EncryptionIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionIdentity deserializedEncryptionIdentity = new EncryptionIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userAssignedIdentityResourceId".equals(fieldName)) { - deserializedEncryptionIdentity.userAssignedIdentityResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionIdentity; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java deleted file mode 100644 index 3a973fa9504d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies eventGridAndResourceGraph related Scheduled Event related configurations. - */ -@Fluent -public final class EventGridAndResourceGraph implements JsonSerializable { - /* - * Specifies if event grid and resource graph is enabled for Scheduled event related configurations. - */ - private Boolean enable; - - /* - * Specifies the api-version to determine which Scheduled Events configuration schema version will be delivered. - */ - private String scheduledEventsApiVersion; - - /** - * Creates an instance of EventGridAndResourceGraph class. - */ - public EventGridAndResourceGraph() { - } - - /** - * Get the enable property: Specifies if event grid and resource graph is enabled for Scheduled event related - * configurations. - * - * @return the enable value. - */ - public Boolean enable() { - return this.enable; - } - - /** - * Set the enable property: Specifies if event grid and resource graph is enabled for Scheduled event related - * configurations. - * - * @param enable the enable value to set. - * @return the EventGridAndResourceGraph object itself. - */ - public EventGridAndResourceGraph withEnable(Boolean enable) { - this.enable = enable; - return this; - } - - /** - * Get the scheduledEventsApiVersion property: Specifies the api-version to determine which Scheduled Events - * configuration schema version will be delivered. - * - * @return the scheduledEventsApiVersion value. - */ - public String scheduledEventsApiVersion() { - return this.scheduledEventsApiVersion; - } - - /** - * Set the scheduledEventsApiVersion property: Specifies the api-version to determine which Scheduled Events - * configuration schema version will be delivered. - * - * @param scheduledEventsApiVersion the scheduledEventsApiVersion value to set. - * @return the EventGridAndResourceGraph object itself. - */ - public EventGridAndResourceGraph withScheduledEventsApiVersion(String scheduledEventsApiVersion) { - this.scheduledEventsApiVersion = scheduledEventsApiVersion; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enable", this.enable); - jsonWriter.writeStringField("scheduledEventsApiVersion", this.scheduledEventsApiVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventGridAndResourceGraph from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventGridAndResourceGraph if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EventGridAndResourceGraph. - */ - public static EventGridAndResourceGraph fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventGridAndResourceGraph deserializedEventGridAndResourceGraph = new EventGridAndResourceGraph(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enable".equals(fieldName)) { - deserializedEventGridAndResourceGraph.enable = reader.getNullable(JsonReader::getBoolean); - } else if ("scheduledEventsApiVersion".equals(fieldName)) { - deserializedEventGridAndResourceGraph.scheduledEventsApiVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEventGridAndResourceGraph; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexRequest.java deleted file mode 100644 index fc70c6a83800..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexRequest.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ExecuteCreateFlexRequest request for executeCreateFlex operations. - */ -@Fluent -public final class ExecuteCreateFlexRequest implements JsonSerializable { - /* - * Resource creation payload with flex properties - */ - private ResourceProvisionFlexPayload resourceConfigParameters; - - /* - * The execution parameters for the request - */ - private ExecutionParameters executionParameters; - - /* - * Correlationid item - */ - private String correlationid; - - /** - * Creates an instance of ExecuteCreateFlexRequest class. - */ - public ExecuteCreateFlexRequest() { - } - - /** - * Get the resourceConfigParameters property: Resource creation payload with flex properties. - * - * @return the resourceConfigParameters value. - */ - public ResourceProvisionFlexPayload resourceConfigParameters() { - return this.resourceConfigParameters; - } - - /** - * Set the resourceConfigParameters property: Resource creation payload with flex properties. - * - * @param resourceConfigParameters the resourceConfigParameters value to set. - * @return the ExecuteCreateFlexRequest object itself. - */ - public ExecuteCreateFlexRequest - withResourceConfigParameters(ResourceProvisionFlexPayload resourceConfigParameters) { - this.resourceConfigParameters = resourceConfigParameters; - return this; - } - - /** - * Get the executionParameters property: The execution parameters for the request. - * - * @return the executionParameters value. - */ - public ExecutionParameters executionParameters() { - return this.executionParameters; - } - - /** - * Set the executionParameters property: The execution parameters for the request. - * - * @param executionParameters the executionParameters value to set. - * @return the ExecuteCreateFlexRequest object itself. - */ - public ExecuteCreateFlexRequest withExecutionParameters(ExecutionParameters executionParameters) { - this.executionParameters = executionParameters; - return this; - } - - /** - * Get the correlationid property: Correlationid item. - * - * @return the correlationid value. - */ - public String correlationid() { - return this.correlationid; - } - - /** - * Set the correlationid property: Correlationid item. - * - * @param correlationid the correlationid value to set. - * @return the ExecuteCreateFlexRequest object itself. - */ - public ExecuteCreateFlexRequest withCorrelationid(String correlationid) { - this.correlationid = correlationid; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resourceConfigParameters", this.resourceConfigParameters); - jsonWriter.writeJsonField("executionParameters", this.executionParameters); - jsonWriter.writeStringField("correlationid", this.correlationid); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExecuteCreateFlexRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExecuteCreateFlexRequest if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ExecuteCreateFlexRequest. - */ - public static ExecuteCreateFlexRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExecuteCreateFlexRequest deserializedExecuteCreateFlexRequest = new ExecuteCreateFlexRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceConfigParameters".equals(fieldName)) { - deserializedExecuteCreateFlexRequest.resourceConfigParameters - = ResourceProvisionFlexPayload.fromJson(reader); - } else if ("executionParameters".equals(fieldName)) { - deserializedExecuteCreateFlexRequest.executionParameters = ExecutionParameters.fromJson(reader); - } else if ("correlationid".equals(fieldName)) { - deserializedExecuteCreateFlexRequest.correlationid = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExecuteCreateFlexRequest; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java deleted file mode 100644 index ecb791991b8c..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The complex type of the extended location. - */ -@Fluent -public final class ExtendedLocation implements JsonSerializable { - /* - * The name of the extended location. - */ - private String name; - - /* - * The type of the extended location. - */ - private ExtendedLocationType type; - - /** - * Creates an instance of ExtendedLocation class. - */ - public ExtendedLocation() { - } - - /** - * Get the name property: The name of the extended location. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the extended location. - * - * @param name the name value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The type of the extended location. - * - * @return the type value. - */ - public ExtendedLocationType type() { - return this.type; - } - - /** - * Set the type property: The type of the extended location. - * - * @param type the type value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withType(ExtendedLocationType type) { - this.type = type; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExtendedLocation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExtendedLocation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ExtendedLocation. - */ - public static ExtendedLocation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExtendedLocation deserializedExtendedLocation = new ExtendedLocation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedExtendedLocation.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedExtendedLocation.type = ExtendedLocationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedExtendedLocation; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java deleted file mode 100644 index 0cc0b3dfdc5c..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The supported ExtendedLocation types. - */ -public final class ExtendedLocationType extends ExpandableStringEnum { - /** - * Azure Edge Zones location type. - */ - public static final ExtendedLocationType EDGE_ZONE = fromString("EdgeZone"); - - /** - * Azure Custom Locations type. - */ - public static final ExtendedLocationType CUSTOM_LOCATION = fromString("CustomLocation"); - - /** - * Creates a new instance of ExtendedLocationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ExtendedLocationType() { - } - - /** - * Creates or finds a ExtendedLocationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExtendedLocationType. - */ - public static ExtendedLocationType fromString(String name) { - return fromString(name, ExtendedLocationType.class); - } - - /** - * Gets known ExtendedLocationType values. - * - * @return known ExtendedLocationType values. - */ - public static Collection values() { - return values(ExtendedLocationType.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java deleted file mode 100644 index 2bec923e4ef4..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the fallback operation that was performed. - */ -@Immutable -public final class FallbackOperationInfo implements JsonSerializable { - /* - * The last operation type that was performed as a fallback - */ - private ResourceOperationType lastOpType; - - /* - * The status of the fallback operation - */ - private String status; - - /* - * The error code if the fallback operation failed - */ - private ResourceOperationError error; - - /** - * Creates an instance of FallbackOperationInfo class. - */ - private FallbackOperationInfo() { - } - - /** - * Get the lastOpType property: The last operation type that was performed as a fallback. - * - * @return the lastOpType value. - */ - public ResourceOperationType lastOpType() { - return this.lastOpType; - } - - /** - * Get the status property: The status of the fallback operation. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the error property: The error code if the fallback operation failed. - * - * @return the error value. - */ - public ResourceOperationError error() { - return this.error; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("lastOpType", this.lastOpType == null ? null : this.lastOpType.toString()); - jsonWriter.writeStringField("status", this.status); - jsonWriter.writeJsonField("error", this.error); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FallbackOperationInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FallbackOperationInfo if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FallbackOperationInfo. - */ - public static FallbackOperationInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FallbackOperationInfo deserializedFallbackOperationInfo = new FallbackOperationInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("lastOpType".equals(fieldName)) { - deserializedFallbackOperationInfo.lastOpType = ResourceOperationType.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedFallbackOperationInfo.status = reader.getString(); - } else if ("error".equals(fieldName)) { - deserializedFallbackOperationInfo.error = ResourceOperationError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFallbackOperationInfo; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java deleted file mode 100644 index 4b1cec8ee886..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The flex properties for flexible VM creation. - */ -@Fluent -public final class FlexProperties implements JsonSerializable { - /* - * The list of VM size profiles to use for flex creation - */ - private List vmSizeProfiles; - - /* - * The operating system type for the VMs - */ - private OsType osType; - - /* - * The priority profile for VM allocation - */ - private PriorityProfile priorityProfile; - - /* - * The zone allocation policy for distributing VMs across availability zones - */ - private ZoneAllocationPolicy zoneAllocationPolicy; - - /** - * Creates an instance of FlexProperties class. - */ - public FlexProperties() { - } - - /** - * Get the vmSizeProfiles property: The list of VM size profiles to use for flex creation. - * - * @return the vmSizeProfiles value. - */ - public List vmSizeProfiles() { - return this.vmSizeProfiles; - } - - /** - * Set the vmSizeProfiles property: The list of VM size profiles to use for flex creation. - * - * @param vmSizeProfiles the vmSizeProfiles value to set. - * @return the FlexProperties object itself. - */ - public FlexProperties withVmSizeProfiles(List vmSizeProfiles) { - this.vmSizeProfiles = vmSizeProfiles; - return this; - } - - /** - * Get the osType property: The operating system type for the VMs. - * - * @return the osType value. - */ - public OsType osType() { - return this.osType; - } - - /** - * Set the osType property: The operating system type for the VMs. - * - * @param osType the osType value to set. - * @return the FlexProperties object itself. - */ - public FlexProperties withOsType(OsType osType) { - this.osType = osType; - return this; - } - - /** - * Get the priorityProfile property: The priority profile for VM allocation. - * - * @return the priorityProfile value. - */ - public PriorityProfile priorityProfile() { - return this.priorityProfile; - } - - /** - * Set the priorityProfile property: The priority profile for VM allocation. - * - * @param priorityProfile the priorityProfile value to set. - * @return the FlexProperties object itself. - */ - public FlexProperties withPriorityProfile(PriorityProfile priorityProfile) { - this.priorityProfile = priorityProfile; - return this; - } - - /** - * Get the zoneAllocationPolicy property: The zone allocation policy for distributing VMs across availability zones. - * - * @return the zoneAllocationPolicy value. - */ - public ZoneAllocationPolicy zoneAllocationPolicy() { - return this.zoneAllocationPolicy; - } - - /** - * Set the zoneAllocationPolicy property: The zone allocation policy for distributing VMs across availability zones. - * - * @param zoneAllocationPolicy the zoneAllocationPolicy value to set. - * @return the FlexProperties object itself. - */ - public FlexProperties withZoneAllocationPolicy(ZoneAllocationPolicy zoneAllocationPolicy) { - this.zoneAllocationPolicy = zoneAllocationPolicy; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("vmSizeProfiles", this.vmSizeProfiles, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeJsonField("priorityProfile", this.priorityProfile); - jsonWriter.writeJsonField("zoneAllocationPolicy", this.zoneAllocationPolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlexProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlexProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FlexProperties. - */ - public static FlexProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlexProperties deserializedFlexProperties = new FlexProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vmSizeProfiles".equals(fieldName)) { - List vmSizeProfiles = reader.readArray(reader1 -> VmSizeProfile.fromJson(reader1)); - deserializedFlexProperties.vmSizeProfiles = vmSizeProfiles; - } else if ("osType".equals(fieldName)) { - deserializedFlexProperties.osType = OsType.fromString(reader.getString()); - } else if ("priorityProfile".equals(fieldName)) { - deserializedFlexProperties.priorityProfile = PriorityProfile.fromJson(reader); - } else if ("zoneAllocationPolicy".equals(fieldName)) { - deserializedFlexProperties.zoneAllocationPolicy = ZoneAllocationPolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFlexProperties; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HardwareProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HardwareProfile.java deleted file mode 100644 index d6ab5f732644..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HardwareProfile.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the hardware profile for the virtual machine. - */ -@Fluent -public final class HardwareProfile implements JsonSerializable { - /* - * Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by - * December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all - * available virtual machine sizes in an availability - * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available - * virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all - * available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information - * about virtual machine sizes, see [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and - * availability set. - */ - private String vmSize; - - /* - * Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This - * feature is still in preview mode and is not supported for VirtualMachineScaleSet. Please follow the instructions - * in [VM Customization](https://aka.ms/vmcustomization) for more details. - */ - private VmSizeProperties vmSizeProperties; - - /** - * Creates an instance of HardwareProfile class. - */ - public HardwareProfile() { - } - - /** - * Get the vmSize property: Specifies the size of the virtual machine. The enum data type is currently deprecated - * and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these - * APIs: [List all available virtual machine sizes in an availability - * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available - * virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all - * available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information - * about virtual machine sizes, see [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and - * availability set. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: Specifies the size of the virtual machine. The enum data type is currently deprecated - * and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these - * APIs: [List all available virtual machine sizes in an availability - * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available - * virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all - * available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information - * about virtual machine sizes, see [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and - * availability set. - * - * @param vmSize the vmSize value to set. - * @return the HardwareProfile object itself. - */ - public HardwareProfile withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the vmSizeProperties property: Specifies the properties for customizing the size of the virtual machine. - * Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for - * VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for - * more details. - * - * @return the vmSizeProperties value. - */ - public VmSizeProperties vmSizeProperties() { - return this.vmSizeProperties; - } - - /** - * Set the vmSizeProperties property: Specifies the properties for customizing the size of the virtual machine. - * Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for - * VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for - * more details. - * - * @param vmSizeProperties the vmSizeProperties value to set. - * @return the HardwareProfile object itself. - */ - public HardwareProfile withVmSizeProperties(VmSizeProperties vmSizeProperties) { - this.vmSizeProperties = vmSizeProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("vmSize", this.vmSize); - jsonWriter.writeJsonField("vmSizeProperties", this.vmSizeProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HardwareProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HardwareProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HardwareProfile. - */ - public static HardwareProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HardwareProfile deserializedHardwareProfile = new HardwareProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vmSize".equals(fieldName)) { - deserializedHardwareProfile.vmSize = reader.getString(); - } else if ("vmSizeProperties".equals(fieldName)) { - deserializedHardwareProfile.vmSizeProperties = VmSizeProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHardwareProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java deleted file mode 100644 index fac5e3f6c2f9..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies particular host endpoint settings. - */ -@Fluent -public final class HostEndpointSettings implements JsonSerializable { - /* - * Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, - * including emitting access denial entries in the logs but it does not actually deny any requests to host - * endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of - * operation. - */ - private Modes mode; - - /* - * Specifies the InVMAccessControlProfileVersion resource id in the format of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{ - * galleryName}/inVMAccessControlProfiles/{profile}/versions/{version} - */ - private String inVMAccessControlProfileReferenceId; - - /** - * Creates an instance of HostEndpointSettings class. - */ - public HostEndpointSettings() { - } - - /** - * Get the mode property: Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the - * access control policy, including emitting access denial entries in the logs but it does not actually deny any - * requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended - * mode of operation. - * - * @return the mode value. - */ - public Modes mode() { - return this.mode; - } - - /** - * Set the mode property: Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the - * access control policy, including emitting access denial entries in the logs but it does not actually deny any - * requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended - * mode of operation. - * - * @param mode the mode value to set. - * @return the HostEndpointSettings object itself. - */ - public HostEndpointSettings withMode(Modes mode) { - this.mode = mode; - return this; - } - - /** - * Get the inVMAccessControlProfileReferenceId property: Specifies the InVMAccessControlProfileVersion resource id - * in the format of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. - * - * @return the inVMAccessControlProfileReferenceId value. - */ - public String inVMAccessControlProfileReferenceId() { - return this.inVMAccessControlProfileReferenceId; - } - - /** - * Set the inVMAccessControlProfileReferenceId property: Specifies the InVMAccessControlProfileVersion resource id - * in the format of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. - * - * @param inVMAccessControlProfileReferenceId the inVMAccessControlProfileReferenceId value to set. - * @return the HostEndpointSettings object itself. - */ - public HostEndpointSettings withInVMAccessControlProfileReferenceId(String inVMAccessControlProfileReferenceId) { - this.inVMAccessControlProfileReferenceId = inVMAccessControlProfileReferenceId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeStringField("inVMAccessControlProfileReferenceId", this.inVMAccessControlProfileReferenceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HostEndpointSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HostEndpointSettings if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the HostEndpointSettings. - */ - public static HostEndpointSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HostEndpointSettings deserializedHostEndpointSettings = new HostEndpointSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedHostEndpointSettings.mode = Modes.fromString(reader.getString()); - } else if ("inVMAccessControlProfileReferenceId".equals(fieldName)) { - deserializedHostEndpointSettings.inVMAccessControlProfileReferenceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHostEndpointSettings; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java deleted file mode 100644 index 5eb3cce32fbc..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Available from compute Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or - * IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - */ -public final class IPVersions extends ExpandableStringEnum { - /** - * IPv4 version. - */ - public static final IPVersions IPV4 = fromString("IPv4"); - - /** - * IPv6 version. - */ - public static final IPVersions IPV6 = fromString("IPv6"); - - /** - * Creates a new instance of IPVersions value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IPVersions() { - } - - /** - * Creates or finds a IPVersions from its string representation. - * - * @param name a name to look for. - * @return the corresponding IPVersions. - */ - public static IPVersions fromString(String name) { - return fromString(name, IPVersions.class); - } - - /** - * Gets known IPVersions values. - * - * @return known IPVersions values. - */ - public static Collection values() { - return values(IPVersions.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java deleted file mode 100644 index e224930fbe5d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies information about the image to use. You can specify information about platform images, marketplace images, - * or virtual machine images. This element is required when you want to use a platform image, marketplace image, or - * virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can - * only be set when you create the scale set. - */ -@Fluent -public final class ImageReference extends SubResource { - /* - * The image publisher. - */ - private String publisher; - - /* - * Specifies the offer of the platform image or marketplace image used to create the virtual machine. - */ - private String offer; - - /* - * The image SKU. - */ - private String sku; - - /* - * Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed - * formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use - * the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not - * automatically update after deploy time even if a new version becomes available. Please do not use field 'version' - * for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version - * of gallery image, just set - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{ - * galleryName}/images/{imageName}' in the 'id' field without version input. - */ - private String version; - - /* - * Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET - * call. - */ - private String sharedGalleryImageId; - - /* - * Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery - * image GET call. - */ - private String communityGalleryImageId; - - /** - * Creates an instance of ImageReference class. - */ - public ImageReference() { - } - - /** - * Get the publisher property: The image publisher. - * - * @return the publisher value. - */ - public String publisher() { - return this.publisher; - } - - /** - * Set the publisher property: The image publisher. - * - * @param publisher the publisher value to set. - * @return the ImageReference object itself. - */ - public ImageReference withPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - /** - * Get the offer property: Specifies the offer of the platform image or marketplace image used to create the virtual - * machine. - * - * @return the offer value. - */ - public String offer() { - return this.offer; - } - - /** - * Set the offer property: Specifies the offer of the platform image or marketplace image used to create the virtual - * machine. - * - * @param offer the offer value to set. - * @return the ImageReference object itself. - */ - public ImageReference withOffer(String offer) { - this.offer = offer; - return this; - } - - /** - * Get the sku property: The image SKU. - * - * @return the sku value. - */ - public String sku() { - return this.sku; - } - - /** - * Set the sku property: The image SKU. - * - * @param sku the sku value to set. - * @return the ImageReference object itself. - */ - public ImageReference withSku(String sku) { - this.sku = sku; - return this; - } - - /** - * Get the version property: Specifies the version of the platform image or marketplace image used to create the - * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - * numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use - * 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. - * Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for - * deployment, to use 'latest' version of gallery image, just set - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' - * in the 'id' field without version input. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Specifies the version of the platform image or marketplace image used to create the - * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal - * numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use - * 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. - * Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for - * deployment, to use 'latest' version of gallery image, just set - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' - * in the 'id' field without version input. - * - * @param version the version value to set. - * @return the ImageReference object itself. - */ - public ImageReference withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the sharedGalleryImageId property: Specified the shared gallery image unique id for vm deployment. This can - * be fetched from shared gallery image GET call. - * - * @return the sharedGalleryImageId value. - */ - public String sharedGalleryImageId() { - return this.sharedGalleryImageId; - } - - /** - * Set the sharedGalleryImageId property: Specified the shared gallery image unique id for vm deployment. This can - * be fetched from shared gallery image GET call. - * - * @param sharedGalleryImageId the sharedGalleryImageId value to set. - * @return the ImageReference object itself. - */ - public ImageReference withSharedGalleryImageId(String sharedGalleryImageId) { - this.sharedGalleryImageId = sharedGalleryImageId; - return this; - } - - /** - * Get the communityGalleryImageId property: Specified the community gallery image unique id for vm deployment. This - * can be fetched from community gallery image GET call. - * - * @return the communityGalleryImageId value. - */ - public String communityGalleryImageId() { - return this.communityGalleryImageId; - } - - /** - * Set the communityGalleryImageId property: Specified the community gallery image unique id for vm deployment. This - * can be fetched from community gallery image GET call. - * - * @param communityGalleryImageId the communityGalleryImageId value to set. - * @return the ImageReference object itself. - */ - public ImageReference withCommunityGalleryImageId(String communityGalleryImageId) { - this.communityGalleryImageId = communityGalleryImageId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageReference withId(String id) { - super.withId(id); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - jsonWriter.writeStringField("publisher", this.publisher); - jsonWriter.writeStringField("offer", this.offer); - jsonWriter.writeStringField("sku", this.sku); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeStringField("sharedGalleryImageId", this.sharedGalleryImageId); - jsonWriter.writeStringField("communityGalleryImageId", this.communityGalleryImageId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageReference if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageReference. - */ - public static ImageReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageReference deserializedImageReference = new ImageReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedImageReference.withId(reader.getString()); - } else if ("publisher".equals(fieldName)) { - deserializedImageReference.publisher = reader.getString(); - } else if ("offer".equals(fieldName)) { - deserializedImageReference.offer = reader.getString(); - } else if ("sku".equals(fieldName)) { - deserializedImageReference.sku = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedImageReference.version = reader.getString(); - } else if ("sharedGalleryImageId".equals(fieldName)) { - deserializedImageReference.sharedGalleryImageId = reader.getString(); - } else if ("communityGalleryImageId".equals(fieldName)) { - deserializedImageReference.communityGalleryImageId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImageReference; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java deleted file mode 100644 index 51d88a713ddc..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a reference to Key Vault Key. - */ -@Fluent -public final class KeyVaultKeyReference implements JsonSerializable { - /* - * The URL referencing a key encryption key in Key Vault. - */ - private String keyUrl; - - /* - * The relative URL of the Key Vault containing the key. - */ - private SubResource sourceVault; - - /** - * Creates an instance of KeyVaultKeyReference class. - */ - public KeyVaultKeyReference() { - } - - /** - * Get the keyUrl property: The URL referencing a key encryption key in Key Vault. - * - * @return the keyUrl value. - */ - public String keyUrl() { - return this.keyUrl; - } - - /** - * Set the keyUrl property: The URL referencing a key encryption key in Key Vault. - * - * @param keyUrl the keyUrl value to set. - * @return the KeyVaultKeyReference object itself. - */ - public KeyVaultKeyReference withKeyUrl(String keyUrl) { - this.keyUrl = keyUrl; - return this; - } - - /** - * Get the sourceVault property: The relative URL of the Key Vault containing the key. - * - * @return the sourceVault value. - */ - public SubResource sourceVault() { - return this.sourceVault; - } - - /** - * Set the sourceVault property: The relative URL of the Key Vault containing the key. - * - * @param sourceVault the sourceVault value to set. - * @return the KeyVaultKeyReference object itself. - */ - public KeyVaultKeyReference withSourceVault(SubResource sourceVault) { - this.sourceVault = sourceVault; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyUrl", this.keyUrl); - jsonWriter.writeJsonField("sourceVault", this.sourceVault); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KeyVaultKeyReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KeyVaultKeyReference if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the KeyVaultKeyReference. - */ - public static KeyVaultKeyReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KeyVaultKeyReference deserializedKeyVaultKeyReference = new KeyVaultKeyReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyUrl".equals(fieldName)) { - deserializedKeyVaultKeyReference.keyUrl = reader.getString(); - } else if ("sourceVault".equals(fieldName)) { - deserializedKeyVaultKeyReference.sourceVault = SubResource.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedKeyVaultKeyReference; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java deleted file mode 100644 index 19ff34e07783..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a reference to Key Vault Secret. - */ -@Fluent -public final class KeyVaultSecretReference implements JsonSerializable { - /* - * The URL referencing a secret in a Key Vault. - */ - private String secretUrl; - - /* - * The relative URL of the Key Vault containing the secret. - */ - private SubResource sourceVault; - - /** - * Creates an instance of KeyVaultSecretReference class. - */ - public KeyVaultSecretReference() { - } - - /** - * Get the secretUrl property: The URL referencing a secret in a Key Vault. - * - * @return the secretUrl value. - */ - public String secretUrl() { - return this.secretUrl; - } - - /** - * Set the secretUrl property: The URL referencing a secret in a Key Vault. - * - * @param secretUrl the secretUrl value to set. - * @return the KeyVaultSecretReference object itself. - */ - public KeyVaultSecretReference withSecretUrl(String secretUrl) { - this.secretUrl = secretUrl; - return this; - } - - /** - * Get the sourceVault property: The relative URL of the Key Vault containing the secret. - * - * @return the sourceVault value. - */ - public SubResource sourceVault() { - return this.sourceVault; - } - - /** - * Set the sourceVault property: The relative URL of the Key Vault containing the secret. - * - * @param sourceVault the sourceVault value to set. - * @return the KeyVaultSecretReference object itself. - */ - public KeyVaultSecretReference withSourceVault(SubResource sourceVault) { - this.sourceVault = sourceVault; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretUrl", this.secretUrl); - jsonWriter.writeJsonField("sourceVault", this.sourceVault); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KeyVaultSecretReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KeyVaultSecretReference if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the KeyVaultSecretReference. - */ - public static KeyVaultSecretReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KeyVaultSecretReference deserializedKeyVaultSecretReference = new KeyVaultSecretReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretUrl".equals(fieldName)) { - deserializedKeyVaultSecretReference.secretUrl = reader.getString(); - } else if ("sourceVault".equals(fieldName)) { - deserializedKeyVaultSecretReference.sourceVault = SubResource.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedKeyVaultSecretReference; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java deleted file mode 100644 index 6e879d7048a4..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, - * see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). - */ -@Fluent -public final class LinuxConfiguration implements JsonSerializable { - /* - * Specifies whether password authentication should be disabled. - */ - private Boolean disablePasswordAuthentication; - - /* - * Specifies the ssh key configuration for a Linux OS. - */ - private SshConfiguration ssh; - - /* - * Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not - * specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed - * on the VM so that extensions can be added to the VM later. - */ - private Boolean provisionVMAgent; - - /* - * [Preview Feature] Specifies settings related to VM Guest Patching on Linux. - */ - private LinuxPatchSettings patchSettings; - - /* - * Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false. - */ - private Boolean enableVMAgentPlatformUpdates; - - /** - * Creates an instance of LinuxConfiguration class. - */ - public LinuxConfiguration() { - } - - /** - * Get the disablePasswordAuthentication property: Specifies whether password authentication should be disabled. - * - * @return the disablePasswordAuthentication value. - */ - public Boolean disablePasswordAuthentication() { - return this.disablePasswordAuthentication; - } - - /** - * Set the disablePasswordAuthentication property: Specifies whether password authentication should be disabled. - * - * @param disablePasswordAuthentication the disablePasswordAuthentication value to set. - * @return the LinuxConfiguration object itself. - */ - public LinuxConfiguration withDisablePasswordAuthentication(Boolean disablePasswordAuthentication) { - this.disablePasswordAuthentication = disablePasswordAuthentication; - return this; - } - - /** - * Get the ssh property: Specifies the ssh key configuration for a Linux OS. - * - * @return the ssh value. - */ - public SshConfiguration ssh() { - return this.ssh; - } - - /** - * Set the ssh property: Specifies the ssh key configuration for a Linux OS. - * - * @param ssh the ssh value to set. - * @return the LinuxConfiguration object itself. - */ - public LinuxConfiguration withSsh(SshConfiguration ssh) { - this.ssh = ssh; - return this; - } - - /** - * Get the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual - * machine. When this property is not specified in the request body, default behavior is to set it to true. This - * will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. - * - * @return the provisionVMAgent value. - */ - public Boolean provisionVMAgent() { - return this.provisionVMAgent; - } - - /** - * Set the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual - * machine. When this property is not specified in the request body, default behavior is to set it to true. This - * will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. - * - * @param provisionVMAgent the provisionVMAgent value to set. - * @return the LinuxConfiguration object itself. - */ - public LinuxConfiguration withProvisionVMAgent(Boolean provisionVMAgent) { - this.provisionVMAgent = provisionVMAgent; - return this; - } - - /** - * Get the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Linux. - * - * @return the patchSettings value. - */ - public LinuxPatchSettings patchSettings() { - return this.patchSettings; - } - - /** - * Set the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Linux. - * - * @param patchSettings the patchSettings value to set. - * @return the LinuxConfiguration object itself. - */ - public LinuxConfiguration withPatchSettings(LinuxPatchSettings patchSettings) { - this.patchSettings = patchSettings; - return this; - } - - /** - * Get the enableVMAgentPlatformUpdates property: Indicates whether VMAgent Platform Updates is enabled for the - * Linux virtual machine. Default value is false. - * - * @return the enableVMAgentPlatformUpdates value. - */ - public Boolean enableVMAgentPlatformUpdates() { - return this.enableVMAgentPlatformUpdates; - } - - /** - * Set the enableVMAgentPlatformUpdates property: Indicates whether VMAgent Platform Updates is enabled for the - * Linux virtual machine. Default value is false. - * - * @param enableVMAgentPlatformUpdates the enableVMAgentPlatformUpdates value to set. - * @return the LinuxConfiguration object itself. - */ - public LinuxConfiguration withEnableVMAgentPlatformUpdates(Boolean enableVMAgentPlatformUpdates) { - this.enableVMAgentPlatformUpdates = enableVMAgentPlatformUpdates; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("disablePasswordAuthentication", this.disablePasswordAuthentication); - jsonWriter.writeJsonField("ssh", this.ssh); - jsonWriter.writeBooleanField("provisionVMAgent", this.provisionVMAgent); - jsonWriter.writeJsonField("patchSettings", this.patchSettings); - jsonWriter.writeBooleanField("enableVMAgentPlatformUpdates", this.enableVMAgentPlatformUpdates); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LinuxConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LinuxConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LinuxConfiguration. - */ - public static LinuxConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LinuxConfiguration deserializedLinuxConfiguration = new LinuxConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("disablePasswordAuthentication".equals(fieldName)) { - deserializedLinuxConfiguration.disablePasswordAuthentication - = reader.getNullable(JsonReader::getBoolean); - } else if ("ssh".equals(fieldName)) { - deserializedLinuxConfiguration.ssh = SshConfiguration.fromJson(reader); - } else if ("provisionVMAgent".equals(fieldName)) { - deserializedLinuxConfiguration.provisionVMAgent = reader.getNullable(JsonReader::getBoolean); - } else if ("patchSettings".equals(fieldName)) { - deserializedLinuxConfiguration.patchSettings = LinuxPatchSettings.fromJson(reader); - } else if ("enableVMAgentPlatformUpdates".equals(fieldName)) { - deserializedLinuxConfiguration.enableVMAgentPlatformUpdates - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedLinuxConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java deleted file mode 100644 index 4569fe248d5e..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.<br /><br /> Possible values - * are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine. - * <br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property - * provisionVMAgent must be true. - */ -public final class LinuxPatchAssessmentMode extends ExpandableStringEnum { - /** - * ImageDefault mode. - */ - public static final LinuxPatchAssessmentMode IMAGE_DEFAULT = fromString("ImageDefault"); - - /** - * AutomaticByPlatform mode. - */ - public static final LinuxPatchAssessmentMode AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); - - /** - * Creates a new instance of LinuxPatchAssessmentMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LinuxPatchAssessmentMode() { - } - - /** - * Creates or finds a LinuxPatchAssessmentMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding LinuxPatchAssessmentMode. - */ - public static LinuxPatchAssessmentMode fromString(String name) { - return fromString(name, LinuxPatchAssessmentMode.class); - } - - /** - * Gets known LinuxPatchAssessmentMode values. - * - * @return known LinuxPatchAssessmentMode values. - */ - public static Collection values() { - return values(LinuxPatchAssessmentMode.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java deleted file mode 100644 index be04be6c7e3e..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies settings related to VM Guest Patching on Linux. - */ -@Fluent -public final class LinuxPatchSettings implements JsonSerializable { - /* - * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine - * scale set with OrchestrationMode as Flexible.

      Possible values are:

      **ImageDefault** - The - * virtual machine's default patching configuration is used.

      **AutomaticByPlatform** - The virtual - * machine will be automatically updated by the platform. The property provisionVMAgent must be true - */ - private LinuxVMGuestPatchMode patchMode; - - /* - * Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

      Possible values are:

      **ImageDefault** - You control the timing of patch assessments on a virtual machine.

      - * **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent - * must be true. - */ - private LinuxPatchAssessmentMode assessmentMode; - - /* - * Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux. - */ - private LinuxVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings; - - /** - * Creates an instance of LinuxPatchSettings class. - */ - public LinuxPatchSettings() { - } - - /** - * Get the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines - * associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible - * values are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is - * used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated by the - * platform. The property provisionVMAgent must be true. - * - * @return the patchMode value. - */ - public LinuxVMGuestPatchMode patchMode() { - return this.patchMode; - } - - /** - * Set the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines - * associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible - * values are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is - * used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated by the - * platform. The property provisionVMAgent must be true. - * - * @param patchMode the patchMode value to set. - * @return the LinuxPatchSettings object itself. - */ - public LinuxPatchSettings withPatchMode(LinuxVMGuestPatchMode patchMode) { - this.patchMode = patchMode; - return this; - } - - /** - * Get the assessmentMode property: Specifies the mode of VM Guest Patch Assessment for the IaaS virtual - * machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the - * timing of patch assessments on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform - * will trigger periodic patch assessments. The property provisionVMAgent must be true. - * - * @return the assessmentMode value. - */ - public LinuxPatchAssessmentMode assessmentMode() { - return this.assessmentMode; - } - - /** - * Set the assessmentMode property: Specifies the mode of VM Guest Patch Assessment for the IaaS virtual - * machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the - * timing of patch assessments on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform - * will trigger periodic patch assessments. The property provisionVMAgent must be true. - * - * @param assessmentMode the assessmentMode value to set. - * @return the LinuxPatchSettings object itself. - */ - public LinuxPatchSettings withAssessmentMode(LinuxPatchAssessmentMode assessmentMode) { - this.assessmentMode = assessmentMode; - return this; - } - - /** - * Get the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in - * VM Guest Patching on Linux. - * - * @return the automaticByPlatformSettings value. - */ - public LinuxVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings() { - return this.automaticByPlatformSettings; - } - - /** - * Set the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in - * VM Guest Patching on Linux. - * - * @param automaticByPlatformSettings the automaticByPlatformSettings value to set. - * @return the LinuxPatchSettings object itself. - */ - public LinuxPatchSettings - withAutomaticByPlatformSettings(LinuxVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings) { - this.automaticByPlatformSettings = automaticByPlatformSettings; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("patchMode", this.patchMode == null ? null : this.patchMode.toString()); - jsonWriter.writeStringField("assessmentMode", - this.assessmentMode == null ? null : this.assessmentMode.toString()); - jsonWriter.writeJsonField("automaticByPlatformSettings", this.automaticByPlatformSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LinuxPatchSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LinuxPatchSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LinuxPatchSettings. - */ - public static LinuxPatchSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LinuxPatchSettings deserializedLinuxPatchSettings = new LinuxPatchSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("patchMode".equals(fieldName)) { - deserializedLinuxPatchSettings.patchMode = LinuxVMGuestPatchMode.fromString(reader.getString()); - } else if ("assessmentMode".equals(fieldName)) { - deserializedLinuxPatchSettings.assessmentMode - = LinuxPatchAssessmentMode.fromString(reader.getString()); - } else if ("automaticByPlatformSettings".equals(fieldName)) { - deserializedLinuxPatchSettings.automaticByPlatformSettings - = LinuxVMGuestPatchAutomaticByPlatformSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedLinuxPatchSettings; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java deleted file mode 100644 index 9d884367001b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. - */ -public final class LinuxVMGuestPatchAutomaticByPlatformRebootSetting - extends ExpandableStringEnum { - /** - * Unknown reboot setting. - */ - public static final LinuxVMGuestPatchAutomaticByPlatformRebootSetting UNKNOWN = fromString("Unknown"); - - /** - * Reboot if required. - */ - public static final LinuxVMGuestPatchAutomaticByPlatformRebootSetting IF_REQUIRED = fromString("IfRequired"); - - /** - * Never reboot. - */ - public static final LinuxVMGuestPatchAutomaticByPlatformRebootSetting NEVER = fromString("Never"); - - /** - * Always reboot. - */ - public static final LinuxVMGuestPatchAutomaticByPlatformRebootSetting ALWAYS = fromString("Always"); - - /** - * Creates a new instance of LinuxVMGuestPatchAutomaticByPlatformRebootSetting value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LinuxVMGuestPatchAutomaticByPlatformRebootSetting() { - } - - /** - * Creates or finds a LinuxVMGuestPatchAutomaticByPlatformRebootSetting from its string representation. - * - * @param name a name to look for. - * @return the corresponding LinuxVMGuestPatchAutomaticByPlatformRebootSetting. - */ - public static LinuxVMGuestPatchAutomaticByPlatformRebootSetting fromString(String name) { - return fromString(name, LinuxVMGuestPatchAutomaticByPlatformRebootSetting.class); - } - - /** - * Gets known LinuxVMGuestPatchAutomaticByPlatformRebootSetting values. - * - * @return known LinuxVMGuestPatchAutomaticByPlatformRebootSetting values. - */ - public static Collection values() { - return values(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java deleted file mode 100644 index a648795899c0..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings. - */ -@Fluent -public final class LinuxVMGuestPatchAutomaticByPlatformSettings - implements JsonSerializable { - /* - * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. - */ - private LinuxVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting; - - /* - * Enables customer to schedule patching without accidental upgrades - */ - private Boolean bypassPlatformSafetyChecksOnUserSchedule; - - /** - * Creates an instance of LinuxVMGuestPatchAutomaticByPlatformSettings class. - */ - public LinuxVMGuestPatchAutomaticByPlatformSettings() { - } - - /** - * Get the rebootSetting property: Specifies the reboot setting for all AutomaticByPlatform patch installation - * operations. - * - * @return the rebootSetting value. - */ - public LinuxVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting() { - return this.rebootSetting; - } - - /** - * Set the rebootSetting property: Specifies the reboot setting for all AutomaticByPlatform patch installation - * operations. - * - * @param rebootSetting the rebootSetting value to set. - * @return the LinuxVMGuestPatchAutomaticByPlatformSettings object itself. - */ - public LinuxVMGuestPatchAutomaticByPlatformSettings - withRebootSetting(LinuxVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting) { - this.rebootSetting = rebootSetting; - return this; - } - - /** - * Get the bypassPlatformSafetyChecksOnUserSchedule property: Enables customer to schedule patching without - * accidental upgrades. - * - * @return the bypassPlatformSafetyChecksOnUserSchedule value. - */ - public Boolean bypassPlatformSafetyChecksOnUserSchedule() { - return this.bypassPlatformSafetyChecksOnUserSchedule; - } - - /** - * Set the bypassPlatformSafetyChecksOnUserSchedule property: Enables customer to schedule patching without - * accidental upgrades. - * - * @param bypassPlatformSafetyChecksOnUserSchedule the bypassPlatformSafetyChecksOnUserSchedule value to set. - * @return the LinuxVMGuestPatchAutomaticByPlatformSettings object itself. - */ - public LinuxVMGuestPatchAutomaticByPlatformSettings - withBypassPlatformSafetyChecksOnUserSchedule(Boolean bypassPlatformSafetyChecksOnUserSchedule) { - this.bypassPlatformSafetyChecksOnUserSchedule = bypassPlatformSafetyChecksOnUserSchedule; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("rebootSetting", this.rebootSetting == null ? null : this.rebootSetting.toString()); - jsonWriter.writeBooleanField("bypassPlatformSafetyChecksOnUserSchedule", - this.bypassPlatformSafetyChecksOnUserSchedule); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LinuxVMGuestPatchAutomaticByPlatformSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LinuxVMGuestPatchAutomaticByPlatformSettings if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the LinuxVMGuestPatchAutomaticByPlatformSettings. - */ - public static LinuxVMGuestPatchAutomaticByPlatformSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LinuxVMGuestPatchAutomaticByPlatformSettings deserializedLinuxVMGuestPatchAutomaticByPlatformSettings - = new LinuxVMGuestPatchAutomaticByPlatformSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rebootSetting".equals(fieldName)) { - deserializedLinuxVMGuestPatchAutomaticByPlatformSettings.rebootSetting - = LinuxVMGuestPatchAutomaticByPlatformRebootSetting.fromString(reader.getString()); - } else if ("bypassPlatformSafetyChecksOnUserSchedule".equals(fieldName)) { - deserializedLinuxVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedLinuxVMGuestPatchAutomaticByPlatformSettings; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java deleted file mode 100644 index f9a6cd84f4cf..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine - * scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> - * **ImageDefault** - The virtual machine's default patching configuration is used. <br /><br /> - * **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property - * provisionVMAgent must be true. - */ -public final class LinuxVMGuestPatchMode extends ExpandableStringEnum { - /** - * ImageDefault linux VM guest patch mode. - */ - public static final LinuxVMGuestPatchMode IMAGE_DEFAULT = fromString("ImageDefault"); - - /** - * AutomaticByPlatform linux VM guest patch mode. - */ - public static final LinuxVMGuestPatchMode AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); - - /** - * Creates a new instance of LinuxVMGuestPatchMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LinuxVMGuestPatchMode() { - } - - /** - * Creates or finds a LinuxVMGuestPatchMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding LinuxVMGuestPatchMode. - */ - public static LinuxVMGuestPatchMode fromString(String name) { - return fromString(name, LinuxVMGuestPatchMode.class); - } - - /** - * Gets known LinuxVMGuestPatchMode values. - * - * @return known LinuxVMGuestPatchMode values. - */ - public static Collection values() { - return values(LinuxVMGuestPatchMode.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java deleted file mode 100644 index 21b60fb3e8b5..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The parameters of a managed disk. - */ -@Fluent -public final class ManagedDiskParameters extends SubResource { - /* - * Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it - * cannot be used with OS Disk. - */ - private StorageAccountTypes storageAccountType; - - /* - * Specifies the customer managed disk encryption set resource id for the managed disk. - */ - private DiskEncryptionSetParameters diskEncryptionSet; - - /* - * Specifies the security profile for the managed disk. - */ - private VMDiskSecurityProfile securityProfile; - - /** - * Creates an instance of ManagedDiskParameters class. - */ - public ManagedDiskParameters() { - } - - /** - * Get the storageAccountType property: Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS - * can only be used with data disks, it cannot be used with OS Disk. - * - * @return the storageAccountType value. - */ - public StorageAccountTypes storageAccountType() { - return this.storageAccountType; - } - - /** - * Set the storageAccountType property: Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS - * can only be used with data disks, it cannot be used with OS Disk. - * - * @param storageAccountType the storageAccountType value to set. - * @return the ManagedDiskParameters object itself. - */ - public ManagedDiskParameters withStorageAccountType(StorageAccountTypes storageAccountType) { - this.storageAccountType = storageAccountType; - return this; - } - - /** - * Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the - * managed disk. - * - * @return the diskEncryptionSet value. - */ - public DiskEncryptionSetParameters diskEncryptionSet() { - return this.diskEncryptionSet; - } - - /** - * Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the - * managed disk. - * - * @param diskEncryptionSet the diskEncryptionSet value to set. - * @return the ManagedDiskParameters object itself. - */ - public ManagedDiskParameters withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet) { - this.diskEncryptionSet = diskEncryptionSet; - return this; - } - - /** - * Get the securityProfile property: Specifies the security profile for the managed disk. - * - * @return the securityProfile value. - */ - public VMDiskSecurityProfile securityProfile() { - return this.securityProfile; - } - - /** - * Set the securityProfile property: Specifies the security profile for the managed disk. - * - * @param securityProfile the securityProfile value to set. - * @return the ManagedDiskParameters object itself. - */ - public ManagedDiskParameters withSecurityProfile(VMDiskSecurityProfile securityProfile) { - this.securityProfile = securityProfile; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedDiskParameters withId(String id) { - super.withId(id); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - jsonWriter.writeStringField("storageAccountType", - this.storageAccountType == null ? null : this.storageAccountType.toString()); - jsonWriter.writeJsonField("diskEncryptionSet", this.diskEncryptionSet); - jsonWriter.writeJsonField("securityProfile", this.securityProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedDiskParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedDiskParameters if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedDiskParameters. - */ - public static ManagedDiskParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedDiskParameters deserializedManagedDiskParameters = new ManagedDiskParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedDiskParameters.withId(reader.getString()); - } else if ("storageAccountType".equals(fieldName)) { - deserializedManagedDiskParameters.storageAccountType - = StorageAccountTypes.fromString(reader.getString()); - } else if ("diskEncryptionSet".equals(fieldName)) { - deserializedManagedDiskParameters.diskEncryptionSet = DiskEncryptionSetParameters.fromJson(reader); - } else if ("securityProfile".equals(fieldName)) { - deserializedManagedDiskParameters.securityProfile = VMDiskSecurityProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedDiskParameters; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java deleted file mode 100644 index a97b8448e89b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the mode that ProxyAgent will execute on if the feature is enabled. ProxyAgent will start to audit or - * monitor but not enforce access control over requests to host endpoints in Audit mode, while in Enforce mode it will - * enforce access control. The default value is Enforce mode. - */ -public final class Mode extends ExpandableStringEnum { - /** - * Audit mode. - */ - public static final Mode AUDIT = fromString("Audit"); - - /** - * Enforce mode. - */ - public static final Mode ENFORCE = fromString("Enforce"); - - /** - * Creates a new instance of Mode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Mode() { - } - - /** - * Creates or finds a Mode from its string representation. - * - * @param name a name to look for. - * @return the corresponding Mode. - */ - public static Mode fromString(String name) { - return fromString(name, Mode.class); - } - - /** - * Gets known Mode values. - * - * @return known Mode values. - */ - public static Collection values() { - return values(Mode.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java deleted file mode 100644 index 4972fb74fb66..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, - * including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In - * Enforce mode, the system will enforce the access control and it is the recommended mode of operation. - */ -public final class Modes extends ExpandableStringEnum { - /** - * Audit mode. - */ - public static final Modes AUDIT = fromString("Audit"); - - /** - * Enforce mode. - */ - public static final Modes ENFORCE = fromString("Enforce"); - - /** - * Disabled mode. - */ - public static final Modes DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of Modes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Modes() { - } - - /** - * Creates or finds a Modes from its string representation. - * - * @param name a name to look for. - * @return the corresponding Modes. - */ - public static Modes fromString(String name) { - return fromString(name, Modes.class); - } - - /** - * Gets known Modes values. - * - * @return known Modes values. - */ - public static Collection values() { - return values(Modes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java deleted file mode 100644 index 34bc1ed7fe70..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the Microsoft.Network API version used when creating networking resources in the Network Interface - * Configurations. - */ -public final class NetworkApiVersion extends ExpandableStringEnum { - /** - * 2020-11-01 version. - */ - public static final NetworkApiVersion TWO_ZERO_TWO_ZERO_ONE_ONE_ZERO_ONE = fromString("2020-11-01"); - - /** - * 2022-11-01 version. - */ - public static final NetworkApiVersion TWO_ZERO_TWO_TWO_ONE_ONE_ZERO_ONE = fromString("2022-11-01"); - - /** - * Creates a new instance of NetworkApiVersion value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkApiVersion() { - } - - /** - * Creates or finds a NetworkApiVersion from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkApiVersion. - */ - public static NetworkApiVersion fromString(String name) { - return fromString(name, NetworkApiVersion.class); - } - - /** - * Gets known NetworkApiVersion values. - * - * @return known NetworkApiVersion values. - */ - public static Collection values() { - return values(NetworkApiVersion.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java deleted file mode 100644 index a2204241fa0c..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies whether the Auxiliary mode is enabled for the Network Interface resource. - */ -public final class NetworkInterfaceAuxiliaryMode extends ExpandableStringEnum { - /** - * None mode. - */ - public static final NetworkInterfaceAuxiliaryMode NONE = fromString("None"); - - /** - * AcceleratedConnections mode. - */ - public static final NetworkInterfaceAuxiliaryMode ACCELERATED_CONNECTIONS = fromString("AcceleratedConnections"); - - /** - * Floating mode. - */ - public static final NetworkInterfaceAuxiliaryMode FLOATING = fromString("Floating"); - - /** - * Creates a new instance of NetworkInterfaceAuxiliaryMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkInterfaceAuxiliaryMode() { - } - - /** - * Creates or finds a NetworkInterfaceAuxiliaryMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkInterfaceAuxiliaryMode. - */ - public static NetworkInterfaceAuxiliaryMode fromString(String name) { - return fromString(name, NetworkInterfaceAuxiliaryMode.class); - } - - /** - * Gets known NetworkInterfaceAuxiliaryMode values. - * - * @return known NetworkInterfaceAuxiliaryMode values. - */ - public static Collection values() { - return values(NetworkInterfaceAuxiliaryMode.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java deleted file mode 100644 index 9712902b1848..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies whether the Auxiliary sku is enabled for the Network Interface resource. - */ -public final class NetworkInterfaceAuxiliarySku extends ExpandableStringEnum { - /** - * None: None sku. - */ - public static final NetworkInterfaceAuxiliarySku NONE = fromString("None"); - - /** - * A1 sku. - */ - public static final NetworkInterfaceAuxiliarySku A1 = fromString("A1"); - - /** - * A2 sku. - */ - public static final NetworkInterfaceAuxiliarySku A2 = fromString("A2"); - - /** - * A4 sku. - */ - public static final NetworkInterfaceAuxiliarySku A4 = fromString("A4"); - - /** - * A8 sku. - */ - public static final NetworkInterfaceAuxiliarySku A8 = fromString("A8"); - - /** - * Creates a new instance of NetworkInterfaceAuxiliarySku value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkInterfaceAuxiliarySku() { - } - - /** - * Creates or finds a NetworkInterfaceAuxiliarySku from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkInterfaceAuxiliarySku. - */ - public static NetworkInterfaceAuxiliarySku fromString(String name) { - return fromString(name, NetworkInterfaceAuxiliarySku.class); - } - - /** - * Gets known NetworkInterfaceAuxiliarySku values. - * - * @return known NetworkInterfaceAuxiliarySku values. - */ - public static Collection values() { - return values(NetworkInterfaceAuxiliarySku.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java deleted file mode 100644 index ba28fc35453d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a network interface reference. - */ -@Fluent -public final class NetworkInterfaceReference extends SubResource { - /* - * Describes a network interface reference properties. - */ - private NetworkInterfaceReferenceProperties properties; - - /** - * Creates an instance of NetworkInterfaceReference class. - */ - public NetworkInterfaceReference() { - } - - /** - * Get the properties property: Describes a network interface reference properties. - * - * @return the properties value. - */ - public NetworkInterfaceReferenceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Describes a network interface reference properties. - * - * @param properties the properties value to set. - * @return the NetworkInterfaceReference object itself. - */ - public NetworkInterfaceReference withProperties(NetworkInterfaceReferenceProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkInterfaceReference withId(String id) { - super.withId(id); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", id()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkInterfaceReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkInterfaceReference if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkInterfaceReference. - */ - public static NetworkInterfaceReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkInterfaceReference deserializedNetworkInterfaceReference = new NetworkInterfaceReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNetworkInterfaceReference.withId(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedNetworkInterfaceReference.properties - = NetworkInterfaceReferenceProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkInterfaceReference; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java deleted file mode 100644 index cdd7c3d17be1..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a network interface reference properties. - */ -@Fluent -public final class NetworkInterfaceReferenceProperties - implements JsonSerializable { - /* - * Specifies the primary network interface in case the virtual machine has more than 1 network interface. - */ - private Boolean primary; - - /* - * Specify what happens to the network interface when the VM is deleted - */ - private DeleteOptions deleteOption; - - /** - * Creates an instance of NetworkInterfaceReferenceProperties class. - */ - public NetworkInterfaceReferenceProperties() { - } - - /** - * Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1 - * network interface. - * - * @return the primary value. - */ - public Boolean primary() { - return this.primary; - } - - /** - * Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1 - * network interface. - * - * @param primary the primary value to set. - * @return the NetworkInterfaceReferenceProperties object itself. - */ - public NetworkInterfaceReferenceProperties withPrimary(Boolean primary) { - this.primary = primary; - return this; - } - - /** - * Get the deleteOption property: Specify what happens to the network interface when the VM is deleted. - * - * @return the deleteOption value. - */ - public DeleteOptions deleteOption() { - return this.deleteOption; - } - - /** - * Set the deleteOption property: Specify what happens to the network interface when the VM is deleted. - * - * @param deleteOption the deleteOption value to set. - * @return the NetworkInterfaceReferenceProperties object itself. - */ - public NetworkInterfaceReferenceProperties withDeleteOption(DeleteOptions deleteOption) { - this.deleteOption = deleteOption; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("primary", this.primary); - jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkInterfaceReferenceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkInterfaceReferenceProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkInterfaceReferenceProperties. - */ - public static NetworkInterfaceReferenceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkInterfaceReferenceProperties deserializedNetworkInterfaceReferenceProperties - = new NetworkInterfaceReferenceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primary".equals(fieldName)) { - deserializedNetworkInterfaceReferenceProperties.primary - = reader.getNullable(JsonReader::getBoolean); - } else if ("deleteOption".equals(fieldName)) { - deserializedNetworkInterfaceReferenceProperties.deleteOption - = DeleteOptions.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkInterfaceReferenceProperties; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java deleted file mode 100644 index aad4090fb34c..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Specifies the network interfaces or the networking configuration of the virtual machine. - */ -@Fluent -public final class NetworkProfile implements JsonSerializable { - /* - * Specifies the list of resource Ids for the network interfaces associated with the virtual machine. - */ - private List networkInterfaces; - - /* - * specifies the Microsoft.Network API version used when creating networking resources in the Network Interface - * Configurations - */ - private NetworkApiVersion networkApiVersion; - - /* - * Specifies the networking configurations that will be used to create the virtual machine networking resources. - */ - private List networkInterfaceConfigurations; - - /** - * Creates an instance of NetworkProfile class. - */ - public NetworkProfile() { - } - - /** - * Get the networkInterfaces property: Specifies the list of resource Ids for the network interfaces associated with - * the virtual machine. - * - * @return the networkInterfaces value. - */ - public List networkInterfaces() { - return this.networkInterfaces; - } - - /** - * Set the networkInterfaces property: Specifies the list of resource Ids for the network interfaces associated with - * the virtual machine. - * - * @param networkInterfaces the networkInterfaces value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withNetworkInterfaces(List networkInterfaces) { - this.networkInterfaces = networkInterfaces; - return this; - } - - /** - * Get the networkApiVersion property: specifies the Microsoft.Network API version used when creating networking - * resources in the Network Interface Configurations. - * - * @return the networkApiVersion value. - */ - public NetworkApiVersion networkApiVersion() { - return this.networkApiVersion; - } - - /** - * Set the networkApiVersion property: specifies the Microsoft.Network API version used when creating networking - * resources in the Network Interface Configurations. - * - * @param networkApiVersion the networkApiVersion value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withNetworkApiVersion(NetworkApiVersion networkApiVersion) { - this.networkApiVersion = networkApiVersion; - return this; - } - - /** - * Get the networkInterfaceConfigurations property: Specifies the networking configurations that will be used to - * create the virtual machine networking resources. - * - * @return the networkInterfaceConfigurations value. - */ - public List networkInterfaceConfigurations() { - return this.networkInterfaceConfigurations; - } - - /** - * Set the networkInterfaceConfigurations property: Specifies the networking configurations that will be used to - * create the virtual machine networking resources. - * - * @param networkInterfaceConfigurations the networkInterfaceConfigurations value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withNetworkInterfaceConfigurations( - List networkInterfaceConfigurations) { - this.networkInterfaceConfigurations = networkInterfaceConfigurations; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("networkInterfaces", this.networkInterfaces, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("networkApiVersion", - this.networkApiVersion == null ? null : this.networkApiVersion.toString()); - jsonWriter.writeArrayField("networkInterfaceConfigurations", this.networkInterfaceConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkProfile. - */ - public static NetworkProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkProfile deserializedNetworkProfile = new NetworkProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkInterfaces".equals(fieldName)) { - List networkInterfaces - = reader.readArray(reader1 -> NetworkInterfaceReference.fromJson(reader1)); - deserializedNetworkProfile.networkInterfaces = networkInterfaces; - } else if ("networkApiVersion".equals(fieldName)) { - deserializedNetworkProfile.networkApiVersion = NetworkApiVersion.fromString(reader.getString()); - } else if ("networkInterfaceConfigurations".equals(fieldName)) { - List networkInterfaceConfigurations - = reader.readArray(reader1 -> VirtualMachineNetworkInterfaceConfiguration.fromJson(reader1)); - deserializedNetworkProfile.networkInterfaceConfigurations = networkInterfaceConfigurations; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java deleted file mode 100644 index 81d1ab37db17..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java +++ /dev/null @@ -1,431 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies information about the operating system disk used by the virtual machine. For more information about disks, - * see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - */ -@Fluent -public final class OSDisk implements JsonSerializable { - /* - * This property allows you to specify the type of the OS that is included in the disk if creating a VM from - * user-image or a specialized VHD. Possible values are: Windows, Linux. - */ - private OperatingSystemTypes osType; - - /* - * Specifies the encryption settings for the OS Disk. Minimum compute api-version: 2015-06-15. - */ - private DiskEncryptionSettings encryptionSettings; - - /* - * The disk name. - */ - private String name; - - /* - * The virtual hard disk. - */ - private VirtualHardDisk vhd; - - /* - * The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the - * virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. - */ - private VirtualHardDisk image; - - /* - * Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: - * None for Standard storage. ReadOnly for Premium storage. - */ - private CachingTypes caching; - - /* - * Specifies whether writeAccelerator should be enabled or disabled on the disk. - */ - private Boolean writeAcceleratorEnabled; - - /* - * Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. - */ - private DiffDiskSettings diffDiskSettings; - - /* - * Specifies how the virtual machine disk should be created. Possible values are Attach, FromImage. If you are using - * a platform image, you should also use the imageReference element described above. If you are using a marketplace - * image, you should also use the plan element previously described. - */ - private DiskCreateOptionTypes createOption; - - /* - * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk - * in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value - * cannot be larger than 1023. - */ - private Integer diskSizeGB; - - /* - * The managed disk parameters. - */ - private ManagedDiskParameters managedDisk; - - /* - * Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: Delete, Detach. - * The default value is set to Detach. For an ephemeral OS Disk, the default value is set to Delete. The user cannot - * change the delete option for an ephemeral OS Disk. - */ - private DiskDeleteOptionTypes deleteOption; - - /** - * Creates an instance of OSDisk class. - */ - public OSDisk() { - } - - /** - * Get the osType property: This property allows you to specify the type of the OS that is included in the disk if - * creating a VM from user-image or a specialized VHD. Possible values are: Windows, Linux. - * - * @return the osType value. - */ - public OperatingSystemTypes osType() { - return this.osType; - } - - /** - * Set the osType property: This property allows you to specify the type of the OS that is included in the disk if - * creating a VM from user-image or a specialized VHD. Possible values are: Windows, Linux. - * - * @param osType the osType value to set. - * @return the OSDisk object itself. - */ - public OSDisk withOsType(OperatingSystemTypes osType) { - this.osType = osType; - return this; - } - - /** - * Get the encryptionSettings property: Specifies the encryption settings for the OS Disk. Minimum compute - * api-version: 2015-06-15. - * - * @return the encryptionSettings value. - */ - public DiskEncryptionSettings encryptionSettings() { - return this.encryptionSettings; - } - - /** - * Set the encryptionSettings property: Specifies the encryption settings for the OS Disk. Minimum compute - * api-version: 2015-06-15. - * - * @param encryptionSettings the encryptionSettings value to set. - * @return the OSDisk object itself. - */ - public OSDisk withEncryptionSettings(DiskEncryptionSettings encryptionSettings) { - this.encryptionSettings = encryptionSettings; - return this; - } - - /** - * Get the name property: The disk name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The disk name. - * - * @param name the name value to set. - * @return the OSDisk object itself. - */ - public OSDisk withName(String name) { - this.name = name; - return this; - } - - /** - * Get the vhd property: The virtual hard disk. - * - * @return the vhd value. - */ - public VirtualHardDisk vhd() { - return this.vhd; - } - - /** - * Set the vhd property: The virtual hard disk. - * - * @param vhd the vhd value to set. - * @return the OSDisk object itself. - */ - public OSDisk withVhd(VirtualHardDisk vhd) { - this.vhd = vhd; - return this; - } - - /** - * Get the image property: The source user image virtual hard disk. The virtual hard disk will be copied before - * being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * - * @return the image value. - */ - public VirtualHardDisk image() { - return this.image; - } - - /** - * Set the image property: The source user image virtual hard disk. The virtual hard disk will be copied before - * being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not - * exist. - * - * @param image the image value to set. - * @return the OSDisk object itself. - */ - public OSDisk withImage(VirtualHardDisk image) { - this.image = image; - return this; - } - - /** - * Get the caching property: Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The - * defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. - * - * @return the caching value. - */ - public CachingTypes caching() { - return this.caching; - } - - /** - * Set the caching property: Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The - * defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. - * - * @param caching the caching value to set. - * @return the OSDisk object itself. - */ - public OSDisk withCaching(CachingTypes caching) { - this.caching = caching; - return this; - } - - /** - * Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the - * disk. - * - * @return the writeAcceleratorEnabled value. - */ - public Boolean writeAcceleratorEnabled() { - return this.writeAcceleratorEnabled; - } - - /** - * Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the - * disk. - * - * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set. - * @return the OSDisk object itself. - */ - public OSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { - this.writeAcceleratorEnabled = writeAcceleratorEnabled; - return this; - } - - /** - * Get the diffDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by - * the virtual machine. - * - * @return the diffDiskSettings value. - */ - public DiffDiskSettings diffDiskSettings() { - return this.diffDiskSettings; - } - - /** - * Set the diffDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by - * the virtual machine. - * - * @param diffDiskSettings the diffDiskSettings value to set. - * @return the OSDisk object itself. - */ - public OSDisk withDiffDiskSettings(DiffDiskSettings diffDiskSettings) { - this.diffDiskSettings = diffDiskSettings; - return this; - } - - /** - * Get the createOption property: Specifies how the virtual machine disk should be created. Possible values are - * Attach, FromImage. If you are using a platform image, you should also use the imageReference element described - * above. If you are using a marketplace image, you should also use the plan element previously described. - * - * @return the createOption value. - */ - public DiskCreateOptionTypes createOption() { - return this.createOption; - } - - /** - * Set the createOption property: Specifies how the virtual machine disk should be created. Possible values are - * Attach, FromImage. If you are using a platform image, you should also use the imageReference element described - * above. If you are using a marketplace image, you should also use the plan element previously described. - * - * @param createOption the createOption value to set. - * @return the OSDisk object itself. - */ - public OSDisk withCreateOption(DiskCreateOptionTypes createOption) { - this.createOption = createOption; - return this; - } - - /** - * Get the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x - * 1024^3 for the disk and the value cannot be larger than 1023. - * - * @return the diskSizeGB value. - */ - public Integer diskSizeGB() { - return this.diskSizeGB; - } - - /** - * Set the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x - * 1024^3 for the disk and the value cannot be larger than 1023. - * - * @param diskSizeGB the diskSizeGB value to set. - * @return the OSDisk object itself. - */ - public OSDisk withDiskSizeGB(Integer diskSizeGB) { - this.diskSizeGB = diskSizeGB; - return this; - } - - /** - * Get the managedDisk property: The managed disk parameters. - * - * @return the managedDisk value. - */ - public ManagedDiskParameters managedDisk() { - return this.managedDisk; - } - - /** - * Set the managedDisk property: The managed disk parameters. - * - * @param managedDisk the managedDisk value to set. - * @return the OSDisk object itself. - */ - public OSDisk withManagedDisk(ManagedDiskParameters managedDisk) { - this.managedDisk = managedDisk; - return this; - } - - /** - * Get the deleteOption property: Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible - * values are: Delete, Detach. The default value is set to Detach. For an ephemeral OS Disk, the default value is - * set to Delete. The user cannot change the delete option for an ephemeral OS Disk. - * - * @return the deleteOption value. - */ - public DiskDeleteOptionTypes deleteOption() { - return this.deleteOption; - } - - /** - * Set the deleteOption property: Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible - * values are: Delete, Detach. The default value is set to Detach. For an ephemeral OS Disk, the default value is - * set to Delete. The user cannot change the delete option for an ephemeral OS Disk. - * - * @param deleteOption the deleteOption value to set. - * @return the OSDisk object itself. - */ - public OSDisk withDeleteOption(DiskDeleteOptionTypes deleteOption) { - this.deleteOption = deleteOption; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("createOption", this.createOption == null ? null : this.createOption.toString()); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeJsonField("encryptionSettings", this.encryptionSettings); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("vhd", this.vhd); - jsonWriter.writeJsonField("image", this.image); - jsonWriter.writeStringField("caching", this.caching == null ? null : this.caching.toString()); - jsonWriter.writeBooleanField("writeAcceleratorEnabled", this.writeAcceleratorEnabled); - jsonWriter.writeJsonField("diffDiskSettings", this.diffDiskSettings); - jsonWriter.writeNumberField("diskSizeGB", this.diskSizeGB); - jsonWriter.writeJsonField("managedDisk", this.managedDisk); - jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OSDisk from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OSDisk if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OSDisk. - */ - public static OSDisk fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OSDisk deserializedOSDisk = new OSDisk(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("createOption".equals(fieldName)) { - deserializedOSDisk.createOption = DiskCreateOptionTypes.fromString(reader.getString()); - } else if ("osType".equals(fieldName)) { - deserializedOSDisk.osType = OperatingSystemTypes.fromString(reader.getString()); - } else if ("encryptionSettings".equals(fieldName)) { - deserializedOSDisk.encryptionSettings = DiskEncryptionSettings.fromJson(reader); - } else if ("name".equals(fieldName)) { - deserializedOSDisk.name = reader.getString(); - } else if ("vhd".equals(fieldName)) { - deserializedOSDisk.vhd = VirtualHardDisk.fromJson(reader); - } else if ("image".equals(fieldName)) { - deserializedOSDisk.image = VirtualHardDisk.fromJson(reader); - } else if ("caching".equals(fieldName)) { - deserializedOSDisk.caching = CachingTypes.fromString(reader.getString()); - } else if ("writeAcceleratorEnabled".equals(fieldName)) { - deserializedOSDisk.writeAcceleratorEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("diffDiskSettings".equals(fieldName)) { - deserializedOSDisk.diffDiskSettings = DiffDiskSettings.fromJson(reader); - } else if ("diskSizeGB".equals(fieldName)) { - deserializedOSDisk.diskSizeGB = reader.getNullable(JsonReader::getInt); - } else if ("managedDisk".equals(fieldName)) { - deserializedOSDisk.managedDisk = ManagedDiskParameters.fromJson(reader); - } else if ("deleteOption".equals(fieldName)) { - deserializedOSDisk.deleteOption = DiskDeleteOptionTypes.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOSDisk; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java deleted file mode 100644 index aa4f8900a696..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Profile for the OS Image Scheduled event. - */ -@Fluent -public final class OSImageNotificationProfile implements JsonSerializable { - /* - * Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS - * Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 - * format, and the value must be 15 minutes (PT15M) - */ - private String notBeforeTimeout; - - /* - * Specifies whether the OS Image Scheduled event is enabled or disabled. - */ - private Boolean enable; - - /** - * Creates an instance of OSImageNotificationProfile class. - */ - public OSImageNotificationProfile() { - } - - /** - * Get the notBeforeTimeout property: Length of time a Virtual Machine being reimaged or having its OS upgraded will - * have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The - * configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M). - * - * @return the notBeforeTimeout value. - */ - public String notBeforeTimeout() { - return this.notBeforeTimeout; - } - - /** - * Set the notBeforeTimeout property: Length of time a Virtual Machine being reimaged or having its OS upgraded will - * have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The - * configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M). - * - * @param notBeforeTimeout the notBeforeTimeout value to set. - * @return the OSImageNotificationProfile object itself. - */ - public OSImageNotificationProfile withNotBeforeTimeout(String notBeforeTimeout) { - this.notBeforeTimeout = notBeforeTimeout; - return this; - } - - /** - * Get the enable property: Specifies whether the OS Image Scheduled event is enabled or disabled. - * - * @return the enable value. - */ - public Boolean enable() { - return this.enable; - } - - /** - * Set the enable property: Specifies whether the OS Image Scheduled event is enabled or disabled. - * - * @param enable the enable value to set. - * @return the OSImageNotificationProfile object itself. - */ - public OSImageNotificationProfile withEnable(Boolean enable) { - this.enable = enable; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("notBeforeTimeout", this.notBeforeTimeout); - jsonWriter.writeBooleanField("enable", this.enable); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OSImageNotificationProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OSImageNotificationProfile if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OSImageNotificationProfile. - */ - public static OSImageNotificationProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OSImageNotificationProfile deserializedOSImageNotificationProfile = new OSImageNotificationProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("notBeforeTimeout".equals(fieldName)) { - deserializedOSImageNotificationProfile.notBeforeTimeout = reader.getString(); - } else if ("enable".equals(fieldName)) { - deserializedOSImageNotificationProfile.enable = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedOSImageNotificationProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java deleted file mode 100644 index 2da333456319..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java +++ /dev/null @@ -1,411 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is - * provisioned. - */ -@Fluent -public final class OSProfile implements JsonSerializable { - /* - * Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. - * **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For naming conventions and - * restrictions see [Azure infrastructure services implementation - * guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). - */ - private String computerName; - - /* - * Specifies the name of the administrator account.

      This property cannot be updated after the VM is - * created.

      **Windows-only restriction:** Cannot end in "."

      **Disallowed values:** - * "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", - * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", - * "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

      **Minimum-length - * (Linux):** 1 character

      **Max-length (Linux):** 64 characters

      **Max-length (Windows):** 20 - * characters. - */ - private String adminUsername; - - /* - * Specifies the password of the administrator account.

      **Minimum-length (Windows):** 8 characters

      - * **Minimum-length (Linux):** 6 characters

      **Max-length (Windows):** 123 characters

      **Max-length - * (Linux):** 72 characters

      **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled - *
      Has lower characters
      Has upper characters
      Has a digit
      Has a special character (Regex match - * [\W_])

      **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", - * "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

      For resetting the password, see [How - * to reset the Remote Desktop service or its login password in a Windows - * VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

      For resetting root - * password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) - */ - private String adminPassword; - - /* - * Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that - * is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not - * pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. - * The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on - * Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init - * for your Linux VM, see [Using cloud-init to customize a Linux VM during - * creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). - */ - private String customData; - - /* - * Specifies Windows operating system settings on the virtual machine. - */ - private WindowsConfiguration windowsConfiguration; - - /* - * Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux - * distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). - */ - private LinuxConfiguration linuxConfiguration; - - /* - * Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a - * virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for - * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault - * virtual machine extension for - * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - */ - private List secrets; - - /* - * Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False - * when no extensions are present on the virtual machine. - */ - private Boolean allowExtensionOperations; - - /* - * Optional property which must either be set to True or omitted. - */ - private Boolean requireGuestProvisionSignal; - - /** - * Creates an instance of OSProfile class. - */ - public OSProfile() { - } - - /** - * Get the computerName property: Specifies the host OS name of the virtual machine. This name cannot be updated - * after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For - * naming conventions and restrictions see [Azure infrastructure services implementation - * guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). - * - * @return the computerName value. - */ - public String computerName() { - return this.computerName; - } - - /** - * Set the computerName property: Specifies the host OS name of the virtual machine. This name cannot be updated - * after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For - * naming conventions and restrictions see [Azure infrastructure services implementation - * guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). - * - * @param computerName the computerName value to set. - * @return the OSProfile object itself. - */ - public OSProfile withComputerName(String computerName) { - this.computerName = computerName; - return this; - } - - /** - * Get the adminUsername property: Specifies the name of the administrator account. <br><br> This - * property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end - * in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", - * "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", - * "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - * "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length - * (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. - * - * @return the adminUsername value. - */ - public String adminUsername() { - return this.adminUsername; - } - - /** - * Set the adminUsername property: Specifies the name of the administrator account. <br><br> This - * property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end - * in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", - * "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", - * "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", - * "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length - * (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. - * - * @param adminUsername the adminUsername value to set. - * @return the OSProfile object itself. - */ - public OSProfile withAdminUsername(String adminUsername) { - this.adminUsername = adminUsername; - return this; - } - - /** - * Get the adminPassword property: Specifies the password of the administrator account. <br><br> - * **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters - * <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 - * characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled - * <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special - * character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", - * "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - * "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its - * login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) - * <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure - * Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). - * - * @return the adminPassword value. - */ - public String adminPassword() { - return this.adminPassword; - } - - /** - * Set the adminPassword property: Specifies the password of the administrator account. <br><br> - * **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters - * <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 - * characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled - * <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special - * character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", - * "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - * "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its - * login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) - * <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure - * Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). - * - * @param adminPassword the adminPassword value to set. - * @return the OSProfile object itself. - */ - public OSProfile withAdminPassword(String adminPassword) { - this.adminPassword = adminPassword; - return this; - } - - /** - * Get the customData property: Specifies a base-64 encoded string of custom data. The base-64 encoded string is - * decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array - * is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be - * updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more - * information see [Custom Data on Azure - * VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for - * your Linux VM, see [Using cloud-init to customize a Linux VM during - * creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). - * - * @return the customData value. - */ - public String customData() { - return this.customData; - } - - /** - * Set the customData property: Specifies a base-64 encoded string of custom data. The base-64 encoded string is - * decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array - * is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be - * updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more - * information see [Custom Data on Azure - * VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for - * your Linux VM, see [Using cloud-init to customize a Linux VM during - * creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). - * - * @param customData the customData value to set. - * @return the OSProfile object itself. - */ - public OSProfile withCustomData(String customData) { - this.customData = customData; - return this; - } - - /** - * Get the windowsConfiguration property: Specifies Windows operating system settings on the virtual machine. - * - * @return the windowsConfiguration value. - */ - public WindowsConfiguration windowsConfiguration() { - return this.windowsConfiguration; - } - - /** - * Set the windowsConfiguration property: Specifies Windows operating system settings on the virtual machine. - * - * @param windowsConfiguration the windowsConfiguration value to set. - * @return the OSProfile object itself. - */ - public OSProfile withWindowsConfiguration(WindowsConfiguration windowsConfiguration) { - this.windowsConfiguration = windowsConfiguration; - return this; - } - - /** - * Get the linuxConfiguration property: Specifies the Linux operating system settings on the virtual machine. For a - * list of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). - * - * @return the linuxConfiguration value. - */ - public LinuxConfiguration linuxConfiguration() { - return this.linuxConfiguration; - } - - /** - * Set the linuxConfiguration property: Specifies the Linux operating system settings on the virtual machine. For a - * list of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). - * - * @param linuxConfiguration the linuxConfiguration value to set. - * @return the OSProfile object itself. - */ - public OSProfile withLinuxConfiguration(LinuxConfiguration linuxConfiguration) { - this.linuxConfiguration = linuxConfiguration; - return this; - } - - /** - * Get the secrets property: Specifies set of certificates that should be installed onto the virtual machine. To - * install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension - * for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault - * virtual machine extension for - * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: Specifies set of certificates that should be installed onto the virtual machine. To - * install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension - * for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault - * virtual machine extension for - * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - * - * @param secrets the secrets value to set. - * @return the OSProfile object itself. - */ - public OSProfile withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the allowExtensionOperations property: Specifies whether extension operations should be allowed on the - * virtual machine. This may only be set to False when no extensions are present on the virtual machine. - * - * @return the allowExtensionOperations value. - */ - public Boolean allowExtensionOperations() { - return this.allowExtensionOperations; - } - - /** - * Set the allowExtensionOperations property: Specifies whether extension operations should be allowed on the - * virtual machine. This may only be set to False when no extensions are present on the virtual machine. - * - * @param allowExtensionOperations the allowExtensionOperations value to set. - * @return the OSProfile object itself. - */ - public OSProfile withAllowExtensionOperations(Boolean allowExtensionOperations) { - this.allowExtensionOperations = allowExtensionOperations; - return this; - } - - /** - * Get the requireGuestProvisionSignal property: Optional property which must either be set to True or omitted. - * - * @return the requireGuestProvisionSignal value. - */ - public Boolean requireGuestProvisionSignal() { - return this.requireGuestProvisionSignal; - } - - /** - * Set the requireGuestProvisionSignal property: Optional property which must either be set to True or omitted. - * - * @param requireGuestProvisionSignal the requireGuestProvisionSignal value to set. - * @return the OSProfile object itself. - */ - public OSProfile withRequireGuestProvisionSignal(Boolean requireGuestProvisionSignal) { - this.requireGuestProvisionSignal = requireGuestProvisionSignal; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computerName", this.computerName); - jsonWriter.writeStringField("adminUsername", this.adminUsername); - jsonWriter.writeStringField("adminPassword", this.adminPassword); - jsonWriter.writeStringField("customData", this.customData); - jsonWriter.writeJsonField("windowsConfiguration", this.windowsConfiguration); - jsonWriter.writeJsonField("linuxConfiguration", this.linuxConfiguration); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeBooleanField("allowExtensionOperations", this.allowExtensionOperations); - jsonWriter.writeBooleanField("requireGuestProvisionSignal", this.requireGuestProvisionSignal); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OSProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OSProfile if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the OSProfile. - */ - public static OSProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OSProfile deserializedOSProfile = new OSProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computerName".equals(fieldName)) { - deserializedOSProfile.computerName = reader.getString(); - } else if ("adminUsername".equals(fieldName)) { - deserializedOSProfile.adminUsername = reader.getString(); - } else if ("adminPassword".equals(fieldName)) { - deserializedOSProfile.adminPassword = reader.getString(); - } else if ("customData".equals(fieldName)) { - deserializedOSProfile.customData = reader.getString(); - } else if ("windowsConfiguration".equals(fieldName)) { - deserializedOSProfile.windowsConfiguration = WindowsConfiguration.fromJson(reader); - } else if ("linuxConfiguration".equals(fieldName)) { - deserializedOSProfile.linuxConfiguration = LinuxConfiguration.fromJson(reader); - } else if ("secrets".equals(fieldName)) { - List secrets = reader.readArray(reader1 -> VaultSecretGroup.fromJson(reader1)); - deserializedOSProfile.secrets = secrets; - } else if ("allowExtensionOperations".equals(fieldName)) { - deserializedOSProfile.allowExtensionOperations = reader.getNullable(JsonReader::getBoolean); - } else if ("requireGuestProvisionSignal".equals(fieldName)) { - deserializedOSProfile.requireGuestProvisionSignal = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedOSProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java deleted file mode 100644 index aa10c3aa1fe3..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * This property allows you to specify the supported type of the OS that application is built for. Possible values are: - * **Windows,** **Linux.**. - */ -public final class OperatingSystemTypes extends ExpandableStringEnum { - /** - * Windows OS. - */ - public static final OperatingSystemTypes WINDOWS = fromString("Windows"); - - /** - * Linux OS. - */ - public static final OperatingSystemTypes LINUX = fromString("Linux"); - - /** - * Creates a new instance of OperatingSystemTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperatingSystemTypes() { - } - - /** - * Creates or finds a OperatingSystemTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperatingSystemTypes. - */ - public static OperatingSystemTypes fromString(String name) { - return fromString(name, OperatingSystemTypes.class); - } - - /** - * Gets known OperatingSystemTypes values. - * - * @return known OperatingSystemTypes values. - */ - public static Collection values() { - return values(OperatingSystemTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java deleted file mode 100644 index 6fd682cef751..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The supported operating system types for flex VM creation. - */ -public final class OsType extends ExpandableStringEnum { - /** - * Windows operating system. - */ - public static final OsType WINDOWS = fromString("Windows"); - - /** - * Linux operating system. - */ - public static final OsType LINUX = fromString("Linux"); - - /** - * Creates a new instance of OsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OsType() { - } - - /** - * Creates or finds a OsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OsType. - */ - public static OsType fromString(String name) { - return fromString(name, OsType.class); - } - - /** - * Gets known OsType values. - * - * @return known OsType values. - */ - public static Collection values() { - return values(OsType.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java deleted file mode 100644 index b2a8797bcd70..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies settings related to VM Guest Patching on Windows. - */ -@Fluent -public final class PatchSettings implements JsonSerializable { - /* - * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine - * scale set with OrchestrationMode as Flexible.

      Possible values are:

      **Manual** - You - * control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. - * In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be - * false

      **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property - * WindowsConfiguration.enableAutomaticUpdates must be true.

      **AutomaticByPlatform** - the virtual - * machine will automatically updated by the platform. The properties provisionVMAgent and - * WindowsConfiguration.enableAutomaticUpdates must be true - */ - private WindowsVMGuestPatchMode patchMode; - - /* - * Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the - * 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'. - */ - private Boolean enableHotpatching; - - /* - * Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

      Possible values are:

      **ImageDefault** - You control the timing of patch assessments on a virtual machine.

      - * **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent - * must be true. - */ - private WindowsPatchAssessmentMode assessmentMode; - - /* - * Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows. - */ - private WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings; - - /** - * Creates an instance of PatchSettings class. - */ - public PatchSettings() { - } - - /** - * Get the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines - * associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible - * values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You - * do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property - * WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual - * machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be - * true. <br /><br /> **AutomaticByPlatform** - the virtual machine will automatically updated by the - * platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. - * - * @return the patchMode value. - */ - public WindowsVMGuestPatchMode patchMode() { - return this.patchMode; - } - - /** - * Set the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines - * associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible - * values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You - * do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property - * WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual - * machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be - * true. <br /><br /> **AutomaticByPlatform** - the virtual machine will automatically updated by the - * platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. - * - * @param patchMode the patchMode value to set. - * @return the PatchSettings object itself. - */ - public PatchSettings withPatchMode(WindowsVMGuestPatchMode patchMode) { - this.patchMode = patchMode; - return this; - } - - /** - * Get the enableHotpatching property: Enables customers to patch their Azure VMs without requiring a reboot. For - * enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to - * 'AutomaticByPlatform'. - * - * @return the enableHotpatching value. - */ - public Boolean enableHotpatching() { - return this.enableHotpatching; - } - - /** - * Set the enableHotpatching property: Enables customers to patch their Azure VMs without requiring a reboot. For - * enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to - * 'AutomaticByPlatform'. - * - * @param enableHotpatching the enableHotpatching value to set. - * @return the PatchSettings object itself. - */ - public PatchSettings withEnableHotpatching(Boolean enableHotpatching) { - this.enableHotpatching = enableHotpatching; - return this; - } - - /** - * Get the assessmentMode property: Specifies the mode of VM Guest patch assessment for the IaaS virtual - * machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the - * timing of patch assessments on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform - * will trigger periodic patch assessments. The property provisionVMAgent must be true. - * - * @return the assessmentMode value. - */ - public WindowsPatchAssessmentMode assessmentMode() { - return this.assessmentMode; - } - - /** - * Set the assessmentMode property: Specifies the mode of VM Guest patch assessment for the IaaS virtual - * machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the - * timing of patch assessments on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform - * will trigger periodic patch assessments. The property provisionVMAgent must be true. - * - * @param assessmentMode the assessmentMode value to set. - * @return the PatchSettings object itself. - */ - public PatchSettings withAssessmentMode(WindowsPatchAssessmentMode assessmentMode) { - this.assessmentMode = assessmentMode; - return this; - } - - /** - * Get the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in - * VM Guest Patching on Windows. - * - * @return the automaticByPlatformSettings value. - */ - public WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings() { - return this.automaticByPlatformSettings; - } - - /** - * Set the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in - * VM Guest Patching on Windows. - * - * @param automaticByPlatformSettings the automaticByPlatformSettings value to set. - * @return the PatchSettings object itself. - */ - public PatchSettings - withAutomaticByPlatformSettings(WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings) { - this.automaticByPlatformSettings = automaticByPlatformSettings; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("patchMode", this.patchMode == null ? null : this.patchMode.toString()); - jsonWriter.writeBooleanField("enableHotpatching", this.enableHotpatching); - jsonWriter.writeStringField("assessmentMode", - this.assessmentMode == null ? null : this.assessmentMode.toString()); - jsonWriter.writeJsonField("automaticByPlatformSettings", this.automaticByPlatformSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PatchSettings. - */ - public static PatchSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchSettings deserializedPatchSettings = new PatchSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("patchMode".equals(fieldName)) { - deserializedPatchSettings.patchMode = WindowsVMGuestPatchMode.fromString(reader.getString()); - } else if ("enableHotpatching".equals(fieldName)) { - deserializedPatchSettings.enableHotpatching = reader.getNullable(JsonReader::getBoolean); - } else if ("assessmentMode".equals(fieldName)) { - deserializedPatchSettings.assessmentMode - = WindowsPatchAssessmentMode.fromString(reader.getString()); - } else if ("automaticByPlatformSettings".equals(fieldName)) { - deserializedPatchSettings.automaticByPlatformSettings - = WindowsVMGuestPatchAutomaticByPlatformSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchSettings; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java deleted file mode 100644 index eeae1e1a850f..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Describes the user-defined constraints for resource hardware placement. - */ -@Fluent -public final class Placement implements JsonSerializable { - /* - * Specifies the policy for resource's placement in availability zone. Possible values are: **Any** (used for - * Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An availability zone will be automatically - * picked by system as part of resource creation. - */ - private ZonePlacementPolicyType zonePlacementPolicy; - - /* - * This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any'/'Auto', - * availability zone selected by the system must be present in the list of availability zones passed with - * 'includeZones'. If 'includeZones' is not provided, all availability zones in region will be considered for - * selection. - */ - private List includeZones; - - /* - * This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any'/'Auto', - * availability zone selected by the system must not be present in the list of availability zones passed with - * 'excludeZones'. If 'excludeZones' is not provided, all availability zones in region will be considered for - * selection. - */ - private List excludeZones; - - /** - * Creates an instance of Placement class. - */ - public Placement() { - } - - /** - * Get the zonePlacementPolicy property: Specifies the policy for resource's placement in availability zone. - * Possible values are: **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An - * availability zone will be automatically picked by system as part of resource creation. - * - * @return the zonePlacementPolicy value. - */ - public ZonePlacementPolicyType zonePlacementPolicy() { - return this.zonePlacementPolicy; - } - - /** - * Set the zonePlacementPolicy property: Specifies the policy for resource's placement in availability zone. - * Possible values are: **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An - * availability zone will be automatically picked by system as part of resource creation. - * - * @param zonePlacementPolicy the zonePlacementPolicy value to set. - * @return the Placement object itself. - */ - public Placement withZonePlacementPolicy(ZonePlacementPolicyType zonePlacementPolicy) { - this.zonePlacementPolicy = zonePlacementPolicy; - return this; - } - - /** - * Get the includeZones property: This property supplements the 'zonePlacementPolicy' property. If - * 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must be present in the - * list of availability zones passed with 'includeZones'. If 'includeZones' is not provided, all availability zones - * in region will be considered for selection. - * - * @return the includeZones value. - */ - public List includeZones() { - return this.includeZones; - } - - /** - * Set the includeZones property: This property supplements the 'zonePlacementPolicy' property. If - * 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must be present in the - * list of availability zones passed with 'includeZones'. If 'includeZones' is not provided, all availability zones - * in region will be considered for selection. - * - * @param includeZones the includeZones value to set. - * @return the Placement object itself. - */ - public Placement withIncludeZones(List includeZones) { - this.includeZones = includeZones; - return this; - } - - /** - * Get the excludeZones property: This property supplements the 'zonePlacementPolicy' property. If - * 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must not be present in the - * list of availability zones passed with 'excludeZones'. If 'excludeZones' is not provided, all availability zones - * in region will be considered for selection. - * - * @return the excludeZones value. - */ - public List excludeZones() { - return this.excludeZones; - } - - /** - * Set the excludeZones property: This property supplements the 'zonePlacementPolicy' property. If - * 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must not be present in the - * list of availability zones passed with 'excludeZones'. If 'excludeZones' is not provided, all availability zones - * in region will be considered for selection. - * - * @param excludeZones the excludeZones value to set. - * @return the Placement object itself. - */ - public Placement withExcludeZones(List excludeZones) { - this.excludeZones = excludeZones; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("zonePlacementPolicy", - this.zonePlacementPolicy == null ? null : this.zonePlacementPolicy.toString()); - jsonWriter.writeArrayField("includeZones", this.includeZones, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("excludeZones", this.excludeZones, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Placement from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Placement if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Placement. - */ - public static Placement fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Placement deserializedPlacement = new Placement(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("zonePlacementPolicy".equals(fieldName)) { - deserializedPlacement.zonePlacementPolicy = ZonePlacementPolicyType.fromString(reader.getString()); - } else if ("includeZones".equals(fieldName)) { - List includeZones = reader.readArray(reader1 -> reader1.getString()); - deserializedPlacement.includeZones = includeZones; - } else if ("excludeZones".equals(fieldName)) { - List excludeZones = reader.readArray(reader1 -> reader1.getString()); - deserializedPlacement.excludeZones = excludeZones; - } else { - reader.skipChildren(); - } - } - - return deserializedPlacement; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java deleted file mode 100644 index 239740e0034b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Plan for the resource. - */ -@Fluent -public final class Plan implements JsonSerializable { - /* - * A user defined name of the 3rd Party Artifact that is being procured. - */ - private String name; - - /* - * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic - */ - private String publisher; - - /* - * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the - * artifact at the time of Data Market onboarding. - */ - private String product; - - /* - * A publisher provided promotion code as provisioned in Data Market for the said product/artifact. - */ - private String promotionCode; - - /* - * The version of the desired product/artifact. - */ - private String version; - - /** - * Creates an instance of Plan class. - */ - public Plan() { - } - - /** - * Get the name property: A user defined name of the 3rd Party Artifact that is being procured. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: A user defined name of the 3rd Party Artifact that is being procured. - * - * @param name the name value to set. - * @return the Plan object itself. - */ - public Plan withName(String name) { - this.name = name; - return this; - } - - /** - * Get the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. - * - * @return the publisher value. - */ - public String publisher() { - return this.publisher; - } - - /** - * Set the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. - * - * @param publisher the publisher value to set. - * @return the Plan object itself. - */ - public Plan withPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - /** - * Get the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the - * OfferID specified for the artifact at the time of Data Market onboarding. - * - * @return the product value. - */ - public String product() { - return this.product; - } - - /** - * Set the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the - * OfferID specified for the artifact at the time of Data Market onboarding. - * - * @param product the product value to set. - * @return the Plan object itself. - */ - public Plan withProduct(String product) { - this.product = product; - return this; - } - - /** - * Get the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said - * product/artifact. - * - * @return the promotionCode value. - */ - public String promotionCode() { - return this.promotionCode; - } - - /** - * Set the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said - * product/artifact. - * - * @param promotionCode the promotionCode value to set. - * @return the Plan object itself. - */ - public Plan withPromotionCode(String promotionCode) { - this.promotionCode = promotionCode; - return this; - } - - /** - * Get the version property: The version of the desired product/artifact. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version of the desired product/artifact. - * - * @param version the version value to set. - * @return the Plan object itself. - */ - public Plan withVersion(String version) { - this.version = version; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("publisher", this.publisher); - jsonWriter.writeStringField("product", this.product); - jsonWriter.writeStringField("promotionCode", this.promotionCode); - jsonWriter.writeStringField("version", this.version); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Plan from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Plan if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Plan. - */ - public static Plan fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Plan deserializedPlan = new Plan(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedPlan.name = reader.getString(); - } else if ("publisher".equals(fieldName)) { - deserializedPlan.publisher = reader.getString(); - } else if ("product".equals(fieldName)) { - deserializedPlan.product = reader.getString(); - } else if ("promotionCode".equals(fieldName)) { - deserializedPlan.promotionCode = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedPlan.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPlan; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java deleted file mode 100644 index 52803cf537b1..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The priority profile for flex VM creation. - */ -@Fluent -public final class PriorityProfile implements JsonSerializable { - /* - * The priority type for VM allocation - */ - private PriorityType type; - - /* - * The allocation strategy for VM size selection - */ - private AllocationStrategy allocationStrategy; - - /** - * Creates an instance of PriorityProfile class. - */ - public PriorityProfile() { - } - - /** - * Get the type property: The priority type for VM allocation. - * - * @return the type value. - */ - public PriorityType type() { - return this.type; - } - - /** - * Set the type property: The priority type for VM allocation. - * - * @param type the type value to set. - * @return the PriorityProfile object itself. - */ - public PriorityProfile withType(PriorityType type) { - this.type = type; - return this; - } - - /** - * Get the allocationStrategy property: The allocation strategy for VM size selection. - * - * @return the allocationStrategy value. - */ - public AllocationStrategy allocationStrategy() { - return this.allocationStrategy; - } - - /** - * Set the allocationStrategy property: The allocation strategy for VM size selection. - * - * @param allocationStrategy the allocationStrategy value to set. - * @return the PriorityProfile object itself. - */ - public PriorityProfile withAllocationStrategy(AllocationStrategy allocationStrategy) { - this.allocationStrategy = allocationStrategy; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("allocationStrategy", - this.allocationStrategy == null ? null : this.allocationStrategy.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PriorityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PriorityProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PriorityProfile. - */ - public static PriorityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PriorityProfile deserializedPriorityProfile = new PriorityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedPriorityProfile.type = PriorityType.fromString(reader.getString()); - } else if ("allocationStrategy".equals(fieldName)) { - deserializedPriorityProfile.allocationStrategy = AllocationStrategy.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPriorityProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java deleted file mode 100644 index 8c0bd0109b40..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The priority type for VM allocation. - */ -public final class PriorityType extends ExpandableStringEnum { - /** - * Regular priority VMs. - */ - public static final PriorityType REGULAR = fromString("Regular"); - - /** - * Spot priority VMs. - */ - public static final PriorityType SPOT = fromString("Spot"); - - /** - * Creates a new instance of PriorityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PriorityType() { - } - - /** - * Creates or finds a PriorityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PriorityType. - */ - public static PriorityType fromString(String name) { - return fromString(name, PriorityType.class); - } - - /** - * Gets known PriorityType values. - * - * @return known PriorityType values. - */ - public static Collection values() { - return values(PriorityType.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java deleted file mode 100644 index c6af7d0c7008..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. - */ -public final class ProtocolTypes extends ExpandableStringEnum { - /** - * Http protocol. - */ - public static final ProtocolTypes HTTP = fromString("Http"); - - /** - * Https protocol. - */ - public static final ProtocolTypes HTTPS = fromString("Https"); - - /** - * Creates a new instance of ProtocolTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProtocolTypes() { - } - - /** - * Creates or finds a ProtocolTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProtocolTypes. - */ - public static ProtocolTypes fromString(String name) { - return fromString(name, ProtocolTypes.class); - } - - /** - * Gets known ProtocolTypes values. - * - * @return known ProtocolTypes values. - */ - public static Collection values() { - return values(ProtocolTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java deleted file mode 100644 index 64fb6363d31a..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies ProxyAgent settings for the virtual machine or virtual machine scale set. Minimum api-version: 2023-09-01. - */ -@Fluent -public final class ProxyAgentSettings implements JsonSerializable { - /* - * Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual machine scale set. - */ - private Boolean enabled; - - /* - * Specifies the mode that ProxyAgent will execute on. Warning: this property has been deprecated, please specify - * 'mode' under particular hostendpoint setting. - */ - private Mode mode; - - /* - * Increase the value of this property allows users to reset the key used for securing communication channel between - * guest and host. - */ - private Integer keyIncarnationId; - - /* - * Specifies the Wire Server endpoint settings while creating the virtual machine or virtual machine scale set. - * Minimum api-version: 2024-03-01. - */ - private HostEndpointSettings wireServer; - - /* - * Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine scale set. Minimum - * api-version: 2024-03-01. - */ - private HostEndpointSettings imds; - - /* - * Specify whether to implicitly install the ProxyAgent Extension. This option is currently applicable only for - * Linux Os. - */ - private Boolean addProxyAgentExtension; - - /** - * Creates an instance of ProxyAgentSettings class. - */ - public ProxyAgentSettings() { - } - - /** - * Get the enabled property: Specifies whether ProxyAgent feature should be enabled on the virtual machine or - * virtual machine scale set. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Specifies whether ProxyAgent feature should be enabled on the virtual machine or - * virtual machine scale set. - * - * @param enabled the enabled value to set. - * @return the ProxyAgentSettings object itself. - */ - public ProxyAgentSettings withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the mode property: Specifies the mode that ProxyAgent will execute on. Warning: this property has been - * deprecated, please specify 'mode' under particular hostendpoint setting. - * - * @return the mode value. - */ - public Mode mode() { - return this.mode; - } - - /** - * Set the mode property: Specifies the mode that ProxyAgent will execute on. Warning: this property has been - * deprecated, please specify 'mode' under particular hostendpoint setting. - * - * @param mode the mode value to set. - * @return the ProxyAgentSettings object itself. - */ - public ProxyAgentSettings withMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get the keyIncarnationId property: Increase the value of this property allows users to reset the key used for - * securing communication channel between guest and host. - * - * @return the keyIncarnationId value. - */ - public Integer keyIncarnationId() { - return this.keyIncarnationId; - } - - /** - * Set the keyIncarnationId property: Increase the value of this property allows users to reset the key used for - * securing communication channel between guest and host. - * - * @param keyIncarnationId the keyIncarnationId value to set. - * @return the ProxyAgentSettings object itself. - */ - public ProxyAgentSettings withKeyIncarnationId(Integer keyIncarnationId) { - this.keyIncarnationId = keyIncarnationId; - return this; - } - - /** - * Get the wireServer property: Specifies the Wire Server endpoint settings while creating the virtual machine or - * virtual machine scale set. Minimum api-version: 2024-03-01. - * - * @return the wireServer value. - */ - public HostEndpointSettings wireServer() { - return this.wireServer; - } - - /** - * Set the wireServer property: Specifies the Wire Server endpoint settings while creating the virtual machine or - * virtual machine scale set. Minimum api-version: 2024-03-01. - * - * @param wireServer the wireServer value to set. - * @return the ProxyAgentSettings object itself. - */ - public ProxyAgentSettings withWireServer(HostEndpointSettings wireServer) { - this.wireServer = wireServer; - return this; - } - - /** - * Get the imds property: Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine - * scale set. Minimum api-version: 2024-03-01. - * - * @return the imds value. - */ - public HostEndpointSettings imds() { - return this.imds; - } - - /** - * Set the imds property: Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine - * scale set. Minimum api-version: 2024-03-01. - * - * @param imds the imds value to set. - * @return the ProxyAgentSettings object itself. - */ - public ProxyAgentSettings withImds(HostEndpointSettings imds) { - this.imds = imds; - return this; - } - - /** - * Get the addProxyAgentExtension property: Specify whether to implicitly install the ProxyAgent Extension. This - * option is currently applicable only for Linux Os. - * - * @return the addProxyAgentExtension value. - */ - public Boolean addProxyAgentExtension() { - return this.addProxyAgentExtension; - } - - /** - * Set the addProxyAgentExtension property: Specify whether to implicitly install the ProxyAgent Extension. This - * option is currently applicable only for Linux Os. - * - * @param addProxyAgentExtension the addProxyAgentExtension value to set. - * @return the ProxyAgentSettings object itself. - */ - public ProxyAgentSettings withAddProxyAgentExtension(Boolean addProxyAgentExtension) { - this.addProxyAgentExtension = addProxyAgentExtension; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeNumberField("keyIncarnationId", this.keyIncarnationId); - jsonWriter.writeJsonField("wireServer", this.wireServer); - jsonWriter.writeJsonField("imds", this.imds); - jsonWriter.writeBooleanField("addProxyAgentExtension", this.addProxyAgentExtension); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProxyAgentSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProxyAgentSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ProxyAgentSettings. - */ - public static ProxyAgentSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProxyAgentSettings deserializedProxyAgentSettings = new ProxyAgentSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedProxyAgentSettings.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("mode".equals(fieldName)) { - deserializedProxyAgentSettings.mode = Mode.fromString(reader.getString()); - } else if ("keyIncarnationId".equals(fieldName)) { - deserializedProxyAgentSettings.keyIncarnationId = reader.getNullable(JsonReader::getInt); - } else if ("wireServer".equals(fieldName)) { - deserializedProxyAgentSettings.wireServer = HostEndpointSettings.fromJson(reader); - } else if ("imds".equals(fieldName)) { - deserializedProxyAgentSettings.imds = HostEndpointSettings.fromJson(reader); - } else if ("addProxyAgentExtension".equals(fieldName)) { - deserializedProxyAgentSettings.addProxyAgentExtension = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedProxyAgentSettings; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java deleted file mode 100644 index 67be874c1564..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. - */ -@Fluent -public final class PublicIPAddressSku implements JsonSerializable { - /* - * Specify public IP sku name - */ - private PublicIPAddressSkuName name; - - /* - * Specify public IP sku tier - */ - private PublicIPAddressSkuTier tier; - - /** - * Creates an instance of PublicIPAddressSku class. - */ - public PublicIPAddressSku() { - } - - /** - * Get the name property: Specify public IP sku name. - * - * @return the name value. - */ - public PublicIPAddressSkuName name() { - return this.name; - } - - /** - * Set the name property: Specify public IP sku name. - * - * @param name the name value to set. - * @return the PublicIPAddressSku object itself. - */ - public PublicIPAddressSku withName(PublicIPAddressSkuName name) { - this.name = name; - return this; - } - - /** - * Get the tier property: Specify public IP sku tier. - * - * @return the tier value. - */ - public PublicIPAddressSkuTier tier() { - return this.tier; - } - - /** - * Set the tier property: Specify public IP sku tier. - * - * @param tier the tier value to set. - * @return the PublicIPAddressSku object itself. - */ - public PublicIPAddressSku withTier(PublicIPAddressSkuTier tier) { - this.tier = tier; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PublicIPAddressSku from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PublicIPAddressSku if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PublicIPAddressSku. - */ - public static PublicIPAddressSku fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PublicIPAddressSku deserializedPublicIPAddressSku = new PublicIPAddressSku(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedPublicIPAddressSku.name = PublicIPAddressSkuName.fromString(reader.getString()); - } else if ("tier".equals(fieldName)) { - deserializedPublicIPAddressSku.tier = PublicIPAddressSkuTier.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPublicIPAddressSku; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java deleted file mode 100644 index cb730462672b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specify public IP sku name. - */ -public final class PublicIPAddressSkuName extends ExpandableStringEnum { - /** - * Basic IP sku name. - */ - public static final PublicIPAddressSkuName BASIC = fromString("Basic"); - - /** - * Standard IP sku name. - */ - public static final PublicIPAddressSkuName STANDARD = fromString("Standard"); - - /** - * Creates a new instance of PublicIPAddressSkuName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicIPAddressSkuName() { - } - - /** - * Creates or finds a PublicIPAddressSkuName from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicIPAddressSkuName. - */ - public static PublicIPAddressSkuName fromString(String name) { - return fromString(name, PublicIPAddressSkuName.class); - } - - /** - * Gets known PublicIPAddressSkuName values. - * - * @return known PublicIPAddressSkuName values. - */ - public static Collection values() { - return values(PublicIPAddressSkuName.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java deleted file mode 100644 index 6754b4a8edf4..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specify public IP sku tier. - */ -public final class PublicIPAddressSkuTier extends ExpandableStringEnum { - /** - * Regional IP address sku tier. - */ - public static final PublicIPAddressSkuTier REGIONAL = fromString("Regional"); - - /** - * Global IP address sku tier. - */ - public static final PublicIPAddressSkuTier GLOBAL = fromString("Global"); - - /** - * Creates a new instance of PublicIPAddressSkuTier value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicIPAddressSkuTier() { - } - - /** - * Creates or finds a PublicIPAddressSkuTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicIPAddressSkuTier. - */ - public static PublicIPAddressSkuTier fromString(String name) { - return fromString(name, PublicIPAddressSkuTier.class); - } - - /** - * Gets known PublicIPAddressSkuTier values. - * - * @return known PublicIPAddressSkuTier values. - */ - public static Collection values() { - return values(PublicIPAddressSkuTier.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java deleted file mode 100644 index 61b544d6ec31..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specify the public IP allocation type. - */ -public final class PublicIPAllocationMethod extends ExpandableStringEnum { - /** - * Dynamic IP allocation. - */ - public static final PublicIPAllocationMethod DYNAMIC = fromString("Dynamic"); - - /** - * Static IP allocation. - */ - public static final PublicIPAllocationMethod STATIC = fromString("Static"); - - /** - * Creates a new instance of PublicIPAllocationMethod value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicIPAllocationMethod() { - } - - /** - * Creates or finds a PublicIPAllocationMethod from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicIPAllocationMethod. - */ - public static PublicIPAllocationMethod fromString(String name) { - return fromString(name, PublicIPAllocationMethod.class); - } - - /** - * Gets known PublicIPAllocationMethod values. - * - * @return known PublicIPAllocationMethod values. - */ - public static Collection values() { - return values(PublicIPAllocationMethod.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java deleted file mode 100644 index f2ec0cbf4b56..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -/** - * The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an - * implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from - * the virtual machine scale set. - */ -public enum ResourceIdentityType { - /** - * Enum value SystemAssigned. - */ - SYSTEM_ASSIGNED("SystemAssigned"), - - /** - * Enum value UserAssigned. - */ - USER_ASSIGNED("UserAssigned"), - - /** - * Enum value SystemAssigned, UserAssigned. - */ - SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"), - - /** - * Enum value None. - */ - NONE("None"); - - /** - * The actual serialized value for a ResourceIdentityType instance. - */ - private final String value; - - ResourceIdentityType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ResourceIdentityType instance. - * - * @param value the serialized value to parse. - * @return the parsed ResourceIdentityType object, or null if unable to parse. - */ - public static ResourceIdentityType fromString(String value) { - if (value == null) { - return null; - } - ResourceIdentityType[] items = ResourceIdentityType.values(); - for (ResourceIdentityType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java index 2b24ebb8eac6..53b9fbf1d385 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java @@ -69,11 +69,6 @@ public final class ResourceOperationDetails implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java index e4fe9da5a924..53bfac62f4ce 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java @@ -31,16 +31,6 @@ public final class ResourceOperationType extends ExpandableStringEnum { - /* - * JSON object that contains VM properties that are common across all VMs in this batch - */ - private BulkVMConfiguration virtualMachineBaseProfile; - - /* - * JSON array that contains VM properties that should be overridden for each VM in the batch - */ - private List virtualMachineOverrides; - - /* - * Number of VMs to be created - */ - private int resourceCount; - - /* - * If resourceOverrides doesn't contain name, service will create name based on prefix and resourceCount - */ - private String resourcePrefix; - - /* - * The flex properties for flexible VM creation - */ - private FlexProperties flexProperties; - - /** - * Creates an instance of ResourceProvisionFlexPayload class. - */ - public ResourceProvisionFlexPayload() { - } - - /** - * Get the virtualMachineBaseProfile property: JSON object that contains VM properties that are common across all - * VMs in this batch. - * - * @return the virtualMachineBaseProfile value. - */ - public BulkVMConfiguration virtualMachineBaseProfile() { - return this.virtualMachineBaseProfile; - } - - /** - * Set the virtualMachineBaseProfile property: JSON object that contains VM properties that are common across all - * VMs in this batch. - * - * @param virtualMachineBaseProfile the virtualMachineBaseProfile value to set. - * @return the ResourceProvisionFlexPayload object itself. - */ - public ResourceProvisionFlexPayload withVirtualMachineBaseProfile(BulkVMConfiguration virtualMachineBaseProfile) { - this.virtualMachineBaseProfile = virtualMachineBaseProfile; - return this; - } - - /** - * Get the virtualMachineOverrides property: JSON array that contains VM properties that should be overridden for - * each VM in the batch. - * - * @return the virtualMachineOverrides value. - */ - public List virtualMachineOverrides() { - return this.virtualMachineOverrides; - } - - /** - * Set the virtualMachineOverrides property: JSON array that contains VM properties that should be overridden for - * each VM in the batch. - * - * @param virtualMachineOverrides the virtualMachineOverrides value to set. - * @return the ResourceProvisionFlexPayload object itself. - */ - public ResourceProvisionFlexPayload withVirtualMachineOverrides(List virtualMachineOverrides) { - this.virtualMachineOverrides = virtualMachineOverrides; - return this; - } - - /** - * Get the resourceCount property: Number of VMs to be created. - * - * @return the resourceCount value. - */ - public int resourceCount() { - return this.resourceCount; - } - - /** - * Set the resourceCount property: Number of VMs to be created. - * - * @param resourceCount the resourceCount value to set. - * @return the ResourceProvisionFlexPayload object itself. - */ - public ResourceProvisionFlexPayload withResourceCount(int resourceCount) { - this.resourceCount = resourceCount; - return this; - } - - /** - * Get the resourcePrefix property: If resourceOverrides doesn't contain name, service will create name based on - * prefix and resourceCount. - * - * @return the resourcePrefix value. - */ - public String resourcePrefix() { - return this.resourcePrefix; - } - - /** - * Set the resourcePrefix property: If resourceOverrides doesn't contain name, service will create name based on - * prefix and resourceCount. - * - * @param resourcePrefix the resourcePrefix value to set. - * @return the ResourceProvisionFlexPayload object itself. - */ - public ResourceProvisionFlexPayload withResourcePrefix(String resourcePrefix) { - this.resourcePrefix = resourcePrefix; - return this; - } - - /** - * Get the flexProperties property: The flex properties for flexible VM creation. - * - * @return the flexProperties value. - */ - public FlexProperties flexProperties() { - return this.flexProperties; - } - - /** - * Set the flexProperties property: The flex properties for flexible VM creation. - * - * @param flexProperties the flexProperties value to set. - * @return the ResourceProvisionFlexPayload object itself. - */ - public ResourceProvisionFlexPayload withFlexProperties(FlexProperties flexProperties) { - this.flexProperties = flexProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("resourceCount", this.resourceCount); - jsonWriter.writeJsonField("flexProperties", this.flexProperties); - jsonWriter.writeJsonField("virtualMachineBaseProfile", this.virtualMachineBaseProfile); - jsonWriter.writeArrayField("virtualMachineOverrides", this.virtualMachineOverrides, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("resourcePrefix", this.resourcePrefix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceProvisionFlexPayload from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceProvisionFlexPayload if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ResourceProvisionFlexPayload. - */ - public static ResourceProvisionFlexPayload fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceProvisionFlexPayload deserializedResourceProvisionFlexPayload = new ResourceProvisionFlexPayload(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceCount".equals(fieldName)) { - deserializedResourceProvisionFlexPayload.resourceCount = reader.getInt(); - } else if ("flexProperties".equals(fieldName)) { - deserializedResourceProvisionFlexPayload.flexProperties = FlexProperties.fromJson(reader); - } else if ("virtualMachineBaseProfile".equals(fieldName)) { - deserializedResourceProvisionFlexPayload.virtualMachineBaseProfile - = BulkVMConfiguration.fromJson(reader); - } else if ("virtualMachineOverrides".equals(fieldName)) { - List virtualMachineOverrides - = reader.readArray(reader1 -> BulkVMConfiguration.fromJson(reader1)); - deserializedResourceProvisionFlexPayload.virtualMachineOverrides = virtualMachineOverrides; - } else if ("resourcePrefix".equals(fieldName)) { - deserializedResourceProvisionFlexPayload.resourcePrefix = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceProvisionFlexPayload; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java index 6d6fa68232bf..809c721e4281 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java @@ -5,12 +5,14 @@ package com.azure.resourcemanager.computeschedule.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.util.List; +import java.util.Map; /** * Resource creation data model. @@ -18,18 +20,17 @@ @Fluent public final class ResourceProvisionPayload implements JsonSerializable { /* - * Virtual machine profile object that contains VM properties that are common across all VMs in this batch (if you - * want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in baseProfile) + * JSON object that contains VM properties that are common across all VMs in this batch (if you want to create 100 + * VMs in this request, and they all have same vmSize, then include vmSize in baseProfile) */ - private BulkVMConfiguration virtualMachineBaseProfile; + private Map baseProfile; /* - * Virtual machine profile array that contains VM properties that needs to be overridden for each VM in the batch - * (if you want to create 100 VMs, they all need a distinct computerName property, you pass computerNames for each - * VM in batch in this array), service will merge baseProfile with VM specific overrides and create a merged - * VMProfile. + * JSON array, that contains VM properties that should to be overridden for each VM in the batch (if you want to + * create 100 VMs, they all need a distinct computerName property, you pass computerNames for each VM in batch in + * this array), service will merge baseProfile with VM specific overrides and create a merged VMProfile. */ - private List virtualMachineOverrides; + private List> resourceOverrides; /* * Number of VMs to be created @@ -49,52 +50,52 @@ public ResourceProvisionPayload() { } /** - * Get the virtualMachineBaseProfile property: Virtual machine profile object that contains VM properties that are - * common across all VMs in this batch (if you want to create 100 VMs in this request, and they all have same - * vmSize, then include vmSize in baseProfile). + * Get the baseProfile property: JSON object that contains VM properties that are common across all VMs in this + * batch (if you want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in + * baseProfile). * - * @return the virtualMachineBaseProfile value. + * @return the baseProfile value. */ - public BulkVMConfiguration virtualMachineBaseProfile() { - return this.virtualMachineBaseProfile; + public Map baseProfile() { + return this.baseProfile; } /** - * Set the virtualMachineBaseProfile property: Virtual machine profile object that contains VM properties that are - * common across all VMs in this batch (if you want to create 100 VMs in this request, and they all have same - * vmSize, then include vmSize in baseProfile). + * Set the baseProfile property: JSON object that contains VM properties that are common across all VMs in this + * batch (if you want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in + * baseProfile). * - * @param virtualMachineBaseProfile the virtualMachineBaseProfile value to set. + * @param baseProfile the baseProfile value to set. * @return the ResourceProvisionPayload object itself. */ - public ResourceProvisionPayload withVirtualMachineBaseProfile(BulkVMConfiguration virtualMachineBaseProfile) { - this.virtualMachineBaseProfile = virtualMachineBaseProfile; + public ResourceProvisionPayload withBaseProfile(Map baseProfile) { + this.baseProfile = baseProfile; return this; } /** - * Get the virtualMachineOverrides property: Virtual machine profile array that contains VM properties that needs to - * be overridden for each VM in the batch (if you want to create 100 VMs, they all need a distinct computerName - * property, you pass computerNames for each VM in batch in this array), service will merge baseProfile with VM - * specific overrides and create a merged VMProfile. + * Get the resourceOverrides property: JSON array, that contains VM properties that should to be overridden for each + * VM in the batch (if you want to create 100 VMs, they all need a distinct computerName property, you pass + * computerNames for each VM in batch in this array), service will merge baseProfile with VM specific overrides and + * create a merged VMProfile. * - * @return the virtualMachineOverrides value. + * @return the resourceOverrides value. */ - public List virtualMachineOverrides() { - return this.virtualMachineOverrides; + public List> resourceOverrides() { + return this.resourceOverrides; } /** - * Set the virtualMachineOverrides property: Virtual machine profile array that contains VM properties that needs to - * be overridden for each VM in the batch (if you want to create 100 VMs, they all need a distinct computerName - * property, you pass computerNames for each VM in batch in this array), service will merge baseProfile with VM - * specific overrides and create a merged VMProfile. + * Set the resourceOverrides property: JSON array, that contains VM properties that should to be overridden for each + * VM in the batch (if you want to create 100 VMs, they all need a distinct computerName property, you pass + * computerNames for each VM in batch in this array), service will merge baseProfile with VM specific overrides and + * create a merged VMProfile. * - * @param virtualMachineOverrides the virtualMachineOverrides value to set. + * @param resourceOverrides the resourceOverrides value to set. * @return the ResourceProvisionPayload object itself. */ - public ResourceProvisionPayload withVirtualMachineOverrides(List virtualMachineOverrides) { - this.virtualMachineOverrides = virtualMachineOverrides; + public ResourceProvisionPayload withResourceOverrides(List> resourceOverrides) { + this.resourceOverrides = resourceOverrides; return this; } @@ -147,9 +148,21 @@ public ResourceProvisionPayload withResourcePrefix(String resourcePrefix) { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeIntField("resourceCount", this.resourceCount); - jsonWriter.writeJsonField("virtualMachineBaseProfile", this.virtualMachineBaseProfile); - jsonWriter.writeArrayField("virtualMachineOverrides", this.virtualMachineOverrides, - (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("baseProfile", this.baseProfile, (writer, element) -> { + if (element == null) { + writer.writeNull(); + } else { + element.writeTo(writer); + } + }); + jsonWriter.writeArrayField("resourceOverrides", this.resourceOverrides, + (writer, element) -> writer.writeMap(element, (writer1, element1) -> { + if (element1 == null) { + writer1.writeNull(); + } else { + element1.writeTo(writer1); + } + })); jsonWriter.writeStringField("resourcePrefix", this.resourcePrefix); return jsonWriter.writeEndObject(); } @@ -172,13 +185,15 @@ public static ResourceProvisionPayload fromJson(JsonReader jsonReader) throws IO if ("resourceCount".equals(fieldName)) { deserializedResourceProvisionPayload.resourceCount = reader.getInt(); - } else if ("virtualMachineBaseProfile".equals(fieldName)) { - deserializedResourceProvisionPayload.virtualMachineBaseProfile - = BulkVMConfiguration.fromJson(reader); - } else if ("virtualMachineOverrides".equals(fieldName)) { - List virtualMachineOverrides - = reader.readArray(reader1 -> BulkVMConfiguration.fromJson(reader1)); - deserializedResourceProvisionPayload.virtualMachineOverrides = virtualMachineOverrides; + } else if ("baseProfile".equals(fieldName)) { + Map baseProfile = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedResourceProvisionPayload.baseProfile = baseProfile; + } else if ("resourceOverrides".equals(fieldName)) { + List> resourceOverrides + = reader.readArray(reader1 -> reader1.readMap(reader2 -> reader2 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())))); + deserializedResourceProvisionPayload.resourceOverrides = resourceOverrides; } else if ("resourcePrefix".equals(fieldName)) { deserializedResourceProvisionPayload.resourcePrefix = reader.getString(); } else { diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java index d9f80a8e6803..2dbc9aa123de 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java @@ -26,11 +26,6 @@ public final class RetryPolicy implements JsonSerializable { */ private Integer retryWindowInMinutes; - /* - * Action to take on failure - */ - private ResourceOperationType onFailureAction; - /** * Creates an instance of RetryPolicy class. */ @@ -77,26 +72,6 @@ public RetryPolicy withRetryWindowInMinutes(Integer retryWindowInMinutes) { return this; } - /** - * Get the onFailureAction property: Action to take on failure. - * - * @return the onFailureAction value. - */ - public ResourceOperationType onFailureAction() { - return this.onFailureAction; - } - - /** - * Set the onFailureAction property: Action to take on failure. - * - * @param onFailureAction the onFailureAction value to set. - * @return the RetryPolicy object itself. - */ - public RetryPolicy withOnFailureAction(ResourceOperationType onFailureAction) { - this.onFailureAction = onFailureAction; - return this; - } - /** * {@inheritDoc} */ @@ -105,8 +80,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("retryCount", this.retryCount); jsonWriter.writeNumberField("retryWindowInMinutes", this.retryWindowInMinutes); - jsonWriter.writeStringField("onFailureAction", - this.onFailureAction == null ? null : this.onFailureAction.toString()); return jsonWriter.writeEndObject(); } @@ -129,8 +102,6 @@ public static RetryPolicy fromJson(JsonReader jsonReader) throws IOException { deserializedRetryPolicy.retryCount = reader.getNullable(JsonReader::getInt); } else if ("retryWindowInMinutes".equals(fieldName)) { deserializedRetryPolicy.retryWindowInMinutes = reader.getNullable(JsonReader::getInt); - } else if ("onFailureAction".equals(fieldName)) { - deserializedRetryPolicy.onFailureAction = ResourceOperationType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java index 49a0aaacddea..12ce3ca9fe31 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java @@ -184,37 +184,8 @@ StartResourceOperationResponse virtualMachinesExecuteStart(String locationparame ExecuteStartRequest requestBody); /** - * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, - * this operation is triggered as soon as Computeschedule receives it. - * - * @param locationparameter The location name. - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from a create flex request along with {@link Response}. - */ - Response virtualMachinesExecuteCreateFlexWithResponse(String locationparameter, - ExecuteCreateFlexRequest body, Context context); - - /** - * VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with flex properties, - * this operation is triggered as soon as Computeschedule receives it. - * - * @param locationparameter The location name. - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from a create flex request. - */ - CreateFlexResourceOperationResponse virtualMachinesExecuteCreateFlex(String locationparameter, - ExecuteCreateFlexRequest body); - - /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -228,8 +199,8 @@ Response virtualMachinesExecuteCreateWithRespon ExecuteCreateRequest requestBody, Context context); /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -242,8 +213,8 @@ CreateResourceOperationResponse virtualMachinesExecuteCreate(String locationpara ExecuteCreateRequest requestBody); /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. @@ -257,8 +228,8 @@ Response virtualMachinesExecuteDeleteWithRespon ExecuteDeleteRequest requestBody, Context context); /** - * [PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - * operation is triggered as soon as Computeschedule receives it. + * VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this operation is + * triggered as soon as Computeschedule receives it. * * @param locationparameter The location name. * @param requestBody The request body. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java deleted file mode 100644 index b859e1538c50..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies additional publishing targets for scheduled events. - */ -@Fluent -public final class ScheduledEventsAdditionalPublishingTargets - implements JsonSerializable { - /* - * The configuration parameters used while creating eventGridAndResourceGraph Scheduled Event setting. - */ - private EventGridAndResourceGraph eventGridAndResourceGraph; - - /** - * Creates an instance of ScheduledEventsAdditionalPublishingTargets class. - */ - public ScheduledEventsAdditionalPublishingTargets() { - } - - /** - * Get the eventGridAndResourceGraph property: The configuration parameters used while creating - * eventGridAndResourceGraph Scheduled Event setting. - * - * @return the eventGridAndResourceGraph value. - */ - public EventGridAndResourceGraph eventGridAndResourceGraph() { - return this.eventGridAndResourceGraph; - } - - /** - * Set the eventGridAndResourceGraph property: The configuration parameters used while creating - * eventGridAndResourceGraph Scheduled Event setting. - * - * @param eventGridAndResourceGraph the eventGridAndResourceGraph value to set. - * @return the ScheduledEventsAdditionalPublishingTargets object itself. - */ - public ScheduledEventsAdditionalPublishingTargets - withEventGridAndResourceGraph(EventGridAndResourceGraph eventGridAndResourceGraph) { - this.eventGridAndResourceGraph = eventGridAndResourceGraph; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("eventGridAndResourceGraph", this.eventGridAndResourceGraph); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduledEventsAdditionalPublishingTargets from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduledEventsAdditionalPublishingTargets if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ScheduledEventsAdditionalPublishingTargets. - */ - public static ScheduledEventsAdditionalPublishingTargets fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduledEventsAdditionalPublishingTargets deserializedScheduledEventsAdditionalPublishingTargets - = new ScheduledEventsAdditionalPublishingTargets(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("eventGridAndResourceGraph".equals(fieldName)) { - deserializedScheduledEventsAdditionalPublishingTargets.eventGridAndResourceGraph - = EventGridAndResourceGraph.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduledEventsAdditionalPublishingTargets; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java deleted file mode 100644 index f6499c0ddf46..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations. - */ -@Fluent -public final class ScheduledEventsPolicy implements JsonSerializable { - /* - * The configuration parameters used while creating userInitiatedRedeploy scheduled event setting creation. - */ - private UserInitiatedRedeploy userInitiatedRedeploy; - - /* - * The configuration parameters used while creating userInitiatedReboot scheduled event setting creation. - */ - private UserInitiatedReboot userInitiatedReboot; - - /* - * The configuration parameters used while publishing scheduledEventsAdditionalPublishingTargets. - */ - private ScheduledEventsAdditionalPublishingTargets scheduledEventsAdditionalPublishingTargets; - - /* - * The configuration parameters used while creating AllInstancesDown scheduled event setting creation. - */ - private AllInstancesDown allInstancesDown; - - /** - * Creates an instance of ScheduledEventsPolicy class. - */ - public ScheduledEventsPolicy() { - } - - /** - * Get the userInitiatedRedeploy property: The configuration parameters used while creating userInitiatedRedeploy - * scheduled event setting creation. - * - * @return the userInitiatedRedeploy value. - */ - public UserInitiatedRedeploy userInitiatedRedeploy() { - return this.userInitiatedRedeploy; - } - - /** - * Set the userInitiatedRedeploy property: The configuration parameters used while creating userInitiatedRedeploy - * scheduled event setting creation. - * - * @param userInitiatedRedeploy the userInitiatedRedeploy value to set. - * @return the ScheduledEventsPolicy object itself. - */ - public ScheduledEventsPolicy withUserInitiatedRedeploy(UserInitiatedRedeploy userInitiatedRedeploy) { - this.userInitiatedRedeploy = userInitiatedRedeploy; - return this; - } - - /** - * Get the userInitiatedReboot property: The configuration parameters used while creating userInitiatedReboot - * scheduled event setting creation. - * - * @return the userInitiatedReboot value. - */ - public UserInitiatedReboot userInitiatedReboot() { - return this.userInitiatedReboot; - } - - /** - * Set the userInitiatedReboot property: The configuration parameters used while creating userInitiatedReboot - * scheduled event setting creation. - * - * @param userInitiatedReboot the userInitiatedReboot value to set. - * @return the ScheduledEventsPolicy object itself. - */ - public ScheduledEventsPolicy withUserInitiatedReboot(UserInitiatedReboot userInitiatedReboot) { - this.userInitiatedReboot = userInitiatedReboot; - return this; - } - - /** - * Get the scheduledEventsAdditionalPublishingTargets property: The configuration parameters used while publishing - * scheduledEventsAdditionalPublishingTargets. - * - * @return the scheduledEventsAdditionalPublishingTargets value. - */ - public ScheduledEventsAdditionalPublishingTargets scheduledEventsAdditionalPublishingTargets() { - return this.scheduledEventsAdditionalPublishingTargets; - } - - /** - * Set the scheduledEventsAdditionalPublishingTargets property: The configuration parameters used while publishing - * scheduledEventsAdditionalPublishingTargets. - * - * @param scheduledEventsAdditionalPublishingTargets the scheduledEventsAdditionalPublishingTargets value to set. - * @return the ScheduledEventsPolicy object itself. - */ - public ScheduledEventsPolicy withScheduledEventsAdditionalPublishingTargets( - ScheduledEventsAdditionalPublishingTargets scheduledEventsAdditionalPublishingTargets) { - this.scheduledEventsAdditionalPublishingTargets = scheduledEventsAdditionalPublishingTargets; - return this; - } - - /** - * Get the allInstancesDown property: The configuration parameters used while creating AllInstancesDown scheduled - * event setting creation. - * - * @return the allInstancesDown value. - */ - public AllInstancesDown allInstancesDown() { - return this.allInstancesDown; - } - - /** - * Set the allInstancesDown property: The configuration parameters used while creating AllInstancesDown scheduled - * event setting creation. - * - * @param allInstancesDown the allInstancesDown value to set. - * @return the ScheduledEventsPolicy object itself. - */ - public ScheduledEventsPolicy withAllInstancesDown(AllInstancesDown allInstancesDown) { - this.allInstancesDown = allInstancesDown; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("userInitiatedRedeploy", this.userInitiatedRedeploy); - jsonWriter.writeJsonField("userInitiatedReboot", this.userInitiatedReboot); - jsonWriter.writeJsonField("scheduledEventsAdditionalPublishingTargets", - this.scheduledEventsAdditionalPublishingTargets); - jsonWriter.writeJsonField("allInstancesDown", this.allInstancesDown); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduledEventsPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduledEventsPolicy if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ScheduledEventsPolicy. - */ - public static ScheduledEventsPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduledEventsPolicy deserializedScheduledEventsPolicy = new ScheduledEventsPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userInitiatedRedeploy".equals(fieldName)) { - deserializedScheduledEventsPolicy.userInitiatedRedeploy = UserInitiatedRedeploy.fromJson(reader); - } else if ("userInitiatedReboot".equals(fieldName)) { - deserializedScheduledEventsPolicy.userInitiatedReboot = UserInitiatedReboot.fromJson(reader); - } else if ("scheduledEventsAdditionalPublishingTargets".equals(fieldName)) { - deserializedScheduledEventsPolicy.scheduledEventsAdditionalPublishingTargets - = ScheduledEventsAdditionalPublishingTargets.fromJson(reader); - } else if ("allInstancesDown".equals(fieldName)) { - deserializedScheduledEventsPolicy.allInstancesDown = AllInstancesDown.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduledEventsPolicy; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java deleted file mode 100644 index 35d26daa40bc..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Profile for the scheduled events. - */ -@Fluent -public final class ScheduledEventsProfile implements JsonSerializable { - /* - * Specifies Terminate Scheduled Event related configurations. - */ - private TerminateNotificationProfile terminateNotificationProfile; - - /* - * Specifies OS Image Scheduled Event related configurations. - */ - private OSImageNotificationProfile osImageNotificationProfile; - - /** - * Creates an instance of ScheduledEventsProfile class. - */ - public ScheduledEventsProfile() { - } - - /** - * Get the terminateNotificationProfile property: Specifies Terminate Scheduled Event related configurations. - * - * @return the terminateNotificationProfile value. - */ - public TerminateNotificationProfile terminateNotificationProfile() { - return this.terminateNotificationProfile; - } - - /** - * Set the terminateNotificationProfile property: Specifies Terminate Scheduled Event related configurations. - * - * @param terminateNotificationProfile the terminateNotificationProfile value to set. - * @return the ScheduledEventsProfile object itself. - */ - public ScheduledEventsProfile - withTerminateNotificationProfile(TerminateNotificationProfile terminateNotificationProfile) { - this.terminateNotificationProfile = terminateNotificationProfile; - return this; - } - - /** - * Get the osImageNotificationProfile property: Specifies OS Image Scheduled Event related configurations. - * - * @return the osImageNotificationProfile value. - */ - public OSImageNotificationProfile osImageNotificationProfile() { - return this.osImageNotificationProfile; - } - - /** - * Set the osImageNotificationProfile property: Specifies OS Image Scheduled Event related configurations. - * - * @param osImageNotificationProfile the osImageNotificationProfile value to set. - * @return the ScheduledEventsProfile object itself. - */ - public ScheduledEventsProfile - withOsImageNotificationProfile(OSImageNotificationProfile osImageNotificationProfile) { - this.osImageNotificationProfile = osImageNotificationProfile; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("terminateNotificationProfile", this.terminateNotificationProfile); - jsonWriter.writeJsonField("osImageNotificationProfile", this.osImageNotificationProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduledEventsProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduledEventsProfile if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ScheduledEventsProfile. - */ - public static ScheduledEventsProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduledEventsProfile deserializedScheduledEventsProfile = new ScheduledEventsProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("terminateNotificationProfile".equals(fieldName)) { - deserializedScheduledEventsProfile.terminateNotificationProfile - = TerminateNotificationProfile.fromJson(reader); - } else if ("osImageNotificationProfile".equals(fieldName)) { - deserializedScheduledEventsProfile.osImageNotificationProfile - = OSImageNotificationProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduledEventsProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java deleted file mode 100644 index 2bc812a6b72f..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed - * disk along with VMGuestState blob, VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM - * for not persisting firmware state in the VMGuestState blob.. **Note:** It can be set for only Confidential VMs. - */ -public final class SecurityEncryptionTypes extends ExpandableStringEnum { - /** - * VMGuestStateOnly encryption. - */ - public static final SecurityEncryptionTypes VMGUEST_STATE_ONLY = fromString("VMGuestStateOnly"); - - /** - * DiskWithVMGuestState encryption. - */ - public static final SecurityEncryptionTypes DISK_WITH_VMGUEST_STATE = fromString("DiskWithVMGuestState"); - - /** - * NonPersistedTPM encryption. - */ - public static final SecurityEncryptionTypes NON_PERSISTED_TPM = fromString("NonPersistedTPM"); - - /** - * Creates a new instance of SecurityEncryptionTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SecurityEncryptionTypes() { - } - - /** - * Creates or finds a SecurityEncryptionTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecurityEncryptionTypes. - */ - public static SecurityEncryptionTypes fromString(String name) { - return fromString(name, SecurityEncryptionTypes.class); - } - - /** - * Gets known SecurityEncryptionTypes values. - * - * @return known SecurityEncryptionTypes values. - */ - public static Collection values() { - return values(SecurityEncryptionTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java deleted file mode 100644 index 086e4b62afcf..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the Security profile settings for the virtual machine or virtual machine scale set. - */ -@Fluent -public final class SecurityProfile implements JsonSerializable { - /* - * Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum - * compute api-version: 2020-12-01. - */ - private UefiSettings uefiSettings; - - /* - * This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine - * or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at - * host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true - * for the resource. - */ - private Boolean encryptionAtHost; - - /* - * Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable - * UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set. - */ - private SecurityTypes securityType; - - /* - * Specifies the Managed Identity used by ADE to get access token for keyvault operations. - */ - private EncryptionIdentity encryptionIdentity; - - /* - * Specifies ProxyAgent settings while creating the virtual machine. Minimum compute api-version: 2023-09-01. - */ - private ProxyAgentSettings proxyAgentSettings; - - /** - * Creates an instance of SecurityProfile class. - */ - public SecurityProfile() { - } - - /** - * Get the uefiSettings property: Specifies the security settings like secure boot and vTPM used while creating the - * virtual machine. Minimum compute api-version: 2020-12-01. - * - * @return the uefiSettings value. - */ - public UefiSettings uefiSettings() { - return this.uefiSettings; - } - - /** - * Set the uefiSettings property: Specifies the security settings like secure boot and vTPM used while creating the - * virtual machine. Minimum compute api-version: 2020-12-01. - * - * @param uefiSettings the uefiSettings value to set. - * @return the SecurityProfile object itself. - */ - public SecurityProfile withUefiSettings(UefiSettings uefiSettings) { - this.uefiSettings = uefiSettings; - return this; - } - - /** - * Get the encryptionAtHost property: This property can be used by user in the request to enable or disable the Host - * Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the - * disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be - * disabled unless this property is set to true for the resource. - * - * @return the encryptionAtHost value. - */ - public Boolean encryptionAtHost() { - return this.encryptionAtHost; - } - - /** - * Set the encryptionAtHost property: This property can be used by user in the request to enable or disable the Host - * Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the - * disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be - * disabled unless this property is set to true for the resource. - * - * @param encryptionAtHost the encryptionAtHost value to set. - * @return the SecurityProfile object itself. - */ - public SecurityProfile withEncryptionAtHost(Boolean encryptionAtHost) { - this.encryptionAtHost = encryptionAtHost; - return this; - } - - /** - * Get the securityType property: Specifies the SecurityType of the virtual machine. It has to be set to any - * specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this - * property is set. - * - * @return the securityType value. - */ - public SecurityTypes securityType() { - return this.securityType; - } - - /** - * Set the securityType property: Specifies the SecurityType of the virtual machine. It has to be set to any - * specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this - * property is set. - * - * @param securityType the securityType value to set. - * @return the SecurityProfile object itself. - */ - public SecurityProfile withSecurityType(SecurityTypes securityType) { - this.securityType = securityType; - return this; - } - - /** - * Get the encryptionIdentity property: Specifies the Managed Identity used by ADE to get access token for keyvault - * operations. - * - * @return the encryptionIdentity value. - */ - public EncryptionIdentity encryptionIdentity() { - return this.encryptionIdentity; - } - - /** - * Set the encryptionIdentity property: Specifies the Managed Identity used by ADE to get access token for keyvault - * operations. - * - * @param encryptionIdentity the encryptionIdentity value to set. - * @return the SecurityProfile object itself. - */ - public SecurityProfile withEncryptionIdentity(EncryptionIdentity encryptionIdentity) { - this.encryptionIdentity = encryptionIdentity; - return this; - } - - /** - * Get the proxyAgentSettings property: Specifies ProxyAgent settings while creating the virtual machine. Minimum - * compute api-version: 2023-09-01. - * - * @return the proxyAgentSettings value. - */ - public ProxyAgentSettings proxyAgentSettings() { - return this.proxyAgentSettings; - } - - /** - * Set the proxyAgentSettings property: Specifies ProxyAgent settings while creating the virtual machine. Minimum - * compute api-version: 2023-09-01. - * - * @param proxyAgentSettings the proxyAgentSettings value to set. - * @return the SecurityProfile object itself. - */ - public SecurityProfile withProxyAgentSettings(ProxyAgentSettings proxyAgentSettings) { - this.proxyAgentSettings = proxyAgentSettings; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("uefiSettings", this.uefiSettings); - jsonWriter.writeBooleanField("encryptionAtHost", this.encryptionAtHost); - jsonWriter.writeStringField("securityType", this.securityType == null ? null : this.securityType.toString()); - jsonWriter.writeJsonField("encryptionIdentity", this.encryptionIdentity); - jsonWriter.writeJsonField("proxyAgentSettings", this.proxyAgentSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SecurityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SecurityProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SecurityProfile. - */ - public static SecurityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SecurityProfile deserializedSecurityProfile = new SecurityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uefiSettings".equals(fieldName)) { - deserializedSecurityProfile.uefiSettings = UefiSettings.fromJson(reader); - } else if ("encryptionAtHost".equals(fieldName)) { - deserializedSecurityProfile.encryptionAtHost = reader.getNullable(JsonReader::getBoolean); - } else if ("securityType".equals(fieldName)) { - deserializedSecurityProfile.securityType = SecurityTypes.fromString(reader.getString()); - } else if ("encryptionIdentity".equals(fieldName)) { - deserializedSecurityProfile.encryptionIdentity = EncryptionIdentity.fromJson(reader); - } else if ("proxyAgentSettings".equals(fieldName)) { - deserializedSecurityProfile.proxyAgentSettings = ProxyAgentSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSecurityProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java deleted file mode 100644 index cdc8ec820eac..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. - * The default behavior is: UefiSettings will not be enabled unless this property is set. - */ -public final class SecurityTypes extends ExpandableStringEnum { - /** - * TrustedLaunch security type. - */ - public static final SecurityTypes TRUSTED_LAUNCH = fromString("TrustedLaunch"); - - /** - * ConfidentialVM security type. - */ - public static final SecurityTypes CONFIDENTIAL_VM = fromString("ConfidentialVM"); - - /** - * Creates a new instance of SecurityTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SecurityTypes() { - } - - /** - * Creates or finds a SecurityTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecurityTypes. - */ - public static SecurityTypes fromString(String name) { - return fromString(name, SecurityTypes.class); - } - - /** - * Gets known SecurityTypes values. - * - * @return known SecurityTypes values. - */ - public static Collection values() { - return values(SecurityTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java deleted file mode 100644 index 025cf12e3598..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and - * AutoLogon. - */ -public final class SettingNames extends ExpandableStringEnum { - /** - * AutoLogon mode. - */ - public static final SettingNames AUTO_LOGON = fromString("AutoLogon"); - - /** - * FirstLogonCommands mode. - */ - public static final SettingNames FIRST_LOGON_COMMANDS = fromString("FirstLogonCommands"); - - /** - * Creates a new instance of SettingNames value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SettingNames() { - } - - /** - * Creates or finds a SettingNames from its string representation. - * - * @param name a name to look for. - * @return the corresponding SettingNames. - */ - public static SettingNames fromString(String name) { - return fromString(name, SettingNames.class); - } - - /** - * Gets known SettingNames values. - * - * @return known SettingNames values. - */ - public static Collection values() { - return values(SettingNames.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java deleted file mode 100644 index 7a931a7bb743..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * SSH configuration for Linux based VMs running on Azure. - */ -@Fluent -public final class SshConfiguration implements JsonSerializable { - /* - * The list of SSH public keys used to authenticate with linux based VMs. - */ - private List publicKeys; - - /** - * Creates an instance of SshConfiguration class. - */ - public SshConfiguration() { - } - - /** - * Get the publicKeys property: The list of SSH public keys used to authenticate with linux based VMs. - * - * @return the publicKeys value. - */ - public List publicKeys() { - return this.publicKeys; - } - - /** - * Set the publicKeys property: The list of SSH public keys used to authenticate with linux based VMs. - * - * @param publicKeys the publicKeys value to set. - * @return the SshConfiguration object itself. - */ - public SshConfiguration withPublicKeys(List publicKeys) { - this.publicKeys = publicKeys; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("publicKeys", this.publicKeys, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SshConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SshConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SshConfiguration. - */ - public static SshConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SshConfiguration deserializedSshConfiguration = new SshConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publicKeys".equals(fieldName)) { - List publicKeys = reader.readArray(reader1 -> SshPublicKey.fromJson(reader1)); - deserializedSshConfiguration.publicKeys = publicKeys; - } else { - reader.skipChildren(); - } - } - - return deserializedSshConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java deleted file mode 100644 index 4f57f7abc5c9..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. - */ -@Fluent -public final class SshPublicKey implements JsonSerializable { - /* - * Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the - * specified key is appended to the file. Example: /home/user/.ssh/authorized_keys - */ - private String path; - - /* - * SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit - * and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in - * Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). - */ - private String keyData; - - /** - * Creates an instance of SshPublicKey class. - */ - public SshPublicKey() { - } - - /** - * Get the path property: Specifies the full path on the created VM where ssh public key is stored. If the file - * already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Specifies the full path on the created VM where ssh public key is stored. If the file - * already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. - * - * @param path the path value to set. - * @return the SshPublicKey object itself. - */ - public SshPublicKey withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The key needs - * to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for - * Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). - * - * @return the keyData value. - */ - public String keyData() { - return this.keyData; - } - - /** - * Set the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The key needs - * to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for - * Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). - * - * @param keyData the keyData value to set. - * @return the SshPublicKey object itself. - */ - public SshPublicKey withKeyData(String keyData) { - this.keyData = keyData; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeStringField("keyData", this.keyData); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SshPublicKey from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SshPublicKey if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SshPublicKey. - */ - public static SshPublicKey fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SshPublicKey deserializedSshPublicKey = new SshPublicKey(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("path".equals(fieldName)) { - deserializedSshPublicKey.path = reader.getString(); - } else if ("keyData".equals(fieldName)) { - deserializedSshPublicKey.keyData = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSshPublicKey; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java deleted file mode 100644 index f943b6745b21..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when - * you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. - * Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses - * Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant - * storage. For more information regarding disks supported for Windows Virtual Machines, refer to - * https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to - * https://docs.microsoft.com/azure/virtual-machines/linux/disks-types. - */ -public final class StorageAccountTypes extends ExpandableStringEnum { - /** - * Standard_LRS storage account type. - */ - public static final StorageAccountTypes STANDARD_LRS = fromString("Standard_LRS"); - - /** - * Premium_LRS storage account type. - */ - public static final StorageAccountTypes PREMIUM_LRS = fromString("Premium_LRS"); - - /** - * StandardSSD_LRS storage account type. - */ - public static final StorageAccountTypes STANDARD_SSD_LRS = fromString("StandardSSD_LRS"); - - /** - * UltraSSD_LRS storage account type. - */ - public static final StorageAccountTypes ULTRA_SSD_LRS = fromString("UltraSSD_LRS"); - - /** - * Premium_ZRS storage account type. - */ - public static final StorageAccountTypes PREMIUM_ZRS = fromString("Premium_ZRS"); - - /** - * StandardSSD_ZRS storage account type. - */ - public static final StorageAccountTypes STANDARD_SSD_ZRS = fromString("StandardSSD_ZRS"); - - /** - * PremiumV2_LRS storage account type. - */ - public static final StorageAccountTypes PREMIUM_V2_LRS = fromString("PremiumV2_LRS"); - - /** - * Creates a new instance of StorageAccountTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StorageAccountTypes() { - } - - /** - * Creates or finds a StorageAccountTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageAccountTypes. - */ - public static StorageAccountTypes fromString(String name) { - return fromString(name, StorageAccountTypes.class); - } - - /** - * Gets known StorageAccountTypes values. - * - * @return known StorageAccountTypes values. - */ - public static Collection values() { - return values(StorageAccountTypes.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java deleted file mode 100644 index ee02b3b5d86f..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Specifies the storage settings for the virtual machine disks. - */ -@Fluent -public final class StorageProfile implements JsonSerializable { - /* - * Specifies information about the image to use. You can specify information about platform images, marketplace - * images, or virtual machine images. This element is required when you want to use a platform image, marketplace - * image, or virtual machine image, but is not used in other creation operations. - */ - private ImageReference imageReference; - - /* - * Specifies information about the operating system disk used by the virtual machine. For more information about - * disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - */ - private OSDisk osDisk; - - /* - * Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, - * see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - */ - private List dataDisks; - - /* - * Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk - * controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 - * based on the capabilities of the operating system disk and VM size from the the specified minimum api version. - * You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the - * VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01. - */ - private DiskControllerTypes diskControllerType; - - /** - * Creates an instance of StorageProfile class. - */ - public StorageProfile() { - } - - /** - * Get the imageReference property: Specifies information about the image to use. You can specify information about - * platform images, marketplace images, or virtual machine images. This element is required when you want to use a - * platform image, marketplace image, or virtual machine image, but is not used in other creation operations. - * - * @return the imageReference value. - */ - public ImageReference imageReference() { - return this.imageReference; - } - - /** - * Set the imageReference property: Specifies information about the image to use. You can specify information about - * platform images, marketplace images, or virtual machine images. This element is required when you want to use a - * platform image, marketplace image, or virtual machine image, but is not used in other creation operations. - * - * @param imageReference the imageReference value to set. - * @return the StorageProfile object itself. - */ - public StorageProfile withImageReference(ImageReference imageReference) { - this.imageReference = imageReference; - return this; - } - - /** - * Get the osDisk property: Specifies information about the operating system disk used by the virtual machine. For - * more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - * - * @return the osDisk value. - */ - public OSDisk osDisk() { - return this.osDisk; - } - - /** - * Set the osDisk property: Specifies information about the operating system disk used by the virtual machine. For - * more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - * - * @param osDisk the osDisk value to set. - * @return the StorageProfile object itself. - */ - public StorageProfile withOsDisk(OSDisk osDisk) { - this.osDisk = osDisk; - return this; - } - - /** - * Get the dataDisks property: Specifies the parameters that are used to add a data disk to a virtual machine. For - * more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - * - * @return the dataDisks value. - */ - public List dataDisks() { - return this.dataDisks; - } - - /** - * Set the dataDisks property: Specifies the parameters that are used to add a data disk to a virtual machine. For - * more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - * - * @param dataDisks the dataDisks value to set. - * @return the StorageProfile object itself. - */ - public StorageProfile withDataDisks(List dataDisks) { - this.dataDisks = dataDisks; - return this; - } - - /** - * Get the diskControllerType property: Specifies the disk controller type configured for the VM. **Note:** This - * property will be set to the default disk controller type if not specified provided virtual machine is being - * created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from - * the the specified minimum api version. You need to deallocate the VM before updating its disk controller type - * unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. - * Minimum api-version: 2022-08-01. - * - * @return the diskControllerType value. - */ - public DiskControllerTypes diskControllerType() { - return this.diskControllerType; - } - - /** - * Set the diskControllerType property: Specifies the disk controller type configured for the VM. **Note:** This - * property will be set to the default disk controller type if not specified provided virtual machine is being - * created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from - * the the specified minimum api version. You need to deallocate the VM before updating its disk controller type - * unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. - * Minimum api-version: 2022-08-01. - * - * @param diskControllerType the diskControllerType value to set. - * @return the StorageProfile object itself. - */ - public StorageProfile withDiskControllerType(DiskControllerTypes diskControllerType) { - this.diskControllerType = diskControllerType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("imageReference", this.imageReference); - jsonWriter.writeJsonField("osDisk", this.osDisk); - jsonWriter.writeArrayField("dataDisks", this.dataDisks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("diskControllerType", - this.diskControllerType == null ? null : this.diskControllerType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageProfile. - */ - public static StorageProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageProfile deserializedStorageProfile = new StorageProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("imageReference".equals(fieldName)) { - deserializedStorageProfile.imageReference = ImageReference.fromJson(reader); - } else if ("osDisk".equals(fieldName)) { - deserializedStorageProfile.osDisk = OSDisk.fromJson(reader); - } else if ("dataDisks".equals(fieldName)) { - List dataDisks = reader.readArray(reader1 -> DataDisk.fromJson(reader1)); - deserializedStorageProfile.dataDisks = dataDisks; - } else if ("diskControllerType".equals(fieldName)) { - deserializedStorageProfile.diskControllerType = DiskControllerTypes.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java deleted file mode 100644 index 3cb5b90aef5c..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Profile properties for the Terminate Scheduled event. - */ -@Fluent -public final class TerminateNotificationProfile implements JsonSerializable { - /* - * Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate - * Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 - * format, the default value is 5 minutes (PT5M) - */ - private String notBeforeTimeout; - - /* - * Specifies whether the Terminate Scheduled event is enabled or disabled. - */ - private Boolean enable; - - /** - * Creates an instance of TerminateNotificationProfile class. - */ - public TerminateNotificationProfile() { - } - - /** - * Get the notBeforeTimeout property: Configurable length of time a Virtual Machine being deleted will have to - * potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The - * configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M). - * - * @return the notBeforeTimeout value. - */ - public String notBeforeTimeout() { - return this.notBeforeTimeout; - } - - /** - * Set the notBeforeTimeout property: Configurable length of time a Virtual Machine being deleted will have to - * potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The - * configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M). - * - * @param notBeforeTimeout the notBeforeTimeout value to set. - * @return the TerminateNotificationProfile object itself. - */ - public TerminateNotificationProfile withNotBeforeTimeout(String notBeforeTimeout) { - this.notBeforeTimeout = notBeforeTimeout; - return this; - } - - /** - * Get the enable property: Specifies whether the Terminate Scheduled event is enabled or disabled. - * - * @return the enable value. - */ - public Boolean enable() { - return this.enable; - } - - /** - * Set the enable property: Specifies whether the Terminate Scheduled event is enabled or disabled. - * - * @param enable the enable value to set. - * @return the TerminateNotificationProfile object itself. - */ - public TerminateNotificationProfile withEnable(Boolean enable) { - this.enable = enable; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("notBeforeTimeout", this.notBeforeTimeout); - jsonWriter.writeBooleanField("enable", this.enable); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TerminateNotificationProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TerminateNotificationProfile if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TerminateNotificationProfile. - */ - public static TerminateNotificationProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TerminateNotificationProfile deserializedTerminateNotificationProfile = new TerminateNotificationProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("notBeforeTimeout".equals(fieldName)) { - deserializedTerminateNotificationProfile.notBeforeTimeout = reader.getString(); - } else if ("enable".equals(fieldName)) { - deserializedTerminateNotificationProfile.enable = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedTerminateNotificationProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java deleted file mode 100644 index cc0662da73da..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum - * api-version: 2020-12-01. - */ -@Fluent -public final class UefiSettings implements JsonSerializable { - /* - * Specifies whether secure boot should be enabled on the virtual machine. Minimum compute api-version: 2020-12-01. - */ - private Boolean secureBootEnabled; - - /* - * Specifies whether vTPM should be enabled on the virtual machine. Minimum compute api-version: 2020-12-01. - */ - private Boolean vTpmEnabled; - - /** - * Creates an instance of UefiSettings class. - */ - public UefiSettings() { - } - - /** - * Get the secureBootEnabled property: Specifies whether secure boot should be enabled on the virtual machine. - * Minimum compute api-version: 2020-12-01. - * - * @return the secureBootEnabled value. - */ - public Boolean secureBootEnabled() { - return this.secureBootEnabled; - } - - /** - * Set the secureBootEnabled property: Specifies whether secure boot should be enabled on the virtual machine. - * Minimum compute api-version: 2020-12-01. - * - * @param secureBootEnabled the secureBootEnabled value to set. - * @return the UefiSettings object itself. - */ - public UefiSettings withSecureBootEnabled(Boolean secureBootEnabled) { - this.secureBootEnabled = secureBootEnabled; - return this; - } - - /** - * Get the vTpmEnabled property: Specifies whether vTPM should be enabled on the virtual machine. Minimum compute - * api-version: 2020-12-01. - * - * @return the vTpmEnabled value. - */ - public Boolean vTpmEnabled() { - return this.vTpmEnabled; - } - - /** - * Set the vTpmEnabled property: Specifies whether vTPM should be enabled on the virtual machine. Minimum compute - * api-version: 2020-12-01. - * - * @param vTpmEnabled the vTpmEnabled value to set. - * @return the UefiSettings object itself. - */ - public UefiSettings withVTpmEnabled(Boolean vTpmEnabled) { - this.vTpmEnabled = vTpmEnabled; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("secureBootEnabled", this.secureBootEnabled); - jsonWriter.writeBooleanField("vTpmEnabled", this.vTpmEnabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UefiSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UefiSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UefiSettings. - */ - public static UefiSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UefiSettings deserializedUefiSettings = new UefiSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secureBootEnabled".equals(fieldName)) { - deserializedUefiSettings.secureBootEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("vTpmEnabled".equals(fieldName)) { - deserializedUefiSettings.vTpmEnabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedUefiSettings; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java deleted file mode 100644 index 953e377da09c..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The UserAssignedIdentitiesValue model. - */ -@Immutable -public final class UserAssignedIdentitiesValue implements JsonSerializable { - /* - * The principal id of user assigned identity. - */ - private String principalId; - - /* - * The client id of user assigned identity. - */ - private String clientId; - - /** - * Creates an instance of UserAssignedIdentitiesValue class. - */ - public UserAssignedIdentitiesValue() { - } - - /** - * Get the principalId property: The principal id of user assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client id of user assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAssignedIdentitiesValue from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAssignedIdentitiesValue if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserAssignedIdentitiesValue. - */ - public static UserAssignedIdentitiesValue fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAssignedIdentitiesValue deserializedUserAssignedIdentitiesValue = new UserAssignedIdentitiesValue(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedUserAssignedIdentitiesValue.principalId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentitiesValue.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAssignedIdentitiesValue; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java deleted file mode 100644 index 047b264efedc..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies Reboot related Scheduled Event related configurations. - */ -@Fluent -public final class UserInitiatedReboot implements JsonSerializable { - /* - * Specifies Reboot Scheduled Event related configurations. - */ - private Boolean automaticallyApprove; - - /** - * Creates an instance of UserInitiatedReboot class. - */ - public UserInitiatedReboot() { - } - - /** - * Get the automaticallyApprove property: Specifies Reboot Scheduled Event related configurations. - * - * @return the automaticallyApprove value. - */ - public Boolean automaticallyApprove() { - return this.automaticallyApprove; - } - - /** - * Set the automaticallyApprove property: Specifies Reboot Scheduled Event related configurations. - * - * @param automaticallyApprove the automaticallyApprove value to set. - * @return the UserInitiatedReboot object itself. - */ - public UserInitiatedReboot withAutomaticallyApprove(Boolean automaticallyApprove) { - this.automaticallyApprove = automaticallyApprove; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("automaticallyApprove", this.automaticallyApprove); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserInitiatedReboot from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserInitiatedReboot if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UserInitiatedReboot. - */ - public static UserInitiatedReboot fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserInitiatedReboot deserializedUserInitiatedReboot = new UserInitiatedReboot(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("automaticallyApprove".equals(fieldName)) { - deserializedUserInitiatedReboot.automaticallyApprove = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedUserInitiatedReboot; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java deleted file mode 100644 index 10977ad31be8..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies Redeploy related Scheduled Event related configurations. - */ -@Fluent -public final class UserInitiatedRedeploy implements JsonSerializable { - /* - * Specifies Redeploy Scheduled Event related configurations. - */ - private Boolean automaticallyApprove; - - /** - * Creates an instance of UserInitiatedRedeploy class. - */ - public UserInitiatedRedeploy() { - } - - /** - * Get the automaticallyApprove property: Specifies Redeploy Scheduled Event related configurations. - * - * @return the automaticallyApprove value. - */ - public Boolean automaticallyApprove() { - return this.automaticallyApprove; - } - - /** - * Set the automaticallyApprove property: Specifies Redeploy Scheduled Event related configurations. - * - * @param automaticallyApprove the automaticallyApprove value to set. - * @return the UserInitiatedRedeploy object itself. - */ - public UserInitiatedRedeploy withAutomaticallyApprove(Boolean automaticallyApprove) { - this.automaticallyApprove = automaticallyApprove; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("automaticallyApprove", this.automaticallyApprove); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserInitiatedRedeploy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserInitiatedRedeploy if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserInitiatedRedeploy. - */ - public static UserInitiatedRedeploy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserInitiatedRedeploy deserializedUserInitiatedRedeploy = new UserInitiatedRedeploy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("automaticallyApprove".equals(fieldName)) { - deserializedUserInitiatedRedeploy.automaticallyApprove = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedUserInitiatedRedeploy; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java deleted file mode 100644 index 5716a38f0889..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs. - */ -@Fluent -public final class VMDiskSecurityProfile implements JsonSerializable { - /* - * Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed - * disk along with VMGuestState blob, VMGuestStateOnly for encryption of just the VMGuestState blob, and - * NonPersistedTPM for not persisting firmware state in the VMGuestState blob.. **Note:** It can be set for only - * Confidential VMs. - */ - private SecurityEncryptionTypes securityEncryptionType; - - /* - * Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer - * Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. - */ - private DiskEncryptionSetParameters diskEncryptionSet; - - /** - * Creates an instance of VMDiskSecurityProfile class. - */ - public VMDiskSecurityProfile() { - } - - /** - * Get the securityEncryptionType property: Specifies the EncryptionType of the managed disk. It is set to - * DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, VMGuestStateOnly for - * encryption of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the - * VMGuestState blob.. **Note:** It can be set for only Confidential VMs. - * - * @return the securityEncryptionType value. - */ - public SecurityEncryptionTypes securityEncryptionType() { - return this.securityEncryptionType; - } - - /** - * Set the securityEncryptionType property: Specifies the EncryptionType of the managed disk. It is set to - * DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, VMGuestStateOnly for - * encryption of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the - * VMGuestState blob.. **Note:** It can be set for only Confidential VMs. - * - * @param securityEncryptionType the securityEncryptionType value to set. - * @return the VMDiskSecurityProfile object itself. - */ - public VMDiskSecurityProfile withSecurityEncryptionType(SecurityEncryptionTypes securityEncryptionType) { - this.securityEncryptionType = securityEncryptionType; - return this; - } - - /** - * Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the - * managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. - * - * @return the diskEncryptionSet value. - */ - public DiskEncryptionSetParameters diskEncryptionSet() { - return this.diskEncryptionSet; - } - - /** - * Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the - * managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. - * - * @param diskEncryptionSet the diskEncryptionSet value to set. - * @return the VMDiskSecurityProfile object itself. - */ - public VMDiskSecurityProfile withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet) { - this.diskEncryptionSet = diskEncryptionSet; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("securityEncryptionType", - this.securityEncryptionType == null ? null : this.securityEncryptionType.toString()); - jsonWriter.writeJsonField("diskEncryptionSet", this.diskEncryptionSet); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMDiskSecurityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMDiskSecurityProfile if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMDiskSecurityProfile. - */ - public static VMDiskSecurityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMDiskSecurityProfile deserializedVMDiskSecurityProfile = new VMDiskSecurityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("securityEncryptionType".equals(fieldName)) { - deserializedVMDiskSecurityProfile.securityEncryptionType - = SecurityEncryptionTypes.fromString(reader.getString()); - } else if ("diskEncryptionSet".equals(fieldName)) { - deserializedVMDiskSecurityProfile.diskEncryptionSet = DiskEncryptionSetParameters.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVMDiskSecurityProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java deleted file mode 100644 index 671dca75ba4e..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the required information to reference a compute gallery application version. - */ -@Fluent -public final class VMGalleryApplication implements JsonSerializable { - /* - * Optional, Specifies a passthrough value for more generic context. - */ - private String tags; - - /* - * Optional, Specifies the order in which the packages have to be installed - */ - private Integer order; - - /* - * Specifies the GalleryApplicationVersion resource id on the form of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{ - * galleryName}/applications/{application}/versions/{version} - */ - private String packageReferenceId; - - /* - * Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if - * provided - */ - private String configurationReference; - - /* - * Optional, If true, any failure for any operation in the VmApplication will fail the deployment - */ - private Boolean treatFailureAsDeploymentFailure; - - /* - * If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated - * for the VM/VMSS - */ - private Boolean enableAutomaticUpgrade; - - /** - * Creates an instance of VMGalleryApplication class. - */ - public VMGalleryApplication() { - } - - /** - * Get the tags property: Optional, Specifies a passthrough value for more generic context. - * - * @return the tags value. - */ - public String tags() { - return this.tags; - } - - /** - * Set the tags property: Optional, Specifies a passthrough value for more generic context. - * - * @param tags the tags value to set. - * @return the VMGalleryApplication object itself. - */ - public VMGalleryApplication withTags(String tags) { - this.tags = tags; - return this; - } - - /** - * Get the order property: Optional, Specifies the order in which the packages have to be installed. - * - * @return the order value. - */ - public Integer order() { - return this.order; - } - - /** - * Set the order property: Optional, Specifies the order in which the packages have to be installed. - * - * @param order the order value to set. - * @return the VMGalleryApplication object itself. - */ - public VMGalleryApplication withOrder(Integer order) { - this.order = order; - return this; - } - - /** - * Get the packageReferenceId property: Specifies the GalleryApplicationVersion resource id on the form of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. - * - * @return the packageReferenceId value. - */ - public String packageReferenceId() { - return this.packageReferenceId; - } - - /** - * Set the packageReferenceId property: Specifies the GalleryApplicationVersion resource id on the form of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. - * - * @param packageReferenceId the packageReferenceId value to set. - * @return the VMGalleryApplication object itself. - */ - public VMGalleryApplication withPackageReferenceId(String packageReferenceId) { - this.packageReferenceId = packageReferenceId; - return this; - } - - /** - * Get the configurationReference property: Optional, Specifies the uri to an azure blob that will replace the - * default configuration for the package if provided. - * - * @return the configurationReference value. - */ - public String configurationReference() { - return this.configurationReference; - } - - /** - * Set the configurationReference property: Optional, Specifies the uri to an azure blob that will replace the - * default configuration for the package if provided. - * - * @param configurationReference the configurationReference value to set. - * @return the VMGalleryApplication object itself. - */ - public VMGalleryApplication withConfigurationReference(String configurationReference) { - this.configurationReference = configurationReference; - return this; - } - - /** - * Get the treatFailureAsDeploymentFailure property: Optional, If true, any failure for any operation in the - * VmApplication will fail the deployment. - * - * @return the treatFailureAsDeploymentFailure value. - */ - public Boolean treatFailureAsDeploymentFailure() { - return this.treatFailureAsDeploymentFailure; - } - - /** - * Set the treatFailureAsDeploymentFailure property: Optional, If true, any failure for any operation in the - * VmApplication will fail the deployment. - * - * @param treatFailureAsDeploymentFailure the treatFailureAsDeploymentFailure value to set. - * @return the VMGalleryApplication object itself. - */ - public VMGalleryApplication withTreatFailureAsDeploymentFailure(Boolean treatFailureAsDeploymentFailure) { - this.treatFailureAsDeploymentFailure = treatFailureAsDeploymentFailure; - return this; - } - - /** - * Get the enableAutomaticUpgrade property: If set to true, when a new Gallery Application version is available in - * PIR/SIG, it will be automatically updated for the VM/VMSS. - * - * @return the enableAutomaticUpgrade value. - */ - public Boolean enableAutomaticUpgrade() { - return this.enableAutomaticUpgrade; - } - - /** - * Set the enableAutomaticUpgrade property: If set to true, when a new Gallery Application version is available in - * PIR/SIG, it will be automatically updated for the VM/VMSS. - * - * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. - * @return the VMGalleryApplication object itself. - */ - public VMGalleryApplication withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { - this.enableAutomaticUpgrade = enableAutomaticUpgrade; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("packageReferenceId", this.packageReferenceId); - jsonWriter.writeStringField("tags", this.tags); - jsonWriter.writeNumberField("order", this.order); - jsonWriter.writeStringField("configurationReference", this.configurationReference); - jsonWriter.writeBooleanField("treatFailureAsDeploymentFailure", this.treatFailureAsDeploymentFailure); - jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMGalleryApplication from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMGalleryApplication if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMGalleryApplication. - */ - public static VMGalleryApplication fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMGalleryApplication deserializedVMGalleryApplication = new VMGalleryApplication(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("packageReferenceId".equals(fieldName)) { - deserializedVMGalleryApplication.packageReferenceId = reader.getString(); - } else if ("tags".equals(fieldName)) { - deserializedVMGalleryApplication.tags = reader.getString(); - } else if ("order".equals(fieldName)) { - deserializedVMGalleryApplication.order = reader.getNullable(JsonReader::getInt); - } else if ("configurationReference".equals(fieldName)) { - deserializedVMGalleryApplication.configurationReference = reader.getString(); - } else if ("treatFailureAsDeploymentFailure".equals(fieldName)) { - deserializedVMGalleryApplication.treatFailureAsDeploymentFailure - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableAutomaticUpgrade".equals(fieldName)) { - deserializedVMGalleryApplication.enableAutomaticUpgrade - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedVMGalleryApplication; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java deleted file mode 100644 index f1dbdb58ae8a..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM. - */ -@Fluent -public final class VaultCertificate implements JsonSerializable { - /* - * This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key - * Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate - * needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

      {
      - * 'data':'',
      'dataType':'pfx',
      'password':''
      }
      To - * install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension - * for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault - * virtual machine extension for - * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - */ - private String certificateUrl; - - /* - * For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. - * The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is - * placed under the /var/lib/waagent directory, with the file name .crt for the X509 - * certificate file and .prv for private key. Both of these files are .pem formatted. - */ - private String certificateStore; - - /** - * Creates an instance of VaultCertificate class. - */ - public VaultCertificate() { - } - - /** - * Get the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a - * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate - * needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: - * <br><br> {<br> 'data':'<Base64-encoded-certificate>',<br> - * 'dataType':'pfx',<br> 'password':'<pfx-file-password>'<br>} <br> To install certificates - * on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for - * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault - * virtual machine extension for - * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - * - * @return the certificateUrl value. - */ - public String certificateUrl() { - return this.certificateUrl; - } - - /** - * Set the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a - * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate - * needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: - * <br><br> {<br> 'data':'<Base64-encoded-certificate>',<br> - * 'dataType':'pfx',<br> 'password':'<pfx-file-password>'<br>} <br> To install certificates - * on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for - * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault - * virtual machine extension for - * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - * - * @param certificateUrl the certificateUrl value to set. - * @return the VaultCertificate object itself. - */ - public VaultCertificate withCertificateUrl(String certificateUrl) { - this.certificateUrl = certificateUrl; - return this; - } - - /** - * Get the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to - * which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. - * For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name - * <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private - * key. Both of these files are .pem formatted. - * - * @return the certificateStore value. - */ - public String certificateStore() { - return this.certificateStore; - } - - /** - * Set the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to - * which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. - * For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name - * <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private - * key. Both of these files are .pem formatted. - * - * @param certificateStore the certificateStore value to set. - * @return the VaultCertificate object itself. - */ - public VaultCertificate withCertificateStore(String certificateStore) { - this.certificateStore = certificateStore; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("certificateUrl", this.certificateUrl); - jsonWriter.writeStringField("certificateStore", this.certificateStore); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaultCertificate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaultCertificate if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VaultCertificate. - */ - public static VaultCertificate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaultCertificate deserializedVaultCertificate = new VaultCertificate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("certificateUrl".equals(fieldName)) { - deserializedVaultCertificate.certificateUrl = reader.getString(); - } else if ("certificateStore".equals(fieldName)) { - deserializedVaultCertificate.certificateStore = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVaultCertificate; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java deleted file mode 100644 index ba07ab6fb964..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Describes a set of certificates which are all in the same Key Vault. - */ -@Fluent -public final class VaultSecretGroup implements JsonSerializable { - /* - * The relative URL of the Key Vault containing all of the certificates in VaultCertificates. - */ - private SubResource sourceVault; - - /* - * The list of key vault references in SourceVault which contain certificates. - */ - private List vaultCertificates; - - /** - * Creates an instance of VaultSecretGroup class. - */ - public VaultSecretGroup() { - } - - /** - * Get the sourceVault property: The relative URL of the Key Vault containing all of the certificates in - * VaultCertificates. - * - * @return the sourceVault value. - */ - public SubResource sourceVault() { - return this.sourceVault; - } - - /** - * Set the sourceVault property: The relative URL of the Key Vault containing all of the certificates in - * VaultCertificates. - * - * @param sourceVault the sourceVault value to set. - * @return the VaultSecretGroup object itself. - */ - public VaultSecretGroup withSourceVault(SubResource sourceVault) { - this.sourceVault = sourceVault; - return this; - } - - /** - * Get the vaultCertificates property: The list of key vault references in SourceVault which contain certificates. - * - * @return the vaultCertificates value. - */ - public List vaultCertificates() { - return this.vaultCertificates; - } - - /** - * Set the vaultCertificates property: The list of key vault references in SourceVault which contain certificates. - * - * @param vaultCertificates the vaultCertificates value to set. - * @return the VaultSecretGroup object itself. - */ - public VaultSecretGroup withVaultCertificates(List vaultCertificates) { - this.vaultCertificates = vaultCertificates; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("sourceVault", this.sourceVault); - jsonWriter.writeArrayField("vaultCertificates", this.vaultCertificates, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaultSecretGroup from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaultSecretGroup if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VaultSecretGroup. - */ - public static VaultSecretGroup fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaultSecretGroup deserializedVaultSecretGroup = new VaultSecretGroup(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceVault".equals(fieldName)) { - deserializedVaultSecretGroup.sourceVault = SubResource.fromJson(reader); - } else if ("vaultCertificates".equals(fieldName)) { - List vaultCertificates - = reader.readArray(reader1 -> VaultCertificate.fromJson(reader1)); - deserializedVaultSecretGroup.vaultCertificates = vaultCertificates; - } else { - reader.skipChildren(); - } - } - - return deserializedVaultSecretGroup; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java deleted file mode 100644 index 1b5f73419a76..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the uri of a disk. - */ -@Fluent -public final class VirtualHardDisk implements JsonSerializable { - /* - * Specifies the virtual hard disk's uri. - */ - private String uri; - - /** - * Creates an instance of VirtualHardDisk class. - */ - public VirtualHardDisk() { - } - - /** - * Get the uri property: Specifies the virtual hard disk's uri. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Specifies the virtual hard disk's uri. - * - * @param uri the uri value to set. - * @return the VirtualHardDisk object itself. - */ - public VirtualHardDisk withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualHardDisk from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualHardDisk if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualHardDisk. - */ - public static VirtualHardDisk fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualHardDisk deserializedVirtualHardDisk = new VirtualHardDisk(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uri".equals(fieldName)) { - deserializedVirtualHardDisk.uri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualHardDisk; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java deleted file mode 100644 index 7788880050a5..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Identity for the virtual machine. - */ -@Fluent -public final class VirtualMachineIdentity implements JsonSerializable { - /* - * The principal id of virtual machine identity. This property will only be provided for a system assigned identity. - */ - private String principalId; - - /* - * The tenant id associated with the virtual machine. This property will only be provided for a system assigned - * identity. - */ - private String tenantId; - - /* - * The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an - * implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities - * from the virtual machine. - */ - private ResourceIdentityType type; - - /* - * The list of user identities associated with the Virtual Machine. The user identity dictionary key references will - * be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ - * userAssignedIdentities/{identityName}'. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of VirtualMachineIdentity class. - */ - public VirtualMachineIdentity() { - } - - /** - * Get the principalId property: The principal id of virtual machine identity. This property will only be provided - * for a system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant id associated with the virtual machine. This property will only be provided - * for a system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' - * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove - * any identities from the virtual machine. - * - * @return the type value. - */ - public ResourceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' - * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove - * any identities from the virtual machine. - * - * @param type the type value to set. - * @return the VirtualMachineIdentity object itself. - */ - public VirtualMachineIdentity withType(ResourceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The list of user identities associated with the Virtual Machine. The - * user identity dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The list of user identities associated with the Virtual Machine. The - * user identity dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the VirtualMachineIdentity object itself. - */ - public VirtualMachineIdentity - withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineIdentity. - */ - public static VirtualMachineIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineIdentity deserializedVirtualMachineIdentity = new VirtualMachineIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedVirtualMachineIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedVirtualMachineIdentity.tenantId = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedVirtualMachineIdentity.type = ResourceIdentityType.fromString(reader.getString()); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentitiesValue.fromJson(reader1)); - deserializedVirtualMachineIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineIdentity; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java deleted file mode 100644 index de8eb9175491..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Contains the IP tag associated with the public IP address. - */ -@Fluent -public final class VirtualMachineIpTag implements JsonSerializable { - /* - * IP tag type. Example: FirstPartyUsage. - */ - private String ipTagType; - - /* - * IP tag associated with the public IP. Example: SQL, Storage etc. - */ - private String tag; - - /** - * Creates an instance of VirtualMachineIpTag class. - */ - public VirtualMachineIpTag() { - } - - /** - * Get the ipTagType property: IP tag type. Example: FirstPartyUsage. - * - * @return the ipTagType value. - */ - public String ipTagType() { - return this.ipTagType; - } - - /** - * Set the ipTagType property: IP tag type. Example: FirstPartyUsage. - * - * @param ipTagType the ipTagType value to set. - * @return the VirtualMachineIpTag object itself. - */ - public VirtualMachineIpTag withIpTagType(String ipTagType) { - this.ipTagType = ipTagType; - return this; - } - - /** - * Get the tag property: IP tag associated with the public IP. Example: SQL, Storage etc. - * - * @return the tag value. - */ - public String tag() { - return this.tag; - } - - /** - * Set the tag property: IP tag associated with the public IP. Example: SQL, Storage etc. - * - * @param tag the tag value to set. - * @return the VirtualMachineIpTag object itself. - */ - public VirtualMachineIpTag withTag(String tag) { - this.tag = tag; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ipTagType", this.ipTagType); - jsonWriter.writeStringField("tag", this.tag); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineIpTag from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineIpTag if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineIpTag. - */ - public static VirtualMachineIpTag fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineIpTag deserializedVirtualMachineIpTag = new VirtualMachineIpTag(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipTagType".equals(fieldName)) { - deserializedVirtualMachineIpTag.ipTagType = reader.getString(); - } else if ("tag".equals(fieldName)) { - deserializedVirtualMachineIpTag.tag = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineIpTag; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java deleted file mode 100644 index fedebf332e09..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Describes a virtual machine network interface configurations. - */ -@Fluent -public final class VirtualMachineNetworkInterfaceConfiguration - implements JsonSerializable { - /* - * The network interface configuration name. - */ - private String name; - - /* - * Describes a virtual machine network profile's IP configuration. - */ - private VirtualMachineNetworkInterfaceConfigurationProperties properties; - - /* - * Resource tags applied to the networkInterface address created by this NetworkInterfaceConfiguration - */ - private Map tags; - - /** - * Creates an instance of VirtualMachineNetworkInterfaceConfiguration class. - */ - public VirtualMachineNetworkInterfaceConfiguration() { - } - - /** - * Get the name property: The network interface configuration name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The network interface configuration name. - * - * @param name the name value to set. - * @return the VirtualMachineNetworkInterfaceConfiguration object itself. - */ - public VirtualMachineNetworkInterfaceConfiguration withName(String name) { - this.name = name; - return this; - } - - /** - * Get the properties property: Describes a virtual machine network profile's IP configuration. - * - * @return the properties value. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Describes a virtual machine network profile's IP configuration. - * - * @param properties the properties value to set. - * @return the VirtualMachineNetworkInterfaceConfiguration object itself. - */ - public VirtualMachineNetworkInterfaceConfiguration - withProperties(VirtualMachineNetworkInterfaceConfigurationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the tags property: Resource tags applied to the networkInterface address created by this - * NetworkInterfaceConfiguration. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags applied to the networkInterface address created by this - * NetworkInterfaceConfiguration. - * - * @param tags the tags value to set. - * @return the VirtualMachineNetworkInterfaceConfiguration object itself. - */ - public VirtualMachineNetworkInterfaceConfiguration withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineNetworkInterfaceConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineNetworkInterfaceConfiguration if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VirtualMachineNetworkInterfaceConfiguration. - */ - public static VirtualMachineNetworkInterfaceConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineNetworkInterfaceConfiguration deserializedVirtualMachineNetworkInterfaceConfiguration - = new VirtualMachineNetworkInterfaceConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfiguration.name = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfiguration.properties - = VirtualMachineNetworkInterfaceConfigurationProperties.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedVirtualMachineNetworkInterfaceConfiguration.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineNetworkInterfaceConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java deleted file mode 100644 index 5e407d60ca6b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Describes a virtual machine network profile's IP configuration. - */ -@Fluent -public final class VirtualMachineNetworkInterfaceConfigurationProperties - implements JsonSerializable { - /* - * Specifies the primary network interface in case the virtual machine has more than 1 network interface. - */ - private Boolean primary; - - /* - * Specify what happens to the network interface when the VM is deleted - */ - private DeleteOptions deleteOption; - - /* - * Specifies whether the network interface is accelerated networking-enabled. - */ - private Boolean enableAcceleratedNetworking; - - /* - * Specifies whether the network interface is disabled for tcp state tracking. - */ - private Boolean disableTcpStateTracking; - - /* - * Specifies whether the network interface is FPGA networking-enabled. - */ - private Boolean enableFpga; - - /* - * Whether IP forwarding enabled on this NIC. - */ - private Boolean enableIPForwarding; - - /* - * The network security group. - */ - private SubResource networkSecurityGroup; - - /* - * The dns settings to be applied on the network interfaces. - */ - private VirtualMachineNetworkInterfaceDnsSettingsConfiguration dnsSettings; - - /* - * Specifies the IP configurations of the network interface. - */ - private List ipConfigurations; - - /* - * The DSCP configuration for the network interface. - */ - private SubResource dscpConfiguration; - - /* - * Specifies whether the Auxiliary mode is enabled for the Network Interface resource. - */ - private NetworkInterfaceAuxiliaryMode auxiliaryMode; - - /* - * Specifies whether the Auxiliary sku is enabled for the Network Interface resource. - */ - private NetworkInterfaceAuxiliarySku auxiliarySku; - - /** - * Creates an instance of VirtualMachineNetworkInterfaceConfigurationProperties class. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties() { - } - - /** - * Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1 - * network interface. - * - * @return the primary value. - */ - public Boolean primary() { - return this.primary; - } - - /** - * Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1 - * network interface. - * - * @param primary the primary value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties withPrimary(Boolean primary) { - this.primary = primary; - return this; - } - - /** - * Get the deleteOption property: Specify what happens to the network interface when the VM is deleted. - * - * @return the deleteOption value. - */ - public DeleteOptions deleteOption() { - return this.deleteOption; - } - - /** - * Set the deleteOption property: Specify what happens to the network interface when the VM is deleted. - * - * @param deleteOption the deleteOption value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties withDeleteOption(DeleteOptions deleteOption) { - this.deleteOption = deleteOption; - return this; - } - - /** - * Get the enableAcceleratedNetworking property: Specifies whether the network interface is accelerated - * networking-enabled. - * - * @return the enableAcceleratedNetworking value. - */ - public Boolean enableAcceleratedNetworking() { - return this.enableAcceleratedNetworking; - } - - /** - * Set the enableAcceleratedNetworking property: Specifies whether the network interface is accelerated - * networking-enabled. - * - * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties - withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking) { - this.enableAcceleratedNetworking = enableAcceleratedNetworking; - return this; - } - - /** - * Get the disableTcpStateTracking property: Specifies whether the network interface is disabled for tcp state - * tracking. - * - * @return the disableTcpStateTracking value. - */ - public Boolean disableTcpStateTracking() { - return this.disableTcpStateTracking; - } - - /** - * Set the disableTcpStateTracking property: Specifies whether the network interface is disabled for tcp state - * tracking. - * - * @param disableTcpStateTracking the disableTcpStateTracking value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties - withDisableTcpStateTracking(Boolean disableTcpStateTracking) { - this.disableTcpStateTracking = disableTcpStateTracking; - return this; - } - - /** - * Get the enableFpga property: Specifies whether the network interface is FPGA networking-enabled. - * - * @return the enableFpga value. - */ - public Boolean enableFpga() { - return this.enableFpga; - } - - /** - * Set the enableFpga property: Specifies whether the network interface is FPGA networking-enabled. - * - * @param enableFpga the enableFpga value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties withEnableFpga(Boolean enableFpga) { - this.enableFpga = enableFpga; - return this; - } - - /** - * Get the enableIPForwarding property: Whether IP forwarding enabled on this NIC. - * - * @return the enableIPForwarding value. - */ - public Boolean enableIPForwarding() { - return this.enableIPForwarding; - } - - /** - * Set the enableIPForwarding property: Whether IP forwarding enabled on this NIC. - * - * @param enableIPForwarding the enableIPForwarding value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties withEnableIPForwarding(Boolean enableIPForwarding) { - this.enableIPForwarding = enableIPForwarding; - return this; - } - - /** - * Get the networkSecurityGroup property: The network security group. - * - * @return the networkSecurityGroup value. - */ - public SubResource networkSecurityGroup() { - return this.networkSecurityGroup; - } - - /** - * Set the networkSecurityGroup property: The network security group. - * - * @param networkSecurityGroup the networkSecurityGroup value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties - withNetworkSecurityGroup(SubResource networkSecurityGroup) { - this.networkSecurityGroup = networkSecurityGroup; - return this; - } - - /** - * Get the dnsSettings property: The dns settings to be applied on the network interfaces. - * - * @return the dnsSettings value. - */ - public VirtualMachineNetworkInterfaceDnsSettingsConfiguration dnsSettings() { - return this.dnsSettings; - } - - /** - * Set the dnsSettings property: The dns settings to be applied on the network interfaces. - * - * @param dnsSettings the dnsSettings value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties - withDnsSettings(VirtualMachineNetworkInterfaceDnsSettingsConfiguration dnsSettings) { - this.dnsSettings = dnsSettings; - return this; - } - - /** - * Get the ipConfigurations property: Specifies the IP configurations of the network interface. - * - * @return the ipConfigurations value. - */ - public List ipConfigurations() { - return this.ipConfigurations; - } - - /** - * Set the ipConfigurations property: Specifies the IP configurations of the network interface. - * - * @param ipConfigurations the ipConfigurations value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties - withIpConfigurations(List ipConfigurations) { - this.ipConfigurations = ipConfigurations; - return this; - } - - /** - * Get the dscpConfiguration property: The DSCP configuration for the network interface. - * - * @return the dscpConfiguration value. - */ - public SubResource dscpConfiguration() { - return this.dscpConfiguration; - } - - /** - * Set the dscpConfiguration property: The DSCP configuration for the network interface. - * - * @param dscpConfiguration the dscpConfiguration value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties withDscpConfiguration(SubResource dscpConfiguration) { - this.dscpConfiguration = dscpConfiguration; - return this; - } - - /** - * Get the auxiliaryMode property: Specifies whether the Auxiliary mode is enabled for the Network Interface - * resource. - * - * @return the auxiliaryMode value. - */ - public NetworkInterfaceAuxiliaryMode auxiliaryMode() { - return this.auxiliaryMode; - } - - /** - * Set the auxiliaryMode property: Specifies whether the Auxiliary mode is enabled for the Network Interface - * resource. - * - * @param auxiliaryMode the auxiliaryMode value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties - withAuxiliaryMode(NetworkInterfaceAuxiliaryMode auxiliaryMode) { - this.auxiliaryMode = auxiliaryMode; - return this; - } - - /** - * Get the auxiliarySku property: Specifies whether the Auxiliary sku is enabled for the Network Interface resource. - * - * @return the auxiliarySku value. - */ - public NetworkInterfaceAuxiliarySku auxiliarySku() { - return this.auxiliarySku; - } - - /** - * Set the auxiliarySku property: Specifies whether the Auxiliary sku is enabled for the Network Interface resource. - * - * @param auxiliarySku the auxiliarySku value to set. - * @return the VirtualMachineNetworkInterfaceConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceConfigurationProperties - withAuxiliarySku(NetworkInterfaceAuxiliarySku auxiliarySku) { - this.auxiliarySku = auxiliarySku; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipConfigurations", this.ipConfigurations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeBooleanField("primary", this.primary); - jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); - jsonWriter.writeBooleanField("enableAcceleratedNetworking", this.enableAcceleratedNetworking); - jsonWriter.writeBooleanField("disableTcpStateTracking", this.disableTcpStateTracking); - jsonWriter.writeBooleanField("enableFpga", this.enableFpga); - jsonWriter.writeBooleanField("enableIPForwarding", this.enableIPForwarding); - jsonWriter.writeJsonField("networkSecurityGroup", this.networkSecurityGroup); - jsonWriter.writeJsonField("dnsSettings", this.dnsSettings); - jsonWriter.writeJsonField("dscpConfiguration", this.dscpConfiguration); - jsonWriter.writeStringField("auxiliaryMode", this.auxiliaryMode == null ? null : this.auxiliaryMode.toString()); - jsonWriter.writeStringField("auxiliarySku", this.auxiliarySku == null ? null : this.auxiliarySku.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineNetworkInterfaceConfigurationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineNetworkInterfaceConfigurationProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VirtualMachineNetworkInterfaceConfigurationProperties. - */ - public static VirtualMachineNetworkInterfaceConfigurationProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineNetworkInterfaceConfigurationProperties deserializedVirtualMachineNetworkInterfaceConfigurationProperties - = new VirtualMachineNetworkInterfaceConfigurationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipConfigurations".equals(fieldName)) { - List ipConfigurations - = reader.readArray(reader1 -> VirtualMachineNetworkInterfaceIPConfiguration.fromJson(reader1)); - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.ipConfigurations - = ipConfigurations; - } else if ("primary".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.primary - = reader.getNullable(JsonReader::getBoolean); - } else if ("deleteOption".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.deleteOption - = DeleteOptions.fromString(reader.getString()); - } else if ("enableAcceleratedNetworking".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.enableAcceleratedNetworking - = reader.getNullable(JsonReader::getBoolean); - } else if ("disableTcpStateTracking".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.disableTcpStateTracking - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableFpga".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.enableFpga - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableIPForwarding".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.enableIPForwarding - = reader.getNullable(JsonReader::getBoolean); - } else if ("networkSecurityGroup".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.networkSecurityGroup - = SubResource.fromJson(reader); - } else if ("dnsSettings".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.dnsSettings - = VirtualMachineNetworkInterfaceDnsSettingsConfiguration.fromJson(reader); - } else if ("dscpConfiguration".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.dscpConfiguration - = SubResource.fromJson(reader); - } else if ("auxiliaryMode".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.auxiliaryMode - = NetworkInterfaceAuxiliaryMode.fromString(reader.getString()); - } else if ("auxiliarySku".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceConfigurationProperties.auxiliarySku - = NetworkInterfaceAuxiliarySku.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineNetworkInterfaceConfigurationProperties; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java deleted file mode 100644 index f8e90d32564d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Describes a virtual machines network configuration's DNS settings. - */ -@Fluent -public final class VirtualMachineNetworkInterfaceDnsSettingsConfiguration - implements JsonSerializable { - /* - * List of DNS servers IP addresses - */ - private List dnsServers; - - /** - * Creates an instance of VirtualMachineNetworkInterfaceDnsSettingsConfiguration class. - */ - public VirtualMachineNetworkInterfaceDnsSettingsConfiguration() { - } - - /** - * Get the dnsServers property: List of DNS servers IP addresses. - * - * @return the dnsServers value. - */ - public List dnsServers() { - return this.dnsServers; - } - - /** - * Set the dnsServers property: List of DNS servers IP addresses. - * - * @param dnsServers the dnsServers value to set. - * @return the VirtualMachineNetworkInterfaceDnsSettingsConfiguration object itself. - */ - public VirtualMachineNetworkInterfaceDnsSettingsConfiguration withDnsServers(List dnsServers) { - this.dnsServers = dnsServers; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("dnsServers", this.dnsServers, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineNetworkInterfaceDnsSettingsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineNetworkInterfaceDnsSettingsConfiguration if the JsonReader was pointing to - * an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineNetworkInterfaceDnsSettingsConfiguration. - */ - public static VirtualMachineNetworkInterfaceDnsSettingsConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineNetworkInterfaceDnsSettingsConfiguration deserializedVirtualMachineNetworkInterfaceDnsSettingsConfiguration - = new VirtualMachineNetworkInterfaceDnsSettingsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dnsServers".equals(fieldName)) { - List dnsServers = reader.readArray(reader1 -> reader1.getString()); - deserializedVirtualMachineNetworkInterfaceDnsSettingsConfiguration.dnsServers = dnsServers; - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineNetworkInterfaceDnsSettingsConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java deleted file mode 100644 index 7bcb5198ea57..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a virtual machine network profile's IP configuration. - */ -@Fluent -public final class VirtualMachineNetworkInterfaceIPConfiguration - implements JsonSerializable { - /* - * The IP configuration name. - */ - private String name; - - /* - * Describes a virtual machine network interface IP configuration properties. - */ - private VirtualMachineNetworkInterfaceIPConfigurationProperties properties; - - /** - * Creates an instance of VirtualMachineNetworkInterfaceIPConfiguration class. - */ - public VirtualMachineNetworkInterfaceIPConfiguration() { - } - - /** - * Get the name property: The IP configuration name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The IP configuration name. - * - * @param name the name value to set. - * @return the VirtualMachineNetworkInterfaceIPConfiguration object itself. - */ - public VirtualMachineNetworkInterfaceIPConfiguration withName(String name) { - this.name = name; - return this; - } - - /** - * Get the properties property: Describes a virtual machine network interface IP configuration properties. - * - * @return the properties value. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Describes a virtual machine network interface IP configuration properties. - * - * @param properties the properties value to set. - * @return the VirtualMachineNetworkInterfaceIPConfiguration object itself. - */ - public VirtualMachineNetworkInterfaceIPConfiguration - withProperties(VirtualMachineNetworkInterfaceIPConfigurationProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineNetworkInterfaceIPConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineNetworkInterfaceIPConfiguration if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VirtualMachineNetworkInterfaceIPConfiguration. - */ - public static VirtualMachineNetworkInterfaceIPConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineNetworkInterfaceIPConfiguration deserializedVirtualMachineNetworkInterfaceIPConfiguration - = new VirtualMachineNetworkInterfaceIPConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceIPConfiguration.name = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceIPConfiguration.properties - = VirtualMachineNetworkInterfaceIPConfigurationProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineNetworkInterfaceIPConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java deleted file mode 100644 index 1e1497819ffc..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Describes a virtual machine network interface IP configuration properties. - */ -@Fluent -public final class VirtualMachineNetworkInterfaceIPConfigurationProperties - implements JsonSerializable { - /* - * Specifies the identifier of the subnet. - */ - private SubResource subnet; - - /* - * Specifies the primary network interface in case the virtual machine has more than 1 network interface. - */ - private Boolean primary; - - /* - * The publicIPAddressConfiguration. - */ - private VirtualMachinePublicIPAddressConfiguration publicIPAddressConfiguration; - - /* - * Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or - * IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - */ - private IPVersions privateIPAddressVersion; - - /* - * Specifies an array of references to application security group. - */ - private List applicationSecurityGroups; - - /* - * Specifies an array of references to backend address pools of application gateways. A virtual machine can - * reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same - * application gateway. - */ - private List applicationGatewayBackendAddressPools; - - /* - * Specifies an array of references to backend address pools of load balancers. A virtual machine can reference - * backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the - * same basic sku load balancer]. - */ - private List loadBalancerBackendAddressPools; - - /** - * Creates an instance of VirtualMachineNetworkInterfaceIPConfigurationProperties class. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties() { - } - - /** - * Get the subnet property: Specifies the identifier of the subnet. - * - * @return the subnet value. - */ - public SubResource subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Specifies the identifier of the subnet. - * - * @param subnet the subnet value to set. - * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties withSubnet(SubResource subnet) { - this.subnet = subnet; - return this; - } - - /** - * Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1 - * network interface. - * - * @return the primary value. - */ - public Boolean primary() { - return this.primary; - } - - /** - * Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1 - * network interface. - * - * @param primary the primary value to set. - * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties withPrimary(Boolean primary) { - this.primary = primary; - return this; - } - - /** - * Get the publicIPAddressConfiguration property: The publicIPAddressConfiguration. - * - * @return the publicIPAddressConfiguration value. - */ - public VirtualMachinePublicIPAddressConfiguration publicIPAddressConfiguration() { - return this.publicIPAddressConfiguration; - } - - /** - * Set the publicIPAddressConfiguration property: The publicIPAddressConfiguration. - * - * @param publicIPAddressConfiguration the publicIPAddressConfiguration value to set. - * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties - withPublicIPAddressConfiguration(VirtualMachinePublicIPAddressConfiguration publicIPAddressConfiguration) { - this.publicIPAddressConfiguration = publicIPAddressConfiguration; - return this; - } - - /** - * Get the privateIPAddressVersion property: Available from Api-Version 2017-03-30 onwards, it represents whether - * the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - * - * @return the privateIPAddressVersion value. - */ - public IPVersions privateIPAddressVersion() { - return this.privateIPAddressVersion; - } - - /** - * Set the privateIPAddressVersion property: Available from Api-Version 2017-03-30 onwards, it represents whether - * the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - * - * @param privateIPAddressVersion the privateIPAddressVersion value to set. - * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties - withPrivateIPAddressVersion(IPVersions privateIPAddressVersion) { - this.privateIPAddressVersion = privateIPAddressVersion; - return this; - } - - /** - * Get the applicationSecurityGroups property: Specifies an array of references to application security group. - * - * @return the applicationSecurityGroups value. - */ - public List applicationSecurityGroups() { - return this.applicationSecurityGroups; - } - - /** - * Set the applicationSecurityGroups property: Specifies an array of references to application security group. - * - * @param applicationSecurityGroups the applicationSecurityGroups value to set. - * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties - withApplicationSecurityGroups(List applicationSecurityGroups) { - this.applicationSecurityGroups = applicationSecurityGroups; - return this; - } - - /** - * Get the applicationGatewayBackendAddressPools property: Specifies an array of references to backend address pools - * of application gateways. A virtual machine can reference backend address pools of multiple application gateways. - * Multiple virtual machines cannot use the same application gateway. - * - * @return the applicationGatewayBackendAddressPools value. - */ - public List applicationGatewayBackendAddressPools() { - return this.applicationGatewayBackendAddressPools; - } - - /** - * Set the applicationGatewayBackendAddressPools property: Specifies an array of references to backend address pools - * of application gateways. A virtual machine can reference backend address pools of multiple application gateways. - * Multiple virtual machines cannot use the same application gateway. - * - * @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set. - * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties - withApplicationGatewayBackendAddressPools(List applicationGatewayBackendAddressPools) { - this.applicationGatewayBackendAddressPools = applicationGatewayBackendAddressPools; - return this; - } - - /** - * Get the loadBalancerBackendAddressPools property: Specifies an array of references to backend address pools of - * load balancers. A virtual machine can reference backend address pools of one public and one internal load - * balancer. [Multiple virtual machines cannot use the same basic sku load balancer]. - * - * @return the loadBalancerBackendAddressPools value. - */ - public List loadBalancerBackendAddressPools() { - return this.loadBalancerBackendAddressPools; - } - - /** - * Set the loadBalancerBackendAddressPools property: Specifies an array of references to backend address pools of - * load balancers. A virtual machine can reference backend address pools of one public and one internal load - * balancer. [Multiple virtual machines cannot use the same basic sku load balancer]. - * - * @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set. - * @return the VirtualMachineNetworkInterfaceIPConfigurationProperties object itself. - */ - public VirtualMachineNetworkInterfaceIPConfigurationProperties - withLoadBalancerBackendAddressPools(List loadBalancerBackendAddressPools) { - this.loadBalancerBackendAddressPools = loadBalancerBackendAddressPools; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("subnet", this.subnet); - jsonWriter.writeBooleanField("primary", this.primary); - jsonWriter.writeJsonField("publicIPAddressConfiguration", this.publicIPAddressConfiguration); - jsonWriter.writeStringField("privateIPAddressVersion", - this.privateIPAddressVersion == null ? null : this.privateIPAddressVersion.toString()); - jsonWriter.writeArrayField("applicationSecurityGroups", this.applicationSecurityGroups, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("applicationGatewayBackendAddressPools", this.applicationGatewayBackendAddressPools, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("loadBalancerBackendAddressPools", this.loadBalancerBackendAddressPools, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineNetworkInterfaceIPConfigurationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineNetworkInterfaceIPConfigurationProperties if the JsonReader was pointing to - * an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineNetworkInterfaceIPConfigurationProperties. - */ - public static VirtualMachineNetworkInterfaceIPConfigurationProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineNetworkInterfaceIPConfigurationProperties deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties - = new VirtualMachineNetworkInterfaceIPConfigurationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("subnet".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.subnet - = SubResource.fromJson(reader); - } else if ("primary".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.primary - = reader.getNullable(JsonReader::getBoolean); - } else if ("publicIPAddressConfiguration".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.publicIPAddressConfiguration - = VirtualMachinePublicIPAddressConfiguration.fromJson(reader); - } else if ("privateIPAddressVersion".equals(fieldName)) { - deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.privateIPAddressVersion - = IPVersions.fromString(reader.getString()); - } else if ("applicationSecurityGroups".equals(fieldName)) { - List applicationSecurityGroups - = reader.readArray(reader1 -> SubResource.fromJson(reader1)); - deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.applicationSecurityGroups - = applicationSecurityGroups; - } else if ("applicationGatewayBackendAddressPools".equals(fieldName)) { - List applicationGatewayBackendAddressPools - = reader.readArray(reader1 -> SubResource.fromJson(reader1)); - deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.applicationGatewayBackendAddressPools - = applicationGatewayBackendAddressPools; - } else if ("loadBalancerBackendAddressPools".equals(fieldName)) { - List loadBalancerBackendAddressPools - = reader.readArray(reader1 -> SubResource.fromJson(reader1)); - deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties.loadBalancerBackendAddressPools - = loadBalancerBackendAddressPools; - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineNetworkInterfaceIPConfigurationProperties; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java deleted file mode 100644 index fc537fccdac2..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Describes a virtual machines IP Configuration's PublicIPAddress configuration. - */ -@Fluent -public final class VirtualMachinePublicIPAddressConfiguration - implements JsonSerializable { - /* - * The publicIP address configuration name. - */ - private String name; - - /* - * Describes a virtual machines IP Configuration's PublicIPAddress configuration - */ - private VirtualMachinePublicIPAddressConfigurationProperties properties; - - /* - * Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. - */ - private PublicIPAddressSku sku; - - /* - * Resource tags applied to the publicIP address created by this PublicIPAddressConfiguration - */ - private Map tags; - - /** - * Creates an instance of VirtualMachinePublicIPAddressConfiguration class. - */ - public VirtualMachinePublicIPAddressConfiguration() { - } - - /** - * Get the name property: The publicIP address configuration name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The publicIP address configuration name. - * - * @param name the name value to set. - * @return the VirtualMachinePublicIPAddressConfiguration object itself. - */ - public VirtualMachinePublicIPAddressConfiguration withName(String name) { - this.name = name; - return this; - } - - /** - * Get the properties property: Describes a virtual machines IP Configuration's PublicIPAddress configuration. - * - * @return the properties value. - */ - public VirtualMachinePublicIPAddressConfigurationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Describes a virtual machines IP Configuration's PublicIPAddress configuration. - * - * @param properties the properties value to set. - * @return the VirtualMachinePublicIPAddressConfiguration object itself. - */ - public VirtualMachinePublicIPAddressConfiguration - withProperties(VirtualMachinePublicIPAddressConfigurationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. - * - * @return the sku value. - */ - public PublicIPAddressSku sku() { - return this.sku; - } - - /** - * Set the sku property: Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. - * - * @param sku the sku value to set. - * @return the VirtualMachinePublicIPAddressConfiguration object itself. - */ - public VirtualMachinePublicIPAddressConfiguration withSku(PublicIPAddressSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the tags property: Resource tags applied to the publicIP address created by this - * PublicIPAddressConfiguration. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags applied to the publicIP address created by this - * PublicIPAddressConfiguration. - * - * @param tags the tags value to set. - * @return the VirtualMachinePublicIPAddressConfiguration object itself. - */ - public VirtualMachinePublicIPAddressConfiguration withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachinePublicIPAddressConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachinePublicIPAddressConfiguration if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VirtualMachinePublicIPAddressConfiguration. - */ - public static VirtualMachinePublicIPAddressConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachinePublicIPAddressConfiguration deserializedVirtualMachinePublicIPAddressConfiguration - = new VirtualMachinePublicIPAddressConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressConfiguration.name = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressConfiguration.properties - = VirtualMachinePublicIPAddressConfigurationProperties.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressConfiguration.sku = PublicIPAddressSku.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedVirtualMachinePublicIPAddressConfiguration.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachinePublicIPAddressConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java deleted file mode 100644 index 0dd566aa3e6a..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Describes a virtual machines IP Configuration's PublicIPAddress configuration. - */ -@Fluent -public final class VirtualMachinePublicIPAddressConfigurationProperties - implements JsonSerializable { - /* - * The idle timeout of the public IP address. - */ - private Integer idleTimeoutInMinutes; - - /* - * Specify what happens to the public IP address when the VM is deleted - */ - private DeleteOptions deleteOption; - - /* - * The dns settings to be applied on the publicIP addresses . - */ - private VirtualMachinePublicIPAddressDnsSettingsConfiguration dnsSettings; - - /* - * The list of IP tags associated with the public IP address. - */ - private List ipTags; - - /* - * The PublicIPPrefix from which to allocate publicIP addresses. - */ - private SubResource publicIPPrefix; - - /* - * Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or - * IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - */ - private IPVersions publicIPAddressVersion; - - /* - * Specify the public IP allocation type - */ - private PublicIPAllocationMethod publicIPAllocationMethod; - - /** - * Creates an instance of VirtualMachinePublicIPAddressConfigurationProperties class. - */ - public VirtualMachinePublicIPAddressConfigurationProperties() { - } - - /** - * Get the idleTimeoutInMinutes property: The idle timeout of the public IP address. - * - * @return the idleTimeoutInMinutes value. - */ - public Integer idleTimeoutInMinutes() { - return this.idleTimeoutInMinutes; - } - - /** - * Set the idleTimeoutInMinutes property: The idle timeout of the public IP address. - * - * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set. - * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. - */ - public VirtualMachinePublicIPAddressConfigurationProperties withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { - this.idleTimeoutInMinutes = idleTimeoutInMinutes; - return this; - } - - /** - * Get the deleteOption property: Specify what happens to the public IP address when the VM is deleted. - * - * @return the deleteOption value. - */ - public DeleteOptions deleteOption() { - return this.deleteOption; - } - - /** - * Set the deleteOption property: Specify what happens to the public IP address when the VM is deleted. - * - * @param deleteOption the deleteOption value to set. - * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. - */ - public VirtualMachinePublicIPAddressConfigurationProperties withDeleteOption(DeleteOptions deleteOption) { - this.deleteOption = deleteOption; - return this; - } - - /** - * Get the dnsSettings property: The dns settings to be applied on the publicIP addresses . - * - * @return the dnsSettings value. - */ - public VirtualMachinePublicIPAddressDnsSettingsConfiguration dnsSettings() { - return this.dnsSettings; - } - - /** - * Set the dnsSettings property: The dns settings to be applied on the publicIP addresses . - * - * @param dnsSettings the dnsSettings value to set. - * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. - */ - public VirtualMachinePublicIPAddressConfigurationProperties - withDnsSettings(VirtualMachinePublicIPAddressDnsSettingsConfiguration dnsSettings) { - this.dnsSettings = dnsSettings; - return this; - } - - /** - * Get the ipTags property: The list of IP tags associated with the public IP address. - * - * @return the ipTags value. - */ - public List ipTags() { - return this.ipTags; - } - - /** - * Set the ipTags property: The list of IP tags associated with the public IP address. - * - * @param ipTags the ipTags value to set. - * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. - */ - public VirtualMachinePublicIPAddressConfigurationProperties withIpTags(List ipTags) { - this.ipTags = ipTags; - return this; - } - - /** - * Get the publicIPPrefix property: The PublicIPPrefix from which to allocate publicIP addresses. - * - * @return the publicIPPrefix value. - */ - public SubResource publicIPPrefix() { - return this.publicIPPrefix; - } - - /** - * Set the publicIPPrefix property: The PublicIPPrefix from which to allocate publicIP addresses. - * - * @param publicIPPrefix the publicIPPrefix value to set. - * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. - */ - public VirtualMachinePublicIPAddressConfigurationProperties withPublicIPPrefix(SubResource publicIPPrefix) { - this.publicIPPrefix = publicIPPrefix; - return this; - } - - /** - * Get the publicIPAddressVersion property: Available from Api-Version 2019-07-01 onwards, it represents whether the - * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - * - * @return the publicIPAddressVersion value. - */ - public IPVersions publicIPAddressVersion() { - return this.publicIPAddressVersion; - } - - /** - * Set the publicIPAddressVersion property: Available from Api-Version 2019-07-01 onwards, it represents whether the - * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - * - * @param publicIPAddressVersion the publicIPAddressVersion value to set. - * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. - */ - public VirtualMachinePublicIPAddressConfigurationProperties - withPublicIPAddressVersion(IPVersions publicIPAddressVersion) { - this.publicIPAddressVersion = publicIPAddressVersion; - return this; - } - - /** - * Get the publicIPAllocationMethod property: Specify the public IP allocation type. - * - * @return the publicIPAllocationMethod value. - */ - public PublicIPAllocationMethod publicIPAllocationMethod() { - return this.publicIPAllocationMethod; - } - - /** - * Set the publicIPAllocationMethod property: Specify the public IP allocation type. - * - * @param publicIPAllocationMethod the publicIPAllocationMethod value to set. - * @return the VirtualMachinePublicIPAddressConfigurationProperties object itself. - */ - public VirtualMachinePublicIPAddressConfigurationProperties - withPublicIPAllocationMethod(PublicIPAllocationMethod publicIPAllocationMethod) { - this.publicIPAllocationMethod = publicIPAllocationMethod; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("idleTimeoutInMinutes", this.idleTimeoutInMinutes); - jsonWriter.writeStringField("deleteOption", this.deleteOption == null ? null : this.deleteOption.toString()); - jsonWriter.writeJsonField("dnsSettings", this.dnsSettings); - jsonWriter.writeArrayField("ipTags", this.ipTags, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("publicIPPrefix", this.publicIPPrefix); - jsonWriter.writeStringField("publicIPAddressVersion", - this.publicIPAddressVersion == null ? null : this.publicIPAddressVersion.toString()); - jsonWriter.writeStringField("publicIPAllocationMethod", - this.publicIPAllocationMethod == null ? null : this.publicIPAllocationMethod.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachinePublicIPAddressConfigurationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachinePublicIPAddressConfigurationProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachinePublicIPAddressConfigurationProperties. - */ - public static VirtualMachinePublicIPAddressConfigurationProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachinePublicIPAddressConfigurationProperties deserializedVirtualMachinePublicIPAddressConfigurationProperties - = new VirtualMachinePublicIPAddressConfigurationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("idleTimeoutInMinutes".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressConfigurationProperties.idleTimeoutInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("deleteOption".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressConfigurationProperties.deleteOption - = DeleteOptions.fromString(reader.getString()); - } else if ("dnsSettings".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressConfigurationProperties.dnsSettings - = VirtualMachinePublicIPAddressDnsSettingsConfiguration.fromJson(reader); - } else if ("ipTags".equals(fieldName)) { - List ipTags - = reader.readArray(reader1 -> VirtualMachineIpTag.fromJson(reader1)); - deserializedVirtualMachinePublicIPAddressConfigurationProperties.ipTags = ipTags; - } else if ("publicIPPrefix".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressConfigurationProperties.publicIPPrefix - = SubResource.fromJson(reader); - } else if ("publicIPAddressVersion".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressConfigurationProperties.publicIPAddressVersion - = IPVersions.fromString(reader.getString()); - } else if ("publicIPAllocationMethod".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressConfigurationProperties.publicIPAllocationMethod - = PublicIPAllocationMethod.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachinePublicIPAddressConfigurationProperties; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java deleted file mode 100644 index fc84a93fb5ae..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a virtual machines network configuration's DNS settings. - */ -@Fluent -public final class VirtualMachinePublicIPAddressDnsSettingsConfiguration - implements JsonSerializable { - /* - * The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is - * the concatenation of the domain name label and vm network profile unique ID. - */ - private String domainNameLabel; - - /* - * The Domain name label scope of the PublicIPAddress resources that will be created. The generated name label is - * the concatenation of the hashed domain name label with policy according to the domain name label scope and vm - * network profile unique ID. - */ - private DomainNameLabelScopeTypes domainNameLabelScope; - - /** - * Creates an instance of VirtualMachinePublicIPAddressDnsSettingsConfiguration class. - */ - public VirtualMachinePublicIPAddressDnsSettingsConfiguration() { - } - - /** - * Get the domainNameLabel property: The Domain name label prefix of the PublicIPAddress resources that will be - * created. The generated name label is the concatenation of the domain name label and vm network profile unique ID. - * - * @return the domainNameLabel value. - */ - public String domainNameLabel() { - return this.domainNameLabel; - } - - /** - * Set the domainNameLabel property: The Domain name label prefix of the PublicIPAddress resources that will be - * created. The generated name label is the concatenation of the domain name label and vm network profile unique ID. - * - * @param domainNameLabel the domainNameLabel value to set. - * @return the VirtualMachinePublicIPAddressDnsSettingsConfiguration object itself. - */ - public VirtualMachinePublicIPAddressDnsSettingsConfiguration withDomainNameLabel(String domainNameLabel) { - this.domainNameLabel = domainNameLabel; - return this; - } - - /** - * Get the domainNameLabelScope property: The Domain name label scope of the PublicIPAddress resources that will be - * created. The generated name label is the concatenation of the hashed domain name label with policy according to - * the domain name label scope and vm network profile unique ID. - * - * @return the domainNameLabelScope value. - */ - public DomainNameLabelScopeTypes domainNameLabelScope() { - return this.domainNameLabelScope; - } - - /** - * Set the domainNameLabelScope property: The Domain name label scope of the PublicIPAddress resources that will be - * created. The generated name label is the concatenation of the hashed domain name label with policy according to - * the domain name label scope and vm network profile unique ID. - * - * @param domainNameLabelScope the domainNameLabelScope value to set. - * @return the VirtualMachinePublicIPAddressDnsSettingsConfiguration object itself. - */ - public VirtualMachinePublicIPAddressDnsSettingsConfiguration - withDomainNameLabelScope(DomainNameLabelScopeTypes domainNameLabelScope) { - this.domainNameLabelScope = domainNameLabelScope; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("domainNameLabel", this.domainNameLabel); - jsonWriter.writeStringField("domainNameLabelScope", - this.domainNameLabelScope == null ? null : this.domainNameLabelScope.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachinePublicIPAddressDnsSettingsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachinePublicIPAddressDnsSettingsConfiguration if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VirtualMachinePublicIPAddressDnsSettingsConfiguration. - */ - public static VirtualMachinePublicIPAddressDnsSettingsConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachinePublicIPAddressDnsSettingsConfiguration deserializedVirtualMachinePublicIPAddressDnsSettingsConfiguration - = new VirtualMachinePublicIPAddressDnsSettingsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("domainNameLabel".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressDnsSettingsConfiguration.domainNameLabel - = reader.getString(); - } else if ("domainNameLabelScope".equals(fieldName)) { - deserializedVirtualMachinePublicIPAddressDnsSettingsConfiguration.domainNameLabelScope - = DomainNameLabelScopeTypes.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachinePublicIPAddressDnsSettingsConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java deleted file mode 100644 index 3715091f66b7..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A VM size profile with a name and rank for flex VM creation. - */ -@Fluent -public final class VmSizeProfile implements JsonSerializable { - /* - * The name of the VM size, eg Standard_D2ads_v5 - */ - private String name; - - /* - * The rank of this VM size in the priority order - */ - private Integer rank; - - /** - * Creates an instance of VmSizeProfile class. - */ - public VmSizeProfile() { - } - - /** - * Get the name property: The name of the VM size, eg Standard_D2ads_v5. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the VM size, eg Standard_D2ads_v5. - * - * @param name the name value to set. - * @return the VmSizeProfile object itself. - */ - public VmSizeProfile withName(String name) { - this.name = name; - return this; - } - - /** - * Get the rank property: The rank of this VM size in the priority order. - * - * @return the rank value. - */ - public Integer rank() { - return this.rank; - } - - /** - * Set the rank property: The rank of this VM size in the priority order. - * - * @param rank the rank value to set. - * @return the VmSizeProfile object itself. - */ - public VmSizeProfile withRank(Integer rank) { - this.rank = rank; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeNumberField("rank", this.rank); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmSizeProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmSizeProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VmSizeProfile. - */ - public static VmSizeProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmSizeProfile deserializedVmSizeProfile = new VmSizeProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedVmSizeProfile.name = reader.getString(); - } else if ("rank".equals(fieldName)) { - deserializedVmSizeProfile.rank = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedVmSizeProfile; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProperties.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProperties.java deleted file mode 100644 index cf5e09c6107e..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProperties.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies VM Size Property settings on the virtual machine. - */ -@Fluent -public final class VmSizeProperties implements JsonSerializable { - /* - * Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the - * default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List - * all available virtual machine sizes in a - * region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). - */ - private Integer vCpusAvailable; - - /* - * Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default - * behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available - * virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). - * **Setting this property to 1 also means that hyper-threading is disabled.** - */ - private Integer vCpusPerCore; - - /** - * Creates an instance of VmSizeProperties class. - */ - public VmSizeProperties() { - } - - /** - * Get the vCpusAvailable property: Specifies the number of vCPUs available for the VM. When this property is not - * specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size - * exposed in api response of [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). - * - * @return the vCpusAvailable value. - */ - public Integer vCpusAvailable() { - return this.vCpusAvailable; - } - - /** - * Set the vCpusAvailable property: Specifies the number of vCPUs available for the VM. When this property is not - * specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size - * exposed in api response of [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). - * - * @param vCpusAvailable the vCpusAvailable value to set. - * @return the VmSizeProperties object itself. - */ - public VmSizeProperties withVCpusAvailable(Integer vCpusAvailable) { - this.vCpusAvailable = vCpusAvailable; - return this; - } - - /** - * Get the vCpusPerCore property: Specifies the vCPU to physical core ratio. When this property is not specified in - * the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response - * of [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also - * means that hyper-threading is disabled.**. - * - * @return the vCpusPerCore value. - */ - public Integer vCpusPerCore() { - return this.vCpusPerCore; - } - - /** - * Set the vCpusPerCore property: Specifies the vCPU to physical core ratio. When this property is not specified in - * the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response - * of [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also - * means that hyper-threading is disabled.**. - * - * @param vCpusPerCore the vCpusPerCore value to set. - * @return the VmSizeProperties object itself. - */ - public VmSizeProperties withVCpusPerCore(Integer vCpusPerCore) { - this.vCpusPerCore = vCpusPerCore; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("vCpusAvailable", this.vCpusAvailable); - jsonWriter.writeNumberField("vCpusPerCore", this.vCpusPerCore); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmSizeProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmSizeProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VmSizeProperties. - */ - public static VmSizeProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmSizeProperties deserializedVmSizeProperties = new VmSizeProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vCpusAvailable".equals(fieldName)) { - deserializedVmSizeProperties.vCpusAvailable = reader.getNullable(JsonReader::getInt); - } else if ("vCpusPerCore".equals(fieldName)) { - deserializedVmSizeProperties.vCpusPerCore = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedVmSizeProperties; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java deleted file mode 100644 index 8159cf105db8..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Describes Windows Remote Management configuration of the VM. - */ -@Fluent -public final class WinRMConfiguration implements JsonSerializable { - /* - * The list of Windows Remote Management listeners - */ - private List listeners; - - /** - * Creates an instance of WinRMConfiguration class. - */ - public WinRMConfiguration() { - } - - /** - * Get the listeners property: The list of Windows Remote Management listeners. - * - * @return the listeners value. - */ - public List listeners() { - return this.listeners; - } - - /** - * Set the listeners property: The list of Windows Remote Management listeners. - * - * @param listeners the listeners value to set. - * @return the WinRMConfiguration object itself. - */ - public WinRMConfiguration withListeners(List listeners) { - this.listeners = listeners; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("listeners", this.listeners, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WinRMConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WinRMConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the WinRMConfiguration. - */ - public static WinRMConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WinRMConfiguration deserializedWinRMConfiguration = new WinRMConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("listeners".equals(fieldName)) { - List listeners = reader.readArray(reader1 -> WinRMListener.fromJson(reader1)); - deserializedWinRMConfiguration.listeners = listeners; - } else { - reader.skipChildren(); - } - } - - return deserializedWinRMConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java deleted file mode 100644 index 2e12a1973375..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes Protocol and thumbprint of Windows Remote Management listener. - */ -@Fluent -public final class WinRMListener implements JsonSerializable { - /* - * Specifies the protocol of WinRM listener. Possible values are: **http,** **https.** - */ - private ProtocolTypes protocol; - - /* - * This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key - * Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate - * needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8:

      {
      - * "data":"",
      "dataType":"pfx",
      "password":""
      }
      To - * install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension - * for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault - * virtual machine extension for - * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - */ - private String certificateUrl; - - /** - * Creates an instance of WinRMListener class. - */ - public WinRMListener() { - } - - /** - * Get the protocol property: Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. - * - * @return the protocol value. - */ - public ProtocolTypes protocol() { - return this.protocol; - } - - /** - * Set the protocol property: Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. - * - * @param protocol the protocol value to set. - * @return the WinRMListener object itself. - */ - public WinRMListener withProtocol(ProtocolTypes protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a - * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate - * needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> - * {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> - * "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is - * recommended to use the [Azure Key Vault virtual machine extension for - * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault - * virtual machine extension for - * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - * - * @return the certificateUrl value. - */ - public String certificateUrl() { - return this.certificateUrl; - } - - /** - * Set the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a - * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate - * needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> - * {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> - * "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is - * recommended to use the [Azure Key Vault virtual machine extension for - * Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault - * virtual machine extension for - * Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - * - * @param certificateUrl the certificateUrl value to set. - * @return the WinRMListener object itself. - */ - public WinRMListener withCertificateUrl(String certificateUrl) { - this.certificateUrl = certificateUrl; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); - jsonWriter.writeStringField("certificateUrl", this.certificateUrl); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WinRMListener from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WinRMListener if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the WinRMListener. - */ - public static WinRMListener fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WinRMListener deserializedWinRMListener = new WinRMListener(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("protocol".equals(fieldName)) { - deserializedWinRMListener.protocol = ProtocolTypes.fromString(reader.getString()); - } else if ("certificateUrl".equals(fieldName)) { - deserializedWinRMListener.certificateUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWinRMListener; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java deleted file mode 100644 index 73f8d2ed77f9..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Specifies Windows operating system settings on the virtual machine. - */ -@Fluent -public final class WindowsConfiguration implements JsonSerializable { - /* - * Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not - * specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the - * VM so that extensions can be added to the VM later. - */ - private Boolean provisionVMAgent; - - /* - * Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For - * virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. - */ - private Boolean enableAutomaticUpdates; - - /* - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible values can be - * [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value - * from time zones returned by - * [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). - */ - private String timeZone; - - /* - * Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, - * which is used by Windows Setup. - */ - private List additionalUnattendContent; - - /* - * [Preview Feature] Specifies settings related to VM Guest Patching on Windows. - */ - private PatchSettings patchSettings; - - /* - * Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - */ - private WinRMConfiguration winRM; - - /** - * Creates an instance of WindowsConfiguration class. - */ - public WindowsConfiguration() { - } - - /** - * Get the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual - * machine. When this property is not specified in the request body, it is set to true by default. This will ensure - * that VM Agent is installed on the VM so that extensions can be added to the VM later. - * - * @return the provisionVMAgent value. - */ - public Boolean provisionVMAgent() { - return this.provisionVMAgent; - } - - /** - * Set the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual - * machine. When this property is not specified in the request body, it is set to true by default. This will ensure - * that VM Agent is installed on the VM so that extensions can be added to the VM later. - * - * @param provisionVMAgent the provisionVMAgent value to set. - * @return the WindowsConfiguration object itself. - */ - public WindowsConfiguration withProvisionVMAgent(Boolean provisionVMAgent) { - this.provisionVMAgent = provisionVMAgent; - return this; - } - - /** - * Get the enableAutomaticUpdates property: Indicates whether Automatic Updates is enabled for the Windows virtual - * machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will - * take effect on OS reprovisioning. - * - * @return the enableAutomaticUpdates value. - */ - public Boolean enableAutomaticUpdates() { - return this.enableAutomaticUpdates; - } - - /** - * Set the enableAutomaticUpdates property: Indicates whether Automatic Updates is enabled for the Windows virtual - * machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will - * take effect on OS reprovisioning. - * - * @param enableAutomaticUpdates the enableAutomaticUpdates value to set. - * @return the WindowsConfiguration object itself. - */ - public WindowsConfiguration withEnableAutomaticUpdates(Boolean enableAutomaticUpdates) { - this.enableAutomaticUpdates = enableAutomaticUpdates; - return this; - } - - /** - * Get the timeZone property: Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible - * values can be - * [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value - * from time zones returned by - * [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). - * - * @return the timeZone value. - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone property: Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible - * values can be - * [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value - * from time zones returned by - * [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). - * - * @param timeZone the timeZone value to set. - * @return the WindowsConfiguration object itself. - */ - public WindowsConfiguration withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Get the additionalUnattendContent property: Specifies additional base-64 encoded XML formatted information that - * can be included in the Unattend.xml file, which is used by Windows Setup. - * - * @return the additionalUnattendContent value. - */ - public List additionalUnattendContent() { - return this.additionalUnattendContent; - } - - /** - * Set the additionalUnattendContent property: Specifies additional base-64 encoded XML formatted information that - * can be included in the Unattend.xml file, which is used by Windows Setup. - * - * @param additionalUnattendContent the additionalUnattendContent value to set. - * @return the WindowsConfiguration object itself. - */ - public WindowsConfiguration - withAdditionalUnattendContent(List additionalUnattendContent) { - this.additionalUnattendContent = additionalUnattendContent; - return this; - } - - /** - * Get the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Windows. - * - * @return the patchSettings value. - */ - public PatchSettings patchSettings() { - return this.patchSettings; - } - - /** - * Set the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Windows. - * - * @param patchSettings the patchSettings value to set. - * @return the WindowsConfiguration object itself. - */ - public WindowsConfiguration withPatchSettings(PatchSettings patchSettings) { - this.patchSettings = patchSettings; - return this; - } - - /** - * Get the winRM property: Specifies the Windows Remote Management listeners. This enables remote Windows - * PowerShell. - * - * @return the winRM value. - */ - public WinRMConfiguration winRM() { - return this.winRM; - } - - /** - * Set the winRM property: Specifies the Windows Remote Management listeners. This enables remote Windows - * PowerShell. - * - * @param winRM the winRM value to set. - * @return the WindowsConfiguration object itself. - */ - public WindowsConfiguration withWinRM(WinRMConfiguration winRM) { - this.winRM = winRM; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("provisionVMAgent", this.provisionVMAgent); - jsonWriter.writeBooleanField("enableAutomaticUpdates", this.enableAutomaticUpdates); - jsonWriter.writeStringField("timeZone", this.timeZone); - jsonWriter.writeArrayField("additionalUnattendContent", this.additionalUnattendContent, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("patchSettings", this.patchSettings); - jsonWriter.writeJsonField("winRM", this.winRM); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WindowsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WindowsConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the WindowsConfiguration. - */ - public static WindowsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WindowsConfiguration deserializedWindowsConfiguration = new WindowsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisionVMAgent".equals(fieldName)) { - deserializedWindowsConfiguration.provisionVMAgent = reader.getNullable(JsonReader::getBoolean); - } else if ("enableAutomaticUpdates".equals(fieldName)) { - deserializedWindowsConfiguration.enableAutomaticUpdates - = reader.getNullable(JsonReader::getBoolean); - } else if ("timeZone".equals(fieldName)) { - deserializedWindowsConfiguration.timeZone = reader.getString(); - } else if ("additionalUnattendContent".equals(fieldName)) { - List additionalUnattendContent - = reader.readArray(reader1 -> AdditionalUnattendContent.fromJson(reader1)); - deserializedWindowsConfiguration.additionalUnattendContent = additionalUnattendContent; - } else if ("patchSettings".equals(fieldName)) { - deserializedWindowsConfiguration.patchSettings = PatchSettings.fromJson(reader); - } else if ("winRM".equals(fieldName)) { - deserializedWindowsConfiguration.winRM = WinRMConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWindowsConfiguration; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java deleted file mode 100644 index 6c62bc81a24d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.<br /><br /> Possible values - * are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual - * machine.<br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The - * property provisionVMAgent must be true. - */ -public final class WindowsPatchAssessmentMode extends ExpandableStringEnum { - /** - * ImageDefault patch assessment mode. - */ - public static final WindowsPatchAssessmentMode IMAGE_DEFAULT = fromString("ImageDefault"); - - /** - * AutomaticByPlatform patch assessment mode. - */ - public static final WindowsPatchAssessmentMode AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); - - /** - * Creates a new instance of WindowsPatchAssessmentMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WindowsPatchAssessmentMode() { - } - - /** - * Creates or finds a WindowsPatchAssessmentMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding WindowsPatchAssessmentMode. - */ - public static WindowsPatchAssessmentMode fromString(String name) { - return fromString(name, WindowsPatchAssessmentMode.class); - } - - /** - * Gets known WindowsPatchAssessmentMode values. - * - * @return known WindowsPatchAssessmentMode values. - */ - public static Collection values() { - return values(WindowsPatchAssessmentMode.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java deleted file mode 100644 index 900036bc9b6b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. - */ -public final class WindowsVMGuestPatchAutomaticByPlatformRebootSetting - extends ExpandableStringEnum { - /** - * Reboot setting for Unknown. - */ - public static final WindowsVMGuestPatchAutomaticByPlatformRebootSetting UNKNOWN = fromString("Unknown"); - - /** - * Reboot setting for IfRequired. - */ - public static final WindowsVMGuestPatchAutomaticByPlatformRebootSetting IF_REQUIRED = fromString("IfRequired"); - - /** - * Reboot setting for Never. - */ - public static final WindowsVMGuestPatchAutomaticByPlatformRebootSetting NEVER = fromString("Never"); - - /** - * Reboot setting for Always. - */ - public static final WindowsVMGuestPatchAutomaticByPlatformRebootSetting ALWAYS = fromString("Always"); - - /** - * Creates a new instance of WindowsVMGuestPatchAutomaticByPlatformRebootSetting value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WindowsVMGuestPatchAutomaticByPlatformRebootSetting() { - } - - /** - * Creates or finds a WindowsVMGuestPatchAutomaticByPlatformRebootSetting from its string representation. - * - * @param name a name to look for. - * @return the corresponding WindowsVMGuestPatchAutomaticByPlatformRebootSetting. - */ - public static WindowsVMGuestPatchAutomaticByPlatformRebootSetting fromString(String name) { - return fromString(name, WindowsVMGuestPatchAutomaticByPlatformRebootSetting.class); - } - - /** - * Gets known WindowsVMGuestPatchAutomaticByPlatformRebootSetting values. - * - * @return known WindowsVMGuestPatchAutomaticByPlatformRebootSetting values. - */ - public static Collection values() { - return values(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java deleted file mode 100644 index 2a4982d8da3b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch - * settings. - */ -@Fluent -public final class WindowsVMGuestPatchAutomaticByPlatformSettings - implements JsonSerializable { - /* - * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. - */ - private WindowsVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting; - - /* - * Enables customer to schedule patching without accidental upgrades - */ - private Boolean bypassPlatformSafetyChecksOnUserSchedule; - - /** - * Creates an instance of WindowsVMGuestPatchAutomaticByPlatformSettings class. - */ - public WindowsVMGuestPatchAutomaticByPlatformSettings() { - } - - /** - * Get the rebootSetting property: Specifies the reboot setting for all AutomaticByPlatform patch installation - * operations. - * - * @return the rebootSetting value. - */ - public WindowsVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting() { - return this.rebootSetting; - } - - /** - * Set the rebootSetting property: Specifies the reboot setting for all AutomaticByPlatform patch installation - * operations. - * - * @param rebootSetting the rebootSetting value to set. - * @return the WindowsVMGuestPatchAutomaticByPlatformSettings object itself. - */ - public WindowsVMGuestPatchAutomaticByPlatformSettings - withRebootSetting(WindowsVMGuestPatchAutomaticByPlatformRebootSetting rebootSetting) { - this.rebootSetting = rebootSetting; - return this; - } - - /** - * Get the bypassPlatformSafetyChecksOnUserSchedule property: Enables customer to schedule patching without - * accidental upgrades. - * - * @return the bypassPlatformSafetyChecksOnUserSchedule value. - */ - public Boolean bypassPlatformSafetyChecksOnUserSchedule() { - return this.bypassPlatformSafetyChecksOnUserSchedule; - } - - /** - * Set the bypassPlatformSafetyChecksOnUserSchedule property: Enables customer to schedule patching without - * accidental upgrades. - * - * @param bypassPlatformSafetyChecksOnUserSchedule the bypassPlatformSafetyChecksOnUserSchedule value to set. - * @return the WindowsVMGuestPatchAutomaticByPlatformSettings object itself. - */ - public WindowsVMGuestPatchAutomaticByPlatformSettings - withBypassPlatformSafetyChecksOnUserSchedule(Boolean bypassPlatformSafetyChecksOnUserSchedule) { - this.bypassPlatformSafetyChecksOnUserSchedule = bypassPlatformSafetyChecksOnUserSchedule; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("rebootSetting", this.rebootSetting == null ? null : this.rebootSetting.toString()); - jsonWriter.writeBooleanField("bypassPlatformSafetyChecksOnUserSchedule", - this.bypassPlatformSafetyChecksOnUserSchedule); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WindowsVMGuestPatchAutomaticByPlatformSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WindowsVMGuestPatchAutomaticByPlatformSettings if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WindowsVMGuestPatchAutomaticByPlatformSettings. - */ - public static WindowsVMGuestPatchAutomaticByPlatformSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WindowsVMGuestPatchAutomaticByPlatformSettings deserializedWindowsVMGuestPatchAutomaticByPlatformSettings - = new WindowsVMGuestPatchAutomaticByPlatformSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rebootSetting".equals(fieldName)) { - deserializedWindowsVMGuestPatchAutomaticByPlatformSettings.rebootSetting - = WindowsVMGuestPatchAutomaticByPlatformRebootSetting.fromString(reader.getString()); - } else if ("bypassPlatformSafetyChecksOnUserSchedule".equals(fieldName)) { - deserializedWindowsVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedWindowsVMGuestPatchAutomaticByPlatformSettings; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java deleted file mode 100644 index a12217a9a6f7..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine - * scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> - * **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually - * inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates - * must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the - * OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> - * **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties - * provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. - */ -public final class WindowsVMGuestPatchMode extends ExpandableStringEnum { - /** - * Manual VM guest patch mode. - */ - public static final WindowsVMGuestPatchMode MANUAL = fromString("Manual"); - - /** - * AutomaticByOS VM guest patch mode. - */ - public static final WindowsVMGuestPatchMode AUTOMATIC_BY_OS = fromString("AutomaticByOS"); - - /** - * AutomaticByPlatform VM guest patch mode. - */ - public static final WindowsVMGuestPatchMode AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); - - /** - * Creates a new instance of WindowsVMGuestPatchMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WindowsVMGuestPatchMode() { - } - - /** - * Creates or finds a WindowsVMGuestPatchMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding WindowsVMGuestPatchMode. - */ - public static WindowsVMGuestPatchMode fromString(String name) { - return fromString(name, WindowsVMGuestPatchMode.class); - } - - /** - * Gets known WindowsVMGuestPatchMode values. - * - * @return known WindowsVMGuestPatchMode values. - */ - public static Collection values() { - return values(WindowsVMGuestPatchMode.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java deleted file mode 100644 index b30e62877e89..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The zone allocation policy for distributing VMs across availability zones. - */ -@Fluent -public final class ZoneAllocationPolicy implements JsonSerializable { - /* - * The distribution strategy for zone allocation - */ - private DistributionStrategy distributionStrategy; - - /* - * The zone preferences for allocation priority - */ - private List zonePreferences; - - /** - * Creates an instance of ZoneAllocationPolicy class. - */ - public ZoneAllocationPolicy() { - } - - /** - * Get the distributionStrategy property: The distribution strategy for zone allocation. - * - * @return the distributionStrategy value. - */ - public DistributionStrategy distributionStrategy() { - return this.distributionStrategy; - } - - /** - * Set the distributionStrategy property: The distribution strategy for zone allocation. - * - * @param distributionStrategy the distributionStrategy value to set. - * @return the ZoneAllocationPolicy object itself. - */ - public ZoneAllocationPolicy withDistributionStrategy(DistributionStrategy distributionStrategy) { - this.distributionStrategy = distributionStrategy; - return this; - } - - /** - * Get the zonePreferences property: The zone preferences for allocation priority. - * - * @return the zonePreferences value. - */ - public List zonePreferences() { - return this.zonePreferences; - } - - /** - * Set the zonePreferences property: The zone preferences for allocation priority. - * - * @param zonePreferences the zonePreferences value to set. - * @return the ZoneAllocationPolicy object itself. - */ - public ZoneAllocationPolicy withZonePreferences(List zonePreferences) { - this.zonePreferences = zonePreferences; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("distributionStrategy", - this.distributionStrategy == null ? null : this.distributionStrategy.toString()); - jsonWriter.writeArrayField("zonePreferences", this.zonePreferences, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ZoneAllocationPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ZoneAllocationPolicy if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ZoneAllocationPolicy. - */ - public static ZoneAllocationPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ZoneAllocationPolicy deserializedZoneAllocationPolicy = new ZoneAllocationPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("distributionStrategy".equals(fieldName)) { - deserializedZoneAllocationPolicy.distributionStrategy - = DistributionStrategy.fromString(reader.getString()); - } else if ("zonePreferences".equals(fieldName)) { - List zonePreferences - = reader.readArray(reader1 -> ZonePreference.fromJson(reader1)); - deserializedZoneAllocationPolicy.zonePreferences = zonePreferences; - } else { - reader.skipChildren(); - } - } - - return deserializedZoneAllocationPolicy; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java deleted file mode 100644 index 247d447c7a79..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the policy for resource's placement in availability zone. Possible values are: **Any** (used for Virtual - * Machines), **Auto** (used for Virtual Machine Scale Sets) - An availability zone will be automatically picked by - * system as part of resource creation. - */ -public final class ZonePlacementPolicyType extends ExpandableStringEnum { - /** - * Static value Any for ZonePlacementPolicyType. - */ - public static final ZonePlacementPolicyType ANY = fromString("Any"); - - /** - * The platform automatically selects an availability zone based on the request. - */ - public static final ZonePlacementPolicyType AUTO = fromString("Auto"); - - /** - * Creates a new instance of ZonePlacementPolicyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ZonePlacementPolicyType() { - } - - /** - * Creates or finds a ZonePlacementPolicyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ZonePlacementPolicyType. - */ - public static ZonePlacementPolicyType fromString(String name) { - return fromString(name, ZonePlacementPolicyType.class); - } - - /** - * Gets known ZonePlacementPolicyType values. - * - * @return known ZonePlacementPolicyType values. - */ - public static Collection values() { - return values(ZonePlacementPolicyType.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java deleted file mode 100644 index 100b23eacead..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A zone preference with a zone identifier and rank. - */ -@Fluent -public final class ZonePreference implements JsonSerializable { - /* - * The zone identifier - */ - private String zone; - - /* - * The rank of this zone in the priority order - */ - private Integer rank; - - /** - * Creates an instance of ZonePreference class. - */ - public ZonePreference() { - } - - /** - * Get the zone property: The zone identifier. - * - * @return the zone value. - */ - public String zone() { - return this.zone; - } - - /** - * Set the zone property: The zone identifier. - * - * @param zone the zone value to set. - * @return the ZonePreference object itself. - */ - public ZonePreference withZone(String zone) { - this.zone = zone; - return this; - } - - /** - * Get the rank property: The rank of this zone in the priority order. - * - * @return the rank value. - */ - public Integer rank() { - return this.rank; - } - - /** - * Set the rank property: The rank of this zone in the priority order. - * - * @param rank the rank value to set. - * @return the ZonePreference object itself. - */ - public ZonePreference withRank(Integer rank) { - this.rank = rank; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("zone", this.zone); - jsonWriter.writeNumberField("rank", this.rank); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ZonePreference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ZonePreference if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ZonePreference. - */ - public static ZonePreference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ZonePreference deserializedZonePreference = new ZonePreference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("zone".equals(fieldName)) { - deserializedZonePreference.zone = reader.getString(); - } else if ("rank".equals(fieldName)) { - deserializedZonePreference.rank = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedZonePreference; - }); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/resources/META-INF/azure-resourcemanager-computeschedule_metadata.json b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/resources/META-INF/azure-resourcemanager-computeschedule_metadata.json index a4b57b047440..47aeb6912715 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/resources/META-INF/azure-resourcemanager-computeschedule_metadata.json +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/resources/META-INF/azure-resourcemanager-computeschedule_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.ComputeSchedule":"2026-04-15-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.computeschedule.fluent.ComputeScheduleMgmtClient":"Microsoft.ComputeSchedule","com.azure.resourcemanager.computeschedule.fluent.OccurrenceExtensionsClient":"Microsoft.ComputeSchedule.OccurrenceExtension","com.azure.resourcemanager.computeschedule.fluent.OccurrenceExtensionsClient.listOccurrenceByVms":"Microsoft.ComputeSchedule.OccurrenceExtension.listOccurrenceByVms","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient":"Microsoft.ComputeSchedule.Occurrences","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.beginDelay":"Microsoft.ComputeSchedule.Occurrences.delay","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.cancel":"Microsoft.ComputeSchedule.Occurrences.cancel","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.cancelWithResponse":"Microsoft.ComputeSchedule.Occurrences.cancel","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.delay":"Microsoft.ComputeSchedule.Occurrences.delay","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.get":"Microsoft.ComputeSchedule.Occurrences.get","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.getWithResponse":"Microsoft.ComputeSchedule.Occurrences.get","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.listByScheduledAction":"Microsoft.ComputeSchedule.Occurrences.listByScheduledAction","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.listResources":"Microsoft.ComputeSchedule.Occurrences.listResources","com.azure.resourcemanager.computeschedule.fluent.OperationsClient":"Microsoft.ComputeSchedule.Operations","com.azure.resourcemanager.computeschedule.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionExtensionsClient":"Microsoft.ComputeSchedule.ScheduledActionExtension","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionExtensionsClient.listByVms":"Microsoft.ComputeSchedule.ScheduledActionExtension.listByVms","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient":"Microsoft.ComputeSchedule.ScheduledActions","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.attachResources":"Microsoft.ComputeSchedule.ScheduledActions.attachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.attachResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.attachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.beginCreateOrUpdate":"Microsoft.ComputeSchedule.ScheduledActions.createOrUpdate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.beginDelete":"Microsoft.ComputeSchedule.ScheduledActions.delete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.cancelNextOccurrence":"Microsoft.ComputeSchedule.ScheduledActions.cancelNextOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.cancelNextOccurrenceWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.cancelNextOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.createOrUpdate":"Microsoft.ComputeSchedule.ScheduledActions.createOrUpdate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.delete":"Microsoft.ComputeSchedule.ScheduledActions.delete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.detachResources":"Microsoft.ComputeSchedule.ScheduledActions.detachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.detachResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.detachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.disable":"Microsoft.ComputeSchedule.ScheduledActions.disable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.disableWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.disable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.enable":"Microsoft.ComputeSchedule.ScheduledActions.enable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.enableWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.enable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.getByResourceGroup":"Microsoft.ComputeSchedule.ScheduledActions.get","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.getByResourceGroupWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.get","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.list":"Microsoft.ComputeSchedule.ScheduledActions.listBySubscription","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.listByResourceGroup":"Microsoft.ComputeSchedule.ScheduledActions.listByResourceGroup","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.listResources":"Microsoft.ComputeSchedule.ScheduledActions.listResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.patchResources":"Microsoft.ComputeSchedule.ScheduledActions.patchResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.patchResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.patchResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.triggerManualOccurrence":"Microsoft.ComputeSchedule.ScheduledActions.triggerManualOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.triggerManualOccurrenceWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.triggerManualOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.update":"Microsoft.ComputeSchedule.ScheduledActions.update","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.updateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.update","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesCancelOperations":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesCancelOperationsWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreateFlex":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreateFlex","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreateFlexWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreateFlex","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeallocate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeallocateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDelete":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeleteWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteHibernate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteHibernateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteStart":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteStartWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationErrors":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationErrorsWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationStatus":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationStatusWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitDeallocate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitDeallocateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitHibernate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitHibernateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitStart":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitStartWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart","com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner":"Microsoft.ComputeSchedule.CancelOperationsResponse","com.azure.resourcemanager.computeschedule.fluent.models.CreateFlexResourceOperationResponseInner":"Microsoft.ComputeSchedule.CreateFlexResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner":"Microsoft.ComputeSchedule.CreateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner":"Microsoft.ComputeSchedule.DeallocateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner":"Microsoft.ComputeSchedule.DeleteResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner":"Microsoft.ComputeSchedule.GetOperationErrorsResponse","com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner":"Microsoft.ComputeSchedule.GetOperationStatusResponse","com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner":"Microsoft.ComputeSchedule.HibernateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceExtensionResourceInner":"Microsoft.ComputeSchedule.OccurrenceExtensionResource","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceInner":"Microsoft.ComputeSchedule.Occurrence","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceResourceInner":"Microsoft.ComputeSchedule.OccurrenceResource","com.azure.resourcemanager.computeschedule.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.computeschedule.fluent.models.RecurringActionsResourceOperationResultInner":"Microsoft.ComputeSchedule.ResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionInner":"Microsoft.ComputeSchedule.ScheduledAction","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourceInner":"Microsoft.ComputeSchedule.ScheduledActionResource","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourcesInner":"Microsoft.ComputeSchedule.ScheduledActionResources","com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner":"Microsoft.ComputeSchedule.StartResourceOperationResponse","com.azure.resourcemanager.computeschedule.implementation.ComputeScheduleMgmtClientBuilder":"Microsoft.ComputeSchedule","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceExtensionResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceResourceListResponse":"Microsoft.ComputeSchedule.OccurrenceResourceListResponse","com.azure.resourcemanager.computeschedule.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.computeschedule.implementation.models.ResourceListResponse":"Microsoft.ComputeSchedule.ResourceListResponse","com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionResourcesListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities":"Microsoft.ComputeSchedule.AdditionalCapabilities","com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContent":"Microsoft.ComputeSchedule.AdditionalUnattendContent","com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentComponentName":null,"com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentPassName":null,"com.azure.resourcemanager.computeschedule.models.AllInstancesDown":"Microsoft.ComputeSchedule.AllInstancesDown","com.azure.resourcemanager.computeschedule.models.AllocationStrategy":"Microsoft.ComputeSchedule.AllocationStrategy","com.azure.resourcemanager.computeschedule.models.ApiEntityReference":"Microsoft.ComputeSchedule.ApiEntityReference","com.azure.resourcemanager.computeschedule.models.ApplicationProfile":"Microsoft.ComputeSchedule.ApplicationProfile","com.azure.resourcemanager.computeschedule.models.BootDiagnostics":"Microsoft.ComputeSchedule.BootDiagnostics","com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension":"Microsoft.ComputeSchedule.BulkActionVMExtension","com.azure.resourcemanager.computeschedule.models.BulkActionVMProperties":"Microsoft.ComputeSchedule.BulkActionVMProperties","com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties":"Microsoft.ComputeSchedule.BulkActionVmExtensionProperties","com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration":"Microsoft.ComputeSchedule.BulkVMConfiguration","com.azure.resourcemanager.computeschedule.models.CachingTypes":"Microsoft.ComputeSchedule.CachingTypes","com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest":"Microsoft.ComputeSchedule.CancelOccurrenceRequest","com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest":"Microsoft.ComputeSchedule.CancelOperationsRequest","com.azure.resourcemanager.computeschedule.models.CapacityReservationProfile":"Microsoft.ComputeSchedule.CapacityReservationProfile","com.azure.resourcemanager.computeschedule.models.DataDisk":"Microsoft.ComputeSchedule.DataDisk","com.azure.resourcemanager.computeschedule.models.DeadlineType":"Microsoft.ComputeSchedule.DeadlineType","com.azure.resourcemanager.computeschedule.models.DelayRequest":"Microsoft.ComputeSchedule.DelayRequest","com.azure.resourcemanager.computeschedule.models.DeleteOptions":"Microsoft.ComputeSchedule.DeleteOptions","com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile":"Microsoft.ComputeSchedule.DiagnosticsProfile","com.azure.resourcemanager.computeschedule.models.DiffDiskOptions":"Microsoft.ComputeSchedule.DiffDiskOptions","com.azure.resourcemanager.computeschedule.models.DiffDiskPlacement":"Microsoft.ComputeSchedule.DiffDiskPlacement","com.azure.resourcemanager.computeschedule.models.DiffDiskSettings":"Microsoft.ComputeSchedule.DiffDiskSettings","com.azure.resourcemanager.computeschedule.models.DiskControllerTypes":"Microsoft.ComputeSchedule.DiskControllerTypes","com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes":"Microsoft.ComputeSchedule.DiskCreateOptionTypes","com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes":"Microsoft.ComputeSchedule.DiskDeleteOptionTypes","com.azure.resourcemanager.computeschedule.models.DiskDetachOptionTypes":"Microsoft.ComputeSchedule.DiskDetachOptionTypes","com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters":"Microsoft.ComputeSchedule.DiskEncryptionSetParameters","com.azure.resourcemanager.computeschedule.models.DiskEncryptionSettings":"Microsoft.ComputeSchedule.DiskEncryptionSettings","com.azure.resourcemanager.computeschedule.models.DistributionStrategy":"Microsoft.ComputeSchedule.DistributionStrategy","com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes":"Microsoft.ComputeSchedule.DomainNameLabelScopeTypes","com.azure.resourcemanager.computeschedule.models.EncryptionIdentity":"Microsoft.ComputeSchedule.EncryptionIdentity","com.azure.resourcemanager.computeschedule.models.Error":"Azure.Core.Foundations.Error","com.azure.resourcemanager.computeschedule.models.EventGridAndResourceGraph":"Microsoft.ComputeSchedule.EventGridAndResourceGraph","com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexRequest":"Microsoft.ComputeSchedule.ExecuteCreateFlexRequest","com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest":"Microsoft.ComputeSchedule.ExecuteCreateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest":"Microsoft.ComputeSchedule.ExecuteDeallocateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest":"Microsoft.ComputeSchedule.ExecuteDeleteRequest","com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest":"Microsoft.ComputeSchedule.ExecuteHibernateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest":"Microsoft.ComputeSchedule.ExecuteStartRequest","com.azure.resourcemanager.computeschedule.models.ExecutionParameters":"Microsoft.ComputeSchedule.ExecutionParameters","com.azure.resourcemanager.computeschedule.models.ExtendedLocation":"Azure.ResourceManager.CommonTypes.ExtendedLocation","com.azure.resourcemanager.computeschedule.models.ExtendedLocationType":"Azure.ResourceManager.CommonTypes.ExtendedLocationType","com.azure.resourcemanager.computeschedule.models.FallbackOperationInfo":"Microsoft.ComputeSchedule.FallbackOperationInfo","com.azure.resourcemanager.computeschedule.models.FlexProperties":"Microsoft.ComputeSchedule.FlexProperties","com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest":"Microsoft.ComputeSchedule.GetOperationErrorsRequest","com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest":"Microsoft.ComputeSchedule.GetOperationStatusRequest","com.azure.resourcemanager.computeschedule.models.HardwareProfile":"Microsoft.ComputeSchedule.HardwareProfile","com.azure.resourcemanager.computeschedule.models.HostEndpointSettings":"Microsoft.ComputeSchedule.HostEndpointSettings","com.azure.resourcemanager.computeschedule.models.IPVersions":"Microsoft.ComputeSchedule.IPVersions","com.azure.resourcemanager.computeschedule.models.ImageReference":"Microsoft.ComputeSchedule.ImageReference","com.azure.resourcemanager.computeschedule.models.InnerError":"Azure.Core.Foundations.InnerError","com.azure.resourcemanager.computeschedule.models.KeyVaultKeyReference":"Microsoft.ComputeSchedule.KeyVaultKeyReference","com.azure.resourcemanager.computeschedule.models.KeyVaultSecretReference":"Microsoft.ComputeSchedule.KeyVaultSecretReference","com.azure.resourcemanager.computeschedule.models.Language":"Microsoft.ComputeSchedule.Language","com.azure.resourcemanager.computeschedule.models.LinuxConfiguration":"Microsoft.ComputeSchedule.LinuxConfiguration","com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode":"Microsoft.ComputeSchedule.LinuxPatchAssessmentMode","com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings":"Microsoft.ComputeSchedule.LinuxPatchSettings","com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting":"Microsoft.ComputeSchedule.LinuxVMGuestPatchAutomaticByPlatformRebootSetting","com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformSettings":"Microsoft.ComputeSchedule.LinuxVMGuestPatchAutomaticByPlatformSettings","com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode":"Microsoft.ComputeSchedule.LinuxVMGuestPatchMode","com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters":"Microsoft.ComputeSchedule.ManagedDiskParameters","com.azure.resourcemanager.computeschedule.models.Mode":"Microsoft.ComputeSchedule.Mode","com.azure.resourcemanager.computeschedule.models.Modes":"Microsoft.ComputeSchedule.Modes","com.azure.resourcemanager.computeschedule.models.Month":"Microsoft.ComputeSchedule.Month","com.azure.resourcemanager.computeschedule.models.NetworkApiVersion":"Microsoft.ComputeSchedule.NetworkApiVersion","com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliaryMode":"Microsoft.ComputeSchedule.NetworkInterfaceAuxiliaryMode","com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliarySku":"Microsoft.ComputeSchedule.NetworkInterfaceAuxiliarySku","com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference":"Microsoft.ComputeSchedule.NetworkInterfaceReference","com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties":"Microsoft.ComputeSchedule.NetworkInterfaceReferenceProperties","com.azure.resourcemanager.computeschedule.models.NetworkProfile":"Microsoft.ComputeSchedule.NetworkProfile","com.azure.resourcemanager.computeschedule.models.NotificationProperties":"Microsoft.ComputeSchedule.NotificationProperties","com.azure.resourcemanager.computeschedule.models.NotificationType":"Microsoft.ComputeSchedule.NotificationType","com.azure.resourcemanager.computeschedule.models.OSDisk":"Microsoft.ComputeSchedule.OSDisk","com.azure.resourcemanager.computeschedule.models.OSImageNotificationProfile":"Microsoft.ComputeSchedule.OSImageNotificationProfile","com.azure.resourcemanager.computeschedule.models.OSProfile":"Microsoft.ComputeSchedule.OSProfile","com.azure.resourcemanager.computeschedule.models.OccurrenceExtensionProperties":"Microsoft.ComputeSchedule.OccurrenceExtensionProperties","com.azure.resourcemanager.computeschedule.models.OccurrenceProperties":"Microsoft.ComputeSchedule.OccurrenceProperties","com.azure.resourcemanager.computeschedule.models.OccurrenceResultSummary":"Microsoft.ComputeSchedule.OccurrenceResultSummary","com.azure.resourcemanager.computeschedule.models.OccurrenceState":"Microsoft.ComputeSchedule.OccurrenceState","com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes":"Microsoft.ComputeSchedule.OperatingSystemTypes","com.azure.resourcemanager.computeschedule.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.computeschedule.models.OperationErrorDetails":"Microsoft.ComputeSchedule.OperationErrorDetails","com.azure.resourcemanager.computeschedule.models.OperationErrorsResult":"Microsoft.ComputeSchedule.OperationErrorsResult","com.azure.resourcemanager.computeschedule.models.OperationState":"Microsoft.ComputeSchedule.OperationState","com.azure.resourcemanager.computeschedule.models.OptimizationPreference":"Microsoft.ComputeSchedule.OptimizationPreference","com.azure.resourcemanager.computeschedule.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.computeschedule.models.OsType":"Microsoft.ComputeSchedule.OsType","com.azure.resourcemanager.computeschedule.models.PatchSettings":"Microsoft.ComputeSchedule.PatchSettings","com.azure.resourcemanager.computeschedule.models.Placement":"Microsoft.ComputeSchedule.Placement","com.azure.resourcemanager.computeschedule.models.Plan":"Azure.ResourceManager.CommonTypes.Plan","com.azure.resourcemanager.computeschedule.models.PriorityProfile":"Microsoft.ComputeSchedule.PriorityProfile","com.azure.resourcemanager.computeschedule.models.PriorityType":"Microsoft.ComputeSchedule.PriorityType","com.azure.resourcemanager.computeschedule.models.ProtocolTypes":"Microsoft.ComputeSchedule.ProtocolTypes","com.azure.resourcemanager.computeschedule.models.ProvisioningState":"Microsoft.ComputeSchedule.ProvisioningState","com.azure.resourcemanager.computeschedule.models.ProxyAgentSettings":"Microsoft.ComputeSchedule.ProxyAgentSettings","com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku":"Microsoft.ComputeSchedule.PublicIPAddressSku","com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName":"Microsoft.ComputeSchedule.PublicIPAddressSkuName","com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier":"Microsoft.ComputeSchedule.PublicIPAddressSkuTier","com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod":"Microsoft.ComputeSchedule.PublicIPAllocationMethod","com.azure.resourcemanager.computeschedule.models.ResourceAttachRequest":"Microsoft.ComputeSchedule.ResourceAttachRequest","com.azure.resourcemanager.computeschedule.models.ResourceDetachRequest":"Microsoft.ComputeSchedule.ResourceDetachRequest","com.azure.resourcemanager.computeschedule.models.ResourceIdentityType":"Microsoft.ComputeSchedule.ResourceIdentityType","com.azure.resourcemanager.computeschedule.models.ResourceOperation":"Microsoft.ComputeSchedule.ResourceOperation","com.azure.resourcemanager.computeschedule.models.ResourceOperationDetails":"Microsoft.ComputeSchedule.ResourceOperationDetails","com.azure.resourcemanager.computeschedule.models.ResourceOperationError":"Microsoft.ComputeSchedule.ResourceOperationError","com.azure.resourcemanager.computeschedule.models.ResourceOperationStatus":"Microsoft.ComputeSchedule.ResourceOperationStatus","com.azure.resourcemanager.computeschedule.models.ResourceOperationType":"Microsoft.ComputeSchedule.ResourceOperationType","com.azure.resourcemanager.computeschedule.models.ResourcePatchRequest":"Microsoft.ComputeSchedule.ResourcePatchRequest","com.azure.resourcemanager.computeschedule.models.ResourceProvisionFlexPayload":"Microsoft.ComputeSchedule.ResourceProvisionFlexPayload","com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload":"Microsoft.ComputeSchedule.ResourceProvisionPayload","com.azure.resourcemanager.computeschedule.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.computeschedule.models.ResourceResultSummary":"Microsoft.ComputeSchedule.ResourceResultSummary","com.azure.resourcemanager.computeschedule.models.ResourceStatus":"Microsoft.ComputeSchedule.ResourceStatus","com.azure.resourcemanager.computeschedule.models.ResourceType":"Microsoft.ComputeSchedule.ResourceType","com.azure.resourcemanager.computeschedule.models.Resources":"Microsoft.ComputeSchedule.Resources","com.azure.resourcemanager.computeschedule.models.RetryPolicy":"Microsoft.ComputeSchedule.RetryPolicy","com.azure.resourcemanager.computeschedule.models.Schedule":"Microsoft.ComputeSchedule.Schedule","com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties":"Microsoft.ComputeSchedule.ScheduledActionProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionType":"Microsoft.ComputeSchedule.ActionType","com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionsExtensionProperties":"Microsoft.ComputeSchedule.ScheduledActionsExtensionProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionsSchedule":"Microsoft.ComputeSchedule.ScheduledActionsSchedule","com.azure.resourcemanager.computeschedule.models.ScheduledEventsAdditionalPublishingTargets":"Microsoft.ComputeSchedule.ScheduledEventsAdditionalPublishingTargets","com.azure.resourcemanager.computeschedule.models.ScheduledEventsPolicy":"Microsoft.ComputeSchedule.ScheduledEventsPolicy","com.azure.resourcemanager.computeschedule.models.ScheduledEventsProfile":"Microsoft.ComputeSchedule.ScheduledEventsProfile","com.azure.resourcemanager.computeschedule.models.SecurityEncryptionTypes":"Microsoft.ComputeSchedule.SecurityEncryptionTypes","com.azure.resourcemanager.computeschedule.models.SecurityProfile":"Microsoft.ComputeSchedule.SecurityProfile","com.azure.resourcemanager.computeschedule.models.SecurityTypes":"Microsoft.ComputeSchedule.SecurityTypes","com.azure.resourcemanager.computeschedule.models.SettingNames":"Microsoft.ComputeSchedule.SettingNames","com.azure.resourcemanager.computeschedule.models.SshConfiguration":"Microsoft.ComputeSchedule.SshConfiguration","com.azure.resourcemanager.computeschedule.models.SshPublicKey":"Microsoft.ComputeSchedule.SshPublicKey","com.azure.resourcemanager.computeschedule.models.StorageAccountTypes":"Microsoft.ComputeSchedule.StorageAccountTypes","com.azure.resourcemanager.computeschedule.models.StorageProfile":"Microsoft.ComputeSchedule.StorageProfile","com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest":"Microsoft.ComputeSchedule.SubmitDeallocateRequest","com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest":"Microsoft.ComputeSchedule.SubmitHibernateRequest","com.azure.resourcemanager.computeschedule.models.SubmitStartRequest":"Microsoft.ComputeSchedule.SubmitStartRequest","com.azure.resourcemanager.computeschedule.models.TerminateNotificationProfile":"Microsoft.ComputeSchedule.TerminateNotificationProfile","com.azure.resourcemanager.computeschedule.models.UefiSettings":"Microsoft.ComputeSchedule.UefiSettings","com.azure.resourcemanager.computeschedule.models.UserAssignedIdentitiesValue":"Microsoft.ComputeSchedule.UserAssignedIdentitiesValue","com.azure.resourcemanager.computeschedule.models.UserInitiatedReboot":"Microsoft.ComputeSchedule.UserInitiatedReboot","com.azure.resourcemanager.computeschedule.models.UserInitiatedRedeploy":"Microsoft.ComputeSchedule.UserInitiatedRedeploy","com.azure.resourcemanager.computeschedule.models.VMDiskSecurityProfile":"Microsoft.ComputeSchedule.VMDiskSecurityProfile","com.azure.resourcemanager.computeschedule.models.VMGalleryApplication":"Microsoft.ComputeSchedule.VMGalleryApplication","com.azure.resourcemanager.computeschedule.models.VaultCertificate":"Microsoft.ComputeSchedule.VaultCertificate","com.azure.resourcemanager.computeschedule.models.VaultSecretGroup":"Microsoft.ComputeSchedule.VaultSecretGroup","com.azure.resourcemanager.computeschedule.models.VirtualHardDisk":"Microsoft.ComputeSchedule.VirtualHardDisk","com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity":"Microsoft.ComputeSchedule.VirtualMachineIdentity","com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag":"Microsoft.ComputeSchedule.VirtualMachineIpTag","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfiguration":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceConfiguration","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceConfigurationProperties","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceDnsSettingsConfiguration","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceIPConfiguration","com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties":"Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceIPConfigurationProperties","com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration":"Microsoft.ComputeSchedule.VirtualMachinePublicIPAddressConfiguration","com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties":"Microsoft.ComputeSchedule.VirtualMachinePublicIPAddressConfigurationProperties","com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration":"Microsoft.ComputeSchedule.VirtualMachinePublicIPAddressDnsSettingsConfiguration","com.azure.resourcemanager.computeschedule.models.VmSizeProfile":"Microsoft.ComputeSchedule.VmSizeProfile","com.azure.resourcemanager.computeschedule.models.VmSizeProperties":"Microsoft.ComputeSchedule.VmSizeProperties","com.azure.resourcemanager.computeschedule.models.WeekDay":"Microsoft.ComputeSchedule.WeekDay","com.azure.resourcemanager.computeschedule.models.WinRMConfiguration":"Microsoft.ComputeSchedule.WinRMConfiguration","com.azure.resourcemanager.computeschedule.models.WinRMListener":"Microsoft.ComputeSchedule.WinRMListener","com.azure.resourcemanager.computeschedule.models.WindowsConfiguration":"Microsoft.ComputeSchedule.WindowsConfiguration","com.azure.resourcemanager.computeschedule.models.WindowsPatchAssessmentMode":"Microsoft.ComputeSchedule.WindowsPatchAssessmentMode","com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting":"Microsoft.ComputeSchedule.WindowsVMGuestPatchAutomaticByPlatformRebootSetting","com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings":"Microsoft.ComputeSchedule.WindowsVMGuestPatchAutomaticByPlatformSettings","com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchMode":"Microsoft.ComputeSchedule.WindowsVMGuestPatchMode","com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy":"Microsoft.ComputeSchedule.ZoneAllocationPolicy","com.azure.resourcemanager.computeschedule.models.ZonePlacementPolicyType":"Microsoft.ComputeSchedule.ZonePlacementPolicyType","com.azure.resourcemanager.computeschedule.models.ZonePreference":"Microsoft.ComputeSchedule.ZonePreference"},"generatedFiles":["src/main/java/com/azure/resourcemanager/computeschedule/ComputeScheduleManager.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ComputeScheduleMgmtClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OccurrenceExtensionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OccurrencesClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionExtensionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CancelOperationsResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateFlexResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeallocateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeleteResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationErrorsResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationStatusResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/HibernateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceExtensionResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/RecurringActionsResourceOperationResultInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionResourcesInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/StartResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CancelOperationsResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateFlexResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeallocateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeleteResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationErrorsResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/HibernateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrencesClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrencesImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/RecurringActionsResourceOperationResultImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionExtensionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionResourcesImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/StartResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceExtensionResourceListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceResourceListResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ResourceListResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ScheduledActionListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ScheduledActionResourcesListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ActionType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalCapabilities.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContent.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentComponentName.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AdditionalUnattendContentPassName.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AllInstancesDown.java","src/main/java/com/azure/resourcemanager/computeschedule/models/AllocationStrategy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ApiEntityReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ApplicationProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BootDiagnostics.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMExtension.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVMProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BulkActionVmExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/BulkVMConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CachingTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOccurrenceRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CapacityReservationProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CreateFlexResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CreateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DataDisk.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeadlineType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeallocateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DelayRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteOptions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiagnosticsProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskOptions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskPlacement.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiffDiskSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskControllerTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskCreateOptionTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDeleteOptionTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskDetachOptionTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSetParameters.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DiskEncryptionSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DistributionStrategy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DomainNameLabelScopeTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Error.java","src/main/java/com/azure/resourcemanager/computeschedule/models/EventGridAndResourceGraph.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateFlexRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecutionParameters.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExtendedLocationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/FallbackOperationInfo.java","src/main/java/com/azure/resourcemanager/computeschedule/models/FlexProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/HardwareProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/HibernateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/HostEndpointSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/IPVersions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ImageReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/InnerError.java","src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultKeyReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/KeyVaultSecretReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Language.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchAssessmentMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxPatchSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformRebootSetting.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchAutomaticByPlatformSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/LinuxVMGuestPatchMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ManagedDiskParameters.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Mode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Modes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Month.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkApiVersion.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliaryMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceAuxiliarySku.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkInterfaceReferenceProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NetworkProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NotificationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NotificationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OSDisk.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OSImageNotificationProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OSProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Occurrence.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensionResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceResultSummary.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Occurrences.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperatingSystemTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Operation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorDetails.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorsResult.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Operations.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OptimizationPreference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Origin.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OsType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PatchSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Placement.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Plan.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PriorityType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ProxyAgentSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSku.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuName.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAddressSkuTier.java","src/main/java/com/azure/resourcemanager/computeschedule/models/PublicIPAllocationMethod.java","src/main/java/com/azure/resourcemanager/computeschedule/models/RecurringActionsResourceOperationResult.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceAttachRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceDetachRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationError.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationStatus.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourcePatchRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionFlexPayload.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceResultSummary.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceStatus.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Resources.java","src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Schedule.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledAction.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionExtensions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionResources.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionUpdate.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionUpdateProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionsExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionsSchedule.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsAdditionalPublishingTargets.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsPolicy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledEventsProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityEncryptionTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SecurityTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SettingNames.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SshConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SshPublicKey.java","src/main/java/com/azure/resourcemanager/computeschedule/models/StartResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/StorageAccountTypes.java","src/main/java/com/azure/resourcemanager/computeschedule/models/StorageProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/TerminateNotificationProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/UefiSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/UserAssignedIdentitiesValue.java","src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedReboot.java","src/main/java/com/azure/resourcemanager/computeschedule/models/UserInitiatedRedeploy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VMDiskSecurityProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VMGalleryApplication.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VaultCertificate.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VaultSecretGroup.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualHardDisk.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIdentity.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineIpTag.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceDnsSettingsConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachineNetworkInterfaceIPConfigurationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressConfigurationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VirtualMachinePublicIPAddressDnsSettingsConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProfile.java","src/main/java/com/azure/resourcemanager/computeschedule/models/VmSizeProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WeekDay.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WinRMListener.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsConfiguration.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsPatchAssessmentMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformRebootSetting.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchAutomaticByPlatformSettings.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WindowsVMGuestPatchMode.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ZoneAllocationPolicy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePlacementPolicyType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ZonePreference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.ComputeSchedule":"2025-04-15-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.computeschedule.fluent.ComputeScheduleMgmtClient":"Microsoft.ComputeSchedule","com.azure.resourcemanager.computeschedule.fluent.OccurrenceExtensionsClient":"Microsoft.ComputeSchedule.OccurrenceExtension","com.azure.resourcemanager.computeschedule.fluent.OccurrenceExtensionsClient.listOccurrenceByVms":"Microsoft.ComputeSchedule.OccurrenceExtension.listOccurrenceByVms","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient":"Microsoft.ComputeSchedule.Occurrences","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.beginDelay":"Microsoft.ComputeSchedule.Occurrences.delay","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.cancel":"Microsoft.ComputeSchedule.Occurrences.cancel","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.cancelWithResponse":"Microsoft.ComputeSchedule.Occurrences.cancel","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.delay":"Microsoft.ComputeSchedule.Occurrences.delay","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.get":"Microsoft.ComputeSchedule.Occurrences.get","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.getWithResponse":"Microsoft.ComputeSchedule.Occurrences.get","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.listByScheduledAction":"Microsoft.ComputeSchedule.Occurrences.listByScheduledAction","com.azure.resourcemanager.computeschedule.fluent.OccurrencesClient.listResources":"Microsoft.ComputeSchedule.Occurrences.listResources","com.azure.resourcemanager.computeschedule.fluent.OperationsClient":"Microsoft.ComputeSchedule.Operations","com.azure.resourcemanager.computeschedule.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionExtensionsClient":"Microsoft.ComputeSchedule.ScheduledActionExtension","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionExtensionsClient.listByVms":"Microsoft.ComputeSchedule.ScheduledActionExtension.listByVms","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient":"Microsoft.ComputeSchedule.ScheduledActions","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.attachResources":"Microsoft.ComputeSchedule.ScheduledActions.attachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.attachResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.attachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.beginCreateOrUpdate":"Microsoft.ComputeSchedule.ScheduledActions.createOrUpdate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.beginDelete":"Microsoft.ComputeSchedule.ScheduledActions.delete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.cancelNextOccurrence":"Microsoft.ComputeSchedule.ScheduledActions.cancelNextOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.cancelNextOccurrenceWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.cancelNextOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.createOrUpdate":"Microsoft.ComputeSchedule.ScheduledActions.createOrUpdate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.delete":"Microsoft.ComputeSchedule.ScheduledActions.delete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.detachResources":"Microsoft.ComputeSchedule.ScheduledActions.detachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.detachResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.detachResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.disable":"Microsoft.ComputeSchedule.ScheduledActions.disable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.disableWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.disable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.enable":"Microsoft.ComputeSchedule.ScheduledActions.enable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.enableWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.enable","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.getByResourceGroup":"Microsoft.ComputeSchedule.ScheduledActions.get","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.getByResourceGroupWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.get","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.list":"Microsoft.ComputeSchedule.ScheduledActions.listBySubscription","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.listByResourceGroup":"Microsoft.ComputeSchedule.ScheduledActions.listByResourceGroup","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.listResources":"Microsoft.ComputeSchedule.ScheduledActions.listResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.patchResources":"Microsoft.ComputeSchedule.ScheduledActions.patchResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.patchResourcesWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.patchResources","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.triggerManualOccurrence":"Microsoft.ComputeSchedule.ScheduledActions.triggerManualOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.triggerManualOccurrenceWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.triggerManualOccurrence","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.update":"Microsoft.ComputeSchedule.ScheduledActions.update","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.updateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.update","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesCancelOperations":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesCancelOperationsWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteCreateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeallocate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeallocateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDelete":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteDeleteWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteHibernate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteHibernateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteStart":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesExecuteStartWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationErrors":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationErrorsWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationStatus":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesGetOperationStatusWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitDeallocate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitDeallocateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitHibernate":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitHibernateWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitStart":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart","com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient.virtualMachinesSubmitStartWithResponse":"Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart","com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner":"Microsoft.ComputeSchedule.CancelOperationsResponse","com.azure.resourcemanager.computeschedule.fluent.models.CreateResourceOperationResponseInner":"Microsoft.ComputeSchedule.CreateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner":"Microsoft.ComputeSchedule.DeallocateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.DeleteResourceOperationResponseInner":"Microsoft.ComputeSchedule.DeleteResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner":"Microsoft.ComputeSchedule.GetOperationErrorsResponse","com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner":"Microsoft.ComputeSchedule.GetOperationStatusResponse","com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner":"Microsoft.ComputeSchedule.HibernateResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceExtensionResourceInner":"Microsoft.ComputeSchedule.OccurrenceExtensionResource","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceInner":"Microsoft.ComputeSchedule.Occurrence","com.azure.resourcemanager.computeschedule.fluent.models.OccurrenceResourceInner":"Microsoft.ComputeSchedule.OccurrenceResource","com.azure.resourcemanager.computeschedule.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.computeschedule.fluent.models.RecurringActionsResourceOperationResultInner":"Microsoft.ComputeSchedule.ResourceOperationResponse","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionInner":"Microsoft.ComputeSchedule.ScheduledAction","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourceInner":"Microsoft.ComputeSchedule.ScheduledActionResource","com.azure.resourcemanager.computeschedule.fluent.models.ScheduledActionResourcesInner":"Microsoft.ComputeSchedule.ScheduledActionResources","com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner":"Microsoft.ComputeSchedule.StartResourceOperationResponse","com.azure.resourcemanager.computeschedule.implementation.ComputeScheduleMgmtClientBuilder":"Microsoft.ComputeSchedule","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceExtensionResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.OccurrenceResourceListResponse":"Microsoft.ComputeSchedule.OccurrenceResourceListResponse","com.azure.resourcemanager.computeschedule.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.computeschedule.implementation.models.ResourceListResponse":"Microsoft.ComputeSchedule.ResourceListResponse","com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.implementation.models.ScheduledActionResourcesListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.computeschedule.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.computeschedule.models.CancelOccurrenceRequest":"Microsoft.ComputeSchedule.CancelOccurrenceRequest","com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest":"Microsoft.ComputeSchedule.CancelOperationsRequest","com.azure.resourcemanager.computeschedule.models.DeadlineType":"Microsoft.ComputeSchedule.DeadlineType","com.azure.resourcemanager.computeschedule.models.DelayRequest":"Microsoft.ComputeSchedule.DelayRequest","com.azure.resourcemanager.computeschedule.models.Error":"Azure.Core.Foundations.Error","com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest":"Microsoft.ComputeSchedule.ExecuteCreateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest":"Microsoft.ComputeSchedule.ExecuteDeallocateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest":"Microsoft.ComputeSchedule.ExecuteDeleteRequest","com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest":"Microsoft.ComputeSchedule.ExecuteHibernateRequest","com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest":"Microsoft.ComputeSchedule.ExecuteStartRequest","com.azure.resourcemanager.computeschedule.models.ExecutionParameters":"Microsoft.ComputeSchedule.ExecutionParameters","com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest":"Microsoft.ComputeSchedule.GetOperationErrorsRequest","com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest":"Microsoft.ComputeSchedule.GetOperationStatusRequest","com.azure.resourcemanager.computeschedule.models.InnerError":"Azure.Core.Foundations.InnerError","com.azure.resourcemanager.computeschedule.models.Language":"Microsoft.ComputeSchedule.Language","com.azure.resourcemanager.computeschedule.models.Month":"Microsoft.ComputeSchedule.Month","com.azure.resourcemanager.computeschedule.models.NotificationProperties":"Microsoft.ComputeSchedule.NotificationProperties","com.azure.resourcemanager.computeschedule.models.NotificationType":"Microsoft.ComputeSchedule.NotificationType","com.azure.resourcemanager.computeschedule.models.OccurrenceExtensionProperties":"Microsoft.ComputeSchedule.OccurrenceExtensionProperties","com.azure.resourcemanager.computeschedule.models.OccurrenceProperties":"Microsoft.ComputeSchedule.OccurrenceProperties","com.azure.resourcemanager.computeschedule.models.OccurrenceResultSummary":"Microsoft.ComputeSchedule.OccurrenceResultSummary","com.azure.resourcemanager.computeschedule.models.OccurrenceState":"Microsoft.ComputeSchedule.OccurrenceState","com.azure.resourcemanager.computeschedule.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.computeschedule.models.OperationErrorDetails":"Microsoft.ComputeSchedule.OperationErrorDetails","com.azure.resourcemanager.computeschedule.models.OperationErrorsResult":"Microsoft.ComputeSchedule.OperationErrorsResult","com.azure.resourcemanager.computeschedule.models.OperationState":"Microsoft.ComputeSchedule.OperationState","com.azure.resourcemanager.computeschedule.models.OptimizationPreference":"Microsoft.ComputeSchedule.OptimizationPreference","com.azure.resourcemanager.computeschedule.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.computeschedule.models.ProvisioningState":"Microsoft.ComputeSchedule.ProvisioningState","com.azure.resourcemanager.computeschedule.models.ResourceAttachRequest":"Microsoft.ComputeSchedule.ResourceAttachRequest","com.azure.resourcemanager.computeschedule.models.ResourceDetachRequest":"Microsoft.ComputeSchedule.ResourceDetachRequest","com.azure.resourcemanager.computeschedule.models.ResourceOperation":"Microsoft.ComputeSchedule.ResourceOperation","com.azure.resourcemanager.computeschedule.models.ResourceOperationDetails":"Microsoft.ComputeSchedule.ResourceOperationDetails","com.azure.resourcemanager.computeschedule.models.ResourceOperationError":"Microsoft.ComputeSchedule.ResourceOperationError","com.azure.resourcemanager.computeschedule.models.ResourceOperationStatus":"Microsoft.ComputeSchedule.ResourceOperationStatus","com.azure.resourcemanager.computeschedule.models.ResourceOperationType":"Microsoft.ComputeSchedule.ResourceOperationType","com.azure.resourcemanager.computeschedule.models.ResourcePatchRequest":"Microsoft.ComputeSchedule.ResourcePatchRequest","com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload":"Microsoft.ComputeSchedule.ResourceProvisionPayload","com.azure.resourcemanager.computeschedule.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.computeschedule.models.ResourceResultSummary":"Microsoft.ComputeSchedule.ResourceResultSummary","com.azure.resourcemanager.computeschedule.models.ResourceStatus":"Microsoft.ComputeSchedule.ResourceStatus","com.azure.resourcemanager.computeschedule.models.ResourceType":"Microsoft.ComputeSchedule.ResourceType","com.azure.resourcemanager.computeschedule.models.Resources":"Microsoft.ComputeSchedule.Resources","com.azure.resourcemanager.computeschedule.models.RetryPolicy":"Microsoft.ComputeSchedule.RetryPolicy","com.azure.resourcemanager.computeschedule.models.Schedule":"Microsoft.ComputeSchedule.Schedule","com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties":"Microsoft.ComputeSchedule.ScheduledActionProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionType":"Microsoft.ComputeSchedule.ActionType","com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.computeschedule.models.ScheduledActionUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionsExtensionProperties":"Microsoft.ComputeSchedule.ScheduledActionsExtensionProperties","com.azure.resourcemanager.computeschedule.models.ScheduledActionsSchedule":"Microsoft.ComputeSchedule.ScheduledActionsSchedule","com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest":"Microsoft.ComputeSchedule.SubmitDeallocateRequest","com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest":"Microsoft.ComputeSchedule.SubmitHibernateRequest","com.azure.resourcemanager.computeschedule.models.SubmitStartRequest":"Microsoft.ComputeSchedule.SubmitStartRequest","com.azure.resourcemanager.computeschedule.models.WeekDay":"Microsoft.ComputeSchedule.WeekDay"},"generatedFiles":["src/main/java/com/azure/resourcemanager/computeschedule/ComputeScheduleManager.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ComputeScheduleMgmtClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OccurrenceExtensionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OccurrencesClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionExtensionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CancelOperationsResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CreateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeallocateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeleteResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationErrorsResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationStatusResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/HibernateResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceExtensionResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OccurrenceResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/RecurringActionsResourceOperationResultInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionResourceInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/ScheduledActionResourcesInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/StartResourceOperationResponseInner.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/fluent/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CancelOperationsResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ComputeScheduleMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/CreateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeallocateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeleteResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationErrorsResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/HibernateResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceExtensionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrenceResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrencesClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OccurrencesImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/RecurringActionsResourceOperationResultImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionExtensionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionResourceImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionResourcesImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/StartResourceOperationResponseImpl.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceExtensionResourceListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OccurrenceResourceListResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ResourceListResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ScheduledActionListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/models/ScheduledActionResourcesListResult.java","src/main/java/com/azure/resourcemanager/computeschedule/implementation/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ActionType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOccurrenceRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/CreateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeadlineType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeallocateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DelayRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/DeleteResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Error.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteCreateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeleteRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ExecutionParameters.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/HibernateResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/InnerError.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Language.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Month.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NotificationProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/NotificationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Occurrence.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensionResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceExtensions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceResultSummary.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OccurrenceState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Occurrences.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Operation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorDetails.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorsResult.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OperationState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Operations.java","src/main/java/com/azure/resourcemanager/computeschedule/models/OptimizationPreference.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Origin.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/RecurringActionsResourceOperationResult.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceAttachRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceDetachRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperation.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationError.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationStatus.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourcePatchRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisionPayload.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceResultSummary.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceStatus.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Resources.java","src/main/java/com/azure/resourcemanager/computeschedule/models/RetryPolicy.java","src/main/java/com/azure/resourcemanager/computeschedule/models/Schedule.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledAction.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionExtensions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionResource.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionResources.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionType.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionUpdate.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionUpdateProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActions.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionsExtensionProperties.java","src/main/java/com/azure/resourcemanager/computeschedule/models/ScheduledActionsSchedule.java","src/main/java/com/azure/resourcemanager/computeschedule/models/StartResourceOperationResponse.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitDeallocateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitHibernateRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/SubmitStartRequest.java","src/main/java/com/azure/resourcemanager/computeschedule/models/WeekDay.java","src/main/java/com/azure/resourcemanager/computeschedule/models/package-info.java","src/main/java/com/azure/resourcemanager/computeschedule/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrenceExtensionListOccurrenceByVmsSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrenceExtensionListOccurrenceByVmsSamples.java index 11f1cf4cd66d..2ecd9ac83a62 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrenceExtensionListOccurrenceByVmsSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrenceExtensionListOccurrenceByVmsSamples.java @@ -9,23 +9,7 @@ */ public final class OccurrenceExtensionListOccurrenceByVmsSamples { /* - * x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MinimumSet_Gen.json - */ - /** - * Sample code: OccurrenceExtension_ListOccurrenceByVms_MinimumSet. - * - * @param manager Entry point to ComputeScheduleManager. - */ - public static void occurrenceExtensionListOccurrenceByVmsMinimumSet( - com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.occurrenceExtensions() - .listOccurrenceByVms( - "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json */ /** * Sample code: OccurrenceExtension_ListOccurrenceByVms_MaximumSet. @@ -34,9 +18,6 @@ public static void occurrenceExtensionListOccurrenceByVmsMinimumSet( */ public static void occurrenceExtensionListOccurrenceByVmsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.occurrenceExtensions() - .listOccurrenceByVms( - "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", - com.azure.core.util.Context.NONE); + manager.occurrenceExtensions().listOccurrenceByVms("sazvpabfud", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesCancelSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesCancelSamples.java index fb19c5dec428..f58689516e1a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesCancelSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesCancelSamples.java @@ -12,7 +12,7 @@ */ public final class OccurrencesCancelSamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Cancel_MaximumSet. @@ -22,9 +22,9 @@ public final class OccurrencesCancelSamples { public static void occurrencesCancelMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .cancelWithResponse("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", + .cancelWithResponse("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", new CancelOccurrenceRequest().withResourceIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), + "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesDelaySamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesDelaySamples.java index 5b94b553759f..733df23be869 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesDelaySamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesDelaySamples.java @@ -13,7 +13,7 @@ */ public final class OccurrencesDelaySamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Delay_MaximumSet. @@ -23,10 +23,10 @@ public final class OccurrencesDelaySamples { public static void occurrencesDelayMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .delay("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", - new DelayRequest().withDelay(OffsetDateTime.parse("2026-03-12T02:39:48.148Z")) - .withResourceIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), + .delay("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", new DelayRequest() + .withDelay(OffsetDateTime.parse("2025-05-22T17:00:00.000-07:00")) + .withResourceIds(Arrays.asList( + "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesGetSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesGetSamples.java index 52493bd9cfc5..6cb0eb132da8 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesGetSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesGetSamples.java @@ -9,7 +9,7 @@ */ public final class OccurrencesGetSamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_Get_MaximumSet_Gen.json */ /** * Sample code: Occurrences_Get_MaximumSet. @@ -19,7 +19,7 @@ public final class OccurrencesGetSamples { public static void occurrencesGetMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .getWithResponse("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", + .getWithResponse("rgcomputeschedule", "myScheduledAction", "67b5bada-4772-43fc-8dbb-402476d98a45", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListByScheduledActionSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListByScheduledActionSamples.java index 40b3f8e91f0d..92dd181527c5 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListByScheduledActionSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListByScheduledActionSamples.java @@ -9,7 +9,7 @@ */ public final class OccurrencesListByScheduledActionSamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json */ /** * Sample code: Occurrences_ListByScheduledAction_MaximumSet. @@ -19,6 +19,6 @@ public final class OccurrencesListByScheduledActionSamples { public static void occurrencesListByScheduledActionMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .listByScheduledAction("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + .listByScheduledAction("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListResourcesSamples.java index cc61a84ffc52..e259bd5b5c02 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OccurrencesListResourcesSamples.java @@ -9,7 +9,7 @@ */ public final class OccurrencesListResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json */ /** * Sample code: Occurrences_ListResources_MaximumSet. @@ -19,7 +19,7 @@ public final class OccurrencesListResourcesSamples { public static void occurrencesListResourcesMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.occurrences() - .listResources("rgcomputeschedule", "scheduled-action-01", "11111111-1111-1111-1111-111111111111", + .listResources("rgcomputeschedule", "myScheduledAction", "CB26D7CB-3E27-465F-99C8-EAF7A4118245", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OperationsListSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OperationsListSamples.java index e8aedf45935f..896ac158d38e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OperationsListSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-04-15-preview/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumSet. @@ -22,7 +22,7 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: 2026-04-15-preview/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionListByVmsSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionListByVmsSamples.java index 6d1574c3b682..7aa9fb7fce7e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionListByVmsSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionListByVmsSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionExtensionListByVmsSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json */ /** * Sample code: ScheduledActionExtension_ListByVms_MaximumSet. @@ -18,14 +18,11 @@ public final class ScheduledActionExtensionListByVmsSamples { */ public static void scheduledActionExtensionListByVmsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActionExtensions() - .listByVms( - "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", - com.azure.core.util.Context.NONE); + manager.scheduledActionExtensions().listByVms("sazvpabfud", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json */ /** * Sample code: ScheduledActionExtension_ListByVms_MinimumSet. @@ -34,9 +31,6 @@ public static void scheduledActionExtensionListByVmsMaximumSet( */ public static void scheduledActionExtensionListByVmsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActionExtensions() - .listByVms( - "subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", - com.azure.core.util.Context.NONE); + manager.scheduledActionExtensions().listByVms("sazvpabfud", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsAttachResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsAttachResourcesSamples.java index f9ddb9ec79ad..e89b4b1acc67 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsAttachResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsAttachResourcesSamples.java @@ -16,7 +16,7 @@ */ public final class ScheduledActionsAttachResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_AttachResources_MaximumSet. @@ -26,11 +26,11 @@ public final class ScheduledActionsAttachResourcesSamples { public static void scheduledActionsAttachResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .attachResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourceAttachRequest() + .attachResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourceAttachRequest() .withResources(Arrays.asList(new ScheduledActionResourceInner().withResourceId( "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") + Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))))), diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCancelNextOccurrenceSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCancelNextOccurrenceSamples.java index 34226b4a2408..98daefc84b5e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCancelNextOccurrenceSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCancelNextOccurrenceSamples.java @@ -12,7 +12,7 @@ */ public final class ScheduledActionsCancelNextOccurrenceSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_CancelNextOccurrence_MaximumSet. @@ -22,9 +22,9 @@ public final class ScheduledActionsCancelNextOccurrenceSamples { public static void scheduledActionsCancelNextOccurrenceMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .cancelNextOccurrenceWithResponse("rgcomputeschedule", "scheduled-action-01", + .cancelNextOccurrenceWithResponse("rgcomputeschedule", "myScheduledAction", new CancelOccurrenceRequest().withResourceIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), + "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateSamples.java index 1ca8c520c9c5..40b0ec095c6a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateSamples.java @@ -11,7 +11,6 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties; @@ -28,7 +27,7 @@ */ public final class ScheduledActionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_CreateOrUpdate_MaximumSet. @@ -38,27 +37,25 @@ public final class ScheduledActionsCreateOrUpdateSamples { public static void scheduledActionsCreateOrUpdateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .define("scheduled-action-01") - .withRegion("eastus2") + .define("myScheduledAction") + .withRegion("vmuhgdgipeypkcv") .withExistingResourceGroup("rgcomputeschedule") - .withTags(mapOf("environment", "production")) + .withTags(mapOf("key2102", "fakeTokenPlaceholder")) .withProperties(new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2026-03-12T02:39:45.061Z")) - .withEndTime(OffsetDateTime.parse("2026-03-12T02:39:45.062Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("12:00:00") - .withTimeZone("America/Los_Angeles") + .withStartTime(OffsetDateTime.parse("2025-04-17T00:23:55.281Z")) + .withEndTime(OffsetDateTime.parse("2025-04-17T00:23:55.286Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("19:00:00") + .withTimeZone("g") .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) .withRequestedMonths(Arrays.asList(Month.JANUARY)) - .withRequestedDaysOfTheMonth(Arrays.asList(1)) + .withRequestedDaysOfTheMonth(Arrays.asList(15)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withDeadlineType(DeadlineType.UNKNOWN)) .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") + Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDeleteSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDeleteSamples.java index f1e1133a86d7..a3c077a3b392 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDeleteSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsDeleteSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Delete_MaximumSet. @@ -18,6 +18,6 @@ public final class ScheduledActionsDeleteSamples { */ public static void scheduledActionsDeleteMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActions().delete("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + manager.scheduledActions().delete("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDetachResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDetachResourcesSamples.java index e4ccd2e1c707..6808b7e60b14 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDetachResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDetachResourcesSamples.java @@ -12,7 +12,7 @@ */ public final class ScheduledActionsDetachResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_DetachResources_MaximumSet. @@ -22,9 +22,9 @@ public final class ScheduledActionsDetachResourcesSamples { public static void scheduledActionsDetachResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .detachResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", + .detachResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourceDetachRequest().withResources(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1")), + "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableSamples.java index 541b0ecc24c9..9014702ebd93 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsDisableSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Disable_MaximumSet. @@ -19,6 +19,6 @@ public final class ScheduledActionsDisableSamples { public static void scheduledActionsDisableMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .disableWithResponse("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + .disableWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableSamples.java index ef2b78c8df95..a8eab723c23a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsEnableSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Enable_MaximumSet. @@ -19,6 +19,6 @@ public final class ScheduledActionsEnableSamples { public static void scheduledActionsEnableMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .enableWithResponse("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + .enableWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupSamples.java index 6e7debac4332..7f1cf4ff3db8 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Get_MaximumSet. @@ -19,7 +19,6 @@ public final class ScheduledActionsGetByResourceGroupSamples { public static void scheduledActionsGetMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .getByResourceGroupWithResponse("rgcomputeschedule", "scheduled-action-01", - com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupSamples.java index 3b9356fe8abd..dec17df19a46 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListByResourceGroup_MaximumSet. @@ -22,7 +22,7 @@ public static void scheduledActionsListByResourceGroupMaximumSet( } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_ListByResourceGroup_MinimumSet. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesSamples.java index 67c0afebe922..14ca5c64fc4d 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsListResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListResources_MaximumSet. @@ -19,6 +19,6 @@ public final class ScheduledActionsListResourcesSamples { public static void scheduledActionsListResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .listResources("rgcomputeschedule", "scheduled-action-01", com.azure.core.util.Context.NONE); + .listResources("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListSamples.java index 827a9efc6580..5e2275defbc4 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsListSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_ListBySubscription_MaximumSet. @@ -22,7 +22,7 @@ public static void scheduledActionsListBySubscriptionMaximumSet( } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_ListBySubscription_MinimumSet. diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsPatchResourcesSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsPatchResourcesSamples.java index 258742cfad4c..bd366195a363 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsPatchResourcesSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsPatchResourcesSamples.java @@ -16,7 +16,7 @@ */ public final class ScheduledActionsPatchResourcesSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_PatchResources_MaximumSet. @@ -26,11 +26,11 @@ public final class ScheduledActionsPatchResourcesSamples { public static void scheduledActionsPatchResourcesMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .patchResourcesWithResponse("rgcomputeschedule", "scheduled-action-01", new ResourcePatchRequest() + .patchResourcesWithResponse("rgcomputeschedule", "myScheduledAction", new ResourcePatchRequest() .withResources(Arrays.asList(new ScheduledActionResourceInner().withResourceId( "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm") .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") + Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))))), diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsTriggerManualOccurrenceSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsTriggerManualOccurrenceSamples.java index 12717ebca478..0190d99631c6 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsTriggerManualOccurrenceSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsTriggerManualOccurrenceSamples.java @@ -9,7 +9,7 @@ */ public final class ScheduledActionsTriggerManualOccurrenceSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_TriggerManualOccurrence_MaximumSet. @@ -19,7 +19,7 @@ public final class ScheduledActionsTriggerManualOccurrenceSamples { public static void scheduledActionsTriggerManualOccurrenceMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .triggerManualOccurrenceWithResponse("rgcomputeschedule", "my-scheduled-action", + .triggerManualOccurrenceWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsUpdateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsUpdateSamples.java index c79b2672087a..47b0a26f26c0 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsUpdateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsUpdateSamples.java @@ -11,7 +11,6 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; @@ -29,7 +28,7 @@ */ public final class ScheduledActionsUpdateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_Update_MaximumSet. @@ -39,28 +38,25 @@ public final class ScheduledActionsUpdateSamples { public static void scheduledActionsUpdateMaximumSet(com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { ScheduledAction resource = manager.scheduledActions() - .getByResourceGroupWithResponse("rgcomputeschedule", "scheduled-action-01", - com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rgcomputeschedule", "myScheduledAction", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("environment", "staging")) + .withTags(mapOf("key9989", "fakeTokenPlaceholder")) .withProperties(new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2026-03-12T02:39:45.818Z")) - .withEndTime(OffsetDateTime.parse("2026-03-12T02:39:45.818Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("12:00:00") - .withTimeZone("America/Los_Angeles") + .withStartTime(OffsetDateTime.parse("2025-04-17T00:23:58.149Z")) + .withEndTime(OffsetDateTime.parse("2025-04-17T00:23:58.149Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("19:00:00") + .withTimeZone("bni") .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) .withRequestedMonths(Arrays.asList(Month.JANUARY)) - .withRequestedDaysOfTheMonth(Arrays.asList(1)) + .withRequestedDaysOfTheMonth(Arrays.asList(15)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withDeadlineType(DeadlineType.UNKNOWN)) .withNotificationSettings( - Arrays.asList(new NotificationProperties().withDestination("admin@contoso.com") + Arrays.asList(new NotificationProperties().withDestination("wbhryycyolvnypjxzlawwvb") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesCancelOperationsSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesCancelOperationsSamples.java index b0edbbe0f389..8347823d8de6 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesCancelOperationsSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesCancelOperationsSamples.java @@ -12,7 +12,7 @@ */ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesCancelOperations_MinimumSet. @@ -22,14 +22,14 @@ public final class ScheduledActionsVirtualMachinesCancelOperationsSamples { public static void scheduledActionsVirtualMachinesCancelOperationsMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesCancelOperationsWithResponse("eastus2", - new CancelOperationsRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + .virtualMachinesCancelOperationsWithResponse("fhdunfivmjiltaiakwhhwdgemfcld", + new CancelOperationsRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesCancelOperations_MaximumSet. @@ -39,9 +39,9 @@ public static void scheduledActionsVirtualMachinesCancelOperationsMinimumSet( public static void scheduledActionsVirtualMachinesCancelOperationsMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesCancelOperationsWithResponse("eastus2", - new CancelOperationsRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + .virtualMachinesCancelOperationsWithResponse("nivsvluajruxhmsfgmxjnl", + new CancelOperationsRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateFlexSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateFlexSamples.java deleted file mode 100644 index 4ecf3e7cd41d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateFlexSamples.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; -import com.azure.resourcemanager.computeschedule.models.AllocationStrategy; -import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; -import com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension; -import com.azure.resourcemanager.computeschedule.models.BulkActionVMProperties; -import com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties; -import com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration; -import com.azure.resourcemanager.computeschedule.models.CachingTypes; -import com.azure.resourcemanager.computeschedule.models.DataDisk; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; -import com.azure.resourcemanager.computeschedule.models.DiskControllerTypes; -import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; -import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; -import com.azure.resourcemanager.computeschedule.models.DistributionStrategy; -import com.azure.resourcemanager.computeschedule.models.ExecuteCreateFlexRequest; -import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.FlexProperties; -import com.azure.resourcemanager.computeschedule.models.ImageReference; -import com.azure.resourcemanager.computeschedule.models.LinuxConfiguration; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; -import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; -import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; -import com.azure.resourcemanager.computeschedule.models.NetworkProfile; -import com.azure.resourcemanager.computeschedule.models.OSDisk; -import com.azure.resourcemanager.computeschedule.models.OSProfile; -import com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.OsType; -import com.azure.resourcemanager.computeschedule.models.PriorityProfile; -import com.azure.resourcemanager.computeschedule.models.PriorityType; -import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; -import com.azure.resourcemanager.computeschedule.models.ResourceProvisionFlexPayload; -import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import com.azure.resourcemanager.computeschedule.models.SecurityProfile; -import com.azure.resourcemanager.computeschedule.models.SecurityTypes; -import com.azure.resourcemanager.computeschedule.models.SshConfiguration; -import com.azure.resourcemanager.computeschedule.models.SshPublicKey; -import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; -import com.azure.resourcemanager.computeschedule.models.StorageProfile; -import com.azure.resourcemanager.computeschedule.models.UefiSettings; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; -import com.azure.resourcemanager.computeschedule.models.VmSizeProfile; -import com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy; -import com.azure.resourcemanager.computeschedule.models.ZonePreference; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ScheduledActions VirtualMachinesExecuteCreateFlex. - */ -public final class ScheduledActionsVirtualMachinesExecuteCreateFlexSamples { - /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MaximumSet_Gen.json - */ - /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreateFlex_MaximumSet. - * - * @param manager Entry point to ComputeScheduleManager. - */ - public static void scheduledActionsVirtualMachinesExecuteCreateFlexMaximumSet( - com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActions() - .virtualMachinesExecuteCreateFlexWithResponse("eastus2", - new ExecuteCreateFlexRequest() - .withResourceConfigParameters( - new ResourceProvisionFlexPayload() - .withVirtualMachineBaseProfile( - new BulkVMConfiguration().withName("baseFlexVmConfig") - .withComputeApiVersion("2024-07-01") - .withResourceGroupName("myResourceGroup") - .withZones(Arrays.asList("1")) - .withIdentity( - new VirtualMachineIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withTags(mapOf("environment", "production", "department", "engineering")) - .withProperties( - new BulkActionVMProperties() - .withStorageProfile(new StorageProfile() - .withImageReference(new ImageReference().withPublisher("Canonical") - .withOffer("0001-com-ubuntu-server-jammy") - .withSku("22_04-lts-gen2") - .withVersion("latest")) - .withOsDisk(new OSDisk().withOsType(OperatingSystemTypes.LINUX) - .withName("myOsDisk") - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(128) - .withManagedDisk(new ManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE)) - .withDataDisks( - Arrays.asList(new DataDisk().withLun(0) - .withName("myDataDisk-0") - .withCaching(CachingTypes.READ_ONLY) - .withCreateOption(DiskCreateOptionTypes.EMPTY) - .withDiskSizeGB(256) - .withManagedDisk( - new ManagedDiskParameters().withStorageAccountType( - StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withDiskControllerType(DiskControllerTypes.SCSI)) - .withAdditionalCapabilities( - new AdditionalCapabilities().withUltraSSDEnabled(false) - .withHibernationEnabled(false)) - .withOsProfile(new OSProfile().withComputerName("myFlexVM") - .withAdminUsername("azureuser") - .withLinuxConfiguration( - new LinuxConfiguration().withDisablePasswordAuthentication(true) - .withSsh(new SshConfiguration() - .withPublicKeys(Arrays.asList(new SshPublicKey() - .withPath("/home/azureuser/.ssh/authorized_keys") - .withKeyData("fakeTokenPlaceholder")))) - .withProvisionVMAgent(true) - .withPatchSettings(new LinuxPatchSettings() - .withPatchMode(LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) - .withAssessmentMode( - LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM))) - .withAllowExtensionOperations(true)) - .withNetworkProfile(new NetworkProfile().withNetworkInterfaces( - Arrays.asList(new NetworkInterfaceReference().withId( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic") - .withProperties( - new NetworkInterfaceReferenceProperties().withPrimary(true) - .withDeleteOption(DeleteOptions.DELETE))))) - .withSecurityProfile(new SecurityProfile() - .withUefiSettings(new UefiSettings().withSecureBootEnabled(true) - .withVTpmEnabled(true)) - .withSecurityType(SecurityTypes.TRUSTED_LAUNCH)) - .withDiagnosticsProfile(new DiagnosticsProfile() - .withBootDiagnostics(new BootDiagnostics().withEnabled(true)))) - .withVmExtensions( - Arrays.asList(new BulkActionVMExtension().withName("AzureMonitorLinuxAgent") - .withProperties(new BulkActionVmExtensionProperties() - .withPublisher("Microsoft.Azure.Monitor") - .withType("AzureMonitorLinuxAgent") - .withTypeHandlerVersion("1.0") - .withAutoUpgradeMinorVersion(true) - .withEnableAutomaticUpgrade(true) - .withSettings(mapOf()) - .withSuppressFailures(false))))) - .withVirtualMachineOverrides(Arrays.asList(new BulkVMConfiguration() - .withName("overrideFlexVmConfig-0") - .withComputeApiVersion("2024-07-01") - .withZones(Arrays.asList("2")) - .withTags(mapOf("environment", "production", "department", "engineering", "role", - "web-server")) - .withProperties(new BulkActionVMProperties() - .withStorageProfile(new StorageProfile().withOsDisk( - new OSDisk() - .withOsType(OperatingSystemTypes.LINUX) - .withName("overrideOsDisk") - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(256) - .withManagedDisk(new ManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withNetworkProfile(new NetworkProfile() - .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceReference().withId( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override") - .withProperties(new NetworkInterfaceReferenceProperties().withPrimary(true) - .withDeleteOption(DeleteOptions.DELETE)))))))) - .withResourceCount(24) - .withResourcePrefix("myFlexVm") - .withFlexProperties(new FlexProperties() - .withVmSizeProfiles( - Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3").withRank(24), - new VmSizeProfile().withName("Standard_D2s_v3").withRank(24))) - .withOsType(OsType.WINDOWS) - .withPriorityProfile(new PriorityProfile().withType(PriorityType.REGULAR) - .withAllocationStrategy(AllocationStrategy.LOWEST_PRICE)) - .withZoneAllocationPolicy(new ZoneAllocationPolicy() - .withDistributionStrategy(DistributionStrategy.BEST_EFFORT_SINGLE_ZONE) - .withZonePreferences( - Arrays.asList(new ZonePreference().withZone("1").withRank(21)))))) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MinimumSet_Gen.json - */ - /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreateFlex_MinimumSet. - * - * @param manager Entry point to ComputeScheduleManager. - */ - public static void scheduledActionsVirtualMachinesExecuteCreateFlexMinimumSet( - com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { - manager.scheduledActions() - .virtualMachinesExecuteCreateFlexWithResponse("eastus2", new ExecuteCreateFlexRequest() - .withResourceConfigParameters(new ResourceProvisionFlexPayload().withResourceCount(24) - .withFlexProperties(new FlexProperties() - .withVmSizeProfiles(Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3").withRank(24), - new VmSizeProfile().withName("Standard_D2s_v3").withRank(24))) - .withOsType(OsType.WINDOWS) - .withPriorityProfile(new PriorityProfile()))) - .withExecutionParameters(new ExecutionParameters()), com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateSamples.java index cd681bed2075..4387cc68101d 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteCreateSamples.java @@ -4,46 +4,12 @@ package com.azure.resourcemanager.computeschedule.generated; -import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; -import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; -import com.azure.resourcemanager.computeschedule.models.BulkActionVMExtension; -import com.azure.resourcemanager.computeschedule.models.BulkActionVMProperties; -import com.azure.resourcemanager.computeschedule.models.BulkActionVmExtensionProperties; -import com.azure.resourcemanager.computeschedule.models.BulkVMConfiguration; -import com.azure.resourcemanager.computeschedule.models.CachingTypes; -import com.azure.resourcemanager.computeschedule.models.DataDisk; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; -import com.azure.resourcemanager.computeschedule.models.DiskControllerTypes; -import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; -import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.ImageReference; -import com.azure.resourcemanager.computeschedule.models.LinuxConfiguration; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; -import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; -import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; -import com.azure.resourcemanager.computeschedule.models.NetworkProfile; -import com.azure.resourcemanager.computeschedule.models.OSDisk; -import com.azure.resourcemanager.computeschedule.models.OSProfile; -import com.azure.resourcemanager.computeschedule.models.OperatingSystemTypes; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; -import com.azure.resourcemanager.computeschedule.models.SecurityProfile; -import com.azure.resourcemanager.computeschedule.models.SecurityTypes; -import com.azure.resourcemanager.computeschedule.models.SshConfiguration; -import com.azure.resourcemanager.computeschedule.models.SshPublicKey; -import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; -import com.azure.resourcemanager.computeschedule.models.StorageProfile; -import com.azure.resourcemanager.computeschedule.models.UefiSettings; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -53,142 +19,84 @@ */ public final class ScheduledActionsVirtualMachinesExecuteCreateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen - generated by [MaximumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteCreateMaximumSet( + public static void scheduledActionsVirtualMachinesExecuteCreateMaximumSetGenGeneratedByMaximumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteCreateWithResponse("eastus2", - new ExecuteCreateRequest() - .withResourceConfigParameters( - new ResourceProvisionPayload() - .withVirtualMachineBaseProfile( - new BulkVMConfiguration().withName("baseVmConfig") - .withComputeApiVersion("2024-07-01") - .withResourceGroupName("myResourceGroup") - .withZones(Arrays.asList("1")) - .withIdentity( - new VirtualMachineIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withTags(mapOf("environment", "production", "department", "engineering")) - .withProperties( - new BulkActionVMProperties() - .withStorageProfile(new StorageProfile() - .withImageReference(new ImageReference().withPublisher("Canonical") - .withOffer("0001-com-ubuntu-server-jammy") - .withSku("22_04-lts-gen2") - .withVersion("latest")) - .withOsDisk(new OSDisk().withOsType(OperatingSystemTypes.LINUX) - .withName("myOsDisk") - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(128) - .withManagedDisk(new ManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE)) - .withDataDisks( - Arrays.asList(new DataDisk().withLun(0) - .withName("myDataDisk-0") - .withCaching(CachingTypes.READ_ONLY) - .withCreateOption(DiskCreateOptionTypes.EMPTY) - .withDiskSizeGB(256) - .withManagedDisk( - new ManagedDiskParameters().withStorageAccountType( - StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withDiskControllerType(DiskControllerTypes.SCSI)) - .withAdditionalCapabilities( - new AdditionalCapabilities().withUltraSSDEnabled(false) - .withHibernationEnabled(false)) - .withOsProfile(new OSProfile().withComputerName("myVM") - .withAdminUsername("azureuser") - .withLinuxConfiguration( - new LinuxConfiguration().withDisablePasswordAuthentication(true) - .withSsh(new SshConfiguration() - .withPublicKeys(Arrays.asList(new SshPublicKey() - .withPath("/home/azureuser/.ssh/authorized_keys") - .withKeyData("fakeTokenPlaceholder")))) - .withProvisionVMAgent(true) - .withPatchSettings(new LinuxPatchSettings() - .withPatchMode(LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) - .withAssessmentMode( - LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM))) - .withAllowExtensionOperations(true)) - .withNetworkProfile(new NetworkProfile().withNetworkInterfaces( - Arrays.asList(new NetworkInterfaceReference().withId( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic") - .withProperties( - new NetworkInterfaceReferenceProperties().withPrimary(true) - .withDeleteOption(DeleteOptions.DELETE))))) - .withSecurityProfile(new SecurityProfile() - .withUefiSettings(new UefiSettings().withSecureBootEnabled(true) - .withVTpmEnabled(true)) - .withSecurityType(SecurityTypes.TRUSTED_LAUNCH)) - .withDiagnosticsProfile(new DiagnosticsProfile() - .withBootDiagnostics(new BootDiagnostics().withEnabled(true)))) - .withVmExtensions( - Arrays.asList(new BulkActionVMExtension().withName("AzureMonitorLinuxAgent") - .withProperties(new BulkActionVmExtensionProperties() - .withPublisher("Microsoft.Azure.Monitor") - .withType("AzureMonitorLinuxAgent") - .withTypeHandlerVersion("1.0") - .withAutoUpgradeMinorVersion(true) - .withEnableAutomaticUpgrade(true) - .withSettings(mapOf()) - .withSuppressFailures(false))))) - .withVirtualMachineOverrides(Arrays.asList(new BulkVMConfiguration() - .withName("overrideVmConfig-0") - .withComputeApiVersion("2024-07-01") - .withZones(Arrays.asList("2")) - .withTags(mapOf("environment", "production", "department", "engineering", "role", - "web-server")) - .withProperties(new BulkActionVMProperties() - .withStorageProfile(new StorageProfile().withOsDisk( - new OSDisk() - .withOsType(OperatingSystemTypes.LINUX) - .withName("overrideOsDisk") - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(256) - .withManagedDisk(new ManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withNetworkProfile(new NetworkProfile() - .withNetworkInterfaces(Arrays.asList(new NetworkInterfaceReference().withId( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override") - .withProperties(new NetworkInterfaceReferenceProperties().withPrimary(true) - .withDeleteOption(DeleteOptions.DELETE)))))))) - .withResourceCount(3) - .withResourcePrefix("myBulkVm")) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) - .withCorrelationid("01234567-89ab-cdef-0123-456789abcdef"), - com.azure.core.util.Context.NONE); + .virtualMachinesExecuteCreateWithResponse("oslhbouzgevzpeydssyelhw", new ExecuteCreateRequest() + .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf("hardwareProfile", + BinaryData.fromBytes("{name=F1}".getBytes(StandardCharsets.UTF_8)), "provisioningState", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "storageProfile", + BinaryData.fromBytes("{osDisk={osType=0}}".getBytes(StandardCharsets.UTF_8)), "vmExtensions", + BinaryData.fromBytes( + "[{autoUpgradeMinorVersion=true, protectedSettings=SomeDecryptedSecretValue, provisioningState=0, enableAutomaticUpgrade=true, publisher=Microsoft.Azure.Monitor, type=AzureMonitorLinuxAgent, typeHandlerVersion=1.0}, {name=myExtensionName}]" + .getBytes(StandardCharsets.UTF_8)), + "resourcegroupName", + BinaryData.fromBytes("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B".getBytes(StandardCharsets.UTF_8)), + "computeApiVersion", BinaryData.fromBytes("2024-07-01".getBytes(StandardCharsets.UTF_8)))) + .withResourceOverrides(Arrays.asList(mapOf("name", + BinaryData.fromBytes("myFleet_523".getBytes(StandardCharsets.UTF_8)), "location", + BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", + BinaryData.fromBytes( + "{hardwareProfile={vmSize=Standard_F1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" + .getBytes(StandardCharsets.UTF_8)), + "zones", BinaryData.fromBytes("[1]".getBytes(StandardCharsets.UTF_8))), + mapOf("name", BinaryData.fromBytes("myFleet_524".getBytes(StandardCharsets.UTF_8)), "location", + BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", + BinaryData.fromBytes( + "{hardwareProfile={vmSize=Standard_G1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" + .getBytes(StandardCharsets.UTF_8)), + "zones", BinaryData.fromBytes("[2]".getBytes(StandardCharsets.UTF_8))))) + .withResourceCount(2) + .withResourcePrefix("TL1")) + .withExecutionParameters(new ExecutionParameters() + .withRetryPolicy(new RetryPolicy().withRetryCount(5).withRetryWindowInMinutes(40))) + .withCorrelationid("dfe927c5-16a6-40b7-a0f7-8524975ed642"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteCreateMinimumSet( + public static void scheduledActionsVirtualMachinesExecuteCreateMinimumSetGenGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteCreateWithResponse("eastus2", - new ExecuteCreateRequest() - .withResourceConfigParameters(new ResourceProvisionPayload().withResourceCount(3)) - .withExecutionParameters(new ExecutionParameters()), - com.azure.core.util.Context.NONE); + .virtualMachinesExecuteCreateWithResponse("useast", new ExecuteCreateRequest() + .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf("hardwareProfile", + BinaryData.fromBytes("{name=F1}".getBytes(StandardCharsets.UTF_8)), "provisioningState", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "storageProfile", + BinaryData.fromBytes("{osDisk={osType=0}}".getBytes(StandardCharsets.UTF_8)), "vmExtensions", + BinaryData.fromBytes( + "[{autoUpgradeMinorVersion=true, protectedSettings=SomeDecryptedSecretValue, provisioningState=0, enableAutomaticUpgrade=true, publisher=Microsoft.Azure.Monitor, type=AzureMonitorLinuxAgent, typeHandlerVersion=1.0}, {name=myExtensionName}]" + .getBytes(StandardCharsets.UTF_8)), + "resourcegroupName", + BinaryData.fromBytes("RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B".getBytes(StandardCharsets.UTF_8)), + "computeApiVersion", BinaryData.fromBytes("2024-07-01".getBytes(StandardCharsets.UTF_8)))) + .withResourceOverrides(Arrays.asList(mapOf("name", + BinaryData.fromBytes("myFleet_523".getBytes(StandardCharsets.UTF_8)), "location", + BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", + BinaryData.fromBytes( + "{hardwareProfile={vmSize=Standard_F1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" + .getBytes(StandardCharsets.UTF_8)), + "zones", BinaryData.fromBytes("[1]".getBytes(StandardCharsets.UTF_8))), + mapOf("name", BinaryData.fromBytes("myFleet_524".getBytes(StandardCharsets.UTF_8)), "location", + BinaryData.fromBytes("LocalDev".getBytes(StandardCharsets.UTF_8)), "properties", + BinaryData.fromBytes( + "{hardwareProfile={vmSize=Standard_G1s}, provisioningState=0, osProfile={computerName=myFleet000000, adminUsername=adminUser, windowsConfiguration={additionalUnattendContent=[{passName=someValue, content=}, {passName=someOtherValue, content=SomeDecryptedSecretValue}]}, adminPassword=SomeDecryptedSecretValue}, priority=0}" + .getBytes(StandardCharsets.UTF_8)), + "zones", BinaryData.fromBytes("[2]".getBytes(StandardCharsets.UTF_8))))) + .withResourceCount(2)) + .withExecutionParameters(new ExecutionParameters()), com.azure.core.util.Context.NONE); } // Use "Map.of" if available diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeallocateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeallocateSamples.java index 2699d404e4f0..21f2207352cd 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeallocateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeallocateSamples.java @@ -7,7 +7,6 @@ import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -17,7 +16,7 @@ */ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet. @@ -27,15 +26,15 @@ public final class ScheduledActionsVirtualMachinesExecuteDeallocateSamples { public static void scheduledActionsVirtualMachinesExecuteDeallocateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeallocateWithResponse("eastus2", new ExecuteDeallocateRequest() + .virtualMachinesExecuteDeallocateWithResponse("qqfrkswrovcice", new ExecuteDeallocateRequest() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet. @@ -45,14 +44,12 @@ public static void scheduledActionsVirtualMachinesExecuteDeallocateMinimumSet( public static void scheduledActionsVirtualMachinesExecuteDeallocateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeallocateWithResponse("eastus2", new ExecuteDeallocateRequest() + .virtualMachinesExecuteDeallocateWithResponse("ykcaptgboliddcfyaiuimj", new ExecuteDeallocateRequest() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeleteSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeleteSamples.java index 138eae0c0536..7bac9d6ccd01 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeleteSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteDeleteSamples.java @@ -6,8 +6,6 @@ import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; -import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -17,43 +15,42 @@ */ public final class ScheduledActionsVirtualMachinesExecuteDeleteSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteDeleteMinimumSet( + public static void scheduledActionsVirtualMachinesExecuteDeleteMinimumSetGenGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeleteWithResponse("eastus2", new ExecuteDeleteRequest() + .virtualMachinesExecuteDeleteWithResponse("east", new ExecuteDeleteRequest() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))), + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet. + * Sample code: ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen - generated by [MaximumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteDeleteMaximumSet( + public static void scheduledActionsVirtualMachinesExecuteDeleteMaximumSetGenGeneratedByMaximumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteDeleteWithResponse("eastus2", new ExecuteDeleteRequest() - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .virtualMachinesExecuteDeleteWithResponse("east", new ExecuteDeleteRequest() + .withExecutionParameters(new ExecutionParameters() + .withRetryPolicy(new RetryPolicy().withRetryCount(2).withRetryWindowInMinutes(4))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890") - .withForceDeletion(true), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("dfe927c5-16a6-40b7-a0f7-8524975ed642") + .withForceDeletion(false), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteHibernateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteHibernateSamples.java index b1c45a4fcaba..87ec5caae790 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteHibernateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteHibernateSamples.java @@ -7,7 +7,6 @@ import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -17,25 +16,25 @@ */ public final class ScheduledActionsVirtualMachinesExecuteHibernateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteHibernateMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesExecuteHibernateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteHibernateWithResponse("eastus2", new ExecuteHibernateRequest() + .virtualMachinesExecuteHibernateWithResponse("xtmm", new ExecuteHibernateRequest() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet. @@ -45,14 +44,12 @@ public static void scheduledActionsVirtualMachinesExecuteHibernateMaximumSetGene public static void scheduledActionsVirtualMachinesExecuteHibernateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteHibernateWithResponse("eastus2", new ExecuteHibernateRequest() + .virtualMachinesExecuteHibernateWithResponse("gztd", new ExecuteHibernateRequest() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteStartSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteStartSamples.java index 2db0270b2551..559c682e2a3e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteStartSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesExecuteStartSamples.java @@ -7,7 +7,6 @@ import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -17,7 +16,7 @@ */ public final class ScheduledActionsVirtualMachinesExecuteStartSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MaximumSet. @@ -27,32 +26,30 @@ public final class ScheduledActionsVirtualMachinesExecuteStartSamples { public static void scheduledActionsVirtualMachinesExecuteStartMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteStartWithResponse("eastus2", new ExecuteStartRequest() + .virtualMachinesExecuteStartWithResponse("qk", new ExecuteStartRequest() .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesExecuteStart_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesExecuteStartMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesExecuteStartMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesExecuteStartWithResponse("eastus2", new ExecuteStartRequest() + .virtualMachinesExecuteStartWithResponse("fbdewllahrteoavajbomjc", new ExecuteStartRequest() .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationErrorsSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationErrorsSamples.java index 726f7b6193d8..c48c86f30a4c 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationErrorsSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationErrorsSamples.java @@ -12,34 +12,34 @@ */ public final class ScheduledActionsVirtualMachinesGetOperationErrorsSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet. + * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen - generated by [MaximumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationErrorsMaximumSet( + public static void scheduledActionsVirtualMachinesGetOperationErrorsMaximumSetGenGeneratedByMaximumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationErrorsWithResponse("eastus2", - new GetOperationErrorsRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")), + .virtualMachinesGetOperationErrorsWithResponse("ennweqswbghorrgzbet", + new GetOperationErrorsRequest().withOperationIds(Arrays.asList("ksufjznokhsbowdupyt")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet. + * Sample code: ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen - generated by [MinimumSet] rule. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationErrorsMinimumSet( + public static void scheduledActionsVirtualMachinesGetOperationErrorsMinimumSetGenGeneratedByMinimumSetRule( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationErrorsWithResponse("eastus2", - new GetOperationErrorsRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")), + .virtualMachinesGetOperationErrorsWithResponse("gcdqwzmxtcn", + new GetOperationErrorsRequest().withOperationIds(Arrays.asList("ksufjznokhsbowdupyt")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationStatusSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationStatusSamples.java index 2216082a38eb..00d7c3c74024 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationStatusSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesGetOperationStatusSamples.java @@ -12,7 +12,7 @@ */ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet. @@ -22,26 +22,26 @@ public final class ScheduledActionsVirtualMachinesGetOperationStatusSamples { public static void scheduledActionsVirtualMachinesGetOperationStatusMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationStatusWithResponse("eastus2", - new GetOperationStatusRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + .virtualMachinesGetOperationStatusWithResponse("ntfcikxsmthfkdhdcjpevmydzu", + new GetOperationStatusRequest().withOperationIds(Arrays.asList("b211f086-4b91-4686-a453-2f5c012e4d80")) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesGetOperationStatusMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesGetOperationStatusMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesGetOperationStatusWithResponse("eastus2", - new GetOperationStatusRequest().withOperationIds(Arrays.asList("01234567-89ab-cdef-0123-456789abcdef")) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + .virtualMachinesGetOperationStatusWithResponse("ykvvjfoopmkwznctgaiblzvea", + new GetOperationStatusRequest().withOperationIds(Arrays.asList("duhqnwosjzexcfwfhryvy")) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitDeallocateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitDeallocateSamples.java index bc7f4f084891..2b814ba7e29f 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitDeallocateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitDeallocateSamples.java @@ -7,7 +7,6 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; @@ -20,7 +19,7 @@ */ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet. @@ -30,38 +29,36 @@ public final class ScheduledActionsVirtualMachinesSubmitDeallocateSamples { public static void scheduledActionsVirtualMachinesSubmitDeallocateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitDeallocateWithResponse("eastus2", new SubmitDeallocateRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withTimezone("America/Los_Angeles") - .withTimeZone("America/Los_Angeles") + .virtualMachinesSubmitDeallocateWithResponse("ycipx", new SubmitDeallocateRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitDeallocateMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesSubmitDeallocateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitDeallocateWithResponse("eastus2", new SubmitDeallocateRequest() - .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitDeallocateWithResponse("zrcmkxsbuxsxxulky", new SubmitDeallocateRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") + .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitHibernateSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitHibernateSamples.java index efa7bd9b6959..309248ee7e59 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitHibernateSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitHibernateSamples.java @@ -7,7 +7,6 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; @@ -20,26 +19,28 @@ */ public final class ScheduledActionsVirtualMachinesSubmitHibernateSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitHibernateMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesSubmitHibernateMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitHibernateWithResponse("eastus2", new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitHibernateWithResponse("zuevcqpgdohzbjodhachtr", new SubmitHibernateRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") + .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet. @@ -49,19 +50,15 @@ public static void scheduledActionsVirtualMachinesSubmitHibernateMaximumSetGener public static void scheduledActionsVirtualMachinesSubmitHibernateMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitHibernateWithResponse("eastus2", new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withTimezone("America/Los_Angeles") - .withTimeZone("America/Los_Angeles") + .virtualMachinesSubmitHibernateWithResponse("rhadyapnyvmobwg", new SubmitHibernateRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitStartSamples.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitStartSamples.java index 67f9b55a0716..a79109fb53af 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitStartSamples.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/samples/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsVirtualMachinesSubmitStartSamples.java @@ -7,7 +7,6 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; @@ -20,7 +19,7 @@ */ public final class ScheduledActionsVirtualMachinesSubmitStartSamples { /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json */ /** * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MaximumSet. @@ -30,38 +29,36 @@ public final class ScheduledActionsVirtualMachinesSubmitStartSamples { public static void scheduledActionsVirtualMachinesSubmitStartMaximumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitStartWithResponse("eastus2", new SubmitStartRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withDeadLine(OffsetDateTime.parse("2026-03-12T02:39:44.444Z")) - .withTimezone("America/Los_Angeles") - .withTimeZone("America/Los_Angeles") + .virtualMachinesSubmitStartWithResponse("pxtvvk", new SubmitStartRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(3) - .withRetryWindowInMinutes(30) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) + .withRetryPolicy(new RetryPolicy().withRetryCount(17).withRetryWindowInMinutes(29))) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json + * x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json */ /** - * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MaximumSet - generated by [MinimumSet] rule. + * Sample code: ScheduledActions_VirtualMachinesSubmitStart_MinimumSet. * * @param manager Entry point to ComputeScheduleManager. */ - public static void scheduledActionsVirtualMachinesSubmitStartMaximumSetGeneratedByMinimumSetRule( + public static void scheduledActionsVirtualMachinesSubmitStartMinimumSet( com.azure.resourcemanager.computeschedule.ComputeScheduleManager manager) { manager.scheduledActions() - .virtualMachinesSubmitStartWithResponse("eastus2", new SubmitStartRequest() - .withSchedule(new Schedule().withDeadlineType(DeadlineType.UNKNOWN)) + .virtualMachinesSubmitStartWithResponse("ufrcsuw", new SubmitStartRequest() + .withSchedule(new Schedule().withDeadLine(OffsetDateTime.parse("2025-04-17T00:23:56.803Z")) + .withTimeZone("aigbjdnldtzkteqi") + .withDeadlineType(DeadlineType.UNKNOWN)) .withExecutionParameters(new ExecutionParameters()) .withResources(new Resources().withIds(Arrays.asList( - "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1"))) - .withCorrelationid("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), com.azure.core.util.Context.NONE); + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4"))) + .withCorrelationid("b211f086-4b91-4686-a453-2f5c012e4d80"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalCapabilitiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalCapabilitiesTests.java deleted file mode 100644 index 1c085a74a86e..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalCapabilitiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.AdditionalCapabilities; -import org.junit.jupiter.api.Assertions; - -public final class AdditionalCapabilitiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdditionalCapabilities model = BinaryData.fromString("{\"ultraSSDEnabled\":true,\"hibernationEnabled\":false}") - .toObject(AdditionalCapabilities.class); - Assertions.assertTrue(model.ultraSSDEnabled()); - Assertions.assertFalse(model.hibernationEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdditionalCapabilities model - = new AdditionalCapabilities().withUltraSSDEnabled(true).withHibernationEnabled(false); - model = BinaryData.fromObject(model).toObject(AdditionalCapabilities.class); - Assertions.assertTrue(model.ultraSSDEnabled()); - Assertions.assertFalse(model.hibernationEnabled()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalUnattendContentTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalUnattendContentTests.java deleted file mode 100644 index 422fde332838..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AdditionalUnattendContentTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContent; -import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentComponentName; -import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentPassName; -import com.azure.resourcemanager.computeschedule.models.SettingNames; -import org.junit.jupiter.api.Assertions; - -public final class AdditionalUnattendContentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdditionalUnattendContent model = BinaryData.fromString( - "{\"passName\":\"OobeSystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"AutoLogon\",\"content\":\"ybcibvyvdcsit\"}") - .toObject(AdditionalUnattendContent.class); - Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, model.passName()); - Assertions.assertEquals(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP, - model.componentName()); - Assertions.assertEquals(SettingNames.AUTO_LOGON, model.settingName()); - Assertions.assertEquals("ybcibvyvdcsit", model.content()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdditionalUnattendContent model - = new AdditionalUnattendContent().withPassName(AdditionalUnattendContentPassName.OOBE_SYSTEM) - .withComponentName(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP) - .withSettingName(SettingNames.AUTO_LOGON) - .withContent("ybcibvyvdcsit"); - model = BinaryData.fromObject(model).toObject(AdditionalUnattendContent.class); - Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, model.passName()); - Assertions.assertEquals(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP, - model.componentName()); - Assertions.assertEquals(SettingNames.AUTO_LOGON, model.settingName()); - Assertions.assertEquals("ybcibvyvdcsit", model.content()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AllInstancesDownTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AllInstancesDownTests.java deleted file mode 100644 index 296674638204..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/AllInstancesDownTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.AllInstancesDown; -import org.junit.jupiter.api.Assertions; - -public final class AllInstancesDownTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllInstancesDown model - = BinaryData.fromString("{\"automaticallyApprove\":false}").toObject(AllInstancesDown.class); - Assertions.assertFalse(model.automaticallyApprove()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllInstancesDown model = new AllInstancesDown().withAutomaticallyApprove(false); - model = BinaryData.fromObject(model).toObject(AllInstancesDown.class); - Assertions.assertFalse(model.automaticallyApprove()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApiEntityReferenceTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApiEntityReferenceTests.java deleted file mode 100644 index 51ac3729a343..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApiEntityReferenceTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ApiEntityReference; -import org.junit.jupiter.api.Assertions; - -public final class ApiEntityReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApiEntityReference model = BinaryData.fromString("{\"id\":\"dslfhotwmcy\"}").toObject(ApiEntityReference.class); - Assertions.assertEquals("dslfhotwmcy", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApiEntityReference model = new ApiEntityReference().withId("dslfhotwmcy"); - model = BinaryData.fromObject(model).toObject(ApiEntityReference.class); - Assertions.assertEquals("dslfhotwmcy", model.id()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApplicationProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApplicationProfileTests.java deleted file mode 100644 index 715445a6d50d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ApplicationProfileTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ApplicationProfile; -import com.azure.resourcemanager.computeschedule.models.VMGalleryApplication; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationProfile model = BinaryData.fromString( - "{\"galleryApplications\":[{\"tags\":\"l\",\"order\":1948356330,\"packageReferenceId\":\"fqqnvwpmqtaruo\",\"configurationReference\":\"mkcjhwqytjrybn\",\"treatFailureAsDeploymentFailure\":true,\"enableAutomaticUpgrade\":true},{\"tags\":\"rjerv\",\"order\":662265241,\"packageReferenceId\":\"nqpeh\",\"configurationReference\":\"doy\",\"treatFailureAsDeploymentFailure\":false,\"enableAutomaticUpgrade\":false}]}") - .toObject(ApplicationProfile.class); - Assertions.assertEquals("l", model.galleryApplications().get(0).tags()); - Assertions.assertEquals(1948356330, model.galleryApplications().get(0).order()); - Assertions.assertEquals("fqqnvwpmqtaruo", model.galleryApplications().get(0).packageReferenceId()); - Assertions.assertEquals("mkcjhwqytjrybn", model.galleryApplications().get(0).configurationReference()); - Assertions.assertTrue(model.galleryApplications().get(0).treatFailureAsDeploymentFailure()); - Assertions.assertTrue(model.galleryApplications().get(0).enableAutomaticUpgrade()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationProfile model = new ApplicationProfile().withGalleryApplications(Arrays.asList( - new VMGalleryApplication().withTags("l") - .withOrder(1948356330) - .withPackageReferenceId("fqqnvwpmqtaruo") - .withConfigurationReference("mkcjhwqytjrybn") - .withTreatFailureAsDeploymentFailure(true) - .withEnableAutomaticUpgrade(true), - new VMGalleryApplication().withTags("rjerv") - .withOrder(662265241) - .withPackageReferenceId("nqpeh") - .withConfigurationReference("doy") - .withTreatFailureAsDeploymentFailure(false) - .withEnableAutomaticUpgrade(false))); - model = BinaryData.fromObject(model).toObject(ApplicationProfile.class); - Assertions.assertEquals("l", model.galleryApplications().get(0).tags()); - Assertions.assertEquals(1948356330, model.galleryApplications().get(0).order()); - Assertions.assertEquals("fqqnvwpmqtaruo", model.galleryApplications().get(0).packageReferenceId()); - Assertions.assertEquals("mkcjhwqytjrybn", model.galleryApplications().get(0).configurationReference()); - Assertions.assertTrue(model.galleryApplications().get(0).treatFailureAsDeploymentFailure()); - Assertions.assertTrue(model.galleryApplications().get(0).enableAutomaticUpgrade()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/BootDiagnosticsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/BootDiagnosticsTests.java deleted file mode 100644 index e0a27ab164a8..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/BootDiagnosticsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; -import org.junit.jupiter.api.Assertions; - -public final class BootDiagnosticsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BootDiagnostics model = BinaryData.fromString("{\"enabled\":false,\"storageUri\":\"lmpewwwfbkr\"}") - .toObject(BootDiagnostics.class); - Assertions.assertFalse(model.enabled()); - Assertions.assertEquals("lmpewwwfbkr", model.storageUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BootDiagnostics model = new BootDiagnostics().withEnabled(false).withStorageUri("lmpewwwfbkr"); - model = BinaryData.fromObject(model).toObject(BootDiagnostics.class); - Assertions.assertFalse(model.enabled()); - Assertions.assertEquals("lmpewwwfbkr", model.storageUri()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOccurrenceRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOccurrenceRequestTests.java index 615abd244250..bab3a02a3d80 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOccurrenceRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOccurrenceRequestTests.java @@ -12,16 +12,16 @@ public final class CancelOccurrenceRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CancelOccurrenceRequest model = BinaryData.fromString("{\"resourceIds\":[\"smlmzqhoftrm\",\"equi\"]}") + CancelOccurrenceRequest model = BinaryData.fromString("{\"resourceIds\":[\"axibxujw\",\"hqwa\"]}") .toObject(CancelOccurrenceRequest.class); - Assertions.assertEquals("smlmzqhoftrm", model.resourceIds().get(0)); + Assertions.assertEquals("axibxujw", model.resourceIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CancelOccurrenceRequest model - = new CancelOccurrenceRequest().withResourceIds(Arrays.asList("smlmzqhoftrm", "equi")); + = new CancelOccurrenceRequest().withResourceIds(Arrays.asList("axibxujw", "hqwa")); model = BinaryData.fromObject(model).toObject(CancelOccurrenceRequest.class); - Assertions.assertEquals("smlmzqhoftrm", model.resourceIds().get(0)); + Assertions.assertEquals("axibxujw", model.resourceIds().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsRequestTests.java index a025c390a3c3..e2a478a0d8cc 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CancelOperationsRequestTests.java @@ -13,19 +13,19 @@ public final class CancelOperationsRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CancelOperationsRequest model - = BinaryData.fromString("{\"operationIds\":[\"f\",\"ohqkvpuvksgpls\",\"kn\"],\"correlationid\":\"n\"}") + = BinaryData.fromString("{\"operationIds\":[\"ilnerkujysvlejuv\",\"qawrlyxwj\"],\"correlationid\":\"cpr\"}") .toObject(CancelOperationsRequest.class); - Assertions.assertEquals("f", model.operationIds().get(0)); - Assertions.assertEquals("n", model.correlationid()); + Assertions.assertEquals("ilnerkujysvlejuv", model.operationIds().get(0)); + Assertions.assertEquals("cpr", model.correlationid()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CancelOperationsRequest model - = new CancelOperationsRequest().withOperationIds(Arrays.asList("f", "ohqkvpuvksgpls", "kn")) - .withCorrelationid("n"); + = new CancelOperationsRequest().withOperationIds(Arrays.asList("ilnerkujysvlejuv", "qawrlyxwj")) + .withCorrelationid("cpr"); model = BinaryData.fromObject(model).toObject(CancelOperationsRequest.class); - Assertions.assertEquals("f", model.operationIds().get(0)); - Assertions.assertEquals("n", model.correlationid()); + Assertions.assertEquals("ilnerkujysvlejuv", model.operationIds().get(0)); + Assertions.assertEquals("cpr", model.correlationid()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CapacityReservationProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CapacityReservationProfileTests.java deleted file mode 100644 index 4afaa0e96e75..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/CapacityReservationProfileTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.CapacityReservationProfile; -import org.junit.jupiter.api.Assertions; - -public final class CapacityReservationProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapacityReservationProfile model = BinaryData.fromString("{\"capacityReservationGroup\":{\"id\":\"vjz\"}}") - .toObject(CapacityReservationProfile.class); - Assertions.assertEquals("vjz", model.capacityReservationGroup().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapacityReservationProfile model - = new CapacityReservationProfile().withCapacityReservationGroup(new SubResource().withId("vjz")); - model = BinaryData.fromObject(model).toObject(CapacityReservationProfile.class); - Assertions.assertEquals("vjz", model.capacityReservationGroup().id()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DataDiskTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DataDiskTests.java deleted file mode 100644 index 086c5539413a..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DataDiskTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ApiEntityReference; -import com.azure.resourcemanager.computeschedule.models.CachingTypes; -import com.azure.resourcemanager.computeschedule.models.DataDisk; -import com.azure.resourcemanager.computeschedule.models.DiskCreateOptionTypes; -import com.azure.resourcemanager.computeschedule.models.DiskDeleteOptionTypes; -import com.azure.resourcemanager.computeschedule.models.DiskDetachOptionTypes; -import com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters; -import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; -import com.azure.resourcemanager.computeschedule.models.SecurityEncryptionTypes; -import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; -import com.azure.resourcemanager.computeschedule.models.VMDiskSecurityProfile; -import com.azure.resourcemanager.computeschedule.models.VirtualHardDisk; -import org.junit.jupiter.api.Assertions; - -public final class DataDiskTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataDisk model = BinaryData.fromString( - "{\"lun\":141642169,\"name\":\"jampmngnzscxaqw\",\"vhd\":{\"uri\":\"hcbonqvpkvlr\"},\"image\":{\"uri\":\"ea\"},\"caching\":\"None\",\"writeAcceleratorEnabled\":true,\"createOption\":\"Restore\",\"diskSizeGB\":10648381,\"managedDisk\":{\"storageAccountType\":\"Premium_LRS\",\"diskEncryptionSet\":{\"id\":\"y\"},\"securityProfile\":{\"securityEncryptionType\":\"VMGuestStateOnly\",\"diskEncryptionSet\":{\"id\":\"lwtgrhpdj\"}},\"id\":\"umasxazjpq\"},\"sourceResource\":{\"id\":\"ualhbxxhejj\"},\"toBeDetached\":false,\"detachOption\":\"ForceDetach\",\"deleteOption\":\"Detach\"}") - .toObject(DataDisk.class); - Assertions.assertEquals(141642169, model.lun()); - Assertions.assertEquals("jampmngnzscxaqw", model.name()); - Assertions.assertEquals("hcbonqvpkvlr", model.vhd().uri()); - Assertions.assertEquals("ea", model.image().uri()); - Assertions.assertEquals(CachingTypes.NONE, model.caching()); - Assertions.assertTrue(model.writeAcceleratorEnabled()); - Assertions.assertEquals(DiskCreateOptionTypes.RESTORE, model.createOption()); - Assertions.assertEquals(10648381, model.diskSizeGB()); - Assertions.assertEquals("umasxazjpq", model.managedDisk().id()); - Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.managedDisk().storageAccountType()); - Assertions.assertEquals("y", model.managedDisk().diskEncryptionSet().id()); - Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, - model.managedDisk().securityProfile().securityEncryptionType()); - Assertions.assertEquals("lwtgrhpdj", model.managedDisk().securityProfile().diskEncryptionSet().id()); - Assertions.assertEquals("ualhbxxhejj", model.sourceResource().id()); - Assertions.assertFalse(model.toBeDetached()); - Assertions.assertEquals(DiskDetachOptionTypes.FORCE_DETACH, model.detachOption()); - Assertions.assertEquals(DiskDeleteOptionTypes.DETACH, model.deleteOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataDisk model - = new DataDisk().withLun(141642169) - .withName("jampmngnzscxaqw") - .withVhd(new VirtualHardDisk().withUri("hcbonqvpkvlr")) - .withImage(new VirtualHardDisk().withUri("ea")) - .withCaching(CachingTypes.NONE) - .withWriteAcceleratorEnabled(true) - .withCreateOption(DiskCreateOptionTypes.RESTORE) - .withDiskSizeGB(10648381) - .withManagedDisk(new ManagedDiskParameters().withId("umasxazjpq") - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("y")) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("lwtgrhpdj")))) - .withSourceResource(new ApiEntityReference().withId("ualhbxxhejj")) - .withToBeDetached(false) - .withDetachOption(DiskDetachOptionTypes.FORCE_DETACH) - .withDeleteOption(DiskDeleteOptionTypes.DETACH); - model = BinaryData.fromObject(model).toObject(DataDisk.class); - Assertions.assertEquals(141642169, model.lun()); - Assertions.assertEquals("jampmngnzscxaqw", model.name()); - Assertions.assertEquals("hcbonqvpkvlr", model.vhd().uri()); - Assertions.assertEquals("ea", model.image().uri()); - Assertions.assertEquals(CachingTypes.NONE, model.caching()); - Assertions.assertTrue(model.writeAcceleratorEnabled()); - Assertions.assertEquals(DiskCreateOptionTypes.RESTORE, model.createOption()); - Assertions.assertEquals(10648381, model.diskSizeGB()); - Assertions.assertEquals("umasxazjpq", model.managedDisk().id()); - Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.managedDisk().storageAccountType()); - Assertions.assertEquals("y", model.managedDisk().diskEncryptionSet().id()); - Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, - model.managedDisk().securityProfile().securityEncryptionType()); - Assertions.assertEquals("lwtgrhpdj", model.managedDisk().securityProfile().diskEncryptionSet().id()); - Assertions.assertEquals("ualhbxxhejj", model.sourceResource().id()); - Assertions.assertFalse(model.toBeDetached()); - Assertions.assertEquals(DiskDetachOptionTypes.FORCE_DETACH, model.detachOption()); - Assertions.assertEquals(DiskDeleteOptionTypes.DETACH, model.deleteOption()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DelayRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DelayRequestTests.java index e3c4e09271e8..4258438e244b 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DelayRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DelayRequestTests.java @@ -13,19 +13,18 @@ public final class DelayRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DelayRequest model - = BinaryData.fromString("{\"delay\":\"2021-01-22T23:27:50Z\",\"resourceIds\":[\"kvtvsexso\"]}") - .toObject(DelayRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T23:27:50Z"), model.delay()); - Assertions.assertEquals("kvtvsexso", model.resourceIds().get(0)); + DelayRequest model = BinaryData.fromString("{\"delay\":\"2021-10-10T15:46:25Z\",\"resourceIds\":[\"isk\"]}") + .toObject(DelayRequest.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T15:46:25Z"), model.delay()); + Assertions.assertEquals("isk", model.resourceIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DelayRequest model = new DelayRequest().withDelay(OffsetDateTime.parse("2021-01-22T23:27:50Z")) - .withResourceIds(Arrays.asList("kvtvsexso")); + DelayRequest model = new DelayRequest().withDelay(OffsetDateTime.parse("2021-10-10T15:46:25Z")) + .withResourceIds(Arrays.asList("isk")); model = BinaryData.fromObject(model).toObject(DelayRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T23:27:50Z"), model.delay()); - Assertions.assertEquals("kvtvsexso", model.resourceIds().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T15:46:25Z"), model.delay()); + Assertions.assertEquals("isk", model.resourceIds().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiagnosticsProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiagnosticsProfileTests.java deleted file mode 100644 index bf5490552e6f..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiagnosticsProfileTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.BootDiagnostics; -import com.azure.resourcemanager.computeschedule.models.DiagnosticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsProfile model - = BinaryData.fromString("{\"bootDiagnostics\":{\"enabled\":true,\"storageUri\":\"obl\"}}") - .toObject(DiagnosticsProfile.class); - Assertions.assertTrue(model.bootDiagnostics().enabled()); - Assertions.assertEquals("obl", model.bootDiagnostics().storageUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsProfile model = new DiagnosticsProfile() - .withBootDiagnostics(new BootDiagnostics().withEnabled(true).withStorageUri("obl")); - model = BinaryData.fromObject(model).toObject(DiagnosticsProfile.class); - Assertions.assertTrue(model.bootDiagnostics().enabled()); - Assertions.assertEquals("obl", model.bootDiagnostics().storageUri()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiffDiskSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiffDiskSettingsTests.java deleted file mode 100644 index 134df9be6711..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiffDiskSettingsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DiffDiskOptions; -import com.azure.resourcemanager.computeschedule.models.DiffDiskPlacement; -import com.azure.resourcemanager.computeschedule.models.DiffDiskSettings; -import org.junit.jupiter.api.Assertions; - -public final class DiffDiskSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiffDiskSettings model = BinaryData.fromString("{\"option\":\"Local\",\"placement\":\"NvmeDisk\"}") - .toObject(DiffDiskSettings.class); - Assertions.assertEquals(DiffDiskOptions.LOCAL, model.option()); - Assertions.assertEquals(DiffDiskPlacement.NVME_DISK, model.placement()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiffDiskSettings model - = new DiffDiskSettings().withOption(DiffDiskOptions.LOCAL).withPlacement(DiffDiskPlacement.NVME_DISK); - model = BinaryData.fromObject(model).toObject(DiffDiskSettings.class); - Assertions.assertEquals(DiffDiskOptions.LOCAL, model.option()); - Assertions.assertEquals(DiffDiskPlacement.NVME_DISK, model.placement()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiskEncryptionSetParametersTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiskEncryptionSetParametersTests.java deleted file mode 100644 index 03f33e30917b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/DiskEncryptionSetParametersTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters; -import org.junit.jupiter.api.Assertions; - -public final class DiskEncryptionSetParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskEncryptionSetParameters model - = BinaryData.fromString("{\"id\":\"gtzxdpn\"}").toObject(DiskEncryptionSetParameters.class); - Assertions.assertEquals("gtzxdpn", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskEncryptionSetParameters model = new DiskEncryptionSetParameters().withId("gtzxdpn"); - model = BinaryData.fromObject(model).toObject(DiskEncryptionSetParameters.class); - Assertions.assertEquals("gtzxdpn", model.id()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EncryptionIdentityTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EncryptionIdentityTests.java deleted file mode 100644 index ac20601416e3..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EncryptionIdentityTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.EncryptionIdentity; -import org.junit.jupiter.api.Assertions; - -public final class EncryptionIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EncryptionIdentity model = BinaryData.fromString("{\"userAssignedIdentityResourceId\":\"dxxiv\"}") - .toObject(EncryptionIdentity.class); - Assertions.assertEquals("dxxiv", model.userAssignedIdentityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EncryptionIdentity model = new EncryptionIdentity().withUserAssignedIdentityResourceId("dxxiv"); - model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); - Assertions.assertEquals("dxxiv", model.userAssignedIdentityResourceId()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EventGridAndResourceGraphTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EventGridAndResourceGraphTests.java deleted file mode 100644 index 3c4f6103c1ab..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/EventGridAndResourceGraphTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.EventGridAndResourceGraph; -import org.junit.jupiter.api.Assertions; - -public final class EventGridAndResourceGraphTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventGridAndResourceGraph model - = BinaryData.fromString("{\"enable\":false,\"scheduledEventsApiVersion\":\"ddtocjjxhvp\"}") - .toObject(EventGridAndResourceGraph.class); - Assertions.assertFalse(model.enable()); - Assertions.assertEquals("ddtocjjxhvp", model.scheduledEventsApiVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventGridAndResourceGraph model - = new EventGridAndResourceGraph().withEnable(false).withScheduledEventsApiVersion("ddtocjjxhvp"); - model = BinaryData.fromObject(model).toObject(EventGridAndResourceGraph.class); - Assertions.assertFalse(model.enable()); - Assertions.assertEquals("ddtocjjxhvp", model.scheduledEventsApiVersion()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteCreateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteCreateRequestTests.java new file mode 100644 index 000000000000..0f2bf06c0d7d --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteCreateRequestTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ExecuteCreateRequest; +import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; +import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; +import com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload; +import com.azure.resourcemanager.computeschedule.models.RetryPolicy; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ExecuteCreateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExecuteCreateRequest model = BinaryData.fromString( + "{\"resourceConfigParameters\":{\"baseProfile\":{},\"resourceOverrides\":[{},{},{}],\"resourceCount\":488407258,\"resourcePrefix\":\"dgeablgphu\"},\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":1906017395,\"retryWindowInMinutes\":1237091800}},\"correlationid\":\"zwyiftyhxhur\"}") + .toObject(ExecuteCreateRequest.class); + Assertions.assertEquals(488407258, model.resourceConfigParameters().resourceCount()); + Assertions.assertEquals("dgeablgphu", model.resourceConfigParameters().resourcePrefix()); + Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); + Assertions.assertEquals(1906017395, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1237091800, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("zwyiftyhxhur", model.correlationid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExecuteCreateRequest model = new ExecuteCreateRequest() + .withResourceConfigParameters(new ResourceProvisionPayload().withBaseProfile(mapOf()) + .withResourceOverrides(Arrays.asList(mapOf(), mapOf(), mapOf())) + .withResourceCount(488407258) + .withResourcePrefix("dgeablgphu")) + .withExecutionParameters(new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(1906017395).withRetryWindowInMinutes(1237091800))) + .withCorrelationid("zwyiftyhxhur"); + model = BinaryData.fromObject(model).toObject(ExecuteCreateRequest.class); + Assertions.assertEquals(488407258, model.resourceConfigParameters().resourceCount()); + Assertions.assertEquals("dgeablgphu", model.resourceConfigParameters().resourcePrefix()); + Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); + Assertions.assertEquals(1906017395, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1237091800, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("zwyiftyhxhur", model.correlationid()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateRequestTests.java index 01ad6516ebf8..199c1a4c670a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeallocateRequestTests.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -18,36 +17,28 @@ public final class ExecuteDeallocateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExecuteDeallocateRequest model = BinaryData.fromString( - "{\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":775754231,\"retryWindowInMinutes\":1098993569,\"onFailureAction\":\"Start\"}},\"resources\":{\"ids\":[\"gxsabkyq\",\"uujitcjc\"]},\"correlationid\":\"dzevndhkrw\"}") + "{\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":2070892597,\"retryWindowInMinutes\":412158498}},\"resources\":{\"ids\":[\"sntnbybkzgcw\",\"wclxxwrl\",\"douskcqvkocrcjdk\",\"tnhxbn\"]},\"correlationid\":\"biksq\"}") .toObject(ExecuteDeallocateRequest.class); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(775754231, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1098993569, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.START, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("gxsabkyq", model.resources().ids().get(0)); - Assertions.assertEquals("dzevndhkrw", model.correlationid()); + Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); + Assertions.assertEquals(2070892597, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(412158498, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("sntnbybkzgcw", model.resources().ids().get(0)); + Assertions.assertEquals("biksq", model.correlationid()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExecuteDeallocateRequest model = new ExecuteDeallocateRequest() - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(775754231) - .withRetryWindowInMinutes(1098993569) - .withOnFailureAction(ResourceOperationType.START))) - .withResources(new Resources().withIds(Arrays.asList("gxsabkyq", "uujitcjc"))) - .withCorrelationid("dzevndhkrw"); + .withExecutionParameters(new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(2070892597).withRetryWindowInMinutes(412158498))) + .withResources( + new Resources().withIds(Arrays.asList("sntnbybkzgcw", "wclxxwrl", "douskcqvkocrcjdk", "tnhxbn"))) + .withCorrelationid("biksq"); model = BinaryData.fromObject(model).toObject(ExecuteDeallocateRequest.class); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(775754231, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1098993569, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.START, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("gxsabkyq", model.resources().ids().get(0)); - Assertions.assertEquals("dzevndhkrw", model.correlationid()); + Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); + Assertions.assertEquals(2070892597, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(412158498, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("sntnbybkzgcw", model.resources().ids().get(0)); + Assertions.assertEquals("biksq", model.correlationid()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteRequestTests.java index 78485a9aac33..570afa01ca1e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteDeleteRequestTests.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.computeschedule.models.ExecuteDeleteRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -18,36 +17,33 @@ public final class ExecuteDeleteRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExecuteDeleteRequest model = BinaryData.fromString( - "{\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":549865384,\"retryWindowInMinutes\":1223650177,\"onFailureAction\":\"Hibernate\"}},\"resources\":{\"ids\":[\"pqwcciuqgbdbutau\"]},\"correlationid\":\"btkuwhh\",\"forceDeletion\":true}") + "{\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":265485,\"retryWindowInMinutes\":1581994668}},\"resources\":{\"ids\":[\"gibma\",\"gakeqsr\",\"yb\"]},\"correlationid\":\"qedqytbciqfoufl\",\"forceDeletion\":true}") .toObject(ExecuteDeleteRequest.class); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(549865384, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1223650177, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.HIBERNATE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("pqwcciuqgbdbutau", model.resources().ids().get(0)); - Assertions.assertEquals("btkuwhh", model.correlationid()); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(265485, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1581994668, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("gibma", model.resources().ids().get(0)); + Assertions.assertEquals("qedqytbciqfoufl", model.correlationid()); Assertions.assertTrue(model.forceDeletion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExecuteDeleteRequest model = new ExecuteDeleteRequest() - .withExecutionParameters(new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(549865384) - .withRetryWindowInMinutes(1223650177) - .withOnFailureAction(ResourceOperationType.HIBERNATE))) - .withResources(new Resources().withIds(Arrays.asList("pqwcciuqgbdbutau"))) - .withCorrelationid("btkuwhh") + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) + .withRetryPolicy(new RetryPolicy().withRetryCount(265485).withRetryWindowInMinutes(1581994668))) + .withResources(new Resources().withIds(Arrays.asList("gibma", "gakeqsr", "yb"))) + .withCorrelationid("qedqytbciqfoufl") .withForceDeletion(true); model = BinaryData.fromObject(model).toObject(ExecuteDeleteRequest.class); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(549865384, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1223650177, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.HIBERNATE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("pqwcciuqgbdbutau", model.resources().ids().get(0)); - Assertions.assertEquals("btkuwhh", model.correlationid()); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(265485, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1581994668, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("gibma", model.resources().ids().get(0)); + Assertions.assertEquals("qedqytbciqfoufl", model.correlationid()); Assertions.assertTrue(model.forceDeletion()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateRequestTests.java index dce0cc621395..fca7242ef7bf 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteHibernateRequestTests.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -18,36 +17,30 @@ public final class ExecuteHibernateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExecuteHibernateRequest model = BinaryData.fromString( - "{\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":681393134,\"retryWindowInMinutes\":264024813,\"onFailureAction\":\"Hibernate\"}},\"resources\":{\"ids\":[\"wrwjfeu\",\"nhutjeltmrldhugj\"]},\"correlationid\":\"zdatqxhocdg\"}") + "{\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1356626713,\"retryWindowInMinutes\":1437691312}},\"resources\":{\"ids\":[\"p\",\"wnzlljfmppeeb\",\"mgxsab\"]},\"correlationid\":\"yqduujit\"}") .toObject(ExecuteHibernateRequest.class); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(681393134, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(264024813, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.HIBERNATE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("wrwjfeu", model.resources().ids().get(0)); - Assertions.assertEquals("zdatqxhocdg", model.correlationid()); + Assertions.assertEquals(1356626713, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1437691312, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("p", model.resources().ids().get(0)); + Assertions.assertEquals("yqduujit", model.correlationid()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExecuteHibernateRequest model = new ExecuteHibernateRequest() .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) - .withRetryPolicy(new RetryPolicy().withRetryCount(681393134) - .withRetryWindowInMinutes(264024813) - .withOnFailureAction(ResourceOperationType.HIBERNATE))) - .withResources(new Resources().withIds(Arrays.asList("wrwjfeu", "nhutjeltmrldhugj"))) - .withCorrelationid("zdatqxhocdg"); + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(1356626713).withRetryWindowInMinutes(1437691312))) + .withResources(new Resources().withIds(Arrays.asList("p", "wnzlljfmppeeb", "mgxsab"))) + .withCorrelationid("yqduujit"); model = BinaryData.fromObject(model).toObject(ExecuteHibernateRequest.class); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(681393134, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(264024813, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.HIBERNATE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("wrwjfeu", model.resources().ids().get(0)); - Assertions.assertEquals("zdatqxhocdg", model.correlationid()); + Assertions.assertEquals(1356626713, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1437691312, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("p", model.resources().ids().get(0)); + Assertions.assertEquals("yqduujit", model.correlationid()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartRequestTests.java index 6dd1ba4d5159..38cf2bf6cc7e 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecuteStartRequestTests.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import java.util.Arrays; @@ -18,37 +17,27 @@ public final class ExecuteStartRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExecuteStartRequest model = BinaryData.fromString( - "{\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":950218840,\"retryWindowInMinutes\":1780121294,\"onFailureAction\":\"Hibernate\"}},\"resources\":{\"ids\":[\"ndv\",\"aozwyiftyhxhu\",\"okftyxolniwpwcuk\",\"fkgiawxk\"]},\"correlationid\":\"ryplwckbasyypn\"}") + "{\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":2117023774,\"retryWindowInMinutes\":1003107077}},\"resources\":{\"ids\":[\"dhkrwpdappdsbdk\",\"wrwjfeu\"]},\"correlationid\":\"nhutjeltmrldhugj\"}") .toObject(ExecuteStartRequest.class); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(950218840, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1780121294, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.HIBERNATE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("ndv", model.resources().ids().get(0)); - Assertions.assertEquals("ryplwckbasyypn", model.correlationid()); + Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); + Assertions.assertEquals(2117023774, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1003107077, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("dhkrwpdappdsbdk", model.resources().ids().get(0)); + Assertions.assertEquals("nhutjeltmrldhugj", model.correlationid()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExecuteStartRequest model = new ExecuteStartRequest() - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(950218840) - .withRetryWindowInMinutes(1780121294) - .withOnFailureAction(ResourceOperationType.HIBERNATE))) - .withResources( - new Resources().withIds(Arrays.asList("ndv", "aozwyiftyhxhu", "okftyxolniwpwcuk", "fkgiawxk"))) - .withCorrelationid("ryplwckbasyypn"); + .withExecutionParameters(new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(2117023774).withRetryWindowInMinutes(1003107077))) + .withResources(new Resources().withIds(Arrays.asList("dhkrwpdappdsbdk", "wrwjfeu"))) + .withCorrelationid("nhutjeltmrldhugj"); model = BinaryData.fromObject(model).toObject(ExecuteStartRequest.class); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, - model.executionParameters().optimizationPreference()); - Assertions.assertEquals(950218840, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1780121294, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.HIBERNATE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("ndv", model.resources().ids().get(0)); - Assertions.assertEquals("ryplwckbasyypn", model.correlationid()); + Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); + Assertions.assertEquals(2117023774, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1003107077, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("dhkrwpdappdsbdk", model.resources().ids().get(0)); + Assertions.assertEquals("nhutjeltmrldhugj", model.correlationid()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecutionParametersTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecutionParametersTests.java index c3908051abbd..a92d1d32cc52 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecutionParametersTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExecutionParametersTests.java @@ -7,7 +7,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import org.junit.jupiter.api.Assertions; @@ -15,25 +14,21 @@ public final class ExecutionParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExecutionParameters model = BinaryData.fromString( - "{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1753847734,\"retryWindowInMinutes\":768699380,\"onFailureAction\":\"Start\"}}") + "{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1742906904,\"retryWindowInMinutes\":1574574303}}") .toObject(ExecutionParameters.class); Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.optimizationPreference()); - Assertions.assertEquals(1753847734, model.retryPolicy().retryCount()); - Assertions.assertEquals(768699380, model.retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.START, model.retryPolicy().onFailureAction()); + Assertions.assertEquals(1742906904, model.retryPolicy().retryCount()); + Assertions.assertEquals(1574574303, model.retryPolicy().retryWindowInMinutes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExecutionParameters model = new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) - .withRetryPolicy(new RetryPolicy().withRetryCount(1753847734) - .withRetryWindowInMinutes(768699380) - .withOnFailureAction(ResourceOperationType.START)); + .withRetryPolicy(new RetryPolicy().withRetryCount(1742906904).withRetryWindowInMinutes(1574574303)); model = BinaryData.fromObject(model).toObject(ExecutionParameters.class); Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.optimizationPreference()); - Assertions.assertEquals(1753847734, model.retryPolicy().retryCount()); - Assertions.assertEquals(768699380, model.retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.START, model.retryPolicy().onFailureAction()); + Assertions.assertEquals(1742906904, model.retryPolicy().retryCount()); + Assertions.assertEquals(1574574303, model.retryPolicy().retryWindowInMinutes()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExtendedLocationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExtendedLocationTests.java deleted file mode 100644 index cd5e66b05d27..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ExtendedLocation; -import com.azure.resourcemanager.computeschedule.models.ExtendedLocationType; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"name\":\"hurzafblj\",\"type\":\"CustomLocation\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("hurzafblj", model.name()); - Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model - = new ExtendedLocation().withName("hurzafblj").withType(ExtendedLocationType.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("hurzafblj", model.name()); - Assertions.assertEquals(ExtendedLocationType.CUSTOM_LOCATION, model.type()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/FlexPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/FlexPropertiesTests.java deleted file mode 100644 index 248e03f2e03a..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/FlexPropertiesTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.AllocationStrategy; -import com.azure.resourcemanager.computeschedule.models.DistributionStrategy; -import com.azure.resourcemanager.computeschedule.models.FlexProperties; -import com.azure.resourcemanager.computeschedule.models.OsType; -import com.azure.resourcemanager.computeschedule.models.PriorityProfile; -import com.azure.resourcemanager.computeschedule.models.PriorityType; -import com.azure.resourcemanager.computeschedule.models.VmSizeProfile; -import com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy; -import com.azure.resourcemanager.computeschedule.models.ZonePreference; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FlexPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FlexProperties model = BinaryData.fromString( - "{\"vmSizeProfiles\":[{\"name\":\"hqcrailvpnpp\",\"rank\":1159921712},{\"name\":\"lrwdmhdlxyj\",\"rank\":733980046}],\"osType\":\"Linux\",\"priorityProfile\":{\"type\":\"Regular\",\"allocationStrategy\":\"CapacityOptimized\"},\"zoneAllocationPolicy\":{\"distributionStrategy\":\"StrictBalanced\",\"zonePreferences\":[{\"zone\":\"wqapnedgfbcvk\",\"rank\":151041842}]}}") - .toObject(FlexProperties.class); - Assertions.assertEquals("hqcrailvpnpp", model.vmSizeProfiles().get(0).name()); - Assertions.assertEquals(1159921712, model.vmSizeProfiles().get(0).rank()); - Assertions.assertEquals(OsType.LINUX, model.osType()); - Assertions.assertEquals(PriorityType.REGULAR, model.priorityProfile().type()); - Assertions.assertEquals(AllocationStrategy.CAPACITY_OPTIMIZED, model.priorityProfile().allocationStrategy()); - Assertions.assertEquals(DistributionStrategy.STRICT_BALANCED, - model.zoneAllocationPolicy().distributionStrategy()); - Assertions.assertEquals("wqapnedgfbcvk", model.zoneAllocationPolicy().zonePreferences().get(0).zone()); - Assertions.assertEquals(151041842, model.zoneAllocationPolicy().zonePreferences().get(0).rank()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlexProperties model = new FlexProperties() - .withVmSizeProfiles(Arrays.asList(new VmSizeProfile().withName("hqcrailvpnpp").withRank(1159921712), - new VmSizeProfile().withName("lrwdmhdlxyj").withRank(733980046))) - .withOsType(OsType.LINUX) - .withPriorityProfile(new PriorityProfile().withType(PriorityType.REGULAR) - .withAllocationStrategy(AllocationStrategy.CAPACITY_OPTIMIZED)) - .withZoneAllocationPolicy( - new ZoneAllocationPolicy().withDistributionStrategy(DistributionStrategy.STRICT_BALANCED) - .withZonePreferences( - Arrays.asList(new ZonePreference().withZone("wqapnedgfbcvk").withRank(151041842)))); - model = BinaryData.fromObject(model).toObject(FlexProperties.class); - Assertions.assertEquals("hqcrailvpnpp", model.vmSizeProfiles().get(0).name()); - Assertions.assertEquals(1159921712, model.vmSizeProfiles().get(0).rank()); - Assertions.assertEquals(OsType.LINUX, model.osType()); - Assertions.assertEquals(PriorityType.REGULAR, model.priorityProfile().type()); - Assertions.assertEquals(AllocationStrategy.CAPACITY_OPTIMIZED, model.priorityProfile().allocationStrategy()); - Assertions.assertEquals(DistributionStrategy.STRICT_BALANCED, - model.zoneAllocationPolicy().distributionStrategy()); - Assertions.assertEquals("wqapnedgfbcvk", model.zoneAllocationPolicy().zonePreferences().get(0).zone()); - Assertions.assertEquals(151041842, model.zoneAllocationPolicy().zonePreferences().get(0).rank()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsRequestTests.java index fb98c5952bed..22d51db4bb26 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationErrorsRequestTests.java @@ -12,16 +12,17 @@ public final class GetOperationErrorsRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GetOperationErrorsRequest model = BinaryData.fromString("{\"operationIds\":[\"pxodlqiyntorzih\"]}") - .toObject(GetOperationErrorsRequest.class); - Assertions.assertEquals("pxodlqiyntorzih", model.operationIds().get(0)); + GetOperationErrorsRequest model + = BinaryData.fromString("{\"operationIds\":[\"nruj\",\"guhmuouqfpr\",\"zw\",\"nguitnwuizgazxu\"]}") + .toObject(GetOperationErrorsRequest.class); + Assertions.assertEquals("nruj", model.operationIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GetOperationErrorsRequest model - = new GetOperationErrorsRequest().withOperationIds(Arrays.asList("pxodlqiyntorzih")); + GetOperationErrorsRequest model = new GetOperationErrorsRequest() + .withOperationIds(Arrays.asList("nruj", "guhmuouqfpr", "zw", "nguitnwuizgazxu")); model = BinaryData.fromObject(model).toObject(GetOperationErrorsRequest.class); - Assertions.assertEquals("pxodlqiyntorzih", model.operationIds().get(0)); + Assertions.assertEquals("nruj", model.operationIds().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusRequestTests.java index 8bc6d64c68e7..3cc1e0a61fd1 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/GetOperationStatusRequestTests.java @@ -13,19 +13,19 @@ public final class GetOperationStatusRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GetOperationStatusRequest model = BinaryData - .fromString("{\"operationIds\":[\"yrs\",\"dsytgadgvr\",\"ea\",\"neqn\"],\"correlationid\":\"arrwlquu\"}") + .fromString("{\"operationIds\":[\"mbmbexppbh\",\"q\",\"rolfpfp\"],\"correlationid\":\"algbquxigjyjg\"}") .toObject(GetOperationStatusRequest.class); - Assertions.assertEquals("yrs", model.operationIds().get(0)); - Assertions.assertEquals("arrwlquu", model.correlationid()); + Assertions.assertEquals("mbmbexppbh", model.operationIds().get(0)); + Assertions.assertEquals("algbquxigjyjg", model.correlationid()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { GetOperationStatusRequest model - = new GetOperationStatusRequest().withOperationIds(Arrays.asList("yrs", "dsytgadgvr", "ea", "neqn")) - .withCorrelationid("arrwlquu"); + = new GetOperationStatusRequest().withOperationIds(Arrays.asList("mbmbexppbh", "q", "rolfpfp")) + .withCorrelationid("algbquxigjyjg"); model = BinaryData.fromObject(model).toObject(GetOperationStatusRequest.class); - Assertions.assertEquals("yrs", model.operationIds().get(0)); - Assertions.assertEquals("arrwlquu", model.correlationid()); + Assertions.assertEquals("mbmbexppbh", model.operationIds().get(0)); + Assertions.assertEquals("algbquxigjyjg", model.correlationid()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HardwareProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HardwareProfileTests.java deleted file mode 100644 index c4e4da408d5d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HardwareProfileTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.HardwareProfile; -import com.azure.resourcemanager.computeschedule.models.VmSizeProperties; -import org.junit.jupiter.api.Assertions; - -public final class HardwareProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HardwareProfile model = BinaryData.fromString( - "{\"vmSize\":\"bunrmfqjhhk\",\"vmSizeProperties\":{\"vCpusAvailable\":1461039431,\"vCpusPerCore\":1880019175}}") - .toObject(HardwareProfile.class); - Assertions.assertEquals("bunrmfqjhhk", model.vmSize()); - Assertions.assertEquals(1461039431, model.vmSizeProperties().vCpusAvailable()); - Assertions.assertEquals(1880019175, model.vmSizeProperties().vCpusPerCore()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HardwareProfile model = new HardwareProfile().withVmSize("bunrmfqjhhk") - .withVmSizeProperties(new VmSizeProperties().withVCpusAvailable(1461039431).withVCpusPerCore(1880019175)); - model = BinaryData.fromObject(model).toObject(HardwareProfile.class); - Assertions.assertEquals("bunrmfqjhhk", model.vmSize()); - Assertions.assertEquals(1461039431, model.vmSizeProperties().vCpusAvailable()); - Assertions.assertEquals(1880019175, model.vmSizeProperties().vCpusPerCore()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HostEndpointSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HostEndpointSettingsTests.java deleted file mode 100644 index 0f2ae95db1a2..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/HostEndpointSettingsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.HostEndpointSettings; -import com.azure.resourcemanager.computeschedule.models.Modes; -import org.junit.jupiter.api.Assertions; - -public final class HostEndpointSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HostEndpointSettings model - = BinaryData.fromString("{\"mode\":\"Audit\",\"inVMAccessControlProfileReferenceId\":\"oqmcbxvwvxyslq\"}") - .toObject(HostEndpointSettings.class); - Assertions.assertEquals(Modes.AUDIT, model.mode()); - Assertions.assertEquals("oqmcbxvwvxyslq", model.inVMAccessControlProfileReferenceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HostEndpointSettings model = new HostEndpointSettings().withMode(Modes.AUDIT) - .withInVMAccessControlProfileReferenceId("oqmcbxvwvxyslq"); - model = BinaryData.fromObject(model).toObject(HostEndpointSettings.class); - Assertions.assertEquals(Modes.AUDIT, model.mode()); - Assertions.assertEquals("oqmcbxvwvxyslq", model.inVMAccessControlProfileReferenceId()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ImageReferenceTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ImageReferenceTests.java deleted file mode 100644 index d6736dde0991..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ImageReferenceTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ImageReference; -import org.junit.jupiter.api.Assertions; - -public final class ImageReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageReference model = BinaryData.fromString( - "{\"publisher\":\"gdtopbobjogh\",\"offer\":\"w\",\"sku\":\"m\",\"version\":\"hrzayvvtpgvdf\",\"sharedGalleryImageId\":\"otkftutqxlngx\",\"communityGalleryImageId\":\"fgugnxkrxdqmid\",\"id\":\"hzrvqd\"}") - .toObject(ImageReference.class); - Assertions.assertEquals("hzrvqd", model.id()); - Assertions.assertEquals("gdtopbobjogh", model.publisher()); - Assertions.assertEquals("w", model.offer()); - Assertions.assertEquals("m", model.sku()); - Assertions.assertEquals("hrzayvvtpgvdf", model.version()); - Assertions.assertEquals("otkftutqxlngx", model.sharedGalleryImageId()); - Assertions.assertEquals("fgugnxkrxdqmid", model.communityGalleryImageId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageReference model = new ImageReference().withId("hzrvqd") - .withPublisher("gdtopbobjogh") - .withOffer("w") - .withSku("m") - .withVersion("hrzayvvtpgvdf") - .withSharedGalleryImageId("otkftutqxlngx") - .withCommunityGalleryImageId("fgugnxkrxdqmid"); - model = BinaryData.fromObject(model).toObject(ImageReference.class); - Assertions.assertEquals("hzrvqd", model.id()); - Assertions.assertEquals("gdtopbobjogh", model.publisher()); - Assertions.assertEquals("w", model.offer()); - Assertions.assertEquals("m", model.sku()); - Assertions.assertEquals("hrzayvvtpgvdf", model.version()); - Assertions.assertEquals("otkftutqxlngx", model.sharedGalleryImageId()); - Assertions.assertEquals("fgugnxkrxdqmid", model.communityGalleryImageId()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxPatchSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxPatchSettingsTests.java deleted file mode 100644 index 2c3c9c6baeea..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxPatchSettingsTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchAssessmentMode; -import com.azure.resourcemanager.computeschedule.models.LinuxPatchSettings; -import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchMode; -import org.junit.jupiter.api.Assertions; - -public final class LinuxPatchSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinuxPatchSettings model = BinaryData.fromString( - "{\"patchMode\":\"ImageDefault\",\"assessmentMode\":\"ImageDefault\",\"automaticByPlatformSettings\":{\"rebootSetting\":\"Unknown\",\"bypassPlatformSafetyChecksOnUserSchedule\":true}}") - .toObject(LinuxPatchSettings.class); - Assertions.assertEquals(LinuxVMGuestPatchMode.IMAGE_DEFAULT, model.patchMode()); - Assertions.assertEquals(LinuxPatchAssessmentMode.IMAGE_DEFAULT, model.assessmentMode()); - Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN, - model.automaticByPlatformSettings().rebootSetting()); - Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinuxPatchSettings model = new LinuxPatchSettings().withPatchMode(LinuxVMGuestPatchMode.IMAGE_DEFAULT) - .withAssessmentMode(LinuxPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings(new LinuxVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) - .withBypassPlatformSafetyChecksOnUserSchedule(true)); - model = BinaryData.fromObject(model).toObject(LinuxPatchSettings.class); - Assertions.assertEquals(LinuxVMGuestPatchMode.IMAGE_DEFAULT, model.patchMode()); - Assertions.assertEquals(LinuxPatchAssessmentMode.IMAGE_DEFAULT, model.assessmentMode()); - Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN, - model.automaticByPlatformSettings().rebootSetting()); - Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java deleted file mode 100644 index 5affa4968678..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformSettings; -import org.junit.jupiter.api.Assertions; - -public final class LinuxVMGuestPatchAutomaticByPlatformSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinuxVMGuestPatchAutomaticByPlatformSettings model = BinaryData - .fromString("{\"rebootSetting\":\"IfRequired\",\"bypassPlatformSafetyChecksOnUserSchedule\":false}") - .toObject(LinuxVMGuestPatchAutomaticByPlatformSettings.class); - Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.IF_REQUIRED, model.rebootSetting()); - Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinuxVMGuestPatchAutomaticByPlatformSettings model = new LinuxVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.IF_REQUIRED) - .withBypassPlatformSafetyChecksOnUserSchedule(false); - model = BinaryData.fromObject(model).toObject(LinuxVMGuestPatchAutomaticByPlatformSettings.class); - Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.IF_REQUIRED, model.rebootSetting()); - Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ManagedDiskParametersTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ManagedDiskParametersTests.java deleted file mode 100644 index b721192c7a88..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ManagedDiskParametersTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters; -import com.azure.resourcemanager.computeschedule.models.ManagedDiskParameters; -import com.azure.resourcemanager.computeschedule.models.SecurityEncryptionTypes; -import com.azure.resourcemanager.computeschedule.models.StorageAccountTypes; -import com.azure.resourcemanager.computeschedule.models.VMDiskSecurityProfile; -import org.junit.jupiter.api.Assertions; - -public final class ManagedDiskParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedDiskParameters model = BinaryData.fromString( - "{\"storageAccountType\":\"Premium_LRS\",\"diskEncryptionSet\":{\"id\":\"sxlzevgbmqj\"},\"securityProfile\":{\"securityEncryptionType\":\"NonPersistedTPM\",\"diskEncryptionSet\":{\"id\":\"mivkwlzuvcc\"}},\"id\":\"nfnbacfionlebxe\"}") - .toObject(ManagedDiskParameters.class); - Assertions.assertEquals("nfnbacfionlebxe", model.id()); - Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.storageAccountType()); - Assertions.assertEquals("sxlzevgbmqj", model.diskEncryptionSet().id()); - Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, - model.securityProfile().securityEncryptionType()); - Assertions.assertEquals("mivkwlzuvcc", model.securityProfile().diskEncryptionSet().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedDiskParameters model = new ManagedDiskParameters().withId("nfnbacfionlebxe") - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("sxlzevgbmqj")) - .withSecurityProfile( - new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionTypes.NON_PERSISTED_TPM) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("mivkwlzuvcc"))); - model = BinaryData.fromObject(model).toObject(ManagedDiskParameters.class); - Assertions.assertEquals("nfnbacfionlebxe", model.id()); - Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.storageAccountType()); - Assertions.assertEquals("sxlzevgbmqj", model.diskEncryptionSet().id()); - Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, - model.securityProfile().securityEncryptionType()); - Assertions.assertEquals("mivkwlzuvcc", model.securityProfile().diskEncryptionSet().id()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferencePropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferencePropertiesTests.java deleted file mode 100644 index 6fa9d7e33f5f..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferencePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfaceReferencePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterfaceReferenceProperties model - = BinaryData.fromString("{\"primary\":false,\"deleteOption\":\"Delete\"}") - .toObject(NetworkInterfaceReferenceProperties.class); - Assertions.assertFalse(model.primary()); - Assertions.assertEquals(DeleteOptions.DELETE, model.deleteOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfaceReferenceProperties model - = new NetworkInterfaceReferenceProperties().withPrimary(false).withDeleteOption(DeleteOptions.DELETE); - model = BinaryData.fromObject(model).toObject(NetworkInterfaceReferenceProperties.class); - Assertions.assertFalse(model.primary()); - Assertions.assertEquals(DeleteOptions.DELETE, model.deleteOption()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferenceTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferenceTests.java deleted file mode 100644 index 57aec2e430e0..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkInterfaceReferenceTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfaceReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterfaceReference model - = BinaryData.fromString("{\"properties\":{\"primary\":true,\"deleteOption\":\"Detach\"},\"id\":\"hl\"}") - .toObject(NetworkInterfaceReference.class); - Assertions.assertEquals("hl", model.id()); - Assertions.assertTrue(model.properties().primary()); - Assertions.assertEquals(DeleteOptions.DETACH, model.properties().deleteOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfaceReference model = new NetworkInterfaceReference().withId("hl") - .withProperties( - new NetworkInterfaceReferenceProperties().withPrimary(true).withDeleteOption(DeleteOptions.DETACH)); - model = BinaryData.fromObject(model).toObject(NetworkInterfaceReference.class); - Assertions.assertEquals("hl", model.id()); - Assertions.assertTrue(model.properties().primary()); - Assertions.assertEquals(DeleteOptions.DETACH, model.properties().deleteOption()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkProfileTests.java deleted file mode 100644 index 418d65e9b29e..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NetworkProfileTests.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.NetworkApiVersion; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliaryMode; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliarySku; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReference; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceReferenceProperties; -import com.azure.resourcemanager.computeschedule.models.NetworkProfile; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkProfile model = BinaryData.fromString( - "{\"networkInterfaces\":[{\"properties\":{\"primary\":false,\"deleteOption\":\"Delete\"},\"id\":\"rm\"},{\"properties\":{\"primary\":false,\"deleteOption\":\"Delete\"},\"id\":\"kpnpulexxbczwtr\"}],\"networkApiVersion\":\"2020-11-01\",\"networkInterfaceConfigurations\":[{\"name\":\"bq\",\"properties\":{\"primary\":false,\"deleteOption\":\"Detach\",\"enableAcceleratedNetworking\":false,\"disableTcpStateTracking\":false,\"enableFpga\":true,\"enableIPForwarding\":false,\"networkSecurityGroup\":{\"id\":\"hzdobpxjmflbvvnc\"},\"dnsSettings\":{\"dnsServers\":[\"ciwwzjuqkhr\"]},\"ipConfigurations\":[{\"name\":\"jiwkuofoskghsau\",\"properties\":{}},{\"name\":\"mjmvxieduugidyjr\",\"properties\":{}}],\"dscpConfiguration\":{\"id\":\"aos\"},\"auxiliaryMode\":\"None\",\"auxiliarySku\":\"A1\"},\"tags\":{\"vleggzfbuhfmvfax\":\"pclhocohslk\"}}]}") - .toObject(NetworkProfile.class); - Assertions.assertEquals("rm", model.networkInterfaces().get(0).id()); - Assertions.assertFalse(model.networkInterfaces().get(0).properties().primary()); - Assertions.assertEquals(DeleteOptions.DELETE, model.networkInterfaces().get(0).properties().deleteOption()); - Assertions.assertEquals(NetworkApiVersion.TWO_ZERO_TWO_ZERO_ONE_ONE_ZERO_ONE, model.networkApiVersion()); - Assertions.assertEquals("bq", model.networkInterfaceConfigurations().get(0).name()); - Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().primary()); - Assertions.assertEquals(DeleteOptions.DETACH, - model.networkInterfaceConfigurations().get(0).properties().deleteOption()); - Assertions - .assertFalse(model.networkInterfaceConfigurations().get(0).properties().enableAcceleratedNetworking()); - Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().disableTcpStateTracking()); - Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableFpga()); - Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().enableIPForwarding()); - Assertions.assertEquals("hzdobpxjmflbvvnc", - model.networkInterfaceConfigurations().get(0).properties().networkSecurityGroup().id()); - Assertions.assertEquals("ciwwzjuqkhr", - model.networkInterfaceConfigurations().get(0).properties().dnsSettings().dnsServers().get(0)); - Assertions.assertEquals("jiwkuofoskghsau", - model.networkInterfaceConfigurations().get(0).properties().ipConfigurations().get(0).name()); - Assertions.assertEquals("aos", - model.networkInterfaceConfigurations().get(0).properties().dscpConfiguration().id()); - Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.NONE, - model.networkInterfaceConfigurations().get(0).properties().auxiliaryMode()); - Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A1, - model.networkInterfaceConfigurations().get(0).properties().auxiliarySku()); - Assertions.assertEquals("pclhocohslk", - model.networkInterfaceConfigurations().get(0).tags().get("vleggzfbuhfmvfax")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkProfile model = new NetworkProfile() - .withNetworkInterfaces(Arrays.asList( - new NetworkInterfaceReference().withId("rm") - .withProperties(new NetworkInterfaceReferenceProperties().withPrimary(false) - .withDeleteOption(DeleteOptions.DELETE)), - new NetworkInterfaceReference().withId("kpnpulexxbczwtr") - .withProperties(new NetworkInterfaceReferenceProperties().withPrimary(false) - .withDeleteOption(DeleteOptions.DELETE)))) - .withNetworkApiVersion(NetworkApiVersion.TWO_ZERO_TWO_ZERO_ONE_ONE_ZERO_ONE) - .withNetworkInterfaceConfigurations( - Arrays.asList(new VirtualMachineNetworkInterfaceConfiguration().withName("bq") - .withProperties(new VirtualMachineNetworkInterfaceConfigurationProperties().withPrimary(false) - .withDeleteOption(DeleteOptions.DETACH) - .withEnableAcceleratedNetworking(false) - .withDisableTcpStateTracking(false) - .withEnableFpga(true) - .withEnableIPForwarding(false) - .withNetworkSecurityGroup(new SubResource().withId("hzdobpxjmflbvvnc")) - .withDnsSettings(new VirtualMachineNetworkInterfaceDnsSettingsConfiguration() - .withDnsServers(Arrays.asList("ciwwzjuqkhr"))) - .withIpConfigurations(Arrays.asList( - new VirtualMachineNetworkInterfaceIPConfiguration().withName("jiwkuofoskghsau") - .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties()), - new VirtualMachineNetworkInterfaceIPConfiguration().withName("mjmvxieduugidyjr") - .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties()))) - .withDscpConfiguration(new SubResource().withId("aos")) - .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.NONE) - .withAuxiliarySku(NetworkInterfaceAuxiliarySku.A1)) - .withTags(mapOf("vleggzfbuhfmvfax", "pclhocohslk")))); - model = BinaryData.fromObject(model).toObject(NetworkProfile.class); - Assertions.assertEquals("rm", model.networkInterfaces().get(0).id()); - Assertions.assertFalse(model.networkInterfaces().get(0).properties().primary()); - Assertions.assertEquals(DeleteOptions.DELETE, model.networkInterfaces().get(0).properties().deleteOption()); - Assertions.assertEquals(NetworkApiVersion.TWO_ZERO_TWO_ZERO_ONE_ONE_ZERO_ONE, model.networkApiVersion()); - Assertions.assertEquals("bq", model.networkInterfaceConfigurations().get(0).name()); - Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().primary()); - Assertions.assertEquals(DeleteOptions.DETACH, - model.networkInterfaceConfigurations().get(0).properties().deleteOption()); - Assertions - .assertFalse(model.networkInterfaceConfigurations().get(0).properties().enableAcceleratedNetworking()); - Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().disableTcpStateTracking()); - Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableFpga()); - Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().enableIPForwarding()); - Assertions.assertEquals("hzdobpxjmflbvvnc", - model.networkInterfaceConfigurations().get(0).properties().networkSecurityGroup().id()); - Assertions.assertEquals("ciwwzjuqkhr", - model.networkInterfaceConfigurations().get(0).properties().dnsSettings().dnsServers().get(0)); - Assertions.assertEquals("jiwkuofoskghsau", - model.networkInterfaceConfigurations().get(0).properties().ipConfigurations().get(0).name()); - Assertions.assertEquals("aos", - model.networkInterfaceConfigurations().get(0).properties().dscpConfiguration().id()); - Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.NONE, - model.networkInterfaceConfigurations().get(0).properties().auxiliaryMode()); - Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A1, - model.networkInterfaceConfigurations().get(0).properties().auxiliarySku()); - Assertions.assertEquals("pclhocohslk", - model.networkInterfaceConfigurations().get(0).tags().get("vleggzfbuhfmvfax")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NotificationPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NotificationPropertiesTests.java index 842b3b76cdc0..1871bbe7ddf5 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NotificationPropertiesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/NotificationPropertiesTests.java @@ -14,24 +14,24 @@ public final class NotificationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NotificationProperties model = BinaryData - .fromString("{\"destination\":\"ikh\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}") + .fromString("{\"destination\":\"r\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}") .toObject(NotificationProperties.class); - Assertions.assertEquals("ikh", model.destination()); + Assertions.assertEquals("r", model.destination()); Assertions.assertEquals(NotificationType.EMAIL, model.type()); Assertions.assertEquals(Language.EN_US, model.language()); - Assertions.assertFalse(model.disabled()); + Assertions.assertTrue(model.disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NotificationProperties model = new NotificationProperties().withDestination("ikh") + NotificationProperties model = new NotificationProperties().withDestination("r") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) - .withDisabled(false); + .withDisabled(true); model = BinaryData.fromObject(model).toObject(NotificationProperties.class); - Assertions.assertEquals("ikh", model.destination()); + Assertions.assertEquals("r", model.destination()); Assertions.assertEquals(NotificationType.EMAIL, model.type()); Assertions.assertEquals(Language.EN_US, model.language()); - Assertions.assertFalse(model.disabled()); + Assertions.assertTrue(model.disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OSImageNotificationProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OSImageNotificationProfileTests.java deleted file mode 100644 index ac67001d7ba2..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OSImageNotificationProfileTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.OSImageNotificationProfile; -import org.junit.jupiter.api.Assertions; - -public final class OSImageNotificationProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OSImageNotificationProfile model - = BinaryData.fromString("{\"notBeforeTimeout\":\"srfbjfdtwss\",\"enable\":true}") - .toObject(OSImageNotificationProfile.class); - Assertions.assertEquals("srfbjfdtwss", model.notBeforeTimeout()); - Assertions.assertTrue(model.enable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OSImageNotificationProfile model - = new OSImageNotificationProfile().withNotBeforeTimeout("srfbjfdtwss").withEnable(true); - model = BinaryData.fromObject(model).toObject(OSImageNotificationProfile.class); - Assertions.assertEquals("srfbjfdtwss", model.notBeforeTimeout()); - Assertions.assertTrue(model.enable()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OperationsListMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OperationsListMockTests.java index 978e1d0334c8..d4c7b5b2f1d7 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OperationsListMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"vuoy\",\"isDataAction\":false,\"display\":{\"provider\":\"lvez\",\"resource\":\"pqlmfe\",\"operation\":\"erqwkyhkobopg\",\"description\":\"dkow\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"uhprwmdyvxqt\",\"isDataAction\":false,\"display\":{\"provider\":\"wroyqbexrmcq\",\"resource\":\"ycnojvknmefqsg\",\"operation\":\"ah\",\"description\":\"jyzhpvgq\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PatchSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PatchSettingsTests.java deleted file mode 100644 index fb3ebc17b796..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PatchSettingsTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.PatchSettings; -import com.azure.resourcemanager.computeschedule.models.WindowsPatchAssessmentMode; -import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchMode; -import org.junit.jupiter.api.Assertions; - -public final class PatchSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchSettings model = BinaryData.fromString( - "{\"patchMode\":\"AutomaticByPlatform\",\"enableHotpatching\":false,\"assessmentMode\":\"AutomaticByPlatform\",\"automaticByPlatformSettings\":{\"rebootSetting\":\"Always\",\"bypassPlatformSafetyChecksOnUserSchedule\":true}}") - .toObject(PatchSettings.class); - Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM, model.patchMode()); - Assertions.assertFalse(model.enableHotpatching()); - Assertions.assertEquals(WindowsPatchAssessmentMode.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); - Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, - model.automaticByPlatformSettings().rebootSetting()); - Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchSettings model = new PatchSettings().withPatchMode(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) - .withEnableHotpatching(false) - .withAssessmentMode(WindowsPatchAssessmentMode.AUTOMATIC_BY_PLATFORM) - .withAutomaticByPlatformSettings(new WindowsVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS) - .withBypassPlatformSafetyChecksOnUserSchedule(true)); - model = BinaryData.fromObject(model).toObject(PatchSettings.class); - Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM, model.patchMode()); - Assertions.assertFalse(model.enableHotpatching()); - Assertions.assertEquals(WindowsPatchAssessmentMode.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); - Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, - model.automaticByPlatformSettings().rebootSetting()); - Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PlacementTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PlacementTests.java deleted file mode 100644 index d8c1bf82817c..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PlacementTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.Placement; -import com.azure.resourcemanager.computeschedule.models.ZonePlacementPolicyType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PlacementTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Placement model = BinaryData.fromString( - "{\"zonePlacementPolicy\":\"Auto\",\"includeZones\":[\"qcjm\"],\"excludeZones\":[\"a\",\"bqidtqaj\",\"yulpkudjkr\"]}") - .toObject(Placement.class); - Assertions.assertEquals(ZonePlacementPolicyType.AUTO, model.zonePlacementPolicy()); - Assertions.assertEquals("qcjm", model.includeZones().get(0)); - Assertions.assertEquals("a", model.excludeZones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Placement model = new Placement().withZonePlacementPolicy(ZonePlacementPolicyType.AUTO) - .withIncludeZones(Arrays.asList("qcjm")) - .withExcludeZones(Arrays.asList("a", "bqidtqaj", "yulpkudjkr")); - model = BinaryData.fromObject(model).toObject(Placement.class); - Assertions.assertEquals(ZonePlacementPolicyType.AUTO, model.zonePlacementPolicy()); - Assertions.assertEquals("qcjm", model.includeZones().get(0)); - Assertions.assertEquals("a", model.excludeZones().get(0)); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PriorityProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PriorityProfileTests.java deleted file mode 100644 index e1769f8935b8..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PriorityProfileTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.AllocationStrategy; -import com.azure.resourcemanager.computeschedule.models.PriorityProfile; -import com.azure.resourcemanager.computeschedule.models.PriorityType; -import org.junit.jupiter.api.Assertions; - -public final class PriorityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PriorityProfile model = BinaryData.fromString("{\"type\":\"Regular\",\"allocationStrategy\":\"LowestPrice\"}") - .toObject(PriorityProfile.class); - Assertions.assertEquals(PriorityType.REGULAR, model.type()); - Assertions.assertEquals(AllocationStrategy.LOWEST_PRICE, model.allocationStrategy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PriorityProfile model = new PriorityProfile().withType(PriorityType.REGULAR) - .withAllocationStrategy(AllocationStrategy.LOWEST_PRICE); - model = BinaryData.fromObject(model).toObject(PriorityProfile.class); - Assertions.assertEquals(PriorityType.REGULAR, model.type()); - Assertions.assertEquals(AllocationStrategy.LOWEST_PRICE, model.allocationStrategy()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PublicIPAddressSkuTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PublicIPAddressSkuTests.java deleted file mode 100644 index 0edcd67f2550..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/PublicIPAddressSkuTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; -import org.junit.jupiter.api.Assertions; - -public final class PublicIPAddressSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PublicIPAddressSku model - = BinaryData.fromString("{\"name\":\"Basic\",\"tier\":\"Regional\"}").toObject(PublicIPAddressSku.class); - Assertions.assertEquals(PublicIPAddressSkuName.BASIC, model.name()); - Assertions.assertEquals(PublicIPAddressSkuTier.REGIONAL, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PublicIPAddressSku model - = new PublicIPAddressSku().withName(PublicIPAddressSkuName.BASIC).withTier(PublicIPAddressSkuTier.REGIONAL); - model = BinaryData.fromObject(model).toObject(PublicIPAddressSku.class); - Assertions.assertEquals(PublicIPAddressSkuName.BASIC, model.name()); - Assertions.assertEquals(PublicIPAddressSkuTier.REGIONAL, model.tier()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceAttachRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceAttachRequestTests.java index e333e4989393..9012ee18800a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceAttachRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceAttachRequestTests.java @@ -17,10 +17,10 @@ public final class ResourceAttachRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceAttachRequest model = BinaryData.fromString( - "{\"resources\":[{\"name\":\"uetae\",\"id\":\"uruv\",\"type\":\"ovsm\",\"resourceId\":\"l\",\"notificationSettings\":[{\"destination\":\"b\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"kif\",\"id\":\"vtpuqujmqlgk\",\"type\":\"tndoaongbjc\",\"resourceId\":\"tujitcjedft\",\"notificationSettings\":[{\"destination\":\"ezkojvdcp\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]},{\"name\":\"uicybxarzgszuf\",\"id\":\"x\",\"type\":\"q\",\"resourceId\":\"p\",\"notificationSettings\":[{\"destination\":\"amcio\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"zxkhnzbonlwnto\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}]}") + "{\"resources\":[{\"name\":\"deyeamdphagalpbu\",\"id\":\"wgipwhono\",\"type\":\"gshwankixz\",\"resourceId\":\"injep\",\"notificationSettings\":[{\"destination\":\"mryw\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ftiyqzrnkcq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]},{\"name\":\"hzls\",\"id\":\"cohoq\",\"type\":\"wvl\",\"resourceId\":\"yav\",\"notificationSettings\":[{\"destination\":\"eun\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"yxzk\",\"id\":\"noc\",\"type\":\"oklyaxuconuq\",\"resourceId\":\"zf\",\"notificationSettings\":[{\"destination\":\"ypewrmjmwvvjekt\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}]}") .toObject(ResourceAttachRequest.class); - Assertions.assertEquals("l", model.resources().get(0).resourceId()); - Assertions.assertEquals("b", model.resources().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("injep", model.resources().get(0).resourceId()); + Assertions.assertEquals("mryw", model.resources().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.resources().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.resources().get(0).notificationSettings().get(0).language()); Assertions.assertFalse(model.resources().get(0).notificationSettings().get(0).disabled()); @@ -29,29 +29,29 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ResourceAttachRequest model = new ResourceAttachRequest().withResources(Arrays.asList( - new ScheduledActionResourceInner().withResourceId("l") - .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("b") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false))), - new ScheduledActionResourceInner().withResourceId("tujitcjedft") - .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("ezkojvdcp") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true))), - new ScheduledActionResourceInner().withResourceId("p") + new ScheduledActionResourceInner().withResourceId("injep") .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("amcio") + new NotificationProperties().withDestination("mryw") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("zxkhnzbonlwnto") + .withDisabled(false), + new NotificationProperties().withDestination("ftiyqzrnkcq") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) - .withDisabled(true))))); + .withDisabled(true))), + new ScheduledActionResourceInner().withResourceId("yav") + .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("eun") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false))), + new ScheduledActionResourceInner().withResourceId("zf") + .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("ypewrmjmwvvjekt") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true))))); model = BinaryData.fromObject(model).toObject(ResourceAttachRequest.class); - Assertions.assertEquals("l", model.resources().get(0).resourceId()); - Assertions.assertEquals("b", model.resources().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("injep", model.resources().get(0).resourceId()); + Assertions.assertEquals("mryw", model.resources().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.resources().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.resources().get(0).notificationSettings().get(0).language()); Assertions.assertFalse(model.resources().get(0).notificationSettings().get(0).disabled()); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceDetachRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceDetachRequestTests.java index 220cabf5cbbe..9802a58926dd 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceDetachRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceDetachRequestTests.java @@ -12,16 +12,17 @@ public final class ResourceDetachRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceDetachRequest model = BinaryData.fromString("{\"resources\":[\"kutwpf\",\"pagmhrskdsnf\"]}") - .toObject(ResourceDetachRequest.class); - Assertions.assertEquals("kutwpf", model.resources().get(0)); + ResourceDetachRequest model + = BinaryData.fromString("{\"resources\":[\"utttxfvjrbirp\",\"xepcyvahfn\",\"jky\"]}") + .toObject(ResourceDetachRequest.class); + Assertions.assertEquals("utttxfvjrbirp", model.resources().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ResourceDetachRequest model - = new ResourceDetachRequest().withResources(Arrays.asList("kutwpf", "pagmhrskdsnf")); + = new ResourceDetachRequest().withResources(Arrays.asList("utttxfvjrbirp", "xepcyvahfn", "jky")); model = BinaryData.fromObject(model).toObject(ResourceDetachRequest.class); - Assertions.assertEquals("kutwpf", model.resources().get(0)); + Assertions.assertEquals("utttxfvjrbirp", model.resources().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceListResponseTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceListResponseTests.java index 09a15cad62ef..ace506e8bdd5 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceListResponseTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceListResponseTests.java @@ -14,13 +14,13 @@ public final class ResourceListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"name\":\"xxbuyq\",\"id\":\"xzfe\",\"type\":\"tpp\",\"resourceId\":\"iolxor\",\"notificationSettings\":[{\"destination\":\"tolmncwsobqw\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]}],\"nextLink\":\"dcfhucqdpf\"}") + "{\"value\":[{\"name\":\"ktwh\",\"id\":\"dxwzywqsmbsurexi\",\"type\":\"ryocfsfksymdd\",\"resourceId\":\"stkiiuxhqyud\",\"notificationSettings\":[{\"destination\":\"rq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"zvyifqrvkdvj\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"vvdfwatkpnpul\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"zwtruwiqzbqjvsov\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"cspkwlhzdobpxjmf\",\"id\":\"bvvnchrkcciw\",\"type\":\"juqk\",\"resourceId\":\"rsa\",\"notificationSettings\":[{\"destination\":\"ku\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ghsauuimjmvxied\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"yjr\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"osvexcsonpclhoc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"ev\",\"id\":\"eggzfb\",\"type\":\"fmvfaxkffeiit\",\"resourceId\":\"lvmezyvshxmzsbbz\",\"notificationSettings\":[{\"destination\":\"igrxwburvjxxjn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}],\"nextLink\":\"koen\"}") .toObject(ResourceListResponse.class); - Assertions.assertEquals("iolxor", model.value().get(0).resourceId()); - Assertions.assertEquals("tolmncwsobqw", model.value().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("stkiiuxhqyud", model.value().get(0).resourceId()); + Assertions.assertEquals("rq", model.value().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.value().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.value().get(0).notificationSettings().get(0).language()); Assertions.assertFalse(model.value().get(0).notificationSettings().get(0).disabled()); - Assertions.assertEquals("dcfhucqdpf", model.nextLink()); + Assertions.assertEquals("koen", model.nextLink()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcePatchRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcePatchRequestTests.java index bec567830f29..7cf810eb1b38 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcePatchRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcePatchRequestTests.java @@ -17,11 +17,10 @@ public final class ResourcePatchRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourcePatchRequest model = BinaryData.fromString( - "{\"resources\":[{\"name\":\"doakgtdlmkkzevdl\",\"id\":\"ewpusdsttwvogvb\",\"type\":\"jdcngqqm\",\"resourceId\":\"akufgmjz\",\"notificationSettings\":[{\"destination\":\"dgrtwaenuuzkopbm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"woyuhhziuief\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]}]}") + "{\"resources\":[{\"name\":\"j\",\"id\":\"uujqgidokgjljyo\",\"type\":\"vcltbgsncgh\",\"resourceId\":\"jeszzhbijhtxfv\",\"notificationSettings\":[{\"destination\":\"fsm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]},{\"name\":\"pvecxgodeb\",\"id\":\"qkkrb\",\"type\":\"ukgri\",\"resourceId\":\"flz\",\"notificationSettings\":[{\"destination\":\"xzpuzycisp\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"mgkbrpyydhibn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ik\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"tqagnbuynh\",\"id\":\"jggmebfsiarbu\",\"type\":\"cvpnazzmhjrunmpx\",\"resourceId\":\"tdbhrbnla\",\"notificationSettings\":[{\"destination\":\"myskpbhenbtkcxy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"rsyn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},{\"name\":\"by\",\"id\":\"czfc\",\"type\":\"aaxdbabphlwrq\",\"resourceId\":\"fkts\",\"notificationSettings\":[{\"destination\":\"ucoc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"zt\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"rq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"kzywbiex\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]}]}") .toObject(ResourcePatchRequest.class); - Assertions.assertEquals("akufgmjz", model.resources().get(0).resourceId()); - Assertions.assertEquals("dgrtwaenuuzkopbm", - model.resources().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("jeszzhbijhtxfv", model.resources().get(0).resourceId()); + Assertions.assertEquals("fsm", model.resources().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.resources().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.resources().get(0).notificationSettings().get(0).language()); Assertions.assertTrue(model.resources().get(0).notificationSettings().get(0).disabled()); @@ -29,21 +28,57 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourcePatchRequest model = new ResourcePatchRequest() - .withResources(Arrays.asList(new ScheduledActionResourceInner().withResourceId("akufgmjz") + ResourcePatchRequest model = new ResourcePatchRequest().withResources(Arrays.asList( + new ScheduledActionResourceInner().withResourceId("jeszzhbijhtxfv") + .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("fsm") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true))), + new ScheduledActionResourceInner().withResourceId("flz") .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("dgrtwaenuuzkopbm") + new NotificationProperties().withDestination("xzpuzycisp") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true), - new NotificationProperties().withDestination("woyuhhziuief") + new NotificationProperties().withDestination("mgkbrpyydhibn") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("ik") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false))), + new ScheduledActionResourceInner().withResourceId("tdbhrbnla") + .withNotificationSettings(Arrays.asList( + new NotificationProperties().withDestination("myskpbhenbtkcxy") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("rsyn") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false))), + new ScheduledActionResourceInner().withResourceId("fkts") + .withNotificationSettings(Arrays.asList( + new NotificationProperties().withDestination("ucoc") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("zt") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("rq") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("kzywbiex") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(false))))); model = BinaryData.fromObject(model).toObject(ResourcePatchRequest.class); - Assertions.assertEquals("akufgmjz", model.resources().get(0).resourceId()); - Assertions.assertEquals("dgrtwaenuuzkopbm", - model.resources().get(0).notificationSettings().get(0).destination()); + Assertions.assertEquals("jeszzhbijhtxfv", model.resources().get(0).resourceId()); + Assertions.assertEquals("fsm", model.resources().get(0).notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.resources().get(0).notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.resources().get(0).notificationSettings().get(0).language()); Assertions.assertTrue(model.resources().get(0).notificationSettings().get(0).disabled()); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceProvisionPayloadTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceProvisionPayloadTests.java new file mode 100644 index 000000000000..7b9c85042644 --- /dev/null +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourceProvisionPayloadTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.computeschedule.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.computeschedule.models.ResourceProvisionPayload; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ResourceProvisionPayloadTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResourceProvisionPayload model = BinaryData.fromString( + "{\"baseProfile\":{},\"resourceOverrides\":[{},{}],\"resourceCount\":1946901948,\"resourcePrefix\":\"iwpwcuk\"}") + .toObject(ResourceProvisionPayload.class); + Assertions.assertEquals(1946901948, model.resourceCount()); + Assertions.assertEquals("iwpwcuk", model.resourcePrefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ResourceProvisionPayload model = new ResourceProvisionPayload().withBaseProfile(mapOf()) + .withResourceOverrides(Arrays.asList(mapOf(), mapOf())) + .withResourceCount(1946901948) + .withResourcePrefix("iwpwcuk"); + model = BinaryData.fromObject(model).toObject(ResourceProvisionPayload.class); + Assertions.assertEquals(1946901948, model.resourceCount()); + Assertions.assertEquals("iwpwcuk", model.resourcePrefix()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcesTests.java index 3cf362212d22..ae5a055fa2e0 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ResourcesTests.java @@ -12,14 +12,14 @@ public final class ResourcesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Resources model = BinaryData.fromString("{\"ids\":[\"wvukx\",\"audccsnhs\"]}").toObject(Resources.class); - Assertions.assertEquals("wvukx", model.ids().get(0)); + Resources model = BinaryData.fromString("{\"ids\":[\"k\",\"vd\"]}").toObject(Resources.class); + Assertions.assertEquals("k", model.ids().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Resources model = new Resources().withIds(Arrays.asList("wvukx", "audccsnhs")); + Resources model = new Resources().withIds(Arrays.asList("k", "vd")); model = BinaryData.fromObject(model).toObject(Resources.class); - Assertions.assertEquals("wvukx", model.ids().get(0)); + Assertions.assertEquals("k", model.ids().get(0)); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/RetryPolicyTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/RetryPolicyTests.java index 372a627359cc..d2f0ab029712 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/RetryPolicyTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/RetryPolicyTests.java @@ -5,29 +5,23 @@ package com.azure.resourcemanager.computeschedule.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import org.junit.jupiter.api.Assertions; public final class RetryPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RetryPolicy model = BinaryData - .fromString("{\"retryCount\":832798449,\"retryWindowInMinutes\":1629282531,\"onFailureAction\":\"Delete\"}") + RetryPolicy model = BinaryData.fromString("{\"retryCount\":257838249,\"retryWindowInMinutes\":355535904}") .toObject(RetryPolicy.class); - Assertions.assertEquals(832798449, model.retryCount()); - Assertions.assertEquals(1629282531, model.retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, model.onFailureAction()); + Assertions.assertEquals(257838249, model.retryCount()); + Assertions.assertEquals(355535904, model.retryWindowInMinutes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RetryPolicy model = new RetryPolicy().withRetryCount(832798449) - .withRetryWindowInMinutes(1629282531) - .withOnFailureAction(ResourceOperationType.DELETE); + RetryPolicy model = new RetryPolicy().withRetryCount(257838249).withRetryWindowInMinutes(355535904); model = BinaryData.fromObject(model).toObject(RetryPolicy.class); - Assertions.assertEquals(832798449, model.retryCount()); - Assertions.assertEquals(1629282531, model.retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, model.onFailureAction()); + Assertions.assertEquals(257838249, model.retryCount()); + Assertions.assertEquals(355535904, model.retryWindowInMinutes()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduleTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduleTests.java index 68df883088b6..5f59d8e6e37a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduleTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduleTests.java @@ -14,27 +14,27 @@ public final class ScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Schedule model = BinaryData.fromString( - "{\"deadline\":\"2021-04-12T08:15:27Z\",\"deadLine\":\"2021-10-21T01:15:22Z\",\"timezone\":\"yscnpqxu\",\"timeZone\":\"vyq\",\"deadlineType\":\"CompleteBy\"}") + "{\"deadline\":\"2021-11-30T01:16:03Z\",\"deadLine\":\"2021-08-06T18:49:52Z\",\"timezone\":\"czbysc\",\"timeZone\":\"q\",\"deadlineType\":\"Unknown\"}") .toObject(Schedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T08:15:27Z"), model.deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T01:15:22Z"), model.deadLine()); - Assertions.assertEquals("yscnpqxu", model.timezone()); - Assertions.assertEquals("vyq", model.timeZone()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.deadlineType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-30T01:16:03Z"), model.deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T18:49:52Z"), model.deadLine()); + Assertions.assertEquals("czbysc", model.timezone()); + Assertions.assertEquals("q", model.timeZone()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.deadlineType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Schedule model = new Schedule().withDeadline(OffsetDateTime.parse("2021-04-12T08:15:27Z")) - .withDeadLine(OffsetDateTime.parse("2021-10-21T01:15:22Z")) - .withTimezone("yscnpqxu") - .withTimeZone("vyq") - .withDeadlineType(DeadlineType.COMPLETE_BY); + Schedule model = new Schedule().withDeadline(OffsetDateTime.parse("2021-11-30T01:16:03Z")) + .withDeadLine(OffsetDateTime.parse("2021-08-06T18:49:52Z")) + .withTimezone("czbysc") + .withTimeZone("q") + .withDeadlineType(DeadlineType.UNKNOWN); model = BinaryData.fromObject(model).toObject(Schedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T08:15:27Z"), model.deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T01:15:22Z"), model.deadLine()); - Assertions.assertEquals("yscnpqxu", model.timezone()); - Assertions.assertEquals("vyq", model.timeZone()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.deadlineType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-30T01:16:03Z"), model.deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T18:49:52Z"), model.deadLine()); + Assertions.assertEquals("czbysc", model.timezone()); + Assertions.assertEquals("q", model.timeZone()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.deadlineType()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionsListByVmsMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionsListByVmsMockTests.java index fd61ebdfd18f..a714f964a5be 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionsListByVmsMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionExtensionsListByVmsMockTests.java @@ -16,7 +16,6 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledActionResources; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -31,7 +30,7 @@ public final class ScheduledActionExtensionsListByVmsMockTests { @Test public void testListByVms() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-05-14T02:17:19Z\",\"endTime\":\"2021-01-27T21:30:22Z\",\"schedule\":{\"scheduledTime\":\"vqagtltdhlf\",\"timeZone\":\"qojpy\",\"requestedWeekDays\":[\"Tuesday\",\"Saturday\",\"Saturday\",\"Thursday\"],\"requestedMonths\":[\"March\",\"January\"],\"requestedDaysOfTheMonth\":[840860863,1598759472,2043504503],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":1569168955,\"retryWindowInMinutes\":1235749271,\"onFailureAction\":\"Unknown\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"rafwgckhocxvdf\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"qrouda\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"h\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"dhcxgkmoy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]},\"id\":\"bhmfdnbz\",\"name\":\"dvfvfcjnaeoi\",\"type\":\"rvhmgor\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-03-09T05:15:25Z\",\"endTime\":\"2021-12-02T07:00Z\",\"schedule\":{\"scheduledTime\":\"tclusiypbsfgy\",\"timeZone\":\"gusl\",\"requestedWeekDays\":[\"Tuesday\",\"Sunday\",\"Monday\",\"Friday\"],\"requestedMonths\":[\"July\"],\"requestedDaysOfTheMonth\":[1056864137,860507177,2023877229],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":435176888,\"retryWindowInMinutes\":2010332970}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"lolp\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"pqvujzraehtwdwrf\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"yrcdlbhshfwprac\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ykhevxccedcpnmdy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"nhltiugcxn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"qiby\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"wxwlmdjrkvfgb\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]},\"id\":\"odacizs\",\"name\":\"q\",\"type\":\"hkr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -41,27 +40,28 @@ public void testListByVms() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.scheduledActionExtensions().listByVms("dxzxhi", com.azure.core.util.Context.NONE); + = manager.scheduledActionExtensions().listByVms("tlstvlzywem", com.azure.core.util.Context.NONE); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, response.iterator().next().properties().resourceType()); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, + response.iterator().next().properties().resourceType()); Assertions.assertEquals(ScheduledActionType.HIBERNATE, response.iterator().next().properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-14T02:17:19Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T05:15:25Z"), response.iterator().next().properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-27T21:30:22Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T07:00Z"), response.iterator().next().properties().endTime()); - Assertions.assertEquals("vqagtltdhlf", response.iterator().next().properties().schedule().scheduledTime()); - Assertions.assertEquals("qojpy", response.iterator().next().properties().schedule().timeZone()); + Assertions.assertEquals("tclusiypbsfgy", response.iterator().next().properties().schedule().scheduledTime()); + Assertions.assertEquals("gusl", response.iterator().next().properties().schedule().timeZone()); Assertions.assertEquals(WeekDay.TUESDAY, response.iterator().next().properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.MARCH, + Assertions.assertEquals(Month.JULY, response.iterator().next().properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(840860863, + Assertions.assertEquals(1056864137, response.iterator().next().properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST, + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, response.iterator().next().properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1569168955, + Assertions.assertEquals(435176888, response.iterator().next().properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1235749271, + Assertions.assertEquals(2010332970, response.iterator() .next() .properties() @@ -69,17 +69,15 @@ public void testListByVms() throws Exception { .executionParameters() .retryPolicy() .retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.UNKNOWN, - response.iterator().next().properties().schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, + Assertions.assertEquals(DeadlineType.UNKNOWN, response.iterator().next().properties().schedule().deadlineType()); - Assertions.assertEquals("rafwgckhocxvdf", + Assertions.assertEquals("lolp", response.iterator().next().properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.iterator().next().properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.iterator().next().properties().notificationSettings().get(0).language()); Assertions.assertFalse(response.iterator().next().properties().notificationSettings().get(0).disabled()); - Assertions.assertFalse(response.iterator().next().properties().disabled()); + Assertions.assertTrue(response.iterator().next().properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionInnerTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionInnerTests.java index 31f46b5d3c88..e4b9f8e934bf 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionInnerTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionInnerTests.java @@ -13,7 +13,6 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties; @@ -30,94 +29,92 @@ public final class ScheduledActionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionInner model = BinaryData.fromString( - "{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-02-11T00:28:43Z\",\"endTime\":\"2021-01-05T04:32:44Z\",\"schedule\":{\"scheduledTime\":\"biknsorgjhxbld\",\"timeZone\":\"lwwrl\",\"requestedWeekDays\":[\"Monday\",\"Thursday\"],\"requestedMonths\":[\"January\",\"March\",\"September\",\"February\"],\"requestedDaysOfTheMonth\":[1621174416,1941310787,925534814],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":2008770544,\"retryWindowInMinutes\":1161349380,\"onFailureAction\":\"Deallocate\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"tdtbnnhadooc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"khnvpam\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"u\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Failed\"},\"location\":\"allatmelwuipic\",\"tags\":{\"rnxxmueed\":\"kzivgvvcnayrh\",\"stkwqqtch\":\"drd\",\"mtdaa\":\"alm\"},\"id\":\"gdv\",\"name\":\"vgpiohgwxrt\",\"type\":\"udxepxgyqagv\"}") + "{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-07-24T04:16:49Z\",\"endTime\":\"2021-06-01T17:59:42Z\",\"schedule\":{\"scheduledTime\":\"fycc\",\"timeZone\":\"newmdwzjeiachbo\",\"requestedWeekDays\":[\"All\",\"Thursday\",\"Friday\"],\"requestedMonths\":[\"May\"],\"requestedDaysOfTheMonth\":[1314309812,1593237527,1917660193],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1181471279,\"retryWindowInMinutes\":732529011}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"rimz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"wjdk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"dqxhcrmnohjtckwh\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Deleting\"},\"location\":\"xsqwpgrjbznorc\",\"tags\":{\"xqabnmocpcysh\":\"snb\"},\"id\":\"rzafbljjgpbtoqcj\",\"name\":\"klj\",\"type\":\"vbqid\"}") .toObject(ScheduledActionInner.class); - Assertions.assertEquals("allatmelwuipic", model.location()); - Assertions.assertEquals("kzivgvvcnayrh", model.tags().get("rnxxmueed")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.START, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-11T00:28:43Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T04:32:44Z"), model.properties().endTime()); - Assertions.assertEquals("biknsorgjhxbld", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("lwwrl", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.MONDAY, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.JANUARY, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1621174416, model.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals("xsqwpgrjbznorc", model.location()); + Assertions.assertEquals("snb", model.tags().get("xqabnmocpcysh")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.properties().resourceType()); + Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T04:16:49Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T17:59:42Z"), model.properties().endTime()); + Assertions.assertEquals("fycc", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("newmdwzjeiachbo", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.ALL, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.MAY, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(1314309812, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(2008770544, + Assertions.assertEquals(1181471279, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1161349380, + Assertions.assertEquals(732529011, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DEALLOCATE, - model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.properties().schedule().deadlineType()); - Assertions.assertEquals("tdtbnnhadooc", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.properties().schedule().deadlineType()); + Assertions.assertEquals("rimz", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.properties().disabled()); + Assertions.assertFalse(model.properties().disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionInner model = new ScheduledActionInner().withLocation("allatmelwuipic") - .withTags(mapOf("rnxxmueed", "kzivgvvcnayrh", "stkwqqtch", "drd", "mtdaa", "alm")) - .withProperties(new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) - .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2021-02-11T00:28:43Z")) - .withEndTime(OffsetDateTime.parse("2021-01-05T04:32:44Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("biknsorgjhxbld") - .withTimeZone("lwwrl") - .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY, WeekDay.THURSDAY)) - .withRequestedMonths(Arrays.asList(Month.JANUARY, Month.MARCH, Month.SEPTEMBER, Month.FEBRUARY)) - .withRequestedDaysOfTheMonth(Arrays.asList(1621174416, 1941310787, 925534814)) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) - .withRetryPolicy(new RetryPolicy().withRetryCount(2008770544) - .withRetryWindowInMinutes(1161349380) - .withOnFailureAction(ResourceOperationType.DEALLOCATE))) - .withDeadlineType(DeadlineType.INITIATE_AT)) - .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("tdtbnnhadooc") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("khnvpam") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("u") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false))) - .withDisabled(true)); + ScheduledActionInner model + = new ScheduledActionInner().withLocation("xsqwpgrjbznorc") + .withTags(mapOf("xqabnmocpcysh", "snb")) + .withProperties( + new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE_SCALE_SET) + .withActionType(ScheduledActionType.HIBERNATE) + .withStartTime(OffsetDateTime.parse("2021-07-24T04:16:49Z")) + .withEndTime(OffsetDateTime.parse("2021-06-01T17:59:42Z")) + .withSchedule( + new ScheduledActionsSchedule().withScheduledTime("fycc") + .withTimeZone("newmdwzjeiachbo") + .withRequestedWeekDays(Arrays.asList(WeekDay.ALL, WeekDay.THURSDAY, WeekDay.FRIDAY)) + .withRequestedMonths(Arrays.asList(Month.MAY)) + .withRequestedDaysOfTheMonth(Arrays.asList(1314309812, 1593237527, 1917660193)) + .withExecutionParameters(new ExecutionParameters() + .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(1181471279) + .withRetryWindowInMinutes(732529011))) + .withDeadlineType(DeadlineType.UNKNOWN)) + .withNotificationSettings(Arrays.asList( + new NotificationProperties().withDestination("rimz") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("wjdk") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("dqxhcrmnohjtckwh") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true))) + .withDisabled(false)); model = BinaryData.fromObject(model).toObject(ScheduledActionInner.class); - Assertions.assertEquals("allatmelwuipic", model.location()); - Assertions.assertEquals("kzivgvvcnayrh", model.tags().get("rnxxmueed")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.START, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-11T00:28:43Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T04:32:44Z"), model.properties().endTime()); - Assertions.assertEquals("biknsorgjhxbld", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("lwwrl", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.MONDAY, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.JANUARY, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1621174416, model.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals("xsqwpgrjbznorc", model.location()); + Assertions.assertEquals("snb", model.tags().get("xqabnmocpcysh")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.properties().resourceType()); + Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T04:16:49Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T17:59:42Z"), model.properties().endTime()); + Assertions.assertEquals("fycc", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("newmdwzjeiachbo", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.ALL, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.MAY, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(1314309812, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(2008770544, + Assertions.assertEquals(1181471279, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1161349380, + Assertions.assertEquals(732529011, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DEALLOCATE, - model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.properties().schedule().deadlineType()); - Assertions.assertEquals("tdtbnnhadooc", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.properties().schedule().deadlineType()); + Assertions.assertEquals("rimz", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.properties().disabled()); + Assertions.assertFalse(model.properties().disabled()); } // Use "Map.of" if available diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionListResultTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionListResultTests.java index 44bb6cc32eaa..17c4e294795f 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionListResultTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionListResultTests.java @@ -21,33 +21,34 @@ public final class ScheduledActionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-05-16T22:52:08Z\",\"endTime\":\"2021-05-20T08:32:42Z\",\"schedule\":{\"scheduledTime\":\"oruzfgsquyfxrxx\",\"timeZone\":\"eptra\",\"requestedWeekDays\":[\"Thursday\"],\"requestedMonths\":[\"May\"],\"requestedDaysOfTheMonth\":[1464984840,800812531,866904084],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"y\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"dooaojkniodko\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ujhemmsbvdkcrodt\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Succeeded\"},\"location\":\"kacjvefkdlfo\",\"tags\":{\"wpu\":\"gkfpaga\",\"r\":\"pqblylsyxkqjnsj\",\"dszue\":\"tiagx\",\"icvi\":\"psbzkfzbeyvpn\"},\"id\":\"v\",\"name\":\"jjxd\",\"type\":\"rbuukzclewyhmlwp\"}],\"nextLink\":\"tzpofncckwyfzq\"}") + "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-03-27T22:11:53Z\",\"endTime\":\"2021-09-20T08:20:08Z\",\"schedule\":{\"scheduledTime\":\"phrcgyncoc\",\"timeZone\":\"ecfvmm\",\"requestedWeekDays\":[\"Tuesday\"],\"requestedMonths\":[\"June\",\"June\",\"November\",\"December\"],\"requestedDaysOfTheMonth\":[164546469,1343274314],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"c\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"kwlzuvccfwnfn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Canceled\"},\"location\":\"x\",\"tags\":{\"bqqwxrj\":\"gtzxdpn\"},\"id\":\"eallnwsubisnj\",\"name\":\"mpmngnzscxaqwoo\",\"type\":\"hcbonqvpkvlr\"},{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-04-17T15:50:50Z\",\"endTime\":\"2021-10-21T11:16:02Z\",\"schedule\":{\"scheduledTime\":\"ipheoflokeyyien\",\"timeZone\":\"bdlwtgrhpdjpj\",\"requestedWeekDays\":[\"All\",\"Thursday\",\"Saturday\",\"All\"],\"requestedMonths\":[\"All\"],\"requestedDaysOfTheMonth\":[958851014,1063088657,184362773,973371108],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"hejjz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"gwdslfhotwm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"lbjnpgacftadehx\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true,\"provisioningState\":\"Failed\"},\"location\":\"suesnzw\",\"tags\":{\"xzdmohctb\":\"bavo\",\"ndnvo\":\"vudwx\",\"lazjdyggdtjixhbk\":\"gujjugwdkcglh\"},\"id\":\"ofqweykhmenevfye\",\"name\":\"fwhybcibvy\",\"type\":\"dcsi\"},{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-05-28T22:29:37Z\",\"endTime\":\"2021-01-25T02:11:12Z\",\"schedule\":{\"scheduledTime\":\"dectehfiqsc\",\"timeZone\":\"eypvhezrkg\",\"requestedWeekDays\":[\"Monday\",\"Sunday\",\"All\"],\"requestedMonths\":[\"May\",\"June\"],\"requestedDaysOfTheMonth\":[450468139,34828913,509090660,668805249],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"yqjpkcatt\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Deleting\"},\"location\":\"qpjhvmda\",\"tags\":{\"q\":\"ysou\",\"yhltrpmopjmcm\":\"canoaeupf\"},\"id\":\"tuo\",\"name\":\"thfuiuaodsfcpkvx\",\"type\":\"dpuozmyz\"}],\"nextLink\":\"agfuaxbezyiu\"}") .toObject(ScheduledActionListResult.class); - Assertions.assertEquals("kacjvefkdlfo", model.value().get(0).location()); - Assertions.assertEquals("gkfpaga", model.value().get(0).tags().get("wpu")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.value().get(0).properties().resourceType()); + Assertions.assertEquals("x", model.value().get(0).location()); + Assertions.assertEquals("gtzxdpn", model.value().get(0).tags().get("bqqwxrj")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, + model.value().get(0).properties().resourceType()); Assertions.assertEquals(ScheduledActionType.START, model.value().get(0).properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T22:52:08Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T22:11:53Z"), model.value().get(0).properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T08:32:42Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-20T08:20:08Z"), model.value().get(0).properties().endTime()); - Assertions.assertEquals("oruzfgsquyfxrxx", model.value().get(0).properties().schedule().scheduledTime()); - Assertions.assertEquals("eptra", model.value().get(0).properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.THURSDAY, + Assertions.assertEquals("phrcgyncoc", model.value().get(0).properties().schedule().scheduledTime()); + Assertions.assertEquals("ecfvmm", model.value().get(0).properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.TUESDAY, model.value().get(0).properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.MAY, model.value().get(0).properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1464984840, + Assertions.assertEquals(Month.JUNE, model.value().get(0).properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(164546469, model.value().get(0).properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST, + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.value().get(0).properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.value().get(0).properties().schedule().deadlineType()); - Assertions.assertEquals("y", model.value().get(0).properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.value().get(0).properties().schedule().deadlineType()); + Assertions.assertEquals("c", model.value().get(0).properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.value().get(0).properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.value().get(0).properties().notificationSettings().get(0).language()); - Assertions.assertFalse(model.value().get(0).properties().notificationSettings().get(0).disabled()); - Assertions.assertFalse(model.value().get(0).properties().disabled()); - Assertions.assertEquals("tzpofncckwyfzq", model.nextLink()); + Assertions.assertTrue(model.value().get(0).properties().notificationSettings().get(0).disabled()); + Assertions.assertTrue(model.value().get(0).properties().disabled()); + Assertions.assertEquals("agfuaxbezyiu", model.nextLink()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionPropertiesTests.java index 9df04027a6fc..dba1131ae874 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionPropertiesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionPropertiesTests.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionProperties; @@ -27,90 +26,69 @@ public final class ScheduledActionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionProperties model = BinaryData.fromString( - "{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-10-23T16:23:36Z\",\"endTime\":\"2021-01-20T17:16:43Z\",\"schedule\":{\"scheduledTime\":\"ukghimdblxgw\",\"timeZone\":\"mfnjh\",\"requestedWeekDays\":[\"Monday\"],\"requestedMonths\":[\"October\",\"All\"],\"requestedDaysOfTheMonth\":[1343784830],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":272856491,\"retryWindowInMinutes\":1631223460,\"onFailureAction\":\"Deallocate\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"jawneaiv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"lpcirelsf\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"abfatkl\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"hwuaanozjosp\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Succeeded\"}") + "{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-07-23T07:35:18Z\",\"endTime\":\"2021-08-03T08:21:01Z\",\"schedule\":{\"scheduledTime\":\"ulpkudjkrl\",\"timeZone\":\"hbzhfepg\",\"requestedWeekDays\":[\"Tuesday\",\"Monday\",\"Friday\"],\"requestedMonths\":[\"All\"],\"requestedDaysOfTheMonth\":[208705149,1054800376,1323879070,149734817],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":2010275395,\"retryWindowInMinutes\":78216934}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"l\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Deleting\"}") .toObject(ScheduledActionProperties.class); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.resourceType()); - Assertions.assertEquals(ScheduledActionType.START, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T16:23:36Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T17:16:43Z"), model.endTime()); - Assertions.assertEquals("ukghimdblxgw", model.schedule().scheduledTime()); - Assertions.assertEquals("mfnjh", model.schedule().timeZone()); - Assertions.assertEquals(WeekDay.MONDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.OCTOBER, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(1343784830, model.schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T07:35:18Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T08:21:01Z"), model.endTime()); + Assertions.assertEquals("ulpkudjkrl", model.schedule().scheduledTime()); + Assertions.assertEquals("hbzhfepg", model.schedule().timeZone()); + Assertions.assertEquals(WeekDay.TUESDAY, model.schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.ALL, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(208705149, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(272856491, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1631223460, - model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DEALLOCATE, - model.schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.schedule().deadlineType()); - Assertions.assertEquals("jawneaiv", model.notificationSettings().get(0).destination()); + Assertions.assertEquals(2010275395, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(78216934, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.schedule().deadlineType()); + Assertions.assertEquals("l", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); Assertions.assertTrue(model.notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.disabled()); + Assertions.assertFalse(model.disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionProperties model - = new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE_SCALE_SET) - .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2021-10-23T16:23:36Z")) - .withEndTime(OffsetDateTime.parse("2021-01-20T17:16:43Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("ukghimdblxgw") - .withTimeZone("mfnjh") - .withRequestedWeekDays(Arrays.asList(WeekDay.MONDAY)) - .withRequestedMonths(Arrays.asList(Month.OCTOBER, Month.ALL)) - .withRequestedDaysOfTheMonth(Arrays.asList(1343784830)) - .withExecutionParameters(new ExecutionParameters() - .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(272856491) - .withRetryWindowInMinutes(1631223460) - .withOnFailureAction(ResourceOperationType.DEALLOCATE))) - .withDeadlineType(DeadlineType.INITIATE_AT)) - .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("jawneaiv") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("lpcirelsf") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("abfatkl") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("hwuaanozjosp") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false))) - .withDisabled(true); + ScheduledActionProperties model = new ScheduledActionProperties() + .withResourceType(ResourceType.VIRTUAL_MACHINE_SCALE_SET) + .withActionType(ScheduledActionType.HIBERNATE) + .withStartTime(OffsetDateTime.parse("2021-07-23T07:35:18Z")) + .withEndTime(OffsetDateTime.parse("2021-08-03T08:21:01Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("ulpkudjkrl") + .withTimeZone("hbzhfepg") + .withRequestedWeekDays(Arrays.asList(WeekDay.TUESDAY, WeekDay.MONDAY, WeekDay.FRIDAY)) + .withRequestedMonths(Arrays.asList(Month.ALL)) + .withRequestedDaysOfTheMonth(Arrays.asList(208705149, 1054800376, 1323879070, 149734817)) + .withExecutionParameters(new ExecutionParameters() + .withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(2010275395).withRetryWindowInMinutes(78216934))) + .withDeadlineType(DeadlineType.UNKNOWN)) + .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("l") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true))) + .withDisabled(false); model = BinaryData.fromObject(model).toObject(ScheduledActionProperties.class); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.resourceType()); - Assertions.assertEquals(ScheduledActionType.START, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T16:23:36Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T17:16:43Z"), model.endTime()); - Assertions.assertEquals("ukghimdblxgw", model.schedule().scheduledTime()); - Assertions.assertEquals("mfnjh", model.schedule().timeZone()); - Assertions.assertEquals(WeekDay.MONDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.OCTOBER, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(1343784830, model.schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T07:35:18Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T08:21:01Z"), model.endTime()); + Assertions.assertEquals("ulpkudjkrl", model.schedule().scheduledTime()); + Assertions.assertEquals("hbzhfepg", model.schedule().timeZone()); + Assertions.assertEquals(WeekDay.TUESDAY, model.schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.ALL, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(208705149, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(272856491, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1631223460, - model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DEALLOCATE, - model.schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.schedule().deadlineType()); - Assertions.assertEquals("jawneaiv", model.notificationSettings().get(0).destination()); + Assertions.assertEquals(2010275395, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(78216934, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.schedule().deadlineType()); + Assertions.assertEquals("l", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); Assertions.assertTrue(model.notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.disabled()); + Assertions.assertFalse(model.disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourceInnerTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourceInnerTests.java index 771a39d31aa9..63c90afc26d4 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourceInnerTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourceInnerTests.java @@ -16,10 +16,10 @@ public final class ScheduledActionResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionResourceInner model = BinaryData.fromString( - "{\"name\":\"vglsbjjca\",\"id\":\"vxb\",\"type\":\"vudutncor\",\"resourceId\":\"r\",\"notificationSettings\":[{\"destination\":\"tvcof\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"kgjubgdknnqvsazn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"udsgs\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"c\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]}") + "{\"name\":\"ou\",\"id\":\"nvudwtiukb\",\"type\":\"ngkpocipazy\",\"resourceId\":\"o\",\"notificationSettings\":[{\"destination\":\"kgjn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ygevqzntypmrbpiz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"sdpydnfyhxdeoejz\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"sjttgzfbish\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}") .toObject(ScheduledActionResourceInner.class); - Assertions.assertEquals("r", model.resourceId()); - Assertions.assertEquals("tvcof", model.notificationSettings().get(0).destination()); + Assertions.assertEquals("o", model.resourceId()); + Assertions.assertEquals("kgjn", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); Assertions.assertFalse(model.notificationSettings().get(0).disabled()); @@ -27,27 +27,27 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionResourceInner model = new ScheduledActionResourceInner().withResourceId("r") + ScheduledActionResourceInner model = new ScheduledActionResourceInner().withResourceId("o") .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("tvcof") + new NotificationProperties().withDestination("kgjn") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(false), - new NotificationProperties().withDestination("kgjubgdknnqvsazn") + new NotificationProperties().withDestination("ygevqzntypmrbpiz") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(false), - new NotificationProperties().withDestination("udsgs") + new NotificationProperties().withDestination("sdpydnfyhxdeoejz") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(false), - new NotificationProperties().withDestination("c") + new NotificationProperties().withDestination("sjttgzfbish") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) - .withDisabled(false))); + .withDisabled(true))); model = BinaryData.fromObject(model).toObject(ScheduledActionResourceInner.class); - Assertions.assertEquals("r", model.resourceId()); - Assertions.assertEquals("tvcof", model.notificationSettings().get(0).destination()); + Assertions.assertEquals("o", model.resourceId()); + Assertions.assertEquals("kgjn", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); Assertions.assertFalse(model.notificationSettings().get(0).disabled()); diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesInnerTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesInnerTests.java index bc6dd8c3e79a..543c6b6e85e4 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesInnerTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesInnerTests.java @@ -11,7 +11,6 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; import com.azure.resourcemanager.computeschedule.models.WeekDay; @@ -22,30 +21,28 @@ public final class ScheduledActionResourcesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionResourcesInner model = BinaryData.fromString( - "{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-04-06T04:39:54Z\",\"endTime\":\"2021-10-06T19:57:55Z\",\"schedule\":{\"scheduledTime\":\"vvwxqi\",\"timeZone\":\"y\",\"requestedWeekDays\":[\"All\",\"Monday\"],\"requestedMonths\":[\"February\"],\"requestedDaysOfTheMonth\":[2001486807,1905526604],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1085300316,\"retryWindowInMinutes\":197369131,\"onFailureAction\":\"Delete\"}},\"deadlineType\":\"CompleteBy\"},\"notificationSettings\":[{\"destination\":\"dbodacizsjqlhkrr\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"ghvxndzwmkrefa\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},\"id\":\"kqnyh\",\"name\":\"b\",\"type\":\"j\"}") + "{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-06-16T02:23:20Z\",\"endTime\":\"2020-12-27T11:26:29Z\",\"schedule\":{\"scheduledTime\":\"bckhsmtxpsi\",\"timeZone\":\"btfhvpesaps\",\"requestedWeekDays\":[\"Tuesday\",\"Friday\",\"Sunday\",\"All\"],\"requestedMonths\":[\"October\",\"October\"],\"requestedDaysOfTheMonth\":[871941711,1056627326],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1234804558,\"retryWindowInMinutes\":1335454628}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"cwscwsvlx\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"wrupqsxvnmicykvc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"lo\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"fj\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"bttk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"nv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ermclfplphoxuscr\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},\"id\":\"psbjta\",\"name\":\"qugxywpmueefjzwf\",\"type\":\"kqujidsuyono\"}") .toObject(ScheduledActionResourcesInner.class); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T04:39:54Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-06T19:57:55Z"), model.properties().endTime()); - Assertions.assertEquals("vvwxqi", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("y", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.ALL, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.FEBRUARY, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(2001486807, model.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + Assertions.assertEquals(ScheduledActionType.START, model.properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-16T02:23:20Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T11:26:29Z"), model.properties().endTime()); + Assertions.assertEquals("bckhsmtxpsi", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("btfhvpesaps", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.TUESDAY, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.OCTOBER, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(871941711, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1085300316, + Assertions.assertEquals(1234804558, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(197369131, + Assertions.assertEquals(1335454628, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, - model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.properties().schedule().deadlineType()); - Assertions.assertEquals("dbodacizsjqlhkrr", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.properties().schedule().deadlineType()); + Assertions.assertEquals("cwscwsvlx", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); - Assertions.assertFalse(model.properties().notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.properties().disabled()); + Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); + Assertions.assertFalse(model.properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesListResultTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesListResultTests.java index d20b47572127..ed0c1d9c7031 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesListResultTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionResourcesListResultTests.java @@ -21,32 +21,32 @@ public final class ScheduledActionResourcesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionResourcesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-08-12T10:49:45Z\",\"endTime\":\"2021-02-28T06:47:58Z\",\"schedule\":{\"scheduledTime\":\"dwmsweypqwd\",\"timeZone\":\"ggicccnxqhue\",\"requestedWeekDays\":[\"Tuesday\",\"Sunday\",\"Saturday\",\"Friday\"],\"requestedMonths\":[\"June\",\"July\",\"September\",\"December\"],\"requestedDaysOfTheMonth\":[596743052,798208756],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"dtclusiypb\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"gusl\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ygqukyhejh\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"p\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"pqvujzraehtwdwrf\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"yrcdlbhshfwprac\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},\"id\":\"khevxccedc\",\"name\":\"nmdyodnwzxl\",\"type\":\"jc\"}],\"nextLink\":\"hlt\"}") + "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2020-12-28T00:18:51Z\",\"endTime\":\"2021-09-16T11:30:17Z\",\"schedule\":{\"scheduledTime\":\"ytxhp\",\"timeZone\":\"xbzpfzab\",\"requestedWeekDays\":[\"Tuesday\",\"All\",\"Tuesday\",\"All\"],\"requestedMonths\":[\"October\",\"July\"],\"requestedDaysOfTheMonth\":[1557005906],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"vplwzbhv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"osvmk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"gmgsxnkjzkde\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]},\"id\":\"pwiyig\",\"name\":\"xpkd\",\"type\":\"zb\"}],\"nextLink\":\"uebbaumnyqup\"}") .toObject(ScheduledActionResourcesListResult.class); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.value().get(0).properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.START, model.value().get(0).properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T10:49:45Z"), + Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.value().get(0).properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-28T00:18:51Z"), model.value().get(0).properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-28T06:47:58Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T11:30:17Z"), model.value().get(0).properties().endTime()); - Assertions.assertEquals("dwmsweypqwd", model.value().get(0).properties().schedule().scheduledTime()); - Assertions.assertEquals("ggicccnxqhue", model.value().get(0).properties().schedule().timeZone()); + Assertions.assertEquals("ytxhp", model.value().get(0).properties().schedule().scheduledTime()); + Assertions.assertEquals("xbzpfzab", model.value().get(0).properties().schedule().timeZone()); Assertions.assertEquals(WeekDay.TUESDAY, model.value().get(0).properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.JUNE, model.value().get(0).properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(596743052, + Assertions.assertEquals(Month.OCTOBER, model.value().get(0).properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(1557005906, model.value().get(0).properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(OptimizationPreference.COST, model.value().get(0).properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.value().get(0).properties().schedule().deadlineType()); - Assertions.assertEquals("dtclusiypb", + Assertions.assertEquals(DeadlineType.UNKNOWN, model.value().get(0).properties().schedule().deadlineType()); + Assertions.assertEquals("vplwzbhv", model.value().get(0).properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.value().get(0).properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.value().get(0).properties().notificationSettings().get(0).language()); - Assertions.assertFalse(model.value().get(0).properties().notificationSettings().get(0).disabled()); + Assertions.assertTrue(model.value().get(0).properties().notificationSettings().get(0).disabled()); Assertions.assertFalse(model.value().get(0).properties().disabled()); - Assertions.assertEquals("hlt", model.nextLink()); + Assertions.assertEquals("uebbaumnyqup", model.nextLink()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdatePropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdatePropertiesTests.java index bad17e3a820f..a54d755fddbe 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdatePropertiesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdatePropertiesTests.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -27,80 +26,71 @@ public final class ScheduledActionUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionUpdateProperties model = BinaryData.fromString( - "{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-09-02T14:49:34Z\",\"endTime\":\"2021-06-19T09:32:28Z\",\"schedule\":{\"scheduledTime\":\"sexnevfdnw\",\"timeZone\":\"wmewzsyy\",\"requestedWeekDays\":[\"Wednesday\",\"Sunday\"],\"requestedMonths\":[\"June\",\"February\",\"September\"],\"requestedDaysOfTheMonth\":[414197490,2135802257],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":2074818266,\"retryWindowInMinutes\":552907355,\"onFailureAction\":\"Delete\"}},\"deadlineType\":\"CompleteBy\"},\"notificationSettings\":[{\"destination\":\"wkqbrqu\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"exiili\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false}") + "{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-01-14T00:40:13Z\",\"endTime\":\"2021-01-18T17:02:06Z\",\"schedule\":{\"scheduledTime\":\"dt\",\"timeZone\":\"hzrvqd\",\"requestedWeekDays\":[\"Tuesday\",\"Sunday\"],\"requestedMonths\":[\"October\",\"December\"],\"requestedDaysOfTheMonth\":[1370032032,837766841],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":336183826,\"retryWindowInMinutes\":1522081541}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"ktzlcuiywg\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true}") .toObject(ScheduledActionUpdateProperties.class); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-02T14:49:34Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T09:32:28Z"), model.endTime()); - Assertions.assertEquals("sexnevfdnw", model.schedule().scheduledTime()); - Assertions.assertEquals("wmewzsyy", model.schedule().timeZone()); - Assertions.assertEquals(WeekDay.WEDNESDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.JUNE, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(414197490, model.schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(ScheduledActionType.START, model.actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-14T00:40:13Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T17:02:06Z"), model.endTime()); + Assertions.assertEquals("dt", model.schedule().scheduledTime()); + Assertions.assertEquals("hzrvqd", model.schedule().timeZone()); + Assertions.assertEquals(WeekDay.TUESDAY, model.schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.OCTOBER, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(1370032032, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(2074818266, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(552907355, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, - model.schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); - Assertions.assertEquals("wkqbrqu", model.notificationSettings().get(0).destination()); + Assertions.assertEquals(336183826, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1522081541, + model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.schedule().deadlineType()); + Assertions.assertEquals("ktzlcuiywg", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); - Assertions.assertFalse(model.notificationSettings().get(0).disabled()); - Assertions.assertFalse(model.disabled()); + Assertions.assertTrue(model.notificationSettings().get(0).disabled()); + Assertions.assertTrue(model.disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionUpdateProperties model - = new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) - .withActionType(ScheduledActionType.HIBERNATE) - .withStartTime(OffsetDateTime.parse("2021-09-02T14:49:34Z")) - .withEndTime(OffsetDateTime.parse("2021-06-19T09:32:28Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("sexnevfdnw") - .withTimeZone("wmewzsyy") - .withRequestedWeekDays(Arrays.asList(WeekDay.WEDNESDAY, WeekDay.SUNDAY)) - .withRequestedMonths(Arrays.asList(Month.JUNE, Month.FEBRUARY, Month.SEPTEMBER)) - .withRequestedDaysOfTheMonth(Arrays.asList(414197490, 2135802257)) - .withExecutionParameters( - new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) - .withRetryPolicy(new RetryPolicy().withRetryCount(2074818266) - .withRetryWindowInMinutes(552907355) - .withOnFailureAction(ResourceOperationType.DELETE))) - .withDeadlineType(DeadlineType.COMPLETE_BY)) - .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("wkqbrqu") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("exiili") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(false))) - .withDisabled(false); + ScheduledActionUpdateProperties model = new ScheduledActionUpdateProperties() + .withResourceType(ResourceType.VIRTUAL_MACHINE) + .withActionType(ScheduledActionType.START) + .withStartTime(OffsetDateTime.parse("2021-01-14T00:40:13Z")) + .withEndTime(OffsetDateTime.parse("2021-01-18T17:02:06Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("dt") + .withTimeZone("hzrvqd") + .withRequestedWeekDays(Arrays.asList(WeekDay.TUESDAY, WeekDay.SUNDAY)) + .withRequestedMonths(Arrays.asList(Month.OCTOBER, Month.DECEMBER)) + .withRequestedDaysOfTheMonth(Arrays.asList(1370032032, 837766841)) + .withExecutionParameters(new ExecutionParameters() + .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(336183826).withRetryWindowInMinutes(1522081541))) + .withDeadlineType(DeadlineType.UNKNOWN)) + .withNotificationSettings(Arrays.asList(new NotificationProperties().withDestination("ktzlcuiywg") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true))) + .withDisabled(true); model = BinaryData.fromObject(model).toObject(ScheduledActionUpdateProperties.class); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-02T14:49:34Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T09:32:28Z"), model.endTime()); - Assertions.assertEquals("sexnevfdnw", model.schedule().scheduledTime()); - Assertions.assertEquals("wmewzsyy", model.schedule().timeZone()); - Assertions.assertEquals(WeekDay.WEDNESDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.JUNE, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(414197490, model.schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(ScheduledActionType.START, model.actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-14T00:40:13Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T17:02:06Z"), model.endTime()); + Assertions.assertEquals("dt", model.schedule().scheduledTime()); + Assertions.assertEquals("hzrvqd", model.schedule().timeZone()); + Assertions.assertEquals(WeekDay.TUESDAY, model.schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.OCTOBER, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(1370032032, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(2074818266, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(552907355, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, - model.schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); - Assertions.assertEquals("wkqbrqu", model.notificationSettings().get(0).destination()); + Assertions.assertEquals(336183826, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1522081541, + model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(DeadlineType.UNKNOWN, model.schedule().deadlineType()); + Assertions.assertEquals("ktzlcuiywg", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); - Assertions.assertFalse(model.notificationSettings().get(0).disabled()); - Assertions.assertFalse(model.disabled()); + Assertions.assertTrue(model.notificationSettings().get(0).disabled()); + Assertions.assertTrue(model.disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdateTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdateTests.java index 80034f1022b4..a6a24eb49e4d 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdateTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionUpdateTests.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -30,90 +29,90 @@ public final class ScheduledActionUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionUpdate model = BinaryData.fromString( - "{\"tags\":{\"dunyg\":\"qgge\",\"lr\":\"eqidbqfatpx\",\"dmjsjqb\":\"cyjmoadsuvarmy\",\"yc\":\"hhyxxrw\"},\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-03-31T06:04:43Z\",\"endTime\":\"2021-01-03T15:01:22Z\",\"schedule\":{\"scheduledTime\":\"areqna\",\"timeZone\":\"xqugjhkycubedd\",\"requestedWeekDays\":[\"All\",\"Tuesday\",\"Saturday\"],\"requestedMonths\":[\"October\"],\"requestedDaysOfTheMonth\":[1153520576],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1473869810,\"retryWindowInMinutes\":1723578922,\"onFailureAction\":\"Create\"}},\"deadlineType\":\"CompleteBy\"},\"notificationSettings\":[{\"destination\":\"q\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"byxbaaabjy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false}}") + "{\"tags\":{\"ctbzaq\":\"lovmclwhijcoe\",\"dkexxppofm\":\"qsycbkbfkgu\",\"vpmouexhdzxib\":\"axcfjpgddtocjjx\",\"wndeicbtwnp\":\"eojnxqbzvddn\"},\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-09-17T10:09:05Z\",\"endTime\":\"2021-02-17T19:22:59Z\",\"schedule\":{\"scheduledTime\":\"fcyddg\",\"timeZone\":\"mjthjqkwp\",\"requestedWeekDays\":[\"Tuesday\",\"Sunday\",\"Wednesday\",\"Tuesday\"],\"requestedMonths\":[\"April\",\"March\",\"September\",\"October\"],\"requestedDaysOfTheMonth\":[804437183,1200172783],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":950690565,\"retryWindowInMinutes\":374026778}},\"deadlineType\":\"CompleteBy\"},\"notificationSettings\":[{\"destination\":\"bjoghmewuamau\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"vvtpgvdfgio\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"tqxln\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true}}") .toObject(ScheduledActionUpdate.class); - Assertions.assertEquals("qgge", model.tags().get("dunyg")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T06:04:43Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-03T15:01:22Z"), model.properties().endTime()); - Assertions.assertEquals("areqna", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("xqugjhkycubedd", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.ALL, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.OCTOBER, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1153520576, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals("lovmclwhijcoe", model.tags().get("ctbzaq")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.properties().resourceType()); + Assertions.assertEquals(ScheduledActionType.START, model.properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T10:09:05Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T19:22:59Z"), model.properties().endTime()); + Assertions.assertEquals("fcyddg", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("mjthjqkwp", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.TUESDAY, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.APRIL, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(804437183, model.properties().schedule().requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1473869810, + Assertions.assertEquals(950690565, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1723578922, + Assertions.assertEquals(374026778, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.CREATE, - model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.properties().schedule().deadlineType()); - Assertions.assertEquals("q", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals("bjoghmewuamau", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); - Assertions.assertFalse(model.properties().disabled()); + Assertions.assertTrue(model.properties().disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduledActionUpdate model - = new ScheduledActionUpdate() - .withTags(mapOf("dunyg", "qgge", "lr", "eqidbqfatpx", "dmjsjqb", "cyjmoadsuvarmy", "yc", "hhyxxrw")) - .withProperties( - new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) - .withActionType(ScheduledActionType.HIBERNATE) - .withStartTime(OffsetDateTime.parse("2021-03-31T06:04:43Z")) - .withEndTime(OffsetDateTime.parse("2021-01-03T15:01:22Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("areqna") - .withTimeZone("xqugjhkycubedd") - .withRequestedWeekDays(Arrays.asList(WeekDay.ALL, WeekDay.TUESDAY, WeekDay.SATURDAY)) - .withRequestedMonths(Arrays.asList(Month.OCTOBER)) - .withRequestedDaysOfTheMonth(Arrays.asList(1153520576)) - .withExecutionParameters(new ExecutionParameters() - .withOptimizationPreference(OptimizationPreference.AVAILABILITY) - .withRetryPolicy(new RetryPolicy().withRetryCount(1473869810) - .withRetryWindowInMinutes(1723578922) - .withOnFailureAction(ResourceOperationType.CREATE))) - .withDeadlineType(DeadlineType.COMPLETE_BY)) - .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("q") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true), - new NotificationProperties().withDestination("byxbaaabjy") - .withType(NotificationType.EMAIL) - .withLanguage(Language.EN_US) - .withDisabled(true))) - .withDisabled(false)); + ScheduledActionUpdate model = new ScheduledActionUpdate() + .withTags(mapOf("ctbzaq", "lovmclwhijcoe", "dkexxppofm", "qsycbkbfkgu", "vpmouexhdzxib", "axcfjpgddtocjjx", + "wndeicbtwnp", "eojnxqbzvddn")) + .withProperties( + new ScheduledActionUpdateProperties().withResourceType(ResourceType.VIRTUAL_MACHINE_SCALE_SET) + .withActionType(ScheduledActionType.START) + .withStartTime(OffsetDateTime.parse("2021-09-17T10:09:05Z")) + .withEndTime(OffsetDateTime.parse("2021-02-17T19:22:59Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("fcyddg") + .withTimeZone("mjthjqkwp") + .withRequestedWeekDays( + Arrays.asList(WeekDay.TUESDAY, WeekDay.SUNDAY, WeekDay.WEDNESDAY, WeekDay.TUESDAY)) + .withRequestedMonths(Arrays.asList(Month.APRIL, Month.MARCH, Month.SEPTEMBER, Month.OCTOBER)) + .withRequestedDaysOfTheMonth(Arrays.asList(804437183, 1200172783)) + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.AVAILABILITY) + .withRetryPolicy( + new RetryPolicy().withRetryCount(950690565).withRetryWindowInMinutes(374026778))) + .withDeadlineType(DeadlineType.COMPLETE_BY)) + .withNotificationSettings(Arrays.asList( + new NotificationProperties().withDestination("bjoghmewuamau") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("vvtpgvdfgio") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(false), + new NotificationProperties().withDestination("tqxln") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true))) + .withDisabled(true)); model = BinaryData.fromObject(model).toObject(ScheduledActionUpdate.class); - Assertions.assertEquals("qgge", model.tags().get("dunyg")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, model.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T06:04:43Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-03T15:01:22Z"), model.properties().endTime()); - Assertions.assertEquals("areqna", model.properties().schedule().scheduledTime()); - Assertions.assertEquals("xqugjhkycubedd", model.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.ALL, model.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.OCTOBER, model.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1153520576, model.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals("lovmclwhijcoe", model.tags().get("ctbzaq")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.properties().resourceType()); + Assertions.assertEquals(ScheduledActionType.START, model.properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T10:09:05Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T19:22:59Z"), model.properties().endTime()); + Assertions.assertEquals("fcyddg", model.properties().schedule().scheduledTime()); + Assertions.assertEquals("mjthjqkwp", model.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.TUESDAY, model.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.APRIL, model.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(804437183, model.properties().schedule().requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.AVAILABILITY, model.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1473869810, + Assertions.assertEquals(950690565, model.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1723578922, + Assertions.assertEquals(374026778, model.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.CREATE, - model.properties().schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.properties().schedule().deadlineType()); - Assertions.assertEquals("q", model.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals("bjoghmewuamau", model.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.properties().notificationSettings().get(0).language()); Assertions.assertTrue(model.properties().notificationSettings().get(0).disabled()); - Assertions.assertFalse(model.properties().disabled()); + Assertions.assertTrue(model.properties().disabled()); } // Use "Map.of" if available diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateMockTests.java index 96a789f6ea51..0ab89af671ad 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsCreateOrUpdateMockTests.java @@ -17,7 +17,6 @@ import com.azure.resourcemanager.computeschedule.models.NotificationProperties; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; @@ -38,7 +37,7 @@ public final class ScheduledActionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-04-09T08:31:17Z\",\"endTime\":\"2021-09-23T12:01:36Z\",\"schedule\":{\"scheduledTime\":\"khyawfvjlboxqv\",\"timeZone\":\"jlmxhomdynhd\",\"requestedWeekDays\":[\"Tuesday\",\"All\"],\"requestedMonths\":[\"August\",\"All\",\"February\"],\"requestedDaysOfTheMonth\":[1256720827,943942925],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":2125541718,\"retryWindowInMinutes\":1518095696,\"onFailureAction\":\"Create\"}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"ezwwv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"vv\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"hhqyi\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Succeeded\"},\"location\":\"uwmncs\",\"tags\":{\"huzqgn\":\"jfybvpoekrsgsgb\"},\"id\":\"dgkynscliqhzvhxn\",\"name\":\"omtkub\",\"type\":\"tppn\"}"; + = "{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Deallocate\",\"startTime\":\"2021-09-23T16:40:17Z\",\"endTime\":\"2021-05-16T03:51:54Z\",\"schedule\":{\"scheduledTime\":\"usdsttwv\",\"timeZone\":\"gvbbejdcng\",\"requestedWeekDays\":[\"Monday\"],\"requestedMonths\":[\"February\",\"January\"],\"requestedDaysOfTheMonth\":[840228808,386350287,127978460],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":1964426059,\"retryWindowInMinutes\":632499232}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"enuuzkopbm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"woyuhhziuief\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Succeeded\"},\"location\":\"zqhof\",\"tags\":{\"u\":\"ae\",\"icslfaoq\":\"ah\",\"kaivwit\":\"piyylhalnswhccsp\",\"bwemhairs\":\"scywuggwoluhc\"},\"id\":\"rgzdwmsweyp\",\"name\":\"w\",\"type\":\"xggicccnxqhuexmk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -49,62 +48,68 @@ public void testCreateOrUpdate() throws Exception { ScheduledAction response = manager.scheduledActions() - .define("ilozapeewchpxlk") - .withRegion("vzvfvaawzqadfl") - .withExistingResourceGroup("jlxr") - .withTags(mapOf("ndtic", "riglaec")) + .define("dmovsm") + .withRegion("oamciodh") + .withExistingResourceGroup("u") + .withTags(mapOf("gokdwbwhks", "zxkhnzbonlwnto", "qgsfraoyzkoow", "zcmrvexztvb", "aldsy", "lmnguxaw", + "znkbykutwpfhpagm", "uximerqfobw")) .withProperties( - new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE_SCALE_SET) - .withActionType(ScheduledActionType.START) - .withStartTime(OffsetDateTime.parse("2021-12-02T10:26:58Z")) - .withEndTime(OffsetDateTime.parse("2021-02-16T10:40:04Z")) - .withSchedule(new ScheduledActionsSchedule().withScheduledTime("cslevufuztckt") - .withTimeZone("h") - .withRequestedWeekDays(Arrays.asList(WeekDay.FRIDAY, WeekDay.TUESDAY, WeekDay.WEDNESDAY)) - .withRequestedMonths(Arrays.asList(Month.MARCH, Month.JULY, Month.ALL, Month.AUGUST)) - .withRequestedDaysOfTheMonth(Arrays.asList(1160577956, 871560508)) - .withExecutionParameters(new ExecutionParameters() - .withOptimizationPreference(OptimizationPreference.AVAILABILITY) - .withRetryPolicy(new RetryPolicy().withRetryCount(2097189339) - .withRetryWindowInMinutes(1766670118) - .withOnFailureAction(ResourceOperationType.START))) - .withDeadlineType(DeadlineType.COMPLETE_BY)) + new ScheduledActionProperties().withResourceType(ResourceType.VIRTUAL_MACHINE) + .withActionType(ScheduledActionType.HIBERNATE) + .withStartTime(OffsetDateTime.parse("2021-04-25T07:43:26Z")) + .withEndTime(OffsetDateTime.parse("2021-07-14T09:12:45Z")) + .withSchedule(new ScheduledActionsSchedule().withScheduledTime("q") + .withTimeZone("efkifr") + .withRequestedWeekDays(Arrays.asList(WeekDay.SUNDAY, WeekDay.MONDAY)) + .withRequestedMonths(Arrays.asList(Month.APRIL, Month.AUGUST, Month.OCTOBER)) + .withRequestedDaysOfTheMonth(Arrays.asList(1383309544, 829159187)) + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) + .withRetryPolicy(new RetryPolicy().withRetryCount(1252448159) + .withRetryWindowInMinutes(1601819937))) + .withDeadlineType(DeadlineType.INITIATE_AT)) .withNotificationSettings(Arrays.asList( - new NotificationProperties().withDestination("zgkrvqe") + new NotificationProperties().withDestination("bjcntujitc") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) - .withDisabled(false), - new NotificationProperties().withDestination("pryu") + .withDisabled(true), + new NotificationProperties().withDestination("wwa") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("v") + .withType(NotificationType.EMAIL) + .withLanguage(Language.EN_US) + .withDisabled(true), + new NotificationProperties().withDestination("oqouicybxarzgszu") .withType(NotificationType.EMAIL) .withLanguage(Language.EN_US) .withDisabled(true))) - .withDisabled(false)) + .withDisabled(true)) .create(); - Assertions.assertEquals("uwmncs", response.location()); - Assertions.assertEquals("jfybvpoekrsgsgb", response.tags().get("huzqgn")); + Assertions.assertEquals("zqhof", response.location()); + Assertions.assertEquals("ae", response.tags().get("u")); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, response.properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.START, response.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T08:31:17Z"), response.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T12:01:36Z"), response.properties().endTime()); - Assertions.assertEquals("khyawfvjlboxqv", response.properties().schedule().scheduledTime()); - Assertions.assertEquals("jlmxhomdynhd", response.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, response.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.AUGUST, response.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(1256720827, response.properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(ScheduledActionType.DEALLOCATE, response.properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T16:40:17Z"), response.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T03:51:54Z"), response.properties().endTime()); + Assertions.assertEquals("usdsttwv", response.properties().schedule().scheduledTime()); + Assertions.assertEquals("gvbbejdcng", response.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.MONDAY, response.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.FEBRUARY, response.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(840228808, response.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST, response.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(2125541718, + Assertions.assertEquals(1964426059, response.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1518095696, + Assertions.assertEquals(632499232, response.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.CREATE, - response.properties().schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.UNKNOWN, response.properties().schedule().deadlineType()); - Assertions.assertEquals("ezwwv", response.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(DeadlineType.INITIATE_AT, response.properties().schedule().deadlineType()); + Assertions.assertEquals("enuuzkopbm", response.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.properties().notificationSettings().get(0).language()); - Assertions.assertFalse(response.properties().notificationSettings().get(0).disabled()); + Assertions.assertTrue(response.properties().notificationSettings().get(0).disabled()); Assertions.assertTrue(response.properties().disabled()); } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableWithResponseMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableWithResponseMockTests.java index 2f4ad366ca20..35ae9efe9419 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableWithResponseMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsDisableWithResponseMockTests.java @@ -27,7 +27,7 @@ public void testDisableWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.scheduledActions().disableWithResponse("mdjvlpj", "xkzb", com.azure.core.util.Context.NONE); + manager.scheduledActions().disableWithResponse("yq", "xzfe", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableWithResponseMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableWithResponseMockTests.java index c8390f9fe3e6..5da394cb3a99 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableWithResponseMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsEnableWithResponseMockTests.java @@ -27,7 +27,8 @@ public void testEnableWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.scheduledActions().enableWithResponse("msgeivsiykzk", "ncj", com.azure.core.util.Context.NONE); + manager.scheduledActions() + .enableWithResponse("ztppriolxorjalto", "mncwsobqwcsdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsExtensionPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsExtensionPropertiesTests.java index beab5fb6ed30..e3c22052f60a 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsExtensionPropertiesTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsExtensionPropertiesTests.java @@ -10,7 +10,6 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; import com.azure.resourcemanager.computeschedule.models.ScheduledActionsExtensionProperties; @@ -22,29 +21,26 @@ public final class ScheduledActionsExtensionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionsExtensionProperties model = BinaryData.fromString( - "{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-03-13T11:40:42Z\",\"endTime\":\"2021-01-26T06:16:25Z\",\"schedule\":{\"scheduledTime\":\"zs\",\"timeZone\":\"ab\",\"requestedWeekDays\":[\"Saturday\",\"Sunday\",\"Saturday\",\"Saturday\"],\"requestedMonths\":[\"January\",\"October\",\"June\",\"June\"],\"requestedDaysOfTheMonth\":[515392743,1073194543,591359047,387671304],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1795251983,\"retryWindowInMinutes\":1597087074,\"onFailureAction\":\"Start\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"cjabudurgkakmo\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Failed\",\"resourceNotificationSettings\":[{\"destination\":\"ouw\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"fzeeyebizik\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"lbjbsyb\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"t\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}]}") + "{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-06-27T00:13:21Z\",\"endTime\":\"2021-08-30T19:29:44Z\",\"schedule\":{\"scheduledTime\":\"qxtccmgyudx\",\"timeZone\":\"tlmoyrx\",\"requestedWeekDays\":[\"Thursday\",\"Monday\",\"Monday\",\"Friday\"],\"requestedMonths\":[\"March\"],\"requestedDaysOfTheMonth\":[1547725583,1508312014,1949820387,1417270726],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":291050041,\"retryWindowInMinutes\":203364386}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"rlhrxs\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Succeeded\",\"resourceNotificationSettings\":[{\"destination\":\"bpzkafkuwbc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}") .toObject(ScheduledActionsExtensionProperties.class); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, model.resourceType()); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, model.resourceType()); Assertions.assertEquals(ScheduledActionType.START, model.actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-13T11:40:42Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-26T06:16:25Z"), model.endTime()); - Assertions.assertEquals("zs", model.schedule().scheduledTime()); - Assertions.assertEquals("ab", model.schedule().timeZone()); - Assertions.assertEquals(WeekDay.SATURDAY, model.schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.JANUARY, model.schedule().requestedMonths().get(0)); - Assertions.assertEquals(515392743, model.schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T00:13:21Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T19:29:44Z"), model.endTime()); + Assertions.assertEquals("qxtccmgyudx", model.schedule().scheduledTime()); + Assertions.assertEquals("tlmoyrx", model.schedule().timeZone()); + Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.MARCH, model.schedule().requestedMonths().get(0)); + Assertions.assertEquals(1547725583, model.schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OptimizationPreference.COST, model.schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1795251983, model.schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1597087074, - model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.START, - model.schedule().executionParameters().retryPolicy().onFailureAction()); + Assertions.assertEquals(291050041, model.schedule().executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(203364386, model.schedule().executionParameters().retryPolicy().retryWindowInMinutes()); Assertions.assertEquals(DeadlineType.INITIATE_AT, model.schedule().deadlineType()); - Assertions.assertEquals("cjabudurgkakmo", model.notificationSettings().get(0).destination()); + Assertions.assertEquals("rlhrxs", model.notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, model.notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, model.notificationSettings().get(0).language()); - Assertions.assertFalse(model.notificationSettings().get(0).disabled()); - Assertions.assertTrue(model.disabled()); + Assertions.assertTrue(model.notificationSettings().get(0).disabled()); + Assertions.assertFalse(model.disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupWithResponseMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupWithResponseMockTests.java index 160e24b52a95..65ef8f589003 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsGetByResourceGroupWithResponseMockTests.java @@ -15,7 +15,6 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -30,7 +29,7 @@ public final class ScheduledActionsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-01-27T20:06:14Z\",\"endTime\":\"2021-10-08T11:59:32Z\",\"schedule\":{\"scheduledTime\":\"qioknssxmojm\",\"timeZone\":\"vpkjpr\",\"requestedWeekDays\":[\"Saturday\"],\"requestedMonths\":[\"March\"],\"requestedDaysOfTheMonth\":[344733635,497380476,1927018830],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":850929489,\"retryWindowInMinutes\":1540711967,\"onFailureAction\":\"Create\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"shmkxmaehvbbxur\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"n\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"kgxywr\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"lyhpluodpvruud\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":true,\"provisioningState\":\"Failed\"},\"location\":\"gktstvdxeclzedq\",\"tags\":{\"fbumlkx\":\"hzlhplodqkdlww\"},\"id\":\"rqjfsmlm\",\"name\":\"txhwgfws\",\"type\":\"tawc\"}"; + = "{\"properties\":{\"resourceType\":\"VirtualMachineScaleSet\",\"actionType\":\"Start\",\"startTime\":\"2021-11-18T02:02:33Z\",\"endTime\":\"2021-07-12T20:53:21Z\",\"schedule\":{\"scheduledTime\":\"efyw\",\"timeZone\":\"bpfvm\",\"requestedWeekDays\":[\"Wednesday\",\"Sunday\",\"Wednesday\",\"Friday\"],\"requestedMonths\":[\"August\",\"December\"],\"requestedDaysOfTheMonth\":[892669790,938616277],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":1209208693,\"retryWindowInMinutes\":1777343462}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"nubexk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"ondjmq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"omgkopkwho\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"qgxy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Failed\"},\"location\":\"mkcxozapvh\",\"tags\":{\"dd\":\"prglya\",\"rjxgciqib\":\"kcbcue\",\"sdqrhzoymibmrq\":\"hos\"},\"id\":\"ibahwflus\",\"name\":\"dtmhrkwofyyvoqa\",\"type\":\"piexpbtgiw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,33 +39,31 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ScheduledAction response = manager.scheduledActions() - .getByResourceGroupWithResponse("eamtmcz", "o", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("yqsluic", "dggkzzlvmbmpa", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gktstvdxeclzedq", response.location()); - Assertions.assertEquals("hzlhplodqkdlww", response.tags().get("fbumlkx")); - Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, response.properties().resourceType()); + Assertions.assertEquals("mkcxozapvh", response.location()); + Assertions.assertEquals("prglya", response.tags().get("dd")); + Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE_SCALE_SET, response.properties().resourceType()); Assertions.assertEquals(ScheduledActionType.START, response.properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-27T20:06:14Z"), response.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-08T11:59:32Z"), response.properties().endTime()); - Assertions.assertEquals("qioknssxmojm", response.properties().schedule().scheduledTime()); - Assertions.assertEquals("vpkjpr", response.properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.SATURDAY, response.properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.MARCH, response.properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(344733635, response.properties().schedule().requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T02:02:33Z"), response.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-12T20:53:21Z"), response.properties().endTime()); + Assertions.assertEquals("efyw", response.properties().schedule().scheduledTime()); + Assertions.assertEquals("bpfvm", response.properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.WEDNESDAY, response.properties().schedule().requestedWeekDays().get(0)); + Assertions.assertEquals(Month.AUGUST, response.properties().schedule().requestedMonths().get(0)); + Assertions.assertEquals(892669790, response.properties().schedule().requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.COST, response.properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(850929489, + Assertions.assertEquals(1209208693, response.properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1540711967, + Assertions.assertEquals(1777343462, response.properties().schedule().executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.CREATE, - response.properties().schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, response.properties().schedule().deadlineType()); - Assertions.assertEquals("shmkxmaehvbbxur", response.properties().notificationSettings().get(0).destination()); + Assertions.assertEquals(DeadlineType.UNKNOWN, response.properties().schedule().deadlineType()); + Assertions.assertEquals("nubexk", response.properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.properties().notificationSettings().get(0).language()); - Assertions.assertTrue(response.properties().notificationSettings().get(0).disabled()); - Assertions.assertTrue(response.properties().disabled()); + Assertions.assertFalse(response.properties().notificationSettings().get(0).disabled()); + Assertions.assertFalse(response.properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupMockTests.java index e90385ca2632..18a54fc092e5 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListByResourceGroupMockTests.java @@ -16,7 +16,6 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -31,7 +30,7 @@ public final class ScheduledActionsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-01-02T20:06:54Z\",\"endTime\":\"2021-02-04T04:44:46Z\",\"schedule\":{\"scheduledTime\":\"kkqfqjbvle\",\"timeZone\":\"rfmluiqtq\",\"requestedWeekDays\":[\"Friday\"],\"requestedMonths\":[\"September\",\"December\"],\"requestedDaysOfTheMonth\":[2022835438,141630952],\"executionParameters\":{\"optimizationPreference\":\"Availability\",\"retryPolicy\":{\"retryCount\":1989178696,\"retryWindowInMinutes\":1537574728,\"onFailureAction\":\"Deallocate\"}},\"deadlineType\":\"InitiateAt\"},\"notificationSettings\":[{\"destination\":\"bqgzslesjcbhern\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"djc\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"rbe\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"hbuffkmrq\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false}],\"disabled\":false,\"provisioningState\":\"Succeeded\"},\"location\":\"jfutacoebj\",\"tags\":{\"draufactkah\":\"zcjznmwcpmgua\",\"neekulfg\":\"ovajjziuxxps\",\"d\":\"lqubkwdlen\",\"pjuohminyfl\":\"utujba\"},\"id\":\"orwmduvwpklv\",\"name\":\"w\",\"type\":\"ygdxpgpqchis\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Start\",\"startTime\":\"2021-08-15T01:33:40Z\",\"endTime\":\"2021-03-28T20:58:03Z\",\"schedule\":{\"scheduledTime\":\"tdtkcn\",\"timeZone\":\"xwbpokulpiuj\",\"requestedWeekDays\":[\"Thursday\",\"Wednesday\"],\"requestedMonths\":[\"September\",\"March\",\"April\",\"September\"],\"requestedDaysOfTheMonth\":[361598801],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":1312962595,\"retryWindowInMinutes\":270206644}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"cciuqgbdbutau\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"uwhhmhykojoxafn\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"chkoymkcdyh\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true,\"provisioningState\":\"Canceled\"},\"location\":\"novvqfovljxy\",\"tags\":{\"yrs\":\"w\",\"ea\":\"dsytgadgvr\",\"arrwlquu\":\"neqn\",\"e\":\"jfqka\"},\"id\":\"iipfpubj\",\"name\":\"bwwift\",\"type\":\"hqkvpuvksgplsak\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -41,29 +40,29 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.scheduledActions().listByResourceGroup("ezbrhubskh", com.azure.core.util.Context.NONE); + = manager.scheduledActions().listByResourceGroup("wo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jfutacoebj", response.iterator().next().location()); - Assertions.assertEquals("zcjznmwcpmgua", response.iterator().next().tags().get("draufactkah")); + Assertions.assertEquals("novvqfovljxy", response.iterator().next().location()); + Assertions.assertEquals("w", response.iterator().next().tags().get("yrs")); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, response.iterator().next().properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.HIBERNATE, response.iterator().next().properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-02T20:06:54Z"), + Assertions.assertEquals(ScheduledActionType.START, response.iterator().next().properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T01:33:40Z"), response.iterator().next().properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-04T04:44:46Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T20:58:03Z"), response.iterator().next().properties().endTime()); - Assertions.assertEquals("kkqfqjbvle", response.iterator().next().properties().schedule().scheduledTime()); - Assertions.assertEquals("rfmluiqtq", response.iterator().next().properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.FRIDAY, + Assertions.assertEquals("tdtkcn", response.iterator().next().properties().schedule().scheduledTime()); + Assertions.assertEquals("xwbpokulpiuj", response.iterator().next().properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.THURSDAY, response.iterator().next().properties().schedule().requestedWeekDays().get(0)); Assertions.assertEquals(Month.SEPTEMBER, response.iterator().next().properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(2022835438, + Assertions.assertEquals(361598801, response.iterator().next().properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.AVAILABILITY, + Assertions.assertEquals(OptimizationPreference.COST, response.iterator().next().properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1989178696, + Assertions.assertEquals(1312962595, response.iterator().next().properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1537574728, + Assertions.assertEquals(270206644, response.iterator() .next() .properties() @@ -71,17 +70,15 @@ public void testListByResourceGroup() throws Exception { .executionParameters() .retryPolicy() .retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DEALLOCATE, - response.iterator().next().properties().schedule().executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, + Assertions.assertEquals(DeadlineType.UNKNOWN, response.iterator().next().properties().schedule().deadlineType()); - Assertions.assertEquals("bqgzslesjcbhern", + Assertions.assertEquals("cciuqgbdbutau", response.iterator().next().properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.iterator().next().properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.iterator().next().properties().notificationSettings().get(0).language()); Assertions.assertFalse(response.iterator().next().properties().notificationSettings().get(0).disabled()); - Assertions.assertFalse(response.iterator().next().properties().disabled()); + Assertions.assertTrue(response.iterator().next().properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListMockTests.java index 85d5fbb21f23..51e55177a474 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListMockTests.java @@ -16,7 +16,6 @@ import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.NotificationType; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.ResourceType; import com.azure.resourcemanager.computeschedule.models.ScheduledAction; import com.azure.resourcemanager.computeschedule.models.ScheduledActionType; @@ -31,7 +30,7 @@ public final class ScheduledActionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Deallocate\",\"startTime\":\"2021-04-10T21:01:23Z\",\"endTime\":\"2021-05-29T06:21:05Z\",\"schedule\":{\"scheduledTime\":\"crxgibb\",\"timeZone\":\"axconfozauo\",\"requestedWeekDays\":[\"Sunday\",\"Sunday\",\"Thursday\"],\"requestedMonths\":[\"November\",\"October\",\"February\"],\"requestedDaysOfTheMonth\":[816433674,650795079,866402462,2075854063],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1920670315,\"retryWindowInMinutes\":201179078,\"onFailureAction\":\"Delete\"}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"oldweyuqdu\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"rwrbi\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"lywjhh\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"msi\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":false,\"provisioningState\":\"Canceled\"},\"location\":\"dufiq\",\"tags\":{\"chvcyyysfgdo\":\"euzaof\",\"qonmacj\":\"cubiipuipw\",\"izsh\":\"k\",\"gmblrri\":\"vcimpev\"},\"id\":\"bywdxsmicc\",\"name\":\"rwfscjfnynszquj\",\"type\":\"zdvoqytibyowbb\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceType\":\"VirtualMachine\",\"actionType\":\"Hibernate\",\"startTime\":\"2021-01-14T10:56:19Z\",\"endTime\":\"2021-02-18T00:02:44Z\",\"schedule\":{\"scheduledTime\":\"ljphuopxodl\",\"timeZone\":\"iyntorzihle\",\"requestedWeekDays\":[\"Friday\",\"Wednesday\"],\"requestedMonths\":[\"October\"],\"requestedDaysOfTheMonth\":[1899163147,1407927145,2109654936,1609130326],\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":215958915,\"retryWindowInMinutes\":1371610491}},\"deadlineType\":\"Unknown\"},\"notificationSettings\":[{\"destination\":\"zqioxiysuii\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"dy\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"hqmibzyhwit\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"ynpcdpumnzgmwznm\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}],\"disabled\":true,\"provisioningState\":\"Succeeded\"},\"location\":\"hxbld\",\"tags\":{\"vokotllxdyh\":\"wrlkdmtn\",\"oocrkvcikhnv\":\"syocogjltdtbnnha\",\"gxk\":\"amqgxqquezikyw\"},\"id\":\"lla\",\"name\":\"melwuipiccjz\",\"type\":\"z\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -42,27 +41,27 @@ public void testList() throws Exception { PagedIterable response = manager.scheduledActions().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("dufiq", response.iterator().next().location()); - Assertions.assertEquals("euzaof", response.iterator().next().tags().get("chvcyyysfgdo")); + Assertions.assertEquals("hxbld", response.iterator().next().location()); + Assertions.assertEquals("wrlkdmtn", response.iterator().next().tags().get("vokotllxdyh")); Assertions.assertEquals(ResourceType.VIRTUAL_MACHINE, response.iterator().next().properties().resourceType()); - Assertions.assertEquals(ScheduledActionType.DEALLOCATE, response.iterator().next().properties().actionType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T21:01:23Z"), + Assertions.assertEquals(ScheduledActionType.HIBERNATE, response.iterator().next().properties().actionType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-14T10:56:19Z"), response.iterator().next().properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T06:21:05Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-02-18T00:02:44Z"), response.iterator().next().properties().endTime()); - Assertions.assertEquals("crxgibb", response.iterator().next().properties().schedule().scheduledTime()); - Assertions.assertEquals("axconfozauo", response.iterator().next().properties().schedule().timeZone()); - Assertions.assertEquals(WeekDay.SUNDAY, + Assertions.assertEquals("ljphuopxodl", response.iterator().next().properties().schedule().scheduledTime()); + Assertions.assertEquals("iyntorzihle", response.iterator().next().properties().schedule().timeZone()); + Assertions.assertEquals(WeekDay.FRIDAY, response.iterator().next().properties().schedule().requestedWeekDays().get(0)); - Assertions.assertEquals(Month.NOVEMBER, + Assertions.assertEquals(Month.OCTOBER, response.iterator().next().properties().schedule().requestedMonths().get(0)); - Assertions.assertEquals(816433674, + Assertions.assertEquals(1899163147, response.iterator().next().properties().schedule().requestedDaysOfTheMonth().get(0)); - Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + Assertions.assertEquals(OptimizationPreference.COST, response.iterator().next().properties().schedule().executionParameters().optimizationPreference()); - Assertions.assertEquals(1920670315, + Assertions.assertEquals(215958915, response.iterator().next().properties().schedule().executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(201179078, + Assertions.assertEquals(1371610491, response.iterator() .next() .properties() @@ -70,17 +69,15 @@ public void testList() throws Exception { .executionParameters() .retryPolicy() .retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, - response.iterator().next().properties().schedule().executionParameters().retryPolicy().onFailureAction()); Assertions.assertEquals(DeadlineType.UNKNOWN, response.iterator().next().properties().schedule().deadlineType()); - Assertions.assertEquals("oldweyuqdu", + Assertions.assertEquals("zqioxiysuii", response.iterator().next().properties().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.iterator().next().properties().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.iterator().next().properties().notificationSettings().get(0).language()); Assertions.assertTrue(response.iterator().next().properties().notificationSettings().get(0).disabled()); - Assertions.assertFalse(response.iterator().next().properties().disabled()); + Assertions.assertTrue(response.iterator().next().properties().disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesMockTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesMockTests.java index cb4ecc79a02b..38aecf5b4770 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesMockTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsListResourcesMockTests.java @@ -24,7 +24,7 @@ public final class ScheduledActionsListResourcesMockTests { @Test public void testListResources() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"smsks\",\"id\":\"pi\",\"type\":\"qolj\",\"resourceId\":\"kcgxxlxsffgcvi\",\"notificationSettings\":[{\"destination\":\"dwl\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"upfgfbk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":false},{\"destination\":\"hgkfmin\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true},{\"destination\":\"fttsttk\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}]}"; + = "{\"value\":[{\"name\":\"yrnxxmueedn\",\"id\":\"rdvstkwqqtch\",\"type\":\"lmfmtdaay\",\"resourceId\":\"dvwvgpio\",\"notificationSettings\":[{\"destination\":\"xrtfudxep\",\"type\":\"Email\",\"language\":\"en-us\",\"disabled\":true}]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,13 +34,13 @@ public void testListResources() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.scheduledActions().listResources("gyavu", "pthjoxo", com.azure.core.util.Context.NONE); + = manager.scheduledActions().listResources("v", "vvcnayr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kcgxxlxsffgcvi", response.iterator().next().resourceId()); - Assertions.assertEquals("dwl", response.iterator().next().notificationSettings().get(0).destination()); + Assertions.assertEquals("dvwvgpio", response.iterator().next().resourceId()); + Assertions.assertEquals("xrtfudxep", response.iterator().next().notificationSettings().get(0).destination()); Assertions.assertEquals(NotificationType.EMAIL, response.iterator().next().notificationSettings().get(0).type()); Assertions.assertEquals(Language.EN_US, response.iterator().next().notificationSettings().get(0).language()); - Assertions.assertFalse(response.iterator().next().notificationSettings().get(0).disabled()); + Assertions.assertTrue(response.iterator().next().notificationSettings().get(0).disabled()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsScheduleTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsScheduleTests.java index 9d84d847c940..e57f16499ecb 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsScheduleTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledActionsScheduleTests.java @@ -9,7 +9,6 @@ import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.Month; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.ScheduledActionsSchedule; import com.azure.resourcemanager.computeschedule.models.WeekDay; @@ -20,48 +19,42 @@ public final class ScheduledActionsScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduledActionsSchedule model = BinaryData.fromString( - "{\"scheduledTime\":\"xagl\",\"timeZone\":\"vimjwos\",\"requestedWeekDays\":[\"Tuesday\"],\"requestedMonths\":[\"September\"],\"requestedDaysOfTheMonth\":[835762361,2142879113,992939840,1365275067],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1686364184,\"retryWindowInMinutes\":2056764824,\"onFailureAction\":\"Unknown\"}},\"deadlineType\":\"InitiateAt\"}") + "{\"scheduledTime\":\"dxob\",\"timeZone\":\"bdxkqpxokaj\",\"requestedWeekDays\":[\"Wednesday\",\"All\",\"All\"],\"requestedMonths\":[\"All\",\"May\",\"November\"],\"requestedDaysOfTheMonth\":[1260380641,971264827],\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1867037750,\"retryWindowInMinutes\":1107396913}},\"deadlineType\":\"CompleteBy\"}") .toObject(ScheduledActionsSchedule.class); - Assertions.assertEquals("xagl", model.scheduledTime()); - Assertions.assertEquals("vimjwos", model.timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, model.requestedWeekDays().get(0)); - Assertions.assertEquals(Month.SEPTEMBER, model.requestedMonths().get(0)); - Assertions.assertEquals(835762361, model.requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals("dxob", model.scheduledTime()); + Assertions.assertEquals("bdxkqpxokaj", model.timeZone()); + Assertions.assertEquals(WeekDay.WEDNESDAY, model.requestedWeekDays().get(0)); + Assertions.assertEquals(Month.ALL, model.requestedMonths().get(0)); + Assertions.assertEquals(1260380641, model.requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1686364184, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(2056764824, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.UNKNOWN, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.deadlineType()); + Assertions.assertEquals(1867037750, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1107396913, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.deadlineType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScheduledActionsSchedule model - = new ScheduledActionsSchedule().withScheduledTime("xagl") - .withTimeZone("vimjwos") - .withRequestedWeekDays(Arrays.asList(WeekDay.TUESDAY)) - .withRequestedMonths(Arrays.asList(Month.SEPTEMBER)) - .withRequestedDaysOfTheMonth(Arrays.asList(835762361, 2142879113, 992939840, 1365275067)) + = new ScheduledActionsSchedule().withScheduledTime("dxob") + .withTimeZone("bdxkqpxokaj") + .withRequestedWeekDays(Arrays.asList(WeekDay.WEDNESDAY, WeekDay.ALL, WeekDay.ALL)) + .withRequestedMonths(Arrays.asList(Month.ALL, Month.MAY, Month.NOVEMBER)) + .withRequestedDaysOfTheMonth(Arrays.asList(1260380641, 971264827)) .withExecutionParameters(new ExecutionParameters() .withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(1686364184) - .withRetryWindowInMinutes(2056764824) - .withOnFailureAction(ResourceOperationType.UNKNOWN))) - .withDeadlineType(DeadlineType.INITIATE_AT); + .withRetryPolicy(new RetryPolicy().withRetryCount(1867037750).withRetryWindowInMinutes(1107396913))) + .withDeadlineType(DeadlineType.COMPLETE_BY); model = BinaryData.fromObject(model).toObject(ScheduledActionsSchedule.class); - Assertions.assertEquals("xagl", model.scheduledTime()); - Assertions.assertEquals("vimjwos", model.timeZone()); - Assertions.assertEquals(WeekDay.TUESDAY, model.requestedWeekDays().get(0)); - Assertions.assertEquals(Month.SEPTEMBER, model.requestedMonths().get(0)); - Assertions.assertEquals(835762361, model.requestedDaysOfTheMonth().get(0)); + Assertions.assertEquals("dxob", model.scheduledTime()); + Assertions.assertEquals("bdxkqpxokaj", model.timeZone()); + Assertions.assertEquals(WeekDay.WEDNESDAY, model.requestedWeekDays().get(0)); + Assertions.assertEquals(Month.ALL, model.requestedMonths().get(0)); + Assertions.assertEquals(1260380641, model.requestedDaysOfTheMonth().get(0)); Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1686364184, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(2056764824, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.UNKNOWN, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals(DeadlineType.INITIATE_AT, model.deadlineType()); + Assertions.assertEquals(1867037750, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1107396913, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.deadlineType()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsAdditionalPublishingTargetsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsAdditionalPublishingTargetsTests.java deleted file mode 100644 index 578db4f8446d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsAdditionalPublishingTargetsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.EventGridAndResourceGraph; -import com.azure.resourcemanager.computeschedule.models.ScheduledEventsAdditionalPublishingTargets; -import org.junit.jupiter.api.Assertions; - -public final class ScheduledEventsAdditionalPublishingTargetsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduledEventsAdditionalPublishingTargets model = BinaryData - .fromString("{\"eventGridAndResourceGraph\":{\"enable\":false,\"scheduledEventsApiVersion\":\"mxaxc\"}}") - .toObject(ScheduledEventsAdditionalPublishingTargets.class); - Assertions.assertFalse(model.eventGridAndResourceGraph().enable()); - Assertions.assertEquals("mxaxc", model.eventGridAndResourceGraph().scheduledEventsApiVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduledEventsAdditionalPublishingTargets model - = new ScheduledEventsAdditionalPublishingTargets().withEventGridAndResourceGraph( - new EventGridAndResourceGraph().withEnable(false).withScheduledEventsApiVersion("mxaxc")); - model = BinaryData.fromObject(model).toObject(ScheduledEventsAdditionalPublishingTargets.class); - Assertions.assertFalse(model.eventGridAndResourceGraph().enable()); - Assertions.assertEquals("mxaxc", model.eventGridAndResourceGraph().scheduledEventsApiVersion()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsPolicyTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsPolicyTests.java deleted file mode 100644 index 5b7b202c3c0a..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsPolicyTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.AllInstancesDown; -import com.azure.resourcemanager.computeschedule.models.EventGridAndResourceGraph; -import com.azure.resourcemanager.computeschedule.models.ScheduledEventsAdditionalPublishingTargets; -import com.azure.resourcemanager.computeschedule.models.ScheduledEventsPolicy; -import com.azure.resourcemanager.computeschedule.models.UserInitiatedReboot; -import com.azure.resourcemanager.computeschedule.models.UserInitiatedRedeploy; -import org.junit.jupiter.api.Assertions; - -public final class ScheduledEventsPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduledEventsPolicy model = BinaryData.fromString( - "{\"userInitiatedRedeploy\":{\"automaticallyApprove\":false},\"userInitiatedReboot\":{\"automaticallyApprove\":true},\"scheduledEventsAdditionalPublishingTargets\":{\"eventGridAndResourceGraph\":{\"enable\":false,\"scheduledEventsApiVersion\":\"bzaqsqsycbkbfk\"}},\"allInstancesDown\":{\"automaticallyApprove\":true}}") - .toObject(ScheduledEventsPolicy.class); - Assertions.assertFalse(model.userInitiatedRedeploy().automaticallyApprove()); - Assertions.assertTrue(model.userInitiatedReboot().automaticallyApprove()); - Assertions.assertFalse(model.scheduledEventsAdditionalPublishingTargets().eventGridAndResourceGraph().enable()); - Assertions.assertEquals("bzaqsqsycbkbfk", - model.scheduledEventsAdditionalPublishingTargets().eventGridAndResourceGraph().scheduledEventsApiVersion()); - Assertions.assertTrue(model.allInstancesDown().automaticallyApprove()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduledEventsPolicy model = new ScheduledEventsPolicy() - .withUserInitiatedRedeploy(new UserInitiatedRedeploy().withAutomaticallyApprove(false)) - .withUserInitiatedReboot(new UserInitiatedReboot().withAutomaticallyApprove(true)) - .withScheduledEventsAdditionalPublishingTargets( - new ScheduledEventsAdditionalPublishingTargets().withEventGridAndResourceGraph( - new EventGridAndResourceGraph().withEnable(false).withScheduledEventsApiVersion("bzaqsqsycbkbfk"))) - .withAllInstancesDown(new AllInstancesDown().withAutomaticallyApprove(true)); - model = BinaryData.fromObject(model).toObject(ScheduledEventsPolicy.class); - Assertions.assertFalse(model.userInitiatedRedeploy().automaticallyApprove()); - Assertions.assertTrue(model.userInitiatedReboot().automaticallyApprove()); - Assertions.assertFalse(model.scheduledEventsAdditionalPublishingTargets().eventGridAndResourceGraph().enable()); - Assertions.assertEquals("bzaqsqsycbkbfk", - model.scheduledEventsAdditionalPublishingTargets().eventGridAndResourceGraph().scheduledEventsApiVersion()); - Assertions.assertTrue(model.allInstancesDown().automaticallyApprove()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsProfileTests.java deleted file mode 100644 index 72dd84351e97..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ScheduledEventsProfileTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.OSImageNotificationProfile; -import com.azure.resourcemanager.computeschedule.models.ScheduledEventsProfile; -import com.azure.resourcemanager.computeschedule.models.TerminateNotificationProfile; -import org.junit.jupiter.api.Assertions; - -public final class ScheduledEventsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduledEventsProfile model = BinaryData.fromString( - "{\"terminateNotificationProfile\":{\"notBeforeTimeout\":\"svshqjohx\",\"enable\":false},\"osImageNotificationProfile\":{\"notBeforeTimeout\":\"ovasrruvwbhsqfsu\",\"enable\":false}}") - .toObject(ScheduledEventsProfile.class); - Assertions.assertEquals("svshqjohx", model.terminateNotificationProfile().notBeforeTimeout()); - Assertions.assertFalse(model.terminateNotificationProfile().enable()); - Assertions.assertEquals("ovasrruvwbhsqfsu", model.osImageNotificationProfile().notBeforeTimeout()); - Assertions.assertFalse(model.osImageNotificationProfile().enable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduledEventsProfile model = new ScheduledEventsProfile() - .withTerminateNotificationProfile( - new TerminateNotificationProfile().withNotBeforeTimeout("svshqjohx").withEnable(false)) - .withOsImageNotificationProfile( - new OSImageNotificationProfile().withNotBeforeTimeout("ovasrruvwbhsqfsu").withEnable(false)); - model = BinaryData.fromObject(model).toObject(ScheduledEventsProfile.class); - Assertions.assertEquals("svshqjohx", model.terminateNotificationProfile().notBeforeTimeout()); - Assertions.assertFalse(model.terminateNotificationProfile().enable()); - Assertions.assertEquals("ovasrruvwbhsqfsu", model.osImageNotificationProfile().notBeforeTimeout()); - Assertions.assertFalse(model.osImageNotificationProfile().enable()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateRequestTests.java index 67c57d729897..925e6fdc48b4 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitDeallocateRequestTests.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; @@ -21,7 +20,7 @@ public final class SubmitDeallocateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubmitDeallocateRequest model = BinaryData.fromString( - "{\"schedule\":{\"deadline\":\"2021-09-06T02:12:49Z\",\"deadLine\":\"2021-12-03T06:58:55Z\",\"timezone\":\"zvgnwzs\",\"timeZone\":\"glzufc\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1757371466,\"retryWindowInMinutes\":1730607260,\"onFailureAction\":\"Create\"}},\"resources\":{\"ids\":[\"fhfcb\",\"y\",\"a\"]},\"correlationid\":\"ithxqhabifpi\"}") + "{\"schedule\":{\"deadline\":\"2021-09-06T02:12:49Z\",\"deadLine\":\"2021-12-03T06:58:55Z\",\"timezone\":\"zvgnwzs\",\"timeZone\":\"glzufc\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1757371466,\"retryWindowInMinutes\":1730607260}},\"resources\":{\"ids\":[\"nufhf\",\"bj\",\"s\",\"git\"]},\"correlationid\":\"xqhabi\"}") .toObject(SubmitDeallocateRequest.class); Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T02:12:49Z"), model.schedule().deadline()); Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T06:58:55Z"), model.schedule().deadLine()); @@ -32,10 +31,8 @@ public void testDeserialize() throws Exception { model.executionParameters().optimizationPreference()); Assertions.assertEquals(1757371466, model.executionParameters().retryPolicy().retryCount()); Assertions.assertEquals(1730607260, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.CREATE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("fhfcb", model.resources().ids().get(0)); - Assertions.assertEquals("ithxqhabifpi", model.correlationid()); + Assertions.assertEquals("nufhf", model.resources().ids().get(0)); + Assertions.assertEquals("xqhabi", model.correlationid()); } @org.junit.jupiter.api.Test @@ -48,11 +45,9 @@ public void testSerialize() throws Exception { .withDeadlineType(DeadlineType.COMPLETE_BY)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(1757371466) - .withRetryWindowInMinutes(1730607260) - .withOnFailureAction(ResourceOperationType.CREATE))) - .withResources(new Resources().withIds(Arrays.asList("fhfcb", "y", "a"))) - .withCorrelationid("ithxqhabifpi"); + .withRetryPolicy(new RetryPolicy().withRetryCount(1757371466).withRetryWindowInMinutes(1730607260))) + .withResources(new Resources().withIds(Arrays.asList("nufhf", "bj", "s", "git"))) + .withCorrelationid("xqhabi"); model = BinaryData.fromObject(model).toObject(SubmitDeallocateRequest.class); Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T02:12:49Z"), model.schedule().deadline()); Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T06:58:55Z"), model.schedule().deadLine()); @@ -63,9 +58,7 @@ public void testSerialize() throws Exception { model.executionParameters().optimizationPreference()); Assertions.assertEquals(1757371466, model.executionParameters().retryPolicy().retryCount()); Assertions.assertEquals(1730607260, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.CREATE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("fhfcb", model.resources().ids().get(0)); - Assertions.assertEquals("ithxqhabifpi", model.correlationid()); + Assertions.assertEquals("nufhf", model.resources().ids().get(0)); + Assertions.assertEquals("xqhabi", model.correlationid()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateRequestTests.java index 4033c6403b97..1a8513f1280c 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitHibernateRequestTests.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; @@ -21,48 +20,45 @@ public final class SubmitHibernateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubmitHibernateRequest model = BinaryData.fromString( - "{\"schedule\":{\"deadline\":\"2021-02-13T07:50:35Z\",\"deadLine\":\"2021-07-14T10:08:19Z\",\"timezone\":\"osygex\",\"timeZone\":\"ojakhmsbzjhcrze\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"Cost\",\"retryPolicy\":{\"retryCount\":148902907,\"retryWindowInMinutes\":757345112,\"onFailureAction\":\"Delete\"}},\"resources\":{\"ids\":[\"trg\",\"jbp\",\"zfsinzgvf\",\"jrwzox\"]},\"correlationid\":\"j\"}") + "{\"schedule\":{\"deadline\":\"2021-01-15T00:39:28Z\",\"deadLine\":\"2021-04-04T07:45:50Z\",\"timezone\":\"dio\",\"timeZone\":\"pslwejdpvw\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1977100929,\"retryWindowInMinutes\":1527303417}},\"resources\":{\"ids\":[\"tazak\",\"j\",\"ahbc\",\"yffdfdos\"]},\"correlationid\":\"gexpaojakhmsbz\"}") .toObject(SubmitHibernateRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T07:50:35Z"), model.schedule().deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-14T10:08:19Z"), model.schedule().deadLine()); - Assertions.assertEquals("osygex", model.schedule().timezone()); - Assertions.assertEquals("ojakhmsbzjhcrze", model.schedule().timeZone()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-15T00:39:28Z"), model.schedule().deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T07:45:50Z"), model.schedule().deadLine()); + Assertions.assertEquals("dio", model.schedule().timezone()); + Assertions.assertEquals("pslwejdpvw", model.schedule().timeZone()); Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(148902907, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(757345112, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("trg", model.resources().ids().get(0)); - Assertions.assertEquals("j", model.correlationid()); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(1977100929, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1527303417, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("tazak", model.resources().ids().get(0)); + Assertions.assertEquals("gexpaojakhmsbz", model.correlationid()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubmitHibernateRequest model = new SubmitHibernateRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2021-02-13T07:50:35Z")) - .withDeadLine(OffsetDateTime.parse("2021-07-14T10:08:19Z")) - .withTimezone("osygex") - .withTimeZone("ojakhmsbzjhcrze") + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2021-01-15T00:39:28Z")) + .withDeadLine(OffsetDateTime.parse("2021-04-04T07:45:50Z")) + .withTimezone("dio") + .withTimeZone("pslwejdpvw") .withDeadlineType(DeadlineType.COMPLETE_BY)) - .withExecutionParameters(new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST) - .withRetryPolicy(new RetryPolicy().withRetryCount(148902907) - .withRetryWindowInMinutes(757345112) - .withOnFailureAction(ResourceOperationType.DELETE))) - .withResources(new Resources().withIds(Arrays.asList("trg", "jbp", "zfsinzgvf", "jrwzox"))) - .withCorrelationid("j"); + .withExecutionParameters( + new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) + .withRetryPolicy(new RetryPolicy().withRetryCount(1977100929).withRetryWindowInMinutes(1527303417))) + .withResources(new Resources().withIds(Arrays.asList("tazak", "j", "ahbc", "yffdfdos"))) + .withCorrelationid("gexpaojakhmsbz"); model = BinaryData.fromObject(model).toObject(SubmitHibernateRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T07:50:35Z"), model.schedule().deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-14T10:08:19Z"), model.schedule().deadLine()); - Assertions.assertEquals("osygex", model.schedule().timezone()); - Assertions.assertEquals("ojakhmsbzjhcrze", model.schedule().timeZone()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-15T00:39:28Z"), model.schedule().deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T07:45:50Z"), model.schedule().deadLine()); + Assertions.assertEquals("dio", model.schedule().timezone()); + Assertions.assertEquals("pslwejdpvw", model.schedule().timeZone()); Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); - Assertions.assertEquals(OptimizationPreference.COST, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(148902907, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(757345112, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("trg", model.resources().ids().get(0)); - Assertions.assertEquals("j", model.correlationid()); + Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, + model.executionParameters().optimizationPreference()); + Assertions.assertEquals(1977100929, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1527303417, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("tazak", model.resources().ids().get(0)); + Assertions.assertEquals("gexpaojakhmsbz", model.correlationid()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartRequestTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartRequestTests.java index 46edc4a1de04..0657427af193 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartRequestTests.java +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/SubmitStartRequestTests.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.computeschedule.models.DeadlineType; import com.azure.resourcemanager.computeschedule.models.ExecutionParameters; import com.azure.resourcemanager.computeschedule.models.OptimizationPreference; -import com.azure.resourcemanager.computeschedule.models.ResourceOperationType; import com.azure.resourcemanager.computeschedule.models.Resources; import com.azure.resourcemanager.computeschedule.models.RetryPolicy; import com.azure.resourcemanager.computeschedule.models.Schedule; @@ -21,52 +20,45 @@ public final class SubmitStartRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubmitStartRequest model = BinaryData.fromString( - "{\"schedule\":{\"deadline\":\"2021-08-23T15:48:59Z\",\"deadLine\":\"2021-11-03T12:14:35Z\",\"timezone\":\"eotusivyevc\",\"timeZone\":\"qi\",\"deadlineType\":\"CompleteBy\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1255006284,\"retryWindowInMinutes\":1282249013,\"onFailureAction\":\"Delete\"}},\"resources\":{\"ids\":[\"fygxgispemvtzfk\",\"fublj\",\"fxqeof\",\"aeqjhqjbasvms\"]},\"correlationid\":\"jqul\"}") + "{\"schedule\":{\"deadline\":\"2021-11-24T18:52:18Z\",\"deadLine\":\"2021-10-29T01:56:29Z\",\"timezone\":\"hpf\",\"timeZone\":\"ypininm\",\"deadlineType\":\"InitiateAt\"},\"executionParameters\":{\"optimizationPreference\":\"CostAvailabilityBalanced\",\"retryPolicy\":{\"retryCount\":1439394091,\"retryWindowInMinutes\":1813280112}},\"resources\":{\"ids\":[\"depoog\",\"nuvamiheogna\",\"xzxtheo\"]},\"correlationid\":\"usivye\"}") .toObject(SubmitStartRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-23T15:48:59Z"), model.schedule().deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T12:14:35Z"), model.schedule().deadLine()); - Assertions.assertEquals("eotusivyevc", model.schedule().timezone()); - Assertions.assertEquals("qi", model.schedule().timeZone()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T18:52:18Z"), model.schedule().deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T01:56:29Z"), model.schedule().deadLine()); + Assertions.assertEquals("hpf", model.schedule().timezone()); + Assertions.assertEquals("ypininm", model.schedule().timeZone()); + Assertions.assertEquals(DeadlineType.INITIATE_AT, model.schedule().deadlineType()); Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1255006284, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1282249013, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("fygxgispemvtzfk", model.resources().ids().get(0)); - Assertions.assertEquals("jqul", model.correlationid()); + Assertions.assertEquals(1439394091, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1813280112, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("depoog", model.resources().ids().get(0)); + Assertions.assertEquals("usivye", model.correlationid()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubmitStartRequest model = new SubmitStartRequest() - .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2021-08-23T15:48:59Z")) - .withDeadLine(OffsetDateTime.parse("2021-11-03T12:14:35Z")) - .withTimezone("eotusivyevc") - .withTimeZone("qi") - .withDeadlineType(DeadlineType.COMPLETE_BY)) + .withSchedule(new Schedule().withDeadline(OffsetDateTime.parse("2021-11-24T18:52:18Z")) + .withDeadLine(OffsetDateTime.parse("2021-10-29T01:56:29Z")) + .withTimezone("hpf") + .withTimeZone("ypininm") + .withDeadlineType(DeadlineType.INITIATE_AT)) .withExecutionParameters( new ExecutionParameters().withOptimizationPreference(OptimizationPreference.COST_AVAILABILITY_BALANCED) - .withRetryPolicy(new RetryPolicy().withRetryCount(1255006284) - .withRetryWindowInMinutes(1282249013) - .withOnFailureAction(ResourceOperationType.DELETE))) - .withResources( - new Resources().withIds(Arrays.asList("fygxgispemvtzfk", "fublj", "fxqeof", "aeqjhqjbasvms"))) - .withCorrelationid("jqul"); + .withRetryPolicy(new RetryPolicy().withRetryCount(1439394091).withRetryWindowInMinutes(1813280112))) + .withResources(new Resources().withIds(Arrays.asList("depoog", "nuvamiheogna", "xzxtheo"))) + .withCorrelationid("usivye"); model = BinaryData.fromObject(model).toObject(SubmitStartRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-23T15:48:59Z"), model.schedule().deadline()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T12:14:35Z"), model.schedule().deadLine()); - Assertions.assertEquals("eotusivyevc", model.schedule().timezone()); - Assertions.assertEquals("qi", model.schedule().timeZone()); - Assertions.assertEquals(DeadlineType.COMPLETE_BY, model.schedule().deadlineType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T18:52:18Z"), model.schedule().deadline()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T01:56:29Z"), model.schedule().deadLine()); + Assertions.assertEquals("hpf", model.schedule().timezone()); + Assertions.assertEquals("ypininm", model.schedule().timeZone()); + Assertions.assertEquals(DeadlineType.INITIATE_AT, model.schedule().deadlineType()); Assertions.assertEquals(OptimizationPreference.COST_AVAILABILITY_BALANCED, model.executionParameters().optimizationPreference()); - Assertions.assertEquals(1255006284, model.executionParameters().retryPolicy().retryCount()); - Assertions.assertEquals(1282249013, model.executionParameters().retryPolicy().retryWindowInMinutes()); - Assertions.assertEquals(ResourceOperationType.DELETE, - model.executionParameters().retryPolicy().onFailureAction()); - Assertions.assertEquals("fygxgispemvtzfk", model.resources().ids().get(0)); - Assertions.assertEquals("jqul", model.correlationid()); + Assertions.assertEquals(1439394091, model.executionParameters().retryPolicy().retryCount()); + Assertions.assertEquals(1813280112, model.executionParameters().retryPolicy().retryWindowInMinutes()); + Assertions.assertEquals("depoog", model.resources().ids().get(0)); + Assertions.assertEquals("usivye", model.correlationid()); } } diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/TerminateNotificationProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/TerminateNotificationProfileTests.java deleted file mode 100644 index 993f604896e7..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/TerminateNotificationProfileTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.TerminateNotificationProfile; -import org.junit.jupiter.api.Assertions; - -public final class TerminateNotificationProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TerminateNotificationProfile model = BinaryData.fromString("{\"notBeforeTimeout\":\"birx\",\"enable\":true}") - .toObject(TerminateNotificationProfile.class); - Assertions.assertEquals("birx", model.notBeforeTimeout()); - Assertions.assertTrue(model.enable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TerminateNotificationProfile model - = new TerminateNotificationProfile().withNotBeforeTimeout("birx").withEnable(true); - model = BinaryData.fromObject(model).toObject(TerminateNotificationProfile.class); - Assertions.assertEquals("birx", model.notBeforeTimeout()); - Assertions.assertTrue(model.enable()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UefiSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UefiSettingsTests.java deleted file mode 100644 index 7134e7f50db1..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UefiSettingsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.UefiSettings; -import org.junit.jupiter.api.Assertions; - -public final class UefiSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UefiSettings model - = BinaryData.fromString("{\"secureBootEnabled\":true,\"vTpmEnabled\":false}").toObject(UefiSettings.class); - Assertions.assertTrue(model.secureBootEnabled()); - Assertions.assertFalse(model.vTpmEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UefiSettings model = new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(false); - model = BinaryData.fromObject(model).toObject(UefiSettings.class); - Assertions.assertTrue(model.secureBootEnabled()); - Assertions.assertFalse(model.vTpmEnabled()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserAssignedIdentitiesValueTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserAssignedIdentitiesValueTests.java deleted file mode 100644 index eddb34ac683a..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserAssignedIdentitiesValueTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.UserAssignedIdentitiesValue; - -public final class UserAssignedIdentitiesValueTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentitiesValue model - = BinaryData.fromString("{\"principalId\":\"norcjxvsnbyxqab\",\"clientId\":\"ocpcy\"}") - .toObject(UserAssignedIdentitiesValue.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentitiesValue model = new UserAssignedIdentitiesValue(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentitiesValue.class); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRebootTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRebootTests.java deleted file mode 100644 index 1f7a1ae7f7c7..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRebootTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.UserInitiatedReboot; -import org.junit.jupiter.api.Assertions; - -public final class UserInitiatedRebootTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserInitiatedReboot model - = BinaryData.fromString("{\"automaticallyApprove\":true}").toObject(UserInitiatedReboot.class); - Assertions.assertTrue(model.automaticallyApprove()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserInitiatedReboot model = new UserInitiatedReboot().withAutomaticallyApprove(true); - model = BinaryData.fromObject(model).toObject(UserInitiatedReboot.class); - Assertions.assertTrue(model.automaticallyApprove()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRedeployTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRedeployTests.java deleted file mode 100644 index 2c515d2f4d22..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/UserInitiatedRedeployTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.UserInitiatedRedeploy; -import org.junit.jupiter.api.Assertions; - -public final class UserInitiatedRedeployTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserInitiatedRedeploy model - = BinaryData.fromString("{\"automaticallyApprove\":true}").toObject(UserInitiatedRedeploy.class); - Assertions.assertTrue(model.automaticallyApprove()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserInitiatedRedeploy model = new UserInitiatedRedeploy().withAutomaticallyApprove(true); - model = BinaryData.fromObject(model).toObject(UserInitiatedRedeploy.class); - Assertions.assertTrue(model.automaticallyApprove()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMDiskSecurityProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMDiskSecurityProfileTests.java deleted file mode 100644 index 842f9c3f3652..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMDiskSecurityProfileTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DiskEncryptionSetParameters; -import com.azure.resourcemanager.computeschedule.models.SecurityEncryptionTypes; -import com.azure.resourcemanager.computeschedule.models.VMDiskSecurityProfile; -import org.junit.jupiter.api.Assertions; - -public final class VMDiskSecurityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMDiskSecurityProfile model = BinaryData - .fromString( - "{\"securityEncryptionType\":\"VMGuestStateOnly\",\"diskEncryptionSet\":{\"id\":\"xrjfeallnwsub\"}}") - .toObject(VMDiskSecurityProfile.class); - Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, model.securityEncryptionType()); - Assertions.assertEquals("xrjfeallnwsub", model.diskEncryptionSet().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMDiskSecurityProfile model - = new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("xrjfeallnwsub")); - model = BinaryData.fromObject(model).toObject(VMDiskSecurityProfile.class); - Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, model.securityEncryptionType()); - Assertions.assertEquals("xrjfeallnwsub", model.diskEncryptionSet().id()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMGalleryApplicationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMGalleryApplicationTests.java deleted file mode 100644 index e822c5249f2d..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VMGalleryApplicationTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.VMGalleryApplication; -import org.junit.jupiter.api.Assertions; - -public final class VMGalleryApplicationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMGalleryApplication model = BinaryData.fromString( - "{\"tags\":\"nzdndslgna\",\"order\":1257002665,\"packageReferenceId\":\"gynduha\",\"configurationReference\":\"qlkth\",\"treatFailureAsDeploymentFailure\":true,\"enableAutomaticUpgrade\":true}") - .toObject(VMGalleryApplication.class); - Assertions.assertEquals("nzdndslgna", model.tags()); - Assertions.assertEquals(1257002665, model.order()); - Assertions.assertEquals("gynduha", model.packageReferenceId()); - Assertions.assertEquals("qlkth", model.configurationReference()); - Assertions.assertTrue(model.treatFailureAsDeploymentFailure()); - Assertions.assertTrue(model.enableAutomaticUpgrade()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMGalleryApplication model = new VMGalleryApplication().withTags("nzdndslgna") - .withOrder(1257002665) - .withPackageReferenceId("gynduha") - .withConfigurationReference("qlkth") - .withTreatFailureAsDeploymentFailure(true) - .withEnableAutomaticUpgrade(true); - model = BinaryData.fromObject(model).toObject(VMGalleryApplication.class); - Assertions.assertEquals("nzdndslgna", model.tags()); - Assertions.assertEquals(1257002665, model.order()); - Assertions.assertEquals("gynduha", model.packageReferenceId()); - Assertions.assertEquals("qlkth", model.configurationReference()); - Assertions.assertTrue(model.treatFailureAsDeploymentFailure()); - Assertions.assertTrue(model.enableAutomaticUpgrade()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultCertificateTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultCertificateTests.java deleted file mode 100644 index 81b6d1f85886..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultCertificateTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.VaultCertificate; -import org.junit.jupiter.api.Assertions; - -public final class VaultCertificateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VaultCertificate model - = BinaryData.fromString("{\"certificateUrl\":\"xhqyudxorrqnb\",\"certificateStore\":\"czvyifq\"}") - .toObject(VaultCertificate.class); - Assertions.assertEquals("xhqyudxorrqnb", model.certificateUrl()); - Assertions.assertEquals("czvyifq", model.certificateStore()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VaultCertificate model - = new VaultCertificate().withCertificateUrl("xhqyudxorrqnb").withCertificateStore("czvyifq"); - model = BinaryData.fromObject(model).toObject(VaultCertificate.class); - Assertions.assertEquals("xhqyudxorrqnb", model.certificateUrl()); - Assertions.assertEquals("czvyifq", model.certificateStore()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultSecretGroupTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultSecretGroupTests.java deleted file mode 100644 index 5c94bde7a30f..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VaultSecretGroupTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.VaultCertificate; -import com.azure.resourcemanager.computeschedule.models.VaultSecretGroup; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VaultSecretGroupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VaultSecretGroup model = BinaryData.fromString( - "{\"sourceVault\":{\"id\":\"pjmcmatuokthfuiu\"},\"vaultCertificates\":[{\"certificateUrl\":\"fcp\",\"certificateStore\":\"xodpuozmyzydagfu\"},{\"certificateUrl\":\"bezy\",\"certificateStore\":\"okktwhrdxw\"},{\"certificateUrl\":\"wqsmbsur\",\"certificateStore\":\"imoryocfsfksym\"},{\"certificateUrl\":\"ys\",\"certificateStore\":\"i\"}]}") - .toObject(VaultSecretGroup.class); - Assertions.assertEquals("pjmcmatuokthfuiu", model.sourceVault().id()); - Assertions.assertEquals("fcp", model.vaultCertificates().get(0).certificateUrl()); - Assertions.assertEquals("xodpuozmyzydagfu", model.vaultCertificates().get(0).certificateStore()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VaultSecretGroup model - = new VaultSecretGroup().withSourceVault(new SubResource().withId("pjmcmatuokthfuiu")) - .withVaultCertificates(Arrays.asList( - new VaultCertificate().withCertificateUrl("fcp").withCertificateStore("xodpuozmyzydagfu"), - new VaultCertificate().withCertificateUrl("bezy").withCertificateStore("okktwhrdxw"), - new VaultCertificate().withCertificateUrl("wqsmbsur").withCertificateStore("imoryocfsfksym"), - new VaultCertificate().withCertificateUrl("ys").withCertificateStore("i"))); - model = BinaryData.fromObject(model).toObject(VaultSecretGroup.class); - Assertions.assertEquals("pjmcmatuokthfuiu", model.sourceVault().id()); - Assertions.assertEquals("fcp", model.vaultCertificates().get(0).certificateUrl()); - Assertions.assertEquals("xodpuozmyzydagfu", model.vaultCertificates().get(0).certificateStore()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualHardDiskTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualHardDiskTests.java deleted file mode 100644 index c06fe4f541bc..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualHardDiskTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.VirtualHardDisk; -import org.junit.jupiter.api.Assertions; - -public final class VirtualHardDiskTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualHardDisk model = BinaryData.fromString("{\"uri\":\"hzgpphrcgyncocpe\"}").toObject(VirtualHardDisk.class); - Assertions.assertEquals("hzgpphrcgyncocpe", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualHardDisk model = new VirtualHardDisk().withUri("hzgpphrcgyncocpe"); - model = BinaryData.fromObject(model).toObject(VirtualHardDisk.class); - Assertions.assertEquals("hzgpphrcgyncocpe", model.uri()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIdentityTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIdentityTests.java deleted file mode 100644 index 62720e4cc375..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIdentityTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ResourceIdentityType; -import com.azure.resourcemanager.computeschedule.models.UserAssignedIdentitiesValue; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineIdentity model = BinaryData.fromString( - "{\"principalId\":\"dwzjeiach\",\"tenantId\":\"osfln\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"i\":{\"principalId\":\"t\",\"clientId\":\"hzzvypyq\"},\"ifiyipjxsqwpgrj\":{\"principalId\":\"inpvswjdkirsoodq\",\"clientId\":\"crmnohjtckwhds\"}}}") - .toObject(VirtualMachineIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineIdentity model = new VirtualMachineIdentity() - .withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("i", new UserAssignedIdentitiesValue(), "ifiyipjxsqwpgrj", new UserAssignedIdentitiesValue())); - model = BinaryData.fromObject(model).toObject(VirtualMachineIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIpTagTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIpTagTests.java deleted file mode 100644 index 59b86ddb51dc..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineIpTagTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineIpTagTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineIpTag model = BinaryData.fromString("{\"ipTagType\":\"zxctobgb\",\"tag\":\"moizpos\"}") - .toObject(VirtualMachineIpTag.class); - Assertions.assertEquals("zxctobgb", model.ipTagType()); - Assertions.assertEquals("moizpos", model.tag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineIpTag model = new VirtualMachineIpTag().withIpTagType("zxctobgb").withTag("moizpos"); - model = BinaryData.fromObject(model).toObject(VirtualMachineIpTag.class); - Assertions.assertEquals("zxctobgb", model.ipTagType()); - Assertions.assertEquals("moizpos", model.tag()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationPropertiesTests.java deleted file mode 100644 index 19f619fc8b58..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationPropertiesTests.java +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.IPVersions; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliaryMode; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliarySku; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; -import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineNetworkInterfaceConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineNetworkInterfaceConfigurationProperties model = BinaryData.fromString( - "{\"primary\":true,\"deleteOption\":\"Detach\",\"enableAcceleratedNetworking\":true,\"disableTcpStateTracking\":true,\"enableFpga\":true,\"enableIPForwarding\":true,\"networkSecurityGroup\":{\"id\":\"spnqzahmgkb\"},\"dnsSettings\":{\"dnsServers\":[\"dhibnuq\"]},\"ipConfigurations\":[{\"name\":\"pikad\",\"properties\":{\"subnet\":{\"id\":\"qagnbuyn\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"gmebfsiarbutrcv\",\"properties\":{\"idleTimeoutInMinutes\":1487439384,\"deleteOption\":\"Detach\",\"dnsSettings\":{\"domainNameLabel\":\"jrunmpxtt\"},\"ipTags\":[{},{},{},{}],\"publicIPPrefix\":{},\"publicIPAddressVersion\":\"IPv6\",\"publicIPAllocationMethod\":\"Static\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Regional\"},\"tags\":{\"nbtkcxywnytnr\":\"pbh\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{\"id\":\"dybyxczfclhaa\"},{\"id\":\"babphlwrqlfk\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"sucocmnyyazttbtw\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"uedck\"},{\"id\":\"wbiexzfey\"},{\"id\":\"axibxujw\"},{\"id\":\"qwalmuzyoxaepd\"}]}},{\"name\":\"zjancuxr\",\"properties\":{\"subnet\":{\"id\":\"avxbniwdjswztsdb\"},\"primary\":false,\"publicIPAddressConfiguration\":{\"name\":\"ytxhp\",\"properties\":{\"idleTimeoutInMinutes\":258578871,\"deleteOption\":\"Delete\",\"dnsSettings\":{\"domainNameLabel\":\"abgl\"},\"ipTags\":[{}],\"publicIPPrefix\":{},\"publicIPAddressVersion\":\"IPv4\",\"publicIPAllocationMethod\":\"Dynamic\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Regional\"},\"tags\":{\"bhvgy\":\"ovplw\",\"svmkfssxquk\":\"gu\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{\"id\":\"gsxnkjzkdeslpv\"},{\"id\":\"pwiyig\"},{\"id\":\"pkdwzbai\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"a\"},{\"id\":\"nyqupedeojnabck\"},{\"id\":\"mtxpsiebtfh\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"apskrdqm\"}]}},{\"name\":\"jjdhtld\",\"properties\":{\"subnet\":{\"id\":\"xuutkncwscwsv\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"ogtwrupqsxvnmi\",\"properties\":{\"idleTimeoutInMinutes\":560100496,\"deleteOption\":\"Detach\",\"dnsSettings\":{\"domainNameLabel\":\"vei\"},\"ipTags\":[{},{},{}],\"publicIPPrefix\":{},\"publicIPAddressVersion\":\"IPv6\",\"publicIPAllocationMethod\":\"Dynamic\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Global\"},\"tags\":{\"dhbt\":\"cn\"}},\"privateIPAddressVersion\":\"IPv4\",\"applicationSecurityGroups\":[{\"id\":\"pnvjtoqnermclf\"},{\"id\":\"phoxus\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"bgyepsbj\"},{\"id\":\"zq\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"wpmueefj\"},{\"id\":\"fqkquj\"},{\"id\":\"suyonobglaocq\"},{\"id\":\"ccm\"}]}}],\"dscpConfiguration\":{\"id\":\"dxyt\"},\"auxiliaryMode\":\"Floating\",\"auxiliarySku\":\"A4\"}") - .toObject(VirtualMachineNetworkInterfaceConfigurationProperties.class); - Assertions.assertTrue(model.primary()); - Assertions.assertEquals(DeleteOptions.DETACH, model.deleteOption()); - Assertions.assertTrue(model.enableAcceleratedNetworking()); - Assertions.assertTrue(model.disableTcpStateTracking()); - Assertions.assertTrue(model.enableFpga()); - Assertions.assertTrue(model.enableIPForwarding()); - Assertions.assertEquals("spnqzahmgkb", model.networkSecurityGroup().id()); - Assertions.assertEquals("dhibnuq", model.dnsSettings().dnsServers().get(0)); - Assertions.assertEquals("pikad", model.ipConfigurations().get(0).name()); - Assertions.assertEquals("qagnbuyn", model.ipConfigurations().get(0).properties().subnet().id()); - Assertions.assertTrue(model.ipConfigurations().get(0).properties().primary()); - Assertions.assertEquals("gmebfsiarbutrcv", - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); - Assertions.assertEquals(1487439384, - model.ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .properties() - .idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DETACH, - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().properties().deleteOption()); - Assertions.assertEquals("jrunmpxtt", - model.ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .properties() - .dnsSettings() - .domainNameLabel()); - Assertions.assertEquals(IPVersions.IPV6, - model.ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .properties() - .publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.STATIC, - model.ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .properties() - .publicIPAllocationMethod()); - Assertions.assertEquals(PublicIPAddressSkuName.BASIC, - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().sku().name()); - Assertions.assertEquals(PublicIPAddressSkuTier.REGIONAL, - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().sku().tier()); - Assertions.assertEquals("pbh", - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().tags().get("nbtkcxywnytnr")); - Assertions.assertEquals(IPVersions.IPV6, - model.ipConfigurations().get(0).properties().privateIPAddressVersion()); - Assertions.assertEquals("dybyxczfclhaa", - model.ipConfigurations().get(0).properties().applicationSecurityGroups().get(0).id()); - Assertions.assertEquals("sucocmnyyazttbtw", - model.ipConfigurations().get(0).properties().applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("uedck", - model.ipConfigurations().get(0).properties().loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("dxyt", model.dscpConfiguration().id()); - Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, model.auxiliaryMode()); - Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A4, model.auxiliarySku()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineNetworkInterfaceConfigurationProperties model - = new VirtualMachineNetworkInterfaceConfigurationProperties().withPrimary(true) - .withDeleteOption(DeleteOptions.DETACH) - .withEnableAcceleratedNetworking(true) - .withDisableTcpStateTracking(true) - .withEnableFpga(true) - .withEnableIPForwarding(true) - .withNetworkSecurityGroup(new SubResource().withId("spnqzahmgkb")) - .withDnsSettings(new VirtualMachineNetworkInterfaceDnsSettingsConfiguration() - .withDnsServers(Arrays.asList("dhibnuq"))) - .withIpConfigurations( - Arrays.asList( - new VirtualMachineNetworkInterfaceIPConfiguration().withName("pikad") - .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties() - .withSubnet(new SubResource().withId("qagnbuyn")) - .withPrimary(true) - .withPublicIPAddressConfiguration(new VirtualMachinePublicIPAddressConfiguration() - .withName("gmebfsiarbutrcv") - .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(1487439384) - .withDeleteOption(DeleteOptions.DETACH) - .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() - .withDomainNameLabel("jrunmpxtt")) - .withIpTags(Arrays.asList(new VirtualMachineIpTag(), new VirtualMachineIpTag(), - new VirtualMachineIpTag(), new VirtualMachineIpTag())) - .withPublicIPPrefix(new SubResource()) - .withPublicIPAddressVersion(IPVersions.IPV6) - .withPublicIPAllocationMethod(PublicIPAllocationMethod.STATIC)) - .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.BASIC) - .withTier(PublicIPAddressSkuTier.REGIONAL)) - .withTags(mapOf("nbtkcxywnytnr", "pbh"))) - .withPrivateIPAddressVersion(IPVersions.IPV6) - .withApplicationSecurityGroups(Arrays.asList(new SubResource().withId("dybyxczfclhaa"), - new SubResource().withId("babphlwrqlfk"))) - .withApplicationGatewayBackendAddressPools( - Arrays.asList(new SubResource().withId("sucocmnyyazttbtw"))) - .withLoadBalancerBackendAddressPools(Arrays.asList( - new SubResource().withId("uedck"), new SubResource().withId("wbiexzfey"), - new SubResource().withId("axibxujw"), new SubResource().withId("qwalmuzyoxaepd")))), - new VirtualMachineNetworkInterfaceIPConfiguration().withName("zjancuxr") - .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties() - .withSubnet(new SubResource().withId("avxbniwdjswztsdb")) - .withPrimary(false) - .withPublicIPAddressConfiguration( - new VirtualMachinePublicIPAddressConfiguration().withName("ytxhp") - .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(258578871) - .withDeleteOption(DeleteOptions.DELETE) - .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() - .withDomainNameLabel("abgl")) - .withIpTags(Arrays.asList(new VirtualMachineIpTag())) - .withPublicIPPrefix(new SubResource()) - .withPublicIPAddressVersion(IPVersions.IPV4) - .withPublicIPAllocationMethod(PublicIPAllocationMethod.DYNAMIC)) - .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.STANDARD) - .withTier(PublicIPAddressSkuTier.REGIONAL)) - .withTags(mapOf("bhvgy", "ovplw", "svmkfssxquk", "gu"))) - .withPrivateIPAddressVersion(IPVersions.IPV6) - .withApplicationSecurityGroups(Arrays.asList(new SubResource().withId("gsxnkjzkdeslpv"), - new SubResource().withId("pwiyig"), new SubResource().withId("pkdwzbai"))) - .withApplicationGatewayBackendAddressPools(Arrays.asList( - new SubResource().withId("a"), new SubResource().withId("nyqupedeojnabck"), - new SubResource().withId("mtxpsiebtfh"))) - .withLoadBalancerBackendAddressPools( - Arrays.asList(new SubResource().withId("apskrdqm")))), - new VirtualMachineNetworkInterfaceIPConfiguration().withName("jjdhtld") - .withProperties( - new VirtualMachineNetworkInterfaceIPConfigurationProperties() - .withSubnet(new SubResource().withId("xuutkncwscwsv")) - .withPrimary(true) - .withPublicIPAddressConfiguration(new VirtualMachinePublicIPAddressConfiguration() - .withName("ogtwrupqsxvnmi") - .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(560100496) - .withDeleteOption(DeleteOptions.DETACH) - .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() - .withDomainNameLabel("vei")) - .withIpTags(Arrays.asList(new VirtualMachineIpTag(), - new VirtualMachineIpTag(), new VirtualMachineIpTag())) - .withPublicIPPrefix(new SubResource()) - .withPublicIPAddressVersion(IPVersions.IPV6) - .withPublicIPAllocationMethod(PublicIPAllocationMethod.DYNAMIC)) - .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.STANDARD) - .withTier(PublicIPAddressSkuTier.GLOBAL)) - .withTags(mapOf("dhbt", "cn"))) - .withPrivateIPAddressVersion(IPVersions.IPV4) - .withApplicationSecurityGroups(Arrays.asList( - new SubResource().withId("pnvjtoqnermclf"), new SubResource().withId("phoxus"))) - .withApplicationGatewayBackendAddressPools(Arrays - .asList(new SubResource().withId("bgyepsbj"), new SubResource().withId("zq"))) - .withLoadBalancerBackendAddressPools(Arrays.asList( - new SubResource().withId("wpmueefj"), new SubResource().withId("fqkquj"), - new SubResource().withId("suyonobglaocq"), new SubResource().withId("ccm")))))) - .withDscpConfiguration(new SubResource().withId("dxyt")) - .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.FLOATING) - .withAuxiliarySku(NetworkInterfaceAuxiliarySku.A4); - model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceConfigurationProperties.class); - Assertions.assertTrue(model.primary()); - Assertions.assertEquals(DeleteOptions.DETACH, model.deleteOption()); - Assertions.assertTrue(model.enableAcceleratedNetworking()); - Assertions.assertTrue(model.disableTcpStateTracking()); - Assertions.assertTrue(model.enableFpga()); - Assertions.assertTrue(model.enableIPForwarding()); - Assertions.assertEquals("spnqzahmgkb", model.networkSecurityGroup().id()); - Assertions.assertEquals("dhibnuq", model.dnsSettings().dnsServers().get(0)); - Assertions.assertEquals("pikad", model.ipConfigurations().get(0).name()); - Assertions.assertEquals("qagnbuyn", model.ipConfigurations().get(0).properties().subnet().id()); - Assertions.assertTrue(model.ipConfigurations().get(0).properties().primary()); - Assertions.assertEquals("gmebfsiarbutrcv", - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); - Assertions.assertEquals(1487439384, - model.ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .properties() - .idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DETACH, - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().properties().deleteOption()); - Assertions.assertEquals("jrunmpxtt", - model.ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .properties() - .dnsSettings() - .domainNameLabel()); - Assertions.assertEquals(IPVersions.IPV6, - model.ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .properties() - .publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.STATIC, - model.ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .properties() - .publicIPAllocationMethod()); - Assertions.assertEquals(PublicIPAddressSkuName.BASIC, - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().sku().name()); - Assertions.assertEquals(PublicIPAddressSkuTier.REGIONAL, - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().sku().tier()); - Assertions.assertEquals("pbh", - model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().tags().get("nbtkcxywnytnr")); - Assertions.assertEquals(IPVersions.IPV6, - model.ipConfigurations().get(0).properties().privateIPAddressVersion()); - Assertions.assertEquals("dybyxczfclhaa", - model.ipConfigurations().get(0).properties().applicationSecurityGroups().get(0).id()); - Assertions.assertEquals("sucocmnyyazttbtw", - model.ipConfigurations().get(0).properties().applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("uedck", - model.ipConfigurations().get(0).properties().loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("dxyt", model.dscpConfiguration().id()); - Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, model.auxiliaryMode()); - Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A4, model.auxiliarySku()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationTests.java deleted file mode 100644 index 9e750bbe8c21..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceConfigurationTests.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.IPVersions; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliaryMode; -import com.azure.resourcemanager.computeschedule.models.NetworkInterfaceAuxiliarySku; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineNetworkInterfaceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineNetworkInterfaceConfiguration model = BinaryData.fromString( - "{\"name\":\"v\",\"properties\":{\"primary\":false,\"deleteOption\":\"Delete\",\"enableAcceleratedNetworking\":true,\"disableTcpStateTracking\":true,\"enableFpga\":false,\"enableIPForwarding\":false,\"networkSecurityGroup\":{\"id\":\"wburvjxxjnspydpt\"},\"dnsSettings\":{\"dnsServers\":[\"kouknvudwtiu\",\"bldngkpoc\"]},\"ipConfigurations\":[{\"name\":\"azyxoegukg\",\"properties\":{\"subnet\":{\"id\":\"ucgygevqz\"},\"primary\":false,\"publicIPAddressConfiguration\":{\"name\":\"mrbpizcdrqj\",\"properties\":{},\"sku\":{},\"tags\":{\"eoejzic\":\"nfyhx\",\"hajdeyeamdpha\":\"ifsjttgzfbishcb\",\"wkgshwa\":\"alpbuxwgipwhon\",\"bin\":\"kix\"}},\"privateIPAddressVersion\":\"IPv4\",\"applicationSecurityGroups\":[{},{},{}],\"applicationGatewayBackendAddressPools\":[{}],\"loadBalancerBackendAddressPools\":[{},{}]}},{\"name\":\"wnuzoqftiyqzrnkc\",\"properties\":{\"subnet\":{\"id\":\"lwh\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"cohoq\",\"properties\":{},\"sku\":{},\"tags\":{\"yxzk\":\"ryavwhheunmmqh\",\"koklya\":\"noc\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{},{},{}],\"applicationGatewayBackendAddressPools\":[{}],\"loadBalancerBackendAddressPools\":[{}]}},{\"name\":\"fkbey\",\"properties\":{\"subnet\":{\"id\":\"mjmwvvjektcx\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"wlrsffrzpwv\",\"properties\":{},\"sku\":{},\"tags\":{\"kt\":\"biqylihkaet\",\"ctq\":\"fcivfsnkym\",\"ebrjcxe\":\"jf\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{},{},{},{}],\"applicationGatewayBackendAddressPools\":[{},{}],\"loadBalancerBackendAddressPools\":[{},{},{}]}}],\"dscpConfiguration\":{\"id\":\"jrbirphxepcyv\"},\"auxiliaryMode\":\"Floating\",\"auxiliarySku\":\"A2\"},\"tags\":{\"j\":\"yq\",\"gvcl\":\"uujqgidokgjljyo\",\"jhtxfvgxbfsmxne\":\"bgsncghkjeszzhb\",\"rbmpukgri\":\"mpvecxgodebfqk\"}}") - .toObject(VirtualMachineNetworkInterfaceConfiguration.class); - Assertions.assertEquals("v", model.name()); - Assertions.assertFalse(model.properties().primary()); - Assertions.assertEquals(DeleteOptions.DELETE, model.properties().deleteOption()); - Assertions.assertTrue(model.properties().enableAcceleratedNetworking()); - Assertions.assertTrue(model.properties().disableTcpStateTracking()); - Assertions.assertFalse(model.properties().enableFpga()); - Assertions.assertFalse(model.properties().enableIPForwarding()); - Assertions.assertEquals("wburvjxxjnspydpt", model.properties().networkSecurityGroup().id()); - Assertions.assertEquals("kouknvudwtiu", model.properties().dnsSettings().dnsServers().get(0)); - Assertions.assertEquals("azyxoegukg", model.properties().ipConfigurations().get(0).name()); - Assertions.assertEquals("ucgygevqz", model.properties().ipConfigurations().get(0).properties().subnet().id()); - Assertions.assertFalse(model.properties().ipConfigurations().get(0).properties().primary()); - Assertions.assertEquals("mrbpizcdrqj", - model.properties().ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); - Assertions.assertEquals("nfyhx", - model.properties() - .ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .tags() - .get("eoejzic")); - Assertions.assertEquals(IPVersions.IPV4, - model.properties().ipConfigurations().get(0).properties().privateIPAddressVersion()); - Assertions.assertEquals("jrbirphxepcyv", model.properties().dscpConfiguration().id()); - Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, model.properties().auxiliaryMode()); - Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A2, model.properties().auxiliarySku()); - Assertions.assertEquals("yq", model.tags().get("j")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineNetworkInterfaceConfiguration model - = new VirtualMachineNetworkInterfaceConfiguration().withName("v") - .withProperties( - new VirtualMachineNetworkInterfaceConfigurationProperties().withPrimary(false) - .withDeleteOption(DeleteOptions.DELETE) - .withEnableAcceleratedNetworking(true) - .withDisableTcpStateTracking(true) - .withEnableFpga(false) - .withEnableIPForwarding(false) - .withNetworkSecurityGroup(new SubResource().withId("wburvjxxjnspydpt")) - .withDnsSettings(new VirtualMachineNetworkInterfaceDnsSettingsConfiguration() - .withDnsServers(Arrays.asList("kouknvudwtiu", "bldngkpoc"))) - .withIpConfigurations( - Arrays.asList( - new VirtualMachineNetworkInterfaceIPConfiguration().withName("azyxoegukg") - .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties() - .withSubnet(new SubResource().withId("ucgygevqz")) - .withPrimary(false) - .withPublicIPAddressConfiguration( - new VirtualMachinePublicIPAddressConfiguration().withName("mrbpizcdrqj") - .withProperties( - new VirtualMachinePublicIPAddressConfigurationProperties()) - .withSku(new PublicIPAddressSku()) - .withTags(mapOf("eoejzic", "nfyhx", "hajdeyeamdpha", "ifsjttgzfbishcb", - "wkgshwa", "alpbuxwgipwhon", "bin", "kix"))) - .withPrivateIPAddressVersion(IPVersions.IPV4) - .withApplicationSecurityGroups( - Arrays.asList(new SubResource(), new SubResource(), new SubResource())) - .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource())) - .withLoadBalancerBackendAddressPools( - Arrays.asList(new SubResource(), new SubResource()))), - new VirtualMachineNetworkInterfaceIPConfiguration().withName("wnuzoqftiyqzrnkc") - .withProperties(new VirtualMachineNetworkInterfaceIPConfigurationProperties() - .withSubnet(new SubResource().withId("lwh")) - .withPrimary(true) - .withPublicIPAddressConfiguration( - new VirtualMachinePublicIPAddressConfiguration().withName("cohoq") - .withProperties( - new VirtualMachinePublicIPAddressConfigurationProperties()) - .withSku(new PublicIPAddressSku()) - .withTags(mapOf("yxzk", "ryavwhheunmmqh", "koklya", "noc"))) - .withPrivateIPAddressVersion(IPVersions.IPV6) - .withApplicationSecurityGroups( - Arrays.asList(new SubResource(), new SubResource(), new SubResource())) - .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource())) - .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource()))), - new VirtualMachineNetworkInterfaceIPConfiguration().withName("fkbey") - .withProperties( - new VirtualMachineNetworkInterfaceIPConfigurationProperties() - .withSubnet(new SubResource().withId("mjmwvvjektcx")) - .withPrimary(true) - .withPublicIPAddressConfiguration( - new VirtualMachinePublicIPAddressConfiguration().withName("wlrsffrzpwv") - .withProperties( - new VirtualMachinePublicIPAddressConfigurationProperties()) - .withSku(new PublicIPAddressSku()) - .withTags(mapOf("kt", "biqylihkaet", "ctq", "fcivfsnkym", "ebrjcxe", - "jf"))) - .withPrivateIPAddressVersion(IPVersions.IPV6) - .withApplicationSecurityGroups(Arrays.asList(new SubResource(), - new SubResource(), new SubResource(), new SubResource())) - .withApplicationGatewayBackendAddressPools( - Arrays.asList(new SubResource(), new SubResource())) - .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource(), - new SubResource(), new SubResource()))))) - .withDscpConfiguration(new SubResource().withId("jrbirphxepcyv")) - .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.FLOATING) - .withAuxiliarySku(NetworkInterfaceAuxiliarySku.A2)) - .withTags(mapOf("j", "yq", "gvcl", "uujqgidokgjljyo", "jhtxfvgxbfsmxne", "bgsncghkjeszzhb", "rbmpukgri", - "mpvecxgodebfqk")); - model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceConfiguration.class); - Assertions.assertEquals("v", model.name()); - Assertions.assertFalse(model.properties().primary()); - Assertions.assertEquals(DeleteOptions.DELETE, model.properties().deleteOption()); - Assertions.assertTrue(model.properties().enableAcceleratedNetworking()); - Assertions.assertTrue(model.properties().disableTcpStateTracking()); - Assertions.assertFalse(model.properties().enableFpga()); - Assertions.assertFalse(model.properties().enableIPForwarding()); - Assertions.assertEquals("wburvjxxjnspydpt", model.properties().networkSecurityGroup().id()); - Assertions.assertEquals("kouknvudwtiu", model.properties().dnsSettings().dnsServers().get(0)); - Assertions.assertEquals("azyxoegukg", model.properties().ipConfigurations().get(0).name()); - Assertions.assertEquals("ucgygevqz", model.properties().ipConfigurations().get(0).properties().subnet().id()); - Assertions.assertFalse(model.properties().ipConfigurations().get(0).properties().primary()); - Assertions.assertEquals("mrbpizcdrqj", - model.properties().ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); - Assertions.assertEquals("nfyhx", - model.properties() - .ipConfigurations() - .get(0) - .properties() - .publicIPAddressConfiguration() - .tags() - .get("eoejzic")); - Assertions.assertEquals(IPVersions.IPV4, - model.properties().ipConfigurations().get(0).properties().privateIPAddressVersion()); - Assertions.assertEquals("jrbirphxepcyv", model.properties().dscpConfiguration().id()); - Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, model.properties().auxiliaryMode()); - Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A2, model.properties().auxiliarySku()); - Assertions.assertEquals("yq", model.tags().get("j")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests.java deleted file mode 100644 index 242bbdeaf087..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineNetworkInterfaceDnsSettingsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineNetworkInterfaceDnsSettingsConfiguration model - = BinaryData.fromString("{\"dnsServers\":[\"wfudwpzntxhdzhl\",\"qj\",\"hckfrlhrx\",\"bkyvp\"]}") - .toObject(VirtualMachineNetworkInterfaceDnsSettingsConfiguration.class); - Assertions.assertEquals("wfudwpzntxhdzhl", model.dnsServers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineNetworkInterfaceDnsSettingsConfiguration model - = new VirtualMachineNetworkInterfaceDnsSettingsConfiguration() - .withDnsServers(Arrays.asList("wfudwpzntxhdzhl", "qj", "hckfrlhrx", "bkyvp")); - model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceDnsSettingsConfiguration.class); - Assertions.assertEquals("wfudwpzntxhdzhl", model.dnsServers().get(0)); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests.java deleted file mode 100644 index 451275e2f10f..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; -import com.azure.resourcemanager.computeschedule.models.IPVersions; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; -import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineNetworkInterfaceIPConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineNetworkInterfaceIPConfigurationProperties model = BinaryData.fromString( - "{\"subnet\":{\"id\":\"auwhvylwzbtdhx\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"bm\",\"properties\":{\"idleTimeoutInMinutes\":1809911525,\"deleteOption\":\"Delete\",\"dnsSettings\":{\"domainNameLabel\":\"zqlveualupjmkhf\",\"domainNameLabelScope\":\"ResourceGroupReuse\"},\"ipTags\":[{\"ipTagType\":\"wsrtjriplrbpbe\",\"tag\":\"ghfg\"},{\"ipTagType\":\"c\",\"tag\":\"xzvlvqhjkbegib\"},{\"ipTagType\":\"mxiebw\",\"tag\":\"loayqcgw\"}],\"publicIPPrefix\":{\"id\":\"j\"},\"publicIPAddressVersion\":\"IPv4\",\"publicIPAllocationMethod\":\"Dynamic\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Global\"},\"tags\":{\"nftguvriuhpr\":\"gmtsavjcbpwxqpsr\",\"ro\":\"mdyvxqtayriw\",\"mcqibycnojv\":\"qbex\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{\"id\":\"sgzvahapjyzhpv\"},{\"id\":\"zcjrvxdjzlmwlx\"},{\"id\":\"ug\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"vawjvzunlu\"},{\"id\":\"nnprn\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"ilpjzuaejxdult\"},{\"id\":\"zbbtdzumveek\"},{\"id\":\"wozuhkf\"},{\"id\":\"sjyofdx\"}]}") - .toObject(VirtualMachineNetworkInterfaceIPConfigurationProperties.class); - Assertions.assertEquals("auwhvylwzbtdhx", model.subnet().id()); - Assertions.assertTrue(model.primary()); - Assertions.assertEquals("bm", model.publicIPAddressConfiguration().name()); - Assertions.assertEquals(1809911525, model.publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DELETE, model.publicIPAddressConfiguration().properties().deleteOption()); - Assertions.assertEquals("zqlveualupjmkhf", - model.publicIPAddressConfiguration().properties().dnsSettings().domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE, - model.publicIPAddressConfiguration().properties().dnsSettings().domainNameLabelScope()); - Assertions.assertEquals("wsrtjriplrbpbe", - model.publicIPAddressConfiguration().properties().ipTags().get(0).ipTagType()); - Assertions.assertEquals("ghfg", model.publicIPAddressConfiguration().properties().ipTags().get(0).tag()); - Assertions.assertEquals("j", model.publicIPAddressConfiguration().properties().publicIPPrefix().id()); - Assertions.assertEquals(IPVersions.IPV4, - model.publicIPAddressConfiguration().properties().publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.DYNAMIC, - model.publicIPAddressConfiguration().properties().publicIPAllocationMethod()); - Assertions.assertEquals(PublicIPAddressSkuName.STANDARD, model.publicIPAddressConfiguration().sku().name()); - Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, model.publicIPAddressConfiguration().sku().tier()); - Assertions.assertEquals("gmtsavjcbpwxqpsr", model.publicIPAddressConfiguration().tags().get("nftguvriuhpr")); - Assertions.assertEquals(IPVersions.IPV6, model.privateIPAddressVersion()); - Assertions.assertEquals("sgzvahapjyzhpv", model.applicationSecurityGroups().get(0).id()); - Assertions.assertEquals("vawjvzunlu", model.applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("ilpjzuaejxdult", model.loadBalancerBackendAddressPools().get(0).id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineNetworkInterfaceIPConfigurationProperties model - = new VirtualMachineNetworkInterfaceIPConfigurationProperties() - .withSubnet(new SubResource().withId("auwhvylwzbtdhx")) - .withPrimary(true) - .withPublicIPAddressConfiguration( - new VirtualMachinePublicIPAddressConfiguration().withName("bm") - .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(1809911525) - .withDeleteOption(DeleteOptions.DELETE) - .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() - .withDomainNameLabel("zqlveualupjmkhf") - .withDomainNameLabelScope(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE)) - .withIpTags( - Arrays.asList(new VirtualMachineIpTag().withIpTagType("wsrtjriplrbpbe").withTag("ghfg"), - new VirtualMachineIpTag().withIpTagType("c").withTag("xzvlvqhjkbegib"), - new VirtualMachineIpTag().withIpTagType("mxiebw").withTag("loayqcgw"))) - .withPublicIPPrefix(new SubResource().withId("j")) - .withPublicIPAddressVersion(IPVersions.IPV4) - .withPublicIPAllocationMethod(PublicIPAllocationMethod.DYNAMIC)) - .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.STANDARD) - .withTier(PublicIPAddressSkuTier.GLOBAL)) - .withTags( - mapOf("nftguvriuhpr", "gmtsavjcbpwxqpsr", "ro", "mdyvxqtayriw", "mcqibycnojv", "qbex"))) - .withPrivateIPAddressVersion(IPVersions.IPV6) - .withApplicationSecurityGroups(Arrays.asList(new SubResource().withId("sgzvahapjyzhpv"), - new SubResource().withId("zcjrvxdjzlmwlx"), new SubResource().withId("ug"))) - .withApplicationGatewayBackendAddressPools( - Arrays.asList(new SubResource().withId("vawjvzunlu"), new SubResource().withId("nnprn"))) - .withLoadBalancerBackendAddressPools( - Arrays.asList(new SubResource().withId("ilpjzuaejxdult"), new SubResource().withId("zbbtdzumveek"), - new SubResource().withId("wozuhkf"), new SubResource().withId("sjyofdx"))); - model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceIPConfigurationProperties.class); - Assertions.assertEquals("auwhvylwzbtdhx", model.subnet().id()); - Assertions.assertTrue(model.primary()); - Assertions.assertEquals("bm", model.publicIPAddressConfiguration().name()); - Assertions.assertEquals(1809911525, model.publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DELETE, model.publicIPAddressConfiguration().properties().deleteOption()); - Assertions.assertEquals("zqlveualupjmkhf", - model.publicIPAddressConfiguration().properties().dnsSettings().domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE, - model.publicIPAddressConfiguration().properties().dnsSettings().domainNameLabelScope()); - Assertions.assertEquals("wsrtjriplrbpbe", - model.publicIPAddressConfiguration().properties().ipTags().get(0).ipTagType()); - Assertions.assertEquals("ghfg", model.publicIPAddressConfiguration().properties().ipTags().get(0).tag()); - Assertions.assertEquals("j", model.publicIPAddressConfiguration().properties().publicIPPrefix().id()); - Assertions.assertEquals(IPVersions.IPV4, - model.publicIPAddressConfiguration().properties().publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.DYNAMIC, - model.publicIPAddressConfiguration().properties().publicIPAllocationMethod()); - Assertions.assertEquals(PublicIPAddressSkuName.STANDARD, model.publicIPAddressConfiguration().sku().name()); - Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, model.publicIPAddressConfiguration().sku().tier()); - Assertions.assertEquals("gmtsavjcbpwxqpsr", model.publicIPAddressConfiguration().tags().get("nftguvriuhpr")); - Assertions.assertEquals(IPVersions.IPV6, model.privateIPAddressVersion()); - Assertions.assertEquals("sgzvahapjyzhpv", model.applicationSecurityGroups().get(0).id()); - Assertions.assertEquals("vawjvzunlu", model.applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("ilpjzuaejxdult", model.loadBalancerBackendAddressPools().get(0).id()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationTests.java deleted file mode 100644 index 90b1978e28b9..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachineNetworkInterfaceIPConfigurationTests.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; -import com.azure.resourcemanager.computeschedule.models.IPVersions; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; -import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineNetworkInterfaceIPConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineNetworkInterfaceIPConfiguration model = BinaryData.fromString( - "{\"name\":\"ca\",\"properties\":{\"subnet\":{\"id\":\"p\"},\"primary\":false,\"publicIPAddressConfiguration\":{\"name\":\"kuwbcrnwb\",\"properties\":{\"idleTimeoutInMinutes\":1688496747,\"deleteOption\":\"Detach\",\"dnsSettings\":{\"domainNameLabel\":\"v\",\"domainNameLabelScope\":\"NoReuse\"},\"ipTags\":[{\"ipTagType\":\"lhspkdee\",\"tag\":\"ofmxagkvtmelmqkr\"},{\"ipTagType\":\"hvljuahaquh\",\"tag\":\"hmdua\"},{\"ipTagType\":\"exq\",\"tag\":\"fadmws\"}],\"publicIPPrefix\":{\"id\":\"gvxp\"},\"publicIPAddressVersion\":\"IPv4\",\"publicIPAllocationMethod\":\"Static\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Global\"},\"tags\":{\"ali\":\"bnbbeldawkz\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationSecurityGroups\":[{\"id\":\"kauhashsfwxo\"},{\"id\":\"w\"},{\"id\":\"cugicjoox\"}],\"applicationGatewayBackendAddressPools\":[{\"id\":\"wpucwwfvovbv\"},{\"id\":\"uecivyhz\"},{\"id\":\"uojgj\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"eiotwmcdytdx\"},{\"id\":\"txnrjaw\"},{\"id\":\"wgxhn\"},{\"id\":\"kxfbkpycgklwndn\"}]}}") - .toObject(VirtualMachineNetworkInterfaceIPConfiguration.class); - Assertions.assertEquals("ca", model.name()); - Assertions.assertEquals("p", model.properties().subnet().id()); - Assertions.assertFalse(model.properties().primary()); - Assertions.assertEquals("kuwbcrnwb", model.properties().publicIPAddressConfiguration().name()); - Assertions.assertEquals(1688496747, - model.properties().publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DETACH, - model.properties().publicIPAddressConfiguration().properties().deleteOption()); - Assertions.assertEquals("v", - model.properties().publicIPAddressConfiguration().properties().dnsSettings().domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.NO_REUSE, - model.properties().publicIPAddressConfiguration().properties().dnsSettings().domainNameLabelScope()); - Assertions.assertEquals("lhspkdee", - model.properties().publicIPAddressConfiguration().properties().ipTags().get(0).ipTagType()); - Assertions.assertEquals("ofmxagkvtmelmqkr", - model.properties().publicIPAddressConfiguration().properties().ipTags().get(0).tag()); - Assertions.assertEquals("gvxp", - model.properties().publicIPAddressConfiguration().properties().publicIPPrefix().id()); - Assertions.assertEquals(IPVersions.IPV4, - model.properties().publicIPAddressConfiguration().properties().publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.STATIC, - model.properties().publicIPAddressConfiguration().properties().publicIPAllocationMethod()); - Assertions.assertEquals(PublicIPAddressSkuName.BASIC, - model.properties().publicIPAddressConfiguration().sku().name()); - Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, - model.properties().publicIPAddressConfiguration().sku().tier()); - Assertions.assertEquals("bnbbeldawkz", model.properties().publicIPAddressConfiguration().tags().get("ali")); - Assertions.assertEquals(IPVersions.IPV6, model.properties().privateIPAddressVersion()); - Assertions.assertEquals("kauhashsfwxo", model.properties().applicationSecurityGroups().get(0).id()); - Assertions.assertEquals("wpucwwfvovbv", model.properties().applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("eiotwmcdytdx", model.properties().loadBalancerBackendAddressPools().get(0).id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineNetworkInterfaceIPConfiguration model - = new VirtualMachineNetworkInterfaceIPConfiguration().withName("ca") - .withProperties( - new VirtualMachineNetworkInterfaceIPConfigurationProperties() - .withSubnet(new SubResource().withId("p")) - .withPrimary(false) - .withPublicIPAddressConfiguration( - new VirtualMachinePublicIPAddressConfiguration().withName("kuwbcrnwb") - .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(1688496747) - .withDeleteOption(DeleteOptions.DETACH) - .withDnsSettings(new VirtualMachinePublicIPAddressDnsSettingsConfiguration() - .withDomainNameLabel("v") - .withDomainNameLabelScope(DomainNameLabelScopeTypes.NO_REUSE)) - .withIpTags(Arrays.asList( - new VirtualMachineIpTag().withIpTagType("lhspkdee").withTag("ofmxagkvtmelmqkr"), - new VirtualMachineIpTag().withIpTagType("hvljuahaquh").withTag("hmdua"), - new VirtualMachineIpTag().withIpTagType("exq").withTag("fadmws"))) - .withPublicIPPrefix(new SubResource().withId("gvxp")) - .withPublicIPAddressVersion(IPVersions.IPV4) - .withPublicIPAllocationMethod(PublicIPAllocationMethod.STATIC)) - .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.BASIC) - .withTier(PublicIPAddressSkuTier.GLOBAL)) - .withTags(mapOf("ali", "bnbbeldawkz"))) - .withPrivateIPAddressVersion(IPVersions.IPV6) - .withApplicationSecurityGroups(Arrays.asList(new SubResource().withId("kauhashsfwxo"), - new SubResource().withId("w"), new SubResource().withId("cugicjoox"))) - .withApplicationGatewayBackendAddressPools( - Arrays.asList(new SubResource().withId("wpucwwfvovbv"), - new SubResource().withId("uecivyhz"), new SubResource().withId("uojgj"))) - .withLoadBalancerBackendAddressPools( - Arrays.asList(new SubResource().withId("eiotwmcdytdx"), new SubResource().withId("txnrjaw"), - new SubResource().withId("wgxhn"), new SubResource().withId("kxfbkpycgklwndn")))); - model = BinaryData.fromObject(model).toObject(VirtualMachineNetworkInterfaceIPConfiguration.class); - Assertions.assertEquals("ca", model.name()); - Assertions.assertEquals("p", model.properties().subnet().id()); - Assertions.assertFalse(model.properties().primary()); - Assertions.assertEquals("kuwbcrnwb", model.properties().publicIPAddressConfiguration().name()); - Assertions.assertEquals(1688496747, - model.properties().publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DETACH, - model.properties().publicIPAddressConfiguration().properties().deleteOption()); - Assertions.assertEquals("v", - model.properties().publicIPAddressConfiguration().properties().dnsSettings().domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.NO_REUSE, - model.properties().publicIPAddressConfiguration().properties().dnsSettings().domainNameLabelScope()); - Assertions.assertEquals("lhspkdee", - model.properties().publicIPAddressConfiguration().properties().ipTags().get(0).ipTagType()); - Assertions.assertEquals("ofmxagkvtmelmqkr", - model.properties().publicIPAddressConfiguration().properties().ipTags().get(0).tag()); - Assertions.assertEquals("gvxp", - model.properties().publicIPAddressConfiguration().properties().publicIPPrefix().id()); - Assertions.assertEquals(IPVersions.IPV4, - model.properties().publicIPAddressConfiguration().properties().publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.STATIC, - model.properties().publicIPAddressConfiguration().properties().publicIPAllocationMethod()); - Assertions.assertEquals(PublicIPAddressSkuName.BASIC, - model.properties().publicIPAddressConfiguration().sku().name()); - Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, - model.properties().publicIPAddressConfiguration().sku().tier()); - Assertions.assertEquals("bnbbeldawkz", model.properties().publicIPAddressConfiguration().tags().get("ali")); - Assertions.assertEquals(IPVersions.IPV6, model.properties().privateIPAddressVersion()); - Assertions.assertEquals("kauhashsfwxo", model.properties().applicationSecurityGroups().get(0).id()); - Assertions.assertEquals("wpucwwfvovbv", model.properties().applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("eiotwmcdytdx", model.properties().loadBalancerBackendAddressPools().get(0).id()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationPropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationPropertiesTests.java deleted file mode 100644 index 34adff9f66b5..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationPropertiesTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; -import com.azure.resourcemanager.computeschedule.models.IPVersions; -import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachinePublicIPAddressConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachinePublicIPAddressConfigurationProperties model = BinaryData.fromString( - "{\"idleTimeoutInMinutes\":1201064167,\"deleteOption\":\"Detach\",\"dnsSettings\":{\"domainNameLabel\":\"nalaulppg\",\"domainNameLabelScope\":\"NoReuse\"},\"ipTags\":[{\"ipTagType\":\"pnyiropuhp\",\"tag\":\"vpgylgqgitxmed\"},{\"ipTagType\":\"c\",\"tag\":\"ynqwwncwzzhxgk\"},{\"ipTagType\":\"mgucna\",\"tag\":\"t\"},{\"ipTagType\":\"ellwptfdy\",\"tag\":\"fqbuaceopzf\"}],\"publicIPPrefix\":{\"id\":\"huaoppp\"},\"publicIPAddressVersion\":\"IPv4\",\"publicIPAllocationMethod\":\"Static\"}") - .toObject(VirtualMachinePublicIPAddressConfigurationProperties.class); - Assertions.assertEquals(1201064167, model.idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DETACH, model.deleteOption()); - Assertions.assertEquals("nalaulppg", model.dnsSettings().domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.NO_REUSE, model.dnsSettings().domainNameLabelScope()); - Assertions.assertEquals("pnyiropuhp", model.ipTags().get(0).ipTagType()); - Assertions.assertEquals("vpgylgqgitxmed", model.ipTags().get(0).tag()); - Assertions.assertEquals("huaoppp", model.publicIPPrefix().id()); - Assertions.assertEquals(IPVersions.IPV4, model.publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.STATIC, model.publicIPAllocationMethod()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachinePublicIPAddressConfigurationProperties model - = new VirtualMachinePublicIPAddressConfigurationProperties().withIdleTimeoutInMinutes(1201064167) - .withDeleteOption(DeleteOptions.DETACH) - .withDnsSettings( - new VirtualMachinePublicIPAddressDnsSettingsConfiguration().withDomainNameLabel("nalaulppg") - .withDomainNameLabelScope(DomainNameLabelScopeTypes.NO_REUSE)) - .withIpTags( - Arrays.asList(new VirtualMachineIpTag().withIpTagType("pnyiropuhp").withTag("vpgylgqgitxmed"), - new VirtualMachineIpTag().withIpTagType("c").withTag("ynqwwncwzzhxgk"), - new VirtualMachineIpTag().withIpTagType("mgucna").withTag("t"), - new VirtualMachineIpTag().withIpTagType("ellwptfdy").withTag("fqbuaceopzf"))) - .withPublicIPPrefix(new SubResource().withId("huaoppp")) - .withPublicIPAddressVersion(IPVersions.IPV4) - .withPublicIPAllocationMethod(PublicIPAllocationMethod.STATIC); - model = BinaryData.fromObject(model).toObject(VirtualMachinePublicIPAddressConfigurationProperties.class); - Assertions.assertEquals(1201064167, model.idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DETACH, model.deleteOption()); - Assertions.assertEquals("nalaulppg", model.dnsSettings().domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.NO_REUSE, model.dnsSettings().domainNameLabelScope()); - Assertions.assertEquals("pnyiropuhp", model.ipTags().get(0).ipTagType()); - Assertions.assertEquals("vpgylgqgitxmed", model.ipTags().get(0).tag()); - Assertions.assertEquals("huaoppp", model.publicIPPrefix().id()); - Assertions.assertEquals(IPVersions.IPV4, model.publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.STATIC, model.publicIPAllocationMethod()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationTests.java deleted file mode 100644 index 70e33693a9a9..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressConfigurationTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DeleteOptions; -import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; -import com.azure.resourcemanager.computeschedule.models.IPVersions; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSku; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuName; -import com.azure.resourcemanager.computeschedule.models.PublicIPAddressSkuTier; -import com.azure.resourcemanager.computeschedule.models.PublicIPAllocationMethod; -import com.azure.resourcemanager.computeschedule.models.VirtualMachineIpTag; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfiguration; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachinePublicIPAddressConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachinePublicIPAddressConfiguration model = BinaryData.fromString( - "{\"name\":\"uusdttouwa\",\"properties\":{\"idleTimeoutInMinutes\":2116291824,\"deleteOption\":\"Delete\",\"dnsSettings\":{\"domainNameLabel\":\"elnsmvbxw\",\"domainNameLabelScope\":\"SubscriptionReuse\"},\"ipTags\":[{\"ipTagType\":\"hcaalnjix\",\"tag\":\"xyawj\"}],\"publicIPPrefix\":{\"id\":\"qcslyjpkiid\"},\"publicIPAddressVersion\":\"IPv6\",\"publicIPAllocationMethod\":\"Static\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Global\"},\"tags\":{\"o\":\"rzt\"}}") - .toObject(VirtualMachinePublicIPAddressConfiguration.class); - Assertions.assertEquals("uusdttouwa", model.name()); - Assertions.assertEquals(2116291824, model.properties().idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DELETE, model.properties().deleteOption()); - Assertions.assertEquals("elnsmvbxw", model.properties().dnsSettings().domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.SUBSCRIPTION_REUSE, - model.properties().dnsSettings().domainNameLabelScope()); - Assertions.assertEquals("hcaalnjix", model.properties().ipTags().get(0).ipTagType()); - Assertions.assertEquals("xyawj", model.properties().ipTags().get(0).tag()); - Assertions.assertEquals("qcslyjpkiid", model.properties().publicIPPrefix().id()); - Assertions.assertEquals(IPVersions.IPV6, model.properties().publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.STATIC, model.properties().publicIPAllocationMethod()); - Assertions.assertEquals(PublicIPAddressSkuName.STANDARD, model.sku().name()); - Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, model.sku().tier()); - Assertions.assertEquals("rzt", model.tags().get("o")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachinePublicIPAddressConfiguration model - = new VirtualMachinePublicIPAddressConfiguration().withName("uusdttouwa") - .withProperties(new VirtualMachinePublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(2116291824) - .withDeleteOption(DeleteOptions.DELETE) - .withDnsSettings( - new VirtualMachinePublicIPAddressDnsSettingsConfiguration().withDomainNameLabel("elnsmvbxw") - .withDomainNameLabelScope(DomainNameLabelScopeTypes.SUBSCRIPTION_REUSE)) - .withIpTags(Arrays.asList(new VirtualMachineIpTag().withIpTagType("hcaalnjix").withTag("xyawj"))) - .withPublicIPPrefix(new SubResource().withId("qcslyjpkiid")) - .withPublicIPAddressVersion(IPVersions.IPV6) - .withPublicIPAllocationMethod(PublicIPAllocationMethod.STATIC)) - .withSku(new PublicIPAddressSku().withName(PublicIPAddressSkuName.STANDARD) - .withTier(PublicIPAddressSkuTier.GLOBAL)) - .withTags(mapOf("o", "rzt")); - model = BinaryData.fromObject(model).toObject(VirtualMachinePublicIPAddressConfiguration.class); - Assertions.assertEquals("uusdttouwa", model.name()); - Assertions.assertEquals(2116291824, model.properties().idleTimeoutInMinutes()); - Assertions.assertEquals(DeleteOptions.DELETE, model.properties().deleteOption()); - Assertions.assertEquals("elnsmvbxw", model.properties().dnsSettings().domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.SUBSCRIPTION_REUSE, - model.properties().dnsSettings().domainNameLabelScope()); - Assertions.assertEquals("hcaalnjix", model.properties().ipTags().get(0).ipTagType()); - Assertions.assertEquals("xyawj", model.properties().ipTags().get(0).tag()); - Assertions.assertEquals("qcslyjpkiid", model.properties().publicIPPrefix().id()); - Assertions.assertEquals(IPVersions.IPV6, model.properties().publicIPAddressVersion()); - Assertions.assertEquals(PublicIPAllocationMethod.STATIC, model.properties().publicIPAllocationMethod()); - Assertions.assertEquals(PublicIPAddressSkuName.STANDARD, model.sku().name()); - Assertions.assertEquals(PublicIPAddressSkuTier.GLOBAL, model.sku().tier()); - Assertions.assertEquals("rzt", model.tags().get("o")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressDnsSettingsConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressDnsSettingsConfigurationTests.java deleted file mode 100644 index f596709bc222..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VirtualMachinePublicIPAddressDnsSettingsConfigurationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DomainNameLabelScopeTypes; -import com.azure.resourcemanager.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachinePublicIPAddressDnsSettingsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachinePublicIPAddressDnsSettingsConfiguration model - = BinaryData.fromString("{\"domainNameLabel\":\"ol\",\"domainNameLabelScope\":\"ResourceGroupReuse\"}") - .toObject(VirtualMachinePublicIPAddressDnsSettingsConfiguration.class); - Assertions.assertEquals("ol", model.domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE, model.domainNameLabelScope()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachinePublicIPAddressDnsSettingsConfiguration model - = new VirtualMachinePublicIPAddressDnsSettingsConfiguration().withDomainNameLabel("ol") - .withDomainNameLabelScope(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE); - model = BinaryData.fromObject(model).toObject(VirtualMachinePublicIPAddressDnsSettingsConfiguration.class); - Assertions.assertEquals("ol", model.domainNameLabel()); - Assertions.assertEquals(DomainNameLabelScopeTypes.RESOURCE_GROUP_REUSE, model.domainNameLabelScope()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizeProfileTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizeProfileTests.java deleted file mode 100644 index 9402afd3bf8f..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizeProfileTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.VmSizeProfile; -import org.junit.jupiter.api.Assertions; - -public final class VmSizeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmSizeProfile model - = BinaryData.fromString("{\"name\":\"vpk\",\"rank\":1022685385}").toObject(VmSizeProfile.class); - Assertions.assertEquals("vpk", model.name()); - Assertions.assertEquals(1022685385, model.rank()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmSizeProfile model = new VmSizeProfile().withName("vpk").withRank(1022685385); - model = BinaryData.fromObject(model).toObject(VmSizeProfile.class); - Assertions.assertEquals("vpk", model.name()); - Assertions.assertEquals(1022685385, model.rank()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizePropertiesTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizePropertiesTests.java deleted file mode 100644 index 13f63eec252b..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/VmSizePropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.VmSizeProperties; -import org.junit.jupiter.api.Assertions; - -public final class VmSizePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmSizeProperties model = BinaryData.fromString("{\"vCpusAvailable\":1776506496,\"vCpusPerCore\":1775545087}") - .toObject(VmSizeProperties.class); - Assertions.assertEquals(1776506496, model.vCpusAvailable()); - Assertions.assertEquals(1775545087, model.vCpusPerCore()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmSizeProperties model = new VmSizeProperties().withVCpusAvailable(1776506496).withVCpusPerCore(1775545087); - model = BinaryData.fromObject(model).toObject(VmSizeProperties.class); - Assertions.assertEquals(1776506496, model.vCpusAvailable()); - Assertions.assertEquals(1775545087, model.vCpusPerCore()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMConfigurationTests.java deleted file mode 100644 index d2bbf3ced479..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMConfigurationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ProtocolTypes; -import com.azure.resourcemanager.computeschedule.models.WinRMConfiguration; -import com.azure.resourcemanager.computeschedule.models.WinRMListener; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WinRMConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WinRMConfiguration model - = BinaryData.fromString("{\"listeners\":[{\"protocol\":\"Https\",\"certificateUrl\":\"vhezrkgqhcj\"}]}") - .toObject(WinRMConfiguration.class); - Assertions.assertEquals(ProtocolTypes.HTTPS, model.listeners().get(0).protocol()); - Assertions.assertEquals("vhezrkgqhcj", model.listeners().get(0).certificateUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WinRMConfiguration model = new WinRMConfiguration().withListeners( - Arrays.asList(new WinRMListener().withProtocol(ProtocolTypes.HTTPS).withCertificateUrl("vhezrkgqhcj"))); - model = BinaryData.fromObject(model).toObject(WinRMConfiguration.class); - Assertions.assertEquals(ProtocolTypes.HTTPS, model.listeners().get(0).protocol()); - Assertions.assertEquals("vhezrkgqhcj", model.listeners().get(0).certificateUrl()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMListenerTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMListenerTests.java deleted file mode 100644 index ee07e1f5fd00..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WinRMListenerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ProtocolTypes; -import com.azure.resourcemanager.computeschedule.models.WinRMListener; -import org.junit.jupiter.api.Assertions; - -public final class WinRMListenerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WinRMListener model = BinaryData.fromString("{\"protocol\":\"Https\",\"certificateUrl\":\"vgmkqsleyyvxyqjp\"}") - .toObject(WinRMListener.class); - Assertions.assertEquals(ProtocolTypes.HTTPS, model.protocol()); - Assertions.assertEquals("vgmkqsleyyvxyqjp", model.certificateUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WinRMListener model - = new WinRMListener().withProtocol(ProtocolTypes.HTTPS).withCertificateUrl("vgmkqsleyyvxyqjp"); - model = BinaryData.fromObject(model).toObject(WinRMListener.class); - Assertions.assertEquals(ProtocolTypes.HTTPS, model.protocol()); - Assertions.assertEquals("vgmkqsleyyvxyqjp", model.certificateUrl()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsConfigurationTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsConfigurationTests.java deleted file mode 100644 index eef3d6a77852..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsConfigurationTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContent; -import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentComponentName; -import com.azure.resourcemanager.computeschedule.models.AdditionalUnattendContentPassName; -import com.azure.resourcemanager.computeschedule.models.PatchSettings; -import com.azure.resourcemanager.computeschedule.models.ProtocolTypes; -import com.azure.resourcemanager.computeschedule.models.SettingNames; -import com.azure.resourcemanager.computeschedule.models.WinRMConfiguration; -import com.azure.resourcemanager.computeschedule.models.WinRMListener; -import com.azure.resourcemanager.computeschedule.models.WindowsConfiguration; -import com.azure.resourcemanager.computeschedule.models.WindowsPatchAssessmentMode; -import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchMode; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WindowsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WindowsConfiguration model = BinaryData.fromString( - "{\"provisionVMAgent\":true,\"enableAutomaticUpdates\":true,\"timeZone\":\"zdmohctbqvu\",\"additionalUnattendContent\":[{\"passName\":\"OobeSystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"gujjugwdkcglh\"}],\"patchSettings\":{\"patchMode\":\"AutomaticByPlatform\",\"enableHotpatching\":true,\"assessmentMode\":\"ImageDefault\",\"automaticByPlatformSettings\":{\"rebootSetting\":\"Always\",\"bypassPlatformSafetyChecksOnUserSchedule\":true}},\"winRM\":{\"listeners\":[{\"protocol\":\"Http\",\"certificateUrl\":\"fqweykhmene\"}]}}") - .toObject(WindowsConfiguration.class); - Assertions.assertTrue(model.provisionVMAgent()); - Assertions.assertTrue(model.enableAutomaticUpdates()); - Assertions.assertEquals("zdmohctbqvu", model.timeZone()); - Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, - model.additionalUnattendContent().get(0).passName()); - Assertions.assertEquals(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP, - model.additionalUnattendContent().get(0).componentName()); - Assertions.assertEquals(SettingNames.FIRST_LOGON_COMMANDS, - model.additionalUnattendContent().get(0).settingName()); - Assertions.assertEquals("gujjugwdkcglh", model.additionalUnattendContent().get(0).content()); - Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM, model.patchSettings().patchMode()); - Assertions.assertTrue(model.patchSettings().enableHotpatching()); - Assertions.assertEquals(WindowsPatchAssessmentMode.IMAGE_DEFAULT, model.patchSettings().assessmentMode()); - Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, - model.patchSettings().automaticByPlatformSettings().rebootSetting()); - Assertions - .assertTrue(model.patchSettings().automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); - Assertions.assertEquals(ProtocolTypes.HTTP, model.winRM().listeners().get(0).protocol()); - Assertions.assertEquals("fqweykhmene", model.winRM().listeners().get(0).certificateUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WindowsConfiguration model = new WindowsConfiguration().withProvisionVMAgent(true) - .withEnableAutomaticUpdates(true) - .withTimeZone("zdmohctbqvu") - .withAdditionalUnattendContent(Arrays - .asList(new AdditionalUnattendContent().withPassName(AdditionalUnattendContentPassName.OOBE_SYSTEM) - .withComponentName(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP) - .withSettingName(SettingNames.FIRST_LOGON_COMMANDS) - .withContent("gujjugwdkcglh"))) - .withPatchSettings(new PatchSettings().withPatchMode(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM) - .withEnableHotpatching(true) - .withAssessmentMode(WindowsPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings(new WindowsVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS) - .withBypassPlatformSafetyChecksOnUserSchedule(true))) - .withWinRM(new WinRMConfiguration().withListeners( - Arrays.asList(new WinRMListener().withProtocol(ProtocolTypes.HTTP).withCertificateUrl("fqweykhmene")))); - model = BinaryData.fromObject(model).toObject(WindowsConfiguration.class); - Assertions.assertTrue(model.provisionVMAgent()); - Assertions.assertTrue(model.enableAutomaticUpdates()); - Assertions.assertEquals("zdmohctbqvu", model.timeZone()); - Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, - model.additionalUnattendContent().get(0).passName()); - Assertions.assertEquals(AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP, - model.additionalUnattendContent().get(0).componentName()); - Assertions.assertEquals(SettingNames.FIRST_LOGON_COMMANDS, - model.additionalUnattendContent().get(0).settingName()); - Assertions.assertEquals("gujjugwdkcglh", model.additionalUnattendContent().get(0).content()); - Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM, model.patchSettings().patchMode()); - Assertions.assertTrue(model.patchSettings().enableHotpatching()); - Assertions.assertEquals(WindowsPatchAssessmentMode.IMAGE_DEFAULT, model.patchSettings().assessmentMode()); - Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, - model.patchSettings().automaticByPlatformSettings().rebootSetting()); - Assertions - .assertTrue(model.patchSettings().automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); - Assertions.assertEquals(ProtocolTypes.HTTP, model.winRM().listeners().get(0).protocol()); - Assertions.assertEquals("fqweykhmene", model.winRM().listeners().get(0).certificateUrl()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java deleted file mode 100644 index a5402d8dc6ff..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings; -import org.junit.jupiter.api.Assertions; - -public final class WindowsVMGuestPatchAutomaticByPlatformSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WindowsVMGuestPatchAutomaticByPlatformSettings model - = BinaryData.fromString("{\"rebootSetting\":\"Never\",\"bypassPlatformSafetyChecksOnUserSchedule\":false}") - .toObject(WindowsVMGuestPatchAutomaticByPlatformSettings.class); - Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.NEVER, model.rebootSetting()); - Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WindowsVMGuestPatchAutomaticByPlatformSettings model = new WindowsVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.NEVER) - .withBypassPlatformSafetyChecksOnUserSchedule(false); - model = BinaryData.fromObject(model).toObject(WindowsVMGuestPatchAutomaticByPlatformSettings.class); - Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.NEVER, model.rebootSetting()); - Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZoneAllocationPolicyTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZoneAllocationPolicyTests.java deleted file mode 100644 index 4a9d4f8f3ef6..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZoneAllocationPolicyTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.DistributionStrategy; -import com.azure.resourcemanager.computeschedule.models.ZoneAllocationPolicy; -import com.azure.resourcemanager.computeschedule.models.ZonePreference; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ZoneAllocationPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ZoneAllocationPolicy model = BinaryData.fromString( - "{\"distributionStrategy\":\"StrictBalanced\",\"zonePreferences\":[{\"zone\":\"odsotbobzdop\",\"rank\":542490098}]}") - .toObject(ZoneAllocationPolicy.class); - Assertions.assertEquals(DistributionStrategy.STRICT_BALANCED, model.distributionStrategy()); - Assertions.assertEquals("odsotbobzdop", model.zonePreferences().get(0).zone()); - Assertions.assertEquals(542490098, model.zonePreferences().get(0).rank()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ZoneAllocationPolicy model - = new ZoneAllocationPolicy().withDistributionStrategy(DistributionStrategy.STRICT_BALANCED) - .withZonePreferences(Arrays.asList(new ZonePreference().withZone("odsotbobzdop").withRank(542490098))); - model = BinaryData.fromObject(model).toObject(ZoneAllocationPolicy.class); - Assertions.assertEquals(DistributionStrategy.STRICT_BALANCED, model.distributionStrategy()); - Assertions.assertEquals("odsotbobzdop", model.zonePreferences().get(0).zone()); - Assertions.assertEquals(542490098, model.zonePreferences().get(0).rank()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZonePreferenceTests.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZonePreferenceTests.java deleted file mode 100644 index ec0c3fb2b563..000000000000 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/test/java/com/azure/resourcemanager/computeschedule/generated/ZonePreferenceTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computeschedule.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.computeschedule.models.ZonePreference; -import org.junit.jupiter.api.Assertions; - -public final class ZonePreferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ZonePreference model - = BinaryData.fromString("{\"zone\":\"vnhdldwmgxcxr\",\"rank\":1757688267}").toObject(ZonePreference.class); - Assertions.assertEquals("vnhdldwmgxcxr", model.zone()); - Assertions.assertEquals(1757688267, model.rank()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ZonePreference model = new ZonePreference().withZone("vnhdldwmgxcxr").withRank(1757688267); - model = BinaryData.fromObject(model).toObject(ZonePreference.class); - Assertions.assertEquals("vnhdldwmgxcxr", model.zone()); - Assertions.assertEquals(1757688267, model.rank()); - } -} diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/tsp-location.yaml b/sdk/computeschedule/azure-resourcemanager-computeschedule/tsp-location.yaml index ab7fd71eb5d8..c2e4bdd3431c 100644 --- a/sdk/computeschedule/azure-resourcemanager-computeschedule/tsp-location.yaml +++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/computeschedule/ComputeSchedule.Management -commit: efcac4df1ba355ac1f695aeb65378eacf052357c +commit: 6267b64842af3d744c5b092a3f3beef49729ad6d repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/confidentialledger/azure-security-confidentialledger/pom.xml b/sdk/confidentialledger/azure-security-confidentialledger/pom.xml index 55004dc85742..108c068c76af 100644 --- a/sdk/confidentialledger/azure-security-confidentialledger/pom.xml +++ b/sdk/confidentialledger/azure-security-confidentialledger/pom.xml @@ -39,9 +39,6 @@ --add-exports com.azure.http.netty/com.azure.core.http.netty=com.azure.security.confidentialledger --add-reads com.azure.security.confidentialledger=com.azure.http.netty - --add-reads com.azure.security.confidentialledger=io.netty.handler - --add-reads com.azure.security.confidentialledger=reactor.netty.core - --add-reads com.azure.security.confidentialledger=reactor.netty.http false diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml index 561986ab375b..28d8260418b6 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml @@ -65,7 +65,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 com.azure.resourcemanager @@ -80,7 +80,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.62.0 + 2.61.2 com.azure diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index f466e12ccb4b..2b55540d899f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.66.0-beta.1 (Unreleased) +## 2.65.0-beta.2 (Unreleased) ### Features Added @@ -10,21 +10,6 @@ ### Other Changes -## 2.65.0 (2026-10-19) - -- Package api-version 2026-08-01. - -### Features Added - -* `models.ManagementMode` was added - -* `models.NvidiaGPUProfile` was added - -#### `models.GpuProfile` was modified - -* `withNvidia(models.NvidiaGPUProfile)` was added -* `nvidia()` was added - ## 2.64.2 (2026-10-09) ### Other Changes diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/README.md b/sdk/containerservice/azure-resourcemanager-containerservice/README.md index 32e41bf16b68..34797245eeb0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/README.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-containerservice - 2.65.0 + 2.65.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml index ba73b26f9497..17895e21e3c7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-containerservice - 2.66.0-beta.1 + 2.65.0-beta.2 jar Microsoft Azure SDK for Container Service Management @@ -42,7 +42,7 @@ --add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED - false + true diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java index b2a610735e62..f03ca29e30ec 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java @@ -16,7 +16,10 @@ import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolAvailableVersionsInner; import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.PoolBootstrapDataInner; import com.azure.resourcemanager.containerservice.models.AgentPoolDeleteMachinesParameter; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpdate; +import com.azure.resourcemanager.containerservice.models.ListBootstrapDataRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -559,6 +562,122 @@ SyncPoller, Void> beginAbortLatestOperation(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName, Context context); + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> completeUpgradeWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName, Context context); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName, Context context); + /** * Deletes specific machines in an agent pool. * @@ -801,6 +920,240 @@ SyncPoller, Void> beginUpgradeNodeImageVersion(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) void upgradeNodeImageVersion(String resourceGroupName, String resourceName, String agentPoolName, Context context); + /** + * Lists bootstrap data for a FlexNode agent pool. + * + * Returns pool-level bootstrap configuration for FlexNode machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bootstrap configuration for a FlexNode pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listBootstrapDataWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, ListBootstrapDataRequest body); + + /** + * Lists bootstrap data for a FlexNode agent pool. + * + * Returns pool-level bootstrap configuration for FlexNode machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bootstrap configuration for a FlexNode pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listBootstrapDataAsync(String resourceGroupName, String resourceName, + String agentPoolName, ListBootstrapDataRequest body); + + /** + * Lists bootstrap data for a FlexNode agent pool. + * + * Returns pool-level bootstrap configuration for FlexNode machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bootstrap configuration for a FlexNode pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listBootstrapDataWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, ListBootstrapDataRequest body, Context context); + + /** + * Lists bootstrap data for a FlexNode agent pool. + * + * Returns pool-level bootstrap configuration for FlexNode machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bootstrap configuration for a FlexNode pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolBootstrapDataInner listBootstrapData(String resourceGroupName, String resourceName, String agentPoolName, + ListBootstrapDataRequest body); + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolUpdate parameters, String ifMatch); + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolUpdate parameters, String ifMatch); + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolUpdate parameters); + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolUpdate parameters); + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolUpdate parameters, String ifMatch, Context context); + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolUpdate parameters, String ifMatch); + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolUpdate parameters); + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner update(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolUpdate parameters); + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AgentPoolInner update(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolUpdate parameters, String ifMatch, Context context); + /** * Gets a list of supported Kubernetes versions for the specified agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AlertConfigurationsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AlertConfigurationsClient.java new file mode 100644 index 000000000000..42ce37372024 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AlertConfigurationsClient.java @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.AlertConfigurationInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AlertConfigurationsClient. + */ +public interface AlertConfigurationsClient { + /** + * Gets the specified alert configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified alert configuration of a managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String configurationName); + + /** + * Gets the specified alert configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified alert configuration of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String configurationName); + + /** + * Gets the specified alert configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified alert configuration of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String configurationName, Context context); + + /** + * Gets the specified alert configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified alert configuration of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AlertConfigurationInner get(String resourceGroupName, String resourceName, String configurationName); + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String configurationName, AlertConfigurationInner resource); + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, AlertConfigurationInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String configurationName, AlertConfigurationInner resource); + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AlertConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String configurationName, AlertConfigurationInner resource); + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AlertConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String configurationName, AlertConfigurationInner resource, + Context context); + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String configurationName, AlertConfigurationInner resource); + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AlertConfigurationInner createOrUpdate(String resourceGroupName, String resourceName, String configurationName, + AlertConfigurationInner resource); + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AlertConfigurationInner createOrUpdate(String resourceGroupName, String resourceName, String configurationName, + AlertConfigurationInner resource, Context context); + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String configurationName); + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String configurationName); + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String configurationName); + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String configurationName, Context context); + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String configurationName); + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String configurationName); + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String configurationName, Context context); + + /** + * Gets a list of alert configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of alert configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of alert configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java index e1f32004f9da..9e9f63f354ac 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java @@ -67,6 +67,13 @@ public interface ContainerServiceManagementClient { */ MaintenanceConfigurationsClient getMaintenanceConfigurations(); + /** + * Gets the MaintenanceWindowsClient object to access its operations. + * + * @return the MaintenanceWindowsClient object. + */ + MaintenanceWindowsClient getMaintenanceWindows(); + /** * Gets the ManagedNamespacesClient object to access its operations. * @@ -95,6 +102,13 @@ public interface ContainerServiceManagementClient { */ SnapshotsClient getSnapshots(); + /** + * Gets the ManagedClusterSnapshotsClient object to access its operations. + * + * @return the ManagedClusterSnapshotsClient object. + */ + ManagedClusterSnapshotsClient getManagedClusterSnapshots(); + /** * Gets the TrustedAccessRoleBindingsClient object to access its operations. * @@ -102,6 +116,13 @@ public interface ContainerServiceManagementClient { */ TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); + /** + * Gets the LoadBalancersClient object to access its operations. + * + * @return the LoadBalancersClient object. + */ + LoadBalancersClient getLoadBalancers(); + /** * Gets the IdentityBindingsClient object to access its operations. * @@ -109,6 +130,20 @@ public interface ContainerServiceManagementClient { */ IdentityBindingsClient getIdentityBindings(); + /** + * Gets the JWTAuthenticatorsClient object to access its operations. + * + * @return the JWTAuthenticatorsClient object. + */ + JWTAuthenticatorsClient getJWTAuthenticators(); + + /** + * Gets the MeshMembershipsClient object to access its operations. + * + * @return the MeshMembershipsClient object. + */ + MeshMembershipsClient getMeshMemberships(); + /** * Gets the OperationsClient object to access its operations. * @@ -116,6 +151,20 @@ public interface ContainerServiceManagementClient { */ OperationsClient getOperations(); + /** + * Gets the AlertConfigurationsClient object to access its operations. + * + * @return the AlertConfigurationsClient object. + */ + AlertConfigurationsClient getAlertConfigurations(); + + /** + * Gets the OperationStatusResultsClient object to access its operations. + * + * @return the OperationStatusResultsClient object. + */ + OperationStatusResultsClient getOperationStatusResults(); + /** * Gets the PrivateLinkResourcesClient object to access its operations. * @@ -136,4 +185,11 @@ public interface ContainerServiceManagementClient { * @return the TrustedAccessRolesClient object. */ TrustedAccessRolesClient getTrustedAccessRoles(); + + /** + * Gets the VmSkusClient object to access its operations. + * + * @return the VmSkusClient object. + */ + VmSkusClient getVmSkus(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JWTAuthenticatorsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JWTAuthenticatorsClient.java new file mode 100644 index 000000000000..53512b9a8a2f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JWTAuthenticatorsClient.java @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.JWTAuthenticatorInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in JWTAuthenticatorsClient. + */ +public interface JWTAuthenticatorsClient { + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JWTAuthenticatorInner get(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, JWTAuthenticatorInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JWTAuthenticatorInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JWTAuthenticatorInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters, Context context); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JWTAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, String jwtAuthenticatorName, + JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JWTAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, String jwtAuthenticatorName, + JWTAuthenticatorInner parameters, Context context); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName, Context context); + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java new file mode 100644 index 000000000000..8ea00137dede --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LoadBalancersClient. + */ +public interface LoadBalancersClient { + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, String loadBalancerName, + Context context); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner get(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String loadBalancerName, + LoadBalancerInner parameters); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters, Context context); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner createOrUpdate(String resourceGroupName, String resourceName, String loadBalancerName, + LoadBalancerInner parameters); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName, Context context); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String loadBalancerName, Context context); + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java index 9a9d7edbf868..ab05fe893168 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java @@ -9,8 +9,13 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -82,6 +87,173 @@ Response getWithResponse(String resourceGroupName, String resource @ServiceMethod(returns = ReturnType.SINGLE) MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName); + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, String machineName, + MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, String machineName, + MachineInner parameters, String ifMatch, String ifNoneMatch, Context context); + /** * Gets a list of machines in the specified agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceWindowsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceWindowsClient.java new file mode 100644 index 000000000000..7b40522b40c4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceWindowsClient.java @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceWindowResourceInner; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MaintenanceWindowsClient. + */ +public interface MaintenanceWindowsClient extends InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete { + /** + * Gets the specified maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance window along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String maintenanceWindowName); + + /** + * Gets the specified maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance window on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, + String maintenanceWindowName); + + /** + * Gets the specified maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance window along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String maintenanceWindowName, Context context); + + /** + * Gets the specified maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance window. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceWindowResourceInner getByResourceGroup(String resourceGroupName, String maintenanceWindowName); + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String maintenanceWindowName, MaintenanceWindowResourceInner resource); + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a maintenance window is a resource-group-scoped resource that + * defines a reusable maintenance schedule which can be linked to maintenance configurations on one or more managed + * clusters. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MaintenanceWindowResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String maintenanceWindowName, MaintenanceWindowResourceInner resource); + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a maintenance window is a resource-group-scoped resource that + * defines a reusable maintenance schedule which can be linked to maintenance configurations on one or more managed + * clusters. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MaintenanceWindowResourceInner> beginCreateOrUpdate( + String resourceGroupName, String maintenanceWindowName, MaintenanceWindowResourceInner resource); + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a maintenance window is a resource-group-scoped resource that + * defines a reusable maintenance schedule which can be linked to maintenance configurations on one or more managed + * clusters. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MaintenanceWindowResourceInner> beginCreateOrUpdate( + String resourceGroupName, String maintenanceWindowName, MaintenanceWindowResourceInner resource, + Context context); + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String maintenanceWindowName, + MaintenanceWindowResourceInner resource); + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceWindowResourceInner createOrUpdate(String resourceGroupName, String maintenanceWindowName, + MaintenanceWindowResourceInner resource); + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceWindowResourceInner createOrUpdate(String resourceGroupName, String maintenanceWindowName, + MaintenanceWindowResourceInner resource, Context context); + + /** + * Updates tags on a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param properties Parameters supplied to the Update maintenance window Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateTagsWithResponseAsync(String resourceGroupName, + String maintenanceWindowName, TagsObject properties); + + /** + * Updates tags on a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param properties Parameters supplied to the Update maintenance window Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateTagsAsync(String resourceGroupName, String maintenanceWindowName, + TagsObject properties); + + /** + * Updates tags on a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param properties Parameters supplied to the Update maintenance window Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, + String maintenanceWindowName, TagsObject properties, Context context); + + /** + * Updates tags on a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param properties Parameters supplied to the Update maintenance window Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceWindowResourceInner updateTags(String resourceGroupName, String maintenanceWindowName, + TagsObject properties); + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String maintenanceWindowName); + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String maintenanceWindowName); + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String maintenanceWindowName); + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String maintenanceWindowName, + Context context); + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String maintenanceWindowName); + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String maintenanceWindowName); + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String maintenanceWindowName, Context context); + + /** + * Lists maintenance windows in the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Lists maintenance windows in the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists maintenance windows in the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists maintenance windows in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Lists maintenance windows in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists maintenance windows in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java new file mode 100644 index 000000000000..f9298cecaeaa --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. + */ +public interface ManagedClusterSnapshotsClient extends InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete { + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, String resourceName); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters, Context context); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsObject parameters); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsObject parameters, Context context); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName); + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java index 302874105450..5da187c367cc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java @@ -14,18 +14,22 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; import com.azure.resourcemanager.containerservice.models.Format; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -387,6 +391,8 @@ ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Ta * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -394,7 +400,7 @@ ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Ta */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch); + String ifMatch, Boolean ignorePodDisruptionBudget); /** * Deletes a managed cluster. @@ -402,13 +408,16 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget); /** * Deletes a managed cluster. @@ -442,6 +451,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -450,7 +461,7 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Context context); + Boolean ignorePodDisruptionBudget, Context context); /** * Deletes a managed cluster. @@ -458,13 +469,16 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch); + Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget); /** * Deletes a managed cluster. @@ -497,13 +511,16 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String ifMatch, Context context); + void delete(String resourceGroupName, String resourceName, String ifMatch, Boolean ignorePodDisruptionBudget, + Context context); /** * Lists managed clusters in the specified subscription and resource group. @@ -1913,6 +1930,118 @@ PagedIterable listOutboundNetworkDependenciesE PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName, Context context); + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context); + /** * Gets the upgrade profile of a managed cluster. * @@ -1969,6 +2098,258 @@ Response getUpgradeProfileWithResponse(String @ServiceMethod(returns = ReturnType.SINGLE) ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName); + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getGuardrailsVersionsWithResponseAsync(String location, + String version); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getGuardrailsVersionsAsync(String location, String version); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getGuardrailsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listGuardrailsVersionsAsync(String location); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGuardrailsVersions(String location); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGuardrailsVersions(String location, Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getSafeguardsVersionsWithResponseAsync(String location, + String version); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getSafeguardsVersionsAsync(String location, String version); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSafeguardsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listSafeguardsVersionsAsync(String location); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSafeguardsVersions(String location); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSafeguardsVersions(String location, Context context); + /** * Gets a mesh revision profile for a specified mesh in the specified location. * @@ -2267,4 +2648,59 @@ PagedIterable listMeshUpgradeProfiles(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) KubernetesVersionListResultInner listKubernetesVersions(String location); + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listNodeImageVersionsAsync(String location); + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listNodeImageVersions(String location); + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listNodeImageVersions(String location, Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java new file mode 100644 index 000000000000..0efc90f7dbca --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MeshMembershipsClient. + */ +public interface MeshMembershipsClient { + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String meshMembershipName, Context context); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshMembershipInner get(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MeshMembershipInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MeshMembershipInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MeshMembershipInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters, Context context); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters, Context context); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName, Context context); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String meshMembershipName, Context context); + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java new file mode 100644 index 000000000000..4c1bbdc292e8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. + */ +public interface OperationStatusResultsClient { + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param activeOnly If true, only return operations that are currently active (not terminal). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, Boolean activeOnly); + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgentPool(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param activeOnly If true, only return operations that are currently active (not terminal). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgentPool(String resourceGroupName, String resourceName, + String agentPoolName, Boolean activeOnly, Context context); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, String operationId); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByAgentPoolWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, String operationId, Context context); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, String agentPoolName, + String operationId); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String operationId); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String operationId); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String operationId, Context context); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/VmSkusClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/VmSkusClient.java new file mode 100644 index 000000000000..09ad3c0c5e98 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/VmSkusClient.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.ResourceSkuInner; + +/** + * An instance of this class provides access to all the operations defined in VmSkusClient. + */ +public interface VmSkusClient { + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String location, Boolean includeExtendedLocations); + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String location); + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Boolean includeExtendedLocations, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java index 569854bbc791..ce50afb13fec 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java @@ -11,6 +11,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.containerservice.models.AgentPoolArtifactStreamingProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolBlueGreenUpgradeSettings; import com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; @@ -31,9 +32,11 @@ import com.azure.resourcemanager.containerservice.models.OSType; import com.azure.resourcemanager.containerservice.models.PodIpAllocationMode; import com.azure.resourcemanager.containerservice.models.PowerState; +import com.azure.resourcemanager.containerservice.models.PreparedImageSpecificationProfile; import com.azure.resourcemanager.containerservice.models.ScaleDownMode; import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.UpgradeStrategy; import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; @@ -697,6 +700,56 @@ public AgentPoolInner withNodeImageVersion(String nodeImageVersion) { return this; } + /** + * Get the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @return the upgradeStrategy value. + */ + public UpgradeStrategy upgradeStrategy() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeStrategy(); + } + + /** + * Set the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @param upgradeStrategy the upgradeStrategy value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withUpgradeStrategy(upgradeStrategy); + return this; + } + + /** + * Get the enableOSDiskFullCaching property: Whether to enable the full-cache ephemeral OS disk feature. When this + * feature is enabled, the entire operating system will be locally cached on the ephemeral OS disk, preventing E17 + * events caused by network failures. + * + * @return the enableOSDiskFullCaching value. + */ + public Boolean enableOSDiskFullCaching() { + return this.innerProperties() == null ? null : this.innerProperties().enableOSDiskFullCaching(); + } + + /** + * Set the enableOSDiskFullCaching property: Whether to enable the full-cache ephemeral OS disk feature. When this + * feature is enabled, the entire operating system will be locally cached on the ephemeral OS disk, preventing E17 + * events caused by network failures. + * + * @param enableOSDiskFullCaching the enableOSDiskFullCaching value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableOSDiskFullCaching(Boolean enableOSDiskFullCaching) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableOSDiskFullCaching(enableOSDiskFullCaching); + return this; + } + /** * Get the upgradeSettings property: Settings for upgrading the agentpool. * @@ -720,6 +773,31 @@ public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettin return this; } + /** + * Get the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @return the upgradeSettingsBlueGreen value. + */ + public AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeSettingsBlueGreen(); + } + + /** + * Set the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @param upgradeSettingsBlueGreen the upgradeSettingsBlueGreen value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withUpgradeSettingsBlueGreen(upgradeSettingsBlueGreen); + return this; + } + /** * Get the provisioningState property: The current deployment or provisioning state. * @@ -995,6 +1073,39 @@ public AgentPoolInner withNodeTaints(List nodeTaints) { return this; } + /** + * Get the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List nodeInitializationTaints() { + return this.innerProperties() == null ? null : this.innerProperties().nodeInitializationTaints(); + } + + /** + * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeInitializationTaints(List nodeInitializationTaints) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeInitializationTaints(nodeInitializationTaints); + return this; + } + /** * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. * @@ -1489,6 +1600,32 @@ public AgentPoolInner withLocalDnsProfile(LocalDnsProfile localDnsProfile) { return this; } + /** + * Get the preparedImageSpecificationProfile property: Settings to determine the prepared image specification used + * to provision nodes in a pool. + * + * @return the preparedImageSpecificationProfile value. + */ + public PreparedImageSpecificationProfile preparedImageSpecificationProfile() { + return this.innerProperties() == null ? null : this.innerProperties().preparedImageSpecificationProfile(); + } + + /** + * Set the preparedImageSpecificationProfile property: Settings to determine the prepared image specification used + * to provision nodes in a pool. + * + * @param preparedImageSpecificationProfile the preparedImageSpecificationProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner + withPreparedImageSpecificationProfile(PreparedImageSpecificationProfile preparedImageSpecificationProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withPreparedImageSpecificationProfile(preparedImageSpecificationProfile); + return this; + } + /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java index 69c9e9093fcb..c9b4dd9c985d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java @@ -13,6 +13,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.containerservice.models.AgentPoolRecentlyUsedVersion; import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.models.ComponentsByRelease; import com.azure.resourcemanager.containerservice.models.OSType; import java.io.IOException; import java.util.List; @@ -128,6 +129,15 @@ public List upgrades() { return this.innerProperties() == null ? null : this.innerProperties().upgrades(); } + /** + * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @return the componentsByReleases value. + */ + public List componentsByReleases() { + return this.innerProperties() == null ? null : this.innerProperties().componentsByReleases(); + } + /** * Get the recentlyUsedVersions property: List of historical good versions for rollback operations. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java index 361c33c86e5f..678f925ed564 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java @@ -12,6 +12,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.containerservice.models.AgentPoolRecentlyUsedVersion; import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.models.ComponentsByRelease; import com.azure.resourcemanager.containerservice.models.OSType; import java.io.IOException; import java.util.List; @@ -36,6 +37,11 @@ public final class AgentPoolUpgradeProfileProperties implements JsonSerializable */ private List upgrades; + /* + * List of components grouped by kubernetes major.minor version. + */ + private List componentsByReleases; + /* * List of historical good versions for rollback operations. */ @@ -79,6 +85,15 @@ public List upgrades() { return this.upgrades; } + /** + * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @return the componentsByReleases value. + */ + public List componentsByReleases() { + return this.componentsByReleases; + } + /** * Get the recentlyUsedVersions property: List of historical good versions for rollback operations. * @@ -116,6 +131,9 @@ public void validate() { if (upgrades() != null) { upgrades().forEach(e -> e.validate()); } + if (componentsByReleases() != null) { + componentsByReleases().forEach(e -> e.validate()); + } if (recentlyUsedVersions() != null) { recentlyUsedVersions().forEach(e -> e.validate()); } @@ -132,6 +150,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("componentsByReleases", this.componentsByReleases, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("latestNodeImageVersion", this.latestNodeImageVersion); return jsonWriter.writeEndObject(); } @@ -161,6 +181,10 @@ public static AgentPoolUpgradeProfileProperties fromJson(JsonReader jsonReader) List upgrades = reader.readArray(reader1 -> AgentPoolUpgradeProfilePropertiesUpgradesItem.fromJson(reader1)); deserializedAgentPoolUpgradeProfileProperties.upgrades = upgrades; + } else if ("componentsByReleases".equals(fieldName)) { + List componentsByReleases + = reader.readArray(reader1 -> ComponentsByRelease.fromJson(reader1)); + deserializedAgentPoolUpgradeProfileProperties.componentsByReleases = componentsByReleases; } else if ("recentlyUsedVersions".equals(fieldName)) { List recentlyUsedVersions = reader.readArray(reader1 -> AgentPoolRecentlyUsedVersion.fromJson(reader1)); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AlertConfigurationInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AlertConfigurationInner.java new file mode 100644 index 000000000000..b99e51ff7617 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AlertConfigurationInner.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AlertConfigurationProperties; +import java.io.IOException; + +/** + * Alert configuration for a managed cluster. Allows configuring AKS-managed alerts + * that notify users of important cluster events and conditions. + */ +@Fluent +public final class AlertConfigurationInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private AlertConfigurationProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of AlertConfigurationInner class. + */ + public AlertConfigurationInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public AlertConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the AlertConfigurationInner object itself. + */ + public AlertConfigurationInner withProperties(AlertConfigurationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AlertConfigurationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AlertConfigurationInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AlertConfigurationInner. + */ + public static AlertConfigurationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AlertConfigurationInner deserializedAlertConfigurationInner = new AlertConfigurationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAlertConfigurationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAlertConfigurationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAlertConfigurationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedAlertConfigurationInner.properties = AlertConfigurationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedAlertConfigurationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAlertConfigurationInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java new file mode 100644 index 000000000000..20cc0a1d4cd5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.GuardrailsAvailableVersionsProperties; +import java.io.IOException; + +/** + * Available Guardrails Version. + */ +@Immutable +public final class GuardrailsAvailableVersionInner extends ProxyResource { + /* + * Whether the version is default or not and support info. + */ + private GuardrailsAvailableVersionsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GuardrailsAvailableVersionInner class. + */ + private GuardrailsAvailableVersionInner() { + } + + /** + * Get the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + public GuardrailsAvailableVersionsProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model GuardrailsAvailableVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GuardrailsAvailableVersionInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuardrailsAvailableVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuardrailsAvailableVersionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionInner. + */ + public static GuardrailsAvailableVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuardrailsAvailableVersionInner deserializedGuardrailsAvailableVersionInner + = new GuardrailsAvailableVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.properties + = GuardrailsAvailableVersionsProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGuardrailsAvailableVersionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java index 6680c341c330..de7caca0bf9d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java @@ -23,6 +23,13 @@ public final class IdentityBindingInner extends ProxyResource { */ private IdentityBindingProperties properties; + /* + * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed + * by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is + * removed from the template since it is managed by another resource. + */ + private String managedBy; + /* * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity @@ -77,6 +84,30 @@ public IdentityBindingInner withProperties(IdentityBindingProperties properties) return this; } + /** + * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @return the managedBy value. + */ + public String managedBy() { + return this.managedBy; + } + + /** + * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @param managedBy the managedBy value to set. + * @return the IdentityBindingInner object itself. + */ + public IdentityBindingInner withManagedBy(String managedBy) { + this.managedBy = managedBy; + return this; + } + /** * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. @@ -146,6 +177,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("managedBy", this.managedBy); return jsonWriter.writeEndObject(); } @@ -173,6 +205,8 @@ public static IdentityBindingInner fromJson(JsonReader jsonReader) throws IOExce deserializedIdentityBindingInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedIdentityBindingInner.properties = IdentityBindingProperties.fromJson(reader); + } else if ("managedBy".equals(fieldName)) { + deserializedIdentityBindingInner.managedBy = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedIdentityBindingInner.eTag = reader.getString(); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JWTAuthenticatorInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JWTAuthenticatorInner.java new file mode 100644 index 000000000000..790178f25c23 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JWTAuthenticatorInner.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorProperties; +import java.io.IOException; + +/** + * Configuration for JWT authenticator in the managed cluster. + */ +@Fluent +public final class JWTAuthenticatorInner extends ProxyResource { + /* + * The properties of JWTAuthenticator. For details on how to configure the properties of a JWT authenticator, please + * refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. + * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For + * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. + */ + private JWTAuthenticatorProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JWTAuthenticatorInner class. + */ + public JWTAuthenticatorInner() { + } + + /** + * Get the properties property: The properties of JWTAuthenticator. For details on how to configure the properties + * of a JWT authenticator, please refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. + * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For + * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. + * + * @return the properties value. + */ + public JWTAuthenticatorProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of JWTAuthenticator. For details on how to configure the properties + * of a JWT authenticator, please refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. + * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For + * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. + * + * @param properties the properties value to set. + * @return the JWTAuthenticatorInner object itself. + */ + public JWTAuthenticatorInner withProperties(JWTAuthenticatorProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model JWTAuthenticatorInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorInner. + */ + public static JWTAuthenticatorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorInner deserializedJWTAuthenticatorInner = new JWTAuthenticatorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJWTAuthenticatorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJWTAuthenticatorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJWTAuthenticatorInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedJWTAuthenticatorInner.properties = JWTAuthenticatorProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedJWTAuthenticatorInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java new file mode 100644 index 000000000000..ed5ded707a81 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.LabelSelector; +import java.io.IOException; + +/** + * The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be + * used. Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a + * configuration named `kubernetes`. The name field will be the name of the corresponding public load balancer. There + * will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb + * shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer + * list. + */ +@Fluent +public final class LoadBalancerInner extends ProxyResource { + /* + * The properties of the load balancer. + */ + private LoadBalancerProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LoadBalancerInner class. + */ + public LoadBalancerInner() { + } + + /** + * Get the innerProperties property: The properties of the load balancer. + * + * @return the innerProperties value. + */ + private LoadBalancerProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @return the primaryAgentPoolName value. + */ + public String primaryAgentPoolName() { + return this.innerProperties() == null ? null : this.innerProperties().primaryAgentPoolName(); + } + + /** + * Set the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @param primaryAgentPoolName the primaryAgentPoolName value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withPrimaryAgentPoolName(String primaryAgentPoolName) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withPrimaryAgentPoolName(primaryAgentPoolName); + return this; + } + + /** + * Get the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @return the allowServicePlacement value. + */ + public Boolean allowServicePlacement() { + return this.innerProperties() == null ? null : this.innerProperties().allowServicePlacement(); + } + + /** + * Set the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @param allowServicePlacement the allowServicePlacement value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withAllowServicePlacement(Boolean allowServicePlacement) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withAllowServicePlacement(allowServicePlacement); + return this; + } + + /** + * Get the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @return the serviceLabelSelector value. + */ + public LabelSelector serviceLabelSelector() { + return this.innerProperties() == null ? null : this.innerProperties().serviceLabelSelector(); + } + + /** + * Set the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @param serviceLabelSelector the serviceLabelSelector value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withServiceLabelSelector(LabelSelector serviceLabelSelector) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withServiceLabelSelector(serviceLabelSelector); + return this; + } + + /** + * Get the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @return the serviceNamespaceSelector value. + */ + public LabelSelector serviceNamespaceSelector() { + return this.innerProperties() == null ? null : this.innerProperties().serviceNamespaceSelector(); + } + + /** + * Set the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @param serviceNamespaceSelector the serviceNamespaceSelector value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withServiceNamespaceSelector(LabelSelector serviceNamespaceSelector) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withServiceNamespaceSelector(serviceNamespaceSelector); + return this; + } + + /** + * Get the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @return the nodeSelector value. + */ + public LabelSelector nodeSelector() { + return this.innerProperties() == null ? null : this.innerProperties().nodeSelector(); + } + + /** + * Set the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @param nodeSelector the nodeSelector value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withNodeSelector(LabelSelector nodeSelector) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withNodeSelector(nodeSelector); + return this; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerInner. + */ + public static LoadBalancerInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerInner deserializedLoadBalancerInner = new LoadBalancerInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLoadBalancerInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLoadBalancerInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLoadBalancerInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLoadBalancerInner.innerProperties = LoadBalancerProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedLoadBalancerInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java new file mode 100644 index 000000000000..5425a3eec21f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.LabelSelector; +import java.io.IOException; + +/** + * Properties for a load balancer resource. + */ +@Fluent +public final class LoadBalancerProperties implements JsonSerializable { + /* + * Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool + * will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for + * autoscaling operations. An agent pool can only be the primary pool for a single load balancer. + */ + private String primaryAgentPoolName; + + /* + * Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set + * to false manually, both of the external and the internal load balancer will not be selected for services unless + * they explicitly target it. + */ + private Boolean allowServicePlacement; + + /* + * Only services that must match this selector can be placed on this load balancer. + */ + private LabelSelector serviceLabelSelector; + + /* + * Services created in namespaces that match the selector can be placed on this load balancer. + */ + private LabelSelector serviceNamespaceSelector; + + /* + * Nodes that match this selector will be possible members of this load balancer. + */ + private LabelSelector nodeSelector; + + /* + * The current provisioning state. + */ + private String provisioningState; + + /** + * Creates an instance of LoadBalancerProperties class. + */ + public LoadBalancerProperties() { + } + + /** + * Get the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @return the primaryAgentPoolName value. + */ + public String primaryAgentPoolName() { + return this.primaryAgentPoolName; + } + + /** + * Set the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @param primaryAgentPoolName the primaryAgentPoolName value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withPrimaryAgentPoolName(String primaryAgentPoolName) { + this.primaryAgentPoolName = primaryAgentPoolName; + return this; + } + + /** + * Get the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @return the allowServicePlacement value. + */ + public Boolean allowServicePlacement() { + return this.allowServicePlacement; + } + + /** + * Set the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @param allowServicePlacement the allowServicePlacement value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withAllowServicePlacement(Boolean allowServicePlacement) { + this.allowServicePlacement = allowServicePlacement; + return this; + } + + /** + * Get the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @return the serviceLabelSelector value. + */ + public LabelSelector serviceLabelSelector() { + return this.serviceLabelSelector; + } + + /** + * Set the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @param serviceLabelSelector the serviceLabelSelector value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withServiceLabelSelector(LabelSelector serviceLabelSelector) { + this.serviceLabelSelector = serviceLabelSelector; + return this; + } + + /** + * Get the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @return the serviceNamespaceSelector value. + */ + public LabelSelector serviceNamespaceSelector() { + return this.serviceNamespaceSelector; + } + + /** + * Set the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @param serviceNamespaceSelector the serviceNamespaceSelector value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withServiceNamespaceSelector(LabelSelector serviceNamespaceSelector) { + this.serviceNamespaceSelector = serviceNamespaceSelector; + return this; + } + + /** + * Get the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @return the nodeSelector value. + */ + public LabelSelector nodeSelector() { + return this.nodeSelector; + } + + /** + * Set the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @param nodeSelector the nodeSelector value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withNodeSelector(LabelSelector nodeSelector) { + this.nodeSelector = nodeSelector; + return this; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (primaryAgentPoolName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property primaryAgentPoolName in model LoadBalancerProperties")); + } + if (serviceLabelSelector() != null) { + serviceLabelSelector().validate(); + } + if (serviceNamespaceSelector() != null) { + serviceNamespaceSelector().validate(); + } + if (nodeSelector() != null) { + nodeSelector().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LoadBalancerProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryAgentPoolName", this.primaryAgentPoolName); + jsonWriter.writeBooleanField("allowServicePlacement", this.allowServicePlacement); + jsonWriter.writeJsonField("serviceLabelSelector", this.serviceLabelSelector); + jsonWriter.writeJsonField("serviceNamespaceSelector", this.serviceNamespaceSelector); + jsonWriter.writeJsonField("nodeSelector", this.nodeSelector); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerProperties. + */ + public static LoadBalancerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerProperties deserializedLoadBalancerProperties = new LoadBalancerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryAgentPoolName".equals(fieldName)) { + deserializedLoadBalancerProperties.primaryAgentPoolName = reader.getString(); + } else if ("allowServicePlacement".equals(fieldName)) { + deserializedLoadBalancerProperties.allowServicePlacement + = reader.getNullable(JsonReader::getBoolean); + } else if ("serviceLabelSelector".equals(fieldName)) { + deserializedLoadBalancerProperties.serviceLabelSelector = LabelSelector.fromJson(reader); + } else if ("serviceNamespaceSelector".equals(fieldName)) { + deserializedLoadBalancerProperties.serviceNamespaceSelector = LabelSelector.fromJson(reader); + } else if ("nodeSelector".equals(fieldName)) { + deserializedLoadBalancerProperties.nodeSelector = LabelSelector.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedLoadBalancerProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java index 348ec6777350..7d21daf092d2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -18,7 +18,7 @@ * A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl * get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. */ -@Immutable +@Fluent public final class MachineInner extends ProxyResource { /* * The properties of the machine @@ -53,7 +53,7 @@ public final class MachineInner extends ProxyResource { /** * Creates an instance of MachineInner class. */ - private MachineInner() { + public MachineInner() { } /** @@ -65,6 +65,17 @@ public MachineProperties properties() { return this.properties; } + /** + * Set the properties property: The properties of the machine. + * + * @param properties the properties value to set. + * @return the MachineInner object itself. + */ + public MachineInner withProperties(MachineProperties properties) { + this.properties = properties; + return this; + } + /** * Get the zones property: The Availability zone in which machine is located. * @@ -74,6 +85,17 @@ public List zones() { return this.zones; } + /** + * Set the zones property: The Availability zone in which machine is located. + * + * @param zones the zones value to set. + * @return the MachineInner object itself. + */ + public MachineInner withZones(List zones) { + this.zones = zones; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -131,6 +153,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java index 4b7da59359e4..8943b03682ba 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java @@ -150,6 +150,35 @@ public MaintenanceConfigurationInner withNotAllowedTime(List notAllowe return this; } + /** + * Get the maintenanceWindowId property: The fully qualified resource ID of the maintenance window that this + * maintenance configuration is linked to. When set, the schedule is derived read-only from the linked maintenance + * window — maintenanceWindow becomes a computed field. When absent (the default), the schedule is defined inline + * via the maintenanceWindow property. The caller must have read access to the target maintenance window. + * + * @return the maintenanceWindowId value. + */ + public String maintenanceWindowId() { + return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindowId(); + } + + /** + * Set the maintenanceWindowId property: The fully qualified resource ID of the maintenance window that this + * maintenance configuration is linked to. When set, the schedule is derived read-only from the linked maintenance + * window — maintenanceWindow becomes a computed field. When absent (the default), the schedule is defined inline + * via the maintenanceWindow property. The caller must have read access to the target maintenance window. + * + * @param maintenanceWindowId the maintenanceWindowId value to set. + * @return the MaintenanceConfigurationInner object itself. + */ + public MaintenanceConfigurationInner withMaintenanceWindowId(String maintenanceWindowId) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceConfigurationProperties(); + } + this.innerProperties().withMaintenanceWindowId(maintenanceWindowId); + return this; + } + /** * Get the maintenanceWindow property: Maintenance window for the maintenance configuration. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java index 3c543b48ae30..5c5fd9047575 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java @@ -31,6 +31,14 @@ public final class MaintenanceConfigurationProperties implements JsonSerializabl */ private List notAllowedTime; + /* + * The fully qualified resource ID of the maintenance window that this maintenance configuration is linked to. When + * set, the schedule is derived read-only from the linked maintenance window — maintenanceWindow becomes a computed + * field. When absent (the default), the schedule is defined inline via the maintenanceWindow property. The caller + * must have read access to the target maintenance window. + */ + private String maintenanceWindowId; + /* * Maintenance window for the maintenance configuration. */ @@ -84,6 +92,32 @@ public MaintenanceConfigurationProperties withNotAllowedTime(List notA return this; } + /** + * Get the maintenanceWindowId property: The fully qualified resource ID of the maintenance window that this + * maintenance configuration is linked to. When set, the schedule is derived read-only from the linked maintenance + * window — maintenanceWindow becomes a computed field. When absent (the default), the schedule is defined inline + * via the maintenanceWindow property. The caller must have read access to the target maintenance window. + * + * @return the maintenanceWindowId value. + */ + public String maintenanceWindowId() { + return this.maintenanceWindowId; + } + + /** + * Set the maintenanceWindowId property: The fully qualified resource ID of the maintenance window that this + * maintenance configuration is linked to. When set, the schedule is derived read-only from the linked maintenance + * window — maintenanceWindow becomes a computed field. When absent (the default), the schedule is defined inline + * via the maintenanceWindow property. The caller must have read access to the target maintenance window. + * + * @param maintenanceWindowId the maintenanceWindowId value to set. + * @return the MaintenanceConfigurationProperties object itself. + */ + public MaintenanceConfigurationProperties withMaintenanceWindowId(String maintenanceWindowId) { + this.maintenanceWindowId = maintenanceWindowId; + return this; + } + /** * Get the maintenanceWindow property: Maintenance window for the maintenance configuration. * @@ -130,6 +164,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("timeInWeek", this.timeInWeek, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("notAllowedTime", this.notAllowedTime, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("maintenanceWindowId", this.maintenanceWindowId); jsonWriter.writeJsonField("maintenanceWindow", this.maintenanceWindow); return jsonWriter.writeEndObject(); } @@ -156,6 +191,8 @@ public static MaintenanceConfigurationProperties fromJson(JsonReader jsonReader) } else if ("notAllowedTime".equals(fieldName)) { List notAllowedTime = reader.readArray(reader1 -> TimeSpan.fromJson(reader1)); deserializedMaintenanceConfigurationProperties.notAllowedTime = notAllowedTime; + } else if ("maintenanceWindowId".equals(fieldName)) { + deserializedMaintenanceConfigurationProperties.maintenanceWindowId = reader.getString(); } else if ("maintenanceWindow".equals(fieldName)) { deserializedMaintenanceConfigurationProperties.maintenanceWindow = MaintenanceWindow.fromJson(reader); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceWindowResourceInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceWindowResourceInner.java new file mode 100644 index 000000000000..68dd7a9d2ea4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceWindowResourceInner.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.MaintenanceWindowResourceProperties; +import java.io.IOException; +import java.util.Map; + +/** + * A maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule which can be + * linked to maintenance configurations on one or more managed clusters. For more information, see + * https://aka.ms/aks/maintenance-windows. + */ +@Fluent +public final class MaintenanceWindowResourceInner extends Resource { + /* + * Properties of a maintenance window. + */ + private MaintenanceWindowResourceProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MaintenanceWindowResourceInner class. + */ + public MaintenanceWindowResourceInner() { + } + + /** + * Get the properties property: Properties of a maintenance window. + * + * @return the properties value. + */ + public MaintenanceWindowResourceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of a maintenance window. + * + * @param properties the properties value to set. + * @return the MaintenanceWindowResourceInner object itself. + */ + public MaintenanceWindowResourceInner withProperties(MaintenanceWindowResourceProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public MaintenanceWindowResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MaintenanceWindowResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowResourceInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceWindowResourceInner. + */ + public static MaintenanceWindowResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowResourceInner deserializedMaintenanceWindowResourceInner + = new MaintenanceWindowResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMaintenanceWindowResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMaintenanceWindowResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMaintenanceWindowResourceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedMaintenanceWindowResourceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMaintenanceWindowResourceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedMaintenanceWindowResourceInner.properties + = MaintenanceWindowResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMaintenanceWindowResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowResourceInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java index 40d6100e0ca6..9c187c6addc6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.containerservice.models.AgentPoolArtifactStreamingProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolBlueGreenUpgradeSettings; import com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; @@ -30,9 +31,11 @@ import com.azure.resourcemanager.containerservice.models.OSType; import com.azure.resourcemanager.containerservice.models.PodIpAllocationMode; import com.azure.resourcemanager.containerservice.models.PowerState; +import com.azure.resourcemanager.containerservice.models.PreparedImageSpecificationProfile; import com.azure.resourcemanager.containerservice.models.ScaleDownMode; import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.UpgradeStrategy; import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; @@ -194,11 +197,27 @@ public class ManagedClusterAgentPoolProfileProperties */ private String nodeImageVersion; + /* + * Defines the upgrade strategy for the agent pool. The default is Rolling. + */ + private UpgradeStrategy upgradeStrategy; + + /* + * Whether to enable the full-cache ephemeral OS disk feature. When this feature is enabled, the entire operating + * system will be locally cached on the ephemeral OS disk, preventing E17 events caused by network failures. + */ + private Boolean enableOSDiskFullCaching; + /* * Settings for upgrading the agentpool */ private AgentPoolUpgradeSettings upgradeSettings; + /* + * Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to BlueGreen. + */ + private AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen; + /* * The current deployment or provisioning state. */ @@ -269,6 +288,16 @@ public class ManagedClusterAgentPoolProfileProperties */ private List nodeTaints; + /* + * Taints added on the nodes during creation that will not be reconciled by AKS. These taints will not be reconciled + * by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes + * will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) + * happens. These taints allow for required configuration to run before the node is ready to accept workloads, for + * example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 + * key1=value1:NoSchedule-` + */ + private List nodeInitializationTaints; + /* * The ID for Proximity Placement Group. */ @@ -384,6 +413,11 @@ public class ManagedClusterAgentPoolProfileProperties */ private LocalDnsProfile localDnsProfile; + /* + * Settings to determine the prepared image specification used to provision nodes in a pool. + */ + private PreparedImageSpecificationProfile preparedImageSpecificationProfile; + /** * Creates an instance of ManagedClusterAgentPoolProfileProperties class. */ @@ -926,6 +960,50 @@ public ManagedClusterAgentPoolProfileProperties withNodeImageVersion(String node return this; } + /** + * Get the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @return the upgradeStrategy value. + */ + public UpgradeStrategy upgradeStrategy() { + return this.upgradeStrategy; + } + + /** + * Set the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @param upgradeStrategy the upgradeStrategy value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { + this.upgradeStrategy = upgradeStrategy; + return this; + } + + /** + * Get the enableOSDiskFullCaching property: Whether to enable the full-cache ephemeral OS disk feature. When this + * feature is enabled, the entire operating system will be locally cached on the ephemeral OS disk, preventing E17 + * events caused by network failures. + * + * @return the enableOSDiskFullCaching value. + */ + public Boolean enableOSDiskFullCaching() { + return this.enableOSDiskFullCaching; + } + + /** + * Set the enableOSDiskFullCaching property: Whether to enable the full-cache ephemeral OS disk feature. When this + * feature is enabled, the entire operating system will be locally cached on the ephemeral OS disk, preventing E17 + * events caused by network failures. + * + * @param enableOSDiskFullCaching the enableOSDiskFullCaching value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableOSDiskFullCaching(Boolean enableOSDiskFullCaching) { + this.enableOSDiskFullCaching = enableOSDiskFullCaching; + return this; + } + /** * Get the upgradeSettings property: Settings for upgrading the agentpool. * @@ -946,6 +1024,29 @@ public ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpg return this; } + /** + * Get the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @return the upgradeSettingsBlueGreen value. + */ + public AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen() { + return this.upgradeSettingsBlueGreen; + } + + /** + * Set the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @param upgradeSettingsBlueGreen the upgradeSettingsBlueGreen value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { + this.upgradeSettingsBlueGreen = upgradeSettingsBlueGreen; + return this; + } + /** * Get the provisioningState property: The current deployment or provisioning state. * @@ -1203,6 +1304,37 @@ public ManagedClusterAgentPoolProfileProperties withNodeTaints(List node return this; } + /** + * Get the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List nodeInitializationTaints() { + return this.nodeInitializationTaints; + } + + /** + * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withNodeInitializationTaints(List nodeInitializationTaints) { + this.nodeInitializationTaints = nodeInitializationTaints; + return this; + } + /** * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. * @@ -1640,6 +1772,29 @@ public ManagedClusterAgentPoolProfileProperties withLocalDnsProfile(LocalDnsProf return this; } + /** + * Get the preparedImageSpecificationProfile property: Settings to determine the prepared image specification used + * to provision nodes in a pool. + * + * @return the preparedImageSpecificationProfile value. + */ + public PreparedImageSpecificationProfile preparedImageSpecificationProfile() { + return this.preparedImageSpecificationProfile; + } + + /** + * Set the preparedImageSpecificationProfile property: Settings to determine the prepared image specification used + * to provision nodes in a pool. + * + * @param preparedImageSpecificationProfile the preparedImageSpecificationProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withPreparedImageSpecificationProfile(PreparedImageSpecificationProfile preparedImageSpecificationProfile) { + this.preparedImageSpecificationProfile = preparedImageSpecificationProfile; + return this; + } + /** * Validates the instance. * @@ -1649,6 +1804,9 @@ public void validate() { if (upgradeSettings() != null) { upgradeSettings().validate(); } + if (upgradeSettingsBlueGreen() != null) { + upgradeSettingsBlueGreen().validate(); + } if (powerState() != null) { powerState().validate(); } @@ -1691,6 +1849,9 @@ public void validate() { if (localDnsProfile() != null) { localDnsProfile().validate(); } + if (preparedImageSpecificationProfile() != null) { + preparedImageSpecificationProfile().validate(); + } } /** @@ -1723,7 +1884,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); jsonWriter.writeStringField("nodeImageVersion", this.nodeImageVersion); + jsonWriter.writeStringField("upgradeStrategy", + this.upgradeStrategy == null ? null : this.upgradeStrategy.toString()); + jsonWriter.writeBooleanField("enableOSDiskFullCaching", this.enableOSDiskFullCaching); jsonWriter.writeJsonField("upgradeSettings", this.upgradeSettings); + jsonWriter.writeJsonField("upgradeSettingsBlueGreen", this.upgradeSettingsBlueGreen); jsonWriter.writeJsonField("powerState", this.powerState); jsonWriter.writeArrayField("availabilityZones", this.availabilityZones, (writer, element) -> writer.writeString(element)); @@ -1737,6 +1902,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeInitializationTaints", this.nodeInitializationTaints, + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("proximityPlacementGroupID", this.proximityPlacementGroupId); jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); @@ -1759,6 +1926,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("status", this.status); jsonWriter.writeJsonField("localDNSProfile", this.localDnsProfile); + jsonWriter.writeJsonField("preparedImageSpecificationProfile", this.preparedImageSpecificationProfile); return jsonWriter.writeEndObject(); } @@ -1837,9 +2005,18 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR = reader.getString(); } else if ("nodeImageVersion".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.nodeImageVersion = reader.getString(); + } else if ("upgradeStrategy".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.upgradeStrategy + = UpgradeStrategy.fromString(reader.getString()); + } else if ("enableOSDiskFullCaching".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.enableOSDiskFullCaching + = reader.getNullable(JsonReader::getBoolean); } else if ("upgradeSettings".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.upgradeSettings = AgentPoolUpgradeSettings.fromJson(reader); + } else if ("upgradeSettingsBlueGreen".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.upgradeSettingsBlueGreen + = AgentPoolBlueGreenUpgradeSettings.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { @@ -1870,6 +2047,10 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR } else if ("nodeTaints".equals(fieldName)) { List nodeTaints = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterAgentPoolProfileProperties.nodeTaints = nodeTaints; + } else if ("nodeInitializationTaints".equals(fieldName)) { + List nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfileProperties.nodeInitializationTaints + = nodeInitializationTaints; } else if ("proximityPlacementGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.proximityPlacementGroupId = reader.getString(); } else if ("kubeletConfig".equals(fieldName)) { @@ -1925,6 +2106,9 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR } else if ("localDNSProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.localDnsProfile = LocalDnsProfile.fromJson(reader); + } else if ("preparedImageSpecificationProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.preparedImageSpecificationProfile + = PreparedImageSpecificationProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java index 67b316636139..11627de595dc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.ExtendedLocation; import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; @@ -23,6 +24,8 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterControlPlaneScalingProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterHealthMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHostedSystemProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIdentity; @@ -40,6 +43,7 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterStorageProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterWindowsProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservice.models.NodeDisruptionProfile; import com.azure.resourcemanager.containerservice.models.PowerState; import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; import com.azure.resourcemanager.containerservice.models.SchedulerProfile; @@ -291,6 +295,31 @@ public PowerState powerState() { return this.innerProperties() == null ? null : this.innerProperties().powerState(); } + /** + * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + /** * Get the maxAgentPools property: The max number of agent pools for the managed cluster. * @@ -727,6 +756,66 @@ public ManagedClusterInner withEnableFips(Boolean enableFips) { return this; } + /** + * Get the enableNodeHardening property: Whether to enable node hardening at the cluster level. When enabled, AKS + * applies hardened defaults for soft eviction thresholds, kube-reserved, and system-reserved on all Linux node + * pools in the cluster. Per-node-pool kubeletConfig settings take precedence over hardening defaults. On agent + * pools running Kubernetes 1.37 or later, node hardening is enabled by default and cannot be disabled; setting this + * field to false has no effect on those pools. + * + * @return the enableNodeHardening value. + */ + public Boolean enableNodeHardening() { + return this.innerProperties() == null ? null : this.innerProperties().enableNodeHardening(); + } + + /** + * Set the enableNodeHardening property: Whether to enable node hardening at the cluster level. When enabled, AKS + * applies hardened defaults for soft eviction thresholds, kube-reserved, and system-reserved on all Linux node + * pools in the cluster. Per-node-pool kubeletConfig settings take precedence over hardening defaults. On agent + * pools running Kubernetes 1.37 or later, node hardening is enabled by default and cannot be disabled; setting this + * field to false has no effect on those pools. + * + * @param enableNodeHardening the enableNodeHardening value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnableNodeHardening(Boolean enableNodeHardening) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withEnableNodeHardening(enableNodeHardening); + return this; + } + + /** + * Get the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can + * be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM + * Resource. + * + * @return the enableNamespaceResources value. + */ + public Boolean enableNamespaceResources() { + return this.innerProperties() == null ? null : this.innerProperties().enableNamespaceResources(); + } + + /** + * Set the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can + * be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM + * Resource. + * + * @param enableNamespaceResources the enableNamespaceResources value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnableNamespaceResources(Boolean enableNamespaceResources) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withEnableNamespaceResources(enableNamespaceResources); + return this; + } + /** * Get the networkProfile property: The network configuration profile. * @@ -1314,6 +1403,80 @@ public ManagedClusterInner withHostedSystemProfile(ManagedClusterHostedSystemPro return this; } + /** + * Get the healthMonitorProfile property: Health monitor profile for the managed cluster. + * + * @return the healthMonitorProfile value. + */ + public ManagedClusterHealthMonitorProfile healthMonitorProfile() { + return this.innerProperties() == null ? null : this.innerProperties().healthMonitorProfile(); + } + + /** + * Set the healthMonitorProfile property: Health monitor profile for the managed cluster. + * + * @param healthMonitorProfile the healthMonitorProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withHealthMonitorProfile(ManagedClusterHealthMonitorProfile healthMonitorProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withHealthMonitorProfile(healthMonitorProfile); + return this; + } + + /** + * Get the controlPlaneScalingProfile property: Profile for providing scaled and performance guaranteed control + * plane capacity to deliver consistent performance under high workload. Requires Kubernetes version 1.33.0 or + * later. + * + * @return the controlPlaneScalingProfile value. + */ + public ManagedClusterControlPlaneScalingProfile controlPlaneScalingProfile() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneScalingProfile(); + } + + /** + * Set the controlPlaneScalingProfile property: Profile for providing scaled and performance guaranteed control + * plane capacity to deliver consistent performance under high workload. Requires Kubernetes version 1.33.0 or + * later. + * + * @param controlPlaneScalingProfile the controlPlaneScalingProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner + withControlPlaneScalingProfile(ManagedClusterControlPlaneScalingProfile controlPlaneScalingProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withControlPlaneScalingProfile(controlPlaneScalingProfile); + return this; + } + + /** + * Get the nodeDisruptionProfile property: Node disruption profile for a managed cluster. + * + * @return the nodeDisruptionProfile value. + */ + public NodeDisruptionProfile nodeDisruptionProfile() { + return this.innerProperties() == null ? null : this.innerProperties().nodeDisruptionProfile(); + } + + /** + * Set the nodeDisruptionProfile property: Node disruption profile for a managed cluster. + * + * @param nodeDisruptionProfile the nodeDisruptionProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withNodeDisruptionProfile(NodeDisruptionProfile nodeDisruptionProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withNodeDisruptionProfile(nodeDisruptionProfile); + return this; + } + /** * Get the status property: Contains read-only information about the Managed Cluster. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java index 40843f467f0f..194f71ceaedf 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; @@ -21,6 +22,8 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterControlPlaneScalingProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterHealthMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHostedSystemProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; @@ -36,6 +39,7 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterStorageProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterWindowsProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; +import com.azure.resourcemanager.containerservice.models.NodeDisruptionProfile; import com.azure.resourcemanager.containerservice.models.PowerState; import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; import com.azure.resourcemanager.containerservice.models.SchedulerProfile; @@ -60,6 +64,12 @@ public final class ManagedClusterProperties implements JsonSerializable e.validate()); } @@ -1374,6 +1560,15 @@ public void validate() { if (hostedSystemProfile() != null) { hostedSystemProfile().validate(); } + if (healthMonitorProfile() != null) { + healthMonitorProfile().validate(); + } + if (controlPlaneScalingProfile() != null) { + controlPlaneScalingProfile().validate(); + } + if (nodeDisruptionProfile() != null) { + nodeDisruptionProfile().validate(); + } if (status() != null) { status().validate(); } @@ -1385,6 +1580,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("creationData", this.creationData); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeStringField("dnsPrefix", this.dnsPrefix); jsonWriter.writeStringField("fqdnSubdomain", this.fqdnSubdomain); @@ -1401,6 +1597,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enableRBAC", this.enableRbac); jsonWriter.writeStringField("supportPlan", this.supportPlan == null ? null : this.supportPlan.toString()); jsonWriter.writeBooleanField("enableFIPS", this.enableFips); + jsonWriter.writeBooleanField("enableNodeHardening", this.enableNodeHardening); + jsonWriter.writeBooleanField("enableNamespaceResources", this.enableNamespaceResources); jsonWriter.writeJsonField("networkProfile", this.networkProfile); jsonWriter.writeJsonField("aadProfile", this.aadProfile); jsonWriter.writeJsonField("autoUpgradeProfile", this.autoUpgradeProfile); @@ -1428,6 +1626,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("aiToolchainOperatorProfile", this.aiToolchainOperatorProfile); jsonWriter.writeJsonField("schedulerProfile", this.schedulerProfile); jsonWriter.writeJsonField("hostedSystemProfile", this.hostedSystemProfile); + jsonWriter.writeJsonField("healthMonitorProfile", this.healthMonitorProfile); + jsonWriter.writeJsonField("controlPlaneScalingProfile", this.controlPlaneScalingProfile); + jsonWriter.writeJsonField("nodeDisruptionProfile", this.nodeDisruptionProfile); jsonWriter.writeJsonField("status", this.status); return jsonWriter.writeEndObject(); } @@ -1451,6 +1652,8 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO deserializedManagedClusterProperties.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { deserializedManagedClusterProperties.powerState = PowerState.fromJson(reader); + } else if ("creationData".equals(fieldName)) { + deserializedManagedClusterProperties.creationData = CreationData.fromJson(reader); } else if ("maxAgentPools".equals(fieldName)) { deserializedManagedClusterProperties.maxAgentPools = reader.getNullable(JsonReader::getInt); } else if ("kubernetesVersion".equals(fieldName)) { @@ -1500,6 +1703,12 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO = KubernetesSupportPlan.fromString(reader.getString()); } else if ("enableFIPS".equals(fieldName)) { deserializedManagedClusterProperties.enableFips = reader.getNullable(JsonReader::getBoolean); + } else if ("enableNodeHardening".equals(fieldName)) { + deserializedManagedClusterProperties.enableNodeHardening + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableNamespaceResources".equals(fieldName)) { + deserializedManagedClusterProperties.enableNamespaceResources + = reader.getNullable(JsonReader::getBoolean); } else if ("networkProfile".equals(fieldName)) { deserializedManagedClusterProperties.networkProfile = ContainerServiceNetworkProfile.fromJson(reader); @@ -1568,6 +1777,14 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("hostedSystemProfile".equals(fieldName)) { deserializedManagedClusterProperties.hostedSystemProfile = ManagedClusterHostedSystemProfile.fromJson(reader); + } else if ("healthMonitorProfile".equals(fieldName)) { + deserializedManagedClusterProperties.healthMonitorProfile + = ManagedClusterHealthMonitorProfile.fromJson(reader); + } else if ("controlPlaneScalingProfile".equals(fieldName)) { + deserializedManagedClusterProperties.controlPlaneScalingProfile + = ManagedClusterControlPlaneScalingProfile.fromJson(reader); + } else if ("nodeDisruptionProfile".equals(fieldName)) { + deserializedManagedClusterProperties.nodeDisruptionProfile = NodeDisruptionProfile.fromJson(reader); } else if ("status".equals(fieldName)) { deserializedManagedClusterProperties.status = ManagedClusterStatus.fromJson(reader); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java new file mode 100644 index 000000000000..ad04226937af --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesForSnapshot; +import com.azure.resourcemanager.containerservice.models.SnapshotType; +import java.io.IOException; +import java.util.Map; + +/** + * A managed cluster snapshot resource. + */ +@Fluent +public final class ManagedClusterSnapshotInner extends Resource { + /* + * Properties of a managed cluster snapshot. + */ + private ManagedClusterSnapshotProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedClusterSnapshotInner class. + */ + public ManagedClusterSnapshotInner() { + } + + /** + * Get the innerProperties property: Properties of a managed cluster snapshot. + * + * @return the innerProperties value. + */ + private ManagedClusterSnapshotProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterSnapshotInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterSnapshotInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterSnapshotInner object itself. + */ + public ManagedClusterSnapshotInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterSnapshotProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.innerProperties() == null ? null : this.innerProperties().snapshotType(); + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the ManagedClusterSnapshotInner object itself. + */ + public ManagedClusterSnapshotInner withSnapshotType(SnapshotType snapshotType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterSnapshotProperties(); + } + this.innerProperties().withSnapshotType(snapshotType); + return this; + } + + /** + * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed + * cluster snapshot. Those properties are read-only. + * + * @return the managedClusterPropertiesReadOnly value. + */ + public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { + return this.innerProperties() == null ? null : this.innerProperties().managedClusterPropertiesReadOnly(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSnapshotInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedClusterSnapshotInner. + */ + public static ManagedClusterSnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSnapshotInner deserializedManagedClusterSnapshotInner = new ManagedClusterSnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterSnapshotInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.innerProperties + = ManagedClusterSnapshotProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSnapshotInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java new file mode 100644 index 000000000000..e1a44d06f3a7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesForSnapshot; +import com.azure.resourcemanager.containerservice.models.SnapshotType; +import java.io.IOException; + +/** + * Properties for a managed cluster snapshot. + */ +@Fluent +public final class ManagedClusterSnapshotProperties implements JsonSerializable { + /* + * CreationData to be used to specify the source resource ID to create this snapshot. + */ + private CreationData creationData; + + /* + * The type of a snapshot. The default is NodePool. + */ + private SnapshotType snapshotType; + + /* + * What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. + */ + private ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly; + + /** + * Creates an instance of ManagedClusterSnapshotProperties class. + */ + public ManagedClusterSnapshotProperties() { + } + + /** + * Get the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.creationData; + } + + /** + * Set the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterSnapshotProperties object itself. + */ + public ManagedClusterSnapshotProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.snapshotType; + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the ManagedClusterSnapshotProperties object itself. + */ + public ManagedClusterSnapshotProperties withSnapshotType(SnapshotType snapshotType) { + this.snapshotType = snapshotType; + return this; + } + + /** + * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed + * cluster snapshot. Those properties are read-only. + * + * @return the managedClusterPropertiesReadOnly value. + */ + public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { + return this.managedClusterPropertiesReadOnly; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (creationData() != null) { + creationData().validate(); + } + if (managedClusterPropertiesReadOnly() != null) { + managedClusterPropertiesReadOnly().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("creationData", this.creationData); + jsonWriter.writeStringField("snapshotType", this.snapshotType == null ? null : this.snapshotType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSnapshotProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSnapshotProperties. + */ + public static ManagedClusterSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSnapshotProperties deserializedManagedClusterSnapshotProperties + = new ManagedClusterSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("creationData".equals(fieldName)) { + deserializedManagedClusterSnapshotProperties.creationData = CreationData.fromJson(reader); + } else if ("snapshotType".equals(fieldName)) { + deserializedManagedClusterSnapshotProperties.snapshotType + = SnapshotType.fromString(reader.getString()); + } else if ("managedClusterPropertiesReadOnly".equals(fieldName)) { + deserializedManagedClusterSnapshotProperties.managedClusterPropertiesReadOnly + = ManagedClusterPropertiesForSnapshot.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSnapshotProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java new file mode 100644 index 000000000000..ead228ed0798 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.MeshMembershipProperties; +import java.io.IOException; + +/** + * Mesh membership of a managed cluster. + */ +@Fluent +public final class MeshMembershipInner extends ProxyResource { + /* + * Mesh membership properties of a managed cluster. + */ + private MeshMembershipProperties properties; + + /* + * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed + * by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is + * removed from the template since it is managed by another resource. + */ + private String managedBy; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MeshMembershipInner class. + */ + public MeshMembershipInner() { + } + + /** + * Get the properties property: Mesh membership properties of a managed cluster. + * + * @return the properties value. + */ + public MeshMembershipProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Mesh membership properties of a managed cluster. + * + * @param properties the properties value to set. + * @return the MeshMembershipInner object itself. + */ + public MeshMembershipInner withProperties(MeshMembershipProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @return the managedBy value. + */ + public String managedBy() { + return this.managedBy; + } + + /** + * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @param managedBy the managedBy value to set. + * @return the MeshMembershipInner object itself. + */ + public MeshMembershipInner withManagedBy(String managedBy) { + this.managedBy = managedBy; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("managedBy", this.managedBy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MeshMembershipInner. + */ + public static MeshMembershipInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipInner deserializedMeshMembershipInner = new MeshMembershipInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMeshMembershipInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMeshMembershipInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMeshMembershipInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMeshMembershipInner.properties = MeshMembershipProperties.fromJson(reader); + } else if ("managedBy".equals(fieldName)) { + deserializedMeshMembershipInner.managedBy = reader.getString(); + } else if ("eTag".equals(fieldName)) { + deserializedMeshMembershipInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedMeshMembershipInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java new file mode 100644 index 000000000000..50dab7b1d2a6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * node image version profile for given major.minor.patch release. + */ +@Immutable +public final class NodeImageVersionInner implements JsonSerializable { + /* + * The operating system of the node image. Example: AKSUbuntu + */ + private String os; + + /* + * The SKU or flavor of the node image. Example: 2004gen2containerd + */ + private String sku; + + /* + * major.minor.patch version of the node image version release. Example: 2024.02.02 + */ + private String version; + + /* + * The OS + SKU + version of the node image. Example: AKSUbuntu-1804gen2containerd-2024.02.02 + */ + private String fullName; + + /** + * Creates an instance of NodeImageVersionInner class. + */ + private NodeImageVersionInner() { + } + + /** + * Get the os property: The operating system of the node image. Example: AKSUbuntu. + * + * @return the os value. + */ + public String os() { + return this.os; + } + + /** + * Get the sku property: The SKU or flavor of the node image. Example: 2004gen2containerd. + * + * @return the sku value. + */ + public String sku() { + return this.sku; + } + + /** + * Get the version property: major.minor.patch version of the node image version release. Example: 2024.02.02. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the fullName property: The OS + SKU + version of the node image. Example: + * AKSUbuntu-1804gen2containerd-2024.02.02. + * + * @return the fullName value. + */ + public String fullName() { + return this.fullName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("os", this.os); + jsonWriter.writeStringField("sku", this.sku); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("fullName", this.fullName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeImageVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeImageVersionInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NodeImageVersionInner. + */ + public static NodeImageVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeImageVersionInner deserializedNodeImageVersionInner = new NodeImageVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("os".equals(fieldName)) { + deserializedNodeImageVersionInner.os = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedNodeImageVersionInner.sku = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedNodeImageVersionInner.version = reader.getString(); + } else if ("fullName".equals(fieldName)) { + deserializedNodeImageVersionInner.fullName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeImageVersionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java new file mode 100644 index 000000000000..a8a3cd061b06 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The current status of an async operation. + */ +@Immutable +public final class OperationStatusResultInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * The type of the operation. + */ + private String operationType; + + /* + * The type of the suboperation. + */ + private String subOperationType; + + /** + * Creates an instance of OperationStatusResultInner class. + */ + private OperationStatusResultInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the operationType property: The type of the operation. + * + * @return the operationType value. + */ + public String operationType() { + return this.operationType; + } + + /** + * Get the subOperationType property: The type of the suboperation. + * + * @return the subOperationType value. + */ + public String subOperationType() { + return this.subOperationType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property status in model OperationStatusResultInner")); + } + if (operations() != null) { + operations().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatusResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResultInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStatusResultInner. + */ + public static OperationStatusResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResultInner deserializedOperationStatusResultInner = new OperationStatusResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedOperationStatusResultInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedOperationStatusResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationStatusResultInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedOperationStatusResultInner.percentComplete = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedOperationStatusResultInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedOperationStatusResultInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedOperationStatusResultInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedOperationStatusResultInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedOperationStatusResultInner.resourceId = reader.getString(); + } else if ("operationType".equals(fieldName)) { + deserializedOperationStatusResultInner.operationType = reader.getString(); + } else if ("subOperationType".equals(fieldName)) { + deserializedOperationStatusResultInner.subOperationType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResultInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PoolBootstrapDataInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PoolBootstrapDataInner.java new file mode 100644 index 000000000000..7b938642f4a7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PoolBootstrapDataInner.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.BootstrapAzureConfig; +import com.azure.resourcemanager.containerservice.models.BootstrapComponentVersions; +import com.azure.resourcemanager.containerservice.models.BootstrapNetworkingConfig; +import com.azure.resourcemanager.containerservice.models.BootstrapNodeConfig; +import java.io.IOException; + +/** + * Bootstrap configuration for a FlexNode pool. + */ +@Immutable +public final class PoolBootstrapDataInner implements JsonSerializable { + /* + * Azure environment and cluster identity information. + */ + private BootstrapAzureConfig azure; + + /* + * Component versions for the node runtime. + */ + private BootstrapComponentVersions components; + + /* + * Network configuration for the node. + */ + private BootstrapNetworkingConfig networking; + + /* + * Node-level configuration for kubelet, labels, and taints. + */ + private BootstrapNodeConfig node; + + /** + * Creates an instance of PoolBootstrapDataInner class. + */ + private PoolBootstrapDataInner() { + } + + /** + * Get the azure property: Azure environment and cluster identity information. + * + * @return the azure value. + */ + public BootstrapAzureConfig azure() { + return this.azure; + } + + /** + * Get the components property: Component versions for the node runtime. + * + * @return the components value. + */ + public BootstrapComponentVersions components() { + return this.components; + } + + /** + * Get the networking property: Network configuration for the node. + * + * @return the networking value. + */ + public BootstrapNetworkingConfig networking() { + return this.networking; + } + + /** + * Get the node property: Node-level configuration for kubelet, labels, and taints. + * + * @return the node value. + */ + public BootstrapNodeConfig node() { + return this.node; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azure() != null) { + azure().validate(); + } + if (components() != null) { + components().validate(); + } + if (networking() != null) { + networking().validate(); + } + if (node() != null) { + node().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolBootstrapDataInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolBootstrapDataInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PoolBootstrapDataInner. + */ + public static PoolBootstrapDataInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolBootstrapDataInner deserializedPoolBootstrapDataInner = new PoolBootstrapDataInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azure".equals(fieldName)) { + deserializedPoolBootstrapDataInner.azure = BootstrapAzureConfig.fromJson(reader); + } else if ("components".equals(fieldName)) { + deserializedPoolBootstrapDataInner.components = BootstrapComponentVersions.fromJson(reader); + } else if ("networking".equals(fieldName)) { + deserializedPoolBootstrapDataInner.networking = BootstrapNetworkingConfig.fromJson(reader); + } else if ("node".equals(fieldName)) { + deserializedPoolBootstrapDataInner.node = BootstrapNodeConfig.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolBootstrapDataInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ResourceSkuInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ResourceSkuInner.java new file mode 100644 index 000000000000..37c271dfea79 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ResourceSkuInner.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.ResourceSkuCapabilities; +import com.azure.resourcemanager.containerservice.models.ResourceSkuCapacity; +import com.azure.resourcemanager.containerservice.models.ResourceSkuCosts; +import com.azure.resourcemanager.containerservice.models.ResourceSkuLocationInfo; +import com.azure.resourcemanager.containerservice.models.ResourceSkuRestrictions; +import java.io.IOException; +import java.util.List; + +/** + * Describes an available Compute SKU. + */ +@Immutable +public final class ResourceSkuInner implements JsonSerializable { + /* + * The type of resource the SKU applies to. + */ + private String resourceType; + + /* + * The name of SKU. + */ + private String name; + + /* + * Specifies the tier of virtual machines in a scale set.

      Possible Values:

      **Standard**

      **Basic** + */ + private String tier; + + /* + * The Size of the SKU. + */ + private String size; + + /* + * The Family of this particular SKU. + */ + private String family; + + /* + * The Kind of resources that are supported in this SKU. + */ + private String kind; + + /* + * Specifies the number of virtual machines in the scale set. + */ + private ResourceSkuCapacity capacity; + + /* + * The set of locations that the SKU is available. + */ + private List locations; + + /* + * A list of locations and availability zones in those locations where the SKU is available. + */ + private List locationInfo; + + /* + * The api versions that support this SKU. + */ + private List apiVersions; + + /* + * Metadata for retrieving price info. + */ + private List costs; + + /* + * A name value pair to describe the capability. + */ + private List capabilities; + + /* + * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + */ + private List restrictions; + + /** + * Creates an instance of ResourceSkuInner class. + */ + private ResourceSkuInner() { + } + + /** + * Get the resourceType property: The type of resource the SKU applies to. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the name property: The name of SKU. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the tier property: Specifies the tier of virtual machines in a scale set.<br /><br /> Possible + * Values:<br /><br /> **Standard**<br /><br /> **Basic**. + * + * @return the tier value. + */ + public String tier() { + return this.tier; + } + + /** + * Get the size property: The Size of the SKU. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Get the family property: The Family of this particular SKU. + * + * @return the family value. + */ + public String family() { + return this.family; + } + + /** + * Get the kind property: The Kind of resources that are supported in this SKU. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Get the capacity property: Specifies the number of virtual machines in the scale set. + * + * @return the capacity value. + */ + public ResourceSkuCapacity capacity() { + return this.capacity; + } + + /** + * Get the locations property: The set of locations that the SKU is available. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Get the locationInfo property: A list of locations and availability zones in those locations where the SKU is + * available. + * + * @return the locationInfo value. + */ + public List locationInfo() { + return this.locationInfo; + } + + /** + * Get the apiVersions property: The api versions that support this SKU. + * + * @return the apiVersions value. + */ + public List apiVersions() { + return this.apiVersions; + } + + /** + * Get the costs property: Metadata for retrieving price info. + * + * @return the costs value. + */ + public List costs() { + return this.costs; + } + + /** + * Get the capabilities property: A name value pair to describe the capability. + * + * @return the capabilities value. + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Get the restrictions property: The restrictions because of which SKU cannot be used. This is empty if there are + * no restrictions. + * + * @return the restrictions value. + */ + public List restrictions() { + return this.restrictions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capacity() != null) { + capacity().validate(); + } + if (locationInfo() != null) { + locationInfo().forEach(e -> e.validate()); + } + if (costs() != null) { + costs().forEach(e -> e.validate()); + } + if (capabilities() != null) { + capabilities().forEach(e -> e.validate()); + } + if (restrictions() != null) { + restrictions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuInner. + */ + public static ResourceSkuInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuInner deserializedResourceSkuInner = new ResourceSkuInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceType".equals(fieldName)) { + deserializedResourceSkuInner.resourceType = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedResourceSkuInner.name = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedResourceSkuInner.tier = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedResourceSkuInner.size = reader.getString(); + } else if ("family".equals(fieldName)) { + deserializedResourceSkuInner.family = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedResourceSkuInner.kind = reader.getString(); + } else if ("capacity".equals(fieldName)) { + deserializedResourceSkuInner.capacity = ResourceSkuCapacity.fromJson(reader); + } else if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuInner.locations = locations; + } else if ("locationInfo".equals(fieldName)) { + List locationInfo + = reader.readArray(reader1 -> ResourceSkuLocationInfo.fromJson(reader1)); + deserializedResourceSkuInner.locationInfo = locationInfo; + } else if ("apiVersions".equals(fieldName)) { + List apiVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuInner.apiVersions = apiVersions; + } else if ("costs".equals(fieldName)) { + List costs = reader.readArray(reader1 -> ResourceSkuCosts.fromJson(reader1)); + deserializedResourceSkuInner.costs = costs; + } else if ("capabilities".equals(fieldName)) { + List capabilities + = reader.readArray(reader1 -> ResourceSkuCapabilities.fromJson(reader1)); + deserializedResourceSkuInner.capabilities = capabilities; + } else if ("restrictions".equals(fieldName)) { + List restrictions + = reader.readArray(reader1 -> ResourceSkuRestrictions.fromJson(reader1)); + deserializedResourceSkuInner.restrictions = restrictions; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java new file mode 100644 index 000000000000..edfa11b669ba --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.SafeguardsAvailableVersionsProperties; +import java.io.IOException; + +/** + * Available Safeguards Version. + */ +@Immutable +public final class SafeguardsAvailableVersionInner extends ProxyResource { + /* + * Whether the version is default or not and support info. + */ + private SafeguardsAvailableVersionsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SafeguardsAvailableVersionInner class. + */ + private SafeguardsAvailableVersionInner() { + } + + /** + * Get the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + public SafeguardsAvailableVersionsProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model SafeguardsAvailableVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SafeguardsAvailableVersionInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SafeguardsAvailableVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SafeguardsAvailableVersionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionInner. + */ + public static SafeguardsAvailableVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SafeguardsAvailableVersionInner deserializedSafeguardsAvailableVersionInner + = new SafeguardsAvailableVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.properties + = SafeguardsAvailableVersionsProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSafeguardsAvailableVersionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java index b6fe3e48afd6..62fa2821ece7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java @@ -12,6 +12,7 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; @@ -36,8 +37,11 @@ import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolAvailableVersionsInner; import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.PoolBootstrapDataInner; import com.azure.resourcemanager.containerservice.implementation.models.AgentPoolListResult; import com.azure.resourcemanager.containerservice.models.AgentPoolDeleteMachinesParameter; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpdate; +import com.azure.resourcemanager.containerservice.models.ListBootstrapDataRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -123,6 +127,15 @@ Mono>> abortLatestOperation(@HostParam("endpoint") Str @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("agentPoolName") String agentPoolName, Context context); + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/completeUpgrade") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> completeUpgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, Context context); + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines") @ExpectedResponses({ 202 }) @@ -142,6 +155,26 @@ Mono>> upgradeNodeImageVersion(@HostParam("endpoint") @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/listBootstrapData") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBootstrapData(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ListBootstrapDataRequest body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AgentPoolUpdate parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions") @ExpectedResponses({ 200 }) @@ -1326,6 +1359,246 @@ public void abortLatestOperation(String resourceGroupName, String resourceName, abortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context).block(); } + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> completeUpgradeWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.completeUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> completeUpgradeWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.completeUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, context); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + Mono>> mono + = completeUpgradeWithResponseAsync(resourceGroupName, resourceName, agentPoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = completeUpgradeWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName) { + return this.beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + return this.beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).getSyncPoller(); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName) { + completeUpgradeAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName, Context context) { + completeUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + /** * Deletes specific machines in an agent pool. * @@ -1840,6 +2113,486 @@ public void upgradeNodeImageVersion(String resourceGroupName, String resourceNam upgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName, context).block(); } + /** + * Lists bootstrap data for a FlexNode agent pool. + * + * Returns pool-level bootstrap configuration for FlexNode machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bootstrap configuration for a FlexNode pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBootstrapDataWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, ListBootstrapDataRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBootstrapData(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists bootstrap data for a FlexNode agent pool. + * + * Returns pool-level bootstrap configuration for FlexNode machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bootstrap configuration for a FlexNode pool along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBootstrapDataWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, ListBootstrapDataRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBootstrapData(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, contentType, accept, body, + context); + } + + /** + * Lists bootstrap data for a FlexNode agent pool. + * + * Returns pool-level bootstrap configuration for FlexNode machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bootstrap configuration for a FlexNode pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listBootstrapDataAsync(String resourceGroupName, String resourceName, + String agentPoolName, ListBootstrapDataRequest body) { + return listBootstrapDataWithResponseAsync(resourceGroupName, resourceName, agentPoolName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists bootstrap data for a FlexNode agent pool. + * + * Returns pool-level bootstrap configuration for FlexNode machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bootstrap configuration for a FlexNode pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBootstrapDataWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, ListBootstrapDataRequest body, Context context) { + return listBootstrapDataWithResponseAsync(resourceGroupName, resourceName, agentPoolName, body, context) + .block(); + } + + /** + * Lists bootstrap data for a FlexNode agent pool. + * + * Returns pool-level bootstrap configuration for FlexNode machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bootstrap configuration for a FlexNode pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolBootstrapDataInner listBootstrapData(String resourceGroupName, String resourceName, String agentPoolName, + ListBootstrapDataRequest body) { + return listBootstrapDataWithResponse(resourceGroupName, resourceName, agentPoolName, body, Context.NONE) + .getValue(); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolUpdate parameters, String ifMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, ifMatch, contentType, + accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, AgentPoolUpdate parameters, String ifMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, ifMatch, contentType, accept, parameters, context); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolUpdate parameters, String ifMatch) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolUpdate parameters) { + final String ifMatch = null; + Mono>> mono + = updateWithResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, this.client.getContext()); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AgentPoolInner> beginUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolUpdate parameters, String ifMatch, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AgentPoolInner.class, AgentPoolInner.class, context); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolUpdate parameters) { + final String ifMatch = null; + return this.beginUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch) + .getSyncPoller(); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of agent Pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AgentPoolInner> beginUpdate(String resourceGroupName, + String resourceName, String agentPoolName, AgentPoolUpdate parameters, String ifMatch, Context context) { + return this.beginUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, context) + .getSyncPoller(); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolUpdate parameters, String ifMatch) { + return beginUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolUpdate parameters) { + final String ifMatch = null; + return beginUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolUpdate parameters, String ifMatch, Context context) { + return beginUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner update(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolUpdate parameters) { + final String ifMatch = null; + return updateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch).block(); + } + + /** + * Updates an agent pool in the specified managed cluster. Visit https://aka.ms/aks/concurrent-node-operations for + * more information. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param parameters The resource properties to be updated. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return agent Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AgentPoolInner update(String resourceGroupName, String resourceName, String agentPoolName, + AgentPoolUpdate parameters, String ifMatch, Context context) { + return updateAsync(resourceGroupName, resourceName, agentPoolName, parameters, ifMatch, context).block(); + } + /** * Gets a list of supported Kubernetes versions for the specified agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AlertConfigurationsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AlertConfigurationsClientImpl.java new file mode 100644 index 000000000000..ebbb8ee403b6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AlertConfigurationsClientImpl.java @@ -0,0 +1,938 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.AlertConfigurationsClient; +import com.azure.resourcemanager.containerservice.fluent.models.AlertConfigurationInner; +import com.azure.resourcemanager.containerservice.implementation.models.AlertConfigurationListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AlertConfigurationsClient. + */ +public final class AlertConfigurationsClientImpl implements AlertConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AlertConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of AlertConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AlertConfigurationsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(AlertConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientAlertConfigurations to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientAlertConfigurations") + public interface AlertConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/alertConfigurations/{configurationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/alertConfigurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("configurationName") String configurationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AlertConfigurationInner resource, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/alertConfigurations/{configurationName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("configurationName") String configurationName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/alertConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the specified alert configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified alert configuration of a managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String configurationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, configurationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified alert configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified alert configuration of a managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String configurationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, configurationName, accept, context); + } + + /** + * Gets the specified alert configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified alert configuration of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String configurationName) { + return getWithResponseAsync(resourceGroupName, resourceName, configurationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified alert configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified alert configuration of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String configurationName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, configurationName, context).block(); + } + + /** + * Gets the specified alert configuration of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified alert configuration of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AlertConfigurationInner get(String resourceGroupName, String resourceName, String configurationName) { + return getWithResponse(resourceGroupName, resourceName, configurationName, Context.NONE).getValue(); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String configurationName, AlertConfigurationInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, configurationName, contentType, + accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String configurationName, AlertConfigurationInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, configurationName, contentType, accept, + resource, context); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, AlertConfigurationInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String configurationName, AlertConfigurationInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, configurationName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AlertConfigurationInner.class, AlertConfigurationInner.class, + this.client.getContext()); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AlertConfigurationInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String configurationName, AlertConfigurationInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, configurationName, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AlertConfigurationInner.class, AlertConfigurationInner.class, context); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AlertConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String configurationName, AlertConfigurationInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, configurationName, resource) + .getSyncPoller(); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AlertConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String configurationName, AlertConfigurationInner resource, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, configurationName, resource, context) + .getSyncPoller(); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String configurationName, AlertConfigurationInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, configurationName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String configurationName, AlertConfigurationInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, configurationName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AlertConfigurationInner createOrUpdate(String resourceGroupName, String resourceName, + String configurationName, AlertConfigurationInner resource) { + return createOrUpdateAsync(resourceGroupName, resourceName, configurationName, resource).block(); + } + + /** + * Creates or updates an alert configuration in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param resource The alert configuration to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return alert configuration for a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AlertConfigurationInner createOrUpdate(String resourceGroupName, String resourceName, + String configurationName, AlertConfigurationInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, configurationName, resource, context).block(); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String configurationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, configurationName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String configurationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, configurationName, context); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String configurationName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, configurationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String configurationName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, configurationName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String configurationName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, configurationName).getSyncPoller(); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String configurationName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, configurationName, context).getSyncPoller(); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String configurationName) { + return beginDeleteAsync(resourceGroupName, resourceName, configurationName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String configurationName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, configurationName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String configurationName) { + deleteAsync(resourceGroupName, resourceName, configurationName).block(); + } + + /** + * Deletes an alert configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param configurationName The name of the alert configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String configurationName, Context context) { + deleteAsync(resourceGroupName, resourceName, configurationName, context).block(); + } + + /** + * Gets a list of alert configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of alert configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of alert configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of alert configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of alert configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of alert configurations in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of alert configurations in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java index db5388257d5c..4183395327ba 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java @@ -9,12 +9,19 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.containerservice.fluent.AgentPoolsClient; +import com.azure.resourcemanager.containerservice.fluent.AlertConfigurationsClient; import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClient; import com.azure.resourcemanager.containerservice.fluent.IdentityBindingsClient; +import com.azure.resourcemanager.containerservice.fluent.JWTAuthenticatorsClient; +import com.azure.resourcemanager.containerservice.fluent.LoadBalancersClient; import com.azure.resourcemanager.containerservice.fluent.MachinesClient; import com.azure.resourcemanager.containerservice.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservice.fluent.MaintenanceWindowsClient; +import com.azure.resourcemanager.containerservice.fluent.ManagedClusterSnapshotsClient; import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; import com.azure.resourcemanager.containerservice.fluent.ManagedNamespacesClient; +import com.azure.resourcemanager.containerservice.fluent.MeshMembershipsClient; +import com.azure.resourcemanager.containerservice.fluent.OperationStatusResultsClient; import com.azure.resourcemanager.containerservice.fluent.OperationsClient; import com.azure.resourcemanager.containerservice.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.containerservice.fluent.PrivateLinkResourcesClient; @@ -22,6 +29,7 @@ import com.azure.resourcemanager.containerservice.fluent.SnapshotsClient; import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRoleBindingsClient; import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRolesClient; +import com.azure.resourcemanager.containerservice.fluent.VmSkusClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; @@ -157,6 +165,20 @@ public MaintenanceConfigurationsClient getMaintenanceConfigurations() { return this.maintenanceConfigurations; } + /** + * The MaintenanceWindowsClient object to access its operations. + */ + private final MaintenanceWindowsClient maintenanceWindows; + + /** + * Gets the MaintenanceWindowsClient object to access its operations. + * + * @return the MaintenanceWindowsClient object. + */ + public MaintenanceWindowsClient getMaintenanceWindows() { + return this.maintenanceWindows; + } + /** * The ManagedNamespacesClient object to access its operations. */ @@ -213,6 +235,20 @@ public SnapshotsClient getSnapshots() { return this.snapshots; } + /** + * The ManagedClusterSnapshotsClient object to access its operations. + */ + private final ManagedClusterSnapshotsClient managedClusterSnapshots; + + /** + * Gets the ManagedClusterSnapshotsClient object to access its operations. + * + * @return the ManagedClusterSnapshotsClient object. + */ + public ManagedClusterSnapshotsClient getManagedClusterSnapshots() { + return this.managedClusterSnapshots; + } + /** * The TrustedAccessRoleBindingsClient object to access its operations. */ @@ -227,6 +263,20 @@ public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { return this.trustedAccessRoleBindings; } + /** + * The LoadBalancersClient object to access its operations. + */ + private final LoadBalancersClient loadBalancers; + + /** + * Gets the LoadBalancersClient object to access its operations. + * + * @return the LoadBalancersClient object. + */ + public LoadBalancersClient getLoadBalancers() { + return this.loadBalancers; + } + /** * The IdentityBindingsClient object to access its operations. */ @@ -241,6 +291,34 @@ public IdentityBindingsClient getIdentityBindings() { return this.identityBindings; } + /** + * The JWTAuthenticatorsClient object to access its operations. + */ + private final JWTAuthenticatorsClient jWTAuthenticators; + + /** + * Gets the JWTAuthenticatorsClient object to access its operations. + * + * @return the JWTAuthenticatorsClient object. + */ + public JWTAuthenticatorsClient getJWTAuthenticators() { + return this.jWTAuthenticators; + } + + /** + * The MeshMembershipsClient object to access its operations. + */ + private final MeshMembershipsClient meshMemberships; + + /** + * Gets the MeshMembershipsClient object to access its operations. + * + * @return the MeshMembershipsClient object. + */ + public MeshMembershipsClient getMeshMemberships() { + return this.meshMemberships; + } + /** * The OperationsClient object to access its operations. */ @@ -255,6 +333,34 @@ public OperationsClient getOperations() { return this.operations; } + /** + * The AlertConfigurationsClient object to access its operations. + */ + private final AlertConfigurationsClient alertConfigurations; + + /** + * Gets the AlertConfigurationsClient object to access its operations. + * + * @return the AlertConfigurationsClient object. + */ + public AlertConfigurationsClient getAlertConfigurations() { + return this.alertConfigurations; + } + + /** + * The OperationStatusResultsClient object to access its operations. + */ + private final OperationStatusResultsClient operationStatusResults; + + /** + * Gets the OperationStatusResultsClient object to access its operations. + * + * @return the OperationStatusResultsClient object. + */ + public OperationStatusResultsClient getOperationStatusResults() { + return this.operationStatusResults; + } + /** * The PrivateLinkResourcesClient object to access its operations. */ @@ -297,6 +403,20 @@ public TrustedAccessRolesClient getTrustedAccessRoles() { return this.trustedAccessRoles; } + /** + * The VmSkusClient object to access its operations. + */ + private final VmSkusClient vmSkus; + + /** + * Gets the VmSkusClient object to access its operations. + * + * @return the VmSkusClient object. + */ + public VmSkusClient getVmSkus() { + return this.vmSkus; + } + /** * Initializes an instance of ContainerServiceManagementClient client. * @@ -315,19 +435,27 @@ public TrustedAccessRolesClient getTrustedAccessRoles() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-08-01"; + this.apiVersion = "2026-07-02-preview"; this.agentPools = new AgentPoolsClientImpl(this); this.managedClusters = new ManagedClustersClientImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); + this.maintenanceWindows = new MaintenanceWindowsClientImpl(this); this.managedNamespaces = new ManagedNamespacesClientImpl(this); this.machines = new MachinesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.snapshots = new SnapshotsClientImpl(this); + this.managedClusterSnapshots = new ManagedClusterSnapshotsClientImpl(this); this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); + this.loadBalancers = new LoadBalancersClientImpl(this); this.identityBindings = new IdentityBindingsClientImpl(this); + this.jWTAuthenticators = new JWTAuthenticatorsClientImpl(this); + this.meshMemberships = new MeshMembershipsClientImpl(this); this.operations = new OperationsClientImpl(this); + this.alertConfigurations = new AlertConfigurationsClientImpl(this); + this.operationStatusResults = new OperationStatusResultsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); + this.vmSkus = new VmSkusClientImpl(this); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JWTAuthenticatorsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JWTAuthenticatorsClientImpl.java new file mode 100644 index 000000000000..5ddc2c107c15 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JWTAuthenticatorsClientImpl.java @@ -0,0 +1,948 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.JWTAuthenticatorsClient; +import com.azure.resourcemanager.containerservice.fluent.models.JWTAuthenticatorInner; +import com.azure.resourcemanager.containerservice.implementation.models.JWTAuthenticatorListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in JWTAuthenticatorsClient. + */ +public final class JWTAuthenticatorsClientImpl implements JWTAuthenticatorsClient { + /** + * The proxy service used to perform REST calls. + */ + private final JWTAuthenticatorsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of JWTAuthenticatorsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + JWTAuthenticatorsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(JWTAuthenticatorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientJWTAuthenticators to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientJWTAuthenticators") + public interface JWTAuthenticatorsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") JWTAuthenticatorInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, jwtAuthenticatorName, accept, context); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + return getWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).block(); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JWTAuthenticatorInner get(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { + return getWithResponse(resourceGroupName, resourceName, jwtAuthenticatorName, Context.NONE).getValue(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, contentType, + accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, contentType, accept, + parameters, context); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, JWTAuthenticatorInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), JWTAuthenticatorInner.class, JWTAuthenticatorInner.class, + this.client.getContext()); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, JWTAuthenticatorInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + jwtAuthenticatorName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), JWTAuthenticatorInner.class, JWTAuthenticatorInner.class, context); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JWTAuthenticatorInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JWTAuthenticatorInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JWTAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters).block(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JWTAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context).block(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, jwtAuthenticatorName, context); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).getSyncPoller(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).getSyncPoller(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { + return beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { + deleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).block(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName, Context context) { + deleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).block(); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java new file mode 100644 index 000000000000..de9578b677a3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java @@ -0,0 +1,829 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.LoadBalancersClient; +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; +import com.azure.resourcemanager.containerservice.implementation.models.LoadBalancerListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LoadBalancersClient. + */ +public final class LoadBalancersClientImpl implements LoadBalancersClient { + /** + * The proxy service used to perform REST calls. + */ + private final LoadBalancersService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LoadBalancersClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(LoadBalancersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientLoadBalancers to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientLoadBalancers") + public interface LoadBalancersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") LoadBalancerInner parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("loadBalancerName") String loadBalancerName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, loadBalancerName, accept, context); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, String loadBalancerName) { + return getWithResponseAsync(resourceGroupName, resourceName, loadBalancerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, context).block(); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner get(String resourceGroupName, String resourceName, String loadBalancerName) { + return getWithResponse(resourceGroupName, resourceName, loadBalancerName, Context.NONE).getValue(); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String loadBalancerName, LoadBalancerInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String loadBalancerName, LoadBalancerInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, contentType, accept, + parameters, context); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, parameters, context) + .block(); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner createOrUpdate(String resourceGroupName, String resourceName, String loadBalancerName, + LoadBalancerInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, loadBalancerName, parameters, Context.NONE) + .getValue(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, loadBalancerName, context); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String loadBalancerName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, loadBalancerName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName).getSyncPoller(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName, context).getSyncPoller(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName) { + return beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String loadBalancerName) { + deleteAsync(resourceGroupName, resourceName, loadBalancerName).block(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String loadBalancerName, Context context) { + deleteAsync(resourceGroupName, resourceName, loadBalancerName, context).block(); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java index b04845e1f389..cf7047e2dd15 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.containerservice.implementation; +import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; @@ -11,6 +12,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -23,11 +25,16 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.MachinesClient; import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; import com.azure.resourcemanager.containerservice.implementation.models.MachineListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -71,6 +78,17 @@ Mono> get(@HostParam("endpoint") String endpoint, @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") MachineInner parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines") @ExpectedResponses({ 200 }) @@ -232,6 +250,352 @@ public MachineInner get(String resourceGroupName, String resourceName, String ag return getWithResponse(resourceGroupName, resourceName, agentPoolName, machineName, Context.NONE).getValue(); } + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machineName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machineName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, machineName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MachineInner.class, MachineInner.class, this.client.getContext()); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, machineName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MachineInner.class, MachineInner.class, this.client.getContext()); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, machineName, parameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MachineInner.class, MachineInner.class, context); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch) + .getSyncPoller(); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch, context) + .getSyncPoller(); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, + ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, + ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, + ifMatch, ifNoneMatch, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch).block(); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch, context).block(); + } + /** * Gets a list of machines in the specified agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceWindowsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceWindowsClientImpl.java new file mode 100644 index 000000000000..e0fee417404b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceWindowsClientImpl.java @@ -0,0 +1,1239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.MaintenanceWindowsClient; +import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceWindowResourceInner; +import com.azure.resourcemanager.containerservice.implementation.models.MaintenanceWindowResourceListResult; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MaintenanceWindowsClient. + */ +public final class MaintenanceWindowsClientImpl implements InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete, MaintenanceWindowsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MaintenanceWindowsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of MaintenanceWindowsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MaintenanceWindowsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(MaintenanceWindowsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientMaintenanceWindows to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientMaintenanceWindows") + public interface MaintenanceWindowsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows/{maintenanceWindowName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("maintenanceWindowName") String maintenanceWindowName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows/{maintenanceWindowName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("maintenanceWindowName") String maintenanceWindowName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") MaintenanceWindowResourceInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows/{maintenanceWindowName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("maintenanceWindowName") String maintenanceWindowName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TagsObject properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows/{maintenanceWindowName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("maintenanceWindowName") String maintenanceWindowName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/maintenanceWindows") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the specified maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance window along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String maintenanceWindowName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (maintenanceWindowName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, maintenanceWindowName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance window along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String maintenanceWindowName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (maintenanceWindowName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, maintenanceWindowName, accept, context); + } + + /** + * Gets the specified maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance window on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, + String maintenanceWindowName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, maintenanceWindowName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance window along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String maintenanceWindowName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, maintenanceWindowName, context).block(); + } + + /** + * Gets the specified maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified maintenance window. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceWindowResourceInner getByResourceGroup(String resourceGroupName, String maintenanceWindowName) { + return getByResourceGroupWithResponse(resourceGroupName, maintenanceWindowName, Context.NONE).getValue(); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String maintenanceWindowName, MaintenanceWindowResourceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (maintenanceWindowName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, maintenanceWindowName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String maintenanceWindowName, MaintenanceWindowResourceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (maintenanceWindowName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, maintenanceWindowName, contentType, accept, resource, + context); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a maintenance window is a resource-group-scoped resource that + * defines a reusable maintenance schedule which can be linked to maintenance configurations on one or more managed + * clusters. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MaintenanceWindowResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String maintenanceWindowName, + MaintenanceWindowResourceInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, maintenanceWindowName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MaintenanceWindowResourceInner.class, MaintenanceWindowResourceInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a maintenance window is a resource-group-scoped resource that + * defines a reusable maintenance schedule which can be linked to maintenance configurations on one or more managed + * clusters. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MaintenanceWindowResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String maintenanceWindowName, + MaintenanceWindowResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, maintenanceWindowName, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MaintenanceWindowResourceInner.class, MaintenanceWindowResourceInner.class, + context); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a maintenance window is a resource-group-scoped resource that + * defines a reusable maintenance schedule which can be linked to maintenance configurations on one or more managed + * clusters. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MaintenanceWindowResourceInner> beginCreateOrUpdate( + String resourceGroupName, String maintenanceWindowName, MaintenanceWindowResourceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, maintenanceWindowName, resource).getSyncPoller(); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a maintenance window is a resource-group-scoped resource that + * defines a reusable maintenance schedule which can be linked to maintenance configurations on one or more managed + * clusters. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MaintenanceWindowResourceInner> beginCreateOrUpdate( + String resourceGroupName, String maintenanceWindowName, MaintenanceWindowResourceInner resource, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, maintenanceWindowName, resource, context) + .getSyncPoller(); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, + String maintenanceWindowName, MaintenanceWindowResourceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, maintenanceWindowName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String maintenanceWindowName, MaintenanceWindowResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, maintenanceWindowName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceWindowResourceInner createOrUpdate(String resourceGroupName, String maintenanceWindowName, + MaintenanceWindowResourceInner resource) { + return createOrUpdateAsync(resourceGroupName, maintenanceWindowName, resource).block(); + } + + /** + * Creates or updates a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param resource The maintenance window to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceWindowResourceInner createOrUpdate(String resourceGroupName, String maintenanceWindowName, + MaintenanceWindowResourceInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, maintenanceWindowName, resource, context).block(); + } + + /** + * Updates tags on a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param properties Parameters supplied to the Update maintenance window Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateTagsWithResponseAsync(String resourceGroupName, + String maintenanceWindowName, TagsObject properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (maintenanceWindowName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, maintenanceWindowName, contentType, accept, + properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param properties Parameters supplied to the Update maintenance window Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String maintenanceWindowName, TagsObject properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (maintenanceWindowName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, maintenanceWindowName, contentType, accept, properties, + context); + } + + /** + * Updates tags on a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param properties Parameters supplied to the Update maintenance window Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTagsAsync(String resourceGroupName, String maintenanceWindowName, + TagsObject properties) { + return updateTagsWithResponseAsync(resourceGroupName, maintenanceWindowName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates tags on a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param properties Parameters supplied to the Update maintenance window Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, + String maintenanceWindowName, TagsObject properties, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, maintenanceWindowName, properties, context).block(); + } + + /** + * Updates tags on a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param properties Parameters supplied to the Update maintenance window Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a maintenance window is a resource-group-scoped resource that defines a reusable maintenance schedule + * which can be linked to maintenance configurations on one or more managed clusters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceWindowResourceInner updateTags(String resourceGroupName, String maintenanceWindowName, + TagsObject properties) { + return updateTagsWithResponse(resourceGroupName, maintenanceWindowName, properties, Context.NONE).getValue(); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String maintenanceWindowName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (maintenanceWindowName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, maintenanceWindowName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String maintenanceWindowName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (maintenanceWindowName == null) { + return Mono + .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, maintenanceWindowName, context); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String maintenanceWindowName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, maintenanceWindowName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String maintenanceWindowName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, maintenanceWindowName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String maintenanceWindowName) { + return this.beginDeleteAsync(resourceGroupName, maintenanceWindowName).getSyncPoller(); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String maintenanceWindowName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, maintenanceWindowName, context).getSyncPoller(); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String maintenanceWindowName) { + return beginDeleteAsync(resourceGroupName, maintenanceWindowName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String maintenanceWindowName, Context context) { + return beginDeleteAsync(resourceGroupName, maintenanceWindowName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String maintenanceWindowName) { + deleteAsync(resourceGroupName, maintenanceWindowName).block(); + } + + /** + * Deletes a maintenance window. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param maintenanceWindowName The name of the maintenance window. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String maintenanceWindowName, Context context) { + deleteAsync(resourceGroupName, maintenanceWindowName, context).block(); + } + + /** + * Lists maintenance windows in the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists maintenance windows in the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists maintenance windows in the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists maintenance windows in the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists maintenance windows in the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists maintenance windows in the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Lists maintenance windows in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists maintenance windows in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists maintenance windows in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists maintenance windows in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists maintenance windows in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists maintenance windows in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceWindowResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java new file mode 100644 index 000000000000..a9b71c874a99 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java @@ -0,0 +1,1000 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.ManagedClusterSnapshotsClient; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservice.implementation.models.ManagedClusterSnapshotListResult; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. + */ +public final class ManagedClusterSnapshotsClientImpl implements InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete, ManagedClusterSnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedClusterSnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ManagedClusterSnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedClusterSnapshotsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(ManagedClusterSnapshotsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientManagedClusterSnapshots to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientManagedClusterSnapshots") + public interface ManagedClusterSnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedClusterSnapshotInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TagsObject parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, + TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, context); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java index cd85ea20602b..489f80f81819 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java @@ -35,22 +35,29 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; +import com.azure.resourcemanager.containerservice.implementation.models.GuardrailsAvailableVersionsList; import com.azure.resourcemanager.containerservice.implementation.models.ManagedClusterListResult; import com.azure.resourcemanager.containerservice.implementation.models.MeshRevisionProfileList; import com.azure.resourcemanager.containerservice.implementation.models.MeshUpgradeProfileList; +import com.azure.resourcemanager.containerservice.implementation.models.NodeImageVersionsListResult; import com.azure.resourcemanager.containerservice.implementation.models.OutboundEnvironmentEndpointCollection; +import com.azure.resourcemanager.containerservice.implementation.models.SafeguardsAvailableVersionsList; import com.azure.resourcemanager.containerservice.models.Format; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -129,7 +136,8 @@ Mono>> updateTags(@HostParam("endpoint") String endpoi Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("if-match") String ifMatch, Context context); + @HeaderParam("if-match") String ifMatch, + @QueryParam("ignore-pod-disruption-budget") Boolean ignorePodDisruptionBudget, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters") @@ -279,6 +287,16 @@ Mono> listOutboundNetworkDepende @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rebalanceLoadBalancers(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RebalanceLoadBalancersRequestBody parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default") @ExpectedResponses({ 200 }) @@ -288,6 +306,40 @@ Mono> getUpgradeProfile(@HostParam(" @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getGuardrailsVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGuardrailsVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSafeguardsVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSafeguardsVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}") @ExpectedResponses({ 200 }) @@ -331,6 +383,14 @@ Mono> listKubernetesVersions(@HostPar @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/nodeImageVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNodeImageVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -355,6 +415,22 @@ Mono> listOutboundNetworkDepende @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGuardrailsVersionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSafeguardsVersionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -370,6 +446,14 @@ Mono> listMeshRevisionProfilesNext( Mono> listMeshUpgradeProfilesNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNodeImageVersionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -1083,6 +1167,8 @@ public ManagedClusterInner updateTags(String resourceGroupName, String resourceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1090,7 +1176,7 @@ public ManagedClusterInner updateTags(String resourceGroupName, String resourceN */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch) { + String ifMatch, Boolean ignorePodDisruptionBudget) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1108,7 +1194,8 @@ public Mono>> deleteWithResponseAsync(String resourceG } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, context)) + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1118,6 +1205,8 @@ public Mono>> deleteWithResponseAsync(String resourceG * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1126,7 +1215,7 @@ public Mono>> deleteWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { + String ifMatch, Boolean ignorePodDisruptionBudget, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1144,7 +1233,7 @@ private Mono>> deleteWithResponseAsync(String resource } context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, ifMatch, context); + resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context); } /** @@ -1153,6 +1242,8 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1160,8 +1251,9 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + String ifMatch, Boolean ignorePodDisruptionBudget) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -1179,7 +1271,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + final Boolean ignorePodDisruptionBudget = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -1190,6 +1284,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1198,10 +1294,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { + String ifMatch, Boolean ignorePodDisruptionBudget, Context context) { context = this.client.mergeContext(context); Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, context); + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -1219,7 +1315,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { final String ifMatch = null; - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch).getSyncPoller(); + final Boolean ignorePodDisruptionBudget = null; + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget) + .getSyncPoller(); } /** @@ -1228,6 +1326,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1236,8 +1336,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).getSyncPoller(); + Boolean ignorePodDisruptionBudget, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context) + .getSyncPoller(); } /** @@ -1246,14 +1347,17 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() + public Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1270,7 +1374,8 @@ public Mono deleteAsync(String resourceGroupName, String resourceName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() + final Boolean ignorePodDisruptionBudget = null; + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1280,6 +1385,8 @@ public Mono deleteAsync(String resourceGroupName, String resourceName) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1287,8 +1394,9 @@ public Mono deleteAsync(String resourceGroupName, String resourceName) { * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).last() + private Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1304,7 +1412,8 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String resourceName) { final String ifMatch = null; - deleteAsync(resourceGroupName, resourceName, ifMatch).block(); + final Boolean ignorePodDisruptionBudget = null; + deleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).block(); } /** @@ -1313,14 +1422,17 @@ public void delete(String resourceGroupName, String resourceName) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String ifMatch, Context context) { - deleteAsync(resourceGroupName, resourceName, ifMatch, context).block(); + public void delete(String resourceGroupName, String resourceName, String ifMatch, Boolean ignorePodDisruptionBudget, + Context context) { + deleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context).block(); } /** @@ -4381,19 +4493,20 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName) { + public Mono>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4409,28 +4522,35 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .withContext( + context -> service.rebalanceLoadBalancers(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName, Context context) { + private Mono>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4446,80 +4566,187 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; context = this.client.mergeContext(context); - return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return service.rebalanceLoadBalancers(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, parameters, context); } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUpgradeProfileAsync(String resourceGroupName, - String resourceName) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters) { + Mono>> mono + = rebalanceLoadBalancersWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response}. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = rebalanceLoadBalancersWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters) { + return this.beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context) { + return this.beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context) + .getSyncPoller(); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, Context context) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); + public Mono rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters) { + return beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { - return getUpgradeProfileWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + private Mono rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context) { + return beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. + * Rebalance nodes across specific load balancers. * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters) { + rebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Rebalance nodes across specific load balancers. * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a mesh revision profile for a specified mesh in the specified location. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context) { + rebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Gets the upgrade profile of a managed cluster. * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades along with {@link Response} on successful completion of {@link Mono}. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMeshRevisionProfileWithResponseAsync(String location, - String mode) { + public Mono> + getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4528,39 +4755,35 @@ public Mono> getMeshRevisionProfileWithRespon return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), location, mode, accept, context)) + .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Gets the upgrade profile of a managed cluster. * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades along with {@link Response} on successful completion of {@link Mono}. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMeshRevisionProfileWithResponseAsync(String location, - String mode, Context context) { + private Mono> + getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4569,23 +4792,743 @@ private Mono> getMeshRevisionProfileWithRespo return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getMeshRevisionProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, mode, accept, context); + return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getUpgradeProfileAsync(String resourceGroupName, + String resourceName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { + return getUpgradeProfileWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getGuardrailsVersionsWithResponseAsync(String location, + String version) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getGuardrailsVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, version, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getGuardrailsVersionsWithResponseAsync(String location, + String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getGuardrailsVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, version, accept, context); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getGuardrailsVersionsAsync(String location, String version) { + return getGuardrailsVersionsWithResponseAsync(location, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getGuardrailsVersionsWithResponse(String location, String version, + Context context) { + return getGuardrailsVersionsWithResponseAsync(location, version, context).block(); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version) { + return getGuardrailsVersionsWithResponse(location, version, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listGuardrailsVersionsSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listGuardrailsVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGuardrailsVersionsSinglePageAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listGuardrailsVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listGuardrailsVersionsAsync(String location) { + return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location), + nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGuardrailsVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location, context), + nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGuardrailsVersions(String location) { + return new PagedIterable<>(listGuardrailsVersionsAsync(location)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGuardrailsVersions(String location, Context context) { + return new PagedIterable<>(listGuardrailsVersionsAsync(location, context)); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSafeguardsVersionsWithResponseAsync(String location, + String version) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getSafeguardsVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, version, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSafeguardsVersionsWithResponseAsync(String location, + String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getSafeguardsVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, version, accept, context); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSafeguardsVersionsAsync(String location, String version) { + return getSafeguardsVersionsWithResponseAsync(location, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSafeguardsVersionsWithResponse(String location, String version, + Context context) { + return getSafeguardsVersionsWithResponseAsync(location, version, context).block(); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version) { + return getSafeguardsVersionsWithResponse(location, version, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSafeguardsVersionsSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSafeguardsVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSafeguardsVersionsSinglePageAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSafeguardsVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSafeguardsVersionsAsync(String location) { + return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location), + nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSafeguardsVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location, context), + nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSafeguardsVersions(String location) { + return new PagedIterable<>(listSafeguardsVersionsAsync(location)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSafeguardsVersions(String location, Context context) { + return new PagedIterable<>(listSafeguardsVersionsAsync(location, context)); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMeshRevisionProfileWithResponseAsync(String location, + String mode) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, mode, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMeshRevisionProfileWithResponseAsync(String location, + String mode, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getMeshRevisionProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, mode, accept, context); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. * @param mode The mode of the mesh. @@ -5053,20 +5996,133 @@ public PagedIterable listMeshUpgradeProfiles(String res } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKubernetesVersionsWithResponseAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKubernetesVersionsWithResponseAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listKubernetesVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKubernetesVersionsAsync(String location) { + return listKubernetesVersionsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKubernetesVersionsWithResponse(String location, Context context) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); + return listKubernetesVersionsWithResponseAsync(location, context).block(); } /** @@ -5082,10 +6138,31 @@ public PagedIterable listMeshUpgradeProfiles(String res * @return a list of supported Kubernetes versions in the specified subscription. * * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. + * details on preview status of the version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listKubernetesVersionsWithResponseAsync(String location) { + public KubernetesVersionListResultInner listKubernetesVersions(String location) { + return listKubernetesVersionsWithResponse(location, Context.NONE).getValue(); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNodeImageVersionsSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5099,29 +6176,32 @@ public Mono> listKubernetesVersionsWi } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), + .withContext(context -> service.listNodeImageVersions(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. + * Gets a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported Kubernetes versions in the specified subscription. + * @return a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. + * Only returns the latest version of each node image along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKubernetesVersionsWithResponseAsync(String location, + private Mono> listNodeImageVersionsSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -5136,70 +6216,95 @@ private Mono> listKubernetesVersionsW } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listKubernetesVersions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context); + return service + .listNodeImageVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. + * Gets a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported Kubernetes versions in the specified subscription. + * @return a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version on successful completion of {@link Mono}. + * Only returns the latest version of each node image as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listKubernetesVersionsAsync(String location) { - return listKubernetesVersionsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listNodeImageVersionsAsync(String location) { + return new PagedFlux<>(() -> listNodeImageVersionsSinglePageAsync(location), + nextLink -> listNodeImageVersionsNextSinglePageAsync(nextLink)); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. + * Gets a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported Kubernetes versions in the specified subscription. + * @return a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version along with {@link Response}. + * Only returns the latest version of each node image as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKubernetesVersionsWithResponse(String location, - Context context) { - return listKubernetesVersionsWithResponseAsync(location, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listNodeImageVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listNodeImageVersionsSinglePageAsync(location, context), + nextLink -> listNodeImageVersionsNextSinglePageAsync(nextLink, context)); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. + * Gets a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported Kubernetes versions in the specified subscription. + * @return a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesVersionListResultInner listKubernetesVersions(String location) { - return listKubernetesVersionsWithResponse(location, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNodeImageVersions(String location) { + return new PagedIterable<>(listNodeImageVersionsAsync(location)); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNodeImageVersions(String location, Context context) { + return new PagedIterable<>(listNodeImageVersionsAsync(location, context)); } /** @@ -5381,6 +6486,136 @@ private Mono> listNextSinglePageAsync(String res.getValue().value(), res.getValue().nextLink(), null)); } + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listGuardrailsVersionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listGuardrailsVersionsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSafeguardsVersionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSafeguardsVersionsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + /** * Lists mesh revision profiles for all meshes in the specified location. * @@ -5496,4 +6731,68 @@ private Mono> listMeshUpgradeProfilesNext .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNodeImageVersionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listNodeImageVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNodeImageVersionsNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNodeImageVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java new file mode 100644 index 000000000000..49a4f5a67f1d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java @@ -0,0 +1,937 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.MeshMembershipsClient; +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import com.azure.resourcemanager.containerservice.implementation.models.MeshMembershipsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MeshMembershipsClient. + */ +public final class MeshMembershipsClientImpl implements MeshMembershipsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MeshMembershipsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of MeshMembershipsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MeshMembershipsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(MeshMembershipsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientMeshMemberships to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientMeshMemberships") + public interface MeshMembershipsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("meshMembershipName") String meshMembershipName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("meshMembershipName") String meshMembershipName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MeshMembershipInner parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("meshMembershipName") String meshMembershipName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, meshMembershipName, accept, context); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + return getWithResponseAsync(resourceGroupName, resourceName, meshMembershipName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, context).block(); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshMembershipInner get(String resourceGroupName, String resourceName, String meshMembershipName) { + return getWithResponse(resourceGroupName, resourceName, meshMembershipName, Context.NONE).getValue(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, contentType, + accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, contentType, accept, + parameters, context); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MeshMembershipInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MeshMembershipInner.class, MeshMembershipInner.class, this.client.getContext()); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MeshMembershipInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MeshMembershipInner.class, MeshMembershipInner.class, context); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MeshMembershipInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MeshMembershipInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters).block(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context).block(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, meshMembershipName, context); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, meshMembershipName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName).getSyncPoller(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName, context).getSyncPoller(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName) { + return beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String meshMembershipName) { + deleteAsync(resourceGroupName, resourceName, meshMembershipName).block(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String meshMembershipName, Context context) { + deleteAsync(resourceGroupName, resourceName, meshMembershipName, context).block(); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java new file mode 100644 index 000000000000..80002ee58217 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java @@ -0,0 +1,838 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.OperationStatusResultsClient; +import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.containerservice.implementation.models.OperationStatusResultList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. + */ +public final class OperationStatusResultsClientImpl implements OperationStatusResultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationStatusResultsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OperationStatusResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationStatusResultsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(OperationStatusResultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientOperationStatusResults to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientOperationStatusResults") + public interface OperationStatusResultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByAgentPool(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @QueryParam("activeOnly") Boolean activeOnly, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByAgentPool(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByAgentPoolNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param activeOnly If true, only return operations that are currently active (not terminal). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentPoolSinglePageAsync(String resourceGroupName, + String resourceName, String agentPoolName, Boolean activeOnly) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByAgentPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, activeOnly, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param activeOnly If true, only return operations that are currently active (not terminal). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentPoolSinglePageAsync(String resourceGroupName, + String resourceName, String agentPoolName, Boolean activeOnly, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByAgentPool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, agentPoolName, activeOnly, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param activeOnly If true, only return operations that are currently active (not terminal). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, Boolean activeOnly) { + return new PagedFlux<>( + () -> listByAgentPoolSinglePageAsync(resourceGroupName, resourceName, agentPoolName, activeOnly), + nextLink -> listByAgentPoolNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + final Boolean activeOnly = null; + return new PagedFlux<>( + () -> listByAgentPoolSinglePageAsync(resourceGroupName, resourceName, agentPoolName, activeOnly), + nextLink -> listByAgentPoolNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param activeOnly If true, only return operations that are currently active (not terminal). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, Boolean activeOnly, Context context) { + return new PagedFlux<>( + () -> listByAgentPoolSinglePageAsync(resourceGroupName, resourceName, agentPoolName, activeOnly, context), + nextLink -> listByAgentPoolNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgentPool(String resourceGroupName, String resourceName, + String agentPoolName) { + final Boolean activeOnly = null; + return new PagedIterable<>(listByAgentPoolAsync(resourceGroupName, resourceName, agentPoolName, activeOnly)); + } + + /** + * Gets a list of operations in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param activeOnly If true, only return operations that are currently active (not terminal). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgentPool(String resourceGroupName, String resourceName, + String agentPoolName, Boolean activeOnly, Context context) { + return new PagedIterable<>( + listByAgentPoolAsync(resourceGroupName, resourceName, agentPoolName, activeOnly, context)); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByAgentPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, operationId, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByAgentPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, operationId, accept, + context); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, String operationId) { + return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByAgentPoolWithResponse(String resourceGroupName, + String resourceName, String agentPoolName, String operationId, Context context) { + return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId, context) + .block(); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, + String agentPoolName, String operationId) { + return getByAgentPoolWithResponse(resourceGroupName, resourceName, agentPoolName, operationId, Context.NONE) + .getValue(); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, operationId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, operationId, accept, context); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String operationId) { + return getWithResponseAsync(resourceGroupName, resourceName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String operationId, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, operationId, context).block(); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId) { + return getWithResponse(resourceGroupName, resourceName, operationId, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentPoolNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByAgentPoolNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified agent pool along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentPoolNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByAgentPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/VmSkusClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/VmSkusClientImpl.java new file mode 100644 index 000000000000..16cc1f0d4250 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/VmSkusClientImpl.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.VmSkusClient; +import com.azure.resourcemanager.containerservice.fluent.models.ResourceSkuInner; +import com.azure.resourcemanager.containerservice.implementation.models.VmSkusListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in VmSkusClient. + */ +public final class VmSkusClientImpl implements VmSkusClient { + /** + * The proxy service used to perform REST calls. + */ + private final VmSkusService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of VmSkusClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VmSkusClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(VmSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientVmSkus to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientVmSkus") + public interface VmSkusService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/vmSkus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("includeExtendedLocations") Boolean includeExtendedLocations, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, + Boolean includeExtendedLocations) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, includeExtendedLocations, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, Boolean includeExtendedLocations, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, + includeExtendedLocations, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String location, Boolean includeExtendedLocations) { + return new PagedFlux<>(() -> listSinglePageAsync(location, includeExtendedLocations), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String location) { + final Boolean includeExtendedLocations = null; + return new PagedFlux<>(() -> listSinglePageAsync(location, includeExtendedLocations), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Boolean includeExtendedLocations, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(location, includeExtendedLocations, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + final Boolean includeExtendedLocations = null; + return new PagedIterable<>(listAsync(location, includeExtendedLocations)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Boolean includeExtendedLocations, Context context) { + return new PagedIterable<>(listAsync(location, includeExtendedLocations, context)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AlertConfigurationListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AlertConfigurationListResult.java new file mode 100644 index 000000000000..026f4931f48f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AlertConfigurationListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.AlertConfigurationInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a AlertConfiguration list operation. + */ +@Immutable +public final class AlertConfigurationListResult implements JsonSerializable { + /* + * The AlertConfiguration items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of AlertConfigurationListResult class. + */ + private AlertConfigurationListResult() { + } + + /** + * Get the value property: The AlertConfiguration items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model AlertConfigurationListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AlertConfigurationListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AlertConfigurationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AlertConfigurationListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AlertConfigurationListResult. + */ + public static AlertConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AlertConfigurationListResult deserializedAlertConfigurationListResult = new AlertConfigurationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AlertConfigurationInner.fromJson(reader1)); + deserializedAlertConfigurationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAlertConfigurationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAlertConfigurationListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/GuardrailsAvailableVersionsList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/GuardrailsAvailableVersionsList.java new file mode 100644 index 000000000000..67284e004857 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/GuardrailsAvailableVersionsList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Hold values properties, which is array of GuardrailsVersions. + */ +@Immutable +public final class GuardrailsAvailableVersionsList implements JsonSerializable { + /* + * The GuardrailsAvailableVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of GuardrailsAvailableVersionsList class. + */ + private GuardrailsAvailableVersionsList() { + } + + /** + * Get the value property: The GuardrailsAvailableVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model GuardrailsAvailableVersionsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GuardrailsAvailableVersionsList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuardrailsAvailableVersionsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuardrailsAvailableVersionsList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionsList. + */ + public static GuardrailsAvailableVersionsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuardrailsAvailableVersionsList deserializedGuardrailsAvailableVersionsList + = new GuardrailsAvailableVersionsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> GuardrailsAvailableVersionInner.fromJson(reader1)); + deserializedGuardrailsAvailableVersionsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGuardrailsAvailableVersionsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGuardrailsAvailableVersionsList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/JWTAuthenticatorListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/JWTAuthenticatorListResult.java new file mode 100644 index 000000000000..accd2113e84e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/JWTAuthenticatorListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.JWTAuthenticatorInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a JWTAuthenticator list operation. + */ +@Immutable +public final class JWTAuthenticatorListResult implements JsonSerializable { + /* + * The JWTAuthenticator items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of JWTAuthenticatorListResult class. + */ + private JWTAuthenticatorListResult() { + } + + /** + * Get the value property: The JWTAuthenticator items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model JWTAuthenticatorListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorListResult. + */ + public static JWTAuthenticatorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorListResult deserializedJWTAuthenticatorListResult = new JWTAuthenticatorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> JWTAuthenticatorInner.fromJson(reader1)); + deserializedJWTAuthenticatorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJWTAuthenticatorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/LoadBalancerListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/LoadBalancerListResult.java new file mode 100644 index 000000000000..b430434b4774 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/LoadBalancerListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a LoadBalancer list operation. + */ +@Immutable +public final class LoadBalancerListResult implements JsonSerializable { + /* + * The LoadBalancer items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of LoadBalancerListResult class. + */ + private LoadBalancerListResult() { + } + + /** + * Get the value property: The LoadBalancer items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model LoadBalancerListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LoadBalancerListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerListResult. + */ + public static LoadBalancerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerListResult deserializedLoadBalancerListResult = new LoadBalancerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> LoadBalancerInner.fromJson(reader1)); + deserializedLoadBalancerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLoadBalancerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceWindowResourceListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceWindowResourceListResult.java new file mode 100644 index 000000000000..c50d31505227 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceWindowResourceListResult.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceWindowResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a MaintenanceWindowResource list operation. + */ +@Immutable +public final class MaintenanceWindowResourceListResult + implements JsonSerializable { + /* + * The MaintenanceWindowResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of MaintenanceWindowResourceListResult class. + */ + private MaintenanceWindowResourceListResult() { + } + + /** + * Get the value property: The MaintenanceWindowResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model MaintenanceWindowResourceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceWindowResourceListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowResourceListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceWindowResourceListResult. + */ + public static MaintenanceWindowResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowResourceListResult deserializedMaintenanceWindowResourceListResult + = new MaintenanceWindowResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MaintenanceWindowResourceInner.fromJson(reader1)); + deserializedMaintenanceWindowResourceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMaintenanceWindowResourceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowResourceListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterSnapshotListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterSnapshotListResult.java new file mode 100644 index 000000000000..dfb3d9174e49 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterSnapshotListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ManagedClusterSnapshot list operation. + */ +@Immutable +public final class ManagedClusterSnapshotListResult implements JsonSerializable { + /* + * The ManagedClusterSnapshot items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ManagedClusterSnapshotListResult class. + */ + private ManagedClusterSnapshotListResult() { + } + + /** + * Get the value property: The ManagedClusterSnapshot items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ManagedClusterSnapshotListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterSnapshotListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSnapshotListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSnapshotListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedClusterSnapshotListResult. + */ + public static ManagedClusterSnapshotListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSnapshotListResult deserializedManagedClusterSnapshotListResult + = new ManagedClusterSnapshotListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedClusterSnapshotInner.fromJson(reader1)); + deserializedManagedClusterSnapshotListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedClusterSnapshotListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSnapshotListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshMembershipsListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshMembershipsListResult.java new file mode 100644 index 000000000000..b2a16df0fdf6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshMembershipsListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list mesh memberships in a managed cluster. + */ +@Immutable +public final class MeshMembershipsListResult implements JsonSerializable { + /* + * The list of mesh memberships. + */ + private List value; + + /* + * The URL to get the next set of mesh membership results. + */ + private String nextLink; + + /** + * Creates an instance of MeshMembershipsListResult class. + */ + private MeshMembershipsListResult() { + } + + /** + * Get the value property: The list of mesh memberships. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URL to get the next set of mesh membership results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model MeshMembershipsListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MeshMembershipsListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipsListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MeshMembershipsListResult. + */ + public static MeshMembershipsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipsListResult deserializedMeshMembershipsListResult = new MeshMembershipsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MeshMembershipInner.fromJson(reader1)); + deserializedMeshMembershipsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMeshMembershipsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipsListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/NodeImageVersionsListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/NodeImageVersionsListResult.java new file mode 100644 index 000000000000..ac867ee39124 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/NodeImageVersionsListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Holds an array NodeImageVersions. + */ +@Immutable +public final class NodeImageVersionsListResult implements JsonSerializable { + /* + * The NodeImageVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NodeImageVersionsListResult class. + */ + private NodeImageVersionsListResult() { + } + + /** + * Get the value property: The NodeImageVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model NodeImageVersionsListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NodeImageVersionsListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeImageVersionsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeImageVersionsListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NodeImageVersionsListResult. + */ + public static NodeImageVersionsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeImageVersionsListResult deserializedNodeImageVersionsListResult = new NodeImageVersionsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NodeImageVersionInner.fromJson(reader1)); + deserializedNodeImageVersionsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNodeImageVersionsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeImageVersionsListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationStatusResultList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationStatusResultList.java new file mode 100644 index 000000000000..4fe8ca992b84 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationStatusResultList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; +import java.io.IOException; +import java.util.List; + +/** + * The operations list. It contains an URL link to get the next set of results. + */ +@Immutable +public final class OperationStatusResultList implements JsonSerializable { + /* + * The OperationStatusResult items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of OperationStatusResultList class. + */ + private OperationStatusResultList() { + } + + /** + * Get the value property: The OperationStatusResult items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model OperationStatusResultList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatusResultList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResultList if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStatusResultList. + */ + public static OperationStatusResultList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResultList deserializedOperationStatusResultList = new OperationStatusResultList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedOperationStatusResultList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationStatusResultList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResultList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SafeguardsAvailableVersionsList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SafeguardsAvailableVersionsList.java new file mode 100644 index 000000000000..11aeae71b7c1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SafeguardsAvailableVersionsList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Hold values properties, which is array of SafeguardsVersions. + */ +@Immutable +public final class SafeguardsAvailableVersionsList implements JsonSerializable { + /* + * The SafeguardsAvailableVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of SafeguardsAvailableVersionsList class. + */ + private SafeguardsAvailableVersionsList() { + } + + /** + * Get the value property: The SafeguardsAvailableVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model SafeguardsAvailableVersionsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SafeguardsAvailableVersionsList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SafeguardsAvailableVersionsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SafeguardsAvailableVersionsList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionsList. + */ + public static SafeguardsAvailableVersionsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SafeguardsAvailableVersionsList deserializedSafeguardsAvailableVersionsList + = new SafeguardsAvailableVersionsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SafeguardsAvailableVersionInner.fromJson(reader1)); + deserializedSafeguardsAvailableVersionsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSafeguardsAvailableVersionsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSafeguardsAvailableVersionsList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/VmSkusListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/VmSkusListResult.java new file mode 100644 index 000000000000..d4a44608a95e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/VmSkusListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.ResourceSkuInner; +import java.io.IOException; +import java.util.List; + +/** + * The List Resource Skus operation response. + */ +@Immutable +public final class VmSkusListResult implements JsonSerializable { + /* + * The ResourceSku items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of VmSkusListResult class. + */ + private VmSkusListResult() { + } + + /** + * Get the value property: The ResourceSku items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model VmSkusListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VmSkusListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VmSkusListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VmSkusListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VmSkusListResult. + */ + public static VmSkusListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VmSkusListResult deserializedVmSkusListResult = new VmSkusListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ResourceSkuInner.fromJson(reader1)); + deserializedVmSkusListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVmSkusListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVmSkusListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java new file mode 100644 index 000000000000..8a0059faf37c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + */ +public final class AddonAutoscaling extends ExpandableStringEnum { + /** + * Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial mode. + */ + public static final AddonAutoscaling ENABLED = fromString("Enabled"); + + /** + * Feature to autoscale AKS-managed add-ons is disabled. + */ + public static final AddonAutoscaling DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AddonAutoscaling value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AddonAutoscaling() { + } + + /** + * Creates or finds a AddonAutoscaling from its string representation. + * + * @param name a name to look for. + * @return the corresponding AddonAutoscaling. + */ + public static AddonAutoscaling fromString(String name) { + return fromString(name, AddonAutoscaling.class); + } + + /** + * Gets known AddonAutoscaling values. + * + * @return known AddonAutoscaling values. + */ + public static Collection values() { + return values(AddonAutoscaling.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java new file mode 100644 index 000000000000..27c951e6e74c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings for blue-green upgrade on an agentpool. + */ +@Fluent +public final class AgentPoolBlueGreenUpgradeSettings implements JsonSerializable { + /* + * The number or percentage of nodes to drain in batch during blue-green upgrade. Must be a non-zero number. This + * can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the + * percentage of the total number of blue nodes of the initial upgrade operation. For percentages, fractional nodes + * are rounded up. If not specified, the default is 10%. For more information, including best practices, see: + * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + */ + private String drainBatchSize; + + /* + * The drain timeout for a node, i.e., the amount of time (in minutes) to wait on eviction of pods and graceful + * termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, + * the upgrade fails. If not specified, the default is 30 minutes. + */ + private Integer drainTimeoutInMinutes; + + /* + * The soak duration after draining a batch of nodes, i.e., the amount of time (in minutes) to wait after draining a + * batch of nodes before moving on the next batch. If not specified, the default is 15 minutes. + */ + private Integer batchSoakDurationInMinutes; + + /* + * The soak duration for a node pool, i.e., the amount of time (in minutes) to wait after all old nodes are drained + * before we remove the old nodes. If not specified, the default is 60 minutes. Only applicable for blue-green + * upgrade strategy. + */ + private Integer finalSoakDurationInMinutes; + + /** + * Creates an instance of AgentPoolBlueGreenUpgradeSettings class. + */ + public AgentPoolBlueGreenUpgradeSettings() { + } + + /** + * Get the drainBatchSize property: The number or percentage of nodes to drain in batch during blue-green upgrade. + * Must be a non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a + * percentage is specified, it is the percentage of the total number of blue nodes of the initial upgrade operation. + * For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + * including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @return the drainBatchSize value. + */ + public String drainBatchSize() { + return this.drainBatchSize; + } + + /** + * Set the drainBatchSize property: The number or percentage of nodes to drain in batch during blue-green upgrade. + * Must be a non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a + * percentage is specified, it is the percentage of the total number of blue nodes of the initial upgrade operation. + * For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + * including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @param drainBatchSize the drainBatchSize value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withDrainBatchSize(String drainBatchSize) { + this.drainBatchSize = drainBatchSize; + return this; + } + + /** + * Get the drainTimeoutInMinutes property: The drain timeout for a node, i.e., the amount of time (in minutes) to + * wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod + * disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. + * + * @return the drainTimeoutInMinutes value. + */ + public Integer drainTimeoutInMinutes() { + return this.drainTimeoutInMinutes; + } + + /** + * Set the drainTimeoutInMinutes property: The drain timeout for a node, i.e., the amount of time (in minutes) to + * wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod + * disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. + * + * @param drainTimeoutInMinutes the drainTimeoutInMinutes value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withDrainTimeoutInMinutes(Integer drainTimeoutInMinutes) { + this.drainTimeoutInMinutes = drainTimeoutInMinutes; + return this; + } + + /** + * Get the batchSoakDurationInMinutes property: The soak duration after draining a batch of nodes, i.e., the amount + * of time (in minutes) to wait after draining a batch of nodes before moving on the next batch. If not specified, + * the default is 15 minutes. + * + * @return the batchSoakDurationInMinutes value. + */ + public Integer batchSoakDurationInMinutes() { + return this.batchSoakDurationInMinutes; + } + + /** + * Set the batchSoakDurationInMinutes property: The soak duration after draining a batch of nodes, i.e., the amount + * of time (in minutes) to wait after draining a batch of nodes before moving on the next batch. If not specified, + * the default is 15 minutes. + * + * @param batchSoakDurationInMinutes the batchSoakDurationInMinutes value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withBatchSoakDurationInMinutes(Integer batchSoakDurationInMinutes) { + this.batchSoakDurationInMinutes = batchSoakDurationInMinutes; + return this; + } + + /** + * Get the finalSoakDurationInMinutes property: The soak duration for a node pool, i.e., the amount of time (in + * minutes) to wait after all old nodes are drained before we remove the old nodes. If not specified, the default is + * 60 minutes. Only applicable for blue-green upgrade strategy. + * + * @return the finalSoakDurationInMinutes value. + */ + public Integer finalSoakDurationInMinutes() { + return this.finalSoakDurationInMinutes; + } + + /** + * Set the finalSoakDurationInMinutes property: The soak duration for a node pool, i.e., the amount of time (in + * minutes) to wait after all old nodes are drained before we remove the old nodes. If not specified, the default is + * 60 minutes. Only applicable for blue-green upgrade strategy. + * + * @param finalSoakDurationInMinutes the finalSoakDurationInMinutes value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withFinalSoakDurationInMinutes(Integer finalSoakDurationInMinutes) { + this.finalSoakDurationInMinutes = finalSoakDurationInMinutes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("drainBatchSize", this.drainBatchSize); + jsonWriter.writeNumberField("drainTimeoutInMinutes", this.drainTimeoutInMinutes); + jsonWriter.writeNumberField("batchSoakDurationInMinutes", this.batchSoakDurationInMinutes); + jsonWriter.writeNumberField("finalSoakDurationInMinutes", this.finalSoakDurationInMinutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolBlueGreenUpgradeSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolBlueGreenUpgradeSettings if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolBlueGreenUpgradeSettings. + */ + public static AgentPoolBlueGreenUpgradeSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolBlueGreenUpgradeSettings deserializedAgentPoolBlueGreenUpgradeSettings + = new AgentPoolBlueGreenUpgradeSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("drainBatchSize".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.drainBatchSize = reader.getString(); + } else if ("drainTimeoutInMinutes".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.drainTimeoutInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("batchSoakDurationInMinutes".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.batchSoakDurationInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("finalSoakDurationInMinutes".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.finalSoakDurationInMinutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolBlueGreenUpgradeSettings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java index 41ce870f4514..cf33ad8ddfb8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java @@ -30,6 +30,19 @@ public final class AgentPoolMode extends ExpandableStringEnum { */ public static final AgentPoolMode GATEWAY = fromString("Gateway"); + /** + * ManagedSystem is a system pool managed by AKS. The pool scales dynamically according to cluster usage, and has + * additional automated monitoring and healing capabilities. There can only be one ManagedSystem pool, and it is + * recommended to delete all other system pools for the best experience. + */ + public static final AgentPoolMode MANAGED_SYSTEM = fromString("ManagedSystem"); + + /** + * Machines agent pools are dedicated to hosting machines. Only limited operations, such as creation and deletion, + * are allowed at the pool level. Please use the machine APIs to manage the full machine lifecycle. + */ + public static final AgentPoolMode MACHINES = fromString("Machines"); + /** * Creates a new instance of AgentPoolMode value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressConfiguration.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressConfiguration.java new file mode 100644 index 000000000000..cf7b186e68ff --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressConfiguration.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Public IP configuration applied to a secondary NIC on an agent pool. `ipTags` and `publicIPPrefixID` are mutually + * exclusive, matching the primary NIC's behavior. For more information, see https://aka.ms/aks/multi-nic. + */ +@Fluent +public final class AgentPoolNICPublicIPAddressConfiguration + implements JsonSerializable { + /* + * IP version of the public IP provisioned for this NIC. Required: its presence is what enables public IP + * provisioning, so an empty configuration allocates nothing. `IPv4` is the only accepted value. + */ + private AgentPoolNICPublicIPAddressVersion publicIPAddressVersion; + + /* + * IP tags to attach to the public IP allocated for this NIC. Each tag's `ipTagType` must be `FirstPartyUsage`, + * `NetworkDomain`, or `RoutingPreference`. Mutually exclusive with `publicIPPrefixID`. + */ + private List ipTags; + + /* + * The resource ID of a public IP prefix to draw this NIC's public IP from. Mutually exclusive with `ipTags`. + */ + private String publicIPPrefixID; + + /** + * Creates an instance of AgentPoolNICPublicIPAddressConfiguration class. + */ + public AgentPoolNICPublicIPAddressConfiguration() { + } + + /** + * Get the publicIPAddressVersion property: IP version of the public IP provisioned for this NIC. Required: its + * presence is what enables public IP provisioning, so an empty configuration allocates nothing. `IPv4` is the only + * accepted value. + * + * @return the publicIPAddressVersion value. + */ + public AgentPoolNICPublicIPAddressVersion publicIPAddressVersion() { + return this.publicIPAddressVersion; + } + + /** + * Set the publicIPAddressVersion property: IP version of the public IP provisioned for this NIC. Required: its + * presence is what enables public IP provisioning, so an empty configuration allocates nothing. `IPv4` is the only + * accepted value. + * + * @param publicIPAddressVersion the publicIPAddressVersion value to set. + * @return the AgentPoolNICPublicIPAddressConfiguration object itself. + */ + public AgentPoolNICPublicIPAddressConfiguration + withPublicIPAddressVersion(AgentPoolNICPublicIPAddressVersion publicIPAddressVersion) { + this.publicIPAddressVersion = publicIPAddressVersion; + return this; + } + + /** + * Get the ipTags property: IP tags to attach to the public IP allocated for this NIC. Each tag's `ipTagType` must + * be `FirstPartyUsage`, `NetworkDomain`, or `RoutingPreference`. Mutually exclusive with `publicIPPrefixID`. + * + * @return the ipTags value. + */ + public List ipTags() { + return this.ipTags; + } + + /** + * Set the ipTags property: IP tags to attach to the public IP allocated for this NIC. Each tag's `ipTagType` must + * be `FirstPartyUsage`, `NetworkDomain`, or `RoutingPreference`. Mutually exclusive with `publicIPPrefixID`. + * + * @param ipTags the ipTags value to set. + * @return the AgentPoolNICPublicIPAddressConfiguration object itself. + */ + public AgentPoolNICPublicIPAddressConfiguration withIpTags(List ipTags) { + this.ipTags = ipTags; + return this; + } + + /** + * Get the publicIPPrefixID property: The resource ID of a public IP prefix to draw this NIC's public IP from. + * Mutually exclusive with `ipTags`. + * + * @return the publicIPPrefixID value. + */ + public String publicIPPrefixID() { + return this.publicIPPrefixID; + } + + /** + * Set the publicIPPrefixID property: The resource ID of a public IP prefix to draw this NIC's public IP from. + * Mutually exclusive with `ipTags`. + * + * @param publicIPPrefixID the publicIPPrefixID value to set. + * @return the AgentPoolNICPublicIPAddressConfiguration object itself. + */ + public AgentPoolNICPublicIPAddressConfiguration withPublicIPPrefixID(String publicIPPrefixID) { + this.publicIPPrefixID = publicIPPrefixID; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicIPAddressVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property publicIPAddressVersion in model AgentPoolNICPublicIPAddressConfiguration")); + } + if (ipTags() != null) { + ipTags().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPoolNICPublicIPAddressConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicIPAddressVersion", + this.publicIPAddressVersion == null ? null : this.publicIPAddressVersion.toString()); + jsonWriter.writeArrayField("ipTags", this.ipTags, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("publicIPPrefixID", this.publicIPPrefixID); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolNICPublicIPAddressConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolNICPublicIPAddressConfiguration if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AgentPoolNICPublicIPAddressConfiguration. + */ + public static AgentPoolNICPublicIPAddressConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolNICPublicIPAddressConfiguration deserializedAgentPoolNICPublicIPAddressConfiguration + = new AgentPoolNICPublicIPAddressConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicIPAddressVersion".equals(fieldName)) { + deserializedAgentPoolNICPublicIPAddressConfiguration.publicIPAddressVersion + = AgentPoolNICPublicIPAddressVersion.fromString(reader.getString()); + } else if ("ipTags".equals(fieldName)) { + List ipTags = reader.readArray(reader1 -> IpTag.fromJson(reader1)); + deserializedAgentPoolNICPublicIPAddressConfiguration.ipTags = ipTags; + } else if ("publicIPPrefixID".equals(fieldName)) { + deserializedAgentPoolNICPublicIPAddressConfiguration.publicIPPrefixID = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolNICPublicIPAddressConfiguration; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressVersion.java new file mode 100644 index 000000000000..7fade016018e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressVersion.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * IP version of the public IP allocated for a secondary NIC. `IPv4` is the only accepted value. + */ +public final class AgentPoolNICPublicIPAddressVersion extends ExpandableStringEnum { + /** + * The public IP allocated for the NIC will be IPv4. + */ + public static final AgentPoolNICPublicIPAddressVersion IPV4 = fromString("IPv4"); + + /** + * Creates a new instance of AgentPoolNICPublicIPAddressVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AgentPoolNICPublicIPAddressVersion() { + } + + /** + * Creates or finds a AgentPoolNICPublicIPAddressVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgentPoolNICPublicIPAddressVersion. + */ + public static AgentPoolNICPublicIPAddressVersion fromString(String name) { + return fromString(name, AgentPoolNICPublicIPAddressVersion.class); + } + + /** + * Gets known AgentPoolNICPublicIPAddressVersion values. + * + * @return known AgentPoolNICPublicIPAddressVersion values. + */ + public static Collection values() { + return values(AgentPoolNICPublicIPAddressVersion.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterface.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterface.java new file mode 100644 index 000000000000..3415d92708b3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterface.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Configuration of a secondary network interface provisioned on each VM instance in the agent pool. For more + * information, see https://aka.ms/aks/multi-nic. + */ +@Fluent +public final class AgentPoolNetworkInterface implements JsonSerializable { + /* + * Type of NIC to be provisioned on the VM. + */ + private AgentPoolNetworkInterfaceType type; + + /* + * The resource ID of the subnet which will be attached to the secondary network interface. Required when `type` is + * `Standard`; must be an empty string (`""`) or omitted when `type` is `Dynamic`. + */ + private String vnetSubnetId; + + /* + * Whether accelerated networking is enabled on this secondary NIC. If omitted, this defaults to true only when the + * agent pool VM SKU supports accelerated networking. Validation will fail if it is enabled on an unsupported SKU or + * NIC configuration. + */ + private Boolean enableAcceleratedNetworking; + + /* + * Public IP configuration for this secondary NIC. Only valid when `type` is `Standard`. Set + * `publicIPAddressVersion` to provision a per-VM instance-level public IP for the NIC, then optionally shape it + * with `ipTags` or `publicIPPrefixID`. If omitted, no public IP is provisioned. Idle timeout is not configurable. + * For more information, see https://aka.ms/aks/multi-nic + */ + private AgentPoolNICPublicIPAddressConfiguration publicIPAddressConfiguration; + + /** + * Creates an instance of AgentPoolNetworkInterface class. + */ + public AgentPoolNetworkInterface() { + } + + /** + * Get the type property: Type of NIC to be provisioned on the VM. + * + * @return the type value. + */ + public AgentPoolNetworkInterfaceType type() { + return this.type; + } + + /** + * Set the type property: Type of NIC to be provisioned on the VM. + * + * @param type the type value to set. + * @return the AgentPoolNetworkInterface object itself. + */ + public AgentPoolNetworkInterface withType(AgentPoolNetworkInterfaceType type) { + this.type = type; + return this; + } + + /** + * Get the vnetSubnetId property: The resource ID of the subnet which will be attached to the secondary network + * interface. Required when `type` is `Standard`; must be an empty string (`""`) or omitted when `type` is + * `Dynamic`. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.vnetSubnetId; + } + + /** + * Set the vnetSubnetId property: The resource ID of the subnet which will be attached to the secondary network + * interface. Required when `type` is `Standard`; must be an empty string (`""`) or omitted when `type` is + * `Dynamic`. + * + * @param vnetSubnetId the vnetSubnetId value to set. + * @return the AgentPoolNetworkInterface object itself. + */ + public AgentPoolNetworkInterface withVnetSubnetId(String vnetSubnetId) { + this.vnetSubnetId = vnetSubnetId; + return this; + } + + /** + * Get the enableAcceleratedNetworking property: Whether accelerated networking is enabled on this secondary NIC. If + * omitted, this defaults to true only when the agent pool VM SKU supports accelerated networking. Validation will + * fail if it is enabled on an unsupported SKU or NIC configuration. + * + * @return the enableAcceleratedNetworking value. + */ + public Boolean enableAcceleratedNetworking() { + return this.enableAcceleratedNetworking; + } + + /** + * Set the enableAcceleratedNetworking property: Whether accelerated networking is enabled on this secondary NIC. If + * omitted, this defaults to true only when the agent pool VM SKU supports accelerated networking. Validation will + * fail if it is enabled on an unsupported SKU or NIC configuration. + * + * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set. + * @return the AgentPoolNetworkInterface object itself. + */ + public AgentPoolNetworkInterface withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking) { + this.enableAcceleratedNetworking = enableAcceleratedNetworking; + return this; + } + + /** + * Get the publicIPAddressConfiguration property: Public IP configuration for this secondary NIC. Only valid when + * `type` is `Standard`. Set `publicIPAddressVersion` to provision a per-VM instance-level public IP for the NIC, + * then optionally shape it with `ipTags` or `publicIPPrefixID`. If omitted, no public IP is provisioned. Idle + * timeout is not configurable. For more information, see https://aka.ms/aks/multi-nic. + * + * @return the publicIPAddressConfiguration value. + */ + public AgentPoolNICPublicIPAddressConfiguration publicIPAddressConfiguration() { + return this.publicIPAddressConfiguration; + } + + /** + * Set the publicIPAddressConfiguration property: Public IP configuration for this secondary NIC. Only valid when + * `type` is `Standard`. Set `publicIPAddressVersion` to provision a per-VM instance-level public IP for the NIC, + * then optionally shape it with `ipTags` or `publicIPPrefixID`. If omitted, no public IP is provisioned. Idle + * timeout is not configurable. For more information, see https://aka.ms/aks/multi-nic. + * + * @param publicIPAddressConfiguration the publicIPAddressConfiguration value to set. + * @return the AgentPoolNetworkInterface object itself. + */ + public AgentPoolNetworkInterface + withPublicIPAddressConfiguration(AgentPoolNICPublicIPAddressConfiguration publicIPAddressConfiguration) { + this.publicIPAddressConfiguration = publicIPAddressConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicIPAddressConfiguration() != null) { + publicIPAddressConfiguration().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("vnetSubnetId", this.vnetSubnetId); + jsonWriter.writeBooleanField("enableAcceleratedNetworking", this.enableAcceleratedNetworking); + jsonWriter.writeJsonField("publicIPAddressConfiguration", this.publicIPAddressConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolNetworkInterface from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolNetworkInterface if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolNetworkInterface. + */ + public static AgentPoolNetworkInterface fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolNetworkInterface deserializedAgentPoolNetworkInterface = new AgentPoolNetworkInterface(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedAgentPoolNetworkInterface.type + = AgentPoolNetworkInterfaceType.fromString(reader.getString()); + } else if ("vnetSubnetId".equals(fieldName)) { + deserializedAgentPoolNetworkInterface.vnetSubnetId = reader.getString(); + } else if ("enableAcceleratedNetworking".equals(fieldName)) { + deserializedAgentPoolNetworkInterface.enableAcceleratedNetworking + = reader.getNullable(JsonReader::getBoolean); + } else if ("publicIPAddressConfiguration".equals(fieldName)) { + deserializedAgentPoolNetworkInterface.publicIPAddressConfiguration + = AgentPoolNICPublicIPAddressConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolNetworkInterface; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterfaceType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterfaceType.java new file mode 100644 index 000000000000..fbb178407c45 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterfaceType.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of network interface to be provisioned on each virtual machine instance. For more information, see + * https://aka.ms/aks/multi-nic. + */ +public final class AgentPoolNetworkInterfaceType extends ExpandableStringEnum { + /** + * A standard network interface programmed with an IP from a specified VNet subnet. Must be used with `vnetSubnetId` + * set in the AgentPoolNetworkInterface. IP address family (IPv4/IPv6/Dual-stack) is determined by the subnet. + */ + public static final AgentPoolNetworkInterfaceType STANDARD = fromString("Standard"); + + /** + * A secondary network interface created without IP configuration or subnet attachment. The interface is provisioned + * in an uninitialized state and the subnet is attached during workload creation. `vnetSubnetId` must be set to an + * empty string (`""`) or omitted. + */ + public static final AgentPoolNetworkInterfaceType DYNAMIC = fromString("Dynamic"); + + /** + * Creates a new instance of AgentPoolNetworkInterfaceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AgentPoolNetworkInterfaceType() { + } + + /** + * Creates or finds a AgentPoolNetworkInterfaceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgentPoolNetworkInterfaceType. + */ + public static AgentPoolNetworkInterfaceType fromString(String name) { + return fromString(name, AgentPoolNetworkInterfaceType.class); + } + + /** + * Gets known AgentPoolNetworkInterfaceType values. + * + * @return known AgentPoolNetworkInterfaceType values. + */ + public static Collection values() { + return values(AgentPoolNetworkInterfaceType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java index 389b056ead31..a9ace22cb55e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java @@ -22,6 +22,15 @@ public final class AgentPoolNetworkProfile implements JsonSerializable nodePublicIpTags; + /* + * The resource IDs of public IP prefixes for node public IPs. At most one IPv4 and one IPv6 prefix may be + * specified. Order does not matter; the RP determines IP version from the referenced resource's + * publicIPAddressVersion. Requires enableNodePublicIP to be true on the agent pool. Mutually exclusive with the + * top-level nodePublicIPPrefixID property. Immutable after node pool creation. To change prefixes, delete and + * recreate the node pool. For more information, see https://aka.ms/aks/ipv6-ilpip + */ + private List nodePublicIPPrefixIDs; + /* * The port ranges that are allowed to access. The specified ranges are allowed to overlap. */ @@ -32,6 +41,17 @@ public final class AgentPoolNetworkProfile implements JsonSerializable applicationSecurityGroups; + /* + * Secondary network interface configurations for each VM in the agent pool. Each entry is a template: one physical + * NIC per entry is provisioned on every VM instance. These interfaces are created at agent pool creation time and + * are immutable. The length of the list must be less than the NIC capacity minus 1 for the VM size of the agent + * pool (AKS manages the primary NIC). For example, a Standard_D8a_v4 VM supports up to 4 NICs, so the maximum + * number of secondary interfaces allowed is 3. For mixed-SKU VM pools the effective capacity is the minimum across + * all SKUs: count(secondaryNetworkInterfaces) + 1 <= min(maxNICs). For more information, see + * https://aka.ms/aks/multi-nic + */ + private List secondaryNetworkInterfaces; + /* * DRANET settings of an agent pool. */ @@ -63,6 +83,34 @@ public AgentPoolNetworkProfile withNodePublicIpTags(List nodePublicIpTags return this; } + /** + * Get the nodePublicIPPrefixIDs property: The resource IDs of public IP prefixes for node public IPs. At most one + * IPv4 and one IPv6 prefix may be specified. Order does not matter; the RP determines IP version from the + * referenced resource's publicIPAddressVersion. Requires enableNodePublicIP to be true on the agent pool. Mutually + * exclusive with the top-level nodePublicIPPrefixID property. Immutable after node pool creation. To change + * prefixes, delete and recreate the node pool. For more information, see https://aka.ms/aks/ipv6-ilpip. + * + * @return the nodePublicIPPrefixIDs value. + */ + public List nodePublicIPPrefixIDs() { + return this.nodePublicIPPrefixIDs; + } + + /** + * Set the nodePublicIPPrefixIDs property: The resource IDs of public IP prefixes for node public IPs. At most one + * IPv4 and one IPv6 prefix may be specified. Order does not matter; the RP determines IP version from the + * referenced resource's publicIPAddressVersion. Requires enableNodePublicIP to be true on the agent pool. Mutually + * exclusive with the top-level nodePublicIPPrefixID property. Immutable after node pool creation. To change + * prefixes, delete and recreate the node pool. For more information, see https://aka.ms/aks/ipv6-ilpip. + * + * @param nodePublicIPPrefixIDs the nodePublicIPPrefixIDs value to set. + * @return the AgentPoolNetworkProfile object itself. + */ + public AgentPoolNetworkProfile withNodePublicIPPrefixIDs(List nodePublicIPPrefixIDs) { + this.nodePublicIPPrefixIDs = nodePublicIPPrefixIDs; + return this; + } + /** * Get the allowedHostPorts property: The port ranges that are allowed to access. The specified ranges are allowed * to overlap. @@ -107,6 +155,39 @@ public AgentPoolNetworkProfile withApplicationSecurityGroups(List applic return this; } + /** + * Get the secondaryNetworkInterfaces property: Secondary network interface configurations for each VM in the agent + * pool. Each entry is a template: one physical NIC per entry is provisioned on every VM instance. These interfaces + * are created at agent pool creation time and are immutable. The length of the list must be less than the NIC + * capacity minus 1 for the VM size of the agent pool (AKS manages the primary NIC). For example, a Standard_D8a_v4 + * VM supports up to 4 NICs, so the maximum number of secondary interfaces allowed is 3. For mixed-SKU VM pools the + * effective capacity is the minimum across all SKUs: count(secondaryNetworkInterfaces) + 1 <= min(maxNICs). For + * more information, see https://aka.ms/aks/multi-nic. + * + * @return the secondaryNetworkInterfaces value. + */ + public List secondaryNetworkInterfaces() { + return this.secondaryNetworkInterfaces; + } + + /** + * Set the secondaryNetworkInterfaces property: Secondary network interface configurations for each VM in the agent + * pool. Each entry is a template: one physical NIC per entry is provisioned on every VM instance. These interfaces + * are created at agent pool creation time and are immutable. The length of the list must be less than the NIC + * capacity minus 1 for the VM size of the agent pool (AKS manages the primary NIC). For example, a Standard_D8a_v4 + * VM supports up to 4 NICs, so the maximum number of secondary interfaces allowed is 3. For mixed-SKU VM pools the + * effective capacity is the minimum across all SKUs: count(secondaryNetworkInterfaces) + 1 <= min(maxNICs). For + * more information, see https://aka.ms/aks/multi-nic. + * + * @param secondaryNetworkInterfaces the secondaryNetworkInterfaces value to set. + * @return the AgentPoolNetworkProfile object itself. + */ + public AgentPoolNetworkProfile + withSecondaryNetworkInterfaces(List secondaryNetworkInterfaces) { + this.secondaryNetworkInterfaces = secondaryNetworkInterfaces; + return this; + } + /** * Get the dranet property: DRANET settings of an agent pool. * @@ -139,6 +220,9 @@ public void validate() { if (allowedHostPorts() != null) { allowedHostPorts().forEach(e -> e.validate()); } + if (secondaryNetworkInterfaces() != null) { + secondaryNetworkInterfaces().forEach(e -> e.validate()); + } if (dranet() != null) { dranet().validate(); } @@ -152,10 +236,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("nodePublicIPTags", this.nodePublicIpTags, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("nodePublicIPPrefixIDs", this.nodePublicIPPrefixIDs, + (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("allowedHostPorts", this.allowedHostPorts, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("applicationSecurityGroups", this.applicationSecurityGroups, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("secondaryNetworkInterfaces", this.secondaryNetworkInterfaces, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("dranet", this.dranet); return jsonWriter.writeEndObject(); } @@ -178,12 +266,19 @@ public static AgentPoolNetworkProfile fromJson(JsonReader jsonReader) throws IOE if ("nodePublicIPTags".equals(fieldName)) { List nodePublicIpTags = reader.readArray(reader1 -> IpTag.fromJson(reader1)); deserializedAgentPoolNetworkProfile.nodePublicIpTags = nodePublicIpTags; + } else if ("nodePublicIPPrefixIDs".equals(fieldName)) { + List nodePublicIPPrefixIDs = reader.readArray(reader1 -> reader1.getString()); + deserializedAgentPoolNetworkProfile.nodePublicIPPrefixIDs = nodePublicIPPrefixIDs; } else if ("allowedHostPorts".equals(fieldName)) { List allowedHostPorts = reader.readArray(reader1 -> PortRange.fromJson(reader1)); deserializedAgentPoolNetworkProfile.allowedHostPorts = allowedHostPorts; } else if ("applicationSecurityGroups".equals(fieldName)) { List applicationSecurityGroups = reader.readArray(reader1 -> reader1.getString()); deserializedAgentPoolNetworkProfile.applicationSecurityGroups = applicationSecurityGroups; + } else if ("secondaryNetworkInterfaces".equals(fieldName)) { + List secondaryNetworkInterfaces + = reader.readArray(reader1 -> AgentPoolNetworkInterface.fromJson(reader1)); + deserializedAgentPoolNetworkProfile.secondaryNetworkInterfaces = secondaryNetworkInterfaces; } else if ("dranet".equals(fieldName)) { deserializedAgentPoolNetworkProfile.dranet = DRANETProfile.fromJson(reader); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java index 5d9cc75ca5fe..803bf0bda7ce 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java @@ -26,6 +26,11 @@ public final class AgentPoolType extends ExpandableStringEnum { */ public static final AgentPoolType VIRTUAL_MACHINES = fromString("VirtualMachines"); + /** + * Create an Agent Pool for BYO machines running the FlexNode agent. + */ + public static final AgentPoolType FLEX_NODES = fromString("FlexNodes"); + /** * Creates a new instance of AgentPoolType value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdate.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdate.java new file mode 100644 index 000000000000..8f5ceef2a2d8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdate.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Agent pool. + */ +@Fluent +public final class AgentPoolUpdate implements JsonSerializable { + /* + * Properties for the agent pool. + */ + private AgentPoolUpdateProperties properties; + + /** + * Creates an instance of AgentPoolUpdate class. + */ + public AgentPoolUpdate() { + } + + /** + * Get the properties property: Properties for the agent pool. + * + * @return the properties value. + */ + public AgentPoolUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties for the agent pool. + * + * @param properties the properties value to set. + * @return the AgentPoolUpdate object itself. + */ + public AgentPoolUpdate withProperties(AgentPoolUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolUpdate. + */ + public static AgentPoolUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolUpdate deserializedAgentPoolUpdate = new AgentPoolUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedAgentPoolUpdate.properties = AgentPoolUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolUpdate; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateManualScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateManualScaleProfile.java new file mode 100644 index 000000000000..b29064635250 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateManualScaleProfile.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifications on number of machines. + */ +@Fluent +public final class AgentPoolUpdateManualScaleProfile implements JsonSerializable { + /* + * VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or + * 'Standard_D16s_v5'. + */ + private String size; + + /* + * Number of nodes. + */ + private Integer count; + + /** + * Creates an instance of AgentPoolUpdateManualScaleProfile class. + */ + public AgentPoolUpdateManualScaleProfile() { + } + + /** + * Get the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + * 'Standard_E16s_v3' or 'Standard_D16s_v5'. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + * 'Standard_E16s_v3' or 'Standard_D16s_v5'. + * + * @param size the size value to set. + * @return the AgentPoolUpdateManualScaleProfile object itself. + */ + public AgentPoolUpdateManualScaleProfile withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the count property: Number of nodes. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Number of nodes. + * + * @param count the count value to set. + * @return the AgentPoolUpdateManualScaleProfile object itself. + */ + public AgentPoolUpdateManualScaleProfile withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeNumberField("count", this.count); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolUpdateManualScaleProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolUpdateManualScaleProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolUpdateManualScaleProfile. + */ + public static AgentPoolUpdateManualScaleProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolUpdateManualScaleProfile deserializedAgentPoolUpdateManualScaleProfile + = new AgentPoolUpdateManualScaleProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedAgentPoolUpdateManualScaleProfile.size = reader.getString(); + } else if ("count".equals(fieldName)) { + deserializedAgentPoolUpdateManualScaleProfile.count = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolUpdateManualScaleProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateProperties.java new file mode 100644 index 000000000000..f63bf12ed5fe --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateProperties.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties for the agent pool. + */ +@Fluent +public final class AgentPoolUpdateProperties implements JsonSerializable { + /* + * Number of agents (VMs) to host docker containers. + */ + private Integer count; + + /* + * Specifications on VirtualMachines agent pool. + */ + private AgentPoolUpdateVirtualMachinesProfile virtualMachinesProfile; + + /** + * Creates an instance of AgentPoolUpdateProperties class. + */ + public AgentPoolUpdateProperties() { + } + + /** + * Get the count property: Number of agents (VMs) to host docker containers. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Number of agents (VMs) to host docker containers. + * + * @param count the count value to set. + * @return the AgentPoolUpdateProperties object itself. + */ + public AgentPoolUpdateProperties withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. + * + * @return the virtualMachinesProfile value. + */ + public AgentPoolUpdateVirtualMachinesProfile virtualMachinesProfile() { + return this.virtualMachinesProfile; + } + + /** + * Set the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. + * + * @param virtualMachinesProfile the virtualMachinesProfile value to set. + * @return the AgentPoolUpdateProperties object itself. + */ + public AgentPoolUpdateProperties + withVirtualMachinesProfile(AgentPoolUpdateVirtualMachinesProfile virtualMachinesProfile) { + this.virtualMachinesProfile = virtualMachinesProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualMachinesProfile() != null) { + virtualMachinesProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeJsonField("virtualMachinesProfile", this.virtualMachinesProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolUpdateProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolUpdateProperties. + */ + public static AgentPoolUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolUpdateProperties deserializedAgentPoolUpdateProperties = new AgentPoolUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedAgentPoolUpdateProperties.count = reader.getNullable(JsonReader::getInt); + } else if ("virtualMachinesProfile".equals(fieldName)) { + deserializedAgentPoolUpdateProperties.virtualMachinesProfile + = AgentPoolUpdateVirtualMachinesProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolUpdateProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateScaleProfile.java new file mode 100644 index 000000000000..ca70b9af08b6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateScaleProfile.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Specifications on how to scale a VirtualMachines agent pool. + */ +@Fluent +public final class AgentPoolUpdateScaleProfile implements JsonSerializable { + /* + * Specifications on how to scale the VirtualMachines agent pool to a fixed size. + */ + private List manual; + + /** + * Creates an instance of AgentPoolUpdateScaleProfile class. + */ + public AgentPoolUpdateScaleProfile() { + } + + /** + * Get the manual property: Specifications on how to scale the VirtualMachines agent pool to a fixed size. + * + * @return the manual value. + */ + public List manual() { + return this.manual; + } + + /** + * Set the manual property: Specifications on how to scale the VirtualMachines agent pool to a fixed size. + * + * @param manual the manual value to set. + * @return the AgentPoolUpdateScaleProfile object itself. + */ + public AgentPoolUpdateScaleProfile withManual(List manual) { + this.manual = manual; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (manual() != null) { + manual().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("manual", this.manual, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolUpdateScaleProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolUpdateScaleProfile if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolUpdateScaleProfile. + */ + public static AgentPoolUpdateScaleProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolUpdateScaleProfile deserializedAgentPoolUpdateScaleProfile = new AgentPoolUpdateScaleProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("manual".equals(fieldName)) { + List manual + = reader.readArray(reader1 -> AgentPoolUpdateManualScaleProfile.fromJson(reader1)); + deserializedAgentPoolUpdateScaleProfile.manual = manual; + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolUpdateScaleProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateVirtualMachinesProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateVirtualMachinesProfile.java new file mode 100644 index 000000000000..37e8d92fcdc9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateVirtualMachinesProfile.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifications on VirtualMachines agent pool. + */ +@Fluent +public final class AgentPoolUpdateVirtualMachinesProfile + implements JsonSerializable { + /* + * Specifications on how to scale a VirtualMachines agent pool. + */ + private AgentPoolUpdateScaleProfile scale; + + /** + * Creates an instance of AgentPoolUpdateVirtualMachinesProfile class. + */ + public AgentPoolUpdateVirtualMachinesProfile() { + } + + /** + * Get the scale property: Specifications on how to scale a VirtualMachines agent pool. + * + * @return the scale value. + */ + public AgentPoolUpdateScaleProfile scale() { + return this.scale; + } + + /** + * Set the scale property: Specifications on how to scale a VirtualMachines agent pool. + * + * @param scale the scale value to set. + * @return the AgentPoolUpdateVirtualMachinesProfile object itself. + */ + public AgentPoolUpdateVirtualMachinesProfile withScale(AgentPoolUpdateScaleProfile scale) { + this.scale = scale; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scale() != null) { + scale().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("scale", this.scale); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolUpdateVirtualMachinesProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolUpdateVirtualMachinesProfile if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolUpdateVirtualMachinesProfile. + */ + public static AgentPoolUpdateVirtualMachinesProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolUpdateVirtualMachinesProfile deserializedAgentPoolUpdateVirtualMachinesProfile + = new AgentPoolUpdateVirtualMachinesProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scale".equals(fieldName)) { + deserializedAgentPoolUpdateVirtualMachinesProfile.scale + = AgentPoolUpdateScaleProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolUpdateVirtualMachinesProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java index 7fa33bb5d40d..22cc5f5dd50a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java @@ -27,6 +27,11 @@ public final class AgentPoolUpgradeProfilePropertiesUpgradesItem */ private Boolean isPreview; + /* + * Whether the Kubernetes version is out of support. + */ + private Boolean isOutOfSupport; + /** * Creates an instance of AgentPoolUpgradeProfilePropertiesUpgradesItem class. */ @@ -51,6 +56,15 @@ public Boolean isPreview() { return this.isPreview; } + /** + * Get the isOutOfSupport property: Whether the Kubernetes version is out of support. + * + * @return the isOutOfSupport value. + */ + public Boolean isOutOfSupport() { + return this.isOutOfSupport; + } + /** * Validates the instance. * @@ -67,6 +81,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeBooleanField("isPreview", this.isPreview); + jsonWriter.writeBooleanField("isOutOfSupport", this.isOutOfSupport); return jsonWriter.writeEndObject(); } @@ -91,6 +106,9 @@ public static AgentPoolUpgradeProfilePropertiesUpgradesItem fromJson(JsonReader } else if ("isPreview".equals(fieldName)) { deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.isPreview = reader.getNullable(JsonReader::getBoolean); + } else if ("isOutOfSupport".equals(fieldName)) { + deserializedAgentPoolUpgradeProfilePropertiesUpgradesItem.isOutOfSupport + = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java index daf88503669e..0223371c196c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java @@ -34,6 +34,16 @@ public final class AgentPoolUpgradeSettings implements JsonSerializable { + /** + * Alerts are disabled. + */ + public static final AlertConfigurationMode DISABLED = fromString("Disabled"); + + /** + * AKS manages the alerts lifecycle including creation, updates, and deletion. + * Users receive alerts through the configured notification channel. + */ + public static final AlertConfigurationMode MANAGED = fromString("Managed"); + + /** + * Creates a new instance of AlertConfigurationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertConfigurationMode() { + } + + /** + * Creates or finds a AlertConfigurationMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AlertConfigurationMode. + */ + public static AlertConfigurationMode fromString(String name) { + return fromString(name, AlertConfigurationMode.class); + } + + /** + * Gets known AlertConfigurationMode values. + * + * @return known AlertConfigurationMode values. + */ + public static Collection values() { + return values(AlertConfigurationMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProperties.java new file mode 100644 index 000000000000..2eed757d0b5e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProperties.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of the alert configuration. + */ +@Fluent +public final class AlertConfigurationProperties implements JsonSerializable { + /* + * The mode of the alert configuration. Specifies how AKS manages the alerts. + */ + private AlertConfigurationMode mode; + + /* + * Notification settings for the alert configuration. + */ + private AlertNotification notification; + + /* + * The current provisioning state of the alert configuration. + */ + private AlertConfigurationProvisioningState provisioningState; + + /** + * Creates an instance of AlertConfigurationProperties class. + */ + public AlertConfigurationProperties() { + } + + /** + * Get the mode property: The mode of the alert configuration. Specifies how AKS manages the alerts. + * + * @return the mode value. + */ + public AlertConfigurationMode mode() { + return this.mode; + } + + /** + * Set the mode property: The mode of the alert configuration. Specifies how AKS manages the alerts. + * + * @param mode the mode value to set. + * @return the AlertConfigurationProperties object itself. + */ + public AlertConfigurationProperties withMode(AlertConfigurationMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the notification property: Notification settings for the alert configuration. + * + * @return the notification value. + */ + public AlertNotification notification() { + return this.notification; + } + + /** + * Set the notification property: Notification settings for the alert configuration. + * + * @param notification the notification value to set. + * @return the AlertConfigurationProperties object itself. + */ + public AlertConfigurationProperties withNotification(AlertNotification notification) { + this.notification = notification; + return this; + } + + /** + * Get the provisioningState property: The current provisioning state of the alert configuration. + * + * @return the provisioningState value. + */ + public AlertConfigurationProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mode() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property mode in model AlertConfigurationProperties")); + } + if (notification() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property notification in model AlertConfigurationProperties")); + } else { + notification().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AlertConfigurationProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeJsonField("notification", this.notification); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AlertConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AlertConfigurationProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AlertConfigurationProperties. + */ + public static AlertConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AlertConfigurationProperties deserializedAlertConfigurationProperties = new AlertConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedAlertConfigurationProperties.mode + = AlertConfigurationMode.fromString(reader.getString()); + } else if ("notification".equals(fieldName)) { + deserializedAlertConfigurationProperties.notification = AlertNotification.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedAlertConfigurationProperties.provisioningState + = AlertConfigurationProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAlertConfigurationProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProvisioningState.java new file mode 100644 index 000000000000..d39ecaa2b150 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProvisioningState.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current provisioning state of the alert configuration. + */ +public final class AlertConfigurationProvisioningState + extends ExpandableStringEnum { + /** + * Resource has been created. + */ + public static final AlertConfigurationProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Resource creation failed. + */ + public static final AlertConfigurationProvisioningState FAILED = fromString("Failed"); + + /** + * Resource creation was canceled. + */ + public static final AlertConfigurationProvisioningState CANCELED = fromString("Canceled"); + + /** + * The alert configuration is being created. + */ + public static final AlertConfigurationProvisioningState CREATING = fromString("Creating"); + + /** + * The alert configuration is being updated. + */ + public static final AlertConfigurationProvisioningState UPDATING = fromString("Updating"); + + /** + * The alert configuration is being deleted. + */ + public static final AlertConfigurationProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of AlertConfigurationProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertConfigurationProvisioningState() { + } + + /** + * Creates or finds a AlertConfigurationProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AlertConfigurationProvisioningState. + */ + public static AlertConfigurationProvisioningState fromString(String name) { + return fromString(name, AlertConfigurationProvisioningState.class); + } + + /** + * Gets known AlertConfigurationProvisioningState values. + * + * @return known AlertConfigurationProvisioningState values. + */ + public static Collection values() { + return values(AlertConfigurationProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertNotification.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertNotification.java new file mode 100644 index 000000000000..4a4f89bee27f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AlertNotification.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Notification settings for the alert configuration. + */ +@Fluent +public final class AlertNotification implements JsonSerializable { + /* + * The resource ID of the Azure Monitor action group to send notifications to. + */ + private String actionGroupId; + + /** + * Creates an instance of AlertNotification class. + */ + public AlertNotification() { + } + + /** + * Get the actionGroupId property: The resource ID of the Azure Monitor action group to send notifications to. + * + * @return the actionGroupId value. + */ + public String actionGroupId() { + return this.actionGroupId; + } + + /** + * Set the actionGroupId property: The resource ID of the Azure Monitor action group to send notifications to. + * + * @param actionGroupId the actionGroupId value to set. + * @return the AlertNotification object itself. + */ + public AlertNotification withActionGroupId(String actionGroupId) { + this.actionGroupId = actionGroupId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (actionGroupId() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property actionGroupId in model AlertNotification")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AlertNotification.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("actionGroupId", this.actionGroupId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AlertNotification from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AlertNotification if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AlertNotification. + */ + public static AlertNotification fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AlertNotification deserializedAlertNotification = new AlertNotification(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actionGroupId".equals(fieldName)) { + deserializedAlertNotification.actionGroupId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAlertNotification; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AllowedSubject.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AllowedSubject.java new file mode 100644 index 000000000000..ed48644edc20 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AllowedSubject.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A subject authorized to use the identity binding for token exchange. + * The namespace selector is required and must be non-empty. The service + * account selector is optional; when omitted, all service accounts in + * matching namespaces are authorized. Selectors within a single + * AllowedSubject are AND'd; multiple AllowedSubjects on an + * IdentityBinding are OR'd. + */ +@Fluent +public final class AllowedSubject implements JsonSerializable { + /* + * Label selector matching the namespaces in which this identity may be + * used. Must be non-empty: an empty selector would match every namespace + * and is rejected to prevent overly permissive bindings. Use the built-in + * `kubernetes.io/metadata.name` label to target specific namespaces by + * name. + */ + private LabelSelector namespaceSelector; + + /* + * Optional label selector matching the service accounts (within the + * namespaces matched by `namespaceSelector`) that may use this identity. + * When omitted, all service accounts in matching namespaces are + * authorized. When provided, it must be non-empty. + */ + private LabelSelector serviceAccountSelector; + + /** + * Creates an instance of AllowedSubject class. + */ + public AllowedSubject() { + } + + /** + * Get the namespaceSelector property: Label selector matching the namespaces in which this identity may be + * used. Must be non-empty: an empty selector would match every namespace + * and is rejected to prevent overly permissive bindings. Use the built-in + * `kubernetes.io/metadata.name` label to target specific namespaces by + * name. + * + * @return the namespaceSelector value. + */ + public LabelSelector namespaceSelector() { + return this.namespaceSelector; + } + + /** + * Set the namespaceSelector property: Label selector matching the namespaces in which this identity may be + * used. Must be non-empty: an empty selector would match every namespace + * and is rejected to prevent overly permissive bindings. Use the built-in + * `kubernetes.io/metadata.name` label to target specific namespaces by + * name. + * + * @param namespaceSelector the namespaceSelector value to set. + * @return the AllowedSubject object itself. + */ + public AllowedSubject withNamespaceSelector(LabelSelector namespaceSelector) { + this.namespaceSelector = namespaceSelector; + return this; + } + + /** + * Get the serviceAccountSelector property: Optional label selector matching the service accounts (within the + * namespaces matched by `namespaceSelector`) that may use this identity. + * When omitted, all service accounts in matching namespaces are + * authorized. When provided, it must be non-empty. + * + * @return the serviceAccountSelector value. + */ + public LabelSelector serviceAccountSelector() { + return this.serviceAccountSelector; + } + + /** + * Set the serviceAccountSelector property: Optional label selector matching the service accounts (within the + * namespaces matched by `namespaceSelector`) that may use this identity. + * When omitted, all service accounts in matching namespaces are + * authorized. When provided, it must be non-empty. + * + * @param serviceAccountSelector the serviceAccountSelector value to set. + * @return the AllowedSubject object itself. + */ + public AllowedSubject withServiceAccountSelector(LabelSelector serviceAccountSelector) { + this.serviceAccountSelector = serviceAccountSelector; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (namespaceSelector() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property namespaceSelector in model AllowedSubject")); + } else { + namespaceSelector().validate(); + } + if (serviceAccountSelector() != null) { + serviceAccountSelector().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AllowedSubject.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("namespaceSelector", this.namespaceSelector); + jsonWriter.writeJsonField("serviceAccountSelector", this.serviceAccountSelector); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AllowedSubject from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AllowedSubject if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AllowedSubject. + */ + public static AllowedSubject fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AllowedSubject deserializedAllowedSubject = new AllowedSubject(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("namespaceSelector".equals(fieldName)) { + deserializedAllowedSubject.namespaceSelector = LabelSelector.fromJson(reader); + } else if ("serviceAccountSelector".equals(fieldName)) { + deserializedAllowedSubject.serviceAccountSelector = LabelSelector.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAllowedSubject; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java index d75309d6652b..9264f52980ea 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java @@ -23,6 +23,12 @@ public final class BackendPoolType extends ExpandableStringEnum */ public static final BackendPoolType NODE_IP = fromString("NodeIP"); + /** + * The type of the managed inbound Load Balancer BackendPool. Used only when loadBalancerSku is specified as + * 'service'. https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. + */ + public static final BackendPoolType POD_IP = fromString("PodIP"); + /** * Creates a new instance of BackendPoolType value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BastionProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BastionProfile.java new file mode 100644 index 000000000000..68d3ff37e945 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BastionProfile.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile to enable managed Azure Bastion or reference to an existing Bastion for the managed cluster. + * See https://aka.ms/aks/BastionConnect for more details. + */ +@Fluent +public final class BastionProfile implements JsonSerializable { + /* + * Indicates whether managed bastion is enabled. + */ + private Boolean enabled; + + /* + * The resource ID of the managed bastion associated with the managed cluster. + */ + private String bastionId; + + /* + * The SKU of the managed bastion. + * + * Only Standard and Premium SKUs are supported. + * SKU downgrading is not allowed. To downgrade SKU, please disable then re-enable the managed bastion with new SKU. + * + * See https://aka.ms/aks/BastionSKUs for more details. + */ + private BastionSku sku; + + /* + * The scale units of the managed bastion. Default value is 2. + */ + private Integer scaleUnits; + + /* + * The resource ID of the public IP address associated with the managed bastion. + * + * When provided during creation, the managed bastion will reference this existing public IP address instead of + * creating a new one. + * The referenced public IP address must be in the same subscription and region as the managed cluster. + * + * When not provided during creation, AKS will automatically create a new public IP address. + * + * This field cannot be updated. To change IP address after creation, please disable and re-enable the managed + * bastion with the new public IP address. + */ + private String publicIpAddressId; + + /** + * Creates an instance of BastionProfile class. + */ + public BastionProfile() { + } + + /** + * Get the enabled property: Indicates whether managed bastion is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether managed bastion is enabled. + * + * @param enabled the enabled value to set. + * @return the BastionProfile object itself. + */ + public BastionProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the bastionId property: The resource ID of the managed bastion associated with the managed cluster. + * + * @return the bastionId value. + */ + public String bastionId() { + return this.bastionId; + } + + /** + * Get the sku property: The SKU of the managed bastion. + * + * Only Standard and Premium SKUs are supported. + * SKU downgrading is not allowed. To downgrade SKU, please disable then re-enable the managed bastion with new SKU. + * + * See https://aka.ms/aks/BastionSKUs for more details. + * + * @return the sku value. + */ + public BastionSku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU of the managed bastion. + * + * Only Standard and Premium SKUs are supported. + * SKU downgrading is not allowed. To downgrade SKU, please disable then re-enable the managed bastion with new SKU. + * + * See https://aka.ms/aks/BastionSKUs for more details. + * + * @param sku the sku value to set. + * @return the BastionProfile object itself. + */ + public BastionProfile withSku(BastionSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the scaleUnits property: The scale units of the managed bastion. Default value is 2. + * + * @return the scaleUnits value. + */ + public Integer scaleUnits() { + return this.scaleUnits; + } + + /** + * Set the scaleUnits property: The scale units of the managed bastion. Default value is 2. + * + * @param scaleUnits the scaleUnits value to set. + * @return the BastionProfile object itself. + */ + public BastionProfile withScaleUnits(Integer scaleUnits) { + this.scaleUnits = scaleUnits; + return this; + } + + /** + * Get the publicIpAddressId property: The resource ID of the public IP address associated with the managed bastion. + * + * When provided during creation, the managed bastion will reference this existing public IP address instead of + * creating a new one. + * The referenced public IP address must be in the same subscription and region as the managed cluster. + * + * When not provided during creation, AKS will automatically create a new public IP address. + * + * This field cannot be updated. To change IP address after creation, please disable and re-enable the managed + * bastion with the new public IP address. + * + * @return the publicIpAddressId value. + */ + public String publicIpAddressId() { + return this.publicIpAddressId; + } + + /** + * Set the publicIpAddressId property: The resource ID of the public IP address associated with the managed bastion. + * + * When provided during creation, the managed bastion will reference this existing public IP address instead of + * creating a new one. + * The referenced public IP address must be in the same subscription and region as the managed cluster. + * + * When not provided during creation, AKS will automatically create a new public IP address. + * + * This field cannot be updated. To change IP address after creation, please disable and re-enable the managed + * bastion with the new public IP address. + * + * @param publicIpAddressId the publicIpAddressId value to set. + * @return the BastionProfile object itself. + */ + public BastionProfile withPublicIpAddressId(String publicIpAddressId) { + this.publicIpAddressId = publicIpAddressId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("sku", this.sku == null ? null : this.sku.toString()); + jsonWriter.writeNumberField("scaleUnits", this.scaleUnits); + jsonWriter.writeStringField("publicIpAddressId", this.publicIpAddressId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BastionProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BastionProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BastionProfile. + */ + public static BastionProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BastionProfile deserializedBastionProfile = new BastionProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedBastionProfile.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("bastionId".equals(fieldName)) { + deserializedBastionProfile.bastionId = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedBastionProfile.sku = BastionSku.fromString(reader.getString()); + } else if ("scaleUnits".equals(fieldName)) { + deserializedBastionProfile.scaleUnits = reader.getNullable(JsonReader::getInt); + } else if ("publicIpAddressId".equals(fieldName)) { + deserializedBastionProfile.publicIpAddressId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBastionProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BastionSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BastionSku.java new file mode 100644 index 000000000000..eef6f83b10ae --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BastionSku.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The SKU of the managed Azure Bastion. The default is 'Standard'. See https://aka.ms/aks/BastionSKUs for more + * information about the differences between Azure Bastion SKUs. + */ +public final class BastionSku extends ExpandableStringEnum { + /** + * Use the standard SKU of Azure Bastion. + */ + public static final BastionSku STANDARD = fromString("Standard"); + + /** + * Use the premium SKU of Azure Bastion. + */ + public static final BastionSku PREMIUM = fromString("Premium"); + + /** + * Creates a new instance of BastionSku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BastionSku() { + } + + /** + * Creates or finds a BastionSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding BastionSku. + */ + public static BastionSku fromString(String name) { + return fromString(name, BastionSku.class); + } + + /** + * Gets known BastionSku values. + * + * @return known BastionSku values. + */ + public static Collection values() { + return values(BastionSku.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapAzureConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapAzureConfig.java new file mode 100644 index 000000000000..e3112563e73a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapAzureConfig.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Azure configuration returned as part of FlexNode bootstrap data. + */ +@Immutable +public final class BootstrapAzureConfig implements JsonSerializable { + /* + * Azure Resource Manager endpoint for the cloud environment. + */ + private String resourceManagerEndpoint; + + /* + * Target cluster identity. + */ + private BootstrapTargetCluster targetCluster; + + /* + * Target agent pool name. + */ + private String targetAgentPoolName; + + /* + * Bootstrap token for node enrollment. Do not cache or log. + */ + private BootstrapTokenInfo bootstrapToken; + + /** + * Creates an instance of BootstrapAzureConfig class. + */ + private BootstrapAzureConfig() { + } + + /** + * Get the resourceManagerEndpoint property: Azure Resource Manager endpoint for the cloud environment. + * + * @return the resourceManagerEndpoint value. + */ + public String resourceManagerEndpoint() { + return this.resourceManagerEndpoint; + } + + /** + * Get the targetCluster property: Target cluster identity. + * + * @return the targetCluster value. + */ + public BootstrapTargetCluster targetCluster() { + return this.targetCluster; + } + + /** + * Get the targetAgentPoolName property: Target agent pool name. + * + * @return the targetAgentPoolName value. + */ + public String targetAgentPoolName() { + return this.targetAgentPoolName; + } + + /** + * Get the bootstrapToken property: Bootstrap token for node enrollment. Do not cache or log. + * + * @return the bootstrapToken value. + */ + public BootstrapTokenInfo bootstrapToken() { + return this.bootstrapToken; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetCluster() != null) { + targetCluster().validate(); + } + if (bootstrapToken() != null) { + bootstrapToken().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BootstrapAzureConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BootstrapAzureConfig if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BootstrapAzureConfig. + */ + public static BootstrapAzureConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BootstrapAzureConfig deserializedBootstrapAzureConfig = new BootstrapAzureConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceManagerEndpoint".equals(fieldName)) { + deserializedBootstrapAzureConfig.resourceManagerEndpoint = reader.getString(); + } else if ("targetCluster".equals(fieldName)) { + deserializedBootstrapAzureConfig.targetCluster = BootstrapTargetCluster.fromJson(reader); + } else if ("targetAgentPoolName".equals(fieldName)) { + deserializedBootstrapAzureConfig.targetAgentPoolName = reader.getString(); + } else if ("bootstrapToken".equals(fieldName)) { + deserializedBootstrapAzureConfig.bootstrapToken = BootstrapTokenInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBootstrapAzureConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapComponentVersions.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapComponentVersions.java new file mode 100644 index 000000000000..3b98a4452e9b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapComponentVersions.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Component versions returned as part of FlexNode bootstrap data. + */ +@Immutable +public final class BootstrapComponentVersions implements JsonSerializable { + /* + * Kubernetes version. + */ + private String kubernetes; + + /* + * Containerd version. + */ + private String containerd; + + /* + * Runc version. + */ + private String runc; + + /** + * Creates an instance of BootstrapComponentVersions class. + */ + private BootstrapComponentVersions() { + } + + /** + * Get the kubernetes property: Kubernetes version. + * + * @return the kubernetes value. + */ + public String kubernetes() { + return this.kubernetes; + } + + /** + * Get the containerd property: Containerd version. + * + * @return the containerd value. + */ + public String containerd() { + return this.containerd; + } + + /** + * Get the runc property: Runc version. + * + * @return the runc value. + */ + public String runc() { + return this.runc; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BootstrapComponentVersions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BootstrapComponentVersions if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BootstrapComponentVersions. + */ + public static BootstrapComponentVersions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BootstrapComponentVersions deserializedBootstrapComponentVersions = new BootstrapComponentVersions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetes".equals(fieldName)) { + deserializedBootstrapComponentVersions.kubernetes = reader.getString(); + } else if ("containerd".equals(fieldName)) { + deserializedBootstrapComponentVersions.containerd = reader.getString(); + } else if ("runc".equals(fieldName)) { + deserializedBootstrapComponentVersions.runc = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBootstrapComponentVersions; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapKubeletConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapKubeletConfig.java new file mode 100644 index 000000000000..a6d4157bdebe --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapKubeletConfig.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Kubelet configuration returned as part of FlexNode bootstrap data. + */ +@Immutable +public final class BootstrapKubeletConfig implements JsonSerializable { + /* + * FQDN of the Kubernetes API server. + */ + private String clusterFQDN; + + /* + * Base64-encoded PEM certificate of the cluster CA. Do not cache or log. + */ + private String caCertData; + + /** + * Creates an instance of BootstrapKubeletConfig class. + */ + private BootstrapKubeletConfig() { + } + + /** + * Get the clusterFQDN property: FQDN of the Kubernetes API server. + * + * @return the clusterFQDN value. + */ + public String clusterFQDN() { + return this.clusterFQDN; + } + + /** + * Get the caCertData property: Base64-encoded PEM certificate of the cluster CA. Do not cache or log. + * + * @return the caCertData value. + */ + public String caCertData() { + return this.caCertData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BootstrapKubeletConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BootstrapKubeletConfig if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BootstrapKubeletConfig. + */ + public static BootstrapKubeletConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BootstrapKubeletConfig deserializedBootstrapKubeletConfig = new BootstrapKubeletConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterFQDN".equals(fieldName)) { + deserializedBootstrapKubeletConfig.clusterFQDN = reader.getString(); + } else if ("caCertData".equals(fieldName)) { + deserializedBootstrapKubeletConfig.caCertData = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBootstrapKubeletConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNetworkingConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNetworkingConfig.java new file mode 100644 index 000000000000..968f08eb651f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNetworkingConfig.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network configuration returned as part of FlexNode bootstrap data. + */ +@Immutable +public final class BootstrapNetworkingConfig implements JsonSerializable { + /* + * IP address of the cluster DNS service. + */ + private String dnsServiceIP; + + /* + * CNI plugin version. + */ + private String cniVersion; + + /** + * Creates an instance of BootstrapNetworkingConfig class. + */ + private BootstrapNetworkingConfig() { + } + + /** + * Get the dnsServiceIP property: IP address of the cluster DNS service. + * + * @return the dnsServiceIP value. + */ + public String dnsServiceIP() { + return this.dnsServiceIP; + } + + /** + * Get the cniVersion property: CNI plugin version. + * + * @return the cniVersion value. + */ + public String cniVersion() { + return this.cniVersion; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BootstrapNetworkingConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BootstrapNetworkingConfig if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BootstrapNetworkingConfig. + */ + public static BootstrapNetworkingConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BootstrapNetworkingConfig deserializedBootstrapNetworkingConfig = new BootstrapNetworkingConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dnsServiceIP".equals(fieldName)) { + deserializedBootstrapNetworkingConfig.dnsServiceIP = reader.getString(); + } else if ("cniVersion".equals(fieldName)) { + deserializedBootstrapNetworkingConfig.cniVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBootstrapNetworkingConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNodeConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNodeConfig.java new file mode 100644 index 000000000000..ffc280a56faa --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNodeConfig.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Node configuration returned as part of FlexNode bootstrap data. + */ +@Immutable +public final class BootstrapNodeConfig implements JsonSerializable { + /* + * Maximum pods per node. + */ + private Integer maxPods; + + /* + * Node labels to apply during registration. + */ + private Map labels; + + /* + * Node taints in the format 'key=value:effect'. + */ + private List taints; + + /* + * Kubelet configuration. + */ + private BootstrapKubeletConfig kubelet; + + /** + * Creates an instance of BootstrapNodeConfig class. + */ + private BootstrapNodeConfig() { + } + + /** + * Get the maxPods property: Maximum pods per node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Get the labels property: Node labels to apply during registration. + * + * @return the labels value. + */ + public Map labels() { + return this.labels; + } + + /** + * Get the taints property: Node taints in the format 'key=value:effect'. + * + * @return the taints value. + */ + public List taints() { + return this.taints; + } + + /** + * Get the kubelet property: Kubelet configuration. + * + * @return the kubelet value. + */ + public BootstrapKubeletConfig kubelet() { + return this.kubelet; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubelet() != null) { + kubelet().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BootstrapNodeConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BootstrapNodeConfig if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BootstrapNodeConfig. + */ + public static BootstrapNodeConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BootstrapNodeConfig deserializedBootstrapNodeConfig = new BootstrapNodeConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxPods".equals(fieldName)) { + deserializedBootstrapNodeConfig.maxPods = reader.getNullable(JsonReader::getInt); + } else if ("labels".equals(fieldName)) { + Map labels = reader.readMap(reader1 -> reader1.getString()); + deserializedBootstrapNodeConfig.labels = labels; + } else if ("taints".equals(fieldName)) { + List taints = reader.readArray(reader1 -> reader1.getString()); + deserializedBootstrapNodeConfig.taints = taints; + } else if ("kubelet".equals(fieldName)) { + deserializedBootstrapNodeConfig.kubelet = BootstrapKubeletConfig.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBootstrapNodeConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTargetCluster.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTargetCluster.java new file mode 100644 index 000000000000..d99ef52b2237 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTargetCluster.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Target AKS cluster for FlexNode bootstrap. + */ +@Immutable +public final class BootstrapTargetCluster implements JsonSerializable { + /* + * Azure resource ID of the target AKS cluster. + */ + private String resourceId; + + /** + * Creates an instance of BootstrapTargetCluster class. + */ + private BootstrapTargetCluster() { + } + + /** + * Get the resourceId property: Azure resource ID of the target AKS cluster. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BootstrapTargetCluster from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BootstrapTargetCluster if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BootstrapTargetCluster. + */ + public static BootstrapTargetCluster fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BootstrapTargetCluster deserializedBootstrapTargetCluster = new BootstrapTargetCluster(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedBootstrapTargetCluster.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBootstrapTargetCluster; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTokenInfo.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTokenInfo.java new file mode 100644 index 000000000000..79aa7d237cc1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTokenInfo.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Bootstrap token information. + */ +@Immutable +public final class BootstrapTokenInfo implements JsonSerializable { + /* + * Short-lived bootstrap token for kubelet. Do not cache or log. + */ + private String token; + + /** + * Creates an instance of BootstrapTokenInfo class. + */ + private BootstrapTokenInfo() { + } + + /** + * Get the token property: Short-lived bootstrap token for kubelet. Do not cache or log. + * + * @return the token value. + */ + public String token() { + return this.token; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BootstrapTokenInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BootstrapTokenInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BootstrapTokenInfo. + */ + public static BootstrapTokenInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BootstrapTokenInfo deserializedBootstrapTokenInfo = new BootstrapTokenInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("token".equals(fieldName)) { + deserializedBootstrapTokenInfo.token = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBootstrapTokenInfo; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservation.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservation.java new file mode 100644 index 000000000000..5a02ffc1afcb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservation.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Capacity Reservation to provide virtual machines from a reserved group of Machines. + */ +@Fluent +public final class CapacityReservation implements JsonSerializable { + /* + * The Capacity Reservation Group to provide virtual machines from a reserved group of Machines + */ + private CapacityReservationGroup capacityReservationGroup; + + /** + * Creates an instance of CapacityReservation class. + */ + public CapacityReservation() { + } + + /** + * Get the capacityReservationGroup property: The Capacity Reservation Group to provide virtual machines from a + * reserved group of Machines. + * + * @return the capacityReservationGroup value. + */ + public CapacityReservationGroup capacityReservationGroup() { + return this.capacityReservationGroup; + } + + /** + * Set the capacityReservationGroup property: The Capacity Reservation Group to provide virtual machines from a + * reserved group of Machines. + * + * @param capacityReservationGroup the capacityReservationGroup value to set. + * @return the CapacityReservation object itself. + */ + public CapacityReservation withCapacityReservationGroup(CapacityReservationGroup capacityReservationGroup) { + this.capacityReservationGroup = capacityReservationGroup; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capacityReservationGroup() != null) { + capacityReservationGroup().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("capacityReservationGroup", this.capacityReservationGroup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapacityReservation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapacityReservation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CapacityReservation. + */ + public static CapacityReservation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapacityReservation deserializedCapacityReservation = new CapacityReservation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capacityReservationGroup".equals(fieldName)) { + deserializedCapacityReservation.capacityReservationGroup + = CapacityReservationGroup.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCapacityReservation; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservationGroup.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservationGroup.java new file mode 100644 index 000000000000..409c1d2d3a23 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservationGroup.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Capacity Reservation Group to provide virtual machines from a reserved group of Machines. + */ +@Fluent +public final class CapacityReservationGroup implements JsonSerializable { + /* + * The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved + * group of Machines. This is of the form: + * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/ + * capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create a Machine with a specified + * CRG. For more information see [Capacity Reservation](aka.ms/CapacityReservation) + */ + private String id; + + /** + * Creates an instance of CapacityReservationGroup class. + */ + public CapacityReservationGroup() { + } + + /** + * Get the id property: The fully qualified resource ID of the Capacity Reservation Group to provide virtual + * machines from a reserved group of Machines. This is of the form: + * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + * Customers use it to create a Machine with a specified CRG. For more information see [Capacity + * Reservation](aka.ms/CapacityReservation). + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The fully qualified resource ID of the Capacity Reservation Group to provide virtual + * machines from a reserved group of Machines. This is of the form: + * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + * Customers use it to create a Machine with a specified CRG. For more information see [Capacity + * Reservation](aka.ms/CapacityReservation). + * + * @param id the id value to set. + * @return the CapacityReservationGroup object itself. + */ + public CapacityReservationGroup withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapacityReservationGroup from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapacityReservationGroup if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CapacityReservationGroup. + */ + public static CapacityReservationGroup fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapacityReservationGroup deserializedCapacityReservationGroup = new CapacityReservationGroup(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCapacityReservationGroup.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCapacityReservationGroup; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java new file mode 100644 index 000000000000..121a5242a214 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The health probing behavior for External Traffic Policy Cluster services. + */ +public final class ClusterServiceLoadBalancerHealthProbeMode + extends ExpandableStringEnum { + /** + * Each External Traffic Policy Cluster service will have its own health probe targeting service nodePort. + */ + public static final ClusterServiceLoadBalancerHealthProbeMode SERVICE_NODE_PORT = fromString("ServiceNodePort"); + + /** + * All External Traffic Policy Cluster services in a Standard Load Balancer will have a dedicated health probe + * targeting the backend nodes' kube-proxy health check port 10256. + */ + public static final ClusterServiceLoadBalancerHealthProbeMode SHARED = fromString("Shared"); + + /** + * Creates a new instance of ClusterServiceLoadBalancerHealthProbeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterServiceLoadBalancerHealthProbeMode() { + } + + /** + * Creates or finds a ClusterServiceLoadBalancerHealthProbeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterServiceLoadBalancerHealthProbeMode. + */ + public static ClusterServiceLoadBalancerHealthProbeMode fromString(String name) { + return fromString(name, ClusterServiceLoadBalancerHealthProbeMode.class); + } + + /** + * Gets known ClusterServiceLoadBalancerHealthProbeMode values. + * + * @return known ClusterServiceLoadBalancerHealthProbeMode values. + */ + public static Collection values() { + return values(ClusterServiceLoadBalancerHealthProbeMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java index 92a65c004c00..66e424e4bc1f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java @@ -21,6 +21,13 @@ public final class ClusterUpgradeSettings implements JsonSerializable { + /* + * Component name. + */ + private String name; + + /* + * Component version. + */ + private String version; + + /* + * If upgraded component version contains breaking changes from the current version. To see a detailed description + * of what the breaking changes are, visit + * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking- + * changes-by-version. + */ + private Boolean hasBreakingChanges; + + /** + * Creates an instance of Component class. + */ + private Component() { + } + + /** + * Get the name property: Component name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the version property: Component version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the hasBreakingChanges property: If upgraded component version contains breaking changes from the current + * version. To see a detailed description of what the breaking changes are, visit + * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. + * + * @return the hasBreakingChanges value. + */ + public Boolean hasBreakingChanges() { + return this.hasBreakingChanges; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeBooleanField("hasBreakingChanges", this.hasBreakingChanges); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Component from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Component if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Component. + */ + public static Component fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Component deserializedComponent = new Component(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedComponent.name = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedComponent.version = reader.getString(); + } else if ("hasBreakingChanges".equals(fieldName)) { + deserializedComponent.hasBreakingChanges = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedComponent; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java new file mode 100644 index 000000000000..79a7f0ef9245 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * components of given Kubernetes version. + */ +@Immutable +public final class ComponentsByRelease implements JsonSerializable { + /* + * The Kubernetes version (major.minor). + */ + private String kubernetesVersion; + + /* + * components of current or upgraded Kubernetes version in the cluster. + */ + private List components; + + /** + * Creates an instance of ComponentsByRelease class. + */ + private ComponentsByRelease() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Get the components property: components of current or upgraded Kubernetes version in the cluster. + * + * @return the components value. + */ + public List components() { + return this.components; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (components() != null) { + components().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeArrayField("components", this.components, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComponentsByRelease from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComponentsByRelease if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ComponentsByRelease. + */ + public static ComponentsByRelease fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComponentsByRelease deserializedComponentsByRelease = new ComponentsByRelease(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedComponentsByRelease.kubernetesVersion = reader.getString(); + } else if ("components".equals(fieldName)) { + List components = reader.readArray(reader1 -> Component.fromJson(reader1)); + deserializedComponentsByRelease.components = components; + } else { + reader.skipChildren(); + } + } + + return deserializedComponentsByRelease; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java index 1ae8f9a7a33c..785ddda15c40 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java @@ -83,11 +83,27 @@ public final class ContainerServiceNetworkProfile implements JsonSerializable ipFamilies; + /* + * Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with + * hostNetwork=false. if not specified, the default is 'IMDS'. + */ + private PodLinkLocalAccess podLinkLocalAccess; + + /* + * Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting + * behavior. See https://v.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * is represented by a - string. Kubernetes version 1.23 would be '1-23'. + */ + private ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig; + /** * Creates an instance of ContainerServiceNetworkProfile class. */ @@ -377,6 +406,28 @@ public ManagedClusterLoadBalancerProfile loadBalancerProfile() { return this; } + /** + * Get the bastionProfile property: Profile of the Bastion Host associated with the managed cluster. + * See https://aka.ms/aks/BastionConnect for more details. + * + * @return the bastionProfile value. + */ + public BastionProfile bastionProfile() { + return this.bastionProfile; + } + + /** + * Set the bastionProfile property: Profile of the Bastion Host associated with the managed cluster. + * See https://aka.ms/aks/BastionConnect for more details. + * + * @param bastionProfile the bastionProfile value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withBastionProfile(BastionProfile bastionProfile) { + this.bastionProfile = bastionProfile; + return this; + } + /** * Get the natGatewayProfile property: Profile of the cluster NAT gateway. * @@ -397,6 +448,36 @@ public ContainerServiceNetworkProfile withNatGatewayProfile(ManagedClusterNatGat return this; } + /** + * Get the natGatewayId property: The Azure resource ID of the NAT gateway to use for egress at cluster startup when + * outboundType is 'userAssignedNATGateway' using StandardV2 Public IP, backend pool type is podIP, and load + * balancer type is service SKU. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'. + * When using managed NATGateway this field is auto populated. For more information, see + * https://aka.ms/aks/container-native-slb. + * + * @return the natGatewayId value. + */ + public String natGatewayId() { + return this.natGatewayId; + } + + /** + * Set the natGatewayId property: The Azure resource ID of the NAT gateway to use for egress at cluster startup when + * outboundType is 'userAssignedNATGateway' using StandardV2 Public IP, backend pool type is podIP, and load + * balancer type is service SKU. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'. + * When using managed NATGateway this field is auto populated. For more information, see + * https://aka.ms/aks/container-native-slb. + * + * @param natGatewayId the natGatewayId value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withNatGatewayId(String natGatewayId) { + this.natGatewayId = natGatewayId; + return this; + } + /** * Get the staticEgressGatewayProfile property: The profile for Static Egress Gateway addon. For more details about * Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. @@ -492,6 +573,57 @@ public ContainerServiceNetworkProfile withIpFamilies(List ipFamilies) return this; } + /** + * Get the podLinkLocalAccess property: Defines access to special link local addresses (Azure Instance Metadata + * Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. + * + * @return the podLinkLocalAccess value. + */ + public PodLinkLocalAccess podLinkLocalAccess() { + return this.podLinkLocalAccess; + } + + /** + * Set the podLinkLocalAccess property: Defines access to special link local addresses (Azure Instance Metadata + * Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. + * + * @param podLinkLocalAccess the podLinkLocalAccess value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withPodLinkLocalAccess(PodLinkLocalAccess podLinkLocalAccess) { + this.podLinkLocalAccess = podLinkLocalAccess; + return this; + } + + /** + * Get the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will + * use the kube-proxy defaulting behavior. See + * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + * + * @return the kubeProxyConfig value. + */ + public ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig() { + return this.kubeProxyConfig; + } + + /** + * Set the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will + * use the kube-proxy defaulting behavior. See + * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + * + * @param kubeProxyConfig the kubeProxyConfig value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile + withKubeProxyConfig(ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig) { + this.kubeProxyConfig = kubeProxyConfig; + return this; + } + /** * Validates the instance. * @@ -504,12 +636,18 @@ public void validate() { if (loadBalancerProfile() != null) { loadBalancerProfile().validate(); } + if (bastionProfile() != null) { + bastionProfile().validate(); + } if (natGatewayProfile() != null) { natGatewayProfile().validate(); } if (staticEgressGatewayProfile() != null) { staticEgressGatewayProfile().validate(); } + if (kubeProxyConfig() != null) { + kubeProxyConfig().validate(); + } } /** @@ -533,12 +671,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("loadBalancerSku", this.loadBalancerSku == null ? null : this.loadBalancerSku.toString()); jsonWriter.writeJsonField("loadBalancerProfile", this.loadBalancerProfile); + jsonWriter.writeJsonField("bastionProfile", this.bastionProfile); jsonWriter.writeJsonField("natGatewayProfile", this.natGatewayProfile); + jsonWriter.writeStringField("natGatewayId", this.natGatewayId); jsonWriter.writeJsonField("staticEgressGatewayProfile", this.staticEgressGatewayProfile); jsonWriter.writeArrayField("podCidrs", this.podCidrs, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("serviceCidrs", this.serviceCidrs, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ipFamilies", this.ipFamilies, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("podLinkLocalAccess", + this.podLinkLocalAccess == null ? null : this.podLinkLocalAccess.toString()); + jsonWriter.writeJsonField("kubeProxyConfig", this.kubeProxyConfig); return jsonWriter.writeEndObject(); } @@ -589,9 +732,13 @@ public static ContainerServiceNetworkProfile fromJson(JsonReader jsonReader) thr } else if ("loadBalancerProfile".equals(fieldName)) { deserializedContainerServiceNetworkProfile.loadBalancerProfile = ManagedClusterLoadBalancerProfile.fromJson(reader); + } else if ("bastionProfile".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.bastionProfile = BastionProfile.fromJson(reader); } else if ("natGatewayProfile".equals(fieldName)) { deserializedContainerServiceNetworkProfile.natGatewayProfile = ManagedClusterNatGatewayProfile.fromJson(reader); + } else if ("natGatewayId".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.natGatewayId = reader.getString(); } else if ("staticEgressGatewayProfile".equals(fieldName)) { deserializedContainerServiceNetworkProfile.staticEgressGatewayProfile = ManagedClusterStaticEgressGatewayProfile.fromJson(reader); @@ -604,6 +751,12 @@ public static ContainerServiceNetworkProfile fromJson(JsonReader jsonReader) thr } else if ("ipFamilies".equals(fieldName)) { List ipFamilies = reader.readArray(reader1 -> IpFamily.fromString(reader1.getString())); deserializedContainerServiceNetworkProfile.ipFamilies = ipFamilies; + } else if ("podLinkLocalAccess".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.podLinkLocalAccess + = PodLinkLocalAccess.fromString(reader.getString()); + } else if ("kubeProxyConfig".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.kubeProxyConfig + = ContainerServiceNetworkProfileKubeProxyConfig.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java new file mode 100644 index 000000000000..de14147a2529 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting + * behavior. See https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + * where <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + */ +@Fluent +public final class ContainerServiceNetworkProfileKubeProxyConfig + implements JsonSerializable { + /* + * Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by + * default without these customizations). + */ + private Boolean enabled; + + /* + * Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES') + */ + private Mode mode; + + /* + * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + */ + private ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig; + + /** + * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfig class. + */ + public ContainerServiceNetworkProfileKubeProxyConfig() { + } + + /** + * Get the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + * kube-proxy is enabled in AKS by default without these customizations). + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + * kube-proxy is enabled in AKS by default without these customizations). + * + * @param enabled the enabled value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the mode property: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). + * + * @return the mode value. + */ + public Mode mode() { + return this.mode; + } + + /** + * Set the mode property: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). + * + * @param mode the mode value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig withMode(Mode mode) { + this.mode = mode; + return this; + } + + /** + * Get the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set + * to 'IPVS'. + * + * @return the ipvsConfig value. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig() { + return this.ipvsConfig; + } + + /** + * Set the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set + * to 'IPVS'. + * + * @param ipvsConfig the ipvsConfig value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig + withIpvsConfig(ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig) { + this.ipvsConfig = ipvsConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipvsConfig() != null) { + ipvsConfig().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeJsonField("ipvsConfig", this.ipvsConfig); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContainerServiceNetworkProfileKubeProxyConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceNetworkProfileKubeProxyConfig if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ContainerServiceNetworkProfileKubeProxyConfig. + */ + public static ContainerServiceNetworkProfileKubeProxyConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceNetworkProfileKubeProxyConfig deserializedContainerServiceNetworkProfileKubeProxyConfig + = new ContainerServiceNetworkProfileKubeProxyConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfig.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("mode".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfig.mode + = Mode.fromString(reader.getString()); + } else if ("ipvsConfig".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfig.ipvsConfig + = ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceNetworkProfileKubeProxyConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java new file mode 100644 index 000000000000..b459f51c5030 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + */ +@Fluent +public final class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + implements JsonSerializable { + /* + * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. + */ + private IpvsScheduler scheduler; + + /* + * The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. + */ + private Integer tcpTimeoutSeconds; + + /* + * The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. + */ + private Integer tcpFinTimeoutSeconds; + + /* + * The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. + */ + private Integer udpTimeoutSeconds; + + /** + * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig class. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig() { + } + + /** + * Get the scheduler property: IPVS scheduler, for more information please see + * http://www.linuxvirtualserver.org/docs/scheduling.html. + * + * @return the scheduler value. + */ + public IpvsScheduler scheduler() { + return this.scheduler; + } + + /** + * Set the scheduler property: IPVS scheduler, for more information please see + * http://www.linuxvirtualserver.org/docs/scheduling.html. + * + * @param scheduler the scheduler value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withScheduler(IpvsScheduler scheduler) { + this.scheduler = scheduler; + return this; + } + + /** + * Get the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a + * positive integer value. + * + * @return the tcpTimeoutSeconds value. + */ + public Integer tcpTimeoutSeconds() { + return this.tcpTimeoutSeconds; + } + + /** + * Set the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a + * positive integer value. + * + * @param tcpTimeoutSeconds the tcpTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withTcpTimeoutSeconds(Integer tcpTimeoutSeconds) { + this.tcpTimeoutSeconds = tcpTimeoutSeconds; + return this; + } + + /** + * Get the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in + * seconds. Must be a positive integer value. + * + * @return the tcpFinTimeoutSeconds value. + */ + public Integer tcpFinTimeoutSeconds() { + return this.tcpFinTimeoutSeconds; + } + + /** + * Set the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in + * seconds. Must be a positive integer value. + * + * @param tcpFinTimeoutSeconds the tcpFinTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + withTcpFinTimeoutSeconds(Integer tcpFinTimeoutSeconds) { + this.tcpFinTimeoutSeconds = tcpFinTimeoutSeconds; + return this; + } + + /** + * Get the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive + * integer value. + * + * @return the udpTimeoutSeconds value. + */ + public Integer udpTimeoutSeconds() { + return this.udpTimeoutSeconds; + } + + /** + * Set the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive + * integer value. + * + * @param udpTimeoutSeconds the udpTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withUdpTimeoutSeconds(Integer udpTimeoutSeconds) { + this.udpTimeoutSeconds = udpTimeoutSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scheduler", this.scheduler == null ? null : this.scheduler.toString()); + jsonWriter.writeNumberField("tcpTimeoutSeconds", this.tcpTimeoutSeconds); + jsonWriter.writeNumberField("tcpFinTimeoutSeconds", this.tcpFinTimeoutSeconds); + jsonWriter.writeNumberField("udpTimeoutSeconds", this.udpTimeoutSeconds); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig. + */ + public static ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + = new ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scheduler".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.scheduler + = IpvsScheduler.fromString(reader.getString()); + } else if ("tcpTimeoutSeconds".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.tcpTimeoutSeconds + = reader.getNullable(JsonReader::getInt); + } else if ("tcpFinTimeoutSeconds".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.tcpFinTimeoutSeconds + = reader.getNullable(JsonReader::getInt); + } else if ("udpTimeoutSeconds".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.udpTimeoutSeconds + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ControlPlaneScalingSize.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ControlPlaneScalingSize.java new file mode 100644 index 000000000000..a7d8c41a0573 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ControlPlaneScalingSize.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The scaling size of the control plane. Scaling sizes offer guaranteed capacity and predictable Kubernetes performance + * beyond standard tier defaults. Higher H sizes provide increased performance guarantees. See + * https://aka.ms/aks/hyperscale for performance metrics details for each size. + */ +public final class ControlPlaneScalingSize extends ExpandableStringEnum { + /** + * H2 is the smallest scaling size with guaranteed capacity and predictable performance beyond standard tier + * defaults. + */ + public static final ControlPlaneScalingSize H2 = fromString("H2"); + + /** + * H4 scaling size provides increased guaranteed performance over H2. + */ + public static final ControlPlaneScalingSize H4 = fromString("H4"); + + /** + * H8 scaling size provides increased guaranteed performance over H4. + */ + public static final ControlPlaneScalingSize H8 = fromString("H8"); + + /** + * Creates a new instance of ControlPlaneScalingSize value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ControlPlaneScalingSize() { + } + + /** + * Creates or finds a ControlPlaneScalingSize from its string representation. + * + * @param name a name to look for. + * @return the corresponding ControlPlaneScalingSize. + */ + public static ControlPlaneScalingSize fromString(String name) { + return fromString(name, ControlPlaneScalingSize.class); + } + + /** + * Gets known ControlPlaneScalingSize values. + * + * @return known ControlPlaneScalingSize values. + */ + public static Collection values() { + return values(ControlPlaneScalingSize.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java new file mode 100644 index 000000000000..2729e4cb9f6b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The drift action of the machine. Indicates whether a machine has deviated from its expected state due to changes in + * managed cluster properties, requiring corrective action. + */ +public final class DriftAction extends ExpandableStringEnum { + /** + * The machine is up to date. + */ + public static final DriftAction SYNCED = fromString("Synced"); + + /** + * The machine has drifted and needs to be deleted and recreated. + */ + public static final DriftAction RECREATE = fromString("Recreate"); + + /** + * Creates a new instance of DriftAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DriftAction() { + } + + /** + * Creates or finds a DriftAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding DriftAction. + */ + public static DriftAction fromString(String name) { + return fromString(name, DriftAction.class); + } + + /** + * Gets known DriftAction values. + * + * @return known DriftAction values. + */ + public static Collection values() { + return values(DriftAction.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java new file mode 100644 index 000000000000..28c7b06815e3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the driver + * based on system compatibility. This cannot be changed once the AgentPool has been created. This cannot be set on + * Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. + */ +public final class DriverType extends ExpandableStringEnum { + /** + * Install the GRID driver for the GPU, suitable for applications requiring virtualization support. + */ + public static final DriverType GRID = fromString("GRID"); + + /** + * Install the CUDA driver for the GPU, optimized for computational tasks in scientific computing and data-intensive + * applications. + */ + public static final DriverType CUDA = fromString("CUDA"); + + /** + * Creates a new instance of DriverType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DriverType() { + } + + /** + * Creates or finds a DriverType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DriverType. + */ + public static DriverType fromString(String name) { + return fromString(name, DriverType.class); + } + + /** + * Gets known DriverType values. + * + * @return known DriverType values. + */ + public static Collection values() { + return values(DriverType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java index 091332fb423f..5b4c63125714 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java @@ -21,6 +21,13 @@ public final class GpuProfile implements JsonSerializable { */ private GpuDriver driver; + /* + * Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the + * driver based on system compatibility. This cannot be changed once the AgentPool has been created. This cannot be + * set on Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. + */ + private DriverType driverType; + /* * NVIDIA-specific GPU settings. */ @@ -52,6 +59,32 @@ public GpuProfile withDriver(GpuDriver driver) { return this; } + /** + * Get the driverType property: Specify the type of GPU driver to install when creating Windows agent pools. If not + * provided, AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool has + * been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on + * system compatibility. + * + * @return the driverType value. + */ + public DriverType driverType() { + return this.driverType; + } + + /** + * Set the driverType property: Specify the type of GPU driver to install when creating Windows agent pools. If not + * provided, AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool has + * been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on + * system compatibility. + * + * @param driverType the driverType value to set. + * @return the GpuProfile object itself. + */ + public GpuProfile withDriverType(DriverType driverType) { + this.driverType = driverType; + return this; + } + /** * Get the nvidia property: NVIDIA-specific GPU settings. * @@ -90,6 +123,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("driver", this.driver == null ? null : this.driver.toString()); + jsonWriter.writeStringField("driverType", this.driverType == null ? null : this.driverType.toString()); jsonWriter.writeJsonField("nvidia", this.nvidia); return jsonWriter.writeEndObject(); } @@ -111,6 +145,8 @@ public static GpuProfile fromJson(JsonReader jsonReader) throws IOException { if ("driver".equals(fieldName)) { deserializedGpuProfile.driver = GpuDriver.fromString(reader.getString()); + } else if ("driverType".equals(fieldName)) { + deserializedGpuProfile.driverType = DriverType.fromString(reader.getString()); } else if ("nvidia".equals(fieldName)) { deserializedGpuProfile.nvidia = NvidiaGPUProfile.fromJson(reader); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java new file mode 100644 index 000000000000..22968b6ccdec --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Whether the version is default or not and support info. + */ +@Immutable +public final class GuardrailsAvailableVersionsProperties + implements JsonSerializable { + /* + * Whether this is the default version. + */ + private Boolean isDefaultVersion; + + /* + * Whether the version is preview or stable. + */ + private GuardrailsSupport support; + + /** + * Creates an instance of GuardrailsAvailableVersionsProperties class. + */ + private GuardrailsAvailableVersionsProperties() { + } + + /** + * Get the isDefaultVersion property: Whether this is the default version. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Get the support property: Whether the version is preview or stable. + * + * @return the support value. + */ + public GuardrailsSupport support() { + return this.support; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuardrailsAvailableVersionsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuardrailsAvailableVersionsProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionsProperties. + */ + public static GuardrailsAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuardrailsAvailableVersionsProperties deserializedGuardrailsAvailableVersionsProperties + = new GuardrailsAvailableVersionsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isDefaultVersion".equals(fieldName)) { + deserializedGuardrailsAvailableVersionsProperties.isDefaultVersion + = reader.getNullable(JsonReader::getBoolean); + } else if ("support".equals(fieldName)) { + deserializedGuardrailsAvailableVersionsProperties.support + = GuardrailsSupport.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGuardrailsAvailableVersionsProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java new file mode 100644 index 000000000000..c32023e93a49 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether the version is preview or stable. + */ +public final class GuardrailsSupport extends ExpandableStringEnum { + /** + * The version is preview. It is not recommended to use preview versions on critical production clusters. The + * preview version may not support all use-cases. + */ + public static final GuardrailsSupport PREVIEW = fromString("Preview"); + + /** + * The version is stable and can be used on critical production clusters. + */ + public static final GuardrailsSupport STABLE = fromString("Stable"); + + /** + * Creates a new instance of GuardrailsSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GuardrailsSupport() { + } + + /** + * Creates or finds a GuardrailsSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding GuardrailsSupport. + */ + public static GuardrailsSupport fromString(String name) { + return fromString(name, GuardrailsSupport.class); + } + + /** + * Gets known GuardrailsSupport values. + * + * @return known GuardrailsSupport values. + */ + public static Collection values() { + return values(GuardrailsSupport.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/HardEvictionThreshold.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/HardEvictionThreshold.java new file mode 100644 index 000000000000..d9dd276db496 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/HardEvictionThreshold.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Hard eviction thresholds for kubelet. These thresholds trigger pod eviction when node resources drop below the + * specified values. Values must be greater than or equal to the documented minimums for each signal. Supported formats + * are Ki, Mi, Gi, or percentages using %. + */ +@Fluent +public final class HardEvictionThreshold implements JsonSerializable { + /* + * The threshold for available memory below which pod eviction is triggered. Accepts absolute values (e.g. '500Mi') + * or percentage values (e.g. '5%'). Absolute values must be greater than or equal to 100Mi. Percentage values must + * be greater than or equal to 2%. + */ + private String memoryAvailable; + + /* + * The threshold for available node filesystem space below which pod eviction is triggered. Accepts absolute values + * (e.g. '1Gi') or percentage values (e.g. '10%'). Must be greater than or equal to the system default of 10%. + */ + private String nodeFsAvailable; + + /* + * The threshold for available inodes on the node filesystem below which pod eviction is triggered. Accepts absolute + * inode counts (e.g. '100000') or percentage values (e.g. '5%'). Percentage values must be greater than or equal to + * the system default of 5%. + */ + private String nodeFsInodesFree; + + /** + * Creates an instance of HardEvictionThreshold class. + */ + public HardEvictionThreshold() { + } + + /** + * Get the memoryAvailable property: The threshold for available memory below which pod eviction is triggered. + * Accepts absolute values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute values must be greater than or + * equal to 100Mi. Percentage values must be greater than or equal to 2%. + * + * @return the memoryAvailable value. + */ + public String memoryAvailable() { + return this.memoryAvailable; + } + + /** + * Set the memoryAvailable property: The threshold for available memory below which pod eviction is triggered. + * Accepts absolute values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute values must be greater than or + * equal to 100Mi. Percentage values must be greater than or equal to 2%. + * + * @param memoryAvailable the memoryAvailable value to set. + * @return the HardEvictionThreshold object itself. + */ + public HardEvictionThreshold withMemoryAvailable(String memoryAvailable) { + this.memoryAvailable = memoryAvailable; + return this; + } + + /** + * Get the nodeFsAvailable property: The threshold for available node filesystem space below which pod eviction is + * triggered. Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). Must be greater than or equal + * to the system default of 10%. + * + * @return the nodeFsAvailable value. + */ + public String nodeFsAvailable() { + return this.nodeFsAvailable; + } + + /** + * Set the nodeFsAvailable property: The threshold for available node filesystem space below which pod eviction is + * triggered. Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). Must be greater than or equal + * to the system default of 10%. + * + * @param nodeFsAvailable the nodeFsAvailable value to set. + * @return the HardEvictionThreshold object itself. + */ + public HardEvictionThreshold withNodeFsAvailable(String nodeFsAvailable) { + this.nodeFsAvailable = nodeFsAvailable; + return this; + } + + /** + * Get the nodeFsInodesFree property: The threshold for available inodes on the node filesystem below which pod + * eviction is triggered. Accepts absolute inode counts (e.g. '100000') or percentage values (e.g. '5%'). Percentage + * values must be greater than or equal to the system default of 5%. + * + * @return the nodeFsInodesFree value. + */ + public String nodeFsInodesFree() { + return this.nodeFsInodesFree; + } + + /** + * Set the nodeFsInodesFree property: The threshold for available inodes on the node filesystem below which pod + * eviction is triggered. Accepts absolute inode counts (e.g. '100000') or percentage values (e.g. '5%'). Percentage + * values must be greater than or equal to the system default of 5%. + * + * @param nodeFsInodesFree the nodeFsInodesFree value to set. + * @return the HardEvictionThreshold object itself. + */ + public HardEvictionThreshold withNodeFsInodesFree(String nodeFsInodesFree) { + this.nodeFsInodesFree = nodeFsInodesFree; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("memoryAvailable", this.memoryAvailable); + jsonWriter.writeStringField("nodeFsAvailable", this.nodeFsAvailable); + jsonWriter.writeStringField("nodeFsInodesFree", this.nodeFsInodesFree); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HardEvictionThreshold from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HardEvictionThreshold if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the HardEvictionThreshold. + */ + public static HardEvictionThreshold fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HardEvictionThreshold deserializedHardEvictionThreshold = new HardEvictionThreshold(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("memoryAvailable".equals(fieldName)) { + deserializedHardEvictionThreshold.memoryAvailable = reader.getString(); + } else if ("nodeFsAvailable".equals(fieldName)) { + deserializedHardEvictionThreshold.nodeFsAvailable = reader.getString(); + } else if ("nodeFsInodesFree".equals(fieldName)) { + deserializedHardEvictionThreshold.nodeFsInodesFree = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHardEvictionThreshold; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java index 29c4711af8ef..994aaa64f70b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java @@ -11,6 +11,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * IdentityBinding properties. @@ -32,6 +33,16 @@ public final class IdentityBindingProperties implements JsonSerializable allowedSubjects; + /** * Creates an instance of IdentityBindingProperties class. */ @@ -76,6 +87,36 @@ public IdentityBindingProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the allowedSubjects property: Optional list of subjects authorized to use this identity binding for + * token exchange. Each entry pairs a required namespace label selector + * with an optional service account label selector; selectors within an + * entry are AND'd, and multiple entries are OR'd. When omitted or empty, + * authorization falls back exclusively to ClusterRole/ClusterRoleBinding + * evaluation. Maximum 100 entries. + * + * @return the allowedSubjects value. + */ + public List allowedSubjects() { + return this.allowedSubjects; + } + + /** + * Set the allowedSubjects property: Optional list of subjects authorized to use this identity binding for + * token exchange. Each entry pairs a required namespace label selector + * with an optional service account label selector; selectors within an + * entry are AND'd, and multiple entries are OR'd. When omitted or empty, + * authorization falls back exclusively to ClusterRole/ClusterRoleBinding + * evaluation. Maximum 100 entries. + * + * @param allowedSubjects the allowedSubjects value to set. + * @return the IdentityBindingProperties object itself. + */ + public IdentityBindingProperties withAllowedSubjects(List allowedSubjects) { + this.allowedSubjects = allowedSubjects; + return this; + } + /** * Validates the instance. * @@ -92,6 +133,9 @@ public void validate() { if (oidcIssuer() != null) { oidcIssuer().validate(); } + if (allowedSubjects() != null) { + allowedSubjects().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingProperties.class); @@ -103,6 +147,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("managedIdentity", this.managedIdentity); + jsonWriter.writeArrayField("allowedSubjects", this.allowedSubjects, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -131,6 +177,10 @@ public static IdentityBindingProperties fromJson(JsonReader jsonReader) throws I } else if ("provisioningState".equals(fieldName)) { deserializedIdentityBindingProperties.provisioningState = IdentityBindingProvisioningState.fromString(reader.getString()); + } else if ("allowedSubjects".equals(fieldName)) { + List allowedSubjects + = reader.readArray(reader1 -> AllowedSubject.fromJson(reader1)); + deserializedIdentityBindingProperties.allowedSubjects = allowedSubjects; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java new file mode 100644 index 000000000000..9cadce7b0ef2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. + */ +public final class IpvsScheduler extends ExpandableStringEnum { + /** + * Round Robin. + */ + public static final IpvsScheduler ROUND_ROBIN = fromString("RoundRobin"); + + /** + * Least Connection. + */ + public static final IpvsScheduler LEAST_CONNECTION = fromString("LeastConnection"); + + /** + * Creates a new instance of IpvsScheduler value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpvsScheduler() { + } + + /** + * Creates or finds a IpvsScheduler from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpvsScheduler. + */ + public static IpvsScheduler fromString(String name) { + return fromString(name, IpvsScheduler.class); + } + + /** + * Gets known IpvsScheduler values. + * + * @return known IpvsScheduler values. + */ + public static Collection values() { + return values(IpvsScheduler.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappingExpression.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappingExpression.java new file mode 100644 index 000000000000..493002409c82 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappingExpression.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The claim mapping expression for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorClaimMappingExpression + implements JsonSerializable { + /* + * The CEL expression used to access token claims. + */ + private String expression; + + /** + * Creates an instance of JWTAuthenticatorClaimMappingExpression class. + */ + public JWTAuthenticatorClaimMappingExpression() { + } + + /** + * Get the expression property: The CEL expression used to access token claims. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: The CEL expression used to access token claims. + * + * @param expression the expression value to set. + * @return the JWTAuthenticatorClaimMappingExpression object itself. + */ + public JWTAuthenticatorClaimMappingExpression withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (expression() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property expression in model JWTAuthenticatorClaimMappingExpression")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorClaimMappingExpression.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("expression", this.expression); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorClaimMappingExpression from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorClaimMappingExpression if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorClaimMappingExpression. + */ + public static JWTAuthenticatorClaimMappingExpression fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorClaimMappingExpression deserializedJWTAuthenticatorClaimMappingExpression + = new JWTAuthenticatorClaimMappingExpression(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expression".equals(fieldName)) { + deserializedJWTAuthenticatorClaimMappingExpression.expression = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorClaimMappingExpression; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappings.java new file mode 100644 index 000000000000..8be5ddc596ff --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappings.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The claim mappings for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorClaimMappings implements JsonSerializable { + /* + * The expression to extract username attribute from the token claims. + */ + private JWTAuthenticatorClaimMappingExpression username; + + /* + * The expression to extract groups attribute from the token claims. When not provided, no groups are extracted from + * the token claims. + */ + private JWTAuthenticatorClaimMappingExpression groups; + + /* + * The expression to extract uid attribute from the token claims. When not provided, no uid is extracted from the + * token claims. + */ + private JWTAuthenticatorClaimMappingExpression uid; + + /* + * The expression to extract extra attribute from the token claims. When not provided, no extra attributes are + * extracted from the token claims. + */ + private List extra; + + /** + * Creates an instance of JWTAuthenticatorClaimMappings class. + */ + public JWTAuthenticatorClaimMappings() { + } + + /** + * Get the username property: The expression to extract username attribute from the token claims. + * + * @return the username value. + */ + public JWTAuthenticatorClaimMappingExpression username() { + return this.username; + } + + /** + * Set the username property: The expression to extract username attribute from the token claims. + * + * @param username the username value to set. + * @return the JWTAuthenticatorClaimMappings object itself. + */ + public JWTAuthenticatorClaimMappings withUsername(JWTAuthenticatorClaimMappingExpression username) { + this.username = username; + return this; + } + + /** + * Get the groups property: The expression to extract groups attribute from the token claims. When not provided, no + * groups are extracted from the token claims. + * + * @return the groups value. + */ + public JWTAuthenticatorClaimMappingExpression groups() { + return this.groups; + } + + /** + * Set the groups property: The expression to extract groups attribute from the token claims. When not provided, no + * groups are extracted from the token claims. + * + * @param groups the groups value to set. + * @return the JWTAuthenticatorClaimMappings object itself. + */ + public JWTAuthenticatorClaimMappings withGroups(JWTAuthenticatorClaimMappingExpression groups) { + this.groups = groups; + return this; + } + + /** + * Get the uid property: The expression to extract uid attribute from the token claims. When not provided, no uid is + * extracted from the token claims. + * + * @return the uid value. + */ + public JWTAuthenticatorClaimMappingExpression uid() { + return this.uid; + } + + /** + * Set the uid property: The expression to extract uid attribute from the token claims. When not provided, no uid is + * extracted from the token claims. + * + * @param uid the uid value to set. + * @return the JWTAuthenticatorClaimMappings object itself. + */ + public JWTAuthenticatorClaimMappings withUid(JWTAuthenticatorClaimMappingExpression uid) { + this.uid = uid; + return this; + } + + /** + * Get the extra property: The expression to extract extra attribute from the token claims. When not provided, no + * extra attributes are extracted from the token claims. + * + * @return the extra value. + */ + public List extra() { + return this.extra; + } + + /** + * Set the extra property: The expression to extract extra attribute from the token claims. When not provided, no + * extra attributes are extracted from the token claims. + * + * @param extra the extra value to set. + * @return the JWTAuthenticatorClaimMappings object itself. + */ + public JWTAuthenticatorClaimMappings withExtra(List extra) { + this.extra = extra; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (username() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property username in model JWTAuthenticatorClaimMappings")); + } else { + username().validate(); + } + if (groups() != null) { + groups().validate(); + } + if (uid() != null) { + uid().validate(); + } + if (extra() != null) { + extra().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorClaimMappings.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("username", this.username); + jsonWriter.writeJsonField("groups", this.groups); + jsonWriter.writeJsonField("uid", this.uid); + jsonWriter.writeArrayField("extra", this.extra, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorClaimMappings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorClaimMappings if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorClaimMappings. + */ + public static JWTAuthenticatorClaimMappings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorClaimMappings deserializedJWTAuthenticatorClaimMappings + = new JWTAuthenticatorClaimMappings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedJWTAuthenticatorClaimMappings.username + = JWTAuthenticatorClaimMappingExpression.fromJson(reader); + } else if ("groups".equals(fieldName)) { + deserializedJWTAuthenticatorClaimMappings.groups + = JWTAuthenticatorClaimMappingExpression.fromJson(reader); + } else if ("uid".equals(fieldName)) { + deserializedJWTAuthenticatorClaimMappings.uid + = JWTAuthenticatorClaimMappingExpression.fromJson(reader); + } else if ("extra".equals(fieldName)) { + List extra + = reader.readArray(reader1 -> JWTAuthenticatorExtraClaimMappingExpression.fromJson(reader1)); + deserializedJWTAuthenticatorClaimMappings.extra = extra; + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorClaimMappings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorExtraClaimMappingExpression.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorExtraClaimMappingExpression.java new file mode 100644 index 000000000000..ea33ba837a84 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorExtraClaimMappingExpression.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The extra claim mapping expression for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorExtraClaimMappingExpression + implements JsonSerializable { + /* + * The key of the extra attribute. + */ + private String key; + + /* + * The CEL expression used to extract the value of the extra attribute. + */ + private String valueExpression; + + /** + * Creates an instance of JWTAuthenticatorExtraClaimMappingExpression class. + */ + public JWTAuthenticatorExtraClaimMappingExpression() { + } + + /** + * Get the key property: The key of the extra attribute. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The key of the extra attribute. + * + * @param key the key value to set. + * @return the JWTAuthenticatorExtraClaimMappingExpression object itself. + */ + public JWTAuthenticatorExtraClaimMappingExpression withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the valueExpression property: The CEL expression used to extract the value of the extra attribute. + * + * @return the valueExpression value. + */ + public String valueExpression() { + return this.valueExpression; + } + + /** + * Set the valueExpression property: The CEL expression used to extract the value of the extra attribute. + * + * @param valueExpression the valueExpression value to set. + * @return the JWTAuthenticatorExtraClaimMappingExpression object itself. + */ + public JWTAuthenticatorExtraClaimMappingExpression withValueExpression(String valueExpression) { + this.valueExpression = valueExpression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (key() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property key in model JWTAuthenticatorExtraClaimMappingExpression")); + } + if (valueExpression() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property valueExpression in model JWTAuthenticatorExtraClaimMappingExpression")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorExtraClaimMappingExpression.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("valueExpression", this.valueExpression); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorExtraClaimMappingExpression from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorExtraClaimMappingExpression if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorExtraClaimMappingExpression. + */ + public static JWTAuthenticatorExtraClaimMappingExpression fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorExtraClaimMappingExpression deserializedJWTAuthenticatorExtraClaimMappingExpression + = new JWTAuthenticatorExtraClaimMappingExpression(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedJWTAuthenticatorExtraClaimMappingExpression.key = reader.getString(); + } else if ("valueExpression".equals(fieldName)) { + deserializedJWTAuthenticatorExtraClaimMappingExpression.valueExpression = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorExtraClaimMappingExpression; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorIssuer.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorIssuer.java new file mode 100644 index 000000000000..1bbde0a29e9d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorIssuer.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The OIDC issuer details for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorIssuer implements JsonSerializable { + /* + * The issuer URL. The URL must begin with the scheme https and cannot contain a query string or fragment. This must + * match the "iss" claim in the presented JWT, and the issuer returned from discovery. + */ + private String url; + + /* + * The set of acceptable audiences the JWT must be issued to. At least one is required. When multiple is set, + * AudienceMatchPolicy is used in API Server configuration. + */ + private List audiences; + + /** + * Creates an instance of JWTAuthenticatorIssuer class. + */ + public JWTAuthenticatorIssuer() { + } + + /** + * Get the url property: The issuer URL. The URL must begin with the scheme https and cannot contain a query string + * or fragment. This must match the "iss" claim in the presented JWT, and the issuer returned from discovery. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: The issuer URL. The URL must begin with the scheme https and cannot contain a query string + * or fragment. This must match the "iss" claim in the presented JWT, and the issuer returned from discovery. + * + * @param url the url value to set. + * @return the JWTAuthenticatorIssuer object itself. + */ + public JWTAuthenticatorIssuer withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the audiences property: The set of acceptable audiences the JWT must be issued to. At least one is required. + * When multiple is set, AudienceMatchPolicy is used in API Server configuration. + * + * @return the audiences value. + */ + public List audiences() { + return this.audiences; + } + + /** + * Set the audiences property: The set of acceptable audiences the JWT must be issued to. At least one is required. + * When multiple is set, AudienceMatchPolicy is used in API Server configuration. + * + * @param audiences the audiences value to set. + * @return the JWTAuthenticatorIssuer object itself. + */ + public JWTAuthenticatorIssuer withAudiences(List audiences) { + this.audiences = audiences; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (url() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property url in model JWTAuthenticatorIssuer")); + } + if (audiences() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property audiences in model JWTAuthenticatorIssuer")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorIssuer.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeArrayField("audiences", this.audiences, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorIssuer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorIssuer if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorIssuer. + */ + public static JWTAuthenticatorIssuer fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorIssuer deserializedJWTAuthenticatorIssuer = new JWTAuthenticatorIssuer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("url".equals(fieldName)) { + deserializedJWTAuthenticatorIssuer.url = reader.getString(); + } else if ("audiences".equals(fieldName)) { + List audiences = reader.readArray(reader1 -> reader1.getString()); + deserializedJWTAuthenticatorIssuer.audiences = audiences; + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorIssuer; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProperties.java new file mode 100644 index 000000000000..00a627ec7a54 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProperties.java @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The properties of JWTAuthenticator. For details on how to configure the properties of a JWT authenticator, please + * refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. Please + * note that not all fields available in the Kubernetes documentation are supported by AKS. For troubleshooting, please + * see https://aka.ms/aks-external-issuers-docs. + */ +@Fluent +public final class JWTAuthenticatorProperties implements JsonSerializable { + /* + * The current provisioning state of the JWT authenticator. + */ + private JWTAuthenticatorProvisioningState provisioningState; + + /* + * The JWT OIDC issuer details. + */ + private JWTAuthenticatorIssuer issuer; + + /* + * The rules that are applied to validate token claims to authenticate users. All the expressions must evaluate to + * true for validation to succeed. + */ + private List claimValidationRules; + + /* + * The mappings that define how user attributes are extracted from the token claims. + */ + private JWTAuthenticatorClaimMappings claimMappings; + + /* + * The rules that are applied to the mapped user before completing authentication. All the expressions must evaluate + * to true for validation to succeed. + */ + private List userValidationRules; + + /* + * PEM-encoded CA certificate bundle used to validate the connection when fetching discovery information. Use this + * for issuer endpoints that use private certificate authorities + * or environments where TLS inspection is performed. + * + * The bundle must contain only CERTIFICATE PEM blocks, up to 10 CA certificates, and must be no larger than 20 KB + * in total. Include all CA certificates needed to validate + * the issuer endpoint's TLS certificate. Certificate revocation checking is not supported. + * + * If provided, only these CAs are trusted instead of the well-known root CAs. + * If not provided and the managed cluster's properties.securityProfile.customCATrustCertificates is set, those + * certificates will be used instead. Otherwise, only the well-known + * root CAs are trusted. + */ + private String certificateAuthorityBundle; + + /** + * Creates an instance of JWTAuthenticatorProperties class. + */ + public JWTAuthenticatorProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state of the JWT authenticator. + * + * @return the provisioningState value. + */ + public JWTAuthenticatorProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the issuer property: The JWT OIDC issuer details. + * + * @return the issuer value. + */ + public JWTAuthenticatorIssuer issuer() { + return this.issuer; + } + + /** + * Set the issuer property: The JWT OIDC issuer details. + * + * @param issuer the issuer value to set. + * @return the JWTAuthenticatorProperties object itself. + */ + public JWTAuthenticatorProperties withIssuer(JWTAuthenticatorIssuer issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get the claimValidationRules property: The rules that are applied to validate token claims to authenticate users. + * All the expressions must evaluate to true for validation to succeed. + * + * @return the claimValidationRules value. + */ + public List claimValidationRules() { + return this.claimValidationRules; + } + + /** + * Set the claimValidationRules property: The rules that are applied to validate token claims to authenticate users. + * All the expressions must evaluate to true for validation to succeed. + * + * @param claimValidationRules the claimValidationRules value to set. + * @return the JWTAuthenticatorProperties object itself. + */ + public JWTAuthenticatorProperties + withClaimValidationRules(List claimValidationRules) { + this.claimValidationRules = claimValidationRules; + return this; + } + + /** + * Get the claimMappings property: The mappings that define how user attributes are extracted from the token claims. + * + * @return the claimMappings value. + */ + public JWTAuthenticatorClaimMappings claimMappings() { + return this.claimMappings; + } + + /** + * Set the claimMappings property: The mappings that define how user attributes are extracted from the token claims. + * + * @param claimMappings the claimMappings value to set. + * @return the JWTAuthenticatorProperties object itself. + */ + public JWTAuthenticatorProperties withClaimMappings(JWTAuthenticatorClaimMappings claimMappings) { + this.claimMappings = claimMappings; + return this; + } + + /** + * Get the userValidationRules property: The rules that are applied to the mapped user before completing + * authentication. All the expressions must evaluate to true for validation to succeed. + * + * @return the userValidationRules value. + */ + public List userValidationRules() { + return this.userValidationRules; + } + + /** + * Set the userValidationRules property: The rules that are applied to the mapped user before completing + * authentication. All the expressions must evaluate to true for validation to succeed. + * + * @param userValidationRules the userValidationRules value to set. + * @return the JWTAuthenticatorProperties object itself. + */ + public JWTAuthenticatorProperties + withUserValidationRules(List userValidationRules) { + this.userValidationRules = userValidationRules; + return this; + } + + /** + * Get the certificateAuthorityBundle property: PEM-encoded CA certificate bundle used to validate the connection + * when fetching discovery information. Use this for issuer endpoints that use private certificate authorities + * or environments where TLS inspection is performed. + * + * The bundle must contain only CERTIFICATE PEM blocks, up to 10 CA certificates, and must be no larger than 20 KB + * in total. Include all CA certificates needed to validate + * the issuer endpoint's TLS certificate. Certificate revocation checking is not supported. + * + * If provided, only these CAs are trusted instead of the well-known root CAs. + * If not provided and the managed cluster's properties.securityProfile.customCATrustCertificates is set, those + * certificates will be used instead. Otherwise, only the well-known + * root CAs are trusted. + * + * @return the certificateAuthorityBundle value. + */ + public String certificateAuthorityBundle() { + return this.certificateAuthorityBundle; + } + + /** + * Set the certificateAuthorityBundle property: PEM-encoded CA certificate bundle used to validate the connection + * when fetching discovery information. Use this for issuer endpoints that use private certificate authorities + * or environments where TLS inspection is performed. + * + * The bundle must contain only CERTIFICATE PEM blocks, up to 10 CA certificates, and must be no larger than 20 KB + * in total. Include all CA certificates needed to validate + * the issuer endpoint's TLS certificate. Certificate revocation checking is not supported. + * + * If provided, only these CAs are trusted instead of the well-known root CAs. + * If not provided and the managed cluster's properties.securityProfile.customCATrustCertificates is set, those + * certificates will be used instead. Otherwise, only the well-known + * root CAs are trusted. + * + * @param certificateAuthorityBundle the certificateAuthorityBundle value to set. + * @return the JWTAuthenticatorProperties object itself. + */ + public JWTAuthenticatorProperties withCertificateAuthorityBundle(String certificateAuthorityBundle) { + this.certificateAuthorityBundle = certificateAuthorityBundle; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (issuer() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property issuer in model JWTAuthenticatorProperties")); + } else { + issuer().validate(); + } + if (claimValidationRules() != null) { + claimValidationRules().forEach(e -> e.validate()); + } + if (claimMappings() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property claimMappings in model JWTAuthenticatorProperties")); + } else { + claimMappings().validate(); + } + if (userValidationRules() != null) { + userValidationRules().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("issuer", this.issuer); + jsonWriter.writeJsonField("claimMappings", this.claimMappings); + jsonWriter.writeArrayField("claimValidationRules", this.claimValidationRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("userValidationRules", this.userValidationRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("certificateAuthorityBundle", this.certificateAuthorityBundle); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorProperties. + */ + public static JWTAuthenticatorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorProperties deserializedJWTAuthenticatorProperties = new JWTAuthenticatorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("issuer".equals(fieldName)) { + deserializedJWTAuthenticatorProperties.issuer = JWTAuthenticatorIssuer.fromJson(reader); + } else if ("claimMappings".equals(fieldName)) { + deserializedJWTAuthenticatorProperties.claimMappings + = JWTAuthenticatorClaimMappings.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedJWTAuthenticatorProperties.provisioningState + = JWTAuthenticatorProvisioningState.fromString(reader.getString()); + } else if ("claimValidationRules".equals(fieldName)) { + List claimValidationRules + = reader.readArray(reader1 -> JWTAuthenticatorValidationRule.fromJson(reader1)); + deserializedJWTAuthenticatorProperties.claimValidationRules = claimValidationRules; + } else if ("userValidationRules".equals(fieldName)) { + List userValidationRules + = reader.readArray(reader1 -> JWTAuthenticatorValidationRule.fromJson(reader1)); + deserializedJWTAuthenticatorProperties.userValidationRules = userValidationRules; + } else if ("certificateAuthorityBundle".equals(fieldName)) { + deserializedJWTAuthenticatorProperties.certificateAuthorityBundle = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProvisioningState.java new file mode 100644 index 000000000000..3cb2ef6a9d1d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the last accepted operation. + */ +public final class JWTAuthenticatorProvisioningState extends ExpandableStringEnum { + /** + * Resource has been created. + */ + public static final JWTAuthenticatorProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Resource creation failed. + */ + public static final JWTAuthenticatorProvisioningState FAILED = fromString("Failed"); + + /** + * Resource creation was canceled. + */ + public static final JWTAuthenticatorProvisioningState CANCELED = fromString("Canceled"); + + /** + * The JWT authenticator is being created. + */ + public static final JWTAuthenticatorProvisioningState CREATING = fromString("Creating"); + + /** + * The JWT authenticator is being updated. + */ + public static final JWTAuthenticatorProvisioningState UPDATING = fromString("Updating"); + + /** + * The JWT authenticator is being deleted. + */ + public static final JWTAuthenticatorProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of JWTAuthenticatorProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JWTAuthenticatorProvisioningState() { + } + + /** + * Creates or finds a JWTAuthenticatorProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding JWTAuthenticatorProvisioningState. + */ + public static JWTAuthenticatorProvisioningState fromString(String name) { + return fromString(name, JWTAuthenticatorProvisioningState.class); + } + + /** + * Gets known JWTAuthenticatorProvisioningState values. + * + * @return known JWTAuthenticatorProvisioningState values. + */ + public static Collection values() { + return values(JWTAuthenticatorProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorValidationRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorValidationRule.java new file mode 100644 index 000000000000..ba7efd902605 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorValidationRule.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The validation rule for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorValidationRule implements JsonSerializable { + /* + * The CEL expression used to validate the claim or attribute. + */ + private String expression; + + /* + * The validation error message. + */ + private String message; + + /** + * Creates an instance of JWTAuthenticatorValidationRule class. + */ + public JWTAuthenticatorValidationRule() { + } + + /** + * Get the expression property: The CEL expression used to validate the claim or attribute. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: The CEL expression used to validate the claim or attribute. + * + * @param expression the expression value to set. + * @return the JWTAuthenticatorValidationRule object itself. + */ + public JWTAuthenticatorValidationRule withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Get the message property: The validation error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The validation error message. + * + * @param message the message value to set. + * @return the JWTAuthenticatorValidationRule object itself. + */ + public JWTAuthenticatorValidationRule withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (expression() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property expression in model JWTAuthenticatorValidationRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorValidationRule.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("expression", this.expression); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorValidationRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorValidationRule if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorValidationRule. + */ + public static JWTAuthenticatorValidationRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorValidationRule deserializedJWTAuthenticatorValidationRule + = new JWTAuthenticatorValidationRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expression".equals(fieldName)) { + deserializedJWTAuthenticatorValidationRule.expression = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedJWTAuthenticatorValidationRule.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorValidationRule; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeReserved.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeReserved.java new file mode 100644 index 000000000000..e386a02559d2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeReserved.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Kube-reserved values for kubelet. When a value is not set, the system-computed default based on VM size is used. See + * [AKS node resource reservations](https://aka.ms/aks/nodereservations) for details on computed defaults. Only + * applicable for Linux nodepools. + */ +@Fluent +public final class KubeReserved implements JsonSerializable { + /* + * The amount of CPU reserved for Kubernetes system daemons, in millicores. Must be greater than or equal to 140. + * For example, a value of 200 means 200m (0.2 CPU cores). + */ + private Integer cpuMillicores; + + /* + * The amount of memory reserved for Kubernetes system daemons, in MiB. Must be greater than or equal to 750. + */ + private Integer memoryMB; + + /** + * Creates an instance of KubeReserved class. + */ + public KubeReserved() { + } + + /** + * Get the cpuMillicores property: The amount of CPU reserved for Kubernetes system daemons, in millicores. Must be + * greater than or equal to 140. For example, a value of 200 means 200m (0.2 CPU cores). + * + * @return the cpuMillicores value. + */ + public Integer cpuMillicores() { + return this.cpuMillicores; + } + + /** + * Set the cpuMillicores property: The amount of CPU reserved for Kubernetes system daemons, in millicores. Must be + * greater than or equal to 140. For example, a value of 200 means 200m (0.2 CPU cores). + * + * @param cpuMillicores the cpuMillicores value to set. + * @return the KubeReserved object itself. + */ + public KubeReserved withCpuMillicores(Integer cpuMillicores) { + this.cpuMillicores = cpuMillicores; + return this; + } + + /** + * Get the memoryMB property: The amount of memory reserved for Kubernetes system daemons, in MiB. Must be greater + * than or equal to 750. + * + * @return the memoryMB value. + */ + public Integer memoryMB() { + return this.memoryMB; + } + + /** + * Set the memoryMB property: The amount of memory reserved for Kubernetes system daemons, in MiB. Must be greater + * than or equal to 750. + * + * @param memoryMB the memoryMB value to set. + * @return the KubeReserved object itself. + */ + public KubeReserved withMemoryMB(Integer memoryMB) { + this.memoryMB = memoryMB; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("cpuMillicores", this.cpuMillicores); + jsonWriter.writeNumberField("memoryMB", this.memoryMB); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubeReserved from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubeReserved if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the KubeReserved. + */ + public static KubeReserved fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubeReserved deserializedKubeReserved = new KubeReserved(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("cpuMillicores".equals(fieldName)) { + deserializedKubeReserved.cpuMillicores = reader.getNullable(JsonReader::getInt); + } else if ("memoryMB".equals(fieldName)) { + deserializedKubeReserved.memoryMB = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedKubeReserved; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java index d07302d31b09..b6de4bf2322d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java @@ -81,6 +81,50 @@ public final class KubeletConfig implements JsonSerializable { */ private Integer podMaxPids; + /* + * Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by + * default. + */ + private SeccompDefault seccompDefault; + + /* + * Kube-reserved values for kubelet. When a value is not set, the system-computed default based on VM size is used. + * See [AKS node resource reservations](https://aka.ms/aks/nodereservations) for details on computed defaults. Only + * applicable for Linux nodepools. + */ + private KubeReserved kubeReserved; + + /* + * Hard eviction thresholds for kubelet. When a threshold is not set, the system default is used. See [AKS node + * resource reservations](https://aka.ms/aks/nodereservations) for details on computed defaults. Only applicable for + * Linux nodepools. + */ + private HardEvictionThreshold hardEvictionThreshold; + + /* + * Soft eviction thresholds for kubelet. When crossed, pods are evicted after the paired softEvictionGracePeriod. + * System defaults apply when the cluster's `enableNodeHardening` property is true; otherwise no soft eviction is + * configured. For each signal (memoryAvailable, nodeFsAvailable, nodeFsInodesFree), the entries in + * softEvictionThreshold and softEvictionGracePeriod must be in the same state: both omitted (default), both + * non-empty (override), or both empty strings (opt that signal out). Only applicable for Linux nodepools. See + * https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#soft-eviction-thresholds. + */ + private SoftEvictionThreshold softEvictionThreshold; + + /* + * Grace periods for soft eviction signals — how long a threshold must be held before pod eviction. Same defaulting + * and pairing rules as softEvictionThreshold. Values are Go-style duration strings (e.g. '1m30s'); supported units + * are 'ns', 'us', 'ms', 's', 'm', and 'h'. Only applicable for Linux nodepools. + */ + private SoftEvictionGracePeriod softEvictionGracePeriod; + + /* + * Maximum grace period, in seconds, for pods to terminate during a soft eviction; caps the pod's + * terminationGracePeriodSeconds. Default is 60, applied when the cluster's `enableNodeHardening` property is true. + * Only applicable for Linux nodepools. + */ + private Integer evictionMaxPodGracePeriodInSeconds; + /** * Creates an instance of KubeletConfig class. */ @@ -331,12 +375,176 @@ public KubeletConfig withPodMaxPids(Integer podMaxPids) { return this; } + /** + * Get the seccompDefault property: Specifies the default seccomp profile applied to all workloads. If not + * specified, 'Unconfined' will be used by default. + * + * @return the seccompDefault value. + */ + public SeccompDefault seccompDefault() { + return this.seccompDefault; + } + + /** + * Set the seccompDefault property: Specifies the default seccomp profile applied to all workloads. If not + * specified, 'Unconfined' will be used by default. + * + * @param seccompDefault the seccompDefault value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withSeccompDefault(SeccompDefault seccompDefault) { + this.seccompDefault = seccompDefault; + return this; + } + + /** + * Get the kubeReserved property: Kube-reserved values for kubelet. When a value is not set, the system-computed + * default based on VM size is used. See [AKS node resource reservations](https://aka.ms/aks/nodereservations) for + * details on computed defaults. Only applicable for Linux nodepools. + * + * @return the kubeReserved value. + */ + public KubeReserved kubeReserved() { + return this.kubeReserved; + } + + /** + * Set the kubeReserved property: Kube-reserved values for kubelet. When a value is not set, the system-computed + * default based on VM size is used. See [AKS node resource reservations](https://aka.ms/aks/nodereservations) for + * details on computed defaults. Only applicable for Linux nodepools. + * + * @param kubeReserved the kubeReserved value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withKubeReserved(KubeReserved kubeReserved) { + this.kubeReserved = kubeReserved; + return this; + } + + /** + * Get the hardEvictionThreshold property: Hard eviction thresholds for kubelet. When a threshold is not set, the + * system default is used. See [AKS node resource reservations](https://aka.ms/aks/nodereservations) for details on + * computed defaults. Only applicable for Linux nodepools. + * + * @return the hardEvictionThreshold value. + */ + public HardEvictionThreshold hardEvictionThreshold() { + return this.hardEvictionThreshold; + } + + /** + * Set the hardEvictionThreshold property: Hard eviction thresholds for kubelet. When a threshold is not set, the + * system default is used. See [AKS node resource reservations](https://aka.ms/aks/nodereservations) for details on + * computed defaults. Only applicable for Linux nodepools. + * + * @param hardEvictionThreshold the hardEvictionThreshold value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withHardEvictionThreshold(HardEvictionThreshold hardEvictionThreshold) { + this.hardEvictionThreshold = hardEvictionThreshold; + return this; + } + + /** + * Get the softEvictionThreshold property: Soft eviction thresholds for kubelet. When crossed, pods are evicted + * after the paired softEvictionGracePeriod. System defaults apply when the cluster's `enableNodeHardening` property + * is true; otherwise no soft eviction is configured. For each signal (memoryAvailable, nodeFsAvailable, + * nodeFsInodesFree), the entries in softEvictionThreshold and softEvictionGracePeriod must be in the same state: + * both omitted (default), both non-empty (override), or both empty strings (opt that signal out). Only applicable + * for Linux nodepools. See + * https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#soft-eviction-thresholds. + * + * @return the softEvictionThreshold value. + */ + public SoftEvictionThreshold softEvictionThreshold() { + return this.softEvictionThreshold; + } + + /** + * Set the softEvictionThreshold property: Soft eviction thresholds for kubelet. When crossed, pods are evicted + * after the paired softEvictionGracePeriod. System defaults apply when the cluster's `enableNodeHardening` property + * is true; otherwise no soft eviction is configured. For each signal (memoryAvailable, nodeFsAvailable, + * nodeFsInodesFree), the entries in softEvictionThreshold and softEvictionGracePeriod must be in the same state: + * both omitted (default), both non-empty (override), or both empty strings (opt that signal out). Only applicable + * for Linux nodepools. See + * https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#soft-eviction-thresholds. + * + * @param softEvictionThreshold the softEvictionThreshold value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withSoftEvictionThreshold(SoftEvictionThreshold softEvictionThreshold) { + this.softEvictionThreshold = softEvictionThreshold; + return this; + } + + /** + * Get the softEvictionGracePeriod property: Grace periods for soft eviction signals — how long a threshold must be + * held before pod eviction. Same defaulting and pairing rules as softEvictionThreshold. Values are Go-style + * duration strings (e.g. '1m30s'); supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Only applicable for + * Linux nodepools. + * + * @return the softEvictionGracePeriod value. + */ + public SoftEvictionGracePeriod softEvictionGracePeriod() { + return this.softEvictionGracePeriod; + } + + /** + * Set the softEvictionGracePeriod property: Grace periods for soft eviction signals — how long a threshold must be + * held before pod eviction. Same defaulting and pairing rules as softEvictionThreshold. Values are Go-style + * duration strings (e.g. '1m30s'); supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Only applicable for + * Linux nodepools. + * + * @param softEvictionGracePeriod the softEvictionGracePeriod value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withSoftEvictionGracePeriod(SoftEvictionGracePeriod softEvictionGracePeriod) { + this.softEvictionGracePeriod = softEvictionGracePeriod; + return this; + } + + /** + * Get the evictionMaxPodGracePeriodInSeconds property: Maximum grace period, in seconds, for pods to terminate + * during a soft eviction; caps the pod's terminationGracePeriodSeconds. Default is 60, applied when the cluster's + * `enableNodeHardening` property is true. Only applicable for Linux nodepools. + * + * @return the evictionMaxPodGracePeriodInSeconds value. + */ + public Integer evictionMaxPodGracePeriodInSeconds() { + return this.evictionMaxPodGracePeriodInSeconds; + } + + /** + * Set the evictionMaxPodGracePeriodInSeconds property: Maximum grace period, in seconds, for pods to terminate + * during a soft eviction; caps the pod's terminationGracePeriodSeconds. Default is 60, applied when the cluster's + * `enableNodeHardening` property is true. Only applicable for Linux nodepools. + * + * @param evictionMaxPodGracePeriodInSeconds the evictionMaxPodGracePeriodInSeconds value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withEvictionMaxPodGracePeriodInSeconds(Integer evictionMaxPodGracePeriodInSeconds) { + this.evictionMaxPodGracePeriodInSeconds = evictionMaxPodGracePeriodInSeconds; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (kubeReserved() != null) { + kubeReserved().validate(); + } + if (hardEvictionThreshold() != null) { + hardEvictionThreshold().validate(); + } + if (softEvictionThreshold() != null) { + softEvictionThreshold().validate(); + } + if (softEvictionGracePeriod() != null) { + softEvictionGracePeriod().validate(); + } } /** @@ -357,6 +565,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("containerLogMaxSizeMB", this.containerLogMaxSizeMB); jsonWriter.writeNumberField("containerLogMaxFiles", this.containerLogMaxFiles); jsonWriter.writeNumberField("podMaxPids", this.podMaxPids); + jsonWriter.writeStringField("seccompDefault", + this.seccompDefault == null ? null : this.seccompDefault.toString()); + jsonWriter.writeJsonField("kubeReserved", this.kubeReserved); + jsonWriter.writeJsonField("hardEvictionThreshold", this.hardEvictionThreshold); + jsonWriter.writeJsonField("softEvictionThreshold", this.softEvictionThreshold); + jsonWriter.writeJsonField("softEvictionGracePeriod", this.softEvictionGracePeriod); + jsonWriter.writeNumberField("evictionMaxPodGracePeriodInSeconds", this.evictionMaxPodGracePeriodInSeconds); return jsonWriter.writeEndObject(); } @@ -398,6 +613,19 @@ public static KubeletConfig fromJson(JsonReader jsonReader) throws IOException { deserializedKubeletConfig.containerLogMaxFiles = reader.getNullable(JsonReader::getInt); } else if ("podMaxPids".equals(fieldName)) { deserializedKubeletConfig.podMaxPids = reader.getNullable(JsonReader::getInt); + } else if ("seccompDefault".equals(fieldName)) { + deserializedKubeletConfig.seccompDefault = SeccompDefault.fromString(reader.getString()); + } else if ("kubeReserved".equals(fieldName)) { + deserializedKubeletConfig.kubeReserved = KubeReserved.fromJson(reader); + } else if ("hardEvictionThreshold".equals(fieldName)) { + deserializedKubeletConfig.hardEvictionThreshold = HardEvictionThreshold.fromJson(reader); + } else if ("softEvictionThreshold".equals(fieldName)) { + deserializedKubeletConfig.softEvictionThreshold = SoftEvictionThreshold.fromJson(reader); + } else if ("softEvictionGracePeriod".equals(fieldName)) { + deserializedKubeletConfig.softEvictionGracePeriod = SoftEvictionGracePeriod.fromJson(reader); + } else if ("evictionMaxPodGracePeriodInSeconds".equals(fieldName)) { + deserializedKubeletConfig.evictionMaxPodGracePeriodInSeconds + = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java new file mode 100644 index 000000000000..70e48728567f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. + * An empty label selector matches all objects. A null label selector matches no objects. + */ +@Fluent +public final class LabelSelector implements JsonSerializable { + /* + * matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is equivalent to an + * element of matchExpressions, whose key field is `key`, the operator is `In`, and the values array contains only + * `value`. The requirements are ANDed. + */ + private List matchLabels; + + /* + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + private List matchExpressions; + + /** + * Creates an instance of LabelSelector class. + */ + public LabelSelector() { + } + + /** + * Get the matchLabels property: matchLabels is an array of {key=value} pairs. A single {key=value} in the + * matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, + * and the values array contains only `value`. The requirements are ANDed. + * + * @return the matchLabels value. + */ + public List matchLabels() { + return this.matchLabels; + } + + /** + * Set the matchLabels property: matchLabels is an array of {key=value} pairs. A single {key=value} in the + * matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, + * and the values array contains only `value`. The requirements are ANDed. + * + * @param matchLabels the matchLabels value to set. + * @return the LabelSelector object itself. + */ + public LabelSelector withMatchLabels(List matchLabels) { + this.matchLabels = matchLabels; + return this; + } + + /** + * Get the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements + * are ANDed. + * + * @return the matchExpressions value. + */ + public List matchExpressions() { + return this.matchExpressions; + } + + /** + * Set the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements + * are ANDed. + * + * @param matchExpressions the matchExpressions value to set. + * @return the LabelSelector object itself. + */ + public LabelSelector withMatchExpressions(List matchExpressions) { + this.matchExpressions = matchExpressions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (matchExpressions() != null) { + matchExpressions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("matchLabels", this.matchLabels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("matchExpressions", this.matchExpressions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelSelector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelSelector if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LabelSelector. + */ + public static LabelSelector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelSelector deserializedLabelSelector = new LabelSelector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchLabels".equals(fieldName)) { + List matchLabels = reader.readArray(reader1 -> reader1.getString()); + deserializedLabelSelector.matchLabels = matchLabels; + } else if ("matchExpressions".equals(fieldName)) { + List matchExpressions + = reader.readArray(reader1 -> LabelSelectorRequirement.fromJson(reader1)); + deserializedLabelSelector.matchExpressions = matchExpressions; + } else { + reader.skipChildren(); + } + } + + return deserializedLabelSelector; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java new file mode 100644 index 000000000000..15d4188070c0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A label selector requirement is a selector that contains values, a key, and an operator that relates the key and + * values. + */ +@Fluent +public final class LabelSelectorRequirement implements JsonSerializable { + /* + * key is the label key that the selector applies to. + */ + private String key; + + /* + * operator represents a key's relationship to a set of values. Valid operators are In and NotIn + */ + private Operator operator; + + /* + * values is an array of string values, the values array must be non-empty. + */ + private List values; + + /** + * Creates an instance of LabelSelectorRequirement class. + */ + public LabelSelectorRequirement() { + } + + /** + * Get the key property: key is the label key that the selector applies to. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: key is the label key that the selector applies to. + * + * @param key the key value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the operator property: operator represents a key's relationship to a set of values. Valid operators are In + * and NotIn. + * + * @return the operator value. + */ + public Operator operator() { + return this.operator; + } + + /** + * Set the operator property: operator represents a key's relationship to a set of values. Valid operators are In + * and NotIn. + * + * @param operator the operator value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withOperator(Operator operator) { + this.operator = operator; + return this; + } + + /** + * Get the values property: values is an array of string values, the values array must be non-empty. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: values is an array of string values, the values array must be non-empty. + * + * @param values the values value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withValues(List values) { + this.values = values; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelSelectorRequirement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelSelectorRequirement if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LabelSelectorRequirement. + */ + public static LabelSelectorRequirement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelSelectorRequirement deserializedLabelSelectorRequirement = new LabelSelectorRequirement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedLabelSelectorRequirement.key = reader.getString(); + } else if ("operator".equals(fieldName)) { + deserializedLabelSelectorRequirement.operator = Operator.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedLabelSelectorRequirement.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedLabelSelectorRequirement; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ListBootstrapDataRequest.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ListBootstrapDataRequest.java new file mode 100644 index 000000000000..34daead81393 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ListBootstrapDataRequest.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Empty request body for listing FlexNode bootstrap data. + */ +@Immutable +public final class ListBootstrapDataRequest implements JsonSerializable { + /** + * Creates an instance of ListBootstrapDataRequest class. + */ + public ListBootstrapDataRequest() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ListBootstrapDataRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ListBootstrapDataRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ListBootstrapDataRequest. + */ + public static ListBootstrapDataRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ListBootstrapDataRequest deserializedListBootstrapDataRequest = new ListBootstrapDataRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + reader.skipChildren(); + } + + return deserializedListBootstrapDataRequest; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java index 1edbb9a693cc..a9bc95e86976 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java @@ -13,6 +13,13 @@ * balancer SKUs. */ public final class LoadBalancerSku extends ExpandableStringEnum { + /** + * Use a service Load Balancer, with native pod-level load balancing. This SKU is specifically built to scale for + * container-based workloads, with a single instance utilized for each application. For more information, see + * https://aka.ms/aks/container-native-slb. + */ + public static final LoadBalancerSku SERVICE = fromString("service"); + /** * Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information about on working * with the load balancer in the managed cluster, see the [standard Load diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineBillingProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineBillingProfile.java new file mode 100644 index 000000000000..8671f8fd079b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineBillingProfile.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties having to do with machine billing. + */ +@Fluent +public final class MachineBillingProfile implements JsonSerializable { + /* + * The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value + * greater than zero or -1 which indicates default price to be up-to on-demand. For more details on spot pricing, + * see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + */ + private Float spotMaxPrice; + + /** + * Creates an instance of MachineBillingProfile class. + */ + public MachineBillingProfile() { + } + + /** + * Get the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. For + * more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @return the spotMaxPrice value. + */ + public Float spotMaxPrice() { + return this.spotMaxPrice; + } + + /** + * Set the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. For + * more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @param spotMaxPrice the spotMaxPrice value to set. + * @return the MachineBillingProfile object itself. + */ + public MachineBillingProfile withSpotMaxPrice(Float spotMaxPrice) { + this.spotMaxPrice = spotMaxPrice; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("spotMaxPrice", this.spotMaxPrice); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineBillingProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineBillingProfile if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineBillingProfile. + */ + public static MachineBillingProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineBillingProfile deserializedMachineBillingProfile = new MachineBillingProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("spotMaxPrice".equals(fieldName)) { + deserializedMachineBillingProfile.spotMaxPrice = reader.getNullable(JsonReader::getFloat); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineBillingProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java new file mode 100644 index 000000000000..fc95dab7515f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The hardware and GPU settings of the machine. + */ +@Fluent +public final class MachineHardwareProfile implements JsonSerializable { + /* + * The size of the VM. VM size availability varies by region. If a node contains insufficient compute resources + * (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions + */ + private String vmSize; + + /* + * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + */ + private GpuInstanceProfile gpuInstanceProfile; + + /* + * The GPU settings of the machine. + */ + private GpuProfile gpuProfile; + + /* + * Whether to enable UltraSSD + */ + private Boolean ultraSsdEnabled; + + /** + * Creates an instance of MachineHardwareProfile class. + */ + public MachineHardwareProfile() { + } + + /** + * Get the vmSize property: The size of the VM. VM size availability varies by region. If a node contains + * insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: The size of the VM. VM size availability varies by region. If a node contains + * insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @param vmSize the vmSize value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withVmSize(String vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @return the gpuInstanceProfile value. + */ + public GpuInstanceProfile gpuInstanceProfile() { + return this.gpuInstanceProfile; + } + + /** + * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @param gpuInstanceProfile the gpuInstanceProfile value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.gpuInstanceProfile = gpuInstanceProfile; + return this; + } + + /** + * Get the gpuProfile property: The GPU settings of the machine. + * + * @return the gpuProfile value. + */ + public GpuProfile gpuProfile() { + return this.gpuProfile; + } + + /** + * Set the gpuProfile property: The GPU settings of the machine. + * + * @param gpuProfile the gpuProfile value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withGpuProfile(GpuProfile gpuProfile) { + this.gpuProfile = gpuProfile; + return this; + } + + /** + * Get the ultraSsdEnabled property: Whether to enable UltraSSD. + * + * @return the ultraSsdEnabled value. + */ + public Boolean ultraSsdEnabled() { + return this.ultraSsdEnabled; + } + + /** + * Set the ultraSsdEnabled property: Whether to enable UltraSSD. + * + * @param ultraSsdEnabled the ultraSsdEnabled value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withUltraSsdEnabled(Boolean ultraSsdEnabled) { + this.ultraSsdEnabled = ultraSsdEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (gpuProfile() != null) { + gpuProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("vmSize", this.vmSize); + jsonWriter.writeStringField("gpuInstanceProfile", + this.gpuInstanceProfile == null ? null : this.gpuInstanceProfile.toString()); + jsonWriter.writeJsonField("gpuProfile", this.gpuProfile); + jsonWriter.writeBooleanField("ultraSsdEnabled", this.ultraSsdEnabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineHardwareProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineHardwareProfile if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineHardwareProfile. + */ + public static MachineHardwareProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineHardwareProfile deserializedMachineHardwareProfile = new MachineHardwareProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vmSize".equals(fieldName)) { + deserializedMachineHardwareProfile.vmSize = reader.getString(); + } else if ("gpuInstanceProfile".equals(fieldName)) { + deserializedMachineHardwareProfile.gpuInstanceProfile + = GpuInstanceProfile.fromString(reader.getString()); + } else if ("gpuProfile".equals(fieldName)) { + deserializedMachineHardwareProfile.gpuProfile = GpuProfile.fromJson(reader); + } else if ("ultraSsdEnabled".equals(fieldName)) { + deserializedMachineHardwareProfile.ultraSsdEnabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineHardwareProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java new file mode 100644 index 000000000000..c846b9de23e4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The Kubernetes configurations used by the machine. + */ +@Fluent +public final class MachineKubernetesProfile implements JsonSerializable { + /* + * The node labels on the machine. + */ + private Map nodeLabels; + + /* + * The version of Kubernetes specified by the user. Both patch version and are + * supported. When is specified, the latest supported patch version is chosen automatically. + */ + private String orchestratorVersion; + + /* + * The version of Kubernetes running on the machine. If orchestratorVersion was a fully specified version + * , this field will be exactly equal to it. If orchestratorVersion was , this field + * will contain the full version being used. + */ + private String currentOrchestratorVersion; + + /* + * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + */ + private KubeletDiskType kubeletDiskType; + + /* + * The Kubelet configuration on the machine. + */ + private KubeletConfig kubeletConfig; + + /* + * Taints added on the node during creation that will not be reconciled by AKS. These taints will not be reconciled + * by AKS and can be removed with a kubectl call. These taints allow for required configuration to run before the + * node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl + * taint nodes node1 key1=value1:NoSchedule-` + */ + private List nodeInitializationTaints; + + /* + * The taints added to new node during machine create. For example, key=value:NoSchedule. + */ + private List nodeTaints; + + /* + * The maximum number of pods that can run on a node. + */ + private Integer maxPods; + + /* + * The node name in the Kubernetes cluster. + */ + private String nodeName; + + /* + * Determines the type of workload a node can run. + */ + private WorkloadRuntime workloadRuntime; + + /* + * Configuration for using artifact streaming on AKS. + */ + private AgentPoolArtifactStreamingProfile artifactStreamingProfile; + + /** + * Creates an instance of MachineKubernetesProfile class. + */ + public MachineKubernetesProfile() { + } + + /** + * Get the nodeLabels property: The node labels on the machine. + * + * @return the nodeLabels value. + */ + public Map nodeLabels() { + return this.nodeLabels; + } + + /** + * Set the nodeLabels property: The node labels on the machine. + * + * @param nodeLabels the nodeLabels value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withNodeLabels(Map nodeLabels) { + this.nodeLabels = nodeLabels; + return this; + } + + /** + * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the currentOrchestratorVersion property: The version of Kubernetes running on the machine. If + * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentOrchestratorVersion value. + */ + public String currentOrchestratorVersion() { + return this.currentOrchestratorVersion; + } + + /** + * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @return the kubeletDiskType value. + */ + public KubeletDiskType kubeletDiskType() { + return this.kubeletDiskType; + } + + /** + * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @param kubeletDiskType the kubeletDiskType value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withKubeletDiskType(KubeletDiskType kubeletDiskType) { + this.kubeletDiskType = kubeletDiskType; + return this; + } + + /** + * Get the kubeletConfig property: The Kubelet configuration on the machine. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.kubeletConfig; + } + + /** + * Set the kubeletConfig property: The Kubelet configuration on the machine. + * + * @param kubeletConfig the kubeletConfig value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withKubeletConfig(KubeletConfig kubeletConfig) { + this.kubeletConfig = kubeletConfig; + return this; + } + + /** + * Get the nodeInitializationTaints property: Taints added on the node during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. These taints allow for + * required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List nodeInitializationTaints() { + return this.nodeInitializationTaints; + } + + /** + * Set the nodeInitializationTaints property: Taints added on the node during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. These taints allow for + * required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withNodeInitializationTaints(List nodeInitializationTaints) { + this.nodeInitializationTaints = nodeInitializationTaints; + return this; + } + + /** + * Get the nodeTaints property: The taints added to new node during machine create. For example, + * key=value:NoSchedule. + * + * @return the nodeTaints value. + */ + public List nodeTaints() { + return this.nodeTaints; + } + + /** + * Set the nodeTaints property: The taints added to new node during machine create. For example, + * key=value:NoSchedule. + * + * @param nodeTaints the nodeTaints value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withNodeTaints(List nodeTaints) { + this.nodeTaints = nodeTaints; + return this; + } + + /** + * Get the maxPods property: The maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Set the maxPods property: The maximum number of pods that can run on a node. + * + * @param maxPods the maxPods value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withMaxPods(Integer maxPods) { + this.maxPods = maxPods; + return this; + } + + /** + * Get the nodeName property: The node name in the Kubernetes cluster. + * + * @return the nodeName value. + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Get the workloadRuntime property: Determines the type of workload a node can run. + * + * @return the workloadRuntime value. + */ + public WorkloadRuntime workloadRuntime() { + return this.workloadRuntime; + } + + /** + * Set the workloadRuntime property: Determines the type of workload a node can run. + * + * @param workloadRuntime the workloadRuntime value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + this.workloadRuntime = workloadRuntime; + return this; + } + + /** + * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @return the artifactStreamingProfile value. + */ + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.artifactStreamingProfile; + } + + /** + * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @param artifactStreamingProfile the artifactStreamingProfile value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile + withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + this.artifactStreamingProfile = artifactStreamingProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubeletConfig() != null) { + kubeletConfig().validate(); + } + if (artifactStreamingProfile() != null) { + artifactStreamingProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeStringField("kubeletDiskType", + this.kubeletDiskType == null ? null : this.kubeletDiskType.toString()); + jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); + jsonWriter.writeArrayField("nodeInitializationTaints", this.nodeInitializationTaints, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("maxPods", this.maxPods); + jsonWriter.writeStringField("workloadRuntime", + this.workloadRuntime == null ? null : this.workloadRuntime.toString()); + jsonWriter.writeJsonField("artifactStreamingProfile", this.artifactStreamingProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineKubernetesProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineKubernetesProfile if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineKubernetesProfile. + */ + public static MachineKubernetesProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineKubernetesProfile deserializedMachineKubernetesProfile = new MachineKubernetesProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodeLabels".equals(fieldName)) { + Map nodeLabels = reader.readMap(reader1 -> reader1.getString()); + deserializedMachineKubernetesProfile.nodeLabels = nodeLabels; + } else if ("orchestratorVersion".equals(fieldName)) { + deserializedMachineKubernetesProfile.orchestratorVersion = reader.getString(); + } else if ("currentOrchestratorVersion".equals(fieldName)) { + deserializedMachineKubernetesProfile.currentOrchestratorVersion = reader.getString(); + } else if ("kubeletDiskType".equals(fieldName)) { + deserializedMachineKubernetesProfile.kubeletDiskType + = KubeletDiskType.fromString(reader.getString()); + } else if ("kubeletConfig".equals(fieldName)) { + deserializedMachineKubernetesProfile.kubeletConfig = KubeletConfig.fromJson(reader); + } else if ("nodeInitializationTaints".equals(fieldName)) { + List nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedMachineKubernetesProfile.nodeInitializationTaints = nodeInitializationTaints; + } else if ("nodeTaints".equals(fieldName)) { + List nodeTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedMachineKubernetesProfile.nodeTaints = nodeTaints; + } else if ("maxPods".equals(fieldName)) { + deserializedMachineKubernetesProfile.maxPods = reader.getNullable(JsonReader::getInt); + } else if ("nodeName".equals(fieldName)) { + deserializedMachineKubernetesProfile.nodeName = reader.getString(); + } else if ("workloadRuntime".equals(fieldName)) { + deserializedMachineKubernetesProfile.workloadRuntime + = WorkloadRuntime.fromString(reader.getString()); + } else if ("artifactStreamingProfile".equals(fieldName)) { + deserializedMachineKubernetesProfile.artifactStreamingProfile + = AgentPoolArtifactStreamingProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineKubernetesProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java index a8ee1822c56d..a36eb9a2c6c5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,17 +15,53 @@ /** * network properties of the machine. */ -@Immutable +@Fluent public final class MachineNetworkProperties implements JsonSerializable { /* * IPv4, IPv6 addresses of the machine */ private List ipAddresses; + /* + * The ID of the subnet which node and optionally pods will join on startup. If this is not specified, a VNET and + * subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it + * applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ + * virtualNetworkName}/subnets/{subnetName} + */ + private String vnetSubnetId; + + /* + * The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node + * subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ + * virtualNetworkName}/subnets/{subnetName} + */ + private String podSubnetId; + + /* + * Whether the machine is allocated its own public IP. Some scenarios may require the machine to receive their own + * dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct + * connection to a cloud virtual machine to minimize hops. The default is false. + */ + private Boolean enableNodePublicIp; + + /* + * The public IP prefix ID which VM node should use IPs from. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{ + * publicIPPrefixName} + */ + private String nodePublicIpPrefixId; + + /* + * IPTags of instance-level public IPs. + */ + private List nodePublicIpTags; + /** * Creates an instance of MachineNetworkProperties class. */ - private MachineNetworkProperties() { + public MachineNetworkProperties() { } /** @@ -37,6 +73,126 @@ public List ipAddresses() { return this.ipAddresses; } + /** + * Get the vnetSubnetId property: The ID of the subnet which node and optionally pods will join on startup. If this + * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to + * nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.vnetSubnetId; + } + + /** + * Set the vnetSubnetId property: The ID of the subnet which node and optionally pods will join on startup. If this + * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to + * nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param vnetSubnetId the vnetSubnetId value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withVnetSubnetId(String vnetSubnetId) { + this.vnetSubnetId = vnetSubnetId; + return this; + } + + /** + * Get the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the podSubnetId value. + */ + public String podSubnetId() { + return this.podSubnetId; + } + + /** + * Set the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param podSubnetId the podSubnetId value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withPodSubnetId(String podSubnetId) { + this.podSubnetId = podSubnetId; + return this; + } + + /** + * Get the enableNodePublicIp property: Whether the machine is allocated its own public IP. Some scenarios may + * require the machine to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. The + * default is false. + * + * @return the enableNodePublicIp value. + */ + public Boolean enableNodePublicIp() { + return this.enableNodePublicIp; + } + + /** + * Set the enableNodePublicIp property: Whether the machine is allocated its own public IP. Some scenarios may + * require the machine to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. The + * default is false. + * + * @param enableNodePublicIp the enableNodePublicIp value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { + this.enableNodePublicIp = enableNodePublicIp; + return this; + } + + /** + * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM node should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @return the nodePublicIpPrefixId value. + */ + public String nodePublicIpPrefixId() { + return this.nodePublicIpPrefixId; + } + + /** + * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM node should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + this.nodePublicIpPrefixId = nodePublicIpPrefixId; + return this; + } + + /** + * Get the nodePublicIpTags property: IPTags of instance-level public IPs. + * + * @return the nodePublicIpTags value. + */ + public List nodePublicIpTags() { + return this.nodePublicIpTags; + } + + /** + * Set the nodePublicIpTags property: IPTags of instance-level public IPs. + * + * @param nodePublicIpTags the nodePublicIpTags value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withNodePublicIpTags(List nodePublicIpTags) { + this.nodePublicIpTags = nodePublicIpTags; + return this; + } + /** * Validates the instance. * @@ -46,6 +202,9 @@ public void validate() { if (ipAddresses() != null) { ipAddresses().forEach(e -> e.validate()); } + if (nodePublicIpTags() != null) { + nodePublicIpTags().forEach(e -> e.validate()); + } } /** @@ -54,6 +213,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("vnetSubnetID", this.vnetSubnetId); + jsonWriter.writeStringField("podSubnetID", this.podSubnetId); + jsonWriter.writeBooleanField("enableNodePublicIP", this.enableNodePublicIp); + jsonWriter.writeStringField("nodePublicIPPrefixID", this.nodePublicIpPrefixId); + jsonWriter.writeArrayField("nodePublicIPTags", this.nodePublicIpTags, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -76,6 +241,18 @@ public static MachineNetworkProperties fromJson(JsonReader jsonReader) throws IO List ipAddresses = reader.readArray(reader1 -> MachineIpAddress.fromJson(reader1)); deserializedMachineNetworkProperties.ipAddresses = ipAddresses; + } else if ("vnetSubnetID".equals(fieldName)) { + deserializedMachineNetworkProperties.vnetSubnetId = reader.getString(); + } else if ("podSubnetID".equals(fieldName)) { + deserializedMachineNetworkProperties.podSubnetId = reader.getString(); + } else if ("enableNodePublicIP".equals(fieldName)) { + deserializedMachineNetworkProperties.enableNodePublicIp + = reader.getNullable(JsonReader::getBoolean); + } else if ("nodePublicIPPrefixID".equals(fieldName)) { + deserializedMachineNetworkProperties.nodePublicIpPrefixId = reader.getString(); + } else if ("nodePublicIPTags".equals(fieldName)) { + List nodePublicIpTags = reader.readArray(reader1 -> IpTag.fromJson(reader1)); + deserializedMachineNetworkProperties.nodePublicIpTags = nodePublicIpTags; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java new file mode 100644 index 000000000000..083bb49aeb2c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The operating system and disk used by the machine. + */ +@Fluent +public final class MachineOSProfile implements JsonSerializable { + /* + * The operating system type. The default is Linux. + */ + private OSType osType; + + /* + * Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or + * Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is + * deprecated. + */ + private OSSku osSku; + + /* + * OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify + * 0, it will apply the default osDisk size according to the vmSize specified. + */ + private Integer osDiskSizeGB; + + /* + * The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and + * has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + * after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + */ + private OSDiskType osDiskType; + + /* + * Whether to use a FIPS-enabled OS. + */ + private Boolean enableFips; + + /* + * The Linux machine's specific profile. + */ + private MachineOSProfileLinuxProfile linuxProfile; + + /* + * The Windows machine's specific profile. + */ + private AgentPoolWindowsProfile windowsProfile; + + /** + * Creates an instance of MachineOSProfile class. + */ + public MachineOSProfile() { + } + + /** + * Get the osType property: The operating system type. The default is Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: The operating system type. The default is Linux. + * + * @param osType the osType value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. + * + * @return the osSku value. + */ + public OSSku osSku() { + return this.osSku; + } + + /** + * Set the osSku property: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + * OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after + * Windows2019 is deprecated. + * + * @param osSku the osSku value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsSku(OSSku osSku) { + this.osSku = osSku; + return this; + } + + /** + * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @return the osDiskSizeGB value. + */ + public Integer osDiskSizeGB() { + return this.osDiskSizeGB; + } + + /** + * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @param osDiskSizeGB the osDiskSizeGB value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsDiskSizeGB(Integer osDiskSizeGB) { + this.osDiskSizeGB = osDiskSizeGB; + return this; + } + + /** + * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @return the osDiskType value. + */ + public OSDiskType osDiskType() { + return this.osDiskType; + } + + /** + * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @param osDiskType the osDiskType value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsDiskType(OSDiskType osDiskType) { + this.osDiskType = osDiskType; + return this; + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Set the enableFips property: Whether to use a FIPS-enabled OS. + * + * @param enableFips the enableFips value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withEnableFips(Boolean enableFips) { + this.enableFips = enableFips; + return this; + } + + /** + * Get the linuxProfile property: The Linux machine's specific profile. + * + * @return the linuxProfile value. + */ + public MachineOSProfileLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set the linuxProfile property: The Linux machine's specific profile. + * + * @param linuxProfile the linuxProfile value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withLinuxProfile(MachineOSProfileLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get the windowsProfile property: The Windows machine's specific profile. + * + * @return the windowsProfile value. + */ + public AgentPoolWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set the windowsProfile property: The Windows machine's specific profile. + * + * @param windowsProfile the windowsProfile value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linuxProfile() != null) { + linuxProfile().validate(); + } + if (windowsProfile() != null) { + windowsProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeStringField("osSKU", this.osSku == null ? null : this.osSku.toString()); + jsonWriter.writeNumberField("osDiskSizeGB", this.osDiskSizeGB); + jsonWriter.writeStringField("osDiskType", this.osDiskType == null ? null : this.osDiskType.toString()); + jsonWriter.writeBooleanField("enableFIPS", this.enableFips); + jsonWriter.writeJsonField("linuxProfile", this.linuxProfile); + jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineOSProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineOSProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineOSProfile. + */ + public static MachineOSProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineOSProfile deserializedMachineOSProfile = new MachineOSProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("osType".equals(fieldName)) { + deserializedMachineOSProfile.osType = OSType.fromString(reader.getString()); + } else if ("osSKU".equals(fieldName)) { + deserializedMachineOSProfile.osSku = OSSku.fromString(reader.getString()); + } else if ("osDiskSizeGB".equals(fieldName)) { + deserializedMachineOSProfile.osDiskSizeGB = reader.getNullable(JsonReader::getInt); + } else if ("osDiskType".equals(fieldName)) { + deserializedMachineOSProfile.osDiskType = OSDiskType.fromString(reader.getString()); + } else if ("enableFIPS".equals(fieldName)) { + deserializedMachineOSProfile.enableFips = reader.getNullable(JsonReader::getBoolean); + } else if ("linuxProfile".equals(fieldName)) { + deserializedMachineOSProfile.linuxProfile = MachineOSProfileLinuxProfile.fromJson(reader); + } else if ("windowsProfile".equals(fieldName)) { + deserializedMachineOSProfile.windowsProfile = AgentPoolWindowsProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineOSProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java new file mode 100644 index 000000000000..b80b1495a708 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Linux machine's specific profile. + */ +@Fluent +public final class MachineOSProfileLinuxProfile implements JsonSerializable { + /* + * The OS configuration of Linux machine. + */ + private LinuxOSConfig linuxOSConfig; + + /* + * Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd + * after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for + * Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). + */ + private String messageOfTheDay; + + /** + * Creates an instance of MachineOSProfileLinuxProfile class. + */ + public MachineOSProfileLinuxProfile() { + } + + /** + * Get the linuxOSConfig property: The OS configuration of Linux machine. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.linuxOSConfig; + } + + /** + * Set the linuxOSConfig property: The OS configuration of Linux machine. + * + * @param linuxOSConfig the linuxOSConfig value to set. + * @return the MachineOSProfileLinuxProfile object itself. + */ + public MachineOSProfileLinuxProfile withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + this.linuxOSConfig = linuxOSConfig; + return this; + } + + /** + * Get the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @return the messageOfTheDay value. + */ + public String messageOfTheDay() { + return this.messageOfTheDay; + } + + /** + * Set the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @param messageOfTheDay the messageOfTheDay value to set. + * @return the MachineOSProfileLinuxProfile object itself. + */ + public MachineOSProfileLinuxProfile withMessageOfTheDay(String messageOfTheDay) { + this.messageOfTheDay = messageOfTheDay; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linuxOSConfig() != null) { + linuxOSConfig().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); + jsonWriter.writeStringField("messageOfTheDay", this.messageOfTheDay); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineOSProfileLinuxProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineOSProfileLinuxProfile if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineOSProfileLinuxProfile. + */ + public static MachineOSProfileLinuxProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineOSProfileLinuxProfile deserializedMachineOSProfileLinuxProfile = new MachineOSProfileLinuxProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("linuxOSConfig".equals(fieldName)) { + deserializedMachineOSProfileLinuxProfile.linuxOSConfig = LinuxOSConfig.fromJson(reader); + } else if ("messageOfTheDay".equals(fieldName)) { + deserializedMachineOSProfileLinuxProfile.messageOfTheDay = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineOSProfileLinuxProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java index ab6e144bfc2e..d34354fed727 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java @@ -4,17 +4,18 @@ package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.Map; /** * The properties of the machine. */ -@Immutable +@Fluent public final class MachineProperties implements JsonSerializable { /* * network properties of the machine @@ -26,10 +27,89 @@ public final class MachineProperties implements JsonSerializable tags; + + /* + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is + * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable + * optimistic concurrency per the normal eTag convention. + */ + private String eTag; + + /* + * Contains read-only information about the machine. + */ + private MachineStatus status; + + /* + * Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and + * reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. + */ + private LocalDnsProfile localDNSProfile; + + /* + * The Capacity Reservation Group to provide virtual machines from a reserved group of Machines + */ + private CapacityReservation capacityReservation; + /** * Creates an instance of MachineProperties class. */ - private MachineProperties() { + public MachineProperties() { } /** @@ -41,6 +121,17 @@ public MachineNetworkProperties network() { return this.network; } + /** + * Set the network property: network properties of the machine. + * + * @param network the network value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withNetwork(MachineNetworkProperties network) { + this.network = network; + return this; + } + /** * Get the resourceId property: Azure resource id of the machine. It can be used to GET underlying VM Instance. * @@ -50,6 +141,272 @@ public String resourceId() { return this.resourceId; } + /** + * Get the hardware property: The hardware and GPU settings of the machine. + * + * @return the hardware value. + */ + public MachineHardwareProfile hardware() { + return this.hardware; + } + + /** + * Set the hardware property: The hardware and GPU settings of the machine. + * + * @param hardware the hardware value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withHardware(MachineHardwareProfile hardware) { + this.hardware = hardware; + return this; + } + + /** + * Get the operatingSystem property: The operating system and disk used by the machine. + * + * @return the operatingSystem value. + */ + public MachineOSProfile operatingSystem() { + return this.operatingSystem; + } + + /** + * Set the operatingSystem property: The operating system and disk used by the machine. + * + * @param operatingSystem the operatingSystem value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withOperatingSystem(MachineOSProfile operatingSystem) { + this.operatingSystem = operatingSystem; + return this; + } + + /** + * Get the kubernetes property: The Kubernetes configurations used by the machine. + * + * @return the kubernetes value. + */ + public MachineKubernetesProfile kubernetes() { + return this.kubernetes; + } + + /** + * Set the kubernetes property: The Kubernetes configurations used by the machine. + * + * @param kubernetes the kubernetes value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withKubernetes(MachineKubernetesProfile kubernetes) { + this.kubernetes = kubernetes; + return this; + } + + /** + * Get the mode property: Machine only allows 'System' and 'User' mode. + * + * @return the mode value. + */ + public AgentPoolMode mode() { + return this.mode; + } + + /** + * Set the mode property: Machine only allows 'System' and 'User' mode. + * + * @param mode the mode value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withMode(AgentPoolMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the security property: The security settings of the machine. + * + * @return the security value. + */ + public MachineSecurityProfile security() { + return this.security; + } + + /** + * Set the security property: The security settings of the machine. + * + * @param security the security value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withSecurity(MachineSecurityProfile security) { + this.security = security; + return this; + } + + /** + * Get the priority property: The priority for the machine. If not specified, the default is 'Regular'. + * + * @return the priority value. + */ + public ScaleSetPriority priority() { + return this.priority; + } + + /** + * Set the priority property: The priority for the machine. If not specified, the default is 'Regular'. + * + * @param priority the priority value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withPriority(ScaleSetPriority priority) { + this.priority = priority; + return this; + } + + /** + * Get the evictionPolicy property: The eviction policy for machine. This cannot be specified unless the priority is + * 'Spot'. If not specified, the default is 'Delete'. + * + * @return the evictionPolicy value. + */ + public ScaleSetEvictionPolicy evictionPolicy() { + return this.evictionPolicy; + } + + /** + * Set the evictionPolicy property: The eviction policy for machine. This cannot be specified unless the priority is + * 'Spot'. If not specified, the default is 'Delete'. + * + * @param evictionPolicy the evictionPolicy value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withEvictionPolicy(ScaleSetEvictionPolicy evictionPolicy) { + this.evictionPolicy = evictionPolicy; + return this; + } + + /** + * Get the billing property: The properties having to do with machine billing. + * + * @return the billing value. + */ + public MachineBillingProfile billing() { + return this.billing; + } + + /** + * Set the billing property: The properties having to do with machine billing. + * + * @param billing the billing value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withBilling(MachineBillingProfile billing) { + this.billing = billing; + return this; + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the tags property: The tags to be persisted on the machine. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags to be persisted on the machine. + * + * @param tags the tags value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the eTag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a + * subsequent request to enable optimistic concurrency per the normal eTag convention. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the status property: Contains read-only information about the machine. + * + * @return the status value. + */ + public MachineStatus status() { + return this.status; + } + + /** + * Get the localDNSProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see + * aka.ms/aks/localdns. + * + * @return the localDNSProfile value. + */ + public LocalDnsProfile localDNSProfile() { + return this.localDNSProfile; + } + + /** + * Set the localDNSProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see + * aka.ms/aks/localdns. + * + * @param localDNSProfile the localDNSProfile value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withLocalDNSProfile(LocalDnsProfile localDNSProfile) { + this.localDNSProfile = localDNSProfile; + return this; + } + + /** + * Get the capacityReservation property: The Capacity Reservation Group to provide virtual machines from a reserved + * group of Machines. + * + * @return the capacityReservation value. + */ + public CapacityReservation capacityReservation() { + return this.capacityReservation; + } + + /** + * Set the capacityReservation property: The Capacity Reservation Group to provide virtual machines from a reserved + * group of Machines. + * + * @param capacityReservation the capacityReservation value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withCapacityReservation(CapacityReservation capacityReservation) { + this.capacityReservation = capacityReservation; + return this; + } + /** * Validates the instance. * @@ -59,6 +416,30 @@ public void validate() { if (network() != null) { network().validate(); } + if (hardware() != null) { + hardware().validate(); + } + if (operatingSystem() != null) { + operatingSystem().validate(); + } + if (kubernetes() != null) { + kubernetes().validate(); + } + if (security() != null) { + security().validate(); + } + if (billing() != null) { + billing().validate(); + } + if (status() != null) { + status().validate(); + } + if (localDNSProfile() != null) { + localDNSProfile().validate(); + } + if (capacityReservation() != null) { + capacityReservation().validate(); + } } /** @@ -67,6 +448,19 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("network", this.network); + jsonWriter.writeJsonField("hardware", this.hardware); + jsonWriter.writeJsonField("operatingSystem", this.operatingSystem); + jsonWriter.writeJsonField("kubernetes", this.kubernetes); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeJsonField("security", this.security); + jsonWriter.writeStringField("priority", this.priority == null ? null : this.priority.toString()); + jsonWriter.writeStringField("evictionPolicy", + this.evictionPolicy == null ? null : this.evictionPolicy.toString()); + jsonWriter.writeJsonField("billing", this.billing); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("localDNSProfile", this.localDNSProfile); + jsonWriter.writeJsonField("capacityReservation", this.capacityReservation); return jsonWriter.writeEndObject(); } @@ -89,6 +483,38 @@ public static MachineProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedMachineProperties.network = MachineNetworkProperties.fromJson(reader); } else if ("resourceId".equals(fieldName)) { deserializedMachineProperties.resourceId = reader.getString(); + } else if ("hardware".equals(fieldName)) { + deserializedMachineProperties.hardware = MachineHardwareProfile.fromJson(reader); + } else if ("operatingSystem".equals(fieldName)) { + deserializedMachineProperties.operatingSystem = MachineOSProfile.fromJson(reader); + } else if ("kubernetes".equals(fieldName)) { + deserializedMachineProperties.kubernetes = MachineKubernetesProfile.fromJson(reader); + } else if ("mode".equals(fieldName)) { + deserializedMachineProperties.mode = AgentPoolMode.fromString(reader.getString()); + } else if ("security".equals(fieldName)) { + deserializedMachineProperties.security = MachineSecurityProfile.fromJson(reader); + } else if ("priority".equals(fieldName)) { + deserializedMachineProperties.priority = ScaleSetPriority.fromString(reader.getString()); + } else if ("evictionPolicy".equals(fieldName)) { + deserializedMachineProperties.evictionPolicy + = ScaleSetEvictionPolicy.fromString(reader.getString()); + } else if ("billing".equals(fieldName)) { + deserializedMachineProperties.billing = MachineBillingProfile.fromJson(reader); + } else if ("nodeImageVersion".equals(fieldName)) { + deserializedMachineProperties.nodeImageVersion = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedMachineProperties.provisioningState = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMachineProperties.tags = tags; + } else if ("eTag".equals(fieldName)) { + deserializedMachineProperties.eTag = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedMachineProperties.status = MachineStatus.fromJson(reader); + } else if ("localDNSProfile".equals(fieldName)) { + deserializedMachineProperties.localDNSProfile = LocalDnsProfile.fromJson(reader); + } else if ("capacityReservation".equals(fieldName)) { + deserializedMachineProperties.capacityReservation = CapacityReservation.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineSecurityProfile.java new file mode 100644 index 000000000000..21b7ccecb338 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineSecurityProfile.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The security settings of the machine. + */ +@Fluent +public final class MachineSecurityProfile implements JsonSerializable { + /* + * vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally + * on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + */ + private Boolean enableVTPM; + + /* + * Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. + * For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + */ + private Boolean enableSecureBoot; + + /* + * SSH access method of an agent pool. + */ + private AgentPoolSshAccess sshAccess; + + /* + * Whether to enable host based OS and data drive encryption. This is only supported on certain VM sizes and in + * certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption + */ + private Boolean enableEncryptionAtHost; + + /** + * Creates an instance of MachineSecurityProfile class. + */ + public MachineSecurityProfile() { + } + + /** + * Get the enableVTPM property: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys + * and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @return the enableVTPM value. + */ + public Boolean enableVTPM() { + return this.enableVTPM; + } + + /** + * Set the enableVTPM property: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys + * and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @param enableVTPM the enableVTPM value to set. + * @return the MachineSecurityProfile object itself. + */ + public MachineSecurityProfile withEnableVTPM(Boolean enableVTPM) { + this.enableVTPM = enableVTPM; + return this; + } + + /** + * Get the enableSecureBoot property: Secure Boot is a feature of Trusted Launch which ensures that only signed + * operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @return the enableSecureBoot value. + */ + public Boolean enableSecureBoot() { + return this.enableSecureBoot; + } + + /** + * Set the enableSecureBoot property: Secure Boot is a feature of Trusted Launch which ensures that only signed + * operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @param enableSecureBoot the enableSecureBoot value to set. + * @return the MachineSecurityProfile object itself. + */ + public MachineSecurityProfile withEnableSecureBoot(Boolean enableSecureBoot) { + this.enableSecureBoot = enableSecureBoot; + return this; + } + + /** + * Get the sshAccess property: SSH access method of an agent pool. + * + * @return the sshAccess value. + */ + public AgentPoolSshAccess sshAccess() { + return this.sshAccess; + } + + /** + * Set the sshAccess property: SSH access method of an agent pool. + * + * @param sshAccess the sshAccess value to set. + * @return the MachineSecurityProfile object itself. + */ + public MachineSecurityProfile withSshAccess(AgentPoolSshAccess sshAccess) { + this.sshAccess = sshAccess; + return this; + } + + /** + * Get the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only + * supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @return the enableEncryptionAtHost value. + */ + public Boolean enableEncryptionAtHost() { + return this.enableEncryptionAtHost; + } + + /** + * Set the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. This is only + * supported on certain VM sizes and in certain Azure regions. For more information, see: + * https://docs.microsoft.com/azure/aks/enable-host-encryption. + * + * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. + * @return the MachineSecurityProfile object itself. + */ + public MachineSecurityProfile withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + this.enableEncryptionAtHost = enableEncryptionAtHost; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableVTPM", this.enableVTPM); + jsonWriter.writeBooleanField("enableSecureBoot", this.enableSecureBoot); + jsonWriter.writeStringField("sshAccess", this.sshAccess == null ? null : this.sshAccess.toString()); + jsonWriter.writeBooleanField("enableEncryptionAtHost", this.enableEncryptionAtHost); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineSecurityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineSecurityProfile if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineSecurityProfile. + */ + public static MachineSecurityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineSecurityProfile deserializedMachineSecurityProfile = new MachineSecurityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableVTPM".equals(fieldName)) { + deserializedMachineSecurityProfile.enableVTPM = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSecureBoot".equals(fieldName)) { + deserializedMachineSecurityProfile.enableSecureBoot = reader.getNullable(JsonReader::getBoolean); + } else if ("sshAccess".equals(fieldName)) { + deserializedMachineSecurityProfile.sshAccess = AgentPoolSshAccess.fromString(reader.getString()); + } else if ("enableEncryptionAtHost".equals(fieldName)) { + deserializedMachineSecurityProfile.enableEncryptionAtHost + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineSecurityProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java new file mode 100644 index 000000000000..46eba39440c5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Contains read-only information about the machine. + */ +@Immutable +public final class MachineStatus implements JsonSerializable { + /* + * The error details information of the machine. Preserves the detailed info of failure. If there was no error, this + * field is omitted. + */ + private ManagementError provisioningError; + + /* + * Specifies the time at which the machine was created. + */ + private OffsetDateTime creationTimestamp; + + /* + * The drift action of the machine. Indicates whether a machine has deviated from its expected state due to changes + * in managed cluster properties, requiring corrective action. + */ + private DriftAction driftAction; + + /* + * Reason for machine drift. Provides detailed information on why the machine has drifted. This field is omitted if + * the machine is up to date. + */ + private String driftReason; + + /* + * Virtual machine state. Indicates the current state of the underlying virtual machine. + */ + private VmState vmState; + + /** + * Creates an instance of MachineStatus class. + */ + private MachineStatus() { + } + + /** + * Get the provisioningError property: The error details information of the machine. Preserves the detailed info of + * failure. If there was no error, this field is omitted. + * + * @return the provisioningError value. + */ + public ManagementError provisioningError() { + return this.provisioningError; + } + + /** + * Get the creationTimestamp property: Specifies the time at which the machine was created. + * + * @return the creationTimestamp value. + */ + public OffsetDateTime creationTimestamp() { + return this.creationTimestamp; + } + + /** + * Get the driftAction property: The drift action of the machine. Indicates whether a machine has deviated from its + * expected state due to changes in managed cluster properties, requiring corrective action. + * + * @return the driftAction value. + */ + public DriftAction driftAction() { + return this.driftAction; + } + + /** + * Get the driftReason property: Reason for machine drift. Provides detailed information on why the machine has + * drifted. This field is omitted if the machine is up to date. + * + * @return the driftReason value. + */ + public String driftReason() { + return this.driftReason; + } + + /** + * Get the vmState property: Virtual machine state. Indicates the current state of the underlying virtual machine. + * + * @return the vmState value. + */ + public VmState vmState() { + return this.vmState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineStatus. + */ + public static MachineStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineStatus deserializedMachineStatus = new MachineStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningError".equals(fieldName)) { + deserializedMachineStatus.provisioningError = ManagementError.fromJson(reader); + } else if ("creationTimestamp".equals(fieldName)) { + deserializedMachineStatus.creationTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("driftAction".equals(fieldName)) { + deserializedMachineStatus.driftAction = DriftAction.fromString(reader.getString()); + } else if ("driftReason".equals(fieldName)) { + deserializedMachineStatus.driftReason = reader.getString(); + } else if ("vmState".equals(fieldName)) { + deserializedMachineStatus.vmState = VmState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineStatus; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindowResourceProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindowResourceProperties.java new file mode 100644 index 000000000000..dfdb9afe4863 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindowResourceProperties.java @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.List; +import java.util.Objects; + +/** + * Properties of a maintenance window. + * For more information, see https://aka.ms/aks/maintenance-windows. + */ +@Fluent +public final class MaintenanceWindowResourceProperties + implements JsonSerializable { + /* + * The provisioning state of the maintenance window. + */ + private ResourceProvisioningState provisioningState; + + /* + * Recurrence schedule for the maintenance window. One and only one of the schedule + * types should be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. + */ + private Schedule schedule; + + /* + * The date the maintenance window activates. If the current date is before this + * date, the maintenance window is inactive and will not be used. If not specified, + * the maintenance window will be active right away. + */ + private LocalDate startDate; + + /* + * The start time of the maintenance window. Accepted values are from '00:00' to + * '23:59'. 'utcOffset' applies to this field. For example: '02:00' with + * 'utcOffset: +02:00' means UTC time '00:00'. + */ + private String startTime; + + /* + * Length of the maintenance window in hours. + */ + private int durationHours; + + /* + * The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' + * for PST. If not specified, the default is '+00:00'. + * Note: this is a static offset and does not adjust for Daylight Saving Time. + * Customers in DST-observing regions should pick the offset that matches their + * preferred wall-clock time year-round; the maintenance window will shift by one + * hour relative to local time when DST starts or ends. + */ + private String utcOffset; + + /* + * Date ranges during which maintenance is not allowed. 'utcOffset' applies to + * these dates. For example, with 'utcOffset: +02:00' and a date span of + * '2026-12-23' to '2027-01-03', maintenance will be blocked from + * '2026-12-22 22:00' to '2027-01-03 22:00' in UTC time. + */ + private List notAllowedDates; + + /** + * Creates an instance of MaintenanceWindowResourceProperties class. + */ + public MaintenanceWindowResourceProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the maintenance window. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the schedule property: Recurrence schedule for the maintenance window. One and only one of the schedule + * types should be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. + * + * @return the schedule value. + */ + public Schedule schedule() { + return this.schedule; + } + + /** + * Set the schedule property: Recurrence schedule for the maintenance window. One and only one of the schedule + * types should be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. + * + * @param schedule the schedule value to set. + * @return the MaintenanceWindowResourceProperties object itself. + */ + public MaintenanceWindowResourceProperties withSchedule(Schedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get the startDate property: The date the maintenance window activates. If the current date is before this + * date, the maintenance window is inactive and will not be used. If not specified, + * the maintenance window will be active right away. + * + * @return the startDate value. + */ + public LocalDate startDate() { + return this.startDate; + } + + /** + * Set the startDate property: The date the maintenance window activates. If the current date is before this + * date, the maintenance window is inactive and will not be used. If not specified, + * the maintenance window will be active right away. + * + * @param startDate the startDate value to set. + * @return the MaintenanceWindowResourceProperties object itself. + */ + public MaintenanceWindowResourceProperties withStartDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Get the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to + * '23:59'. 'utcOffset' applies to this field. For example: '02:00' with + * 'utcOffset: +02:00' means UTC time '00:00'. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to + * '23:59'. 'utcOffset' applies to this field. For example: '02:00' with + * 'utcOffset: +02:00' means UTC time '00:00'. + * + * @param startTime the startTime value to set. + * @return the MaintenanceWindowResourceProperties object itself. + */ + public MaintenanceWindowResourceProperties withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the durationHours property: Length of the maintenance window in hours. + * + * @return the durationHours value. + */ + public int durationHours() { + return this.durationHours; + } + + /** + * Set the durationHours property: Length of the maintenance window in hours. + * + * @param durationHours the durationHours value to set. + * @return the MaintenanceWindowResourceProperties object itself. + */ + public MaintenanceWindowResourceProperties withDurationHours(int durationHours) { + this.durationHours = durationHours; + return this; + } + + /** + * Get the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' + * for PST. If not specified, the default is '+00:00'. + * Note: this is a static offset and does not adjust for Daylight Saving Time. + * Customers in DST-observing regions should pick the offset that matches their + * preferred wall-clock time year-round; the maintenance window will shift by one + * hour relative to local time when DST starts or ends. + * + * @return the utcOffset value. + */ + public String utcOffset() { + return this.utcOffset; + } + + /** + * Set the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' + * for PST. If not specified, the default is '+00:00'. + * Note: this is a static offset and does not adjust for Daylight Saving Time. + * Customers in DST-observing regions should pick the offset that matches their + * preferred wall-clock time year-round; the maintenance window will shift by one + * hour relative to local time when DST starts or ends. + * + * @param utcOffset the utcOffset value to set. + * @return the MaintenanceWindowResourceProperties object itself. + */ + public MaintenanceWindowResourceProperties withUtcOffset(String utcOffset) { + this.utcOffset = utcOffset; + return this; + } + + /** + * Get the notAllowedDates property: Date ranges during which maintenance is not allowed. 'utcOffset' applies to + * these dates. For example, with 'utcOffset: +02:00' and a date span of + * '2026-12-23' to '2027-01-03', maintenance will be blocked from + * '2026-12-22 22:00' to '2027-01-03 22:00' in UTC time. + * + * @return the notAllowedDates value. + */ + public List notAllowedDates() { + return this.notAllowedDates; + } + + /** + * Set the notAllowedDates property: Date ranges during which maintenance is not allowed. 'utcOffset' applies to + * these dates. For example, with 'utcOffset: +02:00' and a date span of + * '2026-12-23' to '2027-01-03', maintenance will be blocked from + * '2026-12-22 22:00' to '2027-01-03 22:00' in UTC time. + * + * @param notAllowedDates the notAllowedDates value to set. + * @return the MaintenanceWindowResourceProperties object itself. + */ + public MaintenanceWindowResourceProperties withNotAllowedDates(List notAllowedDates) { + this.notAllowedDates = notAllowedDates; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (schedule() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property schedule in model MaintenanceWindowResourceProperties")); + } else { + schedule().validate(); + } + if (startTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property startTime in model MaintenanceWindowResourceProperties")); + } + if (notAllowedDates() != null) { + notAllowedDates().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceWindowResourceProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("schedule", this.schedule); + jsonWriter.writeStringField("startTime", this.startTime); + jsonWriter.writeIntField("durationHours", this.durationHours); + jsonWriter.writeStringField("startDate", Objects.toString(this.startDate, null)); + jsonWriter.writeStringField("utcOffset", this.utcOffset); + jsonWriter.writeArrayField("notAllowedDates", this.notAllowedDates, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowResourceProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceWindowResourceProperties. + */ + public static MaintenanceWindowResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowResourceProperties deserializedMaintenanceWindowResourceProperties + = new MaintenanceWindowResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schedule".equals(fieldName)) { + deserializedMaintenanceWindowResourceProperties.schedule = Schedule.fromJson(reader); + } else if ("startTime".equals(fieldName)) { + deserializedMaintenanceWindowResourceProperties.startTime = reader.getString(); + } else if ("durationHours".equals(fieldName)) { + deserializedMaintenanceWindowResourceProperties.durationHours = reader.getInt(); + } else if ("provisioningState".equals(fieldName)) { + deserializedMaintenanceWindowResourceProperties.provisioningState + = ResourceProvisioningState.fromString(reader.getString()); + } else if ("startDate".equals(fieldName)) { + deserializedMaintenanceWindowResourceProperties.startDate + = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); + } else if ("utcOffset".equals(fieldName)) { + deserializedMaintenanceWindowResourceProperties.utcOffset = reader.getString(); + } else if ("notAllowedDates".equals(fieldName)) { + List notAllowedDates = reader.readArray(reader1 -> DateSpan.fromJson(reader1)); + deserializedMaintenanceWindowResourceProperties.notAllowedDates = notAllowedDates; + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowResourceProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java index a8cf4f09cc52..8ea9453e682a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java @@ -296,6 +296,24 @@ public ManagedClusterAgentPoolProfile withNodeImageVersion(String nodeImageVersi return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { + super.withUpgradeStrategy(upgradeStrategy); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withEnableOSDiskFullCaching(Boolean enableOSDiskFullCaching) { + super.withEnableOSDiskFullCaching(enableOSDiskFullCaching); + return this; + } + /** * {@inheritDoc} */ @@ -305,6 +323,16 @@ public ManagedClusterAgentPoolProfile withUpgradeSettings(AgentPoolUpgradeSettin return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile + withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { + super.withUpgradeSettingsBlueGreen(upgradeSettingsBlueGreen); + return this; + } + /** * {@inheritDoc} */ @@ -395,6 +423,15 @@ public ManagedClusterAgentPoolProfile withNodeTaints(List nodeTaints) { return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNodeInitializationTaints(List nodeInitializationTaints) { + super.withNodeInitializationTaints(nodeInitializationTaints); + return this; + } + /** * {@inheritDoc} */ @@ -577,6 +614,16 @@ public ManagedClusterAgentPoolProfile withLocalDnsProfile(LocalDnsProfile localD return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile + withPreparedImageSpecificationProfile(PreparedImageSpecificationProfile preparedImageSpecificationProfile) { + super.withPreparedImageSpecificationProfile(preparedImageSpecificationProfile); + return this; + } + /** * Validates the instance. * @@ -592,6 +639,9 @@ public void validate() { if (upgradeSettings() != null) { upgradeSettings().validate(); } + if (upgradeSettingsBlueGreen() != null) { + upgradeSettingsBlueGreen().validate(); + } if (powerState() != null) { powerState().validate(); } @@ -634,6 +684,9 @@ public void validate() { if (localDnsProfile() != null) { localDnsProfile().validate(); } + if (preparedImageSpecificationProfile() != null) { + preparedImageSpecificationProfile().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterAgentPoolProfile.class); @@ -666,7 +719,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("mode", mode() == null ? null : mode().toString()); jsonWriter.writeStringField("orchestratorVersion", orchestratorVersion()); jsonWriter.writeStringField("nodeImageVersion", nodeImageVersion()); + jsonWriter.writeStringField("upgradeStrategy", upgradeStrategy() == null ? null : upgradeStrategy().toString()); + jsonWriter.writeBooleanField("enableOSDiskFullCaching", enableOSDiskFullCaching()); jsonWriter.writeJsonField("upgradeSettings", upgradeSettings()); + jsonWriter.writeJsonField("upgradeSettingsBlueGreen", upgradeSettingsBlueGreen()); jsonWriter.writeJsonField("powerState", powerState()); jsonWriter.writeArrayField("availabilityZones", availabilityZones(), (writer, element) -> writer.writeString(element)); @@ -680,6 +736,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("nodeLabels", nodeLabels(), (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("nodeTaints", nodeTaints(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeInitializationTaints", nodeInitializationTaints(), + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("proximityPlacementGroupID", proximityPlacementGroupId()); jsonWriter.writeJsonField("kubeletConfig", kubeletConfig()); jsonWriter.writeJsonField("linuxOSConfig", linuxOSConfig()); @@ -702,6 +760,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("status", status()); jsonWriter.writeJsonField("localDNSProfile", localDnsProfile()); + jsonWriter.writeJsonField("preparedImageSpecificationProfile", preparedImageSpecificationProfile()); jsonWriter.writeStringField("name", this.name); return jsonWriter.writeEndObject(); } @@ -775,9 +834,18 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr deserializedManagedClusterAgentPoolProfile.currentOrchestratorVersion = reader.getString(); } else if ("nodeImageVersion".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withNodeImageVersion(reader.getString()); + } else if ("upgradeStrategy".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withUpgradeStrategy(UpgradeStrategy.fromString(reader.getString())); + } else if ("enableOSDiskFullCaching".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withEnableOSDiskFullCaching(reader.getNullable(JsonReader::getBoolean)); } else if ("upgradeSettings".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withUpgradeSettings(AgentPoolUpgradeSettings.fromJson(reader)); + } else if ("upgradeSettingsBlueGreen".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings.fromJson(reader)); } else if ("provisioningState".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { @@ -808,6 +876,9 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr } else if ("nodeTaints".equals(fieldName)) { List nodeTaints = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterAgentPoolProfile.withNodeTaints(nodeTaints); + } else if ("nodeInitializationTaints".equals(fieldName)) { + List nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfile.withNodeInitializationTaints(nodeInitializationTaints); } else if ("proximityPlacementGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withProximityPlacementGroupId(reader.getString()); } else if ("kubeletConfig".equals(fieldName)) { @@ -860,6 +931,9 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr deserializedManagedClusterAgentPoolProfile.withStatus(AgentPoolStatus.fromJson(reader)); } else if ("localDNSProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withLocalDnsProfile(LocalDnsProfile.fromJson(reader)); + } else if ("preparedImageSpecificationProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withPreparedImageSpecificationProfile(PreparedImageSpecificationProfile.fromJson(reader)); } else if ("name".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.name = reader.getString(); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterControlPlaneScalingProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterControlPlaneScalingProfile.java new file mode 100644 index 000000000000..e4840f8e70a8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterControlPlaneScalingProfile.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile for providing scaled and performance guaranteed control plane capacity to deliver consistent performance + * under high workload. Requires Kubernetes version 1.33.0 or later. + */ +@Fluent +public final class ManagedClusterControlPlaneScalingProfile + implements JsonSerializable { + /* + * The scaling size of the control plane. Scaling sizes offer guaranteed capacity and predictable Kubernetes + * performance beyond standard tier defaults. Higher H sizes provide increased performance guarantees. See + * https://aka.ms/aks/hyperscale for performance metrics details for each size. + */ + private ControlPlaneScalingSize scalingSize; + + /** + * Creates an instance of ManagedClusterControlPlaneScalingProfile class. + */ + public ManagedClusterControlPlaneScalingProfile() { + } + + /** + * Get the scalingSize property: The scaling size of the control plane. Scaling sizes offer guaranteed capacity and + * predictable Kubernetes performance beyond standard tier defaults. Higher H sizes provide increased performance + * guarantees. See https://aka.ms/aks/hyperscale for performance metrics details for each size. + * + * @return the scalingSize value. + */ + public ControlPlaneScalingSize scalingSize() { + return this.scalingSize; + } + + /** + * Set the scalingSize property: The scaling size of the control plane. Scaling sizes offer guaranteed capacity and + * predictable Kubernetes performance beyond standard tier defaults. Higher H sizes provide increased performance + * guarantees. See https://aka.ms/aks/hyperscale for performance metrics details for each size. + * + * @param scalingSize the scalingSize value to set. + * @return the ManagedClusterControlPlaneScalingProfile object itself. + */ + public ManagedClusterControlPlaneScalingProfile withScalingSize(ControlPlaneScalingSize scalingSize) { + this.scalingSize = scalingSize; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scalingSize() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property scalingSize in model ManagedClusterControlPlaneScalingProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterControlPlaneScalingProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scalingSize", this.scalingSize == null ? null : this.scalingSize.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterControlPlaneScalingProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterControlPlaneScalingProfile if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedClusterControlPlaneScalingProfile. + */ + public static ManagedClusterControlPlaneScalingProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterControlPlaneScalingProfile deserializedManagedClusterControlPlaneScalingProfile + = new ManagedClusterControlPlaneScalingProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scalingSize".equals(fieldName)) { + deserializedManagedClusterControlPlaneScalingProfile.scalingSize + = ControlPlaneScalingSize.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterControlPlaneScalingProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHealthMonitorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHealthMonitorProfile.java new file mode 100644 index 000000000000..a4981a55eba5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHealthMonitorProfile.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Health monitor profile for the managed cluster. + */ +@Fluent +public final class ManagedClusterHealthMonitorProfile implements JsonSerializable { + /* + * Whether to enable continuous control plane and addon monitor. + */ + private Boolean enableContinuousControlPlaneAndAddonMonitor; + + /* + * Whether to enable on-demand monitor. + */ + private Boolean enableOnDemandMonitor; + + /** + * Creates an instance of ManagedClusterHealthMonitorProfile class. + */ + public ManagedClusterHealthMonitorProfile() { + } + + /** + * Get the enableContinuousControlPlaneAndAddonMonitor property: Whether to enable continuous control plane and + * addon monitor. + * + * @return the enableContinuousControlPlaneAndAddonMonitor value. + */ + public Boolean enableContinuousControlPlaneAndAddonMonitor() { + return this.enableContinuousControlPlaneAndAddonMonitor; + } + + /** + * Set the enableContinuousControlPlaneAndAddonMonitor property: Whether to enable continuous control plane and + * addon monitor. + * + * @param enableContinuousControlPlaneAndAddonMonitor the enableContinuousControlPlaneAndAddonMonitor value to set. + * @return the ManagedClusterHealthMonitorProfile object itself. + */ + public ManagedClusterHealthMonitorProfile + withEnableContinuousControlPlaneAndAddonMonitor(Boolean enableContinuousControlPlaneAndAddonMonitor) { + this.enableContinuousControlPlaneAndAddonMonitor = enableContinuousControlPlaneAndAddonMonitor; + return this; + } + + /** + * Get the enableOnDemandMonitor property: Whether to enable on-demand monitor. + * + * @return the enableOnDemandMonitor value. + */ + public Boolean enableOnDemandMonitor() { + return this.enableOnDemandMonitor; + } + + /** + * Set the enableOnDemandMonitor property: Whether to enable on-demand monitor. + * + * @param enableOnDemandMonitor the enableOnDemandMonitor value to set. + * @return the ManagedClusterHealthMonitorProfile object itself. + */ + public ManagedClusterHealthMonitorProfile withEnableOnDemandMonitor(Boolean enableOnDemandMonitor) { + this.enableOnDemandMonitor = enableOnDemandMonitor; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableContinuousControlPlaneAndAddonMonitor", + this.enableContinuousControlPlaneAndAddonMonitor); + jsonWriter.writeBooleanField("enableOnDemandMonitor", this.enableOnDemandMonitor); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterHealthMonitorProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterHealthMonitorProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterHealthMonitorProfile. + */ + public static ManagedClusterHealthMonitorProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterHealthMonitorProfile deserializedManagedClusterHealthMonitorProfile + = new ManagedClusterHealthMonitorProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableContinuousControlPlaneAndAddonMonitor".equals(fieldName)) { + deserializedManagedClusterHealthMonitorProfile.enableContinuousControlPlaneAndAddonMonitor + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableOnDemandMonitor".equals(fieldName)) { + deserializedManagedClusterHealthMonitorProfile.enableOnDemandMonitor + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterHealthMonitorProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java index aca96ac49794..796ed2329e1e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java @@ -32,6 +32,12 @@ public final class ManagedClusterHttpProxyConfig implements JsonSerializable noProxy; + /* + * A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset of + * noProxy and values injected by AKS. + */ + private List effectiveNoProxy; + /* * Alternative CA cert to use for connecting to proxy servers. */ @@ -109,6 +115,16 @@ public ManagedClusterHttpProxyConfig withNoProxy(List noProxy) { return this; } + /** + * Get the effectiveNoProxy property: A read-only list of all endpoints for which traffic should not be sent to the + * proxy. This list is a superset of noProxy and values injected by AKS. + * + * @return the effectiveNoProxy value. + */ + public List effectiveNoProxy() { + return this.effectiveNoProxy; + } + /** * Get the trustedCa property: Alternative CA cert to use for connecting to proxy servers. * @@ -196,6 +212,9 @@ public static ManagedClusterHttpProxyConfig fromJson(JsonReader jsonReader) thro } else if ("noProxy".equals(fieldName)) { List noProxy = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterHttpProxyConfig.noProxy = noProxy; + } else if ("effectiveNoProxy".equals(fieldName)) { + List effectiveNoProxy = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterHttpProxyConfig.effectiveNoProxy = effectiveNoProxy; } else if ("trustedCa".equals(fieldName)) { deserializedManagedClusterHttpProxyConfig.trustedCa = reader.getString(); } else if ("enabled".equals(fieldName)) { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java new file mode 100644 index 000000000000..02ee4a68be4f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Default domain profile for the managed cluster ingress profile. + */ +@Fluent +public final class ManagedClusterIngressDefaultDomainProfile + implements JsonSerializable { + /* + * Whether to enable Default Domain. + */ + private Boolean enabled; + + /* + * The unique fully qualified domain name assigned to the cluster. This will not change even if disabled then + * reenabled. + */ + private String domainName; + + /** + * Creates an instance of ManagedClusterIngressDefaultDomainProfile class. + */ + public ManagedClusterIngressDefaultDomainProfile() { + } + + /** + * Get the enabled property: Whether to enable Default Domain. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Default Domain. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterIngressDefaultDomainProfile object itself. + */ + public ManagedClusterIngressDefaultDomainProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the domainName property: The unique fully qualified domain name assigned to the cluster. This will not change + * even if disabled then reenabled. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressDefaultDomainProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressDefaultDomainProfile if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterIngressDefaultDomainProfile. + */ + public static ManagedClusterIngressDefaultDomainProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressDefaultDomainProfile deserializedManagedClusterIngressDefaultDomainProfile + = new ManagedClusterIngressDefaultDomainProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterIngressDefaultDomainProfile.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("domainName".equals(fieldName)) { + deserializedManagedClusterIngressDefaultDomainProfile.domainName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressDefaultDomainProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java index 63edb179b945..383fdcb55412 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java @@ -27,6 +27,11 @@ public final class ManagedClusterIngressProfile implements JsonSerializable { + /* + * Whether to enable Application Load Balancer. + */ + private Boolean enabled; + + /* + * Managed identity of the Application Load Balancer add-on. This is the identity that should be granted permissions + * to manage the associated Application Gateway for Containers resource. + */ + private UserAssignedIdentity identity; + + /** + * Creates an instance of ManagedClusterIngressProfileApplicationLoadBalancer class. + */ + public ManagedClusterIngressProfileApplicationLoadBalancer() { + } + + /** + * Get the enabled property: Whether to enable Application Load Balancer. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Application Load Balancer. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterIngressProfileApplicationLoadBalancer object itself. + */ + public ManagedClusterIngressProfileApplicationLoadBalancer withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the identity property: Managed identity of the Application Load Balancer add-on. This is the identity that + * should be granted permissions to manage the associated Application Gateway for Containers resource. + * + * @return the identity value. + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressProfileApplicationLoadBalancer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressProfileApplicationLoadBalancer if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterIngressProfileApplicationLoadBalancer. + */ + public static ManagedClusterIngressProfileApplicationLoadBalancer fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressProfileApplicationLoadBalancer deserializedManagedClusterIngressProfileApplicationLoadBalancer + = new ManagedClusterIngressProfileApplicationLoadBalancer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterIngressProfileApplicationLoadBalancer.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("identity".equals(fieldName)) { + deserializedManagedClusterIngressProfileApplicationLoadBalancer.identity + = UserAssignedIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressProfileApplicationLoadBalancer; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java index 5be044dc901a..1d85a2dfe24b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java @@ -50,6 +50,13 @@ public final class ManagedClusterIngressProfileWebAppRouting */ private UserAssignedIdentity identity; + /* + * Configuration for the Default Domain. This is a unique, autogenerated domain that comes with a signed TLS + * Certificate allowing for secure HTTPS. See [the Default Domain documentation](https://aka.ms/aks/defaultdomain) + * for more instructions. + */ + private ManagedClusterIngressDefaultDomainProfile defaultDomain; + /** * Creates an instance of ManagedClusterIngressProfileWebAppRouting class. */ @@ -159,6 +166,31 @@ public UserAssignedIdentity identity() { return this.identity; } + /** + * Get the defaultDomain property: Configuration for the Default Domain. This is a unique, autogenerated domain that + * comes with a signed TLS Certificate allowing for secure HTTPS. See [the Default Domain + * documentation](https://aka.ms/aks/defaultdomain) for more instructions. + * + * @return the defaultDomain value. + */ + public ManagedClusterIngressDefaultDomainProfile defaultDomain() { + return this.defaultDomain; + } + + /** + * Set the defaultDomain property: Configuration for the Default Domain. This is a unique, autogenerated domain that + * comes with a signed TLS Certificate allowing for secure HTTPS. See [the Default Domain + * documentation](https://aka.ms/aks/defaultdomain) for more instructions. + * + * @param defaultDomain the defaultDomain value to set. + * @return the ManagedClusterIngressProfileWebAppRouting object itself. + */ + public ManagedClusterIngressProfileWebAppRouting + withDefaultDomain(ManagedClusterIngressDefaultDomainProfile defaultDomain) { + this.defaultDomain = defaultDomain; + return this; + } + /** * Validates the instance. * @@ -174,6 +206,9 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (defaultDomain() != null) { + defaultDomain().validate(); + } } /** @@ -187,6 +222,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("dnsZoneResourceIds", this.dnsZoneResourceIds, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("nginx", this.nginx); + jsonWriter.writeJsonField("defaultDomain", this.defaultDomain); return jsonWriter.writeEndObject(); } @@ -221,6 +257,9 @@ public static ManagedClusterIngressProfileWebAppRouting fromJson(JsonReader json } else if ("identity".equals(fieldName)) { deserializedManagedClusterIngressProfileWebAppRouting.identity = UserAssignedIdentity.fromJson(reader); + } else if ("defaultDomain".equals(fieldName)) { + deserializedManagedClusterIngressProfileWebAppRouting.defaultDomain + = ManagedClusterIngressDefaultDomainProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java index 917a6232954e..744e402a98dc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java @@ -59,6 +59,11 @@ public final class ManagedClusterLoadBalancerProfile implements JsonSerializable */ private BackendPoolType backendPoolType; + /* + * The health probing behavior for External Traffic Policy Cluster services. + */ + private ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode; + /** * Creates an instance of ManagedClusterLoadBalancerProfile class. */ @@ -223,6 +228,29 @@ public ManagedClusterLoadBalancerProfile withBackendPoolType(BackendPoolType bac return this; } + /** + * Get the clusterServiceLoadBalancerHealthProbeMode property: The health probing behavior for External Traffic + * Policy Cluster services. + * + * @return the clusterServiceLoadBalancerHealthProbeMode value. + */ + public ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode() { + return this.clusterServiceLoadBalancerHealthProbeMode; + } + + /** + * Set the clusterServiceLoadBalancerHealthProbeMode property: The health probing behavior for External Traffic + * Policy Cluster services. + * + * @param clusterServiceLoadBalancerHealthProbeMode the clusterServiceLoadBalancerHealthProbeMode value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withClusterServiceLoadBalancerHealthProbeMode( + ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode) { + this.clusterServiceLoadBalancerHealthProbeMode = clusterServiceLoadBalancerHealthProbeMode; + return this; + } + /** * Validates the instance. * @@ -257,6 +285,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enableMultipleStandardLoadBalancers", this.enableMultipleStandardLoadBalancers); jsonWriter.writeStringField("backendPoolType", this.backendPoolType == null ? null : this.backendPoolType.toString()); + jsonWriter.writeStringField("clusterServiceLoadBalancerHealthProbeMode", + this.clusterServiceLoadBalancerHealthProbeMode == null + ? null + : this.clusterServiceLoadBalancerHealthProbeMode.toString()); return jsonWriter.writeEndObject(); } @@ -301,6 +333,9 @@ public static ManagedClusterLoadBalancerProfile fromJson(JsonReader jsonReader) } else if ("backendPoolType".equals(fieldName)) { deserializedManagedClusterLoadBalancerProfile.backendPoolType = BackendPoolType.fromString(reader.getString()); + } else if ("clusterServiceLoadBalancerHealthProbeMode".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.clusterServiceLoadBalancerHealthProbeMode + = ClusterServiceLoadBalancerHealthProbeMode.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java index 2fe55571ce53..1032f8cea239 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java @@ -38,6 +38,11 @@ public final class ManagedClusterPoolUpgradeProfile implements JsonSerializable< */ private List upgrades; + /* + * List of components grouped by kubernetes major.minor version. + */ + private List componentsByReleases; + /** * Creates an instance of ManagedClusterPoolUpgradeProfile class. */ @@ -80,6 +85,15 @@ public List upgrades() { return this.upgrades; } + /** + * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @return the componentsByReleases value. + */ + public List componentsByReleases() { + return this.componentsByReleases; + } + /** * Validates the instance. * @@ -99,6 +113,9 @@ public void validate() { if (upgrades() != null) { upgrades().forEach(e -> e.validate()); } + if (componentsByReleases() != null) { + componentsByReleases().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPoolUpgradeProfile.class); @@ -113,6 +130,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeStringField("name", this.name); jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("componentsByReleases", this.componentsByReleases, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -143,6 +162,10 @@ public static ManagedClusterPoolUpgradeProfile fromJson(JsonReader jsonReader) t List upgrades = reader.readArray(reader1 -> ManagedClusterPoolUpgradeProfileUpgradesItem.fromJson(reader1)); deserializedManagedClusterPoolUpgradeProfile.upgrades = upgrades; + } else if ("componentsByReleases".equals(fieldName)) { + List componentsByReleases + = reader.readArray(reader1 -> ComponentsByRelease.fromJson(reader1)); + deserializedManagedClusterPoolUpgradeProfile.componentsByReleases = componentsByReleases; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java index 8717467dc2aa..07ce6b21b26c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java @@ -27,6 +27,11 @@ public final class ManagedClusterPoolUpgradeProfileUpgradesItem */ private Boolean isPreview; + /* + * Whether the Kubernetes version is out of support. + */ + private Boolean isOutOfSupport; + /** * Creates an instance of ManagedClusterPoolUpgradeProfileUpgradesItem class. */ @@ -51,6 +56,15 @@ public Boolean isPreview() { return this.isPreview; } + /** + * Get the isOutOfSupport property: Whether the Kubernetes version is out of support. + * + * @return the isOutOfSupport value. + */ + public Boolean isOutOfSupport() { + return this.isOutOfSupport; + } + /** * Validates the instance. * @@ -67,6 +81,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeBooleanField("isPreview", this.isPreview); + jsonWriter.writeBooleanField("isOutOfSupport", this.isOutOfSupport); return jsonWriter.writeEndObject(); } @@ -91,6 +106,9 @@ public static ManagedClusterPoolUpgradeProfileUpgradesItem fromJson(JsonReader j } else if ("isPreview".equals(fieldName)) { deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isPreview = reader.getNullable(JsonReader::getBoolean); + } else if ("isOutOfSupport".equals(fieldName)) { + deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isOutOfSupport + = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java new file mode 100644 index 000000000000..8bb2f269c587 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * managed cluster properties for snapshot, these properties are read only. + */ +@Immutable +public final class ManagedClusterPropertiesForSnapshot + implements JsonSerializable { + /* + * The current kubernetes version. + */ + private String kubernetesVersion; + + /* + * The current managed cluster sku. + */ + private ManagedClusterSku sku; + + /* + * Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + */ + private Boolean enableRbac; + + /* + * The current network profile. + */ + private NetworkProfileForSnapshot networkProfile; + + /** + * Creates an instance of ManagedClusterPropertiesForSnapshot class. + */ + private ManagedClusterPropertiesForSnapshot() { + } + + /** + * Get the kubernetesVersion property: The current kubernetes version. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Get the sku property: The current managed cluster sku. + * + * @return the sku value. + */ + public ManagedClusterSku sku() { + return this.sku; + } + + /** + * Get the enableRbac property: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + * + * @return the enableRbac value. + */ + public Boolean enableRbac() { + return this.enableRbac; + } + + /** + * Get the networkProfile property: The current network profile. + * + * @return the networkProfile value. + */ + public NetworkProfileForSnapshot networkProfile() { + return this.networkProfile; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPropertiesForSnapshot from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPropertiesForSnapshot if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterPropertiesForSnapshot. + */ + public static ManagedClusterPropertiesForSnapshot fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPropertiesForSnapshot deserializedManagedClusterPropertiesForSnapshot + = new ManagedClusterPropertiesForSnapshot(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.kubernetesVersion = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.sku = ManagedClusterSku.fromJson(reader); + } else if ("enableRbac".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.enableRbac + = reader.getNullable(JsonReader::getBoolean); + } else if ("networkProfile".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.networkProfile + = NetworkProfileForSnapshot.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPropertiesForSnapshot; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java index 8810320b5af1..3be600dea027 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java @@ -45,6 +45,20 @@ public final class ManagedClusterSecurityProfile implements JsonSerializable customCATrustCertificates; + /* + * Defines service account based image pull settings. + */ + private ServiceAccountImagePullProfile serviceAccountImagePullProfile; + /** * Creates an instance of ManagedClusterSecurityProfile class. */ @@ -168,6 +187,56 @@ public ManagedClusterSecurityProfile withImageCleaner(ManagedClusterSecurityProf return this; } + /** + * Get the imageIntegrity property: Image integrity is a feature that works with Azure Policy to verify image + * integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image signatures. + * See https://aka.ms/aks/image-integrity for how to use this feature via policy. + * + * @return the imageIntegrity value. + */ + public ManagedClusterSecurityProfileImageIntegrity imageIntegrity() { + return this.imageIntegrity; + } + + /** + * Set the imageIntegrity property: Image integrity is a feature that works with Azure Policy to verify image + * integrity by signature. This will not have any effect unless Azure Policy is applied to enforce image signatures. + * See https://aka.ms/aks/image-integrity for how to use this feature via policy. + * + * @param imageIntegrity the imageIntegrity value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withImageIntegrity(ManagedClusterSecurityProfileImageIntegrity imageIntegrity) { + this.imageIntegrity = imageIntegrity; + return this; + } + + /** + * Get the nodeRestriction property: [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + * + * @return the nodeRestriction value. + */ + public ManagedClusterSecurityProfileNodeRestriction nodeRestriction() { + return this.nodeRestriction; + } + + /** + * Set the nodeRestriction property: [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + * + * @param nodeRestriction the nodeRestriction value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withNodeRestriction(ManagedClusterSecurityProfileNodeRestriction nodeRestriction) { + this.nodeRestriction = nodeRestriction; + return this; + } + /** * Get the customCATrustCertificates property: A list of up to 10 base64 encoded CAs that will be added to the trust * store on all nodes in the cluster. For more information see [Custom CA Trust @@ -192,6 +261,27 @@ public ManagedClusterSecurityProfile withCustomCATrustCertificates(List return this; } + /** + * Get the serviceAccountImagePullProfile property: Defines service account based image pull settings. + * + * @return the serviceAccountImagePullProfile value. + */ + public ServiceAccountImagePullProfile serviceAccountImagePullProfile() { + return this.serviceAccountImagePullProfile; + } + + /** + * Set the serviceAccountImagePullProfile property: Defines service account based image pull settings. + * + * @param serviceAccountImagePullProfile the serviceAccountImagePullProfile value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withServiceAccountImagePullProfile(ServiceAccountImagePullProfile serviceAccountImagePullProfile) { + this.serviceAccountImagePullProfile = serviceAccountImagePullProfile; + return this; + } + /** * Validates the instance. * @@ -213,6 +303,15 @@ public void validate() { if (imageCleaner() != null) { imageCleaner().validate(); } + if (imageIntegrity() != null) { + imageIntegrity().validate(); + } + if (nodeRestriction() != null) { + nodeRestriction().validate(); + } + if (serviceAccountImagePullProfile() != null) { + serviceAccountImagePullProfile().validate(); + } } /** @@ -227,8 +326,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { this.kubernetesResourceObjectEncryptionProfile); jsonWriter.writeJsonField("workloadIdentity", this.workloadIdentity); jsonWriter.writeJsonField("imageCleaner", this.imageCleaner); + jsonWriter.writeJsonField("imageIntegrity", this.imageIntegrity); + jsonWriter.writeJsonField("nodeRestriction", this.nodeRestriction); jsonWriter.writeArrayField("customCATrustCertificates", this.customCATrustCertificates, (writer, element) -> writer.writeBinary(element)); + jsonWriter.writeJsonField("serviceAccountImagePullProfile", this.serviceAccountImagePullProfile); return jsonWriter.writeEndObject(); } @@ -262,9 +364,18 @@ public static ManagedClusterSecurityProfile fromJson(JsonReader jsonReader) thro } else if ("imageCleaner".equals(fieldName)) { deserializedManagedClusterSecurityProfile.imageCleaner = ManagedClusterSecurityProfileImageCleaner.fromJson(reader); + } else if ("imageIntegrity".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.imageIntegrity + = ManagedClusterSecurityProfileImageIntegrity.fromJson(reader); + } else if ("nodeRestriction".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.nodeRestriction + = ManagedClusterSecurityProfileNodeRestriction.fromJson(reader); } else if ("customCATrustCertificates".equals(fieldName)) { List customCATrustCertificates = reader.readArray(reader1 -> reader1.getBinary()); deserializedManagedClusterSecurityProfile.customCATrustCertificates = customCATrustCertificates; + } else if ("serviceAccountImagePullProfile".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.serviceAccountImagePullProfile + = ServiceAccountImagePullProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java new file mode 100644 index 000000000000..a8564658218f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Image integrity related settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileImageIntegrity + implements JsonSerializable { + /* + * Whether to enable image integrity. The default value is false. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileImageIntegrity class. + */ + public ManagedClusterSecurityProfileImageIntegrity() { + } + + /** + * Get the enabled property: Whether to enable image integrity. The default value is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable image integrity. The default value is false. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileImageIntegrity object itself. + */ + public ManagedClusterSecurityProfileImageIntegrity withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileImageIntegrity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileImageIntegrity if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileImageIntegrity. + */ + public static ManagedClusterSecurityProfileImageIntegrity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileImageIntegrity deserializedManagedClusterSecurityProfileImageIntegrity + = new ManagedClusterSecurityProfileImageIntegrity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileImageIntegrity.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileImageIntegrity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java new file mode 100644 index 000000000000..760149a2ed83 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Node Restriction settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileNodeRestriction + implements JsonSerializable { + /* + * Whether to enable Node Restriction + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileNodeRestriction class. + */ + public ManagedClusterSecurityProfileNodeRestriction() { + } + + /** + * Get the enabled property: Whether to enable Node Restriction. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Node Restriction. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileNodeRestriction object itself. + */ + public ManagedClusterSecurityProfileNodeRestriction withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileNodeRestriction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileNodeRestriction if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileNodeRestriction. + */ + public static ManagedClusterSecurityProfileNodeRestriction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileNodeRestriction deserializedManagedClusterSecurityProfileNodeRestriction + = new ManagedClusterSecurityProfileNodeRestriction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileNodeRestriction.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileNodeRestriction; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java index 437787a18357..0598abfa790f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java @@ -22,6 +22,11 @@ public final class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler */ private boolean enabled; + /* + * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + */ + private AddonAutoscaling addonAutoscaling; + /** * Creates an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler class. */ @@ -48,6 +53,27 @@ public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler withEnabled( return this; } + /** + * Get the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + * + * @return the addonAutoscaling value. + */ + public AddonAutoscaling addonAutoscaling() { + return this.addonAutoscaling; + } + + /** + * Set the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + * + * @param addonAutoscaling the addonAutoscaling value to set. + * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + withAddonAutoscaling(AddonAutoscaling addonAutoscaling) { + this.addonAutoscaling = addonAutoscaling; + return this; + } + /** * Validates the instance. * @@ -63,6 +89,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("addonAutoscaling", + this.addonAutoscaling == null ? null : this.addonAutoscaling.toString()); return jsonWriter.writeEndObject(); } @@ -88,6 +116,9 @@ public static ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler fromJ if ("enabled".equals(fieldName)) { deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.enabled = reader.getBoolean(); + } else if ("addonAutoscaling".equals(fieldName)) { + deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.addonAutoscaling + = AddonAutoscaling.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipPrivateConnectProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipPrivateConnectProfile.java new file mode 100644 index 000000000000..3d3b502f541f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipPrivateConnectProfile.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Private connect profile for mesh membership. + */ +@Fluent +public final class MeshMembershipPrivateConnectProfile + implements JsonSerializable { + /* + * The private IP address of the member cluster private FQDN. This is a read-only property populated by the service. + */ + private String privateIpAddress; + + /* + * The delegated subnet resource ID. Customer can provide their own subnet, or AKS will allocate one if not + * specified. When providing your own subnet, the minimum required size is /28 + */ + private String subnetResourceId; + + /** + * Creates an instance of MeshMembershipPrivateConnectProfile class. + */ + public MeshMembershipPrivateConnectProfile() { + } + + /** + * Get the privateIpAddress property: The private IP address of the member cluster private FQDN. This is a read-only + * property populated by the service. + * + * @return the privateIpAddress value. + */ + public String privateIpAddress() { + return this.privateIpAddress; + } + + /** + * Get the subnetResourceId property: The delegated subnet resource ID. Customer can provide their own subnet, or + * AKS will allocate one if not specified. When providing your own subnet, the minimum required size is /28. + * + * @return the subnetResourceId value. + */ + public String subnetResourceId() { + return this.subnetResourceId; + } + + /** + * Set the subnetResourceId property: The delegated subnet resource ID. Customer can provide their own subnet, or + * AKS will allocate one if not specified. When providing your own subnet, the minimum required size is /28. + * + * @param subnetResourceId the subnetResourceId value to set. + * @return the MeshMembershipPrivateConnectProfile object itself. + */ + public MeshMembershipPrivateConnectProfile withSubnetResourceId(String subnetResourceId) { + this.subnetResourceId = subnetResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("subnetResourceId", this.subnetResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipPrivateConnectProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipPrivateConnectProfile if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MeshMembershipPrivateConnectProfile. + */ + public static MeshMembershipPrivateConnectProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipPrivateConnectProfile deserializedMeshMembershipPrivateConnectProfile + = new MeshMembershipPrivateConnectProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateIpAddress".equals(fieldName)) { + deserializedMeshMembershipPrivateConnectProfile.privateIpAddress = reader.getString(); + } else if ("subnetResourceId".equals(fieldName)) { + deserializedMeshMembershipPrivateConnectProfile.subnetResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipPrivateConnectProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java new file mode 100644 index 000000000000..462dd0a25f37 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Mesh membership properties of a managed cluster. + */ +@Fluent +public final class MeshMembershipProperties implements JsonSerializable { + /* + * The current provisioning state of the Mesh Membership. + */ + private MeshMembershipProvisioningState provisioningState; + + /* + * Profile for configuring private connectivity between the mesh control plane and member clusters. When configured, + * communication between the mesh control plane and this member cluster occurs over private network instead of + * public networks. Visit https://aka.ms/applink for more information. + */ + private MeshMembershipPrivateConnectProfile privateConnectProfile; + + /* + * The ARM resource id for the managed mesh member. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{ + * appLinkName}/appLinkMembers/{appLinkMemberName}'. Visit https://aka.ms/applink for more information. + */ + private String managedMeshId; + + /** + * Creates an instance of MeshMembershipProperties class. + */ + public MeshMembershipProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state of the Mesh Membership. + * + * @return the provisioningState value. + */ + public MeshMembershipProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateConnectProfile property: Profile for configuring private connectivity between the mesh control + * plane and member clusters. When configured, communication between the mesh control plane and this member cluster + * occurs over private network instead of public networks. Visit https://aka.ms/applink for more information. + * + * @return the privateConnectProfile value. + */ + public MeshMembershipPrivateConnectProfile privateConnectProfile() { + return this.privateConnectProfile; + } + + /** + * Set the privateConnectProfile property: Profile for configuring private connectivity between the mesh control + * plane and member clusters. When configured, communication between the mesh control plane and this member cluster + * occurs over private network instead of public networks. Visit https://aka.ms/applink for more information. + * + * @param privateConnectProfile the privateConnectProfile value to set. + * @return the MeshMembershipProperties object itself. + */ + public MeshMembershipProperties + withPrivateConnectProfile(MeshMembershipPrivateConnectProfile privateConnectProfile) { + this.privateConnectProfile = privateConnectProfile; + return this; + } + + /** + * Get the managedMeshId property: The ARM resource id for the managed mesh member. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + * Visit https://aka.ms/applink for more information. + * + * @return the managedMeshId value. + */ + public String managedMeshId() { + return this.managedMeshId; + } + + /** + * Set the managedMeshId property: The ARM resource id for the managed mesh member. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + * Visit https://aka.ms/applink for more information. + * + * @param managedMeshId the managedMeshId value to set. + * @return the MeshMembershipProperties object itself. + */ + public MeshMembershipProperties withManagedMeshId(String managedMeshId) { + this.managedMeshId = managedMeshId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateConnectProfile() != null) { + privateConnectProfile().validate(); + } + if (managedMeshId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property managedMeshId in model MeshMembershipProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MeshMembershipProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("managedMeshID", this.managedMeshId); + jsonWriter.writeJsonField("privateConnectProfile", this.privateConnectProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MeshMembershipProperties. + */ + public static MeshMembershipProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipProperties deserializedMeshMembershipProperties = new MeshMembershipProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedMeshID".equals(fieldName)) { + deserializedMeshMembershipProperties.managedMeshId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedMeshMembershipProperties.provisioningState + = MeshMembershipProvisioningState.fromString(reader.getString()); + } else if ("privateConnectProfile".equals(fieldName)) { + deserializedMeshMembershipProperties.privateConnectProfile + = MeshMembershipPrivateConnectProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java new file mode 100644 index 000000000000..9f3800fba4da --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the last accepted operation. + */ +public final class MeshMembershipProvisioningState extends ExpandableStringEnum { + /** + * Resource creation was canceled. + */ + public static final MeshMembershipProvisioningState CANCELED = fromString("Canceled"); + + /** + * The Mesh Membership is being created. + */ + public static final MeshMembershipProvisioningState CREATING = fromString("Creating"); + + /** + * The Mesh Membership is being deleted. + */ + public static final MeshMembershipProvisioningState DELETING = fromString("Deleting"); + + /** + * Resource creation failed. + */ + public static final MeshMembershipProvisioningState FAILED = fromString("Failed"); + + /** + * Resource has been created. + */ + public static final MeshMembershipProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * The Mesh Membership is being updated. + */ + public static final MeshMembershipProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of MeshMembershipProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MeshMembershipProvisioningState() { + } + + /** + * Creates or finds a MeshMembershipProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MeshMembershipProvisioningState. + */ + public static MeshMembershipProvisioningState fromString(String name) { + return fromString(name, MeshMembershipProvisioningState.class); + } + + /** + * Gets known MeshMembershipProvisioningState values. + * + * @return known MeshMembershipProvisioningState values. + */ + public static Collection values() { + return values(MeshMembershipProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MigStrategy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MigStrategy.java new file mode 100644 index 000000000000..2c3caa57834c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MigStrategy.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG support. For more information about the + * different strategies, visit aka.ms/aks/managed-gpu. When not specified, the default is None. + */ +public final class MigStrategy extends ExpandableStringEnum { + /** + * No MIG partitioning is applied; the GPU is exposed as a single unified whole-device instance. Specifying this + * value removes any previously active MIG strategy. + */ + public static final MigStrategy NONE = fromString("None"); + + /** + * All MIG partitions on every GPU in the pool are the same size (`nvidia.com/mig.strategy: single`). The uniform + * partition size is controlled by `nvidia.migProfiles` (exactly one element required). + */ + public static final MigStrategy SINGLE = fromString("Single"); + + /** + * Each GPU in the pool can host heterogeneous partitions of different sizes simultaneously + * (`nvidia.com/mig.strategy: mixed`). The exact partition mix per GPU is declared via `nvidia.migProfiles`. + */ + public static final MigStrategy MIXED = fromString("Mixed"); + + /** + * Creates a new instance of MigStrategy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MigStrategy() { + } + + /** + * Creates or finds a MigStrategy from its string representation. + * + * @param name a name to look for. + * @return the corresponding MigStrategy. + */ + public static MigStrategy fromString(String name) { + return fromString(name, MigStrategy.class); + } + + /** + * Gets known MigStrategy values. + * + * @return known MigStrategy values. + */ + public static Collection values() { + return values(MigStrategy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java new file mode 100644 index 000000000000..43ad5b9807f5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). + */ +public final class Mode extends ExpandableStringEnum { + /** + * IPTables proxy mode. + */ + public static final Mode IPTABLES = fromString("IPTABLES"); + + /** + * IPVS proxy mode. Must be using Kubernetes version >= 1.22. + */ + public static final Mode IPVS = fromString("IPVS"); + + /** + * NFTables proxy mode. Must be using Kubernetes version >= 1.33. + */ + public static final Mode NFTABLES = fromString("NFTABLES"); + + /** + * Creates a new instance of Mode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Mode() { + } + + /** + * Creates or finds a Mode from its string representation. + * + * @param name a name to look for. + * @return the corresponding Mode. + */ + public static Mode fromString(String name) { + return fromString(name, Mode.class); + } + + /** + * Gets known Mode values. + * + * @return known Mode values. + */ + public static Collection values() { + return values(Mode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java new file mode 100644 index 000000000000..30c82df6eaf3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * network profile for managed cluster snapshot, these properties are read only. + */ +@Immutable +public final class NetworkProfileForSnapshot implements JsonSerializable { + /* + * networkPlugin for managed cluster snapshot. + */ + private NetworkPlugin networkPlugin; + + /* + * NetworkPluginMode for managed cluster snapshot. + */ + private NetworkPluginMode networkPluginMode; + + /* + * networkPolicy for managed cluster snapshot. + */ + private NetworkPolicy networkPolicy; + + /* + * networkMode for managed cluster snapshot. + */ + private NetworkMode networkMode; + + /* + * loadBalancerSku for managed cluster snapshot. + */ + private LoadBalancerSku loadBalancerSku; + + /** + * Creates an instance of NetworkProfileForSnapshot class. + */ + private NetworkProfileForSnapshot() { + } + + /** + * Get the networkPlugin property: networkPlugin for managed cluster snapshot. + * + * @return the networkPlugin value. + */ + public NetworkPlugin networkPlugin() { + return this.networkPlugin; + } + + /** + * Get the networkPluginMode property: NetworkPluginMode for managed cluster snapshot. + * + * @return the networkPluginMode value. + */ + public NetworkPluginMode networkPluginMode() { + return this.networkPluginMode; + } + + /** + * Get the networkPolicy property: networkPolicy for managed cluster snapshot. + * + * @return the networkPolicy value. + */ + public NetworkPolicy networkPolicy() { + return this.networkPolicy; + } + + /** + * Get the networkMode property: networkMode for managed cluster snapshot. + * + * @return the networkMode value. + */ + public NetworkMode networkMode() { + return this.networkMode; + } + + /** + * Get the loadBalancerSku property: loadBalancerSku for managed cluster snapshot. + * + * @return the loadBalancerSku value. + */ + public LoadBalancerSku loadBalancerSku() { + return this.loadBalancerSku; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkPlugin", this.networkPlugin == null ? null : this.networkPlugin.toString()); + jsonWriter.writeStringField("networkPluginMode", + this.networkPluginMode == null ? null : this.networkPluginMode.toString()); + jsonWriter.writeStringField("networkPolicy", this.networkPolicy == null ? null : this.networkPolicy.toString()); + jsonWriter.writeStringField("networkMode", this.networkMode == null ? null : this.networkMode.toString()); + jsonWriter.writeStringField("loadBalancerSku", + this.loadBalancerSku == null ? null : this.loadBalancerSku.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkProfileForSnapshot from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkProfileForSnapshot if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkProfileForSnapshot. + */ + public static NetworkProfileForSnapshot fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkProfileForSnapshot deserializedNetworkProfileForSnapshot = new NetworkProfileForSnapshot(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkPlugin".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkPlugin = NetworkPlugin.fromString(reader.getString()); + } else if ("networkPluginMode".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkPluginMode + = NetworkPluginMode.fromString(reader.getString()); + } else if ("networkPolicy".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkPolicy = NetworkPolicy.fromString(reader.getString()); + } else if ("networkMode".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkMode = NetworkMode.fromString(reader.getString()); + } else if ("loadBalancerSku".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.loadBalancerSku + = LoadBalancerSku.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkProfileForSnapshot; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionPolicy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionPolicy.java new file mode 100644 index 000000000000..03280f76af59 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionPolicy.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The policy configuration for when to allow certain operations which require node re-image and trigger redeployment. + * For example, some operations, such as updating the + * .properties.ManagedClusterSecurityProfile.customCATrustCertificates field on an existing managed cluster, trigger + * rolling updates of the nodes. This setting allows control over when such updates are accepted. The default is + * 'Allow'. For a full list of covered operations see aka.ms/aks/nodedisruptionpolicy". + */ +public final class NodeDisruptionPolicy extends ExpandableStringEnum { + /** + * Allows operations that will require node re-image and trigger redeployment. + */ + public static final NodeDisruptionPolicy ALLOW = fromString("Allow"); + + /** + * Blocks certain operations that will require node re-image and trigger redeployment unless within the + * aksManagedNodeOSUpgradeSchedule maintenance window. For a full list of covered operations see + * aka.ms/aks/nodedisruptionpolicy . For more information on using the aksManagedNodeOSUpgradeSchedule maintenance + * window, please see https://learn.microsoft.com/azure/aks/planned-maintenance?tabs=azure-cli. + */ + public static final NodeDisruptionPolicy ALLOW_DURING_MAINTENANCE_WINDOW + = fromString("AllowDuringMaintenanceWindow"); + + /** + * Blocks certain operations that will require node re-image and trigger redeployment. For a full list of covered + * operations see aka.ms/aks/nodedisruptionpolicy. + */ + public static final NodeDisruptionPolicy BLOCK = fromString("Block"); + + /** + * Creates a new instance of NodeDisruptionPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NodeDisruptionPolicy() { + } + + /** + * Creates or finds a NodeDisruptionPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodeDisruptionPolicy. + */ + public static NodeDisruptionPolicy fromString(String name) { + return fromString(name, NodeDisruptionPolicy.class); + } + + /** + * Gets known NodeDisruptionPolicy values. + * + * @return known NodeDisruptionPolicy values. + */ + public static Collection values() { + return values(NodeDisruptionPolicy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionProfile.java new file mode 100644 index 000000000000..2ac3eb9c2b88 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionProfile.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Node disruption profile for a managed cluster. + */ +@Fluent +public final class NodeDisruptionProfile implements JsonSerializable { + /* + * The policy configuration for when to allow certain operations which require node re-image and trigger + * redeployment. For example, some operations, such as updating the + * .properties.ManagedClusterSecurityProfile.customCATrustCertificates field on an existing managed cluster, trigger + * rolling updates of the nodes. This setting allows control over when such updates are accepted. The default is + * 'Allow'. For a full list of covered operations see aka.ms/aks/nodedisruptionpolicy". + */ + private NodeDisruptionPolicy nodeDisruptionPolicy; + + /** + * Creates an instance of NodeDisruptionProfile class. + */ + public NodeDisruptionProfile() { + } + + /** + * Get the nodeDisruptionPolicy property: The policy configuration for when to allow certain operations which + * require node re-image and trigger redeployment. For example, some operations, such as updating the + * .properties.ManagedClusterSecurityProfile.customCATrustCertificates field on an existing managed cluster, trigger + * rolling updates of the nodes. This setting allows control over when such updates are accepted. The default is + * 'Allow'. For a full list of covered operations see aka.ms/aks/nodedisruptionpolicy". + * + * @return the nodeDisruptionPolicy value. + */ + public NodeDisruptionPolicy nodeDisruptionPolicy() { + return this.nodeDisruptionPolicy; + } + + /** + * Set the nodeDisruptionPolicy property: The policy configuration for when to allow certain operations which + * require node re-image and trigger redeployment. For example, some operations, such as updating the + * .properties.ManagedClusterSecurityProfile.customCATrustCertificates field on an existing managed cluster, trigger + * rolling updates of the nodes. This setting allows control over when such updates are accepted. The default is + * 'Allow'. For a full list of covered operations see aka.ms/aks/nodedisruptionpolicy". + * + * @param nodeDisruptionPolicy the nodeDisruptionPolicy value to set. + * @return the NodeDisruptionProfile object itself. + */ + public NodeDisruptionProfile withNodeDisruptionPolicy(NodeDisruptionPolicy nodeDisruptionPolicy) { + this.nodeDisruptionPolicy = nodeDisruptionPolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nodeDisruptionPolicy", + this.nodeDisruptionPolicy == null ? null : this.nodeDisruptionPolicy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeDisruptionProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeDisruptionProfile if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NodeDisruptionProfile. + */ + public static NodeDisruptionProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeDisruptionProfile deserializedNodeDisruptionProfile = new NodeDisruptionProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodeDisruptionPolicy".equals(fieldName)) { + deserializedNodeDisruptionProfile.nodeDisruptionPolicy + = NodeDisruptionPolicy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeDisruptionProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaDriverMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaDriverMode.java new file mode 100644 index 000000000000..45edff67f443 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaDriverMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NVIDIA GPU resource allocation mode. + */ +public final class NvidiaDriverMode extends ExpandableStringEnum { + /** + * NVIDIA Kubernetes device plugin is installed on the nodes for resource allocation and scheduling. + */ + public static final NvidiaDriverMode DEVICE_PLUGIN = fromString("DevicePlugin"); + + /** + * NVIDIA Device Resource Allocation (DRA) driver is installed on the nodes for resource allocation and scheduling. + */ + public static final NvidiaDriverMode DRA = fromString("DRA"); + + /** + * Creates a new instance of NvidiaDriverMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NvidiaDriverMode() { + } + + /** + * Creates or finds a NvidiaDriverMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding NvidiaDriverMode. + */ + public static NvidiaDriverMode fromString(String name) { + return fromString(name, NvidiaDriverMode.class); + } + + /** + * Gets known NvidiaDriverMode values. + * + * @return known NvidiaDriverMode values. + */ + public static Collection values() { + return values(NvidiaDriverMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java index 709d404e35ba..edacaf2aa873 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * NVIDIA-specific GPU settings. @@ -23,6 +24,29 @@ public final class NvidiaGPUProfile implements JsonSerializable migProfiles; + /** * Creates an instance of NvidiaGPUProfile class. */ @@ -53,6 +77,84 @@ public NvidiaGPUProfile withManagementMode(ManagementMode managementMode) { return this; } + /** + * Get the driverMode property: + * NVIDIA GPU resource allocation mode. DevicePlugin installs the NVIDIA + * Kubernetes device plugin. DRA installs the NVIDIA DRA driver. + * + * @return the driverMode value. + */ + public NvidiaDriverMode driverMode() { + return this.driverMode; + } + + /** + * Set the driverMode property: + * NVIDIA GPU resource allocation mode. DevicePlugin installs the NVIDIA + * Kubernetes device plugin. DRA installs the NVIDIA DRA driver. + * + * @param driverMode the driverMode value to set. + * @return the NvidiaGPUProfile object itself. + */ + public NvidiaGPUProfile withDriverMode(NvidiaDriverMode driverMode) { + this.driverMode = driverMode; + return this; + } + + /** + * Get the migStrategy property: Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG + * support. For more information about the different strategies, visit aka.ms/aks/managed-gpu. When not specified, + * the default is None. + * + * @return the migStrategy value. + */ + public MigStrategy migStrategy() { + return this.migStrategy; + } + + /** + * Set the migStrategy property: Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG + * support. For more information about the different strategies, visit aka.ms/aks/managed-gpu. When not specified, + * the default is None. + * + * @param migStrategy the migStrategy value to set. + * @return the NvidiaGPUProfile object itself. + */ + public NvidiaGPUProfile withMigStrategy(MigStrategy migStrategy) { + this.migStrategy = migStrategy; + return this; + } + + /** + * Get the migProfiles property: The ordered list of MIG (Multi-Instance GPU) partition profiles to assign to each + * supported NVIDIA GPU. When `migStrategy` is `Single`, exactly one profile must be specified. When `migStrategy` + * is `Mixed`, one or more profiles may be specified and the combination is validated against the supported MIG + * geometry for the agent pool's GPU VM size. The same value may appear more than once to request multiple + * partitions of that size. This field is mutually exclusive with the top-level `gpuInstanceProfile` property. For + * more information, see https://aka.ms/aks/managed-gpu. + * + * @return the migProfiles value. + */ + public List migProfiles() { + return this.migProfiles; + } + + /** + * Set the migProfiles property: The ordered list of MIG (Multi-Instance GPU) partition profiles to assign to each + * supported NVIDIA GPU. When `migStrategy` is `Single`, exactly one profile must be specified. When `migStrategy` + * is `Mixed`, one or more profiles may be specified and the combination is validated against the supported MIG + * geometry for the agent pool's GPU VM size. The same value may appear more than once to request multiple + * partitions of that size. This field is mutually exclusive with the top-level `gpuInstanceProfile` property. For + * more information, see https://aka.ms/aks/managed-gpu. + * + * @param migProfiles the migProfiles value to set. + * @return the NvidiaGPUProfile object itself. + */ + public NvidiaGPUProfile withMigProfiles(List migProfiles) { + this.migProfiles = migProfiles; + return this; + } + /** * Validates the instance. * @@ -69,6 +171,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("managementMode", this.managementMode == null ? null : this.managementMode.toString()); + jsonWriter.writeStringField("driverMode", this.driverMode == null ? null : this.driverMode.toString()); + jsonWriter.writeStringField("migStrategy", this.migStrategy == null ? null : this.migStrategy.toString()); + jsonWriter.writeArrayField("migProfiles", this.migProfiles, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); return jsonWriter.writeEndObject(); } @@ -89,6 +195,14 @@ public static NvidiaGPUProfile fromJson(JsonReader jsonReader) throws IOExceptio if ("managementMode".equals(fieldName)) { deserializedNvidiaGPUProfile.managementMode = ManagementMode.fromString(reader.getString()); + } else if ("driverMode".equals(fieldName)) { + deserializedNvidiaGPUProfile.driverMode = NvidiaDriverMode.fromString(reader.getString()); + } else if ("migStrategy".equals(fieldName)) { + deserializedNvidiaGPUProfile.migStrategy = MigStrategy.fromString(reader.getString()); + } else if ("migProfiles".equals(fieldName)) { + List migProfiles + = reader.readArray(reader1 -> GpuInstanceProfile.fromString(reader1.getString())); + deserializedNvidiaGPUProfile.migProfiles = migProfiles; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java index 6d34285a2799..e3515f7764cb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java @@ -30,6 +30,18 @@ public final class OSSku extends ExpandableStringEnum { */ public static final OSSku AZURE_LINUX3 = fromString("AzureLinux3"); + /** + * Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. + */ + public static final OSSku MARINER = fromString("Mariner"); + + /** + * Use Flatcar Container Linux as the OS for node images. Flatcar is a container-optimized, security-focused Linux + * OS, with an immutable filesystem and part of the Cloud Native Computing Foundation (CNCF). For more information + * about Flatcar Container Linux for AKS, see aka.ms/aks/flatcar-container-linux-for-aks. + */ + public static final OSSku FLATCAR = fromString("Flatcar"); + /** * Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. */ @@ -59,6 +71,13 @@ public final class OSSku extends ExpandableStringEnum { */ public static final OSSku WINDOWS2025 = fromString("Windows2025"); + /** + * Use Windows Annual Channel version as the OS for node images. Unsupported for system node pools. Details about + * supported container images and kubernetes versions under different AKS Annual Channel versions could be seen in + * https://aka.ms/aks/windows-annual-channel-details. + */ + public static final OSSku WINDOWS_ANNUAL = fromString("WindowsAnnual"); + /** * Use Ubuntu2404 as the OS for node images, however, Ubuntu 24.04 may not be supported for all nodepools. For * limitations and supported kubernetes versions, see see https://aka.ms/aks/supported-ubuntu-versions. @@ -74,6 +93,12 @@ public final class OSSku extends ExpandableStringEnum { */ public static final OSSku AZURE_CONTAINER_LINUX = fromString("AzureContainerLinux"); + /** + * Use Ubuntu2604 as the OS for node images. For limitations and supported Kubernetes versions, see + * https://aka.ms/aks/supported-ubuntu-versions. + */ + public static final OSSku UBUNTU2604 = fromString("Ubuntu2604"); + /** * Creates a new instance of OSSku value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java new file mode 100644 index 000000000000..3047f879b8a9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * operator represents a key's relationship to a set of values. Valid operators are In and NotIn. + */ +public final class Operator extends ExpandableStringEnum { + /** + * The value of the key should be in the given list. + */ + public static final Operator IN = fromString("In"); + + /** + * The value of the key should not be in the given list. + */ + public static final Operator NOT_IN = fromString("NotIn"); + + /** + * The value of the key should exist. + */ + public static final Operator EXISTS = fromString("Exists"); + + /** + * The value of the key should not exist. + */ + public static final Operator DOES_NOT_EXIST = fromString("DoesNotExist"); + + /** + * Creates a new instance of Operator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Operator() { + } + + /** + * Creates or finds a Operator from its string representation. + * + * @param name a name to look for. + * @return the corresponding Operator. + */ + public static Operator fromString(String name) { + return fromString(name, Operator.class); + } + + /** + * Gets known Operator values. + * + * @return known Operator values. + */ + public static Collection values() { + return values(Operator.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java new file mode 100644 index 000000000000..967e4f295d88 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with + * hostNetwork=false. If not specified, the default is 'IMDS'. + */ +public final class PodLinkLocalAccess extends ExpandableStringEnum { + /** + * Pods with hostNetwork=false can access Azure Instance Metadata Service (IMDS) without restriction. + */ + public static final PodLinkLocalAccess IMDS = fromString("IMDS"); + + /** + * Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS). + */ + public static final PodLinkLocalAccess NONE = fromString("None"); + + /** + * Creates a new instance of PodLinkLocalAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PodLinkLocalAccess() { + } + + /** + * Creates or finds a PodLinkLocalAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding PodLinkLocalAccess. + */ + public static PodLinkLocalAccess fromString(String name) { + return fromString(name, PodLinkLocalAccess.class); + } + + /** + * Gets known PodLinkLocalAccess values. + * + * @return known PodLinkLocalAccess values. + */ + public static Collection values() { + return values(PodLinkLocalAccess.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PreparedImageSpecificationProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PreparedImageSpecificationProfile.java new file mode 100644 index 000000000000..eb767c7fb0d2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PreparedImageSpecificationProfile.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings to determine the prepared image specification used to provision nodes in a pool. + */ +@Fluent +public final class PreparedImageSpecificationProfile implements JsonSerializable { + /* + * The resource ID of the prepared image specification resource to use. This can include a version. Omitting the + * version will use the latest version of the prepared image specification. + */ + private String preparedImageSpecificationId; + + /** + * Creates an instance of PreparedImageSpecificationProfile class. + */ + public PreparedImageSpecificationProfile() { + } + + /** + * Get the preparedImageSpecificationId property: The resource ID of the prepared image specification resource to + * use. This can include a version. Omitting the version will use the latest version of the prepared image + * specification. + * + * @return the preparedImageSpecificationId value. + */ + public String preparedImageSpecificationId() { + return this.preparedImageSpecificationId; + } + + /** + * Set the preparedImageSpecificationId property: The resource ID of the prepared image specification resource to + * use. This can include a version. Omitting the version will use the latest version of the prepared image + * specification. + * + * @param preparedImageSpecificationId the preparedImageSpecificationId value to set. + * @return the PreparedImageSpecificationProfile object itself. + */ + public PreparedImageSpecificationProfile withPreparedImageSpecificationId(String preparedImageSpecificationId) { + this.preparedImageSpecificationId = preparedImageSpecificationId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("preparedImageSpecificationId", this.preparedImageSpecificationId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PreparedImageSpecificationProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PreparedImageSpecificationProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PreparedImageSpecificationProfile. + */ + public static PreparedImageSpecificationProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PreparedImageSpecificationProfile deserializedPreparedImageSpecificationProfile + = new PreparedImageSpecificationProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("preparedImageSpecificationId".equals(fieldName)) { + deserializedPreparedImageSpecificationProfile.preparedImageSpecificationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPreparedImageSpecificationProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java index d0f973ce2392..66424d6a749e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java @@ -21,6 +21,11 @@ public final class PublicNetworkAccess extends ExpandableStringEnum { + /* + * The load balancer names list. + */ + private List loadBalancerNames; + + /** + * Creates an instance of RebalanceLoadBalancersRequestBody class. + */ + public RebalanceLoadBalancersRequestBody() { + } + + /** + * Get the loadBalancerNames property: The load balancer names list. + * + * @return the loadBalancerNames value. + */ + public List loadBalancerNames() { + return this.loadBalancerNames; + } + + /** + * Set the loadBalancerNames property: The load balancer names list. + * + * @param loadBalancerNames the loadBalancerNames value to set. + * @return the RebalanceLoadBalancersRequestBody object itself. + */ + public RebalanceLoadBalancersRequestBody withLoadBalancerNames(List loadBalancerNames) { + this.loadBalancerNames = loadBalancerNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("loadBalancerNames", this.loadBalancerNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RebalanceLoadBalancersRequestBody from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RebalanceLoadBalancersRequestBody if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RebalanceLoadBalancersRequestBody. + */ + public static RebalanceLoadBalancersRequestBody fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RebalanceLoadBalancersRequestBody deserializedRebalanceLoadBalancersRequestBody + = new RebalanceLoadBalancersRequestBody(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loadBalancerNames".equals(fieldName)) { + List loadBalancerNames = reader.readArray(reader1 -> reader1.getString()); + deserializedRebalanceLoadBalancersRequestBody.loadBalancerNames = loadBalancerNames; + } else { + reader.skipChildren(); + } + } + + return deserializedRebalanceLoadBalancersRequestBody; + }); + } +} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ResourceProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceProvisioningState.java similarity index 96% rename from sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ResourceProvisioningState.java rename to sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceProvisioningState.java index e15d3cfbe8a2..cb671d7dc911 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ResourceProvisioningState.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceProvisioningState.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.storage.models; +package com.azure.resourcemanager.containerservice.models; import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapabilities.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapabilities.java new file mode 100644 index 000000000000..9aed2b186f7b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapabilities.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes The SKU capabilities object. + */ +@Immutable +public final class ResourceSkuCapabilities implements JsonSerializable { + /* + * An invariant to describe the feature. + */ + private String name; + + /* + * An invariant if the feature is measured by quantity. + */ + private String value; + + /** + * Creates an instance of ResourceSkuCapabilities class. + */ + private ResourceSkuCapabilities() { + } + + /** + * Get the name property: An invariant to describe the feature. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the value property: An invariant if the feature is measured by quantity. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuCapabilities from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuCapabilities if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuCapabilities. + */ + public static ResourceSkuCapabilities fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuCapabilities deserializedResourceSkuCapabilities = new ResourceSkuCapabilities(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedResourceSkuCapabilities.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedResourceSkuCapabilities.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuCapabilities; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacity.java new file mode 100644 index 000000000000..d59f328fc912 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacity.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes scaling information of a SKU. + */ +@Immutable +public final class ResourceSkuCapacity implements JsonSerializable { + /* + * The minimum capacity. + */ + private Long minimum; + + /* + * The maximum capacity that can be set. + */ + private Long maximum; + + /* + * The default capacity. + */ + private Long defaultProperty; + + /* + * The scale type applicable to the sku. + */ + private ResourceSkuCapacityScaleType scaleType; + + /** + * Creates an instance of ResourceSkuCapacity class. + */ + private ResourceSkuCapacity() { + } + + /** + * Get the minimum property: The minimum capacity. + * + * @return the minimum value. + */ + public Long minimum() { + return this.minimum; + } + + /** + * Get the maximum property: The maximum capacity that can be set. + * + * @return the maximum value. + */ + public Long maximum() { + return this.maximum; + } + + /** + * Get the defaultProperty property: The default capacity. + * + * @return the defaultProperty value. + */ + public Long defaultProperty() { + return this.defaultProperty; + } + + /** + * Get the scaleType property: The scale type applicable to the sku. + * + * @return the scaleType value. + */ + public ResourceSkuCapacityScaleType scaleType() { + return this.scaleType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuCapacity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuCapacity if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuCapacity. + */ + public static ResourceSkuCapacity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuCapacity deserializedResourceSkuCapacity = new ResourceSkuCapacity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minimum".equals(fieldName)) { + deserializedResourceSkuCapacity.minimum = reader.getNullable(JsonReader::getLong); + } else if ("maximum".equals(fieldName)) { + deserializedResourceSkuCapacity.maximum = reader.getNullable(JsonReader::getLong); + } else if ("default".equals(fieldName)) { + deserializedResourceSkuCapacity.defaultProperty = reader.getNullable(JsonReader::getLong); + } else if ("scaleType".equals(fieldName)) { + deserializedResourceSkuCapacity.scaleType + = ResourceSkuCapacityScaleType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuCapacity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacityScaleType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacityScaleType.java new file mode 100644 index 000000000000..1c7aea85d928 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacityScaleType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The scale type applicable to the sku. + */ +public final class ResourceSkuCapacityScaleType extends ExpandableStringEnum { + /** + * Automatic scaling. + */ + public static final ResourceSkuCapacityScaleType AUTOMATIC = fromString("Automatic"); + + /** + * Manual scaling. + */ + public static final ResourceSkuCapacityScaleType MANUAL = fromString("Manual"); + + /** + * No scaling. + */ + public static final ResourceSkuCapacityScaleType NONE = fromString("None"); + + /** + * Creates a new instance of ResourceSkuCapacityScaleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSkuCapacityScaleType() { + } + + /** + * Creates or finds a ResourceSkuCapacityScaleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSkuCapacityScaleType. + */ + public static ResourceSkuCapacityScaleType fromString(String name) { + return fromString(name, ResourceSkuCapacityScaleType.class); + } + + /** + * Gets known ResourceSkuCapacityScaleType values. + * + * @return known ResourceSkuCapacityScaleType values. + */ + public static Collection values() { + return values(ResourceSkuCapacityScaleType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCosts.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCosts.java new file mode 100644 index 000000000000..069e612cbbaf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCosts.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes metadata for retrieving price info. + */ +@Immutable +public final class ResourceSkuCosts implements JsonSerializable { + /* + * Used for querying price from commerce. + */ + private String meterId; + + /* + * The multiplier is needed to extend the base metered cost. + */ + private Long quantity; + + /* + * An invariant to show the extended unit. + */ + private String extendedUnit; + + /** + * Creates an instance of ResourceSkuCosts class. + */ + private ResourceSkuCosts() { + } + + /** + * Get the meterId property: Used for querying price from commerce. + * + * @return the meterId value. + */ + public String meterId() { + return this.meterId; + } + + /** + * Get the quantity property: The multiplier is needed to extend the base metered cost. + * + * @return the quantity value. + */ + public Long quantity() { + return this.quantity; + } + + /** + * Get the extendedUnit property: An invariant to show the extended unit. + * + * @return the extendedUnit value. + */ + public String extendedUnit() { + return this.extendedUnit; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuCosts from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuCosts if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuCosts. + */ + public static ResourceSkuCosts fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuCosts deserializedResourceSkuCosts = new ResourceSkuCosts(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("meterID".equals(fieldName)) { + deserializedResourceSkuCosts.meterId = reader.getString(); + } else if ("quantity".equals(fieldName)) { + deserializedResourceSkuCosts.quantity = reader.getNullable(JsonReader::getLong); + } else if ("extendedUnit".equals(fieldName)) { + deserializedResourceSkuCosts.extendedUnit = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuCosts; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuLocationInfo.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuLocationInfo.java new file mode 100644 index 000000000000..e69981ec167b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuLocationInfo.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes an available Compute SKU Location Information. + */ +@Immutable +public final class ResourceSkuLocationInfo implements JsonSerializable { + /* + * Location of the SKU + */ + private String location; + + /* + * List of availability zones where the SKU is supported. + */ + private List zones; + + /* + * Details of capabilities available to a SKU in specific zones. + */ + private List zoneDetails; + + /* + * The names of extended locations. + */ + private List extendedLocations; + + /* + * The type of the extended location. + */ + private ExtendedLocationTypes type; + + /** + * Creates an instance of ResourceSkuLocationInfo class. + */ + private ResourceSkuLocationInfo() { + } + + /** + * Get the location property: Location of the SKU. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the zones property: List of availability zones where the SKU is supported. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Get the zoneDetails property: Details of capabilities available to a SKU in specific zones. + * + * @return the zoneDetails value. + */ + public List zoneDetails() { + return this.zoneDetails; + } + + /** + * Get the extendedLocations property: The names of extended locations. + * + * @return the extendedLocations value. + */ + public List extendedLocations() { + return this.extendedLocations; + } + + /** + * Get the type property: The type of the extended location. + * + * @return the type value. + */ + public ExtendedLocationTypes type() { + return this.type; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (zoneDetails() != null) { + zoneDetails().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuLocationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuLocationInfo if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuLocationInfo. + */ + public static ResourceSkuLocationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuLocationInfo deserializedResourceSkuLocationInfo = new ResourceSkuLocationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedResourceSkuLocationInfo.location = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuLocationInfo.zones = zones; + } else if ("zoneDetails".equals(fieldName)) { + List zoneDetails + = reader.readArray(reader1 -> ResourceSkuZoneDetails.fromJson(reader1)); + deserializedResourceSkuLocationInfo.zoneDetails = zoneDetails; + } else if ("extendedLocations".equals(fieldName)) { + List extendedLocations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuLocationInfo.extendedLocations = extendedLocations; + } else if ("type".equals(fieldName)) { + deserializedResourceSkuLocationInfo.type = ExtendedLocationTypes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuLocationInfo; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionInfo.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionInfo.java new file mode 100644 index 000000000000..601f679be3d7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionInfo.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes an available Compute SKU Restriction Information. + */ +@Immutable +public final class ResourceSkuRestrictionInfo implements JsonSerializable { + /* + * Locations where the SKU is restricted + */ + private List locations; + + /* + * List of availability zones where the SKU is restricted. + */ + private List zones; + + /** + * Creates an instance of ResourceSkuRestrictionInfo class. + */ + private ResourceSkuRestrictionInfo() { + } + + /** + * Get the locations property: Locations where the SKU is restricted. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Get the zones property: List of availability zones where the SKU is restricted. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuRestrictionInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuRestrictionInfo if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuRestrictionInfo. + */ + public static ResourceSkuRestrictionInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuRestrictionInfo deserializedResourceSkuRestrictionInfo = new ResourceSkuRestrictionInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuRestrictionInfo.locations = locations; + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuRestrictionInfo.zones = zones; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuRestrictionInfo; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictions.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictions.java new file mode 100644 index 000000000000..8ca66c39db66 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictions.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes scaling information of a SKU. + */ +@Immutable +public final class ResourceSkuRestrictions implements JsonSerializable { + /* + * The type of restrictions. + */ + private ResourceSkuRestrictionsType type; + + /* + * The value of restrictions. If the restriction type is set to location. This would be different locations where + * the SKU is restricted. + */ + private List values; + + /* + * The information about the restriction where the SKU cannot be used. + */ + private ResourceSkuRestrictionInfo restrictionInfo; + + /* + * The reason for restriction. + */ + private ResourceSkuRestrictionsReasonCode reasonCode; + + /** + * Creates an instance of ResourceSkuRestrictions class. + */ + private ResourceSkuRestrictions() { + } + + /** + * Get the type property: The type of restrictions. + * + * @return the type value. + */ + public ResourceSkuRestrictionsType type() { + return this.type; + } + + /** + * Get the values property: The value of restrictions. If the restriction type is set to location. This would be + * different locations where the SKU is restricted. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Get the restrictionInfo property: The information about the restriction where the SKU cannot be used. + * + * @return the restrictionInfo value. + */ + public ResourceSkuRestrictionInfo restrictionInfo() { + return this.restrictionInfo; + } + + /** + * Get the reasonCode property: The reason for restriction. + * + * @return the reasonCode value. + */ + public ResourceSkuRestrictionsReasonCode reasonCode() { + return this.reasonCode; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (restrictionInfo() != null) { + restrictionInfo().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuRestrictions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuRestrictions if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuRestrictions. + */ + public static ResourceSkuRestrictions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuRestrictions deserializedResourceSkuRestrictions = new ResourceSkuRestrictions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedResourceSkuRestrictions.type + = ResourceSkuRestrictionsType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuRestrictions.values = values; + } else if ("restrictionInfo".equals(fieldName)) { + deserializedResourceSkuRestrictions.restrictionInfo = ResourceSkuRestrictionInfo.fromJson(reader); + } else if ("reasonCode".equals(fieldName)) { + deserializedResourceSkuRestrictions.reasonCode + = ResourceSkuRestrictionsReasonCode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuRestrictions; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsReasonCode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsReasonCode.java new file mode 100644 index 000000000000..182192219cf6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsReasonCode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The reason for restriction. + */ +public final class ResourceSkuRestrictionsReasonCode extends ExpandableStringEnum { + /** + * Quota ID restriction. + */ + public static final ResourceSkuRestrictionsReasonCode QUOTA_ID = fromString("QuotaId"); + + /** + * Not available for subscription. + */ + public static final ResourceSkuRestrictionsReasonCode NOT_AVAILABLE_FOR_SUBSCRIPTION + = fromString("NotAvailableForSubscription"); + + /** + * Creates a new instance of ResourceSkuRestrictionsReasonCode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSkuRestrictionsReasonCode() { + } + + /** + * Creates or finds a ResourceSkuRestrictionsReasonCode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSkuRestrictionsReasonCode. + */ + public static ResourceSkuRestrictionsReasonCode fromString(String name) { + return fromString(name, ResourceSkuRestrictionsReasonCode.class); + } + + /** + * Gets known ResourceSkuRestrictionsReasonCode values. + * + * @return known ResourceSkuRestrictionsReasonCode values. + */ + public static Collection values() { + return values(ResourceSkuRestrictionsReasonCode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsType.java new file mode 100644 index 000000000000..52b3611920cc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of restrictions. + */ +public final class ResourceSkuRestrictionsType extends ExpandableStringEnum { + /** + * Location restriction. + */ + public static final ResourceSkuRestrictionsType LOCATION = fromString("Location"); + + /** + * Zone restriction. + */ + public static final ResourceSkuRestrictionsType ZONE = fromString("Zone"); + + /** + * Creates a new instance of ResourceSkuRestrictionsType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSkuRestrictionsType() { + } + + /** + * Creates or finds a ResourceSkuRestrictionsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSkuRestrictionsType. + */ + public static ResourceSkuRestrictionsType fromString(String name) { + return fromString(name, ResourceSkuRestrictionsType.class); + } + + /** + * Gets known ResourceSkuRestrictionsType values. + * + * @return known ResourceSkuRestrictionsType values. + */ + public static Collection values() { + return values(ResourceSkuRestrictionsType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuZoneDetails.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuZoneDetails.java new file mode 100644 index 000000000000..dda9f3498322 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuZoneDetails.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes The zonal capabilities of a SKU. + */ +@Immutable +public final class ResourceSkuZoneDetails implements JsonSerializable { + /* + * The set of zones that the SKU is available in with the specified capabilities. + */ + private List name; + + /* + * A list of capabilities that are available for the SKU in the specified list of zones. + */ + private List capabilities; + + /** + * Creates an instance of ResourceSkuZoneDetails class. + */ + private ResourceSkuZoneDetails() { + } + + /** + * Get the name property: The set of zones that the SKU is available in with the specified capabilities. + * + * @return the name value. + */ + public List name() { + return this.name; + } + + /** + * Get the capabilities property: A list of capabilities that are available for the SKU in the specified list of + * zones. + * + * @return the capabilities value. + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capabilities() != null) { + capabilities().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuZoneDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuZoneDetails if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuZoneDetails. + */ + public static ResourceSkuZoneDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuZoneDetails deserializedResourceSkuZoneDetails = new ResourceSkuZoneDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + List name = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuZoneDetails.name = name; + } else if ("capabilities".equals(fieldName)) { + List capabilities + = reader.readArray(reader1 -> ResourceSkuCapabilities.fromJson(reader1)); + deserializedResourceSkuZoneDetails.capabilities = capabilities; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuZoneDetails; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java new file mode 100644 index 000000000000..be616c4f7d06 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Whether the version is default or not and support info. + */ +@Immutable +public final class SafeguardsAvailableVersionsProperties + implements JsonSerializable { + /* + * Whether this is the default version. + */ + private Boolean isDefaultVersion; + + /* + * Whether the version is preview or stable. + */ + private SafeguardsSupport support; + + /** + * Creates an instance of SafeguardsAvailableVersionsProperties class. + */ + private SafeguardsAvailableVersionsProperties() { + } + + /** + * Get the isDefaultVersion property: Whether this is the default version. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Get the support property: Whether the version is preview or stable. + * + * @return the support value. + */ + public SafeguardsSupport support() { + return this.support; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SafeguardsAvailableVersionsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SafeguardsAvailableVersionsProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionsProperties. + */ + public static SafeguardsAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SafeguardsAvailableVersionsProperties deserializedSafeguardsAvailableVersionsProperties + = new SafeguardsAvailableVersionsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isDefaultVersion".equals(fieldName)) { + deserializedSafeguardsAvailableVersionsProperties.isDefaultVersion + = reader.getNullable(JsonReader::getBoolean); + } else if ("support".equals(fieldName)) { + deserializedSafeguardsAvailableVersionsProperties.support + = SafeguardsSupport.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSafeguardsAvailableVersionsProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java new file mode 100644 index 000000000000..0631186b5be5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether the version is preview or stable. + */ +public final class SafeguardsSupport extends ExpandableStringEnum { + /** + * The version is preview. It is not recommended to use preview versions on critical production clusters. The + * preview version may not support all use-cases. + */ + public static final SafeguardsSupport PREVIEW = fromString("Preview"); + + /** + * The version is stable and can be used on critical production clusters. + */ + public static final SafeguardsSupport STABLE = fromString("Stable"); + + /** + * Creates a new instance of SafeguardsSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SafeguardsSupport() { + } + + /** + * Creates or finds a SafeguardsSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding SafeguardsSupport. + */ + public static SafeguardsSupport fromString(String name) { + return fromString(name, SafeguardsSupport.class); + } + + /** + * Gets known SafeguardsSupport values. + * + * @return known SafeguardsSupport values. + */ + public static Collection values() { + return values(SafeguardsSupport.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java new file mode 100644 index 000000000000..5847b1bcc721 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by + * default. + */ +public final class SeccompDefault extends ExpandableStringEnum { + /** + * No seccomp profile is applied, allowing all system calls. + */ + public static final SeccompDefault UNCONFINED = fromString("Unconfined"); + + /** + * The default seccomp profile for container runtime is applied, which restricts certain system calls for enhanced + * security. + */ + public static final SeccompDefault RUNTIME_DEFAULT = fromString("RuntimeDefault"); + + /** + * Creates a new instance of SeccompDefault value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SeccompDefault() { + } + + /** + * Creates or finds a SeccompDefault from its string representation. + * + * @param name a name to look for. + * @return the corresponding SeccompDefault. + */ + public static SeccompDefault fromString(String name) { + return fromString(name, SeccompDefault.class); + } + + /** + * Gets known SeccompDefault values. + * + * @return known SeccompDefault values. + */ + public static Collection values() { + return values(SeccompDefault.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceAccountImagePullProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceAccountImagePullProfile.java new file mode 100644 index 000000000000..0c5c59a37cf7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceAccountImagePullProfile.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile for configuring image pull authentication to use service account scoped managed identities for authentication + * instead of node scoped managed identity (kubelet identity) for authentication to Azure Container Registry. For more + * information, refer to https://aka.ms/aks/identity-binding/acr-image-pull/docs. + */ +@Fluent +public final class ServiceAccountImagePullProfile implements JsonSerializable { + /* + * Indicates whether service account based image pull is enabled, for which identity bindings are required for the + * managed identity to be used for authentication. For more information, refer to + * https://aka.ms/aks/identity-binding-docs. + */ + private Boolean enabled; + + /* + * Optional. The default managed identity resource ID used for image pulls at the cluster level. When configured, + * this identity is used if a Pod’s service account does not explicitly specify an identity for pulling images. If + * not configured and no identity is specified at service account level, image will be pulled via anonymous + * authentication. + */ + private String defaultManagedIdentityId; + + /** + * Creates an instance of ServiceAccountImagePullProfile class. + */ + public ServiceAccountImagePullProfile() { + } + + /** + * Get the enabled property: Indicates whether service account based image pull is enabled, for which identity + * bindings are required for the managed identity to be used for authentication. For more information, refer to + * https://aka.ms/aks/identity-binding-docs. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether service account based image pull is enabled, for which identity + * bindings are required for the managed identity to be used for authentication. For more information, refer to + * https://aka.ms/aks/identity-binding-docs. + * + * @param enabled the enabled value to set. + * @return the ServiceAccountImagePullProfile object itself. + */ + public ServiceAccountImagePullProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the defaultManagedIdentityId property: Optional. The default managed identity resource ID used for image + * pulls at the cluster level. When configured, this identity is used if a Pod’s service account does not explicitly + * specify an identity for pulling images. If not configured and no identity is specified at service account level, + * image will be pulled via anonymous authentication. + * + * @return the defaultManagedIdentityId value. + */ + public String defaultManagedIdentityId() { + return this.defaultManagedIdentityId; + } + + /** + * Set the defaultManagedIdentityId property: Optional. The default managed identity resource ID used for image + * pulls at the cluster level. When configured, this identity is used if a Pod’s service account does not explicitly + * specify an identity for pulling images. If not configured and no identity is specified at service account level, + * image will be pulled via anonymous authentication. + * + * @param defaultManagedIdentityId the defaultManagedIdentityId value to set. + * @return the ServiceAccountImagePullProfile object itself. + */ + public ServiceAccountImagePullProfile withDefaultManagedIdentityId(String defaultManagedIdentityId) { + this.defaultManagedIdentityId = defaultManagedIdentityId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("defaultManagedIdentityId", this.defaultManagedIdentityId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceAccountImagePullProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceAccountImagePullProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceAccountImagePullProfile. + */ + public static ServiceAccountImagePullProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceAccountImagePullProfile deserializedServiceAccountImagePullProfile + = new ServiceAccountImagePullProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedServiceAccountImagePullProfile.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("defaultManagedIdentityId".equals(fieldName)) { + deserializedServiceAccountImagePullProfile.defaultManagedIdentityId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceAccountImagePullProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java index 6539cbbd4092..f94850c9924e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java @@ -16,6 +16,11 @@ public final class SnapshotType extends ExpandableStringEnum { */ public static final SnapshotType NODE_POOL = fromString("NodePool"); + /** + * The snapshot is a snapshot of a managed cluster. + */ + public static final SnapshotType MANAGED_CLUSTER = fromString("ManagedCluster"); + /** * Creates a new instance of SnapshotType value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionGracePeriod.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionGracePeriod.java new file mode 100644 index 000000000000..eb721ca8977a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionGracePeriod.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Grace periods for kubelet soft eviction thresholds. Each field is a Go-style duration string (e.g. '1m30s') that + * specifies how long the corresponding soft eviction signal must be crossed before pod eviction is triggered. A grace + * period only applies when the matching soft eviction threshold is set. + */ +@Fluent +public final class SoftEvictionGracePeriod implements JsonSerializable { + /* + * The grace period for the memoryAvailable soft eviction signal, expressed as a Go-style duration string (e.g. + * '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be greater than or equal to '30s'. + * Default is '30s'. + */ + private String memoryAvailable; + + /* + * The grace period for the nodeFsAvailable soft eviction signal, expressed as a Go-style duration string (e.g. + * '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be greater than or equal to '30s'. + * Default is '2m'. + */ + private String nodeFsAvailable; + + /* + * The grace period for the nodeFsInodesFree soft eviction signal, expressed as a Go-style duration string (e.g. + * '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be greater than or equal to '30s'. + * Default is '2m'. + */ + private String nodeFsInodesFree; + + /** + * Creates an instance of SoftEvictionGracePeriod class. + */ + public SoftEvictionGracePeriod() { + } + + /** + * Get the memoryAvailable property: The grace period for the memoryAvailable soft eviction signal, expressed as a + * Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + * greater than or equal to '30s'. Default is '30s'. + * + * @return the memoryAvailable value. + */ + public String memoryAvailable() { + return this.memoryAvailable; + } + + /** + * Set the memoryAvailable property: The grace period for the memoryAvailable soft eviction signal, expressed as a + * Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + * greater than or equal to '30s'. Default is '30s'. + * + * @param memoryAvailable the memoryAvailable value to set. + * @return the SoftEvictionGracePeriod object itself. + */ + public SoftEvictionGracePeriod withMemoryAvailable(String memoryAvailable) { + this.memoryAvailable = memoryAvailable; + return this; + } + + /** + * Get the nodeFsAvailable property: The grace period for the nodeFsAvailable soft eviction signal, expressed as a + * Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + * greater than or equal to '30s'. Default is '2m'. + * + * @return the nodeFsAvailable value. + */ + public String nodeFsAvailable() { + return this.nodeFsAvailable; + } + + /** + * Set the nodeFsAvailable property: The grace period for the nodeFsAvailable soft eviction signal, expressed as a + * Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + * greater than or equal to '30s'. Default is '2m'. + * + * @param nodeFsAvailable the nodeFsAvailable value to set. + * @return the SoftEvictionGracePeriod object itself. + */ + public SoftEvictionGracePeriod withNodeFsAvailable(String nodeFsAvailable) { + this.nodeFsAvailable = nodeFsAvailable; + return this; + } + + /** + * Get the nodeFsInodesFree property: The grace period for the nodeFsInodesFree soft eviction signal, expressed as a + * Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + * greater than or equal to '30s'. Default is '2m'. + * + * @return the nodeFsInodesFree value. + */ + public String nodeFsInodesFree() { + return this.nodeFsInodesFree; + } + + /** + * Set the nodeFsInodesFree property: The grace period for the nodeFsInodesFree soft eviction signal, expressed as a + * Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + * greater than or equal to '30s'. Default is '2m'. + * + * @param nodeFsInodesFree the nodeFsInodesFree value to set. + * @return the SoftEvictionGracePeriod object itself. + */ + public SoftEvictionGracePeriod withNodeFsInodesFree(String nodeFsInodesFree) { + this.nodeFsInodesFree = nodeFsInodesFree; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("memoryAvailable", this.memoryAvailable); + jsonWriter.writeStringField("nodeFsAvailable", this.nodeFsAvailable); + jsonWriter.writeStringField("nodeFsInodesFree", this.nodeFsInodesFree); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SoftEvictionGracePeriod from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SoftEvictionGracePeriod if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SoftEvictionGracePeriod. + */ + public static SoftEvictionGracePeriod fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SoftEvictionGracePeriod deserializedSoftEvictionGracePeriod = new SoftEvictionGracePeriod(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("memoryAvailable".equals(fieldName)) { + deserializedSoftEvictionGracePeriod.memoryAvailable = reader.getString(); + } else if ("nodeFsAvailable".equals(fieldName)) { + deserializedSoftEvictionGracePeriod.nodeFsAvailable = reader.getString(); + } else if ("nodeFsInodesFree".equals(fieldName)) { + deserializedSoftEvictionGracePeriod.nodeFsInodesFree = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSoftEvictionGracePeriod; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionThreshold.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionThreshold.java new file mode 100644 index 000000000000..a63e070d7134 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionThreshold.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Soft eviction thresholds for kubelet. These thresholds trigger graceful pod eviction when node resources drop below + * the specified values for at least the corresponding grace period defined in softEvictionGracePeriod. Supported + * formats are Ki, Mi, Gi, or percentages using %. + */ +@Fluent +public final class SoftEvictionThreshold implements JsonSerializable { + /* + * The threshold for available memory below which soft pod eviction is triggered. Accepts absolute values (e.g. + * '500Mi') or percentage values (e.g. '5%'). Absolute minimum is 100Mi; percentage minimum is 2%. Default uses a + * capacity-based step ladder: 500Mi for nodes with <=8GiB, 750Mi for 16GiB, and 1024Mi (1Gi) for >=32GiB. Must also + * be greater than the effective hardEvictionThreshold.memoryAvailable. + */ + private String memoryAvailable; + + /* + * The threshold for available node filesystem space below which soft pod eviction is triggered. Accepts absolute + * values (e.g. '1Gi') or percentage values (e.g. '10%'). Default is '12%'. Must be greater than or equal to 10% and + * greater than the effective hardEvictionThreshold.nodeFsAvailable. + */ + private String nodeFsAvailable; + + /* + * The threshold for available inodes on the node filesystem below which soft pod eviction is triggered. Accepts + * absolute inode counts (e.g. '100000') or percentage values (e.g. '5%'). Default is '7%'. Percentage values must + * be greater than or equal to 5% and greater than the effective hardEvictionThreshold.nodeFsInodesFree. + */ + private String nodeFsInodesFree; + + /** + * Creates an instance of SoftEvictionThreshold class. + */ + public SoftEvictionThreshold() { + } + + /** + * Get the memoryAvailable property: The threshold for available memory below which soft pod eviction is triggered. + * Accepts absolute values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute minimum is 100Mi; percentage + * minimum is 2%. Default uses a capacity-based step ladder: 500Mi for nodes with <=8GiB, 750Mi for 16GiB, and + * 1024Mi (1Gi) for >=32GiB. Must also be greater than the effective hardEvictionThreshold.memoryAvailable. + * + * @return the memoryAvailable value. + */ + public String memoryAvailable() { + return this.memoryAvailable; + } + + /** + * Set the memoryAvailable property: The threshold for available memory below which soft pod eviction is triggered. + * Accepts absolute values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute minimum is 100Mi; percentage + * minimum is 2%. Default uses a capacity-based step ladder: 500Mi for nodes with <=8GiB, 750Mi for 16GiB, and + * 1024Mi (1Gi) for >=32GiB. Must also be greater than the effective hardEvictionThreshold.memoryAvailable. + * + * @param memoryAvailable the memoryAvailable value to set. + * @return the SoftEvictionThreshold object itself. + */ + public SoftEvictionThreshold withMemoryAvailable(String memoryAvailable) { + this.memoryAvailable = memoryAvailable; + return this; + } + + /** + * Get the nodeFsAvailable property: The threshold for available node filesystem space below which soft pod eviction + * is triggered. Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). Default is '12%'. Must be + * greater than or equal to 10% and greater than the effective hardEvictionThreshold.nodeFsAvailable. + * + * @return the nodeFsAvailable value. + */ + public String nodeFsAvailable() { + return this.nodeFsAvailable; + } + + /** + * Set the nodeFsAvailable property: The threshold for available node filesystem space below which soft pod eviction + * is triggered. Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). Default is '12%'. Must be + * greater than or equal to 10% and greater than the effective hardEvictionThreshold.nodeFsAvailable. + * + * @param nodeFsAvailable the nodeFsAvailable value to set. + * @return the SoftEvictionThreshold object itself. + */ + public SoftEvictionThreshold withNodeFsAvailable(String nodeFsAvailable) { + this.nodeFsAvailable = nodeFsAvailable; + return this; + } + + /** + * Get the nodeFsInodesFree property: The threshold for available inodes on the node filesystem below which soft pod + * eviction is triggered. Accepts absolute inode counts (e.g. '100000') or percentage values (e.g. '5%'). Default is + * '7%'. Percentage values must be greater than or equal to 5% and greater than the effective + * hardEvictionThreshold.nodeFsInodesFree. + * + * @return the nodeFsInodesFree value. + */ + public String nodeFsInodesFree() { + return this.nodeFsInodesFree; + } + + /** + * Set the nodeFsInodesFree property: The threshold for available inodes on the node filesystem below which soft pod + * eviction is triggered. Accepts absolute inode counts (e.g. '100000') or percentage values (e.g. '5%'). Default is + * '7%'. Percentage values must be greater than or equal to 5% and greater than the effective + * hardEvictionThreshold.nodeFsInodesFree. + * + * @param nodeFsInodesFree the nodeFsInodesFree value to set. + * @return the SoftEvictionThreshold object itself. + */ + public SoftEvictionThreshold withNodeFsInodesFree(String nodeFsInodesFree) { + this.nodeFsInodesFree = nodeFsInodesFree; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("memoryAvailable", this.memoryAvailable); + jsonWriter.writeStringField("nodeFsAvailable", this.nodeFsAvailable); + jsonWriter.writeStringField("nodeFsInodesFree", this.nodeFsInodesFree); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SoftEvictionThreshold from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SoftEvictionThreshold if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SoftEvictionThreshold. + */ + public static SoftEvictionThreshold fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SoftEvictionThreshold deserializedSoftEvictionThreshold = new SoftEvictionThreshold(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("memoryAvailable".equals(fieldName)) { + deserializedSoftEvictionThreshold.memoryAvailable = reader.getString(); + } else if ("nodeFsAvailable".equals(fieldName)) { + deserializedSoftEvictionThreshold.nodeFsAvailable = reader.getString(); + } else if ("nodeFsInodesFree".equals(fieldName)) { + deserializedSoftEvictionThreshold.nodeFsInodesFree = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSoftEvictionThreshold; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java index 588980d9452c..6a14e41784c6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java @@ -18,6 +18,12 @@ public final class TransitEncryptionType extends ExpandableStringEnum { + /* + * Whether upgrade gating is enabled. Defaults to `false` when unset, except on a newly created agent pool in a + * cluster where upgrade gating is enabled, which defaults to `true`. When `true`, upgrade-gated health checks are + * enabled for upgrades in the corresponding scope. Setting this to `true` at the cluster scope enables gating for + * the entire cluster, including all agent pool upgrades. When the cluster scope is unset or `false`, an agent pool + * can opt in independently by setting this to `true`. When the cluster scope is `true`, an agent pool cannot set + * this to `false`. Force upgrade (`overrideSettings.forceUpgrade`) overrides the gate: while the override window is + * active, the upgrade skips health signal validation and proceeds. + */ + private Boolean enabled; + + /** + * Creates an instance of UpgradeGateSettings class. + */ + public UpgradeGateSettings() { + } + + /** + * Get the enabled property: Whether upgrade gating is enabled. Defaults to `false` when unset, except on a newly + * created agent pool in a cluster where upgrade gating is enabled, which defaults to `true`. When `true`, + * upgrade-gated health checks are enabled for upgrades in the corresponding scope. Setting this to `true` at the + * cluster scope enables gating for the entire cluster, including all agent pool upgrades. When the cluster scope is + * unset or `false`, an agent pool can opt in independently by setting this to `true`. When the cluster scope is + * `true`, an agent pool cannot set this to `false`. Force upgrade (`overrideSettings.forceUpgrade`) overrides the + * gate: while the override window is active, the upgrade skips health signal validation and proceeds. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether upgrade gating is enabled. Defaults to `false` when unset, except on a newly + * created agent pool in a cluster where upgrade gating is enabled, which defaults to `true`. When `true`, + * upgrade-gated health checks are enabled for upgrades in the corresponding scope. Setting this to `true` at the + * cluster scope enables gating for the entire cluster, including all agent pool upgrades. When the cluster scope is + * unset or `false`, an agent pool can opt in independently by setting this to `true`. When the cluster scope is + * `true`, an agent pool cannot set this to `false`. Force upgrade (`overrideSettings.forceUpgrade`) overrides the + * gate: while the override window is active, the upgrade skips health signal validation and proceeds. + * + * @param enabled the enabled value to set. + * @return the UpgradeGateSettings object itself. + */ + public UpgradeGateSettings withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpgradeGateSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpgradeGateSettings if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the UpgradeGateSettings. + */ + public static UpgradeGateSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpgradeGateSettings deserializedUpgradeGateSettings = new UpgradeGateSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedUpgradeGateSettings.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedUpgradeGateSettings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java new file mode 100644 index 000000000000..3a3241c04699 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the upgrade strategy for the agent pool. The default is Rolling. + */ +public final class UpgradeStrategy extends ExpandableStringEnum { + /** + * Specifies that the agent pool will conduct rolling upgrade. This is the default upgrade strategy. + */ + public static final UpgradeStrategy ROLLING = fromString("Rolling"); + + /** + * Specifies that the agent pool will conduct blue-green upgrade. + */ + public static final UpgradeStrategy BLUE_GREEN = fromString("BlueGreen"); + + /** + * Creates a new instance of UpgradeStrategy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpgradeStrategy() { + } + + /** + * Creates or finds a UpgradeStrategy from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpgradeStrategy. + */ + public static UpgradeStrategy fromString(String name) { + return fromString(name, UpgradeStrategy.class); + } + + /** + * Gets known UpgradeStrategy values. + * + * @return known UpgradeStrategy values. + */ + public static Collection values() { + return values(UpgradeStrategy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java new file mode 100644 index 000000000000..77ae5a314d12 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Virtual machine state. Indicates the current state of the underlying virtual machine. + */ +public final class VmState extends ExpandableStringEnum { + /** + * The virtual machine is currently running. + */ + public static final VmState RUNNING = fromString("Running"); + + /** + * The virtual machine has been deleted by the user or due to spot eviction. + */ + public static final VmState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of VmState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VmState() { + } + + /** + * Creates or finds a VmState from its string representation. + * + * @param name a name to look for. + * @return the corresponding VmState. + */ + public static VmState fromString(String name) { + return fromString(name, VmState.class); + } + + /** + * Gets known VmState values. + * + * @return known VmState values. + */ + public static Collection values() { + return values(VmState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java index 2a39c6c56762..5410b0b3bce8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java @@ -21,6 +21,14 @@ public final class WorkloadRuntime extends ExpandableStringEnum */ public static final WorkloadRuntime WASM_WASI = fromString("WasmWasi"); + /** + * Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due to the use + * Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series that + * support Nested Virtualization such as Dv3 series. This naming convention will be deprecated in future releases in + * favor of KataVmIsolation. + */ + public static final WorkloadRuntime KATA_MSHV_VM_ISOLATION = fromString("KataMshvVmIsolation"); + /** * Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods. Due to the use Hyper-V, AKS * node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series that support diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json index 0dca2d6a8c28..367913fe49cc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.ContainerService":"2026-08-01"},"crossLanguagePackageId":"Microsoft.ContainerService","crossLanguageVersion":"56064badd067","generatedFiles":["src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AgentPoolListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/IdentityBindingListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MachineListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceConfigurationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedNamespaceListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshRevisionProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshUpgradeProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OutboundEnvironmentEndpointCollection.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SnapshotListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleBindingListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleListResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java","src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java","src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/Code.java","src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java","src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerNetworkLogs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java","src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java","src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/DRANETMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/DRANETProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java","src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java","src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/Format.java","src/main/java/com/azure/resourcemanager/containerservice/models/GatewayApiIstioEnabled.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java","src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java","src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java","src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAppRoutingIstio.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetricsControlPlane.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIpPrefixes.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewaySku.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWebAppRoutingGatewayApiImplementations.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagementMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java","src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java","src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java","src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java","src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java","src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java","src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java","src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java","src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/Type.java","src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java","src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/package-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.ContainerService":"2026-07-02-preview"},"crossLanguagePackageId":"Microsoft.ContainerService","crossLanguageVersion":"f5b5a0dac83d","generatedFiles":["src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/AlertConfigurationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/JWTAuthenticatorsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceWindowsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/VmSkusClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AlertConfigurationInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JWTAuthenticatorInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceWindowResourceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PoolBootstrapDataInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ResourceSkuInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/AlertConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/JWTAuthenticatorsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceWindowsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/VmSkusClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AgentPoolListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AlertConfigurationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/GuardrailsAvailableVersionsList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/IdentityBindingListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/JWTAuthenticatorListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/LoadBalancerListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MachineListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceConfigurationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceWindowResourceListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterSnapshotListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedNamespaceListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshMembershipsListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshRevisionProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshUpgradeProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/NodeImageVersionsListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationStatusResultList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OutboundEnvironmentEndpointCollection.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SafeguardsAvailableVersionsList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SnapshotListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleBindingListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/VmSkusListResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNICPublicIPAddressVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterface.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkInterfaceType.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdate.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateManualScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpdateVirtualMachinesProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/AlertConfigurationProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/AlertNotification.java","src/main/java/com/azure/resourcemanager/containerservice/models/AllowedSubject.java","src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java","src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java","src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/BastionProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/BastionSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapAzureConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapComponentVersions.java","src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapKubeletConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNetworkingConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapNodeConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTargetCluster.java","src/main/java/com/azure/resourcemanager/containerservice/models/BootstrapTokenInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservation.java","src/main/java/com/azure/resourcemanager/containerservice/models/CapacityReservationGroup.java","src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/Code.java","src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java","src/main/java/com/azure/resourcemanager/containerservice/models/Component.java","src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java","src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerNetworkLogs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java","src/main/java/com/azure/resourcemanager/containerservice/models/ControlPlaneScalingSize.java","src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java","src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/DRANETMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/DRANETProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java","src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java","src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java","src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/Format.java","src/main/java/com/azure/resourcemanager/containerservice/models/GatewayApiIstioEnabled.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java","src/main/java/com/azure/resourcemanager/containerservice/models/HardEvictionThreshold.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappingExpression.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappings.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorExtraClaimMappingExpression.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorIssuer.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorValidationRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeReserved.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java","src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java","src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java","src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java","src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ListBootstrapDataRequest.java","src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineBillingProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java","src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindowResourceProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAppRoutingIstio.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetricsControlPlane.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterControlPlaneScalingProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHealthMonitorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIpPrefixes.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewaySku.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWebAppRoutingGatewayApiImplementations.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagementMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipPrivateConnectProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MigStrategy.java","src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java","src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeDisruptionProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaDriverMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java","src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java","src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java","src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java","src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PreparedImageSpecificationProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java","src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java","src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapabilities.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacityScaleType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCosts.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuLocationInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictions.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsReasonCode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuZoneDetails.java","src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java","src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java","src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java","src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceAccountImagePullProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java","src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionGracePeriod.java","src/main/java/com/azure/resourcemanager/containerservice/models/SoftEvictionThreshold.java","src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/Type.java","src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeGateSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java","src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java","src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/package-info.java"]} \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json index 3924376cbd83..61f86fe46535 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.IdentityBindingsClientImpl$IdentityBindingsService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.AlertConfigurationsClientImpl$AlertConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.IdentityBindingsClientImpl$IdentityBindingsService"],["com.azure.resourcemanager.containerservice.implementation.JWTAuthenticatorsClientImpl$JWTAuthenticatorsService"],["com.azure.resourcemanager.containerservice.implementation.LoadBalancersClientImpl$LoadBalancersService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceWindowsClientImpl$MaintenanceWindowsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClusterSnapshotsClientImpl$ManagedClusterSnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.MeshMembershipsClientImpl$MeshMembershipsService"],["com.azure.resourcemanager.containerservice.implementation.OperationStatusResultsClientImpl$OperationStatusResultsService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"],["com.azure.resourcemanager.containerservice.implementation.VmSkusClientImpl$VmSkusService"]] \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java index 570e0e0a3ff8..7c14196ce0aa 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsAbortLatestOperationSamples { /* - * x-ms-original-file: 2026-08-01/AgentPoolsAbortOperation.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsAbortOperation.json */ /** * Sample code: Abort operation on agent pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCompleteUpgradeSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCompleteUpgradeSamples.java new file mode 100644 index 000000000000..27161e3fb0f1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCompleteUpgradeSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AgentPools CompleteUpgrade. + */ +public final class AgentPoolsCompleteUpgradeSamples { + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCompleteUpgrade.json + */ + /** + * Sample code: Complete agent pool upgrade. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + completeAgentPoolUpgrade(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .completeUpgrade("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java index fcdeeda8d946..3041e704890b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java @@ -6,7 +6,13 @@ import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; +import com.azure.resourcemanager.containerservice.models.AgentPoolNICPublicIPAddressConfiguration; +import com.azure.resourcemanager.containerservice.models.AgentPoolNICPublicIPAddressVersion; +import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkInterface; +import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkInterfaceType; +import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; import com.azure.resourcemanager.containerservice.models.AgentPoolType; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeSettings; import com.azure.resourcemanager.containerservice.models.AgentPoolWindowsProfile; import com.azure.resourcemanager.containerservice.models.AutoScaleProfile; import com.azure.resourcemanager.containerservice.models.Code; @@ -14,10 +20,14 @@ import com.azure.resourcemanager.containerservice.models.GpuDriver; import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; import com.azure.resourcemanager.containerservice.models.GpuProfile; +import com.azure.resourcemanager.containerservice.models.HardEvictionThreshold; +import com.azure.resourcemanager.containerservice.models.IpTag; +import com.azure.resourcemanager.containerservice.models.KubeReserved; import com.azure.resourcemanager.containerservice.models.KubeletConfig; import com.azure.resourcemanager.containerservice.models.LinuxOSConfig; import com.azure.resourcemanager.containerservice.models.ManagementMode; import com.azure.resourcemanager.containerservice.models.ManualScaleProfile; +import com.azure.resourcemanager.containerservice.models.MigStrategy; import com.azure.resourcemanager.containerservice.models.NvidiaGPUProfile; import com.azure.resourcemanager.containerservice.models.OSDiskType; import com.azure.resourcemanager.containerservice.models.OSSku; @@ -26,7 +36,10 @@ import com.azure.resourcemanager.containerservice.models.ScaleProfile; import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.SoftEvictionGracePeriod; +import com.azure.resourcemanager.containerservice.models.SoftEvictionThreshold; import com.azure.resourcemanager.containerservice.models.SysctlConfig; +import com.azure.resourcemanager.containerservice.models.UpgradeGateSettings; import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; import java.util.Arrays; @@ -38,7 +51,7 @@ */ public final class AgentPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_EnableFIPS.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_EnableFIPS.json */ /** * Sample code: Create Agent Pool with FIPS enabled OS. @@ -59,32 +72,7 @@ public final class AgentPoolsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-08-01/AgentPools_Update.json - */ - /** - * Sample code: Update Agent Pool. - * - * @param manager Entry point to ContainerServiceManager. - */ - public static void updateAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { - manager.serviceClient() - .getAgentPools() - .createOrUpdate("rg1", "clustername1", "agentpool1", - new AgentPoolInner().withCount(3) - .withVmSize("Standard_DS1_v2") - .withOsType(OSType.LINUX) - .withMaxCount(2) - .withMinCount(2) - .withEnableAutoScaling(true) - .withOrchestratorVersion("") - .withScaleSetPriority(ScaleSetPriority.SPOT) - .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) - .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")), - null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_GPUMIG.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_GPUMIG.json */ /** * Sample code: Create Agent Pool with GPUMIG. @@ -121,15 +109,15 @@ public static void updateAgentPool(com.azure.resourcemanager.containerservice.Co } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_WindowsOSSKU.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_WindowsDisableOutboundNAT.json */ /** - * Sample code: Create Agent Pool with Windows OSSKU. + * Sample code: Create Windows Agent Pool with disabling OutboundNAT. * * @param manager Entry point to ContainerServiceManager. */ - public static void - createAgentPoolWithWindowsOSSKU(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void createWindowsAgentPoolWithDisablingOutboundNAT( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getAgentPools() .createOrUpdate("rg1", "clustername1", "wnp2", @@ -137,19 +125,60 @@ public static void updateAgentPool(com.azure.resourcemanager.containerservice.Co .withVmSize("Standard_D4s_v3") .withOsType(OSType.WINDOWS) .withOsSku(OSSku.WINDOWS2022) - .withOrchestratorVersion("1.23.3"), + .withOrchestratorVersion("1.23.8") + .withWindowsProfile(new AgentPoolWindowsProfile().withDisableOutboundNat(true)), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_DedicatedHostGroup.json + * x-ms-original-file: 2026-07-02-preview/AgentPools_Start.json */ /** - * Sample code: Create Agent Pool with Dedicated Host Group. + * Sample code: Start Agent Pool. * * @param manager Entry point to ContainerServiceManager. */ - public static void createAgentPoolWithDedicatedHostGroup( + public static void startAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withPowerState(new PowerState().withCode(Code.RUNNING)), null, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_SingleMIG.json + */ + /** + * Sample code: Create Agent Pool with single MIG profile. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithSingleMIGProfile( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_ND96asr_v4") + .withOsType(OSType.LINUX) + .withMode(AgentPoolMode.USER) + .withGpuProfile(new GpuProfile().withDriver(GpuDriver.INSTALL) + .withNvidia(new NvidiaGPUProfile().withManagementMode(ManagementMode.MANAGED) + .withMigStrategy(MigStrategy.SINGLE) + .withMigProfiles(Arrays.asList(GpuInstanceProfile.MIG3G)))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsAssociate_CRG.json + */ + /** + * Sample code: Associate Agent Pool with Capacity Reservation Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void associateAgentPoolWithCapacityReservationGroup( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getAgentPools() @@ -157,47 +186,155 @@ public static void createAgentPoolWithDedicatedHostGroup( .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withOrchestratorVersion("") - .withHostGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), + .withCapacityReservationGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_Update.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_PPG.json */ /** - * Sample code: Create/Update Agent Pool. + * Sample code: Create Agent Pool with PPG. * * @param manager Entry point to ContainerServiceManager. */ public static void - createUpdateAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + createAgentPoolWithPPG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withProximityPlacementGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_UpgradeGate.json + */ + /** + * Sample code: Create Agent Pool with upgrade gate enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithUpgradeGateEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getAgentPools() .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) - .withVmSize("Standard_DS1_v2") + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withUpgradeSettings(new AgentPoolUpgradeSettings().withMaxSurge("33%") + .withUpgradeGateSettings(new UpgradeGateSettings().withEnabled(true))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPools_Stop.json + */ + /** + * Sample code: Stop Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void stopAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withPowerState(new PowerState().withCode(Code.STOPPED)), null, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_MixedMIG.json + */ + /** + * Sample code: Create Agent Pool with mixed MIG profiles. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithMixedMIGProfiles( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_ND96asr_v4") .withOsType(OSType.LINUX) .withMode(AgentPoolMode.USER) + .withGpuProfile(new GpuProfile().withDriver(GpuDriver.INSTALL) + .withNvidia(new NvidiaGPUProfile().withManagementMode(ManagementMode.MANAGED) + .withMigStrategy(MigStrategy.MIXED) + .withMigProfiles(Arrays.asList(GpuInstanceProfile.MIG3G, GpuInstanceProfile.MIG2G, + GpuInstanceProfile.MIG1G, GpuInstanceProfile.MIG1G)))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_TypeVirtualMachines.json + */ + /** + * Sample code: Create Agent Pool with VirtualMachines pool type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithVirtualMachinesPoolType( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withOsType(OSType.LINUX) + .withTypePropertiesType(AgentPoolType.VIRTUAL_MACHINES) + .withOrchestratorVersion("1.9.6") + .withTags(mapOf("name1", "val1")) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .withVirtualMachinesProfile(new VirtualMachinesProfile().withScale(new ScaleProfile() + .withManual(Arrays.asList(new ManualScaleProfile().withSize("Standard_D2_v2").withCount(3), + new ManualScaleProfile().withSize("Standard_D2_v3").withCount(2))))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPools_Update.json + */ + /** + * Sample code: Update Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", + new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS1_v2") + .withOsType(OSType.LINUX) + .withMaxCount(2) + .withMinCount(2) + .withEnableAutoScaling(true) .withOrchestratorVersion("") .withScaleSetPriority(ScaleSetPriority.SPOT) .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) - .withTags(mapOf("name1", "val1")) - .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_WindowsDisableOutboundNAT.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_WindowsOSSKU.json */ /** - * Sample code: Create Windows Agent Pool with disabling OutboundNAT. + * Sample code: Create Agent Pool with Windows OSSKU. * * @param manager Entry point to ContainerServiceManager. */ - public static void createWindowsAgentPoolWithDisablingOutboundNAT( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void + createAgentPoolWithWindowsOSSKU(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getAgentPools() .createOrUpdate("rg1", "clustername1", "wnp2", @@ -205,51 +342,94 @@ public static void createWindowsAgentPoolWithDisablingOutboundNAT( .withVmSize("Standard_D4s_v3") .withOsType(OSType.WINDOWS) .withOsSku(OSSku.WINDOWS2022) - .withOrchestratorVersion("1.23.8") - .withWindowsProfile(new AgentPoolWindowsProfile().withDisableOutboundNat(true)), + .withOrchestratorVersion("1.23.3"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/AgentPools_Start.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_DedicatedHostGroup.json */ /** - * Sample code: Start Agent Pool. + * Sample code: Create Agent Pool with Dedicated Host Group. * * @param manager Entry point to ContainerServiceManager. */ - public static void startAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void createAgentPoolWithDedicatedHostGroup( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getAgentPools() - .createOrUpdate("rg1", "clustername1", "agentpool1", - new AgentPoolInner().withPowerState(new PowerState().withCode(Code.RUNNING)), null, null, - com.azure.core.util.Context.NONE); + .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), + null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_ManagedGPU.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_Update.json */ /** - * Sample code: Create Agent Pool with fully managed GPU experience. + * Sample code: Create/Update Agent Pool. * * @param manager Entry point to ContainerServiceManager. */ - public static void createAgentPoolWithFullyManagedGPUExperience( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void + createUpdateAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getAgentPools() .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) - .withVmSize("Standard_NC4as_T4_v3") + .withVmSize("Standard_DS1_v2") .withOsType(OSType.LINUX) .withMode(AgentPoolMode.USER) - .withGpuProfile(new GpuProfile().withDriver(GpuDriver.INSTALL) - .withNvidia(new NvidiaGPUProfile().withManagementMode(ManagementMode.MANAGED))), + .withOrchestratorVersion("") + .withScaleSetPriority(ScaleSetPriority.SPOT) + .withScaleSetEvictionPolicy(ScaleSetEvictionPolicy.DELETE) + .withTags(mapOf("name1", "val1")) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_Spot.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_PerNICPublicIP.json + */ + /** + * Sample code: Create Agent Pool with per-NIC public IP configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithPerNICPublicIPConfiguration( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) + .withVmSize("Standard_D8s_v3") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withNetworkProfile(new AgentPoolNetworkProfile().withSecondaryNetworkInterfaces(Arrays.asList( + new AgentPoolNetworkInterface().withType(AgentPoolNetworkInterfaceType.STANDARD) + .withVnetSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/secondary-subnet-1") + .withEnableAcceleratedNetworking(true) + .withPublicIPAddressConfiguration(new AgentPoolNICPublicIPAddressConfiguration() + .withPublicIPAddressVersion(AgentPoolNICPublicIPAddressVersion.IPV4) + .withIpTags(Arrays.asList(new IpTag().withIpTagType("FirstPartyUsage").withTag("teams")))), + new AgentPoolNetworkInterface().withType(AgentPoolNetworkInterfaceType.STANDARD) + .withVnetSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/secondary-subnet-2") + .withEnableAcceleratedNetworking(true) + .withPublicIPAddressConfiguration(new AgentPoolNICPublicIPAddressConfiguration() + .withPublicIPAddressVersion(AgentPoolNICPublicIPAddressVersion.IPV4) + .withPublicIPPrefixID( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/myPrefix"))))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_Spot.json */ /** * Sample code: Create Spot Agent Pool. @@ -273,7 +453,7 @@ public static void createSpotAgentPool(com.azure.resourcemanager.containerservic } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_Ephemeral.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_Ephemeral.json */ /** * Sample code: Create Agent Pool with Ephemeral OS Disk. @@ -295,7 +475,7 @@ public static void createSpotAgentPool(com.azure.resourcemanager.containerservic } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_EnableEncryptionAtHost.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_EnableEncryptionAtHost.json */ /** * Sample code: Create Agent Pool with EncryptionAtHost enabled. @@ -316,7 +496,7 @@ public static void createAgentPoolWithEncryptionAtHostEnabled( } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_EnableUltraSSD.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_EnableUltraSSD.json */ /** * Sample code: Create Agent Pool with UltraSSD enabled. @@ -337,7 +517,26 @@ public static void createAgentPoolWithEncryptionAtHostEnabled( } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_FlexNode.json + */ + /** + * Sample code: Create FlexNode Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createFlexNodeAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "flexnode1", + new AgentPoolInner().withTypePropertiesType(AgentPoolType.FLEX_NODES) + .withMode(AgentPoolMode.USER) + .withOrchestratorVersion("1.32"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json */ /** * Sample code: Create Agent Pool with VirtualMachines pool type with autoscaling enabled. @@ -360,7 +559,7 @@ public static void createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnab } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_WasmWasi.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_WasmWasi.json */ /** * Sample code: Create Agent Pool with Krustlet and the WASI runtime. @@ -383,28 +582,7 @@ public static void createAgentPoolWithKrustletAndTheWASIRuntime( } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_PPG.json - */ - /** - * Sample code: Create Agent Pool with PPG. - * - * @param manager Entry point to ContainerServiceManager. - */ - public static void - createAgentPoolWithPPG(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { - manager.serviceClient() - .getAgentPools() - .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) - .withVmSize("Standard_DS2_v2") - .withOsType(OSType.LINUX) - .withOrchestratorVersion("") - .withProximityPlacementGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"), - null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_Snapshot.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_Snapshot.json */ /** * Sample code: Create Agent Pool using an agent pool snapshot. @@ -426,7 +604,7 @@ public static void createAgentPoolUsingAnAgentPoolSnapshot( } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_CustomNodeConfig.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_CustomNodeConfig.json */ /** * Sample code: Create Agent Pool with KubeletConfig and LinuxOSConfig. @@ -449,7 +627,18 @@ public static void createAgentPoolWithKubeletConfigAndLinuxOSConfig( .withImageGcLowThreshold(70) .withTopologyManagerPolicy("best-effort") .withAllowedUnsafeSysctls(Arrays.asList("kernel.msg*", "net.core.somaxconn")) - .withFailSwapOn(false)) + .withFailSwapOn(false) + .withKubeReserved(new KubeReserved().withCpuMillicores(200).withMemoryMB(1024)) + .withHardEvictionThreshold(new HardEvictionThreshold().withMemoryAvailable("500Mi") + .withNodeFsAvailable("15%") + .withNodeFsInodesFree("10%")) + .withSoftEvictionThreshold(new SoftEvictionThreshold().withMemoryAvailable("750Mi") + .withNodeFsAvailable("20%") + .withNodeFsInodesFree("15%")) + .withSoftEvictionGracePeriod(new SoftEvictionGracePeriod().withMemoryAvailable("1m30s") + .withNodeFsAvailable("2m") + .withNodeFsInodesFree("2m")) + .withEvictionMaxPodGracePeriodInSeconds(60)) .withLinuxOSConfig(new LinuxOSConfig() .withSysctls(new SysctlConfig().withNetCoreWmemDefault(12345) .withNetIpv4TcpTwReuse(true) @@ -462,23 +651,7 @@ public static void createAgentPoolWithKubeletConfigAndLinuxOSConfig( } /* - * x-ms-original-file: 2026-08-01/AgentPools_Stop.json - */ - /** - * Sample code: Stop Agent Pool. - * - * @param manager Entry point to ContainerServiceManager. - */ - public static void stopAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { - manager.serviceClient() - .getAgentPools() - .createOrUpdate("rg1", "clustername1", "agentpool1", - new AgentPoolInner().withPowerState(new PowerState().withCode(Code.STOPPED)), null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_MessageOfTheDay.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_MessageOfTheDay.json */ /** * Sample code: Create Agent Pool with Message of the Day. @@ -501,28 +674,7 @@ public static void stopAgentPool(com.azure.resourcemanager.containerservice.Cont } /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_CRG.json - */ - /** - * Sample code: Create Agent Pool with Capacity Reservation Group. - * - * @param manager Entry point to ContainerServiceManager. - */ - public static void createAgentPoolWithCapacityReservationGroup( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { - manager.serviceClient() - .getAgentPools() - .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) - .withVmSize("Standard_DS2_v2") - .withOsType(OSType.LINUX) - .withOrchestratorVersion("") - .withCapacityReservationGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), - null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_OSSKU.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsCreate_OSSKU.json */ /** * Sample code: Create Agent Pool with OSSKU. @@ -558,31 +710,6 @@ public static void createAgentPoolWithCapacityReservationGroup( null, null, com.azure.core.util.Context.NONE); } - /* - * x-ms-original-file: 2026-08-01/AgentPoolsCreate_TypeVirtualMachines.json - */ - /** - * Sample code: Create Agent Pool with VirtualMachines pool type. - * - * @param manager Entry point to ContainerServiceManager. - */ - public static void createAgentPoolWithVirtualMachinesPoolType( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { - manager.serviceClient() - .getAgentPools() - .createOrUpdate("rg1", "clustername1", "agentpool1", - new AgentPoolInner().withOsType(OSType.LINUX) - .withTypePropertiesType(AgentPoolType.VIRTUAL_MACHINES) - .withOrchestratorVersion("1.9.6") - .withTags(mapOf("name1", "val1")) - .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) - .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) - .withVirtualMachinesProfile(new VirtualMachinesProfile().withScale(new ScaleProfile() - .withManual(Arrays.asList(new ManualScaleProfile().withSize("Standard_D2_v2").withCount(3), - new ManualScaleProfile().withSize("Standard_D2_v3").withCount(2))))), - null, null, com.azure.core.util.Context.NONE); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java index ff7fe9ad99bd..8c179113a5b2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java @@ -12,7 +12,7 @@ */ public final class AgentPoolsDeleteMachinesSamples { /* - * x-ms-original-file: 2026-08-01/AgentPoolsDeleteMachines.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsDeleteMachines.json */ /** * Sample code: Delete Specific Machines in an Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java index d23fd1a9e07c..5917da3a43c4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java @@ -9,7 +9,22 @@ */ public final class AgentPoolsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/AgentPoolsDelete.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsDelete_IgnorePodDisruptionBudget.json + */ + /** + * Sample code: Delete Agent Pool by ignoring PodDisruptionBudget. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteAgentPoolByIgnoringPodDisruptionBudget( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .delete("rg1", "clustername1", "agentpool1", true, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsDelete.json */ /** * Sample code: Delete Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java index 7efb230bd530..d7fbe883d019 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsGetAvailableAgentPoolVersionsSamples { /* - * x-ms-original-file: 2026-08-01/AgentPoolsGetAgentPoolAvailableVersions.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsGetAgentPoolAvailableVersions.json */ /** * Sample code: Get available versions for agent pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java index b0154d385494..46835824556d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsGetSamples { /* - * x-ms-original-file: 2026-08-01/AgentPoolsGet.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsGet.json */ /** * Sample code: Get Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java index 465413cf8d70..5fe2602f0128 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsGetUpgradeProfileSamples { /* - * x-ms-original-file: 2026-08-01/AgentPoolsGetUpgradeProfile.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsGetUpgradeProfile.json */ /** * Sample code: Get Upgrade Profile for Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListBootstrapDataSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListBootstrapDataSamples.java new file mode 100644 index 000000000000..c48e2f633c87 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListBootstrapDataSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.ListBootstrapDataRequest; + +/** + * Samples for AgentPools ListBootstrapData. + */ +public final class AgentPoolsListBootstrapDataSamples { + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsListBootstrapData.json + */ + /** + * Sample code: List Bootstrap Data for FlexNode Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listBootstrapDataForFlexNodeAgentPool( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .listBootstrapDataWithResponse("rg1", "clustername1", "flexnode1", new ListBootstrapDataRequest(), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java index 1554c0e006a5..d88af33e7b43 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsListSamples { /* - * x-ms-original-file: 2026-08-01/AgentPoolsList.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsList.json */ /** * Sample code: List Agent Pools by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpdateSamples.java new file mode 100644 index 000000000000..81d1afb0ed1a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpdateSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.AgentPoolUpdate; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpdateManualScaleProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpdateProperties; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpdateScaleProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolUpdateVirtualMachinesProfile; +import java.util.Arrays; + +/** + * Samples for AgentPools Update. + */ +public final class AgentPoolsUpdateSamples { + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsUpdate_Scale.json + */ + /** + * Sample code: Update Agent Pool - Scale VMSS. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + updateAgentPoolScaleVMSS(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .update("rg1", "clustername1", "agentpool1", + new AgentPoolUpdate().withProperties(new AgentPoolUpdateProperties().withCount(5)), null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AgentPoolsUpdate_ScaleVMs.json + */ + /** + * Sample code: Update Agent Pool - Scale VirtualMachines. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void updateAgentPoolScaleVirtualMachines( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .update("rg1", "clustername1", "agentpool1", + new AgentPoolUpdate().withProperties(new AgentPoolUpdateProperties().withVirtualMachinesProfile( + new AgentPoolUpdateVirtualMachinesProfile().withScale(new AgentPoolUpdateScaleProfile().withManual( + Arrays.asList(new AgentPoolUpdateManualScaleProfile().withSize("Standard_D2_v2").withCount(5), + new AgentPoolUpdateManualScaleProfile().withSize("Standard_D2_v3").withCount(3)))))), + null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java index 660e9df97af6..89ec7a2c0837 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsUpgradeNodeImageVersionSamples { /* - * x-ms-original-file: 2026-08-01/AgentPoolsUpgradeNodeImageVersion.json + * x-ms-original-file: 2026-07-02-preview/AgentPoolsUpgradeNodeImageVersion.json */ /** * Sample code: Upgrade Agent Pool Node Image Version. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..14e34cc1ec78 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsCreateOrUpdateSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.AlertConfigurationInner; +import com.azure.resourcemanager.containerservice.models.AlertConfigurationMode; +import com.azure.resourcemanager.containerservice.models.AlertConfigurationProperties; +import com.azure.resourcemanager.containerservice.models.AlertNotification; + +/** + * Samples for AlertConfigurations CreateOrUpdate. + */ +public final class AlertConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-02-preview/AlertConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Alert Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createOrUpdateAlertConfiguration(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAlertConfigurations() + .createOrUpdate("rg1", "clustername1", "alertconfig1", + new AlertConfigurationInner().withProperties(new AlertConfigurationProperties() + .withMode(AlertConfigurationMode.MANAGED) + .withNotification(new AlertNotification().withActionGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Insights/actionGroups/actiongroup1"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsDeleteSamples.java new file mode 100644 index 000000000000..7370d7d90ebc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AlertConfigurations Delete. + */ +public final class AlertConfigurationsDeleteSamples { + /* + * x-ms-original-file: 2026-07-02-preview/AlertConfigurations_Delete.json + */ + /** + * Sample code: Delete Alert Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteAlertConfiguration(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAlertConfigurations() + .delete("rg1", "clustername1", "alertconfig1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsGetSamples.java new file mode 100644 index 000000000000..5897159987cb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AlertConfigurations Get. + */ +public final class AlertConfigurationsGetSamples { + /* + * x-ms-original-file: 2026-07-02-preview/AlertConfigurations_Get.json + */ + /** + * Sample code: Get Alert Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getAlertConfiguration(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAlertConfigurations() + .getWithResponse("rg1", "clustername1", "alertconfig1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsListByManagedClusterSamples.java new file mode 100644 index 000000000000..e5706afac4b7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AlertConfigurationsListByManagedClusterSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AlertConfigurations ListByManagedCluster. + */ +public final class AlertConfigurationsListByManagedClusterSamples { + /* + * x-ms-original-file: 2026-07-02-preview/AlertConfigurations_ListByManagedCluster.json + */ + /** + * Sample code: List Alert Configurations by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listAlertConfigurationsByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAlertConfigurations() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsCreateOrUpdateSamples.java index e3f6191fb62e..a62f1c484caf 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsCreateOrUpdateSamples.java @@ -5,15 +5,20 @@ package com.azure.resourcemanager.containerservice.generated; import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; +import com.azure.resourcemanager.containerservice.models.AllowedSubject; import com.azure.resourcemanager.containerservice.models.IdentityBindingManagedIdentityProfile; import com.azure.resourcemanager.containerservice.models.IdentityBindingProperties; +import com.azure.resourcemanager.containerservice.models.LabelSelector; +import com.azure.resourcemanager.containerservice.models.LabelSelectorRequirement; +import com.azure.resourcemanager.containerservice.models.Operator; +import java.util.Arrays; /** * Samples for IdentityBindings CreateOrUpdate. */ public final class IdentityBindingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/IdentityBindings_Create_Or_Update.json + * x-ms-original-file: 2026-07-02-preview/IdentityBindings_Create_Or_Update.json */ /** * Sample code: Create or update Identity Binding. @@ -30,4 +35,33 @@ public final class IdentityBindingsCreateOrUpdateSamples { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))), com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-07-02-preview/IdentityBindings_Create_Or_UpdateWithAllowedSubjects.json + */ + /** + * Sample code: Create or update Identity Binding with allowed subjects. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createOrUpdateIdentityBindingWithAllowedSubjects( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getIdentityBindings() + .createOrUpdate("rg1", "clustername1", "identitybinding1", + new IdentityBindingInner().withProperties(new IdentityBindingProperties() + .withManagedIdentity(new IdentityBindingManagedIdentityProfile().withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")) + .withAllowedSubjects(Arrays.asList( + new AllowedSubject().withNamespaceSelector( + new LabelSelector().withMatchLabels(Arrays.asList("kubernetes.io/metadata.name=team-a"))), + new AllowedSubject() + .withNamespaceSelector(new LabelSelector().withMatchExpressions( + Arrays.asList(new LabelSelectorRequirement().withKey("fakeTokenPlaceholder") + .withOperator(Operator.IN) + .withValues(Arrays.asList("team-a", "team-b"))))) + .withServiceAccountSelector( + new LabelSelector().withMatchLabels(Arrays.asList("app=my-workload")))))), + com.azure.core.util.Context.NONE); + } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsDeleteSamples.java index 3410dcb14a37..9d9689cef7ae 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class IdentityBindingsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/IdentityBindings_Delete.json + * x-ms-original-file: 2026-07-02-preview/IdentityBindings_Delete.json */ /** * Sample code: Delete Identity Binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsGetSamples.java index b15af66b9bd0..73b4f59a0c1b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsGetSamples.java @@ -9,7 +9,7 @@ */ public final class IdentityBindingsGetSamples { /* - * x-ms-original-file: 2026-08-01/IdentityBindings_Get.json + * x-ms-original-file: 2026-07-02-preview/IdentityBindings_Get.json */ /** * Sample code: Get Identity Binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsListByManagedClusterSamples.java index cb4f4f0dd245..c47117390416 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsListByManagedClusterSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsListByManagedClusterSamples.java @@ -9,7 +9,7 @@ */ public final class IdentityBindingsListByManagedClusterSamples { /* - * x-ms-original-file: 2026-08-01/IdentityBindings_List.json + * x-ms-original-file: 2026-07-02-preview/IdentityBindings_List.json */ /** * Sample code: List Identity Bindings by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..99b010eea9f2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsCreateOrUpdateSamples.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.JWTAuthenticatorInner; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorClaimMappingExpression; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorClaimMappings; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorExtraClaimMappingExpression; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorIssuer; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorProperties; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorValidationRule; +import java.util.Arrays; + +/** + * Samples for JWTAuthenticators CreateOrUpdate. + */ +public final class JWTAuthenticatorsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-02-preview/JWTAuthenticators_Create_Or_Update_CustomCABundle.json + */ + /** + * Sample code: Create or update JWT Authenticator With Custom CA Bundle. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createOrUpdateJWTAuthenticatorWithCustomCABundle( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getJWTAuthenticators() + .createOrUpdate("rg1", "clustername1", "jwt1", + new JWTAuthenticatorInner() + .withProperties( + new JWTAuthenticatorProperties() + .withIssuer( + new JWTAuthenticatorIssuer().withUrl("https://example.com") + .withAudiences(Arrays.asList("https://example.com/audience1", + "https://example.com/audience2"))) + .withClaimValidationRules(Arrays.asList( + new JWTAuthenticatorValidationRule().withExpression("has(claims.sub)") + .withMessage("Sub is required"), + new JWTAuthenticatorValidationRule().withExpression("claims.sub != ''") + .withMessage("Sub cannot be empty"))) + .withClaimMappings(new JWTAuthenticatorClaimMappings() + .withUsername(new JWTAuthenticatorClaimMappingExpression() + .withExpression("'aks:jwt:' + claims.sub")) + .withGroups(new JWTAuthenticatorClaimMappingExpression() + .withExpression("claims.groups.split(',').map(group, 'aks:jwt:' + group)")) + .withExtra(Arrays.asList( + new JWTAuthenticatorExtraClaimMappingExpression().withKey("fakeTokenPlaceholder") + .withValueExpression("claims.customfield")))) + .withUserValidationRules(Arrays.asList(new JWTAuthenticatorValidationRule() + .withExpression("user.groups.all(group, group.startsWith('aks:jwt:admin:'))") + .withMessage("Must be in admin user group"))) + .withCertificateAuthorityBundle( + "-----BEGIN CERTIFICATE-----\nMII...rest of the certificate1...\n-----END CERTIFICATE-----")), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/JWTAuthenticators_Create_Or_Update.json + */ + /** + * Sample code: Create or update JWT Authenticator. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createOrUpdateJWTAuthenticator(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getJWTAuthenticators() + .createOrUpdate("rg1", "clustername1", "jwt1", + new JWTAuthenticatorInner() + .withProperties( + new JWTAuthenticatorProperties() + .withIssuer( + new JWTAuthenticatorIssuer().withUrl("https://example.com") + .withAudiences(Arrays.asList("https://example.com/audience1", + "https://example.com/audience2"))) + .withClaimValidationRules(Arrays.asList( + new JWTAuthenticatorValidationRule().withExpression("has(claims.sub)") + .withMessage("Sub is required"), + new JWTAuthenticatorValidationRule().withExpression("claims.sub != ''") + .withMessage("Sub cannot be empty"))) + .withClaimMappings(new JWTAuthenticatorClaimMappings() + .withUsername(new JWTAuthenticatorClaimMappingExpression() + .withExpression("'aks:jwt:' + claims.sub")) + .withGroups(new JWTAuthenticatorClaimMappingExpression() + .withExpression("claims.groups.split(',').map(group, 'aks:jwt:' + group)")) + .withExtra(Arrays.asList( + new JWTAuthenticatorExtraClaimMappingExpression().withKey("fakeTokenPlaceholder") + .withValueExpression("claims.customfield")))) + .withUserValidationRules(Arrays.asList(new JWTAuthenticatorValidationRule() + .withExpression("user.groups.all(group, group.startsWith('aks:jwt:admin:'))") + .withMessage("Must be in admin user group")))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsDeleteSamples.java new file mode 100644 index 000000000000..abdc15cde41d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for JWTAuthenticators Delete. + */ +public final class JWTAuthenticatorsDeleteSamples { + /* + * x-ms-original-file: 2026-07-02-preview/JWTAuthenticators_Delete.json + */ + /** + * Sample code: Delete JWT Authenticator. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteJWTAuthenticator(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getJWTAuthenticators() + .delete("rg1", "clustername1", "jwt1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsGetSamples.java new file mode 100644 index 000000000000..56fab044a35b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for JWTAuthenticators Get. + */ +public final class JWTAuthenticatorsGetSamples { + /* + * x-ms-original-file: 2026-07-02-preview/JWTAuthenticators_Get.json + */ + /** + * Sample code: Get JWT Authenticator. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getJWTAuthenticator(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getJWTAuthenticators() + .getWithResponse("rg1", "clustername1", "jwt1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsListByManagedClusterSamples.java new file mode 100644 index 000000000000..176694dd1b4a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsListByManagedClusterSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for JWTAuthenticators ListByManagedCluster. + */ +public final class JWTAuthenticatorsListByManagedClusterSamples { + /* + * x-ms-original-file: 2026-07-02-preview/JWTAuthenticators_List.json + */ + /** + * Sample code: List JWT authenticators by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listJWTAuthenticatorsByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getJWTAuthenticators() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e0aadbeb31c5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersCreateOrUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; + +/** + * Samples for LoadBalancers CreateOrUpdate. + */ +public final class LoadBalancersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-02-preview/LoadBalancers_Create_Or_Update.json + */ + /** + * Sample code: Create or update a Load Balancer. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createOrUpdateALoadBalancer(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getLoadBalancers() + .createOrUpdateWithResponse("rg1", "clustername1", "kubernetes", + new LoadBalancerInner().withPrimaryAgentPoolName("agentpool1").withAllowServicePlacement(true), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersDeleteSamples.java new file mode 100644 index 000000000000..0d0d4644490b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for LoadBalancers Delete. + */ +public final class LoadBalancersDeleteSamples { + /* + * x-ms-original-file: 2026-07-02-preview/LoadBalancers_Delete.json + */ + /** + * Sample code: Delete a Load Balancer. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteALoadBalancer(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getLoadBalancers() + .delete("rg1", "clustername1", "kubernetes", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersGetSamples.java new file mode 100644 index 000000000000..85ff98299700 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for LoadBalancers Get. + */ +public final class LoadBalancersGetSamples { + /* + * x-ms-original-file: 2026-07-02-preview/LoadBalancers_Get.json + */ + /** + * Sample code: Get Load Balancer. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getLoadBalancer(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getLoadBalancers() + .getWithResponse("rg1", "clustername1", "kubernetes", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersListByManagedClusterSamples.java new file mode 100644 index 000000000000..dd16b69a0f5b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersListByManagedClusterSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for LoadBalancers ListByManagedCluster. + */ +public final class LoadBalancersListByManagedClusterSamples { + /* + * x-ms-original-file: 2026-07-02-preview/LoadBalancers_List.json + */ + /** + * Sample code: List Load Balancers by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listLoadBalancersByManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getLoadBalancers() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b1d1b3482b67 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesCreateOrUpdateSamples.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; +import com.azure.resourcemanager.containerservice.models.AgentPoolMode; +import com.azure.resourcemanager.containerservice.models.KubeletDiskType; +import com.azure.resourcemanager.containerservice.models.MachineHardwareProfile; +import com.azure.resourcemanager.containerservice.models.MachineKubernetesProfile; +import com.azure.resourcemanager.containerservice.models.MachineOSProfile; +import com.azure.resourcemanager.containerservice.models.MachineProperties; +import com.azure.resourcemanager.containerservice.models.OSSku; +import com.azure.resourcemanager.containerservice.models.OSType; +import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Machines CreateOrUpdate. + */ +public final class MachinesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MachineCreate_Update.json + */ + /** + * Sample code: Create/Update Machine. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateMachine(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMachines() + .createOrUpdate("rg1", "clustername1", "agentpool1", "machine1", + new MachineInner().withProperties(new MachineProperties() + .withHardware(new MachineHardwareProfile().withVmSize("Standard_DS1_v2")) + .withOperatingSystem( + new MachineOSProfile().withOsType(OSType.LINUX).withOsSku(OSSku.UBUNTU).withEnableFips(false)) + .withKubernetes(new MachineKubernetesProfile().withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withOrchestratorVersion("1.30") + .withKubeletDiskType(KubeletDiskType.OS) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .withMaxPods(110)) + .withMode(AgentPoolMode.USER) + .withPriority(ScaleSetPriority.SPOT) + .withTags(mapOf("name1", "val1"))), + null, null, com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java index 5aa6ec759173..e4a1a4b68e58 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java @@ -9,7 +9,7 @@ */ public final class MachinesGetSamples { /* - * x-ms-original-file: 2026-08-01/MachineGet.json + * x-ms-original-file: 2026-07-02-preview/MachineGet.json */ /** * Sample code: Get a Machine in an Agent Pools by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java index b51946b1033b..b78a92cadf35 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java @@ -9,7 +9,7 @@ */ public final class MachinesListSamples { /* - * x-ms-original-file: 2026-08-01/MachineList.json + * x-ms-original-file: 2026-07-02-preview/MachineList.json */ /** * Sample code: List Machines in an Agentpool by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java index cfbbb0548e96..f4f2223308a7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ */ public final class MaintenanceConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + * x-ms-original-file: 2026-07-02-preview/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json */ /** * Sample code: Create/Update Maintenance Configuration with Maintenance Window. @@ -45,4 +45,22 @@ public static void createUpdateMaintenanceConfigurationWithMaintenanceWindow( .withEnd(LocalDate.parse("2024-01-05"))))), com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-07-02-preview/MaintenanceConfigurationsCreate_LinkedMaintenanceWindow.json + */ + /** + * Sample code: Create a Linked Maintenance Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createALinkedMaintenanceConfiguration( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceConfigurations() + .createOrUpdateWithResponse("rg1", "clustername1", "aksManagedAutoUpgradeSchedule", + new MaintenanceConfigurationInner().withMaintenanceWindowId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/maintenanceWindows/myMaintenanceWindow"), + com.azure.core.util.Context.NONE); + } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java index ee1c9cf83c35..8d7f035cf566 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class MaintenanceConfigurationsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/MaintenanceConfigurationsDelete_MaintenanceWindow.json + * x-ms-original-file: 2026-07-02-preview/MaintenanceConfigurationsDelete_MaintenanceWindow.json */ /** * Sample code: Delete Maintenance Configuration For Node OS Upgrade. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java index ca6397d5d07f..baa98cd0e75b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java @@ -9,7 +9,22 @@ */ public final class MaintenanceConfigurationsGetSamples { /* - * x-ms-original-file: 2026-08-01/MaintenanceConfigurationsGet_MaintenanceWindow.json + * x-ms-original-file: 2026-07-02-preview/MaintenanceConfigurationsGet_LinkedMaintenanceWindow.json + */ + /** + * Sample code: Get a Linked Maintenance Configuration. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getALinkedMaintenanceConfiguration(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceConfigurations() + .getWithResponse("rg1", "clustername1", "aksManagedAutoUpgradeSchedule", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/MaintenanceConfigurationsGet_MaintenanceWindow.json */ /** * Sample code: Get Maintenance Configuration Configured With Maintenance Window. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java index 8a305a6053a8..aed2ee5f7795 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java @@ -9,7 +9,7 @@ */ public final class MaintenanceConfigurationsListByManagedClusterSamples { /* - * x-ms-original-file: 2026-08-01/MaintenanceConfigurationsList_MaintenanceWindow.json + * x-ms-original-file: 2026-07-02-preview/MaintenanceConfigurationsList_MaintenanceWindow.json */ /** * Sample code: List maintenance configurations configured with maintenance window by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..c89f06fbd135 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsCreateOrUpdateSamples.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.MaintenanceWindowResourceInner; +import com.azure.resourcemanager.containerservice.models.DateSpan; +import com.azure.resourcemanager.containerservice.models.MaintenanceWindowResourceProperties; +import com.azure.resourcemanager.containerservice.models.Schedule; +import com.azure.resourcemanager.containerservice.models.WeekDay; +import com.azure.resourcemanager.containerservice.models.WeeklySchedule; +import java.time.LocalDate; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for MaintenanceWindows CreateOrUpdate. + */ +public final class MaintenanceWindowsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MaintenanceWindowsCreateOrUpdate.json + */ + /** + * Sample code: Create/Update Maintenance Window. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createUpdateMaintenanceWindow(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceWindows() + .createOrUpdate("rg-maintenance", "production-weekends", + new MaintenanceWindowResourceInner().withLocation("eastus") + .withTags(mapOf("environment", "production")) + .withProperties(new MaintenanceWindowResourceProperties() + .withSchedule(new Schedule() + .withWeekly(new WeeklySchedule().withIntervalWeeks(1).withDayOfWeek(WeekDay.SATURDAY))) + .withStartDate(LocalDate.parse("2026-04-05")) + .withStartTime("02:00") + .withDurationHours(8) + .withUtcOffset("-07:00") + .withNotAllowedDates(Arrays.asList(new DateSpan().withStart(LocalDate.parse("2026-12-23")) + .withEnd(LocalDate.parse("2027-01-03"))))), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsDeleteSamples.java new file mode 100644 index 000000000000..daa73dc7056b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MaintenanceWindows Delete. + */ +public final class MaintenanceWindowsDeleteSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MaintenanceWindowsDelete.json + */ + /** + * Sample code: Delete Maintenance Window. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteMaintenanceWindow(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceWindows() + .delete("rg-maintenance", "production-weekends", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..5eacab6b9488 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MaintenanceWindows GetByResourceGroup. + */ +public final class MaintenanceWindowsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MaintenanceWindowsGet.json + */ + /** + * Sample code: Get Maintenance Window. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getMaintenanceWindow(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceWindows() + .getByResourceGroupWithResponse("rg-maintenance", "production-weekends", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsListByResourceGroupSamples.java new file mode 100644 index 000000000000..1783408afa50 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MaintenanceWindows ListByResourceGroup. + */ +public final class MaintenanceWindowsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MaintenanceWindowsList.json + */ + /** + * Sample code: List Maintenance Windows by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMaintenanceWindowsByResourceGroup( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceWindows() + .listByResourceGroup("rg-maintenance", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsListSamples.java new file mode 100644 index 000000000000..9ee1b94b89b8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MaintenanceWindows List. + */ +public final class MaintenanceWindowsListSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MaintenanceWindowsListBySubscription.json + */ + /** + * Sample code: List Maintenance Windows by Subscription. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMaintenanceWindowsBySubscription( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getMaintenanceWindows().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsUpdateTagsSamples.java new file mode 100644 index 000000000000..e5bcd5644d73 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceWindowsUpdateTagsSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.TagsObject; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for MaintenanceWindows UpdateTags. + */ +public final class MaintenanceWindowsUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MaintenanceWindowsUpdateTags.json + */ + /** + * Sample code: Update Maintenance Window Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + updateMaintenanceWindowTags(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMaintenanceWindows() + .updateTagsWithResponse("rg-maintenance", "production-weekends", + new TagsObject().withTags(mapOf("environment", "production", "team", "aks-platform")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..a1dd09eaae82 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsCreateOrUpdateSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservice.models.CreationData; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusterSnapshots CreateOrUpdate. + */ +public final class ManagedClusterSnapshotsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClusterSnapshotsCreate.json + */ + /** + * Sample code: Create/Update Managed Cluster Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createUpdateManagedClusterSnapshot(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .createOrUpdateWithResponse("rg1", "snapshot1", new ManagedClusterSnapshotInner().withLocation("westus") + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withCreationData(new CreationData().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsDeleteSamples.java new file mode 100644 index 000000000000..f1d13fbd3aa5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusterSnapshots Delete. + */ +public final class ManagedClusterSnapshotsDeleteSamples { + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClusterSnapshotsDelete.json + */ + /** + * Sample code: Delete Managed Cluster Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteManagedClusterSnapshot(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .deleteWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..941b08b5f26d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusterSnapshots GetByResourceGroup. + */ +public final class ManagedClusterSnapshotsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClusterSnapshotsGet.json + */ + /** + * Sample code: Get Managed Cluster Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getManagedClusterSnapshot(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListByResourceGroupSamples.java new file mode 100644 index 000000000000..2184001309e4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusterSnapshots ListByResourceGroup. + */ +public final class ManagedClusterSnapshotsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClusterSnapshotsListByResourceGroup.json + */ + /** + * Sample code: List Managed Cluster Snapshots by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listManagedClusterSnapshotsByResourceGroup( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListSamples.java new file mode 100644 index 000000000000..fd99b40cfa56 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusterSnapshots List. + */ +public final class ManagedClusterSnapshotsListSamples { + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClusterSnapshotsList.json + */ + /** + * Sample code: List Managed Cluster Snapshots. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listManagedClusterSnapshots(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getManagedClusterSnapshots().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsUpdateTagsSamples.java new file mode 100644 index 000000000000..eabedd79b0f1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsUpdateTagsSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.TagsObject; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusterSnapshots UpdateTags. + */ +public final class ManagedClusterSnapshotsUpdateTagsSamples { + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClusterSnapshotsUpdateTags.json + */ + /** + * Sample code: Update Managed Cluster Snapshot Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + updateManagedClusterSnapshotTags(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .updateTagsWithResponse("rg1", "snapshot1", + new TagsObject().withTags(mapOf("key2", "fakeTokenPlaceholder", "key3", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java index 36a7710b07e8..1593d0d870a9 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersAbortLatestOperationSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersAbortOperation.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersAbortOperation.json */ /** * Sample code: Abort operation on managed cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java index fe5726b4a86e..d92c657143e8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java @@ -12,11 +12,14 @@ import com.azure.resourcemanager.containerservice.models.AdvancedNetworkingSecurityTransitEncryption; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolType; +import com.azure.resourcemanager.containerservice.models.BastionProfile; +import com.azure.resourcemanager.containerservice.models.BastionSku; import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceSshConfiguration; import com.azure.resourcemanager.containerservice.models.ContainerServiceSshPublicKey; +import com.azure.resourcemanager.containerservice.models.ControlPlaneScalingSize; import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.Expander; import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; @@ -31,13 +34,16 @@ import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.LicenseType; import com.azure.resourcemanager.containerservice.models.LoadBalancerSku; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAddonProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterControlPlaneScalingProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIdentity; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfileWebAppRouting; import com.azure.resourcemanager.containerservice.models.ManagedClusterLoadBalancerProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs; @@ -47,8 +53,9 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesAutoScalerProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefender; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentity; import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring; -import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileWorkloadIdentity; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterSku; import com.azure.resourcemanager.containerservice.models.ManagedClusterSkuName; @@ -66,7 +73,9 @@ import com.azure.resourcemanager.containerservice.models.ServiceMeshMode; import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; import com.azure.resourcemanager.containerservice.models.TransitEncryptionType; +import com.azure.resourcemanager.containerservice.models.UpgradeGateSettings; import com.azure.resourcemanager.containerservice.models.UpgradeOverrideSettings; +import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; import com.azure.resourcemanager.containerservice.models.WindowsGmsaProfile; import java.time.OffsetDateTime; import java.util.Arrays; @@ -78,14 +87,14 @@ */ public final class ManagedClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_CRG.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_EnabledFIPS.json */ /** - * Sample code: Create Managed Cluster with Capacity Reservation Group. + * Sample code: Create Managed Cluster with cluster-level FIPS enabled. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithCapacityReservationGroup( + public static void createManagedClusterWithClusterLevelFIPSEnabled( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -101,8 +110,7 @@ public static void createManagedClusterWithCapacityReservationGroup( .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) - .withCapacityReservationGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1") + .withEnableFips(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -113,6 +121,7 @@ public static void createManagedClusterWithCapacityReservationGroup( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) + .withEnableFips(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( @@ -125,14 +134,14 @@ public static void createManagedClusterWithCapacityReservationGroup( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_EnabledFIPS.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_DualStackNetworking.json */ /** - * Sample code: Create Managed Cluster with cluster-level FIPS enabled. + * Sample code: Create/Update Managed Cluster with dual-stack networking. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithClusterLevelFIPSEnabled( + public static void createUpdateManagedClusterWithDualStackNetworking( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -140,15 +149,20 @@ public static void createManagedClusterWithClusterLevelFIPSEnabled( .withTags(mapOf("archv2", "", "tier", "production")) .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity(new ManagedClusterIdentity().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) .withKubernetesVersion("") .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) - .withVmSize("Standard_DS2_v2") + .withVmSize("Standard_DS1_v2") .withOsType(OSType.LINUX) + .withScaleDownMode(ScaleDownMode.DEALLOCATE) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withEnableNodePublicIp(true) - .withEnableFips(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -159,27 +173,33 @@ public static void createManagedClusterWithClusterLevelFIPSEnabled( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) - .withEnableFips(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( - new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) - .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") - .withScaleDownDelayAfterAdd("15m")) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2))) + .withIpFamilies(Arrays.asList(IpFamily.IPV4, IpFamily.IPV6))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile().withBalanceSimilarNodeGroups("true") + .withExpander(Expander.PRIORITY) + .withMaxNodeProvisionTime("15m") + .withNewPodScaleUpDelay("1m") + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m") + .withSkipNodesWithSystemPods("false")) .withDiskEncryptionSetId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_CustomCATrustCertificates.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_PodIdentity.json */ /** - * Sample code: Create Managed Cluster with Custom CA Trust Certificates. + * Sample code: Create Managed Cluster with PodIdentity enabled. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithCustomCATrustCertificates( + public static void createManagedClusterWithPodIdentityEnabled( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -204,6 +224,8 @@ public static void createManagedClusterWithCustomCATrustCertificates( .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) + .withPodIdentityProfile( + new ManagedClusterPodIdentityProfile().withEnabled(true).withAllowNetworkPluginKubenet(true)) .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) @@ -212,22 +234,100 @@ public static void createManagedClusterWithCustomCATrustCertificates( .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") - .withSecurityProfile(new ManagedClusterSecurityProfile().withCustomCATrustCertificates( - Arrays.asList("ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=".getBytes()))), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_DualStackNetworking.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_UserAssignedNATGateway.json */ /** - * Sample code: Create/Update Managed Cluster with dual-stack networking. + * Sample code: Create Managed Cluster with user-assigned NAT gateway as outbound type. * * @param manager Entry point to ContainerServiceManager. */ - public static void createUpdateManagedClusterWithDualStackNetworking( + public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(false) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.USER_ASSIGNED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD)) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_MCSnapshot.json + */ + /** + * Sample code: Create Managed Cluster using a managed cluster snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterUsingAManagedClusterSnapshot( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withCreationData(new CreationData().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1")) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableFips(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_Update.json + */ + /** + * Sample code: Create/Update Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createUpdateManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") @@ -260,9 +360,11 @@ public static void createUpdateManagedClusterWithDualStackNetworking( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile() - .withManagedOutboundIPs(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2))) - .withIpFamilies(Arrays.asList(IpFamily.IPV4, IpFamily.IPV6))) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withUpgradeSettings(new ClusterUpgradeSettings() + .withOverrideSettings(new UpgradeOverrideSettings().withForceUpgrade(true) + .withUntil(OffsetDateTime.parse("2022-11-01T13:00:00Z")))) .withAutoScalerProfile( new ManagedClusterPropertiesAutoScalerProfile().withBalanceSimilarNodeGroups("true") .withExpander(Expander.PRIORITY) @@ -277,14 +379,54 @@ public static void createUpdateManagedClusterWithDualStackNetworking( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_PodIdentity.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_ControlPlaneScalingProfile.json */ /** - * Sample code: Create Managed Cluster with PodIdentity enabled. + * Sample code: Create Managed Cluster with ControlPlaneScalingProfile. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithPodIdentityEnabled( + public static void createManagedClusterWithControlPlaneScalingProfile( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.BASE) + .withTier(ManagedClusterSkuTier.STANDARD)) + .withKubernetesVersion("1.33.0") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withNetworkProfile(new ContainerServiceNetworkProfile().withNetworkPlugin(NetworkPlugin.AZURE) + .withNetworkPluginMode(NetworkPluginMode.OVERLAY) + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withControlPlaneScalingProfile( + new ManagedClusterControlPlaneScalingProfile().withScalingSize(ControlPlaneScalingSize.H4)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + */ + /** + * Sample code: Create Managed Private Cluster with fqdn subdomain specified. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -293,13 +435,14 @@ public static void createManagedClusterWithPodIdentityEnabled( .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) .withTier(ManagedClusterSkuTier.FREE)) .withKubernetesVersion("") - .withDnsPrefix("dnsprefix1") + .withFqdnSubdomain("domain1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -309,8 +452,6 @@ public static void createManagedClusterWithPodIdentityEnabled( .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) - .withPodIdentityProfile( - new ManagedClusterPodIdentityProfile().withEnabled(true).withAllowNetworkPluginKubenet(true)) .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) @@ -318,20 +459,21 @@ public static void createManagedClusterWithPodIdentityEnabled( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) + .withPrivateDnsZone( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io")), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_UserAssignedNATGateway.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_ManagedNATGateway.json */ /** - * Sample code: Create Managed Cluster with user-assigned NAT gateway as outbound type. + * Sample code: Create Managed Cluster with AKS-managed NAT gateway as outbound type. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( + public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -358,8 +500,10 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( .withAddonProfiles(mapOf()) .withEnableRbac(true) .withNetworkProfile( - new ContainerServiceNetworkProfile().withOutboundType(OutboundType.USER_ASSIGNED_NATGATEWAY) - .withLoadBalancerSku(LoadBalancerSku.STANDARD)) + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.MANAGED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withNatGatewayProfile(new ManagedClusterNatGatewayProfile() + .withManagedOutboundIpProfile(new ManagedClusterManagedOutboundIpProfile().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( @@ -368,35 +512,30 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_Update.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_Premium.json */ /** - * Sample code: Create/Update Managed Cluster. + * Sample code: Create Managed Cluster with LongTermSupport. * * @param manager Entry point to ContainerServiceManager. */ - public static void - createUpdateManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void createManagedClusterWithLongTermSupport( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") .withTags(mapOf("archv2", "", "tier", "production")) - .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) - .withTier(ManagedClusterSkuTier.FREE)) - .withIdentity(new ManagedClusterIdentity().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", - new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.BASE) + .withTier(ManagedClusterSkuTier.PREMIUM)) .withKubernetesVersion("") .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) - .withVmSize("Standard_DS1_v2") + .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) - .withScaleDownMode(ScaleDownMode.DEALLOCATE) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) - .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -407,35 +546,78 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) + .withSupportPlan(KubernetesSupportPlan.AKSLONG_TERM_SUPPORT) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) - .withUpgradeSettings(new ClusterUpgradeSettings() - .withOverrideSettings(new UpgradeOverrideSettings().withForceUpgrade(false) - .withUntil(OffsetDateTime.parse("2022-11-01T13:00:00Z")))) - .withAutoScalerProfile( - new ManagedClusterPropertiesAutoScalerProfile().withBalanceSimilarNodeGroups("true") - .withExpander(Expander.PRIORITY) - .withMaxNodeProvisionTime("15m") - .withNewPodScaleUpDelay("1m") + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + */ + /** + * Sample code: Create Managed Cluster with Azure Key Vault Secrets Provider Addon. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles( + mapOf("azureKeyvaultSecretsProvider", + new ManagedClusterAddonProfile().withEnabled(true) + .withConfig(mapOf("enableSecretRotation", "fakeTokenPlaceholder", + "rotationPollInterval", "2m")))) + .withEnableRbac(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile() .withScanInterval("20s") - .withScaleDownDelayAfterAdd("15m") - .withSkipNodesWithSystemPods("false")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersAssociate_CRG.json */ /** - * Sample code: Create Managed Private Cluster with fqdn subdomain specified. + * Sample code: Associate Managed Cluster with Capacity Reservation Group. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( + public static void associateManagedClusterWithCapacityReservationGroup( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -444,14 +626,15 @@ public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) .withTier(ManagedClusterSkuTier.FREE)) .withKubernetesVersion("") - .withFqdnSubdomain("domain1") + .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) - .withEnableEncryptionAtHost(true) + .withCapacityReservationGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1") .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -468,21 +651,63 @@ public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) - .withPrivateDnsZone( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io")), + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_ManagedNATGateway.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_NodeAutoProvisioning.json */ /** - * Sample code: Create Managed Cluster with AKS-managed NAT gateway as outbound type. + * Sample code: Create Managed Cluster with Node Auto Provisioning. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( + public static void createManagedClusterWithNodeAutoProvisioning( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withNetworkPlugin(NetworkPlugin.AZURE) + .withNetworkPluginMode(NetworkPluginMode.OVERLAY) + .withNetworkDataplane(NetworkDataplane.CILIUM) + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_NodePublicIPPrefix.json + */ + /** + * Sample code: Create Managed Cluster with Node Public IP Prefix. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithNodePublicIPPrefix( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -497,7 +722,9 @@ public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) - .withEnableNodePublicIp(false) + .withEnableNodePublicIp(true) + .withNodePublicIpPrefixId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix") .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -508,11 +735,10 @@ public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) - .withNetworkProfile( - new ContainerServiceNetworkProfile().withOutboundType(OutboundType.MANAGED_NATGATEWAY) - .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withNatGatewayProfile(new ManagedClusterNatGatewayProfile() - .withManagedOutboundIpProfile(new ManagedClusterManagedOutboundIpProfile().withCount(2)))) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( @@ -521,21 +747,21 @@ public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_Premium.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_EnableEncryptionAtHost.json */ /** - * Sample code: Create Managed Cluster with LongTermSupport. + * Sample code: Create Managed Cluster with EncryptionAtHost enabled. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithLongTermSupport( + public static void createManagedClusterWithEncryptionAtHostEnabled( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") .withTags(mapOf("archv2", "", "tier", "production")) - .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.BASE) - .withTier(ManagedClusterSkuTier.PREMIUM)) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) .withKubernetesVersion("") .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) @@ -555,26 +781,26 @@ public static void createManagedClusterWithLongTermSupport( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) - .withSupportPlan(KubernetesSupportPlan.AKSLONG_TERM_SUPPORT) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)), + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_NodePublicIPPrefix.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_PrivateClusterPublicFQDN.json */ /** - * Sample code: Create Managed Cluster with Node Public IP Prefix. + * Sample code: Create Managed Private Cluster with Public FQDN specified. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithNodePublicIPPrefix( + public static void createManagedPrivateClusterWithPublicFQDNSpecified( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -590,8 +816,7 @@ public static void createManagedClusterWithNodePublicIPPrefix( .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) - .withNodePublicIpPrefixId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix") + .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -608,20 +833,61 @@ public static void createManagedClusterWithNodePublicIPPrefix( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) + .withEnablePrivateClusterPublicFqdn(true)), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_EnableEncryptionAtHost.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_EnableManagedBastion.json */ /** - * Sample code: Create Managed Cluster with EncryptionAtHost enabled. + * Sample code: Create Managed Private Cluster With Managed Bastion. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedPrivateClusterWithManagedBastion( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableEncryptionAtHost(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withNetworkProfile(new ContainerServiceNetworkProfile().withBastionProfile( + new BastionProfile().withEnabled(true).withSku(BastionSku.PREMIUM).withScaleUnits(3))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_HTTPProxy.json + */ + /** + * Sample code: Create Managed Cluster with HTTP proxy configured. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithEncryptionAtHostEnabled( + public static void createManagedClusterWithHTTPProxyConfigured( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -637,7 +903,6 @@ public static void createManagedClusterWithEncryptionAtHostEnabled( .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) - .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -655,19 +920,23 @@ public static void createManagedClusterWithEncryptionAtHostEnabled( .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig(new ManagedClusterHttpProxyConfig().withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_PrivateClusterPublicFQDN.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json */ /** - * Sample code: Create Managed Private Cluster with Public FQDN specified. + * Sample code: Create/Update Managed Cluster with EnableNamespaceResources. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedPrivateClusterWithPublicFQDNSpecified( + public static void createUpdateManagedClusterWithEnableNamespaceResources( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -678,12 +947,12 @@ public static void createManagedPrivateClusterWithPublicFQDNSpecified( .withKubernetesVersion("") .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) - .withVmSize("Standard_DS2_v2") + .withVmSize("Standard_DS1_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withEnableNodePublicIp(true) - .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -694,26 +963,27 @@ public static void createManagedPrivateClusterWithPublicFQDNSpecified( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) + .withEnableNamespaceResources(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) - .withEnablePrivateClusterPublicFqdn(true)), + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_HTTPProxy.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_DedicatedHostGroup.json */ /** - * Sample code: Create Managed Cluster with HTTP proxy configured. + * Sample code: Create Managed Cluster with Dedicated Host Group. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithHTTPProxyConfigured( + public static void createManagedClusterWithDedicatedHostGroup( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -727,8 +997,9 @@ public static void createManagedClusterWithHTTPProxyConfigured( .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) - .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -746,23 +1017,63 @@ public static void createManagedClusterWithHTTPProxyConfigured( .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") - .withHttpProxyConfig(new ManagedClusterHttpProxyConfig().withHttpProxy("http://myproxy.server.com:8080") - .withHttpsProxy("https://myproxy.server.com:8080") - .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) - .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_DedicatedHostGroup.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_EnableAIToolchainOperator.json */ /** - * Sample code: Create Managed Cluster with Dedicated Host Group. + * Sample code: Create Managed Cluster with AI Toolchain Operator enabled. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithDedicatedHostGroup( + public static void createManagedClusterWithAIToolchainOperatorEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withNetworkPlugin(NetworkPlugin.AZURE) + .withNetworkPluginMode(NetworkPluginMode.OVERLAY) + .withNetworkDataplane(NetworkDataplane.CILIUM) + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAiToolchainOperatorProfile(new ManagedClusterAIToolchainOperatorProfile().withEnabled(true)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_IngressProfile_ApplicationLoadBalancer.json + */ + /** + * Sample code: Create Managed Cluster with Application Load Balancer Profile configured. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithApplicationLoadBalancerProfileConfigured( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -776,32 +1087,23 @@ public static void createManagedClusterWithDedicatedHostGroup( .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) - .withHostGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) - .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") - .withAdminPassword("fakeTokenPlaceholder")) - .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") - .withSecret("fakeTokenPlaceholder")) - .withAddonProfiles(mapOf()) - .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) - .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") - .withScaleDownDelayAfterAdd("15m")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + .withIngressProfile(new ManagedClusterIngressProfile().withApplicationLoadBalancer( + new ManagedClusterIngressProfileApplicationLoadBalancer().withEnabled(true))), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_SecurityProfile.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_SecurityProfile.json */ /** * Sample code: Create Managed Cluster with Security Profile configured. @@ -836,13 +1138,20 @@ public static void createManagedClusterWithSecurityProfileConfigured( .withDefender(new ManagedClusterSecurityProfileDefender().withLogAnalyticsWorkspaceResourceId( "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME") .withSecurityMonitoring( - new ManagedClusterSecurityProfileDefenderSecurityMonitoring().withEnabled(true))) - .withWorkloadIdentity(new ManagedClusterSecurityProfileWorkloadIdentity().withEnabled(true))), + new ManagedClusterSecurityProfileDefenderSecurityMonitoring().withEnabled(true)) + .withSecurityGating(new ManagedClusterSecurityProfileDefenderSecurityGating().withEnabled(true) + .withIdentities( + Arrays.asList(new ManagedClusterSecurityProfileDefenderSecurityGatingIdentity() + .withAzureContainerRegistry("registry1") + .withIdentity(new UserAssignedIdentity().withResourceId( + "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.ManagedIdentity/userAssignedIdentities/IDENTITY_NAME") + .withClientId("client1")))) + .withAllowSecretAccess(true)))), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_PPG.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_PPG.json */ /** * Sample code: Create Managed Cluster with PPG. @@ -889,7 +1198,7 @@ public static void createManagedClusterWithSecurityProfileConfigured( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_IngressProfile_WebAppRouting.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_IngressProfile_WebAppRouting.json */ /** * Sample code: Create Managed Cluster with Web App Routing Ingress Profile configured. @@ -928,7 +1237,7 @@ public static void createManagedClusterWithWebAppRoutingIngressProfileConfigured } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_UpdateWithAHUB.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_UpdateWithAHUB.json */ /** * Sample code: Create/Update Managed Cluster with EnableAHUB. @@ -979,7 +1288,52 @@ public static void createUpdateManagedClusterWithEnableAHUB( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_DisableRunCommand.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_UpgradeGate.json + */ + /** + * Sample code: Create/Update Managed Cluster with upgrade gate enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateManagedClusterWithUpgradeGateEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withUpgradeSettings( + new ClusterUpgradeSettings().withUpgradeGateSettings(new UpgradeGateSettings().withEnabled(true))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_DisableRunCommand.json */ /** * Sample code: Create Managed Cluster with RunCommand disabled. @@ -1024,7 +1378,7 @@ public static void createManagedClusterWithRunCommandDisabled( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_AzureServiceMesh.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_AzureServiceMesh.json */ /** * Sample code: Create/Update Managed Cluster with Azure Service Mesh. @@ -1078,9 +1432,8 @@ public static void createUpdateManagedClusterWithAzureServiceMesh( .withIngressGateways( Arrays.asList(new IstioIngressGateway().withMode(IstioIngressGatewayMode.INTERNAL) .withEnabled(true))) - .withEgressGateways(Arrays.asList(new IstioEgressGateway().withEnabled(true) - .withName("test-istio-egress") - .withGatewayConfigurationName("test-gateway-configuration")))) + .withEgressGateways( + Arrays.asList(new IstioEgressGateway().withEnabled(true).withName("istioegress1")))) .withCertificateAuthority(new IstioCertificateAuthority() .withPlugin(new IstioPluginCertificateAuthority().withKeyVaultId("fakeTokenPlaceholder") .withCertObjectName("ca-cert") @@ -1091,7 +1444,7 @@ public static void createUpdateManagedClusterWithAzureServiceMesh( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_Snapshot.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_Snapshot.json */ /** * Sample code: Create Managed Cluster using an agent pool snapshot. @@ -1139,59 +1492,7 @@ public static void createManagedClusterUsingAnAgentPoolSnapshot( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json - */ - /** - * Sample code: Create Managed Cluster with Azure KeyVault Secrets Provider Addon. - * - * @param manager Entry point to ContainerServiceManager. - */ - public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { - manager.serviceClient() - .getManagedClusters() - .createOrUpdate("rg1", "clustername1", - new ManagedClusterInner().withLocation("location1") - .withTags(mapOf("archv2", "", "tier", "production")) - .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) - .withTier(ManagedClusterSkuTier.FREE)) - .withKubernetesVersion("") - .withDnsPrefix("dnsprefix1") - .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) - .withVmSize("Standard_DS2_v2") - .withOsType(OSType.LINUX) - .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) - .withMode(AgentPoolMode.SYSTEM) - .withEnableNodePublicIp(true) - .withName("nodepool1"))) - .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") - .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( - Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) - .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") - .withAdminPassword("fakeTokenPlaceholder")) - .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") - .withSecret("fakeTokenPlaceholder")) - .withAddonProfiles( - mapOf("azureKeyvaultSecretsProvider", - new ManagedClusterAddonProfile().withEnabled(true) - .withConfig(mapOf("enableSecretRotation", "fakeTokenPlaceholder", - "rotationPollInterval", "2m")))) - .withEnableRbac(true) - .withNetworkProfile( - new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) - .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( - new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) - .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile() - .withScanInterval("20s") - .withScaleDownDelayAfterAdd("15m")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_OSSKU.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_OSSKU.json */ /** * Sample code: Create Managed Cluster with OSSKU. @@ -1241,7 +1542,48 @@ public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( } /* - * x-ms-original-file: 2026-08-01/AdvancedNetworkingTransitEncryption.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_VirtualMachines.json + */ + /** + * Sample code: Create Managed Cluster with VirtualMachines pool type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithVirtualMachinesPoolType( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINES) + .withMode(AgentPoolMode.SYSTEM) + .withEnableFips(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/AdvancedNetworkingTransitEncryption.json */ /** * Sample code: Create Managed Cluster with Advanced Networking Transit Encryption. @@ -1290,7 +1632,7 @@ public static void createManagedClusterWithAdvancedNetworkingTransitEncryption( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json */ /** * Sample code: Create/Update AAD Managed Cluster with EnableAzureRBAC. @@ -1337,7 +1679,7 @@ public static void createUpdateAADManagedClusterWithEnableAzureRBAC( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_EnableUltraSSD.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_EnableUltraSSD.json */ /** * Sample code: Create Managed Cluster with UltraSSD enabled. @@ -1383,7 +1725,54 @@ public static void createManagedClusterWithUltraSSDEnabled( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_UpdateWindowsGmsa.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_CustomCATrustCertificates.json + */ + /** + * Sample code: Create Managed Cluster with CustomCATrustCertificates populated. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithCustomCATrustCertificatesPopulated( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withSecurityProfile(new ManagedClusterSecurityProfile().withCustomCATrustCertificates( + Arrays.asList("ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=".getBytes()))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_UpdateWindowsGmsa.json */ /** * Sample code: Create/Update Managed Cluster with Windows gMSA enabled. @@ -1434,7 +1823,7 @@ public static void createUpdateManagedClusterWithWindowsGMSAEnabled( } /* - * x-ms-original-file: 2026-08-01/ManagedClustersCreate_GPUMIG.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersCreate_GPUMIG.json */ /** * Sample code: Create Managed Cluster with GPUMIG. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java index 8297a6d0d3a3..4a54c86a6a57 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersDeleteSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersDelete.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersDelete.json */ /** * Sample code: Delete Managed Cluster. @@ -20,6 +20,6 @@ public final class ManagedClustersDeleteSamples { deleteManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() - .delete("rg1", "clustername1", null, com.azure.core.util.Context.NONE); + .delete("rg1", "clustername1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java index e834c0c9fb31..2f449de18299 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetAccessProfileSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersGetAccessProfile.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersGetAccessProfile.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java index 3912d90cd589..23330bd5876c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersGet.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersGet.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java index 10d89d85f72e..b6cc2ff349e3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetCommandResultSamples { /* - * x-ms-original-file: 2026-08-01/RunCommandResultFailed.json + * x-ms-original-file: 2026-07-02-preview/RunCommandResultFailed.json */ /** * Sample code: commandFailedResult. @@ -24,7 +24,7 @@ public static void commandFailedResult(com.azure.resourcemanager.containerservic } /* - * x-ms-original-file: 2026-08-01/RunCommandResultSucceed.json + * x-ms-original-file: 2026-07-02-preview/RunCommandResultSucceed.json */ /** * Sample code: commandSucceedResult. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetGuardrailsVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetGuardrailsVersionsSamples.java new file mode 100644 index 000000000000..808d8474b988 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetGuardrailsVersionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetGuardrailsVersions. + */ +public final class ManagedClustersGetGuardrailsVersionsSamples { + /* + * x-ms-original-file: 2026-07-02-preview/GetGuardrailsVersions.json + */ + /** + * Sample code: Get guardrails available versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getGuardrailsAvailableVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getGuardrailsVersionsWithResponse("location1", "v1.0.0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java index 593edf2b829a..7bffeb59f10a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetMeshRevisionProfileSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersGet_MeshRevisionProfile.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersGet_MeshRevisionProfile.json */ /** * Sample code: Get a mesh revision profile for a mesh mode. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java index 750cc60937d5..2f15765ae417 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetMeshUpgradeProfileSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersGet_MeshUpgradeProfile.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersGet_MeshUpgradeProfile.json */ /** * Sample code: Gets version compatibility and upgrade profile for a service mesh in a cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetSafeguardsVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetSafeguardsVersionsSamples.java new file mode 100644 index 000000000000..32f7966d40a9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetSafeguardsVersionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetSafeguardsVersions. + */ +public final class ManagedClustersGetSafeguardsVersionsSamples { + /* + * x-ms-original-file: 2026-07-02-preview/GetSafeguardsVersions.json + */ + /** + * Sample code: Get Safeguards available versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getSafeguardsAvailableVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getSafeguardsVersionsWithResponse("location1", "v1.0.0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java index 13585f3e0f58..3f92961f8400 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetUpgradeProfileSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersGetUpgradeProfile.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersGetUpgradeProfile.json */ /** * Sample code: Get Upgrade Profile for Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java index f2bc8b7f1ed0..7f78cf8336ac 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersListByResourceGroup.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersListByResourceGroup.json */ /** * Sample code: Get Managed Clusters by Resource Group. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java index 24ad2c7e5f66..10b7fe92174c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListClusterAdminCredentialsSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersListClusterAdminCredentials.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersListClusterAdminCredentials.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java index a7d7d5e5a8f7..759baaab10ff 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListClusterMonitoringUserCredentialsSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersListClusterMonitoringUserCredentials.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersListClusterCredentialResult.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java index e48499719e48..c316d70621d3 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListClusterUserCredentialsSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersListClusterUserCredentials.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersListClusterUserCredentials.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListGuardrailsVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListGuardrailsVersionsSamples.java new file mode 100644 index 000000000000..2713df1035cc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListGuardrailsVersionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListGuardrailsVersions. + */ +public final class ManagedClustersListGuardrailsVersionsSamples { + /* + * x-ms-original-file: 2026-07-02-preview/ListGuardrailsVersions.json + */ + /** + * Sample code: List Guardrails Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listGuardrailsVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listGuardrailsVersions("location1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java index 92d65bca4821..f5780a482c90 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListKubernetesVersionsSamples { /* - * x-ms-original-file: 2026-08-01/KubernetesVersions_List.json + * x-ms-original-file: 2026-07-02-preview/KubernetesVersions_List.json */ /** * Sample code: List Kubernetes Versions. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java index 4658cec6278f..0be8f945bca8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListMeshRevisionProfilesSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersList_MeshRevisionProfiles.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersList_MeshRevisionProfiles.json */ /** * Sample code: List mesh revision profiles in a location. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java index 483ae8135170..f79b8acb02fc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListMeshUpgradeProfilesSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersList_MeshUpgradeProfiles.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersList_MeshUpgradeProfiles.json */ /** * Sample code: Lists version compatibility and upgrade profile for all service meshes in a cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListNodeImageVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListNodeImageVersionsSamples.java new file mode 100644 index 000000000000..fffd5e9b488c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListNodeImageVersionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListNodeImageVersions. + */ +public final class ManagedClustersListNodeImageVersionsSamples { + /* + * x-ms-original-file: 2026-07-02-preview/NodeImageVersions_List.json + */ + /** + * Sample code: List Node Image Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listNodeImageVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listNodeImageVersions("location1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java index 8e4389b51f92..e0a403938fff 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: 2026-08-01/OutboundNetworkDependenciesEndpointsList.json + * x-ms-original-file: 2026-07-02-preview/OutboundNetworkDependenciesEndpointsList.json */ /** * Sample code: List OutboundNetworkDependenciesEndpoints by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSafeguardsVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSafeguardsVersionsSamples.java new file mode 100644 index 000000000000..a22e9f14b565 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSafeguardsVersionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListSafeguardsVersions. + */ +public final class ManagedClustersListSafeguardsVersionsSamples { + /* + * x-ms-original-file: 2026-07-02-preview/ListSafeguardsVersions.json + */ + /** + * Sample code: List Safeguards Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listSafeguardsVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listSafeguardsVersions("location1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java index aae0eac92952..34965e0483da 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersList.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersList.json */ /** * Sample code: List Managed Clusters. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRebalanceLoadBalancersSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRebalanceLoadBalancersSamples.java new file mode 100644 index 000000000000..a97498450ae5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRebalanceLoadBalancersSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; +import java.util.Arrays; + +/** + * Samples for ManagedClusters RebalanceLoadBalancers. + */ +public final class ManagedClustersRebalanceLoadBalancersSamples { + /* + * x-ms-original-file: 2026-07-02-preview/LoadBalancers_Rebalance.json + */ + /** + * Sample code: Rebalance Load Balancers of a Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void rebalanceLoadBalancersOfAManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .rebalanceLoadBalancers("rg1", "clustername1", + new RebalanceLoadBalancersRequestBody().withLoadBalancerNames(Arrays.asList("kubernetes")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java index 506db2befa25..d8bce4c7b9b8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersResetAADProfileSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersResetAADProfile.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersResetAADProfile.json */ /** * Sample code: Reset AAD Profile. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java index 21aa9ec3ff1c..3f9e6e69a975 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersResetServicePrincipalProfileSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersResetServicePrincipalProfile.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersResetServicePrincipalProfile.json */ /** * Sample code: Reset Service Principal Profile. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java index 28f125036940..e00c31f86790 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersRotateClusterCertificatesSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersRotateClusterCertificates.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersRotateClusterCertificates.json */ /** * Sample code: Rotate Cluster Certificates. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java index 5efa2d6779f2..411a2bdf1001 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersRotateServiceAccountSigningKeysSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersRotateServiceAccountSigningKeys.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersRotateServiceAccountSigningKeys.json */ /** * Sample code: Rotate Cluster Service Account Signing Keys. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java index d7e279fc49fb..84e1aa1eafdb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersRunCommandSamples { /* - * x-ms-original-file: 2026-08-01/RunCommandRequest.json + * x-ms-original-file: 2026-07-02-preview/RunCommandRequest.json */ /** * Sample code: submitNewCommand. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java index cc247afe08c2..96ee62b08646 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersStartSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersStart.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersStart.json */ /** * Sample code: Start Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java index 893f81f9bc45..f27b1e170043 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersStopSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersStop.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersStop.json */ /** * Sample code: Stop Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java index 18316056ca5e..4b011d5a2125 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class ManagedClustersUpdateTagsSamples { /* - * x-ms-original-file: 2026-08-01/ManagedClustersUpdateTags.json + * x-ms-original-file: 2026-07-02-preview/ManagedClustersUpdateTags.json */ /** * Sample code: Update Managed Cluster Tags. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java index 6f7e668e3574..4629f9590098 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ */ public final class ManagedNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/ManagedNamespacesCreate_Update.json + * x-ms-original-file: 2026-07-02-preview/ManagedNamespacesCreate_Update.json */ /** * Sample code: Create/Update Managed Namespace. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java index a390235e7fe6..03577c788752 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNamespacesDeleteSamples { /* - * x-ms-original-file: 2026-08-01/ManagedNamespacesDelete.json + * x-ms-original-file: 2026-07-02-preview/ManagedNamespacesDelete.json */ /** * Sample code: Delete Managed Namespace. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java index 3efdbde73169..60e8402f4293 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNamespacesGetSamples { /* - * x-ms-original-file: 2026-08-01/ManagedNamespacesGet.json + * x-ms-original-file: 2026-07-02-preview/ManagedNamespacesGet.json */ /** * Sample code: Get Managed Namespace. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java index f509859e291d..554e456aaab0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNamespacesListByManagedClusterSamples { /* - * x-ms-original-file: 2026-08-01/ManagedNamespacesList.json + * x-ms-original-file: 2026-07-02-preview/ManagedNamespacesList.json */ /** * Sample code: List namespaces by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java index e42db2d9d789..362f2a03814e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNamespacesListCredentialSamples { /* - * x-ms-original-file: 2026-08-01/ManagedNamespacesListCredentialResult.json + * x-ms-original-file: 2026-07-02-preview/ManagedNamespacesListCredentialResult.json */ /** * Sample code: List managed namespace credentials. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java index 2d26302b1d6c..b2e3da3873b4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ManagedNamespacesUpdateSamples { /* - * x-ms-original-file: 2026-08-01/ManagedNamespacesUpdateTags.json + * x-ms-original-file: 2026-07-02-preview/ManagedNamespacesUpdateTags.json */ /** * Sample code: Update Managed Namespace Tags. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..ceb25859d4d2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsCreateOrUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import com.azure.resourcemanager.containerservice.models.MeshMembershipProperties; + +/** + * Samples for MeshMemberships CreateOrUpdate. + */ +public final class MeshMembershipsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MeshMemberships_CreateOrUpdate.json + */ + /** + * Sample code: Create or update Mesh Membership. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createOrUpdateMeshMembership(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMeshMemberships() + .createOrUpdate("rg1", "clustername1", "meshmembership1", + new MeshMembershipInner().withProperties(new MeshMembershipProperties().withManagedMeshId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.AppLink/applinks/applink1/appLinkMembers/member1")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsDeleteSamples.java new file mode 100644 index 000000000000..fab67a1710d2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MeshMemberships Delete. + */ +public final class MeshMembershipsDeleteSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MeshMemberships_Delete.json + */ + /** + * Sample code: Delete Mesh Membership. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteMeshMembership(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMeshMemberships() + .delete("rg1", "clustername1", "meshmembership1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsGetSamples.java new file mode 100644 index 000000000000..05ebf8d520b6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MeshMemberships Get. + */ +public final class MeshMembershipsGetSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MeshMemberships_Get.json + */ + /** + * Sample code: Get Mesh Membership. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getMeshMembership(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMeshMemberships() + .getWithResponse("rg1", "clustername1", "meshmembership1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsListByManagedClusterSamples.java new file mode 100644 index 000000000000..908ebd9d7558 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsListByManagedClusterSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MeshMemberships ListByManagedCluster. + */ +public final class MeshMembershipsListByManagedClusterSamples { + /* + * x-ms-original-file: 2026-07-02-preview/MeshMemberships_ListByManagedCluster.json + */ + /** + * Sample code: List Mesh Memberships by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMeshMembershipsByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMeshMemberships() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetByAgentPoolSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetByAgentPoolSamples.java new file mode 100644 index 000000000000..6f651e425f87 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetByAgentPoolSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OperationStatusResult GetByAgentPool. + */ +public final class OperationStatusResultGetByAgentPoolSamples { + /* + * x-ms-original-file: 2026-07-02-preview/OperationStatusResultGetByAgentPool.json + */ + /** + * Sample code: Get OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getOperationStatusResult(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOperationStatusResults() + .getByAgentPoolWithResponse("rg1", "clustername1", "agentpool1", "00000000-0000-0000-0000-000000000001", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetSamples.java new file mode 100644 index 000000000000..dea9e43a364e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OperationStatusResult Get. + */ +public final class OperationStatusResultGetSamples { + /* + * x-ms-original-file: 2026-07-02-preview/OperationStatusResultGet.json + */ + /** + * Sample code: Get OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getOperationStatusResult(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOperationStatusResults() + .getWithResponse("rg1", "clustername1", "00000000-0000-0000-0000-000000000001", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListByAgentPoolSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListByAgentPoolSamples.java new file mode 100644 index 000000000000..08476055e9c8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListByAgentPoolSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OperationStatusResult ListByAgentPool. + */ +public final class OperationStatusResultListByAgentPoolSamples { + /* + * x-ms-original-file: 2026-07-02-preview/OperationStatusResultListByAgentPool.json + */ + /** + * Sample code: List Operations on Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listOperationsOnAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOperationStatusResults() + .listByAgentPool("rg1", "clustername1", "agentpool1", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/OperationStatusResultListByAgentPool_Active.json + */ + /** + * Sample code: List Active Operations on Agent Pool. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listActiveOperationsOnAgentPool(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOperationStatusResults() + .listByAgentPool("rg1", "clustername1", "agentpool1", true, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListSamples.java new file mode 100644 index 000000000000..d1487c0b70e9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OperationStatusResult List. + */ +public final class OperationStatusResultListSamples { + /* + * x-ms-original-file: 2026-07-02-preview/OperationStatusResultList.json + */ + /** + * Sample code: List of OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listOfOperationStatusResult(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOperationStatusResults() + .list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java index 9fc485e94b2f..f3baa2efb717 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-08-01/Operation_List.json + * x-ms-original-file: 2026-07-02-preview/Operation_List.json */ /** * Sample code: List available operations for the container service resource provider. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java index 5843c80a3706..ad2b11ce7c55 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: 2026-07-02-preview/PrivateEndpointConnectionsDelete.json */ /** * Sample code: Delete Private Endpoint Connection. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java index 8aa82471cfe5..55ce63355cf2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: 2026-08-01/PrivateEndpointConnectionsGet.json + * x-ms-original-file: 2026-07-02-preview/PrivateEndpointConnectionsGet.json */ /** * Sample code: Get Private Endpoint Connection. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java index c2d40ed818d5..162ffad9b5b5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: 2026-08-01/PrivateEndpointConnectionsList.json + * x-ms-original-file: 2026-07-02-preview/PrivateEndpointConnectionsList.json */ /** * Sample code: List Private Endpoint Connections by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java index 6a91665f97c8..217d1375373f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: 2026-08-01/PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: 2026-07-02-preview/PrivateEndpointConnectionsUpdate.json */ /** * Sample code: Update Private Endpoint Connection. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java index 729699084363..97bac2958d34 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: 2026-08-01/PrivateLinkResourcesList.json + * x-ms-original-file: 2026-07-02-preview/PrivateLinkResourcesList.json */ /** * Sample code: List Private Link Resources by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java index 0eca328e0b8a..7c19cd070ef5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java @@ -11,7 +11,7 @@ */ public final class ResolvePrivateLinkServiceIdPOSTSamples { /* - * x-ms-original-file: 2026-08-01/ResolvePrivateLinkServiceId.json + * x-ms-original-file: 2026-07-02-preview/ResolvePrivateLinkServiceId.json */ /** * Sample code: Resolve the Private Link Service ID for Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java index b84b93f419c7..865b2b360e8a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class SnapshotsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotsCreate.json + * x-ms-original-file: 2026-07-02-preview/SnapshotsCreate.json */ /** * Sample code: Create/Update Snapshot. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java index 29f54c2b982c..e5ee8ac8c7df 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotsDelete.json + * x-ms-original-file: 2026-07-02-preview/SnapshotsDelete.json */ /** * Sample code: Delete Snapshot. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java index 8ec00d74c300..1ec8ebedcbe8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotsGet.json + * x-ms-original-file: 2026-07-02-preview/SnapshotsGet.json */ /** * Sample code: Get Snapshot. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java index 06ec33705d88..c7386b473726 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotsListByResourceGroup.json + * x-ms-original-file: 2026-07-02-preview/SnapshotsListByResourceGroup.json */ /** * Sample code: List Snapshots by Resource Group. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java index 1d671ffe285f..d312678f76cb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsListSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotsList.json + * x-ms-original-file: 2026-07-02-preview/SnapshotsList.json */ /** * Sample code: List Snapshots. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java index ea29b4acc2b6..6ab0d4ba02b7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class SnapshotsUpdateTagsSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotsUpdateTags.json + * x-ms-original-file: 2026-07-02-preview/SnapshotsUpdateTags.json */ /** * Sample code: Update Snapshot Tags. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java index 28a4429d7a54..e9ca74b3c01f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class TrustedAccessRoleBindingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/TrustedAccessRoleBindings_CreateOrUpdate.json + * x-ms-original-file: 2026-07-02-preview/TrustedAccessRoleBindings_CreateOrUpdate.json */ /** * Sample code: Create or update a trusted access role binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java index 02cfcf5bfd71..8e62f0e26077 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class TrustedAccessRoleBindingsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/TrustedAccessRoleBindings_Delete.json + * x-ms-original-file: 2026-07-02-preview/TrustedAccessRoleBindings_Delete.json */ /** * Sample code: Delete a trusted access role binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java index 37ec3625c5a7..98065d4c8ba0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java @@ -9,7 +9,7 @@ */ public final class TrustedAccessRoleBindingsGetSamples { /* - * x-ms-original-file: 2026-08-01/TrustedAccessRoleBindings_Get.json + * x-ms-original-file: 2026-07-02-preview/TrustedAccessRoleBindings_Get.json */ /** * Sample code: Get a trusted access role binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java index 69bb8e5e04ea..855e9c845ab1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java @@ -9,7 +9,7 @@ */ public final class TrustedAccessRoleBindingsListSamples { /* - * x-ms-original-file: 2026-08-01/TrustedAccessRoleBindings_List.json + * x-ms-original-file: 2026-07-02-preview/TrustedAccessRoleBindings_List.json */ /** * Sample code: List trusted access role bindings. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java index 41100be73cd6..97680ec7bf85 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java @@ -9,7 +9,7 @@ */ public final class TrustedAccessRolesListSamples { /* - * x-ms-original-file: 2026-08-01/TrustedAccessRoles_List.json + * x-ms-original-file: 2026-07-02-preview/TrustedAccessRoles_List.json */ /** * Sample code: List trusted access roles. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/VmSkusListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/VmSkusListSamples.java new file mode 100644 index 000000000000..fba85ce71f23 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/VmSkusListSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for VmSkus List. + */ +public final class VmSkusListSamples { + /* + * x-ms-original-file: 2026-07-02-preview/ListAvailableContainerServiceVmSkusWithExtendedLocations.json + */ + /** + * Sample code: Lists all available Container Service VM SKUs with Extended Location information. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listsAllAvailableContainerServiceVMSKUsWithExtendedLocationInformation( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getVmSkus().list("westus", true, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-07-02-preview/ListAvailableContainerServiceVmSkus.json + */ + /** + * Sample code: Lists all available Container Service VM SKUs for a location. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listsAllAvailableContainerServiceVMSKUsForALocation( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getVmSkus().list("westus", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml index 4cfb56cc1502..3e8e2448c048 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerservice/resource-manager/Microsoft.ContainerService/aks -commit: ebc13f67950a95e50c6828c27dd979e8608c0329 +commit: d37ddd51cd701836f44d95fe2856453b636778da repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/core/azure-core-experimental/pom.xml b/sdk/core/azure-core-experimental/pom.xml index 667da00c5659..a47a0a085b76 100644 --- a/sdk/core/azure-core-experimental/pom.xml +++ b/sdk/core/azure-core-experimental/pom.xml @@ -100,7 +100,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/core/azure-core-http-jdk-httpclient/pom.xml b/sdk/core/azure-core-http-jdk-httpclient/pom.xml index 757c90e4bc21..1315ec0a5e85 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/pom.xml +++ b/sdk/core/azure-core-http-jdk-httpclient/pom.xml @@ -89,7 +89,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test @@ -201,7 +201,6 @@ 11 - ${skipTestCompile} diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientBuilderTests.java b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientBuilderTests.java index 93a85fea1b91..a13e7b4e45e6 100644 --- a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientBuilderTests.java +++ b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkHttpClientBuilderTests.java @@ -147,10 +147,11 @@ public void buildWithHttpProxy() { @Test public void buildWithHttpProxyFromEnvConfiguration() { - Configuration configuration = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, new TestConfigurationSource() - .put(Configuration.PROPERTY_HTTP_PROXY, "http://" + PROXY_USER_INFO + "localhost:" + PROXY_SERVER_HTTP_PORT) - .put(Configuration.PROPERTY_HTTPS_PROXY, "") - .put("java.net.useSystemProxies", "true")).build(); + Configuration configuration = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, + new TestConfigurationSource() + .put(Configuration.PROPERTY_HTTP_PROXY, + "http://" + PROXY_USER_INFO + "localhost:" + PROXY_SERVER_HTTP_PORT) + .put("java.net.useSystemProxies", "true")).build(); configurationProxyTest(configuration); } @@ -192,7 +193,6 @@ private static Stream buildWithExplicitConfigurationProxySupplier() { final Configuration envConfiguration = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://localhost:8888") - .put(Configuration.PROPERTY_HTTPS_PROXY, "") .put(Configuration.PROPERTY_NO_PROXY, "localhost")).build(); arguments.add(Arguments.of(envConfiguration)); diff --git a/sdk/core/azure-core-http-netty/CHANGELOG.md b/sdk/core/azure-core-http-netty/CHANGELOG.md index 49f9a783fbaf..147e24463451 100644 --- a/sdk/core/azure-core-http-netty/CHANGELOG.md +++ b/sdk/core/azure-core-http-netty/CHANGELOG.md @@ -3,24 +3,13 @@ ## 1.17.0-beta.1 (Unreleased) ### Features Added -- Added opt-in observation of the `Expect: 100-continue` handshake. When a caller places an `AtomicBoolean` in the - request `Context` under the key `azure-http-client-expect-continue-received`, the client sets it to `true` if the - service answers with an interim `100 Continue` response. This does not change how or when the request body is sent. ### Breaking Changes ### Bugs Fixed -- Preserved asynchronous file downloads when Netty uses scoped direct buffers on newer JDKs. -- Declared the Netty transport dependency directly to prevent older transitive transports from being selected. - ### Other Changes -#### Dependency Updates - -- Migrated Netty dependencies from `4.1.137.Final` to `4.2.19.Final`. -- Upgraded Reactor Netty from `1.2.18` to `1.3.7` and Reactor from `3.7.19` to `3.8.7`. - ## 1.16.8 (2026-09-29) ### Other Changes diff --git a/sdk/core/azure-core-http-netty/README.md b/sdk/core/azure-core-http-netty/README.md index 0489ce5573be..bb7dcfcce92e 100644 --- a/sdk/core/azure-core-http-netty/README.md +++ b/sdk/core/azure-core-http-netty/README.md @@ -55,47 +55,6 @@ add the direct dependency to your project as follows. ## Key concepts -### Netty 4.2 compatibility - -Starting with `1.17.0-beta.1`, this library uses Netty `4.2.19.Final`, Reactor Netty `1.3.7`, and Reactor `3.8.7`. -Netty 4.1 and 4.2 must not be mixed on the classpath. If your application or framework manages these dependencies, -align the entire Netty and Reactor stack when upgrading. Java 8 remains supported. - -Netty 4.2 enables TLS hostname verification by default and changes its default buffer allocator to the adaptive allocator. -This library retains pooled allocation unless the application explicitly configures an allocator. -See the [Netty 4.2 migration guide](https://netty.io/wiki/netty-4.2-migration-guide.html#recommended-upgrade-process) -for application-level migration guidance. - -### Native transports on the module path - -On JDK 11 or later, Netty 4.2 packages the epoll/kqueue classes and their platform-specific JNI libraries -as **separate explicit Java modules**. Having the JARs on the module path does not resolve either module -automatically. A named-module application that wants native transport must include the matching -`netty-transport-native-epoll` or `netty-transport-native-kqueue` classifier JAR (which brings in its -`netty-transport-classes-*` JAR) and add **both** modules as launch roots: - -| Platform and classifier | Launch option | -| --- | --- | -| Linux x86_64 (`netty-transport-native-epoll:linux-x86_64`) | `--add-modules=io.netty.transport.classes.epoll,io.netty.transport.epoll.linux.x86_64` | -| macOS x86_64 (`netty-transport-native-kqueue:osx-x86_64`) | `--add-modules=io.netty.transport.classes.kqueue,io.netty.transport.kqueue.osx.x86_64` | - -For example, with the Linux classifier JAR and its dependencies on the module path: - -```text -java --module-path "path-to-application-and-dependency-JARs" --add-modules=io.netty.transport.classes.epoll,io.netty.transport.epoll.linux.x86_64 -m my.app/com.example.Main -``` - -This library declares the x86_64 classifier dependencies, but applications using another architecture -must supply the corresponding native classifier and resolve its module instead. Check that JAR's -module name with `jar --describe-module --file --release 11`; see -[Netty's native transport guide](https://netty.io/wiki/native-transports.html#using-the-native-transports) -for classifier details. Resolving only the classes -leaves the bundled JNI library invisible to Netty; `requires static` in a library descriptor does not -resolve either optional module at run time. If native transport is unavailable, Reactor Netty uses -JDK NIO. These launch options do not apply to Java 8 or to applications using the classpath rather -than the module path, and resolving the modules alone does not guarantee native transport is usable -on the current OS. - ## Examples The following sections provide several code snippets covering some of the most common client configuration scenarios. @@ -261,3 +220,5 @@ For details on contributing to this repository, see the [contributing guide](htt [logging]: https://learn.microsoft.com/azure/developer/java/sdk/logging-overview [jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable [java8_client_compatibility]: https://learn.microsoft.com/azure/security/fundamentals/azure-ca-details?tabs=root-and-subordinate-cas-list#client-compatibility-for-public-pkis + + diff --git a/sdk/core/azure-core-http-netty/cgmanifest.json b/sdk/core/azure-core-http-netty/cgmanifest.json index 0f3d3948a2dd..dd6d6dd04339 100644 --- a/sdk/core/azure-core-http-netty/cgmanifest.json +++ b/sdk/core/azure-core-http-netty/cgmanifest.json @@ -9,7 +9,7 @@ "maven": { "groupId": "io.netty", "artifactId": "netty-handler-proxy", - "version": "4.2.19.Final" + "version": "4.1.110.Final" } } } diff --git a/sdk/core/azure-core-http-netty/pom.xml b/sdk/core/azure-core-http-netty/pom.xml index 1b4a40118e82..5e71c171f2f0 100644 --- a/sdk/core/azure-core-http-netty/pom.xml +++ b/sdk/core/azure-core-http-netty/pom.xml @@ -64,7 +64,7 @@ false false - 4.2.19.Final + 4.1.138.Final 2.0.84.Final @@ -85,70 +85,49 @@ io.netty netty-handler - 4.2.19.Final + 4.1.138.Final io.netty netty-handler-proxy - 4.2.19.Final + 4.1.138.Final io.netty netty-buffer - 4.2.19.Final + 4.1.138.Final io.netty - netty-transport - 4.2.19.Final - - - io.netty - netty-codec-base - 4.2.19.Final + netty-codec + 4.1.138.Final io.netty netty-codec-http - 4.2.19.Final + 4.1.138.Final io.netty netty-codec-http2 - 4.2.19.Final - - - io.netty - netty-codec-http3 - 4.2.19.Final - - - io.netty - netty-resolver-dns - 4.2.19.Final - - - io.netty - netty-resolver-dns-native-macos - 4.2.19.Final - osx-x86_64 + 4.1.138.Final io.netty netty-transport-native-unix-common - 4.2.19.Final + 4.1.138.Final io.netty netty-transport-native-epoll - 4.2.19.Final + 4.1.138.Final linux-x86_64 io.netty netty-transport-native-kqueue - 4.2.19.Final + 4.1.138.Final osx-x86_64 @@ -162,13 +141,13 @@ io.projectreactor.netty reactor-netty-http - 1.3.7 + 1.2.18 io.netty netty-common - 4.2.19.Final + 4.1.138.Final @@ -182,7 +161,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test @@ -230,21 +209,17 @@ io.netty:netty-tcnative-boringssl-static:[2.0.84.Final] - io.projectreactor.netty:reactor-netty-http:[1.3.7] - io.netty:netty-buffer:[4.2.19.Final] - io.netty:netty-transport:[4.2.19.Final] - io.netty:netty-common:[4.2.19.Final] - io.netty:netty-codec-base:[4.2.19.Final] - io.netty:netty-codec-http:[4.2.19.Final] - io.netty:netty-codec-http2:[4.2.19.Final] - io.netty:netty-codec-http3:[4.2.19.Final] - io.netty:netty-handler:[4.2.19.Final] - io.netty:netty-handler-proxy:[4.2.19.Final] - io.netty:netty-resolver-dns:[4.2.19.Final] - io.netty:netty-resolver-dns-native-macos:[4.2.19.Final] - io.netty:netty-transport-native-unix-common:[4.2.19.Final] - io.netty:netty-transport-native-epoll:[4.2.19.Final] - io.netty:netty-transport-native-kqueue:[4.2.19.Final] + io.projectreactor.netty:reactor-netty-http:[1.2.18] + io.netty:netty-buffer:[4.1.138.Final] + io.netty:netty-common:[4.1.138.Final] + io.netty:netty-codec:[4.1.138.Final] + io.netty:netty-codec-http:[4.1.138.Final] + io.netty:netty-codec-http2:[4.1.138.Final] + io.netty:netty-handler:[4.1.138.Final] + io.netty:netty-handler-proxy:[4.1.138.Final] + io.netty:netty-transport-native-unix-common:[4.1.138.Final] + io.netty:netty-transport-native-epoll:[4.1.138.Final] + io.netty:netty-transport-native-kqueue:[4.1.138.Final] diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClient.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClient.java index 1da95d2e41fa..a6a085fd4058 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClient.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClient.java @@ -52,7 +52,6 @@ import java.nio.file.StandardOpenOption; import java.time.Duration; import java.util.Objects; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.BiFunction; /** @@ -96,12 +95,6 @@ class NettyAsyncHttpClient implements HttpClient { private static final ClientLogger LOGGER = new ClientLogger(NettyAsyncHttpClient.class); private static final byte[] EMPTY_BYTES = new byte[0]; - // Context key under which a caller may place an AtomicBoolean that this client sets to true when an interim - // "100 Continue" response is observed for the request. This is an opt-in contract usable by any caller that wants - // to learn whether the service engaged in the "Expect: 100-continue" handshake: the caller places a holder under - // this key before sending and reads it afterward. Callers must use this same key string. - private static final String EXPECT_CONTINUE_RECEIVED_KEY = "azure-http-client-expect-continue-received"; - final boolean disableBufferCopy; final boolean addProxyHandler; final reactor.netty.http.client.HttpClient nettyClient; @@ -143,18 +136,14 @@ public Mono send(HttpRequest request, Context context) { .map(timeoutDuration -> ((Duration) timeoutDuration).toMillis()) .orElse(null); ProgressReporter progressReporter = Contexts.with(context).getHttpRequestProgressReporter(); - AtomicBoolean expectContinueReceived = context.getData(EXPECT_CONTINUE_RECEIVED_KEY) - .filter(AtomicBoolean.class::isInstance) - .map(AtomicBoolean.class::cast) - .orElse(null); return attemptAsync(request, eagerlyReadResponse, ignoreResponseBody, headersEagerlyConverted, responseTimeout, - progressReporter, expectContinueReceived, false); + progressReporter, false); } private Mono attemptAsync(HttpRequest request, boolean eagerlyReadResponse, boolean ignoreResponseBody, boolean headersEagerlyConverted, Long responseTimeout, - ProgressReporter progressReporter, AtomicBoolean expectContinueReceived, boolean proxyRetry) { + ProgressReporter progressReporter, boolean proxyRetry) { Flux> nettyRequest = nettyClient.request(toReactorNettyHttpMethod(request.getHttpMethod())) .uri(request.getUrl().toString()) @@ -162,11 +151,9 @@ private Mono attemptAsync(HttpRequest request, boolean eagerlyRead .responseConnection(responseDelegate(request, disableBufferCopy, eagerlyReadResponse, ignoreResponseBody, headersEagerlyConverted)); - // Attach the per-request context only when something needs it: a response-timeout override, a progress - // reporter, or a holder to record whether an interim "100 Continue" response was observed. - if (responseTimeout != null || progressReporter != null || expectContinueReceived != null) { + if (responseTimeout != null || progressReporter != null) { nettyRequest = nettyRequest.contextWrite(ctx -> ctx.put(AzureNettyHttpClientContext.KEY, - new AzureNettyHttpClientContext(responseTimeout, progressReporter, expectContinueReceived))); + new AzureNettyHttpClientContext(responseTimeout, progressReporter))); } return nettyRequest.single().flatMap(responseAndHeaders -> { @@ -179,7 +166,7 @@ private Mono attemptAsync(HttpRequest request, boolean eagerlyRead } else { // Retry the request. return attemptAsync(request, eagerlyReadResponse, ignoreResponseBody, headersEagerlyConverted, - responseTimeout, progressReporter, expectContinueReceived, true); + responseTimeout, progressReporter, true); } } else { return Mono.just(response); @@ -187,7 +174,7 @@ private Mono attemptAsync(HttpRequest request, boolean eagerlyRead }) .onErrorResume(throwable -> shouldRetryProxyError(proxyRetry, throwable) ? attemptAsync(request, eagerlyReadResponse, ignoreResponseBody, headersEagerlyConverted, - responseTimeout, progressReporter, expectContinueReceived, true) + responseTimeout, progressReporter, true) : Mono.error(throwable)); } diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java index 2909fb0cd292..1ee286d12e3a 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java @@ -16,13 +16,12 @@ import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.handler.logging.LoggingHandler; import io.netty.resolver.DefaultAddressResolverGroup; import io.netty.resolver.NoopAddressResolverGroup; -import io.netty.util.internal.SystemPropertyUtil; import reactor.netty.Connection; import reactor.netty.NettyPipeline; import reactor.netty.http.HttpDecoderSpec; @@ -152,7 +151,7 @@ public NettyAsyncHttpClientBuilder() { * .wiretap(TcpClient.class.getName(), LogLevel.INFO); * // Create an HttpClient based on above reactor-netty client and configure EventLoop count. * HttpClient client = new NettyAsyncHttpClientBuilder(baseHttpClient) - * .eventLoopGroup(new MultiThreadIoEventLoopGroup(5, NioIoHandler.newFactory())) + * .eventLoopGroup(new NioEventLoopGroup(5)) * .build(); * * @@ -203,16 +202,6 @@ public com.azure.core.http.HttpClient build() { nettyHttpClient = HttpClient.create(); } - // Keep the pooled default while respecting allocator choices made by the application. - if (!nettyHttpClient.configuration().options().containsKey(ChannelOption.ALLOCATOR) - && !SystemPropertyUtil.contains("io.netty.allocator.type")) { - // If ChannelOptions and io.netty.allocator.type wasn't configured with an allocator fallback to the default - // setting from Netty 4.1 which was the pooled allocator. Otherwise, respect the configuration, be it - // ChannelOptions or io.netty.allocator.type. In the future, this should be validated for if this should use - // the new Netty 4.2 default which is an adaptive allocator. - nettyHttpClient = nettyHttpClient.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); - } - // If a resolver hasn't been set, set the default one. if (nettyHttpClient.configuration().resolver() == null) { nettyHttpClient = nettyHttpClient.resolver(DefaultAddressResolverGroup.INSTANCE); @@ -396,12 +385,12 @@ public NettyAsyncHttpClientBuilder port(int port) { /** * Sets the NIO event loop group that will be used to run IO loops. * - * @param nioEventLoopGroup The {@link io.netty.channel.nio.NioEventLoopGroup} that will run IO loops. + * @param nioEventLoopGroup The {@link NioEventLoopGroup} that will run IO loops. * @return the updated NettyAsyncHttpClientBuilder object. * @deprecated deprecated in favor of {@link #eventLoopGroup(EventLoopGroup)}. */ @Deprecated - public NettyAsyncHttpClientBuilder nioEventLoopGroup(io.netty.channel.nio.NioEventLoopGroup nioEventLoopGroup) { + public NettyAsyncHttpClientBuilder nioEventLoopGroup(NioEventLoopGroup nioEventLoopGroup) { this.eventLoopGroup = nioEventLoopGroup; return this; } @@ -415,7 +404,7 @@ public NettyAsyncHttpClientBuilder nioEventLoopGroup(io.netty.channel.nio.NioEve *
            * int threadCount = 5;
            * HttpClient client = new NettyAsyncHttpClientBuilder()
      -     *     .eventLoopGroup(new MultiThreadIoEventLoopGroup(threadCount, NioIoHandler.newFactory()))
      +     *     .eventLoopGroup(new NioEventLoopGroup(threadCount))
            *     .build();
            * 
      * diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/AzureNettyHttpClientContext.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/AzureNettyHttpClientContext.java index 257444796faf..711aa3956672 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/AzureNettyHttpClientContext.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/AzureNettyHttpClientContext.java @@ -5,8 +5,6 @@ import com.azure.core.util.ProgressReporter; -import java.util.concurrent.atomic.AtomicBoolean; - /** * A holder for all context that may be passed through the Netty HttpClient. */ @@ -15,24 +13,15 @@ public final class AzureNettyHttpClientContext { private final Long responseTimeoutOverride; private final ProgressReporter progressReporter; - // Optional caller-provided holder, set to true when an interim "100 Continue" response is observed for the - // request. The holder is placed in the request Context by a caller (for example a pipeline policy) that wants to - // observe the "Expect: 100-continue" handshake. May be null. - private final AtomicBoolean expectContinueReceivedHolder; - /** * Creates an instance of AzureNettyHttpClientContext. * * @param responseTimeoutOverride The response timeout override. * @param progressReporter The progress reporter. - * @param expectContinueReceivedHolder Optional caller-provided holder set to {@code true} when a - * {@code 100 Continue} response is observed. May be null. */ - public AzureNettyHttpClientContext(Long responseTimeoutOverride, ProgressReporter progressReporter, - AtomicBoolean expectContinueReceivedHolder) { + public AzureNettyHttpClientContext(Long responseTimeoutOverride, ProgressReporter progressReporter) { this.responseTimeoutOverride = responseTimeoutOverride; this.progressReporter = progressReporter; - this.expectContinueReceivedHolder = expectContinueReceivedHolder; } /** @@ -52,14 +41,4 @@ public Long getResponseTimeoutOverride() { public ProgressReporter getProgressReporter() { return progressReporter; } - - /** - * Gets the optional holder that is set to {@code true} when an interim {@code 100 Continue} response is observed - * for this request. May be null. - * - * @return The holder, or null if the caller did not supply one. - */ - public AtomicBoolean getExpectContinueReceivedHolder() { - return expectContinueReceivedHolder; - } } diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/AzureSdkHandler.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/AzureSdkHandler.java index 9286d34614a1..f4600bc5fbc4 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/AzureSdkHandler.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/AzureSdkHandler.java @@ -12,14 +12,11 @@ import io.netty.channel.ChannelOutboundBuffer; import io.netty.channel.ChannelPromise; import io.netty.channel.FileRegion; -import io.netty.handler.codec.http.HttpResponse; -import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.codec.http.LastHttpContent; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; /** * Class containing all ChannelHandler concepts that the Azure SDKs use. @@ -37,7 +34,6 @@ public final class AzureSdkHandler extends ChannelDuplexHandler { private final long writeTimeoutMillis; private final ProgressReporter progressReporter; - private final AtomicBoolean expectContinueReceivedHolder; private long lastWriteMillis; private long lastWriteProgress; private boolean writeTrackingStarted; @@ -69,7 +65,6 @@ public AzureSdkHandler(AzureNettyHttpClientContext context, long writeTimeoutMil long readTimeoutMillis) { this.writeTimeoutMillis = writeTimeoutMillis; this.progressReporter = (context != null) ? context.getProgressReporter() : null; - this.expectContinueReceivedHolder = (context != null) ? context.getExpectContinueReceivedHolder() : null; this.responseTimeoutMillis = (context != null && context.getResponseTimeoutOverride() != null) ? context.getResponseTimeoutOverride() : responseTimeoutMillis; @@ -220,15 +215,6 @@ private void disposeResponseTimeoutWatcher() { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) { - // Observe the interim "100 Continue" response before it is consumed by Reactor Netty. This does not change - // how or when the request body is sent; it only records that the service engaged in the handshake so that - // calling code can see it. Scoped to the exact 100 status so final responses are never matched. - if (expectContinueReceivedHolder != null - && msg instanceof HttpResponse - && ((HttpResponse) msg).status().code() == HttpResponseStatus.CONTINUE.code()) { - expectContinueReceivedHolder.set(true); - } - if (responseTrackingStarted) { endResponseTracking(); startReadTracking(); diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/ByteBufWriteSubscriber.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/ByteBufWriteSubscriber.java index 4b4fb0b6c7ef..a827169f0e2b 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/ByteBufWriteSubscriber.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/ByteBufWriteSubscriber.java @@ -23,7 +23,6 @@ public class ByteBufWriteSubscriber implements Subscriber { private final MonoSink emitter; private final int bufferSize; private final ByteBuf buffer; - private final boolean useHeapBuffer; // This subscriber is effectively synchronous so there is no need for these fields to be volatile. private Subscription subscription; @@ -37,28 +36,12 @@ public class ByteBufWriteSubscriber implements Subscriber { * @param bodySize The size of the request body, if known. */ public ByteBufWriteSubscriber(ExceptionThrowingConsumer writer, MonoSink emitter, Long bodySize) { - this(writer, emitter, bodySize, false); - } - - /** - * Creates a new {@link ByteBufWriteSubscriber} with control over direct buffer writes. - * - * @param writer Where to write the {@link ByteBuf ByteBufs}. - * @param emitter {@link MonoSink} to emit completion or error signals. - * @param bodySize The size of the request body, if known. - * @param useHeapBuffer Whether to copy all writes through a bounded heap buffer. - */ - public ByteBufWriteSubscriber(ExceptionThrowingConsumer writer, MonoSink emitter, Long bodySize, - boolean useHeapBuffer) { this.writer = writer; this.emitter = emitter; - this.useHeapBuffer = useHeapBuffer; // Create a writing buffer that has a minimum bound of 8KB and a maximum bound of 64KB. // This is safe as the writer performs writes synchronously. this.bufferSize = (bodySize == null) ? 65536 : (int) Math.max(8192, Math.min(bodySize, 65536)); - this.buffer = useHeapBuffer - ? PooledByteBufAllocator.DEFAULT.heapBuffer(bufferSize) - : PooledByteBufAllocator.DEFAULT.buffer(bufferSize); + this.buffer = PooledByteBufAllocator.DEFAULT.buffer(bufferSize); } @Override @@ -86,25 +69,11 @@ public void onNext(ByteBuf bytes) { return; } - if (useHeapBuffer) { - while (bytes.isReadable()) { - buffer.writeBytes(bytes, Math.min(bytes.readableBytes(), buffer.writableBytes())); - if (!buffer.isWritable()) { - write(buffer); - if (done) { - return; - } - buffer.clear(); - } - } - } else if (bytes.readableBytes() > bufferSize) { + if (bytes.readableBytes() > bufferSize) { // If the next ByteBuf is larger than the buffer write the buffer, if there is any data to write, then // write the passed ByteBuf without buffering. if (buffer.readableBytes() > 0) { write(buffer); - if (done) { - return; - } buffer.clear(); } @@ -115,9 +84,6 @@ public void onNext(ByteBuf bytes) { } else { // If the next ByteBuf can't fit in the buffer write the buffer then buffer the passed ByteBuf. write(buffer); - if (done) { - return; - } buffer.clear(); buffer.writeBytes(bytes); } diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyAsyncHttpResponse.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyAsyncHttpResponse.java index 080aec218ac0..0634e1524126 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyAsyncHttpResponse.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyAsyncHttpResponse.java @@ -80,9 +80,9 @@ public Mono getBodyAsInputStream() { @Override public Mono writeBodyToAsync(AsynchronousByteChannel channel) { Long length = getContentLength(); - // Asynchronous file channels cannot accept scoped direct buffers allocated by Netty on newer JDKs. - return Mono.using(() -> this, response -> Mono.create(sink -> response.bodyIntern() - .subscribe(new ByteBufWriteSubscriber(byteBuffer -> channel.write(byteBuffer).get(), sink, length, true))), + return Mono.using(() -> this, + response -> Mono.create(sink -> response.bodyIntern() + .subscribe(new ByteBufWriteSubscriber(byteBuffer -> channel.write(byteBuffer).get(), sink, length))), NettyAsyncHttpResponse::close); } diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyUtility.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyUtility.java index 233bca94b296..a0eba784b12f 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyUtility.java +++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyUtility.java @@ -36,10 +36,8 @@ public final class NettyUtility { // List of Netty artifacts that should match the 'netty.version' property in the pom.xml file. // Non-native dependencies are required while native dependencies are optional. Without the native dependencies // the SDK will fall back to using the JDK implementations. - private static final List REQUIRED_NETTY_VERSION_ARTIFACTS - = Arrays.asList("netty-common", "netty-handler", "netty-handler-proxy", "netty-buffer", "netty-codec-base", - "netty-codec-compression", "netty-codec-dns", "netty-codec-http", "netty-codec-http2", "netty-codec-socks", - "netty-resolver", "netty-resolver-dns", "netty-transport"); + private static final List REQUIRED_NETTY_VERSION_ARTIFACTS = Arrays.asList("netty-common", "netty-handler", + "netty-handler-proxy", "netty-buffer", "netty-codec", "netty-codec-http", "netty-codec-http2"); private static final List OPTIONAL_NETTY_VERSION_ARTIFACTS = Arrays .asList("netty-transport-native-unix-common", "netty-transport-native-epoll", "netty-transport-native-kqueue"); diff --git a/sdk/core/azure-core-http-netty/src/main/java/module-info.java b/sdk/core/azure-core-http-netty/src/main/java/module-info.java index 4ac1c23b8ae0..30d30814abe4 100644 --- a/sdk/core/azure-core-http-netty/src/main/java/module-info.java +++ b/sdk/core/azure-core-http-netty/src/main/java/module-info.java @@ -5,14 +5,11 @@ requires transitive com.azure.core; requires io.netty.buffer; requires io.netty.codec; - requires io.netty.codec.compression; requires io.netty.codec.http; - requires io.netty.codec.http2; requires io.netty.common; requires io.netty.handler; requires io.netty.handler.proxy; requires io.netty.resolver; - requires io.netty.resolver.dns; requires io.netty.transport; requires reactor.netty.core; requires reactor.netty.http; diff --git a/sdk/core/azure-core-http-netty/src/main/resources/META-INF/native-image/com.azure/azure-core-http-netty/native-image.properties b/sdk/core/azure-core-http-netty/src/main/resources/META-INF/native-image/com.azure/azure-core-http-netty/native-image.properties index 86c33a53652f..58d7ea86ca25 100644 --- a/sdk/core/azure-core-http-netty/src/main/resources/META-INF/native-image/com.azure/azure-core-http-netty/native-image.properties +++ b/sdk/core/azure-core-http-netty/src/main/resources/META-INF/native-image/com.azure/azure-core-http-netty/native-image.properties @@ -12,6 +12,7 @@ Args=\ io.netty.channel.epoll.Native,\ io.netty.channel.kqueue.KQueue,\ io.netty.channel.kqueue.KQueueEventArray,\ + io.netty.channel.kqueue.KQueueEventLoop,\ io.netty.channel.kqueue.Native,\ io.netty.channel.unix.Errors,\ io.netty.channel.unix.IovArray,\ @@ -23,6 +24,10 @@ Args=\ io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder,\ io.netty.handler.ssl.BouncyCastleAlpnSslUtils,\ io.netty.handler.ssl.ConscryptAlpnSslEngine,\ + io.netty.handler.ssl.JdkNpnApplicationProtocolNegotiator,\ + io.netty.handler.ssl.JettyAlpnSslEngine$ClientEngine,\ + io.netty.handler.ssl.JettyAlpnSslEngine$ServerEngine,\ + io.netty.handler.ssl.JettyNpnSslEngine,\ io.netty.handler.ssl.OpenSsl,\ io.netty.handler.ssl.OpenSslAsyncPrivateKeyMethod,\ io.netty.handler.ssl.OpenSslPrivateKeyMethod,\ @@ -39,3 +44,4 @@ Args=\ io.netty.internal.tcnative.SSLPrivateKeyMethod,\ io.netty.util.AbstractReferenceCounted,\ io.netty.util.internal.logging.Log4JLogger + diff --git a/sdk/core/azure-core-http-netty/src/samples/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderJavaDocCodeSnippets.java b/sdk/core/azure-core-http-netty/src/samples/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderJavaDocCodeSnippets.java index 0d60c8e6b6f2..348e8b1b20f8 100644 --- a/sdk/core/azure-core-http-netty/src/samples/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderJavaDocCodeSnippets.java +++ b/sdk/core/azure-core-http-netty/src/samples/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderJavaDocCodeSnippets.java @@ -7,8 +7,7 @@ import com.azure.core.http.HttpMethod; import com.azure.core.http.HttpRequest; import com.azure.core.http.ProxyOptions; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.handler.logging.LogLevel; import reactor.netty.resources.ConnectionProvider; import reactor.netty.tcp.TcpClient; @@ -40,7 +39,7 @@ public void fixedThreadPoolSample() { // BEGIN: com.azure.core.http.netty.NettyAsyncHttpClientBuilder#eventLoopGroup int threadCount = 5; HttpClient client = new NettyAsyncHttpClientBuilder() - .eventLoopGroup(new MultiThreadIoEventLoopGroup(threadCount, NioIoHandler.newFactory())) + .eventLoopGroup(new NioEventLoopGroup(threadCount)) .build(); // END: com.azure.core.http.netty.NettyAsyncHttpClientBuilder#eventLoopGroup } @@ -88,7 +87,7 @@ public void fromExistingReactorNettyClient() { .wiretap(TcpClient.class.getName(), LogLevel.INFO); // Create an HttpClient based on above reactor-netty client and configure EventLoop count. HttpClient client = new NettyAsyncHttpClientBuilder(baseHttpClient) - .eventLoopGroup(new MultiThreadIoEventLoopGroup(5, NioIoHandler.newFactory())) + .eventLoopGroup(new NioEventLoopGroup(5)) .build(); // END: com.azure.core.http.netty.from-existing-http-client } diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderTests.java index e93d31a8978c..c6a4f68e1b0e 100644 --- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderTests.java +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilderTests.java @@ -11,23 +11,17 @@ import com.azure.core.util.Configuration; import com.azure.core.util.ConfigurationBuilder; import com.azure.core.util.ConfigurationSource; -import io.netty.buffer.ByteBufAllocator; -import io.netty.buffer.PooledByteBufAllocator; -import io.netty.buffer.UnpooledByteBufAllocator; import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelOption; import io.netty.channel.ChannelPromise; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.SingleThreadIoEventLoop; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoop; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.handler.codec.http.cookie.DefaultCookie; import io.netty.handler.logging.LoggingHandler; import io.netty.handler.proxy.HttpProxyHandler; import io.netty.handler.proxy.ProxyHandler; import io.netty.handler.proxy.Socks4ProxyHandler; import io.netty.handler.proxy.Socks5ProxyHandler; -import io.netty.util.internal.SystemPropertyUtil; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; @@ -58,7 +52,6 @@ import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -111,24 +104,6 @@ public void startingWithNullClientThrows() { assertThrows(NullPointerException.class, () -> new NettyAsyncHttpClientBuilder(null)); } - @Test - public void defaultAllocatorRespectsSystemProperty() { - NettyAsyncHttpClient client = (NettyAsyncHttpClient) new NettyAsyncHttpClientBuilder().build(); - ByteBufAllocator expectedAllocator = SystemPropertyUtil.contains("io.netty.allocator.type") - ? ByteBufAllocator.DEFAULT - : PooledByteBufAllocator.DEFAULT; - Object configuredAllocator = client.nettyClient.configuration().options().get(ChannelOption.ALLOCATOR); - assertSame(expectedAllocator, configuredAllocator == null ? ByteBufAllocator.DEFAULT : configuredAllocator); - } - - @Test - public void preconfiguredAllocatorIsMaintained() { - HttpClient baseClient = HttpClient.create().option(ChannelOption.ALLOCATOR, UnpooledByteBufAllocator.DEFAULT); - NettyAsyncHttpClient client = (NettyAsyncHttpClient) new NettyAsyncHttpClientBuilder(baseClient).build(); - assertSame(UnpooledByteBufAllocator.DEFAULT, - client.nettyClient.configuration().options().get(ChannelOption.ALLOCATOR)); - } - /** * Tests that creating a client with a {@link ConnectionProvider} will use it to create connections to a server. */ @@ -290,8 +265,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { Configuration simpleEnvProxy = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://localhost:12345") - .put(Configuration.PROPERTY_HTTPS_PROXY, "") - .put(Configuration.PROPERTY_NO_PROXY, "") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")).build(); arguments.add(Arguments.of(true, false, simpleEnvProxy, DEFAULT_URL)); @@ -306,8 +279,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { Configuration envProxyWithAuthentication = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://1:1@localhost:12345") - .put(Configuration.PROPERTY_HTTPS_PROXY, "") - .put(Configuration.PROPERTY_NO_PROXY, "") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")).build(); arguments.add(Arguments.of(true, true, envProxyWithAuthentication, DEFAULT_URL)); @@ -333,7 +304,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { = () -> baseJavaProxyConfigurationSupplier.get().put(JAVA_NON_PROXY_HOSTS, rawJavaNonProxyHosts); Supplier envNonProxyHostsSupplier = () -> new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://localhost:12345") - .put(Configuration.PROPERTY_HTTPS_PROXY, "") .put(Configuration.PROPERTY_NO_PROXY, rawEnvNonProxyHosts) .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"); @@ -361,7 +331,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { = () -> javaNonProxyHostsSupplier.get().put(JAVA_HTTP_PROXY_USER, "1").put(JAVA_HTTP_PROXY_PASSWORD, "1"); Supplier authenticatedEnvNonProxyHostsSupplier = () -> new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://1:1@localhost:12345") - .put(Configuration.PROPERTY_HTTPS_PROXY, "") .put(Configuration.PROPERTY_NO_PROXY, rawEnvNonProxyHosts) .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"); @@ -555,26 +524,22 @@ public void buildPortClient() { public void buildEventLoopClient() { String expectedThreadName = "testEventLoop"; HttpClient validatorClient = HttpClient.create().doAfterResponseSuccess((response, connection) -> { - SingleThreadIoEventLoop eventLoop = (SingleThreadIoEventLoop) connection.channel().eventLoop(); + // Validate that the EventLoop being used is a NioEventLoop. + NioEventLoop eventLoop = (NioEventLoop) connection.channel().eventLoop(); assertNotNull(eventLoop); assertEquals(expectedThreadName, eventLoop.threadProperties().name()); }); - MultiThreadIoEventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(1, - (Runnable r) -> new Thread(r, expectedThreadName), NioIoHandler.newFactory()); + NioEventLoopGroup eventLoopGroup = new NioEventLoopGroup(1, (Runnable r) -> new Thread(r, expectedThreadName)); - try { - NettyAsyncHttpClient nettyClient - = (NettyAsyncHttpClient) new NettyAsyncHttpClientBuilder(validatorClient).eventLoopGroup(eventLoopGroup) - .build(); + NettyAsyncHttpClient nettyClient + = (NettyAsyncHttpClient) new NettyAsyncHttpClientBuilder(validatorClient).eventLoopGroup(eventLoopGroup) + .build(); - StepVerifier.create(nettyClient.send(new HttpRequest(HttpMethod.GET, DEFAULT_URL))) - .assertNext(response -> assertEquals(200, response.getStatusCode())) - .verifyComplete(); - } finally { - eventLoopGroup.shutdownGracefully().syncUninterruptibly(); - } + StepVerifier.create(nettyClient.send(new HttpRequest(HttpMethod.GET, DEFAULT_URL))) + .assertNext(response -> assertEquals(200, response.getStatusCode())) + .verifyComplete(); } @ParameterizedTest diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyExpectContinueObservationTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyExpectContinueObservationTests.java deleted file mode 100644 index 9d0f375ccb75..000000000000 --- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyExpectContinueObservationTests.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.core.http.netty; - -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpMethod; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.util.Context; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.ServerSocket; -import java.net.Socket; -import java.net.URI; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.util.Locale; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * Verifies that the Netty client surfaces the observation of an interim {@code 100 Continue} response through an - * {@link AtomicBoolean} holder the caller places in the request {@link Context}. The holder is keyed by an opt-in - * string contract any caller may use; the Netty client sets it to {@code true} when the service sends the interim - * response. - */ -public class NettyExpectContinueObservationTests { - private static final byte[] BODY = new byte[1024]; - - @ParameterizedTest - @ValueSource(booleans = { true, false }) - public void interimContinueIsSurfacedThroughContextHolder(boolean sync) throws Exception { - try (ContinueTestServer server = new ContinueTestServer(true)) { - server.start(); - AtomicBoolean holder = sendWithHolder(server, sync); - assertTrue(server.awaitRequest(), "request never reached the server"); - assertTrue(holder.get(), "100 Continue was not surfaced through the context holder"); - } - } - - @ParameterizedTest - @ValueSource(booleans = { true, false }) - public void holderStaysFalseWhenServerSendsNoContinue(boolean sync) throws Exception { - try (ContinueTestServer server = new ContinueTestServer(false)) { - server.start(); - AtomicBoolean holder = sendWithHolder(server, sync); - assertTrue(server.awaitRequest(), "request never reached the server"); - assertFalse(holder.get(), "holder should stay false when no 100 Continue is sent"); - } - } - - // Must match the private key NettyAsyncHttpClient reads for the opt-in 100-continue observation contract. - private static final String EXPECT_CONTINUE_RECEIVED_KEY = "azure-http-client-expect-continue-received"; - - private static AtomicBoolean sendWithHolder(ContinueTestServer server, boolean sync) throws IOException { - HttpClient client = new NettyAsyncHttpClientBuilder().build(); - AtomicBoolean holder = new AtomicBoolean(false); - Context context = new Context(EXPECT_CONTINUE_RECEIVED_KEY, holder); - - HttpRequest request = new HttpRequest(HttpMethod.PUT, server.url()).setBody(BODY); - request.getHeaders().set(HttpHeaderName.EXPECT, "100-continue"); - - HttpResponse response = sync ? client.sendSync(request, context) : client.send(request, context).block(); - assertEquals(201, response.getStatusCode()); - response.close(); - return holder; - } - - /** - * Minimal HTTP/1.1 server that optionally answers the 100-continue handshake, then reads the body and returns 201. - */ - private static final class ContinueTestServer implements AutoCloseable { - private final ServerSocket serverSocket; - private final boolean sendContinue; - private final CountDownLatch requestHandled = new CountDownLatch(1); - private volatile Thread thread; - - ContinueTestServer(boolean sendContinue) throws IOException { - this.serverSocket = new ServerSocket(0); - this.sendContinue = sendContinue; - } - - URL url() throws IOException { - return URI.create("http://localhost:" + serverSocket.getLocalPort() + "/resource").toURL(); - } - - void start() { - thread = new Thread(this::serve, "continue-test-server"); - thread.setDaemon(true); - thread.start(); - } - - boolean awaitRequest() throws InterruptedException { - return requestHandled.await(30, TimeUnit.SECONDS); - } - - private void serve() { - try (Socket socket = serverSocket.accept()) { - socket.setTcpNoDelay(true); - InputStream in = socket.getInputStream(); - OutputStream out = socket.getOutputStream(); - - Parsed parsed = readHeaders(in); - - if (sendContinue && parsed.expectHeader != null) { - out.write("HTTP/1.1 100 Continue\r\n\r\n".getBytes(StandardCharsets.UTF_8)); - out.flush(); - } - - readBody(in, parsed.contentLength); - - out.write("HTTP/1.1 201 Created\r\nContent-Length: 0\r\n\r\n".getBytes(StandardCharsets.UTF_8)); - out.flush(); - } catch (IOException ex) { - // The test assertions report the failure. - } finally { - requestHandled.countDown(); - } - } - - private static Parsed readHeaders(InputStream in) throws IOException { - ByteArrayOutputStream headerBytes = new ByteArrayOutputStream(); - int consecutiveNewlines = 0; - int b; - while (consecutiveNewlines < 2 && (b = in.read()) != -1) { - headerBytes.write(b); - if (b == '\n') { - consecutiveNewlines++; - } else if (b != '\r') { - consecutiveNewlines = 0; - } - } - - Parsed parsed = new Parsed(); - for (String line : new String(headerBytes.toByteArray(), StandardCharsets.UTF_8).split("\r\n")) { - int colon = line.indexOf(':'); - if (colon < 0) { - continue; - } - String name = line.substring(0, colon).trim().toLowerCase(Locale.ROOT); - String value = line.substring(colon + 1).trim(); - if ("expect".equals(name)) { - parsed.expectHeader = value.toLowerCase(Locale.ROOT); - } else if ("content-length".equals(name)) { - parsed.contentLength = Integer.parseInt(value); - } - } - return parsed; - } - - private static void readBody(InputStream in, int remaining) throws IOException { - byte[] buffer = new byte[Math.max(remaining, 1)]; - int read = 0; - while (read < remaining) { - int count = in.read(buffer, 0, Math.min(buffer.length, remaining - read)); - if (count < 0) { - break; - } - read += count; - } - } - - @Override - public void close() throws IOException { - serverSocket.close(); - if (thread != null) { - thread.interrupt(); - } - } - - private static final class Parsed { - private String expectHeader; - private int contentLength; - } - } -} diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyNativeTransportModulesTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyNativeTransportModulesTests.java deleted file mode 100644 index 198b9d5bfc8e..000000000000 --- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/NettyNativeTransportModulesTests.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.core.http.netty; - -import io.netty.util.Version; -import org.junit.jupiter.api.Timeout; -import org.junit.jupiter.api.condition.EnabledForJreRange; -import org.junit.jupiter.api.condition.JRE; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; -import java.util.concurrent.TimeUnit; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * Verifies native module resolution without loading platform-specific JNI libraries. - */ -@EnabledForJreRange(min = JRE.JAVA_11) -public class NettyNativeTransportModulesTests { - private static final String EPOLL_CLASSES = "io.netty.transport.classes.epoll"; - private static final String EPOLL_NATIVE = "io.netty.transport.epoll.linux.x86_64"; - private static final String KQUEUE_CLASSES = "io.netty.transport.classes.kqueue"; - private static final String KQUEUE_NATIVE = "io.netty.transport.kqueue.osx.x86_64"; - - @ParameterizedTest - @MethodSource("nativeTransports") - @Timeout(value = 30, unit = TimeUnit.SECONDS) - public void nativeTransportRequiresBothModuleRoots(String classesModule, String nativeModule) throws Exception { - String withoutRoots = resolveModules("io.netty.transport"); - assertFalse(isResolved(withoutRoots, classesModule), withoutRoots); - assertFalse(isResolved(withoutRoots, nativeModule), withoutRoots); - - String withClasses = resolveModules("io.netty.transport", classesModule); - assertTrue(isResolved(withClasses, classesModule), withClasses); - assertFalse(isResolved(withClasses, nativeModule), withClasses); - - String withBoth = resolveModules("io.netty.transport", classesModule, nativeModule); - assertTrue(isResolved(withBoth, classesModule), withBoth); - assertTrue(isResolved(withBoth, nativeModule), withBoth); - } - - private static Stream nativeTransports() { - return Stream.of(Arguments.of(EPOLL_CLASSES, EPOLL_NATIVE), Arguments.of(KQUEUE_CLASSES, KQUEUE_NATIVE)); - } - - private static boolean isResolved(String output, String name) { - return output.contains("root " + name + " ") - || output.contains(" requires " + name + " ") - || output.contains(" binds " + name + " "); - } - - private static String resolveModules(String... roots) throws Exception { - String modulePath = modulePath(); - String executable - = System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("win") ? "java.exe" : "java"; - String java = Paths.get(System.getProperty("java.home"), "bin", executable).toString(); - List command = Arrays.asList(java, "--module-path", modulePath, "--add-modules", - String.join(",", roots), "--show-module-resolution", "-version"); - - Process process = new ProcessBuilder(command).redirectErrorStream(true).start(); - ByteArrayOutputStream output = new ByteArrayOutputStream(); - try (InputStream input = process.getInputStream()) { - byte[] buffer = new byte[4096]; - int count; - while ((count = input.read(buffer)) != -1) { - output.write(buffer, 0, count); - } - } - - String text = new String(output.toByteArray(), StandardCharsets.UTF_8); - assertEquals(0, process.waitFor(), text); - return text; - } - - private static String modulePath() { - Version nettyCommon - = Version.identify(NettyNativeTransportModulesTests.class.getClassLoader()).get("netty-common"); - assertNotNull(nettyCommon, "Missing Netty common version"); - String version = nettyCommon.artifactVersion(); - // Surefire separates resolved modules from the test classpath containing the optional native JARs. - List entries = Stream.of("surefire.test.class.path", "jdk.module.path", "java.class.path") - .map(System::getProperty) - .filter(value -> value != null && !value.isEmpty()) - .flatMap(value -> Arrays.stream(value.split(Pattern.quote(File.pathSeparator)))) - .map(Paths::get) - .distinct() - .collect(Collectors.toList()); - assertFalse(entries.isEmpty(), "Missing test classpath and module path"); - List jars = Arrays.asList(jarFromClasspath(entries, "netty-common-" + version + ".jar"), - jarFromClasspath(entries, "netty-buffer-" + version + ".jar"), - jarFromClasspath(entries, "netty-transport-" + version + ".jar"), - jarFromClasspath(entries, "netty-resolver-" + version + ".jar"), - jarFromClasspath(entries, "netty-transport-native-unix-common-" + version + ".jar"), - jarFromClasspath(entries, "netty-transport-classes-epoll-" + version + ".jar"), - jarFromClasspath(entries, "netty-transport-classes-kqueue-" + version + ".jar"), - jarFromClasspath(entries, "netty-transport-native-epoll-" + version + "-linux-x86_64.jar"), - jarFromClasspath(entries, "netty-transport-native-kqueue-" + version + "-osx-x86_64.jar")); - return jars.stream().distinct().map(Path::toString).collect(Collectors.joining(File.pathSeparator)); - } - - private static Path jarFromClasspath(List entries, String fileName) { - List matches = entries.stream() - .filter(path -> path.getFileName().toString().equals(fileName)) - .collect(Collectors.toList()); - assertEquals(1, matches.size(), "Expected one Netty test dependency for " + fileName); - return matches.get(0); - } -} diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/ByteBufWriterSubscriberTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/ByteBufWriterSubscriberTests.java index 988ba5467941..752bc322d0a4 100644 --- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/ByteBufWriterSubscriberTests.java +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/ByteBufWriterSubscriberTests.java @@ -6,13 +6,11 @@ import com.azure.core.http.netty.mocking.MockMonoSink; import com.azure.core.http.netty.mocking.WriteCountTrackingChannel; import io.netty.buffer.ByteBuf; -import io.netty.buffer.PooledByteBufAllocator; import io.netty.buffer.Unpooled; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -import org.junit.jupiter.params.provider.ValueSource; import org.reactivestreams.Subscription; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -32,55 +30,14 @@ import static com.azure.core.validation.http.HttpValidatonUtils.assertArraysEqual; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertSame; -import static org.junit.jupiter.api.Assertions.assertTrue; /** * Tests {@link ByteBufWriteSubscriber}. */ @SuppressWarnings("resource") public class ByteBufWriterSubscriberTests { - @ParameterizedTest - @ValueSource(ints = { 4096, 65536, 131136 }) - public void heapBufferWritesDirectBuffersInBoundedChunks(int size) { - byte[] expected = new byte[size]; - ThreadLocalRandom.current().nextBytes(expected); - ByteBuf data = PooledByteBufAllocator.DEFAULT.directBuffer(size).writeBytes(expected); - WriteCountTrackingChannel channel = new WriteCountTrackingChannel(); - try { - StepVerifier - .create(Mono.create(sink -> Flux.just(data).subscribe(new ByteBufWriteSubscriber(buffer -> { - assertFalse(buffer.isDirect()); - assertTrue(buffer.remaining() <= 65536); - channel.write(buffer); - }, sink, null, true)))) - .verifyComplete(); - - assertArraysEqual(expected, channel.getDataWritten()); - } finally { - data.release(); - } - } - - @Test - public void heapBufferWriteFailureStopsBeforeWritingRemainingData() { - ByteBuf data = PooledByteBufAllocator.DEFAULT.directBuffer(131136).writeZero(131136); - AtomicInteger writes = new AtomicInteger(); - try { - StepVerifier - .create(Mono.create(sink -> Flux.just(data).subscribe(new ByteBufWriteSubscriber(buffer -> { - writes.incrementAndGet(); - throw new IOException("write failed"); - }, sink, null, true)))) - .verifyError(IOException.class); - assertEquals(1, writes.get()); - } finally { - data.release(); - } - } - /** * Tests that when multiple subscriptions are made to the subscriber all subscriptions after the first are ignored * and cancelled. diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/NettyUtilityTests.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/NettyUtilityTests.java index 0b6013caa784..5a71bba892f8 100644 --- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/NettyUtilityTests.java +++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/NettyUtilityTests.java @@ -23,10 +23,6 @@ public void validateNettyVersionsWithWhatThePomSpecifies() { // Should never have version mismatches when running tests, that would mean either the version properties are // wrong or there is a dependency diamond within azure-core-http-netty. Either way, it should be fixed. assertFalse(logInformation.shouldLog()); - assertTrue(logInformation.classpathNettyVersions.containsKey("io.netty:netty-codec-base")); - assertTrue(logInformation.classpathNettyVersions.containsKey("io.netty:netty-codec-compression")); - assertTrue(logInformation.classpathNettyVersions.containsKey("io.netty:netty-codec-socks")); - assertFalse(logInformation.classpathNettyVersions.containsKey("io.netty:netty-codec")); for (String artifactFullName : logInformation.classpathNettyVersions.keySet()) { assertTrue(artifactFullName.startsWith("io.netty:netty-"), "All artifact information should start with 'io.netty:netty-'"); diff --git a/sdk/core/azure-core-http-okhttp/pom.xml b/sdk/core/azure-core-http-okhttp/pom.xml index 9c20a28e20b1..7ce74e03bff2 100644 --- a/sdk/core/azure-core-http-okhttp/pom.xml +++ b/sdk/core/azure-core-http-okhttp/pom.xml @@ -108,7 +108,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClientBuilderTests.java b/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClientBuilderTests.java index 79b98573d01f..066cfd98590c 100644 --- a/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClientBuilderTests.java +++ b/sdk/core/azure-core-http-okhttp/src/test/java/com/azure/core/http/okhttp/OkHttpAsyncHttpClientBuilderTests.java @@ -455,8 +455,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { Configuration simpleEnvProxy = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://localhost:12345") - .put(Configuration.PROPERTY_HTTPS_PROXY, "") - .put(Configuration.PROPERTY_NO_PROXY, "") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")).build(); arguments.add(Arguments.of(true, simpleEnvProxy, SERVER_HTTP_URI + DEFAULT_PATH)); @@ -470,8 +468,6 @@ private static Stream buildWithEnvConfigurationProxySupplier() { Configuration envProxyWithAuthentication = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://1:1@localhost:12345") - .put(Configuration.PROPERTY_HTTPS_PROXY, "") - .put(Configuration.PROPERTY_NO_PROXY, "") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")).build(); arguments.add(Arguments.of(true, envProxyWithAuthentication, SERVER_HTTP_URI + DEFAULT_PATH)); diff --git a/sdk/core/azure-core-http-vertx/CHANGELOG.md b/sdk/core/azure-core-http-vertx/CHANGELOG.md index d82021a88e39..459f74318b16 100644 --- a/sdk/core/azure-core-http-vertx/CHANGELOG.md +++ b/sdk/core/azure-core-http-vertx/CHANGELOG.md @@ -8,9 +8,6 @@ ### Bugs Fixed -- Fixed a bug where requests with a streaming body, such as `Flux` or `InputStream`, would never be sent - when running with Vert.x 5.x. - ### Other Changes ## 1.2.0 (2026-09-29) diff --git a/sdk/core/azure-core-http-vertx/README.md b/sdk/core/azure-core-http-vertx/README.md index b41666349386..791822d6f457 100644 --- a/sdk/core/azure-core-http-vertx/README.md +++ b/sdk/core/azure-core-http-vertx/README.md @@ -10,10 +10,6 @@ Azure Core Vert.x HTTP client is a plugin for the `azure-core` HTTP client API. - Here are details about [Java 8 client compatibility with Azure Certificate Authority][java8_client_compatibility]. ### Include the package - -This transport remains on Vert.x 4.5 and Netty 4.1 to support Java 8. Do not combine it with the Netty 4.2-based -`azure-core-http-netty` library on the same classpath. - #### Include the BOM file Please include the azure-sdk-bom to your project to take dependency on the General Availability (GA) version of the library. In the following snippet, replace the {bom_version_to_target} placeholder with the version number. @@ -141,3 +137,4 @@ For details on contributing to this repository, see the [contributing guide](htt [jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable [java8_client_compatibility]: https://learn.microsoft.com/azure/security/fundamentals/azure-ca-details?tabs=root-and-subordinate-cas-list#client-compatibility-for-public-pkis + diff --git a/sdk/core/azure-core-http-vertx/pom.xml b/sdk/core/azure-core-http-vertx/pom.xml index 8e0d2b3bfdc1..ff9ad81b5b82 100644 --- a/sdk/core/azure-core-http-vertx/pom.xml +++ b/sdk/core/azure-core-http-vertx/pom.xml @@ -104,7 +104,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/core/azure-core-http-vertx/src/main/java/com/azure/core/http/vertx/VertxHttpClient.java b/sdk/core/azure-core-http-vertx/src/main/java/com/azure/core/http/vertx/VertxHttpClient.java index 25b01b7858a8..c461728a1af4 100644 --- a/sdk/core/azure-core-http-vertx/src/main/java/com/azure/core/http/vertx/VertxHttpClient.java +++ b/sdk/core/azure-core-http-vertx/src/main/java/com/azure/core/http/vertx/VertxHttpClient.java @@ -12,8 +12,6 @@ import com.azure.core.http.vertx.implementation.VertxHttpResponse; import com.azure.core.http.vertx.implementation.VertxRequestWriteSubscriber; import com.azure.core.http.vertx.implementation.VertxUtils; -import com.azure.core.implementation.ReflectionUtils; -import com.azure.core.implementation.ReflectiveInvoker; import com.azure.core.implementation.util.BinaryDataContent; import com.azure.core.implementation.util.BinaryDataHelper; import com.azure.core.implementation.util.ByteArrayContent; @@ -40,7 +38,6 @@ import java.io.IOException; import java.io.UncheckedIOException; -import java.lang.reflect.Method; import java.time.Duration; import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; @@ -58,20 +55,6 @@ class VertxHttpClient implements HttpClient { // other HTTP stacks. RFC 9110 requires a client not to wait indefinitely. private static final Duration EXPECT_CONTINUE_TIMEOUT = Duration.ofSeconds(1); - private static final ReflectiveInvoker REQUEST_RESET; - static { - // In order to support both Vert.x 4.5 and 5.x reflection is needed to reset an HttpClientRequest. - // HttpClientRequest.reset(long, Throwable) is available in both versions, but it returns boolean in 4.5 and - // Future in 5.x, so a call compiled against one version fails with NoSuchMethodError on the other. - try { - Method method = HttpClientRequest.class.getMethod("reset", long.class, Throwable.class); - REQUEST_RESET = ReflectionUtils.getMethodInvoker(HttpClientRequest.class, method, false); - } catch (Exception ex) { - // Fail here as the method isn't available and this HttpClient wouldn't be usable anyway. - throw LOGGER.logExceptionAsError(new IllegalStateException(ex)); - } - } - final io.vertx.core.http.HttpClient client; final HttpClientOptions buildOptions; private final Duration responseTimeout; @@ -286,22 +269,11 @@ private void writeBody(ContextView contextView, HttpRequest azureRequest, Progre // Right now both Flux and InputStream bodies are being handled reactively. azureRequest.getBody() .subscribe(new VertxRequestWriteSubscriber(vertxRequest::exceptionHandler, vertxRequest::drainHandler, - vertxRequest::write, vertxRequest::writeQueueFull, - (code, cause) -> resetRequest(vertxRequest, code, cause), vertxRequest::end, promise, + vertxRequest::write, vertxRequest::writeQueueFull, vertxRequest::reset, vertxRequest::end, promise, progressReporter, contextView)); } } - private static void resetRequest(HttpClientRequest vertxRequest, long code, Throwable cause) { - try { - REQUEST_RESET.invokeWithArguments(vertxRequest, code, cause); - } catch (Exception ex) { - // The request is already being failed with 'cause', so don't let a failed reset replace that error. - cause.addSuppressed(ex); - LOGGER.atWarning().log("Failed to reset the Vert.x HttpClientRequest.", ex); - } - } - private static void reportProgress(long progress, ProgressReporter progressReporter) { if (progressReporter != null) { progressReporter.reportProgress(progress); diff --git a/sdk/core/azure-core-http-vertx/src/test/java/com/azure/core/http/vertx/VertxHttpClientBuilderTests.java b/sdk/core/azure-core-http-vertx/src/test/java/com/azure/core/http/vertx/VertxHttpClientBuilderTests.java index 5505ad215efc..ecc6f3ce4c0c 100644 --- a/sdk/core/azure-core-http-vertx/src/test/java/com/azure/core/http/vertx/VertxHttpClientBuilderTests.java +++ b/sdk/core/azure-core-http-vertx/src/test/java/com/azure/core/http/vertx/VertxHttpClientBuilderTests.java @@ -131,10 +131,11 @@ public void buildWithHttpProxy() { @Test public void buildWithHttpProxyFromEnvConfiguration() { - Configuration configuration = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, new TestConfigurationSource() - .put(Configuration.PROPERTY_HTTP_PROXY, "http://" + PROXY_USER_INFO + "localhost:" + PROXY_SERVER_HTTP_PORT) - .put(Configuration.PROPERTY_HTTPS_PROXY, "") - .put("java.net.useSystemProxies", "true")).build(); + Configuration configuration = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, + new TestConfigurationSource() + .put(Configuration.PROPERTY_HTTP_PROXY, + "http://" + PROXY_USER_INFO + "localhost:" + PROXY_SERVER_HTTP_PORT) + .put("java.net.useSystemProxies", "true")).build(); HttpClient httpClient = new VertxHttpClientBuilder().configuration(configuration).build(); diff --git a/sdk/core/azure-core-management/pom.xml b/sdk/core/azure-core-management/pom.xml index 545c0e33af1e..33db44dfc2e0 100644 --- a/sdk/core/azure-core-management/pom.xml +++ b/sdk/core/azure-core-management/pom.xml @@ -103,7 +103,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/core/azure-core-perf/pom.xml b/sdk/core/azure-core-perf/pom.xml index 69db6ff1dd69..89055c6cf704 100644 --- a/sdk/core/azure-core-perf/pom.xml +++ b/sdk/core/azure-core-perf/pom.xml @@ -63,7 +63,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/core/azure-core-serializer-avro-apache/pom.xml b/sdk/core/azure-core-serializer-avro-apache/pom.xml index 523385f0938f..155ecd39c844 100644 --- a/sdk/core/azure-core-serializer-avro-apache/pom.xml +++ b/sdk/core/azure-core-serializer-avro-apache/pom.xml @@ -102,7 +102,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/core/azure-core-serializer-json-gson/pom.xml b/sdk/core/azure-core-serializer-json-gson/pom.xml index 7eee2e35024b..c231056934ef 100644 --- a/sdk/core/azure-core-serializer-json-gson/pom.xml +++ b/sdk/core/azure-core-serializer-json-gson/pom.xml @@ -118,7 +118,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/core/azure-core-serializer-json-jackson/pom.xml b/sdk/core/azure-core-serializer-json-jackson/pom.xml index 8bd0b6703310..13449a593c00 100644 --- a/sdk/core/azure-core-serializer-json-jackson/pom.xml +++ b/sdk/core/azure-core-serializer-json-jackson/pom.xml @@ -148,7 +148,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/core/azure-core-test/CHANGELOG.md b/sdk/core/azure-core-test/CHANGELOG.md index 55fab4183b2e..22e0eb716ca7 100644 --- a/sdk/core/azure-core-test/CHANGELOG.md +++ b/sdk/core/azure-core-test/CHANGELOG.md @@ -10,10 +10,6 @@ ### Other Changes -#### Dependency Updates - -- Upgraded Reactor to `3.8.7` and the shared Netty transport to Netty `4.2.17.Final` / Reactor Netty `1.3.7`. - ## 1.27.0-beta.19 (2026-09-29) ### Other Changes diff --git a/sdk/core/azure-core-test/README.md b/sdk/core/azure-core-test/README.md index ec70fbbe4791..34b976af0003 100644 --- a/sdk/core/azure-core-test/README.md +++ b/sdk/core/azure-core-test/README.md @@ -353,3 +353,4 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml index af2ef000ae48..5448fb6a82c0 100644 --- a/sdk/core/azure-core-test/pom.xml +++ b/sdk/core/azure-core-test/pom.xml @@ -99,7 +99,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 @@ -142,7 +142,7 @@ org.junit.jupiter:junit-jupiter-api:[5.13.4] org.junit.jupiter:junit-jupiter-engine:[5.13.4] org.junit.jupiter:junit-jupiter-params:[5.13.4] - io.projectreactor:reactor-test:[3.8.7] + io.projectreactor:reactor-test:[3.7.19] org.apache.ant:ant:[1.10.18] diff --git a/sdk/core/azure-core-tracing-opentelemetry/pom.xml b/sdk/core/azure-core-tracing-opentelemetry/pom.xml index f47d65bdda49..d0da878d3826 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/pom.xml +++ b/sdk/core/azure-core-tracing-opentelemetry/pom.xml @@ -100,7 +100,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/core/azure-core-version-tests/pom.xml b/sdk/core/azure-core-version-tests/pom.xml index 424e3335598d..4e61ea014b66 100644 --- a/sdk/core/azure-core-version-tests/pom.xml +++ b/sdk/core/azure-core-version-tests/pom.xml @@ -95,7 +95,7 @@ io.projectreactor reactor-core - 3.8.7 + 3.7.19 + io.projectreactor:reactor-core:[3.7.19] com.fasterxml.jackson.core:jackson-annotations:[2.18.11] com.fasterxml.jackson.core:jackson-core:[2.18.11] com.fasterxml.jackson.core:jackson-databind:[2.18.11] diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 1def8c71d709..db524afd4906 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -10,10 +10,6 @@ ### Other Changes -#### Dependency Updates - -- Upgraded Reactor from `3.7.19` to `3.8.7`. - ## 1.60.0 (2026-09-29) ### Features Added @@ -31,8 +27,6 @@ ### Other Changes -#### Dependency Updates - - Upgraded Jackson from `2.18.9` to `2.18.11`. ## 1.59.1 (2026-08-27) diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml index 8f6487e84de5..4b61b3ed11d9 100644 --- a/sdk/core/azure-core/pom.xml +++ b/sdk/core/azure-core/pom.xml @@ -146,7 +146,7 @@ io.projectreactor reactor-core - 3.8.7 + 3.7.19 @@ -166,7 +166,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test @@ -223,7 +223,7 @@ - io.projectreactor:reactor-core:[3.8.7] + io.projectreactor:reactor-core:[3.7.19] com.fasterxml.jackson.core:jackson-annotations:[2.18.11] com.fasterxml.jackson.core:jackson-core:[2.18.11] com.fasterxml.jackson.core:jackson-databind:[2.18.11] diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/http/ProxyOptionsTests.java b/sdk/core/azure-core/src/test/java/com/azure/core/http/ProxyOptionsTests.java index cc5813a589d4..2e0a5e6a6d09 100644 --- a/sdk/core/azure-core/src/test/java/com/azure/core/http/ProxyOptionsTests.java +++ b/sdk/core/azure-core/src/test/java/com/azure/core/http/ProxyOptionsTests.java @@ -238,35 +238,53 @@ public void invalidHttpPortEnvironmentConfigDefault(String port) { private static Stream loadFromEnvironmentSupplier() { return Stream.of( // Basic Azure HTTPS proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTPS_PROXY_HOST_ONLY, null, true), PROXY_HOST, 443, - null, null, null), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.PROPERTY_HTTPS_PROXY, AZURE_HTTPS_PROXY_HOST_ONLY)), + PROXY_HOST, 443, null, null, null), // Username only Azure HTTPS proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTPS_PROXY_WITH_USERNAME, null, true), PROXY_HOST, - 443, null, null, null), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue(new TestConfigurationSource() + .put(Configuration.PROPERTY_HTTPS_PROXY, AZURE_HTTPS_PROXY_WITH_USERNAME)), + PROXY_HOST, 443, null, null, null), // Complete Azure HTTPS proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTPS_PROXY_WITH_USER_AND_PASS, null, true), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue(new TestConfigurationSource() + .put(Configuration.PROPERTY_HTTPS_PROXY, AZURE_HTTPS_PROXY_WITH_USER_AND_PASS)), PROXY_HOST, 443, FAKE_PROXY_USER_PLACEHOLDER, FAKE_PROXY_PASSWORD_PLACEHOLDER, null), // Azure HTTPS proxy with non-proxying hosts. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTPS_PROXY_HOST_ONLY, NON_PROXY_HOSTS, true), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.PROPERTY_HTTPS_PROXY, AZURE_HTTPS_PROXY_HOST_ONLY) + .put(Configuration.PROPERTY_NO_PROXY, NON_PROXY_HOSTS)), PROXY_HOST, 443, null, null, "(" + NON_PROXY_HOSTS + ")"), // Basic Azure HTTP proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTP_PROXY_HOST_ONLY, null, false), PROXY_HOST, 80, - null, null, null), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, AZURE_HTTP_PROXY_HOST_ONLY)), + PROXY_HOST, 80, null, null, null), // Username only Azure HTTP proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTP_PROXY_WITH_USERNAME, null, false), PROXY_HOST, - 80, null, null, null), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue(new TestConfigurationSource() + .put(Configuration.PROPERTY_HTTP_PROXY, AZURE_HTTP_PROXY_WITH_USERNAME)), + PROXY_HOST, 80, null, null, null), // Complete Azure HTTP proxy. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTP_PROXY_WITH_USER_AND_PASS, null, false), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue(new TestConfigurationSource() + .put(Configuration.PROPERTY_HTTP_PROXY, AZURE_HTTP_PROXY_WITH_USER_AND_PASS)), PROXY_HOST, 80, FAKE_PROXY_USER_PLACEHOLDER, FAKE_PROXY_PASSWORD_PLACEHOLDER, null), // Azure HTTP proxy with non-proxying hosts. - Arguments.of(setJavaSystemProxyPrerequisiteToTrue(AZURE_HTTP_PROXY_HOST_ONLY, NON_PROXY_HOSTS, false), + Arguments.of( + setJavaSystemProxyPrerequisiteToTrue( + new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, AZURE_HTTP_PROXY_HOST_ONLY) + .put(Configuration.PROPERTY_NO_PROXY, NON_PROXY_HOSTS)), PROXY_HOST, 80, null, null, "(" + NON_PROXY_HOSTS + ")"), /* @@ -310,7 +328,7 @@ private static Stream loadFromEnvironmentSupplier() { private static Stream loadFromExplicitConfigurationSupplier() { return Stream.of( /* - * Setting up tests for loading the Java explicit proxy configurations takes additional work as each + * Setting up tests for loading the Java exokicit proxy configurations takes additional work as each * piece of the proxy configuration is a separate environment value. The non-proxy hosts will be checked * against the global environment value when it is not being set by the configuration passed by the test * as this value may be setup by the JVM. @@ -429,8 +447,10 @@ private static Stream nonProxyHostsSupplier() { /* * This emulates loading an environment formatted proxy. */ - Configuration environmentProxyConfiguration - = setJavaSystemProxyPrerequisiteToTrue("http://localhost:7777", noProxyNonProxyHosts, true); + TestConfigurationSource envSource + = new TestConfigurationSource().put(Configuration.PROPERTY_HTTPS_PROXY, "http://localhost:7777") + .put(Configuration.PROPERTY_NO_PROXY, noProxyNonProxyHosts); + Configuration environmentProxyConfiguration = setJavaSystemProxyPrerequisiteToTrue(envSource); Pattern environmentProxyConfigurationPattern = compile(fromConfiguration(environmentProxyConfiguration).getNonProxyHosts(), Pattern.CASE_INSENSITIVE); @@ -490,22 +510,8 @@ public void sanitizeJavaHttpNonProxyHostsDoesNotSplitEscapedPipes() { assertEquals("(" + nonProxyHosts + ")", ProxyOptions.sanitizeNoProxy(nonProxyHosts)); } - private static Configuration setJavaSystemProxyPrerequisiteToTrue(String proxy, String nonProxyHosts, - boolean isHttps) { - TestConfigurationSource testSource = new TestConfigurationSource().put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true") - // Use empty string when non-proxy hosts is null or empty to ensure that the environment configuration - // doesn't attempt to fall back to loading from System.properties or System.env. - .put(Configuration.PROPERTY_NO_PROXY, CoreUtils.isNullOrEmpty(nonProxyHosts) ? "" : nonProxyHosts); - - if (isHttps) { - testSource.put(Configuration.PROPERTY_HTTPS_PROXY, proxy); - } else { - testSource.put(Configuration.PROPERTY_HTTP_PROXY, proxy) - // Same as with non-proxy hosts, set HTTPS_PROXY to empty when testing HTTP_PROXY as HTTPS is checked - // first and could fall back to loading from System.properties or System.env. - .put(Configuration.PROPERTY_HTTPS_PROXY, ""); - } - - return new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, testSource).build(); + private static Configuration setJavaSystemProxyPrerequisiteToTrue(TestConfigurationSource source) { + return new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, source.put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")) + .build(); } } diff --git a/sdk/cosmos/azure-cosmos-encryption/pom.xml b/sdk/cosmos/azure-cosmos-encryption/pom.xml index e0c497f05367..bf5b3d017803 100644 --- a/sdk/cosmos/azure-cosmos-encryption/pom.xml +++ b/sdk/cosmos/azure-cosmos-encryption/pom.xml @@ -51,9 +51,6 @@ Licensed under the MIT License. --add-opens com.azure.cosmos/com.azure.cosmos.implementation=ALL-UNNAMED --add-modules java.management --add-reads com.azure.cosmos.encryption=java.management - --add-reads com.azure.cosmos.encryption=io.netty.common - --add-reads com.azure.cosmos.encryption=io.netty.buffer - --add-reads com.azure.cosmos.encryption=io.netty.codec.http - true @@ -181,7 +178,7 @@ Licensed under the MIT License. io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml b/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml index 8662d66cd84c..93239be5fdb5 100644 --- a/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml @@ -159,7 +159,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml index bfe17f9cfdfd..7e0bf98d65c7 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml @@ -183,14 +183,6 @@ io.netty netty-all - - io.netty - netty-transport-native-epoll - - - io.netty - netty-transport-native-kqueue - org.slf4j * @@ -207,14 +199,6 @@ io.netty netty-all - - io.netty - netty-transport-native-epoll - - - io.netty - netty-transport-native-kqueue - org.slf4j * diff --git a/sdk/cosmos/azure-cosmos-spark_3-5/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-5/pom.xml index be5c1955b729..e9918828cbec 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-5/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-5/pom.xml @@ -104,14 +104,6 @@ io.netty netty-all - - io.netty - netty-transport-native-epoll - - - io.netty - netty-transport-native-kqueue - org.slf4j * @@ -128,14 +120,6 @@ io.netty netty-all - - io.netty - netty-transport-native-epoll - - - io.netty - netty-transport-native-kqueue - org.slf4j * diff --git a/sdk/cosmos/azure-cosmos-spark_3/pom.xml b/sdk/cosmos/azure-cosmos-spark_3/pom.xml index 7f50977a332a..fdc6b8258a84 100644 --- a/sdk/cosmos/azure-cosmos-spark_3/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3/pom.xml @@ -89,11 +89,6 @@ scala-java8-compat_${scala.binary.version} ${scala-java8-compat.version} - - io.netty - netty-transport-classes-epoll - 4.2.19.Final - io.projectreactor reactor-scala-extensions_${scala.binary.version} @@ -133,7 +128,7 @@ com.azure azure-core-http-netty - 1.17.0-beta.1 + 1.16.8 com.azure @@ -203,7 +198,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test @@ -322,7 +317,6 @@ org.apache.commons:commons-lang3:[3.18.0] - io.netty:netty-transport-classes-epoll:[4.2.19.Final] org.slf4j:slf4j-api:[1.7.36] org.apache.spark:spark-sql_2.12:[${spark33.version}] org.apache.spark:spark-sql_2.12:[${spark34.version}] diff --git a/sdk/cosmos/azure-cosmos-spark_3/src/test/scala/com/azure/cosmos/spark/NettyCompatibilitySpec.scala b/sdk/cosmos/azure-cosmos-spark_3/src/test/scala/com/azure/cosmos/spark/NettyCompatibilitySpec.scala deleted file mode 100644 index 0857b4c3c402..000000000000 --- a/sdk/cosmos/azure-cosmos-spark_3/src/test/scala/com/azure/cosmos/spark/NettyCompatibilitySpec.scala +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.cosmos.spark - -import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdLoopNIO -import io.netty.channel.MultiThreadIoEventLoopGroup -import io.netty.util.Version -import io.netty.util.concurrent.DefaultThreadFactory - -import java.util.concurrent.{Callable, TimeUnit} -import scala.collection.JavaConverters._ - -class NettyCompatibilitySpec extends UnitSpec { - private val timeoutInSeconds = 10 - - it should "resolve a consistent Netty 4.2 dependency stack" in { - val versions = Version.identify().values().asScala - .filterNot(_.artifactId().startsWith("netty-tcnative")) - .map(_.artifactVersion()).toSeq - versions should not be empty - all(versions) should startWith("4.2.") - } - - it should "create NIO event loops for the Cosmos transport" in { - val threadName = "cosmos-spark-netty-test" - val eventLoops = new RntbdLoopNIO().newEventLoopGroup(1, new DefaultThreadFactory(threadName)) - try { - eventLoops shouldBe a[MultiThreadIoEventLoopGroup] - eventLoops.next().submit(new Callable[String] { - override def call(): String = Thread.currentThread().getName - }).get(timeoutInSeconds, TimeUnit.SECONDS) should startWith(threadName) - } finally { - eventLoops.shutdownGracefully(0, timeoutInSeconds, TimeUnit.SECONDS).sync() - } - } -} diff --git a/sdk/cosmos/azure-cosmos-spark_4-0_2-13/pom.xml b/sdk/cosmos/azure-cosmos-spark_4-0_2-13/pom.xml index b2673044ade6..dac2a640c553 100644 --- a/sdk/cosmos/azure-cosmos-spark_4-0_2-13/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_4-0_2-13/pom.xml @@ -188,86 +188,10 @@ spark-sql_2.13 4.0.0 - - io.netty - netty-tcnative-boringssl-static - - - io.netty - netty-tcnative-classes - io.netty netty-all - - io.netty - netty-buffer - - - io.netty - netty-codec - - - io.netty - netty-codec-dns - - - io.netty - netty-codec-http - - - io.netty - netty-codec-http2 - - - io.netty - netty-codec-socks - - - io.netty - netty-common - - - io.netty - netty-handler - - - io.netty - netty-transport-native-unix-common - - - io.netty - netty-handler-proxy - - - io.netty - netty-resolver - - - io.netty - netty-resolver-dns - - - io.netty - netty-transport - - - io.netty - netty-transport-classes-epoll - - - io.netty - netty-transport-classes-kqueue - - - io.netty - netty-transport-native-epoll - - - io.netty - netty-transport-native-kqueue - org.slf4j * diff --git a/sdk/cosmos/azure-cosmos-spark_4-1_2-13/pom.xml b/sdk/cosmos/azure-cosmos-spark_4-1_2-13/pom.xml index dab39608248d..1fd6422db2c9 100644 --- a/sdk/cosmos/azure-cosmos-spark_4-1_2-13/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_4-1_2-13/pom.xml @@ -235,114 +235,10 @@ spark-sql_2.13 4.1.0 - - io.netty - netty-tcnative-boringssl-static - - - io.netty - netty-tcnative-classes - io.netty netty-all - - io.netty - netty-buffer - - - io.netty - netty-codec-base - - - io.netty - netty-codec - - - io.netty - netty-codec-dns - - - io.netty - netty-codec-compression - - - io.netty - netty-codec-http - - - io.netty - netty-codec-http2 - - - io.netty - netty-codec-http3 - - - io.netty - netty-codec-socks - - - io.netty - netty-codec-protobuf - - - io.netty - netty-codec-marshalling - - - io.netty - netty-common - - - io.netty - netty-handler - - - io.netty - netty-transport-native-unix-common - - - io.netty - netty-handler-proxy - - - io.netty - netty-resolver - - - io.netty - netty-resolver-dns - - - io.netty - netty-transport - - - io.netty - netty-transport-classes-epoll - - - io.netty - netty-transport-classes-kqueue - - - io.netty - netty-transport-classes-io_uring - - - io.netty - netty-transport-classes-quic - - - io.netty - netty-transport-native-epoll - - - io.netty - netty-transport-native-kqueue - org.slf4j * diff --git a/sdk/cosmos/azure-cosmos-tests/pom.xml b/sdk/cosmos/azure-cosmos-tests/pom.xml index 1e6b49b48bc3..1153bceb09ac 100644 --- a/sdk/cosmos/azure-cosmos-tests/pom.xml +++ b/sdk/cosmos/azure-cosmos-tests/pom.xml @@ -181,7 +181,7 @@ Licensed under the MIT License. io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConfigsTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConfigsTests.java index ea7ba842d37f..f8d0a5c0292b 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConfigsTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConfigsTests.java @@ -6,14 +6,8 @@ import com.azure.cosmos.implementation.clienttelemetry.MetricCategory; import com.azure.cosmos.implementation.clienttelemetry.TagName; import com.azure.cosmos.implementation.directconnectivity.Protocol; -import io.netty.buffer.ByteBufAllocator; -import io.netty.handler.ssl.SslContext; -import io.netty.util.ReferenceCountUtil; -import org.apache.commons.lang3.reflect.FieldUtils; -import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import javax.net.ssl.SSLEngine; import java.net.URI; import java.time.Duration; import java.util.EnumSet; @@ -22,39 +16,6 @@ public class ConfigsTests { - @DataProvider(name = "sslValidationSettings") - public Object[][] sslValidationSettings() { - return new Object[][] { - { false, false, false }, { false, false, true }, - { false, true, false }, { false, true, true }, - { true, false, false }, { true, false, true }, - { true, true, false }, { true, true, true } - }; - } - - @Test(groups = { "unit" }, dataProvider = "sslValidationSettings") - public void sslContextPreservesHostnameValidationSettings( - boolean serverCertValidationDisabled, boolean hostnameValidationDisabled, boolean http2Enabled) - throws IllegalAccessException { - - Object original = FieldUtils.readStaticField(Configs.class, "cachedIsHostnameValidationDisabled", true); - SslContext sslContext = null; - SSLEngine engine = null; - try { - FieldUtils.writeStaticField(Configs.class, "cachedIsHostnameValidationDisabled", - hostnameValidationDisabled, true); - sslContext = new Configs().getSslContext(serverCertValidationDisabled, http2Enabled); - engine = sslContext.newEngine(ByteBufAllocator.DEFAULT, "localhost", 443); - - assertThat(engine.getSSLParameters().getEndpointIdentificationAlgorithm()) - .isEqualTo(serverCertValidationDisabled || hostnameValidationDisabled ? null : "HTTPS"); - } finally { - ReferenceCountUtil.release(engine); - ReferenceCountUtil.release(sslContext); - FieldUtils.writeStaticField(Configs.class, "cachedIsHostnameValidationDisabled", original, true); - } - } - @Test(groups = { "unit" }) public void maxHttpHeaderSize() { Configs config = new Configs(); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/TcpServer.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/TcpServer.java index 84deac4399f4..3a5ff7605c8d 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/TcpServer.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/TcpServer.java @@ -36,8 +36,7 @@ import io.netty.channel.ChannelOption; import io.netty.channel.ChannelPipeline; import io.netty.channel.EventLoopGroup; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.logging.LogLevel; @@ -61,8 +60,8 @@ public class TcpServer { public TcpServer(int port) { this.port = port; - this.parent = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()); - this.child = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()); + this.parent = new NioEventLoopGroup(); + this.child = new NioEventLoopGroup(); requestManager = new ServerRntbdRequestManager(); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopTests.java deleted file mode 100644 index ecac817f63f7..000000000000 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.cosmos.implementation.directconnectivity.rntbd; - -import io.netty.bootstrap.Bootstrap; -import io.netty.channel.Channel; -import io.netty.channel.ChannelInboundHandlerAdapter; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.SingleThreadIoEventLoop; -import io.netty.channel.epoll.Epoll; -import io.netty.util.concurrent.DefaultThreadFactory; -import org.testng.SkipException; -import org.testng.annotations.Test; - -import java.util.concurrent.TimeUnit; - -import static org.assertj.core.api.Assertions.assertThat; - -public class RntbdLoopTests { - - @Test(groups = { "unit" }) - public void nioChannelRegistration() throws Exception { - RntbdLoop loop = RntbdLoopNativeDetector.getRntbdLoop(false); - assertThat(loop.getName()).isEqualTo("nio"); - verifyChannelRegistration(loop); - } - - @Test(groups = { "unit" }) - public void preferredTransportChannelRegistration() throws Exception { - RntbdLoop loop = RntbdLoopNativeDetector.getRntbdLoop(true); - assertThat(loop.getName()).isEqualTo(Epoll.isAvailable() ? "epoll" : "nio"); - verifyChannelRegistration(loop); - } - - @Test(groups = { "unit" }) - public void epollChannelRegistration() throws Exception { - if (!Epoll.isAvailable()) { - throw new SkipException("Epoll is not available on this platform", Epoll.unavailabilityCause()); - } - verifyChannelRegistration(new RntbdLoopEpoll()); - } - - private static void verifyChannelRegistration(RntbdLoop loop) throws Exception { - String threadName = "rntbd-loop-test-" + loop.getName(); - EventLoopGroup group = loop.newEventLoopGroup(1, new DefaultThreadFactory(threadName)); - Channel channel = null; - try { - assertThat(group).isInstanceOf(MultiThreadIoEventLoopGroup.class); - assertThat(((MultiThreadIoEventLoopGroup) group).executorCount()).isEqualTo(1); - channel = new Bootstrap() - .group(group) - .channel(loop.getChannelClass()) - .handler(new ChannelInboundHandlerAdapter()) - .register().sync().channel(); - - assertThat(channel.isRegistered()).isTrue(); - assertThat(channel).isInstanceOf(loop.getChannelClass()); - assertThat(channel.eventLoop()).isInstanceOf(SingleThreadIoEventLoop.class); - assertThat(RntbdUtils.tryGetExecutorTaskQueueSize(channel.eventLoop())).isGreaterThanOrEqualTo(0); - assertThat(channel.eventLoop().submit(() -> Thread.currentThread().getName()).get(10, TimeUnit.SECONDS)) - .startsWith(threadName); - assertThat(channel.eventLoop().schedule(() -> true, 1, TimeUnit.MILLISECONDS).get(10, TimeUnit.SECONDS)) - .isTrue(); - } finally { - if (channel != null) { - channel.close().sync(); - } - group.shutdownGracefully(0, 5, TimeUnit.SECONDS).sync(); - } - } -} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/http/ReactorNettyHttpClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/http/ReactorNettyHttpClientTest.java index da8804db17d2..f0335e0438b9 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/http/ReactorNettyHttpClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/http/ReactorNettyHttpClientTest.java @@ -9,8 +9,6 @@ import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.implementation.LifeCycleUtils; import com.azure.cosmos.implementation.directconnectivity.ReflectionUtils; -import io.netty.buffer.ByteBufAllocator; -import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.ChannelOption; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,26 +46,6 @@ public void after_ReactorNettyHttpClientTest() throws Exception { } } - @Test(groups = "unit") - public void httpClientAllocatorRespectsConfiguration() { - ByteBufAllocator expectedAllocator = System.getProperty("io.netty.allocator.type") == null - ? PooledByteBufAllocator.DEFAULT : ByteBufAllocator.DEFAULT; - reactor.netty.http.client.HttpClient httpClient = - ReflectionUtils.get(reactor.netty.http.client.HttpClient.class, this.reactorNettyHttpClient, "httpClient"); - assertThat(httpClient.configuration().options().get(ChannelOption.ALLOCATOR)) - .isSameAs(expectedAllocator); - - HttpClient unpooledConnectionClient = HttpClient.create(new HttpClientConfig(new Configs())); - try { - httpClient = - ReflectionUtils.get(reactor.netty.http.client.HttpClient.class, unpooledConnectionClient, "httpClient"); - assertThat(httpClient.configuration().options().get(ChannelOption.ALLOCATOR)) - .isSameAs(expectedAllocator); - } finally { - LifeCycleUtils.closeQuietly(unpooledConnectionClient); - } - } - @Test(groups = "unit") public void httpClientWithMaxHeaderSize() { reactor.netty.http.client.HttpClient httpClient = diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyServer.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyServer.java index 6a731f27381b..b518db313ee2 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyServer.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyServer.java @@ -4,8 +4,7 @@ import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.EventLoopGroup; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioServerSocketChannel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -21,8 +20,8 @@ public class HttpProxyServer { EventLoopGroup bossGroup; EventLoopGroup workerGroup; public HttpProxyServer() { - bossGroup = new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory()); - workerGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()); + bossGroup = new NioEventLoopGroup(1); + workerGroup = new NioEventLoopGroup(); } public void start() { diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index 2cab777b4aee..9bbaf9c7c67c 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -10,9 +10,8 @@ * Fixed the Direct mode (RNTBD) encoding of the `x-ms-cosmos-workload-id` header, which was sent with the wrong token ID (`0x00DC`) and type (`Byte`) instead of `0x00E7` and `UShort`. - See [PR 50673](https://github.com/Azure/azure-sdk-for-java/pull/50673) #### Other Changes - -* Updated Netty to `4.2.19.Final`, Reactor Netty to `1.3.7`, and Reactor Core to `3.8.7`. Migrated direct TCP event loops to the Netty 4.2 I/O handler API while preserving pooled buffers and explicit TLS validation settings. * Added a compact `ppaf` bookmark to each data-plane attempt in `CosmosDiagnostics`, containing the current per-partition write region, failed regions, and the time it was designated, or an empty object when no override is active. +* Upgraded Jackson from `2.18.9` to `2.18.11`. ### 4.83.0 (2026-09-22) diff --git a/sdk/cosmos/azure-cosmos/README.md b/sdk/cosmos/azure-cosmos/README.md index c11a4037373a..a8bb7e5868bd 100644 --- a/sdk/cosmos/azure-cosmos/README.md +++ b/sdk/cosmos/azure-cosmos/README.md @@ -95,24 +95,6 @@ A Cosmos DB account contains zero or more databases, a database (DB) contains ze You may read more about databases, containers and items [here](https://learn.microsoft.com/azure/cosmos-db/databases-containers-items). A few important properties defined at the level of the container, among them are provisioned throughput and partition key. -### Direct-mode epoll on the Java module path - -When a named-module application uses Cosmos DB direct mode on JDK 11 or later, the -`com.azure.cosmos` module already requires Netty's `io.netty.transport.classes.epoll` module. -Netty 4.2 places the Linux JNI library in a **separate** explicit module, so including its JAR -on the module path is not enough to make the bundled library visible. On Linux x86_64, -retain or add the matching `io.netty:netty-transport-native-epoll` dependency with the -`linux-x86_64` classifier and add `--add-modules=io.netty.transport.epoll.linux.x86_64` -when launching the application. For another architecture, use its matching classifier -and module name (check with `jar --describe-module --file --release 11`). - -If the native module is not resolved, the bundled JNI library is unavailable to Netty and -Cosmos DB direct mode falls back to JDK NIO unless a native library is supplied another way. -These JPMS launch options do not apply to Java 8 or to classpath applications. Resolving -the module does not by itself prove epoll is usable on the current OS. The -[Netty HTTP plugin's module-path guidance](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty/README.md#native-transports-on-the-module-path) -also covers gateway HTTP and macOS kqueue. - ### Global Distribution - Azure Cosmos DB is a globally distributed database service that's designed to provide low latency, elastic scalability of throughput, well-defined semantics for data consistency, and high availability. In short, if your application needs guaranteed fast response time anywhere in the world, if it's required to be always online, and needs unlimited and elastic scalability of throughput and storage, you should build your application on Azure Cosmos DB. diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index 983b97ce1e14..bd757939a79d 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -67,12 +67,18 @@ Licensed under the MIT License. com.azure azure-core - 1.61.0-beta.1 + 1.60.0 com.azure azure-core-http-netty - 1.17.0-beta.1 + 1.16.8 + + + com.azure + azure-core + + com.fasterxml.jackson.module diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java index b152a8f6e3b0..bdb83171ee6e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java @@ -500,10 +500,9 @@ private SslContext sslContextInit(boolean serverCertVerificationDisabled, boolea if (serverCertVerificationDisabled) { sslContextBuilder.trustManager(InsecureTrustManagerFactory.INSTANCE); // disable cert verification + } else if (!isHostnameValidationDisabled()) { + sslContextBuilder.endpointIdentificationAlgorithm("HTTPS"); } - // Netty 4.2 enables hostname validation by default; preserve explicit Cosmos opt-outs. - sslContextBuilder.endpointIdentificationAlgorithm( - serverCertVerificationDisabled || isHostnameValidationDisabled() ? null : "HTTPS"); if (http2Enabled) { sslContextBuilder diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopEpoll.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopEpoll.java index 711cfa9471c6..78f2e2e19bc1 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopEpoll.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopEpoll.java @@ -4,8 +4,7 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; import io.netty.channel.EventLoopGroup; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.epoll.EpollIoHandler; +import io.netty.channel.epoll.EpollEventLoopGroup; import io.netty.channel.epoll.EpollSocketChannel; import io.netty.channel.socket.SocketChannel; @@ -20,7 +19,7 @@ public String getName() { @Override public EventLoopGroup newEventLoopGroup(int threads, ThreadFactory threadFactory) { - return new MultiThreadIoEventLoopGroup(threads, threadFactory, EpollIoHandler.newFactory()); + return new EpollEventLoopGroup(threads, threadFactory); } @Override diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopNIO.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopNIO.java index 72c24016c44e..197231a06ea1 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopNIO.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdLoopNIO.java @@ -4,8 +4,7 @@ package com.azure.cosmos.implementation.directconnectivity.rntbd; import io.netty.channel.EventLoopGroup; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; @@ -20,7 +19,7 @@ public String getName() { @Override public EventLoopGroup newEventLoopGroup(int threads, ThreadFactory threadFactory) { - return new MultiThreadIoEventLoopGroup(threads, threadFactory, NioIoHandler.newFactory()); + return new NioEventLoopGroup(threads, threadFactory); } @Override diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java index da8353285529..04db3536834c 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java @@ -202,7 +202,7 @@ private Bootstrap getBootStrap(EventLoopGroup eventLoopGroup, Config config) { .option(ChannelOption.ALLOCATOR, config.allocator()) .option(ChannelOption.AUTO_READ, true) .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.connectTimeoutInMillis()) - .option(ChannelOption.RECVBUF_ALLOCATOR, receiveBufferAllocator) + .option(ChannelOption.RCVBUF_ALLOCATOR, receiveBufferAllocator) .option(ChannelOption.SO_KEEPALIVE, true) .remoteAddress(this.serverKey.getHost(), this.serverKey.getPort()); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/guava25/hash/Striped64.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/guava25/hash/Striped64.java index 972b20ca5a37..df3dff010fb8 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/guava25/hash/Striped64.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/guava25/hash/Striped64.java @@ -24,6 +24,8 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; import java.util.concurrent.atomic.AtomicLongFieldUpdater; +import static io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess.UNSAFE; + /** * A package-local class holding common representation and mechanics for classes supporting dynamic * striping on 64bit values. The class extends Number so that concrete subclasses must publicly do diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java index ed2252a49828..03c76b7dfc10 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java @@ -6,8 +6,6 @@ import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.implementation.ImplementationBridgeHelpers; import io.netty.buffer.ByteBuf; -import io.netty.buffer.ByteBufAllocator; -import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.Channel; import io.netty.channel.ChannelId; import io.netty.channel.ChannelOption; @@ -18,7 +16,6 @@ import io.netty.resolver.DefaultAddressResolverGroup; import io.netty.util.ReferenceCountUtil; import io.netty.util.ResourceLeakDetector; -import io.netty.util.internal.SystemPropertyUtil; import org.reactivestreams.Publisher; import org.reactivestreams.Subscription; import org.slf4j.Logger; @@ -54,11 +51,6 @@ private static ImplementationBridgeHelpers.Http2ConnectionConfigHelper.Http2Conn private static final boolean leakDetectionDebuggingEnabled = ResourceLeakDetector.getLevel().ordinal() >= ResourceLeakDetector.Level.ADVANCED.ordinal(); private static final String REACTOR_NETTY_REQUEST_RECORD_KEY = "reactorNettyRequestRecordKey"; - // If io.netty.allocator.type was configured, respect the configuration. Otherwise, fallback to the default setting - // from Netty 4.1 which was the pooled allocator. In the future, this should be validated for if this should use the - // new Netty 4.2 default which is an adaptive allocator. - private static final ByteBufAllocator DEFAULT_ALLOCATOR = SystemPropertyUtil.contains("io.netty.allocator.type") - ? ByteBufAllocator.DEFAULT : PooledByteBufAllocator.DEFAULT; private static final Logger logger = LoggerFactory.getLogger(ReactorNettyClient.class.getSimpleName()); @@ -142,7 +134,6 @@ private void configureChannelPipelineHandlers() { configs.getSslContext( httpClientConfig.isServerCertValidationDisabled(), false))) - .option(ChannelOption.ALLOCATOR, DEFAULT_ALLOCATOR) .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, (int) this.httpClientConfig.getConnectionAcquireTimeout().toMillis()) .httpResponseDecoder(httpResponseDecoderSpec -> httpResponseDecoderSpec.maxInitialLineLength(this.httpClientConfig.getMaxInitialLineLength()) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java index 1b1ac64ec04f..f3faeda09014 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java @@ -12,7 +12,6 @@ requires io.netty.common; requires io.netty.buffer; requires io.netty.codec; - requires io.netty.codec.compression; requires io.netty.resolver; requires io.netty.codec.http; requires io.netty.codec.http2; diff --git a/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml b/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml index 8d3de751a610..febe68bb529b 100644 --- a/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml +++ b/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml @@ -74,13 +74,13 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test com.azure.resourcemanager azure-resourcemanager-network - 2.62.0 + 2.61.2 test diff --git a/sdk/cosmos/cspell.yml b/sdk/cosmos/cspell.yml index a0a1da433f55..31e8b2522d0b 100644 --- a/sdk/cosmos/cspell.yml +++ b/sdk/cosmos/cspell.yml @@ -42,7 +42,6 @@ words: - "jgss" - "jnilib" - "jodd" - - "jpms" - "kihn" - "ksql" - "latencyutils" diff --git a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml index 380c5ea3379a..d9e03c0e1270 100644 --- a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml +++ b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml @@ -78,7 +78,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/src/test/java/com/azure/ai/documentintelligence/DocumentModelAdministrationAsyncClientTest.java b/sdk/documentintelligence/azure-ai-documentintelligence/src/test/java/com/azure/ai/documentintelligence/DocumentModelAdministrationAsyncClientTest.java index c8ab94462887..20ad77383040 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/src/test/java/com/azure/ai/documentintelligence/DocumentModelAdministrationAsyncClientTest.java +++ b/sdk/documentintelligence/azure-ai-documentintelligence/src/test/java/com/azure/ai/documentintelligence/DocumentModelAdministrationAsyncClientTest.java @@ -29,6 +29,7 @@ import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -104,7 +105,7 @@ public void deleteModelValidModelIdWithResponse(HttpClient httpClient, syncPoller1.waitForCompletion(); StepVerifier.create(client.deleteModelWithResponse(modelId, null)) - .assertNext(response -> assertEquals(204, response.getStatusCode())) + .assertNext(response -> assertEquals(response.getStatusCode(), HttpResponseStatus.NO_CONTENT.code())) .expectComplete() .verify(DEFAULT_TIMEOUT); } diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/src/test/java/com/azure/ai/documentintelligence/DocumentModelAdministrationClientTest.java b/sdk/documentintelligence/azure-ai-documentintelligence/src/test/java/com/azure/ai/documentintelligence/DocumentModelAdministrationClientTest.java index a5b1465dcb9e..28cd4ccdffca 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/src/test/java/com/azure/ai/documentintelligence/DocumentModelAdministrationClientTest.java +++ b/sdk/documentintelligence/azure-ai-documentintelligence/src/test/java/com/azure/ai/documentintelligence/DocumentModelAdministrationClientTest.java @@ -25,6 +25,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; @@ -76,7 +77,7 @@ public void getModelWithResponse(HttpClient httpClient, DocumentIntelligenceServ Response documentModelResponse = client.getModelWithResponse(documentModelDetails.getModelId(), null); - assertEquals(200, documentModelResponse.getStatusCode()); + assertEquals(documentModelResponse.getStatusCode(), HttpResponseStatus.OK.code()); } /** @@ -98,7 +99,7 @@ public void validGetResourceDetailsWithResponse(HttpClient httpClient, DocumentIntelligenceServiceVersion serviceVersion) { client = getModelAdministrationClient(httpClient, serviceVersion); Response resourceDetailsResponse = client.getResourceDetailsWithResponse(null); - assertEquals(200, resourceDetailsResponse.getStatusCode()); + assertEquals(resourceDetailsResponse.getStatusCode(), HttpResponseStatus.OK.code()); } @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @@ -118,7 +119,7 @@ public void deleteModelValidModelIDWithResponse(HttpClient httpClient, final Response deleteModelWithResponse = client.deleteModelWithResponse(createdModel.getModelId(), null); - assertEquals(204, deleteModelWithResponse.getStatusCode()); + assertEquals(deleteModelWithResponse.getStatusCode(), HttpResponseStatus.NO_CONTENT.code()); } /** diff --git a/sdk/easm/azure-analytics-defender-easm/CHANGELOG.md b/sdk/easm/azure-analytics-defender-easm/CHANGELOG.md new file mode 100644 index 000000000000..5a1577e40513 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/CHANGELOG.md @@ -0,0 +1,20 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +- Removed `subscriptionId`, `resourceGroupName`, `workspaceName` API from `EasmClientBuilder` client builder. + Please set all of these values into `endpoint` API, e.g. `builder.endpoint("https:///subscriptions//resourceGroups//workspaces//")`. +- Removed Jackson annotations from models and removed custom serializer for raw JSON fields. + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.1 (2023-11-07) + +- Azure EASM (External Attack Surface Management) client library for Java. This package contains Microsoft Azure EASM client library. + diff --git a/sdk/easm/azure-analytics-defender-easm/README.md b/sdk/easm/azure-analytics-defender-easm/README.md new file mode 100644 index 000000000000..d448c5ac7582 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/README.md @@ -0,0 +1,110 @@ +# Azure EASM client library for Java + +*Microsoft Defender External Attack Surface Management (Defender EASM)* continuously discovers and maps your digital attack surface to provide an external view of your online infrastructure. This visibility enables security and IT teams to identify unknowns, prioritize risk, eliminate threats, and extend vulnerability and exposure control beyond the firewall. Defender EASM leverages Microsoft’s crawling technology to discover assets that are related to your known online infrastructure, and actively scans these assets to discover new connections over time. Attack Surface Insights are generated by leveraging vulnerability and infrastructure data to showcase the key areas of concern for your organization. + +This package contains Microsoft Azure EASM Defender client library. + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] +- [Product documentation][product_documentation] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure:azure-analytics-defender-easm;current}) +```xml + + com.azure + azure-analytics-defender-easm + 1.0.0-beta.2 + +``` +[//]: # ({x-version-update-end}) + +### Authentication + +[Azure Identity][azure_identity] package provides the default implementation for authenticating the client. + +## Key concepts +### [Assets][assets_documentation] +Defender EASM includes the discovery of the following kinds of assets: +- Domains +- Hosts +- Pages +- IP Blocks +- IP Addresses +- Autonomous System Numbers (ASNs) +- SSL Certificates +- WHOIS Contacts + +These asset types comprise your attack surface inventory in Defender EASM. This solution discovers externally facing assets that are exposed to the open internet outside of traditional firewall protection; they need to be monitored and maintained to minimize risk and improve an organization’s security posture. Microsoft Defender External Attack Surface Management (Defender EASM) actively discovers and monitors these assets, then surfacing key insights that help customers efficiently address any vulnerabilities in their organization. + +### [Discovery][discovery_documentation] +Microsoft Defender External Attack Surface Management (Defender EASM) relies on our proprietary discovery technology to continuously define your organization’s unique Internet-exposed attack surface. Discovery scans known assets owned by your organization to uncover previously unknown and unmonitored properties. Discovered assets are indexed in a customer’s inventory, providing a dynamic system of record of web applications, third party dependencies, and web infrastructure under the organization’s management through a single pane of glass. + +#### [Discovery Groups][discovery_groups_documentation] +Custom discoveries are organized into Discovery Groups. They are independent seed clusters that comprise a single discovery run and operate on their own recurrence schedules. Users can elect to organize their Discovery Groups to delineate assets in whatever way best benefits their company and workflows. Common options include organizing by responsible team/business unit, brands or subsidiaries. + +## Examples + +```java readme-sample-createDefenderEasmClient +String endpoint = Configuration.getGlobalConfiguration().get("ENDPOINT"); + +EasmClient easmClient = new EasmClientBuilder() + .endpoint(endpoint) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); +``` +| **File Name** | **Description** | +|----------------------------------------------------------------|--------------------------------------------------------| +| [DiscoveryRunsSample.java][discovery_runs_sample] | Create and manage a discovery group | +| [DiscoTemplateSample.java][disco_template_sample] | Create discovery groups using a template | +| [SavedFilterSample.java][saved_filter_sample] | Use saved filters to synchronize queries across scripts | +| [ManagingExternalIdsSample.java][external_ids_sample] | Tag assets automatically with external ids | + +## Troubleshooting +### Enabling Logging + +Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite +their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help +locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. +## Next steps +These code samples show common scenario operations with the Azure Anomaly Detector library. More samples can be found under the [samples][samples] directory. + +For more extensive documentation on Microsoft Defender External Attack Surface Management, see the [Defender EASM][product_documentation]: https://azure.microsoft.com/services/ +on learn.microsoft.com. +## Contributing + +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request + + +[product_documentation]: https://learn.microsoft.com/azure/external-attack-surface-management/ +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[discovery_runs_sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoveryRunsSample.java +[disco_template_sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoTemplateSample.java +[saved_filter_sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/SavedFilterSample.java +[external_ids_sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ManagingExternalIdsSample.java +[logging]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/logging.md +[samples]: https://github.com/Azure/azure-sdk-for-java/tree/main/samples +[assets_documentation]: https://learn.microsoft.com/azure/external-attack-surface-management/understanding-inventory-assets +[discovery_documentation]: https://learn.microsoft.com/azure/external-attack-surface-management/what-is-discovery +[discovery_groups_documentation]: https://learn.microsoft.com/azure/external-attack-surface-management/using-and-managing-discovery#discovery-groups + diff --git a/sdk/easm/azure-analytics-defender-easm/assets.json b/sdk/easm/azure-analytics-defender-easm/assets.json new file mode 100644 index 000000000000..4c0e5bf4d2bf --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo" : "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath" : "java", + "TagPrefix" : "java/easm/azure-analytics-defender-easm", + "Tag" : "java/easm/azure-analytics-defender-easm_db0274cf78" +} diff --git a/sdk/easm/azure-analytics-defender-easm/checkstyle-suppressions.xml b/sdk/easm/azure-analytics-defender-easm/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/easm/azure-analytics-defender-easm/pom.xml b/sdk/easm/azure-analytics-defender-easm/pom.xml new file mode 100644 index 000000000000..2e26360614d6 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/pom.xml @@ -0,0 +1,74 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-analytics-defender-easm + 1.0.0-beta.2 + jar + + Microsoft Azure SDK for Easm + This package contains Microsoft Azure Easm client library. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0.30 + + false + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/easm/azure-analytics-defender-easm/spotbugs-exclude.xml b/sdk/easm/azure-analytics-defender-easm/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmAsyncClient.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmAsyncClient.java new file mode 100644 index 000000000000..fc9047bed20c --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmAsyncClient.java @@ -0,0 +1,2294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.implementation.EasmClientImpl; +import com.azure.analytics.defender.easm.models.AssetResource; +import com.azure.analytics.defender.easm.models.AssetUpdateData; +import com.azure.analytics.defender.easm.models.DataConnection; +import com.azure.analytics.defender.easm.models.DataConnectionData; +import com.azure.analytics.defender.easm.models.DiscoGroup; +import com.azure.analytics.defender.easm.models.DiscoGroupData; +import com.azure.analytics.defender.easm.models.DiscoRunResult; +import com.azure.analytics.defender.easm.models.DiscoTemplate; +import com.azure.analytics.defender.easm.models.ReportAssetSnapshotRequest; +import com.azure.analytics.defender.easm.models.ReportAssetSnapshotResult; +import com.azure.analytics.defender.easm.models.ReportAssetSummaryRequest; +import com.azure.analytics.defender.easm.models.ReportAssetSummaryResult; +import com.azure.analytics.defender.easm.models.ReportBillableAssetSummaryResult; +import com.azure.analytics.defender.easm.models.SavedFilter; +import com.azure.analytics.defender.easm.models.SavedFilterData; +import com.azure.analytics.defender.easm.models.Task; +import com.azure.analytics.defender.easm.models.ValidateResult; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.FluxUtil; +import java.util.stream.Collectors; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous EasmClient type. + */ +@ServiceClient(builder = EasmClientBuilder.class, isAsync = true) +public final class EasmAsyncClient { + + @Generated + private final EasmClientImpl serviceClient; + + /** + * Initializes an instance of EasmAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + EasmAsyncClient(EasmClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Retrieve a list of assets for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      markStringNoSpecify this value instead of 'skip' to use cursor-based + * searching. Initial value is '*' and subsequent values are returned in the response.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of AssetResource items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAssetResource(RequestOptions requestOptions) { + return this.serviceClient.listAssetResourceAsync(requestOptions); + } + + /** + * Update labels on assets matching the provided filter. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): {
      +     *         String: boolean (Required)
      +     *     }
      +     *     transfers: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param filter An expression on the resource type that selects the resources to be returned. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateAssetsWithResponse(String filter, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.updateAssetsWithResponseAsync(filter, body, requestOptions); + } + + /** + * Retrieve an asset by assetId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param assetId The system generated unique id for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the items in the current page of results along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAssetResourceWithResponse(String assetId, RequestOptions requestOptions) { + return this.serviceClient.getAssetResourceWithResponseAsync(assetId, requestOptions); + } + + /** + * Retrieve a list of data connections. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DataConnection items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDataConnection(RequestOptions requestOptions) { + return this.serviceClient.listDataConnectionAsync(requestOptions); + } + + /** + * Validate a data connection with a given dataConnectionName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     name: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         innererror (Optional): {
      +     *             code: String (Optional)
      +     *             value: BinaryData (Optional)
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return validate result for validate action endpoints along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> validateDataConnectionWithResponse(BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.validateDataConnectionWithResponseAsync(body, requestOptions); + } + + /** + * Retrieve a data connection with a given dataConnectionName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDataConnectionWithResponse(String dataConnectionName, + RequestOptions requestOptions) { + return this.serviceClient.getDataConnectionWithResponseAsync(dataConnectionName, requestOptions); + } + + /** + * Create or replace a data connection with a given dataConnectionName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     name: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrReplaceDataConnectionWithResponse(String dataConnectionName, + BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.createOrReplaceDataConnectionWithResponseAsync(dataConnectionName, body, + requestOptions); + } + + /** + * Delete a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDataConnectionWithResponse(String dataConnectionName, + RequestOptions requestOptions) { + return this.serviceClient.deleteDataConnectionWithResponseAsync(dataConnectionName, requestOptions); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoGroup items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDiscoGroup(RequestOptions requestOptions) { + return this.serviceClient.listDiscoGroupAsync(requestOptions); + } + + /** + * Validate a discovery group with a given groupName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         innererror (Optional): {
      +     *             code: String (Optional)
      +     *             value: BinaryData (Optional)
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return validate result for validate action endpoints along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> validateDiscoGroupWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.validateDiscoGroupWithResponseAsync(body, requestOptions); + } + + /** + * Retrieve a discovery group with a given groupName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDiscoGroupWithResponse(String groupName, RequestOptions requestOptions) { + return this.serviceClient.getDiscoGroupWithResponseAsync(groupName, requestOptions); + } + + /** + * Create a discovery group with a given groupName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrReplaceDiscoGroupWithResponse(String groupName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrReplaceDiscoGroupWithResponseAsync(groupName, body, requestOptions); + } + + /** + * Run a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> runDiscoGroupWithResponse(String groupName, RequestOptions requestOptions) { + return this.serviceClient.runDiscoGroupWithResponseAsync(groupName, requestOptions); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     submittedDate: OffsetDateTime (Optional)
      +     *     startedDate: OffsetDateTime (Optional)
      +     *     completedDate: OffsetDateTime (Optional)
      +     *     tier: String (Optional)
      +     *     state: String(pending/running/completed/failed) (Optional)
      +     *     totalAssetsFoundCount: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The unique identifier for the discovery group. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRuns(String groupName, RequestOptions requestOptions) { + return this.serviceClient.listRunsAsync(groupName, requestOptions); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoTemplate items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDiscoTemplate(RequestOptions requestOptions) { + return this.serviceClient.listDiscoTemplateAsync(requestOptions); + } + + /** + * Retrieve a disco template with a given templateId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param templateId The system generated unique id for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the items in the current page of results along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDiscoTemplateWithResponse(String templateId, RequestOptions requestOptions) { + return this.serviceClient.getDiscoTemplateWithResponseAsync(templateId, requestOptions); + } + + /** + * Get billable assets summary for the workspace. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     assetSummaries (Optional): [
      +     *          (Optional){
      +     *             date: LocalDate (Optional)
      +     *             total: Long (Optional)
      +     *             assetBreakdown (Optional): [
      +     *                  (Optional){
      +     *                     kind: String(domain/host/ipAddress) (Optional)
      +     *                     count: Long (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return billable assets summary for the workspace along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getBillableWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getBillableWithResponseAsync(requestOptions); + } + + /** + * Get the most recent snapshot of asset summary values for the snapshot request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     metric: String (Optional)
      +     *     labelName: String (Optional)
      +     *     size: Integer (Optional)
      +     *     page: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     displayName: String (Optional)
      +     *     metric: String (Optional)
      +     *     labelName: String (Optional)
      +     *     updatedAt: OffsetDateTime (Optional)
      +     *     description: String (Optional)
      +     *     assets (Optional): {
      +     *         totalElements: Long (Optional)
      +     *         mark: String (Optional)
      +     *         nextLink: String (Optional)
      +     *         value (Optional): [
      +     *              (Optional){
      +     *                 kind: String (Required)
      +     *                 id: String (Required)
      +     *                 name: String (Optional)
      +     *                 displayName: String (Optional)
      +     *                 uuid: String (Optional)
      +     *                 createdDate: OffsetDateTime (Optional)
      +     *                 updatedDate: OffsetDateTime (Optional)
      +     *                 state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *                 externalId: String (Optional)
      +     *                 labels (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 wildcard: Boolean (Optional)
      +     *                 discoGroupName: String (Optional)
      +     *                 auditTrail (Optional): [
      +     *                      (Optional){
      +     *                         id: String (Optional)
      +     *                         name: String (Optional)
      +     *                         displayName: String (Optional)
      +     *                         kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *                         reason: String (Optional)
      +     *                     }
      +     *                 ]
      +     *                 reason: String (Optional)
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the most recent snapshot of asset summary values for the snapshot request along with {@link Response} on + * successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSnapshotWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.getSnapshotWithResponseAsync(body, requestOptions); + } + + /** + * Get asset summary details for the summary request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     metricCategories (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     metrics (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     filters (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     groupBy: String (Optional)
      +     *     segmentBy: String (Optional)
      +     *     labelName: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     assetSummaries (Optional): [
      +     *          (Optional){
      +     *             displayName: String (Optional)
      +     *             description: String (Optional)
      +     *             updatedAt: OffsetDateTime (Optional)
      +     *             metricCategory: String (Optional)
      +     *             metric: String (Optional)
      +     *             filter: String (Optional)
      +     *             labelName: String (Optional)
      +     *             count: Long (Optional)
      +     *             link: String (Optional)
      +     *             children (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return asset summary details for the summary request along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSummaryWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.getSummaryWithResponseAsync(body, requestOptions); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of SavedFilter items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSavedFilter(RequestOptions requestOptions) { + return this.serviceClient.listSavedFilterAsync(requestOptions); + } + + /** + * Retrieve a saved filter by filterName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param filterName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSavedFilterWithResponse(String filterName, RequestOptions requestOptions) { + return this.serviceClient.getSavedFilterWithResponseAsync(filterName, requestOptions); + } + + /** + * Create or replace a saved filter with a given filterName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     filter: String (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param filterName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrReplaceSavedFilterWithResponse(String filterName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrReplaceSavedFilterWithResponseAsync(filterName, body, requestOptions); + } + + /** + * Delete a saved filter with a given filterName. + * + * @param filterName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteSavedFilterWithResponse(String filterName, RequestOptions requestOptions) { + return this.serviceClient.deleteSavedFilterWithResponseAsync(filterName, requestOptions); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of Task items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTask(RequestOptions requestOptions) { + return this.serviceClient.listTaskAsync(requestOptions); + } + + /** + * Retrieve a task by taskId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The unique identifier of the task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTaskWithResponse(String taskId, RequestOptions requestOptions) { + return this.serviceClient.getTaskWithResponseAsync(taskId, requestOptions); + } + + /** + * Cancel a task by taskId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The unique identifier of the task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelTaskWithResponse(String taskId, RequestOptions requestOptions) { + return this.serviceClient.cancelTaskWithResponseAsync(taskId, requestOptions); + } + + /** + * Retrieve a list of assets for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param orderBy A list of expressions that specify the order of the returned resources. + * @param skip The number of result items to skip. + * @param mark Specify this value instead of 'skip' to use cursor-based searching. Initial value is '*' and + * subsequent values are returned in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of AssetResource items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAssetResource(String filter, String orderBy, Integer skip, String mark) { + // Generated convenience method for listAssetResource + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (orderBy != null) { + requestOptions.addQueryParam("orderby", orderBy, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + if (mark != null) { + requestOptions.addQueryParam("mark", mark, false); + } + PagedFlux pagedFluxResponse = listAssetResource(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(AssetResource.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a list of assets for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of AssetResource items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAssetResource() { + // Generated convenience method for listAssetResource + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listAssetResource(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(AssetResource.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Update labels on assets matching the provided filter. + * + * @param filter An expression on the resource type that selects the resources to be returned. + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAssets(String filter, AssetUpdateData body) { + // Generated convenience method for updateAssetsWithResponse + RequestOptions requestOptions = new RequestOptions(); + return updateAssetsWithResponse(filter, BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(Task.class)); + } + + /** + * Retrieve an asset by assetId. + * + * @param assetId The system generated unique id for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the items in the current page of results on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAssetResource(String assetId) { + // Generated convenience method for getAssetResourceWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getAssetResourceWithResponse(assetId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(AssetResource.class)); + } + + /** + * Retrieve a list of data connections. + * + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DataConnection items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDataConnection(Integer skip) { + // Generated convenience method for listDataConnection + RequestOptions requestOptions = new RequestOptions(); + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + PagedFlux pagedFluxResponse = listDataConnection(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(DataConnection.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a list of data connections. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DataConnection items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDataConnection() { + // Generated convenience method for listDataConnection + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listDataConnection(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(DataConnection.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Validate a data connection with a given dataConnectionName. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate result for validate action endpoints on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono validateDataConnection(DataConnectionData body) { + // Generated convenience method for validateDataConnectionWithResponse + RequestOptions requestOptions = new RequestOptions(); + return validateDataConnectionWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ValidateResult.class)); + } + + /** + * Retrieve a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getDataConnection(String dataConnectionName) { + // Generated convenience method for getDataConnectionWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getDataConnectionWithResponse(dataConnectionName, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(DataConnection.class)); + } + + /** + * Create or replace a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrReplaceDataConnection(String dataConnectionName, DataConnectionData body) { + // Generated convenience method for createOrReplaceDataConnectionWithResponse + RequestOptions requestOptions = new RequestOptions(); + return createOrReplaceDataConnectionWithResponse(dataConnectionName, BinaryData.fromObject(body), + requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(DataConnection.class)); + } + + /** + * Delete a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteDataConnection(String dataConnectionName) { + // Generated convenience method for deleteDataConnectionWithResponse + RequestOptions requestOptions = new RequestOptions(); + return deleteDataConnectionWithResponse(dataConnectionName, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DiscoGroup items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDiscoGroup(String filter, Integer skip) { + // Generated convenience method for listDiscoGroup + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + PagedFlux pagedFluxResponse = listDiscoGroup(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(DiscoGroup.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DiscoGroup items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDiscoGroup() { + // Generated convenience method for listDiscoGroup + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listDiscoGroup(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(DiscoGroup.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Validate a discovery group with a given groupName. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate result for validate action endpoints on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono validateDiscoGroup(DiscoGroupData body) { + // Generated convenience method for validateDiscoGroupWithResponse + RequestOptions requestOptions = new RequestOptions(); + return validateDiscoGroupWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ValidateResult.class)); + } + + /** + * Retrieve a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getDiscoGroup(String groupName) { + // Generated convenience method for getDiscoGroupWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getDiscoGroupWithResponse(groupName, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(DiscoGroup.class)); + } + + /** + * Create a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrReplaceDiscoGroup(String groupName, DiscoGroupData body) { + // Generated convenience method for createOrReplaceDiscoGroupWithResponse + RequestOptions requestOptions = new RequestOptions(); + return createOrReplaceDiscoGroupWithResponse(groupName, BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(DiscoGroup.class)); + } + + /** + * Run a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono runDiscoGroup(String groupName) { + // Generated convenience method for runDiscoGroupWithResponse + RequestOptions requestOptions = new RequestOptions(); + return runDiscoGroupWithResponse(groupName, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + * + * @param groupName The unique identifier for the discovery group. + * @param filter Filter the result list using the given expression. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRuns(String groupName, String filter, Integer skip) { + // Generated convenience method for listRuns + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + PagedFlux pagedFluxResponse = listRuns(groupName, requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(DiscoRunResult.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + * + * @param groupName The unique identifier for the discovery group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRuns(String groupName) { + // Generated convenience method for listRuns + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listRuns(groupName, requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(DiscoRunResult.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DiscoTemplate items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDiscoTemplate(String filter, Integer skip) { + // Generated convenience method for listDiscoTemplate + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + PagedFlux pagedFluxResponse = listDiscoTemplate(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(DiscoTemplate.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DiscoTemplate items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDiscoTemplate() { + // Generated convenience method for listDiscoTemplate + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listDiscoTemplate(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(DiscoTemplate.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a disco template with a given templateId. + * + * @param templateId The system generated unique id for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the items in the current page of results on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getDiscoTemplate(String templateId) { + // Generated convenience method for getDiscoTemplateWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getDiscoTemplateWithResponse(templateId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(DiscoTemplate.class)); + } + + /** + * Get billable assets summary for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return billable assets summary for the workspace on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getBillable() { + // Generated convenience method for getBillableWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getBillableWithResponse(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ReportBillableAssetSummaryResult.class)); + } + + /** + * Get the most recent snapshot of asset summary values for the snapshot request. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the most recent snapshot of asset summary values for the snapshot request on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSnapshot(ReportAssetSnapshotRequest body) { + // Generated convenience method for getSnapshotWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getSnapshotWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ReportAssetSnapshotResult.class)); + } + + /** + * Get asset summary details for the summary request. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset summary details for the summary request on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSummary(ReportAssetSummaryRequest body) { + // Generated convenience method for getSummaryWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getSummaryWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ReportAssetSummaryResult.class)); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of SavedFilter items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSavedFilter(String filter, Integer skip) { + // Generated convenience method for listSavedFilter + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + PagedFlux pagedFluxResponse = listSavedFilter(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(SavedFilter.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of SavedFilter items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSavedFilter() { + // Generated convenience method for listSavedFilter + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listSavedFilter(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(SavedFilter.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a saved filter by filterName. + * + * @param filterName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSavedFilter(String filterName) { + // Generated convenience method for getSavedFilterWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getSavedFilterWithResponse(filterName, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(SavedFilter.class)); + } + + /** + * Create or replace a saved filter with a given filterName. + * + * @param filterName The caller provided unique name for the resource. + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrReplaceSavedFilter(String filterName, SavedFilterData body) { + // Generated convenience method for createOrReplaceSavedFilterWithResponse + RequestOptions requestOptions = new RequestOptions(); + return createOrReplaceSavedFilterWithResponse(filterName, BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(SavedFilter.class)); + } + + /** + * Delete a saved filter with a given filterName. + * + * @param filterName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteSavedFilter(String filterName) { + // Generated convenience method for deleteSavedFilterWithResponse + RequestOptions requestOptions = new RequestOptions(); + return deleteSavedFilterWithResponse(filterName, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param orderBy A list of expressions that specify the order of the returned resources. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of Task items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTask(String filter, String orderBy, Integer skip) { + // Generated convenience method for listTask + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (orderBy != null) { + requestOptions.addQueryParam("orderby", orderBy, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + PagedFlux pagedFluxResponse = listTask(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(Task.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of Task items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTask() { + // Generated convenience method for listTask + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listTask(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux; + if (pageSizeParam == null) { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + } else { + flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage(pageSizeParam).take(1) + : pagedFluxResponse.byPage(continuationTokenParam, pageSizeParam).take(1); + } + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(Task.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Retrieve a task by taskId. + * + * @param taskId The unique identifier of the task. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTask(String taskId) { + // Generated convenience method for getTaskWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTaskWithResponse(taskId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(Task.class)); + } + + /** + * Cancel a task by taskId. + * + * @param taskId The unique identifier of the task. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelTask(String taskId) { + // Generated convenience method for cancelTaskWithResponse + RequestOptions requestOptions = new RequestOptions(); + return cancelTaskWithResponse(taskId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(Task.class)); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmClient.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmClient.java new file mode 100644 index 000000000000..81e859071444 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmClient.java @@ -0,0 +1,2011 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.implementation.EasmClientImpl; +import com.azure.analytics.defender.easm.models.AssetResource; +import com.azure.analytics.defender.easm.models.AssetUpdateData; +import com.azure.analytics.defender.easm.models.DataConnection; +import com.azure.analytics.defender.easm.models.DataConnectionData; +import com.azure.analytics.defender.easm.models.DiscoGroup; +import com.azure.analytics.defender.easm.models.DiscoGroupData; +import com.azure.analytics.defender.easm.models.DiscoRunResult; +import com.azure.analytics.defender.easm.models.DiscoTemplate; +import com.azure.analytics.defender.easm.models.ReportAssetSnapshotRequest; +import com.azure.analytics.defender.easm.models.ReportAssetSnapshotResult; +import com.azure.analytics.defender.easm.models.ReportAssetSummaryRequest; +import com.azure.analytics.defender.easm.models.ReportAssetSummaryResult; +import com.azure.analytics.defender.easm.models.ReportBillableAssetSummaryResult; +import com.azure.analytics.defender.easm.models.SavedFilter; +import com.azure.analytics.defender.easm.models.SavedFilterData; +import com.azure.analytics.defender.easm.models.Task; +import com.azure.analytics.defender.easm.models.ValidateResult; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous EasmClient type. + */ +@ServiceClient(builder = EasmClientBuilder.class) +public final class EasmClient { + + @Generated + private final EasmClientImpl serviceClient; + + /** + * Initializes an instance of EasmClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + EasmClient(EasmClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Retrieve a list of assets for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      markStringNoSpecify this value instead of 'skip' to use cursor-based + * searching. Initial value is '*' and subsequent values are returned in the response.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of AssetResource items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAssetResource(RequestOptions requestOptions) { + return this.serviceClient.listAssetResource(requestOptions); + } + + /** + * Update labels on assets matching the provided filter. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): {
      +     *         String: boolean (Required)
      +     *     }
      +     *     transfers: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param filter An expression on the resource type that selects the resources to be returned. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAssetsWithResponse(String filter, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.updateAssetsWithResponse(filter, body, requestOptions); + } + + /** + * Retrieve an asset by assetId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param assetId The system generated unique id for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the items in the current page of results along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAssetResourceWithResponse(String assetId, RequestOptions requestOptions) { + return this.serviceClient.getAssetResourceWithResponse(assetId, requestOptions); + } + + /** + * Retrieve a list of data connections. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DataConnection items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDataConnection(RequestOptions requestOptions) { + return this.serviceClient.listDataConnection(requestOptions); + } + + /** + * Validate a data connection with a given dataConnectionName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     name: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         innererror (Optional): {
      +     *             code: String (Optional)
      +     *             value: BinaryData (Optional)
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return validate result for validate action endpoints along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateDataConnectionWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.validateDataConnectionWithResponse(body, requestOptions); + } + + /** + * Retrieve a data connection with a given dataConnectionName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDataConnectionWithResponse(String dataConnectionName, + RequestOptions requestOptions) { + return this.serviceClient.getDataConnectionWithResponse(dataConnectionName, requestOptions); + } + + /** + * Create or replace a data connection with a given dataConnectionName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     name: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrReplaceDataConnectionWithResponse(String dataConnectionName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrReplaceDataConnectionWithResponse(dataConnectionName, body, requestOptions); + } + + /** + * Delete a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDataConnectionWithResponse(String dataConnectionName, RequestOptions requestOptions) { + return this.serviceClient.deleteDataConnectionWithResponse(dataConnectionName, requestOptions); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoGroup items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDiscoGroup(RequestOptions requestOptions) { + return this.serviceClient.listDiscoGroup(requestOptions); + } + + /** + * Validate a discovery group with a given groupName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         innererror (Optional): {
      +     *             code: String (Optional)
      +     *             value: BinaryData (Optional)
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return validate result for validate action endpoints along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateDiscoGroupWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.validateDiscoGroupWithResponse(body, requestOptions); + } + + /** + * Retrieve a discovery group with a given groupName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDiscoGroupWithResponse(String groupName, RequestOptions requestOptions) { + return this.serviceClient.getDiscoGroupWithResponse(groupName, requestOptions); + } + + /** + * Create a discovery group with a given groupName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrReplaceDiscoGroupWithResponse(String groupName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrReplaceDiscoGroupWithResponse(groupName, body, requestOptions); + } + + /** + * Run a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response runDiscoGroupWithResponse(String groupName, RequestOptions requestOptions) { + return this.serviceClient.runDiscoGroupWithResponse(groupName, requestOptions); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     submittedDate: OffsetDateTime (Optional)
      +     *     startedDate: OffsetDateTime (Optional)
      +     *     completedDate: OffsetDateTime (Optional)
      +     *     tier: String (Optional)
      +     *     state: String(pending/running/completed/failed) (Optional)
      +     *     totalAssetsFoundCount: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The unique identifier for the discovery group. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRuns(String groupName, RequestOptions requestOptions) { + return this.serviceClient.listRuns(groupName, requestOptions); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoTemplate items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDiscoTemplate(RequestOptions requestOptions) { + return this.serviceClient.listDiscoTemplate(requestOptions); + } + + /** + * Retrieve a disco template with a given templateId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param templateId The system generated unique id for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the items in the current page of results along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDiscoTemplateWithResponse(String templateId, RequestOptions requestOptions) { + return this.serviceClient.getDiscoTemplateWithResponse(templateId, requestOptions); + } + + /** + * Get billable assets summary for the workspace. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     assetSummaries (Optional): [
      +     *          (Optional){
      +     *             date: LocalDate (Optional)
      +     *             total: Long (Optional)
      +     *             assetBreakdown (Optional): [
      +     *                  (Optional){
      +     *                     kind: String(domain/host/ipAddress) (Optional)
      +     *                     count: Long (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return billable assets summary for the workspace along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBillableWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getBillableWithResponse(requestOptions); + } + + /** + * Get the most recent snapshot of asset summary values for the snapshot request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     metric: String (Optional)
      +     *     labelName: String (Optional)
      +     *     size: Integer (Optional)
      +     *     page: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     displayName: String (Optional)
      +     *     metric: String (Optional)
      +     *     labelName: String (Optional)
      +     *     updatedAt: OffsetDateTime (Optional)
      +     *     description: String (Optional)
      +     *     assets (Optional): {
      +     *         totalElements: Long (Optional)
      +     *         mark: String (Optional)
      +     *         nextLink: String (Optional)
      +     *         value (Optional): [
      +     *              (Optional){
      +     *                 kind: String (Required)
      +     *                 id: String (Required)
      +     *                 name: String (Optional)
      +     *                 displayName: String (Optional)
      +     *                 uuid: String (Optional)
      +     *                 createdDate: OffsetDateTime (Optional)
      +     *                 updatedDate: OffsetDateTime (Optional)
      +     *                 state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *                 externalId: String (Optional)
      +     *                 labels (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 wildcard: Boolean (Optional)
      +     *                 discoGroupName: String (Optional)
      +     *                 auditTrail (Optional): [
      +     *                      (Optional){
      +     *                         id: String (Optional)
      +     *                         name: String (Optional)
      +     *                         displayName: String (Optional)
      +     *                         kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *                         reason: String (Optional)
      +     *                     }
      +     *                 ]
      +     *                 reason: String (Optional)
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the most recent snapshot of asset summary values for the snapshot request along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSnapshotWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.getSnapshotWithResponse(body, requestOptions); + } + + /** + * Get asset summary details for the summary request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     metricCategories (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     metrics (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     filters (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     groupBy: String (Optional)
      +     *     segmentBy: String (Optional)
      +     *     labelName: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     assetSummaries (Optional): [
      +     *          (Optional){
      +     *             displayName: String (Optional)
      +     *             description: String (Optional)
      +     *             updatedAt: OffsetDateTime (Optional)
      +     *             metricCategory: String (Optional)
      +     *             metric: String (Optional)
      +     *             filter: String (Optional)
      +     *             labelName: String (Optional)
      +     *             count: Long (Optional)
      +     *             link: String (Optional)
      +     *             children (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return asset summary details for the summary request along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSummaryWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.getSummaryWithResponse(body, requestOptions); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of SavedFilter items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSavedFilter(RequestOptions requestOptions) { + return this.serviceClient.listSavedFilter(requestOptions); + } + + /** + * Retrieve a saved filter by filterName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param filterName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSavedFilterWithResponse(String filterName, RequestOptions requestOptions) { + return this.serviceClient.getSavedFilterWithResponse(filterName, requestOptions); + } + + /** + * Create or replace a saved filter with a given filterName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     filter: String (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param filterName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrReplaceSavedFilterWithResponse(String filterName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrReplaceSavedFilterWithResponse(filterName, body, requestOptions); + } + + /** + * Delete a saved filter with a given filterName. + * + * @param filterName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteSavedFilterWithResponse(String filterName, RequestOptions requestOptions) { + return this.serviceClient.deleteSavedFilterWithResponse(filterName, requestOptions); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of Task items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTask(RequestOptions requestOptions) { + return this.serviceClient.listTask(requestOptions); + } + + /** + * Retrieve a task by taskId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The unique identifier of the task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTaskWithResponse(String taskId, RequestOptions requestOptions) { + return this.serviceClient.getTaskWithResponse(taskId, requestOptions); + } + + /** + * Cancel a task by taskId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The unique identifier of the task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelTaskWithResponse(String taskId, RequestOptions requestOptions) { + return this.serviceClient.cancelTaskWithResponse(taskId, requestOptions); + } + + /** + * Retrieve a list of assets for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param orderBy A list of expressions that specify the order of the returned resources. + * @param skip The number of result items to skip. + * @param mark Specify this value instead of 'skip' to use cursor-based searching. Initial value is '*' and + * subsequent values are returned in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of AssetResource items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAssetResource(String filter, String orderBy, Integer skip, String mark) { + // Generated convenience method for listAssetResource + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (orderBy != null) { + requestOptions.addQueryParam("orderby", orderBy, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + if (mark != null) { + requestOptions.addQueryParam("mark", mark, false); + } + return serviceClient.listAssetResource(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(AssetResource.class)); + } + + /** + * Retrieve a list of assets for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of AssetResource items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAssetResource() { + // Generated convenience method for listAssetResource + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listAssetResource(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(AssetResource.class)); + } + + /** + * Update labels on assets matching the provided filter. + * + * @param filter An expression on the resource type that selects the resources to be returned. + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Task updateAssets(String filter, AssetUpdateData body) { + // Generated convenience method for updateAssetsWithResponse + RequestOptions requestOptions = new RequestOptions(); + return updateAssetsWithResponse(filter, BinaryData.fromObject(body), requestOptions).getValue() + .toObject(Task.class); + } + + /** + * Retrieve an asset by assetId. + * + * @param assetId The system generated unique id for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the items in the current page of results. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public AssetResource getAssetResource(String assetId) { + // Generated convenience method for getAssetResourceWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getAssetResourceWithResponse(assetId, requestOptions).getValue().toObject(AssetResource.class); + } + + /** + * Retrieve a list of data connections. + * + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DataConnection items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDataConnection(Integer skip) { + // Generated convenience method for listDataConnection + RequestOptions requestOptions = new RequestOptions(); + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + return serviceClient.listDataConnection(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(DataConnection.class)); + } + + /** + * Retrieve a list of data connections. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DataConnection items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDataConnection() { + // Generated convenience method for listDataConnection + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listDataConnection(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(DataConnection.class)); + } + + /** + * Validate a data connection with a given dataConnectionName. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate result for validate action endpoints. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateResult validateDataConnection(DataConnectionData body) { + // Generated convenience method for validateDataConnectionWithResponse + RequestOptions requestOptions = new RequestOptions(); + return validateDataConnectionWithResponse(BinaryData.fromObject(body), requestOptions).getValue() + .toObject(ValidateResult.class); + } + + /** + * Retrieve a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnection getDataConnection(String dataConnectionName) { + // Generated convenience method for getDataConnectionWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getDataConnectionWithResponse(dataConnectionName, requestOptions).getValue() + .toObject(DataConnection.class); + } + + /** + * Create or replace a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnection createOrReplaceDataConnection(String dataConnectionName, DataConnectionData body) { + // Generated convenience method for createOrReplaceDataConnectionWithResponse + RequestOptions requestOptions = new RequestOptions(); + return createOrReplaceDataConnectionWithResponse(dataConnectionName, BinaryData.fromObject(body), + requestOptions).getValue().toObject(DataConnection.class); + } + + /** + * Delete a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteDataConnection(String dataConnectionName) { + // Generated convenience method for deleteDataConnectionWithResponse + RequestOptions requestOptions = new RequestOptions(); + deleteDataConnectionWithResponse(dataConnectionName, requestOptions).getValue(); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DiscoGroup items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDiscoGroup(String filter, Integer skip) { + // Generated convenience method for listDiscoGroup + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + return serviceClient.listDiscoGroup(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(DiscoGroup.class)); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DiscoGroup items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDiscoGroup() { + // Generated convenience method for listDiscoGroup + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listDiscoGroup(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(DiscoGroup.class)); + } + + /** + * Validate a discovery group with a given groupName. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return validate result for validate action endpoints. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateResult validateDiscoGroup(DiscoGroupData body) { + // Generated convenience method for validateDiscoGroupWithResponse + RequestOptions requestOptions = new RequestOptions(); + return validateDiscoGroupWithResponse(BinaryData.fromObject(body), requestOptions).getValue() + .toObject(ValidateResult.class); + } + + /** + * Retrieve a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public DiscoGroup getDiscoGroup(String groupName) { + // Generated convenience method for getDiscoGroupWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getDiscoGroupWithResponse(groupName, requestOptions).getValue().toObject(DiscoGroup.class); + } + + /** + * Create a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public DiscoGroup createOrReplaceDiscoGroup(String groupName, DiscoGroupData body) { + // Generated convenience method for createOrReplaceDiscoGroupWithResponse + RequestOptions requestOptions = new RequestOptions(); + return createOrReplaceDiscoGroupWithResponse(groupName, BinaryData.fromObject(body), requestOptions).getValue() + .toObject(DiscoGroup.class); + } + + /** + * Run a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void runDiscoGroup(String groupName) { + // Generated convenience method for runDiscoGroupWithResponse + RequestOptions requestOptions = new RequestOptions(); + runDiscoGroupWithResponse(groupName, requestOptions).getValue(); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + * + * @param groupName The unique identifier for the discovery group. + * @param filter Filter the result list using the given expression. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRuns(String groupName, String filter, Integer skip) { + // Generated convenience method for listRuns + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + return serviceClient.listRuns(groupName, requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(DiscoRunResult.class)); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + * + * @param groupName The unique identifier for the discovery group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRuns(String groupName) { + // Generated convenience method for listRuns + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listRuns(groupName, requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(DiscoRunResult.class)); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DiscoTemplate items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDiscoTemplate(String filter, Integer skip) { + // Generated convenience method for listDiscoTemplate + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + return serviceClient.listDiscoTemplate(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(DiscoTemplate.class)); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of DiscoTemplate items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDiscoTemplate() { + // Generated convenience method for listDiscoTemplate + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listDiscoTemplate(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(DiscoTemplate.class)); + } + + /** + * Retrieve a disco template with a given templateId. + * + * @param templateId The system generated unique id for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the items in the current page of results. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public DiscoTemplate getDiscoTemplate(String templateId) { + // Generated convenience method for getDiscoTemplateWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getDiscoTemplateWithResponse(templateId, requestOptions).getValue().toObject(DiscoTemplate.class); + } + + /** + * Get billable assets summary for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return billable assets summary for the workspace. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ReportBillableAssetSummaryResult getBillable() { + // Generated convenience method for getBillableWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getBillableWithResponse(requestOptions).getValue().toObject(ReportBillableAssetSummaryResult.class); + } + + /** + * Get the most recent snapshot of asset summary values for the snapshot request. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the most recent snapshot of asset summary values for the snapshot request. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ReportAssetSnapshotResult getSnapshot(ReportAssetSnapshotRequest body) { + // Generated convenience method for getSnapshotWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getSnapshotWithResponse(BinaryData.fromObject(body), requestOptions).getValue() + .toObject(ReportAssetSnapshotResult.class); + } + + /** + * Get asset summary details for the summary request. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return asset summary details for the summary request. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ReportAssetSummaryResult getSummary(ReportAssetSummaryRequest body) { + // Generated convenience method for getSummaryWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getSummaryWithResponse(BinaryData.fromObject(body), requestOptions).getValue() + .toObject(ReportAssetSummaryResult.class); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of SavedFilter items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSavedFilter(String filter, Integer skip) { + // Generated convenience method for listSavedFilter + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + return serviceClient.listSavedFilter(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(SavedFilter.class)); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of SavedFilter items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSavedFilter() { + // Generated convenience method for listSavedFilter + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listSavedFilter(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(SavedFilter.class)); + } + + /** + * Retrieve a saved filter by filterName. + * + * @param filterName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SavedFilter getSavedFilter(String filterName) { + // Generated convenience method for getSavedFilterWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getSavedFilterWithResponse(filterName, requestOptions).getValue().toObject(SavedFilter.class); + } + + /** + * Create or replace a saved filter with a given filterName. + * + * @param filterName The caller provided unique name for the resource. + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SavedFilter createOrReplaceSavedFilter(String filterName, SavedFilterData body) { + // Generated convenience method for createOrReplaceSavedFilterWithResponse + RequestOptions requestOptions = new RequestOptions(); + return createOrReplaceSavedFilterWithResponse(filterName, BinaryData.fromObject(body), requestOptions) + .getValue() + .toObject(SavedFilter.class); + } + + /** + * Delete a saved filter with a given filterName. + * + * @param filterName The caller provided unique name for the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSavedFilter(String filterName) { + // Generated convenience method for deleteSavedFilterWithResponse + RequestOptions requestOptions = new RequestOptions(); + deleteSavedFilterWithResponse(filterName, requestOptions).getValue(); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + * + * @param filter Filter the result list using the given expression. + * @param orderBy A list of expressions that specify the order of the returned resources. + * @param skip The number of result items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of Task items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTask(String filter, String orderBy, Integer skip) { + // Generated convenience method for listTask + RequestOptions requestOptions = new RequestOptions(); + if (filter != null) { + requestOptions.addQueryParam("filter", filter, false); + } + if (orderBy != null) { + requestOptions.addQueryParam("orderby", orderBy, false); + } + if (skip != null) { + requestOptions.addQueryParam("skip", String.valueOf(skip), false); + } + return serviceClient.listTask(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(Task.class)); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of Task items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTask() { + // Generated convenience method for listTask + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listTask(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(Task.class)); + } + + /** + * Retrieve a task by taskId. + * + * @param taskId The unique identifier of the task. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Task getTask(String taskId) { + // Generated convenience method for getTaskWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTaskWithResponse(taskId, requestOptions).getValue().toObject(Task.class); + } + + /** + * Cancel a task by taskId. + * + * @param taskId The unique identifier of the task. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Task cancelTask(String taskId) { + // Generated convenience method for cancelTaskWithResponse + RequestOptions requestOptions = new RequestOptions(); + return cancelTaskWithResponse(taskId, requestOptions).getValue().toObject(Task.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmClientBuilder.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmClientBuilder.java new file mode 100644 index 000000000000..c82d8c39723a --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmClientBuilder.java @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.implementation.EasmClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the EasmClient type. + */ +@ServiceClientBuilder(serviceClients = { EasmClient.class, EasmAsyncClient.class }) +public final class EasmClientBuilder implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://easm.defender.microsoft.com/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-defender-easm.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the EasmClientBuilder. + */ + @Generated + public EasmClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public EasmClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public EasmClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public EasmClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public EasmClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public EasmClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public EasmClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public EasmClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public EasmClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public EasmClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private EasmServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the EasmClientBuilder. + */ + @Generated + public EasmClientBuilder serviceVersion(EasmServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the EasmClientBuilder. + */ + @Generated + public EasmClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of EasmClientImpl with the provided parameters. + * + * @return an instance of EasmClientImpl. + */ + @Generated + private EasmClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + EasmServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : EasmServiceVersion.getLatest(); + EasmClientImpl client = new EasmClientImpl(localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), + this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of EasmAsyncClient class. + * + * @return an instance of EasmAsyncClient. + */ + @Generated + public EasmAsyncClient buildAsyncClient() { + return new EasmAsyncClient(buildInnerClient()); + } + + /** + * Builds an instance of EasmClient class. + * + * @return an instance of EasmClient. + */ + @Generated + public EasmClient buildClient() { + return new EasmClient(buildInnerClient()); + } + + private static final ClientLogger LOGGER = new ClientLogger(EasmClientBuilder.class); +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmServiceVersion.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmServiceVersion.java new file mode 100644 index 000000000000..d117819faf17 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/EasmServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.defender.easm; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of EasmClient. + */ +public enum EasmServiceVersion implements ServiceVersion { + /** + * Enum value 2023-03-01-preview. + */ + V2023_03_01_PREVIEW("2023-03-01-preview"); + + private final String version; + + EasmServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link EasmServiceVersion}. + */ + public static EasmServiceVersion getLatest() { + return V2023_03_01_PREVIEW; + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/implementation/EasmClientImpl.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/implementation/EasmClientImpl.java new file mode 100644 index 000000000000..a5ebc1660cf3 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/implementation/EasmClientImpl.java @@ -0,0 +1,5132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.defender.easm.implementation; + +import com.azure.analytics.defender.easm.EasmServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.UrlBuilder; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the EasmClient type. + */ +public final class EasmClientImpl { + /** + * The proxy service used to perform REST calls. + */ + private final EasmClientService service; + + /** + * The endpoint hosting the requested resource. For example, + * https://{region}.easm.defender.microsoft.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/workspaces/{workspaceName}. + */ + private final String endpoint; + + /** + * Gets The endpoint hosting the requested resource. For example, + * https://{region}.easm.defender.microsoft.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/workspaces/{workspaceName}. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final EasmServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public EasmServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * Initializes an instance of EasmClient client. + * + * @param endpoint The endpoint hosting the requested resource. For example, + * https://{region}.easm.defender.microsoft.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/workspaces/{workspaceName}. + * @param serviceVersion Service version. + */ + public EasmClientImpl(String endpoint, EasmServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of EasmClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The endpoint hosting the requested resource. For example, + * https://{region}.easm.defender.microsoft.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/workspaces/{workspaceName}. + * @param serviceVersion Service version. + */ + public EasmClientImpl(HttpPipeline httpPipeline, String endpoint, EasmServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of EasmClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The endpoint hosting the requested resource. For example, + * https://{region}.easm.defender.microsoft.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/workspaces/{workspaceName}. + * @param serviceVersion Service version. + */ + public EasmClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + EasmServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.service = RestProxy.create(EasmClientService.class, this.httpPipeline, this.getSerializerAdapter()); + } + + /** + * The interface defining all the services for EasmClient to be used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "EasmClient") + public interface EasmClientService { + @Get("/assets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAssetResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/assets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAssetResourceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/assets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> updateAssets(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @QueryParam("filter") String filter, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + + @Post("/assets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response updateAssetsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @QueryParam("filter") String filter, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + + @Get("/assets/{assetId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getAssetResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("assetId") String assetId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/assets/{assetId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getAssetResourceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("assetId") String assetId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/dataConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDataConnection(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/dataConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDataConnectionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/dataConnections:validate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> validateDataConnection(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/dataConnections:validate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response validateDataConnectionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Get("/dataConnections/{dataConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDataConnection(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("dataConnectionName") String dataConnectionName, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/dataConnections/{dataConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDataConnectionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("dataConnectionName") String dataConnectionName, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/dataConnections/{dataConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrReplaceDataConnection(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("dataConnectionName") String dataConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + + @Put("/dataConnections/{dataConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrReplaceDataConnectionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("dataConnectionName") String dataConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + + @Delete("/dataConnections/{dataConnectionName}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteDataConnection(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("dataConnectionName") String dataConnectionName, + RequestOptions requestOptions, Context context); + + @Delete("/dataConnections/{dataConnectionName}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteDataConnectionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("dataConnectionName") String dataConnectionName, + RequestOptions requestOptions, Context context); + + @Get("/discoGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDiscoGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/discoGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDiscoGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/discoGroups:validate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> validateDiscoGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/discoGroups:validate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response validateDiscoGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Get("/discoGroups/{groupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDiscoGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/discoGroups/{groupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDiscoGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/discoGroups/{groupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrReplaceDiscoGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + + @Put("/discoGroups/{groupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrReplaceDiscoGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + + @Post("/discoGroups/{groupName}:run") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> runDiscoGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("groupName") String groupName, + RequestOptions requestOptions, Context context); + + @Post("/discoGroups/{groupName}:run") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response runDiscoGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("groupName") String groupName, + RequestOptions requestOptions, Context context); + + @Get("/discoGroups/{groupName}/runs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listRuns(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/discoGroups/{groupName}/runs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listRunsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/discoTemplates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDiscoTemplate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/discoTemplates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDiscoTemplateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/discoTemplates/{templateId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDiscoTemplate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("templateId") String templateId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/discoTemplates/{templateId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDiscoTemplateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("templateId") String templateId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/reports/assets:getBillable") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getBillable(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/reports/assets:getBillable") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getBillableSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/reports/assets:getSnapshot") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSnapshot(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/reports/assets:getSnapshot") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSnapshotSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/reports/assets:getSummary") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSummary(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/reports/assets:getSummary") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSummarySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Get("/savedFilters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listSavedFilter(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/savedFilters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSavedFilterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/savedFilters/{filterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSavedFilter(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("filterName") String filterName, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/savedFilters/{filterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSavedFilterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("filterName") String filterName, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/savedFilters/{filterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrReplaceSavedFilter(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("filterName") String filterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + + @Put("/savedFilters/{filterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrReplaceSavedFilterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("filterName") String filterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + + @Delete("/savedFilters/{filterName}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteSavedFilter(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("filterName") String filterName, + RequestOptions requestOptions, Context context); + + @Delete("/savedFilters/{filterName}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteSavedFilterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("filterName") String filterName, + RequestOptions requestOptions, Context context); + + @Get("/tasks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listTask(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/tasks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listTaskSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/tasks/{taskId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getTask(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("taskId") String taskId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/tasks/{taskId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTaskSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("taskId") String taskId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/tasks/{taskId}:cancel") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> cancelTask(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("taskId") String taskId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/tasks/{taskId}:cancel") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response cancelTaskSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("taskId") String taskId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAssetResourceNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAssetResourceNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDataConnectionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDataConnectionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDiscoGroupNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDiscoGroupNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listRunsNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listRunsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDiscoTemplateNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDiscoTemplateNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listSavedFilterNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSavedFilterNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listTaskNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listTaskNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Retrieve a list of assets for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      markStringNoSpecify this value instead of 'skip' to use cursor-based + * searching. Initial value is '*' and subsequent values are returned in the response.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of AssetResource items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAssetResourceSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAssetResource(this.getEndpoint(), this.getServiceVersion().getVersion(), + accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Retrieve a list of assets for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      markStringNoSpecify this value instead of 'skip' to use cursor-based + * searching. Initial value is '*' and subsequent values are returned in the response.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of AssetResource items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAssetResourceAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listAssetResourceSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listAssetResourceNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a list of assets for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      markStringNoSpecify this value instead of 'skip' to use cursor-based + * searching. Initial value is '*' and subsequent values are returned in the response.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of AssetResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAssetResourceSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listAssetResourceSync(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Retrieve a list of assets for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      markStringNoSpecify this value instead of 'skip' to use cursor-based + * searching. Initial value is '*' and subsequent values are returned in the response.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of AssetResource items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAssetResource(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listAssetResourceSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listAssetResourceNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Update labels on assets matching the provided filter. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): {
      +     *         String: boolean (Required)
      +     *     }
      +     *     transfers: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param filter An expression on the resource type that selects the resources to be returned. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateAssetsWithResponseAsync(String filter, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.updateAssets(this.getEndpoint(), + this.getServiceVersion().getVersion(), filter, contentType, accept, body, requestOptions, context)); + } + + /** + * Update labels on assets matching the provided filter. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): {
      +     *         String: boolean (Required)
      +     *     }
      +     *     transfers: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param filter An expression on the resource type that selects the resources to be returned. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAssetsWithResponse(String filter, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAssetsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), filter, contentType, + accept, body, requestOptions, Context.NONE); + } + + /** + * Retrieve an asset by assetId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param assetId The system generated unique id for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the items in the current page of results along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAssetResourceWithResponseAsync(String assetId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getAssetResource(this.getEndpoint(), + this.getServiceVersion().getVersion(), assetId, accept, requestOptions, context)); + } + + /** + * Retrieve an asset by assetId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param assetId The system generated unique id for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the items in the current page of results along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAssetResourceWithResponse(String assetId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getAssetResourceSync(this.getEndpoint(), this.getServiceVersion().getVersion(), assetId, accept, + requestOptions, Context.NONE); + } + + /** + * Retrieve a list of data connections. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DataConnection items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDataConnectionSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDataConnection(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Retrieve a list of data connections. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DataConnection items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDataConnectionAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDataConnectionSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDataConnectionNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a list of data connections. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DataConnection items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDataConnectionSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDataConnectionSync(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Retrieve a list of data connections. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DataConnection items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDataConnection(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDataConnectionSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDataConnectionNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Validate a data connection with a given dataConnectionName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     name: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         innererror (Optional): {
      +     *             code: String (Optional)
      +     *             value: BinaryData (Optional)
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return validate result for validate action endpoints along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> validateDataConnectionWithResponseAsync(BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.validateDataConnection(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); + } + + /** + * Validate a data connection with a given dataConnectionName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     name: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         innererror (Optional): {
      +     *             code: String (Optional)
      +     *             value: BinaryData (Optional)
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return validate result for validate action endpoints along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateDataConnectionWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateDataConnectionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + contentType, accept, body, requestOptions, Context.NONE); + } + + /** + * Retrieve a data connection with a given dataConnectionName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDataConnectionWithResponseAsync(String dataConnectionName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getDataConnection(this.getEndpoint(), + this.getServiceVersion().getVersion(), dataConnectionName, accept, requestOptions, context)); + } + + /** + * Retrieve a data connection with a given dataConnectionName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDataConnectionWithResponse(String dataConnectionName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDataConnectionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + dataConnectionName, accept, requestOptions, Context.NONE); + } + + /** + * Create or replace a data connection with a given dataConnectionName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     name: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrReplaceDataConnectionWithResponseAsync(String dataConnectionName, + BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.createOrReplaceDataConnection(this.getEndpoint(), this.getServiceVersion().getVersion(), + dataConnectionName, contentType, accept, body, requestOptions, context)); + } + + /** + * Create or replace a data connection with a given dataConnectionName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     name: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrReplaceDataConnectionWithResponse(String dataConnectionName, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceDataConnectionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + dataConnectionName, contentType, accept, body, requestOptions, Context.NONE); + } + + /** + * Delete a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteDataConnectionWithResponseAsync(String dataConnectionName, + RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.deleteDataConnection(this.getEndpoint(), + this.getServiceVersion().getVersion(), dataConnectionName, requestOptions, context)); + } + + /** + * Delete a data connection with a given dataConnectionName. + * + * @param dataConnectionName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDataConnectionWithResponse(String dataConnectionName, RequestOptions requestOptions) { + return service.deleteDataConnectionSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + dataConnectionName, requestOptions, Context.NONE); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoGroup items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDiscoGroupSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDiscoGroup(this.getEndpoint(), this.getServiceVersion().getVersion(), + accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoGroup items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDiscoGroupAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDiscoGroupSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDiscoGroupNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoGroup items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDiscoGroupSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDiscoGroupSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Retrieve a list of discovery group for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoGroup items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDiscoGroup(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDiscoGroupSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDiscoGroupNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Validate a discovery group with a given groupName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         innererror (Optional): {
      +     *             code: String (Optional)
      +     *             value: BinaryData (Optional)
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return validate result for validate action endpoints along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> validateDiscoGroupWithResponseAsync(BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.validateDiscoGroup(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); + } + + /** + * Validate a discovery group with a given groupName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         innererror (Optional): {
      +     *             code: String (Optional)
      +     *             value: BinaryData (Optional)
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return validate result for validate action endpoints along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateDiscoGroupWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateDiscoGroupSync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, + accept, body, requestOptions, Context.NONE); + } + + /** + * Retrieve a discovery group with a given groupName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDiscoGroupWithResponseAsync(String groupName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getDiscoGroup(this.getEndpoint(), + this.getServiceVersion().getVersion(), groupName, accept, requestOptions, context)); + } + + /** + * Retrieve a discovery group with a given groupName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDiscoGroupWithResponse(String groupName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDiscoGroupSync(this.getEndpoint(), this.getServiceVersion().getVersion(), groupName, accept, + requestOptions, Context.NONE); + } + + /** + * Create a discovery group with a given groupName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrReplaceDiscoGroupWithResponseAsync(String groupName, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createOrReplaceDiscoGroup(this.getEndpoint(), + this.getServiceVersion().getVersion(), groupName, contentType, accept, body, requestOptions, context)); + } + + /** + * Create a discovery group with a given groupName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrReplaceDiscoGroupWithResponse(String groupName, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceDiscoGroupSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + groupName, contentType, accept, body, requestOptions, Context.NONE); + } + + /** + * Run a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> runDiscoGroupWithResponseAsync(String groupName, RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.runDiscoGroup(this.getEndpoint(), + this.getServiceVersion().getVersion(), groupName, requestOptions, context)); + } + + /** + * Run a discovery group with a given groupName. + * + * @param groupName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response runDiscoGroupWithResponse(String groupName, RequestOptions requestOptions) { + return service.runDiscoGroupSync(this.getEndpoint(), this.getServiceVersion().getVersion(), groupName, + requestOptions, Context.NONE); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     submittedDate: OffsetDateTime (Optional)
      +     *     startedDate: OffsetDateTime (Optional)
      +     *     completedDate: OffsetDateTime (Optional)
      +     *     tier: String (Optional)
      +     *     state: String(pending/running/completed/failed) (Optional)
      +     *     totalAssetsFoundCount: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The unique identifier for the discovery group. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRunsSinglePageAsync(String groupName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listRuns(this.getEndpoint(), this.getServiceVersion().getVersion(), + groupName, accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     submittedDate: OffsetDateTime (Optional)
      +     *     startedDate: OffsetDateTime (Optional)
      +     *     completedDate: OffsetDateTime (Optional)
      +     *     tier: String (Optional)
      +     *     state: String(pending/running/completed/failed) (Optional)
      +     *     totalAssetsFoundCount: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The unique identifier for the discovery group. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRunsAsync(String groupName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listRunsSinglePageAsync(groupName, requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listRunsNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     submittedDate: OffsetDateTime (Optional)
      +     *     startedDate: OffsetDateTime (Optional)
      +     *     completedDate: OffsetDateTime (Optional)
      +     *     tier: String (Optional)
      +     *     state: String(pending/running/completed/failed) (Optional)
      +     *     totalAssetsFoundCount: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The unique identifier for the discovery group. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRunsSinglePage(String groupName, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listRunsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + groupName, accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Retrieve a collection of discovery run results for a discovery group with a given groupName. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     submittedDate: OffsetDateTime (Optional)
      +     *     startedDate: OffsetDateTime (Optional)
      +     *     completedDate: OffsetDateTime (Optional)
      +     *     tier: String (Optional)
      +     *     state: String(pending/running/completed/failed) (Optional)
      +     *     totalAssetsFoundCount: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param groupName The unique identifier for the discovery group. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRuns(String groupName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listRunsSinglePage(groupName, requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listRunsNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoTemplate items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDiscoTemplateSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDiscoTemplate(this.getEndpoint(), this.getServiceVersion().getVersion(), + accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoTemplate items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDiscoTemplateAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDiscoTemplateSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDiscoTemplateNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoTemplate items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDiscoTemplateSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDiscoTemplateSync(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Retrieve a list of disco templates for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoTemplate items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDiscoTemplate(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDiscoTemplateSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listDiscoTemplateNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a disco template with a given templateId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param templateId The system generated unique id for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the items in the current page of results along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDiscoTemplateWithResponseAsync(String templateId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getDiscoTemplate(this.getEndpoint(), + this.getServiceVersion().getVersion(), templateId, accept, requestOptions, context)); + } + + /** + * Retrieve a disco template with a given templateId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param templateId The system generated unique id for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the items in the current page of results along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDiscoTemplateWithResponse(String templateId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDiscoTemplateSync(this.getEndpoint(), this.getServiceVersion().getVersion(), templateId, + accept, requestOptions, Context.NONE); + } + + /** + * Get billable assets summary for the workspace. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     assetSummaries (Optional): [
      +     *          (Optional){
      +     *             date: LocalDate (Optional)
      +     *             total: Long (Optional)
      +     *             assetBreakdown (Optional): [
      +     *                  (Optional){
      +     *                     kind: String(domain/host/ipAddress) (Optional)
      +     *                     count: Long (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return billable assets summary for the workspace along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getBillableWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getBillable(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get billable assets summary for the workspace. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     assetSummaries (Optional): [
      +     *          (Optional){
      +     *             date: LocalDate (Optional)
      +     *             total: Long (Optional)
      +     *             assetBreakdown (Optional): [
      +     *                  (Optional){
      +     *                     kind: String(domain/host/ipAddress) (Optional)
      +     *                     count: Long (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return billable assets summary for the workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBillableWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getBillableSync(this.getEndpoint(), this.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } + + /** + * Get the most recent snapshot of asset summary values for the snapshot request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     metric: String (Optional)
      +     *     labelName: String (Optional)
      +     *     size: Integer (Optional)
      +     *     page: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     displayName: String (Optional)
      +     *     metric: String (Optional)
      +     *     labelName: String (Optional)
      +     *     updatedAt: OffsetDateTime (Optional)
      +     *     description: String (Optional)
      +     *     assets (Optional): {
      +     *         totalElements: Long (Optional)
      +     *         mark: String (Optional)
      +     *         nextLink: String (Optional)
      +     *         value (Optional): [
      +     *              (Optional){
      +     *                 kind: String (Required)
      +     *                 id: String (Required)
      +     *                 name: String (Optional)
      +     *                 displayName: String (Optional)
      +     *                 uuid: String (Optional)
      +     *                 createdDate: OffsetDateTime (Optional)
      +     *                 updatedDate: OffsetDateTime (Optional)
      +     *                 state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *                 externalId: String (Optional)
      +     *                 labels (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 wildcard: Boolean (Optional)
      +     *                 discoGroupName: String (Optional)
      +     *                 auditTrail (Optional): [
      +     *                      (Optional){
      +     *                         id: String (Optional)
      +     *                         name: String (Optional)
      +     *                         displayName: String (Optional)
      +     *                         kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *                         reason: String (Optional)
      +     *                     }
      +     *                 ]
      +     *                 reason: String (Optional)
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the most recent snapshot of asset summary values for the snapshot request along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSnapshotWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getSnapshot(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); + } + + /** + * Get the most recent snapshot of asset summary values for the snapshot request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     metric: String (Optional)
      +     *     labelName: String (Optional)
      +     *     size: Integer (Optional)
      +     *     page: Integer (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     displayName: String (Optional)
      +     *     metric: String (Optional)
      +     *     labelName: String (Optional)
      +     *     updatedAt: OffsetDateTime (Optional)
      +     *     description: String (Optional)
      +     *     assets (Optional): {
      +     *         totalElements: Long (Optional)
      +     *         mark: String (Optional)
      +     *         nextLink: String (Optional)
      +     *         value (Optional): [
      +     *              (Optional){
      +     *                 kind: String (Required)
      +     *                 id: String (Required)
      +     *                 name: String (Optional)
      +     *                 displayName: String (Optional)
      +     *                 uuid: String (Optional)
      +     *                 createdDate: OffsetDateTime (Optional)
      +     *                 updatedDate: OffsetDateTime (Optional)
      +     *                 state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *                 externalId: String (Optional)
      +     *                 labels (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 wildcard: Boolean (Optional)
      +     *                 discoGroupName: String (Optional)
      +     *                 auditTrail (Optional): [
      +     *                      (Optional){
      +     *                         id: String (Optional)
      +     *                         name: String (Optional)
      +     *                         displayName: String (Optional)
      +     *                         kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *                         reason: String (Optional)
      +     *                     }
      +     *                 ]
      +     *                 reason: String (Optional)
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the most recent snapshot of asset summary values for the snapshot request along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSnapshotWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.getSnapshotSync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, + body, requestOptions, Context.NONE); + } + + /** + * Get asset summary details for the summary request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     metricCategories (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     metrics (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     filters (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     groupBy: String (Optional)
      +     *     segmentBy: String (Optional)
      +     *     labelName: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     assetSummaries (Optional): [
      +     *          (Optional){
      +     *             displayName: String (Optional)
      +     *             description: String (Optional)
      +     *             updatedAt: OffsetDateTime (Optional)
      +     *             metricCategory: String (Optional)
      +     *             metric: String (Optional)
      +     *             filter: String (Optional)
      +     *             labelName: String (Optional)
      +     *             count: Long (Optional)
      +     *             link: String (Optional)
      +     *             children (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return asset summary details for the summary request along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSummaryWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getSummary(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); + } + + /** + * Get asset summary details for the summary request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     metricCategories (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     metrics (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     filters (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     groupBy: String (Optional)
      +     *     segmentBy: String (Optional)
      +     *     labelName: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     assetSummaries (Optional): [
      +     *          (Optional){
      +     *             displayName: String (Optional)
      +     *             description: String (Optional)
      +     *             updatedAt: OffsetDateTime (Optional)
      +     *             metricCategory: String (Optional)
      +     *             metric: String (Optional)
      +     *             filter: String (Optional)
      +     *             labelName: String (Optional)
      +     *             count: Long (Optional)
      +     *             link: String (Optional)
      +     *             children (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return asset summary details for the summary request along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSummaryWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.getSummarySync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, + body, requestOptions, Context.NONE); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of SavedFilter items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSavedFilterSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSavedFilter(this.getEndpoint(), this.getServiceVersion().getVersion(), + accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of SavedFilter items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSavedFilterAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSavedFilterSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSavedFilterNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of SavedFilter items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSavedFilterSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listSavedFilterSync(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Retrieve a list of saved filters for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of SavedFilter items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSavedFilter(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSavedFilterSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSavedFilterNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a saved filter by filterName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param filterName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSavedFilterWithResponseAsync(String filterName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getSavedFilter(this.getEndpoint(), + this.getServiceVersion().getVersion(), filterName, accept, requestOptions, context)); + } + + /** + * Retrieve a saved filter by filterName. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param filterName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSavedFilterWithResponse(String filterName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSavedFilterSync(this.getEndpoint(), this.getServiceVersion().getVersion(), filterName, accept, + requestOptions, Context.NONE); + } + + /** + * Create or replace a saved filter with a given filterName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     filter: String (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param filterName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrReplaceSavedFilterWithResponseAsync(String filterName, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createOrReplaceSavedFilter(this.getEndpoint(), + this.getServiceVersion().getVersion(), filterName, contentType, accept, body, requestOptions, context)); + } + + /** + * Create or replace a saved filter with a given filterName. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     filter: String (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param filterName The caller provided unique name for the resource. + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrReplaceSavedFilterWithResponse(String filterName, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSavedFilterSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + filterName, contentType, accept, body, requestOptions, Context.NONE); + } + + /** + * Delete a saved filter with a given filterName. + * + * @param filterName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteSavedFilterWithResponseAsync(String filterName, RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.deleteSavedFilter(this.getEndpoint(), + this.getServiceVersion().getVersion(), filterName, requestOptions, context)); + } + + /** + * Delete a saved filter with a given filterName. + * + * @param filterName The caller provided unique name for the resource. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteSavedFilterWithResponse(String filterName, RequestOptions requestOptions) { + return service.deleteSavedFilterSync(this.getEndpoint(), this.getServiceVersion().getVersion(), filterName, + requestOptions, Context.NONE); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of Task items along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTaskSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listTask(this.getEndpoint(), this.getServiceVersion().getVersion(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of Task items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTaskAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listTaskSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listTaskNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of Task items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listTaskSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listTaskSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Retrieve a list of tasks for the provided search parameters. + *

      Query Parameters

      + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter the result list using the given expression.
      orderbyStringNoA list of expressions that specify the order of the returned + * resources.
      skipIntegerNoThe number of result items to skip.
      maxpagesizeIntegerNoThe maximum number of result items per page.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of Task items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTask(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listTaskSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listTaskNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Retrieve a task by taskId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The unique identifier of the task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTaskWithResponseAsync(String taskId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getTask(this.getEndpoint(), + this.getServiceVersion().getVersion(), taskId, accept, requestOptions, context)); + } + + /** + * Retrieve a task by taskId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The unique identifier of the task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTaskWithResponse(String taskId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getTaskSync(this.getEndpoint(), this.getServiceVersion().getVersion(), taskId, accept, + requestOptions, Context.NONE); + } + + /** + * Cancel a task by taskId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The unique identifier of the task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelTaskWithResponseAsync(String taskId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.cancelTask(this.getEndpoint(), + this.getServiceVersion().getVersion(), taskId, accept, requestOptions, context)); + } + + /** + * Cancel a task by taskId. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The unique identifier of the task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelTaskWithResponse(String taskId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.cancelTaskSync(this.getEndpoint(), this.getServiceVersion().getVersion(), taskId, accept, + requestOptions, Context.NONE); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of AssetResource items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAssetResourceNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listAssetResourceNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     uuid: String (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     state: String(candidate/confirmed/dismissed/candidateInvestigate/associatedPartner/associatedThirdparty/archived) (Optional)
      +     *     externalId: String (Optional)
      +     *     labels (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     wildcard: Boolean (Optional)
      +     *     discoGroupName: String (Optional)
      +     *     auditTrail (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             displayName: String (Optional)
      +     *             kind: String(as/contact/domain/host/ipAddress/ipBlock/page/sslCert) (Optional)
      +     *             reason: String (Optional)
      +     *         }
      +     *     ]
      +     *     reason: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of AssetResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAssetResourceNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listAssetResourceNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DataConnection items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDataConnectionNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listDataConnectionNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     kind: String (Required)
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     content: String(assets/attackSurfaceInsights) (Optional)
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     frequency: String(daily/weekly/monthly) (Optional)
      +     *     frequencyOffset: Integer (Optional)
      +     *     updatedDate: OffsetDateTime (Optional)
      +     *     userUpdatedAt: OffsetDateTime (Optional)
      +     *     active: Boolean (Optional)
      +     *     inactiveMessage: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DataConnection items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDataConnectionNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listDataConnectionNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoGroup items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDiscoGroupNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listDiscoGroupNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     description: String (Optional)
      +     *     tier: String (Optional)
      +     *     frequencyMilliseconds: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     latestRun (Optional): {
      +     *         submittedDate: OffsetDateTime (Optional)
      +     *         startedDate: OffsetDateTime (Optional)
      +     *         completedDate: OffsetDateTime (Optional)
      +     *         tier: String (Optional)
      +     *         state: String(pending/running/completed/failed) (Optional)
      +     *         totalAssetsFoundCount: Long (Optional)
      +     *         seeds (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         excludes (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         names (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     *     createdDate: OffsetDateTime (Optional)
      +     *     templateId: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoGroup items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDiscoGroupNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listDiscoGroupNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     submittedDate: OffsetDateTime (Optional)
      +     *     startedDate: OffsetDateTime (Optional)
      +     *     completedDate: OffsetDateTime (Optional)
      +     *     tier: String (Optional)
      +     *     state: String(pending/running/completed/failed) (Optional)
      +     *     totalAssetsFoundCount: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRunsNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listRunsNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     submittedDate: OffsetDateTime (Optional)
      +     *     startedDate: OffsetDateTime (Optional)
      +     *     completedDate: OffsetDateTime (Optional)
      +     *     tier: String (Optional)
      +     *     state: String(pending/running/completed/failed) (Optional)
      +     *     totalAssetsFoundCount: Long (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     excludes (Optional): [
      +     *         (recursive schema, see above)
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRunsNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listRunsNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoTemplate items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDiscoTemplateNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listDiscoTemplateNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     name: String (Optional)
      +     *     displayName: String (Optional)
      +     *     industry: String (Optional)
      +     *     region: String (Optional)
      +     *     countryCode: String (Optional)
      +     *     stateCode: String (Optional)
      +     *     city: String (Optional)
      +     *     seeds (Optional): [
      +     *          (Optional){
      +     *             kind: String(as/attribute/contact/domain/host/ipBlock) (Optional)
      +     *             name: String (Optional)
      +     *         }
      +     *     ]
      +     *     names (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of DiscoTemplate items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDiscoTemplateNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listDiscoTemplateNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of SavedFilter items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSavedFilterNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listSavedFilterNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Required)
      +     *     displayName: String (Optional)
      +     *     filter: String (Optional)
      +     *     description: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of SavedFilter items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSavedFilterNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listSavedFilterNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of Task items along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTaskNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listTaskNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     startedAt: OffsetDateTime (Optional)
      +     *     completedAt: OffsetDateTime (Optional)
      +     *     lastPolledAt: OffsetDateTime (Optional)
      +     *     state: String(pending/running/paused/complete/incomplete/failed/warning) (Optional)
      +     *     phase: String(running/polling/complete) (Optional)
      +     *     reason: String (Optional)
      +     *     metadata (Optional): {
      +     *         String: BinaryData (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of Task items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listTaskNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listTaskNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String... path) { + try { + Object value = binaryData.toObject(Map.class); + for (String segment : path) { + value = ((Map) value).get(segment); + } + List values = (List) value; + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String... path) { + try { + Object value = binaryData.toObject(Map.class); + for (String segment : path) { + value = ((Map) value).get(segment); + } + return (String) value; + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/implementation/package-info.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/implementation/package-info.java new file mode 100644 index 000000000000..792f332edbf4 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/implementation/package-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the implementations for Easm. + * Defender EASM discovers and maps your digital attack surface to provide an "outside-in" perspective using probes to + * discover assets. The assets are provided with detailed metadata associated, including vulnerabilities, configurations + * and web components, allowing customers to view and prioritize external risk. The EASM REST API enables you to develop + * clients that integrate with your application. + * + */ +package com.azure.analytics.defender.easm.implementation; diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AlexaDetails.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AlexaDetails.java new file mode 100644 index 000000000000..488f324e7510 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AlexaDetails.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The AlexaDetails model. + */ +@Immutable +public final class AlexaDetails implements JsonSerializable { + + /* + * The alexaRank property. + */ + @Generated + private Long alexaRank; + + /* + * The category property. + */ + @Generated + private String category; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /** + * Creates an instance of AlexaDetails class. + */ + @Generated + private AlexaDetails() { + } + + /** + * Get the alexaRank property: The alexaRank property. + * + * @return the alexaRank value. + */ + @Generated + public Long getAlexaRank() { + return this.alexaRank; + } + + /** + * Get the category property: The category property. + * + * @return the category value. + */ + @Generated + public String getCategory() { + return this.category; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("alexaRank", this.alexaRank); + jsonWriter.writeStringField("category", this.category); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("recent", this.recent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AlexaDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AlexaDetails if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AlexaDetails. + */ + @Generated + public static AlexaDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AlexaDetails deserializedAlexaDetails = new AlexaDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("alexaRank".equals(fieldName)) { + deserializedAlexaDetails.alexaRank = reader.getNullable(JsonReader::getLong); + } else if ("category".equals(fieldName)) { + deserializedAlexaDetails.category = reader.getString(); + } else if ("firstSeen".equals(fieldName)) { + deserializedAlexaDetails.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedAlexaDetails.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedAlexaDetails.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedAlexaDetails.recent = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedAlexaDetails; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AsAsset.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AsAsset.java new file mode 100644 index 000000000000..4a98868cd93e --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AsAsset.java @@ -0,0 +1,579 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The AsAsset model. + */ +@Immutable +public final class AsAsset extends InventoryAsset { + + /* + * The asn property. + */ + @Generated + private Long asn; + + /* + * The asNames property. + */ + @Generated + private List asNames; + + /* + * The orgNames property. + */ + @Generated + private List orgNames; + + /* + * The orgIds property. + */ + @Generated + private List orgIds; + + /* + * The countries property. + */ + @Generated + private List countries; + + /* + * The registries property. + */ + @Generated + private List registries; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The registrarCreatedAt property. + */ + @Generated + private List registrarCreatedAt; + + /* + * The registrarUpdatedAt property. + */ + @Generated + private List registrarUpdatedAt; + + /* + * The registrantContacts property. + */ + @Generated + private List registrantContacts; + + /* + * The adminContacts property. + */ + @Generated + private List adminContacts; + + /* + * The technicalContacts property. + */ + @Generated + private List technicalContacts; + + /* + * The registrarNames property. + */ + @Generated + private List registrarNames; + + /* + * The registrantNames property. + */ + @Generated + private List registrantNames; + + /* + * The adminNames property. + */ + @Generated + private List adminNames; + + /* + * The technicalNames property. + */ + @Generated + private List technicalNames; + + /* + * The adminOrgs property. + */ + @Generated + private List adminOrgs; + + /* + * The technicalOrgs property. + */ + @Generated + private List technicalOrgs; + + /* + * The registrantPhones property. + */ + @Generated + private List registrantPhones; + + /* + * The adminPhones property. + */ + @Generated + private List adminPhones; + + /* + * The technicalPhones property. + */ + @Generated + private List technicalPhones; + + /* + * The detailedFromWhoisAt property. + */ + @Generated + private OffsetDateTime detailedFromWhoisAt; + + /** + * Creates an instance of AsAsset class. + */ + @Generated + private AsAsset() { + } + + /** + * Get the asn property: The asn property. + * + * @return the asn value. + */ + @Generated + public Long getAsn() { + return this.asn; + } + + /** + * Get the asNames property: The asNames property. + * + * @return the asNames value. + */ + @Generated + public List getAsNames() { + return this.asNames; + } + + /** + * Get the orgNames property: The orgNames property. + * + * @return the orgNames value. + */ + @Generated + public List getOrgNames() { + return this.orgNames; + } + + /** + * Get the orgIds property: The orgIds property. + * + * @return the orgIds value. + */ + @Generated + public List getOrgIds() { + return this.orgIds; + } + + /** + * Get the countries property: The countries property. + * + * @return the countries value. + */ + @Generated + public List getCountries() { + return this.countries; + } + + /** + * Get the registries property: The registries property. + * + * @return the registries value. + */ + @Generated + public List getRegistries() { + return this.registries; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the registrarCreatedAt property: The registrarCreatedAt property. + * + * @return the registrarCreatedAt value. + */ + @Generated + public List getRegistrarCreatedAt() { + return this.registrarCreatedAt; + } + + /** + * Get the registrarUpdatedAt property: The registrarUpdatedAt property. + * + * @return the registrarUpdatedAt value. + */ + @Generated + public List getRegistrarUpdatedAt() { + return this.registrarUpdatedAt; + } + + /** + * Get the registrantContacts property: The registrantContacts property. + * + * @return the registrantContacts value. + */ + @Generated + public List getRegistrantContacts() { + return this.registrantContacts; + } + + /** + * Get the adminContacts property: The adminContacts property. + * + * @return the adminContacts value. + */ + @Generated + public List getAdminContacts() { + return this.adminContacts; + } + + /** + * Get the technicalContacts property: The technicalContacts property. + * + * @return the technicalContacts value. + */ + @Generated + public List getTechnicalContacts() { + return this.technicalContacts; + } + + /** + * Get the registrarNames property: The registrarNames property. + * + * @return the registrarNames value. + */ + @Generated + public List getRegistrarNames() { + return this.registrarNames; + } + + /** + * Get the registrantNames property: The registrantNames property. + * + * @return the registrantNames value. + */ + @Generated + public List getRegistrantNames() { + return this.registrantNames; + } + + /** + * Get the adminNames property: The adminNames property. + * + * @return the adminNames value. + */ + @Generated + public List getAdminNames() { + return this.adminNames; + } + + /** + * Get the technicalNames property: The technicalNames property. + * + * @return the technicalNames value. + */ + @Generated + public List getTechnicalNames() { + return this.technicalNames; + } + + /** + * Get the adminOrgs property: The adminOrgs property. + * + * @return the adminOrgs value. + */ + @Generated + public List getAdminOrgs() { + return this.adminOrgs; + } + + /** + * Get the technicalOrgs property: The technicalOrgs property. + * + * @return the technicalOrgs value. + */ + @Generated + public List getTechnicalOrgs() { + return this.technicalOrgs; + } + + /** + * Get the registrantPhones property: The registrantPhones property. + * + * @return the registrantPhones value. + */ + @Generated + public List getRegistrantPhones() { + return this.registrantPhones; + } + + /** + * Get the adminPhones property: The adminPhones property. + * + * @return the adminPhones value. + */ + @Generated + public List getAdminPhones() { + return this.adminPhones; + } + + /** + * Get the technicalPhones property: The technicalPhones property. + * + * @return the technicalPhones value. + */ + @Generated + public List getTechnicalPhones() { + return this.technicalPhones; + } + + /** + * Get the detailedFromWhoisAt property: The detailedFromWhoisAt property. + * + * @return the detailedFromWhoisAt value. + */ + @Generated + public OffsetDateTime getDetailedFromWhoisAt() { + return this.detailedFromWhoisAt; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("asn", this.asn); + jsonWriter.writeArrayField("asNames", this.asNames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("orgNames", this.orgNames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("orgIds", this.orgIds, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("countries", this.countries, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registries", this.registries, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeArrayField("registrarCreatedAt", this.registrarCreatedAt, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrarUpdatedAt", this.registrarUpdatedAt, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantContacts", this.registrantContacts, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminContacts", this.adminContacts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalContacts", this.technicalContacts, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrarNames", this.registrarNames, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantNames", this.registrantNames, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminNames", this.adminNames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalNames", this.technicalNames, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminOrgs", this.adminOrgs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalOrgs", this.technicalOrgs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantPhones", this.registrantPhones, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminPhones", this.adminPhones, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalPhones", this.technicalPhones, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("detailedFromWhoisAt", + this.detailedFromWhoisAt == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.detailedFromWhoisAt)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AsAsset from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AsAsset if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the AsAsset. + */ + @Generated + public static AsAsset fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AsAsset deserializedAsAsset = new AsAsset(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("asn".equals(fieldName)) { + deserializedAsAsset.asn = reader.getNullable(JsonReader::getLong); + } else if ("asNames".equals(fieldName)) { + List asNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.asNames = asNames; + } else if ("orgNames".equals(fieldName)) { + List orgNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.orgNames = orgNames; + } else if ("orgIds".equals(fieldName)) { + List orgIds = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.orgIds = orgIds; + } else if ("countries".equals(fieldName)) { + List countries = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.countries = countries; + } else if ("registries".equals(fieldName)) { + List registries = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.registries = registries; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedAsAsset.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedAsAsset.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedAsAsset.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedAsAsset.count = reader.getNullable(JsonReader::getLong); + } else if ("registrarCreatedAt".equals(fieldName)) { + List registrarCreatedAt = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedAsAsset.registrarCreatedAt = registrarCreatedAt; + } else if ("registrarUpdatedAt".equals(fieldName)) { + List registrarUpdatedAt = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedAsAsset.registrarUpdatedAt = registrarUpdatedAt; + } else if ("registrantContacts".equals(fieldName)) { + List registrantContacts + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.registrantContacts = registrantContacts; + } else if ("adminContacts".equals(fieldName)) { + List adminContacts = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.adminContacts = adminContacts; + } else if ("technicalContacts".equals(fieldName)) { + List technicalContacts + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.technicalContacts = technicalContacts; + } else if ("registrarNames".equals(fieldName)) { + List registrarNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.registrarNames = registrarNames; + } else if ("registrantNames".equals(fieldName)) { + List registrantNames + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.registrantNames = registrantNames; + } else if ("adminNames".equals(fieldName)) { + List adminNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.adminNames = adminNames; + } else if ("technicalNames".equals(fieldName)) { + List technicalNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.technicalNames = technicalNames; + } else if ("adminOrgs".equals(fieldName)) { + List adminOrgs = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.adminOrgs = adminOrgs; + } else if ("technicalOrgs".equals(fieldName)) { + List technicalOrgs = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.technicalOrgs = technicalOrgs; + } else if ("registrantPhones".equals(fieldName)) { + List registrantPhones + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.registrantPhones = registrantPhones; + } else if ("adminPhones".equals(fieldName)) { + List adminPhones = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.adminPhones = adminPhones; + } else if ("technicalPhones".equals(fieldName)) { + List technicalPhones + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedAsAsset.technicalPhones = technicalPhones; + } else if ("detailedFromWhoisAt".equals(fieldName)) { + deserializedAsAsset.detailedFromWhoisAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + return deserializedAsAsset; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AsAssetResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AsAssetResource.java new file mode 100644 index 000000000000..311c46b062f4 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AsAssetResource.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The AsAssetResource model. + */ +@Immutable +public final class AsAssetResource extends AssetResource { + + /* + * Discriminator property for AssetResource. + */ + @Generated + private String kind = "as"; + + /* + * asset + */ + @Generated + private final AsAsset asset; + + /** + * Creates an instance of AsAssetResource class. + * + * @param asset the asset value to set. + */ + @Generated + private AsAssetResource(AsAsset asset) { + this.asset = asset; + } + + /** + * Get the kind property: Discriminator property for AssetResource. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the asset property: asset. + * + * @return the asset value. + */ + @Generated + public AsAsset getAsset() { + return this.asset; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("uuid", getUuid()); + jsonWriter.writeStringField("createdDate", + getCreatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getCreatedDate())); + jsonWriter.writeStringField("updatedDate", + getUpdatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getUpdatedDate())); + jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); + jsonWriter.writeStringField("externalId", getExternalId()); + jsonWriter.writeArrayField("labels", getLabels(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("wildcard", isWildcard()); + jsonWriter.writeStringField("discoGroupName", getDiscoGroupName()); + jsonWriter.writeArrayField("auditTrail", getAuditTrail(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("reason", getReason()); + jsonWriter.writeJsonField("asset", this.asset); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AsAssetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AsAssetResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AsAssetResource. + */ + @Generated + public static AsAssetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + String name = null; + String displayName = null; + String uuid = null; + OffsetDateTime createdDate = null; + OffsetDateTime updatedDate = null; + AssetState state = null; + String externalId = null; + List labels = null; + Boolean wildcard = null; + String discoGroupName = null; + List auditTrail = null; + String reason = null; + AsAsset asset = null; + String kind = "as"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("uuid".equals(fieldName)) { + uuid = reader.getString(); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + state = AssetState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + labels = reader.readArray(reader1 -> reader1.getString()); + } else if ("wildcard".equals(fieldName)) { + wildcard = reader.getNullable(JsonReader::getBoolean); + } else if ("discoGroupName".equals(fieldName)) { + discoGroupName = reader.getString(); + } else if ("auditTrail".equals(fieldName)) { + auditTrail = reader.readArray(reader1 -> AuditTrailItem.fromJson(reader1)); + } else if ("reason".equals(fieldName)) { + reason = reader.getString(); + } else if ("asset".equals(fieldName)) { + asset = AsAsset.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + AsAssetResource deserializedAsAssetResource = new AsAssetResource(asset); + deserializedAsAssetResource.setId(id); + deserializedAsAssetResource.setName(name); + deserializedAsAssetResource.setDisplayName(displayName); + deserializedAsAssetResource.setUuid(uuid); + deserializedAsAssetResource.setCreatedDate(createdDate); + deserializedAsAssetResource.setUpdatedDate(updatedDate); + deserializedAsAssetResource.setState(state); + deserializedAsAssetResource.setExternalId(externalId); + deserializedAsAssetResource.setLabels(labels); + deserializedAsAssetResource.setWildcard(wildcard); + deserializedAsAssetResource.setDiscoGroupName(discoGroupName); + deserializedAsAssetResource.setAuditTrail(auditTrail); + deserializedAsAssetResource.setReason(reason); + deserializedAsAssetResource.kind = kind; + return deserializedAsAssetResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetPageResult.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetPageResult.java new file mode 100644 index 000000000000..0bd33a569564 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetPageResult.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The page of assets that match the provided metric. + */ +@Immutable +public final class AssetPageResult implements JsonSerializable { + + /* + * The total number of items available in the full result set. + */ + @Generated + private Long totalElements; + + /* + * The cursor mark to be used on the next request. Not set if using paging. + */ + @Generated + private String mark; + + /* + * The link to access the next page of results. Not set if at the end of the result set. + */ + @Generated + private String nextLink; + + /* + * The items in the current page of results. + */ + @Generated + private List value; + + /** + * Creates an instance of AssetPageResult class. + */ + @Generated + private AssetPageResult() { + } + + /** + * Get the totalElements property: The total number of items available in the full result set. + * + * @return the totalElements value. + */ + @Generated + public Long getTotalElements() { + return this.totalElements; + } + + /** + * Get the mark property: The cursor mark to be used on the next request. Not set if using paging. + * + * @return the mark value. + */ + @Generated + public String getMark() { + return this.mark; + } + + /** + * Get the nextLink property: The link to access the next page of results. Not set if at the end of the result set. + * + * @return the nextLink value. + */ + @Generated + public String getNextLink() { + return this.nextLink; + } + + /** + * Get the value property: The items in the current page of results. + * + * @return the value value. + */ + @Generated + public List getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("totalElements", this.totalElements); + jsonWriter.writeStringField("mark", this.mark); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AssetPageResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AssetPageResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AssetPageResult. + */ + @Generated + public static AssetPageResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AssetPageResult deserializedAssetPageResult = new AssetPageResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("totalElements".equals(fieldName)) { + deserializedAssetPageResult.totalElements = reader.getNullable(JsonReader::getLong); + } else if ("mark".equals(fieldName)) { + deserializedAssetPageResult.mark = reader.getString(); + } else if ("nextLink".equals(fieldName)) { + deserializedAssetPageResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> AssetResource.fromJson(reader1)); + deserializedAssetPageResult.value = value; + } else { + reader.skipChildren(); + } + } + return deserializedAssetPageResult; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetResource.java new file mode 100644 index 000000000000..e24ea259e548 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetResource.java @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The items in the current page of results. + */ +@Immutable +public class AssetResource implements JsonSerializable { + + /* + * Discriminator property for AssetResource. + */ + @Generated + private String kind = "AssetResource"; + + /* + * The system generated unique id for the resource. + */ + @Generated + private String id; + + /* + * The caller provided unique name for the resource. + */ + @Generated + private String name; + + /* + * The name that can be used for display purposes. + */ + @Generated + private String displayName; + + /* + * Global UUID for the asset. + */ + @Generated + private String uuid; + + /* + * The date this asset was first added to this workspace. + */ + @Generated + private OffsetDateTime createdDate; + + /* + * The date this asset was last updated for this workspace. + */ + @Generated + private OffsetDateTime updatedDate; + + /* + * The state property. + */ + @Generated + private AssetState state; + + /* + * An optional customer provided identifier for this asset. + */ + @Generated + private String externalId; + + /* + * Customer labels assigned to this asset. + */ + @Generated + private List labels; + + /* + * An indicator of whether this asset represents a wildcard rollup of assets on this domain. + */ + @Generated + private Boolean wildcard; + + /* + * The name of the DiscoGroup that brought added this asset to the workspace. + */ + @Generated + private String discoGroupName; + + /* + * The history of how this asset was pulled into the workspace through the discovery process. + */ + @Generated + private List auditTrail; + + /* + * The reason property. + */ + @Generated + private String reason; + + /** + * Creates an instance of AssetResource class. + */ + @Generated + protected AssetResource() { + } + + /** + * Get the kind property: Discriminator property for AssetResource. + * + * @return the kind value. + */ + @Generated + public String getKind() { + return this.kind; + } + + /** + * Get the id property: The system generated unique id for the resource. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Set the id property: The system generated unique id for the resource. + * + * @param id the id value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The caller provided unique name for the resource. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The caller provided unique name for the resource. + * + * @param name the name value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setName(String name) { + this.name = name; + return this; + } + + /** + * Get the displayName property: The name that can be used for display purposes. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Set the displayName property: The name that can be used for display purposes. + * + * @param displayName the displayName value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the uuid property: Global UUID for the asset. + * + * @return the uuid value. + */ + @Generated + public String getUuid() { + return this.uuid; + } + + /** + * Set the uuid property: Global UUID for the asset. + * + * @param uuid the uuid value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setUuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get the createdDate property: The date this asset was first added to this workspace. + * + * @return the createdDate value. + */ + @Generated + public OffsetDateTime getCreatedDate() { + return this.createdDate; + } + + /** + * Set the createdDate property: The date this asset was first added to this workspace. + * + * @param createdDate the createdDate value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setCreatedDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the updatedDate property: The date this asset was last updated for this workspace. + * + * @return the updatedDate value. + */ + @Generated + public OffsetDateTime getUpdatedDate() { + return this.updatedDate; + } + + /** + * Set the updatedDate property: The date this asset was last updated for this workspace. + * + * @param updatedDate the updatedDate value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setUpdatedDate(OffsetDateTime updatedDate) { + this.updatedDate = updatedDate; + return this; + } + + /** + * Get the state property: The state property. + * + * @return the state value. + */ + @Generated + public AssetState getState() { + return this.state; + } + + /** + * Set the state property: The state property. + * + * @param state the state value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setState(AssetState state) { + this.state = state; + return this; + } + + /** + * Get the externalId property: An optional customer provided identifier for this asset. + * + * @return the externalId value. + */ + @Generated + public String getExternalId() { + return this.externalId; + } + + /** + * Set the externalId property: An optional customer provided identifier for this asset. + * + * @param externalId the externalId value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setExternalId(String externalId) { + this.externalId = externalId; + return this; + } + + /** + * Get the labels property: Customer labels assigned to this asset. + * + * @return the labels value. + */ + @Generated + public List getLabels() { + return this.labels; + } + + /** + * Set the labels property: Customer labels assigned to this asset. + * + * @param labels the labels value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setLabels(List labels) { + this.labels = labels; + return this; + } + + /** + * Get the wildcard property: An indicator of whether this asset represents a wildcard rollup of assets on this + * domain. + * + * @return the wildcard value. + */ + @Generated + public Boolean isWildcard() { + return this.wildcard; + } + + /** + * Set the wildcard property: An indicator of whether this asset represents a wildcard rollup of assets on this + * domain. + * + * @param wildcard the wildcard value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setWildcard(Boolean wildcard) { + this.wildcard = wildcard; + return this; + } + + /** + * Get the discoGroupName property: The name of the DiscoGroup that brought added this asset to the workspace. + * + * @return the discoGroupName value. + */ + @Generated + public String getDiscoGroupName() { + return this.discoGroupName; + } + + /** + * Set the discoGroupName property: The name of the DiscoGroup that brought added this asset to the workspace. + * + * @param discoGroupName the discoGroupName value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setDiscoGroupName(String discoGroupName) { + this.discoGroupName = discoGroupName; + return this; + } + + /** + * Get the auditTrail property: The history of how this asset was pulled into the workspace through the discovery + * process. + * + * @return the auditTrail value. + */ + @Generated + public List getAuditTrail() { + return this.auditTrail; + } + + /** + * Set the auditTrail property: The history of how this asset was pulled into the workspace through the discovery + * process. + * + * @param auditTrail the auditTrail value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setAuditTrail(List auditTrail) { + this.auditTrail = auditTrail; + return this; + } + + /** + * Get the reason property: The reason property. + * + * @return the reason value. + */ + @Generated + public String getReason() { + return this.reason; + } + + /** + * Set the reason property: The reason property. + * + * @param reason the reason value to set. + * @return the AssetResource object itself. + */ + @Generated + AssetResource setReason(String reason) { + this.reason = reason; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("uuid", this.uuid); + jsonWriter.writeStringField("createdDate", + this.createdDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdDate)); + jsonWriter.writeStringField("updatedDate", + this.updatedDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.updatedDate)); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeStringField("externalId", this.externalId); + jsonWriter.writeArrayField("labels", this.labels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("wildcard", this.wildcard); + jsonWriter.writeStringField("discoGroupName", this.discoGroupName); + jsonWriter.writeArrayField("auditTrail", this.auditTrail, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AssetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AssetResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AssetResource. + */ + @Generated + public static AssetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + // Prepare for reading + readerToUse.nextToken(); + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("as".equals(discriminatorValue)) { + return AsAssetResource.fromJson(readerToUse.reset()); + } else if ("contact".equals(discriminatorValue)) { + return ContactAssetResource.fromJson(readerToUse.reset()); + } else if ("domain".equals(discriminatorValue)) { + return DomainAssetResource.fromJson(readerToUse.reset()); + } else if ("host".equals(discriminatorValue)) { + return HostAssetResource.fromJson(readerToUse.reset()); + } else if ("ipAddress".equals(discriminatorValue)) { + return IpAddressAssetResource.fromJson(readerToUse.reset()); + } else if ("ipBlock".equals(discriminatorValue)) { + return IpBlockAssetResource.fromJson(readerToUse.reset()); + } else if ("page".equals(discriminatorValue)) { + return PageAssetResource.fromJson(readerToUse.reset()); + } else if ("sslCert".equals(discriminatorValue)) { + return SslCertAssetResource.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + @Generated + static AssetResource fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AssetResource deserializedAssetResource = new AssetResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + deserializedAssetResource.id = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedAssetResource.kind = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAssetResource.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedAssetResource.displayName = reader.getString(); + } else if ("uuid".equals(fieldName)) { + deserializedAssetResource.uuid = reader.getString(); + } else if ("createdDate".equals(fieldName)) { + deserializedAssetResource.createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedDate".equals(fieldName)) { + deserializedAssetResource.updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + deserializedAssetResource.state = AssetState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + deserializedAssetResource.externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + List labels = reader.readArray(reader1 -> reader1.getString()); + deserializedAssetResource.labels = labels; + } else if ("wildcard".equals(fieldName)) { + deserializedAssetResource.wildcard = reader.getNullable(JsonReader::getBoolean); + } else if ("discoGroupName".equals(fieldName)) { + deserializedAssetResource.discoGroupName = reader.getString(); + } else if ("auditTrail".equals(fieldName)) { + List auditTrail = reader.readArray(reader1 -> AuditTrailItem.fromJson(reader1)); + deserializedAssetResource.auditTrail = auditTrail; + } else if ("reason".equals(fieldName)) { + deserializedAssetResource.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedAssetResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetSecurityPolicy.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetSecurityPolicy.java new file mode 100644 index 000000000000..ddeccd599d67 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetSecurityPolicy.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The AssetSecurityPolicy model. + */ +@Immutable +public final class AssetSecurityPolicy implements JsonSerializable { + + /* + * The policyName property. + */ + @Generated + private String policyName; + + /* + * The isAffected property. + */ + @Generated + private Boolean isAffected; + + /* + * The description property. + */ + @Generated + private String description; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The sources property. + */ + @Generated + private List sources; + + /** + * Creates an instance of AssetSecurityPolicy class. + */ + @Generated + private AssetSecurityPolicy() { + } + + /** + * Get the policyName property: The policyName property. + * + * @return the policyName value. + */ + @Generated + public String getPolicyName() { + return this.policyName; + } + + /** + * Get the isAffected property: The isAffected property. + * + * @return the isAffected value. + */ + @Generated + public Boolean isAffected() { + return this.isAffected; + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("policyName", this.policyName); + jsonWriter.writeBooleanField("isAffected", this.isAffected); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("recent", this.recent); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AssetSecurityPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AssetSecurityPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AssetSecurityPolicy. + */ + @Generated + public static AssetSecurityPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AssetSecurityPolicy deserializedAssetSecurityPolicy = new AssetSecurityPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("policyName".equals(fieldName)) { + deserializedAssetSecurityPolicy.policyName = reader.getString(); + } else if ("isAffected".equals(fieldName)) { + deserializedAssetSecurityPolicy.isAffected = reader.getNullable(JsonReader::getBoolean); + } else if ("description".equals(fieldName)) { + deserializedAssetSecurityPolicy.description = reader.getString(); + } else if ("firstSeen".equals(fieldName)) { + deserializedAssetSecurityPolicy.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedAssetSecurityPolicy.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedAssetSecurityPolicy.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedAssetSecurityPolicy.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedAssetSecurityPolicy.sources = sources; + } else { + reader.skipChildren(); + } + } + return deserializedAssetSecurityPolicy; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetState.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetState.java new file mode 100644 index 000000000000..389dd79f1e5f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetState.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state of assets. + */ +public final class AssetState extends ExpandableStringEnum { + + /** + * Static value candidate for AssetState. + */ + @Generated + public static final AssetState CANDIDATE = fromString("candidate"); + + /** + * Static value confirmed for AssetState. + */ + @Generated + public static final AssetState CONFIRMED = fromString("confirmed"); + + /** + * Static value dismissed for AssetState. + */ + @Generated + public static final AssetState DISMISSED = fromString("dismissed"); + + /** + * Static value candidateInvestigate for AssetState. + */ + @Generated + public static final AssetState CANDIDATE_INVESTIGATE = fromString("candidateInvestigate"); + + /** + * Static value associatedPartner for AssetState. + */ + @Generated + public static final AssetState ASSOCIATED_PARTNER = fromString("associatedPartner"); + + /** + * Static value associatedThirdparty for AssetState. + */ + @Generated + public static final AssetState ASSOCIATED_THIRDPARTY = fromString("associatedThirdparty"); + + /** + * Static value archived for AssetState. + */ + @Generated + public static final AssetState ARCHIVED = fromString("archived"); + + /** + * Creates a new instance of AssetState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public AssetState() { + } + + /** + * Creates or finds a AssetState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AssetState. + */ + @Generated + public static AssetState fromString(String name) { + return fromString(name, AssetState.class); + } + + /** + * Gets known AssetState values. + * + * @return known AssetState values. + */ + @Generated + public static Collection values() { + return values(AssetState.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetSummaryResult.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetSummaryResult.java new file mode 100644 index 000000000000..f0d9f827e2cc --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetSummaryResult.java @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The collection of asset summaries. + */ +@Immutable +public final class AssetSummaryResult implements JsonSerializable { + + /* + * The name of the summary response. Depending on the request time this will either be the asset filter, risk + * category, or risk metric. + */ + @Generated + private String displayName; + + /* + * The description of the summary response. Filters don't have a description. + */ + @Generated + private String description; + + /* + * The last time risk categories or risk metrics were captured. Set to the current time for asset filter requests, + * which always pull the live asset data. + */ + @Generated + private OffsetDateTime updatedAt; + + /* + * If the request is for a metric category, this will contain the requested unique category name. + */ + @Generated + private String metricCategory; + + /* + * If the request is for a metric, this will contain the requested unique metric name. + */ + @Generated + private String metric; + + /* + * If the request is for an asset filter, this will contain the corresponding filter. + */ + @Generated + private String filter; + + /* + * An optional label used to filter requests results. + */ + @Generated + private String labelName; + + /* + * The count of assets matching the request parameters. + */ + @Generated + private Long count; + + /* + * The link to the corresponding asset details. + */ + @Generated + private String link; + + /* + * The corresponding child entities. For metric categories this will contain metrics. For filters with groupBy and + * segmentBy this will contain facets. + */ + @Generated + private List children; + + /** + * Creates an instance of AssetSummaryResult class. + */ + @Generated + private AssetSummaryResult() { + } + + /** + * Get the displayName property: The name of the summary response. Depending on the request time this will either be + * the asset filter, risk category, or risk metric. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Get the description property: The description of the summary response. Filters don't have a description. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Get the updatedAt property: The last time risk categories or risk metrics were captured. Set to the current time + * for asset filter requests, which always pull the live asset data. + * + * @return the updatedAt value. + */ + @Generated + public OffsetDateTime getUpdatedAt() { + return this.updatedAt; + } + + /** + * Get the metricCategory property: If the request is for a metric category, this will contain the requested unique + * category name. + * + * @return the metricCategory value. + */ + @Generated + public String getMetricCategory() { + return this.metricCategory; + } + + /** + * Get the metric property: If the request is for a metric, this will contain the requested unique metric name. + * + * @return the metric value. + */ + @Generated + public String getMetric() { + return this.metric; + } + + /** + * Get the filter property: If the request is for an asset filter, this will contain the corresponding filter. + * + * @return the filter value. + */ + @Generated + public String getFilter() { + return this.filter; + } + + /** + * Get the labelName property: An optional label used to filter requests results. + * + * @return the labelName value. + */ + @Generated + public String getLabelName() { + return this.labelName; + } + + /** + * Get the count property: The count of assets matching the request parameters. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the link property: The link to the corresponding asset details. + * + * @return the link value. + */ + @Generated + public String getLink() { + return this.link; + } + + /** + * Get the children property: The corresponding child entities. For metric categories this will contain metrics. For + * filters with groupBy and segmentBy this will contain facets. + * + * @return the children value. + */ + @Generated + public List getChildren() { + return this.children; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("updatedAt", + this.updatedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.updatedAt)); + jsonWriter.writeStringField("metricCategory", this.metricCategory); + jsonWriter.writeStringField("metric", this.metric); + jsonWriter.writeStringField("filter", this.filter); + jsonWriter.writeStringField("labelName", this.labelName); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("link", this.link); + jsonWriter.writeArrayField("children", this.children, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AssetSummaryResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AssetSummaryResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AssetSummaryResult. + */ + @Generated + public static AssetSummaryResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AssetSummaryResult deserializedAssetSummaryResult = new AssetSummaryResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("displayName".equals(fieldName)) { + deserializedAssetSummaryResult.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedAssetSummaryResult.description = reader.getString(); + } else if ("updatedAt".equals(fieldName)) { + deserializedAssetSummaryResult.updatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("metricCategory".equals(fieldName)) { + deserializedAssetSummaryResult.metricCategory = reader.getString(); + } else if ("metric".equals(fieldName)) { + deserializedAssetSummaryResult.metric = reader.getString(); + } else if ("filter".equals(fieldName)) { + deserializedAssetSummaryResult.filter = reader.getString(); + } else if ("labelName".equals(fieldName)) { + deserializedAssetSummaryResult.labelName = reader.getString(); + } else if ("count".equals(fieldName)) { + deserializedAssetSummaryResult.count = reader.getNullable(JsonReader::getLong); + } else if ("link".equals(fieldName)) { + deserializedAssetSummaryResult.link = reader.getString(); + } else if ("children".equals(fieldName)) { + List children + = reader.readArray(reader1 -> AssetSummaryResult.fromJson(reader1)); + deserializedAssetSummaryResult.children = children; + } else { + reader.skipChildren(); + } + } + return deserializedAssetSummaryResult; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateData.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateData.java new file mode 100644 index 000000000000..850b3a7de96f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateData.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * A request body used to update an asset. + */ +@Fluent +public final class AssetUpdateData implements JsonSerializable { + + /* + * The state to update the asset to. + */ + @Generated + private AssetUpdateState state; + + /* + * A string which can be used to identify the asset in external systems. + */ + @Generated + private String externalId; + + /* + * Any Labels to update the asset with. + */ + @Generated + private Map labels; + + /* + * A list of asset types to cascade the updates to. + */ + @Generated + private AssetUpdateTransfers transfers; + + /** + * Creates an instance of AssetUpdateData class. + */ + @Generated + public AssetUpdateData() { + } + + /** + * Get the state property: The state to update the asset to. + * + * @return the state value. + */ + @Generated + public AssetUpdateState getState() { + return this.state; + } + + /** + * Set the state property: The state to update the asset to. + * + * @param state the state value to set. + * @return the AssetUpdateData object itself. + */ + @Generated + public AssetUpdateData setState(AssetUpdateState state) { + this.state = state; + return this; + } + + /** + * Get the externalId property: A string which can be used to identify the asset in external systems. + * + * @return the externalId value. + */ + @Generated + public String getExternalId() { + return this.externalId; + } + + /** + * Set the externalId property: A string which can be used to identify the asset in external systems. + * + * @param externalId the externalId value to set. + * @return the AssetUpdateData object itself. + */ + @Generated + public AssetUpdateData setExternalId(String externalId) { + this.externalId = externalId; + return this; + } + + /** + * Get the labels property: Any Labels to update the asset with. + * + * @return the labels value. + */ + @Generated + public Map getLabels() { + return this.labels; + } + + /** + * Set the labels property: Any Labels to update the asset with. + * + * @param labels the labels value to set. + * @return the AssetUpdateData object itself. + */ + @Generated + public AssetUpdateData setLabels(Map labels) { + this.labels = labels; + return this; + } + + /** + * Get the transfers property: A list of asset types to cascade the updates to. + * + * @return the transfers value. + */ + @Generated + public AssetUpdateTransfers getTransfers() { + return this.transfers; + } + + /** + * Set the transfers property: A list of asset types to cascade the updates to. + * + * @param transfers the transfers value to set. + * @return the AssetUpdateData object itself. + */ + @Generated + public AssetUpdateData setTransfers(AssetUpdateTransfers transfers) { + this.transfers = transfers; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeStringField("externalId", this.externalId); + jsonWriter.writeMapField("labels", this.labels, (writer, element) -> writer.writeBoolean(element)); + jsonWriter.writeStringField("transfers", this.transfers == null ? null : this.transfers.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AssetUpdateData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AssetUpdateData if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AssetUpdateData. + */ + @Generated + public static AssetUpdateData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AssetUpdateData deserializedAssetUpdateData = new AssetUpdateData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("state".equals(fieldName)) { + deserializedAssetUpdateData.state = AssetUpdateState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + deserializedAssetUpdateData.externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + Map labels = reader.readMap(reader1 -> reader1.getBoolean()); + deserializedAssetUpdateData.labels = labels; + } else if ("transfers".equals(fieldName)) { + deserializedAssetUpdateData.transfers = AssetUpdateTransfers.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + return deserializedAssetUpdateData; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateState.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateState.java new file mode 100644 index 000000000000..eb0205b568e3 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateState.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state to update the asset to. + */ +public final class AssetUpdateState extends ExpandableStringEnum { + + /** + * Static value candidate for AssetUpdateState. + */ + @Generated + public static final AssetUpdateState CANDIDATE = fromString("candidate"); + + /** + * Static value confirmed for AssetUpdateState. + */ + @Generated + public static final AssetUpdateState CONFIRMED = fromString("confirmed"); + + /** + * Static value dismissed for AssetUpdateState. + */ + @Generated + public static final AssetUpdateState DISMISSED = fromString("dismissed"); + + /** + * Static value candidateInvestigate for AssetUpdateState. + */ + @Generated + public static final AssetUpdateState CANDIDATE_INVESTIGATE = fromString("candidateInvestigate"); + + /** + * Static value associatedPartner for AssetUpdateState. + */ + @Generated + public static final AssetUpdateState ASSOCIATED_PARTNER = fromString("associatedPartner"); + + /** + * Static value associatedThirdparty for AssetUpdateState. + */ + @Generated + public static final AssetUpdateState ASSOCIATED_THIRDPARTY = fromString("associatedThirdparty"); + + /** + * Creates a new instance of AssetUpdateState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public AssetUpdateState() { + } + + /** + * Creates or finds a AssetUpdateState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AssetUpdateState. + */ + @Generated + public static AssetUpdateState fromString(String name) { + return fromString(name, AssetUpdateState.class); + } + + /** + * Gets known AssetUpdateState values. + * + * @return known AssetUpdateState values. + */ + @Generated + public static Collection values() { + return values(AssetUpdateState.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateTransfers.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateTransfers.java new file mode 100644 index 000000000000..4a36b740b8d4 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateTransfers.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * A list of asset types to cascade the updates to. + */ +public final class AssetUpdateTransfers extends ExpandableStringEnum { + + /** + * Static value as for AssetUpdateTransfers. + */ + @Generated + public static final AssetUpdateTransfers AS = fromString("as"); + + /** + * Static value contact for AssetUpdateTransfers. + */ + @Generated + public static final AssetUpdateTransfers CONTACT = fromString("contact"); + + /** + * Static value domain for AssetUpdateTransfers. + */ + @Generated + public static final AssetUpdateTransfers DOMAIN = fromString("domain"); + + /** + * Static value host for AssetUpdateTransfers. + */ + @Generated + public static final AssetUpdateTransfers HOST = fromString("host"); + + /** + * Static value ipAddress for AssetUpdateTransfers. + */ + @Generated + public static final AssetUpdateTransfers IP_ADDRESS = fromString("ipAddress"); + + /** + * Static value ipBlock for AssetUpdateTransfers. + */ + @Generated + public static final AssetUpdateTransfers IP_BLOCK = fromString("ipBlock"); + + /** + * Static value page for AssetUpdateTransfers. + */ + @Generated + public static final AssetUpdateTransfers PAGE = fromString("page"); + + /** + * Static value sslCert for AssetUpdateTransfers. + */ + @Generated + public static final AssetUpdateTransfers SSL_CERT = fromString("sslCert"); + + /** + * Creates a new instance of AssetUpdateTransfers value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public AssetUpdateTransfers() { + } + + /** + * Creates or finds a AssetUpdateTransfers from its string representation. + * + * @param name a name to look for. + * @return the corresponding AssetUpdateTransfers. + */ + @Generated + public static AssetUpdateTransfers fromString(String name) { + return fromString(name, AssetUpdateTransfers.class); + } + + /** + * Gets known AssetUpdateTransfers values. + * + * @return known AssetUpdateTransfers values. + */ + @Generated + public static Collection values() { + return values(AssetUpdateTransfers.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Attribute.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Attribute.java new file mode 100644 index 000000000000..308b352df358 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Attribute.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The Attribute model. + */ +@Immutable +public final class Attribute implements JsonSerializable { + + /* + * The attributeType property. + */ + @Generated + private String attributeType; + + /* + * The attributeValue property. + */ + @Generated + private String attributeValue; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /** + * Creates an instance of Attribute class. + */ + @Generated + private Attribute() { + } + + /** + * Get the attributeType property: The attributeType property. + * + * @return the attributeType value. + */ + @Generated + public String getAttributeType() { + return this.attributeType; + } + + /** + * Get the attributeValue property: The attributeValue property. + * + * @return the attributeValue value. + */ + @Generated + public String getAttributeValue() { + return this.attributeValue; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("attributeType", this.attributeType); + jsonWriter.writeStringField("attributeValue", this.attributeValue); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("recent", this.recent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Attribute from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Attribute if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Attribute. + */ + @Generated + public static Attribute fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Attribute deserializedAttribute = new Attribute(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("attributeType".equals(fieldName)) { + deserializedAttribute.attributeType = reader.getString(); + } else if ("attributeValue".equals(fieldName)) { + deserializedAttribute.attributeValue = reader.getString(); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedAttribute.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedAttribute.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedAttribute.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedAttribute.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedAttribute.recent = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedAttribute; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItem.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItem.java new file mode 100644 index 000000000000..57abf22e00e7 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItem.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The history of how this asset was pulled into the workspace through the discovery process. + */ +@Immutable +public final class AuditTrailItem implements JsonSerializable { + + /* + * This is typically the same as the name but might be different for different models. + */ + @Generated + private String id; + + /* + * The caller provided unique name for the resource. + */ + @Generated + private String name; + + /* + * The name that can be used for display purposes. + */ + @Generated + private String displayName; + + /* + * The kind of asset. + */ + @Generated + private AuditTrailItemKind kind; + + /* + * An explanation of why this audit trail node was discovered from the previous node. + */ + @Generated + private String reason; + + /** + * Creates an instance of AuditTrailItem class. + */ + @Generated + private AuditTrailItem() { + } + + /** + * Get the id property: This is typically the same as the name but might be different for different models. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the name property: The caller provided unique name for the resource. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the displayName property: The name that can be used for display purposes. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Get the kind property: The kind of asset. + * + * @return the kind value. + */ + @Generated + public AuditTrailItemKind getKind() { + return this.kind; + } + + /** + * Get the reason property: An explanation of why this audit trail node was discovered from the previous node. + * + * @return the reason value. + */ + @Generated + public String getReason() { + return this.reason; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuditTrailItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuditTrailItem if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AuditTrailItem. + */ + @Generated + public static AuditTrailItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuditTrailItem deserializedAuditTrailItem = new AuditTrailItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + deserializedAuditTrailItem.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAuditTrailItem.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedAuditTrailItem.displayName = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedAuditTrailItem.kind = AuditTrailItemKind.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedAuditTrailItem.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedAuditTrailItem; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItemKind.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItemKind.java new file mode 100644 index 000000000000..4b91f030eae8 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItemKind.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The kind of asset. + */ +public final class AuditTrailItemKind extends ExpandableStringEnum { + + /** + * Static value as for AuditTrailItemKind. + */ + @Generated + public static final AuditTrailItemKind AS = fromString("as"); + + /** + * Static value contact for AuditTrailItemKind. + */ + @Generated + public static final AuditTrailItemKind CONTACT = fromString("contact"); + + /** + * Static value domain for AuditTrailItemKind. + */ + @Generated + public static final AuditTrailItemKind DOMAIN = fromString("domain"); + + /** + * Static value host for AuditTrailItemKind. + */ + @Generated + public static final AuditTrailItemKind HOST = fromString("host"); + + /** + * Static value ipAddress for AuditTrailItemKind. + */ + @Generated + public static final AuditTrailItemKind IP_ADDRESS = fromString("ipAddress"); + + /** + * Static value ipBlock for AuditTrailItemKind. + */ + @Generated + public static final AuditTrailItemKind IP_BLOCK = fromString("ipBlock"); + + /** + * Static value page for AuditTrailItemKind. + */ + @Generated + public static final AuditTrailItemKind PAGE = fromString("page"); + + /** + * Static value sslCert for AuditTrailItemKind. + */ + @Generated + public static final AuditTrailItemKind SSL_CERT = fromString("sslCert"); + + /** + * Creates a new instance of AuditTrailItemKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public AuditTrailItemKind() { + } + + /** + * Creates or finds a AuditTrailItemKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding AuditTrailItemKind. + */ + @Generated + public static AuditTrailItemKind fromString(String name) { + return fromString(name, AuditTrailItemKind.class); + } + + /** + * Gets known AuditTrailItemKind values. + * + * @return known AuditTrailItemKind values. + */ + @Generated + public static Collection values() { + return values(AuditTrailItemKind.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnection.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnection.java new file mode 100644 index 000000000000..08aeb8b71fc5 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnection.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The AzureDataExplorerDataConnection model. + */ +@Immutable +public final class AzureDataExplorerDataConnection extends DataConnection { + + /* + * Discriminator property for DataConnection. + */ + @Generated + private String kind = "azureDataExplorer"; + + /* + * properties + */ + @Generated + private final AzureDataExplorerDataConnectionProperties properties; + + /** + * Creates an instance of AzureDataExplorerDataConnection class. + * + * @param properties the properties value to set. + */ + @Generated + private AzureDataExplorerDataConnection(AzureDataExplorerDataConnectionProperties properties) { + this.properties = properties; + } + + /** + * Get the kind property: Discriminator property for DataConnection. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the properties property: properties. + * + * @return the properties value. + */ + @Generated + public AzureDataExplorerDataConnectionProperties getProperties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", getId()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("content", getContent() == null ? null : getContent().toString()); + jsonWriter.writeStringField("frequency", getFrequency() == null ? null : getFrequency().toString()); + jsonWriter.writeNumberField("frequencyOffset", getFrequencyOffset()); + jsonWriter.writeBooleanField("active", isActive()); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureDataExplorerDataConnection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureDataExplorerDataConnection if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AzureDataExplorerDataConnection. + */ + @Generated + public static AzureDataExplorerDataConnection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + String id = null; + String displayName = null; + DataConnectionContent content = null; + OffsetDateTime createdDate = null; + DataConnectionFrequency frequency = null; + Integer frequencyOffset = null; + OffsetDateTime updatedDate = null; + OffsetDateTime userUpdatedAt = null; + Boolean active = null; + String inactiveMessage = null; + AzureDataExplorerDataConnectionProperties properties = null; + String kind = "azureDataExplorer"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("content".equals(fieldName)) { + content = DataConnectionContent.fromString(reader.getString()); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("frequency".equals(fieldName)) { + frequency = DataConnectionFrequency.fromString(reader.getString()); + } else if ("frequencyOffset".equals(fieldName)) { + frequencyOffset = reader.getNullable(JsonReader::getInt); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("userUpdatedAt".equals(fieldName)) { + userUpdatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("active".equals(fieldName)) { + active = reader.getNullable(JsonReader::getBoolean); + } else if ("inactiveMessage".equals(fieldName)) { + inactiveMessage = reader.getString(); + } else if ("properties".equals(fieldName)) { + properties = AzureDataExplorerDataConnectionProperties.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + AzureDataExplorerDataConnection deserializedAzureDataExplorerDataConnection + = new AzureDataExplorerDataConnection(properties); + deserializedAzureDataExplorerDataConnection.setName(name); + deserializedAzureDataExplorerDataConnection.setId(id); + deserializedAzureDataExplorerDataConnection.setDisplayName(displayName); + deserializedAzureDataExplorerDataConnection.setContent(content); + deserializedAzureDataExplorerDataConnection.setCreatedDate(createdDate); + deserializedAzureDataExplorerDataConnection.setFrequency(frequency); + deserializedAzureDataExplorerDataConnection.setFrequencyOffset(frequencyOffset); + deserializedAzureDataExplorerDataConnection.setUpdatedDate(updatedDate); + deserializedAzureDataExplorerDataConnection.setUserUpdatedAt(userUpdatedAt); + deserializedAzureDataExplorerDataConnection.setActive(active); + deserializedAzureDataExplorerDataConnection.setInactiveMessage(inactiveMessage); + deserializedAzureDataExplorerDataConnection.kind = kind; + return deserializedAzureDataExplorerDataConnection; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionData.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionData.java new file mode 100644 index 000000000000..4e02c1a2874e --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionData.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AzureDataExplorerDataConnectionData model. + */ +@Fluent +public final class AzureDataExplorerDataConnectionData extends DataConnectionData { + + /* + * Discriminator property for DataConnectionData. + */ + @Generated + private String kind = "azureDataExplorer"; + + /* + * properties + */ + @Generated + private final AzureDataExplorerDataConnectionProperties properties; + + /** + * Creates an instance of AzureDataExplorerDataConnectionData class. + * + * @param properties the properties value to set. + */ + @Generated + public AzureDataExplorerDataConnectionData(AzureDataExplorerDataConnectionProperties properties) { + this.properties = properties; + } + + /** + * Get the kind property: Discriminator property for DataConnectionData. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the properties property: properties. + * + * @return the properties value. + */ + @Generated + public AzureDataExplorerDataConnectionProperties getProperties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public AzureDataExplorerDataConnectionData setName(String name) { + super.setName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public AzureDataExplorerDataConnectionData setContent(DataConnectionContent content) { + super.setContent(content); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public AzureDataExplorerDataConnectionData setFrequency(DataConnectionFrequency frequency) { + super.setFrequency(frequency); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public AzureDataExplorerDataConnectionData setFrequencyOffset(Integer frequencyOffset) { + super.setFrequencyOffset(frequencyOffset); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("content", getContent() == null ? null : getContent().toString()); + jsonWriter.writeStringField("frequency", getFrequency() == null ? null : getFrequency().toString()); + jsonWriter.writeNumberField("frequencyOffset", getFrequencyOffset()); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureDataExplorerDataConnectionData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureDataExplorerDataConnectionData if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AzureDataExplorerDataConnectionData. + */ + @Generated + public static AzureDataExplorerDataConnectionData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + DataConnectionContent content = null; + DataConnectionFrequency frequency = null; + Integer frequencyOffset = null; + AzureDataExplorerDataConnectionProperties properties = null; + String kind = "azureDataExplorer"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("content".equals(fieldName)) { + content = DataConnectionContent.fromString(reader.getString()); + } else if ("frequency".equals(fieldName)) { + frequency = DataConnectionFrequency.fromString(reader.getString()); + } else if ("frequencyOffset".equals(fieldName)) { + frequencyOffset = reader.getNullable(JsonReader::getInt); + } else if ("properties".equals(fieldName)) { + properties = AzureDataExplorerDataConnectionProperties.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + AzureDataExplorerDataConnectionData deserializedAzureDataExplorerDataConnectionData + = new AzureDataExplorerDataConnectionData(properties); + deserializedAzureDataExplorerDataConnectionData.setName(name); + deserializedAzureDataExplorerDataConnectionData.setContent(content); + deserializedAzureDataExplorerDataConnectionData.setFrequency(frequency); + deserializedAzureDataExplorerDataConnectionData.setFrequencyOffset(frequencyOffset); + deserializedAzureDataExplorerDataConnectionData.kind = kind; + return deserializedAzureDataExplorerDataConnectionData; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionProperties.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionProperties.java new file mode 100644 index 000000000000..6331ceb4c664 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionProperties.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AzureDataExplorerDataConnectionProperties model. + */ +@Fluent +public final class AzureDataExplorerDataConnectionProperties extends DataConnectionProperties { + + /* + * The azure data explorer cluster name + */ + @Generated + private String clusterName; + + /* + * The azure data explorer region + */ + @Generated + private String region; + + /* + * The azure data explorer database name + */ + @Generated + private String databaseName; + + /** + * Creates an instance of AzureDataExplorerDataConnectionProperties class. + */ + @Generated + public AzureDataExplorerDataConnectionProperties() { + } + + /** + * Get the clusterName property: The azure data explorer cluster name. + * + * @return the clusterName value. + */ + @Generated + public String getClusterName() { + return this.clusterName; + } + + /** + * Set the clusterName property: The azure data explorer cluster name. + * + * @param clusterName the clusterName value to set. + * @return the AzureDataExplorerDataConnectionProperties object itself. + */ + @Generated + public AzureDataExplorerDataConnectionProperties setClusterName(String clusterName) { + this.clusterName = clusterName; + return this; + } + + /** + * Get the region property: The azure data explorer region. + * + * @return the region value. + */ + @Generated + public String getRegion() { + return this.region; + } + + /** + * Set the region property: The azure data explorer region. + * + * @param region the region value to set. + * @return the AzureDataExplorerDataConnectionProperties object itself. + */ + @Generated + public AzureDataExplorerDataConnectionProperties setRegion(String region) { + this.region = region; + return this; + } + + /** + * Get the databaseName property: The azure data explorer database name. + * + * @return the databaseName value. + */ + @Generated + public String getDatabaseName() { + return this.databaseName; + } + + /** + * Set the databaseName property: The azure data explorer database name. + * + * @param databaseName the databaseName value to set. + * @return the AzureDataExplorerDataConnectionProperties object itself. + */ + @Generated + public AzureDataExplorerDataConnectionProperties setDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("clusterName", this.clusterName); + jsonWriter.writeStringField("region", this.region); + jsonWriter.writeStringField("databaseName", this.databaseName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureDataExplorerDataConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureDataExplorerDataConnectionProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AzureDataExplorerDataConnectionProperties. + */ + @Generated + public static AzureDataExplorerDataConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureDataExplorerDataConnectionProperties deserializedAzureDataExplorerDataConnectionProperties + = new AzureDataExplorerDataConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("clusterName".equals(fieldName)) { + deserializedAzureDataExplorerDataConnectionProperties.clusterName = reader.getString(); + } else if ("region".equals(fieldName)) { + deserializedAzureDataExplorerDataConnectionProperties.region = reader.getString(); + } else if ("databaseName".equals(fieldName)) { + deserializedAzureDataExplorerDataConnectionProperties.databaseName = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedAzureDataExplorerDataConnectionProperties; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Banner.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Banner.java new file mode 100644 index 000000000000..f380c798eae2 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Banner.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The Banner model. + */ +@Immutable +public final class Banner implements JsonSerializable { + + /* + * The port property. + */ + @Generated + private Integer port; + + /* + * The banner property. + */ + @Generated + private String banner; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The scanType property. + */ + @Generated + private String scanType; + + /* + * The bannerMetadata property. + */ + @Generated + private String bannerMetadata; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The sha256 property. + */ + @Generated + private String sha256; + + /* + * The sources property. + */ + @Generated + private List sources; + + /** + * Creates an instance of Banner class. + */ + @Generated + private Banner() { + } + + /** + * Get the port property: The port property. + * + * @return the port value. + */ + @Generated + public Integer getPort() { + return this.port; + } + + /** + * Get the banner property: The banner property. + * + * @return the banner value. + */ + @Generated + public String getBanner() { + return this.banner; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the scanType property: The scanType property. + * + * @return the scanType value. + */ + @Generated + public String getScanType() { + return this.scanType; + } + + /** + * Get the bannerMetadata property: The bannerMetadata property. + * + * @return the bannerMetadata value. + */ + @Generated + public String getBannerMetadata() { + return this.bannerMetadata; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the sha256 property: The sha256 property. + * + * @return the sha256 value. + */ + @Generated + public String getSha256() { + return this.sha256; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("port", this.port); + jsonWriter.writeStringField("banner", this.banner); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("scanType", this.scanType); + jsonWriter.writeStringField("bannerMetadata", this.bannerMetadata); + jsonWriter.writeBooleanField("recent", this.recent); + jsonWriter.writeStringField("sha256", this.sha256); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Banner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Banner if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Banner. + */ + @Generated + public static Banner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Banner deserializedBanner = new Banner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("port".equals(fieldName)) { + deserializedBanner.port = reader.getNullable(JsonReader::getInt); + } else if ("banner".equals(fieldName)) { + deserializedBanner.banner = reader.getString(); + } else if ("firstSeen".equals(fieldName)) { + deserializedBanner.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedBanner.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedBanner.count = reader.getNullable(JsonReader::getLong); + } else if ("scanType".equals(fieldName)) { + deserializedBanner.scanType = reader.getString(); + } else if ("bannerMetadata".equals(fieldName)) { + deserializedBanner.bannerMetadata = reader.getString(); + } else if ("recent".equals(fieldName)) { + deserializedBanner.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("sha256".equals(fieldName)) { + deserializedBanner.sha256 = reader.getString(); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedBanner.sources = sources; + } else { + reader.skipChildren(); + } + } + return deserializedBanner; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ContactAsset.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ContactAsset.java new file mode 100644 index 000000000000..3e6a37924f78 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ContactAsset.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The ContactAsset model. + */ +@Immutable +public final class ContactAsset extends InventoryAsset { + + /* + * The email property. + */ + @Generated + private String email; + + /* + * The names property. + */ + @Generated + private List names; + + /* + * The organizations property. + */ + @Generated + private List organizations; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /** + * Creates an instance of ContactAsset class. + */ + @Generated + private ContactAsset() { + } + + /** + * Get the email property: The email property. + * + * @return the email value. + */ + @Generated + public String getEmail() { + return this.email; + } + + /** + * Get the names property: The names property. + * + * @return the names value. + */ + @Generated + public List getNames() { + return this.names; + } + + /** + * Get the organizations property: The organizations property. + * + * @return the organizations value. + */ + @Generated + public List getOrganizations() { + return this.organizations; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("email", this.email); + jsonWriter.writeArrayField("names", this.names, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("organizations", this.organizations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContactAsset from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContactAsset if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ContactAsset. + */ + @Generated + public static ContactAsset fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContactAsset deserializedContactAsset = new ContactAsset(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("email".equals(fieldName)) { + deserializedContactAsset.email = reader.getString(); + } else if ("names".equals(fieldName)) { + List names = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedContactAsset.names = names; + } else if ("organizations".equals(fieldName)) { + List organizations = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedContactAsset.organizations = organizations; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedContactAsset.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedContactAsset.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedContactAsset.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedContactAsset.count = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + return deserializedContactAsset; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ContactAssetResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ContactAssetResource.java new file mode 100644 index 000000000000..116269d2adf3 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ContactAssetResource.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The ContactAssetResource model. + */ +@Immutable +public final class ContactAssetResource extends AssetResource { + + /* + * Discriminator property for AssetResource. + */ + @Generated + private String kind = "contact"; + + /* + * asset + */ + @Generated + private final ContactAsset asset; + + /** + * Creates an instance of ContactAssetResource class. + * + * @param asset the asset value to set. + */ + @Generated + private ContactAssetResource(ContactAsset asset) { + this.asset = asset; + } + + /** + * Get the kind property: Discriminator property for AssetResource. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the asset property: asset. + * + * @return the asset value. + */ + @Generated + public ContactAsset getAsset() { + return this.asset; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("uuid", getUuid()); + jsonWriter.writeStringField("createdDate", + getCreatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getCreatedDate())); + jsonWriter.writeStringField("updatedDate", + getUpdatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getUpdatedDate())); + jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); + jsonWriter.writeStringField("externalId", getExternalId()); + jsonWriter.writeArrayField("labels", getLabels(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("wildcard", isWildcard()); + jsonWriter.writeStringField("discoGroupName", getDiscoGroupName()); + jsonWriter.writeArrayField("auditTrail", getAuditTrail(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("reason", getReason()); + jsonWriter.writeJsonField("asset", this.asset); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContactAssetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContactAssetResource if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ContactAssetResource. + */ + @Generated + public static ContactAssetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + String name = null; + String displayName = null; + String uuid = null; + OffsetDateTime createdDate = null; + OffsetDateTime updatedDate = null; + AssetState state = null; + String externalId = null; + List labels = null; + Boolean wildcard = null; + String discoGroupName = null; + List auditTrail = null; + String reason = null; + ContactAsset asset = null; + String kind = "contact"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("uuid".equals(fieldName)) { + uuid = reader.getString(); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + state = AssetState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + labels = reader.readArray(reader1 -> reader1.getString()); + } else if ("wildcard".equals(fieldName)) { + wildcard = reader.getNullable(JsonReader::getBoolean); + } else if ("discoGroupName".equals(fieldName)) { + discoGroupName = reader.getString(); + } else if ("auditTrail".equals(fieldName)) { + auditTrail = reader.readArray(reader1 -> AuditTrailItem.fromJson(reader1)); + } else if ("reason".equals(fieldName)) { + reason = reader.getString(); + } else if ("asset".equals(fieldName)) { + asset = ContactAsset.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + ContactAssetResource deserializedContactAssetResource = new ContactAssetResource(asset); + deserializedContactAssetResource.setId(id); + deserializedContactAssetResource.setName(name); + deserializedContactAssetResource.setDisplayName(displayName); + deserializedContactAssetResource.setUuid(uuid); + deserializedContactAssetResource.setCreatedDate(createdDate); + deserializedContactAssetResource.setUpdatedDate(updatedDate); + deserializedContactAssetResource.setState(state); + deserializedContactAssetResource.setExternalId(externalId); + deserializedContactAssetResource.setLabels(labels); + deserializedContactAssetResource.setWildcard(wildcard); + deserializedContactAssetResource.setDiscoGroupName(discoGroupName); + deserializedContactAssetResource.setAuditTrail(auditTrail); + deserializedContactAssetResource.setReason(reason); + deserializedContactAssetResource.kind = kind; + return deserializedContactAssetResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cookie.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cookie.java new file mode 100644 index 000000000000..a05e2b05198f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cookie.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The Cookie model. + */ +@Immutable +public final class Cookie implements JsonSerializable { + + /* + * The cookieName property. + */ + @Generated + private String cookieName; + + /* + * The cookieDomain property. + */ + @Generated + private String cookieDomain; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The cookieExpiryDate property. + */ + @Generated + private OffsetDateTime cookieExpiryDate; + + /** + * Creates an instance of Cookie class. + */ + @Generated + private Cookie() { + } + + /** + * Get the cookieName property: The cookieName property. + * + * @return the cookieName value. + */ + @Generated + public String getCookieName() { + return this.cookieName; + } + + /** + * Get the cookieDomain property: The cookieDomain property. + * + * @return the cookieDomain value. + */ + @Generated + public String getCookieDomain() { + return this.cookieDomain; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the cookieExpiryDate property: The cookieExpiryDate property. + * + * @return the cookieExpiryDate value. + */ + @Generated + public OffsetDateTime getCookieExpiryDate() { + return this.cookieExpiryDate; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("cookieName", this.cookieName); + jsonWriter.writeStringField("cookieDomain", this.cookieDomain); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("recent", this.recent); + jsonWriter.writeStringField("cookieExpiryDate", + this.cookieExpiryDate == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.cookieExpiryDate)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Cookie from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Cookie if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Cookie. + */ + @Generated + public static Cookie fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Cookie deserializedCookie = new Cookie(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("cookieName".equals(fieldName)) { + deserializedCookie.cookieName = reader.getString(); + } else if ("cookieDomain".equals(fieldName)) { + deserializedCookie.cookieDomain = reader.getString(); + } else if ("firstSeen".equals(fieldName)) { + deserializedCookie.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedCookie.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedCookie.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedCookie.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("cookieExpiryDate".equals(fieldName)) { + deserializedCookie.cookieExpiryDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + return deserializedCookie; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cve.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cve.java new file mode 100644 index 000000000000..1ce8a231598f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cve.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Cve model. + */ +@Immutable +public final class Cve implements JsonSerializable { + + /* + * The name property. + */ + @Generated + private String name; + + /* + * The cweId property. + */ + @Generated + private String cweId; + + /* + * The cvssScore property. + */ + @Generated + private Double cvssScore; + + /* + * The cvss3Summary property. + */ + @Generated + private Cvss3Summary cvss3Summary; + + /** + * Creates an instance of Cve class. + */ + @Generated + private Cve() { + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the cweId property: The cweId property. + * + * @return the cweId value. + */ + @Generated + public String getCweId() { + return this.cweId; + } + + /** + * Get the cvssScore property: The cvssScore property. + * + * @return the cvssScore value. + */ + @Generated + public Double getCvssScore() { + return this.cvssScore; + } + + /** + * Get the cvss3Summary property: The cvss3Summary property. + * + * @return the cvss3Summary value. + */ + @Generated + public Cvss3Summary getCvss3Summary() { + return this.cvss3Summary; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("cweId", this.cweId); + jsonWriter.writeNumberField("cvssScore", this.cvssScore); + jsonWriter.writeJsonField("cvss3Summary", this.cvss3Summary); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Cve from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Cve if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Cve. + */ + @Generated + public static Cve fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Cve deserializedCve = new Cve(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + deserializedCve.name = reader.getString(); + } else if ("cweId".equals(fieldName)) { + deserializedCve.cweId = reader.getString(); + } else if ("cvssScore".equals(fieldName)) { + deserializedCve.cvssScore = reader.getNullable(JsonReader::getDouble); + } else if ("cvss3Summary".equals(fieldName)) { + deserializedCve.cvss3Summary = Cvss3Summary.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedCve; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cvss3Summary.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cvss3Summary.java new file mode 100644 index 000000000000..105d68a002c3 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Cvss3Summary.java @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Cvss3Summary model. + */ +@Immutable +public final class Cvss3Summary implements JsonSerializable { + + /* + * The version property. + */ + @Generated + private String version; + + /* + * The vectorString property. + */ + @Generated + private String vectorString; + + /* + * The attackVector property. + */ + @Generated + private String attackVector; + + /* + * The attackComplexity property. + */ + @Generated + private String attackComplexity; + + /* + * The privilegesRequired property. + */ + @Generated + private String privilegesRequired; + + /* + * The userInteraction property. + */ + @Generated + private String userInteraction; + + /* + * The scope property. + */ + @Generated + private String scope; + + /* + * The confidentialityImpact property. + */ + @Generated + private String confidentialityImpact; + + /* + * The integrityImpact property. + */ + @Generated + private String integrityImpact; + + /* + * The availabilityImpact property. + */ + @Generated + private String availabilityImpact; + + /* + * The baseScore property. + */ + @Generated + private Double baseScore; + + /* + * The baseSeverity property. + */ + @Generated + private String baseSeverity; + + /* + * The exploitCodeMaturity property. + */ + @Generated + private String exploitCodeMaturity; + + /* + * The remediationLevel property. + */ + @Generated + private String remediationLevel; + + /* + * The reportConfidence property. + */ + @Generated + private String reportConfidence; + + /* + * The exploitabilityScore property. + */ + @Generated + private Double exploitabilityScore; + + /* + * The impactScore property. + */ + @Generated + private Double impactScore; + + /** + * Creates an instance of Cvss3Summary class. + */ + @Generated + private Cvss3Summary() { + } + + /** + * Get the version property: The version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the vectorString property: The vectorString property. + * + * @return the vectorString value. + */ + @Generated + public String getVectorString() { + return this.vectorString; + } + + /** + * Get the attackVector property: The attackVector property. + * + * @return the attackVector value. + */ + @Generated + public String getAttackVector() { + return this.attackVector; + } + + /** + * Get the attackComplexity property: The attackComplexity property. + * + * @return the attackComplexity value. + */ + @Generated + public String getAttackComplexity() { + return this.attackComplexity; + } + + /** + * Get the privilegesRequired property: The privilegesRequired property. + * + * @return the privilegesRequired value. + */ + @Generated + public String getPrivilegesRequired() { + return this.privilegesRequired; + } + + /** + * Get the userInteraction property: The userInteraction property. + * + * @return the userInteraction value. + */ + @Generated + public String getUserInteraction() { + return this.userInteraction; + } + + /** + * Get the scope property: The scope property. + * + * @return the scope value. + */ + @Generated + public String getScope() { + return this.scope; + } + + /** + * Get the confidentialityImpact property: The confidentialityImpact property. + * + * @return the confidentialityImpact value. + */ + @Generated + public String getConfidentialityImpact() { + return this.confidentialityImpact; + } + + /** + * Get the integrityImpact property: The integrityImpact property. + * + * @return the integrityImpact value. + */ + @Generated + public String getIntegrityImpact() { + return this.integrityImpact; + } + + /** + * Get the availabilityImpact property: The availabilityImpact property. + * + * @return the availabilityImpact value. + */ + @Generated + public String getAvailabilityImpact() { + return this.availabilityImpact; + } + + /** + * Get the baseScore property: The baseScore property. + * + * @return the baseScore value. + */ + @Generated + public Double getBaseScore() { + return this.baseScore; + } + + /** + * Get the baseSeverity property: The baseSeverity property. + * + * @return the baseSeverity value. + */ + @Generated + public String getBaseSeverity() { + return this.baseSeverity; + } + + /** + * Get the exploitCodeMaturity property: The exploitCodeMaturity property. + * + * @return the exploitCodeMaturity value. + */ + @Generated + public String getExploitCodeMaturity() { + return this.exploitCodeMaturity; + } + + /** + * Get the remediationLevel property: The remediationLevel property. + * + * @return the remediationLevel value. + */ + @Generated + public String getRemediationLevel() { + return this.remediationLevel; + } + + /** + * Get the reportConfidence property: The reportConfidence property. + * + * @return the reportConfidence value. + */ + @Generated + public String getReportConfidence() { + return this.reportConfidence; + } + + /** + * Get the exploitabilityScore property: The exploitabilityScore property. + * + * @return the exploitabilityScore value. + */ + @Generated + public Double getExploitabilityScore() { + return this.exploitabilityScore; + } + + /** + * Get the impactScore property: The impactScore property. + * + * @return the impactScore value. + */ + @Generated + public Double getImpactScore() { + return this.impactScore; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("vectorString", this.vectorString); + jsonWriter.writeStringField("attackVector", this.attackVector); + jsonWriter.writeStringField("attackComplexity", this.attackComplexity); + jsonWriter.writeStringField("privilegesRequired", this.privilegesRequired); + jsonWriter.writeStringField("userInteraction", this.userInteraction); + jsonWriter.writeStringField("scope", this.scope); + jsonWriter.writeStringField("confidentialityImpact", this.confidentialityImpact); + jsonWriter.writeStringField("integrityImpact", this.integrityImpact); + jsonWriter.writeStringField("availabilityImpact", this.availabilityImpact); + jsonWriter.writeNumberField("baseScore", this.baseScore); + jsonWriter.writeStringField("baseSeverity", this.baseSeverity); + jsonWriter.writeStringField("exploitCodeMaturity", this.exploitCodeMaturity); + jsonWriter.writeStringField("remediationLevel", this.remediationLevel); + jsonWriter.writeStringField("reportConfidence", this.reportConfidence); + jsonWriter.writeNumberField("exploitabilityScore", this.exploitabilityScore); + jsonWriter.writeNumberField("impactScore", this.impactScore); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Cvss3Summary from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Cvss3Summary if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the Cvss3Summary. + */ + @Generated + public static Cvss3Summary fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Cvss3Summary deserializedCvss3Summary = new Cvss3Summary(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("version".equals(fieldName)) { + deserializedCvss3Summary.version = reader.getString(); + } else if ("vectorString".equals(fieldName)) { + deserializedCvss3Summary.vectorString = reader.getString(); + } else if ("attackVector".equals(fieldName)) { + deserializedCvss3Summary.attackVector = reader.getString(); + } else if ("attackComplexity".equals(fieldName)) { + deserializedCvss3Summary.attackComplexity = reader.getString(); + } else if ("privilegesRequired".equals(fieldName)) { + deserializedCvss3Summary.privilegesRequired = reader.getString(); + } else if ("userInteraction".equals(fieldName)) { + deserializedCvss3Summary.userInteraction = reader.getString(); + } else if ("scope".equals(fieldName)) { + deserializedCvss3Summary.scope = reader.getString(); + } else if ("confidentialityImpact".equals(fieldName)) { + deserializedCvss3Summary.confidentialityImpact = reader.getString(); + } else if ("integrityImpact".equals(fieldName)) { + deserializedCvss3Summary.integrityImpact = reader.getString(); + } else if ("availabilityImpact".equals(fieldName)) { + deserializedCvss3Summary.availabilityImpact = reader.getString(); + } else if ("baseScore".equals(fieldName)) { + deserializedCvss3Summary.baseScore = reader.getNullable(JsonReader::getDouble); + } else if ("baseSeverity".equals(fieldName)) { + deserializedCvss3Summary.baseSeverity = reader.getString(); + } else if ("exploitCodeMaturity".equals(fieldName)) { + deserializedCvss3Summary.exploitCodeMaturity = reader.getString(); + } else if ("remediationLevel".equals(fieldName)) { + deserializedCvss3Summary.remediationLevel = reader.getString(); + } else if ("reportConfidence".equals(fieldName)) { + deserializedCvss3Summary.reportConfidence = reader.getString(); + } else if ("exploitabilityScore".equals(fieldName)) { + deserializedCvss3Summary.exploitabilityScore = reader.getNullable(JsonReader::getDouble); + } else if ("impactScore".equals(fieldName)) { + deserializedCvss3Summary.impactScore = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + return deserializedCvss3Summary; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnection.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnection.java new file mode 100644 index 000000000000..49d58efa183e --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnection.java @@ -0,0 +1,449 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The DataConnection model. + */ +@Immutable +public class DataConnection implements JsonSerializable { + + /* + * Discriminator property for DataConnection. + */ + @Generated + private String kind = "DataConnection"; + + /* + * This is typically the same as the name but might be different for different models. + */ + @Generated + private String id; + + /* + * The caller provided unique name for the resource. + */ + @Generated + private String name; + + /* + * The name that can be used for display purposes. + */ + @Generated + private String displayName; + + /* + * The type of data the data connection will transfer + */ + @Generated + private DataConnectionContent content; + + /* + * The date the data connection was created. + */ + @Generated + private OffsetDateTime createdDate; + + /* + * The rate at which the data connection will receive updates. + */ + @Generated + private DataConnectionFrequency frequency; + + /* + * The day to update the data connection on. (1-7 for weekly, 1-31 for monthly) + */ + @Generated + private Integer frequencyOffset; + + /* + * The date the data connection was last updated. + */ + @Generated + private OffsetDateTime updatedDate; + + /* + * The date the data connection was last updated by user. + */ + @Generated + private OffsetDateTime userUpdatedAt; + + /* + * An indicator of whether the data connection is active. + */ + @Generated + private Boolean active; + + /* + * A message that specifies details about data connection if inactive. + */ + @Generated + private String inactiveMessage; + + /** + * Creates an instance of DataConnection class. + */ + @Generated + protected DataConnection() { + } + + /** + * Get the kind property: Discriminator property for DataConnection. + * + * @return the kind value. + */ + @Generated + public String getKind() { + return this.kind; + } + + /** + * Get the id property: This is typically the same as the name but might be different for different models. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Set the id property: This is typically the same as the name but might be different for different models. + * + * @param id the id value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The caller provided unique name for the resource. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The caller provided unique name for the resource. + * + * @param name the name value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setName(String name) { + this.name = name; + return this; + } + + /** + * Get the displayName property: The name that can be used for display purposes. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Set the displayName property: The name that can be used for display purposes. + * + * @param displayName the displayName value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the content property: The type of data the data connection will transfer. + * + * @return the content value. + */ + @Generated + public DataConnectionContent getContent() { + return this.content; + } + + /** + * Set the content property: The type of data the data connection will transfer. + * + * @param content the content value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setContent(DataConnectionContent content) { + this.content = content; + return this; + } + + /** + * Get the createdDate property: The date the data connection was created. + * + * @return the createdDate value. + */ + @Generated + public OffsetDateTime getCreatedDate() { + return this.createdDate; + } + + /** + * Set the createdDate property: The date the data connection was created. + * + * @param createdDate the createdDate value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setCreatedDate(OffsetDateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the frequency property: The rate at which the data connection will receive updates. + * + * @return the frequency value. + */ + @Generated + public DataConnectionFrequency getFrequency() { + return this.frequency; + } + + /** + * Set the frequency property: The rate at which the data connection will receive updates. + * + * @param frequency the frequency value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setFrequency(DataConnectionFrequency frequency) { + this.frequency = frequency; + return this; + } + + /** + * Get the frequencyOffset property: The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). + * + * @return the frequencyOffset value. + */ + @Generated + public Integer getFrequencyOffset() { + return this.frequencyOffset; + } + + /** + * Set the frequencyOffset property: The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). + * + * @param frequencyOffset the frequencyOffset value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setFrequencyOffset(Integer frequencyOffset) { + this.frequencyOffset = frequencyOffset; + return this; + } + + /** + * Get the updatedDate property: The date the data connection was last updated. + * + * @return the updatedDate value. + */ + @Generated + public OffsetDateTime getUpdatedDate() { + return this.updatedDate; + } + + /** + * Set the updatedDate property: The date the data connection was last updated. + * + * @param updatedDate the updatedDate value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setUpdatedDate(OffsetDateTime updatedDate) { + this.updatedDate = updatedDate; + return this; + } + + /** + * Get the userUpdatedAt property: The date the data connection was last updated by user. + * + * @return the userUpdatedAt value. + */ + @Generated + public OffsetDateTime getUserUpdatedAt() { + return this.userUpdatedAt; + } + + /** + * Set the userUpdatedAt property: The date the data connection was last updated by user. + * + * @param userUpdatedAt the userUpdatedAt value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setUserUpdatedAt(OffsetDateTime userUpdatedAt) { + this.userUpdatedAt = userUpdatedAt; + return this; + } + + /** + * Get the active property: An indicator of whether the data connection is active. + * + * @return the active value. + */ + @Generated + public Boolean isActive() { + return this.active; + } + + /** + * Set the active property: An indicator of whether the data connection is active. + * + * @param active the active value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setActive(Boolean active) { + this.active = active; + return this; + } + + /** + * Get the inactiveMessage property: A message that specifies details about data connection if inactive. + * + * @return the inactiveMessage value. + */ + @Generated + public String getInactiveMessage() { + return this.inactiveMessage; + } + + /** + * Set the inactiveMessage property: A message that specifies details about data connection if inactive. + * + * @param inactiveMessage the inactiveMessage value to set. + * @return the DataConnection object itself. + */ + @Generated + DataConnection setInactiveMessage(String inactiveMessage) { + this.inactiveMessage = inactiveMessage; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("content", this.content == null ? null : this.content.toString()); + jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); + jsonWriter.writeNumberField("frequencyOffset", this.frequencyOffset); + jsonWriter.writeBooleanField("active", this.active); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataConnection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataConnection if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DataConnection. + */ + @Generated + public static DataConnection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + // Prepare for reading + readerToUse.nextToken(); + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("logAnalytics".equals(discriminatorValue)) { + return LogAnalyticsDataConnection.fromJson(readerToUse.reset()); + } else if ("azureDataExplorer".equals(discriminatorValue)) { + return AzureDataExplorerDataConnection.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + @Generated + static DataConnection fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataConnection deserializedDataConnection = new DataConnection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + deserializedDataConnection.name = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedDataConnection.kind = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedDataConnection.id = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedDataConnection.displayName = reader.getString(); + } else if ("content".equals(fieldName)) { + deserializedDataConnection.content = DataConnectionContent.fromString(reader.getString()); + } else if ("createdDate".equals(fieldName)) { + deserializedDataConnection.createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("frequency".equals(fieldName)) { + deserializedDataConnection.frequency = DataConnectionFrequency.fromString(reader.getString()); + } else if ("frequencyOffset".equals(fieldName)) { + deserializedDataConnection.frequencyOffset = reader.getNullable(JsonReader::getInt); + } else if ("updatedDate".equals(fieldName)) { + deserializedDataConnection.updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("userUpdatedAt".equals(fieldName)) { + deserializedDataConnection.userUpdatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("active".equals(fieldName)) { + deserializedDataConnection.active = reader.getNullable(JsonReader::getBoolean); + } else if ("inactiveMessage".equals(fieldName)) { + deserializedDataConnection.inactiveMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedDataConnection; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionContent.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionContent.java new file mode 100644 index 000000000000..59d53143773a --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionContent.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of data the data connection will transfer. + */ +public final class DataConnectionContent extends ExpandableStringEnum { + + /** + * Static value assets for DataConnectionContent. + */ + @Generated + public static final DataConnectionContent ASSETS = fromString("assets"); + + /** + * Static value attackSurfaceInsights for DataConnectionContent. + */ + @Generated + public static final DataConnectionContent ATTACK_SURFACE_INSIGHTS = fromString("attackSurfaceInsights"); + + /** + * Creates a new instance of DataConnectionContent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public DataConnectionContent() { + } + + /** + * Creates or finds a DataConnectionContent from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataConnectionContent. + */ + @Generated + public static DataConnectionContent fromString(String name) { + return fromString(name, DataConnectionContent.class); + } + + /** + * Gets known DataConnectionContent values. + * + * @return known DataConnectionContent values. + */ + @Generated + public static Collection values() { + return values(DataConnectionContent.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionData.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionData.java new file mode 100644 index 000000000000..8097bf4d0d40 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionData.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The DataConnectionData model. + */ +@Fluent +public class DataConnectionData implements JsonSerializable { + + /* + * Discriminator property for DataConnectionData. + */ + @Generated + private String kind = "DataConnectionData"; + + /* + * The name of data connection + */ + @Generated + private String name; + + /* + * The type of data the data connection will transfer. + */ + @Generated + private DataConnectionContent content; + + /* + * The rate at which the data connection will receive updates. + */ + @Generated + private DataConnectionFrequency frequency; + + /* + * The day to update the data connection on. (1-7 for weekly, 1-31 for monthly) + */ + @Generated + private Integer frequencyOffset; + + /** + * Creates an instance of DataConnectionData class. + */ + @Generated + public DataConnectionData() { + } + + /** + * Get the kind property: Discriminator property for DataConnectionData. + * + * @return the kind value. + */ + @Generated + public String getKind() { + return this.kind; + } + + /** + * Get the name property: The name of data connection. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name of data connection. + * + * @param name the name value to set. + * @return the DataConnectionData object itself. + */ + @Generated + public DataConnectionData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the content property: The type of data the data connection will transfer. + * + * @return the content value. + */ + @Generated + public DataConnectionContent getContent() { + return this.content; + } + + /** + * Set the content property: The type of data the data connection will transfer. + * + * @param content the content value to set. + * @return the DataConnectionData object itself. + */ + @Generated + public DataConnectionData setContent(DataConnectionContent content) { + this.content = content; + return this; + } + + /** + * Get the frequency property: The rate at which the data connection will receive updates. + * + * @return the frequency value. + */ + @Generated + public DataConnectionFrequency getFrequency() { + return this.frequency; + } + + /** + * Set the frequency property: The rate at which the data connection will receive updates. + * + * @param frequency the frequency value to set. + * @return the DataConnectionData object itself. + */ + @Generated + public DataConnectionData setFrequency(DataConnectionFrequency frequency) { + this.frequency = frequency; + return this; + } + + /** + * Get the frequencyOffset property: The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). + * + * @return the frequencyOffset value. + */ + @Generated + public Integer getFrequencyOffset() { + return this.frequencyOffset; + } + + /** + * Set the frequencyOffset property: The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). + * + * @param frequencyOffset the frequencyOffset value to set. + * @return the DataConnectionData object itself. + */ + @Generated + public DataConnectionData setFrequencyOffset(Integer frequencyOffset) { + this.frequencyOffset = frequencyOffset; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("content", this.content == null ? null : this.content.toString()); + jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); + jsonWriter.writeNumberField("frequencyOffset", this.frequencyOffset); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataConnectionData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataConnectionData if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DataConnectionData. + */ + @Generated + public static DataConnectionData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + // Prepare for reading + readerToUse.nextToken(); + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("logAnalytics".equals(discriminatorValue)) { + return LogAnalyticsDataConnectionData.fromJson(readerToUse.reset()); + } else if ("azureDataExplorer".equals(discriminatorValue)) { + return AzureDataExplorerDataConnectionData.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + @Generated + static DataConnectionData fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataConnectionData deserializedDataConnectionData = new DataConnectionData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("kind".equals(fieldName)) { + deserializedDataConnectionData.kind = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDataConnectionData.name = reader.getString(); + } else if ("content".equals(fieldName)) { + deserializedDataConnectionData.content = DataConnectionContent.fromString(reader.getString()); + } else if ("frequency".equals(fieldName)) { + deserializedDataConnectionData.frequency = DataConnectionFrequency.fromString(reader.getString()); + } else if ("frequencyOffset".equals(fieldName)) { + deserializedDataConnectionData.frequencyOffset = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + return deserializedDataConnectionData; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionFrequency.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionFrequency.java new file mode 100644 index 000000000000..15cafd760c6f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionFrequency.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The rate at which the data connection will receive updates. + */ +public final class DataConnectionFrequency extends ExpandableStringEnum { + + /** + * Static value daily for DataConnectionFrequency. + */ + @Generated + public static final DataConnectionFrequency DAILY = fromString("daily"); + + /** + * Static value weekly for DataConnectionFrequency. + */ + @Generated + public static final DataConnectionFrequency WEEKLY = fromString("weekly"); + + /** + * Static value monthly for DataConnectionFrequency. + */ + @Generated + public static final DataConnectionFrequency MONTHLY = fromString("monthly"); + + /** + * Creates a new instance of DataConnectionFrequency value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public DataConnectionFrequency() { + } + + /** + * Creates or finds a DataConnectionFrequency from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataConnectionFrequency. + */ + @Generated + public static DataConnectionFrequency fromString(String name) { + return fromString(name, DataConnectionFrequency.class); + } + + /** + * Gets known DataConnectionFrequency values. + * + * @return known DataConnectionFrequency values. + */ + @Generated + public static Collection values() { + return values(DataConnectionFrequency.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionProperties.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionProperties.java new file mode 100644 index 000000000000..a2de2f5d4669 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DataConnectionProperties.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties required to establish connection to a particular service. + */ +@Immutable +public class DataConnectionProperties implements JsonSerializable { + + /** + * Creates an instance of DataConnectionProperties class. + */ + @Generated + public DataConnectionProperties() { + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataConnectionProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DataConnectionProperties. + */ + @Generated + public static DataConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataConnectionProperties deserializedDataConnectionProperties = new DataConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + reader.skipChildren(); + } + return deserializedDataConnectionProperties; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DependentResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DependentResource.java new file mode 100644 index 000000000000..fc190751ae26 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DependentResource.java @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The DependentResource model. + */ +@Immutable +public final class DependentResource implements JsonSerializable { + + /* + * The md5 property. + */ + @Generated + private String md5; + + /* + * The responseBodySize property. + */ + @Generated + private Long responseBodySize; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The firstSeenCrawlGuid property. + */ + @Generated + private String firstSeenCrawlGuid; + + /* + * The firstSeenPageGuid property. + */ + @Generated + private String firstSeenPageGuid; + + /* + * The firstSeenResourceGuid property. + */ + @Generated + private String firstSeenResourceGuid; + + /* + * The lastSeenCrawlGuid property. + */ + @Generated + private String lastSeenCrawlGuid; + + /* + * The lastSeenPageGuid property. + */ + @Generated + private String lastSeenPageGuid; + + /* + * The lastSeenResourceGuid property. + */ + @Generated + private String lastSeenResourceGuid; + + /* + * The responseBodyMinhash property. + */ + @Generated + private List responseBodyMinhash; + + /* + * The contentType property. + */ + @Generated + private String contentType; + + /* + * The sha256 property. + */ + @Generated + private String sha256; + + /* + * The sha384 property. + */ + @Generated + private String sha384; + + /* + * The sha512 property. + */ + @Generated + private String sha512; + + /* + * The url property. + */ + @Generated + private String url; + + /* + * The cached property. + */ + @Generated + private Boolean cached; + + /* + * The sriChecks property. + */ + @Generated + private List sriChecks; + + /* + * The host property. + */ + @Generated + private String host; + + /* + * The lastObservedViolation property. + */ + @Generated + private OffsetDateTime lastObservedViolation; + + /* + * The lastObservedValidation property. + */ + @Generated + private OffsetDateTime lastObservedValidation; + + /* + * The lastObservedActualSriHash property. + */ + @Generated + private String lastObservedActualSriHash; + + /* + * The lastObservedExpectedSriHash property. + */ + @Generated + private String lastObservedExpectedSriHash; + + /** + * Creates an instance of DependentResource class. + */ + @Generated + private DependentResource() { + } + + /** + * Get the md5 property: The md5 property. + * + * @return the md5 value. + */ + @Generated + public String getMd5() { + return this.md5; + } + + /** + * Get the responseBodySize property: The responseBodySize property. + * + * @return the responseBodySize value. + */ + @Generated + public Long getResponseBodySize() { + return this.responseBodySize; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the firstSeenCrawlGuid property: The firstSeenCrawlGuid property. + * + * @return the firstSeenCrawlGuid value. + */ + @Generated + public String getFirstSeenCrawlGuid() { + return this.firstSeenCrawlGuid; + } + + /** + * Get the firstSeenPageGuid property: The firstSeenPageGuid property. + * + * @return the firstSeenPageGuid value. + */ + @Generated + public String getFirstSeenPageGuid() { + return this.firstSeenPageGuid; + } + + /** + * Get the firstSeenResourceGuid property: The firstSeenResourceGuid property. + * + * @return the firstSeenResourceGuid value. + */ + @Generated + public String getFirstSeenResourceGuid() { + return this.firstSeenResourceGuid; + } + + /** + * Get the lastSeenCrawlGuid property: The lastSeenCrawlGuid property. + * + * @return the lastSeenCrawlGuid value. + */ + @Generated + public String getLastSeenCrawlGuid() { + return this.lastSeenCrawlGuid; + } + + /** + * Get the lastSeenPageGuid property: The lastSeenPageGuid property. + * + * @return the lastSeenPageGuid value. + */ + @Generated + public String getLastSeenPageGuid() { + return this.lastSeenPageGuid; + } + + /** + * Get the lastSeenResourceGuid property: The lastSeenResourceGuid property. + * + * @return the lastSeenResourceGuid value. + */ + @Generated + public String getLastSeenResourceGuid() { + return this.lastSeenResourceGuid; + } + + /** + * Get the responseBodyMinhash property: The responseBodyMinhash property. + * + * @return the responseBodyMinhash value. + */ + @Generated + public List getResponseBodyMinhash() { + return this.responseBodyMinhash; + } + + /** + * Get the contentType property: The contentType property. + * + * @return the contentType value. + */ + @Generated + public String getContentType() { + return this.contentType; + } + + /** + * Get the sha256 property: The sha256 property. + * + * @return the sha256 value. + */ + @Generated + public String getSha256() { + return this.sha256; + } + + /** + * Get the sha384 property: The sha384 property. + * + * @return the sha384 value. + */ + @Generated + public String getSha384() { + return this.sha384; + } + + /** + * Get the sha512 property: The sha512 property. + * + * @return the sha512 value. + */ + @Generated + public String getSha512() { + return this.sha512; + } + + /** + * Get the url property: The url property. + * + * @return the url value. + */ + @Generated + public String getUrl() { + return this.url; + } + + /** + * Get the cached property: The cached property. + * + * @return the cached value. + */ + @Generated + public Boolean isCached() { + return this.cached; + } + + /** + * Get the sriChecks property: The sriChecks property. + * + * @return the sriChecks value. + */ + @Generated + public List getSriChecks() { + return this.sriChecks; + } + + /** + * Get the host property: The host property. + * + * @return the host value. + */ + @Generated + public String getHost() { + return this.host; + } + + /** + * Get the lastObservedViolation property: The lastObservedViolation property. + * + * @return the lastObservedViolation value. + */ + @Generated + public OffsetDateTime getLastObservedViolation() { + return this.lastObservedViolation; + } + + /** + * Get the lastObservedValidation property: The lastObservedValidation property. + * + * @return the lastObservedValidation value. + */ + @Generated + public OffsetDateTime getLastObservedValidation() { + return this.lastObservedValidation; + } + + /** + * Get the lastObservedActualSriHash property: The lastObservedActualSriHash property. + * + * @return the lastObservedActualSriHash value. + */ + @Generated + public String getLastObservedActualSriHash() { + return this.lastObservedActualSriHash; + } + + /** + * Get the lastObservedExpectedSriHash property: The lastObservedExpectedSriHash property. + * + * @return the lastObservedExpectedSriHash value. + */ + @Generated + public String getLastObservedExpectedSriHash() { + return this.lastObservedExpectedSriHash; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("md5", this.md5); + jsonWriter.writeNumberField("responseBodySize", this.responseBodySize); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("firstSeenCrawlGuid", this.firstSeenCrawlGuid); + jsonWriter.writeStringField("firstSeenPageGuid", this.firstSeenPageGuid); + jsonWriter.writeStringField("firstSeenResourceGuid", this.firstSeenResourceGuid); + jsonWriter.writeStringField("lastSeenCrawlGuid", this.lastSeenCrawlGuid); + jsonWriter.writeStringField("lastSeenPageGuid", this.lastSeenPageGuid); + jsonWriter.writeStringField("lastSeenResourceGuid", this.lastSeenResourceGuid); + jsonWriter.writeArrayField("responseBodyMinhash", this.responseBodyMinhash, + (writer, element) -> writer.writeInt(element)); + jsonWriter.writeStringField("contentType", this.contentType); + jsonWriter.writeStringField("sha256", this.sha256); + jsonWriter.writeStringField("sha384", this.sha384); + jsonWriter.writeStringField("sha512", this.sha512); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeBooleanField("cached", this.cached); + jsonWriter.writeArrayField("sriChecks", this.sriChecks, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("host", this.host); + jsonWriter.writeStringField("lastObservedViolation", + this.lastObservedViolation == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastObservedViolation)); + jsonWriter.writeStringField("lastObservedValidation", + this.lastObservedValidation == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastObservedValidation)); + jsonWriter.writeStringField("lastObservedActualSriHash", this.lastObservedActualSriHash); + jsonWriter.writeStringField("lastObservedExpectedSriHash", this.lastObservedExpectedSriHash); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DependentResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DependentResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DependentResource. + */ + @Generated + public static DependentResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DependentResource deserializedDependentResource = new DependentResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("md5".equals(fieldName)) { + deserializedDependentResource.md5 = reader.getString(); + } else if ("responseBodySize".equals(fieldName)) { + deserializedDependentResource.responseBodySize = reader.getNullable(JsonReader::getLong); + } else if ("firstSeen".equals(fieldName)) { + deserializedDependentResource.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedDependentResource.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedDependentResource.count = reader.getNullable(JsonReader::getLong); + } else if ("firstSeenCrawlGuid".equals(fieldName)) { + deserializedDependentResource.firstSeenCrawlGuid = reader.getString(); + } else if ("firstSeenPageGuid".equals(fieldName)) { + deserializedDependentResource.firstSeenPageGuid = reader.getString(); + } else if ("firstSeenResourceGuid".equals(fieldName)) { + deserializedDependentResource.firstSeenResourceGuid = reader.getString(); + } else if ("lastSeenCrawlGuid".equals(fieldName)) { + deserializedDependentResource.lastSeenCrawlGuid = reader.getString(); + } else if ("lastSeenPageGuid".equals(fieldName)) { + deserializedDependentResource.lastSeenPageGuid = reader.getString(); + } else if ("lastSeenResourceGuid".equals(fieldName)) { + deserializedDependentResource.lastSeenResourceGuid = reader.getString(); + } else if ("responseBodyMinhash".equals(fieldName)) { + List responseBodyMinhash = reader.readArray(reader1 -> reader1.getInt()); + deserializedDependentResource.responseBodyMinhash = responseBodyMinhash; + } else if ("contentType".equals(fieldName)) { + deserializedDependentResource.contentType = reader.getString(); + } else if ("sha256".equals(fieldName)) { + deserializedDependentResource.sha256 = reader.getString(); + } else if ("sha384".equals(fieldName)) { + deserializedDependentResource.sha384 = reader.getString(); + } else if ("sha512".equals(fieldName)) { + deserializedDependentResource.sha512 = reader.getString(); + } else if ("url".equals(fieldName)) { + deserializedDependentResource.url = reader.getString(); + } else if ("cached".equals(fieldName)) { + deserializedDependentResource.cached = reader.getNullable(JsonReader::getBoolean); + } else if ("sriChecks".equals(fieldName)) { + List sriChecks + = reader.readArray(reader1 -> SubResourceIntegrityCheck.fromJson(reader1)); + deserializedDependentResource.sriChecks = sriChecks; + } else if ("host".equals(fieldName)) { + deserializedDependentResource.host = reader.getString(); + } else if ("lastObservedViolation".equals(fieldName)) { + deserializedDependentResource.lastObservedViolation = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastObservedValidation".equals(fieldName)) { + deserializedDependentResource.lastObservedValidation = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastObservedActualSriHash".equals(fieldName)) { + deserializedDependentResource.lastObservedActualSriHash = reader.getString(); + } else if ("lastObservedExpectedSriHash".equals(fieldName)) { + deserializedDependentResource.lastObservedExpectedSriHash = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedDependentResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoGroup.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoGroup.java new file mode 100644 index 000000000000..eefbf40f0925 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoGroup.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The DiscoGroup model. + */ +@Immutable +public final class DiscoGroup implements JsonSerializable { + + /* + * This is typically the same as the name but might be different for different models. + */ + @Generated + private String id; + + /* + * The caller provided unique name for the resource. + */ + @Generated + private String name; + + /* + * The name that can be used for display purposes. + */ + @Generated + private String displayName; + + /* + * The description for a disco group. + */ + @Generated + private String description; + + /* + * The tier for the disco group which will affect the algorithm used for the disco runs in this group. + */ + @Generated + private String tier; + + /* + * The frequency at which the disco group is supposed to be rerun in milliseconds. + */ + @Generated + private Long frequencyMilliseconds; + + /* + * The list of seeds used for the disco group runs. + */ + @Generated + private List seeds; + + /* + * The list of names used for the disco group runs. + */ + @Generated + private List names; + + /* + * The list of excludes used for the disco group runs, aka assets to exclude from the discovery algorithm. + */ + @Generated + private List excludes; + + /* + * The latest run of this disco group with some limited information, null if the group has never been run. + */ + @Generated + private DiscoRunResult latestRun; + + /* + * The date for the disco group was created. + */ + @Generated + private OffsetDateTime createdDate; + + /* + * The unique identifier for the disco template used for the disco group creation. + */ + @Generated + private String templateId; + + /** + * Creates an instance of DiscoGroup class. + */ + @Generated + private DiscoGroup() { + } + + /** + * Get the id property: This is typically the same as the name but might be different for different models. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the name property: The caller provided unique name for the resource. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the displayName property: The name that can be used for display purposes. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Get the description property: The description for a disco group. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Get the tier property: The tier for the disco group which will affect the algorithm used for the disco runs in + * this group. + * + * @return the tier value. + */ + @Generated + public String getTier() { + return this.tier; + } + + /** + * Get the frequencyMilliseconds property: The frequency at which the disco group is supposed to be rerun in + * milliseconds. + * + * @return the frequencyMilliseconds value. + */ + @Generated + public Long getFrequencyMilliseconds() { + return this.frequencyMilliseconds; + } + + /** + * Get the seeds property: The list of seeds used for the disco group runs. + * + * @return the seeds value. + */ + @Generated + public List getSeeds() { + return this.seeds; + } + + /** + * Get the names property: The list of names used for the disco group runs. + * + * @return the names value. + */ + @Generated + public List getNames() { + return this.names; + } + + /** + * Get the excludes property: The list of excludes used for the disco group runs, aka assets to exclude from the + * discovery algorithm. + * + * @return the excludes value. + */ + @Generated + public List getExcludes() { + return this.excludes; + } + + /** + * Get the latestRun property: The latest run of this disco group with some limited information, null if the group + * has never been run. + * + * @return the latestRun value. + */ + @Generated + public DiscoRunResult getLatestRun() { + return this.latestRun; + } + + /** + * Get the createdDate property: The date for the disco group was created. + * + * @return the createdDate value. + */ + @Generated + public OffsetDateTime getCreatedDate() { + return this.createdDate; + } + + /** + * Get the templateId property: The unique identifier for the disco template used for the disco group creation. + * + * @return the templateId value. + */ + @Generated + public String getTemplateId() { + return this.templateId; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("tier", this.tier); + jsonWriter.writeNumberField("frequencyMilliseconds", this.frequencyMilliseconds); + jsonWriter.writeArrayField("seeds", this.seeds, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("names", this.names, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("excludes", this.excludes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("latestRun", this.latestRun); + jsonWriter.writeStringField("createdDate", + this.createdDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdDate)); + jsonWriter.writeStringField("templateId", this.templateId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscoGroup from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscoGroup if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DiscoGroup. + */ + @Generated + public static DiscoGroup fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscoGroup deserializedDiscoGroup = new DiscoGroup(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + deserializedDiscoGroup.name = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedDiscoGroup.id = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedDiscoGroup.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedDiscoGroup.description = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedDiscoGroup.tier = reader.getString(); + } else if ("frequencyMilliseconds".equals(fieldName)) { + deserializedDiscoGroup.frequencyMilliseconds = reader.getNullable(JsonReader::getLong); + } else if ("seeds".equals(fieldName)) { + List seeds = reader.readArray(reader1 -> DiscoSource.fromJson(reader1)); + deserializedDiscoGroup.seeds = seeds; + } else if ("names".equals(fieldName)) { + List names = reader.readArray(reader1 -> reader1.getString()); + deserializedDiscoGroup.names = names; + } else if ("excludes".equals(fieldName)) { + List excludes = reader.readArray(reader1 -> DiscoSource.fromJson(reader1)); + deserializedDiscoGroup.excludes = excludes; + } else if ("latestRun".equals(fieldName)) { + deserializedDiscoGroup.latestRun = DiscoRunResult.fromJson(reader); + } else if ("createdDate".equals(fieldName)) { + deserializedDiscoGroup.createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("templateId".equals(fieldName)) { + deserializedDiscoGroup.templateId = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedDiscoGroup; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoGroupData.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoGroupData.java new file mode 100644 index 000000000000..3a92d1f107ef --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoGroupData.java @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A request body used to create a discovery group. + */ +@Fluent +public final class DiscoGroupData implements JsonSerializable { + + /* + * The name for a disco group. + */ + @Generated + private String name; + + /* + * The description for a disco group. + */ + @Generated + private String description; + + /* + * The tier for the disco group which will affect the algorithm used for the disco runs in this group. + */ + @Generated + private String tier; + + /* + * The frequency at which the disco group is supposed to be rerun in milliseconds. + */ + @Generated + private Long frequencyMilliseconds; + + /* + * The list of seeds used for the disco group runs. + */ + @Generated + private List seeds; + + /* + * The list of names used for the disco group runs. + */ + @Generated + private List names; + + /* + * The list of excludes used for the disco group runs, aka assets to exclude from the discovery algorithm. + */ + @Generated + private List excludes; + + /* + * The unique identifier for the disco template used for the disco group creation. + */ + @Generated + private String templateId; + + /** + * Creates an instance of DiscoGroupData class. + */ + @Generated + public DiscoGroupData() { + } + + /** + * Get the name property: The name for a disco group. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name for a disco group. + * + * @param name the name value to set. + * @return the DiscoGroupData object itself. + */ + @Generated + public DiscoGroupData setName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: The description for a disco group. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Set the description property: The description for a disco group. + * + * @param description the description value to set. + * @return the DiscoGroupData object itself. + */ + @Generated + public DiscoGroupData setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the tier property: The tier for the disco group which will affect the algorithm used for the disco runs in + * this group. + * + * @return the tier value. + */ + @Generated + public String getTier() { + return this.tier; + } + + /** + * Set the tier property: The tier for the disco group which will affect the algorithm used for the disco runs in + * this group. + * + * @param tier the tier value to set. + * @return the DiscoGroupData object itself. + */ + @Generated + public DiscoGroupData setTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the frequencyMilliseconds property: The frequency at which the disco group is supposed to be rerun in + * milliseconds. + * + * @return the frequencyMilliseconds value. + */ + @Generated + public Long getFrequencyMilliseconds() { + return this.frequencyMilliseconds; + } + + /** + * Set the frequencyMilliseconds property: The frequency at which the disco group is supposed to be rerun in + * milliseconds. + * + * @param frequencyMilliseconds the frequencyMilliseconds value to set. + * @return the DiscoGroupData object itself. + */ + @Generated + public DiscoGroupData setFrequencyMilliseconds(Long frequencyMilliseconds) { + this.frequencyMilliseconds = frequencyMilliseconds; + return this; + } + + /** + * Get the seeds property: The list of seeds used for the disco group runs. + * + * @return the seeds value. + */ + @Generated + public List getSeeds() { + return this.seeds; + } + + /** + * Set the seeds property: The list of seeds used for the disco group runs. + * + * @param seeds the seeds value to set. + * @return the DiscoGroupData object itself. + */ + @Generated + public DiscoGroupData setSeeds(List seeds) { + this.seeds = seeds; + return this; + } + + /** + * Get the names property: The list of names used for the disco group runs. + * + * @return the names value. + */ + @Generated + public List getNames() { + return this.names; + } + + /** + * Set the names property: The list of names used for the disco group runs. + * + * @param names the names value to set. + * @return the DiscoGroupData object itself. + */ + @Generated + public DiscoGroupData setNames(List names) { + this.names = names; + return this; + } + + /** + * Get the excludes property: The list of excludes used for the disco group runs, aka assets to exclude from the + * discovery algorithm. + * + * @return the excludes value. + */ + @Generated + public List getExcludes() { + return this.excludes; + } + + /** + * Set the excludes property: The list of excludes used for the disco group runs, aka assets to exclude from the + * discovery algorithm. + * + * @param excludes the excludes value to set. + * @return the DiscoGroupData object itself. + */ + @Generated + public DiscoGroupData setExcludes(List excludes) { + this.excludes = excludes; + return this; + } + + /** + * Get the templateId property: The unique identifier for the disco template used for the disco group creation. + * + * @return the templateId value. + */ + @Generated + public String getTemplateId() { + return this.templateId; + } + + /** + * Set the templateId property: The unique identifier for the disco template used for the disco group creation. + * + * @param templateId the templateId value to set. + * @return the DiscoGroupData object itself. + */ + @Generated + public DiscoGroupData setTemplateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("tier", this.tier); + jsonWriter.writeNumberField("frequencyMilliseconds", this.frequencyMilliseconds); + jsonWriter.writeArrayField("seeds", this.seeds, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("names", this.names, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("excludes", this.excludes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("templateId", this.templateId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscoGroupData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscoGroupData if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DiscoGroupData. + */ + @Generated + public static DiscoGroupData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscoGroupData deserializedDiscoGroupData = new DiscoGroupData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + deserializedDiscoGroupData.name = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedDiscoGroupData.description = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedDiscoGroupData.tier = reader.getString(); + } else if ("frequencyMilliseconds".equals(fieldName)) { + deserializedDiscoGroupData.frequencyMilliseconds = reader.getNullable(JsonReader::getLong); + } else if ("seeds".equals(fieldName)) { + List seeds = reader.readArray(reader1 -> DiscoSource.fromJson(reader1)); + deserializedDiscoGroupData.seeds = seeds; + } else if ("names".equals(fieldName)) { + List names = reader.readArray(reader1 -> reader1.getString()); + deserializedDiscoGroupData.names = names; + } else if ("excludes".equals(fieldName)) { + List excludes = reader.readArray(reader1 -> DiscoSource.fromJson(reader1)); + deserializedDiscoGroupData.excludes = excludes; + } else if ("templateId".equals(fieldName)) { + deserializedDiscoGroupData.templateId = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedDiscoGroupData; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoRunResult.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoRunResult.java new file mode 100644 index 000000000000..e3d160f2639b --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoRunResult.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The latest run of this disco group with some limited information, null if the group has never been run. + */ +@Immutable +public final class DiscoRunResult implements JsonSerializable { + + /* + * The date for when the disco run was created in the system. + */ + @Generated + private OffsetDateTime submittedDate; + + /* + * The date for when the disco run was actually started by the system. + */ + @Generated + private OffsetDateTime startedDate; + + /* + * The date for when the disco run was completed by the system. + */ + @Generated + private OffsetDateTime completedDate; + + /* + * The tier which will affect the algorithm used for the disco run. + */ + @Generated + private String tier; + + /* + * The State of the disco run. + */ + @Generated + private DiscoRunState state; + + /* + * The total count of assets that were found this disco run. + */ + @Generated + private Long totalAssetsFoundCount; + + /* + * The list of seeds used for the disco run. + */ + @Generated + private List seeds; + + /* + * The list of excludes used for the disco run, aka assets to exclude from the discovery algorithm. + */ + @Generated + private List excludes; + + /* + * The list of names used for the disco run. + */ + @Generated + private List names; + + /** + * Creates an instance of DiscoRunResult class. + */ + @Generated + private DiscoRunResult() { + } + + /** + * Get the submittedDate property: The date for when the disco run was created in the system. + * + * @return the submittedDate value. + */ + @Generated + public OffsetDateTime getSubmittedDate() { + return this.submittedDate; + } + + /** + * Get the startedDate property: The date for when the disco run was actually started by the system. + * + * @return the startedDate value. + */ + @Generated + public OffsetDateTime getStartedDate() { + return this.startedDate; + } + + /** + * Get the completedDate property: The date for when the disco run was completed by the system. + * + * @return the completedDate value. + */ + @Generated + public OffsetDateTime getCompletedDate() { + return this.completedDate; + } + + /** + * Get the tier property: The tier which will affect the algorithm used for the disco run. + * + * @return the tier value. + */ + @Generated + public String getTier() { + return this.tier; + } + + /** + * Get the state property: The State of the disco run. + * + * @return the state value. + */ + @Generated + public DiscoRunState getState() { + return this.state; + } + + /** + * Get the totalAssetsFoundCount property: The total count of assets that were found this disco run. + * + * @return the totalAssetsFoundCount value. + */ + @Generated + public Long getTotalAssetsFoundCount() { + return this.totalAssetsFoundCount; + } + + /** + * Get the seeds property: The list of seeds used for the disco run. + * + * @return the seeds value. + */ + @Generated + public List getSeeds() { + return this.seeds; + } + + /** + * Get the excludes property: The list of excludes used for the disco run, aka assets to exclude from the discovery + * algorithm. + * + * @return the excludes value. + */ + @Generated + public List getExcludes() { + return this.excludes; + } + + /** + * Get the names property: The list of names used for the disco run. + * + * @return the names value. + */ + @Generated + public List getNames() { + return this.names; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("submittedDate", + this.submittedDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.submittedDate)); + jsonWriter.writeStringField("startedDate", + this.startedDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startedDate)); + jsonWriter.writeStringField("completedDate", + this.completedDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.completedDate)); + jsonWriter.writeStringField("tier", this.tier); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeNumberField("totalAssetsFoundCount", this.totalAssetsFoundCount); + jsonWriter.writeArrayField("seeds", this.seeds, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("excludes", this.excludes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("names", this.names, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscoRunResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscoRunResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DiscoRunResult. + */ + @Generated + public static DiscoRunResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscoRunResult deserializedDiscoRunResult = new DiscoRunResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("submittedDate".equals(fieldName)) { + deserializedDiscoRunResult.submittedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("startedDate".equals(fieldName)) { + deserializedDiscoRunResult.startedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("completedDate".equals(fieldName)) { + deserializedDiscoRunResult.completedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("tier".equals(fieldName)) { + deserializedDiscoRunResult.tier = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedDiscoRunResult.state = DiscoRunState.fromString(reader.getString()); + } else if ("totalAssetsFoundCount".equals(fieldName)) { + deserializedDiscoRunResult.totalAssetsFoundCount = reader.getNullable(JsonReader::getLong); + } else if ("seeds".equals(fieldName)) { + List seeds = reader.readArray(reader1 -> DiscoSource.fromJson(reader1)); + deserializedDiscoRunResult.seeds = seeds; + } else if ("excludes".equals(fieldName)) { + List excludes = reader.readArray(reader1 -> DiscoSource.fromJson(reader1)); + deserializedDiscoRunResult.excludes = excludes; + } else if ("names".equals(fieldName)) { + List names = reader.readArray(reader1 -> reader1.getString()); + deserializedDiscoRunResult.names = names; + } else { + reader.skipChildren(); + } + } + return deserializedDiscoRunResult; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoRunState.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoRunState.java new file mode 100644 index 000000000000..eee1c49fc0ff --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoRunState.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The State of the disco run. + */ +public final class DiscoRunState extends ExpandableStringEnum { + + /** + * Static value pending for DiscoRunState. + */ + @Generated + public static final DiscoRunState PENDING = fromString("pending"); + + /** + * Static value running for DiscoRunState. + */ + @Generated + public static final DiscoRunState RUNNING = fromString("running"); + + /** + * Static value completed for DiscoRunState. + */ + @Generated + public static final DiscoRunState COMPLETED = fromString("completed"); + + /** + * Static value failed for DiscoRunState. + */ + @Generated + public static final DiscoRunState FAILED = fromString("failed"); + + /** + * Creates a new instance of DiscoRunState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public DiscoRunState() { + } + + /** + * Creates or finds a DiscoRunState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiscoRunState. + */ + @Generated + public static DiscoRunState fromString(String name) { + return fromString(name, DiscoRunState.class); + } + + /** + * Gets known DiscoRunState values. + * + * @return known DiscoRunState values. + */ + @Generated + public static Collection values() { + return values(DiscoRunState.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoSource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoSource.java new file mode 100644 index 000000000000..149ba735829c --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoSource.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Source entity used to drive discovery. + */ +@Fluent +public final class DiscoSource implements JsonSerializable { + + /* + * The kind of disco source. + */ + @Generated + private DiscoSourceKind kind; + + /* + * The name for the disco source. + */ + @Generated + private String name; + + /** + * Creates an instance of DiscoSource class. + */ + @Generated + public DiscoSource() { + } + + /** + * Get the kind property: The kind of disco source. + * + * @return the kind value. + */ + @Generated + public DiscoSourceKind getKind() { + return this.kind; + } + + /** + * Set the kind property: The kind of disco source. + * + * @param kind the kind value to set. + * @return the DiscoSource object itself. + */ + @Generated + public DiscoSource setKind(DiscoSourceKind kind) { + this.kind = kind; + return this; + } + + /** + * Get the name property: The name for the disco source. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name for the disco source. + * + * @param name the name value to set. + * @return the DiscoSource object itself. + */ + @Generated + public DiscoSource setName(String name) { + this.name = name; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscoSource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscoSource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DiscoSource. + */ + @Generated + public static DiscoSource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscoSource deserializedDiscoSource = new DiscoSource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("kind".equals(fieldName)) { + deserializedDiscoSource.kind = DiscoSourceKind.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedDiscoSource.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedDiscoSource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoSourceKind.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoSourceKind.java new file mode 100644 index 000000000000..e616330aa236 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoSourceKind.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The kind of disco source. + */ +public final class DiscoSourceKind extends ExpandableStringEnum { + + /** + * Static value as for DiscoSourceKind. + */ + @Generated + public static final DiscoSourceKind AS = fromString("as"); + + /** + * Static value attribute for DiscoSourceKind. + */ + @Generated + public static final DiscoSourceKind ATTRIBUTE = fromString("attribute"); + + /** + * Static value contact for DiscoSourceKind. + */ + @Generated + public static final DiscoSourceKind CONTACT = fromString("contact"); + + /** + * Static value domain for DiscoSourceKind. + */ + @Generated + public static final DiscoSourceKind DOMAIN = fromString("domain"); + + /** + * Static value host for DiscoSourceKind. + */ + @Generated + public static final DiscoSourceKind HOST = fromString("host"); + + /** + * Static value ipBlock for DiscoSourceKind. + */ + @Generated + public static final DiscoSourceKind IP_BLOCK = fromString("ipBlock"); + + /** + * Creates a new instance of DiscoSourceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public DiscoSourceKind() { + } + + /** + * Creates or finds a DiscoSourceKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiscoSourceKind. + */ + @Generated + public static DiscoSourceKind fromString(String name) { + return fromString(name, DiscoSourceKind.class); + } + + /** + * Gets known DiscoSourceKind values. + * + * @return known DiscoSourceKind values. + */ + @Generated + public static Collection values() { + return values(DiscoSourceKind.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoTemplate.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoTemplate.java new file mode 100644 index 000000000000..21c0c2c1672b --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DiscoTemplate.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The items in the current page of results. + */ +@Immutable +public final class DiscoTemplate implements JsonSerializable { + + /* + * The system generated unique id for the resource. + */ + @Generated + private String id; + + /* + * The caller provided unique name for the resource. + */ + @Generated + private String name; + + /* + * The name that can be used for display purposes. + */ + @Generated + private String displayName; + + /* + * The name of the industry. + */ + @Generated + private String industry; + + /* + * The name of the region. + */ + @Generated + private String region; + + /* + * The country code. + */ + @Generated + private String countryCode; + + /* + * The state code. + */ + @Generated + private String stateCode; + + /* + * The name of the city. + */ + @Generated + private String city; + + /* + * The list of disco template seeds. + */ + @Generated + private List seeds; + + /* + * The list of disco template names. + */ + @Generated + private List names; + + /** + * Creates an instance of DiscoTemplate class. + */ + @Generated + private DiscoTemplate() { + } + + /** + * Get the id property: The system generated unique id for the resource. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the name property: The caller provided unique name for the resource. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the displayName property: The name that can be used for display purposes. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Get the industry property: The name of the industry. + * + * @return the industry value. + */ + @Generated + public String getIndustry() { + return this.industry; + } + + /** + * Get the region property: The name of the region. + * + * @return the region value. + */ + @Generated + public String getRegion() { + return this.region; + } + + /** + * Get the countryCode property: The country code. + * + * @return the countryCode value. + */ + @Generated + public String getCountryCode() { + return this.countryCode; + } + + /** + * Get the stateCode property: The state code. + * + * @return the stateCode value. + */ + @Generated + public String getStateCode() { + return this.stateCode; + } + + /** + * Get the city property: The name of the city. + * + * @return the city value. + */ + @Generated + public String getCity() { + return this.city; + } + + /** + * Get the seeds property: The list of disco template seeds. + * + * @return the seeds value. + */ + @Generated + public List getSeeds() { + return this.seeds; + } + + /** + * Get the names property: The list of disco template names. + * + * @return the names value. + */ + @Generated + public List getNames() { + return this.names; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("industry", this.industry); + jsonWriter.writeStringField("region", this.region); + jsonWriter.writeStringField("countryCode", this.countryCode); + jsonWriter.writeStringField("stateCode", this.stateCode); + jsonWriter.writeStringField("city", this.city); + jsonWriter.writeArrayField("seeds", this.seeds, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("names", this.names, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscoTemplate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscoTemplate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DiscoTemplate. + */ + @Generated + public static DiscoTemplate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscoTemplate deserializedDiscoTemplate = new DiscoTemplate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + deserializedDiscoTemplate.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDiscoTemplate.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedDiscoTemplate.displayName = reader.getString(); + } else if ("industry".equals(fieldName)) { + deserializedDiscoTemplate.industry = reader.getString(); + } else if ("region".equals(fieldName)) { + deserializedDiscoTemplate.region = reader.getString(); + } else if ("countryCode".equals(fieldName)) { + deserializedDiscoTemplate.countryCode = reader.getString(); + } else if ("stateCode".equals(fieldName)) { + deserializedDiscoTemplate.stateCode = reader.getString(); + } else if ("city".equals(fieldName)) { + deserializedDiscoTemplate.city = reader.getString(); + } else if ("seeds".equals(fieldName)) { + List seeds = reader.readArray(reader1 -> DiscoSource.fromJson(reader1)); + deserializedDiscoTemplate.seeds = seeds; + } else if ("names".equals(fieldName)) { + List names = reader.readArray(reader1 -> reader1.getString()); + deserializedDiscoTemplate.names = names; + } else { + reader.skipChildren(); + } + } + return deserializedDiscoTemplate; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DomainAsset.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DomainAsset.java new file mode 100644 index 000000000000..7f3d3820ecde --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DomainAsset.java @@ -0,0 +1,704 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The DomainAsset model. + */ +@Immutable +public final class DomainAsset implements JsonSerializable { + + /* + * The domain property. + */ + @Generated + private String domain; + + /* + * The whoisId property. + */ + @Generated + private Long whoisId; + + /* + * The registrarIanaIds property. + */ + @Generated + private List registrarIanaIds; + + /* + * The registrantContacts property. + */ + @Generated + private List registrantContacts; + + /* + * The registrantOrgs property. + */ + @Generated + private List registrantOrgs; + + /* + * The adminContacts property. + */ + @Generated + private List adminContacts; + + /* + * The technicalContacts property. + */ + @Generated + private List technicalContacts; + + /* + * The alexaInfos property. + */ + @Generated + private List alexaInfos; + + /* + * The nameServers property. + */ + @Generated + private List nameServers; + + /* + * The mailServers property. + */ + @Generated + private List mailServers; + + /* + * The whoisServers property. + */ + @Generated + private List whoisServers; + + /* + * The domainStatuses property. + */ + @Generated + private List domainStatuses; + + /* + * The registrarCreatedAt property. + */ + @Generated + private List registrarCreatedAt; + + /* + * The registrarUpdatedAt property. + */ + @Generated + private List registrarUpdatedAt; + + /* + * The registrarExpiresAt property. + */ + @Generated + private List registrarExpiresAt; + + /* + * The soaRecords property. + */ + @Generated + private List soaRecords; + + /* + * The detailedFromWhoisAt property. + */ + @Generated + private OffsetDateTime detailedFromWhoisAt; + + /* + * The registrarNames property. + */ + @Generated + private List registrarNames; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The parkedDomain property. + */ + @Generated + private List parkedDomain; + + /* + * The registrantNames property. + */ + @Generated + private List registrantNames; + + /* + * The adminNames property. + */ + @Generated + private List adminNames; + + /* + * The technicalNames property. + */ + @Generated + private List technicalNames; + + /* + * The adminOrgs property. + */ + @Generated + private List adminOrgs; + + /* + * The technicalOrgs property. + */ + @Generated + private List technicalOrgs; + + /* + * The registrantPhones property. + */ + @Generated + private List registrantPhones; + + /* + * The adminPhones property. + */ + @Generated + private List adminPhones; + + /* + * The technicalPhones property. + */ + @Generated + private List technicalPhones; + + /** + * Creates an instance of DomainAsset class. + */ + @Generated + private DomainAsset() { + } + + /** + * Get the domain property: The domain property. + * + * @return the domain value. + */ + @Generated + public String getDomain() { + return this.domain; + } + + /** + * Get the whoisId property: The whoisId property. + * + * @return the whoisId value. + */ + @Generated + public Long getWhoisId() { + return this.whoisId; + } + + /** + * Get the registrarIanaIds property: The registrarIanaIds property. + * + * @return the registrarIanaIds value. + */ + @Generated + public List getRegistrarIanaIds() { + return this.registrarIanaIds; + } + + /** + * Get the registrantContacts property: The registrantContacts property. + * + * @return the registrantContacts value. + */ + @Generated + public List getRegistrantContacts() { + return this.registrantContacts; + } + + /** + * Get the registrantOrgs property: The registrantOrgs property. + * + * @return the registrantOrgs value. + */ + @Generated + public List getRegistrantOrgs() { + return this.registrantOrgs; + } + + /** + * Get the adminContacts property: The adminContacts property. + * + * @return the adminContacts value. + */ + @Generated + public List getAdminContacts() { + return this.adminContacts; + } + + /** + * Get the technicalContacts property: The technicalContacts property. + * + * @return the technicalContacts value. + */ + @Generated + public List getTechnicalContacts() { + return this.technicalContacts; + } + + /** + * Get the alexaInfos property: The alexaInfos property. + * + * @return the alexaInfos value. + */ + @Generated + public List getAlexaInfos() { + return this.alexaInfos; + } + + /** + * Get the nameServers property: The nameServers property. + * + * @return the nameServers value. + */ + @Generated + public List getNameServers() { + return this.nameServers; + } + + /** + * Get the mailServers property: The mailServers property. + * + * @return the mailServers value. + */ + @Generated + public List getMailServers() { + return this.mailServers; + } + + /** + * Get the whoisServers property: The whoisServers property. + * + * @return the whoisServers value. + */ + @Generated + public List getWhoisServers() { + return this.whoisServers; + } + + /** + * Get the domainStatuses property: The domainStatuses property. + * + * @return the domainStatuses value. + */ + @Generated + public List getDomainStatuses() { + return this.domainStatuses; + } + + /** + * Get the registrarCreatedAt property: The registrarCreatedAt property. + * + * @return the registrarCreatedAt value. + */ + @Generated + public List getRegistrarCreatedAt() { + return this.registrarCreatedAt; + } + + /** + * Get the registrarUpdatedAt property: The registrarUpdatedAt property. + * + * @return the registrarUpdatedAt value. + */ + @Generated + public List getRegistrarUpdatedAt() { + return this.registrarUpdatedAt; + } + + /** + * Get the registrarExpiresAt property: The registrarExpiresAt property. + * + * @return the registrarExpiresAt value. + */ + @Generated + public List getRegistrarExpiresAt() { + return this.registrarExpiresAt; + } + + /** + * Get the soaRecords property: The soaRecords property. + * + * @return the soaRecords value. + */ + @Generated + public List getSoaRecords() { + return this.soaRecords; + } + + /** + * Get the detailedFromWhoisAt property: The detailedFromWhoisAt property. + * + * @return the detailedFromWhoisAt value. + */ + @Generated + public OffsetDateTime getDetailedFromWhoisAt() { + return this.detailedFromWhoisAt; + } + + /** + * Get the registrarNames property: The registrarNames property. + * + * @return the registrarNames value. + */ + @Generated + public List getRegistrarNames() { + return this.registrarNames; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the parkedDomain property: The parkedDomain property. + * + * @return the parkedDomain value. + */ + @Generated + public List getParkedDomain() { + return this.parkedDomain; + } + + /** + * Get the registrantNames property: The registrantNames property. + * + * @return the registrantNames value. + */ + @Generated + public List getRegistrantNames() { + return this.registrantNames; + } + + /** + * Get the adminNames property: The adminNames property. + * + * @return the adminNames value. + */ + @Generated + public List getAdminNames() { + return this.adminNames; + } + + /** + * Get the technicalNames property: The technicalNames property. + * + * @return the technicalNames value. + */ + @Generated + public List getTechnicalNames() { + return this.technicalNames; + } + + /** + * Get the adminOrgs property: The adminOrgs property. + * + * @return the adminOrgs value. + */ + @Generated + public List getAdminOrgs() { + return this.adminOrgs; + } + + /** + * Get the technicalOrgs property: The technicalOrgs property. + * + * @return the technicalOrgs value. + */ + @Generated + public List getTechnicalOrgs() { + return this.technicalOrgs; + } + + /** + * Get the registrantPhones property: The registrantPhones property. + * + * @return the registrantPhones value. + */ + @Generated + public List getRegistrantPhones() { + return this.registrantPhones; + } + + /** + * Get the adminPhones property: The adminPhones property. + * + * @return the adminPhones value. + */ + @Generated + public List getAdminPhones() { + return this.adminPhones; + } + + /** + * Get the technicalPhones property: The technicalPhones property. + * + * @return the technicalPhones value. + */ + @Generated + public List getTechnicalPhones() { + return this.technicalPhones; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeNumberField("whoisId", this.whoisId); + jsonWriter.writeArrayField("registrarIanaIds", this.registrarIanaIds, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantContacts", this.registrantContacts, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantOrgs", this.registrantOrgs, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminContacts", this.adminContacts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalContacts", this.technicalContacts, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("alexaInfos", this.alexaInfos, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("nameServers", this.nameServers, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("mailServers", this.mailServers, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("whoisServers", this.whoisServers, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("domainStatuses", this.domainStatuses, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrarCreatedAt", this.registrarCreatedAt, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrarUpdatedAt", this.registrarUpdatedAt, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrarExpiresAt", this.registrarExpiresAt, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("soaRecords", this.soaRecords, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("detailedFromWhoisAt", + this.detailedFromWhoisAt == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.detailedFromWhoisAt)); + jsonWriter.writeArrayField("registrarNames", this.registrarNames, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeArrayField("parkedDomain", this.parkedDomain, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantNames", this.registrantNames, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminNames", this.adminNames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalNames", this.technicalNames, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminOrgs", this.adminOrgs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalOrgs", this.technicalOrgs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantPhones", this.registrantPhones, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminPhones", this.adminPhones, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalPhones", this.technicalPhones, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainAsset from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainAsset if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DomainAsset. + */ + @Generated + public static DomainAsset fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DomainAsset deserializedDomainAsset = new DomainAsset(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("domain".equals(fieldName)) { + deserializedDomainAsset.domain = reader.getString(); + } else if ("whoisId".equals(fieldName)) { + deserializedDomainAsset.whoisId = reader.getNullable(JsonReader::getLong); + } else if ("registrarIanaIds".equals(fieldName)) { + List registrarIanaIds + = reader.readArray(reader1 -> ObservedInteger.fromJson(reader1)); + deserializedDomainAsset.registrarIanaIds = registrarIanaIds; + } else if ("registrantContacts".equals(fieldName)) { + List registrantContacts + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.registrantContacts = registrantContacts; + } else if ("registrantOrgs".equals(fieldName)) { + List registrantOrgs = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.registrantOrgs = registrantOrgs; + } else if ("adminContacts".equals(fieldName)) { + List adminContacts = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.adminContacts = adminContacts; + } else if ("technicalContacts".equals(fieldName)) { + List technicalContacts + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.technicalContacts = technicalContacts; + } else if ("alexaInfos".equals(fieldName)) { + List alexaInfos = reader.readArray(reader1 -> AlexaDetails.fromJson(reader1)); + deserializedDomainAsset.alexaInfos = alexaInfos; + } else if ("nameServers".equals(fieldName)) { + List nameServers = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.nameServers = nameServers; + } else if ("mailServers".equals(fieldName)) { + List mailServers = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.mailServers = mailServers; + } else if ("whoisServers".equals(fieldName)) { + List whoisServers = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.whoisServers = whoisServers; + } else if ("domainStatuses".equals(fieldName)) { + List domainStatuses = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.domainStatuses = domainStatuses; + } else if ("registrarCreatedAt".equals(fieldName)) { + List registrarCreatedAt = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedDomainAsset.registrarCreatedAt = registrarCreatedAt; + } else if ("registrarUpdatedAt".equals(fieldName)) { + List registrarUpdatedAt = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedDomainAsset.registrarUpdatedAt = registrarUpdatedAt; + } else if ("registrarExpiresAt".equals(fieldName)) { + List registrarExpiresAt = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedDomainAsset.registrarExpiresAt = registrarExpiresAt; + } else if ("soaRecords".equals(fieldName)) { + List soaRecords = reader.readArray(reader1 -> SoaRecord.fromJson(reader1)); + deserializedDomainAsset.soaRecords = soaRecords; + } else if ("detailedFromWhoisAt".equals(fieldName)) { + deserializedDomainAsset.detailedFromWhoisAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("registrarNames".equals(fieldName)) { + List registrarNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.registrarNames = registrarNames; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedDomainAsset.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedDomainAsset.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedDomainAsset.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedDomainAsset.count = reader.getNullable(JsonReader::getLong); + } else if ("parkedDomain".equals(fieldName)) { + List parkedDomain = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedDomainAsset.parkedDomain = parkedDomain; + } else if ("registrantNames".equals(fieldName)) { + List registrantNames + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.registrantNames = registrantNames; + } else if ("adminNames".equals(fieldName)) { + List adminNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.adminNames = adminNames; + } else if ("technicalNames".equals(fieldName)) { + List technicalNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.technicalNames = technicalNames; + } else if ("adminOrgs".equals(fieldName)) { + List adminOrgs = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.adminOrgs = adminOrgs; + } else if ("technicalOrgs".equals(fieldName)) { + List technicalOrgs = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.technicalOrgs = technicalOrgs; + } else if ("registrantPhones".equals(fieldName)) { + List registrantPhones + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.registrantPhones = registrantPhones; + } else if ("adminPhones".equals(fieldName)) { + List adminPhones = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.adminPhones = adminPhones; + } else if ("technicalPhones".equals(fieldName)) { + List technicalPhones + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedDomainAsset.technicalPhones = technicalPhones; + } else { + reader.skipChildren(); + } + } + return deserializedDomainAsset; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DomainAssetResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DomainAssetResource.java new file mode 100644 index 000000000000..d79e675344ab --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/DomainAssetResource.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The DomainAssetResource model. + */ +@Immutable +public final class DomainAssetResource extends AssetResource { + + /* + * Discriminator property for AssetResource. + */ + @Generated + private String kind = "domain"; + + /* + * asset + */ + @Generated + private final DomainAsset asset; + + /** + * Creates an instance of DomainAssetResource class. + * + * @param asset the asset value to set. + */ + @Generated + private DomainAssetResource(DomainAsset asset) { + this.asset = asset; + } + + /** + * Get the kind property: Discriminator property for AssetResource. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the asset property: asset. + * + * @return the asset value. + */ + @Generated + public DomainAsset getAsset() { + return this.asset; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("uuid", getUuid()); + jsonWriter.writeStringField("createdDate", + getCreatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getCreatedDate())); + jsonWriter.writeStringField("updatedDate", + getUpdatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getUpdatedDate())); + jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); + jsonWriter.writeStringField("externalId", getExternalId()); + jsonWriter.writeArrayField("labels", getLabels(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("wildcard", isWildcard()); + jsonWriter.writeStringField("discoGroupName", getDiscoGroupName()); + jsonWriter.writeArrayField("auditTrail", getAuditTrail(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("reason", getReason()); + jsonWriter.writeJsonField("asset", this.asset); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DomainAssetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DomainAssetResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DomainAssetResource. + */ + @Generated + public static DomainAssetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + String name = null; + String displayName = null; + String uuid = null; + OffsetDateTime createdDate = null; + OffsetDateTime updatedDate = null; + AssetState state = null; + String externalId = null; + List labels = null; + Boolean wildcard = null; + String discoGroupName = null; + List auditTrail = null; + String reason = null; + DomainAsset asset = null; + String kind = "domain"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("uuid".equals(fieldName)) { + uuid = reader.getString(); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + state = AssetState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + labels = reader.readArray(reader1 -> reader1.getString()); + } else if ("wildcard".equals(fieldName)) { + wildcard = reader.getNullable(JsonReader::getBoolean); + } else if ("discoGroupName".equals(fieldName)) { + discoGroupName = reader.getString(); + } else if ("auditTrail".equals(fieldName)) { + auditTrail = reader.readArray(reader1 -> AuditTrailItem.fromJson(reader1)); + } else if ("reason".equals(fieldName)) { + reason = reader.getString(); + } else if ("asset".equals(fieldName)) { + asset = DomainAsset.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + DomainAssetResource deserializedDomainAssetResource = new DomainAssetResource(asset); + deserializedDomainAssetResource.setId(id); + deserializedDomainAssetResource.setName(name); + deserializedDomainAssetResource.setDisplayName(displayName); + deserializedDomainAssetResource.setUuid(uuid); + deserializedDomainAssetResource.setCreatedDate(createdDate); + deserializedDomainAssetResource.setUpdatedDate(updatedDate); + deserializedDomainAssetResource.setState(state); + deserializedDomainAssetResource.setExternalId(externalId); + deserializedDomainAssetResource.setLabels(labels); + deserializedDomainAssetResource.setWildcard(wildcard); + deserializedDomainAssetResource.setDiscoGroupName(discoGroupName); + deserializedDomainAssetResource.setAuditTrail(auditTrail); + deserializedDomainAssetResource.setReason(reason); + deserializedDomainAssetResource.kind = kind; + return deserializedDomainAssetResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ErrorDetail.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ErrorDetail.java new file mode 100644 index 000000000000..292410ff3fc6 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ErrorDetail.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * This is the top-level error object whose code matches the x-ms-error-code response header. + */ +@Immutable +public final class ErrorDetail implements JsonSerializable { + + /* + * This is one of a server-defined set of error codes. + */ + @Generated + private final String code; + + /* + * This is a human-readable representation of the error. + */ + @Generated + private final String message; + + /* + * This is the error target. + */ + @Generated + private String target; + + /* + * This is an array of details about specific errors that led to this reported error. + */ + @Generated + private List details; + + /* + * This is an object containing more specific information than the current object about the error. + */ + @Generated + private InnerError innererror; + + /** + * Creates an instance of ErrorDetail class. + * + * @param code the code value to set. + * @param message the message value to set. + */ + @Generated + private ErrorDetail(String code, String message) { + this.code = code; + this.message = message; + } + + /** + * Get the code property: This is one of a server-defined set of error codes. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Get the message property: This is a human-readable representation of the error. + * + * @return the message value. + */ + @Generated + public String getMessage() { + return this.message; + } + + /** + * Get the target property: This is the error target. + * + * @return the target value. + */ + @Generated + public String getTarget() { + return this.target; + } + + /** + * Get the details property: This is an array of details about specific errors that led to this reported error. + * + * @return the details value. + */ + @Generated + public List getDetails() { + return this.details; + } + + /** + * Get the innererror property: This is an object containing more specific information than the current object about + * the error. + * + * @return the innererror value. + */ + @Generated + public InnerError getInnererror() { + return this.innererror; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("target", this.target); + jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("innererror", this.innererror); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorDetail from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorDetail if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ErrorDetail. + */ + @Generated + public static ErrorDetail fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String code = null; + String message = null; + String target = null; + List details = null; + InnerError innererror = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("code".equals(fieldName)) { + code = reader.getString(); + } else if ("message".equals(fieldName)) { + message = reader.getString(); + } else if ("target".equals(fieldName)) { + target = reader.getString(); + } else if ("details".equals(fieldName)) { + details = reader.readArray(reader1 -> ErrorDetail.fromJson(reader1)); + } else if ("innererror".equals(fieldName)) { + innererror = InnerError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + ErrorDetail deserializedErrorDetail = new ErrorDetail(code, message); + deserializedErrorDetail.target = target; + deserializedErrorDetail.details = details; + deserializedErrorDetail.innererror = innererror; + return deserializedErrorDetail; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/GuidPair.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/GuidPair.java new file mode 100644 index 000000000000..7257d01e4459 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/GuidPair.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The GuidPair model. + */ +@Immutable +public final class GuidPair implements JsonSerializable { + + /* + * The pageGuid property. + */ + @Generated + private String pageGuid; + + /* + * The crawlStateGuid property. + */ + @Generated + private String crawlStateGuid; + + /* + * The loadDate property. + */ + @Generated + private OffsetDateTime loadDate; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /** + * Creates an instance of GuidPair class. + */ + @Generated + private GuidPair() { + } + + /** + * Get the pageGuid property: The pageGuid property. + * + * @return the pageGuid value. + */ + @Generated + public String getPageGuid() { + return this.pageGuid; + } + + /** + * Get the crawlStateGuid property: The crawlStateGuid property. + * + * @return the crawlStateGuid value. + */ + @Generated + public String getCrawlStateGuid() { + return this.crawlStateGuid; + } + + /** + * Get the loadDate property: The loadDate property. + * + * @return the loadDate value. + */ + @Generated + public OffsetDateTime getLoadDate() { + return this.loadDate; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("pageGuid", this.pageGuid); + jsonWriter.writeStringField("crawlStateGuid", this.crawlStateGuid); + jsonWriter.writeStringField("loadDate", + this.loadDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.loadDate)); + jsonWriter.writeBooleanField("recent", this.recent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuidPair from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuidPair if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the GuidPair. + */ + @Generated + public static GuidPair fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuidPair deserializedGuidPair = new GuidPair(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("pageGuid".equals(fieldName)) { + deserializedGuidPair.pageGuid = reader.getString(); + } else if ("crawlStateGuid".equals(fieldName)) { + deserializedGuidPair.crawlStateGuid = reader.getString(); + } else if ("loadDate".equals(fieldName)) { + deserializedGuidPair.loadDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("recent".equals(fieldName)) { + deserializedGuidPair.recent = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedGuidPair; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostAsset.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostAsset.java new file mode 100644 index 000000000000..341c210de1f3 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostAsset.java @@ -0,0 +1,722 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The HostAsset model. + */ +@Immutable +public final class HostAsset extends InventoryAsset { + + /* + * The host property. + */ + @Generated + private String host; + + /* + * The domain property. + */ + @Generated + private String domain; + + /* + * The ipAddresses property. + */ + @Generated + private List ipAddresses; + + /* + * The webComponents property. + */ + @Generated + private List webComponents; + + /* + * The headers property. + */ + @Generated + private List headers; + + /* + * The attributes property. + */ + @Generated + private List attributes; + + /* + * The cookies property. + */ + @Generated + private List cookies; + + /* + * The sslCerts property. + */ + @Generated + private List sslCerts; + + /* + * The parentHosts property. + */ + @Generated + private List parentHosts; + + /* + * The childHosts property. + */ + @Generated + private List childHosts; + + /* + * The hostCore property. + */ + @Generated + private HostCore hostCore; + + /* + * The services property. + */ + @Generated + private List services; + + /* + * The cnames property. + */ + @Generated + private List cnames; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The resourceUrls property. + */ + @Generated + private List resourceUrls; + + /* + * The scanMetadata property. + */ + @Generated + private List scanMetadata; + + /* + * The asns property. + */ + @Generated + private List asns; + + /* + * The ipBlocks property. + */ + @Generated + private List ipBlocks; + + /* + * The responseBodies property. + */ + @Generated + private List responseBodies; + + /* + * The domainAsset property. + */ + @Generated + private DomainAsset domainAsset; + + /* + * The nsRecord property. + */ + @Generated + private List nsRecord; + + /* + * The mxRecord property. + */ + @Generated + private List mxRecord; + + /* + * The webserver property. + */ + @Generated + private List webserver; + + /* + * The location property. + */ + @Generated + private List location; + + /* + * The nxdomain property. + */ + @Generated + private List nxdomain; + + /* + * The sslServerConfig property. + */ + @Generated + private List sslServerConfig; + + /* + * The isWildcard property. + */ + @Generated + private List isWildcard; + + /* + * The banners property. + */ + @Generated + private List banners; + + /* + * The ipv4 property. + */ + @Generated + private List ipv4; + + /* + * The ipv6 property. + */ + @Generated + private List ipv6; + + /** + * Creates an instance of HostAsset class. + */ + @Generated + private HostAsset() { + } + + /** + * Get the host property: The host property. + * + * @return the host value. + */ + @Generated + public String getHost() { + return this.host; + } + + /** + * Get the domain property: The domain property. + * + * @return the domain value. + */ + @Generated + public String getDomain() { + return this.domain; + } + + /** + * Get the ipAddresses property: The ipAddresses property. + * + * @return the ipAddresses value. + */ + @Generated + public List getIpAddresses() { + return this.ipAddresses; + } + + /** + * Get the webComponents property: The webComponents property. + * + * @return the webComponents value. + */ + @Generated + public List getWebComponents() { + return this.webComponents; + } + + /** + * Get the headers property: The headers property. + * + * @return the headers value. + */ + @Generated + public List getHeaders() { + return this.headers; + } + + /** + * Get the attributes property: The attributes property. + * + * @return the attributes value. + */ + @Generated + public List getAttributes() { + return this.attributes; + } + + /** + * Get the cookies property: The cookies property. + * + * @return the cookies value. + */ + @Generated + public List getCookies() { + return this.cookies; + } + + /** + * Get the sslCerts property: The sslCerts property. + * + * @return the sslCerts value. + */ + @Generated + public List getSslCerts() { + return this.sslCerts; + } + + /** + * Get the parentHosts property: The parentHosts property. + * + * @return the parentHosts value. + */ + @Generated + public List getParentHosts() { + return this.parentHosts; + } + + /** + * Get the childHosts property: The childHosts property. + * + * @return the childHosts value. + */ + @Generated + public List getChildHosts() { + return this.childHosts; + } + + /** + * Get the hostCore property: The hostCore property. + * + * @return the hostCore value. + */ + @Generated + public HostCore getHostCore() { + return this.hostCore; + } + + /** + * Get the services property: The services property. + * + * @return the services value. + */ + @Generated + public List getServices() { + return this.services; + } + + /** + * Get the cnames property: The cnames property. + * + * @return the cnames value. + */ + @Generated + public List getCnames() { + return this.cnames; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the resourceUrls property: The resourceUrls property. + * + * @return the resourceUrls value. + */ + @Generated + public List getResourceUrls() { + return this.resourceUrls; + } + + /** + * Get the scanMetadata property: The scanMetadata property. + * + * @return the scanMetadata value. + */ + @Generated + public List getScanMetadata() { + return this.scanMetadata; + } + + /** + * Get the asns property: The asns property. + * + * @return the asns value. + */ + @Generated + public List getAsns() { + return this.asns; + } + + /** + * Get the ipBlocks property: The ipBlocks property. + * + * @return the ipBlocks value. + */ + @Generated + public List getIpBlocks() { + return this.ipBlocks; + } + + /** + * Get the responseBodies property: The responseBodies property. + * + * @return the responseBodies value. + */ + @Generated + public List getResponseBodies() { + return this.responseBodies; + } + + /** + * Get the domainAsset property: The domainAsset property. + * + * @return the domainAsset value. + */ + @Generated + public DomainAsset getDomainAsset() { + return this.domainAsset; + } + + /** + * Get the nsRecord property: The nsRecord property. + * + * @return the nsRecord value. + */ + @Generated + public List getNsRecord() { + return this.nsRecord; + } + + /** + * Get the mxRecord property: The mxRecord property. + * + * @return the mxRecord value. + */ + @Generated + public List getMxRecord() { + return this.mxRecord; + } + + /** + * Get the webserver property: The webserver property. + * + * @return the webserver value. + */ + @Generated + public List getWebserver() { + return this.webserver; + } + + /** + * Get the location property: The location property. + * + * @return the location value. + */ + @Generated + public List getLocation() { + return this.location; + } + + /** + * Get the nxdomain property: The nxdomain property. + * + * @return the nxdomain value. + */ + @Generated + public List getNxdomain() { + return this.nxdomain; + } + + /** + * Get the sslServerConfig property: The sslServerConfig property. + * + * @return the sslServerConfig value. + */ + @Generated + public List getSslServerConfig() { + return this.sslServerConfig; + } + + /** + * Get the isWildcard property: The isWildcard property. + * + * @return the isWildcard value. + */ + @Generated + public List getIsWildcard() { + return this.isWildcard; + } + + /** + * Get the banners property: The banners property. + * + * @return the banners value. + */ + @Generated + public List getBanners() { + return this.banners; + } + + /** + * Get the ipv4 property: The ipv4 property. + * + * @return the ipv4 value. + */ + @Generated + public List getIpv4() { + return this.ipv4; + } + + /** + * Get the ipv6 property: The ipv6 property. + * + * @return the ipv6 value. + */ + @Generated + public List getIpv6() { + return this.ipv6; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("host", this.host); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeArrayField("ipAddresses", this.ipAddresses, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("webComponents", this.webComponents, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("attributes", this.attributes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("cookies", this.cookies, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sslCerts", this.sslCerts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("parentHosts", this.parentHosts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("childHosts", this.childHosts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("hostCore", this.hostCore); + jsonWriter.writeArrayField("services", this.services, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("cnames", this.cnames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeArrayField("resourceUrls", this.resourceUrls, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("scanMetadata", this.scanMetadata, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("asns", this.asns, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipBlocks", this.ipBlocks, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("responseBodies", this.responseBodies, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("domainAsset", this.domainAsset); + jsonWriter.writeArrayField("nsRecord", this.nsRecord, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("mxRecord", this.mxRecord, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("webserver", this.webserver, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("location", this.location, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("nxdomain", this.nxdomain, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sslServerConfig", this.sslServerConfig, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("isWildcard", this.isWildcard, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("banners", this.banners, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv4", this.ipv4, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6", this.ipv6, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HostAsset from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HostAsset if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the HostAsset. + */ + @Generated + public static HostAsset fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HostAsset deserializedHostAsset = new HostAsset(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("host".equals(fieldName)) { + deserializedHostAsset.host = reader.getString(); + } else if ("domain".equals(fieldName)) { + deserializedHostAsset.domain = reader.getString(); + } else if ("ipAddresses".equals(fieldName)) { + List ipAddresses = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedHostAsset.ipAddresses = ipAddresses; + } else if ("webComponents".equals(fieldName)) { + List webComponents = reader.readArray(reader1 -> WebComponent.fromJson(reader1)); + deserializedHostAsset.webComponents = webComponents; + } else if ("headers".equals(fieldName)) { + List headers = reader.readArray(reader1 -> ObservedHeader.fromJson(reader1)); + deserializedHostAsset.headers = headers; + } else if ("attributes".equals(fieldName)) { + List attributes = reader.readArray(reader1 -> Attribute.fromJson(reader1)); + deserializedHostAsset.attributes = attributes; + } else if ("cookies".equals(fieldName)) { + List cookies = reader.readArray(reader1 -> Cookie.fromJson(reader1)); + deserializedHostAsset.cookies = cookies; + } else if ("sslCerts".equals(fieldName)) { + List sslCerts = reader.readArray(reader1 -> SslCertAsset.fromJson(reader1)); + deserializedHostAsset.sslCerts = sslCerts; + } else if ("parentHosts".equals(fieldName)) { + List parentHosts = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedHostAsset.parentHosts = parentHosts; + } else if ("childHosts".equals(fieldName)) { + List childHosts = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedHostAsset.childHosts = childHosts; + } else if ("hostCore".equals(fieldName)) { + deserializedHostAsset.hostCore = HostCore.fromJson(reader); + } else if ("services".equals(fieldName)) { + List services = reader.readArray(reader1 -> Service.fromJson(reader1)); + deserializedHostAsset.services = services; + } else if ("cnames".equals(fieldName)) { + List cnames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedHostAsset.cnames = cnames; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedHostAsset.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedHostAsset.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedHostAsset.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedHostAsset.count = reader.getNullable(JsonReader::getLong); + } else if ("resourceUrls".equals(fieldName)) { + List resourceUrls = reader.readArray(reader1 -> ResourceUrl.fromJson(reader1)); + deserializedHostAsset.resourceUrls = resourceUrls; + } else if ("scanMetadata".equals(fieldName)) { + List scanMetadata = reader.readArray(reader1 -> ScanMetadata.fromJson(reader1)); + deserializedHostAsset.scanMetadata = scanMetadata; + } else if ("asns".equals(fieldName)) { + List asns = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedHostAsset.asns = asns; + } else if ("ipBlocks".equals(fieldName)) { + List ipBlocks = reader.readArray(reader1 -> IpBlock.fromJson(reader1)); + deserializedHostAsset.ipBlocks = ipBlocks; + } else if ("responseBodies".equals(fieldName)) { + List responseBodies = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedHostAsset.responseBodies = responseBodies; + } else if ("domainAsset".equals(fieldName)) { + deserializedHostAsset.domainAsset = DomainAsset.fromJson(reader); + } else if ("nsRecord".equals(fieldName)) { + List nsRecord = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedHostAsset.nsRecord = nsRecord; + } else if ("mxRecord".equals(fieldName)) { + List mxRecord = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedHostAsset.mxRecord = mxRecord; + } else if ("webserver".equals(fieldName)) { + List webserver = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedHostAsset.webserver = webserver; + } else if ("location".equals(fieldName)) { + List location = reader.readArray(reader1 -> ObservedLocation.fromJson(reader1)); + deserializedHostAsset.location = location; + } else if ("nxdomain".equals(fieldName)) { + List nxdomain = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedHostAsset.nxdomain = nxdomain; + } else if ("sslServerConfig".equals(fieldName)) { + List sslServerConfig + = reader.readArray(reader1 -> SslServerConfig.fromJson(reader1)); + deserializedHostAsset.sslServerConfig = sslServerConfig; + } else if ("isWildcard".equals(fieldName)) { + List isWildcard = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedHostAsset.isWildcard = isWildcard; + } else if ("banners".equals(fieldName)) { + List banners = reader.readArray(reader1 -> Banner.fromJson(reader1)); + deserializedHostAsset.banners = banners; + } else if ("ipv4".equals(fieldName)) { + List ipv4 = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedHostAsset.ipv4 = ipv4; + } else if ("ipv6".equals(fieldName)) { + List ipv6 = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedHostAsset.ipv6 = ipv6; + } else { + reader.skipChildren(); + } + } + return deserializedHostAsset; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostAssetResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostAssetResource.java new file mode 100644 index 000000000000..5137a1921daf --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostAssetResource.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The HostAssetResource model. + */ +@Immutable +public final class HostAssetResource extends AssetResource { + + /* + * Discriminator property for AssetResource. + */ + @Generated + private String kind = "host"; + + /* + * asset + */ + @Generated + private final HostAsset asset; + + /** + * Creates an instance of HostAssetResource class. + * + * @param asset the asset value to set. + */ + @Generated + private HostAssetResource(HostAsset asset) { + this.asset = asset; + } + + /** + * Get the kind property: Discriminator property for AssetResource. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the asset property: asset. + * + * @return the asset value. + */ + @Generated + public HostAsset getAsset() { + return this.asset; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("uuid", getUuid()); + jsonWriter.writeStringField("createdDate", + getCreatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getCreatedDate())); + jsonWriter.writeStringField("updatedDate", + getUpdatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getUpdatedDate())); + jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); + jsonWriter.writeStringField("externalId", getExternalId()); + jsonWriter.writeArrayField("labels", getLabels(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("wildcard", isWildcard()); + jsonWriter.writeStringField("discoGroupName", getDiscoGroupName()); + jsonWriter.writeArrayField("auditTrail", getAuditTrail(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("reason", getReason()); + jsonWriter.writeJsonField("asset", this.asset); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HostAssetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HostAssetResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the HostAssetResource. + */ + @Generated + public static HostAssetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + String name = null; + String displayName = null; + String uuid = null; + OffsetDateTime createdDate = null; + OffsetDateTime updatedDate = null; + AssetState state = null; + String externalId = null; + List labels = null; + Boolean wildcard = null; + String discoGroupName = null; + List auditTrail = null; + String reason = null; + HostAsset asset = null; + String kind = "host"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("uuid".equals(fieldName)) { + uuid = reader.getString(); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + state = AssetState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + labels = reader.readArray(reader1 -> reader1.getString()); + } else if ("wildcard".equals(fieldName)) { + wildcard = reader.getNullable(JsonReader::getBoolean); + } else if ("discoGroupName".equals(fieldName)) { + discoGroupName = reader.getString(); + } else if ("auditTrail".equals(fieldName)) { + auditTrail = reader.readArray(reader1 -> AuditTrailItem.fromJson(reader1)); + } else if ("reason".equals(fieldName)) { + reason = reader.getString(); + } else if ("asset".equals(fieldName)) { + asset = HostAsset.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + HostAssetResource deserializedHostAssetResource = new HostAssetResource(asset); + deserializedHostAssetResource.setId(id); + deserializedHostAssetResource.setName(name); + deserializedHostAssetResource.setDisplayName(displayName); + deserializedHostAssetResource.setUuid(uuid); + deserializedHostAssetResource.setCreatedDate(createdDate); + deserializedHostAssetResource.setUpdatedDate(updatedDate); + deserializedHostAssetResource.setState(state); + deserializedHostAssetResource.setExternalId(externalId); + deserializedHostAssetResource.setLabels(labels); + deserializedHostAssetResource.setWildcard(wildcard); + deserializedHostAssetResource.setDiscoGroupName(discoGroupName); + deserializedHostAssetResource.setAuditTrail(auditTrail); + deserializedHostAssetResource.setReason(reason); + deserializedHostAssetResource.kind = kind; + return deserializedHostAssetResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostCore.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostCore.java new file mode 100644 index 000000000000..03118230af9c --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/HostCore.java @@ -0,0 +1,812 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The HostCore model. + */ +@Immutable +public final class HostCore implements JsonSerializable { + + /* + * The host property. + */ + @Generated + private String host; + + /* + * The domain property. + */ + @Generated + private String domain; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The blacklistCauseFirstSeen property. + */ + @Generated + private OffsetDateTime blacklistCauseFirstSeen; + + /* + * The blacklistCauseLastSeen property. + */ + @Generated + private OffsetDateTime blacklistCauseLastSeen; + + /* + * The blacklistCauseCount property. + */ + @Generated + private Long blacklistCauseCount; + + /* + * The blacklistResourceFirstSeen property. + */ + @Generated + private OffsetDateTime blacklistResourceFirstSeen; + + /* + * The blacklistResourceLastSeen property. + */ + @Generated + private OffsetDateTime blacklistResourceLastSeen; + + /* + * The blacklistResourceCount property. + */ + @Generated + private Long blacklistResourceCount; + + /* + * The blacklistSequenceFirstSeen property. + */ + @Generated + private OffsetDateTime blacklistSequenceFirstSeen; + + /* + * The blacklistSequenceLastSeen property. + */ + @Generated + private OffsetDateTime blacklistSequenceLastSeen; + + /* + * The blacklistSequenceCount property. + */ + @Generated + private Long blacklistSequenceCount; + + /* + * The phishCauseCount property. + */ + @Generated + private Long phishCauseCount; + + /* + * The malwareCauseCount property. + */ + @Generated + private Long malwareCauseCount; + + /* + * The spamCauseCount property. + */ + @Generated + private Long spamCauseCount; + + /* + * The scamCauseCount property. + */ + @Generated + private Long scamCauseCount; + + /* + * The phishResourceCount property. + */ + @Generated + private Long phishResourceCount; + + /* + * The malwareResourceCount property. + */ + @Generated + private Long malwareResourceCount; + + /* + * The spamResourceCount property. + */ + @Generated + private Long spamResourceCount; + + /* + * The scamResourceCount property. + */ + @Generated + private Long scamResourceCount; + + /* + * The phishSequenceCount property. + */ + @Generated + private Long phishSequenceCount; + + /* + * The malwareSequenceCount property. + */ + @Generated + private Long malwareSequenceCount; + + /* + * The spamSequenceCount property. + */ + @Generated + private Long spamSequenceCount; + + /* + * The scamSequenceCount property. + */ + @Generated + private Long scamSequenceCount; + + /* + * The alexaRank property. + */ + @Generated + private Integer alexaRank; + + /* + * The hostReputationScore property. + */ + @Generated + private Integer hostReputationScore; + + /* + * The hostPhishReputationScore property. + */ + @Generated + private Integer hostPhishReputationScore; + + /* + * The hostMalwareReputationScore property. + */ + @Generated + private Integer hostMalwareReputationScore; + + /* + * The hostSpamReputationScore property. + */ + @Generated + private Integer hostSpamReputationScore; + + /* + * The hostScamReputationScore property. + */ + @Generated + private Integer hostScamReputationScore; + + /* + * The domainReputationScore property. + */ + @Generated + private Integer domainReputationScore; + + /* + * The domainPhishReputationScore property. + */ + @Generated + private Integer domainPhishReputationScore; + + /* + * The domainMalwareReputationScore property. + */ + @Generated + private Integer domainMalwareReputationScore; + + /* + * The domainSpamReputationScore property. + */ + @Generated + private Integer domainSpamReputationScore; + + /* + * The domainScamReputationScore property. + */ + @Generated + private Integer domainScamReputationScore; + + /* + * The uuid property. + */ + @Generated + private String uuid; + + /** + * Creates an instance of HostCore class. + */ + @Generated + private HostCore() { + } + + /** + * Get the host property: The host property. + * + * @return the host value. + */ + @Generated + public String getHost() { + return this.host; + } + + /** + * Get the domain property: The domain property. + * + * @return the domain value. + */ + @Generated + public String getDomain() { + return this.domain; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the blacklistCauseFirstSeen property: The blacklistCauseFirstSeen property. + * + * @return the blacklistCauseFirstSeen value. + */ + @Generated + public OffsetDateTime getBlacklistCauseFirstSeen() { + return this.blacklistCauseFirstSeen; + } + + /** + * Get the blacklistCauseLastSeen property: The blacklistCauseLastSeen property. + * + * @return the blacklistCauseLastSeen value. + */ + @Generated + public OffsetDateTime getBlacklistCauseLastSeen() { + return this.blacklistCauseLastSeen; + } + + /** + * Get the blacklistCauseCount property: The blacklistCauseCount property. + * + * @return the blacklistCauseCount value. + */ + @Generated + public Long getBlacklistCauseCount() { + return this.blacklistCauseCount; + } + + /** + * Get the blacklistResourceFirstSeen property: The blacklistResourceFirstSeen property. + * + * @return the blacklistResourceFirstSeen value. + */ + @Generated + public OffsetDateTime getBlacklistResourceFirstSeen() { + return this.blacklistResourceFirstSeen; + } + + /** + * Get the blacklistResourceLastSeen property: The blacklistResourceLastSeen property. + * + * @return the blacklistResourceLastSeen value. + */ + @Generated + public OffsetDateTime getBlacklistResourceLastSeen() { + return this.blacklistResourceLastSeen; + } + + /** + * Get the blacklistResourceCount property: The blacklistResourceCount property. + * + * @return the blacklistResourceCount value. + */ + @Generated + public Long getBlacklistResourceCount() { + return this.blacklistResourceCount; + } + + /** + * Get the blacklistSequenceFirstSeen property: The blacklistSequenceFirstSeen property. + * + * @return the blacklistSequenceFirstSeen value. + */ + @Generated + public OffsetDateTime getBlacklistSequenceFirstSeen() { + return this.blacklistSequenceFirstSeen; + } + + /** + * Get the blacklistSequenceLastSeen property: The blacklistSequenceLastSeen property. + * + * @return the blacklistSequenceLastSeen value. + */ + @Generated + public OffsetDateTime getBlacklistSequenceLastSeen() { + return this.blacklistSequenceLastSeen; + } + + /** + * Get the blacklistSequenceCount property: The blacklistSequenceCount property. + * + * @return the blacklistSequenceCount value. + */ + @Generated + public Long getBlacklistSequenceCount() { + return this.blacklistSequenceCount; + } + + /** + * Get the phishCauseCount property: The phishCauseCount property. + * + * @return the phishCauseCount value. + */ + @Generated + public Long getPhishCauseCount() { + return this.phishCauseCount; + } + + /** + * Get the malwareCauseCount property: The malwareCauseCount property. + * + * @return the malwareCauseCount value. + */ + @Generated + public Long getMalwareCauseCount() { + return this.malwareCauseCount; + } + + /** + * Get the spamCauseCount property: The spamCauseCount property. + * + * @return the spamCauseCount value. + */ + @Generated + public Long getSpamCauseCount() { + return this.spamCauseCount; + } + + /** + * Get the scamCauseCount property: The scamCauseCount property. + * + * @return the scamCauseCount value. + */ + @Generated + public Long getScamCauseCount() { + return this.scamCauseCount; + } + + /** + * Get the phishResourceCount property: The phishResourceCount property. + * + * @return the phishResourceCount value. + */ + @Generated + public Long getPhishResourceCount() { + return this.phishResourceCount; + } + + /** + * Get the malwareResourceCount property: The malwareResourceCount property. + * + * @return the malwareResourceCount value. + */ + @Generated + public Long getMalwareResourceCount() { + return this.malwareResourceCount; + } + + /** + * Get the spamResourceCount property: The spamResourceCount property. + * + * @return the spamResourceCount value. + */ + @Generated + public Long getSpamResourceCount() { + return this.spamResourceCount; + } + + /** + * Get the scamResourceCount property: The scamResourceCount property. + * + * @return the scamResourceCount value. + */ + @Generated + public Long getScamResourceCount() { + return this.scamResourceCount; + } + + /** + * Get the phishSequenceCount property: The phishSequenceCount property. + * + * @return the phishSequenceCount value. + */ + @Generated + public Long getPhishSequenceCount() { + return this.phishSequenceCount; + } + + /** + * Get the malwareSequenceCount property: The malwareSequenceCount property. + * + * @return the malwareSequenceCount value. + */ + @Generated + public Long getMalwareSequenceCount() { + return this.malwareSequenceCount; + } + + /** + * Get the spamSequenceCount property: The spamSequenceCount property. + * + * @return the spamSequenceCount value. + */ + @Generated + public Long getSpamSequenceCount() { + return this.spamSequenceCount; + } + + /** + * Get the scamSequenceCount property: The scamSequenceCount property. + * + * @return the scamSequenceCount value. + */ + @Generated + public Long getScamSequenceCount() { + return this.scamSequenceCount; + } + + /** + * Get the alexaRank property: The alexaRank property. + * + * @return the alexaRank value. + */ + @Generated + public Integer getAlexaRank() { + return this.alexaRank; + } + + /** + * Get the hostReputationScore property: The hostReputationScore property. + * + * @return the hostReputationScore value. + */ + @Generated + public Integer getHostReputationScore() { + return this.hostReputationScore; + } + + /** + * Get the hostPhishReputationScore property: The hostPhishReputationScore property. + * + * @return the hostPhishReputationScore value. + */ + @Generated + public Integer getHostPhishReputationScore() { + return this.hostPhishReputationScore; + } + + /** + * Get the hostMalwareReputationScore property: The hostMalwareReputationScore property. + * + * @return the hostMalwareReputationScore value. + */ + @Generated + public Integer getHostMalwareReputationScore() { + return this.hostMalwareReputationScore; + } + + /** + * Get the hostSpamReputationScore property: The hostSpamReputationScore property. + * + * @return the hostSpamReputationScore value. + */ + @Generated + public Integer getHostSpamReputationScore() { + return this.hostSpamReputationScore; + } + + /** + * Get the hostScamReputationScore property: The hostScamReputationScore property. + * + * @return the hostScamReputationScore value. + */ + @Generated + public Integer getHostScamReputationScore() { + return this.hostScamReputationScore; + } + + /** + * Get the domainReputationScore property: The domainReputationScore property. + * + * @return the domainReputationScore value. + */ + @Generated + public Integer getDomainReputationScore() { + return this.domainReputationScore; + } + + /** + * Get the domainPhishReputationScore property: The domainPhishReputationScore property. + * + * @return the domainPhishReputationScore value. + */ + @Generated + public Integer getDomainPhishReputationScore() { + return this.domainPhishReputationScore; + } + + /** + * Get the domainMalwareReputationScore property: The domainMalwareReputationScore property. + * + * @return the domainMalwareReputationScore value. + */ + @Generated + public Integer getDomainMalwareReputationScore() { + return this.domainMalwareReputationScore; + } + + /** + * Get the domainSpamReputationScore property: The domainSpamReputationScore property. + * + * @return the domainSpamReputationScore value. + */ + @Generated + public Integer getDomainSpamReputationScore() { + return this.domainSpamReputationScore; + } + + /** + * Get the domainScamReputationScore property: The domainScamReputationScore property. + * + * @return the domainScamReputationScore value. + */ + @Generated + public Integer getDomainScamReputationScore() { + return this.domainScamReputationScore; + } + + /** + * Get the uuid property: The uuid property. + * + * @return the uuid value. + */ + @Generated + public String getUuid() { + return this.uuid; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("host", this.host); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("blacklistCauseFirstSeen", + this.blacklistCauseFirstSeen == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.blacklistCauseFirstSeen)); + jsonWriter.writeStringField("blacklistCauseLastSeen", + this.blacklistCauseLastSeen == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.blacklistCauseLastSeen)); + jsonWriter.writeNumberField("blacklistCauseCount", this.blacklistCauseCount); + jsonWriter.writeStringField("blacklistResourceFirstSeen", + this.blacklistResourceFirstSeen == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.blacklistResourceFirstSeen)); + jsonWriter.writeStringField("blacklistResourceLastSeen", + this.blacklistResourceLastSeen == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.blacklistResourceLastSeen)); + jsonWriter.writeNumberField("blacklistResourceCount", this.blacklistResourceCount); + jsonWriter.writeStringField("blacklistSequenceFirstSeen", + this.blacklistSequenceFirstSeen == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.blacklistSequenceFirstSeen)); + jsonWriter.writeStringField("blacklistSequenceLastSeen", + this.blacklistSequenceLastSeen == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.blacklistSequenceLastSeen)); + jsonWriter.writeNumberField("blacklistSequenceCount", this.blacklistSequenceCount); + jsonWriter.writeNumberField("phishCauseCount", this.phishCauseCount); + jsonWriter.writeNumberField("malwareCauseCount", this.malwareCauseCount); + jsonWriter.writeNumberField("spamCauseCount", this.spamCauseCount); + jsonWriter.writeNumberField("scamCauseCount", this.scamCauseCount); + jsonWriter.writeNumberField("phishResourceCount", this.phishResourceCount); + jsonWriter.writeNumberField("malwareResourceCount", this.malwareResourceCount); + jsonWriter.writeNumberField("spamResourceCount", this.spamResourceCount); + jsonWriter.writeNumberField("scamResourceCount", this.scamResourceCount); + jsonWriter.writeNumberField("phishSequenceCount", this.phishSequenceCount); + jsonWriter.writeNumberField("malwareSequenceCount", this.malwareSequenceCount); + jsonWriter.writeNumberField("spamSequenceCount", this.spamSequenceCount); + jsonWriter.writeNumberField("scamSequenceCount", this.scamSequenceCount); + jsonWriter.writeNumberField("alexaRank", this.alexaRank); + jsonWriter.writeNumberField("hostReputationScore", this.hostReputationScore); + jsonWriter.writeNumberField("hostPhishReputationScore", this.hostPhishReputationScore); + jsonWriter.writeNumberField("hostMalwareReputationScore", this.hostMalwareReputationScore); + jsonWriter.writeNumberField("hostSpamReputationScore", this.hostSpamReputationScore); + jsonWriter.writeNumberField("hostScamReputationScore", this.hostScamReputationScore); + jsonWriter.writeNumberField("domainReputationScore", this.domainReputationScore); + jsonWriter.writeNumberField("domainPhishReputationScore", this.domainPhishReputationScore); + jsonWriter.writeNumberField("domainMalwareReputationScore", this.domainMalwareReputationScore); + jsonWriter.writeNumberField("domainSpamReputationScore", this.domainSpamReputationScore); + jsonWriter.writeNumberField("domainScamReputationScore", this.domainScamReputationScore); + jsonWriter.writeStringField("uuid", this.uuid); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HostCore from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HostCore if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the HostCore. + */ + @Generated + public static HostCore fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HostCore deserializedHostCore = new HostCore(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("host".equals(fieldName)) { + deserializedHostCore.host = reader.getString(); + } else if ("domain".equals(fieldName)) { + deserializedHostCore.domain = reader.getString(); + } else if ("firstSeen".equals(fieldName)) { + deserializedHostCore.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedHostCore.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedHostCore.count = reader.getNullable(JsonReader::getLong); + } else if ("blacklistCauseFirstSeen".equals(fieldName)) { + deserializedHostCore.blacklistCauseFirstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("blacklistCauseLastSeen".equals(fieldName)) { + deserializedHostCore.blacklistCauseLastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("blacklistCauseCount".equals(fieldName)) { + deserializedHostCore.blacklistCauseCount = reader.getNullable(JsonReader::getLong); + } else if ("blacklistResourceFirstSeen".equals(fieldName)) { + deserializedHostCore.blacklistResourceFirstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("blacklistResourceLastSeen".equals(fieldName)) { + deserializedHostCore.blacklistResourceLastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("blacklistResourceCount".equals(fieldName)) { + deserializedHostCore.blacklistResourceCount = reader.getNullable(JsonReader::getLong); + } else if ("blacklistSequenceFirstSeen".equals(fieldName)) { + deserializedHostCore.blacklistSequenceFirstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("blacklistSequenceLastSeen".equals(fieldName)) { + deserializedHostCore.blacklistSequenceLastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("blacklistSequenceCount".equals(fieldName)) { + deserializedHostCore.blacklistSequenceCount = reader.getNullable(JsonReader::getLong); + } else if ("phishCauseCount".equals(fieldName)) { + deserializedHostCore.phishCauseCount = reader.getNullable(JsonReader::getLong); + } else if ("malwareCauseCount".equals(fieldName)) { + deserializedHostCore.malwareCauseCount = reader.getNullable(JsonReader::getLong); + } else if ("spamCauseCount".equals(fieldName)) { + deserializedHostCore.spamCauseCount = reader.getNullable(JsonReader::getLong); + } else if ("scamCauseCount".equals(fieldName)) { + deserializedHostCore.scamCauseCount = reader.getNullable(JsonReader::getLong); + } else if ("phishResourceCount".equals(fieldName)) { + deserializedHostCore.phishResourceCount = reader.getNullable(JsonReader::getLong); + } else if ("malwareResourceCount".equals(fieldName)) { + deserializedHostCore.malwareResourceCount = reader.getNullable(JsonReader::getLong); + } else if ("spamResourceCount".equals(fieldName)) { + deserializedHostCore.spamResourceCount = reader.getNullable(JsonReader::getLong); + } else if ("scamResourceCount".equals(fieldName)) { + deserializedHostCore.scamResourceCount = reader.getNullable(JsonReader::getLong); + } else if ("phishSequenceCount".equals(fieldName)) { + deserializedHostCore.phishSequenceCount = reader.getNullable(JsonReader::getLong); + } else if ("malwareSequenceCount".equals(fieldName)) { + deserializedHostCore.malwareSequenceCount = reader.getNullable(JsonReader::getLong); + } else if ("spamSequenceCount".equals(fieldName)) { + deserializedHostCore.spamSequenceCount = reader.getNullable(JsonReader::getLong); + } else if ("scamSequenceCount".equals(fieldName)) { + deserializedHostCore.scamSequenceCount = reader.getNullable(JsonReader::getLong); + } else if ("alexaRank".equals(fieldName)) { + deserializedHostCore.alexaRank = reader.getNullable(JsonReader::getInt); + } else if ("hostReputationScore".equals(fieldName)) { + deserializedHostCore.hostReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("hostPhishReputationScore".equals(fieldName)) { + deserializedHostCore.hostPhishReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("hostMalwareReputationScore".equals(fieldName)) { + deserializedHostCore.hostMalwareReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("hostSpamReputationScore".equals(fieldName)) { + deserializedHostCore.hostSpamReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("hostScamReputationScore".equals(fieldName)) { + deserializedHostCore.hostScamReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("domainReputationScore".equals(fieldName)) { + deserializedHostCore.domainReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("domainPhishReputationScore".equals(fieldName)) { + deserializedHostCore.domainPhishReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("domainMalwareReputationScore".equals(fieldName)) { + deserializedHostCore.domainMalwareReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("domainSpamReputationScore".equals(fieldName)) { + deserializedHostCore.domainSpamReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("domainScamReputationScore".equals(fieldName)) { + deserializedHostCore.domainScamReputationScore = reader.getNullable(JsonReader::getInt); + } else if ("uuid".equals(fieldName)) { + deserializedHostCore.uuid = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedHostCore; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/InnerError.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/InnerError.java new file mode 100644 index 000000000000..6371ae676950 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/InnerError.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * This is an object containing more specific information than the current object about the error. + */ +@Immutable +public final class InnerError implements JsonSerializable { + + /* + * This is a more specific error code than was provided by the containing error. + */ + @Generated + private String code; + + /* + * This is an additional field representing the value that caused the error to help with debugging. + */ + @Generated + private BinaryData value; + + /** + * Creates an instance of InnerError class. + */ + @Generated + private InnerError() { + } + + /** + * Get the code property: This is a more specific error code than was provided by the containing error. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Get the value property: This is an additional field representing the value that caused the error to help with + * debugging. + * + * @return the value value. + */ + @Generated + public BinaryData getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("code", this.code); + if (this.value != null) { + jsonWriter.writeFieldName("value"); + this.value.writeTo(jsonWriter); + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InnerError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InnerError if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the InnerError. + */ + @Generated + public static InnerError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InnerError deserializedInnerError = new InnerError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("code".equals(fieldName)) { + deserializedInnerError.code = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedInnerError.value + = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else { + reader.skipChildren(); + } + } + return deserializedInnerError; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/InventoryAsset.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/InventoryAsset.java new file mode 100644 index 000000000000..74688305fab1 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/InventoryAsset.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A inventory base model created for swagger documentation purpose. + */ +@Immutable +public class InventoryAsset implements JsonSerializable { + + /** + * Creates an instance of InventoryAsset class. + */ + @Generated + protected InventoryAsset() { + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InventoryAsset from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InventoryAsset if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the InventoryAsset. + */ + @Generated + public static InventoryAsset fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InventoryAsset deserializedInventoryAsset = new InventoryAsset(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + reader.skipChildren(); + } + return deserializedInventoryAsset; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpAddressAsset.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpAddressAsset.java new file mode 100644 index 000000000000..bc849e690111 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpAddressAsset.java @@ -0,0 +1,562 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The IpAddressAsset model. + */ +@Immutable +public final class IpAddressAsset extends InventoryAsset { + + /* + * The ipAddress property. + */ + @Generated + private String ipAddress; + + /* + * The asns property. + */ + @Generated + private List asns; + + /* + * The reputations property. + */ + @Generated + private List reputations; + + /* + * The webComponents property. + */ + @Generated + private List webComponents; + + /* + * The netRanges property. + */ + @Generated + private List netRanges; + + /* + * The headers property. + */ + @Generated + private List headers; + + /* + * The attributes property. + */ + @Generated + private List attributes; + + /* + * The cookies property. + */ + @Generated + private List cookies; + + /* + * The sslCerts property. + */ + @Generated + private List sslCerts; + + /* + * The services property. + */ + @Generated + private List services; + + /* + * The ipBlocks property. + */ + @Generated + private List ipBlocks; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The banners property. + */ + @Generated + private List banners; + + /* + * The scanMetadata property. + */ + @Generated + private List scanMetadata; + + /* + * The nsRecord property. + */ + @Generated + private List nsRecord; + + /* + * The mxRecord property. + */ + @Generated + private List mxRecord; + + /* + * The location property. + */ + @Generated + private List location; + + /* + * The hosts property. + */ + @Generated + private List hosts; + + /* + * The nxdomain property. + */ + @Generated + private List nxdomain; + + /* + * The sslServerConfig property. + */ + @Generated + private List sslServerConfig; + + /* + * The ipv4 property. + */ + @Generated + private Boolean ipv4; + + /* + * The ipv6 property. + */ + @Generated + private Boolean ipv6; + + /** + * Creates an instance of IpAddressAsset class. + */ + @Generated + private IpAddressAsset() { + } + + /** + * Get the ipAddress property: The ipAddress property. + * + * @return the ipAddress value. + */ + @Generated + public String getIpAddress() { + return this.ipAddress; + } + + /** + * Get the asns property: The asns property. + * + * @return the asns value. + */ + @Generated + public List getAsns() { + return this.asns; + } + + /** + * Get the reputations property: The reputations property. + * + * @return the reputations value. + */ + @Generated + public List getReputations() { + return this.reputations; + } + + /** + * Get the webComponents property: The webComponents property. + * + * @return the webComponents value. + */ + @Generated + public List getWebComponents() { + return this.webComponents; + } + + /** + * Get the netRanges property: The netRanges property. + * + * @return the netRanges value. + */ + @Generated + public List getNetRanges() { + return this.netRanges; + } + + /** + * Get the headers property: The headers property. + * + * @return the headers value. + */ + @Generated + public List getHeaders() { + return this.headers; + } + + /** + * Get the attributes property: The attributes property. + * + * @return the attributes value. + */ + @Generated + public List getAttributes() { + return this.attributes; + } + + /** + * Get the cookies property: The cookies property. + * + * @return the cookies value. + */ + @Generated + public List getCookies() { + return this.cookies; + } + + /** + * Get the sslCerts property: The sslCerts property. + * + * @return the sslCerts value. + */ + @Generated + public List getSslCerts() { + return this.sslCerts; + } + + /** + * Get the services property: The services property. + * + * @return the services value. + */ + @Generated + public List getServices() { + return this.services; + } + + /** + * Get the ipBlocks property: The ipBlocks property. + * + * @return the ipBlocks value. + */ + @Generated + public List getIpBlocks() { + return this.ipBlocks; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the banners property: The banners property. + * + * @return the banners value. + */ + @Generated + public List getBanners() { + return this.banners; + } + + /** + * Get the scanMetadata property: The scanMetadata property. + * + * @return the scanMetadata value. + */ + @Generated + public List getScanMetadata() { + return this.scanMetadata; + } + + /** + * Get the nsRecord property: The nsRecord property. + * + * @return the nsRecord value. + */ + @Generated + public List getNsRecord() { + return this.nsRecord; + } + + /** + * Get the mxRecord property: The mxRecord property. + * + * @return the mxRecord value. + */ + @Generated + public List getMxRecord() { + return this.mxRecord; + } + + /** + * Get the location property: The location property. + * + * @return the location value. + */ + @Generated + public List getLocation() { + return this.location; + } + + /** + * Get the hosts property: The hosts property. + * + * @return the hosts value. + */ + @Generated + public List getHosts() { + return this.hosts; + } + + /** + * Get the nxdomain property: The nxdomain property. + * + * @return the nxdomain value. + */ + @Generated + public List getNxdomain() { + return this.nxdomain; + } + + /** + * Get the sslServerConfig property: The sslServerConfig property. + * + * @return the sslServerConfig value. + */ + @Generated + public List getSslServerConfig() { + return this.sslServerConfig; + } + + /** + * Get the ipv4 property: The ipv4 property. + * + * @return the ipv4 value. + */ + @Generated + public Boolean isIpv4() { + return this.ipv4; + } + + /** + * Get the ipv6 property: The ipv6 property. + * + * @return the ipv6 value. + */ + @Generated + public Boolean isIpv6() { + return this.ipv6; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipAddress", this.ipAddress); + jsonWriter.writeArrayField("asns", this.asns, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("reputations", this.reputations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("webComponents", this.webComponents, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("netRanges", this.netRanges, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("attributes", this.attributes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("cookies", this.cookies, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sslCerts", this.sslCerts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("services", this.services, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipBlocks", this.ipBlocks, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeArrayField("banners", this.banners, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("scanMetadata", this.scanMetadata, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("nsRecord", this.nsRecord, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("mxRecord", this.mxRecord, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("location", this.location, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("hosts", this.hosts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("nxdomain", this.nxdomain, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sslServerConfig", this.sslServerConfig, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("ipv4", this.ipv4); + jsonWriter.writeBooleanField("ipv6", this.ipv6); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpAddressAsset from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpAddressAsset if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the IpAddressAsset. + */ + @Generated + public static IpAddressAsset fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpAddressAsset deserializedIpAddressAsset = new IpAddressAsset(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("ipAddress".equals(fieldName)) { + deserializedIpAddressAsset.ipAddress = reader.getString(); + } else if ("asns".equals(fieldName)) { + List asns = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedIpAddressAsset.asns = asns; + } else if ("reputations".equals(fieldName)) { + List reputations = reader.readArray(reader1 -> Reputation.fromJson(reader1)); + deserializedIpAddressAsset.reputations = reputations; + } else if ("webComponents".equals(fieldName)) { + List webComponents = reader.readArray(reader1 -> WebComponent.fromJson(reader1)); + deserializedIpAddressAsset.webComponents = webComponents; + } else if ("netRanges".equals(fieldName)) { + List netRanges = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpAddressAsset.netRanges = netRanges; + } else if ("headers".equals(fieldName)) { + List headers = reader.readArray(reader1 -> ObservedHeader.fromJson(reader1)); + deserializedIpAddressAsset.headers = headers; + } else if ("attributes".equals(fieldName)) { + List attributes = reader.readArray(reader1 -> Attribute.fromJson(reader1)); + deserializedIpAddressAsset.attributes = attributes; + } else if ("cookies".equals(fieldName)) { + List cookies = reader.readArray(reader1 -> Cookie.fromJson(reader1)); + deserializedIpAddressAsset.cookies = cookies; + } else if ("sslCerts".equals(fieldName)) { + List sslCerts = reader.readArray(reader1 -> SslCertAsset.fromJson(reader1)); + deserializedIpAddressAsset.sslCerts = sslCerts; + } else if ("services".equals(fieldName)) { + List services = reader.readArray(reader1 -> Service.fromJson(reader1)); + deserializedIpAddressAsset.services = services; + } else if ("ipBlocks".equals(fieldName)) { + List ipBlocks = reader.readArray(reader1 -> IpBlock.fromJson(reader1)); + deserializedIpAddressAsset.ipBlocks = ipBlocks; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedIpAddressAsset.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedIpAddressAsset.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedIpAddressAsset.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedIpAddressAsset.count = reader.getNullable(JsonReader::getLong); + } else if ("banners".equals(fieldName)) { + List banners = reader.readArray(reader1 -> Banner.fromJson(reader1)); + deserializedIpAddressAsset.banners = banners; + } else if ("scanMetadata".equals(fieldName)) { + List scanMetadata = reader.readArray(reader1 -> ScanMetadata.fromJson(reader1)); + deserializedIpAddressAsset.scanMetadata = scanMetadata; + } else if ("nsRecord".equals(fieldName)) { + List nsRecord = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedIpAddressAsset.nsRecord = nsRecord; + } else if ("mxRecord".equals(fieldName)) { + List mxRecord = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedIpAddressAsset.mxRecord = mxRecord; + } else if ("location".equals(fieldName)) { + List location = reader.readArray(reader1 -> ObservedLocation.fromJson(reader1)); + deserializedIpAddressAsset.location = location; + } else if ("hosts".equals(fieldName)) { + List hosts = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpAddressAsset.hosts = hosts; + } else if ("nxdomain".equals(fieldName)) { + List nxdomain = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedIpAddressAsset.nxdomain = nxdomain; + } else if ("sslServerConfig".equals(fieldName)) { + List sslServerConfig + = reader.readArray(reader1 -> SslServerConfig.fromJson(reader1)); + deserializedIpAddressAsset.sslServerConfig = sslServerConfig; + } else if ("ipv4".equals(fieldName)) { + deserializedIpAddressAsset.ipv4 = reader.getNullable(JsonReader::getBoolean); + } else if ("ipv6".equals(fieldName)) { + deserializedIpAddressAsset.ipv6 = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedIpAddressAsset; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpAddressAssetResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpAddressAssetResource.java new file mode 100644 index 000000000000..81f194d844c9 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpAddressAssetResource.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The IpAddressAssetResource model. + */ +@Immutable +public final class IpAddressAssetResource extends AssetResource { + + /* + * Discriminator property for AssetResource. + */ + @Generated + private String kind = "ipAddress"; + + /* + * asset + */ + @Generated + private final IpAddressAsset asset; + + /** + * Creates an instance of IpAddressAssetResource class. + * + * @param asset the asset value to set. + */ + @Generated + private IpAddressAssetResource(IpAddressAsset asset) { + this.asset = asset; + } + + /** + * Get the kind property: Discriminator property for AssetResource. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the asset property: asset. + * + * @return the asset value. + */ + @Generated + public IpAddressAsset getAsset() { + return this.asset; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("uuid", getUuid()); + jsonWriter.writeStringField("createdDate", + getCreatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getCreatedDate())); + jsonWriter.writeStringField("updatedDate", + getUpdatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getUpdatedDate())); + jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); + jsonWriter.writeStringField("externalId", getExternalId()); + jsonWriter.writeArrayField("labels", getLabels(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("wildcard", isWildcard()); + jsonWriter.writeStringField("discoGroupName", getDiscoGroupName()); + jsonWriter.writeArrayField("auditTrail", getAuditTrail(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("reason", getReason()); + jsonWriter.writeJsonField("asset", this.asset); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpAddressAssetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpAddressAssetResource if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IpAddressAssetResource. + */ + @Generated + public static IpAddressAssetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + String name = null; + String displayName = null; + String uuid = null; + OffsetDateTime createdDate = null; + OffsetDateTime updatedDate = null; + AssetState state = null; + String externalId = null; + List labels = null; + Boolean wildcard = null; + String discoGroupName = null; + List auditTrail = null; + String reason = null; + IpAddressAsset asset = null; + String kind = "ipAddress"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("uuid".equals(fieldName)) { + uuid = reader.getString(); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + state = AssetState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + labels = reader.readArray(reader1 -> reader1.getString()); + } else if ("wildcard".equals(fieldName)) { + wildcard = reader.getNullable(JsonReader::getBoolean); + } else if ("discoGroupName".equals(fieldName)) { + discoGroupName = reader.getString(); + } else if ("auditTrail".equals(fieldName)) { + auditTrail = reader.readArray(reader1 -> AuditTrailItem.fromJson(reader1)); + } else if ("reason".equals(fieldName)) { + reason = reader.getString(); + } else if ("asset".equals(fieldName)) { + asset = IpAddressAsset.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + IpAddressAssetResource deserializedIpAddressAssetResource = new IpAddressAssetResource(asset); + deserializedIpAddressAssetResource.setId(id); + deserializedIpAddressAssetResource.setName(name); + deserializedIpAddressAssetResource.setDisplayName(displayName); + deserializedIpAddressAssetResource.setUuid(uuid); + deserializedIpAddressAssetResource.setCreatedDate(createdDate); + deserializedIpAddressAssetResource.setUpdatedDate(updatedDate); + deserializedIpAddressAssetResource.setState(state); + deserializedIpAddressAssetResource.setExternalId(externalId); + deserializedIpAddressAssetResource.setLabels(labels); + deserializedIpAddressAssetResource.setWildcard(wildcard); + deserializedIpAddressAssetResource.setDiscoGroupName(discoGroupName); + deserializedIpAddressAssetResource.setAuditTrail(auditTrail); + deserializedIpAddressAssetResource.setReason(reason); + deserializedIpAddressAssetResource.kind = kind; + return deserializedIpAddressAssetResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlock.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlock.java new file mode 100644 index 000000000000..38c5b927c729 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlock.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The IpBlock model. + */ +@Immutable +public final class IpBlock implements JsonSerializable { + + /* + * The ipBlock property. + */ + @Generated + private String ipBlock; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /** + * Creates an instance of IpBlock class. + */ + @Generated + private IpBlock() { + } + + /** + * Get the ipBlock property: The ipBlock property. + * + * @return the ipBlock value. + */ + @Generated + public String getIpBlock() { + return this.ipBlock; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipBlock", this.ipBlock); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("recent", this.recent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpBlock from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpBlock if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the IpBlock. + */ + @Generated + public static IpBlock fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpBlock deserializedIpBlock = new IpBlock(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("ipBlock".equals(fieldName)) { + deserializedIpBlock.ipBlock = reader.getString(); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedIpBlock.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedIpBlock.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedIpBlock.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedIpBlock.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedIpBlock.recent = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedIpBlock; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlockAsset.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlockAsset.java new file mode 100644 index 000000000000..cf02fa09db86 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlockAsset.java @@ -0,0 +1,696 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The IpBlockAsset model. + */ +@Immutable +public final class IpBlockAsset extends InventoryAsset { + + /* + * The ipBlock property. + */ + @Generated + private String ipBlock; + + /* + * The asns property. + */ + @Generated + private List asns; + + /* + * The bgpPrefixes property. + */ + @Generated + private List bgpPrefixes; + + /* + * The netNames property. + */ + @Generated + private List netNames; + + /* + * The registrantContacts property. + */ + @Generated + private List registrantContacts; + + /* + * The registrantOrgs property. + */ + @Generated + private List registrantOrgs; + + /* + * The adminContacts property. + */ + @Generated + private List adminContacts; + + /* + * The technicalContacts property. + */ + @Generated + private List technicalContacts; + + /* + * The registrarCreatedAt property. + */ + @Generated + private List registrarCreatedAt; + + /* + * The registrarUpdatedAt property. + */ + @Generated + private List registrarUpdatedAt; + + /* + * The netRanges property. + */ + @Generated + private List netRanges; + + /* + * The startIp property. + */ + @Generated + private String startIp; + + /* + * The endIp property. + */ + @Generated + private String endIp; + + /* + * The reputations property. + */ + @Generated + private List reputations; + + /* + * The detailedFromWhoisAt property. + */ + @Generated + private OffsetDateTime detailedFromWhoisAt; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The location property. + */ + @Generated + private List location; + + /* + * The registrarExpiresAt property. + */ + @Generated + private List registrarExpiresAt; + + /* + * The registrantNames property. + */ + @Generated + private List registrantNames; + + /* + * The adminNames property. + */ + @Generated + private List adminNames; + + /* + * The technicalNames property. + */ + @Generated + private List technicalNames; + + /* + * The adminOrgs property. + */ + @Generated + private List adminOrgs; + + /* + * The technicalOrgs property. + */ + @Generated + private List technicalOrgs; + + /* + * The registrantPhones property. + */ + @Generated + private List registrantPhones; + + /* + * The adminPhones property. + */ + @Generated + private List adminPhones; + + /* + * The technicalPhones property. + */ + @Generated + private List technicalPhones; + + /* + * The ipv4 property. + */ + @Generated + private Boolean ipv4; + + /* + * The ipv6 property. + */ + @Generated + private Boolean ipv6; + + /** + * Creates an instance of IpBlockAsset class. + */ + @Generated + private IpBlockAsset() { + } + + /** + * Get the ipBlock property: The ipBlock property. + * + * @return the ipBlock value. + */ + @Generated + public String getIpBlock() { + return this.ipBlock; + } + + /** + * Get the asns property: The asns property. + * + * @return the asns value. + */ + @Generated + public List getAsns() { + return this.asns; + } + + /** + * Get the bgpPrefixes property: The bgpPrefixes property. + * + * @return the bgpPrefixes value. + */ + @Generated + public List getBgpPrefixes() { + return this.bgpPrefixes; + } + + /** + * Get the netNames property: The netNames property. + * + * @return the netNames value. + */ + @Generated + public List getNetNames() { + return this.netNames; + } + + /** + * Get the registrantContacts property: The registrantContacts property. + * + * @return the registrantContacts value. + */ + @Generated + public List getRegistrantContacts() { + return this.registrantContacts; + } + + /** + * Get the registrantOrgs property: The registrantOrgs property. + * + * @return the registrantOrgs value. + */ + @Generated + public List getRegistrantOrgs() { + return this.registrantOrgs; + } + + /** + * Get the adminContacts property: The adminContacts property. + * + * @return the adminContacts value. + */ + @Generated + public List getAdminContacts() { + return this.adminContacts; + } + + /** + * Get the technicalContacts property: The technicalContacts property. + * + * @return the technicalContacts value. + */ + @Generated + public List getTechnicalContacts() { + return this.technicalContacts; + } + + /** + * Get the registrarCreatedAt property: The registrarCreatedAt property. + * + * @return the registrarCreatedAt value. + */ + @Generated + public List getRegistrarCreatedAt() { + return this.registrarCreatedAt; + } + + /** + * Get the registrarUpdatedAt property: The registrarUpdatedAt property. + * + * @return the registrarUpdatedAt value. + */ + @Generated + public List getRegistrarUpdatedAt() { + return this.registrarUpdatedAt; + } + + /** + * Get the netRanges property: The netRanges property. + * + * @return the netRanges value. + */ + @Generated + public List getNetRanges() { + return this.netRanges; + } + + /** + * Get the startIp property: The startIp property. + * + * @return the startIp value. + */ + @Generated + public String getStartIp() { + return this.startIp; + } + + /** + * Get the endIp property: The endIp property. + * + * @return the endIp value. + */ + @Generated + public String getEndIp() { + return this.endIp; + } + + /** + * Get the reputations property: The reputations property. + * + * @return the reputations value. + */ + @Generated + public List getReputations() { + return this.reputations; + } + + /** + * Get the detailedFromWhoisAt property: The detailedFromWhoisAt property. + * + * @return the detailedFromWhoisAt value. + */ + @Generated + public OffsetDateTime getDetailedFromWhoisAt() { + return this.detailedFromWhoisAt; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the location property: The location property. + * + * @return the location value. + */ + @Generated + public List getLocation() { + return this.location; + } + + /** + * Get the registrarExpiresAt property: The registrarExpiresAt property. + * + * @return the registrarExpiresAt value. + */ + @Generated + public List getRegistrarExpiresAt() { + return this.registrarExpiresAt; + } + + /** + * Get the registrantNames property: The registrantNames property. + * + * @return the registrantNames value. + */ + @Generated + public List getRegistrantNames() { + return this.registrantNames; + } + + /** + * Get the adminNames property: The adminNames property. + * + * @return the adminNames value. + */ + @Generated + public List getAdminNames() { + return this.adminNames; + } + + /** + * Get the technicalNames property: The technicalNames property. + * + * @return the technicalNames value. + */ + @Generated + public List getTechnicalNames() { + return this.technicalNames; + } + + /** + * Get the adminOrgs property: The adminOrgs property. + * + * @return the adminOrgs value. + */ + @Generated + public List getAdminOrgs() { + return this.adminOrgs; + } + + /** + * Get the technicalOrgs property: The technicalOrgs property. + * + * @return the technicalOrgs value. + */ + @Generated + public List getTechnicalOrgs() { + return this.technicalOrgs; + } + + /** + * Get the registrantPhones property: The registrantPhones property. + * + * @return the registrantPhones value. + */ + @Generated + public List getRegistrantPhones() { + return this.registrantPhones; + } + + /** + * Get the adminPhones property: The adminPhones property. + * + * @return the adminPhones value. + */ + @Generated + public List getAdminPhones() { + return this.adminPhones; + } + + /** + * Get the technicalPhones property: The technicalPhones property. + * + * @return the technicalPhones value. + */ + @Generated + public List getTechnicalPhones() { + return this.technicalPhones; + } + + /** + * Get the ipv4 property: The ipv4 property. + * + * @return the ipv4 value. + */ + @Generated + public Boolean isIpv4() { + return this.ipv4; + } + + /** + * Get the ipv6 property: The ipv6 property. + * + * @return the ipv6 value. + */ + @Generated + public Boolean isIpv6() { + return this.ipv6; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipBlock", this.ipBlock); + jsonWriter.writeArrayField("asns", this.asns, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("bgpPrefixes", this.bgpPrefixes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("netNames", this.netNames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantContacts", this.registrantContacts, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantOrgs", this.registrantOrgs, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminContacts", this.adminContacts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalContacts", this.technicalContacts, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrarCreatedAt", this.registrarCreatedAt, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrarUpdatedAt", this.registrarUpdatedAt, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("netRanges", this.netRanges, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("startIp", this.startIp); + jsonWriter.writeStringField("endIp", this.endIp); + jsonWriter.writeArrayField("reputations", this.reputations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("detailedFromWhoisAt", + this.detailedFromWhoisAt == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.detailedFromWhoisAt)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeArrayField("location", this.location, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrarExpiresAt", this.registrarExpiresAt, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantNames", this.registrantNames, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminNames", this.adminNames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalNames", this.technicalNames, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminOrgs", this.adminOrgs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalOrgs", this.technicalOrgs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registrantPhones", this.registrantPhones, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("adminPhones", this.adminPhones, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("technicalPhones", this.technicalPhones, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("ipv4", this.ipv4); + jsonWriter.writeBooleanField("ipv6", this.ipv6); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpBlockAsset from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpBlockAsset if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the IpBlockAsset. + */ + @Generated + public static IpBlockAsset fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpBlockAsset deserializedIpBlockAsset = new IpBlockAsset(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("ipBlock".equals(fieldName)) { + deserializedIpBlockAsset.ipBlock = reader.getString(); + } else if ("asns".equals(fieldName)) { + List asns = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedIpBlockAsset.asns = asns; + } else if ("bgpPrefixes".equals(fieldName)) { + List bgpPrefixes = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.bgpPrefixes = bgpPrefixes; + } else if ("netNames".equals(fieldName)) { + List netNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.netNames = netNames; + } else if ("registrantContacts".equals(fieldName)) { + List registrantContacts + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.registrantContacts = registrantContacts; + } else if ("registrantOrgs".equals(fieldName)) { + List registrantOrgs = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.registrantOrgs = registrantOrgs; + } else if ("adminContacts".equals(fieldName)) { + List adminContacts = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.adminContacts = adminContacts; + } else if ("technicalContacts".equals(fieldName)) { + List technicalContacts + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.technicalContacts = technicalContacts; + } else if ("registrarCreatedAt".equals(fieldName)) { + List registrarCreatedAt = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedIpBlockAsset.registrarCreatedAt = registrarCreatedAt; + } else if ("registrarUpdatedAt".equals(fieldName)) { + List registrarUpdatedAt = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedIpBlockAsset.registrarUpdatedAt = registrarUpdatedAt; + } else if ("netRanges".equals(fieldName)) { + List netRanges = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.netRanges = netRanges; + } else if ("startIp".equals(fieldName)) { + deserializedIpBlockAsset.startIp = reader.getString(); + } else if ("endIp".equals(fieldName)) { + deserializedIpBlockAsset.endIp = reader.getString(); + } else if ("reputations".equals(fieldName)) { + List reputations = reader.readArray(reader1 -> Reputation.fromJson(reader1)); + deserializedIpBlockAsset.reputations = reputations; + } else if ("detailedFromWhoisAt".equals(fieldName)) { + deserializedIpBlockAsset.detailedFromWhoisAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedIpBlockAsset.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedIpBlockAsset.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedIpBlockAsset.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedIpBlockAsset.count = reader.getNullable(JsonReader::getLong); + } else if ("location".equals(fieldName)) { + List location = reader.readArray(reader1 -> ObservedLocation.fromJson(reader1)); + deserializedIpBlockAsset.location = location; + } else if ("registrarExpiresAt".equals(fieldName)) { + List registrarExpiresAt = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedIpBlockAsset.registrarExpiresAt = registrarExpiresAt; + } else if ("registrantNames".equals(fieldName)) { + List registrantNames + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.registrantNames = registrantNames; + } else if ("adminNames".equals(fieldName)) { + List adminNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.adminNames = adminNames; + } else if ("technicalNames".equals(fieldName)) { + List technicalNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.technicalNames = technicalNames; + } else if ("adminOrgs".equals(fieldName)) { + List adminOrgs = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.adminOrgs = adminOrgs; + } else if ("technicalOrgs".equals(fieldName)) { + List technicalOrgs = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.technicalOrgs = technicalOrgs; + } else if ("registrantPhones".equals(fieldName)) { + List registrantPhones + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.registrantPhones = registrantPhones; + } else if ("adminPhones".equals(fieldName)) { + List adminPhones = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.adminPhones = adminPhones; + } else if ("technicalPhones".equals(fieldName)) { + List technicalPhones + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedIpBlockAsset.technicalPhones = technicalPhones; + } else if ("ipv4".equals(fieldName)) { + deserializedIpBlockAsset.ipv4 = reader.getNullable(JsonReader::getBoolean); + } else if ("ipv6".equals(fieldName)) { + deserializedIpBlockAsset.ipv6 = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedIpBlockAsset; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlockAssetResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlockAssetResource.java new file mode 100644 index 000000000000..20e4d99eb687 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/IpBlockAssetResource.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The IpBlockAssetResource model. + */ +@Immutable +public final class IpBlockAssetResource extends AssetResource { + + /* + * Discriminator property for AssetResource. + */ + @Generated + private String kind = "ipBlock"; + + /* + * asset + */ + @Generated + private final IpBlockAsset asset; + + /** + * Creates an instance of IpBlockAssetResource class. + * + * @param asset the asset value to set. + */ + @Generated + private IpBlockAssetResource(IpBlockAsset asset) { + this.asset = asset; + } + + /** + * Get the kind property: Discriminator property for AssetResource. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the asset property: asset. + * + * @return the asset value. + */ + @Generated + public IpBlockAsset getAsset() { + return this.asset; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("uuid", getUuid()); + jsonWriter.writeStringField("createdDate", + getCreatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getCreatedDate())); + jsonWriter.writeStringField("updatedDate", + getUpdatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getUpdatedDate())); + jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); + jsonWriter.writeStringField("externalId", getExternalId()); + jsonWriter.writeArrayField("labels", getLabels(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("wildcard", isWildcard()); + jsonWriter.writeStringField("discoGroupName", getDiscoGroupName()); + jsonWriter.writeArrayField("auditTrail", getAuditTrail(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("reason", getReason()); + jsonWriter.writeJsonField("asset", this.asset); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpBlockAssetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpBlockAssetResource if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IpBlockAssetResource. + */ + @Generated + public static IpBlockAssetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + String name = null; + String displayName = null; + String uuid = null; + OffsetDateTime createdDate = null; + OffsetDateTime updatedDate = null; + AssetState state = null; + String externalId = null; + List labels = null; + Boolean wildcard = null; + String discoGroupName = null; + List auditTrail = null; + String reason = null; + IpBlockAsset asset = null; + String kind = "ipBlock"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("uuid".equals(fieldName)) { + uuid = reader.getString(); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + state = AssetState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + labels = reader.readArray(reader1 -> reader1.getString()); + } else if ("wildcard".equals(fieldName)) { + wildcard = reader.getNullable(JsonReader::getBoolean); + } else if ("discoGroupName".equals(fieldName)) { + discoGroupName = reader.getString(); + } else if ("auditTrail".equals(fieldName)) { + auditTrail = reader.readArray(reader1 -> AuditTrailItem.fromJson(reader1)); + } else if ("reason".equals(fieldName)) { + reason = reader.getString(); + } else if ("asset".equals(fieldName)) { + asset = IpBlockAsset.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + IpBlockAssetResource deserializedIpBlockAssetResource = new IpBlockAssetResource(asset); + deserializedIpBlockAssetResource.setId(id); + deserializedIpBlockAssetResource.setName(name); + deserializedIpBlockAssetResource.setDisplayName(displayName); + deserializedIpBlockAssetResource.setUuid(uuid); + deserializedIpBlockAssetResource.setCreatedDate(createdDate); + deserializedIpBlockAssetResource.setUpdatedDate(updatedDate); + deserializedIpBlockAssetResource.setState(state); + deserializedIpBlockAssetResource.setExternalId(externalId); + deserializedIpBlockAssetResource.setLabels(labels); + deserializedIpBlockAssetResource.setWildcard(wildcard); + deserializedIpBlockAssetResource.setDiscoGroupName(discoGroupName); + deserializedIpBlockAssetResource.setAuditTrail(auditTrail); + deserializedIpBlockAssetResource.setReason(reason); + deserializedIpBlockAssetResource.kind = kind; + return deserializedIpBlockAssetResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Location.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Location.java new file mode 100644 index 000000000000..299a820643e6 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Location.java @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Location model. + */ +@Immutable +public final class Location implements JsonSerializable { + + /* + * The countryCode property. + */ + @Generated + private String countryCode; + + /* + * The countryName property. + */ + @Generated + private String countryName; + + /* + * The region property. + */ + @Generated + private String region; + + /* + * The regionName property. + */ + @Generated + private String regionName; + + /* + * The city property. + */ + @Generated + private String city; + + /* + * The areaCode property. + */ + @Generated + private Integer areaCode; + + /* + * The postalCode property. + */ + @Generated + private String postalCode; + + /* + * The latitude property. + */ + @Generated + private Double latitude; + + /* + * The longitude property. + */ + @Generated + private Double longitude; + + /* + * The dmaCode property. + */ + @Generated + private Integer dmaCode; + + /* + * The metroCodeId property. + */ + @Generated + private Integer metroCodeId; + + /** + * Creates an instance of Location class. + */ + @Generated + private Location() { + } + + /** + * Get the countryCode property: The countryCode property. + * + * @return the countryCode value. + */ + @Generated + public String getCountryCode() { + return this.countryCode; + } + + /** + * Get the countryName property: The countryName property. + * + * @return the countryName value. + */ + @Generated + public String getCountryName() { + return this.countryName; + } + + /** + * Get the region property: The region property. + * + * @return the region value. + */ + @Generated + public String getRegion() { + return this.region; + } + + /** + * Get the regionName property: The regionName property. + * + * @return the regionName value. + */ + @Generated + public String getRegionName() { + return this.regionName; + } + + /** + * Get the city property: The city property. + * + * @return the city value. + */ + @Generated + public String getCity() { + return this.city; + } + + /** + * Get the areaCode property: The areaCode property. + * + * @return the areaCode value. + */ + @Generated + public Integer getAreaCode() { + return this.areaCode; + } + + /** + * Get the postalCode property: The postalCode property. + * + * @return the postalCode value. + */ + @Generated + public String getPostalCode() { + return this.postalCode; + } + + /** + * Get the latitude property: The latitude property. + * + * @return the latitude value. + */ + @Generated + public Double getLatitude() { + return this.latitude; + } + + /** + * Get the longitude property: The longitude property. + * + * @return the longitude value. + */ + @Generated + public Double getLongitude() { + return this.longitude; + } + + /** + * Get the dmaCode property: The dmaCode property. + * + * @return the dmaCode value. + */ + @Generated + public Integer getDmaCode() { + return this.dmaCode; + } + + /** + * Get the metroCodeId property: The metroCodeId property. + * + * @return the metroCodeId value. + */ + @Generated + public Integer getMetroCodeId() { + return this.metroCodeId; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("countryCode", this.countryCode); + jsonWriter.writeStringField("countryName", this.countryName); + jsonWriter.writeStringField("region", this.region); + jsonWriter.writeStringField("regionName", this.regionName); + jsonWriter.writeStringField("city", this.city); + jsonWriter.writeNumberField("areaCode", this.areaCode); + jsonWriter.writeStringField("postalCode", this.postalCode); + jsonWriter.writeNumberField("latitude", this.latitude); + jsonWriter.writeNumberField("longitude", this.longitude); + jsonWriter.writeNumberField("dmaCode", this.dmaCode); + jsonWriter.writeNumberField("metroCodeId", this.metroCodeId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Location from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Location if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Location. + */ + @Generated + public static Location fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Location deserializedLocation = new Location(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("countryCode".equals(fieldName)) { + deserializedLocation.countryCode = reader.getString(); + } else if ("countryName".equals(fieldName)) { + deserializedLocation.countryName = reader.getString(); + } else if ("region".equals(fieldName)) { + deserializedLocation.region = reader.getString(); + } else if ("regionName".equals(fieldName)) { + deserializedLocation.regionName = reader.getString(); + } else if ("city".equals(fieldName)) { + deserializedLocation.city = reader.getString(); + } else if ("areaCode".equals(fieldName)) { + deserializedLocation.areaCode = reader.getNullable(JsonReader::getInt); + } else if ("postalCode".equals(fieldName)) { + deserializedLocation.postalCode = reader.getString(); + } else if ("latitude".equals(fieldName)) { + deserializedLocation.latitude = reader.getNullable(JsonReader::getDouble); + } else if ("longitude".equals(fieldName)) { + deserializedLocation.longitude = reader.getNullable(JsonReader::getDouble); + } else if ("dmaCode".equals(fieldName)) { + deserializedLocation.dmaCode = reader.getNullable(JsonReader::getInt); + } else if ("metroCodeId".equals(fieldName)) { + deserializedLocation.metroCodeId = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + return deserializedLocation; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnection.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnection.java new file mode 100644 index 000000000000..d7f6d2e0a62d --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnection.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The LogAnalyticsDataConnection model. + */ +@Immutable +public final class LogAnalyticsDataConnection extends DataConnection { + + /* + * Discriminator property for DataConnection. + */ + @Generated + private String kind = "logAnalytics"; + + /* + * properties + */ + @Generated + private final LogAnalyticsDataConnectionProperties properties; + + /** + * Creates an instance of LogAnalyticsDataConnection class. + * + * @param properties the properties value to set. + */ + @Generated + private LogAnalyticsDataConnection(LogAnalyticsDataConnectionProperties properties) { + this.properties = properties; + } + + /** + * Get the kind property: Discriminator property for DataConnection. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the properties property: properties. + * + * @return the properties value. + */ + @Generated + public LogAnalyticsDataConnectionProperties getProperties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", getId()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("content", getContent() == null ? null : getContent().toString()); + jsonWriter.writeStringField("frequency", getFrequency() == null ? null : getFrequency().toString()); + jsonWriter.writeNumberField("frequencyOffset", getFrequencyOffset()); + jsonWriter.writeBooleanField("active", isActive()); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogAnalyticsDataConnection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogAnalyticsDataConnection if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LogAnalyticsDataConnection. + */ + @Generated + public static LogAnalyticsDataConnection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + String id = null; + String displayName = null; + DataConnectionContent content = null; + OffsetDateTime createdDate = null; + DataConnectionFrequency frequency = null; + Integer frequencyOffset = null; + OffsetDateTime updatedDate = null; + OffsetDateTime userUpdatedAt = null; + Boolean active = null; + String inactiveMessage = null; + LogAnalyticsDataConnectionProperties properties = null; + String kind = "logAnalytics"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("content".equals(fieldName)) { + content = DataConnectionContent.fromString(reader.getString()); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("frequency".equals(fieldName)) { + frequency = DataConnectionFrequency.fromString(reader.getString()); + } else if ("frequencyOffset".equals(fieldName)) { + frequencyOffset = reader.getNullable(JsonReader::getInt); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("userUpdatedAt".equals(fieldName)) { + userUpdatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("active".equals(fieldName)) { + active = reader.getNullable(JsonReader::getBoolean); + } else if ("inactiveMessage".equals(fieldName)) { + inactiveMessage = reader.getString(); + } else if ("properties".equals(fieldName)) { + properties = LogAnalyticsDataConnectionProperties.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + LogAnalyticsDataConnection deserializedLogAnalyticsDataConnection + = new LogAnalyticsDataConnection(properties); + deserializedLogAnalyticsDataConnection.setName(name); + deserializedLogAnalyticsDataConnection.setId(id); + deserializedLogAnalyticsDataConnection.setDisplayName(displayName); + deserializedLogAnalyticsDataConnection.setContent(content); + deserializedLogAnalyticsDataConnection.setCreatedDate(createdDate); + deserializedLogAnalyticsDataConnection.setFrequency(frequency); + deserializedLogAnalyticsDataConnection.setFrequencyOffset(frequencyOffset); + deserializedLogAnalyticsDataConnection.setUpdatedDate(updatedDate); + deserializedLogAnalyticsDataConnection.setUserUpdatedAt(userUpdatedAt); + deserializedLogAnalyticsDataConnection.setActive(active); + deserializedLogAnalyticsDataConnection.setInactiveMessage(inactiveMessage); + deserializedLogAnalyticsDataConnection.kind = kind; + return deserializedLogAnalyticsDataConnection; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionData.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionData.java new file mode 100644 index 000000000000..63354816b6fd --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionData.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The LogAnalyticsDataConnectionData model. + */ +@Fluent +public final class LogAnalyticsDataConnectionData extends DataConnectionData { + + /* + * Discriminator property for DataConnectionData. + */ + @Generated + private String kind = "logAnalytics"; + + /* + * properties + */ + @Generated + private final LogAnalyticsDataConnectionProperties properties; + + /** + * Creates an instance of LogAnalyticsDataConnectionData class. + * + * @param properties the properties value to set. + */ + @Generated + public LogAnalyticsDataConnectionData(LogAnalyticsDataConnectionProperties properties) { + this.properties = properties; + } + + /** + * Get the kind property: Discriminator property for DataConnectionData. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the properties property: properties. + * + * @return the properties value. + */ + @Generated + public LogAnalyticsDataConnectionProperties getProperties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public LogAnalyticsDataConnectionData setName(String name) { + super.setName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public LogAnalyticsDataConnectionData setContent(DataConnectionContent content) { + super.setContent(content); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public LogAnalyticsDataConnectionData setFrequency(DataConnectionFrequency frequency) { + super.setFrequency(frequency); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public LogAnalyticsDataConnectionData setFrequencyOffset(Integer frequencyOffset) { + super.setFrequencyOffset(frequencyOffset); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("content", getContent() == null ? null : getContent().toString()); + jsonWriter.writeStringField("frequency", getFrequency() == null ? null : getFrequency().toString()); + jsonWriter.writeNumberField("frequencyOffset", getFrequencyOffset()); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogAnalyticsDataConnectionData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogAnalyticsDataConnectionData if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LogAnalyticsDataConnectionData. + */ + @Generated + public static LogAnalyticsDataConnectionData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + DataConnectionContent content = null; + DataConnectionFrequency frequency = null; + Integer frequencyOffset = null; + LogAnalyticsDataConnectionProperties properties = null; + String kind = "logAnalytics"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("content".equals(fieldName)) { + content = DataConnectionContent.fromString(reader.getString()); + } else if ("frequency".equals(fieldName)) { + frequency = DataConnectionFrequency.fromString(reader.getString()); + } else if ("frequencyOffset".equals(fieldName)) { + frequencyOffset = reader.getNullable(JsonReader::getInt); + } else if ("properties".equals(fieldName)) { + properties = LogAnalyticsDataConnectionProperties.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + LogAnalyticsDataConnectionData deserializedLogAnalyticsDataConnectionData + = new LogAnalyticsDataConnectionData(properties); + deserializedLogAnalyticsDataConnectionData.setName(name); + deserializedLogAnalyticsDataConnectionData.setContent(content); + deserializedLogAnalyticsDataConnectionData.setFrequency(frequency); + deserializedLogAnalyticsDataConnectionData.setFrequencyOffset(frequencyOffset); + deserializedLogAnalyticsDataConnectionData.kind = kind; + return deserializedLogAnalyticsDataConnectionData; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionProperties.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionProperties.java new file mode 100644 index 000000000000..d3886248c5af --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionProperties.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The LogAnalyticsDataConnectionProperties model. + */ +@Fluent +public final class LogAnalyticsDataConnectionProperties extends DataConnectionProperties { + + /* + * log analytics api key + */ + @Generated + private String apiKey; + + /* + * log analytics workspace id + */ + @Generated + private String workspaceId; + + /** + * Creates an instance of LogAnalyticsDataConnectionProperties class. + */ + @Generated + public LogAnalyticsDataConnectionProperties() { + } + + /** + * Get the apiKey property: log analytics api key. + * + * @return the apiKey value. + */ + @Generated + public String getApiKey() { + return this.apiKey; + } + + /** + * Set the apiKey property: log analytics api key. + * + * @param apiKey the apiKey value to set. + * @return the LogAnalyticsDataConnectionProperties object itself. + */ + @Generated + public LogAnalyticsDataConnectionProperties setApiKey(String apiKey) { + this.apiKey = apiKey; + return this; + } + + /** + * Get the workspaceId property: log analytics workspace id. + * + * @return the workspaceId value. + */ + @Generated + public String getWorkspaceId() { + return this.workspaceId; + } + + /** + * Set the workspaceId property: log analytics workspace id. + * + * @param workspaceId the workspaceId value to set. + * @return the LogAnalyticsDataConnectionProperties object itself. + */ + @Generated + public LogAnalyticsDataConnectionProperties setWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("apiKey", this.apiKey); + jsonWriter.writeStringField("workspaceId", this.workspaceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogAnalyticsDataConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogAnalyticsDataConnectionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LogAnalyticsDataConnectionProperties. + */ + @Generated + public static LogAnalyticsDataConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogAnalyticsDataConnectionProperties deserializedLogAnalyticsDataConnectionProperties + = new LogAnalyticsDataConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("apiKey".equals(fieldName)) { + deserializedLogAnalyticsDataConnectionProperties.apiKey = reader.getString(); + } else if ("workspaceId".equals(fieldName)) { + deserializedLogAnalyticsDataConnectionProperties.workspaceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedLogAnalyticsDataConnectionProperties; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedBoolean.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedBoolean.java new file mode 100644 index 000000000000..403ec35b7ff2 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedBoolean.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The ObservedBoolean model. + */ +@Immutable +public final class ObservedBoolean extends ObservedValue { + + /* + * The value property. + */ + @Generated + private Boolean value; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /** + * Creates an instance of ObservedBoolean class. + */ + @Generated + private ObservedBoolean() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + @Generated + public Boolean isValue() { + return this.value; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + @Override + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + @Override + public Long getCount() { + return this.count; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + @Override + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + @Override + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstSeen", + getFirstSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getFirstSeen())); + jsonWriter.writeStringField("lastSeen", + getLastSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastSeen())); + jsonWriter.writeNumberField("count", getCount()); + jsonWriter.writeBooleanField("recent", isRecent()); + jsonWriter.writeBooleanField("value", this.value); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObservedBoolean from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObservedBoolean if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ObservedBoolean. + */ + @Generated + public static ObservedBoolean fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObservedBoolean deserializedObservedBoolean = new ObservedBoolean(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("firstSeen".equals(fieldName)) { + deserializedObservedBoolean.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedObservedBoolean.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedObservedBoolean.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedObservedBoolean.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("value".equals(fieldName)) { + deserializedObservedBoolean.value = reader.getNullable(JsonReader::getBoolean); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedObservedBoolean.sources = sources; + } else { + reader.skipChildren(); + } + } + return deserializedObservedBoolean; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedHeader.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedHeader.java new file mode 100644 index 000000000000..0cbdb31dd490 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedHeader.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The ObservedHeader model. + */ +@Immutable +public final class ObservedHeader extends ObservedValue { + + /* + * The headerName property. + */ + @Generated + private String headerName; + + /* + * The headerValue property. + */ + @Generated + private String headerValue; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /** + * Creates an instance of ObservedHeader class. + */ + @Generated + private ObservedHeader() { + } + + /** + * Get the headerName property: The headerName property. + * + * @return the headerName value. + */ + @Generated + public String getHeaderName() { + return this.headerName; + } + + /** + * Get the headerValue property: The headerValue property. + * + * @return the headerValue value. + */ + @Generated + public String getHeaderValue() { + return this.headerValue; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + @Override + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + @Override + public Long getCount() { + return this.count; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + @Override + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + @Override + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstSeen", + getFirstSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getFirstSeen())); + jsonWriter.writeStringField("lastSeen", + getLastSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastSeen())); + jsonWriter.writeNumberField("count", getCount()); + jsonWriter.writeBooleanField("recent", isRecent()); + jsonWriter.writeStringField("headerName", this.headerName); + jsonWriter.writeStringField("headerValue", this.headerValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObservedHeader from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObservedHeader if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ObservedHeader. + */ + @Generated + public static ObservedHeader fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObservedHeader deserializedObservedHeader = new ObservedHeader(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("firstSeen".equals(fieldName)) { + deserializedObservedHeader.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedObservedHeader.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedObservedHeader.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedObservedHeader.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("headerName".equals(fieldName)) { + deserializedObservedHeader.headerName = reader.getString(); + } else if ("headerValue".equals(fieldName)) { + deserializedObservedHeader.headerValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedObservedHeader; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedInteger.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedInteger.java new file mode 100644 index 000000000000..58c21afe5530 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedInteger.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The ObservedInteger model. + */ +@Immutable +public final class ObservedInteger extends ObservedValue { + + /* + * The value property. + */ + @Generated + private Integer value; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /** + * Creates an instance of ObservedInteger class. + */ + @Generated + private ObservedInteger() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + @Generated + public Integer getValue() { + return this.value; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + @Override + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + @Override + public Long getCount() { + return this.count; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + @Override + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + @Override + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstSeen", + getFirstSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getFirstSeen())); + jsonWriter.writeStringField("lastSeen", + getLastSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastSeen())); + jsonWriter.writeNumberField("count", getCount()); + jsonWriter.writeBooleanField("recent", isRecent()); + jsonWriter.writeNumberField("value", this.value); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObservedInteger from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObservedInteger if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ObservedInteger. + */ + @Generated + public static ObservedInteger fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObservedInteger deserializedObservedInteger = new ObservedInteger(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("firstSeen".equals(fieldName)) { + deserializedObservedInteger.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedObservedInteger.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedObservedInteger.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedObservedInteger.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("value".equals(fieldName)) { + deserializedObservedInteger.value = reader.getNullable(JsonReader::getInt); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedObservedInteger.sources = sources; + } else { + reader.skipChildren(); + } + } + return deserializedObservedInteger; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedIntegers.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedIntegers.java new file mode 100644 index 000000000000..990d1750c200 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedIntegers.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The ObservedIntegers model. + */ +@Immutable +public final class ObservedIntegers extends ObservedValue { + + /* + * The values property. + */ + @Generated + private List values; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /** + * Creates an instance of ObservedIntegers class. + */ + @Generated + private ObservedIntegers() { + } + + /** + * Get the values property: The values property. + * + * @return the values value. + */ + @Generated + public List getValues() { + return this.values; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + @Override + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + @Override + public Long getCount() { + return this.count; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + @Override + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + @Override + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstSeen", + getFirstSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getFirstSeen())); + jsonWriter.writeStringField("lastSeen", + getLastSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastSeen())); + jsonWriter.writeNumberField("count", getCount()); + jsonWriter.writeBooleanField("recent", isRecent()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeInt(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObservedIntegers from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObservedIntegers if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ObservedIntegers. + */ + @Generated + public static ObservedIntegers fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObservedIntegers deserializedObservedIntegers = new ObservedIntegers(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("firstSeen".equals(fieldName)) { + deserializedObservedIntegers.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedObservedIntegers.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedObservedIntegers.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedObservedIntegers.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getInt()); + deserializedObservedIntegers.values = values; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedObservedIntegers.sources = sources; + } else { + reader.skipChildren(); + } + } + return deserializedObservedIntegers; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedLocation.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedLocation.java new file mode 100644 index 000000000000..81bfb85bf43e --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedLocation.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The ObservedLocation model. + */ +@Immutable +public final class ObservedLocation extends ObservedValue { + + /* + * The value property. + */ + @Generated + private Location value; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /** + * Creates an instance of ObservedLocation class. + */ + @Generated + private ObservedLocation() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + @Generated + public Location getValue() { + return this.value; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + @Override + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + @Override + public Long getCount() { + return this.count; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + @Override + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + @Override + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstSeen", + getFirstSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getFirstSeen())); + jsonWriter.writeStringField("lastSeen", + getLastSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastSeen())); + jsonWriter.writeNumberField("count", getCount()); + jsonWriter.writeBooleanField("recent", isRecent()); + jsonWriter.writeJsonField("value", this.value); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObservedLocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObservedLocation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ObservedLocation. + */ + @Generated + public static ObservedLocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObservedLocation deserializedObservedLocation = new ObservedLocation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("firstSeen".equals(fieldName)) { + deserializedObservedLocation.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedObservedLocation.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedObservedLocation.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedObservedLocation.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("value".equals(fieldName)) { + deserializedObservedLocation.value = Location.fromJson(reader); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedObservedLocation.sources = sources; + } else { + reader.skipChildren(); + } + } + return deserializedObservedLocation; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedLong.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedLong.java new file mode 100644 index 000000000000..ea42142af484 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedLong.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The ObservedLong model. + */ +@Immutable +public final class ObservedLong extends ObservedValue { + + /* + * The value property. + */ + @Generated + private Long value; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /** + * Creates an instance of ObservedLong class. + */ + @Generated + private ObservedLong() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + @Generated + public Long getValue() { + return this.value; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + @Override + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + @Override + public Long getCount() { + return this.count; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + @Override + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + @Override + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstSeen", + getFirstSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getFirstSeen())); + jsonWriter.writeStringField("lastSeen", + getLastSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastSeen())); + jsonWriter.writeNumberField("count", getCount()); + jsonWriter.writeBooleanField("recent", isRecent()); + jsonWriter.writeNumberField("value", this.value); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObservedLong from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObservedLong if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ObservedLong. + */ + @Generated + public static ObservedLong fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObservedLong deserializedObservedLong = new ObservedLong(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("firstSeen".equals(fieldName)) { + deserializedObservedLong.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedObservedLong.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedObservedLong.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedObservedLong.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("value".equals(fieldName)) { + deserializedObservedLong.value = reader.getNullable(JsonReader::getLong); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedObservedLong.sources = sources; + } else { + reader.skipChildren(); + } + } + return deserializedObservedLong; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedPortState.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedPortState.java new file mode 100644 index 000000000000..08394dbc1c6c --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedPortState.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The ObservedPortState model. + */ +@Immutable +public final class ObservedPortState extends ObservedValue { + + /* + * The value property. + */ + @Generated + private ObservedPortStateValue value; + + /* + * The port property. + */ + @Generated + private Integer port; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /** + * Creates an instance of ObservedPortState class. + */ + @Generated + private ObservedPortState() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + @Generated + public ObservedPortStateValue getValue() { + return this.value; + } + + /** + * Get the port property: The port property. + * + * @return the port value. + */ + @Generated + public Integer getPort() { + return this.port; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + @Override + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + @Override + public Long getCount() { + return this.count; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + @Override + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + @Override + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstSeen", + getFirstSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getFirstSeen())); + jsonWriter.writeStringField("lastSeen", + getLastSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastSeen())); + jsonWriter.writeNumberField("count", getCount()); + jsonWriter.writeBooleanField("recent", isRecent()); + jsonWriter.writeStringField("value", this.value == null ? null : this.value.toString()); + jsonWriter.writeNumberField("port", this.port); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObservedPortState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObservedPortState if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ObservedPortState. + */ + @Generated + public static ObservedPortState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObservedPortState deserializedObservedPortState = new ObservedPortState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("firstSeen".equals(fieldName)) { + deserializedObservedPortState.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedObservedPortState.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedObservedPortState.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedObservedPortState.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("value".equals(fieldName)) { + deserializedObservedPortState.value = ObservedPortStateValue.fromString(reader.getString()); + } else if ("port".equals(fieldName)) { + deserializedObservedPortState.port = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + return deserializedObservedPortState; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedPortStateValue.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedPortStateValue.java new file mode 100644 index 000000000000..1c58dc57e5d4 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedPortStateValue.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * state of observed port. + */ +public final class ObservedPortStateValue extends ExpandableStringEnum { + + /** + * Static value open for ObservedPortStateValue. + */ + @Generated + public static final ObservedPortStateValue OPEN = fromString("open"); + + /** + * Static value closed for ObservedPortStateValue. + */ + @Generated + public static final ObservedPortStateValue CLOSED = fromString("closed"); + + /** + * Static value filtered for ObservedPortStateValue. + */ + @Generated + public static final ObservedPortStateValue FILTERED = fromString("filtered"); + + /** + * Creates a new instance of ObservedPortStateValue value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ObservedPortStateValue() { + } + + /** + * Creates or finds a ObservedPortStateValue from its string representation. + * + * @param name a name to look for. + * @return the corresponding ObservedPortStateValue. + */ + @Generated + public static ObservedPortStateValue fromString(String name) { + return fromString(name, ObservedPortStateValue.class); + } + + /** + * Gets known ObservedPortStateValue values. + * + * @return known ObservedPortStateValue values. + */ + @Generated + public static Collection values() { + return values(ObservedPortStateValue.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedString.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedString.java new file mode 100644 index 000000000000..41c138615652 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedString.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The ObservedString model. + */ +@Immutable +public final class ObservedString extends ObservedValue { + + /* + * The value property. + */ + @Generated + private String value; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /** + * Creates an instance of ObservedString class. + */ + @Generated + private ObservedString() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + @Override + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + @Override + public Long getCount() { + return this.count; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + @Override + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + @Override + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstSeen", + getFirstSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getFirstSeen())); + jsonWriter.writeStringField("lastSeen", + getLastSeen() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getLastSeen())); + jsonWriter.writeNumberField("count", getCount()); + jsonWriter.writeBooleanField("recent", isRecent()); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObservedString from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObservedString if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ObservedString. + */ + @Generated + public static ObservedString fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObservedString deserializedObservedString = new ObservedString(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("firstSeen".equals(fieldName)) { + deserializedObservedString.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedObservedString.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedObservedString.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedObservedString.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("value".equals(fieldName)) { + deserializedObservedString.value = reader.getString(); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedObservedString.sources = sources; + } else { + reader.skipChildren(); + } + } + return deserializedObservedString; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedValue.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedValue.java new file mode 100644 index 000000000000..f14f99ccfd4b --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ObservedValue.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Template model for observed values. + */ +@Immutable +public class ObservedValue implements JsonSerializable { + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /** + * Creates an instance of ObservedValue class. + */ + @Generated + protected ObservedValue() { + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Set the firstSeen property: The firstSeen property. + * + * @param firstSeen the firstSeen value to set. + * @return the ObservedValue object itself. + */ + @Generated + ObservedValue setFirstSeen(OffsetDateTime firstSeen) { + this.firstSeen = firstSeen; + return this; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Set the lastSeen property: The lastSeen property. + * + * @param lastSeen the lastSeen value to set. + * @return the ObservedValue object itself. + */ + @Generated + ObservedValue setLastSeen(OffsetDateTime lastSeen) { + this.lastSeen = lastSeen; + return this; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Set the count property: The count property. + * + * @param count the count value to set. + * @return the ObservedValue object itself. + */ + @Generated + ObservedValue setCount(Long count) { + this.count = count; + return this; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * Set the recent property: The recent property. + * + * @param recent the recent value to set. + * @return the ObservedValue object itself. + */ + @Generated + ObservedValue setRecent(Boolean recent) { + this.recent = recent; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("recent", this.recent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObservedValue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObservedValue if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ObservedValue. + */ + @Generated + public static ObservedValue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObservedValue deserializedObservedValue = new ObservedValue(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("firstSeen".equals(fieldName)) { + deserializedObservedValue.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedObservedValue.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedObservedValue.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedObservedValue.recent = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedObservedValue; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAsset.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAsset.java new file mode 100644 index 000000000000..c852952961c9 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAsset.java @@ -0,0 +1,1298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The PageAsset model. + */ +@Immutable +public final class PageAsset extends InventoryAsset { + + /* + * The url property. + */ + @Generated + private String url; + + /* + * The httpMethod property. + */ + @Generated + private String httpMethod; + + /* + * The service property. + */ + @Generated + private String service; + + /* + * The ipAddresses property. + */ + @Generated + private List ipAddresses; + + /* + * The successful property. + */ + @Generated + private List successful; + + /* + * The httpResponseCodes property. + */ + @Generated + private List httpResponseCodes; + + /* + * The httpResponseMessages property. + */ + @Generated + private List httpResponseMessages; + + /* + * The responseTimes property. + */ + @Generated + private List responseTimes; + + /* + * The frames property. + */ + @Generated + private List frames; + + /* + * The windows property. + */ + @Generated + private List windows; + + /* + * The nonHtmlFrames property. + */ + @Generated + private List nonHtmlFrames; + + /* + * The undirectedContent property. + */ + @Generated + private List undirectedContent; + + /* + * The contentTypes property. + */ + @Generated + private List contentTypes; + + /* + * The contentLengths property. + */ + @Generated + private List contentLengths; + + /* + * The windowNames property. + */ + @Generated + private List windowNames; + + /* + * The charsets property. + */ + @Generated + private List charsets; + + /* + * The titles property. + */ + @Generated + private List titles; + + /* + * The languages property. + */ + @Generated + private List languages; + + /* + * The responseHeaders property. + */ + @Generated + private List responseHeaders; + + /* + * The cookies property. + */ + @Generated + private List cookies; + + /* + * The webComponents property. + */ + @Generated + private List webComponents; + + /* + * The attributes property. + */ + @Generated + private List attributes; + + /* + * The assetSecurityPolicies property. + */ + @Generated + private List assetSecurityPolicies; + + /* + * The responseBodyMinhashSignatures property. + */ + @Generated + private List responseBodyMinhashSignatures; + + /* + * The fullDomMinhashSignatures property. + */ + @Generated + private List fullDomMinhashSignatures; + + /* + * The responseBodyHashSignatures property. + */ + @Generated + private List responseBodyHashSignatures; + + /* + * The errors property. + */ + @Generated + private List errors; + + /* + * The sslCerts property. + */ + @Generated + private List sslCerts; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The cause property. + */ + @Generated + private PageCause cause; + + /* + * The referrer property. + */ + @Generated + private String referrer; + + /* + * The redirectUrls property. + */ + @Generated + private List redirectUrls; + + /* + * The redirectType property. + */ + @Generated + private PageAssetRedirectType redirectType; + + /* + * The finalUrls property. + */ + @Generated + private List finalUrls; + + /* + * The finalResponseCodes property. + */ + @Generated + private List finalResponseCodes; + + /* + * The parkedPage property. + */ + @Generated + private List parkedPage; + + /* + * The resourceUrls property. + */ + @Generated + private List resourceUrls; + + /* + * The guids property. + */ + @Generated + private List guids; + + /* + * The finalIpAddresses property. + */ + @Generated + private List finalIpAddresses; + + /* + * The asns property. + */ + @Generated + private List asns; + + /* + * The ipBlocks property. + */ + @Generated + private List ipBlocks; + + /* + * The finalAsns property. + */ + @Generated + private List finalAsns; + + /* + * The finalIpBlocks property. + */ + @Generated + private List finalIpBlocks; + + /* + * The responseBodies property. + */ + @Generated + private List responseBodies; + + /* + * The domainAsset property. + */ + @Generated + private DomainAsset domainAsset; + + /* + * The rootUrl property. + */ + @Generated + private ObservedBoolean rootUrl; + + /* + * The isRootUrl property. + */ + @Generated + private Boolean isRootUrl; + + /* + * The location property. + */ + @Generated + private List location; + + /* + * The services property. + */ + @Generated + private List services; + + /* + * The siteStatus property. + */ + @Generated + private String siteStatus; + + /* + * The cnames property. + */ + @Generated + private List cnames; + + /* + * The cdns property. + */ + @Generated + private List cdns; + + /* + * The host property. + */ + @Generated + private String host; + + /* + * The domain property. + */ + @Generated + private String domain; + + /* + * The sslServerConfig property. + */ + @Generated + private List sslServerConfig; + + /* + * The gdprAssetSecurityPolicies property. + */ + @Generated + private List gdprAssetSecurityPolicies; + + /* + * The ipv4 property. + */ + @Generated + private List ipv4; + + /* + * The ipv6 property. + */ + @Generated + private List ipv6; + + /** + * Creates an instance of PageAsset class. + */ + @Generated + private PageAsset() { + } + + /** + * Get the url property: The url property. + * + * @return the url value. + */ + @Generated + public String getUrl() { + return this.url; + } + + /** + * Get the httpMethod property: The httpMethod property. + * + * @return the httpMethod value. + */ + @Generated + public String getHttpMethod() { + return this.httpMethod; + } + + /** + * Get the service property: The service property. + * + * @return the service value. + */ + @Generated + public String getService() { + return this.service; + } + + /** + * Get the ipAddresses property: The ipAddresses property. + * + * @return the ipAddresses value. + */ + @Generated + public List getIpAddresses() { + return this.ipAddresses; + } + + /** + * Get the successful property: The successful property. + * + * @return the successful value. + */ + @Generated + public List getSuccessful() { + return this.successful; + } + + /** + * Get the httpResponseCodes property: The httpResponseCodes property. + * + * @return the httpResponseCodes value. + */ + @Generated + public List getHttpResponseCodes() { + return this.httpResponseCodes; + } + + /** + * Get the httpResponseMessages property: The httpResponseMessages property. + * + * @return the httpResponseMessages value. + */ + @Generated + public List getHttpResponseMessages() { + return this.httpResponseMessages; + } + + /** + * Get the responseTimes property: The responseTimes property. + * + * @return the responseTimes value. + */ + @Generated + public List getResponseTimes() { + return this.responseTimes; + } + + /** + * Get the frames property: The frames property. + * + * @return the frames value. + */ + @Generated + public List getFrames() { + return this.frames; + } + + /** + * Get the windows property: The windows property. + * + * @return the windows value. + */ + @Generated + public List getWindows() { + return this.windows; + } + + /** + * Get the nonHtmlFrames property: The nonHtmlFrames property. + * + * @return the nonHtmlFrames value. + */ + @Generated + public List getNonHtmlFrames() { + return this.nonHtmlFrames; + } + + /** + * Get the undirectedContent property: The undirectedContent property. + * + * @return the undirectedContent value. + */ + @Generated + public List getUndirectedContent() { + return this.undirectedContent; + } + + /** + * Get the contentTypes property: The contentTypes property. + * + * @return the contentTypes value. + */ + @Generated + public List getContentTypes() { + return this.contentTypes; + } + + /** + * Get the contentLengths property: The contentLengths property. + * + * @return the contentLengths value. + */ + @Generated + public List getContentLengths() { + return this.contentLengths; + } + + /** + * Get the windowNames property: The windowNames property. + * + * @return the windowNames value. + */ + @Generated + public List getWindowNames() { + return this.windowNames; + } + + /** + * Get the charsets property: The charsets property. + * + * @return the charsets value. + */ + @Generated + public List getCharsets() { + return this.charsets; + } + + /** + * Get the titles property: The titles property. + * + * @return the titles value. + */ + @Generated + public List getTitles() { + return this.titles; + } + + /** + * Get the languages property: The languages property. + * + * @return the languages value. + */ + @Generated + public List getLanguages() { + return this.languages; + } + + /** + * Get the responseHeaders property: The responseHeaders property. + * + * @return the responseHeaders value. + */ + @Generated + public List getResponseHeaders() { + return this.responseHeaders; + } + + /** + * Get the cookies property: The cookies property. + * + * @return the cookies value. + */ + @Generated + public List getCookies() { + return this.cookies; + } + + /** + * Get the webComponents property: The webComponents property. + * + * @return the webComponents value. + */ + @Generated + public List getWebComponents() { + return this.webComponents; + } + + /** + * Get the attributes property: The attributes property. + * + * @return the attributes value. + */ + @Generated + public List getAttributes() { + return this.attributes; + } + + /** + * Get the assetSecurityPolicies property: The assetSecurityPolicies property. + * + * @return the assetSecurityPolicies value. + */ + @Generated + public List getAssetSecurityPolicies() { + return this.assetSecurityPolicies; + } + + /** + * Get the responseBodyMinhashSignatures property: The responseBodyMinhashSignatures property. + * + * @return the responseBodyMinhashSignatures value. + */ + @Generated + public List getResponseBodyMinhashSignatures() { + return this.responseBodyMinhashSignatures; + } + + /** + * Get the fullDomMinhashSignatures property: The fullDomMinhashSignatures property. + * + * @return the fullDomMinhashSignatures value. + */ + @Generated + public List getFullDomMinhashSignatures() { + return this.fullDomMinhashSignatures; + } + + /** + * Get the responseBodyHashSignatures property: The responseBodyHashSignatures property. + * + * @return the responseBodyHashSignatures value. + */ + @Generated + public List getResponseBodyHashSignatures() { + return this.responseBodyHashSignatures; + } + + /** + * Get the errors property: The errors property. + * + * @return the errors value. + */ + @Generated + public List getErrors() { + return this.errors; + } + + /** + * Get the sslCerts property: The sslCerts property. + * + * @return the sslCerts value. + */ + @Generated + public List getSslCerts() { + return this.sslCerts; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the cause property: The cause property. + * + * @return the cause value. + */ + @Generated + public PageCause getCause() { + return this.cause; + } + + /** + * Get the referrer property: The referrer property. + * + * @return the referrer value. + */ + @Generated + public String getReferrer() { + return this.referrer; + } + + /** + * Get the redirectUrls property: The redirectUrls property. + * + * @return the redirectUrls value. + */ + @Generated + public List getRedirectUrls() { + return this.redirectUrls; + } + + /** + * Get the redirectType property: The redirectType property. + * + * @return the redirectType value. + */ + @Generated + public PageAssetRedirectType getRedirectType() { + return this.redirectType; + } + + /** + * Get the finalUrls property: The finalUrls property. + * + * @return the finalUrls value. + */ + @Generated + public List getFinalUrls() { + return this.finalUrls; + } + + /** + * Get the finalResponseCodes property: The finalResponseCodes property. + * + * @return the finalResponseCodes value. + */ + @Generated + public List getFinalResponseCodes() { + return this.finalResponseCodes; + } + + /** + * Get the parkedPage property: The parkedPage property. + * + * @return the parkedPage value. + */ + @Generated + public List getParkedPage() { + return this.parkedPage; + } + + /** + * Get the resourceUrls property: The resourceUrls property. + * + * @return the resourceUrls value. + */ + @Generated + public List getResourceUrls() { + return this.resourceUrls; + } + + /** + * Get the guids property: The guids property. + * + * @return the guids value. + */ + @Generated + public List getGuids() { + return this.guids; + } + + /** + * Get the finalIpAddresses property: The finalIpAddresses property. + * + * @return the finalIpAddresses value. + */ + @Generated + public List getFinalIpAddresses() { + return this.finalIpAddresses; + } + + /** + * Get the asns property: The asns property. + * + * @return the asns value. + */ + @Generated + public List getAsns() { + return this.asns; + } + + /** + * Get the ipBlocks property: The ipBlocks property. + * + * @return the ipBlocks value. + */ + @Generated + public List getIpBlocks() { + return this.ipBlocks; + } + + /** + * Get the finalAsns property: The finalAsns property. + * + * @return the finalAsns value. + */ + @Generated + public List getFinalAsns() { + return this.finalAsns; + } + + /** + * Get the finalIpBlocks property: The finalIpBlocks property. + * + * @return the finalIpBlocks value. + */ + @Generated + public List getFinalIpBlocks() { + return this.finalIpBlocks; + } + + /** + * Get the responseBodies property: The responseBodies property. + * + * @return the responseBodies value. + */ + @Generated + public List getResponseBodies() { + return this.responseBodies; + } + + /** + * Get the domainAsset property: The domainAsset property. + * + * @return the domainAsset value. + */ + @Generated + public DomainAsset getDomainAsset() { + return this.domainAsset; + } + + /** + * Get the rootUrl property: The rootUrl property. + * + * @return the rootUrl value. + */ + @Generated + public ObservedBoolean getRootUrl() { + return this.rootUrl; + } + + /** + * Get the isRootUrl property: The isRootUrl property. + * + * @return the isRootUrl value. + */ + @Generated + public Boolean isRootUrl() { + return this.isRootUrl; + } + + /** + * Get the location property: The location property. + * + * @return the location value. + */ + @Generated + public List getLocation() { + return this.location; + } + + /** + * Get the services property: The services property. + * + * @return the services value. + */ + @Generated + public List getServices() { + return this.services; + } + + /** + * Get the siteStatus property: The siteStatus property. + * + * @return the siteStatus value. + */ + @Generated + public String getSiteStatus() { + return this.siteStatus; + } + + /** + * Get the cnames property: The cnames property. + * + * @return the cnames value. + */ + @Generated + public List getCnames() { + return this.cnames; + } + + /** + * Get the cdns property: The cdns property. + * + * @return the cdns value. + */ + @Generated + public List getCdns() { + return this.cdns; + } + + /** + * Get the host property: The host property. + * + * @return the host value. + */ + @Generated + public String getHost() { + return this.host; + } + + /** + * Get the domain property: The domain property. + * + * @return the domain value. + */ + @Generated + public String getDomain() { + return this.domain; + } + + /** + * Get the sslServerConfig property: The sslServerConfig property. + * + * @return the sslServerConfig value. + */ + @Generated + public List getSslServerConfig() { + return this.sslServerConfig; + } + + /** + * Get the gdprAssetSecurityPolicies property: The gdprAssetSecurityPolicies property. + * + * @return the gdprAssetSecurityPolicies value. + */ + @Generated + public List getGdprAssetSecurityPolicies() { + return this.gdprAssetSecurityPolicies; + } + + /** + * Get the ipv4 property: The ipv4 property. + * + * @return the ipv4 value. + */ + @Generated + public List getIpv4() { + return this.ipv4; + } + + /** + * Get the ipv6 property: The ipv6 property. + * + * @return the ipv6 value. + */ + @Generated + public List getIpv6() { + return this.ipv6; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeStringField("httpMethod", this.httpMethod); + jsonWriter.writeStringField("service", this.service); + jsonWriter.writeArrayField("ipAddresses", this.ipAddresses, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("successful", this.successful, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("httpResponseCodes", this.httpResponseCodes, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("httpResponseMessages", this.httpResponseMessages, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("responseTimes", this.responseTimes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("frames", this.frames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("windows", this.windows, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("nonHtmlFrames", this.nonHtmlFrames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("undirectedContent", this.undirectedContent, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("contentTypes", this.contentTypes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("contentLengths", this.contentLengths, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("windowNames", this.windowNames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("charsets", this.charsets, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("titles", this.titles, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("languages", this.languages, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("responseHeaders", this.responseHeaders, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("cookies", this.cookies, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("webComponents", this.webComponents, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("attributes", this.attributes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("assetSecurityPolicies", this.assetSecurityPolicies, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("responseBodyMinhashSignatures", this.responseBodyMinhashSignatures, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("fullDomMinhashSignatures", this.fullDomMinhashSignatures, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("responseBodyHashSignatures", this.responseBodyHashSignatures, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("errors", this.errors, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sslCerts", this.sslCerts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeJsonField("cause", this.cause); + jsonWriter.writeStringField("referrer", this.referrer); + jsonWriter.writeArrayField("redirectUrls", this.redirectUrls, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("redirectType", this.redirectType == null ? null : this.redirectType.toString()); + jsonWriter.writeArrayField("finalUrls", this.finalUrls, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("finalResponseCodes", this.finalResponseCodes, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("parkedPage", this.parkedPage, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("resourceUrls", this.resourceUrls, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("guids", this.guids, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("finalIpAddresses", this.finalIpAddresses, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("asns", this.asns, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipBlocks", this.ipBlocks, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("finalAsns", this.finalAsns, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("finalIpBlocks", this.finalIpBlocks, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("responseBodies", this.responseBodies, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("domainAsset", this.domainAsset); + jsonWriter.writeJsonField("rootUrl", this.rootUrl); + jsonWriter.writeBooleanField("isRootUrl", this.isRootUrl); + jsonWriter.writeArrayField("location", this.location, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("services", this.services, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("siteStatus", this.siteStatus); + jsonWriter.writeArrayField("cnames", this.cnames, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("cdns", this.cdns, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("host", this.host); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeArrayField("sslServerConfig", this.sslServerConfig, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("gdprAssetSecurityPolicies", this.gdprAssetSecurityPolicies, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv4", this.ipv4, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6", this.ipv6, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PageAsset from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PageAsset if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the PageAsset. + */ + @Generated + public static PageAsset fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PageAsset deserializedPageAsset = new PageAsset(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("url".equals(fieldName)) { + deserializedPageAsset.url = reader.getString(); + } else if ("httpMethod".equals(fieldName)) { + deserializedPageAsset.httpMethod = reader.getString(); + } else if ("service".equals(fieldName)) { + deserializedPageAsset.service = reader.getString(); + } else if ("ipAddresses".equals(fieldName)) { + List ipAddresses = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.ipAddresses = ipAddresses; + } else if ("successful".equals(fieldName)) { + List successful = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedPageAsset.successful = successful; + } else if ("httpResponseCodes".equals(fieldName)) { + List httpResponseCodes + = reader.readArray(reader1 -> ObservedInteger.fromJson(reader1)); + deserializedPageAsset.httpResponseCodes = httpResponseCodes; + } else if ("httpResponseMessages".equals(fieldName)) { + List httpResponseMessages + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.httpResponseMessages = httpResponseMessages; + } else if ("responseTimes".equals(fieldName)) { + List responseTimes = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedPageAsset.responseTimes = responseTimes; + } else if ("frames".equals(fieldName)) { + List frames = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedPageAsset.frames = frames; + } else if ("windows".equals(fieldName)) { + List windows = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedPageAsset.windows = windows; + } else if ("nonHtmlFrames".equals(fieldName)) { + List nonHtmlFrames + = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedPageAsset.nonHtmlFrames = nonHtmlFrames; + } else if ("undirectedContent".equals(fieldName)) { + List undirectedContent + = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedPageAsset.undirectedContent = undirectedContent; + } else if ("contentTypes".equals(fieldName)) { + List contentTypes = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.contentTypes = contentTypes; + } else if ("contentLengths".equals(fieldName)) { + List contentLengths = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedPageAsset.contentLengths = contentLengths; + } else if ("windowNames".equals(fieldName)) { + List windowNames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.windowNames = windowNames; + } else if ("charsets".equals(fieldName)) { + List charsets = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.charsets = charsets; + } else if ("titles".equals(fieldName)) { + List titles = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.titles = titles; + } else if ("languages".equals(fieldName)) { + List languages = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.languages = languages; + } else if ("responseHeaders".equals(fieldName)) { + List responseHeaders + = reader.readArray(reader1 -> ObservedHeader.fromJson(reader1)); + deserializedPageAsset.responseHeaders = responseHeaders; + } else if ("cookies".equals(fieldName)) { + List cookies = reader.readArray(reader1 -> Cookie.fromJson(reader1)); + deserializedPageAsset.cookies = cookies; + } else if ("webComponents".equals(fieldName)) { + List webComponents = reader.readArray(reader1 -> WebComponent.fromJson(reader1)); + deserializedPageAsset.webComponents = webComponents; + } else if ("attributes".equals(fieldName)) { + List attributes = reader.readArray(reader1 -> Attribute.fromJson(reader1)); + deserializedPageAsset.attributes = attributes; + } else if ("assetSecurityPolicies".equals(fieldName)) { + List assetSecurityPolicies + = reader.readArray(reader1 -> AssetSecurityPolicy.fromJson(reader1)); + deserializedPageAsset.assetSecurityPolicies = assetSecurityPolicies; + } else if ("responseBodyMinhashSignatures".equals(fieldName)) { + List responseBodyMinhashSignatures + = reader.readArray(reader1 -> ObservedIntegers.fromJson(reader1)); + deserializedPageAsset.responseBodyMinhashSignatures = responseBodyMinhashSignatures; + } else if ("fullDomMinhashSignatures".equals(fieldName)) { + List fullDomMinhashSignatures + = reader.readArray(reader1 -> ObservedIntegers.fromJson(reader1)); + deserializedPageAsset.fullDomMinhashSignatures = fullDomMinhashSignatures; + } else if ("responseBodyHashSignatures".equals(fieldName)) { + List responseBodyHashSignatures + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.responseBodyHashSignatures = responseBodyHashSignatures; + } else if ("errors".equals(fieldName)) { + List errors = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.errors = errors; + } else if ("sslCerts".equals(fieldName)) { + List sslCerts = reader.readArray(reader1 -> SslCertAsset.fromJson(reader1)); + deserializedPageAsset.sslCerts = sslCerts; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedPageAsset.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedPageAsset.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedPageAsset.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedPageAsset.count = reader.getNullable(JsonReader::getLong); + } else if ("cause".equals(fieldName)) { + deserializedPageAsset.cause = PageCause.fromJson(reader); + } else if ("referrer".equals(fieldName)) { + deserializedPageAsset.referrer = reader.getString(); + } else if ("redirectUrls".equals(fieldName)) { + List redirectUrls = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.redirectUrls = redirectUrls; + } else if ("redirectType".equals(fieldName)) { + deserializedPageAsset.redirectType = PageAssetRedirectType.fromString(reader.getString()); + } else if ("finalUrls".equals(fieldName)) { + List finalUrls = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.finalUrls = finalUrls; + } else if ("finalResponseCodes".equals(fieldName)) { + List finalResponseCodes + = reader.readArray(reader1 -> ObservedInteger.fromJson(reader1)); + deserializedPageAsset.finalResponseCodes = finalResponseCodes; + } else if ("parkedPage".equals(fieldName)) { + List parkedPage = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedPageAsset.parkedPage = parkedPage; + } else if ("resourceUrls".equals(fieldName)) { + List resourceUrls = reader.readArray(reader1 -> ResourceUrl.fromJson(reader1)); + deserializedPageAsset.resourceUrls = resourceUrls; + } else if ("guids".equals(fieldName)) { + List guids = reader.readArray(reader1 -> GuidPair.fromJson(reader1)); + deserializedPageAsset.guids = guids; + } else if ("finalIpAddresses".equals(fieldName)) { + List finalIpAddresses + = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.finalIpAddresses = finalIpAddresses; + } else if ("asns".equals(fieldName)) { + List asns = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedPageAsset.asns = asns; + } else if ("ipBlocks".equals(fieldName)) { + List ipBlocks = reader.readArray(reader1 -> IpBlock.fromJson(reader1)); + deserializedPageAsset.ipBlocks = ipBlocks; + } else if ("finalAsns".equals(fieldName)) { + List finalAsns = reader.readArray(reader1 -> ObservedLong.fromJson(reader1)); + deserializedPageAsset.finalAsns = finalAsns; + } else if ("finalIpBlocks".equals(fieldName)) { + List finalIpBlocks = reader.readArray(reader1 -> IpBlock.fromJson(reader1)); + deserializedPageAsset.finalIpBlocks = finalIpBlocks; + } else if ("responseBodies".equals(fieldName)) { + List responseBodies = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.responseBodies = responseBodies; + } else if ("domainAsset".equals(fieldName)) { + deserializedPageAsset.domainAsset = DomainAsset.fromJson(reader); + } else if ("rootUrl".equals(fieldName)) { + deserializedPageAsset.rootUrl = ObservedBoolean.fromJson(reader); + } else if ("isRootUrl".equals(fieldName)) { + deserializedPageAsset.isRootUrl = reader.getNullable(JsonReader::getBoolean); + } else if ("location".equals(fieldName)) { + List location = reader.readArray(reader1 -> ObservedLocation.fromJson(reader1)); + deserializedPageAsset.location = location; + } else if ("services".equals(fieldName)) { + List services = reader.readArray(reader1 -> Service.fromJson(reader1)); + deserializedPageAsset.services = services; + } else if ("siteStatus".equals(fieldName)) { + deserializedPageAsset.siteStatus = reader.getString(); + } else if ("cnames".equals(fieldName)) { + List cnames = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.cnames = cnames; + } else if ("cdns".equals(fieldName)) { + List cdns = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedPageAsset.cdns = cdns; + } else if ("host".equals(fieldName)) { + deserializedPageAsset.host = reader.getString(); + } else if ("domain".equals(fieldName)) { + deserializedPageAsset.domain = reader.getString(); + } else if ("sslServerConfig".equals(fieldName)) { + List sslServerConfig + = reader.readArray(reader1 -> SslServerConfig.fromJson(reader1)); + deserializedPageAsset.sslServerConfig = sslServerConfig; + } else if ("gdprAssetSecurityPolicies".equals(fieldName)) { + List gdprAssetSecurityPolicies + = reader.readArray(reader1 -> AssetSecurityPolicy.fromJson(reader1)); + deserializedPageAsset.gdprAssetSecurityPolicies = gdprAssetSecurityPolicies; + } else if ("ipv4".equals(fieldName)) { + List ipv4 = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedPageAsset.ipv4 = ipv4; + } else if ("ipv6".equals(fieldName)) { + List ipv6 = reader.readArray(reader1 -> ObservedBoolean.fromJson(reader1)); + deserializedPageAsset.ipv6 = ipv6; + } else { + reader.skipChildren(); + } + } + return deserializedPageAsset; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAssetRedirectType.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAssetRedirectType.java new file mode 100644 index 000000000000..e5c49c9623a3 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAssetRedirectType.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The redirect type of a page. + */ +public final class PageAssetRedirectType extends ExpandableStringEnum { + + /** + * Static value httpHeader for PageAssetRedirectType. + */ + @Generated + public static final PageAssetRedirectType HTTP_HEADER = fromString("httpHeader"); + + /** + * Static value metaRefresh for PageAssetRedirectType. + */ + @Generated + public static final PageAssetRedirectType META_REFRESH = fromString("metaRefresh"); + + /** + * Static value javascript for PageAssetRedirectType. + */ + @Generated + public static final PageAssetRedirectType JAVASCRIPT = fromString("javascript"); + + /** + * Static value final for PageAssetRedirectType. + */ + @Generated + public static final PageAssetRedirectType FINAL = fromString("final"); + + /** + * Creates a new instance of PageAssetRedirectType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public PageAssetRedirectType() { + } + + /** + * Creates or finds a PageAssetRedirectType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PageAssetRedirectType. + */ + @Generated + public static PageAssetRedirectType fromString(String name) { + return fromString(name, PageAssetRedirectType.class); + } + + /** + * Gets known PageAssetRedirectType values. + * + * @return known PageAssetRedirectType values. + */ + @Generated + public static Collection values() { + return values(PageAssetRedirectType.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAssetResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAssetResource.java new file mode 100644 index 000000000000..f505f3e33fa6 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageAssetResource.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The PageAssetResource model. + */ +@Immutable +public final class PageAssetResource extends AssetResource { + + /* + * Discriminator property for AssetResource. + */ + @Generated + private String kind = "page"; + + /* + * asset + */ + @Generated + private final PageAsset asset; + + /** + * Creates an instance of PageAssetResource class. + * + * @param asset the asset value to set. + */ + @Generated + private PageAssetResource(PageAsset asset) { + this.asset = asset; + } + + /** + * Get the kind property: Discriminator property for AssetResource. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the asset property: asset. + * + * @return the asset value. + */ + @Generated + public PageAsset getAsset() { + return this.asset; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("uuid", getUuid()); + jsonWriter.writeStringField("createdDate", + getCreatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getCreatedDate())); + jsonWriter.writeStringField("updatedDate", + getUpdatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getUpdatedDate())); + jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); + jsonWriter.writeStringField("externalId", getExternalId()); + jsonWriter.writeArrayField("labels", getLabels(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("wildcard", isWildcard()); + jsonWriter.writeStringField("discoGroupName", getDiscoGroupName()); + jsonWriter.writeArrayField("auditTrail", getAuditTrail(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("reason", getReason()); + jsonWriter.writeJsonField("asset", this.asset); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PageAssetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PageAssetResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PageAssetResource. + */ + @Generated + public static PageAssetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + String name = null; + String displayName = null; + String uuid = null; + OffsetDateTime createdDate = null; + OffsetDateTime updatedDate = null; + AssetState state = null; + String externalId = null; + List labels = null; + Boolean wildcard = null; + String discoGroupName = null; + List auditTrail = null; + String reason = null; + PageAsset asset = null; + String kind = "page"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("uuid".equals(fieldName)) { + uuid = reader.getString(); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + state = AssetState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + labels = reader.readArray(reader1 -> reader1.getString()); + } else if ("wildcard".equals(fieldName)) { + wildcard = reader.getNullable(JsonReader::getBoolean); + } else if ("discoGroupName".equals(fieldName)) { + discoGroupName = reader.getString(); + } else if ("auditTrail".equals(fieldName)) { + auditTrail = reader.readArray(reader1 -> AuditTrailItem.fromJson(reader1)); + } else if ("reason".equals(fieldName)) { + reason = reader.getString(); + } else if ("asset".equals(fieldName)) { + asset = PageAsset.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + PageAssetResource deserializedPageAssetResource = new PageAssetResource(asset); + deserializedPageAssetResource.setId(id); + deserializedPageAssetResource.setName(name); + deserializedPageAssetResource.setDisplayName(displayName); + deserializedPageAssetResource.setUuid(uuid); + deserializedPageAssetResource.setCreatedDate(createdDate); + deserializedPageAssetResource.setUpdatedDate(updatedDate); + deserializedPageAssetResource.setState(state); + deserializedPageAssetResource.setExternalId(externalId); + deserializedPageAssetResource.setLabels(labels); + deserializedPageAssetResource.setWildcard(wildcard); + deserializedPageAssetResource.setDiscoGroupName(discoGroupName); + deserializedPageAssetResource.setAuditTrail(auditTrail); + deserializedPageAssetResource.setReason(reason); + deserializedPageAssetResource.kind = kind; + return deserializedPageAssetResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageCause.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageCause.java new file mode 100644 index 000000000000..528eb0cd220c --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/PageCause.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The PageCause model. + */ +@Immutable +public final class PageCause implements JsonSerializable { + + /* + * The cause property. + */ + @Generated + private String cause; + + /* + * The causeElementXPath property. + */ + @Generated + private String causeElementXPath; + + /* + * The location property. + */ + @Generated + private String location; + + /* + * The possibleMatches property. + */ + @Generated + private Integer possibleMatches; + + /* + * The loopDetected property. + */ + @Generated + private Boolean loopDetected; + + /* + * The version property. + */ + @Generated + private Integer version; + + /* + * The domChangeIndex property. + */ + @Generated + private Integer domChangeIndex; + + /** + * Creates an instance of PageCause class. + */ + @Generated + private PageCause() { + } + + /** + * Get the cause property: The cause property. + * + * @return the cause value. + */ + @Generated + public String getCause() { + return this.cause; + } + + /** + * Get the causeElementXPath property: The causeElementXPath property. + * + * @return the causeElementXPath value. + */ + @Generated + public String getCauseElementXPath() { + return this.causeElementXPath; + } + + /** + * Get the location property: The location property. + * + * @return the location value. + */ + @Generated + public String getLocation() { + return this.location; + } + + /** + * Get the possibleMatches property: The possibleMatches property. + * + * @return the possibleMatches value. + */ + @Generated + public Integer getPossibleMatches() { + return this.possibleMatches; + } + + /** + * Get the loopDetected property: The loopDetected property. + * + * @return the loopDetected value. + */ + @Generated + public Boolean isLoopDetected() { + return this.loopDetected; + } + + /** + * Get the version property: The version property. + * + * @return the version value. + */ + @Generated + public Integer getVersion() { + return this.version; + } + + /** + * Get the domChangeIndex property: The domChangeIndex property. + * + * @return the domChangeIndex value. + */ + @Generated + public Integer getDomChangeIndex() { + return this.domChangeIndex; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("cause", this.cause); + jsonWriter.writeStringField("causeElementXPath", this.causeElementXPath); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeNumberField("possibleMatches", this.possibleMatches); + jsonWriter.writeBooleanField("loopDetected", this.loopDetected); + jsonWriter.writeNumberField("version", this.version); + jsonWriter.writeNumberField("domChangeIndex", this.domChangeIndex); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PageCause from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PageCause if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the PageCause. + */ + @Generated + public static PageCause fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PageCause deserializedPageCause = new PageCause(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("cause".equals(fieldName)) { + deserializedPageCause.cause = reader.getString(); + } else if ("causeElementXPath".equals(fieldName)) { + deserializedPageCause.causeElementXPath = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPageCause.location = reader.getString(); + } else if ("possibleMatches".equals(fieldName)) { + deserializedPageCause.possibleMatches = reader.getNullable(JsonReader::getInt); + } else if ("loopDetected".equals(fieldName)) { + deserializedPageCause.loopDetected = reader.getNullable(JsonReader::getBoolean); + } else if ("version".equals(fieldName)) { + deserializedPageCause.version = reader.getNullable(JsonReader::getInt); + } else if ("domChangeIndex".equals(fieldName)) { + deserializedPageCause.domChangeIndex = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + return deserializedPageCause; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Port.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Port.java new file mode 100644 index 000000000000..24a4da0e90af --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Port.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The Port model. + */ +@Immutable +public final class Port implements JsonSerializable { + + /* + * The port property. + */ + @Generated + private Integer port; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /** + * Creates an instance of Port class. + */ + @Generated + private Port() { + } + + /** + * Get the port property: The port property. + * + * @return the port value. + */ + @Generated + public Integer getPort() { + return this.port; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("port", this.port); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Port from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Port if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Port. + */ + @Generated + public static Port fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Port deserializedPort = new Port(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("port".equals(fieldName)) { + deserializedPort.port = reader.getNullable(JsonReader::getInt); + } else if ("firstSeen".equals(fieldName)) { + deserializedPort.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedPort.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedPort.count = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + return deserializedPort; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotRequest.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotRequest.java new file mode 100644 index 000000000000..b0cc57d13e58 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotRequest.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A request body used to retrieve an asset report snapshot. + */ +@Fluent +public final class ReportAssetSnapshotRequest implements JsonSerializable { + + /* + * The metric to retrieve a snapshot for. + */ + @Generated + private String metric; + + /* + * The name of the label to retrieve a snapshot for. + */ + @Generated + private String labelName; + + /* + * The number of assets per page. + */ + @Generated + private Integer size; + + /* + * The page to retrieve. + */ + @Generated + private Integer page; + + /** + * Creates an instance of ReportAssetSnapshotRequest class. + */ + @Generated + public ReportAssetSnapshotRequest() { + } + + /** + * Get the metric property: The metric to retrieve a snapshot for. + * + * @return the metric value. + */ + @Generated + public String getMetric() { + return this.metric; + } + + /** + * Set the metric property: The metric to retrieve a snapshot for. + * + * @param metric the metric value to set. + * @return the ReportAssetSnapshotRequest object itself. + */ + @Generated + public ReportAssetSnapshotRequest setMetric(String metric) { + this.metric = metric; + return this; + } + + /** + * Get the labelName property: The name of the label to retrieve a snapshot for. + * + * @return the labelName value. + */ + @Generated + public String getLabelName() { + return this.labelName; + } + + /** + * Set the labelName property: The name of the label to retrieve a snapshot for. + * + * @param labelName the labelName value to set. + * @return the ReportAssetSnapshotRequest object itself. + */ + @Generated + public ReportAssetSnapshotRequest setLabelName(String labelName) { + this.labelName = labelName; + return this; + } + + /** + * Get the size property: The number of assets per page. + * + * @return the size value. + */ + @Generated + public Integer getSize() { + return this.size; + } + + /** + * Set the size property: The number of assets per page. + * + * @param size the size value to set. + * @return the ReportAssetSnapshotRequest object itself. + */ + @Generated + public ReportAssetSnapshotRequest setSize(Integer size) { + this.size = size; + return this; + } + + /** + * Get the page property: The page to retrieve. + * + * @return the page value. + */ + @Generated + public Integer getPage() { + return this.page; + } + + /** + * Set the page property: The page to retrieve. + * + * @param page the page value to set. + * @return the ReportAssetSnapshotRequest object itself. + */ + @Generated + public ReportAssetSnapshotRequest setPage(Integer page) { + this.page = page; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("metric", this.metric); + jsonWriter.writeStringField("labelName", this.labelName); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeNumberField("page", this.page); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReportAssetSnapshotRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReportAssetSnapshotRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReportAssetSnapshotRequest. + */ + @Generated + public static ReportAssetSnapshotRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReportAssetSnapshotRequest deserializedReportAssetSnapshotRequest = new ReportAssetSnapshotRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("metric".equals(fieldName)) { + deserializedReportAssetSnapshotRequest.metric = reader.getString(); + } else if ("labelName".equals(fieldName)) { + deserializedReportAssetSnapshotRequest.labelName = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedReportAssetSnapshotRequest.size = reader.getNullable(JsonReader::getInt); + } else if ("page".equals(fieldName)) { + deserializedReportAssetSnapshotRequest.page = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + return deserializedReportAssetSnapshotRequest; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotResult.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotResult.java new file mode 100644 index 000000000000..7207ae58f693 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotResult.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * A snapshot of assets captured daily for the provided metric. Asset details only contain primary properties. Detailed + * asset data can be retrieved from the asset endpoints. + */ +@Immutable +public final class ReportAssetSnapshotResult implements JsonSerializable { + + /* + * The name of the metric. + */ + @Generated + private String displayName; + + /* + * The unique metric name. + */ + @Generated + private String metric; + + /* + * The customer label that was filtered on, if one was provided. + */ + @Generated + private String labelName; + + /* + * The last time this asset data was updated on this metric. + */ + @Generated + private OffsetDateTime updatedAt; + + /* + * A description of what the metric represents. + */ + @Generated + private String description; + + /* + * The page of assets that match the provided metric. + */ + @Generated + private AssetPageResult assets; + + /** + * Creates an instance of ReportAssetSnapshotResult class. + */ + @Generated + private ReportAssetSnapshotResult() { + } + + /** + * Get the displayName property: The name of the metric. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Get the metric property: The unique metric name. + * + * @return the metric value. + */ + @Generated + public String getMetric() { + return this.metric; + } + + /** + * Get the labelName property: The customer label that was filtered on, if one was provided. + * + * @return the labelName value. + */ + @Generated + public String getLabelName() { + return this.labelName; + } + + /** + * Get the updatedAt property: The last time this asset data was updated on this metric. + * + * @return the updatedAt value. + */ + @Generated + public OffsetDateTime getUpdatedAt() { + return this.updatedAt; + } + + /** + * Get the description property: A description of what the metric represents. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Get the assets property: The page of assets that match the provided metric. + * + * @return the assets value. + */ + @Generated + public AssetPageResult getAssets() { + return this.assets; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("metric", this.metric); + jsonWriter.writeStringField("labelName", this.labelName); + jsonWriter.writeStringField("updatedAt", + this.updatedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.updatedAt)); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeJsonField("assets", this.assets); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReportAssetSnapshotResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReportAssetSnapshotResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReportAssetSnapshotResult. + */ + @Generated + public static ReportAssetSnapshotResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReportAssetSnapshotResult deserializedReportAssetSnapshotResult = new ReportAssetSnapshotResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("displayName".equals(fieldName)) { + deserializedReportAssetSnapshotResult.displayName = reader.getString(); + } else if ("metric".equals(fieldName)) { + deserializedReportAssetSnapshotResult.metric = reader.getString(); + } else if ("labelName".equals(fieldName)) { + deserializedReportAssetSnapshotResult.labelName = reader.getString(); + } else if ("updatedAt".equals(fieldName)) { + deserializedReportAssetSnapshotResult.updatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("description".equals(fieldName)) { + deserializedReportAssetSnapshotResult.description = reader.getString(); + } else if ("assets".equals(fieldName)) { + deserializedReportAssetSnapshotResult.assets = AssetPageResult.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedReportAssetSnapshotResult; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryRequest.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryRequest.java new file mode 100644 index 000000000000..0322a804f593 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryRequest.java @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A request body used to retrieve summary asset information. One and only one collection of summary identifiers must be + * provided: filters, metrics, or metricCategories. + */ +@Fluent +public final class ReportAssetSummaryRequest implements JsonSerializable { + + /* + * Categories to retrieve risk reporting data for. + */ + @Generated + private List metricCategories; + + /* + * Metrics to retrieve risk reporting data for. + */ + @Generated + private List metrics; + + /* + * Query filters to apply to the asset summary. + */ + @Generated + private List filters; + + /* + * A parameter to group the assets by (first level facet field), only used when the chosen summary identifier is + * filters. + */ + @Generated + private String groupBy; + + /* + * A parameter to segment the assets by (second level facet field), only used when the chosen summary identifier is + * filters. + */ + @Generated + private String segmentBy; + + /* + * Currently unused. + */ + @Generated + private String labelName; + + /** + * Creates an instance of ReportAssetSummaryRequest class. + */ + @Generated + public ReportAssetSummaryRequest() { + } + + /** + * Get the metricCategories property: Categories to retrieve risk reporting data for. + * + * @return the metricCategories value. + */ + @Generated + public List getMetricCategories() { + return this.metricCategories; + } + + /** + * Set the metricCategories property: Categories to retrieve risk reporting data for. + * + * @param metricCategories the metricCategories value to set. + * @return the ReportAssetSummaryRequest object itself. + */ + @Generated + public ReportAssetSummaryRequest setMetricCategories(List metricCategories) { + this.metricCategories = metricCategories; + return this; + } + + /** + * Get the metrics property: Metrics to retrieve risk reporting data for. + * + * @return the metrics value. + */ + @Generated + public List getMetrics() { + return this.metrics; + } + + /** + * Set the metrics property: Metrics to retrieve risk reporting data for. + * + * @param metrics the metrics value to set. + * @return the ReportAssetSummaryRequest object itself. + */ + @Generated + public ReportAssetSummaryRequest setMetrics(List metrics) { + this.metrics = metrics; + return this; + } + + /** + * Get the filters property: Query filters to apply to the asset summary. + * + * @return the filters value. + */ + @Generated + public List getFilters() { + return this.filters; + } + + /** + * Set the filters property: Query filters to apply to the asset summary. + * + * @param filters the filters value to set. + * @return the ReportAssetSummaryRequest object itself. + */ + @Generated + public ReportAssetSummaryRequest setFilters(List filters) { + this.filters = filters; + return this; + } + + /** + * Get the groupBy property: A parameter to group the assets by (first level facet field), only used when the chosen + * summary identifier is filters. + * + * @return the groupBy value. + */ + @Generated + public String getGroupBy() { + return this.groupBy; + } + + /** + * Set the groupBy property: A parameter to group the assets by (first level facet field), only used when the chosen + * summary identifier is filters. + * + * @param groupBy the groupBy value to set. + * @return the ReportAssetSummaryRequest object itself. + */ + @Generated + public ReportAssetSummaryRequest setGroupBy(String groupBy) { + this.groupBy = groupBy; + return this; + } + + /** + * Get the segmentBy property: A parameter to segment the assets by (second level facet field), only used when the + * chosen summary identifier is filters. + * + * @return the segmentBy value. + */ + @Generated + public String getSegmentBy() { + return this.segmentBy; + } + + /** + * Set the segmentBy property: A parameter to segment the assets by (second level facet field), only used when the + * chosen summary identifier is filters. + * + * @param segmentBy the segmentBy value to set. + * @return the ReportAssetSummaryRequest object itself. + */ + @Generated + public ReportAssetSummaryRequest setSegmentBy(String segmentBy) { + this.segmentBy = segmentBy; + return this; + } + + /** + * Get the labelName property: Currently unused. + * + * @return the labelName value. + */ + @Generated + public String getLabelName() { + return this.labelName; + } + + /** + * Set the labelName property: Currently unused. + * + * @param labelName the labelName value to set. + * @return the ReportAssetSummaryRequest object itself. + */ + @Generated + public ReportAssetSummaryRequest setLabelName(String labelName) { + this.labelName = labelName; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("metricCategories", this.metricCategories, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("metrics", this.metrics, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("filters", this.filters, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("groupBy", this.groupBy); + jsonWriter.writeStringField("segmentBy", this.segmentBy); + jsonWriter.writeStringField("labelName", this.labelName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReportAssetSummaryRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReportAssetSummaryRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReportAssetSummaryRequest. + */ + @Generated + public static ReportAssetSummaryRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReportAssetSummaryRequest deserializedReportAssetSummaryRequest = new ReportAssetSummaryRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("metricCategories".equals(fieldName)) { + List metricCategories = reader.readArray(reader1 -> reader1.getString()); + deserializedReportAssetSummaryRequest.metricCategories = metricCategories; + } else if ("metrics".equals(fieldName)) { + List metrics = reader.readArray(reader1 -> reader1.getString()); + deserializedReportAssetSummaryRequest.metrics = metrics; + } else if ("filters".equals(fieldName)) { + List filters = reader.readArray(reader1 -> reader1.getString()); + deserializedReportAssetSummaryRequest.filters = filters; + } else if ("groupBy".equals(fieldName)) { + deserializedReportAssetSummaryRequest.groupBy = reader.getString(); + } else if ("segmentBy".equals(fieldName)) { + deserializedReportAssetSummaryRequest.segmentBy = reader.getString(); + } else if ("labelName".equals(fieldName)) { + deserializedReportAssetSummaryRequest.labelName = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedReportAssetSummaryRequest; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryResult.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryResult.java new file mode 100644 index 000000000000..94e8f3ee0e3f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryResult.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The ReportAssetSummaryResult model. + */ +@Immutable +public final class ReportAssetSummaryResult implements JsonSerializable { + + /* + * The collection of asset summaries. + */ + @Generated + private List assetSummaries; + + /** + * Creates an instance of ReportAssetSummaryResult class. + */ + @Generated + private ReportAssetSummaryResult() { + } + + /** + * Get the assetSummaries property: The collection of asset summaries. + * + * @return the assetSummaries value. + */ + @Generated + public List getAssetSummaries() { + return this.assetSummaries; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("assetSummaries", this.assetSummaries, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReportAssetSummaryResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReportAssetSummaryResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReportAssetSummaryResult. + */ + @Generated + public static ReportAssetSummaryResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReportAssetSummaryResult deserializedReportAssetSummaryResult = new ReportAssetSummaryResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("assetSummaries".equals(fieldName)) { + List assetSummaries + = reader.readArray(reader1 -> AssetSummaryResult.fromJson(reader1)); + deserializedReportAssetSummaryResult.assetSummaries = assetSummaries; + } else { + reader.skipChildren(); + } + } + return deserializedReportAssetSummaryResult; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdown.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdown.java new file mode 100644 index 000000000000..ae0c727688a1 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdown.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The breakdown of billable asset counts for each asset type. + */ +@Immutable +public final class ReportBillableAssetBreakdown implements JsonSerializable { + + /* + * The kind of billable asset. + */ + @Generated + private ReportBillableAssetBreakdownKind kind; + + /* + * The number of assets of this type. + */ + @Generated + private Long count; + + /** + * Creates an instance of ReportBillableAssetBreakdown class. + */ + @Generated + private ReportBillableAssetBreakdown() { + } + + /** + * Get the kind property: The kind of billable asset. + * + * @return the kind value. + */ + @Generated + public ReportBillableAssetBreakdownKind getKind() { + return this.kind; + } + + /** + * Get the count property: The number of assets of this type. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeNumberField("count", this.count); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReportBillableAssetBreakdown from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReportBillableAssetBreakdown if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReportBillableAssetBreakdown. + */ + @Generated + public static ReportBillableAssetBreakdown fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReportBillableAssetBreakdown deserializedReportBillableAssetBreakdown = new ReportBillableAssetBreakdown(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("kind".equals(fieldName)) { + deserializedReportBillableAssetBreakdown.kind + = ReportBillableAssetBreakdownKind.fromString(reader.getString()); + } else if ("count".equals(fieldName)) { + deserializedReportBillableAssetBreakdown.count = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + return deserializedReportBillableAssetBreakdown; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdownKind.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdownKind.java new file mode 100644 index 000000000000..46dc3b743401 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdownKind.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The kind of billable asset. + */ +public final class ReportBillableAssetBreakdownKind extends ExpandableStringEnum { + + /** + * Static value domain for ReportBillableAssetBreakdownKind. + */ + @Generated + public static final ReportBillableAssetBreakdownKind DOMAIN = fromString("domain"); + + /** + * Static value host for ReportBillableAssetBreakdownKind. + */ + @Generated + public static final ReportBillableAssetBreakdownKind HOST = fromString("host"); + + /** + * Static value ipAddress for ReportBillableAssetBreakdownKind. + */ + @Generated + public static final ReportBillableAssetBreakdownKind IP_ADDRESS = fromString("ipAddress"); + + /** + * Creates a new instance of ReportBillableAssetBreakdownKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ReportBillableAssetBreakdownKind() { + } + + /** + * Creates or finds a ReportBillableAssetBreakdownKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ReportBillableAssetBreakdownKind. + */ + @Generated + public static ReportBillableAssetBreakdownKind fromString(String name) { + return fromString(name, ReportBillableAssetBreakdownKind.class); + } + + /** + * Gets known ReportBillableAssetBreakdownKind values. + * + * @return known ReportBillableAssetBreakdownKind values. + */ + @Generated + public static Collection values() { + return values(ReportBillableAssetBreakdownKind.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSnapshotResult.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSnapshotResult.java new file mode 100644 index 000000000000..25c3747906ad --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSnapshotResult.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.List; +import java.util.Objects; + +/** + * The ReportBillableAssetSnapshotResult model. + */ +@Immutable +public final class ReportBillableAssetSnapshotResult implements JsonSerializable { + + /* + * The date these assets were billed on. + */ + @Generated + private LocalDate date; + + /* + * The total number of billable assets for this date. + */ + @Generated + private Long total; + + /* + * The breakdown of billable asset counts for each asset type. + */ + @Generated + private List assetBreakdown; + + /** + * Creates an instance of ReportBillableAssetSnapshotResult class. + */ + @Generated + private ReportBillableAssetSnapshotResult() { + } + + /** + * Get the date property: The date these assets were billed on. + * + * @return the date value. + */ + @Generated + public LocalDate getDate() { + return this.date; + } + + /** + * Get the total property: The total number of billable assets for this date. + * + * @return the total value. + */ + @Generated + public Long getTotal() { + return this.total; + } + + /** + * Get the assetBreakdown property: The breakdown of billable asset counts for each asset type. + * + * @return the assetBreakdown value. + */ + @Generated + public List getAssetBreakdown() { + return this.assetBreakdown; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("date", Objects.toString(this.date, null)); + jsonWriter.writeNumberField("total", this.total); + jsonWriter.writeArrayField("assetBreakdown", this.assetBreakdown, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReportBillableAssetSnapshotResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReportBillableAssetSnapshotResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReportBillableAssetSnapshotResult. + */ + @Generated + public static ReportBillableAssetSnapshotResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReportBillableAssetSnapshotResult deserializedReportBillableAssetSnapshotResult + = new ReportBillableAssetSnapshotResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("date".equals(fieldName)) { + deserializedReportBillableAssetSnapshotResult.date + = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); + } else if ("total".equals(fieldName)) { + deserializedReportBillableAssetSnapshotResult.total = reader.getNullable(JsonReader::getLong); + } else if ("assetBreakdown".equals(fieldName)) { + List assetBreakdown + = reader.readArray(reader1 -> ReportBillableAssetBreakdown.fromJson(reader1)); + deserializedReportBillableAssetSnapshotResult.assetBreakdown = assetBreakdown; + } else { + reader.skipChildren(); + } + } + return deserializedReportBillableAssetSnapshotResult; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSummaryResult.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSummaryResult.java new file mode 100644 index 000000000000..11db6f9232b1 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSummaryResult.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The ReportBillableAssetSummaryResult model. + */ +@Immutable +public final class ReportBillableAssetSummaryResult implements JsonSerializable { + + /* + * The assetSummaries property. + */ + @Generated + private List assetSummaries; + + /** + * Creates an instance of ReportBillableAssetSummaryResult class. + */ + @Generated + private ReportBillableAssetSummaryResult() { + } + + /** + * Get the assetSummaries property: The assetSummaries property. + * + * @return the assetSummaries value. + */ + @Generated + public List getAssetSummaries() { + return this.assetSummaries; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("assetSummaries", this.assetSummaries, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReportBillableAssetSummaryResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReportBillableAssetSummaryResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReportBillableAssetSummaryResult. + */ + @Generated + public static ReportBillableAssetSummaryResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReportBillableAssetSummaryResult deserializedReportBillableAssetSummaryResult + = new ReportBillableAssetSummaryResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("assetSummaries".equals(fieldName)) { + List assetSummaries + = reader.readArray(reader1 -> ReportBillableAssetSnapshotResult.fromJson(reader1)); + deserializedReportBillableAssetSummaryResult.assetSummaries = assetSummaries; + } else { + reader.skipChildren(); + } + } + return deserializedReportBillableAssetSummaryResult; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Reputation.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Reputation.java new file mode 100644 index 000000000000..7010be593b72 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Reputation.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The Reputation model. + */ +@Immutable +public final class Reputation implements JsonSerializable { + + /* + * The listName property. + */ + @Generated + private String listName; + + /* + * The threatType property. + */ + @Generated + private String threatType; + + /* + * The trusted property. + */ + @Generated + private Boolean trusted; + + /* + * The cidr property. + */ + @Generated + private String cidr; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The listUpdatedAt property. + */ + @Generated + private OffsetDateTime listUpdatedAt; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /** + * Creates an instance of Reputation class. + */ + @Generated + private Reputation() { + } + + /** + * Get the listName property: The listName property. + * + * @return the listName value. + */ + @Generated + public String getListName() { + return this.listName; + } + + /** + * Get the threatType property: The threatType property. + * + * @return the threatType value. + */ + @Generated + public String getThreatType() { + return this.threatType; + } + + /** + * Get the trusted property: The trusted property. + * + * @return the trusted value. + */ + @Generated + public Boolean isTrusted() { + return this.trusted; + } + + /** + * Get the cidr property: The cidr property. + * + * @return the cidr value. + */ + @Generated + public String getCidr() { + return this.cidr; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the listUpdatedAt property: The listUpdatedAt property. + * + * @return the listUpdatedAt value. + */ + @Generated + public OffsetDateTime getListUpdatedAt() { + return this.listUpdatedAt; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("listName", this.listName); + jsonWriter.writeStringField("threatType", this.threatType); + jsonWriter.writeBooleanField("trusted", this.trusted); + jsonWriter.writeStringField("cidr", this.cidr); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeStringField("listUpdatedAt", + this.listUpdatedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.listUpdatedAt)); + jsonWriter.writeBooleanField("recent", this.recent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Reputation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Reputation if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Reputation. + */ + @Generated + public static Reputation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Reputation deserializedReputation = new Reputation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("listName".equals(fieldName)) { + deserializedReputation.listName = reader.getString(); + } else if ("threatType".equals(fieldName)) { + deserializedReputation.threatType = reader.getString(); + } else if ("trusted".equals(fieldName)) { + deserializedReputation.trusted = reader.getNullable(JsonReader::getBoolean); + } else if ("cidr".equals(fieldName)) { + deserializedReputation.cidr = reader.getString(); + } else if ("firstSeen".equals(fieldName)) { + deserializedReputation.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedReputation.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("listUpdatedAt".equals(fieldName)) { + deserializedReputation.listUpdatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("recent".equals(fieldName)) { + deserializedReputation.recent = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedReputation; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ResourceUrl.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ResourceUrl.java new file mode 100644 index 000000000000..92e76302f01b --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ResourceUrl.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The ResourceUrl model. + */ +@Immutable +public final class ResourceUrl implements JsonSerializable { + + /* + * The url property. + */ + @Generated + private String url; + + /* + * The resources property. + */ + @Generated + private List resources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /** + * Creates an instance of ResourceUrl class. + */ + @Generated + private ResourceUrl() { + } + + /** + * Get the url property: The url property. + * + * @return the url value. + */ + @Generated + public String getUrl() { + return this.url; + } + + /** + * Get the resources property: The resources property. + * + * @return the resources value. + */ + @Generated + public List getResources() { + return this.resources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeArrayField("resources", this.resources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("recent", this.recent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceUrl from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceUrl if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceUrl. + */ + @Generated + public static ResourceUrl fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceUrl deserializedResourceUrl = new ResourceUrl(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("url".equals(fieldName)) { + deserializedResourceUrl.url = reader.getString(); + } else if ("resources".equals(fieldName)) { + List resources + = reader.readArray(reader1 -> DependentResource.fromJson(reader1)); + deserializedResourceUrl.resources = resources; + } else if ("firstSeen".equals(fieldName)) { + deserializedResourceUrl.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedResourceUrl.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedResourceUrl.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedResourceUrl.recent = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedResourceUrl; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SavedFilter.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SavedFilter.java new file mode 100644 index 000000000000..d32cd2a92357 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SavedFilter.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The SavedFilter model. + */ +@Immutable +public final class SavedFilter implements JsonSerializable { + + /* + * This is typically the same as the name but might be different for different models. + */ + @Generated + private String id; + + /* + * The caller provided unique name for the resource. + */ + @Generated + private String name; + + /* + * The name that can be used for display purposes. + */ + @Generated + private String displayName; + + /* + * The filter property. + */ + @Generated + private String filter; + + /* + * The description property. + */ + @Generated + private String description; + + /** + * Creates an instance of SavedFilter class. + */ + @Generated + private SavedFilter() { + } + + /** + * Get the id property: This is typically the same as the name but might be different for different models. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the name property: The caller provided unique name for the resource. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the displayName property: The name that can be used for display purposes. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Get the filter property: The filter property. + * + * @return the filter value. + */ + @Generated + public String getFilter() { + return this.filter; + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("filter", this.filter); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SavedFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SavedFilter if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SavedFilter. + */ + @Generated + public static SavedFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SavedFilter deserializedSavedFilter = new SavedFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + deserializedSavedFilter.name = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedSavedFilter.id = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedSavedFilter.displayName = reader.getString(); + } else if ("filter".equals(fieldName)) { + deserializedSavedFilter.filter = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedSavedFilter.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedSavedFilter; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SavedFilterData.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SavedFilterData.java new file mode 100644 index 000000000000..953bfe782235 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SavedFilterData.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A request body used to create a saved filter. + */ +@Immutable +public final class SavedFilterData implements JsonSerializable { + + /* + * An expression on the resource type that selects the resources to be returned. + */ + @Generated + private final String filter; + + /* + * A human readable description of the saved filter. + */ + @Generated + private final String description; + + /** + * Creates an instance of SavedFilterData class. + * + * @param filter the filter value to set. + * @param description the description value to set. + */ + @Generated + public SavedFilterData(String filter, String description) { + this.filter = filter; + this.description = description; + } + + /** + * Get the filter property: An expression on the resource type that selects the resources to be returned. + * + * @return the filter value. + */ + @Generated + public String getFilter() { + return this.filter; + } + + /** + * Get the description property: A human readable description of the saved filter. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filter", this.filter); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SavedFilterData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SavedFilterData if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SavedFilterData. + */ + @Generated + public static SavedFilterData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String filter = null; + String description = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("filter".equals(fieldName)) { + filter = reader.getString(); + } else if ("description".equals(fieldName)) { + description = reader.getString(); + } else { + reader.skipChildren(); + } + } + return new SavedFilterData(filter, description); + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ScanMetadata.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ScanMetadata.java new file mode 100644 index 000000000000..9da1fbcb97d7 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ScanMetadata.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The ScanMetadata model. + */ +@Immutable +public final class ScanMetadata implements JsonSerializable { + + /* + * The port property. + */ + @Generated + private Integer port; + + /* + * The bannerMetadata property. + */ + @Generated + private String bannerMetadata; + + /* + * The startScan property. + */ + @Generated + private OffsetDateTime startScan; + + /* + * The endScan property. + */ + @Generated + private OffsetDateTime endScan; + + /** + * Creates an instance of ScanMetadata class. + */ + @Generated + private ScanMetadata() { + } + + /** + * Get the port property: The port property. + * + * @return the port value. + */ + @Generated + public Integer getPort() { + return this.port; + } + + /** + * Get the bannerMetadata property: The bannerMetadata property. + * + * @return the bannerMetadata value. + */ + @Generated + public String getBannerMetadata() { + return this.bannerMetadata; + } + + /** + * Get the startScan property: The startScan property. + * + * @return the startScan value. + */ + @Generated + public OffsetDateTime getStartScan() { + return this.startScan; + } + + /** + * Get the endScan property: The endScan property. + * + * @return the endScan value. + */ + @Generated + public OffsetDateTime getEndScan() { + return this.endScan; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("port", this.port); + jsonWriter.writeStringField("bannerMetadata", this.bannerMetadata); + jsonWriter.writeStringField("startScan", + this.startScan == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startScan)); + jsonWriter.writeStringField("endScan", + this.endScan == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endScan)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScanMetadata from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScanMetadata if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ScanMetadata. + */ + @Generated + public static ScanMetadata fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScanMetadata deserializedScanMetadata = new ScanMetadata(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("port".equals(fieldName)) { + deserializedScanMetadata.port = reader.getNullable(JsonReader::getInt); + } else if ("bannerMetadata".equals(fieldName)) { + deserializedScanMetadata.bannerMetadata = reader.getString(); + } else if ("startScan".equals(fieldName)) { + deserializedScanMetadata.startScan = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endScan".equals(fieldName)) { + deserializedScanMetadata.endScan = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + return deserializedScanMetadata; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Service.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Service.java new file mode 100644 index 000000000000..2d27f688079b --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Service.java @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The Service model. + */ +@Immutable +public final class Service implements JsonSerializable { + + /* + * The scheme property. + */ + @Generated + private String scheme; + + /* + * The port property. + */ + @Generated + private Integer port; + + /* + * The webComponents property. + */ + @Generated + private List webComponents; + + /* + * The sslCerts property. + */ + @Generated + private List sslCerts; + + /* + * The exceptions property. + */ + @Generated + private List exceptions; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The portStates property. + */ + @Generated + private List portStates; + + /** + * Creates an instance of Service class. + */ + @Generated + private Service() { + } + + /** + * Get the scheme property: The scheme property. + * + * @return the scheme value. + */ + @Generated + public String getScheme() { + return this.scheme; + } + + /** + * Get the port property: The port property. + * + * @return the port value. + */ + @Generated + public Integer getPort() { + return this.port; + } + + /** + * Get the webComponents property: The webComponents property. + * + * @return the webComponents value. + */ + @Generated + public List getWebComponents() { + return this.webComponents; + } + + /** + * Get the sslCerts property: The sslCerts property. + * + * @return the sslCerts value. + */ + @Generated + public List getSslCerts() { + return this.sslCerts; + } + + /** + * Get the exceptions property: The exceptions property. + * + * @return the exceptions value. + */ + @Generated + public List getExceptions() { + return this.exceptions; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the portStates property: The portStates property. + * + * @return the portStates value. + */ + @Generated + public List getPortStates() { + return this.portStates; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scheme", this.scheme); + jsonWriter.writeNumberField("port", this.port); + jsonWriter.writeArrayField("webComponents", this.webComponents, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sslCerts", this.sslCerts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("exceptions", this.exceptions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("recent", this.recent); + jsonWriter.writeArrayField("portStates", this.portStates, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Service from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Service if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Service. + */ + @Generated + public static Service fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Service deserializedService = new Service(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("scheme".equals(fieldName)) { + deserializedService.scheme = reader.getString(); + } else if ("port".equals(fieldName)) { + deserializedService.port = reader.getNullable(JsonReader::getInt); + } else if ("webComponents".equals(fieldName)) { + List webComponents = reader.readArray(reader1 -> WebComponent.fromJson(reader1)); + deserializedService.webComponents = webComponents; + } else if ("sslCerts".equals(fieldName)) { + List sslCerts = reader.readArray(reader1 -> SslCertAsset.fromJson(reader1)); + deserializedService.sslCerts = sslCerts; + } else if ("exceptions".equals(fieldName)) { + List exceptions = reader.readArray(reader1 -> ObservedString.fromJson(reader1)); + deserializedService.exceptions = exceptions; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedService.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedService.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedService.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedService.count = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedService.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("portStates".equals(fieldName)) { + List portStates + = reader.readArray(reader1 -> ObservedPortState.fromJson(reader1)); + deserializedService.portStates = portStates; + } else { + reader.skipChildren(); + } + } + return deserializedService; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SoaRecord.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SoaRecord.java new file mode 100644 index 000000000000..b79b45c7c263 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SoaRecord.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The SoaRecord model. + */ +@Immutable +public final class SoaRecord implements JsonSerializable { + + /* + * The nameServer property. + */ + @Generated + private String nameServer; + + /* + * The email property. + */ + @Generated + private String email; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The serialNumber property. + */ + @Generated + private Long serialNumber; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /** + * Creates an instance of SoaRecord class. + */ + @Generated + private SoaRecord() { + } + + /** + * Get the nameServer property: The nameServer property. + * + * @return the nameServer value. + */ + @Generated + public String getNameServer() { + return this.nameServer; + } + + /** + * Get the email property: The email property. + * + * @return the email value. + */ + @Generated + public String getEmail() { + return this.email; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the serialNumber property: The serialNumber property. + * + * @return the serialNumber value. + */ + @Generated + public Long getSerialNumber() { + return this.serialNumber; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nameServer", this.nameServer); + jsonWriter.writeStringField("email", this.email); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeNumberField("serialNumber", this.serialNumber); + jsonWriter.writeBooleanField("recent", this.recent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SoaRecord from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SoaRecord if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the SoaRecord. + */ + @Generated + public static SoaRecord fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SoaRecord deserializedSoaRecord = new SoaRecord(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("nameServer".equals(fieldName)) { + deserializedSoaRecord.nameServer = reader.getString(); + } else if ("email".equals(fieldName)) { + deserializedSoaRecord.email = reader.getString(); + } else if ("firstSeen".equals(fieldName)) { + deserializedSoaRecord.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedSoaRecord.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedSoaRecord.count = reader.getNullable(JsonReader::getLong); + } else if ("serialNumber".equals(fieldName)) { + deserializedSoaRecord.serialNumber = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedSoaRecord.recent = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedSoaRecord; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Source.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Source.java new file mode 100644 index 000000000000..bcc9e9f28452 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Source.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The Source model. + */ +@Immutable +public final class Source implements JsonSerializable { + + /* + * The source property. + */ + @Generated + private String source; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The reason property. + */ + @Generated + private String reason; + + /** + * Creates an instance of Source class. + */ + @Generated + private Source() { + } + + /** + * Get the source property: The source property. + * + * @return the source value. + */ + @Generated + public String getSource() { + return this.source; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the reason property: The reason property. + * + * @return the reason value. + */ + @Generated + public String getReason() { + return this.reason; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("source", this.source); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Source from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Source if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Source. + */ + @Generated + public static Source fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Source deserializedSource = new Source(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("source".equals(fieldName)) { + deserializedSource.source = reader.getString(); + } else if ("firstSeen".equals(fieldName)) { + deserializedSource.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedSource.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedSource.count = reader.getNullable(JsonReader::getLong); + } else if ("reason".equals(fieldName)) { + deserializedSource.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedSource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAsset.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAsset.java new file mode 100644 index 000000000000..86e0c6a8631c --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAsset.java @@ -0,0 +1,729 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The SslCertAsset model. + */ +@Immutable +public final class SslCertAsset extends InventoryAsset { + + /* + * The sha1 property. + */ + @Generated + private String sha1; + + /* + * The subjectCommonNames property. + */ + @Generated + private List subjectCommonNames; + + /* + * The organizations property. + */ + @Generated + private List organizations; + + /* + * The organizationalUnits property. + */ + @Generated + private List organizationalUnits; + + /* + * The issuerCommonNames property. + */ + @Generated + private List issuerCommonNames; + + /* + * The sigAlgName property. + */ + @Generated + private String sigAlgName; + + /* + * The invalidAfter property. + */ + @Generated + private OffsetDateTime invalidAfter; + + /* + * The serialNumber property. + */ + @Generated + private String serialNumber; + + /* + * The subjectAlternativeNames property. + */ + @Generated + private List subjectAlternativeNames; + + /* + * The issuerAlternativeNames property. + */ + @Generated + private List issuerAlternativeNames; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The invalidBefore property. + */ + @Generated + private OffsetDateTime invalidBefore; + + /* + * The keySize property. + */ + @Generated + private Integer keySize; + + /* + * The keyAlgorithm property. + */ + @Generated + private String keyAlgorithm; + + /* + * The subjectLocality property. + */ + @Generated + private List subjectLocality; + + /* + * The subjectState property. + */ + @Generated + private List subjectState; + + /* + * The subjectCountry property. + */ + @Generated + private List subjectCountry; + + /* + * The issuerLocality property. + */ + @Generated + private List issuerLocality; + + /* + * The issuerState property. + */ + @Generated + private List issuerState; + + /* + * The issuerCountry property. + */ + @Generated + private List issuerCountry; + + /* + * The subjectOrganizations property. + */ + @Generated + private List subjectOrganizations; + + /* + * The subjectOrganizationalUnits property. + */ + @Generated + private List subjectOrganizationalUnits; + + /* + * The issuerOrganizations property. + */ + @Generated + private List issuerOrganizations; + + /* + * The issuerOrganizationalUnits property. + */ + @Generated + private List issuerOrganizationalUnits; + + /* + * The version property. + */ + @Generated + private Integer version; + + /* + * The certificateAuthority property. + */ + @Generated + private Boolean certificateAuthority; + + /* + * The selfSigned property. + */ + @Generated + private Boolean selfSigned; + + /* + * The sigAlgOid property. + */ + @Generated + private String sigAlgOid; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The validationType property. + */ + @Generated + private SslCertAssetValidationType validationType; + + /** + * Creates an instance of SslCertAsset class. + */ + @Generated + private SslCertAsset() { + } + + /** + * Get the sha1 property: The sha1 property. + * + * @return the sha1 value. + */ + @Generated + public String getSha1() { + return this.sha1; + } + + /** + * Get the subjectCommonNames property: The subjectCommonNames property. + * + * @return the subjectCommonNames value. + */ + @Generated + public List getSubjectCommonNames() { + return this.subjectCommonNames; + } + + /** + * Get the organizations property: The organizations property. + * + * @return the organizations value. + */ + @Generated + public List getOrganizations() { + return this.organizations; + } + + /** + * Get the organizationalUnits property: The organizationalUnits property. + * + * @return the organizationalUnits value. + */ + @Generated + public List getOrganizationalUnits() { + return this.organizationalUnits; + } + + /** + * Get the issuerCommonNames property: The issuerCommonNames property. + * + * @return the issuerCommonNames value. + */ + @Generated + public List getIssuerCommonNames() { + return this.issuerCommonNames; + } + + /** + * Get the sigAlgName property: The sigAlgName property. + * + * @return the sigAlgName value. + */ + @Generated + public String getSigAlgName() { + return this.sigAlgName; + } + + /** + * Get the invalidAfter property: The invalidAfter property. + * + * @return the invalidAfter value. + */ + @Generated + public OffsetDateTime getInvalidAfter() { + return this.invalidAfter; + } + + /** + * Get the serialNumber property: The serialNumber property. + * + * @return the serialNumber value. + */ + @Generated + public String getSerialNumber() { + return this.serialNumber; + } + + /** + * Get the subjectAlternativeNames property: The subjectAlternativeNames property. + * + * @return the subjectAlternativeNames value. + */ + @Generated + public List getSubjectAlternativeNames() { + return this.subjectAlternativeNames; + } + + /** + * Get the issuerAlternativeNames property: The issuerAlternativeNames property. + * + * @return the issuerAlternativeNames value. + */ + @Generated + public List getIssuerAlternativeNames() { + return this.issuerAlternativeNames; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the invalidBefore property: The invalidBefore property. + * + * @return the invalidBefore value. + */ + @Generated + public OffsetDateTime getInvalidBefore() { + return this.invalidBefore; + } + + /** + * Get the keySize property: The keySize property. + * + * @return the keySize value. + */ + @Generated + public Integer getKeySize() { + return this.keySize; + } + + /** + * Get the keyAlgorithm property: The keyAlgorithm property. + * + * @return the keyAlgorithm value. + */ + @Generated + public String getKeyAlgorithm() { + return this.keyAlgorithm; + } + + /** + * Get the subjectLocality property: The subjectLocality property. + * + * @return the subjectLocality value. + */ + @Generated + public List getSubjectLocality() { + return this.subjectLocality; + } + + /** + * Get the subjectState property: The subjectState property. + * + * @return the subjectState value. + */ + @Generated + public List getSubjectState() { + return this.subjectState; + } + + /** + * Get the subjectCountry property: The subjectCountry property. + * + * @return the subjectCountry value. + */ + @Generated + public List getSubjectCountry() { + return this.subjectCountry; + } + + /** + * Get the issuerLocality property: The issuerLocality property. + * + * @return the issuerLocality value. + */ + @Generated + public List getIssuerLocality() { + return this.issuerLocality; + } + + /** + * Get the issuerState property: The issuerState property. + * + * @return the issuerState value. + */ + @Generated + public List getIssuerState() { + return this.issuerState; + } + + /** + * Get the issuerCountry property: The issuerCountry property. + * + * @return the issuerCountry value. + */ + @Generated + public List getIssuerCountry() { + return this.issuerCountry; + } + + /** + * Get the subjectOrganizations property: The subjectOrganizations property. + * + * @return the subjectOrganizations value. + */ + @Generated + public List getSubjectOrganizations() { + return this.subjectOrganizations; + } + + /** + * Get the subjectOrganizationalUnits property: The subjectOrganizationalUnits property. + * + * @return the subjectOrganizationalUnits value. + */ + @Generated + public List getSubjectOrganizationalUnits() { + return this.subjectOrganizationalUnits; + } + + /** + * Get the issuerOrganizations property: The issuerOrganizations property. + * + * @return the issuerOrganizations value. + */ + @Generated + public List getIssuerOrganizations() { + return this.issuerOrganizations; + } + + /** + * Get the issuerOrganizationalUnits property: The issuerOrganizationalUnits property. + * + * @return the issuerOrganizationalUnits value. + */ + @Generated + public List getIssuerOrganizationalUnits() { + return this.issuerOrganizationalUnits; + } + + /** + * Get the version property: The version property. + * + * @return the version value. + */ + @Generated + public Integer getVersion() { + return this.version; + } + + /** + * Get the certificateAuthority property: The certificateAuthority property. + * + * @return the certificateAuthority value. + */ + @Generated + public Boolean isCertificateAuthority() { + return this.certificateAuthority; + } + + /** + * Get the selfSigned property: The selfSigned property. + * + * @return the selfSigned value. + */ + @Generated + public Boolean isSelfSigned() { + return this.selfSigned; + } + + /** + * Get the sigAlgOid property: The sigAlgOid property. + * + * @return the sigAlgOid value. + */ + @Generated + public String getSigAlgOid() { + return this.sigAlgOid; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the validationType property: The validationType property. + * + * @return the validationType value. + */ + @Generated + public SslCertAssetValidationType getValidationType() { + return this.validationType; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sha1", this.sha1); + jsonWriter.writeArrayField("subjectCommonNames", this.subjectCommonNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("organizations", this.organizations, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("organizationalUnits", this.organizationalUnits, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("issuerCommonNames", this.issuerCommonNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("sigAlgName", this.sigAlgName); + jsonWriter.writeStringField("invalidAfter", + this.invalidAfter == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.invalidAfter)); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeArrayField("subjectAlternativeNames", this.subjectAlternativeNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("issuerAlternativeNames", this.issuerAlternativeNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("invalidBefore", + this.invalidBefore == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.invalidBefore)); + jsonWriter.writeNumberField("keySize", this.keySize); + jsonWriter.writeStringField("keyAlgorithm", this.keyAlgorithm); + jsonWriter.writeArrayField("subjectLocality", this.subjectLocality, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("subjectState", this.subjectState, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("subjectCountry", this.subjectCountry, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("issuerLocality", this.issuerLocality, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("issuerState", this.issuerState, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("issuerCountry", this.issuerCountry, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("subjectOrganizations", this.subjectOrganizations, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("subjectOrganizationalUnits", this.subjectOrganizationalUnits, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("issuerOrganizations", this.issuerOrganizations, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("issuerOrganizationalUnits", this.issuerOrganizationalUnits, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("version", this.version); + jsonWriter.writeBooleanField("certificateAuthority", this.certificateAuthority); + jsonWriter.writeBooleanField("selfSigned", this.selfSigned); + jsonWriter.writeStringField("sigAlgOid", this.sigAlgOid); + jsonWriter.writeBooleanField("recent", this.recent); + jsonWriter.writeStringField("validationType", + this.validationType == null ? null : this.validationType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SslCertAsset from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SslCertAsset if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SslCertAsset. + */ + @Generated + public static SslCertAsset fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SslCertAsset deserializedSslCertAsset = new SslCertAsset(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("sha1".equals(fieldName)) { + deserializedSslCertAsset.sha1 = reader.getString(); + } else if ("subjectCommonNames".equals(fieldName)) { + List subjectCommonNames = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.subjectCommonNames = subjectCommonNames; + } else if ("organizations".equals(fieldName)) { + List organizations = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.organizations = organizations; + } else if ("organizationalUnits".equals(fieldName)) { + List organizationalUnits = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.organizationalUnits = organizationalUnits; + } else if ("issuerCommonNames".equals(fieldName)) { + List issuerCommonNames = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.issuerCommonNames = issuerCommonNames; + } else if ("sigAlgName".equals(fieldName)) { + deserializedSslCertAsset.sigAlgName = reader.getString(); + } else if ("invalidAfter".equals(fieldName)) { + deserializedSslCertAsset.invalidAfter = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("serialNumber".equals(fieldName)) { + deserializedSslCertAsset.serialNumber = reader.getString(); + } else if ("subjectAlternativeNames".equals(fieldName)) { + List subjectAlternativeNames = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.subjectAlternativeNames = subjectAlternativeNames; + } else if ("issuerAlternativeNames".equals(fieldName)) { + List issuerAlternativeNames = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.issuerAlternativeNames = issuerAlternativeNames; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedSslCertAsset.sources = sources; + } else if ("firstSeen".equals(fieldName)) { + deserializedSslCertAsset.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedSslCertAsset.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedSslCertAsset.count = reader.getNullable(JsonReader::getLong); + } else if ("invalidBefore".equals(fieldName)) { + deserializedSslCertAsset.invalidBefore = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("keySize".equals(fieldName)) { + deserializedSslCertAsset.keySize = reader.getNullable(JsonReader::getInt); + } else if ("keyAlgorithm".equals(fieldName)) { + deserializedSslCertAsset.keyAlgorithm = reader.getString(); + } else if ("subjectLocality".equals(fieldName)) { + List subjectLocality = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.subjectLocality = subjectLocality; + } else if ("subjectState".equals(fieldName)) { + List subjectState = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.subjectState = subjectState; + } else if ("subjectCountry".equals(fieldName)) { + List subjectCountry = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.subjectCountry = subjectCountry; + } else if ("issuerLocality".equals(fieldName)) { + List issuerLocality = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.issuerLocality = issuerLocality; + } else if ("issuerState".equals(fieldName)) { + List issuerState = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.issuerState = issuerState; + } else if ("issuerCountry".equals(fieldName)) { + List issuerCountry = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.issuerCountry = issuerCountry; + } else if ("subjectOrganizations".equals(fieldName)) { + List subjectOrganizations = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.subjectOrganizations = subjectOrganizations; + } else if ("subjectOrganizationalUnits".equals(fieldName)) { + List subjectOrganizationalUnits = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.subjectOrganizationalUnits = subjectOrganizationalUnits; + } else if ("issuerOrganizations".equals(fieldName)) { + List issuerOrganizations = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.issuerOrganizations = issuerOrganizations; + } else if ("issuerOrganizationalUnits".equals(fieldName)) { + List issuerOrganizationalUnits = reader.readArray(reader1 -> reader1.getString()); + deserializedSslCertAsset.issuerOrganizationalUnits = issuerOrganizationalUnits; + } else if ("version".equals(fieldName)) { + deserializedSslCertAsset.version = reader.getNullable(JsonReader::getInt); + } else if ("certificateAuthority".equals(fieldName)) { + deserializedSslCertAsset.certificateAuthority = reader.getNullable(JsonReader::getBoolean); + } else if ("selfSigned".equals(fieldName)) { + deserializedSslCertAsset.selfSigned = reader.getNullable(JsonReader::getBoolean); + } else if ("sigAlgOid".equals(fieldName)) { + deserializedSslCertAsset.sigAlgOid = reader.getString(); + } else if ("recent".equals(fieldName)) { + deserializedSslCertAsset.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("validationType".equals(fieldName)) { + deserializedSslCertAsset.validationType = SslCertAssetValidationType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + return deserializedSslCertAsset; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetResource.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetResource.java new file mode 100644 index 000000000000..e0a8f0a863a5 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetResource.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The SslCertAssetResource model. + */ +@Immutable +public final class SslCertAssetResource extends AssetResource { + + /* + * Discriminator property for AssetResource. + */ + @Generated + private String kind = "sslCert"; + + /* + * asset + */ + @Generated + private final SslCertAsset asset; + + /** + * Creates an instance of SslCertAssetResource class. + * + * @param asset the asset value to set. + */ + @Generated + private SslCertAssetResource(SslCertAsset asset) { + this.asset = asset; + } + + /** + * Get the kind property: Discriminator property for AssetResource. + * + * @return the kind value. + */ + @Generated + @Override + public String getKind() { + return this.kind; + } + + /** + * Get the asset property: asset. + * + * @return the asset value. + */ + @Generated + public SslCertAsset getAsset() { + return this.asset; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", getName()); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("uuid", getUuid()); + jsonWriter.writeStringField("createdDate", + getCreatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getCreatedDate())); + jsonWriter.writeStringField("updatedDate", + getUpdatedDate() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(getUpdatedDate())); + jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); + jsonWriter.writeStringField("externalId", getExternalId()); + jsonWriter.writeArrayField("labels", getLabels(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("wildcard", isWildcard()); + jsonWriter.writeStringField("discoGroupName", getDiscoGroupName()); + jsonWriter.writeArrayField("auditTrail", getAuditTrail(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("reason", getReason()); + jsonWriter.writeJsonField("asset", this.asset); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SslCertAssetResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SslCertAssetResource if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SslCertAssetResource. + */ + @Generated + public static SslCertAssetResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + String name = null; + String displayName = null; + String uuid = null; + OffsetDateTime createdDate = null; + OffsetDateTime updatedDate = null; + AssetState state = null; + String externalId = null; + List labels = null; + Boolean wildcard = null; + String discoGroupName = null; + List auditTrail = null; + String reason = null; + SslCertAsset asset = null; + String kind = "sslCert"; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("uuid".equals(fieldName)) { + uuid = reader.getString(); + } else if ("createdDate".equals(fieldName)) { + createdDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("updatedDate".equals(fieldName)) { + updatedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + state = AssetState.fromString(reader.getString()); + } else if ("externalId".equals(fieldName)) { + externalId = reader.getString(); + } else if ("labels".equals(fieldName)) { + labels = reader.readArray(reader1 -> reader1.getString()); + } else if ("wildcard".equals(fieldName)) { + wildcard = reader.getNullable(JsonReader::getBoolean); + } else if ("discoGroupName".equals(fieldName)) { + discoGroupName = reader.getString(); + } else if ("auditTrail".equals(fieldName)) { + auditTrail = reader.readArray(reader1 -> AuditTrailItem.fromJson(reader1)); + } else if ("reason".equals(fieldName)) { + reason = reader.getString(); + } else if ("asset".equals(fieldName)) { + asset = SslCertAsset.fromJson(reader); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + SslCertAssetResource deserializedSslCertAssetResource = new SslCertAssetResource(asset); + deserializedSslCertAssetResource.setId(id); + deserializedSslCertAssetResource.setName(name); + deserializedSslCertAssetResource.setDisplayName(displayName); + deserializedSslCertAssetResource.setUuid(uuid); + deserializedSslCertAssetResource.setCreatedDate(createdDate); + deserializedSslCertAssetResource.setUpdatedDate(updatedDate); + deserializedSslCertAssetResource.setState(state); + deserializedSslCertAssetResource.setExternalId(externalId); + deserializedSslCertAssetResource.setLabels(labels); + deserializedSslCertAssetResource.setWildcard(wildcard); + deserializedSslCertAssetResource.setDiscoGroupName(discoGroupName); + deserializedSslCertAssetResource.setAuditTrail(auditTrail); + deserializedSslCertAssetResource.setReason(reason); + deserializedSslCertAssetResource.kind = kind; + return deserializedSslCertAssetResource; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetValidationType.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetValidationType.java new file mode 100644 index 000000000000..3ee94e7a0c4c --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetValidationType.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The validation type of a Ssl certificate. + */ +public final class SslCertAssetValidationType extends ExpandableStringEnum { + + /** + * Static value domainValidation for SslCertAssetValidationType. + */ + @Generated + public static final SslCertAssetValidationType DOMAIN_VALIDATION = fromString("domainValidation"); + + /** + * Static value organizationValidation for SslCertAssetValidationType. + */ + @Generated + public static final SslCertAssetValidationType ORGANIZATION_VALIDATION = fromString("organizationValidation"); + + /** + * Static value extendedValidation for SslCertAssetValidationType. + */ + @Generated + public static final SslCertAssetValidationType EXTENDED_VALIDATION = fromString("extendedValidation"); + + /** + * Creates a new instance of SslCertAssetValidationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public SslCertAssetValidationType() { + } + + /** + * Creates or finds a SslCertAssetValidationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SslCertAssetValidationType. + */ + @Generated + public static SslCertAssetValidationType fromString(String name) { + return fromString(name, SslCertAssetValidationType.class); + } + + /** + * Gets known SslCertAssetValidationType values. + * + * @return known SslCertAssetValidationType values. + */ + @Generated + public static Collection values() { + return values(SslCertAssetValidationType.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslServerConfig.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslServerConfig.java new file mode 100644 index 000000000000..1b6662df4348 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SslServerConfig.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The SslServerConfig model. + */ +@Immutable +public final class SslServerConfig implements JsonSerializable { + + /* + * The tlsVersions property. + */ + @Generated + private List tlsVersions; + + /* + * The cipherSuites property. + */ + @Generated + private List cipherSuites; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The sources property. + */ + @Generated + private List sources; + + /** + * Creates an instance of SslServerConfig class. + */ + @Generated + private SslServerConfig() { + } + + /** + * Get the tlsVersions property: The tlsVersions property. + * + * @return the tlsVersions value. + */ + @Generated + public List getTlsVersions() { + return this.tlsVersions; + } + + /** + * Get the cipherSuites property: The cipherSuites property. + * + * @return the cipherSuites value. + */ + @Generated + public List getCipherSuites() { + return this.cipherSuites; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("tlsVersions", this.tlsVersions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("cipherSuites", this.cipherSuites, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SslServerConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SslServerConfig if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SslServerConfig. + */ + @Generated + public static SslServerConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SslServerConfig deserializedSslServerConfig = new SslServerConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("tlsVersions".equals(fieldName)) { + List tlsVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedSslServerConfig.tlsVersions = tlsVersions; + } else if ("cipherSuites".equals(fieldName)) { + List cipherSuites = reader.readArray(reader1 -> reader1.getString()); + deserializedSslServerConfig.cipherSuites = cipherSuites; + } else if ("firstSeen".equals(fieldName)) { + deserializedSslServerConfig.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedSslServerConfig.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedSslServerConfig.count = reader.getNullable(JsonReader::getLong); + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedSslServerConfig.sources = sources; + } else { + reader.skipChildren(); + } + } + return deserializedSslServerConfig; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SubResourceIntegrityCheck.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SubResourceIntegrityCheck.java new file mode 100644 index 000000000000..ba2f115c193f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/SubResourceIntegrityCheck.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The SubResourceIntegrityCheck model. + */ +@Immutable +public final class SubResourceIntegrityCheck implements JsonSerializable { + + /* + * The violation property. + */ + @Generated + private Boolean violation; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The causePageUrl property. + */ + @Generated + private String causePageUrl; + + /* + * The crawlGuid property. + */ + @Generated + private String crawlGuid; + + /* + * The pageGuid property. + */ + @Generated + private String pageGuid; + + /* + * The resourceGuid property. + */ + @Generated + private String resourceGuid; + + /* + * The expectedHash property. + */ + @Generated + private String expectedHash; + + /** + * Creates an instance of SubResourceIntegrityCheck class. + */ + @Generated + private SubResourceIntegrityCheck() { + } + + /** + * Get the violation property: The violation property. + * + * @return the violation value. + */ + @Generated + public Boolean isViolation() { + return this.violation; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the causePageUrl property: The causePageUrl property. + * + * @return the causePageUrl value. + */ + @Generated + public String getCausePageUrl() { + return this.causePageUrl; + } + + /** + * Get the crawlGuid property: The crawlGuid property. + * + * @return the crawlGuid value. + */ + @Generated + public String getCrawlGuid() { + return this.crawlGuid; + } + + /** + * Get the pageGuid property: The pageGuid property. + * + * @return the pageGuid value. + */ + @Generated + public String getPageGuid() { + return this.pageGuid; + } + + /** + * Get the resourceGuid property: The resourceGuid property. + * + * @return the resourceGuid value. + */ + @Generated + public String getResourceGuid() { + return this.resourceGuid; + } + + /** + * Get the expectedHash property: The expectedHash property. + * + * @return the expectedHash value. + */ + @Generated + public String getExpectedHash() { + return this.expectedHash; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("violation", this.violation); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("causePageUrl", this.causePageUrl); + jsonWriter.writeStringField("crawlGuid", this.crawlGuid); + jsonWriter.writeStringField("pageGuid", this.pageGuid); + jsonWriter.writeStringField("resourceGuid", this.resourceGuid); + jsonWriter.writeStringField("expectedHash", this.expectedHash); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubResourceIntegrityCheck from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubResourceIntegrityCheck if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SubResourceIntegrityCheck. + */ + @Generated + public static SubResourceIntegrityCheck fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubResourceIntegrityCheck deserializedSubResourceIntegrityCheck = new SubResourceIntegrityCheck(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("violation".equals(fieldName)) { + deserializedSubResourceIntegrityCheck.violation = reader.getNullable(JsonReader::getBoolean); + } else if ("firstSeen".equals(fieldName)) { + deserializedSubResourceIntegrityCheck.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedSubResourceIntegrityCheck.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedSubResourceIntegrityCheck.count = reader.getNullable(JsonReader::getLong); + } else if ("causePageUrl".equals(fieldName)) { + deserializedSubResourceIntegrityCheck.causePageUrl = reader.getString(); + } else if ("crawlGuid".equals(fieldName)) { + deserializedSubResourceIntegrityCheck.crawlGuid = reader.getString(); + } else if ("pageGuid".equals(fieldName)) { + deserializedSubResourceIntegrityCheck.pageGuid = reader.getString(); + } else if ("resourceGuid".equals(fieldName)) { + deserializedSubResourceIntegrityCheck.resourceGuid = reader.getString(); + } else if ("expectedHash".equals(fieldName)) { + deserializedSubResourceIntegrityCheck.expectedHash = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedSubResourceIntegrityCheck; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Task.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Task.java new file mode 100644 index 000000000000..6c3eb2f96b3f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/Task.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; + +/** + * The Task model. + */ +@Immutable +public final class Task implements JsonSerializable { + + /* + * The unique identifier of the task. + */ + @Generated + private String id; + + /* + * The time the task started. + */ + @Generated + private OffsetDateTime startedAt; + + /* + * The time the task completed. + */ + @Generated + private OffsetDateTime completedAt; + + /* + * The last time the status of the task was updated. + */ + @Generated + private OffsetDateTime lastPolledAt; + + /* + * The state the task is in. + */ + @Generated + private TaskState state; + + /* + * The phase the task is in. + */ + @Generated + private TaskPhase phase; + + /* + * The reason the task was moved into its current state, if the task wasn't completed. + */ + @Generated + private String reason; + + /* + * Attributes unique to the task. This differs by task type. + */ + @Generated + private Map metadata; + + /** + * Creates an instance of Task class. + */ + @Generated + private Task() { + } + + /** + * Get the id property: The unique identifier of the task. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the startedAt property: The time the task started. + * + * @return the startedAt value. + */ + @Generated + public OffsetDateTime getStartedAt() { + return this.startedAt; + } + + /** + * Get the completedAt property: The time the task completed. + * + * @return the completedAt value. + */ + @Generated + public OffsetDateTime getCompletedAt() { + return this.completedAt; + } + + /** + * Get the lastPolledAt property: The last time the status of the task was updated. + * + * @return the lastPolledAt value. + */ + @Generated + public OffsetDateTime getLastPolledAt() { + return this.lastPolledAt; + } + + /** + * Get the state property: The state the task is in. + * + * @return the state value. + */ + @Generated + public TaskState getState() { + return this.state; + } + + /** + * Get the phase property: The phase the task is in. + * + * @return the phase value. + */ + @Generated + public TaskPhase getPhase() { + return this.phase; + } + + /** + * Get the reason property: The reason the task was moved into its current state, if the task wasn't completed. + * + * @return the reason value. + */ + @Generated + public String getReason() { + return this.reason; + } + + /** + * Get the metadata property: Attributes unique to the task. This differs by task type. + * + * @return the metadata value. + */ + @Generated + public Map getMetadata() { + return this.metadata; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("startedAt", + this.startedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startedAt)); + jsonWriter.writeStringField("completedAt", + this.completedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.completedAt)); + jsonWriter.writeStringField("lastPolledAt", + this.lastPolledAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastPolledAt)); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeStringField("phase", this.phase == null ? null : this.phase.toString()); + jsonWriter.writeStringField("reason", this.reason); + jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> { + if (element == null) { + writer.writeNull(); + } else { + element.writeTo(writer); + } + }); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Task from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Task if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Task. + */ + @Generated + public static Task fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Task deserializedTask = new Task(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + deserializedTask.id = reader.getString(); + } else if ("startedAt".equals(fieldName)) { + deserializedTask.startedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("completedAt".equals(fieldName)) { + deserializedTask.completedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastPolledAt".equals(fieldName)) { + deserializedTask.lastPolledAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + deserializedTask.state = TaskState.fromString(reader.getString()); + } else if ("phase".equals(fieldName)) { + deserializedTask.phase = TaskPhase.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedTask.reason = reader.getString(); + } else if ("metadata".equals(fieldName)) { + Map metadata = reader.readMap(reader1 -> reader1 + .getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))); + deserializedTask.metadata = metadata; + } else { + reader.skipChildren(); + } + } + return deserializedTask; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/TaskPhase.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/TaskPhase.java new file mode 100644 index 000000000000..8d78ebecfe85 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/TaskPhase.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The phase the task is in. + */ +public final class TaskPhase extends ExpandableStringEnum { + + /** + * Static value running for TaskPhase. + */ + @Generated + public static final TaskPhase RUNNING = fromString("running"); + + /** + * Static value polling for TaskPhase. + */ + @Generated + public static final TaskPhase POLLING = fromString("polling"); + + /** + * Static value complete for TaskPhase. + */ + @Generated + public static final TaskPhase COMPLETE = fromString("complete"); + + /** + * Creates a new instance of TaskPhase value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TaskPhase() { + } + + /** + * Creates or finds a TaskPhase from its string representation. + * + * @param name a name to look for. + * @return the corresponding TaskPhase. + */ + @Generated + public static TaskPhase fromString(String name) { + return fromString(name, TaskPhase.class); + } + + /** + * Gets known TaskPhase values. + * + * @return known TaskPhase values. + */ + @Generated + public static Collection values() { + return values(TaskPhase.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/TaskState.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/TaskState.java new file mode 100644 index 000000000000..173c4e162a34 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/TaskState.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state the task is in. + */ +public final class TaskState extends ExpandableStringEnum { + + /** + * Static value pending for TaskState. + */ + @Generated + public static final TaskState PENDING = fromString("pending"); + + /** + * Static value running for TaskState. + */ + @Generated + public static final TaskState RUNNING = fromString("running"); + + /** + * Static value paused for TaskState. + */ + @Generated + public static final TaskState PAUSED = fromString("paused"); + + /** + * Static value complete for TaskState. + */ + @Generated + public static final TaskState COMPLETE = fromString("complete"); + + /** + * Static value incomplete for TaskState. + */ + @Generated + public static final TaskState INCOMPLETE = fromString("incomplete"); + + /** + * Static value failed for TaskState. + */ + @Generated + public static final TaskState FAILED = fromString("failed"); + + /** + * Static value warning for TaskState. + */ + @Generated + public static final TaskState WARNING = fromString("warning"); + + /** + * Creates a new instance of TaskState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TaskState() { + } + + /** + * Creates or finds a TaskState from its string representation. + * + * @param name a name to look for. + * @return the corresponding TaskState. + */ + @Generated + public static TaskState fromString(String name) { + return fromString(name, TaskState.class); + } + + /** + * Gets known TaskState values. + * + * @return known TaskState values. + */ + @Generated + public static Collection values() { + return values(TaskState.class); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ValidateResult.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ValidateResult.java new file mode 100644 index 000000000000..5daa1dbefa56 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/ValidateResult.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Validate result for validate action endpoints. + */ +@Immutable +public final class ValidateResult implements JsonSerializable { + + /* + * This is the top-level error object whose code matches the x-ms-error-code response header. + */ + @Generated + private ErrorDetail error; + + /** + * Creates an instance of ValidateResult class. + */ + @Generated + private ValidateResult() { + } + + /** + * Get the error property: This is the top-level error object whose code matches the x-ms-error-code response + * header. + * + * @return the error value. + */ + @Generated + public ErrorDetail getError() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidateResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidateResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ValidateResult. + */ + @Generated + public static ValidateResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidateResult deserializedValidateResult = new ValidateResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("error".equals(fieldName)) { + deserializedValidateResult.error = ErrorDetail.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedValidateResult; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/WebComponent.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/WebComponent.java new file mode 100644 index 000000000000..8199e16e5f50 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/WebComponent.java @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.analytics.defender.easm.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The WebComponent model. + */ +@Immutable +public final class WebComponent implements JsonSerializable { + + /* + * The name property. + */ + @Generated + private String name; + + /* + * The type property. + */ + @Generated + private String type; + + /* + * The version property. + */ + @Generated + private String version; + + /* + * The ruleId property. + */ + @Generated + private List ruleId; + + /* + * The firstSeen property. + */ + @Generated + private OffsetDateTime firstSeen; + + /* + * The lastSeen property. + */ + @Generated + private OffsetDateTime lastSeen; + + /* + * The count property. + */ + @Generated + private Long count; + + /* + * The cve property. + */ + @Generated + private List cve; + + /* + * The endOfLife property. + */ + @Generated + private Long endOfLife; + + /* + * The recent property. + */ + @Generated + private Boolean recent; + + /* + * The ports property. + */ + @Generated + private List ports; + + /* + * The sources property. + */ + @Generated + private List sources; + + /* + * The service property. + */ + @Generated + private String service; + + /** + * Creates an instance of WebComponent class. + */ + @Generated + private WebComponent() { + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + @Generated + public String getType() { + return this.type; + } + + /** + * Get the version property: The version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the ruleId property: The ruleId property. + * + * @return the ruleId value. + */ + @Generated + public List getRuleId() { + return this.ruleId; + } + + /** + * Get the firstSeen property: The firstSeen property. + * + * @return the firstSeen value. + */ + @Generated + public OffsetDateTime getFirstSeen() { + return this.firstSeen; + } + + /** + * Get the lastSeen property: The lastSeen property. + * + * @return the lastSeen value. + */ + @Generated + public OffsetDateTime getLastSeen() { + return this.lastSeen; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + @Generated + public Long getCount() { + return this.count; + } + + /** + * Get the cve property: The cve property. + * + * @return the cve value. + */ + @Generated + public List getCve() { + return this.cve; + } + + /** + * Get the endOfLife property: The endOfLife property. + * + * @return the endOfLife value. + */ + @Generated + public Long getEndOfLife() { + return this.endOfLife; + } + + /** + * Get the recent property: The recent property. + * + * @return the recent value. + */ + @Generated + public Boolean isRecent() { + return this.recent; + } + + /** + * Get the ports property: The ports property. + * + * @return the ports value. + */ + @Generated + public List getPorts() { + return this.ports; + } + + /** + * Get the sources property: The sources property. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Get the service property: The service property. + * + * @return the service value. + */ + @Generated + public String getService() { + return this.service; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeArrayField("ruleId", this.ruleId, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("firstSeen", + this.firstSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.firstSeen)); + jsonWriter.writeStringField("lastSeen", + this.lastSeen == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSeen)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeArrayField("cve", this.cve, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("endOfLife", this.endOfLife); + jsonWriter.writeBooleanField("recent", this.recent); + jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("service", this.service); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebComponent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebComponent if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the WebComponent. + */ + @Generated + public static WebComponent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebComponent deserializedWebComponent = new WebComponent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + deserializedWebComponent.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWebComponent.type = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedWebComponent.version = reader.getString(); + } else if ("ruleId".equals(fieldName)) { + List ruleId = reader.readArray(reader1 -> reader1.getString()); + deserializedWebComponent.ruleId = ruleId; + } else if ("firstSeen".equals(fieldName)) { + deserializedWebComponent.firstSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastSeen".equals(fieldName)) { + deserializedWebComponent.lastSeen = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("count".equals(fieldName)) { + deserializedWebComponent.count = reader.getNullable(JsonReader::getLong); + } else if ("cve".equals(fieldName)) { + List cve = reader.readArray(reader1 -> Cve.fromJson(reader1)); + deserializedWebComponent.cve = cve; + } else if ("endOfLife".equals(fieldName)) { + deserializedWebComponent.endOfLife = reader.getNullable(JsonReader::getLong); + } else if ("recent".equals(fieldName)) { + deserializedWebComponent.recent = reader.getNullable(JsonReader::getBoolean); + } else if ("ports".equals(fieldName)) { + List ports = reader.readArray(reader1 -> Port.fromJson(reader1)); + deserializedWebComponent.ports = ports; + } else if ("sources".equals(fieldName)) { + List sources = reader.readArray(reader1 -> Source.fromJson(reader1)); + deserializedWebComponent.sources = sources; + } else if ("service".equals(fieldName)) { + deserializedWebComponent.service = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedWebComponent; + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/package-info.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/package-info.java new file mode 100644 index 000000000000..a7de8b1a0cd1 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/models/package-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the data models for Easm. + * Defender EASM discovers and maps your digital attack surface to provide an "outside-in" perspective using probes to + * discover assets. The assets are provided with detailed metadata associated, including vulnerabilities, configurations + * and web components, allowing customers to view and prioritize external risk. The EASM REST API enables you to develop + * clients that integrate with your application. + * + */ +package com.azure.analytics.defender.easm.models; diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/package-info.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/package-info.java new file mode 100644 index 000000000000..8d900f02a30a --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/com/azure/analytics/defender/easm/package-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the classes for Easm. + * Defender EASM discovers and maps your digital attack surface to provide an "outside-in" perspective using probes to + * discover assets. The assets are provided with detailed metadata associated, including vulnerabilities, configurations + * and web components, allowing customers to view and prioritize external risk. The EASM REST API enables you to develop + * clients that integrate with your application. + * + */ +package com.azure.analytics.defender.easm; diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/java/module-info.java b/sdk/easm/azure-analytics-defender-easm/src/main/java/module-info.java new file mode 100644 index 000000000000..84b1ce6189e2 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +module com.azure.analytics.defender.easm { + requires transitive com.azure.core; + + exports com.azure.analytics.defender.easm; + exports com.azure.analytics.defender.easm.models; + + opens com.azure.analytics.defender.easm.models to com.azure.core; +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/resources/META-INF/azure-analytics-defender-easm_apiview_properties.json b/sdk/easm/azure-analytics-defender-easm/src/main/resources/META-INF/azure-analytics-defender-easm_apiview_properties.json new file mode 100644 index 000000000000..ab00eaa8e32f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/resources/META-INF/azure-analytics-defender-easm_apiview_properties.json @@ -0,0 +1,193 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.analytics.defender.easm.EasmAsyncClient": "Customizations.EasmClient", + "com.azure.analytics.defender.easm.EasmAsyncClient.cancelTask": "Customizations.EasmClient.cancelTask", + "com.azure.analytics.defender.easm.EasmAsyncClient.cancelTaskWithResponse": "Customizations.EasmClient.cancelTask", + "com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceDataConnection": "Customizations.EasmClient.createOrReplaceDataConnection", + "com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceDataConnectionWithResponse": "Customizations.EasmClient.createOrReplaceDataConnection", + "com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceDiscoGroup": "Customizations.EasmClient.createOrReplaceDiscoGroup", + "com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceDiscoGroupWithResponse": "Customizations.EasmClient.createOrReplaceDiscoGroup", + "com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceSavedFilter": "Customizations.EasmClient.createOrReplaceSavedFilter", + "com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceSavedFilterWithResponse": "Customizations.EasmClient.createOrReplaceSavedFilter", + "com.azure.analytics.defender.easm.EasmAsyncClient.deleteDataConnection": "Customizations.EasmClient.deleteDataConnection", + "com.azure.analytics.defender.easm.EasmAsyncClient.deleteDataConnectionWithResponse": "Customizations.EasmClient.deleteDataConnection", + "com.azure.analytics.defender.easm.EasmAsyncClient.deleteSavedFilter": "Customizations.EasmClient.deleteSavedFilter", + "com.azure.analytics.defender.easm.EasmAsyncClient.deleteSavedFilterWithResponse": "Customizations.EasmClient.deleteSavedFilter", + "com.azure.analytics.defender.easm.EasmAsyncClient.getAssetResource": "Customizations.EasmClient.getAssetResource", + "com.azure.analytics.defender.easm.EasmAsyncClient.getAssetResourceWithResponse": "Customizations.EasmClient.getAssetResource", + "com.azure.analytics.defender.easm.EasmAsyncClient.getBillable": "Customizations.EasmClient.getBillable", + "com.azure.analytics.defender.easm.EasmAsyncClient.getBillableWithResponse": "Customizations.EasmClient.getBillable", + "com.azure.analytics.defender.easm.EasmAsyncClient.getDataConnection": "Customizations.EasmClient.getDataConnection", + "com.azure.analytics.defender.easm.EasmAsyncClient.getDataConnectionWithResponse": "Customizations.EasmClient.getDataConnection", + "com.azure.analytics.defender.easm.EasmAsyncClient.getDiscoGroup": "Customizations.EasmClient.getDiscoGroup", + "com.azure.analytics.defender.easm.EasmAsyncClient.getDiscoGroupWithResponse": "Customizations.EasmClient.getDiscoGroup", + "com.azure.analytics.defender.easm.EasmAsyncClient.getDiscoTemplate": "Customizations.EasmClient.getDiscoTemplate", + "com.azure.analytics.defender.easm.EasmAsyncClient.getDiscoTemplateWithResponse": "Customizations.EasmClient.getDiscoTemplate", + "com.azure.analytics.defender.easm.EasmAsyncClient.getSavedFilter": "Customizations.EasmClient.getSavedFilter", + "com.azure.analytics.defender.easm.EasmAsyncClient.getSavedFilterWithResponse": "Customizations.EasmClient.getSavedFilter", + "com.azure.analytics.defender.easm.EasmAsyncClient.getSnapshot": "Customizations.EasmClient.getSnapshot", + "com.azure.analytics.defender.easm.EasmAsyncClient.getSnapshotWithResponse": "Customizations.EasmClient.getSnapshot", + "com.azure.analytics.defender.easm.EasmAsyncClient.getSummary": "Customizations.EasmClient.getSummary", + "com.azure.analytics.defender.easm.EasmAsyncClient.getSummaryWithResponse": "Customizations.EasmClient.getSummary", + "com.azure.analytics.defender.easm.EasmAsyncClient.getTask": "Customizations.EasmClient.getTask", + "com.azure.analytics.defender.easm.EasmAsyncClient.getTaskWithResponse": "Customizations.EasmClient.getTask", + "com.azure.analytics.defender.easm.EasmAsyncClient.listAssetResource": "Customizations.EasmClient.listAssetResource", + "com.azure.analytics.defender.easm.EasmAsyncClient.listDataConnection": "Customizations.EasmClient.listDataConnection", + "com.azure.analytics.defender.easm.EasmAsyncClient.listDiscoGroup": "Customizations.EasmClient.listDiscoGroup", + "com.azure.analytics.defender.easm.EasmAsyncClient.listDiscoTemplate": "Customizations.EasmClient.listDiscoTemplate", + "com.azure.analytics.defender.easm.EasmAsyncClient.listRuns": "Customizations.EasmClient.listRuns", + "com.azure.analytics.defender.easm.EasmAsyncClient.listSavedFilter": "Customizations.EasmClient.listSavedFilter", + "com.azure.analytics.defender.easm.EasmAsyncClient.listTask": "Customizations.EasmClient.listTask", + "com.azure.analytics.defender.easm.EasmAsyncClient.runDiscoGroup": "Customizations.EasmClient.runDiscoGroup", + "com.azure.analytics.defender.easm.EasmAsyncClient.runDiscoGroupWithResponse": "Customizations.EasmClient.runDiscoGroup", + "com.azure.analytics.defender.easm.EasmAsyncClient.updateAssets": "Customizations.EasmClient.updateAssets", + "com.azure.analytics.defender.easm.EasmAsyncClient.updateAssetsWithResponse": "Customizations.EasmClient.updateAssets", + "com.azure.analytics.defender.easm.EasmAsyncClient.validateDataConnection": "Customizations.EasmClient.validateDataConnection", + "com.azure.analytics.defender.easm.EasmAsyncClient.validateDataConnectionWithResponse": "Customizations.EasmClient.validateDataConnection", + "com.azure.analytics.defender.easm.EasmAsyncClient.validateDiscoGroup": "Customizations.EasmClient.validateDiscoGroup", + "com.azure.analytics.defender.easm.EasmAsyncClient.validateDiscoGroupWithResponse": "Customizations.EasmClient.validateDiscoGroup", + "com.azure.analytics.defender.easm.EasmClient": "Customizations.EasmClient", + "com.azure.analytics.defender.easm.EasmClient.cancelTask": "Customizations.EasmClient.cancelTask", + "com.azure.analytics.defender.easm.EasmClient.cancelTaskWithResponse": "Customizations.EasmClient.cancelTask", + "com.azure.analytics.defender.easm.EasmClient.createOrReplaceDataConnection": "Customizations.EasmClient.createOrReplaceDataConnection", + "com.azure.analytics.defender.easm.EasmClient.createOrReplaceDataConnectionWithResponse": "Customizations.EasmClient.createOrReplaceDataConnection", + "com.azure.analytics.defender.easm.EasmClient.createOrReplaceDiscoGroup": "Customizations.EasmClient.createOrReplaceDiscoGroup", + "com.azure.analytics.defender.easm.EasmClient.createOrReplaceDiscoGroupWithResponse": "Customizations.EasmClient.createOrReplaceDiscoGroup", + "com.azure.analytics.defender.easm.EasmClient.createOrReplaceSavedFilter": "Customizations.EasmClient.createOrReplaceSavedFilter", + "com.azure.analytics.defender.easm.EasmClient.createOrReplaceSavedFilterWithResponse": "Customizations.EasmClient.createOrReplaceSavedFilter", + "com.azure.analytics.defender.easm.EasmClient.deleteDataConnection": "Customizations.EasmClient.deleteDataConnection", + "com.azure.analytics.defender.easm.EasmClient.deleteDataConnectionWithResponse": "Customizations.EasmClient.deleteDataConnection", + "com.azure.analytics.defender.easm.EasmClient.deleteSavedFilter": "Customizations.EasmClient.deleteSavedFilter", + "com.azure.analytics.defender.easm.EasmClient.deleteSavedFilterWithResponse": "Customizations.EasmClient.deleteSavedFilter", + "com.azure.analytics.defender.easm.EasmClient.getAssetResource": "Customizations.EasmClient.getAssetResource", + "com.azure.analytics.defender.easm.EasmClient.getAssetResourceWithResponse": "Customizations.EasmClient.getAssetResource", + "com.azure.analytics.defender.easm.EasmClient.getBillable": "Customizations.EasmClient.getBillable", + "com.azure.analytics.defender.easm.EasmClient.getBillableWithResponse": "Customizations.EasmClient.getBillable", + "com.azure.analytics.defender.easm.EasmClient.getDataConnection": "Customizations.EasmClient.getDataConnection", + "com.azure.analytics.defender.easm.EasmClient.getDataConnectionWithResponse": "Customizations.EasmClient.getDataConnection", + "com.azure.analytics.defender.easm.EasmClient.getDiscoGroup": "Customizations.EasmClient.getDiscoGroup", + "com.azure.analytics.defender.easm.EasmClient.getDiscoGroupWithResponse": "Customizations.EasmClient.getDiscoGroup", + "com.azure.analytics.defender.easm.EasmClient.getDiscoTemplate": "Customizations.EasmClient.getDiscoTemplate", + "com.azure.analytics.defender.easm.EasmClient.getDiscoTemplateWithResponse": "Customizations.EasmClient.getDiscoTemplate", + "com.azure.analytics.defender.easm.EasmClient.getSavedFilter": "Customizations.EasmClient.getSavedFilter", + "com.azure.analytics.defender.easm.EasmClient.getSavedFilterWithResponse": "Customizations.EasmClient.getSavedFilter", + "com.azure.analytics.defender.easm.EasmClient.getSnapshot": "Customizations.EasmClient.getSnapshot", + "com.azure.analytics.defender.easm.EasmClient.getSnapshotWithResponse": "Customizations.EasmClient.getSnapshot", + "com.azure.analytics.defender.easm.EasmClient.getSummary": "Customizations.EasmClient.getSummary", + "com.azure.analytics.defender.easm.EasmClient.getSummaryWithResponse": "Customizations.EasmClient.getSummary", + "com.azure.analytics.defender.easm.EasmClient.getTask": "Customizations.EasmClient.getTask", + "com.azure.analytics.defender.easm.EasmClient.getTaskWithResponse": "Customizations.EasmClient.getTask", + "com.azure.analytics.defender.easm.EasmClient.listAssetResource": "Customizations.EasmClient.listAssetResource", + "com.azure.analytics.defender.easm.EasmClient.listDataConnection": "Customizations.EasmClient.listDataConnection", + "com.azure.analytics.defender.easm.EasmClient.listDiscoGroup": "Customizations.EasmClient.listDiscoGroup", + "com.azure.analytics.defender.easm.EasmClient.listDiscoTemplate": "Customizations.EasmClient.listDiscoTemplate", + "com.azure.analytics.defender.easm.EasmClient.listRuns": "Customizations.EasmClient.listRuns", + "com.azure.analytics.defender.easm.EasmClient.listSavedFilter": "Customizations.EasmClient.listSavedFilter", + "com.azure.analytics.defender.easm.EasmClient.listTask": "Customizations.EasmClient.listTask", + "com.azure.analytics.defender.easm.EasmClient.runDiscoGroup": "Customizations.EasmClient.runDiscoGroup", + "com.azure.analytics.defender.easm.EasmClient.runDiscoGroupWithResponse": "Customizations.EasmClient.runDiscoGroup", + "com.azure.analytics.defender.easm.EasmClient.updateAssets": "Customizations.EasmClient.updateAssets", + "com.azure.analytics.defender.easm.EasmClient.updateAssetsWithResponse": "Customizations.EasmClient.updateAssets", + "com.azure.analytics.defender.easm.EasmClient.validateDataConnection": "Customizations.EasmClient.validateDataConnection", + "com.azure.analytics.defender.easm.EasmClient.validateDataConnectionWithResponse": "Customizations.EasmClient.validateDataConnection", + "com.azure.analytics.defender.easm.EasmClient.validateDiscoGroup": "Customizations.EasmClient.validateDiscoGroup", + "com.azure.analytics.defender.easm.EasmClient.validateDiscoGroupWithResponse": "Customizations.EasmClient.validateDiscoGroup", + "com.azure.analytics.defender.easm.EasmClientBuilder": "Customizations.EasmClient", + "com.azure.analytics.defender.easm.models.AlexaDetails": "Easm.AlexaInfo", + "com.azure.analytics.defender.easm.models.AsAsset": "Easm.AsAsset", + "com.azure.analytics.defender.easm.models.AsAssetResource": "Easm.AsAssetResource", + "com.azure.analytics.defender.easm.models.AssetPageResult": "Easm.AssetPageResult", + "com.azure.analytics.defender.easm.models.AssetResource": "Easm.AssetResource", + "com.azure.analytics.defender.easm.models.AssetSecurityPolicy": "Easm.AssetSecurityPolicy", + "com.azure.analytics.defender.easm.models.AssetState": "Easm.AssetState", + "com.azure.analytics.defender.easm.models.AssetSummaryResult": "Easm.AssetSummaryResult", + "com.azure.analytics.defender.easm.models.AssetUpdateData": "Easm.AssetUpdateData", + "com.azure.analytics.defender.easm.models.AssetUpdateState": "Easm.AssetUpdateState", + "com.azure.analytics.defender.easm.models.AssetUpdateTransfers": "Easm.AssetUpdateTransfers", + "com.azure.analytics.defender.easm.models.Attribute": "Easm.Attribute", + "com.azure.analytics.defender.easm.models.AuditTrailItem": "Easm.AuditTrailItem", + "com.azure.analytics.defender.easm.models.AuditTrailItemKind": "Easm.AuditTrailItemKind", + "com.azure.analytics.defender.easm.models.AzureDataExplorerDataConnection": "Easm.AzureDataExplorerDataConnection", + "com.azure.analytics.defender.easm.models.AzureDataExplorerDataConnectionData": "Easm.AzureDataExplorerDataConnectionData", + "com.azure.analytics.defender.easm.models.AzureDataExplorerDataConnectionProperties": "Easm.AzureDataExplorerDataConnectionProperties", + "com.azure.analytics.defender.easm.models.Banner": "Easm.Banner", + "com.azure.analytics.defender.easm.models.ContactAsset": "Easm.ContactAsset", + "com.azure.analytics.defender.easm.models.ContactAssetResource": "Easm.ContactAssetResource", + "com.azure.analytics.defender.easm.models.Cookie": "Easm.Cookie", + "com.azure.analytics.defender.easm.models.Cve": "Easm.Cve", + "com.azure.analytics.defender.easm.models.Cvss3Summary": "Easm.Cvss3Summary", + "com.azure.analytics.defender.easm.models.DataConnection": "Easm.DataConnection", + "com.azure.analytics.defender.easm.models.DataConnectionContent": "Easm.DataConnectionContent", + "com.azure.analytics.defender.easm.models.DataConnectionData": "Easm.DataConnectionData", + "com.azure.analytics.defender.easm.models.DataConnectionFrequency": "Easm.DataConnectionFrequency", + "com.azure.analytics.defender.easm.models.DataConnectionProperties": "Easm.DataConnectionProperties", + "com.azure.analytics.defender.easm.models.DependentResource": "Easm.DependentResource", + "com.azure.analytics.defender.easm.models.DiscoGroup": "Easm.DiscoGroup", + "com.azure.analytics.defender.easm.models.DiscoGroupData": "Easm.DiscoGroupData", + "com.azure.analytics.defender.easm.models.DiscoRunResult": "Easm.DiscoRunResult", + "com.azure.analytics.defender.easm.models.DiscoRunState": "Easm.DiscoRunState", + "com.azure.analytics.defender.easm.models.DiscoSource": "Easm.DiscoSource", + "com.azure.analytics.defender.easm.models.DiscoSourceKind": "Easm.DiscoSourceKind", + "com.azure.analytics.defender.easm.models.DiscoTemplate": "Easm.DiscoTemplate", + "com.azure.analytics.defender.easm.models.DomainAsset": "Easm.DomainAsset", + "com.azure.analytics.defender.easm.models.DomainAssetResource": "Easm.DomainAssetResource", + "com.azure.analytics.defender.easm.models.ErrorDetail": "Easm.ErrorDetail", + "com.azure.analytics.defender.easm.models.GuidPair": "Easm.GuidPair", + "com.azure.analytics.defender.easm.models.HostAsset": "Easm.HostAsset", + "com.azure.analytics.defender.easm.models.HostAssetResource": "Easm.HostAssetResource", + "com.azure.analytics.defender.easm.models.HostCore": "Easm.HostCore", + "com.azure.analytics.defender.easm.models.InnerError": "Easm.InnerError", + "com.azure.analytics.defender.easm.models.InventoryAsset": "Easm.InventoryAsset", + "com.azure.analytics.defender.easm.models.IpAddressAsset": "Easm.IpAddressAsset", + "com.azure.analytics.defender.easm.models.IpAddressAssetResource": "Easm.IpAddressAssetResource", + "com.azure.analytics.defender.easm.models.IpBlock": "Easm.IpBlock", + "com.azure.analytics.defender.easm.models.IpBlockAsset": "Easm.IpBlockAsset", + "com.azure.analytics.defender.easm.models.IpBlockAssetResource": "Easm.IpBlockAssetResource", + "com.azure.analytics.defender.easm.models.Location": "Easm.Location", + "com.azure.analytics.defender.easm.models.LogAnalyticsDataConnection": "Easm.LogAnalyticsDataConnection", + "com.azure.analytics.defender.easm.models.LogAnalyticsDataConnectionData": "Easm.LogAnalyticsDataConnectionData", + "com.azure.analytics.defender.easm.models.LogAnalyticsDataConnectionProperties": "Easm.LogAnalyticsDataConnectionProperties", + "com.azure.analytics.defender.easm.models.ObservedBoolean": "Easm.ObservedBoolean", + "com.azure.analytics.defender.easm.models.ObservedHeader": "Easm.ObservedHeader", + "com.azure.analytics.defender.easm.models.ObservedInteger": "Easm.ObservedInteger", + "com.azure.analytics.defender.easm.models.ObservedIntegers": "Easm.ObservedIntegers", + "com.azure.analytics.defender.easm.models.ObservedLocation": "Easm.ObservedLocation", + "com.azure.analytics.defender.easm.models.ObservedLong": "Easm.ObservedLong", + "com.azure.analytics.defender.easm.models.ObservedPortState": "Easm.ObservedPortState", + "com.azure.analytics.defender.easm.models.ObservedPortStateValue": "Easm.ObservedPortStateValue", + "com.azure.analytics.defender.easm.models.ObservedString": "Easm.ObservedString", + "com.azure.analytics.defender.easm.models.ObservedValue": "Easm.ObservedValue", + "com.azure.analytics.defender.easm.models.PageAsset": "Easm.PageAsset", + "com.azure.analytics.defender.easm.models.PageAssetRedirectType": "Easm.PageAssetRedirectType", + "com.azure.analytics.defender.easm.models.PageAssetResource": "Easm.PageAssetResource", + "com.azure.analytics.defender.easm.models.PageCause": "Easm.PageCause", + "com.azure.analytics.defender.easm.models.Port": "Easm.Port", + "com.azure.analytics.defender.easm.models.ReportAssetSnapshotRequest": "Easm.ReportAssetSnapshotRequest", + "com.azure.analytics.defender.easm.models.ReportAssetSnapshotResult": "Easm.ReportAssetSnapshotResult", + "com.azure.analytics.defender.easm.models.ReportAssetSummaryRequest": "Easm.ReportAssetSummaryRequest", + "com.azure.analytics.defender.easm.models.ReportAssetSummaryResult": "Easm.ReportAssetSummaryResult", + "com.azure.analytics.defender.easm.models.ReportBillableAssetBreakdown": "Easm.ReportBillableAssetBreakdown", + "com.azure.analytics.defender.easm.models.ReportBillableAssetBreakdownKind": "Easm.ReportBillableAssetBreakdownKind", + "com.azure.analytics.defender.easm.models.ReportBillableAssetSnapshotResult": "Easm.ReportBillableAssetSnapshotResult", + "com.azure.analytics.defender.easm.models.ReportBillableAssetSummaryResult": "Easm.ReportBillableAssetSummaryResult", + "com.azure.analytics.defender.easm.models.Reputation": "Easm.Reputation", + "com.azure.analytics.defender.easm.models.ResourceUrl": "Easm.ResourceUrl", + "com.azure.analytics.defender.easm.models.SavedFilter": "Easm.SavedFilter", + "com.azure.analytics.defender.easm.models.SavedFilterData": "Easm.SavedFilterData", + "com.azure.analytics.defender.easm.models.ScanMetadata": "Easm.ScanMetadata", + "com.azure.analytics.defender.easm.models.Service": "Easm.Service", + "com.azure.analytics.defender.easm.models.SoaRecord": "Easm.SoaRecord", + "com.azure.analytics.defender.easm.models.Source": "Easm.Source", + "com.azure.analytics.defender.easm.models.SslCertAsset": "Easm.SslCertAsset", + "com.azure.analytics.defender.easm.models.SslCertAssetResource": "Easm.SslCertAssetResource", + "com.azure.analytics.defender.easm.models.SslCertAssetValidationType": "Easm.SslCertAssetValidationType", + "com.azure.analytics.defender.easm.models.SslServerConfig": "Easm.SslServerConfig", + "com.azure.analytics.defender.easm.models.SubResourceIntegrityCheck": "Easm.SubResourceIntegrityCheck", + "com.azure.analytics.defender.easm.models.Task": "Easm.Task", + "com.azure.analytics.defender.easm.models.TaskPhase": "Easm.TaskPhase", + "com.azure.analytics.defender.easm.models.TaskState": "Easm.TaskState", + "com.azure.analytics.defender.easm.models.ValidateResult": "Easm.ValidateResult", + "com.azure.analytics.defender.easm.models.WebComponent": "Easm.WebComponent" + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/resources/META-INF/azure-analytics-defender-easm_metadata.json b/sdk/easm/azure-analytics-defender-easm/src/main/resources/META-INF/azure-analytics-defender-easm_metadata.json new file mode 100644 index 000000000000..1ef47835955a --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/resources/META-INF/azure-analytics-defender-easm_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Easm":"2023-03-01-preview"},"crossLanguageDefinitions":{"com.azure.analytics.defender.easm.EasmAsyncClient":"Customizations.EasmClient","com.azure.analytics.defender.easm.EasmAsyncClient.cancelTask":"Customizations.EasmClient.cancelTask","com.azure.analytics.defender.easm.EasmAsyncClient.cancelTaskWithResponse":"Customizations.EasmClient.cancelTask","com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceDataConnection":"Customizations.EasmClient.createOrReplaceDataConnection","com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceDataConnectionWithResponse":"Customizations.EasmClient.createOrReplaceDataConnection","com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceDiscoGroup":"Customizations.EasmClient.createOrReplaceDiscoGroup","com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceDiscoGroupWithResponse":"Customizations.EasmClient.createOrReplaceDiscoGroup","com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceSavedFilter":"Customizations.EasmClient.createOrReplaceSavedFilter","com.azure.analytics.defender.easm.EasmAsyncClient.createOrReplaceSavedFilterWithResponse":"Customizations.EasmClient.createOrReplaceSavedFilter","com.azure.analytics.defender.easm.EasmAsyncClient.deleteDataConnection":"Customizations.EasmClient.deleteDataConnection","com.azure.analytics.defender.easm.EasmAsyncClient.deleteDataConnectionWithResponse":"Customizations.EasmClient.deleteDataConnection","com.azure.analytics.defender.easm.EasmAsyncClient.deleteSavedFilter":"Customizations.EasmClient.deleteSavedFilter","com.azure.analytics.defender.easm.EasmAsyncClient.deleteSavedFilterWithResponse":"Customizations.EasmClient.deleteSavedFilter","com.azure.analytics.defender.easm.EasmAsyncClient.getAssetResource":"Customizations.EasmClient.getAssetResource","com.azure.analytics.defender.easm.EasmAsyncClient.getAssetResourceWithResponse":"Customizations.EasmClient.getAssetResource","com.azure.analytics.defender.easm.EasmAsyncClient.getBillable":"Customizations.EasmClient.getBillable","com.azure.analytics.defender.easm.EasmAsyncClient.getBillableWithResponse":"Customizations.EasmClient.getBillable","com.azure.analytics.defender.easm.EasmAsyncClient.getDataConnection":"Customizations.EasmClient.getDataConnection","com.azure.analytics.defender.easm.EasmAsyncClient.getDataConnectionWithResponse":"Customizations.EasmClient.getDataConnection","com.azure.analytics.defender.easm.EasmAsyncClient.getDiscoGroup":"Customizations.EasmClient.getDiscoGroup","com.azure.analytics.defender.easm.EasmAsyncClient.getDiscoGroupWithResponse":"Customizations.EasmClient.getDiscoGroup","com.azure.analytics.defender.easm.EasmAsyncClient.getDiscoTemplate":"Customizations.EasmClient.getDiscoTemplate","com.azure.analytics.defender.easm.EasmAsyncClient.getDiscoTemplateWithResponse":"Customizations.EasmClient.getDiscoTemplate","com.azure.analytics.defender.easm.EasmAsyncClient.getSavedFilter":"Customizations.EasmClient.getSavedFilter","com.azure.analytics.defender.easm.EasmAsyncClient.getSavedFilterWithResponse":"Customizations.EasmClient.getSavedFilter","com.azure.analytics.defender.easm.EasmAsyncClient.getSnapshot":"Customizations.EasmClient.getSnapshot","com.azure.analytics.defender.easm.EasmAsyncClient.getSnapshotWithResponse":"Customizations.EasmClient.getSnapshot","com.azure.analytics.defender.easm.EasmAsyncClient.getSummary":"Customizations.EasmClient.getSummary","com.azure.analytics.defender.easm.EasmAsyncClient.getSummaryWithResponse":"Customizations.EasmClient.getSummary","com.azure.analytics.defender.easm.EasmAsyncClient.getTask":"Customizations.EasmClient.getTask","com.azure.analytics.defender.easm.EasmAsyncClient.getTaskWithResponse":"Customizations.EasmClient.getTask","com.azure.analytics.defender.easm.EasmAsyncClient.listAssetResource":"Customizations.EasmClient.listAssetResource","com.azure.analytics.defender.easm.EasmAsyncClient.listDataConnection":"Customizations.EasmClient.listDataConnection","com.azure.analytics.defender.easm.EasmAsyncClient.listDiscoGroup":"Customizations.EasmClient.listDiscoGroup","com.azure.analytics.defender.easm.EasmAsyncClient.listDiscoTemplate":"Customizations.EasmClient.listDiscoTemplate","com.azure.analytics.defender.easm.EasmAsyncClient.listRuns":"Customizations.EasmClient.listRuns","com.azure.analytics.defender.easm.EasmAsyncClient.listSavedFilter":"Customizations.EasmClient.listSavedFilter","com.azure.analytics.defender.easm.EasmAsyncClient.listTask":"Customizations.EasmClient.listTask","com.azure.analytics.defender.easm.EasmAsyncClient.runDiscoGroup":"Customizations.EasmClient.runDiscoGroup","com.azure.analytics.defender.easm.EasmAsyncClient.runDiscoGroupWithResponse":"Customizations.EasmClient.runDiscoGroup","com.azure.analytics.defender.easm.EasmAsyncClient.updateAssets":"Customizations.EasmClient.updateAssets","com.azure.analytics.defender.easm.EasmAsyncClient.updateAssetsWithResponse":"Customizations.EasmClient.updateAssets","com.azure.analytics.defender.easm.EasmAsyncClient.validateDataConnection":"Customizations.EasmClient.validateDataConnection","com.azure.analytics.defender.easm.EasmAsyncClient.validateDataConnectionWithResponse":"Customizations.EasmClient.validateDataConnection","com.azure.analytics.defender.easm.EasmAsyncClient.validateDiscoGroup":"Customizations.EasmClient.validateDiscoGroup","com.azure.analytics.defender.easm.EasmAsyncClient.validateDiscoGroupWithResponse":"Customizations.EasmClient.validateDiscoGroup","com.azure.analytics.defender.easm.EasmClient":"Customizations.EasmClient","com.azure.analytics.defender.easm.EasmClient.cancelTask":"Customizations.EasmClient.cancelTask","com.azure.analytics.defender.easm.EasmClient.cancelTaskWithResponse":"Customizations.EasmClient.cancelTask","com.azure.analytics.defender.easm.EasmClient.createOrReplaceDataConnection":"Customizations.EasmClient.createOrReplaceDataConnection","com.azure.analytics.defender.easm.EasmClient.createOrReplaceDataConnectionWithResponse":"Customizations.EasmClient.createOrReplaceDataConnection","com.azure.analytics.defender.easm.EasmClient.createOrReplaceDiscoGroup":"Customizations.EasmClient.createOrReplaceDiscoGroup","com.azure.analytics.defender.easm.EasmClient.createOrReplaceDiscoGroupWithResponse":"Customizations.EasmClient.createOrReplaceDiscoGroup","com.azure.analytics.defender.easm.EasmClient.createOrReplaceSavedFilter":"Customizations.EasmClient.createOrReplaceSavedFilter","com.azure.analytics.defender.easm.EasmClient.createOrReplaceSavedFilterWithResponse":"Customizations.EasmClient.createOrReplaceSavedFilter","com.azure.analytics.defender.easm.EasmClient.deleteDataConnection":"Customizations.EasmClient.deleteDataConnection","com.azure.analytics.defender.easm.EasmClient.deleteDataConnectionWithResponse":"Customizations.EasmClient.deleteDataConnection","com.azure.analytics.defender.easm.EasmClient.deleteSavedFilter":"Customizations.EasmClient.deleteSavedFilter","com.azure.analytics.defender.easm.EasmClient.deleteSavedFilterWithResponse":"Customizations.EasmClient.deleteSavedFilter","com.azure.analytics.defender.easm.EasmClient.getAssetResource":"Customizations.EasmClient.getAssetResource","com.azure.analytics.defender.easm.EasmClient.getAssetResourceWithResponse":"Customizations.EasmClient.getAssetResource","com.azure.analytics.defender.easm.EasmClient.getBillable":"Customizations.EasmClient.getBillable","com.azure.analytics.defender.easm.EasmClient.getBillableWithResponse":"Customizations.EasmClient.getBillable","com.azure.analytics.defender.easm.EasmClient.getDataConnection":"Customizations.EasmClient.getDataConnection","com.azure.analytics.defender.easm.EasmClient.getDataConnectionWithResponse":"Customizations.EasmClient.getDataConnection","com.azure.analytics.defender.easm.EasmClient.getDiscoGroup":"Customizations.EasmClient.getDiscoGroup","com.azure.analytics.defender.easm.EasmClient.getDiscoGroupWithResponse":"Customizations.EasmClient.getDiscoGroup","com.azure.analytics.defender.easm.EasmClient.getDiscoTemplate":"Customizations.EasmClient.getDiscoTemplate","com.azure.analytics.defender.easm.EasmClient.getDiscoTemplateWithResponse":"Customizations.EasmClient.getDiscoTemplate","com.azure.analytics.defender.easm.EasmClient.getSavedFilter":"Customizations.EasmClient.getSavedFilter","com.azure.analytics.defender.easm.EasmClient.getSavedFilterWithResponse":"Customizations.EasmClient.getSavedFilter","com.azure.analytics.defender.easm.EasmClient.getSnapshot":"Customizations.EasmClient.getSnapshot","com.azure.analytics.defender.easm.EasmClient.getSnapshotWithResponse":"Customizations.EasmClient.getSnapshot","com.azure.analytics.defender.easm.EasmClient.getSummary":"Customizations.EasmClient.getSummary","com.azure.analytics.defender.easm.EasmClient.getSummaryWithResponse":"Customizations.EasmClient.getSummary","com.azure.analytics.defender.easm.EasmClient.getTask":"Customizations.EasmClient.getTask","com.azure.analytics.defender.easm.EasmClient.getTaskWithResponse":"Customizations.EasmClient.getTask","com.azure.analytics.defender.easm.EasmClient.listAssetResource":"Customizations.EasmClient.listAssetResource","com.azure.analytics.defender.easm.EasmClient.listDataConnection":"Customizations.EasmClient.listDataConnection","com.azure.analytics.defender.easm.EasmClient.listDiscoGroup":"Customizations.EasmClient.listDiscoGroup","com.azure.analytics.defender.easm.EasmClient.listDiscoTemplate":"Customizations.EasmClient.listDiscoTemplate","com.azure.analytics.defender.easm.EasmClient.listRuns":"Customizations.EasmClient.listRuns","com.azure.analytics.defender.easm.EasmClient.listSavedFilter":"Customizations.EasmClient.listSavedFilter","com.azure.analytics.defender.easm.EasmClient.listTask":"Customizations.EasmClient.listTask","com.azure.analytics.defender.easm.EasmClient.runDiscoGroup":"Customizations.EasmClient.runDiscoGroup","com.azure.analytics.defender.easm.EasmClient.runDiscoGroupWithResponse":"Customizations.EasmClient.runDiscoGroup","com.azure.analytics.defender.easm.EasmClient.updateAssets":"Customizations.EasmClient.updateAssets","com.azure.analytics.defender.easm.EasmClient.updateAssetsWithResponse":"Customizations.EasmClient.updateAssets","com.azure.analytics.defender.easm.EasmClient.validateDataConnection":"Customizations.EasmClient.validateDataConnection","com.azure.analytics.defender.easm.EasmClient.validateDataConnectionWithResponse":"Customizations.EasmClient.validateDataConnection","com.azure.analytics.defender.easm.EasmClient.validateDiscoGroup":"Customizations.EasmClient.validateDiscoGroup","com.azure.analytics.defender.easm.EasmClient.validateDiscoGroupWithResponse":"Customizations.EasmClient.validateDiscoGroup","com.azure.analytics.defender.easm.EasmClientBuilder":"Customizations.EasmClient","com.azure.analytics.defender.easm.models.AlexaDetails":"Easm.AlexaInfo","com.azure.analytics.defender.easm.models.AsAsset":"Easm.AsAsset","com.azure.analytics.defender.easm.models.AsAssetResource":"Easm.AsAssetResource","com.azure.analytics.defender.easm.models.AssetPageResult":"Easm.AssetPageResult","com.azure.analytics.defender.easm.models.AssetResource":"Easm.AssetResource","com.azure.analytics.defender.easm.models.AssetSecurityPolicy":"Easm.AssetSecurityPolicy","com.azure.analytics.defender.easm.models.AssetState":"Easm.AssetState","com.azure.analytics.defender.easm.models.AssetSummaryResult":"Easm.AssetSummaryResult","com.azure.analytics.defender.easm.models.AssetUpdateData":"Easm.AssetUpdateData","com.azure.analytics.defender.easm.models.AssetUpdateState":"Easm.AssetUpdateState","com.azure.analytics.defender.easm.models.AssetUpdateTransfers":"Easm.AssetUpdateTransfers","com.azure.analytics.defender.easm.models.Attribute":"Easm.Attribute","com.azure.analytics.defender.easm.models.AuditTrailItem":"Easm.AuditTrailItem","com.azure.analytics.defender.easm.models.AuditTrailItemKind":"Easm.AuditTrailItemKind","com.azure.analytics.defender.easm.models.AzureDataExplorerDataConnection":"Easm.AzureDataExplorerDataConnection","com.azure.analytics.defender.easm.models.AzureDataExplorerDataConnectionData":"Easm.AzureDataExplorerDataConnectionData","com.azure.analytics.defender.easm.models.AzureDataExplorerDataConnectionProperties":"Easm.AzureDataExplorerDataConnectionProperties","com.azure.analytics.defender.easm.models.Banner":"Easm.Banner","com.azure.analytics.defender.easm.models.ContactAsset":"Easm.ContactAsset","com.azure.analytics.defender.easm.models.ContactAssetResource":"Easm.ContactAssetResource","com.azure.analytics.defender.easm.models.Cookie":"Easm.Cookie","com.azure.analytics.defender.easm.models.Cve":"Easm.Cve","com.azure.analytics.defender.easm.models.Cvss3Summary":"Easm.Cvss3Summary","com.azure.analytics.defender.easm.models.DataConnection":"Easm.DataConnection","com.azure.analytics.defender.easm.models.DataConnectionContent":"Easm.DataConnectionContent","com.azure.analytics.defender.easm.models.DataConnectionData":"Easm.DataConnectionData","com.azure.analytics.defender.easm.models.DataConnectionFrequency":"Easm.DataConnectionFrequency","com.azure.analytics.defender.easm.models.DataConnectionProperties":"Easm.DataConnectionProperties","com.azure.analytics.defender.easm.models.DependentResource":"Easm.DependentResource","com.azure.analytics.defender.easm.models.DiscoGroup":"Easm.DiscoGroup","com.azure.analytics.defender.easm.models.DiscoGroupData":"Easm.DiscoGroupData","com.azure.analytics.defender.easm.models.DiscoRunResult":"Easm.DiscoRunResult","com.azure.analytics.defender.easm.models.DiscoRunState":"Easm.DiscoRunState","com.azure.analytics.defender.easm.models.DiscoSource":"Easm.DiscoSource","com.azure.analytics.defender.easm.models.DiscoSourceKind":"Easm.DiscoSourceKind","com.azure.analytics.defender.easm.models.DiscoTemplate":"Easm.DiscoTemplate","com.azure.analytics.defender.easm.models.DomainAsset":"Easm.DomainAsset","com.azure.analytics.defender.easm.models.DomainAssetResource":"Easm.DomainAssetResource","com.azure.analytics.defender.easm.models.ErrorDetail":"Easm.ErrorDetail","com.azure.analytics.defender.easm.models.GuidPair":"Easm.GuidPair","com.azure.analytics.defender.easm.models.HostAsset":"Easm.HostAsset","com.azure.analytics.defender.easm.models.HostAssetResource":"Easm.HostAssetResource","com.azure.analytics.defender.easm.models.HostCore":"Easm.HostCore","com.azure.analytics.defender.easm.models.InnerError":"Easm.InnerError","com.azure.analytics.defender.easm.models.InventoryAsset":"Easm.InventoryAsset","com.azure.analytics.defender.easm.models.IpAddressAsset":"Easm.IpAddressAsset","com.azure.analytics.defender.easm.models.IpAddressAssetResource":"Easm.IpAddressAssetResource","com.azure.analytics.defender.easm.models.IpBlock":"Easm.IpBlock","com.azure.analytics.defender.easm.models.IpBlockAsset":"Easm.IpBlockAsset","com.azure.analytics.defender.easm.models.IpBlockAssetResource":"Easm.IpBlockAssetResource","com.azure.analytics.defender.easm.models.Location":"Easm.Location","com.azure.analytics.defender.easm.models.LogAnalyticsDataConnection":"Easm.LogAnalyticsDataConnection","com.azure.analytics.defender.easm.models.LogAnalyticsDataConnectionData":"Easm.LogAnalyticsDataConnectionData","com.azure.analytics.defender.easm.models.LogAnalyticsDataConnectionProperties":"Easm.LogAnalyticsDataConnectionProperties","com.azure.analytics.defender.easm.models.ObservedBoolean":"Easm.ObservedBoolean","com.azure.analytics.defender.easm.models.ObservedHeader":"Easm.ObservedHeader","com.azure.analytics.defender.easm.models.ObservedInteger":"Easm.ObservedInteger","com.azure.analytics.defender.easm.models.ObservedIntegers":"Easm.ObservedIntegers","com.azure.analytics.defender.easm.models.ObservedLocation":"Easm.ObservedLocation","com.azure.analytics.defender.easm.models.ObservedLong":"Easm.ObservedLong","com.azure.analytics.defender.easm.models.ObservedPortState":"Easm.ObservedPortState","com.azure.analytics.defender.easm.models.ObservedPortStateValue":"Easm.ObservedPortStateValue","com.azure.analytics.defender.easm.models.ObservedString":"Easm.ObservedString","com.azure.analytics.defender.easm.models.ObservedValue":"Easm.ObservedValue","com.azure.analytics.defender.easm.models.PageAsset":"Easm.PageAsset","com.azure.analytics.defender.easm.models.PageAssetRedirectType":"Easm.PageAssetRedirectType","com.azure.analytics.defender.easm.models.PageAssetResource":"Easm.PageAssetResource","com.azure.analytics.defender.easm.models.PageCause":"Easm.PageCause","com.azure.analytics.defender.easm.models.Port":"Easm.Port","com.azure.analytics.defender.easm.models.ReportAssetSnapshotRequest":"Easm.ReportAssetSnapshotRequest","com.azure.analytics.defender.easm.models.ReportAssetSnapshotResult":"Easm.ReportAssetSnapshotResult","com.azure.analytics.defender.easm.models.ReportAssetSummaryRequest":"Easm.ReportAssetSummaryRequest","com.azure.analytics.defender.easm.models.ReportAssetSummaryResult":"Easm.ReportAssetSummaryResult","com.azure.analytics.defender.easm.models.ReportBillableAssetBreakdown":"Easm.ReportBillableAssetBreakdown","com.azure.analytics.defender.easm.models.ReportBillableAssetBreakdownKind":"Easm.ReportBillableAssetBreakdownKind","com.azure.analytics.defender.easm.models.ReportBillableAssetSnapshotResult":"Easm.ReportBillableAssetSnapshotResult","com.azure.analytics.defender.easm.models.ReportBillableAssetSummaryResult":"Easm.ReportBillableAssetSummaryResult","com.azure.analytics.defender.easm.models.Reputation":"Easm.Reputation","com.azure.analytics.defender.easm.models.ResourceUrl":"Easm.ResourceUrl","com.azure.analytics.defender.easm.models.SavedFilter":"Easm.SavedFilter","com.azure.analytics.defender.easm.models.SavedFilterData":"Easm.SavedFilterData","com.azure.analytics.defender.easm.models.ScanMetadata":"Easm.ScanMetadata","com.azure.analytics.defender.easm.models.Service":"Easm.Service","com.azure.analytics.defender.easm.models.SoaRecord":"Easm.SoaRecord","com.azure.analytics.defender.easm.models.Source":"Easm.Source","com.azure.analytics.defender.easm.models.SslCertAsset":"Easm.SslCertAsset","com.azure.analytics.defender.easm.models.SslCertAssetResource":"Easm.SslCertAssetResource","com.azure.analytics.defender.easm.models.SslCertAssetValidationType":"Easm.SslCertAssetValidationType","com.azure.analytics.defender.easm.models.SslServerConfig":"Easm.SslServerConfig","com.azure.analytics.defender.easm.models.SubResourceIntegrityCheck":"Easm.SubResourceIntegrityCheck","com.azure.analytics.defender.easm.models.Task":"Easm.Task","com.azure.analytics.defender.easm.models.TaskPhase":"Easm.TaskPhase","com.azure.analytics.defender.easm.models.TaskState":"Easm.TaskState","com.azure.analytics.defender.easm.models.ValidateResult":"Easm.ValidateResult","com.azure.analytics.defender.easm.models.WebComponent":"Easm.WebComponent"},"generatedFiles":["src/main/java/com/azure/analytics/defender/easm/EasmAsyncClient.java","src/main/java/com/azure/analytics/defender/easm/EasmClient.java","src/main/java/com/azure/analytics/defender/easm/EasmClientBuilder.java","src/main/java/com/azure/analytics/defender/easm/EasmServiceVersion.java","src/main/java/com/azure/analytics/defender/easm/implementation/EasmClientImpl.java","src/main/java/com/azure/analytics/defender/easm/implementation/package-info.java","src/main/java/com/azure/analytics/defender/easm/models/AlexaDetails.java","src/main/java/com/azure/analytics/defender/easm/models/AsAsset.java","src/main/java/com/azure/analytics/defender/easm/models/AsAssetResource.java","src/main/java/com/azure/analytics/defender/easm/models/AssetPageResult.java","src/main/java/com/azure/analytics/defender/easm/models/AssetResource.java","src/main/java/com/azure/analytics/defender/easm/models/AssetSecurityPolicy.java","src/main/java/com/azure/analytics/defender/easm/models/AssetState.java","src/main/java/com/azure/analytics/defender/easm/models/AssetSummaryResult.java","src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateData.java","src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateState.java","src/main/java/com/azure/analytics/defender/easm/models/AssetUpdateTransfers.java","src/main/java/com/azure/analytics/defender/easm/models/Attribute.java","src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItem.java","src/main/java/com/azure/analytics/defender/easm/models/AuditTrailItemKind.java","src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnection.java","src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionData.java","src/main/java/com/azure/analytics/defender/easm/models/AzureDataExplorerDataConnectionProperties.java","src/main/java/com/azure/analytics/defender/easm/models/Banner.java","src/main/java/com/azure/analytics/defender/easm/models/ContactAsset.java","src/main/java/com/azure/analytics/defender/easm/models/ContactAssetResource.java","src/main/java/com/azure/analytics/defender/easm/models/Cookie.java","src/main/java/com/azure/analytics/defender/easm/models/Cve.java","src/main/java/com/azure/analytics/defender/easm/models/Cvss3Summary.java","src/main/java/com/azure/analytics/defender/easm/models/DataConnection.java","src/main/java/com/azure/analytics/defender/easm/models/DataConnectionContent.java","src/main/java/com/azure/analytics/defender/easm/models/DataConnectionData.java","src/main/java/com/azure/analytics/defender/easm/models/DataConnectionFrequency.java","src/main/java/com/azure/analytics/defender/easm/models/DataConnectionProperties.java","src/main/java/com/azure/analytics/defender/easm/models/DependentResource.java","src/main/java/com/azure/analytics/defender/easm/models/DiscoGroup.java","src/main/java/com/azure/analytics/defender/easm/models/DiscoGroupData.java","src/main/java/com/azure/analytics/defender/easm/models/DiscoRunResult.java","src/main/java/com/azure/analytics/defender/easm/models/DiscoRunState.java","src/main/java/com/azure/analytics/defender/easm/models/DiscoSource.java","src/main/java/com/azure/analytics/defender/easm/models/DiscoSourceKind.java","src/main/java/com/azure/analytics/defender/easm/models/DiscoTemplate.java","src/main/java/com/azure/analytics/defender/easm/models/DomainAsset.java","src/main/java/com/azure/analytics/defender/easm/models/DomainAssetResource.java","src/main/java/com/azure/analytics/defender/easm/models/ErrorDetail.java","src/main/java/com/azure/analytics/defender/easm/models/GuidPair.java","src/main/java/com/azure/analytics/defender/easm/models/HostAsset.java","src/main/java/com/azure/analytics/defender/easm/models/HostAssetResource.java","src/main/java/com/azure/analytics/defender/easm/models/HostCore.java","src/main/java/com/azure/analytics/defender/easm/models/InnerError.java","src/main/java/com/azure/analytics/defender/easm/models/InventoryAsset.java","src/main/java/com/azure/analytics/defender/easm/models/IpAddressAsset.java","src/main/java/com/azure/analytics/defender/easm/models/IpAddressAssetResource.java","src/main/java/com/azure/analytics/defender/easm/models/IpBlock.java","src/main/java/com/azure/analytics/defender/easm/models/IpBlockAsset.java","src/main/java/com/azure/analytics/defender/easm/models/IpBlockAssetResource.java","src/main/java/com/azure/analytics/defender/easm/models/Location.java","src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnection.java","src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionData.java","src/main/java/com/azure/analytics/defender/easm/models/LogAnalyticsDataConnectionProperties.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedBoolean.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedHeader.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedInteger.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedIntegers.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedLocation.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedLong.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedPortState.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedPortStateValue.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedString.java","src/main/java/com/azure/analytics/defender/easm/models/ObservedValue.java","src/main/java/com/azure/analytics/defender/easm/models/PageAsset.java","src/main/java/com/azure/analytics/defender/easm/models/PageAssetRedirectType.java","src/main/java/com/azure/analytics/defender/easm/models/PageAssetResource.java","src/main/java/com/azure/analytics/defender/easm/models/PageCause.java","src/main/java/com/azure/analytics/defender/easm/models/Port.java","src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotRequest.java","src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSnapshotResult.java","src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryRequest.java","src/main/java/com/azure/analytics/defender/easm/models/ReportAssetSummaryResult.java","src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdown.java","src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetBreakdownKind.java","src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSnapshotResult.java","src/main/java/com/azure/analytics/defender/easm/models/ReportBillableAssetSummaryResult.java","src/main/java/com/azure/analytics/defender/easm/models/Reputation.java","src/main/java/com/azure/analytics/defender/easm/models/ResourceUrl.java","src/main/java/com/azure/analytics/defender/easm/models/SavedFilter.java","src/main/java/com/azure/analytics/defender/easm/models/SavedFilterData.java","src/main/java/com/azure/analytics/defender/easm/models/ScanMetadata.java","src/main/java/com/azure/analytics/defender/easm/models/Service.java","src/main/java/com/azure/analytics/defender/easm/models/SoaRecord.java","src/main/java/com/azure/analytics/defender/easm/models/Source.java","src/main/java/com/azure/analytics/defender/easm/models/SslCertAsset.java","src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetResource.java","src/main/java/com/azure/analytics/defender/easm/models/SslCertAssetValidationType.java","src/main/java/com/azure/analytics/defender/easm/models/SslServerConfig.java","src/main/java/com/azure/analytics/defender/easm/models/SubResourceIntegrityCheck.java","src/main/java/com/azure/analytics/defender/easm/models/Task.java","src/main/java/com/azure/analytics/defender/easm/models/TaskPhase.java","src/main/java/com/azure/analytics/defender/easm/models/TaskState.java","src/main/java/com/azure/analytics/defender/easm/models/ValidateResult.java","src/main/java/com/azure/analytics/defender/easm/models/WebComponent.java","src/main/java/com/azure/analytics/defender/easm/models/package-info.java","src/main/java/com/azure/analytics/defender/easm/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/easm/azure-analytics-defender-easm/src/main/resources/azure-analytics-defender-easm.properties b/sdk/easm/azure-analytics-defender-easm/src/main/resources/azure-analytics-defender-easm.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/main/resources/azure-analytics-defender-easm.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoTemplateSample.java b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoTemplateSample.java new file mode 100644 index 000000000000..28c5b21b5ae9 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoTemplateSample.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.DiscoGroup; +import com.azure.analytics.defender.easm.models.DiscoGroupData; +import com.azure.analytics.defender.easm.models.DiscoTemplate; +import com.azure.core.util.Configuration; +import com.azure.identity.InteractiveBrowserCredentialBuilder; + + +import java.util.Scanner; + +/** + * This sample shows you how to use the discovery_groups module to create discovery groups using templates provided by the discovery_templates module of the EasmClient + * + * Set the following environment variables before running the sample: + * 1) SUBSCRIPTION_ID - the subscription id for your resource + * 2) WORKSPACENAME - the workspace name for your resource + * 3) RESOURCEGROUPNAME - the resource group for your resource + * 4) REGION - the azure region your resource is in + * 5) PARTIAL_NAME - the search term for the templates. used for a case insensitive "contains" search + */ +public class DiscoTemplateSample { + public static void main(String[] args) { + String endpoint = Configuration.getGlobalConfiguration().get("ENDPOINT"); + + EasmClient easmClient = new EasmClientBuilder() + .endpoint(endpoint) + .credential(new InteractiveBrowserCredentialBuilder().build()) + .buildClient(); + + // The discoveryTemplatesList method can be used to find a discovery template using a filter. + // The endpoint will return templates based on a partial match on the name field. + + String partialName = Configuration.getGlobalConfiguration().get("PARTIAL_NAME"); + System.out.println("Partial name is " + partialName); + easmClient.listDiscoTemplate(partialName, 0) + .forEach((discoTemplateResult -> { + System.out.println(discoTemplateResult.getId() + ": " + discoTemplateResult.getDisplayName()); + })); + + // To get more detail about a disco template, we can use the discoveryTemplatesGet method. + // From here, we can see the names and seeds which would be used in a discovery run. + + System.out.println("Enter the template id:"); + + Scanner scanner = new Scanner(System.in); + String templateId = scanner.nextLine(); + + DiscoTemplate discoTemplateResult = easmClient.getDiscoTemplate(templateId); + + System.out.println("Chosen template id: " + discoTemplateResult.getId()); + System.out.println("The following names will be used:"); + discoTemplateResult.getNames().forEach(System.out::println); + System.out.println("The following seeds will be used:"); + discoTemplateResult.getSeeds().forEach(discoSource -> { + System.out.println(discoSource.getKind() + ", " + discoSource.getName()); + }); + + String groupName = "Sample discovery group"; + DiscoGroupData discoGroupRequest = new DiscoGroupData().setTemplateId(templateId); + + DiscoGroup discoGroupResult = easmClient.createOrReplaceDiscoGroup(groupName, discoGroupRequest); + + easmClient.runDiscoGroup(discoGroupResult.getName()); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoveryRunsSample.java b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoveryRunsSample.java new file mode 100644 index 000000000000..c0ad6c44d25a --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/DiscoveryRunsSample.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.DiscoRunResult; +import com.azure.analytics.defender.easm.models.DiscoSource; +import com.azure.analytics.defender.easm.models.DiscoSourceKind; +import com.azure.analytics.defender.easm.models.DiscoGroupData; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Configuration; +import com.azure.identity.InteractiveBrowserCredentialBuilder; + + +import java.util.ArrayList; +import java.util.List; + +/** + * This sample demonstrates how to create and manage discovery runs in a workspace + * + * Set the following environment variables before running the sample: + * 1) SUBSCRIPTION_ID - the subscription id for your resource + * 2) WORKSPACE_NAME - the workspace name for your resource + * 3) RESOURCE_GROUP - the resource group for your resource + * 4) REGION - the azure region your resource is in + * 5) HOSTS - a comma separated list of hosts you would like to run discovery on + * 6) DOMAINS - a comma separated list of hosts you would like to run discovery on + */ +public class DiscoveryRunsSample { + public static void main(String[] args) { + String endpoint = Configuration.getGlobalConfiguration().get("ENDPOINT"); + String discoveryGroupName = "Sample Disco"; + String discoveryGroupDescription = "This is a sample description for a discovery group"; + + EasmClient easmClient = new EasmClientBuilder() + .endpoint(endpoint) + // For the purposes of this demo, I've chosen the InteractiveBrowserCredential but any credential will work. + .credential(new InteractiveBrowserCredentialBuilder().build()) + .buildClient(); + + // In order to start discovery runs, we must first create a discovery group, which is a collection of known assets that we can pivot off of. + // These are created using the discoveryGroupsPut method + List seeds = new ArrayList<>(); + seeds.add(new DiscoSource() + .setKind(DiscoSourceKind.DOMAIN) + .setName("contoso.org")); + + DiscoGroupData discoGroupRequest = new DiscoGroupData().setName(discoveryGroupName).setDescription(discoveryGroupDescription).setSeeds(seeds); + + easmClient.createOrReplaceDiscoGroup(discoveryGroupName, discoGroupRequest); + + // Discovery groups created through the API's `put` method aren't run automatically, so we need to start the run ourselves. + easmClient.runDiscoGroup(discoveryGroupName); + + easmClient.listDiscoGroup() + .forEach((discoGroupResponse -> { + System.out.println(discoGroupResponse.getName()); + PagedIterable discoRunPageResponse = easmClient.listRuns(discoGroupResponse.getName(), null, 0); + discoRunPageResponse.forEach(discoRunResponse -> { + System.out.println(" - started: " + discoRunResponse.getStartedDate() + + ", finished: " + discoRunResponse.getCompletedDate() + + ", assets found: " + discoRunResponse.getTotalAssetsFoundCount()); + }); + })); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ManagingExternalIdsSample.java b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ManagingExternalIdsSample.java new file mode 100644 index 000000000000..8f243d4ad195 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ManagingExternalIdsSample.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.AssetUpdateData; +import com.azure.analytics.defender.easm.models.Task; +import com.azure.core.util.Configuration; +import com.azure.identity.InteractiveBrowserCredentialBuilder; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * External IDs can be a useful method of keeping track of assets in multiple systems, but it can be time consuming to + * manually tag each asset. In this example, we'll take a look at how you can, with a map of name/kind/external id, tag + * each asset in your inventory with an external id automatically using the SDK + * + * Set the following environment variables before running the sample: + * 1) SUBSCRIPTION_ID - the subscription id for your resource + * 2) WORKSPACE_NAME - the workspace name for your resource + * 3) RESOURCE_GROUP - the resource group for your resource + * 4) REGION - the azure region your resource is in + * 5) MAPPING - a json file with an external id mapping, like so: + * + * [ + * * { + * * 'name': 'example.com', + * * 'kind': 'host', + * * 'external_id': 'EXT040' + * * }, + * * { + * * 'name': 'example.com', + * * 'kind': 'domain', + * * 'external_id': 'EXT041' + * * } + * * ] + */ +public class ManagingExternalIdsSample { + public static void main(String[] args) throws IOException { + String endpoint = Configuration.getGlobalConfiguration().get("ENDPOINT"); + String externalIdMapping = Configuration.getGlobalConfiguration().get("MAPPING"); + + EasmClient easmClient = new EasmClientBuilder().endpoint(endpoint) + // For the purposes of this demo, I've chosen the InteractiveBrowserCredential but any credential will work. + .credential(new InteractiveBrowserCredentialBuilder().build()).buildClient(); + + // We can update each asset and append the tracking id of the update to our update ID list, so that + // we can keep track of the progress on each update later + List updateIds = new ArrayList<>(); + List externalIds = new ArrayList<>(); + + try (JsonReader jsonReader = JsonProviders.createReader(externalIdMapping)) { + List> mapping = jsonReader.readArray( + arrayReader -> arrayReader.readMap(JsonReader::readUntyped)); + + for (Map map : mapping) { + String externalId = Objects.toString(map.get("externalId"), null); + externalIds.add(externalId); + + AssetUpdateData assetUpdateRequest = new AssetUpdateData().setExternalId(externalId); + String filter = "kind = " + map.get("kind") + " AND name = " + map.get("name"); + Task taskResponse = easmClient.updateAssets(filter, assetUpdateRequest); + updateIds.add(taskResponse.getId()); + } + } + + // We can view the progress of each update using the tasksGet method + updateIds.forEach(id -> { + Task taskResponse = easmClient.getTask(id); + System.out.println(taskResponse.getId() + ": " + taskResponse.getState()); + }); + + // The updates can be viewed using the `assetsList` method by creating a filter that matches on each + // external id using an `in` query + String assetFilter = "External ID in ".concat(String.join(", ", externalIds)); + + easmClient.listAssetResource(assetFilter, "lastSeen", 0, null) + .forEach(response -> System.out.println(response.getExternalId() + ", " + response.getName())); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ReadmeSamples.java b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ReadmeSamples.java new file mode 100644 index 000000000000..39688cb8fa99 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/ReadmeSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.defender.easm; + +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public final class ReadmeSamples { + public void readmeSamples() { + // BEGIN: readme-sample-createDefenderEasmClient + String endpoint = Configuration.getGlobalConfiguration().get("ENDPOINT"); + + EasmClient easmClient = new EasmClientBuilder() + .endpoint(endpoint) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); + // END: readme-sample-createDefenderEasmClient + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/SavedFilterSample.java b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/SavedFilterSample.java new file mode 100644 index 000000000000..b1cb82474e93 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/samples/java/com/azure/analytics/defender/easm/SavedFilterSample.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.AssetUpdateData; +import com.azure.analytics.defender.easm.models.AssetUpdateState; +import com.azure.analytics.defender.easm.models.SavedFilter; +import com.azure.analytics.defender.easm.models.SavedFilterData; +import com.azure.core.util.Configuration; +import com.azure.identity.InteractiveBrowserCredentialBuilder; + +/** + * Saved Filters are used to store a query within EASM, these saved queries can be used to synchronize exact queries across multiple scripts, or to ensure a team is looking at the same assets + * In this example, we'll go over how a saved filter could be used to synchronize the a query across multiple scripts + * + * Set the following environment variables before running the sample: + * 1) SUBSCRIPTION_ID - the subscription id for your resource + * 2) WORKSPACE_NAME - the workspace name for your resource + * 3) RESOURCE_GROUP - the resource group for your resource + * 4) REGION - the azure region your resource is in + */ +public class SavedFilterSample { + + /* + A sample asset list call that could be used to monitor the assets: + */ + private static void monitor(SavedFilter response){ + // your monitor logic here + } + + + public static void main(String[] args) { + String endpoint = Configuration.getGlobalConfiguration().get("ENDPOINT"); + + EasmClient easmClient = new EasmClientBuilder() + .endpoint(endpoint) + // For the purposes of this demo, I've chosen the InteractiveBrowserCredential but any credential will work. + .credential(new InteractiveBrowserCredentialBuilder().build()) + .buildClient(); + + String savedFilterName = "Sample saved filter"; + SavedFilterData savedFilterRequest = new SavedFilterData("IP Address = 1.1.1.1", "Monitored Addresses"); + + easmClient.createOrReplaceSavedFilter(savedFilterName, savedFilterRequest); + + String monitorFilter = easmClient.getSavedFilter(savedFilterName).getFilter(); + + easmClient.listSavedFilter(monitorFilter, 0) + .forEach(SavedFilterSample::monitor); + + AssetUpdateData assetUpdateRequest = new AssetUpdateData().setState(AssetUpdateState.CONFIRMED); + easmClient.updateAssets(monitorFilter, assetUpdateRequest); + + // Should your needs change, the filter can be updated with no need to update the scripts it's used in + // Simply submit a new `savedFiltersPut` request to replace the old description and filter with a new set + + SavedFilterData newSavedFilterRequest = new SavedFilterData("IP Address = 0.0.0.0", "Monitoring Addresses"); + + easmClient.createOrReplaceSavedFilter(savedFilterName, newSavedFilterRequest); + + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/AssetsAsyncTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/AssetsAsyncTest.java new file mode 100644 index 000000000000..99cd38d4a684 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/AssetsAsyncTest.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.*; +import com.azure.core.http.rest.PagedFlux; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; + +public class AssetsAsyncTest extends EasmClientTestBase { + private String assetName = "kumed.com"; + private String assetKind = "domain"; + private String filter = "name = " + assetName + " and type = " + assetKind; + private String assetId = assetKind + "$$" + "kumc.edu"; + + private Class getAssetResourceClass(String kind) { + switch (kind) { + case "as": + return AsAssetResource.class; + + case "contact": + return ContactAssetResource.class; + + case "domain": + return DomainAssetResource.class; + + case "host": + return HostAssetResource.class; + + case "ipAddress": + return IpAddressAssetResource.class; + + case "ipBlock": + return IpBlockAssetResource.class; + + case "page": + return PageAssetResource.class; + + case "sslCert": + return SslCertAssetResource.class; + + default: + return null; + + } + } + + @Test + public void testAssetsListAsync() { + PagedFlux assetPageResponse = easmAsyncClient.listAssetResource(filter, "lastSeen", 0, null); + + StepVerifier.create(assetPageResponse).assertNext(assetResource -> { + assertEquals(assetName, assetResource.getName()); + assertInstanceOf(getAssetResourceClass(assetKind), assetResource); + }).expectComplete().verify(); + } + + @Test + public void testAssetsUpdateAsync() { + AssetUpdateData assetUpdateData = new AssetUpdateData().setExternalId("new_external_id"); + Mono taskMono = easmAsyncClient.updateAssets(filter, assetUpdateData); + StepVerifier.create(taskMono).assertNext(task -> { + assertEquals(TaskState.COMPLETE, task.getState()); + assertEquals(TaskPhase.COMPLETE, task.getPhase()); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } + + @Test + public void testAssetsGetAsync() { + Mono assetMono = easmAsyncClient.getAssetResource(assetId); + StepVerifier.create(assetMono).assertNext(assetResource -> { + System.out.println("Asset name is: " + assetResource.getName()); + assertInstanceOf(getAssetResourceClass(assetKind), assetResource); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/AssetsTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/AssetsTest.java new file mode 100644 index 000000000000..a5674fb3ca51 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/AssetsTest.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.*; +import com.azure.core.http.rest.PagedIterable; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; + +public class AssetsTest extends EasmClientTestBase { + private String assetName = "kumed.com"; + private String assetKind = "domain"; + private String filter = "name = " + assetName + " and type = " + assetKind; + private String assetId = assetKind + "$$" + "kumc.edu"; + + private Class getAssetResourceClass(String kind) { + switch (kind) { + case "as": + return AsAssetResource.class; + + case "contact": + return ContactAssetResource.class; + + case "domain": + return DomainAssetResource.class; + + case "host": + return HostAssetResource.class; + + case "ipAddress": + return IpAddressAssetResource.class; + + case "ipBlock": + return IpBlockAssetResource.class; + + case "page": + return PageAssetResource.class; + + case "sslCert": + return SslCertAssetResource.class; + + default: + return null; + + } + } + + @Test + public void testAssetsListWithResponse() { + + PagedIterable assetPageResponse = easmClient.listAssetResource(filter, "lastSeen", 0, null); + AssetResource assetResponse = assetPageResponse.iterator().next(); + assertEquals(assetName, assetResponse.getName()); + assertInstanceOf(getAssetResourceClass(assetKind), assetResponse); + } + + @Test + public void testAssetsUpdateWithResponse() { + AssetUpdateData assetUpdateData = new AssetUpdateData().setExternalId("new_external_id"); + Task taskResponse = easmClient.updateAssets(filter, assetUpdateData); + assertEquals(TaskState.COMPLETE, taskResponse.getState()); + assertEquals(TaskPhase.COMPLETE, taskResponse.getPhase()); + //assertTrue(taskResponse.getId().matches(UUID_REGEX)); + } + + // + @Test + public void testAssetsGetWithResponse() { + AssetResource assetResponse = easmClient.getAssetResource(assetId); + assertInstanceOf(getAssetResourceClass(assetKind), assetResponse); + //assertTrue(assetResponse.getUuid().matches(UUID_REGEX)); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DataConnectionAsyncTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DataConnectionAsyncTest.java new file mode 100644 index 000000000000..07bd52f9d588 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DataConnectionAsyncTest.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.*; +import com.azure.core.http.rest.PagedFlux; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + +public class DataConnectionAsyncTest extends EasmClientTestBase { + String dataConnectionName = "sample-dc"; + String newDataConnectionName = "new-sample-dc"; + String logAnalyticsKey = "sample-key"; + String logAnalyticsWorkspace = "sample-workspace"; + + @Test + public void testDataConnectionListAsync() { + PagedFlux dataConnectionPagedFlux = easmAsyncClient.listDataConnection(0); + List dataConnectionList = new ArrayList<>(); + StepVerifier.create(dataConnectionPagedFlux) + .thenConsumeWhile(dataConnectionList::add) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + for (DataConnection dataConnection : dataConnectionList) { + assertNotNull(dataConnection); + assertNotNull(dataConnection.getName()); + assertNotNull(dataConnection.getDisplayName()); + } + } + + @Test + public void testDataConnectionValidateAsync() { + LogAnalyticsDataConnectionProperties properties + = new LogAnalyticsDataConnectionProperties().setApiKey(logAnalyticsKey) + .setWorkspaceId(logAnalyticsWorkspace); + LogAnalyticsDataConnectionData request + = new LogAnalyticsDataConnectionData(properties).setName(newDataConnectionName) + .setContent(DataConnectionContent.ATTACK_SURFACE_INSIGHTS) + .setFrequency(DataConnectionFrequency.WEEKLY) + .setFrequencyOffset(1); + Mono validateResultMono = easmAsyncClient.validateDataConnection(request); + StepVerifier.create(validateResultMono).assertNext(validateResult -> { + assertNull(validateResult.getError()); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } + + @Test + public void testDataConnectionsPutAsync() { + LogAnalyticsDataConnectionProperties properties + = new LogAnalyticsDataConnectionProperties().setWorkspaceId(logAnalyticsWorkspace) + .setApiKey(logAnalyticsKey); + LogAnalyticsDataConnectionData request + = new LogAnalyticsDataConnectionData(properties).setName(newDataConnectionName) + .setContent(DataConnectionContent.ATTACK_SURFACE_INSIGHTS) + .setFrequency(DataConnectionFrequency.WEEKLY) + .setFrequencyOffset(1); + Mono dataConnectionMono + = easmAsyncClient.createOrReplaceDataConnection(newDataConnectionName, request); + StepVerifier.create(dataConnectionMono).assertNext(dataConnection -> { + assertNotNull(dataConnection); + assertEquals(newDataConnectionName, dataConnection.getName()); + assertEquals(newDataConnectionName, dataConnection.getDisplayName()); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } + + @Test + public void testDataConnectionDeleteAsync() { + Mono deleteMono = easmAsyncClient.deleteDataConnection(dataConnectionName); + StepVerifier.create(deleteMono).expectComplete(); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DataConnectionsTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DataConnectionsTest.java new file mode 100644 index 000000000000..1ebaa476782f --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DataConnectionsTest.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.*; +import com.azure.core.http.rest.PagedIterable; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class DataConnectionsTest extends EasmClientTestBase { + + String dataConnectionName = "sample-dc"; + String newDataConnectionName = "sample-dc"; + String clusterName = "sample-cluster"; + String databaseName = "sample-db"; + + @Test + public void testdataConnectionsListWithResponse() { + PagedIterable dataConnectionPageResult = easmClient.listDataConnection(); + DataConnection dataConnection = dataConnectionPageResult.stream().iterator().next(); + assertEquals("new-sample-dc", dataConnection.getName()); + assertNotNull("new-sample-dc", dataConnection.getDisplayName()); + + } + + @Test + public void testdataConnectionsValidateWithResponse() { + AzureDataExplorerDataConnectionProperties properties + = new AzureDataExplorerDataConnectionProperties().setClusterName(clusterName) + .setDatabaseName(databaseName) + .setRegion("eastus"); + AzureDataExplorerDataConnectionData request + = new AzureDataExplorerDataConnectionData(properties).setName(newDataConnectionName) + .setContent(DataConnectionContent.ASSETS) + .setFrequency(DataConnectionFrequency.DAILY); + ValidateResult response = easmClient.validateDataConnection(request); + assertNull(response.getError()); + } + + @Test + public void testdataConnectionsGetWithResponse() { + DataConnection response = easmClient.getDataConnection(dataConnectionName); + assertEquals(dataConnectionName, response.getName()); + assertEquals(dataConnectionName, response.getDisplayName()); + } + + @Test + public void testdataConnectionsPutWithResponse() { + AzureDataExplorerDataConnectionProperties properties + = new AzureDataExplorerDataConnectionProperties().setClusterName(clusterName) + .setDatabaseName(databaseName) + .setRegion("eastus"); + AzureDataExplorerDataConnectionData request + = new AzureDataExplorerDataConnectionData(properties).setName(newDataConnectionName) + .setContent(DataConnectionContent.ASSETS) + .setFrequency(DataConnectionFrequency.DAILY); + DataConnection dataConnectionResponse + = easmClient.createOrReplaceDataConnection(newDataConnectionName, request); + + assertEquals(newDataConnectionName, dataConnectionResponse.getName()); + assertEquals(newDataConnectionName, dataConnectionResponse.getDisplayName()); + } + + @Test + public void testdataConnectionsDeleteWithResponse() { + easmClient.deleteDataConnection(dataConnectionName); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryGroupsAsyncTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryGroupsAsyncTest.java new file mode 100644 index 000000000000..37fa888dcf02 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryGroupsAsyncTest.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.*; +import com.azure.core.http.rest.PagedFlux; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + +public class DiscoveryGroupsAsyncTest extends EasmClientTestBase { + String knownGroupName = "University of Kansas"; + String newGroupName = "Async Test"; + String newGroupDescription = "Group created for async test"; + String seedKind = "domain"; + String seedName = "sampleseed.org"; + + private boolean doSeedsMatch(DiscoSource seedA, DiscoSource seedB) { + return seedA.getKind() == seedB.getKind() && seedA.getName().equals(seedB.getName()); + } + + @Test + public void testDiscoveryGroupsListAsync() { + List discoGroupList = new ArrayList<>(); + PagedFlux discoGroupPagedFlux = easmAsyncClient.listDiscoGroup(null, 0); + StepVerifier.create(discoGroupPagedFlux) + .thenConsumeWhile(discoGroupList::add) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + + for (DiscoGroup discoGroup : discoGroupList) { + assertNotNull(discoGroup.getName()); + assertNotNull(discoGroup.getDescription()); + assertNotNull(discoGroup.getTier()); + assertNotNull(discoGroup.getId()); + } + } + + @Test + public void testDiscoveryGroupValidateAsync() { + List seeds + = Arrays.asList(new DiscoSource().setKind(DiscoSourceKind.fromString(seedKind)).setName(seedName)); + DiscoGroupData discoGroupData = new DiscoGroupData().setName(newGroupName) + .setDescription(newGroupDescription) + .setSeeds(seeds) + .setFrequencyMilliseconds(604800000L) + .setTier("advanced"); + + Mono validateResultMono = easmAsyncClient.validateDiscoGroup(discoGroupData); + StepVerifier.create(validateResultMono).assertNext(validateResult -> { + assertNull(validateResult.getError()); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } + + @Test + public void testDiscoveryGroupGetAsync() { + Mono discoGroupMono = easmAsyncClient.getDiscoGroup(knownGroupName); + StepVerifier.create(discoGroupMono).assertNext(discoGroup -> { + assertEquals(knownGroupName, discoGroup.getId()); + assertEquals(knownGroupName, discoGroup.getName()); + assertEquals(knownGroupName, discoGroup.getDisplayName()); + assertNotNull(discoGroup.getDescription()); + assertNotNull(discoGroup.getTier()); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } + + @Test + public void testDiscoveryGroupRunAsync() { + Mono runDiscoGroupMono = easmAsyncClient.runDiscoGroup(knownGroupName); + StepVerifier.create(runDiscoGroupMono).expectComplete().verify(DEFAULT_TIMEOUT); + } + + @Test + public void testDiscoveryGroupListRunsAsync() { + PagedFlux discoRunResultPagedFlux = easmAsyncClient.listRuns(knownGroupName, null, 0); + List discoRunResults = new ArrayList<>(); + + StepVerifier.create(discoRunResultPagedFlux) + .thenConsumeWhile(discoRunResults::add) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + assertTrue(discoRunResults.size() > 2); + for (DiscoRunResult discoRunResult : discoRunResults) { + assertNotNull(discoRunResult.getState()); + } + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryGroupsTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryGroupsTest.java new file mode 100644 index 000000000000..cc75ca57b30b --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryGroupsTest.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.*; +import com.azure.core.http.rest.PagedIterable; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + +public class DiscoveryGroupsTest extends EasmClientTestBase { + + String knownGroupName = "University of Kansas"; + String newGroupName = "New disco group Name"; + String newGroupDescription = "This is a description"; + String seedKind = "domain"; + String seedName = "example.org"; + + private boolean doSeedsMatch(DiscoSource seedA, DiscoSource seedB) { + return seedA.getKind() == seedB.getKind() && seedA.getName().equals(seedB.getName()); + } + + @Test + public void testdiscoveryGroupsListWithResponse() { + PagedIterable discoGroups = easmClient.listDiscoGroup(null, 0); + DiscoGroup discoGroup = discoGroups.stream().iterator().next(); + assertNotNull(discoGroup.getName()); + assertNotNull(discoGroup.getDescription()); + assertNotNull(discoGroup.getTier()); + assertNotNull(discoGroup.getId()); + } + + @Test + public void testdiscoveryGroupsValidateWithResponse() { + List seeds + = Arrays.asList(new DiscoSource().setKind(DiscoSourceKind.fromString(seedKind)).setName(seedName)); + DiscoGroupData discoGroupData = new DiscoGroupData().setName("validate group name") + .setDescription(newGroupDescription) + .setSeeds(seeds) + .setFrequencyMilliseconds(604800000L) + .setTier("advanced"); + ValidateResult validateResponse = easmClient.validateDiscoGroup(discoGroupData); + assertNull(validateResponse.getError()); + } + + @Test + public void testdiscoveryGroupsGetWithResponse() { + DiscoGroup discoGroupResponse = easmClient.getDiscoGroup(knownGroupName); + assertEquals(knownGroupName, discoGroupResponse.getId()); + assertEquals(knownGroupName, discoGroupResponse.getName()); + assertEquals(knownGroupName, discoGroupResponse.getDisplayName()); + assertNotNull(discoGroupResponse.getDescription()); + assertNotNull(discoGroupResponse.getTier()); + + } + + @Test + public void testdiscoveryGroupsPutWithResponse() { + List seeds + = Arrays.asList(new DiscoSource().setKind(DiscoSourceKind.fromString(seedKind)).setName(seedName)); + DiscoGroupData discoGroupData + = new DiscoGroupData().setName(newGroupName).setDescription(newGroupDescription).setSeeds(seeds); + + DiscoGroup discoGroupResponse = easmClient.createOrReplaceDiscoGroup(newGroupName, discoGroupData); + + assertEquals(newGroupName, discoGroupResponse.getName()); + assertEquals(newGroupName, discoGroupResponse.getDisplayName()); + assertEquals(newGroupDescription, discoGroupResponse.getDescription()); + assertTrue(doSeedsMatch(seeds.get(0), discoGroupResponse.getSeeds().get(0))); + } + + @Test + public void testdiscoveryGroupsRunWithResponse() { + easmClient.runDiscoGroup(knownGroupName); + } + + @Test + public void testdiscoveryGroupsListRunsWithResponse() { + PagedIterable discoRunPageResponse = easmClient.listRuns(knownGroupName, null, 0); + assertNotNull(discoRunPageResponse); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryTemplatesAsyncTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryTemplatesAsyncTest.java new file mode 100644 index 000000000000..f9abfee7e411 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryTemplatesAsyncTest.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.DiscoTemplate; +import com.azure.core.http.rest.PagedFlux; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class DiscoveryTemplatesAsyncTest extends EasmClientTestBase { + String templateId = "43488"; + String partialName = "sample"; + + @Test + public void testDiscoveryTemplatesListAsync() { + PagedFlux discoTemplatePagedFlux = easmAsyncClient.listDiscoTemplate(partialName, 0); + List discoTemplateList = new ArrayList<>(); + + StepVerifier.create(discoTemplatePagedFlux) + .thenConsumeWhile(discoTemplateList::add) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + + assertTrue(discoTemplateList.size() > 1); + for (DiscoTemplate discoTemplate : discoTemplateList) { + if (!discoTemplate.getName().toLowerCase().contains(partialName)) { + System.out.println("That name is: " + discoTemplate.getName().toLowerCase()); + } + assertTrue(discoTemplate.getName().toLowerCase().contains(partialName)); + assertNotNull(discoTemplate.getId()); + } + } + + @Test + public void testDiscoveryTemplateGetAsync() { + Mono discoTemplateMono = easmAsyncClient.getDiscoTemplate(templateId); + StepVerifier.create(discoTemplateMono).assertNext(discoTemplate -> { + assertNotNull(discoTemplate.getName()); + assertNotNull(discoTemplate.getId()); + }); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryTemplatesTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryTemplatesTest.java new file mode 100644 index 000000000000..0d23e735d021 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/DiscoveryTemplatesTest.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.DiscoTemplate; +import com.azure.core.http.rest.PagedIterable; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class DiscoveryTemplatesTest extends EasmClientTestBase { + + String templateId = "43488"; + String partialName = "ku"; + + @Test + public void testdiscoveryTemplatesListWithResponse() { + + PagedIterable discoTemplatePageResponse = easmClient.listDiscoTemplate(partialName, 0); + DiscoTemplate discoTemplateResponse = discoTemplatePageResponse.stream().iterator().next(); + assertTrue(discoTemplateResponse.getName().toLowerCase().contains(partialName)); + assertNotNull(discoTemplateResponse.getId()); + } + + @Test + public void testdiscoveryTemplatesGetWithResponse() { + DiscoTemplate discoTemplateResponse = easmClient.getDiscoTemplate(templateId); + assertNotNull(discoTemplateResponse.getName()); + assertNotNull(discoTemplateResponse.getId()); + } + +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/EasmClientTestBase.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/EasmClientTestBase.java new file mode 100644 index 000000000000..6ecf614af8f8 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/EasmClientTestBase.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.defender.easm; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.models.TestProxySanitizer; +import com.azure.core.test.models.TestProxySanitizerType; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; +import reactor.core.publisher.Mono; + +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +public class EasmClientTestBase extends TestProxyTestBase { + private final String sanitizedRequestUri + = "https://REDACTED/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/REDACTED/workspaces/REDACTED/"; + private final String requestUriRegex = "https://.*/subscriptions/.*/resourceGroups/.*/workspaces/.*?/"; + protected final String uuidRegex = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"; + private final String sanitizedUuid = "00000000-0000-0000-0000-000000000000"; + protected EasmClient easmClient; + protected EasmAsyncClient easmAsyncClient; + protected static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(60); + + @Override + protected void beforeTest() { + List customSanitizers = new ArrayList<>(); + EasmClientBuilder easmClientbuilder = new EasmClientBuilder().endpoint(Configuration.getGlobalConfiguration() + .get("ENDPOINT", + "https://REDACTED/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/REDACTED/workspaces/REDACTED")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + easmClientbuilder.httpClient(interceptorManager.getPlaybackClient()) + .credential(request -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX))); + } else if (getTestMode() == TestMode.RECORD) { + easmClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + easmClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + customSanitizers.add(new TestProxySanitizer(requestUriRegex, sanitizedRequestUri, TestProxySanitizerType.URL)); + customSanitizers + .add(new TestProxySanitizer("$..uuid", uuidRegex, sanitizedUuid, TestProxySanitizerType.BODY_KEY)); + if (getTestMode() != TestMode.LIVE) { + interceptorManager.addSanitizers(customSanitizers); + interceptorManager.removeSanitizers("AZSDK3430", "AZSDK3493"); + } + easmClient = easmClientbuilder.buildClient(); + easmAsyncClient = easmClientbuilder.buildAsyncClient(); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/ReportsAsyncTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/ReportsAsyncTest.java new file mode 100644 index 000000000000..143e15003806 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/ReportsAsyncTest.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.ReportAssetSnapshotRequest; +import com.azure.analytics.defender.easm.models.ReportAssetSnapshotResult; +import com.azure.analytics.defender.easm.models.ReportBillableAssetSummaryResult; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import static org.junit.jupiter.api.Assertions.*; + +public class ReportsAsyncTest extends EasmClientTestBase { + String metric = "savedfilter_metric_51126"; + + @Test + public void testReportsBillableAsync() { + Mono reportBillableAssetSummaryResultMono = easmAsyncClient.getBillable(); + StepVerifier.create(reportBillableAssetSummaryResultMono).assertNext(reportBillableAssetSummaryResult -> { + assertTrue(reportBillableAssetSummaryResult.getAssetSummaries().size() > 0); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } + + @Test + public void testReportsSnapshotAsync() { + ReportAssetSnapshotRequest reportAssetSnapshotRequest + = new ReportAssetSnapshotRequest().setMetric(metric).setPage(0).setSize(25); + Mono reportAssetSnapshotResultMono + = easmAsyncClient.getSnapshot(reportAssetSnapshotRequest); + StepVerifier.create(reportAssetSnapshotResultMono).assertNext(reportAssetSnapshotResult -> { + assertNotNull(reportAssetSnapshotResult.getDisplayName()); + assertEquals(metric, reportAssetSnapshotResult.getMetric()); + assertNotNull(reportAssetSnapshotResult.getDescription()); + assertNotNull(reportAssetSnapshotResult.getAssets()); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/ReportsTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/ReportsTest.java new file mode 100644 index 000000000000..cf56d7ea7b28 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/ReportsTest.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.*; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; + +import static org.junit.jupiter.api.Assertions.*; + +public class ReportsTest extends EasmClientTestBase { + String metric = "savedfilter_metric_51126"; + + @Test + public void testreportsBillableWithResult() { + ReportBillableAssetSummaryResult reportBillableAssetSummaryResult = easmClient.getBillable(); + assertTrue(reportBillableAssetSummaryResult.getAssetSummaries().size() > 0); + } + + @Test + public void testreportsSnapshotWithResult() { + ReportAssetSnapshotRequest reportAssetSnapshotRequest + = new ReportAssetSnapshotRequest().setMetric(metric).setPage(0).setSize(25); + ReportAssetSnapshotResult reportAssetSnapshotResult = easmClient.getSnapshot(reportAssetSnapshotRequest); + assertNotNull(reportAssetSnapshotResult.getDisplayName()); + assertEquals(metric, reportAssetSnapshotResult.getMetric()); + assertNotNull(reportAssetSnapshotResult.getDescription()); + assertNotNull(reportAssetSnapshotResult.getAssets()); + } + + @Test + public void testreportsSummaryWithResult() { + ReportAssetSummaryRequest reportAssetSummaryRequest + = new ReportAssetSummaryRequest().setMetrics(Arrays.asList(metric)); + ReportAssetSummaryResult reportAssetSummaryResult = easmClient.getSummary(reportAssetSummaryRequest); + assertTrue(reportAssetSummaryResult.getAssetSummaries().size() > 0); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/SavedFiltersAsyncTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/SavedFiltersAsyncTest.java new file mode 100644 index 000000000000..68c52a8417cc --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/SavedFiltersAsyncTest.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.SavedFilter; +import com.azure.analytics.defender.easm.models.SavedFilterData; +import com.azure.core.http.rest.PagedFlux; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + +public class SavedFiltersAsyncTest extends EasmClientTestBase { + String deleteSavedFilterName = "put_filter"; + String putSavedFilterName = "put_filter"; + String knownExistingFilter = "new_put_filter"; + String filter = "name = \"" + putSavedFilterName + "\""; + + @Test + public void testSavedFiltersListAsync() { + PagedFlux savedFilterPagedFlux = easmAsyncClient.listSavedFilter(); + List savedFilterList = new ArrayList<>(); + + StepVerifier.create(savedFilterPagedFlux) + .thenConsumeWhile(savedFilterList::add) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + for (SavedFilter savedFilter : savedFilterList) { + assertNotNull(savedFilter.getId()); + assertNotNull(savedFilter.getDescription()); + } + } + + @Test + public void testSavedFiltersGetAsync() { + Mono savedFilterMono = easmAsyncClient.getSavedFilter(knownExistingFilter); + StepVerifier.create(savedFilterMono).assertNext(savedFilter -> { + assertEquals(knownExistingFilter, savedFilter.getId()); + assertEquals(knownExistingFilter, savedFilter.getName()); + assertNotNull(savedFilter.getDisplayName()); + assertNotNull(savedFilter.getFilter()); + assertNotNull(savedFilter.getDescription()); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } + + @Test + public void testSavedFiltersCreateOrReplaceAsync() { + SavedFilterData savedFilterData = new SavedFilterData(filter, "Sample description"); + Mono savedFilterMono + = easmAsyncClient.createOrReplaceSavedFilter(putSavedFilterName, savedFilterData); + StepVerifier.create(savedFilterMono).assertNext(savedFilter -> { + assertEquals(putSavedFilterName, savedFilter.getName()); + assertEquals(putSavedFilterName, savedFilter.getId()); + assertEquals(putSavedFilterName, savedFilter.getDisplayName()); + assertEquals(savedFilterData.getDescription(), savedFilter.getDescription()); + }).expectComplete().verify(DEFAULT_TIMEOUT); + + } + + @Test + public void testSavedFiltersDeleteAsync() { + Mono deleteMono = easmAsyncClient.deleteSavedFilter(deleteSavedFilterName); + StepVerifier.create(deleteMono).expectComplete().verify(DEFAULT_TIMEOUT); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/SavedFiltersTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/SavedFiltersTest.java new file mode 100644 index 000000000000..f32e3b5a3c4d --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/SavedFiltersTest.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.SavedFilterData; +import com.azure.analytics.defender.easm.models.SavedFilter; +import com.azure.core.http.rest.PagedIterable; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class SavedFiltersTest extends EasmClientTestBase { + + String deleteSavedFilterName = "put_filter"; + String putSavedFilterName = "put_filter"; + String knownExistingFilter = "new_put_filter"; + String filter = "name = \"" + putSavedFilterName + "\""; + + @Test + public void testsavedFiltersListWithResponse() { + PagedIterable savedFilters = easmClient.listSavedFilter(); + SavedFilter savedFilterResponse = savedFilters.stream().iterator().next(); + assertNotNull(savedFilterResponse.getId()); + assertNotNull(savedFilterResponse.getDescription()); + + } + + @Test + public void testsavedFiltersGetWithResponse() { + SavedFilter savedFilterResponse = easmClient.getSavedFilter(knownExistingFilter); + assertEquals(knownExistingFilter, savedFilterResponse.getId()); + assertEquals(knownExistingFilter, savedFilterResponse.getName()); + assertNotNull(savedFilterResponse.getDisplayName()); + assertNotNull(savedFilterResponse.getFilter()); + assertNotNull(savedFilterResponse.getDescription()); + } + + @Test + public void testsavedFiltersPutWithResponse() { + SavedFilterData savedFilterData = new SavedFilterData(filter, "Sample description"); + SavedFilter savedFilterResponse = easmClient.createOrReplaceSavedFilter(putSavedFilterName, savedFilterData); + assertEquals(putSavedFilterName, savedFilterResponse.getName()); + assertEquals(putSavedFilterName, savedFilterResponse.getId()); + assertEquals(putSavedFilterName, savedFilterResponse.getDisplayName()); + assertEquals(savedFilterData.getDescription(), savedFilterResponse.getDescription()); + } + + @Test + public void testsavedFiltersDeleteWithResponse() { + easmClient.deleteSavedFilter(deleteSavedFilterName); + } + +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/TasksAsyncTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/TasksAsyncTest.java new file mode 100644 index 000000000000..5256940356f2 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/TasksAsyncTest.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.Task; +import com.azure.core.http.rest.PagedFlux; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class TasksAsyncTest extends EasmClientTestBase { + String existingTaskId = "efad1fac-52d5-4ea9-b601-d5bf54a83780"; + String cancelTaskId = "efad1fac-52d5-4ea9-b601-d5bf54a83780"; + + @Test + public void testTasksListAsync() { + PagedFlux taskPagedFlux = easmAsyncClient.listTask(); + StepVerifier.create(taskPagedFlux).assertNext(task -> { + task.getId().matches(uuidRegex); + }); + } + + @Test + public void testTasksGetAsync() { + Mono taskMono = easmAsyncClient.getTask(existingTaskId); + StepVerifier.create(taskMono).assertNext(task -> { + assertTrue(task.getId().equals(existingTaskId)); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } + + @Test + public void testTasksCancelAsync() { + Mono taskMono = easmAsyncClient.cancelTask(cancelTaskId); + StepVerifier.create(taskMono).assertNext(task -> { + assertTrue(task.getId().equals(existingTaskId)); + }).expectComplete().verify(DEFAULT_TIMEOUT); + } +} diff --git a/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/TasksTest.java b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/TasksTest.java new file mode 100644 index 000000000000..0dbc5c1d021d --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/src/test/java/com/azure/analytics/defender/easm/TasksTest.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.analytics.defender.easm; + +import com.azure.analytics.defender.easm.models.Task; +import com.azure.core.http.rest.PagedIterable; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class TasksTest extends EasmClientTestBase { + + String existingTaskId = "efad1fac-52d5-4ea9-b601-d5bf54a83780"; + String cancelTaskId = "efad1fac-52d5-4ea9-b601-d5bf54a83780"; + + @Test + public void testtasksListWithResponse() { + PagedIterable taskPageResponse = easmClient.listTask(); + Task taskResponse = taskPageResponse.stream().iterator().next(); + assertTrue(taskResponse.getId().matches(uuidRegex)); + + } + + @Test + public void testtasksGetWithResponse() { + Task taskResponse = easmClient.getTask(existingTaskId); + assertTrue(taskResponse.getId().matches(uuidRegex)); + } + + @Test + public void testtasksCancelWithResponse() { + Task taskResponse = easmClient.cancelTask(cancelTaskId); + assertTrue(taskResponse.getId().matches(uuidRegex)); + } + +} diff --git a/sdk/easm/azure-analytics-defender-easm/tsp-location.yaml b/sdk/easm/azure-analytics-defender-easm/tsp-location.yaml new file mode 100644 index 000000000000..5e635dbe1148 --- /dev/null +++ b/sdk/easm/azure-analytics-defender-easm/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/riskiq/Easm +commit: b0f9eae206e2260d2e20e04a0bc2df9774745893 +repo: Azure/azure-rest-api-specs diff --git a/sdk/easm/ci.yml b/sdk/easm/ci.yml new file mode 100644 index 000000000000..ca52e4590366 --- /dev/null +++ b/sdk/easm/ci.yml @@ -0,0 +1,39 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/easm/ci.yml + - sdk/easm/azure-analytics-defender-easm/ + exclude: + - sdk/easm/pom.xml + - sdk/easm/azure-analytics-defender-easm/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/easm/ci.yml + - sdk/easm/azure-analytics-defender-easm/ + exclude: + - sdk/easm/pom.xml + - sdk/easm/azure-analytics-defender-easm/pom.xml + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: easm + Artifacts: + - name: azure-analytics-defender-easm + groupId: com.azure + safeName: azureanalyticsdefendereasm diff --git a/sdk/easm/cspell.yml b/sdk/easm/cspell.yml new file mode 100644 index 000000000000..eb01dc1da71b --- /dev/null +++ b/sdk/easm/cspell.yml @@ -0,0 +1,14 @@ +# Spell-check overrides for this SDK group. +# Inherits the global config at the repo root. +# +# Add words that only appear in this folder here, in alphabetical order. +# Cross-cutting terms should go in the root cspell.json instead. +version: "0.2" +import: + - ../../.vscode/cspell.json +words: + - "asns" + - "cnames" + - "easm" + - "nxdomain" + - "riskiq" diff --git a/sdk/easm/pom.xml b/sdk/easm/pom.xml new file mode 100644 index 000000000000..7f40570b63a7 --- /dev/null +++ b/sdk/easm/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + com.azure + azure-easm-service + pom + 1.0.0 + + azure-analytics-defender-easm + + diff --git a/sdk/edgeactions/azure-resourcemanager-edgeactions/CHANGELOG.md b/sdk/edgeactions/azure-resourcemanager-edgeactions/CHANGELOG.md index 727e4206c67d..ff241d59f6e8 100644 --- a/sdk/edgeactions/azure-resourcemanager-edgeactions/CHANGELOG.md +++ b/sdk/edgeactions/azure-resourcemanager-edgeactions/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History -## 1.1.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 1.0.0 (2026-10-10) - Azure Resource Manager EdgeActions client library for Java. This package contains Microsoft Azure SDK for EdgeActions Management SDK. Package api-version 2026-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/edgeactions/azure-resourcemanager-edgeactions/pom.xml b/sdk/edgeactions/azure-resourcemanager-edgeactions/pom.xml index 8bc9099d60cb..b26d28d29e6a 100644 --- a/sdk/edgeactions/azure-resourcemanager-edgeactions/pom.xml +++ b/sdk/edgeactions/azure-resourcemanager-edgeactions/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-edgeactions - 1.1.0-beta.1 + 1.0.0 jar Microsoft Azure SDK for EdgeActions Management diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-jedis/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-jedis/pom.xml index e6e4e6c3acef..16e5bb6af13a 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-jedis/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-jedis/pom.xml @@ -81,7 +81,7 @@ io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/eventhubs/azure-messaging-eventhubs/docs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/docs/pom.xml index a858aa97c129..ee3fc592a152 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/docs/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs/docs/pom.xml @@ -25,7 +25,7 @@ io.projectreactor reactor-core - 3.8.7 + 3.7.19 diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml index 6676b46d7962..371ef0ac97b6 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml @@ -64,7 +64,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 org.junit.jupiter diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientTest.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientTest.java index 47f66c61b78f..9aef13b3fe99 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientTest.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientTest.java @@ -21,6 +21,7 @@ import com.azure.core.http.HttpClient; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -34,6 +35,7 @@ import static com.azure.ai.formrecognizer.FormRecognizerClientTestBase.MODEL_ID_NOT_FOUND_ERROR_CODE; import static com.azure.ai.formrecognizer.TestUtils.DISPLAY_NAME_WITH_ARGUMENTS; import static com.azure.ai.formrecognizer.implementation.Utility.toFluxByteBuffer; +import static io.netty.handler.codec.http.HttpResponseStatus.BAD_REQUEST; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -88,7 +90,7 @@ public void getCustomModelWithResponse(HttpClient httpClient, FormRecognizerServ StepVerifier.create(client.getCustomModelWithResponse(trainedModel.getModelId())) .assertNext(customFormModelResponse -> { - assertEquals(200, customFormModelResponse.getStatusCode()); + assertEquals(customFormModelResponse.getStatusCode(), HttpResponseStatus.OK.code()); validateCustomModelData(syncPoller.getFinalResult(), false, false); }); }); @@ -180,7 +182,7 @@ public void deleteModelValidModelIdWithResponse(HttpClient httpClient, CustomFormModel createdModel = syncPoller.getFinalResult(); StepVerifier.create(client.deleteModelWithResponse(createdModel.getModelId())) - .assertNext(response -> assertEquals(204, response.getStatusCode())) + .assertNext(response -> assertEquals(response.getStatusCode(), HttpResponseStatus.NO_CONTENT.code())) .expectComplete() .verify(DEFAULT_TIMEOUT); @@ -210,7 +212,7 @@ public void deleteModelValidModelIdWithResponseWithoutTrainingLabels(HttpClient CustomFormModel createdModel = syncPoller.getFinalResult(); StepVerifier.create(client.deleteModelWithResponse(createdModel.getModelId())) - .assertNext(response -> assertEquals(204, response.getStatusCode())) + .assertNext(response -> assertEquals(response.getStatusCode(), HttpResponseStatus.NO_CONTENT.code())) .expectComplete() .verify(DEFAULT_TIMEOUT); @@ -669,7 +671,7 @@ public void beginCreateComposedUnlabeledModel(HttpClient httpClient, FormRecogni StepVerifier.create(client.beginCreateComposedModel(modelIdList, new CreateComposedModelOptions()) .setPollInterval(durationTestMode)).thenAwait().expectErrorSatisfies(throwable -> { assertEquals(HttpResponseException.class, throwable.getClass()); - assertEquals(400, ((HttpResponseException) throwable).getResponse().getStatusCode()); + assertEquals(BAD_REQUEST.code(), ((HttpResponseException) throwable).getResponse().getStatusCode()); }).verify(DEFAULT_TIMEOUT); client.deleteModel(model1.getModelId()).block(); @@ -699,7 +701,7 @@ public void beginCreateComposedDuplicateModels(HttpClient httpClient, FormRecogn .setPollInterval(durationTestMode) .getSyncPoller() .waitForCompletion()); - assertEquals(400, httpResponseException.getResponse().getStatusCode()); + assertEquals(BAD_REQUEST.code(), httpResponseException.getResponse().getStatusCode()); client.deleteModel(model1.getModelId()).block(); }); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTest.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTest.java index 854c0cc850ae..36f92011b7fa 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTest.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTest.java @@ -23,6 +23,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -32,6 +33,7 @@ import static com.azure.ai.formrecognizer.FormRecognizerClientTestBase.MODEL_ID_NOT_FOUND_ERROR_CODE; import static com.azure.ai.formrecognizer.TestUtils.DISPLAY_NAME_WITH_ARGUMENTS; +import static io.netty.handler.codec.http.HttpResponseStatus.BAD_REQUEST; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -79,7 +81,7 @@ public void getCustomModelWithResponse(HttpClient httpClient, FormRecognizerServ .getFinalResult(); Response customModelWithResponse = client.getCustomModelWithResponse(trainedUnlabeledModel.getModelId(), Context.NONE); - assertEquals(200, customModelWithResponse.getStatusCode()); + assertEquals(customModelWithResponse.getStatusCode(), HttpResponseStatus.OK.code()); validateCustomModelData(customModelWithResponse.getValue(), false, false); }); } @@ -141,7 +143,7 @@ public void validGetAccountPropertiesWithResponse(HttpClient httpClient, // TODO (service bug): APIM error client = getFormTrainingClient(httpClient, serviceVersion); Response accountPropertiesResponse = client.getAccountPropertiesWithResponse(Context.NONE); - assertEquals(200, accountPropertiesResponse.getStatusCode()); + assertEquals(accountPropertiesResponse.getStatusCode(), HttpResponseStatus.OK.code()); validateAccountProperties(accountPropertiesResponse.getValue()); } @@ -159,7 +161,7 @@ public void deleteModelValidModelIdWithResponse(HttpClient httpClient, final Response deleteModelWithResponse = client.deleteModelWithResponse(createdModel.getModelId(), Context.NONE); - assertEquals(204, deleteModelWithResponse.getStatusCode()); + assertEquals(deleteModelWithResponse.getStatusCode(), HttpResponseStatus.NO_CONTENT.code()); final HttpResponseException exception = assertThrows(HttpResponseException.class, () -> client.getCustomModelWithResponse(createdModel.getModelId(), Context.NONE)); final FormRecognizerErrorInformation errorInformation @@ -182,7 +184,7 @@ public void deleteModelValidModelIdWithResponseWithoutTrainingLabels(HttpClient final Response deleteModelWithResponse = client.deleteModelWithResponse(createdModel.getModelId(), Context.NONE); - assertEquals(204, deleteModelWithResponse.getStatusCode()); + assertEquals(deleteModelWithResponse.getStatusCode(), HttpResponseStatus.NO_CONTENT.code()); final HttpResponseException exception = assertThrows(HttpResponseException.class, () -> client.getCustomModelWithResponse(createdModel.getModelId(), Context.NONE)); final FormRecognizerErrorInformation errorInformation @@ -571,7 +573,7 @@ public void beginCreateComposedUnlabeledModel(HttpClient httpClient, FormRecogni final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, () -> client.beginCreateComposedModel(modelIdList, new CreateComposedModelOptions(), Context.NONE) .setPollInterval(durationTestMode)); - assertEquals(400, httpResponseException.getResponse().getStatusCode()); + assertEquals(BAD_REQUEST.code(), httpResponseException.getResponse().getStatusCode()); client.deleteModel(model1.getModelId()); client.deleteModel(model2.getModelId()); @@ -597,7 +599,7 @@ public void beginCreateComposedDuplicateModels(HttpClient httpClient, FormRecogn () -> client.beginCreateComposedModel(modelIdList, new CreateComposedModelOptions(), Context.NONE) .setPollInterval(durationTestMode) .getFinalResult()); - assertEquals(400, httpResponseException.getResponse().getStatusCode()); + assertEquals(BAD_REQUEST.code(), httpResponseException.getResponse().getStatusCode()); client.deleteModel(model1.getModelId()); }); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/documentanalysis/administration/DocumentModelAdminClientTest.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/documentanalysis/administration/DocumentModelAdminClientTest.java index 54176159d33d..01c8fe241240 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/documentanalysis/administration/DocumentModelAdminClientTest.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/documentanalysis/administration/DocumentModelAdminClientTest.java @@ -29,6 +29,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -109,7 +110,7 @@ public void getModelWithResponse(HttpClient httpClient, DocumentAnalysisServiceV = client.getDocumentModelWithResponse(documentModelDetails.getModelId(), Context.NONE); client.deleteDocumentModel(documentModelDetails.getModelId()); - assertEquals(200, documentModelResponse.getStatusCode()); + assertEquals(documentModelResponse.getStatusCode(), HttpResponseStatus.OK.code()); validateDocumentModelData(documentModelResponse.getValue()); }); } @@ -133,7 +134,7 @@ public void validGetResourceDetailsWithResponse(HttpClient httpClient, DocumentAnalysisServiceVersion serviceVersion) { client = getDocumentModelAdministrationClient(httpClient, serviceVersion); Response resourceDetailsResponse = client.getResourceDetailsWithResponse(Context.NONE); - assertEquals(200, resourceDetailsResponse.getStatusCode()); + assertEquals(resourceDetailsResponse.getStatusCode(), HttpResponseStatus.OK.code()); validateResourceInfo(resourceDetailsResponse.getValue()); } @@ -165,7 +166,7 @@ public void deleteModelValidModelIDWithResponse(HttpClient httpClient, final Response deleteModelWithResponse = client.deleteDocumentModelWithResponse(createdModel.getModelId(), Context.NONE); - assertEquals(204, deleteModelWithResponse.getStatusCode()); + assertEquals(deleteModelWithResponse.getStatusCode(), HttpResponseStatus.NO_CONTENT.code()); final HttpResponseException exception = assertThrows(HttpResponseException.class, () -> client.getDocumentModelWithResponse(createdModel.getModelId(), Context.NONE)); final ResponseError responseError = (ResponseError) exception.getValue(); diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/documentanalysis/administration/DocumentModelAdministrationAsyncClientTest.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/documentanalysis/administration/DocumentModelAdministrationAsyncClientTest.java index 59961b7503bd..7c1c164b6c0e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/documentanalysis/administration/DocumentModelAdministrationAsyncClientTest.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/documentanalysis/administration/DocumentModelAdministrationAsyncClientTest.java @@ -33,6 +33,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.identity.AzureAuthorityHosts; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; @@ -133,7 +134,7 @@ public void deleteModelValidModelIdWithResponse(HttpClient httpClient, DocumentModelDetails createdModel = syncPoller1.getFinalResult(); StepVerifier.create(client.deleteDocumentModelWithResponse(createdModel.getModelId())) - .assertNext(response -> assertEquals(204, response.getStatusCode())) + .assertNext(response -> assertEquals(response.getStatusCode(), HttpResponseStatus.NO_CONTENT.code())) .expectComplete() .verify(DEFAULT_TIMEOUT); @@ -481,7 +482,7 @@ public void getModelWithResponse(HttpClient httpClient, DocumentAnalysisServiceV StepVerifier.create(client.getDocumentModelWithResponse(createdModel.getModelId())) .assertNext(documentModelResponse -> { - assertEquals(200, documentModelResponse.getStatusCode()); + assertEquals(documentModelResponse.getStatusCode(), HttpResponseStatus.OK.code()); validateDocumentModelData(documentModelResponse.getValue()); }); // TODO (alzimmer): This test needs to be recorded again as it was never verifying, therefore never diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml index 0834246e6774..c29ad1ffdd98 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml @@ -79,7 +79,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml index 3b1f29e49960..a74474c16a9a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml @@ -78,13 +78,13 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test com.azure.resourcemanager azure-resourcemanager-network - 2.62.0 + 2.61.2 test diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/CHANGELOG.md b/sdk/healthinsights/azure-health-insights-cancerprofiling/CHANGELOG.md new file mode 100644 index 000000000000..4efb7b0689d7 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/CHANGELOG.md @@ -0,0 +1,15 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.1 (2023-04-11) + +- Initial preview of the Azure Health Insights CancerProfiling client library. diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/README.md b/sdk/healthinsights/azure-health-insights-cancerprofiling/README.md new file mode 100644 index 000000000000..4d3ed8325f34 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/README.md @@ -0,0 +1,220 @@ +# Azure Cognitive Services Health Insights Cancer Profiling client library for Java + +[Health Insights][health_insights] is an Azure Applied AI Service built with the Azure Cognitive Services Framework, that leverages multiple Cognitive Services, Healthcare API services and other Azure resources. + +The [Cancer Profiling model][cancer_profiling_docs] receives clinical records of oncology patients and outputs cancer staging, such as clinical stage TNM categories and pathologic stage TNM categories as well as tumor site, histology. +[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][cancer_profiling_api_documentation] | [Product Documentation][product_documentation] | [Samples][samples_location] + + +## Getting started + +### Prerequisites + +- A [Java Development Kit (JDK)][jdk_link] with version 8 or above +- [Azure Subscription][azure_subscription] +- An existing Cognitive Services Health Insights instance. + +For more information about creating the resource or how to get the location and sku information see [here][cognitive_resource_cli]. + +### Include the Package + +[//]: # ({x-version-update-start;com.azure:azure-health-insights-cancerprofiling;current}) + +```xml + + com.azure + azure-health-insights-cancerprofiling + 1.0.0-beta.2 + +``` + +[//]: # ({x-version-update-end}) + +### Authenticate the client + +In order to interact with the Health Insights Cancer Profiling service, you'll need to create an instance of the [`CancerProfilingClient`][cancer_profiling_client_class] class. You will need an **endpoint** and an **API key** to instantiate a client object. + +#### Get API Key + +You can obtain the endpoint and API key from the resource information in the [Azure Portal][azure_portal]. + +Alternatively, you can use the [Azure CLI][azure_cli] snippet below to get the API key from the Health Insights resource. + +```bash +az cognitiveservices account keys list --resource-group --name +``` + +#### Create a CancerProfilingClient with an API Key Credential + +Once you have the value for the API key, you can pass it as a string into an instance of **AzureKeyCredential**. Use the key as the credential parameter to authenticate the client: + +```Java com.azure.health.insights.cancerprofiling.buildasyncclient +String endpoint = Configuration.getGlobalConfiguration().get("AZURE_HEALTH_INSIGHTS_ENDPOINT"); +String apiKey = Configuration.getGlobalConfiguration().get("AZURE_HEALTH_INSIGHTS_API_KEY"); + +CancerProfilingAsyncClient asyncClient = new CancerProfilingClientBuilder() + .endpoint(endpoint) + .serviceVersion(CancerProfilingServiceVersion.getLatest()) + .credential(new AzureKeyCredential(apiKey)) + .buildAsyncClient(); +``` + +## Key concepts + +The Cancer Profiling model allows you to infer cancer attributes such as tumor site, histology, clinical stage TNM categories and pathologic stage TNM categories from unstructured clinical documents. + +## Examples + +Infer key cancer attributes such as tumor site, histology, clinical stage TNM categories and pathologic stage TNM categories from a patient's unstructured clinical documents. + + +```Java com.azure.health.insights.cancerprofiling.infercancerprofile +// Construct Patient +PatientRecord patient1 = new PatientRecord("patient_id"); +LinkedList patientDocuments = new LinkedList<>(); +patient1.setData(patientDocuments); + +// Add imaging document +final String docContent1 = String.join(System.getProperty("line.separator"), + "15.8.2021", + "Jane Doe 091175-8967", + "42 year old female, married with 3 children, works as a nurse. ", + "Healthy, no medications taken on a regular basis.", + "PMHx is significant for migraines with aura, uses Mirena for contraception.", + "Smoking history of 10 pack years (has stopped and relapsed several times).", + "She is in c/o 2 weeks of productive cough and shortness of breath.", + "She has a fever of 37.8 and general weakness. ", + "Denies night sweats and rash. She denies symptoms of rhinosinusitis, asthma, and heartburn. ", + "On PE:", + "GENERAL: mild pallor, no cyanosis. Regular breathing rate. ", + "LUNGS: decreased breath sounds on the base of the right lung. Vesicular breathing.", + " No crackles, rales, and wheezes. Resonant percussion. ", + "PLAN: ", + "Will be referred for a chest x-ray. ", + "======================================", + "CXR showed mild nonspecific opacities in right lung base. ", + "PLAN:", + "Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a follow-up CXR in 2 weeks."); + +PatientDocument patientDocument1 = new PatientDocument( + DocumentType.NOTE, + "doc1", + new DocumentContent(DocumentContentSourceType.INLINE, docContent1)); + +patientDocument1.setClinicalType(ClinicalDocumentType.IMAGING); +patientDocument1.setLanguage("en"); +patientDocument1.setCreatedDateTime(OffsetDateTime.parse("2021-08-15T10:15:30+01:00")); +patient1.getData().add(patientDocument1); + +// Add Pathology documents +String docContent2 = String.join(System.getProperty("line.separator"), + "Oncology Clinic ", + "20.10.2021", + "Jane Doe 091175-8967", + "42-year-old healthy female who works as a nurse in the ER of this hospital. ", + "First menstruation at 11 years old. First delivery- 27 years old. She has 3 children.", + "Didn’t breastfeed. ", + "Contraception- Mirena.", + "Smoking- 10 pack years. ", + "Mother- Belarusian. Father- Georgian. ", + "About 3 months prior to admission, she stated she had SOB and was febrile. ", + "She did a CXR as an outpatient which showed a finding in the base of the right lung- possibly an infiltrate.", + "She was treated with antibiotics with partial response. ", + "6 weeks later a repeat CXR was performed- a few solid dense findings in the right lung. ", + "Therefore, she was referred for a PET-CT which demonstrated increased uptake in the right breast, lymph nodes on the right a few areas in the lungs and liver. ", + "On biopsy from the lesion in the right breast- triple negative adenocarcinoma. Genetic testing has not been done thus far. ", + "Genetic counseling- the patient denies a family history of breast, ovary, uterus, and prostate cancer. Her mother has chronic lymphocytic leukemia (CLL). ", + "She is planned to undergo genetic tests because the aggressive course of the disease, and her young age. ", + "Impression:", + "Stage 4 triple negative breast adenocarcinoma. ", + "Could benefit from biological therapy. ", + "Different treatment options were explained- the patient wants to get a second opinion."); + +PatientDocument patientDocument2 = new PatientDocument(DocumentType.NOTE, + "doc2", + new DocumentContent(DocumentContentSourceType.INLINE, docContent2)); +patientDocument2.setClinicalType(ClinicalDocumentType.PATHOLOGY); +patientDocument2.setLanguage("en"); +patientDocument2.setCreatedDateTime(OffsetDateTime.parse("2021-10-20T22:00:00.00Z")); +patient1.getData().add(patientDocument2); + +String docContent3 = String.join(System.getProperty("line.separator"), + "PATHOLOGY REPORT", + " Clinical Information", + "Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC", + " Diagnosis", + " A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES:", + " - Invasive carcinoma of no special type (invasive ductal carcinoma), grade 1", + " Nottingham histologic grade: 1/3 (tubules 2; nuclear grade 2; mitotic rate 1; total score; 5/9)", + " Fragments involved by invasive carcinoma: 2", + " Largest measurement of invasive carcinoma on a single fragment: 7 mm", + " Ductal carcinoma in situ (DCIS): Present", + " Architectural pattern: Cribriform", + " Nuclear grade: 2-", + " -intermediate", + " Necrosis: Not identified", + " Fragments involved by DCIS: 1", + " Largest measurement of DCIS on a single fragment: Span 2 mm", + " Microcalcifications: Present in benign breast tissue and invasive carcinoma", + " Blocks with invasive carcinoma: A1", + " Special studies: Pending"); + +PatientDocument patientDocument3 = new PatientDocument(DocumentType.NOTE, + "doc3", + new DocumentContent(DocumentContentSourceType.INLINE, docContent3)); +patientDocument3.setClinicalType(ClinicalDocumentType.PATHOLOGY); +patientDocument3.setLanguage("en"); +patientDocument3.setCreatedDateTime(OffsetDateTime.parse("2022-01-01T10:15:30+01:00")); + +patient1.getData().add(patientDocument3); + +// Set configuration to include evidence for the cancer staging inferences +OncoPhenotypeModelConfiguration configuration = new OncoPhenotypeModelConfiguration(); +configuration.setIncludeEvidence(true); + +// Construct the request with the patient and configration +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(Arrays.asList(patient1)); +oncoPhenotypeData.setConfiguration(configuration); + +PollerFlux asyncPoller = asyncClient.beginInferCancerProfile(oncoPhenotypeData); +``` + +## Troubleshooting + +## Next steps + + +## Additional documentation +For more extensive documentation on Azure Health Insights Cancer Profiling, see the [Cancer Profiling documentation][cancer_profiling_docs] on learn.microsoft.com. +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla]. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +[cla]: https://cla.microsoft.com +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com +[azure_subscription]: https://azure.microsoft.com/free/ +[cognitive_resource_cli]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli +[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable + +[health_insights]: https://learn.microsoft.com/azure/azure-health-insights/overview +[azure_cli]: https://learn.microsoft.com/cli/azure +[azure_portal]: https://portal.azure.com +[cancer_profiling_docs]: https://learn.microsoft.com/azure/azure-health-insights/oncophenotype/overview +[cancer_profiling_client_class]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingClient.java +[package]: https://central.sonatype.com/artifact/com.azure/azure-health-insights-cancerprofiling +[source_code]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/healthinsights/azure-health-insights-cancerprofiling/src +[cancer_profiling_api_documentation]: https://learn.microsoft.com/rest/api/healthinsights/onco-phenotype +[product_documentation]: https://learn.microsoft.com/azure/azure-health-insights/oncophenotype/ +[samples_location]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/ + diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/assets.json b/sdk/healthinsights/azure-health-insights-cancerprofiling/assets.json new file mode 100644 index 000000000000..6b4d5109a79d --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/healthinsights/azure-health-insights-cancerprofiling", + "Tag": "java/healthinsights/azure-health-insights-cancerprofiling_6e4a38da99" +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/checkstyle-suppressions.xml b/sdk/healthinsights/azure-health-insights-cancerprofiling/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/pom.xml b/sdk/healthinsights/azure-health-insights-cancerprofiling/pom.xml new file mode 100644 index 000000000000..15b34184543b --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/pom.xml @@ -0,0 +1,82 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-health-insights-cancerprofiling + 1.0.0-beta.2 + jar + + Microsoft Azure client library for Health Insights - Cancer Profiling + This package contains Microsoft Azure Health Insights CancerProfiling client library. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0.1 + 0.1 + + --add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + + + false + + + + com.azure + azure-json + 1.5.1 + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/spotbugs-exclude.xml b/sdk/healthinsights/azure-health-insights-cancerprofiling/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/AzureHealthInsightsServiceVersion.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/AzureHealthInsightsServiceVersion.java new file mode 100644 index 000000000000..0a7cfb6eadd0 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/AzureHealthInsightsServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.cancerprofiling; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of AzureHealthInsightsClient. + */ +public enum AzureHealthInsightsServiceVersion implements ServiceVersion { + /** + * Enum value 2023-03-01-preview. + */ + V2023_03_01_PREVIEW("2023-03-01-preview"); + + private final String version; + + AzureHealthInsightsServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link AzureHealthInsightsServiceVersion}. + */ + public static AzureHealthInsightsServiceVersion getLatest() { + return V2023_03_01_PREVIEW; + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingAsyncClient.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingAsyncClient.java new file mode 100644 index 000000000000..9311f051db58 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingAsyncClient.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.PollerFlux; +import com.azure.health.insights.cancerprofiling.implementation.CancerProfilingClientImpl; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeData; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResult; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResults; + +/** + * Initializes a new instance of the asynchronous CancerProfilingClient type. + */ +@ServiceClient(builder = CancerProfilingClientBuilder.class, isAsync = true) +public final class CancerProfilingAsyncClient { + + @Generated + private final CancerProfilingClientImpl serviceClient; + + /** + * Initializes an instance of CancerProfilingAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + CancerProfilingAsyncClient(CancerProfilingClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         inferenceTypes (Optional): [
      +     *             String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Optional)
      +     *         ]
      +     *         checkForCancerCase: Boolean (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         caseId: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginInferCancerProfile(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.beginInferCancerProfileAsync(body, requestOptions); + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginInferCancerProfile(OncoPhenotypeData body) { + // Generated convenience method for beginInferCancerProfileWithModel + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.beginInferCancerProfileWithModelAsync(BinaryData.fromObject(body), requestOptions); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingClient.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingClient.java new file mode 100644 index 000000000000..23dd1470033c --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingClient.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.health.insights.cancerprofiling.implementation.CancerProfilingClientImpl; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeData; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResult; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResults; + +/** + * Initializes a new instance of the synchronous CancerProfilingClient type. + */ +@ServiceClient(builder = CancerProfilingClientBuilder.class) +public final class CancerProfilingClient { + + @Generated + private final CancerProfilingClientImpl serviceClient; + + /** + * Initializes an instance of CancerProfilingClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + CancerProfilingClient(CancerProfilingClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         inferenceTypes (Optional): [
      +     *             String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Optional)
      +     *         ]
      +     *         checkForCancerCase: Boolean (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         caseId: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginInferCancerProfile(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.beginInferCancerProfile(body, requestOptions); + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginInferCancerProfile(OncoPhenotypeData body) { + // Generated convenience method for beginInferCancerProfileWithModel + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.beginInferCancerProfileWithModel(BinaryData.fromObject(body), requestOptions); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientBuilder.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientBuilder.java new file mode 100644 index 000000000000..a60e87b1a74a --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientBuilder.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.KeyCredentialTrait; +import com.azure.core.credential.KeyCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.KeyCredentialPolicy; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.health.insights.cancerprofiling.implementation.CancerProfilingClientImpl; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the CancerProfilingClient type. + */ +@ServiceClientBuilder(serviceClients = { CancerProfilingClient.class, CancerProfilingAsyncClient.class }) +public final class CancerProfilingClientBuilder + implements HttpTrait, ConfigurationTrait, + KeyCredentialTrait, EndpointTrait { + + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-health-insights-cancerprofiling.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the CancerProfilingClientBuilder. + */ + @Generated + public CancerProfilingClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CancerProfilingClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CancerProfilingClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CancerProfilingClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CancerProfilingClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CancerProfilingClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CancerProfilingClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CancerProfilingClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The KeyCredential used for authentication. + */ + @Generated + private KeyCredential keyCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CancerProfilingClientBuilder credential(KeyCredential keyCredential) { + this.keyCredential = keyCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CancerProfilingClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private AzureHealthInsightsServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the CancerProfilingClientBuilder. + */ + @Generated + public CancerProfilingClientBuilder serviceVersion(AzureHealthInsightsServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the CancerProfilingClientBuilder. + */ + @Generated + public CancerProfilingClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of CancerProfilingClientImpl with the provided parameters. + * + * @return an instance of CancerProfilingClientImpl. + */ + @Generated + private CancerProfilingClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + AzureHealthInsightsServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : AzureHealthInsightsServiceVersion.getLatest(); + CancerProfilingClientImpl client = new CancerProfilingClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (keyCredential != null) { + policies.add(new KeyCredentialPolicy("Ocp-Apim-Subscription-Key", keyCredential)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of CancerProfilingAsyncClient class. + * + * @return an instance of CancerProfilingAsyncClient. + */ + @Generated + public CancerProfilingAsyncClient buildAsyncClient() { + return new CancerProfilingAsyncClient(buildInnerClient()); + } + + /** + * Builds an instance of CancerProfilingClient class. + * + * @return an instance of CancerProfilingClient. + */ + @Generated + public CancerProfilingClient buildClient() { + return new CancerProfilingClient(buildInnerClient()); + } + + private static final ClientLogger LOGGER = new ClientLogger(CancerProfilingClientBuilder.class); +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/CancerProfilingClientImpl.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/CancerProfilingClientImpl.java new file mode 100644 index 000000000000..9ddb7ec7444f --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/CancerProfilingClientImpl.java @@ -0,0 +1,1078 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.cancerprofiling.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncPoller; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.TypeReference; +import com.azure.health.insights.cancerprofiling.AzureHealthInsightsServiceVersion; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResult; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResults; +import java.time.Duration; +import java.time.OffsetDateTime; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the CancerProfilingClient type. + */ +public final class CancerProfilingClientImpl { + /** + * The proxy service used to perform REST calls. + */ + private final CancerProfilingClientService service; + + /** + * Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + */ + private final String endpoint; + + /** + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final AzureHealthInsightsServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public AzureHealthInsightsServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * Initializes an instance of CancerProfilingClient client. + * + * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public CancerProfilingClientImpl(String endpoint, AzureHealthInsightsServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of CancerProfilingClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public CancerProfilingClientImpl(HttpPipeline httpPipeline, String endpoint, + AzureHealthInsightsServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of CancerProfilingClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public CancerProfilingClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + AzureHealthInsightsServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.service + = RestProxy.create(CancerProfilingClientService.class, this.httpPipeline, this.getSerializerAdapter()); + } + + /** + * The interface defining all the services for CancerProfilingClient to be used by the proxy service to perform REST + * calls. + */ + @Host("{endpoint}/healthinsights") + @ServiceInterface(name = "CancerProfilingClien") + public interface CancerProfilingClientService { + @Post("/oncophenotype/jobs") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> inferCancerProfile(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/oncophenotype/jobs") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response inferCancerProfileSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         inferenceTypes (Optional): [
      +     *             String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Optional)
      +     *         ]
      +     *         checkForCancerCase: Boolean (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         caseId: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> inferCancerProfileWithResponseAsync(BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return FluxUtil.withContext(context -> service.inferCancerProfile(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, body, requestOptionsLocal, context)); + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         inferenceTypes (Optional): [
      +     *             String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Optional)
      +     *         ]
      +     *         checkForCancerCase: Boolean (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         caseId: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response inferCancerProfileWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return service.inferCancerProfileSync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, + accept, body, requestOptionsLocal, Context.NONE); + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         inferenceTypes (Optional): [
      +     *             String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Optional)
      +     *         ]
      +     *         checkForCancerCase: Boolean (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         caseId: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginInferCancerProfileAsync(BinaryData body, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.inferCancerProfileWithResponseAsync(body, requestOptions), + new com.azure.health.insights.cancerprofiling.implementation.OperationLocationPollingStrategy<>( + new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("{endpoint}/healthinsights".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion()), + "results"), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         inferenceTypes (Optional): [
      +     *             String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Optional)
      +     *         ]
      +     *         checkForCancerCase: Boolean (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         caseId: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginInferCancerProfile(BinaryData body, RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.inferCancerProfileWithResponse(body, requestOptions), + new com.azure.health.insights.cancerprofiling.implementation.SyncOperationLocationPollingStrategy<>( + new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("{endpoint}/healthinsights".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion()), + "results"), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         inferenceTypes (Optional): [
      +     *             String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Optional)
      +     *         ]
      +     *         checkForCancerCase: Boolean (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         caseId: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginInferCancerProfileWithModelAsync(BinaryData body, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.inferCancerProfileWithResponseAsync(body, requestOptions), + new com.azure.health.insights.cancerprofiling.implementation.OperationLocationPollingStrategy<>( + new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("{endpoint}/healthinsights".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion()), + "results"), + TypeReference.createInstance(OncoPhenotypeResult.class), + TypeReference.createInstance(OncoPhenotypeResults.class)); + } + + /** + * Create Onco Phenotype job + * + * Creates an Onco Phenotype job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         inferenceTypes (Optional): [
      +     *             String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Optional)
      +     *         ]
      +     *         checkForCancerCase: Boolean (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(tumorSite/histology/clinicalStageT/clinicalStageN/clinicalStageM/pathologicStageT/pathologicStageN/pathologicStageM) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         caseId: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginInferCancerProfileWithModel(BinaryData body, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.inferCancerProfileWithResponse(body, requestOptions), + new com.azure.health.insights.cancerprofiling.implementation.SyncOperationLocationPollingStrategy<>( + new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("{endpoint}/healthinsights".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion()), + "results"), + TypeReference.createInstance(OncoPhenotypeResult.class), + TypeReference.createInstance(OncoPhenotypeResults.class)); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/OperationLocationPollingStrategy.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/OperationLocationPollingStrategy.java new file mode 100644 index 000000000000..4c2541ab8974 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/OperationLocationPollingStrategy.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.cancerprofiling.implementation; + +import com.azure.core.exception.AzureException; +import com.azure.core.http.HttpHeader; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.OperationResourcePollingStrategy; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.PollingContext; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.serializer.JsonSerializerProviders; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.core.util.serializer.TypeReference; +import java.time.Duration; +import java.time.OffsetDateTime; +import reactor.core.publisher.Mono; + +// DO NOT modify this helper class + +/** + * Implements an operation location polling strategy, from Operation-Location. + * + * @param the type of the response type from a polling call, or BinaryData if raw response body should be kept + * @param the type of the final result object to deserialize into, or BinaryData if raw response body should be + * kept + */ +public final class OperationLocationPollingStrategy extends OperationResourcePollingStrategy { + + private static final ClientLogger LOGGER = new ClientLogger(OperationLocationPollingStrategy.class); + + private final ObjectSerializer serializer; + private final String endpoint; + private final String propertyName; + + /** + * Creates an instance of the operation resource polling strategy. + * + * @param pollingStrategyOptions options to configure this polling strategy. + * @throws NullPointerException if {@code pollingStrategyOptions} is null. + */ + public OperationLocationPollingStrategy(PollingStrategyOptions pollingStrategyOptions) { + this(pollingStrategyOptions, null); + } + + /** + * Creates an instance of the operation resource polling strategy. + * + * @param pollingStrategyOptions options to configure this polling strategy. + * @param propertyName the name of the property to extract final result. + * @throws NullPointerException if {@code pollingStrategyOptions} is null. + */ + public OperationLocationPollingStrategy(PollingStrategyOptions pollingStrategyOptions, String propertyName) { + super(PollingUtils.OPERATION_LOCATION_HEADER, pollingStrategyOptions); + this.propertyName = propertyName; + this.endpoint = pollingStrategyOptions.getEndpoint(); + this.serializer = pollingStrategyOptions.getSerializer() != null + ? pollingStrategyOptions.getSerializer() + : JsonSerializerProviders.createInstance(true); + } + + /** + * {@inheritDoc} + */ + @Override + public Mono> onInitialResponse(Response response, PollingContext pollingContext, + TypeReference pollResponseType) { + // Response is Response + + HttpHeader operationLocationHeader = response.getHeaders().get(PollingUtils.OPERATION_LOCATION_HEADER); + if (operationLocationHeader != null) { + pollingContext.setData(PollingUtils.OPERATION_LOCATION_HEADER.getCaseSensitiveName(), + PollingUtils.getAbsolutePath(operationLocationHeader.getValue(), endpoint, LOGGER)); + } + final String httpMethod = response.getRequest().getHttpMethod().name(); + pollingContext.setData(PollingUtils.HTTP_METHOD, httpMethod); + pollingContext.setData(PollingUtils.REQUEST_URL, response.getRequest().getUrl().toString()); + + if (response.getStatusCode() == 200 + || response.getStatusCode() == 201 + || response.getStatusCode() == 202 + || response.getStatusCode() == 204) { + final Duration retryAfter + = PollingUtils.getRetryAfterFromHeaders(response.getHeaders(), OffsetDateTime::now); + final Mono> pollResponseMono + = PollingUtils.deserializeResponse((BinaryData) response.getValue(), serializer, pollResponseType) + .onErrorResume(exception -> { + LOGGER.info("Failed to parse initial response."); + return Mono.empty(); + }) + .map(value -> new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, value, retryAfter)); + return pollResponseMono.switchIfEmpty( + Mono.fromSupplier(() -> new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, null, retryAfter))); + } else { + return Mono + .error( + new AzureException(String.format( + "Operation failed or cancelled with status code %d," + + ", '%s' header: %s, and response body: %s", + response.getStatusCode(), PollingUtils.OPERATION_LOCATION_HEADER, operationLocationHeader, + response.getValue()))); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Mono getResult(PollingContext pollingContext, TypeReference resultType) { + if (pollingContext.getLatestResponse().getStatus() == LongRunningOperationStatus.FAILED) { + return Mono.error(new AzureException("Long running operation failed.")); + } else if (pollingContext.getLatestResponse().getStatus() == LongRunningOperationStatus.USER_CANCELLED) { + return Mono.error(new AzureException("Long running operation cancelled.")); + } + if (propertyName != null) { + // take the last poll response body from PollingContext, + // and de-serialize the property as final result + BinaryData latestResponseBody + = BinaryData.fromString(pollingContext.getData(PollingUtils.POLL_RESPONSE_BODY)); + return PollingUtils + .deserializeResponse(latestResponseBody, serializer, PollingUtils.POST_POLL_RESULT_TYPE_REFERENCE) + .flatMap(value -> { + if (value.get(propertyName) != null) { + return BinaryData.fromObjectAsync(value.get(propertyName)) + .flatMap(result -> PollingUtils.deserializeResponse(result, serializer, resultType)); + } else { + return Mono.error(new AzureException("Cannot get final result")); + } + }) + .switchIfEmpty(Mono.error(new AzureException("Cannot get final result"))); + } else { + return super.getResult(pollingContext, resultType); + } + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/PollingUtils.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/PollingUtils.java new file mode 100644 index 000000000000..e5e4b8feed36 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/PollingUtils.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.cancerprofiling.implementation; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.BinaryData; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.core.util.serializer.TypeReference; +import java.net.URI; +import java.net.URISyntaxException; +import java.time.DateTimeException; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.temporal.ChronoUnit; +import java.util.Map; +import java.util.function.Function; +import java.util.function.Supplier; +import reactor.core.publisher.Mono; + +// DO NOT modify this helper class + +final class PollingUtils { + + public static final TypeReference> POST_POLL_RESULT_TYPE_REFERENCE + = new TypeReference>() { + }; + + public static final HttpHeaderName OPERATION_LOCATION_HEADER = HttpHeaderName.fromString("Operation-Location"); + + public static final String HTTP_METHOD = "httpMethod"; + public static final String REQUEST_URL = "requestURL"; + public static final String POLL_RESPONSE_BODY = "pollResponseBody"; + + private static final String FORWARD_SLASH = "/"; + + public static String getAbsolutePath(String path, String endpoint, ClientLogger logger) { + try { + URI uri = new URI(path); + if (!uri.isAbsolute()) { + if (CoreUtils.isNullOrEmpty(endpoint)) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "Relative path requires endpoint to be non-null and non-empty to create an absolute path.")); + } + + if (endpoint.endsWith(FORWARD_SLASH) && path.startsWith(FORWARD_SLASH)) { + return endpoint + path.substring(1); + } else if (!endpoint.endsWith(FORWARD_SLASH) && !path.startsWith(FORWARD_SLASH)) { + return endpoint + FORWARD_SLASH + path; + } else { + return endpoint + path; + } + } + } catch (URISyntaxException ex) { + throw logger.logExceptionAsWarning(new IllegalArgumentException("'path' must be a valid URI.", ex)); + } + return path; + } + + public static T deserializeResponseSync(BinaryData binaryData, ObjectSerializer serializer, + TypeReference typeReference) { + T value; + if (binaryData == null) { + value = null; + } else if (typeReference.getJavaClass().isAssignableFrom(BinaryData.class)) { + // T is BinaryData + value = typeReference.getJavaClass().cast(binaryData.toReplayableBinaryData()); + } else { + value = binaryData.toObject(typeReference, serializer); + } + return value; + } + + @SuppressWarnings("unchecked") + public static Mono deserializeResponse(BinaryData binaryData, ObjectSerializer serializer, + TypeReference typeReference) { + Mono value; + if (binaryData == null) { + value = Mono.empty(); + } else if (typeReference.getJavaClass().isAssignableFrom(BinaryData.class)) { + // T is BinaryData + value = (Mono) binaryData.toReplayableBinaryDataAsync(); + } else { + value = binaryData.toObjectAsync(typeReference, serializer); + } + return value; + } + + private static final HttpHeaderName RETRY_AFTER_MS_HEADER = HttpHeaderName.fromString("retry-after-ms"); + private static final HttpHeaderName X_MS_RETRY_AFTER_MS_HEADER = HttpHeaderName.fromString("x-ms-retry-after-ms"); + + public static Duration getRetryAfterFromHeaders(HttpHeaders headers, Supplier nowSupplier) { + // Found 'x-ms-retry-after-ms' header, use a Duration of milliseconds based on the value. + Duration retryDelay = tryGetRetryDelay(headers, X_MS_RETRY_AFTER_MS_HEADER, s -> tryGetDelayMillis(s)); + if (retryDelay != null) { + return retryDelay; + } + + // Found 'retry-after-ms' header, use a Duration of milliseconds based on the value. + retryDelay = tryGetRetryDelay(headers, RETRY_AFTER_MS_HEADER, s -> tryGetDelayMillis(s)); + if (retryDelay != null) { + return retryDelay; + } + + // Found 'Retry-After' header. First, attempt to resolve it as a Duration of seconds. If that fails, then + // attempt to resolve it as an HTTP date (RFC1123). + retryDelay = tryGetRetryDelay(headers, HttpHeaderName.RETRY_AFTER, + headerValue -> tryParseLongOrDateTime(headerValue, nowSupplier)); + + // Either the retry delay will have been found or it'll be null, null indicates no retry after. + return retryDelay; + } + + private static Duration tryGetRetryDelay(HttpHeaders headers, HttpHeaderName headerName, + Function delayParser) { + String headerValue = headers.getValue(headerName); + + return CoreUtils.isNullOrEmpty(headerValue) ? null : delayParser.apply(headerValue); + } + + private static Duration tryParseLongOrDateTime(String value, Supplier nowSupplier) { + long delaySeconds; + try { + OffsetDateTime retryAfter = new DateTimeRfc1123(value).getDateTime(); + + delaySeconds = nowSupplier.get().until(retryAfter, ChronoUnit.SECONDS); + } catch (DateTimeException ex) { + delaySeconds = tryParseLong(value); + } + + return (delaySeconds >= 0) ? Duration.ofSeconds(delaySeconds) : null; + } + + private static long tryParseLong(String value) { + try { + return Long.parseLong(value); + } catch (NumberFormatException ex) { + return -1; + } + } + + private static Duration tryGetDelayMillis(String value) { + long delayMillis = tryParseLong(value); + return (delayMillis >= 0) ? Duration.ofMillis(delayMillis) : null; + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/SyncOperationLocationPollingStrategy.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/SyncOperationLocationPollingStrategy.java new file mode 100644 index 000000000000..906a98c67981 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/SyncOperationLocationPollingStrategy.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.cancerprofiling.implementation; + +import com.azure.core.exception.AzureException; +import com.azure.core.http.HttpHeader; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.PollingContext; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncOperationResourcePollingStrategy; +import com.azure.core.util.serializer.JsonSerializerProviders; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.core.util.serializer.TypeReference; +import java.io.UncheckedIOException; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Map; + +// DO NOT modify this helper class + +/** + * Implements a synchronous operation location polling strategy, from Operation-Location. + * + * @param the type of the response type from a polling call, or BinaryData if raw response body should be kept + * @param the type of the final result object to deserialize into, or BinaryData if raw response body should be + * kept + */ +public final class SyncOperationLocationPollingStrategy extends SyncOperationResourcePollingStrategy { + + private static final ClientLogger LOGGER = new ClientLogger(SyncOperationLocationPollingStrategy.class); + + private final ObjectSerializer serializer; + private final String endpoint; + private final String propertyName; + + /** + * Creates an instance of the operation resource polling strategy. + * + * @param pollingStrategyOptions options to configure this polling strategy. + * @throws NullPointerException if {@code pollingStrategyOptions} is null. + */ + public SyncOperationLocationPollingStrategy(PollingStrategyOptions pollingStrategyOptions) { + this(pollingStrategyOptions, null); + } + + /** + * Creates an instance of the operation resource polling strategy. + * + * @param pollingStrategyOptions options to configure this polling strategy. + * @param propertyName the name of the property to extract final result. + * @throws NullPointerException if {@code pollingStrategyOptions} is null. + */ + public SyncOperationLocationPollingStrategy(PollingStrategyOptions pollingStrategyOptions, String propertyName) { + super(PollingUtils.OPERATION_LOCATION_HEADER, pollingStrategyOptions); + this.propertyName = propertyName; + this.endpoint = pollingStrategyOptions.getEndpoint(); + this.serializer = pollingStrategyOptions.getSerializer() != null + ? pollingStrategyOptions.getSerializer() + : JsonSerializerProviders.createInstance(true); + } + + /** + * {@inheritDoc} + */ + @Override + public PollResponse onInitialResponse(Response response, PollingContext pollingContext, + TypeReference pollResponseType) { + // Response is Response + + HttpHeader operationLocationHeader = response.getHeaders().get(PollingUtils.OPERATION_LOCATION_HEADER); + if (operationLocationHeader != null) { + pollingContext.setData(PollingUtils.OPERATION_LOCATION_HEADER.getCaseSensitiveName(), + PollingUtils.getAbsolutePath(operationLocationHeader.getValue(), endpoint, LOGGER)); + } + final String httpMethod = response.getRequest().getHttpMethod().name(); + pollingContext.setData(PollingUtils.HTTP_METHOD, httpMethod); + pollingContext.setData(PollingUtils.REQUEST_URL, response.getRequest().getUrl().toString()); + + if (response.getStatusCode() == 200 + || response.getStatusCode() == 201 + || response.getStatusCode() == 202 + || response.getStatusCode() == 204) { + final Duration retryAfter + = PollingUtils.getRetryAfterFromHeaders(response.getHeaders(), OffsetDateTime::now); + T initialResponseType = null; + try { + initialResponseType = PollingUtils.deserializeResponseSync((BinaryData) response.getValue(), serializer, + pollResponseType); + } catch (UncheckedIOException e) { + LOGGER.info("Failed to parse initial response."); + } + return new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, initialResponseType, retryAfter); + } + + throw LOGGER.logExceptionAsError(new AzureException( + String.format("Operation failed or cancelled with status code %d, '%s' header: %s, and response body: %s", + response.getStatusCode(), PollingUtils.OPERATION_LOCATION_HEADER, operationLocationHeader, + response.getValue()))); + } + + /** + * {@inheritDoc} + */ + public U getResult(PollingContext pollingContext, TypeReference resultType) { + if (pollingContext.getLatestResponse().getStatus() == LongRunningOperationStatus.FAILED) { + throw LOGGER.logExceptionAsError(new AzureException("Long running operation failed.")); + } else if (pollingContext.getLatestResponse().getStatus() == LongRunningOperationStatus.USER_CANCELLED) { + throw LOGGER.logExceptionAsError(new AzureException("Long running operation cancelled.")); + } + if (propertyName != null) { + // take the last poll response body from PollingContext, + // and de-serialize the property as final result + BinaryData latestResponseBody + = BinaryData.fromString(pollingContext.getData(PollingUtils.POLL_RESPONSE_BODY)); + Map pollResult = PollingUtils.deserializeResponseSync(latestResponseBody, serializer, + PollingUtils.POST_POLL_RESULT_TYPE_REFERENCE); + if (pollResult != null && pollResult.get(propertyName) != null) { + return PollingUtils.deserializeResponseSync(BinaryData.fromObject(pollResult.get(propertyName)), + serializer, resultType); + } else { + throw LOGGER.logExceptionAsError(new AzureException("Cannot get final result")); + } + } else { + return super.getResult(pollingContext, resultType); + } + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/package-info.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/package-info.java new file mode 100644 index 000000000000..92566c8eed0a --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the implementations for AzureHealthInsights. + * Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that + * perform analysis and provide inferences to be used by a human. + * + */ +package com.azure.health.insights.cancerprofiling.implementation; diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalCodedElement.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalCodedElement.java new file mode 100644 index 000000000000..f14e84e70538 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalCodedElement.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A piece of clinical information, expressed as a code in a clinical coding system. + */ +@Fluent +public final class ClinicalCodedElement implements JsonSerializable { + + /* + * The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. + */ + @Generated + private final String system; + + /* + * The code within the given clinical coding system. + */ + @Generated + private final String code; + + /* + * The name of this coded concept in the coding system. + */ + @Generated + private String name; + + /* + * A value associated with the code within the given clinical coding system. + */ + @Generated + private String value; + + /** + * Creates an instance of ClinicalCodedElement class. + * + * @param system the system value to set. + * @param code the code value to set. + */ + @Generated + public ClinicalCodedElement(String system, String code) { + this.system = system; + this.code = code; + } + + /** + * Get the system property: The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. + * + * @return the system value. + */ + @Generated + public String getSystem() { + return this.system; + } + + /** + * Get the code property: The code within the given clinical coding system. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Get the name property: The name of this coded concept in the coding system. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name of this coded concept in the coding system. + * + * @param name the name value to set. + * @return the ClinicalCodedElement object itself. + */ + @Generated + public ClinicalCodedElement setName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: A value associated with the code within the given clinical coding system. + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * Set the value property: A value associated with the code within the given clinical coding system. + * + * @param value the value value to set. + * @return the ClinicalCodedElement object itself. + */ + @Generated + public ClinicalCodedElement setValue(String value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("system", this.system); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalCodedElement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalCodedElement if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ClinicalCodedElement. + */ + @Generated + public static ClinicalCodedElement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String system = null; + String code = null; + String name = null; + String value = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("system".equals(fieldName)) { + system = reader.getString(); + } else if ("code".equals(fieldName)) { + code = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("value".equals(fieldName)) { + value = reader.getString(); + } else { + reader.skipChildren(); + } + } + ClinicalCodedElement deserializedClinicalCodedElement = new ClinicalCodedElement(system, code); + deserializedClinicalCodedElement.name = name; + deserializedClinicalCodedElement.value = value; + return deserializedClinicalCodedElement; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalDocumentType.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalDocumentType.java new file mode 100644 index 000000000000..e5f55e9f8f08 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalDocumentType.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the clinical document. + */ +public final class ClinicalDocumentType extends ExpandableStringEnum { + + /** + * Static value consultation for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType CONSULTATION = fromString("consultation"); + + /** + * Static value dischargeSummary for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType DISCHARGE_SUMMARY = fromString("dischargeSummary"); + + /** + * Static value historyAndPhysical for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType HISTORY_AND_PHYSICAL = fromString("historyAndPhysical"); + + /** + * Static value procedure for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType PROCEDURE = fromString("procedure"); + + /** + * Static value progress for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType PROGRESS = fromString("progress"); + + /** + * Static value imaging for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType IMAGING = fromString("imaging"); + + /** + * Static value laboratory for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType LABORATORY = fromString("laboratory"); + + /** + * Static value pathology for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType PATHOLOGY = fromString("pathology"); + + /** + * Creates a new instance of ClinicalDocumentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ClinicalDocumentType() { + } + + /** + * Creates or finds a ClinicalDocumentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClinicalDocumentType. + */ + @Generated + public static ClinicalDocumentType fromString(String name) { + return fromString(name, ClinicalDocumentType.class); + } + + /** + * Gets known ClinicalDocumentType values. + * + * @return known ClinicalDocumentType values. + */ + @Generated + public static Collection values() { + return values(ClinicalDocumentType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalNoteEvidence.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalNoteEvidence.java new file mode 100644 index 000000000000..7fce54de4625 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/ClinicalNoteEvidence.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A piece of evidence from a clinical note (text document). + */ +@Immutable +public final class ClinicalNoteEvidence implements JsonSerializable { + + /* + * The identifier of the document containing the evidence. + */ + @Generated + private final String id; + + /* + * The actual text span which is evidence for the inference. + */ + @Generated + private String text; + + /* + * The start index of the evidence text span in the document (0 based). + */ + @Generated + private final int offset; + + /* + * The length of the evidence text span. + */ + @Generated + private final int length; + + /** + * Creates an instance of ClinicalNoteEvidence class. + * + * @param id the id value to set. + * @param offset the offset value to set. + * @param length the length value to set. + */ + @Generated + private ClinicalNoteEvidence(String id, int offset, int length) { + this.id = id; + this.offset = offset; + this.length = length; + } + + /** + * Get the id property: The identifier of the document containing the evidence. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the text property: The actual text span which is evidence for the inference. + * + * @return the text value. + */ + @Generated + public String getText() { + return this.text; + } + + /** + * Get the offset property: The start index of the evidence text span in the document (0 based). + * + * @return the offset value. + */ + @Generated + public int getOffset() { + return this.offset; + } + + /** + * Get the length property: The length of the evidence text span. + * + * @return the length value. + */ + @Generated + public int getLength() { + return this.length; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeIntField("offset", this.offset); + jsonWriter.writeIntField("length", this.length); + jsonWriter.writeStringField("text", this.text); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalNoteEvidence from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalNoteEvidence if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ClinicalNoteEvidence. + */ + @Generated + public static ClinicalNoteEvidence fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + int offset = 0; + int length = 0; + String text = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("offset".equals(fieldName)) { + offset = reader.getInt(); + } else if ("length".equals(fieldName)) { + length = reader.getInt(); + } else if ("text".equals(fieldName)) { + text = reader.getString(); + } else { + reader.skipChildren(); + } + } + ClinicalNoteEvidence deserializedClinicalNoteEvidence = new ClinicalNoteEvidence(id, offset, length); + deserializedClinicalNoteEvidence.text = text; + return deserializedClinicalNoteEvidence; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentContent.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentContent.java new file mode 100644 index 000000000000..5c7ccac948ec --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentContent.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The content of the patient document. + */ +@Immutable +public final class DocumentContent implements JsonSerializable { + + /* + * The type of the content's source. + * In case the source type is 'inline', the content is given as a string (for instance, text). + * In case the source type is 'reference', the content is given as a URI. + */ + @Generated + private final DocumentContentSourceType sourceType; + + /* + * The content of the document, given either inline (as a string) or as a reference (URI). + */ + @Generated + private final String value; + + /** + * Creates an instance of DocumentContent class. + * + * @param sourceType the sourceType value to set. + * @param value the value value to set. + */ + @Generated + public DocumentContent(DocumentContentSourceType sourceType, String value) { + this.sourceType = sourceType; + this.value = value; + } + + /** + * Get the sourceType property: The type of the content's source. + * In case the source type is 'inline', the content is given as a string (for instance, text). + * In case the source type is 'reference', the content is given as a URI. + * + * @return the sourceType value. + */ + @Generated + public DocumentContentSourceType getSourceType() { + return this.sourceType; + } + + /** + * Get the value property: The content of the document, given either inline (as a string) or as a reference (URI). + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DocumentContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DocumentContent if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DocumentContent. + */ + @Generated + public static DocumentContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DocumentContentSourceType sourceType = null; + String value = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("sourceType".equals(fieldName)) { + sourceType = DocumentContentSourceType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + value = reader.getString(); + } else { + reader.skipChildren(); + } + } + return new DocumentContent(sourceType, value); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentContentSourceType.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentContentSourceType.java new file mode 100644 index 000000000000..5f1764089dfc --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentContentSourceType.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the content's source. + * In case the source type is 'inline', the content is given as a string (for instance, text). + * In case the source type is 'reference', the content is given as a URI. + */ +public final class DocumentContentSourceType extends ExpandableStringEnum { + + /** + * Static value inline for DocumentContentSourceType. + */ + @Generated + public static final DocumentContentSourceType INLINE = fromString("inline"); + + /** + * Static value reference for DocumentContentSourceType. + */ + @Generated + public static final DocumentContentSourceType REFERENCE = fromString("reference"); + + /** + * Creates a new instance of DocumentContentSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public DocumentContentSourceType() { + } + + /** + * Creates or finds a DocumentContentSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DocumentContentSourceType. + */ + @Generated + public static DocumentContentSourceType fromString(String name) { + return fromString(name, DocumentContentSourceType.class); + } + + /** + * Gets known DocumentContentSourceType values. + * + * @return known DocumentContentSourceType values. + */ + @Generated + public static Collection values() { + return values(DocumentContentSourceType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentType.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentType.java new file mode 100644 index 000000000000..7f19228eac61 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/DocumentType.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + */ +public final class DocumentType extends ExpandableStringEnum { + + /** + * Static value note for DocumentType. + */ + @Generated + public static final DocumentType NOTE = fromString("note"); + + /** + * Static value fhirBundle for DocumentType. + */ + @Generated + public static final DocumentType FHIR_BUNDLE = fromString("fhirBundle"); + + /** + * Static value dicom for DocumentType. + */ + @Generated + public static final DocumentType DICOM = fromString("dicom"); + + /** + * Static value genomicSequencing for DocumentType. + */ + @Generated + public static final DocumentType GENOMIC_SEQUENCING = fromString("genomicSequencing"); + + /** + * Creates a new instance of DocumentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public DocumentType() { + } + + /** + * Creates or finds a DocumentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DocumentType. + */ + @Generated + public static DocumentType fromString(String name) { + return fromString(name, DocumentType.class); + } + + /** + * Gets known DocumentType values. + * + * @return known DocumentType values. + */ + @Generated + public static Collection values() { + return values(DocumentType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/InferenceEvidence.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/InferenceEvidence.java new file mode 100644 index 000000000000..963356ea22d3 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/InferenceEvidence.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A piece of evidence corresponding to an inference. + */ +@Immutable +public final class InferenceEvidence implements JsonSerializable { + + /* + * A piece of evidence from a clinical note (text document). + */ + @Generated + private ClinicalNoteEvidence patientDataEvidence; + + /* + * A piece of clinical information, expressed as a code in a clinical coding + * system. + */ + @Generated + private ClinicalCodedElement patientInfoEvidence; + + /* + * A value indicating how important this piece of evidence is for the inference. + */ + @Generated + private Double importance; + + /** + * Creates an instance of InferenceEvidence class. + */ + @Generated + private InferenceEvidence() { + } + + /** + * Get the patientDataEvidence property: A piece of evidence from a clinical note (text document). + * + * @return the patientDataEvidence value. + */ + @Generated + public ClinicalNoteEvidence getPatientDataEvidence() { + return this.patientDataEvidence; + } + + /** + * Get the patientInfoEvidence property: A piece of clinical information, expressed as a code in a clinical coding + * system. + * + * @return the patientInfoEvidence value. + */ + @Generated + public ClinicalCodedElement getPatientInfoEvidence() { + return this.patientInfoEvidence; + } + + /** + * Get the importance property: A value indicating how important this piece of evidence is for the inference. + * + * @return the importance value. + */ + @Generated + public Double getImportance() { + return this.importance; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("patientDataEvidence", this.patientDataEvidence); + jsonWriter.writeJsonField("patientInfoEvidence", this.patientInfoEvidence); + jsonWriter.writeNumberField("importance", this.importance); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceEvidence from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceEvidence if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the InferenceEvidence. + */ + @Generated + public static InferenceEvidence fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceEvidence deserializedInferenceEvidence = new InferenceEvidence(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("patientDataEvidence".equals(fieldName)) { + deserializedInferenceEvidence.patientDataEvidence = ClinicalNoteEvidence.fromJson(reader); + } else if ("patientInfoEvidence".equals(fieldName)) { + deserializedInferenceEvidence.patientInfoEvidence = ClinicalCodedElement.fromJson(reader); + } else if ("importance".equals(fieldName)) { + deserializedInferenceEvidence.importance = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + return deserializedInferenceEvidence; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/JobStatus.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/JobStatus.java new file mode 100644 index 000000000000..f3578e816311 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/JobStatus.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of the processing job. + */ +public final class JobStatus extends ExpandableStringEnum { + + /** + * Static value notStarted for JobStatus. + */ + @Generated + public static final JobStatus NOT_STARTED = fromString("notStarted"); + + /** + * Static value running for JobStatus. + */ + @Generated + public static final JobStatus RUNNING = fromString("running"); + + /** + * Static value succeeded for JobStatus. + */ + @Generated + public static final JobStatus SUCCEEDED = fromString("succeeded"); + + /** + * Static value failed for JobStatus. + */ + @Generated + public static final JobStatus FAILED = fromString("failed"); + + /** + * Static value partiallyCompleted for JobStatus. + */ + @Generated + public static final JobStatus PARTIALLY_COMPLETED = fromString("partiallyCompleted"); + + /** + * Creates a new instance of JobStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public JobStatus() { + } + + /** + * Creates or finds a JobStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobStatus. + */ + @Generated + public static JobStatus fromString(String name) { + return fromString(name, JobStatus.class); + } + + /** + * Gets known JobStatus values. + * + * @return known JobStatus values. + */ + @Generated + public static Collection values() { + return values(JobStatus.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeData.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeData.java new file mode 100644 index 000000000000..58ec6cd83659 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeData.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The body of the Onco Phenotype request. + */ +@Fluent +public final class OncoPhenotypeData implements JsonSerializable { + + /* + * The list of patients, including their clinical information and data. + */ + @Generated + private final List patients; + + /* + * Configuration affecting the Onco Phenotype model's inference. + */ + @Generated + private OncoPhenotypeModelConfiguration configuration; + + /** + * Creates an instance of OncoPhenotypeData class. + * + * @param patients the patients value to set. + */ + @Generated + public OncoPhenotypeData(List patients) { + this.patients = patients; + } + + /** + * Get the patients property: The list of patients, including their clinical information and data. + * + * @return the patients value. + */ + @Generated + public List getPatients() { + return this.patients; + } + + /** + * Get the configuration property: Configuration affecting the Onco Phenotype model's inference. + * + * @return the configuration value. + */ + @Generated + public OncoPhenotypeModelConfiguration getConfiguration() { + return this.configuration; + } + + /** + * Set the configuration property: Configuration affecting the Onco Phenotype model's inference. + * + * @param configuration the configuration value to set. + * @return the OncoPhenotypeData object itself. + */ + @Generated + public OncoPhenotypeData setConfiguration(OncoPhenotypeModelConfiguration configuration) { + this.configuration = configuration; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("patients", this.patients, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("configuration", this.configuration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OncoPhenotypeData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OncoPhenotypeData if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OncoPhenotypeData. + */ + @Generated + public static OncoPhenotypeData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List patients = null; + OncoPhenotypeModelConfiguration configuration = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("patients".equals(fieldName)) { + patients = reader.readArray(reader1 -> PatientRecord.fromJson(reader1)); + } else if ("configuration".equals(fieldName)) { + configuration = OncoPhenotypeModelConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + OncoPhenotypeData deserializedOncoPhenotypeData = new OncoPhenotypeData(patients); + deserializedOncoPhenotypeData.configuration = configuration; + return deserializedOncoPhenotypeData; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeInference.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeInference.java new file mode 100644 index 000000000000..eb10f8f6946b --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeInference.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * An inference made by the Onco Phenotype model regarding a patient. + */ +@Immutable +public final class OncoPhenotypeInference implements JsonSerializable { + + /* + * The type of the Onco Phenotype inference + */ + @Generated + private final OncoPhenotypeInferenceType type; + + /* + * The value of the inference, as relevant for the given inference type. + */ + @Generated + private final String value; + + /* + * The description corresponding to the inference value. + */ + @Generated + private String description; + + /* + * Confidence score for this inference. + */ + @Generated + private Double confidenceScore; + + /* + * The evidence corresponding to the inference value. + */ + @Generated + private List evidence; + + /* + * An identifier for a clinical case, if there are multiple clinical cases regarding the same patient. + */ + @Generated + private String caseId; + + /** + * Creates an instance of OncoPhenotypeInference class. + * + * @param type the type value to set. + * @param value the value value to set. + */ + @Generated + private OncoPhenotypeInference(OncoPhenotypeInferenceType type, String value) { + this.type = type; + this.value = value; + } + + /** + * Get the type property: The type of the Onco Phenotype inference. + * + * @return the type value. + */ + @Generated + public OncoPhenotypeInferenceType getType() { + return this.type; + } + + /** + * Get the value property: The value of the inference, as relevant for the given inference type. + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * Get the description property: The description corresponding to the inference value. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Get the confidenceScore property: Confidence score for this inference. + * + * @return the confidenceScore value. + */ + @Generated + public Double getConfidenceScore() { + return this.confidenceScore; + } + + /** + * Get the evidence property: The evidence corresponding to the inference value. + * + * @return the evidence value. + */ + @Generated + public List getEvidence() { + return this.evidence; + } + + /** + * Get the caseId property: An identifier for a clinical case, if there are multiple clinical cases regarding the + * same patient. + * + * @return the caseId value. + */ + @Generated + public String getCaseId() { + return this.caseId; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeNumberField("confidenceScore", this.confidenceScore); + jsonWriter.writeArrayField("evidence", this.evidence, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("caseId", this.caseId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OncoPhenotypeInference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OncoPhenotypeInference if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OncoPhenotypeInference. + */ + @Generated + public static OncoPhenotypeInference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OncoPhenotypeInferenceType type = null; + String value = null; + String description = null; + Double confidenceScore = null; + List evidence = null; + String caseId = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("type".equals(fieldName)) { + type = OncoPhenotypeInferenceType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + value = reader.getString(); + } else if ("description".equals(fieldName)) { + description = reader.getString(); + } else if ("confidenceScore".equals(fieldName)) { + confidenceScore = reader.getNullable(JsonReader::getDouble); + } else if ("evidence".equals(fieldName)) { + evidence = reader.readArray(reader1 -> InferenceEvidence.fromJson(reader1)); + } else if ("caseId".equals(fieldName)) { + caseId = reader.getString(); + } else { + reader.skipChildren(); + } + } + OncoPhenotypeInference deserializedOncoPhenotypeInference = new OncoPhenotypeInference(type, value); + deserializedOncoPhenotypeInference.description = description; + deserializedOncoPhenotypeInference.confidenceScore = confidenceScore; + deserializedOncoPhenotypeInference.evidence = evidence; + deserializedOncoPhenotypeInference.caseId = caseId; + return deserializedOncoPhenotypeInference; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeInferenceType.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeInferenceType.java new file mode 100644 index 000000000000..4a767ac6ff8e --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeInferenceType.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the Onco Phenotype inference. + */ +public final class OncoPhenotypeInferenceType extends ExpandableStringEnum { + + /** + * Static value tumorSite for OncoPhenotypeInferenceType. + */ + @Generated + public static final OncoPhenotypeInferenceType TUMOR_SITE = fromString("tumorSite"); + + /** + * Static value histology for OncoPhenotypeInferenceType. + */ + @Generated + public static final OncoPhenotypeInferenceType HISTOLOGY = fromString("histology"); + + /** + * Static value clinicalStageT for OncoPhenotypeInferenceType. + */ + @Generated + public static final OncoPhenotypeInferenceType CLINICAL_STAGET = fromString("clinicalStageT"); + + /** + * Static value clinicalStageN for OncoPhenotypeInferenceType. + */ + @Generated + public static final OncoPhenotypeInferenceType CLINICAL_STAGEN = fromString("clinicalStageN"); + + /** + * Static value clinicalStageM for OncoPhenotypeInferenceType. + */ + @Generated + public static final OncoPhenotypeInferenceType CLINICAL_STAGEM = fromString("clinicalStageM"); + + /** + * Static value pathologicStageT for OncoPhenotypeInferenceType. + */ + @Generated + public static final OncoPhenotypeInferenceType PATHOLOGIC_STAGET = fromString("pathologicStageT"); + + /** + * Static value pathologicStageN for OncoPhenotypeInferenceType. + */ + @Generated + public static final OncoPhenotypeInferenceType PATHOLOGIC_STAGEN = fromString("pathologicStageN"); + + /** + * Static value pathologicStageM for OncoPhenotypeInferenceType. + */ + @Generated + public static final OncoPhenotypeInferenceType PATHOLOGIC_STAGEM = fromString("pathologicStageM"); + + /** + * Creates a new instance of OncoPhenotypeInferenceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public OncoPhenotypeInferenceType() { + } + + /** + * Creates or finds a OncoPhenotypeInferenceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OncoPhenotypeInferenceType. + */ + @Generated + public static OncoPhenotypeInferenceType fromString(String name) { + return fromString(name, OncoPhenotypeInferenceType.class); + } + + /** + * Gets known OncoPhenotypeInferenceType values. + * + * @return known OncoPhenotypeInferenceType values. + */ + @Generated + public static Collection values() { + return values(OncoPhenotypeInferenceType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeModelConfiguration.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeModelConfiguration.java new file mode 100644 index 000000000000..236e361df101 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeModelConfiguration.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Configuration affecting the Onco Phenotype model's inference. + */ +@Fluent +public final class OncoPhenotypeModelConfiguration implements JsonSerializable { + + /* + * An indication whether the model should produce verbose output. + */ + @Generated + private Boolean verbose; + + /* + * An indication whether the model's output should include evidence for the inferences. + */ + @Generated + private Boolean includeEvidence; + + /* + * A list of inference types to be inferred for the current request. + * This could be used if only part of the Onco Phenotype inferences are required. + * If this list is omitted or empty, the model will return all the inference types. + */ + @Generated + private List inferenceTypes; + + /* + * An indication whether to perform a preliminary step on the patient's documents to determine whether they relate + * to a Cancer case. + */ + @Generated + private Boolean checkForCancerCase; + + /** + * Creates an instance of OncoPhenotypeModelConfiguration class. + */ + @Generated + public OncoPhenotypeModelConfiguration() { + } + + /** + * Get the verbose property: An indication whether the model should produce verbose output. + * + * @return the verbose value. + */ + @Generated + public Boolean isVerbose() { + return this.verbose; + } + + /** + * Set the verbose property: An indication whether the model should produce verbose output. + * + * @param verbose the verbose value to set. + * @return the OncoPhenotypeModelConfiguration object itself. + */ + @Generated + public OncoPhenotypeModelConfiguration setVerbose(Boolean verbose) { + this.verbose = verbose; + return this; + } + + /** + * Get the includeEvidence property: An indication whether the model's output should include evidence for the + * inferences. + * + * @return the includeEvidence value. + */ + @Generated + public Boolean isIncludeEvidence() { + return this.includeEvidence; + } + + /** + * Set the includeEvidence property: An indication whether the model's output should include evidence for the + * inferences. + * + * @param includeEvidence the includeEvidence value to set. + * @return the OncoPhenotypeModelConfiguration object itself. + */ + @Generated + public OncoPhenotypeModelConfiguration setIncludeEvidence(Boolean includeEvidence) { + this.includeEvidence = includeEvidence; + return this; + } + + /** + * Get the inferenceTypes property: A list of inference types to be inferred for the current request. + * This could be used if only part of the Onco Phenotype inferences are required. + * If this list is omitted or empty, the model will return all the inference types. + * + * @return the inferenceTypes value. + */ + @Generated + public List getInferenceTypes() { + return this.inferenceTypes; + } + + /** + * Set the inferenceTypes property: A list of inference types to be inferred for the current request. + * This could be used if only part of the Onco Phenotype inferences are required. + * If this list is omitted or empty, the model will return all the inference types. + * + * @param inferenceTypes the inferenceTypes value to set. + * @return the OncoPhenotypeModelConfiguration object itself. + */ + @Generated + public OncoPhenotypeModelConfiguration setInferenceTypes(List inferenceTypes) { + this.inferenceTypes = inferenceTypes; + return this; + } + + /** + * Get the checkForCancerCase property: An indication whether to perform a preliminary step on the patient's + * documents to determine whether they relate to a Cancer case. + * + * @return the checkForCancerCase value. + */ + @Generated + public Boolean isCheckForCancerCase() { + return this.checkForCancerCase; + } + + /** + * Set the checkForCancerCase property: An indication whether to perform a preliminary step on the patient's + * documents to determine whether they relate to a Cancer case. + * + * @param checkForCancerCase the checkForCancerCase value to set. + * @return the OncoPhenotypeModelConfiguration object itself. + */ + @Generated + public OncoPhenotypeModelConfiguration setCheckForCancerCase(Boolean checkForCancerCase) { + this.checkForCancerCase = checkForCancerCase; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("verbose", this.verbose); + jsonWriter.writeBooleanField("includeEvidence", this.includeEvidence); + jsonWriter.writeArrayField("inferenceTypes", this.inferenceTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeBooleanField("checkForCancerCase", this.checkForCancerCase); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OncoPhenotypeModelConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OncoPhenotypeModelConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OncoPhenotypeModelConfiguration. + */ + @Generated + public static OncoPhenotypeModelConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OncoPhenotypeModelConfiguration deserializedOncoPhenotypeModelConfiguration + = new OncoPhenotypeModelConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("verbose".equals(fieldName)) { + deserializedOncoPhenotypeModelConfiguration.verbose = reader.getNullable(JsonReader::getBoolean); + } else if ("includeEvidence".equals(fieldName)) { + deserializedOncoPhenotypeModelConfiguration.includeEvidence + = reader.getNullable(JsonReader::getBoolean); + } else if ("inferenceTypes".equals(fieldName)) { + List inferenceTypes + = reader.readArray(reader1 -> OncoPhenotypeInferenceType.fromString(reader1.getString())); + deserializedOncoPhenotypeModelConfiguration.inferenceTypes = inferenceTypes; + } else if ("checkForCancerCase".equals(fieldName)) { + deserializedOncoPhenotypeModelConfiguration.checkForCancerCase + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + return deserializedOncoPhenotypeModelConfiguration; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypePatientResult.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypePatientResult.java new file mode 100644 index 000000000000..452960d25ad6 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypePatientResult.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The results of the model's work for a single patient. + */ +@Immutable +public final class OncoPhenotypePatientResult implements JsonSerializable { + + /* + * The identifier given for the patient in the request. + */ + @Generated + private final String id; + + /* + * The model's inferences for the given patient. + */ + @Generated + private final List inferences; + + /** + * Creates an instance of OncoPhenotypePatientResult class. + * + * @param id the id value to set. + * @param inferences the inferences value to set. + */ + @Generated + private OncoPhenotypePatientResult(String id, List inferences) { + this.id = id; + this.inferences = inferences; + } + + /** + * Get the id property: The identifier given for the patient in the request. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the inferences property: The model's inferences for the given patient. + * + * @return the inferences value. + */ + @Generated + public List getInferences() { + return this.inferences; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeArrayField("inferences", this.inferences, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OncoPhenotypePatientResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OncoPhenotypePatientResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OncoPhenotypePatientResult. + */ + @Generated + public static OncoPhenotypePatientResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + List inferences = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("inferences".equals(fieldName)) { + inferences = reader.readArray(reader1 -> OncoPhenotypeInference.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + return new OncoPhenotypePatientResult(id, inferences); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeResult.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeResult.java new file mode 100644 index 000000000000..529f9d51f321 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeResult.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.models.ResponseError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The response for the Onco Phenotype request. + */ +@Immutable +public final class OncoPhenotypeResult implements JsonSerializable { + + /* + * A processing job identifier. + */ + @Generated + private String jobId; + + /* + * The date and time when the processing job was created. + */ + @Generated + private OffsetDateTime createdDateTime; + + /* + * The date and time when the processing job is set to expire. + */ + @Generated + private OffsetDateTime expirationDateTime; + + /* + * The date and time when the processing job was last updated. + */ + @Generated + private OffsetDateTime lastUpdateDateTime; + + /* + * The status of the processing job. + */ + @Generated + private JobStatus status; + + /* + * An array of errors, if any errors occurred during the processing job. + */ + @Generated + private List errors; + + /* + * The inference results for the Onco Phenotype request. + */ + @Generated + private OncoPhenotypeResults results; + + /** + * Creates an instance of OncoPhenotypeResult class. + */ + @Generated + private OncoPhenotypeResult() { + } + + /** + * Get the jobId property: A processing job identifier. + * + * @return the jobId value. + */ + @Generated + public String getJobId() { + return this.jobId; + } + + /** + * Get the createdDateTime property: The date and time when the processing job was created. + * + * @return the createdDateTime value. + */ + @Generated + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Get the expirationDateTime property: The date and time when the processing job is set to expire. + * + * @return the expirationDateTime value. + */ + @Generated + public OffsetDateTime getExpirationDateTime() { + return this.expirationDateTime; + } + + /** + * Get the lastUpdateDateTime property: The date and time when the processing job was last updated. + * + * @return the lastUpdateDateTime value. + */ + @Generated + public OffsetDateTime getLastUpdateDateTime() { + return this.lastUpdateDateTime; + } + + /** + * Get the status property: The status of the processing job. + * + * @return the status value. + */ + @Generated + public JobStatus getStatus() { + return this.status; + } + + /** + * Get the errors property: An array of errors, if any errors occurred during the processing job. + * + * @return the errors value. + */ + @Generated + public List getErrors() { + return this.errors; + } + + /** + * Get the results property: The inference results for the Onco Phenotype request. + * + * @return the results value. + */ + @Generated + public OncoPhenotypeResults getResults() { + return this.results; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OncoPhenotypeResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OncoPhenotypeResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OncoPhenotypeResult. + */ + @Generated + public static OncoPhenotypeResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OncoPhenotypeResult deserializedOncoPhenotypeResult = new OncoPhenotypeResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("jobId".equals(fieldName)) { + deserializedOncoPhenotypeResult.jobId = reader.getString(); + } else if ("createdDateTime".equals(fieldName)) { + deserializedOncoPhenotypeResult.createdDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("expirationDateTime".equals(fieldName)) { + deserializedOncoPhenotypeResult.expirationDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastUpdateDateTime".equals(fieldName)) { + deserializedOncoPhenotypeResult.lastUpdateDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("status".equals(fieldName)) { + deserializedOncoPhenotypeResult.status = JobStatus.fromString(reader.getString()); + } else if ("errors".equals(fieldName)) { + List errors = reader.readArray(reader1 -> ResponseError.fromJson(reader1)); + deserializedOncoPhenotypeResult.errors = errors; + } else if ("results".equals(fieldName)) { + deserializedOncoPhenotypeResult.results = OncoPhenotypeResults.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedOncoPhenotypeResult; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeResults.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeResults.java new file mode 100644 index 000000000000..fa74277cb792 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/OncoPhenotypeResults.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The inference results for the Onco Phenotype request. + */ +@Immutable +public final class OncoPhenotypeResults implements JsonSerializable { + + /* + * Results for the patients given in the request. + */ + @Generated + private final List patients; + + /* + * The version of the model used for inference, expressed as the model date. + */ + @Generated + private final String modelVersion; + + /** + * Creates an instance of OncoPhenotypeResults class. + * + * @param patients the patients value to set. + * @param modelVersion the modelVersion value to set. + */ + @Generated + private OncoPhenotypeResults(List patients, String modelVersion) { + this.patients = patients; + this.modelVersion = modelVersion; + } + + /** + * Get the patients property: Results for the patients given in the request. + * + * @return the patients value. + */ + @Generated + public List getPatients() { + return this.patients; + } + + /** + * Get the modelVersion property: The version of the model used for inference, expressed as the model date. + * + * @return the modelVersion value. + */ + @Generated + public String getModelVersion() { + return this.modelVersion; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("patients", this.patients, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("modelVersion", this.modelVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OncoPhenotypeResults from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OncoPhenotypeResults if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OncoPhenotypeResults. + */ + @Generated + public static OncoPhenotypeResults fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List patients = null; + String modelVersion = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("patients".equals(fieldName)) { + patients = reader.readArray(reader1 -> OncoPhenotypePatientResult.fromJson(reader1)); + } else if ("modelVersion".equals(fieldName)) { + modelVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + return new OncoPhenotypeResults(patients, modelVersion); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientDocument.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientDocument.java new file mode 100644 index 000000000000..937e4a31b5f4 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientDocument.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * A clinical document related to a patient. Document here is in the wide sense - not just a text document (note). + */ +@Fluent +public final class PatientDocument implements JsonSerializable { + + /* + * The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + */ + @Generated + private final DocumentType type; + + /* + * The type of the clinical document. + */ + @Generated + private ClinicalDocumentType clinicalType; + + /* + * A given identifier for the document. Has to be unique across all documents for a single patient. + */ + @Generated + private final String id; + + /* + * A 2 letter ISO 639-1 representation of the language of the document. + */ + @Generated + private String language; + + /* + * The date and time when the document was created. + */ + @Generated + private OffsetDateTime createdDateTime; + + /* + * The content of the patient document. + */ + @Generated + private final DocumentContent content; + + /** + * Creates an instance of PatientDocument class. + * + * @param type the type value to set. + * @param id the id value to set. + * @param content the content value to set. + */ + @Generated + public PatientDocument(DocumentType type, String id, DocumentContent content) { + this.type = type; + this.id = id; + this.content = content; + } + + /** + * Get the type property: The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR + * JSON document). + * + * @return the type value. + */ + @Generated + public DocumentType getType() { + return this.type; + } + + /** + * Get the clinicalType property: The type of the clinical document. + * + * @return the clinicalType value. + */ + @Generated + public ClinicalDocumentType getClinicalType() { + return this.clinicalType; + } + + /** + * Set the clinicalType property: The type of the clinical document. + * + * @param clinicalType the clinicalType value to set. + * @return the PatientDocument object itself. + */ + @Generated + public PatientDocument setClinicalType(ClinicalDocumentType clinicalType) { + this.clinicalType = clinicalType; + return this; + } + + /** + * Get the id property: A given identifier for the document. Has to be unique across all documents for a single + * patient. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the language property: A 2 letter ISO 639-1 representation of the language of the document. + * + * @return the language value. + */ + @Generated + public String getLanguage() { + return this.language; + } + + /** + * Set the language property: A 2 letter ISO 639-1 representation of the language of the document. + * + * @param language the language value to set. + * @return the PatientDocument object itself. + */ + @Generated + public PatientDocument setLanguage(String language) { + this.language = language; + return this; + } + + /** + * Get the createdDateTime property: The date and time when the document was created. + * + * @return the createdDateTime value. + */ + @Generated + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: The date and time when the document was created. + * + * @param createdDateTime the createdDateTime value to set. + * @return the PatientDocument object itself. + */ + @Generated + public PatientDocument setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the content property: The content of the patient document. + * + * @return the content value. + */ + @Generated + public DocumentContent getContent() { + return this.content; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeJsonField("content", this.content); + jsonWriter.writeStringField("clinicalType", this.clinicalType == null ? null : this.clinicalType.toString()); + jsonWriter.writeStringField("language", this.language); + jsonWriter.writeStringField("createdDateTime", + this.createdDateTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdDateTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PatientDocument from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PatientDocument if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PatientDocument. + */ + @Generated + public static PatientDocument fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DocumentType type = null; + String id = null; + DocumentContent content = null; + ClinicalDocumentType clinicalType = null; + String language = null; + OffsetDateTime createdDateTime = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("type".equals(fieldName)) { + type = DocumentType.fromString(reader.getString()); + } else if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("content".equals(fieldName)) { + content = DocumentContent.fromJson(reader); + } else if ("clinicalType".equals(fieldName)) { + clinicalType = ClinicalDocumentType.fromString(reader.getString()); + } else if ("language".equals(fieldName)) { + language = reader.getString(); + } else if ("createdDateTime".equals(fieldName)) { + createdDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + PatientDocument deserializedPatientDocument = new PatientDocument(type, id, content); + deserializedPatientDocument.clinicalType = clinicalType; + deserializedPatientDocument.language = language; + deserializedPatientDocument.createdDateTime = createdDateTime; + return deserializedPatientDocument; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientInfo.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientInfo.java new file mode 100644 index 000000000000..b3d0da2ce06e --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientInfo.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.List; +import java.util.Objects; + +/** + * Patient structured information, including demographics and known structured clinical information. + */ +@Fluent +public final class PatientInfo implements JsonSerializable { + + /* + * The patient's sex. + */ + @Generated + private PatientInfoSex sex; + + /* + * The patient's date of birth. + */ + @Generated + private LocalDate birthDate; + + /* + * Known clinical information for the patient, structured. + */ + @Generated + private List clinicalInfo; + + /** + * Creates an instance of PatientInfo class. + */ + @Generated + public PatientInfo() { + } + + /** + * Get the sex property: The patient's sex. + * + * @return the sex value. + */ + @Generated + public PatientInfoSex getSex() { + return this.sex; + } + + /** + * Set the sex property: The patient's sex. + * + * @param sex the sex value to set. + * @return the PatientInfo object itself. + */ + @Generated + public PatientInfo setSex(PatientInfoSex sex) { + this.sex = sex; + return this; + } + + /** + * Get the birthDate property: The patient's date of birth. + * + * @return the birthDate value. + */ + @Generated + public LocalDate getBirthDate() { + return this.birthDate; + } + + /** + * Set the birthDate property: The patient's date of birth. + * + * @param birthDate the birthDate value to set. + * @return the PatientInfo object itself. + */ + @Generated + public PatientInfo setBirthDate(LocalDate birthDate) { + this.birthDate = birthDate; + return this; + } + + /** + * Get the clinicalInfo property: Known clinical information for the patient, structured. + * + * @return the clinicalInfo value. + */ + @Generated + public List getClinicalInfo() { + return this.clinicalInfo; + } + + /** + * Set the clinicalInfo property: Known clinical information for the patient, structured. + * + * @param clinicalInfo the clinicalInfo value to set. + * @return the PatientInfo object itself. + */ + @Generated + public PatientInfo setClinicalInfo(List clinicalInfo) { + this.clinicalInfo = clinicalInfo; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sex", this.sex == null ? null : this.sex.toString()); + jsonWriter.writeStringField("birthDate", Objects.toString(this.birthDate, null)); + jsonWriter.writeArrayField("clinicalInfo", this.clinicalInfo, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PatientInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PatientInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PatientInfo. + */ + @Generated + public static PatientInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PatientInfo deserializedPatientInfo = new PatientInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("sex".equals(fieldName)) { + deserializedPatientInfo.sex = PatientInfoSex.fromString(reader.getString()); + } else if ("birthDate".equals(fieldName)) { + deserializedPatientInfo.birthDate + = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); + } else if ("clinicalInfo".equals(fieldName)) { + List clinicalInfo + = reader.readArray(reader1 -> ClinicalCodedElement.fromJson(reader1)); + deserializedPatientInfo.clinicalInfo = clinicalInfo; + } else { + reader.skipChildren(); + } + } + return deserializedPatientInfo; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientInfoSex.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientInfoSex.java new file mode 100644 index 000000000000..e1466e18de3b --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientInfoSex.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The patient's sex. + */ +public final class PatientInfoSex extends ExpandableStringEnum { + + /** + * Static value female for PatientInfoSex. + */ + @Generated + public static final PatientInfoSex FEMALE = fromString("female"); + + /** + * Static value male for PatientInfoSex. + */ + @Generated + public static final PatientInfoSex MALE = fromString("male"); + + /** + * Static value unspecified for PatientInfoSex. + */ + @Generated + public static final PatientInfoSex UNSPECIFIED = fromString("unspecified"); + + /** + * Creates a new instance of PatientInfoSex value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public PatientInfoSex() { + } + + /** + * Creates or finds a PatientInfoSex from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatientInfoSex. + */ + @Generated + public static PatientInfoSex fromString(String name) { + return fromString(name, PatientInfoSex.class); + } + + /** + * Gets known PatientInfoSex values. + * + * @return known PatientInfoSex values. + */ + @Generated + public static Collection values() { + return values(PatientInfoSex.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientRecord.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientRecord.java new file mode 100644 index 000000000000..6a683ade4923 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/PatientRecord.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.cancerprofiling.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A patient record, including their clinical information and data. + */ +@Fluent +public final class PatientRecord implements JsonSerializable { + + /* + * A given identifier for the patient. Has to be unique across all patients in a single request. + */ + @Generated + private final String id; + + /* + * Patient structured information, including demographics and known structured clinical information. + */ + @Generated + private PatientInfo info; + + /* + * Patient unstructured clinical data, given as documents. + */ + @Generated + private List data; + + /** + * Creates an instance of PatientRecord class. + * + * @param id the id value to set. + */ + @Generated + public PatientRecord(String id) { + this.id = id; + } + + /** + * Get the id property: A given identifier for the patient. Has to be unique across all patients in a single + * request. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the info property: Patient structured information, including demographics and known structured clinical + * information. + * + * @return the info value. + */ + @Generated + public PatientInfo getInfo() { + return this.info; + } + + /** + * Set the info property: Patient structured information, including demographics and known structured clinical + * information. + * + * @param info the info value to set. + * @return the PatientRecord object itself. + */ + @Generated + public PatientRecord setInfo(PatientInfo info) { + this.info = info; + return this; + } + + /** + * Get the data property: Patient unstructured clinical data, given as documents. + * + * @return the data value. + */ + @Generated + public List getData() { + return this.data; + } + + /** + * Set the data property: Patient unstructured clinical data, given as documents. + * + * @param data the data value to set. + * @return the PatientRecord object itself. + */ + @Generated + public PatientRecord setData(List data) { + this.data = data; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeJsonField("info", this.info); + jsonWriter.writeArrayField("data", this.data, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PatientRecord from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PatientRecord if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PatientRecord. + */ + @Generated + public static PatientRecord fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + PatientInfo info = null; + List data = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("info".equals(fieldName)) { + info = PatientInfo.fromJson(reader); + } else if ("data".equals(fieldName)) { + data = reader.readArray(reader1 -> PatientDocument.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + PatientRecord deserializedPatientRecord = new PatientRecord(id); + deserializedPatientRecord.info = info; + deserializedPatientRecord.data = data; + return deserializedPatientRecord; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/package-info.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/package-info.java new file mode 100644 index 000000000000..f8a3fbff3857 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the data models for AzureHealthInsights. + * Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that + * perform analysis and provide inferences to be used by a human. + * + */ +package com.azure.health.insights.cancerprofiling.models; diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/package-info.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/package-info.java new file mode 100644 index 000000000000..c023ffe14371 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/com/azure/health/insights/cancerprofiling/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the classes for AzureHealthInsights. + * Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that + * perform analysis and provide inferences to be used by a human. + * + */ +package com.azure.health.insights.cancerprofiling; diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/module-info.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/module-info.java new file mode 100644 index 000000000000..bb2454f65f57 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +module com.azure.health.insights.cancerprofiling { + requires transitive com.azure.core; + + exports com.azure.health.insights.cancerprofiling; + exports com.azure.health.insights.cancerprofiling.models; + + opens com.azure.health.insights.cancerprofiling.models to com.azure.core; +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/resources/META-INF/azure-health-insights-cancerprofiling_apiview_properties.json b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/resources/META-INF/azure-health-insights-cancerprofiling_apiview_properties.json new file mode 100644 index 000000000000..6ff199cffd8d --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/resources/META-INF/azure-health-insights-cancerprofiling_apiview_properties.json @@ -0,0 +1,31 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.health.insights.cancerprofiling.CancerProfilingAsyncClient": "ClientForAzureHealthInsights.CancerProfilingClient", + "com.azure.health.insights.cancerprofiling.CancerProfilingAsyncClient.beginInferCancerProfile": "ClientForAzureHealthInsights.CancerProfilingClient.inferCancerProfile", + "com.azure.health.insights.cancerprofiling.CancerProfilingAsyncClient.beginInferCancerProfileWithModel": "ClientForAzureHealthInsights.CancerProfilingClient.inferCancerProfile", + "com.azure.health.insights.cancerprofiling.CancerProfilingClient": "ClientForAzureHealthInsights.CancerProfilingClient", + "com.azure.health.insights.cancerprofiling.CancerProfilingClient.beginInferCancerProfile": "ClientForAzureHealthInsights.CancerProfilingClient.inferCancerProfile", + "com.azure.health.insights.cancerprofiling.CancerProfilingClient.beginInferCancerProfileWithModel": "ClientForAzureHealthInsights.CancerProfilingClient.inferCancerProfile", + "com.azure.health.insights.cancerprofiling.CancerProfilingClientBuilder": "ClientForAzureHealthInsights.CancerProfilingClient", + "com.azure.health.insights.cancerprofiling.models.ClinicalCodedElement": "AzureHealthInsights.ClinicalCodedElement", + "com.azure.health.insights.cancerprofiling.models.ClinicalDocumentType": "AzureHealthInsights.ClinicalDocumentType", + "com.azure.health.insights.cancerprofiling.models.ClinicalNoteEvidence": "AzureHealthInsights.ClinicalNoteEvidence", + "com.azure.health.insights.cancerprofiling.models.DocumentContent": "AzureHealthInsights.DocumentContent", + "com.azure.health.insights.cancerprofiling.models.DocumentContentSourceType": "AzureHealthInsights.DocumentContentSourceType", + "com.azure.health.insights.cancerprofiling.models.DocumentType": "AzureHealthInsights.DocumentType", + "com.azure.health.insights.cancerprofiling.models.InferenceEvidence": "AzureHealthInsights.InferenceEvidence", + "com.azure.health.insights.cancerprofiling.models.JobStatus": "AzureHealthInsights.JobStatus", + "com.azure.health.insights.cancerprofiling.models.OncoPhenotypeData": "AzureHealthInsights.OncoPhenotypeData", + "com.azure.health.insights.cancerprofiling.models.OncoPhenotypeInference": "AzureHealthInsights.OncoPhenotypeInference", + "com.azure.health.insights.cancerprofiling.models.OncoPhenotypeInferenceType": "AzureHealthInsights.OncoPhenotypeInferenceType", + "com.azure.health.insights.cancerprofiling.models.OncoPhenotypeModelConfiguration": "AzureHealthInsights.OncoPhenotypeModelConfiguration", + "com.azure.health.insights.cancerprofiling.models.OncoPhenotypePatientResult": "AzureHealthInsights.OncoPhenotypePatientResult", + "com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResult": "AzureHealthInsights.OncoPhenotypeResult", + "com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResults": "AzureHealthInsights.OncoPhenotypeResults", + "com.azure.health.insights.cancerprofiling.models.PatientDocument": "AzureHealthInsights.PatientDocument", + "com.azure.health.insights.cancerprofiling.models.PatientInfo": "AzureHealthInsights.PatientInfo", + "com.azure.health.insights.cancerprofiling.models.PatientInfoSex": "AzureHealthInsights.PatientInfoSex", + "com.azure.health.insights.cancerprofiling.models.PatientRecord": "AzureHealthInsights.PatientRecord" + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/resources/azure-health-insights-cancerprofiling.properties b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/resources/azure-health-insights-cancerprofiling.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/main/resources/azure-health-insights-cancerprofiling.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/README.md b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/README.md new file mode 100644 index 000000000000..ea0794a0de2e --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/README.md @@ -0,0 +1,29 @@ +--- +page_type: sample +languages: + - java +products: + - azure + - azure-cognitive-services + - azure-health-insights +urlFragment: healthinsights-java-samples +--- + +# Azure Health Insights client library samples for Java + +Azure Health Insights Cancer Profiling samples are a set of self-contained Java programs that demonstrate interacting with Azure self-contained service using the client library. Each sample focuses on a specific scenario and can be executed independently. + +## Examples + +The following sections provide code samples covering common scenario operations with the Azure Health Insights CancerProfiling client library. + +All of these samples need the endpoint to your Health Insights resource, and your Health Insights API key. + +|**File Name**|**Description**| +|----------------|-------------| +|[SampleInferCancerProfile.java][infer_cancer_profiling]|Get the inferred cancer staging| + + +[infer_cancer_profiling]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/java/com/azure/health/insights/cancerprofiling/SampleInferCancerProfile.java + + diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/java/com/azure/health/insights/cancerprofiling/SampleInferCancerProfile.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/java/com/azure/health/insights/cancerprofiling/SampleInferCancerProfile.java new file mode 100644 index 000000000000..b675472eecbb --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/samples/java/com/azure/health/insights/cancerprofiling/SampleInferCancerProfile.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.health.insights.cancerprofiling; + +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.concurrent.CountDownLatch; +import java.util.function.Predicate; + +import com.azure.core.util.Configuration; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.health.insights.cancerprofiling.models.ClinicalCodedElement; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResult; +import com.azure.health.insights.cancerprofiling.models.PatientRecord; +import com.azure.health.insights.cancerprofiling.models.PatientDocument; +import com.azure.health.insights.cancerprofiling.models.ClinicalDocumentType; +import com.azure.health.insights.cancerprofiling.models.DocumentType; +import com.azure.health.insights.cancerprofiling.models.DocumentContentSourceType; +import com.azure.health.insights.cancerprofiling.models.DocumentContent; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResults; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeModelConfiguration; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeData; +import com.azure.health.insights.cancerprofiling.models.ClinicalNoteEvidence; + + +public class SampleInferCancerProfile { + public static void main(final String[] args) throws InterruptedException { + // BEGIN: com.azure.health.insights.cancerprofiling.buildasyncclient + String endpoint = Configuration.getGlobalConfiguration().get("AZURE_HEALTH_INSIGHTS_ENDPOINT"); + String apiKey = Configuration.getGlobalConfiguration().get("AZURE_HEALTH_INSIGHTS_API_KEY"); + + CancerProfilingAsyncClient asyncClient = new CancerProfilingClientBuilder() + .endpoint(endpoint) + .serviceVersion(AzureHealthInsightsServiceVersion.getLatest()) + .credential(new AzureKeyCredential(apiKey)) + .buildAsyncClient(); + // END: com.azure.health.insights.cancerprofiling.buildasyncclient + + // BEGIN: com.azure.health.insights.cancerprofiling.infercancerprofile + // Construct Patient + PatientRecord patient1 = new PatientRecord("patient_id"); + LinkedList patientDocuments = new LinkedList<>(); + patient1.setData(patientDocuments); + + // Add imaging document + final String docContent1 = String.join(System.getProperty("line.separator"), + "15.8.2021", + "Jane Doe 091175-8967", + "42 year old female, married with 3 children, works as a nurse. ", + "Healthy, no medications taken on a regular basis.", + "PMHx is significant for migraines with aura, uses Mirena for contraception.", + "Smoking history of 10 pack years (has stopped and relapsed several times).", + "She is in c/o 2 weeks of productive cough and shortness of breath.", + "She has a fever of 37.8 and general weakness. ", + "Denies night sweats and rash. She denies symptoms of rhinosinusitis, asthma, and heartburn. ", + "On PE:", + "GENERAL: mild pallor, no cyanosis. Regular breathing rate. ", + "LUNGS: decreased breath sounds on the base of the right lung. Vesicular breathing.", + " No crackles, rales, and wheezes. Resonant percussion. ", + "PLAN: ", + "Will be referred for a chest x-ray. ", + "======================================", + "CXR showed mild nonspecific opacities in right lung base. ", + "PLAN:", + "Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a follow-up CXR in 2 weeks."); + + PatientDocument patientDocument1 = new PatientDocument( + DocumentType.NOTE, + "doc1", + new DocumentContent(DocumentContentSourceType.INLINE, docContent1)); + + patientDocument1.setClinicalType(ClinicalDocumentType.IMAGING); + patientDocument1.setLanguage("en"); + patientDocument1.setCreatedDateTime(OffsetDateTime.parse("2021-08-15T10:15:30+01:00")); + patient1.getData().add(patientDocument1); + + // Add Pathology documents + String docContent2 = String.join(System.getProperty("line.separator"), + "Oncology Clinic ", + "20.10.2021", + "Jane Doe 091175-8967", + "42-year-old healthy female who works as a nurse in the ER of this hospital. ", + "First menstruation at 11 years old. First delivery- 27 years old. She has 3 children.", + "Didn’t breastfeed. ", + "Contraception- Mirena.", + "Smoking- 10 pack years. ", + "Mother- Belarusian. Father- Georgian. ", + "About 3 months prior to admission, she stated she had SOB and was febrile. ", + "She did a CXR as an outpatient which showed a finding in the base of the right lung- possibly an infiltrate.", + "She was treated with antibiotics with partial response. ", + "6 weeks later a repeat CXR was performed- a few solid dense findings in the right lung. ", + "Therefore, she was referred for a PET-CT which demonstrated increased uptake in the right breast, lymph nodes on the right a few areas in the lungs and liver. ", + "On biopsy from the lesion in the right breast- triple negative adenocarcinoma. Genetic testing has not been done thus far. ", + "Genetic counseling- the patient denies a family history of breast, ovary, uterus, and prostate cancer. Her mother has chronic lymphocytic leukemia (CLL). ", + "She is planned to undergo genetic tests because the aggressive course of the disease, and her young age. ", + "Impression:", + "Stage 4 triple negative breast adenocarcinoma. ", + "Could benefit from biological therapy. ", + "Different treatment options were explained- the patient wants to get a second opinion."); + + PatientDocument patientDocument2 = new PatientDocument(DocumentType.NOTE, + "doc2", + new DocumentContent(DocumentContentSourceType.INLINE, docContent2)); + patientDocument2.setClinicalType(ClinicalDocumentType.PATHOLOGY); + patientDocument2.setLanguage("en"); + patientDocument2.setCreatedDateTime(OffsetDateTime.parse("2021-10-20T22:00:00.00Z")); + patient1.getData().add(patientDocument2); + + String docContent3 = String.join(System.getProperty("line.separator"), + "PATHOLOGY REPORT", + " Clinical Information", + "Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC", + " Diagnosis", + " A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES:", + " - Invasive carcinoma of no special type (invasive ductal carcinoma), grade 1", + " Nottingham histologic grade: 1/3 (tubules 2; nuclear grade 2; mitotic rate 1; total score; 5/9)", + " Fragments involved by invasive carcinoma: 2", + " Largest measurement of invasive carcinoma on a single fragment: 7 mm", + " Ductal carcinoma in situ (DCIS): Present", + " Architectural pattern: Cribriform", + " Nuclear grade: 2-", + " -intermediate", + " Necrosis: Not identified", + " Fragments involved by DCIS: 1", + " Largest measurement of DCIS on a single fragment: Span 2 mm", + " Microcalcifications: Present in benign breast tissue and invasive carcinoma", + " Blocks with invasive carcinoma: A1", + " Special studies: Pending"); + + PatientDocument patientDocument3 = new PatientDocument(DocumentType.NOTE, + "doc3", + new DocumentContent(DocumentContentSourceType.INLINE, docContent3)); + patientDocument3.setClinicalType(ClinicalDocumentType.PATHOLOGY); + patientDocument3.setLanguage("en"); + patientDocument3.setCreatedDateTime(OffsetDateTime.parse("2022-01-01T10:15:30+01:00")); + + patient1.getData().add(patientDocument3); + + // Set configuration to include evidence for the cancer staging inferences + OncoPhenotypeModelConfiguration configuration = new OncoPhenotypeModelConfiguration(); + configuration.setIncludeEvidence(true); + + // Construct the request with the patient and configration + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(Arrays.asList(patient1)); + oncoPhenotypeData.setConfiguration(configuration); + + PollerFlux asyncPoller = asyncClient.beginInferCancerProfile(oncoPhenotypeData); + // END: com.azure.health.insights.cancerprofiling.infercancerprofile + asyncPoller + .takeUntil(IS_COMPLETE) + .subscribe(completedResult -> { + System.out.println("Completed poll response, status: " + completedResult.getStatus()); + printResults(completedResult.getValue()); + LATCH.countDown(); + }); + + LATCH.await(); + } + + private static void printResults(OncoPhenotypeResult result) { + OncoPhenotypeResults oncoResults = result.getResults(); + oncoResults.getPatients().forEach(patient_result -> { + System.out.println("\n==== Inferences of Patient " + patient_result.getId() + " ===="); + patient_result.getInferences().forEach(onco_inference -> { + System.out.println("\n=== Clinical Type: " + onco_inference.getType() + " Value: " + onco_inference.getValue() + " ConfidenceScore: " + onco_inference.getConfidenceScore() + " ==="); + onco_inference.getEvidence().forEach(evidence -> { + if (evidence.getPatientDataEvidence() != null) { + ClinicalNoteEvidence dataEvidence = evidence.getPatientDataEvidence(); + System.out.println("Evidence " + dataEvidence.getId() + " " + dataEvidence.getOffset() + " " + dataEvidence.getLength() + " " + dataEvidence.getText()); + } + if (evidence.getPatientInfoEvidence() != null) { + ClinicalCodedElement infoEvidence = evidence.getPatientInfoEvidence(); + System.out.println("Evidence " + infoEvidence.getSystem() + " " + infoEvidence.getCode() + " " + infoEvidence.getName() + " " + infoEvidence.getValue()); + } + }); + }); + }); + } + + private static final Predicate> IS_COMPLETE + = response -> response.getStatus() != LongRunningOperationStatus.IN_PROGRESS + && response.getStatus() != LongRunningOperationStatus.NOT_STARTED; + + private static final CountDownLatch LATCH = new CountDownLatch(1); +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientTest.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientTest.java new file mode 100644 index 000000000000..445abde040f8 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientTest.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.health.insights.cancerprofiling; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypePatientResult; +import com.azure.health.insights.cancerprofiling.models.OncoPhenotypeResults; +import org.junit.jupiter.api.Test; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; + +/** + * Unit tests for {@link CancerProfilingClient}. + */ +public class CancerProfilingClientTest extends CancerProfilingClientTestBase { + + private CancerProfilingClient getClient() { + return getClientBuilder().buildClient(); + } + + @Test + public void test() { + testCancerProfilingWithResponse(request -> { + BinaryData responseValue + = setPlaybackSyncPollerPollInterval(getClient().beginInferCancerProfile(request, new RequestOptions())) + .getFinalResult(); + OncoPhenotypeResults response = responseValue.toObject(OncoPhenotypeResults.class); + + List patients = response.getPatients(); + assertEquals(1, patients.size()); + OncoPhenotypePatientResult patient = patients.get(0); + assertFalse(patient.getInferences().isEmpty(), "at least one inference should be returned"); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientTestBase.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientTestBase.java new file mode 100644 index 000000000000..296f492cbe56 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/CancerProfilingClientTestBase.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.health.insights.cancerprofiling; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.models.CustomMatcher; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; + +import java.io.File; +import java.util.Arrays; +import java.util.function.Consumer; + +/** + * Base class for OncoPhenotype clients test. + */ +public class CancerProfilingClientTestBase extends TestProxyTestBase { + private static final String FAKE_API_KEY = "fakeKeyPlaceholder"; + + void testCancerProfilingWithResponse(Consumer testRunner) { + testRunner.accept(getOncoPhenotypeRequest()); + } + + CancerProfilingClientBuilder getClientBuilder() { + String apiKey = Configuration.getGlobalConfiguration().get("AZURE_HEALTHINSIGHTS_API_KEY", FAKE_API_KEY); + String endpoint + = Configuration.getGlobalConfiguration().get("AZURE_HEALTHINSIGHTS_ENDPOINT", "https://localhost:8080"); + + CancerProfilingClientBuilder builder + = new CancerProfilingClientBuilder().endpoint(endpoint).credential(new AzureKeyCredential(apiKey)); + + if (getTestMode() == TestMode.RECORD) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } else if (getTestMode() == TestMode.PLAYBACK) { + builder.httpClient(interceptorManager.getPlaybackClient()); + interceptorManager.addMatchers(Arrays.asList(new CustomMatcher() + .setHeadersKeyOnlyMatch(Arrays.asList("repeatability-first-sent", "repeatability-request-id")))); + } + if (!interceptorManager.isLiveMode()) { + // Remove `operation-location` sanitizers from the list of common sanitizers. + interceptorManager.removeSanitizers("AZSDK2030"); + } + return builder; + } + + private BinaryData getOncoPhenotypeRequest() { + File requestFile = new File( + CancerProfilingClientTestBase.class.getResource("/CancerProfilingClientTest.request.json").getPath()); + try { + return BinaryData.fromFile(requestFile.toPath()); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/generated/CancerProfilingClientTestBase.java b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/generated/CancerProfilingClientTestBase.java new file mode 100644 index 000000000000..4fc41534c601 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/java/com/azure/health/insights/cancerprofiling/generated/CancerProfilingClientTestBase.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.cancerprofiling.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.util.Configuration; +import com.azure.health.insights.cancerprofiling.CancerProfilingClient; +import com.azure.health.insights.cancerprofiling.CancerProfilingClientBuilder; + +class CancerProfilingClientTestBase extends TestProxyTestBase { + protected CancerProfilingClient cancerProfilingClient; + + @Override + protected void beforeTest() { + CancerProfilingClientBuilder cancerProfilingClientbuilder = new CancerProfilingClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + cancerProfilingClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + cancerProfilingClient = cancerProfilingClientbuilder.buildClient(); + + } +} diff --git a/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/resources/CancerProfilingClientTest.request.json b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/resources/CancerProfilingClientTest.request.json new file mode 100644 index 000000000000..1144d64c1c3a --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-cancerprofiling/src/test/resources/CancerProfilingClientTest.request.json @@ -0,0 +1,25 @@ +{ + "configuration": { + "checkForCancerCase": true, + "verbose": false, + "includeEvidence": true + }, + "patients": [ + { + "id": "patient1", + "data": [ + { + "kind": "note", + "clinicalType": "pathology", + "id": "document1", + "language": "en", + "createdDateTime": "2022-01-01T10:15:30+01:00", + "content": { + "sourceType": "inline", + "value": "Laterality: Left \n Tumor type present: Invasive duct carcinoma; duct carcinoma in situ \n Tumor site: Upper inner quadrant \n Invasive carcinoma \n Histologic type: Ductal \n Size of invasive component: 0.9 cm \n Histologic Grade - Nottingham combined histologic score: 1 out of 3 \n In situ carcinoma (DCIS) \n Histologic type of DCIS: Cribriform and solid \n Necrosis in DCIS: Yes \n DCIS component of invasive carcinoma: Extensive \n" + } + } + ] + } + ] +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/CHANGELOG.md b/sdk/healthinsights/azure-health-insights-clinicalmatching/CHANGELOG.md new file mode 100644 index 000000000000..0770fcd86333 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/CHANGELOG.md @@ -0,0 +1,15 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.1 (2023-04-11) + +- Initial preview of the Azure Health Insights ClinicalMatching client library. diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/README.md b/sdk/healthinsights/azure-health-insights-clinicalmatching/README.md new file mode 100644 index 000000000000..6f56066d8237 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/README.md @@ -0,0 +1,167 @@ +# Azure Cognitive Services Health Insights Clinical Matching client library for Java + +[Health Insights][health_insights] is an Azure Applied AI Service built with the Azure Cognitive Services Framework, that leverages multiple Cognitive Services, Healthcare API services and other Azure resources. + +The [Clinical Matching model][clinical_matching_docs] receives patients data and clinical trials protocols, and provides relevant clinical trials based on eligibility criteria. + +[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][clinical_matching_api_documentation] | [Product Documentation][product_documentation] | [Samples][samples_location] + + +## Getting started + +### Prerequisites + +- A [Java Development Kit (JDK)][jdk_link] with version 8 or above +- [Azure Subscription][azure_subscription] +- An existing Cognitive Services Health Insights instance. + +For more information about creating the resource or how to get the location and sku information see [here][cognitive_resource_cli]. + +### Include the Package + +[//]: # ({x-version-update-start;com.azure:azure-health-insights-clinicalmatching;current}) + +```xml + + com.azure + azure-health-insights-clinicalmatching + 1.0.0-beta.2 + +``` + +[//]: # ({x-version-update-end}) + +### Authenticate the client + +In order to interact with the Health Insights Clinical Matching service, you'll need to create an instance of the [`ClinicalMatchingClient`][clinical_matching_client_class] class. You will need an **endpoint** and an **API key** to instantiate a client object. + +#### Get API Key + +You can obtain the endpoint and API key from the resource information in the [Azure Portal][azure_portal]. + +Alternatively, you can use the [Azure CLI][azure_cli] snippet below to get the API key from the Health Insights resource. + +```bash +az cognitiveservices account keys list --resource-group --name +``` + +#### Create a ClinicalMatchingClient with an API Key Credential + +Once you have the value for the API key, you can pass it as a string into an instance of **AzureKeyCredential**. Use the key as the credential parameter +to authenticate the client: + +```Java com.azure.health.insights.cancerprofiling.clinicalmatching +String endpoint = Configuration.getGlobalConfiguration().get("AZURE_HEALTH_INSIGHTS_ENDPOINT"); +String apiKey = Configuration.getGlobalConfiguration().get("AZURE_HEALTH_INSIGHTS_API_KEY"); + +ClinicalMatchingAsyncClient asyncClient = new ClinicalMatchingClientBuilder() + .endpoint(endpoint) + .serviceVersion(ClinicalMatchingServiceVersion.getLatest()) + .credential(new AzureKeyCredential(apiKey)) + .buildAsyncClient(); +``` + +## Key concepts + +Trial Matcher provides the user of the services two main modes of operation: patients centric and clinical trial centric. +- On patient centric mode, the Trial Matcher model bases the patient matching on the clinical condition, location, priorities, eligibility criteria, and other criteria that the patient and/or service users may choose to prioritize. The model helps narrow down and prioritize the set of relevant clinical trials to a smaller set of trials to start with, that the specific patient appears to be qualified for. +- On clinical trial centric, the Trial Matcher is finding a group of patients potentially eligible to a clinical trial. The Trial Matcher narrows down the patients, first filtered on clinical condition and selected clinical observations, and then focuses on those patients who met the baseline criteria, to find the group of patients that appears to be eligible patients to a trial. + +## Examples + +Finding potential eligible trials for a patient. + +```Java com.azure.health.insights.clinicalmatching.findtrials +// Construct Patient +PatientRecord patient1 = new PatientRecord("patient_1"); +PatientInfo patientInfo = new PatientInfo(); +patientInfo.setBirthDate(LocalDate.parse("1965-12-26")); +patientInfo.setSex(PatientInfoSex.MALE); +final List clinicalInfo = new ArrayList(); +patientInfo.setClinicalInfo(clinicalInfo); +patient1.setInfo(patientInfo); + +final String system = "http://www.nlm.nih.gov/research/umls"; +// Attach clinical info to the patient +clinicalInfo.add(createClinicalCodedElement(system, "C0006826", "Malignant Neoplasms", "true")); +clinicalInfo.add(createClinicalCodedElement(system, "C1522449", "Therapeutic radiology procedure", "true")); +clinicalInfo.add(createClinicalCodedElement(system, "C1512162", "Eastern Cooperative Oncology Group", "1")); +clinicalInfo.add(createClinicalCodedElement(system, "C0019693", "HIV Infections", "false")); +clinicalInfo.add(createClinicalCodedElement(system, "C1300072", "Tumor stage", "2")); +clinicalInfo.add(createClinicalCodedElement(system, "METASTATIC", "metastatic", "true")); +clinicalInfo.add(createClinicalCodedElement(system, "C0019163", "Hepatitis B", "false")); +clinicalInfo.add(createClinicalCodedElement(system, "C0018802", "Congestive heart failure", "true")); +clinicalInfo.add(createClinicalCodedElement(system, "C0019196", "Hepatitis C", "false")); +clinicalInfo.add(createClinicalCodedElement(system, "C0220650", "Metastatic malignant neoplasm to brain", "true")); + +// Create registry filter +ClinicalTrialRegistryFilter registryFilters = new ClinicalTrialRegistryFilter(); +// Limit the trial to a specific patient condition ("Non-small cell lung cancer") +registryFilters.setConditions(Arrays.asList("Non-small cell lung cancer")); +// Limit the clinical trial to a certain phase, phase 1 +registryFilters.setPhases(Arrays.asList(ClinicalTrialPhase.PHASE1)); +// Specify the clinical trial registry source as ClinicalTrials.Gov +registryFilters.setSources(Arrays.asList(ClinicalTrialSource.CLINICALTRIALS_GOV)); +// Limit the clinical trial to a certain location, in this case California, USA + +GeographicLocation location = new GeographicLocation("United States"); +location.setCity("Gilbert"); +location.setState("Arizona"); +registryFilters.setFacilityLocations(Arrays.asList(location)); +// Limit the trial to a specific study type, interventional +registryFilters.setStudyTypes(Arrays.asList(ClinicalTrialStudyType.INTERVENTIONAL)); + +// Construct ClinicalTrial instance and attach the registry filter to it. +ClinicalTrials clinicalTrials = new ClinicalTrials(); +clinicalTrials.setRegistryFilters(Arrays.asList(registryFilters)); + +// Create TrialMatcherData +TrialMatcherModelConfiguration configuration = new TrialMatcherModelConfiguration(clinicalTrials); +TrialMatcherData trialMatcherData = new TrialMatcherData(Arrays.asList(patient1)); +trialMatcherData.setConfiguration(configuration); + +PollerFlux asyncPoller = asyncClient.beginMatchTrials(trialMatcherData); +``` + +## Troubleshooting + +## Next steps + +To see the full example source files, see: + + +## Additional documentation +For more extensive documentation on Azure Health Insights Clinical Matching, see the [Clinical Matching documentation][clinical_matching_docs] on learn.microsoft.com. + + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla]. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +[cla]: https://cla.microsoft.com +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com +[azure_subscription]: https://azure.microsoft.com/free/ +[cognitive_resource_cli]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli +[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable +[azure_cli]: https://learn.microsoft.com/cli/azure +[azure_portal]: https://portal.azure.com +[health_insights]: https://learn.microsoft.com/azure/azure-health-insights/overview?branch=main +[clinical_matching_docs]: https://learn.microsoft.com/azure/azure-health-insights/trial-matcher/overview +[clinical_matching_client_class]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClient.java +[package]: https://central.sonatype.com/artifact/com.azure/azure-health-insights-clinicalmatching +[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/healthinsights/azure-health-insights-clinicalmatching/src/ +[clinical_matching_api_documentation]: https://learn.microsoft.com/rest/api/healthinsights/trial-matcher +[product_documentation]: https://learn.microsoft.com/azure/azure-health-insights/trial-matcher/ +[samples_location]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples + diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/assets.json b/sdk/healthinsights/azure-health-insights-clinicalmatching/assets.json new file mode 100644 index 000000000000..31cd193d1103 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/healthinsights/azure-health-insights-clinicalmatching", + "Tag": "java/healthinsights/azure-health-insights-clinicalmatching_4d2cbbf458" +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/checkstyle-suppressions.xml b/sdk/healthinsights/azure-health-insights-clinicalmatching/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/pom.xml b/sdk/healthinsights/azure-health-insights-clinicalmatching/pom.xml new file mode 100644 index 000000000000..f370c5b95264 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/pom.xml @@ -0,0 +1,82 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-health-insights-clinicalmatching + 1.0.0-beta.2 + jar + + Microsoft Azure client library for Health Insights - Clinical Matching + This package contains Microsoft Azure Health Insights ClinicalMatching client library. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0.1 + 0.1 + + --add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + + + false + + + + com.azure + azure-json + 1.5.1 + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/spotbugs-exclude.xml b/sdk/healthinsights/azure-health-insights-clinicalmatching/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/AzureHealthInsightsServiceVersion.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/AzureHealthInsightsServiceVersion.java new file mode 100644 index 000000000000..681212886cea --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/AzureHealthInsightsServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.clinicalmatching; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of AzureHealthInsightsClient. + */ +public enum AzureHealthInsightsServiceVersion implements ServiceVersion { + /** + * Enum value 2023-03-01-preview. + */ + V2023_03_01_PREVIEW("2023-03-01-preview"); + + private final String version; + + AzureHealthInsightsServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link AzureHealthInsightsServiceVersion}. + */ + public static AzureHealthInsightsServiceVersion getLatest() { + return V2023_03_01_PREVIEW; + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingAsyncClient.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingAsyncClient.java new file mode 100644 index 000000000000..17a143b0a831 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingAsyncClient.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.PollerFlux; +import com.azure.health.insights.clinicalmatching.implementation.ClinicalMatchingClientImpl; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherData; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherResult; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherResults; + +/** + * Initializes a new instance of the asynchronous ClinicalMatchingClient type. + */ +@ServiceClient(builder = ClinicalMatchingClientBuilder.class, isAsync = true) +public final class ClinicalMatchingAsyncClient { + + @Generated + private final ClinicalMatchingClientImpl serviceClient; + + /** + * Initializes an instance of ClinicalMatchingAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ClinicalMatchingAsyncClient(ClinicalMatchingClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         clinicalTrials (Required): {
      +     *             customTrials (Optional): [
      +     *                  (Optional){
      +     *                     id: String (Required)
      +     *                     eligibilityCriteriaText: String (Optional)
      +     *                     demographics (Optional): {
      +     *                         acceptedSex: String(all/female/male) (Optional)
      +     *                         acceptedAgeRange (Optional): {
      +     *                             minimumAge (Optional): {
      +     *                                 unit: String(years/months/days) (Required)
      +     *                                 value: double (Required)
      +     *                             }
      +     *                             maximumAge (Optional): (recursive schema, see maximumAge above)
      +     *                         }
      +     *                     }
      +     *                     metadata (Required): {
      +     *                         phases (Optional): [
      +     *                             String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                         ]
      +     *                         studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                         recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                         conditions (Required): [
      +     *                             String (Required)
      +     *                         ]
      +     *                         sponsors (Optional): [
      +     *                             String (Optional)
      +     *                         ]
      +     *                         contacts (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Optional)
      +     *                                 email: String (Optional)
      +     *                                 phone: String (Optional)
      +     *                             }
      +     *                         ]
      +     *                         facilities (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Required)
      +     *                                 city: String (Optional)
      +     *                                 state: String (Optional)
      +     *                                 countryOrRegion: String (Required)
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                 }
      +     *             ]
      +     *             registryFilters (Optional): [
      +     *                  (Optional){
      +     *                     conditions (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     studyTypes (Optional): [
      +     *                         String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                     ]
      +     *                     recruitmentStatuses (Optional): [
      +     *                         String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                     ]
      +     *                     sponsors (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     phases (Optional): [
      +     *                         String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                     ]
      +     *                     purposes (Optional): [
      +     *                         String(notApplicable/screening/diagnostic/prevention/healthServicesResearch/treatment/deviceFeasibility/supportiveCare/basicScience/other) (Optional)
      +     *                     ]
      +     *                     ids (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     sources (Optional): [
      +     *                         String(custom/clinicaltrials.gov) (Optional)
      +     *                     ]
      +     *                     facilityNames (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     facilityLocations (Optional): [
      +     *                          (Optional){
      +     *                             city: String (Optional)
      +     *                             state: String (Optional)
      +     *                             countryOrRegion: String (Required)
      +     *                         }
      +     *                     ]
      +     *                     facilityAreas (Optional): [
      +     *                          (Optional){
      +     *                             type: String(Feature) (Required)
      +     *                             geometry (Required): {
      +     *                                 type: String(Point) (Required)
      +     *                                 coordinates (Required): [
      +     *                                     double (Required)
      +     *                                 ]
      +     *                             }
      +     *                             properties (Required): {
      +     *                                 subType: String(Circle) (Required)
      +     *                                 radius: double (Required)
      +     *                             }
      +     *                         }
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(trialEligibility) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 eligibilityCriteriaEvidence: String (Optional)
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         id: String (Optional)
      +     *                         source: String(custom/clinicaltrials.gov) (Optional)
      +     *                         metadata (Optional): {
      +     *                             phases (Optional): [
      +     *                                 String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                             ]
      +     *                             studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                             recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                             conditions (Required): [
      +     *                                 String (Required)
      +     *                             ]
      +     *                             sponsors (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             contacts (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Optional)
      +     *                                     email: String (Optional)
      +     *                                     phone: String (Optional)
      +     *                                 }
      +     *                             ]
      +     *                             facilities (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Required)
      +     *                                     city: String (Optional)
      +     *                                     state: String (Optional)
      +     *                                     countryOrRegion: String (Required)
      +     *                                 }
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *                 neededClinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                         semanticType: String (Optional)
      +     *                         category: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *         knowledgeGraphLastUpdateDate: LocalDate (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginMatchTrials(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.beginMatchTrialsAsync(body, requestOptions); + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginMatchTrials(TrialMatcherData body) { + // Generated convenience method for beginMatchTrialsWithModel + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.beginMatchTrialsWithModelAsync(BinaryData.fromObject(body), requestOptions); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClient.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClient.java new file mode 100644 index 000000000000..b87f8ebc5d65 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClient.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.health.insights.clinicalmatching.implementation.ClinicalMatchingClientImpl; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherData; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherResult; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherResults; + +/** + * Initializes a new instance of the synchronous ClinicalMatchingClient type. + */ +@ServiceClient(builder = ClinicalMatchingClientBuilder.class) +public final class ClinicalMatchingClient { + + @Generated + private final ClinicalMatchingClientImpl serviceClient; + + /** + * Initializes an instance of ClinicalMatchingClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ClinicalMatchingClient(ClinicalMatchingClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         clinicalTrials (Required): {
      +     *             customTrials (Optional): [
      +     *                  (Optional){
      +     *                     id: String (Required)
      +     *                     eligibilityCriteriaText: String (Optional)
      +     *                     demographics (Optional): {
      +     *                         acceptedSex: String(all/female/male) (Optional)
      +     *                         acceptedAgeRange (Optional): {
      +     *                             minimumAge (Optional): {
      +     *                                 unit: String(years/months/days) (Required)
      +     *                                 value: double (Required)
      +     *                             }
      +     *                             maximumAge (Optional): (recursive schema, see maximumAge above)
      +     *                         }
      +     *                     }
      +     *                     metadata (Required): {
      +     *                         phases (Optional): [
      +     *                             String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                         ]
      +     *                         studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                         recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                         conditions (Required): [
      +     *                             String (Required)
      +     *                         ]
      +     *                         sponsors (Optional): [
      +     *                             String (Optional)
      +     *                         ]
      +     *                         contacts (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Optional)
      +     *                                 email: String (Optional)
      +     *                                 phone: String (Optional)
      +     *                             }
      +     *                         ]
      +     *                         facilities (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Required)
      +     *                                 city: String (Optional)
      +     *                                 state: String (Optional)
      +     *                                 countryOrRegion: String (Required)
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                 }
      +     *             ]
      +     *             registryFilters (Optional): [
      +     *                  (Optional){
      +     *                     conditions (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     studyTypes (Optional): [
      +     *                         String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                     ]
      +     *                     recruitmentStatuses (Optional): [
      +     *                         String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                     ]
      +     *                     sponsors (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     phases (Optional): [
      +     *                         String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                     ]
      +     *                     purposes (Optional): [
      +     *                         String(notApplicable/screening/diagnostic/prevention/healthServicesResearch/treatment/deviceFeasibility/supportiveCare/basicScience/other) (Optional)
      +     *                     ]
      +     *                     ids (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     sources (Optional): [
      +     *                         String(custom/clinicaltrials.gov) (Optional)
      +     *                     ]
      +     *                     facilityNames (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     facilityLocations (Optional): [
      +     *                          (Optional){
      +     *                             city: String (Optional)
      +     *                             state: String (Optional)
      +     *                             countryOrRegion: String (Required)
      +     *                         }
      +     *                     ]
      +     *                     facilityAreas (Optional): [
      +     *                          (Optional){
      +     *                             type: String(Feature) (Required)
      +     *                             geometry (Required): {
      +     *                                 type: String(Point) (Required)
      +     *                                 coordinates (Required): [
      +     *                                     double (Required)
      +     *                                 ]
      +     *                             }
      +     *                             properties (Required): {
      +     *                                 subType: String(Circle) (Required)
      +     *                                 radius: double (Required)
      +     *                             }
      +     *                         }
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(trialEligibility) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 eligibilityCriteriaEvidence: String (Optional)
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         id: String (Optional)
      +     *                         source: String(custom/clinicaltrials.gov) (Optional)
      +     *                         metadata (Optional): {
      +     *                             phases (Optional): [
      +     *                                 String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                             ]
      +     *                             studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                             recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                             conditions (Required): [
      +     *                                 String (Required)
      +     *                             ]
      +     *                             sponsors (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             contacts (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Optional)
      +     *                                     email: String (Optional)
      +     *                                     phone: String (Optional)
      +     *                                 }
      +     *                             ]
      +     *                             facilities (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Required)
      +     *                                     city: String (Optional)
      +     *                                     state: String (Optional)
      +     *                                     countryOrRegion: String (Required)
      +     *                                 }
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *                 neededClinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                         semanticType: String (Optional)
      +     *                         category: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *         knowledgeGraphLastUpdateDate: LocalDate (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginMatchTrials(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.beginMatchTrials(body, requestOptions); + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + * + * @param body Body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginMatchTrials(TrialMatcherData body) { + // Generated convenience method for beginMatchTrialsWithModel + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.beginMatchTrialsWithModel(BinaryData.fromObject(body), requestOptions); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientBuilder.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientBuilder.java new file mode 100644 index 000000000000..af14720c187b --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientBuilder.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.KeyCredentialTrait; +import com.azure.core.credential.KeyCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.KeyCredentialPolicy; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.health.insights.clinicalmatching.implementation.ClinicalMatchingClientImpl; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the ClinicalMatchingClient type. + */ +@ServiceClientBuilder(serviceClients = { ClinicalMatchingClient.class, ClinicalMatchingAsyncClient.class }) +public final class ClinicalMatchingClientBuilder + implements HttpTrait, ConfigurationTrait, + KeyCredentialTrait, EndpointTrait { + + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-health-insights-clinicalmatching.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the ClinicalMatchingClientBuilder. + */ + @Generated + public ClinicalMatchingClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ClinicalMatchingClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ClinicalMatchingClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ClinicalMatchingClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ClinicalMatchingClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ClinicalMatchingClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ClinicalMatchingClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ClinicalMatchingClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The KeyCredential used for authentication. + */ + @Generated + private KeyCredential keyCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ClinicalMatchingClientBuilder credential(KeyCredential keyCredential) { + this.keyCredential = keyCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ClinicalMatchingClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private AzureHealthInsightsServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the ClinicalMatchingClientBuilder. + */ + @Generated + public ClinicalMatchingClientBuilder serviceVersion(AzureHealthInsightsServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the ClinicalMatchingClientBuilder. + */ + @Generated + public ClinicalMatchingClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of ClinicalMatchingClientImpl with the provided parameters. + * + * @return an instance of ClinicalMatchingClientImpl. + */ + @Generated + private ClinicalMatchingClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + AzureHealthInsightsServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : AzureHealthInsightsServiceVersion.getLatest(); + ClinicalMatchingClientImpl client = new ClinicalMatchingClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (keyCredential != null) { + policies.add(new KeyCredentialPolicy("Ocp-Apim-Subscription-Key", keyCredential)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of ClinicalMatchingAsyncClient class. + * + * @return an instance of ClinicalMatchingAsyncClient. + */ + @Generated + public ClinicalMatchingAsyncClient buildAsyncClient() { + return new ClinicalMatchingAsyncClient(buildInnerClient()); + } + + /** + * Builds an instance of ClinicalMatchingClient class. + * + * @return an instance of ClinicalMatchingClient. + */ + @Generated + public ClinicalMatchingClient buildClient() { + return new ClinicalMatchingClient(buildInnerClient()); + } + + private static final ClientLogger LOGGER = new ClientLogger(ClinicalMatchingClientBuilder.class); +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/ClinicalMatchingClientImpl.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/ClinicalMatchingClientImpl.java new file mode 100644 index 000000000000..d2e859b3df6b --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/ClinicalMatchingClientImpl.java @@ -0,0 +1,1888 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.clinicalmatching.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncPoller; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.TypeReference; +import com.azure.health.insights.clinicalmatching.AzureHealthInsightsServiceVersion; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherResult; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherResults; +import java.time.Duration; +import java.time.OffsetDateTime; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the ClinicalMatchingClient type. + */ +public final class ClinicalMatchingClientImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ClinicalMatchingClientService service; + + /** + * Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + */ + private final String endpoint; + + /** + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final AzureHealthInsightsServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public AzureHealthInsightsServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * Initializes an instance of ClinicalMatchingClient client. + * + * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public ClinicalMatchingClientImpl(String endpoint, AzureHealthInsightsServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of ClinicalMatchingClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public ClinicalMatchingClientImpl(HttpPipeline httpPipeline, String endpoint, + AzureHealthInsightsServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of ClinicalMatchingClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus2.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public ClinicalMatchingClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + AzureHealthInsightsServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.service + = RestProxy.create(ClinicalMatchingClientService.class, this.httpPipeline, this.getSerializerAdapter()); + } + + /** + * The interface defining all the services for ClinicalMatchingClient to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}/healthinsights") + @ServiceInterface(name = "ClinicalMatchingClie") + public interface ClinicalMatchingClientService { + @Post("/trialmatcher/jobs") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> matchTrials(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/trialmatcher/jobs") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response matchTrialsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         clinicalTrials (Required): {
      +     *             customTrials (Optional): [
      +     *                  (Optional){
      +     *                     id: String (Required)
      +     *                     eligibilityCriteriaText: String (Optional)
      +     *                     demographics (Optional): {
      +     *                         acceptedSex: String(all/female/male) (Optional)
      +     *                         acceptedAgeRange (Optional): {
      +     *                             minimumAge (Optional): {
      +     *                                 unit: String(years/months/days) (Required)
      +     *                                 value: double (Required)
      +     *                             }
      +     *                             maximumAge (Optional): (recursive schema, see maximumAge above)
      +     *                         }
      +     *                     }
      +     *                     metadata (Required): {
      +     *                         phases (Optional): [
      +     *                             String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                         ]
      +     *                         studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                         recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                         conditions (Required): [
      +     *                             String (Required)
      +     *                         ]
      +     *                         sponsors (Optional): [
      +     *                             String (Optional)
      +     *                         ]
      +     *                         contacts (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Optional)
      +     *                                 email: String (Optional)
      +     *                                 phone: String (Optional)
      +     *                             }
      +     *                         ]
      +     *                         facilities (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Required)
      +     *                                 city: String (Optional)
      +     *                                 state: String (Optional)
      +     *                                 countryOrRegion: String (Required)
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                 }
      +     *             ]
      +     *             registryFilters (Optional): [
      +     *                  (Optional){
      +     *                     conditions (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     studyTypes (Optional): [
      +     *                         String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                     ]
      +     *                     recruitmentStatuses (Optional): [
      +     *                         String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                     ]
      +     *                     sponsors (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     phases (Optional): [
      +     *                         String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                     ]
      +     *                     purposes (Optional): [
      +     *                         String(notApplicable/screening/diagnostic/prevention/healthServicesResearch/treatment/deviceFeasibility/supportiveCare/basicScience/other) (Optional)
      +     *                     ]
      +     *                     ids (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     sources (Optional): [
      +     *                         String(custom/clinicaltrials.gov) (Optional)
      +     *                     ]
      +     *                     facilityNames (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     facilityLocations (Optional): [
      +     *                          (Optional){
      +     *                             city: String (Optional)
      +     *                             state: String (Optional)
      +     *                             countryOrRegion: String (Required)
      +     *                         }
      +     *                     ]
      +     *                     facilityAreas (Optional): [
      +     *                          (Optional){
      +     *                             type: String(Feature) (Required)
      +     *                             geometry (Required): {
      +     *                                 type: String(Point) (Required)
      +     *                                 coordinates (Required): [
      +     *                                     double (Required)
      +     *                                 ]
      +     *                             }
      +     *                             properties (Required): {
      +     *                                 subType: String(Circle) (Required)
      +     *                                 radius: double (Required)
      +     *                             }
      +     *                         }
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(trialEligibility) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 eligibilityCriteriaEvidence: String (Optional)
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         id: String (Optional)
      +     *                         source: String(custom/clinicaltrials.gov) (Optional)
      +     *                         metadata (Optional): {
      +     *                             phases (Optional): [
      +     *                                 String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                             ]
      +     *                             studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                             recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                             conditions (Required): [
      +     *                                 String (Required)
      +     *                             ]
      +     *                             sponsors (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             contacts (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Optional)
      +     *                                     email: String (Optional)
      +     *                                     phone: String (Optional)
      +     *                                 }
      +     *                             ]
      +     *                             facilities (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Required)
      +     *                                     city: String (Optional)
      +     *                                     state: String (Optional)
      +     *                                     countryOrRegion: String (Required)
      +     *                                 }
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *                 neededClinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                         semanticType: String (Optional)
      +     *                         category: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *         knowledgeGraphLastUpdateDate: LocalDate (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> matchTrialsWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return FluxUtil.withContext(context -> service.matchTrials(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, body, requestOptionsLocal, context)); + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         clinicalTrials (Required): {
      +     *             customTrials (Optional): [
      +     *                  (Optional){
      +     *                     id: String (Required)
      +     *                     eligibilityCriteriaText: String (Optional)
      +     *                     demographics (Optional): {
      +     *                         acceptedSex: String(all/female/male) (Optional)
      +     *                         acceptedAgeRange (Optional): {
      +     *                             minimumAge (Optional): {
      +     *                                 unit: String(years/months/days) (Required)
      +     *                                 value: double (Required)
      +     *                             }
      +     *                             maximumAge (Optional): (recursive schema, see maximumAge above)
      +     *                         }
      +     *                     }
      +     *                     metadata (Required): {
      +     *                         phases (Optional): [
      +     *                             String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                         ]
      +     *                         studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                         recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                         conditions (Required): [
      +     *                             String (Required)
      +     *                         ]
      +     *                         sponsors (Optional): [
      +     *                             String (Optional)
      +     *                         ]
      +     *                         contacts (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Optional)
      +     *                                 email: String (Optional)
      +     *                                 phone: String (Optional)
      +     *                             }
      +     *                         ]
      +     *                         facilities (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Required)
      +     *                                 city: String (Optional)
      +     *                                 state: String (Optional)
      +     *                                 countryOrRegion: String (Required)
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                 }
      +     *             ]
      +     *             registryFilters (Optional): [
      +     *                  (Optional){
      +     *                     conditions (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     studyTypes (Optional): [
      +     *                         String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                     ]
      +     *                     recruitmentStatuses (Optional): [
      +     *                         String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                     ]
      +     *                     sponsors (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     phases (Optional): [
      +     *                         String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                     ]
      +     *                     purposes (Optional): [
      +     *                         String(notApplicable/screening/diagnostic/prevention/healthServicesResearch/treatment/deviceFeasibility/supportiveCare/basicScience/other) (Optional)
      +     *                     ]
      +     *                     ids (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     sources (Optional): [
      +     *                         String(custom/clinicaltrials.gov) (Optional)
      +     *                     ]
      +     *                     facilityNames (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     facilityLocations (Optional): [
      +     *                          (Optional){
      +     *                             city: String (Optional)
      +     *                             state: String (Optional)
      +     *                             countryOrRegion: String (Required)
      +     *                         }
      +     *                     ]
      +     *                     facilityAreas (Optional): [
      +     *                          (Optional){
      +     *                             type: String(Feature) (Required)
      +     *                             geometry (Required): {
      +     *                                 type: String(Point) (Required)
      +     *                                 coordinates (Required): [
      +     *                                     double (Required)
      +     *                                 ]
      +     *                             }
      +     *                             properties (Required): {
      +     *                                 subType: String(Circle) (Required)
      +     *                                 radius: double (Required)
      +     *                             }
      +     *                         }
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(trialEligibility) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 eligibilityCriteriaEvidence: String (Optional)
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         id: String (Optional)
      +     *                         source: String(custom/clinicaltrials.gov) (Optional)
      +     *                         metadata (Optional): {
      +     *                             phases (Optional): [
      +     *                                 String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                             ]
      +     *                             studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                             recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                             conditions (Required): [
      +     *                                 String (Required)
      +     *                             ]
      +     *                             sponsors (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             contacts (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Optional)
      +     *                                     email: String (Optional)
      +     *                                     phone: String (Optional)
      +     *                                 }
      +     *                             ]
      +     *                             facilities (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Required)
      +     *                                     city: String (Optional)
      +     *                                     state: String (Optional)
      +     *                                     countryOrRegion: String (Required)
      +     *                                 }
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *                 neededClinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                         semanticType: String (Optional)
      +     *                         category: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *         knowledgeGraphLastUpdateDate: LocalDate (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response matchTrialsWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return service.matchTrialsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, + body, requestOptionsLocal, Context.NONE); + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         clinicalTrials (Required): {
      +     *             customTrials (Optional): [
      +     *                  (Optional){
      +     *                     id: String (Required)
      +     *                     eligibilityCriteriaText: String (Optional)
      +     *                     demographics (Optional): {
      +     *                         acceptedSex: String(all/female/male) (Optional)
      +     *                         acceptedAgeRange (Optional): {
      +     *                             minimumAge (Optional): {
      +     *                                 unit: String(years/months/days) (Required)
      +     *                                 value: double (Required)
      +     *                             }
      +     *                             maximumAge (Optional): (recursive schema, see maximumAge above)
      +     *                         }
      +     *                     }
      +     *                     metadata (Required): {
      +     *                         phases (Optional): [
      +     *                             String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                         ]
      +     *                         studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                         recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                         conditions (Required): [
      +     *                             String (Required)
      +     *                         ]
      +     *                         sponsors (Optional): [
      +     *                             String (Optional)
      +     *                         ]
      +     *                         contacts (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Optional)
      +     *                                 email: String (Optional)
      +     *                                 phone: String (Optional)
      +     *                             }
      +     *                         ]
      +     *                         facilities (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Required)
      +     *                                 city: String (Optional)
      +     *                                 state: String (Optional)
      +     *                                 countryOrRegion: String (Required)
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                 }
      +     *             ]
      +     *             registryFilters (Optional): [
      +     *                  (Optional){
      +     *                     conditions (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     studyTypes (Optional): [
      +     *                         String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                     ]
      +     *                     recruitmentStatuses (Optional): [
      +     *                         String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                     ]
      +     *                     sponsors (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     phases (Optional): [
      +     *                         String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                     ]
      +     *                     purposes (Optional): [
      +     *                         String(notApplicable/screening/diagnostic/prevention/healthServicesResearch/treatment/deviceFeasibility/supportiveCare/basicScience/other) (Optional)
      +     *                     ]
      +     *                     ids (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     sources (Optional): [
      +     *                         String(custom/clinicaltrials.gov) (Optional)
      +     *                     ]
      +     *                     facilityNames (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     facilityLocations (Optional): [
      +     *                          (Optional){
      +     *                             city: String (Optional)
      +     *                             state: String (Optional)
      +     *                             countryOrRegion: String (Required)
      +     *                         }
      +     *                     ]
      +     *                     facilityAreas (Optional): [
      +     *                          (Optional){
      +     *                             type: String(Feature) (Required)
      +     *                             geometry (Required): {
      +     *                                 type: String(Point) (Required)
      +     *                                 coordinates (Required): [
      +     *                                     double (Required)
      +     *                                 ]
      +     *                             }
      +     *                             properties (Required): {
      +     *                                 subType: String(Circle) (Required)
      +     *                                 radius: double (Required)
      +     *                             }
      +     *                         }
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(trialEligibility) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 eligibilityCriteriaEvidence: String (Optional)
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         id: String (Optional)
      +     *                         source: String(custom/clinicaltrials.gov) (Optional)
      +     *                         metadata (Optional): {
      +     *                             phases (Optional): [
      +     *                                 String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                             ]
      +     *                             studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                             recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                             conditions (Required): [
      +     *                                 String (Required)
      +     *                             ]
      +     *                             sponsors (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             contacts (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Optional)
      +     *                                     email: String (Optional)
      +     *                                     phone: String (Optional)
      +     *                                 }
      +     *                             ]
      +     *                             facilities (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Required)
      +     *                                     city: String (Optional)
      +     *                                     state: String (Optional)
      +     *                                     countryOrRegion: String (Required)
      +     *                                 }
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *                 neededClinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                         semanticType: String (Optional)
      +     *                         category: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *         knowledgeGraphLastUpdateDate: LocalDate (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginMatchTrialsAsync(BinaryData body, RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), () -> this.matchTrialsWithResponseAsync(body, requestOptions), + new com.azure.health.insights.clinicalmatching.implementation.OperationLocationPollingStrategy<>( + new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("{endpoint}/healthinsights".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion()), + "results"), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         clinicalTrials (Required): {
      +     *             customTrials (Optional): [
      +     *                  (Optional){
      +     *                     id: String (Required)
      +     *                     eligibilityCriteriaText: String (Optional)
      +     *                     demographics (Optional): {
      +     *                         acceptedSex: String(all/female/male) (Optional)
      +     *                         acceptedAgeRange (Optional): {
      +     *                             minimumAge (Optional): {
      +     *                                 unit: String(years/months/days) (Required)
      +     *                                 value: double (Required)
      +     *                             }
      +     *                             maximumAge (Optional): (recursive schema, see maximumAge above)
      +     *                         }
      +     *                     }
      +     *                     metadata (Required): {
      +     *                         phases (Optional): [
      +     *                             String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                         ]
      +     *                         studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                         recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                         conditions (Required): [
      +     *                             String (Required)
      +     *                         ]
      +     *                         sponsors (Optional): [
      +     *                             String (Optional)
      +     *                         ]
      +     *                         contacts (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Optional)
      +     *                                 email: String (Optional)
      +     *                                 phone: String (Optional)
      +     *                             }
      +     *                         ]
      +     *                         facilities (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Required)
      +     *                                 city: String (Optional)
      +     *                                 state: String (Optional)
      +     *                                 countryOrRegion: String (Required)
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                 }
      +     *             ]
      +     *             registryFilters (Optional): [
      +     *                  (Optional){
      +     *                     conditions (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     studyTypes (Optional): [
      +     *                         String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                     ]
      +     *                     recruitmentStatuses (Optional): [
      +     *                         String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                     ]
      +     *                     sponsors (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     phases (Optional): [
      +     *                         String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                     ]
      +     *                     purposes (Optional): [
      +     *                         String(notApplicable/screening/diagnostic/prevention/healthServicesResearch/treatment/deviceFeasibility/supportiveCare/basicScience/other) (Optional)
      +     *                     ]
      +     *                     ids (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     sources (Optional): [
      +     *                         String(custom/clinicaltrials.gov) (Optional)
      +     *                     ]
      +     *                     facilityNames (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     facilityLocations (Optional): [
      +     *                          (Optional){
      +     *                             city: String (Optional)
      +     *                             state: String (Optional)
      +     *                             countryOrRegion: String (Required)
      +     *                         }
      +     *                     ]
      +     *                     facilityAreas (Optional): [
      +     *                          (Optional){
      +     *                             type: String(Feature) (Required)
      +     *                             geometry (Required): {
      +     *                                 type: String(Point) (Required)
      +     *                                 coordinates (Required): [
      +     *                                     double (Required)
      +     *                                 ]
      +     *                             }
      +     *                             properties (Required): {
      +     *                                 subType: String(Circle) (Required)
      +     *                                 radius: double (Required)
      +     *                             }
      +     *                         }
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(trialEligibility) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 eligibilityCriteriaEvidence: String (Optional)
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         id: String (Optional)
      +     *                         source: String(custom/clinicaltrials.gov) (Optional)
      +     *                         metadata (Optional): {
      +     *                             phases (Optional): [
      +     *                                 String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                             ]
      +     *                             studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                             recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                             conditions (Required): [
      +     *                                 String (Required)
      +     *                             ]
      +     *                             sponsors (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             contacts (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Optional)
      +     *                                     email: String (Optional)
      +     *                                     phone: String (Optional)
      +     *                                 }
      +     *                             ]
      +     *                             facilities (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Required)
      +     *                                     city: String (Optional)
      +     *                                     state: String (Optional)
      +     *                                     countryOrRegion: String (Required)
      +     *                                 }
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *                 neededClinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                         semanticType: String (Optional)
      +     *                         category: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *         knowledgeGraphLastUpdateDate: LocalDate (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginMatchTrials(BinaryData body, RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), () -> this.matchTrialsWithResponse(body, requestOptions), + new com.azure.health.insights.clinicalmatching.implementation.SyncOperationLocationPollingStrategy<>( + new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("{endpoint}/healthinsights".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion()), + "results"), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         clinicalTrials (Required): {
      +     *             customTrials (Optional): [
      +     *                  (Optional){
      +     *                     id: String (Required)
      +     *                     eligibilityCriteriaText: String (Optional)
      +     *                     demographics (Optional): {
      +     *                         acceptedSex: String(all/female/male) (Optional)
      +     *                         acceptedAgeRange (Optional): {
      +     *                             minimumAge (Optional): {
      +     *                                 unit: String(years/months/days) (Required)
      +     *                                 value: double (Required)
      +     *                             }
      +     *                             maximumAge (Optional): (recursive schema, see maximumAge above)
      +     *                         }
      +     *                     }
      +     *                     metadata (Required): {
      +     *                         phases (Optional): [
      +     *                             String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                         ]
      +     *                         studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                         recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                         conditions (Required): [
      +     *                             String (Required)
      +     *                         ]
      +     *                         sponsors (Optional): [
      +     *                             String (Optional)
      +     *                         ]
      +     *                         contacts (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Optional)
      +     *                                 email: String (Optional)
      +     *                                 phone: String (Optional)
      +     *                             }
      +     *                         ]
      +     *                         facilities (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Required)
      +     *                                 city: String (Optional)
      +     *                                 state: String (Optional)
      +     *                                 countryOrRegion: String (Required)
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                 }
      +     *             ]
      +     *             registryFilters (Optional): [
      +     *                  (Optional){
      +     *                     conditions (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     studyTypes (Optional): [
      +     *                         String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                     ]
      +     *                     recruitmentStatuses (Optional): [
      +     *                         String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                     ]
      +     *                     sponsors (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     phases (Optional): [
      +     *                         String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                     ]
      +     *                     purposes (Optional): [
      +     *                         String(notApplicable/screening/diagnostic/prevention/healthServicesResearch/treatment/deviceFeasibility/supportiveCare/basicScience/other) (Optional)
      +     *                     ]
      +     *                     ids (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     sources (Optional): [
      +     *                         String(custom/clinicaltrials.gov) (Optional)
      +     *                     ]
      +     *                     facilityNames (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     facilityLocations (Optional): [
      +     *                          (Optional){
      +     *                             city: String (Optional)
      +     *                             state: String (Optional)
      +     *                             countryOrRegion: String (Required)
      +     *                         }
      +     *                     ]
      +     *                     facilityAreas (Optional): [
      +     *                          (Optional){
      +     *                             type: String(Feature) (Required)
      +     *                             geometry (Required): {
      +     *                                 type: String(Point) (Required)
      +     *                                 coordinates (Required): [
      +     *                                     double (Required)
      +     *                                 ]
      +     *                             }
      +     *                             properties (Required): {
      +     *                                 subType: String(Circle) (Required)
      +     *                                 radius: double (Required)
      +     *                             }
      +     *                         }
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(trialEligibility) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 eligibilityCriteriaEvidence: String (Optional)
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         id: String (Optional)
      +     *                         source: String(custom/clinicaltrials.gov) (Optional)
      +     *                         metadata (Optional): {
      +     *                             phases (Optional): [
      +     *                                 String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                             ]
      +     *                             studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                             recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                             conditions (Required): [
      +     *                                 String (Required)
      +     *                             ]
      +     *                             sponsors (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             contacts (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Optional)
      +     *                                     email: String (Optional)
      +     *                                     phone: String (Optional)
      +     *                                 }
      +     *                             ]
      +     *                             facilities (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Required)
      +     *                                     city: String (Optional)
      +     *                                     state: String (Optional)
      +     *                                     countryOrRegion: String (Required)
      +     *                                 }
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *                 neededClinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                         semanticType: String (Optional)
      +     *                         category: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *         knowledgeGraphLastUpdateDate: LocalDate (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginMatchTrialsWithModelAsync(BinaryData body, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), () -> this.matchTrialsWithResponseAsync(body, requestOptions), + new com.azure.health.insights.clinicalmatching.implementation.OperationLocationPollingStrategy<>( + new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("{endpoint}/healthinsights".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion()), + "results"), + TypeReference.createInstance(TrialMatcherResult.class), + TypeReference.createInstance(TrialMatcherResults.class)); + } + + /** + * Create Trial Matcher job + * + * Creates a Trial Matcher job with the given request body. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     patients (Required): [
      +     *          (Required){
      +     *             id: String (Required)
      +     *             info (Optional): {
      +     *                 sex: String(female/male/unspecified) (Optional)
      +     *                 birthDate: LocalDate (Optional)
      +     *                 clinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             data (Optional): [
      +     *                  (Optional){
      +     *                     type: String(note/fhirBundle/dicom/genomicSequencing) (Required)
      +     *                     clinicalType: String(consultation/dischargeSummary/historyAndPhysical/procedure/progress/imaging/laboratory/pathology) (Optional)
      +     *                     id: String (Required)
      +     *                     language: String (Optional)
      +     *                     createdDateTime: OffsetDateTime (Optional)
      +     *                     content (Required): {
      +     *                         sourceType: String(inline/reference) (Required)
      +     *                         value: String (Required)
      +     *                     }
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     *     configuration (Optional): {
      +     *         verbose: Boolean (Optional)
      +     *         includeEvidence: Boolean (Optional)
      +     *         clinicalTrials (Required): {
      +     *             customTrials (Optional): [
      +     *                  (Optional){
      +     *                     id: String (Required)
      +     *                     eligibilityCriteriaText: String (Optional)
      +     *                     demographics (Optional): {
      +     *                         acceptedSex: String(all/female/male) (Optional)
      +     *                         acceptedAgeRange (Optional): {
      +     *                             minimumAge (Optional): {
      +     *                                 unit: String(years/months/days) (Required)
      +     *                                 value: double (Required)
      +     *                             }
      +     *                             maximumAge (Optional): (recursive schema, see maximumAge above)
      +     *                         }
      +     *                     }
      +     *                     metadata (Required): {
      +     *                         phases (Optional): [
      +     *                             String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                         ]
      +     *                         studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                         recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                         conditions (Required): [
      +     *                             String (Required)
      +     *                         ]
      +     *                         sponsors (Optional): [
      +     *                             String (Optional)
      +     *                         ]
      +     *                         contacts (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Optional)
      +     *                                 email: String (Optional)
      +     *                                 phone: String (Optional)
      +     *                             }
      +     *                         ]
      +     *                         facilities (Optional): [
      +     *                              (Optional){
      +     *                                 name: String (Required)
      +     *                                 city: String (Optional)
      +     *                                 state: String (Optional)
      +     *                                 countryOrRegion: String (Required)
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                 }
      +     *             ]
      +     *             registryFilters (Optional): [
      +     *                  (Optional){
      +     *                     conditions (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     studyTypes (Optional): [
      +     *                         String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                     ]
      +     *                     recruitmentStatuses (Optional): [
      +     *                         String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                     ]
      +     *                     sponsors (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     phases (Optional): [
      +     *                         String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                     ]
      +     *                     purposes (Optional): [
      +     *                         String(notApplicable/screening/diagnostic/prevention/healthServicesResearch/treatment/deviceFeasibility/supportiveCare/basicScience/other) (Optional)
      +     *                     ]
      +     *                     ids (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     sources (Optional): [
      +     *                         String(custom/clinicaltrials.gov) (Optional)
      +     *                     ]
      +     *                     facilityNames (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     facilityLocations (Optional): [
      +     *                          (Optional){
      +     *                             city: String (Optional)
      +     *                             state: String (Optional)
      +     *                             countryOrRegion: String (Required)
      +     *                         }
      +     *                     ]
      +     *                     facilityAreas (Optional): [
      +     *                          (Optional){
      +     *                             type: String(Feature) (Required)
      +     *                             geometry (Required): {
      +     *                                 type: String(Point) (Required)
      +     *                                 coordinates (Required): [
      +     *                                     double (Required)
      +     *                                 ]
      +     *                             }
      +     *                             properties (Required): {
      +     *                                 subType: String(Circle) (Required)
      +     *                                 radius: double (Required)
      +     *                             }
      +     *                         }
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     jobId: String (Required)
      +     *     createdDateTime: OffsetDateTime (Required)
      +     *     expirationDateTime: OffsetDateTime (Required)
      +     *     lastUpdateDateTime: OffsetDateTime (Required)
      +     *     status: String(notStarted/running/succeeded/failed/partiallyCompleted) (Required)
      +     *     errors (Optional): [
      +     *          (Optional){
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             details (Optional): [
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *             innererror (Optional): {
      +     *                 code: String (Optional)
      +     *                 innererror (Optional): (recursive schema, see innererror above)
      +     *             }
      +     *         }
      +     *     ]
      +     *     results (Optional): {
      +     *         patients (Required): [
      +     *              (Required){
      +     *                 id: String (Required)
      +     *                 inferences (Required): [
      +     *                      (Required){
      +     *                         type: String(trialEligibility) (Required)
      +     *                         value: String (Required)
      +     *                         description: String (Optional)
      +     *                         confidenceScore: Double (Optional)
      +     *                         evidence (Optional): [
      +     *                              (Optional){
      +     *                                 eligibilityCriteriaEvidence: String (Optional)
      +     *                                 patientDataEvidence (Optional): {
      +     *                                     id: String (Required)
      +     *                                     text: String (Optional)
      +     *                                     offset: int (Required)
      +     *                                     length: int (Required)
      +     *                                 }
      +     *                                 patientInfoEvidence (Optional): {
      +     *                                     system: String (Required)
      +     *                                     code: String (Required)
      +     *                                     name: String (Optional)
      +     *                                     value: String (Optional)
      +     *                                 }
      +     *                                 importance: Double (Optional)
      +     *                             }
      +     *                         ]
      +     *                         id: String (Optional)
      +     *                         source: String(custom/clinicaltrials.gov) (Optional)
      +     *                         metadata (Optional): {
      +     *                             phases (Optional): [
      +     *                                 String(notApplicable/earlyPhase1/phase1/phase2/phase3/phase4) (Optional)
      +     *                             ]
      +     *                             studyType: String(interventional/observational/expandedAccess/patientRegistries) (Optional)
      +     *                             recruitmentStatus: String(unknownStatus/notYetRecruiting/recruiting/enrollingByInvitation) (Optional)
      +     *                             conditions (Required): [
      +     *                                 String (Required)
      +     *                             ]
      +     *                             sponsors (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             contacts (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Optional)
      +     *                                     email: String (Optional)
      +     *                                     phone: String (Optional)
      +     *                                 }
      +     *                             ]
      +     *                             facilities (Optional): [
      +     *                                  (Optional){
      +     *                                     name: String (Required)
      +     *                                     city: String (Optional)
      +     *                                     state: String (Optional)
      +     *                                     countryOrRegion: String (Required)
      +     *                                 }
      +     *                             ]
      +     *                         }
      +     *                     }
      +     *                 ]
      +     *                 neededClinicalInfo (Optional): [
      +     *                      (Optional){
      +     *                         system: String (Required)
      +     *                         code: String (Required)
      +     *                         name: String (Optional)
      +     *                         value: String (Optional)
      +     *                         semanticType: String (Optional)
      +     *                         category: String (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         modelVersion: String (Required)
      +     *         knowledgeGraphLastUpdateDate: LocalDate (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param body Body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginMatchTrialsWithModel(BinaryData body, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), () -> this.matchTrialsWithResponse(body, requestOptions), + new com.azure.health.insights.clinicalmatching.implementation.SyncOperationLocationPollingStrategy<>( + new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("{endpoint}/healthinsights".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion()), + "results"), + TypeReference.createInstance(TrialMatcherResult.class), + TypeReference.createInstance(TrialMatcherResults.class)); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/OperationLocationPollingStrategy.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/OperationLocationPollingStrategy.java new file mode 100644 index 000000000000..948e002a2283 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/OperationLocationPollingStrategy.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.clinicalmatching.implementation; + +import com.azure.core.exception.AzureException; +import com.azure.core.http.HttpHeader; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.OperationResourcePollingStrategy; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.PollingContext; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.serializer.JsonSerializerProviders; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.core.util.serializer.TypeReference; +import java.time.Duration; +import java.time.OffsetDateTime; +import reactor.core.publisher.Mono; + +// DO NOT modify this helper class + +/** + * Implements an operation location polling strategy, from Operation-Location. + * + * @param the type of the response type from a polling call, or BinaryData if raw response body should be kept + * @param the type of the final result object to deserialize into, or BinaryData if raw response body should be + * kept + */ +public final class OperationLocationPollingStrategy extends OperationResourcePollingStrategy { + + private static final ClientLogger LOGGER = new ClientLogger(OperationLocationPollingStrategy.class); + + private final ObjectSerializer serializer; + private final String endpoint; + private final String propertyName; + + /** + * Creates an instance of the operation resource polling strategy. + * + * @param pollingStrategyOptions options to configure this polling strategy. + * @throws NullPointerException if {@code pollingStrategyOptions} is null. + */ + public OperationLocationPollingStrategy(PollingStrategyOptions pollingStrategyOptions) { + this(pollingStrategyOptions, null); + } + + /** + * Creates an instance of the operation resource polling strategy. + * + * @param pollingStrategyOptions options to configure this polling strategy. + * @param propertyName the name of the property to extract final result. + * @throws NullPointerException if {@code pollingStrategyOptions} is null. + */ + public OperationLocationPollingStrategy(PollingStrategyOptions pollingStrategyOptions, String propertyName) { + super(PollingUtils.OPERATION_LOCATION_HEADER, pollingStrategyOptions); + this.propertyName = propertyName; + this.endpoint = pollingStrategyOptions.getEndpoint(); + this.serializer = pollingStrategyOptions.getSerializer() != null + ? pollingStrategyOptions.getSerializer() + : JsonSerializerProviders.createInstance(true); + } + + /** + * {@inheritDoc} + */ + @Override + public Mono> onInitialResponse(Response response, PollingContext pollingContext, + TypeReference pollResponseType) { + // Response is Response + + HttpHeader operationLocationHeader = response.getHeaders().get(PollingUtils.OPERATION_LOCATION_HEADER); + if (operationLocationHeader != null) { + pollingContext.setData(PollingUtils.OPERATION_LOCATION_HEADER.getCaseSensitiveName(), + PollingUtils.getAbsolutePath(operationLocationHeader.getValue(), endpoint, LOGGER)); + } + final String httpMethod = response.getRequest().getHttpMethod().name(); + pollingContext.setData(PollingUtils.HTTP_METHOD, httpMethod); + pollingContext.setData(PollingUtils.REQUEST_URL, response.getRequest().getUrl().toString()); + + if (response.getStatusCode() == 200 + || response.getStatusCode() == 201 + || response.getStatusCode() == 202 + || response.getStatusCode() == 204) { + final Duration retryAfter + = PollingUtils.getRetryAfterFromHeaders(response.getHeaders(), OffsetDateTime::now); + final Mono> pollResponseMono + = PollingUtils.deserializeResponse((BinaryData) response.getValue(), serializer, pollResponseType) + .onErrorResume(exception -> { + LOGGER.info("Failed to parse initial response."); + return Mono.empty(); + }) + .map(value -> new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, value, retryAfter)); + return pollResponseMono.switchIfEmpty( + Mono.fromSupplier(() -> new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, null, retryAfter))); + } else { + return Mono + .error( + new AzureException(String.format( + "Operation failed or cancelled with status code %d," + + ", '%s' header: %s, and response body: %s", + response.getStatusCode(), PollingUtils.OPERATION_LOCATION_HEADER, operationLocationHeader, + response.getValue()))); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Mono getResult(PollingContext pollingContext, TypeReference resultType) { + if (pollingContext.getLatestResponse().getStatus() == LongRunningOperationStatus.FAILED) { + return Mono.error(new AzureException("Long running operation failed.")); + } else if (pollingContext.getLatestResponse().getStatus() == LongRunningOperationStatus.USER_CANCELLED) { + return Mono.error(new AzureException("Long running operation cancelled.")); + } + if (propertyName != null) { + // take the last poll response body from PollingContext, + // and de-serialize the property as final result + BinaryData latestResponseBody + = BinaryData.fromString(pollingContext.getData(PollingUtils.POLL_RESPONSE_BODY)); + return PollingUtils + .deserializeResponse(latestResponseBody, serializer, PollingUtils.POST_POLL_RESULT_TYPE_REFERENCE) + .flatMap(value -> { + if (value.get(propertyName) != null) { + return BinaryData.fromObjectAsync(value.get(propertyName)) + .flatMap(result -> PollingUtils.deserializeResponse(result, serializer, resultType)); + } else { + return Mono.error(new AzureException("Cannot get final result")); + } + }) + .switchIfEmpty(Mono.error(new AzureException("Cannot get final result"))); + } else { + return super.getResult(pollingContext, resultType); + } + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/PollingUtils.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/PollingUtils.java new file mode 100644 index 000000000000..ab6935829956 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/PollingUtils.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.clinicalmatching.implementation; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.BinaryData; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.core.util.serializer.TypeReference; +import java.net.URI; +import java.net.URISyntaxException; +import java.time.DateTimeException; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.temporal.ChronoUnit; +import java.util.Map; +import java.util.function.Function; +import java.util.function.Supplier; +import reactor.core.publisher.Mono; + +// DO NOT modify this helper class + +final class PollingUtils { + + public static final TypeReference> POST_POLL_RESULT_TYPE_REFERENCE + = new TypeReference>() { + }; + + public static final HttpHeaderName OPERATION_LOCATION_HEADER = HttpHeaderName.fromString("Operation-Location"); + + public static final String HTTP_METHOD = "httpMethod"; + public static final String REQUEST_URL = "requestURL"; + public static final String POLL_RESPONSE_BODY = "pollResponseBody"; + + private static final String FORWARD_SLASH = "/"; + + public static String getAbsolutePath(String path, String endpoint, ClientLogger logger) { + try { + URI uri = new URI(path); + if (!uri.isAbsolute()) { + if (CoreUtils.isNullOrEmpty(endpoint)) { + throw logger.logExceptionAsError(new IllegalArgumentException( + "Relative path requires endpoint to be non-null and non-empty to create an absolute path.")); + } + + if (endpoint.endsWith(FORWARD_SLASH) && path.startsWith(FORWARD_SLASH)) { + return endpoint + path.substring(1); + } else if (!endpoint.endsWith(FORWARD_SLASH) && !path.startsWith(FORWARD_SLASH)) { + return endpoint + FORWARD_SLASH + path; + } else { + return endpoint + path; + } + } + } catch (URISyntaxException ex) { + throw logger.logExceptionAsWarning(new IllegalArgumentException("'path' must be a valid URI.", ex)); + } + return path; + } + + public static T deserializeResponseSync(BinaryData binaryData, ObjectSerializer serializer, + TypeReference typeReference) { + T value; + if (binaryData == null) { + value = null; + } else if (typeReference.getJavaClass().isAssignableFrom(BinaryData.class)) { + // T is BinaryData + value = typeReference.getJavaClass().cast(binaryData.toReplayableBinaryData()); + } else { + value = binaryData.toObject(typeReference, serializer); + } + return value; + } + + @SuppressWarnings("unchecked") + public static Mono deserializeResponse(BinaryData binaryData, ObjectSerializer serializer, + TypeReference typeReference) { + Mono value; + if (binaryData == null) { + value = Mono.empty(); + } else if (typeReference.getJavaClass().isAssignableFrom(BinaryData.class)) { + // T is BinaryData + value = (Mono) binaryData.toReplayableBinaryDataAsync(); + } else { + value = binaryData.toObjectAsync(typeReference, serializer); + } + return value; + } + + private static final HttpHeaderName RETRY_AFTER_MS_HEADER = HttpHeaderName.fromString("retry-after-ms"); + private static final HttpHeaderName X_MS_RETRY_AFTER_MS_HEADER = HttpHeaderName.fromString("x-ms-retry-after-ms"); + + public static Duration getRetryAfterFromHeaders(HttpHeaders headers, Supplier nowSupplier) { + // Found 'x-ms-retry-after-ms' header, use a Duration of milliseconds based on the value. + Duration retryDelay = tryGetRetryDelay(headers, X_MS_RETRY_AFTER_MS_HEADER, s -> tryGetDelayMillis(s)); + if (retryDelay != null) { + return retryDelay; + } + + // Found 'retry-after-ms' header, use a Duration of milliseconds based on the value. + retryDelay = tryGetRetryDelay(headers, RETRY_AFTER_MS_HEADER, s -> tryGetDelayMillis(s)); + if (retryDelay != null) { + return retryDelay; + } + + // Found 'Retry-After' header. First, attempt to resolve it as a Duration of seconds. If that fails, then + // attempt to resolve it as an HTTP date (RFC1123). + retryDelay = tryGetRetryDelay(headers, HttpHeaderName.RETRY_AFTER, + headerValue -> tryParseLongOrDateTime(headerValue, nowSupplier)); + + // Either the retry delay will have been found or it'll be null, null indicates no retry after. + return retryDelay; + } + + private static Duration tryGetRetryDelay(HttpHeaders headers, HttpHeaderName headerName, + Function delayParser) { + String headerValue = headers.getValue(headerName); + + return CoreUtils.isNullOrEmpty(headerValue) ? null : delayParser.apply(headerValue); + } + + private static Duration tryParseLongOrDateTime(String value, Supplier nowSupplier) { + long delaySeconds; + try { + OffsetDateTime retryAfter = new DateTimeRfc1123(value).getDateTime(); + + delaySeconds = nowSupplier.get().until(retryAfter, ChronoUnit.SECONDS); + } catch (DateTimeException ex) { + delaySeconds = tryParseLong(value); + } + + return (delaySeconds >= 0) ? Duration.ofSeconds(delaySeconds) : null; + } + + private static long tryParseLong(String value) { + try { + return Long.parseLong(value); + } catch (NumberFormatException ex) { + return -1; + } + } + + private static Duration tryGetDelayMillis(String value) { + long delayMillis = tryParseLong(value); + return (delayMillis >= 0) ? Duration.ofMillis(delayMillis) : null; + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/SyncOperationLocationPollingStrategy.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/SyncOperationLocationPollingStrategy.java new file mode 100644 index 000000000000..44c413508e02 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/SyncOperationLocationPollingStrategy.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.clinicalmatching.implementation; + +import com.azure.core.exception.AzureException; +import com.azure.core.http.HttpHeader; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.PollingContext; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncOperationResourcePollingStrategy; +import com.azure.core.util.serializer.JsonSerializerProviders; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.core.util.serializer.TypeReference; +import java.io.UncheckedIOException; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Map; + +// DO NOT modify this helper class + +/** + * Implements a synchronous operation location polling strategy, from Operation-Location. + * + * @param the type of the response type from a polling call, or BinaryData if raw response body should be kept + * @param the type of the final result object to deserialize into, or BinaryData if raw response body should be + * kept + */ +public final class SyncOperationLocationPollingStrategy extends SyncOperationResourcePollingStrategy { + + private static final ClientLogger LOGGER = new ClientLogger(SyncOperationLocationPollingStrategy.class); + + private final ObjectSerializer serializer; + private final String endpoint; + private final String propertyName; + + /** + * Creates an instance of the operation resource polling strategy. + * + * @param pollingStrategyOptions options to configure this polling strategy. + * @throws NullPointerException if {@code pollingStrategyOptions} is null. + */ + public SyncOperationLocationPollingStrategy(PollingStrategyOptions pollingStrategyOptions) { + this(pollingStrategyOptions, null); + } + + /** + * Creates an instance of the operation resource polling strategy. + * + * @param pollingStrategyOptions options to configure this polling strategy. + * @param propertyName the name of the property to extract final result. + * @throws NullPointerException if {@code pollingStrategyOptions} is null. + */ + public SyncOperationLocationPollingStrategy(PollingStrategyOptions pollingStrategyOptions, String propertyName) { + super(PollingUtils.OPERATION_LOCATION_HEADER, pollingStrategyOptions); + this.propertyName = propertyName; + this.endpoint = pollingStrategyOptions.getEndpoint(); + this.serializer = pollingStrategyOptions.getSerializer() != null + ? pollingStrategyOptions.getSerializer() + : JsonSerializerProviders.createInstance(true); + } + + /** + * {@inheritDoc} + */ + @Override + public PollResponse onInitialResponse(Response response, PollingContext pollingContext, + TypeReference pollResponseType) { + // Response is Response + + HttpHeader operationLocationHeader = response.getHeaders().get(PollingUtils.OPERATION_LOCATION_HEADER); + if (operationLocationHeader != null) { + pollingContext.setData(PollingUtils.OPERATION_LOCATION_HEADER.getCaseSensitiveName(), + PollingUtils.getAbsolutePath(operationLocationHeader.getValue(), endpoint, LOGGER)); + } + final String httpMethod = response.getRequest().getHttpMethod().name(); + pollingContext.setData(PollingUtils.HTTP_METHOD, httpMethod); + pollingContext.setData(PollingUtils.REQUEST_URL, response.getRequest().getUrl().toString()); + + if (response.getStatusCode() == 200 + || response.getStatusCode() == 201 + || response.getStatusCode() == 202 + || response.getStatusCode() == 204) { + final Duration retryAfter + = PollingUtils.getRetryAfterFromHeaders(response.getHeaders(), OffsetDateTime::now); + T initialResponseType = null; + try { + initialResponseType = PollingUtils.deserializeResponseSync((BinaryData) response.getValue(), serializer, + pollResponseType); + } catch (UncheckedIOException e) { + LOGGER.info("Failed to parse initial response."); + } + return new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, initialResponseType, retryAfter); + } + + throw LOGGER.logExceptionAsError(new AzureException( + String.format("Operation failed or cancelled with status code %d, '%s' header: %s, and response body: %s", + response.getStatusCode(), PollingUtils.OPERATION_LOCATION_HEADER, operationLocationHeader, + response.getValue()))); + } + + /** + * {@inheritDoc} + */ + public U getResult(PollingContext pollingContext, TypeReference resultType) { + if (pollingContext.getLatestResponse().getStatus() == LongRunningOperationStatus.FAILED) { + throw LOGGER.logExceptionAsError(new AzureException("Long running operation failed.")); + } else if (pollingContext.getLatestResponse().getStatus() == LongRunningOperationStatus.USER_CANCELLED) { + throw LOGGER.logExceptionAsError(new AzureException("Long running operation cancelled.")); + } + if (propertyName != null) { + // take the last poll response body from PollingContext, + // and de-serialize the property as final result + BinaryData latestResponseBody + = BinaryData.fromString(pollingContext.getData(PollingUtils.POLL_RESPONSE_BODY)); + Map pollResult = PollingUtils.deserializeResponseSync(latestResponseBody, serializer, + PollingUtils.POST_POLL_RESULT_TYPE_REFERENCE); + if (pollResult != null && pollResult.get(propertyName) != null) { + return PollingUtils.deserializeResponseSync(BinaryData.fromObject(pollResult.get(propertyName)), + serializer, resultType); + } else { + throw LOGGER.logExceptionAsError(new AzureException("Cannot get final result")); + } + } else { + return super.getResult(pollingContext, resultType); + } + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/package-info.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/package-info.java new file mode 100644 index 000000000000..2671271ec70b --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the implementations for AzureHealthInsights. + * Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that + * perform analysis and provide inferences to be used by a human. + * + */ +package com.azure.health.insights.clinicalmatching.implementation; diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AcceptedAge.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AcceptedAge.java new file mode 100644 index 000000000000..8474c1ef3fa4 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AcceptedAge.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A person's age, given as a number (value) and a unit (e.g. years, months). + */ +@Immutable +public final class AcceptedAge implements JsonSerializable { + + /* + * Possible units for a person's age. + */ + @Generated + private final AgeUnit unit; + + /* + * The number of years/months/days that represents the person's age. + */ + @Generated + private final double value; + + /** + * Creates an instance of AcceptedAge class. + * + * @param unit the unit value to set. + * @param value the value value to set. + */ + @Generated + public AcceptedAge(AgeUnit unit, double value) { + this.unit = unit; + this.value = value; + } + + /** + * Get the unit property: Possible units for a person's age. + * + * @return the unit value. + */ + @Generated + public AgeUnit getUnit() { + return this.unit; + } + + /** + * Get the value property: The number of years/months/days that represents the person's age. + * + * @return the value value. + */ + @Generated + public double getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString()); + jsonWriter.writeDoubleField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AcceptedAge from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AcceptedAge if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AcceptedAge. + */ + @Generated + public static AcceptedAge fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgeUnit unit = null; + double value = 0.0; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("unit".equals(fieldName)) { + unit = AgeUnit.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + value = reader.getDouble(); + } else { + reader.skipChildren(); + } + } + return new AcceptedAge(unit, value); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AcceptedAgeRange.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AcceptedAgeRange.java new file mode 100644 index 000000000000..97ab9d19b88b --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AcceptedAgeRange.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age. + */ +@Fluent +public final class AcceptedAgeRange implements JsonSerializable { + + /* + * A person's age, given as a number (value) and a unit (e.g. years, months) + */ + @Generated + private AcceptedAge minimumAge; + + /* + * A person's age, given as a number (value) and a unit (e.g. years, months) + */ + @Generated + private AcceptedAge maximumAge; + + /** + * Creates an instance of AcceptedAgeRange class. + */ + @Generated + public AcceptedAgeRange() { + } + + /** + * Get the minimumAge property: A person's age, given as a number (value) and a unit (e.g. years, months). + * + * @return the minimumAge value. + */ + @Generated + public AcceptedAge getMinimumAge() { + return this.minimumAge; + } + + /** + * Set the minimumAge property: A person's age, given as a number (value) and a unit (e.g. years, months). + * + * @param minimumAge the minimumAge value to set. + * @return the AcceptedAgeRange object itself. + */ + @Generated + public AcceptedAgeRange setMinimumAge(AcceptedAge minimumAge) { + this.minimumAge = minimumAge; + return this; + } + + /** + * Get the maximumAge property: A person's age, given as a number (value) and a unit (e.g. years, months). + * + * @return the maximumAge value. + */ + @Generated + public AcceptedAge getMaximumAge() { + return this.maximumAge; + } + + /** + * Set the maximumAge property: A person's age, given as a number (value) and a unit (e.g. years, months). + * + * @param maximumAge the maximumAge value to set. + * @return the AcceptedAgeRange object itself. + */ + @Generated + public AcceptedAgeRange setMaximumAge(AcceptedAge maximumAge) { + this.maximumAge = maximumAge; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("minimumAge", this.minimumAge); + jsonWriter.writeJsonField("maximumAge", this.maximumAge); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AcceptedAgeRange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AcceptedAgeRange if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AcceptedAgeRange. + */ + @Generated + public static AcceptedAgeRange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AcceptedAgeRange deserializedAcceptedAgeRange = new AcceptedAgeRange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("minimumAge".equals(fieldName)) { + deserializedAcceptedAgeRange.minimumAge = AcceptedAge.fromJson(reader); + } else if ("maximumAge".equals(fieldName)) { + deserializedAcceptedAgeRange.maximumAge = AcceptedAge.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedAcceptedAgeRange; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AgeUnit.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AgeUnit.java new file mode 100644 index 000000000000..f6618aefb9ce --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AgeUnit.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Possible units for a person's age. + */ +public final class AgeUnit extends ExpandableStringEnum { + + /** + * Static value years for AgeUnit. + */ + @Generated + public static final AgeUnit YEARS = fromString("years"); + + /** + * Static value months for AgeUnit. + */ + @Generated + public static final AgeUnit MONTHS = fromString("months"); + + /** + * Static value days for AgeUnit. + */ + @Generated + public static final AgeUnit DAYS = fromString("days"); + + /** + * Creates a new instance of AgeUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public AgeUnit() { + } + + /** + * Creates or finds a AgeUnit from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgeUnit. + */ + @Generated + public static AgeUnit fromString(String name) { + return fromString(name, AgeUnit.class); + } + + /** + * Gets known AgeUnit values. + * + * @return known AgeUnit values. + */ + @Generated + public static Collection values() { + return values(AgeUnit.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AreaGeometry.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AreaGeometry.java new file mode 100644 index 000000000000..a33dc7666ebb --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AreaGeometry.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * `GeoJSON` geometry, representing the area circle's center. + */ +@Immutable +public final class AreaGeometry implements JsonSerializable { + + /* + * `GeoJSON` geometry type. + */ + @Generated + private final GeoJsonGeometryType type; + + /* + * Coordinates of the area circle's center, represented according to the `GeoJSON` standard. + * This is an array of 2 decimal numbers, longitude and latitude (precisely in this order). + */ + @Generated + private final List coordinates; + + /** + * Creates an instance of AreaGeometry class. + * + * @param type the type value to set. + * @param coordinates the coordinates value to set. + */ + @Generated + public AreaGeometry(GeoJsonGeometryType type, List coordinates) { + this.type = type; + this.coordinates = coordinates; + } + + /** + * Get the type property: `GeoJSON` geometry type. + * + * @return the type value. + */ + @Generated + public GeoJsonGeometryType getType() { + return this.type; + } + + /** + * Get the coordinates property: Coordinates of the area circle's center, represented according to the `GeoJSON` + * standard. + * This is an array of 2 decimal numbers, longitude and latitude (precisely in this order). + * + * @return the coordinates value. + */ + @Generated + public List getCoordinates() { + return this.coordinates; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeArrayField("coordinates", this.coordinates, (writer, element) -> writer.writeDouble(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AreaGeometry from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AreaGeometry if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AreaGeometry. + */ + @Generated + public static AreaGeometry fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GeoJsonGeometryType type = null; + List coordinates = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("type".equals(fieldName)) { + type = GeoJsonGeometryType.fromString(reader.getString()); + } else if ("coordinates".equals(fieldName)) { + coordinates = reader.readArray(reader1 -> reader1.getDouble()); + } else { + reader.skipChildren(); + } + } + return new AreaGeometry(type, coordinates); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AreaProperties.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AreaProperties.java new file mode 100644 index 000000000000..b2e8ee0d0084 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/AreaProperties.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * `GeoJSON` object properties. + */ +@Immutable +public final class AreaProperties implements JsonSerializable { + + /* + * `GeoJSON` object sub-type. + */ + @Generated + private final GeoJsonPropertiesSubType subType; + + /* + * The radius of the area's circle, in meters. + */ + @Generated + private final double radius; + + /** + * Creates an instance of AreaProperties class. + * + * @param subType the subType value to set. + * @param radius the radius value to set. + */ + @Generated + public AreaProperties(GeoJsonPropertiesSubType subType, double radius) { + this.subType = subType; + this.radius = radius; + } + + /** + * Get the subType property: `GeoJSON` object sub-type. + * + * @return the subType value. + */ + @Generated + public GeoJsonPropertiesSubType getSubType() { + return this.subType; + } + + /** + * Get the radius property: The radius of the area's circle, in meters. + * + * @return the radius value. + */ + @Generated + public double getRadius() { + return this.radius; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("subType", this.subType == null ? null : this.subType.toString()); + jsonWriter.writeDoubleField("radius", this.radius); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AreaProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AreaProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AreaProperties. + */ + @Generated + public static AreaProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GeoJsonPropertiesSubType subType = null; + double radius = 0.0; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("subType".equals(fieldName)) { + subType = GeoJsonPropertiesSubType.fromString(reader.getString()); + } else if ("radius".equals(fieldName)) { + radius = reader.getDouble(); + } else { + reader.skipChildren(); + } + } + return new AreaProperties(subType, radius); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalCodedElement.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalCodedElement.java new file mode 100644 index 000000000000..0048af6dc3aa --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalCodedElement.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A piece of clinical information, expressed as a code in a clinical coding system. + */ +@Fluent +public final class ClinicalCodedElement implements JsonSerializable { + + /* + * The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. + */ + @Generated + private final String system; + + /* + * The code within the given clinical coding system. + */ + @Generated + private final String code; + + /* + * The name of this coded concept in the coding system. + */ + @Generated + private String name; + + /* + * A value associated with the code within the given clinical coding system. + */ + @Generated + private String value; + + /** + * Creates an instance of ClinicalCodedElement class. + * + * @param system the system value to set. + * @param code the code value to set. + */ + @Generated + public ClinicalCodedElement(String system, String code) { + this.system = system; + this.code = code; + } + + /** + * Get the system property: The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. + * + * @return the system value. + */ + @Generated + public String getSystem() { + return this.system; + } + + /** + * Get the code property: The code within the given clinical coding system. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Get the name property: The name of this coded concept in the coding system. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name of this coded concept in the coding system. + * + * @param name the name value to set. + * @return the ClinicalCodedElement object itself. + */ + @Generated + public ClinicalCodedElement setName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: A value associated with the code within the given clinical coding system. + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * Set the value property: A value associated with the code within the given clinical coding system. + * + * @param value the value value to set. + * @return the ClinicalCodedElement object itself. + */ + @Generated + public ClinicalCodedElement setValue(String value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("system", this.system); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalCodedElement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalCodedElement if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ClinicalCodedElement. + */ + @Generated + public static ClinicalCodedElement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String system = null; + String code = null; + String name = null; + String value = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("system".equals(fieldName)) { + system = reader.getString(); + } else if ("code".equals(fieldName)) { + code = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("value".equals(fieldName)) { + value = reader.getString(); + } else { + reader.skipChildren(); + } + } + ClinicalCodedElement deserializedClinicalCodedElement = new ClinicalCodedElement(system, code); + deserializedClinicalCodedElement.name = name; + deserializedClinicalCodedElement.value = value; + return deserializedClinicalCodedElement; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalDocumentType.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalDocumentType.java new file mode 100644 index 000000000000..5a2e7b7cac81 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalDocumentType.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the clinical document. + */ +public final class ClinicalDocumentType extends ExpandableStringEnum { + + /** + * Static value consultation for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType CONSULTATION = fromString("consultation"); + + /** + * Static value dischargeSummary for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType DISCHARGE_SUMMARY = fromString("dischargeSummary"); + + /** + * Static value historyAndPhysical for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType HISTORY_AND_PHYSICAL = fromString("historyAndPhysical"); + + /** + * Static value procedure for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType PROCEDURE = fromString("procedure"); + + /** + * Static value progress for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType PROGRESS = fromString("progress"); + + /** + * Static value imaging for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType IMAGING = fromString("imaging"); + + /** + * Static value laboratory for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType LABORATORY = fromString("laboratory"); + + /** + * Static value pathology for ClinicalDocumentType. + */ + @Generated + public static final ClinicalDocumentType PATHOLOGY = fromString("pathology"); + + /** + * Creates a new instance of ClinicalDocumentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ClinicalDocumentType() { + } + + /** + * Creates or finds a ClinicalDocumentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClinicalDocumentType. + */ + @Generated + public static ClinicalDocumentType fromString(String name) { + return fromString(name, ClinicalDocumentType.class); + } + + /** + * Gets known ClinicalDocumentType values. + * + * @return known ClinicalDocumentType values. + */ + @Generated + public static Collection values() { + return values(ClinicalDocumentType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalNoteEvidence.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalNoteEvidence.java new file mode 100644 index 000000000000..37b33bfba251 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalNoteEvidence.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A piece of evidence from a clinical note (text document). + */ +@Immutable +public final class ClinicalNoteEvidence implements JsonSerializable { + + /* + * The identifier of the document containing the evidence. + */ + @Generated + private final String id; + + /* + * The actual text span which is evidence for the inference. + */ + @Generated + private String text; + + /* + * The start index of the evidence text span in the document (0 based). + */ + @Generated + private final int offset; + + /* + * The length of the evidence text span. + */ + @Generated + private final int length; + + /** + * Creates an instance of ClinicalNoteEvidence class. + * + * @param id the id value to set. + * @param offset the offset value to set. + * @param length the length value to set. + */ + @Generated + private ClinicalNoteEvidence(String id, int offset, int length) { + this.id = id; + this.offset = offset; + this.length = length; + } + + /** + * Get the id property: The identifier of the document containing the evidence. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the text property: The actual text span which is evidence for the inference. + * + * @return the text value. + */ + @Generated + public String getText() { + return this.text; + } + + /** + * Get the offset property: The start index of the evidence text span in the document (0 based). + * + * @return the offset value. + */ + @Generated + public int getOffset() { + return this.offset; + } + + /** + * Get the length property: The length of the evidence text span. + * + * @return the length value. + */ + @Generated + public int getLength() { + return this.length; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeIntField("offset", this.offset); + jsonWriter.writeIntField("length", this.length); + jsonWriter.writeStringField("text", this.text); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalNoteEvidence from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalNoteEvidence if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ClinicalNoteEvidence. + */ + @Generated + public static ClinicalNoteEvidence fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + int offset = 0; + int length = 0; + String text = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("offset".equals(fieldName)) { + offset = reader.getInt(); + } else if ("length".equals(fieldName)) { + length = reader.getInt(); + } else if ("text".equals(fieldName)) { + text = reader.getString(); + } else { + reader.skipChildren(); + } + } + ClinicalNoteEvidence deserializedClinicalNoteEvidence = new ClinicalNoteEvidence(id, offset, length); + deserializedClinicalNoteEvidence.text = text; + return deserializedClinicalNoteEvidence; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialAcceptedSex.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialAcceptedSex.java new file mode 100644 index 000000000000..c3fc55056d37 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialAcceptedSex.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Possible values for the Sex eligibility criterion as accepted by clinical trials, which indicates the sex of people + * who may participate in a clinical study. + */ +public final class ClinicalTrialAcceptedSex extends ExpandableStringEnum { + + /** + * Static value all for ClinicalTrialAcceptedSex. + */ + @Generated + public static final ClinicalTrialAcceptedSex ALL = fromString("all"); + + /** + * Static value female for ClinicalTrialAcceptedSex. + */ + @Generated + public static final ClinicalTrialAcceptedSex FEMALE = fromString("female"); + + /** + * Static value male for ClinicalTrialAcceptedSex. + */ + @Generated + public static final ClinicalTrialAcceptedSex MALE = fromString("male"); + + /** + * Creates a new instance of ClinicalTrialAcceptedSex value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ClinicalTrialAcceptedSex() { + } + + /** + * Creates or finds a ClinicalTrialAcceptedSex from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClinicalTrialAcceptedSex. + */ + @Generated + public static ClinicalTrialAcceptedSex fromString(String name) { + return fromString(name, ClinicalTrialAcceptedSex.class); + } + + /** + * Gets known ClinicalTrialAcceptedSex values. + * + * @return known ClinicalTrialAcceptedSex values. + */ + @Generated + public static Collection values() { + return values(ClinicalTrialAcceptedSex.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialDemographics.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialDemographics.java new file mode 100644 index 000000000000..9c2747f8f8a6 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialDemographics.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Demographic criteria for a clinical trial. + */ +@Fluent +public final class ClinicalTrialDemographics implements JsonSerializable { + + /* + * Indication of the sex of people who may participate in the clinical trial. + */ + @Generated + private ClinicalTrialAcceptedSex acceptedSex; + + /* + * A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age. + */ + @Generated + private AcceptedAgeRange acceptedAgeRange; + + /** + * Creates an instance of ClinicalTrialDemographics class. + */ + @Generated + public ClinicalTrialDemographics() { + } + + /** + * Get the acceptedSex property: Indication of the sex of people who may participate in the clinical trial. + * + * @return the acceptedSex value. + */ + @Generated + public ClinicalTrialAcceptedSex getAcceptedSex() { + return this.acceptedSex; + } + + /** + * Set the acceptedSex property: Indication of the sex of people who may participate in the clinical trial. + * + * @param acceptedSex the acceptedSex value to set. + * @return the ClinicalTrialDemographics object itself. + */ + @Generated + public ClinicalTrialDemographics setAcceptedSex(ClinicalTrialAcceptedSex acceptedSex) { + this.acceptedSex = acceptedSex; + return this; + } + + /** + * Get the acceptedAgeRange property: A definition of the range of ages accepted by a clinical trial. Contains a + * minimum age and/or a maximum age. + * + * @return the acceptedAgeRange value. + */ + @Generated + public AcceptedAgeRange getAcceptedAgeRange() { + return this.acceptedAgeRange; + } + + /** + * Set the acceptedAgeRange property: A definition of the range of ages accepted by a clinical trial. Contains a + * minimum age and/or a maximum age. + * + * @param acceptedAgeRange the acceptedAgeRange value to set. + * @return the ClinicalTrialDemographics object itself. + */ + @Generated + public ClinicalTrialDemographics setAcceptedAgeRange(AcceptedAgeRange acceptedAgeRange) { + this.acceptedAgeRange = acceptedAgeRange; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("acceptedSex", this.acceptedSex == null ? null : this.acceptedSex.toString()); + jsonWriter.writeJsonField("acceptedAgeRange", this.acceptedAgeRange); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalTrialDemographics from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalTrialDemographics if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ClinicalTrialDemographics. + */ + @Generated + public static ClinicalTrialDemographics fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClinicalTrialDemographics deserializedClinicalTrialDemographics = new ClinicalTrialDemographics(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("acceptedSex".equals(fieldName)) { + deserializedClinicalTrialDemographics.acceptedSex + = ClinicalTrialAcceptedSex.fromString(reader.getString()); + } else if ("acceptedAgeRange".equals(fieldName)) { + deserializedClinicalTrialDemographics.acceptedAgeRange = AcceptedAgeRange.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedClinicalTrialDemographics; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialDetails.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialDetails.java new file mode 100644 index 000000000000..5526be3b4efd --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialDetails.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A description of a clinical trial. + */ +@Fluent +public final class ClinicalTrialDetails implements JsonSerializable { + + /* + * A given identifier for the clinical trial. Has to be unique within a list of clinical trials. + */ + @Generated + private final String id; + + /* + * The eligibility criteria of the clinical trial (inclusion and exclusion), given as text. + */ + @Generated + private String eligibilityCriteriaText; + + /* + * Demographic criteria for a clinical trial. + */ + @Generated + private ClinicalTrialDemographics demographics; + + /* + * Trial data which is of interest to the potential participant. + */ + @Generated + private final ClinicalTrialMetadata metadata; + + /** + * Creates an instance of ClinicalTrialDetails class. + * + * @param id the id value to set. + * @param metadata the metadata value to set. + */ + @Generated + public ClinicalTrialDetails(String id, ClinicalTrialMetadata metadata) { + this.id = id; + this.metadata = metadata; + } + + /** + * Get the id property: A given identifier for the clinical trial. Has to be unique within a list of clinical + * trials. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the eligibilityCriteriaText property: The eligibility criteria of the clinical trial (inclusion and + * exclusion), given as text. + * + * @return the eligibilityCriteriaText value. + */ + @Generated + public String getEligibilityCriteriaText() { + return this.eligibilityCriteriaText; + } + + /** + * Set the eligibilityCriteriaText property: The eligibility criteria of the clinical trial (inclusion and + * exclusion), given as text. + * + * @param eligibilityCriteriaText the eligibilityCriteriaText value to set. + * @return the ClinicalTrialDetails object itself. + */ + @Generated + public ClinicalTrialDetails setEligibilityCriteriaText(String eligibilityCriteriaText) { + this.eligibilityCriteriaText = eligibilityCriteriaText; + return this; + } + + /** + * Get the demographics property: Demographic criteria for a clinical trial. + * + * @return the demographics value. + */ + @Generated + public ClinicalTrialDemographics getDemographics() { + return this.demographics; + } + + /** + * Set the demographics property: Demographic criteria for a clinical trial. + * + * @param demographics the demographics value to set. + * @return the ClinicalTrialDetails object itself. + */ + @Generated + public ClinicalTrialDetails setDemographics(ClinicalTrialDemographics demographics) { + this.demographics = demographics; + return this; + } + + /** + * Get the metadata property: Trial data which is of interest to the potential participant. + * + * @return the metadata value. + */ + @Generated + public ClinicalTrialMetadata getMetadata() { + return this.metadata; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeJsonField("metadata", this.metadata); + jsonWriter.writeStringField("eligibilityCriteriaText", this.eligibilityCriteriaText); + jsonWriter.writeJsonField("demographics", this.demographics); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalTrialDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalTrialDetails if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ClinicalTrialDetails. + */ + @Generated + public static ClinicalTrialDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + ClinicalTrialMetadata metadata = null; + String eligibilityCriteriaText = null; + ClinicalTrialDemographics demographics = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("metadata".equals(fieldName)) { + metadata = ClinicalTrialMetadata.fromJson(reader); + } else if ("eligibilityCriteriaText".equals(fieldName)) { + eligibilityCriteriaText = reader.getString(); + } else if ("demographics".equals(fieldName)) { + demographics = ClinicalTrialDemographics.fromJson(reader); + } else { + reader.skipChildren(); + } + } + ClinicalTrialDetails deserializedClinicalTrialDetails = new ClinicalTrialDetails(id, metadata); + deserializedClinicalTrialDetails.eligibilityCriteriaText = eligibilityCriteriaText; + deserializedClinicalTrialDetails.demographics = demographics; + return deserializedClinicalTrialDetails; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialMetadata.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialMetadata.java new file mode 100644 index 000000000000..86665704f9db --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialMetadata.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Trial data which is of interest to the potential participant. + */ +@Fluent +public final class ClinicalTrialMetadata implements JsonSerializable { + + /* + * Phases which are relevant for the clinical trial. + * Each clinical trial can be in a certain phase or in multiple phases. + */ + @Generated + private List phases; + + /* + * Possible study types of a clinical trial. + */ + @Generated + private ClinicalTrialStudyType studyType; + + /* + * Possible recruitment status of a clinical trial. + */ + @Generated + private ClinicalTrialRecruitmentStatus recruitmentStatus; + + /* + * Medical conditions and their synonyms which are relevant for the clinical trial, given as strings. + */ + @Generated + private final List conditions; + + /* + * Sponsors/collaborators involved with the trial. + */ + @Generated + private List sponsors; + + /* + * Contact details of the trial administrators, for patients that want to participate in the trial. + */ + @Generated + private List contacts; + + /* + * Research facilities where the clinical trial is conducted. + */ + @Generated + private List facilities; + + /** + * Creates an instance of ClinicalTrialMetadata class. + * + * @param conditions the conditions value to set. + */ + @Generated + public ClinicalTrialMetadata(List conditions) { + this.conditions = conditions; + } + + /** + * Get the phases property: Phases which are relevant for the clinical trial. + * Each clinical trial can be in a certain phase or in multiple phases. + * + * @return the phases value. + */ + @Generated + public List getPhases() { + return this.phases; + } + + /** + * Set the phases property: Phases which are relevant for the clinical trial. + * Each clinical trial can be in a certain phase or in multiple phases. + * + * @param phases the phases value to set. + * @return the ClinicalTrialMetadata object itself. + */ + @Generated + public ClinicalTrialMetadata setPhases(List phases) { + this.phases = phases; + return this; + } + + /** + * Get the studyType property: Possible study types of a clinical trial. + * + * @return the studyType value. + */ + @Generated + public ClinicalTrialStudyType getStudyType() { + return this.studyType; + } + + /** + * Set the studyType property: Possible study types of a clinical trial. + * + * @param studyType the studyType value to set. + * @return the ClinicalTrialMetadata object itself. + */ + @Generated + public ClinicalTrialMetadata setStudyType(ClinicalTrialStudyType studyType) { + this.studyType = studyType; + return this; + } + + /** + * Get the recruitmentStatus property: Possible recruitment status of a clinical trial. + * + * @return the recruitmentStatus value. + */ + @Generated + public ClinicalTrialRecruitmentStatus getRecruitmentStatus() { + return this.recruitmentStatus; + } + + /** + * Set the recruitmentStatus property: Possible recruitment status of a clinical trial. + * + * @param recruitmentStatus the recruitmentStatus value to set. + * @return the ClinicalTrialMetadata object itself. + */ + @Generated + public ClinicalTrialMetadata setRecruitmentStatus(ClinicalTrialRecruitmentStatus recruitmentStatus) { + this.recruitmentStatus = recruitmentStatus; + return this; + } + + /** + * Get the conditions property: Medical conditions and their synonyms which are relevant for the clinical trial, + * given as strings. + * + * @return the conditions value. + */ + @Generated + public List getConditions() { + return this.conditions; + } + + /** + * Get the sponsors property: Sponsors/collaborators involved with the trial. + * + * @return the sponsors value. + */ + @Generated + public List getSponsors() { + return this.sponsors; + } + + /** + * Set the sponsors property: Sponsors/collaborators involved with the trial. + * + * @param sponsors the sponsors value to set. + * @return the ClinicalTrialMetadata object itself. + */ + @Generated + public ClinicalTrialMetadata setSponsors(List sponsors) { + this.sponsors = sponsors; + return this; + } + + /** + * Get the contacts property: Contact details of the trial administrators, for patients that want to participate in + * the trial. + * + * @return the contacts value. + */ + @Generated + public List getContacts() { + return this.contacts; + } + + /** + * Set the contacts property: Contact details of the trial administrators, for patients that want to participate in + * the trial. + * + * @param contacts the contacts value to set. + * @return the ClinicalTrialMetadata object itself. + */ + @Generated + public ClinicalTrialMetadata setContacts(List contacts) { + this.contacts = contacts; + return this; + } + + /** + * Get the facilities property: Research facilities where the clinical trial is conducted. + * + * @return the facilities value. + */ + @Generated + public List getFacilities() { + return this.facilities; + } + + /** + * Set the facilities property: Research facilities where the clinical trial is conducted. + * + * @param facilities the facilities value to set. + * @return the ClinicalTrialMetadata object itself. + */ + @Generated + public ClinicalTrialMetadata setFacilities(List facilities) { + this.facilities = facilities; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("conditions", this.conditions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("phases", this.phases, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("studyType", this.studyType == null ? null : this.studyType.toString()); + jsonWriter.writeStringField("recruitmentStatus", + this.recruitmentStatus == null ? null : this.recruitmentStatus.toString()); + jsonWriter.writeArrayField("sponsors", this.sponsors, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("contacts", this.contacts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("facilities", this.facilities, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalTrialMetadata from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalTrialMetadata if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ClinicalTrialMetadata. + */ + @Generated + public static ClinicalTrialMetadata fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List conditions = null; + List phases = null; + ClinicalTrialStudyType studyType = null; + ClinicalTrialRecruitmentStatus recruitmentStatus = null; + List sponsors = null; + List contacts = null; + List facilities = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("conditions".equals(fieldName)) { + conditions = reader.readArray(reader1 -> reader1.getString()); + } else if ("phases".equals(fieldName)) { + phases = reader.readArray(reader1 -> ClinicalTrialPhase.fromString(reader1.getString())); + } else if ("studyType".equals(fieldName)) { + studyType = ClinicalTrialStudyType.fromString(reader.getString()); + } else if ("recruitmentStatus".equals(fieldName)) { + recruitmentStatus = ClinicalTrialRecruitmentStatus.fromString(reader.getString()); + } else if ("sponsors".equals(fieldName)) { + sponsors = reader.readArray(reader1 -> reader1.getString()); + } else if ("contacts".equals(fieldName)) { + contacts = reader.readArray(reader1 -> ContactDetails.fromJson(reader1)); + } else if ("facilities".equals(fieldName)) { + facilities = reader.readArray(reader1 -> ClinicalTrialResearchFacility.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + ClinicalTrialMetadata deserializedClinicalTrialMetadata = new ClinicalTrialMetadata(conditions); + deserializedClinicalTrialMetadata.phases = phases; + deserializedClinicalTrialMetadata.studyType = studyType; + deserializedClinicalTrialMetadata.recruitmentStatus = recruitmentStatus; + deserializedClinicalTrialMetadata.sponsors = sponsors; + deserializedClinicalTrialMetadata.contacts = contacts; + deserializedClinicalTrialMetadata.facilities = facilities; + return deserializedClinicalTrialMetadata; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialPhase.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialPhase.java new file mode 100644 index 000000000000..e383230117b4 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialPhase.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Possible phases of a clinical trial. + */ +public final class ClinicalTrialPhase extends ExpandableStringEnum { + + /** + * Static value notApplicable for ClinicalTrialPhase. + */ + @Generated + public static final ClinicalTrialPhase NOT_APPLICABLE = fromString("notApplicable"); + + /** + * Static value earlyPhase1 for ClinicalTrialPhase. + */ + @Generated + public static final ClinicalTrialPhase EARLY_PHASE1 = fromString("earlyPhase1"); + + /** + * Static value phase1 for ClinicalTrialPhase. + */ + @Generated + public static final ClinicalTrialPhase PHASE1 = fromString("phase1"); + + /** + * Static value phase2 for ClinicalTrialPhase. + */ + @Generated + public static final ClinicalTrialPhase PHASE2 = fromString("phase2"); + + /** + * Static value phase3 for ClinicalTrialPhase. + */ + @Generated + public static final ClinicalTrialPhase PHASE3 = fromString("phase3"); + + /** + * Static value phase4 for ClinicalTrialPhase. + */ + @Generated + public static final ClinicalTrialPhase PHASE4 = fromString("phase4"); + + /** + * Creates a new instance of ClinicalTrialPhase value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ClinicalTrialPhase() { + } + + /** + * Creates or finds a ClinicalTrialPhase from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClinicalTrialPhase. + */ + @Generated + public static ClinicalTrialPhase fromString(String name) { + return fromString(name, ClinicalTrialPhase.class); + } + + /** + * Gets known ClinicalTrialPhase values. + * + * @return known ClinicalTrialPhase values. + */ + @Generated + public static Collection values() { + return values(ClinicalTrialPhase.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialPurpose.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialPurpose.java new file mode 100644 index 000000000000..612c5401d83d --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialPurpose.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Possible purposes of a clinical trial. + */ +public final class ClinicalTrialPurpose extends ExpandableStringEnum { + + /** + * Static value notApplicable for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose NOT_APPLICABLE = fromString("notApplicable"); + + /** + * Static value screening for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose SCREENING = fromString("screening"); + + /** + * Static value diagnostic for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose DIAGNOSTIC = fromString("diagnostic"); + + /** + * Static value prevention for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose PREVENTION = fromString("prevention"); + + /** + * Static value healthServicesResearch for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose HEALTH_SERVICES_RESEARCH = fromString("healthServicesResearch"); + + /** + * Static value treatment for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose TREATMENT = fromString("treatment"); + + /** + * Static value deviceFeasibility for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose DEVICE_FEASIBILITY = fromString("deviceFeasibility"); + + /** + * Static value supportiveCare for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose SUPPORTIVE_CARE = fromString("supportiveCare"); + + /** + * Static value basicScience for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose BASIC_SCIENCE = fromString("basicScience"); + + /** + * Static value other for ClinicalTrialPurpose. + */ + @Generated + public static final ClinicalTrialPurpose OTHER = fromString("other"); + + /** + * Creates a new instance of ClinicalTrialPurpose value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ClinicalTrialPurpose() { + } + + /** + * Creates or finds a ClinicalTrialPurpose from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClinicalTrialPurpose. + */ + @Generated + public static ClinicalTrialPurpose fromString(String name) { + return fromString(name, ClinicalTrialPurpose.class); + } + + /** + * Gets known ClinicalTrialPurpose values. + * + * @return known ClinicalTrialPurpose values. + */ + @Generated + public static Collection values() { + return values(ClinicalTrialPurpose.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialRecruitmentStatus.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialRecruitmentStatus.java new file mode 100644 index 000000000000..3609266db758 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialRecruitmentStatus.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Possible recruitment status of a clinical trial. + */ +public final class ClinicalTrialRecruitmentStatus extends ExpandableStringEnum { + + /** + * Static value unknownStatus for ClinicalTrialRecruitmentStatus. + */ + @Generated + public static final ClinicalTrialRecruitmentStatus UNKNOWN_STATUS = fromString("unknownStatus"); + + /** + * Static value notYetRecruiting for ClinicalTrialRecruitmentStatus. + */ + @Generated + public static final ClinicalTrialRecruitmentStatus NOT_YET_RECRUITING = fromString("notYetRecruiting"); + + /** + * Static value recruiting for ClinicalTrialRecruitmentStatus. + */ + @Generated + public static final ClinicalTrialRecruitmentStatus RECRUITING = fromString("recruiting"); + + /** + * Static value enrollingByInvitation for ClinicalTrialRecruitmentStatus. + */ + @Generated + public static final ClinicalTrialRecruitmentStatus ENROLLING_BY_INVITATION = fromString("enrollingByInvitation"); + + /** + * Creates a new instance of ClinicalTrialRecruitmentStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ClinicalTrialRecruitmentStatus() { + } + + /** + * Creates or finds a ClinicalTrialRecruitmentStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClinicalTrialRecruitmentStatus. + */ + @Generated + public static ClinicalTrialRecruitmentStatus fromString(String name) { + return fromString(name, ClinicalTrialRecruitmentStatus.class); + } + + /** + * Gets known ClinicalTrialRecruitmentStatus values. + * + * @return known ClinicalTrialRecruitmentStatus values. + */ + @Generated + public static Collection values() { + return values(ClinicalTrialRecruitmentStatus.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialRegistryFilter.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialRegistryFilter.java new file mode 100644 index 000000000000..a3b0ff221594 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialRegistryFilter.java @@ -0,0 +1,492 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A filter defining a subset of clinical trials from a given clinical trial registry (e.g. clinicaltrials.gov). + */ +@Fluent +public final class ClinicalTrialRegistryFilter implements JsonSerializable { + + /* + * Trials with any of the given medical conditions will be included in the selection (provided that other + * limitations are satisfied). + * Leaving this list empty will not limit the medical conditions. + */ + @Generated + private List conditions; + + /* + * Trials with any of the given study types will be included in the selection (provided that other limitations are + * satisfied). + * Leaving this list empty will not limit the study types. + */ + @Generated + private List studyTypes; + + /* + * Trials with any of the given recruitment statuses will be included in the selection (provided that other + * limitations are satisfied). + * Leaving this list empty will not limit the recruitment statuses. + */ + @Generated + private List recruitmentStatuses; + + /* + * Trials with any of the given sponsors will be included in the selection (provided that other limitations are + * satisfied). + * Leaving this list empty will not limit the sponsors. + */ + @Generated + private List sponsors; + + /* + * Trials with any of the given phases will be included in the selection (provided that other limitations are + * satisfied). + * Leaving this list empty will not limit the phases. + */ + @Generated + private List phases; + + /* + * Trials with any of the given purposes will be included in the selection (provided that other limitations are + * satisfied). + * Leaving this list empty will not limit the purposes. + */ + @Generated + private List purposes; + + /* + * Trials with any of the given identifiers will be included in the selection (provided that other limitations are + * satisfied). + * Leaving this list empty will not limit the trial identifiers. + */ + @Generated + private List ids; + + /* + * Trials with any of the given sources will be included in the selection (provided that other limitations are + * satisfied). + * Leaving this list empty will not limit the sources. + */ + @Generated + private List sources; + + /* + * Trials with any of the given facility names will be included in the selection (provided that other limitations + * are satisfied). + * Leaving this list empty will not limit the trial facility names. + */ + @Generated + private List facilityNames; + + /* + * Trials with any of the given facility locations will be included in the selection (provided that other + * limitations are satisfied). + * Leaving this list empty will not limit the trial facility locations. + */ + @Generated + private List facilityLocations; + + /* + * Trials with any of the given facility area boundaries will be included in the selection (provided that other + * limitations are satisfied). + * Leaving this list empty will not limit the trial facility area boundaries. + */ + @Generated + private List facilityAreas; + + /** + * Creates an instance of ClinicalTrialRegistryFilter class. + */ + @Generated + public ClinicalTrialRegistryFilter() { + } + + /** + * Get the conditions property: Trials with any of the given medical conditions will be included in the selection + * (provided that other limitations are satisfied). + * Leaving this list empty will not limit the medical conditions. + * + * @return the conditions value. + */ + @Generated + public List getConditions() { + return this.conditions; + } + + /** + * Set the conditions property: Trials with any of the given medical conditions will be included in the selection + * (provided that other limitations are satisfied). + * Leaving this list empty will not limit the medical conditions. + * + * @param conditions the conditions value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setConditions(List conditions) { + this.conditions = conditions; + return this; + } + + /** + * Get the studyTypes property: Trials with any of the given study types will be included in the selection (provided + * that other limitations are satisfied). + * Leaving this list empty will not limit the study types. + * + * @return the studyTypes value. + */ + @Generated + public List getStudyTypes() { + return this.studyTypes; + } + + /** + * Set the studyTypes property: Trials with any of the given study types will be included in the selection (provided + * that other limitations are satisfied). + * Leaving this list empty will not limit the study types. + * + * @param studyTypes the studyTypes value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setStudyTypes(List studyTypes) { + this.studyTypes = studyTypes; + return this; + } + + /** + * Get the recruitmentStatuses property: Trials with any of the given recruitment statuses will be included in the + * selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the recruitment statuses. + * + * @return the recruitmentStatuses value. + */ + @Generated + public List getRecruitmentStatuses() { + return this.recruitmentStatuses; + } + + /** + * Set the recruitmentStatuses property: Trials with any of the given recruitment statuses will be included in the + * selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the recruitment statuses. + * + * @param recruitmentStatuses the recruitmentStatuses value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter + setRecruitmentStatuses(List recruitmentStatuses) { + this.recruitmentStatuses = recruitmentStatuses; + return this; + } + + /** + * Get the sponsors property: Trials with any of the given sponsors will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the sponsors. + * + * @return the sponsors value. + */ + @Generated + public List getSponsors() { + return this.sponsors; + } + + /** + * Set the sponsors property: Trials with any of the given sponsors will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the sponsors. + * + * @param sponsors the sponsors value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setSponsors(List sponsors) { + this.sponsors = sponsors; + return this; + } + + /** + * Get the phases property: Trials with any of the given phases will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the phases. + * + * @return the phases value. + */ + @Generated + public List getPhases() { + return this.phases; + } + + /** + * Set the phases property: Trials with any of the given phases will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the phases. + * + * @param phases the phases value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setPhases(List phases) { + this.phases = phases; + return this; + } + + /** + * Get the purposes property: Trials with any of the given purposes will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the purposes. + * + * @return the purposes value. + */ + @Generated + public List getPurposes() { + return this.purposes; + } + + /** + * Set the purposes property: Trials with any of the given purposes will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the purposes. + * + * @param purposes the purposes value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setPurposes(List purposes) { + this.purposes = purposes; + return this; + } + + /** + * Get the ids property: Trials with any of the given identifiers will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the trial identifiers. + * + * @return the ids value. + */ + @Generated + public List getIds() { + return this.ids; + } + + /** + * Set the ids property: Trials with any of the given identifiers will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the trial identifiers. + * + * @param ids the ids value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setIds(List ids) { + this.ids = ids; + return this; + } + + /** + * Get the sources property: Trials with any of the given sources will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the sources. + * + * @return the sources value. + */ + @Generated + public List getSources() { + return this.sources; + } + + /** + * Set the sources property: Trials with any of the given sources will be included in the selection (provided that + * other limitations are satisfied). + * Leaving this list empty will not limit the sources. + * + * @param sources the sources value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setSources(List sources) { + this.sources = sources; + return this; + } + + /** + * Get the facilityNames property: Trials with any of the given facility names will be included in the selection + * (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility names. + * + * @return the facilityNames value. + */ + @Generated + public List getFacilityNames() { + return this.facilityNames; + } + + /** + * Set the facilityNames property: Trials with any of the given facility names will be included in the selection + * (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility names. + * + * @param facilityNames the facilityNames value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setFacilityNames(List facilityNames) { + this.facilityNames = facilityNames; + return this; + } + + /** + * Get the facilityLocations property: Trials with any of the given facility locations will be included in the + * selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility locations. + * + * @return the facilityLocations value. + */ + @Generated + public List getFacilityLocations() { + return this.facilityLocations; + } + + /** + * Set the facilityLocations property: Trials with any of the given facility locations will be included in the + * selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility locations. + * + * @param facilityLocations the facilityLocations value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setFacilityLocations(List facilityLocations) { + this.facilityLocations = facilityLocations; + return this; + } + + /** + * Get the facilityAreas property: Trials with any of the given facility area boundaries will be included in the + * selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility area boundaries. + * + * @return the facilityAreas value. + */ + @Generated + public List getFacilityAreas() { + return this.facilityAreas; + } + + /** + * Set the facilityAreas property: Trials with any of the given facility area boundaries will be included in the + * selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility area boundaries. + * + * @param facilityAreas the facilityAreas value to set. + * @return the ClinicalTrialRegistryFilter object itself. + */ + @Generated + public ClinicalTrialRegistryFilter setFacilityAreas(List facilityAreas) { + this.facilityAreas = facilityAreas; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("conditions", this.conditions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("studyTypes", this.studyTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("recruitmentStatuses", this.recruitmentStatuses, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("sponsors", this.sponsors, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("phases", this.phases, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("purposes", this.purposes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("ids", this.ids, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("sources", this.sources, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("facilityNames", this.facilityNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("facilityLocations", this.facilityLocations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("facilityAreas", this.facilityAreas, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalTrialRegistryFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalTrialRegistryFilter if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ClinicalTrialRegistryFilter. + */ + @Generated + public static ClinicalTrialRegistryFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClinicalTrialRegistryFilter deserializedClinicalTrialRegistryFilter = new ClinicalTrialRegistryFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("conditions".equals(fieldName)) { + List conditions = reader.readArray(reader1 -> reader1.getString()); + deserializedClinicalTrialRegistryFilter.conditions = conditions; + } else if ("studyTypes".equals(fieldName)) { + List studyTypes + = reader.readArray(reader1 -> ClinicalTrialStudyType.fromString(reader1.getString())); + deserializedClinicalTrialRegistryFilter.studyTypes = studyTypes; + } else if ("recruitmentStatuses".equals(fieldName)) { + List recruitmentStatuses + = reader.readArray(reader1 -> ClinicalTrialRecruitmentStatus.fromString(reader1.getString())); + deserializedClinicalTrialRegistryFilter.recruitmentStatuses = recruitmentStatuses; + } else if ("sponsors".equals(fieldName)) { + List sponsors = reader.readArray(reader1 -> reader1.getString()); + deserializedClinicalTrialRegistryFilter.sponsors = sponsors; + } else if ("phases".equals(fieldName)) { + List phases + = reader.readArray(reader1 -> ClinicalTrialPhase.fromString(reader1.getString())); + deserializedClinicalTrialRegistryFilter.phases = phases; + } else if ("purposes".equals(fieldName)) { + List purposes + = reader.readArray(reader1 -> ClinicalTrialPurpose.fromString(reader1.getString())); + deserializedClinicalTrialRegistryFilter.purposes = purposes; + } else if ("ids".equals(fieldName)) { + List ids = reader.readArray(reader1 -> reader1.getString()); + deserializedClinicalTrialRegistryFilter.ids = ids; + } else if ("sources".equals(fieldName)) { + List sources + = reader.readArray(reader1 -> ClinicalTrialSource.fromString(reader1.getString())); + deserializedClinicalTrialRegistryFilter.sources = sources; + } else if ("facilityNames".equals(fieldName)) { + List facilityNames = reader.readArray(reader1 -> reader1.getString()); + deserializedClinicalTrialRegistryFilter.facilityNames = facilityNames; + } else if ("facilityLocations".equals(fieldName)) { + List facilityLocations + = reader.readArray(reader1 -> GeographicLocation.fromJson(reader1)); + deserializedClinicalTrialRegistryFilter.facilityLocations = facilityLocations; + } else if ("facilityAreas".equals(fieldName)) { + List facilityAreas = reader.readArray(reader1 -> GeographicArea.fromJson(reader1)); + deserializedClinicalTrialRegistryFilter.facilityAreas = facilityAreas; + } else { + reader.skipChildren(); + } + } + return deserializedClinicalTrialRegistryFilter; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialResearchFacility.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialResearchFacility.java new file mode 100644 index 000000000000..d4d9a1957164 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialResearchFacility.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Details of a research facility where a clinical trial is conducted. + */ +@Fluent +public final class ClinicalTrialResearchFacility implements JsonSerializable { + + /* + * The facility's name. + */ + @Generated + private final String name; + + /* + * City name. + */ + @Generated + private String city; + + /* + * State name. + */ + @Generated + private String state; + + /* + * Country/region name. + */ + @Generated + private final String countryOrRegion; + + /** + * Creates an instance of ClinicalTrialResearchFacility class. + * + * @param name the name value to set. + * @param countryOrRegion the countryOrRegion value to set. + */ + @Generated + public ClinicalTrialResearchFacility(String name, String countryOrRegion) { + this.name = name; + this.countryOrRegion = countryOrRegion; + } + + /** + * Get the name property: The facility's name. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the city property: City name. + * + * @return the city value. + */ + @Generated + public String getCity() { + return this.city; + } + + /** + * Set the city property: City name. + * + * @param city the city value to set. + * @return the ClinicalTrialResearchFacility object itself. + */ + @Generated + public ClinicalTrialResearchFacility setCity(String city) { + this.city = city; + return this; + } + + /** + * Get the state property: State name. + * + * @return the state value. + */ + @Generated + public String getState() { + return this.state; + } + + /** + * Set the state property: State name. + * + * @param state the state value to set. + * @return the ClinicalTrialResearchFacility object itself. + */ + @Generated + public ClinicalTrialResearchFacility setState(String state) { + this.state = state; + return this; + } + + /** + * Get the countryOrRegion property: Country/region name. + * + * @return the countryOrRegion value. + */ + @Generated + public String getCountryOrRegion() { + return this.countryOrRegion; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("countryOrRegion", this.countryOrRegion); + jsonWriter.writeStringField("city", this.city); + jsonWriter.writeStringField("state", this.state); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalTrialResearchFacility from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalTrialResearchFacility if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ClinicalTrialResearchFacility. + */ + @Generated + public static ClinicalTrialResearchFacility fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + String countryOrRegion = null; + String city = null; + String state = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("countryOrRegion".equals(fieldName)) { + countryOrRegion = reader.getString(); + } else if ("city".equals(fieldName)) { + city = reader.getString(); + } else if ("state".equals(fieldName)) { + state = reader.getString(); + } else { + reader.skipChildren(); + } + } + ClinicalTrialResearchFacility deserializedClinicalTrialResearchFacility + = new ClinicalTrialResearchFacility(name, countryOrRegion); + deserializedClinicalTrialResearchFacility.city = city; + deserializedClinicalTrialResearchFacility.state = state; + return deserializedClinicalTrialResearchFacility; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialSource.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialSource.java new file mode 100644 index 000000000000..d26207943310 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialSource.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Possible sources of a clinical trial. + */ +public final class ClinicalTrialSource extends ExpandableStringEnum { + + /** + * Static value custom for ClinicalTrialSource. + */ + @Generated + public static final ClinicalTrialSource CUSTOM = fromString("custom"); + + /** + * Static value clinicaltrials.gov for ClinicalTrialSource. + */ + @Generated + public static final ClinicalTrialSource CLINICALTRIALS_GOV = fromString("clinicaltrials.gov"); + + /** + * Creates a new instance of ClinicalTrialSource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ClinicalTrialSource() { + } + + /** + * Creates or finds a ClinicalTrialSource from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClinicalTrialSource. + */ + @Generated + public static ClinicalTrialSource fromString(String name) { + return fromString(name, ClinicalTrialSource.class); + } + + /** + * Gets known ClinicalTrialSource values. + * + * @return known ClinicalTrialSource values. + */ + @Generated + public static Collection values() { + return values(ClinicalTrialSource.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialStudyType.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialStudyType.java new file mode 100644 index 000000000000..90f5e5988690 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrialStudyType.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Possible study types of a clinical trial. + */ +public final class ClinicalTrialStudyType extends ExpandableStringEnum { + + /** + * Static value interventional for ClinicalTrialStudyType. + */ + @Generated + public static final ClinicalTrialStudyType INTERVENTIONAL = fromString("interventional"); + + /** + * Static value observational for ClinicalTrialStudyType. + */ + @Generated + public static final ClinicalTrialStudyType OBSERVATIONAL = fromString("observational"); + + /** + * Static value expandedAccess for ClinicalTrialStudyType. + */ + @Generated + public static final ClinicalTrialStudyType EXPANDED_ACCESS = fromString("expandedAccess"); + + /** + * Static value patientRegistries for ClinicalTrialStudyType. + */ + @Generated + public static final ClinicalTrialStudyType PATIENT_REGISTRIES = fromString("patientRegistries"); + + /** + * Creates a new instance of ClinicalTrialStudyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ClinicalTrialStudyType() { + } + + /** + * Creates or finds a ClinicalTrialStudyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClinicalTrialStudyType. + */ + @Generated + public static ClinicalTrialStudyType fromString(String name) { + return fromString(name, ClinicalTrialStudyType.class); + } + + /** + * Gets known ClinicalTrialStudyType values. + * + * @return known ClinicalTrialStudyType values. + */ + @Generated + public static Collection values() { + return values(ClinicalTrialStudyType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrials.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrials.java new file mode 100644 index 000000000000..2749b4012a33 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ClinicalTrials.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The clinical trials that the patient(s) should be matched to. + * The trial selection can be given as a list of custom clinical trials and/or a list of filters to known clinical trial + * registries. + * In case both are given, the resulting trial set is a union of the two sets. + */ +@Fluent +public final class ClinicalTrials implements JsonSerializable { + + /* + * A list of clinical trials. + */ + @Generated + private List customTrials; + + /* + * A list of filters, each one creating a selection of trials from a given + * clinical trial registry. + */ + @Generated + private List registryFilters; + + /** + * Creates an instance of ClinicalTrials class. + */ + @Generated + public ClinicalTrials() { + } + + /** + * Get the customTrials property: A list of clinical trials. + * + * @return the customTrials value. + */ + @Generated + public List getCustomTrials() { + return this.customTrials; + } + + /** + * Set the customTrials property: A list of clinical trials. + * + * @param customTrials the customTrials value to set. + * @return the ClinicalTrials object itself. + */ + @Generated + public ClinicalTrials setCustomTrials(List customTrials) { + this.customTrials = customTrials; + return this; + } + + /** + * Get the registryFilters property: A list of filters, each one creating a selection of trials from a given + * clinical trial registry. + * + * @return the registryFilters value. + */ + @Generated + public List getRegistryFilters() { + return this.registryFilters; + } + + /** + * Set the registryFilters property: A list of filters, each one creating a selection of trials from a given + * clinical trial registry. + * + * @param registryFilters the registryFilters value to set. + * @return the ClinicalTrials object itself. + */ + @Generated + public ClinicalTrials setRegistryFilters(List registryFilters) { + this.registryFilters = registryFilters; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("customTrials", this.customTrials, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("registryFilters", this.registryFilters, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClinicalTrials from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClinicalTrials if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ClinicalTrials. + */ + @Generated + public static ClinicalTrials fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClinicalTrials deserializedClinicalTrials = new ClinicalTrials(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("customTrials".equals(fieldName)) { + List customTrials + = reader.readArray(reader1 -> ClinicalTrialDetails.fromJson(reader1)); + deserializedClinicalTrials.customTrials = customTrials; + } else if ("registryFilters".equals(fieldName)) { + List registryFilters + = reader.readArray(reader1 -> ClinicalTrialRegistryFilter.fromJson(reader1)); + deserializedClinicalTrials.registryFilters = registryFilters; + } else { + reader.skipChildren(); + } + } + return deserializedClinicalTrials; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ContactDetails.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ContactDetails.java new file mode 100644 index 000000000000..3668cd80f38f --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ContactDetails.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A person's contact details. + */ +@Fluent +public final class ContactDetails implements JsonSerializable { + + /* + * The person's name. + */ + @Generated + private String name; + + /* + * The person's email. + */ + @Generated + private String email; + + /* + * A person's phone number. + */ + @Generated + private String phone; + + /** + * Creates an instance of ContactDetails class. + */ + @Generated + public ContactDetails() { + } + + /** + * Get the name property: The person's name. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The person's name. + * + * @param name the name value to set. + * @return the ContactDetails object itself. + */ + @Generated + public ContactDetails setName(String name) { + this.name = name; + return this; + } + + /** + * Get the email property: The person's email. + * + * @return the email value. + */ + @Generated + public String getEmail() { + return this.email; + } + + /** + * Set the email property: The person's email. + * + * @param email the email value to set. + * @return the ContactDetails object itself. + */ + @Generated + public ContactDetails setEmail(String email) { + this.email = email; + return this; + } + + /** + * Get the phone property: A person's phone number. + * + * @return the phone value. + */ + @Generated + public String getPhone() { + return this.phone; + } + + /** + * Set the phone property: A person's phone number. + * + * @param phone the phone value to set. + * @return the ContactDetails object itself. + */ + @Generated + public ContactDetails setPhone(String phone) { + this.phone = phone; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("email", this.email); + jsonWriter.writeStringField("phone", this.phone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContactDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContactDetails if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ContactDetails. + */ + @Generated + public static ContactDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContactDetails deserializedContactDetails = new ContactDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("name".equals(fieldName)) { + deserializedContactDetails.name = reader.getString(); + } else if ("email".equals(fieldName)) { + deserializedContactDetails.email = reader.getString(); + } else if ("phone".equals(fieldName)) { + deserializedContactDetails.phone = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedContactDetails; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentContent.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentContent.java new file mode 100644 index 000000000000..862c3f89ac80 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentContent.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The content of the patient document. + */ +@Immutable +public final class DocumentContent implements JsonSerializable { + + /* + * The type of the content's source. + * In case the source type is 'inline', the content is given as a string (for instance, text). + * In case the source type is 'reference', the content is given as a URI. + */ + @Generated + private final DocumentContentSourceType sourceType; + + /* + * The content of the document, given either inline (as a string) or as a reference (URI). + */ + @Generated + private final String value; + + /** + * Creates an instance of DocumentContent class. + * + * @param sourceType the sourceType value to set. + * @param value the value value to set. + */ + @Generated + public DocumentContent(DocumentContentSourceType sourceType, String value) { + this.sourceType = sourceType; + this.value = value; + } + + /** + * Get the sourceType property: The type of the content's source. + * In case the source type is 'inline', the content is given as a string (for instance, text). + * In case the source type is 'reference', the content is given as a URI. + * + * @return the sourceType value. + */ + @Generated + public DocumentContentSourceType getSourceType() { + return this.sourceType; + } + + /** + * Get the value property: The content of the document, given either inline (as a string) or as a reference (URI). + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DocumentContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DocumentContent if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DocumentContent. + */ + @Generated + public static DocumentContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DocumentContentSourceType sourceType = null; + String value = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("sourceType".equals(fieldName)) { + sourceType = DocumentContentSourceType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + value = reader.getString(); + } else { + reader.skipChildren(); + } + } + return new DocumentContent(sourceType, value); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentContentSourceType.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentContentSourceType.java new file mode 100644 index 000000000000..9f86e067c446 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentContentSourceType.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the content's source. + * In case the source type is 'inline', the content is given as a string (for instance, text). + * In case the source type is 'reference', the content is given as a URI. + */ +public final class DocumentContentSourceType extends ExpandableStringEnum { + + /** + * Static value inline for DocumentContentSourceType. + */ + @Generated + public static final DocumentContentSourceType INLINE = fromString("inline"); + + /** + * Static value reference for DocumentContentSourceType. + */ + @Generated + public static final DocumentContentSourceType REFERENCE = fromString("reference"); + + /** + * Creates a new instance of DocumentContentSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public DocumentContentSourceType() { + } + + /** + * Creates or finds a DocumentContentSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DocumentContentSourceType. + */ + @Generated + public static DocumentContentSourceType fromString(String name) { + return fromString(name, DocumentContentSourceType.class); + } + + /** + * Gets known DocumentContentSourceType values. + * + * @return known DocumentContentSourceType values. + */ + @Generated + public static Collection values() { + return values(DocumentContentSourceType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentType.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentType.java new file mode 100644 index 000000000000..9ca4e54ae887 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/DocumentType.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + */ +public final class DocumentType extends ExpandableStringEnum { + + /** + * Static value note for DocumentType. + */ + @Generated + public static final DocumentType NOTE = fromString("note"); + + /** + * Static value fhirBundle for DocumentType. + */ + @Generated + public static final DocumentType FHIR_BUNDLE = fromString("fhirBundle"); + + /** + * Static value dicom for DocumentType. + */ + @Generated + public static final DocumentType DICOM = fromString("dicom"); + + /** + * Static value genomicSequencing for DocumentType. + */ + @Generated + public static final DocumentType GENOMIC_SEQUENCING = fromString("genomicSequencing"); + + /** + * Creates a new instance of DocumentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public DocumentType() { + } + + /** + * Creates or finds a DocumentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DocumentType. + */ + @Generated + public static DocumentType fromString(String name) { + return fromString(name, DocumentType.class); + } + + /** + * Gets known DocumentType values. + * + * @return known DocumentType values. + */ + @Generated + public static Collection values() { + return values(DocumentType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ExtendedClinicalCodedElement.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ExtendedClinicalCodedElement.java new file mode 100644 index 000000000000..984aa713e1fe --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/ExtendedClinicalCodedElement.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A piece of clinical information, expressed as a code in a clinical coding system, extended by semantic information. + */ +@Immutable +public final class ExtendedClinicalCodedElement implements JsonSerializable { + + /* + * The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. + */ + @Generated + private final String system; + + /* + * The code within the given clinical coding system. + */ + @Generated + private final String code; + + /* + * The name of this coded concept in the coding system. + */ + @Generated + private String name; + + /* + * A value associated with the code within the given clinical coding system. + */ + @Generated + private String value; + + /* + * The [UMLS semantic type](https://www.nlm.nih.gov/research/umls/META3_current_semantic_types.html) associated with + * the coded concept. + */ + @Generated + private String semanticType; + + /* + * The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination. + */ + @Generated + private String category; + + /** + * Creates an instance of ExtendedClinicalCodedElement class. + * + * @param system the system value to set. + * @param code the code value to set. + */ + @Generated + private ExtendedClinicalCodedElement(String system, String code) { + this.system = system; + this.code = code; + } + + /** + * Get the system property: The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. + * + * @return the system value. + */ + @Generated + public String getSystem() { + return this.system; + } + + /** + * Get the code property: The code within the given clinical coding system. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Get the name property: The name of this coded concept in the coding system. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the value property: A value associated with the code within the given clinical coding system. + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * Get the semanticType property: The [UMLS semantic + * type](https://www.nlm.nih.gov/research/umls/META3_current_semantic_types.html) associated with the coded concept. + * + * @return the semanticType value. + */ + @Generated + public String getSemanticType() { + return this.semanticType; + } + + /** + * Get the category property: The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, + * Medication, Examination. + * + * @return the category value. + */ + @Generated + public String getCategory() { + return this.category; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("system", this.system); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("semanticType", this.semanticType); + jsonWriter.writeStringField("category", this.category); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedClinicalCodedElement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedClinicalCodedElement if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExtendedClinicalCodedElement. + */ + @Generated + public static ExtendedClinicalCodedElement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String system = null; + String code = null; + String name = null; + String value = null; + String semanticType = null; + String category = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("system".equals(fieldName)) { + system = reader.getString(); + } else if ("code".equals(fieldName)) { + code = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("value".equals(fieldName)) { + value = reader.getString(); + } else if ("semanticType".equals(fieldName)) { + semanticType = reader.getString(); + } else if ("category".equals(fieldName)) { + category = reader.getString(); + } else { + reader.skipChildren(); + } + } + ExtendedClinicalCodedElement deserializedExtendedClinicalCodedElement + = new ExtendedClinicalCodedElement(system, code); + deserializedExtendedClinicalCodedElement.name = name; + deserializedExtendedClinicalCodedElement.value = value; + deserializedExtendedClinicalCodedElement.semanticType = semanticType; + deserializedExtendedClinicalCodedElement.category = category; + return deserializedExtendedClinicalCodedElement; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonGeometryType.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonGeometryType.java new file mode 100644 index 000000000000..5f5596198bbd --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonGeometryType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * `GeoJSON` geometry type. + */ +public final class GeoJsonGeometryType extends ExpandableStringEnum { + + /** + * Static value Point for GeoJsonGeometryType. + */ + @Generated + public static final GeoJsonGeometryType POINT = fromString("Point"); + + /** + * Creates a new instance of GeoJsonGeometryType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public GeoJsonGeometryType() { + } + + /** + * Creates or finds a GeoJsonGeometryType from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeoJsonGeometryType. + */ + @Generated + public static GeoJsonGeometryType fromString(String name) { + return fromString(name, GeoJsonGeometryType.class); + } + + /** + * Gets known GeoJsonGeometryType values. + * + * @return known GeoJsonGeometryType values. + */ + @Generated + public static Collection values() { + return values(GeoJsonGeometryType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonPropertiesSubType.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonPropertiesSubType.java new file mode 100644 index 000000000000..440786b39526 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonPropertiesSubType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * `GeoJSON` object sub-type. + */ +public final class GeoJsonPropertiesSubType extends ExpandableStringEnum { + + /** + * Static value Circle for GeoJsonPropertiesSubType. + */ + @Generated + public static final GeoJsonPropertiesSubType CIRCLE = fromString("Circle"); + + /** + * Creates a new instance of GeoJsonPropertiesSubType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public GeoJsonPropertiesSubType() { + } + + /** + * Creates or finds a GeoJsonPropertiesSubType from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeoJsonPropertiesSubType. + */ + @Generated + public static GeoJsonPropertiesSubType fromString(String name) { + return fromString(name, GeoJsonPropertiesSubType.class); + } + + /** + * Gets known GeoJsonPropertiesSubType values. + * + * @return known GeoJsonPropertiesSubType values. + */ + @Generated + public static Collection values() { + return values(GeoJsonPropertiesSubType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonType.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonType.java new file mode 100644 index 000000000000..4423db77a169 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeoJsonType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * `GeoJSON` type. + */ +public final class GeoJsonType extends ExpandableStringEnum { + + /** + * Static value Feature for GeoJsonType. + */ + @Generated + public static final GeoJsonType FEATURE = fromString("Feature"); + + /** + * Creates a new instance of GeoJsonType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public GeoJsonType() { + } + + /** + * Creates or finds a GeoJsonType from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeoJsonType. + */ + @Generated + public static GeoJsonType fromString(String name) { + return fromString(name, GeoJsonType.class); + } + + /** + * Gets known GeoJsonType values. + * + * @return known GeoJsonType values. + */ + @Generated + public static Collection values() { + return values(GeoJsonType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeographicArea.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeographicArea.java new file mode 100644 index 000000000000..d1a2b1af6ffd --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeographicArea.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A geographic area, expressed as a `Circle` geometry represented using a `GeoJSON Feature` (see [GeoJSON + * spec](https://tools.ietf.org/html/rfc7946)). + */ +@Immutable +public final class GeographicArea implements JsonSerializable { + + /* + * `GeoJSON` type. + */ + @Generated + private final GeoJsonType type; + + /* + * `GeoJSON` geometry, representing the area circle's center. + */ + @Generated + private final AreaGeometry geometry; + + /* + * `GeoJSON` object properties. + */ + @Generated + private final AreaProperties properties; + + /** + * Creates an instance of GeographicArea class. + * + * @param type the type value to set. + * @param geometry the geometry value to set. + * @param properties the properties value to set. + */ + @Generated + public GeographicArea(GeoJsonType type, AreaGeometry geometry, AreaProperties properties) { + this.type = type; + this.geometry = geometry; + this.properties = properties; + } + + /** + * Get the type property: `GeoJSON` type. + * + * @return the type value. + */ + @Generated + public GeoJsonType getType() { + return this.type; + } + + /** + * Get the geometry property: `GeoJSON` geometry, representing the area circle's center. + * + * @return the geometry value. + */ + @Generated + public AreaGeometry getGeometry() { + return this.geometry; + } + + /** + * Get the properties property: `GeoJSON` object properties. + * + * @return the properties value. + */ + @Generated + public AreaProperties getProperties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeJsonField("geometry", this.geometry); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GeographicArea from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GeographicArea if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GeographicArea. + */ + @Generated + public static GeographicArea fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GeoJsonType type = null; + AreaGeometry geometry = null; + AreaProperties properties = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("type".equals(fieldName)) { + type = GeoJsonType.fromString(reader.getString()); + } else if ("geometry".equals(fieldName)) { + geometry = AreaGeometry.fromJson(reader); + } else if ("properties".equals(fieldName)) { + properties = AreaProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return new GeographicArea(type, geometry, properties); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeographicLocation.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeographicLocation.java new file mode 100644 index 000000000000..7a6958acf082 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/GeographicLocation.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A location given as a combination of city, state and country/region. It could specify a city, a state or a + * country/region. + * In case a city is specified, either state +country/region or country/region (for countries/regions where there are no + * states) should be added. + * In case a state is specified (without a city), country/region should be added. + */ +@Fluent +public final class GeographicLocation implements JsonSerializable { + + /* + * City name. + */ + @Generated + private String city; + + /* + * State name. + */ + @Generated + private String state; + + /* + * Country/region name. + */ + @Generated + private final String countryOrRegion; + + /** + * Creates an instance of GeographicLocation class. + * + * @param countryOrRegion the countryOrRegion value to set. + */ + @Generated + public GeographicLocation(String countryOrRegion) { + this.countryOrRegion = countryOrRegion; + } + + /** + * Get the city property: City name. + * + * @return the city value. + */ + @Generated + public String getCity() { + return this.city; + } + + /** + * Set the city property: City name. + * + * @param city the city value to set. + * @return the GeographicLocation object itself. + */ + @Generated + public GeographicLocation setCity(String city) { + this.city = city; + return this; + } + + /** + * Get the state property: State name. + * + * @return the state value. + */ + @Generated + public String getState() { + return this.state; + } + + /** + * Set the state property: State name. + * + * @param state the state value to set. + * @return the GeographicLocation object itself. + */ + @Generated + public GeographicLocation setState(String state) { + this.state = state; + return this; + } + + /** + * Get the countryOrRegion property: Country/region name. + * + * @return the countryOrRegion value. + */ + @Generated + public String getCountryOrRegion() { + return this.countryOrRegion; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("countryOrRegion", this.countryOrRegion); + jsonWriter.writeStringField("city", this.city); + jsonWriter.writeStringField("state", this.state); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GeographicLocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GeographicLocation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GeographicLocation. + */ + @Generated + public static GeographicLocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String countryOrRegion = null; + String city = null; + String state = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("countryOrRegion".equals(fieldName)) { + countryOrRegion = reader.getString(); + } else if ("city".equals(fieldName)) { + city = reader.getString(); + } else if ("state".equals(fieldName)) { + state = reader.getString(); + } else { + reader.skipChildren(); + } + } + GeographicLocation deserializedGeographicLocation = new GeographicLocation(countryOrRegion); + deserializedGeographicLocation.city = city; + deserializedGeographicLocation.state = state; + return deserializedGeographicLocation; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/JobStatus.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/JobStatus.java new file mode 100644 index 000000000000..10e801632c4d --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/JobStatus.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of the processing job. + */ +public final class JobStatus extends ExpandableStringEnum { + + /** + * Static value notStarted for JobStatus. + */ + @Generated + public static final JobStatus NOT_STARTED = fromString("notStarted"); + + /** + * Static value running for JobStatus. + */ + @Generated + public static final JobStatus RUNNING = fromString("running"); + + /** + * Static value succeeded for JobStatus. + */ + @Generated + public static final JobStatus SUCCEEDED = fromString("succeeded"); + + /** + * Static value failed for JobStatus. + */ + @Generated + public static final JobStatus FAILED = fromString("failed"); + + /** + * Static value partiallyCompleted for JobStatus. + */ + @Generated + public static final JobStatus PARTIALLY_COMPLETED = fromString("partiallyCompleted"); + + /** + * Creates a new instance of JobStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public JobStatus() { + } + + /** + * Creates or finds a JobStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobStatus. + */ + @Generated + public static JobStatus fromString(String name) { + return fromString(name, JobStatus.class); + } + + /** + * Gets known JobStatus values. + * + * @return known JobStatus values. + */ + @Generated + public static Collection values() { + return values(JobStatus.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientDocument.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientDocument.java new file mode 100644 index 000000000000..9cf2070c53d3 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientDocument.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * A clinical document related to a patient. Document here is in the wide sense - not just a text document (note). + */ +@Fluent +public final class PatientDocument implements JsonSerializable { + + /* + * The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + */ + @Generated + private final DocumentType type; + + /* + * The type of the clinical document. + */ + @Generated + private ClinicalDocumentType clinicalType; + + /* + * A given identifier for the document. Has to be unique across all documents for a single patient. + */ + @Generated + private final String id; + + /* + * A 2 letter ISO 639-1 representation of the language of the document. + */ + @Generated + private String language; + + /* + * The date and time when the document was created. + */ + @Generated + private OffsetDateTime createdDateTime; + + /* + * The content of the patient document. + */ + @Generated + private final DocumentContent content; + + /** + * Creates an instance of PatientDocument class. + * + * @param type the type value to set. + * @param id the id value to set. + * @param content the content value to set. + */ + @Generated + public PatientDocument(DocumentType type, String id, DocumentContent content) { + this.type = type; + this.id = id; + this.content = content; + } + + /** + * Get the type property: The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR + * JSON document). + * + * @return the type value. + */ + @Generated + public DocumentType getType() { + return this.type; + } + + /** + * Get the clinicalType property: The type of the clinical document. + * + * @return the clinicalType value. + */ + @Generated + public ClinicalDocumentType getClinicalType() { + return this.clinicalType; + } + + /** + * Set the clinicalType property: The type of the clinical document. + * + * @param clinicalType the clinicalType value to set. + * @return the PatientDocument object itself. + */ + @Generated + public PatientDocument setClinicalType(ClinicalDocumentType clinicalType) { + this.clinicalType = clinicalType; + return this; + } + + /** + * Get the id property: A given identifier for the document. Has to be unique across all documents for a single + * patient. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the language property: A 2 letter ISO 639-1 representation of the language of the document. + * + * @return the language value. + */ + @Generated + public String getLanguage() { + return this.language; + } + + /** + * Set the language property: A 2 letter ISO 639-1 representation of the language of the document. + * + * @param language the language value to set. + * @return the PatientDocument object itself. + */ + @Generated + public PatientDocument setLanguage(String language) { + this.language = language; + return this; + } + + /** + * Get the createdDateTime property: The date and time when the document was created. + * + * @return the createdDateTime value. + */ + @Generated + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Set the createdDateTime property: The date and time when the document was created. + * + * @param createdDateTime the createdDateTime value to set. + * @return the PatientDocument object itself. + */ + @Generated + public PatientDocument setCreatedDateTime(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Get the content property: The content of the patient document. + * + * @return the content value. + */ + @Generated + public DocumentContent getContent() { + return this.content; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeJsonField("content", this.content); + jsonWriter.writeStringField("clinicalType", this.clinicalType == null ? null : this.clinicalType.toString()); + jsonWriter.writeStringField("language", this.language); + jsonWriter.writeStringField("createdDateTime", + this.createdDateTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdDateTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PatientDocument from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PatientDocument if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PatientDocument. + */ + @Generated + public static PatientDocument fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DocumentType type = null; + String id = null; + DocumentContent content = null; + ClinicalDocumentType clinicalType = null; + String language = null; + OffsetDateTime createdDateTime = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("type".equals(fieldName)) { + type = DocumentType.fromString(reader.getString()); + } else if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("content".equals(fieldName)) { + content = DocumentContent.fromJson(reader); + } else if ("clinicalType".equals(fieldName)) { + clinicalType = ClinicalDocumentType.fromString(reader.getString()); + } else if ("language".equals(fieldName)) { + language = reader.getString(); + } else if ("createdDateTime".equals(fieldName)) { + createdDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + PatientDocument deserializedPatientDocument = new PatientDocument(type, id, content); + deserializedPatientDocument.clinicalType = clinicalType; + deserializedPatientDocument.language = language; + deserializedPatientDocument.createdDateTime = createdDateTime; + return deserializedPatientDocument; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientInfo.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientInfo.java new file mode 100644 index 000000000000..954ce7112317 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientInfo.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.List; +import java.util.Objects; + +/** + * Patient structured information, including demographics and known structured clinical information. + */ +@Fluent +public final class PatientInfo implements JsonSerializable { + + /* + * The patient's sex. + */ + @Generated + private PatientInfoSex sex; + + /* + * The patient's date of birth. + */ + @Generated + private LocalDate birthDate; + + /* + * Known clinical information for the patient, structured. + */ + @Generated + private List clinicalInfo; + + /** + * Creates an instance of PatientInfo class. + */ + @Generated + public PatientInfo() { + } + + /** + * Get the sex property: The patient's sex. + * + * @return the sex value. + */ + @Generated + public PatientInfoSex getSex() { + return this.sex; + } + + /** + * Set the sex property: The patient's sex. + * + * @param sex the sex value to set. + * @return the PatientInfo object itself. + */ + @Generated + public PatientInfo setSex(PatientInfoSex sex) { + this.sex = sex; + return this; + } + + /** + * Get the birthDate property: The patient's date of birth. + * + * @return the birthDate value. + */ + @Generated + public LocalDate getBirthDate() { + return this.birthDate; + } + + /** + * Set the birthDate property: The patient's date of birth. + * + * @param birthDate the birthDate value to set. + * @return the PatientInfo object itself. + */ + @Generated + public PatientInfo setBirthDate(LocalDate birthDate) { + this.birthDate = birthDate; + return this; + } + + /** + * Get the clinicalInfo property: Known clinical information for the patient, structured. + * + * @return the clinicalInfo value. + */ + @Generated + public List getClinicalInfo() { + return this.clinicalInfo; + } + + /** + * Set the clinicalInfo property: Known clinical information for the patient, structured. + * + * @param clinicalInfo the clinicalInfo value to set. + * @return the PatientInfo object itself. + */ + @Generated + public PatientInfo setClinicalInfo(List clinicalInfo) { + this.clinicalInfo = clinicalInfo; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sex", this.sex == null ? null : this.sex.toString()); + jsonWriter.writeStringField("birthDate", Objects.toString(this.birthDate, null)); + jsonWriter.writeArrayField("clinicalInfo", this.clinicalInfo, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PatientInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PatientInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PatientInfo. + */ + @Generated + public static PatientInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PatientInfo deserializedPatientInfo = new PatientInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("sex".equals(fieldName)) { + deserializedPatientInfo.sex = PatientInfoSex.fromString(reader.getString()); + } else if ("birthDate".equals(fieldName)) { + deserializedPatientInfo.birthDate + = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); + } else if ("clinicalInfo".equals(fieldName)) { + List clinicalInfo + = reader.readArray(reader1 -> ClinicalCodedElement.fromJson(reader1)); + deserializedPatientInfo.clinicalInfo = clinicalInfo; + } else { + reader.skipChildren(); + } + } + return deserializedPatientInfo; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientInfoSex.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientInfoSex.java new file mode 100644 index 000000000000..82fa42e82893 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientInfoSex.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The patient's sex. + */ +public final class PatientInfoSex extends ExpandableStringEnum { + + /** + * Static value female for PatientInfoSex. + */ + @Generated + public static final PatientInfoSex FEMALE = fromString("female"); + + /** + * Static value male for PatientInfoSex. + */ + @Generated + public static final PatientInfoSex MALE = fromString("male"); + + /** + * Static value unspecified for PatientInfoSex. + */ + @Generated + public static final PatientInfoSex UNSPECIFIED = fromString("unspecified"); + + /** + * Creates a new instance of PatientInfoSex value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public PatientInfoSex() { + } + + /** + * Creates or finds a PatientInfoSex from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatientInfoSex. + */ + @Generated + public static PatientInfoSex fromString(String name) { + return fromString(name, PatientInfoSex.class); + } + + /** + * Gets known PatientInfoSex values. + * + * @return known PatientInfoSex values. + */ + @Generated + public static Collection values() { + return values(PatientInfoSex.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientRecord.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientRecord.java new file mode 100644 index 000000000000..5b36ff006835 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/PatientRecord.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A patient record, including their clinical information and data. + */ +@Fluent +public final class PatientRecord implements JsonSerializable { + + /* + * A given identifier for the patient. Has to be unique across all patients in a single request. + */ + @Generated + private final String id; + + /* + * Patient structured information, including demographics and known structured clinical information. + */ + @Generated + private PatientInfo info; + + /* + * Patient unstructured clinical data, given as documents. + */ + @Generated + private List data; + + /** + * Creates an instance of PatientRecord class. + * + * @param id the id value to set. + */ + @Generated + public PatientRecord(String id) { + this.id = id; + } + + /** + * Get the id property: A given identifier for the patient. Has to be unique across all patients in a single + * request. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the info property: Patient structured information, including demographics and known structured clinical + * information. + * + * @return the info value. + */ + @Generated + public PatientInfo getInfo() { + return this.info; + } + + /** + * Set the info property: Patient structured information, including demographics and known structured clinical + * information. + * + * @param info the info value to set. + * @return the PatientRecord object itself. + */ + @Generated + public PatientRecord setInfo(PatientInfo info) { + this.info = info; + return this; + } + + /** + * Get the data property: Patient unstructured clinical data, given as documents. + * + * @return the data value. + */ + @Generated + public List getData() { + return this.data; + } + + /** + * Set the data property: Patient unstructured clinical data, given as documents. + * + * @param data the data value to set. + * @return the PatientRecord object itself. + */ + @Generated + public PatientRecord setData(List data) { + this.data = data; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeJsonField("info", this.info); + jsonWriter.writeArrayField("data", this.data, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PatientRecord from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PatientRecord if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PatientRecord. + */ + @Generated + public static PatientRecord fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + PatientInfo info = null; + List data = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("info".equals(fieldName)) { + info = PatientInfo.fromJson(reader); + } else if ("data".equals(fieldName)) { + data = reader.readArray(reader1 -> PatientDocument.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + PatientRecord deserializedPatientRecord = new PatientRecord(id); + deserializedPatientRecord.info = info; + deserializedPatientRecord.data = data; + return deserializedPatientRecord; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherData.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherData.java new file mode 100644 index 000000000000..fd528169e3d3 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherData.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The body of the Trial Matcher request. + */ +@Fluent +public final class TrialMatcherData implements JsonSerializable { + + /* + * The list of patients, including their clinical information and data. + */ + @Generated + private final List patients; + + /* + * Configuration affecting the Trial Matcher model's inference. + */ + @Generated + private TrialMatcherModelConfiguration configuration; + + /** + * Creates an instance of TrialMatcherData class. + * + * @param patients the patients value to set. + */ + @Generated + public TrialMatcherData(List patients) { + this.patients = patients; + } + + /** + * Get the patients property: The list of patients, including their clinical information and data. + * + * @return the patients value. + */ + @Generated + public List getPatients() { + return this.patients; + } + + /** + * Get the configuration property: Configuration affecting the Trial Matcher model's inference. + * + * @return the configuration value. + */ + @Generated + public TrialMatcherModelConfiguration getConfiguration() { + return this.configuration; + } + + /** + * Set the configuration property: Configuration affecting the Trial Matcher model's inference. + * + * @param configuration the configuration value to set. + * @return the TrialMatcherData object itself. + */ + @Generated + public TrialMatcherData setConfiguration(TrialMatcherModelConfiguration configuration) { + this.configuration = configuration; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("patients", this.patients, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("configuration", this.configuration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrialMatcherData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrialMatcherData if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TrialMatcherData. + */ + @Generated + public static TrialMatcherData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List patients = null; + TrialMatcherModelConfiguration configuration = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("patients".equals(fieldName)) { + patients = reader.readArray(reader1 -> PatientRecord.fromJson(reader1)); + } else if ("configuration".equals(fieldName)) { + configuration = TrialMatcherModelConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + TrialMatcherData deserializedTrialMatcherData = new TrialMatcherData(patients); + deserializedTrialMatcherData.configuration = configuration; + return deserializedTrialMatcherData; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInference.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInference.java new file mode 100644 index 000000000000..3add4d9a0c11 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInference.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * An inference made by the Trial Matcher model regarding a patient. + */ +@Immutable +public final class TrialMatcherInference implements JsonSerializable { + + /* + * The type of the Trial Matcher inference. + */ + @Generated + private final TrialMatcherInferenceType type; + + /* + * The value of the inference, as relevant for the given inference type. + */ + @Generated + private final String value; + + /* + * The description corresponding to the inference value. + */ + @Generated + private String description; + + /* + * Confidence score for this inference. + */ + @Generated + private Double confidenceScore; + + /* + * The evidence corresponding to the inference value. + */ + @Generated + private List evidence; + + /* + * The identifier of the clinical trial. + */ + @Generated + private String id; + + /* + * Possible sources of a clinical trial. + */ + @Generated + private ClinicalTrialSource source; + + /* + * Trial data which is of interest to the potential participant. + */ + @Generated + private ClinicalTrialMetadata metadata; + + /** + * Creates an instance of TrialMatcherInference class. + * + * @param type the type value to set. + * @param value the value value to set. + */ + @Generated + private TrialMatcherInference(TrialMatcherInferenceType type, String value) { + this.type = type; + this.value = value; + } + + /** + * Get the type property: The type of the Trial Matcher inference. + * + * @return the type value. + */ + @Generated + public TrialMatcherInferenceType getType() { + return this.type; + } + + /** + * Get the value property: The value of the inference, as relevant for the given inference type. + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * Get the description property: The description corresponding to the inference value. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Get the confidenceScore property: Confidence score for this inference. + * + * @return the confidenceScore value. + */ + @Generated + public Double getConfidenceScore() { + return this.confidenceScore; + } + + /** + * Get the evidence property: The evidence corresponding to the inference value. + * + * @return the evidence value. + */ + @Generated + public List getEvidence() { + return this.evidence; + } + + /** + * Get the id property: The identifier of the clinical trial. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the source property: Possible sources of a clinical trial. + * + * @return the source value. + */ + @Generated + public ClinicalTrialSource getSource() { + return this.source; + } + + /** + * Get the metadata property: Trial data which is of interest to the potential participant. + * + * @return the metadata value. + */ + @Generated + public ClinicalTrialMetadata getMetadata() { + return this.metadata; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeNumberField("confidenceScore", this.confidenceScore); + jsonWriter.writeArrayField("evidence", this.evidence, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("source", this.source == null ? null : this.source.toString()); + jsonWriter.writeJsonField("metadata", this.metadata); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrialMatcherInference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrialMatcherInference if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TrialMatcherInference. + */ + @Generated + public static TrialMatcherInference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrialMatcherInferenceType type = null; + String value = null; + String description = null; + Double confidenceScore = null; + List evidence = null; + String id = null; + ClinicalTrialSource source = null; + ClinicalTrialMetadata metadata = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("type".equals(fieldName)) { + type = TrialMatcherInferenceType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + value = reader.getString(); + } else if ("description".equals(fieldName)) { + description = reader.getString(); + } else if ("confidenceScore".equals(fieldName)) { + confidenceScore = reader.getNullable(JsonReader::getDouble); + } else if ("evidence".equals(fieldName)) { + evidence = reader.readArray(reader1 -> TrialMatcherInferenceEvidence.fromJson(reader1)); + } else if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("source".equals(fieldName)) { + source = ClinicalTrialSource.fromString(reader.getString()); + } else if ("metadata".equals(fieldName)) { + metadata = ClinicalTrialMetadata.fromJson(reader); + } else { + reader.skipChildren(); + } + } + TrialMatcherInference deserializedTrialMatcherInference = new TrialMatcherInference(type, value); + deserializedTrialMatcherInference.description = description; + deserializedTrialMatcherInference.confidenceScore = confidenceScore; + deserializedTrialMatcherInference.evidence = evidence; + deserializedTrialMatcherInference.id = id; + deserializedTrialMatcherInference.source = source; + deserializedTrialMatcherInference.metadata = metadata; + return deserializedTrialMatcherInference; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInferenceEvidence.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInferenceEvidence.java new file mode 100644 index 000000000000..dbc152e24046 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInferenceEvidence.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A piece of evidence corresponding to a Trial Matcher inference. + */ +@Immutable +public final class TrialMatcherInferenceEvidence implements JsonSerializable { + + /* + * A piece of evidence from the eligibility criteria text of a clinical trial. + */ + @Generated + private String eligibilityCriteriaEvidence; + + /* + * A piece of evidence from a clinical note (text document). + */ + @Generated + private ClinicalNoteEvidence patientDataEvidence; + + /* + * A piece of clinical information, expressed as a code in a clinical coding + * system. + */ + @Generated + private ClinicalCodedElement patientInfoEvidence; + + /* + * A value indicating how important this piece of evidence is for the inference. + */ + @Generated + private Double importance; + + /** + * Creates an instance of TrialMatcherInferenceEvidence class. + */ + @Generated + private TrialMatcherInferenceEvidence() { + } + + /** + * Get the eligibilityCriteriaEvidence property: A piece of evidence from the eligibility criteria text of a + * clinical trial. + * + * @return the eligibilityCriteriaEvidence value. + */ + @Generated + public String getEligibilityCriteriaEvidence() { + return this.eligibilityCriteriaEvidence; + } + + /** + * Get the patientDataEvidence property: A piece of evidence from a clinical note (text document). + * + * @return the patientDataEvidence value. + */ + @Generated + public ClinicalNoteEvidence getPatientDataEvidence() { + return this.patientDataEvidence; + } + + /** + * Get the patientInfoEvidence property: A piece of clinical information, expressed as a code in a clinical coding + * system. + * + * @return the patientInfoEvidence value. + */ + @Generated + public ClinicalCodedElement getPatientInfoEvidence() { + return this.patientInfoEvidence; + } + + /** + * Get the importance property: A value indicating how important this piece of evidence is for the inference. + * + * @return the importance value. + */ + @Generated + public Double getImportance() { + return this.importance; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("eligibilityCriteriaEvidence", this.eligibilityCriteriaEvidence); + jsonWriter.writeJsonField("patientDataEvidence", this.patientDataEvidence); + jsonWriter.writeJsonField("patientInfoEvidence", this.patientInfoEvidence); + jsonWriter.writeNumberField("importance", this.importance); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrialMatcherInferenceEvidence from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrialMatcherInferenceEvidence if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrialMatcherInferenceEvidence. + */ + @Generated + public static TrialMatcherInferenceEvidence fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrialMatcherInferenceEvidence deserializedTrialMatcherInferenceEvidence + = new TrialMatcherInferenceEvidence(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("eligibilityCriteriaEvidence".equals(fieldName)) { + deserializedTrialMatcherInferenceEvidence.eligibilityCriteriaEvidence = reader.getString(); + } else if ("patientDataEvidence".equals(fieldName)) { + deserializedTrialMatcherInferenceEvidence.patientDataEvidence + = ClinicalNoteEvidence.fromJson(reader); + } else if ("patientInfoEvidence".equals(fieldName)) { + deserializedTrialMatcherInferenceEvidence.patientInfoEvidence + = ClinicalCodedElement.fromJson(reader); + } else if ("importance".equals(fieldName)) { + deserializedTrialMatcherInferenceEvidence.importance = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + return deserializedTrialMatcherInferenceEvidence; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInferenceType.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInferenceType.java new file mode 100644 index 000000000000..54db28f914cf --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherInferenceType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the Trial Matcher inference. + */ +public final class TrialMatcherInferenceType extends ExpandableStringEnum { + + /** + * Static value trialEligibility for TrialMatcherInferenceType. + */ + @Generated + public static final TrialMatcherInferenceType TRIAL_ELIGIBILITY = fromString("trialEligibility"); + + /** + * Creates a new instance of TrialMatcherInferenceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TrialMatcherInferenceType() { + } + + /** + * Creates or finds a TrialMatcherInferenceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrialMatcherInferenceType. + */ + @Generated + public static TrialMatcherInferenceType fromString(String name) { + return fromString(name, TrialMatcherInferenceType.class); + } + + /** + * Gets known TrialMatcherInferenceType values. + * + * @return known TrialMatcherInferenceType values. + */ + @Generated + public static Collection values() { + return values(TrialMatcherInferenceType.class); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherModelConfiguration.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherModelConfiguration.java new file mode 100644 index 000000000000..8e20a40b455c --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherModelConfiguration.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Configuration affecting the Trial Matcher model's inference. + */ +@Fluent +public final class TrialMatcherModelConfiguration implements JsonSerializable { + + /* + * An indication whether the model should produce verbose output. + */ + @Generated + private Boolean verbose; + + /* + * An indication whether the model's output should include evidence for the inferences. + */ + @Generated + private Boolean includeEvidence; + + /* + * The clinical trials that the patient(s) should be matched to.
      The trial + * selection can be given as a list of custom clinical trials and/or a list of + * filters to known clinical trial registries. In case both are given, the + * resulting trial set is a union of the two sets. + */ + @Generated + private final ClinicalTrials clinicalTrials; + + /** + * Creates an instance of TrialMatcherModelConfiguration class. + * + * @param clinicalTrials the clinicalTrials value to set. + */ + @Generated + public TrialMatcherModelConfiguration(ClinicalTrials clinicalTrials) { + this.clinicalTrials = clinicalTrials; + } + + /** + * Get the verbose property: An indication whether the model should produce verbose output. + * + * @return the verbose value. + */ + @Generated + public Boolean isVerbose() { + return this.verbose; + } + + /** + * Set the verbose property: An indication whether the model should produce verbose output. + * + * @param verbose the verbose value to set. + * @return the TrialMatcherModelConfiguration object itself. + */ + @Generated + public TrialMatcherModelConfiguration setVerbose(Boolean verbose) { + this.verbose = verbose; + return this; + } + + /** + * Get the includeEvidence property: An indication whether the model's output should include evidence for the + * inferences. + * + * @return the includeEvidence value. + */ + @Generated + public Boolean isIncludeEvidence() { + return this.includeEvidence; + } + + /** + * Set the includeEvidence property: An indication whether the model's output should include evidence for the + * inferences. + * + * @param includeEvidence the includeEvidence value to set. + * @return the TrialMatcherModelConfiguration object itself. + */ + @Generated + public TrialMatcherModelConfiguration setIncludeEvidence(Boolean includeEvidence) { + this.includeEvidence = includeEvidence; + return this; + } + + /** + * Get the clinicalTrials property: The clinical trials that the patient(s) should be matched to. <br />The + * trial + * selection can be given as a list of custom clinical trials and/or a list of + * filters to known clinical trial registries. In case both are given, the + * resulting trial set is a union of the two sets. + * + * @return the clinicalTrials value. + */ + @Generated + public ClinicalTrials getClinicalTrials() { + return this.clinicalTrials; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("clinicalTrials", this.clinicalTrials); + jsonWriter.writeBooleanField("verbose", this.verbose); + jsonWriter.writeBooleanField("includeEvidence", this.includeEvidence); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrialMatcherModelConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrialMatcherModelConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TrialMatcherModelConfiguration. + */ + @Generated + public static TrialMatcherModelConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClinicalTrials clinicalTrials = null; + Boolean verbose = null; + Boolean includeEvidence = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("clinicalTrials".equals(fieldName)) { + clinicalTrials = ClinicalTrials.fromJson(reader); + } else if ("verbose".equals(fieldName)) { + verbose = reader.getNullable(JsonReader::getBoolean); + } else if ("includeEvidence".equals(fieldName)) { + includeEvidence = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + TrialMatcherModelConfiguration deserializedTrialMatcherModelConfiguration + = new TrialMatcherModelConfiguration(clinicalTrials); + deserializedTrialMatcherModelConfiguration.verbose = verbose; + deserializedTrialMatcherModelConfiguration.includeEvidence = includeEvidence; + return deserializedTrialMatcherModelConfiguration; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherPatientResult.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherPatientResult.java new file mode 100644 index 000000000000..8cd970cab73d --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherPatientResult.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The results of the model's work for a single patient. + */ +@Immutable +public final class TrialMatcherPatientResult implements JsonSerializable { + + /* + * The identifier given for the patient in the request. + */ + @Generated + private final String id; + + /* + * The model's inferences for the given patient. + */ + @Generated + private final List inferences; + + /* + * Clinical information which is needed to provide better trial matching results for the patient. + */ + @Generated + private List neededClinicalInfo; + + /** + * Creates an instance of TrialMatcherPatientResult class. + * + * @param id the id value to set. + * @param inferences the inferences value to set. + */ + @Generated + private TrialMatcherPatientResult(String id, List inferences) { + this.id = id; + this.inferences = inferences; + } + + /** + * Get the id property: The identifier given for the patient in the request. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the inferences property: The model's inferences for the given patient. + * + * @return the inferences value. + */ + @Generated + public List getInferences() { + return this.inferences; + } + + /** + * Get the neededClinicalInfo property: Clinical information which is needed to provide better trial matching + * results for the patient. + * + * @return the neededClinicalInfo value. + */ + @Generated + public List getNeededClinicalInfo() { + return this.neededClinicalInfo; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeArrayField("inferences", this.inferences, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("neededClinicalInfo", this.neededClinicalInfo, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrialMatcherPatientResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrialMatcherPatientResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TrialMatcherPatientResult. + */ + @Generated + public static TrialMatcherPatientResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + List inferences = null; + List neededClinicalInfo = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("inferences".equals(fieldName)) { + inferences = reader.readArray(reader1 -> TrialMatcherInference.fromJson(reader1)); + } else if ("neededClinicalInfo".equals(fieldName)) { + neededClinicalInfo = reader.readArray(reader1 -> ExtendedClinicalCodedElement.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + TrialMatcherPatientResult deserializedTrialMatcherPatientResult + = new TrialMatcherPatientResult(id, inferences); + deserializedTrialMatcherPatientResult.neededClinicalInfo = neededClinicalInfo; + return deserializedTrialMatcherPatientResult; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherResult.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherResult.java new file mode 100644 index 000000000000..160fae1053a6 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherResult.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.models.ResponseError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The response for the Trial Matcher request. + */ +@Immutable +public final class TrialMatcherResult implements JsonSerializable { + + /* + * A processing job identifier. + */ + @Generated + private String jobId; + + /* + * The date and time when the processing job was created. + */ + @Generated + private OffsetDateTime createdDateTime; + + /* + * The date and time when the processing job is set to expire. + */ + @Generated + private OffsetDateTime expirationDateTime; + + /* + * The date and time when the processing job was last updated. + */ + @Generated + private OffsetDateTime lastUpdateDateTime; + + /* + * The status of the processing job. + */ + @Generated + private JobStatus status; + + /* + * An array of errors, if any errors occurred during the processing job. + */ + @Generated + private List errors; + + /* + * The inference results for the Trial Matcher request. + */ + @Generated + private TrialMatcherResults results; + + /** + * Creates an instance of TrialMatcherResult class. + */ + @Generated + private TrialMatcherResult() { + } + + /** + * Get the jobId property: A processing job identifier. + * + * @return the jobId value. + */ + @Generated + public String getJobId() { + return this.jobId; + } + + /** + * Get the createdDateTime property: The date and time when the processing job was created. + * + * @return the createdDateTime value. + */ + @Generated + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Get the expirationDateTime property: The date and time when the processing job is set to expire. + * + * @return the expirationDateTime value. + */ + @Generated + public OffsetDateTime getExpirationDateTime() { + return this.expirationDateTime; + } + + /** + * Get the lastUpdateDateTime property: The date and time when the processing job was last updated. + * + * @return the lastUpdateDateTime value. + */ + @Generated + public OffsetDateTime getLastUpdateDateTime() { + return this.lastUpdateDateTime; + } + + /** + * Get the status property: The status of the processing job. + * + * @return the status value. + */ + @Generated + public JobStatus getStatus() { + return this.status; + } + + /** + * Get the errors property: An array of errors, if any errors occurred during the processing job. + * + * @return the errors value. + */ + @Generated + public List getErrors() { + return this.errors; + } + + /** + * Get the results property: The inference results for the Trial Matcher request. + * + * @return the results value. + */ + @Generated + public TrialMatcherResults getResults() { + return this.results; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrialMatcherResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrialMatcherResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TrialMatcherResult. + */ + @Generated + public static TrialMatcherResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrialMatcherResult deserializedTrialMatcherResult = new TrialMatcherResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("jobId".equals(fieldName)) { + deserializedTrialMatcherResult.jobId = reader.getString(); + } else if ("createdDateTime".equals(fieldName)) { + deserializedTrialMatcherResult.createdDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("expirationDateTime".equals(fieldName)) { + deserializedTrialMatcherResult.expirationDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastUpdateDateTime".equals(fieldName)) { + deserializedTrialMatcherResult.lastUpdateDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("status".equals(fieldName)) { + deserializedTrialMatcherResult.status = JobStatus.fromString(reader.getString()); + } else if ("errors".equals(fieldName)) { + List errors = reader.readArray(reader1 -> ResponseError.fromJson(reader1)); + deserializedTrialMatcherResult.errors = errors; + } else if ("results".equals(fieldName)) { + deserializedTrialMatcherResult.results = TrialMatcherResults.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedTrialMatcherResult; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherResults.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherResults.java new file mode 100644 index 000000000000..c615f3f00b12 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/TrialMatcherResults.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.health.insights.clinicalmatching.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.util.List; +import java.util.Objects; + +/** + * The inference results for the Trial Matcher request. + */ +@Immutable +public final class TrialMatcherResults implements JsonSerializable { + + /* + * Results for the patients given in the request. + */ + @Generated + private final List patients; + + /* + * The version of the model used for inference, expressed as the model date. + */ + @Generated + private final String modelVersion; + + /* + * The date when the clinical trials knowledge graph was last updated. + */ + @Generated + private LocalDate knowledgeGraphLastUpdateDate; + + /** + * Creates an instance of TrialMatcherResults class. + * + * @param patients the patients value to set. + * @param modelVersion the modelVersion value to set. + */ + @Generated + private TrialMatcherResults(List patients, String modelVersion) { + this.patients = patients; + this.modelVersion = modelVersion; + } + + /** + * Get the patients property: Results for the patients given in the request. + * + * @return the patients value. + */ + @Generated + public List getPatients() { + return this.patients; + } + + /** + * Get the modelVersion property: The version of the model used for inference, expressed as the model date. + * + * @return the modelVersion value. + */ + @Generated + public String getModelVersion() { + return this.modelVersion; + } + + /** + * Get the knowledgeGraphLastUpdateDate property: The date when the clinical trials knowledge graph was last + * updated. + * + * @return the knowledgeGraphLastUpdateDate value. + */ + @Generated + public LocalDate getKnowledgeGraphLastUpdateDate() { + return this.knowledgeGraphLastUpdateDate; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("patients", this.patients, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("modelVersion", this.modelVersion); + jsonWriter.writeStringField("knowledgeGraphLastUpdateDate", + Objects.toString(this.knowledgeGraphLastUpdateDate, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrialMatcherResults from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrialMatcherResults if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TrialMatcherResults. + */ + @Generated + public static TrialMatcherResults fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List patients = null; + String modelVersion = null; + LocalDate knowledgeGraphLastUpdateDate = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("patients".equals(fieldName)) { + patients = reader.readArray(reader1 -> TrialMatcherPatientResult.fromJson(reader1)); + } else if ("modelVersion".equals(fieldName)) { + modelVersion = reader.getString(); + } else if ("knowledgeGraphLastUpdateDate".equals(fieldName)) { + knowledgeGraphLastUpdateDate + = reader.getNullable(nonNullReader -> LocalDate.parse(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + TrialMatcherResults deserializedTrialMatcherResults = new TrialMatcherResults(patients, modelVersion); + deserializedTrialMatcherResults.knowledgeGraphLastUpdateDate = knowledgeGraphLastUpdateDate; + return deserializedTrialMatcherResults; + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/package-info.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/package-info.java new file mode 100644 index 000000000000..d0eec535cc28 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the data models for AzureHealthInsights. + * Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that + * perform analysis and provide inferences to be used by a human. + * + */ +package com.azure.health.insights.clinicalmatching.models; diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/package-info.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/package-info.java new file mode 100644 index 000000000000..c74aa51c65bb --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/com/azure/health/insights/clinicalmatching/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +/** + * + * Package containing the classes for AzureHealthInsights. + * Azure Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that + * perform analysis and provide inferences to be used by a human. + * + */ +package com.azure.health.insights.clinicalmatching; diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/module-info.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/module-info.java new file mode 100644 index 000000000000..899706d635c6 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +module com.azure.health.insights.clinicalmatching { + requires transitive com.azure.core; + + exports com.azure.health.insights.clinicalmatching; + exports com.azure.health.insights.clinicalmatching.models; + + opens com.azure.health.insights.clinicalmatching.models to com.azure.core; +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/resources/META-INF/azure-health-insights-clinicalmatching_apiview_properties.json b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/resources/META-INF/azure-health-insights-clinicalmatching_apiview_properties.json new file mode 100644 index 000000000000..a8258eedb5ae --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/resources/META-INF/azure-health-insights-clinicalmatching_apiview_properties.json @@ -0,0 +1,55 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.health.insights.clinicalmatching.ClinicalMatchingAsyncClient": "ClientForAzureHealthInsights.ClinicalMatchingClient", + "com.azure.health.insights.clinicalmatching.ClinicalMatchingAsyncClient.beginMatchTrials": "ClientForAzureHealthInsights.ClinicalMatchingClient.matchTrials", + "com.azure.health.insights.clinicalmatching.ClinicalMatchingAsyncClient.beginMatchTrialsWithModel": "ClientForAzureHealthInsights.ClinicalMatchingClient.matchTrials", + "com.azure.health.insights.clinicalmatching.ClinicalMatchingClient": "ClientForAzureHealthInsights.ClinicalMatchingClient", + "com.azure.health.insights.clinicalmatching.ClinicalMatchingClient.beginMatchTrials": "ClientForAzureHealthInsights.ClinicalMatchingClient.matchTrials", + "com.azure.health.insights.clinicalmatching.ClinicalMatchingClient.beginMatchTrialsWithModel": "ClientForAzureHealthInsights.ClinicalMatchingClient.matchTrials", + "com.azure.health.insights.clinicalmatching.ClinicalMatchingClientBuilder": "ClientForAzureHealthInsights.ClinicalMatchingClient", + "com.azure.health.insights.clinicalmatching.models.AcceptedAge": "AzureHealthInsights.AcceptedAge", + "com.azure.health.insights.clinicalmatching.models.AcceptedAgeRange": "AzureHealthInsights.AcceptedAgeRange", + "com.azure.health.insights.clinicalmatching.models.AgeUnit": "AzureHealthInsights.AgeUnit", + "com.azure.health.insights.clinicalmatching.models.AreaGeometry": "AzureHealthInsights.AreaGeometry", + "com.azure.health.insights.clinicalmatching.models.AreaProperties": "AzureHealthInsights.AreaProperties", + "com.azure.health.insights.clinicalmatching.models.ClinicalCodedElement": "AzureHealthInsights.ClinicalCodedElement", + "com.azure.health.insights.clinicalmatching.models.ClinicalDocumentType": "AzureHealthInsights.ClinicalDocumentType", + "com.azure.health.insights.clinicalmatching.models.ClinicalNoteEvidence": "AzureHealthInsights.ClinicalNoteEvidence", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialAcceptedSex": "AzureHealthInsights.ClinicalTrialAcceptedSex", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialDemographics": "AzureHealthInsights.ClinicalTrialDemographics", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialDetails": "AzureHealthInsights.ClinicalTrialDetails", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialMetadata": "AzureHealthInsights.ClinicalTrialMetadata", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialPhase": "AzureHealthInsights.ClinicalTrialPhase", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialPurpose": "AzureHealthInsights.ClinicalTrialPurpose", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialRecruitmentStatus": "AzureHealthInsights.ClinicalTrialRecruitmentStatus", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialRegistryFilter": "AzureHealthInsights.ClinicalTrialRegistryFilter", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialResearchFacility": "AzureHealthInsights.ClinicalTrialResearchFacility", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialSource": "AzureHealthInsights.ClinicalTrialSource", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrialStudyType": "AzureHealthInsights.ClinicalTrialStudyType", + "com.azure.health.insights.clinicalmatching.models.ClinicalTrials": "AzureHealthInsights.ClinicalTrials", + "com.azure.health.insights.clinicalmatching.models.ContactDetails": "AzureHealthInsights.ContactDetails", + "com.azure.health.insights.clinicalmatching.models.DocumentContent": "AzureHealthInsights.DocumentContent", + "com.azure.health.insights.clinicalmatching.models.DocumentContentSourceType": "AzureHealthInsights.DocumentContentSourceType", + "com.azure.health.insights.clinicalmatching.models.DocumentType": "AzureHealthInsights.DocumentType", + "com.azure.health.insights.clinicalmatching.models.ExtendedClinicalCodedElement": "AzureHealthInsights.ExtendedClinicalCodedElement", + "com.azure.health.insights.clinicalmatching.models.GeoJsonGeometryType": "AzureHealthInsights.GeoJsonGeometryType", + "com.azure.health.insights.clinicalmatching.models.GeoJsonPropertiesSubType": "AzureHealthInsights.GeoJsonPropertiesSubType", + "com.azure.health.insights.clinicalmatching.models.GeoJsonType": "AzureHealthInsights.GeoJsonType", + "com.azure.health.insights.clinicalmatching.models.GeographicArea": "AzureHealthInsights.GeographicArea", + "com.azure.health.insights.clinicalmatching.models.GeographicLocation": "AzureHealthInsights.GeographicLocation", + "com.azure.health.insights.clinicalmatching.models.JobStatus": "AzureHealthInsights.JobStatus", + "com.azure.health.insights.clinicalmatching.models.PatientDocument": "AzureHealthInsights.PatientDocument", + "com.azure.health.insights.clinicalmatching.models.PatientInfo": "AzureHealthInsights.PatientInfo", + "com.azure.health.insights.clinicalmatching.models.PatientInfoSex": "AzureHealthInsights.PatientInfoSex", + "com.azure.health.insights.clinicalmatching.models.PatientRecord": "AzureHealthInsights.PatientRecord", + "com.azure.health.insights.clinicalmatching.models.TrialMatcherData": "AzureHealthInsights.TrialMatcherData", + "com.azure.health.insights.clinicalmatching.models.TrialMatcherInference": "AzureHealthInsights.TrialMatcherInference", + "com.azure.health.insights.clinicalmatching.models.TrialMatcherInferenceEvidence": "AzureHealthInsights.TrialMatcherInferenceEvidence", + "com.azure.health.insights.clinicalmatching.models.TrialMatcherInferenceType": "AzureHealthInsights.TrialMatcherInferenceType", + "com.azure.health.insights.clinicalmatching.models.TrialMatcherModelConfiguration": "AzureHealthInsights.TrialMatcherModelConfiguration", + "com.azure.health.insights.clinicalmatching.models.TrialMatcherPatientResult": "AzureHealthInsights.TrialMatcherPatientResult", + "com.azure.health.insights.clinicalmatching.models.TrialMatcherResult": "AzureHealthInsights.TrialMatcherResult", + "com.azure.health.insights.clinicalmatching.models.TrialMatcherResults": "AzureHealthInsights.TrialMatcherResults" + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/resources/azure-health-insights-clinicalmatching.properties b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/resources/azure-health-insights-clinicalmatching.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/main/resources/azure-health-insights-clinicalmatching.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples/README.md b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples/README.md new file mode 100644 index 000000000000..239a5260c64a --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples/README.md @@ -0,0 +1,28 @@ +--- +page_type: sample +languages: + - java +products: + - azure + - azure-cognitive-services + - azure-health-insights +urlFragment: healthinsights-java-samples +--- + +# Azure Health Insights client library samples for Java + +Azure Health Insights Clinical Matching samples are a set of self-contained Java programs that demonstrate interacting with Azure self-contained service using the client library. Each sample focuses on a specific scenario and can be executed independently. + + +## Examples + +The following sections provide code samples covering common scenario operations with the Azure Health Insights ClinicalMatching client library. + +All of these samples need the endpoint to your Health Insights resource, and your Health Insights API key. + +|**File Name**|**Description**| +|----------------|-------------| +|[SampleMatchTrialAsync.java][match_trials_async]|Get all matching clinical trials for a specific patient (async)| + + +[match_trials_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples/java/com/azure/health/insights/clinicalmatching/SampleMatchTrialAsync.java diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples/java/com/azure/health/insights/clinicalmatching/SampleMatchTrialAsync.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples/java/com/azure/health/insights/clinicalmatching/SampleMatchTrialAsync.java new file mode 100644 index 000000000000..e2a9d1469068 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/samples/java/com/azure/health/insights/clinicalmatching/SampleMatchTrialAsync.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.health.insights.clinicalmatching; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.function.Predicate; + +import com.azure.core.util.Configuration; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherData; +import com.azure.health.insights.clinicalmatching.models.GeographicLocation; +import com.azure.health.insights.clinicalmatching.models.ClinicalTrials; +import com.azure.health.insights.clinicalmatching.models.ClinicalTrialSource; +import com.azure.health.insights.clinicalmatching.models.ClinicalTrialRegistryFilter; +import com.azure.health.insights.clinicalmatching.models.PatientInfoSex; +import com.azure.health.insights.clinicalmatching.models.ClinicalCodedElement; +import com.azure.health.insights.clinicalmatching.models.PatientInfo; +import com.azure.health.insights.clinicalmatching.models.PatientRecord; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherModelConfiguration; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherResults; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherResult; +import com.azure.health.insights.clinicalmatching.models.ClinicalTrialStudyType; +import com.azure.health.insights.clinicalmatching.models.ClinicalTrialPhase; + +/* + * This example demonstrates Finding potential eligible trials for a patient, + * based on patient’s structured medical information. + * + * It looks for structured clinical trials that were taken from ClinicalTrials.gov + * Trial Matcher model matches a single patient to a set of relevant clinical trials, + * that this patient appears to be qualified for. This use case will demonstrate: + * a. How to use the trial matcher when patient clinical health information is provided to the + * Trial Matcher in a key-value structure with coded elements. + * b. How to use the clinical trial configuration to narrow down the trial condition, + * recruitment status, location and other criteria that the service users may choose to prioritize. + */ +public class SampleMatchTrialAsync { + public static void main(final String[] args) throws InterruptedException { + // BEGIN: com.azure.health.insights.clinicalmatching.buildasyncclient + String endpoint = Configuration.getGlobalConfiguration().get("AZURE_HEALTH_INSIGHTS_ENDPOINT"); + String apiKey = Configuration.getGlobalConfiguration().get("AZURE_HEALTH_INSIGHTS_API_KEY"); + + ClinicalMatchingAsyncClient asyncClient = new ClinicalMatchingClientBuilder() + .endpoint(endpoint) + .serviceVersion(AzureHealthInsightsServiceVersion.getLatest()) + .credential(new AzureKeyCredential(apiKey)) + .buildAsyncClient(); + // END: com.azure.health.insights.clinicalmatching.buildasyncclient + + // BEGIN: com.azure.health.insights.clinicalmatching.findtrials + // Construct Patient + PatientRecord patient1 = new PatientRecord("patient_1"); + PatientInfo patientInfo = new PatientInfo(); + patientInfo.setBirthDate(LocalDate.parse("1965-12-26")); + patientInfo.setSex(PatientInfoSex.MALE); + final List clinicalInfo = new ArrayList(); + patientInfo.setClinicalInfo(clinicalInfo); + patient1.setInfo(patientInfo); + + final String system = "http://www.nlm.nih.gov/research/umls"; + // Attach clinical info to the patient + clinicalInfo.add(createClinicalCodedElement(system, "C0006826", "Malignant Neoplasms", "true")); + clinicalInfo.add(createClinicalCodedElement(system, "C1522449", "Therapeutic radiology procedure", "true")); + clinicalInfo.add(createClinicalCodedElement(system, "C1512162", "Eastern Cooperative Oncology Group", "1")); + clinicalInfo.add(createClinicalCodedElement(system, "C0019693", "HIV Infections", "false")); + clinicalInfo.add(createClinicalCodedElement(system, "C1300072", "Tumor stage", "2")); + clinicalInfo.add(createClinicalCodedElement(system, "METASTATIC", "metastatic", "true")); + clinicalInfo.add(createClinicalCodedElement(system, "C0019163", "Hepatitis B", "false")); + clinicalInfo.add(createClinicalCodedElement(system, "C0018802", "Congestive heart failure", "true")); + clinicalInfo.add(createClinicalCodedElement(system, "C0019196", "Hepatitis C", "false")); + clinicalInfo.add(createClinicalCodedElement(system, "C0220650", "Metastatic malignant neoplasm to brain", "true")); + + // Create registry filter + ClinicalTrialRegistryFilter registryFilters = new ClinicalTrialRegistryFilter(); + // Limit the trial to a specific patient condition ("Non-small cell lung cancer") + registryFilters.setConditions(Arrays.asList("Non-small cell lung cancer")); + // Limit the clinical trial to a certain phase, phase 1 + registryFilters.setPhases(Arrays.asList(ClinicalTrialPhase.PHASE1)); + // Specify the clinical trial registry source as ClinicalTrials.Gov + registryFilters.setSources(Arrays.asList(ClinicalTrialSource.CLINICALTRIALS_GOV)); + // Limit the clinical trial to a certain location, in this case California, USA + + GeographicLocation location = new GeographicLocation("United States"); + location.setCity("Gilbert"); + location.setState("Arizona"); + registryFilters.setFacilityLocations(Arrays.asList(location)); + // Limit the trial to a specific study type, interventional + registryFilters.setStudyTypes(Arrays.asList(ClinicalTrialStudyType.INTERVENTIONAL)); + + // Construct ClinicalTrial instance and attach the registry filter to it. + ClinicalTrials clinicalTrials = new ClinicalTrials(); + clinicalTrials.setRegistryFilters(Arrays.asList(registryFilters)); + + // Create TrialMatcherData + TrialMatcherModelConfiguration configuration = new TrialMatcherModelConfiguration(clinicalTrials); + TrialMatcherData trialMatcherData = new TrialMatcherData(Arrays.asList(patient1)); + trialMatcherData.setConfiguration(configuration); + + PollerFlux asyncPoller = asyncClient.beginMatchTrials(trialMatcherData); + // END: com.azure.health.insights.clinicalmatching.findtrials + asyncPoller + .takeUntil(IS_COMPLETE) + .subscribe(completedResult -> { + System.out.println("Completed poll response, status: " + completedResult.getStatus()); + printResults(completedResult.getValue()); + LATCH.countDown(); + }); + + LATCH.await(); + } + + private static void printResults(TrialMatcherResult tmRespone) { + TrialMatcherResults tmResults = tmRespone.getResults(); + + tmResults.getPatients().forEach(patientResult -> { + System.out.println("Inferences of Patient " + patientResult.getId()); + patientResult.getInferences().forEach(inference -> { + System.out.println("Trial Id " + inference.getId()); + System.out.println("Type: " + inference.getType() + " Value: " + inference.getValue()); + System.out.println("Description " + inference.getDescription()); + }); + }); + } + + private static ClinicalCodedElement createClinicalCodedElement(String system, String code, String name, String value) { + ClinicalCodedElement element = new ClinicalCodedElement(system, code); + element.setName(name); + element.setValue(value); + return element; + } + + private static final Predicate> IS_COMPLETE + = response -> response.getStatus() != LongRunningOperationStatus.IN_PROGRESS + && response.getStatus() != LongRunningOperationStatus.NOT_STARTED; + + private static final CountDownLatch LATCH = new CountDownLatch(1); +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientTest.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientTest.java new file mode 100644 index 000000000000..98b4dbbba4ca --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientTest.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.health.insights.clinicalmatching; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherPatientResult; +import com.azure.health.insights.clinicalmatching.models.TrialMatcherResults; +import org.junit.jupiter.api.Test; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; + +/** + * Unit tests for {@link ClinicalMatchingClient}. + */ +public class ClinicalMatchingClientTest extends ClinicalMatchingClientTestBase { + + private ClinicalMatchingClient getClient() { + return getClientBuilder().buildClient(); + } + + @Test + public void test() { + // playback + testTMWithResponse(request -> { + BinaryData responseValue + = setPlaybackSyncPollerPollInterval(getClient().beginMatchTrials(request, new RequestOptions())) + .getFinalResult(); + TrialMatcherResults tmRespone = responseValue.toObject(TrialMatcherResults.class); + List patients = tmRespone.getPatients(); + assertEquals(1, patients.size()); + TrialMatcherPatientResult patient = patients.get(0); + assertFalse(patient.getInferences().isEmpty(), "at least one inference should be returned"); + }); + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientTestBase.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientTestBase.java new file mode 100644 index 000000000000..db7f1b03d3e8 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/ClinicalMatchingClientTestBase.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.health.insights.clinicalmatching; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.models.CustomMatcher; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; + +import java.io.File; +import java.util.Arrays; +import java.util.function.Consumer; + +/** + * Base class for TM clients test. + */ +public class ClinicalMatchingClientTestBase extends TestProxyTestBase { + private static final String FAKE_API_KEY = "fakeKeyPlaceholder"; + + void testTMWithResponse(Consumer testRunner) { + testRunner.accept(getTMRequest()); + } + + ClinicalMatchingClientBuilder getClientBuilder() { + String apiKey = Configuration.getGlobalConfiguration().get("AZURE_HEALTHINSIGHTS_API_KEY", FAKE_API_KEY); + String endpoint + = Configuration.getGlobalConfiguration().get("AZURE_HEALTHINSIGHTS_ENDPOINT", "https://localhost:8080"); + + ClinicalMatchingClientBuilder builder + = new ClinicalMatchingClientBuilder().endpoint(endpoint).credential(new AzureKeyCredential(apiKey)); + if (getTestMode() == TestMode.RECORD) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } else if (getTestMode() == TestMode.PLAYBACK) { + builder.httpClient(interceptorManager.getPlaybackClient()); + interceptorManager.addMatchers(Arrays.asList(new CustomMatcher() + .setHeadersKeyOnlyMatch(Arrays.asList("repeatability-first-sent", "repeatability-request-id")))); + } + if (!interceptorManager.isLiveMode()) { + // Remove `operation-location` sanitizers from the list of common sanitizers. + interceptorManager.removeSanitizers("AZSDK2030"); + } + return builder; + } + + private BinaryData getTMRequest() { + File requestFile = new File( + ClinicalMatchingClientTestBase.class.getResource("/ClinicalMatchingClientTest.request.json").getPath()); + try { + return BinaryData.fromFile(requestFile.toPath()); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/generated/ClinicalMatchingClientTestBase.java b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/generated/ClinicalMatchingClientTestBase.java new file mode 100644 index 000000000000..021ddf4d63bd --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/java/com/azure/health/insights/clinicalmatching/generated/ClinicalMatchingClientTestBase.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.health.insights.clinicalmatching.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.util.Configuration; +import com.azure.health.insights.clinicalmatching.ClinicalMatchingClient; +import com.azure.health.insights.clinicalmatching.ClinicalMatchingClientBuilder; + +class ClinicalMatchingClientTestBase extends TestProxyTestBase { + protected ClinicalMatchingClient clinicalMatchingClient; + + @Override + protected void beforeTest() { + ClinicalMatchingClientBuilder clinicalMatchingClientbuilder = new ClinicalMatchingClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + clinicalMatchingClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + clinicalMatchingClient = clinicalMatchingClientbuilder.buildClient(); + + } +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/resources/ClinicalMatchingClientTest.request.json b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/resources/ClinicalMatchingClientTest.request.json new file mode 100644 index 000000000000..e296af434d05 --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/resources/ClinicalMatchingClientTest.request.json @@ -0,0 +1,50 @@ +{ + "configuration": { + "clinicalTrials": { + "registryFilters": [ + { + "conditions": [ + "Diabetes" + ], + "phases": [ + "phase1" + ], + "sources": [ + "clinicaltrials.gov" + ], + "facilityLocations": [ + { + "state": "CA", + "countryOrRegion": "United States" + } + ] + } + ] + }, + "verbose": false, + "includeEvidence": true + }, + "patients": [ + { + "id": "98824209", + "info": { + "sex": "female", + "birthDate": "1980-12-26T00:00:00\u002B00:00", + "clinicalInfo": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0006826", + "name": "MalignantNeoplasms", + "value": "true" + }, + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0018802", + "name": "MalignantNeoplasms", + "value": "false" + } + ] + } + } + ] +} diff --git a/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/resources/Sample_MatchTrial_PatientFhir.json b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/resources/Sample_MatchTrial_PatientFhir.json new file mode 100644 index 000000000000..9623f459c83a --- /dev/null +++ b/sdk/healthinsights/azure-health-insights-clinicalmatching/src/test/resources/Sample_MatchTrial_PatientFhir.json @@ -0,0 +1,37509 @@ +{ + "resourceType": "Bundle", + "id": "1ca45d61-eb04-4c7d-9784-05e31e03e3c6", + "meta": { + "profile": [ + "http://hl7.org/fhir/4.0.1/StructureDefinition/Bundle" + ] + }, + "identifier": { + "system": "urn:ietf:rfc:3986", + "value": "urn:uuid:1ca45d61-eb04-4c7d-9784-05e31e03e3c6" + }, + "type": "document", + "entry": [ + { + "fullUrl": "Composition/baff5da4-0b29-4a57-906d-0e23d6d49eea", + "resource": { + "resourceType": "Composition", + "id": "baff5da4-0b29-4a57-906d-0e23d6d49eea", + "status": "final", + "type": { + "coding": [ + { + "system": "http://loinc.org", + "code": "11488-4", + "display": "Consult note" + } + ], + "text": "Consult note" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "date": "2022-08-16", + "author": [ + { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + ], + "title": "Consult note", + "section": [ + { + "title": "Chief Complaint", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "46239-0", + "display": "Reason for visit and chief complaint" + } + ], + "text": "Chief Complaint" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Chief Complaint

      \r\n\t\t\t\t\t\t\t

      \"swelling of tongue and difficulty breathing and swallowing\"

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/a7ba1fc8-7544-4f1a-ac4e-c0430159001f", + "type": "List", + "display": "Chief Complaint" + } + ] + }, + { + "title": "History of Present Illness", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "10164-2", + "display": "History of present illness" + } + ], + "text": "History of Present Illness" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      History of Present Illness

      \r\n\t\t\t\t\t\t\t

      77 y o woman in NAD with a h/o CAD, DM2, asthma and HTN on altace for 8 years awoke from sleep around 2:30 am this morning of a sore throat and swelling of tongue. She came immediately to the ED b/c she was having difficulty swallowing and some trouble breathing due to obstruction caused by the swelling. She has never had a similar reaction ever before and she did not have any associated SOB, chest pain, itching, or nausea. She has not noticed any rashes, and has been afebrile. She says that she feels like it is swollen down in her esophagus as well. In the ED she was given 25mg benadryl IV, 125 mg solumedrol IV and pepcid 20 mg IV. This has helped the swelling some but her throat still hurts and it hurts to swallow. Nothing else was able to relieve the pain and nothing make it worse though she has not tried to drink any fluids because of trouble swallowing. She denies any recent travel, recent exposure to unusual plants or animals or other allergens. She has not started any new medications, has not used any new lotions or perfumes and has not eaten any unusual foods. Patient has not taken any of her oral medications today.

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/c1c10373-6325-4339-b962-c3c114969ccd", + "type": "List", + "display": "History of Present Illness" + } + ] + }, + { + "title": "Surgical History", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "10164-2", + "display": "History of present illness" + } + ], + "text": "Surgical History" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Surgical History

      \r\n\t\t\t\t\t\t\t

      s/p Cardiac stent in 1999 \r\ns/p hystarectomy in 1970s \r\ns/p kidney stone retrieval 1960s

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/1d5dcbe4-7206-4a27-b3a8-52e4d30dacfe", + "type": "List", + "display": "Surgical History" + } + ] + }, + { + "title": "Medical History", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "11348-0", + "display": "Past medical history" + } + ], + "text": "Medical History" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Medical History

      \r\n\t\t\t\t\t\t\t

      + CAD w/ Left heart cath in 2005 showing 40% LAD, 50% small D2, 40% RCA and 30% large OM; 2006 TTE showing LVEF 60-65% with diastolic dysfunction, LVH, mild LA dilation \r\n+ Hyperlipidemia \r\n+ HTN \r\n+ DM 2, last A1c 6.7 in 9/2005 \r\n+ Asthma/COPD \r\n+ GERD \r\n+ h/o iron deficiency anemia

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/e0ed81ae-184e-44ce-b45a-2da9cd2eba9c", + "type": "List", + "display": "Medical History" + } + ] + }, + { + "title": "Social History", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "29762-2", + "display": "Social History" + } + ], + "text": "Social History" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Social History

      \r\n\t\t\t\t\t\t\t

      Patient lives in _______ with daughter _____ (919) _______. Patient does all ADLs and IADLs with no/little assistance. She does own finances and drives. Patient has 4 daughters that all live in the area. Patient does not use tobacco, alcohol, illicit drugs.

      \r\n\t\t\t\t\t
      " + } + }, + { + "title": "Family History", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "10157-6", + "display": "Family History" + } + ], + "text": "Family History" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Family History

      \r\n\t\t\t\t\t\t\t

      Patient's Dad died of liver cirrhosis at age 57, mom died of heart attack at age 60. She has 6 siblings who most died of cardiac disease. There is no family history of cancer.

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/22ec7727-c4ca-4477-a42b-51d34a935da6", + "type": "List", + "display": "Family History" + } + ] + }, + { + "title": "Allergies", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "48765-2", + "display": "Allergies and adverse reactions" + } + ], + "text": "Allergies" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Allergies

      \r\n\t\t\t\t\t\t\t

      Sulfa drugs - rash \r\nCipro - rash \r\nBenadryl – causes mild dystonic reaction

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/ef6382f6-5089-4eda-9145-d44be736d451", + "type": "List", + "display": "Allergies" + } + ] + }, + { + "title": "Medications", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "10160-0", + "display": "Medications" + } + ], + "text": "Medications" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Medications

      \r\n\t\t\t\t\t\t\t

      Theophyline (Uniphyl) 600 mg qhs – bronchodilator by increasing cAMP used for \r\ntreating asthma \r\nDiltiazem 300 mg qhs – Ca channel blocker used to control hypertension \r\nSimvistatin (Zocor) 20 mg qhs- HMGCo Reductase inhibitor for hypercholesterolemia \r\nRamipril (Altace) 10 mg BID – ACEI for hypertension and diabetes for renal protective \r\neffect \r\nGlipizide 5 mg BID (diabetes) – sulfonylurea for treatment of diabetes \r\nOmecprazole (Prilosec) 20 mg daily (reflux) – PPI for treatment of ulcers \r\nGabapentin (Neurontin) 100 mg qhs – modulates release of neurotransmitters to treat \r\ndiabetic neuropathy \r\nMetformin 500 mg qam – biguanide used to treat diabetes \r\nAspirin 81 mg qam - prophylaxis for MI and TIA \r\nFluticasone (Flovent) 2 puff bid - corticosteroid to treat airways in asthma/copd \r\nxoperex 1.25mg and Ipratropium 2.5 ml nebulized qam - anticholinergic to treat airways \r\nin COPD

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/c5490e7d-7447-4f89-8a7d-9871439d55e7", + "type": "List", + "display": "Medications" + } + ] + }, + { + "title": "Review of Systems", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "10187-3", + "display": "Review of systems" + } + ], + "text": "Review of Systems" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Review of Systems

      \r\n\t\t\t\t\t\t\t

      Constitutional - NAD, has been generally feeling well the last couple of weeks \r\nEyes - no changes in vision, double vision, blurry vision, wears glasses \r\nENT - No congestion, changes in hearing, does not wear hearing aids \r\nSkin/Breast - no rashes \r\nCardiovascular - No SOB, chest pain, heart palpitations \r\nPulmonary - hard to get a breath in but not short of breath, no cough \r\nEndocrine - No changes in appetite \r\nGastro Intestinal - No n/v/d or constipation. Has not eaten because can't swallow solid \r\nfoods. \r\nGenito Urinary - No increased frequency or pain on urination. Some urge incontinence \r\nwith history of prolapse.

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/cd98589b-54af-4d9f-8fa7-f0ac32bd4df0", + "type": "List", + "display": "Review of Systems" + } + ] + }, + { + "title": "Physical Examination", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "29545-1", + "display": "Physical findings" + } + ], + "text": "Physical Examination" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Physical Examination

      \r\n\t\t\t\t\t\t\t

      Vitals: \r\nTemp 35.9 \r\nPulse 76 \r\nO2 98% RA \r\nRR 20 \r\nBP 159/111 \r\n\r\nGeneral - NAD, sitting up in bed, well groomed and in nightgown \r\nEyes - PERRLA, EOM intact \r\nENT - Large swollen tounge and cheek on left side, tounge was large and obscured the view of the posterior oropharynx \r\nNeck - No noticeable or palpable swelling, redness or rash around throat or on face \r\nLymph Nodes - No lymphadenopathy \r\nCardiovascular - RRR no m/r/g, no JVD, no carotid bruits \r\nLungs - Clear to auscltation, no use of acessory muscles, no crackles or wheezes. \r\nSkin - No rashes, skin warm and dry, no erythematous areas \r\nAbdomen - Normal bowel sounds, abdomen soft and nontender \r\nExtremeties - No edema, cyanosis or clubbing \r\nMusculo Skeletal - 5/5 strength, normal range of motion, no swollen or erythematous \r\njoints. \r\nNeurological – Alert and oriented x 3, CN 2-12 grossly intact.

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/4353769c-64cc-4659-a239-efea24311f2e", + "type": "List", + "display": "Physical Examination" + } + ] + }, + { + "title": "Pertinent Diagnostic Tests", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "22636-5", + "display": "Pathology report relevant history" + } + ], + "text": "Pertinent Diagnostic Tests" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Pertinent Diagnostic Tests

      \r\n\t\t\t\t\t\t\t

      Na 140 \r\nK 4.5 \r\nCl 109 \r\nCo2 23 \r\nBUN 29 \r\nCr 1.0 \r\nCa 9.9 \r\nMg 1.4 \r\nPhos 3.6 \r\n\r\nPTT 26.7 \r\n\r\nWBC 9.9 \r\nHgb 10.0 \r\nHct 30.3 \r\nPlt 373 \r\n\r\nEKG - no signs of ischemia

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/6bbdb74b-0263-4e3f-9cf0-e3f44dfe1210", + "type": "List", + "display": "Pertinent Diagnostic Tests" + } + ] + }, + { + "title": "Assessment and Plan", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "51847-2", + "display": "Assessment and Plan" + } + ], + "text": "Assessment and Plan" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Assessment and Plan

      \r\n\t\t\t\t\t\t\t

      77 yo woman presents with significant angioedema in left side of tongue and inner cheek. Possible causes of angioedema include allergic anaphylaxis reaction, drug induced, allergic contact dermatitis, viral infection, drug induced, or a C1 inhibitor deficiency disorder acquired or hereditary. Laryngeal edema can also be caused by tonsillitis, peritonsilar abscess or pharyngeal foreign body.\r\n\r\nIt is unlikely that the patient has edema caused by abscess or tonsillitis since she does not have any associated fever or other signs of infection and the sudden onset of her swelling also argues against this. It is not likely a foreign body since ENT did not find anything when they scoped her.

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/affbdb9c-c8d0-4774-89e9-e8486fd5379a", + "type": "List", + "display": "Assessment and Plan" + } + ] + }, + { + "title": "Plan", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "18776-5", + "display": "Plan of care" + } + ], + "text": "Plan" + }, + "text": { + "div": "
      \r\n\t\t\t\t\t\t\t

      Plan

      \r\n\t\t\t\t\t\t\t

      ++ Swollen tongue: \r\n- Give patient corticosteroid to decrease inflammation and to protect against relapse after initial improvement. 4 days of Dexamethasone 10 mg IV tid. \r\n- Give patient antihistamine to block inflammation as well. 4 days of Diphenhydramine 25 mg bid. \r\n- ENT consult to rule out abscess or foreign object \r\n- Check C1 and C4 levels that would be decreased if the patient had C1 inhibitory complement deficiency \r\n- TSH level to check for hypo/hyper thyroid \r\n- Hold all oral home meds and keep patient NPO until airway swelling is reduced and patient can swallow easily \r\n\r\n++ Asthma/COPD \r\n- continue albuterol and ipratropium nebs prn \r\n- resume theophylline when patient can take oral meds \r\n\r\n++ DM \r\n- Patient is on corticosteroids that increase blood glucose levels, so put patient on sliding scale normal insulin to adjust for high sugars \r\n- Resume neurontin for neuropathy when oral meds can be taken \r\n\r\n++ HTN \r\n- Continue patient’s BP control with Diltiazem drip 5mg/hour \r\n- HOLD altace (ACEI) that is most likely the cause of angioedema \r\n- Consider an alternative HTN medication to replace the ACEI. Can’t use a HCTZ because of sulfa allergy. Also has asthma/COPD picture so beta blocker may not work well either. \r\n\r\n++ CAD s/p PCI in 1999 \r\n- Resume simvastatin and aspirin when patient is able to take oral meds \r\n++ GERD \r\n- famotidine when oral meds are resumed

      \r\n\t\t\t\t\t
      " + }, + "entry": [ + { + "reference": "List/6f292c58-8a59-44d9-9efe-7d8968684466", + "type": "List", + "display": "Plan" + } + ] + } + ] + } + }, + { + "fullUrl": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "resource": { + "resourceType": "Practitioner", + "id": "082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": -1 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "name": [ + { + "text": "Unknown", + "family": "Unknown" + } + ] + } + }, + { + "fullUrl": "Patient/894a042e-625c-48b3-a710-759e09454897", + "resource": { + "resourceType": "Patient", + "id": "894a042e-625c-48b3-a710-759e09454897", + "gender": "female", + "birthDate": "1945-09" + } + }, + { + "fullUrl": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "resource": { + "resourceType": "Encounter", + "id": "d6535404-17da-4282-82c2-2eb7b9b86a47", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter" + ] + }, + "status": "finished", + "class": { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "display": "unknown" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + } + } + }, + { + "fullUrl": "Condition/5a63461d-0a7a-49a2-ba18-2aeed20b2994", + "resource": { + "resourceType": "Condition", + "id": "5a63461d-0a7a-49a2-ba18-2aeed20b2994", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 22 + }, + { + "url": "length", + "valueInteger": 18 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0236068", + "display": "Tongue swelling" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000023674" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U004073" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "D20022" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10042727" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "205" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU073264" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "421262002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "1485" + } + ], + "text": "swelling of tongue" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/ffc8e2ea-6767-47cd-a72f-fe0909330027", + "resource": { + "resourceType": "Condition", + "id": "ffc8e2ea-6767-47cd-a72f-fe0909330027", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 45 + }, + { + "url": "length", + "valueInteger": 20 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0013404", + "display": "Dyspnea" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005442" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00182" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015304" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004216" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "266" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2596-2296" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "DYSPNEA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U001014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002094" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R06.02" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "786.05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10029433" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "R02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R02" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU024507" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R02007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85040344" + }, + { + "system": "http://loinc.org", + "code": "LP115812-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10013968" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "115876" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "3077" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004417" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00495" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13368" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1816" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000046183" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "042109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU037132" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000598319" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "15680" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qq" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XE0qq" + }, + { + "system": "http://snomed.info/sct", + "code": "F-75040" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-20040" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "267036007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0514" + } + ], + "text": "difficulty breathing" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/7b0a8ae4-7fda-4b4a-8e2e-97ad78372243", + "resource": { + "resourceType": "Condition", + "id": "7b0a8ae4-7fda-4b4a-8e2e-97ad78372243", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 70 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0740170", + "display": "Does swallow" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000047036" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "091308" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa4JX" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "288937009" + } + ], + "text": "swallowing" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "List/a7ba1fc8-7544-4f1a-ac4e-c0430159001f", + "resource": { + "resourceType": "List", + "id": "a7ba1fc8-7544-4f1a-ac4e-c0430159001f", + "status": "current", + "mode": "snapshot", + "title": "Chief Complaint", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "Condition/5a63461d-0a7a-49a2-ba18-2aeed20b2994", + "type": "Condition", + "display": "swelling of tongue" + } + }, + { + "item": { + "reference": "Condition/ffc8e2ea-6767-47cd-a72f-fe0909330027", + "type": "Condition", + "display": "difficulty breathing" + } + }, + { + "item": { + "reference": "Condition/7b0a8ae4-7fda-4b4a-8e2e-97ad78372243", + "type": "Condition", + "display": "swallowing" + } + } + ] + } + }, + { + "fullUrl": "Condition/8c143a3a-957b-4ad0-8ceb-08fb8e351cb3", + "resource": { + "resourceType": "Condition", + "id": "8c143a3a-957b-4ad0-8ceb-08fb8e351cb3", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 147 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1956346", + "display": "Coronary Artery Disease" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005327" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00010" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0037465" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1393-3397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CORONARY ART DIS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000871" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001677" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "I25.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU019520" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K76003" + }, + { + "system": "http://loinc.org", + "code": "LP90122-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10011078" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "35988" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1276" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D003324" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C26732" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C26732" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C26732" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000439400" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU002067" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE2uV" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D3-13000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "414024009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0426" + } + ], + "text": "CAD" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/973f06cf-d831-4c00-baed-e408420e5d77", + "resource": { + "resourceType": "Condition", + "id": "973f06cf-d831-4c00-baed-e408420e5d77", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 152 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0011860", + "display": "Diabetes Mellitus, Non-Insulin-Dependent" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00336" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0045504" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_10", + "code": "END005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10cm", + "code": "END005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003837" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000225" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0862-7250" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0005978" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "E11" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "E11" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "E11" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "T90" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU022755" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "T90007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85092226" + }, + { + "system": "http://loinc.org", + "code": "LA10552-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10067585" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "30480" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "5930" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D003924" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C26747" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C26747" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C26747" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C26747" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU047504" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X40J5" + }, + { + "system": "http://snomed.info/sct", + "code": "D-241Y" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DB-61030" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "44054006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0371" + } + ], + "text": "DM2" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/590bd19b-78d7-415b-bdb4-72f3f8ce0e1a", + "resource": { + "resourceType": "Condition", + "id": "590bd19b-78d7-415b-bdb4-72f3f8ce0e1a", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 157 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0004096", + "display": "Asthma" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "8.3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_10", + "code": "RSP009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10cm", + "code": "RSP009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000001541" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "080" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1525-2157" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "ASTHMA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000273" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002099" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "J45.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "J45.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "J45" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "493" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "R96" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R96" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU008836" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R96001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000405" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85008860" + }, + { + "system": "http://loinc.org", + "code": "MTHU020815" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10003553" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "32881" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D001249" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "493.9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01919" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1726" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000440101" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU003537" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "04190" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/qmr", + "code": "R0121533" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "H33.." + }, + { + "system": "http://snomed.info/sct", + "code": "D-4790" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D2-51000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "195967001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "1367" + } + ], + "text": "asthma" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/b91e08d1-2c9f-4b49-839c-37951b141d08", + "resource": { + "resourceType": "Condition", + "id": "b91e08d1-2c9f-4b49-839c-37951b141d08", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 168 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0020538", + "display": "Hypertensive disease" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000023317" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017493" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "7.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000015800" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0571-5243" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "HYPERTENS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U002034" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000822" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "I10-I15.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "I10-I15.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "I10" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "997.91" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU035456" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K85004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002317" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85063723" + }, + { + "system": "http://loinc.org", + "code": "LA14293-7" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10020772" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "33288" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "34" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D006973" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "997.91" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00905" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13785" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1908" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000458091" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "060808" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU002068" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "PRB_11000.06" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000686951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "23830" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0Ub" + }, + { + "system": "http://snomed.info/sct", + "code": "F-70700" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D3-02000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "38341003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0210" + } + ], + "text": "HTN" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Procedure/47836826-796c-4bd3-9a4e-ef5021413df3", + "resource": { + "resourceType": "Procedure", + "id": "47836826-796c-4bd3-9a4e-ef5021413df3", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 939 + }, + { + "url": "length", + "valueInteger": 16 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "not-done", + "code": { + "text": "drink any fluids" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_performedDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + } + }, + { + "fullUrl": "Procedure/6fb3eab0-4bda-4627-919c-083a757f11fa", + "resource": { + "resourceType": "Procedure", + "id": "6fb3eab0-4bda-4627-919c-083a757f11fa", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1106 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "not-done", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1718097", + "display": "New medications" + }, + { + "system": "http://loinc.org", + "code": "LP75169-0" + } + ], + "text": "new medications" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_performedDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + } + }, + { + "fullUrl": "Procedure/cb4aabfc-7754-4bad-b072-65c155ca8df7", + "resource": { + "resourceType": "Procedure", + "id": "cb4aabfc-7754-4bad-b072-65c155ca8df7", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1144 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "not-done", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0544341", + "display": "Lotion" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000038694" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v3.0", + "code": "LTN" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29167" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C29167" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "C29167" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ncpdp", + "code": "C29167" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "SK" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "142222" + }, + { + "system": "http://snomed.info/sct", + "code": "E-806Y" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-50640" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "739000003" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4023113" + } + ], + "text": "lotions" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_performedDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + } + }, + { + "fullUrl": "Procedure/3f61932c-89fc-4ff6-a153-6590f3f2eabe", + "resource": { + "resourceType": "Procedure", + "id": "3f61932c-89fc-4ff6-a153-6590f3f2eabe", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1155 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "not-done", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0031000", + "display": "Perfume" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000021311" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000009472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003543" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85099839" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D010476" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "016110" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XC08J" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-31105" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "95998000" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4020187" + } + ], + "text": "perfumes" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_performedDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + } + }, + { + "fullUrl": "Procedure/9496b625-423f-4ef0-a511-9dc1f63752ca", + "resource": { + "resourceType": "Procedure", + "id": "9496b625-423f-4ef0-a511-9dc1f63752ca", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1234 + }, + { + "url": "length", + "valueInteger": 16 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "not-done", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0175795", + "display": "Oral Medication" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000018213" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U005123" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85095244" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C102246" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C102246" + } + ], + "text": "oral medications" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_performedDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + } + }, + { + "fullUrl": "Condition/d7071c07-a763-4618-9232-05e326abf745", + "resource": { + "resourceType": "Condition", + "id": "d7071c07-a763-4618-9232-05e326abf745", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 132 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C2051415", + "display": "patient appears in no acute distress (physical finding)" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "10024" + } + ], + "text": "NAD" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/bb21dcfc-46d8-4c4b-b2a3-0dee9b8435e1", + "resource": { + "resourceType": "Condition", + "id": "bb21dcfc-46d8-4c4b-b2a3-0dee9b8435e1", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 244 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0242429", + "display": "Sore Throat" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00661" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0036874" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000024822" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "695" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2139-2226" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "PHARYNGITIS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U003750" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R07.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R07.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R07.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "784.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU041000" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R21005" + }, + { + "system": "http://loinc.org", + "code": "LA30867-8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10043524" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "219" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "4748" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D010612" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "462" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C50747" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13575" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2396" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "000709" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa9zW" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-51724" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "162397003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0523" + } + ], + "text": "sore throat" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "onsetString": "2:30 am this morning" + } + }, + { + "fullUrl": "Condition/63a92b3f-e4eb-4f50-9959-c996c888b546", + "resource": { + "resourceType": "Condition", + "id": "63a92b3f-e4eb-4f50-9959-c996c888b546", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 260 + }, + { + "url": "length", + "valueInteger": 18 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0236068", + "display": "Tongue swelling" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000023674" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U004073" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "D20022" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10042727" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "205" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU073264" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "421262002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "1485" + } + ], + "text": "swelling of tongue" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "onsetString": "2:30 am this morning" + } + }, + { + "fullUrl": "Condition/39bcd405-255f-428a-ac88-aab689f31b87", + "resource": { + "resourceType": "Condition", + "id": "39bcd405-255f-428a-ac88-aab689f31b87", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 330 + }, + { + "url": "length", + "valueInteger": 21 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0011168", + "display": "Deglutition Disorders" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005507" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00239" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014574" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "9.12.2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_10", + "code": "SYM005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10cm", + "code": "SYM005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003662" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "265" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "5000-0052" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "DYSPHAGIA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U001012" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002015" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R13" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R13" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R13.10" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "787.20" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU024378" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "D21004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85036477" + }, + { + "system": "http://loinc.org", + "code": "MTHU029874" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10013950" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "312702" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1309" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D003680" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "787.20" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthmst", + "code": "MT160004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00412" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2980" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E10621" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C2980" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1815" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044666" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2980" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "211613" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU036443" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000524080" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "15654" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM08J" + }, + { + "system": "http://snomed.info/sct", + "code": "F-61020" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D5-30250" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "40739000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0280" + } + ], + "text": "difficulty swallowing" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/10850a14-8dd5-4978-8bc2-357247cb5cc2", + "resource": { + "resourceType": "Condition", + "id": "10850a14-8dd5-4978-8bc2-357247cb5cc2", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 361 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0013404", + "display": "Dyspnea" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005442" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00182" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015304" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004216" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "266" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2596-2296" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "DYSPNEA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U001014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002094" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R06.02" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "786.05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10029433" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "R02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R02" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU024507" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R02007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85040344" + }, + { + "system": "http://loinc.org", + "code": "LP115812-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10013968" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "115876" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "3077" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004417" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00495" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13368" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1816" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000046183" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "042109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU037132" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000598319" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "15680" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qq" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XE0qq" + }, + { + "system": "http://snomed.info/sct", + "code": "F-75040" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-20040" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "267036007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0514" + } + ], + "text": "trouble breathing" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/64e41fc9-a70e-42c9-965b-de94fd5a5c2d", + "resource": { + "resourceType": "Condition", + "id": "64e41fc9-a70e-42c9-965b-de94fd5a5c2d", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 386 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0028778", + "display": "Obstruction" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004470" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1002744" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008870" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU053672" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U006537" + }, + { + "system": "http://loinc.org", + "code": "LP222112-7" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10061876" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003467" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3284" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C3284" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2422" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044954" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C3284" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X79q0" + }, + { + "system": "http://snomed.info/sct", + "code": "M-34000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-34000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "26036001" + } + ], + "text": "obstruction" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/8db12eea-31d5-44ad-a0f7-7fa8ed70f370", + "resource": { + "resourceType": "Condition", + "id": "8db12eea-31d5-44ad-a0f7-7fa8ed70f370", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 412 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0038999", + "display": "Swelling" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004456" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1000701" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000011957" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "715" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "A08" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "A08" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A08003" + }, + { + "system": "http://loinc.org", + "code": "LA22440-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10042674" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1229" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3399" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2091" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "191325" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU067007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X76Eu" + }, + { + "system": "http://snomed.info/sct", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "442672001" + } + ], + "text": "swelling" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/2dcdac99-7c88-4cca-ac3b-081cf6900fe6", + "resource": { + "resourceType": "Condition", + "id": "2dcdac99-7c88-4cca-ac3b-081cf6900fe6", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 442 + }, + { + "url": "length", + "valueInteger": 16 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "refuted", + "display": "Refuted" + } + ], + "text": "Refuted" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "text": "similar reaction" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/4aec7002-282f-419b-b9bc-8c331ea955be", + "resource": { + "resourceType": "Condition", + "id": "4aec7002-282f-419b-b9bc-8c331ea955be", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 507 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "refuted", + "display": "Refuted" + } + ], + "text": "Refuted" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0013404", + "display": "Dyspnea" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005442" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00182" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015304" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004216" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "266" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2596-2296" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "DYSPNEA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U001014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002094" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R06.02" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "786.05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10029433" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "R02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R02" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU024507" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R02007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85040344" + }, + { + "system": "http://loinc.org", + "code": "LP115812-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10013968" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "115876" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "3077" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004417" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00495" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13368" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1816" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000046183" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "042109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU037132" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000598319" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "15680" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qq" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XE0qq" + }, + { + "system": "http://snomed.info/sct", + "code": "F-75040" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-20040" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "267036007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0514" + } + ], + "text": "SOB" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/d5c638e2-1802-4173-84b4-ae71a2d057ff", + "resource": { + "resourceType": "Condition", + "id": "d5c638e2-1802-4173-84b4-ae71a2d057ff", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 512 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "refuted", + "display": "Refuted" + } + ], + "text": "Refuted" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0008031", + "display": "Chest Pain" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00012" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017850" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "7.2.5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_10", + "code": "CIR012" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10cm", + "code": "CIR012" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002750" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "171" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "PAIN CHEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000673" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0100749" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R07.4" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R07.4" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R07.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "786.50" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "b28011" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "b28011" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "A11" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU059497" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A11001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000942" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85023146" + }, + { + "system": "http://loinc.org", + "code": "LP98885-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10008479" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "33722" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "4744" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002637" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "172" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00204" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C38665" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1776" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000467223" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C38665" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU025178" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "182.." + }, + { + "system": "http://snomed.info/sct", + "code": "F-71400" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-37000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "29857009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0718" + } + ], + "text": "chest pain" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/5c9866ec-2e71-492f-994b-9dce0247882e", + "resource": { + "resourceType": "Condition", + "id": "5c9866ec-2e71-492f-994b-9dce0247882e", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 524 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "refuted", + "display": "Refuted" + } + ], + "text": "Refuted" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0033774", + "display": "Pruritus" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005226" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00607" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014802" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000010273" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "619" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2716-6790" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "PRURITUS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U003248" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000989" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "L29.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "L29.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "L29.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "698.9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "S02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "S02" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU062220" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "S02007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003889" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85108048" + }, + { + "system": "http://loinc.org", + "code": "LA20641-9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10037087" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "1113" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "3067" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D011537" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "619" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "698.9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01266" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3344" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1943" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000446534" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3344" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C3344" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "080316" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU037280" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26.06" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "PRB_17010.06" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000042504" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "41260" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/qmr", + "code": "Q0200232" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM00q" + }, + { + "system": "http://snomed.info/sct", + "code": "F-82300" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-A2300" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "418290006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0024" + } + ], + "text": "itching" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/3150feb9-23a3-4d8a-95c6-95058ee4effb", + "resource": { + "resourceType": "Condition", + "id": "3150feb9-23a3-4d8a-95c6-95058ee4effb", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 536 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "refuted", + "display": "Refuted" + } + ], + "text": "Refuted" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0027497", + "display": "Nausea" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005505" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00280" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccc", + "code": "B04.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014479" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008525" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "508" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1249-7728" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "NAUSEA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U002745" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002018" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R11.0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10000859" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "D09" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "D09" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU049523" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "D09002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003135" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85090324" + }, + { + "system": "http://loinc.org", + "code": "LP36327-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10028813" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "411" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009325" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00134" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3258" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E10878" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1970" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000390302" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3258" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "040016" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU002455" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "33080" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X75qw" + }, + { + "system": "http://snomed.info/sct", + "code": "F-61560" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-52760" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "422587007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0308" + } + ], + "text": "nausea" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/5fbaaaa3-316b-411f-b583-bcd504ab5b29", + "resource": { + "resourceType": "Condition", + "id": "5fbaaaa3-316b-411f-b583-bcd504ab5b29", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 568 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "refuted", + "display": "Refuted" + } + ], + "text": "Refuted" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015230", + "display": "Exanthema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000022958" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00609" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014681" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000029440" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "RASH" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000988" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "782.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU027334" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001699" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046091" + }, + { + "system": "http://loinc.org", + "code": "LA29194-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10037844" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "273176" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "208" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005076" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "782.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01533" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070301" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU047706" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26.02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM07J" + }, + { + "system": "http://snomed.info/sct", + "code": "M-48400" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-01710" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "271807003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0028" + } + ], + "text": "rashes" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/6d0fe82f-7cf1-49dc-b74d-22930dc74342", + "resource": { + "resourceType": "Condition", + "id": "6d0fe82f-7cf1-49dc-b74d-22930dc74342", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 589 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0277797", + "display": "Apyrexial" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000027018" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa1kS" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-03005" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "86699002" + } + ], + "text": "afebrile" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/aa9f0e80-7b4a-4ccc-b02a-bf2969f4462a", + "resource": { + "resourceType": "Condition", + "id": "aa9f0e80-7b4a-4ccc-b02a-bf2969f4462a", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 634 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "text": "swollen down" + }, + "bodySite": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 654 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0014876", + "display": "Esophagus" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005531" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000038776" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1250-0527" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7131" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "ESO" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s520" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s520" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001661" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85044855" + }, + { + "system": "http://loinc.org", + "code": "LP29941-9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004947" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U001901" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthmst", + "code": "MT010002" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12389" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12389" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12389" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000046408" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12389" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "17920" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N300" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "7N300" + }, + { + "system": "http://snomed.info/sct", + "code": "T-62000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-56000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "32849002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7131" + } + ], + "text": "esophagus" + } + ], + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/6668ff37-4d5d-4022-82a1-ee619ecb41d2", + "resource": { + "resourceType": "Condition", + "id": "6668ff37-4d5d-4022-82a1-ee619ecb41d2", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 777 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0038999", + "display": "Swelling" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004456" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1000701" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000011957" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "715" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "A08" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "A08" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A08003" + }, + { + "system": "http://loinc.org", + "code": "LA22440-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10042674" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1229" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3399" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2091" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "191325" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU067007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X76Eu" + }, + { + "system": "http://snomed.info/sct", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "442672001" + } + ], + "text": "swelling" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "note": [ + { + "text": "helped" + } + ] + } + }, + { + "fullUrl": "Condition/d7852009-616f-4021-941c-2a06f2cd3e0d", + "resource": { + "resourceType": "Condition", + "id": "d7852009-616f-4021-941c-2a06f2cd3e0d", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 799 + }, + { + "url": "length", + "valueInteger": 18 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "text": "throat still hurts" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/718e9908-53a6-45d5-9713-0091a03a42e5", + "resource": { + "resourceType": "Condition", + "id": "718e9908-53a6-45d5-9713-0091a03a42e5", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 825 + }, + { + "url": "length", + "valueInteger": 16 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "text": "hurts to swallow" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/a681cf02-0a4a-4ce1-94cb-d61b044ef814", + "resource": { + "resourceType": "Condition", + "id": "a681cf02-0a4a-4ce1-94cb-d61b044ef814", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 880 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "clinicalStatus": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 905 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "active", + "display": "Active" + } + ], + "text": "worse" + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0030193", + "display": "Pain" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002779" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00754" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccc", + "code": "Q63.0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0035760" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000009185" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "548" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "65336" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2683-4824" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "PAIN" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0012531" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R52.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R52.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R52" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "338-338.99" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "b280-b289" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "b280-b289" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10023130" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU059479" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A29020" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003436" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85096617" + }, + { + "system": "http://loinc.org", + "code": "MTHU029813" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10033371" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "283263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "351" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D010146" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "306" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "780.96" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01394" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E11167" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1994" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "200714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU033713" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "24" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "PRB_17010.03" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000041399" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pnds", + "code": "NP.405" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "36150" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa07F" + }, + { + "system": "http://snomed.info/sct", + "code": "F-82600" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-A2600" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "22253000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0730" + } + ], + "text": "pain" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "note": [ + { + "text": "relieve" + } + ] + } + }, + { + "fullUrl": "Condition/11f071eb-055c-4eb4-a740-4bed1cddc64e", + "resource": { + "resourceType": "Condition", + "id": "11f071eb-055c-4eb4-a740-4bed1cddc64e", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 967 + }, + { + "url": "length", + "valueInteger": 18 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "text": "trouble swallowing" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/342af4ab-c83f-4bac-953d-253ff8639754", + "resource": { + "resourceType": "MedicationStatement", + "id": "342af4ab-c83f-4bac-953d-253ff8639754", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 175 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0878061", + "display": "Altace" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000045298" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "315" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D017257" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29411" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000686948" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02tS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "262418" + } + ], + "text": "altace" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "timing": { + "repeat": { + "duration": 8, + "durationUnit": "a" + }, + "code": { + "text": "8 years" + } + } + } + ] + } + }, + { + "fullUrl": "MedicationStatement/cd1b0d06-2086-4732-a1e4-38a2505f9691", + "resource": { + "resourceType": "MedicationStatement", + "id": "cd1b0d06-2086-4732-a1e4-38a2505f9691", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 702 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0700899", + "display": "Benadryl" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000044903" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "899" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004155" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C300" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dtp", + "code": "NSC0033299" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000039163" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "05760" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "203457" + } + ], + "text": "benadryl" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "25mg", + "route": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 711 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "IV" + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 25 + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/89ea5b4d-10c5-41f0-ace9-63098b3ef0be", + "resource": { + "resourceType": "MedicationStatement", + "id": "89ea5b4d-10c5-41f0-ace9-63098b3ef0be", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 722 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0701466", + "display": "Solu-Medrol" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000045008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0059-7979" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "1325" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008776" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C48004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dtp", + "code": "NSC0048989" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "203856" + } + ], + "text": "solumedrol" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "125 mg", + "route": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 733 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "IV" + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 125, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/ad89c0fd-dbb2-450e-a5e7-fcc6f2713630", + "resource": { + "resourceType": "MedicationStatement", + "id": "ad89c0fd-dbb2-450e-a5e7-fcc6f2713630", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 740 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0678119", + "display": "Pepcid" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000042727" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "2232" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D015738" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29045" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000574268" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02nB" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "196458" + } + ], + "text": "pepcid" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "20 mg", + "route": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 753 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "IV" + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 20, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "AllergyIntolerance/91d485ea-a664-426a-97d5-d94da1e422c8", + "resource": { + "resourceType": "AllergyIntolerance", + "id": "91d485ea-a664-426a-97d5-d94da1e422c8", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1054 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", + "code": "refuted", + "display": "Refuted" + } + ], + "text": "Refuted" + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", + "code": "refuted", + "display": "Refuted" + } + ], + "text": "Refuted" + }, + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C3540698", + "display": "animal allergen extracts" + }, + { + "system": "http://www.whocc.no/atc", + "code": "V01AA11" + } + ], + "text": "animals" + }, + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "List/c1c10373-6325-4339-b962-c3c114969ccd", + "resource": { + "resourceType": "List", + "id": "c1c10373-6325-4339-b962-c3c114969ccd", + "status": "current", + "mode": "snapshot", + "title": "History of Present Illness", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "Condition/8c143a3a-957b-4ad0-8ceb-08fb8e351cb3", + "type": "Condition", + "display": "CAD" + } + }, + { + "item": { + "reference": "Condition/973f06cf-d831-4c00-baed-e408420e5d77", + "type": "Condition", + "display": "DM2" + } + }, + { + "item": { + "reference": "Condition/590bd19b-78d7-415b-bdb4-72f3f8ce0e1a", + "type": "Condition", + "display": "asthma" + } + }, + { + "item": { + "reference": "Condition/b91e08d1-2c9f-4b49-839c-37951b141d08", + "type": "Condition", + "display": "HTN" + } + }, + { + "item": { + "reference": "Procedure/47836826-796c-4bd3-9a4e-ef5021413df3", + "type": "Procedure", + "display": "drink any fluids" + } + }, + { + "item": { + "reference": "Procedure/6fb3eab0-4bda-4627-919c-083a757f11fa", + "type": "Procedure", + "display": "new medications" + } + }, + { + "item": { + "reference": "Procedure/cb4aabfc-7754-4bad-b072-65c155ca8df7", + "type": "Procedure", + "display": "lotions" + } + }, + { + "item": { + "reference": "Procedure/3f61932c-89fc-4ff6-a153-6590f3f2eabe", + "type": "Procedure", + "display": "perfumes" + } + }, + { + "item": { + "reference": "Procedure/9496b625-423f-4ef0-a511-9dc1f63752ca", + "type": "Procedure", + "display": "oral medications" + } + }, + { + "item": { + "reference": "Condition/d7071c07-a763-4618-9232-05e326abf745", + "type": "Condition", + "display": "NAD" + } + }, + { + "item": { + "reference": "Condition/bb21dcfc-46d8-4c4b-b2a3-0dee9b8435e1", + "type": "Condition", + "display": "sore throat" + } + }, + { + "item": { + "reference": "Condition/63a92b3f-e4eb-4f50-9959-c996c888b546", + "type": "Condition", + "display": "swelling of tongue" + } + }, + { + "item": { + "reference": "Condition/39bcd405-255f-428a-ac88-aab689f31b87", + "type": "Condition", + "display": "difficulty swallowing" + } + }, + { + "item": { + "reference": "Condition/10850a14-8dd5-4978-8bc2-357247cb5cc2", + "type": "Condition", + "display": "trouble breathing" + } + }, + { + "item": { + "reference": "Condition/64e41fc9-a70e-42c9-965b-de94fd5a5c2d", + "type": "Condition", + "display": "obstruction" + } + }, + { + "item": { + "reference": "Condition/8db12eea-31d5-44ad-a0f7-7fa8ed70f370", + "type": "Condition", + "display": "swelling" + } + }, + { + "item": { + "reference": "Condition/2dcdac99-7c88-4cca-ac3b-081cf6900fe6", + "type": "Condition", + "display": "similar reaction" + } + }, + { + "item": { + "reference": "Condition/4aec7002-282f-419b-b9bc-8c331ea955be", + "type": "Condition", + "display": "SOB" + } + }, + { + "item": { + "reference": "Condition/d5c638e2-1802-4173-84b4-ae71a2d057ff", + "type": "Condition", + "display": "chest pain" + } + }, + { + "item": { + "reference": "Condition/5c9866ec-2e71-492f-994b-9dce0247882e", + "type": "Condition", + "display": "itching" + } + }, + { + "item": { + "reference": "Condition/3150feb9-23a3-4d8a-95c6-95058ee4effb", + "type": "Condition", + "display": "nausea" + } + }, + { + "item": { + "reference": "Condition/5fbaaaa3-316b-411f-b583-bcd504ab5b29", + "type": "Condition", + "display": "rashes" + } + }, + { + "item": { + "reference": "Condition/6d0fe82f-7cf1-49dc-b74d-22930dc74342", + "type": "Condition", + "display": "afebrile" + } + }, + { + "item": { + "reference": "Condition/aa9f0e80-7b4a-4ccc-b02a-bf2969f4462a", + "type": "Condition", + "display": "swollen down" + } + }, + { + "item": { + "reference": "Condition/6668ff37-4d5d-4022-82a1-ee619ecb41d2", + "type": "Condition", + "display": "swelling" + } + }, + { + "item": { + "reference": "Condition/d7852009-616f-4021-941c-2a06f2cd3e0d", + "type": "Condition", + "display": "throat still hurts" + } + }, + { + "item": { + "reference": "Condition/718e9908-53a6-45d5-9713-0091a03a42e5", + "type": "Condition", + "display": "hurts to swallow" + } + }, + { + "item": { + "reference": "Condition/a681cf02-0a4a-4ce1-94cb-d61b044ef814", + "type": "Condition", + "display": "pain" + } + }, + { + "item": { + "reference": "Condition/11f071eb-055c-4eb4-a740-4bed1cddc64e", + "type": "Condition", + "display": "trouble swallowing" + } + }, + { + "item": { + "reference": "MedicationStatement/342af4ab-c83f-4bac-953d-253ff8639754", + "type": "MedicationStatement", + "display": "altace" + } + }, + { + "item": { + "reference": "MedicationStatement/cd1b0d06-2086-4732-a1e4-38a2505f9691", + "type": "MedicationStatement", + "display": "benadryl" + } + }, + { + "item": { + "reference": "MedicationStatement/89ea5b4d-10c5-41f0-ace9-63098b3ef0be", + "type": "MedicationStatement", + "display": "solumedrol" + } + }, + { + "item": { + "reference": "MedicationStatement/ad89c0fd-dbb2-450e-a5e7-fcc6f2713630", + "type": "MedicationStatement", + "display": "pepcid" + } + }, + { + "item": { + "reference": "AllergyIntolerance/91d485ea-a664-426a-97d5-d94da1e422c8", + "type": "AllergyIntolerance", + "display": "animals" + } + } + ] + } + }, + { + "fullUrl": "Procedure/f92472c0-9e90-4b74-8c51-0aa9882645ae", + "resource": { + "resourceType": "Procedure", + "id": "f92472c0-9e90-4b74-8c51-0aa9882645ae", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1286 + }, + { + "url": "length", + "valueInteger": 13 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "code": { + "text": "Cardiac stent" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "performedDateTime": "1999" + } + }, + { + "fullUrl": "Procedure/376dee02-e507-4e65-9bb6-802e8fb81905", + "resource": { + "resourceType": "Procedure", + "id": "376dee02-e507-4e65-9bb6-802e8fb81905", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1314 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "code": { + "text": "hystarectomy" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "performedDateTime": "1970" + } + }, + { + "fullUrl": "Procedure/d055da89-5dac-4eb3-a1ec-47b368ace8c3", + "resource": { + "resourceType": "Procedure", + "id": "d055da89-5dac-4eb3-a1ec-47b368ace8c3", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1349 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "code": { + "text": "stone retrieval" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "performedDateTime": "1960", + "bodySite": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1342 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0022646", + "display": "Kidney" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002574" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0041470" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007085" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1679-5191" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7203" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "KIDN" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s6100" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s6100" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002584" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85072254" + }, + { + "system": "http://loinc.org", + "code": "LP7380-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D007668" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12415" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12415" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctdc", + "code": "C12415" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12415" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000046325" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C12415" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12415" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "U000107" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "27360" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N500" + }, + { + "system": "http://snomed.info/sct", + "code": "T-71000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-71000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "64033007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ult", + "code": "269" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7203" + } + ], + "text": "kidney" + } + ] + } + }, + { + "fullUrl": "List/1d5dcbe4-7206-4a27-b3a8-52e4d30dacfe", + "resource": { + "resourceType": "List", + "id": "1d5dcbe4-7206-4a27-b3a8-52e4d30dacfe", + "status": "current", + "mode": "snapshot", + "title": "Surgical History", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "Procedure/f92472c0-9e90-4b74-8c51-0aa9882645ae", + "type": "Procedure", + "display": "Cardiac stent" + } + }, + { + "item": { + "reference": "Procedure/376dee02-e507-4e65-9bb6-802e8fb81905", + "type": "Procedure", + "display": "hystarectomy" + } + }, + { + "item": { + "reference": "Procedure/d055da89-5dac-4eb3-a1ec-47b368ace8c3", + "type": "Procedure", + "display": "stone retrieval" + } + } + ] + } + }, + { + "fullUrl": "Condition/b42befa0-2949-4ed8-a418-075252ecb31f", + "resource": { + "resourceType": "Condition", + "id": "b42befa0-2949-4ed8-a418-075252ecb31f", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1396 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1956346", + "display": "Coronary Artery Disease" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005327" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00010" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0037465" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1393-3397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CORONARY ART DIS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000871" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001677" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "I25.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU019520" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K76003" + }, + { + "system": "http://loinc.org", + "code": "LP90122-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10011078" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "35988" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1276" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D003324" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C26732" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C26732" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C26732" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000439400" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU002067" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE2uV" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D3-13000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "414024009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0426" + } + ], + "text": "CAD" + }, + "bodySite": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1439 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0226032", + "display": "Anterior descending branch of left coronary artery" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000021990" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "LD" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "3862" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpcs", + "code": "LD" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000482" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C32089" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C32089" + }, + { + "system": "http://snomed.info/sct", + "code": "T-43110" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-43110" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "59438005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "3862" + } + ], + "text": "LAD" + } + ], + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/beb71351-99e3-4fe3-ac44-132dcc9f4d78", + "resource": { + "resourceType": "Condition", + "id": "beb71351-99e3-4fe3-ac44-132dcc9f4d78", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1541 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0149721", + "display": "Left Ventricular Hypertrophy" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1003974" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000016665" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000407" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U004374" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001712" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K84039" + }, + { + "system": "http://loinc.org", + "code": "LP156346-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10049773" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "38318" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D017379" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C50631" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1949" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU011914" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X776j" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D3-16172" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "55827005" + } + ], + "text": "LVH" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/9c19cb96-cd62-4a16-a9a0-11706e5abe5e", + "resource": { + "resourceType": "Condition", + "id": "9c19cb96-cd62-4a16-a9a0-11706e5abe5e", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1567 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0020473", + "display": "Hyperlipidemia" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005732" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1006712" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000006419" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "395" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1744-2444" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "HYPERLIPEM" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U002027" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0003077" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "E78.5" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "E78.5" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "E78.5" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "E78.5" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "E78.5" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU036253" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "T93008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002308" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85063704" + }, + { + "system": "http://loinc.org", + "code": "LP266259-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10062060" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "4277" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D006949" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "272.4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "02489" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C34707" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C34707" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU002043" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X40Wy" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "X40Wy" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D6-60010" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "55822004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0820" + } + ], + "text": "Hyperlipidemia" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/fd2978f9-471c-4408-819b-f0b9ee848d2c", + "resource": { + "resourceType": "Condition", + "id": "fd2978f9-471c-4408-819b-f0b9ee848d2c", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1586 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0020538", + "display": "Hypertensive disease" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000023317" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017493" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "7.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000015800" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0571-5243" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "HYPERTENS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U002034" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000822" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "I10-I15.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "I10-I15.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "I10" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "997.91" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU035456" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K85004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002317" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85063723" + }, + { + "system": "http://loinc.org", + "code": "LA14293-7" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10020772" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "33288" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "34" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D006973" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "997.91" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00905" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13785" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1908" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000458091" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C3117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "060808" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU002068" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "PRB_11000.06" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000686951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "23830" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0Ub" + }, + { + "system": "http://snomed.info/sct", + "code": "F-70700" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D3-02000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "38341003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0210" + } + ], + "text": "HTN" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/173a4d80-fe7b-4162-bc21-c71f4ae86dea", + "resource": { + "resourceType": "Condition", + "id": "173a4d80-fe7b-4162-bc21-c71f4ae86dea", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1594 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0011860", + "display": "Diabetes Mellitus, Non-Insulin-Dependent" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00336" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0045504" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_10", + "code": "END005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10cm", + "code": "END005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003837" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000225" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0862-7250" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0005978" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "E11" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "E11" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "E11" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "T90" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU022755" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "T90007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85092226" + }, + { + "system": "http://loinc.org", + "code": "LA10552-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10067585" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "30480" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "5930" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D003924" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C26747" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C26747" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C26747" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C26747" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU047504" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X40J5" + }, + { + "system": "http://snomed.info/sct", + "code": "D-241Y" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DB-61030" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "44054006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0371" + } + ], + "text": "DM 2" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/d61038c0-b579-4a89-a292-417798dfdba4", + "resource": { + "resourceType": "Condition", + "id": "d61038c0-b579-4a89-a292-417798dfdba4", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1627 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0004096", + "display": "Asthma" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "8.3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_10", + "code": "RSP009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10cm", + "code": "RSP009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000001541" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "080" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1525-2157" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "ASTHMA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000273" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002099" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "J45.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "J45.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "J45" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "493" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "R96" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R96" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU008836" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R96001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000405" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85008860" + }, + { + "system": "http://loinc.org", + "code": "MTHU020815" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10003553" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "32881" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D001249" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "493.9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01919" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1726" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000440101" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C28397" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU003537" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "04190" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/qmr", + "code": "R0121533" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "H33.." + }, + { + "system": "http://snomed.info/sct", + "code": "D-4790" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D2-51000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "195967001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "1367" + } + ], + "text": "Asthma" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/5c02b389-3f56-4680-a2d5-e0bdd386d38d", + "resource": { + "resourceType": "Condition", + "id": "5c02b389-3f56-4680-a2d5-e0bdd386d38d", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1634 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0024117", + "display": "Chronic Obstructive Airway Disease" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00031" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0059967" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "8.2.2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007570" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "184" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "4004-0004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000363" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0006510" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "J44.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "J44.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "J44.9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R95" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU053770" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R95009" + }, + { + "system": "http://loinc.org", + "code": "LP90123-8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10009033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "34122" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "27" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D029424" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003398" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "496" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "02022" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3199" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C3199" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C3199" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2237" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C3199" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000524193" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU042800" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "H3..." + }, + { + "system": "http://snomed.info/sct", + "code": "D-7651" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D2-60000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "13645005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "1493" + } + ], + "text": "COPD" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/17d2ac39-1b15-44be-baee-f145745123e4", + "resource": { + "resourceType": "Condition", + "id": "17d2ac39-1b15-44be-baee-f145745123e4", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1643 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0017168", + "display": "Gastroesophageal reflux disease" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00251" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1001976" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000005382" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "GI DIS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002020" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "K21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "K21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "K21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "K21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "K21.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "530.81" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU063996" + }, + { + "system": "http://loinc.org", + "code": "LP100601-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10017885" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "38250" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "512" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005764" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "530.81" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthmst", + "code": "MT160014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01172" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C26781" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E10739" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C26781" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C26781" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C26781" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C26781" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU001906" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000737473" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X3003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "X3003" + }, + { + "system": "http://snomed.info/sct", + "code": "F-61340" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D5-30140" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "235595009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "1149" + } + ], + "text": "GERD" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/acfa27bf-1135-4a9c-835f-b30588b00803", + "resource": { + "resourceType": "Condition", + "id": "acfa27bf-1135-4a9c-835f-b30588b00803", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1656 + }, + { + "url": "length", + "valueInteger": 22 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0162316", + "display": "Iron deficiency anemia" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005902" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00294" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017779" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "4.1.3.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000017791" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "428" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0427-2389" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "ANEMIA IRON DEFIC" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000099" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001891" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "D50.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "D50.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "D50.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "D50.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "D50.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "280.9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "B80" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "B80" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU021534" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "B80002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85068186" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10022972" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "30322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "139" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D018798" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "280.9" + }, + { + "system": "http://hl7.org/fhir/sid/mthicpc2eae", + "code": "B80" + }, + { + "system": "http://hl7.org/fhir/sid/mthicpc2icd10ae", + "code": "MTHU037482" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C84484" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C84484" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C84484" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU036458" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/qmr", + "code": "R0121654" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ram", + "code": "U000082" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE13c" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XE13c" + }, + { + "system": "http://snomed.info/sct", + "code": "D-4072" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DC-13010" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "87522002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0553" + } + ], + "text": "iron deficiency anemia" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Observation/fffb2e79-8ceb-40a8-be04-a21de4609649", + "resource": { + "resourceType": "Observation", + "id": "fffb2e79-8ceb-40a8-be04-a21de4609649", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1448 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0700321", + "display": "Small" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000044733" + }, + { + "system": "http://loinc.org", + "code": "LA8983-4" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25376" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C25376" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C25376" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X7919" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "G-A217" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "255507004" + } + ], + "text": "small" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "valueQuantity": { + "value": 50, + "unit": "%" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1454 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "D2" + } + } + }, + { + "fullUrl": "Observation/8fa5bdd2-c1d2-4566-9426-c0d2496576d6", + "resource": { + "resourceType": "Observation", + "id": "8fa5bdd2-c1d2-4566-9426-c0d2496576d6", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1474 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0549177", + "display": "Large" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "U000601" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000038944" + }, + { + "system": "http://loinc.org", + "code": "LA8981-8" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C49508" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C49508" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X791B" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "G-A216" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "255509001" + } + ], + "text": "large" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "valueRange": { + "low": { + "value": 30, + "comparator": ">=", + "unit": "%" + }, + "high": { + "value": 40, + "comparator": "<=", + "unit": "%" + } + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1462 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1261316", + "display": "Right coronary artery structure" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000056439" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "RC" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1398-9631" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "50039" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpcs", + "code": "RC" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12875" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12875" + }, + { + "system": "http://snomed.info/sct", + "code": "T-43200" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-43200" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "13647002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "50039" + } + ], + "text": "RCA" + } + } + }, + { + "fullUrl": "Condition/5d4ba796-9697-4c60-8f90-b63793733336", + "resource": { + "resourceType": "Condition", + "id": "5d4ba796-9697-4c60-8f90-b63793733336", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1518 + }, + { + "url": "length", + "valueInteger": 21 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0520863", + "display": "Diastolic dysfunction" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1000320" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037795" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10052337" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "276344" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C79547" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-32012" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "3545003" + } + ], + "text": "diastolic dysfunction" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/16507bda-bfd1-4ac6-b380-b7a3a4a2cd8f", + "resource": { + "resourceType": "Condition", + "id": "16507bda-bfd1-4ac6-b380-b7a3a4a2cd8f", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1551 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "severity": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1546 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "255604002", + "display": "Mild" + } + ], + "text": "mild" + }, + "code": { + "text": "LA dilation" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Observation/e129a075-d004-484b-84ca-3244a2aab4fd", + "resource": { + "resourceType": "Observation", + "id": "e129a075-d004-484b-84ca-3244a2aab4fd", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1403 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "text": "Left heart cath" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "effectiveDateTime": "2005", + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/b1e27b84-c819-4db9-b134-f7dbc82cf3c2", + "resource": { + "resourceType": "Observation", + "id": "b1e27b84-c819-4db9-b134-f7dbc82cf3c2", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1489 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0430462", + "display": "Transthoracic echocardiography" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000034101" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10053368" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "323994" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C80404" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C80404" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000759349" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X77c2" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "433236007" + } + ], + "text": "TTE" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "effectiveDateTime": "2006", + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/78a6df46-a421-4f84-b627-0749762e47e5", + "resource": { + "resourceType": "Observation", + "id": "78a6df46-a421-4f84-b627-0749762e47e5", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1501 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0428772", + "display": "Left ventricular ejection fraction" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10069170" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C99524" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-CVTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C99524" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X776M" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "250908004" + } + ], + "text": "LVEF" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueRange": { + "low": { + "value": 60, + "comparator": ">=", + "unit": "%" + }, + "high": { + "value": 65, + "comparator": "<=", + "unit": "%" + } + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/64ec679e-bb68-4f0a-b285-2128902aff04", + "resource": { + "resourceType": "Observation", + "id": "64ec679e-bb68-4f0a-b285-2128902aff04", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1605 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0474680", + "display": "Hemoglobin A1c measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037062" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "60231" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "83036" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "83037" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "6308" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-72982" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "43396009" + } + ], + "text": "A1c" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "effectiveDateTime": "2005-09", + "valueQuantity": { + "value": 6.7 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "List/e0ed81ae-184e-44ce-b45a-2da9cd2eba9c", + "resource": { + "resourceType": "List", + "id": "e0ed81ae-184e-44ce-b45a-2da9cd2eba9c", + "status": "current", + "mode": "snapshot", + "title": "Medical History", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "Condition/b42befa0-2949-4ed8-a418-075252ecb31f", + "type": "Condition", + "display": "CAD" + } + }, + { + "item": { + "reference": "Condition/beb71351-99e3-4fe3-ac44-132dcc9f4d78", + "type": "Condition", + "display": "LVH" + } + }, + { + "item": { + "reference": "Condition/9c19cb96-cd62-4a16-a9a0-11706e5abe5e", + "type": "Condition", + "display": "Hyperlipidemia" + } + }, + { + "item": { + "reference": "Condition/fd2978f9-471c-4408-819b-f0b9ee848d2c", + "type": "Condition", + "display": "HTN" + } + }, + { + "item": { + "reference": "Condition/173a4d80-fe7b-4162-bc21-c71f4ae86dea", + "type": "Condition", + "display": "DM 2" + } + }, + { + "item": { + "reference": "Condition/d61038c0-b579-4a89-a292-417798dfdba4", + "type": "Condition", + "display": "Asthma" + } + }, + { + "item": { + "reference": "Condition/5c02b389-3f56-4680-a2d5-e0bdd386d38d", + "type": "Condition", + "display": "COPD" + } + }, + { + "item": { + "reference": "Condition/17d2ac39-1b15-44be-baee-f145745123e4", + "type": "Condition", + "display": "GERD" + } + }, + { + "item": { + "reference": "Condition/acfa27bf-1135-4a9c-835f-b30588b00803", + "type": "Condition", + "display": "iron deficiency anemia" + } + }, + { + "item": { + "reference": "Observation/fffb2e79-8ceb-40a8-be04-a21de4609649", + "type": "Observation", + "display": "small" + } + }, + { + "item": { + "reference": "Observation/8fa5bdd2-c1d2-4566-9426-c0d2496576d6", + "type": "Observation", + "display": "large" + } + }, + { + "item": { + "reference": "Condition/5d4ba796-9697-4c60-8f90-b63793733336", + "type": "Condition", + "display": "diastolic dysfunction" + } + }, + { + "item": { + "reference": "Condition/16507bda-bfd1-4ac6-b380-b7a3a4a2cd8f", + "type": "Condition", + "display": "LA dilation" + } + }, + { + "item": { + "reference": "Observation/e129a075-d004-484b-84ca-3244a2aab4fd", + "type": "Observation", + "display": "Left heart cath" + } + }, + { + "item": { + "reference": "Observation/b1e27b84-c819-4db9-b134-f7dbc82cf3c2", + "type": "Observation", + "display": "TTE" + } + }, + { + "item": { + "reference": "Observation/78a6df46-a421-4f84-b627-0749762e47e5", + "type": "Observation", + "display": "LVEF" + } + }, + { + "item": { + "reference": "Observation/64ec679e-bb68-4f0a-b285-2128902aff04", + "type": "Observation", + "display": "A1c" + } + } + ] + } + }, + { + "fullUrl": "FamilyMemberHistory/db83c46f-b9d2-492d-a10c-80b3518087fb", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "db83c46f-b9d2-492d-a10c-80b3518087fb", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1995 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1991 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "Dad" + }, + "deceasedBoolean": true + } + }, + { + "fullUrl": "FamilyMemberHistory/59139311-df79-467c-9c47-c767e5769364", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "59139311-df79-467c-9c47-c767e5769364", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1995 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2030 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0026591", + "display": "Mother (person)" + } + ], + "text": "mom" + }, + "deceasedBoolean": true + } + }, + { + "fullUrl": "FamilyMemberHistory/b8cefdb1-79b4-4bbd-a18a-274f3831205d", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "b8cefdb1-79b4-4bbd-a18a-274f3831205d", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2003 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1991 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "Dad" + }, + "condition": [ + { + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0023890", + "display": "Liver Cirrhosis" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005672" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00223" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015140" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "186" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1754-7664" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "LIVER CIRRHO" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000764" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001394" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "K74.60" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU016850" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "D97005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U006359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85077754" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10019641" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "30052" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "190" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008103" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthmst", + "code": "MT240030" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045478" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU018550" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "09260" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X307L" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D5-80600" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "19943007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0347" + } + ], + "text": "liver cirrhosis" + } + } + ] + } + }, + { + "fullUrl": "FamilyMemberHistory/1c54eba0-5e0d-4a0d-95b3-bd904a3a4151", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "1c54eba0-5e0d-4a0d-95b3-bd904a3a4151", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2003 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2030 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0026591", + "display": "Mother (person)" + } + ], + "text": "mom" + }, + "condition": [ + { + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0023890", + "display": "Liver Cirrhosis" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005672" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00223" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015140" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "186" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1754-7664" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "LIVER CIRRHO" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000764" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001394" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "K74.60" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU016850" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "D97005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U006359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85077754" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10019641" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "30052" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "190" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008103" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthmst", + "code": "MT240030" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045478" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU018550" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "09260" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X307L" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D5-80600" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "19943007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0347" + } + ], + "text": "liver cirrhosis" + } + } + ] + } + }, + { + "fullUrl": "FamilyMemberHistory/d9be7fe0-1301-4f61-8d0c-6d6f834098dc", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "d9be7fe0-1301-4f61-8d0c-6d6f834098dc", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2034 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1991 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "Dad" + }, + "deceasedBoolean": true + } + }, + { + "fullUrl": "FamilyMemberHistory/4a099ce3-6a5d-4b08-bb90-f548971437b9", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "4a099ce3-6a5d-4b08-bb90-f548971437b9", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2034 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2030 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0026591", + "display": "Mother (person)" + } + ], + "text": "mom" + }, + "deceasedBoolean": true + } + }, + { + "fullUrl": "FamilyMemberHistory/b849a150-496b-49bb-ba1b-20253133f297", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "b849a150-496b-49bb-ba1b-20253133f297", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2042 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 1991 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "Dad" + }, + "condition": [ + { + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0027051", + "display": "Myocardial Infarction" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/air", + "code": "MYCNF" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005332" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00102" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1018028" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008423" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "505" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1393-3417" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "INFARCT MYOCARD" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001658" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "I21" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU037952" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K75013" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85059683" + }, + { + "system": "http://loinc.org", + "code": "LP98884-7" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10028596" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "353001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009203" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "410.9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01329" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E10152" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1969" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU008101" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "32820" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X200E" + }, + { + "system": "http://snomed.info/sct", + "code": "M-54700" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D3-15000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "22298006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0428" + } + ], + "text": "heart attack" + } + } + ] + } + }, + { + "fullUrl": "FamilyMemberHistory/15f890cb-810d-4a4d-9f08-61443e912795", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "15f890cb-810d-4a4d-9f08-61443e912795", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2042 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2030 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0026591", + "display": "Mother (person)" + } + ], + "text": "mom" + }, + "condition": [ + { + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0027051", + "display": "Myocardial Infarction" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/air", + "code": "MYCNF" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005332" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00102" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1018028" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008423" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "505" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1393-3417" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "INFARCT MYOCARD" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001658" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "I21" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU037952" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K75013" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85059683" + }, + { + "system": "http://loinc.org", + "code": "LP98884-7" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10028596" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "353001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009203" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "410.9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01329" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E10152" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1969" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C27996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU008101" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "32820" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X200E" + }, + { + "system": "http://snomed.info/sct", + "code": "M-54700" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D3-15000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "22298006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0428" + } + ], + "text": "heart attack" + } + } + ] + } + }, + { + "fullUrl": "FamilyMemberHistory/39d8cf44-3604-473b-996d-54576f9c91d1", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "39d8cf44-3604-473b-996d-54576f9c91d1", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2094 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2076 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0037047", + "display": "Sibling" + } + ], + "text": "siblings" + }, + "deceasedBoolean": true + } + }, + { + "fullUrl": "FamilyMemberHistory/a784b752-2414-4bef-a741-5b10e7358864", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "a784b752-2414-4bef-a741-5b10e7358864", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2102 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2076 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0037047", + "display": "Sibling" + } + ], + "text": "siblings" + }, + "condition": [ + { + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0018799", + "display": "Heart Diseases" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000023339" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0046242" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "7.2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000005875" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000028" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1393-3247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CARDIOVASC DIS" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "I51.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "I51.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "I51.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "429.9" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU019359" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K84009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85059651" + }, + { + "system": "http://loinc.org", + "code": "LA10523-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10061024" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "33161" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "277" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D006331" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "429.9" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3079" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cellosaurus", + "code": "C3079" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C3079" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C3079" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "4454" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C3079" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3079" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C3079" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "22480" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X2003" + }, + { + "system": "http://snomed.info/sct", + "code": "D-7030" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D3-10000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "56265001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0504" + } + ], + "text": "cardiac disease" + } + } + ] + } + }, + { + "fullUrl": "FamilyMemberHistory/0041b176-c842-4d40-800a-f25fc51e10d6", + "resource": { + "resourceType": "FamilyMemberHistory", + "id": "0041b176-c842-4d40-800a-f25fc51e10d6", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2149 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "relationship": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2131 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015576", + "display": "Family" + } + ], + "text": "family" + }, + "condition": [ + { + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0006826", + "display": "Malignant Neoplasms" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/air", + "code": "MALIG" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000023015" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00731" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1001968" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "2.13" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002337" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "465" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2000-0173" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CARCINOMA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000537" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002664" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "C80" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "M8000/3" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "C80.1" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "199" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "A79" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU077094" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A79001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U006339" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85019492" + }, + { + "system": "http://loinc.org", + "code": "LA25513-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10028997" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "99725" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "25" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009369" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "199.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01968" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C9305" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C9305" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C9305" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C9305" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "3262" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C9305" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C9305" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C9305" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU070317" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000041060" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "29280" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X78ef" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "X78ef" + }, + { + "system": "http://snomed.info/sct", + "code": "M-8000/3" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-80003" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "363346000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "1345" + } + ], + "text": "cancer" + } + } + ] + } + }, + { + "fullUrl": "List/22ec7727-c4ca-4477-a42b-51d34a935da6", + "resource": { + "resourceType": "List", + "id": "22ec7727-c4ca-4477-a42b-51d34a935da6", + "status": "current", + "mode": "snapshot", + "title": "Family History", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "FamilyMemberHistory/db83c46f-b9d2-492d-a10c-80b3518087fb", + "type": "FamilyMemberHistory", + "display": "" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/59139311-df79-467c-9c47-c767e5769364", + "type": "FamilyMemberHistory", + "display": "" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/b8cefdb1-79b4-4bbd-a18a-274f3831205d", + "type": "FamilyMemberHistory", + "display": "liver cirrhosis" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/1c54eba0-5e0d-4a0d-95b3-bd904a3a4151", + "type": "FamilyMemberHistory", + "display": "liver cirrhosis" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/d9be7fe0-1301-4f61-8d0c-6d6f834098dc", + "type": "FamilyMemberHistory", + "display": "" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/4a099ce3-6a5d-4b08-bb90-f548971437b9", + "type": "FamilyMemberHistory", + "display": "" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/b849a150-496b-49bb-ba1b-20253133f297", + "type": "FamilyMemberHistory", + "display": "heart attack" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/15f890cb-810d-4a4d-9f08-61443e912795", + "type": "FamilyMemberHistory", + "display": "heart attack" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/39d8cf44-3604-473b-996d-54576f9c91d1", + "type": "FamilyMemberHistory", + "display": "" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/a784b752-2414-4bef-a741-5b10e7358864", + "type": "FamilyMemberHistory", + "display": "cardiac disease" + } + }, + { + "item": { + "reference": "FamilyMemberHistory/0041b176-c842-4d40-800a-f25fc51e10d6", + "type": "FamilyMemberHistory", + "display": "cancer" + } + } + ] + } + }, + { + "fullUrl": "AllergyIntolerance/fa04ef10-13ef-4c01-88e4-077eb0d97610", + "resource": { + "resourceType": "AllergyIntolerance", + "id": "fa04ef10-13ef-4c01-88e4-077eb0d97610", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2172 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", + "code": "active", + "display": "Active" + } + ], + "text": "Active" + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0599503", + "display": "Sulfonamide Anti-Infective Agents" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000020188" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0036579" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000042025" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2832-5379" + }, + { + "system": "http://loinc.org", + "code": "LP16283-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40345" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29739" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000367474" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x01IA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "x01IA" + }, + { + "system": "http://snomed.info/sct", + "code": "E-7170" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-55900" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "59255006" + } + ], + "text": "Sulfa drugs" + }, + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "reaction": [ + { + "manifestation": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2186 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015230", + "display": "Exanthema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000022958" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00609" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014681" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000029440" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "RASH" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000988" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "782.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU027334" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001699" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046091" + }, + { + "system": "http://loinc.org", + "code": "LA29194-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10037844" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "273176" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "208" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005076" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "782.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01533" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070301" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU047706" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26.02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM07J" + }, + { + "system": "http://snomed.info/sct", + "code": "M-48400" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-01710" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "271807003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0028" + } + ], + "text": "rash" + } + ] + } + ] + } + }, + { + "fullUrl": "AllergyIntolerance/e599fa16-c9ee-4ebf-a934-4520ac23745c", + "resource": { + "resourceType": "AllergyIntolerance", + "id": "e599fa16-c9ee-4ebf-a934-4520ac23745c", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2193 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", + "code": "active", + "display": "Active" + } + ], + "text": "Active" + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0701042", + "display": "Cipro" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000044930" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "5004-0016" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "112" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002939" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C375" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000354472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000040784" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "203563" + } + ], + "text": "Cipro" + }, + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "reaction": [ + { + "manifestation": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2201 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015230", + "display": "Exanthema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000022958" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00609" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014681" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000029440" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "RASH" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000988" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "782.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU027334" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001699" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046091" + }, + { + "system": "http://loinc.org", + "code": "LA29194-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10037844" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "273176" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "208" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005076" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "782.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01533" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070301" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU047706" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26.02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM07J" + }, + { + "system": "http://snomed.info/sct", + "code": "M-48400" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-01710" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "271807003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0028" + } + ], + "text": "rash" + } + ] + } + ] + } + }, + { + "fullUrl": "AllergyIntolerance/945e5c10-ada6-464e-8985-dbdf540d3160", + "resource": { + "resourceType": "AllergyIntolerance", + "id": "945e5c10-ada6-464e-8985-dbdf540d3160", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2208 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", + "code": "active", + "display": "Active" + } + ], + "text": "Active" + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0700899", + "display": "Benadryl" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000044903" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "899" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004155" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C300" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dtp", + "code": "NSC0033299" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000039163" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "05760" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "203457" + } + ], + "text": "Benadryl" + }, + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "reaction": [ + { + "manifestation": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2231 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0541919", + "display": "Dystonic reaction" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0058133" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000038540" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "DYSTONIA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10013986" + } + ], + "text": "dystonic reaction" + } + ] + } + ] + } + }, + { + "fullUrl": "List/ef6382f6-5089-4eda-9145-d44be736d451", + "resource": { + "resourceType": "List", + "id": "ef6382f6-5089-4eda-9145-d44be736d451", + "status": "current", + "mode": "snapshot", + "title": "Allergies", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "AllergyIntolerance/fa04ef10-13ef-4c01-88e4-077eb0d97610", + "type": "AllergyIntolerance", + "display": "Sulfa drugs" + } + }, + { + "item": { + "reference": "AllergyIntolerance/e599fa16-c9ee-4ebf-a934-4520ac23745c", + "type": "AllergyIntolerance", + "display": "Cipro" + } + }, + { + "item": { + "reference": "AllergyIntolerance/945e5c10-ada6-464e-8985-dbdf540d3160", + "type": "AllergyIntolerance", + "display": "Benadryl" + } + } + ] + } + }, + { + "fullUrl": "MedicationStatement/0696ae07-5bb9-41c1-88d8-742cadc02a77", + "resource": { + "resourceType": "MedicationStatement", + "id": "0696ae07-5bb9-41c1-88d8-742cadc02a77", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2268 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ], + "text": "Theophyline" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "600 mg", + "timing": { + "repeat": { + "frequency": 1, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "qhs" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 600, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/1896181a-2e1c-4d04-a301-15bd59774671", + "resource": { + "resourceType": "MedicationStatement", + "id": "1896181a-2e1c-4d04-a301-15bd59774671", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2281 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0700814", + "display": "Uniphyl" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000044888" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "3344" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D013806" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C872" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000041340" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "203377" + } + ], + "text": "Uniphyl" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "600 mg", + "timing": { + "repeat": { + "frequency": 1, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "qhs" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 600, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/94b47859-467e-413b-a235-37e2e97081e2", + "resource": { + "resourceType": "MedicationStatement", + "id": "94b47859-467e-413b-a235-37e2e97081e2", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2303 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0006280", + "display": "Bronchodilator Agents" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000019284" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002190" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2599-2967" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000693" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85017084" + }, + { + "system": "http://loinc.org", + "code": "LP31460-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "41468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D001993" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C319" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000476099" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C319" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa7kI" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "353866001" + } + ], + "text": "bronchodilator" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/da88a9d9-cebc-4c35-b759-a64405a0030a", + "resource": { + "resourceType": "MedicationStatement", + "id": "da88a9d9-cebc-4c35-b759-a64405a0030a", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2332 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0001455", + "display": "cyclic AMP" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000029018" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000721" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2502-9637" + }, + { + "system": "http://loinc.org", + "code": "LP15327-7" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000242" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "E0399OZS9N" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C208" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C208" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "00446" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dtp", + "code": "NSC0094017" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "E0399OZS9N" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "12875" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X80N5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "1314330" + }, + { + "system": "http://snomed.info/sct", + "code": "F-15910" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-65980" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "84835006" + } + ], + "text": "cAMP" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/91c26c2a-1ca6-4784-968e-e7cecebe7aa0", + "resource": { + "resourceType": "MedicationStatement", + "id": "91c26c2a-1ca6-4784-968e-e7cecebe7aa0", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2366 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0012373", + "display": "diltiazem" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000020881" + }, + { + "system": "http://www.whocc.no/atc", + "code": "C08DB01" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003959" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0314-7897" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00343" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "4148" + }, + { + "system": "http://loinc.org", + "code": "LP17238-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "197220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00045" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004110" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "EE92BBP03H" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C61725" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "30307" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "EE92BBP03H" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "004514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x01CU" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "3443" + }, + { + "system": "http://snomed.info/sct", + "code": "E-7719" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-803A0" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372793000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU000928" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4019722" + } + ], + "text": "Diltiazem" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "300 mg", + "timing": { + "repeat": { + "frequency": 1, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "qhs" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 300, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/ed4fe972-3cf5-428d-9e45-792eb0c66d36", + "resource": { + "resourceType": "MedicationStatement", + "id": "ed4fe972-3cf5-428d-9e45-792eb0c66d36", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2389 + }, + { + "url": "length", + "valueInteger": 18 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0006684", + "display": "Calcium Channel Blockers" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000019255" + }, + { + "system": "http://www.whocc.no/atc", + "code": "C08" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002294" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0530-2776" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85018769" + }, + { + "system": "http://loinc.org", + "code": "LP31438-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40586" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002121" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "07250" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x001i" + }, + { + "system": "http://snomed.info/sct", + "code": "E-7716" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-80160" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "373304005" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4021566" + } + ], + "text": "Ca channel blocker" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/b85f49ef-0f04-4f3a-a914-bb0b9a3aa799", + "resource": { + "resourceType": "MedicationStatement", + "id": "b85f49ef-0f04-4f3a-a914-bb0b9a3aa799", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2439 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ], + "text": "Simvistatin" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "20 mg", + "timing": { + "repeat": { + "frequency": 1, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "qhs" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 20, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/2a086b6f-8266-43f7-911b-3bd0f04975f0", + "resource": { + "resourceType": "MedicationStatement", + "id": "2a086b6f-8266-43f7-911b-3bd0f04975f0", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2452 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0678181", + "display": "Zocor" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000042766" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "5001-0024" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "1546" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D019821" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29454" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000455226" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x03d7" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "196503" + } + ], + "text": "Zocor" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "20 mg", + "timing": { + "repeat": { + "frequency": 1, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "qhs" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 20, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/5b20883f-b21a-4e6c-83bd-d88d1503d31c", + "resource": { + "resourceType": "MedicationStatement", + "id": "5b20883f-b21a-4e6c-83bd-d88d1503d31c", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2470 + }, + { + "url": "length", + "valueInteger": 25 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ], + "text": "HMGCo Reductase inhibitor" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/11912426-8c67-4987-8653-cd6875ae966e", + "resource": { + "resourceType": "MedicationStatement", + "id": "11912426-8c67-4987-8653-cd6875ae966e", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2523 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0072973", + "display": "ramipril" + }, + { + "system": "http://www.whocc.no/atc", + "code": "C09AA05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000014736" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00178" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "2347" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh2001004824" + }, + { + "system": "http://loinc.org", + "code": "LP171634-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "48822" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00728" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D017257" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "L35JN3I7SJ" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29411" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C29411" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "32054" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "L35JN3I7SJ" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "003585" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000686948" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "bi6.." + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "35296" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "386872004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m73030" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001035" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4019562" + } + ], + "text": "Ramipril" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "10 mg", + "timing": { + "repeat": { + "frequency": 2, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "BID" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 10, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/fed47e52-7ce4-4e79-a2c1-2944e811fbb5", + "resource": { + "resourceType": "MedicationStatement", + "id": "fed47e52-7ce4-4e79-a2c1-2944e811fbb5", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2533 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0878061", + "display": "Altace" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000045298" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "315" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D017257" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29411" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000686948" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02tS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "262418" + } + ], + "text": "Altace" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "10 mg", + "timing": { + "repeat": { + "frequency": 2, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "BID" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 10, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/ef37d1da-0981-4096-83d8-82393c9d53f4", + "resource": { + "resourceType": "MedicationStatement", + "id": "ef37d1da-0981-4096-83d8-82393c9d53f4", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2553 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0003015", + "display": "Angiotensin-Converting Enzyme Inhibitors" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0063008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000001185" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1037-0850" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85005040" + }, + { + "system": "http://loinc.org", + "code": "LP31444-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "41889" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000806" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000335481" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "bi..." + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-80150" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372733002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001019" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4021577" + } + ], + "text": "ACEI" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/800f5220-c18e-46d7-b580-949ec90e6c76", + "resource": { + "resourceType": "MedicationStatement", + "id": "800f5220-c18e-46d7-b580-949ec90e6c76", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2620 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0017642", + "display": "glipizide" + }, + { + "system": "http://www.whocc.no/atc", + "code": "A10BB07" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000005526" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "4001-0060" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB01067" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "588" + }, + { + "system": "http://loinc.org", + "code": "LP14719-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "41884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "4783" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005913" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "X7WDT95N5C" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29074" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "X7WDT95N5C" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "000913" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000775361" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "f36.." + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "4821" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-A2430" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "387143009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m35030" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU000833" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4018508" + } + ], + "text": "Glipizide" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "5 mg", + "timing": { + "repeat": { + "frequency": 2, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "BID" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 5, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/3b1cf1c9-edc0-4937-8994-db7965d87aee", + "resource": { + "resourceType": "MedicationStatement", + "id": "3b1cf1c9-edc0-4937-8994-db7965d87aee", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2652 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0038766", + "display": "Sulfonylurea Compounds" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000019645" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000011871" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2841-3410" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh2007001704" + }, + { + "system": "http://loinc.org", + "code": "LP18787-9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "194714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D013453" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM0lF" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XM0lF" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-A2400" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372711004" + } + ], + "text": "sulfonylurea" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/39b88099-2ac9-4c27-ab8f-840fa17a216a", + "resource": { + "resourceType": "MedicationStatement", + "id": "39b88099-2ac9-4c27-ab8f-840fa17a216a", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2693 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ], + "text": "Omecprazole" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "20 mg", + "timing": { + "repeat": { + "frequency": 1, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "daily" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 20, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/6d9c9574-a165-4dbe-aa25-1c4f035c3208", + "resource": { + "resourceType": "MedicationStatement", + "id": "6d9c9574-a165-4dbe-aa25-1c4f035c3208", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2706 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0700777", + "display": "Prilosec" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000044880" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "4007-0093" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "363" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009853" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C716" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000042309" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "203345" + } + ], + "text": "Prilosec" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "20 mg", + "timing": { + "repeat": { + "frequency": 1, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "daily" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 20, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/355554d3-c37a-4ac1-b128-eab1b84d5339", + "resource": { + "resourceType": "MedicationStatement", + "id": "355554d3-c37a-4ac1-b128-eab1b84d5339", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2739 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0358591", + "display": "Proton Pump Inhibitors" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000031384" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh98006912" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "78902" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D054328" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29723" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C29723" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C29723" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C29723" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C29723" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x00A8" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372525000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001202" + } + ], + "text": "PPI" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/2aa112cf-cfbd-41c6-a5d9-7fc29e0ed998", + "resource": { + "resourceType": "MedicationStatement", + "id": "2aa112cf-cfbd-41c6-a5d9-7fc29e0ed998", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2769 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0060926", + "display": "gabapentin" + }, + { + "system": "http://www.whocc.no/atc", + "code": "N03AX12" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000014062" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "5004-0033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "1404" + }, + { + "system": "http://loinc.org", + "code": "LP17989-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "45939" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d03182" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000077206" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "6CW7F3G59X" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C1108" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C1108" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "20519" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "6CW7F3G59X" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045039" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "004415" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000038402" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "dnj.." + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "25480" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "386845007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m34587" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU000260" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4020833" + } + ], + "text": "Gabapentin" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "100 mg", + "timing": { + "repeat": { + "frequency": 1, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "qhs" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 100, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/80d36574-127d-4d6e-80e8-3107a09254f0", + "resource": { + "resourceType": "MedicationStatement", + "id": "80d36574-127d-4d6e-80e8-3107a09254f0", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2781 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0678176", + "display": "Neurontin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000042761" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "2269" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000077206" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C1108" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000038402" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02ko" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "196498" + } + ], + "text": "Neurontin" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "100 mg", + "timing": { + "repeat": { + "frequency": 1, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "qhs" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 100, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/78f6e05d-ad85-4017-981e-bff1ab2b0050", + "resource": { + "resourceType": "MedicationStatement", + "id": "78f6e05d-ad85-4017-981e-bff1ab2b0050", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2826 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0027908", + "display": "Neurotransmitters" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000001930" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008668" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2061-1462" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "302832" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U005833" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85091183" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D018377" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C687" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000458085" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "33924" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-A0306" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "35069000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "67161" + } + ], + "text": "neurotransmitters" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/a61b7774-3f79-4dc7-95bd-e77ecb6c2190", + "resource": { + "resourceType": "MedicationStatement", + "id": "a61b7774-3f79-4dc7-95bd-e77ecb6c2190", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2877 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0025598", + "display": "metformin" + }, + { + "system": "http://www.whocc.no/atc", + "code": "A10BA02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "4007-0083" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00331" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "4442" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh2007006278" + }, + { + "system": "http://loinc.org", + "code": "LP33332-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d03807" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008687" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "9100L32L2N" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C61612" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C61612" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "9100L32L2N" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000631043" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "004534" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x01Li" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "6809" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372567009" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4023979" + } + ], + "text": "Metformin" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "500 mg", + "timing": { + "code": { + "text": "qam" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 500, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/a9fec74e-aba2-4ff6-bb25-e7b168ce8bd2", + "resource": { + "resourceType": "MedicationStatement", + "id": "a9fec74e-aba2-4ff6-bb25-e7b168ce8bd2", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2900 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C3537187", + "display": "Biguanide [EPC]" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/med-rt", + "code": "N0000175565" + } + ], + "text": "biguanide" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/120e90bd-ed25-4cac-856f-179b5c65170f", + "resource": { + "resourceType": "MedicationStatement", + "id": "120e90bd-ed25-4cac-856f-179b5c65170f", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2935 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0004057", + "display": "aspirin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000028840" + }, + { + "system": "http://www.whocc.no/atc", + "code": "B01AC06" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0061721" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000001530" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2270-2387" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00945" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "181" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85008731" + }, + { + "system": "http://loinc.org", + "code": "LA26702-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40170" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00170" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D001241" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000320" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "R16CO5Y76E" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C287" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C287" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "00739" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dtp", + "code": "NSC0406186" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "R16CO5Y76E" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045176" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "001587" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000039152" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "04050" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02LX" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "1191" + }, + { + "system": "http://snomed.info/sct", + "code": "E-7771" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-60320" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "387458008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m6240" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4017536" + } + ], + "text": "Aspirin" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "81 mg", + "timing": { + "code": { + "text": "qam" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 81, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/0bdc0029-b6bf-4889-b74a-f560f015f0a4", + "resource": { + "resourceType": "MedicationStatement", + "id": "0bdc0029-b6bf-4889-b74a-f560f015f0a4", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2955 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0199176", + "display": "Prophylactic treatment" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000007872" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000019720" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "4006-0079" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v3.0", + "code": "IND03" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A49004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U006559" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10036898" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "344890" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1597" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U002727" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C15843" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "PROT-SPURPRS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc-gloss", + "code": "C15843" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C15843" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C15843" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000439419" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-hl7", + "code": "C15843" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000572422" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pnds", + "code": "Im.260" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "40290" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X74V4" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P2-00120" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "169443000" + } + ], + "text": "prophylaxis" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/ef9816de-4406-42e4-8256-f0e08e55673a", + "resource": { + "resourceType": "MedicationStatement", + "id": "ef9816de-4406-42e4-8256-f0e08e55673a", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2984 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0082607", + "display": "fluticasone" + }, + { + "system": "http://www.whocc.no/atc", + "code": "R01AD08" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000015373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB13867" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d01296" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000068298" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "CUT2W21N7U" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C61767" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "CUT2W21N7U" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "004952" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x01NN" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "41126" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "397192001" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4020529" + } + ], + "text": "Fluticasone" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "2 puff", + "timing": { + "repeat": { + "frequency": 2, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "bid" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 2 + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/47c9f435-7105-4bf4-a91f-5fe2b1531ddf", + "resource": { + "resourceType": "MedicationStatement", + "id": "47c9f435-7105-4bf4-a91f-5fe2b1531ddf", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 2997 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0720466", + "display": "Flovent" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000045741" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "6201" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000068298" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29061" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000682628" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "217152" + } + ], + "text": "Flovent" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "2 puff", + "timing": { + "repeat": { + "frequency": 2, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "bid" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 2 + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/3b60bc7b-d89a-4217-a156-7e0a4c58a17d", + "resource": { + "resourceType": "MedicationStatement", + "id": "3b60bc7b-d89a-4217-a156-7e0a4c58a17d", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3019 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0001617", + "display": "Adrenal Cortex Hormones" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000018706" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000762" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0059-5614" + }, + { + "system": "http://loinc.org", + "code": "LP31653-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "4557" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000305" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045658" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C2322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "00990" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x002V" + }, + { + "system": "http://snomed.info/sct", + "code": "E-8510" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-B2400" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "21568003" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4021625" + } + ], + "text": "corticosteroid" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationStatement/f5a42dd7-e1aa-4549-afd4-652408f71ad4", + "resource": { + "resourceType": "MedicationStatement", + "id": "f5a42dd7-e1aa-4549-afd4-652408f71ad4", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3068 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ], + "text": "xoperex" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "1.25mg", + "doseAndRate": [ + { + "doseQuantity": { + "value": 1.25 + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/09d88421-e13a-483b-b248-69ec48ea62e8", + "resource": { + "resourceType": "MedicationStatement", + "id": "09d88421-e13a-483b-b248-69ec48ea62e8", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3087 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0027235", + "display": "ipratropium" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008455" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00332" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "4326" + }, + { + "system": "http://loinc.org", + "code": "LP171404-9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00265" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009241" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "GR88G0I6UL" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C61794" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "GR88G0I6UL" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "004943" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x01Db" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "7213" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372518007" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4019791" + } + ], + "text": "Ipratropium" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "2.5 ml", + "timing": { + "code": { + "text": "qam" + } + }, + "route": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3106 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "nebulized" + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 2.5, + "unit": "ml" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationStatement/576842f8-f7bd-44e1-93f0-a154ae649784", + "resource": { + "resourceType": "MedicationStatement", + "id": "576842f8-f7bd-44e1-93f0-a154ae649784", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3122 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0242896", + "display": "Anticholinergic Agents" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000028632" + }, + { + "system": "http://www.whocc.no/atc", + "code": "N04A" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000025026" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2059-1068" + }, + { + "system": "http://loinc.org", + "code": "LP31390-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "41065" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D018680" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C66880" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "03070" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x01DM" + }, + { + "system": "http://snomed.info/sct", + "code": "E-7540" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-67300" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "373246003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU002579" + } + ], + "text": "anticholinergic" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "context": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "List/c5490e7d-7447-4f89-8a7d-9871439d55e7", + "resource": { + "resourceType": "List", + "id": "c5490e7d-7447-4f89-8a7d-9871439d55e7", + "status": "current", + "mode": "snapshot", + "title": "Medications", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "MedicationStatement/0696ae07-5bb9-41c1-88d8-742cadc02a77", + "type": "MedicationStatement", + "display": "Theophyline" + } + }, + { + "item": { + "reference": "MedicationStatement/1896181a-2e1c-4d04-a301-15bd59774671", + "type": "MedicationStatement", + "display": "Uniphyl" + } + }, + { + "item": { + "reference": "MedicationStatement/94b47859-467e-413b-a235-37e2e97081e2", + "type": "MedicationStatement", + "display": "bronchodilator" + } + }, + { + "item": { + "reference": "MedicationStatement/da88a9d9-cebc-4c35-b759-a64405a0030a", + "type": "MedicationStatement", + "display": "cAMP" + } + }, + { + "item": { + "reference": "MedicationStatement/91c26c2a-1ca6-4784-968e-e7cecebe7aa0", + "type": "MedicationStatement", + "display": "Diltiazem" + } + }, + { + "item": { + "reference": "MedicationStatement/ed4fe972-3cf5-428d-9e45-792eb0c66d36", + "type": "MedicationStatement", + "display": "Ca channel blocker" + } + }, + { + "item": { + "reference": "MedicationStatement/b85f49ef-0f04-4f3a-a914-bb0b9a3aa799", + "type": "MedicationStatement", + "display": "Simvistatin" + } + }, + { + "item": { + "reference": "MedicationStatement/2a086b6f-8266-43f7-911b-3bd0f04975f0", + "type": "MedicationStatement", + "display": "Zocor" + } + }, + { + "item": { + "reference": "MedicationStatement/5b20883f-b21a-4e6c-83bd-d88d1503d31c", + "type": "MedicationStatement", + "display": "HMGCo Reductase inhibitor" + } + }, + { + "item": { + "reference": "MedicationStatement/11912426-8c67-4987-8653-cd6875ae966e", + "type": "MedicationStatement", + "display": "Ramipril" + } + }, + { + "item": { + "reference": "MedicationStatement/fed47e52-7ce4-4e79-a2c1-2944e811fbb5", + "type": "MedicationStatement", + "display": "Altace" + } + }, + { + "item": { + "reference": "MedicationStatement/ef37d1da-0981-4096-83d8-82393c9d53f4", + "type": "MedicationStatement", + "display": "ACEI" + } + }, + { + "item": { + "reference": "MedicationStatement/800f5220-c18e-46d7-b580-949ec90e6c76", + "type": "MedicationStatement", + "display": "Glipizide" + } + }, + { + "item": { + "reference": "MedicationStatement/3b1cf1c9-edc0-4937-8994-db7965d87aee", + "type": "MedicationStatement", + "display": "sulfonylurea" + } + }, + { + "item": { + "reference": "MedicationStatement/39b88099-2ac9-4c27-ab8f-840fa17a216a", + "type": "MedicationStatement", + "display": "Omecprazole" + } + }, + { + "item": { + "reference": "MedicationStatement/6d9c9574-a165-4dbe-aa25-1c4f035c3208", + "type": "MedicationStatement", + "display": "Prilosec" + } + }, + { + "item": { + "reference": "MedicationStatement/355554d3-c37a-4ac1-b128-eab1b84d5339", + "type": "MedicationStatement", + "display": "PPI" + } + }, + { + "item": { + "reference": "MedicationStatement/2aa112cf-cfbd-41c6-a5d9-7fc29e0ed998", + "type": "MedicationStatement", + "display": "Gabapentin" + } + }, + { + "item": { + "reference": "MedicationStatement/80d36574-127d-4d6e-80e8-3107a09254f0", + "type": "MedicationStatement", + "display": "Neurontin" + } + }, + { + "item": { + "reference": "MedicationStatement/78f6e05d-ad85-4017-981e-bff1ab2b0050", + "type": "MedicationStatement", + "display": "neurotransmitters" + } + }, + { + "item": { + "reference": "MedicationStatement/a61b7774-3f79-4dc7-95bd-e77ecb6c2190", + "type": "MedicationStatement", + "display": "Metformin" + } + }, + { + "item": { + "reference": "MedicationStatement/a9fec74e-aba2-4ff6-bb25-e7b168ce8bd2", + "type": "MedicationStatement", + "display": "biguanide" + } + }, + { + "item": { + "reference": "MedicationStatement/120e90bd-ed25-4cac-856f-179b5c65170f", + "type": "MedicationStatement", + "display": "Aspirin" + } + }, + { + "item": { + "reference": "MedicationStatement/0bdc0029-b6bf-4889-b74a-f560f015f0a4", + "type": "MedicationStatement", + "display": "prophylaxis" + } + }, + { + "item": { + "reference": "MedicationStatement/ef9816de-4406-42e4-8256-f0e08e55673a", + "type": "MedicationStatement", + "display": "Fluticasone" + } + }, + { + "item": { + "reference": "MedicationStatement/47c9f435-7105-4bf4-a91f-5fe2b1531ddf", + "type": "MedicationStatement", + "display": "Flovent" + } + }, + { + "item": { + "reference": "MedicationStatement/3b60bc7b-d89a-4217-a156-7e0a4c58a17d", + "type": "MedicationStatement", + "display": "corticosteroid" + } + }, + { + "item": { + "reference": "MedicationStatement/f5a42dd7-e1aa-4549-afd4-652408f71ad4", + "type": "MedicationStatement", + "display": "xoperex" + } + }, + { + "item": { + "reference": "MedicationStatement/09d88421-e13a-483b-b248-69ec48ea62e8", + "type": "MedicationStatement", + "display": "Ipratropium" + } + }, + { + "item": { + "reference": "MedicationStatement/576842f8-f7bd-44e1-93f0-a154ae649784", + "type": "MedicationStatement", + "display": "anticholinergic" + } + } + ] + } + }, + { + "fullUrl": "Observation/3e34ed2e-c918-436e-a335-5b6a75fe70aa", + "resource": { + "resourceType": "Observation", + "id": "3e34ed2e-c918-436e-a335-5b6a75fe70aa", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3207 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C2051415", + "display": "patient appears in no acute distress (physical finding)" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "10024" + } + ], + "text": "NAD" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/253cebde-c965-442b-87f3-0af428fc5148", + "resource": { + "resourceType": "Observation", + "id": "253cebde-c965-442b-87f3-0af428fc5148", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3231 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0424578", + "display": "Psychological Well Being" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000033352" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10038430" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A29003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "200803" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X76AV" + }, + { + "system": "http://snomed.info/sct", + "code": "F-90100" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-90001" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "17326005" + } + ], + "text": "feeling well" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "effectiveTiming": { + "repeat": { + "duration": 1, + "durationUnit": "wk" + }, + "code": { + "text": "last couple of weeks" + } + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Procedure/551e9b17-9ec7-4573-81f0-1814fe19b546", + "resource": { + "resourceType": "Procedure", + "id": "551e9b17-9ec7-4573-81f0-1814fe19b546", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3336 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "completed", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015421", + "display": "Eyeglasses" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004833" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1114-9182" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001718" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046700" + }, + { + "system": "http://loinc.org", + "code": "LA14749-8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "201" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005139" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C87148" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XC0Sy" + }, + { + "system": "http://snomed.info/sct", + "code": "E-9076" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "A-04242" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "50121007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/umd", + "code": "11-667" + } + ], + "text": "glasses" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_performedDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "bodySite": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3271 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015392", + "display": "Eye" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0057369" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004810" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1107-6922" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "12513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "EYE" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s220" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "F" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046642" + }, + { + "system": "http://loinc.org", + "code": "LP7218-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005123" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003284" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000350235" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000020" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "18890" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X74in" + }, + { + "system": "http://snomed.info/sct", + "code": "T-XX000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-AA000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "81745001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "12513" + } + ], + "text": "Eyes" + } + ] + } + }, + { + "fullUrl": "Observation/86c3eb9a-e737-4568-ad49-2550f35dc12c", + "resource": { + "resourceType": "Observation", + "id": "86c3eb9a-e737-4568-ad49-2550f35dc12c", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3281 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0750280", + "display": "Visual changes" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1016186" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000048290" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C157424" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C157424" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C157424" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU023886" + } + ], + "text": "changes in vision" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3271 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015392", + "display": "Eye" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0057369" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004810" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1107-6922" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "12513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "EYE" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s220" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "F" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046642" + }, + { + "system": "http://loinc.org", + "code": "LP7218-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005123" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003284" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000350235" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000020" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "18890" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X74in" + }, + { + "system": "http://snomed.info/sct", + "code": "T-XX000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-AA000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "81745001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "12513" + } + ], + "text": "Eyes" + } + } + }, + { + "fullUrl": "Observation/d7bc83e8-0908-41c3-abae-3c338f0ed859", + "resource": { + "resourceType": "Observation", + "id": "d7bc83e8-0908-41c3-abae-3c338f0ed859", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3300 + }, + { + "url": "length", + "valueInteger": 13 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0012569", + "display": "Diplopia" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015206" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003994" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "240" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1114-9612" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "DIPLOPIA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000977" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000651" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "H53.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "H53.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "H53.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "368.2" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU023244" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "F05002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001412" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85038207" + }, + { + "system": "http://loinc.org", + "code": "LA15082-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10013036" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "106" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004172" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "368.2" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C37941" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C37941" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "061815" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000786" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "F482." + }, + { + "system": "http://snomed.info/sct", + "code": "F-X0910" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DA-74510" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "24982008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0241" + } + ], + "text": "double vision" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3271 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015392", + "display": "Eye" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0057369" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004810" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1107-6922" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "12513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "EYE" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s220" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "F" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046642" + }, + { + "system": "http://loinc.org", + "code": "LP7218-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005123" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003284" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000350235" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000020" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "18890" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X74in" + }, + { + "system": "http://snomed.info/sct", + "code": "T-XX000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-AA000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "81745001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "12513" + } + ], + "text": "Eyes" + } + } + }, + { + "fullUrl": "Observation/376f221f-bc87-476e-b170-75da91f2f1d1", + "resource": { + "resourceType": "Observation", + "id": "376f221f-bc87-476e-b170-75da91f2f1d1", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3315 + }, + { + "url": "length", + "valueInteger": 13 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0344232", + "display": "Blurred vision" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004409" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015212" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000030921" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "114" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "AMBLYOPIA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U004389" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000622" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU081137" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "F05011" + }, + { + "system": "http://loinc.org", + "code": "LA15105-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10047513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "111364" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "368.8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00154" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C27123" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E10346" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2137" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C27123" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "211107" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000785" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X75bT" + }, + { + "system": "http://snomed.info/sct", + "code": "F-X0230" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DA-74404" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "246636008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0257" + } + ], + "text": "blurry vision" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3271 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015392", + "display": "Eye" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0057369" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004810" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1107-6922" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "12513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "EYE" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s220" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "F" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046642" + }, + { + "system": "http://loinc.org", + "code": "LP7218-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005123" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003284" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000350235" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000020" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "18890" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X74in" + }, + { + "system": "http://snomed.info/sct", + "code": "T-XX000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-AA000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "81745001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "12513" + } + ], + "text": "Eyes" + } + } + }, + { + "fullUrl": "Procedure/5f1910e3-8f69-4406-bf18-52114fa9da49", + "resource": { + "resourceType": "Procedure", + "id": "5f1910e3-8f69-4406-bf18-52114fa9da49", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3401 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "not-done", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0018768", + "display": "Hearing Aids" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1003291" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000005855" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0977-5562" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002102" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85059616" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "74541" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "5216" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D006310" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "003359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "22430" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X79ms" + }, + { + "system": "http://snomed.info/sct", + "code": "E-9078" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "A-04236" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "6012004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/umd", + "code": "11-967" + } + ], + "text": "hearing aids" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_performedDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + } + }, + { + "fullUrl": "Observation/d2519fed-9fec-4625-84c1-4158e3c30c03", + "resource": { + "resourceType": "Observation", + "id": "d2519fed-9fec-4625-84c1-4158e3c30c03", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3355 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0700148", + "display": "Congestion" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0059352" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000044675" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U006373" + }, + { + "system": "http://snomed.info/sct", + "code": "M-36100" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-36100" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "85804007" + } + ], + "text": "congestion" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ] + } + }, + { + "fullUrl": "Observation/6d5b8757-7d34-48f6-899b-a2ddb23e143b", + "resource": { + "resourceType": "Observation", + "id": "6d5b8757-7d34-48f6-899b-a2ddb23e143b", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3367 + }, + { + "url": "length", + "valueInteger": 18 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0429199", + "display": "Hearing change" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000033984" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C5037" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X77Ga" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "251358005" + } + ], + "text": "changes in hearing" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ] + } + }, + { + "fullUrl": "Observation/e133ef4e-1c5a-4547-aec6-438d9b23d436", + "resource": { + "resourceType": "Observation", + "id": "e133ef4e-1c5a-4547-aec6-438d9b23d436", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3433 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015230", + "display": "Exanthema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000022958" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00609" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014681" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000029440" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "RASH" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000988" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "782.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU027334" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001699" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046091" + }, + { + "system": "http://loinc.org", + "code": "LA29194-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10037844" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "273176" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "208" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005076" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "782.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01533" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070301" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU047706" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26.02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM07J" + }, + { + "system": "http://snomed.info/sct", + "code": "M-48400" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-01710" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "271807003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0028" + } + ], + "text": "rashes" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3416 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1123023", + "display": "Skin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002281" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0012516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000054821" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2716-0373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7163" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "S" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85123164" + }, + { + "system": "http://loinc.org", + "code": "LP76007-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D012867" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "47720" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N7.." + }, + { + "system": "http://snomed.info/sct", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39937001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7163" + } + ], + "text": "Skin" + } + } + }, + { + "fullUrl": "Observation/e76cf3ad-8865-48a9-a98f-b5b407ac13dc", + "resource": { + "resourceType": "Observation", + "id": "e76cf3ad-8865-48a9-a98f-b5b407ac13dc", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3462 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0013404", + "display": "Dyspnea" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005442" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00182" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015304" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004216" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "266" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2596-2296" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "DYSPNEA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U001014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002094" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R06.02" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "786.05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10029433" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "R02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R02" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU024507" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R02007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85040344" + }, + { + "system": "http://loinc.org", + "code": "LP115812-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10013968" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "115876" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "3077" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004417" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00495" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13368" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1816" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000046183" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "042109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU037132" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000598319" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "15680" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qq" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XE0qq" + }, + { + "system": "http://snomed.info/sct", + "code": "F-75040" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-20040" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "267036007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0514" + } + ], + "text": "SOB" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3442 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007226", + "display": "Cardiovascular system" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000017166" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00027" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0060472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0581-0263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CV" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7161" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s4109" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s4109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "K" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000808" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85020226" + }, + { + "system": "http://loinc.org", + "code": "LP7118-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002319" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044194" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "07650" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0eK" + }, + { + "system": "http://snomed.info/sct", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "113257007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7161" + } + ], + "text": "Cardiovascular" + } + } + }, + { + "fullUrl": "Observation/90b731c6-65b4-4d7b-9606-dafad24a3ae7", + "resource": { + "resourceType": "Observation", + "id": "90b731c6-65b4-4d7b-9606-dafad24a3ae7", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3467 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0008031", + "display": "Chest Pain" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00012" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017850" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "7.2.5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_10", + "code": "CIR012" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10cm", + "code": "CIR012" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002750" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "171" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "PAIN CHEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000673" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0100749" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R07.4" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R07.4" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R07.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "786.50" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "b28011" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "b28011" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "A11" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU059497" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A11001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000942" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85023146" + }, + { + "system": "http://loinc.org", + "code": "LP98885-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10008479" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "33722" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "4744" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002637" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "172" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00204" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C38665" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1776" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000467223" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C38665" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU025178" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "182.." + }, + { + "system": "http://snomed.info/sct", + "code": "F-71400" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-37000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "29857009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0718" + } + ], + "text": "chest pain" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3442 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007226", + "display": "Cardiovascular system" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000017166" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00027" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0060472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0581-0263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CV" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7161" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s4109" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s4109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "K" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000808" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85020226" + }, + { + "system": "http://loinc.org", + "code": "LP7118-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002319" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044194" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "07650" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0eK" + }, + { + "system": "http://snomed.info/sct", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "113257007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7161" + } + ], + "text": "Cardiovascular" + } + } + }, + { + "fullUrl": "Observation/8583135b-71e0-45d3-a63b-35dd2cc109a3", + "resource": { + "resourceType": "Observation", + "id": "8583135b-71e0-45d3-a63b-35dd2cc109a3", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3479 + }, + { + "url": "length", + "valueInteger": 18 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0030252", + "display": "Palpitations" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005344" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00127" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015583" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000009205" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "549" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "PALPITAT" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U003002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001962" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R00.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R00.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R00.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "785.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU057058" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K04013" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U006546" + }, + { + "system": "http://loinc.org", + "code": "LA16997-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10033557" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "341" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00866" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C37999" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E10163" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2467" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000476561" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C37999" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "211304" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU005271" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/qmr", + "code": "Q0200190" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qv" + }, + { + "system": "http://snomed.info/sct", + "code": "F-71550" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-37150" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "80313002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0221" + } + ], + "text": "heart palpitations" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3442 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007226", + "display": "Cardiovascular system" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000017166" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00027" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0060472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0581-0263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CV" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7161" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s4109" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s4109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "K" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000808" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85020226" + }, + { + "system": "http://loinc.org", + "code": "LP7118-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002319" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044194" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "07650" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0eK" + }, + { + "system": "http://snomed.info/sct", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "113257007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7161" + } + ], + "text": "Cardiovascular" + } + } + }, + { + "fullUrl": "Observation/78ff086b-a716-4df7-b433-71bb2afe7b9a", + "resource": { + "resourceType": "Observation", + "id": "78ff086b-a716-4df7-b433-71bb2afe7b9a", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3512 + }, + { + "url": "length", + "valueInteger": 20 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "hard to get a breath" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3500 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0024109", + "display": "Lung" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2612-7088" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7195" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "LUNG" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s43019" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s43019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002746" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85078891" + }, + { + "system": "http://loinc.org", + "code": "LP7407-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008168" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000270740" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU016106" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "28960" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N225" + }, + { + "system": "http://snomed.info/sct", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39607008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7195" + } + ], + "text": "Pulmonary" + } + } + }, + { + "fullUrl": "Observation/7f974b47-3247-4f24-84db-d01683103ffd", + "resource": { + "resourceType": "Observation", + "id": "7f974b47-3247-4f24-84db-d01683103ffd", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3544 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0013404", + "display": "Dyspnea" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005442" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00182" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015304" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004216" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "266" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2596-2296" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "DYSPNEA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U001014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002094" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "R06.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R06.02" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "786.05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10029433" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "R02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R02" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU024507" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R02007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85040344" + }, + { + "system": "http://loinc.org", + "code": "LP115812-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10013968" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "115876" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "3077" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004417" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000486" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00495" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13368" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1816" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000046183" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C2998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "042109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU037132" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000598319" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "15680" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qq" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XE0qq" + }, + { + "system": "http://snomed.info/sct", + "code": "F-75040" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-20040" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "267036007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0514" + } + ], + "text": "short of breath" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3500 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0024109", + "display": "Lung" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2612-7088" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7195" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "LUNG" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s43019" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s43019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002746" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85078891" + }, + { + "system": "http://loinc.org", + "code": "LP7407-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008168" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000270740" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU016106" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "28960" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N225" + }, + { + "system": "http://snomed.info/sct", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39607008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7195" + } + ], + "text": "Pulmonary" + } + } + }, + { + "fullUrl": "Observation/f9495fde-c9f1-463b-a0a7-fd5d8df105db", + "resource": { + "resourceType": "Observation", + "id": "f9495fde-c9f1-463b-a0a7-fd5d8df105db", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3564 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0010200", + "display": "Coughing" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000000620" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00179" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017295" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003404" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "212" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2616-8354" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "COUGH INC" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000880" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0012735" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R05" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R05" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R05" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "786.2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10047143" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "R05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R05" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU035357" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R05004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001180" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85033394" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10011224" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1543" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D003371" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00259" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C37935" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13364" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "4457" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C37935" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C37935" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "101020" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU015709" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "28.03" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/qmr", + "code": "Q0200085" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qn" + }, + { + "system": "http://snomed.info/sct", + "code": "F-75860" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-24100" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "263731006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0513" + } + ], + "text": "cough" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3500 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0024109", + "display": "Lung" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2612-7088" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7195" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "LUNG" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s43019" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s43019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002746" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85078891" + }, + { + "system": "http://loinc.org", + "code": "LP7407-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008168" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000270740" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU016106" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "28960" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N225" + }, + { + "system": "http://snomed.info/sct", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39607008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7195" + } + ], + "text": "Pulmonary" + } + } + }, + { + "fullUrl": "Observation/9b2916fd-6254-4175-84f9-980b53c1a581", + "resource": { + "resourceType": "Observation", + "id": "9b2916fd-6254-4175-84f9-980b53c1a581", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3587 + }, + { + "url": "length", + "valueInteger": 19 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0426587", + "display": "Altered appetite" + }, + { + "system": "http://loinc.org", + "code": "LP149971-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "283428" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00120" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "210814" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X76cN" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "249473004" + } + ], + "text": "changes in appetite" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3572 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0014136", + "display": "Endocrine system" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000017521" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004451" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1025-5280" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "ENDO" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "9668" + }, + { + "system": "http://loinc.org", + "code": "LP7203-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "23" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004703" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12705" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000468796" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12705" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "17360" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0sd" + }, + { + "system": "http://snomed.info/sct", + "code": "T-90000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-B0000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "113331007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "9668" + } + ], + "text": "Endocrine" + } + } + }, + { + "fullUrl": "Observation/92f5d484-e6e2-4698-bb3e-63d89a9d2e33", + "resource": { + "resourceType": "Observation", + "id": "92f5d484-e6e2-4698-bb3e-63d89a9d2e33", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3632 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "n/v" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3609 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0521362", + "display": "gastrointestinal" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00029" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0003081" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037933" + }, + { + "system": "http://loinc.org", + "code": "LP89777-4" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C13359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_edqm-hc", + "code": "0107" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045692" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C13359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000224" + }, + { + "system": "http://snomed.info/sct", + "code": "T-63950" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-50100" + } + ], + "text": "Gastro Intestinal" + } + } + }, + { + "fullUrl": "Observation/79d799ad-f74d-46a3-929e-0090d6984d1a", + "resource": { + "resourceType": "Observation", + "id": "79d799ad-f74d-46a3-929e-0090d6984d1a", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3636 + }, + { + "url": "length", + "valueInteger": 1 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "d" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3609 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0521362", + "display": "gastrointestinal" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00029" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0003081" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037933" + }, + { + "system": "http://loinc.org", + "code": "LP89777-4" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C13359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_edqm-hc", + "code": "0107" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045692" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C13359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000224" + }, + { + "system": "http://snomed.info/sct", + "code": "T-63950" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-50100" + } + ], + "text": "Gastro Intestinal" + } + } + }, + { + "fullUrl": "Observation/5ffe685d-99e6-4f20-ac90-25ad471da47b", + "resource": { + "resourceType": "Observation", + "id": "5ffe685d-99e6-4f20-ac90-25ad471da47b", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3641 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0009806", + "display": "Constipation" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00230" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccc", + "code": "B03.6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015408" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "9.12.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003300" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "200" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "65231" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1248-3977" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CONSTIP" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000845" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002019" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "K59.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "K59.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "K59.00" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "564.00" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10000567" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "D12" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "D12" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU018925" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "D12001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001143" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85031314" + }, + { + "system": "http://loinc.org", + "code": "MTHU020768" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10010774" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "230057" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "200" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D003248" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00011" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C37930" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E10562" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "3274" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000407757" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C37930" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "060708" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU001907" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "PRB_01000.06" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "11440" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/qmr", + "code": "Q0200081" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0rD" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XE0rD" + }, + { + "system": "http://snomed.info/sct", + "code": "F-62350" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D5-44010" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "14760008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0204" + } + ], + "text": "constipation" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3609 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0521362", + "display": "gastrointestinal" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00029" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0003081" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037933" + }, + { + "system": "http://loinc.org", + "code": "LP89777-4" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C13359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_edqm-hc", + "code": "0107" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045692" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C13359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000224" + }, + { + "system": "http://snomed.info/sct", + "code": "T-63950" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-50100" + } + ], + "text": "Gastro Intestinal" + } + } + }, + { + "fullUrl": "Observation/8f7c069c-f87b-42ac-96d4-654755030629", + "resource": { + "resourceType": "Observation", + "id": "8f7c069c-f87b-42ac-96d4-654755030629", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3683 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0566355", + "display": "Ability to swallow" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000039992" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "230310" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa4JU" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "288935001" + } + ], + "text": "swallow" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3609 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0521362", + "display": "gastrointestinal" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00029" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0003081" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037933" + }, + { + "system": "http://loinc.org", + "code": "LP89777-4" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C13359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_edqm-hc", + "code": "0107" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045692" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C13359" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000224" + }, + { + "system": "http://snomed.info/sct", + "code": "T-63950" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-50100" + } + ], + "text": "Gastro Intestinal" + } + } + }, + { + "fullUrl": "Condition/39be6604-7644-4c14-abb0-afdf13bc42dd", + "resource": { + "resourceType": "Condition", + "id": "39be6604-7644-4c14-abb0-afdf13bc42dd", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3775 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0150045", + "display": "Urge Incontinence" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccc", + "code": "T49.5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0035383" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000016767" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "65360" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "N39.41" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "788.31" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10026811" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU037816" + }, + { + "system": "http://loinc.org", + "code": "MTHU013458" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10046494" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "37679" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D053202" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "050335" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU065978" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "PRB_20000.05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "1A26." + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-0A670" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "87557004" + } + ], + "text": "urge incontinence" + }, + "bodySite": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3708 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C3887515", + "display": "Genitourinary" + }, + { + "system": "http://loinc.org", + "code": "LP89778-2" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000003" + } + ], + "text": "Genito Urinary" + } + ], + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "note": [ + { + "text": "Some" + } + ] + } + }, + { + "fullUrl": "Condition/f29183a3-bc63-4c6d-9994-057343f0566f", + "resource": { + "resourceType": "Condition", + "id": "f29183a3-bc63-4c6d-9994-057343f0566f", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3811 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0033377", + "display": "Ptosis" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00840" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1015620" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000010175" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "627" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U003258" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU062684" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U006562" + }, + { + "system": "http://loinc.org", + "code": "LA9244-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10076708" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D011391" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000308" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C36173" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C36173" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2475" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C36173" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XC0Au" + }, + { + "system": "http://snomed.info/sct", + "code": "M-31050" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-31050" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "29696001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0142" + } + ], + "text": "prolapse" + }, + "bodySite": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3708 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C3887515", + "display": "Genitourinary" + }, + { + "system": "http://loinc.org", + "code": "LP89778-2" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000003" + } + ], + "text": "Genito Urinary" + } + ], + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Observation/2f75e452-014c-4d08-87db-036d02aa4612", + "resource": { + "resourceType": "Observation", + "id": "2f75e452-014c-4d08-87db-036d02aa4612", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3728 + }, + { + "url": "length", + "valueInteger": 19 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "increased frequency" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3708 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C3887515", + "display": "Genitourinary" + }, + { + "system": "http://loinc.org", + "code": "LP89778-2" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000003" + } + ], + "text": "Genito Urinary" + } + } + }, + { + "fullUrl": "Observation/f50e8925-4c59-498a-b26d-8cdd24611fba", + "resource": { + "resourceType": "Observation", + "id": "f50e8925-4c59-498a-b26d-8cdd24611fba", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3751 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0030193", + "display": "Pain" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002779" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00754" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccc", + "code": "Q63.0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0035760" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000009185" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "548" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "65336" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2683-4824" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "PAIN" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0012531" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R52.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R52.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R52" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "338-338.99" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "b280-b289" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "b280-b289" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10023130" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU059479" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A29020" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003436" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85096617" + }, + { + "system": "http://loinc.org", + "code": "MTHU029813" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10033371" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "283263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "351" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D010146" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "306" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "780.96" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01394" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E11167" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1994" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C3303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "200714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU033713" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "24" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "PRB_17010.03" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000041399" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pnds", + "code": "NP.405" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "36150" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa07F" + }, + { + "system": "http://snomed.info/sct", + "code": "F-82600" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-A2600" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "22253000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0730" + } + ], + "text": "pain" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3708 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C3887515", + "display": "Genitourinary" + }, + { + "system": "http://loinc.org", + "code": "LP89778-2" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C25350" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000003" + } + ], + "text": "Genito Urinary" + } + } + }, + { + "fullUrl": "List/cd98589b-54af-4d9f-8fa7-f0ac32bd4df0", + "resource": { + "resourceType": "List", + "id": "cd98589b-54af-4d9f-8fa7-f0ac32bd4df0", + "status": "current", + "mode": "snapshot", + "title": "Review of Systems", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "Observation/3e34ed2e-c918-436e-a335-5b6a75fe70aa", + "type": "Observation", + "display": "NAD" + } + }, + { + "item": { + "reference": "Observation/253cebde-c965-442b-87f3-0af428fc5148", + "type": "Observation", + "display": "feeling well" + } + }, + { + "item": { + "reference": "Procedure/551e9b17-9ec7-4573-81f0-1814fe19b546", + "type": "Procedure", + "display": "glasses" + } + }, + { + "item": { + "reference": "Observation/86c3eb9a-e737-4568-ad49-2550f35dc12c", + "type": "Observation", + "display": "changes in vision" + } + }, + { + "item": { + "reference": "Observation/d7bc83e8-0908-41c3-abae-3c338f0ed859", + "type": "Observation", + "display": "double vision" + } + }, + { + "item": { + "reference": "Observation/376f221f-bc87-476e-b170-75da91f2f1d1", + "type": "Observation", + "display": "blurry vision" + } + }, + { + "item": { + "reference": "Procedure/5f1910e3-8f69-4406-bf18-52114fa9da49", + "type": "Procedure", + "display": "hearing aids" + } + }, + { + "item": { + "reference": "Observation/d2519fed-9fec-4625-84c1-4158e3c30c03", + "type": "Observation", + "display": "congestion" + } + }, + { + "item": { + "reference": "Observation/6d5b8757-7d34-48f6-899b-a2ddb23e143b", + "type": "Observation", + "display": "changes in hearing" + } + }, + { + "item": { + "reference": "Observation/e133ef4e-1c5a-4547-aec6-438d9b23d436", + "type": "Observation", + "display": "rashes" + } + }, + { + "item": { + "reference": "Observation/e76cf3ad-8865-48a9-a98f-b5b407ac13dc", + "type": "Observation", + "display": "SOB" + } + }, + { + "item": { + "reference": "Observation/90b731c6-65b4-4d7b-9606-dafad24a3ae7", + "type": "Observation", + "display": "chest pain" + } + }, + { + "item": { + "reference": "Observation/8583135b-71e0-45d3-a63b-35dd2cc109a3", + "type": "Observation", + "display": "heart palpitations" + } + }, + { + "item": { + "reference": "Observation/78ff086b-a716-4df7-b433-71bb2afe7b9a", + "type": "Observation", + "display": "hard to get a breath" + } + }, + { + "item": { + "reference": "Observation/7f974b47-3247-4f24-84db-d01683103ffd", + "type": "Observation", + "display": "short of breath" + } + }, + { + "item": { + "reference": "Observation/f9495fde-c9f1-463b-a0a7-fd5d8df105db", + "type": "Observation", + "display": "cough" + } + }, + { + "item": { + "reference": "Observation/9b2916fd-6254-4175-84f9-980b53c1a581", + "type": "Observation", + "display": "changes in appetite" + } + }, + { + "item": { + "reference": "Observation/92f5d484-e6e2-4698-bb3e-63d89a9d2e33", + "type": "Observation", + "display": "n/v" + } + }, + { + "item": { + "reference": "Observation/79d799ad-f74d-46a3-929e-0090d6984d1a", + "type": "Observation", + "display": "d" + } + }, + { + "item": { + "reference": "Observation/5ffe685d-99e6-4f20-ac90-25ad471da47b", + "type": "Observation", + "display": "constipation" + } + }, + { + "item": { + "reference": "Observation/8f7c069c-f87b-42ac-96d4-654755030629", + "type": "Observation", + "display": "swallow" + } + }, + { + "item": { + "reference": "Condition/39be6604-7644-4c14-abb0-afdf13bc42dd", + "type": "Condition", + "display": "urge incontinence" + } + }, + { + "item": { + "reference": "Condition/f29183a3-bc63-4c6d-9994-057343f0566f", + "type": "Condition", + "display": "prolapse" + } + }, + { + "item": { + "reference": "Observation/2f75e452-014c-4d08-87db-036d02aa4612", + "type": "Observation", + "display": "increased frequency" + } + }, + { + "item": { + "reference": "Observation/f50e8925-4c59-498a-b26d-8cdd24611fba", + "type": "Observation", + "display": "pain" + } + } + ] + } + }, + { + "fullUrl": "Observation/6d6344e6-464a-4652-a6dc-f20c2a3869d6", + "resource": { + "resourceType": "Observation", + "id": "6d6344e6-464a-4652-a6dc-f20c2a3869d6", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-temperature" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3859 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0005903", + "display": "Body Temperature" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000001730" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1009832" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002050" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "32861" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2871-4249" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "b5500" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "b5500" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU073659" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000633" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85015255" + }, + { + "system": "http://loinc.org", + "code": "MTHU061731" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "6288" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D001831" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U001749" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C174446" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-VSTESTCD" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "200704" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "06500" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa085" + }, + { + "system": "http://snomed.info/sct", + "code": "F-03000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-03000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "386725007" + }, + { + "system": "http://loinc.org", + "code": "8310-5", + "display": "Body temperature" + } + ], + "text": "Temp" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 35.9, + "unit": "celsius", + "system": "http://unitsofmeasure.org", + "code": "Cel" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/38f84639-0240-4b1e-a6da-22f079a5dc3d", + "resource": { + "resourceType": "Observation", + "id": "38f84639-0240-4b1e-a6da-22f079a5dc3d", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3871 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0034107", + "display": "Pulse taking" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccc", + "code": "K33.3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000010407" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85109028" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "306388" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D011674" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003399" + }, + { + "system": "http://snomed.info/sct", + "code": "P-Y101" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "PA-00510" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "65653002" + }, + { + "system": "http://loinc.org", + "code": "8867-4", + "display": "Heart rate" + } + ], + "text": "Pulse" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 76, + "unit": "per minute", + "system": "http://unitsofmeasure.org", + "code": "/min" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/accba11a-ad34-462f-b16a-174afe057995", + "resource": { + "resourceType": "Observation", + "id": "accba11a-ad34-462f-b16a-174afe057995", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3882 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0030054", + "display": "oxygen" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000001289" + }, + { + "system": "http://www.whocc.no/atc", + "code": "V03AN01" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000009153" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "32041" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2189-1281" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB09140" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "5214" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003425" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85096329" + }, + { + "system": "http://loinc.org", + "code": "LP14536-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d06860" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D010100" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000131" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "S88TT14065" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C722" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "S88TT14065" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000538149" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "000826" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "36090" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM0l9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "7806" + }, + { + "system": "http://snomed.info/sct", + "code": "F-10470" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-10110" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "24099007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m59550" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4019105" + }, + { + "system": "http://loinc.org", + "code": "59408-5", + "display": "Oxygen saturation in Arterial blood by Pulse oximetry" + }, + { + "system": "http://loinc.org", + "code": "2708-6", + "display": "Oxygen saturation in Arterial blood" + } + ], + "text": "O2" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ], + "component": [ + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "3150-0", + "display": "Inhaled oxygen concentration" + } + ], + "text": "Inhaled oxygen concentration" + }, + "valueQuantity": { + "value": 98, + "unit": "% ra", + "system": "http://unitsofmeasure.org", + "code": "%" + } + }, + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "3151-8", + "display": "Inhaled oxygen flow rate" + } + ], + "text": "Inhaled oxygen flow rate" + }, + "dataAbsentReason": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason", + "code": "unknown", + "display": "unknown" + } + ], + "text": "unknown" + } + } + ] + } + }, + { + "fullUrl": "Observation/93d28e03-64b7-404e-8c4c-8497a3c1f244", + "resource": { + "resourceType": "Observation", + "id": "93d28e03-64b7-404e-8c4c-8497a3c1f244", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3894 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C3498181", + "display": "retrorubral area" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/neu", + "code": "1049" + } + ], + "text": "RR" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 20 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/c6dab3c6-9e14-40ab-9cbd-f7f70b23400b", + "resource": { + "resourceType": "Observation", + "id": "c6dab3c6-9e14-40ab-9cbd-f7f70b23400b", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-blood-pressure" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3902 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0005824", + "display": "Blood pressure determination" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000007392" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccc", + "code": "K33.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10031996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85015011" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10076581" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "6045" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D001795" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C167233" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C167233" + }, + { + "system": "http://snomed.info/sct", + "code": "P-Y107" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "PA-00540" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "46973005" + }, + { + "system": "http://loinc.org", + "code": "85354-9", + "display": "Blood pressure panel with all children optional" + } + ], + "text": "BP" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ], + "component": [ + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8480-6", + "display": "Systolic blood pressure" + } + ], + "text": "Systolic blood pressure" + }, + "valueQuantity": { + "value": 159, + "unit": "mmHg", + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + } + }, + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8462-4", + "display": "Diastolic blood pressure" + } + ], + "text": "Diastolic blood pressure" + }, + "valueQuantity": { + "value": 111, + "unit": "mmHg", + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + } + } + ] + } + }, + { + "fullUrl": "Observation/001ef1a6-ed67-4758-8c01-3d7ab54382c9", + "resource": { + "resourceType": "Observation", + "id": "001ef1a6-ed67-4758-8c01-3d7ab54382c9", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3927 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C2051415", + "display": "patient appears in no acute distress (physical finding)" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "10024" + } + ], + "text": "NAD" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/ba2453b5-c68c-4d75-8eb6-d5b73de8a578", + "resource": { + "resourceType": "Observation", + "id": "ba2453b5-c68c-4d75-8eb6-d5b73de8a578", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3940 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "text": "up in bed" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/92e2a522-850e-402e-a13c-c8d6a33a79c8", + "resource": { + "resourceType": "Observation", + "id": "92e2a522-850e-402e-a13c-c8d6a33a79c8", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3951 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "text": "well groomed" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/0305a72e-1be6-4b63-b418-1d641ebd106d", + "resource": { + "resourceType": "Observation", + "id": "0305a72e-1be6-4b63-b418-1d641ebd106d", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3971 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ], + "text": "Vital Signs" + } + ], + "code": { + "text": "nightgown" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/c006ed4f-e3e5-43da-9e47-cea7525a28d1", + "resource": { + "resourceType": "Observation", + "id": "c006ed4f-e3e5-43da-9e47-cea7525a28d1", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3990 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C2143306", + "display": "PERRLA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "206277" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C87108" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C87108" + } + ], + "text": "PERRLA" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3983 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015392", + "display": "Eye" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0057369" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004810" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1107-6922" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "12513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "EYE" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s220" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "F" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046642" + }, + { + "system": "http://loinc.org", + "code": "LP7218-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005123" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003284" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000350235" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000020" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "18890" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X74in" + }, + { + "system": "http://snomed.info/sct", + "code": "T-XX000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-AA000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "81745001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "12513" + } + ], + "text": "Eyes" + } + } + }, + { + "fullUrl": "Observation/2062769e-4713-4ebd-a1b2-1c98429361dc", + "resource": { + "resourceType": "Observation", + "id": "2062769e-4713-4ebd-a1b2-1c98429361dc", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3998 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "EOM intact" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 3983 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015392", + "display": "Eye" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0057369" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004810" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1107-6922" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "12513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "EYE" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s220" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "F" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046642" + }, + { + "system": "http://loinc.org", + "code": "LP7218-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005123" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003284" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000350235" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000020" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "18890" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X74in" + }, + { + "system": "http://snomed.info/sct", + "code": "T-XX000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-AA000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "81745001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "12513" + } + ], + "text": "Eyes" + } + } + }, + { + "fullUrl": "Observation/b27f0400-9139-47cd-a5c4-837f19cb8aaa", + "resource": { + "resourceType": "Observation", + "id": "b27f0400-9139-47cd-a5c4-837f19cb8aaa", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4023 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "swollen tounge" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4017 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "Large" + }, + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4042 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007966", + "display": "Cheek structure" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000016962" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002727" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2139-1459" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "46476" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "CHEEK" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000928" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85022839" + }, + { + "system": "http://loinc.org", + "code": "LP76299-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002610" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C13070" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C13070" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa2E3" + }, + { + "system": "http://snomed.info/sct", + "code": "T-Y0300" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-D1206" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "60819002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "46476" + } + ], + "text": "cheek" + } + } + }, + { + "fullUrl": "Observation/69c84ffd-5600-4890-b0bc-d61a2a446fd6", + "resource": { + "resourceType": "Observation", + "id": "69c84ffd-5600-4890-b0bc-d61a2a446fd6", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4062 + }, + { + "url": "length", + "valueInteger": 16 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "tounge was large" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/69471b6b-abc4-457b-bfcd-33911b31a7ee", + "resource": { + "resourceType": "Observation", + "id": "69471b6b-abc4-457b-bfcd-33911b31a7ee", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4083 + }, + { + "url": "length", + "valueInteger": 17 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "obscured the view" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/f73baecf-902d-4d27-96a6-a27baa41d1bc", + "resource": { + "resourceType": "Observation", + "id": "f73baecf-902d-4d27-96a6-a27baa41d1bc", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4164 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0038999", + "display": "Swelling" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004456" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1000701" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000011957" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "715" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "A08" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "A08" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A08003" + }, + { + "system": "http://loinc.org", + "code": "LA22440-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10042674" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1229" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3399" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2091" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "191325" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU067007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X76Eu" + }, + { + "system": "http://snomed.info/sct", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "442672001" + } + ], + "text": "swelling" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4141 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "noticeable" + }, + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4155 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "palpable" + }, + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4131 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0027530", + "display": "Neck" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004571" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008531" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0468-5952" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "BODY/NECK" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7155" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "NECK" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003138" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85090554" + }, + { + "system": "http://loinc.org", + "code": "LP7440-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009333" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "33120" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa8T4" + }, + { + "system": "http://snomed.info/sct", + "code": "T-Y0600" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-D1600" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "45048000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7155" + } + ], + "text": "Neck" + } + } + }, + { + "fullUrl": "Observation/b769bf15-c1ce-4e99-a16b-497a4717a1a5", + "resource": { + "resourceType": "Observation", + "id": "b769bf15-c1ce-4e99-a16b-497a4717a1a5", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4174 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0332575", + "display": "Redness" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000029494" + }, + { + "system": "http://loinc.org", + "code": "LA22439-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10038198" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "03695" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "040747" + }, + { + "system": "http://snomed.info/sct", + "code": "M-04040" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-04040" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "386713009" + } + ], + "text": "redness" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4141 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "noticeable" + }, + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4155 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "palpable" + }, + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4131 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0027530", + "display": "Neck" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004571" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008531" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0468-5952" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "BODY/NECK" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7155" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "NECK" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003138" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85090554" + }, + { + "system": "http://loinc.org", + "code": "LP7440-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009333" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "33120" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa8T4" + }, + { + "system": "http://snomed.info/sct", + "code": "T-Y0600" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-D1600" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "45048000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7155" + } + ], + "text": "Neck" + } + } + }, + { + "fullUrl": "Observation/c54a60b0-0a04-4f17-8ac3-ea1ea7ce40ab", + "resource": { + "resourceType": "Observation", + "id": "c54a60b0-0a04-4f17-8ac3-ea1ea7ce40ab", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4185 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015230", + "display": "Exanthema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000022958" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00609" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014681" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000029440" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "RASH" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000988" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "782.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU027334" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001699" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046091" + }, + { + "system": "http://loinc.org", + "code": "LA29194-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10037844" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "273176" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "208" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005076" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "782.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01533" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070301" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU047706" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26.02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM07J" + }, + { + "system": "http://snomed.info/sct", + "code": "M-48400" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-01710" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "271807003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0028" + } + ], + "text": "rash" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4141 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "noticeable" + }, + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4155 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "palpable" + }, + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4131 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0027530", + "display": "Neck" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004571" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008531" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0468-5952" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "BODY/NECK" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7155" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "NECK" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U003138" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85090554" + }, + { + "system": "http://loinc.org", + "code": "LP7440-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009333" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C13063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000513" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "33120" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa8T4" + }, + { + "system": "http://snomed.info/sct", + "code": "T-Y0600" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-D1600" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "45048000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7155" + } + ], + "text": "Neck" + } + } + }, + { + "fullUrl": "Observation/f7f0c8c0-b473-4df7-aa3b-2f0b425a5342", + "resource": { + "resourceType": "Observation", + "id": "f7f0c8c0-b473-4df7-aa3b-2f0b425a5342", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4234 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0497156", + "display": "Lymphadenopathy" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/air", + "code": "LYMPH" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005958" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00319" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017733" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007601" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0427-7757" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "LYMPHADENO" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0002716" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R59.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU046563" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "B02006" + }, + { + "system": "http://loinc.org", + "code": "LP247924-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10025197" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "277693" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000072281" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "785.6" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C50764" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2092" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044313" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C50764" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070310" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU002630" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0Vr" + }, + { + "system": "http://snomed.info/sct", + "code": "M-71000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DC-72130" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "30746006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0577" + } + ], + "text": "lymphadenopathy" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ] + } + }, + { + "fullUrl": "Observation/ce0ef48b-7d52-446f-a501-d398c070c0e9", + "resource": { + "resourceType": "Observation", + "id": "ce0ef48b-7d52-446f-a501-d398c070c0e9", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4269 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C2712143", + "display": "Normal heart rate" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1011151" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000022883" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10029229" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10019306" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa7s1" + }, + { + "system": "http://snomed.info/sct", + "code": "F-73121" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-33121" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "76863003" + } + ], + "text": "RRR" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4252 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007226", + "display": "Cardiovascular system" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000017166" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00027" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0060472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0581-0263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CV" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7161" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s4109" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s4109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "K" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000808" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85020226" + }, + { + "system": "http://loinc.org", + "code": "LP7118-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002319" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044194" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "07650" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0eK" + }, + { + "system": "http://snomed.info/sct", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "113257007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7161" + } + ], + "text": "Cardiovascular" + } + } + }, + { + "fullUrl": "Observation/23a08c8f-5293-4761-b144-d8b4776ea4e6", + "resource": { + "resourceType": "Observation", + "id": "23a08c8f-5293-4761-b144-d8b4776ea4e6", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4276 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "m/r/g" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4252 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007226", + "display": "Cardiovascular system" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000017166" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00027" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0060472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0581-0263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CV" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7161" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s4109" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s4109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "K" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000808" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85020226" + }, + { + "system": "http://loinc.org", + "code": "LP7118-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002319" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044194" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "07650" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0eK" + }, + { + "system": "http://snomed.info/sct", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "113257007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7161" + } + ], + "text": "Cardiovascular" + } + } + }, + { + "fullUrl": "Observation/e134033b-7d5a-41eb-bb13-0e9cd149fe2a", + "resource": { + "resourceType": "Observation", + "id": "e134033b-7d5a-41eb-bb13-0e9cd149fe2a", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4286 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0425687", + "display": "Jugular venous engorgement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0014861" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000024345" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U002232" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM02b" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "271653008" + } + ], + "text": "JVD" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4252 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007226", + "display": "Cardiovascular system" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000017166" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00027" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0060472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0581-0263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CV" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7161" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s4109" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s4109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "K" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000808" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85020226" + }, + { + "system": "http://loinc.org", + "code": "LP7118-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002319" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044194" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "07650" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0eK" + }, + { + "system": "http://snomed.info/sct", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "113257007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7161" + } + ], + "text": "Cardiovascular" + } + } + }, + { + "fullUrl": "Observation/8bb175d9-7a0d-434b-a62d-bf97a49bb261", + "resource": { + "resourceType": "Observation", + "id": "8bb175d9-7a0d-434b-a62d-bf97a49bb261", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4294 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007280", + "display": "Carotid bruit" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00085" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0061183" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002481" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "157" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000557" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K81006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10048777" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "7330" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C168039" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "040604" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU071454" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "419642000" + } + ], + "text": "carotid bruits" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4252 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007226", + "display": "Cardiovascular system" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000017166" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00027" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0060472" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0581-0263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CV" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7161" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s4109" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s4109" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "K" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000808" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85020226" + }, + { + "system": "http://loinc.org", + "code": "LP7118-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002319" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044194" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "07650" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0eK" + }, + { + "system": "http://snomed.info/sct", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-30000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "113257007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7161" + } + ], + "text": "Cardiovascular" + } + } + }, + { + "fullUrl": "Observation/ef9a50ee-6b56-45c2-9769-04e2fc7e1052", + "resource": { + "resourceType": "Observation", + "id": "ef9a50ee-6b56-45c2-9769-04e2fc7e1052", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4319 + }, + { + "url": "length", + "valueInteger": 20 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "Clear to auscltation" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4311 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0024109", + "display": "Lung" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2612-7088" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7195" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "LUNG" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s43019" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s43019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002746" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85078891" + }, + { + "system": "http://loinc.org", + "code": "LP7407-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008168" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000270740" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU016106" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "28960" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N225" + }, + { + "system": "http://snomed.info/sct", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39607008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7195" + } + ], + "text": "Lungs" + } + } + }, + { + "fullUrl": "Observation/62c4a367-4b79-4e4f-b6cd-f6063d41b0b1", + "resource": { + "resourceType": "Observation", + "id": "62c4a367-4b79-4e4f-b6cd-f6063d41b0b1", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4344 + }, + { + "url": "length", + "valueInteger": 23 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "use of acessory muscles" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4311 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0024109", + "display": "Lung" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2612-7088" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7195" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "LUNG" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s43019" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s43019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002746" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85078891" + }, + { + "system": "http://loinc.org", + "code": "LP7407-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008168" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000270740" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU016106" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "28960" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N225" + }, + { + "system": "http://snomed.info/sct", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39607008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7195" + } + ], + "text": "Lungs" + } + } + }, + { + "fullUrl": "Observation/b0e3e645-fdfe-4e2e-9e1f-e3af0f99580a", + "resource": { + "resourceType": "Observation", + "id": "b0e3e645-fdfe-4e2e-9e1f-e3af0f99580a", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4372 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0034642", + "display": "Rales" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000010564" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "LUNG DIS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U003311" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0030830" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R09.89" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU064770" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R04004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10037833" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "7058" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D012135" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "786.7" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C119216" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C119216" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "060310" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU054375" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM08B" + }, + { + "system": "http://snomed.info/sct", + "code": "F-76000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-23200" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "48409008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "1141" + } + ], + "text": "crackles" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4311 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0024109", + "display": "Lung" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2612-7088" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7195" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "LUNG" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s43019" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s43019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002746" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85078891" + }, + { + "system": "http://loinc.org", + "code": "LP7407-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008168" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000270740" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU016106" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "28960" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N225" + }, + { + "system": "http://snomed.info/sct", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39607008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7195" + } + ], + "text": "Lungs" + } + } + }, + { + "fullUrl": "Observation/08fd4874-bbd6-447e-b65d-6ef0541b9be8", + "resource": { + "resourceType": "Observation", + "id": "08fd4874-bbd6-447e-b65d-6ef0541b9be8", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4384 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0043144", + "display": "Wheezing" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000013155" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000732" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "ASTHMA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U004468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0030828" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R06.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R06.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R06.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "786.07" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10030128" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "R03" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "R03" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU082431" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R03002" + }, + { + "system": "http://loinc.org", + "code": "MTHU013532" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10047924" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "273" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D012135" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01783" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C78718" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13605" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "4463" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C78718" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070603" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU038722" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qs" + }, + { + "system": "http://snomed.info/sct", + "code": "F-76110" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-23310" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "56018004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0511" + } + ], + "text": "wheezes" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4311 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0024109", + "display": "Lung" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2612-7088" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7195" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "LUNG" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s43019" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s43019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002746" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85078891" + }, + { + "system": "http://loinc.org", + "code": "LP7407-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D008168" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000270740" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12468" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU016106" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "28960" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N225" + }, + { + "system": "http://snomed.info/sct", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-28000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39607008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7195" + } + ], + "text": "Lungs" + } + } + }, + { + "fullUrl": "Observation/b6a7c561-40cd-4f4c-9e3d-4010424f7dcd", + "resource": { + "resourceType": "Observation", + "id": "b6a7c561-40cd-4f4c-9e3d-4010424f7dcd", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4405 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015230", + "display": "Exanthema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000022958" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00609" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014681" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000029440" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "RASH" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000988" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R21" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "782.1" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU027334" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001699" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85046091" + }, + { + "system": "http://loinc.org", + "code": "LA29194-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10037844" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "273176" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "208" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005076" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "638" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "782.1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01533" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C111884" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C39594" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070301" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU047706" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26.02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM07J" + }, + { + "system": "http://snomed.info/sct", + "code": "M-48400" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-01710" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "271807003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0028" + } + ], + "text": "rashes" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4395 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1123023", + "display": "Skin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002281" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0012516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000054821" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2716-0373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7163" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "S" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85123164" + }, + { + "system": "http://loinc.org", + "code": "LP76007-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D012867" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "47720" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N7.." + }, + { + "system": "http://snomed.info/sct", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39937001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7163" + } + ], + "text": "Skin" + } + } + }, + { + "fullUrl": "Observation/b903e342-8eb1-4d0a-9f10-a9a7a1f371f1", + "resource": { + "resourceType": "Observation", + "id": "b903e342-8eb1-4d0a-9f10-a9a7a1f371f1", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4413 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0235218", + "display": "Warm skin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000023475" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "VASODILAT" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10040952" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-44078" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "102599008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0207" + } + ], + "text": "skin warm" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4395 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1123023", + "display": "Skin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002281" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0012516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000054821" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2716-0373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7163" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "S" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85123164" + }, + { + "system": "http://loinc.org", + "code": "LP76007-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D012867" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "47720" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N7.." + }, + { + "system": "http://snomed.info/sct", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39937001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7163" + } + ], + "text": "Skin" + } + } + }, + { + "fullUrl": "Observation/f725aee3-ee72-4bad-b12c-0e1d757da440", + "resource": { + "resourceType": "Observation", + "id": "f725aee3-ee72-4bad-b12c-0e1d757da440", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4427 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0205222", + "display": "Dry" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000020415" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X78yG" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "G-A325" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "13880007" + } + ], + "text": "dry" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4395 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1123023", + "display": "Skin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002281" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0012516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000054821" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2716-0373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7163" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "S" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85123164" + }, + { + "system": "http://loinc.org", + "code": "LP76007-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D012867" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "47720" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N7.." + }, + { + "system": "http://snomed.info/sct", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39937001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7163" + } + ], + "text": "Skin" + } + } + }, + { + "fullUrl": "Observation/e0baed06-518a-49b1-9ef3-938c45d2f488", + "resource": { + "resourceType": "Observation", + "id": "e0baed06-518a-49b1-9ef3-938c45d2f488", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4435 + }, + { + "url": "length", + "valueInteger": 18 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "erythematous areas" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4395 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1123023", + "display": "Skin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002281" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0012516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000054821" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2716-0373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "7163" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "S" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85123164" + }, + { + "system": "http://loinc.org", + "code": "LP76007-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D012867" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "26" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "47720" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N7.." + }, + { + "system": "http://snomed.info/sct", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-01000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39937001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "7163" + } + ], + "text": "Skin" + } + } + }, + { + "fullUrl": "Observation/fe9c86ab-fef0-43fc-8556-f687a90461be", + "resource": { + "resourceType": "Observation", + "id": "fe9c86ab-fef0-43fc-8556-f687a90461be", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4466 + }, + { + "url": "length", + "valueInteger": 19 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0278005", + "display": "Normal bowel sounds" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000027079" + }, + { + "system": "http://loinc.org", + "code": "LA25030-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10070940" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa7W9" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-54201" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "61539000" + } + ], + "text": "Normal bowel sounds" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4456 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0000726", + "display": "Abdomen" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000016974" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000528" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0468-2204" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "BODY/ABDO" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "9577" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "ADB" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85000091" + }, + { + "system": "http://loinc.org", + "code": "LP6990-8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000219" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "00010" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa8T7" + }, + { + "system": "http://snomed.info/sct", + "code": "T-Y4100" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-D4000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "818983003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "9577" + } + ], + "text": "Abdomen" + } + } + }, + { + "fullUrl": "Observation/d1aae4cd-1487-466a-bda3-75a3b0750c4a", + "resource": { + "resourceType": "Observation", + "id": "d1aae4cd-1487-466a-bda3-75a3b0750c4a", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4487 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0426663", + "display": "Abdomen soft" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "206271" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X76dh" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "249543005" + } + ], + "text": "abdomen soft" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4456 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0000726", + "display": "Abdomen" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000016974" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000528" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0468-2204" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "BODY/ABDO" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "9577" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "ADB" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85000091" + }, + { + "system": "http://loinc.org", + "code": "LP6990-8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000219" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "00010" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa8T7" + }, + { + "system": "http://snomed.info/sct", + "code": "T-Y4100" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-D4000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "818983003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "9577" + } + ], + "text": "Abdomen" + } + } + }, + { + "fullUrl": "Observation/7d63cc6f-00ca-4410-b282-d1bc92d9d569", + "resource": { + "resourceType": "Observation", + "id": "7d63cc6f-00ca-4410-b282-d1bc92d9d569", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4504 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0520960", + "display": "Non-tender" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037818" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU038385" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa7ig" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-A2615" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "300821004" + } + ], + "text": "nontender" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4456 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0000726", + "display": "Abdomen" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000016974" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000528" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0468-2204" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "BODY/ABDO" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "9577" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "ADB" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85000091" + }, + { + "system": "http://loinc.org", + "code": "LP6990-8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000219" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "00010" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa8T7" + }, + { + "system": "http://snomed.info/sct", + "code": "T-Y4100" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-D4000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "818983003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "9577" + } + ], + "text": "Abdomen" + } + } + }, + { + "fullUrl": "Observation/8e788834-864f-4331-a51e-a5b2709af6c0", + "resource": { + "resourceType": "Observation", + "id": "8e788834-864f-4331-a51e-a5b2709af6c0", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4533 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0013604", + "display": "Edema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005462" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00114" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014846" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000029664" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "273" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0465-4760" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "EDEMA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000969" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "782.3" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU053978" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K07003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001504" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85040948" + }, + { + "system": "http://loinc.org", + "code": "MTHU019803" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10030095" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "7268" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1229" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004487" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "715" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "782.3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00501" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C3002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1820" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045676" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "250905" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "29.01" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qw" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XE0qw" + }, + { + "system": "http://snomed.info/sct", + "code": "M-36500" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-36300" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "267038008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "66941" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0398" + } + ], + "text": "edema" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4516 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "Extremeties" + } + } + }, + { + "fullUrl": "Observation/c4114093-1e0e-42d3-a1a7-053cda0021e1", + "resource": { + "resourceType": "Observation", + "id": "c4114093-1e0e-42d3-a1a7-053cda0021e1", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4540 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0010520", + "display": "Cyanosis" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004378" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1003234" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2604-4949" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "CYANOSIS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000918" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000961" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R23.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R23.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R23.0" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "782.5" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU020248" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "S08011" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001228" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85035033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10011703" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "11139" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D003490" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00267" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C26737" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1798" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C26737" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "040032" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU036837" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "28.05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM07N" + }, + { + "system": "http://snomed.info/sct", + "code": "M-04120" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-04100" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "3415004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0501" + } + ], + "text": "cyanosis" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4516 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "Extremeties" + } + } + }, + { + "fullUrl": "Observation/76abe39a-811d-4457-8a34-77a18666157f", + "resource": { + "resourceType": "Observation", + "id": "76abe39a-811d-4457-8a34-77a18666157f", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4552 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0149651", + "display": "Clubbing" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00177" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0055338" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000016640" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000140" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000972" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001217" + }, + { + "system": "http://loinc.org", + "code": "LA19080-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10009691" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C85489" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU006479" + }, + { + "system": "http://snomed.info/sct", + "code": "M-71530" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-78050" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "367004" + } + ], + "text": "clubbing" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4516 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "Extremeties" + } + } + }, + { + "fullUrl": "Observation/44f87849-ec09-4f87-94e0-010f7cdcb7e8", + "resource": { + "resourceType": "Observation", + "id": "44f87849-ec09-4f87-94e0-010f7cdcb7e8", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4596 + }, + { + "url": "length", + "valueInteger": 22 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "normal range of motion" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4563 + }, + { + "url": "length", + "valueInteger": 16 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0497254", + "display": "Musculoskeletal" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0047159" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037430" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "L" + }, + { + "system": "http://loinc.org", + "code": "LP89781-6" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25348" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044938" + } + ], + "text": "Musculo Skeletal" + } + } + }, + { + "fullUrl": "Observation/ae964a2a-ae2e-4d80-82e3-4ec52bed2587", + "resource": { + "resourceType": "Observation", + "id": "ae964a2a-ae2e-4d80-82e3-4ec52bed2587", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4623 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0038999", + "display": "Swelling" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004456" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1000701" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000011957" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "715" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "A08" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "A08" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A08003" + }, + { + "system": "http://loinc.org", + "code": "LA22440-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10042674" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1229" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3399" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2091" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "191325" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU067007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X76Eu" + }, + { + "system": "http://snomed.info/sct", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "442672001" + } + ], + "text": "swollen" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4563 + }, + { + "url": "length", + "valueInteger": 16 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0497254", + "display": "Musculoskeletal" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0047159" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037430" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "L" + }, + { + "system": "http://loinc.org", + "code": "LP89781-6" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25348" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044938" + } + ], + "text": "Musculo Skeletal" + } + } + }, + { + "fullUrl": "Observation/ee352509-095a-4c0b-b37a-1ed1080b62a2", + "resource": { + "resourceType": "Observation", + "id": "ee352509-095a-4c0b-b37a-1ed1080b62a2", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4634 + }, + { + "url": "length", + "valueInteger": 21 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0240085", + "display": "JOINT ERYTHEMA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U002215" + } + ], + "text": "erythematous joints" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4563 + }, + { + "url": "length", + "valueInteger": 16 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0497254", + "display": "Musculoskeletal" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0047159" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037430" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "L" + }, + { + "system": "http://loinc.org", + "code": "LP89781-6" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25348" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044938" + } + ], + "text": "Musculo Skeletal" + } + } + }, + { + "fullUrl": "Observation/d404a332-dcfa-4fe6-9f50-5323c3d78013", + "resource": { + "resourceType": "Observation", + "id": "d404a332-dcfa-4fe6-9f50-5323c3d78013", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4586 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0451362", + "display": "Oxford grading scale for muscle strength" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000036033" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XM0gn" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "273677009" + } + ], + "text": "strength" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueString": "5/5", + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4563 + }, + { + "url": "length", + "valueInteger": 16 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0497254", + "display": "Musculoskeletal" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00516" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0047159" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037430" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "L" + }, + { + "system": "http://loinc.org", + "code": "LP89781-6" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25348" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044938" + } + ], + "text": "Musculo Skeletal" + } + } + }, + { + "fullUrl": "Observation/337c4352-fe91-4c00-8b75-ede0f8d09e3c", + "resource": { + "resourceType": "Observation", + "id": "337c4352-fe91-4c00-8b75-ede0f8d09e3c", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4674 + }, + { + "url": "length", + "valueInteger": 22 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "Alert and oriented x 3" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4659 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0205494", + "display": "Neurologic (qualifier value)" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0045754" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000020628" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "N" + }, + { + "system": "http://loinc.org", + "code": "LA16973-2" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25262" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C25262" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000057" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "G-B119" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "1199008" + } + ], + "text": "Neurological" + } + } + }, + { + "fullUrl": "Observation/ef257aa0-740c-41f3-be98-dfae30ce099c", + "resource": { + "resourceType": "Observation", + "id": "ef257aa0-740c-41f3-be98-dfae30ce099c", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4706 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "text": "grossly intact" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ], + "bodySite": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4659 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0205494", + "display": "Neurologic (qualifier value)" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0045754" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000020628" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "N" + }, + { + "system": "http://loinc.org", + "code": "LA16973-2" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25262" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044117" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C25262" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000057" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "G-B119" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "1199008" + } + ], + "text": "Neurological" + } + } + }, + { + "fullUrl": "List/4353769c-64cc-4659-a239-efea24311f2e", + "resource": { + "resourceType": "List", + "id": "4353769c-64cc-4659-a239-efea24311f2e", + "status": "current", + "mode": "snapshot", + "title": "Physical Examination", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "Observation/6d6344e6-464a-4652-a6dc-f20c2a3869d6", + "type": "Observation", + "display": "Temp" + } + }, + { + "item": { + "reference": "Observation/38f84639-0240-4b1e-a6da-22f079a5dc3d", + "type": "Observation", + "display": "Pulse" + } + }, + { + "item": { + "reference": "Observation/accba11a-ad34-462f-b16a-174afe057995", + "type": "Observation", + "display": "O2" + } + }, + { + "item": { + "reference": "Observation/93d28e03-64b7-404e-8c4c-8497a3c1f244", + "type": "Observation", + "display": "RR" + } + }, + { + "item": { + "reference": "Observation/c6dab3c6-9e14-40ab-9cbd-f7f70b23400b", + "type": "Observation", + "display": "BP" + } + }, + { + "item": { + "reference": "Observation/001ef1a6-ed67-4758-8c01-3d7ab54382c9", + "type": "Observation", + "display": "NAD" + } + }, + { + "item": { + "reference": "Observation/ba2453b5-c68c-4d75-8eb6-d5b73de8a578", + "type": "Observation", + "display": "up in bed" + } + }, + { + "item": { + "reference": "Observation/92e2a522-850e-402e-a13c-c8d6a33a79c8", + "type": "Observation", + "display": "well groomed" + } + }, + { + "item": { + "reference": "Observation/0305a72e-1be6-4b63-b418-1d641ebd106d", + "type": "Observation", + "display": "nightgown" + } + }, + { + "item": { + "reference": "Observation/c006ed4f-e3e5-43da-9e47-cea7525a28d1", + "type": "Observation", + "display": "PERRLA" + } + }, + { + "item": { + "reference": "Observation/2062769e-4713-4ebd-a1b2-1c98429361dc", + "type": "Observation", + "display": "EOM intact" + } + }, + { + "item": { + "reference": "Observation/b27f0400-9139-47cd-a5c4-837f19cb8aaa", + "type": "Observation", + "display": "swollen tounge" + } + }, + { + "item": { + "reference": "Observation/69c84ffd-5600-4890-b0bc-d61a2a446fd6", + "type": "Observation", + "display": "tounge was large" + } + }, + { + "item": { + "reference": "Observation/69471b6b-abc4-457b-bfcd-33911b31a7ee", + "type": "Observation", + "display": "obscured the view" + } + }, + { + "item": { + "reference": "Observation/f73baecf-902d-4d27-96a6-a27baa41d1bc", + "type": "Observation", + "display": "swelling" + } + }, + { + "item": { + "reference": "Observation/b769bf15-c1ce-4e99-a16b-497a4717a1a5", + "type": "Observation", + "display": "redness" + } + }, + { + "item": { + "reference": "Observation/c54a60b0-0a04-4f17-8ac3-ea1ea7ce40ab", + "type": "Observation", + "display": "rash" + } + }, + { + "item": { + "reference": "Observation/f7f0c8c0-b473-4df7-aa3b-2f0b425a5342", + "type": "Observation", + "display": "lymphadenopathy" + } + }, + { + "item": { + "reference": "Observation/ce0ef48b-7d52-446f-a501-d398c070c0e9", + "type": "Observation", + "display": "RRR" + } + }, + { + "item": { + "reference": "Observation/23a08c8f-5293-4761-b144-d8b4776ea4e6", + "type": "Observation", + "display": "m/r/g" + } + }, + { + "item": { + "reference": "Observation/e134033b-7d5a-41eb-bb13-0e9cd149fe2a", + "type": "Observation", + "display": "JVD" + } + }, + { + "item": { + "reference": "Observation/8bb175d9-7a0d-434b-a62d-bf97a49bb261", + "type": "Observation", + "display": "carotid bruits" + } + }, + { + "item": { + "reference": "Observation/ef9a50ee-6b56-45c2-9769-04e2fc7e1052", + "type": "Observation", + "display": "Clear to auscltation" + } + }, + { + "item": { + "reference": "Observation/62c4a367-4b79-4e4f-b6cd-f6063d41b0b1", + "type": "Observation", + "display": "use of acessory muscles" + } + }, + { + "item": { + "reference": "Observation/b0e3e645-fdfe-4e2e-9e1f-e3af0f99580a", + "type": "Observation", + "display": "crackles" + } + }, + { + "item": { + "reference": "Observation/08fd4874-bbd6-447e-b65d-6ef0541b9be8", + "type": "Observation", + "display": "wheezes" + } + }, + { + "item": { + "reference": "Observation/b6a7c561-40cd-4f4c-9e3d-4010424f7dcd", + "type": "Observation", + "display": "rashes" + } + }, + { + "item": { + "reference": "Observation/b903e342-8eb1-4d0a-9f10-a9a7a1f371f1", + "type": "Observation", + "display": "skin warm" + } + }, + { + "item": { + "reference": "Observation/f725aee3-ee72-4bad-b12c-0e1d757da440", + "type": "Observation", + "display": "dry" + } + }, + { + "item": { + "reference": "Observation/e0baed06-518a-49b1-9ef3-938c45d2f488", + "type": "Observation", + "display": "erythematous areas" + } + }, + { + "item": { + "reference": "Observation/fe9c86ab-fef0-43fc-8556-f687a90461be", + "type": "Observation", + "display": "Normal bowel sounds" + } + }, + { + "item": { + "reference": "Observation/d1aae4cd-1487-466a-bda3-75a3b0750c4a", + "type": "Observation", + "display": "abdomen soft" + } + }, + { + "item": { + "reference": "Observation/7d63cc6f-00ca-4410-b282-d1bc92d9d569", + "type": "Observation", + "display": "nontender" + } + }, + { + "item": { + "reference": "Observation/8e788834-864f-4331-a51e-a5b2709af6c0", + "type": "Observation", + "display": "edema" + } + }, + { + "item": { + "reference": "Observation/c4114093-1e0e-42d3-a1a7-053cda0021e1", + "type": "Observation", + "display": "cyanosis" + } + }, + { + "item": { + "reference": "Observation/76abe39a-811d-4457-8a34-77a18666157f", + "type": "Observation", + "display": "clubbing" + } + }, + { + "item": { + "reference": "Observation/44f87849-ec09-4f87-94e0-010f7cdcb7e8", + "type": "Observation", + "display": "normal range of motion" + } + }, + { + "item": { + "reference": "Observation/ae964a2a-ae2e-4d80-82e3-4ec52bed2587", + "type": "Observation", + "display": "swollen" + } + }, + { + "item": { + "reference": "Observation/ee352509-095a-4c0b-b37a-1ed1080b62a2", + "type": "Observation", + "display": "erythematous joints" + } + }, + { + "item": { + "reference": "Observation/d404a332-dcfa-4fe6-9f50-5323c3d78013", + "type": "Observation", + "display": "strength" + } + }, + { + "item": { + "reference": "Observation/337c4352-fe91-4c00-8b75-ede0f8d09e3c", + "type": "Observation", + "display": "Alert and oriented x 3" + } + }, + { + "item": { + "reference": "Observation/ef257aa0-740c-41f3-be98-dfae30ce099c", + "type": "Observation", + "display": "grossly intact" + } + } + ] + } + }, + { + "fullUrl": "Condition/30a28633-ff5a-466e-a0a9-73de181c594c", + "resource": { + "resourceType": "Condition", + "id": "30a28633-ff5a-466e-a0a9-73de181c594c", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4917 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "unconfirmed", + "display": "Unconfirmed" + } + ], + "text": "Unconfirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + } + ], + "text": "Problem List Item" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0022116", + "display": "Ischemia" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005321" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0042499" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000006936" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000392" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0571-6706" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU040398" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002515" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85068338" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10061255" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "351304" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D007511" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003303" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "03400" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C34738" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1942" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000630922" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "26660" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X79pz" + }, + { + "system": "http://snomed.info/sct", + "code": "F-72240" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-39340" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "52674009" + } + ], + "text": "ischemia" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Observation/d4ec6ca7-6c61-486c-9b41-6197805c977b", + "resource": { + "resourceType": "Observation", + "id": "d4ec6ca7-6c61-486c-9b41-6197805c977b", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4758 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0037473", + "display": "sodium" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005817" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0024754" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000011478" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "32070" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2730-2702" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "2082" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004374" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85124249" + }, + { + "system": "http://loinc.org", + "code": "LP15099-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "3666" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "5467" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D012964" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "9NEZ333N27" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C830" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C830" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "31090" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "9NEZ333N27" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044731" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "000755" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "48590" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X80D5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "9853" + }, + { + "system": "http://snomed.info/sct", + "code": "F-10580" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-15500" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "39972003" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4018159" + } + ], + "text": "Na" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 140 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/00e92723-a0db-48c2-ba13-306ccaae8c6b", + "resource": { + "resourceType": "Observation", + "id": "00e92723-a0db-48c2-ba13-306ccaae8c6b", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4767 + }, + { + "url": "length", + "valueInteger": 1 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0202194", + "display": "Potassium measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/alt", + "code": "DEBAG" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000020017" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "80048" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A34014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10036439" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "324291" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64853" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_crch", + "code": "C68280" + }, + { + "system": "http://snomed.info/sct", + "code": "P-4020" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-73850" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "59573005" + } + ], + "text": "K" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 4.5 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/c0c43185-02f2-4e7c-97e7-88cec0c161ce", + "resource": { + "resourceType": "Observation", + "id": "c0c43185-02f2-4e7c-97e7-88cec0c161ce", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4775 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0201952", + "display": "Chloride measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/alt", + "code": "DEBAC" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000019962" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "80053" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10008572" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64495" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-72420" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "46511006" + } + ], + "text": "Cl" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 109 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/777735eb-1122-4e71-9bae-2a6687fbb970", + "resource": { + "resourceType": "Observation", + "id": "777735eb-1122-4e71-9bae-2a6687fbb970", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4784 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0201930", + "display": "Carbon dioxide content measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000020012" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "82374" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "82374" + }, + { + "system": "http://loinc.org", + "code": "LP188646-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10007220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000356" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64545" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X799H" + }, + { + "system": "http://snomed.info/sct", + "code": "P-4020" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-72250" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "31542002" + } + ], + "text": "Co2" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 23 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/a1154c31-f30d-4a44-889a-be0de1275f17", + "resource": { + "resourceType": "Observation", + "id": "a1154c31-f30d-4a44-889a-be0de1275f17", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4793 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0005845", + "display": "Blood urea nitrogen measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000057776" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "84520" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0633-5558" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "84520" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10005845" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "12167" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D001806" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000141" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C61019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C61019" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C61019" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-74191" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "105011006" + } + ], + "text": "BUN" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 29 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/0436e09c-d08f-46d5-9399-89f8ea7f503f", + "resource": { + "resourceType": "Observation", + "id": "0436e09c-d08f-46d5-9399-89f8ea7f503f", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4802 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0201975", + "display": "Creatinine measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000031640" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "82565" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "82565" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "U34002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10005480" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "327261" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64547" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C64547" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C64547" + }, + { + "system": "http://snomed.info/sct", + "code": "P-4020" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-72600" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "70901006" + } + ], + "text": "Cr" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 1.0 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/e6e1a3d4-9d4f-45b5-a6f0-9550cccdab70", + "resource": { + "resourceType": "Observation", + "id": "e6e1a3d4-9d4f-45b5-a6f0-9550cccdab70", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4811 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0201925", + "display": "Calcium measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/alt", + "code": "DEBAB" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037314" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "82310" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "82310" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10006891" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "327180" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64488" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTESTCD" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C64488" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-72230" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "71878006" + } + ], + "text": "Ca" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 9.9 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/cc10796c-76b3-4f5b-8161-2b2b01c836de", + "resource": { + "resourceType": "Observation", + "id": "cc10796c-76b3-4f5b-8161-2b2b01c836de", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4820 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0373675", + "display": "Magnesium measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/alt", + "code": "DEBAE" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000031648" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "83735" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "83735" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10025430" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "403353" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000385" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64840" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C64840" + }, + { + "system": "http://snomed.info/sct", + "code": "P-4020" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-73480" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "38151008" + } + ], + "text": "Mg" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 1.4 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/cb44c630-a949-4f2b-96aa-9c15d4a23b4b", + "resource": { + "resourceType": "Observation", + "id": "cb44c630-a949-4f2b-96aa-9c15d4a23b4b", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4829 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0523826", + "display": "Phosphate measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000038223" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "84100" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "84100" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10034928" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64857" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C64857" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-73759" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "104866001" + } + ], + "text": "Phos" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 3.6 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/1407819d-8e9b-458a-ad93-44962f0f823e", + "resource": { + "resourceType": "Observation", + "id": "1407819d-8e9b-458a-ad93-44962f0f823e", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4842 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0030605", + "display": "Activated Partial Thromboplastin Time measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000007272" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1010832" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000009335" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "32162" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "1011869" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10000630" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "12133" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D010314" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000082" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C38462" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://snomed.info/sct", + "code": "P-2256" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-10590" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "42525009" + } + ], + "text": "PTT" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 26.7 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/78010f01-3865-41fd-aa16-3e8f208cee1d", + "resource": { + "resourceType": "Observation", + "id": "78010f01-3865-41fd-aa16-3e8f208cee1d", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4855 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0023508", + "display": "White Blood Cell Count procedure" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000007246" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007357" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "32937" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "85004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0455-4964" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "85004" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10047939" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "12012" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D007958" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U002041" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C51948" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C51948" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C51948" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C51948" + }, + { + "system": "http://snomed.info/sct", + "code": "P-2945" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-30520" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "767002" + } + ], + "text": "WBC" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 9.9 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/4bdb2158-fd49-4f92-bc8c-81ea30d855af", + "resource": { + "resourceType": "Observation", + "id": "4bdb2158-fd49-4f92-bc8c-81ea30d855af", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4865 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0518015", + "display": "Hemoglobin measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0053182" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000037622" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "88738" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "88738" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "B34018" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10018876" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64848" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C64848" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C64848" + }, + { + "system": "http://snomed.info/sct", + "code": "P-2852" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-34100" + } + ], + "text": "Hgb" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 10.0 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/15ed1f67-8720-4656-89cd-b49dc51df4dd", + "resource": { + "resourceType": "Observation", + "id": "15ed1f67-8720-4656-89cd-b49dc51df4dd", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4876 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0018935", + "display": "Hematocrit procedure" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000024263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0053669" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000005948" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "32824" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "85014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0455-2482" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "85014" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002130" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85060126" + }, + { + "system": "http://loinc.org", + "code": "LP15101-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10018837" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "327272" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D006400" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U001974" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64796" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTESTCD" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C64796" + }, + { + "system": "http://snomed.info/sct", + "code": "P-2851" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-34080" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "28317006" + } + ], + "text": "Hct" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 30.3 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/8c156cdd-f6ab-4513-af22-037a1042b7a4", + "resource": { + "resourceType": "Observation", + "id": "8c156cdd-f6ab-4513-af22-037a1042b7a4", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4887 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0032181", + "display": "Platelet Count measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000007263" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000009833" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "32921" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10035525" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "12024" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D010976" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000021" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C51951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C51951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C51951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C51951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C51951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "42P.." + }, + { + "system": "http://snomed.info/sct", + "code": "P-2883" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-30600" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "61928009" + } + ], + "text": "Plt" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueQuantity": { + "value": 373 + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/57f1eb8b-1a8a-42c5-aed8-0552b5c02bff", + "resource": { + "resourceType": "Observation", + "id": "57f1eb8b-1a8a-42c5-aed8-0552b5c02bff", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4899 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1623258", + "display": "Electrocardiography" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000007414" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0060892" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1393-7104" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpcs", + "code": "Level 2: G0403-G0405" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001526" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85042098" + }, + { + "system": "http://loinc.org", + "code": "LP100599-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10014084" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004562" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "89.52" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C38053" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C38053" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000635410" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "16480" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "32..." + }, + { + "system": "http://snomed.info/sct", + "code": "P-7100" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P2-31000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "29303009" + } + ], + "text": "EKG" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "List/6bbdb74b-0263-4e3f-9cf0-e3f44dfe1210", + "resource": { + "resourceType": "List", + "id": "6bbdb74b-0263-4e3f-9cf0-e3f44dfe1210", + "status": "current", + "mode": "snapshot", + "title": "Pertinent Diagnostic Tests", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "Condition/30a28633-ff5a-466e-a0a9-73de181c594c", + "type": "Condition", + "display": "ischemia" + } + }, + { + "item": { + "reference": "Observation/d4ec6ca7-6c61-486c-9b41-6197805c977b", + "type": "Observation", + "display": "Na" + } + }, + { + "item": { + "reference": "Observation/00e92723-a0db-48c2-ba13-306ccaae8c6b", + "type": "Observation", + "display": "K" + } + }, + { + "item": { + "reference": "Observation/c0c43185-02f2-4e7c-97e7-88cec0c161ce", + "type": "Observation", + "display": "Cl" + } + }, + { + "item": { + "reference": "Observation/777735eb-1122-4e71-9bae-2a6687fbb970", + "type": "Observation", + "display": "Co2" + } + }, + { + "item": { + "reference": "Observation/a1154c31-f30d-4a44-889a-be0de1275f17", + "type": "Observation", + "display": "BUN" + } + }, + { + "item": { + "reference": "Observation/0436e09c-d08f-46d5-9399-89f8ea7f503f", + "type": "Observation", + "display": "Cr" + } + }, + { + "item": { + "reference": "Observation/e6e1a3d4-9d4f-45b5-a6f0-9550cccdab70", + "type": "Observation", + "display": "Ca" + } + }, + { + "item": { + "reference": "Observation/cc10796c-76b3-4f5b-8161-2b2b01c836de", + "type": "Observation", + "display": "Mg" + } + }, + { + "item": { + "reference": "Observation/cb44c630-a949-4f2b-96aa-9c15d4a23b4b", + "type": "Observation", + "display": "Phos" + } + }, + { + "item": { + "reference": "Observation/1407819d-8e9b-458a-ad93-44962f0f823e", + "type": "Observation", + "display": "PTT" + } + }, + { + "item": { + "reference": "Observation/78010f01-3865-41fd-aa16-3e8f208cee1d", + "type": "Observation", + "display": "WBC" + } + }, + { + "item": { + "reference": "Observation/4bdb2158-fd49-4f92-bc8c-81ea30d855af", + "type": "Observation", + "display": "Hgb" + } + }, + { + "item": { + "reference": "Observation/15ed1f67-8720-4656-89cd-b49dc51df4dd", + "type": "Observation", + "display": "Hct" + } + }, + { + "item": { + "reference": "Observation/8c156cdd-f6ab-4513-af22-037a1042b7a4", + "type": "Observation", + "display": "Plt" + } + }, + { + "item": { + "reference": "Observation/57f1eb8b-1a8a-42c5-aed8-0552b5c02bff", + "type": "Observation", + "display": "EKG" + } + } + ] + } + }, + { + "fullUrl": "Condition/77cd7165-bb64-4cfd-aa2b-bb48cc46e531", + "resource": { + "resourceType": "Condition", + "id": "77cd7165-bb64-4cfd-aa2b-bb48cc46e531", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 4991 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002994", + "display": "Angioedema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00587" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1001287" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000001177" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1849-1576" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "ANGIOEDEMA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000116" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0100665" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU006380" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A92010" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000249" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85005030" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10002424" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "31834" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000799" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "995.1" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C112175" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "4536" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C112175" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "041714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU010698" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "SN51." + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "SN51." + }, + { + "system": "http://snomed.info/sct", + "code": "D-3541" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D0-20100" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "41291007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0003" + } + ], + "text": "angioedema" + }, + "bodySite": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5018 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0040408", + "display": "Tongue" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005476" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000012352" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2139-2049" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "54640" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "TONG" + }, + { + "system": "http://hl7.org/fhir/sid/icf-nl", + "code": "s3203" + }, + { + "system": "http://hl7.org/fhir/sid/icf-cy", + "code": "s3203" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004718" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85135992" + }, + { + "system": "http://loinc.org", + "code": "LP30556-2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D014059" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U002312" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C12422" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C12422" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C12422" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C12422" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "53490" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "7N234" + }, + { + "system": "http://snomed.info/sct", + "code": "T-53000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-53000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "21974007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "54640" + } + ], + "text": "tongue" + }, + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5035 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007966", + "display": "Cheek structure" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000016962" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000002727" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2139-1459" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "46476" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hl7v2.5", + "code": "CHEEK" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000928" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85022839" + }, + { + "system": "http://loinc.org", + "code": "LP76299-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D002610" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C13070" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C13070" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa2E3" + }, + { + "system": "http://snomed.info/sct", + "code": "T-Y0300" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-D1206" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "60819002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "46476" + } + ], + "text": "inner cheek" + } + ], + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "note": [ + { + "text": "significant" + } + ] + } + }, + { + "fullUrl": "Condition/84e0eb82-5459-4999-b953-ea05b89e79c0", + "resource": { + "resourceType": "Condition", + "id": "84e0eb82-5459-4999-b953-ea05b89e79c0", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5061 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002994", + "display": "Angioedema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00587" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1001287" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000001177" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1849-1576" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "ANGIOEDEMA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U000116" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0100665" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "T78.3" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU006380" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A92010" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000249" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85005030" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10002424" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "31834" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000799" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "995.1" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C112175" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "4536" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C112175" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "041714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU010698" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "SN51." + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "SN51." + }, + { + "system": "http://snomed.info/sct", + "code": "D-3541" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D0-20100" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "41291007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0003" + } + ], + "text": "angioedema" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/3d019165-1eb8-4431-982c-d2bffeafb22d", + "resource": { + "resourceType": "Condition", + "id": "3d019165-1eb8-4431-982c-d2bffeafb22d", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5080 + }, + { + "url": "length", + "valueInteger": 29 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "text": "allergic anaphylaxis reaction" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/5c47dbb1-5514-487e-a564-e12402f51c57", + "resource": { + "resourceType": "Condition", + "id": "5c47dbb1-5514-487e-a564-e12402f51c57", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5111 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0458082", + "display": "Drug-induced" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000036769" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0vQ" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "278993004" + } + ], + "text": "drug induced" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/6bdde1ff-93a7-4683-b73f-b48e4af1ff31", + "resource": { + "resourceType": "Condition", + "id": "6bdde1ff-93a7-4683-b73f-b48e4af1ff31", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5125 + }, + { + "url": "length", + "valueInteger": 27 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0162820", + "display": "Dermatitis, Allergic Contact" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000017993" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "L23.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "L23.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "L23.9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "S88" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU018967" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10056265" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "319771" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D017449" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C26998" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X505x" + }, + { + "system": "http://snomed.info/sct", + "code": "M-47610" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "238575004" + } + ], + "text": "allergic contact dermatitis" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/112cc672-89ec-4bcc-aaad-daa42d1b891c", + "resource": { + "resourceType": "Condition", + "id": "112cc672-89ec-4bcc-aaad-daa42d1b891c", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5154 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0042769", + "display": "Virus Diseases" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004796" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00714" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0035009" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccs", + "code": "1.3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_10", + "code": "INF008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10cm", + "code": "INF008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000013022" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000723" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "3099-8150" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "INFECT VIRAL" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/go", + "code": "GO:0016032" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "B34.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "B34.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "B34.9" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU038648" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A77005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004960" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85143818" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10047461" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "90185" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "454" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D014777" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "789" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "079.99" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "03374" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3439" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C3439" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2248" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3439" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C3439" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU054517" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000643529" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "55780" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X70Iu" + }, + { + "system": "http://snomed.info/sct", + "code": "D-0350" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DE-30000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "34014006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0740" + } + ], + "text": "viral infection" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/c39abf61-4871-4af2-a4da-1742d57366df", + "resource": { + "resourceType": "Condition", + "id": "c39abf61-4871-4af2-a4da-1742d57366df", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5171 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0458082", + "display": "Drug-induced" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000036769" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa0vQ" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "278993004" + } + ], + "text": "drug induced" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/dcb0f56b-bdd4-4d6c-8e9d-921f98f14d33", + "resource": { + "resourceType": "Condition", + "id": "dcb0f56b-bdd4-4d6c-8e9d-921f98f14d33", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5190 + }, + { + "url": "length", + "valueInteger": 32 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "text": "C1 inhibitor deficiency disorder" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "note": [ + { + "text": "hereditary" + } + ] + } + }, + { + "fullUrl": "Condition/16972d09-73fe-48c9-a2a4-e22ad9f97f4a", + "resource": { + "resourceType": "Condition", + "id": "16972d09-73fe-48c9-a2a4-e22ad9f97f4a", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5285 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0040425", + "display": "Tonsillitis" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1013382" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000012362" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000679" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "PHARYNGITIS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U004087" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0011110" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU074496" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R76003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004721" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85136023" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10044008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "31373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "6440" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D014069" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "463" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C116006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C116006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU071368" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa7I0" + }, + { + "system": "http://snomed.info/sct", + "code": "M-40000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DC-71200" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "90176007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0523" + } + ], + "text": "tonsillitis" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/8c8aef3f-ad3f-43aa-87ec-1a27a9d79974", + "resource": { + "resourceType": "Condition", + "id": "8c8aef3f-ad3f-43aa-87ec-1a27a9d79974", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5298 + }, + { + "url": "length", + "valueInteger": 20 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "text": "peritonsilar abscess" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/289d84a2-ba55-4913-9b1c-0a26a764de98", + "resource": { + "resourceType": "Condition", + "id": "289d84a2-ba55-4913-9b1c-0a26a764de98", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5402 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "unconfirmed", + "display": "Unconfirmed" + } + ], + "text": "Unconfirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0000833", + "display": "Abscess" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004497" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017218" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000562" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "016" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0944-6244" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "ABSCESS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0025615" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A78037" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85000225" + }, + { + "system": "http://loinc.org", + "code": "LP6994-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10000269" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "359505" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "3063" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000038" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "682.9" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C26686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C26686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C26686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1690" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044786" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C26686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C26686" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU059473" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa9Gg" + }, + { + "system": "http://snomed.info/sct", + "code": "M-41740" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-41610" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "128477000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0887" + } + ], + "text": "abscess" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/f0146bb6-0421-455c-8d99-3910655c92e6", + "resource": { + "resourceType": "Condition", + "id": "f0146bb6-0421-455c-8d99-3910655c92e6", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5413 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "unconfirmed", + "display": "Unconfirmed" + } + ], + "text": "Unconfirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0040425", + "display": "Tonsillitis" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1013382" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000012362" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "U000679" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "PHARYNGITIS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U004087" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0011110" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU074496" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R76003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004721" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85136023" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10044008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "31373" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "6440" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D014069" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "463" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C116006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C116006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU071368" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "Xa7I0" + }, + { + "system": "http://snomed.info/sct", + "code": "M-40000" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DC-71200" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "90176007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0523" + } + ], + "text": "tonsillitis" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Condition/8a00a3c1-8df7-4446-8d10-cb9e87f54776", + "resource": { + "resourceType": "Condition", + "id": "8a00a3c1-8df7-4446-8d10-cb9e87f54776", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5488 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + } + ], + "text": "Encounter Diagnosis" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C3714514", + "display": "Infection" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004491" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccc", + "code": "K25.6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1018029" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000006691" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "413" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "INFECT" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U002090" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10023032" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU038002" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A78051" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U002423" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85066076" + }, + { + "system": "http://loinc.org", + "code": "LP130385-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10021789" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "363071" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "12" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D007239" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "11_37" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C128320" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C128320" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C128320" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "110607" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "50.01" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "PRB_07010.00" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000041393" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "25150" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X79pw" + }, + { + "system": "http://snomed.info/sct", + "code": "D-0070" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0736" + } + ], + "text": "infection" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "Observation/db7f2572-ddd6-4e2e-b8ab-33c72eca6ee8", + "resource": { + "resourceType": "Observation", + "id": "db7f2572-ddd6-4e2e-b8ab-33c72eca6ee8", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5247 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0023052", + "display": "Laryngeal Edema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0025764" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000007220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "EDEMA LARYNX" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U002322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0012027" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "J38.4" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "J38.4" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "J38.4" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "J38.4" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "J38.4" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "478.6" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU054028" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10023845" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "6873" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D007819" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C79607" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E13393" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070601" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU019551" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "H1y6." + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "H1y6." + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "D2-04460" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "51599000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0522" + } + ], + "text": "Laryngeal edema" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/3ba4adfa-8a50-4015-b4f4-1a4258a4e78a", + "resource": { + "resourceType": "Observation", + "id": "3ba4adfa-8a50-4015-b4f4-1a4258a4e78a", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5322 + }, + { + "url": "length", + "valueInteger": 23 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0161010", + "display": "Foreign body in pharynx" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000017733" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "T17.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "T17.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "T17.2" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "933.0" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU019574" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "R87007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10017030" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "30801" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "933.0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "SG30." + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "DD-61410" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "25479004" + } + ], + "text": "pharyngeal foreign body" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/96088972-8e18-477f-b634-064edf59a1ba", + "resource": { + "resourceType": "Observation", + "id": "96088972-8e18-477f-b634-064edf59a1ba", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5386 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0013604", + "display": "Edema" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000005462" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00114" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1014846" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000029664" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "273" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0465-4760" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "EDEMA" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0000969" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-ae", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-amae", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R60.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "782.3" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU053978" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "K07003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001504" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85040948" + }, + { + "system": "http://loinc.org", + "code": "MTHU019803" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10030095" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "7268" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1229" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004487" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "715" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "782.3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "00501" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C3002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1820" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045676" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "250905" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU000002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "29.01" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XE0qw" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "XE0qw" + }, + { + "system": "http://snomed.info/sct", + "code": "M-36500" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-36300" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "267038008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "66941" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0398" + } + ], + "text": "edema" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "ND", + "display": "Not Detected" + } + ], + "text": "Not Detected" + } + ] + } + }, + { + "fullUrl": "Observation/f97026d8-5906-44e8-9eca-834c2ede6406", + "resource": { + "resourceType": "Observation", + "id": "f97026d8-5906-44e8-9eca-834c2ede6406", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5464 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015967", + "display": "Fever" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/air", + "code": "FEVER" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004396" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/bi", + "code": "BI00751" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccc", + "code": "K25.2" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1017166" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_10", + "code": "SYM002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10cm", + "code": "SYM002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000005010" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "300" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "65287" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2871-4310" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "FEVER" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/dxp", + "code": "U001483" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/go", + "code": "GO:0001660" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hpo", + "code": "HP:0001945" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R50.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-am", + "code": "R50.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R50.9" + }, + { + "system": "http://hl7.org/fhir/sid/icd-9-cm", + "code": "780.60" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icnp", + "code": "10041539" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "A03" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "A03" + }, + { + "system": "http://hl7.org/fhir/sid/icpc2icd10eng", + "code": "MTHU041751" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A03002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U001776" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85047994" + }, + { + "system": "http://loinc.org", + "code": "MTHU013518" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10005911" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "6005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "511" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005334" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthicd9", + "code": "780.60" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nanda-i", + "code": "01128" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3038" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctcae", + "code": "E11102" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "1858" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_gdc", + "code": "C3038" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000450108" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C3038" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C3038" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "070307" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU005439" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/oms", + "code": "50.03" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "PRB_11020.02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000775882" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "23840" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/qmr", + "code": "Q0200115" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X76EI" + }, + { + "system": "http://snomed.info/sct", + "code": "F-03003" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-03003" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "386661006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/who", + "code": "0725" + } + ], + "text": "fever" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "NEG", + "display": "Negative" + } + ], + "text": "Negative" + } + ] + } + }, + { + "fullUrl": "Observation/541b22ee-0c28-48fe-b8c5-342d4271e4d0", + "resource": { + "resourceType": "Observation", + "id": "541b22ee-0c28-48fe-b8c5-342d4271e4d0", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5479 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0311392", + "display": "Physical findings" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0037333" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000028401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cst", + "code": "GENSIGNS" + }, + { + "system": "http://loinc.org", + "code": "LP73100-7" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "208847" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U003414" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C53458" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-01280" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "72670004" + } + ], + "text": "signs" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/bcefc8a5-b7dd-479d-aee0-1f8dd0497708", + "resource": { + "resourceType": "Observation", + "id": "bcefc8a5-b7dd-479d-aee0-1f8dd0497708", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5526 + }, + { + "url": "length", + "valueInteger": 8 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0038999", + "display": "Swelling" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000004456" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1000701" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000011957" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/costar", + "code": "715" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc", + "code": "A08" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/icpc2eeng", + "code": "A08" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A08003" + }, + { + "system": "http://loinc.org", + "code": "LA22440-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10042674" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "1229" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C3399" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2091" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/noc", + "code": "191325" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/omim", + "code": "MTHU067007" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X76Eu" + }, + { + "system": "http://snomed.info/sct", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-02570" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "442672001" + } + ], + "text": "swelling" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5506 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "sudden onset" + }, + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "Positive" + } + ] + } + }, + { + "fullUrl": "Observation/58f6222d-e30e-49bb-8535-82b6985e1a80", + "resource": { + "resourceType": "Observation", + "id": "58f6222d-e30e-49bb-8535-82b6985e1a80", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5580 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "exam", + "display": "Exam" + } + ], + "text": "Exam" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0016542", + "display": "Foreign Bodies" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1005216" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000005208" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U006444" + }, + { + "system": "http://loinc.org", + "code": "LP35022-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10070245" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "5607" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D005547" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthmst", + "code": "MT160021" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C34620" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C34620" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "2687" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X79hh" + }, + { + "system": "http://snomed.info/sct", + "code": "M-30400" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "M-30400" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "19227008" + } + ], + "text": "foreign body" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "ND", + "display": "Not Detected" + } + ], + "text": "Not Detected" + } + ] + } + }, + { + "fullUrl": "ServiceRequest/adec7107-9636-40e0-86df-1948e119d5ec", + "resource": { + "resourceType": "ServiceRequest", + "id": "adec7107-9636-40e0-86df-1948e119d5ec", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5635 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0278260", + "display": "scopy" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000027149" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P1-07000" + } + ], + "text": "scoped" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + } + }, + { + "fullUrl": "List/affbdb9c-c8d0-4774-89e9-e8486fd5379a", + "resource": { + "resourceType": "List", + "id": "affbdb9c-c8d0-4774-89e9-e8486fd5379a", + "status": "current", + "mode": "snapshot", + "title": "Assessment and Plan", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "Condition/77cd7165-bb64-4cfd-aa2b-bb48cc46e531", + "type": "Condition", + "display": "angioedema" + } + }, + { + "item": { + "reference": "Condition/84e0eb82-5459-4999-b953-ea05b89e79c0", + "type": "Condition", + "display": "angioedema" + } + }, + { + "item": { + "reference": "Condition/3d019165-1eb8-4431-982c-d2bffeafb22d", + "type": "Condition", + "display": "allergic anaphylaxis reaction" + } + }, + { + "item": { + "reference": "Condition/5c47dbb1-5514-487e-a564-e12402f51c57", + "type": "Condition", + "display": "drug induced" + } + }, + { + "item": { + "reference": "Condition/6bdde1ff-93a7-4683-b73f-b48e4af1ff31", + "type": "Condition", + "display": "allergic contact dermatitis" + } + }, + { + "item": { + "reference": "Condition/112cc672-89ec-4bcc-aaad-daa42d1b891c", + "type": "Condition", + "display": "viral infection" + } + }, + { + "item": { + "reference": "Condition/c39abf61-4871-4af2-a4da-1742d57366df", + "type": "Condition", + "display": "drug induced" + } + }, + { + "item": { + "reference": "Condition/dcb0f56b-bdd4-4d6c-8e9d-921f98f14d33", + "type": "Condition", + "display": "C1 inhibitor deficiency disorder" + } + }, + { + "item": { + "reference": "Condition/16972d09-73fe-48c9-a2a4-e22ad9f97f4a", + "type": "Condition", + "display": "tonsillitis" + } + }, + { + "item": { + "reference": "Condition/8c8aef3f-ad3f-43aa-87ec-1a27a9d79974", + "type": "Condition", + "display": "peritonsilar abscess" + } + }, + { + "item": { + "reference": "Condition/289d84a2-ba55-4913-9b1c-0a26a764de98", + "type": "Condition", + "display": "abscess" + } + }, + { + "item": { + "reference": "Condition/f0146bb6-0421-455c-8d99-3910655c92e6", + "type": "Condition", + "display": "tonsillitis" + } + }, + { + "item": { + "reference": "Condition/8a00a3c1-8df7-4446-8d10-cb9e87f54776", + "type": "Condition", + "display": "infection" + } + }, + { + "item": { + "reference": "Observation/db7f2572-ddd6-4e2e-b8ab-33c72eca6ee8", + "type": "Observation", + "display": "Laryngeal edema" + } + }, + { + "item": { + "reference": "Observation/3ba4adfa-8a50-4015-b4f4-1a4258a4e78a", + "type": "Observation", + "display": "pharyngeal foreign body" + } + }, + { + "item": { + "reference": "Observation/96088972-8e18-477f-b634-064edf59a1ba", + "type": "Observation", + "display": "edema" + } + }, + { + "item": { + "reference": "Observation/f97026d8-5906-44e8-9eca-834c2ede6406", + "type": "Observation", + "display": "fever" + } + }, + { + "item": { + "reference": "Observation/541b22ee-0c28-48fe-b8c5-342d4271e4d0", + "type": "Observation", + "display": "signs" + } + }, + { + "item": { + "reference": "Observation/bcefc8a5-b7dd-479d-aee0-1f8dd0497708", + "type": "Observation", + "display": "swelling" + } + }, + { + "item": { + "reference": "Observation/58f6222d-e30e-49bb-8535-82b6985e1a80", + "type": "Observation", + "display": "foreign body" + } + }, + { + "item": { + "reference": "ServiceRequest/adec7107-9636-40e0-86df-1948e119d5ec", + "type": "ServiceRequest", + "display": "scoped" + } + } + ] + } + }, + { + "fullUrl": "MedicationRequest/b66ac041-2556-4bee-9594-bcb151778222", + "resource": { + "resourceType": "MedicationRequest", + "id": "b66ac041-2556-4bee-9594-bcb151778222", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5697 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0001617", + "display": "Adrenal Cortex Hormones" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000018706" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000762" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0059-5614" + }, + { + "system": "http://loinc.org", + "code": "LP31653-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "4557" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000305" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045658" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C2322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "00990" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x002V" + }, + { + "system": "http://snomed.info/sct", + "code": "E-8510" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-B2400" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "21568003" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4021625" + } + ], + "text": "corticosteroid" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/77a51afd-e3f8-4266-9685-b093e2117b8f", + "resource": { + "resourceType": "MedicationRequest", + "id": "77a51afd-e3f8-4266-9685-b093e2117b8f", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5805 + }, + { + "url": "length", + "valueInteger": 13 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0011777", + "display": "dexamethasone" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000018816" + }, + { + "system": "http://www.whocc.no/atc", + "code": "D07XB05" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003823" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0059-7733" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB01234" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "1014" + }, + { + "system": "http://loinc.org", + "code": "LP32530-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40973" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00206" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D003907" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "7S5I7G3JQL" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C422" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C422" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "00512" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dtp", + "code": "NSC0034521" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "7S5I7G3JQL" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045262" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "002174" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000039789" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "13905" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02M3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "3264" + }, + { + "system": "http://snomed.info/sct", + "code": "E-8515" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-A0250" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372584003" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m23280" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001262" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4017922" + } + ], + "text": "Dexamethasone" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosageInstruction": [ + { + "text": "10 mg", + "timing": { + "repeat": { + "duration": 4, + "durationUnit": "d", + "frequency": 3, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "tid, 4 days" + } + }, + "route": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5825 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "IV" + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 10, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationRequest/b6517ef9-0757-4c29-8b25-eff19601d92e", + "resource": { + "resourceType": "MedicationRequest", + "id": "b6517ef9-0757-4c29-8b25-eff19601d92e", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5850 + }, + { + "url": "length", + "valueInteger": 13 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0019590", + "display": "Histamine Antagonists" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000019291" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0061867" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000006158" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1524-9334" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U005637" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85005683" + }, + { + "system": "http://loinc.org", + "code": "LP18065-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40432" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D006633" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "03160" + }, + { + "system": "http://snomed.info/sct", + "code": "E-8830" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-51000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372806008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001615" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4021756" + } + ], + "text": "antihistamine" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/34446a47-a405-490a-9239-1a437eb75196", + "resource": { + "resourceType": "MedicationRequest", + "id": "34446a47-a405-490a-9239-1a437eb75196", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5905 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0012522", + "display": "diphenhydramine" + }, + { + "system": "http://www.whocc.no/atc", + "code": "R06AA02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0011620" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003981" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2268-3427" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB01075" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "4149" + }, + { + "system": "http://loinc.org", + "code": "MTHU063001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "199649" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00212" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004155" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "8GTS82S83M" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C61728" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C61728" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "01519" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "8GTS82S83M" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000449930" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "004787" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "14310" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X79JE" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "3498" + }, + { + "system": "http://snomed.info/sct", + "code": "E-8845" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-51450" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372682005" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4019724" + } + ], + "text": "Diphenhydramine" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosageInstruction": [ + { + "text": "25 mg", + "timing": { + "repeat": { + "duration": 4, + "durationUnit": "d", + "frequency": 2, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "bid, 4 days" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 25, + "unit": "mg" + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationRequest/c55c95d4-7789-43e2-9833-32a97ac38630", + "resource": { + "resourceType": "MedicationRequest", + "id": "c55c95d4-7789-43e2-9833-32a97ac38630", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6283 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationReference": { + "reference": "Medication/1c24ba62-c729-4acf-8810-caa34bcc23eb", + "type": "Medication", + "display": "albuterol" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosageInstruction": [ + { + "timing": { + "code": { + "text": "prn" + } + } + } + ] + } + }, + { + "fullUrl": "MedicationRequest/983917ca-151d-4616-84d1-857bfb1ddbfe", + "resource": { + "resourceType": "MedicationRequest", + "id": "983917ca-151d-4616-84d1-857bfb1ddbfe", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6297 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationReference": { + "reference": "Medication/69bde4ad-e54f-4858-a0d9-637521768380", + "type": "Medication", + "display": "ipratropium" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosageInstruction": [ + { + "timing": { + "code": { + "text": "prn" + } + } + } + ] + } + }, + { + "fullUrl": "MedicationRequest/7b007cb2-4b34-4066-a917-4416c9209e41", + "resource": { + "resourceType": "MedicationRequest", + "id": "7b007cb2-4b34-4066-a917-4416c9209e41", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6329 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0039771", + "display": "theophylline" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000000658" + }, + { + "system": "http://www.whocc.no/atc", + "code": "R03DA04" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000012157" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "30864" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2503-3937" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00277" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "2592" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U004643" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85134710" + }, + { + "system": "http://loinc.org", + "code": "LP16288-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "41479" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00142" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D013806" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000362" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "C137DTR5RG" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C872" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C872" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "00815" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dtp", + "code": "NSC0002066" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "C137DTR5RG" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045358" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "000602" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000041340" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "52580" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X795w" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "10438" + }, + { + "system": "http://snomed.info/sct", + "code": "E-8916" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-69510" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372810006" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m82120" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001656" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4018129" + } + ], + "text": "theophylline" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/222d4371-0ce2-4499-87bd-1a927742f33f", + "resource": { + "resourceType": "MedicationRequest", + "id": "222d4371-0ce2-4499-87bd-1a927742f33f", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6402 + }, + { + "url": "length", + "valueInteger": 15 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0001617", + "display": "Adrenal Cortex Hormones" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000018706" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000762" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0059-5614" + }, + { + "system": "http://loinc.org", + "code": "LP31653-6" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "4557" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000305" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C2322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045658" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C2322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C2322" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "00990" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x002V" + }, + { + "system": "http://snomed.info/sct", + "code": "E-8510" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "F-B2400" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "21568003" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4021625" + } + ], + "text": "corticosteroids" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/be6d6d20-2971-420d-a384-d2b94b45ca66", + "resource": { + "resourceType": "MedicationRequest", + "id": "be6d6d20-2971-420d-a384-d2b94b45ca66", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6486 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ], + "text": "normal insulin" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosageInstruction": [ + { + "text": "sliding scale" + } + ] + } + }, + { + "fullUrl": "MedicationRequest/d14b5a1c-e540-4999-9c37-269c95f69772", + "resource": { + "resourceType": "MedicationRequest", + "id": "d14b5a1c-e540-4999-9c37-269c95f69772", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6538 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0678176", + "display": "Neurontin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000042761" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "2269" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000077206" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C1108" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000038402" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02ko" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "196498" + } + ], + "text": "neurontin" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/31a7f227-500f-4278-af67-405b7fad691c", + "resource": { + "resourceType": "MedicationRequest", + "id": "31a7f227-500f-4278-af67-405b7fad691c", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6641 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0012373", + "display": "diltiazem" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000020881" + }, + { + "system": "http://www.whocc.no/atc", + "code": "C08DB01" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000003959" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0314-7897" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00343" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "4148" + }, + { + "system": "http://loinc.org", + "code": "LP17238-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "197220" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00045" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D004110" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "EE92BBP03H" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C61725" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "30307" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "EE92BBP03H" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "004514" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x01CU" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "3443" + }, + { + "system": "http://snomed.info/sct", + "code": "E-7719" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-803A0" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372793000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU000928" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4019722" + } + ], + "text": "Diltiazem" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "dosageInstruction": [ + { + "text": "5mg/hour", + "route": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6651 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "drip" + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 5 + } + } + ] + } + ] + } + }, + { + "fullUrl": "MedicationRequest/3bd8c031-1382-4ddb-8a64-176c3cfd426d", + "resource": { + "resourceType": "MedicationRequest", + "id": "3bd8c031-1382-4ddb-8a64-176c3cfd426d", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6674 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0878061", + "display": "Altace" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000045298" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "315" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D017257" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29411" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000686948" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02tS" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "262418" + } + ], + "text": "altace" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/0a9794ae-f73b-4db1-9a21-9bb2169d29d0", + "resource": { + "resourceType": "MedicationRequest", + "id": "0a9794ae-f73b-4db1-9a21-9bb2169d29d0", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6682 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0003015", + "display": "Angiotensin-Converting Enzyme Inhibitors" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0063008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000001185" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1037-0850" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85005040" + }, + { + "system": "http://loinc.org", + "code": "LP31444-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "41889" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000806" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000335481" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "bi..." + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-80150" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372733002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001019" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4021577" + } + ], + "text": "ACEI" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/05fdfe6e-d45d-40f4-8e88-7ab743df1f1c", + "resource": { + "resourceType": "MedicationRequest", + "id": "05fdfe6e-d45d-40f4-8e88-7ab743df1f1c", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6760 + }, + { + "url": "length", + "valueInteger": 14 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "draft", + "intent": "order", + "medicationCodeableConcept": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ], + "text": "HTN medication" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/bc5965e1-20e2-48de-bff7-0f2b7b36604f", + "resource": { + "resourceType": "MedicationRequest", + "id": "bc5965e1-20e2-48de-bff7-0f2b7b36604f", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6790 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "cancelled", + "intent": "proposal", + "doNotPerform": true, + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0003015", + "display": "Angiotensin-Converting Enzyme Inhibitors" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0063008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000001185" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "1037-0850" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85005040" + }, + { + "system": "http://loinc.org", + "code": "LP31444-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "41889" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000806" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000335481" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_pcdc", + "code": "C247" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "bi..." + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-80150" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372733002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001019" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4021577" + } + ], + "text": "ACEI" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/c30e24bb-7fd9-4fef-935a-98b7a2a43c8e", + "resource": { + "resourceType": "MedicationRequest", + "id": "c30e24bb-7fd9-4fef-935a-98b7a2a43c8e", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6808 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "cancelled", + "intent": "proposal", + "doNotPerform": true, + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0020261", + "display": "hydrochlorothiazide" + }, + { + "system": "http://www.whocc.no/atc", + "code": "C03AA03" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000006347" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00999" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "637" + }, + { + "system": "http://loinc.org", + "code": "MTHU060558" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40606" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "4834" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D006852" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "0J48LPH2TH" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29098" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "01646" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "0J48LPH2TH" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "002294" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "b26.." + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "5487" + }, + { + "system": "http://snomed.info/sct", + "code": "E-8899" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-72260" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "387525002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m37940" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU000981" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4017615" + } + ], + "text": "HCTZ" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/780dd0b6-34fe-460f-9682-395008e06289", + "resource": { + "resourceType": "MedicationRequest", + "id": "780dd0b6-34fe-460f-9682-395008e06289", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6871 + }, + { + "url": "length", + "valueInteger": 12 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0001645", + "display": "Adrenergic beta-Antagonists" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000028638" + }, + { + "system": "http://www.whocc.no/atc", + "code": "C07" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000779" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2059-1394" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85001009" + }, + { + "system": "http://loinc.org", + "code": "LP18062-7" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40578" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000319" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29576" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "05827" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "bd..." + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-80135" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "373254001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU002894" + } + ], + "text": "beta blocker" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/e96b0073-1154-483f-b50d-991663610a41", + "resource": { + "resourceType": "MedicationRequest", + "id": "e96b0073-1154-483f-b50d-991663610a41", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6948 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0074554", + "display": "simvastatin" + }, + { + "system": "http://www.whocc.no/atc", + "code": "C10AA01" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000014812" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "5001-0024" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00641" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "2080" + }, + { + "system": "http://loinc.org", + "code": "LP171640-8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "44437" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00746" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D019821" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "AGG2FN16EV" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29454" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C29454" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "02582" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "AGG2FN16EV" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "003621" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000455226" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "bxd.." + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "36567" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-80812" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "387584000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m75450" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001010" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4020400" + } + ], + "text": "simvastatin" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/b34162ca-71fa-4c96-9e7c-27545adbc5cb", + "resource": { + "resourceType": "MedicationRequest", + "id": "b34162ca-71fa-4c96-9e7c-27545adbc5cb", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6964 + }, + { + "url": "length", + "valueInteger": 7 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0004057", + "display": "aspirin" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000028840" + }, + { + "system": "http://www.whocc.no/atc", + "code": "B01AC06" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0061721" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000001530" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2270-2387" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00945" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "181" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000401" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85008731" + }, + { + "system": "http://loinc.org", + "code": "LA26702-3" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40170" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00170" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D001241" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000320" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "R16CO5Y76E" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C287" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C287" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "00739" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dtp", + "code": "NSC0406186" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "R16CO5Y76E" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000045176" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "001587" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000039152" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/psy", + "code": "04050" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02LX" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "1191" + }, + { + "system": "http://snomed.info/sct", + "code": "E-7771" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-60320" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "387458008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m6240" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4017536" + } + ], + "text": "aspirin" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "MedicationRequest/6b3eda4d-1083-4975-8513-3508b14cb479", + "resource": { + "resourceType": "MedicationRequest", + "id": "6b3eda4d-1083-4975-8513-3508b14cb479", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 7025 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0015620", + "display": "famotidine" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000020846" + }, + { + "system": "http://www.whocc.no/atc", + "code": "A02BA03" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000004890" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00927" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "693" + }, + { + "system": "http://loinc.org", + "code": "LP14346-8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "41926" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00141" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D015738" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "5QZO15J2Z8" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C29045" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C29045" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "5QZO15J2Z8" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "003417" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000574268" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "a68.." + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "4278" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-84020" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "387211002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m32600" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU001191" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4017970" + } + ], + "text": "famotidine" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "ServiceRequest/2c2f9063-16ba-47d3-a978-ffab2cc4fd34", + "resource": { + "resourceType": "ServiceRequest", + "id": "2c2f9063-16ba-47d3-a978-ffab2cc4fd34", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6183 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0419179", + "display": "NPO - Nothing by mouth" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000033028" + }, + { + "system": "http://loinc.org", + "code": "LA16917-9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40007" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C28250" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000256571" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pcds", + "code": "ORC_10200.00" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "8B51." + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "182923009" + } + ], + "text": "NPO" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + } + }, + { + "fullUrl": "ServiceRequest/2ce4103c-a317-4151-9d74-11f34d382636", + "resource": { + "resourceType": "ServiceRequest", + "id": "2ce4103c-a317-4151-9d74-11f34d382636", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6369 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "text": "meds" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + }, + "bodySite": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6364 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0442027", + "display": "Oral" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002273" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000034973" + }, + { + "system": "http://loinc.org", + "code": "LP32603-0" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25311" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_edqm-hc", + "code": "0031" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044068" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X810r" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-51000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "260548002" + } + ], + "text": "oral" + } + ] + } + }, + { + "fullUrl": "ServiceRequest/4132cb37-7186-4361-b36e-bdf7ec83e1f9", + "resource": { + "resourceType": "ServiceRequest", + "id": "4132cb37-7186-4361-b36e-bdf7ec83e1f9", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6568 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0029167", + "display": "Oral Medicine" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008996" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U005446" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85128280" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D019242" + } + ], + "text": "oral meds" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + } + }, + { + "fullUrl": "ServiceRequest/c0b7dcc8-3299-4d8e-8ec2-e3fc2d3e6962", + "resource": { + "resourceType": "ServiceRequest", + "id": "c0b7dcc8-3299-4d8e-8ec2-e3fc2d3e6962", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6625 + }, + { + "url": "length", + "valueInteger": 10 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "text": "BP control" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + } + }, + { + "fullUrl": "ServiceRequest/1aac5492-4c7a-4639-9658-3cd6a2a37d92", + "resource": { + "resourceType": "ServiceRequest", + "id": "1aac5492-4c7a-4639-9658-3cd6a2a37d92", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6925 + }, + { + "url": "length", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1532338", + "display": "Percutaneous Coronary Intervention" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccsr_icd10pcs", + "code": "CAR004" + }, + { + "system": "http://loinc.org", + "code": "LP266258-5" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10065608" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D062645" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C99521" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "C99521" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cptac", + "code": "C99521" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "415070008" + } + ], + "text": "PCI" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "occurrenceDateTime": "1999", + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + } + }, + { + "fullUrl": "ServiceRequest/9470ec53-87ac-4f19-825a-501207f31206", + "resource": { + "resourceType": "ServiceRequest", + "id": "9470ec53-87ac-4f19-825a-501207f31206", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 7046 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "text": "meds" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + }, + "bodySite": [ + { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 7041 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0442027", + "display": "Oral" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000002273" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000034973" + }, + { + "system": "http://loinc.org", + "code": "LP32603-0" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25311" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_edqm-hc", + "code": "0031" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000044068" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X810r" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "T-51000" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "260548002" + } + ], + "text": "oral" + } + ] + } + }, + { + "fullUrl": "ServiceRequest/51900d61-5fa7-4413-91bc-f675d4b1beca", + "resource": { + "resourceType": "ServiceRequest", + "id": "51900d61-5fa7-4413-91bc-f675d4b1beca", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5951 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1446409", + "display": "Positive" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0023688" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000020358" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C25246" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cadsr", + "code": "C25246" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X80xp" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "G-A200" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "10828004" + } + ], + "text": "rule" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + } + }, + { + "fullUrl": "ServiceRequest/582d39aa-739a-40eb-8bb6-78f632cca439", + "resource": { + "resourceType": "ServiceRequest", + "id": "582d39aa-739a-40eb-8bb6-78f632cca439", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5979 + }, + { + "url": "length", + "valueInteger": 6 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "revoked", + "intent": "proposal", + "doNotPerform": true, + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0347997", + "display": "Physical object" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000031165" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/cpm", + "code": "48" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C45281" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X902f" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "260787004" + } + ], + "text": "object" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + } + }, + { + "fullUrl": "Observation/cc9935e9-b7cd-415e-814c-26ca365df019", + "resource": { + "resourceType": "Observation", + "id": "cc9935e9-b7cd-415e-814c-26ca365df019", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 5996 + }, + { + "url": "length", + "valueInteger": 2 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C3496353", + "display": "C1 adrenaline cells" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/neu", + "code": "1758" + } + ], + "text": "C1" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueString": "decreased", + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "Observation/ff4c3830-2416-4e21-8595-43348eb2e56d", + "resource": { + "resourceType": "Observation", + "id": "ff4c3830-2416-4e21-8595-43348eb2e56d", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6003 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0446414", + "display": "C4 level" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000035631" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/fma", + "code": "20316" + }, + { + "system": "http://loinc.org", + "code": "LA32081-4" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "XB009" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "263281001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uwda", + "code": "20316" + } + ], + "text": "C4 levels" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "_effectiveDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "valueString": "decreased", + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "POS", + "display": "Positive" + } + ], + "text": "positive" + } + ] + } + }, + { + "fullUrl": "ServiceRequest/e76d4e07-a7e2-49b6-9434-a54bfe4dd656", + "resource": { + "resourceType": "ServiceRequest", + "id": "e76d4e07-a7e2-49b6-9434-a54bfe4dd656", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6096 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0202230", + "display": "Thyroid stimulating hormone measurement" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000020026" + }, + { + "system": "http://www.ama-assn.org/go/cpt", + "code": "84443" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/hcpt", + "code": "84443" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "T34028" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10043768" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mth", + "code": "U000402" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C64813" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_cdisc", + "code": "SDTM-LBTEST" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C64813" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "P3-74120" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "61167004" + } + ], + "text": "TSH level" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + } + }, + { + "fullUrl": "ServiceRequest/a51ed1d0-4cc2-40af-92a4-571cdeab7295", + "resource": { + "resourceType": "ServiceRequest", + "id": "a51ed1d0-4cc2-40af-92a4-571cdeab7295", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6432 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0018941", + "display": "Hematologic Tests" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000007241" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000005951" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "0455-1241" + }, + { + "system": "http://hl7.org/fhir/sid/icpc-2p", + "code": "A34001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85014929" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mdr", + "code": "10061726" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "12001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medlineplus", + "code": "6351" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D006403" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C49286" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C49286" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nichd", + "code": "C49286" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000575387" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "X77Yh" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcdae", + "code": "X77Yh" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "396550006" + } + ], + "text": "blood" + }, + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "requester": { + "reference": "Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc", + "type": "Practitioner", + "display": "Unknown" + } + } + }, + { + "fullUrl": "AllergyIntolerance/5b39edaa-8e80-4a2d-8805-e634a746424d", + "resource": { + "resourceType": "AllergyIntolerance", + "id": "5b39edaa-8e80-4a2d-8805-e634a746424d", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6824 + }, + { + "url": "length", + "valueInteger": 5 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", + "code": "active", + "display": "Active" + } + ], + "text": "Active" + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", + "code": "confirmed", + "display": "Confirmed" + } + ], + "text": "Confirmed" + }, + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0749139", + "display": "sulfa" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "1012728" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000048179" + } + ], + "text": "sulfa" + }, + "patient": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + } + } + }, + { + "fullUrl": "List/6f292c58-8a59-44d9-9efe-7d8968684466", + "resource": { + "resourceType": "List", + "id": "6f292c58-8a59-44d9-9efe-7d8968684466", + "status": "current", + "mode": "snapshot", + "title": "Plan", + "subject": { + "reference": "Patient/894a042e-625c-48b3-a710-759e09454897", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "MedicationRequest/b66ac041-2556-4bee-9594-bcb151778222", + "type": "MedicationRequest", + "display": "corticosteroid" + } + }, + { + "item": { + "reference": "MedicationRequest/77a51afd-e3f8-4266-9685-b093e2117b8f", + "type": "MedicationRequest", + "display": "Dexamethasone" + } + }, + { + "item": { + "reference": "MedicationRequest/b6517ef9-0757-4c29-8b25-eff19601d92e", + "type": "MedicationRequest", + "display": "antihistamine" + } + }, + { + "item": { + "reference": "MedicationRequest/34446a47-a405-490a-9239-1a437eb75196", + "type": "MedicationRequest", + "display": "Diphenhydramine" + } + }, + { + "item": { + "reference": "MedicationRequest/c55c95d4-7789-43e2-9833-32a97ac38630", + "type": "MedicationRequest", + "display": "albuterol" + } + }, + { + "item": { + "reference": "MedicationRequest/983917ca-151d-4616-84d1-857bfb1ddbfe", + "type": "MedicationRequest", + "display": "ipratropium" + } + }, + { + "item": { + "reference": "MedicationRequest/7b007cb2-4b34-4066-a917-4416c9209e41", + "type": "MedicationRequest", + "display": "theophylline" + } + }, + { + "item": { + "reference": "MedicationRequest/222d4371-0ce2-4499-87bd-1a927742f33f", + "type": "MedicationRequest", + "display": "corticosteroids" + } + }, + { + "item": { + "reference": "MedicationRequest/be6d6d20-2971-420d-a384-d2b94b45ca66", + "type": "MedicationRequest", + "display": "normal insulin" + } + }, + { + "item": { + "reference": "MedicationRequest/d14b5a1c-e540-4999-9c37-269c95f69772", + "type": "MedicationRequest", + "display": "neurontin" + } + }, + { + "item": { + "reference": "MedicationRequest/31a7f227-500f-4278-af67-405b7fad691c", + "type": "MedicationRequest", + "display": "Diltiazem" + } + }, + { + "item": { + "reference": "MedicationRequest/3bd8c031-1382-4ddb-8a64-176c3cfd426d", + "type": "MedicationRequest", + "display": "altace" + } + }, + { + "item": { + "reference": "MedicationRequest/0a9794ae-f73b-4db1-9a21-9bb2169d29d0", + "type": "MedicationRequest", + "display": "ACEI" + } + }, + { + "item": { + "reference": "MedicationRequest/05fdfe6e-d45d-40f4-8e88-7ab743df1f1c", + "type": "MedicationRequest", + "display": "HTN medication" + } + }, + { + "item": { + "reference": "MedicationRequest/bc5965e1-20e2-48de-bff7-0f2b7b36604f", + "type": "MedicationRequest", + "display": "ACEI" + } + }, + { + "item": { + "reference": "MedicationRequest/c30e24bb-7fd9-4fef-935a-98b7a2a43c8e", + "type": "MedicationRequest", + "display": "HCTZ" + } + }, + { + "item": { + "reference": "MedicationRequest/780dd0b6-34fe-460f-9682-395008e06289", + "type": "MedicationRequest", + "display": "beta blocker" + } + }, + { + "item": { + "reference": "MedicationRequest/e96b0073-1154-483f-b50d-991663610a41", + "type": "MedicationRequest", + "display": "simvastatin" + } + }, + { + "item": { + "reference": "MedicationRequest/b34162ca-71fa-4c96-9e7c-27545adbc5cb", + "type": "MedicationRequest", + "display": "aspirin" + } + }, + { + "item": { + "reference": "MedicationRequest/6b3eda4d-1083-4975-8513-3508b14cb479", + "type": "MedicationRequest", + "display": "famotidine" + } + }, + { + "item": { + "reference": "ServiceRequest/2c2f9063-16ba-47d3-a978-ffab2cc4fd34", + "type": "ServiceRequest", + "display": "NPO" + } + }, + { + "item": { + "reference": "ServiceRequest/2ce4103c-a317-4151-9d74-11f34d382636", + "type": "ServiceRequest", + "display": "meds" + } + }, + { + "item": { + "reference": "ServiceRequest/4132cb37-7186-4361-b36e-bdf7ec83e1f9", + "type": "ServiceRequest", + "display": "oral meds" + } + }, + { + "item": { + "reference": "ServiceRequest/c0b7dcc8-3299-4d8e-8ec2-e3fc2d3e6962", + "type": "ServiceRequest", + "display": "BP control" + } + }, + { + "item": { + "reference": "ServiceRequest/1aac5492-4c7a-4639-9658-3cd6a2a37d92", + "type": "ServiceRequest", + "display": "PCI" + } + }, + { + "item": { + "reference": "ServiceRequest/9470ec53-87ac-4f19-825a-501207f31206", + "type": "ServiceRequest", + "display": "meds" + } + }, + { + "item": { + "reference": "ServiceRequest/51900d61-5fa7-4413-91bc-f675d4b1beca", + "type": "ServiceRequest", + "display": "rule" + } + }, + { + "item": { + "reference": "ServiceRequest/582d39aa-739a-40eb-8bb6-78f632cca439", + "type": "ServiceRequest", + "display": "object" + } + }, + { + "item": { + "reference": "Observation/cc9935e9-b7cd-415e-814c-26ca365df019", + "type": "Observation", + "display": "C1" + } + }, + { + "item": { + "reference": "Observation/ff4c3830-2416-4e21-8595-43348eb2e56d", + "type": "Observation", + "display": "C4 levels" + } + }, + { + "item": { + "reference": "ServiceRequest/e76d4e07-a7e2-49b6-9434-a54bfe4dd656", + "type": "ServiceRequest", + "display": "TSH level" + } + }, + { + "item": { + "reference": "ServiceRequest/a51ed1d0-4cc2-40af-92a4-571cdeab7295", + "type": "ServiceRequest", + "display": "blood" + } + }, + { + "item": { + "reference": "AllergyIntolerance/5b39edaa-8e80-4a2d-8805-e634a746424d", + "type": "AllergyIntolerance", + "display": "sulfa" + } + } + ] + } + }, + { + "fullUrl": "Medication/1c24ba62-c729-4acf-8810-caa34bcc23eb", + "resource": { + "resourceType": "Medication", + "id": "1c24ba62-c729-4acf-8810-caa34bcc23eb", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6283 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0001927", + "display": "albuterol" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000020136" + }, + { + "system": "http://www.whocc.no/atc", + "code": "R03CC02" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000000861" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "4007-0002" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB01001" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "47" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch", + "code": "U000128" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh85003253" + }, + { + "system": "http://loinc.org", + "code": "LP17843-1" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "41470" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00749" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D000420" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "QF8SVZ843E" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C215" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "QF8SVZ843E" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "001814" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x00Af" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "435" + }, + { + "system": "http://snomed.info/sct/900000000000207008", + "code": "C-68010" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372897005" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m1195" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4018796" + } + ], + "text": "albuterol" + }, + "form": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6309 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "nebs" + } + } + }, + { + "fullUrl": "Medication/69bde4ad-e54f-4858-a0d9-637521768380", + "resource": { + "resourceType": "Medication", + "id": "69bde4ad-e54f-4858-a0d9-637521768380", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6297 + }, + { + "url": "length", + "valueInteger": 11 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "code": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0027235", + "display": "ipratropium" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000008455" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB00332" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "4326" + }, + { + "system": "http://loinc.org", + "code": "LP171404-9" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00265" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D009241" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "GR88G0I6UL" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C61794" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "GR88G0I6UL" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "004943" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x01Db" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "7213" + }, + { + "system": "http://snomed.info/sct/731000124108", + "code": "372518007" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4019791" + } + ], + "text": "ipratropium" + }, + "form": { + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 6309 + }, + { + "url": "length", + "valueInteger": 4 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "text": "nebs" + } + } + } + ] +} diff --git a/sdk/healthinsights/ci.yml b/sdk/healthinsights/ci.yml index bf0bd80be6dc..1f6adf1a79f1 100644 --- a/sdk/healthinsights/ci.yml +++ b/sdk/healthinsights/ci.yml @@ -10,6 +10,8 @@ trigger: - sdk/healthinsights/ exclude: - sdk/healthinsights/pom.xml + - sdk/healthinsights/azure-health-insights-cancerprofiling/pom.xml + - sdk/healthinsights/azure-health-insights-clinicalmatching/pom.xml - sdk/healthinsights/azure-health-insights-radiologyinsights/pom.xml @@ -25,9 +27,19 @@ pr: - sdk/healthinsights/ exclude: - sdk/healthinsights/pom.xml + - sdk/healthinsights/azure-health-insights-cancerprofiling/pom.xml + - sdk/healthinsights/azure-health-insights-clinicalmatching/pom.xml - sdk/healthinsights/azure-health-insights-radiologyinsights/pom.xml parameters: +- name: release_azurehealthinsightsclinicalmatching + displayName: 'azure-health-insights-clinicalmatching' + type: boolean + default: true +- name: release_azurehealthinsightscancerprofiling + displayName: 'azure-health-insights-cancerprofiling' + type: boolean + default: true - name: release_azurehealthinsightsradiologyinsights displayName: 'azure-health-insights-radiologyinsights' type: boolean @@ -38,6 +50,14 @@ extends: parameters: ServiceDirectory: healthinsights Artifacts: + - name: azure-health-insights-clinicalmatching + groupId: com.azure + safeName: azurehealthinsightsclinicalmatching + releaseInBatch: ${{ parameters.release_azurehealthinsightsclinicalmatching }} + - name: azure-health-insights-cancerprofiling + groupId: com.azure + safeName: azurehealthinsightscancerprofiling + releaseInBatch: ${{ parameters.release_azurehealthinsightscancerprofiling }} - name: azure-health-insights-radiologyinsights groupId: com.azure safeName: azurehealthinsightsradiologyinsights diff --git a/sdk/healthinsights/pom.xml b/sdk/healthinsights/pom.xml index 1e4b9dc0ee5a..26b887170fd0 100644 --- a/sdk/healthinsights/pom.xml +++ b/sdk/healthinsights/pom.xml @@ -8,6 +8,8 @@ pom 1.0.0 + azure-health-insights-cancerprofiling + azure-health-insights-clinicalmatching azure-health-insights-radiologyinsights
      diff --git a/sdk/healthinsights/tests.yml b/sdk/healthinsights/tests.yml index 14c58a1917df..299fac654cce 100644 --- a/sdk/healthinsights/tests.yml +++ b/sdk/healthinsights/tests.yml @@ -9,6 +9,12 @@ extends: parameters: ServiceDirectory: healthinsights Artifacts: + - name: azure-health-insights-cancerprofiling + groupId: com.azure + safeName: azurehealthinsightscancerprofiling + - name: azure-health-insights-clinicalmatching + groupId: com.azure + safeName: azurehealthinsightsclinicalmatching - name: azure-health-insights-radiologyinsights groupId: com.azure safeName: azurehealthinsightsradiologyinsights diff --git a/sdk/identity/azure-identity/pom.xml b/sdk/identity/azure-identity/pom.xml index 4b7c7e2a5b71..6a23070d50ff 100644 --- a/sdk/identity/azure-identity/pom.xml +++ b/sdk/identity/azure-identity/pom.xml @@ -18,7 +18,6 @@ --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED - --add-reads com.azure.identity=io.netty.transport,io.netty.buffer,io.netty.handler,io.netty.codec.http,io.netty.common false @@ -36,13 +35,13 @@ com.azure azure-core - 1.61.0-beta.1 + 1.60.0 com.azure azure-core-http-netty - 1.17.0-beta.1 + 1.16.8 @@ -63,7 +62,7 @@ com.azure azure-core-test - 1.27.0-beta.20 + 1.27.0-beta.19 test diff --git a/sdk/identity/azure-identity/src/test/java/com/azure/identity/WorkloadIdentityCredentialIdentityBindingTest.java b/sdk/identity/azure-identity/src/test/java/com/azure/identity/WorkloadIdentityCredentialIdentityBindingTest.java index ba206acdf5d3..ab8a2ec756ff 100644 --- a/sdk/identity/azure-identity/src/test/java/com/azure/identity/WorkloadIdentityCredentialIdentityBindingTest.java +++ b/sdk/identity/azure-identity/src/test/java/com/azure/identity/WorkloadIdentityCredentialIdentityBindingTest.java @@ -15,9 +15,8 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelPipeline; -import io.netty.channel.MultiThreadIoEventLoopGroup; import io.netty.channel.SimpleChannelInboundHandler; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.codec.http.DefaultFullHttpResponse; @@ -77,8 +76,8 @@ public class WorkloadIdentityCredentialIdentityBindingTest { @TempDir Path tempDir; - private MultiThreadIoEventLoopGroup bossGroup; - private MultiThreadIoEventLoopGroup workerGroup; + private NioEventLoopGroup bossGroup; + private NioEventLoopGroup workerGroup; private Channel serverChannel; private String serverBaseUrl; private Path tokenFilePath; @@ -544,8 +543,8 @@ private void startNettyHttpsServer(PrivateKey privateKey, X509Certificate certif SslContext sslContext = SslContextBuilder.forServer(privateKey, certificate).sslProvider(SslProvider.OPENSSL).build(); - bossGroup = new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory()); - workerGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()); + bossGroup = new NioEventLoopGroup(1); + workerGroup = new NioEventLoopGroup(); ServerBootstrap bootstrap = new ServerBootstrap(); bootstrap.group(bossGroup, workerGroup) diff --git a/sdk/keyvault/azure-security-keyvault-jca/CHANGELOG.md b/sdk/keyvault/azure-security-keyvault-jca/CHANGELOG.md index 11c6b6f4b27a..b7fe6e436de2 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/CHANGELOG.md +++ b/sdk/keyvault/azure-security-keyvault-jca/CHANGELOG.md @@ -1,24 +1,12 @@ # Release History -## 2.14.0-beta.1 (Unreleased) +## 2.13.0-beta.1 (Unreleased) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.13.0 (2026-10-13) - -### Features Added -- Added ISO-8601 duration support (e.g., `PT30S`) for `azure.keyvault.jca.certificates-refresh-interval`, while retaining support for millisecond values. ([#50785](https://github.com/Azure/azure-sdk-for-java/pull/50785)) - Added lazy loading for Key Vault certificate details in the JCA keystore. Certificate details are now loaded by alias when requested, avoiding unnecessary reads for unconfigured certificates. ([#49774](https://github.com/Azure/azure-sdk-for-java/pull/49774)) - Added support for `azure.keyvault.jca.certificate-alias-filter-pattern` to filter Key Vault certificate aliases with inclusion/exclusion regex patterns. Inclusion patterns are configured directly and exclusion patterns are prefixed with `!`. Configure more than one filter by appending a suffix to the property name, such as `azure.keyvault.jca.certificate-alias-filter-pattern.1`. A pattern can contain any character as long as the regex is correct. If no filter property is configured, alias filtering is disabled and all discovered Key Vault aliases remain eligible for lazy loading. ([#39487](https://github.com/Azure/azure-sdk-for-java/issues/39487)) ### Breaking Changes -- Removed support for `azure.keyvault.jca.certificates-refresh-interval-in-ms`. ([#50785](https://github.com/Azure/azure-sdk-for-java/pull/50785)) ### Bugs Fixed - Preserved configured TLS endpoint identification and connection-specific validation when delegating certificate checks, including checks of certificates trusted through the Key Vault keystore. ([#50667](https://github.com/Azure/azure-sdk-for-java/pull/50667)) @@ -27,7 +15,6 @@ - Fixed an issue where `KeyStore.load(KeyVaultLoadStoreParameter)` could combine explicit client settings with certificate cache and path settings captured earlier from system properties. The parameter now carries the complete key store configuration. ([#50163](https://github.com/Azure/azure-sdk-for-java/pull/50163)) ### Other Changes -- Changed the certificate refresh interval in `KeyVaultLoadStoreParameter` from `long` milliseconds to `Duration`. ([#50785](https://github.com/Azure/azure-sdk-for-java/pull/50785)) - Added system property `azure.keyvault.jca.disable-aia-download` to disable automatic AIA chain completion. AIA chain completion downloads certificates from URLs embedded in certificate extensions, so this allows locked-down environments to prevent those outbound HTTP(S) requests, mitigating potential SSRF-like attack vectors when loading untrusted certificates. The value is captured when each Key Vault client is initialized and retained for lazy certificate-chain loading, so multiple keystores can use different settings without overwriting one another. Set to `true` to disable (defaults to `false`). - Added `KeyVaultJcaPropertyNames` as the central source for the system property names supported by the Azure Key Vault JCA provider. ([#50163](https://github.com/Azure/azure-sdk-for-java/pull/50163)) - Replaced Apache HttpClient 5 with the JDK `HttpURLConnection`, removing the Apache HttpClient and SLF4J runtime dependencies while preserving strict HTTPS hostname verification, non-fatal AIA download failures, fail-closed TLS trust initialization, and automatic gzip and deflate response decompression. VM managed identity requests to IMDS use `Proxy.NO_PROXY` to bypass HTTP proxy routing. Other requests, including App Service and Container Apps managed identity requests, retain JDK proxy selection. diff --git a/sdk/keyvault/azure-security-keyvault-jca/README.md b/sdk/keyvault/azure-security-keyvault-jca/README.md index d97828ba2ed0..6507a00d96f7 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/README.md +++ b/sdk/keyvault/azure-security-keyvault-jca/README.md @@ -64,7 +64,7 @@ add the direct dependency to your project as follows. com.azure azure-security-keyvault-jca - 2.13.0 + 2.12.0 ``` [//]: # ({x-version-update-end}) @@ -139,7 +139,8 @@ The JCA library supports configuring the following options: * `azure.cert-path.well-known`: The path where the well-known certificate is stored. * `azure.cert-path.custom`: The path where the custom certificate is stored. * `azure.keyvault.jca.refresh-certificates-when-have-un-trust-certificate`: Indicates whether to refresh certificates when have untrusted certificate. -* `azure.keyvault.jca.certificates-refresh-interval`: The certificate refresh interval as an ISO-8601 duration, for example `-Dazure.keyvault.jca.certificates-refresh-interval=PT30S` for 30 seconds. Millisecond values such as `-Dazure.keyvault.jca.certificates-refresh-interval=30000` remain supported for backward compatibility. Defaults to zero; zero or negative values disable periodic refresh. +* `azure.keyvault.jca.certificates-refresh-interval`: The refresh interval time. +* `azure.keyvault.jca.certificates-refresh-interval-in-ms`: The refresh interval time. * `azure.keyvault.jca.certificate-alias-filter-pattern`: A regex that filters which Key Vault certificate aliases are eligible for lazy loading. Append a suffix to the property name to configure more than one filter, for example `azure.keyvault.jca.certificate-alias-filter-pattern.1` or `azure.keyvault.jca.certificate-alias-filter-pattern.prod`. If no such property is configured, all discovered Key Vault aliases are eligible for lazy loading. See "Filtering Key Vault certificate aliases" below. * `azure.keyvault.disable-challenge-resource-verification`: Indicates whether to disable verification that the authentication challenge resource matches the Key Vault or Managed HSM domain. * `azure.keyvault.jca.disable-aia-download`: Set to `true` to disable automatic AIA (Authority Information Access) certificate chain completion. Chain completion is only attempted when the chain returned by Azure Key Vault is incomplete, meaning it holds a single certificate or is missing an intermediate CA. When disabled, the provider will return certificate chains as provided by Azure Key Vault without downloading missing intermediate CA certificates. Use this in locked-down environments or when processing untrusted certificates to prevent outbound HTTP(S) requests to URLs embedded in certificate extensions. Defaults to `false` for backward compatibility. The value is captured when a Key Vault keystore and its client are initialized. @@ -153,10 +154,6 @@ or as a JVM argument: -Dazure.keyvault.uri= ``` -The system property `azure.keyvault.jca.certificates-refresh-interval-in-ms` has been removed and is ignored. If it is -configured, the provider logs a warning. Use `azure.keyvault.jca.certificates-refresh-interval` instead, with an ISO-8601 -duration such as `PT30S` or the existing millisecond value. - #### Programmatic configuration Use `KeyVaultLoadStoreParameter` when each key store needs an explicit configuration instead of global system @@ -168,7 +165,7 @@ KeyVaultLoadStoreParameter parameter = new KeyVaultLoadStoreParameter( "", "", "") - .setCertificatesRefreshInterval(Duration.ofSeconds(60)) + .setCertificatesRefreshIntervalInMs(60_000) .setCertificateAliasFilterPatterns(Collections.singleton("^prod-.*")); parameter.disableAiaDownload(); diff --git a/sdk/keyvault/azure-security-keyvault-jca/pom.xml b/sdk/keyvault/azure-security-keyvault-jca/pom.xml index 331a85eb3ffb..0f439a0aa1db 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/pom.xml +++ b/sdk/keyvault/azure-security-keyvault-jca/pom.xml @@ -13,7 +13,7 @@ com.azure azure-security-keyvault-jca - 2.14.0-beta.1 + 2.13.0-beta.1 JCA Provider for Azure Key Vault The Java Crypto Architecture (JCA) Provider for Azure Key Vault diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultJcaPropertyNames.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultJcaPropertyNames.java index cfafa8d020f0..73f0db5f5c21 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultJcaPropertyNames.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultJcaPropertyNames.java @@ -58,12 +58,17 @@ private KeyVaultJcaPropertyNames() { public static final String CERT_PATH_CUSTOM = "azure.cert-path.custom"; /** - * The certificate refresh interval property name. Accepts an ISO-8601 duration, such as {@code PT30S}, or a - * millisecond value, such as {@code 30000}. + * The certificate refresh interval property name. */ public static final String KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL = "azure.keyvault.jca.certificates-refresh-interval"; + /** + * The certificate refresh interval in milliseconds property name. + */ + public static final String KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL_IN_MS + = "azure.keyvault.jca.certificates-refresh-interval-in-ms"; + /** * The property name used to refresh certificates when an untrusted certificate is encountered. */ diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultKeyStore.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultKeyStore.java index 07005a8e25af..c375f26d44cb 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultKeyStore.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultKeyStore.java @@ -53,9 +53,6 @@ public final class KeyVaultKeyStore extends KeyStoreSpi { */ private static final Logger LOGGER = Logger.getLogger(KeyVaultKeyStore.class.getName()); - private static final String REMOVED_CERTIFICATES_REFRESH_INTERVAL_IN_MS - = "azure.keyvault.jca.certificates-refresh-interval-in-ms"; - /** * Stores the Jre key store certificates. */ @@ -126,17 +123,6 @@ public KeyVaultKeyStore() { updateKeyStoreConfiguration(parameter); } - static void warnIfRemovedCertificatesRefreshIntervalIsConfigured() { - if (System.getProperty(REMOVED_CERTIFICATES_REFRESH_INTERVAL_IN_MS) != null) { - LOGGER.log(WARNING, - "System property {0} has been removed and is ignored. Use {1} instead with an ISO-8601 duration" - + " (for example, PT30S). Millisecond values (for example, 30000) are also supported.", - new Object[] { - REMOVED_CERTIFICATES_REFRESH_INTERVAL_IN_MS, - KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL }); - } - } - private void updateKeyStoreConfiguration(KeyVaultLoadStoreParameter parameter) { refreshCertificatesWhenHaveUnTrustCertificate = parameter.isRefreshCertificatesWhenHaveUnTrustCertificate(); certPathWellKnown = parameter.getCertPathWellKnown(); diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameter.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameter.java index 5d4164450301..ae43595544a6 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameter.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameter.java @@ -4,7 +4,6 @@ package com.azure.security.keyvault.jca; import java.security.KeyStore; -import java.time.Duration; import java.util.Collections; import java.util.HashSet; import java.util.Objects; @@ -61,9 +60,9 @@ public final class KeyVaultLoadStoreParameter implements KeyStore.LoadStoreParam private boolean disableChallengeResourceVerification = false; /** - * Stores the certificate refresh interval. + * Stores the certificate refresh interval in milliseconds. */ - private Duration certificatesRefreshInterval = Duration.ZERO; + private long certificatesRefreshIntervalInMs; /** * Stores a flag indicating whether AIA certificate downloads are disabled. @@ -109,17 +108,13 @@ public static KeyVaultLoadStoreParameter fromSystemProperties() { parameter.disableChallengeResourceVerification(); } - KeyVaultKeyStore.warnIfRemovedCertificatesRefreshIntervalIsConfigured(); String refreshInterval - = System.getProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL); + = System.getProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL_IN_MS); + if (refreshInterval == null) { + refreshInterval = System.getProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL); + } if (refreshInterval != null) { - Duration interval; - try { - interval = Duration.ofMillis(Long.parseLong(refreshInterval)); - } catch (NumberFormatException exception) { - interval = Duration.parse(refreshInterval); - } - parameter.setCertificatesRefreshInterval(interval); + parameter.setCertificatesRefreshIntervalInMs(Long.parseLong(refreshInterval)); } if (Boolean.parseBoolean(System.getProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_DISABLE_AIA_DOWNLOAD))) { @@ -305,24 +300,22 @@ public void disableChallengeResourceVerification() { } /** - * Gets the certificate refresh interval. + * Gets the certificate refresh interval in milliseconds. * - * @return The certificate refresh interval. Defaults to {@link Duration#ZERO}, which disables periodic refresh. + * @return The certificate refresh interval in milliseconds. */ - public Duration getCertificatesRefreshInterval() { - return certificatesRefreshInterval; + public long getCertificatesRefreshIntervalInMs() { + return certificatesRefreshIntervalInMs; } /** - * Sets the certificate refresh interval. Zero or negative intervals disable periodic refresh. + * Sets the certificate refresh interval in milliseconds. * - * @param certificatesRefreshInterval The certificate refresh interval, for example {@code Duration.parse("PT30S")}. + * @param certificatesRefreshIntervalInMs The certificate refresh interval in milliseconds. * @return The KeyVaultLoadStoreParameter. - * @throws NullPointerException if {@code certificatesRefreshInterval} is {@code null}. */ - public KeyVaultLoadStoreParameter setCertificatesRefreshInterval(Duration certificatesRefreshInterval) { - this.certificatesRefreshInterval - = Objects.requireNonNull(certificatesRefreshInterval, "'certificatesRefreshInterval' cannot be null."); + public KeyVaultLoadStoreParameter setCertificatesRefreshIntervalInMs(long certificatesRefreshIntervalInMs) { + this.certificatesRefreshIntervalInMs = certificatesRefreshIntervalInMs; return this; } diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/implementation/certificates/KeyVaultCertificates.java b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/implementation/certificates/KeyVaultCertificates.java index 1f53a3c27767..e23f157fbfbf 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/implementation/certificates/KeyVaultCertificates.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/implementation/certificates/KeyVaultCertificates.java @@ -131,7 +131,7 @@ private void updateCertificateConfiguration(KeyVaultLoadStoreParameter parameter List updatedIncludeAliasPatterns = getAliasPatterns(normalizedFilterPatterns, false); List updatedExcludeAliasPatterns = getAliasPatterns(normalizedFilterPatterns, true); - certificatesRefreshIntervalInMs = parameter.getCertificatesRefreshInterval().toMillis(); + certificatesRefreshIntervalInMs = parameter.getCertificatesRefreshIntervalInMs(); includeAliasPatterns = updatedIncludeAliasPatterns; excludeAliasPatterns = updatedExcludeAliasPatterns; } diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java b/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java index 1a2fb8bd9fee..d2d7fa7c9dce 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultCertificatesTest.java @@ -83,7 +83,7 @@ private X509Certificate getTestCertificate() { @Test public void testCertificatesRefreshInterval() throws Exception { - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, "PT1S"); + System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL_IN_MS, "1000"); KeyStore keyStore = PropertyConvertorUtils.getKeyVaultKeyStore(); assertNotNull(keyStore.getCertificate(certificateName)); keyStore.deleteEntry(certificateName); diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameterTest.java b/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameterTest.java index e0e1e56018c5..cd28a487bc82 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameterTest.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameterTest.java @@ -8,33 +8,18 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.ResourceLock; import org.junit.jupiter.api.parallel.Resources; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; -import java.text.MessageFormat; -import java.time.Duration; -import java.time.format.DateTimeParseException; -import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; -import java.util.List; import java.util.Set; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.LogRecord; -import java.util.logging.Logger; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertSame; -import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @ResourceLock(Resources.SYSTEM_PROPERTIES) public class KeyVaultLoadStoreParameterTest { - private static final String REMOVED_REFRESH_INTERVAL_PROPERTY - = "azure.keyvault.jca.certificates-refresh-interval-in-ms"; @BeforeEach @AfterEach @@ -49,7 +34,7 @@ public void clearSystemProperties() { System.clearProperty(KeyVaultJcaPropertyNames.CERT_PATH_WELL_KNOWN); System.clearProperty(KeyVaultJcaPropertyNames.CERT_PATH_CUSTOM); System.clearProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL); - System.clearProperty(REMOVED_REFRESH_INTERVAL_PROPERTY); + System.clearProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL_IN_MS); System.clearProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_REFRESH_CERTIFICATES_WHEN_HAVE_UNTRUST_CERTIFICATE); System.clearProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_DISABLE_AIA_DOWNLOAD); String aliasFilterProperty = KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATE_ALIAS_FILTER_PATTERN; @@ -71,7 +56,7 @@ public void testFromSystemPropertiesCapturesAllProperties() { System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_DISABLE_CHALLENGE_RESOURCE_VERIFICATION, "true"); System.setProperty(KeyVaultJcaPropertyNames.CERT_PATH_WELL_KNOWN, "/well-known"); System.setProperty(KeyVaultJcaPropertyNames.CERT_PATH_CUSTOM, "/custom"); - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, "PT1S"); + System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL_IN_MS, "1000"); System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_REFRESH_CERTIFICATES_WHEN_HAVE_UNTRUST_CERTIFICATE, "true"); System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATE_ALIAS_FILTER_PATTERN, " alias-one "); @@ -90,7 +75,7 @@ public void testFromSystemPropertiesCapturesAllProperties() { assertTrue(parameter.isDisableChallengeResourceVerification()); assertEquals("/well-known", parameter.getCertPathWellKnown()); assertEquals("/custom", parameter.getCertPathCustom()); - assertEquals(Duration.ofSeconds(1), parameter.getCertificatesRefreshInterval()); + assertEquals(1000L, parameter.getCertificatesRefreshIntervalInMs()); assertTrue(parameter.isRefreshCertificatesWhenHaveUnTrustCertificate()); assertEquals(new HashSet<>(Arrays.asList("alias-one", "^prod-.*")), parameter.getCertificateAliasFilterPatterns()); @@ -104,123 +89,26 @@ public void testFromSystemPropertiesUsesDefaults() { assertNull(parameter.getUri()); assertEquals("/etc/certs/well-known/", parameter.getCertPathWellKnown()); assertEquals("/etc/certs/custom/", parameter.getCertPathCustom()); - assertEquals(Duration.ZERO, parameter.getCertificatesRefreshInterval()); + assertEquals(0L, parameter.getCertificatesRefreshIntervalInMs()); assertFalse(parameter.isRefreshCertificatesWhenHaveUnTrustCertificate()); assertTrue(parameter.getCertificateAliasFilterPatterns().isEmpty()); assertFalse(parameter.isDisableChallengeResourceVerification()); assertFalse(parameter.isAiaDownloadDisabled()); } - @ParameterizedTest - @ValueSource(strings = { "PT30S", "30000", "+30000" }) - public void testRefreshIntervalAcceptsIso8601DurationAndMilliseconds(String refreshInterval) { - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, refreshInterval); - - assertEquals(Duration.ofSeconds(30), - KeyVaultLoadStoreParameter.fromSystemProperties().getCertificatesRefreshInterval()); - } - @Test - public void testLegacyRefreshIntervalMillisecondsAreSupported() { + public void testRefreshIntervalInMsTakesPrecedence() { System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, "2000"); + System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL_IN_MS, "1000"); - assertEquals(Duration.ofMillis(2000), - KeyVaultLoadStoreParameter.fromSystemProperties().getCertificatesRefreshInterval()); - } - - @Test - public void testRefreshIntervalAcceptsIso8601Duration() { - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, "PT30S"); - - assertEquals(Duration.ofSeconds(30), - KeyVaultLoadStoreParameter.fromSystemProperties().getCertificatesRefreshInterval()); - } - - @Test - public void testRefreshIntervalAcceptsFractionalSeconds() { - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, "PT0.5S"); - - assertEquals(Duration.ofMillis(500), - KeyVaultLoadStoreParameter.fromSystemProperties().getCertificatesRefreshInterval()); - } - - @ParameterizedTest - @ValueSource(strings = { "0", "PT0S", "-1", "-PT1S" }) - public void testRefreshIntervalAllowsDisabledRefresh(String refreshInterval) { - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, refreshInterval); - - Duration interval = KeyVaultLoadStoreParameter.fromSystemProperties().getCertificatesRefreshInterval(); - assertTrue(interval.isZero() || interval.isNegative()); - } - - @ParameterizedTest - @ValueSource(strings = { "", "not-a-duration", "PT", "30S" }) - public void testInvalidRefreshIntervalIsRejected(String refreshInterval) { - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, refreshInterval); - - assertThrows(DateTimeParseException.class, KeyVaultLoadStoreParameter::fromSystemProperties); - } - - @Test - public void testProgrammaticRefreshInterval() { - KeyVaultLoadStoreParameter parameter = new KeyVaultLoadStoreParameter(null); - - assertSame(parameter, parameter.setCertificatesRefreshInterval(Duration.ofSeconds(30))); - assertEquals(Duration.ofSeconds(30), parameter.getCertificatesRefreshInterval()); - assertThrows(NullPointerException.class, () -> parameter.setCertificatesRefreshInterval(null)); + assertEquals(1000L, KeyVaultLoadStoreParameter.fromSystemProperties().getCertificatesRefreshIntervalInMs()); } @Test - public void testRemovedRefreshIntervalPropertyWarnsAndIsIgnored() { - assertRemovedRefreshIntervalPropertyWarnsAndIsIgnored(Duration.ZERO); - } - - @ParameterizedTest - @ValueSource(strings = { "PT30S", "30000" }) - public void testRemovedRefreshIntervalPropertyDoesNotOverrideSupportedProperty(String refreshInterval) { - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, refreshInterval); - - assertRemovedRefreshIntervalPropertyWarnsAndIsIgnored(Duration.ofSeconds(30)); - } - - private void assertRemovedRefreshIntervalPropertyWarnsAndIsIgnored(Duration expectedInterval) { - System.setProperty(REMOVED_REFRESH_INTERVAL_PROPERTY, "removed-property-value"); - Logger logger = Logger.getLogger(KeyVaultKeyStore.class.getName()); - Level originalLevel = logger.getLevel(); - List records = new ArrayList<>(); - Handler collector = new Handler() { - @Override - public void publish(LogRecord record) { - records.add(record); - } - - @Override - public void flush() { - } + public void testLegacyRefreshIntervalIsFallback() { + System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, "2000"); - @Override - public void close() { - } - }; - logger.addHandler(collector); - logger.setLevel(Level.ALL); - try { - assertEquals(expectedInterval, - KeyVaultLoadStoreParameter.fromSystemProperties().getCertificatesRefreshInterval()); - assertEquals(1, records.size()); - LogRecord warning = records.get(0); - assertEquals(Level.WARNING, warning.getLevel()); - String message = MessageFormat.format(warning.getMessage(), warning.getParameters()); - assertTrue(message.contains(REMOVED_REFRESH_INTERVAL_PROPERTY)); - assertTrue(message.contains("removed and is ignored")); - assertTrue(message.contains(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL)); - assertTrue(message.contains("ISO-8601")); - assertTrue(message.contains("PT30S")); - assertFalse(message.contains("removed-property-value")); - } finally { - logger.removeHandler(collector); - logger.setLevel(originalLevel); - } + assertEquals(2000L, KeyVaultLoadStoreParameter.fromSystemProperties().getCertificatesRefreshIntervalInMs()); } @Test @@ -241,16 +129,13 @@ public void testCertificateAliasFilterPatternsAreDefensivelyCopied() { public void testFromSystemPropertiesCreatesSnapshot() { System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_URI, "https://first.vault.azure.net"); System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_DISABLE_AIA_DOWNLOAD, "true"); - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, "PT30S"); KeyVaultLoadStoreParameter parameter = KeyVaultLoadStoreParameter.fromSystemProperties(); System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_URI, "https://second.vault.azure.net"); System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_DISABLE_AIA_DOWNLOAD, "false"); - System.setProperty(KeyVaultJcaPropertyNames.KEYVAULT_JCA_CERTIFICATES_REFRESH_INTERVAL, "PT1S"); assertEquals("https://first.vault.azure.net", parameter.getUri()); assertTrue(parameter.isAiaDownloadDisabled()); - assertEquals(Duration.ofSeconds(30), parameter.getCertificatesRefreshInterval()); } } diff --git a/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/implementation/certificates/KeyVaultCertificatesTest.java b/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/implementation/certificates/KeyVaultCertificatesTest.java index 2db0965ca5d6..0b6198b54b57 100644 --- a/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/implementation/certificates/KeyVaultCertificatesTest.java +++ b/sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/implementation/certificates/KeyVaultCertificatesTest.java @@ -17,7 +17,6 @@ import java.lang.reflect.Field; import java.security.Key; import java.security.cert.Certificate; -import java.time.Duration; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; @@ -58,7 +57,7 @@ private KeyVaultCertificates createKeyVaultCertificates(KeyVaultClient client) { private KeyVaultCertificates createKeyVaultCertificates(KeyVaultClient client, Set filterPatterns) { KeyVaultLoadStoreParameter parameter - = new KeyVaultLoadStoreParameter(null).setCertificatesRefreshInterval(Duration.ofSeconds(60)) + = new KeyVaultLoadStoreParameter(null).setCertificatesRefreshIntervalInMs(60_000) .setCertificateAliasFilterPatterns(filterPatterns); return new KeyVaultCertificates(parameter, client); } @@ -229,7 +228,7 @@ public byte[] getEncoded() { }); keyVaultClient.stubCertificateForVersion(otherVersion, otherCertificate); KeyVaultLoadStoreParameter parameter - = new KeyVaultLoadStoreParameter(null).setCertificatesRefreshInterval(Duration.ofMillis(1)); + = new KeyVaultLoadStoreParameter(null).setCertificatesRefreshIntervalInMs(1); keyVaultCertificates = new KeyVaultCertificates(parameter, keyVaultClient); Assertions.assertEquals(matchingAlias, keyVaultCertificates.refreshAndGetAliasByCertificate(certificate)); diff --git a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java index 374df5aa02b3..111e05ecb8bf 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretClientTest.java @@ -15,6 +15,7 @@ import com.azure.security.keyvault.secrets.models.DeletedSecret; import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import com.azure.security.keyvault.secrets.models.SecretProperties; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -229,7 +230,8 @@ public void deleteSecret(HttpClient httpClient, SecretServiceVersion serviceVers public void deleteSecretNotFound(HttpClient httpClient, SecretServiceVersion serviceVersion) { createClient(httpClient, serviceVersion); - assertRestException(() -> secretClient.beginDeleteSecret("non-existing"), ResourceNotFoundException.class, 404); + assertRestException(() -> secretClient.beginDeleteSecret("non-existing"), ResourceNotFoundException.class, + HttpResponseStatus.NOT_FOUND.code()); } /** @@ -307,7 +309,7 @@ public void recoverDeletedSecretNotFound(HttpClient httpClient, SecretServiceVer createClient(httpClient, serviceVersion); assertRestException(() -> secretClient.beginRecoverDeletedSecret("non-existing"), - ResourceNotFoundException.class, 404); + ResourceNotFoundException.class, HttpResponseStatus.NOT_FOUND.code()); } /** diff --git a/sdk/keyvault/azure-security-test-keyvault-jca/pom.xml b/sdk/keyvault/azure-security-test-keyvault-jca/pom.xml index 8856f926ddc3..87d87b7ef1a9 100644 --- a/sdk/keyvault/azure-security-test-keyvault-jca/pom.xml +++ b/sdk/keyvault/azure-security-test-keyvault-jca/pom.xml @@ -25,7 +25,7 @@ com.azure azure-security-keyvault-jca - 2.14.0-beta.1 + 2.13.0-beta.1 diff --git a/sdk/logz/azure-resourcemanager-logz/CHANGELOG.md b/sdk/logz/azure-resourcemanager-logz/CHANGELOG.md new file mode 100644 index 000000000000..1818dc2c4c95 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/CHANGELOG.md @@ -0,0 +1,174 @@ +# Release History + +## 1.0.0-beta.5 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.4 (2025-02-14) + +- Please note, this package has been deprecated and will no longer be maintained after 01/01/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +### Other Changes + +- Please note, this package has been deprecated and will no longer be maintained after 01/01/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +## 1.0.0-beta.3 (2024-10-17) + +- Azure Resource Manager logz client library for Java. This package contains Microsoft Azure SDK for logz Management SDK. Package tag package-2020-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Features Added + +#### `models.FilteringTag` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.OperationListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.LogzSingleSignOnProperties` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.VMHostUpdateRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.MonitorProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.LogzMonitorResourceUpdateParameters` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.LogzMonitorResourceListResponse` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.MonitorUpdateProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.PlanData` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.MonitoredResourceListResponse` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.LogzSingleSignOnResourceListResponse` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.UserRoleRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.IdentityProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.OperationDisplay` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.UserInfo` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VMResourcesListResponse` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.MonitoringTagRulesListResponse` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.MonitoringTagRulesProperties` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.LogRules` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.LogzOrganizationProperties` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.UserRoleListResponse` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +## 1.0.0-beta.2 (2023-01-17) + +- Azure Resource Manager logz client library for Java. This package contains Microsoft Azure SDK for logz Management SDK. Package tag package-2020-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Changes + +* `models.MonitorsDeleteHeaders` was removed + +* `models.SubAccountsDeleteResponse` was removed + +* `models.MonitorsDeleteResponse` was removed + +* `models.SubAccountsDeleteHeaders` was removed + +#### `models.SubAccounts` was modified + +* `create(java.lang.String,java.lang.String,java.lang.String,fluent.models.LogzMonitorResourceInner)` was removed + +### Features Added + +#### `models.LogzMonitorResource` was modified + +* `resourceGroupName()` was added + +#### `models.LogzSingleSignOnResource` was modified + +* `resourceGroupName()` was added + +#### `LogzManager` was modified + +* `authenticate(com.azure.core.http.HttpPipeline,com.azure.core.management.profile.AzureProfile)` was added + +#### `models.MonitoringTagRules` was modified + +* `resourceGroupName()` was added + +#### `LogzManager$Configurable` was modified + +* `withRetryOptions(com.azure.core.http.policy.RetryOptions)` was added + +## 1.0.0-beta.1 (2021-10-08) + +- Azure Resource Manager logz client library for Java. This package contains Microsoft Azure SDK for logz Management SDK. Package tag package-2020-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/logz/azure-resourcemanager-logz/README.md b/sdk/logz/azure-resourcemanager-logz/README.md new file mode 100644 index 000000000000..e5c7ef2edaf1 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/README.md @@ -0,0 +1,104 @@ +# Azure Resource Manager logz client library for Java + +Please note, this package has been deprecated and will no longer be maintained after 01/01/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +Azure Resource Manager logz client library for Java. + +This package contains Microsoft Azure SDK for logz Management SDK. Package tag package-2020-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +## We'd love to hear your feedback + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-logz;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-logz + 1.0.0-beta.5 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. + +Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +LogzManager manager = LogzManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/logz/azure-resourcemanager-logz/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/logz/azure-resourcemanager-logz/SAMPLE.md b/sdk/logz/azure-resourcemanager-logz/SAMPLE.md new file mode 100644 index 000000000000..0cd55836b924 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/SAMPLE.md @@ -0,0 +1,796 @@ +# Code snippets and samples + + +## MonitorOperation + +- [ListVMHosts](#monitoroperation_listvmhosts) +- [ListVmHostUpdate](#monitoroperation_listvmhostupdate) +- [VMHostPayload](#monitoroperation_vmhostpayload) + +## Monitors + +- [Create](#monitors_create) +- [Delete](#monitors_delete) +- [GetByResourceGroup](#monitors_getbyresourcegroup) +- [List](#monitors_list) +- [ListByResourceGroup](#monitors_listbyresourcegroup) +- [ListMonitoredResources](#monitors_listmonitoredresources) +- [ListUserRoles](#monitors_listuserroles) +- [Update](#monitors_update) + +## Operations + +- [List](#operations_list) + +## SingleSignOn + +- [CreateOrUpdate](#singlesignon_createorupdate) +- [Get](#singlesignon_get) +- [List](#singlesignon_list) + +## SubAccount + +- [Create](#subaccount_create) +- [Delete](#subaccount_delete) +- [Get](#subaccount_get) +- [List](#subaccount_list) +- [ListMonitoredResources](#subaccount_listmonitoredresources) +- [ListVMHosts](#subaccount_listvmhosts) +- [ListVmHostUpdate](#subaccount_listvmhostupdate) +- [Update](#subaccount_update) +- [VMHostPayload](#subaccount_vmhostpayload) + +## SubAccountTagRules + +- [CreateOrUpdate](#subaccounttagrules_createorupdate) +- [Delete](#subaccounttagrules_delete) +- [Get](#subaccounttagrules_get) +- [List](#subaccounttagrules_list) + +## TagRules + +- [CreateOrUpdate](#tagrules_createorupdate) +- [Delete](#tagrules_delete) +- [Get](#tagrules_get) +- [List](#tagrules_list) +### MonitorOperation_ListVMHosts + +```java +/** + * Samples for MonitorOperation ListVMHosts. + */ +public final class MonitorOperationListVMHostsSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_List.json + */ + /** + * Sample code: MainAccount_VMHosts_List. + * + * @param manager Entry point to LogzManager. + */ + public static void mainAccountVMHostsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitorOperations().listVMHosts("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### MonitorOperation_ListVmHostUpdate + +```java + +/** + * Samples for MonitorOperation ListVmHostUpdate. + */ +public final class MonitorOperationListVmHostUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Update.json + */ + /** + * Sample code: MainAccount_VMHosts_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void mainAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitorOperations() + .listVmHostUpdate("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); + } +} +``` + +### MonitorOperation_VMHostPayload + +```java +/** + * Samples for MonitorOperation VMHostPayload. + */ +public final class MonitorOperationVMHostPayloadSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Payload.json + */ + /** + * Sample code: MainAccount_VMHosts_Payload. + * + * @param manager Entry point to LogzManager. + */ + public static void mainAccountVMHostsPayload(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitorOperations() + .vMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_Create + +```java +/** + * Samples for Monitors Create. + */ +public final class MonitorsCreateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Create.json + */ + /** + * Sample code: Monitors_Create. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsCreate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors() + .define("myMonitor") + .withRegion((String) null) + .withExistingResourceGroup("myResourceGroup") + .create(); + } +} +``` + +### Monitors_Delete + +```java +/** + * Samples for Monitors Delete. + */ +public final class MonitorsDeleteSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Delete.json + */ + /** + * Sample code: Monitors_Delete. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsDelete(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().delete("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_GetByResourceGroup + +```java +/** + * Samples for Monitors GetByResourceGroup. + */ +public final class MonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Get.json + */ + /** + * Sample code: Monitors_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_List + +```java +/** + * Samples for Monitors List. + */ +public final class MonitorsListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_List.json + */ + /** + * Sample code: Monitors_List. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_ListByResourceGroup + +```java +/** + * Samples for Monitors ListByResourceGroup. + */ +public final class MonitorsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_ListByResourceGroup.json + */ + /** + * Sample code: Monitors_ListByResourceGroup. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsListByResourceGroup(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_ListMonitoredResources + +```java +/** + * Samples for Monitors ListMonitoredResources. + */ +public final class MonitorsListMonitoredResourcesSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MonitoredResources_List.json + */ + /** + * Sample code: MonitoredResources_List. + * + * @param manager Entry point to LogzManager. + */ + public static void monitoredResourcesList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_ListUserRoles + +```java + +/** + * Samples for Monitors ListUserRoles. + */ +public final class MonitorsListUserRolesSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_listUserRoles.json + */ + /** + * Sample code: MainAccount_VMHosts_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void mainAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().listUserRoles("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_Update + +```java +import com.azure.resourcemanager.logz.models.LogzMonitorResource; + +/** + * Samples for Monitors Update. + */ +public final class MonitorsUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Update.json + */ + /** + * Sample code: Monitors_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + LogzMonitorResource resource = manager.monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to LogzManager. + */ + public static void operationsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### SingleSignOn_CreateOrUpdate + +```java +/** + * Samples for SingleSignOn CreateOrUpdate. + */ +public final class SingleSignOnCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/ + * SingleSignOnConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: SingleSignOnConfigurations_CreateOrUpdate. + * + * @param manager Entry point to LogzManager. + */ + public static void singleSignOnConfigurationsCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.singleSignOns().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); + } +} +``` + +### SingleSignOn_Get + +```java +/** + * Samples for SingleSignOn Get. + */ +public final class SingleSignOnGetSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_Get.json + */ + /** + * Sample code: SingleSignOnConfigurations_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void singleSignOnConfigurationsGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.singleSignOns() + .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### SingleSignOn_List + +```java +/** + * Samples for SingleSignOn List. + */ +public final class SingleSignOnListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_List. + * json + */ + /** + * Sample code: SingleSignOnConfigurations_List. + * + * @param manager Entry point to LogzManager. + */ + public static void singleSignOnConfigurationsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.singleSignOns().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccount_Create + +```java + +/** + * Samples for SubAccount Create. + */ +public final class SubAccountCreateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Create.json + */ + /** + * Sample code: subAccount_Create. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountCreate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .create("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccount_Delete + +```java +/** + * Samples for SubAccount Delete. + */ +public final class SubAccountDeleteSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Delete.json + */ + /** + * Sample code: SubAccount_Delete. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountDelete(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts().delete("myResourceGroup", "myMonitor", "someName", com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccount_Get + +```java +/** + * Samples for SubAccount Get. + */ +public final class SubAccountGetSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Get.json + */ + /** + * Sample code: SubAccount_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccount_List + +```java +/** + * Samples for SubAccount List. + */ +public final class SubAccountListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_ListByResourceGroup.json + */ + /** + * Sample code: SubAccount_List. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccount_ListMonitoredResources + +```java +/** + * Samples for SubAccount ListMonitoredResources. + */ +public final class SubAccountListMonitoredResourcesSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_MonitoredResources_List. + * json + */ + /** + * Sample code: SubAccount_MonitoredResources_List. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountMonitoredResourcesList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .listMonitoredResources("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccount_ListVMHosts + +```java +/** + * Samples for SubAccount ListVMHosts. + */ +public final class SubAccountListVMHostsSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_List.json + */ + /** + * Sample code: SubAccount_VMHosts_List. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountVMHostsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .listVMHosts("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccount_ListVmHostUpdate + +```java + +/** + * Samples for SubAccount ListVmHostUpdate. + */ +public final class SubAccountListVmHostUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Update.json + */ + /** + * Sample code: SubAccount_VMHosts_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .listVmHostUpdate("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccount_Update + +```java + +/** + * Samples for SubAccount Update. + */ +public final class SubAccountUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Update.json + */ + /** + * Sample code: SubAccount_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .updateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccount_VMHostPayload + +```java +/** + * Samples for SubAccount VMHostPayload. + */ +public final class SubAccountVMHostPayloadSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Payload.json + */ + /** + * Sample code: SubAccount_VMHosts_Payload. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountVMHostsPayload(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .vMHostPayloadWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccountTagRules_CreateOrUpdate + +```java + +/** + * Samples for SubAccountTagRules CreateOrUpdate. + */ +public final class SubAccountTagRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_CreateOrUpdate. + * json + */ + /** + * Sample code: SubAccountTagRules_CreateOrUpdate. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountTagRulesCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccountTagRules() + .createOrUpdateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccountTagRules_Delete + +```java +/** + * Samples for SubAccountTagRules Delete. + */ +public final class SubAccountTagRulesDeleteSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Delete.json + */ + /** + * Sample code: TagRules_Delete. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesDelete(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccountTagRules() + .deleteWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", + com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccountTagRules_Get + +```java +/** + * Samples for SubAccountTagRules Get. + */ +public final class SubAccountTagRulesGetSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Get.json + */ + /** + * Sample code: SubAccountTagRules_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountTagRulesGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccountTagRules() + .getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", + com.azure.core.util.Context.NONE); + } +} +``` + +### SubAccountTagRules_List + +```java +/** + * Samples for SubAccountTagRules List. + */ +public final class SubAccountTagRulesListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_List.json + */ + /** + * Sample code: SubAccountTagRules_List. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountTagRulesList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccountTagRules() + .list("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} +``` + +### TagRules_CreateOrUpdate + +```java +/** + * Samples for TagRules CreateOrUpdate. + */ +public final class TagRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_CreateOrUpdate.json + */ + /** + * Sample code: TagRules_CreateOrUpdate. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); + } +} +``` + +### TagRules_Delete + +```java +/** + * Samples for TagRules Delete. + */ +public final class TagRulesDeleteSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Delete.json + */ + /** + * Sample code: TagRules_Delete. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesDelete(com.azure.resourcemanager.logz.LogzManager manager) { + manager.tagRules() + .deleteWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### TagRules_Get + +```java +/** + * Samples for TagRules Get. + */ +public final class TagRulesGetSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Get.json + */ + /** + * Sample code: TagRules_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### TagRules_List + +```java +/** + * Samples for TagRules List. + */ +public final class TagRulesListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_List.json + */ + /** + * Sample code: TagRules_List. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.tagRules().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/logz/azure-resourcemanager-logz/pom.xml b/sdk/logz/azure-resourcemanager-logz/pom.xml new file mode 100644 index 000000000000..23c3be3dda63 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/pom.xml @@ -0,0 +1,75 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-logz + 1.0.0-beta.5 + jar + + Microsoft Azure SDK for logz Management + Please note, this package has been deprecated and will no longer be maintained after 01/01/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + true + false + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-management + 1.19.8 + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/LogzManager.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/LogzManager.java new file mode 100644 index 000000000000..8ad987d1c82d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/LogzManager.java @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.logz.fluent.MicrosoftLogz; +import com.azure.resourcemanager.logz.implementation.MicrosoftLogzBuilder; +import com.azure.resourcemanager.logz.implementation.MonitorOperationsImpl; +import com.azure.resourcemanager.logz.implementation.MonitorsImpl; +import com.azure.resourcemanager.logz.implementation.OperationsImpl; +import com.azure.resourcemanager.logz.implementation.SingleSignOnsImpl; +import com.azure.resourcemanager.logz.implementation.SubAccountTagRulesImpl; +import com.azure.resourcemanager.logz.implementation.SubAccountsImpl; +import com.azure.resourcemanager.logz.implementation.TagRulesImpl; +import com.azure.resourcemanager.logz.models.MonitorOperations; +import com.azure.resourcemanager.logz.models.Monitors; +import com.azure.resourcemanager.logz.models.Operations; +import com.azure.resourcemanager.logz.models.SingleSignOns; +import com.azure.resourcemanager.logz.models.SubAccountTagRules; +import com.azure.resourcemanager.logz.models.SubAccounts; +import com.azure.resourcemanager.logz.models.TagRules; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Entry point to LogzManager. + */ +public final class LogzManager { + private Monitors monitors; + + private Operations operations; + + private TagRules tagRules; + + private SingleSignOns singleSignOns; + + private SubAccounts subAccounts; + + private SubAccountTagRules subAccountTagRules; + + private MonitorOperations monitorOperations; + + private final MicrosoftLogz clientObject; + + private LogzManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = new MicrosoftLogzBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of logz service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the logz service API instance. + */ + public static LogzManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of logz service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the logz service API instance. + */ + public static LogzManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new LogzManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create LogzManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new LogzManager.Configurable(); + } + + /** + * The Configurable allowing configurations to be set. + */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + *

      + * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of logz service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the logz service API instance. + */ + public LogzManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder.append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.logz") + .append("/") + .append("1.0.0-beta.4"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder.append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new LogzManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of Monitors. It manages LogzMonitorResource. + * + * @return Resource collection API of Monitors. + */ + public Monitors monitors() { + if (this.monitors == null) { + this.monitors = new MonitorsImpl(clientObject.getMonitors(), this); + } + return monitors; + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of TagRules. It manages MonitoringTagRules. + * + * @return Resource collection API of TagRules. + */ + public TagRules tagRules() { + if (this.tagRules == null) { + this.tagRules = new TagRulesImpl(clientObject.getTagRules(), this); + } + return tagRules; + } + + /** + * Gets the resource collection API of SingleSignOns. It manages LogzSingleSignOnResource. + * + * @return Resource collection API of SingleSignOns. + */ + public SingleSignOns singleSignOns() { + if (this.singleSignOns == null) { + this.singleSignOns = new SingleSignOnsImpl(clientObject.getSingleSignOns(), this); + } + return singleSignOns; + } + + /** + * Gets the resource collection API of SubAccounts. + * + * @return Resource collection API of SubAccounts. + */ + public SubAccounts subAccounts() { + if (this.subAccounts == null) { + this.subAccounts = new SubAccountsImpl(clientObject.getSubAccounts(), this); + } + return subAccounts; + } + + /** + * Gets the resource collection API of SubAccountTagRules. + * + * @return Resource collection API of SubAccountTagRules. + */ + public SubAccountTagRules subAccountTagRules() { + if (this.subAccountTagRules == null) { + this.subAccountTagRules = new SubAccountTagRulesImpl(clientObject.getSubAccountTagRules(), this); + } + return subAccountTagRules; + } + + /** + * Gets the resource collection API of MonitorOperations. + * + * @return Resource collection API of MonitorOperations. + */ + public MonitorOperations monitorOperations() { + if (this.monitorOperations == null) { + this.monitorOperations = new MonitorOperationsImpl(clientObject.getMonitorOperations(), this); + } + return monitorOperations; + } + + /** + * Gets wrapped service client MicrosoftLogz providing direct access to the underlying auto-generated API + * implementation, based on Azure REST API. + * + * @return Wrapped service client MicrosoftLogz. + */ + public MicrosoftLogz serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MicrosoftLogz.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MicrosoftLogz.java new file mode 100644 index 000000000000..06ed7807d72f --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MicrosoftLogz.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for MicrosoftLogz class. + */ +public interface MicrosoftLogz { + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the MonitorsClient object to access its operations. + * + * @return the MonitorsClient object. + */ + MonitorsClient getMonitors(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the TagRulesClient object to access its operations. + * + * @return the TagRulesClient object. + */ + TagRulesClient getTagRules(); + + /** + * Gets the SingleSignOnsClient object to access its operations. + * + * @return the SingleSignOnsClient object. + */ + SingleSignOnsClient getSingleSignOns(); + + /** + * Gets the SubAccountsClient object to access its operations. + * + * @return the SubAccountsClient object. + */ + SubAccountsClient getSubAccounts(); + + /** + * Gets the SubAccountTagRulesClient object to access its operations. + * + * @return the SubAccountTagRulesClient object. + */ + SubAccountTagRulesClient getSubAccountTagRules(); + + /** + * Gets the MonitorOperationsClient object to access its operations. + * + * @return the MonitorOperationsClient object. + */ + MonitorOperationsClient getMonitorOperations(); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorOperationsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorOperationsClient.java new file mode 100644 index 000000000000..f6e7e637fbf9 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorOperationsClient.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; + +/** + * An instance of this class provides access to all the operations defined in MonitorOperationsClient. + */ +public interface MonitorOperationsClient { + /** + * Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + Context context); + + /** + * Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VMExtensionPayloadInner vMHostPayload(String resourceGroupName, String monitorName); + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName); + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + VMHostUpdateRequest body, Context context); + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVMHosts(String resourceGroupName, String monitorName); + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVMHosts(String resourceGroupName, String monitorName, Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorsClient.java new file mode 100644 index 000000000000..be1aa5bae1f3 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorsClient.java @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; +import com.azure.resourcemanager.logz.models.UserRoleRequest; + +/** + * An instance of this class provides access to all the operations defined in MonitorsClient. + */ +public interface MonitorsClient { + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + Context context); + + /** + * List all monitors under the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all monitors under the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get the properties of a specific monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, + Context context); + + /** + * Get the properties of a specific monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzMonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName); + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LogzMonitorResourceInner> beginCreate(String resourceGroupName, + String monitorName); + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LogzMonitorResourceInner> beginCreate(String resourceGroupName, + String monitorName, LogzMonitorResourceInner body, Context context); + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzMonitorResourceInner create(String resourceGroupName, String monitorName); + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzMonitorResourceInner create(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, + Context context); + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String monitorName, + LogzMonitorResourceUpdateParameters body, Context context); + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzMonitorResourceInner update(String resourceGroupName, String monitorName); + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName); + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, Context context); + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String monitorName); + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String monitorName, Context context); + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUserRoles(String resourceGroupName, String monitorName); + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUserRoles(String resourceGroupName, String monitorName, + UserRoleRequest body, Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/OperationsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/OperationsClient.java new file mode 100644 index 000000000000..c27392105fad --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/OperationsClient.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public interface OperationsClient { + /** + * List all operations provided by Microsoft.Logz. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all operations provided by Microsoft.Logz. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SingleSignOnsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SingleSignOnsClient.java new file mode 100644 index 000000000000..331052a9ce5e --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SingleSignOnsClient.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; + +/** + * An instance of this class provides access to all the operations defined in SingleSignOnsClient. + */ +public interface SingleSignOnsClient { + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String monitorName); + + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String monitorName, Context context); + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LogzSingleSignOnResourceInner> + beginCreateOrUpdate(String resourceGroupName, String monitorName, String configurationName); + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LogzSingleSignOnResourceInner> beginCreateOrUpdate( + String resourceGroupName, String monitorName, String configurationName, LogzSingleSignOnResourceInner body, + Context context); + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzSingleSignOnResourceInner createOrUpdate(String resourceGroupName, String monitorName, + String configurationName); + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzSingleSignOnResourceInner createOrUpdate(String resourceGroupName, String monitorName, String configurationName, + LogzSingleSignOnResourceInner body, Context context); + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String monitorName, + String configurationName, Context context); + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzSingleSignOnResourceInner get(String resourceGroupName, String monitorName, String configurationName); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountTagRulesClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountTagRulesClient.java new file mode 100644 index 000000000000..e87918a9a954 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountTagRulesClient.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.SubAccountTagRulesDeleteResponse; + +/** + * An instance of this class provides access to all the operations defined in SubAccountTagRulesClient. + */ +public interface SubAccountTagRulesClient { + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String monitorName, String subAccountName); + + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String monitorName, String subAccountName, + Context context); + + /** + * Create or update a tag rule set for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context); + + /** + * Create or update a tag rule set for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MonitoringTagRulesInner get(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SubAccountTagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String monitorName, String subAccountName, String ruleSetName); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountsClient.java new file mode 100644 index 000000000000..c4f4da464ad7 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountsClient.java @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; + +/** + * An instance of this class provides access to all the operations defined in SubAccountsClient. + */ +public interface SubAccountsClient { + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String monitorName); + + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String monitorName, Context context); + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LogzMonitorResourceInner> beginCreate(String resourceGroupName, + String monitorName, String subAccountName); + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LogzMonitorResourceInner> beginCreate(String resourceGroupName, + String monitorName, String subAccountName, LogzMonitorResourceInner body, Context context); + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzMonitorResourceInner create(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzMonitorResourceInner create(String resourceGroupName, String monitorName, String subAccountName, + LogzMonitorResourceInner body, Context context); + + /** + * Get a sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sub account under a given monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context); + + /** + * Get a sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sub account under a given monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzMonitorResourceInner get(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String subAccountName, + Context context); + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String monitorName, String subAccountName, Context context); + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceUpdateParameters body, Context context); + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogzMonitorResourceInner update(String resourceGroupName, String monitorName, String subAccountName); + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName); + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName, Context context); + + /** + * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context); + + /** + * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VMExtensionPayloadInner vMHostPayload(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName); + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body, Context context); + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName); + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName, + Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/TagRulesClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/TagRulesClient.java new file mode 100644 index 000000000000..ff07a320ea2c --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/TagRulesClient.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.TagRulesDeleteResponse; + +/** + * An instance of this class provides access to all the operations defined in TagRulesClient. + */ +public interface TagRulesClient { + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String monitorName); + + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String monitorName, Context context); + + /** + * Create or update a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, MonitoringTagRulesInner body, Context context); + + /** + * Create or update a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String monitorName, String ruleSetName); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MonitoringTagRulesInner get(String resourceGroupName, String monitorName, String ruleSetName); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String monitorName, String ruleSetName); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzMonitorResourceInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzMonitorResourceInner.java new file mode 100644 index 000000000000..91eb74ba742a --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzMonitorResourceInner.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.models.IdentityProperties; +import com.azure.resourcemanager.logz.models.MonitorProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The LogzMonitorResource model. + */ +@Fluent +public final class LogzMonitorResourceInner extends Resource { + /* + * The system metadata relating to this resource + */ + private SystemData systemData; + + /* + * Properties specific to the monitor resource. + */ + private MonitorProperties properties; + + /* + * The identity property. + */ + private IdentityProperties identity; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LogzMonitorResourceInner class. + */ + public LogzMonitorResourceInner() { + } + + /** + * Get the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: Properties specific to the monitor resource. + * + * @return the properties value. + */ + public MonitorProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties specific to the monitor resource. + * + * @param properties the properties value to set. + * @return the LogzMonitorResourceInner object itself. + */ + public LogzMonitorResourceInner withProperties(MonitorProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the identity property: The identity property. + * + * @return the identity value. + */ + public IdentityProperties identity() { + return this.identity; + } + + /** + * Set the identity property: The identity property. + * + * @param identity the identity value to set. + * @return the LogzMonitorResourceInner object itself. + */ + public LogzMonitorResourceInner withIdentity(IdentityProperties identity) { + this.identity = identity; + return this; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public LogzMonitorResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LogzMonitorResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogzMonitorResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogzMonitorResourceInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LogzMonitorResourceInner. + */ + public static LogzMonitorResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogzMonitorResourceInner deserializedLogzMonitorResourceInner = new LogzMonitorResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLogzMonitorResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLogzMonitorResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLogzMonitorResourceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedLogzMonitorResourceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedLogzMonitorResourceInner.withTags(tags); + } else if ("systemData".equals(fieldName)) { + deserializedLogzMonitorResourceInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedLogzMonitorResourceInner.properties = MonitorProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedLogzMonitorResourceInner.identity = IdentityProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLogzMonitorResourceInner; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzSingleSignOnResourceInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzSingleSignOnResourceInner.java new file mode 100644 index 000000000000..221ef1062b6f --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzSingleSignOnResourceInner.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; +import java.io.IOException; + +/** + * The LogzSingleSignOnResource model. + */ +@Fluent +public final class LogzSingleSignOnResourceInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + private SystemData systemData; + + /* + * The properties property. + */ + private LogzSingleSignOnProperties properties; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LogzSingleSignOnResourceInner class. + */ + public LogzSingleSignOnResourceInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public LogzSingleSignOnProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the LogzSingleSignOnResourceInner object itself. + */ + public LogzSingleSignOnResourceInner withProperties(LogzSingleSignOnProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogzSingleSignOnResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogzSingleSignOnResourceInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LogzSingleSignOnResourceInner. + */ + public static LogzSingleSignOnResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogzSingleSignOnResourceInner deserializedLogzSingleSignOnResourceInner + = new LogzSingleSignOnResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLogzSingleSignOnResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLogzSingleSignOnResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLogzSingleSignOnResourceInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedLogzSingleSignOnResourceInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedLogzSingleSignOnResourceInner.properties = LogzSingleSignOnProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLogzSingleSignOnResourceInner; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoredResourceInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoredResourceInner.java new file mode 100644 index 000000000000..f06f30ee3fb3 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoredResourceInner.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of a resource currently being monitored by the Logz monitor resource. + */ +@Fluent +public final class MonitoredResourceInner implements JsonSerializable { + /* + * The ARM id of the resource. + */ + private String id; + + /* + * Flag indicating if resource is sending metrics to Logz. + */ + private Boolean sendingMetrics; + + /* + * Reason for why the resource is sending metrics (or why it is not sending). + */ + private String reasonForMetricsStatus; + + /* + * Flag indicating if resource is sending logs to Logz. + */ + private Boolean sendingLogs; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + private SystemData systemData; + + /* + * Reason for why the resource is sending logs (or why it is not sending). + */ + private String reasonForLogsStatus; + + /** + * Creates an instance of MonitoredResourceInner class. + */ + public MonitoredResourceInner() { + } + + /** + * Get the id property: The ARM id of the resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The ARM id of the resource. + * + * @param id the id value to set. + * @return the MonitoredResourceInner object itself. + */ + public MonitoredResourceInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the sendingMetrics property: Flag indicating if resource is sending metrics to Logz. + * + * @return the sendingMetrics value. + */ + public Boolean sendingMetrics() { + return this.sendingMetrics; + } + + /** + * Set the sendingMetrics property: Flag indicating if resource is sending metrics to Logz. + * + * @param sendingMetrics the sendingMetrics value to set. + * @return the MonitoredResourceInner object itself. + */ + public MonitoredResourceInner withSendingMetrics(Boolean sendingMetrics) { + this.sendingMetrics = sendingMetrics; + return this; + } + + /** + * Get the reasonForMetricsStatus property: Reason for why the resource is sending metrics (or why it is not + * sending). + * + * @return the reasonForMetricsStatus value. + */ + public String reasonForMetricsStatus() { + return this.reasonForMetricsStatus; + } + + /** + * Set the reasonForMetricsStatus property: Reason for why the resource is sending metrics (or why it is not + * sending). + * + * @param reasonForMetricsStatus the reasonForMetricsStatus value to set. + * @return the MonitoredResourceInner object itself. + */ + public MonitoredResourceInner withReasonForMetricsStatus(String reasonForMetricsStatus) { + this.reasonForMetricsStatus = reasonForMetricsStatus; + return this; + } + + /** + * Get the sendingLogs property: Flag indicating if resource is sending logs to Logz. + * + * @return the sendingLogs value. + */ + public Boolean sendingLogs() { + return this.sendingLogs; + } + + /** + * Set the sendingLogs property: Flag indicating if resource is sending logs to Logz. + * + * @param sendingLogs the sendingLogs value to set. + * @return the MonitoredResourceInner object itself. + */ + public MonitoredResourceInner withSendingLogs(Boolean sendingLogs) { + this.sendingLogs = sendingLogs; + return this; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the reasonForLogsStatus property: Reason for why the resource is sending logs (or why it is not sending). + * + * @return the reasonForLogsStatus value. + */ + public String reasonForLogsStatus() { + return this.reasonForLogsStatus; + } + + /** + * Set the reasonForLogsStatus property: Reason for why the resource is sending logs (or why it is not sending). + * + * @param reasonForLogsStatus the reasonForLogsStatus value to set. + * @return the MonitoredResourceInner object itself. + */ + public MonitoredResourceInner withReasonForLogsStatus(String reasonForLogsStatus) { + this.reasonForLogsStatus = reasonForLogsStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeBooleanField("sendingMetrics", this.sendingMetrics); + jsonWriter.writeStringField("reasonForMetricsStatus", this.reasonForMetricsStatus); + jsonWriter.writeBooleanField("sendingLogs", this.sendingLogs); + jsonWriter.writeStringField("reasonForLogsStatus", this.reasonForLogsStatus); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitoredResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitoredResourceInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitoredResourceInner. + */ + public static MonitoredResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitoredResourceInner deserializedMonitoredResourceInner = new MonitoredResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMonitoredResourceInner.id = reader.getString(); + } else if ("sendingMetrics".equals(fieldName)) { + deserializedMonitoredResourceInner.sendingMetrics = reader.getNullable(JsonReader::getBoolean); + } else if ("reasonForMetricsStatus".equals(fieldName)) { + deserializedMonitoredResourceInner.reasonForMetricsStatus = reader.getString(); + } else if ("sendingLogs".equals(fieldName)) { + deserializedMonitoredResourceInner.sendingLogs = reader.getNullable(JsonReader::getBoolean); + } else if ("systemData".equals(fieldName)) { + deserializedMonitoredResourceInner.systemData = SystemData.fromJson(reader); + } else if ("reasonForLogsStatus".equals(fieldName)) { + deserializedMonitoredResourceInner.reasonForLogsStatus = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitoredResourceInner; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoringTagRulesInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoringTagRulesInner.java new file mode 100644 index 000000000000..305311e60985 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoringTagRulesInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; +import java.io.IOException; + +/** + * Capture logs and metrics of Azure resources based on ARM tags. + */ +@Fluent +public final class MonitoringTagRulesInner extends ProxyResource { + /* + * The system metadata relating to this resource + */ + private SystemData systemData; + + /* + * Definition of the properties for a TagRules resource. + */ + private MonitoringTagRulesProperties properties; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MonitoringTagRulesInner class. + */ + public MonitoringTagRulesInner() { + } + + /** + * Get the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the properties property: Definition of the properties for a TagRules resource. + * + * @return the properties value. + */ + public MonitoringTagRulesProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Definition of the properties for a TagRules resource. + * + * @param properties the properties value to set. + * @return the MonitoringTagRulesInner object itself. + */ + public MonitoringTagRulesInner withProperties(MonitoringTagRulesProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitoringTagRulesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitoringTagRulesInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MonitoringTagRulesInner. + */ + public static MonitoringTagRulesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitoringTagRulesInner deserializedMonitoringTagRulesInner = new MonitoringTagRulesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMonitoringTagRulesInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMonitoringTagRulesInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMonitoringTagRulesInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedMonitoringTagRulesInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedMonitoringTagRulesInner.properties = MonitoringTagRulesProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitoringTagRulesInner; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/OperationResultInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/OperationResultInner.java new file mode 100644 index 000000000000..82943f05bf56 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/OperationResultInner.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.models.OperationDisplay; +import java.io.IOException; + +/** + * A Microsoft.Logz REST API operation. + */ +@Fluent +public final class OperationResultInner implements JsonSerializable { + /* + * Operation name, i.e., {provider}/{resource}/{operation}. + */ + private String name; + + /* + * Indicates whether the operation is a data action + */ + private Boolean isDataAction; + + /* + * The object that represents the operation. + */ + private OperationDisplay display; + + /* + * Origin of the operation + */ + private String origin; + + /** + * Creates an instance of OperationResultInner class. + */ + public OperationResultInner() { + } + + /** + * Get the name property: Operation name, i.e., {provider}/{resource}/{operation}. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Operation name, i.e., {provider}/{resource}/{operation}. + * + * @param name the name value to set. + * @return the OperationResultInner object itself. + */ + public OperationResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the isDataAction property: Indicates whether the operation is a data action. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set the isDataAction property: Indicates whether the operation is a data action. + * + * @param isDataAction the isDataAction value to set. + * @return the OperationResultInner object itself. + */ + public OperationResultInner withIsDataAction(Boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + + /** + * Get the display property: The object that represents the operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: The object that represents the operation. + * + * @param display the display value to set. + * @return the OperationResultInner object itself. + */ + public OperationResultInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: Origin of the operation. + * + * @return the origin value. + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin property: Origin of the operation. + * + * @param origin the origin value to set. + * @return the OperationResultInner object itself. + */ + public OperationResultInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeBooleanField("isDataAction", this.isDataAction); + jsonWriter.writeJsonField("display", this.display); + jsonWriter.writeStringField("origin", this.origin); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationResultInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationResultInner. + */ + public static OperationResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationResultInner deserializedOperationResultInner = new OperationResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationResultInner.name = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedOperationResultInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("display".equals(fieldName)) { + deserializedOperationResultInner.display = OperationDisplay.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationResultInner.origin = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationResultInner; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/UserRoleResponseInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/UserRoleResponseInner.java new file mode 100644 index 000000000000..d5748f1c342d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/UserRoleResponseInner.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.models.UserRole; +import java.io.IOException; + +/** + * Response for checking user's role for Logz.io account. + */ +@Fluent +public final class UserRoleResponseInner implements JsonSerializable { + /* + * User roles on configured in Logz.io account. + */ + private UserRole role; + + /** + * Creates an instance of UserRoleResponseInner class. + */ + public UserRoleResponseInner() { + } + + /** + * Get the role property: User roles on configured in Logz.io account. + * + * @return the role value. + */ + public UserRole role() { + return this.role; + } + + /** + * Set the role property: User roles on configured in Logz.io account. + * + * @param role the role value to set. + * @return the UserRoleResponseInner object itself. + */ + public UserRoleResponseInner withRole(UserRole role) { + this.role = role; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("role", this.role == null ? null : this.role.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserRoleResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserRoleResponseInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserRoleResponseInner. + */ + public static UserRoleResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserRoleResponseInner deserializedUserRoleResponseInner = new UserRoleResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("role".equals(fieldName)) { + deserializedUserRoleResponseInner.role = UserRole.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUserRoleResponseInner; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMExtensionPayloadInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMExtensionPayloadInner.java new file mode 100644 index 000000000000..4a9702e97ff8 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMExtensionPayloadInner.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Response of payload to be passed while installing VM agent. + */ +@Fluent +public final class VMExtensionPayloadInner implements JsonSerializable { + /* + * API Key corresponding to the resource. + */ + private String apiKey; + + /* + * Logz.io region where the resource has been created. + */ + private String region; + + /** + * Creates an instance of VMExtensionPayloadInner class. + */ + public VMExtensionPayloadInner() { + } + + /** + * Get the apiKey property: API Key corresponding to the resource. + * + * @return the apiKey value. + */ + public String apiKey() { + return this.apiKey; + } + + /** + * Set the apiKey property: API Key corresponding to the resource. + * + * @param apiKey the apiKey value to set. + * @return the VMExtensionPayloadInner object itself. + */ + public VMExtensionPayloadInner withApiKey(String apiKey) { + this.apiKey = apiKey; + return this; + } + + /** + * Get the region property: Logz.io region where the resource has been created. + * + * @return the region value. + */ + public String region() { + return this.region; + } + + /** + * Set the region property: Logz.io region where the resource has been created. + * + * @param region the region value to set. + * @return the VMExtensionPayloadInner object itself. + */ + public VMExtensionPayloadInner withRegion(String region) { + this.region = region; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("apiKey", this.apiKey); + jsonWriter.writeStringField("region", this.region); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMExtensionPayloadInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMExtensionPayloadInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VMExtensionPayloadInner. + */ + public static VMExtensionPayloadInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMExtensionPayloadInner deserializedVMExtensionPayloadInner = new VMExtensionPayloadInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("apiKey".equals(fieldName)) { + deserializedVMExtensionPayloadInner.apiKey = reader.getString(); + } else if ("region".equals(fieldName)) { + deserializedVMExtensionPayloadInner.region = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVMExtensionPayloadInner; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMResourcesInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMResourcesInner.java new file mode 100644 index 000000000000..ecc7fceb8286 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMResourcesInner.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * VM Resource Ids. + */ +@Fluent +public final class VMResourcesInner implements JsonSerializable { + /* + * Request of a list vm host update operation. + */ + private String id; + + /* + * Version of the Logz agent installed on the VM. + */ + private String agentVersion; + + /** + * Creates an instance of VMResourcesInner class. + */ + public VMResourcesInner() { + } + + /** + * Get the id property: Request of a list vm host update operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Request of a list vm host update operation. + * + * @param id the id value to set. + * @return the VMResourcesInner object itself. + */ + public VMResourcesInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the agentVersion property: Version of the Logz agent installed on the VM. + * + * @return the agentVersion value. + */ + public String agentVersion() { + return this.agentVersion; + } + + /** + * Set the agentVersion property: Version of the Logz agent installed on the VM. + * + * @param agentVersion the agentVersion value to set. + * @return the VMResourcesInner object itself. + */ + public VMResourcesInner withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("agentVersion", this.agentVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMResourcesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMResourcesInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VMResourcesInner. + */ + public static VMResourcesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMResourcesInner deserializedVMResourcesInner = new VMResourcesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVMResourcesInner.id = reader.getString(); + } else if ("agentVersion".equals(fieldName)) { + deserializedVMResourcesInner.agentVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVMResourcesInner; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/package-info.java new file mode 100644 index 000000000000..d3e1ac5930d2 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the inner data models for MicrosoftLogz. + * null. + */ +package com.azure.resourcemanager.logz.fluent.models; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/package-info.java new file mode 100644 index 000000000000..06ec5aa8ae87 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the service clients for MicrosoftLogz. + * null. + */ +package com.azure.resourcemanager.logz.fluent; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzMonitorResourceImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzMonitorResourceImpl.java new file mode 100644 index 000000000000..118496a7ab21 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzMonitorResourceImpl.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.models.IdentityProperties; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; +import com.azure.resourcemanager.logz.models.MonitorProperties; +import com.azure.resourcemanager.logz.models.MonitorUpdateProperties; +import com.azure.resourcemanager.logz.models.MonitoredResource; +import com.azure.resourcemanager.logz.models.UserRoleRequest; +import com.azure.resourcemanager.logz.models.UserRoleResponse; +import java.util.Collections; +import java.util.Map; + +public final class LogzMonitorResourceImpl + implements LogzMonitorResource, LogzMonitorResource.Definition, LogzMonitorResource.Update { + private LogzMonitorResourceInner innerObject; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MonitorProperties properties() { + return this.innerModel().properties(); + } + + public IdentityProperties identity() { + return this.innerModel().identity(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public LogzMonitorResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String monitorName; + + private LogzMonitorResourceUpdateParameters updateBody; + + public LogzMonitorResourceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public LogzMonitorResource create() { + this.innerObject = serviceManager.serviceClient() + .getMonitors() + .create(resourceGroupName, monitorName, this.innerModel(), Context.NONE); + return this; + } + + public LogzMonitorResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMonitors() + .create(resourceGroupName, monitorName, this.innerModel(), context); + return this; + } + + LogzMonitorResourceImpl(String name, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = new LogzMonitorResourceInner(); + this.serviceManager = serviceManager; + this.monitorName = name; + } + + public LogzMonitorResourceImpl update() { + this.updateBody = new LogzMonitorResourceUpdateParameters(); + return this; + } + + public LogzMonitorResource apply() { + this.innerObject = serviceManager.serviceClient() + .getMonitors() + .updateWithResponse(resourceGroupName, monitorName, updateBody, Context.NONE) + .getValue(); + return this; + } + + public LogzMonitorResource apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMonitors() + .updateWithResponse(resourceGroupName, monitorName, updateBody, context) + .getValue(); + return this; + } + + LogzMonitorResourceImpl(LogzMonitorResourceInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.monitorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "monitors"); + } + + public LogzMonitorResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getMonitors() + .getByResourceGroupWithResponse(resourceGroupName, monitorName, Context.NONE) + .getValue(); + return this; + } + + public LogzMonitorResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMonitors() + .getByResourceGroupWithResponse(resourceGroupName, monitorName, context) + .getValue(); + return this; + } + + public PagedIterable listMonitoredResources() { + return serviceManager.monitors().listMonitoredResources(resourceGroupName, monitorName); + } + + public PagedIterable listMonitoredResources(Context context) { + return serviceManager.monitors().listMonitoredResources(resourceGroupName, monitorName, context); + } + + public PagedIterable listUserRoles() { + return serviceManager.monitors().listUserRoles(resourceGroupName, monitorName); + } + + public PagedIterable listUserRoles(UserRoleRequest body, Context context) { + return serviceManager.monitors().listUserRoles(resourceGroupName, monitorName, body, context); + } + + public LogzMonitorResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public LogzMonitorResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public LogzMonitorResourceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public LogzMonitorResourceImpl withProperties(MonitorProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public LogzMonitorResourceImpl withIdentity(IdentityProperties identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public LogzMonitorResourceImpl withProperties(MonitorUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzSingleSignOnResourceImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzSingleSignOnResourceImpl.java new file mode 100644 index 000000000000..d5441d67a44c --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzSingleSignOnResourceImpl.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnResource; + +public final class LogzSingleSignOnResourceImpl + implements LogzSingleSignOnResource, LogzSingleSignOnResource.Definition, LogzSingleSignOnResource.Update { + private LogzSingleSignOnResourceInner innerObject; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public LogzSingleSignOnProperties properties() { + return this.innerModel().properties(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public LogzSingleSignOnResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String monitorName; + + private String configurationName; + + public LogzSingleSignOnResourceImpl withExistingMonitor(String resourceGroupName, String monitorName) { + this.resourceGroupName = resourceGroupName; + this.monitorName = monitorName; + return this; + } + + public LogzSingleSignOnResource create() { + this.innerObject = serviceManager.serviceClient() + .getSingleSignOns() + .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE); + return this; + } + + public LogzSingleSignOnResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSingleSignOns() + .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context); + return this; + } + + LogzSingleSignOnResourceImpl(String name, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = new LogzSingleSignOnResourceInner(); + this.serviceManager = serviceManager; + this.configurationName = name; + } + + public LogzSingleSignOnResourceImpl update() { + return this; + } + + public LogzSingleSignOnResource apply() { + this.innerObject = serviceManager.serviceClient() + .getSingleSignOns() + .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE); + return this; + } + + public LogzSingleSignOnResource apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSingleSignOns() + .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context); + return this; + } + + LogzSingleSignOnResourceImpl(LogzSingleSignOnResourceInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.monitorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "monitors"); + this.configurationName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "singleSignOnConfigurations"); + } + + public LogzSingleSignOnResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getSingleSignOns() + .getWithResponse(resourceGroupName, monitorName, configurationName, Context.NONE) + .getValue(); + return this; + } + + public LogzSingleSignOnResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSingleSignOns() + .getWithResponse(resourceGroupName, monitorName, configurationName, context) + .getValue(); + return this; + } + + public LogzSingleSignOnResourceImpl withProperties(LogzSingleSignOnProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzBuilder.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzBuilder.java new file mode 100644 index 000000000000..5b81dda7769a --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzBuilder.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the MicrosoftLogzImpl type. + */ +@ServiceClientBuilder(serviceClients = { MicrosoftLogzImpl.class }) +public final class MicrosoftLogzBuilder { + /* + * The ID of the target subscription. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the MicrosoftLogzBuilder. + */ + public MicrosoftLogzBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the MicrosoftLogzBuilder. + */ + public MicrosoftLogzBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the MicrosoftLogzBuilder. + */ + public MicrosoftLogzBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the MicrosoftLogzBuilder. + */ + public MicrosoftLogzBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the MicrosoftLogzBuilder. + */ + public MicrosoftLogzBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the MicrosoftLogzBuilder. + */ + public MicrosoftLogzBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of MicrosoftLogzImpl with the provided parameters. + * + * @return an instance of MicrosoftLogzImpl. + */ + public MicrosoftLogzImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + MicrosoftLogzImpl client = new MicrosoftLogzImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + return client; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzImpl.java new file mode 100644 index 000000000000..a618c3b612cf --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzImpl.java @@ -0,0 +1,384 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.logz.fluent.MicrosoftLogz; +import com.azure.resourcemanager.logz.fluent.MonitorOperationsClient; +import com.azure.resourcemanager.logz.fluent.MonitorsClient; +import com.azure.resourcemanager.logz.fluent.OperationsClient; +import com.azure.resourcemanager.logz.fluent.SingleSignOnsClient; +import com.azure.resourcemanager.logz.fluent.SubAccountTagRulesClient; +import com.azure.resourcemanager.logz.fluent.SubAccountsClient; +import com.azure.resourcemanager.logz.fluent.TagRulesClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the MicrosoftLogzImpl type. + */ +@ServiceClient(builder = MicrosoftLogzBuilder.class) +public final class MicrosoftLogzImpl implements MicrosoftLogz { + /** + * The ID of the target subscription. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * server parameter. + */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The default poll interval for long-running operation. + */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** + * The MonitorsClient object to access its operations. + */ + private final MonitorsClient monitors; + + /** + * Gets the MonitorsClient object to access its operations. + * + * @return the MonitorsClient object. + */ + public MonitorsClient getMonitors() { + return this.monitors; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The TagRulesClient object to access its operations. + */ + private final TagRulesClient tagRules; + + /** + * Gets the TagRulesClient object to access its operations. + * + * @return the TagRulesClient object. + */ + public TagRulesClient getTagRules() { + return this.tagRules; + } + + /** + * The SingleSignOnsClient object to access its operations. + */ + private final SingleSignOnsClient singleSignOns; + + /** + * Gets the SingleSignOnsClient object to access its operations. + * + * @return the SingleSignOnsClient object. + */ + public SingleSignOnsClient getSingleSignOns() { + return this.singleSignOns; + } + + /** + * The SubAccountsClient object to access its operations. + */ + private final SubAccountsClient subAccounts; + + /** + * Gets the SubAccountsClient object to access its operations. + * + * @return the SubAccountsClient object. + */ + public SubAccountsClient getSubAccounts() { + return this.subAccounts; + } + + /** + * The SubAccountTagRulesClient object to access its operations. + */ + private final SubAccountTagRulesClient subAccountTagRules; + + /** + * Gets the SubAccountTagRulesClient object to access its operations. + * + * @return the SubAccountTagRulesClient object. + */ + public SubAccountTagRulesClient getSubAccountTagRules() { + return this.subAccountTagRules; + } + + /** + * The MonitorOperationsClient object to access its operations. + */ + private final MonitorOperationsClient monitorOperations; + + /** + * Gets the MonitorOperationsClient object to access its operations. + * + * @return the MonitorOperationsClient object. + */ + public MonitorOperationsClient getMonitorOperations() { + return this.monitorOperations; + } + + /** + * Initializes an instance of MicrosoftLogz client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The ID of the target subscription. + * @param endpoint server parameter. + */ + MicrosoftLogzImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AzureEnvironment environment, String subscriptionId, String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2020-10-01"; + this.monitors = new MonitorsClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.tagRules = new TagRulesClientImpl(this); + this.singleSignOns = new SingleSignOnsClientImpl(this); + this.subAccounts = new SubAccountsClientImpl(this); + this.subAccountTagRules = new SubAccountTagRulesClientImpl(this); + this.monitorOperations = new MonitorOperationsClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(HttpHeaderName.fromString(s)); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MicrosoftLogzImpl.class); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsClientImpl.java new file mode 100644 index 000000000000..171a76b92c90 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsClientImpl.java @@ -0,0 +1,657 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.logz.fluent.MonitorOperationsClient; +import com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; +import com.azure.resourcemanager.logz.models.VMResourcesListResponse; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MonitorOperationsClient. + */ +public final class MonitorOperationsClientImpl implements MonitorOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MonitorOperationsService service; + + /** + * The service client containing this operation class. + */ + private final MicrosoftLogzImpl client; + + /** + * Initializes an instance of MonitorOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MonitorOperationsClientImpl(MicrosoftLogzImpl client) { + this.service + = RestProxy.create(MonitorOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftLogzMonitorOperations to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftLogzMonitor") + public interface MonitorOperationsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/vmHostPayload") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> vMHostPayload(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/vmHostUpdate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVmHostUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") VMHostUpdateRequest body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/listVMHosts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVMHosts(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVmHostUpdateNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVMHostsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> vMHostPayloadWithResponseAsync(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.vMHostPayload(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> vMHostPayloadWithResponseAsync(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.vMHostPayload(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), accept, context); + } + + /** + * Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono vMHostPayloadAsync(String resourceGroupName, String monitorName) { + return vMHostPayloadWithResponseAsync(resourceGroupName, monitorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + Context context) { + return vMHostPayloadWithResponseAsync(resourceGroupName, monitorName, context).block(); + } + + /** + * Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VMExtensionPayloadInner vMHostPayload(String resourceGroupName, String monitorName) { + return vMHostPayloadWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVmHostUpdateSinglePageAsync(String resourceGroupName, + String monitorName, VMHostUpdateRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVmHostUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), body, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVmHostUpdateSinglePageAsync(String resourceGroupName, + String monitorName, VMHostUpdateRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listVmHostUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), body, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + VMHostUpdateRequest body) { + return new PagedFlux<>(() -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, body), + nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName) { + final VMHostUpdateRequest body = null; + return new PagedFlux<>(() -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, body), + nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + VMHostUpdateRequest body, Context context) { + return new PagedFlux<>(() -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, body, context), + nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink, context)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName) { + final VMHostUpdateRequest body = null; + return new PagedIterable<>(listVmHostUpdateAsync(resourceGroupName, monitorName, body)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + VMHostUpdateRequest body, Context context) { + return new PagedIterable<>(listVmHostUpdateAsync(resourceGroupName, monitorName, body, context)); + } + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMHostsSinglePageAsync(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVMHosts(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMHostsSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listVMHosts(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVMHostsAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listVMHostsSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listVMHostsNextSinglePageAsync(nextLink)); + } + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVMHostsAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listVMHostsSinglePageAsync(resourceGroupName, monitorName, context), + nextLink -> listVMHostsNextSinglePageAsync(nextLink, context)); + } + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVMHosts(String resourceGroupName, String monitorName) { + return new PagedIterable<>(listVMHostsAsync(resourceGroupName, monitorName)); + } + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVMHosts(String resourceGroupName, String monitorName, Context context) { + return new PagedIterable<>(listVMHostsAsync(resourceGroupName, monitorName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVmHostUpdateNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVmHostUpdateNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMHostsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMHostsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsImpl.java new file mode 100644 index 000000000000..53d4b7b9c32d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsImpl.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.logz.fluent.MonitorOperationsClient; +import com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.MonitorOperations; +import com.azure.resourcemanager.logz.models.VMExtensionPayload; +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; +import com.azure.resourcemanager.logz.models.VMResources; + +public final class MonitorOperationsImpl implements MonitorOperations { + private static final ClientLogger LOGGER = new ClientLogger(MonitorOperationsImpl.class); + + private final MonitorOperationsClient innerClient; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public MonitorOperationsImpl(MonitorOperationsClient innerClient, + com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + Context context) { + Response inner + = this.serviceClient().vMHostPayloadWithResponse(resourceGroupName, monitorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VMExtensionPayloadImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VMExtensionPayload vMHostPayload(String resourceGroupName, String monitorName) { + VMExtensionPayloadInner inner = this.serviceClient().vMHostPayload(resourceGroupName, monitorName); + if (inner != null) { + return new VMExtensionPayloadImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName) { + PagedIterable inner = this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); + } + + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + VMHostUpdateRequest body, Context context) { + PagedIterable inner + = this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName, body, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); + } + + public PagedIterable listVMHosts(String resourceGroupName, String monitorName) { + PagedIterable inner = this.serviceClient().listVMHosts(resourceGroupName, monitorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); + } + + public PagedIterable listVMHosts(String resourceGroupName, String monitorName, Context context) { + PagedIterable inner + = this.serviceClient().listVMHosts(resourceGroupName, monitorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); + } + + private MonitorOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoredResourceImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoredResourceImpl.java new file mode 100644 index 000000000000..04cc9cf746fa --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoredResourceImpl.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import com.azure.resourcemanager.logz.models.MonitoredResource; + +public final class MonitoredResourceImpl implements MonitoredResource { + private MonitoredResourceInner innerObject; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + MonitoredResourceImpl(MonitoredResourceInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public Boolean sendingMetrics() { + return this.innerModel().sendingMetrics(); + } + + public String reasonForMetricsStatus() { + return this.innerModel().reasonForMetricsStatus(); + } + + public Boolean sendingLogs() { + return this.innerModel().sendingLogs(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String reasonForLogsStatus() { + return this.innerModel().reasonForLogsStatus(); + } + + public MonitoredResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoringTagRulesImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoringTagRulesImpl.java new file mode 100644 index 000000000000..121612902345 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoringTagRulesImpl.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.MonitoringTagRules; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; + +public final class MonitoringTagRulesImpl + implements MonitoringTagRules, MonitoringTagRules.Definition, MonitoringTagRules.Update { + private MonitoringTagRulesInner innerObject; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MonitoringTagRulesProperties properties() { + return this.innerModel().properties(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public MonitoringTagRulesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String monitorName; + + private String ruleSetName; + + public MonitoringTagRulesImpl withExistingMonitor(String resourceGroupName, String monitorName) { + this.resourceGroupName = resourceGroupName; + this.monitorName = monitorName; + return this; + } + + public MonitoringTagRules create() { + this.innerObject = serviceManager.serviceClient() + .getTagRules() + .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public MonitoringTagRules create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getTagRules() + .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), context) + .getValue(); + return this; + } + + MonitoringTagRulesImpl(String name, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = new MonitoringTagRulesInner(); + this.serviceManager = serviceManager; + this.ruleSetName = name; + } + + public MonitoringTagRulesImpl update() { + return this; + } + + public MonitoringTagRules apply() { + this.innerObject = serviceManager.serviceClient() + .getTagRules() + .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public MonitoringTagRules apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getTagRules() + .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), context) + .getValue(); + return this; + } + + MonitoringTagRulesImpl(MonitoringTagRulesInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.monitorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "monitors"); + this.ruleSetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "tagRules"); + } + + public MonitoringTagRules refresh() { + this.innerObject = serviceManager.serviceClient() + .getTagRules() + .getWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE) + .getValue(); + return this; + } + + public MonitoringTagRules refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getTagRules() + .getWithResponse(resourceGroupName, monitorName, ruleSetName, context) + .getValue(); + return this; + } + + public MonitoringTagRulesImpl withProperties(MonitoringTagRulesProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsClientImpl.java new file mode 100644 index 000000000000..5d8c302502c3 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsClientImpl.java @@ -0,0 +1,1665 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.logz.fluent.MonitorsClient; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceListResponse; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; +import com.azure.resourcemanager.logz.models.MonitoredResourceListResponse; +import com.azure.resourcemanager.logz.models.UserRoleListResponse; +import com.azure.resourcemanager.logz.models.UserRoleRequest; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MonitorsClient. + */ +public final class MonitorsClientImpl implements MonitorsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MonitorsService service; + + /** + * The service client containing this operation class. + */ + private final MicrosoftLogzImpl client; + + /** + * Initializes an instance of MonitorsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MonitorsClientImpl(MicrosoftLogzImpl client) { + this.service = RestProxy.create(MonitorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftLogzMonitors to be used by the proxy service to perform REST + * calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftLogzMonitor") + public interface MonitorsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/listMonitoredResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMonitoredResources(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Logz/monitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") LogzMonitorResourceInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LogzMonitorResourceUpdateParameters body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/listUserRoles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listUserRoles(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") UserRoleRequest body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMonitoredResourcesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listUserRolesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMonitoredResources(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMonitoredResources(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, + String monitorName) { + return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink)); + } + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName, context), + nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink, context)); + } + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { + return new PagedIterable<>(listMonitoredResourcesAsync(resourceGroupName, monitorName)); + } + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + Context context) { + return new PagedIterable<>(listMonitoredResourcesAsync(resourceGroupName, monitorName, context)); + } + + /** + * List all monitors under the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all monitors under the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all monitors under the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all monitors under the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List all monitors under the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List all monitors under the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get the properties of a specific monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the properties of a specific monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the properties of a specific monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String monitorName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the properties of a specific monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String monitorName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName, context).block(); + } + + /** + * Get the properties of a specific monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzMonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName) { + return getByResourceGroupWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName, + LogzMonitorResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName, + LogzMonitorResourceInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LogzMonitorResourceInner> + beginCreateAsync(String resourceGroupName, String monitorName, LogzMonitorResourceInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, monitorName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, + this.client.getContext()); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LogzMonitorResourceInner> + beginCreateAsync(String resourceGroupName, String monitorName) { + final LogzMonitorResourceInner body = null; + Mono>> mono = createWithResponseAsync(resourceGroupName, monitorName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, + this.client.getContext()); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LogzMonitorResourceInner> + beginCreateAsync(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, monitorName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, context); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LogzMonitorResourceInner> + beginCreate(String resourceGroupName, String monitorName) { + final LogzMonitorResourceInner body = null; + return this.beginCreateAsync(resourceGroupName, monitorName, body).getSyncPoller(); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LogzMonitorResourceInner> + beginCreate(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) { + return this.beginCreateAsync(resourceGroupName, monitorName, body, context).getSyncPoller(); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String monitorName, + LogzMonitorResourceInner body) { + return beginCreateAsync(resourceGroupName, monitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String monitorName) { + final LogzMonitorResourceInner body = null; + return beginCreateAsync(resourceGroupName, monitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String monitorName, + LogzMonitorResourceInner body, Context context) { + return beginCreateAsync(resourceGroupName, monitorName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzMonitorResourceInner create(String resourceGroupName, String monitorName) { + final LogzMonitorResourceInner body = null; + return createAsync(resourceGroupName, monitorName, body).block(); + } + + /** + * Create a monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzMonitorResourceInner create(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, + Context context) { + return createAsync(resourceGroupName, monitorName, body, context).block(); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String monitorName, LogzMonitorResourceUpdateParameters body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String monitorName, LogzMonitorResourceUpdateParameters body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String monitorName) { + final LogzMonitorResourceUpdateParameters body = null; + return updateWithResponseAsync(resourceGroupName, monitorName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String monitorName, + LogzMonitorResourceUpdateParameters body, Context context) { + return updateWithResponseAsync(resourceGroupName, monitorName, body, context).block(); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzMonitorResourceInner update(String resourceGroupName, String monitorName) { + final LogzMonitorResourceUpdateParameters body = null; + return updateWithResponse(resourceGroupName, monitorName, body, Context.NONE).getValue(); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName) { + return this.beginDeleteAsync(resourceGroupName, monitorName).getSyncPoller(); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, monitorName, context).getSyncPoller(); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String monitorName) { + return beginDeleteAsync(resourceGroupName, monitorName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String monitorName, Context context) { + return beginDeleteAsync(resourceGroupName, monitorName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String monitorName) { + deleteAsync(resourceGroupName, monitorName).block(); + } + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String monitorName, Context context) { + deleteAsync(resourceGroupName, monitorName, context).block(); + } + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUserRolesSinglePageAsync(String resourceGroupName, + String monitorName, UserRoleRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listUserRoles(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), body, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUserRolesSinglePageAsync(String resourceGroupName, + String monitorName, UserRoleRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listUserRoles(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), body, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUserRolesAsync(String resourceGroupName, String monitorName, + UserRoleRequest body) { + return new PagedFlux<>(() -> listUserRolesSinglePageAsync(resourceGroupName, monitorName, body), + nextLink -> listUserRolesNextSinglePageAsync(nextLink)); + } + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUserRolesAsync(String resourceGroupName, String monitorName) { + final UserRoleRequest body = null; + return new PagedFlux<>(() -> listUserRolesSinglePageAsync(resourceGroupName, monitorName, body), + nextLink -> listUserRolesNextSinglePageAsync(nextLink)); + } + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUserRolesAsync(String resourceGroupName, String monitorName, + UserRoleRequest body, Context context) { + return new PagedFlux<>(() -> listUserRolesSinglePageAsync(resourceGroupName, monitorName, body, context), + nextLink -> listUserRolesNextSinglePageAsync(nextLink, context)); + } + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUserRoles(String resourceGroupName, String monitorName) { + final UserRoleRequest body = null; + return new PagedIterable<>(listUserRolesAsync(resourceGroupName, monitorName, body)); + } + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUserRoles(String resourceGroupName, String monitorName, + UserRoleRequest body, Context context) { + return new PagedIterable<>(listUserRolesAsync(resourceGroupName, monitorName, body, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUserRolesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listUserRolesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUserRolesNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listUserRolesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsImpl.java new file mode 100644 index 000000000000..677aed67ce83 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsImpl.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.logz.fluent.MonitorsClient; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.MonitoredResource; +import com.azure.resourcemanager.logz.models.Monitors; +import com.azure.resourcemanager.logz.models.UserRoleRequest; +import com.azure.resourcemanager.logz.models.UserRoleResponse; + +public final class MonitorsImpl implements Monitors { + private static final ClientLogger LOGGER = new ClientLogger(MonitorsImpl.class); + + private final MonitorsClient innerClient; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public MonitorsImpl(MonitorsClient innerClient, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { + PagedIterable inner + = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); + } + + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + Context context) { + PagedIterable inner + = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogzMonitorResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogzMonitorResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogzMonitorResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogzMonitorResourceImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, monitorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LogzMonitorResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LogzMonitorResource getByResourceGroup(String resourceGroupName, String monitorName) { + LogzMonitorResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, monitorName); + if (inner != null) { + return new LogzMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String monitorName) { + this.serviceClient().delete(resourceGroupName, monitorName); + } + + public void delete(String resourceGroupName, String monitorName, Context context) { + this.serviceClient().delete(resourceGroupName, monitorName, context); + } + + public PagedIterable listUserRoles(String resourceGroupName, String monitorName) { + PagedIterable inner = this.serviceClient().listUserRoles(resourceGroupName, monitorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UserRoleResponseImpl(inner1, this.manager())); + } + + public PagedIterable listUserRoles(String resourceGroupName, String monitorName, + UserRoleRequest body, Context context) { + PagedIterable inner + = this.serviceClient().listUserRoles(resourceGroupName, monitorName, body, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UserRoleResponseImpl(inner1, this.manager())); + } + + public LogzMonitorResource getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, monitorName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + this.delete(resourceGroupName, monitorName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + this.delete(resourceGroupName, monitorName, context); + } + + private MonitorsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } + + public LogzMonitorResourceImpl define(String name) { + return new LogzMonitorResourceImpl(name, this.manager()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationResultImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationResultImpl.java new file mode 100644 index 000000000000..39895a4b17eb --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationResultImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; +import com.azure.resourcemanager.logz.models.OperationDisplay; +import com.azure.resourcemanager.logz.models.OperationResult; + +public final class OperationResultImpl implements OperationResult { + private OperationResultInner innerObject; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + OperationResultImpl(OperationResultInner innerObject, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public String origin() { + return this.innerModel().origin(); + } + + public OperationResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsClientImpl.java new file mode 100644 index 000000000000..cb4ddd1081fa --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsClientImpl.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.logz.fluent.OperationsClient; +import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; +import com.azure.resourcemanager.logz.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public final class OperationsClientImpl implements OperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationsService service; + + /** + * The service client containing this operation class. + */ + private final MicrosoftLogzImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(MicrosoftLogzImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftLogzOperations to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftLogzOperati") + public interface OperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Logz/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List all operations provided by Microsoft.Logz. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all operations provided by Microsoft.Logz. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all operations provided by Microsoft.Logz. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all operations provided by Microsoft.Logz. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all operations provided by Microsoft.Logz. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List all operations provided by Microsoft.Logz. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsImpl.java new file mode 100644 index 000000000000..efda58adcc80 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.logz.fluent.OperationsClient; +import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; +import com.azure.resourcemanager.logz.models.OperationResult; +import com.azure.resourcemanager.logz.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/ResourceManagerUtils.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/ResourceManagerUtils.java new file mode 100644 index 000000000000..570b17070078 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/ResourceManagerUtils.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (!segments.isEmpty() && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl<>(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsClientImpl.java new file mode 100644 index 000000000000..d0e30e4782f2 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsClientImpl.java @@ -0,0 +1,729 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.logz.fluent.SingleSignOnsClient; +import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnResourceListResponse; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SingleSignOnsClient. + */ +public final class SingleSignOnsClientImpl implements SingleSignOnsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SingleSignOnsService service; + + /** + * The service client containing this operation class. + */ + private final MicrosoftLogzImpl client; + + /** + * Initializes an instance of SingleSignOnsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SingleSignOnsClientImpl(MicrosoftLogzImpl client) { + this.service + = RestProxy.create(SingleSignOnsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftLogzSingleSignOns to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftLogzSingleS") + public interface SingleSignOnsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/singleSignOnConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") String configurationName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LogzSingleSignOnResourceInner body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") String configurationName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String monitorName) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName)); + } + + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String monitorName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName, context)); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String configurationName, LogzSingleSignOnResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String configurationName, LogzSingleSignOnResourceInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, configurationName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LogzSingleSignOnResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, String configurationName, + LogzSingleSignOnResourceInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzSingleSignOnResourceInner.class, LogzSingleSignOnResourceInner.class, + this.client.getContext()); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LogzSingleSignOnResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, String configurationName) { + final LogzSingleSignOnResourceInner body = null; + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzSingleSignOnResourceInner.class, LogzSingleSignOnResourceInner.class, + this.client.getContext()); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LogzSingleSignOnResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, String configurationName, + LogzSingleSignOnResourceInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzSingleSignOnResourceInner.class, LogzSingleSignOnResourceInner.class, + context); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LogzSingleSignOnResourceInner> + beginCreateOrUpdate(String resourceGroupName, String monitorName, String configurationName) { + final LogzSingleSignOnResourceInner body = null; + return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).getSyncPoller(); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LogzSingleSignOnResourceInner> beginCreateOrUpdate( + String resourceGroupName, String monitorName, String configurationName, LogzSingleSignOnResourceInner body, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body, context) + .getSyncPoller(); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String configurationName, LogzSingleSignOnResourceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String configurationName) { + final LogzSingleSignOnResourceInner body = null; + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String configurationName, LogzSingleSignOnResourceInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzSingleSignOnResourceInner createOrUpdate(String resourceGroupName, String monitorName, + String configurationName) { + final LogzSingleSignOnResourceInner body = null; + return createOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).block(); + } + + /** + * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzSingleSignOnResourceInner createOrUpdate(String resourceGroupName, String monitorName, + String configurationName, LogzSingleSignOnResourceInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).block(); + } + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String monitorName, String configurationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String monitorName, String configurationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + configurationName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String monitorName, + String configurationName) { + return getWithResponseAsync(resourceGroupName, monitorName, configurationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String monitorName, + String configurationName, Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, configurationName, context).block(); + } + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzSingleSignOnResourceInner get(String resourceGroupName, String monitorName, String configurationName) { + return getWithResponse(resourceGroupName, monitorName, configurationName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsImpl.java new file mode 100644 index 000000000000..385b6e8bc223 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsImpl.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.logz.fluent.SingleSignOnsClient; +import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnResource; +import com.azure.resourcemanager.logz.models.SingleSignOns; + +public final class SingleSignOnsImpl implements SingleSignOns { + private static final ClientLogger LOGGER = new ClientLogger(SingleSignOnsImpl.class); + + private final SingleSignOnsClient innerClient; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public SingleSignOnsImpl(SingleSignOnsClient innerClient, + com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String monitorName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, monitorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogzSingleSignOnResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String monitorName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogzSingleSignOnResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String monitorName, + String configurationName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, monitorName, configurationName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LogzSingleSignOnResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LogzSingleSignOnResource get(String resourceGroupName, String monitorName, String configurationName) { + LogzSingleSignOnResourceInner inner + = this.serviceClient().get(resourceGroupName, monitorName, configurationName); + if (inner != null) { + return new LogzSingleSignOnResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public LogzSingleSignOnResource getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + String configurationName = ResourceManagerUtils.getValueFromIdByName(id, "singleSignOnConfigurations"); + if (configurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'singleSignOnConfigurations'.", id))); + } + return this.getWithResponse(resourceGroupName, monitorName, configurationName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + String configurationName = ResourceManagerUtils.getValueFromIdByName(id, "singleSignOnConfigurations"); + if (configurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'singleSignOnConfigurations'.", id))); + } + return this.getWithResponse(resourceGroupName, monitorName, configurationName, context); + } + + private SingleSignOnsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } + + public LogzSingleSignOnResourceImpl define(String name) { + return new LogzSingleSignOnResourceImpl(name, this.manager()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesClientImpl.java new file mode 100644 index 000000000000..cdd2879ce6a7 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesClientImpl.java @@ -0,0 +1,768 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.logz.fluent.SubAccountTagRulesClient; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesListResponse; +import com.azure.resourcemanager.logz.models.SubAccountTagRulesDeleteResponse; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SubAccountTagRulesClient. + */ +public final class SubAccountTagRulesClientImpl implements SubAccountTagRulesClient { + /** + * The proxy service used to perform REST calls. + */ + private final SubAccountTagRulesService service; + + /** + * The service client containing this operation class. + */ + private final MicrosoftLogzImpl client; + + /** + * Initializes an instance of SubAccountTagRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SubAccountTagRulesClientImpl(MicrosoftLogzImpl client) { + this.service = RestProxy.create(SubAccountTagRulesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftLogzSubAccountTagRules to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftLogzSubAcco") + public interface SubAccountTagRulesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/tagRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @PathParam("ruleSetName") String ruleSetName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") MonitoringTagRulesInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @PathParam("ruleSetName") String ruleSetName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @PathParam("ruleSetName") String ruleSetName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + subAccountName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName, + String subAccountName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, subAccountName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, subAccountName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String monitorName, + String subAccountName) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName, subAccountName)); + } + + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName, subAccountName, context)); + } + + /** + * Create or update a tag rule set for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, String ruleSetName, MonitoringTagRulesInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), body, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a tag rule set for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create or update a tag rule set for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName) { + final MonitoringTagRulesInner body = null; + return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update a tag rule set for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName, body, + context).block(); + } + + /** + * Create or update a tag rule set for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { + final MonitoringTagRulesInner body = null; + return createOrUpdateWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, body, + Context.NONE).getValue(); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + subAccountName, ruleSetName, this.client.getApiVersion(), accept, context); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { + return getWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName, context).block(); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MonitoringTagRulesInner get(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { + return getWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, Context.NONE).getValue(); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { + return deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubAccountTagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { + return deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName, context).block(); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { + deleteWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesImpl.java new file mode 100644 index 000000000000..5af76d9caea1 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesImpl.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.logz.fluent.SubAccountTagRulesClient; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.MonitoringTagRules; +import com.azure.resourcemanager.logz.models.SubAccountTagRules; +import com.azure.resourcemanager.logz.models.SubAccountTagRulesDeleteResponse; + +public final class SubAccountTagRulesImpl implements SubAccountTagRules { + private static final ClientLogger LOGGER = new ClientLogger(SubAccountTagRulesImpl.class); + + private final SubAccountTagRulesClient innerClient; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public SubAccountTagRulesImpl(SubAccountTagRulesClient innerClient, + com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String monitorName, String subAccountName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, subAccountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoringTagRulesImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String monitorName, String subAccountName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, subAccountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoringTagRulesImpl(inner1, this.manager())); + } + + public Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context) { + Response inner = this.serviceClient() + .createOrUpdateWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MonitoringTagRulesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MonitoringTagRules createOrUpdate(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { + MonitoringTagRulesInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, monitorName, subAccountName, ruleSetName); + if (inner != null) { + return new MonitoringTagRulesImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MonitoringTagRulesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MonitoringTagRules get(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { + MonitoringTagRulesInner inner + = this.serviceClient().get(resourceGroupName, monitorName, subAccountName, ruleSetName); + if (inner != null) { + return new MonitoringTagRulesImpl(inner, this.manager()); + } else { + return null; + } + } + + public SubAccountTagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { + return this.serviceClient() + .deleteWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, context); + } + + public void delete(String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { + this.serviceClient().delete(resourceGroupName, monitorName, subAccountName, ruleSetName); + } + + private SubAccountTagRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsClientImpl.java new file mode 100644 index 000000000000..991ec10c8012 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsClientImpl.java @@ -0,0 +1,1981 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.logz.fluent.SubAccountsClient; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceListResponse; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; +import com.azure.resourcemanager.logz.models.MonitoredResourceListResponse; +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; +import com.azure.resourcemanager.logz.models.VMResourcesListResponse; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SubAccountsClient. + */ +public final class SubAccountsClientImpl implements SubAccountsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SubAccountsService service; + + /** + * The service client containing this operation class. + */ + private final MicrosoftLogzImpl client; + + /** + * Initializes an instance of SubAccountsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SubAccountsClientImpl(MicrosoftLogzImpl client) { + this.service + = RestProxy.create(SubAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftLogzSubAccounts to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftLogzSubAcco") + public interface SubAccountsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LogzMonitorResourceInner body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LogzMonitorResourceUpdateParameters body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/listMonitoredResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMonitoredResources(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/vmHostPayload") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> vMHostPayload(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/vmHostUpdate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVmHostUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VMHostUpdateRequest body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/listVMHosts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVMHosts(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listMonitoredResourcesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVmHostUpdateNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVMHostsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String monitorName) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName)); + } + + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String monitorName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName, context)); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LogzMonitorResourceInner> beginCreateAsync( + String resourceGroupName, String monitorName, String subAccountName, LogzMonitorResourceInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, monitorName, subAccountName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, + this.client.getContext()); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LogzMonitorResourceInner> + beginCreateAsync(String resourceGroupName, String monitorName, String subAccountName) { + final LogzMonitorResourceInner body = null; + Mono>> mono + = createWithResponseAsync(resourceGroupName, monitorName, subAccountName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, + this.client.getContext()); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LogzMonitorResourceInner> beginCreateAsync( + String resourceGroupName, String monitorName, String subAccountName, LogzMonitorResourceInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, monitorName, subAccountName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, context); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LogzMonitorResourceInner> + beginCreate(String resourceGroupName, String monitorName, String subAccountName) { + final LogzMonitorResourceInner body = null; + return this.beginCreateAsync(resourceGroupName, monitorName, subAccountName, body).getSyncPoller(); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LogzMonitorResourceInner> beginCreate( + String resourceGroupName, String monitorName, String subAccountName, LogzMonitorResourceInner body, + Context context) { + return this.beginCreateAsync(resourceGroupName, monitorName, subAccountName, body, context).getSyncPoller(); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceInner body) { + return beginCreateAsync(resourceGroupName, monitorName, subAccountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String monitorName, + String subAccountName) { + final LogzMonitorResourceInner body = null; + return beginCreateAsync(resourceGroupName, monitorName, subAccountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceInner body, Context context) { + return beginCreateAsync(resourceGroupName, monitorName, subAccountName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzMonitorResourceInner create(String resourceGroupName, String monitorName, String subAccountName) { + final LogzMonitorResourceInner body = null; + return createAsync(resourceGroupName, monitorName, subAccountName, body).block(); + } + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzMonitorResourceInner create(String resourceGroupName, String monitorName, String subAccountName, + LogzMonitorResourceInner body, Context context) { + return createAsync(resourceGroupName, monitorName, subAccountName, body, context).block(); + } + + /** + * Get a sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sub account under a given monitor resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sub account under a given monitor resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + subAccountName, this.client.getApiVersion(), accept, context); + } + + /** + * Get a sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sub account under a given monitor resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String monitorName, + String subAccountName) { + return getWithResponseAsync(resourceGroupName, monitorName, subAccountName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sub account under a given monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, subAccountName, context).block(); + } + + /** + * Get a sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sub account under a given monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzMonitorResourceInner get(String resourceGroupName, String monitorName, String subAccountName) { + return getWithResponse(resourceGroupName, monitorName, subAccountName, Context.NONE).getValue(); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + String subAccountName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String subAccountName) { + return this.beginDeleteAsync(resourceGroupName, monitorName, subAccountName).getSyncPoller(); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return this.beginDeleteAsync(resourceGroupName, monitorName, subAccountName, context).getSyncPoller(); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String monitorName, String subAccountName) { + return beginDeleteAsync(resourceGroupName, monitorName, subAccountName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String monitorName, String subAccountName, + Context context) { + return beginDeleteAsync(resourceGroupName, monitorName, subAccountName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String monitorName, String subAccountName) { + deleteAsync(resourceGroupName, monitorName, subAccountName).block(); + } + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String monitorName, String subAccountName, Context context) { + deleteAsync(resourceGroupName, monitorName, subAccountName, context).block(); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, LogzMonitorResourceUpdateParameters body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, LogzMonitorResourceUpdateParameters body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String monitorName, + String subAccountName) { + final LogzMonitorResourceUpdateParameters body = null; + return updateWithResponseAsync(resourceGroupName, monitorName, subAccountName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceUpdateParameters body, Context context) { + return updateWithResponseAsync(resourceGroupName, monitorName, subAccountName, body, context).block(); + } + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogzMonitorResourceInner update(String resourceGroupName, String monitorName, String subAccountName) { + final LogzMonitorResourceUpdateParameters body = null; + return updateWithResponse(resourceGroupName, monitorName, subAccountName, body, Context.NONE).getValue(); + } + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMonitoredResources(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listMonitoredResources(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, String monitorName, + String subAccountName) { + return new PagedFlux<>( + () -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName, subAccountName), + nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink)); + } + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return new PagedFlux<>( + () -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName, subAccountName, context), + nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink, context)); + } + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName) { + return new PagedIterable<>(listMonitoredResourcesAsync(resourceGroupName, monitorName, subAccountName)); + } + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return new PagedIterable<>( + listMonitoredResourcesAsync(resourceGroupName, monitorName, subAccountName, context)); + } + + /** + * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> vMHostPayloadWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.vMHostPayload(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> vMHostPayloadWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.vMHostPayload(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), accept, context); + } + + /** + * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono vMHostPayloadAsync(String resourceGroupName, String monitorName, + String subAccountName) { + return vMHostPayloadWithResponseAsync(resourceGroupName, monitorName, subAccountName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return vMHostPayloadWithResponseAsync(resourceGroupName, monitorName, subAccountName, context).block(); + } + + /** + * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VMExtensionPayloadInner vMHostPayload(String resourceGroupName, String monitorName, String subAccountName) { + return vMHostPayloadWithResponse(resourceGroupName, monitorName, subAccountName, Context.NONE).getValue(); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVmHostUpdateSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, VMHostUpdateRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVmHostUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), body, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVmHostUpdateSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, VMHostUpdateRequest body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listVmHostUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), body, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body) { + return new PagedFlux<>( + () -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, subAccountName, body), + nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + String subAccountName) { + final VMHostUpdateRequest body = null; + return new PagedFlux<>( + () -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, subAccountName, body), + nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body, Context context) { + return new PagedFlux<>( + () -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, subAccountName, body, context), + nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink, context)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName) { + final VMHostUpdateRequest body = null; + return new PagedIterable<>(listVmHostUpdateAsync(resourceGroupName, monitorName, subAccountName, body)); + } + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body, Context context) { + return new PagedIterable<>( + listVmHostUpdateAsync(resourceGroupName, monitorName, subAccountName, body, context)); + } + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMHostsSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVMHosts(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMHostsSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (subAccountName == null) { + return Mono.error(new IllegalArgumentException("Parameter subAccountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listVMHosts(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + subAccountName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVMHostsAsync(String resourceGroupName, String monitorName, + String subAccountName) { + return new PagedFlux<>(() -> listVMHostsSinglePageAsync(resourceGroupName, monitorName, subAccountName), + nextLink -> listVMHostsNextSinglePageAsync(nextLink)); + } + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVMHostsAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return new PagedFlux<>( + () -> listVMHostsSinglePageAsync(resourceGroupName, monitorName, subAccountName, context), + nextLink -> listVMHostsNextSinglePageAsync(nextLink, context)); + } + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVMHosts(String resourceGroupName, String monitorName, + String subAccountName) { + return new PagedIterable<>(listVMHostsAsync(resourceGroupName, monitorName, subAccountName)); + } + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVMHosts(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return new PagedIterable<>(listVMHostsAsync(resourceGroupName, monitorName, subAccountName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVmHostUpdateNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVmHostUpdateNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMHostsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMHostsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsImpl.java new file mode 100644 index 000000000000..36639a04c25a --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsImpl.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.logz.fluent.SubAccountsClient; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; +import com.azure.resourcemanager.logz.models.MonitoredResource; +import com.azure.resourcemanager.logz.models.SubAccounts; +import com.azure.resourcemanager.logz.models.VMExtensionPayload; +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; +import com.azure.resourcemanager.logz.models.VMResources; + +public final class SubAccountsImpl implements SubAccounts { + private static final ClientLogger LOGGER = new ClientLogger(SubAccountsImpl.class); + + private final SubAccountsClient innerClient; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public SubAccountsImpl(SubAccountsClient innerClient, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String monitorName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, monitorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogzMonitorResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String monitorName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogzMonitorResourceImpl(inner1, this.manager())); + } + + public LogzMonitorResource create(String resourceGroupName, String monitorName, String subAccountName) { + LogzMonitorResourceInner inner = this.serviceClient().create(resourceGroupName, monitorName, subAccountName); + if (inner != null) { + return new LogzMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public LogzMonitorResource create(String resourceGroupName, String monitorName, String subAccountName, + LogzMonitorResourceInner body, Context context) { + LogzMonitorResourceInner inner + = this.serviceClient().create(resourceGroupName, monitorName, subAccountName, body, context); + if (inner != null) { + return new LogzMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, monitorName, subAccountName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LogzMonitorResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LogzMonitorResource get(String resourceGroupName, String monitorName, String subAccountName) { + LogzMonitorResourceInner inner = this.serviceClient().get(resourceGroupName, monitorName, subAccountName); + if (inner != null) { + return new LogzMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String monitorName, String subAccountName) { + this.serviceClient().delete(resourceGroupName, monitorName, subAccountName); + } + + public void delete(String resourceGroupName, String monitorName, String subAccountName, Context context) { + this.serviceClient().delete(resourceGroupName, monitorName, subAccountName, context); + } + + public Response updateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceUpdateParameters body, Context context) { + Response inner + = this.serviceClient().updateWithResponse(resourceGroupName, monitorName, subAccountName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LogzMonitorResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LogzMonitorResource update(String resourceGroupName, String monitorName, String subAccountName) { + LogzMonitorResourceInner inner = this.serviceClient().update(resourceGroupName, monitorName, subAccountName); + if (inner != null) { + return new LogzMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName) { + PagedIterable inner + = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName, subAccountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); + } + + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + PagedIterable inner + = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName, subAccountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); + } + + public Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + Response inner + = this.serviceClient().vMHostPayloadWithResponse(resourceGroupName, monitorName, subAccountName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VMExtensionPayloadImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VMExtensionPayload vMHostPayload(String resourceGroupName, String monitorName, String subAccountName) { + VMExtensionPayloadInner inner + = this.serviceClient().vMHostPayload(resourceGroupName, monitorName, subAccountName); + if (inner != null) { + return new VMExtensionPayloadImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName) { + PagedIterable inner + = this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName, subAccountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); + } + + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body, Context context) { + PagedIterable inner + = this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName, subAccountName, body, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); + } + + public PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName) { + PagedIterable inner + = this.serviceClient().listVMHosts(resourceGroupName, monitorName, subAccountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); + } + + public PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName, + Context context) { + PagedIterable inner + = this.serviceClient().listVMHosts(resourceGroupName, monitorName, subAccountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); + } + + private SubAccountsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesClientImpl.java new file mode 100644 index 000000000000..62aeae87cada --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesClientImpl.java @@ -0,0 +1,708 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.logz.fluent.TagRulesClient; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesListResponse; +import com.azure.resourcemanager.logz.models.TagRulesDeleteResponse; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TagRulesClient. + */ +public final class TagRulesClientImpl implements TagRulesClient { + /** + * The proxy service used to perform REST calls. + */ + private final TagRulesService service; + + /** + * The service client containing this operation class. + */ + private final MicrosoftLogzImpl client; + + /** + * Initializes an instance of TagRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TagRulesClientImpl(MicrosoftLogzImpl client) { + this.service = RestProxy.create(TagRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftLogzTagRules to be used by the proxy service to perform REST + * calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftLogzTagRule") + public interface TagRulesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/tagRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MonitoringTagRulesInner body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String monitorName) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName)); + } + + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String monitorName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName, context)); + } + + /** + * Create or update a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String ruleSetName, MonitoringTagRulesInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, ruleSetName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String ruleSetName, MonitoringTagRulesInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, ruleSetName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create or update a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String ruleSetName) { + final MonitoringTagRulesInner body = null; + return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, MonitoringTagRulesInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, body, context).block(); + } + + /** + * Create or update a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String monitorName, String ruleSetName) { + final MonitoringTagRulesInner body = null; + return createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, body, Context.NONE).getValue(); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, ruleSetName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + ruleSetName, this.client.getApiVersion(), accept, context); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String monitorName, String ruleSetName) { + return getWithResponseAsync(resourceGroupName, monitorName, ruleSetName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context).block(); + } + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MonitoringTagRulesInner get(String resourceGroupName, String monitorName, String ruleSetName) { + return getWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE).getValue(); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, ruleSetName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, ruleSetName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String monitorName, String ruleSetName) { + return deleteWithResponseAsync(resourceGroupName, monitorName, ruleSetName).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context).block(); + } + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String monitorName, String ruleSetName) { + deleteWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesImpl.java new file mode 100644 index 000000000000..ba8de378999f --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesImpl.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.logz.fluent.TagRulesClient; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.MonitoringTagRules; +import com.azure.resourcemanager.logz.models.TagRules; +import com.azure.resourcemanager.logz.models.TagRulesDeleteResponse; + +public final class TagRulesImpl implements TagRules { + private static final ClientLogger LOGGER = new ClientLogger(TagRulesImpl.class); + + private final TagRulesClient innerClient; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + public TagRulesImpl(TagRulesClient innerClient, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String monitorName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, monitorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoringTagRulesImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String monitorName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoringTagRulesImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, monitorName, ruleSetName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MonitoringTagRulesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MonitoringTagRules get(String resourceGroupName, String monitorName, String ruleSetName) { + MonitoringTagRulesInner inner = this.serviceClient().get(resourceGroupName, monitorName, ruleSetName); + if (inner != null) { + return new MonitoringTagRulesImpl(inner, this.manager()); + } else { + return null; + } + } + + public TagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, monitorName, ruleSetName, context); + } + + public void delete(String resourceGroupName, String monitorName, String ruleSetName) { + this.serviceClient().delete(resourceGroupName, monitorName, ruleSetName); + } + + public MonitoringTagRules getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + String ruleSetName = ResourceManagerUtils.getValueFromIdByName(id, "tagRules"); + if (ruleSetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); + } + return this.getWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + String ruleSetName = ResourceManagerUtils.getValueFromIdByName(id, "tagRules"); + if (ruleSetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); + } + return this.getWithResponse(resourceGroupName, monitorName, ruleSetName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + String ruleSetName = ResourceManagerUtils.getValueFromIdByName(id, "tagRules"); + if (ruleSetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); + } + this.deleteWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE); + } + + public TagRulesDeleteResponse deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); + if (monitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + } + String ruleSetName = ResourceManagerUtils.getValueFromIdByName(id, "tagRules"); + if (ruleSetName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); + } + return this.deleteWithResponse(resourceGroupName, monitorName, ruleSetName, context); + } + + private TagRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } + + public MonitoringTagRulesImpl define(String name) { + return new MonitoringTagRulesImpl(name, this.manager()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/UserRoleResponseImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/UserRoleResponseImpl.java new file mode 100644 index 000000000000..07e5f8bd787c --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/UserRoleResponseImpl.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; +import com.azure.resourcemanager.logz.models.UserRole; +import com.azure.resourcemanager.logz.models.UserRoleResponse; + +public final class UserRoleResponseImpl implements UserRoleResponse { + private UserRoleResponseInner innerObject; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + UserRoleResponseImpl(UserRoleResponseInner innerObject, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public UserRole role() { + return this.innerModel().role(); + } + + public UserRoleResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMExtensionPayloadImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMExtensionPayloadImpl.java new file mode 100644 index 000000000000..836a0a640eba --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMExtensionPayloadImpl.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner; +import com.azure.resourcemanager.logz.models.VMExtensionPayload; + +public final class VMExtensionPayloadImpl implements VMExtensionPayload { + private VMExtensionPayloadInner innerObject; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + VMExtensionPayloadImpl(VMExtensionPayloadInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String apiKey() { + return this.innerModel().apiKey(); + } + + public String region() { + return this.innerModel().region(); + } + + public VMExtensionPayloadInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMResourcesImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMResourcesImpl.java new file mode 100644 index 000000000000..4f273019c81d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMResourcesImpl.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.implementation; + +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.VMResources; + +public final class VMResourcesImpl implements VMResources { + private VMResourcesInner innerObject; + + private final com.azure.resourcemanager.logz.LogzManager serviceManager; + + VMResourcesImpl(VMResourcesInner innerObject, com.azure.resourcemanager.logz.LogzManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String agentVersion() { + return this.innerModel().agentVersion(); + } + + public VMResourcesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.logz.LogzManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/package-info.java new file mode 100644 index 000000000000..90394e8e3684 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for MicrosoftLogz. + * null. + */ +package com.azure.resourcemanager.logz.implementation; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/FilteringTag.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/FilteringTag.java new file mode 100644 index 000000000000..17bef46f9166 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/FilteringTag.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from + * being monitored. + */ +@Fluent +public final class FilteringTag implements JsonSerializable { + /* + * The name (also known as the key) of the tag. + */ + private String name; + + /* + * The value of the tag. + */ + private String value; + + /* + * Valid actions for a filtering tag. Exclusion takes priority over inclusion. + */ + private TagAction action; + + /** + * Creates an instance of FilteringTag class. + */ + public FilteringTag() { + } + + /** + * Get the name property: The name (also known as the key) of the tag. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name (also known as the key) of the tag. + * + * @param name the name value to set. + * @return the FilteringTag object itself. + */ + public FilteringTag withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: The value of the tag. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the tag. + * + * @param value the value value to set. + * @return the FilteringTag object itself. + */ + public FilteringTag withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the action property: Valid actions for a filtering tag. Exclusion takes priority over inclusion. + * + * @return the action value. + */ + public TagAction action() { + return this.action; + } + + /** + * Set the action property: Valid actions for a filtering tag. Exclusion takes priority over inclusion. + * + * @param action the action value to set. + * @return the FilteringTag object itself. + */ + public FilteringTag withAction(TagAction action) { + this.action = action; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FilteringTag from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FilteringTag if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FilteringTag. + */ + public static FilteringTag fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FilteringTag deserializedFilteringTag = new FilteringTag(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedFilteringTag.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedFilteringTag.value = reader.getString(); + } else if ("action".equals(fieldName)) { + deserializedFilteringTag.action = TagAction.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedFilteringTag; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/IdentityProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/IdentityProperties.java new file mode 100644 index 000000000000..0c82befbb0f5 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/IdentityProperties.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The IdentityProperties model. + */ +@Fluent +public final class IdentityProperties implements JsonSerializable { + /* + * The identity ID. + */ + private String principalId; + + /* + * The tenant ID of resource. + */ + private String tenantId; + + /* + * The type property. + */ + private ManagedIdentityTypes type; + + /** + * Creates an instance of IdentityProperties class. + */ + public IdentityProperties() { + } + + /** + * Get the principalId property: The identity ID. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of resource. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + public ManagedIdentityTypes type() { + return this.type; + } + + /** + * Set the type property: The type property. + * + * @param type the type value to set. + * @return the IdentityProperties object itself. + */ + public IdentityProperties withType(ManagedIdentityTypes type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the IdentityProperties. + */ + public static IdentityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityProperties deserializedIdentityProperties = new IdentityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedIdentityProperties.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedIdentityProperties.tenantId = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIdentityProperties.type = ManagedIdentityTypes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityProperties; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LiftrResourceCategories.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LiftrResourceCategories.java new file mode 100644 index 000000000000..d30a666f161e --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LiftrResourceCategories.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for LiftrResourceCategories. + */ +public final class LiftrResourceCategories extends ExpandableStringEnum { + /** + * Static value Unknown for LiftrResourceCategories. + */ + public static final LiftrResourceCategories UNKNOWN = fromString("Unknown"); + + /** + * Static value MonitorLogs for LiftrResourceCategories. + */ + public static final LiftrResourceCategories MONITOR_LOGS = fromString("MonitorLogs"); + + /** + * Creates a new instance of LiftrResourceCategories value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LiftrResourceCategories() { + } + + /** + * Creates or finds a LiftrResourceCategories from its string representation. + * + * @param name a name to look for. + * @return the corresponding LiftrResourceCategories. + */ + public static LiftrResourceCategories fromString(String name) { + return fromString(name, LiftrResourceCategories.class); + } + + /** + * Gets known LiftrResourceCategories values. + * + * @return known LiftrResourceCategories values. + */ + public static Collection values() { + return values(LiftrResourceCategories.class); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogRules.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogRules.java new file mode 100644 index 000000000000..01f71b73bbc7 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogRules.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Set of rules for sending logs for the Monitor resource. + */ +@Fluent +public final class LogRules implements JsonSerializable { + /* + * Flag specifying if AAD logs should be sent for the Monitor resource. + */ + private Boolean sendAadLogs; + + /* + * Flag specifying if subscription logs should be sent for the Monitor resource. + */ + private Boolean sendSubscriptionLogs; + + /* + * Flag specifying if activity logs from Azure resources should be sent for the Monitor resource. + */ + private Boolean sendActivityLogs; + + /* + * List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. + * If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list + * of all available resources. If Include actions are specified, the rules will only include resources with the + * associated tags. + */ + private List filteringTags; + + /** + * Creates an instance of LogRules class. + */ + public LogRules() { + } + + /** + * Get the sendAadLogs property: Flag specifying if AAD logs should be sent for the Monitor resource. + * + * @return the sendAadLogs value. + */ + public Boolean sendAadLogs() { + return this.sendAadLogs; + } + + /** + * Set the sendAadLogs property: Flag specifying if AAD logs should be sent for the Monitor resource. + * + * @param sendAadLogs the sendAadLogs value to set. + * @return the LogRules object itself. + */ + public LogRules withSendAadLogs(Boolean sendAadLogs) { + this.sendAadLogs = sendAadLogs; + return this; + } + + /** + * Get the sendSubscriptionLogs property: Flag specifying if subscription logs should be sent for the Monitor + * resource. + * + * @return the sendSubscriptionLogs value. + */ + public Boolean sendSubscriptionLogs() { + return this.sendSubscriptionLogs; + } + + /** + * Set the sendSubscriptionLogs property: Flag specifying if subscription logs should be sent for the Monitor + * resource. + * + * @param sendSubscriptionLogs the sendSubscriptionLogs value to set. + * @return the LogRules object itself. + */ + public LogRules withSendSubscriptionLogs(Boolean sendSubscriptionLogs) { + this.sendSubscriptionLogs = sendSubscriptionLogs; + return this; + } + + /** + * Get the sendActivityLogs property: Flag specifying if activity logs from Azure resources should be sent for the + * Monitor resource. + * + * @return the sendActivityLogs value. + */ + public Boolean sendActivityLogs() { + return this.sendActivityLogs; + } + + /** + * Set the sendActivityLogs property: Flag specifying if activity logs from Azure resources should be sent for the + * Monitor resource. + * + * @param sendActivityLogs the sendActivityLogs value to set. + * @return the LogRules object itself. + */ + public LogRules withSendActivityLogs(Boolean sendActivityLogs) { + this.sendActivityLogs = sendActivityLogs; + return this; + } + + /** + * Get the filteringTags property: List of filtering tags to be used for capturing logs. This only takes effect if + * SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, + * the rules will apply to the list of all available resources. If Include actions are specified, the rules will + * only include resources with the associated tags. + * + * @return the filteringTags value. + */ + public List filteringTags() { + return this.filteringTags; + } + + /** + * Set the filteringTags property: List of filtering tags to be used for capturing logs. This only takes effect if + * SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, + * the rules will apply to the list of all available resources. If Include actions are specified, the rules will + * only include resources with the associated tags. + * + * @param filteringTags the filteringTags value to set. + * @return the LogRules object itself. + */ + public LogRules withFilteringTags(List filteringTags) { + this.filteringTags = filteringTags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filteringTags() != null) { + filteringTags().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("sendAadLogs", this.sendAadLogs); + jsonWriter.writeBooleanField("sendSubscriptionLogs", this.sendSubscriptionLogs); + jsonWriter.writeBooleanField("sendActivityLogs", this.sendActivityLogs); + jsonWriter.writeArrayField("filteringTags", this.filteringTags, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogRules from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogRules if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the LogRules. + */ + public static LogRules fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogRules deserializedLogRules = new LogRules(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sendAadLogs".equals(fieldName)) { + deserializedLogRules.sendAadLogs = reader.getNullable(JsonReader::getBoolean); + } else if ("sendSubscriptionLogs".equals(fieldName)) { + deserializedLogRules.sendSubscriptionLogs = reader.getNullable(JsonReader::getBoolean); + } else if ("sendActivityLogs".equals(fieldName)) { + deserializedLogRules.sendActivityLogs = reader.getNullable(JsonReader::getBoolean); + } else if ("filteringTags".equals(fieldName)) { + List filteringTags = reader.readArray(reader1 -> FilteringTag.fromJson(reader1)); + deserializedLogRules.filteringTags = filteringTags; + } else { + reader.skipChildren(); + } + } + + return deserializedLogRules; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResource.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResource.java new file mode 100644 index 000000000000..28813e5b7f85 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResource.java @@ -0,0 +1,329 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import java.util.Map; + +/** + * An immutable client-side representation of LogzMonitorResource. + */ +public interface LogzMonitorResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: Properties specific to the monitor resource. + * + * @return the properties value. + */ + MonitorProperties properties(); + + /** + * Gets the identity property: The identity property. + * + * @return the identity value. + */ + IdentityProperties identity(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner object. + * + * @return the inner object. + */ + LogzMonitorResourceInner innerModel(); + + /** + * The entirety of the LogzMonitorResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The LogzMonitorResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the LogzMonitorResource definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the LogzMonitorResource definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the LogzMonitorResource definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the LogzMonitorResource definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + LogzMonitorResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + LogzMonitorResource create(Context context); + } + + /** + * The stage of the LogzMonitorResource definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the LogzMonitorResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Properties specific to the monitor resource.. + * + * @param properties Properties specific to the monitor resource. + * @return the next definition stage. + */ + WithCreate withProperties(MonitorProperties properties); + } + + /** + * The stage of the LogzMonitorResource definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The identity property.. + * + * @param identity The identity property. + * @return the next definition stage. + */ + WithCreate withIdentity(IdentityProperties identity); + } + } + + /** + * Begins update for the LogzMonitorResource resource. + * + * @return the stage of resource update. + */ + LogzMonitorResource.Update update(); + + /** + * The template for LogzMonitorResource update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + LogzMonitorResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + LogzMonitorResource apply(Context context); + } + + /** + * The LogzMonitorResource update stages. + */ + interface UpdateStages { + /** + * The stage of the LogzMonitorResource update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: The new tags of the monitor resource.. + * + * @param tags The new tags of the monitor resource. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the LogzMonitorResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The set of properties that can be update in a PATCH request to a + * monitor resource.. + * + * @param properties The set of properties that can be update in a PATCH request to a monitor resource. + * @return the next definition stage. + */ + Update withProperties(MonitorUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + LogzMonitorResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + LogzMonitorResource refresh(Context context); + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listMonitoredResources(); + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listMonitoredResources(Context context); + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. + */ + PagedIterable listUserRoles(); + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. + */ + PagedIterable listUserRoles(UserRoleRequest body, Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceListResponse.java new file mode 100644 index 000000000000..3dd836d90bfe --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceListResponse.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Response of a list operation. + */ +@Fluent +public final class LogzMonitorResourceListResponse implements JsonSerializable { + /* + * Results of a list operation. + */ + private List value; + + /* + * Link to the next set of results, if any. + */ + private String nextLink; + + /** + * Creates an instance of LogzMonitorResourceListResponse class. + */ + public LogzMonitorResourceListResponse() { + } + + /** + * Get the value property: Results of a list operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Results of a list operation. + * + * @param value the value value to set. + * @return the LogzMonitorResourceListResponse object itself. + */ + public LogzMonitorResourceListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results, if any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results, if any. + * + * @param nextLink the nextLink value to set. + * @return the LogzMonitorResourceListResponse object itself. + */ + public LogzMonitorResourceListResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogzMonitorResourceListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogzMonitorResourceListResponse if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LogzMonitorResourceListResponse. + */ + public static LogzMonitorResourceListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogzMonitorResourceListResponse deserializedLogzMonitorResourceListResponse + = new LogzMonitorResourceListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> LogzMonitorResourceInner.fromJson(reader1)); + deserializedLogzMonitorResourceListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLogzMonitorResourceListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogzMonitorResourceListResponse; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceUpdateParameters.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceUpdateParameters.java new file mode 100644 index 000000000000..fe1dd86b79fd --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceUpdateParameters.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The parameters for a PATCH request to a monitor resource. + */ +@Fluent +public final class LogzMonitorResourceUpdateParameters + implements JsonSerializable { + /* + * The set of properties that can be update in a PATCH request to a monitor resource. + */ + private MonitorUpdateProperties properties; + + /* + * The new tags of the monitor resource. + */ + private Map tags; + + /** + * Creates an instance of LogzMonitorResourceUpdateParameters class. + */ + public LogzMonitorResourceUpdateParameters() { + } + + /** + * Get the properties property: The set of properties that can be update in a PATCH request to a monitor resource. + * + * @return the properties value. + */ + public MonitorUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The set of properties that can be update in a PATCH request to a monitor resource. + * + * @param properties the properties value to set. + * @return the LogzMonitorResourceUpdateParameters object itself. + */ + public LogzMonitorResourceUpdateParameters withProperties(MonitorUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: The new tags of the monitor resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The new tags of the monitor resource. + * + * @param tags the tags value to set. + * @return the LogzMonitorResourceUpdateParameters object itself. + */ + public LogzMonitorResourceUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogzMonitorResourceUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogzMonitorResourceUpdateParameters if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LogzMonitorResourceUpdateParameters. + */ + public static LogzMonitorResourceUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogzMonitorResourceUpdateParameters deserializedLogzMonitorResourceUpdateParameters + = new LogzMonitorResourceUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedLogzMonitorResourceUpdateParameters.properties + = MonitorUpdateProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedLogzMonitorResourceUpdateParameters.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedLogzMonitorResourceUpdateParameters; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzOrganizationProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzOrganizationProperties.java new file mode 100644 index 000000000000..9506c89cbcfc --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzOrganizationProperties.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The LogzOrganizationProperties model. + */ +@Fluent +public final class LogzOrganizationProperties implements JsonSerializable { + /* + * Name of the Logz organization. + */ + private String companyName; + + /* + * Id of the Logz organization. + */ + private String id; + + /* + * The Id of the Enterprise App used for Single sign on. + */ + private String enterpriseAppId; + + /* + * The login URL specific to this Logz Organization. + */ + private String singleSignOnUrl; + + /** + * Creates an instance of LogzOrganizationProperties class. + */ + public LogzOrganizationProperties() { + } + + /** + * Get the companyName property: Name of the Logz organization. + * + * @return the companyName value. + */ + public String companyName() { + return this.companyName; + } + + /** + * Set the companyName property: Name of the Logz organization. + * + * @param companyName the companyName value to set. + * @return the LogzOrganizationProperties object itself. + */ + public LogzOrganizationProperties withCompanyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Get the id property: Id of the Logz organization. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the enterpriseAppId property: The Id of the Enterprise App used for Single sign on. + * + * @return the enterpriseAppId value. + */ + public String enterpriseAppId() { + return this.enterpriseAppId; + } + + /** + * Set the enterpriseAppId property: The Id of the Enterprise App used for Single sign on. + * + * @param enterpriseAppId the enterpriseAppId value to set. + * @return the LogzOrganizationProperties object itself. + */ + public LogzOrganizationProperties withEnterpriseAppId(String enterpriseAppId) { + this.enterpriseAppId = enterpriseAppId; + return this; + } + + /** + * Get the singleSignOnUrl property: The login URL specific to this Logz Organization. + * + * @return the singleSignOnUrl value. + */ + public String singleSignOnUrl() { + return this.singleSignOnUrl; + } + + /** + * Set the singleSignOnUrl property: The login URL specific to this Logz Organization. + * + * @param singleSignOnUrl the singleSignOnUrl value to set. + * @return the LogzOrganizationProperties object itself. + */ + public LogzOrganizationProperties withSingleSignOnUrl(String singleSignOnUrl) { + this.singleSignOnUrl = singleSignOnUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("companyName", this.companyName); + jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId); + jsonWriter.writeStringField("singleSignOnUrl", this.singleSignOnUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogzOrganizationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogzOrganizationProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LogzOrganizationProperties. + */ + public static LogzOrganizationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogzOrganizationProperties deserializedLogzOrganizationProperties = new LogzOrganizationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("companyName".equals(fieldName)) { + deserializedLogzOrganizationProperties.companyName = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedLogzOrganizationProperties.id = reader.getString(); + } else if ("enterpriseAppId".equals(fieldName)) { + deserializedLogzOrganizationProperties.enterpriseAppId = reader.getString(); + } else if ("singleSignOnUrl".equals(fieldName)) { + deserializedLogzOrganizationProperties.singleSignOnUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogzOrganizationProperties; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnProperties.java new file mode 100644 index 000000000000..e9f79eddefb6 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnProperties.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The LogzSingleSignOnProperties model. + */ +@Fluent +public final class LogzSingleSignOnProperties implements JsonSerializable { + /* + * Various states of the SSO resource + */ + private SingleSignOnStates singleSignOnState; + + /* + * The Id of the Enterprise App used for Single sign-on. + */ + private String enterpriseAppId; + + /* + * The login URL specific to this Logz Organization. + */ + private String singleSignOnUrl; + + /* + * Flag specifying if the resource provisioning state as tracked by ARM. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of LogzSingleSignOnProperties class. + */ + public LogzSingleSignOnProperties() { + } + + /** + * Get the singleSignOnState property: Various states of the SSO resource. + * + * @return the singleSignOnState value. + */ + public SingleSignOnStates singleSignOnState() { + return this.singleSignOnState; + } + + /** + * Set the singleSignOnState property: Various states of the SSO resource. + * + * @param singleSignOnState the singleSignOnState value to set. + * @return the LogzSingleSignOnProperties object itself. + */ + public LogzSingleSignOnProperties withSingleSignOnState(SingleSignOnStates singleSignOnState) { + this.singleSignOnState = singleSignOnState; + return this; + } + + /** + * Get the enterpriseAppId property: The Id of the Enterprise App used for Single sign-on. + * + * @return the enterpriseAppId value. + */ + public String enterpriseAppId() { + return this.enterpriseAppId; + } + + /** + * Set the enterpriseAppId property: The Id of the Enterprise App used for Single sign-on. + * + * @param enterpriseAppId the enterpriseAppId value to set. + * @return the LogzSingleSignOnProperties object itself. + */ + public LogzSingleSignOnProperties withEnterpriseAppId(String enterpriseAppId) { + this.enterpriseAppId = enterpriseAppId; + return this; + } + + /** + * Get the singleSignOnUrl property: The login URL specific to this Logz Organization. + * + * @return the singleSignOnUrl value. + */ + public String singleSignOnUrl() { + return this.singleSignOnUrl; + } + + /** + * Set the singleSignOnUrl property: The login URL specific to this Logz Organization. + * + * @param singleSignOnUrl the singleSignOnUrl value to set. + * @return the LogzSingleSignOnProperties object itself. + */ + public LogzSingleSignOnProperties withSingleSignOnUrl(String singleSignOnUrl) { + this.singleSignOnUrl = singleSignOnUrl; + return this; + } + + /** + * Get the provisioningState property: Flag specifying if the resource provisioning state as tracked by ARM. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("singleSignOnState", + this.singleSignOnState == null ? null : this.singleSignOnState.toString()); + jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId); + jsonWriter.writeStringField("singleSignOnUrl", this.singleSignOnUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogzSingleSignOnProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogzSingleSignOnProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LogzSingleSignOnProperties. + */ + public static LogzSingleSignOnProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogzSingleSignOnProperties deserializedLogzSingleSignOnProperties = new LogzSingleSignOnProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("singleSignOnState".equals(fieldName)) { + deserializedLogzSingleSignOnProperties.singleSignOnState + = SingleSignOnStates.fromString(reader.getString()); + } else if ("enterpriseAppId".equals(fieldName)) { + deserializedLogzSingleSignOnProperties.enterpriseAppId = reader.getString(); + } else if ("singleSignOnUrl".equals(fieldName)) { + deserializedLogzSingleSignOnProperties.singleSignOnUrl = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedLogzSingleSignOnProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLogzSingleSignOnProperties; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResource.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResource.java new file mode 100644 index 000000000000..0b27755e5e36 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResource.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; + +/** + * An immutable client-side representation of LogzSingleSignOnResource. + */ +public interface LogzSingleSignOnResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: The properties property. + * + * @return the properties value. + */ + LogzSingleSignOnProperties properties(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner object. + * + * @return the inner object. + */ + LogzSingleSignOnResourceInner innerModel(); + + /** + * The entirety of the LogzSingleSignOnResource definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The LogzSingleSignOnResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the LogzSingleSignOnResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the LogzSingleSignOnResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, monitorName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @return the next definition stage. + */ + WithCreate withExistingMonitor(String resourceGroupName, String monitorName); + } + + /** + * The stage of the LogzSingleSignOnResource definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + LogzSingleSignOnResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + LogzSingleSignOnResource create(Context context); + } + + /** + * The stage of the LogzSingleSignOnResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties property.. + * + * @param properties The properties property. + * @return the next definition stage. + */ + WithCreate withProperties(LogzSingleSignOnProperties properties); + } + } + + /** + * Begins update for the LogzSingleSignOnResource resource. + * + * @return the stage of resource update. + */ + LogzSingleSignOnResource.Update update(); + + /** + * The template for LogzSingleSignOnResource update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + LogzSingleSignOnResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + LogzSingleSignOnResource apply(Context context); + } + + /** + * The LogzSingleSignOnResource update stages. + */ + interface UpdateStages { + /** + * The stage of the LogzSingleSignOnResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties property.. + * + * @param properties The properties property. + * @return the next definition stage. + */ + Update withProperties(LogzSingleSignOnProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + LogzSingleSignOnResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + LogzSingleSignOnResource refresh(Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResourceListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResourceListResponse.java new file mode 100644 index 000000000000..ff646588e0f1 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResourceListResponse.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Response of a list operation. + */ +@Fluent +public final class LogzSingleSignOnResourceListResponse + implements JsonSerializable { + /* + * Results of a list operation. + */ + private List value; + + /* + * Link to the next set of results, if any. + */ + private String nextLink; + + /** + * Creates an instance of LogzSingleSignOnResourceListResponse class. + */ + public LogzSingleSignOnResourceListResponse() { + } + + /** + * Get the value property: Results of a list operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Results of a list operation. + * + * @param value the value value to set. + * @return the LogzSingleSignOnResourceListResponse object itself. + */ + public LogzSingleSignOnResourceListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results, if any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results, if any. + * + * @param nextLink the nextLink value to set. + * @return the LogzSingleSignOnResourceListResponse object itself. + */ + public LogzSingleSignOnResourceListResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogzSingleSignOnResourceListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogzSingleSignOnResourceListResponse if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LogzSingleSignOnResourceListResponse. + */ + public static LogzSingleSignOnResourceListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogzSingleSignOnResourceListResponse deserializedLogzSingleSignOnResourceListResponse + = new LogzSingleSignOnResourceListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> LogzSingleSignOnResourceInner.fromJson(reader1)); + deserializedLogzSingleSignOnResourceListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLogzSingleSignOnResourceListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogzSingleSignOnResourceListResponse; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ManagedIdentityTypes.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ManagedIdentityTypes.java new file mode 100644 index 000000000000..5094ad0ab718 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ManagedIdentityTypes.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ManagedIdentityTypes. + */ +public final class ManagedIdentityTypes extends ExpandableStringEnum { + /** + * Static value SystemAssigned for ManagedIdentityTypes. + */ + public static final ManagedIdentityTypes SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * Static value UserAssigned for ManagedIdentityTypes. + */ + public static final ManagedIdentityTypes USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Creates a new instance of ManagedIdentityTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedIdentityTypes() { + } + + /** + * Creates or finds a ManagedIdentityTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedIdentityTypes. + */ + public static ManagedIdentityTypes fromString(String name) { + return fromString(name, ManagedIdentityTypes.class); + } + + /** + * Gets known ManagedIdentityTypes values. + * + * @return known ManagedIdentityTypes values. + */ + public static Collection values() { + return values(ManagedIdentityTypes.class); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MarketplaceSubscriptionStatus.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MarketplaceSubscriptionStatus.java new file mode 100644 index 000000000000..80b268bf0b2f --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MarketplaceSubscriptionStatus.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource + * will go in Suspended state. + */ +public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { + /** + * Static value Active for MarketplaceSubscriptionStatus. + */ + public static final MarketplaceSubscriptionStatus ACTIVE = fromString("Active"); + + /** + * Static value Suspended for MarketplaceSubscriptionStatus. + */ + public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); + + /** + * Creates a new instance of MarketplaceSubscriptionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MarketplaceSubscriptionStatus() { + } + + /** + * Creates or finds a MarketplaceSubscriptionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding MarketplaceSubscriptionStatus. + */ + public static MarketplaceSubscriptionStatus fromString(String name) { + return fromString(name, MarketplaceSubscriptionStatus.class); + } + + /** + * Gets known MarketplaceSubscriptionStatus values. + * + * @return known MarketplaceSubscriptionStatus values. + */ + public static Collection values() { + return values(MarketplaceSubscriptionStatus.class); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorOperations.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorOperations.java new file mode 100644 index 000000000000..226cc6a5a114 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorOperations.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of MonitorOperations. + */ +public interface MonitorOperations { + /** + * Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. + */ + Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + Context context); + + /** + * Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent. + */ + VMExtensionPayload vMHostPayload(String resourceGroupName, String monitorName); + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName); + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, VMHostUpdateRequest body, + Context context); + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVMHosts(String resourceGroupName, String monitorName); + + /** + * List the compute resources currently being monitored by the Logz main account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVMHosts(String resourceGroupName, String monitorName, Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorProperties.java new file mode 100644 index 000000000000..13219aa3d3f7 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorProperties.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties specific to the monitor resource. + */ +@Fluent +public final class MonitorProperties implements JsonSerializable { + /* + * Flag specifying if the resource provisioning state as tracked by ARM. + */ + private ProvisioningState provisioningState; + + /* + * Flag specifying if the resource monitoring is enabled or disabled. + */ + private MonitoringStatus monitoringStatus; + + /* + * Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource + * will go in Suspended state. + */ + private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; + + /* + * The logzOrganizationProperties property. + */ + private LogzOrganizationProperties logzOrganizationProperties; + + /* + * The userInfo property. + */ + private UserInfo userInfo; + + /* + * The planData property. + */ + private PlanData planData; + + /* + * The liftrResourceCategory property. + */ + private LiftrResourceCategories liftrResourceCategory; + + /* + * The priority of the resource. + */ + private Integer liftrResourcePreference; + + /** + * Creates an instance of MonitorProperties class. + */ + public MonitorProperties() { + } + + /** + * Get the provisioningState property: Flag specifying if the resource provisioning state as tracked by ARM. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the monitoringStatus property: Flag specifying if the resource monitoring is enabled or disabled. + * + * @return the monitoringStatus value. + */ + public MonitoringStatus monitoringStatus() { + return this.monitoringStatus; + } + + /** + * Set the monitoringStatus property: Flag specifying if the resource monitoring is enabled or disabled. + * + * @param monitoringStatus the monitoringStatus value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties withMonitoringStatus(MonitoringStatus monitoringStatus) { + this.monitoringStatus = monitoringStatus; + return this; + } + + /** + * Get the marketplaceSubscriptionStatus property: Flag specifying the Marketplace Subscription Status of the + * resource. If payment is not made in time, the resource will go in Suspended state. + * + * @return the marketplaceSubscriptionStatus value. + */ + public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { + return this.marketplaceSubscriptionStatus; + } + + /** + * Set the marketplaceSubscriptionStatus property: Flag specifying the Marketplace Subscription Status of the + * resource. If payment is not made in time, the resource will go in Suspended state. + * + * @param marketplaceSubscriptionStatus the marketplaceSubscriptionStatus value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties + withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus marketplaceSubscriptionStatus) { + this.marketplaceSubscriptionStatus = marketplaceSubscriptionStatus; + return this; + } + + /** + * Get the logzOrganizationProperties property: The logzOrganizationProperties property. + * + * @return the logzOrganizationProperties value. + */ + public LogzOrganizationProperties logzOrganizationProperties() { + return this.logzOrganizationProperties; + } + + /** + * Set the logzOrganizationProperties property: The logzOrganizationProperties property. + * + * @param logzOrganizationProperties the logzOrganizationProperties value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties withLogzOrganizationProperties(LogzOrganizationProperties logzOrganizationProperties) { + this.logzOrganizationProperties = logzOrganizationProperties; + return this; + } + + /** + * Get the userInfo property: The userInfo property. + * + * @return the userInfo value. + */ + public UserInfo userInfo() { + return this.userInfo; + } + + /** + * Set the userInfo property: The userInfo property. + * + * @param userInfo the userInfo value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties withUserInfo(UserInfo userInfo) { + this.userInfo = userInfo; + return this; + } + + /** + * Get the planData property: The planData property. + * + * @return the planData value. + */ + public PlanData planData() { + return this.planData; + } + + /** + * Set the planData property: The planData property. + * + * @param planData the planData value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties withPlanData(PlanData planData) { + this.planData = planData; + return this; + } + + /** + * Get the liftrResourceCategory property: The liftrResourceCategory property. + * + * @return the liftrResourceCategory value. + */ + public LiftrResourceCategories liftrResourceCategory() { + return this.liftrResourceCategory; + } + + /** + * Get the liftrResourcePreference property: The priority of the resource. + * + * @return the liftrResourcePreference value. + */ + public Integer liftrResourcePreference() { + return this.liftrResourcePreference; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logzOrganizationProperties() != null) { + logzOrganizationProperties().validate(); + } + if (userInfo() != null) { + userInfo().validate(); + } + if (planData() != null) { + planData().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("monitoringStatus", + this.monitoringStatus == null ? null : this.monitoringStatus.toString()); + jsonWriter.writeStringField("marketplaceSubscriptionStatus", + this.marketplaceSubscriptionStatus == null ? null : this.marketplaceSubscriptionStatus.toString()); + jsonWriter.writeJsonField("logzOrganizationProperties", this.logzOrganizationProperties); + jsonWriter.writeJsonField("userInfo", this.userInfo); + jsonWriter.writeJsonField("planData", this.planData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitorProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitorProperties. + */ + public static MonitorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitorProperties deserializedMonitorProperties = new MonitorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedMonitorProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("monitoringStatus".equals(fieldName)) { + deserializedMonitorProperties.monitoringStatus = MonitoringStatus.fromString(reader.getString()); + } else if ("marketplaceSubscriptionStatus".equals(fieldName)) { + deserializedMonitorProperties.marketplaceSubscriptionStatus + = MarketplaceSubscriptionStatus.fromString(reader.getString()); + } else if ("logzOrganizationProperties".equals(fieldName)) { + deserializedMonitorProperties.logzOrganizationProperties + = LogzOrganizationProperties.fromJson(reader); + } else if ("userInfo".equals(fieldName)) { + deserializedMonitorProperties.userInfo = UserInfo.fromJson(reader); + } else if ("planData".equals(fieldName)) { + deserializedMonitorProperties.planData = PlanData.fromJson(reader); + } else if ("liftrResourceCategory".equals(fieldName)) { + deserializedMonitorProperties.liftrResourceCategory + = LiftrResourceCategories.fromString(reader.getString()); + } else if ("liftrResourcePreference".equals(fieldName)) { + deserializedMonitorProperties.liftrResourcePreference = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitorProperties; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorUpdateProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorUpdateProperties.java new file mode 100644 index 000000000000..48a1b9c88cb9 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorUpdateProperties.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The set of properties that can be update in a PATCH request to a monitor resource. + */ +@Fluent +public final class MonitorUpdateProperties implements JsonSerializable { + /* + * Flag specifying if the resource monitoring is enabled or disabled. + */ + private MonitoringStatus monitoringStatus; + + /** + * Creates an instance of MonitorUpdateProperties class. + */ + public MonitorUpdateProperties() { + } + + /** + * Get the monitoringStatus property: Flag specifying if the resource monitoring is enabled or disabled. + * + * @return the monitoringStatus value. + */ + public MonitoringStatus monitoringStatus() { + return this.monitoringStatus; + } + + /** + * Set the monitoringStatus property: Flag specifying if the resource monitoring is enabled or disabled. + * + * @param monitoringStatus the monitoringStatus value to set. + * @return the MonitorUpdateProperties object itself. + */ + public MonitorUpdateProperties withMonitoringStatus(MonitoringStatus monitoringStatus) { + this.monitoringStatus = monitoringStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("monitoringStatus", + this.monitoringStatus == null ? null : this.monitoringStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitorUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitorUpdateProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitorUpdateProperties. + */ + public static MonitorUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitorUpdateProperties deserializedMonitorUpdateProperties = new MonitorUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("monitoringStatus".equals(fieldName)) { + deserializedMonitorUpdateProperties.monitoringStatus + = MonitoringStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitorUpdateProperties; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResource.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResource.java new file mode 100644 index 000000000000..355d9e1cd0f2 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResource.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; + +/** + * An immutable client-side representation of MonitoredResource. + */ +public interface MonitoredResource { + /** + * Gets the id property: The ARM id of the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the sendingMetrics property: Flag indicating if resource is sending metrics to Logz. + * + * @return the sendingMetrics value. + */ + Boolean sendingMetrics(); + + /** + * Gets the reasonForMetricsStatus property: Reason for why the resource is sending metrics (or why it is not + * sending). + * + * @return the reasonForMetricsStatus value. + */ + String reasonForMetricsStatus(); + + /** + * Gets the sendingLogs property: Flag indicating if resource is sending logs to Logz. + * + * @return the sendingLogs value. + */ + Boolean sendingLogs(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the reasonForLogsStatus property: Reason for why the resource is sending logs (or why it is not sending). + * + * @return the reasonForLogsStatus value. + */ + String reasonForLogsStatus(); + + /** + * Gets the inner com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner object. + * + * @return the inner object. + */ + MonitoredResourceInner innerModel(); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResourceListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResourceListResponse.java new file mode 100644 index 000000000000..0df8a223336c --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResourceListResponse.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Response of a list operation. + */ +@Fluent +public final class MonitoredResourceListResponse implements JsonSerializable { + /* + * Results of a list operation. + */ + private List value; + + /* + * Link to the next set of results, if any. + */ + private String nextLink; + + /** + * Creates an instance of MonitoredResourceListResponse class. + */ + public MonitoredResourceListResponse() { + } + + /** + * Get the value property: Results of a list operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Results of a list operation. + * + * @param value the value value to set. + * @return the MonitoredResourceListResponse object itself. + */ + public MonitoredResourceListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results, if any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results, if any. + * + * @param nextLink the nextLink value to set. + * @return the MonitoredResourceListResponse object itself. + */ + public MonitoredResourceListResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitoredResourceListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitoredResourceListResponse if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitoredResourceListResponse. + */ + public static MonitoredResourceListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitoredResourceListResponse deserializedMonitoredResourceListResponse + = new MonitoredResourceListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MonitoredResourceInner.fromJson(reader1)); + deserializedMonitoredResourceListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMonitoredResourceListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitoredResourceListResponse; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringStatus.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringStatus.java new file mode 100644 index 000000000000..3fec44d22aeb --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Flag specifying if the resource monitoring is enabled or disabled. + */ +public final class MonitoringStatus extends ExpandableStringEnum { + /** + * Static value Enabled for MonitoringStatus. + */ + public static final MonitoringStatus ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for MonitoringStatus. + */ + public static final MonitoringStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MonitoringStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitoringStatus() { + } + + /** + * Creates or finds a MonitoringStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitoringStatus. + */ + public static MonitoringStatus fromString(String name) { + return fromString(name, MonitoringStatus.class); + } + + /** + * Gets known MonitoringStatus values. + * + * @return known MonitoringStatus values. + */ + public static Collection values() { + return values(MonitoringStatus.class); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRules.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRules.java new file mode 100644 index 000000000000..5e8dc28bebe1 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRules.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; + +/** + * An immutable client-side representation of MonitoringTagRules. + */ +public interface MonitoringTagRules { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: Definition of the properties for a TagRules resource. + * + * @return the properties value. + */ + MonitoringTagRulesProperties properties(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner object. + * + * @return the inner object. + */ + MonitoringTagRulesInner innerModel(); + + /** + * The entirety of the MonitoringTagRules definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The MonitoringTagRules definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the MonitoringTagRules definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the MonitoringTagRules definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, monitorName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @return the next definition stage. + */ + WithCreate withExistingMonitor(String resourceGroupName, String monitorName); + } + + /** + * The stage of the MonitoringTagRules definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + MonitoringTagRules create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + MonitoringTagRules create(Context context); + } + + /** + * The stage of the MonitoringTagRules definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Definition of the properties for a TagRules resource.. + * + * @param properties Definition of the properties for a TagRules resource. + * @return the next definition stage. + */ + WithCreate withProperties(MonitoringTagRulesProperties properties); + } + } + + /** + * Begins update for the MonitoringTagRules resource. + * + * @return the stage of resource update. + */ + MonitoringTagRules.Update update(); + + /** + * The template for MonitoringTagRules update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + MonitoringTagRules apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + MonitoringTagRules apply(Context context); + } + + /** + * The MonitoringTagRules update stages. + */ + interface UpdateStages { + /** + * The stage of the MonitoringTagRules update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Definition of the properties for a TagRules resource.. + * + * @param properties Definition of the properties for a TagRules resource. + * @return the next definition stage. + */ + Update withProperties(MonitoringTagRulesProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + MonitoringTagRules refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + MonitoringTagRules refresh(Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesListResponse.java new file mode 100644 index 000000000000..5a009593e5c6 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesListResponse.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import java.io.IOException; +import java.util.List; + +/** + * Response of a list operation. + */ +@Fluent +public final class MonitoringTagRulesListResponse implements JsonSerializable { + /* + * Results of a list operation. + */ + private List value; + + /* + * Link to the next set of results, if any. + */ + private String nextLink; + + /** + * Creates an instance of MonitoringTagRulesListResponse class. + */ + public MonitoringTagRulesListResponse() { + } + + /** + * Get the value property: Results of a list operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Results of a list operation. + * + * @param value the value value to set. + * @return the MonitoringTagRulesListResponse object itself. + */ + public MonitoringTagRulesListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results, if any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results, if any. + * + * @param nextLink the nextLink value to set. + * @return the MonitoringTagRulesListResponse object itself. + */ + public MonitoringTagRulesListResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitoringTagRulesListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitoringTagRulesListResponse if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitoringTagRulesListResponse. + */ + public static MonitoringTagRulesListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitoringTagRulesListResponse deserializedMonitoringTagRulesListResponse + = new MonitoringTagRulesListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MonitoringTagRulesInner.fromJson(reader1)); + deserializedMonitoringTagRulesListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMonitoringTagRulesListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitoringTagRulesListResponse; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesProperties.java new file mode 100644 index 000000000000..bf62f1f6eec0 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesProperties.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Definition of the properties for a TagRules resource. + */ +@Fluent +public final class MonitoringTagRulesProperties implements JsonSerializable { + /* + * Flag specifying if the resource provisioning state as tracked by ARM. + */ + private ProvisioningState provisioningState; + + /* + * Set of rules for sending logs for the Monitor resource. + */ + private LogRules logRules; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + private SystemData systemData; + + /** + * Creates an instance of MonitoringTagRulesProperties class. + */ + public MonitoringTagRulesProperties() { + } + + /** + * Get the provisioningState property: Flag specifying if the resource provisioning state as tracked by ARM. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the logRules property: Set of rules for sending logs for the Monitor resource. + * + * @return the logRules value. + */ + public LogRules logRules() { + return this.logRules; + } + + /** + * Set the logRules property: Set of rules for sending logs for the Monitor resource. + * + * @param logRules the logRules value to set. + * @return the MonitoringTagRulesProperties object itself. + */ + public MonitoringTagRulesProperties withLogRules(LogRules logRules) { + this.logRules = logRules; + return this; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logRules() != null) { + logRules().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("logRules", this.logRules); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitoringTagRulesProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitoringTagRulesProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitoringTagRulesProperties. + */ + public static MonitoringTagRulesProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitoringTagRulesProperties deserializedMonitoringTagRulesProperties = new MonitoringTagRulesProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedMonitoringTagRulesProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("logRules".equals(fieldName)) { + deserializedMonitoringTagRulesProperties.logRules = LogRules.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMonitoringTagRulesProperties.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitoringTagRulesProperties; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Monitors.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Monitors.java new file mode 100644 index 000000000000..672a23a5fe08 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Monitors.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Monitors. + */ +public interface Monitors { + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); + + /** + * List the resources currently being monitored by the Logz monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + Context context); + + /** + * List all monitors under the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List all monitors under the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all monitors under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get the properties of a specific monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, + Context context); + + /** + * Get the properties of a specific monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource. + */ + LogzMonitorResource getByResourceGroup(String resourceGroupName, String monitorName); + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String monitorName); + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String monitorName, Context context); + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. + */ + PagedIterable listUserRoles(String resourceGroupName, String monitorName); + + /** + * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. + */ + PagedIterable listUserRoles(String resourceGroupName, String monitorName, UserRoleRequest body, + Context context); + + /** + * Get the properties of a specific monitor resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource along with {@link Response}. + */ + LogzMonitorResource getById(String id); + + /** + * Get the properties of a specific monitor resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a specific monitor resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new LogzMonitorResource resource. + * + * @param name resource name. + * @return the first stage of the new LogzMonitorResource definition. + */ + LogzMonitorResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationDisplay.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationDisplay.java new file mode 100644 index 000000000000..4a8847f0d869 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationDisplay.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The object that represents the operation. + */ +@Fluent +public final class OperationDisplay implements JsonSerializable { + /* + * Service provider, i.e., Microsoft.Logz. + */ + private String provider; + + /* + * Type on which the operation is performed, e.g., 'monitors'. + */ + private String resource; + + /* + * Operation type, e.g., read, write, delete, etc. + */ + private String operation; + + /* + * Description of the operation, e.g., 'Write monitors'. + */ + private String description; + + /** + * Creates an instance of OperationDisplay class. + */ + public OperationDisplay() { + } + + /** + * Get the provider property: Service provider, i.e., Microsoft.Logz. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider property: Service provider, i.e., Microsoft.Logz. + * + * @param provider the provider value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the resource property: Type on which the operation is performed, e.g., 'monitors'. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource property: Type on which the operation is performed, e.g., 'monitors'. + * + * @param resource the resource value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the operation property: Operation type, e.g., read, write, delete, etc. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Set the operation property: Operation type, e.g., read, write, delete, etc. + * + * @param operation the operation value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the description property: Description of the operation, e.g., 'Write monitors'. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the operation, e.g., 'Write monitors'. + * + * @param description the description value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", this.provider); + jsonWriter.writeStringField("resource", this.resource); + jsonWriter.writeStringField("operation", this.operation); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDisplay. + */ + public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDisplay deserializedOperationDisplay = new OperationDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationDisplay.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationDisplay.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationDisplay.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDisplay.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDisplay; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationListResult.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationListResult.java new file mode 100644 index 000000000000..230883566f9d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationListResult.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; +import java.io.IOException; +import java.util.List; + +/** + * Result of GET request to list the Microsoft.Logz operations. + */ +@Fluent +public final class OperationListResult implements JsonSerializable { + /* + * List of operations supported by the Microsoft.Logz provider. + */ + private List value; + + /* + * URL to get the next set of operation list results if there are any. + */ + private String nextLink; + + /** + * Creates an instance of OperationListResult class. + */ + public OperationListResult() { + } + + /** + * Get the value property: List of operations supported by the Microsoft.Logz provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of operations supported by the Microsoft.Logz provider. + * + * @param value the value value to set. + * @return the OperationListResult object itself. + */ + public OperationListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: URL to get the next set of operation list results if there are any. + * + * @param nextLink the nextLink value to set. + * @return the OperationListResult object itself. + */ + public OperationListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationListResult. + */ + public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationListResult deserializedOperationListResult = new OperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> OperationResultInner.fromJson(reader1)); + deserializedOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationListResult; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationResult.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationResult.java new file mode 100644 index 000000000000..6074920249c7 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationResult.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; + +/** + * An immutable client-side representation of OperationResult. + */ +public interface OperationResult { + /** + * Gets the name property: Operation name, i.e., {provider}/{resource}/{operation}. + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: Indicates whether the operation is a data action. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: The object that represents the operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: Origin of the operation. + * + * @return the origin value. + */ + String origin(); + + /** + * Gets the inner com.azure.resourcemanager.logz.fluent.models.OperationResultInner object. + * + * @return the inner object. + */ + OperationResultInner innerModel(); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Operations.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Operations.java new file mode 100644 index 000000000000..b172f31e3bbc --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Operations.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Operations. + */ +public interface Operations { + /** + * List all operations provided by Microsoft.Logz. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List all operations provided by Microsoft.Logz. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/PlanData.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/PlanData.java new file mode 100644 index 000000000000..4c25e09e5f74 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/PlanData.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The PlanData model. + */ +@Fluent +public final class PlanData implements JsonSerializable { + /* + * different usage type like PAYG/COMMITTED. this could be enum + */ + private String usageType; + + /* + * different billing cycles like MONTHLY/WEEKLY. this could be enum + */ + private String billingCycle; + + /* + * plan id as published by Logz + */ + private String planDetails; + + /* + * date when plan was applied + */ + private OffsetDateTime effectiveDate; + + /** + * Creates an instance of PlanData class. + */ + public PlanData() { + } + + /** + * Get the usageType property: different usage type like PAYG/COMMITTED. this could be enum. + * + * @return the usageType value. + */ + public String usageType() { + return this.usageType; + } + + /** + * Set the usageType property: different usage type like PAYG/COMMITTED. this could be enum. + * + * @param usageType the usageType value to set. + * @return the PlanData object itself. + */ + public PlanData withUsageType(String usageType) { + this.usageType = usageType; + return this; + } + + /** + * Get the billingCycle property: different billing cycles like MONTHLY/WEEKLY. this could be enum. + * + * @return the billingCycle value. + */ + public String billingCycle() { + return this.billingCycle; + } + + /** + * Set the billingCycle property: different billing cycles like MONTHLY/WEEKLY. this could be enum. + * + * @param billingCycle the billingCycle value to set. + * @return the PlanData object itself. + */ + public PlanData withBillingCycle(String billingCycle) { + this.billingCycle = billingCycle; + return this; + } + + /** + * Get the planDetails property: plan id as published by Logz. + * + * @return the planDetails value. + */ + public String planDetails() { + return this.planDetails; + } + + /** + * Set the planDetails property: plan id as published by Logz. + * + * @param planDetails the planDetails value to set. + * @return the PlanData object itself. + */ + public PlanData withPlanDetails(String planDetails) { + this.planDetails = planDetails; + return this; + } + + /** + * Get the effectiveDate property: date when plan was applied. + * + * @return the effectiveDate value. + */ + public OffsetDateTime effectiveDate() { + return this.effectiveDate; + } + + /** + * Set the effectiveDate property: date when plan was applied. + * + * @param effectiveDate the effectiveDate value to set. + * @return the PlanData object itself. + */ + public PlanData withEffectiveDate(OffsetDateTime effectiveDate) { + this.effectiveDate = effectiveDate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("usageType", this.usageType); + jsonWriter.writeStringField("billingCycle", this.billingCycle); + jsonWriter.writeStringField("planDetails", this.planDetails); + jsonWriter.writeStringField("effectiveDate", + this.effectiveDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.effectiveDate)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlanData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlanData if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the PlanData. + */ + public static PlanData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlanData deserializedPlanData = new PlanData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("usageType".equals(fieldName)) { + deserializedPlanData.usageType = reader.getString(); + } else if ("billingCycle".equals(fieldName)) { + deserializedPlanData.billingCycle = reader.getString(); + } else if ("planDetails".equals(fieldName)) { + deserializedPlanData.planDetails = reader.getString(); + } else if ("effectiveDate".equals(fieldName)) { + deserializedPlanData.effectiveDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedPlanData; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ProvisioningState.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ProvisioningState.java new file mode 100644 index 000000000000..5091f3b037e7 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ProvisioningState.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Flag specifying if the resource provisioning state as tracked by ARM. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** + * Static value Accepted for ProvisioningState. + */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Static value Creating for ProvisioningState. + */ + public static final ProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for ProvisioningState. + */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for ProvisioningState. + */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Succeeded for ProvisioningState. + */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ProvisioningState. + */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ProvisioningState. + */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Deleted for ProvisioningState. + */ + public static final ProvisioningState DELETED = fromString("Deleted"); + + /** + * Static value NotSpecified for ProvisioningState. + */ + public static final ProvisioningState NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOnStates.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOnStates.java new file mode 100644 index 000000000000..0717e1588bca --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOnStates.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Various states of the SSO resource. + */ +public final class SingleSignOnStates extends ExpandableStringEnum { + /** + * Static value Initial for SingleSignOnStates. + */ + public static final SingleSignOnStates INITIAL = fromString("Initial"); + + /** + * Static value Enable for SingleSignOnStates. + */ + public static final SingleSignOnStates ENABLE = fromString("Enable"); + + /** + * Static value Disable for SingleSignOnStates. + */ + public static final SingleSignOnStates DISABLE = fromString("Disable"); + + /** + * Static value Existing for SingleSignOnStates. + */ + public static final SingleSignOnStates EXISTING = fromString("Existing"); + + /** + * Creates a new instance of SingleSignOnStates value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SingleSignOnStates() { + } + + /** + * Creates or finds a SingleSignOnStates from its string representation. + * + * @param name a name to look for. + * @return the corresponding SingleSignOnStates. + */ + public static SingleSignOnStates fromString(String name) { + return fromString(name, SingleSignOnStates.class); + } + + /** + * Gets known SingleSignOnStates values. + * + * @return known SingleSignOnStates values. + */ + public static Collection values() { + return values(SingleSignOnStates.class); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOns.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOns.java new file mode 100644 index 000000000000..005b9892fdc4 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOns.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of SingleSignOns. + */ +public interface SingleSignOns { + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String monitorName); + + /** + * List the single sign-on configurations for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String monitorName, Context context); + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String monitorName, + String configurationName, Context context); + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param configurationName The configurationName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor. + */ + LogzSingleSignOnResource get(String resourceGroupName, String monitorName, String configurationName); + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor along with {@link Response}. + */ + LogzSingleSignOnResource getById(String id); + + /** + * Gets the Logz single sign-on resource for the given Monitor. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Logz single sign-on resource for the given Monitor along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new LogzSingleSignOnResource resource. + * + * @param name resource name. + * @return the first stage of the new LogzSingleSignOnResource definition. + */ + LogzSingleSignOnResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRules.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRules.java new file mode 100644 index 000000000000..f1f51e8f8acf --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRules.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; + +/** + * Resource collection API of SubAccountTagRules. + */ +public interface SubAccountTagRules { + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String monitorName, String subAccountName); + + /** + * List the tag rules for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String monitorName, String subAccountName, + Context context); + + /** + * Create or update a tag rule set for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. + */ + Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context); + + /** + * Create or update a tag rule set for a given sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capture logs and metrics of Azure resources based on ARM tags. + */ + MonitoringTagRules createOrUpdate(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName, Context context); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource. + */ + MonitoringTagRules get(String resourceGroupName, String monitorName, String subAccountName, String ruleSetName); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + SubAccountTagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String monitorName, String subAccountName, String ruleSetName); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteHeaders.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteHeaders.java new file mode 100644 index 000000000000..8c78e484242f --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteHeaders.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The SubAccountTagRulesDeleteHeaders model. + */ +@Fluent +public final class SubAccountTagRulesDeleteHeaders { + /* + * The location property. + */ + private String location; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of SubAccountTagRulesDeleteHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public SubAccountTagRulesDeleteHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + + /** + * Get the location property: The location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location property. + * + * @param location the location value to set. + * @return the SubAccountTagRulesDeleteHeaders object itself. + */ + public SubAccountTagRulesDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteResponse.java new file mode 100644 index 000000000000..1afaa1a2607d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteResponse.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the delete operation. + */ +public final class SubAccountTagRulesDeleteResponse extends ResponseBase { + /** + * Creates an instance of SubAccountTagRulesDeleteResponse. + * + * @param request the request which resulted in this SubAccountTagRulesDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public SubAccountTagRulesDeleteResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, + SubAccountTagRulesDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccounts.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccounts.java new file mode 100644 index 000000000000..1afd0b4b46f2 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccounts.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; + +/** + * Resource collection API of SubAccounts. + */ +public interface SubAccounts { + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String monitorName); + + /** + * List the sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String monitorName, Context context); + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + LogzMonitorResource create(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + LogzMonitorResource create(String resourceGroupName, String monitorName, String subAccountName, + LogzMonitorResourceInner body, Context context); + + /** + * Get a sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sub account under a given monitor resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String monitorName, String subAccountName, + Context context); + + /** + * Get a sub account under a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sub account under a given monitor resource. + */ + LogzMonitorResource get(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String monitorName, String subAccountName, Context context); + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response updateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceUpdateParameters body, Context context); + + /** + * Update a monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + LogzMonitorResource update(String resourceGroupName, String monitorName, String subAccountName); + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName); + + /** + * List the resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName, Context context); + + /** + * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. + */ + Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context); + + /** + * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of payload to be passed while installing VM agent. + */ + VMExtensionPayload vMHostPayload(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, String subAccountName); + + /** + * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param body Request body to update the collection for agent installed in the given monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, String subAccountName, + VMHostUpdateRequest body, Context context); + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName); + + /** + * List the compute resources currently being monitored by the Logz sub account resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param subAccountName Sub Account resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName, + Context context); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagAction.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagAction.java new file mode 100644 index 000000000000..df0dc32823a9 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagAction.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Valid actions for a filtering tag. Exclusion takes priority over inclusion. + */ +public final class TagAction extends ExpandableStringEnum { + /** + * Static value Include for TagAction. + */ + public static final TagAction INCLUDE = fromString("Include"); + + /** + * Static value Exclude for TagAction. + */ + public static final TagAction EXCLUDE = fromString("Exclude"); + + /** + * Creates a new instance of TagAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TagAction() { + } + + /** + * Creates or finds a TagAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding TagAction. + */ + public static TagAction fromString(String name) { + return fromString(name, TagAction.class); + } + + /** + * Gets known TagAction values. + * + * @return known TagAction values. + */ + public static Collection values() { + return values(TagAction.class); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRules.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRules.java new file mode 100644 index 000000000000..18327d04aba0 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRules.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of TagRules. + */ +public interface TagRules { + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String monitorName); + + /** + * List the tag rules for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String monitorName, Context context); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource. + */ + MonitoringTagRules get(String resourceGroupName, String monitorName, String ruleSetName); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + TagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param ruleSetName The ruleSetName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String monitorName, String ruleSetName); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response}. + */ + MonitoringTagRules getById(String id); + + /** + * Get a tag rule set for a given monitor resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a tag rule set for a given monitor resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a tag rule set for a given monitor resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + TagRulesDeleteResponse deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new MonitoringTagRules resource. + * + * @param name resource name. + * @return the first stage of the new MonitoringTagRules definition. + */ + MonitoringTagRules.DefinitionStages.Blank define(String name); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteHeaders.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteHeaders.java new file mode 100644 index 000000000000..a75056a7c183 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteHeaders.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The TagRulesDeleteHeaders model. + */ +@Fluent +public final class TagRulesDeleteHeaders { + /* + * The location property. + */ + private String location; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of TagRulesDeleteHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public TagRulesDeleteHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + + /** + * Get the location property: The location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location property. + * + * @param location the location value to set. + * @return the TagRulesDeleteHeaders object itself. + */ + public TagRulesDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteResponse.java new file mode 100644 index 000000000000..84e51dde89a3 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteResponse.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the delete operation. + */ +public final class TagRulesDeleteResponse extends ResponseBase { + /** + * Creates an instance of TagRulesDeleteResponse. + * + * @param request the request which resulted in this TagRulesDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TagRulesDeleteResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, + TagRulesDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserInfo.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserInfo.java new file mode 100644 index 000000000000..14427b920c48 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserInfo.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The UserInfo model. + */ +@Fluent +public final class UserInfo implements JsonSerializable { + /* + * First Name of the user + */ + private String firstName; + + /* + * Last Name of the user + */ + private String lastName; + + /* + * Email of the user used by Logz for contacting them if needed + */ + private String emailAddress; + + /* + * Phone number of the user used by Logz for contacting them if needed + */ + private String phoneNumber; + + /** + * Creates an instance of UserInfo class. + */ + public UserInfo() { + } + + /** + * Get the firstName property: First Name of the user. + * + * @return the firstName value. + */ + public String firstName() { + return this.firstName; + } + + /** + * Set the firstName property: First Name of the user. + * + * @param firstName the firstName value to set. + * @return the UserInfo object itself. + */ + public UserInfo withFirstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get the lastName property: Last Name of the user. + * + * @return the lastName value. + */ + public String lastName() { + return this.lastName; + } + + /** + * Set the lastName property: Last Name of the user. + * + * @param lastName the lastName value to set. + * @return the UserInfo object itself. + */ + public UserInfo withLastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get the emailAddress property: Email of the user used by Logz for contacting them if needed. + * + * @return the emailAddress value. + */ + public String emailAddress() { + return this.emailAddress; + } + + /** + * Set the emailAddress property: Email of the user used by Logz for contacting them if needed. + * + * @param emailAddress the emailAddress value to set. + * @return the UserInfo object itself. + */ + public UserInfo withEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + return this; + } + + /** + * Get the phoneNumber property: Phone number of the user used by Logz for contacting them if needed. + * + * @return the phoneNumber value. + */ + public String phoneNumber() { + return this.phoneNumber; + } + + /** + * Set the phoneNumber property: Phone number of the user used by Logz for contacting them if needed. + * + * @param phoneNumber the phoneNumber value to set. + * @return the UserInfo object itself. + */ + public UserInfo withPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstName", this.firstName); + jsonWriter.writeStringField("lastName", this.lastName); + jsonWriter.writeStringField("emailAddress", this.emailAddress); + jsonWriter.writeStringField("phoneNumber", this.phoneNumber); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserInfo if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the UserInfo. + */ + public static UserInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserInfo deserializedUserInfo = new UserInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("firstName".equals(fieldName)) { + deserializedUserInfo.firstName = reader.getString(); + } else if ("lastName".equals(fieldName)) { + deserializedUserInfo.lastName = reader.getString(); + } else if ("emailAddress".equals(fieldName)) { + deserializedUserInfo.emailAddress = reader.getString(); + } else if ("phoneNumber".equals(fieldName)) { + deserializedUserInfo.phoneNumber = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserInfo; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRole.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRole.java new file mode 100644 index 000000000000..bc33325cfe08 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRole.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * User roles on configured in Logz.io account. + */ +public final class UserRole extends ExpandableStringEnum { + /** + * Static value None for UserRole. + */ + public static final UserRole NONE = fromString("None"); + + /** + * Static value User for UserRole. + */ + public static final UserRole USER = fromString("User"); + + /** + * Static value Admin for UserRole. + */ + public static final UserRole ADMIN = fromString("Admin"); + + /** + * Creates a new instance of UserRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UserRole() { + } + + /** + * Creates or finds a UserRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding UserRole. + */ + public static UserRole fromString(String name) { + return fromString(name, UserRole.class); + } + + /** + * Gets known UserRole values. + * + * @return known UserRole values. + */ + public static Collection values() { + return values(UserRole.class); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleListResponse.java new file mode 100644 index 000000000000..931ec5d0ce5d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleListResponse.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for list of user's role for Logz.io account. + */ +@Fluent +public final class UserRoleListResponse implements JsonSerializable { + /* + * List of user roles for Logz.io account. + */ + private List value; + + /* + * Link to the next set of results, if any. + */ + private String nextLink; + + /** + * Creates an instance of UserRoleListResponse class. + */ + public UserRoleListResponse() { + } + + /** + * Get the value property: List of user roles for Logz.io account. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of user roles for Logz.io account. + * + * @param value the value value to set. + * @return the UserRoleListResponse object itself. + */ + public UserRoleListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results, if any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results, if any. + * + * @param nextLink the nextLink value to set. + * @return the UserRoleListResponse object itself. + */ + public UserRoleListResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserRoleListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserRoleListResponse if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserRoleListResponse. + */ + public static UserRoleListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserRoleListResponse deserializedUserRoleListResponse = new UserRoleListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> UserRoleResponseInner.fromJson(reader1)); + deserializedUserRoleListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedUserRoleListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserRoleListResponse; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleRequest.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleRequest.java new file mode 100644 index 000000000000..1324f033ef2e --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleRequest.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Request for checking user's role for Logz.io account. + */ +@Fluent +public final class UserRoleRequest implements JsonSerializable { + /* + * Email of the user used by Logz for contacting them if needed + */ + private String emailAddress; + + /** + * Creates an instance of UserRoleRequest class. + */ + public UserRoleRequest() { + } + + /** + * Get the emailAddress property: Email of the user used by Logz for contacting them if needed. + * + * @return the emailAddress value. + */ + public String emailAddress() { + return this.emailAddress; + } + + /** + * Set the emailAddress property: Email of the user used by Logz for contacting them if needed. + * + * @param emailAddress the emailAddress value to set. + * @return the UserRoleRequest object itself. + */ + public UserRoleRequest withEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("emailAddress", this.emailAddress); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserRoleRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserRoleRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the UserRoleRequest. + */ + public static UserRoleRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserRoleRequest deserializedUserRoleRequest = new UserRoleRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("emailAddress".equals(fieldName)) { + deserializedUserRoleRequest.emailAddress = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserRoleRequest; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleResponse.java new file mode 100644 index 000000000000..cdf125e7d7fa --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; + +/** + * An immutable client-side representation of UserRoleResponse. + */ +public interface UserRoleResponse { + /** + * Gets the role property: User roles on configured in Logz.io account. + * + * @return the role value. + */ + UserRole role(); + + /** + * Gets the inner com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner object. + * + * @return the inner object. + */ + UserRoleResponseInner innerModel(); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMExtensionPayload.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMExtensionPayload.java new file mode 100644 index 000000000000..66553e38a688 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMExtensionPayload.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner; + +/** + * An immutable client-side representation of VMExtensionPayload. + */ +public interface VMExtensionPayload { + /** + * Gets the apiKey property: API Key corresponding to the resource. + * + * @return the apiKey value. + */ + String apiKey(); + + /** + * Gets the region property: Logz.io region where the resource has been created. + * + * @return the region value. + */ + String region(); + + /** + * Gets the inner com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner object. + * + * @return the inner object. + */ + VMExtensionPayloadInner innerModel(); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateRequest.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateRequest.java new file mode 100644 index 000000000000..6b72e9347930 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateRequest.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import java.io.IOException; +import java.util.List; + +/** + * Request of a list VM Host Update Operation. + */ +@Fluent +public final class VMHostUpdateRequest implements JsonSerializable { + /* + * Request of a list vm host update operation. + */ + private List vmResourceIds; + + /* + * Specifies the state of the operation - install/ delete. + */ + private VMHostUpdateStates state; + + /** + * Creates an instance of VMHostUpdateRequest class. + */ + public VMHostUpdateRequest() { + } + + /** + * Get the vmResourceIds property: Request of a list vm host update operation. + * + * @return the vmResourceIds value. + */ + public List vmResourceIds() { + return this.vmResourceIds; + } + + /** + * Set the vmResourceIds property: Request of a list vm host update operation. + * + * @param vmResourceIds the vmResourceIds value to set. + * @return the VMHostUpdateRequest object itself. + */ + public VMHostUpdateRequest withVmResourceIds(List vmResourceIds) { + this.vmResourceIds = vmResourceIds; + return this; + } + + /** + * Get the state property: Specifies the state of the operation - install/ delete. + * + * @return the state value. + */ + public VMHostUpdateStates state() { + return this.state; + } + + /** + * Set the state property: Specifies the state of the operation - install/ delete. + * + * @param state the state value to set. + * @return the VMHostUpdateRequest object itself. + */ + public VMHostUpdateRequest withState(VMHostUpdateStates state) { + this.state = state; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vmResourceIds() != null) { + vmResourceIds().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("vmResourceIds", this.vmResourceIds, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMHostUpdateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMHostUpdateRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VMHostUpdateRequest. + */ + public static VMHostUpdateRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMHostUpdateRequest deserializedVMHostUpdateRequest = new VMHostUpdateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vmResourceIds".equals(fieldName)) { + List vmResourceIds + = reader.readArray(reader1 -> VMResourcesInner.fromJson(reader1)); + deserializedVMHostUpdateRequest.vmResourceIds = vmResourceIds; + } else if ("state".equals(fieldName)) { + deserializedVMHostUpdateRequest.state = VMHostUpdateStates.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVMHostUpdateRequest; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateStates.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateStates.java new file mode 100644 index 000000000000..861fa81f8d93 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateStates.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Various states of the updating vm extension on resource. + */ +public final class VMHostUpdateStates extends ExpandableStringEnum { + /** + * Static value Install for VMHostUpdateStates. + */ + public static final VMHostUpdateStates INSTALL = fromString("Install"); + + /** + * Static value Delete for VMHostUpdateStates. + */ + public static final VMHostUpdateStates DELETE = fromString("Delete"); + + /** + * Creates a new instance of VMHostUpdateStates value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VMHostUpdateStates() { + } + + /** + * Creates or finds a VMHostUpdateStates from its string representation. + * + * @param name a name to look for. + * @return the corresponding VMHostUpdateStates. + */ + public static VMHostUpdateStates fromString(String name) { + return fromString(name, VMHostUpdateStates.class); + } + + /** + * Gets known VMHostUpdateStates values. + * + * @return known VMHostUpdateStates values. + */ + public static Collection values() { + return values(VMHostUpdateStates.class); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResources.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResources.java new file mode 100644 index 000000000000..3dddd80c0db1 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResources.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; + +/** + * An immutable client-side representation of VMResources. + */ +public interface VMResources { + /** + * Gets the id property: Request of a list vm host update operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the agentVersion property: Version of the Logz agent installed on the VM. + * + * @return the agentVersion value. + */ + String agentVersion(); + + /** + * Gets the inner com.azure.resourcemanager.logz.fluent.models.VMResourcesInner object. + * + * @return the inner object. + */ + VMResourcesInner innerModel(); +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResourcesListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResourcesListResponse.java new file mode 100644 index 000000000000..830bd5a459d0 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResourcesListResponse.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import java.io.IOException; +import java.util.List; + +/** + * Response of a list VM Host Update Operation. + */ +@Fluent +public final class VMResourcesListResponse implements JsonSerializable { + /* + * Response of a list vm host update operation. + */ + private List value; + + /* + * Link to the next set of results, if any. + */ + private String nextLink; + + /** + * Creates an instance of VMResourcesListResponse class. + */ + public VMResourcesListResponse() { + } + + /** + * Get the value property: Response of a list vm host update operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Response of a list vm host update operation. + * + * @param value the value value to set. + * @return the VMResourcesListResponse object itself. + */ + public VMResourcesListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results, if any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results, if any. + * + * @param nextLink the nextLink value to set. + * @return the VMResourcesListResponse object itself. + */ + public VMResourcesListResponse withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMResourcesListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMResourcesListResponse if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VMResourcesListResponse. + */ + public static VMResourcesListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMResourcesListResponse deserializedVMResourcesListResponse = new VMResourcesListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> VMResourcesInner.fromJson(reader1)); + deserializedVMResourcesListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVMResourcesListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVMResourcesListResponse; + }); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/package-info.java new file mode 100644 index 000000000000..7df24f49b0be --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for MicrosoftLogz. + * null. + */ +package com.azure.resourcemanager.logz.models; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/package-info.java new file mode 100644 index 000000000000..8763558f204f --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for MicrosoftLogz. + * null. + */ +package com.azure.resourcemanager.logz; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/module-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/module-info.java new file mode 100644 index 000000000000..d84b6af83734 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/module-info.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.logz { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.logz; + exports com.azure.resourcemanager.logz.fluent; + exports com.azure.resourcemanager.logz.fluent.models; + exports com.azure.resourcemanager.logz.models; + + opens com.azure.resourcemanager.logz.fluent.models to com.azure.core; + opens com.azure.resourcemanager.logz.models to com.azure.core; +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/proxy-config.json b/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/proxy-config.json new file mode 100644 index 000000000000..51ca11fead1d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/proxy-config.json @@ -0,0 +1 @@ +[["com.azure.resourcemanager.logz.implementation.MonitorOperationsClientImpl$MonitorOperationsService"],["com.azure.resourcemanager.logz.implementation.MonitorsClientImpl$MonitorsService"],["com.azure.resourcemanager.logz.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.logz.implementation.SingleSignOnsClientImpl$SingleSignOnsService"],["com.azure.resourcemanager.logz.implementation.SubAccountTagRulesClientImpl$SubAccountTagRulesService"],["com.azure.resourcemanager.logz.implementation.SubAccountsClientImpl$SubAccountsService"],["com.azure.resourcemanager.logz.implementation.TagRulesClientImpl$TagRulesService"]] \ No newline at end of file diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/reflect-config.json b/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/reflect-config.json new file mode 100644 index 000000000000..0637a088a01e --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/reflect-config.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVMHostsSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVMHostsSamples.java new file mode 100644 index 000000000000..4f7578d61cff --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVMHostsSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for MonitorOperation ListVMHosts. + */ +public final class MonitorOperationListVMHostsSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_List.json + */ + /** + * Sample code: MainAccount_VMHosts_List. + * + * @param manager Entry point to LogzManager. + */ + public static void mainAccountVMHostsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitorOperations().listVMHosts("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVmHostUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVmHostUpdateSamples.java new file mode 100644 index 000000000000..03b8e43bf00f --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVmHostUpdateSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for MonitorOperation ListVmHostUpdate. + */ +public final class MonitorOperationListVmHostUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Update.json + */ + /** + * Sample code: MainAccount_VMHosts_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void mainAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitorOperations() + .listVmHostUpdate("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationVMHostPayloadSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationVMHostPayloadSamples.java new file mode 100644 index 000000000000..1c555c0b63a3 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationVMHostPayloadSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for MonitorOperation VMHostPayload. + */ +public final class MonitorOperationVMHostPayloadSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Payload.json + */ + /** + * Sample code: MainAccount_VMHosts_Payload. + * + * @param manager Entry point to LogzManager. + */ + public static void mainAccountVMHostsPayload(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitorOperations() + .vMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsCreateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsCreateSamples.java new file mode 100644 index 000000000000..5a11de74a73e --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsCreateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for Monitors Create. + */ +public final class MonitorsCreateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Create.json + */ + /** + * Sample code: Monitors_Create. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsCreate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors() + .define("myMonitor") + .withRegion((String) null) + .withExistingResourceGroup("myResourceGroup") + .create(); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteSamples.java new file mode 100644 index 000000000000..870d777b28a8 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for Monitors Delete. + */ +public final class MonitorsDeleteSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Delete.json + */ + /** + * Sample code: Monitors_Delete. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsDelete(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().delete("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..8195af5fdf8a --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for Monitors GetByResourceGroup. + */ +public final class MonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Get.json + */ + /** + * Sample code: Monitors_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupSamples.java new file mode 100644 index 000000000000..67f7391788cd --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for Monitors ListByResourceGroup. + */ +public final class MonitorsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_ListByResourceGroup.json + */ + /** + * Sample code: Monitors_ListByResourceGroup. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsListByResourceGroup(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesSamples.java new file mode 100644 index 000000000000..13b30396cab5 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for Monitors ListMonitoredResources. + */ +public final class MonitorsListMonitoredResourcesSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MonitoredResources_List.json + */ + /** + * Sample code: MonitoredResources_List. + * + * @param manager Entry point to LogzManager. + */ + public static void monitoredResourcesList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListSamples.java new file mode 100644 index 000000000000..30edcb8725ec --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for Monitors List. + */ +public final class MonitorsListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_List.json + */ + /** + * Sample code: Monitors_List. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesSamples.java new file mode 100644 index 000000000000..ec2595db15e1 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for Monitors ListUserRoles. + */ +public final class MonitorsListUserRolesSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_listUserRoles.json + */ + /** + * Sample code: MainAccount_VMHosts_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void mainAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.monitors().listUserRoles("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsUpdateSamples.java new file mode 100644 index 000000000000..db7cae78ac78 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.resourcemanager.logz.models.LogzMonitorResource; + +/** + * Samples for Monitors Update. + */ +public final class MonitorsUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Update.json + */ + /** + * Sample code: Monitors_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void monitorsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + LogzMonitorResource resource = manager.monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/OperationsListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/OperationsListSamples.java new file mode 100644 index 000000000000..30492d0bad2e --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/OperationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to LogzManager. + */ + public static void operationsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnCreateOrUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnCreateOrUpdateSamples.java new file mode 100644 index 000000000000..cb78abb7114c --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnCreateOrUpdateSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SingleSignOn CreateOrUpdate. + */ +public final class SingleSignOnCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/ + * SingleSignOnConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: SingleSignOnConfigurations_CreateOrUpdate. + * + * @param manager Entry point to LogzManager. + */ + public static void singleSignOnConfigurationsCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.singleSignOns().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnGetSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnGetSamples.java new file mode 100644 index 000000000000..9fbae80d6a3c --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SingleSignOn Get. + */ +public final class SingleSignOnGetSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_Get.json + */ + /** + * Sample code: SingleSignOnConfigurations_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void singleSignOnConfigurationsGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.singleSignOns() + .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnListSamples.java new file mode 100644 index 000000000000..7d756e8a066b --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SingleSignOn List. + */ +public final class SingleSignOnListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_List. + * json + */ + /** + * Sample code: SingleSignOnConfigurations_List. + * + * @param manager Entry point to LogzManager. + */ + public static void singleSignOnConfigurationsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.singleSignOns().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountCreateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountCreateSamples.java new file mode 100644 index 000000000000..3ad40d64bf87 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountCreateSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccount Create. + */ +public final class SubAccountCreateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Create.json + */ + /** + * Sample code: subAccount_Create. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountCreate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .create("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountDeleteSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountDeleteSamples.java new file mode 100644 index 000000000000..ad4a0eecffb1 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccount Delete. + */ +public final class SubAccountDeleteSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Delete.json + */ + /** + * Sample code: SubAccount_Delete. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountDelete(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts().delete("myResourceGroup", "myMonitor", "someName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountGetSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountGetSamples.java new file mode 100644 index 000000000000..0b6829e2de8d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccount Get. + */ +public final class SubAccountGetSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Get.json + */ + /** + * Sample code: SubAccount_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListMonitoredResourcesSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListMonitoredResourcesSamples.java new file mode 100644 index 000000000000..5614bd2cd620 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListMonitoredResourcesSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccount ListMonitoredResources. + */ +public final class SubAccountListMonitoredResourcesSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_MonitoredResources_List. + * json + */ + /** + * Sample code: SubAccount_MonitoredResources_List. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountMonitoredResourcesList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .listMonitoredResources("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListSamples.java new file mode 100644 index 000000000000..3760f6f264f2 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccount List. + */ +public final class SubAccountListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_ListByResourceGroup.json + */ + /** + * Sample code: SubAccount_List. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVMHostsSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVMHostsSamples.java new file mode 100644 index 000000000000..64d4f822446c --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVMHostsSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccount ListVMHosts. + */ +public final class SubAccountListVMHostsSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_List.json + */ + /** + * Sample code: SubAccount_VMHosts_List. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountVMHostsList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .listVMHosts("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVmHostUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVmHostUpdateSamples.java new file mode 100644 index 000000000000..e656f09d45a4 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVmHostUpdateSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccount ListVmHostUpdate. + */ +public final class SubAccountListVmHostUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Update.json + */ + /** + * Sample code: SubAccount_VMHosts_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .listVmHostUpdate("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..6c3719219267 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccountTagRules CreateOrUpdate. + */ +public final class SubAccountTagRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_CreateOrUpdate. + * json + */ + /** + * Sample code: SubAccountTagRules_CreateOrUpdate. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountTagRulesCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccountTagRules() + .createOrUpdateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteSamples.java new file mode 100644 index 000000000000..fa05e1b7c530 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccountTagRules Delete. + */ +public final class SubAccountTagRulesDeleteSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Delete.json + */ + /** + * Sample code: TagRules_Delete. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesDelete(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccountTagRules() + .deleteWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetSamples.java new file mode 100644 index 000000000000..b14e4513c190 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccountTagRules Get. + */ +public final class SubAccountTagRulesGetSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Get.json + */ + /** + * Sample code: SubAccountTagRules_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountTagRulesGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccountTagRules() + .getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListSamples.java new file mode 100644 index 000000000000..a2b1ec28e2a6 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccountTagRules List. + */ +public final class SubAccountTagRulesListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_List.json + */ + /** + * Sample code: SubAccountTagRules_List. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountTagRulesList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccountTagRules() + .list("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountUpdateSamples.java new file mode 100644 index 000000000000..4a45b4718f07 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountUpdateSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccount Update. + */ +public final class SubAccountUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Update.json + */ + /** + * Sample code: SubAccount_Update. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .updateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountVMHostPayloadSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountVMHostPayloadSamples.java new file mode 100644 index 000000000000..624dd1de24d1 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountVMHostPayloadSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for SubAccount VMHostPayload. + */ +public final class SubAccountVMHostPayloadSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Payload.json + */ + /** + * Sample code: SubAccount_VMHosts_Payload. + * + * @param manager Entry point to LogzManager. + */ + public static void subAccountVMHostsPayload(com.azure.resourcemanager.logz.LogzManager manager) { + manager.subAccounts() + .vMHostPayloadWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..5295a65dc953 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for TagRules CreateOrUpdate. + */ +public final class TagRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_CreateOrUpdate.json + */ + /** + * Sample code: TagRules_CreateOrUpdate. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { + manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteSamples.java new file mode 100644 index 000000000000..94e456c193c2 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for TagRules Delete. + */ +public final class TagRulesDeleteSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Delete.json + */ + /** + * Sample code: TagRules_Delete. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesDelete(com.azure.resourcemanager.logz.LogzManager manager) { + manager.tagRules() + .deleteWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesGetSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesGetSamples.java new file mode 100644 index 000000000000..78cdc6679637 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for TagRules Get. + */ +public final class TagRulesGetSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Get.json + */ + /** + * Sample code: TagRules_Get. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesGet(com.azure.resourcemanager.logz.LogzManager manager) { + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesListSamples.java new file mode 100644 index 000000000000..7498c2ddb3c7 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +/** + * Samples for TagRules List. + */ +public final class TagRulesListSamples { + /* + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_List.json + */ + /** + * Sample code: TagRules_List. + * + * @param manager Entry point to LogzManager. + */ + public static void tagRulesList(com.azure.resourcemanager.logz.LogzManager manager) { + manager.tagRules().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/FilteringTagTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/FilteringTagTests.java new file mode 100644 index 000000000000..16ec3c24286e --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/FilteringTagTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.FilteringTag; +import com.azure.resourcemanager.logz.models.TagAction; +import org.junit.jupiter.api.Assertions; + +public final class FilteringTagTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FilteringTag model + = BinaryData.fromString("{\"name\":\"dkcglhsl\",\"value\":\"jdyggdtji\",\"action\":\"Include\"}") + .toObject(FilteringTag.class); + Assertions.assertEquals("dkcglhsl", model.name()); + Assertions.assertEquals("jdyggdtji", model.value()); + Assertions.assertEquals(TagAction.INCLUDE, model.action()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FilteringTag model + = new FilteringTag().withName("dkcglhsl").withValue("jdyggdtji").withAction(TagAction.INCLUDE); + model = BinaryData.fromObject(model).toObject(FilteringTag.class); + Assertions.assertEquals("dkcglhsl", model.name()); + Assertions.assertEquals("jdyggdtji", model.value()); + Assertions.assertEquals(TagAction.INCLUDE, model.action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/IdentityPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/IdentityPropertiesTests.java new file mode 100644 index 000000000000..065da0f671a7 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/IdentityPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.IdentityProperties; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import org.junit.jupiter.api.Assertions; + +public final class IdentityPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IdentityProperties model = BinaryData + .fromString( + "{\"principalId\":\"wpyeicxmqciwqvh\",\"tenantId\":\"ixuigdtopbobj\",\"type\":\"SystemAssigned\"}") + .toObject(IdentityProperties.class); + Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IdentityProperties model = new IdentityProperties().withType(ManagedIdentityTypes.SYSTEM_ASSIGNED); + model = BinaryData.fromObject(model).toObject(IdentityProperties.class); + Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, model.type()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogRulesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogRulesTests.java new file mode 100644 index 000000000000..30073a9874e2 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogRulesTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.FilteringTag; +import com.azure.resourcemanager.logz.models.LogRules; +import com.azure.resourcemanager.logz.models.TagAction; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class LogRulesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogRules model = BinaryData.fromString( + "{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":true,\"filteringTags\":[{\"name\":\"mcy\",\"value\":\"wlbjnpgacftade\",\"action\":\"Exclude\"},{\"name\":\"tyfsoppusuesn\",\"value\":\"dejbavo\",\"action\":\"Exclude\"},{\"name\":\"mohctb\",\"value\":\"udwxdndnvowguj\",\"action\":\"Exclude\"}]}") + .toObject(LogRules.class); + Assertions.assertEquals(true, model.sendAadLogs()); + Assertions.assertEquals(false, model.sendSubscriptionLogs()); + Assertions.assertEquals(true, model.sendActivityLogs()); + Assertions.assertEquals("mcy", model.filteringTags().get(0).name()); + Assertions.assertEquals("wlbjnpgacftade", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogRules model = new LogRules().withSendAadLogs(true) + .withSendSubscriptionLogs(false) + .withSendActivityLogs(true) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("mcy").withValue("wlbjnpgacftade").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("tyfsoppusuesn").withValue("dejbavo").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("mohctb").withValue("udwxdndnvowguj").withAction(TagAction.EXCLUDE))); + model = BinaryData.fromObject(model).toObject(LogRules.class); + Assertions.assertEquals(true, model.sendAadLogs()); + Assertions.assertEquals(false, model.sendSubscriptionLogs()); + Assertions.assertEquals(true, model.sendActivityLogs()); + Assertions.assertEquals("mcy", model.filteringTags().get(0).name()); + Assertions.assertEquals("wlbjnpgacftade", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceInnerTests.java new file mode 100644 index 000000000000..91244eea9ef9 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceInnerTests.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.models.IdentityProperties; +import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitorProperties; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import com.azure.resourcemanager.logz.models.PlanData; +import com.azure.resourcemanager.logz.models.UserInfo; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class LogzMonitorResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogzMonitorResourceInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Failed\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"prwzwbnguitnwui\",\"id\":\"a\",\"enterpriseAppId\":\"ufizuckyf\",\"singleSignOnUrl\":\"rfidfvzwdz\"},\"userInfo\":{\"firstName\":\"ymwisdkft\",\"lastName\":\"xmnteiwaop\",\"emailAddress\":\"mijcmmxdcufufs\",\"phoneNumber\":\"ymzidn\"},\"planData\":{\"usageType\":\"cxtbzsg\",\"billingCycle\":\"c\",\"planDetails\":\"newmdwzjeiachbo\",\"effectiveDate\":\"2021-05-15T06:55:08Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":1039180854},\"identity\":{\"principalId\":\"qpteeh\",\"tenantId\":\"vypyqrimzinpv\",\"type\":\"UserAssigned\"},\"location\":\"dkirsoodqxhcr\",\"tags\":{\"oifiyipjxsqwpgr\":\"hjtckwhd\",\"qabnmoc\":\"bznorcjxvsnby\"},\"id\":\"cyshurzafbljjgp\",\"name\":\"toqcjmklja\",\"type\":\"bqidtqaj\"}") + .toObject(LogzMonitorResourceInner.class); + Assertions.assertEquals("dkirsoodqxhcr", model.location()); + Assertions.assertEquals("hjtckwhd", model.tags().get("oifiyipjxsqwpgr")); + Assertions.assertEquals(MonitoringStatus.ENABLED, model.properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, + model.properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("prwzwbnguitnwui", model.properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("ufizuckyf", model.properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("rfidfvzwdz", model.properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("ymwisdkft", model.properties().userInfo().firstName()); + Assertions.assertEquals("xmnteiwaop", model.properties().userInfo().lastName()); + Assertions.assertEquals("mijcmmxdcufufs", model.properties().userInfo().emailAddress()); + Assertions.assertEquals("ymzidn", model.properties().userInfo().phoneNumber()); + Assertions.assertEquals("cxtbzsg", model.properties().planData().usageType()); + Assertions.assertEquals("c", model.properties().planData().billingCycle()); + Assertions.assertEquals("newmdwzjeiachbo", model.properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T06:55:08Z"), + model.properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, model.identity().type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogzMonitorResourceInner model = new LogzMonitorResourceInner().withLocation("dkirsoodqxhcr") + .withTags(mapOf("oifiyipjxsqwpgr", "hjtckwhd", "qabnmoc", "bznorcjxvsnby")) + .withProperties(new MonitorProperties().withMonitoringStatus(MonitoringStatus.ENABLED) + .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) + .withLogzOrganizationProperties(new LogzOrganizationProperties().withCompanyName("prwzwbnguitnwui") + .withEnterpriseAppId("ufizuckyf") + .withSingleSignOnUrl("rfidfvzwdz")) + .withUserInfo(new UserInfo().withFirstName("ymwisdkft") + .withLastName("xmnteiwaop") + .withEmailAddress("mijcmmxdcufufs") + .withPhoneNumber("ymzidn")) + .withPlanData(new PlanData().withUsageType("cxtbzsg") + .withBillingCycle("c") + .withPlanDetails("newmdwzjeiachbo") + .withEffectiveDate(OffsetDateTime.parse("2021-05-15T06:55:08Z")))) + .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.USER_ASSIGNED)); + model = BinaryData.fromObject(model).toObject(LogzMonitorResourceInner.class); + Assertions.assertEquals("dkirsoodqxhcr", model.location()); + Assertions.assertEquals("hjtckwhd", model.tags().get("oifiyipjxsqwpgr")); + Assertions.assertEquals(MonitoringStatus.ENABLED, model.properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, + model.properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("prwzwbnguitnwui", model.properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("ufizuckyf", model.properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("rfidfvzwdz", model.properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("ymwisdkft", model.properties().userInfo().firstName()); + Assertions.assertEquals("xmnteiwaop", model.properties().userInfo().lastName()); + Assertions.assertEquals("mijcmmxdcufufs", model.properties().userInfo().emailAddress()); + Assertions.assertEquals("ymzidn", model.properties().userInfo().phoneNumber()); + Assertions.assertEquals("cxtbzsg", model.properties().planData().usageType()); + Assertions.assertEquals("c", model.properties().planData().billingCycle()); + Assertions.assertEquals("newmdwzjeiachbo", model.properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T06:55:08Z"), + model.properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, model.identity().type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceListResponseTests.java new file mode 100644 index 000000000000..36ce884375b9 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceListResponseTests.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.models.IdentityProperties; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceListResponse; +import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitorProperties; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import com.azure.resourcemanager.logz.models.PlanData; +import com.azure.resourcemanager.logz.models.UserInfo; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class LogzMonitorResourceListResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogzMonitorResourceListResponse model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"k\",\"id\":\"audccsnhs\",\"enterpriseAppId\":\"nyejhkryhtnap\",\"singleSignOnUrl\":\"wlokjyem\"},\"userInfo\":{\"firstName\":\"ni\",\"lastName\":\"oxzjnchgejspod\",\"emailAddress\":\"ilzyd\",\"phoneNumber\":\"o\"},\"planData\":{\"usageType\":\"ahuxinpm\",\"billingCycle\":\"jaqwixjsp\",\"planDetails\":\"zvcputegjvwmfda\",\"effectiveDate\":\"2021-09-13T14:44:26Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":883957794},\"identity\":{\"principalId\":\"u\",\"tenantId\":\"uuvmkjozkrwfnd\",\"type\":\"SystemAssigned\"},\"location\":\"jpslwejd\",\"tags\":{\"psoacctazakljl\":\"ryo\",\"paojakhmsbzjh\":\"hbcryffdfdosyge\",\"hqtrgqjbpf\":\"rzevdphlxaol\"},\"id\":\"fsinzgvfcjrwzoxx\",\"name\":\"tfell\",\"type\":\"wfzitonpeqfpjk\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"xxypininmay\",\"id\":\"ybb\",\"enterpriseAppId\":\"odepoogin\",\"singleSignOnUrl\":\"amiheognarxz\"},\"userInfo\":{\"firstName\":\"eotusivyevc\",\"lastName\":\"qi\",\"emailAddress\":\"hungbwjzrnf\",\"phoneNumber\":\"xgispemvtzfkufu\"},\"planData\":{\"usageType\":\"ofx\",\"billingCycle\":\"ofjaeqjhqjb\",\"planDetails\":\"v\",\"effectiveDate\":\"2021-08-25T14:25:06Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":2084272233},\"identity\":{\"principalId\":\"sntnbybkzgcw\",\"tenantId\":\"clxxwrljdo\",\"type\":\"UserAssigned\"},\"location\":\"cqvkocrcjdkwtn\",\"tags\":{\"p\":\"njbiksqrglssain\",\"mgxsab\":\"wnzlljfmppeeb\",\"jczdzevndh\":\"yqduujit\",\"feusnhut\":\"rwpdappdsbdkvwrw\"},\"id\":\"eltmrldhugjzzdat\",\"name\":\"xhocdgeablgphuti\",\"type\":\"ndv\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"logzOrganizationProperties\":{\"companyName\":\"xhurok\",\"id\":\"yxolniwp\",\"enterpriseAppId\":\"ukjfkgiawxklr\",\"singleSignOnUrl\":\"lwckbasyypnddhs\"},\"userInfo\":{\"firstName\":\"acphejkoty\",\"lastName\":\"gou\",\"emailAddress\":\"ndlik\",\"phoneNumber\":\"qkgfgibma\"},\"planData\":{\"usageType\":\"keqsrxybzqqedq\",\"billingCycle\":\"bciqfouflm\",\"planDetails\":\"kzsmodm\",\"effectiveDate\":\"2021-07-22T23:50:49Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":173170794},\"identity\":{\"principalId\":\"tmut\",\"tenantId\":\"qktapspwgcuert\",\"type\":\"SystemAssigned\"},\"location\":\"dosvqwhbmdgbbjf\",\"tags\":{\"q\":\"mbmbexppbh\",\"algbquxigjyjg\":\"rolfpfp\",\"lnerkujysvleju\":\"jaoyfhrtx\"},\"id\":\"fqawrlyxw\",\"name\":\"kcprbnw\",\"type\":\"xgjvtbv\"}],\"nextLink\":\"sszdnru\"}") + .toObject(LogzMonitorResourceListResponse.class); + Assertions.assertEquals("jpslwejd", model.value().get(0).location()); + Assertions.assertEquals("ryo", model.value().get(0).tags().get("psoacctazakljl")); + Assertions.assertEquals(MonitoringStatus.DISABLED, model.value().get(0).properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, + model.value().get(0).properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("k", model.value().get(0).properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("nyejhkryhtnap", + model.value().get(0).properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("wlokjyem", + model.value().get(0).properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("ni", model.value().get(0).properties().userInfo().firstName()); + Assertions.assertEquals("oxzjnchgejspod", model.value().get(0).properties().userInfo().lastName()); + Assertions.assertEquals("ilzyd", model.value().get(0).properties().userInfo().emailAddress()); + Assertions.assertEquals("o", model.value().get(0).properties().userInfo().phoneNumber()); + Assertions.assertEquals("ahuxinpm", model.value().get(0).properties().planData().usageType()); + Assertions.assertEquals("jaqwixjsp", model.value().get(0).properties().planData().billingCycle()); + Assertions.assertEquals("zvcputegjvwmfda", model.value().get(0).properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:44:26Z"), + model.value().get(0).properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("sszdnru", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogzMonitorResourceListResponse model = new LogzMonitorResourceListResponse() + .withValue(Arrays.asList( + new LogzMonitorResourceInner().withLocation("jpslwejd") + .withTags(mapOf("psoacctazakljl", "ryo", "paojakhmsbzjh", "hbcryffdfdosyge", "hqtrgqjbpf", + "rzevdphlxaol")) + .withProperties(new MonitorProperties().withMonitoringStatus(MonitoringStatus.DISABLED) + .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) + .withLogzOrganizationProperties(new LogzOrganizationProperties().withCompanyName("k") + .withEnterpriseAppId("nyejhkryhtnap") + .withSingleSignOnUrl("wlokjyem")) + .withUserInfo(new UserInfo().withFirstName("ni") + .withLastName("oxzjnchgejspod") + .withEmailAddress("ilzyd") + .withPhoneNumber("o")) + .withPlanData(new PlanData().withUsageType("ahuxinpm") + .withBillingCycle("jaqwixjsp") + .withPlanDetails("zvcputegjvwmfda") + .withEffectiveDate(OffsetDateTime.parse("2021-09-13T14:44:26Z")))) + .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.SYSTEM_ASSIGNED)), + new LogzMonitorResourceInner().withLocation("cqvkocrcjdkwtn") + .withTags(mapOf("p", "njbiksqrglssain", "mgxsab", "wnzlljfmppeeb", "jczdzevndh", "yqduujit", + "feusnhut", "rwpdappdsbdkvwrw")) + .withProperties(new MonitorProperties().withMonitoringStatus(MonitoringStatus.DISABLED) + .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) + .withLogzOrganizationProperties(new LogzOrganizationProperties().withCompanyName("xxypininmay") + .withEnterpriseAppId("odepoogin") + .withSingleSignOnUrl("amiheognarxz")) + .withUserInfo(new UserInfo().withFirstName("eotusivyevc") + .withLastName("qi") + .withEmailAddress("hungbwjzrnf") + .withPhoneNumber("xgispemvtzfkufu")) + .withPlanData(new PlanData().withUsageType("ofx") + .withBillingCycle("ofjaeqjhqjb") + .withPlanDetails("v") + .withEffectiveDate(OffsetDateTime.parse("2021-08-25T14:25:06Z")))) + .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.USER_ASSIGNED)), + new LogzMonitorResourceInner().withLocation("dosvqwhbmdgbbjf") + .withTags(mapOf("q", "mbmbexppbh", "algbquxigjyjg", "rolfpfp", "lnerkujysvleju", "jaoyfhrtx")) + .withProperties(new MonitorProperties().withMonitoringStatus(MonitoringStatus.ENABLED) + .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.SUSPENDED) + .withLogzOrganizationProperties(new LogzOrganizationProperties().withCompanyName("xhurok") + .withEnterpriseAppId("ukjfkgiawxklr") + .withSingleSignOnUrl("lwckbasyypnddhs")) + .withUserInfo(new UserInfo().withFirstName("acphejkoty") + .withLastName("gou") + .withEmailAddress("ndlik") + .withPhoneNumber("qkgfgibma")) + .withPlanData(new PlanData().withUsageType("keqsrxybzqqedq") + .withBillingCycle("bciqfouflm") + .withPlanDetails("kzsmodm") + .withEffectiveDate(OffsetDateTime.parse("2021-07-22T23:50:49Z")))) + .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.SYSTEM_ASSIGNED)))) + .withNextLink("sszdnru"); + model = BinaryData.fromObject(model).toObject(LogzMonitorResourceListResponse.class); + Assertions.assertEquals("jpslwejd", model.value().get(0).location()); + Assertions.assertEquals("ryo", model.value().get(0).tags().get("psoacctazakljl")); + Assertions.assertEquals(MonitoringStatus.DISABLED, model.value().get(0).properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, + model.value().get(0).properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("k", model.value().get(0).properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("nyejhkryhtnap", + model.value().get(0).properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("wlokjyem", + model.value().get(0).properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("ni", model.value().get(0).properties().userInfo().firstName()); + Assertions.assertEquals("oxzjnchgejspod", model.value().get(0).properties().userInfo().lastName()); + Assertions.assertEquals("ilzyd", model.value().get(0).properties().userInfo().emailAddress()); + Assertions.assertEquals("o", model.value().get(0).properties().userInfo().phoneNumber()); + Assertions.assertEquals("ahuxinpm", model.value().get(0).properties().planData().usageType()); + Assertions.assertEquals("jaqwixjsp", model.value().get(0).properties().planData().billingCycle()); + Assertions.assertEquals("zvcputegjvwmfda", model.value().get(0).properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:44:26Z"), + model.value().get(0).properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("sszdnru", model.nextLink()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceUpdateParametersTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceUpdateParametersTests.java new file mode 100644 index 000000000000..00fc76c05641 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceUpdateParametersTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; +import com.azure.resourcemanager.logz.models.MonitorUpdateProperties; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class LogzMonitorResourceUpdateParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogzMonitorResourceUpdateParameters model = BinaryData + .fromString("{\"properties\":{\"monitoringStatus\":\"Enabled\"},\"tags\":{\"uhrzayvvt\":\"m\"}}") + .toObject(LogzMonitorResourceUpdateParameters.class); + Assertions.assertEquals(MonitoringStatus.ENABLED, model.properties().monitoringStatus()); + Assertions.assertEquals("m", model.tags().get("uhrzayvvt")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogzMonitorResourceUpdateParameters model = new LogzMonitorResourceUpdateParameters() + .withProperties(new MonitorUpdateProperties().withMonitoringStatus(MonitoringStatus.ENABLED)) + .withTags(mapOf("uhrzayvvt", "m")); + model = BinaryData.fromObject(model).toObject(LogzMonitorResourceUpdateParameters.class); + Assertions.assertEquals(MonitoringStatus.ENABLED, model.properties().monitoringStatus()); + Assertions.assertEquals("m", model.tags().get("uhrzayvvt")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzOrganizationPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzOrganizationPropertiesTests.java new file mode 100644 index 000000000000..c582ce945e5c --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzOrganizationPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; +import org.junit.jupiter.api.Assertions; + +public final class LogzOrganizationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogzOrganizationProperties model = BinaryData.fromString( + "{\"companyName\":\"k\",\"id\":\"kdkexxp\",\"enterpriseAppId\":\"fmxa\",\"singleSignOnUrl\":\"fjpgddtocjjxhvp\"}") + .toObject(LogzOrganizationProperties.class); + Assertions.assertEquals("k", model.companyName()); + Assertions.assertEquals("fmxa", model.enterpriseAppId()); + Assertions.assertEquals("fjpgddtocjjxhvp", model.singleSignOnUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogzOrganizationProperties model = new LogzOrganizationProperties().withCompanyName("k") + .withEnterpriseAppId("fmxa") + .withSingleSignOnUrl("fjpgddtocjjxhvp"); + model = BinaryData.fromObject(model).toObject(LogzOrganizationProperties.class); + Assertions.assertEquals("k", model.companyName()); + Assertions.assertEquals("fmxa", model.enterpriseAppId()); + Assertions.assertEquals("fjpgddtocjjxhvp", model.singleSignOnUrl()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnPropertiesTests.java new file mode 100644 index 000000000000..d1b272ddefe9 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnPropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; +import com.azure.resourcemanager.logz.models.SingleSignOnStates; +import org.junit.jupiter.api.Assertions; + +public final class LogzSingleSignOnPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogzSingleSignOnProperties model = BinaryData.fromString( + "{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"zyiuokk\",\"singleSignOnUrl\":\"hrdxwzywqsmbs\",\"provisioningState\":\"Creating\"}") + .toObject(LogzSingleSignOnProperties.class); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState()); + Assertions.assertEquals("zyiuokk", model.enterpriseAppId()); + Assertions.assertEquals("hrdxwzywqsmbs", model.singleSignOnUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogzSingleSignOnProperties model + = new LogzSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL) + .withEnterpriseAppId("zyiuokk") + .withSingleSignOnUrl("hrdxwzywqsmbs"); + model = BinaryData.fromObject(model).toObject(LogzSingleSignOnProperties.class); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState()); + Assertions.assertEquals("zyiuokk", model.enterpriseAppId()); + Assertions.assertEquals("hrdxwzywqsmbs", model.singleSignOnUrl()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceInnerTests.java new file mode 100644 index 000000000000..2fc36711e6ad --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceInnerTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; +import com.azure.resourcemanager.logz.models.SingleSignOnStates; +import org.junit.jupiter.api.Assertions; + +public final class LogzSingleSignOnResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogzSingleSignOnResourceInner model = BinaryData.fromString( + "{\"properties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"canoaeupf\",\"singleSignOnUrl\":\"hltrpmopjmcmatuo\",\"provisioningState\":\"Deleted\"},\"id\":\"fu\",\"name\":\"uaodsfcpk\",\"type\":\"xodpuozmyzydagfu\"}") + .toObject(LogzSingleSignOnResourceInner.class); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.properties().singleSignOnState()); + Assertions.assertEquals("canoaeupf", model.properties().enterpriseAppId()); + Assertions.assertEquals("hltrpmopjmcmatuo", model.properties().singleSignOnUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogzSingleSignOnResourceInner model = new LogzSingleSignOnResourceInner() + .withProperties(new LogzSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL) + .withEnterpriseAppId("canoaeupf") + .withSingleSignOnUrl("hltrpmopjmcmatuo")); + model = BinaryData.fromObject(model).toObject(LogzSingleSignOnResourceInner.class); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.properties().singleSignOnState()); + Assertions.assertEquals("canoaeupf", model.properties().enterpriseAppId()); + Assertions.assertEquals("hltrpmopjmcmatuo", model.properties().singleSignOnUrl()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceListResponseTests.java new file mode 100644 index 000000000000..8bf7c469f877 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceListResponseTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnResourceListResponse; +import com.azure.resourcemanager.logz.models.SingleSignOnStates; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class LogzSingleSignOnResourceListResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogzSingleSignOnResourceListResponse model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"yk\",\"singleSignOnUrl\":\"enevfyexfwhybci\",\"provisioningState\":\"Failed\"},\"id\":\"vdcsitynn\",\"name\":\"amdecte\",\"type\":\"f\"},{\"properties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"ypvhezrkg\",\"singleSignOnUrl\":\"c\",\"provisioningState\":\"Creating\"},\"id\":\"fovgmkqsleyyvxy\",\"name\":\"jpkcattpng\",\"type\":\"cr\"}],\"nextLink\":\"zsqpjhvmdajvny\"}") + .toObject(LogzSingleSignOnResourceListResponse.class); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.value().get(0).properties().singleSignOnState()); + Assertions.assertEquals("yk", model.value().get(0).properties().enterpriseAppId()); + Assertions.assertEquals("enevfyexfwhybci", model.value().get(0).properties().singleSignOnUrl()); + Assertions.assertEquals("zsqpjhvmdajvny", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogzSingleSignOnResourceListResponse model = new LogzSingleSignOnResourceListResponse().withValue(Arrays.asList( + new LogzSingleSignOnResourceInner() + .withProperties(new LogzSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL) + .withEnterpriseAppId("yk") + .withSingleSignOnUrl("enevfyexfwhybci")), + new LogzSingleSignOnResourceInner() + .withProperties(new LogzSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL) + .withEnterpriseAppId("ypvhezrkg") + .withSingleSignOnUrl("c")))) + .withNextLink("zsqpjhvmdajvny"); + model = BinaryData.fromObject(model).toObject(LogzSingleSignOnResourceListResponse.class); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.value().get(0).properties().singleSignOnState()); + Assertions.assertEquals("yk", model.value().get(0).properties().enterpriseAppId()); + Assertions.assertEquals("enevfyexfwhybci", model.value().get(0).properties().singleSignOnUrl()); + Assertions.assertEquals("zsqpjhvmdajvny", model.nextLink()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVMHostsMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVMHostsMockTests.java new file mode 100644 index 000000000000..ceeb0b967c5b --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVMHostsMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.VMResources; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorOperationsListVMHostsMockTests { + @Test + public void testListVMHosts() throws Exception { + String responseStr = "{\"value\":[{\"id\":\"iyylhalnswhccsp\",\"agentVersion\":\"aivwitqscywu\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.monitorOperations().listVMHosts("qhoftrmaequiah", "icslfaoq", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("iyylhalnswhccsp", response.iterator().next().id()); + Assertions.assertEquals("aivwitqscywu", response.iterator().next().agentVersion()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVmHostUpdateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVmHostUpdateMockTests.java new file mode 100644 index 000000000000..14d18d928f4d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVmHostUpdateMockTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; +import com.azure.resourcemanager.logz.models.VMHostUpdateStates; +import com.azure.resourcemanager.logz.models.VMResources; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorOperationsListVmHostUpdateMockTests { + @Test + public void testListVmHostUpdate() throws Exception { + String responseStr = "{\"value\":[{\"id\":\"dwoyuhhziuiefoz\",\"agentVersion\":\"dmsmlm\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.monitorOperations() + .listVmHostUpdate("qqmoaku", "gm", + new VMHostUpdateRequest() + .withVmResourceIds( + Arrays.asList(new VMResourcesInner().withId("rdgrtw").withAgentVersion("nuuzkopbm"))) + .withState(VMHostUpdateStates.INSTALL), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("dwoyuhhziuiefoz", response.iterator().next().id()); + Assertions.assertEquals("dmsmlm", response.iterator().next().agentVersion()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorPropertiesTests.java new file mode 100644 index 000000000000..93486b8578da --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorPropertiesTests.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitorProperties; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import com.azure.resourcemanager.logz.models.PlanData; +import com.azure.resourcemanager.logz.models.UserInfo; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class MonitorPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MonitorProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Canceled\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"krlkhbzhfepg\",\"id\":\"qex\",\"enterpriseAppId\":\"ocxscpaierhhbcs\",\"singleSignOnUrl\":\"ummajtjaod\"},\"userInfo\":{\"firstName\":\"nbdxk\",\"lastName\":\"xo\",\"emailAddress\":\"jionpimexgstxgc\",\"phoneNumber\":\"dg\"},\"planData\":{\"usageType\":\"jrmvdjwzrlo\",\"billingCycle\":\"clwhijcoejctbz\",\"planDetails\":\"s\",\"effectiveDate\":\"2021-09-16T11:00:54Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":475549149}") + .toObject(MonitorProperties.class); + Assertions.assertEquals(MonitoringStatus.ENABLED, model.monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, model.marketplaceSubscriptionStatus()); + Assertions.assertEquals("krlkhbzhfepg", model.logzOrganizationProperties().companyName()); + Assertions.assertEquals("ocxscpaierhhbcs", model.logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("ummajtjaod", model.logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("nbdxk", model.userInfo().firstName()); + Assertions.assertEquals("xo", model.userInfo().lastName()); + Assertions.assertEquals("jionpimexgstxgc", model.userInfo().emailAddress()); + Assertions.assertEquals("dg", model.userInfo().phoneNumber()); + Assertions.assertEquals("jrmvdjwzrlo", model.planData().usageType()); + Assertions.assertEquals("clwhijcoejctbz", model.planData().billingCycle()); + Assertions.assertEquals("s", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T11:00:54Z"), model.planData().effectiveDate()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MonitorProperties model = new MonitorProperties().withMonitoringStatus(MonitoringStatus.ENABLED) + .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) + .withLogzOrganizationProperties(new LogzOrganizationProperties().withCompanyName("krlkhbzhfepg") + .withEnterpriseAppId("ocxscpaierhhbcs") + .withSingleSignOnUrl("ummajtjaod")) + .withUserInfo(new UserInfo().withFirstName("nbdxk") + .withLastName("xo") + .withEmailAddress("jionpimexgstxgc") + .withPhoneNumber("dg")) + .withPlanData(new PlanData().withUsageType("jrmvdjwzrlo") + .withBillingCycle("clwhijcoejctbz") + .withPlanDetails("s") + .withEffectiveDate(OffsetDateTime.parse("2021-09-16T11:00:54Z"))); + model = BinaryData.fromObject(model).toObject(MonitorProperties.class); + Assertions.assertEquals(MonitoringStatus.ENABLED, model.monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, model.marketplaceSubscriptionStatus()); + Assertions.assertEquals("krlkhbzhfepg", model.logzOrganizationProperties().companyName()); + Assertions.assertEquals("ocxscpaierhhbcs", model.logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("ummajtjaod", model.logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("nbdxk", model.userInfo().firstName()); + Assertions.assertEquals("xo", model.userInfo().lastName()); + Assertions.assertEquals("jionpimexgstxgc", model.userInfo().emailAddress()); + Assertions.assertEquals("dg", model.userInfo().phoneNumber()); + Assertions.assertEquals("jrmvdjwzrlo", model.planData().usageType()); + Assertions.assertEquals("clwhijcoejctbz", model.planData().billingCycle()); + Assertions.assertEquals("s", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T11:00:54Z"), model.planData().effectiveDate()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorUpdatePropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorUpdatePropertiesTests.java new file mode 100644 index 000000000000..bd3a2c0be7dd --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorUpdatePropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.MonitorUpdateProperties; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import org.junit.jupiter.api.Assertions; + +public final class MonitorUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MonitorUpdateProperties model + = BinaryData.fromString("{\"monitoringStatus\":\"Enabled\"}").toObject(MonitorUpdateProperties.class); + Assertions.assertEquals(MonitoringStatus.ENABLED, model.monitoringStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MonitorUpdateProperties model = new MonitorUpdateProperties().withMonitoringStatus(MonitoringStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(MonitorUpdateProperties.class); + Assertions.assertEquals(MonitoringStatus.ENABLED, model.monitoringStatus()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceInnerTests.java new file mode 100644 index 000000000000..0f6f14f223de --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceInnerTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import org.junit.jupiter.api.Assertions; + +public final class MonitoredResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MonitoredResourceInner model = BinaryData.fromString( + "{\"id\":\"ifsqesaagdfmg\",\"sendingMetrics\":false,\"reasonForMetricsStatus\":\"j\",\"sendingLogs\":true,\"reasonForLogsStatus\":\"wmrvktsizntocipa\"}") + .toObject(MonitoredResourceInner.class); + Assertions.assertEquals("ifsqesaagdfmg", model.id()); + Assertions.assertEquals(false, model.sendingMetrics()); + Assertions.assertEquals("j", model.reasonForMetricsStatus()); + Assertions.assertEquals(true, model.sendingLogs()); + Assertions.assertEquals("wmrvktsizntocipa", model.reasonForLogsStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MonitoredResourceInner model = new MonitoredResourceInner().withId("ifsqesaagdfmg") + .withSendingMetrics(false) + .withReasonForMetricsStatus("j") + .withSendingLogs(true) + .withReasonForLogsStatus("wmrvktsizntocipa"); + model = BinaryData.fromObject(model).toObject(MonitoredResourceInner.class); + Assertions.assertEquals("ifsqesaagdfmg", model.id()); + Assertions.assertEquals(false, model.sendingMetrics()); + Assertions.assertEquals("j", model.reasonForMetricsStatus()); + Assertions.assertEquals(true, model.sendingLogs()); + Assertions.assertEquals("wmrvktsizntocipa", model.reasonForLogsStatus()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceListResponseTests.java new file mode 100644 index 000000000000..c8659b1f2fbb --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceListResponseTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; +import com.azure.resourcemanager.logz.models.MonitoredResourceListResponse; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class MonitoredResourceListResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MonitoredResourceListResponse model = BinaryData.fromString( + "{\"value\":[{\"id\":\"quvgjxpybczme\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"opb\",\"sendingLogs\":false,\"reasonForLogsStatus\":\"pidgsybbejhphoyc\"},{\"id\":\"xaobhdxbmtqioqjz\",\"sendingMetrics\":false,\"reasonForMetricsStatus\":\"muf\",\"sendingLogs\":false,\"reasonForLogsStatus\":\"izhwlrxy\"},{\"id\":\"soqijg\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"pazlobcufpdz\",\"sendingLogs\":false,\"reasonForLogsStatus\":\"qqjnqgl\"}],\"nextLink\":\"gnufoooj\"}") + .toObject(MonitoredResourceListResponse.class); + Assertions.assertEquals("quvgjxpybczme", model.value().get(0).id()); + Assertions.assertEquals(true, model.value().get(0).sendingMetrics()); + Assertions.assertEquals("opb", model.value().get(0).reasonForMetricsStatus()); + Assertions.assertEquals(false, model.value().get(0).sendingLogs()); + Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).reasonForLogsStatus()); + Assertions.assertEquals("gnufoooj", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MonitoredResourceListResponse model = new MonitoredResourceListResponse().withValue(Arrays.asList( + new MonitoredResourceInner().withId("quvgjxpybczme") + .withSendingMetrics(true) + .withReasonForMetricsStatus("opb") + .withSendingLogs(false) + .withReasonForLogsStatus("pidgsybbejhphoyc"), + new MonitoredResourceInner().withId("xaobhdxbmtqioqjz") + .withSendingMetrics(false) + .withReasonForMetricsStatus("muf") + .withSendingLogs(false) + .withReasonForLogsStatus("izhwlrxy"), + new MonitoredResourceInner().withId("soqijg") + .withSendingMetrics(true) + .withReasonForMetricsStatus("pazlobcufpdz") + .withSendingLogs(false) + .withReasonForLogsStatus("qqjnqgl"))) + .withNextLink("gnufoooj"); + model = BinaryData.fromObject(model).toObject(MonitoredResourceListResponse.class); + Assertions.assertEquals("quvgjxpybczme", model.value().get(0).id()); + Assertions.assertEquals(true, model.value().get(0).sendingMetrics()); + Assertions.assertEquals("opb", model.value().get(0).reasonForMetricsStatus()); + Assertions.assertEquals(false, model.value().get(0).sendingLogs()); + Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).reasonForLogsStatus()); + Assertions.assertEquals("gnufoooj", model.nextLink()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesInnerTests.java new file mode 100644 index 000000000000..69df48900c1f --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesInnerTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.FilteringTag; +import com.azure.resourcemanager.logz.models.LogRules; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; +import com.azure.resourcemanager.logz.models.TagAction; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class MonitoringTagRulesInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MonitoringTagRulesInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[{\"name\":\"nyktzlcuiy\",\"value\":\"qyw\",\"action\":\"Include\"},{\"name\":\"vynhzgpphrcg\",\"value\":\"cocpecfvmmcoofsx\",\"action\":\"Include\"},{\"name\":\"gbmqjqabcypmiv\",\"value\":\"lzu\",\"action\":\"Include\"},{\"name\":\"wnfnbacf\",\"value\":\"nlebxetqgtzxd\",\"action\":\"Include\"}]}},\"id\":\"qqwx\",\"name\":\"jfeallnwsub\",\"type\":\"snjampmng\"}") + .toObject(MonitoringTagRulesInner.class); + Assertions.assertEquals(false, model.properties().logRules().sendAadLogs()); + Assertions.assertEquals(false, model.properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(false, model.properties().logRules().sendActivityLogs()); + Assertions.assertEquals("nyktzlcuiy", model.properties().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("qyw", model.properties().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.properties().logRules().filteringTags().get(0).action()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MonitoringTagRulesInner model = new MonitoringTagRulesInner() + .withProperties(new MonitoringTagRulesProperties().withLogRules(new LogRules().withSendAadLogs(false) + .withSendSubscriptionLogs(false) + .withSendActivityLogs(false) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("nyktzlcuiy").withValue("qyw").withAction(TagAction.INCLUDE), + new FilteringTag().withName("vynhzgpphrcg") + .withValue("cocpecfvmmcoofsx") + .withAction(TagAction.INCLUDE), + new FilteringTag().withName("gbmqjqabcypmiv").withValue("lzu").withAction(TagAction.INCLUDE), + new FilteringTag().withName("wnfnbacf") + .withValue("nlebxetqgtzxd") + .withAction(TagAction.INCLUDE))))); + model = BinaryData.fromObject(model).toObject(MonitoringTagRulesInner.class); + Assertions.assertEquals(false, model.properties().logRules().sendAadLogs()); + Assertions.assertEquals(false, model.properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(false, model.properties().logRules().sendActivityLogs()); + Assertions.assertEquals("nyktzlcuiy", model.properties().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("qyw", model.properties().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.properties().logRules().filteringTags().get(0).action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesListResponseTests.java new file mode 100644 index 000000000000..8d4563cbda17 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesListResponseTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.FilteringTag; +import com.azure.resourcemanager.logz.models.LogRules; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesListResponse; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class MonitoringTagRulesListResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MonitoringTagRulesListResponse model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[{},{},{},{}]}},\"id\":\"xlefgugnxkrx\",\"name\":\"qmi\",\"type\":\"tthzrvqd\"}],\"nextLink\":\"bhj\"}") + .toObject(MonitoringTagRulesListResponse.class); + Assertions.assertEquals(true, model.value().get(0).properties().logRules().sendAadLogs()); + Assertions.assertEquals(false, model.value().get(0).properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(false, model.value().get(0).properties().logRules().sendActivityLogs()); + Assertions.assertEquals("bhj", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MonitoringTagRulesListResponse model = new MonitoringTagRulesListResponse() + .withValue( + Arrays + .asList( + new MonitoringTagRulesInner() + .withProperties( + new MonitoringTagRulesProperties() + .withLogRules( + new LogRules() + .withSendAadLogs(true) + .withSendSubscriptionLogs(false) + .withSendActivityLogs(false) + .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), + new FilteringTag(), new FilteringTag())))))) + .withNextLink("bhj"); + model = BinaryData.fromObject(model).toObject(MonitoringTagRulesListResponse.class); + Assertions.assertEquals(true, model.value().get(0).properties().logRules().sendAadLogs()); + Assertions.assertEquals(false, model.value().get(0).properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(false, model.value().get(0).properties().logRules().sendActivityLogs()); + Assertions.assertEquals("bhj", model.nextLink()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesPropertiesTests.java new file mode 100644 index 000000000000..353a26bb900d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesPropertiesTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.FilteringTag; +import com.azure.resourcemanager.logz.models.LogRules; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; +import com.azure.resourcemanager.logz.models.TagAction; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class MonitoringTagRulesPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MonitoringTagRulesProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Updating\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":true,\"filteringTags\":[{\"name\":\"bonqvpkvlrxnjeas\",\"value\":\"pheoflokeyy\",\"action\":\"Include\"},{\"name\":\"bdlwtgrhpdjpj\",\"value\":\"asxazjpqyegualhb\",\"action\":\"Include\"},{\"name\":\"jj\",\"value\":\"v\",\"action\":\"Exclude\"}]}}") + .toObject(MonitoringTagRulesProperties.class); + Assertions.assertEquals(false, model.logRules().sendAadLogs()); + Assertions.assertEquals(false, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(true, model.logRules().sendActivityLogs()); + Assertions.assertEquals("bonqvpkvlrxnjeas", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("pheoflokeyy", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MonitoringTagRulesProperties model = new MonitoringTagRulesProperties().withLogRules(new LogRules() + .withSendAadLogs(false) + .withSendSubscriptionLogs(false) + .withSendActivityLogs(true) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("bonqvpkvlrxnjeas").withValue("pheoflokeyy").withAction(TagAction.INCLUDE), + new FilteringTag().withName("bdlwtgrhpdjpj") + .withValue("asxazjpqyegualhb") + .withAction(TagAction.INCLUDE), + new FilteringTag().withName("jj").withValue("v").withAction(TagAction.EXCLUDE)))); + model = BinaryData.fromObject(model).toObject(MonitoringTagRulesProperties.class); + Assertions.assertEquals(false, model.logRules().sendAadLogs()); + Assertions.assertEquals(false, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(true, model.logRules().sendActivityLogs()); + Assertions.assertEquals("bonqvpkvlrxnjeas", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("pheoflokeyy", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsCreateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsCreateMockTests.java new file mode 100644 index 000000000000..839ff102f4f7 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsCreateMockTests.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.IdentityProperties; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitorProperties; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import com.azure.resourcemanager.logz.models.PlanData; +import com.azure.resourcemanager.logz.models.UserInfo; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"logzOrganizationProperties\":{\"companyName\":\"seyvj\",\"id\":\"rts\",\"enterpriseAppId\":\"spkdee\",\"singleSignOnUrl\":\"ofmxagkvtmelmqkr\"},\"userInfo\":{\"firstName\":\"vljua\",\"lastName\":\"quhcdhmduala\",\"emailAddress\":\"qpv\",\"phoneNumber\":\"dmwsrcrgvxpvgomz\"},\"planData\":{\"usageType\":\"isgwbnbbeldawkz\",\"billingCycle\":\"liourqhak\",\"planDetails\":\"hashsfwxosow\",\"effectiveDate\":\"2021-06-30T00:10:41Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":1879830205},\"identity\":{\"principalId\":\"oxdjebwpuc\",\"tenantId\":\"fvovbvmeuecivy\",\"type\":\"SystemAssigned\"},\"location\":\"euojgjrwju\",\"tags\":{\"dytdxwitx\":\"twm\",\"qwgxhniskx\":\"rjaw\"},\"id\":\"bkpyc\",\"name\":\"klwndnhjdauwhv\",\"type\":\"l\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogzMonitorResource response = manager.monitors() + .define("lpvlopw") + .withRegion("gyepsbjt") + .withExistingResourceGroup("gmgsxnkjzkde") + .withTags(mapOf("zwfqkqujidsuyon", "ugxywpmueef", "yudxytlmoy", "bglaocqxtccm", "fudwpznt", "xv", + "hckfrlhrx", "hdzhlrqj")) + .withProperties(new MonitorProperties().withMonitoringStatus(MonitoringStatus.ENABLED) + .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) + .withLogzOrganizationProperties(new LogzOrganizationProperties().withCompanyName("baiuebbaumny") + .withEnterpriseAppId("jn") + .withSingleSignOnUrl("ckhsmtxpsieb")) + .withUserInfo(new UserInfo().withFirstName("vpesapskrdqmhjjd") + .withLastName("ldwkyzxuutkn") + .withEmailAddress("scwsv") + .withPhoneNumber("otogtwrupqs")) + .withPlanData(new PlanData().withUsageType("micykvceoveilo") + .withBillingCycle("oty") + .withPlanDetails("fcnj") + .withEffectiveDate(OffsetDateTime.parse("2021-08-21T09:13:10Z")))) + .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.SYSTEM_ASSIGNED)) + .create(); + + Assertions.assertEquals("euojgjrwju", response.location()); + Assertions.assertEquals("twm", response.tags().get("dytdxwitx")); + Assertions.assertEquals(MonitoringStatus.ENABLED, response.properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.SUSPENDED, + response.properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("seyvj", response.properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("spkdee", response.properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("ofmxagkvtmelmqkr", + response.properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("vljua", response.properties().userInfo().firstName()); + Assertions.assertEquals("quhcdhmduala", response.properties().userInfo().lastName()); + Assertions.assertEquals("qpv", response.properties().userInfo().emailAddress()); + Assertions.assertEquals("dmwsrcrgvxpvgomz", response.properties().userInfo().phoneNumber()); + Assertions.assertEquals("isgwbnbbeldawkz", response.properties().planData().usageType()); + Assertions.assertEquals("liourqhak", response.properties().planData().billingCycle()); + Assertions.assertEquals("hashsfwxosow", response.properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-30T00:10:41Z"), + response.properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, response.identity().type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteMockTests.java new file mode 100644 index 000000000000..3e9a79711456 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.monitors().delete("xbzpfzab", "lcuhxwtctyqiklb", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..1607cc2d987d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Accepted\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"logzOrganizationProperties\":{\"companyName\":\"kadrgvt\",\"id\":\"gnbuy\",\"enterpriseAppId\":\"ijggmebfsiar\",\"singleSignOnUrl\":\"trcvpnazzmh\"},\"userInfo\":{\"firstName\":\"nmpxttdb\",\"lastName\":\"bnlankxmyskpb\",\"emailAddress\":\"nbtkcxywnytnr\",\"phoneNumber\":\"nlqidybyxczf\"},\"planData\":{\"usageType\":\"aaxdbabphlwrq\",\"billingCycle\":\"ktsthsucocmny\",\"planDetails\":\"zt\",\"effectiveDate\":\"2021-04-09T08:14:29Z\"},\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":1529613290},\"identity\":{\"principalId\":\"edckzywbiexzfey\",\"tenantId\":\"axibxujw\",\"type\":\"UserAssigned\"},\"location\":\"walm\",\"tags\":{\"zjancuxr\":\"oxaepd\"},\"id\":\"d\",\"name\":\"bavxbniwdjswzt\",\"type\":\"dbpgnxytxhp\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogzMonitorResource response = manager.monitors() + .getByResourceGroupWithResponse("qzahmgkbrp", "y", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("walm", response.location()); + Assertions.assertEquals("oxaepd", response.tags().get("zjancuxr")); + Assertions.assertEquals(MonitoringStatus.DISABLED, response.properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.SUSPENDED, + response.properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("kadrgvt", response.properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("ijggmebfsiar", response.properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("trcvpnazzmh", response.properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("nmpxttdb", response.properties().userInfo().firstName()); + Assertions.assertEquals("bnlankxmyskpb", response.properties().userInfo().lastName()); + Assertions.assertEquals("nbtkcxywnytnr", response.properties().userInfo().emailAddress()); + Assertions.assertEquals("nlqidybyxczf", response.properties().userInfo().phoneNumber()); + Assertions.assertEquals("aaxdbabphlwrq", response.properties().planData().usageType()); + Assertions.assertEquals("ktsthsucocmny", response.properties().planData().billingCycle()); + Assertions.assertEquals("zt", response.properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T08:14:29Z"), + response.properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.identity().type()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupMockTests.java new file mode 100644 index 000000000000..ef630fc2d278 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"xuconu\",\"id\":\"zf\",\"enterpriseAppId\":\"eyp\",\"singleSignOnUrl\":\"rmjmwvvjektc\"},\"userInfo\":{\"firstName\":\"nhwlrsffrzpwvl\",\"lastName\":\"q\",\"emailAddress\":\"iqylihkaetck\",\"phoneNumber\":\"fcivfsnkym\"},\"planData\":{\"usageType\":\"qhjfbebr\",\"billingCycle\":\"xerf\",\"planDetails\":\"utttxfvjrbirp\",\"effectiveDate\":\"2020-12-31T13:56:03Z\"},\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":1103023268},\"identity\":{\"principalId\":\"fnljky\",\"tenantId\":\"j\",\"type\":\"SystemAssigned\"},\"location\":\"j\",\"tags\":{\"yoxgvcltbgsnc\":\"dokgjl\",\"htxfvgxbfsmxnehm\":\"hkjeszzhbi\"},\"id\":\"vecxgodebfqkk\",\"name\":\"bmpukgriwflz\",\"type\":\"fbxzpuzycisp\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.monitors().listByResourceGroup("gyxzk", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("j", response.iterator().next().location()); + Assertions.assertEquals("dokgjl", response.iterator().next().tags().get("yoxgvcltbgsnc")); + Assertions.assertEquals(MonitoringStatus.DISABLED, response.iterator().next().properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, + response.iterator().next().properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("xuconu", + response.iterator().next().properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("eyp", + response.iterator().next().properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("rmjmwvvjektc", + response.iterator().next().properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("nhwlrsffrzpwvl", response.iterator().next().properties().userInfo().firstName()); + Assertions.assertEquals("q", response.iterator().next().properties().userInfo().lastName()); + Assertions.assertEquals("iqylihkaetck", response.iterator().next().properties().userInfo().emailAddress()); + Assertions.assertEquals("fcivfsnkym", response.iterator().next().properties().userInfo().phoneNumber()); + Assertions.assertEquals("qhjfbebr", response.iterator().next().properties().planData().usageType()); + Assertions.assertEquals("xerf", response.iterator().next().properties().planData().billingCycle()); + Assertions.assertEquals("utttxfvjrbirp", response.iterator().next().properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-31T13:56:03Z"), + response.iterator().next().properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMockTests.java new file mode 100644 index 000000000000..58c1c33266e0 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMockTests.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"logzOrganizationProperties\":{\"companyName\":\"fmvfaxkffeiit\",\"id\":\"vmezy\",\"enterpriseAppId\":\"hxmzsbbzoggig\",\"singleSignOnUrl\":\"wburvjxxjnspydpt\"},\"userInfo\":{\"firstName\":\"nkoukn\",\"lastName\":\"dwtiukbldngkp\",\"emailAddress\":\"ipazyxoegukgjnpi\",\"phoneNumber\":\"gygev\"},\"planData\":{\"usageType\":\"typmrbpizcdrqjsd\",\"billingCycle\":\"dnfyhxdeoejzicwi\",\"planDetails\":\"jttgzf\",\"effectiveDate\":\"2021-03-25T08:46:02Z\"},\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":1326905161},\"identity\":{\"principalId\":\"deyeamdphagalpbu\",\"tenantId\":\"gipwhonowkg\",\"type\":\"UserAssigned\"},\"location\":\"ankixzbinjeput\",\"tags\":{\"tiyqzrnkcqv\":\"ywnuzoq\"},\"id\":\"xlwhzlsicoh\",\"name\":\"qqn\",\"type\":\"vlryavwhheunmmq\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.monitors().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ankixzbinjeput", response.iterator().next().location()); + Assertions.assertEquals("ywnuzoq", response.iterator().next().tags().get("tiyqzrnkcqv")); + Assertions.assertEquals(MonitoringStatus.ENABLED, response.iterator().next().properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.SUSPENDED, + response.iterator().next().properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("fmvfaxkffeiit", + response.iterator().next().properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("hxmzsbbzoggig", + response.iterator().next().properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("wburvjxxjnspydpt", + response.iterator().next().properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("nkoukn", response.iterator().next().properties().userInfo().firstName()); + Assertions.assertEquals("dwtiukbldngkp", response.iterator().next().properties().userInfo().lastName()); + Assertions.assertEquals("ipazyxoegukgjnpi", response.iterator().next().properties().userInfo().emailAddress()); + Assertions.assertEquals("gygev", response.iterator().next().properties().userInfo().phoneNumber()); + Assertions.assertEquals("typmrbpizcdrqjsd", response.iterator().next().properties().planData().usageType()); + Assertions.assertEquals("dnfyhxdeoejzicwi", response.iterator().next().properties().planData().billingCycle()); + Assertions.assertEquals("jttgzf", response.iterator().next().properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T08:46:02Z"), + response.iterator().next().properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.iterator().next().identity().type()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesMockTests.java new file mode 100644 index 000000000000..5a46c6861b09 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesMockTests.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.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.MonitoredResource; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsListMonitoredResourcesMockTests { + @Test + public void testListMonitoredResources() throws Exception { + String responseStr + = "{\"value\":[{\"id\":\"y\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"e\",\"sendingLogs\":true,\"reasonForLogsStatus\":\"pclhocohslk\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.monitors().listMonitoredResources("ied", "ugidyjrr", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("y", response.iterator().next().id()); + Assertions.assertEquals(true, response.iterator().next().sendingMetrics()); + Assertions.assertEquals("e", response.iterator().next().reasonForMetricsStatus()); + Assertions.assertEquals(true, response.iterator().next().sendingLogs()); + Assertions.assertEquals("pclhocohslk", response.iterator().next().reasonForLogsStatus()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesMockTests.java new file mode 100644 index 000000000000..8df0bb966ff2 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.UserRole; +import com.azure.resourcemanager.logz.models.UserRoleRequest; +import com.azure.resourcemanager.logz.models.UserRoleResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsListUserRolesMockTests { + @Test + public void testListUserRoles() throws Exception { + String responseStr = "{\"value\":[{\"role\":\"None\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.monitors() + .listUserRoles("ovplw", "bhvgy", new UserRoleRequest().withEmailAddress("uosvmkfssxqukk"), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals(UserRole.NONE, response.iterator().next().role()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationDisplayTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationDisplayTests.java new file mode 100644 index 000000000000..e724b3473395 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationDisplayTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.OperationDisplay; +import org.junit.jupiter.api.Assertions; + +public final class OperationDisplayTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDisplay model = BinaryData + .fromString( + "{\"provider\":\"pikxwczbyscnpqxu\",\"resource\":\"vyq\",\"operation\":\"wby\",\"description\":\"k\"}") + .toObject(OperationDisplay.class); + Assertions.assertEquals("pikxwczbyscnpqxu", model.provider()); + Assertions.assertEquals("vyq", model.resource()); + Assertions.assertEquals("wby", model.operation()); + Assertions.assertEquals("k", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationDisplay model = new OperationDisplay().withProvider("pikxwczbyscnpqxu") + .withResource("vyq") + .withOperation("wby") + .withDescription("k"); + model = BinaryData.fromObject(model).toObject(OperationDisplay.class); + Assertions.assertEquals("pikxwczbyscnpqxu", model.provider()); + Assertions.assertEquals("vyq", model.resource()); + Assertions.assertEquals("wby", model.operation()); + Assertions.assertEquals("k", model.description()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationListResultTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationListResultTests.java new file mode 100644 index 000000000000..036f6c7831c1 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationListResultTests.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; +import com.azure.resourcemanager.logz.models.OperationDisplay; +import com.azure.resourcemanager.logz.models.OperationListResult; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class OperationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"name\":\"psqucmpoyf\",\"isDataAction\":true,\"display\":{\"provider\":\"knygjofjddeq\",\"resource\":\"deupewnwrei\",\"operation\":\"zyf\",\"description\":\"sarhmofc\"},\"origin\":\"smy\"},{\"name\":\"kdtmlxhekuk\",\"isDataAction\":false,\"display\":{\"provider\":\"kc\",\"resource\":\"parcry\",\"operation\":\"nzwuxzd\",\"description\":\"a\"},\"origin\":\"lhmwhfpmrqobm\"}],\"nextLink\":\"kknryrtihf\"}") + .toObject(OperationListResult.class); + Assertions.assertEquals("psqucmpoyf", model.value().get(0).name()); + Assertions.assertEquals(true, model.value().get(0).isDataAction()); + Assertions.assertEquals("knygjofjddeq", model.value().get(0).display().provider()); + Assertions.assertEquals("deupewnwrei", model.value().get(0).display().resource()); + Assertions.assertEquals("zyf", model.value().get(0).display().operation()); + Assertions.assertEquals("sarhmofc", model.value().get(0).display().description()); + Assertions.assertEquals("smy", model.value().get(0).origin()); + Assertions.assertEquals("kknryrtihf", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationListResult model = new OperationListResult().withValue(Arrays.asList( + new OperationResultInner().withName("psqucmpoyf") + .withIsDataAction(true) + .withDisplay(new OperationDisplay().withProvider("knygjofjddeq") + .withResource("deupewnwrei") + .withOperation("zyf") + .withDescription("sarhmofc")) + .withOrigin("smy"), + new OperationResultInner().withName("kdtmlxhekuk") + .withIsDataAction(false) + .withDisplay(new OperationDisplay().withProvider("kc") + .withResource("parcry") + .withOperation("nzwuxzd") + .withDescription("a")) + .withOrigin("lhmwhfpmrqobm"))) + .withNextLink("kknryrtihf"); + model = BinaryData.fromObject(model).toObject(OperationListResult.class); + Assertions.assertEquals("psqucmpoyf", model.value().get(0).name()); + Assertions.assertEquals(true, model.value().get(0).isDataAction()); + Assertions.assertEquals("knygjofjddeq", model.value().get(0).display().provider()); + Assertions.assertEquals("deupewnwrei", model.value().get(0).display().resource()); + Assertions.assertEquals("zyf", model.value().get(0).display().operation()); + Assertions.assertEquals("sarhmofc", model.value().get(0).display().description()); + Assertions.assertEquals("smy", model.value().get(0).origin()); + Assertions.assertEquals("kknryrtihf", model.nextLink()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationResultInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationResultInnerTests.java new file mode 100644 index 000000000000..103c94921057 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationResultInnerTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; +import com.azure.resourcemanager.logz.models.OperationDisplay; +import org.junit.jupiter.api.Assertions; + +public final class OperationResultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationResultInner model = BinaryData.fromString( + "{\"name\":\"ijbpzvgnwzsymgl\",\"isDataAction\":true,\"display\":{\"provider\":\"zk\",\"resource\":\"dbihanufhfcbj\",\"operation\":\"a\",\"description\":\"th\"},\"origin\":\"hab\"}") + .toObject(OperationResultInner.class); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.name()); + Assertions.assertEquals(true, model.isDataAction()); + Assertions.assertEquals("zk", model.display().provider()); + Assertions.assertEquals("dbihanufhfcbj", model.display().resource()); + Assertions.assertEquals("a", model.display().operation()); + Assertions.assertEquals("th", model.display().description()); + Assertions.assertEquals("hab", model.origin()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationResultInner model = new OperationResultInner().withName("ijbpzvgnwzsymgl") + .withIsDataAction(true) + .withDisplay(new OperationDisplay().withProvider("zk") + .withResource("dbihanufhfcbj") + .withOperation("a") + .withDescription("th")) + .withOrigin("hab"); + model = BinaryData.fromObject(model).toObject(OperationResultInner.class); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.name()); + Assertions.assertEquals(true, model.isDataAction()); + Assertions.assertEquals("zk", model.display().provider()); + Assertions.assertEquals("dbihanufhfcbj", model.display().resource()); + Assertions.assertEquals("a", model.display().operation()); + Assertions.assertEquals("th", model.display().description()); + Assertions.assertEquals("hab", model.origin()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationsListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationsListMockTests.java new file mode 100644 index 000000000000..93e89e40d914 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationsListMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.OperationResult; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class OperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"name\":\"btdhxujznbm\",\"isDataAction\":true,\"display\":{\"provider\":\"przqlveu\",\"resource\":\"upjm\",\"operation\":\"fxobbcsws\",\"description\":\"jriplrbpbewtghf\"},\"origin\":\"lcgwxzvlvqh\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("btdhxujznbm", response.iterator().next().name()); + Assertions.assertEquals(true, response.iterator().next().isDataAction()); + Assertions.assertEquals("przqlveu", response.iterator().next().display().provider()); + Assertions.assertEquals("upjm", response.iterator().next().display().resource()); + Assertions.assertEquals("fxobbcsws", response.iterator().next().display().operation()); + Assertions.assertEquals("jriplrbpbewtghf", response.iterator().next().display().description()); + Assertions.assertEquals("lcgwxzvlvqh", response.iterator().next().origin()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/PlanDataTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/PlanDataTests.java new file mode 100644 index 000000000000..3a8b8ec8c9d4 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/PlanDataTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.PlanData; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class PlanDataTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlanData model = BinaryData.fromString( + "{\"usageType\":\"zao\",\"billingCycle\":\"uhrhcffcyddgl\",\"planDetails\":\"t\",\"effectiveDate\":\"2021-10-12T12:36:35Z\"}") + .toObject(PlanData.class); + Assertions.assertEquals("zao", model.usageType()); + Assertions.assertEquals("uhrhcffcyddgl", model.billingCycle()); + Assertions.assertEquals("t", model.planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T12:36:35Z"), model.effectiveDate()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PlanData model = new PlanData().withUsageType("zao") + .withBillingCycle("uhrhcffcyddgl") + .withPlanDetails("t") + .withEffectiveDate(OffsetDateTime.parse("2021-10-12T12:36:35Z")); + model = BinaryData.fromObject(model).toObject(PlanData.class); + Assertions.assertEquals("zao", model.usageType()); + Assertions.assertEquals("uhrhcffcyddgl", model.billingCycle()); + Assertions.assertEquals("t", model.planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T12:36:35Z"), model.effectiveDate()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsCreateOrUpdateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..9075559718f9 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsCreateOrUpdateMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnResource; +import com.azure.resourcemanager.logz.models.SingleSignOnStates; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SingleSignOnsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"singleSignOnState\":\"Existing\",\"enterpriseAppId\":\"r\",\"singleSignOnUrl\":\"n\",\"provisioningState\":\"Succeeded\"},\"id\":\"wgdrjervnaenqp\",\"name\":\"hin\",\"type\":\"oygmift\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogzSingleSignOnResource response = manager.singleSignOns() + .define("gjb") + .withExistingMonitor("rruvwbhsq", "sub") + .withProperties(new LogzSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.DISABLE) + .withEnterpriseAppId("bsrfbj") + .withSingleSignOnUrl("twss")) + .create(); + + Assertions.assertEquals(SingleSignOnStates.EXISTING, response.properties().singleSignOnState()); + Assertions.assertEquals("r", response.properties().enterpriseAppId()); + Assertions.assertEquals("n", response.properties().singleSignOnUrl()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsGetWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsGetWithResponseMockTests.java new file mode 100644 index 000000000000..178246256a8b --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsGetWithResponseMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnResource; +import com.azure.resourcemanager.logz.models.SingleSignOnStates; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SingleSignOnsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"fxoblytkb\",\"singleSignOnUrl\":\"pe\",\"provisioningState\":\"Updating\"},\"id\":\"fbkrvrnsvs\",\"name\":\"q\",\"type\":\"ohxcrsbfova\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogzSingleSignOnResource response = manager.singleSignOns() + .getWithResponse("szjfauvjfdxxivet", "t", "qaqtdoqmcbxvwvxy", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(SingleSignOnStates.DISABLE, response.properties().singleSignOnState()); + Assertions.assertEquals("fxoblytkb", response.properties().enterpriseAppId()); + Assertions.assertEquals("pe", response.properties().singleSignOnUrl()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsListMockTests.java new file mode 100644 index 000000000000..d39a24d23609 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsListMockTests.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.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.LogzSingleSignOnResource; +import com.azure.resourcemanager.logz.models.SingleSignOnStates; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SingleSignOnsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"ostmgrcf\",\"singleSignOnUrl\":\"nrmfqjhhk\",\"provisioningState\":\"Deleting\"},\"id\":\"vjymjhxxjyngud\",\"name\":\"vkr\",\"type\":\"swbxqz\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.singleSignOns().list("z", "ahzxctobgbk", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(SingleSignOnStates.DISABLE, + response.iterator().next().properties().singleSignOnState()); + Assertions.assertEquals("ostmgrcf", response.iterator().next().properties().enterpriseAppId()); + Assertions.assertEquals("nrmfqjhhk", response.iterator().next().properties().singleSignOnUrl()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateWithResponseMockTests.java new file mode 100644 index 000000000000..e0f8be6e36df --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateWithResponseMockTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; +import com.azure.resourcemanager.logz.models.FilteringTag; +import com.azure.resourcemanager.logz.models.LogRules; +import com.azure.resourcemanager.logz.models.MonitoringTagRules; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; +import com.azure.resourcemanager.logz.models.TagAction; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountTagRulesCreateOrUpdateWithResponseMockTests { + @Test + public void testCreateOrUpdateWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":true,\"sendActivityLogs\":false,\"filteringTags\":[{\"name\":\"taeburuvdm\",\"value\":\"s\",\"action\":\"Include\"},{\"name\":\"wabm\",\"value\":\"efkifr\",\"action\":\"Exclude\"}]}},\"id\":\"qujmqlgkf\",\"name\":\"tndoaongbjc\",\"type\":\"tujitcjedft\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + MonitoringTagRules response = manager.subAccountTagRules() + .createOrUpdateWithResponse("whxxbuyqax", "feqztppriol", "or", "altol", new MonitoringTagRulesInner() + .withProperties(new MonitoringTagRulesProperties().withLogRules(new LogRules().withSendAadLogs(true) + .withSendSubscriptionLogs(true) + .withSendActivityLogs(false) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("dcfhucqdpf").withValue("glsbjjc").withAction(TagAction.INCLUDE), + new FilteringTag().withName("bvtvudutncormr") + .withValue("qtvcofudflvkgj") + .withAction(TagAction.INCLUDE))))), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(true, response.properties().logRules().sendAadLogs()); + Assertions.assertEquals(true, response.properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(false, response.properties().logRules().sendActivityLogs()); + Assertions.assertEquals("taeburuvdm", response.properties().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("s", response.properties().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, response.properties().logRules().filteringTags().get(0).action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteWithResponseMockTests.java new file mode 100644 index 000000000000..0ec5c2cbfd63 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteWithResponseMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountTagRulesDeleteWithResponseMockTests { + @Test + public void testDeleteWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.subAccountTagRules() + .deleteWithResponse("znkbykutwpfhpagm", "r", "kdsnfdsdoakgtdl", "kkze", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetWithResponseMockTests.java new file mode 100644 index 000000000000..6fcece859129 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.MonitoringTagRules; +import com.azure.resourcemanager.logz.models.TagAction; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountTagRulesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Updating\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[{\"name\":\"wntoegokdwbwh\",\"value\":\"z\",\"action\":\"Include\"},{\"name\":\"vexztvbtqgs\",\"value\":\"aoyzkoow\",\"action\":\"Exclude\"}]}},\"id\":\"guxawqaldsyuuxi\",\"name\":\"erqf\",\"type\":\"bw\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + MonitoringTagRules response = manager.subAccountTagRules() + .getWithResponse("waezkojvd", "pzfoqoui", "ybxarzgszu", "oxciqopidoamcio", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(true, response.properties().logRules().sendAadLogs()); + Assertions.assertEquals(false, response.properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(false, response.properties().logRules().sendActivityLogs()); + Assertions.assertEquals("wntoegokdwbwh", response.properties().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("z", response.properties().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, response.properties().logRules().filteringTags().get(0).action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListMockTests.java new file mode 100644 index 000000000000..57914de1a1d3 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.MonitoringTagRules; +import com.azure.resourcemanager.logz.models.TagAction; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountTagRulesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendActivityLogs\":false,\"filteringTags\":[{\"name\":\"sz\",\"value\":\"mpsbzkfzbeyv\",\"action\":\"Include\"},{\"name\":\"cvinvkjjxdxrbuuk\",\"value\":\"lewyhmlwpaz\",\"action\":\"Include\"}]}},\"id\":\"fn\",\"name\":\"ckw\",\"type\":\"fz\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.subAccountTagRules().list("lfoakg", "kfpagao", "pulpqblylsyxk", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(false, response.iterator().next().properties().logRules().sendAadLogs()); + Assertions.assertEquals(true, response.iterator().next().properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(false, response.iterator().next().properties().logRules().sendActivityLogs()); + Assertions.assertEquals("sz", response.iterator().next().properties().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("mpsbzkfzbeyv", + response.iterator().next().properties().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, + response.iterator().next().properties().logRules().filteringTags().get(0).action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsCreateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsCreateMockTests.java new file mode 100644 index 000000000000..40836b707a95 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsCreateMockTests.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; +import com.azure.resourcemanager.logz.models.IdentityProperties; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitorProperties; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import com.azure.resourcemanager.logz.models.PlanData; +import com.azure.resourcemanager.logz.models.UserInfo; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"logzOrganizationProperties\":{\"companyName\":\"mutwuoe\",\"id\":\"pkhjwni\",\"enterpriseAppId\":\"sluicpdggkzz\",\"singleSignOnUrl\":\"mbmpaxmodfvuefy\"},\"userInfo\":{\"firstName\":\"pfvmwyhrfou\",\"lastName\":\"taakc\",\"emailAddress\":\"iyzvqtmnub\",\"phoneNumber\":\"kpzksmondjmq\"},\"planData\":{\"usageType\":\"ypomgkopkwho\",\"billingCycle\":\"pajqgxysm\",\"planDetails\":\"mbqfqvmk\",\"effectiveDate\":\"2020-12-29T20:52:17Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":1373468362},\"identity\":{\"principalId\":\"lxprglyatddckcbc\",\"tenantId\":\"jrjxgciqibrhosx\",\"type\":\"UserAssigned\"},\"location\":\"rhzo\",\"tags\":{\"szdtmhrkwof\":\"bmrqyibahwfl\"},\"id\":\"yvoqa\",\"name\":\"piexpbtgiw\",\"type\":\"wo\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogzMonitorResource response = manager.subAccounts() + .create("okonzmnsikvmkqz", "qqkdltfzxmhhvhgu", "eodkwobda", new LogzMonitorResourceInner() + .withLocation("xzxcl") + .withTags(mapOf("hcohfwdsjnk", "hhqzonosgg", "swacffgdkzz", "ljuti", "ppfufl", "wkfvhqcrailvp", + "gafcnihgwqapnedg", "wdmhdlxyjrxs")) + .withProperties(new MonitorProperties().withMonitoringStatus(MonitoringStatus.ENABLED) + .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) + .withLogzOrganizationProperties(new LogzOrganizationProperties().withCompanyName("akbogqxndlkzgxh") + .withEnterpriseAppId("yyntwl") + .withSingleSignOnUrl("qtkoievs")) + .withUserInfo(new UserInfo().withFirstName("gqrlltmuwla") + .withLastName("zizxbmpgcj") + .withEmailAddress("u") + .withPhoneNumber("uvpb")) + .withPlanData(new PlanData().withUsageType("um") + .withBillingCycle("p") + .withPlanDetails("ebmnzbtbhjpglk") + .withEffectiveDate(OffsetDateTime.parse("2021-09-29T06:58:20Z")))) + .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.SYSTEM_ASSIGNED)), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("rhzo", response.location()); + Assertions.assertEquals("bmrqyibahwfl", response.tags().get("szdtmhrkwof")); + Assertions.assertEquals(MonitoringStatus.ENABLED, response.properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.SUSPENDED, + response.properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("mutwuoe", response.properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("sluicpdggkzz", response.properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("mbmpaxmodfvuefy", + response.properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("pfvmwyhrfou", response.properties().userInfo().firstName()); + Assertions.assertEquals("taakc", response.properties().userInfo().lastName()); + Assertions.assertEquals("iyzvqtmnub", response.properties().userInfo().emailAddress()); + Assertions.assertEquals("kpzksmondjmq", response.properties().userInfo().phoneNumber()); + Assertions.assertEquals("ypomgkopkwho", response.properties().planData().usageType()); + Assertions.assertEquals("pajqgxysm", response.properties().planData().billingCycle()); + Assertions.assertEquals("mbqfqvmk", response.properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T20:52:17Z"), + response.properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.identity().type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsDeleteMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsDeleteMockTests.java new file mode 100644 index 000000000000..37a3275d312b --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.subAccounts().delete("mwzn", "abikns", "rgjhxb", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsGetWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsGetWithResponseMockTests.java new file mode 100644 index 000000000000..559ad4336062 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsGetWithResponseMockTests.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"yuq\",\"id\":\"pqlpq\",\"enterpriseAppId\":\"ciuqgbdb\",\"singleSignOnUrl\":\"auvfbtkuwhhmhyk\"},\"userInfo\":{\"firstName\":\"xafnndlpichko\",\"lastName\":\"kcdyhbpk\",\"emailAddress\":\"wdreqnovvqfovl\",\"phoneNumber\":\"ywsuwsy\"},\"planData\":{\"usageType\":\"dsytgadgvr\",\"billingCycle\":\"aeneqnzarrwl\",\"planDetails\":\"uijfqk\",\"effectiveDate\":\"2021-06-20T18:32:46Z\"},\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":288092317},\"identity\":{\"principalId\":\"ubjibww\",\"tenantId\":\"tohqkvpuvksgp\",\"type\":\"UserAssigned\"},\"location\":\"kn\",\"tags\":{\"iyntorzihle\":\"synljphuopxodl\",\"yzrpzbchckqqzq\":\"sjswsrms\",\"ysuiizynkedya\":\"ox\"},\"id\":\"rwyhqmibzyhwitsm\",\"name\":\"pyy\",\"type\":\"pcdpumnz\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogzMonitorResource response = manager.subAccounts() + .getWithResponse("nwashrtd", "kcnqxwbpo", "ulpiuj", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("kn", response.location()); + Assertions.assertEquals("synljphuopxodl", response.tags().get("iyntorzihle")); + Assertions.assertEquals(MonitoringStatus.DISABLED, response.properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, + response.properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("yuq", response.properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("ciuqgbdb", response.properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("auvfbtkuwhhmhyk", + response.properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("xafnndlpichko", response.properties().userInfo().firstName()); + Assertions.assertEquals("kcdyhbpk", response.properties().userInfo().lastName()); + Assertions.assertEquals("wdreqnovvqfovl", response.properties().userInfo().emailAddress()); + Assertions.assertEquals("ywsuwsy", response.properties().userInfo().phoneNumber()); + Assertions.assertEquals("dsytgadgvr", response.properties().planData().usageType()); + Assertions.assertEquals("aeneqnzarrwl", response.properties().planData().billingCycle()); + Assertions.assertEquals("uijfqk", response.properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-20T18:32:46Z"), + response.properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.identity().type()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMockTests.java new file mode 100644 index 000000000000..61cc49369711 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"thuma\",\"id\":\"lbg\",\"enterpriseAppId\":\"duiertgcc\",\"singleSignOnUrl\":\"vaolpsslqlf\"},\"userInfo\":{\"firstName\":\"n\",\"lastName\":\"glzpswiydm\",\"emailAddress\":\"yhz\",\"phoneNumber\":\"ss\"},\"planData\":{\"usageType\":\"zmnvdfznudaod\",\"billingCycle\":\"zbn\",\"planDetails\":\"lylpstdb\",\"effectiveDate\":\"2021-09-12T23:42:23Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":632905935},\"identity\":{\"principalId\":\"cers\",\"tenantId\":\"ntnev\",\"type\":\"SystemAssigned\"},\"location\":\"jmygtdsslswtmwer\",\"tags\":{\"ets\":\"zpyqsemwab\"},\"id\":\"hszhedplvwiwu\",\"name\":\"mwmbes\",\"type\":\"dnkwwtppjflcxog\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.subAccounts().list("nzdndslgna", "qig", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("jmygtdsslswtmwer", response.iterator().next().location()); + Assertions.assertEquals("zpyqsemwab", response.iterator().next().tags().get("ets")); + Assertions.assertEquals(MonitoringStatus.DISABLED, response.iterator().next().properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, + response.iterator().next().properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("thuma", + response.iterator().next().properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("duiertgcc", + response.iterator().next().properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("vaolpsslqlf", + response.iterator().next().properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("n", response.iterator().next().properties().userInfo().firstName()); + Assertions.assertEquals("glzpswiydm", response.iterator().next().properties().userInfo().lastName()); + Assertions.assertEquals("yhz", response.iterator().next().properties().userInfo().emailAddress()); + Assertions.assertEquals("ss", response.iterator().next().properties().userInfo().phoneNumber()); + Assertions.assertEquals("zmnvdfznudaod", response.iterator().next().properties().planData().usageType()); + Assertions.assertEquals("zbn", response.iterator().next().properties().planData().billingCycle()); + Assertions.assertEquals("lylpstdb", response.iterator().next().properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-12T23:42:23Z"), + response.iterator().next().properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMonitoredResourcesMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMonitoredResourcesMockTests.java new file mode 100644 index 000000000000..d13372f01599 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMonitoredResourcesMockTests.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.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.MonitoredResource; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountsListMonitoredResourcesMockTests { + @Test + public void testListMonitoredResources() throws Exception { + String responseStr + = "{\"value\":[{\"id\":\"dsuvarmywdmjsjqb\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"x\",\"sendingLogs\":true,\"reasonForLogsStatus\":\"co\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.subAccounts() + .listMonitoredResources("hlyfjhdgqgg", "bdunygaeqid", "qfatpxllrxcyjm", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("dsuvarmywdmjsjqb", response.iterator().next().id()); + Assertions.assertEquals(true, response.iterator().next().sendingMetrics()); + Assertions.assertEquals("x", response.iterator().next().reasonForMetricsStatus()); + Assertions.assertEquals(true, response.iterator().next().sendingLogs()); + Assertions.assertEquals("co", response.iterator().next().reasonForLogsStatus()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVMHostsMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVMHostsMockTests.java new file mode 100644 index 000000000000..4f32bfb7248c --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVMHostsMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.VMResources; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountsListVMHostsMockTests { + @Test + public void testListVMHosts() throws Exception { + String responseStr = "{\"value\":[{\"id\":\"ujhemmsbvdkcrodt\",\"agentVersion\":\"nfwjlfltkacjvefk\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.subAccounts() + .listVMHosts("nwxuqlcvydyp", "tdooaoj", "niodkooeb", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ujhemmsbvdkcrodt", response.iterator().next().id()); + Assertions.assertEquals("nfwjlfltkacjvefk", response.iterator().next().agentVersion()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVmHostUpdateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVmHostUpdateMockTests.java new file mode 100644 index 000000000000..c302375057f8 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVmHostUpdateMockTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; +import com.azure.resourcemanager.logz.models.VMHostUpdateStates; +import com.azure.resourcemanager.logz.models.VMResources; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountsListVmHostUpdateMockTests { + @Test + public void testListVmHostUpdate() throws Exception { + String responseStr = "{\"value\":[{\"id\":\"xleptramx\",\"agentVersion\":\"zwl\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.subAccounts() + .listVmHostUpdate("mzqa", "krmnjijpxacqqud", "nbyxbaaabjyv", + new VMHostUpdateRequest() + .withVmResourceIds( + Arrays.asList(new VMResourcesInner().withId("imrzrtuzqog").withAgentVersion("xnevfdnwn"), + new VMResourcesInner().withId("ewzsyyceuzsoib").withAgentVersion("dpfrxtrthzvaytdw"), + new VMResourcesInner().withId("brqubp").withAgentVersion("h"), + new VMResourcesInner().withId("iilivpdtiirqtd").withAgentVersion("axoruzfgsquy"))) + .withState(VMHostUpdateStates.INSTALL), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("xleptramx", response.iterator().next().id()); + Assertions.assertEquals("zwl", response.iterator().next().agentVersion()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsUpdateWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsUpdateWithResponseMockTests.java new file mode 100644 index 000000000000..3d65f8ccc6ea --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsUpdateWithResponseMockTests.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.LogzMonitorResource; +import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; +import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; +import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.logz.models.MonitorUpdateProperties; +import com.azure.resourcemanager.logz.models.MonitoringStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SubAccountsUpdateWithResponseMockTests { + @Test + public void testUpdateWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"NotSpecified\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"logzOrganizationProperties\":{\"companyName\":\"jzkzi\",\"id\":\"vvcnayr\",\"enterpriseAppId\":\"rnxxmueed\",\"singleSignOnUrl\":\"rdvstkwqqtch\"},\"userInfo\":{\"firstName\":\"mfmtdaaygdvw\",\"lastName\":\"piohgwxrtfu\",\"emailAddress\":\"epxgyqagvr\",\"phoneNumber\":\"npkukghimdblx\"},\"planData\":{\"usageType\":\"mfnjh\",\"billingCycle\":\"xw\",\"planDetails\":\"zk\",\"effectiveDate\":\"2021-08-02T13:39:17Z\"},\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":1563203885},\"identity\":{\"principalId\":\"zi\",\"tenantId\":\"jawneaiv\",\"type\":\"UserAssigned\"},\"location\":\"zel\",\"tags\":{\"lsfeaenwabfatkld\":\"r\",\"oulpjrv\":\"xbjhwuaanozjosph\"},\"id\":\"ag\",\"name\":\"rvimjwosytxitcsk\",\"type\":\"cktqumiekkezzi\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogzMonitorResource response = manager.subAccounts() + .updateWithResponse("dtlwwrlkd", "tncvokot", "lxdy", + new LogzMonitorResourceUpdateParameters() + .withProperties(new MonitorUpdateProperties().withMonitoringStatus(MonitoringStatus.ENABLED)) + .withTags(mapOf("ocrkvcikh", "ogjltdtbnnhad", "qgxqquezikyw", "vpa", "lla", "gxk")), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("zel", response.location()); + Assertions.assertEquals("r", response.tags().get("lsfeaenwabfatkld")); + Assertions.assertEquals(MonitoringStatus.ENABLED, response.properties().monitoringStatus()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.SUSPENDED, + response.properties().marketplaceSubscriptionStatus()); + Assertions.assertEquals("jzkzi", response.properties().logzOrganizationProperties().companyName()); + Assertions.assertEquals("rnxxmueed", response.properties().logzOrganizationProperties().enterpriseAppId()); + Assertions.assertEquals("rdvstkwqqtch", response.properties().logzOrganizationProperties().singleSignOnUrl()); + Assertions.assertEquals("mfmtdaaygdvw", response.properties().userInfo().firstName()); + Assertions.assertEquals("piohgwxrtfu", response.properties().userInfo().lastName()); + Assertions.assertEquals("epxgyqagvr", response.properties().userInfo().emailAddress()); + Assertions.assertEquals("npkukghimdblx", response.properties().userInfo().phoneNumber()); + Assertions.assertEquals("mfnjh", response.properties().planData().usageType()); + Assertions.assertEquals("xw", response.properties().planData().billingCycle()); + Assertions.assertEquals("zk", response.properties().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T13:39:17Z"), + response.properties().planData().effectiveDate()); + Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.identity().type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateWithResponseMockTests.java new file mode 100644 index 000000000000..927dfb31be05 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateWithResponseMockTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.FilteringTag; +import com.azure.resourcemanager.logz.models.LogRules; +import com.azure.resourcemanager.logz.models.MonitoringTagRules; +import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; +import com.azure.resourcemanager.logz.models.TagAction; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class TagRulesCreateOrUpdateWithResponseMockTests { + @Test + public void testCreateOrUpdateWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendActivityLogs\":true,\"filteringTags\":[{\"name\":\"apnyiropuhpig\",\"value\":\"gylgqgitxmedjvcs\",\"action\":\"Include\"},{\"name\":\"wwncwzzhxgk\",\"value\":\"mgucna\",\"action\":\"Include\"},{\"name\":\"oellwp\",\"value\":\"d\",\"action\":\"Exclude\"}]}},\"id\":\"qbuaceopzfqr\",\"name\":\"huaoppp\",\"type\":\"qeqxo\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + MonitoringTagRules response = manager.tagRules() + .define("oekqvk") + .withExistingMonitor("bsjyofdx", "uusdttouwa") + .withProperties(new MonitoringTagRulesProperties().withLogRules(new LogRules().withSendAadLogs(true) + .withSendSubscriptionLogs(true) + .withSendActivityLogs(false) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("hcaalnjix").withValue("xyawj").withAction(TagAction.INCLUDE))))) + .create(); + + Assertions.assertEquals(false, response.properties().logRules().sendAadLogs()); + Assertions.assertEquals(true, response.properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(true, response.properties().logRules().sendActivityLogs()); + Assertions.assertEquals("apnyiropuhpig", response.properties().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("gylgqgitxmedjvcs", response.properties().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, response.properties().logRules().filteringTags().get(0).action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteWithResponseMockTests.java new file mode 100644 index 000000000000..7f47ff52aa9d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteWithResponseMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class TagRulesDeleteWithResponseMockTests { + @Test + public void testDeleteWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.tagRules().deleteWithResponse("xdult", "kzbbtd", "umveekgpwozuhkf", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesGetWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesGetWithResponseMockTests.java new file mode 100644 index 000000000000..2495e1610781 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesGetWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.MonitoringTagRules; +import com.azure.resourcemanager.logz.models.TagAction; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class TagRulesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":true,\"filteringTags\":[{\"name\":\"y\",\"value\":\"pvgqzcjrvxdjzlm\",\"action\":\"Exclude\"},{\"name\":\"vu\",\"value\":\"hzovawjvzunlut\",\"action\":\"Include\"}]}},\"id\":\"rnxipei\",\"name\":\"pjzu\",\"type\":\"e\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + MonitoringTagRules response = manager.tagRules() + .getWithResponse("ro", "qbex", "mcqibycnojv", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(false, response.properties().logRules().sendAadLogs()); + Assertions.assertEquals(false, response.properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(true, response.properties().logRules().sendActivityLogs()); + Assertions.assertEquals("y", response.properties().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("pvgqzcjrvxdjzlm", response.properties().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, response.properties().logRules().filteringTags().get(0).action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesListMockTests.java new file mode 100644 index 000000000000..c8bf101c1f6d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesListMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.logz.LogzManager; +import com.azure.resourcemanager.logz.models.MonitoringTagRules; +import com.azure.resourcemanager.logz.models.TagAction; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class TagRulesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":true,\"filteringTags\":[{\"name\":\"zg\",\"value\":\"zmh\",\"action\":\"Include\"}]}},\"id\":\"gmtsavjcbpwxqpsr\",\"name\":\"nftguvriuhpr\",\"type\":\"mdyvxqtayriw\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + LogzManager manager = LogzManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.tagRules().list("kbegibt", "mxiebw", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(true, response.iterator().next().properties().logRules().sendAadLogs()); + Assertions.assertEquals(false, response.iterator().next().properties().logRules().sendSubscriptionLogs()); + Assertions.assertEquals(true, response.iterator().next().properties().logRules().sendActivityLogs()); + Assertions.assertEquals("zg", response.iterator().next().properties().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("zmh", + response.iterator().next().properties().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, + response.iterator().next().properties().logRules().filteringTags().get(0).action()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserInfoTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserInfoTests.java new file mode 100644 index 000000000000..03bd98eab306 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserInfoTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.UserInfo; +import org.junit.jupiter.api.Assertions; + +public final class UserInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserInfo model = BinaryData.fromString( + "{\"firstName\":\"uexhdzx\",\"lastName\":\"qeojnxqbzvddntw\",\"emailAddress\":\"eic\",\"phoneNumber\":\"w\"}") + .toObject(UserInfo.class); + Assertions.assertEquals("uexhdzx", model.firstName()); + Assertions.assertEquals("qeojnxqbzvddntw", model.lastName()); + Assertions.assertEquals("eic", model.emailAddress()); + Assertions.assertEquals("w", model.phoneNumber()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserInfo model = new UserInfo().withFirstName("uexhdzx") + .withLastName("qeojnxqbzvddntw") + .withEmailAddress("eic") + .withPhoneNumber("w"); + model = BinaryData.fromObject(model).toObject(UserInfo.class); + Assertions.assertEquals("uexhdzx", model.firstName()); + Assertions.assertEquals("qeojnxqbzvddntw", model.lastName()); + Assertions.assertEquals("eic", model.emailAddress()); + Assertions.assertEquals("w", model.phoneNumber()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleListResponseTests.java new file mode 100644 index 000000000000..e3aabd067763 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleListResponseTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; +import com.azure.resourcemanager.logz.models.UserRole; +import com.azure.resourcemanager.logz.models.UserRoleListResponse; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class UserRoleListResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserRoleListResponse model = BinaryData.fromString( + "{\"value\":[{\"role\":\"Admin\"},{\"role\":\"User\"},{\"role\":\"User\"},{\"role\":\"None\"}],\"nextLink\":\"sauuimj\"}") + .toObject(UserRoleListResponse.class); + Assertions.assertEquals(UserRole.ADMIN, model.value().get(0).role()); + Assertions.assertEquals("sauuimj", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserRoleListResponse model = new UserRoleListResponse().withValue(Arrays.asList( + new UserRoleResponseInner().withRole(UserRole.ADMIN), new UserRoleResponseInner().withRole(UserRole.USER), + new UserRoleResponseInner().withRole(UserRole.USER), new UserRoleResponseInner().withRole(UserRole.NONE))) + .withNextLink("sauuimj"); + model = BinaryData.fromObject(model).toObject(UserRoleListResponse.class); + Assertions.assertEquals(UserRole.ADMIN, model.value().get(0).role()); + Assertions.assertEquals("sauuimj", model.nextLink()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleRequestTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleRequestTests.java new file mode 100644 index 000000000000..6eeb70deb2e4 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleRequestTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.models.UserRoleRequest; +import org.junit.jupiter.api.Assertions; + +public final class UserRoleRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserRoleRequest model = BinaryData.fromString("{\"emailAddress\":\"sa\"}").toObject(UserRoleRequest.class); + Assertions.assertEquals("sa", model.emailAddress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserRoleRequest model = new UserRoleRequest().withEmailAddress("sa"); + model = BinaryData.fromObject(model).toObject(UserRoleRequest.class); + Assertions.assertEquals("sa", model.emailAddress()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleResponseInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleResponseInnerTests.java new file mode 100644 index 000000000000..8b51f90a7936 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleResponseInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; +import com.azure.resourcemanager.logz.models.UserRole; +import org.junit.jupiter.api.Assertions; + +public final class UserRoleResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserRoleResponseInner model + = BinaryData.fromString("{\"role\":\"Admin\"}").toObject(UserRoleResponseInner.class); + Assertions.assertEquals(UserRole.ADMIN, model.role()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserRoleResponseInner model = new UserRoleResponseInner().withRole(UserRole.ADMIN); + model = BinaryData.fromObject(model).toObject(UserRoleResponseInner.class); + Assertions.assertEquals(UserRole.ADMIN, model.role()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMHostUpdateRequestTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMHostUpdateRequestTests.java new file mode 100644 index 000000000000..ba49aff559d3 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMHostUpdateRequestTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; +import com.azure.resourcemanager.logz.models.VMHostUpdateStates; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VMHostUpdateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VMHostUpdateRequest model = BinaryData + .fromString( + "{\"vmResourceIds\":[{\"id\":\"tki\",\"agentVersion\":\"xhqyudxorrqnb\"}],\"state\":\"Install\"}") + .toObject(VMHostUpdateRequest.class); + Assertions.assertEquals("tki", model.vmResourceIds().get(0).id()); + Assertions.assertEquals("xhqyudxorrqnb", model.vmResourceIds().get(0).agentVersion()); + Assertions.assertEquals(VMHostUpdateStates.INSTALL, model.state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VMHostUpdateRequest model = new VMHostUpdateRequest() + .withVmResourceIds(Arrays.asList(new VMResourcesInner().withId("tki").withAgentVersion("xhqyudxorrqnb"))) + .withState(VMHostUpdateStates.INSTALL); + model = BinaryData.fromObject(model).toObject(VMHostUpdateRequest.class); + Assertions.assertEquals("tki", model.vmResourceIds().get(0).id()); + Assertions.assertEquals("xhqyudxorrqnb", model.vmResourceIds().get(0).agentVersion()); + Assertions.assertEquals(VMHostUpdateStates.INSTALL, model.state()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesInnerTests.java new file mode 100644 index 000000000000..50e698c31dde --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesInnerTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import org.junit.jupiter.api.Assertions; + +public final class VMResourcesInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VMResourcesInner model = BinaryData.fromString("{\"id\":\"vyifqrvkdvjsl\",\"agentVersion\":\"mvvd\"}") + .toObject(VMResourcesInner.class); + Assertions.assertEquals("vyifqrvkdvjsl", model.id()); + Assertions.assertEquals("mvvd", model.agentVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VMResourcesInner model = new VMResourcesInner().withId("vyifqrvkdvjsl").withAgentVersion("mvvd"); + model = BinaryData.fromObject(model).toObject(VMResourcesInner.class); + Assertions.assertEquals("vyifqrvkdvjsl", model.id()); + Assertions.assertEquals("mvvd", model.agentVersion()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesListResponseTests.java new file mode 100644 index 000000000000..0990876c9f06 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesListResponseTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.logz.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; +import com.azure.resourcemanager.logz.models.VMResourcesListResponse; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VMResourcesListResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VMResourcesListResponse model = BinaryData.fromString( + "{\"value\":[{\"id\":\"kpnpulexxbczwtr\",\"agentVersion\":\"iqzbq\"},{\"id\":\"sovmyokacspkwl\",\"agentVersion\":\"dobpxjmflbvvn\"}],\"nextLink\":\"rkcciwwzjuqk\"}") + .toObject(VMResourcesListResponse.class); + Assertions.assertEquals("kpnpulexxbczwtr", model.value().get(0).id()); + Assertions.assertEquals("iqzbq", model.value().get(0).agentVersion()); + Assertions.assertEquals("rkcciwwzjuqk", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VMResourcesListResponse model = new VMResourcesListResponse() + .withValue(Arrays.asList(new VMResourcesInner().withId("kpnpulexxbczwtr").withAgentVersion("iqzbq"), + new VMResourcesInner().withId("sovmyokacspkwl").withAgentVersion("dobpxjmflbvvn"))) + .withNextLink("rkcciwwzjuqk"); + model = BinaryData.fromObject(model).toObject(VMResourcesListResponse.class); + Assertions.assertEquals("kpnpulexxbczwtr", model.value().get(0).id()); + Assertions.assertEquals("iqzbq", model.value().get(0).agentVersion()); + Assertions.assertEquals("rkcciwwzjuqk", model.nextLink()); + } +} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/sdk/logz/azure-resourcemanager-logz/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker new file mode 100644 index 000000000000..1f0955d450f0 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker @@ -0,0 +1 @@ +mock-maker-inline diff --git a/sdk/logz/ci.yml b/sdk/logz/ci.yml new file mode 100644 index 000000000000..1093607a8b99 --- /dev/null +++ b/sdk/logz/ci.yml @@ -0,0 +1,39 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/logz/ci.yml + - sdk/logz/azure-resourcemanager-logz/ + exclude: + - sdk/logz/pom.xml + - sdk/logz/azure-resourcemanager-logz/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/logz/ci.yml + - sdk/logz/azure-resourcemanager-logz/ + exclude: + - sdk/logz/pom.xml + - sdk/logz/azure-resourcemanager-logz/pom.xml + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: logz + Artifacts: + - name: azure-resourcemanager-logz + groupId: com.azure.resourcemanager + safeName: azureresourcemanagerlogz diff --git a/sdk/logz/cspell.yml b/sdk/logz/cspell.yml new file mode 100644 index 000000000000..8899b8dc6f15 --- /dev/null +++ b/sdk/logz/cspell.yml @@ -0,0 +1,9 @@ +# Spell-check overrides for this SDK group. +# Inherits the global config at the repo root. +# +# Add words that only appear in this folder here, in alphabetical order. +# Cross-cutting terms should go in the root cspell.json instead. +version: "0.2" +import: + - ../../.vscode/cspell.json +words: diff --git a/sdk/logz/pom.xml b/sdk/logz/pom.xml new file mode 100644 index 000000000000..b074a7788b45 --- /dev/null +++ b/sdk/logz/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-logz-service + pom + 1.0.0 + + + azure-resourcemanager-logz + + diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml index 15e5fbdfe765..336d078e8011 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml @@ -78,7 +78,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test diff --git a/sdk/maps/README.md b/sdk/maps/README.md index 6492a4e6f9b0..c1e95a19ec4b 100644 --- a/sdk/maps/README.md +++ b/sdk/maps/README.md @@ -12,6 +12,7 @@ To get started with a specific library, see the **README.md** file located in th - [Azure Maps Route](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-route/README.md) contains Route APIs for calculating matrix of route summaries, returning routes between destinations, etc. - [Azure Maps Search](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-search/README.md) contains Search APIs for querying addresses, nearby locations, geopolygons, etc. - [Azure Maps Timezone](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-timezone/README.md) contains Timezone APIs for converting between UTC and local times based on geographic locations, etc. +- [Azure Maps Traffic](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-traffic/README.md) contains Traffic APIs for providing traffic flow and incident information to enhance navigation and routing applications, etc. - [Azure Maps Weather](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/maps/azure-maps-weather/README.md) contains Weather APIs for retrieving current weather conditions, forecasts, and weather alerts, etc. ## Key concepts @@ -28,6 +29,7 @@ For examples of each module please see: - [Azure Maps Route Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-route/src/samples) - [Azure Maps Search Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-search/src/samples) - [Azure Maps Timezone Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-timezone/src/samples) +- [Azure Maps Traffic Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-traffic/src/samples) - [Azure Maps Weather Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-weather/src/samples) ## Troubleshooting @@ -43,6 +45,7 @@ Several Azure Maps Java SDK samples are available to you in the SDK's GitHub rep - [Azure Maps Route Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-route/src/samples) - [Azure Maps Search Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-search/src/samples) - [Azure Maps Timezone Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-timezone/src/samples) +- [Azure Maps Traffic Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-traffic/src/samples) - [Azure Maps Weather Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-weather/src/samples) ## Contributing diff --git a/sdk/maps/azure-maps-traffic/CHANGELOG.md b/sdk/maps/azure-maps-traffic/CHANGELOG.md new file mode 100644 index 000000000000..36a2673df70b --- /dev/null +++ b/sdk/maps/azure-maps-traffic/CHANGELOG.md @@ -0,0 +1,16 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.1 (2022-11-08) + +- Azure Resource Manager Traffic client library for Java. This package contains Microsoft Azure SDK for Traffic Management SDK. Azure Maps Traffic REST APIs. Package tag 1.0-preview. For documentation on how to use this package, please see [Azure Maps Traffic SDK for Java]https://docs.microsoft.com/rest/api/maps/traffic). + diff --git a/sdk/maps/azure-maps-traffic/README.md b/sdk/maps/azure-maps-traffic/README.md new file mode 100644 index 000000000000..76e9a2e1a513 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/README.md @@ -0,0 +1,204 @@ +# Azure Maps SDK Traffic client library for Java + +Azure Maps SDK Traffic client library for Java. + +This package contains the Azure Maps SDK Traffic client library which contains Azure Maps Traffic APIs. For documentation on how to use this package, please see [Azure Maps Traffic SDK for Java](https://learn.microsoft.com/rest/api/maps/traffic). + +[Source code][source] | [API reference documentation][docs] | [REST API documentation][rest_docs] | [Product documentation][product_docs] | [Samples][samples] + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + + +[//]: # ({x-version-update-start;com.azure:azure-maps-traffic;current}) +```xml + + com.azure + azure-maps-traffic + 1.0.0-beta.2 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Maps Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. + +### Authentication + +We recommend using Microsoft Entra ID with [`DefaultAzureCredential`][azure_identity]. This allows you to configure authentication through the `AZURE_TOKEN_CREDENTIALS` environment variable. +Set this variable as described in the [Learn documentation][customize_defaultAzureCredential], which provides the most up-to-date guidance and examples. + +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. + +With above configuration, `azure` client can be authenticated by following code: + +```java com.azure.maps.traffic.sync.builder.ad.instantiation +// Authenticates using Azure AD building a default credential +// This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables +DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); + +// Creates a builder +TrafficClientBuilder builder = new TrafficClientBuilder(); +builder.credential(tokenCredential); +builder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); +builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + +// Builds a client +TrafficClient client = builder.buildClient(); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples +Get Traffic Flow Segment +```java com.azure.maps.traffic.sync.get_traffic_flow_segment +System.out.println("Get Traffic Flow Segment:"); + +// options +client.getTrafficFlowSegment( + new TrafficFlowSegmentOptions() + .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072))); + +// complete +client.getTrafficFlowSegment( + new TrafficFlowSegmentOptions() + .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072)).setOpenLr(false) + .setThickness(2).setUnit(SpeedUnit.MPH)); +``` + +Get Traffic Flow Tile +```java com.azure.maps.traffic.sync.get_traffic_flow_tile +System.out.println("Get Traffic Flow Tile:"); + +// options +client.getTrafficFlowTile( + new TrafficFlowTileOptions() + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10) + .setTileIndex(new TileIndex().setX(1022).setY(680))); + +// complete +client.getTrafficFlowTile( + new TrafficFlowTileOptions() + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10) + .setTileIndex(new TileIndex().setX(1022).setY(680)).setThickness(10)); +``` + +Get Traffic Incident Detail +```java com.azure.maps.traffic.sync.get_traffic_incident_detail +System.out.println("Get Traffic Incident Detail:"); + +// options +client.getTrafficIncidentDetail( + new TrafficIncidentDetailOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11) + .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11) + .setTrafficmodelId("1335294634919")); + +// complete +client.getTrafficIncidentDetail( + new TrafficIncidentDetailOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11) + .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11) + .setTrafficmodelId("1335294634919").setLanguage("en") + .setProjectionStandard(ProjectionStandard.EPSG900913).setIncidentGeometryType(IncidentGeometryType.ORIGINAL) + .setExpandCluster(false).setOriginalPosition(false)); +``` + +Get Traffic Incident Tile +```java com.azure.maps.traffic.sync.get_traffic_incident_tile +System.out.println("Get Traffic Incident Tile:"); + +// options +client.getTrafficIncidentTile( + new TrafficIncidentTileOptions() + .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3) + .setZoom(10).setTileIndex(new TileIndex().setX(1022).setY(680))); + +// complete +client.getTrafficIncidentTile( + new TrafficIncidentTileOptions() + .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3) + .setZoom(10).setTileIndex(new TileIndex().setX(175).setY(408))); +``` + +Get Traffic Incident Viewport +```java com.azure.maps.traffic.sync.get_traffic_incident_viewport +System.out.println("Get Traffic Incident Viewport:"); + +// options +client.getTrafficIncidentViewport( + new TrafficIncidentViewportOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setOverviewZoom(2)); + +// complete +client.getTrafficIncidentViewport( + new TrafficIncidentViewportOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setOverviewZoom(2).setCopyright(true)); +``` + +## Troubleshooting +When you interact with the Azure Maps Services, errors returned by the Maps service correspond to the same HTTP status codes returned for REST API requests. + +For example, if you search with an invalid coordinate, a error is returned, indicating `400 - Bad Request` +## Next steps + +Several Azure Maps Traffic Java SDK samples are available to you in the SDK's GitHub repository. +[Azure Maps Traffic Samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-traffic/src/samples) + +## Contributing + +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request + + +[source]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-traffic/src +[samples]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/maps/azure-maps-traffic/src/samples +[rest_docs]: https://learn.microsoft.com/rest/api/maps +[product_docs]: https://learn.microsoft.com/azure/azure-maps/ +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[customize_defaultAzureCredential]: https://aka.ms/azsdk/java/identity/credential-chains#how-to-customize-defaultazurecredential + diff --git a/sdk/maps/azure-maps-traffic/assets.json b/sdk/maps/azure-maps-traffic/assets.json new file mode 100644 index 000000000000..a45097a40f02 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/maps/azure-maps-traffic", + "Tag": "java/maps/azure-maps-traffic_8f89335070" +} diff --git a/sdk/maps/azure-maps-traffic/checkstyle-suppressions.xml b/sdk/maps/azure-maps-traffic/checkstyle-suppressions.xml new file mode 100644 index 000000000000..7f3aaf74388e --- /dev/null +++ b/sdk/maps/azure-maps-traffic/checkstyle-suppressions.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/sdk/maps/azure-maps-traffic/ci.yml b/sdk/maps/azure-maps-traffic/ci.yml new file mode 100644 index 000000000000..dadc25bb116a --- /dev/null +++ b/sdk/maps/azure-maps-traffic/ci.yml @@ -0,0 +1,35 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/maps/azure-maps-traffic/ + exclude: + - sdk/maps/azure-maps-traffic/pom.xml +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/maps/azure-maps-traffic/ + + exclude: + - sdk/maps/azure-maps-traffic/pom.xml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: maps/azure-maps-traffic + Artifacts: + - name: azure-maps-traffic + groupId: com.azure + safeName: azuremapstraffic diff --git a/sdk/maps/azure-maps-traffic/pom.xml b/sdk/maps/azure-maps-traffic/pom.xml new file mode 100644 index 000000000000..bb83ff79238b --- /dev/null +++ b/sdk/maps/azure-maps-traffic/pom.xml @@ -0,0 +1,77 @@ + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-maps-traffic + 1.0.0-beta.2 + jar + + Microsoft Azure client library for azure-maps-traffic service + This package contains Microsoft Azure SDK for Traffic Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Maps Traffic REST APIs. Package tag 1.0-preview. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + + + + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + + + false + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + com.azure + azure-identity + 1.18.7 + test + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + diff --git a/sdk/maps/azure-maps-traffic/spotbugs-exclude.xml b/sdk/maps/azure-maps-traffic/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficAsyncClient.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficAsyncClient.java new file mode 100644 index 000000000000..ae6830e13138 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficAsyncClient.java @@ -0,0 +1,734 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.maps.traffic.implementation.TrafficsImpl; +import com.azure.maps.traffic.implementation.helpers.Utility; +import com.azure.maps.traffic.implementation.models.ErrorResponseException; +import com.azure.maps.traffic.implementation.models.ResponseFormat; +import com.azure.maps.traffic.models.TrafficFlowSegmentData; +import com.azure.maps.traffic.models.TrafficFlowSegmentOptions; +import com.azure.maps.traffic.models.TrafficFlowTileOptions; +import com.azure.maps.traffic.models.TrafficIncidentDetail; +import com.azure.maps.traffic.models.TrafficIncidentDetailOptions; +import com.azure.maps.traffic.models.TrafficIncidentTileOptions; +import com.azure.maps.traffic.models.TrafficIncidentViewport; +import com.azure.maps.traffic.models.TrafficIncidentViewportOptions; +import reactor.core.publisher.Mono; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.core.util.FluxUtil.withContext; + +/** Initializes a new instance of the asynchronous TrafficClient type. +* Creating an async client using a {@link com.azure.core.credential.AzureKeyCredential}: +* +*

      +* // Authenticates using subscription key
      +* AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY"));
      +*
      +* // Creates a builder
      +* TrafficClientBuilder builder = new TrafficClientBuilder();
      +* builder.credential(keyCredential);
      +* builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
      +*
      +* // Builds the client
      +* TrafficAsyncClient client = builder.buildAsyncClient();
      +* 
      +* +* +*
      +* // Authenticates using Azure AD building a default credential
      +* // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables
      +* DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
      +*
      +* // Creates a builder
      +* TrafficClientBuilder builder = new TrafficClientBuilder();
      +* builder.credential(tokenCredential);
      +* builder.trafficClientId(System.getenv("MAPS_CLIENT_ID"));
      +* builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
      +*
      +* // Builds a client
      +* TrafficAsyncClient client = builder.buildAsyncClient();
      +* 
      +* +*/ +@ServiceClient(builder = TrafficClientBuilder.class, isAsync = true) +public final class TrafficAsyncClient { + private final TrafficsImpl serviceClient; + private static final ClientLogger LOGGER = new ClientLogger(TrafficAsyncClient.class); + + /** + * Initializes an instance of Traffics client. + * + * @param serviceClient the service client implementation. + */ + TrafficAsyncClient(TrafficsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * __Traffic Flow Tile__ + * + * + *
      +     * System.out.println("Get Traffic Flow Tile:");
      +     *
      +     * // options
      +     * asyncClient.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * asyncClient.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)).setThickness(10));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      The Azure Flow Tile API serves 256 x 256 pixel tiles showing traffic flow. All tiles use the same grid system. + * Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound + * display. The Flow tiles use colors to indicate either the speed of traffic on different road segments, or the + * difference between that speed and the free-flow speed on the road segment in question. + * + * @param options {@link TrafficFlowTileOptions} the options to be used in this search. + * @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficFlowTile(TrafficFlowTileOptions options) { + return getTrafficFlowTileWithResponse(options).flatMap(FluxUtil::toMono); + } + + /** + * __Traffic Flow Tile__ + * + * + *

      +     * System.out.println("Get Traffic Flow Tile:");
      +     *
      +     * // options
      +     * asyncClient.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * asyncClient.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)).setThickness(10));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      The Azure Flow Tile API serves 256 x 256 pixel tiles showing traffic flow. All tiles use the same grid system. + * Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound + * display. The Flow tiles use colors to indicate either the speed of traffic on different road segments, or the + * difference between that speed and the free-flow speed on the road segment in question. + * + * @param options {@link TrafficFlowTileOptions} the options to be used in this search. + * @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficFlowTileWithResponse(TrafficFlowTileOptions options) { + return withContext(context -> getTrafficFlowTileWithResponse(options, context)); + } + + /** + * __Traffic Flow Tile__ + * + * + *

      +     * System.out.println("Get Traffic Flow Tile:");
      +     *
      +     * // options
      +     * asyncClient.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * asyncClient.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)).setThickness(10));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      The Azure Flow Tile API serves 256 x 256 pixel tiles showing traffic flow. All tiles use the same grid system. + * Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound + * display. The Flow tiles use colors to indicate either the speed of traffic on different road segments, or the + * difference between that speed and the free-flow speed on the road segment in question. + * + * @param context The context to associate with this operation. + * @param options {@link TrafficFlowTileOptions} the options to be used in this search. + * @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 the response. + */ + Mono> getTrafficFlowTileWithResponse(TrafficFlowTileOptions options, Context context) { + if (options == null) { + return monoError(LOGGER, new NullPointerException("Options is null")); + } + + return this.serviceClient + .getTrafficFlowTileNoCustomHeadersWithResponseAsync(options.getFormat(), options.getTrafficFlowTileStyle(), + options.getZoom(), options.getTileIndex(), options.getThickness(), context) + .onErrorMap(TrafficAsyncClient::mapThrowable); + } + + /** + * __Traffic Flow Segment__ + * + * + *

      +     * System.out.println("Get Traffic Flow Segment:");
      +     *
      +     * // options
      +     * asyncClient.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)));
      +     *
      +     * // complete
      +     * asyncClient.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)).setOpenLr(false)
      +     *         .setThickness(2).setUnit(SpeedUnit.MPH));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This service provides information about the speeds and travel times of the road fragment closest to the given + * coordinates. It is designed to work alongside the Flow layer of the Render Service to support clickable flow data + * visualizations. With this API, the client side can connect any place in the map with flow data on the closest + * road and present it to the user. + * + * @param options {@link TrafficFlowSegmentOptions} the options to be used in this search. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return this object is returned from a successful Traffic Flow Segment call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficFlowSegment(TrafficFlowSegmentOptions options) { + return getTrafficFlowSegmentWithResponse(options).flatMap(FluxUtil::toMono); + } + + /** + * __Traffic Flow Segment__ + * + * + *

      +     * System.out.println("Get Traffic Flow Segment:");
      +     *
      +     * // options
      +     * asyncClient.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)));
      +     *
      +     * // complete
      +     * asyncClient.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)).setOpenLr(false)
      +     *         .setThickness(2).setUnit(SpeedUnit.MPH));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This service provides information about the speeds and travel times of the road fragment closest to the given + * coordinates. It is designed to work alongside the Flow layer of the Render Service to support clickable flow data + * visualizations. With this API, the client side can connect any place in the map with flow data on the closest + * road and present it to the user. + * + * @param options {@link TrafficFlowSegmentOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic Flow Segment call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficFlowSegmentWithResponse(TrafficFlowSegmentOptions options) { + return withContext(context -> getTrafficFlowSegmentWithResponse(options, context)); + } + + /** + * __Traffic Flow Segment__ + * + * + *

      +     * System.out.println("Get Traffic Flow Segment:");
      +     *
      +     * // options
      +     * asyncClient.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)));
      +     *
      +     * // complete
      +     * asyncClient.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)).setOpenLr(false)
      +     *         .setThickness(2).setUnit(SpeedUnit.MPH));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This service provides information about the speeds and travel times of the road fragment closest to the given + * coordinates. It is designed to work alongside the Flow layer of the Render Service to support clickable flow data + * visualizations. With this API, the client side can connect any place in the map with flow data on the closest + * road and present it to the user. + * + * @param options {@link TrafficFlowSegmentOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic Flow Segment call. + */ + Mono> getTrafficFlowSegmentWithResponse(TrafficFlowSegmentOptions options, + Context context) { + return this.serviceClient + .getTrafficFlowSegmentWithResponseAsync(ResponseFormat.JSON, options.getTrafficFlowSegmentStyle(), + options.getZoom(), Utility.toCoordinates(options.getCoordinates()), options.getUnit(), + options.getThickness(), options.getOpenLr(), context) + .onErrorMap(TrafficAsyncClient::mapThrowable); + } + + /** + * __Traffic Incident Tile__ + * + * + *

      +     * System.out.println("Get Traffic Incident Tile:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(175).setY(408)));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This service serves 256 x 256 pixel tiles showing traffic incidents. All tiles use the same grid system. + * Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound + * display. Traffic tiles render graphics to indicate traffic on the roads in the specified area. + * + * @param options {@link TrafficIncidentTileOptions} the options to be used in this search. + * @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficIncidentTile(TrafficIncidentTileOptions options) { + return getTrafficIncidentTileWithResponse(options).flatMap(FluxUtil::toMono); + } + + /** + * __Traffic Incident Tile__ + * + * + *

      +     * System.out.println("Get Traffic Incident Tile:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(175).setY(408)));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This service serves 256 x 256 pixel tiles showing traffic incidents. All tiles use the same grid system. + * Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound + * display. Traffic tiles render graphics to indicate traffic on the roads in the specified area. + * + * @param options {@link TrafficIncidentTileOptions} the options to be used in this search. + * @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficIncidentTileWithResponse(TrafficIncidentTileOptions options) { + return withContext(context -> getTrafficIncidentTileWithResponse(options, context)); + } + + /** + * __Traffic Incident Tile__ + * + * + *

      +     * System.out.println("Get Traffic Incident Tile:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(175).setY(408)));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This service serves 256 x 256 pixel tiles showing traffic incidents. All tiles use the same grid system. + * Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound + * display. Traffic tiles render graphics to indicate traffic on the roads in the specified area. + * + * @param context The context to associate with this operation. + * @param options {@link TrafficIncidentTileOptions} the options to be used in this search. + * @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 the response. + */ + Mono> getTrafficIncidentTileWithResponse(TrafficIncidentTileOptions options, Context context) { + if (options == null) { + return monoError(LOGGER, new NullPointerException("Options is null")); + } + + return this.serviceClient + .getTrafficIncidentTileNoCustomHeadersWithResponseAsync(options.getFormat(), + options.getTrafficIncidentTileStyle(), options.getZoom(), options.getTileIndex(), + options.getTrafficState(), context) + .onErrorMap(TrafficAsyncClient::mapThrowable); + } + + /** + * __Traffic Incident Detail__ + * + * + *

      +     * System.out.println("Get Traffic Incident Detail:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919"));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919").setLanguage("en")
      +     *         .setProjectionStandard(ProjectionStandard.EPSG900913).setIncidentGeometryType(IncidentGeometryType.ORIGINAL)
      +     *         .setExpandCluster(false).setOriginalPosition(false));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This API provides information on traffic incidents inside a given bounding box, based on the current Traffic + * Model ID. The Traffic Model ID is available to grant synchronization of data between calls and API's. The Traffic + * Model ID is a key value for determining the currency of traffic incidents. It is updated every minute, and is + * valid for two minutes before it times out. It is used in rendering [incident + * tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). It can be obtained from + * the [Viewport API](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport). + * + * @param options {@link TrafficIncidentDetailOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic incident Detail call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficIncidentDetail(TrafficIncidentDetailOptions options) { + return getTrafficIncidentDetailWithResponse(options).flatMap(FluxUtil::toMono); + } + + /** + * __Traffic Incident Detail__ + * + * + *

      +     * System.out.println("Get Traffic Incident Detail:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919"));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919").setLanguage("en")
      +     *         .setProjectionStandard(ProjectionStandard.EPSG900913).setIncidentGeometryType(IncidentGeometryType.ORIGINAL)
      +     *         .setExpandCluster(false).setOriginalPosition(false));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This API provides information on traffic incidents inside a given bounding box, based on the current Traffic + * Model ID. The Traffic Model ID is available to grant synchronization of data between calls and API's. The Traffic + * Model ID is a key value for determining the currency of traffic incidents. It is updated every minute, and is + * valid for two minutes before it times out. It is used in rendering [incident + * tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). It can be obtained from + * the [Viewport API](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport). + * + * @param options {@link TrafficIncidentDetailOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic incident Detail call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getTrafficIncidentDetailWithResponse(TrafficIncidentDetailOptions options) { + return withContext(context -> getTrafficIncidentDetailWithResponse(options, context)); + } + + /** + * __Traffic Incident Detail__ + * + * + *

      +     * System.out.println("Get Traffic Incident Detail:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919"));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919").setLanguage("en")
      +     *         .setProjectionStandard(ProjectionStandard.EPSG900913).setIncidentGeometryType(IncidentGeometryType.ORIGINAL)
      +     *         .setExpandCluster(false).setOriginalPosition(false));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This API provides information on traffic incidents inside a given bounding box, based on the current Traffic + * Model ID. The Traffic Model ID is available to grant synchronization of data between calls and API's. The Traffic + * Model ID is a key value for determining the currency of traffic incidents. It is updated every minute, and is + * valid for two minutes before it times out. It is used in rendering [incident + * tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). It can be obtained from + * the [Viewport API](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport). + * + * @param context The context to associate with this operation. + * @param options {@link TrafficIncidentDetailOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic incident Detail call. + */ + Mono> getTrafficIncidentDetailWithResponse(TrafficIncidentDetailOptions options, + Context context) { + return this.serviceClient + .getTrafficIncidentDetailWithResponseAsync(ResponseFormat.JSON, options.getIncidentDetailStyle(), + Utility.toBoundingBox(options.getBoundingBox()), options.getBoundingZoom(), + options.getTrafficIncidentDetailTrafficModelId(), options.getLanguage(), + options.getProjectionStandard(), options.getIncidentGeometryType(), options.getExpandCluster(), + options.getOriginalPosition(), context) + .onErrorMap(TrafficAsyncClient::mapThrowable); + } + + /** + * __Traffic Incident Viewport__ + * + * + *

      +     * System.out.println("Get Traffic Incident Viewport:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2).setCopyright(true));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This API returns legal and technical information for the viewport described in the request. It should be + * called by client applications whenever the viewport changes (for instance, through zooming, panning, going to a + * location, or displaying a route). The request should contain the bounding box and zoom level of the viewport + * whose information is needed. The return will contain map version information, as well as the current Traffic + * Model ID and copyright IDs. The Traffic Model ID returned by the Viewport Description is used by other APIs to + * retrieve last traffic information for further processing. + * + * @param options {@link TrafficIncidentViewportOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic Incident Viewport call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficIncidentViewport(TrafficIncidentViewportOptions options) { + return getTrafficIncidentViewportWithResponse(options).flatMap(FluxUtil::toMono); + } + + /** + * __Traffic Incident Viewport__ + * + * + *

      +     * System.out.println("Get Traffic Incident Viewport:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2).setCopyright(true));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This API returns legal and technical information for the viewport described in the request. It should be + * called by client applications whenever the viewport changes (for instance, through zooming, panning, going to a + * location, or displaying a route). The request should contain the bounding box and zoom level of the viewport + * whose information is needed. The return will contain map version information, as well as the current Traffic + * Model ID and copyright IDs. The Traffic Model ID returned by the Viewport Description is used by other APIs to + * retrieve last traffic information for further processing. + * + * @param options {@link TrafficIncidentViewportOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic Incident Viewport call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getTrafficIncidentViewportWithResponse(TrafficIncidentViewportOptions options) { + return withContext(context -> getTrafficIncidentViewportWithResponse(options, context)); + } + + /** + * __Traffic Incident Viewport__ + * + * + *

      +     * System.out.println("Get Traffic Incident Viewport:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2).setCopyright(true));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This API returns legal and technical information for the viewport described in the request. It should be + * called by client applications whenever the viewport changes (for instance, through zooming, panning, going to a + * location, or displaying a route). The request should contain the bounding box and zoom level of the viewport + * whose information is needed. The return will contain map version information, as well as the current Traffic + * Model ID and copyright IDs. The Traffic Model ID returned by the Viewport Description is used by other APIs to + * retrieve last traffic information for further processing. + * + * @param context The context to associate with this operation. + * @param options {@link TrafficIncidentViewportOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic Incident Viewport call. + */ + Mono> + getTrafficIncidentViewportWithResponse(TrafficIncidentViewportOptions options, Context context) { + return this.serviceClient.getTrafficIncidentViewportWithResponseAsync(ResponseFormat.JSON, + Utility.toBoundingBox(options.getBoundingBox()), options.getBoundingZoom(), + Utility.toBoundingBox(options.getOverviewBox()), options.getOverviewZoom(), options.getCopyright(), context) + .onErrorMap(TrafficAsyncClient::mapThrowable); + } + + private static Throwable mapThrowable(Throwable throwable) { + if (!(throwable instanceof ErrorResponseException)) { + return throwable; + } + ErrorResponseException exception = (ErrorResponseException) throwable; + return new HttpResponseException(exception.getMessage(), exception.getResponse()); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficClient.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficClient.java new file mode 100644 index 000000000000..d7c6fdb20b6e --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficClient.java @@ -0,0 +1,426 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.maps.traffic.implementation.models.ErrorResponseException; +import com.azure.maps.traffic.models.TrafficFlowSegmentData; +import com.azure.maps.traffic.models.TrafficFlowSegmentOptions; +import com.azure.maps.traffic.models.TrafficFlowTileOptions; +import com.azure.maps.traffic.models.TrafficIncidentDetail; +import com.azure.maps.traffic.models.TrafficIncidentDetailOptions; +import com.azure.maps.traffic.models.TrafficIncidentTileOptions; +import com.azure.maps.traffic.models.TrafficIncidentViewport; +import com.azure.maps.traffic.models.TrafficIncidentViewportOptions; + +/** Initializes a new instance of the synchronous TrafficClient type. + * {@link TrafficClient} instances are created via the {@link TrafficClientBuilder}, as shown below. + * Creating a sync client using a {@link AzureKeyCredential}: + * + *

      + * // Authenticates using subscription key
      + * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY"));
      + *
      + * // Creates a builder
      + * TrafficClientBuilder builder = new TrafficClientBuilder();
      + * builder.credential(keyCredential);
      + * builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
      + *
      + * // Builds the client
      + * TrafficClient client = builder.buildClient();
      + * 
      + * + */ +@ServiceClient(builder = TrafficClientBuilder.class) +public final class TrafficClient { + /** + * Initializes an instance of TrafficClient client. + */ + private final TrafficAsyncClient asyncClient; + + private static final ClientLogger LOGGER = new ClientLogger(TrafficClient.class); + + /** + * Initializes an instance of Traffic client. + * + * @param asyncClient the service client implementation. + */ + TrafficClient(TrafficAsyncClient asyncClient) { + this.asyncClient = asyncClient; + } + + /** + * __Traffic Flow Tile__ + * + * + *
      +     * System.out.println("Get Traffic Flow Tile:");
      +     *
      +     * // options
      +     * client.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * client.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)).setThickness(10));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      The Azure Flow Tile API serves 256 x 256 pixel tiles showing traffic flow. All tiles use the same grid system. + * Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound + * display. The Flow tiles use colors to indicate either the speed of traffic on different road segments, or the + * difference between that speed and the free-flow speed on the road segment in question. + * + * @param options {@link TrafficFlowTileOptions} the options to be used in this search. + * @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData getTrafficFlowTile(TrafficFlowTileOptions options) { + return this.asyncClient.getTrafficFlowTile(options).block(); + } + + /** + * Get traffic flow tile with response + * + * + *

      +     * System.out.println("Get Traffic Flow Tile:");
      +     *
      +     * // options
      +     * client.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * client.getTrafficFlowTile(
      +     *     new TrafficFlowTileOptions()
      +     *         .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10)
      +     *         .setTileIndex(new TileIndex().setX(1022).setY(680)).setThickness(10));
      +     * 
      + * + * + * @param context The context to associate with this operation. + * @param options {@link TrafficFlowTileOptions} the options to be used in this search. + * @return the response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTrafficFlowTileWithResponse(TrafficFlowTileOptions options, Context context) { + return this.asyncClient.getTrafficFlowTileWithResponse(options, context).block(); + } + + /** + * __Traffic Flow Segment__ + * + * + *
      +     * System.out.println("Get Traffic Flow Segment:");
      +     *
      +     * // options
      +     * client.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)));
      +     *
      +     * // complete
      +     * client.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)).setOpenLr(false)
      +     *         .setThickness(2).setUnit(SpeedUnit.MPH));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This service provides information about the speeds and travel times of the road fragment closest to the given + * coordinates. It is designed to work alongside the Flow layer of the Render Service to support clickable flow data + * visualizations. With this API, the client side can connect any place in the map with flow data on the closest + * road and present it to the user. + * + * @param options {@link TrafficFlowSegmentOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic Flow Segment call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrafficFlowSegmentData getTrafficFlowSegment(TrafficFlowSegmentOptions options) { + return this.asyncClient.getTrafficFlowSegment(options).block(); + } + + /** + * Get traffic flow segment with response + * + * + *

      +     * System.out.println("Get Traffic Flow Segment:");
      +     *
      +     * // options
      +     * client.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)));
      +     *
      +     * // complete
      +     * client.getTrafficFlowSegment(
      +     *     new TrafficFlowSegmentOptions()
      +     *         .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10)
      +     *         .setCoordinates(new GeoPosition(4.84239, 52.41072)).setOpenLr(false)
      +     *         .setThickness(2).setUnit(SpeedUnit.MPH));
      +     * 
      + * + * + * @param context The context to associate with this operation. + * @param options {@link TrafficFlowSegmentOptions} the options to be used in this search. + * @return the response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTrafficFlowSegmentWithResponse(TrafficFlowSegmentOptions options, + Context context) { + return this.asyncClient.getTrafficFlowSegmentWithResponse(options, context).block(); + } + + /** + * __Traffic Incident Tile__ + * + * + *
      +     * System.out.println("Get Traffic Incident Tile:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(175).setY(408)));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This service serves 256 x 256 pixel tiles showing traffic incidents. All tiles use the same grid system. + * Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound + * display. Traffic tiles render graphics to indicate traffic on the roads in the specified area. + * + * @param options {@link TrafficIncidentTileOptions} the options to be used in this search. + * @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData getTrafficIncidentTile(TrafficIncidentTileOptions options) { + return this.asyncClient.getTrafficIncidentTile(options).block(); + } + + /** + * Traffic Incident Tile + * + * + *

      +     * System.out.println("Get Traffic Incident Tile:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(1022).setY(680)));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentTile(
      +     *     new TrafficIncidentTileOptions()
      +     *         .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3)
      +     *         .setZoom(10).setTileIndex(new TileIndex().setX(175).setY(408)));
      +     * 
      + * + * + * @param context The context to associate with this operation. + * @param options {@link TrafficIncidentTileOptions} the options to be used in this search. + * @return the response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTrafficIncidentTileWithResponse(TrafficIncidentTileOptions options, + Context context) { + return this.asyncClient.getTrafficIncidentTileWithResponse(options, context).block(); + } + + /** + * __Traffic Incident Detail__ + * + * + *
      +     * System.out.println("Get Traffic Incident Detail:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919"));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919").setLanguage("en")
      +     *         .setProjectionStandard(ProjectionStandard.EPSG900913).setIncidentGeometryType(IncidentGeometryType.ORIGINAL)
      +     *         .setExpandCluster(false).setOriginalPosition(false));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This API provides information on traffic incidents inside a given bounding box, based on the current Traffic + * Model ID. The Traffic Model ID is available to grant synchronization of data between calls and API's. The Traffic + * Model ID is a key value for determining the currency of traffic incidents. It is updated every minute, and is + * valid for two minutes before it times out. It is used in rendering [incident + * tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). It can be obtained from + * the [Viewport API](https://docs.microsoft.com//rest/api/maps/traffic/gettrafficincidentviewport). + * + * @param options {@link TrafficIncidentDetailOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic incident Detail call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrafficIncidentDetail getTrafficIncidentDetail(TrafficIncidentDetailOptions options) { + return this.asyncClient.getTrafficIncidentDetail(options).block(); + } + + /** + * Get traffic incident detail with response + * + * + *

      +     * System.out.println("Get Traffic Incident Detail:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919"));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentDetail(
      +     *     new TrafficIncidentDetailOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11)
      +     *         .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11)
      +     *         .setTrafficmodelId("1335294634919").setLanguage("en")
      +     *         .setProjectionStandard(ProjectionStandard.EPSG900913).setIncidentGeometryType(IncidentGeometryType.ORIGINAL)
      +     *         .setExpandCluster(false).setOriginalPosition(false));
      +     * 
      + * + * + * @param context The context to associate with this operation. + * @param options {@link TrafficIncidentDetailOptions} the options to be used in this search. + * @return the response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTrafficIncidentDetailWithResponse(TrafficIncidentDetailOptions options, + Context context) { + return this.asyncClient.getTrafficIncidentDetailWithResponse(options, context).block(); + } + + /** + * __Traffic Incident Viewport__ + * + * + *
      +     * System.out.println("Get Traffic Incident Viewport:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2).setCopyright(true));
      +     * 
      + * + * + *

      **Applies to**: S0 and S1 pricing tiers. + * + *

      This API returns legal and technical information for the viewport described in the request. It should be + * called by client applications whenever the viewport changes (for instance, through zooming, panning, going to a + * location, or displaying a route). The request should contain the bounding box and zoom level of the viewport + * whose information is needed. The return will contain map version information, as well as the current Traffic + * Model ID and copyright IDs. The Traffic Model ID returned by the Viewport Description is used by other APIs to + * retrieve last traffic information for further processing. + * + * @param options {@link TrafficIncidentViewportOptions} the options to be used in this search. + * @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 this object is returned from a successful Traffic Incident Viewport call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TrafficIncidentViewport getTrafficIncidentViewport(TrafficIncidentViewportOptions options) { + return this.asyncClient.getTrafficIncidentViewport(options).block(); + } + + /** + * Get traffic incident viewport with response + * + * + *

      +     * System.out.println("Get Traffic Incident Viewport:");
      +     *
      +     * // options
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2));
      +     *
      +     * // complete
      +     * client.getTrafficIncidentViewport(
      +     *     new TrafficIncidentViewportOptions()
      +     *         .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45))
      +     *         .setOverviewZoom(2).setCopyright(true));
      +     * 
      + * + * + * @param context The context to associate with this operation. + * @param options {@link TrafficIncidentViewportOptions} the options to be used in this search. + * @return the response + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + getTrafficIncidentViewportWithResponse(TrafficIncidentViewportOptions options, Context context) { + return this.asyncClient.getTrafficIncidentViewportWithResponse(options, context).block(); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficClientBuilder.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficClientBuilder.java new file mode 100644 index 000000000000..c4a531df3ada --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficClientBuilder.java @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.AzureKeyCredentialTrait; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.AzureKeyCredentialPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.maps.traffic.implementation.TrafficClientImpl; +import com.azure.maps.traffic.implementation.TrafficClientImplBuilder; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A builder for creating a new instance of the TrafficClient type. + * Builder class used to instantiate both synchronous and asynchronous {@link TrafficClient} clients. + *

      Example usage

      + * Creating a sync client using a {@link AzureKeyCredential}: + * + *
      + * // Authenticates using subscription key
      + * AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY"));
      + *
      + * // Creates a builder
      + * TrafficClientBuilder builder = new TrafficClientBuilder();
      + * builder.credential(keyCredential);
      + * builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS));
      + *
      + * // Builds the client
      + * TrafficClient client = builder.buildClient();
      + * 
      + * +*/ +@ServiceClientBuilder(serviceClients = { TrafficClient.class, TrafficAsyncClient.class }) +public final class TrafficClientBuilder + implements AzureKeyCredentialTrait, TokenCredentialTrait, + HttpTrait, ConfigurationTrait, EndpointTrait { + + // constants + private static final ClientLogger LOGGER = new ClientLogger(TrafficClientBuilder.class); + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; + private static final HttpHeaderName X_MS_CLIENT_ID = HttpHeaderName.fromString("x-ms-client-id"); + private static final Map PROPERTIES = CoreUtils.getProperties("azure-maps-traffic.properties"); + + // subscription-key + static final String MAPS_SUBSCRIPTION_KEY = "subscription-key"; + // auth scope + static final String[] DEFAULT_SCOPES = new String[] { "https://atlas.microsoft.com/.default" }; + + // instance fields + private String endpoint; + private TrafficServiceVersion serviceVersion; + /* + * Specifies which account is intended for usage in conjunction with the + * Azure AD security model. It represents a unique ID for the Azure Maps + * account and can be retrieved from the Azure Maps management plane + * Account API. To use Azure AD security in Azure Maps see the following + * [articles](https://aka.ms/amauthdetails) for guidance. + */ + private String trafficClientId; + // The HTTP pipeline to send requests through + private HttpPipeline pipeline; + //The HTTP client used to send the request + private HttpClient httpClient; + // The configuration store that is used during construction of the service client. + private Configuration configuration; + // The logging configuration for HTTP requests and responses. + private HttpLogOptions httpLogOptions; + // The list of Http pipeline policies to add. + private final List pipelinePolicies; + // The client options such as application ID and custom headers to set on a request. + private ClientOptions clientOptions; + // The retry policy that will attempt to retry failed requests, if applicable. + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + + // credentials + private AzureKeyCredential keyCredential; + private TokenCredential tokenCredential; + + /** + * Default constructor for the builder class; Create an instance of the TrafficClientBuilder. + */ + public TrafficClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /** + * Sets the Azure Maps client id for use with Azure AD Authentication. This client id + * is the account-based GUID that appears on the Azure Maps Authentication page. + *

      + * More details: Azure Maps AD Authentication + * + * @param trafficClientId the clientId value. + * @return the SearchClientBuilder. + */ + public TrafficClientBuilder trafficClientId(String trafficClientId) { + this.trafficClientId = Objects.requireNonNull(trafficClientId, "'trafficClientId' cannot be null."); + return this; + } + + /** + * Set endpoint of the service. + * + * @param endpoint url of the service + * @return TrafficClientBuilder + */ + @Override + public TrafficClientBuilder endpoint(String endpoint) { + this.endpoint = Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + return this; + } + + /** + * Sets the {@link TrafficServiceVersion} that is used when making API requests. + *

      + * If a service version is not provided, the service version that will be used will be the latest known service + * version based on the version of the client library being used. If no service version is specified, updating to a + * newer version of the client library will have the result of potentially moving to a newer service version. + *

      + * Targeting a specific service version may also mean that the service will return an error for newer APIs. + * + * @param version {@link TrafficServiceVersion} of the service to be used when making requests. + * @return the updated TrafficClientBuilder object + */ + public TrafficClientBuilder serviceVersion(TrafficServiceVersion version) { + this.serviceVersion = version; + return this; + } + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the TrafficClientBuilder. + */ + @Override + public TrafficClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.info("Pipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /** + * Sets The HTTP client used to send the request. + * + * @param httpClient the httpClient value. + * @return the TrafficClientBuilder. + */ + @Override + public TrafficClientBuilder httpClient(HttpClient httpClient) { + if (this.httpClient != null && httpClient == null) { + LOGGER.info("HttpClient is being set to 'null' when it was previously configured."); + } + this.httpClient = httpClient; + return this; + } + + /** + * Sets The configuration store that is used during construction of the service client. + * + * @param configuration the configuration value. + * @return the TrafficClientBuilder. + */ + @Override + public TrafficClientBuilder configuration(Configuration configuration) { + this.configuration = Objects.requireNonNull(configuration, "'configuration' cannot be null."); + return this; + } + + /** + * Sets The logging configuration for HTTP requests and responses. + * + * @param httpLogOptions the httpLogOptions value. + * @return the TrafficClientBuilder. + */ + @Override + public TrafficClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'logOptions' cannot be null."); + return this; + } + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the TrafficClientBuilder. + */ + public TrafficClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets The client options such as application ID and custom headers to set on a request. + * + * @param clientOptions the clientOptions value. + * @return the TrafficClientBuilder. + */ + @Override + public TrafficClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = Objects.requireNonNull(clientOptions, "'clientOptions' cannot be null."); + return this; + } + + /** + * Adds a custom Http pipeline policy. + * + * @param customPolicy The custom Http pipeline policy to add. + * @return the TrafficClientBuilder. + */ + @Override + public TrafficClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + pipelinePolicies.add(Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null.")); + return this; + } + + /** + * Sets the {@link TokenCredential} used to authenticate HTTP requests. + * + * @param tokenCredential {@link TokenCredential} used to authenticate HTTP requests. + * @return The updated {@link TrafficClientBuilder} object. + * @throws NullPointerException If {@code tokenCredential} is null. + */ + @Override + public TrafficClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = Objects.requireNonNull(tokenCredential, "'tokenCredential' cannot be null."); + return this; + } + + /** + * Sets the {@link AzureKeyCredential} used to authenticate HTTP requests. + * + * @param keyCredential The {@link AzureKeyCredential} used to authenticate HTTP requests. + * @return The updated {@link TrafficClientBuilder} object. + * @throws NullPointerException If {@code keyCredential} is null. + */ + @Override + public TrafficClientBuilder credential(AzureKeyCredential keyCredential) { + this.keyCredential = Objects.requireNonNull(keyCredential, "'keyCredential' cannot be null."); + return this; + } + + /** + * Sets retry options + * @param retryOptions the retry options for the client + * @return a reference to this {@code TrafficClientBuilder} + */ + @Override + public TrafficClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * Builds an instance of TrafficClientImpl with the provided parameters. + * + * @return an instance of TrafficClientImpl. + */ + private TrafficClientImpl buildInnerClient() { + if (endpoint == null) { + this.endpoint = "https://atlas.microsoft.com"; + } + if (serviceVersion == null) { + this.serviceVersion = TrafficServiceVersion.getLatest(); + } + if (pipeline == null) { + this.pipeline = createHttpPipeline(); + } + // client impl + TrafficClientImplBuilder builder = new TrafficClientImplBuilder(); + builder.host(this.endpoint); + builder.apiVersion(this.serviceVersion.getVersion()); + builder.pipeline(this.pipeline); + builder.clientId(this.trafficClientId); + builder.httpClient(this.httpClient); + builder.httpLogOptions(this.httpLogOptions); + + return builder.buildClient(); + } + + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + if (httpLogOptions == null) { + httpLogOptions = new HttpLogOptions(); + } + if (clientOptions == null) { + clientOptions = new ClientOptions(); + } + + // Configure pipelines and user agent + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "JavaTrafficSDK"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, serviceVersion.getVersion()); + String applicationId = CoreUtils.getApplicationId(clientOptions, httpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + + // configure headers + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(clientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + + // Authentications + if (tokenCredential != null) { + if (this.trafficClientId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing 'timezoneClientId' parameter required for Azure AD Authentication")); + } + // we need the x-ms-client header + HttpHeaders clientHeader = new HttpHeaders(); + clientHeader.add(X_MS_CLIENT_ID, this.trafficClientId); + policies.add(new AddHeadersPolicy(clientHeader)); + + // User token based policy + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } else if (keyCredential != null) { + policies.add(new AzureKeyCredentialPolicy(MAPS_SUBSCRIPTION_KEY, keyCredential)); + } else { + // Throw exception that credential and tokenCredential cannot be null + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing credential information while building a client.")); + } + + // Add final policies + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions)); + policies.add(new CookiePolicy()); + policies.addAll(this.pipelinePolicies); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + + // build the http pipeline + return new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + } + + /** + * Builds an instance of SearchAsyncClient async client. + * + * @return an instance of SearchAsyncClient. + */ + public TrafficAsyncClient buildAsyncClient() { + return new TrafficAsyncClient(buildInnerClient().getTraffics()); + } + + /** + * Builds an instance of SearchClient sync client. + * + * @return an instance of SearchClient. + */ + public TrafficClient buildClient() { + return new TrafficClient(buildAsyncClient()); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficServiceVersion.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficServiceVersion.java new file mode 100644 index 000000000000..11b3986967a3 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/TrafficServiceVersion.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic; + +import com.azure.core.util.ServiceVersion; + +/** + * Contains the versions of the Traffic Service available for the clients. + */ +public enum TrafficServiceVersion implements ServiceVersion { + /** + * Service version {@code 1.0}. + */ + V1_0("1.0"); + + private final String version; + + /** + * Creates a new {@link TrafficServiceVersion} with a version string. + * + * @param version the service version + */ + TrafficServiceVersion(String version) { + this.version = version; + } + + /** + * Gets the latest service version supported by this client library + * + * @return the latest {@link TrafficServiceVersion} + */ + public static TrafficServiceVersion getLatest() { + return V1_0; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficClientImpl.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficClientImpl.java new file mode 100644 index 000000000000..5afb80f8c0e0 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficClientImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the TrafficClient type. + */ +public final class TrafficClientImpl { + /** + * Indicates the account intended for use with the Microsoft Entra ID security model. This unique ID for the Azure + * Maps account can be obtained from the [Azure Maps management plane Account + * API](/rest/api/maps-management/accounts). For more information on using Microsoft Entra ID security in Azure + * Maps, see [Manage authentication in Azure Maps](/azure/azure-maps/how-to-manage-authentication). + */ + private final String clientId; + + /** + * Gets Indicates the account intended for use with the Microsoft Entra ID security model. This unique ID for the + * Azure Maps account can be obtained from the [Azure Maps management plane Account + * API](/rest/api/maps-management/accounts). For more information on using Microsoft Entra ID security in Azure + * Maps, see [Manage authentication in Azure Maps](/azure/azure-maps/how-to-manage-authentication). + * + * @return the clientId value. + */ + public String getClientId() { + return this.clientId; + } + + /** + * server parameter. + */ + private final String host; + + /** + * Gets server parameter. + * + * @return the host value. + */ + public String getHost() { + return this.host; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The TrafficsImpl object to access its operations. + */ + private final TrafficsImpl traffics; + + /** + * Gets the TrafficsImpl object to access its operations. + * + * @return the TrafficsImpl object. + */ + public TrafficsImpl getTraffics() { + return this.traffics; + } + + /** + * Initializes an instance of TrafficClient client. + * + * @param clientId Indicates the account intended for use with the Microsoft Entra ID security model. This unique ID + * for the Azure Maps account can be obtained from the [Azure Maps management plane Account + * API](/rest/api/maps-management/accounts). For more information on using Microsoft Entra ID security in Azure + * Maps, see [Manage authentication in Azure Maps](/azure/azure-maps/how-to-manage-authentication). + * @param host server parameter. + * @param apiVersion Api Version. + */ + TrafficClientImpl(String clientId, String host, String apiVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), clientId, host, apiVersion); + } + + /** + * Initializes an instance of TrafficClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param clientId Indicates the account intended for use with the Microsoft Entra ID security model. This unique ID + * for the Azure Maps account can be obtained from the [Azure Maps management plane Account + * API](/rest/api/maps-management/accounts). For more information on using Microsoft Entra ID security in Azure + * Maps, see [Manage authentication in Azure Maps](/azure/azure-maps/how-to-manage-authentication). + * @param host server parameter. + * @param apiVersion Api Version. + */ + TrafficClientImpl(HttpPipeline httpPipeline, String clientId, String host, String apiVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), clientId, host, apiVersion); + } + + /** + * Initializes an instance of TrafficClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param clientId Indicates the account intended for use with the Microsoft Entra ID security model. This unique ID + * for the Azure Maps account can be obtained from the [Azure Maps management plane Account + * API](/rest/api/maps-management/accounts). For more information on using Microsoft Entra ID security in Azure + * Maps, see [Manage authentication in Azure Maps](/azure/azure-maps/how-to-manage-authentication). + * @param host server parameter. + * @param apiVersion Api Version. + */ + TrafficClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String clientId, String host, + String apiVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.clientId = clientId; + this.host = host; + this.apiVersion = apiVersion; + this.traffics = new TrafficsImpl(this); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficClientImplBuilder.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficClientImplBuilder.java new file mode 100644 index 000000000000..96fbcad790f1 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficClientImplBuilder.java @@ -0,0 +1,332 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the TrafficClient type. + */ +@ServiceClientBuilder(serviceClients = { TrafficClientImpl.class }) +public final class TrafficClientImplBuilder + implements HttpTrait, ConfigurationTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final Map PROPERTIES = new HashMap<>(); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the TrafficClientImplBuilder. + */ + @Generated + public TrafficClientImplBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TrafficClientImplBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TrafficClientImplBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TrafficClientImplBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TrafficClientImplBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TrafficClientImplBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TrafficClientImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TrafficClientImplBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * Indicates the account intended for use with the Microsoft Entra ID security model. This unique ID for the Azure + * Maps account can be obtained from the [Azure Maps management plane Account + * API](/rest/api/maps-management/accounts). For more information on using Microsoft Entra ID security in Azure + * Maps, see [Manage authentication in Azure Maps](/azure/azure-maps/how-to-manage-authentication). + */ + @Generated + private String clientId; + + /** + * Sets Indicates the account intended for use with the Microsoft Entra ID security model. This unique ID for the + * Azure Maps account can be obtained from the [Azure Maps management plane Account + * API](/rest/api/maps-management/accounts). For more information on using Microsoft Entra ID security in Azure + * Maps, see [Manage authentication in Azure Maps](/azure/azure-maps/how-to-manage-authentication). + * + * @param clientId the clientId value. + * @return the TrafficClientImplBuilder. + */ + @Generated + public TrafficClientImplBuilder clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /* + * server parameter + */ + @Generated + private String host; + + /** + * Sets server parameter. + * + * @param host the host value. + * @return the TrafficClientImplBuilder. + */ + @Generated + public TrafficClientImplBuilder host(String host) { + this.host = host; + return this; + } + + /* + * Api Version + */ + @Generated + private String apiVersion; + + /** + * Sets Api Version. + * + * @param apiVersion the apiVersion value. + * @return the TrafficClientImplBuilder. + */ + @Generated + public TrafficClientImplBuilder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + @Generated + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the TrafficClientImplBuilder. + */ + @Generated + public TrafficClientImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the TrafficClientImplBuilder. + */ + @Generated + public TrafficClientImplBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of TrafficClientImpl with the provided parameters. + * + * @return an instance of TrafficClientImpl. + */ + @Generated + public TrafficClientImpl buildClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + String localHost = (host != null) ? host : "https://atlas.microsoft.com"; + String localApiVersion = (apiVersion != null) ? apiVersion : "1.0"; + SerializerAdapter localSerializerAdapter + = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); + TrafficClientImpl client + = new TrafficClientImpl(localPipeline, localSerializerAdapter, this.clientId, localHost, localApiVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + private static final ClientLogger LOGGER = new ClientLogger(TrafficClientImplBuilder.class); +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficsImpl.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficsImpl.java new file mode 100644 index 000000000000..1e8757bd824c --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/TrafficsImpl.java @@ -0,0 +1,1363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.serializer.CollectionFormat; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.maps.traffic.implementation.models.ErrorResponseException; +import com.azure.maps.traffic.implementation.models.ResponseFormat; +import com.azure.maps.traffic.implementation.models.TrafficsGetTrafficFlowTileHeaders; +import com.azure.maps.traffic.implementation.models.TrafficsGetTrafficIncidentTileHeaders; +import com.azure.maps.traffic.models.IncidentDetailStyle; +import com.azure.maps.traffic.models.IncidentGeometryType; +import com.azure.maps.traffic.models.ProjectionStandard; +import com.azure.maps.traffic.models.SpeedUnit; +import com.azure.maps.traffic.models.TileFormat; +import com.azure.maps.traffic.models.TileIndex; +import com.azure.maps.traffic.models.TrafficFlowSegmentData; +import com.azure.maps.traffic.models.TrafficFlowSegmentStyle; +import com.azure.maps.traffic.models.TrafficFlowTileStyle; +import com.azure.maps.traffic.models.TrafficIncidentDetail; +import com.azure.maps.traffic.models.TrafficIncidentTileStyle; +import com.azure.maps.traffic.models.TrafficIncidentViewport; +import java.util.List; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Traffics. + */ +public final class TrafficsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final TrafficsService service; + + /** + * The service client containing this operation class. + */ + private final TrafficClientImpl client; + + /** + * Initializes an instance of TrafficsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TrafficsImpl(TrafficClientImpl client) { + this.service = RestProxy.create(TrafficsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for TrafficClientTraffics to be used by the proxy service to perform REST + * calls. + */ + @Host("{$host}") + @ServiceInterface(name = "TrafficClientTraffics") + public interface TrafficsService { + @Get("/traffic/flow/tile/{format}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorResponseException.class) + Mono> getTrafficFlowTile( + @HostParam("$host") String host, @HeaderParam("x-ms-client-id") String clientId, + @QueryParam("api-version") String apiVersion, @PathParam("format") TileFormat format, + @QueryParam("style") TrafficFlowTileStyle style, @QueryParam("zoom") int zoom, @QueryParam("x") int x, + @QueryParam("y") int y, @QueryParam("thickness") Integer thickness, @HeaderParam("Accept") String accept, + Context context); + + @Get("/traffic/flow/tile/{format}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorResponseException.class) + Mono> getTrafficFlowTileNoCustomHeaders(@HostParam("$host") String host, + @HeaderParam("x-ms-client-id") String clientId, @QueryParam("api-version") String apiVersion, + @PathParam("format") TileFormat format, @QueryParam("style") TrafficFlowTileStyle style, + @QueryParam("zoom") int zoom, @QueryParam("x") int x, @QueryParam("y") int y, + @QueryParam("thickness") Integer thickness, @HeaderParam("Accept") String accept, Context context); + + @Get("/traffic/flow/segment/{format}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorResponseException.class) + Mono> getTrafficFlowSegment(@HostParam("$host") String host, + @HeaderParam("x-ms-client-id") String clientId, @QueryParam("api-version") String apiVersion, + @PathParam("format") ResponseFormat format, @QueryParam("style") TrafficFlowSegmentStyle style, + @QueryParam("zoom") int zoom, @QueryParam("query") String coordinates, @QueryParam("unit") SpeedUnit unit, + @QueryParam("thickness") Integer thickness, @QueryParam("openLr") Boolean openLr, + @HeaderParam("Accept") String accept, Context context); + + @Get("/traffic/incident/tile/{format}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorResponseException.class) + Mono> getTrafficIncidentTile( + @HostParam("$host") String host, @HeaderParam("x-ms-client-id") String clientId, + @QueryParam("api-version") String apiVersion, @PathParam("format") TileFormat format, + @QueryParam("style") TrafficIncidentTileStyle style, @QueryParam("zoom") int zoom, @QueryParam("x") int x, + @QueryParam("y") int y, @QueryParam("t") String trafficState, @HeaderParam("Accept") String accept, + Context context); + + @Get("/traffic/incident/tile/{format}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorResponseException.class) + Mono> getTrafficIncidentTileNoCustomHeaders(@HostParam("$host") String host, + @HeaderParam("x-ms-client-id") String clientId, @QueryParam("api-version") String apiVersion, + @PathParam("format") TileFormat format, @QueryParam("style") TrafficIncidentTileStyle style, + @QueryParam("zoom") int zoom, @QueryParam("x") int x, @QueryParam("y") int y, + @QueryParam("t") String trafficState, @HeaderParam("Accept") String accept, Context context); + + @Get("/traffic/incident/detail/{format}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorResponseException.class) + Mono> getTrafficIncidentDetail(@HostParam("$host") String host, + @HeaderParam("x-ms-client-id") String clientId, @QueryParam("api-version") String apiVersion, + @PathParam("format") ResponseFormat format, @QueryParam("style") IncidentDetailStyle style, + @QueryParam("boundingbox") String boundingbox, @QueryParam("boundingZoom") int boundingZoom, + @QueryParam("trafficmodelid") String trafficmodelid, @QueryParam("language") String language, + @QueryParam("projection") ProjectionStandard projection, + @QueryParam("geometries") IncidentGeometryType geometries, + @QueryParam("expandCluster") Boolean expandCluster, + @QueryParam("originalPosition") Boolean originalPosition, @HeaderParam("Accept") String accept, + Context context); + + @Get("/traffic/incident/viewport/{format}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorResponseException.class) + Mono> getTrafficIncidentViewport(@HostParam("$host") String host, + @HeaderParam("x-ms-client-id") String clientId, @QueryParam("api-version") String apiVersion, + @PathParam("format") ResponseFormat format, @QueryParam("boundingbox") String boundingbox, + @QueryParam("boundingzoom") int boundingzoom, @QueryParam("overviewbox") String overviewbox, + @QueryParam("overviewzoom") int overviewzoom, @QueryParam("copyright") Boolean copyright, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic flow. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Tile` API is an HTTP `GET` request that returns real-time information about traffic conditions + * in 256 x 256 pixel tiles that show traffic flow. All tiles use the same grid system. Because the traffic tiles + * use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use + * colors to indicate either the speed of traffic on different road segments, or the difference between that speed + * and the free-flow speed on the road segment in question. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style <p>The style to be used to render the tile.</p>. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. This parameter is not valid when format is pbf. + * @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 the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficFlowTileWithResponseAsync( + TileFormat format, TrafficFlowTileStyle style, int zoom, TileIndex tileIndex, Integer thickness) { + return FluxUtil.withContext( + context -> getTrafficFlowTileWithResponseAsync(format, style, zoom, tileIndex, thickness, context)); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic flow. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Tile` API is an HTTP `GET` request that returns real-time information about traffic conditions + * in 256 x 256 pixel tiles that show traffic flow. All tiles use the same grid system. Because the traffic tiles + * use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use + * colors to indicate either the speed of traffic on different road segments, or the difference between that speed + * and the free-flow speed on the road segment in question. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style <p>The style to be used to render the tile.</p>. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. This parameter is not valid when format is pbf. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficFlowTileWithResponseAsync( + TileFormat format, TrafficFlowTileStyle style, int zoom, TileIndex tileIndex, Integer thickness, + Context context) { + final String accept = "application/json, image/jpeg, image/png, image/pbf, application/vnd.mapbox-vector-tile"; + int x = tileIndex.getX(); + int y = tileIndex.getY(); + return service.getTrafficFlowTile(this.client.getHost(), this.client.getClientId(), this.client.getApiVersion(), + format, style, zoom, x, y, thickness, accept, context); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic flow. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Tile` API is an HTTP `GET` request that returns real-time information about traffic conditions + * in 256 x 256 pixel tiles that show traffic flow. All tiles use the same grid system. Because the traffic tiles + * use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use + * colors to indicate either the speed of traffic on different road segments, or the difference between that speed + * and the free-flow speed on the road segment in question. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style <p>The style to be used to render the tile.</p>. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. This parameter is not valid when format is pbf. + * @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 the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficFlowTileAsync(TileFormat format, TrafficFlowTileStyle style, int zoom, + TileIndex tileIndex, Integer thickness) { + return getTrafficFlowTileWithResponseAsync(format, style, zoom, tileIndex, thickness) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic flow. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Tile` API is an HTTP `GET` request that returns real-time information about traffic conditions + * in 256 x 256 pixel tiles that show traffic flow. All tiles use the same grid system. Because the traffic tiles + * use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use + * colors to indicate either the speed of traffic on different road segments, or the difference between that speed + * and the free-flow speed on the road segment in question. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style <p>The style to be used to render the tile.</p>. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. This parameter is not valid when format is pbf. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficFlowTileAsync(TileFormat format, TrafficFlowTileStyle style, int zoom, + TileIndex tileIndex, Integer thickness, Context context) { + return getTrafficFlowTileWithResponseAsync(format, style, zoom, tileIndex, thickness, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic flow. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Tile` API is an HTTP `GET` request that returns real-time information about traffic conditions + * in 256 x 256 pixel tiles that show traffic flow. All tiles use the same grid system. Because the traffic tiles + * use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use + * colors to indicate either the speed of traffic on different road segments, or the difference between that speed + * and the free-flow speed on the road segment in question. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style <p>The style to be used to render the tile.</p>. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. This parameter is not valid when format is pbf. + * @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 the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficFlowTileNoCustomHeadersWithResponseAsync(TileFormat format, + TrafficFlowTileStyle style, int zoom, TileIndex tileIndex, Integer thickness) { + return FluxUtil.withContext(context -> getTrafficFlowTileNoCustomHeadersWithResponseAsync(format, style, zoom, + tileIndex, thickness, context)); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic flow. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Tile` API is an HTTP `GET` request that returns real-time information about traffic conditions + * in 256 x 256 pixel tiles that show traffic flow. All tiles use the same grid system. Because the traffic tiles + * use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use + * colors to indicate either the speed of traffic on different road segments, or the difference between that speed + * and the free-flow speed on the road segment in question. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style <p>The style to be used to render the tile.</p>. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. This parameter is not valid when format is pbf. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficFlowTileNoCustomHeadersWithResponseAsync(TileFormat format, + TrafficFlowTileStyle style, int zoom, TileIndex tileIndex, Integer thickness, Context context) { + final String accept = "application/json, image/jpeg, image/png, image/pbf, application/vnd.mapbox-vector-tile"; + int x = tileIndex.getX(); + int y = tileIndex.getY(); + return service.getTrafficFlowTileNoCustomHeaders(this.client.getHost(), this.client.getClientId(), + this.client.getApiVersion(), format, style, zoom, x, y, thickness, accept, context); + } + + /** + * Use to get information about the speeds and travel times of the specified section of road. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Segment` API is an HTTP `GET` request that provides information about the speeds and travel + * times of the road fragment closest to the given coordinates. It is designed to work alongside the Flow layer of + * the [Render](/rest/api/maps/render) Service to support clickable flow data visualizations. With the `Traffic Flow + * Segment` API, the client side can connect any place in the map with flow data on the closest road and present it + * to the user. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param style The style to be used to render the tile. Valid values are absolute which returns colors reflecting + * the absolute speed measured, relative which returns the speed relative to free-flow, Relative-delay which + * displays relative speeds only where they are different from the freeflow speeds. + * @param zoom Zoom level for the desired tile. Zoom value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param coordinates Coordinates of the point close to the road segment. This parameter is a list of four + * coordinates, containing two coordinate pairs (lat, long, lat, long), and calculated using EPSG4326 projection. + * When this endpoint is called directly, coordinates are passed in as a single string containing four coordinates, + * separated by commas. + * @param unit Unit of speed in KMPH or MPH. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. + * @param openLr Boolean on whether the response should include OpenLR code. + * @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 this object is returned from a successful Traffic Flow Segment call along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficFlowSegmentWithResponseAsync(ResponseFormat format, + TrafficFlowSegmentStyle style, int zoom, List coordinates, SpeedUnit unit, Integer thickness, + Boolean openLr) { + return FluxUtil.withContext(context -> getTrafficFlowSegmentWithResponseAsync(format, style, zoom, coordinates, + unit, thickness, openLr, context)); + } + + /** + * Use to get information about the speeds and travel times of the specified section of road. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Segment` API is an HTTP `GET` request that provides information about the speeds and travel + * times of the road fragment closest to the given coordinates. It is designed to work alongside the Flow layer of + * the [Render](/rest/api/maps/render) Service to support clickable flow data visualizations. With the `Traffic Flow + * Segment` API, the client side can connect any place in the map with flow data on the closest road and present it + * to the user. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param style The style to be used to render the tile. Valid values are absolute which returns colors reflecting + * the absolute speed measured, relative which returns the speed relative to free-flow, Relative-delay which + * displays relative speeds only where they are different from the freeflow speeds. + * @param zoom Zoom level for the desired tile. Zoom value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param coordinates Coordinates of the point close to the road segment. This parameter is a list of four + * coordinates, containing two coordinate pairs (lat, long, lat, long), and calculated using EPSG4326 projection. + * When this endpoint is called directly, coordinates are passed in as a single string containing four coordinates, + * separated by commas. + * @param unit Unit of speed in KMPH or MPH. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. + * @param openLr Boolean on whether the response should include OpenLR code. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return this object is returned from a successful Traffic Flow Segment call along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficFlowSegmentWithResponseAsync(ResponseFormat format, + TrafficFlowSegmentStyle style, int zoom, List coordinates, SpeedUnit unit, Integer thickness, + Boolean openLr, Context context) { + final String accept = "application/json"; + String coordinatesConverted + = JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(coordinates, CollectionFormat.CSV); + return service.getTrafficFlowSegment(this.client.getHost(), this.client.getClientId(), + this.client.getApiVersion(), format, style, zoom, coordinatesConverted, unit, thickness, openLr, accept, + context); + } + + /** + * Use to get information about the speeds and travel times of the specified section of road. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Segment` API is an HTTP `GET` request that provides information about the speeds and travel + * times of the road fragment closest to the given coordinates. It is designed to work alongside the Flow layer of + * the [Render](/rest/api/maps/render) Service to support clickable flow data visualizations. With the `Traffic Flow + * Segment` API, the client side can connect any place in the map with flow data on the closest road and present it + * to the user. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param style The style to be used to render the tile. Valid values are absolute which returns colors reflecting + * the absolute speed measured, relative which returns the speed relative to free-flow, Relative-delay which + * displays relative speeds only where they are different from the freeflow speeds. + * @param zoom Zoom level for the desired tile. Zoom value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param coordinates Coordinates of the point close to the road segment. This parameter is a list of four + * coordinates, containing two coordinate pairs (lat, long, lat, long), and calculated using EPSG4326 projection. + * When this endpoint is called directly, coordinates are passed in as a single string containing four coordinates, + * separated by commas. + * @param unit Unit of speed in KMPH or MPH. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. + * @param openLr Boolean on whether the response should include OpenLR code. + * @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 this object is returned from a successful Traffic Flow Segment call on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficFlowSegmentAsync(ResponseFormat format, TrafficFlowSegmentStyle style, + int zoom, List coordinates, SpeedUnit unit, Integer thickness, Boolean openLr) { + return getTrafficFlowSegmentWithResponseAsync(format, style, zoom, coordinates, unit, thickness, openLr) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Use to get information about the speeds and travel times of the specified section of road. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Flow Segment` API is an HTTP `GET` request that provides information about the speeds and travel + * times of the road fragment closest to the given coordinates. It is designed to work alongside the Flow layer of + * the [Render](/rest/api/maps/render) Service to support clickable flow data visualizations. With the `Traffic Flow + * Segment` API, the client side can connect any place in the map with flow data on the closest road and present it + * to the user. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param style The style to be used to render the tile. Valid values are absolute which returns colors reflecting + * the absolute speed measured, relative which returns the speed relative to free-flow, Relative-delay which + * displays relative speeds only where they are different from the freeflow speeds. + * @param zoom Zoom level for the desired tile. Zoom value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param coordinates Coordinates of the point close to the road segment. This parameter is a list of four + * coordinates, containing two coordinate pairs (lat, long, lat, long), and calculated using EPSG4326 projection. + * When this endpoint is called directly, coordinates are passed in as a single string containing four coordinates, + * separated by commas. + * @param unit Unit of speed in KMPH or MPH. + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the + * accepted values range from 1 - 20. The default value is 10. + * @param openLr Boolean on whether the response should include OpenLR code. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return this object is returned from a successful Traffic Flow Segment call on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficFlowSegmentAsync(ResponseFormat format, TrafficFlowSegmentStyle style, + int zoom, List coordinates, SpeedUnit unit, Integer thickness, Boolean openLr, Context context) { + return getTrafficFlowSegmentWithResponseAsync(format, style, zoom, coordinates, unit, thickness, openLr, + context).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic incidents. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Tile` API is an HTTP `GET` request that returns 256 x 256 pixel tiles showing traffic + * incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be + * layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on + * the roads in the specified area. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style The style to be used to render the tile. This parameter is not valid when format is pbf. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param trafficState Reference value for the state of traffic at a particular time, obtained from the Viewport API + * call, trafficModelId attribute in trafficState field. It is updated every minute, and is valid for two minutes + * before it times out. Use -1 to get the most recent traffic information. Default: most recent traffic 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. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getTrafficIncidentTileWithResponseAsync(TileFormat format, TrafficIncidentTileStyle style, int zoom, + TileIndex tileIndex, String trafficState) { + return FluxUtil.withContext( + context -> getTrafficIncidentTileWithResponseAsync(format, style, zoom, tileIndex, trafficState, context)); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic incidents. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Tile` API is an HTTP `GET` request that returns 256 x 256 pixel tiles showing traffic + * incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be + * layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on + * the roads in the specified area. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style The style to be used to render the tile. This parameter is not valid when format is pbf. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param trafficState Reference value for the state of traffic at a particular time, obtained from the Viewport API + * call, trafficModelId attribute in trafficState field. It is updated every minute, and is valid for two minutes + * before it times out. Use -1 to get the most recent traffic information. Default: most recent traffic 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getTrafficIncidentTileWithResponseAsync(TileFormat format, TrafficIncidentTileStyle style, int zoom, + TileIndex tileIndex, String trafficState, Context context) { + final String accept = "application/json, image/jpeg, image/png, image/pbf, application/vnd.mapbox-vector-tile"; + int x = tileIndex.getX(); + int y = tileIndex.getY(); + return service.getTrafficIncidentTile(this.client.getHost(), this.client.getClientId(), + this.client.getApiVersion(), format, style, zoom, x, y, trafficState, accept, context); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic incidents. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Tile` API is an HTTP `GET` request that returns 256 x 256 pixel tiles showing traffic + * incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be + * layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on + * the roads in the specified area. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style The style to be used to render the tile. This parameter is not valid when format is pbf. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param trafficState Reference value for the state of traffic at a particular time, obtained from the Viewport API + * call, trafficModelId attribute in trafficState field. It is updated every minute, and is valid for two minutes + * before it times out. Use -1 to get the most recent traffic information. Default: most recent traffic 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. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficIncidentTileAsync(TileFormat format, TrafficIncidentTileStyle style, int zoom, + TileIndex tileIndex, String trafficState) { + return getTrafficIncidentTileWithResponseAsync(format, style, zoom, tileIndex, trafficState) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic incidents. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Tile` API is an HTTP `GET` request that returns 256 x 256 pixel tiles showing traffic + * incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be + * layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on + * the roads in the specified area. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style The style to be used to render the tile. This parameter is not valid when format is pbf. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param trafficState Reference value for the state of traffic at a particular time, obtained from the Viewport API + * call, trafficModelId attribute in trafficState field. It is updated every minute, and is valid for two minutes + * before it times out. Use -1 to get the most recent traffic information. Default: most recent traffic 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficIncidentTileAsync(TileFormat format, TrafficIncidentTileStyle style, int zoom, + TileIndex tileIndex, String trafficState, Context context) { + return getTrafficIncidentTileWithResponseAsync(format, style, zoom, tileIndex, trafficState, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic incidents. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Tile` API is an HTTP `GET` request that returns 256 x 256 pixel tiles showing traffic + * incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be + * layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on + * the roads in the specified area. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style The style to be used to render the tile. This parameter is not valid when format is pbf. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param trafficState Reference value for the state of traffic at a particular time, obtained from the Viewport API + * call, trafficModelId attribute in trafficState field. It is updated every minute, and is valid for two minutes + * before it times out. Use -1 to get the most recent traffic information. Default: most recent traffic 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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficIncidentTileNoCustomHeadersWithResponseAsync(TileFormat format, + TrafficIncidentTileStyle style, int zoom, TileIndex tileIndex, String trafficState) { + return FluxUtil.withContext(context -> getTrafficIncidentTileNoCustomHeadersWithResponseAsync(format, style, + zoom, tileIndex, trafficState, context)); + } + + /** + * Use to get 256 x 256 pixel tiles showing traffic incidents. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Tile` API is an HTTP `GET` request that returns 256 x 256 pixel tiles showing traffic + * incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be + * layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on + * the roads in the specified area. + * + * @param format Desired format of the response. Possible values are png & pbf. + * @param style The style to be used to render the tile. This parameter is not valid when format is pbf. + * @param zoom Zoom level for the desired tile. For _raster_ tiles, value must be in the range: 0-22 (inclusive). + * For _vector_ tiles, value must be in the range: 0-22 (inclusive). + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * @param tileIndex Parameter group. + * @param trafficState Reference value for the state of traffic at a particular time, obtained from the Viewport API + * call, trafficModelId attribute in trafficState field. It is updated every minute, and is valid for two minutes + * before it times out. Use -1 to get the most recent traffic information. Default: most recent traffic 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficIncidentTileNoCustomHeadersWithResponseAsync(TileFormat format, + TrafficIncidentTileStyle style, int zoom, TileIndex tileIndex, String trafficState, Context context) { + final String accept = "application/json, image/jpeg, image/png, image/pbf, application/vnd.mapbox-vector-tile"; + int x = tileIndex.getX(); + int y = tileIndex.getY(); + return service.getTrafficIncidentTileNoCustomHeaders(this.client.getHost(), this.client.getClientId(), + this.client.getApiVersion(), format, style, zoom, x, y, trafficState, accept, context); + } + + /** + * Use to get information on traffic incidents inside a given bounding box. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Detail` API is an HTTP `GET` request that provides information on traffic incidents inside + * a given bounding box, based on the current [Traffic Model ID](#uri-parameters). The Traffic Model ID is available + * to grant synchronization of data between calls and API's. The Traffic Model ID is a key value for determining the + * currency of traffic incidents. It is updated every minute, and is valid for two minutes before it times out. It + * is used in rendering [incident tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). + * It can be obtained from the + * [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param style The style that will be used to render the tile in Traffic [Incident + * Tile](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile) API. This will have an effect on + * the coordinates of traffic incidents in the reply. + * @param boundingbox The `boundingbox` is represented by two value pairs describing it's corners (first pair for + * lower left corner and second for upper right). The pairs can either be specified using any of the `projection`'s + * specified below (e.g., _minY,minX,maxY,maxX_) or by two latitude-longitude pairs (e.g., + * _minLat,minLon,maxLat,maxLon_).<br><br>NOTE: If latitude/longitude pairs are used, then the + * `projection` parameter must be set to "EPSG4326". + * @param boundingZoom Zoom level for desired tile. 0 to 22 for raster tiles, 0 through 22 for vector tiles. + * @param trafficmodelid Number referencing traffic model. This can be obtained from the + * [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API. It is updated every + * minute, and is valid for two minutes before it times out. If the wrong Traffic Model ID is specified, the correct + * one will be returned by the interface. A value of -1 will always invoke the most recent traffic model. + * @param language [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the output language. + * Supported languages are ar, ca, cs, da, de, el, en, en-GB, en-US, es, et, fi, fr, he, hu, id, in*, it, lt, lv, + * nb, nl, no, pl, pt, ro, ru, sk, sv, th, tr, zh. + * + * Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for + * details. When invalid language code is provided response is returned in English. When incident cause or + * description does not have translation, English description is returned. + * @param projection The projection used to specify the coordinates in the request and response. + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) (default) or + * [EPSG4326](http://spatialreference.org/ref/epsg/4326/). + * @param geometries The type of vector geometry added to incidents (returned in the <v> element of the + * response). + * @param expandCluster Boolean to indicate whether to list all traffic incidents in a cluster separately. + * @param originalPosition Boolean on whether to return the original position of the incident (<op>) as well + * as the one shifted to the beginning of the traffic tube (<op>). + * @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 this object is returned from a successful Traffic incident Detail call along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficIncidentDetailWithResponseAsync(ResponseFormat format, + IncidentDetailStyle style, List boundingbox, int boundingZoom, String trafficmodelid, String language, + ProjectionStandard projection, IncidentGeometryType geometries, Boolean expandCluster, + Boolean originalPosition) { + return FluxUtil.withContext(context -> getTrafficIncidentDetailWithResponseAsync(format, style, boundingbox, + boundingZoom, trafficmodelid, language, projection, geometries, expandCluster, originalPosition, context)); + } + + /** + * Use to get information on traffic incidents inside a given bounding box. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Detail` API is an HTTP `GET` request that provides information on traffic incidents inside + * a given bounding box, based on the current [Traffic Model ID](#uri-parameters). The Traffic Model ID is available + * to grant synchronization of data between calls and API's. The Traffic Model ID is a key value for determining the + * currency of traffic incidents. It is updated every minute, and is valid for two minutes before it times out. It + * is used in rendering [incident tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). + * It can be obtained from the + * [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param style The style that will be used to render the tile in Traffic [Incident + * Tile](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile) API. This will have an effect on + * the coordinates of traffic incidents in the reply. + * @param boundingbox The `boundingbox` is represented by two value pairs describing it's corners (first pair for + * lower left corner and second for upper right). The pairs can either be specified using any of the `projection`'s + * specified below (e.g., _minY,minX,maxY,maxX_) or by two latitude-longitude pairs (e.g., + * _minLat,minLon,maxLat,maxLon_).<br><br>NOTE: If latitude/longitude pairs are used, then the + * `projection` parameter must be set to "EPSG4326". + * @param boundingZoom Zoom level for desired tile. 0 to 22 for raster tiles, 0 through 22 for vector tiles. + * @param trafficmodelid Number referencing traffic model. This can be obtained from the + * [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API. It is updated every + * minute, and is valid for two minutes before it times out. If the wrong Traffic Model ID is specified, the correct + * one will be returned by the interface. A value of -1 will always invoke the most recent traffic model. + * @param language [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the output language. + * Supported languages are ar, ca, cs, da, de, el, en, en-GB, en-US, es, et, fi, fr, he, hu, id, in*, it, lt, lv, + * nb, nl, no, pl, pt, ro, ru, sk, sv, th, tr, zh. + * + * Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for + * details. When invalid language code is provided response is returned in English. When incident cause or + * description does not have translation, English description is returned. + * @param projection The projection used to specify the coordinates in the request and response. + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) (default) or + * [EPSG4326](http://spatialreference.org/ref/epsg/4326/). + * @param geometries The type of vector geometry added to incidents (returned in the <v> element of the + * response). + * @param expandCluster Boolean to indicate whether to list all traffic incidents in a cluster separately. + * @param originalPosition Boolean on whether to return the original position of the incident (<op>) as well + * as the one shifted to the beginning of the traffic tube (<op>). + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return this object is returned from a successful Traffic incident Detail call along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficIncidentDetailWithResponseAsync(ResponseFormat format, + IncidentDetailStyle style, List boundingbox, int boundingZoom, String trafficmodelid, String language, + ProjectionStandard projection, IncidentGeometryType geometries, Boolean expandCluster, Boolean originalPosition, + Context context) { + final String accept = "application/json"; + String boundingboxConverted + = JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(boundingbox, CollectionFormat.CSV); + return service.getTrafficIncidentDetail(this.client.getHost(), this.client.getClientId(), + this.client.getApiVersion(), format, style, boundingboxConverted, boundingZoom, trafficmodelid, language, + projection, geometries, expandCluster, originalPosition, accept, context); + } + + /** + * Use to get information on traffic incidents inside a given bounding box. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Detail` API is an HTTP `GET` request that provides information on traffic incidents inside + * a given bounding box, based on the current [Traffic Model ID](#uri-parameters). The Traffic Model ID is available + * to grant synchronization of data between calls and API's. The Traffic Model ID is a key value for determining the + * currency of traffic incidents. It is updated every minute, and is valid for two minutes before it times out. It + * is used in rendering [incident tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). + * It can be obtained from the + * [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param style The style that will be used to render the tile in Traffic [Incident + * Tile](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile) API. This will have an effect on + * the coordinates of traffic incidents in the reply. + * @param boundingbox The `boundingbox` is represented by two value pairs describing it's corners (first pair for + * lower left corner and second for upper right). The pairs can either be specified using any of the `projection`'s + * specified below (e.g., _minY,minX,maxY,maxX_) or by two latitude-longitude pairs (e.g., + * _minLat,minLon,maxLat,maxLon_).<br><br>NOTE: If latitude/longitude pairs are used, then the + * `projection` parameter must be set to "EPSG4326". + * @param boundingZoom Zoom level for desired tile. 0 to 22 for raster tiles, 0 through 22 for vector tiles. + * @param trafficmodelid Number referencing traffic model. This can be obtained from the + * [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API. It is updated every + * minute, and is valid for two minutes before it times out. If the wrong Traffic Model ID is specified, the correct + * one will be returned by the interface. A value of -1 will always invoke the most recent traffic model. + * @param language [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the output language. + * Supported languages are ar, ca, cs, da, de, el, en, en-GB, en-US, es, et, fi, fr, he, hu, id, in*, it, lt, lv, + * nb, nl, no, pl, pt, ro, ru, sk, sv, th, tr, zh. + * + * Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for + * details. When invalid language code is provided response is returned in English. When incident cause or + * description does not have translation, English description is returned. + * @param projection The projection used to specify the coordinates in the request and response. + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) (default) or + * [EPSG4326](http://spatialreference.org/ref/epsg/4326/). + * @param geometries The type of vector geometry added to incidents (returned in the <v> element of the + * response). + * @param expandCluster Boolean to indicate whether to list all traffic incidents in a cluster separately. + * @param originalPosition Boolean on whether to return the original position of the incident (<op>) as well + * as the one shifted to the beginning of the traffic tube (<op>). + * @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 this object is returned from a successful Traffic incident Detail call on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficIncidentDetailAsync(ResponseFormat format, IncidentDetailStyle style, + List boundingbox, int boundingZoom, String trafficmodelid, String language, + ProjectionStandard projection, IncidentGeometryType geometries, Boolean expandCluster, + Boolean originalPosition) { + return getTrafficIncidentDetailWithResponseAsync(format, style, boundingbox, boundingZoom, trafficmodelid, + language, projection, geometries, expandCluster, originalPosition) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Use to get information on traffic incidents inside a given bounding box. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Detail` API is an HTTP `GET` request that provides information on traffic incidents inside + * a given bounding box, based on the current [Traffic Model ID](#uri-parameters). The Traffic Model ID is available + * to grant synchronization of data between calls and API's. The Traffic Model ID is a key value for determining the + * currency of traffic incidents. It is updated every minute, and is valid for two minutes before it times out. It + * is used in rendering [incident tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). + * It can be obtained from the + * [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param style The style that will be used to render the tile in Traffic [Incident + * Tile](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile) API. This will have an effect on + * the coordinates of traffic incidents in the reply. + * @param boundingbox The `boundingbox` is represented by two value pairs describing it's corners (first pair for + * lower left corner and second for upper right). The pairs can either be specified using any of the `projection`'s + * specified below (e.g., _minY,minX,maxY,maxX_) or by two latitude-longitude pairs (e.g., + * _minLat,minLon,maxLat,maxLon_).<br><br>NOTE: If latitude/longitude pairs are used, then the + * `projection` parameter must be set to "EPSG4326". + * @param boundingZoom Zoom level for desired tile. 0 to 22 for raster tiles, 0 through 22 for vector tiles. + * @param trafficmodelid Number referencing traffic model. This can be obtained from the + * [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API. It is updated every + * minute, and is valid for two minutes before it times out. If the wrong Traffic Model ID is specified, the correct + * one will be returned by the interface. A value of -1 will always invoke the most recent traffic model. + * @param language [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the output language. + * Supported languages are ar, ca, cs, da, de, el, en, en-GB, en-US, es, et, fi, fr, he, hu, id, in*, it, lt, lv, + * nb, nl, no, pl, pt, ro, ru, sk, sv, th, tr, zh. + * + * Please refer to [Supported Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) for + * details. When invalid language code is provided response is returned in English. When incident cause or + * description does not have translation, English description is returned. + * @param projection The projection used to specify the coordinates in the request and response. + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) (default) or + * [EPSG4326](http://spatialreference.org/ref/epsg/4326/). + * @param geometries The type of vector geometry added to incidents (returned in the <v> element of the + * response). + * @param expandCluster Boolean to indicate whether to list all traffic incidents in a cluster separately. + * @param originalPosition Boolean on whether to return the original position of the incident (<op>) as well + * as the one shifted to the beginning of the traffic tube (<op>). + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return this object is returned from a successful Traffic incident Detail call on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficIncidentDetailAsync(ResponseFormat format, IncidentDetailStyle style, + List boundingbox, int boundingZoom, String trafficmodelid, String language, + ProjectionStandard projection, IncidentGeometryType geometries, Boolean expandCluster, Boolean originalPosition, + Context context) { + return getTrafficIncidentDetailWithResponseAsync(format, style, boundingbox, boundingZoom, trafficmodelid, + language, projection, geometries, expandCluster, originalPosition, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Use to get legal and technical information for a viewport. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Viewport` API is an HTTP `GET` request that returns legal and technical information for the + * viewport described in the request. It should be called by client applications whenever the viewport changes (for + * instance, through zooming, panning, going to a location, or displaying a route). The request should contain the + * bounding box and zoom level of the viewport whose information is needed. The return will contain map version + * information, as well as the current Traffic Model ID and copyright IDs. The Traffic Model ID returned by the + * Viewport Description is used by other APIs to retrieve last traffic information for further processing. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param boundingbox Bounding box of the map viewport in + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) projection. The `boundingbox` is + * represented by two value pairs describing it's corners (first pair for lower left corner and second for upper + * right). When this endpoint is called directly, all values should be separated by commas (e.g., + * _minY,minX,maxY,maxX_). The maximum size of the bounding box that can be passed is dependent on the requested + * zoom level. The width and height cannot exceed 4092 pixels when rendered on the given zoom + * level.<br><br>NOTE: Bounding boxes that cross the 180° meridian require special treatment. For such + * boxes, the eastern _maxX_ value will be negative, and thus less than the _minX_ value west of the 180° meridian. + * To address that, the value 40075016.6855874 should be added to the true _maxX_ value before it is passed in the + * request. + * @param boundingzoom Zoom level of the map viewport. Used to determine whether the view can be zoomed in. + * @param overviewbox Bounding box of the overview map in + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) projection.<br><br>Used in + * case the overview box/mini map has different copyright data than the main map. If there is no mini map, the same + * coordinates as `boundingBox` is used. When this endpoint is called directly, coordinates are passed in as a + * single string containing four coordinates, separated by commas. + * @param overviewzoom Zoom level of the overview map. If there is no mini map, use the same zoom level as + * boundingZoom. + * @param copyright Determines what copyright information to return. When true the copyright text is returned; when + * false only the copyright index is returned. + * @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 this object is returned from a successful Traffic Incident Viewport call along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficIncidentViewportWithResponseAsync(ResponseFormat format, + List boundingbox, int boundingzoom, List overviewbox, int overviewzoom, Boolean copyright) { + return FluxUtil.withContext(context -> getTrafficIncidentViewportWithResponseAsync(format, boundingbox, + boundingzoom, overviewbox, overviewzoom, copyright, context)); + } + + /** + * Use to get legal and technical information for a viewport. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Viewport` API is an HTTP `GET` request that returns legal and technical information for the + * viewport described in the request. It should be called by client applications whenever the viewport changes (for + * instance, through zooming, panning, going to a location, or displaying a route). The request should contain the + * bounding box and zoom level of the viewport whose information is needed. The return will contain map version + * information, as well as the current Traffic Model ID and copyright IDs. The Traffic Model ID returned by the + * Viewport Description is used by other APIs to retrieve last traffic information for further processing. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param boundingbox Bounding box of the map viewport in + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) projection. The `boundingbox` is + * represented by two value pairs describing it's corners (first pair for lower left corner and second for upper + * right). When this endpoint is called directly, all values should be separated by commas (e.g., + * _minY,minX,maxY,maxX_). The maximum size of the bounding box that can be passed is dependent on the requested + * zoom level. The width and height cannot exceed 4092 pixels when rendered on the given zoom + * level.<br><br>NOTE: Bounding boxes that cross the 180° meridian require special treatment. For such + * boxes, the eastern _maxX_ value will be negative, and thus less than the _minX_ value west of the 180° meridian. + * To address that, the value 40075016.6855874 should be added to the true _maxX_ value before it is passed in the + * request. + * @param boundingzoom Zoom level of the map viewport. Used to determine whether the view can be zoomed in. + * @param overviewbox Bounding box of the overview map in + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) projection.<br><br>Used in + * case the overview box/mini map has different copyright data than the main map. If there is no mini map, the same + * coordinates as `boundingBox` is used. When this endpoint is called directly, coordinates are passed in as a + * single string containing four coordinates, separated by commas. + * @param overviewzoom Zoom level of the overview map. If there is no mini map, use the same zoom level as + * boundingZoom. + * @param copyright Determines what copyright information to return. When true the copyright text is returned; when + * false only the copyright index is returned. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return this object is returned from a successful Traffic Incident Viewport call along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTrafficIncidentViewportWithResponseAsync(ResponseFormat format, + List boundingbox, int boundingzoom, List overviewbox, int overviewzoom, Boolean copyright, + Context context) { + final String accept = "application/json"; + String boundingboxConverted + = JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(boundingbox, CollectionFormat.CSV); + String overviewboxConverted + = JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(overviewbox, CollectionFormat.CSV); + return service.getTrafficIncidentViewport(this.client.getHost(), this.client.getClientId(), + this.client.getApiVersion(), format, boundingboxConverted, boundingzoom, overviewboxConverted, overviewzoom, + copyright, accept, context); + } + + /** + * Use to get legal and technical information for a viewport. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Viewport` API is an HTTP `GET` request that returns legal and technical information for the + * viewport described in the request. It should be called by client applications whenever the viewport changes (for + * instance, through zooming, panning, going to a location, or displaying a route). The request should contain the + * bounding box and zoom level of the viewport whose information is needed. The return will contain map version + * information, as well as the current Traffic Model ID and copyright IDs. The Traffic Model ID returned by the + * Viewport Description is used by other APIs to retrieve last traffic information for further processing. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param boundingbox Bounding box of the map viewport in + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) projection. The `boundingbox` is + * represented by two value pairs describing it's corners (first pair for lower left corner and second for upper + * right). When this endpoint is called directly, all values should be separated by commas (e.g., + * _minY,minX,maxY,maxX_). The maximum size of the bounding box that can be passed is dependent on the requested + * zoom level. The width and height cannot exceed 4092 pixels when rendered on the given zoom + * level.<br><br>NOTE: Bounding boxes that cross the 180° meridian require special treatment. For such + * boxes, the eastern _maxX_ value will be negative, and thus less than the _minX_ value west of the 180° meridian. + * To address that, the value 40075016.6855874 should be added to the true _maxX_ value before it is passed in the + * request. + * @param boundingzoom Zoom level of the map viewport. Used to determine whether the view can be zoomed in. + * @param overviewbox Bounding box of the overview map in + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) projection.<br><br>Used in + * case the overview box/mini map has different copyright data than the main map. If there is no mini map, the same + * coordinates as `boundingBox` is used. When this endpoint is called directly, coordinates are passed in as a + * single string containing four coordinates, separated by commas. + * @param overviewzoom Zoom level of the overview map. If there is no mini map, use the same zoom level as + * boundingZoom. + * @param copyright Determines what copyright information to return. When true the copyright text is returned; when + * false only the copyright index is returned. + * @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 this object is returned from a successful Traffic Incident Viewport call on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficIncidentViewportAsync(ResponseFormat format, + List boundingbox, int boundingzoom, List overviewbox, int overviewzoom, Boolean copyright) { + return getTrafficIncidentViewportWithResponseAsync(format, boundingbox, boundingzoom, overviewbox, overviewzoom, + copyright).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Use to get legal and technical information for a viewport. + * + * + * + * > [!NOTE] + * > + * > **Azure Maps Traffic v1 service retirement** + * > + * > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be + * retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by + * 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 + * APIs](/azure/azure-maps/migrate-traffic-v1-api). + * + * The `Traffic Incident Viewport` API is an HTTP `GET` request that returns legal and technical information for the + * viewport described in the request. It should be called by client applications whenever the viewport changes (for + * instance, through zooming, panning, going to a location, or displaying a route). The request should contain the + * bounding box and zoom level of the viewport whose information is needed. The return will contain map version + * information, as well as the current Traffic Model ID and copyright IDs. The Traffic Model ID returned by the + * Viewport Description is used by other APIs to retrieve last traffic information for further processing. + * + * @param format Desired format of the response. Value can be either _json_ or _xml_. + * @param boundingbox Bounding box of the map viewport in + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) projection. The `boundingbox` is + * represented by two value pairs describing it's corners (first pair for lower left corner and second for upper + * right). When this endpoint is called directly, all values should be separated by commas (e.g., + * _minY,minX,maxY,maxX_). The maximum size of the bounding box that can be passed is dependent on the requested + * zoom level. The width and height cannot exceed 4092 pixels when rendered on the given zoom + * level.<br><br>NOTE: Bounding boxes that cross the 180° meridian require special treatment. For such + * boxes, the eastern _maxX_ value will be negative, and thus less than the _minX_ value west of the 180° meridian. + * To address that, the value 40075016.6855874 should be added to the true _maxX_ value before it is passed in the + * request. + * @param boundingzoom Zoom level of the map viewport. Used to determine whether the view can be zoomed in. + * @param overviewbox Bounding box of the overview map in + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html) projection.<br><br>Used in + * case the overview box/mini map has different copyright data than the main map. If there is no mini map, the same + * coordinates as `boundingBox` is used. When this endpoint is called directly, coordinates are passed in as a + * single string containing four coordinates, separated by commas. + * @param overviewzoom Zoom level of the overview map. If there is no mini map, use the same zoom level as + * boundingZoom. + * @param copyright Determines what copyright information to return. When true the copyright text is returned; when + * false only the copyright index is returned. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return this object is returned from a successful Traffic Incident Viewport call on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrafficIncidentViewportAsync(ResponseFormat format, + List boundingbox, int boundingzoom, List overviewbox, int overviewzoom, Boolean copyright, + Context context) { + return getTrafficIncidentViewportWithResponseAsync(format, boundingbox, boundingzoom, overviewbox, overviewzoom, + copyright, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/helpers/Utility.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/helpers/Utility.java new file mode 100644 index 000000000000..26fa1e1cc339 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/helpers/Utility.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.implementation.helpers; + +import com.azure.core.models.GeoBoundingBox; +import com.azure.core.models.GeoPosition; + +import java.util.Arrays; +import java.util.List; + +public class Utility { + public static List toBoundingBox(GeoBoundingBox boundingBox) { + return Arrays.asList(boundingBox.getSouth(), boundingBox.getWest(), boundingBox.getNorth(), + boundingBox.getEast()); + } + + public static List toCoordinates(GeoPosition geoPosition) { + return Arrays.asList(geoPosition.getLatitude(), geoPosition.getLongitude()); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/helpers/package-info.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/helpers/package-info.java new file mode 100644 index 000000000000..12e5a8fb5555 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/helpers/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing helper classes for the Azure Maps Traffic SDK. + */ +package com.azure.maps.traffic.implementation.helpers; diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorAdditionalInfo.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorAdditionalInfo.java new file mode 100644 index 000000000000..a8def1a5b705 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorAdditionalInfo.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The resource management error additional info. + */ +@Immutable +public final class ErrorAdditionalInfo implements JsonSerializable { + /* + * The additional info type. + */ + @Generated + private String type; + + /* + * The additional info. + */ + @Generated + private Object info; + + /** + * Creates an instance of ErrorAdditionalInfo class. + */ + @Generated + public ErrorAdditionalInfo() { + } + + /** + * Get the type property: The additional info type. + * + * @return the type value. + */ + @Generated + public String getType() { + return this.type; + } + + /** + * Get the info property: The additional info. + * + * @return the info value. + */ + @Generated + public Object getInfo() { + return this.info; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorAdditionalInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorAdditionalInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ErrorAdditionalInfo. + */ + @Generated + public static ErrorAdditionalInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ErrorAdditionalInfo deserializedErrorAdditionalInfo = new ErrorAdditionalInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedErrorAdditionalInfo.type = reader.getString(); + } else if ("info".equals(fieldName)) { + deserializedErrorAdditionalInfo.info = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedErrorAdditionalInfo; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorDetail.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorDetail.java new file mode 100644 index 000000000000..77bc62506f52 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorDetail.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The error detail. + */ +@Immutable +public final class ErrorDetail implements JsonSerializable { + /* + * The error code. + */ + @Generated + private String code; + + /* + * The error message. + */ + @Generated + private String message; + + /* + * The error target. + */ + @Generated + private String target; + + /* + * The error details. + */ + @Generated + private List details; + + /* + * The error additional info. + */ + @Generated + private List additionalInfo; + + /** + * Creates an instance of ErrorDetail class. + */ + @Generated + public ErrorDetail() { + } + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + @Generated + public String getMessage() { + return this.message; + } + + /** + * Get the target property: The error target. + * + * @return the target value. + */ + @Generated + public String getTarget() { + return this.target; + } + + /** + * Get the details property: The error details. + * + * @return the details value. + */ + @Generated + public List getDetails() { + return this.details; + } + + /** + * Get the additionalInfo property: The error additional info. + * + * @return the additionalInfo value. + */ + @Generated + public List getAdditionalInfo() { + return this.additionalInfo; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorDetail from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorDetail if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ErrorDetail. + */ + @Generated + public static ErrorDetail fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ErrorDetail deserializedErrorDetail = new ErrorDetail(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedErrorDetail.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedErrorDetail.message = reader.getString(); + } else if ("target".equals(fieldName)) { + deserializedErrorDetail.target = reader.getString(); + } else if ("details".equals(fieldName)) { + List details = reader.readArray(reader1 -> ErrorDetail.fromJson(reader1)); + deserializedErrorDetail.details = details; + } else if ("additionalInfo".equals(fieldName)) { + List additionalInfo + = reader.readArray(reader1 -> ErrorAdditionalInfo.fromJson(reader1)); + deserializedErrorDetail.additionalInfo = additionalInfo; + } else { + reader.skipChildren(); + } + } + + return deserializedErrorDetail; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorResponse.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorResponse.java new file mode 100644 index 000000000000..161b67c426cd --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorResponse.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Error response + * + * Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also + * follows the OData error response format.). + */ +@Fluent +public final class ErrorResponse implements JsonSerializable { + /* + * The error object. + */ + @Generated + private ErrorDetail error; + + /** + * Creates an instance of ErrorResponse class. + */ + @Generated + public ErrorResponse() { + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + @Generated + public ErrorDetail getError() { + return this.error; + } + + /** + * Set the error property: The error object. + * + * @param error the error value to set. + * @return the ErrorResponse object itself. + */ + @Generated + public ErrorResponse setError(ErrorDetail error) { + this.error = error; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorResponse if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ErrorResponse. + */ + @Generated + public static ErrorResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ErrorResponse deserializedErrorResponse = new ErrorResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + deserializedErrorResponse.error = ErrorDetail.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedErrorResponse; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorResponseException.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorResponseException.java new file mode 100644 index 000000000000..5856d658b769 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ErrorResponseException.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public final class ErrorResponseException extends HttpResponseException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public ErrorResponseException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public ErrorResponseException(String message, HttpResponse response, ErrorResponse value) { + super(message, response, value); + } + + /** + * {@inheritDoc} + */ + @Override + public ErrorResponse getValue() { + return (ErrorResponse) super.getValue(); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/LatLongPair.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/LatLongPair.java new file mode 100644 index 000000000000..e06a4b26fb7a --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/LatLongPair.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A location represented as a latitude and longitude. + */ +@Fluent +public final class LatLongPair implements JsonSerializable { + /* + * Latitude property + */ + @Generated + private Double latitude; + + /* + * Longitude property + */ + @Generated + private Double longitude; + + /** + * Creates an instance of LatLongPair class. + */ + @Generated + public LatLongPair() { + } + + /** + * Get the latitude property: Latitude property. + * + * @return the latitude value. + */ + @Generated + public Double getLatitude() { + return this.latitude; + } + + /** + * Set the latitude property: Latitude property. + * + * @param latitude the latitude value to set. + * @return the LatLongPair object itself. + */ + @Generated + public LatLongPair setLatitude(Double latitude) { + this.latitude = latitude; + return this; + } + + /** + * Get the longitude property: Longitude property. + * + * @return the longitude value. + */ + @Generated + public Double getLongitude() { + return this.longitude; + } + + /** + * Set the longitude property: Longitude property. + * + * @param longitude the longitude value to set. + * @return the LatLongPair object itself. + */ + @Generated + public LatLongPair setLongitude(Double longitude) { + this.longitude = longitude; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("latitude", this.latitude); + jsonWriter.writeNumberField("longitude", this.longitude); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LatLongPair from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LatLongPair if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LatLongPair. + */ + @Generated + public static LatLongPair fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LatLongPair deserializedLatLongPair = new LatLongPair(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("latitude".equals(fieldName)) { + deserializedLatLongPair.latitude = reader.getNullable(JsonReader::getDouble); + } else if ("longitude".equals(fieldName)) { + deserializedLatLongPair.longitude = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedLatLongPair; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ResponseFormat.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ResponseFormat.java new file mode 100644 index 000000000000..ce2a0bffb8fe --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/ResponseFormat.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ResponseFormat. + */ +public final class ResponseFormat extends ExpandableStringEnum { + /** + * [The JavaScript Object Notation Data Interchange Format](https://tools.ietf.org/html/rfc8259). + */ + @Generated + public static final ResponseFormat JSON = fromString("json"); + + /** + * [The Extensible Markup Language](https://www.w3.org/TR/xml/). + */ + @Generated + public static final ResponseFormat XML = fromString("xml"); + + /** + * Creates a new instance of ResponseFormat value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ResponseFormat() { + } + + /** + * Creates or finds a ResponseFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResponseFormat. + */ + @Generated + public static ResponseFormat fromString(String name) { + return fromString(name, ResponseFormat.class); + } + + /** + * Gets known ResponseFormat values. + * + * @return known ResponseFormat values. + */ + @Generated + public static Collection values() { + return values(ResponseFormat.class); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficFlowSegmentDataFlowSegmentData.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficFlowSegmentDataFlowSegmentData.java new file mode 100644 index 000000000000..d072dc0790e9 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficFlowSegmentDataFlowSegmentData.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.maps.traffic.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.maps.traffic.models.TrafficFlowSegmentDataPropertiesCoordinates; +import java.io.IOException; + +/** + * Flow Segment Data property. + */ +@Fluent +public final class TrafficFlowSegmentDataFlowSegmentData + implements JsonSerializable { + /* + * Functional Road Class. This indicates the road type: + * 0: Motorway, freeway or other major road. + * 1: Major road, less important than a motorway. + * 2: Other major road. + * 3: Secondary road. + * 4: Local connecting road. + * 5: Local road of high importance. + * 6: Local road. + */ + @Generated + private String functionalRoadClass; + + /* + * The current average speed at the selected point, in the units requested. This is calculated from the + * currentTravelTime and the length of the selected segment. + */ + @Generated + private Integer currentSpeed; + + /* + * The free flow speed expected under ideal conditions, expressed in the units requested. This is related to the + * freeFlowTravelTime. + */ + @Generated + private Integer freeFlowSpeed; + + /* + * Current travel time in seconds, across this traffic segment, based on fused real-time measurements between the + * defined locations in the specified direction. + */ + @Generated + private Integer currentTravelTime; + + /* + * The travel time in seconds, across this traffic segment, which would be expected under ideal free flow + * conditions. + */ + @Generated + private Integer freeFlowTravelTime; + + /* + * The confidence is a measure of the quality of the provided travel time and speed. A value of 1 means full + * confidence, that the response contains the highest quality data. Lower values indicate the degree that the + * response may vary from the actual conditions on the road. Any value greater than 0.6 means the information was + * based on real-time probe input. A value of 0.5 means the reported speed is based on historical info. A value + * between 0.5 and 0.6 has a calculated weighted average between historical and live speeds. + */ + @Generated + private Float confidence; + + /* + * This indicates the software version that generated the response. + */ + @Generated + private String version; + + /* + * OpenLR code for segment. See [OpenLR](https://en.wikipedia.org/wiki/OpenLR) for more information on the use of + * Open LR codes. + */ + @Generated + private String openLrCode; + + /* + * Includes the coordinates describing the shape of the segment. Coordinates are shifted from the road depending on + * the zoom level to support high quality visualization in every scale. + */ + @Generated + private TrafficFlowSegmentDataPropertiesCoordinates coordinates; + + /** + * Creates an instance of TrafficFlowSegmentDataFlowSegmentData class. + */ + @Generated + public TrafficFlowSegmentDataFlowSegmentData() { + } + + /** + * Get the functionalRoadClass property: Functional Road Class. This indicates the road type: + * 0: Motorway, freeway or other major road. + * 1: Major road, less important than a motorway. + * 2: Other major road. + * 3: Secondary road. + * 4: Local connecting road. + * 5: Local road of high importance. + * 6: Local road. + * + * @return the functionalRoadClass value. + */ + @Generated + public String getFunctionalRoadClass() { + return this.functionalRoadClass; + } + + /** + * Get the currentSpeed property: The current average speed at the selected point, in the units requested. This is + * calculated from the currentTravelTime and the length of the selected segment. + * + * @return the currentSpeed value. + */ + @Generated + public Integer getCurrentSpeed() { + return this.currentSpeed; + } + + /** + * Get the freeFlowSpeed property: The free flow speed expected under ideal conditions, expressed in the units + * requested. This is related to the freeFlowTravelTime. + * + * @return the freeFlowSpeed value. + */ + @Generated + public Integer getFreeFlowSpeed() { + return this.freeFlowSpeed; + } + + /** + * Get the currentTravelTime property: Current travel time in seconds, across this traffic segment, based on fused + * real-time measurements between the defined locations in the specified direction. + * + * @return the currentTravelTime value. + */ + @Generated + public Integer getCurrentTravelTime() { + return this.currentTravelTime; + } + + /** + * Get the freeFlowTravelTime property: The travel time in seconds, across this traffic segment, which would be + * expected under ideal free flow conditions. + * + * @return the freeFlowTravelTime value. + */ + @Generated + public Integer getFreeFlowTravelTime() { + return this.freeFlowTravelTime; + } + + /** + * Get the confidence property: The confidence is a measure of the quality of the provided travel time and speed. A + * value of 1 means full confidence, that the response contains the highest quality data. Lower values indicate the + * degree that the response may vary from the actual conditions on the road. Any value greater than 0.6 means the + * information was based on real-time probe input. A value of 0.5 means the reported speed is based on historical + * info. A value between 0.5 and 0.6 has a calculated weighted average between historical and live speeds. + * + * @return the confidence value. + */ + @Generated + public Float getConfidence() { + return this.confidence; + } + + /** + * Get the version property: This indicates the software version that generated the response. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the openLrCode property: OpenLR code for segment. See [OpenLR](https://en.wikipedia.org/wiki/OpenLR) for more + * information on the use of Open LR codes. + * + * @return the openLrCode value. + */ + @Generated + public String getOpenLrCode() { + return this.openLrCode; + } + + /** + * Get the coordinates property: Includes the coordinates describing the shape of the segment. Coordinates are + * shifted from the road depending on the zoom level to support high quality visualization in every scale. + * + * @return the coordinates value. + */ + @Generated + public TrafficFlowSegmentDataPropertiesCoordinates getCoordinates() { + return this.coordinates; + } + + /** + * Set the coordinates property: Includes the coordinates describing the shape of the segment. Coordinates are + * shifted from the road depending on the zoom level to support high quality visualization in every scale. + * + * @param coordinates the coordinates value to set. + * @return the TrafficFlowSegmentDataFlowSegmentData object itself. + */ + @Generated + public TrafficFlowSegmentDataFlowSegmentData + setCoordinates(TrafficFlowSegmentDataPropertiesCoordinates coordinates) { + this.coordinates = coordinates; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("coordinates", this.coordinates); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficFlowSegmentDataFlowSegmentData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficFlowSegmentDataFlowSegmentData if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficFlowSegmentDataFlowSegmentData. + */ + @Generated + public static TrafficFlowSegmentDataFlowSegmentData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficFlowSegmentDataFlowSegmentData deserializedTrafficFlowSegmentDataFlowSegmentData + = new TrafficFlowSegmentDataFlowSegmentData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("frc".equals(fieldName)) { + deserializedTrafficFlowSegmentDataFlowSegmentData.functionalRoadClass = reader.getString(); + } else if ("currentSpeed".equals(fieldName)) { + deserializedTrafficFlowSegmentDataFlowSegmentData.currentSpeed + = reader.getNullable(JsonReader::getInt); + } else if ("freeFlowSpeed".equals(fieldName)) { + deserializedTrafficFlowSegmentDataFlowSegmentData.freeFlowSpeed + = reader.getNullable(JsonReader::getInt); + } else if ("currentTravelTime".equals(fieldName)) { + deserializedTrafficFlowSegmentDataFlowSegmentData.currentTravelTime + = reader.getNullable(JsonReader::getInt); + } else if ("freeFlowTravelTime".equals(fieldName)) { + deserializedTrafficFlowSegmentDataFlowSegmentData.freeFlowTravelTime + = reader.getNullable(JsonReader::getInt); + } else if ("confidence".equals(fieldName)) { + deserializedTrafficFlowSegmentDataFlowSegmentData.confidence + = reader.getNullable(JsonReader::getFloat); + } else if ("@version".equals(fieldName)) { + deserializedTrafficFlowSegmentDataFlowSegmentData.version = reader.getString(); + } else if ("openlr".equals(fieldName)) { + deserializedTrafficFlowSegmentDataFlowSegmentData.openLrCode = reader.getString(); + } else if ("coordinates".equals(fieldName)) { + deserializedTrafficFlowSegmentDataFlowSegmentData.coordinates + = TrafficFlowSegmentDataPropertiesCoordinates.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTrafficFlowSegmentDataFlowSegmentData; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficIncidentDetailTm.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficIncidentDetailTm.java new file mode 100644 index 000000000000..c7fafa9e6744 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficIncidentDetailTm.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.maps.traffic.models.TrafficIncidentPointOfInterest; +import java.io.IOException; +import java.util.List; + +/** + * Main response element. + */ +@Immutable +public final class TrafficIncidentDetailTm implements JsonSerializable { + /* + * ID of the traffic model for this incident + */ + @Generated + private String id; + + /* + * A single traffic incident, or a cluster of traffic incidents + */ + @Generated + private List pointsOfInterest; + + /** + * Creates an instance of TrafficIncidentDetailTm class. + */ + @Generated + public TrafficIncidentDetailTm() { + } + + /** + * Get the id property: ID of the traffic model for this incident. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the pointsOfInterest property: A single traffic incident, or a cluster of traffic incidents. + * + * @return the pointsOfInterest value. + */ + @Generated + public List getPointsOfInterest() { + return this.pointsOfInterest; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficIncidentDetailTm from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficIncidentDetailTm if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficIncidentDetailTm. + */ + @Generated + public static TrafficIncidentDetailTm fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficIncidentDetailTm deserializedTrafficIncidentDetailTm = new TrafficIncidentDetailTm(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("@id".equals(fieldName)) { + deserializedTrafficIncidentDetailTm.id = reader.getString(); + } else if ("poi".equals(fieldName)) { + List pointsOfInterest + = reader.readArray(reader1 -> TrafficIncidentPointOfInterest.fromJson(reader1)); + deserializedTrafficIncidentDetailTm.pointsOfInterest = pointsOfInterest; + } else { + reader.skipChildren(); + } + } + + return deserializedTrafficIncidentDetailTm; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficsGetTrafficFlowTileHeaders.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficsGetTrafficFlowTileHeaders.java new file mode 100644 index 000000000000..2a3b8028a038 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficsGetTrafficFlowTileHeaders.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The TrafficsGetTrafficFlowTileHeaders model. + */ +@Fluent +public final class TrafficsGetTrafficFlowTileHeaders { + /* + * The Content-Type property. + */ + @Generated + private String contentType; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of TrafficsGetTrafficFlowTileHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public TrafficsGetTrafficFlowTileHeaders(HttpHeaders rawHeaders) { + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + @Generated + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The Content-Type property. + * + * @param contentType the contentType value to set. + * @return the TrafficsGetTrafficFlowTileHeaders object itself. + */ + @Generated + public TrafficsGetTrafficFlowTileHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficsGetTrafficIncidentTileHeaders.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficsGetTrafficIncidentTileHeaders.java new file mode 100644 index 000000000000..d7dc24e8ab53 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/TrafficsGetTrafficIncidentTileHeaders.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The TrafficsGetTrafficIncidentTileHeaders model. + */ +@Fluent +public final class TrafficsGetTrafficIncidentTileHeaders { + /* + * The Content-Type property. + */ + @Generated + private String contentType; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of TrafficsGetTrafficIncidentTileHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public TrafficsGetTrafficIncidentTileHeaders(HttpHeaders rawHeaders) { + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + @Generated + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The Content-Type property. + * + * @param contentType the contentType value to set. + * @return the TrafficsGetTrafficIncidentTileHeaders object itself. + */ + @Generated + public TrafficsGetTrafficIncidentTileHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/package-info.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/package-info.java new file mode 100644 index 000000000000..877b8c8b7835 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for TrafficClient. + * Azure Maps Traffic REST APIs. + */ +package com.azure.maps.traffic.implementation.models; diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/package-info.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/package-info.java new file mode 100644 index 000000000000..90a6e5df024c --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for TrafficClient. + * Azure Maps Traffic REST APIs. + */ +package com.azure.maps.traffic.implementation; diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/DelayMagnitude.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/DelayMagnitude.java new file mode 100644 index 000000000000..66e950097cf6 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/DelayMagnitude.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableEnum; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; + +/** + * The magnitude of delay associated with incident. These values correspond to incident colors in the traffic tiles. + */ +public final class DelayMagnitude implements ExpandableEnum, JsonSerializable { + private static final Map VALUES = new ConcurrentHashMap<>(); + + private static final Function NEW_INSTANCE = DelayMagnitude::new; + + /** + * Unknown. + */ + @Generated + public static final DelayMagnitude UNKNOWN = fromValue(0); + + /** + * Minor. + */ + @Generated + public static final DelayMagnitude MINOR = fromValue(1); + + /** + * Moderate. + */ + @Generated + public static final DelayMagnitude MODERATE = fromValue(2); + + /** + * Major. + */ + @Generated + public static final DelayMagnitude MAJOR = fromValue(3); + + /** + * Indefinite (used for road closures and other indefinite delays). + */ + @Generated + public static final DelayMagnitude INDEFINITE = fromValue(4); + + private final Integer value; + + private DelayMagnitude(Integer value) { + this.value = value; + } + + /** + * Creates or finds a DelayMagnitude. + * + * @param value a value to look for. + * @return the corresponding DelayMagnitude. + * @throws IllegalArgumentException if value is null. + */ + @Generated + public static DelayMagnitude fromValue(Integer value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); + } + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known DelayMagnitude values. + * + * @return Known DelayMagnitude values. + */ + @Generated + public static Collection values() { + return new ArrayList<>(VALUES.values()); + } + + /** + * Gets the value of the DelayMagnitude instance. + * + * @return the value of the DelayMagnitude instance. + */ + @Generated + @Override + public Integer getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeInt(getValue()); + } + + /** + * Reads an instance of DelayMagnitude from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DelayMagnitude if the JsonReader was pointing to an instance of it, or null if the + * JsonReader was pointing to JSON null. + * @throws IOException If an error occurs while reading the DelayMagnitude. + * @throws IllegalStateException If unexpected JSON token is found. + */ + @Generated + public static DelayMagnitude fromJson(JsonReader jsonReader) throws IOException { + JsonToken nextToken = jsonReader.nextToken(); + if (nextToken == JsonToken.NULL) { + return null; + } + if (nextToken != JsonToken.NUMBER) { + throw new IllegalStateException( + String.format("Unexpected JSON token for %s deserialization: %s", JsonToken.NUMBER, nextToken)); + } + return DelayMagnitude.fromValue(jsonReader.getInt()); + } + + @Generated + @Override + public String toString() { + return Objects.toString(this.value); + } + + @Generated + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Generated + @Override + public int hashCode() { + return Objects.hashCode(this.value); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IconCategory.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IconCategory.java new file mode 100644 index 000000000000..0d64e9e731a4 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IconCategory.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableEnum; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; + +/** + * The icon category associated with this incident. Values are numbers in the range 0-13, with the following meanings -- + * 0: Unknown, 1: Accident, 2: Fog, 3: Dangerous Conditions, 4: Rain, 5: Ice, 6: Jam, 7: Lane Closed, 8: Road Closed, 9: + * Road Works, 10: Wind, 11: Flooding, 12: Detour, 13: Cluster. + */ +public final class IconCategory implements ExpandableEnum, JsonSerializable { + private static final Map VALUES = new ConcurrentHashMap<>(); + + private static final Function NEW_INSTANCE = IconCategory::new; + + /** + * Unknown. + */ + @Generated + public static final IconCategory UNKNOWN = fromValue(0); + + /** + * Accident. + */ + @Generated + public static final IconCategory ACCIDENT = fromValue(1); + + /** + * Fog. + */ + @Generated + public static final IconCategory FOG = fromValue(2); + + /** + * Dangerous Conditions. + */ + @Generated + public static final IconCategory DANGEROUS_CONDITIONS = fromValue(3); + + /** + * Rain. + */ + @Generated + public static final IconCategory RAIN = fromValue(4); + + /** + * Ice. + */ + @Generated + public static final IconCategory ICE = fromValue(5); + + /** + * Jam. + */ + @Generated + public static final IconCategory JAM = fromValue(6); + + /** + * Lane Closed. + */ + @Generated + public static final IconCategory LANE_CLOSED = fromValue(7); + + /** + * Road Closed. + */ + @Generated + public static final IconCategory ROAD_CLOSED = fromValue(8); + + /** + * Road Works. + */ + @Generated + public static final IconCategory ROAD_WORKS = fromValue(9); + + /** + * Wind. + */ + @Generated + public static final IconCategory WIND = fromValue(10); + + /** + * Flooding. + */ + @Generated + public static final IconCategory FLOODING = fromValue(11); + + /** + * Detour. + */ + @Generated + public static final IconCategory DETOUR = fromValue(12); + + /** + * Cluster: Returned if a cluster contains incidents with different icon categories. + */ + @Generated + public static final IconCategory CLUSTER = fromValue(13); + + /** + * Broken Down Vehicle. + */ + @Generated + public static final IconCategory BROKEN_DOWN_VEHICLE = fromValue(14); + + private final Integer value; + + private IconCategory(Integer value) { + this.value = value; + } + + /** + * Creates or finds a IconCategory. + * + * @param value a value to look for. + * @return the corresponding IconCategory. + * @throws IllegalArgumentException if value is null. + */ + @Generated + public static IconCategory fromValue(Integer value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); + } + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known IconCategory values. + * + * @return Known IconCategory values. + */ + @Generated + public static Collection values() { + return new ArrayList<>(VALUES.values()); + } + + /** + * Gets the value of the IconCategory instance. + * + * @return the value of the IconCategory instance. + */ + @Generated + @Override + public Integer getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeInt(getValue()); + } + + /** + * Reads an instance of IconCategory from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IconCategory if the JsonReader was pointing to an instance of it, or null if the + * JsonReader was pointing to JSON null. + * @throws IOException If an error occurs while reading the IconCategory. + * @throws IllegalStateException If unexpected JSON token is found. + */ + @Generated + public static IconCategory fromJson(JsonReader jsonReader) throws IOException { + JsonToken nextToken = jsonReader.nextToken(); + if (nextToken == JsonToken.NULL) { + return null; + } + if (nextToken != JsonToken.NUMBER) { + throw new IllegalStateException( + String.format("Unexpected JSON token for %s deserialization: %s", JsonToken.NUMBER, nextToken)); + } + return IconCategory.fromValue(jsonReader.getInt()); + } + + @Generated + @Override + public String toString() { + return Objects.toString(this.value); + } + + @Generated + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Generated + @Override + public int hashCode() { + return Objects.hashCode(this.value); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IncidentDetailStyle.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IncidentDetailStyle.java new file mode 100644 index 000000000000..c88f401520c8 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IncidentDetailStyle.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for IncidentDetailStyle. + */ +public final class IncidentDetailStyle extends ExpandableStringEnum { + /** + * Creates traffic lines with colored chevrons indicating severity. + */ + @Generated + public static final IncidentDetailStyle S1 = fromString("s1"); + + /** + * Creates plain lines with certain degree of glow. + */ + @Generated + public static final IncidentDetailStyle S2 = fromString("s2"); + + /** + * Creates plain lines with certain degree of glow, different than the s2 style. + */ + @Generated + public static final IncidentDetailStyle S3 = fromString("s3"); + + /** + * Night style. + */ + @Generated + public static final IncidentDetailStyle NIGHT = fromString("night"); + + /** + * Creates a new instance of IncidentDetailStyle value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public IncidentDetailStyle() { + } + + /** + * Creates or finds a IncidentDetailStyle from its string representation. + * + * @param name a name to look for. + * @return the corresponding IncidentDetailStyle. + */ + @Generated + public static IncidentDetailStyle fromString(String name) { + return fromString(name, IncidentDetailStyle.class); + } + + /** + * Gets known IncidentDetailStyle values. + * + * @return known IncidentDetailStyle values. + */ + @Generated + public static Collection values() { + return values(IncidentDetailStyle.class); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IncidentGeometryType.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IncidentGeometryType.java new file mode 100644 index 000000000000..ca5f3183753b --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/IncidentGeometryType.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for IncidentGeometryType. + */ +public final class IncidentGeometryType extends ExpandableStringEnum { + /** + * Places incidents precisely on the road. + */ + @Generated + public static final IncidentGeometryType ORIGINAL = fromString("original"); + + /** + * Moves the incident slightly (depending on zoom level) to indicate specific road lanes. + */ + @Generated + public static final IncidentGeometryType SHIFTED = fromString("shifted"); + + /** + * Creates a new instance of IncidentGeometryType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public IncidentGeometryType() { + } + + /** + * Creates or finds a IncidentGeometryType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IncidentGeometryType. + */ + @Generated + public static IncidentGeometryType fromString(String name) { + return fromString(name, IncidentGeometryType.class); + } + + /** + * Gets known IncidentGeometryType values. + * + * @return known IncidentGeometryType values. + */ + @Generated + public static Collection values() { + return values(IncidentGeometryType.class); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/MapsPoint.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/MapsPoint.java new file mode 100644 index 000000000000..c5632a51c64b --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/MapsPoint.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Generic representation of a point with coordinates (x, y) in the Cartesian plane. + */ +@Immutable +public final class MapsPoint implements JsonSerializable { + + /* + * x coordinate + */ + @Generated + private Float x; + + /* + * y coordinate + */ + @Generated + private Float y; + + /** + * Set default constructor to private + */ + @Generated + private MapsPoint() { + } + + /** + * Get the x property: x coordinate. + * + * @return the x value. + */ + @Generated + public Float getX() { + return this.x; + } + + /** + * Get the y property: y coordinate. + * + * @return the y value. + */ + @Generated + public Float getY() { + return this.y; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MapsPoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MapsPoint if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the MapsPoint. + */ + @Generated + public static MapsPoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MapsPoint deserializedMapsPoint = new MapsPoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("x".equals(fieldName)) { + deserializedMapsPoint.x = reader.getNullable(JsonReader::getFloat); + } else if ("y".equals(fieldName)) { + deserializedMapsPoint.y = reader.getNullable(JsonReader::getFloat); + } else { + reader.skipChildren(); + } + } + return deserializedMapsPoint; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/ProjectionStandard.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/ProjectionStandard.java new file mode 100644 index 000000000000..e2e2b5d21f0b --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/ProjectionStandard.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ProjectionStandard. + */ +public final class ProjectionStandard extends ExpandableStringEnum { + /** + * [EPSG900913](http://docs.openlayers.org/library/spherical_mercator.html). + */ + @Generated + public static final ProjectionStandard EPSG900913 = fromString("EPSG900913"); + + /** + * [EPSG4326](http://spatialreference.org/ref/epsg/4326/). + */ + @Generated + public static final ProjectionStandard EPSG4326 = fromString("EPSG4326"); + + /** + * Creates a new instance of ProjectionStandard value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public ProjectionStandard() { + } + + /** + * Creates or finds a ProjectionStandard from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProjectionStandard. + */ + @Generated + public static ProjectionStandard fromString(String name) { + return fromString(name, ProjectionStandard.class); + } + + /** + * Gets known ProjectionStandard values. + * + * @return known ProjectionStandard values. + */ + @Generated + public static Collection values() { + return values(ProjectionStandard.class); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/SpeedUnit.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/SpeedUnit.java new file mode 100644 index 000000000000..733b8e11910f --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/SpeedUnit.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for SpeedUnit. + */ +public final class SpeedUnit extends ExpandableStringEnum { + /** + * Kilometers Per Hour. + */ + @Generated + public static final SpeedUnit KMPH = fromString("KMPH"); + + /** + * Miles Per Hour. + */ + @Generated + public static final SpeedUnit MPH = fromString("MPH"); + + /** + * Creates a new instance of SpeedUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public SpeedUnit() { + } + + /** + * Creates or finds a SpeedUnit from its string representation. + * + * @param name a name to look for. + * @return the corresponding SpeedUnit. + */ + @Generated + public static SpeedUnit fromString(String name) { + return fromString(name, SpeedUnit.class); + } + + /** + * Gets known SpeedUnit values. + * + * @return known SpeedUnit values. + */ + @Generated + public static Collection values() { + return values(SpeedUnit.class); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TileFormat.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TileFormat.java new file mode 100644 index 000000000000..988a155bed19 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TileFormat.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for TileFormat. + */ +public final class TileFormat extends ExpandableStringEnum { + /** + * An image in the png format. Supports zoom levels 0 through 18. + */ + @Generated + public static final TileFormat PNG = fromString("png"); + + /** + * Vector graphic in the pbf format. Supports zoom levels 0 through 22. + */ + @Generated + public static final TileFormat PBF = fromString("pbf"); + + /** + * Creates a new instance of TileFormat value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TileFormat() { + } + + /** + * Creates or finds a TileFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding TileFormat. + */ + @Generated + public static TileFormat fromString(String name) { + return fromString(name, TileFormat.class); + } + + /** + * Gets known TileFormat values. + * + * @return known TileFormat values. + */ + @Generated + public static Collection values() { + return values(TileFormat.class); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TileIndex.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TileIndex.java new file mode 100644 index 000000000000..d3c6c6ab3f84 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TileIndex.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; + +/** + * Parameter group. + */ +@Fluent +public final class TileIndex { + /* + * X coordinate of the tile on zoom grid. Value must be in the range [0, 2`zoom` -1]. + * + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + */ + @Generated + private int x; + + /* + * Y coordinate of the tile on zoom grid. Value must be in the range [0, 2`zoom` -1]. + * + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + */ + @Generated + private int y; + + /** + * Creates an instance of TileIndex class. + */ + @Generated + public TileIndex() { + } + + /** + * Get the x property: X coordinate of the tile on zoom grid. Value must be in the range [0, + * 2<sup>`zoom`</sup> -1]. + * + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * + * @return the x value. + */ + @Generated + public int getX() { + return this.x; + } + + /** + * Set the x property: X coordinate of the tile on zoom grid. Value must be in the range [0, + * 2<sup>`zoom`</sup> -1]. + * + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * + * @param x the x value to set. + * @return the TileIndex object itself. + */ + @Generated + public TileIndex setX(int x) { + this.x = x; + return this; + } + + /** + * Get the y property: Y coordinate of the tile on zoom grid. Value must be in the range [0, + * 2<sup>`zoom`</sup> -1]. + * + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * + * @return the y value. + */ + @Generated + public int getY() { + return this.y; + } + + /** + * Set the y property: Y coordinate of the tile on zoom grid. Value must be in the range [0, + * 2<sup>`zoom`</sup> -1]. + * + * Please see [Zoom Levels and Tile + * Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid) for details. + * + * @param y the y value to set. + * @return the TileIndex object itself. + */ + @Generated + public TileIndex setY(int y) { + this.y = y; + return this; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentData.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentData.java new file mode 100644 index 000000000000..f78133016386 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentData.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.maps.traffic.implementation.models.TrafficFlowSegmentDataFlowSegmentData; +import java.io.IOException; + +/** + * This object is returned from a successful Traffic Flow Segment call. + */ +@Immutable +public final class TrafficFlowSegmentData implements JsonSerializable { + + /* + * Flow Segment Data property + */ + @Generated + private TrafficFlowSegmentDataFlowSegmentData flowSegmentData; + + /** + * Set default constructor to private + */ + @Generated + private TrafficFlowSegmentData() { + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficFlowSegmentData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficFlowSegmentData if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficFlowSegmentData. + */ + @Generated + public static TrafficFlowSegmentData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficFlowSegmentData deserializedTrafficFlowSegmentData = new TrafficFlowSegmentData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("flowSegmentData".equals(fieldName)) { + deserializedTrafficFlowSegmentData.flowSegmentData + = TrafficFlowSegmentDataFlowSegmentData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedTrafficFlowSegmentData; + }); + } + + /** + * Get the functionalRoadClass property: Functional Road Class. This indicates the road type: 0: Motorway, freeway + * or other major road. 1: Major road, less important than a motorway. 2: Other major road. 3: Secondary road. 4: + * Local connecting road. 5: Local road of high importance. 6: Local road. + * + * @return the functionalRoadClass value. + */ + public String getFunctionalRoadClass() { + return this.flowSegmentData.getFunctionalRoadClass(); + } + + /** + * Get the currentSpeed property: The current average speed at the selected point, in the units requested. This is + * calculated from the currentTravelTime and the length of the selected segment. + * + * @return the currentSpeed value. + */ + public Integer getCurrentSpeed() { + return this.flowSegmentData.getCurrentSpeed(); + } + + /** + * Get the freeFlowSpeed property: The free flow speed expected under ideal conditions, expressed in the units + * requested. This is related to the freeFlowTravelTime. + * + * @return the freeFlowSpeed value. + */ + public Integer getFreeFlowSpeed() { + return this.flowSegmentData.getFreeFlowSpeed(); + } + + /** + * Get the currentTravelTime property: Current travel time in seconds, across this traffic segment, based on fused + * real-time measurements between the defined locations in the specified direction. + * + * @return the currentTravelTime value. + */ + public Integer getCurrentTravelTime() { + return this.flowSegmentData.getCurrentTravelTime(); + } + + /** + * Get the freeFlowTravelTime property: The travel time in seconds, across this traffic segment, which would be + * expected under ideal free flow conditions. + * + * @return the freeFlowTravelTime value. + */ + public Integer getFreeFlowTravelTime() { + return this.flowSegmentData.getFreeFlowTravelTime(); + } + + /** + * Get the confidence property: The confidence is a measure of the quality of the provided travel time and speed. A + * value of 1 means full confidence, that the response contains the highest quality data. Lower values indicate the + * degree that the response may vary from the actual conditions on the road. Any value greater than 0.6 means the + * information was based on real-time probe input. A value of 0.5 means the reported speed is based on historical + * info. A value between 0.5 and 0.6 has a calculated weighted average between historical and live speeds. + * + * @return the confidence value. + */ + public Float getConfidence() { + return this.flowSegmentData.getConfidence(); + } + + /** + * Get the coordinates property: Includes the coordinates describing the shape of the segment. Coordinates are + * shifted from the road depending on the zoom level to support high quality visualization in every scale. + * + * @return the coordinates value. + */ + public TrafficFlowSegmentDataPropertiesCoordinates getCoordinates() { + return this.flowSegmentData.getCoordinates(); + } + + /** + * Get the version property: This indicates the software version that generated the response. + * + * @return the version value. + */ + public String getVersion() { + return this.flowSegmentData.getVersion(); + } + + /** + * Get the openLrCode property: OpenLR code for segment. See [OpenLR](https://en.wikipedia.org/wiki/OpenLR) for more + * information on the use of Open LR codes. + * + * @return the openLrCode value. + */ + public String getOpenLrCode() { + return this.flowSegmentData.getOpenLrCode(); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentDataPropertiesCoordinates.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentDataPropertiesCoordinates.java new file mode 100644 index 000000000000..87c99f51d67a --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentDataPropertiesCoordinates.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.models.GeoPosition; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.maps.traffic.implementation.models.LatLongPair; +import java.io.IOException; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Includes the coordinates describing the shape of the segment. Coordinates are shifted from the road depending on the + * zoom level to support high quality visualization in every scale. + */ +@Immutable +public final class TrafficFlowSegmentDataPropertiesCoordinates + implements JsonSerializable { + + /* + * Coordinate array + */ + @Generated + private List coordinates; + + /** + * Set default constructor to private + */ + @Generated + private TrafficFlowSegmentDataPropertiesCoordinates() { + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficFlowSegmentDataPropertiesCoordinates from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficFlowSegmentDataPropertiesCoordinates if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficFlowSegmentDataPropertiesCoordinates. + */ + @Generated + public static TrafficFlowSegmentDataPropertiesCoordinates fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficFlowSegmentDataPropertiesCoordinates deserializedTrafficFlowSegmentDataPropertiesCoordinates + = new TrafficFlowSegmentDataPropertiesCoordinates(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("coordinate".equals(fieldName)) { + List coordinates = reader.readArray(reader1 -> LatLongPair.fromJson(reader1)); + deserializedTrafficFlowSegmentDataPropertiesCoordinates.coordinates = coordinates; + } else { + reader.skipChildren(); + } + } + return deserializedTrafficFlowSegmentDataPropertiesCoordinates; + }); + } + + /** + * Return the coordinates + * + * @return Returns a list of {@link GeoPosition} coordinates. + */ + public List getCoordinates() { + return this.coordinates.stream() + .map(item -> new GeoPosition(item.getLongitude(), item.getLatitude())) + .collect(Collectors.toList()); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentOptions.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentOptions.java new file mode 100644 index 000000000000..41afd6cf8308 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentOptions.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.models; + +import com.azure.core.models.GeoPosition; + +/** + * TrafficFlowSegmentOptions class + */ +public final class TrafficFlowSegmentOptions { + private TrafficFlowSegmentStyle style; + private Integer zoom; + private GeoPosition coordinates; + private SpeedUnit unit; + private Integer thickness; + private Boolean openLr; + + /** + * Constructor for TrafficFlowSegmentOptions + */ + public TrafficFlowSegmentOptions() { + } + + /** + * Constructor for TrafficFlowSegmentOptions + * @param style The style to be used to render the tile. + * @param zoom Zoom level for the desired tile. + * @param coordinates Coordinates of the point close to the road segment. This parameter is a list of four coordinates, containing two coordinate pairs (lat, long, lat, long), and calculated using EPSG4326 projection. + */ + public TrafficFlowSegmentOptions(TrafficFlowSegmentStyle style, int zoom, GeoPosition coordinates) { + this.style = style; + this.zoom = zoom; + this.coordinates = coordinates; + } + + /** + * get TrafficFlowSegmentStyle + * @return TrafficFlowSegmentStyle + */ + public TrafficFlowSegmentStyle getTrafficFlowSegmentStyle() { + return style; + } + + /** + * Sets TrafficFlowTileStyle + * @param trafficFlowSegmentStyle The style to be used to render the tile. + * @return TrafficFlowSegmentOptions + */ + public TrafficFlowSegmentOptions setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle trafficFlowSegmentStyle) { + this.style = trafficFlowSegmentStyle; + return this; + } + + /** + * get zoom + * @return int + */ + public int getZoom() { + return zoom; + } + + /** + * sets zoom + * @param zoom Zoom level for the desired tile. + * @return TrafficFlowSegmentOptions + */ + public TrafficFlowSegmentOptions setZoom(int zoom) { + this.zoom = zoom; + return this; + } + + /** + * get coordinates + * @return GeoPosition + */ + public GeoPosition getCoordinates() { + return coordinates; + } + + /** + * sets coordinates + * @param coordinates Coordinates of the point close to the road segment. This parameter is a list of four coordinates, containing two coordinate pairs (lat, long, lat, long), and calculated using EPSG4326 projection. + * @return TrafficFlowSegmentOptions + */ + public TrafficFlowSegmentOptions setCoordinates(GeoPosition coordinates) { + this.coordinates = coordinates; + return this; + } + + /** + * gets unit + * @return SpeedUnit + */ + public SpeedUnit getUnit() { + return unit; + } + + /** + * sets unit + * @param unit Unit of speed in KMPH or MPH + * @return TrafficFlowSegmentOptions + */ + public TrafficFlowSegmentOptions setUnit(SpeedUnit unit) { + this.unit = unit; + return this; + } + + /** + * gets thickness + * @return integer + */ + public Integer getThickness() { + return thickness; + } + + /** + * sets thickness + * @param thickness The value of the width of the line representing traffic. + * @return TrafficFlowSegmentOptions + */ + public TrafficFlowSegmentOptions setThickness(Integer thickness) { + this.thickness = thickness; + return this; + } + + /** + * gets openLr + * @return boolean + */ + public Boolean getOpenLr() { + return openLr; + } + + /** + * sets openLr + * @param openLr Boolean on whether the response should include OpenLR code + * @return TrafficFlowSegmentOptions + */ + public TrafficFlowSegmentOptions setOpenLr(Boolean openLr) { + this.openLr = openLr; + return this; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentStyle.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentStyle.java new file mode 100644 index 000000000000..6fa8c4c8df97 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowSegmentStyle.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for TrafficFlowSegmentStyle. + */ +public final class TrafficFlowSegmentStyle extends ExpandableStringEnum { + /** + * Static value absolute for TrafficFlowSegmentStyle. + */ + @Generated + public static final TrafficFlowSegmentStyle ABSOLUTE = fromString("absolute"); + + /** + * Static value relative for TrafficFlowSegmentStyle. + */ + @Generated + public static final TrafficFlowSegmentStyle RELATIVE = fromString("relative"); + + /** + * Static value relative-delay for TrafficFlowSegmentStyle. + */ + @Generated + public static final TrafficFlowSegmentStyle RELATIVE_DELAY = fromString("relative-delay"); + + /** + * Creates a new instance of TrafficFlowSegmentStyle value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TrafficFlowSegmentStyle() { + } + + /** + * Creates or finds a TrafficFlowSegmentStyle from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrafficFlowSegmentStyle. + */ + @Generated + public static TrafficFlowSegmentStyle fromString(String name) { + return fromString(name, TrafficFlowSegmentStyle.class); + } + + /** + * Gets known TrafficFlowSegmentStyle values. + * + * @return known TrafficFlowSegmentStyle values. + */ + @Generated + public static Collection values() { + return values(TrafficFlowSegmentStyle.class); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowTileOptions.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowTileOptions.java new file mode 100644 index 000000000000..6d00ef35ba8d --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowTileOptions.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.models; + +/** + * TrafficFlowTileOptions class + */ +public final class TrafficFlowTileOptions { + private TileFormat format; + private TrafficFlowTileStyle style; + private Integer zoom; + private TileIndex tileIndex; + private Integer thickness; + + /** + * TrafficFlowTileOptions constructor + */ + public TrafficFlowTileOptions() { + } + + /** + * TrafficFlowTileOptions constructor + * @param format Desired format of the response. Possible values are png and pbf. + * @param style The style to be used to render the tile. + * @param zoom Zoom level for the desired tile. + */ + public TrafficFlowTileOptions(TileFormat format, TrafficFlowTileStyle style, int zoom) { + this.format = format; + this.style = style; + this.zoom = zoom; + } + + /** + * gets format + * @return TileFormat + */ + public TileFormat getFormat() { + return format; + } + + /** + * sets format + * @param tileFormat Desired format of the response. Possible values are png and pbf. + * @return TrafficFlowTileOptions + */ + public TrafficFlowTileOptions setFormat(TileFormat tileFormat) { + this.format = tileFormat; + return this; + } + + /** + * gets style + * @return TrafficFlowTileStyle + */ + public TrafficFlowTileStyle getTrafficFlowTileStyle() { + return style; + } + + /** + * sets TrafficFlowTileStyle + * @param trafficFlowTileStyle The style to be used to render the tile. + * @return TrafficFlowTileOptions + */ + public TrafficFlowTileOptions setTrafficFlowTileStyle(TrafficFlowTileStyle trafficFlowTileStyle) { + this.style = trafficFlowTileStyle; + return this; + } + + /** + * get zoom + * @return int + */ + public int getZoom() { + return zoom; + } + + /** + * sets zoom + * @param zoom Zoom level for the desired tile. + * @return TrafficFlowTileOptions + */ + public TrafficFlowTileOptions setZoom(int zoom) { + this.zoom = zoom; + return this; + } + + /** + * gets tileindex + * @return TileIndex + */ + public TileIndex getTileIndex() { + return tileIndex; + } + + /** + * sets tile index + * @param tileIndex The tile index + * @return TrafficFlowTileOptions + */ + public TrafficFlowTileOptions setTileIndex(TileIndex tileIndex) { + this.tileIndex = tileIndex; + return this; + } + + /** + * gets thickness + * @return Integer + */ + public Integer getThickness() { + return thickness; + } + + /** + * sets thickness + * @param thickness The value of the width of the line representing traffic. This value is a multiplier and the accepted values range from 1 - 20. The default value is 10. This parameter is not valid when format is pbf. + * @return TrafficFlowTileOptions + */ + public TrafficFlowTileOptions setThickness(Integer thickness) { + this.thickness = thickness; + return this; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowTileStyle.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowTileStyle.java new file mode 100644 index 000000000000..05a77b823f6f --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficFlowTileStyle.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for TrafficFlowTileStyle. + */ +public final class TrafficFlowTileStyle extends ExpandableStringEnum { + /** + * Colors will reflect the absolute speed measured. Absolute speed is the capability to access the full speed. + */ + @Generated + public static final TrafficFlowTileStyle ABSOLUTE = fromString("absolute"); + + /** + * This is the speed relative to free-flow, highlighting areas of congestion visualizing the traffic flow. Free-flow + * refers to conditions where there is no congestion and traffic can follow the speed limits. The most used option + * to visualize traffic flow on a map. + */ + @Generated + public static final TrafficFlowTileStyle RELATIVE = fromString("relative"); + + /** + * Displays relative colors only where they are different from the free-flow speeds. This option will only + * highlights areas of congestion. + */ + @Generated + public static final TrafficFlowTileStyle RELATIVE_DELAY = fromString("relative-delay"); + + /** + * Displays relative colors but a larger difference from freeflow is required for segments to change the color. This + * mode only valid when format is png. + */ + @Generated + public static final TrafficFlowTileStyle REDUCED_SENSITIVITY = fromString("reduced-sensitivity"); + + /** + * Creates a new instance of TrafficFlowTileStyle value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TrafficFlowTileStyle() { + } + + /** + * Creates or finds a TrafficFlowTileStyle from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrafficFlowTileStyle. + */ + @Generated + public static TrafficFlowTileStyle fromString(String name) { + return fromString(name, TrafficFlowTileStyle.class); + } + + /** + * Gets known TrafficFlowTileStyle values. + * + * @return known TrafficFlowTileStyle values. + */ + @Generated + public static Collection values() { + return values(TrafficFlowTileStyle.class); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentDetail.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentDetail.java new file mode 100644 index 000000000000..fdc35eeec627 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentDetail.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.maps.traffic.implementation.models.TrafficIncidentDetailTm; +import java.io.IOException; +import java.util.List; + +/** + * This object is returned from a successful Traffic incident Detail call. + */ +@Immutable +public final class TrafficIncidentDetail implements JsonSerializable { + + /* + * Main response element + */ + @Generated + private TrafficIncidentDetailTm tm; + + /** + * Set default constructor to private + */ + @Generated + private TrafficIncidentDetail() { + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficIncidentDetail from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficIncidentDetail if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficIncidentDetail. + */ + @Generated + public static TrafficIncidentDetail fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficIncidentDetail deserializedTrafficIncidentDetail = new TrafficIncidentDetail(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("tm".equals(fieldName)) { + deserializedTrafficIncidentDetail.tm = TrafficIncidentDetailTm.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedTrafficIncidentDetail; + }); + } + + /** + * Get the id property: ID of the traffic model for this incident. + * + * @return the id value. + */ + public String getId() { + return this.tm.getId(); + } + + /** + * Get the pointsOfInterest property: A single traffic incident, or a cluster of traffic incidents. + * + * @return the pointsOfInterest value. + */ + public List getPointsOfInterest() { + return this.tm.getPointsOfInterest(); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentDetailOptions.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentDetailOptions.java new file mode 100644 index 000000000000..2471979b1d03 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentDetailOptions.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.models; + +import com.azure.core.models.GeoBoundingBox; + +/** + * TrafficIncidentDetailOptions class + */ +public final class TrafficIncidentDetailOptions { + private IncidentDetailStyle style; + private GeoBoundingBox boundingbox; + private Integer boundingZoom; + private String trafficmodelid; + private String language; + private ProjectionStandard projection; + private IncidentGeometryType geometries; + private Boolean expandCluster; + private Boolean originalPosition; + + /** + * TrafficIncidentDetailOptions constructor + */ + public TrafficIncidentDetailOptions() { + } + + /** + * TrafficIncidentDetailOptions constructor + * @param boundingBox The boundingbox is represented by two value pairs describing it's corners (first pair for lower left corner and second for upper right). + * @param style The style that will be used to render the tile in Traffic Incident Tile API. + * @param boundingZoom Zoom level for desired tile. 0 to 22 for raster tiles, 0 through 22 for vector tiles + * @param trafficModelId Number referencing traffic model. This can be obtained from the Viewport API. + */ + public TrafficIncidentDetailOptions(GeoBoundingBox boundingBox, IncidentDetailStyle style, int boundingZoom, + String trafficModelId) { + this.boundingbox = boundingBox; + this.style = style; + this.boundingZoom = boundingZoom; + this.trafficmodelid = trafficModelId; + } + + /** + * get incident detail style + * @return IncidentDetailStyle + */ + public IncidentDetailStyle getIncidentDetailStyle() { + return style; + } + + /** + * sets incident detail style + * @param incidentDetailStyle The style that will be used to render the tile in Traffic Incident Tile API. + * @return TrafficIncidentDetailOptions + */ + public TrafficIncidentDetailOptions setIncidentDetailStyle(IncidentDetailStyle incidentDetailStyle) { + this.style = incidentDetailStyle; + return this; + } + + /** + * get bounding box + * @return GeoBoundingBox + */ + public GeoBoundingBox getBoundingBox() { + return boundingbox; + } + + /** + * sets bounding box + * @param boundingbox The boundingbox is represented by two value pairs describing it's corners (first pair for lower left corner and second for upper right). + * @return TrafficIncidentDetailOptions + */ + public TrafficIncidentDetailOptions setBoundingBox(GeoBoundingBox boundingbox) { + this.boundingbox = boundingbox; + return this; + } + + /** + * get bounding zoom + * @return int + */ + public int getBoundingZoom() { + return boundingZoom; + } + + /** + * set bounding zoom + * @param boundingZoom Zoom level for desired tile. 0 to 22 for raster tiles, 0 through 22 for vector tiles + * @return TrafficIncidentDetailOptions + */ + public TrafficIncidentDetailOptions setBoundingZoom(int boundingZoom) { + this.boundingZoom = boundingZoom; + return this; + } + + /** + * get traffic model id + * @return String + */ + public String getTrafficIncidentDetailTrafficModelId() { + return trafficmodelid; + } + + /** + * sets traffic model id + * @param trafficmodelid Number referencing traffic model. This can be obtained from the Viewport API. + * @return TrafficIncidentDetailOptions + */ + public TrafficIncidentDetailOptions setTrafficmodelId(String trafficmodelid) { + this.trafficmodelid = trafficmodelid; + return this; + } + + /** + * get language + * @return String + */ + public String getLanguage() { + return language; + } + + /** + * sets language + * @param language ISO 639-1 code for the output language. + * @return TrafficIncidentDetailOptions + */ + public TrafficIncidentDetailOptions setLanguage(String language) { + this.language = language; + return this; + } + + /** + * get projection standard + * @return ProjectionStandard + */ + public ProjectionStandard getProjectionStandard() { + return projection; + } + + /** + * set projection standard + * @param projectionStandard The projection used to specify the coordinates in the request and response. + * @return TrafficIncidentDetailOptions + */ + public TrafficIncidentDetailOptions setProjectionStandard(ProjectionStandard projectionStandard) { + this.projection = projectionStandard; + return this; + } + + /** + * get incident geometry type + * @return IncidentGeometryType + */ + public IncidentGeometryType getIncidentGeometryType() { + return geometries; + } + + /** + * set incident geometry type + * @param incidentGeometryType The type of vector geometry added to incidents (returned in the element of the response). + * @return TrafficIncidentDetailOptions + */ + public TrafficIncidentDetailOptions setIncidentGeometryType(IncidentGeometryType incidentGeometryType) { + this.geometries = incidentGeometryType; + return this; + } + + /** + * get expand cluster + * @return boolean + */ + public Boolean getExpandCluster() { + return expandCluster; + } + + /** + * set expand cluster + * @param expandCluster Boolean to indicate whether to list all traffic incidents in a cluster separately + * @return TrafficIncidentDetailOptions + */ + public TrafficIncidentDetailOptions setExpandCluster(Boolean expandCluster) { + this.expandCluster = expandCluster; + return this; + } + + /** + * get original position + * @return boolean + */ + public Boolean getOriginalPosition() { + return originalPosition; + } + + /** + * set original position + * @param originalPosition Boolean on whether to return the original position of the incident as well as the one shifted to the beginning of the traffic tube + * @return TrafficIncidentDetailOptions + */ + public TrafficIncidentDetailOptions setOriginalPosition(Boolean originalPosition) { + this.originalPosition = originalPosition; + return this; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentPointOfInterest.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentPointOfInterest.java new file mode 100644 index 000000000000..79dd06f9f2c3 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentPointOfInterest.java @@ -0,0 +1,365 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The TrafficIncidentPointOfInterest model. + */ +@Immutable +public final class TrafficIncidentPointOfInterest implements JsonSerializable { + + /* + * ID of the traffic incident + */ + @Generated + private String id; + + /* + * The point where an icon of the cluster or raw incident should be drawn, expressed in the requested projection. + * This is affected by traffic style, zoom level and road type + */ + @Generated + private MapsPoint point; + + /* + * The icon category associated with this incident. Values are numbers in the range 0-13, with the following + * meanings -- 0: Unknown, 1: Accident, 2: Fog, 3: Dangerous Conditions, 4: Rain, 5: Ice, 6: Jam, 7: Lane Closed, 8: + * Road Closed, 9: Road Works, 10: Wind, 11: Flooding, 12: Detour, 13: Cluster + */ + @Generated + private IconCategory iconCategory; + + /* + * The magnitude of delay associated with incident. These values correspond to incident colors in the traffic tiles + */ + @Generated + private DelayMagnitude magnitudeOfDelay; + + /* + * Bottom left coordinate of the cluster in the projection of the request + */ + @Generated + private MapsPoint bottomLeftCoordinate; + + /* + * Top right coordinate of the cluster in the projection of the request + */ + @Generated + private MapsPoint topLeftCoordinate; + + /* + * Cluster size: the number of incidents in the cluster + */ + @Generated + private Integer clusterSize; + + /* + * Length of the incident in meters + */ + @Generated + private Integer lengthInMeters; + + /* + * The road number(s) affected by the incident. Multiple road numbers will delimited by slashes + */ + @Generated + private String roadNumbers; + + /* + * Start date of the incident, if available. The date is described in the ISO8601 format. + */ + @Generated + private OffsetDateTime startDate; + + /* + * Estimated end date of the incident, if available. The date is described in the ISO8601 format. + */ + @Generated + private OffsetDateTime endDate; + + /* + * Delay caused by the incident in seconds (except in road closures) + */ + @Generated + private Integer delayInSeconds; + + /* + * To: the name of the intersection or location where the traffic due to the incident ends + */ + @Generated + private String trafficEndLocation; + + /* + * From: the name of the intersection or location where the traffic due to the incident starts + */ + @Generated + private String trafficStartLocation; + + /* + * Description of the incident in the language requested + */ + @Generated + private String description; + + /* + * Cause of the incident, where available, in the language requested + */ + @Generated + private String cause; + + /** + * Set default constructor to private + */ + @Generated + private TrafficIncidentPointOfInterest() { + } + + /** + * Get the id property: ID of the traffic incident. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the point property: The point where an icon of the cluster or raw incident should be drawn, expressed in the + * requested projection. This is affected by traffic style, zoom level and road type. + * + * @return the point value. + */ + @Generated + public MapsPoint getPoint() { + return this.point; + } + + /** + * Get the iconCategory property: The icon category associated with this incident. Values are numbers in the range + * 0-13, with the following meanings -- 0: Unknown, 1: Accident, 2: Fog, 3: Dangerous Conditions, 4: Rain, 5: Ice, + * 6: Jam, 7: Lane Closed, 8: Road Closed, 9: Road Works, 10: Wind, 11: Flooding, 12: Detour, 13: Cluster. + * + * @return the iconCategory value. + */ + @Generated + public IconCategory getIconCategory() { + return this.iconCategory; + } + + /** + * Get the magnitudeOfDelay property: The magnitude of delay associated with incident. These values correspond to + * incident colors in the traffic tiles. + * + * @return the magnitudeOfDelay value. + */ + @Generated + public DelayMagnitude getMagnitudeOfDelay() { + return this.magnitudeOfDelay; + } + + /** + * Get the bottomLeftCoordinate property: Bottom left coordinate of the cluster in the projection of the request. + * + * @return the bottomLeftCoordinate value. + */ + @Generated + public MapsPoint getBottomLeftCoordinate() { + return this.bottomLeftCoordinate; + } + + /** + * Get the topLeftCoordinate property: Top right coordinate of the cluster in the projection of the request. + * + * @return the topLeftCoordinate value. + */ + @Generated + public MapsPoint getTopLeftCoordinate() { + return this.topLeftCoordinate; + } + + /** + * Get the clusterSize property: Cluster size: the number of incidents in the cluster. + * + * @return the clusterSize value. + */ + @Generated + public Integer getClusterSize() { + return this.clusterSize; + } + + /** + * Get the lengthInMeters property: Length of the incident in meters. + * + * @return the lengthInMeters value. + */ + @Generated + public Integer getLengthInMeters() { + return this.lengthInMeters; + } + + /** + * Get the roadNumbers property: The road number(s) affected by the incident. Multiple road numbers will delimited + * by slashes. + * + * @return the roadNumbers value. + */ + @Generated + public String getRoadNumbers() { + return this.roadNumbers; + } + + /** + * Get the startDate property: Start date of the incident, if available. The date is described in the ISO8601 + * format. + * + * @return the startDate value. + */ + @Generated + public OffsetDateTime getStartDate() { + return this.startDate; + } + + /** + * Get the endDate property: Estimated end date of the incident, if available. The date is described in the ISO8601 + * format. + * + * @return the endDate value. + */ + @Generated + public OffsetDateTime getEndDate() { + return this.endDate; + } + + /** + * Get the delayInSeconds property: Delay caused by the incident in seconds (except in road closures). + * + * @return the delayInSeconds value. + */ + @Generated + public Integer getDelayInSeconds() { + return this.delayInSeconds; + } + + /** + * Get the trafficEndLocation property: To: the name of the intersection or location where the traffic due to the + * incident ends. + * + * @return the trafficEndLocation value. + */ + @Generated + public String getTrafficEndLocation() { + return this.trafficEndLocation; + } + + /** + * Get the trafficStartLocation property: From: the name of the intersection or location where the traffic due to + * the incident starts. + * + * @return the trafficStartLocation value. + */ + @Generated + public String getTrafficStartLocation() { + return this.trafficStartLocation; + } + + /** + * Get the description property: Description of the incident in the language requested. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Get the cause property: Cause of the incident, where available, in the language requested. + * + * @return the cause value. + */ + @Generated + public String getCause() { + return this.cause; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficIncidentPointOfInterest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficIncidentPointOfInterest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficIncidentPointOfInterest. + */ + @Generated + public static TrafficIncidentPointOfInterest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficIncidentPointOfInterest deserializedTrafficIncidentPointOfInterest + = new TrafficIncidentPointOfInterest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("id".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.id = reader.getString(); + } else if ("p".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.point = MapsPoint.fromJson(reader); + } else if ("ic".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.iconCategory = IconCategory.fromValue(reader.getInt()); + } else if ("ty".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.magnitudeOfDelay + = DelayMagnitude.fromValue(reader.getInt()); + } else if ("cbl".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.bottomLeftCoordinate = MapsPoint.fromJson(reader); + } else if ("ctr".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.topLeftCoordinate = MapsPoint.fromJson(reader); + } else if ("cs".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.clusterSize = reader.getNullable(JsonReader::getInt); + } else if ("l".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.lengthInMeters = reader.getNullable(JsonReader::getInt); + } else if ("r".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.roadNumbers = reader.getString(); + } else if ("sd".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.startDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("ed".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.endDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("dl".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.delayInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("t".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.trafficEndLocation = reader.getString(); + } else if ("f".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.trafficStartLocation = reader.getString(); + } else if ("d".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.description = reader.getString(); + } else if ("c".equals(fieldName)) { + deserializedTrafficIncidentPointOfInterest.cause = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedTrafficIncidentPointOfInterest; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentTileOptions.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentTileOptions.java new file mode 100644 index 000000000000..607de7006d39 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentTileOptions.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.models; + +/** + * TrafficIncidentTileOptions class + */ +public final class TrafficIncidentTileOptions { + private TileFormat format; + private TrafficIncidentTileStyle style; + private Integer zoom; + private TileIndex tileIndex; + private String trafficState; + + /** + * TrafficIncidentTileOptions constructor + */ + public TrafficIncidentTileOptions() { + } + + /** + * TrafficIncidentTileOptions constructor + * @param format Desired format of the response. Possible values are png and pbf. + * @param style The style to be used to render the tile. This parameter is not valid when format is pbf. + * @param zoom Zoom level for the desired tile. For raster tiles, value must be in the range: 0-22 (inclusive). For vector tiles, value must be in the range: 0-22 (inclusive). + */ + public TrafficIncidentTileOptions(TileFormat format, TrafficIncidentTileStyle style, int zoom) { + this.format = format; + this.style = style; + this.zoom = zoom; + } + + /** + * get format + * @return TileFormat + */ + public TileFormat getFormat() { + return format; + } + + /** + * set format + * @param tileFormat Desired format of the response. Possible values are png and pbf. + * @return TrafficIncidentTileOptions + */ + public TrafficIncidentTileOptions setFormat(TileFormat tileFormat) { + this.format = tileFormat; + return this; + } + + /** + * get traffic incident tile style + * @return TrafficIncidentTileStyle + */ + public TrafficIncidentTileStyle getTrafficIncidentTileStyle() { + return style; + } + + /** + * set traffic incident tile style + * @param trafficIncidentTileStyle The style to be used to render the tile. This parameter is not valid when format is pbf. + * @return TrafficIncidentTileOptions + */ + public TrafficIncidentTileOptions setTrafficIncidentTileStyle(TrafficIncidentTileStyle trafficIncidentTileStyle) { + this.style = trafficIncidentTileStyle; + return this; + } + + /** + * get zoom + * @return int + */ + public int getZoom() { + return zoom; + } + + /** + * set zoom + * @param zoom Zoom level for the desired tile. For raster tiles, value must be in the range: 0-22 (inclusive). For vector tiles, value must be in the range: 0-22 (inclusive). + * @return TrafficIncidentTileOptions + */ + public TrafficIncidentTileOptions setZoom(int zoom) { + this.zoom = zoom; + return this; + } + + /** + * get tile index + * @return TileIndex + */ + public TileIndex getTileIndex() { + return tileIndex; + } + + /** + * set tile index + * @param tileIndex tile index + * @return TrafficIncidentTileOptions + */ + public TrafficIncidentTileOptions setTileIndex(TileIndex tileIndex) { + this.tileIndex = tileIndex; + return this; + } + + /** + * get traffic state + * @return String + */ + public String getTrafficState() { + return trafficState; + } + + /** + * set traffic state + * @param trafficState Reference value for the state of traffic at a particular time, obtained from the Viewport API call, trafficModelId attribute in trafficState field. + * @return TrafficIncidentTileOptions + */ + public TrafficIncidentTileOptions setTrafficState(String trafficState) { + this.trafficState = trafficState; + return this; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentTileStyle.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentTileStyle.java new file mode 100644 index 000000000000..c4d81137c178 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentTileStyle.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for TrafficIncidentTileStyle. + */ +public final class TrafficIncidentTileStyle extends ExpandableStringEnum { + /** + * Creates traffic lines with colored chevrons indicating severity. + */ + @Generated + public static final TrafficIncidentTileStyle S1 = fromString("s1"); + + /** + * Creates plain lines with certain degree of glow. + */ + @Generated + public static final TrafficIncidentTileStyle S2 = fromString("s2"); + + /** + * Creates plain lines with certain degree of glow, different from the s2 style. + */ + @Generated + public static final TrafficIncidentTileStyle S3 = fromString("s3"); + + /** + * Night style. + */ + @Generated + public static final TrafficIncidentTileStyle NIGHT = fromString("night"); + + /** + * Creates a new instance of TrafficIncidentTileStyle value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TrafficIncidentTileStyle() { + } + + /** + * Creates or finds a TrafficIncidentTileStyle from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrafficIncidentTileStyle. + */ + @Generated + public static TrafficIncidentTileStyle fromString(String name) { + return fromString(name, TrafficIncidentTileStyle.class); + } + + /** + * Gets known TrafficIncidentTileStyle values. + * + * @return known TrafficIncidentTileStyle values. + */ + @Generated + public static Collection values() { + return values(TrafficIncidentTileStyle.class); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewport.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewport.java new file mode 100644 index 000000000000..e22acd381244 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewport.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * This object is returned from a successful Traffic Incident Viewport call. + */ +@Immutable +public final class TrafficIncidentViewport implements JsonSerializable { + + /* + * Viewport Response object + */ + @Generated + private TrafficIncidentViewportResponse viewpResp; + + /** + * Set default constructor to private + */ + @Generated + private TrafficIncidentViewport() { + } + + /** + * Get the viewpResp property: Viewport Response object. + * + * @return the viewpResp value. + */ + @Generated + public TrafficIncidentViewportResponse getViewportResponse() { + return this.viewpResp; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficIncidentViewport from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficIncidentViewport if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficIncidentViewport. + */ + @Generated + public static TrafficIncidentViewport fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficIncidentViewport deserializedTrafficIncidentViewport = new TrafficIncidentViewport(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("viewpResp".equals(fieldName)) { + deserializedTrafficIncidentViewport.viewpResp = TrafficIncidentViewportResponse.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return deserializedTrafficIncidentViewport; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewportOptions.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewportOptions.java new file mode 100644 index 000000000000..147f578d1626 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewportOptions.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.models; + +import com.azure.core.models.GeoBoundingBox; + +/** + * TrafficIncidentViewportOptions class + */ +public final class TrafficIncidentViewportOptions { + private GeoBoundingBox boundingbox; + private Integer boundingzoom; + private GeoBoundingBox overviewbox; + private Integer overviewzoom; + private Boolean copyright; + + /** + * TrafficIncidentViewportOptions constructor + */ + public TrafficIncidentViewportOptions() { + } + + /** + * TrafficIncidentViewportOptions constructor + * @param boundingBox Bounding box of the map viewport in EPSG900913 projection. The boundingbox is represented by two value pairs describing it's corners (first pair for lower left corner and second for upper right). + * @param boundingZoom Zoom level of the map viewport. Used to determine whether the view can be zoomed in. + * @param overviewBox Bounding box of the overview map in EPSG900913 projection. + * @param overviewZoom Zoom level of the overview map. If there is no mini map, use the same zoom level as boundingZoom. + */ + public TrafficIncidentViewportOptions(GeoBoundingBox boundingBox, int boundingZoom, GeoBoundingBox overviewBox, + int overviewZoom) { + this.boundingbox = boundingBox; + this.boundingzoom = boundingZoom; + this.overviewbox = overviewBox; + this.overviewzoom = overviewZoom; + } + + /** + * get bounding box + * @return GeoBoundingBox + */ + public GeoBoundingBox getBoundingBox() { + return boundingbox; + } + + /** + * set bounding box + * @param boundingbox Bounding box of the map viewport in EPSG900913 projection. The boundingbox is represented by two value pairs describing it's corners (first pair for lower left corner and second for upper right). + * @return TrafficIncidentViewportOptions + */ + public TrafficIncidentViewportOptions setBoundingBox(GeoBoundingBox boundingbox) { + this.boundingbox = boundingbox; + return this; + } + + /** + * get bounding zoom + * @return int + */ + public int getBoundingZoom() { + return boundingzoom; + } + + /** + * set bounding zoom + * @param boundingZoom Zoom level of the map viewport. Used to determine whether the view can be zoomed in. + * @return TrafficIncidentViewportOptions + */ + public TrafficIncidentViewportOptions setBoundingZoom(int boundingZoom) { + this.boundingzoom = boundingZoom; + return this; + } + + /** + * get overviewbox + * @return GeoBoundingBox + */ + public GeoBoundingBox getOverviewBox() { + return overviewbox; + } + + /** + * set overview + * @param overviewBox Bounding box of the overview map in EPSG900913 projection. + * @return TrafficIncidentViewportOptions + */ + public TrafficIncidentViewportOptions setOverview(GeoBoundingBox overviewBox) { + this.overviewbox = overviewBox; + return this; + } + + /** + * get overview zoom + * @return int + */ + public int getOverviewZoom() { + return overviewzoom; + } + + /** + * set overview zoom + * @param overviewZoom Zoom level of the overview map. If there is no mini map, use the same zoom level as boundingZoom. + * @return TrafficIncidentViewportOptions + */ + public TrafficIncidentViewportOptions setOverviewZoom(int overviewZoom) { + this.overviewzoom = overviewZoom; + return this; + } + + /** + * get copyright + * @return boolean + */ + public Boolean getCopyright() { + return copyright; + } + + /** + * set copyright + * @param copyright Determines what copyright information to return. When true the copyright text is returned; when false only the copyright index is returned. + * @return TrafficIncidentViewportOptions + */ + public TrafficIncidentViewportOptions setCopyright(Boolean copyright) { + this.copyright = copyright; + return this; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewportResponse.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewportResponse.java new file mode 100644 index 000000000000..f78cd3f69a8f --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficIncidentViewportResponse.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Viewport Response object. + */ +@Immutable +public final class TrafficIncidentViewportResponse implements JsonSerializable { + + /* + * Traffic State information + */ + @Generated + private TrafficState trafficState; + + /* + * When the copyright parameter value is true, this contains the full text of the copyright information that must be + * displayed with the tiles in the viewport + */ + @Generated + private String copyrightInformation; + + /* + * Indicates the software version used to generate the information. For use with support queries. + */ + @Generated + private String version; + + /* + * Indicates the data provider's internal names for the map data used in the viewport. For use with support queries. + */ + @Generated + private String maps; + + /** + * Set default constructor to private + */ + @Generated + private TrafficIncidentViewportResponse() { + } + + /** + * Get the trafficState property: Traffic State information. + * + * @return the trafficState value. + */ + @Generated + public TrafficState getTrafficState() { + return this.trafficState; + } + + /** + * Get the copyrightInformation property: When the copyright parameter value is true, this contains the full text of + * the copyright information that must be displayed with the tiles in the viewport. + * + * @return the copyrightInformation value. + */ + @Generated + public String getCopyrightInformation() { + return this.copyrightInformation; + } + + /** + * Get the version property: Indicates the software version used to generate the information. For use with support + * queries. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the maps property: Indicates the data provider's internal names for the map data used in the viewport. For + * use with support queries. + * + * @return the maps value. + */ + @Generated + public String getMaps() { + return this.maps; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficIncidentViewportResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficIncidentViewportResponse if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficIncidentViewportResponse. + */ + @Generated + public static TrafficIncidentViewportResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficIncidentViewportResponse deserializedTrafficIncidentViewportResponse + = new TrafficIncidentViewportResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("trafficState".equals(fieldName)) { + deserializedTrafficIncidentViewportResponse.trafficState = TrafficState.fromJson(reader); + } else if ("copyrightIds".equals(fieldName)) { + deserializedTrafficIncidentViewportResponse.copyrightInformation = reader.getString(); + } else if ("@version".equals(fieldName)) { + deserializedTrafficIncidentViewportResponse.version = reader.getString(); + } else if ("@maps".equals(fieldName)) { + deserializedTrafficIncidentViewportResponse.maps = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedTrafficIncidentViewportResponse; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficState.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficState.java new file mode 100644 index 000000000000..64ab7a110a0c --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/TrafficState.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. +package com.azure.maps.traffic.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Traffic State information. + */ +@Immutable +public final class TrafficState implements JsonSerializable { + + /* + * The elapsed time (in seconds) from the Traffic Model ID creation. + */ + @Generated + private Integer trafficAge; + + /* + * The unique ID called Traffic Model ID is used in calls to Traffic Incident services. It allows to obtain + * information from particular traffic updates. Traffic Model ID is updated every minute, and is valid for two + * minutes before it times out. + */ + @Generated + private String trafficModelId; + + /** + * Set default constructor to private + */ + @Generated + private TrafficState() { + } + + /** + * Get the trafficAge property: The elapsed time (in seconds) from the Traffic Model ID creation. + * + * @return the trafficAge value. + */ + @Generated + public Integer getTrafficAge() { + return this.trafficAge; + } + + /** + * Get the trafficModelId property: The unique ID called Traffic Model ID is used in calls to Traffic Incident + * services. It allows to obtain information from particular traffic updates. Traffic Model ID is updated every + * minute, and is valid for two minutes before it times out. + * + * @return the trafficModelId value. + */ + @Generated + public String getTrafficModelId() { + return this.trafficModelId; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficState if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficState. + */ + @Generated + public static TrafficState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficState deserializedTrafficState = new TrafficState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("@trafficAge".equals(fieldName)) { + deserializedTrafficState.trafficAge = reader.getNullable(JsonReader::getInt); + } else if ("@trafficModelId".equals(fieldName)) { + deserializedTrafficState.trafficModelId = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserializedTrafficState; + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/package-info.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/package-info.java new file mode 100644 index 000000000000..cec709275981 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for TrafficClient. + * Azure Maps Traffic REST APIs. + */ +package com.azure.maps.traffic.models; diff --git a/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/package-info.java b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/package-info.java new file mode 100644 index 000000000000..44e41ddc4d31 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/com/azure/maps/traffic/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for TrafficClient. Azure Maps Traffic REST APIs. */ +package com.azure.maps.traffic; diff --git a/sdk/maps/azure-maps-traffic/src/main/java/module-info.java b/sdk/maps/azure-maps-traffic/src/main/java/module-info.java new file mode 100644 index 000000000000..862436317dc3 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/java/module-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.maps.traffic { + requires transitive com.azure.core; + + exports com.azure.maps.traffic; + exports com.azure.maps.traffic.models; + + opens com.azure.maps.traffic.implementation to com.azure.core; + opens com.azure.maps.traffic.models to com.azure.core; + opens com.azure.maps.traffic.implementation.models to com.azure.core; +} diff --git a/sdk/maps/azure-maps-traffic/src/main/resources/azure-maps-traffic.properties b/sdk/maps/azure-maps-traffic/src/main/resources/azure-maps-traffic.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/main/resources/azure-maps-traffic.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficFlowSegment.java b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficFlowSegment.java new file mode 100644 index 000000000000..d08267da301e --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficFlowSegment.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.samples; + +import java.io.IOException; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.models.GeoPosition; +import com.azure.maps.traffic.TrafficAsyncClient; +import com.azure.maps.traffic.TrafficClient; +import com.azure.maps.traffic.TrafficClientBuilder; +import com.azure.maps.traffic.models.SpeedUnit; +import com.azure.maps.traffic.models.TrafficFlowSegmentOptions; +import com.azure.maps.traffic.models.TrafficFlowSegmentStyle; + +public class GetTrafficFlowSegment { + public static void main(String[] args) throws IOException { + TrafficClientBuilder builder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + builder.credential(keyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); + // builder.credential(tokenCredential); + + builder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficClient client = builder.buildClient(); + + // Get traffic flow segment - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-flow-segment + // BEGIN: com.azure.maps.traffic.sync.get_traffic_flow_segment + System.out.println("Get Traffic Flow Segment:"); + + // options + client.getTrafficFlowSegment( + new TrafficFlowSegmentOptions() + .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072))); + + // complete + client.getTrafficFlowSegment( + new TrafficFlowSegmentOptions() + .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072)).setOpenLr(false) + .setThickness(2).setUnit(SpeedUnit.MPH)); + // END: com.azure.maps.traffic.sync.get_traffic_flow_segment + + TrafficClientBuilder asyncClientbuilder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential asyncClientKeyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + asyncClientbuilder.credential(asyncClientKeyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential asyncClientTokenCredential = new DefaultAzureCredentialBuilder().build(); + // asyncClientbuilder.credential(asyncClientTokenCredential); + + asyncClientbuilder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + asyncClientbuilder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficAsyncClient asyncClient = asyncClientbuilder.buildAsyncClient(); + + // Get traffic flow segment - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-flow-segment + // BEGIN: com.azure.maps.traffic.async.get_traffic_flow_segment + System.out.println("Get Traffic Flow Segment:"); + + // options + asyncClient.getTrafficFlowSegment( + new TrafficFlowSegmentOptions() + .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072))); + + // complete + asyncClient.getTrafficFlowSegment( + new TrafficFlowSegmentOptions() + .setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE).setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072)).setOpenLr(false) + .setThickness(2).setUnit(SpeedUnit.MPH)); + // END: com.azure.maps.traffic.async.get_traffic_flow_segment + } +} diff --git a/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficFlowTile.java b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficFlowTile.java new file mode 100644 index 000000000000..eb2be2419349 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficFlowTile.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.samples; + +import java.io.IOException; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.maps.traffic.TrafficAsyncClient; +import com.azure.maps.traffic.TrafficClient; +import com.azure.maps.traffic.TrafficClientBuilder; +import com.azure.maps.traffic.models.TileFormat; +import com.azure.maps.traffic.models.TileIndex; +import com.azure.maps.traffic.models.TrafficFlowTileOptions; +import com.azure.maps.traffic.models.TrafficFlowTileStyle; + +public class GetTrafficFlowTile { + public static void main(String[] args) throws IOException { + TrafficClientBuilder builder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + builder.credential(keyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); + // builder.credential(tokenCredential); + + builder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficClient client = builder.buildClient(); + + // Get traffic flow tile - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-flow-tile + // BEGIN: com.azure.maps.traffic.sync.get_traffic_flow_tile + System.out.println("Get Traffic Flow Tile:"); + + // options + client.getTrafficFlowTile( + new TrafficFlowTileOptions() + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10) + .setTileIndex(new TileIndex().setX(1022).setY(680))); + + // complete + client.getTrafficFlowTile( + new TrafficFlowTileOptions() + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10) + .setTileIndex(new TileIndex().setX(1022).setY(680)).setThickness(10)); + // END: com.azure.maps.traffic.sync.get_traffic_flow_tile + + TrafficClientBuilder asyncClientbuilder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential asyncClientKeyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + asyncClientbuilder.credential(asyncClientKeyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential asyncClientTokenCredential = new DefaultAzureCredentialBuilder().build(); + // asyncClientbuilder.credential(asyncClientTokenCredential); + + asyncClientbuilder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + asyncClientbuilder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficAsyncClient asyncClient = asyncClientbuilder.buildAsyncClient(); + + // Get traffic flow segment - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-flow-tile + // BEGIN: com.azure.maps.traffic.async.get_traffic_flow_tile + System.out.println("Get Traffic Flow Tile:"); + + // options + asyncClient.getTrafficFlowTile( + new TrafficFlowTileOptions() + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10) + .setTileIndex(new TileIndex().setX(1022).setY(680))); + + // complete + asyncClient.getTrafficFlowTile( + new TrafficFlowTileOptions() + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY).setFormat(TileFormat.PNG).setZoom(10) + .setTileIndex(new TileIndex().setX(1022).setY(680)).setThickness(10)); + // END: com.azure.maps.traffic.async.get_traffic_flow_tile + } +} diff --git a/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentDetail.java b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentDetail.java new file mode 100644 index 000000000000..23c5e13f729b --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentDetail.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.samples; + +import java.io.IOException; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.models.GeoBoundingBox; +import com.azure.maps.traffic.TrafficAsyncClient; +import com.azure.maps.traffic.TrafficClient; +import com.azure.maps.traffic.TrafficClientBuilder; +import com.azure.maps.traffic.models.IncidentDetailStyle; +import com.azure.maps.traffic.models.IncidentGeometryType; +import com.azure.maps.traffic.models.ProjectionStandard; +import com.azure.maps.traffic.models.TrafficIncidentDetailOptions; + + +public class GetTrafficIncidentDetail { + public static void main(String[] args) throws IOException { + TrafficClientBuilder builder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + builder.credential(keyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); + // builder.credential(tokenCredential); + + builder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficClient client = builder.buildClient(); + + // Get traffic incident detail - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-incident-detail + // BEGIN: com.azure.maps.traffic.sync.get_traffic_incident_detail + System.out.println("Get Traffic Incident Detail:"); + + // options + client.getTrafficIncidentDetail( + new TrafficIncidentDetailOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11) + .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11) + .setTrafficmodelId("1335294634919")); + + // complete + client.getTrafficIncidentDetail( + new TrafficIncidentDetailOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11) + .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11) + .setTrafficmodelId("1335294634919").setLanguage("en") + .setProjectionStandard(ProjectionStandard.EPSG900913).setIncidentGeometryType(IncidentGeometryType.ORIGINAL) + .setExpandCluster(false).setOriginalPosition(false)); + // END: com.azure.maps.traffic.sync.get_traffic_incident_detail + + TrafficClientBuilder asyncClientbuilder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential asyncClientKeyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + asyncClientbuilder.credential(asyncClientKeyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential asyncClientTokenCredential = new DefaultAzureCredentialBuilder().build(); + // asyncClientbuilder.credential(asyncClientTokenCredential); + + asyncClientbuilder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + asyncClientbuilder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficAsyncClient asyncClient = asyncClientbuilder.buildAsyncClient(); + + // Get traffic incident detail - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-incident-detail + // BEGIN: com.azure.maps.traffic.async.get_traffic_incident_detail + System.out.println("Get Traffic Incident Detail:"); + + // options + asyncClient.getTrafficIncidentDetail( + new TrafficIncidentDetailOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11) + .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11) + .setTrafficmodelId("1335294634919")); + + // complete + asyncClient.getTrafficIncidentDetail( + new TrafficIncidentDetailOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)).setBoundingZoom(11) + .setIncidentDetailStyle(IncidentDetailStyle.S3).setBoundingZoom(11) + .setTrafficmodelId("1335294634919").setLanguage("en") + .setProjectionStandard(ProjectionStandard.EPSG900913).setIncidentGeometryType(IncidentGeometryType.ORIGINAL) + .setExpandCluster(false).setOriginalPosition(false)); + // END: com.azure.maps.traffic.async.get_traffic_incident_detail + } +} diff --git a/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentTile.java b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentTile.java new file mode 100644 index 000000000000..0cc68a9e1904 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentTile.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.samples; + +import java.io.IOException; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.maps.traffic.TrafficAsyncClient; +import com.azure.maps.traffic.TrafficClient; +import com.azure.maps.traffic.TrafficClientBuilder; +import com.azure.maps.traffic.models.TileFormat; +import com.azure.maps.traffic.models.TileIndex; +import com.azure.maps.traffic.models.TrafficIncidentTileOptions; +import com.azure.maps.traffic.models.TrafficIncidentTileStyle; + +public class GetTrafficIncidentTile { + public static void main(String[] args) throws IOException { + TrafficClientBuilder builder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + builder.credential(keyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); + // builder.credential(tokenCredential); + + builder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficClient client = builder.buildClient(); + + // Get Traffic Incident Tile - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-incident-tile + // BEGIN: com.azure.maps.traffic.sync.get_traffic_incident_tile + System.out.println("Get Traffic Incident Tile:"); + + // options + client.getTrafficIncidentTile( + new TrafficIncidentTileOptions() + .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3) + .setZoom(10).setTileIndex(new TileIndex().setX(1022).setY(680))); + + // complete + client.getTrafficIncidentTile( + new TrafficIncidentTileOptions() + .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3) + .setZoom(10).setTileIndex(new TileIndex().setX(175).setY(408))); + // END: com.azure.maps.traffic.sync.get_traffic_incident_tile + + TrafficClientBuilder asyncClientbuilder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential asyncClientKeyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + asyncClientbuilder.credential(asyncClientKeyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential asyncClientTokenCredential = new DefaultAzureCredentialBuilder().build(); + // asyncClientbuilder.credential(asyncClientTokenCredential); + + asyncClientbuilder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + asyncClientbuilder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficAsyncClient asyncClient = asyncClientbuilder.buildAsyncClient(); + + // Get Traffic Incident Tile - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-incident-tile + // BEGIN: com.azure.maps.traffic.async.get_traffic_incident_tile + System.out.println("Get Traffic Incident Tile:"); + + // options + asyncClient.getTrafficIncidentTile( + new TrafficIncidentTileOptions() + .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3) + .setZoom(10).setTileIndex(new TileIndex().setX(1022).setY(680))); + + // complete + asyncClient.getTrafficIncidentTile( + new TrafficIncidentTileOptions() + .setFormat(TileFormat.PNG).setTrafficIncidentTileStyle(TrafficIncidentTileStyle.S3) + .setZoom(10).setTileIndex(new TileIndex().setX(175).setY(408))); + // END: com.azure.maps.traffic.async.get_traffic_incident_tile + } +} diff --git a/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentViewport.java b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentViewport.java new file mode 100644 index 000000000000..89f0f0efb7c0 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/GetTrafficIncidentViewport.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.samples; + +import java.io.IOException; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.models.GeoBoundingBox; +import com.azure.maps.traffic.TrafficAsyncClient; +import com.azure.maps.traffic.TrafficClient; +import com.azure.maps.traffic.TrafficClientBuilder; +import com.azure.maps.traffic.models.TrafficIncidentViewportOptions; + +public class GetTrafficIncidentViewport { + public static void main(String[] args) throws IOException { + TrafficClientBuilder builder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + builder.credential(keyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); + // builder.credential(tokenCredential); + + builder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficClient client = builder.buildClient(); + + // Get Traffic Incident Viewport - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-incident-viewport + // BEGIN: com.azure.maps.traffic.sync.get_traffic_incident_viewport + System.out.println("Get Traffic Incident Viewport:"); + + // options + client.getTrafficIncidentViewport( + new TrafficIncidentViewportOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setOverviewZoom(2)); + + // complete + client.getTrafficIncidentViewport( + new TrafficIncidentViewportOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setOverviewZoom(2).setCopyright(true)); + // END: com.azure.maps.traffic.sync.get_traffic_incident_viewport + + TrafficClientBuilder asyncClientbuilder = new TrafficClientBuilder(); + + // Authenticates using subscription key + AzureKeyCredential asyncClientKeyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + asyncClientbuilder.credential(asyncClientKeyCredential); + + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + // DefaultAzureCredential asyncClientTokenCredential = new DefaultAzureCredentialBuilder().build(); + // asyncClientbuilder.credential(asyncClientTokenCredential); + + asyncClientbuilder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + asyncClientbuilder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + TrafficAsyncClient asyncClient = asyncClientbuilder.buildAsyncClient(); + + // Get Traffic Incident Viewport - + // https://docs.microsoft.com/en-us/rest/api/maps/traffic/get-traffic-incident-viewport + // BEGIN: com.azure.maps.traffic.async.get_traffic_incident_viewport + System.out.println("Get Traffic Incident Viewport:"); + + // options + asyncClient.getTrafficIncidentViewport( + new TrafficIncidentViewportOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setOverviewZoom(2)); + + // complete + asyncClient.getTrafficIncidentViewport( + new TrafficIncidentViewportOptions() + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2).setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setOverviewZoom(2).setCopyright(true)); + // END: com.azure.maps.traffic.async.get_traffic_incident_viewport + } +} diff --git a/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/TrafficSample.java b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/TrafficSample.java new file mode 100644 index 000000000000..785db0c62864 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/samples/java/com/azure/maps/traffic/samples/TrafficSample.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic.samples; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.identity.DefaultAzureCredential; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.maps.traffic.TrafficAsyncClient; +import com.azure.maps.traffic.TrafficClient; +import com.azure.maps.traffic.TrafficClientBuilder; + +public class TrafficSample { + public TrafficClient createMapsSyncClientUsingAzureKeyCredential() { + // BEGIN: com.azure.maps.traffic.sync.builder.key.instantiation + // Authenticates using subscription key + AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + + // Creates a builder + TrafficClientBuilder builder = new TrafficClientBuilder(); + builder.credential(keyCredential); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + + // Builds the client + TrafficClient client = builder.buildClient(); + // END: com.azure.maps.traffic.sync.builder.key.instantiation + + return client; + } + + public TrafficClient createMapsSyncClientUsingAzureADCredential() { + // BEGIN: com.azure.maps.traffic.sync.builder.ad.instantiation + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); + + // Creates a builder + TrafficClientBuilder builder = new TrafficClientBuilder(); + builder.credential(tokenCredential); + builder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + + // Builds a client + TrafficClient client = builder.buildClient(); + // END: com.azure.maps.traffic.sync.builder.ad.instantiation + + return client; + } + + public TrafficAsyncClient createMapsTrafficAsyncClientUsingAzureKeyCredential() { + // BEGIN: com.azure.maps.traffic.async.builder.key.instantiation + // Authenticates using subscription key + AzureKeyCredential keyCredential = new AzureKeyCredential(System.getenv("SUBSCRIPTION_KEY")); + + // Creates a builder + TrafficClientBuilder builder = new TrafficClientBuilder(); + builder.credential(keyCredential); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + + // Builds the client + TrafficAsyncClient client = builder.buildAsyncClient(); + // END: com.azure.maps.traffic.async.builder.key.instantiation + + return client; + } + + public TrafficAsyncClient createMapsTrafficAsyncClientUsingAzureADCredential() { + // BEGIN: com.azure.maps.traffic.async.builder.ad.instantiation + // Authenticates using Azure AD building a default credential + // This will look for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET env variables + DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); + + // Creates a builder + TrafficClientBuilder builder = new TrafficClientBuilder(); + builder.credential(tokenCredential); + builder.trafficClientId(System.getenv("MAPS_CLIENT_ID")); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + + // Builds a client + TrafficAsyncClient client = builder.buildAsyncClient(); + // END: com.azure.maps.traffic.async.builder.ad.instantiation + + return client; + } +} diff --git a/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TestUtils.java b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TestUtils.java new file mode 100644 index 000000000000..b0792eb29246 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TestUtils.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic; + +import com.azure.core.http.HttpClient; +import com.azure.core.test.TestProxyTestBase; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import com.azure.json.ReadValueCallback; +import com.azure.maps.traffic.models.TrafficFlowSegmentData; +import com.azure.maps.traffic.models.TrafficIncidentDetail; +import com.azure.maps.traffic.models.TrafficIncidentViewport; +import org.junit.jupiter.params.provider.Arguments; + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.time.Duration; +import java.util.Arrays; +import java.util.stream.Stream; + +public class TestUtils { + public static final Duration DEFAULT_POLL_INTERVAL = Duration.ofSeconds(30); + + static TrafficFlowSegmentData getExpectedTrafficFlowSegment() { + return deserialize(TrafficFlowSegmentData::fromJson, "trafficflowsegment.json"); + } + + static TrafficIncidentDetail getExpectedTrafficIncidentDetail() { + return deserialize(TrafficIncidentDetail::fromJson, "trafficincidentdetail.json"); + } + + static TrafficIncidentViewport getExpectedTrafficIncidentViewport() { + return deserialize(TrafficIncidentViewport::fromJson, "trafficincidentviewport.json"); + } + + private static T deserialize(ReadValueCallback deserializer, String resourceName) { + try (JsonReader jsonReader = JsonProviders.createReader(ClassLoader.getSystemResourceAsStream(resourceName))) { + return deserializer.read(jsonReader); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + /** + * Returns a stream of arguments that includes all combinations of eligible {@link HttpClient HttpClients} and + * service versions that should be tested. + * + * @return A stream of HttpClient and service version combinations to test. + */ + public static Stream getTestParameters() { + return TestProxyTestBase.getHttpClients() + .flatMap(httpClient -> Arrays.stream(TrafficServiceVersion.values()) + .map(serviceVersion -> Arguments.of(httpClient, serviceVersion))); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficAsyncClientTest.java b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficAsyncClientTest.java new file mode 100644 index 000000000000..eb7f14ca5444 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficAsyncClientTest.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpClient; +import com.azure.core.models.GeoBoundingBox; +import com.azure.core.models.GeoPosition; +import com.azure.maps.traffic.models.IncidentDetailStyle; +import com.azure.maps.traffic.models.IncidentGeometryType; +import com.azure.maps.traffic.models.ProjectionStandard; +import com.azure.maps.traffic.models.SpeedUnit; +import com.azure.maps.traffic.models.TileFormat; +import com.azure.maps.traffic.models.TileIndex; +import com.azure.maps.traffic.models.TrafficFlowSegmentOptions; +import com.azure.maps.traffic.models.TrafficFlowSegmentStyle; +import com.azure.maps.traffic.models.TrafficFlowTileOptions; +import com.azure.maps.traffic.models.TrafficFlowTileStyle; +import com.azure.maps.traffic.models.TrafficIncidentDetailOptions; +import com.azure.maps.traffic.models.TrafficIncidentViewportOptions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import reactor.test.StepVerifier; + +import java.time.Duration; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class TrafficAsyncClientTest extends TrafficClientTestBase { + private static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]"; + private static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(30); + + private TrafficAsyncClient getTrafficAsyncClient(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + return getTrafficAsyncClientBuilder(httpClient, serviceVersion).buildAsyncClient(); + } + + // Test async get traffic flow tile + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncGetTrafficFlowTile(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficFlowTileOptions trafficFlowTileOptions = new TrafficFlowTileOptions().setZoom(12) + .setFormat(TileFormat.PNG) + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY) + .setTileIndex(new TileIndex().setX(50).setY(50)); + StepVerifier.create(client.getTrafficFlowTile(trafficFlowTileOptions)) + .assertNext(actualResults -> validateGetTrafficFlowTile(actualResults.toBytes())) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + } + + // Test async get traffic flow tile with response + // Case 1: 200 + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncGetTrafficFlowTileWithResponse(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficFlowTileOptions trafficFlowTileOptions = new TrafficFlowTileOptions().setZoom(12) + .setFormat(TileFormat.PNG) + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY) + .setTileIndex(new TileIndex().setX(50).setY(50)); + StepVerifier.create(client.getTrafficFlowTileWithResponse(trafficFlowTileOptions)) + .assertNext(TrafficClientTestBase::validateGetTrafficFlowTileWithResponse) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + } + + // Case 2: 400 invalid input + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncInvalidGetTrafficFlowTileWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficFlowTileOptions trafficFlowTileOptions = new TrafficFlowTileOptions().setZoom(-1000) + .setFormat(TileFormat.PNG) + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY) + .setTileIndex(new TileIndex().setX(2044).setY(1360)); + StepVerifier.create(client.getTrafficFlowTileWithResponse(trafficFlowTileOptions)).expectErrorSatisfies(ex -> { + final HttpResponseException httpResponseException = (HttpResponseException) ex; + assertEquals(400, httpResponseException.getResponse().getStatusCode()); + }).verify(DEFAULT_TIMEOUT); + } + + // Test async get traffic flow segment + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncGetTrafficFlowSegment(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficFlowSegmentOptions trafficFlowSegmentOptions + = new TrafficFlowSegmentOptions().setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE) + .setOpenLr(false) + .setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072)) + .setThickness(2) + .setUnit(SpeedUnit.MPH); + StepVerifier.create(client.getTrafficFlowSegment(trafficFlowSegmentOptions)) + .assertNext(actualResults -> validateGetTrafficFlowSegment(TestUtils.getExpectedTrafficFlowSegment(), + actualResults)) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + } + + // Test async get traffic flow segment with response + // Case 1: 200 + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncGetTrafficFlowSegmentWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficFlowSegmentOptions trafficFlowSegmentOptions + = new TrafficFlowSegmentOptions().setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE) + .setOpenLr(false) + .setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072)) + .setThickness(2) + .setUnit(SpeedUnit.MPH); + StepVerifier.create(client.getTrafficFlowSegmentWithResponse(trafficFlowSegmentOptions)) + .assertNext(response -> validateGetTrafficFlowSegmentWithResponse(TestUtils.getExpectedTrafficFlowSegment(), + response)) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + } + + // Case 2: 400 invalid input + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncInvalidGetTrafficFlowSegmentWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficFlowSegmentOptions trafficFlowSegmentOptions + = new TrafficFlowSegmentOptions().setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE) + .setOpenLr(false) + .setZoom(-1000) + .setCoordinates(new GeoPosition(45, 45)) + .setThickness(2) + .setUnit(SpeedUnit.MPH); + StepVerifier.create(client.getTrafficFlowSegmentWithResponse(trafficFlowSegmentOptions)) + .expectErrorSatisfies(ex -> { + final HttpResponseException httpResponseException = (HttpResponseException) ex; + assertEquals(400, httpResponseException.getResponse().getStatusCode()); + }) + .verify(DEFAULT_TIMEOUT); + } + + // Test async get traffic incident detail empty poi + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncGetTrafficIncidentDetail(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficIncidentDetailOptions trafficIncidentDetailOptions = new TrafficIncidentDetailOptions(); + trafficIncidentDetailOptions.setIncidentDetailStyle(IncidentDetailStyle.S3) + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(11) + .setTrafficmodelId("1335294634919") + .setExpandCluster(false) + .setOriginalPosition(false) + .setIncidentGeometryType(IncidentGeometryType.ORIGINAL) + .setLanguage("en") + .setProjectionStandard(ProjectionStandard.EPSG900913); + StepVerifier.create(client.getTrafficIncidentDetail(trafficIncidentDetailOptions)) + .assertNext(actualResults -> validateTrafficIncidentDetail(TestUtils.getExpectedTrafficIncidentDetail(), + actualResults)) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + } + + // Test async get traffic incident detail empty poi with response + // Case 1: 200 + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncGetTrafficIncidentDetailWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficIncidentDetailOptions trafficIncidentDetailOptions = new TrafficIncidentDetailOptions(); + trafficIncidentDetailOptions.setIncidentDetailStyle(IncidentDetailStyle.S3) + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(11) + .setTrafficmodelId("1335294634919") + .setExpandCluster(false) + .setOriginalPosition(false) + .setIncidentGeometryType(IncidentGeometryType.ORIGINAL) + .setLanguage("en") + .setProjectionStandard(ProjectionStandard.EPSG900913); + StepVerifier.create(client.getTrafficIncidentDetailWithResponse(trafficIncidentDetailOptions)) + .assertNext(response -> validateTrafficIncidentDetailWithResponse( + TestUtils.getExpectedTrafficIncidentDetail(), response)) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + } + + // Case 2: 400 invalid input + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncInvalidGetTrafficIncidentDetailWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficIncidentDetailOptions trafficIncidentDetailOptions = new TrafficIncidentDetailOptions(); + trafficIncidentDetailOptions.setIncidentDetailStyle(IncidentDetailStyle.S3) + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(-1000) + .setTrafficmodelId("1335294634919") + .setExpandCluster(false) + .setOriginalPosition(false) + .setIncidentGeometryType(IncidentGeometryType.ORIGINAL) + .setLanguage("en") + .setProjectionStandard(ProjectionStandard.EPSG900913); + StepVerifier.create(client.getTrafficIncidentDetailWithResponse(trafficIncidentDetailOptions)) + .expectErrorSatisfies(ex -> { + final HttpResponseException httpResponseException = (HttpResponseException) ex; + assertEquals(400, httpResponseException.getResponse().getStatusCode()); + }) + .verify(DEFAULT_TIMEOUT); + } + + // Test async get traffic incident viewport + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncGetTrafficIncidentViewport(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficIncidentViewportOptions trafficIncidentViewportOptions + = new TrafficIncidentViewportOptions().setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2) + .setOverviewZoom(2) + .setCopyright(true); + StepVerifier.create(client.getTrafficIncidentViewport(trafficIncidentViewportOptions)) + .assertNext(actualResults -> validateTrafficIncidentViewport(TestUtils.getExpectedTrafficIncidentViewport(), + actualResults)) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + } + + // Test async get traffic incident viewport with response + // Case 1: 200 + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncGetTrafficIncidentViewportWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficIncidentViewportOptions trafficIncidentViewportOptions + = new TrafficIncidentViewportOptions().setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2) + .setOverviewZoom(2) + .setCopyright(true); + StepVerifier.create(client.getTrafficIncidentViewportWithResponse(trafficIncidentViewportOptions)) + .assertNext(response -> validateTrafficIncidentViewportWithResponse( + TestUtils.getExpectedTrafficIncidentViewport(), response)) + .expectComplete() + .verify(DEFAULT_TIMEOUT); + } + + // Case 2: 400 invalid input + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testAsyncInvalidGetTrafficIncidentViewportWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + TrafficAsyncClient client = getTrafficAsyncClient(httpClient, serviceVersion); + TrafficIncidentViewportOptions trafficIncidentViewportOptions + = new TrafficIncidentViewportOptions().setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(-1000) + .setOverviewZoom(2) + .setCopyright(true); + StepVerifier.create(client.getTrafficIncidentViewportWithResponse(trafficIncidentViewportOptions)) + .expectErrorSatisfies(ex -> { + final HttpResponseException httpResponseException = (HttpResponseException) ex; + assertEquals(400, httpResponseException.getResponse().getStatusCode()); + }) + .verify(DEFAULT_TIMEOUT); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientBuilderTest.java b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientBuilderTest.java new file mode 100644 index 000000000000..1ff7bd676469 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientBuilderTest.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic; + +import com.azure.core.test.utils.MockTokenCredential; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class TrafficClientBuilderTest { + // Test for null RenderClientId, the client ID value + @Test + public void missingMapsClientId() { + assertThrows(NullPointerException.class, () -> new TrafficClientBuilder().trafficClientId(null)); + } + + // Test for missing endpoint + @Test + public void missingEndpoint() { + assertThrows(NullPointerException.class, () -> new TrafficClientBuilder().endpoint(null)); + } + + // Test for missing configuration + @Test + public void missingConfiguration() { + assertThrows(NullPointerException.class, () -> new TrafficClientBuilder().configuration(null)); + } + + // Test for missing http log options + @Test + public void missingHttpLogOptions() { + assertThrows(NullPointerException.class, () -> new TrafficClientBuilder().httpLogOptions(null)); + } + + // Test for missing retry policy + @Test + public void missingRetryPolicy() { + assertThrows(NullPointerException.class, () -> new TrafficClientBuilder().retryPolicy(null)); + } + + // Test for missing client options + @Test + public void missingClientOptions() { + assertThrows(NullPointerException.class, () -> new TrafficClientBuilder().clientOptions(null)); + } + + // Test for missing add policy + @Test + public void missingAddPolicy() { + assertThrows(NullPointerException.class, () -> new TrafficClientBuilder().addPolicy(null)); + } + + // Test for null map id, valid token credential + @Test + public void missingMapsClientIdValidTokenCredential() { + assertThrows(IllegalArgumentException.class, + () -> new TrafficClientBuilder().credential(new MockTokenCredential()).buildClient()); + } + + // Test for null key credential and null token credential despite valid mapsClientId + @Test + public void missingCredentials() { + assertThrows(IllegalArgumentException.class, + () -> new TrafficClientBuilder().trafficClientId("mapsClientId").buildClient()); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientTest.java b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientTest.java new file mode 100644 index 000000000000..625d23daf92d --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientTest.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpClient; +import com.azure.core.models.GeoBoundingBox; +import com.azure.core.models.GeoPosition; +import com.azure.maps.traffic.models.IncidentDetailStyle; +import com.azure.maps.traffic.models.IncidentGeometryType; +import com.azure.maps.traffic.models.ProjectionStandard; +import com.azure.maps.traffic.models.SpeedUnit; +import com.azure.maps.traffic.models.TileFormat; +import com.azure.maps.traffic.models.TileIndex; +import com.azure.maps.traffic.models.TrafficFlowSegmentData; +import com.azure.maps.traffic.models.TrafficFlowSegmentOptions; +import com.azure.maps.traffic.models.TrafficFlowSegmentStyle; +import com.azure.maps.traffic.models.TrafficFlowTileOptions; +import com.azure.maps.traffic.models.TrafficFlowTileStyle; +import com.azure.maps.traffic.models.TrafficIncidentDetail; +import com.azure.maps.traffic.models.TrafficIncidentDetailOptions; +import com.azure.maps.traffic.models.TrafficIncidentTileOptions; +import com.azure.maps.traffic.models.TrafficIncidentTileStyle; +import com.azure.maps.traffic.models.TrafficIncidentViewport; +import com.azure.maps.traffic.models.TrafficIncidentViewportOptions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class TrafficClientTest extends TrafficClientTestBase { + private TrafficClient client; + private static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]"; + + private TrafficClient getTrafficClient(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + return getTrafficAsyncClientBuilder(httpClient, serviceVersion).buildClient(); + } + + // Test get traffic flow tile + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficFlowTile(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficFlowTileOptions trafficFlowTileOptions = new TrafficFlowTileOptions(); + trafficFlowTileOptions.setZoom(12) + .setFormat(TileFormat.PNG) + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY) + .setTileIndex(new TileIndex().setX(2044).setY(1360)); + validateGetTrafficFlowTile(client.getTrafficFlowTile(trafficFlowTileOptions).toBytes()); + } + + // Test get traffic flow tile with response + // Case 1: 200 + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficFlowTileWithResponse(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficFlowTileOptions trafficFlowTileOptions = new TrafficFlowTileOptions().setZoom(12) + .setFormat(TileFormat.PNG) + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY) + .setTileIndex(new TileIndex().setX(2044).setY(1360)); + validateGetTrafficFlowTileWithResponse(client.getTrafficFlowTileWithResponse(trafficFlowTileOptions, null)); + } + + // Case 2: Response 400, incorrect input + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testInvalidGetTrafficFlowTileWithResponse(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficFlowTileOptions trafficFlowTileOptions = new TrafficFlowTileOptions().setZoom(-1000) + .setFormat(TileFormat.PNG) + .setTrafficFlowTileStyle(TrafficFlowTileStyle.RELATIVE_DELAY) + .setTileIndex(new TileIndex().setX(2044).setY(1360)); + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + () -> client.getTrafficFlowTileWithResponse(trafficFlowTileOptions, null)); + assertEquals(400, httpResponseException.getResponse().getStatusCode()); + } + + // Test get traffic flow segment + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficFlowSegment(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficFlowSegmentOptions trafficFlowSegmentOptions = new TrafficFlowSegmentOptions(); + trafficFlowSegmentOptions.setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE) + .setOpenLr(false) + .setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072)) + .setThickness(2) + .setUnit(SpeedUnit.MPH); + TrafficFlowSegmentData actualResult = client.getTrafficFlowSegment(trafficFlowSegmentOptions); + TrafficFlowSegmentData expectedResult = TestUtils.getExpectedTrafficFlowSegment(); + validateGetTrafficFlowSegment(actualResult, expectedResult); + } + + // Test get traffic flow segment with response + // Case 1: 200 + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficFlowSegmentWithResponse(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficFlowSegmentOptions trafficFlowSegmentOptions = new TrafficFlowSegmentOptions(); + trafficFlowSegmentOptions.setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE) + .setOpenLr(false) + .setZoom(10) + .setCoordinates(new GeoPosition(4.84239, 52.41072)) + .setThickness(2) + .setUnit(SpeedUnit.MPH); + validateGetTrafficFlowSegmentWithResponse(TestUtils.getExpectedTrafficFlowSegment(), + client.getTrafficFlowSegmentWithResponse(trafficFlowSegmentOptions, null)); + } + + // Case 2: Response 400, incorrect input + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testInvalidGetTrafficFlowSegmentWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficFlowSegmentOptions trafficFlowSegmentOptions + = new TrafficFlowSegmentOptions().setTrafficFlowSegmentStyle(TrafficFlowSegmentStyle.ABSOLUTE) + .setOpenLr(false) + .setZoom(-1000) + .setCoordinates(new GeoPosition(45, 45)) + .setThickness(2) + .setUnit(SpeedUnit.MPH); + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + () -> client.getTrafficFlowSegmentWithResponse(trafficFlowSegmentOptions, null)); + assertEquals(400, httpResponseException.getResponse().getStatusCode()); + } + + // Test get traffic incident tile + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficIncidentTile(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficIncidentTileOptions trafficIncidentTileOptions = new TrafficIncidentTileOptions(); + trafficIncidentTileOptions.setFormat(TileFormat.PNG) + .setTrafficIncidentTileStyle(TrafficIncidentTileStyle.NIGHT) + .setTileIndex(new TileIndex().setX(175).setY(408)) + .setZoom(10); + validateGetTrafficIncidentTile(client.getTrafficIncidentTile(trafficIncidentTileOptions).toBytes()); + } + + // Test get traffic incident tile with response + // Case 1: 200 + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficIncidentTileWithResponse(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficIncidentTileOptions trafficIncidentTileOptions = new TrafficIncidentTileOptions(); + trafficIncidentTileOptions.setFormat(TileFormat.PNG) + .setTrafficIncidentTileStyle(TrafficIncidentTileStyle.NIGHT) + .setTileIndex(new TileIndex().setX(175).setY(408)) + .setZoom(10); + validateGetTrafficIncidentTileWithResponse( + client.getTrafficIncidentTileWithResponse(trafficIncidentTileOptions, null)); + } + + // Case 2: Response 400, incorrect input + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testInvalidGetTrafficIncidentTileWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficIncidentTileOptions trafficIncidentTileOptions + = new TrafficIncidentTileOptions().setFormat(TileFormat.PNG) + .setTrafficIncidentTileStyle(TrafficIncidentTileStyle.NIGHT) + .setTileIndex(new TileIndex().setX(175).setY(408)) + .setZoom(-1000); + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + () -> client.getTrafficIncidentTileWithResponse(trafficIncidentTileOptions, null)); + assertEquals(400, httpResponseException.getResponse().getStatusCode()); + } + + // Test get traffic incident detail empty poi + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficIncidentDetail(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficIncidentDetailOptions trafficIncidentDetailOptions = new TrafficIncidentDetailOptions(); + trafficIncidentDetailOptions.setIncidentDetailStyle(IncidentDetailStyle.S3) + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(11) + .setTrafficmodelId("1335294634919") + .setExpandCluster(false) + .setOriginalPosition(false) + .setIncidentGeometryType(IncidentGeometryType.ORIGINAL) + .setLanguage("en") + .setProjectionStandard(ProjectionStandard.EPSG900913); + TrafficIncidentDetail actualResult = client.getTrafficIncidentDetail(trafficIncidentDetailOptions); + TrafficIncidentDetail expectedResult = TestUtils.getExpectedTrafficIncidentDetail(); + validateTrafficIncidentDetail(actualResult, expectedResult); + } + + // Test get traffic incident detail empty poi with response + // Case 1: 200 + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficIncidentDetailWithResponse(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficIncidentDetailOptions trafficIncidentDetailOptions = new TrafficIncidentDetailOptions(); + trafficIncidentDetailOptions.setIncidentDetailStyle(IncidentDetailStyle.S3) + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(11) + .setTrafficmodelId("1335294634919") + .setExpandCluster(false) + .setOriginalPosition(false) + .setIncidentGeometryType(IncidentGeometryType.ORIGINAL) + .setLanguage("en") + .setProjectionStandard(ProjectionStandard.EPSG900913); + validateTrafficIncidentDetailWithResponse(TestUtils.getExpectedTrafficIncidentDetail(), + client.getTrafficIncidentDetailWithResponse(trafficIncidentDetailOptions, null)); + } + + // Case 2: Response 400, incorrect input + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testInvalidGetTrafficIncidentDetailWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficIncidentDetailOptions trafficIncidentDetailOptions + = new TrafficIncidentDetailOptions().setIncidentDetailStyle(IncidentDetailStyle.S3) + .setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(-1000) + .setTrafficmodelId("1335294634919") + .setExpandCluster(false) + .setOriginalPosition(false) + .setIncidentGeometryType(IncidentGeometryType.ORIGINAL) + .setLanguage("en") + .setProjectionStandard(ProjectionStandard.EPSG900913); + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + () -> client.getTrafficIncidentDetailWithResponse(trafficIncidentDetailOptions, null)); + assertEquals(400, httpResponseException.getResponse().getStatusCode()); + } + + // Test get traffic incident viewport + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficIncidentViewport(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficIncidentViewportOptions trafficIncidentViewportOptions = new TrafficIncidentViewportOptions(); + trafficIncidentViewportOptions.setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2) + .setOverviewZoom(2) + .setCopyright(true); + TrafficIncidentViewport actualResult = client.getTrafficIncidentViewport(trafficIncidentViewportOptions); + TrafficIncidentViewport expectedResult = TestUtils.getExpectedTrafficIncidentViewport(); + validateTrafficIncidentViewport(actualResult, expectedResult); + } + + // Test get traffic incident viewport with response + // Case 1: 200 + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testGetTrafficIncidentViewportWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficIncidentViewportOptions trafficIncidentViewportOptions = new TrafficIncidentViewportOptions(); + trafficIncidentViewportOptions.setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(2) + .setOverviewZoom(2) + .setCopyright(true); + validateTrafficIncidentViewportWithResponse(TestUtils.getExpectedTrafficIncidentViewport(), + client.getTrafficIncidentViewportWithResponse(trafficIncidentViewportOptions, null)); + } + + // Case 2: Response 400, incorrect input + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.maps.traffic.TestUtils#getTestParameters") + public void testInvalidGetTrafficIncidentViewportWithResponse(HttpClient httpClient, + TrafficServiceVersion serviceVersion) { + client = getTrafficClient(httpClient, serviceVersion); + TrafficIncidentViewportOptions trafficIncidentViewportOptions + = new TrafficIncidentViewportOptions().setBoundingBox(new GeoBoundingBox(45, 45, 45, 45)) + .setOverview(new GeoBoundingBox(45, 45, 45, 45)) + .setBoundingZoom(-1000) + .setOverviewZoom(2) + .setCopyright(true); + final HttpResponseException httpResponseException = assertThrows(HttpResponseException.class, + () -> client.getTrafficIncidentViewportWithResponse(trafficIncidentViewportOptions, null)); + assertEquals(400, httpResponseException.getResponse().getStatusCode()); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientTestBase.java b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientTestBase.java new file mode 100644 index 000000000000..5ca243da4b08 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/test/java/com/azure/maps/traffic/TrafficClientTestBase.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.maps.traffic; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.policy.ExponentialBackoff; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.rest.Response; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.models.CustomMatcher; +import com.azure.core.test.models.TestProxyRequestMatcher; +import com.azure.core.test.models.TestProxySanitizer; +import com.azure.core.test.models.TestProxySanitizerType; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.AzurePowerShellCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.maps.traffic.models.TrafficFlowSegmentData; +import com.azure.maps.traffic.models.TrafficIncidentDetail; +import com.azure.maps.traffic.models.TrafficIncidentViewport; + +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class TrafficClientTestBase extends TestProxyTestBase { + TrafficClientBuilder getTrafficAsyncClientBuilder(HttpClient httpClient, TrafficServiceVersion serviceVersion) { + TrafficClientBuilder builder + = modifyBuilder(httpClient, new TrafficClientBuilder()).serviceVersion(serviceVersion); + + if (interceptorManager.isPlaybackMode()) { + builder.endpoint("https://localhost:8080"); + } + + return builder; + } + + TrafficClientBuilder modifyBuilder(HttpClient httpClient, TrafficClientBuilder builder) { + if (interceptorManager.isRecordMode() || interceptorManager.isPlaybackMode()) { + interceptorManager.addSanitizers(Collections.singletonList( + new TestProxySanitizer("subscription-key", ".+", "REDACTED", TestProxySanitizerType.HEADER))); + } + + if (interceptorManager.isPlaybackMode()) { + List customMatchers = new ArrayList<>(); + + customMatchers + .add(new CustomMatcher().setHeadersKeyOnlyMatch(Collections.singletonList("subscription-key"))); + interceptorManager.addMatchers(customMatchers); + } + + builder.retryPolicy(new RetryPolicy(new ExponentialBackoff(5, Duration.ofSeconds(2), Duration.ofSeconds(16)))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + + if (interceptorManager.isRecordMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()) + .trafficClientId(Configuration.getGlobalConfiguration().get("MAPS_CLIENT_ID")); + } else if (interceptorManager.isPlaybackMode()) { + builder.credential(new MockTokenCredential()).trafficClientId("trafficClientId"); + } else { + builder.credential(new AzurePowerShellCredentialBuilder().build()) + .trafficClientId(Configuration.getGlobalConfiguration().get("MAPS_CLIENT_ID")); + } + + return builder + .httpClient(interceptorManager.isPlaybackMode() ? interceptorManager.getPlaybackClient() : httpClient); + } + + static void validateGetTrafficFlowTile(byte[] actual) { + assertNotNull(actual); + assertTrue(actual.length > 0); + } + + static void validateGetTrafficFlowTileWithResponse(Response response) { + assertNotNull(response); + assertEquals(200, response.getStatusCode()); + validateGetTrafficFlowTile(response.getValue().toBytes()); + } + + static void validateGetTrafficFlowSegment(TrafficFlowSegmentData expected, TrafficFlowSegmentData actual) { + assertNotNull(actual); + assertNotNull(expected); + assertEquals(expected.getConfidence(), actual.getConfidence()); + } + + static void validateGetTrafficFlowSegmentWithResponse(TrafficFlowSegmentData expected, + Response response) { + assertNotNull(response); + assertEquals(200, response.getStatusCode()); + validateGetTrafficFlowSegment(expected, response.getValue()); + } + + static void validateGetTrafficIncidentTile(byte[] actual) { + assertNotNull(actual); + assertTrue(actual.length > 0); + } + + static void validateGetTrafficIncidentTileWithResponse(Response response) { + assertNotNull(response); + assertEquals(200, response.getStatusCode()); + validateGetTrafficIncidentTile(response.getValue().toBytes()); + } + + static void validateTrafficIncidentDetail(TrafficIncidentDetail expected, TrafficIncidentDetail actual) { + assertNotNull(actual); + assertNotNull(expected); + assertEquals(expected.getPointsOfInterest().size(), actual.getPointsOfInterest().size()); + } + + static void validateTrafficIncidentDetailWithResponse(TrafficIncidentDetail expected, + Response response) { + assertNotNull(response); + assertEquals(200, response.getStatusCode()); + validateTrafficIncidentDetail(expected, response.getValue()); + } + + static void validateTrafficIncidentViewport(TrafficIncidentViewport expected, TrafficIncidentViewport actual) { + assertNotNull(actual); + assertNotNull(expected); + assertEquals(expected.getViewportResponse().getCopyrightInformation(), + actual.getViewportResponse().getCopyrightInformation()); + assertEquals(expected.getViewportResponse().getMaps(), actual.getViewportResponse().getMaps()); + } + + static void validateTrafficIncidentViewportWithResponse(TrafficIncidentViewport expected, + Response response) { + assertNotNull(response); + assertEquals(200, response.getStatusCode()); + validateTrafficIncidentViewport(expected, response.getValue()); + } +} diff --git a/sdk/maps/azure-maps-traffic/src/test/resources/trafficflowsegment.json b/sdk/maps/azure-maps-traffic/src/test/resources/trafficflowsegment.json new file mode 100644 index 000000000000..9827c65058e7 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/test/resources/trafficflowsegment.json @@ -0,0 +1,424 @@ +{ + "flowSegmentData": { + "frc": "FRC3", + "currentSpeed": 35, + "freeFlowSpeed": 35, + "currentTravelTime": 284, + "freeFlowTravelTime": 284, + "confidence": 1, + "roadClosure": false, + "coordinates": { + "coordinate": [ + { + "latitude": 52.401060115527073, + "longitude": 4.848285307729753 + }, + { + "latitude": 52.401152528459647, + "longitude": 4.848087148825783 + }, + { + "latitude": 52.401256696575246, + "longitude": 4.847863365249594 + }, + { + "latitude": 52.401362950887851, + "longitude": 4.847622530472677 + }, + { + "latitude": 52.401528798342667, + "longitude": 4.847267798461701 + }, + { + "latitude": 52.401683765681426, + "longitude": 4.846926049545772 + }, + { + "latitude": 52.401812659761475, + "longitude": 4.846643569818781 + }, + { + "latitude": 52.401908400741831, + "longitude": 4.846439810920202 + }, + { + "latitude": 52.401976141107141, + "longitude": 4.846294695717887 + }, + { + "latitude": 52.402081596129868, + "longitude": 4.846048612871897 + }, + { + "latitude": 52.402264448746088, + "longitude": 4.845640303498470 + }, + { + "latitude": 52.402478665044107, + "longitude": 4.845168428493878 + }, + { + "latitude": 52.402628946117673, + "longitude": 4.844842663719987 + }, + { + "latitude": 52.402809136587123, + "longitude": 4.844439236787991 + }, + { + "latitude": 52.402932253244302, + "longitude": 4.844174009922199 + }, + { + "latitude": 52.403050577740352, + "longitude": 4.843912712842325 + }, + { + "latitude": 52.403162260133605, + "longitude": 4.843660426779905 + }, + { + "latitude": 52.403413165311697, + "longitude": 4.843089593397906 + }, + { + "latitude": 52.403459070477950, + "longitude": 4.842925554700628 + }, + { + "latitude": 52.403575873590682, + "longitude": 4.842667461908860 + }, + { + "latitude": 52.403713600972800, + "longitude": 4.842360173750080 + }, + { + "latitude": 52.403929852729135, + "longitude": 4.841871658162717 + }, + { + "latitude": 52.404017866762651, + "longitude": 4.841672650040806 + }, + { + "latitude": 52.405073041632214, + "longitude": 4.839314278973688 + }, + { + "latitude": 52.405282375233433, + "longitude": 4.838839216742826 + }, + { + "latitude": 52.406689451160517, + "longitude": 4.835699806172045 + }, + { + "latitude": 52.406740266420009, + "longitude": 4.835580759234404 + }, + { + "latitude": 52.406812229951164, + "longitude": 4.835428154097428 + }, + { + "latitude": 52.407142125753928, + "longitude": 4.834701316791666 + }, + { + "latitude": 52.407306082059534, + "longitude": 4.834353547477946 + }, + { + "latitude": 52.408387942046303, + "longitude": 4.831900039157546 + }, + { + "latitude": 52.408924386789131, + "longitude": 4.830695070815125 + }, + { + "latitude": 52.409511346616995, + "longitude": 4.829408980222979 + }, + { + "latitude": 52.409662635899501, + "longitude": 4.829089377756191 + }, + { + "latitude": 52.409862569976802, + "longitude": 4.828690996933602 + }, + { + "latitude": 52.410002903085349, + "longitude": 4.828463208400535 + }, + { + "latitude": 52.410145480500809, + "longitude": 4.828221025353741 + }, + { + "latitude": 52.410250669628532, + "longitude": 4.828025537790097 + }, + { + "latitude": 52.410421860533226, + "longitude": 4.827764667093220 + }, + { + "latitude": 52.410548443186379, + "longitude": 4.827590586071864 + }, + { + "latitude": 52.410814175216970, + "longitude": 4.827254071037487 + }, + { + "latitude": 52.410916200845548, + "longitude": 4.827136858273775 + }, + { + "latitude": 52.411162673338652, + "longitude": 4.826857978863643 + }, + { + "latitude": 52.411377982613566, + "longitude": 4.826636956364922 + }, + { + "latitude": 52.411535007724382, + "longitude": 4.826481292526267 + }, + { + "latitude": 52.411723664759023, + "longitude": 4.826299895595412 + }, + { + "latitude": 52.411957365640106, + "longitude": 4.826098549086737 + }, + { + "latitude": 52.412197157523622, + "longitude": 4.825910153351430 + }, + { + "latitude": 52.412253288487555, + "longitude": 4.825868415313579 + }, + { + "latitude": 52.412450924154960, + "longitude": 4.825719152910267 + }, + { + "latitude": 52.412719982467365, + "longitude": 4.825531361292803 + }, + { + "latitude": 52.412818238863345, + "longitude": 4.825465868101247 + }, + { + "latitude": 52.412902708891743, + "longitude": 4.825425143388600 + }, + { + "latitude": 52.412939499864613, + "longitude": 4.825403063796699 + }, + { + "latitude": 52.413093036883865, + "longitude": 4.825310933032625 + }, + { + "latitude": 52.413309043039035, + "longitude": 4.825200662697057 + }, + { + "latitude": 52.413561058927080, + "longitude": 4.825091159497504 + }, + { + "latitude": 52.413775816674757, + "longitude": 4.825019071262915 + }, + { + "latitude": 52.413993700718343, + "longitude": 4.824956200067476 + }, + { + "latitude": 52.414203406420917, + "longitude": 4.824909250480289 + }, + { + "latitude": 52.414440145137505, + "longitude": 4.824884096480616 + }, + { + "latitude": 52.414598785560102, + "longitude": 4.824869675649694 + }, + { + "latitude": 52.414773638428073, + "longitude": 4.824908705094714 + }, + { + "latitude": 52.414949603412722, + "longitude": 4.824918549790624 + }, + { + "latitude": 52.415119824450009, + "longitude": 4.824940415418098 + }, + { + "latitude": 52.415226731967863, + "longitude": 4.824961798160814 + }, + { + "latitude": 52.415403108721598, + "longitude": 4.825005540218882 + }, + { + "latitude": 52.415532895375208, + "longitude": 4.825038435134985 + }, + { + "latitude": 52.415601470745997, + "longitude": 4.825070330614437 + }, + { + "latitude": 52.415886574091587, + "longitude": 4.825162307199065 + }, + { + "latitude": 52.416025876750382, + "longitude": 4.825221777484558 + }, + { + "latitude": 52.416199080364613, + "longitude": 4.825299995421886 + }, + { + "latitude": 52.416328335795363, + "longitude": 4.825361077214012 + }, + { + "latitude": 52.416452408217005, + "longitude": 4.825423108031913 + }, + { + "latitude": 52.416516546869239, + "longitude": 4.825448006379474 + }, + { + "latitude": 52.416618643743412, + "longitude": 4.825482027957975 + }, + { + "latitude": 52.416690602236031, + "longitude": 4.825503317801036 + }, + { + "latitude": 52.416719349934674, + "longitude": 4.825508768251495 + }, + { + "latitude": 52.416735907619199, + "longitude": 4.825508768251495 + }, + { + "latitude": 52.416783375598335, + "longitude": 4.825508048876230 + }, + { + "latitude": 52.416803175258714, + "longitude": 4.825503202131273 + }, + { + "latitude": 52.416890719488123, + "longitude": 4.825477516010295 + }, + { + "latitude": 52.416928419416784, + "longitude": 4.825465241257348 + }, + { + "latitude": 52.416957814861135, + "longitude": 4.825452898303212 + }, + { + "latitude": 52.417519466027223, + "longitude": 4.825130590171426 + }, + { + "latitude": 52.417770357703610, + "longitude": 4.826176587631466 + }, + { + "latitude": 52.417797552625821, + "longitude": 4.826293748713994 + }, + { + "latitude": 52.417811047810702, + "longitude": 4.826339246637616 + }, + { + "latitude": 52.417819914632460, + "longitude": 4.826368402236369 + }, + { + "latitude": 52.417813815566817, + "longitude": 4.826351445497750 + }, + { + "latitude": 52.417786864327610, + "longitude": 4.826292076160911 + }, + { + "latitude": 52.417758956560078, + "longitude": 4.826245542614686 + }, + { + "latitude": 52.417727393897515, + "longitude": 4.826199701277517 + }, + { + "latitude": 52.417696820322810, + "longitude": 4.826167557610034 + }, + { + "latitude": 52.417651665960079, + "longitude": 4.826129130108797 + }, + { + "latitude": 52.417588289824252, + "longitude": 4.826103747003742 + }, + { + "latitude": 52.417575863983174, + "longitude": 4.826100788963231 + }, + { + "latitude": 52.417620180651639, + "longitude": 4.826107438676843 + }, + { + "latitude": 52.417630767332824, + "longitude": 4.826109362336268 + }, + { + "latitude": 52.417560753772392, + "longitude": 4.826119087275600 + }, + { + "latitude": 52.417635968618676, + "longitude": 4.826024705637309 + }, + { + "latitude": 52.417922512976190, + "longitude": 4.825998352758290 + } + ] + }, + "@version": "traffic-service-flow 1.0.061" + } +} \ No newline at end of file diff --git a/sdk/maps/azure-maps-traffic/src/test/resources/trafficincidentdetail.json b/sdk/maps/azure-maps-traffic/src/test/resources/trafficincidentdetail.json new file mode 100644 index 000000000000..a2af5707fd00 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/test/resources/trafficincidentdetail.json @@ -0,0 +1,6 @@ +{ + "tm": { + "@id": "1646798800", + "poi": [] + } +} \ No newline at end of file diff --git a/sdk/maps/azure-maps-traffic/src/test/resources/trafficincidentviewport.json b/sdk/maps/azure-maps-traffic/src/test/resources/trafficincidentviewport.json new file mode 100644 index 000000000000..d9ac188e7d35 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/src/test/resources/trafficincidentviewport.json @@ -0,0 +1,11 @@ +{ + "viewpResp": { + "trafficState": { + "@trafficAge": 38, + "@trafficModelId": "1665185200" + }, + "copyrightIds": "https://www.tomtom.com/en_gb/thirdpartyproductterms/", + "@version": "traffic-service-incidents 1.0.062", + "@maps": "world" + } +} \ No newline at end of file diff --git a/sdk/maps/azure-maps-traffic/swagger/README.md b/sdk/maps/azure-maps-traffic/swagger/README.md new file mode 100644 index 000000000000..4ecab534673c --- /dev/null +++ b/sdk/maps/azure-maps-traffic/swagger/README.md @@ -0,0 +1,90 @@ +# Azure Maps Traffic for Java + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Maps Traffic. +--- +## Getting Started + +To build the SDK for Maps Traffic, simply [Install AutoRest](https://aka.ms/autorest) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +### Setup +```ps +npm install -g autorest +``` + +### Generation + +```ps +cd +autorest +``` + +### Code generation settings + +## Java + +``` yaml +directive: + - rename-model: + from: Point + to: MapsPoint + - from: swagger-document + where: "$" + transform: > + $["securityDefinitions"] = {}; + $["security"] = []; + +title: TrafficClient +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/maps/data-plane/Traffic/stable/1.0/traffic.json +namespace: com.azure.maps.traffic +java: true +use: '@autorest/java@4.1.62' +output-folder: ../ +license-header: MICROSOFT_MIT_SMALL +payload-flattening-threshold: 0 +add-context-parameter: true +context-client-method-parameter: true +client-logger: true +generic-response-type: true +generate-client-as-impl: true +sync-methods: none +output-model: immutable +generate-sync-async-clients: false +polling: {} +models-subpackage: implementation.models +custom-types-subpackage: models +custom-types: TileFormat,TrafficFlowTileStyle,TileIndex,DelayMagnitude,IconCategory,IncidentDetailStyle,IncidentGeometryType,ProjectionStandard,SpeedUnit,TileFormat,TrafficFlowSegmentStyle,TrafficFlowTileStyle,TrafficIncidentTileStyle,TrafficIncidentPointOfInterest,TrafficFlowSegmentData,TrafficFlowSegmentDataPropertiesCoordinates,TrafficIncidentViewport,TrafficIncidentViewportResponse,TrafficState,MapsPoint,TrafficIncidentDetail +customization-class: src/main/java/TrafficCustomization.java +no-custom-headers: true +``` + +### Create definition TrafficFlowSegmentDataPropertiesCoordinates + +``` yaml +directive: + - from: traffic.json + where: $.definitions + transform: > + $.TrafficFlowSegmentDataPropertiesCoordinates = $.TrafficFlowSegmentData.properties.flowSegmentData.properties.coordinates; + delete $.TrafficFlowSegmentData.properties.flowSegmentData.properties.coordinates; + $.TrafficFlowSegmentData.properties.flowSegmentData.properties.coordinates = { "$ref": "#/definitions/TrafficFlowSegmentDataPropertiesCoordinates" }; +``` + +### Create definition TrafficIncidentViewportResponse + +``` yaml +directive: + - from: traffic.json + where: $.definitions + transform: > + $.TrafficIncidentViewportResponse = $.TrafficIncidentViewport.properties.viewpResp; + delete $.TrafficIncidentViewport.properties.viewpResp; + $.TrafficIncidentViewport.properties.viewpResp = { "$ref": "#/definitions/TrafficIncidentViewportResponse" }; +``` diff --git a/sdk/maps/azure-maps-traffic/swagger/pom.xml b/sdk/maps/azure-maps-traffic/swagger/pom.xml new file mode 100644 index 000000000000..864238393ba0 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/swagger/pom.xml @@ -0,0 +1,17 @@ + + + + + com.azure + azure-code-customization-parent + 1.0.0-beta.1 + ../../../parents/azure-code-customization-parent + + + com.azure + azure-maps-traffic-customization + 1.0.0-beta.1 + 4.0.0 + diff --git a/sdk/maps/azure-maps-traffic/swagger/src/main/java/TrafficCustomization.java b/sdk/maps/azure-maps-traffic/swagger/src/main/java/TrafficCustomization.java new file mode 100644 index 000000000000..7d3ec9717be0 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/swagger/src/main/java/TrafficCustomization.java @@ -0,0 +1,192 @@ +import com.azure.autorest.customization.Customization; +import com.azure.autorest.customization.LibraryCustomization; +import com.azure.autorest.customization.PackageCustomization; +import com.github.javaparser.StaticJavaParser; +import com.github.javaparser.ast.Modifier; +import com.github.javaparser.ast.Node; +import com.github.javaparser.javadoc.Javadoc; +import com.github.javaparser.javadoc.description.JavadocDescription; +import org.slf4j.Logger; + +public class TrafficCustomization extends Customization { + + @Override + public void customize(LibraryCustomization customization, Logger logger) { + PackageCustomization models = customization.getPackage("com.azure.maps.traffic.models"); + + // customize TrafficFlowSegmentDataPropertiesCoordinates + customizeTrafficFlowSegmentDataPropertiesCoordinates(models); + + // customize TrafficIncidentViewport + customizeTrafficIncidentViewport(models); + + // customize TrafficFlowSegmentData + customizeTrafficFlowSegmentData(models); + + // customize TrafficIncidentDetail + customizeTrafficIncidentDetail(models); + + setConstructorPrivate(models, "MapsPoint", "TrafficIncidentPointOfInterest", "TrafficState", + "TrafficIncidentViewportResponse"); + } + + private static void setConstructorPrivate(PackageCustomization customization, String... classNames) { + for (String name : classNames) { + customization.getClass(name).customizeAst(ast -> ast.getClassByName(name).ifPresent(clazz -> + clazz.getConstructors().get(0).setModifiers(Modifier.Keyword.PRIVATE) + .setJavadocComment("Set default constructor to private"))); + } + } + + // Customizes the TrafficFlowSegmentDataPropertiesCoordinates class + private void customizeTrafficFlowSegmentDataPropertiesCoordinates(PackageCustomization models) { + models.getClass("TrafficFlowSegmentDataPropertiesCoordinates").customizeAst(ast -> { + ast.addImport("java.util.List"); + ast.addImport("java.util.stream.Collectors"); + ast.addImport("java.util.Arrays"); + ast.addImport("com.azure.core.models.GeoPosition"); + + ast.getClassByName("TrafficFlowSegmentDataPropertiesCoordinates").ifPresent(clazz -> { + clazz.getConstructors().get(0).setModifiers(Modifier.Keyword.PRIVATE) + .setJavadocComment("Set default constructor to private"); + + clazz.getMethodsByName("getCoordinates").forEach(Node::remove); + + clazz.addMethod("getCoordinates", Modifier.Keyword.PUBLIC) + .setType("List") + .setBody(StaticJavaParser.parseBlock("{ return this.coordinates.stream()" + + ".map(item -> new GeoPosition(item.getLongitude(), item.getLatitude()))" + + ".collect(Collectors.toList()); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Return the coordinates")) + .addBlockTag("return", "Returns a list of {@link GeoPosition} coordinates.")); + }); + }); + } + + // Customizes the TrafficIncidentViewport class + private void customizeTrafficIncidentViewport(PackageCustomization models) { + models.getClass("TrafficIncidentViewport").customizeAst(ast -> ast.getClassByName("TrafficIncidentViewport") + .ifPresent(clazz -> { + clazz.getConstructors().get(0) + .setModifiers(Modifier.Keyword.PRIVATE) + .setJavadocComment("Set default constructor to private"); + + clazz.getMethodsByName("getViewpResp").forEach(method -> method.setName("getViewportResponse")); + })); + } + + // Customizes the TrafficFlowSegmentData class + private void customizeTrafficFlowSegmentData(PackageCustomization models) { + models.getClass("TrafficFlowSegmentData").customizeAst(ast -> ast.getClassByName("TrafficFlowSegmentData") + .ifPresent(clazz -> { + clazz.getConstructors().get(0) + .setModifiers(Modifier.Keyword.PRIVATE) + .setJavadocComment("Set default constructor to private"); + + clazz.getMethodsByName("getFlowSegmentData").forEach(Node::remove); + clazz.addMethod("getFunctionalRoadClass", Modifier.Keyword.PUBLIC) + .setType("String") + .setBody(StaticJavaParser.parseBlock("{ return this.flowSegmentData.getFunctionalRoadClass(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the functionalRoadClass " + + "property: Functional Road Class. This indicates the road type: 0: Motorway, freeway or " + + "other major road. 1: Major road, less important than a motorway. 2: Other major road. 3: " + + "Secondary road. 4: Local connecting road. 5: Local road of high importance. 6: Local road.")) + .addBlockTag("return", "the functionalRoadClass value.")); + + clazz.addMethod("getCurrentSpeed", Modifier.Keyword.PUBLIC) + .setType("Integer") + .setBody(StaticJavaParser.parseBlock("{ return this.flowSegmentData.getCurrentSpeed(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the currentSpeed property: The " + + "current average speed at the selected point, in the units requested. This is calculated " + + "from the currentTravelTime and the length of the selected segment.")) + .addBlockTag("return", "the currentSpeed value.")); + + clazz.addMethod("getFreeFlowSpeed", Modifier.Keyword.PUBLIC) + .setType("Integer") + .setBody(StaticJavaParser.parseBlock("{ return this.flowSegmentData.getFreeFlowSpeed(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the freeFlowSpeed property: The " + + "free flow speed expected under ideal conditions, expressed in the units requested. This is " + + "related to the freeFlowTravelTime.")) + .addBlockTag("return", "the freeFlowSpeed value.")); + + clazz.addMethod("getCurrentTravelTime", Modifier.Keyword.PUBLIC) + .setType("Integer") + .setBody(StaticJavaParser.parseBlock("{ return this.flowSegmentData.getCurrentTravelTime(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the currentTravelTime property: " + + "Current travel time in seconds, across this traffic segment, based on fused real-time " + + "measurements between the defined locations in the specified direction.")) + .addBlockTag("return", "the currentTravelTime value.")); + + clazz.addMethod("getFreeFlowTravelTime", Modifier.Keyword.PUBLIC) + .setType("Integer") + .setBody(StaticJavaParser.parseBlock("{ return this.flowSegmentData.getFreeFlowTravelTime(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the freeFlowTravelTime property: " + + "The travel time in seconds, across this traffic segment, which would be expected under " + + "ideal free flow conditions.")) + .addBlockTag("return", "the freeFlowTravelTime value.")); + + clazz.addMethod("getConfidence", Modifier.Keyword.PUBLIC) + .setType("Float") + .setBody(StaticJavaParser.parseBlock("{ return this.flowSegmentData.getConfidence(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the confidence property: The " + + "confidence is a measure of the quality of the provided travel time and speed. A value of 1 " + + "means full confidence, that the response contains the highest quality data. Lower values " + + "indicate the degree that the response may vary from the actual conditions on the road. Any " + + "value greater than 0.6 means the information was based on real-time probe input. A value of " + + "0.5 means the reported speed is based on historical info. A value between 0.5 and 0.6 has a " + + "calculated weighted average between historical and live speeds.")) + .addBlockTag("return", "the confidence value.")); + + clazz.addMethod("getCoordinates", Modifier.Keyword.PUBLIC) + .setType("TrafficFlowSegmentDataPropertiesCoordinates") + .setBody(StaticJavaParser.parseBlock("{ return this.flowSegmentData.getCoordinates(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the coordinates property: Includes " + + "the coordinates describing the shape of the segment. Coordinates are shifted from the road " + + "depending on the zoom level to support high quality visualization in every scale.")) + .addBlockTag("return", "the coordinates value.")); + + clazz.addMethod("getVersion", Modifier.Keyword.PUBLIC) + .setType("String") + .setBody(StaticJavaParser.parseBlock("{ return this.flowSegmentData.getVersion(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the version property: This " + + "indicates the software version that generated the response.")) + .addBlockTag("return", "the version value.")); + + clazz.addMethod("getOpenLrCode", Modifier.Keyword.PUBLIC) + .setType("String") + .setBody(StaticJavaParser.parseBlock("{ return this.flowSegmentData.getOpenLrCode(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the openLrCode property: OpenLR " + + "code for segment. See [OpenLR](https://en.wikipedia.org/wiki/OpenLR) for more information " + + "on the use of Open LR codes.")) + .addBlockTag("return", "the openLrCode value.")); + })); + } + + // Customizes the TrafficIncidentDetail class + private void customizeTrafficIncidentDetail(PackageCustomization models) { + models.getClass("TrafficIncidentDetail").customizeAst(ast -> { + ast.addImport("java.util.List"); + + ast.getClassByName("TrafficIncidentDetail").ifPresent(clazz -> { + clazz.getConstructors().get(0) + .setModifiers(Modifier.Keyword.PRIVATE) + .setJavadocComment("Set default constructor to private"); + + clazz.getMethodsByName("getTm").forEach(Node::remove); + clazz.addMethod("getId", Modifier.Keyword.PUBLIC) + .setType("String") + .setBody(StaticJavaParser.parseBlock("{ return this.tm.getId(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the id property: ID of the " + + "traffic model for this incident.")) + .addBlockTag("return", "the id value.")); + + clazz.addMethod("getPointsOfInterest", Modifier.Keyword.PUBLIC) + .setType("List") + .setBody(StaticJavaParser.parseBlock("{ return this.tm.getPointsOfInterest(); }")) + .setJavadocComment(new Javadoc(JavadocDescription.parseText("Get the pointsOfInterest property: A " + + "single traffic incident, or a cluster of traffic incidents.")) + .addBlockTag("return", "the pointsOfInterest value.")); + }); + }); + } +} diff --git a/sdk/maps/azure-maps-traffic/tests.yml b/sdk/maps/azure-maps-traffic/tests.yml new file mode 100644 index 000000000000..89d51f32db66 --- /dev/null +++ b/sdk/maps/azure-maps-traffic/tests.yml @@ -0,0 +1,7 @@ +trigger: none + +extends: + template: /sdk/maps/maps-tests-template.yml + parameters: + PackageName: azure-maps-traffic + SafeName: azuremapstraffic diff --git a/sdk/maps/ci.yml b/sdk/maps/ci.yml index 6419f53e92e2..ed5817aab6c7 100644 --- a/sdk/maps/ci.yml +++ b/sdk/maps/ci.yml @@ -17,6 +17,7 @@ trigger: - sdk/maps/azure-maps-route/pom.xml - sdk/maps/azure-maps-search/pom.xml - sdk/maps/azure-maps-timezone/pom.xml + - sdk/maps/azure-maps-traffic/pom.xml - sdk/maps/azure-maps-weather/pom.xml - sdk/maps/azure-resourcemanager-maps/pom.xml @@ -38,6 +39,7 @@ pr: - sdk/maps/azure-maps-route/pom.xml - sdk/maps/azure-maps-search/pom.xml - sdk/maps/azure-maps-timezone/pom.xml + - sdk/maps/azure-maps-traffic/pom.xml - sdk/maps/azure-maps-weather/pom.xml - sdk/maps/azure-resourcemanager-maps/pom.xml diff --git a/sdk/maps/pom.xml b/sdk/maps/pom.xml index b724b11557ed..2f4958f7478c 100644 --- a/sdk/maps/pom.xml +++ b/sdk/maps/pom.xml @@ -15,6 +15,7 @@ azure-maps-render azure-maps-timezone azure-maps-geolocation + azure-maps-traffic azure-maps-weather azure-resourcemanager-maps diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml index a5d980139b8c..059473ddba82 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml @@ -74,7 +74,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedAsyncClientTest.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedAsyncClientTest.java index dcc8660bd6c6..e809843003ff 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedAsyncClientTest.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedAsyncClientTest.java @@ -16,6 +16,7 @@ import com.azure.core.test.annotation.DoNotRecord; import com.azure.core.test.http.MockHttpResponse; import com.azure.core.util.CoreUtils; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -345,7 +346,7 @@ public void getDataFeedValidId(HttpClient httpClient, MetricsAdvisorServiceVersi // Act & Assert StepVerifier.create(client.getDataFeedWithResponse(createdDataFeed.getId())) .assertNext(dataFeedResponse -> { - assertEquals(200, dataFeedResponse.getStatusCode()); + assertEquals(dataFeedResponse.getStatusCode(), HttpResponseStatus.OK.code()); validateDataFeedResult(createdDataFeed, dataFeedResponse.getValue(), SQL_SERVER_DB); }); // TODO (alzimmer): This test needs to be recorded again as it was never verifying, therefore never @@ -724,7 +725,7 @@ public void deleteDataFeedIdWithResponse(HttpClient httpClient, MetricsAdvisorSe assertNotNull(createdDataFeed); StepVerifier.create(client.deleteDataFeedWithResponse(createdDataFeed.getId())) - .assertNext(response -> assertEquals(204, response.getStatusCode())) + .assertNext(response -> assertEquals(response.getStatusCode(), HttpResponseStatus.NO_CONTENT.code())) .expectComplete() .verify(DEFAULT_TIMEOUT); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedClientTest.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedClientTest.java index a81dcc4edf2e..c6f1ec9b5b35 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedClientTest.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedClientTest.java @@ -23,6 +23,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -315,7 +316,7 @@ public void getDataFeedValidId(HttpClient httpClient, MetricsAdvisorServiceVersi // Act & Assert final Response dataFeedResponse = client.getDataFeedWithResponse(createdDataFeed.getId(), Context.NONE); - assertEquals(200, dataFeedResponse.getStatusCode()); + assertEquals(dataFeedResponse.getStatusCode(), HttpResponseStatus.OK.code()); validateDataFeedResult(createdDataFeed, dataFeedResponse.getValue(), SQL_SERVER_DB); }, SQL_SERVER_DB); } finally { @@ -705,7 +706,8 @@ public void deleteDataFeedIdWithResponse(HttpClient httpClient, MetricsAdvisorSe creatDataFeedRunner(dataFeed -> { final DataFeed createdDataFeed = client.createDataFeed(dataFeed); - assertEquals(204, client.deleteDataFeedWithResponse(createdDataFeed.getId(), Context.NONE).getStatusCode()); + assertEquals(HttpResponseStatus.NO_CONTENT.code(), + client.deleteDataFeedWithResponse(createdDataFeed.getId(), Context.NONE).getStatusCode()); // Act & Assert MetricsAdvisorResponseException exception = assertThrows(MetricsAdvisorResponseException.class, diff --git a/sdk/mixedreality/cspell.yml b/sdk/mixedreality/cspell.yml new file mode 100644 index 000000000000..8899b8dc6f15 --- /dev/null +++ b/sdk/mixedreality/cspell.yml @@ -0,0 +1,9 @@ +# Spell-check overrides for this SDK group. +# Inherits the global config at the repo root. +# +# Add words that only appear in this folder here, in alphabetical order. +# Cross-cutting terms should go in the root cspell.json instead. +version: "0.2" +import: + - ../../.vscode/cspell.json +words: diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md new file mode 100644 index 000000000000..689067b40a1d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md @@ -0,0 +1,864 @@ +# Release History + +## 1.4.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.3.1 (2025-12-16) + +- Please note, this package has been deprecated and will no longer be maintained after 09-30-2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +### Other Changes + +- Please note, this package has been deprecated and will no longer be maintained after 09-30-2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +## 1.3.0 (2024-12-23) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2024-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Changes + +#### Serialization/Deserialization change + +- `Jackson` is removed from dependency and no longer supported. + +##### Migration Guide + +If you are using `Jackson`/`ObjectMapper` for manual serialization/deserialization, configure your `ObjectMapper` for backward compatibility: +```java +objectMapper.registerModule(com.azure.core.serializer.json.jackson.JacksonJsonProvider.getJsonSerializableDatabindModule()); +``` + +## 1.2.0 (2024-06-17) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2024-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Features Added + +* `models.Ipv4Route` was added + +* `models.RoutingInfoModel` was added + +* `models.UserConsentConfiguration` was added + +* `models.SimMove` was added + +* `models.UserPlaneDataRoutesItem` was added + +* `models.Ipv4RouteNextHop` was added + +* `models.RoutingInfoListResult` was added + +* `models.SimGroupResourceId` was added + +* `models.NasEncryptionType` was added + +* `models.RoutingInfoes` was added + +* `models.SimClone` was added + +#### `models.ExtendedUeInfoProperties` was modified + +* `ratType()` was added + +#### `models.PacketCoreControlPlane` was modified + +* `userConsent()` was added + +#### `models.UeInfo4G` was modified + +* `ratType()` was added + +#### `models.Sims` was modified + +* `clone(java.lang.String,java.lang.String,models.SimClone)` was added +* `move(java.lang.String,java.lang.String,models.SimMove,com.azure.core.util.Context)` was added +* `move(java.lang.String,java.lang.String,models.SimMove)` was added +* `clone(java.lang.String,java.lang.String,models.SimClone,com.azure.core.util.Context)` was added + +#### `models.Platform` was modified + +* `withHaUpgradesAvailable(java.util.List)` was added +* `haUpgradesAvailable()` was added + +#### `models.UeInfo5G` was modified + +* `ratType()` was added + +#### `models.SignalingConfiguration` was modified + +* `nasEncryption()` was added +* `withNasEncryption(java.util.List)` was added + +#### `models.MobileNetwork` was modified + +* `listSimGroups()` was added +* `listSimGroups(com.azure.core.util.Context)` was added + +#### `models.MobileNetworks` was modified + +* `listSimGroups(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listSimGroups(java.lang.String,java.lang.String)` was added + +#### `MobileNetworkManager` was modified + +* `routingInfoes()` was added + +#### `models.PacketCoreControlPlane$Definition` was modified + +* `withUserConsent(models.UserConsentConfiguration)` was added + +#### `models.InterfaceProperties` was modified + +* `bfdIpv4Endpoints()` was added +* `withIpv4AddressList(java.util.List)` was added +* `withBfdIpv4Endpoints(java.util.List)` was added +* `ipv4AddressList()` was added +* `withVlanId(java.lang.Integer)` was added +* `vlanId()` was added + +## 1.1.0 (2024-03-19) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Features Added + +* `models.GlobalRanNodeId` was added + +* `models.UeInformations` was added + +* `models.HomeNetworkPrivateKeysProvisioning` was added + +* `models.UeIpAddress` was added + +* `models.PublicLandMobileNetworkHomeNetworkPublicKeys` was added + +* `models.UeInfo` was added + +* `models.RatType` was added + +* `models.AmfId` was added + +* `models.HomeNetworkPublicKey` was added + +* `models.ExtendedUeInfoProperties` was added + +* `models.UeInfo4GProperties` was added + +* `models.UeUsageSetting` was added + +* `models.UeSessionInfo5G` was added + +* `models.MmeId` was added + +* `models.UeSessionInfo4G` was added + +* `models.Guti5G` was added + +* `models.GNbId` was added + +* `models.ExtendedUeInformations` was added + +* `models.Guti4G` was added + +* `models.UeConnectionInfo5G` was added + +* `models.UeInfoList` was added + +* `models.UeInfo4G` was added + +* `models.UeConnectionInfo4G` was added + +* `models.UeInfo5G` was added + +* `models.UeQosFlow` was added + +* `models.UeState` was added + +* `models.UeInfo5GProperties` was added + +* `models.PublicLandMobileNetwork` was added + +* `models.PdnType` was added + +* `models.UeInfoPropertiesFormat` was added + +* `models.ExtendedUeInfo` was added + +* `models.HomeNetworkPrivateKeysProvisioningState` was added + +* `models.UeLocationInfo` was added + +* `models.RrcEstablishmentCause` was added + +* `models.DnnIpPair` was added + +#### `models.PacketCoreControlPlane` was modified + +* `homeNetworkPrivateKeysProvisioning()` was added + +#### `models.MobileNetwork$Definition` was modified + +* `withPublicLandMobileNetworks(java.util.List)` was added +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.MobileNetwork$Update` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.MobileNetwork` was modified + +* `publicLandMobileNetworks()` was added +* `identity()` was added + +#### `MobileNetworkManager` was modified + +* `ueInformations()` was added +* `extendedUeInformations()` was added + +## 1.0.0 (2023-11-15) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2023-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Features Added + +* `models.SignalingConfiguration` was added + +* `models.NasRerouteConfiguration` was added + +* `models.EventHubConfiguration` was added + +#### `models.PacketCoreDataPlane$Definition` was modified + +* `withUserPlaneAccessVirtualIpv4Addresses(java.util.List)` was added + +#### `models.PacketCoreControlPlaneVersion` was modified + +* `systemData()` was added + +#### `models.PacketCoreControlPlane` was modified + +* `signaling()` was added +* `controlPlaneAccessVirtualIpv4Addresses()` was added +* `eventHub()` was added + +#### `models.Sim` was modified + +* `systemData()` was added + +#### `models.PacketCapture` was modified + +* `outputFiles()` was added +* `systemData()` was added + +#### `models.PacketCoreDataPlane` was modified + +* `userPlaneAccessVirtualIpv4Addresses()` was added + +#### `models.PacketCoreControlPlane$Definition` was modified + +* `withEventHub(models.EventHubConfiguration)` was added +* `withSignaling(models.SignalingConfiguration)` was added +* `withControlPlaneAccessVirtualIpv4Addresses(java.util.List)` was added + +## 1.0.0-beta.6 (2023-07-19) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2023-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Changes + +#### `models.ManagedServiceIdentity` was modified + +* `tenantId()` was removed +* `principalId()` was removed + +#### `models.PacketCoreControlPlaneVersion` was modified + +* `systemData()` was removed + +#### `models.Sim` was modified + +* `systemData()` was removed + +#### `models.Installation` was modified + +* `withState(models.InstallationState)` was removed +* `withOperation(models.AsyncOperationId)` was removed + +### Features Added + +* `models.DiagnosticsPackage` was added + +* `models.InstallationReason` was added + +* `models.PacketCapture$Definition` was added + +* `models.PacketCoreControlPlaneResourceId` was added + +* `models.ReinstallRequired` was added + +* `models.IdentityAndTagsObject` was added + +* `models.PacketCapture$UpdateStages` was added + +* `models.PacketCaptureStatus` was added + +* `models.PacketCapture$DefinitionStages` was added + +* `models.PacketCapture` was added + +* `models.PacketCapture$Update` was added + +* `models.DiagnosticsPackages` was added + +* `models.PacketCaptures` was added + +* `models.PacketCaptureListResult` was added + +* `models.DesiredInstallationState` was added + +* `models.SiteDeletePacketCore` was added + +* `models.DiagnosticsPackageStatus` was added + +* `models.DiagnosticsPackageListResult` was added + +* `models.DiagnosticsUploadConfiguration` was added + +#### `models.PacketCoreControlPlane$Update` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.PacketCoreControlPlaneVersions` was modified + +* `getBySubscriptionWithResponse(java.lang.String,com.azure.core.util.Context)` was added +* `listBySubscription()` was added +* `listBySubscription(com.azure.core.util.Context)` was added +* `getBySubscription(java.lang.String)` was added + +#### `models.PacketCoreControlPlane` was modified + +* `diagnosticsUpload()` was added +* `installedVersion()` was added + +#### `models.Site` was modified + +* `deletePacketCore(models.SiteDeletePacketCore)` was added +* `deletePacketCore(models.SiteDeletePacketCore,com.azure.core.util.Context)` was added + +#### `models.Sites` was modified + +* `deletePacketCore(java.lang.String,java.lang.String,java.lang.String,models.SiteDeletePacketCore)` was added +* `deletePacketCore(java.lang.String,java.lang.String,java.lang.String,models.SiteDeletePacketCore,com.azure.core.util.Context)` was added + +#### `models.Installation` was modified + +* `withDesiredState(models.DesiredInstallationState)` was added +* `reasons()` was added +* `reinstallRequired()` was added +* `desiredState()` was added + +#### `models.SimGroup$Update` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `MobileNetworkManager` was modified + +* `diagnosticsPackages()` was added +* `packetCaptures()` was added + +#### `models.PacketCoreControlPlane$Definition` was modified + +* `withInstallation(models.Installation)` was added +* `withDiagnosticsUpload(models.DiagnosticsUploadConfiguration)` was added + +## 1.0.0-beta.5 (2023-01-16) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2022-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Changes + +* `models.PacketCoreControlPlaneOperations` was removed + +* `models.SimOperations` was removed + +#### `MobileNetworkManager` was modified + +* `simOperations()` was removed +* `packetCoreControlPlaneOperations()` was removed + +### Features Added + +#### `models.PacketCoreControlPlane` was modified + +* `collectDiagnosticsPackage(models.PacketCoreControlPlaneCollectDiagnosticsPackage)` was added +* `rollback()` was added +* `collectDiagnosticsPackage(models.PacketCoreControlPlaneCollectDiagnosticsPackage,com.azure.core.util.Context)` was added +* `reinstall(com.azure.core.util.Context)` was added +* `reinstall()` was added +* `rollback(com.azure.core.util.Context)` was added + +#### `models.Sims` was modified + +* `bulkUpload(java.lang.String,java.lang.String,models.SimUploadList,com.azure.core.util.Context)` was added +* `bulkDelete(java.lang.String,java.lang.String,models.SimDeleteList,com.azure.core.util.Context)` was added +* `bulkUploadEncrypted(java.lang.String,java.lang.String,models.EncryptedSimUploadList,com.azure.core.util.Context)` was added +* `bulkDelete(java.lang.String,java.lang.String,models.SimDeleteList)` was added +* `bulkUpload(java.lang.String,java.lang.String,models.SimUploadList)` was added +* `bulkUploadEncrypted(java.lang.String,java.lang.String,models.EncryptedSimUploadList)` was added + +#### `models.PacketCoreControlPlanes` was modified + +* `reinstall(java.lang.String,java.lang.String)` was added +* `collectDiagnosticsPackage(java.lang.String,java.lang.String,models.PacketCoreControlPlaneCollectDiagnosticsPackage,com.azure.core.util.Context)` was added +* `rollback(java.lang.String,java.lang.String)` was added +* `collectDiagnosticsPackage(java.lang.String,java.lang.String,models.PacketCoreControlPlaneCollectDiagnosticsPackage)` was added +* `reinstall(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `rollback(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +## 1.0.0-beta.4 (2022-12-21) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2022-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Changes + +* `models.SimIdListResult` was removed + +* `models.KeyVaultCertificate` was removed + +#### `models.AttachedDataNetwork$DefinitionStages` was modified + +* Stage 4 was added + +#### `models.PacketCoreControlPlane$DefinitionStages` was modified + +* `withMobileNetwork(models.MobileNetworkResourceId)` was removed in stage 3 +* `withControlPlaneAccessInterface(models.InterfaceProperties)` was removed in stage 4 +* `withSku(models.BillingSku)` was removed in stage 5 +* Stage 6, 7 was added + +#### `models.PacketCoreControlPlaneVersions` was modified + +* `listByResourceGroup(com.azure.core.util.Context)` was removed +* `listByResourceGroup()` was removed + +#### `models.PacketCoreControlPlaneVersion` was modified + +* `versionState()` was removed +* `recommendedVersion()` was removed + +#### `models.PacketCoreControlPlane` was modified + +* `mobileNetwork()` was removed + +#### `models.Sims` was modified + +* `listBySimGroup(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listBySimGroup(java.lang.String,java.lang.String)` was removed + +#### `models.Site$Definition` was modified + +* `withNetworkFunctions(java.util.List)` was removed + +#### `models.LocalDiagnosticsAccessConfiguration` was modified + +* `models.KeyVaultCertificate httpsServerCertificate()` -> `models.HttpsServerCertificate httpsServerCertificate()` +* `withHttpsServerCertificate(models.KeyVaultCertificate)` was removed + +#### `models.MobileNetwork` was modified + +* `listSimIds(com.azure.core.util.Context)` was removed +* `listSimIds()` was removed + +#### `models.MobileNetworks` was modified + +* `listSimIds(java.lang.String,java.lang.String)` was removed +* `listSimIds(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.CoreNetworkType` was modified + +* `java.util.Collection values()` -> `models.CoreNetworkType[] values()` + +#### `models.PacketCoreControlPlane$Definition` was modified + +* `withMobileNetwork(models.MobileNetworkResourceId)` was removed + +### Features Added + +* `models.CertificateProvisioning` was added + +* `models.PacketCoreControlPlaneOperations` was added + +* `models.AuthenticationType` was added + +* `models.PacketCoreControlPlaneCollectDiagnosticsPackage` was added + +* `models.SimUploadList` was added + +* `models.SimDeleteList` was added + +* `models.SiteProvisioningState` was added + +* `models.CertificateProvisioningState` was added + +* `models.SimOperations` was added + +* `models.HttpsServerCertificate` was added + +* `models.AsyncOperationId` was added + +* `models.SiteResourceId` was added + +* `models.InstallationState` was added + +* `models.ObsoleteVersion` was added + +* `models.Installation` was added + +* `models.Platform` was added + +* `models.EncryptedSimUploadList` was added + +* `models.CommonSimPropertiesFormat` was added + +* `models.SimNameAndEncryptedProperties` was added + +* `models.AzureStackHciClusterResourceId` was added + +* `models.SimNameAndProperties` was added + +* `models.AsyncOperationStatus` was added + +#### `models.PacketCoreControlPlaneVersions` was modified + +* `list(com.azure.core.util.Context)` was added +* `list()` was added + +#### `models.DataNetworkConfiguration` was modified + +* `maximumNumberOfBufferedPackets()` was added +* `withMaximumNumberOfBufferedPackets(java.lang.Integer)` was added + +#### `models.PacketCoreControlPlaneVersion` was modified + +* `platforms()` was added + +#### `models.PacketCoreControlPlane` was modified + +* `installation()` was added +* `rollbackVersion()` was added +* `ueMtu()` was added +* `sites()` was added + +#### `models.Sim` was modified + +* `siteProvisioningState()` was added +* `vendorKeyFingerprint()` was added +* `systemData()` was added +* `vendorName()` was added + +#### `models.Sims` was modified + +* `listByGroup(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByGroup(java.lang.String,java.lang.String)` was added + +#### `models.LocalDiagnosticsAccessConfiguration` was modified + +* `authenticationType()` was added +* `withAuthenticationType(models.AuthenticationType)` was added +* `withHttpsServerCertificate(models.HttpsServerCertificate)` was added + +#### `models.SimPolicy` was modified + +* `siteProvisioningState()` was added + +#### `models.PlatformConfiguration` was modified + +* `withAzureStackHciCluster(models.AzureStackHciClusterResourceId)` was added +* `azureStackEdgeDevices()` was added +* `azureStackHciCluster()` was added + +#### `models.AttachedDataNetwork` was modified + +* `systemData()` was added + +#### `models.CoreNetworkType` was modified + +* `valueOf(java.lang.String)` was added +* `toString()` was added + +#### `MobileNetworkManager` was modified + +* `simOperations()` was added +* `packetCoreControlPlaneOperations()` was added + +#### `models.PacketCoreControlPlane$Definition` was modified + +* `withUeMtu(java.lang.Integer)` was added +* `withSites(java.util.List)` was added + +## 1.0.0-beta.3 (2022-07-25) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this swagger specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2022-04-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Changes + +#### `models.Sim$DefinitionStages` was modified + +* `withRegion(java.lang.String)` was removed in stage 1 +* `withRegion(com.azure.core.management.Region)` was removed in stage 1 +* `withExistingResourceGroup(java.lang.String)` was removed in stage 2 + +#### `models.PacketCoreControlPlane$DefinitionStages` was modified + +* Stage 5 was added + +#### `models.PacketCoreControlPlane` was modified + +* `customLocation()` was removed + +#### `models.Sim` was modified + +* `regionName()` was removed +* `mobileNetwork()` was removed +* `region()` was removed +* `location()` was removed +* `systemData()` was removed +* `tags()` was removed + +#### `models.Sims` was modified + +* `deleteByResourceGroup(java.lang.String,java.lang.String)` was removed +* `getByResourceGroup(java.lang.String,java.lang.String)` was removed +* `listByResourceGroup(java.lang.String)` was removed +* `list(com.azure.core.util.Context)` was removed +* `listByResourceGroup(java.lang.String,com.azure.core.util.Context)` was removed +* `getByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `delete(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `list()` was removed + +#### `models.Sim$Definition` was modified + +* `withRegion(java.lang.String)` was removed +* `withMobileNetwork(models.MobileNetworkResourceId)` was removed +* `withExistingResourceGroup(java.lang.String)` was removed +* `withTags(java.util.Map)` was removed +* `withRegion(com.azure.core.management.Region)` was removed + +#### `models.PacketCoreControlPlane$Definition` was modified + +* `withCustomLocation(models.CustomLocationResourceId)` was removed + +#### `models.Sim$Update` was modified + +* `withTags(java.util.Map)` was removed + +### Features Added + +* `models.ManagedServiceIdentity` was added + +* `models.RecommendedVersion` was added + +* `models.ConnectedClusterResourceId` was added + +* `models.BillingSku` was added + +* `models.SimGroupListResult` was added + +* `models.PacketCoreControlPlaneVersions` was added + +* `models.UserAssignedIdentity` was added + +* `models.PacketCoreControlPlaneVersion` was added + +* `models.SimGroups` was added + +* `models.ManagedServiceIdentityType` was added + +* `models.KeyVaultCertificate` was added + +* `models.KeyVaultKey` was added + +* `models.SimGroup$Definition` was added + +* `models.PacketCoreControlPlaneVersionListResult` was added + +* `models.LocalDiagnosticsAccessConfiguration` was added + +* `models.SimGroup$UpdateStages` was added + +* `models.SimGroup$Update` was added + +* `models.PlatformType` was added + +* `models.AzureStackEdgeDeviceResourceId` was added + +* `models.PlatformConfiguration` was added + +* `models.SimGroup$DefinitionStages` was added + +* `models.SimGroup` was added + +* `models.VersionState` was added + +#### `models.DataNetwork` was modified + +* `resourceGroupName()` was added + +#### `models.Slice` was modified + +* `resourceGroupName()` was added + +#### `models.PacketCoreControlPlane` was modified + +* `resourceGroupName()` was added +* `localDiagnosticsAccess()` was added +* `sku()` was added +* `interopSettings()` was added +* `platform()` was added +* `identity()` was added + +#### `models.Site` was modified + +* `resourceGroupName()` was added + +#### `models.Sim` was modified + +* `resourceGroupName()` was added + +#### `models.Sims` was modified + +* `delete(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `get(java.lang.String,java.lang.String,java.lang.String)` was added +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listBySimGroup(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listBySimGroup(java.lang.String,java.lang.String)` was added +* `delete(java.lang.String,java.lang.String,java.lang.String)` was added + +#### `models.AttachedDataNetwork$Definition` was modified + +* `withDnsAddresses(java.util.List)` was added + +#### `models.SimPolicy` was modified + +* `resourceGroupName()` was added + +#### `models.MobileNetwork` was modified + +* `resourceGroupName()` was added + +#### `models.AttachedDataNetwork` was modified + +* `resourceGroupName()` was added +* `dnsAddresses()` was added + +#### `models.PacketCoreDataPlane` was modified + +* `resourceGroupName()` was added + +#### `models.Sim$Definition` was modified + +* `withExistingSimGroup(java.lang.String,java.lang.String)` was added + +#### `MobileNetworkManager` was modified + +* `authenticate(com.azure.core.http.HttpPipeline,com.azure.core.management.profile.AzureProfile)` was added +* `simGroups()` was added +* `packetCoreControlPlaneVersions()` was added + +#### `models.Service` was modified + +* `resourceGroupName()` was added + +#### `MobileNetworkManager$Configurable` was modified + +* `withRetryOptions(com.azure.core.http.policy.RetryOptions)` was added + +#### `models.PacketCoreControlPlane$Definition` was modified + +* `withPlatform(models.PlatformConfiguration)` was added +* `withLocalDiagnosticsAccess(models.LocalDiagnosticsAccessConfiguration)` was added +* `withInteropSettings(java.lang.Object)` was added +* `withIdentity(models.ManagedServiceIdentity)` was added +* `withSku(models.BillingSku)` was added + +#### `models.Sim$Update` was modified + +* `withAuthenticationKey(java.lang.String)` was added +* `withSimPolicy(models.SimPolicyResourceId)` was added +* `withStaticIpConfiguration(java.util.List)` was added +* `withDeviceType(java.lang.String)` was added +* `withIntegratedCircuitCardIdentifier(java.lang.String)` was added +* `withOperatorKeyCode(java.lang.String)` was added + +## 1.0.0-beta.2 (2022-03-25) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this swagger specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2022-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Changes + +* `models.ConfigurationState` was removed + +#### `models.Sim` was modified + +* `configurationState()` was removed + +### Features Added + +* `models.SimState` was added + +#### `models.DataNetwork` was modified + +* `systemData()` was added + +#### `models.Slice` was modified + +* `systemData()` was added + +#### `models.PacketCoreControlPlane` was modified + +* `systemData()` was added + +#### `models.Site` was modified + +* `systemData()` was added + +#### `models.Sim` was modified + +* `simState()` was added +* `systemData()` was added + +#### `models.SimPolicy` was modified + +* `systemData()` was added + +#### `models.MobileNetwork` was modified + +* `systemData()` was added + +#### `models.PacketCoreDataPlane` was modified + +* `systemData()` was added + +#### `models.Service` was modified + +* `systemData()` was added + +#### `models.InterfaceProperties` was modified + +* `ipv4Subnet()` was added +* `withIpv4Subnet(java.lang.String)` was added +* `withIpv4Gateway(java.lang.String)` was added +* `ipv4Gateway()` was added +* `ipv4Address()` was added +* `withIpv4Address(java.lang.String)` was added + +## 1.0.0-beta.1 (2022-02-28) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this swagger specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2022-01-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md new file mode 100644 index 000000000000..e33bccebeb55 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md @@ -0,0 +1,106 @@ +# Azure Resource Manager MobileNetwork client library for Java + +Please note, this package has been deprecated and will no longer be maintained after 09-30-2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +Azure Resource Manager MobileNetwork client library for Java. + +This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2024-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +## We'd love to hear your feedback + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-mobilenetwork + 1.4.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. + +Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +MobileNetworkManager manager = MobileNetworkManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + + diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md new file mode 100644 index 000000000000..471695608252 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md @@ -0,0 +1,2735 @@ +# Code snippets and samples + + +## AttachedDataNetworks + +- [CreateOrUpdate](#attacheddatanetworks_createorupdate) +- [Delete](#attacheddatanetworks_delete) +- [Get](#attacheddatanetworks_get) +- [ListByPacketCoreDataPlane](#attacheddatanetworks_listbypacketcoredataplane) +- [UpdateTags](#attacheddatanetworks_updatetags) + +## DataNetworks + +- [CreateOrUpdate](#datanetworks_createorupdate) +- [Delete](#datanetworks_delete) +- [Get](#datanetworks_get) +- [ListByMobileNetwork](#datanetworks_listbymobilenetwork) +- [UpdateTags](#datanetworks_updatetags) + +## DiagnosticsPackages + +- [CreateOrUpdate](#diagnosticspackages_createorupdate) +- [Delete](#diagnosticspackages_delete) +- [Get](#diagnosticspackages_get) +- [ListByPacketCoreControlPlane](#diagnosticspackages_listbypacketcorecontrolplane) + +## ExtendedUeInformation + +- [Get](#extendedueinformation_get) + +## MobileNetworks + +- [CreateOrUpdate](#mobilenetworks_createorupdate) +- [Delete](#mobilenetworks_delete) +- [GetByResourceGroup](#mobilenetworks_getbyresourcegroup) +- [List](#mobilenetworks_list) +- [ListByResourceGroup](#mobilenetworks_listbyresourcegroup) +- [ListSimGroups](#mobilenetworks_listsimgroups) +- [UpdateTags](#mobilenetworks_updatetags) + +## Operations + +- [List](#operations_list) + +## PacketCaptures + +- [CreateOrUpdate](#packetcaptures_createorupdate) +- [Delete](#packetcaptures_delete) +- [Get](#packetcaptures_get) +- [ListByPacketCoreControlPlane](#packetcaptures_listbypacketcorecontrolplane) +- [Stop](#packetcaptures_stop) + +## PacketCoreControlPlaneVersions + +- [Get](#packetcorecontrolplaneversions_get) +- [GetBySubscription](#packetcorecontrolplaneversions_getbysubscription) +- [List](#packetcorecontrolplaneversions_list) +- [ListBySubscription](#packetcorecontrolplaneversions_listbysubscription) + +## PacketCoreControlPlanes + +- [CollectDiagnosticsPackage](#packetcorecontrolplanes_collectdiagnosticspackage) +- [CreateOrUpdate](#packetcorecontrolplanes_createorupdate) +- [Delete](#packetcorecontrolplanes_delete) +- [GetByResourceGroup](#packetcorecontrolplanes_getbyresourcegroup) +- [List](#packetcorecontrolplanes_list) +- [ListByResourceGroup](#packetcorecontrolplanes_listbyresourcegroup) +- [Reinstall](#packetcorecontrolplanes_reinstall) +- [Rollback](#packetcorecontrolplanes_rollback) +- [UpdateTags](#packetcorecontrolplanes_updatetags) + +## PacketCoreDataPlanes + +- [CreateOrUpdate](#packetcoredataplanes_createorupdate) +- [Delete](#packetcoredataplanes_delete) +- [Get](#packetcoredataplanes_get) +- [ListByPacketCoreControlPlane](#packetcoredataplanes_listbypacketcorecontrolplane) +- [UpdateTags](#packetcoredataplanes_updatetags) + +## RoutingInfo + +- [Get](#routinginfo_get) +- [List](#routinginfo_list) + +## Services + +- [CreateOrUpdate](#services_createorupdate) +- [Delete](#services_delete) +- [Get](#services_get) +- [ListByMobileNetwork](#services_listbymobilenetwork) +- [UpdateTags](#services_updatetags) + +## SimGroups + +- [CreateOrUpdate](#simgroups_createorupdate) +- [Delete](#simgroups_delete) +- [GetByResourceGroup](#simgroups_getbyresourcegroup) +- [List](#simgroups_list) +- [ListByResourceGroup](#simgroups_listbyresourcegroup) +- [UpdateTags](#simgroups_updatetags) + +## SimPolicies + +- [CreateOrUpdate](#simpolicies_createorupdate) +- [Delete](#simpolicies_delete) +- [Get](#simpolicies_get) +- [ListByMobileNetwork](#simpolicies_listbymobilenetwork) +- [UpdateTags](#simpolicies_updatetags) + +## Sims + +- [BulkDelete](#sims_bulkdelete) +- [BulkUpload](#sims_bulkupload) +- [BulkUploadEncrypted](#sims_bulkuploadencrypted) +- [Clone](#sims_clone) +- [CreateOrUpdate](#sims_createorupdate) +- [Delete](#sims_delete) +- [Get](#sims_get) +- [ListByGroup](#sims_listbygroup) +- [Move](#sims_move) + +## Sites + +- [CreateOrUpdate](#sites_createorupdate) +- [Delete](#sites_delete) +- [DeletePacketCore](#sites_deletepacketcore) +- [Get](#sites_get) +- [ListByMobileNetwork](#sites_listbymobilenetwork) +- [UpdateTags](#sites_updatetags) + +## Slices + +- [CreateOrUpdate](#slices_createorupdate) +- [Delete](#slices_delete) +- [Get](#slices_get) +- [ListByMobileNetwork](#slices_listbymobilenetwork) +- [UpdateTags](#slices_updatetags) + +## UeInformation + +- [List](#ueinformation_list) +### AttachedDataNetworks_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.NaptEnabled; +import com.azure.resourcemanager.mobilenetwork.models.PinholeTimeouts; +import com.azure.resourcemanager.mobilenetwork.models.PortRange; +import com.azure.resourcemanager.mobilenetwork.models.PortReuseHoldTimes; +import java.util.Arrays; + +/** + * Samples for AttachedDataNetworks CreateOrUpdate. + */ +public final class AttachedDataNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkCreate.json + */ + /** + * Sample code: Create attached data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createAttachedDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.attachedDataNetworks() + .define("TestAttachedDataNetwork") + .withRegion("eastus") + .withExistingPacketCoreDataPlane("rg1", "TestPacketCoreCP", "TestPacketCoreDP") + .withUserPlaneDataInterface(new InterfaceProperties().withName("N6")) + .withDnsAddresses(Arrays.asList("1.1.1.1")) + .withNaptConfiguration(new NaptConfiguration().withEnabled(NaptEnabled.ENABLED) + .withPortRange(new PortRange().withMinPort(1024).withMaxPort(49999)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(120).withUdp(60)) + .withPinholeLimits(65536) + .withPinholeTimeouts(new PinholeTimeouts().withTcp(180).withUdp(30).withIcmp(30))) + .withUserEquipmentAddressPoolPrefix(Arrays.asList("2.2.0.0/16")) + .withUserEquipmentStaticAddressPoolPrefix(Arrays.asList("2.4.0.0/16")) + .create(); + } +} +``` + +### AttachedDataNetworks_Delete + +```java +/** + * Samples for AttachedDataNetworks Delete. + */ +public final class AttachedDataNetworksDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkDelete.json + */ + /** + * Sample code: Delete attached data network resource. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + deleteAttachedDataNetworkResource(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.attachedDataNetworks() + .delete("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE); + } +} +``` + +### AttachedDataNetworks_Get + +```java +/** + * Samples for AttachedDataNetworks Get. + */ +public final class AttachedDataNetworksGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkGet.json + */ + /** + * Sample code: Get attached data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getAttachedDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.attachedDataNetworks() + .getWithResponse("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE); + } +} +``` + +### AttachedDataNetworks_ListByPacketCoreDataPlane + +```java +/** + * Samples for AttachedDataNetworks ListByPacketCoreDataPlane. + */ +public final class AttachedDataNetworksListByPacketCoreDataPlaneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkListByPacketCoreDataPlane.json + */ + /** + * Sample code: List attached data networks in a data plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listAttachedDataNetworksInADataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.attachedDataNetworks() + .listByPacketCoreDataPlane("rg1", "TestPacketCoreCP", "TestPacketCoreDP", com.azure.core.util.Context.NONE); + } +} +``` + +### AttachedDataNetworks_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetwork; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AttachedDataNetworks UpdateTags. + */ +public final class AttachedDataNetworksUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkUpdateTags.json + */ + /** + * Sample code: Update attached data network tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + updateAttachedDataNetworkTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + AttachedDataNetwork resource = manager.attachedDataNetworks() + .getWithResponse("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### DataNetworks_CreateOrUpdate + +```java +/** + * Samples for DataNetworks CreateOrUpdate. + */ +public final class DataNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/DataNetworkCreate + * .json + */ + /** + * Sample code: Create data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.dataNetworks() + .define("testDataNetwork") + .withRegion("eastus") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .withDescription("myFavouriteDataNetwork") + .create(); + } +} +``` + +### DataNetworks_Delete + +```java +/** + * Samples for DataNetworks Delete. + */ +public final class DataNetworksDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/DataNetworkDelete + * .json + */ + /** + * Sample code: Delete data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.dataNetworks().delete("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### DataNetworks_Get + +```java +/** + * Samples for DataNetworks Get. + */ +public final class DataNetworksGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/DataNetworkGet. + * json + */ + /** + * Sample code: Get data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.dataNetworks() + .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### DataNetworks_ListByMobileNetwork + +```java +/** + * Samples for DataNetworks ListByMobileNetwork. + */ +public final class DataNetworksListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DataNetworkListByMobileNetwork.json + */ + /** + * Sample code: List data networks in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listDataNetworksInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.dataNetworks().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### DataNetworks_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.DataNetwork; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DataNetworks UpdateTags. + */ +public final class DataNetworksUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DataNetworkUpdateTags.json + */ + /** + * Sample code: Update data network tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateDataNetworkTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + DataNetwork resource = manager.dataNetworks() + .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### DiagnosticsPackages_CreateOrUpdate + +```java +/** + * Samples for DiagnosticsPackages CreateOrUpdate. + */ +public final class DiagnosticsPackagesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DiagnosticsPackageCreate.json + */ + /** + * Sample code: Create diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages() + .createOrUpdate("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} +``` + +### DiagnosticsPackages_Delete + +```java +/** + * Samples for DiagnosticsPackages Delete. + */ +public final class DiagnosticsPackagesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DiagnosticsPackageDelete.json + */ + /** + * Sample code: Delete diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages().delete("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} +``` + +### DiagnosticsPackages_Get + +```java +/** + * Samples for DiagnosticsPackages Get. + */ +public final class DiagnosticsPackagesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DiagnosticsPackageGet.json + */ + /** + * Sample code: Get diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages() + .getWithResponse("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} +``` + +### DiagnosticsPackages_ListByPacketCoreControlPlane + +```java +/** + * Samples for DiagnosticsPackages ListByPacketCoreControlPlane. + */ +public final class DiagnosticsPackagesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DiagnosticsPackageListByPacketCoreControlPlane.json + */ + /** + * Sample code: List diagnostics packages under a packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listDiagnosticsPackagesUnderAPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages() + .listByPacketCoreControlPlane("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### ExtendedUeInformation_Get + +```java +/** + * Samples for ExtendedUeInformation Get. + */ +public final class ExtendedUeInformationGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * ExtendedUeInfo4GGet.json + */ + /** + * Sample code: Get UE Information 4G. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getUEInformation4G(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.extendedUeInformations() + .getWithResponse("rg1", "TestPacketCoreCP", "84449105622", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * ExtendedUeInfo5GGet.json + */ + /** + * Sample code: Get UE Information 5G. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getUEInformation5G(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.extendedUeInformations() + .getWithResponse("rg1", "TestPacketCoreCP", "84449105622", com.azure.core.util.Context.NONE); + } +} +``` + +### MobileNetworks_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.HomeNetworkPublicKey; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.PublicLandMobileNetwork; +import com.azure.resourcemanager.mobilenetwork.models.PublicLandMobileNetworkHomeNetworkPublicKeys; +import java.util.Arrays; + +/** + * Samples for MobileNetworks CreateOrUpdate. + */ +public final class MobileNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkCreate.json + */ + /** + * Sample code: Create mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks() + .define("testMobileNetwork") + .withRegion("eastus") + .withExistingResourceGroup("rg1") + .withPublicLandMobileNetworkIdentifier(new PlmnId().withMcc("001").withMnc("01")) + .withPublicLandMobileNetworks(Arrays.asList(new PublicLandMobileNetwork().withMcc("001") + .withMnc("01") + .withHomeNetworkPublicKeys(new PublicLandMobileNetworkHomeNetworkPublicKeys() + .withProfileA(Arrays.asList( + new HomeNetworkPublicKey().withId(1) + .withUrl("https://contosovault.vault.azure.net/secrets/exampleHnpk"), + new HomeNetworkPublicKey().withId(2) + .withUrl( + "https://contosovault.vault.azure.net/secrets/exampleHnpk2/5e4876e9140e4e16bfe6e2cf92e0cbd2"))) + .withProfileB(Arrays.asList(new HomeNetworkPublicKey().withId(1) + .withUrl("https://contosovault.vault.azure.net/secrets/exampleHnpkProfileB")))))) + .create(); + } +} +``` + +### MobileNetworks_Delete + +```java +/** + * Samples for MobileNetworks Delete. + */ +public final class MobileNetworksDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkDelete.json + */ + /** + * Sample code: Delete mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks().delete("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### MobileNetworks_GetByResourceGroup + +```java +/** + * Samples for MobileNetworks GetByResourceGroup. + */ +public final class MobileNetworksGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/MobileNetworkGet. + * json + */ + /** + * Sample code: Get mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks() + .getByResourceGroupWithResponse("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### MobileNetworks_List + +```java +/** + * Samples for MobileNetworks List. + */ +public final class MobileNetworksListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkListBySubscription.json + */ + /** + * Sample code: List mobile networks in a subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listMobileNetworksInASubscription(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks().list(com.azure.core.util.Context.NONE); + } +} +``` + +### MobileNetworks_ListByResourceGroup + +```java +/** + * Samples for MobileNetworks ListByResourceGroup. + */ +public final class MobileNetworksListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkListByResourceGroup.json + */ + /** + * Sample code: List mobile networks in resource group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listMobileNetworksInResourceGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### MobileNetworks_ListSimGroups + +```java +/** + * Samples for MobileNetworks ListSimGroups. + */ +public final class MobileNetworksListSimGroupsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimGroupListByMobileNetwork.json + */ + /** + * Sample code: List SIM groups in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listSIMGroupsInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks().listSimGroups("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### MobileNetworks_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.MobileNetwork; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for MobileNetworks UpdateTags. + */ +public final class MobileNetworksUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkUpdateTags.json + */ + /** + * Sample code: Update mobile network tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateMobileNetworkTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + MobileNetwork resource = manager.mobileNetworks() + .getByResourceGroupWithResponse("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/OperationList. + * json + */ + /** + * Sample code: Get Registration Operations. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getRegistrationOperations(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCaptures_CreateOrUpdate + +```java +import java.util.Arrays; + +/** + * Samples for PacketCaptures CreateOrUpdate. + */ +public final class PacketCapturesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCaptureCreate.json + */ + /** + * Sample code: Create packet capture. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createPacketCapture(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures() + .define("pc1") + .withExistingPacketCoreControlPlane("rg1", "TestPacketCoreCP") + .withNetworkInterfaces(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")) + .withBytesToCapturePerPacket(10000L) + .withTotalBytesPerSession(100000L) + .withTimeLimitInSeconds(100) + .create(); + } +} +``` + +### PacketCaptures_Delete + +```java +/** + * Samples for PacketCaptures Delete. + */ +public final class PacketCapturesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCaptureDelete.json + */ + /** + * Sample code: Delete packet capture. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deletePacketCapture(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().delete("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCaptures_Get + +```java +/** + * Samples for PacketCaptures Get. + */ +public final class PacketCapturesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/PacketCaptureGet. + * json + */ + /** + * Sample code: Get packet capture session. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCaptureSession(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().getWithResponse("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCaptures_ListByPacketCoreControlPlane + +```java +/** + * Samples for PacketCaptures ListByPacketCoreControlPlane. + */ +public final class PacketCapturesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCaptureListByPacketCoreControlPlane.json + */ + /** + * Sample code: List packet capture sessions under a packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listPacketCaptureSessionsUnderAPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures() + .listByPacketCoreControlPlane("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCaptures_Stop + +```java +/** + * Samples for PacketCaptures Stop. + */ +public final class PacketCapturesStopSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/PacketCaptureStop + * .json + */ + /** + * Sample code: Stop packet capture session. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void stopPacketCaptureSession(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().stop("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlaneVersions_Get + +```java +/** + * Samples for PacketCoreControlPlaneVersions Get. + */ +public final class PacketCoreControlPlaneVersionsGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneVersionGet.json + */ + /** + * Sample code: Get packet core control plane version. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + getPacketCoreControlPlaneVersion(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions().getWithResponse("2404.0-1", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlaneVersions_GetBySubscription + +```java +/** + * Samples for PacketCoreControlPlaneVersions GetBySubscription. + */ +public final class PacketCoreControlPlaneVersionsGetBySubscriptionSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneVersionGetBySubscription.json + */ + /** + * Sample code: Get packet core control plane version by subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCoreControlPlaneVersionBySubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions() + .getBySubscriptionWithResponse("2404.0-1", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlaneVersions_List + +```java +/** + * Samples for PacketCoreControlPlaneVersions List. + */ +public final class PacketCoreControlPlaneVersionsListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneVersionList.json + */ + /** + * Sample code: Get supported packet core control plane versions. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSupportedPacketCoreControlPlaneVersions( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlaneVersions_ListBySubscription + +```java +/** + * Samples for PacketCoreControlPlaneVersions ListBySubscription. + */ +public final class PacketCoreControlPlaneVersionsListBySubscriptionSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneVersionListBySubscription.json + */ + /** + * Sample code: Get supported packet core control plane versions by subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSupportedPacketCoreControlPlaneVersionsBySubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions().listBySubscription(com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_CollectDiagnosticsPackage + +```java +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; + +/** + * Samples for PacketCoreControlPlanes CollectDiagnosticsPackage. + */ +public final class PacketCoreControlPlanesCollectDiagnosticsPackageSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneCollectDiagnosticsPackage.json + */ + /** + * Sample code: Collect diagnostics package from packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void collectDiagnosticsPackageFromPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes() + .collectDiagnosticsPackage("rg1", "TestPacketCoreCP", + new PacketCoreControlPlaneCollectDiagnosticsPackage().withStorageAccountBlobUrl( + "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip"), + com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.AuthenticationType; +import com.azure.resourcemanager.mobilenetwork.models.AzureStackEdgeDeviceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.BillingSku; +import com.azure.resourcemanager.mobilenetwork.models.ConnectedClusterResourceId; +import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; +import com.azure.resourcemanager.mobilenetwork.models.CustomLocationResourceId; +import com.azure.resourcemanager.mobilenetwork.models.DesiredInstallationState; +import com.azure.resourcemanager.mobilenetwork.models.EventHubConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.HttpsServerCertificate; +import com.azure.resourcemanager.mobilenetwork.models.Installation; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.NasEncryptionType; +import com.azure.resourcemanager.mobilenetwork.models.NasRerouteConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.SignalingConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SiteResourceId; +import java.util.Arrays; + +/** + * Samples for PacketCoreControlPlanes CreateOrUpdate. + */ +public final class PacketCoreControlPlanesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneCreate.json + */ + /** + * Sample code: Create packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + createPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes() + .define("TestPacketCoreCP") + .withRegion("eastus") + .withExistingResourceGroup("rg1") + .withSites(Arrays.asList(new SiteResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"))) + .withPlatform(new PlatformConfiguration().withType(PlatformType.AKS_HCI) + .withAzureStackEdgeDevice(new AzureStackEdgeDeviceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice")) + .withConnectedCluster(new ConnectedClusterResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster")) + .withCustomLocation(new CustomLocationResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"))) + .withControlPlaneAccessInterface(new InterfaceProperties().withName("N2")) + .withSku(BillingSku.G0) + .withLocalDiagnosticsAccess( + new LocalDiagnosticsAccessConfiguration().withAuthenticationType(AuthenticationType.AAD) + .withHttpsServerCertificate(new HttpsServerCertificate() + .withCertificateUrl("https://contosovault.vault.azure.net/certificates/ingress"))) + .withInstallation(new Installation().withDesiredState(DesiredInstallationState.INSTALLED)) + .withCoreNetworkTechnology(CoreNetworkType.FIVE_GC) + .withVersion("0.2.0") + .withUeMtu(1600) + .withEventHub(new EventHubConfiguration().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/contosoNamespace/eventHubs/contosoHub") + .withReportingInterval(60)) + .withSignaling( + new SignalingConfiguration().withNasReroute(new NasRerouteConfiguration().withMacroMmeGroupId(1024)) + .withNasEncryption(Arrays.asList(NasEncryptionType.NEA2_EEA2, NasEncryptionType.NEA1_EEA1, + NasEncryptionType.NEA0_EEA0))) + .create(); + } +} +``` + +### PacketCoreControlPlanes_Delete + +```java +/** + * Samples for PacketCoreControlPlanes Delete. + */ +public final class PacketCoreControlPlanesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneDelete.json + */ + /** + * Sample code: Delete packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + deletePacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().delete("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_GetByResourceGroup + +```java +/** + * Samples for PacketCoreControlPlanes GetByResourceGroup. + */ +public final class PacketCoreControlPlanesGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneGet.json + */ + /** + * Sample code: Get packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes() + .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_List + +```java +/** + * Samples for PacketCoreControlPlanes List. + */ +public final class PacketCoreControlPlanesListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneListBySubscription.json + */ + /** + * Sample code: List packet core control planes in a subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listPacketCoreControlPlanesInASubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_ListByResourceGroup + +```java +/** + * Samples for PacketCoreControlPlanes ListByResourceGroup. + */ +public final class PacketCoreControlPlanesListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneListByResourceGroup.json + */ + /** + * Sample code: List packet core control planes in resource group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listPacketCoreControlPlanesInResourceGroup( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_Reinstall + +```java +/** + * Samples for PacketCoreControlPlanes Reinstall. + */ +public final class PacketCoreControlPlanesReinstallSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneReinstall.json + */ + /** + * Sample code: Reinstall packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + reinstallPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().reinstall("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_Rollback + +```java +/** + * Samples for PacketCoreControlPlanes Rollback. + */ +public final class PacketCoreControlPlanesRollbackSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneRollback.json + */ + /** + * Sample code: Rollback packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + rollbackPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().rollback("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PacketCoreControlPlanes UpdateTags. + */ +public final class PacketCoreControlPlanesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlanePatch.json + */ + /** + * Sample code: Patch packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + patchPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + PacketCoreControlPlane resource = manager.packetCoreControlPlanes() + .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### PacketCoreDataPlanes_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; + +/** + * Samples for PacketCoreDataPlanes CreateOrUpdate. + */ +public final class PacketCoreDataPlanesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneCreate.json + */ + /** + * Sample code: Create packet core data plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createPacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreDataPlanes() + .define("testPacketCoreDP") + .withRegion("eastus") + .withExistingPacketCoreControlPlane("rg1", "testPacketCoreCP") + .withUserPlaneAccessInterface(new InterfaceProperties().withName("N3")) + .create(); + } +} +``` + +### PacketCoreDataPlanes_Delete + +```java +/** + * Samples for PacketCoreDataPlanes Delete. + */ +public final class PacketCoreDataPlanesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneDelete.json + */ + /** + * Sample code: Delete packet core data plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deletePacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreDataPlanes() + .delete("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreDataPlanes_Get + +```java +/** + * Samples for PacketCoreDataPlanes Get. + */ +public final class PacketCoreDataPlanesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneGet.json + */ + /** + * Sample code: Get packet core data plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreDataPlanes() + .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreDataPlanes_ListByPacketCoreControlPlane + +```java +/** + * Samples for PacketCoreDataPlanes ListByPacketCoreControlPlane. + */ +public final class PacketCoreDataPlanesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneListByPacketCoreControlPlane.json + */ + /** + * Sample code: List packet core data planes in a control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listPacketCoreDataPlanesInAControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreDataPlanes() + .listByPacketCoreControlPlane("rg1", "testPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreDataPlanes_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlane; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PacketCoreDataPlanes UpdateTags. + */ +public final class PacketCoreDataPlanesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneUpdateTags.json + */ + /** + * Sample code: Update packet core data plane tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + updatePacketCoreDataPlaneTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + PacketCoreDataPlane resource = manager.packetCoreDataPlanes() + .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RoutingInfo_Get + +```java +/** + * Samples for RoutingInfo Get. + */ +public final class RoutingInfoGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * RoutingInfoPacketCoreControlPlane.json + */ + /** + * Sample code: Get routing information for the packet core. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + getRoutingInformationForThePacketCore(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.routingInfoes().getWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### RoutingInfo_List + +```java +/** + * Samples for RoutingInfo List. + */ +public final class RoutingInfoListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * RoutingInfoListPacketCoreControlPlane.json + */ + /** + * Sample code: List routing information for the packet core. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listRoutingInformationForThePacketCore(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.routingInfoes().list("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### Services_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleQosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.ServiceDataFlowTemplate; +import com.azure.resourcemanager.mobilenetwork.models.TrafficControlPermission; +import java.util.Arrays; + +/** + * Samples for Services CreateOrUpdate. + */ +public final class ServicesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ServiceCreate. + * json + */ + /** + * Sample code: Create service. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.services() + .define("TestService") + .withRegion("eastus") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .withServicePrecedence(255) + .withPccRules(Arrays.asList(new PccRuleConfiguration().withRuleName("default-rule") + .withRulePrecedence(255) + .withRuleQosPolicy(new PccRuleQosPolicy().withFiveQi(9) + .withAllocationAndRetentionPriorityLevel(9) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates( + Arrays.asList(new ServiceDataFlowTemplate().withTemplateName("IP-to-server") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList("ip")) + .withRemoteIpList(Arrays.asList("10.3.4.0/24")) + .withPorts(Arrays.asList()))))) + .withServiceQosPolicy(new QosPolicy().withFiveQi(9) + .withAllocationAndRetentionPriorityLevel(9) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps"))) + .create(); + } +} +``` + +### Services_Delete + +```java +/** + * Samples for Services Delete. + */ +public final class ServicesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ServiceDelete. + * json + */ + /** + * Sample code: Delete service. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.services().delete("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE); + } +} +``` + +### Services_Get + +```java +/** + * Samples for Services Get. + */ +public final class ServicesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ServiceGet.json + */ + /** + * Sample code: Get service. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.services().getWithResponse("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE); + } +} +``` + +### Services_ListByMobileNetwork + +```java +/** + * Samples for Services ListByMobileNetwork. + */ +public final class ServicesListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * ServiceListByMobileNetwork.json + */ + /** + * Sample code: List services in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listServicesInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.services() + .listByMobileNetwork("testResourceGroupName", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### Services_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.Service; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Services UpdateTags. + */ +public final class ServicesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ServiceUpdateTags + * .json + */ + /** + * Sample code: Update service tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateServiceTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + Service resource = manager.services() + .getWithResponse("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### SimGroups_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.KeyVaultKey; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for SimGroups CreateOrUpdate. + */ +public final class SimGroupsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGroupCreate. + * json + */ + /** + * Sample code: Create SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups() + .define("testSimGroup") + .withRegion("eastus") + .withExistingResourceGroup("rg1") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .withEncryptionKey(new KeyVaultKey().withKeyUrl("fakeTokenPlaceholder")) + .withMobileNetwork(new MobileNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### SimGroups_Delete + +```java +/** + * Samples for SimGroups Delete. + */ +public final class SimGroupsDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGroupDelete. + * json + */ + /** + * Sample code: Delete SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups().delete("testResourceGroupName", "testSimGroup", com.azure.core.util.Context.NONE); + } +} +``` + +### SimGroups_GetByResourceGroup + +```java +/** + * Samples for SimGroups GetByResourceGroup. + */ +public final class SimGroupsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGroupGet.json + */ + /** + * Sample code: Get SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups() + .getByResourceGroupWithResponse("testResourceGroupName", "testSimGroupName", + com.azure.core.util.Context.NONE); + } +} +``` + +### SimGroups_List + +```java +/** + * Samples for SimGroups List. + */ +public final class SimGroupsListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimGroupListBySubscription.json + */ + /** + * Sample code: List SIM groups in a subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listSIMGroupsInASubscription(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups().list(com.azure.core.util.Context.NONE); + } +} +``` + +### SimGroups_ListByResourceGroup + +```java +/** + * Samples for SimGroups ListByResourceGroup. + */ +public final class SimGroupsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimGroupListByResourceGroup.json + */ + /** + * Sample code: List SIM groups in a resource group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listSIMGroupsInAResourceGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### SimGroups_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.mobilenetwork.models.SimGroup; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for SimGroups UpdateTags. + */ +public final class SimGroupsUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGroupPatch. + * json + */ + /** + * Sample code: Patch SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void patchSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + SimGroup resource = manager.simGroups() + .getByResourceGroupWithResponse("rg1", "testSimGroup", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### SimPolicies_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.PduSessionType; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.ServiceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** + * Samples for SimPolicies CreateOrUpdate. + */ +public final class SimPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimPolicyCreate. + * json + */ + /** + * Sample code: Create SIM policy. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies() + .define("testPolicy") + .withRegion("eastus") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .withUeAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) + .withDefaultSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withSliceConfigurations(Arrays.asList(new SliceConfiguration().withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + .withDataNetworkConfigurations(Arrays.asList(new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + .withSessionAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) + .withFiveQi(9) + .withAllocationAndRetentionPriorityLevel(9) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes(Arrays.asList()) + .withAllowedServices(Arrays.asList(new ServiceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"))) + .withMaximumNumberOfBufferedPackets(200))))) + .withRegistrationTimer(3240) + .create(); + } +} +``` + +### SimPolicies_Delete + +```java +/** + * Samples for SimPolicies Delete. + */ +public final class SimPoliciesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimPolicyDelete. + * json + */ + /** + * Sample code: Delete SIM policy. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies().delete("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE); + } +} +``` + +### SimPolicies_Get + +```java +/** + * Samples for SimPolicies Get. + */ +public final class SimPoliciesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimPolicyGet.json + */ + /** + * Sample code: Get SIM policy. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies() + .getWithResponse("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE); + } +} +``` + +### SimPolicies_ListByMobileNetwork + +```java +/** + * Samples for SimPolicies ListByMobileNetwork. + */ +public final class SimPoliciesListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimPolicyListByMobileNetwork.json + */ + /** + * Sample code: List SIM policies in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listSIMPoliciesInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies() + .listByMobileNetwork("testResourceGroupName", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### SimPolicies_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for SimPolicies UpdateTags. + */ +public final class SimPoliciesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimPolicyUpdateTags.json + */ + /** + * Sample code: Update SIM policy tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateSIMPolicyTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + SimPolicy resource = manager.simPolicies() + .getWithResponse("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Sims_BulkDelete + +```java +import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; +import java.util.Arrays; + +/** + * Samples for Sims BulkDelete. + */ +public final class SimsBulkDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimBulkDelete. + * json + */ + /** + * Sample code: Bulk delete SIMs from a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + bulkDeleteSIMsFromASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .bulkDelete("testResourceGroupName", "testSimGroup", + new SimDeleteList().withSims(Arrays.asList("testSim", "testSim2")), com.azure.core.util.Context.NONE); + } +} +``` + +### Sims_BulkUpload + +```java +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimNameAndProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; +import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** + * Samples for Sims BulkUpload. + */ +public final class SimsBulkUploadSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimBulkUpload. + * json + */ + /** + * Sample code: Bulk upload SIMs in a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .bulkUpload("rg1", "testSimGroup", new SimUploadList().withSims(Arrays.asList(new SimNameAndProperties() + .withName("testSim") + .withAuthenticationKey("fakeTokenPlaceholder") + .withOperatorKeyCode("fakeTokenPlaceholder") + .withInternationalMobileSubscriberIdentity("00000") + .withIntegratedCircuitCardIdentifier("8900000000000000000") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.1")))), + new SimNameAndProperties().withName("testSim2") + .withAuthenticationKey("fakeTokenPlaceholder") + .withOperatorKeyCode("fakeTokenPlaceholder") + .withInternationalMobileSubscriberIdentity("00000") + .withIntegratedCircuitCardIdentifier("8900000000000000001") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.2")))))), + com.azure.core.util.Context.NONE); + } +} +``` + +### Sims_BulkUploadEncrypted + +```java +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.SimNameAndEncryptedProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** + * Samples for Sims BulkUploadEncrypted. + */ +public final class SimsBulkUploadEncryptedSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimBulkUploadEncrypted.json + */ + /** + * Sample code: Bulk upload encrypted SIMs to a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + bulkUploadEncryptedSIMsToASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .bulkUploadEncrypted("rg1", "testSimGroup", new EncryptedSimUploadList().withVersion(1) + .withAzureKeyIdentifier(1) + .withVendorKeyFingerprint("fakeTokenPlaceholder") + .withEncryptedTransportKey("fakeTokenPlaceholder") + .withSignedTransportKey("fakeTokenPlaceholder") + .withSims(Arrays.asList(new SimNameAndEncryptedProperties().withName("testSim") + .withEncryptedCredentials("fakeTokenPlaceholder") + .withInternationalMobileSubscriberIdentity("00000") + .withIntegratedCircuitCardIdentifier("8900000000000000000") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.1")))), + new SimNameAndEncryptedProperties().withName("testSim2") + .withEncryptedCredentials("fakeTokenPlaceholder") + .withInternationalMobileSubscriberIdentity("00000") + .withIntegratedCircuitCardIdentifier("8900000000000000001") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.2")))))), + com.azure.core.util.Context.NONE); + } +} +``` + +### Sims_Clone + +```java +import com.azure.resourcemanager.mobilenetwork.models.SimClone; +import com.azure.resourcemanager.mobilenetwork.models.SimGroupResourceId; +import java.util.Arrays; + +/** + * Samples for Sims Clone. + */ +public final class SimsCloneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimClone.json + */ + /** + * Sample code: Clone list of SIMs to target SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + cloneListOfSIMsToTargetSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .clone("testResourceGroupName", "testSimGroup", + new SimClone().withTargetSimGroupId(new SimGroupResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.MobileNetwork/simGroups/testSimGroup1")) + .withSims(Arrays.asList("testSim", "testSim2")), + com.azure.core.util.Context.NONE); + } +} +``` + +### Sims_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** + * Samples for Sims CreateOrUpdate. + */ +public final class SimsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimCreate.json + */ + /** + * Sample code: Create SIM. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .define("testSim") + .withExistingSimGroup("rg1", "testSimGroup") + .withInternationalMobileSubscriberIdentity("00000") + .withAuthenticationKey("00000000000000000000000000000000") + .withOperatorKeyCode("00000000000000000000000000000000") + .withIntegratedCircuitCardIdentifier("8900000000000000000") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.1")))) + .create(); + } +} +``` + +### Sims_Delete + +```java +/** + * Samples for Sims Delete. + */ +public final class SimsDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimDelete.json + */ + /** + * Sample code: Delete SIM. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims().delete("testResourceGroupName", "testSimGroup", "testSim", com.azure.core.util.Context.NONE); + } +} +``` + +### Sims_Get + +```java +/** + * Samples for Sims Get. + */ +public final class SimsGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGet.json + */ + /** + * Sample code: Get SIM. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .getWithResponse("testResourceGroupName", "testSimGroup", "testSimName", com.azure.core.util.Context.NONE); + } +} +``` + +### Sims_ListByGroup + +```java +/** + * Samples for Sims ListByGroup. + */ +public final class SimsListByGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimListBySimGroup + * .json + */ + /** + * Sample code: List SIMs in a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims().listByGroup("rg1", "testSimGroup", com.azure.core.util.Context.NONE); + } +} +``` + +### Sims_Move + +```java +import com.azure.resourcemanager.mobilenetwork.models.SimGroupResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimMove; +import java.util.Arrays; + +/** + * Samples for Sims Move. + */ +public final class SimsMoveSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimMove.json + */ + /** + * Sample code: Move list of SIMs to target SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + moveListOfSIMsToTargetSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .move("testResourceGroupName", "testSimGroup", + new SimMove().withTargetSimGroupId(new SimGroupResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.MobileNetwork/simGroups/testSimGroup1")) + .withSims(Arrays.asList("testSim", "testSim2")), + com.azure.core.util.Context.NONE); + } +} +``` + +### Sites_CreateOrUpdate + +```java +/** + * Samples for Sites CreateOrUpdate. + */ +public final class SitesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SiteCreate.json + */ + /** + * Sample code: Create mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites() + .define("testSite") + .withRegion("testLocation") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .create(); + } +} +``` + +### Sites_Delete + +```java +/** + * Samples for Sites Delete. + */ +public final class SitesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SiteDelete.json + */ + /** + * Sample code: Delete mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites().delete("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE); + } +} +``` + +### Sites_DeletePacketCore + +```java +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; + +/** + * Samples for Sites DeletePacketCore. + */ +public final class SitesDeletePacketCoreSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SiteDeletePacketCore.json + */ + /** + * Sample code: Delete packet core in mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + deletePacketCoreInMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites() + .deletePacketCore("rg1", "testMobileNetwork", "testSite", + new SiteDeletePacketCore().withPacketCore(new PacketCoreControlPlaneResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP")), + com.azure.core.util.Context.NONE); + } +} +``` + +### Sites_Get + +```java +/** + * Samples for Sites Get. + */ +public final class SitesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SiteGet.json + */ + /** + * Sample code: Get mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites().getWithResponse("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE); + } +} +``` + +### Sites_ListByMobileNetwork + +```java +/** + * Samples for Sites ListByMobileNetwork. + */ +public final class SitesListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SiteListByMobileNetwork.json + */ + /** + * Sample code: List mobile network sites in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listMobileNetworkSitesInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### Sites_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.Site; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Sites UpdateTags. + */ +public final class SitesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SiteUpdateTags. + * json + */ + /** + * Sample code: Update mobile network site tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + updateMobileNetworkSiteTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + Site resource = manager.sites() + .getWithResponse("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Slices_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.Snssai; + +/** + * Samples for Slices CreateOrUpdate. + */ +public final class SlicesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SliceCreate.json + */ + /** + * Sample code: Create network slice. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.slices() + .define("testSlice") + .withRegion("eastus") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .withSnssai(new Snssai().withSst(1).withSd("1abcde")) + .withDescription("myFavouriteSlice") + .create(); + } +} +``` + +### Slices_Delete + +```java +/** + * Samples for Slices Delete. + */ +public final class SlicesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SliceDelete.json + */ + /** + * Sample code: Delete network slice. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.slices().delete("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE); + } +} +``` + +### Slices_Get + +```java +/** + * Samples for Slices Get. + */ +public final class SlicesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SliceGet.json + */ + /** + * Sample code: Get network slice. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.slices().getWithResponse("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE); + } +} +``` + +### Slices_ListByMobileNetwork + +```java +/** + * Samples for Slices ListByMobileNetwork. + */ +public final class SlicesListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SliceListByMobileNetwork.json + */ + /** + * Sample code: List network slices in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listNetworkSlicesInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.slices().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} +``` + +### Slices_UpdateTags + +```java +import com.azure.resourcemanager.mobilenetwork.models.Slice; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Slices UpdateTags. + */ +public final class SlicesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SliceUpdateTags. + * json + */ + /** + * Sample code: Update network slice tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateNetworkSliceTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + Slice resource = manager.slices() + .getWithResponse("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### UeInformation_List + +```java +/** + * Samples for UeInformation List. + */ +public final class UeInformationListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/UeInfoList.json + */ + /** + * Sample code: Get UE Information. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getUEInformation(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.ueInformations().list("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml new file mode 100644 index 000000000000..71da493790f6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml @@ -0,0 +1,74 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-mobilenetwork + 1.4.0-beta.1 + jar + + Microsoft Azure SDK for MobileNetwork Management + Please note, this package has been deprecated and will no longer be maintained after 09-30-2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + false + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-management + 1.19.8 + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/MobileNetworkManager.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/MobileNetworkManager.java new file mode 100644 index 000000000000..3f8594e2f63b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/MobileNetworkManager.java @@ -0,0 +1,551 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.MobileNetworkManagementClient; +import com.azure.resourcemanager.mobilenetwork.implementation.AttachedDataNetworksImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.DataNetworksImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.DiagnosticsPackagesImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.ExtendedUeInformationsImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.MobileNetworkManagementClientBuilder; +import com.azure.resourcemanager.mobilenetwork.implementation.MobileNetworksImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.OperationsImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.PacketCapturesImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreControlPlaneVersionsImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreControlPlanesImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreDataPlanesImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.RoutingInfoesImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.ServicesImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.SimGroupsImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.SimPoliciesImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.SimsImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.SitesImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.SlicesImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.UeInformationsImpl; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworks; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworks; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackages; +import com.azure.resourcemanager.mobilenetwork.models.ExtendedUeInformations; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetworks; +import com.azure.resourcemanager.mobilenetwork.models.Operations; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptures; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersions; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlanes; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlanes; +import com.azure.resourcemanager.mobilenetwork.models.RoutingInfoes; +import com.azure.resourcemanager.mobilenetwork.models.Services; +import com.azure.resourcemanager.mobilenetwork.models.SimGroups; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicies; +import com.azure.resourcemanager.mobilenetwork.models.Sims; +import com.azure.resourcemanager.mobilenetwork.models.Sites; +import com.azure.resourcemanager.mobilenetwork.models.Slices; +import com.azure.resourcemanager.mobilenetwork.models.UeInformations; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Entry point to MobileNetworkManager. + * The resources in this API specification will be used to manage attached data network resources in mobile network + * attached to a particular packet core instance. + */ +public final class MobileNetworkManager { + private AttachedDataNetworks attachedDataNetworks; + + private DataNetworks dataNetworks; + + private DiagnosticsPackages diagnosticsPackages; + + private MobileNetworks mobileNetworks; + + private Operations operations; + + private PacketCaptures packetCaptures; + + private PacketCoreControlPlanes packetCoreControlPlanes; + + private RoutingInfoes routingInfoes; + + private PacketCoreControlPlaneVersions packetCoreControlPlaneVersions; + + private PacketCoreDataPlanes packetCoreDataPlanes; + + private Services services; + + private Sims sims; + + private SimGroups simGroups; + + private SimPolicies simPolicies; + + private Sites sites; + + private Slices slices; + + private ExtendedUeInformations extendedUeInformations; + + private UeInformations ueInformations; + + private final MobileNetworkManagementClient clientObject; + + private MobileNetworkManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = new MobileNetworkManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of MobileNetwork service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the MobileNetwork service API instance. + */ + public static MobileNetworkManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of MobileNetwork service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the MobileNetwork service API instance. + */ + public static MobileNetworkManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new MobileNetworkManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create MobileNetworkManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new MobileNetworkManager.Configurable(); + } + + /** + * The Configurable allowing configurations to be set. + */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + *

      + * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of MobileNetwork service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the MobileNetwork service API instance. + */ + public MobileNetworkManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder.append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.mobilenetwork") + .append("/") + .append("1.3.0"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder.append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new MobileNetworkManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of AttachedDataNetworks. It manages AttachedDataNetwork. + * + * @return Resource collection API of AttachedDataNetworks. + */ + public AttachedDataNetworks attachedDataNetworks() { + if (this.attachedDataNetworks == null) { + this.attachedDataNetworks = new AttachedDataNetworksImpl(clientObject.getAttachedDataNetworks(), this); + } + return attachedDataNetworks; + } + + /** + * Gets the resource collection API of DataNetworks. It manages DataNetwork. + * + * @return Resource collection API of DataNetworks. + */ + public DataNetworks dataNetworks() { + if (this.dataNetworks == null) { + this.dataNetworks = new DataNetworksImpl(clientObject.getDataNetworks(), this); + } + return dataNetworks; + } + + /** + * Gets the resource collection API of DiagnosticsPackages. + * + * @return Resource collection API of DiagnosticsPackages. + */ + public DiagnosticsPackages diagnosticsPackages() { + if (this.diagnosticsPackages == null) { + this.diagnosticsPackages = new DiagnosticsPackagesImpl(clientObject.getDiagnosticsPackages(), this); + } + return diagnosticsPackages; + } + + /** + * Gets the resource collection API of MobileNetworks. It manages MobileNetwork. + * + * @return Resource collection API of MobileNetworks. + */ + public MobileNetworks mobileNetworks() { + if (this.mobileNetworks == null) { + this.mobileNetworks = new MobileNetworksImpl(clientObject.getMobileNetworks(), this); + } + return mobileNetworks; + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of PacketCaptures. It manages PacketCapture. + * + * @return Resource collection API of PacketCaptures. + */ + public PacketCaptures packetCaptures() { + if (this.packetCaptures == null) { + this.packetCaptures = new PacketCapturesImpl(clientObject.getPacketCaptures(), this); + } + return packetCaptures; + } + + /** + * Gets the resource collection API of PacketCoreControlPlanes. It manages PacketCoreControlPlane. + * + * @return Resource collection API of PacketCoreControlPlanes. + */ + public PacketCoreControlPlanes packetCoreControlPlanes() { + if (this.packetCoreControlPlanes == null) { + this.packetCoreControlPlanes + = new PacketCoreControlPlanesImpl(clientObject.getPacketCoreControlPlanes(), this); + } + return packetCoreControlPlanes; + } + + /** + * Gets the resource collection API of RoutingInfoes. + * + * @return Resource collection API of RoutingInfoes. + */ + public RoutingInfoes routingInfoes() { + if (this.routingInfoes == null) { + this.routingInfoes = new RoutingInfoesImpl(clientObject.getRoutingInfoes(), this); + } + return routingInfoes; + } + + /** + * Gets the resource collection API of PacketCoreControlPlaneVersions. + * + * @return Resource collection API of PacketCoreControlPlaneVersions. + */ + public PacketCoreControlPlaneVersions packetCoreControlPlaneVersions() { + if (this.packetCoreControlPlaneVersions == null) { + this.packetCoreControlPlaneVersions + = new PacketCoreControlPlaneVersionsImpl(clientObject.getPacketCoreControlPlaneVersions(), this); + } + return packetCoreControlPlaneVersions; + } + + /** + * Gets the resource collection API of PacketCoreDataPlanes. It manages PacketCoreDataPlane. + * + * @return Resource collection API of PacketCoreDataPlanes. + */ + public PacketCoreDataPlanes packetCoreDataPlanes() { + if (this.packetCoreDataPlanes == null) { + this.packetCoreDataPlanes = new PacketCoreDataPlanesImpl(clientObject.getPacketCoreDataPlanes(), this); + } + return packetCoreDataPlanes; + } + + /** + * Gets the resource collection API of Services. It manages Service. + * + * @return Resource collection API of Services. + */ + public Services services() { + if (this.services == null) { + this.services = new ServicesImpl(clientObject.getServices(), this); + } + return services; + } + + /** + * Gets the resource collection API of Sims. It manages Sim. + * + * @return Resource collection API of Sims. + */ + public Sims sims() { + if (this.sims == null) { + this.sims = new SimsImpl(clientObject.getSims(), this); + } + return sims; + } + + /** + * Gets the resource collection API of SimGroups. It manages SimGroup. + * + * @return Resource collection API of SimGroups. + */ + public SimGroups simGroups() { + if (this.simGroups == null) { + this.simGroups = new SimGroupsImpl(clientObject.getSimGroups(), this); + } + return simGroups; + } + + /** + * Gets the resource collection API of SimPolicies. It manages SimPolicy. + * + * @return Resource collection API of SimPolicies. + */ + public SimPolicies simPolicies() { + if (this.simPolicies == null) { + this.simPolicies = new SimPoliciesImpl(clientObject.getSimPolicies(), this); + } + return simPolicies; + } + + /** + * Gets the resource collection API of Sites. It manages Site. + * + * @return Resource collection API of Sites. + */ + public Sites sites() { + if (this.sites == null) { + this.sites = new SitesImpl(clientObject.getSites(), this); + } + return sites; + } + + /** + * Gets the resource collection API of Slices. It manages Slice. + * + * @return Resource collection API of Slices. + */ + public Slices slices() { + if (this.slices == null) { + this.slices = new SlicesImpl(clientObject.getSlices(), this); + } + return slices; + } + + /** + * Gets the resource collection API of ExtendedUeInformations. + * + * @return Resource collection API of ExtendedUeInformations. + */ + public ExtendedUeInformations extendedUeInformations() { + if (this.extendedUeInformations == null) { + this.extendedUeInformations + = new ExtendedUeInformationsImpl(clientObject.getExtendedUeInformations(), this); + } + return extendedUeInformations; + } + + /** + * Gets the resource collection API of UeInformations. + * + * @return Resource collection API of UeInformations. + */ + public UeInformations ueInformations() { + if (this.ueInformations == null) { + this.ueInformations = new UeInformationsImpl(clientObject.getUeInformations(), this); + } + return ueInformations; + } + + /** + * Gets wrapped service client MobileNetworkManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. + * + * @return Wrapped service client MobileNetworkManagementClient. + */ + public MobileNetworkManagementClient serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/AttachedDataNetworksClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/AttachedDataNetworksClient.java new file mode 100644 index 000000000000..793272bf2d24 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/AttachedDataNetworksClient.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in AttachedDataNetworksClient. + */ +public interface AttachedDataNetworksClient { + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName); + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, Context context); + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName); + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, Context context); + + /** + * Gets information about the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, Context context); + + /** + * Gets information about the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AttachedDataNetworkInner get(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName); + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of attached data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AttachedDataNetworkInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, AttachedDataNetworkInner parameters); + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of attached data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AttachedDataNetworkInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, AttachedDataNetworkInner parameters, Context context); + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AttachedDataNetworkInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, AttachedDataNetworkInner parameters); + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AttachedDataNetworkInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, AttachedDataNetworkInner parameters, + Context context); + + /** + * Updates an attached data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to update attached data network tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + TagsObject parameters, Context context); + + /** + * Updates an attached data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to update attached data network tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AttachedDataNetworkInner updateTags(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, TagsObject parameters); + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName); + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DataNetworksClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DataNetworksClient.java new file mode 100644 index 000000000000..4e83b325463d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DataNetworksClient.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in DataNetworksClient. + */ +public interface DataNetworksClient { + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String dataNetworkName); + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, Context context); + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String dataNetworkName); + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String dataNetworkName, Context context); + + /** + * Gets information about the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, Context context); + + /** + * Gets information about the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataNetworkInner get(String resourceGroupName, String mobileNetworkName, String dataNetworkName); + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String dataNetworkName, DataNetworkInner parameters); + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String dataNetworkName, DataNetworkInner parameters, Context context); + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataNetworkInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String dataNetworkName, + DataNetworkInner parameters); + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataNetworkInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String dataNetworkName, + DataNetworkInner parameters, Context context); + + /** + * Updates data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to update data network tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, TagsObject parameters, Context context); + + /** + * Updates data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to update data network tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataNetworkInner updateTags(String resourceGroupName, String mobileNetworkName, String dataNetworkName, + TagsObject parameters); + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DiagnosticsPackagesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DiagnosticsPackagesClient.java new file mode 100644 index 000000000000..39eb4255f92d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DiagnosticsPackagesClient.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; + +/** + * An instance of this class provides access to all the operations defined in DiagnosticsPackagesClient. + */ +public interface DiagnosticsPackagesClient { + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DiagnosticsPackageInner> + beginCreateOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DiagnosticsPackageInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context); + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsPackageInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName); + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsPackageInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context); + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified diagnostics package along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context); + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified diagnostics package. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsPackageInner get(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, + Context context); + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName); + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/ExtendedUeInformationsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/ExtendedUeInformationsClient.java new file mode 100644 index 000000000000..17ee5153b9aa --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/ExtendedUeInformationsClient.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ExtendedUeInfoInner; + +/** + * An instance of this class provides access to all the operations defined in ExtendedUeInformationsClient. + */ +public interface ExtendedUeInformationsClient { + /** + * Gets extended information about the specified UE from the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param ueId IMSI of a UE. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extended information about the specified UE from the packet core along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String ueId, Context context); + + /** + * Gets extended information about the specified UE from the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param ueId IMSI of a UE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extended information about the specified UE from the packet core. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtendedUeInfoInner get(String resourceGroupName, String packetCoreControlPlaneName, String ueId); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworkManagementClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworkManagementClient.java new file mode 100644 index 000000000000..5ea398ea7b82 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworkManagementClient.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for MobileNetworkManagementClient class. + */ +public interface MobileNetworkManagementClient { + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the AttachedDataNetworksClient object to access its operations. + * + * @return the AttachedDataNetworksClient object. + */ + AttachedDataNetworksClient getAttachedDataNetworks(); + + /** + * Gets the DataNetworksClient object to access its operations. + * + * @return the DataNetworksClient object. + */ + DataNetworksClient getDataNetworks(); + + /** + * Gets the DiagnosticsPackagesClient object to access its operations. + * + * @return the DiagnosticsPackagesClient object. + */ + DiagnosticsPackagesClient getDiagnosticsPackages(); + + /** + * Gets the MobileNetworksClient object to access its operations. + * + * @return the MobileNetworksClient object. + */ + MobileNetworksClient getMobileNetworks(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the PacketCapturesClient object to access its operations. + * + * @return the PacketCapturesClient object. + */ + PacketCapturesClient getPacketCaptures(); + + /** + * Gets the PacketCoreControlPlanesClient object to access its operations. + * + * @return the PacketCoreControlPlanesClient object. + */ + PacketCoreControlPlanesClient getPacketCoreControlPlanes(); + + /** + * Gets the RoutingInfoesClient object to access its operations. + * + * @return the RoutingInfoesClient object. + */ + RoutingInfoesClient getRoutingInfoes(); + + /** + * Gets the PacketCoreControlPlaneVersionsClient object to access its operations. + * + * @return the PacketCoreControlPlaneVersionsClient object. + */ + PacketCoreControlPlaneVersionsClient getPacketCoreControlPlaneVersions(); + + /** + * Gets the PacketCoreDataPlanesClient object to access its operations. + * + * @return the PacketCoreDataPlanesClient object. + */ + PacketCoreDataPlanesClient getPacketCoreDataPlanes(); + + /** + * Gets the ServicesClient object to access its operations. + * + * @return the ServicesClient object. + */ + ServicesClient getServices(); + + /** + * Gets the SimsClient object to access its operations. + * + * @return the SimsClient object. + */ + SimsClient getSims(); + + /** + * Gets the SimGroupsClient object to access its operations. + * + * @return the SimGroupsClient object. + */ + SimGroupsClient getSimGroups(); + + /** + * Gets the SimPoliciesClient object to access its operations. + * + * @return the SimPoliciesClient object. + */ + SimPoliciesClient getSimPolicies(); + + /** + * Gets the SitesClient object to access its operations. + * + * @return the SitesClient object. + */ + SitesClient getSites(); + + /** + * Gets the SlicesClient object to access its operations. + * + * @return the SlicesClient object. + */ + SlicesClient getSlices(); + + /** + * Gets the ExtendedUeInformationsClient object to access its operations. + * + * @return the ExtendedUeInformationsClient object. + */ + ExtendedUeInformationsClient getExtendedUeInformations(); + + /** + * Gets the UeInformationsClient object to access its operations. + * + * @return the UeInformationsClient object. + */ + UeInformationsClient getUeInformations(); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworksClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworksClient.java new file mode 100644 index 000000000000..e0808390e7aa --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworksClient.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.MobileNetworkInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; + +/** + * An instance of this class provides access to all the operations defined in MobileNetworksClient. + */ +public interface MobileNetworksClient { + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName); + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName); + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Gets information about the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String mobileNetworkName, + Context context); + + /** + * Gets information about the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MobileNetworkInner getByResourceGroup(String resourceGroupName, String mobileNetworkName); + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mobile network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MobileNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, MobileNetworkInner parameters); + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mobile network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MobileNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, MobileNetworkInner parameters, Context context); + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MobileNetworkInner createOrUpdate(String resourceGroupName, String mobileNetworkName, + MobileNetworkInner parameters); + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MobileNetworkInner createOrUpdate(String resourceGroupName, String mobileNetworkName, MobileNetworkInner parameters, + Context context); + + /** + * Updates mobile network tags and managed identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to update mobile network tags and/or identity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + IdentityAndTagsObject parameters, Context context); + + /** + * Updates mobile network tags and managed identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to update mobile network tags and/or identity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MobileNetworkInner updateTags(String resourceGroupName, String mobileNetworkName, IdentityAndTagsObject parameters); + + /** + * Lists all the mobile networks in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all the mobile networks in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSimGroups(String resourceGroupName, String mobileNetworkName); + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSimGroups(String resourceGroupName, String mobileNetworkName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/OperationsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/OperationsClient.java new file mode 100644 index 000000000000..06fde2dbc79f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/OperationsClient.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.OperationInner; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public interface OperationsClient { + /** + * Gets a list of the operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of the operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCapturesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCapturesClient.java new file mode 100644 index 000000000000..83ab40a6ab1a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCapturesClient.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; + +/** + * An instance of this class provides access to all the operations defined in PacketCapturesClient. + */ +public interface PacketCapturesClient { + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PacketCaptureInner> beginCreateOrUpdate(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, PacketCaptureInner parameters); + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PacketCaptureInner> beginCreateOrUpdate(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, PacketCaptureInner parameters, Context context); + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCaptureInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, PacketCaptureInner parameters); + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCaptureInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, PacketCaptureInner parameters, Context context); + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context); + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCaptureInner get(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginStop(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginStop(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner stop(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner stop(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context); + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName); + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneVersionsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneVersionsClient.java new file mode 100644 index 000000000000..8e5c93cc61ef --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneVersionsClient.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionInner; + +/** + * An instance of this class provides access to all the operations defined in PacketCoreControlPlaneVersionsClient. + */ +public interface PacketCoreControlPlaneVersionsClient { + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String versionName, Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreControlPlaneVersionInner get(String versionName); + + /** + * Lists all supported packet core control planes versions. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBySubscriptionWithResponse(String versionName, Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreControlPlaneVersionInner getBySubscription(String versionName); + + /** + * Lists all supported packet core control planes versions. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscription(); + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscription(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlanesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlanesClient.java new file mode 100644 index 000000000000..1335db721884 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlanesClient.java @@ -0,0 +1,436 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; + +/** + * An instance of this class provides access to all the operations defined in PacketCoreControlPlanesClient. + */ +public interface PacketCoreControlPlanesClient { + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + Context context); + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Gets information about the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, Context context); + + /** + * Gets information about the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreControlPlaneInner getByResourceGroup(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PacketCoreControlPlaneInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters); + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PacketCoreControlPlaneInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters, + Context context); + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreControlPlaneInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneInner parameters); + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreControlPlaneInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneInner parameters, Context context); + + /** + * Patch packet core control plane resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to patch packet core control plane resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, IdentityAndTagsObject parameters, Context context); + + /** + * Patch packet core control plane resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to patch packet core control plane resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreControlPlaneInner updateTags(String resourceGroupName, String packetCoreControlPlaneName, + IdentityAndTagsObject parameters); + + /** + * Lists all the packet core control planes in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all the packet core control planes in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginRollback(String resourceGroupName, + String packetCoreControlPlaneName); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginRollback(String resourceGroupName, + String packetCoreControlPlaneName, Context context); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> + beginReinstall(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> + beginReinstall(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( + String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( + String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, Context context); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner collectDiagnosticsPackage(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner collectDiagnosticsPackage(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreDataPlanesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreDataPlanesClient.java new file mode 100644 index 000000000000..e442bdc05557 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreDataPlanesClient.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in PacketCoreDataPlanesClient. + */ +public interface PacketCoreDataPlanesClient { + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName); + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, Context context); + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName); + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + Context context); + + /** + * Gets information about the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, Context context); + + /** + * Gets information about the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreDataPlaneInner get(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName); + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PacketCoreDataPlaneInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + PacketCoreDataPlaneInner parameters); + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PacketCoreDataPlaneInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + PacketCoreDataPlaneInner parameters, Context context); + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreDataPlaneInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters); + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreDataPlaneInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters, Context context); + + /** + * Updates packet core data planes tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to update packet core data plane tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, TagsObject parameters, Context context); + + /** + * Updates packet core data planes tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to update packet core data plane tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreDataPlaneInner updateTags(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, TagsObject parameters); + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName); + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/RoutingInfoesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/RoutingInfoesClient.java new file mode 100644 index 000000000000..b9e624f7cc6f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/RoutingInfoesClient.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoModelInner; + +/** + * An instance of this class provides access to all the operations defined in RoutingInfoesClient. + */ +public interface RoutingInfoesClient { + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName, + Context context); + + /** + * Get the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the routing information for the packet core along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + Context context); + + /** + * Get the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the routing information for the packet core. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RoutingInfoModelInner get(String resourceGroupName, String packetCoreControlPlaneName); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/ServicesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/ServicesClient.java new file mode 100644 index 000000000000..462b57fad5c9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/ServicesClient.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ServiceInner; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in ServicesClient. + */ +public interface ServicesClient { + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String serviceName); + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String serviceName, Context context); + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String serviceName); + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String serviceName, Context context); + + /** + * Gets information about the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String mobileNetworkName, String serviceName, + Context context); + + /** + * Gets information about the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServiceInner get(String resourceGroupName, String mobileNetworkName, String serviceName); + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of service resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ServiceInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String serviceName, ServiceInner parameters); + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of service resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ServiceInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String serviceName, ServiceInner parameters, Context context); + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServiceInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String serviceName, + ServiceInner parameters); + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServiceInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String serviceName, + ServiceInner parameters, Context context); + + /** + * Updates service tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to update service tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + String serviceName, TagsObject parameters, Context context); + + /** + * Updates service tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to update service tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServiceInner updateTags(String resourceGroupName, String mobileNetworkName, String serviceName, + TagsObject parameters); + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimGroupsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimGroupsClient.java new file mode 100644 index 000000000000..4eb1106ef762 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimGroupsClient.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; + +/** + * An instance of this class provides access to all the operations defined in SimGroupsClient. + */ +public interface SimGroupsClient { + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String simGroupName); + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String simGroupName, Context context); + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String simGroupName); + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String simGroupName, Context context); + + /** + * Gets information about the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String simGroupName, + Context context); + + /** + * Gets information about the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimGroupInner getByResourceGroup(String resourceGroupName, String simGroupName); + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SimGroupInner> beginCreateOrUpdate(String resourceGroupName, + String simGroupName, SimGroupInner parameters); + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SimGroupInner> beginCreateOrUpdate(String resourceGroupName, + String simGroupName, SimGroupInner parameters, Context context); + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimGroupInner createOrUpdate(String resourceGroupName, String simGroupName, SimGroupInner parameters); + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimGroupInner createOrUpdate(String resourceGroupName, String simGroupName, SimGroupInner parameters, + Context context); + + /** + * Patch SIM group resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to patch SIM group resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String simGroupName, + IdentityAndTagsObject parameters, Context context); + + /** + * Patch SIM group resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to patch SIM group resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimGroupInner updateTags(String resourceGroupName, String simGroupName, IdentityAndTagsObject parameters); + + /** + * Gets all the SIM groups in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets all the SIM groups in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimPoliciesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimPoliciesClient.java new file mode 100644 index 000000000000..23427f54f8e5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimPoliciesClient.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyInner; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in SimPoliciesClient. + */ +public interface SimPoliciesClient { + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String simPolicyName); + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String simPolicyName, Context context); + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName); + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName, Context context); + + /** + * Gets information about the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String mobileNetworkName, String simPolicyName, + Context context); + + /** + * Gets information about the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimPolicyInner get(String resourceGroupName, String mobileNetworkName, String simPolicyName); + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SimPolicyInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String simPolicyName, SimPolicyInner parameters); + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SimPolicyInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String simPolicyName, SimPolicyInner parameters, Context context); + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimPolicyInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String simPolicyName, + SimPolicyInner parameters); + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimPolicyInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String simPolicyName, + SimPolicyInner parameters, Context context); + + /** + * Updates SIM policy tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to update SIM policy tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + String simPolicyName, TagsObject parameters, Context context); + + /** + * Updates SIM policy tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to update SIM policy tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimPolicyInner updateTags(String resourceGroupName, String mobileNetworkName, String simPolicyName, + TagsObject parameters); + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimsClient.java new file mode 100644 index 000000000000..2881dc422336 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimsClient.java @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner; +import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.SimClone; +import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; +import com.azure.resourcemanager.mobilenetwork.models.SimMove; +import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; + +/** + * An instance of this class provides access to all the operations defined in SimsClient. + */ +public interface SimsClient { + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String simGroupName, String simName); + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String simGroupName, String simName, + Context context); + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String simGroupName, String simName); + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String simGroupName, String simName, Context context); + + /** + * Gets information about the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String simGroupName, String simName, Context context); + + /** + * Gets information about the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimInner get(String resourceGroupName, String simGroupName, String simName); + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SimInner> beginCreateOrUpdate(String resourceGroupName, String simGroupName, + String simName, SimInner parameters); + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SimInner> beginCreateOrUpdate(String resourceGroupName, String simGroupName, + String simName, SimInner parameters, Context context); + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimInner createOrUpdate(String resourceGroupName, String simGroupName, String simName, SimInner parameters); + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimInner createOrUpdate(String resourceGroupName, String simGroupName, String simName, SimInner parameters, + Context context); + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByGroup(String resourceGroupName, String simGroupName); + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByGroup(String resourceGroupName, String simGroupName, Context context); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> + beginBulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> + beginBulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters, Context context); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters, + Context context); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> + beginBulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> + beginBulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters, + Context context); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> + beginBulkUploadEncrypted(String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkUploadEncrypted(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkUploadEncrypted(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters, Context context); + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginMove(String resourceGroupName, + String simGroupName, SimMove parameters); + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginMove(String resourceGroupName, + String simGroupName, SimMove parameters, Context context); + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner move(String resourceGroupName, String simGroupName, SimMove parameters); + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner move(String resourceGroupName, String simGroupName, SimMove parameters, Context context); + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginClone(String resourceGroupName, + String simGroupName, SimClone parameters); + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginClone(String resourceGroupName, + String simGroupName, SimClone parameters, Context context); + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner clone(String resourceGroupName, String simGroupName, SimClone parameters); + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner clone(String resourceGroupName, String simGroupName, SimClone parameters, + Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SitesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SitesClient.java new file mode 100644 index 000000000000..34b2a967b712 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SitesClient.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in SitesClient. + */ +public interface SitesClient { + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, String siteName); + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, String siteName, + Context context); + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String siteName); + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String siteName, Context context); + + /** + * Gets information about the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String mobileNetworkName, String siteName, + Context context); + + /** + * Gets information about the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner get(String resourceGroupName, String mobileNetworkName, String siteName); + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of site resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteInner> beginCreateOrUpdate(String resourceGroupName, String mobileNetworkName, + String siteName, SiteInner parameters); + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of site resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteInner> beginCreateOrUpdate(String resourceGroupName, String mobileNetworkName, + String siteName, SiteInner parameters, Context context); + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String siteName, SiteInner parameters); + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String siteName, SiteInner parameters, + Context context); + + /** + * Updates site tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to update network site tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, String siteName, + TagsObject parameters, Context context); + + /** + * Updates site tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to update network site tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner updateTags(String resourceGroupName, String mobileNetworkName, String siteName, TagsObject parameters); + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeletePacketCore(String resourceGroupName, String mobileNetworkName, + String siteName, SiteDeletePacketCore parameters); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeletePacketCore(String resourceGroupName, String mobileNetworkName, + String siteName, SiteDeletePacketCore parameters, Context context); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deletePacketCore(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deletePacketCore(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SlicesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SlicesClient.java new file mode 100644 index 000000000000..a72dbc903151 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SlicesClient.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SliceInner; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; + +/** + * An instance of this class provides access to all the operations defined in SlicesClient. + */ +public interface SlicesClient { + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String sliceName); + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, String sliceName, + Context context); + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String sliceName); + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String mobileNetworkName, String sliceName, Context context); + + /** + * Gets information about the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String mobileNetworkName, String sliceName, + Context context); + + /** + * Gets information about the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SliceInner get(String resourceGroupName, String mobileNetworkName, String sliceName); + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of network slice resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SliceInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String sliceName, SliceInner parameters); + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of network slice resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SliceInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String sliceName, SliceInner parameters, Context context); + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SliceInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String sliceName, + SliceInner parameters); + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SliceInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String sliceName, + SliceInner parameters, Context context); + + /** + * Updates slice tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to update network slice tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, String sliceName, + TagsObject parameters, Context context); + + /** + * Updates slice tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to update network slice tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SliceInner updateTags(String resourceGroupName, String mobileNetworkName, String sliceName, TagsObject parameters); + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/UeInformationsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/UeInformationsClient.java new file mode 100644 index 000000000000..d5f26dffa06a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/UeInformationsClient.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.resourcemanager.mobilenetwork.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.UeInfoInner; + +/** + * An instance of this class provides access to all the operations defined in UeInformationsClient. + */ +public interface UeInformationsClient { + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AsyncOperationStatusInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AsyncOperationStatusInner.java new file mode 100644 index 000000000000..eba5b45dff82 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AsyncOperationStatusInner.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The current status of an async operation. + */ +@Fluent +public final class AsyncOperationStatusInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * The operation status. + */ + private String status; + + /* + * Fully qualified ID for the resource that this async operation status relates to. + */ + private String resourceId; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * Percentage of the operation that is complete. + */ + private Double percentComplete; + + /* + * Properties returned by the resource provider on a successful operation + */ + private Object properties; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /** + * Creates an instance of AsyncOperationStatusInner class. + */ + public AsyncOperationStatusInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified ID for the async operation. + * + * @param id the id value to set. + * @return the AsyncOperationStatusInner object itself. + */ + public AsyncOperationStatusInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the async operation. + * + * @param name the name value to set. + * @return the AsyncOperationStatusInner object itself. + */ + public AsyncOperationStatusInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: The operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: The operation status. + * + * @param status the status value to set. + * @return the AsyncOperationStatusInner object itself. + */ + public AsyncOperationStatusInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the resourceId property: Fully qualified ID for the resource that this async operation status relates to. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Fully qualified ID for the resource that this async operation status relates to. + * + * @param resourceId the resourceId value to set. + * @return the AsyncOperationStatusInner object itself. + */ + public AsyncOperationStatusInner withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time of the operation. + * + * @param startTime the startTime value to set. + * @return the AsyncOperationStatusInner object itself. + */ + public AsyncOperationStatusInner withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time of the operation. + * + * @param endTime the endTime value to set. + * @return the AsyncOperationStatusInner object itself. + */ + public AsyncOperationStatusInner withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the percentComplete property: Percentage of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Set the percentComplete property: Percentage of the operation that is complete. + * + * @param percentComplete the percentComplete value to set. + * @return the AsyncOperationStatusInner object itself. + */ + public AsyncOperationStatusInner withPercentComplete(Double percentComplete) { + this.percentComplete = percentComplete; + return this; + } + + /** + * Get the properties property: Properties returned by the resource provider on a successful operation. + * + * @return the properties value. + */ + public Object properties() { + return this.properties; + } + + /** + * Set the properties property: Properties returned by the resource provider on a successful operation. + * + * @param properties the properties value to set. + * @return the AsyncOperationStatusInner object itself. + */ + public AsyncOperationStatusInner withProperties(Object properties) { + this.properties = properties; + return this; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: If present, details of the operation error. + * + * @param error the error value to set. + * @return the AsyncOperationStatusInner object itself. + */ + public AsyncOperationStatusInner withError(ManagementError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property status in model AsyncOperationStatusInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AsyncOperationStatusInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeUntypedField("properties", this.properties); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AsyncOperationStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AsyncOperationStatusInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AsyncOperationStatusInner. + */ + public static AsyncOperationStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AsyncOperationStatusInner deserializedAsyncOperationStatusInner = new AsyncOperationStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedAsyncOperationStatusInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedAsyncOperationStatusInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAsyncOperationStatusInner.name = reader.getString(); + } else if ("resourceId".equals(fieldName)) { + deserializedAsyncOperationStatusInner.resourceId = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedAsyncOperationStatusInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedAsyncOperationStatusInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("percentComplete".equals(fieldName)) { + deserializedAsyncOperationStatusInner.percentComplete = reader.getNullable(JsonReader::getDouble); + } else if ("properties".equals(fieldName)) { + deserializedAsyncOperationStatusInner.properties = reader.readUntyped(); + } else if ("error".equals(fieldName)) { + deserializedAsyncOperationStatusInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAsyncOperationStatusInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AttachedDataNetworkInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AttachedDataNetworkInner.java new file mode 100644 index 000000000000..c3c94e9807de --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AttachedDataNetworkInner.java @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Attached data network resource. Must be created in the same location as its parent packet core data plane. + */ +@Fluent +public final class AttachedDataNetworkInner extends Resource { + /* + * Attached data network properties. + */ + private AttachedDataNetworkPropertiesFormat innerProperties = new AttachedDataNetworkPropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of AttachedDataNetworkInner class. + */ + public AttachedDataNetworkInner() { + } + + /** + * Get the innerProperties property: Attached data network properties. + * + * @return the innerProperties value. + */ + private AttachedDataNetworkPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public AttachedDataNetworkInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AttachedDataNetworkInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the attached data network resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the userPlaneDataInterface property: The user plane interface on the data network. For 5G networks, this is + * the N6 interface. For 4G networks, this is the SGi interface. + * + * @return the userPlaneDataInterface value. + */ + public InterfaceProperties userPlaneDataInterface() { + return this.innerProperties() == null ? null : this.innerProperties().userPlaneDataInterface(); + } + + /** + * Set the userPlaneDataInterface property: The user plane interface on the data network. For 5G networks, this is + * the N6 interface. For 4G networks, this is the SGi interface. + * + * @param userPlaneDataInterface the userPlaneDataInterface value to set. + * @return the AttachedDataNetworkInner object itself. + */ + public AttachedDataNetworkInner withUserPlaneDataInterface(InterfaceProperties userPlaneDataInterface) { + if (this.innerProperties() == null) { + this.innerProperties = new AttachedDataNetworkPropertiesFormat(); + } + this.innerProperties().withUserPlaneDataInterface(userPlaneDataInterface); + return this; + } + + /** + * Get the dnsAddresses property: The DNS servers to signal to UEs to use for this attached data network. This + * configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + * + * @return the dnsAddresses value. + */ + public List dnsAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().dnsAddresses(); + } + + /** + * Set the dnsAddresses property: The DNS servers to signal to UEs to use for this attached data network. This + * configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + * + * @param dnsAddresses the dnsAddresses value to set. + * @return the AttachedDataNetworkInner object itself. + */ + public AttachedDataNetworkInner withDnsAddresses(List dnsAddresses) { + if (this.innerProperties() == null) { + this.innerProperties = new AttachedDataNetworkPropertiesFormat(); + } + this.innerProperties().withDnsAddresses(dnsAddresses); + return this; + } + + /** + * Get the naptConfiguration property: The network address and port translation (NAPT) configuration. + * If this is not specified, the attached data network will use a default NAPT configuration with NAPT enabled. + * + * @return the naptConfiguration value. + */ + public NaptConfiguration naptConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().naptConfiguration(); + } + + /** + * Set the naptConfiguration property: The network address and port translation (NAPT) configuration. + * If this is not specified, the attached data network will use a default NAPT configuration with NAPT enabled. + * + * @param naptConfiguration the naptConfiguration value to set. + * @return the AttachedDataNetworkInner object itself. + */ + public AttachedDataNetworkInner withNaptConfiguration(NaptConfiguration naptConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new AttachedDataNetworkPropertiesFormat(); + } + this.innerProperties().withNaptConfiguration(naptConfiguration); + return this; + } + + /** + * Get the userEquipmentAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the attached + * data network from which the packet core instance will dynamically assign IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + * You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. If you + * define both, they must be of the same size. + * + * @return the userEquipmentAddressPoolPrefix value. + */ + public List userEquipmentAddressPoolPrefix() { + return this.innerProperties() == null ? null : this.innerProperties().userEquipmentAddressPoolPrefix(); + } + + /** + * Set the userEquipmentAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the attached + * data network from which the packet core instance will dynamically assign IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + * You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. If you + * define both, they must be of the same size. + * + * @param userEquipmentAddressPoolPrefix the userEquipmentAddressPoolPrefix value to set. + * @return the AttachedDataNetworkInner object itself. + */ + public AttachedDataNetworkInner withUserEquipmentAddressPoolPrefix(List userEquipmentAddressPoolPrefix) { + if (this.innerProperties() == null) { + this.innerProperties = new AttachedDataNetworkPropertiesFormat(); + } + this.innerProperties().withUserEquipmentAddressPoolPrefix(userEquipmentAddressPoolPrefix); + return this; + } + + /** + * Get the userEquipmentStaticAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the + * attached data network from which the packet core instance will assign static IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. The static IP address + * for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource. + * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. If both + * are defined, they must be of the same size. + * + * @return the userEquipmentStaticAddressPoolPrefix value. + */ + public List userEquipmentStaticAddressPoolPrefix() { + return this.innerProperties() == null ? null : this.innerProperties().userEquipmentStaticAddressPoolPrefix(); + } + + /** + * Set the userEquipmentStaticAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the + * attached data network from which the packet core instance will assign static IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. The static IP address + * for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource. + * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. If both + * are defined, they must be of the same size. + * + * @param userEquipmentStaticAddressPoolPrefix the userEquipmentStaticAddressPoolPrefix value to set. + * @return the AttachedDataNetworkInner object itself. + */ + public AttachedDataNetworkInner + withUserEquipmentStaticAddressPoolPrefix(List userEquipmentStaticAddressPoolPrefix) { + if (this.innerProperties() == null) { + this.innerProperties = new AttachedDataNetworkPropertiesFormat(); + } + this.innerProperties().withUserEquipmentStaticAddressPoolPrefix(userEquipmentStaticAddressPoolPrefix); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model AttachedDataNetworkInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AttachedDataNetworkInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AttachedDataNetworkInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AttachedDataNetworkInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AttachedDataNetworkInner. + */ + public static AttachedDataNetworkInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AttachedDataNetworkInner deserializedAttachedDataNetworkInner = new AttachedDataNetworkInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAttachedDataNetworkInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAttachedDataNetworkInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAttachedDataNetworkInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedAttachedDataNetworkInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAttachedDataNetworkInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedAttachedDataNetworkInner.innerProperties + = AttachedDataNetworkPropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedAttachedDataNetworkInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAttachedDataNetworkInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AttachedDataNetworkPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AttachedDataNetworkPropertiesFormat.java new file mode 100644 index 000000000000..c5c40fdd462f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/AttachedDataNetworkPropertiesFormat.java @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Data network properties. + */ +@Fluent +public final class AttachedDataNetworkPropertiesFormat + implements JsonSerializable { + /* + * The provisioning state of the attached data network resource. + */ + private ProvisioningState provisioningState; + + /* + * The user plane interface on the data network. For 5G networks, this is the N6 interface. For 4G networks, this is + * the SGi interface. + */ + private InterfaceProperties userPlaneDataInterface; + + /* + * The DNS servers to signal to UEs to use for this attached data network. This configuration is mandatory - if you + * don't want DNS servers, you must provide an empty array. + */ + private List dnsAddresses; + + /* + * The network address and port translation (NAPT) configuration. + * If this is not specified, the attached data network will use a default NAPT configuration with NAPT enabled. + */ + private NaptConfiguration naptConfiguration; + + /* + * The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance + * will dynamically assign IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + * You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. If you + * define both, they must be of the same size. + */ + private List userEquipmentAddressPoolPrefix; + + /* + * The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance + * will assign static IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. The static IP address + * for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource. + * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. If both + * are defined, they must be of the same size. + */ + private List userEquipmentStaticAddressPoolPrefix; + + /** + * Creates an instance of AttachedDataNetworkPropertiesFormat class. + */ + public AttachedDataNetworkPropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the attached data network resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the userPlaneDataInterface property: The user plane interface on the data network. For 5G networks, this is + * the N6 interface. For 4G networks, this is the SGi interface. + * + * @return the userPlaneDataInterface value. + */ + public InterfaceProperties userPlaneDataInterface() { + return this.userPlaneDataInterface; + } + + /** + * Set the userPlaneDataInterface property: The user plane interface on the data network. For 5G networks, this is + * the N6 interface. For 4G networks, this is the SGi interface. + * + * @param userPlaneDataInterface the userPlaneDataInterface value to set. + * @return the AttachedDataNetworkPropertiesFormat object itself. + */ + public AttachedDataNetworkPropertiesFormat withUserPlaneDataInterface(InterfaceProperties userPlaneDataInterface) { + this.userPlaneDataInterface = userPlaneDataInterface; + return this; + } + + /** + * Get the dnsAddresses property: The DNS servers to signal to UEs to use for this attached data network. This + * configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + * + * @return the dnsAddresses value. + */ + public List dnsAddresses() { + return this.dnsAddresses; + } + + /** + * Set the dnsAddresses property: The DNS servers to signal to UEs to use for this attached data network. This + * configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + * + * @param dnsAddresses the dnsAddresses value to set. + * @return the AttachedDataNetworkPropertiesFormat object itself. + */ + public AttachedDataNetworkPropertiesFormat withDnsAddresses(List dnsAddresses) { + this.dnsAddresses = dnsAddresses; + return this; + } + + /** + * Get the naptConfiguration property: The network address and port translation (NAPT) configuration. + * If this is not specified, the attached data network will use a default NAPT configuration with NAPT enabled. + * + * @return the naptConfiguration value. + */ + public NaptConfiguration naptConfiguration() { + return this.naptConfiguration; + } + + /** + * Set the naptConfiguration property: The network address and port translation (NAPT) configuration. + * If this is not specified, the attached data network will use a default NAPT configuration with NAPT enabled. + * + * @param naptConfiguration the naptConfiguration value to set. + * @return the AttachedDataNetworkPropertiesFormat object itself. + */ + public AttachedDataNetworkPropertiesFormat withNaptConfiguration(NaptConfiguration naptConfiguration) { + this.naptConfiguration = naptConfiguration; + return this; + } + + /** + * Get the userEquipmentAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the attached + * data network from which the packet core instance will dynamically assign IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + * You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. If you + * define both, they must be of the same size. + * + * @return the userEquipmentAddressPoolPrefix value. + */ + public List userEquipmentAddressPoolPrefix() { + return this.userEquipmentAddressPoolPrefix; + } + + /** + * Set the userEquipmentAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the attached + * data network from which the packet core instance will dynamically assign IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + * You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. If you + * define both, they must be of the same size. + * + * @param userEquipmentAddressPoolPrefix the userEquipmentAddressPoolPrefix value to set. + * @return the AttachedDataNetworkPropertiesFormat object itself. + */ + public AttachedDataNetworkPropertiesFormat + withUserEquipmentAddressPoolPrefix(List userEquipmentAddressPoolPrefix) { + this.userEquipmentAddressPoolPrefix = userEquipmentAddressPoolPrefix; + return this; + } + + /** + * Get the userEquipmentStaticAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the + * attached data network from which the packet core instance will assign static IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. The static IP address + * for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource. + * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. If both + * are defined, they must be of the same size. + * + * @return the userEquipmentStaticAddressPoolPrefix value. + */ + public List userEquipmentStaticAddressPoolPrefix() { + return this.userEquipmentStaticAddressPoolPrefix; + } + + /** + * Set the userEquipmentStaticAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the + * attached data network from which the packet core instance will assign static IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. The static IP address + * for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource. + * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. If both + * are defined, they must be of the same size. + * + * @param userEquipmentStaticAddressPoolPrefix the userEquipmentStaticAddressPoolPrefix value to set. + * @return the AttachedDataNetworkPropertiesFormat object itself. + */ + public AttachedDataNetworkPropertiesFormat + withUserEquipmentStaticAddressPoolPrefix(List userEquipmentStaticAddressPoolPrefix) { + this.userEquipmentStaticAddressPoolPrefix = userEquipmentStaticAddressPoolPrefix; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userPlaneDataInterface() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property userPlaneDataInterface in model AttachedDataNetworkPropertiesFormat")); + } else { + userPlaneDataInterface().validate(); + } + if (dnsAddresses() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dnsAddresses in model AttachedDataNetworkPropertiesFormat")); + } + if (naptConfiguration() != null) { + naptConfiguration().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AttachedDataNetworkPropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("userPlaneDataInterface", this.userPlaneDataInterface); + jsonWriter.writeArrayField("dnsAddresses", this.dnsAddresses, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("naptConfiguration", this.naptConfiguration); + jsonWriter.writeArrayField("userEquipmentAddressPoolPrefix", this.userEquipmentAddressPoolPrefix, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("userEquipmentStaticAddressPoolPrefix", this.userEquipmentStaticAddressPoolPrefix, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AttachedDataNetworkPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AttachedDataNetworkPropertiesFormat if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AttachedDataNetworkPropertiesFormat. + */ + public static AttachedDataNetworkPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AttachedDataNetworkPropertiesFormat deserializedAttachedDataNetworkPropertiesFormat + = new AttachedDataNetworkPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userPlaneDataInterface".equals(fieldName)) { + deserializedAttachedDataNetworkPropertiesFormat.userPlaneDataInterface + = InterfaceProperties.fromJson(reader); + } else if ("dnsAddresses".equals(fieldName)) { + List dnsAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedAttachedDataNetworkPropertiesFormat.dnsAddresses = dnsAddresses; + } else if ("provisioningState".equals(fieldName)) { + deserializedAttachedDataNetworkPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("naptConfiguration".equals(fieldName)) { + deserializedAttachedDataNetworkPropertiesFormat.naptConfiguration + = NaptConfiguration.fromJson(reader); + } else if ("userEquipmentAddressPoolPrefix".equals(fieldName)) { + List userEquipmentAddressPoolPrefix = reader.readArray(reader1 -> reader1.getString()); + deserializedAttachedDataNetworkPropertiesFormat.userEquipmentAddressPoolPrefix + = userEquipmentAddressPoolPrefix; + } else if ("userEquipmentStaticAddressPoolPrefix".equals(fieldName)) { + List userEquipmentStaticAddressPoolPrefix + = reader.readArray(reader1 -> reader1.getString()); + deserializedAttachedDataNetworkPropertiesFormat.userEquipmentStaticAddressPoolPrefix + = userEquipmentStaticAddressPoolPrefix; + } else { + reader.skipChildren(); + } + } + + return deserializedAttachedDataNetworkPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DataNetworkInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DataNetworkInner.java new file mode 100644 index 000000000000..492f39009e16 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DataNetworkInner.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.Map; + +/** + * Data network resource. Must be created in the same location as its parent mobile network. + */ +@Fluent +public final class DataNetworkInner extends Resource { + /* + * Data network properties. + */ + private DataNetworkPropertiesFormat innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DataNetworkInner class. + */ + public DataNetworkInner() { + } + + /** + * Get the innerProperties property: Data network properties. + * + * @return the innerProperties value. + */ + private DataNetworkPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public DataNetworkInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataNetworkInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the data network resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the description property: An optional description for this data network. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: An optional description for this data network. + * + * @param description the description value to set. + * @return the DataNetworkInner object itself. + */ + public DataNetworkInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new DataNetworkPropertiesFormat(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataNetworkInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataNetworkInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DataNetworkInner. + */ + public static DataNetworkInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataNetworkInner deserializedDataNetworkInner = new DataNetworkInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDataNetworkInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDataNetworkInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDataNetworkInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedDataNetworkInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDataNetworkInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedDataNetworkInner.innerProperties = DataNetworkPropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDataNetworkInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDataNetworkInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DataNetworkPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DataNetworkPropertiesFormat.java new file mode 100644 index 000000000000..b71646821d61 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DataNetworkPropertiesFormat.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; + +/** + * Data network properties. + */ +@Fluent +public final class DataNetworkPropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the data network resource. + */ + private ProvisioningState provisioningState; + + /* + * An optional description for this data network. + */ + private String description; + + /** + * Creates an instance of DataNetworkPropertiesFormat class. + */ + public DataNetworkPropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the data network resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the description property: An optional description for this data network. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: An optional description for this data network. + * + * @param description the description value to set. + * @return the DataNetworkPropertiesFormat object itself. + */ + public DataNetworkPropertiesFormat withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataNetworkPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataNetworkPropertiesFormat if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DataNetworkPropertiesFormat. + */ + public static DataNetworkPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataNetworkPropertiesFormat deserializedDataNetworkPropertiesFormat = new DataNetworkPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedDataNetworkPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedDataNetworkPropertiesFormat.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDataNetworkPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackageInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackageInner.java new file mode 100644 index 000000000000..60ead7ded618 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackageInner.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackageStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; + +/** + * Diagnostics package resource. + */ +@Immutable +public final class DiagnosticsPackageInner extends ProxyResource { + /* + * Diagnostics package properties. A diagnostics package file derived from the name of this resource will be + * uploaded to the Storage Account Container URL in the packet core control plane properties + */ + private DiagnosticsPackagePropertiesFormat innerProperties = new DiagnosticsPackagePropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DiagnosticsPackageInner class. + */ + public DiagnosticsPackageInner() { + } + + /** + * Get the innerProperties property: Diagnostics package properties. A diagnostics package file derived from the + * name of this resource will be uploaded to the Storage Account Container URL in the packet core control plane + * properties. + * + * @return the innerProperties value. + */ + private DiagnosticsPackagePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the provisioningState property: The provisioning state of the diagnostics package resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: The status of the diagnostics package collection. + * + * @return the status value. + */ + public DiagnosticsPackageStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the reason property: The reason for the current state of the diagnostics package collection. + * + * @return the reason value. + */ + public String reason() { + return this.innerProperties() == null ? null : this.innerProperties().reason(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model DiagnosticsPackageInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsPackageInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiagnosticsPackageInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiagnosticsPackageInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DiagnosticsPackageInner. + */ + public static DiagnosticsPackageInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiagnosticsPackageInner deserializedDiagnosticsPackageInner = new DiagnosticsPackageInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDiagnosticsPackageInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDiagnosticsPackageInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDiagnosticsPackageInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDiagnosticsPackageInner.innerProperties + = DiagnosticsPackagePropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDiagnosticsPackageInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDiagnosticsPackageInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackagePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackagePropertiesFormat.java new file mode 100644 index 000000000000..004758f8a78e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackagePropertiesFormat.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackageStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; + +/** + * Diagnostics package properties. + */ +@Immutable +public final class DiagnosticsPackagePropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the diagnostics package resource. + */ + private ProvisioningState provisioningState; + + /* + * The status of the diagnostics package collection. + */ + private DiagnosticsPackageStatus status; + + /* + * The reason for the current state of the diagnostics package collection. + */ + private String reason; + + /** + * Creates an instance of DiagnosticsPackagePropertiesFormat class. + */ + public DiagnosticsPackagePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the diagnostics package resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The status of the diagnostics package collection. + * + * @return the status value. + */ + public DiagnosticsPackageStatus status() { + return this.status; + } + + /** + * Get the reason property: The reason for the current state of the diagnostics package collection. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiagnosticsPackagePropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiagnosticsPackagePropertiesFormat if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DiagnosticsPackagePropertiesFormat. + */ + public static DiagnosticsPackagePropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiagnosticsPackagePropertiesFormat deserializedDiagnosticsPackagePropertiesFormat + = new DiagnosticsPackagePropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedDiagnosticsPackagePropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedDiagnosticsPackagePropertiesFormat.status + = DiagnosticsPackageStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedDiagnosticsPackagePropertiesFormat.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiagnosticsPackagePropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/EncryptedSimPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/EncryptedSimPropertiesFormat.java new file mode 100644 index 000000000000..628fa15b93e8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/EncryptedSimPropertiesFormat.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.CommonSimPropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimState; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SiteProvisioningState; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Encrypted SIM properties. + */ +@Fluent +public final class EncryptedSimPropertiesFormat extends CommonSimPropertiesFormat { + /* + * The encrypted SIM credentials. + */ + private String encryptedCredentials; + + /* + * The public key fingerprint of the SIM vendor who provided this SIM, if any. + */ + private String vendorKeyFingerprint; + + /* + * The name of the SIM vendor who provided this SIM, if any. + */ + private String vendorName; + + /* + * A dictionary of sites to the provisioning state of this SIM on that site. + */ + private Map siteProvisioningState; + + /* + * The state of the SIM resource. + */ + private SimState simState; + + /* + * The provisioning state of the SIM resource. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of EncryptedSimPropertiesFormat class. + */ + public EncryptedSimPropertiesFormat() { + } + + /** + * Get the encryptedCredentials property: The encrypted SIM credentials. + * + * @return the encryptedCredentials value. + */ + public String encryptedCredentials() { + return this.encryptedCredentials; + } + + /** + * Set the encryptedCredentials property: The encrypted SIM credentials. + * + * @param encryptedCredentials the encryptedCredentials value to set. + * @return the EncryptedSimPropertiesFormat object itself. + */ + public EncryptedSimPropertiesFormat withEncryptedCredentials(String encryptedCredentials) { + this.encryptedCredentials = encryptedCredentials; + return this; + } + + /** + * Get the vendorKeyFingerprint property: The public key fingerprint of the SIM vendor who provided this SIM, if + * any. + * + * @return the vendorKeyFingerprint value. + */ + @Override + public String vendorKeyFingerprint() { + return this.vendorKeyFingerprint; + } + + /** + * Get the vendorName property: The name of the SIM vendor who provided this SIM, if any. + * + * @return the vendorName value. + */ + @Override + public String vendorName() { + return this.vendorName; + } + + /** + * Get the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM on that site. + * + * @return the siteProvisioningState value. + */ + @Override + public Map siteProvisioningState() { + return this.siteProvisioningState; + } + + /** + * Get the simState property: The state of the SIM resource. + * + * @return the simState value. + */ + @Override + public SimState simState() { + return this.simState; + } + + /** + * Get the provisioningState property: The provisioning state of the SIM resource. + * + * @return the provisioningState value. + */ + @Override + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public EncryptedSimPropertiesFormat + withInternationalMobileSubscriberIdentity(String internationalMobileSubscriberIdentity) { + super.withInternationalMobileSubscriberIdentity(internationalMobileSubscriberIdentity); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public EncryptedSimPropertiesFormat withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier) { + super.withIntegratedCircuitCardIdentifier(integratedCircuitCardIdentifier); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public EncryptedSimPropertiesFormat withDeviceType(String deviceType) { + super.withDeviceType(deviceType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public EncryptedSimPropertiesFormat withSimPolicy(SimPolicyResourceId simPolicy) { + super.withSimPolicy(simPolicy); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public EncryptedSimPropertiesFormat withStaticIpConfiguration(List staticIpConfiguration) { + super.withStaticIpConfiguration(staticIpConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (internationalMobileSubscriberIdentity() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property internationalMobileSubscriberIdentity in model EncryptedSimPropertiesFormat")); + } + if (simPolicy() != null) { + simPolicy().validate(); + } + if (staticIpConfiguration() != null) { + staticIpConfiguration().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EncryptedSimPropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("internationalMobileSubscriberIdentity", internationalMobileSubscriberIdentity()); + jsonWriter.writeStringField("integratedCircuitCardIdentifier", integratedCircuitCardIdentifier()); + jsonWriter.writeStringField("deviceType", deviceType()); + jsonWriter.writeJsonField("simPolicy", simPolicy()); + jsonWriter.writeArrayField("staticIpConfiguration", staticIpConfiguration(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("encryptedCredentials", this.encryptedCredentials); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptedSimPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptedSimPropertiesFormat if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EncryptedSimPropertiesFormat. + */ + public static EncryptedSimPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptedSimPropertiesFormat deserializedEncryptedSimPropertiesFormat = new EncryptedSimPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("internationalMobileSubscriberIdentity".equals(fieldName)) { + deserializedEncryptedSimPropertiesFormat + .withInternationalMobileSubscriberIdentity(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedEncryptedSimPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("simState".equals(fieldName)) { + deserializedEncryptedSimPropertiesFormat.simState = SimState.fromString(reader.getString()); + } else if ("siteProvisioningState".equals(fieldName)) { + Map siteProvisioningState + = reader.readMap(reader1 -> SiteProvisioningState.fromString(reader1.getString())); + deserializedEncryptedSimPropertiesFormat.siteProvisioningState = siteProvisioningState; + } else if ("integratedCircuitCardIdentifier".equals(fieldName)) { + deserializedEncryptedSimPropertiesFormat.withIntegratedCircuitCardIdentifier(reader.getString()); + } else if ("deviceType".equals(fieldName)) { + deserializedEncryptedSimPropertiesFormat.withDeviceType(reader.getString()); + } else if ("simPolicy".equals(fieldName)) { + deserializedEncryptedSimPropertiesFormat.withSimPolicy(SimPolicyResourceId.fromJson(reader)); + } else if ("staticIpConfiguration".equals(fieldName)) { + List staticIpConfiguration + = reader.readArray(reader1 -> SimStaticIpProperties.fromJson(reader1)); + deserializedEncryptedSimPropertiesFormat.withStaticIpConfiguration(staticIpConfiguration); + } else if ("vendorName".equals(fieldName)) { + deserializedEncryptedSimPropertiesFormat.vendorName = reader.getString(); + } else if ("vendorKeyFingerprint".equals(fieldName)) { + deserializedEncryptedSimPropertiesFormat.vendorKeyFingerprint = reader.getString(); + } else if ("encryptedCredentials".equals(fieldName)) { + deserializedEncryptedSimPropertiesFormat.encryptedCredentials = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptedSimPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ExtendedUeInfoInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ExtendedUeInfoInner.java new file mode 100644 index 000000000000..ee04304d25fc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ExtendedUeInfoInner.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.ExtendedUeInfoProperties; +import java.io.IOException; + +/** + * Extended User Equipment (UE) information. + */ +@Fluent +public final class ExtendedUeInfoInner extends ProxyResource { + /* + * Extended UE Information Properties. + */ + private ExtendedUeInfoProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ExtendedUeInfoInner class. + */ + public ExtendedUeInfoInner() { + } + + /** + * Get the properties property: Extended UE Information Properties. + * + * @return the properties value. + */ + public ExtendedUeInfoProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Extended UE Information Properties. + * + * @param properties the properties value to set. + * @return the ExtendedUeInfoInner object itself. + */ + public ExtendedUeInfoInner withProperties(ExtendedUeInfoProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model ExtendedUeInfoInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExtendedUeInfoInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedUeInfoInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedUeInfoInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExtendedUeInfoInner. + */ + public static ExtendedUeInfoInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedUeInfoInner deserializedExtendedUeInfoInner = new ExtendedUeInfoInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExtendedUeInfoInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExtendedUeInfoInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExtendedUeInfoInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedExtendedUeInfoInner.properties = ExtendedUeInfoProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedExtendedUeInfoInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedUeInfoInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/MobileNetworkInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/MobileNetworkInner.java new file mode 100644 index 000000000000..29bb132d4d06 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/MobileNetworkInner.java @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.PublicLandMobileNetwork; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Mobile network resource. + */ +@Fluent +public final class MobileNetworkInner extends Resource { + /* + * Mobile network properties. + */ + private MobileNetworkPropertiesFormat innerProperties = new MobileNetworkPropertiesFormat(); + + /* + * The identity used to retrieve any private keys used for SUPI concealment from Azure key vault. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MobileNetworkInner class. + */ + public MobileNetworkInner() { + } + + /** + * Get the innerProperties property: Mobile network properties. + * + * @return the innerProperties value. + */ + private MobileNetworkPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: The identity used to retrieve any private keys used for SUPI concealment from Azure + * key vault. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity used to retrieve any private keys used for SUPI concealment from Azure + * key vault. + * + * @param identity the identity value to set. + * @return the MobileNetworkInner object itself. + */ + public MobileNetworkInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public MobileNetworkInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MobileNetworkInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the mobile network resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the publicLandMobileNetworkIdentifier property: The unique public land mobile network identifier for the + * network. If both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @return the publicLandMobileNetworkIdentifier value. + */ + public PlmnId publicLandMobileNetworkIdentifier() { + return this.innerProperties() == null ? null : this.innerProperties().publicLandMobileNetworkIdentifier(); + } + + /** + * Set the publicLandMobileNetworkIdentifier property: The unique public land mobile network identifier for the + * network. If both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @param publicLandMobileNetworkIdentifier the publicLandMobileNetworkIdentifier value to set. + * @return the MobileNetworkInner object itself. + */ + public MobileNetworkInner withPublicLandMobileNetworkIdentifier(PlmnId publicLandMobileNetworkIdentifier) { + if (this.innerProperties() == null) { + this.innerProperties = new MobileNetworkPropertiesFormat(); + } + this.innerProperties().withPublicLandMobileNetworkIdentifier(publicLandMobileNetworkIdentifier); + return this; + } + + /** + * Get the publicLandMobileNetworks property: A list of public land mobile networks including their identifiers. If + * both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @return the publicLandMobileNetworks value. + */ + public List publicLandMobileNetworks() { + return this.innerProperties() == null ? null : this.innerProperties().publicLandMobileNetworks(); + } + + /** + * Set the publicLandMobileNetworks property: A list of public land mobile networks including their identifiers. If + * both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @param publicLandMobileNetworks the publicLandMobileNetworks value to set. + * @return the MobileNetworkInner object itself. + */ + public MobileNetworkInner withPublicLandMobileNetworks(List publicLandMobileNetworks) { + if (this.innerProperties() == null) { + this.innerProperties = new MobileNetworkPropertiesFormat(); + } + this.innerProperties().withPublicLandMobileNetworks(publicLandMobileNetworks); + return this; + } + + /** + * Get the serviceKey property: The mobile network resource identifier. + * + * @return the serviceKey value. + */ + public String serviceKey() { + return this.innerProperties() == null ? null : this.innerProperties().serviceKey(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model MobileNetworkInner")); + } else { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MobileNetworkInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MobileNetworkInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MobileNetworkInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MobileNetworkInner. + */ + public static MobileNetworkInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MobileNetworkInner deserializedMobileNetworkInner = new MobileNetworkInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMobileNetworkInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMobileNetworkInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMobileNetworkInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedMobileNetworkInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMobileNetworkInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedMobileNetworkInner.innerProperties = MobileNetworkPropertiesFormat.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedMobileNetworkInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMobileNetworkInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMobileNetworkInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/MobileNetworkPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/MobileNetworkPropertiesFormat.java new file mode 100644 index 000000000000..cbe6448dd7e8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/MobileNetworkPropertiesFormat.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.PublicLandMobileNetwork; +import java.io.IOException; +import java.util.List; + +/** + * Mobile network properties. + */ +@Fluent +public final class MobileNetworkPropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the mobile network resource. + */ + private ProvisioningState provisioningState; + + /* + * The unique public land mobile network identifier for the network. If both 'publicLandMobileNetworks' and + * 'publicLandMobileNetworkIdentifier' are specified, then the 'publicLandMobileNetworks' will take precedence. + */ + private PlmnId publicLandMobileNetworkIdentifier; + + /* + * A list of public land mobile networks including their identifiers. If both 'publicLandMobileNetworks' and + * 'publicLandMobileNetworkIdentifier' are specified, then the 'publicLandMobileNetworks' will take precedence. + */ + private List publicLandMobileNetworks; + + /* + * The mobile network resource identifier + */ + private String serviceKey; + + /** + * Creates an instance of MobileNetworkPropertiesFormat class. + */ + public MobileNetworkPropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the mobile network resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the publicLandMobileNetworkIdentifier property: The unique public land mobile network identifier for the + * network. If both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @return the publicLandMobileNetworkIdentifier value. + */ + public PlmnId publicLandMobileNetworkIdentifier() { + return this.publicLandMobileNetworkIdentifier; + } + + /** + * Set the publicLandMobileNetworkIdentifier property: The unique public land mobile network identifier for the + * network. If both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @param publicLandMobileNetworkIdentifier the publicLandMobileNetworkIdentifier value to set. + * @return the MobileNetworkPropertiesFormat object itself. + */ + public MobileNetworkPropertiesFormat + withPublicLandMobileNetworkIdentifier(PlmnId publicLandMobileNetworkIdentifier) { + this.publicLandMobileNetworkIdentifier = publicLandMobileNetworkIdentifier; + return this; + } + + /** + * Get the publicLandMobileNetworks property: A list of public land mobile networks including their identifiers. If + * both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @return the publicLandMobileNetworks value. + */ + public List publicLandMobileNetworks() { + return this.publicLandMobileNetworks; + } + + /** + * Set the publicLandMobileNetworks property: A list of public land mobile networks including their identifiers. If + * both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @param publicLandMobileNetworks the publicLandMobileNetworks value to set. + * @return the MobileNetworkPropertiesFormat object itself. + */ + public MobileNetworkPropertiesFormat + withPublicLandMobileNetworks(List publicLandMobileNetworks) { + this.publicLandMobileNetworks = publicLandMobileNetworks; + return this; + } + + /** + * Get the serviceKey property: The mobile network resource identifier. + * + * @return the serviceKey value. + */ + public String serviceKey() { + return this.serviceKey; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicLandMobileNetworkIdentifier() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property publicLandMobileNetworkIdentifier in model MobileNetworkPropertiesFormat")); + } else { + publicLandMobileNetworkIdentifier().validate(); + } + if (publicLandMobileNetworks() != null) { + publicLandMobileNetworks().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MobileNetworkPropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("publicLandMobileNetworkIdentifier", this.publicLandMobileNetworkIdentifier); + jsonWriter.writeArrayField("publicLandMobileNetworks", this.publicLandMobileNetworks, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MobileNetworkPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MobileNetworkPropertiesFormat if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MobileNetworkPropertiesFormat. + */ + public static MobileNetworkPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MobileNetworkPropertiesFormat deserializedMobileNetworkPropertiesFormat + = new MobileNetworkPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicLandMobileNetworkIdentifier".equals(fieldName)) { + deserializedMobileNetworkPropertiesFormat.publicLandMobileNetworkIdentifier + = PlmnId.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedMobileNetworkPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("publicLandMobileNetworks".equals(fieldName)) { + List publicLandMobileNetworks + = reader.readArray(reader1 -> PublicLandMobileNetwork.fromJson(reader1)); + deserializedMobileNetworkPropertiesFormat.publicLandMobileNetworks = publicLandMobileNetworks; + } else if ("serviceKey".equals(fieldName)) { + deserializedMobileNetworkPropertiesFormat.serviceKey = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMobileNetworkPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/OperationInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/OperationInner.java new file mode 100644 index 000000000000..ea3c4b1b64d7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/OperationInner.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.OperationDisplay; +import java.io.IOException; + +/** + * Object that describes a single Microsoft.MobileNetwork operation. + */ +@Fluent +public final class OperationInner implements JsonSerializable { + /* + * Indicates whether the operation applies to data-plane. + */ + private Boolean isDataAction; + + /* + * Operation name: {provider}/{resource}/{operation} + */ + private String name; + + /* + * The object that represents the operation. + */ + private OperationDisplay display; + + /** + * Creates an instance of OperationInner class. + */ + public OperationInner() { + } + + /** + * Get the isDataAction property: Indicates whether the operation applies to data-plane. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set the isDataAction property: Indicates whether the operation applies to data-plane. + * + * @param isDataAction the isDataAction value to set. + * @return the OperationInner object itself. + */ + public OperationInner withIsDataAction(Boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + + /** + * Get the name property: Operation name: {provider}/{resource}/{operation}. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the display property: The object that represents the operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isDataAction", this.isDataAction); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationInner. + */ + public static OperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInner deserializedOperationInner = new OperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isDataAction".equals(fieldName)) { + deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("name".equals(fieldName)) { + deserializedOperationInner.name = reader.getString(); + } else if ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationDisplay.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCaptureInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCaptureInner.java new file mode 100644 index 000000000000..42da538a50ed --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCaptureInner.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.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptureStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Packet capture session resource. + */ +@Fluent +public final class PacketCaptureInner extends ProxyResource { + /* + * Packet capture session properties. Packet capture file(s) derived from the name of this session will be uploaded + * to the Storage Account Container URL in the packet core control plane properties + */ + private PacketCapturePropertiesFormat innerProperties = new PacketCapturePropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PacketCaptureInner class. + */ + public PacketCaptureInner() { + } + + /** + * Get the innerProperties property: Packet capture session properties. Packet capture file(s) derived from the name + * of this session will be uploaded to the Storage Account Container URL in the packet core control plane + * properties. + * + * @return the innerProperties value. + */ + private PacketCapturePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the provisioningState property: The provisioning state of the packet capture session resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: The status of the packet capture session. + * + * @return the status value. + */ + public PacketCaptureStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the reason property: The reason the current packet capture session state. + * + * @return the reason value. + */ + public String reason() { + return this.innerProperties() == null ? null : this.innerProperties().reason(); + } + + /** + * Get the captureStartTime property: The start time of the packet capture session. + * + * @return the captureStartTime value. + */ + public OffsetDateTime captureStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().captureStartTime(); + } + + /** + * Get the networkInterfaces property: List of network interfaces to capture on. + * + * @return the networkInterfaces value. + */ + public List networkInterfaces() { + return this.innerProperties() == null ? null : this.innerProperties().networkInterfaces(); + } + + /** + * Set the networkInterfaces property: List of network interfaces to capture on. + * + * @param networkInterfaces the networkInterfaces value to set. + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withNetworkInterfaces(List networkInterfaces) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCapturePropertiesFormat(); + } + this.innerProperties().withNetworkInterfaces(networkInterfaces); + return this; + } + + /** + * Get the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * + * @return the bytesToCapturePerPacket value. + */ + public Long bytesToCapturePerPacket() { + return this.innerProperties() == null ? null : this.innerProperties().bytesToCapturePerPacket(); + } + + /** + * Set the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * + * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set. + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withBytesToCapturePerPacket(Long bytesToCapturePerPacket) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCapturePropertiesFormat(); + } + this.innerProperties().withBytesToCapturePerPacket(bytesToCapturePerPacket); + return this; + } + + /** + * Get the totalBytesPerSession property: Maximum size of the capture output. + * + * @return the totalBytesPerSession value. + */ + public Long totalBytesPerSession() { + return this.innerProperties() == null ? null : this.innerProperties().totalBytesPerSession(); + } + + /** + * Set the totalBytesPerSession property: Maximum size of the capture output. + * + * @param totalBytesPerSession the totalBytesPerSession value to set. + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withTotalBytesPerSession(Long totalBytesPerSession) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCapturePropertiesFormat(); + } + this.innerProperties().withTotalBytesPerSession(totalBytesPerSession); + return this; + } + + /** + * Get the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @return the timeLimitInSeconds value. + */ + public Integer timeLimitInSeconds() { + return this.innerProperties() == null ? null : this.innerProperties().timeLimitInSeconds(); + } + + /** + * Set the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @param timeLimitInSeconds the timeLimitInSeconds value to set. + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withTimeLimitInSeconds(Integer timeLimitInSeconds) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCapturePropertiesFormat(); + } + this.innerProperties().withTimeLimitInSeconds(timeLimitInSeconds); + return this; + } + + /** + * Get the outputFiles property: The list of output files of a packet capture session. + * + * @return the outputFiles value. + */ + public List outputFiles() { + return this.innerProperties() == null ? null : this.innerProperties().outputFiles(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model PacketCaptureInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCaptureInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCaptureInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCaptureInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PacketCaptureInner. + */ + public static PacketCaptureInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCaptureInner deserializedPacketCaptureInner = new PacketCaptureInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPacketCaptureInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPacketCaptureInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPacketCaptureInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPacketCaptureInner.innerProperties = PacketCapturePropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPacketCaptureInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCaptureInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCapturePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCapturePropertiesFormat.java new file mode 100644 index 000000000000..f2f862b8cad0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCapturePropertiesFormat.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptureStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Packet capture session properties. + */ +@Fluent +public final class PacketCapturePropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the packet capture session resource. + */ + private ProvisioningState provisioningState; + + /* + * The status of the packet capture session. + */ + private PacketCaptureStatus status; + + /* + * The reason the current packet capture session state. + */ + private String reason; + + /* + * The start time of the packet capture session. + */ + private OffsetDateTime captureStartTime; + + /* + * List of network interfaces to capture on. + */ + private List networkInterfaces; + + /* + * Number of bytes captured per packet, the remaining bytes are truncated. The default "0" means the entire packet + * is captured. + */ + private Long bytesToCapturePerPacket; + + /* + * Maximum size of the capture output. + */ + private Long totalBytesPerSession; + + /* + * Maximum duration of the capture session in seconds. + */ + private Integer timeLimitInSeconds; + + /* + * The list of output files of a packet capture session. + */ + private List outputFiles; + + /** + * Creates an instance of PacketCapturePropertiesFormat class. + */ + public PacketCapturePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the packet capture session resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The status of the packet capture session. + * + * @return the status value. + */ + public PacketCaptureStatus status() { + return this.status; + } + + /** + * Get the reason property: The reason the current packet capture session state. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Get the captureStartTime property: The start time of the packet capture session. + * + * @return the captureStartTime value. + */ + public OffsetDateTime captureStartTime() { + return this.captureStartTime; + } + + /** + * Get the networkInterfaces property: List of network interfaces to capture on. + * + * @return the networkInterfaces value. + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Set the networkInterfaces property: List of network interfaces to capture on. + * + * @param networkInterfaces the networkInterfaces value to set. + * @return the PacketCapturePropertiesFormat object itself. + */ + public PacketCapturePropertiesFormat withNetworkInterfaces(List networkInterfaces) { + this.networkInterfaces = networkInterfaces; + return this; + } + + /** + * Get the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * + * @return the bytesToCapturePerPacket value. + */ + public Long bytesToCapturePerPacket() { + return this.bytesToCapturePerPacket; + } + + /** + * Set the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * + * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set. + * @return the PacketCapturePropertiesFormat object itself. + */ + public PacketCapturePropertiesFormat withBytesToCapturePerPacket(Long bytesToCapturePerPacket) { + this.bytesToCapturePerPacket = bytesToCapturePerPacket; + return this; + } + + /** + * Get the totalBytesPerSession property: Maximum size of the capture output. + * + * @return the totalBytesPerSession value. + */ + public Long totalBytesPerSession() { + return this.totalBytesPerSession; + } + + /** + * Set the totalBytesPerSession property: Maximum size of the capture output. + * + * @param totalBytesPerSession the totalBytesPerSession value to set. + * @return the PacketCapturePropertiesFormat object itself. + */ + public PacketCapturePropertiesFormat withTotalBytesPerSession(Long totalBytesPerSession) { + this.totalBytesPerSession = totalBytesPerSession; + return this; + } + + /** + * Get the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @return the timeLimitInSeconds value. + */ + public Integer timeLimitInSeconds() { + return this.timeLimitInSeconds; + } + + /** + * Set the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @param timeLimitInSeconds the timeLimitInSeconds value to set. + * @return the PacketCapturePropertiesFormat object itself. + */ + public PacketCapturePropertiesFormat withTimeLimitInSeconds(Integer timeLimitInSeconds) { + this.timeLimitInSeconds = timeLimitInSeconds; + return this; + } + + /** + * Get the outputFiles property: The list of output files of a packet capture session. + * + * @return the outputFiles value. + */ + public List outputFiles() { + return this.outputFiles; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("networkInterfaces", this.networkInterfaces, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("bytesToCapturePerPacket", this.bytesToCapturePerPacket); + jsonWriter.writeNumberField("totalBytesPerSession", this.totalBytesPerSession); + jsonWriter.writeNumberField("timeLimitInSeconds", this.timeLimitInSeconds); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCapturePropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCapturePropertiesFormat if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PacketCapturePropertiesFormat. + */ + public static PacketCapturePropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCapturePropertiesFormat deserializedPacketCapturePropertiesFormat + = new PacketCapturePropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedPacketCapturePropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedPacketCapturePropertiesFormat.status + = PacketCaptureStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedPacketCapturePropertiesFormat.reason = reader.getString(); + } else if ("captureStartTime".equals(fieldName)) { + deserializedPacketCapturePropertiesFormat.captureStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("networkInterfaces".equals(fieldName)) { + List networkInterfaces = reader.readArray(reader1 -> reader1.getString()); + deserializedPacketCapturePropertiesFormat.networkInterfaces = networkInterfaces; + } else if ("bytesToCapturePerPacket".equals(fieldName)) { + deserializedPacketCapturePropertiesFormat.bytesToCapturePerPacket + = reader.getNullable(JsonReader::getLong); + } else if ("totalBytesPerSession".equals(fieldName)) { + deserializedPacketCapturePropertiesFormat.totalBytesPerSession + = reader.getNullable(JsonReader::getLong); + } else if ("timeLimitInSeconds".equals(fieldName)) { + deserializedPacketCapturePropertiesFormat.timeLimitInSeconds + = reader.getNullable(JsonReader::getInt); + } else if ("outputFiles".equals(fieldName)) { + List outputFiles = reader.readArray(reader1 -> reader1.getString()); + deserializedPacketCapturePropertiesFormat.outputFiles = outputFiles; + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCapturePropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneInner.java new file mode 100644 index 000000000000..1838e39e2ece --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneInner.java @@ -0,0 +1,640 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.BillingSku; +import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsUploadConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.EventHubConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.HomeNetworkPrivateKeysProvisioning; +import com.azure.resourcemanager.mobilenetwork.models.Installation; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SignalingConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SiteResourceId; +import com.azure.resourcemanager.mobilenetwork.models.UserConsentConfiguration; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Packet core control plane resource. + */ +@Fluent +public final class PacketCoreControlPlaneInner extends Resource { + /* + * Packet core control plane Properties. + */ + private PacketCoreControlPlanePropertiesFormat innerProperties = new PacketCoreControlPlanePropertiesFormat(); + + /* + * The identity used to retrieve the ingress certificate from Azure key vault. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PacketCoreControlPlaneInner class. + */ + public PacketCoreControlPlaneInner() { + } + + /** + * Get the innerProperties property: Packet core control plane Properties. + * + * @return the innerProperties value. + */ + private PacketCoreControlPlanePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: The identity used to retrieve the ingress certificate from Azure key vault. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity used to retrieve the ingress certificate from Azure key vault. + * + * @param identity the identity value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public PacketCoreControlPlaneInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PacketCoreControlPlaneInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the packet core control plane resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the installation property: The installation state of the packet core control plane resource. + * + * @return the installation value. + */ + public Installation installation() { + return this.innerProperties() == null ? null : this.innerProperties().installation(); + } + + /** + * Set the installation property: The installation state of the packet core control plane resource. + * + * @param installation the installation value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withInstallation(Installation installation) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withInstallation(installation); + return this; + } + + /** + * Get the sites property: Site(s) under which this packet core control plane should be deployed. The sites must be + * in the same location as the packet core control plane. + * + * @return the sites value. + */ + public List sites() { + return this.innerProperties() == null ? null : this.innerProperties().sites(); + } + + /** + * Set the sites property: Site(s) under which this packet core control plane should be deployed. The sites must be + * in the same location as the packet core control plane. + * + * @param sites the sites value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withSites(List sites) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withSites(sites); + return this; + } + + /** + * Get the platform property: The platform where the packet core is deployed. + * + * @return the platform value. + */ + public PlatformConfiguration platform() { + return this.innerProperties() == null ? null : this.innerProperties().platform(); + } + + /** + * Set the platform property: The platform where the packet core is deployed. + * + * @param platform the platform value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withPlatform(PlatformConfiguration platform) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withPlatform(platform); + return this; + } + + /** + * Get the coreNetworkTechnology property: The core network technology generation (5G core or EPC / 4G core). + * + * @return the coreNetworkTechnology value. + */ + public CoreNetworkType coreNetworkTechnology() { + return this.innerProperties() == null ? null : this.innerProperties().coreNetworkTechnology(); + } + + /** + * Set the coreNetworkTechnology property: The core network technology generation (5G core or EPC / 4G core). + * + * @param coreNetworkTechnology the coreNetworkTechnology value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withCoreNetworkTechnology(CoreNetworkType coreNetworkTechnology) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withCoreNetworkTechnology(coreNetworkTechnology); + return this; + } + + /** + * Get the version property: The desired version of the packet core software. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: The desired version of the packet core software. + * + * @param version the version value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the installedVersion property: The currently installed version of the packet core software. + * + * @return the installedVersion value. + */ + public String installedVersion() { + return this.innerProperties() == null ? null : this.innerProperties().installedVersion(); + } + + /** + * Get the rollbackVersion property: The previous version of the packet core software that was deployed. Used when + * performing the rollback action. + * + * @return the rollbackVersion value. + */ + public String rollbackVersion() { + return this.innerProperties() == null ? null : this.innerProperties().rollbackVersion(); + } + + /** + * Get the controlPlaneAccessInterface property: The control plane interface on the access network. For 5G networks, + * this is the N2 interface. For 4G networks, this is the S1-MME interface. + * + * @return the controlPlaneAccessInterface value. + */ + public InterfaceProperties controlPlaneAccessInterface() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneAccessInterface(); + } + + /** + * Set the controlPlaneAccessInterface property: The control plane interface on the access network. For 5G networks, + * this is the N2 interface. For 4G networks, this is the S1-MME interface. + * + * @param controlPlaneAccessInterface the controlPlaneAccessInterface value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner + withControlPlaneAccessInterface(InterfaceProperties controlPlaneAccessInterface) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withControlPlaneAccessInterface(controlPlaneAccessInterface); + return this; + } + + /** + * Get the controlPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the control plane on the + * access network in a High Availability (HA) system. In an HA deployment the access network router should be + * configured to anycast traffic for this address to the control plane access interfaces on the active and standby + * nodes. In non-HA system this list should be omitted or empty. + * + * @return the controlPlaneAccessVirtualIpv4Addresses value. + */ + public List controlPlaneAccessVirtualIpv4Addresses() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneAccessVirtualIpv4Addresses(); + } + + /** + * Set the controlPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the control plane on the + * access network in a High Availability (HA) system. In an HA deployment the access network router should be + * configured to anycast traffic for this address to the control plane access interfaces on the active and standby + * nodes. In non-HA system this list should be omitted or empty. + * + * @param controlPlaneAccessVirtualIpv4Addresses the controlPlaneAccessVirtualIpv4Addresses value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner + withControlPlaneAccessVirtualIpv4Addresses(List controlPlaneAccessVirtualIpv4Addresses) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withControlPlaneAccessVirtualIpv4Addresses(controlPlaneAccessVirtualIpv4Addresses); + return this; + } + + /** + * Get the sku property: The SKU defining the throughput and SIM allowances for this packet core control plane + * deployment. + * + * @return the sku value. + */ + public BillingSku sku() { + return this.innerProperties() == null ? null : this.innerProperties().sku(); + } + + /** + * Set the sku property: The SKU defining the throughput and SIM allowances for this packet core control plane + * deployment. + * + * @param sku the sku value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withSku(BillingSku sku) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withSku(sku); + return this; + } + + /** + * Get the ueMtu property: The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links + * for all data networks. The MTU set on the user plane access link is calculated to be 60 bytes greater than this + * value to allow for GTP encapsulation. + * + * @return the ueMtu value. + */ + public Integer ueMtu() { + return this.innerProperties() == null ? null : this.innerProperties().ueMtu(); + } + + /** + * Set the ueMtu property: The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links + * for all data networks. The MTU set on the user plane access link is calculated to be 60 bytes greater than this + * value to allow for GTP encapsulation. + * + * @param ueMtu the ueMtu value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withUeMtu(Integer ueMtu) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withUeMtu(ueMtu); + return this; + } + + /** + * Get the localDiagnosticsAccess property: The kubernetes ingress configuration to control access to packet core + * diagnostics over local APIs. + * + * @return the localDiagnosticsAccess value. + */ + public LocalDiagnosticsAccessConfiguration localDiagnosticsAccess() { + return this.innerProperties() == null ? null : this.innerProperties().localDiagnosticsAccess(); + } + + /** + * Set the localDiagnosticsAccess property: The kubernetes ingress configuration to control access to packet core + * diagnostics over local APIs. + * + * @param localDiagnosticsAccess the localDiagnosticsAccess value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner + withLocalDiagnosticsAccess(LocalDiagnosticsAccessConfiguration localDiagnosticsAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withLocalDiagnosticsAccess(localDiagnosticsAccess); + return this; + } + + /** + * Get the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @return the diagnosticsUpload value. + */ + public DiagnosticsUploadConfiguration diagnosticsUpload() { + return this.innerProperties() == null ? null : this.innerProperties().diagnosticsUpload(); + } + + /** + * Set the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @param diagnosticsUpload the diagnosticsUpload value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withDiagnosticsUpload(DiagnosticsUploadConfiguration diagnosticsUpload) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withDiagnosticsUpload(diagnosticsUpload); + return this; + } + + /** + * Get the eventHub property: Configuration for sending packet core events to an Azure Event Hub. + * + * @return the eventHub value. + */ + public EventHubConfiguration eventHub() { + return this.innerProperties() == null ? null : this.innerProperties().eventHub(); + } + + /** + * Set the eventHub property: Configuration for sending packet core events to an Azure Event Hub. + * + * @param eventHub the eventHub value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withEventHub(EventHubConfiguration eventHub) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withEventHub(eventHub); + return this; + } + + /** + * Get the signaling property: Signaling configuration for the packet core. + * + * @return the signaling value. + */ + public SignalingConfiguration signaling() { + return this.innerProperties() == null ? null : this.innerProperties().signaling(); + } + + /** + * Set the signaling property: Signaling configuration for the packet core. + * + * @param signaling the signaling value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withSignaling(SignalingConfiguration signaling) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withSignaling(signaling); + return this; + } + + /** + * Get the interopSettings property: Settings to allow interoperability with third party components e.g. RANs and + * UEs. + * + * @return the interopSettings value. + */ + public Object interopSettings() { + return this.innerProperties() == null ? null : this.innerProperties().interopSettings(); + } + + /** + * Set the interopSettings property: Settings to allow interoperability with third party components e.g. RANs and + * UEs. + * + * @param interopSettings the interopSettings value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withInteropSettings(Object interopSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withInteropSettings(interopSettings); + return this; + } + + /** + * Get the homeNetworkPrivateKeysProvisioning property: The provisioning state of the secret containing private keys + * and keyIds for SUPI concealment. + * + * @return the homeNetworkPrivateKeysProvisioning value. + */ + public HomeNetworkPrivateKeysProvisioning homeNetworkPrivateKeysProvisioning() { + return this.innerProperties() == null ? null : this.innerProperties().homeNetworkPrivateKeysProvisioning(); + } + + /** + * Get the userConsent property: The user consent configuration for the packet core. + * + * @return the userConsent value. + */ + public UserConsentConfiguration userConsent() { + return this.innerProperties() == null ? null : this.innerProperties().userConsent(); + } + + /** + * Set the userConsent property: The user consent configuration for the packet core. + * + * @param userConsent the userConsent value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withUserConsent(UserConsentConfiguration userConsent) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withUserConsent(userConsent); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model PacketCoreControlPlaneInner")); + } else { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlaneInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreControlPlaneInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreControlPlaneInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PacketCoreControlPlaneInner. + */ + public static PacketCoreControlPlaneInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreControlPlaneInner deserializedPacketCoreControlPlaneInner = new PacketCoreControlPlaneInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPacketCoreControlPlaneInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPacketCoreControlPlaneInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPacketCoreControlPlaneInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPacketCoreControlPlaneInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPacketCoreControlPlaneInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedPacketCoreControlPlaneInner.innerProperties + = PacketCoreControlPlanePropertiesFormat.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedPacketCoreControlPlaneInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPacketCoreControlPlaneInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreControlPlaneInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlanePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlanePropertiesFormat.java new file mode 100644 index 000000000000..3a26bb55e110 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlanePropertiesFormat.java @@ -0,0 +1,668 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.BillingSku; +import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsUploadConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.EventHubConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.HomeNetworkPrivateKeysProvisioning; +import com.azure.resourcemanager.mobilenetwork.models.Installation; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SignalingConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SiteResourceId; +import com.azure.resourcemanager.mobilenetwork.models.UserConsentConfiguration; +import java.io.IOException; +import java.util.List; + +/** + * Packet core control plane properties. + */ +@Fluent +public final class PacketCoreControlPlanePropertiesFormat + implements JsonSerializable { + /* + * The provisioning state of the packet core control plane resource. + */ + private ProvisioningState provisioningState; + + /* + * The installation state of the packet core control plane resource. + */ + private Installation installation; + + /* + * Site(s) under which this packet core control plane should be deployed. The sites must be in the same location as + * the packet core control plane. + */ + private List sites; + + /* + * The platform where the packet core is deployed. + */ + private PlatformConfiguration platform; + + /* + * The core network technology generation (5G core or EPC / 4G core). + */ + private CoreNetworkType coreNetworkTechnology; + + /* + * The desired version of the packet core software. + */ + private String version; + + /* + * The currently installed version of the packet core software. + */ + private String installedVersion; + + /* + * The previous version of the packet core software that was deployed. Used when performing the rollback action. + */ + private String rollbackVersion; + + /* + * The control plane interface on the access network. For 5G networks, this is the N2 interface. For 4G networks, + * this is the S1-MME interface. + */ + private InterfaceProperties controlPlaneAccessInterface; + + /* + * The virtual IP address(es) for the control plane on the access network in a High Availability (HA) system. In an + * HA deployment the access network router should be configured to anycast traffic for this address to the control + * plane access interfaces on the active and standby nodes. In non-HA system this list should be omitted or empty. + */ + private List controlPlaneAccessVirtualIpv4Addresses; + + /* + * The SKU defining the throughput and SIM allowances for this packet core control plane deployment. + */ + private BillingSku sku; + + /* + * The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links for all data networks. + * The MTU set on the user plane access link is calculated to be 60 bytes greater than this value to allow for GTP + * encapsulation. + */ + private Integer ueMtu; + + /* + * The kubernetes ingress configuration to control access to packet core diagnostics over local APIs. + */ + private LocalDiagnosticsAccessConfiguration localDiagnosticsAccess; + + /* + * Configuration for uploading packet core diagnostics + */ + private DiagnosticsUploadConfiguration diagnosticsUpload; + + /* + * Configuration for sending packet core events to an Azure Event Hub. + */ + private EventHubConfiguration eventHub; + + /* + * Signaling configuration for the packet core. + */ + private SignalingConfiguration signaling; + + /* + * Settings to allow interoperability with third party components e.g. RANs and UEs. + */ + private Object interopSettings; + + /* + * The provisioning state of the secret containing private keys and keyIds for SUPI concealment. + */ + private HomeNetworkPrivateKeysProvisioning homeNetworkPrivateKeysProvisioning; + + /* + * The user consent configuration for the packet core. + */ + private UserConsentConfiguration userConsent; + + /** + * Creates an instance of PacketCoreControlPlanePropertiesFormat class. + */ + public PacketCoreControlPlanePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the packet core control plane resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the installation property: The installation state of the packet core control plane resource. + * + * @return the installation value. + */ + public Installation installation() { + return this.installation; + } + + /** + * Set the installation property: The installation state of the packet core control plane resource. + * + * @param installation the installation value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withInstallation(Installation installation) { + this.installation = installation; + return this; + } + + /** + * Get the sites property: Site(s) under which this packet core control plane should be deployed. The sites must be + * in the same location as the packet core control plane. + * + * @return the sites value. + */ + public List sites() { + return this.sites; + } + + /** + * Set the sites property: Site(s) under which this packet core control plane should be deployed. The sites must be + * in the same location as the packet core control plane. + * + * @param sites the sites value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withSites(List sites) { + this.sites = sites; + return this; + } + + /** + * Get the platform property: The platform where the packet core is deployed. + * + * @return the platform value. + */ + public PlatformConfiguration platform() { + return this.platform; + } + + /** + * Set the platform property: The platform where the packet core is deployed. + * + * @param platform the platform value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withPlatform(PlatformConfiguration platform) { + this.platform = platform; + return this; + } + + /** + * Get the coreNetworkTechnology property: The core network technology generation (5G core or EPC / 4G core). + * + * @return the coreNetworkTechnology value. + */ + public CoreNetworkType coreNetworkTechnology() { + return this.coreNetworkTechnology; + } + + /** + * Set the coreNetworkTechnology property: The core network technology generation (5G core or EPC / 4G core). + * + * @param coreNetworkTechnology the coreNetworkTechnology value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withCoreNetworkTechnology(CoreNetworkType coreNetworkTechnology) { + this.coreNetworkTechnology = coreNetworkTechnology; + return this; + } + + /** + * Get the version property: The desired version of the packet core software. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The desired version of the packet core software. + * + * @param version the version value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the installedVersion property: The currently installed version of the packet core software. + * + * @return the installedVersion value. + */ + public String installedVersion() { + return this.installedVersion; + } + + /** + * Get the rollbackVersion property: The previous version of the packet core software that was deployed. Used when + * performing the rollback action. + * + * @return the rollbackVersion value. + */ + public String rollbackVersion() { + return this.rollbackVersion; + } + + /** + * Get the controlPlaneAccessInterface property: The control plane interface on the access network. For 5G networks, + * this is the N2 interface. For 4G networks, this is the S1-MME interface. + * + * @return the controlPlaneAccessInterface value. + */ + public InterfaceProperties controlPlaneAccessInterface() { + return this.controlPlaneAccessInterface; + } + + /** + * Set the controlPlaneAccessInterface property: The control plane interface on the access network. For 5G networks, + * this is the N2 interface. For 4G networks, this is the S1-MME interface. + * + * @param controlPlaneAccessInterface the controlPlaneAccessInterface value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat + withControlPlaneAccessInterface(InterfaceProperties controlPlaneAccessInterface) { + this.controlPlaneAccessInterface = controlPlaneAccessInterface; + return this; + } + + /** + * Get the controlPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the control plane on the + * access network in a High Availability (HA) system. In an HA deployment the access network router should be + * configured to anycast traffic for this address to the control plane access interfaces on the active and standby + * nodes. In non-HA system this list should be omitted or empty. + * + * @return the controlPlaneAccessVirtualIpv4Addresses value. + */ + public List controlPlaneAccessVirtualIpv4Addresses() { + return this.controlPlaneAccessVirtualIpv4Addresses; + } + + /** + * Set the controlPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the control plane on the + * access network in a High Availability (HA) system. In an HA deployment the access network router should be + * configured to anycast traffic for this address to the control plane access interfaces on the active and standby + * nodes. In non-HA system this list should be omitted or empty. + * + * @param controlPlaneAccessVirtualIpv4Addresses the controlPlaneAccessVirtualIpv4Addresses value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat + withControlPlaneAccessVirtualIpv4Addresses(List controlPlaneAccessVirtualIpv4Addresses) { + this.controlPlaneAccessVirtualIpv4Addresses = controlPlaneAccessVirtualIpv4Addresses; + return this; + } + + /** + * Get the sku property: The SKU defining the throughput and SIM allowances for this packet core control plane + * deployment. + * + * @return the sku value. + */ + public BillingSku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU defining the throughput and SIM allowances for this packet core control plane + * deployment. + * + * @param sku the sku value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withSku(BillingSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the ueMtu property: The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links + * for all data networks. The MTU set on the user plane access link is calculated to be 60 bytes greater than this + * value to allow for GTP encapsulation. + * + * @return the ueMtu value. + */ + public Integer ueMtu() { + return this.ueMtu; + } + + /** + * Set the ueMtu property: The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links + * for all data networks. The MTU set on the user plane access link is calculated to be 60 bytes greater than this + * value to allow for GTP encapsulation. + * + * @param ueMtu the ueMtu value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withUeMtu(Integer ueMtu) { + this.ueMtu = ueMtu; + return this; + } + + /** + * Get the localDiagnosticsAccess property: The kubernetes ingress configuration to control access to packet core + * diagnostics over local APIs. + * + * @return the localDiagnosticsAccess value. + */ + public LocalDiagnosticsAccessConfiguration localDiagnosticsAccess() { + return this.localDiagnosticsAccess; + } + + /** + * Set the localDiagnosticsAccess property: The kubernetes ingress configuration to control access to packet core + * diagnostics over local APIs. + * + * @param localDiagnosticsAccess the localDiagnosticsAccess value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat + withLocalDiagnosticsAccess(LocalDiagnosticsAccessConfiguration localDiagnosticsAccess) { + this.localDiagnosticsAccess = localDiagnosticsAccess; + return this; + } + + /** + * Get the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @return the diagnosticsUpload value. + */ + public DiagnosticsUploadConfiguration diagnosticsUpload() { + return this.diagnosticsUpload; + } + + /** + * Set the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @param diagnosticsUpload the diagnosticsUpload value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat + withDiagnosticsUpload(DiagnosticsUploadConfiguration diagnosticsUpload) { + this.diagnosticsUpload = diagnosticsUpload; + return this; + } + + /** + * Get the eventHub property: Configuration for sending packet core events to an Azure Event Hub. + * + * @return the eventHub value. + */ + public EventHubConfiguration eventHub() { + return this.eventHub; + } + + /** + * Set the eventHub property: Configuration for sending packet core events to an Azure Event Hub. + * + * @param eventHub the eventHub value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withEventHub(EventHubConfiguration eventHub) { + this.eventHub = eventHub; + return this; + } + + /** + * Get the signaling property: Signaling configuration for the packet core. + * + * @return the signaling value. + */ + public SignalingConfiguration signaling() { + return this.signaling; + } + + /** + * Set the signaling property: Signaling configuration for the packet core. + * + * @param signaling the signaling value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withSignaling(SignalingConfiguration signaling) { + this.signaling = signaling; + return this; + } + + /** + * Get the interopSettings property: Settings to allow interoperability with third party components e.g. RANs and + * UEs. + * + * @return the interopSettings value. + */ + public Object interopSettings() { + return this.interopSettings; + } + + /** + * Set the interopSettings property: Settings to allow interoperability with third party components e.g. RANs and + * UEs. + * + * @param interopSettings the interopSettings value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withInteropSettings(Object interopSettings) { + this.interopSettings = interopSettings; + return this; + } + + /** + * Get the homeNetworkPrivateKeysProvisioning property: The provisioning state of the secret containing private keys + * and keyIds for SUPI concealment. + * + * @return the homeNetworkPrivateKeysProvisioning value. + */ + public HomeNetworkPrivateKeysProvisioning homeNetworkPrivateKeysProvisioning() { + return this.homeNetworkPrivateKeysProvisioning; + } + + /** + * Get the userConsent property: The user consent configuration for the packet core. + * + * @return the userConsent value. + */ + public UserConsentConfiguration userConsent() { + return this.userConsent; + } + + /** + * Set the userConsent property: The user consent configuration for the packet core. + * + * @param userConsent the userConsent value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withUserConsent(UserConsentConfiguration userConsent) { + this.userConsent = userConsent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (installation() != null) { + installation().validate(); + } + if (sites() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sites in model PacketCoreControlPlanePropertiesFormat")); + } else { + sites().forEach(e -> e.validate()); + } + if (platform() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property platform in model PacketCoreControlPlanePropertiesFormat")); + } else { + platform().validate(); + } + if (controlPlaneAccessInterface() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property controlPlaneAccessInterface in model PacketCoreControlPlanePropertiesFormat")); + } else { + controlPlaneAccessInterface().validate(); + } + if (sku() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sku in model PacketCoreControlPlanePropertiesFormat")); + } + if (localDiagnosticsAccess() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property localDiagnosticsAccess in model PacketCoreControlPlanePropertiesFormat")); + } else { + localDiagnosticsAccess().validate(); + } + if (diagnosticsUpload() != null) { + diagnosticsUpload().validate(); + } + if (eventHub() != null) { + eventHub().validate(); + } + if (signaling() != null) { + signaling().validate(); + } + if (homeNetworkPrivateKeysProvisioning() != null) { + homeNetworkPrivateKeysProvisioning().validate(); + } + if (userConsent() != null) { + userConsent().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlanePropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("sites", this.sites, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("platform", this.platform); + jsonWriter.writeJsonField("controlPlaneAccessInterface", this.controlPlaneAccessInterface); + jsonWriter.writeStringField("sku", this.sku == null ? null : this.sku.toString()); + jsonWriter.writeJsonField("localDiagnosticsAccess", this.localDiagnosticsAccess); + jsonWriter.writeJsonField("installation", this.installation); + jsonWriter.writeStringField("coreNetworkTechnology", + this.coreNetworkTechnology == null ? null : this.coreNetworkTechnology.toString()); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeArrayField("controlPlaneAccessVirtualIpv4Addresses", + this.controlPlaneAccessVirtualIpv4Addresses, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("ueMtu", this.ueMtu); + jsonWriter.writeJsonField("diagnosticsUpload", this.diagnosticsUpload); + jsonWriter.writeJsonField("eventHub", this.eventHub); + jsonWriter.writeJsonField("signaling", this.signaling); + jsonWriter.writeUntypedField("interopSettings", this.interopSettings); + jsonWriter.writeJsonField("userConsent", this.userConsent); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreControlPlanePropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreControlPlanePropertiesFormat if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PacketCoreControlPlanePropertiesFormat. + */ + public static PacketCoreControlPlanePropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreControlPlanePropertiesFormat deserializedPacketCoreControlPlanePropertiesFormat + = new PacketCoreControlPlanePropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sites".equals(fieldName)) { + List sites = reader.readArray(reader1 -> SiteResourceId.fromJson(reader1)); + deserializedPacketCoreControlPlanePropertiesFormat.sites = sites; + } else if ("platform".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.platform + = PlatformConfiguration.fromJson(reader); + } else if ("controlPlaneAccessInterface".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.controlPlaneAccessInterface + = InterfaceProperties.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.sku = BillingSku.fromString(reader.getString()); + } else if ("localDiagnosticsAccess".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.localDiagnosticsAccess + = LocalDiagnosticsAccessConfiguration.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("installation".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.installation = Installation.fromJson(reader); + } else if ("coreNetworkTechnology".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.coreNetworkTechnology + = CoreNetworkType.fromString(reader.getString()); + } else if ("version".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.version = reader.getString(); + } else if ("installedVersion".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.installedVersion = reader.getString(); + } else if ("rollbackVersion".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.rollbackVersion = reader.getString(); + } else if ("controlPlaneAccessVirtualIpv4Addresses".equals(fieldName)) { + List controlPlaneAccessVirtualIpv4Addresses + = reader.readArray(reader1 -> reader1.getString()); + deserializedPacketCoreControlPlanePropertiesFormat.controlPlaneAccessVirtualIpv4Addresses + = controlPlaneAccessVirtualIpv4Addresses; + } else if ("ueMtu".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.ueMtu = reader.getNullable(JsonReader::getInt); + } else if ("diagnosticsUpload".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.diagnosticsUpload + = DiagnosticsUploadConfiguration.fromJson(reader); + } else if ("eventHub".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.eventHub + = EventHubConfiguration.fromJson(reader); + } else if ("signaling".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.signaling + = SignalingConfiguration.fromJson(reader); + } else if ("interopSettings".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.interopSettings = reader.readUntyped(); + } else if ("homeNetworkPrivateKeysProvisioning".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.homeNetworkPrivateKeysProvisioning + = HomeNetworkPrivateKeysProvisioning.fromJson(reader); + } else if ("userConsent".equals(fieldName)) { + deserializedPacketCoreControlPlanePropertiesFormat.userConsent + = UserConsentConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreControlPlanePropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneVersionInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneVersionInner.java new file mode 100644 index 000000000000..7d3ae21c14ff --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneVersionInner.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.Platform; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Packet core control plane version resource. + */ +@Fluent +public final class PacketCoreControlPlaneVersionInner extends ProxyResource { + /* + * Packet core control plane version properties. + */ + private PacketCoreControlPlaneVersionPropertiesFormat innerProperties + = new PacketCoreControlPlaneVersionPropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PacketCoreControlPlaneVersionInner class. + */ + public PacketCoreControlPlaneVersionInner() { + } + + /** + * Get the innerProperties property: Packet core control plane version properties. + * + * @return the innerProperties value. + */ + private PacketCoreControlPlaneVersionPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the provisioningState property: The provisioning state of the packet core control plane version resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the platforms property: Platform specific packet core control plane version properties. + * + * @return the platforms value. + */ + public List platforms() { + return this.innerProperties() == null ? null : this.innerProperties().platforms(); + } + + /** + * Set the platforms property: Platform specific packet core control plane version properties. + * + * @param platforms the platforms value to set. + * @return the PacketCoreControlPlaneVersionInner object itself. + */ + public PacketCoreControlPlaneVersionInner withPlatforms(List platforms) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlaneVersionPropertiesFormat(); + } + this.innerProperties().withPlatforms(platforms); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model PacketCoreControlPlaneVersionInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlaneVersionInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreControlPlaneVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreControlPlaneVersionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PacketCoreControlPlaneVersionInner. + */ + public static PacketCoreControlPlaneVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreControlPlaneVersionInner deserializedPacketCoreControlPlaneVersionInner + = new PacketCoreControlPlaneVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPacketCoreControlPlaneVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPacketCoreControlPlaneVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPacketCoreControlPlaneVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPacketCoreControlPlaneVersionInner.innerProperties + = PacketCoreControlPlaneVersionPropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPacketCoreControlPlaneVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreControlPlaneVersionInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneVersionPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneVersionPropertiesFormat.java new file mode 100644 index 000000000000..1f8b307450e6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneVersionPropertiesFormat.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.Platform; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Packet core control plane version properties. + */ +@Fluent +public final class PacketCoreControlPlaneVersionPropertiesFormat + implements JsonSerializable { + /* + * The provisioning state of the packet core control plane version resource. + */ + private ProvisioningState provisioningState; + + /* + * Platform specific packet core control plane version properties. + */ + private List platforms; + + /** + * Creates an instance of PacketCoreControlPlaneVersionPropertiesFormat class. + */ + public PacketCoreControlPlaneVersionPropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the packet core control plane version resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the platforms property: Platform specific packet core control plane version properties. + * + * @return the platforms value. + */ + public List platforms() { + return this.platforms; + } + + /** + * Set the platforms property: Platform specific packet core control plane version properties. + * + * @param platforms the platforms value to set. + * @return the PacketCoreControlPlaneVersionPropertiesFormat object itself. + */ + public PacketCoreControlPlaneVersionPropertiesFormat withPlatforms(List platforms) { + this.platforms = platforms; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (platforms() != null) { + platforms().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("platforms", this.platforms, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreControlPlaneVersionPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreControlPlaneVersionPropertiesFormat if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PacketCoreControlPlaneVersionPropertiesFormat. + */ + public static PacketCoreControlPlaneVersionPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreControlPlaneVersionPropertiesFormat deserializedPacketCoreControlPlaneVersionPropertiesFormat + = new PacketCoreControlPlaneVersionPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedPacketCoreControlPlaneVersionPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("platforms".equals(fieldName)) { + List platforms = reader.readArray(reader1 -> Platform.fromJson(reader1)); + deserializedPacketCoreControlPlaneVersionPropertiesFormat.platforms = platforms; + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreControlPlaneVersionPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreDataPlaneInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreDataPlaneInner.java new file mode 100644 index 000000000000..53151fed425a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreDataPlaneInner.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.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Packet core data plane resource. Must be created in the same location as its parent packet core control plane. + */ +@Fluent +public final class PacketCoreDataPlaneInner extends Resource { + /* + * Packet core data plane Properties. + */ + private PacketCoreDataPlanePropertiesFormat innerProperties = new PacketCoreDataPlanePropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PacketCoreDataPlaneInner class. + */ + public PacketCoreDataPlaneInner() { + } + + /** + * Get the innerProperties property: Packet core data plane Properties. + * + * @return the innerProperties value. + */ + private PacketCoreDataPlanePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public PacketCoreDataPlaneInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PacketCoreDataPlaneInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the packet core data plane resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the userPlaneAccessInterface property: The user plane interface on the access network. For 5G networks, this + * is the N3 interface. For 4G networks, this is the S1-U interface. + * + * @return the userPlaneAccessInterface value. + */ + public InterfaceProperties userPlaneAccessInterface() { + return this.innerProperties() == null ? null : this.innerProperties().userPlaneAccessInterface(); + } + + /** + * Set the userPlaneAccessInterface property: The user plane interface on the access network. For 5G networks, this + * is the N3 interface. For 4G networks, this is the S1-U interface. + * + * @param userPlaneAccessInterface the userPlaneAccessInterface value to set. + * @return the PacketCoreDataPlaneInner object itself. + */ + public PacketCoreDataPlaneInner withUserPlaneAccessInterface(InterfaceProperties userPlaneAccessInterface) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreDataPlanePropertiesFormat(); + } + this.innerProperties().withUserPlaneAccessInterface(userPlaneAccessInterface); + return this; + } + + /** + * Get the userPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the user plane on the access + * network in a High Availability (HA) system. In an HA deployment the access network router should be configured to + * forward traffic for this address to the control plane access interface on the active or standby node. In non-HA + * system this list should be omitted or empty. + * + * @return the userPlaneAccessVirtualIpv4Addresses value. + */ + public List userPlaneAccessVirtualIpv4Addresses() { + return this.innerProperties() == null ? null : this.innerProperties().userPlaneAccessVirtualIpv4Addresses(); + } + + /** + * Set the userPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the user plane on the access + * network in a High Availability (HA) system. In an HA deployment the access network router should be configured to + * forward traffic for this address to the control plane access interface on the active or standby node. In non-HA + * system this list should be omitted or empty. + * + * @param userPlaneAccessVirtualIpv4Addresses the userPlaneAccessVirtualIpv4Addresses value to set. + * @return the PacketCoreDataPlaneInner object itself. + */ + public PacketCoreDataPlaneInner + withUserPlaneAccessVirtualIpv4Addresses(List userPlaneAccessVirtualIpv4Addresses) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreDataPlanePropertiesFormat(); + } + this.innerProperties().withUserPlaneAccessVirtualIpv4Addresses(userPlaneAccessVirtualIpv4Addresses); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model PacketCoreDataPlaneInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreDataPlaneInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreDataPlaneInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreDataPlaneInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PacketCoreDataPlaneInner. + */ + public static PacketCoreDataPlaneInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreDataPlaneInner deserializedPacketCoreDataPlaneInner = new PacketCoreDataPlaneInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPacketCoreDataPlaneInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPacketCoreDataPlaneInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPacketCoreDataPlaneInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPacketCoreDataPlaneInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPacketCoreDataPlaneInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedPacketCoreDataPlaneInner.innerProperties + = PacketCoreDataPlanePropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPacketCoreDataPlaneInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreDataPlaneInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreDataPlanePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreDataPlanePropertiesFormat.java new file mode 100644 index 000000000000..c9bcec3c987f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreDataPlanePropertiesFormat.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Packet core data plane properties. + */ +@Fluent +public final class PacketCoreDataPlanePropertiesFormat + implements JsonSerializable { + /* + * The provisioning state of the packet core data plane resource. + */ + private ProvisioningState provisioningState; + + /* + * The user plane interface on the access network. For 5G networks, this is the N3 interface. For 4G networks, this + * is the S1-U interface. + */ + private InterfaceProperties userPlaneAccessInterface; + + /* + * The virtual IP address(es) for the user plane on the access network in a High Availability (HA) system. In an HA + * deployment the access network router should be configured to forward traffic for this address to the control + * plane access interface on the active or standby node. In non-HA system this list should be omitted or empty. + */ + private List userPlaneAccessVirtualIpv4Addresses; + + /** + * Creates an instance of PacketCoreDataPlanePropertiesFormat class. + */ + public PacketCoreDataPlanePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the packet core data plane resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the userPlaneAccessInterface property: The user plane interface on the access network. For 5G networks, this + * is the N3 interface. For 4G networks, this is the S1-U interface. + * + * @return the userPlaneAccessInterface value. + */ + public InterfaceProperties userPlaneAccessInterface() { + return this.userPlaneAccessInterface; + } + + /** + * Set the userPlaneAccessInterface property: The user plane interface on the access network. For 5G networks, this + * is the N3 interface. For 4G networks, this is the S1-U interface. + * + * @param userPlaneAccessInterface the userPlaneAccessInterface value to set. + * @return the PacketCoreDataPlanePropertiesFormat object itself. + */ + public PacketCoreDataPlanePropertiesFormat + withUserPlaneAccessInterface(InterfaceProperties userPlaneAccessInterface) { + this.userPlaneAccessInterface = userPlaneAccessInterface; + return this; + } + + /** + * Get the userPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the user plane on the access + * network in a High Availability (HA) system. In an HA deployment the access network router should be configured to + * forward traffic for this address to the control plane access interface on the active or standby node. In non-HA + * system this list should be omitted or empty. + * + * @return the userPlaneAccessVirtualIpv4Addresses value. + */ + public List userPlaneAccessVirtualIpv4Addresses() { + return this.userPlaneAccessVirtualIpv4Addresses; + } + + /** + * Set the userPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the user plane on the access + * network in a High Availability (HA) system. In an HA deployment the access network router should be configured to + * forward traffic for this address to the control plane access interface on the active or standby node. In non-HA + * system this list should be omitted or empty. + * + * @param userPlaneAccessVirtualIpv4Addresses the userPlaneAccessVirtualIpv4Addresses value to set. + * @return the PacketCoreDataPlanePropertiesFormat object itself. + */ + public PacketCoreDataPlanePropertiesFormat + withUserPlaneAccessVirtualIpv4Addresses(List userPlaneAccessVirtualIpv4Addresses) { + this.userPlaneAccessVirtualIpv4Addresses = userPlaneAccessVirtualIpv4Addresses; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userPlaneAccessInterface() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property userPlaneAccessInterface in model PacketCoreDataPlanePropertiesFormat")); + } else { + userPlaneAccessInterface().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreDataPlanePropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("userPlaneAccessInterface", this.userPlaneAccessInterface); + jsonWriter.writeArrayField("userPlaneAccessVirtualIpv4Addresses", this.userPlaneAccessVirtualIpv4Addresses, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreDataPlanePropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreDataPlanePropertiesFormat if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PacketCoreDataPlanePropertiesFormat. + */ + public static PacketCoreDataPlanePropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreDataPlanePropertiesFormat deserializedPacketCoreDataPlanePropertiesFormat + = new PacketCoreDataPlanePropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userPlaneAccessInterface".equals(fieldName)) { + deserializedPacketCoreDataPlanePropertiesFormat.userPlaneAccessInterface + = InterfaceProperties.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPacketCoreDataPlanePropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("userPlaneAccessVirtualIpv4Addresses".equals(fieldName)) { + List userPlaneAccessVirtualIpv4Addresses = reader.readArray(reader1 -> reader1.getString()); + deserializedPacketCoreDataPlanePropertiesFormat.userPlaneAccessVirtualIpv4Addresses + = userPlaneAccessVirtualIpv4Addresses; + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreDataPlanePropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/RoutingInfoModelInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/RoutingInfoModelInner.java new file mode 100644 index 000000000000..93427d55206c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/RoutingInfoModelInner.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4Route; +import com.azure.resourcemanager.mobilenetwork.models.UserPlaneDataRoutesItem; +import java.io.IOException; +import java.util.List; + +/** + * Routing information. + */ +@Fluent +public final class RoutingInfoModelInner extends ProxyResource { + /* + * Routing information properties + */ + private RoutingInfoPropertiesFormat innerProperties = new RoutingInfoPropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RoutingInfoModelInner class. + */ + public RoutingInfoModelInner() { + } + + /** + * Get the innerProperties property: Routing information properties. + * + * @return the innerProperties value. + */ + private RoutingInfoPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the controlPlaneAccessRoutes property: A list of IPv4 routes. + * + * @return the controlPlaneAccessRoutes value. + */ + public List controlPlaneAccessRoutes() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneAccessRoutes(); + } + + /** + * Set the controlPlaneAccessRoutes property: A list of IPv4 routes. + * + * @param controlPlaneAccessRoutes the controlPlaneAccessRoutes value to set. + * @return the RoutingInfoModelInner object itself. + */ + public RoutingInfoModelInner withControlPlaneAccessRoutes(List controlPlaneAccessRoutes) { + if (this.innerProperties() == null) { + this.innerProperties = new RoutingInfoPropertiesFormat(); + } + this.innerProperties().withControlPlaneAccessRoutes(controlPlaneAccessRoutes); + return this; + } + + /** + * Get the userPlaneAccessRoutes property: A list of IPv4 routes. + * + * @return the userPlaneAccessRoutes value. + */ + public List userPlaneAccessRoutes() { + return this.innerProperties() == null ? null : this.innerProperties().userPlaneAccessRoutes(); + } + + /** + * Set the userPlaneAccessRoutes property: A list of IPv4 routes. + * + * @param userPlaneAccessRoutes the userPlaneAccessRoutes value to set. + * @return the RoutingInfoModelInner object itself. + */ + public RoutingInfoModelInner withUserPlaneAccessRoutes(List userPlaneAccessRoutes) { + if (this.innerProperties() == null) { + this.innerProperties = new RoutingInfoPropertiesFormat(); + } + this.innerProperties().withUserPlaneAccessRoutes(userPlaneAccessRoutes); + return this; + } + + /** + * Get the userPlaneDataRoutes property: A list of attached data networks and their IPv4 routes. + * + * @return the userPlaneDataRoutes value. + */ + public List userPlaneDataRoutes() { + return this.innerProperties() == null ? null : this.innerProperties().userPlaneDataRoutes(); + } + + /** + * Set the userPlaneDataRoutes property: A list of attached data networks and their IPv4 routes. + * + * @param userPlaneDataRoutes the userPlaneDataRoutes value to set. + * @return the RoutingInfoModelInner object itself. + */ + public RoutingInfoModelInner withUserPlaneDataRoutes(List userPlaneDataRoutes) { + if (this.innerProperties() == null) { + this.innerProperties = new RoutingInfoPropertiesFormat(); + } + this.innerProperties().withUserPlaneDataRoutes(userPlaneDataRoutes); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model RoutingInfoModelInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RoutingInfoModelInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutingInfoModelInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutingInfoModelInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RoutingInfoModelInner. + */ + public static RoutingInfoModelInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutingInfoModelInner deserializedRoutingInfoModelInner = new RoutingInfoModelInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRoutingInfoModelInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRoutingInfoModelInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRoutingInfoModelInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRoutingInfoModelInner.innerProperties = RoutingInfoPropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRoutingInfoModelInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutingInfoModelInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/RoutingInfoPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/RoutingInfoPropertiesFormat.java new file mode 100644 index 000000000000..58ab55568fed --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/RoutingInfoPropertiesFormat.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4Route; +import com.azure.resourcemanager.mobilenetwork.models.UserPlaneDataRoutesItem; +import java.io.IOException; +import java.util.List; + +/** + * Routing information properties. + */ +@Fluent +public final class RoutingInfoPropertiesFormat implements JsonSerializable { + /* + * A list of IPv4 routes. + */ + private List controlPlaneAccessRoutes; + + /* + * A list of IPv4 routes. + */ + private List userPlaneAccessRoutes; + + /* + * A list of attached data networks and their IPv4 routes. + */ + private List userPlaneDataRoutes; + + /** + * Creates an instance of RoutingInfoPropertiesFormat class. + */ + public RoutingInfoPropertiesFormat() { + } + + /** + * Get the controlPlaneAccessRoutes property: A list of IPv4 routes. + * + * @return the controlPlaneAccessRoutes value. + */ + public List controlPlaneAccessRoutes() { + return this.controlPlaneAccessRoutes; + } + + /** + * Set the controlPlaneAccessRoutes property: A list of IPv4 routes. + * + * @param controlPlaneAccessRoutes the controlPlaneAccessRoutes value to set. + * @return the RoutingInfoPropertiesFormat object itself. + */ + public RoutingInfoPropertiesFormat withControlPlaneAccessRoutes(List controlPlaneAccessRoutes) { + this.controlPlaneAccessRoutes = controlPlaneAccessRoutes; + return this; + } + + /** + * Get the userPlaneAccessRoutes property: A list of IPv4 routes. + * + * @return the userPlaneAccessRoutes value. + */ + public List userPlaneAccessRoutes() { + return this.userPlaneAccessRoutes; + } + + /** + * Set the userPlaneAccessRoutes property: A list of IPv4 routes. + * + * @param userPlaneAccessRoutes the userPlaneAccessRoutes value to set. + * @return the RoutingInfoPropertiesFormat object itself. + */ + public RoutingInfoPropertiesFormat withUserPlaneAccessRoutes(List userPlaneAccessRoutes) { + this.userPlaneAccessRoutes = userPlaneAccessRoutes; + return this; + } + + /** + * Get the userPlaneDataRoutes property: A list of attached data networks and their IPv4 routes. + * + * @return the userPlaneDataRoutes value. + */ + public List userPlaneDataRoutes() { + return this.userPlaneDataRoutes; + } + + /** + * Set the userPlaneDataRoutes property: A list of attached data networks and their IPv4 routes. + * + * @param userPlaneDataRoutes the userPlaneDataRoutes value to set. + * @return the RoutingInfoPropertiesFormat object itself. + */ + public RoutingInfoPropertiesFormat withUserPlaneDataRoutes(List userPlaneDataRoutes) { + this.userPlaneDataRoutes = userPlaneDataRoutes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (controlPlaneAccessRoutes() != null) { + controlPlaneAccessRoutes().forEach(e -> e.validate()); + } + if (userPlaneAccessRoutes() != null) { + userPlaneAccessRoutes().forEach(e -> e.validate()); + } + if (userPlaneDataRoutes() != null) { + userPlaneDataRoutes().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("controlPlaneAccessRoutes", this.controlPlaneAccessRoutes, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("userPlaneAccessRoutes", this.userPlaneAccessRoutes, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("userPlaneDataRoutes", this.userPlaneDataRoutes, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutingInfoPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutingInfoPropertiesFormat if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RoutingInfoPropertiesFormat. + */ + public static RoutingInfoPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutingInfoPropertiesFormat deserializedRoutingInfoPropertiesFormat = new RoutingInfoPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("controlPlaneAccessRoutes".equals(fieldName)) { + List controlPlaneAccessRoutes = reader.readArray(reader1 -> Ipv4Route.fromJson(reader1)); + deserializedRoutingInfoPropertiesFormat.controlPlaneAccessRoutes = controlPlaneAccessRoutes; + } else if ("userPlaneAccessRoutes".equals(fieldName)) { + List userPlaneAccessRoutes = reader.readArray(reader1 -> Ipv4Route.fromJson(reader1)); + deserializedRoutingInfoPropertiesFormat.userPlaneAccessRoutes = userPlaneAccessRoutes; + } else if ("userPlaneDataRoutes".equals(fieldName)) { + List userPlaneDataRoutes + = reader.readArray(reader1 -> UserPlaneDataRoutesItem.fromJson(reader1)); + deserializedRoutingInfoPropertiesFormat.userPlaneDataRoutes = userPlaneDataRoutes; + } else { + reader.skipChildren(); + } + } + + return deserializedRoutingInfoPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ServiceInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ServiceInner.java new file mode 100644 index 000000000000..4ace29a521b3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ServiceInner.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Service resource. Must be created in the same location as its parent mobile network. + */ +@Fluent +public final class ServiceInner extends Resource { + /* + * Service Properties. + */ + private ServicePropertiesFormat innerProperties = new ServicePropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServiceInner class. + */ + public ServiceInner() { + } + + /** + * Get the innerProperties property: Service Properties. + * + * @return the innerProperties value. + */ + private ServicePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ServiceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServiceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the service resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the servicePrecedence property: A precedence value that is used to decide between services when identifying + * the QoS values to use for a particular SIM. A lower value means a higher priority. This value should be unique + * among all services configured in the mobile network. + * + * @return the servicePrecedence value. + */ + public int servicePrecedence() { + return this.innerProperties() == null ? 0 : this.innerProperties().servicePrecedence(); + } + + /** + * Set the servicePrecedence property: A precedence value that is used to decide between services when identifying + * the QoS values to use for a particular SIM. A lower value means a higher priority. This value should be unique + * among all services configured in the mobile network. + * + * @param servicePrecedence the servicePrecedence value to set. + * @return the ServiceInner object itself. + */ + public ServiceInner withServicePrecedence(int servicePrecedence) { + if (this.innerProperties() == null) { + this.innerProperties = new ServicePropertiesFormat(); + } + this.innerProperties().withServicePrecedence(servicePrecedence); + return this; + } + + /** + * Get the serviceQosPolicy property: The QoS policy to use for packets matching this service. This can be + * overridden for particular flows using the ruleQosPolicy field in a PccRuleConfiguration. If this field is null + * then the UE's SIM policy will define the QoS settings. + * + * @return the serviceQosPolicy value. + */ + public QosPolicy serviceQosPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().serviceQosPolicy(); + } + + /** + * Set the serviceQosPolicy property: The QoS policy to use for packets matching this service. This can be + * overridden for particular flows using the ruleQosPolicy field in a PccRuleConfiguration. If this field is null + * then the UE's SIM policy will define the QoS settings. + * + * @param serviceQosPolicy the serviceQosPolicy value to set. + * @return the ServiceInner object itself. + */ + public ServiceInner withServiceQosPolicy(QosPolicy serviceQosPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ServicePropertiesFormat(); + } + this.innerProperties().withServiceQosPolicy(serviceQosPolicy); + return this; + } + + /** + * Get the pccRules property: The set of data flow policy rules that make up this service. + * + * @return the pccRules value. + */ + public List pccRules() { + return this.innerProperties() == null ? null : this.innerProperties().pccRules(); + } + + /** + * Set the pccRules property: The set of data flow policy rules that make up this service. + * + * @param pccRules the pccRules value to set. + * @return the ServiceInner object itself. + */ + public ServiceInner withPccRules(List pccRules) { + if (this.innerProperties() == null) { + this.innerProperties = new ServicePropertiesFormat(); + } + this.innerProperties().withPccRules(pccRules); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property innerProperties in model ServiceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServiceInner. + */ + public static ServiceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceInner deserializedServiceInner = new ServiceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServiceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServiceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServiceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedServiceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedServiceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedServiceInner.innerProperties = ServicePropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedServiceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ServicePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ServicePropertiesFormat.java new file mode 100644 index 000000000000..208fd100ab68 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/ServicePropertiesFormat.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import java.io.IOException; +import java.util.List; + +/** + * Service properties. + */ +@Fluent +public final class ServicePropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the service resource. + */ + private ProvisioningState provisioningState; + + /* + * A precedence value that is used to decide between services when identifying the QoS values to use for a + * particular SIM. A lower value means a higher priority. This value should be unique among all services configured + * in the mobile network. + */ + private int servicePrecedence; + + /* + * The QoS policy to use for packets matching this service. This can be overridden for particular flows using the + * ruleQosPolicy field in a PccRuleConfiguration. If this field is null then the UE's SIM policy will define the QoS + * settings. + */ + private QosPolicy serviceQosPolicy; + + /* + * The set of data flow policy rules that make up this service. + */ + private List pccRules; + + /** + * Creates an instance of ServicePropertiesFormat class. + */ + public ServicePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the service resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the servicePrecedence property: A precedence value that is used to decide between services when identifying + * the QoS values to use for a particular SIM. A lower value means a higher priority. This value should be unique + * among all services configured in the mobile network. + * + * @return the servicePrecedence value. + */ + public int servicePrecedence() { + return this.servicePrecedence; + } + + /** + * Set the servicePrecedence property: A precedence value that is used to decide between services when identifying + * the QoS values to use for a particular SIM. A lower value means a higher priority. This value should be unique + * among all services configured in the mobile network. + * + * @param servicePrecedence the servicePrecedence value to set. + * @return the ServicePropertiesFormat object itself. + */ + public ServicePropertiesFormat withServicePrecedence(int servicePrecedence) { + this.servicePrecedence = servicePrecedence; + return this; + } + + /** + * Get the serviceQosPolicy property: The QoS policy to use for packets matching this service. This can be + * overridden for particular flows using the ruleQosPolicy field in a PccRuleConfiguration. If this field is null + * then the UE's SIM policy will define the QoS settings. + * + * @return the serviceQosPolicy value. + */ + public QosPolicy serviceQosPolicy() { + return this.serviceQosPolicy; + } + + /** + * Set the serviceQosPolicy property: The QoS policy to use for packets matching this service. This can be + * overridden for particular flows using the ruleQosPolicy field in a PccRuleConfiguration. If this field is null + * then the UE's SIM policy will define the QoS settings. + * + * @param serviceQosPolicy the serviceQosPolicy value to set. + * @return the ServicePropertiesFormat object itself. + */ + public ServicePropertiesFormat withServiceQosPolicy(QosPolicy serviceQosPolicy) { + this.serviceQosPolicy = serviceQosPolicy; + return this; + } + + /** + * Get the pccRules property: The set of data flow policy rules that make up this service. + * + * @return the pccRules value. + */ + public List pccRules() { + return this.pccRules; + } + + /** + * Set the pccRules property: The set of data flow policy rules that make up this service. + * + * @param pccRules the pccRules value to set. + * @return the ServicePropertiesFormat object itself. + */ + public ServicePropertiesFormat withPccRules(List pccRules) { + this.pccRules = pccRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (serviceQosPolicy() != null) { + serviceQosPolicy().validate(); + } + if (pccRules() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property pccRules in model ServicePropertiesFormat")); + } else { + pccRules().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServicePropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("servicePrecedence", this.servicePrecedence); + jsonWriter.writeArrayField("pccRules", this.pccRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("serviceQosPolicy", this.serviceQosPolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicePropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicePropertiesFormat if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServicePropertiesFormat. + */ + public static ServicePropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicePropertiesFormat deserializedServicePropertiesFormat = new ServicePropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("servicePrecedence".equals(fieldName)) { + deserializedServicePropertiesFormat.servicePrecedence = reader.getInt(); + } else if ("pccRules".equals(fieldName)) { + List pccRules + = reader.readArray(reader1 -> PccRuleConfiguration.fromJson(reader1)); + deserializedServicePropertiesFormat.pccRules = pccRules; + } else if ("provisioningState".equals(fieldName)) { + deserializedServicePropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("serviceQosPolicy".equals(fieldName)) { + deserializedServicePropertiesFormat.serviceQosPolicy = QosPolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServicePropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimGroupInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimGroupInner.java new file mode 100644 index 000000000000..2a7f032b6a24 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimGroupInner.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.KeyVaultKey; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.Map; + +/** + * SIM group resource. + */ +@Fluent +public final class SimGroupInner extends Resource { + /* + * SIM group Properties. + */ + private SimGroupPropertiesFormat innerProperties = new SimGroupPropertiesFormat(); + + /* + * The identity used to retrieve the encryption key from Azure key vault. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SimGroupInner class. + */ + public SimGroupInner() { + } + + /** + * Get the innerProperties property: SIM group Properties. + * + * @return the innerProperties value. + */ + private SimGroupPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: The identity used to retrieve the encryption key from Azure key vault. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity used to retrieve the encryption key from Azure key vault. + * + * @param identity the identity value to set. + * @return the SimGroupInner object itself. + */ + public SimGroupInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public SimGroupInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SimGroupInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the SIM group resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the encryptionKey property: A key to encrypt the SIM data that belongs to this SIM group. + * + * @return the encryptionKey value. + */ + public KeyVaultKey encryptionKey() { + return this.innerProperties() == null ? null : this.innerProperties().encryptionKey(); + } + + /** + * Set the encryptionKey property: A key to encrypt the SIM data that belongs to this SIM group. + * + * @param encryptionKey the encryptionKey value to set. + * @return the SimGroupInner object itself. + */ + public SimGroupInner withEncryptionKey(KeyVaultKey encryptionKey) { + if (this.innerProperties() == null) { + this.innerProperties = new SimGroupPropertiesFormat(); + } + this.innerProperties().withEncryptionKey(encryptionKey); + return this; + } + + /** + * Get the mobileNetwork property: Mobile network that this SIM group belongs to. The mobile network must be in the + * same location as the SIM group. + * + * @return the mobileNetwork value. + */ + public MobileNetworkResourceId mobileNetwork() { + return this.innerProperties() == null ? null : this.innerProperties().mobileNetwork(); + } + + /** + * Set the mobileNetwork property: Mobile network that this SIM group belongs to. The mobile network must be in the + * same location as the SIM group. + * + * @param mobileNetwork the mobileNetwork value to set. + * @return the SimGroupInner object itself. + */ + public SimGroupInner withMobileNetwork(MobileNetworkResourceId mobileNetwork) { + if (this.innerProperties() == null) { + this.innerProperties = new SimGroupPropertiesFormat(); + } + this.innerProperties().withMobileNetwork(mobileNetwork); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property innerProperties in model SimGroupInner")); + } else { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimGroupInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimGroupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimGroupInner. + */ + public static SimGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimGroupInner deserializedSimGroupInner = new SimGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSimGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSimGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSimGroupInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedSimGroupInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSimGroupInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedSimGroupInner.innerProperties = SimGroupPropertiesFormat.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedSimGroupInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSimGroupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSimGroupInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimGroupPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimGroupPropertiesFormat.java new file mode 100644 index 000000000000..99e500056570 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimGroupPropertiesFormat.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.KeyVaultKey; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; + +/** + * SIM group properties. + */ +@Fluent +public final class SimGroupPropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the SIM group resource. + */ + private ProvisioningState provisioningState; + + /* + * A key to encrypt the SIM data that belongs to this SIM group. + */ + private KeyVaultKey encryptionKey; + + /* + * Mobile network that this SIM group belongs to. The mobile network must be in the same location as the SIM group. + */ + private MobileNetworkResourceId mobileNetwork; + + /** + * Creates an instance of SimGroupPropertiesFormat class. + */ + public SimGroupPropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the SIM group resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the encryptionKey property: A key to encrypt the SIM data that belongs to this SIM group. + * + * @return the encryptionKey value. + */ + public KeyVaultKey encryptionKey() { + return this.encryptionKey; + } + + /** + * Set the encryptionKey property: A key to encrypt the SIM data that belongs to this SIM group. + * + * @param encryptionKey the encryptionKey value to set. + * @return the SimGroupPropertiesFormat object itself. + */ + public SimGroupPropertiesFormat withEncryptionKey(KeyVaultKey encryptionKey) { + this.encryptionKey = encryptionKey; + return this; + } + + /** + * Get the mobileNetwork property: Mobile network that this SIM group belongs to. The mobile network must be in the + * same location as the SIM group. + * + * @return the mobileNetwork value. + */ + public MobileNetworkResourceId mobileNetwork() { + return this.mobileNetwork; + } + + /** + * Set the mobileNetwork property: Mobile network that this SIM group belongs to. The mobile network must be in the + * same location as the SIM group. + * + * @param mobileNetwork the mobileNetwork value to set. + * @return the SimGroupPropertiesFormat object itself. + */ + public SimGroupPropertiesFormat withMobileNetwork(MobileNetworkResourceId mobileNetwork) { + this.mobileNetwork = mobileNetwork; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryptionKey() != null) { + encryptionKey().validate(); + } + if (mobileNetwork() != null) { + mobileNetwork().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("encryptionKey", this.encryptionKey); + jsonWriter.writeJsonField("mobileNetwork", this.mobileNetwork); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimGroupPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimGroupPropertiesFormat if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SimGroupPropertiesFormat. + */ + public static SimGroupPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimGroupPropertiesFormat deserializedSimGroupPropertiesFormat = new SimGroupPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedSimGroupPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("encryptionKey".equals(fieldName)) { + deserializedSimGroupPropertiesFormat.encryptionKey = KeyVaultKey.fromJson(reader); + } else if ("mobileNetwork".equals(fieldName)) { + deserializedSimGroupPropertiesFormat.mobileNetwork = MobileNetworkResourceId.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSimGroupPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimInner.java new file mode 100644 index 000000000000..4586dc52b8fb --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimInner.java @@ -0,0 +1,384 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimState; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SiteProvisioningState; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * SIM resource. + */ +@Fluent +public final class SimInner extends ProxyResource { + /* + * SIM Properties. + */ + private SimPropertiesFormat innerProperties = new SimPropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SimInner class. + */ + public SimInner() { + } + + /** + * Get the innerProperties property: SIM Properties. + * + * @return the innerProperties value. + */ + private SimPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the authenticationKey property: The Ki value for the SIM. + * + * @return the authenticationKey value. + */ + public String authenticationKey() { + return this.innerProperties() == null ? null : this.innerProperties().authenticationKey(); + } + + /** + * Set the authenticationKey property: The Ki value for the SIM. + * + * @param authenticationKey the authenticationKey value to set. + * @return the SimInner object itself. + */ + public SimInner withAuthenticationKey(String authenticationKey) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withAuthenticationKey(authenticationKey); + return this; + } + + /** + * Get the operatorKeyCode property: The Opc value for the SIM. + * + * @return the operatorKeyCode value. + */ + public String operatorKeyCode() { + return this.innerProperties() == null ? null : this.innerProperties().operatorKeyCode(); + } + + /** + * Set the operatorKeyCode property: The Opc value for the SIM. + * + * @param operatorKeyCode the operatorKeyCode value to set. + * @return the SimInner object itself. + */ + public SimInner withOperatorKeyCode(String operatorKeyCode) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withOperatorKeyCode(operatorKeyCode); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the SIM resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the simState property: The state of the SIM resource. + * + * @return the simState value. + */ + public SimState simState() { + return this.innerProperties() == null ? null : this.innerProperties().simState(); + } + + /** + * Get the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM on that site. + * + * @return the siteProvisioningState value. + */ + public Map siteProvisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().siteProvisioningState(); + } + + /** + * Get the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for + * the SIM. + * + * @return the internationalMobileSubscriberIdentity value. + */ + public String internationalMobileSubscriberIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().internationalMobileSubscriberIdentity(); + } + + /** + * Set the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for + * the SIM. + * + * @param internationalMobileSubscriberIdentity the internationalMobileSubscriberIdentity value to set. + * @return the SimInner object itself. + */ + public SimInner withInternationalMobileSubscriberIdentity(String internationalMobileSubscriberIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withInternationalMobileSubscriberIdentity(internationalMobileSubscriberIdentity); + return this; + } + + /** + * Get the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM. + * + * @return the integratedCircuitCardIdentifier value. + */ + public String integratedCircuitCardIdentifier() { + return this.innerProperties() == null ? null : this.innerProperties().integratedCircuitCardIdentifier(); + } + + /** + * Set the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM. + * + * @param integratedCircuitCardIdentifier the integratedCircuitCardIdentifier value to set. + * @return the SimInner object itself. + */ + public SimInner withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withIntegratedCircuitCardIdentifier(integratedCircuitCardIdentifier); + return this; + } + + /** + * Get the deviceType property: An optional free-form text field that can be used to record the device type this SIM + * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on + * this value. + * + * @return the deviceType value. + */ + public String deviceType() { + return this.innerProperties() == null ? null : this.innerProperties().deviceType(); + } + + /** + * Set the deviceType property: An optional free-form text field that can be used to record the device type this SIM + * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on + * this value. + * + * @param deviceType the deviceType value to set. + * @return the SimInner object itself. + */ + public SimInner withDeviceType(String deviceType) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withDeviceType(deviceType); + return this; + } + + /** + * Get the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the + * SIM. + * + * @return the simPolicy value. + */ + public SimPolicyResourceId simPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().simPolicy(); + } + + /** + * Set the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the + * SIM. + * + * @param simPolicy the simPolicy value to set. + * @return the SimInner object itself. + */ + public SimInner withSimPolicy(SimPolicyResourceId simPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withSimPolicy(simPolicy); + return this; + } + + /** + * Get the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is + * assigned at a defined network scope, made up of {attached data network, slice}. + * + * @return the staticIpConfiguration value. + */ + public List staticIpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticIpConfiguration(); + } + + /** + * Set the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is + * assigned at a defined network scope, made up of {attached data network, slice}. + * + * @param staticIpConfiguration the staticIpConfiguration value to set. + * @return the SimInner object itself. + */ + public SimInner withStaticIpConfiguration(List staticIpConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withStaticIpConfiguration(staticIpConfiguration); + return this; + } + + /** + * Get the vendorName property: The name of the SIM vendor who provided this SIM, if any. + * + * @return the vendorName value. + */ + public String vendorName() { + return this.innerProperties() == null ? null : this.innerProperties().vendorName(); + } + + /** + * Get the vendorKeyFingerprint property: The public key fingerprint of the SIM vendor who provided this SIM, if + * any. + * + * @return the vendorKeyFingerprint value. + */ + public String vendorKeyFingerprint() { + return this.innerProperties() == null ? null : this.innerProperties().vendorKeyFingerprint(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property innerProperties in model SimInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimInner if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimInner. + */ + public static SimInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimInner deserializedSimInner = new SimInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSimInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSimInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSimInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSimInner.innerProperties = SimPropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSimInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSimInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyInner.java new file mode 100644 index 000000000000..75b7c554af36 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyInner.java @@ -0,0 +1,336 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SiteProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * SIM policy resource. + */ +@Fluent +public final class SimPolicyInner extends Resource { + /* + * SIM policy Properties. + */ + private SimPolicyPropertiesFormat innerProperties = new SimPolicyPropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SimPolicyInner class. + */ + public SimPolicyInner() { + } + + /** + * Get the innerProperties property: SIM policy Properties. + * + * @return the innerProperties value. + */ + private SimPolicyPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public SimPolicyInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SimPolicyInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the SIM policy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM policy on + * that site. + * + * @return the siteProvisioningState value. + */ + public Map siteProvisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().siteProvisioningState(); + } + + /** + * Get the ueAmbr property: Aggregate maximum bit rate across all non-GBR QoS flows of all PDU sessions of a given + * UE. See 3GPP TS23.501 section 5.7.2.6 for a full description of the UE-AMBR. + * + * @return the ueAmbr value. + */ + public Ambr ueAmbr() { + return this.innerProperties() == null ? null : this.innerProperties().ueAmbr(); + } + + /** + * Set the ueAmbr property: Aggregate maximum bit rate across all non-GBR QoS flows of all PDU sessions of a given + * UE. See 3GPP TS23.501 section 5.7.2.6 for a full description of the UE-AMBR. + * + * @param ueAmbr the ueAmbr value to set. + * @return the SimPolicyInner object itself. + */ + public SimPolicyInner withUeAmbr(Ambr ueAmbr) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPolicyPropertiesFormat(); + } + this.innerProperties().withUeAmbr(ueAmbr); + return this; + } + + /** + * Get the defaultSlice property: The default slice to use if the UE does not explicitly specify it. This slice must + * exist in the `sliceConfigurations` map. The slice must be in the same location as the SIM policy. + * + * @return the defaultSlice value. + */ + public SliceResourceId defaultSlice() { + return this.innerProperties() == null ? null : this.innerProperties().defaultSlice(); + } + + /** + * Set the defaultSlice property: The default slice to use if the UE does not explicitly specify it. This slice must + * exist in the `sliceConfigurations` map. The slice must be in the same location as the SIM policy. + * + * @param defaultSlice the defaultSlice value to set. + * @return the SimPolicyInner object itself. + */ + public SimPolicyInner withDefaultSlice(SliceResourceId defaultSlice) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPolicyPropertiesFormat(); + } + this.innerProperties().withDefaultSlice(defaultSlice); + return this; + } + + /** + * Get the rfspIndex property: RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an + * optional setting and by default is unspecified. + * + * @return the rfspIndex value. + */ + public Integer rfspIndex() { + return this.innerProperties() == null ? null : this.innerProperties().rfspIndex(); + } + + /** + * Set the rfspIndex property: RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an + * optional setting and by default is unspecified. + * + * @param rfspIndex the rfspIndex value to set. + * @return the SimPolicyInner object itself. + */ + public SimPolicyInner withRfspIndex(Integer rfspIndex) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPolicyPropertiesFormat(); + } + this.innerProperties().withRfspIndex(rfspIndex); + return this; + } + + /** + * Get the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. + * + * @return the registrationTimer value. + */ + public Integer registrationTimer() { + return this.innerProperties() == null ? null : this.innerProperties().registrationTimer(); + } + + /** + * Set the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. + * + * @param registrationTimer the registrationTimer value to set. + * @return the SimPolicyInner object itself. + */ + public SimPolicyInner withRegistrationTimer(Integer registrationTimer) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPolicyPropertiesFormat(); + } + this.innerProperties().withRegistrationTimer(registrationTimer); + return this; + } + + /** + * Get the sliceConfigurations property: The allowed slices and the settings to use for them. The list must not + * contain duplicate items and must contain at least one item. + * + * @return the sliceConfigurations value. + */ + public List sliceConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().sliceConfigurations(); + } + + /** + * Set the sliceConfigurations property: The allowed slices and the settings to use for them. The list must not + * contain duplicate items and must contain at least one item. + * + * @param sliceConfigurations the sliceConfigurations value to set. + * @return the SimPolicyInner object itself. + */ + public SimPolicyInner withSliceConfigurations(List sliceConfigurations) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPolicyPropertiesFormat(); + } + this.innerProperties().withSliceConfigurations(sliceConfigurations); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property innerProperties in model SimPolicyInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimPolicyInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimPolicyInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimPolicyInner. + */ + public static SimPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimPolicyInner deserializedSimPolicyInner = new SimPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSimPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSimPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSimPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedSimPolicyInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSimPolicyInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedSimPolicyInner.innerProperties = SimPolicyPropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSimPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSimPolicyInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyPropertiesFormat.java new file mode 100644 index 000000000000..084bc65717b9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyPropertiesFormat.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SiteProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * SIM policy properties. Must be created in the same location as its parent mobile network. + */ +@Fluent +public final class SimPolicyPropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the SIM policy resource. + */ + private ProvisioningState provisioningState; + + /* + * A dictionary of sites to the provisioning state of this SIM policy on that site. + */ + private Map siteProvisioningState; + + /* + * Aggregate maximum bit rate across all non-GBR QoS flows of all PDU sessions of a given UE. See 3GPP TS23.501 + * section 5.7.2.6 for a full description of the UE-AMBR. + */ + private Ambr ueAmbr; + + /* + * The default slice to use if the UE does not explicitly specify it. This slice must exist in the + * `sliceConfigurations` map. The slice must be in the same location as the SIM policy. + */ + private SliceResourceId defaultSlice; + + /* + * RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an optional setting and by default is + * unspecified. + */ + private Integer rfspIndex; + + /* + * UE periodic registration update timer (5G) or UE periodic tracking area update timer (4G), in seconds. + */ + private Integer registrationTimer; + + /* + * The allowed slices and the settings to use for them. The list must not contain duplicate items and must contain + * at least one item. + */ + private List sliceConfigurations; + + /** + * Creates an instance of SimPolicyPropertiesFormat class. + */ + public SimPolicyPropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the SIM policy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM policy on + * that site. + * + * @return the siteProvisioningState value. + */ + public Map siteProvisioningState() { + return this.siteProvisioningState; + } + + /** + * Get the ueAmbr property: Aggregate maximum bit rate across all non-GBR QoS flows of all PDU sessions of a given + * UE. See 3GPP TS23.501 section 5.7.2.6 for a full description of the UE-AMBR. + * + * @return the ueAmbr value. + */ + public Ambr ueAmbr() { + return this.ueAmbr; + } + + /** + * Set the ueAmbr property: Aggregate maximum bit rate across all non-GBR QoS flows of all PDU sessions of a given + * UE. See 3GPP TS23.501 section 5.7.2.6 for a full description of the UE-AMBR. + * + * @param ueAmbr the ueAmbr value to set. + * @return the SimPolicyPropertiesFormat object itself. + */ + public SimPolicyPropertiesFormat withUeAmbr(Ambr ueAmbr) { + this.ueAmbr = ueAmbr; + return this; + } + + /** + * Get the defaultSlice property: The default slice to use if the UE does not explicitly specify it. This slice must + * exist in the `sliceConfigurations` map. The slice must be in the same location as the SIM policy. + * + * @return the defaultSlice value. + */ + public SliceResourceId defaultSlice() { + return this.defaultSlice; + } + + /** + * Set the defaultSlice property: The default slice to use if the UE does not explicitly specify it. This slice must + * exist in the `sliceConfigurations` map. The slice must be in the same location as the SIM policy. + * + * @param defaultSlice the defaultSlice value to set. + * @return the SimPolicyPropertiesFormat object itself. + */ + public SimPolicyPropertiesFormat withDefaultSlice(SliceResourceId defaultSlice) { + this.defaultSlice = defaultSlice; + return this; + } + + /** + * Get the rfspIndex property: RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an + * optional setting and by default is unspecified. + * + * @return the rfspIndex value. + */ + public Integer rfspIndex() { + return this.rfspIndex; + } + + /** + * Set the rfspIndex property: RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an + * optional setting and by default is unspecified. + * + * @param rfspIndex the rfspIndex value to set. + * @return the SimPolicyPropertiesFormat object itself. + */ + public SimPolicyPropertiesFormat withRfspIndex(Integer rfspIndex) { + this.rfspIndex = rfspIndex; + return this; + } + + /** + * Get the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. + * + * @return the registrationTimer value. + */ + public Integer registrationTimer() { + return this.registrationTimer; + } + + /** + * Set the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. + * + * @param registrationTimer the registrationTimer value to set. + * @return the SimPolicyPropertiesFormat object itself. + */ + public SimPolicyPropertiesFormat withRegistrationTimer(Integer registrationTimer) { + this.registrationTimer = registrationTimer; + return this; + } + + /** + * Get the sliceConfigurations property: The allowed slices and the settings to use for them. The list must not + * contain duplicate items and must contain at least one item. + * + * @return the sliceConfigurations value. + */ + public List sliceConfigurations() { + return this.sliceConfigurations; + } + + /** + * Set the sliceConfigurations property: The allowed slices and the settings to use for them. The list must not + * contain duplicate items and must contain at least one item. + * + * @param sliceConfigurations the sliceConfigurations value to set. + * @return the SimPolicyPropertiesFormat object itself. + */ + public SimPolicyPropertiesFormat withSliceConfigurations(List sliceConfigurations) { + this.sliceConfigurations = sliceConfigurations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ueAmbr() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property ueAmbr in model SimPolicyPropertiesFormat")); + } else { + ueAmbr().validate(); + } + if (defaultSlice() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property defaultSlice in model SimPolicyPropertiesFormat")); + } else { + defaultSlice().validate(); + } + if (sliceConfigurations() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sliceConfigurations in model SimPolicyPropertiesFormat")); + } else { + sliceConfigurations().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimPolicyPropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("ueAmbr", this.ueAmbr); + jsonWriter.writeJsonField("defaultSlice", this.defaultSlice); + jsonWriter.writeArrayField("sliceConfigurations", this.sliceConfigurations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("rfspIndex", this.rfspIndex); + jsonWriter.writeNumberField("registrationTimer", this.registrationTimer); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimPolicyPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimPolicyPropertiesFormat if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimPolicyPropertiesFormat. + */ + public static SimPolicyPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimPolicyPropertiesFormat deserializedSimPolicyPropertiesFormat = new SimPolicyPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ueAmbr".equals(fieldName)) { + deserializedSimPolicyPropertiesFormat.ueAmbr = Ambr.fromJson(reader); + } else if ("defaultSlice".equals(fieldName)) { + deserializedSimPolicyPropertiesFormat.defaultSlice = SliceResourceId.fromJson(reader); + } else if ("sliceConfigurations".equals(fieldName)) { + List sliceConfigurations + = reader.readArray(reader1 -> SliceConfiguration.fromJson(reader1)); + deserializedSimPolicyPropertiesFormat.sliceConfigurations = sliceConfigurations; + } else if ("provisioningState".equals(fieldName)) { + deserializedSimPolicyPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("siteProvisioningState".equals(fieldName)) { + Map siteProvisioningState + = reader.readMap(reader1 -> SiteProvisioningState.fromString(reader1.getString())); + deserializedSimPolicyPropertiesFormat.siteProvisioningState = siteProvisioningState; + } else if ("rfspIndex".equals(fieldName)) { + deserializedSimPolicyPropertiesFormat.rfspIndex = reader.getNullable(JsonReader::getInt); + } else if ("registrationTimer".equals(fieldName)) { + deserializedSimPolicyPropertiesFormat.registrationTimer = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSimPolicyPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPropertiesFormat.java new file mode 100644 index 000000000000..8e66f09edd79 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPropertiesFormat.java @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.CommonSimPropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimState; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SiteProvisioningState; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * SIM properties. + */ +@Fluent +public final class SimPropertiesFormat extends CommonSimPropertiesFormat { + /* + * The Ki value for the SIM. + */ + private String authenticationKey; + + /* + * The Opc value for the SIM. + */ + private String operatorKeyCode; + + /* + * The public key fingerprint of the SIM vendor who provided this SIM, if any. + */ + private String vendorKeyFingerprint; + + /* + * The name of the SIM vendor who provided this SIM, if any. + */ + private String vendorName; + + /* + * A dictionary of sites to the provisioning state of this SIM on that site. + */ + private Map siteProvisioningState; + + /* + * The state of the SIM resource. + */ + private SimState simState; + + /* + * The provisioning state of the SIM resource. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of SimPropertiesFormat class. + */ + public SimPropertiesFormat() { + } + + /** + * Get the authenticationKey property: The Ki value for the SIM. + * + * @return the authenticationKey value. + */ + public String authenticationKey() { + return this.authenticationKey; + } + + /** + * Set the authenticationKey property: The Ki value for the SIM. + * + * @param authenticationKey the authenticationKey value to set. + * @return the SimPropertiesFormat object itself. + */ + public SimPropertiesFormat withAuthenticationKey(String authenticationKey) { + this.authenticationKey = authenticationKey; + return this; + } + + /** + * Get the operatorKeyCode property: The Opc value for the SIM. + * + * @return the operatorKeyCode value. + */ + public String operatorKeyCode() { + return this.operatorKeyCode; + } + + /** + * Set the operatorKeyCode property: The Opc value for the SIM. + * + * @param operatorKeyCode the operatorKeyCode value to set. + * @return the SimPropertiesFormat object itself. + */ + public SimPropertiesFormat withOperatorKeyCode(String operatorKeyCode) { + this.operatorKeyCode = operatorKeyCode; + return this; + } + + /** + * Get the vendorKeyFingerprint property: The public key fingerprint of the SIM vendor who provided this SIM, if + * any. + * + * @return the vendorKeyFingerprint value. + */ + @Override + public String vendorKeyFingerprint() { + return this.vendorKeyFingerprint; + } + + /** + * Get the vendorName property: The name of the SIM vendor who provided this SIM, if any. + * + * @return the vendorName value. + */ + @Override + public String vendorName() { + return this.vendorName; + } + + /** + * Get the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM on that site. + * + * @return the siteProvisioningState value. + */ + @Override + public Map siteProvisioningState() { + return this.siteProvisioningState; + } + + /** + * Get the simState property: The state of the SIM resource. + * + * @return the simState value. + */ + @Override + public SimState simState() { + return this.simState; + } + + /** + * Get the provisioningState property: The provisioning state of the SIM resource. + * + * @return the provisioningState value. + */ + @Override + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public SimPropertiesFormat withInternationalMobileSubscriberIdentity(String internationalMobileSubscriberIdentity) { + super.withInternationalMobileSubscriberIdentity(internationalMobileSubscriberIdentity); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SimPropertiesFormat withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier) { + super.withIntegratedCircuitCardIdentifier(integratedCircuitCardIdentifier); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SimPropertiesFormat withDeviceType(String deviceType) { + super.withDeviceType(deviceType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SimPropertiesFormat withSimPolicy(SimPolicyResourceId simPolicy) { + super.withSimPolicy(simPolicy); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SimPropertiesFormat withStaticIpConfiguration(List staticIpConfiguration) { + super.withStaticIpConfiguration(staticIpConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (internationalMobileSubscriberIdentity() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property internationalMobileSubscriberIdentity in model SimPropertiesFormat")); + } + if (simPolicy() != null) { + simPolicy().validate(); + } + if (staticIpConfiguration() != null) { + staticIpConfiguration().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimPropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("internationalMobileSubscriberIdentity", internationalMobileSubscriberIdentity()); + jsonWriter.writeStringField("integratedCircuitCardIdentifier", integratedCircuitCardIdentifier()); + jsonWriter.writeStringField("deviceType", deviceType()); + jsonWriter.writeJsonField("simPolicy", simPolicy()); + jsonWriter.writeArrayField("staticIpConfiguration", staticIpConfiguration(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("authenticationKey", this.authenticationKey); + jsonWriter.writeStringField("operatorKeyCode", this.operatorKeyCode); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimPropertiesFormat if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimPropertiesFormat. + */ + public static SimPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimPropertiesFormat deserializedSimPropertiesFormat = new SimPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("internationalMobileSubscriberIdentity".equals(fieldName)) { + deserializedSimPropertiesFormat.withInternationalMobileSubscriberIdentity(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedSimPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("simState".equals(fieldName)) { + deserializedSimPropertiesFormat.simState = SimState.fromString(reader.getString()); + } else if ("siteProvisioningState".equals(fieldName)) { + Map siteProvisioningState + = reader.readMap(reader1 -> SiteProvisioningState.fromString(reader1.getString())); + deserializedSimPropertiesFormat.siteProvisioningState = siteProvisioningState; + } else if ("integratedCircuitCardIdentifier".equals(fieldName)) { + deserializedSimPropertiesFormat.withIntegratedCircuitCardIdentifier(reader.getString()); + } else if ("deviceType".equals(fieldName)) { + deserializedSimPropertiesFormat.withDeviceType(reader.getString()); + } else if ("simPolicy".equals(fieldName)) { + deserializedSimPropertiesFormat.withSimPolicy(SimPolicyResourceId.fromJson(reader)); + } else if ("staticIpConfiguration".equals(fieldName)) { + List staticIpConfiguration + = reader.readArray(reader1 -> SimStaticIpProperties.fromJson(reader1)); + deserializedSimPropertiesFormat.withStaticIpConfiguration(staticIpConfiguration); + } else if ("vendorName".equals(fieldName)) { + deserializedSimPropertiesFormat.vendorName = reader.getString(); + } else if ("vendorKeyFingerprint".equals(fieldName)) { + deserializedSimPropertiesFormat.vendorKeyFingerprint = reader.getString(); + } else if ("authenticationKey".equals(fieldName)) { + deserializedSimPropertiesFormat.authenticationKey = reader.getString(); + } else if ("operatorKeyCode".equals(fieldName)) { + deserializedSimPropertiesFormat.operatorKeyCode = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSimPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SiteInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SiteInner.java new file mode 100644 index 000000000000..c16e639d467b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SiteInner.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SubResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Site resource. Must be created in the same location as its parent mobile network. + */ +@Fluent +public final class SiteInner extends Resource { + /* + * Site properties. + */ + private SitePropertiesFormat innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SiteInner class. + */ + public SiteInner() { + } + + /** + * Get the innerProperties property: Site properties. + * + * @return the innerProperties value. + */ + private SitePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public SiteInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SiteInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the site resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the networkFunctions property: An array of IDs of the network functions deployed in the site. Deleting the + * site will delete any network functions that are deployed in the site. + * + * @return the networkFunctions value. + */ + public List networkFunctions() { + return this.innerProperties() == null ? null : this.innerProperties().networkFunctions(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SiteInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SiteInner if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SiteInner. + */ + public static SiteInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SiteInner deserializedSiteInner = new SiteInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSiteInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSiteInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSiteInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedSiteInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSiteInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedSiteInner.innerProperties = SitePropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSiteInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSiteInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SitePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SitePropertiesFormat.java new file mode 100644 index 000000000000..a6c4ab2f7abb --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SitePropertiesFormat.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Site properties. + */ +@Immutable +public final class SitePropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the site resource. + */ + private ProvisioningState provisioningState; + + /* + * An array of IDs of the network functions deployed in the site. Deleting the site will delete any network + * functions that are deployed in the site. + */ + private List networkFunctions; + + /** + * Creates an instance of SitePropertiesFormat class. + */ + public SitePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the site resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the networkFunctions property: An array of IDs of the network functions deployed in the site. Deleting the + * site will delete any network functions that are deployed in the site. + * + * @return the networkFunctions value. + */ + public List networkFunctions() { + return this.networkFunctions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SitePropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SitePropertiesFormat if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SitePropertiesFormat. + */ + public static SitePropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SitePropertiesFormat deserializedSitePropertiesFormat = new SitePropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedSitePropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("networkFunctions".equals(fieldName)) { + List networkFunctions = reader.readArray(reader1 -> SubResource.fromJson(reader1)); + deserializedSitePropertiesFormat.networkFunctions = networkFunctions; + } else { + reader.skipChildren(); + } + } + + return deserializedSitePropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SliceInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SliceInner.java new file mode 100644 index 000000000000..49a4da5814ca --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SliceInner.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import java.io.IOException; +import java.util.Map; + +/** + * Network slice resource. Must be created in the same location as its parent mobile network. + */ +@Fluent +public final class SliceInner extends Resource { + /* + * Slice properties. + */ + private SlicePropertiesFormat innerProperties = new SlicePropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SliceInner class. + */ + public SliceInner() { + } + + /** + * Get the innerProperties property: Slice properties. + * + * @return the innerProperties value. + */ + private SlicePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public SliceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SliceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the network slice resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the snssai property: Single-network slice selection assistance information (S-NSSAI). Unique at the scope of + * a mobile network. + * + * @return the snssai value. + */ + public Snssai snssai() { + return this.innerProperties() == null ? null : this.innerProperties().snssai(); + } + + /** + * Set the snssai property: Single-network slice selection assistance information (S-NSSAI). Unique at the scope of + * a mobile network. + * + * @param snssai the snssai value to set. + * @return the SliceInner object itself. + */ + public SliceInner withSnssai(Snssai snssai) { + if (this.innerProperties() == null) { + this.innerProperties = new SlicePropertiesFormat(); + } + this.innerProperties().withSnssai(snssai); + return this; + } + + /** + * Get the description property: An optional description for this network slice. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: An optional description for this network slice. + * + * @param description the description value to set. + * @return the SliceInner object itself. + */ + public SliceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new SlicePropertiesFormat(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property innerProperties in model SliceInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SliceInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SliceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SliceInner if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SliceInner. + */ + public static SliceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SliceInner deserializedSliceInner = new SliceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSliceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSliceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSliceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedSliceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSliceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedSliceInner.innerProperties = SlicePropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSliceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSliceInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SlicePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SlicePropertiesFormat.java new file mode 100644 index 000000000000..136894bdb8fc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SlicePropertiesFormat.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import java.io.IOException; + +/** + * Network slice properties. + */ +@Fluent +public final class SlicePropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the network slice resource. + */ + private ProvisioningState provisioningState; + + /* + * Single-network slice selection assistance information (S-NSSAI). Unique at the scope of a mobile network. + */ + private Snssai snssai; + + /* + * An optional description for this network slice. + */ + private String description; + + /** + * Creates an instance of SlicePropertiesFormat class. + */ + public SlicePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the network slice resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the snssai property: Single-network slice selection assistance information (S-NSSAI). Unique at the scope of + * a mobile network. + * + * @return the snssai value. + */ + public Snssai snssai() { + return this.snssai; + } + + /** + * Set the snssai property: Single-network slice selection assistance information (S-NSSAI). Unique at the scope of + * a mobile network. + * + * @param snssai the snssai value to set. + * @return the SlicePropertiesFormat object itself. + */ + public SlicePropertiesFormat withSnssai(Snssai snssai) { + this.snssai = snssai; + return this; + } + + /** + * Get the description property: An optional description for this network slice. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: An optional description for this network slice. + * + * @param description the description value to set. + * @return the SlicePropertiesFormat object itself. + */ + public SlicePropertiesFormat withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (snssai() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property snssai in model SlicePropertiesFormat")); + } else { + snssai().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SlicePropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("snssai", this.snssai); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SlicePropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SlicePropertiesFormat if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SlicePropertiesFormat. + */ + public static SlicePropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SlicePropertiesFormat deserializedSlicePropertiesFormat = new SlicePropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snssai".equals(fieldName)) { + deserializedSlicePropertiesFormat.snssai = Snssai.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedSlicePropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedSlicePropertiesFormat.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSlicePropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/UeInfoInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/UeInfoInner.java new file mode 100644 index 000000000000..30ee4168792c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/UeInfoInner.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.models.UeInfoPropertiesFormat; +import java.io.IOException; + +/** + * Basic UE Information. + */ +@Fluent +public final class UeInfoInner extends ProxyResource { + /* + * Basic UE Information Properties. + */ + private UeInfoPropertiesFormat properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of UeInfoInner class. + */ + public UeInfoInner() { + } + + /** + * Get the properties property: Basic UE Information Properties. + * + * @return the properties value. + */ + public UeInfoPropertiesFormat properties() { + return this.properties; + } + + /** + * Set the properties property: Basic UE Information Properties. + * + * @param properties the properties value to set. + * @return the UeInfoInner object itself. + */ + public UeInfoInner withProperties(UeInfoPropertiesFormat properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model UeInfoInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeInfoInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeInfoInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeInfoInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeInfoInner. + */ + public static UeInfoInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeInfoInner deserializedUeInfoInner = new UeInfoInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedUeInfoInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedUeInfoInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedUeInfoInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedUeInfoInner.properties = UeInfoPropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedUeInfoInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedUeInfoInner; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/package-info.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/package-info.java new file mode 100644 index 000000000000..041cf7835826 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the inner data models for MobileNetworkManagementClient. + * The resources in this API specification will be used to manage attached data network resources in mobile network + * attached to a particular packet core instance. + */ +package com.azure.resourcemanager.mobilenetwork.fluent.models; diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/package-info.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/package-info.java new file mode 100644 index 000000000000..d9ab88114860 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the service clients for MobileNetworkManagementClient. + * The resources in this API specification will be used to manage attached data network resources in mobile network + * attached to a particular packet core instance. + */ +package com.azure.resourcemanager.mobilenetwork.fluent; diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AsyncOperationStatusImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AsyncOperationStatusImpl.java new file mode 100644 index 000000000000..3678e7eacb1b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AsyncOperationStatusImpl.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; +import java.time.OffsetDateTime; + +public final class AsyncOperationStatusImpl implements AsyncOperationStatus { + private AsyncOperationStatusInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + AsyncOperationStatusImpl(AsyncOperationStatusInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public Double percentComplete() { + return this.innerModel().percentComplete(); + } + + public Object properties() { + return this.innerModel().properties(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public AsyncOperationStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworkImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworkImpl.java new file mode 100644 index 000000000000..04a2a39e5317 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworkImpl.java @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetwork; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class AttachedDataNetworkImpl + implements AttachedDataNetwork, AttachedDataNetwork.Definition, AttachedDataNetwork.Update { + private AttachedDataNetworkInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public InterfaceProperties userPlaneDataInterface() { + return this.innerModel().userPlaneDataInterface(); + } + + public List dnsAddresses() { + List inner = this.innerModel().dnsAddresses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public NaptConfiguration naptConfiguration() { + return this.innerModel().naptConfiguration(); + } + + public List userEquipmentAddressPoolPrefix() { + List inner = this.innerModel().userEquipmentAddressPoolPrefix(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List userEquipmentStaticAddressPoolPrefix() { + List inner = this.innerModel().userEquipmentStaticAddressPoolPrefix(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AttachedDataNetworkInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String packetCoreControlPlaneName; + + private String packetCoreDataPlaneName; + + private String attachedDataNetworkName; + + private TagsObject updateParameters; + + public AttachedDataNetworkImpl withExistingPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + this.resourceGroupName = resourceGroupName; + this.packetCoreControlPlaneName = packetCoreControlPlaneName; + this.packetCoreDataPlaneName = packetCoreDataPlaneName; + return this; + } + + public AttachedDataNetwork create() { + this.innerObject = serviceManager.serviceClient() + .getAttachedDataNetworks() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, this.innerModel(), Context.NONE); + return this; + } + + public AttachedDataNetwork create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAttachedDataNetworks() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, this.innerModel(), context); + return this; + } + + AttachedDataNetworkImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new AttachedDataNetworkInner(); + this.serviceManager = serviceManager; + this.attachedDataNetworkName = name; + } + + public AttachedDataNetworkImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public AttachedDataNetwork apply() { + this.innerObject = serviceManager.serviceClient() + .getAttachedDataNetworks() + .updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public AttachedDataNetwork apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAttachedDataNetworks() + .updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, updateParameters, context) + .getValue(); + return this; + } + + AttachedDataNetworkImpl(AttachedDataNetworkInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.packetCoreControlPlaneName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "packetCoreControlPlanes"); + this.packetCoreDataPlaneName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "packetCoreDataPlanes"); + this.attachedDataNetworkName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "attachedDataNetworks"); + } + + public AttachedDataNetwork refresh() { + this.innerObject = serviceManager.serviceClient() + .getAttachedDataNetworks() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, Context.NONE) + .getValue(); + return this; + } + + public AttachedDataNetwork refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAttachedDataNetworks() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, context) + .getValue(); + return this; + } + + public AttachedDataNetworkImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public AttachedDataNetworkImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public AttachedDataNetworkImpl withUserPlaneDataInterface(InterfaceProperties userPlaneDataInterface) { + this.innerModel().withUserPlaneDataInterface(userPlaneDataInterface); + return this; + } + + public AttachedDataNetworkImpl withDnsAddresses(List dnsAddresses) { + this.innerModel().withDnsAddresses(dnsAddresses); + return this; + } + + public AttachedDataNetworkImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public AttachedDataNetworkImpl withNaptConfiguration(NaptConfiguration naptConfiguration) { + this.innerModel().withNaptConfiguration(naptConfiguration); + return this; + } + + public AttachedDataNetworkImpl withUserEquipmentAddressPoolPrefix(List userEquipmentAddressPoolPrefix) { + this.innerModel().withUserEquipmentAddressPoolPrefix(userEquipmentAddressPoolPrefix); + return this; + } + + public AttachedDataNetworkImpl + withUserEquipmentStaticAddressPoolPrefix(List userEquipmentStaticAddressPoolPrefix) { + this.innerModel().withUserEquipmentStaticAddressPoolPrefix(userEquipmentStaticAddressPoolPrefix); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksClientImpl.java new file mode 100644 index 000000000000..59b74176d7b3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksClientImpl.java @@ -0,0 +1,1257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.AttachedDataNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkListResult; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AttachedDataNetworksClient. + */ +public final class AttachedDataNetworksClientImpl implements AttachedDataNetworksClient { + /** + * The proxy service used to perform REST calls. + */ + private final AttachedDataNetworksService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of AttachedDataNetworksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AttachedDataNetworksClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(AttachedDataNetworksService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientAttachedDataNetworks to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface AttachedDataNetworksService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCoreDataPlaneName") String packetCoreDataPlaneName, + @PathParam("attachedDataNetworkName") String attachedDataNetworkName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCoreDataPlaneName") String packetCoreDataPlaneName, + @PathParam("attachedDataNetworkName") String attachedDataNetworkName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCoreDataPlaneName") String packetCoreDataPlaneName, + @PathParam("attachedDataNetworkName") String attachedDataNetworkName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AttachedDataNetworkInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCoreDataPlaneName") String packetCoreDataPlaneName, + @PathParam("attachedDataNetworkName") String attachedDataNetworkName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") TagsObject parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreDataPlane(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCoreDataPlaneName") String packetCoreDataPlaneName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreDataPlaneNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (attachedDataNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter attachedDataNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (attachedDataNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter attachedDataNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, this.client.getApiVersion(), + accept, context); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, + packetCoreDataPlaneName, attachedDataNetworkName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, + packetCoreDataPlaneName, attachedDataNetworkName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName) { + return this + .beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName) + .getSyncPoller(); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, context) + .getSyncPoller(); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, Context context) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName) + .block(); + } + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, Context context) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, + context).block(); + } + + /** + * Gets information about the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (attachedDataNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter attachedDataNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (attachedDataNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter attachedDataNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, this.client.getApiVersion(), + accept, context); + } + + /** + * Gets information about the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + Context context) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, context).block(); + } + + /** + * Gets information about the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AttachedDataNetworkInner get(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName) { + return getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, Context.NONE).getValue(); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + AttachedDataNetworkInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (attachedDataNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter attachedDataNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, + this.client.getApiVersion(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + AttachedDataNetworkInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (attachedDataNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter attachedDataNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, this.client.getApiVersion(), + parameters, accept, context); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of attached data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AttachedDataNetworkInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, AttachedDataNetworkInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AttachedDataNetworkInner.class, AttachedDataNetworkInner.class, + this.client.getContext()); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of attached data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AttachedDataNetworkInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, AttachedDataNetworkInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AttachedDataNetworkInner.class, AttachedDataNetworkInner.class, context); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of attached data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AttachedDataNetworkInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, AttachedDataNetworkInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of attached data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AttachedDataNetworkInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, AttachedDataNetworkInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + AttachedDataNetworkInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, parameters).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + AttachedDataNetworkInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, parameters, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AttachedDataNetworkInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, AttachedDataNetworkInner parameters) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, parameters).block(); + } + + /** + * Creates or updates an attached data network. Must be created in the same location as its parent packet core data + * plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to the create or update attached data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AttachedDataNetworkInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, AttachedDataNetworkInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, parameters, context).block(); + } + + /** + * Updates an attached data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to update attached data network tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (attachedDataNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter attachedDataNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, + this.client.getApiVersion(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an attached data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to update attached data network tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (attachedDataNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter attachedDataNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, this.client.getApiVersion(), + parameters, accept, context); + } + + /** + * Updates an attached data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to update attached data network tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates an attached data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to update attached data network tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName, + TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, parameters, context).block(); + } + + /** + * Updates an attached data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param parameters Parameters supplied to update attached data network tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return attached data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AttachedDataNetworkInner updateTags(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, parameters, Context.NONE).getValue(); + } + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreDataPlaneSinglePageAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByPacketCoreDataPlane(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreDataPlaneSinglePageAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPacketCoreDataPlane(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreDataPlaneAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + return new PagedFlux<>(() -> listByPacketCoreDataPlaneSinglePageAsync(resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName), + nextLink -> listByPacketCoreDataPlaneNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreDataPlaneAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context) { + return new PagedFlux<>( + () -> listByPacketCoreDataPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName, + packetCoreDataPlaneName, context), + nextLink -> listByPacketCoreDataPlaneNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + return new PagedIterable<>( + listByPacketCoreDataPlaneAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName)); + } + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context) { + return new PagedIterable<>(listByPacketCoreDataPlaneAsync(resourceGroupName, packetCoreControlPlaneName, + packetCoreDataPlaneName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for attached data network API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByPacketCoreDataPlaneNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByPacketCoreDataPlaneNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for attached data network API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreDataPlaneNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByPacketCoreDataPlaneNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksImpl.java new file mode 100644 index 000000000000..429176ab41e2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksImpl.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.AttachedDataNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetwork; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworks; + +public final class AttachedDataNetworksImpl implements AttachedDataNetworks { + private static final ClientLogger LOGGER = new ClientLogger(AttachedDataNetworksImpl.class); + + private final AttachedDataNetworksClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public AttachedDataNetworksImpl(AttachedDataNetworksClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName) { + this.serviceClient() + .delete(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName); + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, Context context) { + this.serviceClient() + .delete(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, + context); + } + + public Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AttachedDataNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AttachedDataNetwork get(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName) { + AttachedDataNetworkInner inner = this.serviceClient() + .get(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName); + if (inner != null) { + return new AttachedDataNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + PagedIterable inner = this.serviceClient() + .listByPacketCoreDataPlane(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AttachedDataNetworkImpl(inner1, this.manager())); + } + + public PagedIterable listByPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context) { + PagedIterable inner = this.serviceClient() + .listByPacketCoreDataPlane(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AttachedDataNetworkImpl(inner1, this.manager())); + } + + public AttachedDataNetwork getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCoreDataPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreDataPlanes"); + if (packetCoreDataPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCoreDataPlanes'.", id))); + } + String attachedDataNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "attachedDataNetworks"); + if (attachedDataNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'attachedDataNetworks'.", id))); + } + return this + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCoreDataPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreDataPlanes"); + if (packetCoreDataPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCoreDataPlanes'.", id))); + } + String attachedDataNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "attachedDataNetworks"); + if (attachedDataNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'attachedDataNetworks'.", id))); + } + return this.getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + attachedDataNetworkName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCoreDataPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreDataPlanes"); + if (packetCoreDataPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCoreDataPlanes'.", id))); + } + String attachedDataNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "attachedDataNetworks"); + if (attachedDataNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'attachedDataNetworks'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, + Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCoreDataPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreDataPlanes"); + if (packetCoreDataPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCoreDataPlanes'.", id))); + } + String attachedDataNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "attachedDataNetworks"); + if (attachedDataNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'attachedDataNetworks'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, + context); + } + + private AttachedDataNetworksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public AttachedDataNetworkImpl define(String name) { + return new AttachedDataNetworkImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworkImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworkImpl.java new file mode 100644 index 000000000000..8dbcd0fe2b55 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworkImpl.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.DataNetwork; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.util.Collections; +import java.util.Map; + +public final class DataNetworkImpl implements DataNetwork, DataNetwork.Definition, DataNetwork.Update { + private DataNetworkInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String description() { + return this.innerModel().description(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DataNetworkInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String mobileNetworkName; + + private String dataNetworkName; + + private TagsObject updateParameters; + + public DataNetworkImpl withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName) { + this.resourceGroupName = resourceGroupName; + this.mobileNetworkName = mobileNetworkName; + return this; + } + + public DataNetwork create() { + this.innerObject = serviceManager.serviceClient() + .getDataNetworks() + .createOrUpdate(resourceGroupName, mobileNetworkName, dataNetworkName, this.innerModel(), Context.NONE); + return this; + } + + public DataNetwork create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDataNetworks() + .createOrUpdate(resourceGroupName, mobileNetworkName, dataNetworkName, this.innerModel(), context); + return this; + } + + DataNetworkImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new DataNetworkInner(); + this.serviceManager = serviceManager; + this.dataNetworkName = name; + } + + public DataNetworkImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public DataNetwork apply() { + this.innerObject = serviceManager.serviceClient() + .getDataNetworks() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, dataNetworkName, updateParameters, + Context.NONE) + .getValue(); + return this; + } + + public DataNetwork apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDataNetworks() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, dataNetworkName, updateParameters, context) + .getValue(); + return this; + } + + DataNetworkImpl(DataNetworkInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "mobileNetworks"); + this.dataNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dataNetworks"); + } + + public DataNetwork refresh() { + this.innerObject = serviceManager.serviceClient() + .getDataNetworks() + .getWithResponse(resourceGroupName, mobileNetworkName, dataNetworkName, Context.NONE) + .getValue(); + return this; + } + + public DataNetwork refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDataNetworks() + .getWithResponse(resourceGroupName, mobileNetworkName, dataNetworkName, context) + .getValue(); + return this; + } + + public DataNetworkImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public DataNetworkImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public DataNetworkImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public DataNetworkImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksClientImpl.java new file mode 100644 index 000000000000..dd909c71e497 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksClientImpl.java @@ -0,0 +1,1110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.DataNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkListResult; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DataNetworksClient. + */ +public final class DataNetworksClientImpl implements DataNetworksClient { + /** + * The proxy service used to perform REST calls. + */ + private final DataNetworksService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of DataNetworksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DataNetworksClientImpl(MobileNetworkManagementClientImpl client) { + this.service + = RestProxy.create(DataNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientDataNetworks to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface DataNetworksService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, + @PathParam("dataNetworkName") String dataNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, + @PathParam("dataNetworkName") String dataNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, + @PathParam("dataNetworkName") String dataNetworkName, + @BodyParam("application/json") DataNetworkInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, + @PathParam("dataNetworkName") String dataNetworkName, @BodyParam("application/json") TagsObject parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetwork(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (dataNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, dataNetworkName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (dataNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, dataNetworkName, accept, context); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, dataNetworkName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, dataNetworkName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String dataNetworkName) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName).getSyncPoller(); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, Context context) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName, context).getSyncPoller(); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String dataNetworkName) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String dataNetworkName, + Context context) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String dataNetworkName) { + deleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName).block(); + } + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String dataNetworkName, Context context) { + deleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName, context).block(); + } + + /** + * Gets information about the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (dataNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, dataNetworkName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (dataNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, dataNetworkName, accept, context); + } + + /** + * Gets information about the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, dataNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, Context context) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, dataNetworkName, context).block(); + } + + /** + * Gets information about the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataNetworkInner get(String resourceGroupName, String mobileNetworkName, String dataNetworkName) { + return getWithResponse(resourceGroupName, mobileNetworkName, dataNetworkName, Context.NONE).getValue(); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String dataNetworkName, DataNetworkInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (dataNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, dataNetworkName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String dataNetworkName, DataNetworkInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (dataNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, dataNetworkName, parameters, accept, context); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataNetworkInner> beginCreateOrUpdateAsync( + String resourceGroupName, String mobileNetworkName, String dataNetworkName, DataNetworkInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataNetworkInner.class, DataNetworkInner.class, this.client.getContext()); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataNetworkInner> beginCreateOrUpdateAsync( + String resourceGroupName, String mobileNetworkName, String dataNetworkName, DataNetworkInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, + dataNetworkName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataNetworkInner.class, DataNetworkInner.class, context); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String dataNetworkName, DataNetworkInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of data network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String dataNetworkName, DataNetworkInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, DataNetworkInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, DataNetworkInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataNetworkInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String dataNetworkName, + DataNetworkInner parameters) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters).block(); + } + + /** + * Creates or updates a data network. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataNetworkInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String dataNetworkName, + DataNetworkInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters, context).block(); + } + + /** + * Updates data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to update data network tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String dataNetworkName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (dataNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, dataNetworkName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to update data network tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String dataNetworkName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (dataNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, dataNetworkName, parameters, accept, context); + } + + /** + * Updates data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to update data network tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to update data network tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters, context) + .block(); + } + + /** + * Updates data network tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to update data network tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataNetworkInner updateTags(String resourceGroupName, String mobileNetworkName, String dataNetworkName, + TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, mobileNetworkName, dataNetworkName, parameters, Context.NONE) + .getValue(); + } + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByMobileNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, mobileNetworkName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByMobileNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, mobileNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink)); + } + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName, context), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName)); + } + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksImpl.java new file mode 100644 index 000000000000..7bc8e8588ad2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.DataNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.DataNetwork; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworks; + +public final class DataNetworksImpl implements DataNetworks { + private static final ClientLogger LOGGER = new ClientLogger(DataNetworksImpl.class); + + private final DataNetworksClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public DataNetworksImpl(DataNetworksClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String mobileNetworkName, String dataNetworkName) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, dataNetworkName); + } + + public void delete(String resourceGroupName, String mobileNetworkName, String dataNetworkName, Context context) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, dataNetworkName, context); + } + + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, + String dataNetworkName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, mobileNetworkName, dataNetworkName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DataNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataNetwork get(String resourceGroupName, String mobileNetworkName, String dataNetworkName) { + DataNetworkInner inner = this.serviceClient().get(resourceGroupName, mobileNetworkName, dataNetworkName); + if (inner != null) { + return new DataNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + PagedIterable inner + = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataNetworkImpl(inner1, this.manager())); + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + PagedIterable inner + = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataNetworkImpl(inner1, this.manager())); + } + + public DataNetwork getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String dataNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "dataNetworks"); + if (dataNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataNetworks'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, dataNetworkName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String dataNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "dataNetworks"); + if (dataNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataNetworks'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, dataNetworkName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String dataNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "dataNetworks"); + if (dataNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataNetworks'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, dataNetworkName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String dataNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "dataNetworks"); + if (dataNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataNetworks'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, dataNetworkName, context); + } + + private DataNetworksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public DataNetworkImpl define(String name) { + return new DataNetworkImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackageImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackageImpl.java new file mode 100644 index 000000000000..f7682194510f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackageImpl.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackage; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackageStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; + +public final class DiagnosticsPackageImpl implements DiagnosticsPackage { + private DiagnosticsPackageInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + DiagnosticsPackageImpl(DiagnosticsPackageInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public DiagnosticsPackageStatus status() { + return this.innerModel().status(); + } + + public String reason() { + return this.innerModel().reason(); + } + + public DiagnosticsPackageInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesClientImpl.java new file mode 100644 index 000000000000..9f4177fec662 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesClientImpl.java @@ -0,0 +1,939 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.DiagnosticsPackagesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackageListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DiagnosticsPackagesClient. + */ +public final class DiagnosticsPackagesClientImpl implements DiagnosticsPackagesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DiagnosticsPackagesService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of DiagnosticsPackagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DiagnosticsPackagesClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(DiagnosticsPackagesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientDiagnosticsPackages to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface DiagnosticsPackagesService { + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages/{diagnosticsPackageName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("diagnosticsPackageName") String diagnosticsPackageName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages/{diagnosticsPackageName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("diagnosticsPackageName") String diagnosticsPackageName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages/{diagnosticsPackageName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("diagnosticsPackageName") String diagnosticsPackageName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlane(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlaneNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (diagnosticsPackageName == null) { + return Mono.error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, this.client.getApiVersion(), + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (diagnosticsPackageName == null) { + return Mono.error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, diagnosticsPackageName, this.client.getApiVersion(), accept, context); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DiagnosticsPackageInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DiagnosticsPackageInner.class, DiagnosticsPackageInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DiagnosticsPackageInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + packetCoreControlPlaneName, diagnosticsPackageName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DiagnosticsPackageInner.class, DiagnosticsPackageInner.class, context); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DiagnosticsPackageInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + return this.beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName) + .getSyncPoller(); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DiagnosticsPackageInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .getSyncPoller(); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsPackageInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName).block(); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsPackageInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .block(); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified diagnostics package along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (diagnosticsPackageName == null) { + return Mono.error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, diagnosticsPackageName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified diagnostics package along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (diagnosticsPackageName == null) { + return Mono.error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, diagnosticsPackageName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified diagnostics package on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified diagnostics package along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .block(); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified diagnostics package. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsPackageInner get(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName) { + return getWithResponse(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, Context.NONE) + .getValue(); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (diagnosticsPackageName == null) { + return Mono.error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, diagnosticsPackageName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (diagnosticsPackageName == null) { + return Mono.error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, diagnosticsPackageName, this.client.getApiVersion(), accept, context); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName) { + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName) + .getSyncPoller(); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context) { + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .getSyncPoller(); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName).block(); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, + Context context) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context).block(); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByPacketCoreControlPlaneSinglePageAsync(String resourceGroupName, String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByPacketCoreControlPlane(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneSinglePageAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPacketCoreControlPlane(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName, context), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName) { + return new PagedIterable<>(listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName)); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + return new PagedIterable<>( + listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByPacketCoreControlPlaneNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByPacketCoreControlPlaneNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesImpl.java new file mode 100644 index 000000000000..7f8ac9a72bc1 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesImpl.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.DiagnosticsPackagesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackage; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackages; + +public final class DiagnosticsPackagesImpl implements DiagnosticsPackages { + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsPackagesImpl.class); + + private final DiagnosticsPackagesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public DiagnosticsPackagesImpl(DiagnosticsPackagesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public DiagnosticsPackage createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName) { + DiagnosticsPackageInner inner = this.serviceClient() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + if (inner != null) { + return new DiagnosticsPackageImpl(inner, this.manager()); + } else { + return null; + } + } + + public DiagnosticsPackage createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context) { + DiagnosticsPackageInner inner = this.serviceClient() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context); + if (inner != null) { + return new DiagnosticsPackageImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DiagnosticsPackageImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiagnosticsPackage get(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName) { + DiagnosticsPackageInner inner + = this.serviceClient().get(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + if (inner != null) { + return new DiagnosticsPackageImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, + Context context) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context); + } + + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName) { + PagedIterable inner + = this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DiagnosticsPackageImpl(inner1, this.manager())); + } + + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + PagedIterable inner + = this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DiagnosticsPackageImpl(inner1, this.manager())); + } + + private DiagnosticsPackagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInfoImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInfoImpl.java new file mode 100644 index 000000000000..2ee0e6e3710d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInfoImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ExtendedUeInfoInner; +import com.azure.resourcemanager.mobilenetwork.models.ExtendedUeInfo; +import com.azure.resourcemanager.mobilenetwork.models.ExtendedUeInfoProperties; + +public final class ExtendedUeInfoImpl implements ExtendedUeInfo { + private ExtendedUeInfoInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + ExtendedUeInfoImpl(ExtendedUeInfoInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ExtendedUeInfoProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ExtendedUeInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInformationsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInformationsClientImpl.java new file mode 100644 index 000000000000..6631e4a6e8c5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInformationsClientImpl.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.mobilenetwork.fluent.ExtendedUeInformationsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ExtendedUeInfoInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ExtendedUeInformationsClient. + */ +public final class ExtendedUeInformationsClientImpl implements ExtendedUeInformationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExtendedUeInformationsService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of ExtendedUeInformationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExtendedUeInformationsClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(ExtendedUeInformationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientExtendedUeInformations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface ExtendedUeInformationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/ues/{ueId}/extendedInformation/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, @PathParam("ueId") String ueId, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets extended information about the specified UE from the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param ueId IMSI of a UE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extended information about the specified UE from the packet core along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String ueId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (ueId == null) { + return Mono.error(new IllegalArgumentException("Parameter ueId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), packetCoreControlPlaneName, ueId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets extended information about the specified UE from the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param ueId IMSI of a UE. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extended information about the specified UE from the packet core along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String ueId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (ueId == null) { + return Mono.error(new IllegalArgumentException("Parameter ueId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), packetCoreControlPlaneName, ueId, accept, context); + } + + /** + * Gets extended information about the specified UE from the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param ueId IMSI of a UE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extended information about the specified UE from the packet core on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String packetCoreControlPlaneName, + String ueId) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, ueId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets extended information about the specified UE from the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param ueId IMSI of a UE. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extended information about the specified UE from the packet core along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String ueId, Context context) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, ueId, context).block(); + } + + /** + * Gets extended information about the specified UE from the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param ueId IMSI of a UE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extended information about the specified UE from the packet core. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtendedUeInfoInner get(String resourceGroupName, String packetCoreControlPlaneName, String ueId) { + return getWithResponse(resourceGroupName, packetCoreControlPlaneName, ueId, Context.NONE).getValue(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInformationsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInformationsImpl.java new file mode 100644 index 000000000000..e1f1f8bae3e9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ExtendedUeInformationsImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.ExtendedUeInformationsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ExtendedUeInfoInner; +import com.azure.resourcemanager.mobilenetwork.models.ExtendedUeInfo; +import com.azure.resourcemanager.mobilenetwork.models.ExtendedUeInformations; + +public final class ExtendedUeInformationsImpl implements ExtendedUeInformations { + private static final ClientLogger LOGGER = new ClientLogger(ExtendedUeInformationsImpl.class); + + private final ExtendedUeInformationsClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public ExtendedUeInformationsImpl(ExtendedUeInformationsClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String ueId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, packetCoreControlPlaneName, ueId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExtendedUeInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ExtendedUeInfo get(String resourceGroupName, String packetCoreControlPlaneName, String ueId) { + ExtendedUeInfoInner inner = this.serviceClient().get(resourceGroupName, packetCoreControlPlaneName, ueId); + if (inner != null) { + return new ExtendedUeInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + private ExtendedUeInformationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkImpl.java new file mode 100644 index 000000000000..f7d1e576802d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkImpl.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.MobileNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetwork; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.PublicLandMobileNetwork; +import com.azure.resourcemanager.mobilenetwork.models.SimGroup; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class MobileNetworkImpl implements MobileNetwork, MobileNetwork.Definition, MobileNetwork.Update { + private MobileNetworkInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PlmnId publicLandMobileNetworkIdentifier() { + return this.innerModel().publicLandMobileNetworkIdentifier(); + } + + public List publicLandMobileNetworks() { + List inner = this.innerModel().publicLandMobileNetworks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String serviceKey() { + return this.innerModel().serviceKey(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public MobileNetworkInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String mobileNetworkName; + + private IdentityAndTagsObject updateParameters; + + public MobileNetworkImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public MobileNetwork create() { + this.innerObject = serviceManager.serviceClient() + .getMobileNetworks() + .createOrUpdate(resourceGroupName, mobileNetworkName, this.innerModel(), Context.NONE); + return this; + } + + public MobileNetwork create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMobileNetworks() + .createOrUpdate(resourceGroupName, mobileNetworkName, this.innerModel(), context); + return this; + } + + MobileNetworkImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new MobileNetworkInner(); + this.serviceManager = serviceManager; + this.mobileNetworkName = name; + } + + public MobileNetworkImpl update() { + this.updateParameters = new IdentityAndTagsObject(); + return this; + } + + public MobileNetwork apply() { + this.innerObject = serviceManager.serviceClient() + .getMobileNetworks() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public MobileNetwork apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMobileNetworks() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, updateParameters, context) + .getValue(); + return this; + } + + MobileNetworkImpl(MobileNetworkInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "mobileNetworks"); + } + + public MobileNetwork refresh() { + this.innerObject = serviceManager.serviceClient() + .getMobileNetworks() + .getByResourceGroupWithResponse(resourceGroupName, mobileNetworkName, Context.NONE) + .getValue(); + return this; + } + + public MobileNetwork refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMobileNetworks() + .getByResourceGroupWithResponse(resourceGroupName, mobileNetworkName, context) + .getValue(); + return this; + } + + public PagedIterable listSimGroups() { + return serviceManager.mobileNetworks().listSimGroups(resourceGroupName, mobileNetworkName); + } + + public PagedIterable listSimGroups(Context context) { + return serviceManager.mobileNetworks().listSimGroups(resourceGroupName, mobileNetworkName, context); + } + + public MobileNetworkImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public MobileNetworkImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public MobileNetworkImpl withPublicLandMobileNetworkIdentifier(PlmnId publicLandMobileNetworkIdentifier) { + this.innerModel().withPublicLandMobileNetworkIdentifier(publicLandMobileNetworkIdentifier); + return this; + } + + public MobileNetworkImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public MobileNetworkImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } + } + + public MobileNetworkImpl withPublicLandMobileNetworks(List publicLandMobileNetworks) { + this.innerModel().withPublicLandMobileNetworks(publicLandMobileNetworks); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientBuilder.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientBuilder.java new file mode 100644 index 000000000000..f64fe7d8492e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientBuilder.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the MobileNetworkManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { MobileNetworkManagementClientImpl.class }) +public final class MobileNetworkManagementClientBuilder { + /* + * The ID of the target subscription. The value must be an UUID. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. The value must be an UUID. + * + * @param subscriptionId the subscriptionId value. + * @return the MobileNetworkManagementClientBuilder. + */ + public MobileNetworkManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the MobileNetworkManagementClientBuilder. + */ + public MobileNetworkManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the MobileNetworkManagementClientBuilder. + */ + public MobileNetworkManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the MobileNetworkManagementClientBuilder. + */ + public MobileNetworkManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the MobileNetworkManagementClientBuilder. + */ + public MobileNetworkManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the MobileNetworkManagementClientBuilder. + */ + public MobileNetworkManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of MobileNetworkManagementClientImpl with the provided parameters. + * + * @return an instance of MobileNetworkManagementClientImpl. + */ + public MobileNetworkManagementClientImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + MobileNetworkManagementClientImpl client = new MobileNetworkManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + return client; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientImpl.java new file mode 100644 index 000000000000..23dc61e42258 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientImpl.java @@ -0,0 +1,560 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.mobilenetwork.fluent.AttachedDataNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.DataNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.DiagnosticsPackagesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.ExtendedUeInformationsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.MobileNetworkManagementClient; +import com.azure.resourcemanager.mobilenetwork.fluent.MobileNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.OperationsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCapturesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlaneVersionsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlanesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreDataPlanesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.RoutingInfoesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.ServicesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.SimGroupsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.SimPoliciesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.SimsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.SitesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.SlicesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.UeInformationsClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the MobileNetworkManagementClientImpl type. + */ +@ServiceClient(builder = MobileNetworkManagementClientBuilder.class) +public final class MobileNetworkManagementClientImpl implements MobileNetworkManagementClient { + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * server parameter. + */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The default poll interval for long-running operation. + */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** + * The AttachedDataNetworksClient object to access its operations. + */ + private final AttachedDataNetworksClient attachedDataNetworks; + + /** + * Gets the AttachedDataNetworksClient object to access its operations. + * + * @return the AttachedDataNetworksClient object. + */ + public AttachedDataNetworksClient getAttachedDataNetworks() { + return this.attachedDataNetworks; + } + + /** + * The DataNetworksClient object to access its operations. + */ + private final DataNetworksClient dataNetworks; + + /** + * Gets the DataNetworksClient object to access its operations. + * + * @return the DataNetworksClient object. + */ + public DataNetworksClient getDataNetworks() { + return this.dataNetworks; + } + + /** + * The DiagnosticsPackagesClient object to access its operations. + */ + private final DiagnosticsPackagesClient diagnosticsPackages; + + /** + * Gets the DiagnosticsPackagesClient object to access its operations. + * + * @return the DiagnosticsPackagesClient object. + */ + public DiagnosticsPackagesClient getDiagnosticsPackages() { + return this.diagnosticsPackages; + } + + /** + * The MobileNetworksClient object to access its operations. + */ + private final MobileNetworksClient mobileNetworks; + + /** + * Gets the MobileNetworksClient object to access its operations. + * + * @return the MobileNetworksClient object. + */ + public MobileNetworksClient getMobileNetworks() { + return this.mobileNetworks; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The PacketCapturesClient object to access its operations. + */ + private final PacketCapturesClient packetCaptures; + + /** + * Gets the PacketCapturesClient object to access its operations. + * + * @return the PacketCapturesClient object. + */ + public PacketCapturesClient getPacketCaptures() { + return this.packetCaptures; + } + + /** + * The PacketCoreControlPlanesClient object to access its operations. + */ + private final PacketCoreControlPlanesClient packetCoreControlPlanes; + + /** + * Gets the PacketCoreControlPlanesClient object to access its operations. + * + * @return the PacketCoreControlPlanesClient object. + */ + public PacketCoreControlPlanesClient getPacketCoreControlPlanes() { + return this.packetCoreControlPlanes; + } + + /** + * The RoutingInfoesClient object to access its operations. + */ + private final RoutingInfoesClient routingInfoes; + + /** + * Gets the RoutingInfoesClient object to access its operations. + * + * @return the RoutingInfoesClient object. + */ + public RoutingInfoesClient getRoutingInfoes() { + return this.routingInfoes; + } + + /** + * The PacketCoreControlPlaneVersionsClient object to access its operations. + */ + private final PacketCoreControlPlaneVersionsClient packetCoreControlPlaneVersions; + + /** + * Gets the PacketCoreControlPlaneVersionsClient object to access its operations. + * + * @return the PacketCoreControlPlaneVersionsClient object. + */ + public PacketCoreControlPlaneVersionsClient getPacketCoreControlPlaneVersions() { + return this.packetCoreControlPlaneVersions; + } + + /** + * The PacketCoreDataPlanesClient object to access its operations. + */ + private final PacketCoreDataPlanesClient packetCoreDataPlanes; + + /** + * Gets the PacketCoreDataPlanesClient object to access its operations. + * + * @return the PacketCoreDataPlanesClient object. + */ + public PacketCoreDataPlanesClient getPacketCoreDataPlanes() { + return this.packetCoreDataPlanes; + } + + /** + * The ServicesClient object to access its operations. + */ + private final ServicesClient services; + + /** + * Gets the ServicesClient object to access its operations. + * + * @return the ServicesClient object. + */ + public ServicesClient getServices() { + return this.services; + } + + /** + * The SimsClient object to access its operations. + */ + private final SimsClient sims; + + /** + * Gets the SimsClient object to access its operations. + * + * @return the SimsClient object. + */ + public SimsClient getSims() { + return this.sims; + } + + /** + * The SimGroupsClient object to access its operations. + */ + private final SimGroupsClient simGroups; + + /** + * Gets the SimGroupsClient object to access its operations. + * + * @return the SimGroupsClient object. + */ + public SimGroupsClient getSimGroups() { + return this.simGroups; + } + + /** + * The SimPoliciesClient object to access its operations. + */ + private final SimPoliciesClient simPolicies; + + /** + * Gets the SimPoliciesClient object to access its operations. + * + * @return the SimPoliciesClient object. + */ + public SimPoliciesClient getSimPolicies() { + return this.simPolicies; + } + + /** + * The SitesClient object to access its operations. + */ + private final SitesClient sites; + + /** + * Gets the SitesClient object to access its operations. + * + * @return the SitesClient object. + */ + public SitesClient getSites() { + return this.sites; + } + + /** + * The SlicesClient object to access its operations. + */ + private final SlicesClient slices; + + /** + * Gets the SlicesClient object to access its operations. + * + * @return the SlicesClient object. + */ + public SlicesClient getSlices() { + return this.slices; + } + + /** + * The ExtendedUeInformationsClient object to access its operations. + */ + private final ExtendedUeInformationsClient extendedUeInformations; + + /** + * Gets the ExtendedUeInformationsClient object to access its operations. + * + * @return the ExtendedUeInformationsClient object. + */ + public ExtendedUeInformationsClient getExtendedUeInformations() { + return this.extendedUeInformations; + } + + /** + * The UeInformationsClient object to access its operations. + */ + private final UeInformationsClient ueInformations; + + /** + * Gets the UeInformationsClient object to access its operations. + * + * @return the UeInformationsClient object. + */ + public UeInformationsClient getUeInformations() { + return this.ueInformations; + } + + /** + * Initializes an instance of MobileNetworkManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param endpoint server parameter. + */ + MobileNetworkManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2024-04-01"; + this.attachedDataNetworks = new AttachedDataNetworksClientImpl(this); + this.dataNetworks = new DataNetworksClientImpl(this); + this.diagnosticsPackages = new DiagnosticsPackagesClientImpl(this); + this.mobileNetworks = new MobileNetworksClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.packetCaptures = new PacketCapturesClientImpl(this); + this.packetCoreControlPlanes = new PacketCoreControlPlanesClientImpl(this); + this.routingInfoes = new RoutingInfoesClientImpl(this); + this.packetCoreControlPlaneVersions = new PacketCoreControlPlaneVersionsClientImpl(this); + this.packetCoreDataPlanes = new PacketCoreDataPlanesClientImpl(this); + this.services = new ServicesClientImpl(this); + this.sims = new SimsClientImpl(this); + this.simGroups = new SimGroupsClientImpl(this); + this.simPolicies = new SimPoliciesClientImpl(this); + this.sites = new SitesClientImpl(this); + this.slices = new SlicesClientImpl(this); + this.extendedUeInformations = new ExtendedUeInformationsClientImpl(this); + this.ueInformations = new UeInformationsClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(HttpHeaderName.fromString(s)); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MobileNetworkManagementClientImpl.class); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksClientImpl.java new file mode 100644 index 000000000000..e5e9a09e3066 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksClientImpl.java @@ -0,0 +1,1416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.MobileNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.MobileNetworkInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetworkListResult; +import com.azure.resourcemanager.mobilenetwork.models.SimGroupListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MobileNetworksClient. + */ +public final class MobileNetworksClientImpl implements MobileNetworksClient { + /** + * The proxy service used to perform REST calls. + */ + private final MobileNetworksService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of MobileNetworksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MobileNetworksClientImpl(MobileNetworkManagementClientImpl client) { + this.service + = RestProxy.create(MobileNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientMobileNetworks to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface MobileNetworksService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, + @BodyParam("application/json") MobileNetworkInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, + @BodyParam("application/json") IdentityAndTagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/mobileNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/listSimGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSimGroups(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("mobileNetworkName") String mobileNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSimGroupsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String mobileNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, accept, context); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, mobileNetworkName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName).getSyncPoller(); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, context).getSyncPoller(); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, Context context) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName) { + deleteAsync(resourceGroupName, mobileNetworkName).block(); + } + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, Context context) { + deleteAsync(resourceGroupName, mobileNetworkName, context).block(); + } + + /** + * Gets information about the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String mobileNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String mobileNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, accept, context); + } + + /** + * Gets information about the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String mobileNetworkName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, mobileNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String mobileNetworkName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, mobileNetworkName, context).block(); + } + + /** + * Gets information about the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MobileNetworkInner getByResourceGroup(String resourceGroupName, String mobileNetworkName) { + return getByResourceGroupWithResponse(resourceGroupName, mobileNetworkName, Context.NONE).getValue(); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, MobileNetworkInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, MobileNetworkInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, parameters, accept, context); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mobile network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MobileNetworkInner> + beginCreateOrUpdateAsync(String resourceGroupName, String mobileNetworkName, MobileNetworkInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MobileNetworkInner.class, MobileNetworkInner.class, this.client.getContext()); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mobile network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MobileNetworkInner> beginCreateOrUpdateAsync( + String resourceGroupName, String mobileNetworkName, MobileNetworkInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MobileNetworkInner.class, MobileNetworkInner.class, context); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mobile network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MobileNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, MobileNetworkInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters).getSyncPoller(); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mobile network resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MobileNetworkInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, MobileNetworkInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters, context).getSyncPoller(); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, + MobileNetworkInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, + MobileNetworkInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MobileNetworkInner createOrUpdate(String resourceGroupName, String mobileNetworkName, + MobileNetworkInner parameters) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters).block(); + } + + /** + * Creates or updates a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to the create or update mobile network operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MobileNetworkInner createOrUpdate(String resourceGroupName, String mobileNetworkName, + MobileNetworkInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters, context).block(); + } + + /** + * Updates mobile network tags and managed identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to update mobile network tags and/or identity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String mobileNetworkName, IdentityAndTagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates mobile network tags and managed identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to update mobile network tags and/or identity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String mobileNetworkName, IdentityAndTagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, parameters, accept, context); + } + + /** + * Updates mobile network tags and managed identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to update mobile network tags and/or identity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String mobileNetworkName, + IdentityAndTagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates mobile network tags and managed identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to update mobile network tags and/or identity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + IdentityAndTagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, parameters, context).block(); + } + + /** + * Updates mobile network tags and managed identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param parameters Parameters supplied to update mobile network tags and/or identity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mobile network resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MobileNetworkInner updateTags(String resourceGroupName, String mobileNetworkName, + IdentityAndTagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, mobileNetworkName, parameters, Context.NONE).getValue(); + } + + /** + * Lists all the mobile networks in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the mobile networks in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the mobile networks in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the mobile networks in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the mobile networks in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all the mobile networks in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSimGroupsSinglePageAsync(String resourceGroupName, + String mobileNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSimGroups(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), mobileNetworkName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSimGroupsSinglePageAsync(String resourceGroupName, + String mobileNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSimGroups(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), mobileNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSimGroupsAsync(String resourceGroupName, String mobileNetworkName) { + return new PagedFlux<>(() -> listSimGroupsSinglePageAsync(resourceGroupName, mobileNetworkName), + nextLink -> listSimGroupsNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSimGroupsAsync(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedFlux<>(() -> listSimGroupsSinglePageAsync(resourceGroupName, mobileNetworkName, context), + nextLink -> listSimGroupsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSimGroups(String resourceGroupName, String mobileNetworkName) { + return new PagedIterable<>(listSimGroupsAsync(resourceGroupName, mobileNetworkName)); + } + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSimGroups(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedIterable<>(listSimGroupsAsync(resourceGroupName, mobileNetworkName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list SIM groups API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSimGroupsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSimGroupsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list SIM groups API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSimGroupsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listSimGroupsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksImpl.java new file mode 100644 index 000000000000..60b3027c466e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.MobileNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.MobileNetworkInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetwork; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetworks; +import com.azure.resourcemanager.mobilenetwork.models.SimGroup; + +public final class MobileNetworksImpl implements MobileNetworks { + private static final ClientLogger LOGGER = new ClientLogger(MobileNetworksImpl.class); + + private final MobileNetworksClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public MobileNetworksImpl(MobileNetworksClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void deleteByResourceGroup(String resourceGroupName, String mobileNetworkName) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName); + } + + public void delete(String resourceGroupName, String mobileNetworkName, Context context) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, context); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String mobileNetworkName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, mobileNetworkName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MobileNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MobileNetwork getByResourceGroup(String resourceGroupName, String mobileNetworkName) { + MobileNetworkInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, mobileNetworkName); + if (inner != null) { + return new MobileNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MobileNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MobileNetworkImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MobileNetworkImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MobileNetworkImpl(inner1, this.manager())); + } + + public PagedIterable listSimGroups(String resourceGroupName, String mobileNetworkName) { + PagedIterable inner = this.serviceClient().listSimGroups(resourceGroupName, mobileNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimGroupImpl(inner1, this.manager())); + } + + public PagedIterable listSimGroups(String resourceGroupName, String mobileNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().listSimGroups(resourceGroupName, mobileNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimGroupImpl(inner1, this.manager())); + } + + public MobileNetwork getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, mobileNetworkName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, mobileNetworkName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, context); + } + + private MobileNetworksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public MobileNetworkImpl define(String name) { + return new MobileNetworkImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationImpl.java new file mode 100644 index 000000000000..dbdb0cd8f2eb --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.resourcemanager.mobilenetwork.fluent.models.OperationInner; +import com.azure.resourcemanager.mobilenetwork.models.Operation; +import com.azure.resourcemanager.mobilenetwork.models.OperationDisplay; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + OperationImpl(OperationInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public String name() { + return this.innerModel().name(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationsClientImpl.java new file mode 100644 index 000000000000..14ab09c0d3b7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationsClientImpl.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.mobilenetwork.fluent.OperationsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.OperationInner; +import com.azure.resourcemanager.mobilenetwork.models.OperationList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public final class OperationsClientImpl implements OperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationsService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(MobileNetworkManagementClientImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface OperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.MobileNetwork/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of the operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of the operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of the operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of the operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of the operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of the operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of the operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of the operations along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationsImpl.java new file mode 100644 index 000000000000..0552ecf68e5f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/OperationsImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.OperationsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.OperationInner; +import com.azure.resourcemanager.mobilenetwork.models.Operation; +import com.azure.resourcemanager.mobilenetwork.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCaptureImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCaptureImpl.java new file mode 100644 index 000000000000..2f373cf49b47 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCaptureImpl.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; +import com.azure.resourcemanager.mobilenetwork.models.PacketCapture; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptureStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class PacketCaptureImpl implements PacketCapture, PacketCapture.Definition, PacketCapture.Update { + private PacketCaptureInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PacketCaptureStatus status() { + return this.innerModel().status(); + } + + public String reason() { + return this.innerModel().reason(); + } + + public OffsetDateTime captureStartTime() { + return this.innerModel().captureStartTime(); + } + + public List networkInterfaces() { + List inner = this.innerModel().networkInterfaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Long bytesToCapturePerPacket() { + return this.innerModel().bytesToCapturePerPacket(); + } + + public Long totalBytesPerSession() { + return this.innerModel().totalBytesPerSession(); + } + + public Integer timeLimitInSeconds() { + return this.innerModel().timeLimitInSeconds(); + } + + public List outputFiles() { + List inner = this.innerModel().outputFiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PacketCaptureInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String packetCoreControlPlaneName; + + private String packetCaptureName; + + public PacketCaptureImpl withExistingPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName) { + this.resourceGroupName = resourceGroupName; + this.packetCoreControlPlaneName = packetCoreControlPlaneName; + return this; + } + + public PacketCapture create() { + this.innerObject = serviceManager.serviceClient() + .getPacketCaptures() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, this.innerModel(), + Context.NONE); + return this; + } + + public PacketCapture create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPacketCaptures() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, this.innerModel(), + context); + return this; + } + + PacketCaptureImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new PacketCaptureInner(); + this.serviceManager = serviceManager; + this.packetCaptureName = name; + } + + public PacketCaptureImpl update() { + return this; + } + + public PacketCapture apply() { + this.innerObject = serviceManager.serviceClient() + .getPacketCaptures() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, this.innerModel(), + Context.NONE); + return this; + } + + public PacketCapture apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPacketCaptures() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, this.innerModel(), + context); + return this; + } + + PacketCaptureImpl(PacketCaptureInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.packetCoreControlPlaneName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "packetCoreControlPlanes"); + this.packetCaptureName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "packetCaptures"); + } + + public PacketCapture refresh() { + this.innerObject = serviceManager.serviceClient() + .getPacketCaptures() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, Context.NONE) + .getValue(); + return this; + } + + public PacketCapture refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPacketCaptures() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context) + .getValue(); + return this; + } + + public AsyncOperationStatus stop() { + return serviceManager.packetCaptures().stop(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + } + + public AsyncOperationStatus stop(Context context) { + return serviceManager.packetCaptures() + .stop(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + } + + public PacketCaptureImpl withNetworkInterfaces(List networkInterfaces) { + this.innerModel().withNetworkInterfaces(networkInterfaces); + return this; + } + + public PacketCaptureImpl withBytesToCapturePerPacket(Long bytesToCapturePerPacket) { + this.innerModel().withBytesToCapturePerPacket(bytesToCapturePerPacket); + return this; + } + + public PacketCaptureImpl withTotalBytesPerSession(Long totalBytesPerSession) { + this.innerModel().withTotalBytesPerSession(totalBytesPerSession); + return this; + } + + public PacketCaptureImpl withTimeLimitInSeconds(Integer timeLimitInSeconds) { + this.innerModel().withTimeLimitInSeconds(timeLimitInSeconds); + return this; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesClientImpl.java new file mode 100644 index 000000000000..13d83a1d32ba --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesClientImpl.java @@ -0,0 +1,1211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCapturesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptureListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PacketCapturesClient. + */ +public final class PacketCapturesClientImpl implements PacketCapturesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PacketCapturesService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of PacketCapturesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PacketCapturesClientImpl(MobileNetworkManagementClientImpl client) { + this.service + = RestProxy.create(PacketCapturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientPacketCaptures to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface PacketCapturesService { + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCaptureName") String packetCaptureName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PacketCaptureInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCaptureName") String packetCaptureName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCaptureName") String packetCaptureName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}/stop") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stop(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCaptureName") String packetCaptureName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlane(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlaneNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet capture session resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, PacketCaptureInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, this.client.getApiVersion(), + parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet capture session resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, PacketCaptureInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCaptureName, this.client.getApiVersion(), parameters, accept, context); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PacketCaptureInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, + PacketCaptureInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + packetCoreControlPlaneName, packetCaptureName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PacketCaptureInner.class, PacketCaptureInner.class, this.client.getContext()); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PacketCaptureInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, + PacketCaptureInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + packetCoreControlPlaneName, packetCaptureName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PacketCaptureInner.class, PacketCaptureInner.class, context); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PacketCaptureInner> beginCreateOrUpdate(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, PacketCaptureInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PacketCaptureInner> beginCreateOrUpdate(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, PacketCaptureInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters, + context) + .getSyncPoller(); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet capture session resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, PacketCaptureInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet capture session resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, PacketCaptureInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCaptureInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, PacketCaptureInner parameters) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters) + .block(); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCaptureInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, PacketCaptureInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters, + context).block(); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCaptureName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCaptureName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context).block(); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCaptureInner get(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName) { + return getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, Context.NONE) + .getValue(); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCaptureName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCaptureName, this.client.getApiVersion(), accept, context); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName) { + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).getSyncPoller(); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context) { + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context) + .getSyncPoller(); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).block(); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, + Context context) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context).block(); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCaptureName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCaptureName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, packetCaptureName, this.client.getApiVersion(), accept, context); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginStopAsync(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + Mono>> mono + = stopWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginStopAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = stopWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, context); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginStop(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + return this.beginStopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).getSyncPoller(); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginStop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + return this.beginStopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context) + .getSyncPoller(); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName) { + return beginStopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context) { + return beginStopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner stop(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName) { + return stopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).block(); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner stop(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context) { + return stopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context).block(); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByPacketCoreControlPlaneSinglePageAsync(String resourceGroupName, String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByPacketCoreControlPlane(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneSinglePageAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPacketCoreControlPlane(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName, context), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName) { + return new PagedIterable<>(listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName)); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + return new PagedIterable<>( + listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesImpl.java new file mode 100644 index 000000000000..6261f14f17c2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCapturesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; +import com.azure.resourcemanager.mobilenetwork.models.PacketCapture; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptures; + +public final class PacketCapturesImpl implements PacketCaptures { + private static final ClientLogger LOGGER = new ClientLogger(PacketCapturesImpl.class); + + private final PacketCapturesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public PacketCapturesImpl(PacketCapturesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PacketCaptureImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PacketCapture get(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + PacketCaptureInner inner + = this.serviceClient().get(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + if (inner != null) { + return new PacketCaptureImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, + Context context) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + } + + public AsyncOperationStatus stop(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName) { + AsyncOperationStatusInner inner + = this.serviceClient().stop(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus stop(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context) { + AsyncOperationStatusInner inner + = this.serviceClient().stop(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName) { + PagedIterable inner + = this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PacketCaptureImpl(inner1, this.manager())); + } + + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + PagedIterable inner + = this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PacketCaptureImpl(inner1, this.manager())); + } + + public PacketCapture getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCaptureName = ResourceManagerUtils.getValueFromIdByName(id, "packetCaptures"); + if (packetCaptureName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCaptures'.", id))); + } + return this.getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCaptureName = ResourceManagerUtils.getValueFromIdByName(id, "packetCaptures"); + if (packetCaptureName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCaptures'.", id))); + } + return this.getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCaptureName = ResourceManagerUtils.getValueFromIdByName(id, "packetCaptures"); + if (packetCaptureName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCaptures'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCaptureName = ResourceManagerUtils.getValueFromIdByName(id, "packetCaptures"); + if (packetCaptureName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCaptures'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + } + + private PacketCapturesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public PacketCaptureImpl define(String name) { + return new PacketCaptureImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneImpl.java new file mode 100644 index 000000000000..7cd5949609e4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneImpl.java @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; +import com.azure.resourcemanager.mobilenetwork.models.BillingSku; +import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsUploadConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.EventHubConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.HomeNetworkPrivateKeysProvisioning; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; +import com.azure.resourcemanager.mobilenetwork.models.Installation; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; +import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SignalingConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SiteResourceId; +import com.azure.resourcemanager.mobilenetwork.models.UserConsentConfiguration; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class PacketCoreControlPlaneImpl + implements PacketCoreControlPlane, PacketCoreControlPlane.Definition, PacketCoreControlPlane.Update { + private PacketCoreControlPlaneInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Installation installation() { + return this.innerModel().installation(); + } + + public List sites() { + List inner = this.innerModel().sites(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PlatformConfiguration platform() { + return this.innerModel().platform(); + } + + public CoreNetworkType coreNetworkTechnology() { + return this.innerModel().coreNetworkTechnology(); + } + + public String version() { + return this.innerModel().version(); + } + + public String installedVersion() { + return this.innerModel().installedVersion(); + } + + public String rollbackVersion() { + return this.innerModel().rollbackVersion(); + } + + public InterfaceProperties controlPlaneAccessInterface() { + return this.innerModel().controlPlaneAccessInterface(); + } + + public List controlPlaneAccessVirtualIpv4Addresses() { + List inner = this.innerModel().controlPlaneAccessVirtualIpv4Addresses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public BillingSku sku() { + return this.innerModel().sku(); + } + + public Integer ueMtu() { + return this.innerModel().ueMtu(); + } + + public LocalDiagnosticsAccessConfiguration localDiagnosticsAccess() { + return this.innerModel().localDiagnosticsAccess(); + } + + public DiagnosticsUploadConfiguration diagnosticsUpload() { + return this.innerModel().diagnosticsUpload(); + } + + public EventHubConfiguration eventHub() { + return this.innerModel().eventHub(); + } + + public SignalingConfiguration signaling() { + return this.innerModel().signaling(); + } + + public Object interopSettings() { + return this.innerModel().interopSettings(); + } + + public HomeNetworkPrivateKeysProvisioning homeNetworkPrivateKeysProvisioning() { + return this.innerModel().homeNetworkPrivateKeysProvisioning(); + } + + public UserConsentConfiguration userConsent() { + return this.innerModel().userConsent(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PacketCoreControlPlaneInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String packetCoreControlPlaneName; + + private IdentityAndTagsObject updateParameters; + + public PacketCoreControlPlaneImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public PacketCoreControlPlane create() { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreControlPlanes() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, this.innerModel(), Context.NONE); + return this; + } + + public PacketCoreControlPlane create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreControlPlanes() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, this.innerModel(), context); + return this; + } + + PacketCoreControlPlaneImpl(String name, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new PacketCoreControlPlaneInner(); + this.serviceManager = serviceManager; + this.packetCoreControlPlaneName = name; + } + + public PacketCoreControlPlaneImpl update() { + this.updateParameters = new IdentityAndTagsObject(); + return this; + } + + public PacketCoreControlPlane apply() { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreControlPlanes() + .updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public PacketCoreControlPlane apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreControlPlanes() + .updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, updateParameters, context) + .getValue(); + return this; + } + + PacketCoreControlPlaneImpl(PacketCoreControlPlaneInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.packetCoreControlPlaneName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "packetCoreControlPlanes"); + } + + public PacketCoreControlPlane refresh() { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreControlPlanes() + .getByResourceGroupWithResponse(resourceGroupName, packetCoreControlPlaneName, Context.NONE) + .getValue(); + return this; + } + + public PacketCoreControlPlane refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreControlPlanes() + .getByResourceGroupWithResponse(resourceGroupName, packetCoreControlPlaneName, context) + .getValue(); + return this; + } + + public AsyncOperationStatus rollback() { + return serviceManager.packetCoreControlPlanes().rollback(resourceGroupName, packetCoreControlPlaneName); + } + + public AsyncOperationStatus rollback(Context context) { + return serviceManager.packetCoreControlPlanes() + .rollback(resourceGroupName, packetCoreControlPlaneName, context); + } + + public AsyncOperationStatus reinstall() { + return serviceManager.packetCoreControlPlanes().reinstall(resourceGroupName, packetCoreControlPlaneName); + } + + public AsyncOperationStatus reinstall(Context context) { + return serviceManager.packetCoreControlPlanes() + .reinstall(resourceGroupName, packetCoreControlPlaneName, context); + } + + public AsyncOperationStatus collectDiagnosticsPackage(PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + return serviceManager.packetCoreControlPlanes() + .collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters); + } + + public AsyncOperationStatus collectDiagnosticsPackage(PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + return serviceManager.packetCoreControlPlanes() + .collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters, context); + } + + public PacketCoreControlPlaneImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public PacketCoreControlPlaneImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public PacketCoreControlPlaneImpl withSites(List sites) { + this.innerModel().withSites(sites); + return this; + } + + public PacketCoreControlPlaneImpl withPlatform(PlatformConfiguration platform) { + this.innerModel().withPlatform(platform); + return this; + } + + public PacketCoreControlPlaneImpl withControlPlaneAccessInterface(InterfaceProperties controlPlaneAccessInterface) { + this.innerModel().withControlPlaneAccessInterface(controlPlaneAccessInterface); + return this; + } + + public PacketCoreControlPlaneImpl withSku(BillingSku sku) { + this.innerModel().withSku(sku); + return this; + } + + public PacketCoreControlPlaneImpl + withLocalDiagnosticsAccess(LocalDiagnosticsAccessConfiguration localDiagnosticsAccess) { + this.innerModel().withLocalDiagnosticsAccess(localDiagnosticsAccess); + return this; + } + + public PacketCoreControlPlaneImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public PacketCoreControlPlaneImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } + } + + public PacketCoreControlPlaneImpl withInstallation(Installation installation) { + this.innerModel().withInstallation(installation); + return this; + } + + public PacketCoreControlPlaneImpl withCoreNetworkTechnology(CoreNetworkType coreNetworkTechnology) { + this.innerModel().withCoreNetworkTechnology(coreNetworkTechnology); + return this; + } + + public PacketCoreControlPlaneImpl withVersion(String version) { + this.innerModel().withVersion(version); + return this; + } + + public PacketCoreControlPlaneImpl + withControlPlaneAccessVirtualIpv4Addresses(List controlPlaneAccessVirtualIpv4Addresses) { + this.innerModel().withControlPlaneAccessVirtualIpv4Addresses(controlPlaneAccessVirtualIpv4Addresses); + return this; + } + + public PacketCoreControlPlaneImpl withUeMtu(Integer ueMtu) { + this.innerModel().withUeMtu(ueMtu); + return this; + } + + public PacketCoreControlPlaneImpl withDiagnosticsUpload(DiagnosticsUploadConfiguration diagnosticsUpload) { + this.innerModel().withDiagnosticsUpload(diagnosticsUpload); + return this; + } + + public PacketCoreControlPlaneImpl withEventHub(EventHubConfiguration eventHub) { + this.innerModel().withEventHub(eventHub); + return this; + } + + public PacketCoreControlPlaneImpl withSignaling(SignalingConfiguration signaling) { + this.innerModel().withSignaling(signaling); + return this; + } + + public PacketCoreControlPlaneImpl withInteropSettings(Object interopSettings) { + this.innerModel().withInteropSettings(interopSettings); + return this; + } + + public PacketCoreControlPlaneImpl withUserConsent(UserConsentConfiguration userConsent) { + this.innerModel().withUserConsent(userConsent); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionImpl.java new file mode 100644 index 000000000000..e39bafdbd38e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionImpl.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersion; +import com.azure.resourcemanager.mobilenetwork.models.Platform; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class PacketCoreControlPlaneVersionImpl implements PacketCoreControlPlaneVersion { + private PacketCoreControlPlaneVersionInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + PacketCoreControlPlaneVersionImpl(PacketCoreControlPlaneVersionInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List platforms() { + List inner = this.innerModel().platforms(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PacketCoreControlPlaneVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsClientImpl.java new file mode 100644 index 000000000000..e684f90415ef --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsClientImpl.java @@ -0,0 +1,642 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlaneVersionsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersionListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PacketCoreControlPlaneVersionsClient. + */ +public final class PacketCoreControlPlaneVersionsClientImpl implements PacketCoreControlPlaneVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final PacketCoreControlPlaneVersionsService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of PacketCoreControlPlaneVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PacketCoreControlPlaneVersionsClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(PacketCoreControlPlaneVersionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientPacketCoreControlPlaneVersions to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface PacketCoreControlPlaneVersionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/{versionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("versionName") String versionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/{versionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getBySubscription(@HostParam("$host") String endpoint, + @PathParam("versionName") String versionName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscription(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String versionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), versionName, this.client.getApiVersion(), + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String versionName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), versionName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String versionName) { + return getWithResponseAsync(versionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String versionName, Context context) { + return getWithResponseAsync(versionName, context).block(); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreControlPlaneVersionInner get(String versionName) { + return getWithResponse(versionName, Context.NONE).getValue(); + } + + /** + * Lists all supported packet core control planes versions. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all supported packet core control planes versions. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all supported packet core control planes versions. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBySubscriptionWithResponseAsync(String versionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getBySubscription(this.client.getEndpoint(), versionName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBySubscriptionWithResponseAsync(String versionName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getBySubscription(this.client.getEndpoint(), versionName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBySubscriptionAsync(String versionName) { + return getBySubscriptionWithResponseAsync(versionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBySubscriptionWithResponse(String versionName, + Context context) { + return getBySubscriptionWithResponseAsync(versionName, context).block(); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreControlPlaneVersionInner getBySubscription(String versionName) { + return getBySubscriptionWithResponse(versionName, Context.NONE).getValue(); + } + + /** + * Lists all supported packet core control planes versions. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBySubscription(this.client.getEndpoint(), + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscription(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all supported packet core control planes versions. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySubscriptionAsync() { + return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySubscriptionAsync(Context context) { + return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all supported packet core control planes versions. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscription() { + return new PagedIterable<>(listBySubscriptionAsync()); + } + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscription(Context context) { + return new PagedIterable<>(listBySubscriptionAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsImpl.java new file mode 100644 index 000000000000..23425b30ab80 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsImpl.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlaneVersionsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersion; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersions; + +public final class PacketCoreControlPlaneVersionsImpl implements PacketCoreControlPlaneVersions { + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlaneVersionsImpl.class); + + private final PacketCoreControlPlaneVersionsClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public PacketCoreControlPlaneVersionsImpl(PacketCoreControlPlaneVersionsClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String versionName, Context context) { + Response inner = this.serviceClient().getWithResponse(versionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PacketCoreControlPlaneVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PacketCoreControlPlaneVersion get(String versionName) { + PacketCoreControlPlaneVersionInner inner = this.serviceClient().get(versionName); + if (inner != null) { + return new PacketCoreControlPlaneVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PacketCoreControlPlaneVersionImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PacketCoreControlPlaneVersionImpl(inner1, this.manager())); + } + + public Response getBySubscriptionWithResponse(String versionName, Context context) { + Response inner + = this.serviceClient().getBySubscriptionWithResponse(versionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PacketCoreControlPlaneVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PacketCoreControlPlaneVersion getBySubscription(String versionName) { + PacketCoreControlPlaneVersionInner inner = this.serviceClient().getBySubscription(versionName); + if (inner != null) { + return new PacketCoreControlPlaneVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listBySubscription() { + PagedIterable inner = this.serviceClient().listBySubscription(); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PacketCoreControlPlaneVersionImpl(inner1, this.manager())); + } + + public PagedIterable listBySubscription(Context context) { + PagedIterable inner = this.serviceClient().listBySubscription(context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PacketCoreControlPlaneVersionImpl(inner1, this.manager())); + } + + private PacketCoreControlPlaneVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesClientImpl.java new file mode 100644 index 000000000000..02296c74595e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesClientImpl.java @@ -0,0 +1,1955 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlanesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PacketCoreControlPlanesClient. + */ +public final class PacketCoreControlPlanesClientImpl implements PacketCoreControlPlanesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PacketCoreControlPlanesService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of PacketCoreControlPlanesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PacketCoreControlPlanesClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(PacketCoreControlPlanesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientPacketCoreControlPlanes to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface PacketCoreControlPlanesService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") PacketCoreControlPlaneInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") IdentityAndTagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rollback(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reinstall(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> collectDiagnosticsPackage(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName) { + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName).getSyncPoller(); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, context).getSyncPoller(); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName).block(); + } + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, context).block(); + } + + /** + * Gets information about the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + packetCoreControlPlaneName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Gets information about the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, packetCoreControlPlaneName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, context).block(); + } + + /** + * Gets information about the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreControlPlaneInner getByResourceGroup(String resourceGroupName, String packetCoreControlPlaneName) { + return getByResourceGroupWithResponse(resourceGroupName, packetCoreControlPlaneName, Context.NONE).getValue(); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + packetCoreControlPlaneName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PacketCoreControlPlaneInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PacketCoreControlPlaneInner.class, PacketCoreControlPlaneInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PacketCoreControlPlaneInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PacketCoreControlPlaneInner.class, PacketCoreControlPlaneInner.class, + context); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PacketCoreControlPlaneInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters).getSyncPoller(); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PacketCoreControlPlaneInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreControlPlaneInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneInner parameters) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters).block(); + } + + /** + * Creates or updates a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the create or update packet core control plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreControlPlaneInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context).block(); + } + + /** + * Patch packet core control plane resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to patch packet core control plane resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, IdentityAndTagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch packet core control plane resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to patch packet core control plane resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, IdentityAndTagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + } + + /** + * Patch packet core control plane resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to patch packet core control plane resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, + String packetCoreControlPlaneName, IdentityAndTagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Patch packet core control plane resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to patch packet core control plane resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, IdentityAndTagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context).block(); + } + + /** + * Patch packet core control plane resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to patch packet core control plane resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core control plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreControlPlaneInner updateTags(String resourceGroupName, String packetCoreControlPlaneName, + IdentityAndTagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, parameters, Context.NONE) + .getValue(); + } + + /** + * Lists all the packet core control planes in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the packet core control planes in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the packet core control planes in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the packet core control planes in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the packet core control planes in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all the packet core control planes in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rollbackWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.rollback(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rollbackWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.rollback(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginRollbackAsync(String resourceGroupName, String packetCoreControlPlaneName) { + Mono>> mono + = rollbackWithResponseAsync(resourceGroupName, packetCoreControlPlaneName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginRollbackAsync(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = rollbackWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, context); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginRollback(String resourceGroupName, String packetCoreControlPlaneName) { + return this.beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName).getSyncPoller(); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginRollback(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return this.beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName, context).getSyncPoller(); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rollbackAsync(String resourceGroupName, String packetCoreControlPlaneName) { + return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rollbackAsync(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName) { + return rollbackAsync(resourceGroupName, packetCoreControlPlaneName).block(); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return rollbackAsync(resourceGroupName, packetCoreControlPlaneName, context).block(); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> reinstallWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.reinstall(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> reinstallWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.reinstall(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginReinstallAsync(String resourceGroupName, String packetCoreControlPlaneName) { + Mono>> mono + = reinstallWithResponseAsync(resourceGroupName, packetCoreControlPlaneName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginReinstallAsync(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = reinstallWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, context); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginReinstall(String resourceGroupName, String packetCoreControlPlaneName) { + return this.beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName).getSyncPoller(); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginReinstall(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return this.beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName, context).getSyncPoller(); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono reinstallAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono reinstallAsync(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName) { + return reinstallAsync(resourceGroupName, packetCoreControlPlaneName).block(); + } + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return reinstallAsync(resourceGroupName, packetCoreControlPlaneName, context).block(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> collectDiagnosticsPackageWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.collectDiagnosticsPackage(this.client.getEndpoint(), resourceGroupName, + packetCoreControlPlaneName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> collectDiagnosticsPackageWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.collectDiagnosticsPackage(this.client.getEndpoint(), resourceGroupName, + packetCoreControlPlaneName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, + accept, context); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginCollectDiagnosticsPackageAsync(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + Mono>> mono + = collectDiagnosticsPackageWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginCollectDiagnosticsPackageAsync(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = collectDiagnosticsPackageWithResponseAsync(resourceGroupName, + packetCoreControlPlaneName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, context); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( + String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + return this.beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters) + .getSyncPoller(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( + String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, Context context) { + return this + .beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) + .getSyncPoller(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono collectDiagnosticsPackageAsync(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono collectDiagnosticsPackageAsync(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner collectDiagnosticsPackage(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + return collectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters).block(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner collectDiagnosticsPackage(String resourceGroupName, + String packetCoreControlPlaneName, PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + return collectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesImpl.java new file mode 100644 index 000000000000..8a0eec713f55 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesImpl.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlanesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlanes; + +public final class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlanesImpl.class); + + private final PacketCoreControlPlanesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public PacketCoreControlPlanesImpl(PacketCoreControlPlanesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void deleteByResourceGroup(String resourceGroupName, String packetCoreControlPlaneName) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName); + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, context); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, packetCoreControlPlaneName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PacketCoreControlPlaneImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PacketCoreControlPlane getByResourceGroup(String resourceGroupName, String packetCoreControlPlaneName) { + PacketCoreControlPlaneInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, packetCoreControlPlaneName); + if (inner != null) { + return new PacketCoreControlPlaneImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PacketCoreControlPlaneImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PacketCoreControlPlaneImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PacketCoreControlPlaneImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PacketCoreControlPlaneImpl(inner1, this.manager())); + } + + public AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName) { + AsyncOperationStatusInner inner = this.serviceClient().rollback(resourceGroupName, packetCoreControlPlaneName); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + AsyncOperationStatusInner inner + = this.serviceClient().rollback(resourceGroupName, packetCoreControlPlaneName, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName) { + AsyncOperationStatusInner inner = this.serviceClient().reinstall(resourceGroupName, packetCoreControlPlaneName); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + AsyncOperationStatusInner inner + = this.serviceClient().reinstall(resourceGroupName, packetCoreControlPlaneName, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus collectDiagnosticsPackage(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + AsyncOperationStatusInner inner + = this.serviceClient().collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus collectDiagnosticsPackage(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, Context context) { + AsyncOperationStatusInner inner = this.serviceClient() + .collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public PacketCoreControlPlane getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, packetCoreControlPlaneName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, packetCoreControlPlaneName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, context); + } + + private PacketCoreControlPlanesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public PacketCoreControlPlaneImpl define(String name) { + return new PacketCoreControlPlaneImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlaneImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlaneImpl.java new file mode 100644 index 000000000000..2c6e129714d9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlaneImpl.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlane; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class PacketCoreDataPlaneImpl + implements PacketCoreDataPlane, PacketCoreDataPlane.Definition, PacketCoreDataPlane.Update { + private PacketCoreDataPlaneInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public InterfaceProperties userPlaneAccessInterface() { + return this.innerModel().userPlaneAccessInterface(); + } + + public List userPlaneAccessVirtualIpv4Addresses() { + List inner = this.innerModel().userPlaneAccessVirtualIpv4Addresses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PacketCoreDataPlaneInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String packetCoreControlPlaneName; + + private String packetCoreDataPlaneName; + + private TagsObject updateParameters; + + public PacketCoreDataPlaneImpl withExistingPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName) { + this.resourceGroupName = resourceGroupName; + this.packetCoreControlPlaneName = packetCoreControlPlaneName; + return this; + } + + public PacketCoreDataPlane create() { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreDataPlanes() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, this.innerModel(), + Context.NONE); + return this; + } + + public PacketCoreDataPlane create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreDataPlanes() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, this.innerModel(), + context); + return this; + } + + PacketCoreDataPlaneImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new PacketCoreDataPlaneInner(); + this.serviceManager = serviceManager; + this.packetCoreDataPlaneName = name; + } + + public PacketCoreDataPlaneImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public PacketCoreDataPlane apply() { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreDataPlanes() + .updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + updateParameters, Context.NONE) + .getValue(); + return this; + } + + public PacketCoreDataPlane apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreDataPlanes() + .updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + updateParameters, context) + .getValue(); + return this; + } + + PacketCoreDataPlaneImpl(PacketCoreDataPlaneInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.packetCoreControlPlaneName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "packetCoreControlPlanes"); + this.packetCoreDataPlaneName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "packetCoreDataPlanes"); + } + + public PacketCoreDataPlane refresh() { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreDataPlanes() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, Context.NONE) + .getValue(); + return this; + } + + public PacketCoreDataPlane refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPacketCoreDataPlanes() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context) + .getValue(); + return this; + } + + public PacketCoreDataPlaneImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public PacketCoreDataPlaneImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public PacketCoreDataPlaneImpl withUserPlaneAccessInterface(InterfaceProperties userPlaneAccessInterface) { + this.innerModel().withUserPlaneAccessInterface(userPlaneAccessInterface); + return this; + } + + public PacketCoreDataPlaneImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public PacketCoreDataPlaneImpl + withUserPlaneAccessVirtualIpv4Addresses(List userPlaneAccessVirtualIpv4Addresses) { + this.innerModel().withUserPlaneAccessVirtualIpv4Addresses(userPlaneAccessVirtualIpv4Addresses); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesClientImpl.java new file mode 100644 index 000000000000..01f81fa05df7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesClientImpl.java @@ -0,0 +1,1149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreDataPlanesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlaneListResult; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PacketCoreDataPlanesClient. + */ +public final class PacketCoreDataPlanesClientImpl implements PacketCoreDataPlanesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PacketCoreDataPlanesService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of PacketCoreDataPlanesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PacketCoreDataPlanesClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(PacketCoreDataPlanesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientPacketCoreDataPlanes to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface PacketCoreDataPlanesService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCoreDataPlaneName") String packetCoreDataPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCoreDataPlaneName") String packetCoreDataPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCoreDataPlaneName") String packetCoreDataPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") PacketCoreDataPlaneInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCoreDataPlaneName") String packetCoreDataPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlane(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlaneNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + packetCoreDataPlaneName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName) { + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName) + .getSyncPoller(); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, Context context) { + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context) + .getSyncPoller(); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, Context context) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName).block(); + } + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + Context context) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context).block(); + } + + /** + * Gets information about the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + packetCoreDataPlaneName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Gets information about the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context) + .block(); + } + + /** + * Gets information about the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreDataPlaneInner get(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName) { + return getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, Context.NONE) + .getValue(); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + packetCoreDataPlaneName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PacketCoreDataPlaneInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + PacketCoreDataPlaneInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PacketCoreDataPlaneInner.class, PacketCoreDataPlaneInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PacketCoreDataPlaneInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + PacketCoreDataPlaneInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PacketCoreDataPlaneInner.class, PacketCoreDataPlaneInner.class, context); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PacketCoreDataPlaneInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + PacketCoreDataPlaneInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PacketCoreDataPlaneInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + PacketCoreDataPlaneInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreDataPlaneInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters) + .block(); + } + + /** + * Creates or updates a packet core data plane. Must be created in the same location as its parent packet core + * control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to the create or update packet core data plane operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreDataPlaneInner createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters, + context).block(); + } + + /** + * Updates packet core data planes tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to update packet core data plane tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, + packetCoreControlPlaneName, packetCoreDataPlaneName, this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates packet core data planes tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to update packet core data plane tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (packetCoreDataPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreDataPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + packetCoreDataPlaneName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context); + } + + /** + * Updates packet core data planes tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to update packet core data plane tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates packet core data planes tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to update packet core data plane tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + parameters, context).block(); + } + + /** + * Updates packet core data planes tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param parameters Parameters supplied to update packet core data plane tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return packet core data plane resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreDataPlaneInner updateTags(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, + parameters, Context.NONE).getValue(); + } + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByPacketCoreControlPlaneSinglePageAsync(String resourceGroupName, String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByPacketCoreControlPlane(this.client.getEndpoint(), resourceGroupName, + packetCoreControlPlaneName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneSinglePageAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPacketCoreControlPlane(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName, context), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName) { + return new PagedIterable<>(listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName)); + } + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + return new PagedIterable<>( + listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByPacketCoreControlPlaneNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByPacketCoreControlPlaneNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesImpl.java new file mode 100644 index 000000000000..41886a6badd0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesImpl.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreDataPlanesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlane; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlanes; + +public final class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreDataPlanesImpl.class); + + private final PacketCoreDataPlanesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public PacketCoreDataPlanesImpl(PacketCoreDataPlanesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName); + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + Context context) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context); + } + + public Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PacketCoreDataPlaneImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PacketCoreDataPlane get(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName) { + PacketCoreDataPlaneInner inner + = this.serviceClient().get(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName); + if (inner != null) { + return new PacketCoreDataPlaneImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName) { + PagedIterable inner + = this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PacketCoreDataPlaneImpl(inner1, this.manager())); + } + + public PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + PagedIterable inner + = this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PacketCoreDataPlaneImpl(inner1, this.manager())); + } + + public PacketCoreDataPlane getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCoreDataPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreDataPlanes"); + if (packetCoreDataPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCoreDataPlanes'.", id))); + } + return this + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCoreDataPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreDataPlanes"); + if (packetCoreDataPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCoreDataPlanes'.", id))); + } + return this.getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCoreDataPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreDataPlanes"); + if (packetCoreDataPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCoreDataPlanes'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", id))); + } + String packetCoreDataPlaneName = ResourceManagerUtils.getValueFromIdByName(id, "packetCoreDataPlanes"); + if (packetCoreDataPlaneName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'packetCoreDataPlanes'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context); + } + + private PacketCoreDataPlanesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public PacketCoreDataPlaneImpl define(String name) { + return new PacketCoreDataPlaneImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ResourceManagerUtils.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ResourceManagerUtils.java new file mode 100644 index 000000000000..d7903195dfa6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ResourceManagerUtils.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (!segments.isEmpty() && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl<>(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoModelImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoModelImpl.java new file mode 100644 index 000000000000..bb2e590df1d2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoModelImpl.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoModelInner; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4Route; +import com.azure.resourcemanager.mobilenetwork.models.RoutingInfoModel; +import com.azure.resourcemanager.mobilenetwork.models.UserPlaneDataRoutesItem; +import java.util.Collections; +import java.util.List; + +public final class RoutingInfoModelImpl implements RoutingInfoModel { + private RoutingInfoModelInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + RoutingInfoModelImpl(RoutingInfoModelInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List controlPlaneAccessRoutes() { + List inner = this.innerModel().controlPlaneAccessRoutes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List userPlaneAccessRoutes() { + List inner = this.innerModel().userPlaneAccessRoutes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List userPlaneDataRoutes() { + List inner = this.innerModel().userPlaneDataRoutes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public RoutingInfoModelInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoesClientImpl.java new file mode 100644 index 000000000000..630989b9ae74 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoesClientImpl.java @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.mobilenetwork.fluent.RoutingInfoesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoModelInner; +import com.azure.resourcemanager.mobilenetwork.models.RoutingInfoListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in RoutingInfoesClient. + */ +public final class RoutingInfoesClientImpl implements RoutingInfoesClient { + /** + * The proxy service used to perform REST calls. + */ + private final RoutingInfoesService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of RoutingInfoesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RoutingInfoesClientImpl(MobileNetworkManagementClientImpl client) { + this.service + = RestProxy.create(RoutingInfoesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientRoutingInfoes to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface RoutingInfoesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/routingInfo") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/routingInfo/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String packetCoreControlPlaneName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, packetCoreControlPlaneName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, packetCoreControlPlaneName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName) { + return new PagedIterable<>(listAsync(resourceGroupName, packetCoreControlPlaneName)); + } + + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, packetCoreControlPlaneName, context)); + } + + /** + * Get the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the routing information for the packet core along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the routing information for the packet core along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), resourceGroupName, packetCoreControlPlaneName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Get the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the routing information for the packet core on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String packetCoreControlPlaneName) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the routing information for the packet core along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, context).block(); + } + + /** + * Get the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the routing information for the packet core. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RoutingInfoModelInner get(String resourceGroupName, String packetCoreControlPlaneName) { + return getWithResponse(resourceGroupName, packetCoreControlPlaneName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoesImpl.java new file mode 100644 index 000000000000..e9f3d36cbd8f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/RoutingInfoesImpl.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.RoutingInfoesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoModelInner; +import com.azure.resourcemanager.mobilenetwork.models.RoutingInfoModel; +import com.azure.resourcemanager.mobilenetwork.models.RoutingInfoes; + +public final class RoutingInfoesImpl implements RoutingInfoes { + private static final ClientLogger LOGGER = new ClientLogger(RoutingInfoesImpl.class); + + private final RoutingInfoesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public RoutingInfoesImpl(RoutingInfoesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, packetCoreControlPlaneName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RoutingInfoModelImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, packetCoreControlPlaneName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RoutingInfoModelImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, packetCoreControlPlaneName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RoutingInfoModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RoutingInfoModel get(String resourceGroupName, String packetCoreControlPlaneName) { + RoutingInfoModelInner inner = this.serviceClient().get(resourceGroupName, packetCoreControlPlaneName); + if (inner != null) { + return new RoutingInfoModelImpl(inner, this.manager()); + } else { + return null; + } + } + + private RoutingInfoesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServiceImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServiceImpl.java new file mode 100644 index 000000000000..99e5f39c9dea --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServiceImpl.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ServiceInner; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.Service; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ServiceImpl implements Service, Service.Definition, Service.Update { + private ServiceInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public int servicePrecedence() { + return this.innerModel().servicePrecedence(); + } + + public QosPolicy serviceQosPolicy() { + return this.innerModel().serviceQosPolicy(); + } + + public List pccRules() { + List inner = this.innerModel().pccRules(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ServiceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String mobileNetworkName; + + private String serviceName; + + private TagsObject updateParameters; + + public ServiceImpl withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName) { + this.resourceGroupName = resourceGroupName; + this.mobileNetworkName = mobileNetworkName; + return this; + } + + public Service create() { + this.innerObject = serviceManager.serviceClient() + .getServices() + .createOrUpdate(resourceGroupName, mobileNetworkName, serviceName, this.innerModel(), Context.NONE); + return this; + } + + public Service create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getServices() + .createOrUpdate(resourceGroupName, mobileNetworkName, serviceName, this.innerModel(), context); + return this; + } + + ServiceImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new ServiceInner(); + this.serviceManager = serviceManager; + this.serviceName = name; + } + + public ServiceImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public Service apply() { + this.innerObject = serviceManager.serviceClient() + .getServices() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, serviceName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public Service apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getServices() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, serviceName, updateParameters, context) + .getValue(); + return this; + } + + ServiceImpl(ServiceInner innerObject, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "mobileNetworks"); + this.serviceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "services"); + } + + public Service refresh() { + this.innerObject = serviceManager.serviceClient() + .getServices() + .getWithResponse(resourceGroupName, mobileNetworkName, serviceName, Context.NONE) + .getValue(); + return this; + } + + public Service refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getServices() + .getWithResponse(resourceGroupName, mobileNetworkName, serviceName, context) + .getValue(); + return this; + } + + public ServiceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ServiceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ServiceImpl withServicePrecedence(int servicePrecedence) { + this.innerModel().withServicePrecedence(servicePrecedence); + return this; + } + + public ServiceImpl withPccRules(List pccRules) { + this.innerModel().withPccRules(pccRules); + return this; + } + + public ServiceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public ServiceImpl withServiceQosPolicy(QosPolicy serviceQosPolicy) { + this.innerModel().withServiceQosPolicy(serviceQosPolicy); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesClientImpl.java new file mode 100644 index 000000000000..50639b9f122f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesClientImpl.java @@ -0,0 +1,1123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.ServicesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ServiceInner; +import com.azure.resourcemanager.mobilenetwork.models.ServiceListResult; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ServicesClient. + */ +public final class ServicesClientImpl implements ServicesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ServicesService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of ServicesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ServicesClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientServices to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface ServicesService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("serviceName") String serviceName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("serviceName") String serviceName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("serviceName") String serviceName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ServiceInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("serviceName") String serviceName, + @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetwork(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String serviceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, + serviceName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String serviceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, serviceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String serviceName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, serviceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String serviceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, serviceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String serviceName) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, serviceName).getSyncPoller(); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String serviceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, serviceName, context).getSyncPoller(); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String serviceName) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, serviceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String serviceName, + Context context) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, serviceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String serviceName) { + deleteAsync(resourceGroupName, mobileNetworkName, serviceName).block(); + } + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String serviceName, Context context) { + deleteAsync(resourceGroupName, mobileNetworkName, serviceName, context).block(); + } + + /** + * Gets information about the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String serviceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, + serviceName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String serviceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, serviceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Gets information about the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String mobileNetworkName, String serviceName) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, serviceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, + String serviceName, Context context) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, serviceName, context).block(); + } + + /** + * Gets information about the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServiceInner get(String resourceGroupName, String mobileNetworkName, String serviceName) { + return getWithResponse(resourceGroupName, mobileNetworkName, serviceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String serviceName, ServiceInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + mobileNetworkName, serviceName, this.client.getApiVersion(), this.client.getSubscriptionId(), + parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String serviceName, ServiceInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, serviceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of service resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ServiceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String mobileNetworkName, String serviceName, ServiceInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, serviceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServiceInner.class, ServiceInner.class, this.client.getContext()); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of service resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ServiceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String mobileNetworkName, String serviceName, ServiceInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, serviceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServiceInner.class, ServiceInner.class, context); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of service resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ServiceInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String serviceName, ServiceInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of service resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ServiceInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String serviceName, ServiceInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, + String serviceName, ServiceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, + String serviceName, ServiceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServiceInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String serviceName, + ServiceInner parameters) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters).block(); + } + + /** + * Creates or updates a service. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to the create or update service operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServiceInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String serviceName, + ServiceInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters, context).block(); + } + + /** + * Updates service tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to update service tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String serviceName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, serviceName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates service tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to update service tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String serviceName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (serviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, serviceName, parameters, accept, context); + } + + /** + * Updates service tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to update service tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String mobileNetworkName, String serviceName, + TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, serviceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates service tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to update service tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + String serviceName, TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, serviceName, parameters, context) + .block(); + } + + /** + * Updates service tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param parameters Parameters supplied to update service tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return service resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServiceInner updateTags(String resourceGroupName, String mobileNetworkName, String serviceName, + TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, mobileNetworkName, serviceName, parameters, Context.NONE) + .getValue(); + } + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByMobileNetwork(this.client.getEndpoint(), resourceGroupName, + mobileNetworkName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByMobileNetwork(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName, context), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName)); + } + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for services API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for services API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesImpl.java new file mode 100644 index 000000000000..6791e63d4ecf --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.ServicesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ServiceInner; +import com.azure.resourcemanager.mobilenetwork.models.Service; +import com.azure.resourcemanager.mobilenetwork.models.Services; + +public final class ServicesImpl implements Services { + private static final ClientLogger LOGGER = new ClientLogger(ServicesImpl.class); + + private final ServicesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public ServicesImpl(ServicesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String mobileNetworkName, String serviceName) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, serviceName); + } + + public void delete(String resourceGroupName, String mobileNetworkName, String serviceName, Context context) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, serviceName, context); + } + + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, String serviceName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, mobileNetworkName, serviceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ServiceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Service get(String resourceGroupName, String mobileNetworkName, String serviceName) { + ServiceInner inner = this.serviceClient().get(resourceGroupName, mobileNetworkName, serviceName); + if (inner != null) { + return new ServiceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + PagedIterable inner + = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceImpl(inner1, this.manager())); + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + PagedIterable inner + = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceImpl(inner1, this.manager())); + } + + public Service getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String serviceName = ResourceManagerUtils.getValueFromIdByName(id, "services"); + if (serviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, serviceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String serviceName = ResourceManagerUtils.getValueFromIdByName(id, "services"); + if (serviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, serviceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String serviceName = ResourceManagerUtils.getValueFromIdByName(id, "services"); + if (serviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, serviceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String serviceName = ResourceManagerUtils.getValueFromIdByName(id, "services"); + if (serviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, serviceName, context); + } + + private ServicesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public ServiceImpl define(String name) { + return new ServiceImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupImpl.java new file mode 100644 index 000000000000..329bfd27da99 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupImpl.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; +import com.azure.resourcemanager.mobilenetwork.models.KeyVaultKey; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SimGroup; +import java.util.Collections; +import java.util.Map; + +public final class SimGroupImpl implements SimGroup, SimGroup.Definition, SimGroup.Update { + private SimGroupInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public KeyVaultKey encryptionKey() { + return this.innerModel().encryptionKey(); + } + + public MobileNetworkResourceId mobileNetwork() { + return this.innerModel().mobileNetwork(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SimGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String simGroupName; + + private IdentityAndTagsObject updateParameters; + + public SimGroupImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public SimGroup create() { + this.innerObject = serviceManager.serviceClient() + .getSimGroups() + .createOrUpdate(resourceGroupName, simGroupName, this.innerModel(), Context.NONE); + return this; + } + + public SimGroup create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSimGroups() + .createOrUpdate(resourceGroupName, simGroupName, this.innerModel(), context); + return this; + } + + SimGroupImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new SimGroupInner(); + this.serviceManager = serviceManager; + this.simGroupName = name; + } + + public SimGroupImpl update() { + this.updateParameters = new IdentityAndTagsObject(); + return this; + } + + public SimGroup apply() { + this.innerObject = serviceManager.serviceClient() + .getSimGroups() + .updateTagsWithResponse(resourceGroupName, simGroupName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public SimGroup apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSimGroups() + .updateTagsWithResponse(resourceGroupName, simGroupName, updateParameters, context) + .getValue(); + return this; + } + + SimGroupImpl(SimGroupInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.simGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "simGroups"); + } + + public SimGroup refresh() { + this.innerObject = serviceManager.serviceClient() + .getSimGroups() + .getByResourceGroupWithResponse(resourceGroupName, simGroupName, Context.NONE) + .getValue(); + return this; + } + + public SimGroup refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSimGroups() + .getByResourceGroupWithResponse(resourceGroupName, simGroupName, context) + .getValue(); + return this; + } + + public SimGroupImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SimGroupImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SimGroupImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public SimGroupImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } + } + + public SimGroupImpl withEncryptionKey(KeyVaultKey encryptionKey) { + this.innerModel().withEncryptionKey(encryptionKey); + return this; + } + + public SimGroupImpl withMobileNetwork(MobileNetworkResourceId mobileNetwork) { + this.innerModel().withMobileNetwork(mobileNetwork); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsClientImpl.java new file mode 100644 index 000000000000..f5bb23f1d93a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsClientImpl.java @@ -0,0 +1,1177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.SimGroupsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; +import com.azure.resourcemanager.mobilenetwork.models.SimGroupListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SimGroupsClient. + */ +public final class SimGroupsClientImpl implements SimGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SimGroupsService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of SimGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SimGroupsClientImpl(MobileNetworkManagementClientImpl client) { + this.service + = RestProxy.create(SimGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientSimGroups to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface SimGroupsService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("simGroupName") String simGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("simGroupName") String simGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") SimGroupInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") IdentityAndTagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/simGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String simGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String simGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, simGroupName, accept, context); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String simGroupName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, simGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String simGroupName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, simGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String simGroupName) { + return this.beginDeleteAsync(resourceGroupName, simGroupName).getSyncPoller(); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String simGroupName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, simGroupName, context).getSyncPoller(); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String simGroupName) { + return beginDeleteAsync(resourceGroupName, simGroupName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String simGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, simGroupName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String simGroupName) { + deleteAsync(resourceGroupName, simGroupName).block(); + } + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String simGroupName, Context context) { + deleteAsync(resourceGroupName, simGroupName, context).block(); + } + + /** + * Gets information about the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String simGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String simGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, accept, context); + } + + /** + * Gets information about the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String simGroupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, simGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String simGroupName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, simGroupName, context).block(); + } + + /** + * Gets information about the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimGroupInner getByResourceGroup(String resourceGroupName, String simGroupName) { + return getByResourceGroupWithResponse(resourceGroupName, simGroupName, Context.NONE).getValue(); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String simGroupName, SimGroupInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String simGroupName, SimGroupInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, parameters, accept, context); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of sIM group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SimGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, + String simGroupName, SimGroupInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, simGroupName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SimGroupInner.class, SimGroupInner.class, this.client.getContext()); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of sIM group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SimGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, + String simGroupName, SimGroupInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, simGroupName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SimGroupInner.class, SimGroupInner.class, context); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SimGroupInner> beginCreateOrUpdate(String resourceGroupName, + String simGroupName, SimGroupInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SimGroupInner> beginCreateOrUpdate(String resourceGroupName, + String simGroupName, SimGroupInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String simGroupName, + SimGroupInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, simGroupName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String simGroupName, + SimGroupInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, simGroupName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimGroupInner createOrUpdate(String resourceGroupName, String simGroupName, SimGroupInner parameters) { + return createOrUpdateAsync(resourceGroupName, simGroupName, parameters).block(); + } + + /** + * Creates or updates a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the create or update SIM group operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimGroupInner createOrUpdate(String resourceGroupName, String simGroupName, SimGroupInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + + /** + * Patch SIM group resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to patch SIM group resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String simGroupName, + IdentityAndTagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch SIM group resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to patch SIM group resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String simGroupName, + IdentityAndTagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, parameters, accept, context); + } + + /** + * Patch SIM group resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to patch SIM group resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String simGroupName, + IdentityAndTagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, simGroupName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Patch SIM group resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to patch SIM group resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String simGroupName, + IdentityAndTagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + + /** + * Patch SIM group resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to patch SIM group resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimGroupInner updateTags(String resourceGroupName, String simGroupName, IdentityAndTagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, simGroupName, parameters, Context.NONE).getValue(); + } + + /** + * Gets all the SIM groups in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all the SIM groups in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all the SIM groups in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the SIM groups in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the SIM groups in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets all the SIM groups in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list SIM groups API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list SIM groups API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list SIM groups API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list SIM groups API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsImpl.java new file mode 100644 index 000000000000..f9f847f86445 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsImpl.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.SimGroupsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import com.azure.resourcemanager.mobilenetwork.models.SimGroup; +import com.azure.resourcemanager.mobilenetwork.models.SimGroups; + +public final class SimGroupsImpl implements SimGroups { + private static final ClientLogger LOGGER = new ClientLogger(SimGroupsImpl.class); + + private final SimGroupsClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public SimGroupsImpl(SimGroupsClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void deleteByResourceGroup(String resourceGroupName, String simGroupName) { + this.serviceClient().delete(resourceGroupName, simGroupName); + } + + public void delete(String resourceGroupName, String simGroupName, Context context) { + this.serviceClient().delete(resourceGroupName, simGroupName, context); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String simGroupName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, simGroupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SimGroupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SimGroup getByResourceGroup(String resourceGroupName, String simGroupName) { + SimGroupInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, simGroupName); + if (inner != null) { + return new SimGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimGroupImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimGroupImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimGroupImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimGroupImpl(inner1, this.manager())); + } + + public SimGroup getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String simGroupName = ResourceManagerUtils.getValueFromIdByName(id, "simGroups"); + if (simGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simGroups'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, simGroupName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String simGroupName = ResourceManagerUtils.getValueFromIdByName(id, "simGroups"); + if (simGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simGroups'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, simGroupName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String simGroupName = ResourceManagerUtils.getValueFromIdByName(id, "simGroups"); + if (simGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simGroups'.", id))); + } + this.delete(resourceGroupName, simGroupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String simGroupName = ResourceManagerUtils.getValueFromIdByName(id, "simGroups"); + if (simGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simGroups'.", id))); + } + this.delete(resourceGroupName, simGroupName, context); + } + + private SimGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public SimGroupImpl define(String name) { + return new SimGroupImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimImpl.java new file mode 100644 index 000000000000..dcdac4d49c20 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimImpl.java @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.Sim; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimState; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SiteProvisioningState; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class SimImpl implements Sim, Sim.Definition, Sim.Update { + private SimInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String authenticationKey() { + return this.innerModel().authenticationKey(); + } + + public String operatorKeyCode() { + return this.innerModel().operatorKeyCode(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public SimState simState() { + return this.innerModel().simState(); + } + + public Map siteProvisioningState() { + Map inner = this.innerModel().siteProvisioningState(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String internationalMobileSubscriberIdentity() { + return this.innerModel().internationalMobileSubscriberIdentity(); + } + + public String integratedCircuitCardIdentifier() { + return this.innerModel().integratedCircuitCardIdentifier(); + } + + public String deviceType() { + return this.innerModel().deviceType(); + } + + public SimPolicyResourceId simPolicy() { + return this.innerModel().simPolicy(); + } + + public List staticIpConfiguration() { + List inner = this.innerModel().staticIpConfiguration(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String vendorName() { + return this.innerModel().vendorName(); + } + + public String vendorKeyFingerprint() { + return this.innerModel().vendorKeyFingerprint(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SimInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String simGroupName; + + private String simName; + + public SimImpl withExistingSimGroup(String resourceGroupName, String simGroupName) { + this.resourceGroupName = resourceGroupName; + this.simGroupName = simGroupName; + return this; + } + + public Sim create() { + this.innerObject = serviceManager.serviceClient() + .getSims() + .createOrUpdate(resourceGroupName, simGroupName, simName, this.innerModel(), Context.NONE); + return this; + } + + public Sim create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSims() + .createOrUpdate(resourceGroupName, simGroupName, simName, this.innerModel(), context); + return this; + } + + SimImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new SimInner(); + this.serviceManager = serviceManager; + this.simName = name; + } + + public SimImpl update() { + return this; + } + + public Sim apply() { + this.innerObject = serviceManager.serviceClient() + .getSims() + .createOrUpdate(resourceGroupName, simGroupName, simName, this.innerModel(), Context.NONE); + return this; + } + + public Sim apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSims() + .createOrUpdate(resourceGroupName, simGroupName, simName, this.innerModel(), context); + return this; + } + + SimImpl(SimInner innerObject, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.simGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "simGroups"); + this.simName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "sims"); + } + + public Sim refresh() { + this.innerObject = serviceManager.serviceClient() + .getSims() + .getWithResponse(resourceGroupName, simGroupName, simName, Context.NONE) + .getValue(); + return this; + } + + public Sim refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSims() + .getWithResponse(resourceGroupName, simGroupName, simName, context) + .getValue(); + return this; + } + + public SimImpl withInternationalMobileSubscriberIdentity(String internationalMobileSubscriberIdentity) { + this.innerModel().withInternationalMobileSubscriberIdentity(internationalMobileSubscriberIdentity); + return this; + } + + public SimImpl withAuthenticationKey(String authenticationKey) { + this.innerModel().withAuthenticationKey(authenticationKey); + return this; + } + + public SimImpl withOperatorKeyCode(String operatorKeyCode) { + this.innerModel().withOperatorKeyCode(operatorKeyCode); + return this; + } + + public SimImpl withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier) { + this.innerModel().withIntegratedCircuitCardIdentifier(integratedCircuitCardIdentifier); + return this; + } + + public SimImpl withDeviceType(String deviceType) { + this.innerModel().withDeviceType(deviceType); + return this; + } + + public SimImpl withSimPolicy(SimPolicyResourceId simPolicy) { + this.innerModel().withSimPolicy(simPolicy); + return this; + } + + public SimImpl withStaticIpConfiguration(List staticIpConfiguration) { + this.innerModel().withStaticIpConfiguration(staticIpConfiguration); + return this; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesClientImpl.java new file mode 100644 index 000000000000..30385ad1a2e7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesClientImpl.java @@ -0,0 +1,1095 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.SimPoliciesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyInner; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyListResult; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SimPoliciesClient. + */ +public final class SimPoliciesClientImpl implements SimPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final SimPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of SimPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SimPoliciesClientImpl(MobileNetworkManagementClientImpl client) { + this.service + = RestProxy.create(SimPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientSimPolicies to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface SimPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("simPolicyName") String simPolicyName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("simPolicyName") String simPolicyName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("simPolicyName") String simPolicyName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") SimPolicyInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("simPolicyName") String simPolicyName, + @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetwork(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String simPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (simPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter simPolicyName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, + simPolicyName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String simPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (simPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter simPolicyName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, simPolicyName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String simPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, simPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String simPolicyName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, simPolicyName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String simPolicyName) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, simPolicyName).getSyncPoller(); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String simPolicyName, Context context) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, simPolicyName, context).getSyncPoller(); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String simPolicyName) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, simPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String simPolicyName, + Context context) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, simPolicyName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName) { + deleteAsync(resourceGroupName, mobileNetworkName, simPolicyName).block(); + } + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName, Context context) { + deleteAsync(resourceGroupName, mobileNetworkName, simPolicyName, context).block(); + } + + /** + * Gets information about the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String simPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (simPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter simPolicyName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, + simPolicyName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String simPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (simPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter simPolicyName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, simPolicyName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * Gets information about the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String mobileNetworkName, String simPolicyName) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, simPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, + String simPolicyName, Context context) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, simPolicyName, context).block(); + } + + /** + * Gets information about the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimPolicyInner get(String resourceGroupName, String mobileNetworkName, String simPolicyName) { + return getWithResponse(resourceGroupName, mobileNetworkName, simPolicyName, Context.NONE).getValue(); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String simPolicyName, SimPolicyInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (simPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter simPolicyName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + mobileNetworkName, simPolicyName, this.client.getApiVersion(), this.client.getSubscriptionId(), + parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String simPolicyName, SimPolicyInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (simPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter simPolicyName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, simPolicyName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SimPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, + String mobileNetworkName, String simPolicyName, SimPolicyInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SimPolicyInner.class, SimPolicyInner.class, this.client.getContext()); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SimPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, + String mobileNetworkName, String simPolicyName, SimPolicyInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SimPolicyInner.class, SimPolicyInner.class, context); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SimPolicyInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String simPolicyName, SimPolicyInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SimPolicyInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String simPolicyName, SimPolicyInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, + String simPolicyName, SimPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, + String simPolicyName, SimPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimPolicyInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String simPolicyName, + SimPolicyInner parameters) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters).block(); + } + + /** + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to the create or update SIM policy operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimPolicyInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String simPolicyName, + SimPolicyInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters, context).block(); + } + + /** + * Updates SIM policy tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to update SIM policy tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String simPolicyName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (simPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter simPolicyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, simPolicyName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates SIM policy tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to update SIM policy tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String simPolicyName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (simPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter simPolicyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, simPolicyName, parameters, accept, context); + } + + /** + * Updates SIM policy tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to update SIM policy tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String mobileNetworkName, + String simPolicyName, TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates SIM policy tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to update SIM policy tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + String simPolicyName, TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters, context) + .block(); + } + + /** + * Updates SIM policy tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param parameters Parameters supplied to update SIM policy tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimPolicyInner updateTags(String resourceGroupName, String mobileNetworkName, String simPolicyName, + TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, mobileNetworkName, simPolicyName, parameters, Context.NONE) + .getValue(); + } + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByMobileNetwork(this.client.getEndpoint(), resourceGroupName, + mobileNetworkName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByMobileNetwork(this.client.getEndpoint(), resourceGroupName, mobileNetworkName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName, context), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName)); + } + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for SIM policies API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for SIM policies API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesImpl.java new file mode 100644 index 000000000000..97e682151b2f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.SimPoliciesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyInner; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicies; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; + +public final class SimPoliciesImpl implements SimPolicies { + private static final ClientLogger LOGGER = new ClientLogger(SimPoliciesImpl.class); + + private final SimPoliciesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public SimPoliciesImpl(SimPoliciesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, simPolicyName); + } + + public void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, simPolicyName, context); + } + + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, String simPolicyName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, mobileNetworkName, simPolicyName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SimPolicyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SimPolicy get(String resourceGroupName, String mobileNetworkName, String simPolicyName) { + SimPolicyInner inner = this.serviceClient().get(resourceGroupName, mobileNetworkName, simPolicyName); + if (inner != null) { + return new SimPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + PagedIterable inner + = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimPolicyImpl(inner1, this.manager())); + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + PagedIterable inner + = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimPolicyImpl(inner1, this.manager())); + } + + public SimPolicy getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String simPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "simPolicies"); + if (simPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, simPolicyName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String simPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "simPolicies"); + if (simPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, simPolicyName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String simPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "simPolicies"); + if (simPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simPolicies'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, simPolicyName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String simPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "simPolicies"); + if (simPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simPolicies'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, simPolicyName, context); + } + + private SimPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public SimPolicyImpl define(String name) { + return new SimPolicyImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPolicyImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPolicyImpl.java new file mode 100644 index 000000000000..3cac80b3eaf3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPolicyImpl.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyInner; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; +import com.azure.resourcemanager.mobilenetwork.models.SiteProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class SimPolicyImpl implements SimPolicy, SimPolicy.Definition, SimPolicy.Update { + private SimPolicyInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Map siteProvisioningState() { + Map inner = this.innerModel().siteProvisioningState(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Ambr ueAmbr() { + return this.innerModel().ueAmbr(); + } + + public SliceResourceId defaultSlice() { + return this.innerModel().defaultSlice(); + } + + public Integer rfspIndex() { + return this.innerModel().rfspIndex(); + } + + public Integer registrationTimer() { + return this.innerModel().registrationTimer(); + } + + public List sliceConfigurations() { + List inner = this.innerModel().sliceConfigurations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SimPolicyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String mobileNetworkName; + + private String simPolicyName; + + private TagsObject updateParameters; + + public SimPolicyImpl withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName) { + this.resourceGroupName = resourceGroupName; + this.mobileNetworkName = mobileNetworkName; + return this; + } + + public SimPolicy create() { + this.innerObject = serviceManager.serviceClient() + .getSimPolicies() + .createOrUpdate(resourceGroupName, mobileNetworkName, simPolicyName, this.innerModel(), Context.NONE); + return this; + } + + public SimPolicy create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSimPolicies() + .createOrUpdate(resourceGroupName, mobileNetworkName, simPolicyName, this.innerModel(), context); + return this; + } + + SimPolicyImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new SimPolicyInner(); + this.serviceManager = serviceManager; + this.simPolicyName = name; + } + + public SimPolicyImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public SimPolicy apply() { + this.innerObject = serviceManager.serviceClient() + .getSimPolicies() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, simPolicyName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public SimPolicy apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSimPolicies() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, simPolicyName, updateParameters, context) + .getValue(); + return this; + } + + SimPolicyImpl(SimPolicyInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "mobileNetworks"); + this.simPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "simPolicies"); + } + + public SimPolicy refresh() { + this.innerObject = serviceManager.serviceClient() + .getSimPolicies() + .getWithResponse(resourceGroupName, mobileNetworkName, simPolicyName, Context.NONE) + .getValue(); + return this; + } + + public SimPolicy refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSimPolicies() + .getWithResponse(resourceGroupName, mobileNetworkName, simPolicyName, context) + .getValue(); + return this; + } + + public SimPolicyImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SimPolicyImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SimPolicyImpl withUeAmbr(Ambr ueAmbr) { + this.innerModel().withUeAmbr(ueAmbr); + return this; + } + + public SimPolicyImpl withDefaultSlice(SliceResourceId defaultSlice) { + this.innerModel().withDefaultSlice(defaultSlice); + return this; + } + + public SimPolicyImpl withSliceConfigurations(List sliceConfigurations) { + this.innerModel().withSliceConfigurations(sliceConfigurations); + return this; + } + + public SimPolicyImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public SimPolicyImpl withRfspIndex(Integer rfspIndex) { + this.innerModel().withRfspIndex(rfspIndex); + return this; + } + + public SimPolicyImpl withRegistrationTimer(Integer registrationTimer) { + this.innerModel().withRegistrationTimer(registrationTimer); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsClientImpl.java new file mode 100644 index 000000000000..c2af9eb24da4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsClientImpl.java @@ -0,0 +1,2128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.SimsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner; +import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.SimClone; +import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; +import com.azure.resourcemanager.mobilenetwork.models.SimListResult; +import com.azure.resourcemanager.mobilenetwork.models.SimMove; +import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SimsClient. + */ +public final class SimsClientImpl implements SimsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SimsService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of SimsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SimsClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(SimsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientSims to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface SimsService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("simGroupName") String simGroupName, + @PathParam("simName") String simName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("simGroupName") String simGroupName, + @PathParam("simName") String simName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("simGroupName") String simGroupName, + @PathParam("simName") String simName, @BodyParam("application/json") SimInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("simGroupName") String simGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadSims") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> bulkUpload(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") SimUploadList parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/deleteSims") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> bulkDelete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") SimDeleteList parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadEncryptedSims") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> bulkUploadEncrypted(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") EncryptedSimUploadList parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/moveSims") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> move(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") SimMove parameters, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/cloneSims") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> clone(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") SimClone parameters, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByGroupNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String simGroupName, + String simName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (simName == null) { + return Mono.error(new IllegalArgumentException("Parameter simName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, simName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String simGroupName, + String simName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (simName == null) { + return Mono.error(new IllegalArgumentException("Parameter simName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, simGroupName, simName, accept, context); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String simGroupName, + String simName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, simGroupName, simName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String simGroupName, + String simName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, simGroupName, simName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String simGroupName, + String simName) { + return this.beginDeleteAsync(resourceGroupName, simGroupName, simName).getSyncPoller(); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String simGroupName, String simName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, simGroupName, simName, context).getSyncPoller(); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String simGroupName, String simName) { + return beginDeleteAsync(resourceGroupName, simGroupName, simName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String simGroupName, String simName, Context context) { + return beginDeleteAsync(resourceGroupName, simGroupName, simName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String simGroupName, String simName) { + deleteAsync(resourceGroupName, simGroupName, simName).block(); + } + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String simGroupName, String simName, Context context) { + deleteAsync(resourceGroupName, simGroupName, simName, context).block(); + } + + /** + * Gets information about the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String simGroupName, + String simName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (simName == null) { + return Mono.error(new IllegalArgumentException("Parameter simName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, simName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String simGroupName, String simName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (simName == null) { + return Mono.error(new IllegalArgumentException("Parameter simName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, simGroupName, simName, accept, context); + } + + /** + * Gets information about the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String simGroupName, String simName) { + return getWithResponseAsync(resourceGroupName, simGroupName, simName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String simGroupName, String simName, + Context context) { + return getWithResponseAsync(resourceGroupName, simGroupName, simName, context).block(); + } + + /** + * Gets information about the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimInner get(String resourceGroupName, String simGroupName, String simName) { + return getWithResponse(resourceGroupName, simGroupName, simName, Context.NONE).getValue(); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String simGroupName, String simName, SimInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (simName == null) { + return Mono.error(new IllegalArgumentException("Parameter simName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, simName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String simGroupName, String simName, SimInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (simName == null) { + return Mono.error(new IllegalArgumentException("Parameter simName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, simGroupName, simName, parameters, accept, context); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of sIM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SimInner> beginCreateOrUpdateAsync(String resourceGroupName, + String simGroupName, String simName, SimInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, simGroupName, simName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), SimInner.class, + SimInner.class, this.client.getContext()); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of sIM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SimInner> beginCreateOrUpdateAsync(String resourceGroupName, + String simGroupName, String simName, SimInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, simGroupName, simName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), SimInner.class, + SimInner.class, context); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SimInner> beginCreateOrUpdate(String resourceGroupName, String simGroupName, + String simName, SimInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters).getSyncPoller(); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of sIM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SimInner> beginCreateOrUpdate(String resourceGroupName, String simGroupName, + String simName, SimInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String simGroupName, String simName, + SimInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String simGroupName, String simName, + SimInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimInner createOrUpdate(String resourceGroupName, String simGroupName, String simName, SimInner parameters) { + return createOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters).block(); + } + + /** + * Creates or updates a SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param parameters Parameters supplied to the create or update SIM operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sIM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimInner createOrUpdate(String resourceGroupName, String simGroupName, String simName, SimInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters, context).block(); + } + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByGroupSinglePageAsync(String resourceGroupName, String simGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), simGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByGroupSinglePageAsync(String resourceGroupName, String simGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByGroup(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByGroupAsync(String resourceGroupName, String simGroupName) { + return new PagedFlux<>(() -> listByGroupSinglePageAsync(resourceGroupName, simGroupName), + nextLink -> listByGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByGroupAsync(String resourceGroupName, String simGroupName, Context context) { + return new PagedFlux<>(() -> listByGroupSinglePageAsync(resourceGroupName, simGroupName, context), + nextLink -> listByGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByGroup(String resourceGroupName, String simGroupName) { + return new PagedIterable<>(listByGroupAsync(resourceGroupName, simGroupName)); + } + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByGroup(String resourceGroupName, String simGroupName, Context context) { + return new PagedIterable<>(listByGroupAsync(resourceGroupName, simGroupName, context)); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkUploadWithResponseAsync(String resourceGroupName, String simGroupName, + SimUploadList parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.bulkUpload(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkUploadWithResponseAsync(String resourceGroupName, String simGroupName, + SimUploadList parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.bulkUpload(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, parameters, accept, context); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginBulkUploadAsync(String resourceGroupName, String simGroupName, SimUploadList parameters) { + Mono>> mono + = bulkUploadWithResponseAsync(resourceGroupName, simGroupName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginBulkUploadAsync(String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = bulkUploadWithResponseAsync(resourceGroupName, simGroupName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, context); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginBulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters) { + return this.beginBulkUploadAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginBulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { + return this.beginBulkUploadAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkUploadAsync(String resourceGroupName, String simGroupName, + SimUploadList parameters) { + return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkUploadAsync(String resourceGroupName, String simGroupName, + SimUploadList parameters, Context context) { + return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkUpload(String resourceGroupName, String simGroupName, + SimUploadList parameters) { + return bulkUploadAsync(resourceGroupName, simGroupName, parameters).block(); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters, + Context context) { + return bulkUploadAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkDeleteWithResponseAsync(String resourceGroupName, String simGroupName, + SimDeleteList parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.bulkDelete(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkDeleteWithResponseAsync(String resourceGroupName, String simGroupName, + SimDeleteList parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.bulkDelete(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, parameters, accept, context); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginBulkDeleteAsync(String resourceGroupName, String simGroupName, SimDeleteList parameters) { + Mono>> mono + = bulkDeleteWithResponseAsync(resourceGroupName, simGroupName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginBulkDeleteAsync(String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = bulkDeleteWithResponseAsync(resourceGroupName, simGroupName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, context); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginBulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters) { + return this.beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginBulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { + return this.beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkDeleteAsync(String resourceGroupName, String simGroupName, + SimDeleteList parameters) { + return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkDeleteAsync(String resourceGroupName, String simGroupName, + SimDeleteList parameters, Context context) { + return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkDelete(String resourceGroupName, String simGroupName, + SimDeleteList parameters) { + return bulkDeleteAsync(resourceGroupName, simGroupName, parameters).block(); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters, + Context context) { + return bulkDeleteAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkUploadEncryptedWithResponseAsync(String resourceGroupName, + String simGroupName, EncryptedSimUploadList parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.bulkUploadEncrypted(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), simGroupName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkUploadEncryptedWithResponseAsync(String resourceGroupName, + String simGroupName, EncryptedSimUploadList parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.bulkUploadEncrypted(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, parameters, accept, context); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginBulkUploadEncryptedAsync( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { + Mono>> mono + = bulkUploadEncryptedWithResponseAsync(resourceGroupName, simGroupName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginBulkUploadEncryptedAsync( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = bulkUploadEncryptedWithResponseAsync(resourceGroupName, simGroupName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, context); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginBulkUploadEncrypted(String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { + return this.beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { + return this.beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkUploadEncryptedAsync(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters) { + return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkUploadEncryptedAsync(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters, Context context) { + return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkUploadEncrypted(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters) { + return bulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters).block(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkUploadEncrypted(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters, Context context) { + return bulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> moveWithResponseAsync(String resourceGroupName, String simGroupName, + SimMove parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.move(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> moveWithResponseAsync(String resourceGroupName, String simGroupName, + SimMove parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.move(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, parameters, accept, context); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginMoveAsync(String resourceGroupName, String simGroupName, SimMove parameters) { + Mono>> mono = moveWithResponseAsync(resourceGroupName, simGroupName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginMoveAsync(String resourceGroupName, String simGroupName, SimMove parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = moveWithResponseAsync(resourceGroupName, simGroupName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, context); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginMove(String resourceGroupName, String simGroupName, SimMove parameters) { + return this.beginMoveAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginMove(String resourceGroupName, String simGroupName, SimMove parameters, Context context) { + return this.beginMoveAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono moveAsync(String resourceGroupName, String simGroupName, + SimMove parameters) { + return beginMoveAsync(resourceGroupName, simGroupName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono moveAsync(String resourceGroupName, String simGroupName, SimMove parameters, + Context context) { + return beginMoveAsync(resourceGroupName, simGroupName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner move(String resourceGroupName, String simGroupName, SimMove parameters) { + return moveAsync(resourceGroupName, simGroupName, parameters).block(); + } + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner move(String resourceGroupName, String simGroupName, SimMove parameters, + Context context) { + return moveAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> cloneWithResponseAsync(String resourceGroupName, String simGroupName, + SimClone parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.clone(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> cloneWithResponseAsync(String resourceGroupName, String simGroupName, + SimClone parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.clone(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), simGroupName, parameters, accept, context); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginCloneAsync(String resourceGroupName, String simGroupName, SimClone parameters) { + Mono>> mono = cloneWithResponseAsync(resourceGroupName, simGroupName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginCloneAsync(String resourceGroupName, String simGroupName, SimClone parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = cloneWithResponseAsync(resourceGroupName, simGroupName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AsyncOperationStatusInner.class, AsyncOperationStatusInner.class, context); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginClone(String resourceGroupName, String simGroupName, SimClone parameters) { + return this.beginCloneAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> + beginClone(String resourceGroupName, String simGroupName, SimClone parameters, Context context) { + return this.beginCloneAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono cloneAsync(String resourceGroupName, String simGroupName, + SimClone parameters) { + return beginCloneAsync(resourceGroupName, simGroupName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono cloneAsync(String resourceGroupName, String simGroupName, + SimClone parameters, Context context) { + return beginCloneAsync(resourceGroupName, simGroupName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner clone(String resourceGroupName, String simGroupName, SimClone parameters) { + return cloneAsync(resourceGroupName, simGroupName, parameters).block(); + } + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner clone(String resourceGroupName, String simGroupName, SimClone parameters, + Context context) { + return cloneAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list SIMs API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for list SIMs API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByGroupNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsImpl.java new file mode 100644 index 000000000000..12131bd2e060 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsImpl.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.SimsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; +import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.Sim; +import com.azure.resourcemanager.mobilenetwork.models.SimClone; +import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; +import com.azure.resourcemanager.mobilenetwork.models.SimMove; +import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.Sims; + +public final class SimsImpl implements Sims { + private static final ClientLogger LOGGER = new ClientLogger(SimsImpl.class); + + private final SimsClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public SimsImpl(SimsClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String simGroupName, String simName) { + this.serviceClient().delete(resourceGroupName, simGroupName, simName); + } + + public void delete(String resourceGroupName, String simGroupName, String simName, Context context) { + this.serviceClient().delete(resourceGroupName, simGroupName, simName, context); + } + + public Response getWithResponse(String resourceGroupName, String simGroupName, String simName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, simGroupName, simName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SimImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Sim get(String resourceGroupName, String simGroupName, String simName) { + SimInner inner = this.serviceClient().get(resourceGroupName, simGroupName, simName); + if (inner != null) { + return new SimImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByGroup(String resourceGroupName, String simGroupName) { + PagedIterable inner = this.serviceClient().listByGroup(resourceGroupName, simGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimImpl(inner1, this.manager())); + } + + public PagedIterable listByGroup(String resourceGroupName, String simGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByGroup(resourceGroupName, simGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SimImpl(inner1, this.manager())); + } + + public AsyncOperationStatus bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters) { + AsyncOperationStatusInner inner = this.serviceClient().bulkUpload(resourceGroupName, simGroupName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters, + Context context) { + AsyncOperationStatusInner inner + = this.serviceClient().bulkUpload(resourceGroupName, simGroupName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters) { + AsyncOperationStatusInner inner = this.serviceClient().bulkDelete(resourceGroupName, simGroupName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters, + Context context) { + AsyncOperationStatusInner inner + = this.serviceClient().bulkDelete(resourceGroupName, simGroupName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkUploadEncrypted(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters) { + AsyncOperationStatusInner inner + = this.serviceClient().bulkUploadEncrypted(resourceGroupName, simGroupName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkUploadEncrypted(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters, Context context) { + AsyncOperationStatusInner inner + = this.serviceClient().bulkUploadEncrypted(resourceGroupName, simGroupName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus move(String resourceGroupName, String simGroupName, SimMove parameters) { + AsyncOperationStatusInner inner = this.serviceClient().move(resourceGroupName, simGroupName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus move(String resourceGroupName, String simGroupName, SimMove parameters, + Context context) { + AsyncOperationStatusInner inner + = this.serviceClient().move(resourceGroupName, simGroupName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus clone(String resourceGroupName, String simGroupName, SimClone parameters) { + AsyncOperationStatusInner inner = this.serviceClient().clone(resourceGroupName, simGroupName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus clone(String resourceGroupName, String simGroupName, SimClone parameters, + Context context) { + AsyncOperationStatusInner inner + = this.serviceClient().clone(resourceGroupName, simGroupName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Sim getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String simGroupName = ResourceManagerUtils.getValueFromIdByName(id, "simGroups"); + if (simGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simGroups'.", id))); + } + String simName = ResourceManagerUtils.getValueFromIdByName(id, "sims"); + if (simName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sims'.", id))); + } + return this.getWithResponse(resourceGroupName, simGroupName, simName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String simGroupName = ResourceManagerUtils.getValueFromIdByName(id, "simGroups"); + if (simGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simGroups'.", id))); + } + String simName = ResourceManagerUtils.getValueFromIdByName(id, "sims"); + if (simName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sims'.", id))); + } + return this.getWithResponse(resourceGroupName, simGroupName, simName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String simGroupName = ResourceManagerUtils.getValueFromIdByName(id, "simGroups"); + if (simGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simGroups'.", id))); + } + String simName = ResourceManagerUtils.getValueFromIdByName(id, "sims"); + if (simName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sims'.", id))); + } + this.delete(resourceGroupName, simGroupName, simName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String simGroupName = ResourceManagerUtils.getValueFromIdByName(id, "simGroups"); + if (simGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simGroups'.", id))); + } + String simName = ResourceManagerUtils.getValueFromIdByName(id, "sims"); + if (simName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sims'.", id))); + } + this.delete(resourceGroupName, simGroupName, simName, context); + } + + private SimsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public SimImpl define(String name) { + return new SimImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SiteImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SiteImpl.java new file mode 100644 index 000000000000..75a165923bd8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SiteImpl.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SubResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.Site; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class SiteImpl implements Site, Site.Definition, Site.Update { + private SiteInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List networkFunctions() { + List inner = this.innerModel().networkFunctions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SiteInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String mobileNetworkName; + + private String siteName; + + private TagsObject updateParameters; + + public SiteImpl withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName) { + this.resourceGroupName = resourceGroupName; + this.mobileNetworkName = mobileNetworkName; + return this; + } + + public Site create() { + this.innerObject = serviceManager.serviceClient() + .getSites() + .createOrUpdate(resourceGroupName, mobileNetworkName, siteName, this.innerModel(), Context.NONE); + return this; + } + + public Site create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSites() + .createOrUpdate(resourceGroupName, mobileNetworkName, siteName, this.innerModel(), context); + return this; + } + + SiteImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new SiteInner(); + this.serviceManager = serviceManager; + this.siteName = name; + } + + public SiteImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public Site apply() { + this.innerObject = serviceManager.serviceClient() + .getSites() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, siteName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public Site apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSites() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, siteName, updateParameters, context) + .getValue(); + return this; + } + + SiteImpl(SiteInner innerObject, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "mobileNetworks"); + this.siteName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "sites"); + } + + public Site refresh() { + this.innerObject = serviceManager.serviceClient() + .getSites() + .getWithResponse(resourceGroupName, mobileNetworkName, siteName, Context.NONE) + .getValue(); + return this; + } + + public Site refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSites() + .getWithResponse(resourceGroupName, mobileNetworkName, siteName, context) + .getValue(); + return this; + } + + public void deletePacketCore(SiteDeletePacketCore parameters) { + serviceManager.sites().deletePacketCore(resourceGroupName, mobileNetworkName, siteName, parameters); + } + + public void deletePacketCore(SiteDeletePacketCore parameters, Context context) { + serviceManager.sites().deletePacketCore(resourceGroupName, mobileNetworkName, siteName, parameters, context); + } + + public SiteImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SiteImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SiteImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesClientImpl.java new file mode 100644 index 000000000000..b406841b9819 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesClientImpl.java @@ -0,0 +1,1364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.SitesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; +import com.azure.resourcemanager.mobilenetwork.models.SiteListResult; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SitesClient. + */ +public final class SitesClientImpl implements SitesClient { + /** + * The proxy service used to perform REST calls. + */ + private final SitesService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of SitesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SitesClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(SitesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientSites to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface SitesService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("siteName") String siteName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("siteName") String siteName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("siteName") String siteName, + @BodyParam("application/json") SiteInner parameters, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("siteName") String siteName, + @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetwork(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}/deletePacketCore") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deletePacketCore(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("siteName") String siteName, + @BodyParam("application/json") SiteDeletePacketCore parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String siteName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, siteName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String siteName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, siteName, accept, context); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String siteName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, siteName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String siteName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String siteName) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, siteName).getSyncPoller(); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String siteName, Context context) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, siteName, context).getSyncPoller(); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String siteName) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, siteName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String siteName, + Context context) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, siteName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String siteName) { + deleteAsync(resourceGroupName, mobileNetworkName, siteName).block(); + } + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String siteName, Context context) { + deleteAsync(resourceGroupName, mobileNetworkName, siteName, context).block(); + } + + /** + * Gets information about the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String siteName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, siteName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String siteName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, siteName, accept, context); + } + + /** + * Gets information about the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String mobileNetworkName, String siteName) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, siteName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, String siteName, + Context context) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, context).block(); + } + + /** + * Gets information about the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner get(String resourceGroupName, String mobileNetworkName, String siteName) { + return getWithResponse(resourceGroupName, mobileNetworkName, siteName, Context.NONE).getValue(); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String siteName, SiteInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, siteName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String siteName, SiteInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, siteName, parameters, accept, context); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of site resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteInner> beginCreateOrUpdateAsync(String resourceGroupName, + String mobileNetworkName, String siteName, SiteInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), SiteInner.class, + SiteInner.class, this.client.getContext()); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of site resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteInner> beginCreateOrUpdateAsync(String resourceGroupName, + String mobileNetworkName, String siteName, SiteInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), SiteInner.class, + SiteInner.class, context); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of site resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String siteName, SiteInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of site resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String siteName, SiteInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, String siteName, + SiteInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, String siteName, + SiteInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String siteName, + SiteInner parameters) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters).block(); + } + + /** + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to the create or update mobile network site operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String siteName, + SiteInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context).block(); + } + + /** + * Updates site tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to update network site tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String siteName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, siteName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates site tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to update network site tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String siteName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, siteName, parameters, accept, context); + } + + /** + * Updates site tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to update network site tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String mobileNetworkName, String siteName, + TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates site tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to update network site tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + String siteName, TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context).block(); + } + + /** + * Updates site tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to update network site tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner updateTags(String resourceGroupName, String mobileNetworkName, String siteName, + TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, mobileNetworkName, siteName, parameters, Context.NONE) + .getValue(); + } + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByMobileNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, mobileNetworkName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByMobileNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, mobileNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink)); + } + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName, context), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName)); + } + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName, context)); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePacketCoreWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String siteName, SiteDeletePacketCore parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deletePacketCore(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, siteName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePacketCoreWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String siteName, SiteDeletePacketCore parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deletePacketCore(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, siteName, parameters, accept, context); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeletePacketCoreAsync(String resourceGroupName, + String mobileNetworkName, String siteName, SiteDeletePacketCore parameters) { + Mono>> mono + = deletePacketCoreWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeletePacketCoreAsync(String resourceGroupName, + String mobileNetworkName, String siteName, SiteDeletePacketCore parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deletePacketCoreWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeletePacketCore(String resourceGroupName, String mobileNetworkName, + String siteName, SiteDeletePacketCore parameters) { + return this.beginDeletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters) + .getSyncPoller(); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeletePacketCore(String resourceGroupName, String mobileNetworkName, + String siteName, SiteDeletePacketCore parameters, Context context) { + return this.beginDeletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context) + .getSyncPoller(); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePacketCoreAsync(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters) { + return beginDeletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePacketCoreAsync(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters, Context context) { + return beginDeletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePacketCore(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters) { + deletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters).block(); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePacketCore(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters, Context context) { + deletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesImpl.java new file mode 100644 index 000000000000..92d4e473daa8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesImpl.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.SitesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import com.azure.resourcemanager.mobilenetwork.models.Site; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; +import com.azure.resourcemanager.mobilenetwork.models.Sites; + +public final class SitesImpl implements Sites { + private static final ClientLogger LOGGER = new ClientLogger(SitesImpl.class); + + private final SitesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public SitesImpl(SitesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String mobileNetworkName, String siteName) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, siteName); + } + + public void delete(String resourceGroupName, String mobileNetworkName, String siteName, Context context) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, siteName, context); + } + + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, String siteName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, mobileNetworkName, siteName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SiteImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Site get(String resourceGroupName, String mobileNetworkName, String siteName) { + SiteInner inner = this.serviceClient().get(resourceGroupName, mobileNetworkName, siteName); + if (inner != null) { + return new SiteImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + PagedIterable inner = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + PagedIterable inner + = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public void deletePacketCore(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters) { + this.serviceClient().deletePacketCore(resourceGroupName, mobileNetworkName, siteName, parameters); + } + + public void deletePacketCore(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters, Context context) { + this.serviceClient().deletePacketCore(resourceGroupName, mobileNetworkName, siteName, parameters, context); + } + + public Site getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String siteName = ResourceManagerUtils.getValueFromIdByName(id, "sites"); + if (siteName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, siteName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String siteName = ResourceManagerUtils.getValueFromIdByName(id, "sites"); + if (siteName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, siteName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String siteName = ResourceManagerUtils.getValueFromIdByName(id, "sites"); + if (siteName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, siteName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String siteName = ResourceManagerUtils.getValueFromIdByName(id, "sites"); + if (siteName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, siteName, context); + } + + private SitesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public SiteImpl define(String name) { + return new SiteImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SliceImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SliceImpl.java new file mode 100644 index 000000000000..d3ba4553cdd7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SliceImpl.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.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SliceInner; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.azure.resourcemanager.mobilenetwork.models.Slice; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.util.Collections; +import java.util.Map; + +public final class SliceImpl implements Slice, Slice.Definition, Slice.Update { + private SliceInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Snssai snssai() { + return this.innerModel().snssai(); + } + + public String description() { + return this.innerModel().description(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SliceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String mobileNetworkName; + + private String sliceName; + + private TagsObject updateParameters; + + public SliceImpl withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName) { + this.resourceGroupName = resourceGroupName; + this.mobileNetworkName = mobileNetworkName; + return this; + } + + public Slice create() { + this.innerObject = serviceManager.serviceClient() + .getSlices() + .createOrUpdate(resourceGroupName, mobileNetworkName, sliceName, this.innerModel(), Context.NONE); + return this; + } + + public Slice create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSlices() + .createOrUpdate(resourceGroupName, mobileNetworkName, sliceName, this.innerModel(), context); + return this; + } + + SliceImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new SliceInner(); + this.serviceManager = serviceManager; + this.sliceName = name; + } + + public SliceImpl update() { + this.updateParameters = new TagsObject(); + return this; + } + + public Slice apply() { + this.innerObject = serviceManager.serviceClient() + .getSlices() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, sliceName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public Slice apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSlices() + .updateTagsWithResponse(resourceGroupName, mobileNetworkName, sliceName, updateParameters, context) + .getValue(); + return this; + } + + SliceImpl(SliceInner innerObject, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "mobileNetworks"); + this.sliceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "slices"); + } + + public Slice refresh() { + this.innerObject = serviceManager.serviceClient() + .getSlices() + .getWithResponse(resourceGroupName, mobileNetworkName, sliceName, Context.NONE) + .getValue(); + return this; + } + + public Slice refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSlices() + .getWithResponse(resourceGroupName, mobileNetworkName, sliceName, context) + .getValue(); + return this; + } + + public SliceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SliceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SliceImpl withSnssai(Snssai snssai) { + this.innerModel().withSnssai(snssai); + return this; + } + + public SliceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public SliceImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesClientImpl.java new file mode 100644 index 000000000000..d021ccfa9374 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesClientImpl.java @@ -0,0 +1,1094 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.SlicesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SliceInner; +import com.azure.resourcemanager.mobilenetwork.models.SliceListResult; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SlicesClient. + */ +public final class SlicesClientImpl implements SlicesClient { + /** + * The proxy service used to perform REST calls. + */ + private final SlicesService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of SlicesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SlicesClientImpl(MobileNetworkManagementClientImpl client) { + this.service = RestProxy.create(SlicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientSlices to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface SlicesService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("sliceName") String sliceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("sliceName") String sliceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("sliceName") String sliceName, + @BodyParam("application/json") SliceInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, @PathParam("sliceName") String sliceName, + @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetwork(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("mobileNetworkName") String mobileNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByMobileNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String sliceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (sliceName == null) { + return Mono.error(new IllegalArgumentException("Parameter sliceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, sliceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String sliceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (sliceName == null) { + return Mono.error(new IllegalArgumentException("Parameter sliceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, sliceName, accept, context); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String sliceName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, sliceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String mobileNetworkName, + String sliceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, mobileNetworkName, sliceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String sliceName) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, sliceName).getSyncPoller(); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName, + String sliceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, sliceName, context).getSyncPoller(); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String sliceName) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, sliceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String mobileNetworkName, String sliceName, + Context context) { + return beginDeleteAsync(resourceGroupName, mobileNetworkName, sliceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String sliceName) { + deleteAsync(resourceGroupName, mobileNetworkName, sliceName).block(); + } + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String mobileNetworkName, String sliceName, Context context) { + deleteAsync(resourceGroupName, mobileNetworkName, sliceName, context).block(); + } + + /** + * Gets information about the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String sliceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (sliceName == null) { + return Mono.error(new IllegalArgumentException("Parameter sliceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, sliceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String sliceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (sliceName == null) { + return Mono.error(new IllegalArgumentException("Parameter sliceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, sliceName, accept, context); + } + + /** + * Gets information about the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String mobileNetworkName, String sliceName) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, sliceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, String sliceName, + Context context) { + return getWithResponseAsync(resourceGroupName, mobileNetworkName, sliceName, context).block(); + } + + /** + * Gets information about the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SliceInner get(String resourceGroupName, String mobileNetworkName, String sliceName) { + return getWithResponse(resourceGroupName, mobileNetworkName, sliceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String sliceName, SliceInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (sliceName == null) { + return Mono.error(new IllegalArgumentException("Parameter sliceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, sliceName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String mobileNetworkName, String sliceName, SliceInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (sliceName == null) { + return Mono.error(new IllegalArgumentException("Parameter sliceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, sliceName, parameters, accept, context); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of network slice resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SliceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String mobileNetworkName, String sliceName, SliceInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, sliceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), SliceInner.class, + SliceInner.class, this.client.getContext()); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of network slice resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SliceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String mobileNetworkName, String sliceName, SliceInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, mobileNetworkName, sliceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), SliceInner.class, + SliceInner.class, context); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of network slice resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SliceInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String sliceName, SliceInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of network slice resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SliceInner> beginCreateOrUpdate(String resourceGroupName, + String mobileNetworkName, String sliceName, SliceInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, String sliceName, + SliceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String mobileNetworkName, String sliceName, + SliceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SliceInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String sliceName, + SliceInner parameters) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters).block(); + } + + /** + * Creates or updates a network slice. Must be created in the same location as its parent mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SliceInner createOrUpdate(String resourceGroupName, String mobileNetworkName, String sliceName, + SliceInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters, context).block(); + } + + /** + * Updates slice tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to update network slice tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String sliceName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (sliceName == null) { + return Mono.error(new IllegalArgumentException("Parameter sliceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), mobileNetworkName, sliceName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates slice tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to update network slice tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, String mobileNetworkName, + String sliceName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (sliceName == null) { + return Mono.error(new IllegalArgumentException("Parameter sliceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), mobileNetworkName, sliceName, parameters, accept, context); + } + + /** + * Updates slice tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to update network slice tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateTagsAsync(String resourceGroupName, String mobileNetworkName, String sliceName, + TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, sliceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates slice tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to update network slice tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String mobileNetworkName, + String sliceName, TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, mobileNetworkName, sliceName, parameters, context) + .block(); + } + + /** + * Updates slice tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to update network slice tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network slice resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SliceInner updateTags(String resourceGroupName, String mobileNetworkName, String sliceName, + TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, mobileNetworkName, sliceName, parameters, Context.NONE) + .getValue(); + } + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByMobileNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, mobileNetworkName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkSinglePageAsync(String resourceGroupName, + String mobileNetworkName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByMobileNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, mobileNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink)); + } + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByMobileNetworkAsync(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedFlux<>(() -> listByMobileNetworkSinglePageAsync(resourceGroupName, mobileNetworkName, context), + nextLink -> listByMobileNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName)); + } + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByMobileNetworkNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByMobileNetworkNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesImpl.java new file mode 100644 index 000000000000..a20bc4a8eba4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.SlicesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SliceInner; +import com.azure.resourcemanager.mobilenetwork.models.Slice; +import com.azure.resourcemanager.mobilenetwork.models.Slices; + +public final class SlicesImpl implements Slices { + private static final ClientLogger LOGGER = new ClientLogger(SlicesImpl.class); + + private final SlicesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public SlicesImpl(SlicesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String mobileNetworkName, String sliceName) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, sliceName); + } + + public void delete(String resourceGroupName, String mobileNetworkName, String sliceName, Context context) { + this.serviceClient().delete(resourceGroupName, mobileNetworkName, sliceName, context); + } + + public Response getWithResponse(String resourceGroupName, String mobileNetworkName, String sliceName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, mobileNetworkName, sliceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SliceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Slice get(String resourceGroupName, String mobileNetworkName, String sliceName) { + SliceInner inner = this.serviceClient().get(resourceGroupName, mobileNetworkName, sliceName); + if (inner != null) { + return new SliceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName) { + PagedIterable inner + = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SliceImpl(inner1, this.manager())); + } + + public PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, + Context context) { + PagedIterable inner + = this.serviceClient().listByMobileNetwork(resourceGroupName, mobileNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SliceImpl(inner1, this.manager())); + } + + public Slice getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String sliceName = ResourceManagerUtils.getValueFromIdByName(id, "slices"); + if (sliceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slices'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, sliceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String sliceName = ResourceManagerUtils.getValueFromIdByName(id, "slices"); + if (sliceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slices'.", id))); + } + return this.getWithResponse(resourceGroupName, mobileNetworkName, sliceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String sliceName = ResourceManagerUtils.getValueFromIdByName(id, "slices"); + if (sliceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slices'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, sliceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String mobileNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "mobileNetworks"); + if (mobileNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'mobileNetworks'.", id))); + } + String sliceName = ResourceManagerUtils.getValueFromIdByName(id, "slices"); + if (sliceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slices'.", id))); + } + this.delete(resourceGroupName, mobileNetworkName, sliceName, context); + } + + private SlicesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public SliceImpl define(String name) { + return new SliceImpl(name, this.manager()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInfoImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInfoImpl.java new file mode 100644 index 000000000000..ec6db49c2366 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInfoImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.UeInfoInner; +import com.azure.resourcemanager.mobilenetwork.models.UeInfo; +import com.azure.resourcemanager.mobilenetwork.models.UeInfoPropertiesFormat; + +public final class UeInfoImpl implements UeInfo { + private UeInfoInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + UeInfoImpl(UeInfoInner innerObject, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public UeInfoPropertiesFormat properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public UeInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInformationsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInformationsClientImpl.java new file mode 100644 index 000000000000..443e85722fb6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInformationsClientImpl.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.mobilenetwork.fluent.UeInformationsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.UeInfoInner; +import com.azure.resourcemanager.mobilenetwork.models.UeInfoList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in UeInformationsClient. + */ +public final class UeInformationsClientImpl implements UeInformationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final UeInformationsService service; + + /** + * The service client containing this operation class. + */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of UeInformationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UeInformationsClientImpl(MobileNetworkManagementClientImpl client) { + this.service + = RestProxy.create(UeInformationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientUeInformations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface UeInformationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/ues") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, packetCoreControlPlaneName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono.error( + new IllegalArgumentException("Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + packetCoreControlPlaneName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String packetCoreControlPlaneName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, packetCoreControlPlaneName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, packetCoreControlPlaneName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName) { + return new PagedIterable<>(listAsync(resourceGroupName, packetCoreControlPlaneName)); + } + + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, packetCoreControlPlaneName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInformationsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInformationsImpl.java new file mode 100644 index 000000000000..f6c04d167477 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/UeInformationsImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.UeInformationsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.UeInfoInner; +import com.azure.resourcemanager.mobilenetwork.models.UeInfo; +import com.azure.resourcemanager.mobilenetwork.models.UeInformations; + +public final class UeInformationsImpl implements UeInformations { + private static final ClientLogger LOGGER = new ClientLogger(UeInformationsImpl.class); + + private final UeInformationsClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public UeInformationsImpl(UeInformationsClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, packetCoreControlPlaneName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UeInfoImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, packetCoreControlPlaneName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UeInfoImpl(inner1, this.manager())); + } + + private UeInformationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/package-info.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/package-info.java new file mode 100644 index 000000000000..6a06af8b7f84 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for MobileNetworkManagementClient. + * The resources in this API specification will be used to manage attached data network resources in mobile network + * attached to a particular packet core instance. + */ +package com.azure.resourcemanager.mobilenetwork.implementation; diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ambr.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ambr.java new file mode 100644 index 000000000000..efb256e3b400 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ambr.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Aggregate maximum bit rate. + */ +@Fluent +public final class Ambr implements JsonSerializable { + /* + * Uplink bit rate. + */ + private String uplink; + + /* + * Downlink bit rate. + */ + private String downlink; + + /** + * Creates an instance of Ambr class. + */ + public Ambr() { + } + + /** + * Get the uplink property: Uplink bit rate. + * + * @return the uplink value. + */ + public String uplink() { + return this.uplink; + } + + /** + * Set the uplink property: Uplink bit rate. + * + * @param uplink the uplink value to set. + * @return the Ambr object itself. + */ + public Ambr withUplink(String uplink) { + this.uplink = uplink; + return this; + } + + /** + * Get the downlink property: Downlink bit rate. + * + * @return the downlink value. + */ + public String downlink() { + return this.downlink; + } + + /** + * Set the downlink property: Downlink bit rate. + * + * @param downlink the downlink value to set. + * @return the Ambr object itself. + */ + public Ambr withDownlink(String downlink) { + this.downlink = downlink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (uplink() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property uplink in model Ambr")); + } + if (downlink() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property downlink in model Ambr")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Ambr.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uplink", this.uplink); + jsonWriter.writeStringField("downlink", this.downlink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Ambr from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Ambr if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Ambr. + */ + public static Ambr fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Ambr deserializedAmbr = new Ambr(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uplink".equals(fieldName)) { + deserializedAmbr.uplink = reader.getString(); + } else if ("downlink".equals(fieldName)) { + deserializedAmbr.downlink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAmbr; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AmfId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AmfId.java new file mode 100644 index 000000000000..e802af14d9eb --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AmfId.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * AMF identifier. + */ +@Fluent +public final class AmfId implements JsonSerializable { + /* + * AMF region identifier + */ + private int regionId; + + /* + * AMF set identifier + */ + private int setId; + + /* + * AMF pointer + */ + private int pointer; + + /** + * Creates an instance of AmfId class. + */ + public AmfId() { + } + + /** + * Get the regionId property: AMF region identifier. + * + * @return the regionId value. + */ + public int regionId() { + return this.regionId; + } + + /** + * Set the regionId property: AMF region identifier. + * + * @param regionId the regionId value to set. + * @return the AmfId object itself. + */ + public AmfId withRegionId(int regionId) { + this.regionId = regionId; + return this; + } + + /** + * Get the setId property: AMF set identifier. + * + * @return the setId value. + */ + public int setId() { + return this.setId; + } + + /** + * Set the setId property: AMF set identifier. + * + * @param setId the setId value to set. + * @return the AmfId object itself. + */ + public AmfId withSetId(int setId) { + this.setId = setId; + return this; + } + + /** + * Get the pointer property: AMF pointer. + * + * @return the pointer value. + */ + public int pointer() { + return this.pointer; + } + + /** + * Set the pointer property: AMF pointer. + * + * @param pointer the pointer value to set. + * @return the AmfId object itself. + */ + public AmfId withPointer(int pointer) { + this.pointer = pointer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("regionId", this.regionId); + jsonWriter.writeIntField("setId", this.setId); + jsonWriter.writeIntField("pointer", this.pointer); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AmfId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AmfId if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AmfId. + */ + public static AmfId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AmfId deserializedAmfId = new AmfId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("regionId".equals(fieldName)) { + deserializedAmfId.regionId = reader.getInt(); + } else if ("setId".equals(fieldName)) { + deserializedAmfId.setId = reader.getInt(); + } else if ("pointer".equals(fieldName)) { + deserializedAmfId.pointer = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedAmfId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AsyncOperationId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AsyncOperationId.java new file mode 100644 index 000000000000..535507ab9cfd --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AsyncOperationId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to an Azure Async Operation ID. + */ +@Fluent +public final class AsyncOperationId implements JsonSerializable { + /* + * Azure Async Operation ID. + */ + private String id; + + /** + * Creates an instance of AsyncOperationId class. + */ + public AsyncOperationId() { + } + + /** + * Get the id property: Azure Async Operation ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Azure Async Operation ID. + * + * @param id the id value to set. + * @return the AsyncOperationId object itself. + */ + public AsyncOperationId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model AsyncOperationId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AsyncOperationId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AsyncOperationId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AsyncOperationId if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AsyncOperationId. + */ + public static AsyncOperationId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AsyncOperationId deserializedAsyncOperationId = new AsyncOperationId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAsyncOperationId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAsyncOperationId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AsyncOperationStatus.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AsyncOperationStatus.java new file mode 100644 index 000000000000..984ccc042c4d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AsyncOperationStatus.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of AsyncOperationStatus. + */ +public interface AsyncOperationStatus { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: The operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the resourceId property: Fully qualified ID for the resource that this async operation status relates to. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the percentComplete property: Percentage of the operation that is complete. + * + * @return the percentComplete value. + */ + Double percentComplete(); + + /** + * Gets the properties property: Properties returned by the resource provider on a successful operation. + * + * @return the properties value. + */ + Object properties(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner object. + * + * @return the inner object. + */ + AsyncOperationStatusInner innerModel(); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetwork.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetwork.java new file mode 100644 index 000000000000..6d275ab17938 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetwork.java @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of AttachedDataNetwork. + */ +public interface AttachedDataNetwork { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the attached data network resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the userPlaneDataInterface property: The user plane interface on the data network. For 5G networks, this is + * the N6 interface. For 4G networks, this is the SGi interface. + * + * @return the userPlaneDataInterface value. + */ + InterfaceProperties userPlaneDataInterface(); + + /** + * Gets the dnsAddresses property: The DNS servers to signal to UEs to use for this attached data network. This + * configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + * + * @return the dnsAddresses value. + */ + List dnsAddresses(); + + /** + * Gets the naptConfiguration property: The network address and port translation (NAPT) configuration. + * If this is not specified, the attached data network will use a default NAPT configuration with NAPT enabled. + * + * @return the naptConfiguration value. + */ + NaptConfiguration naptConfiguration(); + + /** + * Gets the userEquipmentAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the attached + * data network from which the packet core instance will dynamically assign IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + * You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. If you + * define both, they must be of the same size. + * + * @return the userEquipmentAddressPoolPrefix value. + */ + List userEquipmentAddressPoolPrefix(); + + /** + * Gets the userEquipmentStaticAddressPoolPrefix property: The user equipment (UE) address pool prefixes for the + * attached data network from which the packet core instance will assign static IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. The static IP address + * for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource. + * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. If both + * are defined, they must be of the same size. + * + * @return the userEquipmentStaticAddressPoolPrefix value. + */ + List userEquipmentStaticAddressPoolPrefix(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkInner object. + * + * @return the inner object. + */ + AttachedDataNetworkInner innerModel(); + + /** + * The entirety of the AttachedDataNetwork definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithParentResource, + DefinitionStages.WithUserPlaneDataInterface, DefinitionStages.WithDnsAddresses, DefinitionStages.WithCreate { + } + + /** + * The AttachedDataNetwork definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AttachedDataNetwork definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the AttachedDataNetwork definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the AttachedDataNetwork definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @return the next definition stage. + */ + WithUserPlaneDataInterface withExistingPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName); + } + + /** + * The stage of the AttachedDataNetwork definition allowing to specify userPlaneDataInterface. + */ + interface WithUserPlaneDataInterface { + /** + * Specifies the userPlaneDataInterface property: The user plane interface on the data network. For 5G + * networks, this is the N6 interface. For 4G networks, this is the SGi interface.. + * + * @param userPlaneDataInterface The user plane interface on the data network. For 5G networks, this is the + * N6 interface. For 4G networks, this is the SGi interface. + * @return the next definition stage. + */ + WithDnsAddresses withUserPlaneDataInterface(InterfaceProperties userPlaneDataInterface); + } + + /** + * The stage of the AttachedDataNetwork definition allowing to specify dnsAddresses. + */ + interface WithDnsAddresses { + /** + * Specifies the dnsAddresses property: The DNS servers to signal to UEs to use for this attached data + * network. This configuration is mandatory - if you don't want DNS servers, you must provide an empty + * array.. + * + * @param dnsAddresses The DNS servers to signal to UEs to use for this attached data network. This + * configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + * @return the next definition stage. + */ + WithCreate withDnsAddresses(List dnsAddresses); + } + + /** + * The stage of the AttachedDataNetwork definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithNaptConfiguration, + DefinitionStages.WithUserEquipmentAddressPoolPrefix, + DefinitionStages.WithUserEquipmentStaticAddressPoolPrefix { + /** + * Executes the create request. + * + * @return the created resource. + */ + AttachedDataNetwork create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AttachedDataNetwork create(Context context); + } + + /** + * The stage of the AttachedDataNetwork definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the AttachedDataNetwork definition allowing to specify naptConfiguration. + */ + interface WithNaptConfiguration { + /** + * Specifies the naptConfiguration property: The network address and port translation (NAPT) configuration. + * If this is not specified, the attached data network will use a default NAPT configuration with NAPT + * enabled.. + * + * @param naptConfiguration The network address and port translation (NAPT) configuration. + * If this is not specified, the attached data network will use a default NAPT configuration with NAPT + * enabled. + * @return the next definition stage. + */ + WithCreate withNaptConfiguration(NaptConfiguration naptConfiguration); + } + + /** + * The stage of the AttachedDataNetwork definition allowing to specify userEquipmentAddressPoolPrefix. + */ + interface WithUserEquipmentAddressPoolPrefix { + /** + * Specifies the userEquipmentAddressPoolPrefix property: The user equipment (UE) address pool prefixes for + * the attached data network from which the packet core instance will dynamically assign IP addresses to + * UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + * You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. + * If you define both, they must be of the same size.. + * + * @param userEquipmentAddressPoolPrefix The user equipment (UE) address pool prefixes for the attached data + * network from which the packet core instance will dynamically assign IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + * You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. + * If you define both, they must be of the same size. + * @return the next definition stage. + */ + WithCreate withUserEquipmentAddressPoolPrefix(List userEquipmentAddressPoolPrefix); + } + + /** + * The stage of the AttachedDataNetwork definition allowing to specify userEquipmentStaticAddressPoolPrefix. + */ + interface WithUserEquipmentStaticAddressPoolPrefix { + /** + * Specifies the userEquipmentStaticAddressPoolPrefix property: The user equipment (UE) address pool + * prefixes for the attached data network from which the packet core instance will assign static IP + * addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. The static IP + * address for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource. + * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. + * If both are defined, they must be of the same size.. + * + * @param userEquipmentStaticAddressPoolPrefix The user equipment (UE) address pool prefixes for the + * attached data network from which the packet core instance will assign static IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. The static IP + * address for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource. + * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. + * If both are defined, they must be of the same size. + * @return the next definition stage. + */ + WithCreate withUserEquipmentStaticAddressPoolPrefix(List userEquipmentStaticAddressPoolPrefix); + } + } + + /** + * Begins update for the AttachedDataNetwork resource. + * + * @return the stage of resource update. + */ + AttachedDataNetwork.Update update(); + + /** + * The template for AttachedDataNetwork update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AttachedDataNetwork apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AttachedDataNetwork apply(Context context); + } + + /** + * The AttachedDataNetwork update stages. + */ + interface UpdateStages { + /** + * The stage of the AttachedDataNetwork update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AttachedDataNetwork refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AttachedDataNetwork refresh(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworkListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworkListResult.java new file mode 100644 index 000000000000..13010707050b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworkListResult.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for attached data network API service call. + */ +@Fluent +public final class AttachedDataNetworkListResult implements JsonSerializable { + /* + * A list of data networks in a resource group. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of AttachedDataNetworkListResult class. + */ + public AttachedDataNetworkListResult() { + } + + /** + * Get the value property: A list of data networks in a resource group. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of data networks in a resource group. + * + * @param value the value value to set. + * @return the AttachedDataNetworkListResult object itself. + */ + public AttachedDataNetworkListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AttachedDataNetworkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AttachedDataNetworkListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AttachedDataNetworkListResult. + */ + public static AttachedDataNetworkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AttachedDataNetworkListResult deserializedAttachedDataNetworkListResult + = new AttachedDataNetworkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AttachedDataNetworkInner.fromJson(reader1)); + deserializedAttachedDataNetworkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAttachedDataNetworkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAttachedDataNetworkListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworkResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworkResourceId.java new file mode 100644 index 000000000000..8150d5f2cdcc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworkResourceId.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to an attached data network resource. + */ +@Fluent +public final class AttachedDataNetworkResourceId implements JsonSerializable { + /* + * Attached data network resource ID. + */ + private String id; + + /** + * Creates an instance of AttachedDataNetworkResourceId class. + */ + public AttachedDataNetworkResourceId() { + } + + /** + * Get the id property: Attached data network resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Attached data network resource ID. + * + * @param id the id value to set. + * @return the AttachedDataNetworkResourceId object itself. + */ + public AttachedDataNetworkResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property id in model AttachedDataNetworkResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AttachedDataNetworkResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AttachedDataNetworkResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AttachedDataNetworkResourceId if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AttachedDataNetworkResourceId. + */ + public static AttachedDataNetworkResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AttachedDataNetworkResourceId deserializedAttachedDataNetworkResourceId + = new AttachedDataNetworkResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAttachedDataNetworkResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAttachedDataNetworkResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworks.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworks.java new file mode 100644 index 000000000000..aab7fdd8f804 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AttachedDataNetworks.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of AttachedDataNetworks. + */ +public interface AttachedDataNetworks { + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName); + + /** + * Deletes the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName, Context context); + + /** + * Gets information about the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, String attachedDataNetworkName, Context context); + + /** + * Gets information about the specified attached data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param attachedDataNetworkName The name of the attached data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network. + */ + AttachedDataNetwork get(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + String attachedDataNetworkName); + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName); + + /** + * Gets all the attached data networks associated with a packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the attached data networks associated with a packet core data plane as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByPacketCoreDataPlane(String resourceGroupName, + String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context); + + /** + * Gets information about the specified attached data network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network along with {@link Response}. + */ + AttachedDataNetwork getById(String id); + + /** + * Gets information about the specified attached data network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified attached data network along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified attached data network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified attached data network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AttachedDataNetwork resource. + * + * @param name resource name. + * @return the first stage of the new AttachedDataNetwork definition. + */ + AttachedDataNetwork.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AuthenticationType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AuthenticationType.java new file mode 100644 index 000000000000..c0a32438e41f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AuthenticationType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * How to authenticate users who access local diagnostics APIs. + */ +public final class AuthenticationType extends ExpandableStringEnum { + /** + * Static value AAD for AuthenticationType. + */ + public static final AuthenticationType AAD = fromString("AAD"); + + /** + * Static value Password for AuthenticationType. + */ + public static final AuthenticationType PASSWORD = fromString("Password"); + + /** + * Creates a new instance of AuthenticationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AuthenticationType() { + } + + /** + * Creates or finds a AuthenticationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AuthenticationType. + */ + public static AuthenticationType fromString(String name) { + return fromString(name, AuthenticationType.class); + } + + /** + * Gets known AuthenticationType values. + * + * @return known AuthenticationType values. + */ + public static Collection values() { + return values(AuthenticationType.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AzureStackEdgeDeviceResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AzureStackEdgeDeviceResourceId.java new file mode 100644 index 000000000000..7ca1868724fa --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AzureStackEdgeDeviceResourceId.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to an Azure Stack Edge device resource. + */ +@Fluent +public final class AzureStackEdgeDeviceResourceId implements JsonSerializable { + /* + * Azure Stack Edge device resource ID. + */ + private String id; + + /** + * Creates an instance of AzureStackEdgeDeviceResourceId class. + */ + public AzureStackEdgeDeviceResourceId() { + } + + /** + * Get the id property: Azure Stack Edge device resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Azure Stack Edge device resource ID. + * + * @param id the id value to set. + * @return the AzureStackEdgeDeviceResourceId object itself. + */ + public AzureStackEdgeDeviceResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property id in model AzureStackEdgeDeviceResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AzureStackEdgeDeviceResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureStackEdgeDeviceResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureStackEdgeDeviceResourceId if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AzureStackEdgeDeviceResourceId. + */ + public static AzureStackEdgeDeviceResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureStackEdgeDeviceResourceId deserializedAzureStackEdgeDeviceResourceId + = new AzureStackEdgeDeviceResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAzureStackEdgeDeviceResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureStackEdgeDeviceResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AzureStackHciClusterResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AzureStackHciClusterResourceId.java new file mode 100644 index 000000000000..78e6f93cab1c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AzureStackHciClusterResourceId.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to an Azure Stack HCI cluster resource. + */ +@Fluent +public final class AzureStackHciClusterResourceId implements JsonSerializable { + /* + * Azure Stack HCI cluster resource ID. + */ + private String id; + + /** + * Creates an instance of AzureStackHciClusterResourceId class. + */ + public AzureStackHciClusterResourceId() { + } + + /** + * Get the id property: Azure Stack HCI cluster resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Azure Stack HCI cluster resource ID. + * + * @param id the id value to set. + * @return the AzureStackHciClusterResourceId object itself. + */ + public AzureStackHciClusterResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property id in model AzureStackHciClusterResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AzureStackHciClusterResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureStackHciClusterResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureStackHciClusterResourceId if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AzureStackHciClusterResourceId. + */ + public static AzureStackHciClusterResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureStackHciClusterResourceId deserializedAzureStackHciClusterResourceId + = new AzureStackHciClusterResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAzureStackHciClusterResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureStackHciClusterResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/BillingSku.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/BillingSku.java new file mode 100644 index 000000000000..dad14d307946 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/BillingSku.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The SKU of the packet core control plane resource. The SKU list may change over time when a new SKU gets added or an + * exiting SKU gets removed. + */ +public final class BillingSku extends ExpandableStringEnum { + /** + * Static value G0 for BillingSku. + */ + public static final BillingSku G0 = fromString("G0"); + + /** + * Static value G1 for BillingSku. + */ + public static final BillingSku G1 = fromString("G1"); + + /** + * Static value G2 for BillingSku. + */ + public static final BillingSku G2 = fromString("G2"); + + /** + * Static value G5 for BillingSku. + */ + public static final BillingSku G5 = fromString("G5"); + + /** + * Static value G10 for BillingSku. + */ + public static final BillingSku G10 = fromString("G10"); + + /** + * Creates a new instance of BillingSku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BillingSku() { + } + + /** + * Creates or finds a BillingSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding BillingSku. + */ + public static BillingSku fromString(String name) { + return fromString(name, BillingSku.class); + } + + /** + * Gets known BillingSku values. + * + * @return known BillingSku values. + */ + public static Collection values() { + return values(BillingSku.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioning.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioning.java new file mode 100644 index 000000000000..13a4652cf487 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioning.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Certificate provisioning state. + */ +@Immutable +public final class CertificateProvisioning implements JsonSerializable { + /* + * The certificate's provisioning state + */ + private CertificateProvisioningState state; + + /* + * Reason for certificate provisioning failure. + */ + private String reason; + + /** + * Creates an instance of CertificateProvisioning class. + */ + public CertificateProvisioning() { + } + + /** + * Get the state property: The certificate's provisioning state. + * + * @return the state value. + */ + public CertificateProvisioningState state() { + return this.state; + } + + /** + * Get the reason property: Reason for certificate provisioning failure. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CertificateProvisioning from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CertificateProvisioning if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the CertificateProvisioning. + */ + public static CertificateProvisioning fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CertificateProvisioning deserializedCertificateProvisioning = new CertificateProvisioning(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedCertificateProvisioning.state + = CertificateProvisioningState.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedCertificateProvisioning.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCertificateProvisioning; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioningState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioningState.java new file mode 100644 index 000000000000..ad2e8b916f05 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioningState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The certificate's provisioning state. + */ +public final class CertificateProvisioningState extends ExpandableStringEnum { + /** + * Static value NotProvisioned for CertificateProvisioningState. + */ + public static final CertificateProvisioningState NOT_PROVISIONED = fromString("NotProvisioned"); + + /** + * Static value Provisioned for CertificateProvisioningState. + */ + public static final CertificateProvisioningState PROVISIONED = fromString("Provisioned"); + + /** + * Static value Failed for CertificateProvisioningState. + */ + public static final CertificateProvisioningState FAILED = fromString("Failed"); + + /** + * Creates a new instance of CertificateProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CertificateProvisioningState() { + } + + /** + * Creates or finds a CertificateProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CertificateProvisioningState. + */ + public static CertificateProvisioningState fromString(String name) { + return fromString(name, CertificateProvisioningState.class); + } + + /** + * Gets known CertificateProvisioningState values. + * + * @return known CertificateProvisioningState values. + */ + public static Collection values() { + return values(CertificateProvisioningState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CommonSimPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CommonSimPropertiesFormat.java new file mode 100644 index 000000000000..328fa551f8ab --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CommonSimPropertiesFormat.java @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Common SIM properties. + */ +@Fluent +public class CommonSimPropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the SIM resource. + */ + private ProvisioningState provisioningState; + + /* + * The state of the SIM resource. + */ + private SimState simState; + + /* + * A dictionary of sites to the provisioning state of this SIM on that site. + */ + private Map siteProvisioningState; + + /* + * The international mobile subscriber identity (IMSI) for the SIM. + */ + private String internationalMobileSubscriberIdentity; + + /* + * The integrated circuit card ID (ICCID) for the SIM. + */ + private String integratedCircuitCardIdentifier; + + /* + * An optional free-form text field that can be used to record the device type this SIM is associated with, for + * example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on this value. + */ + private String deviceType; + + /* + * The SIM policy used by this SIM. The SIM policy must be in the same location as the SIM. + */ + private SimPolicyResourceId simPolicy; + + /* + * A list of static IP addresses assigned to this SIM. Each address is assigned at a defined network scope, made up + * of {attached data network, slice}. + */ + private List staticIpConfiguration; + + /* + * The name of the SIM vendor who provided this SIM, if any. + */ + private String vendorName; + + /* + * The public key fingerprint of the SIM vendor who provided this SIM, if any. + */ + private String vendorKeyFingerprint; + + /** + * Creates an instance of CommonSimPropertiesFormat class. + */ + public CommonSimPropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the SIM resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The provisioning state of the SIM resource. + * + * @param provisioningState the provisioningState value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + CommonSimPropertiesFormat withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the simState property: The state of the SIM resource. + * + * @return the simState value. + */ + public SimState simState() { + return this.simState; + } + + /** + * Set the simState property: The state of the SIM resource. + * + * @param simState the simState value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + CommonSimPropertiesFormat withSimState(SimState simState) { + this.simState = simState; + return this; + } + + /** + * Get the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM on that site. + * + * @return the siteProvisioningState value. + */ + public Map siteProvisioningState() { + return this.siteProvisioningState; + } + + /** + * Set the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM on that site. + * + * @param siteProvisioningState the siteProvisioningState value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + CommonSimPropertiesFormat withSiteProvisioningState(Map siteProvisioningState) { + this.siteProvisioningState = siteProvisioningState; + return this; + } + + /** + * Get the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for + * the SIM. + * + * @return the internationalMobileSubscriberIdentity value. + */ + public String internationalMobileSubscriberIdentity() { + return this.internationalMobileSubscriberIdentity; + } + + /** + * Set the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for + * the SIM. + * + * @param internationalMobileSubscriberIdentity the internationalMobileSubscriberIdentity value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + public CommonSimPropertiesFormat + withInternationalMobileSubscriberIdentity(String internationalMobileSubscriberIdentity) { + this.internationalMobileSubscriberIdentity = internationalMobileSubscriberIdentity; + return this; + } + + /** + * Get the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM. + * + * @return the integratedCircuitCardIdentifier value. + */ + public String integratedCircuitCardIdentifier() { + return this.integratedCircuitCardIdentifier; + } + + /** + * Set the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM. + * + * @param integratedCircuitCardIdentifier the integratedCircuitCardIdentifier value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + public CommonSimPropertiesFormat withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier) { + this.integratedCircuitCardIdentifier = integratedCircuitCardIdentifier; + return this; + } + + /** + * Get the deviceType property: An optional free-form text field that can be used to record the device type this SIM + * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on + * this value. + * + * @return the deviceType value. + */ + public String deviceType() { + return this.deviceType; + } + + /** + * Set the deviceType property: An optional free-form text field that can be used to record the device type this SIM + * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on + * this value. + * + * @param deviceType the deviceType value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + public CommonSimPropertiesFormat withDeviceType(String deviceType) { + this.deviceType = deviceType; + return this; + } + + /** + * Get the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the + * SIM. + * + * @return the simPolicy value. + */ + public SimPolicyResourceId simPolicy() { + return this.simPolicy; + } + + /** + * Set the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the + * SIM. + * + * @param simPolicy the simPolicy value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + public CommonSimPropertiesFormat withSimPolicy(SimPolicyResourceId simPolicy) { + this.simPolicy = simPolicy; + return this; + } + + /** + * Get the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is + * assigned at a defined network scope, made up of {attached data network, slice}. + * + * @return the staticIpConfiguration value. + */ + public List staticIpConfiguration() { + return this.staticIpConfiguration; + } + + /** + * Set the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is + * assigned at a defined network scope, made up of {attached data network, slice}. + * + * @param staticIpConfiguration the staticIpConfiguration value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + public CommonSimPropertiesFormat withStaticIpConfiguration(List staticIpConfiguration) { + this.staticIpConfiguration = staticIpConfiguration; + return this; + } + + /** + * Get the vendorName property: The name of the SIM vendor who provided this SIM, if any. + * + * @return the vendorName value. + */ + public String vendorName() { + return this.vendorName; + } + + /** + * Set the vendorName property: The name of the SIM vendor who provided this SIM, if any. + * + * @param vendorName the vendorName value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + CommonSimPropertiesFormat withVendorName(String vendorName) { + this.vendorName = vendorName; + return this; + } + + /** + * Get the vendorKeyFingerprint property: The public key fingerprint of the SIM vendor who provided this SIM, if + * any. + * + * @return the vendorKeyFingerprint value. + */ + public String vendorKeyFingerprint() { + return this.vendorKeyFingerprint; + } + + /** + * Set the vendorKeyFingerprint property: The public key fingerprint of the SIM vendor who provided this SIM, if + * any. + * + * @param vendorKeyFingerprint the vendorKeyFingerprint value to set. + * @return the CommonSimPropertiesFormat object itself. + */ + CommonSimPropertiesFormat withVendorKeyFingerprint(String vendorKeyFingerprint) { + this.vendorKeyFingerprint = vendorKeyFingerprint; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (internationalMobileSubscriberIdentity() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property internationalMobileSubscriberIdentity in model CommonSimPropertiesFormat")); + } + if (simPolicy() != null) { + simPolicy().validate(); + } + if (staticIpConfiguration() != null) { + staticIpConfiguration().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CommonSimPropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("internationalMobileSubscriberIdentity", + this.internationalMobileSubscriberIdentity); + jsonWriter.writeStringField("integratedCircuitCardIdentifier", this.integratedCircuitCardIdentifier); + jsonWriter.writeStringField("deviceType", this.deviceType); + jsonWriter.writeJsonField("simPolicy", this.simPolicy); + jsonWriter.writeArrayField("staticIpConfiguration", this.staticIpConfiguration, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonSimPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonSimPropertiesFormat if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CommonSimPropertiesFormat. + */ + public static CommonSimPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommonSimPropertiesFormat deserializedCommonSimPropertiesFormat = new CommonSimPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("internationalMobileSubscriberIdentity".equals(fieldName)) { + deserializedCommonSimPropertiesFormat.internationalMobileSubscriberIdentity = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedCommonSimPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("simState".equals(fieldName)) { + deserializedCommonSimPropertiesFormat.simState = SimState.fromString(reader.getString()); + } else if ("siteProvisioningState".equals(fieldName)) { + Map siteProvisioningState + = reader.readMap(reader1 -> SiteProvisioningState.fromString(reader1.getString())); + deserializedCommonSimPropertiesFormat.siteProvisioningState = siteProvisioningState; + } else if ("integratedCircuitCardIdentifier".equals(fieldName)) { + deserializedCommonSimPropertiesFormat.integratedCircuitCardIdentifier = reader.getString(); + } else if ("deviceType".equals(fieldName)) { + deserializedCommonSimPropertiesFormat.deviceType = reader.getString(); + } else if ("simPolicy".equals(fieldName)) { + deserializedCommonSimPropertiesFormat.simPolicy = SimPolicyResourceId.fromJson(reader); + } else if ("staticIpConfiguration".equals(fieldName)) { + List staticIpConfiguration + = reader.readArray(reader1 -> SimStaticIpProperties.fromJson(reader1)); + deserializedCommonSimPropertiesFormat.staticIpConfiguration = staticIpConfiguration; + } else if ("vendorName".equals(fieldName)) { + deserializedCommonSimPropertiesFormat.vendorName = reader.getString(); + } else if ("vendorKeyFingerprint".equals(fieldName)) { + deserializedCommonSimPropertiesFormat.vendorKeyFingerprint = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCommonSimPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ConnectedClusterResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ConnectedClusterResourceId.java new file mode 100644 index 000000000000..0e82ef9365f0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ConnectedClusterResourceId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to an Azure Arc custom location resource. + */ +@Fluent +public final class ConnectedClusterResourceId implements JsonSerializable { + /* + * Azure Arc connected cluster resource ID. + */ + private String id; + + /** + * Creates an instance of ConnectedClusterResourceId class. + */ + public ConnectedClusterResourceId() { + } + + /** + * Get the id property: Azure Arc connected cluster resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Azure Arc connected cluster resource ID. + * + * @param id the id value to set. + * @return the ConnectedClusterResourceId object itself. + */ + public ConnectedClusterResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model ConnectedClusterResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ConnectedClusterResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedClusterResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedClusterResourceId if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ConnectedClusterResourceId. + */ + public static ConnectedClusterResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedClusterResourceId deserializedConnectedClusterResourceId = new ConnectedClusterResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedConnectedClusterResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedClusterResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CoreNetworkType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CoreNetworkType.java new file mode 100644 index 000000000000..e7a1deb75323 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CoreNetworkType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +/** + * The core network technology generation (5G core, EPC / 4G core or EPC / 4G + 5G core). + */ +public enum CoreNetworkType { + /** + * Enum value 5GC. + */ + FIVE_GC("5GC"), + + /** + * Enum value EPC. + */ + EPC("EPC"), + + /** + * Enum value EPC + 5GC. + */ + EPC_5GC("EPC + 5GC"); + + /** + * The actual serialized value for a CoreNetworkType instance. + */ + private final String value; + + CoreNetworkType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CoreNetworkType instance. + * + * @param value the serialized value to parse. + * @return the parsed CoreNetworkType object, or null if unable to parse. + */ + public static CoreNetworkType fromString(String value) { + if (value == null) { + return null; + } + CoreNetworkType[] items = CoreNetworkType.values(); + for (CoreNetworkType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CustomLocationResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CustomLocationResourceId.java new file mode 100644 index 000000000000..24de4d0c0664 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CustomLocationResourceId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to an Azure Arc custom location resource. + */ +@Fluent +public final class CustomLocationResourceId implements JsonSerializable { + /* + * Azure Arc custom location resource ID. + */ + private String id; + + /** + * Creates an instance of CustomLocationResourceId class. + */ + public CustomLocationResourceId() { + } + + /** + * Get the id property: Azure Arc custom location resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Azure Arc custom location resource ID. + * + * @param id the id value to set. + * @return the CustomLocationResourceId object itself. + */ + public CustomLocationResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model CustomLocationResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomLocationResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomLocationResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomLocationResourceId if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CustomLocationResourceId. + */ + public static CustomLocationResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomLocationResourceId deserializedCustomLocationResourceId = new CustomLocationResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCustomLocationResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCustomLocationResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetwork.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetwork.java new file mode 100644 index 000000000000..d7b52ef1a35c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetwork.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner; +import java.util.Map; + +/** + * An immutable client-side representation of DataNetwork. + */ +public interface DataNetwork { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the data network resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the description property: An optional description for this data network. + * + * @return the description value. + */ + String description(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner object. + * + * @return the inner object. + */ + DataNetworkInner innerModel(); + + /** + * The entirety of the DataNetwork definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The DataNetwork definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the DataNetwork definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the DataNetwork definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the DataNetwork definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, mobileNetworkName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @return the next definition stage. + */ + WithCreate withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName); + } + + /** + * The stage of the DataNetwork definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithDescription { + /** + * Executes the create request. + * + * @return the created resource. + */ + DataNetwork create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DataNetwork create(Context context); + } + + /** + * The stage of the DataNetwork definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the DataNetwork definition allowing to specify description. + */ + interface WithDescription { + /** + * Specifies the description property: An optional description for this data network.. + * + * @param description An optional description for this data network. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + } + + /** + * Begins update for the DataNetwork resource. + * + * @return the stage of resource update. + */ + DataNetwork.Update update(); + + /** + * The template for DataNetwork update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DataNetwork apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DataNetwork apply(Context context); + } + + /** + * The DataNetwork update stages. + */ + interface UpdateStages { + /** + * The stage of the DataNetwork update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DataNetwork refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DataNetwork refresh(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkConfiguration.java new file mode 100644 index 000000000000..f5b59a403155 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkConfiguration.java @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Settings controlling data network use. + */ +@Fluent +public final class DataNetworkConfiguration implements JsonSerializable { + /* + * A reference to the data network that these settings apply to. The data network must be in the same location as + * the SIM policy. + */ + private DataNetworkResourceId dataNetwork; + + /* + * Aggregate maximum bit rate across all non-GBR QoS flows of a given PDU session. See 3GPP TS23.501 section 5.7.2.6 + * for a full description of the Session-AMBR. + */ + private Ambr sessionAmbr; + + /* + * Default 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a + * flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the + * definition the 5QI values. + */ + private Integer fiveQi; + + /* + * Default QoS Flow allocation and retention priority (ARP) level. Flows with higher priority preempt flows with + * lower priority, if the settings of `preemptionCapability` and `preemptionVulnerability` allow it. 1 is the + * highest level of priority. If this field is not specified then `5qi` is used to derive the ARP value. See 3GPP + * TS23.501 section 5.7.2.2 for a full description of the ARP parameters. + */ + private Integer allocationAndRetentionPriorityLevel; + + /* + * Default QoS Flow preemption capability. The preemption capability of a QoS Flow controls whether it can preempt + * another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP + * parameters. + */ + private PreemptionCapability preemptionCapability; + + /* + * Default QoS Flow preemption vulnerability. The preemption vulnerability of a QoS Flow controls whether it can be + * preempted by a QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of + * the ARP parameters. + */ + private PreemptionVulnerability preemptionVulnerability; + + /* + * The default PDU session type, which is used if the UE does not request a specific session type. + */ + private PduSessionType defaultSessionType; + + /* + * Allowed session types in addition to the default session type. Must not duplicate the default session type. + */ + private List additionalAllowedSessionTypes; + + /* + * List of services that can be used as part of this SIM policy. The list must not contain duplicate items and must + * contain at least one item. The services must be in the same location as the SIM policy. + */ + private List allowedServices; + + /* + * The maximum number of downlink packets to buffer at the user plane for High Latency Communication - Extended + * Buffering. See 3GPP TS29.272 v15.10.0 section 7.3.188 for a full description. This maximum is not guaranteed + * because there is a internal limit on buffered packets across all PDU sessions. + */ + private Integer maximumNumberOfBufferedPackets; + + /** + * Creates an instance of DataNetworkConfiguration class. + */ + public DataNetworkConfiguration() { + } + + /** + * Get the dataNetwork property: A reference to the data network that these settings apply to. The data network must + * be in the same location as the SIM policy. + * + * @return the dataNetwork value. + */ + public DataNetworkResourceId dataNetwork() { + return this.dataNetwork; + } + + /** + * Set the dataNetwork property: A reference to the data network that these settings apply to. The data network must + * be in the same location as the SIM policy. + * + * @param dataNetwork the dataNetwork value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration withDataNetwork(DataNetworkResourceId dataNetwork) { + this.dataNetwork = dataNetwork; + return this; + } + + /** + * Get the sessionAmbr property: Aggregate maximum bit rate across all non-GBR QoS flows of a given PDU session. See + * 3GPP TS23.501 section 5.7.2.6 for a full description of the Session-AMBR. + * + * @return the sessionAmbr value. + */ + public Ambr sessionAmbr() { + return this.sessionAmbr; + } + + /** + * Set the sessionAmbr property: Aggregate maximum bit rate across all non-GBR QoS flows of a given PDU session. See + * 3GPP TS23.501 section 5.7.2.6 for a full description of the Session-AMBR. + * + * @param sessionAmbr the sessionAmbr value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration withSessionAmbr(Ambr sessionAmbr) { + this.sessionAmbr = sessionAmbr; + return this; + } + + /** + * Get the fiveQi property: Default 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding + * treatment to be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI + * parameter, and table 5.7.4-1 for the definition the 5QI values. + * + * @return the fiveQi value. + */ + public Integer fiveQi() { + return this.fiveQi; + } + + /** + * Set the fiveQi property: Default 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding + * treatment to be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI + * parameter, and table 5.7.4-1 for the definition the 5QI values. + * + * @param fiveQi the fiveQi value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration withFiveQi(Integer fiveQi) { + this.fiveQi = fiveQi; + return this; + } + + /** + * Get the allocationAndRetentionPriorityLevel property: Default QoS Flow allocation and retention priority (ARP) + * level. Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` + * and `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then + * `5qi` is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP + * parameters. + * + * @return the allocationAndRetentionPriorityLevel value. + */ + public Integer allocationAndRetentionPriorityLevel() { + return this.allocationAndRetentionPriorityLevel; + } + + /** + * Set the allocationAndRetentionPriorityLevel property: Default QoS Flow allocation and retention priority (ARP) + * level. Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` + * and `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then + * `5qi` is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP + * parameters. + * + * @param allocationAndRetentionPriorityLevel the allocationAndRetentionPriorityLevel value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration + withAllocationAndRetentionPriorityLevel(Integer allocationAndRetentionPriorityLevel) { + this.allocationAndRetentionPriorityLevel = allocationAndRetentionPriorityLevel; + return this; + } + + /** + * Get the preemptionCapability property: Default QoS Flow preemption capability. The preemption capability of a QoS + * Flow controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section + * 5.7.2.2 for a full description of the ARP parameters. + * + * @return the preemptionCapability value. + */ + public PreemptionCapability preemptionCapability() { + return this.preemptionCapability; + } + + /** + * Set the preemptionCapability property: Default QoS Flow preemption capability. The preemption capability of a QoS + * Flow controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section + * 5.7.2.2 for a full description of the ARP parameters. + * + * @param preemptionCapability the preemptionCapability value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration withPreemptionCapability(PreemptionCapability preemptionCapability) { + this.preemptionCapability = preemptionCapability; + return this; + } + + /** + * Get the preemptionVulnerability property: Default QoS Flow preemption vulnerability. The preemption vulnerability + * of a QoS Flow controls whether it can be preempted by a QoS Flow with a higher priority level. See 3GPP TS23.501 + * section 5.7.2.2 for a full description of the ARP parameters. + * + * @return the preemptionVulnerability value. + */ + public PreemptionVulnerability preemptionVulnerability() { + return this.preemptionVulnerability; + } + + /** + * Set the preemptionVulnerability property: Default QoS Flow preemption vulnerability. The preemption vulnerability + * of a QoS Flow controls whether it can be preempted by a QoS Flow with a higher priority level. See 3GPP TS23.501 + * section 5.7.2.2 for a full description of the ARP parameters. + * + * @param preemptionVulnerability the preemptionVulnerability value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration withPreemptionVulnerability(PreemptionVulnerability preemptionVulnerability) { + this.preemptionVulnerability = preemptionVulnerability; + return this; + } + + /** + * Get the defaultSessionType property: The default PDU session type, which is used if the UE does not request a + * specific session type. + * + * @return the defaultSessionType value. + */ + public PduSessionType defaultSessionType() { + return this.defaultSessionType; + } + + /** + * Set the defaultSessionType property: The default PDU session type, which is used if the UE does not request a + * specific session type. + * + * @param defaultSessionType the defaultSessionType value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration withDefaultSessionType(PduSessionType defaultSessionType) { + this.defaultSessionType = defaultSessionType; + return this; + } + + /** + * Get the additionalAllowedSessionTypes property: Allowed session types in addition to the default session type. + * Must not duplicate the default session type. + * + * @return the additionalAllowedSessionTypes value. + */ + public List additionalAllowedSessionTypes() { + return this.additionalAllowedSessionTypes; + } + + /** + * Set the additionalAllowedSessionTypes property: Allowed session types in addition to the default session type. + * Must not duplicate the default session type. + * + * @param additionalAllowedSessionTypes the additionalAllowedSessionTypes value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration + withAdditionalAllowedSessionTypes(List additionalAllowedSessionTypes) { + this.additionalAllowedSessionTypes = additionalAllowedSessionTypes; + return this; + } + + /** + * Get the allowedServices property: List of services that can be used as part of this SIM policy. The list must not + * contain duplicate items and must contain at least one item. The services must be in the same location as the SIM + * policy. + * + * @return the allowedServices value. + */ + public List allowedServices() { + return this.allowedServices; + } + + /** + * Set the allowedServices property: List of services that can be used as part of this SIM policy. The list must not + * contain duplicate items and must contain at least one item. The services must be in the same location as the SIM + * policy. + * + * @param allowedServices the allowedServices value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration withAllowedServices(List allowedServices) { + this.allowedServices = allowedServices; + return this; + } + + /** + * Get the maximumNumberOfBufferedPackets property: The maximum number of downlink packets to buffer at the user + * plane for High Latency Communication - Extended Buffering. See 3GPP TS29.272 v15.10.0 section 7.3.188 for a full + * description. This maximum is not guaranteed because there is a internal limit on buffered packets across all PDU + * sessions. + * + * @return the maximumNumberOfBufferedPackets value. + */ + public Integer maximumNumberOfBufferedPackets() { + return this.maximumNumberOfBufferedPackets; + } + + /** + * Set the maximumNumberOfBufferedPackets property: The maximum number of downlink packets to buffer at the user + * plane for High Latency Communication - Extended Buffering. See 3GPP TS29.272 v15.10.0 section 7.3.188 for a full + * description. This maximum is not guaranteed because there is a internal limit on buffered packets across all PDU + * sessions. + * + * @param maximumNumberOfBufferedPackets the maximumNumberOfBufferedPackets value to set. + * @return the DataNetworkConfiguration object itself. + */ + public DataNetworkConfiguration withMaximumNumberOfBufferedPackets(Integer maximumNumberOfBufferedPackets) { + this.maximumNumberOfBufferedPackets = maximumNumberOfBufferedPackets; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataNetwork() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dataNetwork in model DataNetworkConfiguration")); + } else { + dataNetwork().validate(); + } + if (sessionAmbr() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sessionAmbr in model DataNetworkConfiguration")); + } else { + sessionAmbr().validate(); + } + if (allowedServices() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property allowedServices in model DataNetworkConfiguration")); + } else { + allowedServices().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataNetworkConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("dataNetwork", this.dataNetwork); + jsonWriter.writeJsonField("sessionAmbr", this.sessionAmbr); + jsonWriter.writeArrayField("allowedServices", this.allowedServices, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("5qi", this.fiveQi); + jsonWriter.writeNumberField("allocationAndRetentionPriorityLevel", this.allocationAndRetentionPriorityLevel); + jsonWriter.writeStringField("preemptionCapability", + this.preemptionCapability == null ? null : this.preemptionCapability.toString()); + jsonWriter.writeStringField("preemptionVulnerability", + this.preemptionVulnerability == null ? null : this.preemptionVulnerability.toString()); + jsonWriter.writeStringField("defaultSessionType", + this.defaultSessionType == null ? null : this.defaultSessionType.toString()); + jsonWriter.writeArrayField("additionalAllowedSessionTypes", this.additionalAllowedSessionTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeNumberField("maximumNumberOfBufferedPackets", this.maximumNumberOfBufferedPackets); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataNetworkConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataNetworkConfiguration if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DataNetworkConfiguration. + */ + public static DataNetworkConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataNetworkConfiguration deserializedDataNetworkConfiguration = new DataNetworkConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dataNetwork".equals(fieldName)) { + deserializedDataNetworkConfiguration.dataNetwork = DataNetworkResourceId.fromJson(reader); + } else if ("sessionAmbr".equals(fieldName)) { + deserializedDataNetworkConfiguration.sessionAmbr = Ambr.fromJson(reader); + } else if ("allowedServices".equals(fieldName)) { + List allowedServices + = reader.readArray(reader1 -> ServiceResourceId.fromJson(reader1)); + deserializedDataNetworkConfiguration.allowedServices = allowedServices; + } else if ("5qi".equals(fieldName)) { + deserializedDataNetworkConfiguration.fiveQi = reader.getNullable(JsonReader::getInt); + } else if ("allocationAndRetentionPriorityLevel".equals(fieldName)) { + deserializedDataNetworkConfiguration.allocationAndRetentionPriorityLevel + = reader.getNullable(JsonReader::getInt); + } else if ("preemptionCapability".equals(fieldName)) { + deserializedDataNetworkConfiguration.preemptionCapability + = PreemptionCapability.fromString(reader.getString()); + } else if ("preemptionVulnerability".equals(fieldName)) { + deserializedDataNetworkConfiguration.preemptionVulnerability + = PreemptionVulnerability.fromString(reader.getString()); + } else if ("defaultSessionType".equals(fieldName)) { + deserializedDataNetworkConfiguration.defaultSessionType + = PduSessionType.fromString(reader.getString()); + } else if ("additionalAllowedSessionTypes".equals(fieldName)) { + List additionalAllowedSessionTypes + = reader.readArray(reader1 -> PduSessionType.fromString(reader1.getString())); + deserializedDataNetworkConfiguration.additionalAllowedSessionTypes = additionalAllowedSessionTypes; + } else if ("maximumNumberOfBufferedPackets".equals(fieldName)) { + deserializedDataNetworkConfiguration.maximumNumberOfBufferedPackets + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedDataNetworkConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkListResult.java new file mode 100644 index 000000000000..431727f61fe1 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for data network API service call. + */ +@Fluent +public final class DataNetworkListResult implements JsonSerializable { + /* + * A list of data networks. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of DataNetworkListResult class. + */ + public DataNetworkListResult() { + } + + /** + * Get the value property: A list of data networks. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of data networks. + * + * @param value the value value to set. + * @return the DataNetworkListResult object itself. + */ + public DataNetworkListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataNetworkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataNetworkListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DataNetworkListResult. + */ + public static DataNetworkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataNetworkListResult deserializedDataNetworkListResult = new DataNetworkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> DataNetworkInner.fromJson(reader1)); + deserializedDataNetworkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDataNetworkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDataNetworkListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkResourceId.java new file mode 100644 index 000000000000..e69a96990b30 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkResourceId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a data network resource. + */ +@Fluent +public final class DataNetworkResourceId implements JsonSerializable { + /* + * Data network resource ID. + */ + private String id; + + /** + * Creates an instance of DataNetworkResourceId class. + */ + public DataNetworkResourceId() { + } + + /** + * Get the id property: Data network resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Data network resource ID. + * + * @param id the id value to set. + * @return the DataNetworkResourceId object itself. + */ + public DataNetworkResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model DataNetworkResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataNetworkResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataNetworkResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataNetworkResourceId if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DataNetworkResourceId. + */ + public static DataNetworkResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataNetworkResourceId deserializedDataNetworkResourceId = new DataNetworkResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDataNetworkResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDataNetworkResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworks.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworks.java new file mode 100644 index 000000000000..a8b34be2c268 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworks.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DataNetworks. + */ +public interface DataNetworks { + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String dataNetworkName); + + /** + * Deletes the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String dataNetworkName, Context context); + + /** + * Gets information about the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String mobileNetworkName, String dataNetworkName, + Context context); + + /** + * Gets information about the specified data network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param dataNetworkName The name of the data network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network. + */ + DataNetwork get(String resourceGroupName, String mobileNetworkName, String dataNetworkName); + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Lists all data networks in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for data network API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Gets information about the specified data network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network along with {@link Response}. + */ + DataNetwork getById(String id); + + /** + * Gets information about the specified data network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified data network along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified data network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified data network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DataNetwork resource. + * + * @param name resource name. + * @return the first stage of the new DataNetwork definition. + */ + DataNetwork.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DesiredInstallationState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DesiredInstallationState.java new file mode 100644 index 000000000000..56df478300c6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DesiredInstallationState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The desired installation state of the packet core. + */ +public final class DesiredInstallationState extends ExpandableStringEnum { + /** + * Static value Uninstalled for DesiredInstallationState. + */ + public static final DesiredInstallationState UNINSTALLED = fromString("Uninstalled"); + + /** + * Static value Installed for DesiredInstallationState. + */ + public static final DesiredInstallationState INSTALLED = fromString("Installed"); + + /** + * Creates a new instance of DesiredInstallationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DesiredInstallationState() { + } + + /** + * Creates or finds a DesiredInstallationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DesiredInstallationState. + */ + public static DesiredInstallationState fromString(String name) { + return fromString(name, DesiredInstallationState.class); + } + + /** + * Gets known DesiredInstallationState values. + * + * @return known DesiredInstallationState values. + */ + public static Collection values() { + return values(DesiredInstallationState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackage.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackage.java new file mode 100644 index 000000000000..752a351e70b7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackage.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; + +/** + * An immutable client-side representation of DiagnosticsPackage. + */ +public interface DiagnosticsPackage { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the diagnostics package resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the status property: The status of the diagnostics package collection. + * + * @return the status value. + */ + DiagnosticsPackageStatus status(); + + /** + * Gets the reason property: The reason for the current state of the diagnostics package collection. + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner object. + * + * @return the inner object. + */ + DiagnosticsPackageInner innerModel(); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageListResult.java new file mode 100644 index 000000000000..ec76c3513a8d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageListResult.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for diagnostics package API service call. + */ +@Fluent +public final class DiagnosticsPackageListResult implements JsonSerializable { + /* + * A list of diagnostics packages under a packet core control plane. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of DiagnosticsPackageListResult class. + */ + public DiagnosticsPackageListResult() { + } + + /** + * Get the value property: A list of diagnostics packages under a packet core control plane. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of diagnostics packages under a packet core control plane. + * + * @param value the value value to set. + * @return the DiagnosticsPackageListResult object itself. + */ + public DiagnosticsPackageListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiagnosticsPackageListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiagnosticsPackageListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DiagnosticsPackageListResult. + */ + public static DiagnosticsPackageListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiagnosticsPackageListResult deserializedDiagnosticsPackageListResult = new DiagnosticsPackageListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DiagnosticsPackageInner.fromJson(reader1)); + deserializedDiagnosticsPackageListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDiagnosticsPackageListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiagnosticsPackageListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageStatus.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageStatus.java new file mode 100644 index 000000000000..94d3f082eeda --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageStatus.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of the diagnostics package collection. + */ +public final class DiagnosticsPackageStatus extends ExpandableStringEnum { + /** + * Static value NotStarted for DiagnosticsPackageStatus. + */ + public static final DiagnosticsPackageStatus NOT_STARTED = fromString("NotStarted"); + + /** + * Static value Collecting for DiagnosticsPackageStatus. + */ + public static final DiagnosticsPackageStatus COLLECTING = fromString("Collecting"); + + /** + * Static value Collected for DiagnosticsPackageStatus. + */ + public static final DiagnosticsPackageStatus COLLECTED = fromString("Collected"); + + /** + * Static value Error for DiagnosticsPackageStatus. + */ + public static final DiagnosticsPackageStatus ERROR = fromString("Error"); + + /** + * Creates a new instance of DiagnosticsPackageStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiagnosticsPackageStatus() { + } + + /** + * Creates or finds a DiagnosticsPackageStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiagnosticsPackageStatus. + */ + public static DiagnosticsPackageStatus fromString(String name) { + return fromString(name, DiagnosticsPackageStatus.class); + } + + /** + * Gets known DiagnosticsPackageStatus values. + * + * @return known DiagnosticsPackageStatus values. + */ + public static Collection values() { + return values(DiagnosticsPackageStatus.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackages.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackages.java new file mode 100644 index 000000000000..cec9bb571af5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackages.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DiagnosticsPackages. + */ +public interface DiagnosticsPackages { + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource. + */ + DiagnosticsPackage createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName); + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return diagnostics package resource. + */ + DiagnosticsPackage createOrUpdate(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context); + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified diagnostics package along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String diagnosticsPackageName, Context context); + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified diagnostics package. + */ + DiagnosticsPackage get(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, + Context context); + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName); + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsUploadConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsUploadConfiguration.java new file mode 100644 index 000000000000..5c93116c0308 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsUploadConfiguration.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Configuration for uploading packet core diagnostics. + */ +@Fluent +public final class DiagnosticsUploadConfiguration implements JsonSerializable { + /* + * The Storage Account Container URL to upload diagnostics to. + */ + private String storageAccountContainerUrl; + + /** + * Creates an instance of DiagnosticsUploadConfiguration class. + */ + public DiagnosticsUploadConfiguration() { + } + + /** + * Get the storageAccountContainerUrl property: The Storage Account Container URL to upload diagnostics to. + * + * @return the storageAccountContainerUrl value. + */ + public String storageAccountContainerUrl() { + return this.storageAccountContainerUrl; + } + + /** + * Set the storageAccountContainerUrl property: The Storage Account Container URL to upload diagnostics to. + * + * @param storageAccountContainerUrl the storageAccountContainerUrl value to set. + * @return the DiagnosticsUploadConfiguration object itself. + */ + public DiagnosticsUploadConfiguration withStorageAccountContainerUrl(String storageAccountContainerUrl) { + this.storageAccountContainerUrl = storageAccountContainerUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccountContainerUrl() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageAccountContainerUrl in model DiagnosticsUploadConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsUploadConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountContainerUrl", this.storageAccountContainerUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiagnosticsUploadConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiagnosticsUploadConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DiagnosticsUploadConfiguration. + */ + public static DiagnosticsUploadConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiagnosticsUploadConfiguration deserializedDiagnosticsUploadConfiguration + = new DiagnosticsUploadConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountContainerUrl".equals(fieldName)) { + deserializedDiagnosticsUploadConfiguration.storageAccountContainerUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiagnosticsUploadConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DnnIpPair.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DnnIpPair.java new file mode 100644 index 000000000000..d910f811b3f4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DnnIpPair.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * DNN and UE IP address. + */ +@Fluent +public final class DnnIpPair implements JsonSerializable { + /* + * Data network name + */ + private String dnn; + + /* + * UE IP address + */ + private UeIpAddress ueIpAddress; + + /** + * Creates an instance of DnnIpPair class. + */ + public DnnIpPair() { + } + + /** + * Get the dnn property: Data network name. + * + * @return the dnn value. + */ + public String dnn() { + return this.dnn; + } + + /** + * Set the dnn property: Data network name. + * + * @param dnn the dnn value to set. + * @return the DnnIpPair object itself. + */ + public DnnIpPair withDnn(String dnn) { + this.dnn = dnn; + return this; + } + + /** + * Get the ueIpAddress property: UE IP address. + * + * @return the ueIpAddress value. + */ + public UeIpAddress ueIpAddress() { + return this.ueIpAddress; + } + + /** + * Set the ueIpAddress property: UE IP address. + * + * @param ueIpAddress the ueIpAddress value to set. + * @return the DnnIpPair object itself. + */ + public DnnIpPair withUeIpAddress(UeIpAddress ueIpAddress) { + this.ueIpAddress = ueIpAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ueIpAddress() != null) { + ueIpAddress().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dnn", this.dnn); + jsonWriter.writeJsonField("ueIpAddress", this.ueIpAddress); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DnnIpPair from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DnnIpPair if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the DnnIpPair. + */ + public static DnnIpPair fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DnnIpPair deserializedDnnIpPair = new DnnIpPair(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dnn".equals(fieldName)) { + deserializedDnnIpPair.dnn = reader.getString(); + } else if ("ueIpAddress".equals(fieldName)) { + deserializedDnnIpPair.ueIpAddress = UeIpAddress.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDnnIpPair; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/EncryptedSimUploadList.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/EncryptedSimUploadList.java new file mode 100644 index 000000000000..b7001461bb22 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/EncryptedSimUploadList.java @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SIMs to upload. The SIM credentials must be encrypted. + */ +@Fluent +public final class EncryptedSimUploadList implements JsonSerializable { + /* + * The upload file format version. + */ + private int version; + + /* + * An identifier for the Azure SIM onboarding public key used for encrypted upload. + */ + private int azureKeyIdentifier; + + /* + * The fingerprint of the SIM vendor public key. The private counterpart is used for signing the encrypted transport + * key. + */ + private String vendorKeyFingerprint; + + /* + * The transport key used for encrypting SIM credentials, encrypted using the SIM onboarding public key. + */ + private String encryptedTransportKey; + + /* + * The encrypted transport key, signed using the SIM vendor private key. + */ + private String signedTransportKey; + + /* + * A list of SIMs to upload, with encrypted properties. + */ + private List sims; + + /** + * Creates an instance of EncryptedSimUploadList class. + */ + public EncryptedSimUploadList() { + } + + /** + * Get the version property: The upload file format version. + * + * @return the version value. + */ + public int version() { + return this.version; + } + + /** + * Set the version property: The upload file format version. + * + * @param version the version value to set. + * @return the EncryptedSimUploadList object itself. + */ + public EncryptedSimUploadList withVersion(int version) { + this.version = version; + return this; + } + + /** + * Get the azureKeyIdentifier property: An identifier for the Azure SIM onboarding public key used for encrypted + * upload. + * + * @return the azureKeyIdentifier value. + */ + public int azureKeyIdentifier() { + return this.azureKeyIdentifier; + } + + /** + * Set the azureKeyIdentifier property: An identifier for the Azure SIM onboarding public key used for encrypted + * upload. + * + * @param azureKeyIdentifier the azureKeyIdentifier value to set. + * @return the EncryptedSimUploadList object itself. + */ + public EncryptedSimUploadList withAzureKeyIdentifier(int azureKeyIdentifier) { + this.azureKeyIdentifier = azureKeyIdentifier; + return this; + } + + /** + * Get the vendorKeyFingerprint property: The fingerprint of the SIM vendor public key. The private counterpart is + * used for signing the encrypted transport key. + * + * @return the vendorKeyFingerprint value. + */ + public String vendorKeyFingerprint() { + return this.vendorKeyFingerprint; + } + + /** + * Set the vendorKeyFingerprint property: The fingerprint of the SIM vendor public key. The private counterpart is + * used for signing the encrypted transport key. + * + * @param vendorKeyFingerprint the vendorKeyFingerprint value to set. + * @return the EncryptedSimUploadList object itself. + */ + public EncryptedSimUploadList withVendorKeyFingerprint(String vendorKeyFingerprint) { + this.vendorKeyFingerprint = vendorKeyFingerprint; + return this; + } + + /** + * Get the encryptedTransportKey property: The transport key used for encrypting SIM credentials, encrypted using + * the SIM onboarding public key. + * + * @return the encryptedTransportKey value. + */ + public String encryptedTransportKey() { + return this.encryptedTransportKey; + } + + /** + * Set the encryptedTransportKey property: The transport key used for encrypting SIM credentials, encrypted using + * the SIM onboarding public key. + * + * @param encryptedTransportKey the encryptedTransportKey value to set. + * @return the EncryptedSimUploadList object itself. + */ + public EncryptedSimUploadList withEncryptedTransportKey(String encryptedTransportKey) { + this.encryptedTransportKey = encryptedTransportKey; + return this; + } + + /** + * Get the signedTransportKey property: The encrypted transport key, signed using the SIM vendor private key. + * + * @return the signedTransportKey value. + */ + public String signedTransportKey() { + return this.signedTransportKey; + } + + /** + * Set the signedTransportKey property: The encrypted transport key, signed using the SIM vendor private key. + * + * @param signedTransportKey the signedTransportKey value to set. + * @return the EncryptedSimUploadList object itself. + */ + public EncryptedSimUploadList withSignedTransportKey(String signedTransportKey) { + this.signedTransportKey = signedTransportKey; + return this; + } + + /** + * Get the sims property: A list of SIMs to upload, with encrypted properties. + * + * @return the sims value. + */ + public List sims() { + return this.sims; + } + + /** + * Set the sims property: A list of SIMs to upload, with encrypted properties. + * + * @param sims the sims value to set. + * @return the EncryptedSimUploadList object itself. + */ + public EncryptedSimUploadList withSims(List sims) { + this.sims = sims; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vendorKeyFingerprint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property vendorKeyFingerprint in model EncryptedSimUploadList")); + } + if (encryptedTransportKey() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property encryptedTransportKey in model EncryptedSimUploadList")); + } + if (signedTransportKey() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property signedTransportKey in model EncryptedSimUploadList")); + } + if (sims() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sims in model EncryptedSimUploadList")); + } else { + sims().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EncryptedSimUploadList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("version", this.version); + jsonWriter.writeIntField("azureKeyIdentifier", this.azureKeyIdentifier); + jsonWriter.writeStringField("vendorKeyFingerprint", this.vendorKeyFingerprint); + jsonWriter.writeStringField("encryptedTransportKey", this.encryptedTransportKey); + jsonWriter.writeStringField("signedTransportKey", this.signedTransportKey); + jsonWriter.writeArrayField("sims", this.sims, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptedSimUploadList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptedSimUploadList if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EncryptedSimUploadList. + */ + public static EncryptedSimUploadList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptedSimUploadList deserializedEncryptedSimUploadList = new EncryptedSimUploadList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("version".equals(fieldName)) { + deserializedEncryptedSimUploadList.version = reader.getInt(); + } else if ("azureKeyIdentifier".equals(fieldName)) { + deserializedEncryptedSimUploadList.azureKeyIdentifier = reader.getInt(); + } else if ("vendorKeyFingerprint".equals(fieldName)) { + deserializedEncryptedSimUploadList.vendorKeyFingerprint = reader.getString(); + } else if ("encryptedTransportKey".equals(fieldName)) { + deserializedEncryptedSimUploadList.encryptedTransportKey = reader.getString(); + } else if ("signedTransportKey".equals(fieldName)) { + deserializedEncryptedSimUploadList.signedTransportKey = reader.getString(); + } else if ("sims".equals(fieldName)) { + List sims + = reader.readArray(reader1 -> SimNameAndEncryptedProperties.fromJson(reader1)); + deserializedEncryptedSimUploadList.sims = sims; + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptedSimUploadList; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/EventHubConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/EventHubConfiguration.java new file mode 100644 index 000000000000..242d8ee7a42b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/EventHubConfiguration.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Configuration for sending packet core events to Azure Event Hub. + */ +@Fluent +public final class EventHubConfiguration implements JsonSerializable { + /* + * Resource ID of Azure Event Hub to send packet core events to. + */ + private String id; + + /* + * The duration (in seconds) between UE usage reports. + */ + private Integer reportingInterval; + + /** + * Creates an instance of EventHubConfiguration class. + */ + public EventHubConfiguration() { + } + + /** + * Get the id property: Resource ID of Azure Event Hub to send packet core events to. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID of Azure Event Hub to send packet core events to. + * + * @param id the id value to set. + * @return the EventHubConfiguration object itself. + */ + public EventHubConfiguration withId(String id) { + this.id = id; + return this; + } + + /** + * Get the reportingInterval property: The duration (in seconds) between UE usage reports. + * + * @return the reportingInterval value. + */ + public Integer reportingInterval() { + return this.reportingInterval; + } + + /** + * Set the reportingInterval property: The duration (in seconds) between UE usage reports. + * + * @param reportingInterval the reportingInterval value to set. + * @return the EventHubConfiguration object itself. + */ + public EventHubConfiguration withReportingInterval(Integer reportingInterval) { + this.reportingInterval = reportingInterval; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model EventHubConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EventHubConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeNumberField("reportingInterval", this.reportingInterval); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EventHubConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EventHubConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EventHubConfiguration. + */ + public static EventHubConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EventHubConfiguration deserializedEventHubConfiguration = new EventHubConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEventHubConfiguration.id = reader.getString(); + } else if ("reportingInterval".equals(fieldName)) { + deserializedEventHubConfiguration.reportingInterval = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedEventHubConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInfo.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInfo.java new file mode 100644 index 000000000000..6ceebe2d700b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInfo.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ExtendedUeInfoInner; + +/** + * An immutable client-side representation of ExtendedUeInfo. + */ +public interface ExtendedUeInfo { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Extended UE Information Properties. + * + * @return the properties value. + */ + ExtendedUeInfoProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.ExtendedUeInfoInner object. + * + * @return the inner object. + */ + ExtendedUeInfoInner innerModel(); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInfoProperties.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInfoProperties.java new file mode 100644 index 000000000000..1aab8cc73cf2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInfoProperties.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Extended UE Information Properties. + */ +@Fluent +public class ExtendedUeInfoProperties implements JsonSerializable { + /* + * RAT Type + */ + private RatType ratType = RatType.fromString("ExtendedUeInfoProperties"); + + /* + * The timestamp of last UE info read from the packet core (UTC). + */ + private OffsetDateTime lastReadAt; + + /** + * Creates an instance of ExtendedUeInfoProperties class. + */ + public ExtendedUeInfoProperties() { + } + + /** + * Get the ratType property: RAT Type. + * + * @return the ratType value. + */ + public RatType ratType() { + return this.ratType; + } + + /** + * Get the lastReadAt property: The timestamp of last UE info read from the packet core (UTC). + * + * @return the lastReadAt value. + */ + public OffsetDateTime lastReadAt() { + return this.lastReadAt; + } + + /** + * Set the lastReadAt property: The timestamp of last UE info read from the packet core (UTC). + * + * @param lastReadAt the lastReadAt value to set. + * @return the ExtendedUeInfoProperties object itself. + */ + public ExtendedUeInfoProperties withLastReadAt(OffsetDateTime lastReadAt) { + this.lastReadAt = lastReadAt; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ratType", this.ratType == null ? null : this.ratType.toString()); + jsonWriter.writeStringField("lastReadAt", + this.lastReadAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastReadAt)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedUeInfoProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedUeInfoProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExtendedUeInfoProperties. + */ + public static ExtendedUeInfoProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("ratType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("5G".equals(discriminatorValue)) { + return UeInfo5G.fromJson(readerToUse.reset()); + } else if ("4G".equals(discriminatorValue)) { + return UeInfo4G.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static ExtendedUeInfoProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedUeInfoProperties deserializedExtendedUeInfoProperties = new ExtendedUeInfoProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ratType".equals(fieldName)) { + deserializedExtendedUeInfoProperties.ratType = RatType.fromString(reader.getString()); + } else if ("lastReadAt".equals(fieldName)) { + deserializedExtendedUeInfoProperties.lastReadAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedUeInfoProperties; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInformations.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInformations.java new file mode 100644 index 000000000000..130d01097be5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ExtendedUeInformations.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ExtendedUeInformations. + */ +public interface ExtendedUeInformations { + /** + * Gets extended information about the specified UE from the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param ueId IMSI of a UE. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extended information about the specified UE from the packet core along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, String ueId, + Context context); + + /** + * Gets extended information about the specified UE from the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param ueId IMSI of a UE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extended information about the specified UE from the packet core. + */ + ExtendedUeInfo get(String resourceGroupName, String packetCoreControlPlaneName, String ueId); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/GNbId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/GNbId.java new file mode 100644 index 000000000000..db3dd225b0f5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/GNbId.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * gNodeB identifier. + */ +@Fluent +public final class GNbId implements JsonSerializable { + /* + * The bitLength property. + */ + private Integer bitLength; + + /* + * The gNBValue property. + */ + private String gNBValue; + + /** + * Creates an instance of GNbId class. + */ + public GNbId() { + } + + /** + * Get the bitLength property: The bitLength property. + * + * @return the bitLength value. + */ + public Integer bitLength() { + return this.bitLength; + } + + /** + * Set the bitLength property: The bitLength property. + * + * @param bitLength the bitLength value to set. + * @return the GNbId object itself. + */ + public GNbId withBitLength(Integer bitLength) { + this.bitLength = bitLength; + return this; + } + + /** + * Get the gNBValue property: The gNBValue property. + * + * @return the gNBValue value. + */ + public String gNBValue() { + return this.gNBValue; + } + + /** + * Set the gNBValue property: The gNBValue property. + * + * @param gNBValue the gNBValue value to set. + * @return the GNbId object itself. + */ + public GNbId withGNBValue(String gNBValue) { + this.gNBValue = gNBValue; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("bitLength", this.bitLength); + jsonWriter.writeStringField("gNBValue", this.gNBValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GNbId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GNbId if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the GNbId. + */ + public static GNbId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GNbId deserializedGNbId = new GNbId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bitLength".equals(fieldName)) { + deserializedGNbId.bitLength = reader.getNullable(JsonReader::getInt); + } else if ("gNBValue".equals(fieldName)) { + deserializedGNbId.gNBValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGNbId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/GlobalRanNodeId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/GlobalRanNodeId.java new file mode 100644 index 000000000000..6693d92320b6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/GlobalRanNodeId.java @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Global RAN Node ID. + */ +@Fluent +public final class GlobalRanNodeId implements JsonSerializable { + /* + * PLMN Identifier + */ + private PlmnId plmnId; + + /* + * gNodeB identifier + */ + private GNbId gNbId; + + /* + * NG-eNodeB identifier + */ + private String ngeNbId; + + /* + * eNodeB identifier + */ + private String eNbId; + + /* + * N3 IWF identifier + */ + private String n3IwfId; + + /* + * W-AGF identifier + */ + private String wagfId; + + /* + * TNGF identifier + */ + private String tngfId; + + /* + * Network identifier + */ + private String nid; + + /** + * Creates an instance of GlobalRanNodeId class. + */ + public GlobalRanNodeId() { + } + + /** + * Get the plmnId property: PLMN Identifier. + * + * @return the plmnId value. + */ + public PlmnId plmnId() { + return this.plmnId; + } + + /** + * Set the plmnId property: PLMN Identifier. + * + * @param plmnId the plmnId value to set. + * @return the GlobalRanNodeId object itself. + */ + public GlobalRanNodeId withPlmnId(PlmnId plmnId) { + this.plmnId = plmnId; + return this; + } + + /** + * Get the gNbId property: gNodeB identifier. + * + * @return the gNbId value. + */ + public GNbId gNbId() { + return this.gNbId; + } + + /** + * Set the gNbId property: gNodeB identifier. + * + * @param gNbId the gNbId value to set. + * @return the GlobalRanNodeId object itself. + */ + public GlobalRanNodeId withGNbId(GNbId gNbId) { + this.gNbId = gNbId; + return this; + } + + /** + * Get the ngeNbId property: NG-eNodeB identifier. + * + * @return the ngeNbId value. + */ + public String ngeNbId() { + return this.ngeNbId; + } + + /** + * Set the ngeNbId property: NG-eNodeB identifier. + * + * @param ngeNbId the ngeNbId value to set. + * @return the GlobalRanNodeId object itself. + */ + public GlobalRanNodeId withNgeNbId(String ngeNbId) { + this.ngeNbId = ngeNbId; + return this; + } + + /** + * Get the eNbId property: eNodeB identifier. + * + * @return the eNbId value. + */ + public String eNbId() { + return this.eNbId; + } + + /** + * Set the eNbId property: eNodeB identifier. + * + * @param eNbId the eNbId value to set. + * @return the GlobalRanNodeId object itself. + */ + public GlobalRanNodeId withENbId(String eNbId) { + this.eNbId = eNbId; + return this; + } + + /** + * Get the n3IwfId property: N3 IWF identifier. + * + * @return the n3IwfId value. + */ + public String n3IwfId() { + return this.n3IwfId; + } + + /** + * Set the n3IwfId property: N3 IWF identifier. + * + * @param n3IwfId the n3IwfId value to set. + * @return the GlobalRanNodeId object itself. + */ + public GlobalRanNodeId withN3IwfId(String n3IwfId) { + this.n3IwfId = n3IwfId; + return this; + } + + /** + * Get the wagfId property: W-AGF identifier. + * + * @return the wagfId value. + */ + public String wagfId() { + return this.wagfId; + } + + /** + * Set the wagfId property: W-AGF identifier. + * + * @param wagfId the wagfId value to set. + * @return the GlobalRanNodeId object itself. + */ + public GlobalRanNodeId withWagfId(String wagfId) { + this.wagfId = wagfId; + return this; + } + + /** + * Get the tngfId property: TNGF identifier. + * + * @return the tngfId value. + */ + public String tngfId() { + return this.tngfId; + } + + /** + * Set the tngfId property: TNGF identifier. + * + * @param tngfId the tngfId value to set. + * @return the GlobalRanNodeId object itself. + */ + public GlobalRanNodeId withTngfId(String tngfId) { + this.tngfId = tngfId; + return this; + } + + /** + * Get the nid property: Network identifier. + * + * @return the nid value. + */ + public String nid() { + return this.nid; + } + + /** + * Set the nid property: Network identifier. + * + * @param nid the nid value to set. + * @return the GlobalRanNodeId object itself. + */ + public GlobalRanNodeId withNid(String nid) { + this.nid = nid; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (plmnId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property plmnId in model GlobalRanNodeId")); + } else { + plmnId().validate(); + } + if (gNbId() != null) { + gNbId().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GlobalRanNodeId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("plmnId", this.plmnId); + jsonWriter.writeJsonField("gNbId", this.gNbId); + jsonWriter.writeStringField("ngeNbId", this.ngeNbId); + jsonWriter.writeStringField("eNbId", this.eNbId); + jsonWriter.writeStringField("n3IwfId", this.n3IwfId); + jsonWriter.writeStringField("wagfId", this.wagfId); + jsonWriter.writeStringField("tngfId", this.tngfId); + jsonWriter.writeStringField("nid", this.nid); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalRanNodeId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalRanNodeId if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GlobalRanNodeId. + */ + public static GlobalRanNodeId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalRanNodeId deserializedGlobalRanNodeId = new GlobalRanNodeId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("plmnId".equals(fieldName)) { + deserializedGlobalRanNodeId.plmnId = PlmnId.fromJson(reader); + } else if ("gNbId".equals(fieldName)) { + deserializedGlobalRanNodeId.gNbId = GNbId.fromJson(reader); + } else if ("ngeNbId".equals(fieldName)) { + deserializedGlobalRanNodeId.ngeNbId = reader.getString(); + } else if ("eNbId".equals(fieldName)) { + deserializedGlobalRanNodeId.eNbId = reader.getString(); + } else if ("n3IwfId".equals(fieldName)) { + deserializedGlobalRanNodeId.n3IwfId = reader.getString(); + } else if ("wagfId".equals(fieldName)) { + deserializedGlobalRanNodeId.wagfId = reader.getString(); + } else if ("tngfId".equals(fieldName)) { + deserializedGlobalRanNodeId.tngfId = reader.getString(); + } else if ("nid".equals(fieldName)) { + deserializedGlobalRanNodeId.nid = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalRanNodeId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Guti4G.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Guti4G.java new file mode 100644 index 000000000000..71da3a8bd5fb --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Guti4G.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Globally Unique Temporary Identifier (4G). + */ +@Fluent +public final class Guti4G implements JsonSerializable { + /* + * Public land mobile network (PLMN) ID. This is made up of the mobile country code and mobile network code, as + * defined in https://www.itu.int/rec/T-REC-E.212. The values 001-01 and 001-001 can be used for testing and the + * values 999-99 and 999-999 can be used on internal private networks. + */ + private PlmnId plmn; + + /* + * MME identifier + */ + private MmeId mmeId; + + /* + * MME Temporary Mobile Subscriber Identity + */ + private int mTmsi; + + /** + * Creates an instance of Guti4G class. + */ + public Guti4G() { + } + + /** + * Get the plmn property: Public land mobile network (PLMN) ID. This is made up of the mobile country code and + * mobile network code, as defined in https://www.itu.int/rec/T-REC-E.212. The values 001-01 and 001-001 can be used + * for testing and the values 999-99 and 999-999 can be used on internal private networks. + * + * @return the plmn value. + */ + public PlmnId plmn() { + return this.plmn; + } + + /** + * Set the plmn property: Public land mobile network (PLMN) ID. This is made up of the mobile country code and + * mobile network code, as defined in https://www.itu.int/rec/T-REC-E.212. The values 001-01 and 001-001 can be used + * for testing and the values 999-99 and 999-999 can be used on internal private networks. + * + * @param plmn the plmn value to set. + * @return the Guti4G object itself. + */ + public Guti4G withPlmn(PlmnId plmn) { + this.plmn = plmn; + return this; + } + + /** + * Get the mmeId property: MME identifier. + * + * @return the mmeId value. + */ + public MmeId mmeId() { + return this.mmeId; + } + + /** + * Set the mmeId property: MME identifier. + * + * @param mmeId the mmeId value to set. + * @return the Guti4G object itself. + */ + public Guti4G withMmeId(MmeId mmeId) { + this.mmeId = mmeId; + return this; + } + + /** + * Get the mTmsi property: MME Temporary Mobile Subscriber Identity. + * + * @return the mTmsi value. + */ + public int mTmsi() { + return this.mTmsi; + } + + /** + * Set the mTmsi property: MME Temporary Mobile Subscriber Identity. + * + * @param mTmsi the mTmsi value to set. + * @return the Guti4G object itself. + */ + public Guti4G withMTmsi(int mTmsi) { + this.mTmsi = mTmsi; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (plmn() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property plmn in model Guti4G")); + } else { + plmn().validate(); + } + if (mmeId() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property mmeId in model Guti4G")); + } else { + mmeId().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Guti4G.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("plmn", this.plmn); + jsonWriter.writeJsonField("mmeId", this.mmeId); + jsonWriter.writeIntField("mTmsi", this.mTmsi); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Guti4G from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Guti4G if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Guti4G. + */ + public static Guti4G fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Guti4G deserializedGuti4G = new Guti4G(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("plmn".equals(fieldName)) { + deserializedGuti4G.plmn = PlmnId.fromJson(reader); + } else if ("mmeId".equals(fieldName)) { + deserializedGuti4G.mmeId = MmeId.fromJson(reader); + } else if ("mTmsi".equals(fieldName)) { + deserializedGuti4G.mTmsi = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedGuti4G; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Guti5G.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Guti5G.java new file mode 100644 index 000000000000..1d2e05daffa8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Guti5G.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * 5G GUTI. + */ +@Fluent +public final class Guti5G implements JsonSerializable { + /* + * Public land mobile network (PLMN) ID. This is made up of the mobile country code and mobile network code, as + * defined in https://www.itu.int/rec/T-REC-E.212. The values 001-01 and 001-001 can be used for testing and the + * values 999-99 and 999-999 can be used on internal private networks. + */ + private PlmnId plmn; + + /* + * AMF identifier + */ + private AmfId amfId; + + /* + * 5G Temporary Mobile Subscriber Identity + */ + private int fivegTmsi; + + /** + * Creates an instance of Guti5G class. + */ + public Guti5G() { + } + + /** + * Get the plmn property: Public land mobile network (PLMN) ID. This is made up of the mobile country code and + * mobile network code, as defined in https://www.itu.int/rec/T-REC-E.212. The values 001-01 and 001-001 can be used + * for testing and the values 999-99 and 999-999 can be used on internal private networks. + * + * @return the plmn value. + */ + public PlmnId plmn() { + return this.plmn; + } + + /** + * Set the plmn property: Public land mobile network (PLMN) ID. This is made up of the mobile country code and + * mobile network code, as defined in https://www.itu.int/rec/T-REC-E.212. The values 001-01 and 001-001 can be used + * for testing and the values 999-99 and 999-999 can be used on internal private networks. + * + * @param plmn the plmn value to set. + * @return the Guti5G object itself. + */ + public Guti5G withPlmn(PlmnId plmn) { + this.plmn = plmn; + return this; + } + + /** + * Get the amfId property: AMF identifier. + * + * @return the amfId value. + */ + public AmfId amfId() { + return this.amfId; + } + + /** + * Set the amfId property: AMF identifier. + * + * @param amfId the amfId value to set. + * @return the Guti5G object itself. + */ + public Guti5G withAmfId(AmfId amfId) { + this.amfId = amfId; + return this; + } + + /** + * Get the fivegTmsi property: 5G Temporary Mobile Subscriber Identity. + * + * @return the fivegTmsi value. + */ + public int fivegTmsi() { + return this.fivegTmsi; + } + + /** + * Set the fivegTmsi property: 5G Temporary Mobile Subscriber Identity. + * + * @param fivegTmsi the fivegTmsi value to set. + * @return the Guti5G object itself. + */ + public Guti5G withFivegTmsi(int fivegTmsi) { + this.fivegTmsi = fivegTmsi; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (plmn() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property plmn in model Guti5G")); + } else { + plmn().validate(); + } + if (amfId() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property amfId in model Guti5G")); + } else { + amfId().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Guti5G.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("plmn", this.plmn); + jsonWriter.writeJsonField("amfId", this.amfId); + jsonWriter.writeIntField("fivegTmsi", this.fivegTmsi); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Guti5G from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Guti5G if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Guti5G. + */ + public static Guti5G fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Guti5G deserializedGuti5G = new Guti5G(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("plmn".equals(fieldName)) { + deserializedGuti5G.plmn = PlmnId.fromJson(reader); + } else if ("amfId".equals(fieldName)) { + deserializedGuti5G.amfId = AmfId.fromJson(reader); + } else if ("fivegTmsi".equals(fieldName)) { + deserializedGuti5G.fivegTmsi = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedGuti5G; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPrivateKeysProvisioning.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPrivateKeysProvisioning.java new file mode 100644 index 000000000000..cfb3dd9773f7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPrivateKeysProvisioning.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The HomeNetworkPrivateKeysProvisioning model. + */ +@Immutable +public final class HomeNetworkPrivateKeysProvisioning implements JsonSerializable { + /* + * The provisioning state of the private keys for SUPI concealment. + */ + private HomeNetworkPrivateKeysProvisioningState state; + + /** + * Creates an instance of HomeNetworkPrivateKeysProvisioning class. + */ + public HomeNetworkPrivateKeysProvisioning() { + } + + /** + * Get the state property: The provisioning state of the private keys for SUPI concealment. + * + * @return the state value. + */ + public HomeNetworkPrivateKeysProvisioningState state() { + return this.state; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HomeNetworkPrivateKeysProvisioning from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HomeNetworkPrivateKeysProvisioning if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the HomeNetworkPrivateKeysProvisioning. + */ + public static HomeNetworkPrivateKeysProvisioning fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HomeNetworkPrivateKeysProvisioning deserializedHomeNetworkPrivateKeysProvisioning + = new HomeNetworkPrivateKeysProvisioning(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedHomeNetworkPrivateKeysProvisioning.state + = HomeNetworkPrivateKeysProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedHomeNetworkPrivateKeysProvisioning; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPrivateKeysProvisioningState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPrivateKeysProvisioningState.java new file mode 100644 index 000000000000..15101d6943dc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPrivateKeysProvisioningState.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the private keys for SUPI concealment. + */ +public final class HomeNetworkPrivateKeysProvisioningState + extends ExpandableStringEnum { + /** + * Static value NotProvisioned for HomeNetworkPrivateKeysProvisioningState. + */ + public static final HomeNetworkPrivateKeysProvisioningState NOT_PROVISIONED = fromString("NotProvisioned"); + + /** + * Static value Provisioned for HomeNetworkPrivateKeysProvisioningState. + */ + public static final HomeNetworkPrivateKeysProvisioningState PROVISIONED = fromString("Provisioned"); + + /** + * Static value Failed for HomeNetworkPrivateKeysProvisioningState. + */ + public static final HomeNetworkPrivateKeysProvisioningState FAILED = fromString("Failed"); + + /** + * Creates a new instance of HomeNetworkPrivateKeysProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HomeNetworkPrivateKeysProvisioningState() { + } + + /** + * Creates or finds a HomeNetworkPrivateKeysProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding HomeNetworkPrivateKeysProvisioningState. + */ + public static HomeNetworkPrivateKeysProvisioningState fromString(String name) { + return fromString(name, HomeNetworkPrivateKeysProvisioningState.class); + } + + /** + * Gets known HomeNetworkPrivateKeysProvisioningState values. + * + * @return known HomeNetworkPrivateKeysProvisioningState values. + */ + public static Collection values() { + return values(HomeNetworkPrivateKeysProvisioningState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPublicKey.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPublicKey.java new file mode 100644 index 000000000000..0e3e59b40dd7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HomeNetworkPublicKey.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A key used for SUPI concealment. + */ +@Fluent +public final class HomeNetworkPublicKey implements JsonSerializable { + /* + * The Home Network Public Key Identifier determines which public key was used to generate the SUCI sent to the AMF. + * See TS 23.003 Section 2.2B Section 5. + */ + private int id; + + /* + * The URL of Azure Key Vault secret containing the private key, versioned or unversioned. For example: + * https://contosovault.vault.azure.net/secrets/mySuciPrivateKey/562a4bb76b524a1493a6afe8e536ee78. + */ + private String url; + + /** + * Creates an instance of HomeNetworkPublicKey class. + */ + public HomeNetworkPublicKey() { + } + + /** + * Get the id property: The Home Network Public Key Identifier determines which public key was used to generate the + * SUCI sent to the AMF. See TS 23.003 Section 2.2B Section 5. + * + * @return the id value. + */ + public int id() { + return this.id; + } + + /** + * Set the id property: The Home Network Public Key Identifier determines which public key was used to generate the + * SUCI sent to the AMF. See TS 23.003 Section 2.2B Section 5. + * + * @param id the id value to set. + * @return the HomeNetworkPublicKey object itself. + */ + public HomeNetworkPublicKey withId(int id) { + this.id = id; + return this; + } + + /** + * Get the url property: The URL of Azure Key Vault secret containing the private key, versioned or unversioned. For + * example: https://contosovault.vault.azure.net/secrets/mySuciPrivateKey/562a4bb76b524a1493a6afe8e536ee78. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: The URL of Azure Key Vault secret containing the private key, versioned or unversioned. For + * example: https://contosovault.vault.azure.net/secrets/mySuciPrivateKey/562a4bb76b524a1493a6afe8e536ee78. + * + * @param url the url value to set. + * @return the HomeNetworkPublicKey object itself. + */ + public HomeNetworkPublicKey withUrl(String url) { + this.url = url; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("id", this.id); + jsonWriter.writeStringField("url", this.url); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HomeNetworkPublicKey from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HomeNetworkPublicKey if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the HomeNetworkPublicKey. + */ + public static HomeNetworkPublicKey fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HomeNetworkPublicKey deserializedHomeNetworkPublicKey = new HomeNetworkPublicKey(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedHomeNetworkPublicKey.id = reader.getInt(); + } else if ("url".equals(fieldName)) { + deserializedHomeNetworkPublicKey.url = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHomeNetworkPublicKey; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HttpsServerCertificate.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HttpsServerCertificate.java new file mode 100644 index 000000000000..1298e7b7b9a0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/HttpsServerCertificate.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * HTTPS server certificate configuration. + */ +@Fluent +public final class HttpsServerCertificate implements JsonSerializable { + /* + * The certificate URL, unversioned. For example: https://contosovault.vault.azure.net/certificates/ingress. + */ + private String certificateUrl; + + /* + * The provisioning state of the certificate. + */ + private CertificateProvisioning provisioning; + + /** + * Creates an instance of HttpsServerCertificate class. + */ + public HttpsServerCertificate() { + } + + /** + * Get the certificateUrl property: The certificate URL, unversioned. For example: + * https://contosovault.vault.azure.net/certificates/ingress. + * + * @return the certificateUrl value. + */ + public String certificateUrl() { + return this.certificateUrl; + } + + /** + * Set the certificateUrl property: The certificate URL, unversioned. For example: + * https://contosovault.vault.azure.net/certificates/ingress. + * + * @param certificateUrl the certificateUrl value to set. + * @return the HttpsServerCertificate object itself. + */ + public HttpsServerCertificate withCertificateUrl(String certificateUrl) { + this.certificateUrl = certificateUrl; + return this; + } + + /** + * Get the provisioning property: The provisioning state of the certificate. + * + * @return the provisioning value. + */ + public CertificateProvisioning provisioning() { + return this.provisioning; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (certificateUrl() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property certificateUrl in model HttpsServerCertificate")); + } + if (provisioning() != null) { + provisioning().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HttpsServerCertificate.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("certificateUrl", this.certificateUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HttpsServerCertificate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HttpsServerCertificate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the HttpsServerCertificate. + */ + public static HttpsServerCertificate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HttpsServerCertificate deserializedHttpsServerCertificate = new HttpsServerCertificate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("certificateUrl".equals(fieldName)) { + deserializedHttpsServerCertificate.certificateUrl = reader.getString(); + } else if ("provisioning".equals(fieldName)) { + deserializedHttpsServerCertificate.provisioning = CertificateProvisioning.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedHttpsServerCertificate; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/IdentityAndTagsObject.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/IdentityAndTagsObject.java new file mode 100644 index 000000000000..1f4fe65a155a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/IdentityAndTagsObject.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Identity and Tags object for patch operations. + */ +@Fluent +public final class IdentityAndTagsObject implements JsonSerializable { + /* + * The managed service identity associated with this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of IdentityAndTagsObject class. + */ + public IdentityAndTagsObject() { + } + + /** + * Get the identity property: The managed service identity associated with this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identity associated with this resource. + * + * @param identity the identity value to set. + * @return the IdentityAndTagsObject object itself. + */ + public IdentityAndTagsObject withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the IdentityAndTagsObject object itself. + */ + public IdentityAndTagsObject withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityAndTagsObject from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityAndTagsObject if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IdentityAndTagsObject. + */ + public static IdentityAndTagsObject fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityAndTagsObject deserializedIdentityAndTagsObject = new IdentityAndTagsObject(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedIdentityAndTagsObject.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedIdentityAndTagsObject.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityAndTagsObject; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Installation.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Installation.java new file mode 100644 index 000000000000..9f15fc7f5603 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Installation.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The installation state of the packet core. + */ +@Fluent +public final class Installation implements JsonSerializable { + /* + * The desired installation state + */ + private DesiredInstallationState desiredState; + + /* + * Installation state + */ + private InstallationState state; + + /* + * Whether a reinstall of the packet core is required to pick up the latest configuration changes. + */ + private ReinstallRequired reinstallRequired; + + /* + * Reason(s) for the current installation state of the packet core. + */ + private List reasons; + + /* + * A reference to an in-progress installation operation + */ + private AsyncOperationId operation; + + /** + * Creates an instance of Installation class. + */ + public Installation() { + } + + /** + * Get the desiredState property: The desired installation state. + * + * @return the desiredState value. + */ + public DesiredInstallationState desiredState() { + return this.desiredState; + } + + /** + * Set the desiredState property: The desired installation state. + * + * @param desiredState the desiredState value to set. + * @return the Installation object itself. + */ + public Installation withDesiredState(DesiredInstallationState desiredState) { + this.desiredState = desiredState; + return this; + } + + /** + * Get the state property: Installation state. + * + * @return the state value. + */ + public InstallationState state() { + return this.state; + } + + /** + * Get the reinstallRequired property: Whether a reinstall of the packet core is required to pick up the latest + * configuration changes. + * + * @return the reinstallRequired value. + */ + public ReinstallRequired reinstallRequired() { + return this.reinstallRequired; + } + + /** + * Get the reasons property: Reason(s) for the current installation state of the packet core. + * + * @return the reasons value. + */ + public List reasons() { + return this.reasons; + } + + /** + * Get the operation property: A reference to an in-progress installation operation. + * + * @return the operation value. + */ + public AsyncOperationId operation() { + return this.operation; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (operation() != null) { + operation().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Installation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Installation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the Installation. + */ + public static Installation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Installation deserializedInstallation = new Installation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredState".equals(fieldName)) { + deserializedInstallation.desiredState = DesiredInstallationState.fromString(reader.getString()); + } else if ("state".equals(fieldName)) { + deserializedInstallation.state = InstallationState.fromString(reader.getString()); + } else if ("reinstallRequired".equals(fieldName)) { + deserializedInstallation.reinstallRequired = ReinstallRequired.fromString(reader.getString()); + } else if ("reasons".equals(fieldName)) { + List reasons + = reader.readArray(reader1 -> InstallationReason.fromString(reader1.getString())); + deserializedInstallation.reasons = reasons; + } else if ("operation".equals(fieldName)) { + deserializedInstallation.operation = AsyncOperationId.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInstallation; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationReason.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationReason.java new file mode 100644 index 000000000000..14821604257d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationReason.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The reason or list of reasons why a packet core has not been installed or requires a reinstall. + */ +public final class InstallationReason extends ExpandableStringEnum { + /** + * Static value NoSlices for InstallationReason. + */ + public static final InstallationReason NO_SLICES = fromString("NoSlices"); + + /** + * Static value NoPacketCoreDataPlane for InstallationReason. + */ + public static final InstallationReason NO_PACKET_CORE_DATA_PLANE = fromString("NoPacketCoreDataPlane"); + + /** + * Static value NoAttachedDataNetworks for InstallationReason. + */ + public static final InstallationReason NO_ATTACHED_DATA_NETWORKS = fromString("NoAttachedDataNetworks"); + + /** + * Static value PublicLandMobileNetworkIdentifierHasChanged for InstallationReason. + */ + public static final InstallationReason PUBLIC_LAND_MOBILE_NETWORK_IDENTIFIER_HAS_CHANGED + = fromString("PublicLandMobileNetworkIdentifierHasChanged"); + + /** + * Static value ControlPlaneAccessInterfaceHasChanged for InstallationReason. + */ + public static final InstallationReason CONTROL_PLANE_ACCESS_INTERFACE_HAS_CHANGED + = fromString("ControlPlaneAccessInterfaceHasChanged"); + + /** + * Static value UserPlaneAccessInterfaceHasChanged for InstallationReason. + */ + public static final InstallationReason USER_PLANE_ACCESS_INTERFACE_HAS_CHANGED + = fromString("UserPlaneAccessInterfaceHasChanged"); + + /** + * Static value UserPlaneDataInterfaceHasChanged for InstallationReason. + */ + public static final InstallationReason USER_PLANE_DATA_INTERFACE_HAS_CHANGED + = fromString("UserPlaneDataInterfaceHasChanged"); + + /** + * Static value ControlPlaneAccessVirtualIpv4AddressesHasChanged for InstallationReason. + */ + public static final InstallationReason CONTROL_PLANE_ACCESS_VIRTUAL_IPV4ADDRESSES_HAS_CHANGED + = fromString("ControlPlaneAccessVirtualIpv4AddressesHasChanged"); + + /** + * Static value UserPlaneAccessVirtualIpv4AddressesHasChanged for InstallationReason. + */ + public static final InstallationReason USER_PLANE_ACCESS_VIRTUAL_IPV4ADDRESSES_HAS_CHANGED + = fromString("UserPlaneAccessVirtualIpv4AddressesHasChanged"); + + /** + * Creates a new instance of InstallationReason value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InstallationReason() { + } + + /** + * Creates or finds a InstallationReason from its string representation. + * + * @param name a name to look for. + * @return the corresponding InstallationReason. + */ + public static InstallationReason fromString(String name) { + return fromString(name, InstallationReason.class); + } + + /** + * Gets known InstallationReason values. + * + * @return known InstallationReason values. + */ + public static Collection values() { + return values(InstallationReason.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationState.java new file mode 100644 index 000000000000..8c76dd3ce67a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationState.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The installation state of the packet core. + */ +public final class InstallationState extends ExpandableStringEnum { + /** + * Static value Uninstalled for InstallationState. + */ + public static final InstallationState UNINSTALLED = fromString("Uninstalled"); + + /** + * Static value Installing for InstallationState. + */ + public static final InstallationState INSTALLING = fromString("Installing"); + + /** + * Static value Installed for InstallationState. + */ + public static final InstallationState INSTALLED = fromString("Installed"); + + /** + * Static value Updating for InstallationState. + */ + public static final InstallationState UPDATING = fromString("Updating"); + + /** + * Static value Upgrading for InstallationState. + */ + public static final InstallationState UPGRADING = fromString("Upgrading"); + + /** + * Static value Uninstalling for InstallationState. + */ + public static final InstallationState UNINSTALLING = fromString("Uninstalling"); + + /** + * Static value Reinstalling for InstallationState. + */ + public static final InstallationState REINSTALLING = fromString("Reinstalling"); + + /** + * Static value RollingBack for InstallationState. + */ + public static final InstallationState ROLLING_BACK = fromString("RollingBack"); + + /** + * Static value Failed for InstallationState. + */ + public static final InstallationState FAILED = fromString("Failed"); + + /** + * Creates a new instance of InstallationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InstallationState() { + } + + /** + * Creates or finds a InstallationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding InstallationState. + */ + public static InstallationState fromString(String name) { + return fromString(name, InstallationState.class); + } + + /** + * Gets known InstallationState values. + * + * @return known InstallationState values. + */ + public static Collection values() { + return values(InstallationState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InterfaceProperties.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InterfaceProperties.java new file mode 100644 index 000000000000..24ec1ab5dac7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InterfaceProperties.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Interface properties. + */ +@Fluent +public final class InterfaceProperties implements JsonSerializable { + /* + * The logical name for this interface. This should match one of the interfaces configured on your Azure Stack Edge + * device. + */ + private String name; + + /* + * The IPv4 address. + */ + private String ipv4Address; + + /* + * The IPv4 subnet. + */ + private String ipv4Subnet; + + /* + * The default IPv4 gateway (router). + */ + private String ipv4Gateway; + + /* + * VLAN identifier of the network interface. Example: 501. + */ + private Integer vlanId; + + /* + * The list of IPv4 addresses, for a multi-node system. + */ + private List ipv4AddressList; + + /* + * The IPv4 addresses of the endpoints to send BFD probes to. + */ + private List bfdIpv4Endpoints; + + /** + * Creates an instance of InterfaceProperties class. + */ + public InterfaceProperties() { + } + + /** + * Get the name property: The logical name for this interface. This should match one of the interfaces configured on + * your Azure Stack Edge device. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The logical name for this interface. This should match one of the interfaces configured on + * your Azure Stack Edge device. + * + * @param name the name value to set. + * @return the InterfaceProperties object itself. + */ + public InterfaceProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ipv4Address property: The IPv4 address. + * + * @return the ipv4Address value. + */ + public String ipv4Address() { + return this.ipv4Address; + } + + /** + * Set the ipv4Address property: The IPv4 address. + * + * @param ipv4Address the ipv4Address value to set. + * @return the InterfaceProperties object itself. + */ + public InterfaceProperties withIpv4Address(String ipv4Address) { + this.ipv4Address = ipv4Address; + return this; + } + + /** + * Get the ipv4Subnet property: The IPv4 subnet. + * + * @return the ipv4Subnet value. + */ + public String ipv4Subnet() { + return this.ipv4Subnet; + } + + /** + * Set the ipv4Subnet property: The IPv4 subnet. + * + * @param ipv4Subnet the ipv4Subnet value to set. + * @return the InterfaceProperties object itself. + */ + public InterfaceProperties withIpv4Subnet(String ipv4Subnet) { + this.ipv4Subnet = ipv4Subnet; + return this; + } + + /** + * Get the ipv4Gateway property: The default IPv4 gateway (router). + * + * @return the ipv4Gateway value. + */ + public String ipv4Gateway() { + return this.ipv4Gateway; + } + + /** + * Set the ipv4Gateway property: The default IPv4 gateway (router). + * + * @param ipv4Gateway the ipv4Gateway value to set. + * @return the InterfaceProperties object itself. + */ + public InterfaceProperties withIpv4Gateway(String ipv4Gateway) { + this.ipv4Gateway = ipv4Gateway; + return this; + } + + /** + * Get the vlanId property: VLAN identifier of the network interface. Example: 501. + * + * @return the vlanId value. + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: VLAN identifier of the network interface. Example: 501. + * + * @param vlanId the vlanId value to set. + * @return the InterfaceProperties object itself. + */ + public InterfaceProperties withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the ipv4AddressList property: The list of IPv4 addresses, for a multi-node system. + * + * @return the ipv4AddressList value. + */ + public List ipv4AddressList() { + return this.ipv4AddressList; + } + + /** + * Set the ipv4AddressList property: The list of IPv4 addresses, for a multi-node system. + * + * @param ipv4AddressList the ipv4AddressList value to set. + * @return the InterfaceProperties object itself. + */ + public InterfaceProperties withIpv4AddressList(List ipv4AddressList) { + this.ipv4AddressList = ipv4AddressList; + return this; + } + + /** + * Get the bfdIpv4Endpoints property: The IPv4 addresses of the endpoints to send BFD probes to. + * + * @return the bfdIpv4Endpoints value. + */ + public List bfdIpv4Endpoints() { + return this.bfdIpv4Endpoints; + } + + /** + * Set the bfdIpv4Endpoints property: The IPv4 addresses of the endpoints to send BFD probes to. + * + * @param bfdIpv4Endpoints the bfdIpv4Endpoints value to set. + * @return the InterfaceProperties object itself. + */ + public InterfaceProperties withBfdIpv4Endpoints(List bfdIpv4Endpoints) { + this.bfdIpv4Endpoints = bfdIpv4Endpoints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("ipv4Address", this.ipv4Address); + jsonWriter.writeStringField("ipv4Subnet", this.ipv4Subnet); + jsonWriter.writeStringField("ipv4Gateway", this.ipv4Gateway); + jsonWriter.writeNumberField("vlanId", this.vlanId); + jsonWriter.writeArrayField("ipv4AddressList", this.ipv4AddressList, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("bfdIpv4Endpoints", this.bfdIpv4Endpoints, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InterfaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InterfaceProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the InterfaceProperties. + */ + public static InterfaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InterfaceProperties deserializedInterfaceProperties = new InterfaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedInterfaceProperties.name = reader.getString(); + } else if ("ipv4Address".equals(fieldName)) { + deserializedInterfaceProperties.ipv4Address = reader.getString(); + } else if ("ipv4Subnet".equals(fieldName)) { + deserializedInterfaceProperties.ipv4Subnet = reader.getString(); + } else if ("ipv4Gateway".equals(fieldName)) { + deserializedInterfaceProperties.ipv4Gateway = reader.getString(); + } else if ("vlanId".equals(fieldName)) { + deserializedInterfaceProperties.vlanId = reader.getNullable(JsonReader::getInt); + } else if ("ipv4AddressList".equals(fieldName)) { + List ipv4AddressList = reader.readArray(reader1 -> reader1.getString()); + deserializedInterfaceProperties.ipv4AddressList = ipv4AddressList; + } else if ("bfdIpv4Endpoints".equals(fieldName)) { + List bfdIpv4Endpoints = reader.readArray(reader1 -> reader1.getString()); + deserializedInterfaceProperties.bfdIpv4Endpoints = bfdIpv4Endpoints; + } else { + reader.skipChildren(); + } + } + + return deserializedInterfaceProperties; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ipv4Route.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ipv4Route.java new file mode 100644 index 000000000000..c12a25555a2f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ipv4Route.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * An IPv4 route. + */ +@Fluent +public final class Ipv4Route implements JsonSerializable { + /* + * The destination IPv4 prefix. + */ + private String destination; + + /* + * A list of next hops for the destination. + */ + private List nextHops; + + /** + * Creates an instance of Ipv4Route class. + */ + public Ipv4Route() { + } + + /** + * Get the destination property: The destination IPv4 prefix. + * + * @return the destination value. + */ + public String destination() { + return this.destination; + } + + /** + * Set the destination property: The destination IPv4 prefix. + * + * @param destination the destination value to set. + * @return the Ipv4Route object itself. + */ + public Ipv4Route withDestination(String destination) { + this.destination = destination; + return this; + } + + /** + * Get the nextHops property: A list of next hops for the destination. + * + * @return the nextHops value. + */ + public List nextHops() { + return this.nextHops; + } + + /** + * Set the nextHops property: A list of next hops for the destination. + * + * @param nextHops the nextHops value to set. + * @return the Ipv4Route object itself. + */ + public Ipv4Route withNextHops(List nextHops) { + this.nextHops = nextHops; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nextHops() != null) { + nextHops().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("destination", this.destination); + jsonWriter.writeArrayField("nextHops", this.nextHops, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Ipv4Route from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Ipv4Route if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Ipv4Route. + */ + public static Ipv4Route fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Ipv4Route deserializedIpv4Route = new Ipv4Route(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("destination".equals(fieldName)) { + deserializedIpv4Route.destination = reader.getString(); + } else if ("nextHops".equals(fieldName)) { + List nextHops = reader.readArray(reader1 -> Ipv4RouteNextHop.fromJson(reader1)); + deserializedIpv4Route.nextHops = nextHops; + } else { + reader.skipChildren(); + } + } + + return deserializedIpv4Route; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ipv4RouteNextHop.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ipv4RouteNextHop.java new file mode 100644 index 000000000000..50ee80cf6868 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Ipv4RouteNextHop.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The next hop in an IPv4 route. + */ +@Fluent +public final class Ipv4RouteNextHop implements JsonSerializable { + /* + * The next hop address. + */ + private String address; + + /* + * The priority of this next hop. Next hops with lower preference values are preferred. + */ + private Integer priority; + + /** + * Creates an instance of Ipv4RouteNextHop class. + */ + public Ipv4RouteNextHop() { + } + + /** + * Get the address property: The next hop address. + * + * @return the address value. + */ + public String address() { + return this.address; + } + + /** + * Set the address property: The next hop address. + * + * @param address the address value to set. + * @return the Ipv4RouteNextHop object itself. + */ + public Ipv4RouteNextHop withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the priority property: The priority of this next hop. Next hops with lower preference values are preferred. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority property: The priority of this next hop. Next hops with lower preference values are preferred. + * + * @param priority the priority value to set. + * @return the Ipv4RouteNextHop object itself. + */ + public Ipv4RouteNextHop withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("address", this.address); + jsonWriter.writeNumberField("priority", this.priority); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Ipv4RouteNextHop from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Ipv4RouteNextHop if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the Ipv4RouteNextHop. + */ + public static Ipv4RouteNextHop fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Ipv4RouteNextHop deserializedIpv4RouteNextHop = new Ipv4RouteNextHop(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("address".equals(fieldName)) { + deserializedIpv4RouteNextHop.address = reader.getString(); + } else if ("priority".equals(fieldName)) { + deserializedIpv4RouteNextHop.priority = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedIpv4RouteNextHop; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/KeyVaultKey.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/KeyVaultKey.java new file mode 100644 index 000000000000..38b21ad8618f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/KeyVaultKey.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * An Azure key vault key. + */ +@Fluent +public final class KeyVaultKey implements JsonSerializable { + /* + * The key URL, unversioned. For example: https://contosovault.vault.azure.net/keys/azureKey. + */ + private String keyUrl; + + /** + * Creates an instance of KeyVaultKey class. + */ + public KeyVaultKey() { + } + + /** + * Get the keyUrl property: The key URL, unversioned. For example: + * https://contosovault.vault.azure.net/keys/azureKey. + * + * @return the keyUrl value. + */ + public String keyUrl() { + return this.keyUrl; + } + + /** + * Set the keyUrl property: The key URL, unversioned. For example: + * https://contosovault.vault.azure.net/keys/azureKey. + * + * @param keyUrl the keyUrl value to set. + * @return the KeyVaultKey object itself. + */ + public KeyVaultKey withKeyUrl(String keyUrl) { + this.keyUrl = keyUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyUrl", this.keyUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultKey from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultKey if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the KeyVaultKey. + */ + public static KeyVaultKey fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultKey deserializedKeyVaultKey = new KeyVaultKey(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyUrl".equals(fieldName)) { + deserializedKeyVaultKey.keyUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultKey; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/LocalDiagnosticsAccessConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/LocalDiagnosticsAccessConfiguration.java new file mode 100644 index 000000000000..d31ac26cbe80 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/LocalDiagnosticsAccessConfiguration.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The kubernetes ingress configuration to control access to packet core diagnostics over local APIs. + */ +@Fluent +public final class LocalDiagnosticsAccessConfiguration + implements JsonSerializable { + /* + * How to authenticate users who access local diagnostics APIs. + */ + private AuthenticationType authenticationType; + + /* + * The HTTPS server TLS certificate used to secure local access to diagnostics. + */ + private HttpsServerCertificate httpsServerCertificate; + + /** + * Creates an instance of LocalDiagnosticsAccessConfiguration class. + */ + public LocalDiagnosticsAccessConfiguration() { + } + + /** + * Get the authenticationType property: How to authenticate users who access local diagnostics APIs. + * + * @return the authenticationType value. + */ + public AuthenticationType authenticationType() { + return this.authenticationType; + } + + /** + * Set the authenticationType property: How to authenticate users who access local diagnostics APIs. + * + * @param authenticationType the authenticationType value to set. + * @return the LocalDiagnosticsAccessConfiguration object itself. + */ + public LocalDiagnosticsAccessConfiguration withAuthenticationType(AuthenticationType authenticationType) { + this.authenticationType = authenticationType; + return this; + } + + /** + * Get the httpsServerCertificate property: The HTTPS server TLS certificate used to secure local access to + * diagnostics. + * + * @return the httpsServerCertificate value. + */ + public HttpsServerCertificate httpsServerCertificate() { + return this.httpsServerCertificate; + } + + /** + * Set the httpsServerCertificate property: The HTTPS server TLS certificate used to secure local access to + * diagnostics. + * + * @param httpsServerCertificate the httpsServerCertificate value to set. + * @return the LocalDiagnosticsAccessConfiguration object itself. + */ + public LocalDiagnosticsAccessConfiguration + withHttpsServerCertificate(HttpsServerCertificate httpsServerCertificate) { + this.httpsServerCertificate = httpsServerCertificate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (authenticationType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property authenticationType in model LocalDiagnosticsAccessConfiguration")); + } + if (httpsServerCertificate() != null) { + httpsServerCertificate().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalDiagnosticsAccessConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authenticationType", + this.authenticationType == null ? null : this.authenticationType.toString()); + jsonWriter.writeJsonField("httpsServerCertificate", this.httpsServerCertificate); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalDiagnosticsAccessConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalDiagnosticsAccessConfiguration if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LocalDiagnosticsAccessConfiguration. + */ + public static LocalDiagnosticsAccessConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalDiagnosticsAccessConfiguration deserializedLocalDiagnosticsAccessConfiguration + = new LocalDiagnosticsAccessConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authenticationType".equals(fieldName)) { + deserializedLocalDiagnosticsAccessConfiguration.authenticationType + = AuthenticationType.fromString(reader.getString()); + } else if ("httpsServerCertificate".equals(fieldName)) { + deserializedLocalDiagnosticsAccessConfiguration.httpsServerCertificate + = HttpsServerCertificate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalDiagnosticsAccessConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentity.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentity.java new file mode 100644 index 000000000000..e861053f5aa0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentity.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Managed service identity (User assigned identity). + */ +@Fluent +public final class ManagedServiceIdentity implements JsonSerializable { + /* + * Type of managed service identity (currently only UserAssigned allowed). + */ + private ManagedServiceIdentityType type; + + /* + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will + * be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of ManagedServiceIdentity class. + */ + public ManagedServiceIdentity() { + } + + /** + * Get the type property: Type of managed service identity (currently only UserAssigned allowed). + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: Type of managed service identity (currently only UserAssigned allowed). + * + * @param type the type value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity")); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServiceIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedServiceIdentity. + */ + public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServiceIdentity; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentityType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentityType.java new file mode 100644 index 000000000000..a8cd86b36f73 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentityType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of managed service identity (currently only UserAssigned allowed). + */ +public final class ManagedServiceIdentityType extends ExpandableStringEnum { + /** + * Static value None for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType NONE = fromString("None"); + + /** + * Static value UserAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Creates a new instance of ManagedServiceIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedServiceIdentityType() { + } + + /** + * Creates or finds a ManagedServiceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedServiceIdentityType. + */ + public static ManagedServiceIdentityType fromString(String name) { + return fromString(name, ManagedServiceIdentityType.class); + } + + /** + * Gets known ManagedServiceIdentityType values. + * + * @return known ManagedServiceIdentityType values. + */ + public static Collection values() { + return values(ManagedServiceIdentityType.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MmeId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MmeId.java new file mode 100644 index 000000000000..bf82960e93db --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MmeId.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * MME identifier. + */ +@Fluent +public final class MmeId implements JsonSerializable { + /* + * MME group identifier + */ + private int groupId; + + /* + * MME code + */ + private int code; + + /** + * Creates an instance of MmeId class. + */ + public MmeId() { + } + + /** + * Get the groupId property: MME group identifier. + * + * @return the groupId value. + */ + public int groupId() { + return this.groupId; + } + + /** + * Set the groupId property: MME group identifier. + * + * @param groupId the groupId value to set. + * @return the MmeId object itself. + */ + public MmeId withGroupId(int groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the code property: MME code. + * + * @return the code value. + */ + public int code() { + return this.code; + } + + /** + * Set the code property: MME code. + * + * @param code the code value to set. + * @return the MmeId object itself. + */ + public MmeId withCode(int code) { + this.code = code; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("groupId", this.groupId); + jsonWriter.writeIntField("code", this.code); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MmeId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MmeId if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MmeId. + */ + public static MmeId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MmeId deserializedMmeId = new MmeId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupId".equals(fieldName)) { + deserializedMmeId.groupId = reader.getInt(); + } else if ("code".equals(fieldName)) { + deserializedMmeId.code = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedMmeId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetwork.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetwork.java new file mode 100644 index 000000000000..b4aab1b4fcfa --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetwork.java @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.MobileNetworkInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of MobileNetwork. + */ +public interface MobileNetwork { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the identity property: The identity used to retrieve any private keys used for SUPI concealment from Azure + * key vault. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the mobile network resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the publicLandMobileNetworkIdentifier property: The unique public land mobile network identifier for the + * network. If both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @return the publicLandMobileNetworkIdentifier value. + */ + PlmnId publicLandMobileNetworkIdentifier(); + + /** + * Gets the publicLandMobileNetworks property: A list of public land mobile networks including their identifiers. If + * both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * + * @return the publicLandMobileNetworks value. + */ + List publicLandMobileNetworks(); + + /** + * Gets the serviceKey property: The mobile network resource identifier. + * + * @return the serviceKey value. + */ + String serviceKey(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.MobileNetworkInner object. + * + * @return the inner object. + */ + MobileNetworkInner innerModel(); + + /** + * The entirety of the MobileNetwork definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithPublicLandMobileNetworkIdentifier, DefinitionStages.WithCreate { + } + + /** + * The MobileNetwork definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the MobileNetwork definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the MobileNetwork definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the MobileNetwork definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithPublicLandMobileNetworkIdentifier withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the MobileNetwork definition allowing to specify publicLandMobileNetworkIdentifier. + */ + interface WithPublicLandMobileNetworkIdentifier { + /** + * Specifies the publicLandMobileNetworkIdentifier property: The unique public land mobile network + * identifier for the network. If both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' + * are specified, then the 'publicLandMobileNetworks' will take precedence.. + * + * @param publicLandMobileNetworkIdentifier The unique public land mobile network identifier for the + * network. If both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then + * the 'publicLandMobileNetworks' will take precedence. + * @return the next definition stage. + */ + WithCreate withPublicLandMobileNetworkIdentifier(PlmnId publicLandMobileNetworkIdentifier); + } + + /** + * The stage of the MobileNetwork definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithPublicLandMobileNetworks { + /** + * Executes the create request. + * + * @return the created resource. + */ + MobileNetwork create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + MobileNetwork create(Context context); + } + + /** + * The stage of the MobileNetwork definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the MobileNetwork definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The identity used to retrieve any private keys used for SUPI concealment + * from Azure key vault.. + * + * @param identity The identity used to retrieve any private keys used for SUPI concealment from Azure key + * vault. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the MobileNetwork definition allowing to specify publicLandMobileNetworks. + */ + interface WithPublicLandMobileNetworks { + /** + * Specifies the publicLandMobileNetworks property: A list of public land mobile networks including their + * identifiers. If both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, + * then the 'publicLandMobileNetworks' will take precedence.. + * + * @param publicLandMobileNetworks A list of public land mobile networks including their identifiers. If + * both 'publicLandMobileNetworks' and 'publicLandMobileNetworkIdentifier' are specified, then the + * 'publicLandMobileNetworks' will take precedence. + * @return the next definition stage. + */ + WithCreate withPublicLandMobileNetworks(List publicLandMobileNetworks); + } + } + + /** + * Begins update for the MobileNetwork resource. + * + * @return the stage of resource update. + */ + MobileNetwork.Update update(); + + /** + * The template for MobileNetwork update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { + /** + * Executes the update request. + * + * @return the updated resource. + */ + MobileNetwork apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + MobileNetwork apply(Context context); + } + + /** + * The MobileNetwork update stages. + */ + interface UpdateStages { + /** + * The stage of the MobileNetwork update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the MobileNetwork update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identity associated with this resource.. + * + * @param identity The managed service identity associated with this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + MobileNetwork refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + MobileNetwork refresh(Context context); + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedIterable}. + */ + PagedIterable listSimGroups(); + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedIterable}. + */ + PagedIterable listSimGroups(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworkListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworkListResult.java new file mode 100644 index 000000000000..8546fef68c05 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworkListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.MobileNetworkInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for mobile networks API service call. + */ +@Fluent +public final class MobileNetworkListResult implements JsonSerializable { + /* + * A list of mobile networks in a resource group. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of MobileNetworkListResult class. + */ + public MobileNetworkListResult() { + } + + /** + * Get the value property: A list of mobile networks in a resource group. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of mobile networks in a resource group. + * + * @param value the value value to set. + * @return the MobileNetworkListResult object itself. + */ + public MobileNetworkListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MobileNetworkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MobileNetworkListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MobileNetworkListResult. + */ + public static MobileNetworkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MobileNetworkListResult deserializedMobileNetworkListResult = new MobileNetworkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> MobileNetworkInner.fromJson(reader1)); + deserializedMobileNetworkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMobileNetworkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMobileNetworkListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworkResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworkResourceId.java new file mode 100644 index 000000000000..5762058785ac --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworkResourceId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a mobile network resource. + */ +@Fluent +public final class MobileNetworkResourceId implements JsonSerializable { + /* + * Mobile network resource ID. + */ + private String id; + + /** + * Creates an instance of MobileNetworkResourceId class. + */ + public MobileNetworkResourceId() { + } + + /** + * Get the id property: Mobile network resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Mobile network resource ID. + * + * @param id the id value to set. + * @return the MobileNetworkResourceId object itself. + */ + public MobileNetworkResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model MobileNetworkResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MobileNetworkResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MobileNetworkResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MobileNetworkResourceId if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MobileNetworkResourceId. + */ + public static MobileNetworkResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MobileNetworkResourceId deserializedMobileNetworkResourceId = new MobileNetworkResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMobileNetworkResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMobileNetworkResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworks.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworks.java new file mode 100644 index 000000000000..bdd14b406c7d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/MobileNetworks.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of MobileNetworks. + */ +public interface MobileNetworks { + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String mobileNetworkName); + + /** + * Deletes the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Gets information about the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String mobileNetworkName, + Context context); + + /** + * Gets information about the specified mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network. + */ + MobileNetwork getByResourceGroup(String resourceGroupName, String mobileNetworkName); + + /** + * Lists all the mobile networks in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all the mobile networks in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the mobile networks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for mobile networks API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedIterable}. + */ + PagedIterable listSimGroups(String resourceGroupName, String mobileNetworkName); + + /** + * Gets all the SIM groups assigned to a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups assigned to a mobile network as paginated response with {@link PagedIterable}. + */ + PagedIterable listSimGroups(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Gets information about the specified mobile network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network along with {@link Response}. + */ + MobileNetwork getById(String id); + + /** + * Gets information about the specified mobile network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified mobile network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified mobile network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new MobileNetwork resource. + * + * @param name resource name. + * @return the first stage of the new MobileNetwork definition. + */ + MobileNetwork.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NaptConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NaptConfiguration.java new file mode 100644 index 000000000000..7c6202c7130d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NaptConfiguration.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The network address and port translation settings to use for the attached data network. + */ +@Fluent +public final class NaptConfiguration implements JsonSerializable { + /* + * Whether NAPT is enabled for connections to this attached data network. + */ + private NaptEnabled enabled; + + /* + * Range of port numbers to use as translated ports on each translated address. + * If not specified and NAPT is enabled, this range defaults to 1,024 - 49,999. + * (Ports under 1,024 should not be used because these are special purpose ports reserved by IANA. Ports 50,000 and + * above are reserved for non-NAPT use.) + */ + private PortRange portRange; + + /* + * The minimum time (in seconds) that will pass before a port that was used by a closed pinhole can be recycled for + * use by another pinhole. All hold times must be at least 1 second. + */ + private PortReuseHoldTimes portReuseHoldTime; + + /* + * Maximum number of UDP and TCP pinholes that can be open simultaneously on the core interface. For 5G networks, + * this is the N6 interface. For 4G networks, this is the SGi interface. + */ + private Integer pinholeLimits; + + /* + * Expiry times of inactive NAPT pinholes, in seconds. All timers must be at least 1 second. + */ + private PinholeTimeouts pinholeTimeouts; + + /** + * Creates an instance of NaptConfiguration class. + */ + public NaptConfiguration() { + } + + /** + * Get the enabled property: Whether NAPT is enabled for connections to this attached data network. + * + * @return the enabled value. + */ + public NaptEnabled enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether NAPT is enabled for connections to this attached data network. + * + * @param enabled the enabled value to set. + * @return the NaptConfiguration object itself. + */ + public NaptConfiguration withEnabled(NaptEnabled enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the portRange property: Range of port numbers to use as translated ports on each translated address. + * If not specified and NAPT is enabled, this range defaults to 1,024 - 49,999. + * (Ports under 1,024 should not be used because these are special purpose ports reserved by IANA. Ports 50,000 and + * above are reserved for non-NAPT use.). + * + * @return the portRange value. + */ + public PortRange portRange() { + return this.portRange; + } + + /** + * Set the portRange property: Range of port numbers to use as translated ports on each translated address. + * If not specified and NAPT is enabled, this range defaults to 1,024 - 49,999. + * (Ports under 1,024 should not be used because these are special purpose ports reserved by IANA. Ports 50,000 and + * above are reserved for non-NAPT use.). + * + * @param portRange the portRange value to set. + * @return the NaptConfiguration object itself. + */ + public NaptConfiguration withPortRange(PortRange portRange) { + this.portRange = portRange; + return this; + } + + /** + * Get the portReuseHoldTime property: The minimum time (in seconds) that will pass before a port that was used by a + * closed pinhole can be recycled for use by another pinhole. All hold times must be at least 1 second. + * + * @return the portReuseHoldTime value. + */ + public PortReuseHoldTimes portReuseHoldTime() { + return this.portReuseHoldTime; + } + + /** + * Set the portReuseHoldTime property: The minimum time (in seconds) that will pass before a port that was used by a + * closed pinhole can be recycled for use by another pinhole. All hold times must be at least 1 second. + * + * @param portReuseHoldTime the portReuseHoldTime value to set. + * @return the NaptConfiguration object itself. + */ + public NaptConfiguration withPortReuseHoldTime(PortReuseHoldTimes portReuseHoldTime) { + this.portReuseHoldTime = portReuseHoldTime; + return this; + } + + /** + * Get the pinholeLimits property: Maximum number of UDP and TCP pinholes that can be open simultaneously on the + * core interface. For 5G networks, this is the N6 interface. For 4G networks, this is the SGi interface. + * + * @return the pinholeLimits value. + */ + public Integer pinholeLimits() { + return this.pinholeLimits; + } + + /** + * Set the pinholeLimits property: Maximum number of UDP and TCP pinholes that can be open simultaneously on the + * core interface. For 5G networks, this is the N6 interface. For 4G networks, this is the SGi interface. + * + * @param pinholeLimits the pinholeLimits value to set. + * @return the NaptConfiguration object itself. + */ + public NaptConfiguration withPinholeLimits(Integer pinholeLimits) { + this.pinholeLimits = pinholeLimits; + return this; + } + + /** + * Get the pinholeTimeouts property: Expiry times of inactive NAPT pinholes, in seconds. All timers must be at least + * 1 second. + * + * @return the pinholeTimeouts value. + */ + public PinholeTimeouts pinholeTimeouts() { + return this.pinholeTimeouts; + } + + /** + * Set the pinholeTimeouts property: Expiry times of inactive NAPT pinholes, in seconds. All timers must be at least + * 1 second. + * + * @param pinholeTimeouts the pinholeTimeouts value to set. + * @return the NaptConfiguration object itself. + */ + public NaptConfiguration withPinholeTimeouts(PinholeTimeouts pinholeTimeouts) { + this.pinholeTimeouts = pinholeTimeouts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (portRange() != null) { + portRange().validate(); + } + if (portReuseHoldTime() != null) { + portReuseHoldTime().validate(); + } + if (pinholeTimeouts() != null) { + pinholeTimeouts().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enabled", this.enabled == null ? null : this.enabled.toString()); + jsonWriter.writeJsonField("portRange", this.portRange); + jsonWriter.writeJsonField("portReuseHoldTime", this.portReuseHoldTime); + jsonWriter.writeNumberField("pinholeLimits", this.pinholeLimits); + jsonWriter.writeJsonField("pinholeTimeouts", this.pinholeTimeouts); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NaptConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NaptConfiguration if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NaptConfiguration. + */ + public static NaptConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NaptConfiguration deserializedNaptConfiguration = new NaptConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedNaptConfiguration.enabled = NaptEnabled.fromString(reader.getString()); + } else if ("portRange".equals(fieldName)) { + deserializedNaptConfiguration.portRange = PortRange.fromJson(reader); + } else if ("portReuseHoldTime".equals(fieldName)) { + deserializedNaptConfiguration.portReuseHoldTime = PortReuseHoldTimes.fromJson(reader); + } else if ("pinholeLimits".equals(fieldName)) { + deserializedNaptConfiguration.pinholeLimits = reader.getNullable(JsonReader::getInt); + } else if ("pinholeTimeouts".equals(fieldName)) { + deserializedNaptConfiguration.pinholeTimeouts = PinholeTimeouts.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNaptConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NaptEnabled.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NaptEnabled.java new file mode 100644 index 000000000000..498a676481ad --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NaptEnabled.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether network address and port translation is enabled. + */ +public final class NaptEnabled extends ExpandableStringEnum { + /** + * Static value Enabled for NaptEnabled. + */ + public static final NaptEnabled ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for NaptEnabled. + */ + public static final NaptEnabled DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of NaptEnabled value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NaptEnabled() { + } + + /** + * Creates or finds a NaptEnabled from its string representation. + * + * @param name a name to look for. + * @return the corresponding NaptEnabled. + */ + public static NaptEnabled fromString(String name) { + return fromString(name, NaptEnabled.class); + } + + /** + * Gets known NaptEnabled values. + * + * @return known NaptEnabled values. + */ + public static Collection values() { + return values(NaptEnabled.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NasEncryptionType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NasEncryptionType.java new file mode 100644 index 000000000000..afe17bcf5b90 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NasEncryptionType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The supported NAS Encryption types. + */ +public final class NasEncryptionType extends ExpandableStringEnum { + /** + * Static value NEA0/EEA0 for NasEncryptionType. + */ + public static final NasEncryptionType NEA0_EEA0 = fromString("NEA0/EEA0"); + + /** + * Static value NEA1/EEA1 for NasEncryptionType. + */ + public static final NasEncryptionType NEA1_EEA1 = fromString("NEA1/EEA1"); + + /** + * Static value NEA2/EEA2 for NasEncryptionType. + */ + public static final NasEncryptionType NEA2_EEA2 = fromString("NEA2/EEA2"); + + /** + * Creates a new instance of NasEncryptionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NasEncryptionType() { + } + + /** + * Creates or finds a NasEncryptionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NasEncryptionType. + */ + public static NasEncryptionType fromString(String name) { + return fromString(name, NasEncryptionType.class); + } + + /** + * Gets known NasEncryptionType values. + * + * @return known NasEncryptionType values. + */ + public static Collection values() { + return values(NasEncryptionType.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NasRerouteConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NasRerouteConfiguration.java new file mode 100644 index 000000000000..31f6a123ddf6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/NasRerouteConfiguration.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Configuration enabling NAS reroute. + */ +@Fluent +public final class NasRerouteConfiguration implements JsonSerializable { + /* + * The macro network's MME group ID. This is where unknown UEs are sent to via NAS reroute. + */ + private int macroMmeGroupId; + + /** + * Creates an instance of NasRerouteConfiguration class. + */ + public NasRerouteConfiguration() { + } + + /** + * Get the macroMmeGroupId property: The macro network's MME group ID. This is where unknown UEs are sent to via NAS + * reroute. + * + * @return the macroMmeGroupId value. + */ + public int macroMmeGroupId() { + return this.macroMmeGroupId; + } + + /** + * Set the macroMmeGroupId property: The macro network's MME group ID. This is where unknown UEs are sent to via NAS + * reroute. + * + * @param macroMmeGroupId the macroMmeGroupId value to set. + * @return the NasRerouteConfiguration object itself. + */ + public NasRerouteConfiguration withMacroMmeGroupId(int macroMmeGroupId) { + this.macroMmeGroupId = macroMmeGroupId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("macroMmeGroupId", this.macroMmeGroupId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NasRerouteConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NasRerouteConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NasRerouteConfiguration. + */ + public static NasRerouteConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NasRerouteConfiguration deserializedNasRerouteConfiguration = new NasRerouteConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("macroMmeGroupId".equals(fieldName)) { + deserializedNasRerouteConfiguration.macroMmeGroupId = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedNasRerouteConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ObsoleteVersion.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ObsoleteVersion.java new file mode 100644 index 000000000000..53da1710d06c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ObsoleteVersion.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates whether this version is obsolete. + */ +public final class ObsoleteVersion extends ExpandableStringEnum { + /** + * Static value Obsolete for ObsoleteVersion. + */ + public static final ObsoleteVersion OBSOLETE = fromString("Obsolete"); + + /** + * Static value NotObsolete for ObsoleteVersion. + */ + public static final ObsoleteVersion NOT_OBSOLETE = fromString("NotObsolete"); + + /** + * Creates a new instance of ObsoleteVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ObsoleteVersion() { + } + + /** + * Creates or finds a ObsoleteVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding ObsoleteVersion. + */ + public static ObsoleteVersion fromString(String name) { + return fromString(name, ObsoleteVersion.class); + } + + /** + * Gets known ObsoleteVersion values. + * + * @return known ObsoleteVersion values. + */ + public static Collection values() { + return values(ObsoleteVersion.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Operation.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Operation.java new file mode 100644 index 000000000000..2fc4cd91e1d5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Operation.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.resourcemanager.mobilenetwork.fluent.models.OperationInner; + +/** + * An immutable client-side representation of Operation. + */ +public interface Operation { + /** + * Gets the isDataAction property: Indicates whether the operation applies to data-plane. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the name property: Operation name: {provider}/{resource}/{operation}. + * + * @return the name value. + */ + String name(); + + /** + * Gets the display property: The object that represents the operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/OperationDisplay.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/OperationDisplay.java new file mode 100644 index 000000000000..990c54d9645e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/OperationDisplay.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The object that represents the operation. + */ +@Fluent +public final class OperationDisplay implements JsonSerializable { + /* + * Service provider: Microsoft.MobileNetwork + */ + private String provider; + + /* + * Resource on which the operation is performed: Registration definition, registration assignment etc. + */ + private String resource; + + /* + * Operation type: Read, write, delete, etc. + */ + private String operation; + + /* + * Description of the operation. + */ + private String description; + + /** + * Creates an instance of OperationDisplay class. + */ + public OperationDisplay() { + } + + /** + * Get the provider property: Service provider: Microsoft.MobileNetwork. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider property: Service provider: Microsoft.MobileNetwork. + * + * @param provider the provider value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the resource property: Resource on which the operation is performed: Registration definition, registration + * assignment etc. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource property: Resource on which the operation is performed: Registration definition, registration + * assignment etc. + * + * @param resource the resource value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the operation property: Operation type: Read, write, delete, etc. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Set the operation property: Operation type: Read, write, delete, etc. + * + * @param operation the operation value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the description property: Description of the operation. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the operation. + * + * @param description the description value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", this.provider); + jsonWriter.writeStringField("resource", this.resource); + jsonWriter.writeStringField("operation", this.operation); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDisplay. + */ + public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDisplay deserializedOperationDisplay = new OperationDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationDisplay.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationDisplay.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationDisplay.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDisplay.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDisplay; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/OperationList.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/OperationList.java new file mode 100644 index 000000000000..7a8a2fadf87b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/OperationList.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.OperationInner; +import java.io.IOException; +import java.util.List; + +/** + * List of the operations. + */ +@Immutable +public final class OperationList implements JsonSerializable { + /* + * List of Microsoft.MobileNetwork operations. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of OperationList class. + */ + public OperationList() { + } + + /** + * Get the value property: List of Microsoft.MobileNetwork operations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationList. + */ + public static OperationList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationList deserializedOperationList = new OperationList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); + deserializedOperationList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationList; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Operations.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Operations.java new file mode 100644 index 000000000000..08438cffc055 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Operations.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Operations. + */ +public interface Operations { + /** + * Gets a list of the operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets a list of the operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of the operations as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCapture.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCapture.java new file mode 100644 index 000000000000..221a195d05fc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCapture.java @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of PacketCapture. + */ +public interface PacketCapture { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the packet capture session resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the status property: The status of the packet capture session. + * + * @return the status value. + */ + PacketCaptureStatus status(); + + /** + * Gets the reason property: The reason the current packet capture session state. + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the captureStartTime property: The start time of the packet capture session. + * + * @return the captureStartTime value. + */ + OffsetDateTime captureStartTime(); + + /** + * Gets the networkInterfaces property: List of network interfaces to capture on. + * + * @return the networkInterfaces value. + */ + List networkInterfaces(); + + /** + * Gets the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are + * truncated. The default "0" means the entire packet is captured. + * + * @return the bytesToCapturePerPacket value. + */ + Long bytesToCapturePerPacket(); + + /** + * Gets the totalBytesPerSession property: Maximum size of the capture output. + * + * @return the totalBytesPerSession value. + */ + Long totalBytesPerSession(); + + /** + * Gets the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @return the timeLimitInSeconds value. + */ + Integer timeLimitInSeconds(); + + /** + * Gets the outputFiles property: The list of output files of a packet capture session. + * + * @return the outputFiles value. + */ + List outputFiles(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner object. + * + * @return the inner object. + */ + PacketCaptureInner innerModel(); + + /** + * The entirety of the PacketCapture definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The PacketCapture definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PacketCapture definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the PacketCapture definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, packetCoreControlPlaneName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @return the next definition stage. + */ + WithCreate withExistingPacketCoreControlPlane(String resourceGroupName, String packetCoreControlPlaneName); + } + + /** + * The stage of the PacketCapture definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithNetworkInterfaces, DefinitionStages.WithBytesToCapturePerPacket, + DefinitionStages.WithTotalBytesPerSession, DefinitionStages.WithTimeLimitInSeconds { + /** + * Executes the create request. + * + * @return the created resource. + */ + PacketCapture create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PacketCapture create(Context context); + } + + /** + * The stage of the PacketCapture definition allowing to specify networkInterfaces. + */ + interface WithNetworkInterfaces { + /** + * Specifies the networkInterfaces property: List of network interfaces to capture on.. + * + * @param networkInterfaces List of network interfaces to capture on. + * @return the next definition stage. + */ + WithCreate withNetworkInterfaces(List networkInterfaces); + } + + /** + * The stage of the PacketCapture definition allowing to specify bytesToCapturePerPacket. + */ + interface WithBytesToCapturePerPacket { + /** + * Specifies the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes + * are truncated. The default "0" means the entire packet is captured.. + * + * @param bytesToCapturePerPacket Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * @return the next definition stage. + */ + WithCreate withBytesToCapturePerPacket(Long bytesToCapturePerPacket); + } + + /** + * The stage of the PacketCapture definition allowing to specify totalBytesPerSession. + */ + interface WithTotalBytesPerSession { + /** + * Specifies the totalBytesPerSession property: Maximum size of the capture output.. + * + * @param totalBytesPerSession Maximum size of the capture output. + * @return the next definition stage. + */ + WithCreate withTotalBytesPerSession(Long totalBytesPerSession); + } + + /** + * The stage of the PacketCapture definition allowing to specify timeLimitInSeconds. + */ + interface WithTimeLimitInSeconds { + /** + * Specifies the timeLimitInSeconds property: Maximum duration of the capture session in seconds.. + * + * @param timeLimitInSeconds Maximum duration of the capture session in seconds. + * @return the next definition stage. + */ + WithCreate withTimeLimitInSeconds(Integer timeLimitInSeconds); + } + } + + /** + * Begins update for the PacketCapture resource. + * + * @return the stage of resource update. + */ + PacketCapture.Update update(); + + /** + * The template for PacketCapture update. + */ + interface Update extends UpdateStages.WithNetworkInterfaces, UpdateStages.WithBytesToCapturePerPacket, + UpdateStages.WithTotalBytesPerSession, UpdateStages.WithTimeLimitInSeconds { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PacketCapture apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PacketCapture apply(Context context); + } + + /** + * The PacketCapture update stages. + */ + interface UpdateStages { + /** + * The stage of the PacketCapture update allowing to specify networkInterfaces. + */ + interface WithNetworkInterfaces { + /** + * Specifies the networkInterfaces property: List of network interfaces to capture on.. + * + * @param networkInterfaces List of network interfaces to capture on. + * @return the next definition stage. + */ + Update withNetworkInterfaces(List networkInterfaces); + } + + /** + * The stage of the PacketCapture update allowing to specify bytesToCapturePerPacket. + */ + interface WithBytesToCapturePerPacket { + /** + * Specifies the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes + * are truncated. The default "0" means the entire packet is captured.. + * + * @param bytesToCapturePerPacket Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * @return the next definition stage. + */ + Update withBytesToCapturePerPacket(Long bytesToCapturePerPacket); + } + + /** + * The stage of the PacketCapture update allowing to specify totalBytesPerSession. + */ + interface WithTotalBytesPerSession { + /** + * Specifies the totalBytesPerSession property: Maximum size of the capture output.. + * + * @param totalBytesPerSession Maximum size of the capture output. + * @return the next definition stage. + */ + Update withTotalBytesPerSession(Long totalBytesPerSession); + } + + /** + * The stage of the PacketCapture update allowing to specify timeLimitInSeconds. + */ + interface WithTimeLimitInSeconds { + /** + * Specifies the timeLimitInSeconds property: Maximum duration of the capture session in seconds.. + * + * @param timeLimitInSeconds Maximum duration of the capture session in seconds. + * @return the next definition stage. + */ + Update withTimeLimitInSeconds(Integer timeLimitInSeconds); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PacketCapture refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PacketCapture refresh(Context context); + + /** + * Stop a packet capture session. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus stop(); + + /** + * Stop a packet capture session. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus stop(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureListResult.java new file mode 100644 index 000000000000..ad0369769351 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for packet capture API service call. + */ +@Fluent +public final class PacketCaptureListResult implements JsonSerializable { + /* + * A list of packet capture sessions under a packet core control plane. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of PacketCaptureListResult class. + */ + public PacketCaptureListResult() { + } + + /** + * Get the value property: A list of packet capture sessions under a packet core control plane. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of packet capture sessions under a packet core control plane. + * + * @param value the value value to set. + * @return the PacketCaptureListResult object itself. + */ + public PacketCaptureListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCaptureListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCaptureListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PacketCaptureListResult. + */ + public static PacketCaptureListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCaptureListResult deserializedPacketCaptureListResult = new PacketCaptureListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> PacketCaptureInner.fromJson(reader1)); + deserializedPacketCaptureListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPacketCaptureListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCaptureListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureStatus.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureStatus.java new file mode 100644 index 000000000000..c42a9516331e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureStatus.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of the packet capture session. + */ +public final class PacketCaptureStatus extends ExpandableStringEnum { + /** + * Static value NotStarted for PacketCaptureStatus. + */ + public static final PacketCaptureStatus NOT_STARTED = fromString("NotStarted"); + + /** + * Static value Running for PacketCaptureStatus. + */ + public static final PacketCaptureStatus RUNNING = fromString("Running"); + + /** + * Static value Stopped for PacketCaptureStatus. + */ + public static final PacketCaptureStatus STOPPED = fromString("Stopped"); + + /** + * Static value Error for PacketCaptureStatus. + */ + public static final PacketCaptureStatus ERROR = fromString("Error"); + + /** + * Creates a new instance of PacketCaptureStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PacketCaptureStatus() { + } + + /** + * Creates or finds a PacketCaptureStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PacketCaptureStatus. + */ + public static PacketCaptureStatus fromString(String name) { + return fromString(name, PacketCaptureStatus.class); + } + + /** + * Gets known PacketCaptureStatus values. + * + * @return known PacketCaptureStatus values. + */ + public static Collection values() { + return values(PacketCaptureStatus.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptures.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptures.java new file mode 100644 index 000000000000..8cb11ea79a8e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptures.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PacketCaptures. + */ +public interface PacketCaptures { + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCaptureName, Context context); + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session. + */ + PacketCapture get(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus stop(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus stop(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, + Context context); + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName); + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context); + + /** + * Gets information about the specified packet capture session. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session along with {@link Response}. + */ + PacketCapture getById(String id); + + /** + * Gets information about the specified packet capture session. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet capture session along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified packet capture. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified packet capture. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PacketCapture resource. + * + * @param name resource name. + * @return the first stage of the new PacketCapture definition. + */ + PacketCapture.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlane.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlane.java new file mode 100644 index 000000000000..2f35646ad390 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlane.java @@ -0,0 +1,704 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of PacketCoreControlPlane. + */ +public interface PacketCoreControlPlane { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the identity property: The identity used to retrieve the ingress certificate from Azure key vault. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the packet core control plane resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the installation property: The installation state of the packet core control plane resource. + * + * @return the installation value. + */ + Installation installation(); + + /** + * Gets the sites property: Site(s) under which this packet core control plane should be deployed. The sites must be + * in the same location as the packet core control plane. + * + * @return the sites value. + */ + List sites(); + + /** + * Gets the platform property: The platform where the packet core is deployed. + * + * @return the platform value. + */ + PlatformConfiguration platform(); + + /** + * Gets the coreNetworkTechnology property: The core network technology generation (5G core or EPC / 4G core). + * + * @return the coreNetworkTechnology value. + */ + CoreNetworkType coreNetworkTechnology(); + + /** + * Gets the version property: The desired version of the packet core software. + * + * @return the version value. + */ + String version(); + + /** + * Gets the installedVersion property: The currently installed version of the packet core software. + * + * @return the installedVersion value. + */ + String installedVersion(); + + /** + * Gets the rollbackVersion property: The previous version of the packet core software that was deployed. Used when + * performing the rollback action. + * + * @return the rollbackVersion value. + */ + String rollbackVersion(); + + /** + * Gets the controlPlaneAccessInterface property: The control plane interface on the access network. For 5G + * networks, this is the N2 interface. For 4G networks, this is the S1-MME interface. + * + * @return the controlPlaneAccessInterface value. + */ + InterfaceProperties controlPlaneAccessInterface(); + + /** + * Gets the controlPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the control plane on the + * access network in a High Availability (HA) system. In an HA deployment the access network router should be + * configured to anycast traffic for this address to the control plane access interfaces on the active and standby + * nodes. In non-HA system this list should be omitted or empty. + * + * @return the controlPlaneAccessVirtualIpv4Addresses value. + */ + List controlPlaneAccessVirtualIpv4Addresses(); + + /** + * Gets the sku property: The SKU defining the throughput and SIM allowances for this packet core control plane + * deployment. + * + * @return the sku value. + */ + BillingSku sku(); + + /** + * Gets the ueMtu property: The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links + * for all data networks. The MTU set on the user plane access link is calculated to be 60 bytes greater than this + * value to allow for GTP encapsulation. + * + * @return the ueMtu value. + */ + Integer ueMtu(); + + /** + * Gets the localDiagnosticsAccess property: The kubernetes ingress configuration to control access to packet core + * diagnostics over local APIs. + * + * @return the localDiagnosticsAccess value. + */ + LocalDiagnosticsAccessConfiguration localDiagnosticsAccess(); + + /** + * Gets the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @return the diagnosticsUpload value. + */ + DiagnosticsUploadConfiguration diagnosticsUpload(); + + /** + * Gets the eventHub property: Configuration for sending packet core events to an Azure Event Hub. + * + * @return the eventHub value. + */ + EventHubConfiguration eventHub(); + + /** + * Gets the signaling property: Signaling configuration for the packet core. + * + * @return the signaling value. + */ + SignalingConfiguration signaling(); + + /** + * Gets the interopSettings property: Settings to allow interoperability with third party components e.g. RANs and + * UEs. + * + * @return the interopSettings value. + */ + Object interopSettings(); + + /** + * Gets the homeNetworkPrivateKeysProvisioning property: The provisioning state of the secret containing private + * keys and keyIds for SUPI concealment. + * + * @return the homeNetworkPrivateKeysProvisioning value. + */ + HomeNetworkPrivateKeysProvisioning homeNetworkPrivateKeysProvisioning(); + + /** + * Gets the userConsent property: The user consent configuration for the packet core. + * + * @return the userConsent value. + */ + UserConsentConfiguration userConsent(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner object. + * + * @return the inner object. + */ + PacketCoreControlPlaneInner innerModel(); + + /** + * The entirety of the PacketCoreControlPlane definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithSites, DefinitionStages.WithPlatform, DefinitionStages.WithControlPlaneAccessInterface, + DefinitionStages.WithSku, DefinitionStages.WithLocalDiagnosticsAccess, DefinitionStages.WithCreate { + } + + /** + * The PacketCoreControlPlane definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PacketCoreControlPlane definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithSites withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify sites. + */ + interface WithSites { + /** + * Specifies the sites property: Site(s) under which this packet core control plane should be deployed. The + * sites must be in the same location as the packet core control plane.. + * + * @param sites Site(s) under which this packet core control plane should be deployed. The sites must be in + * the same location as the packet core control plane. + * @return the next definition stage. + */ + WithPlatform withSites(List sites); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify platform. + */ + interface WithPlatform { + /** + * Specifies the platform property: The platform where the packet core is deployed.. + * + * @param platform The platform where the packet core is deployed. + * @return the next definition stage. + */ + WithControlPlaneAccessInterface withPlatform(PlatformConfiguration platform); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify controlPlaneAccessInterface. + */ + interface WithControlPlaneAccessInterface { + /** + * Specifies the controlPlaneAccessInterface property: The control plane interface on the access network. + * For 5G networks, this is the N2 interface. For 4G networks, this is the S1-MME interface.. + * + * @param controlPlaneAccessInterface The control plane interface on the access network. For 5G networks, + * this is the N2 interface. For 4G networks, this is the S1-MME interface. + * @return the next definition stage. + */ + WithSku withControlPlaneAccessInterface(InterfaceProperties controlPlaneAccessInterface); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: The SKU defining the throughput and SIM allowances for this packet core + * control plane deployment.. + * + * @param sku The SKU defining the throughput and SIM allowances for this packet core control plane + * deployment. + * @return the next definition stage. + */ + WithLocalDiagnosticsAccess withSku(BillingSku sku); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify localDiagnosticsAccess. + */ + interface WithLocalDiagnosticsAccess { + /** + * Specifies the localDiagnosticsAccess property: The kubernetes ingress configuration to control access to + * packet core diagnostics over local APIs.. + * + * @param localDiagnosticsAccess The kubernetes ingress configuration to control access to packet core + * diagnostics over local APIs. + * @return the next definition stage. + */ + WithCreate withLocalDiagnosticsAccess(LocalDiagnosticsAccessConfiguration localDiagnosticsAccess); + } + + /** + * The stage of the PacketCoreControlPlane definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithInstallation, DefinitionStages.WithCoreNetworkTechnology, DefinitionStages.WithVersion, + DefinitionStages.WithControlPlaneAccessVirtualIpv4Addresses, DefinitionStages.WithUeMtu, + DefinitionStages.WithDiagnosticsUpload, DefinitionStages.WithEventHub, DefinitionStages.WithSignaling, + DefinitionStages.WithInteropSettings, DefinitionStages.WithUserConsent { + /** + * Executes the create request. + * + * @return the created resource. + */ + PacketCoreControlPlane create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PacketCoreControlPlane create(Context context); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The identity used to retrieve the ingress certificate from Azure key + * vault.. + * + * @param identity The identity used to retrieve the ingress certificate from Azure key vault. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify installation. + */ + interface WithInstallation { + /** + * Specifies the installation property: The installation state of the packet core control plane resource.. + * + * @param installation The installation state of the packet core control plane resource. + * @return the next definition stage. + */ + WithCreate withInstallation(Installation installation); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify coreNetworkTechnology. + */ + interface WithCoreNetworkTechnology { + /** + * Specifies the coreNetworkTechnology property: The core network technology generation (5G core or EPC / 4G + * core).. + * + * @param coreNetworkTechnology The core network technology generation (5G core or EPC / 4G core). + * @return the next definition stage. + */ + WithCreate withCoreNetworkTechnology(CoreNetworkType coreNetworkTechnology); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify version. + */ + interface WithVersion { + /** + * Specifies the version property: The desired version of the packet core software.. + * + * @param version The desired version of the packet core software. + * @return the next definition stage. + */ + WithCreate withVersion(String version); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify + * controlPlaneAccessVirtualIpv4Addresses. + */ + interface WithControlPlaneAccessVirtualIpv4Addresses { + /** + * Specifies the controlPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the control + * plane on the access network in a High Availability (HA) system. In an HA deployment the access network + * router should be configured to anycast traffic for this address to the control plane access interfaces on + * the active and standby nodes. In non-HA system this list should be omitted or empty.. + * + * @param controlPlaneAccessVirtualIpv4Addresses The virtual IP address(es) for the control plane on the + * access network in a High Availability (HA) system. In an HA deployment the access network router should + * be configured to anycast traffic for this address to the control plane access interfaces on the active + * and standby nodes. In non-HA system this list should be omitted or empty. + * @return the next definition stage. + */ + WithCreate withControlPlaneAccessVirtualIpv4Addresses(List controlPlaneAccessVirtualIpv4Addresses); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify ueMtu. + */ + interface WithUeMtu { + /** + * Specifies the ueMtu property: The MTU (in bytes) signaled to the UE. The same MTU is set on the user + * plane data links for all data networks. The MTU set on the user plane access link is calculated to be 60 + * bytes greater than this value to allow for GTP encapsulation.. + * + * @param ueMtu The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links for + * all data networks. The MTU set on the user plane access link is calculated to be 60 bytes greater than + * this value to allow for GTP encapsulation. + * @return the next definition stage. + */ + WithCreate withUeMtu(Integer ueMtu); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify diagnosticsUpload. + */ + interface WithDiagnosticsUpload { + /** + * Specifies the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @param diagnosticsUpload Configuration for uploading packet core diagnostics. + * @return the next definition stage. + */ + WithCreate withDiagnosticsUpload(DiagnosticsUploadConfiguration diagnosticsUpload); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify eventHub. + */ + interface WithEventHub { + /** + * Specifies the eventHub property: Configuration for sending packet core events to an Azure Event Hub.. + * + * @param eventHub Configuration for sending packet core events to an Azure Event Hub. + * @return the next definition stage. + */ + WithCreate withEventHub(EventHubConfiguration eventHub); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify signaling. + */ + interface WithSignaling { + /** + * Specifies the signaling property: Signaling configuration for the packet core.. + * + * @param signaling Signaling configuration for the packet core. + * @return the next definition stage. + */ + WithCreate withSignaling(SignalingConfiguration signaling); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify interopSettings. + */ + interface WithInteropSettings { + /** + * Specifies the interopSettings property: Settings to allow interoperability with third party components + * e.g. RANs and UEs.. + * + * @param interopSettings Settings to allow interoperability with third party components e.g. RANs and UEs. + * @return the next definition stage. + */ + WithCreate withInteropSettings(Object interopSettings); + } + + /** + * The stage of the PacketCoreControlPlane definition allowing to specify userConsent. + */ + interface WithUserConsent { + /** + * Specifies the userConsent property: The user consent configuration for the packet core.. + * + * @param userConsent The user consent configuration for the packet core. + * @return the next definition stage. + */ + WithCreate withUserConsent(UserConsentConfiguration userConsent); + } + } + + /** + * Begins update for the PacketCoreControlPlane resource. + * + * @return the stage of resource update. + */ + PacketCoreControlPlane.Update update(); + + /** + * The template for PacketCoreControlPlane update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PacketCoreControlPlane apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PacketCoreControlPlane apply(Context context); + } + + /** + * The PacketCoreControlPlane update stages. + */ + interface UpdateStages { + /** + * The stage of the PacketCoreControlPlane update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the PacketCoreControlPlane update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identity associated with this resource.. + * + * @param identity The managed service identity associated with this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PacketCoreControlPlane refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PacketCoreControlPlane refresh(Context context); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus rollback(); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus rollback(Context context); + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus reinstall(); + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus reinstall(Context context); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus collectDiagnosticsPackage(PacketCoreControlPlaneCollectDiagnosticsPackage parameters); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus collectDiagnosticsPackage(PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneCollectDiagnosticsPackage.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneCollectDiagnosticsPackage.java new file mode 100644 index 000000000000..013defc42766 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneCollectDiagnosticsPackage.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Packet core control plane collect diagnostics package options. + */ +@Fluent +public final class PacketCoreControlPlaneCollectDiagnosticsPackage + implements JsonSerializable { + /* + * The Storage Account Blob URL to upload the diagnostics package to. + */ + private String storageAccountBlobUrl; + + /** + * Creates an instance of PacketCoreControlPlaneCollectDiagnosticsPackage class. + */ + public PacketCoreControlPlaneCollectDiagnosticsPackage() { + } + + /** + * Get the storageAccountBlobUrl property: The Storage Account Blob URL to upload the diagnostics package to. + * + * @return the storageAccountBlobUrl value. + */ + public String storageAccountBlobUrl() { + return this.storageAccountBlobUrl; + } + + /** + * Set the storageAccountBlobUrl property: The Storage Account Blob URL to upload the diagnostics package to. + * + * @param storageAccountBlobUrl the storageAccountBlobUrl value to set. + * @return the PacketCoreControlPlaneCollectDiagnosticsPackage object itself. + */ + public PacketCoreControlPlaneCollectDiagnosticsPackage withStorageAccountBlobUrl(String storageAccountBlobUrl) { + this.storageAccountBlobUrl = storageAccountBlobUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccountBlobUrl() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageAccountBlobUrl in model PacketCoreControlPlaneCollectDiagnosticsPackage")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlaneCollectDiagnosticsPackage.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountBlobUrl", this.storageAccountBlobUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreControlPlaneCollectDiagnosticsPackage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreControlPlaneCollectDiagnosticsPackage if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PacketCoreControlPlaneCollectDiagnosticsPackage. + */ + public static PacketCoreControlPlaneCollectDiagnosticsPackage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreControlPlaneCollectDiagnosticsPackage deserializedPacketCoreControlPlaneCollectDiagnosticsPackage + = new PacketCoreControlPlaneCollectDiagnosticsPackage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountBlobUrl".equals(fieldName)) { + deserializedPacketCoreControlPlaneCollectDiagnosticsPackage.storageAccountBlobUrl + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreControlPlaneCollectDiagnosticsPackage; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneListResult.java new file mode 100644 index 000000000000..db10d4e356d1 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneListResult.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for packet core control planes API service call. + */ +@Fluent +public final class PacketCoreControlPlaneListResult implements JsonSerializable { + /* + * A list of packet core control planes in a resource group. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of PacketCoreControlPlaneListResult class. + */ + public PacketCoreControlPlaneListResult() { + } + + /** + * Get the value property: A list of packet core control planes in a resource group. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of packet core control planes in a resource group. + * + * @param value the value value to set. + * @return the PacketCoreControlPlaneListResult object itself. + */ + public PacketCoreControlPlaneListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreControlPlaneListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreControlPlaneListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PacketCoreControlPlaneListResult. + */ + public static PacketCoreControlPlaneListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreControlPlaneListResult deserializedPacketCoreControlPlaneListResult + = new PacketCoreControlPlaneListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PacketCoreControlPlaneInner.fromJson(reader1)); + deserializedPacketCoreControlPlaneListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPacketCoreControlPlaneListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreControlPlaneListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneResourceId.java new file mode 100644 index 000000000000..b8e3e1715eef --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneResourceId.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to an packet core control plane resource. + */ +@Fluent +public final class PacketCoreControlPlaneResourceId implements JsonSerializable { + /* + * Packet core control plane resource ID. + */ + private String id; + + /** + * Creates an instance of PacketCoreControlPlaneResourceId class. + */ + public PacketCoreControlPlaneResourceId() { + } + + /** + * Get the id property: Packet core control plane resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Packet core control plane resource ID. + * + * @param id the id value to set. + * @return the PacketCoreControlPlaneResourceId object itself. + */ + public PacketCoreControlPlaneResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property id in model PacketCoreControlPlaneResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlaneResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreControlPlaneResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreControlPlaneResourceId if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PacketCoreControlPlaneResourceId. + */ + public static PacketCoreControlPlaneResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreControlPlaneResourceId deserializedPacketCoreControlPlaneResourceId + = new PacketCoreControlPlaneResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPacketCoreControlPlaneResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreControlPlaneResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersion.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersion.java new file mode 100644 index 000000000000..d2de738d8450 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersion.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionInner; +import java.util.List; + +/** + * An immutable client-side representation of PacketCoreControlPlaneVersion. + */ +public interface PacketCoreControlPlaneVersion { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the packet core control plane version resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the platforms property: Platform specific packet core control plane version properties. + * + * @return the platforms value. + */ + List platforms(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionInner object. + * + * @return the inner object. + */ + PacketCoreControlPlaneVersionInner innerModel(); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersionListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersionListResult.java new file mode 100644 index 000000000000..2352ef9b7085 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersionListResult.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for packet core control plane version API service call. + */ +@Fluent +public final class PacketCoreControlPlaneVersionListResult + implements JsonSerializable { + /* + * A list of supported packet core control plane versions. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of PacketCoreControlPlaneVersionListResult class. + */ + public PacketCoreControlPlaneVersionListResult() { + } + + /** + * Get the value property: A list of supported packet core control plane versions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of supported packet core control plane versions. + * + * @param value the value value to set. + * @return the PacketCoreControlPlaneVersionListResult object itself. + */ + public PacketCoreControlPlaneVersionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreControlPlaneVersionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreControlPlaneVersionListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PacketCoreControlPlaneVersionListResult. + */ + public static PacketCoreControlPlaneVersionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreControlPlaneVersionListResult deserializedPacketCoreControlPlaneVersionListResult + = new PacketCoreControlPlaneVersionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PacketCoreControlPlaneVersionInner.fromJson(reader1)); + deserializedPacketCoreControlPlaneVersionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPacketCoreControlPlaneVersionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreControlPlaneVersionListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersions.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersions.java new file mode 100644 index 000000000000..5bd93c25363f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersions.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PacketCoreControlPlaneVersions. + */ +public interface PacketCoreControlPlaneVersions { + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response}. + */ + Response getWithResponse(String versionName, Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version. + */ + PacketCoreControlPlaneVersion get(String versionName); + + /** + * Lists all supported packet core control planes versions. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version along with {@link Response}. + */ + Response getBySubscriptionWithResponse(String versionName, Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane version. + */ + PacketCoreControlPlaneVersion getBySubscription(String versionName); + + /** + * Lists all supported packet core control planes versions. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listBySubscription(); + + /** + * Lists all supported packet core control planes versions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control plane version API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listBySubscription(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlanes.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlanes.java new file mode 100644 index 000000000000..cd3b2885bf77 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlanes.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PacketCoreControlPlanes. + */ +public interface PacketCoreControlPlanes { + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Deletes the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Gets information about the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + String packetCoreControlPlaneName, Context context); + + /** + * Gets information about the specified packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane. + */ + PacketCoreControlPlane getByResourceGroup(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Lists all the packet core control planes in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all the packet core control planes in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the packet core control planes in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core control planes API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Reinstall the specified packet core control plane. This action will try to restore the packet core to the + * installed state that was disrupted by a transient failure. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus collectDiagnosticsPackage(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus collectDiagnosticsPackage(String resourceGroupName, String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, Context context); + + /** + * Gets information about the specified packet core control plane. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane along with {@link Response}. + */ + PacketCoreControlPlane getById(String id); + + /** + * Gets information about the specified packet core control plane. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core control plane along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified packet core control plane. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified packet core control plane. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PacketCoreControlPlane resource. + * + * @param name resource name. + * @return the first stage of the new PacketCoreControlPlane definition. + */ + PacketCoreControlPlane.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlane.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlane.java new file mode 100644 index 000000000000..6bc8e157f9c5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlane.java @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlaneInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of PacketCoreDataPlane. + */ +public interface PacketCoreDataPlane { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the packet core data plane resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the userPlaneAccessInterface property: The user plane interface on the access network. For 5G networks, this + * is the N3 interface. For 4G networks, this is the S1-U interface. + * + * @return the userPlaneAccessInterface value. + */ + InterfaceProperties userPlaneAccessInterface(); + + /** + * Gets the userPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the user plane on the + * access network in a High Availability (HA) system. In an HA deployment the access network router should be + * configured to forward traffic for this address to the control plane access interface on the active or standby + * node. In non-HA system this list should be omitted or empty. + * + * @return the userPlaneAccessVirtualIpv4Addresses value. + */ + List userPlaneAccessVirtualIpv4Addresses(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlaneInner object. + * + * @return the inner object. + */ + PacketCoreDataPlaneInner innerModel(); + + /** + * The entirety of the PacketCoreDataPlane definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithParentResource, + DefinitionStages.WithUserPlaneAccessInterface, DefinitionStages.WithCreate { + } + + /** + * The PacketCoreDataPlane definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PacketCoreDataPlane definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the PacketCoreDataPlane definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the PacketCoreDataPlane definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, packetCoreControlPlaneName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @return the next definition stage. + */ + WithUserPlaneAccessInterface withExistingPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName); + } + + /** + * The stage of the PacketCoreDataPlane definition allowing to specify userPlaneAccessInterface. + */ + interface WithUserPlaneAccessInterface { + /** + * Specifies the userPlaneAccessInterface property: The user plane interface on the access network. For 5G + * networks, this is the N3 interface. For 4G networks, this is the S1-U interface.. + * + * @param userPlaneAccessInterface The user plane interface on the access network. For 5G networks, this is + * the N3 interface. For 4G networks, this is the S1-U interface. + * @return the next definition stage. + */ + WithCreate withUserPlaneAccessInterface(InterfaceProperties userPlaneAccessInterface); + } + + /** + * The stage of the PacketCoreDataPlane definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithUserPlaneAccessVirtualIpv4Addresses { + /** + * Executes the create request. + * + * @return the created resource. + */ + PacketCoreDataPlane create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PacketCoreDataPlane create(Context context); + } + + /** + * The stage of the PacketCoreDataPlane definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the PacketCoreDataPlane definition allowing to specify userPlaneAccessVirtualIpv4Addresses. + */ + interface WithUserPlaneAccessVirtualIpv4Addresses { + /** + * Specifies the userPlaneAccessVirtualIpv4Addresses property: The virtual IP address(es) for the user plane + * on the access network in a High Availability (HA) system. In an HA deployment the access network router + * should be configured to forward traffic for this address to the control plane access interface on the + * active or standby node. In non-HA system this list should be omitted or empty.. + * + * @param userPlaneAccessVirtualIpv4Addresses The virtual IP address(es) for the user plane on the access + * network in a High Availability (HA) system. In an HA deployment the access network router should be + * configured to forward traffic for this address to the control plane access interface on the active or + * standby node. In non-HA system this list should be omitted or empty. + * @return the next definition stage. + */ + WithCreate withUserPlaneAccessVirtualIpv4Addresses(List userPlaneAccessVirtualIpv4Addresses); + } + } + + /** + * Begins update for the PacketCoreDataPlane resource. + * + * @return the stage of resource update. + */ + PacketCoreDataPlane.Update update(); + + /** + * The template for PacketCoreDataPlane update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PacketCoreDataPlane apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PacketCoreDataPlane apply(Context context); + } + + /** + * The PacketCoreDataPlane update stages. + */ + interface UpdateStages { + /** + * The stage of the PacketCoreDataPlane update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PacketCoreDataPlane refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PacketCoreDataPlane refresh(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlaneListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlaneListResult.java new file mode 100644 index 000000000000..88601b139105 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlaneListResult.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlaneInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for packet core data planes API service call. + */ +@Fluent +public final class PacketCoreDataPlaneListResult implements JsonSerializable { + /* + * A list of packet core data planes in a resource group. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of PacketCoreDataPlaneListResult class. + */ + public PacketCoreDataPlaneListResult() { + } + + /** + * Get the value property: A list of packet core data planes in a resource group. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of packet core data planes in a resource group. + * + * @param value the value value to set. + * @return the PacketCoreDataPlaneListResult object itself. + */ + public PacketCoreDataPlaneListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PacketCoreDataPlaneListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PacketCoreDataPlaneListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PacketCoreDataPlaneListResult. + */ + public static PacketCoreDataPlaneListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PacketCoreDataPlaneListResult deserializedPacketCoreDataPlaneListResult + = new PacketCoreDataPlaneListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PacketCoreDataPlaneInner.fromJson(reader1)); + deserializedPacketCoreDataPlaneListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPacketCoreDataPlaneListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPacketCoreDataPlaneListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlanes.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlanes.java new file mode 100644 index 000000000000..0d5d29fdbe92 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreDataPlanes.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PacketCoreDataPlanes. + */ +public interface PacketCoreDataPlanes { + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName); + + /** + * Deletes the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, + Context context); + + /** + * Gets information about the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName, Context context); + + /** + * Gets information about the specified packet core data plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCoreDataPlaneName The name of the packet core data plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane. + */ + PacketCoreDataPlane get(String resourceGroupName, String packetCoreControlPlaneName, + String packetCoreDataPlaneName); + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName); + + /** + * Lists all the packet core data planes associated with a packet core control plane. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core data planes API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane(String resourceGroupName, + String packetCoreControlPlaneName, Context context); + + /** + * Gets information about the specified packet core data plane. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane along with {@link Response}. + */ + PacketCoreDataPlane getById(String id); + + /** + * Gets information about the specified packet core data plane. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified packet core data plane along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified packet core data plane. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified packet core data plane. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PacketCoreDataPlane resource. + * + * @param name resource name. + * @return the first stage of the new PacketCoreDataPlane definition. + */ + PacketCoreDataPlane.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PccRuleConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PccRuleConfiguration.java new file mode 100644 index 000000000000..69fca3b611d7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PccRuleConfiguration.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Data flow policy rule configuration. + */ +@Fluent +public final class PccRuleConfiguration implements JsonSerializable { + /* + * The name of the rule. This must be unique within the parent service. You must not use any of the following + * reserved strings - `default`, `requested` or `service`. + */ + private String ruleName; + + /* + * A precedence value that is used to decide between data flow policy rules when identifying the QoS values to use + * for a particular SIM. A lower value means a higher priority. This value should be unique among all data flow + * policy rules configured in the mobile network. + */ + private int rulePrecedence; + + /* + * The QoS policy to use for packets matching this rule. If this field is null then the parent service will define + * the QoS settings. + */ + private PccRuleQosPolicy ruleQosPolicy; + + /* + * Determines whether flows that match this data flow policy rule are permitted. + */ + private TrafficControlPermission trafficControl; + + /* + * The set of data flow templates to use for this data flow policy rule. + */ + private List serviceDataFlowTemplates; + + /** + * Creates an instance of PccRuleConfiguration class. + */ + public PccRuleConfiguration() { + } + + /** + * Get the ruleName property: The name of the rule. This must be unique within the parent service. You must not use + * any of the following reserved strings - `default`, `requested` or `service`. + * + * @return the ruleName value. + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set the ruleName property: The name of the rule. This must be unique within the parent service. You must not use + * any of the following reserved strings - `default`, `requested` or `service`. + * + * @param ruleName the ruleName value to set. + * @return the PccRuleConfiguration object itself. + */ + public PccRuleConfiguration withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get the rulePrecedence property: A precedence value that is used to decide between data flow policy rules when + * identifying the QoS values to use for a particular SIM. A lower value means a higher priority. This value should + * be unique among all data flow policy rules configured in the mobile network. + * + * @return the rulePrecedence value. + */ + public int rulePrecedence() { + return this.rulePrecedence; + } + + /** + * Set the rulePrecedence property: A precedence value that is used to decide between data flow policy rules when + * identifying the QoS values to use for a particular SIM. A lower value means a higher priority. This value should + * be unique among all data flow policy rules configured in the mobile network. + * + * @param rulePrecedence the rulePrecedence value to set. + * @return the PccRuleConfiguration object itself. + */ + public PccRuleConfiguration withRulePrecedence(int rulePrecedence) { + this.rulePrecedence = rulePrecedence; + return this; + } + + /** + * Get the ruleQosPolicy property: The QoS policy to use for packets matching this rule. If this field is null then + * the parent service will define the QoS settings. + * + * @return the ruleQosPolicy value. + */ + public PccRuleQosPolicy ruleQosPolicy() { + return this.ruleQosPolicy; + } + + /** + * Set the ruleQosPolicy property: The QoS policy to use for packets matching this rule. If this field is null then + * the parent service will define the QoS settings. + * + * @param ruleQosPolicy the ruleQosPolicy value to set. + * @return the PccRuleConfiguration object itself. + */ + public PccRuleConfiguration withRuleQosPolicy(PccRuleQosPolicy ruleQosPolicy) { + this.ruleQosPolicy = ruleQosPolicy; + return this; + } + + /** + * Get the trafficControl property: Determines whether flows that match this data flow policy rule are permitted. + * + * @return the trafficControl value. + */ + public TrafficControlPermission trafficControl() { + return this.trafficControl; + } + + /** + * Set the trafficControl property: Determines whether flows that match this data flow policy rule are permitted. + * + * @param trafficControl the trafficControl value to set. + * @return the PccRuleConfiguration object itself. + */ + public PccRuleConfiguration withTrafficControl(TrafficControlPermission trafficControl) { + this.trafficControl = trafficControl; + return this; + } + + /** + * Get the serviceDataFlowTemplates property: The set of data flow templates to use for this data flow policy rule. + * + * @return the serviceDataFlowTemplates value. + */ + public List serviceDataFlowTemplates() { + return this.serviceDataFlowTemplates; + } + + /** + * Set the serviceDataFlowTemplates property: The set of data flow templates to use for this data flow policy rule. + * + * @param serviceDataFlowTemplates the serviceDataFlowTemplates value to set. + * @return the PccRuleConfiguration object itself. + */ + public PccRuleConfiguration withServiceDataFlowTemplates(List serviceDataFlowTemplates) { + this.serviceDataFlowTemplates = serviceDataFlowTemplates; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ruleName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property ruleName in model PccRuleConfiguration")); + } + if (ruleQosPolicy() != null) { + ruleQosPolicy().validate(); + } + if (serviceDataFlowTemplates() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceDataFlowTemplates in model PccRuleConfiguration")); + } else { + serviceDataFlowTemplates().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PccRuleConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ruleName", this.ruleName); + jsonWriter.writeIntField("rulePrecedence", this.rulePrecedence); + jsonWriter.writeArrayField("serviceDataFlowTemplates", this.serviceDataFlowTemplates, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("ruleQosPolicy", this.ruleQosPolicy); + jsonWriter.writeStringField("trafficControl", + this.trafficControl == null ? null : this.trafficControl.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PccRuleConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PccRuleConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PccRuleConfiguration. + */ + public static PccRuleConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PccRuleConfiguration deserializedPccRuleConfiguration = new PccRuleConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleName".equals(fieldName)) { + deserializedPccRuleConfiguration.ruleName = reader.getString(); + } else if ("rulePrecedence".equals(fieldName)) { + deserializedPccRuleConfiguration.rulePrecedence = reader.getInt(); + } else if ("serviceDataFlowTemplates".equals(fieldName)) { + List serviceDataFlowTemplates + = reader.readArray(reader1 -> ServiceDataFlowTemplate.fromJson(reader1)); + deserializedPccRuleConfiguration.serviceDataFlowTemplates = serviceDataFlowTemplates; + } else if ("ruleQosPolicy".equals(fieldName)) { + deserializedPccRuleConfiguration.ruleQosPolicy = PccRuleQosPolicy.fromJson(reader); + } else if ("trafficControl".equals(fieldName)) { + deserializedPccRuleConfiguration.trafficControl + = TrafficControlPermission.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPccRuleConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PccRuleQosPolicy.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PccRuleQosPolicy.java new file mode 100644 index 000000000000..54ea305a899a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PccRuleQosPolicy.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Data flow policy rule QoS policy. + */ +@Fluent +public final class PccRuleQosPolicy extends QosPolicy { + /* + * The guaranteed bit rate (GBR) for all service data flows that use this data flow policy rule. This is an optional + * setting. If you do not provide a value, there will be no GBR set for the data flow policy rule that uses this QoS + * definition. + */ + private Ambr guaranteedBitRate; + + /** + * Creates an instance of PccRuleQosPolicy class. + */ + public PccRuleQosPolicy() { + } + + /** + * Get the guaranteedBitRate property: The guaranteed bit rate (GBR) for all service data flows that use this data + * flow policy rule. This is an optional setting. If you do not provide a value, there will be no GBR set for the + * data flow policy rule that uses this QoS definition. + * + * @return the guaranteedBitRate value. + */ + public Ambr guaranteedBitRate() { + return this.guaranteedBitRate; + } + + /** + * Set the guaranteedBitRate property: The guaranteed bit rate (GBR) for all service data flows that use this data + * flow policy rule. This is an optional setting. If you do not provide a value, there will be no GBR set for the + * data flow policy rule that uses this QoS definition. + * + * @param guaranteedBitRate the guaranteedBitRate value to set. + * @return the PccRuleQosPolicy object itself. + */ + public PccRuleQosPolicy withGuaranteedBitRate(Ambr guaranteedBitRate) { + this.guaranteedBitRate = guaranteedBitRate; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PccRuleQosPolicy withFiveQi(Integer fiveQi) { + super.withFiveQi(fiveQi); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PccRuleQosPolicy withAllocationAndRetentionPriorityLevel(Integer allocationAndRetentionPriorityLevel) { + super.withAllocationAndRetentionPriorityLevel(allocationAndRetentionPriorityLevel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PccRuleQosPolicy withPreemptionCapability(PreemptionCapability preemptionCapability) { + super.withPreemptionCapability(preemptionCapability); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PccRuleQosPolicy withPreemptionVulnerability(PreemptionVulnerability preemptionVulnerability) { + super.withPreemptionVulnerability(preemptionVulnerability); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PccRuleQosPolicy withMaximumBitRate(Ambr maximumBitRate) { + super.withMaximumBitRate(maximumBitRate); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (guaranteedBitRate() != null) { + guaranteedBitRate().validate(); + } + if (maximumBitRate() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property maximumBitRate in model PccRuleQosPolicy")); + } else { + maximumBitRate().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PccRuleQosPolicy.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("maximumBitRate", maximumBitRate()); + jsonWriter.writeNumberField("5qi", fiveQi()); + jsonWriter.writeNumberField("allocationAndRetentionPriorityLevel", allocationAndRetentionPriorityLevel()); + jsonWriter.writeStringField("preemptionCapability", + preemptionCapability() == null ? null : preemptionCapability().toString()); + jsonWriter.writeStringField("preemptionVulnerability", + preemptionVulnerability() == null ? null : preemptionVulnerability().toString()); + jsonWriter.writeJsonField("guaranteedBitRate", this.guaranteedBitRate); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PccRuleQosPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PccRuleQosPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PccRuleQosPolicy. + */ + public static PccRuleQosPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PccRuleQosPolicy deserializedPccRuleQosPolicy = new PccRuleQosPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumBitRate".equals(fieldName)) { + deserializedPccRuleQosPolicy.withMaximumBitRate(Ambr.fromJson(reader)); + } else if ("5qi".equals(fieldName)) { + deserializedPccRuleQosPolicy.withFiveQi(reader.getNullable(JsonReader::getInt)); + } else if ("allocationAndRetentionPriorityLevel".equals(fieldName)) { + deserializedPccRuleQosPolicy + .withAllocationAndRetentionPriorityLevel(reader.getNullable(JsonReader::getInt)); + } else if ("preemptionCapability".equals(fieldName)) { + deserializedPccRuleQosPolicy + .withPreemptionCapability(PreemptionCapability.fromString(reader.getString())); + } else if ("preemptionVulnerability".equals(fieldName)) { + deserializedPccRuleQosPolicy + .withPreemptionVulnerability(PreemptionVulnerability.fromString(reader.getString())); + } else if ("guaranteedBitRate".equals(fieldName)) { + deserializedPccRuleQosPolicy.guaranteedBitRate = Ambr.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPccRuleQosPolicy; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PdnType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PdnType.java new file mode 100644 index 000000000000..d588598d33de --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PdnType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Packet Data Network Type. + */ +public final class PdnType extends ExpandableStringEnum { + /** + * Static value IPV4 for PdnType. + */ + public static final PdnType IPV4 = fromString("IPV4"); + + /** + * Creates a new instance of PdnType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PdnType() { + } + + /** + * Creates or finds a PdnType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PdnType. + */ + public static PdnType fromString(String name) { + return fromString(name, PdnType.class); + } + + /** + * Gets known PdnType values. + * + * @return known PdnType values. + */ + public static Collection values() { + return values(PdnType.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PduSessionType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PduSessionType.java new file mode 100644 index 000000000000..e0acbb34111f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PduSessionType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * PDU session type (IPv4/IPv6). + */ +public final class PduSessionType extends ExpandableStringEnum { + /** + * Static value IPv4 for PduSessionType. + */ + public static final PduSessionType IPV4 = fromString("IPv4"); + + /** + * Static value IPv6 for PduSessionType. + */ + public static final PduSessionType IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of PduSessionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PduSessionType() { + } + + /** + * Creates or finds a PduSessionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PduSessionType. + */ + public static PduSessionType fromString(String name) { + return fromString(name, PduSessionType.class); + } + + /** + * Gets known PduSessionType values. + * + * @return known PduSessionType values. + */ + public static Collection values() { + return values(PduSessionType.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PinholeTimeouts.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PinholeTimeouts.java new file mode 100644 index 000000000000..75cb3b1f18f8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PinholeTimeouts.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Expiry times of inactive NAPT pinholes, in seconds. All timers must be at least 1 second. + */ +@Fluent +public final class PinholeTimeouts implements JsonSerializable { + /* + * Pinhole timeout for TCP pinholes in seconds. Default for TCP is 3 minutes. + */ + private Integer tcp; + + /* + * Pinhole timeout for UDP pinholes in seconds. Default for UDP is 30 seconds. + */ + private Integer udp; + + /* + * Pinhole timeout for ICMP pinholes in seconds. Default for ICMP Echo is 30 seconds. + */ + private Integer icmp; + + /** + * Creates an instance of PinholeTimeouts class. + */ + public PinholeTimeouts() { + } + + /** + * Get the tcp property: Pinhole timeout for TCP pinholes in seconds. Default for TCP is 3 minutes. + * + * @return the tcp value. + */ + public Integer tcp() { + return this.tcp; + } + + /** + * Set the tcp property: Pinhole timeout for TCP pinholes in seconds. Default for TCP is 3 minutes. + * + * @param tcp the tcp value to set. + * @return the PinholeTimeouts object itself. + */ + public PinholeTimeouts withTcp(Integer tcp) { + this.tcp = tcp; + return this; + } + + /** + * Get the udp property: Pinhole timeout for UDP pinholes in seconds. Default for UDP is 30 seconds. + * + * @return the udp value. + */ + public Integer udp() { + return this.udp; + } + + /** + * Set the udp property: Pinhole timeout for UDP pinholes in seconds. Default for UDP is 30 seconds. + * + * @param udp the udp value to set. + * @return the PinholeTimeouts object itself. + */ + public PinholeTimeouts withUdp(Integer udp) { + this.udp = udp; + return this; + } + + /** + * Get the icmp property: Pinhole timeout for ICMP pinholes in seconds. Default for ICMP Echo is 30 seconds. + * + * @return the icmp value. + */ + public Integer icmp() { + return this.icmp; + } + + /** + * Set the icmp property: Pinhole timeout for ICMP pinholes in seconds. Default for ICMP Echo is 30 seconds. + * + * @param icmp the icmp value to set. + * @return the PinholeTimeouts object itself. + */ + public PinholeTimeouts withIcmp(Integer icmp) { + this.icmp = icmp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("tcp", this.tcp); + jsonWriter.writeNumberField("udp", this.udp); + jsonWriter.writeNumberField("icmp", this.icmp); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PinholeTimeouts from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PinholeTimeouts if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PinholeTimeouts. + */ + public static PinholeTimeouts fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PinholeTimeouts deserializedPinholeTimeouts = new PinholeTimeouts(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tcp".equals(fieldName)) { + deserializedPinholeTimeouts.tcp = reader.getNullable(JsonReader::getInt); + } else if ("udp".equals(fieldName)) { + deserializedPinholeTimeouts.udp = reader.getNullable(JsonReader::getInt); + } else if ("icmp".equals(fieldName)) { + deserializedPinholeTimeouts.icmp = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPinholeTimeouts; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Platform.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Platform.java new file mode 100644 index 000000000000..406497dae0bb --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Platform.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Platform specific packet core control plane version properties. + */ +@Fluent +public final class Platform implements JsonSerializable { + /* + * The platform type where this version can be deployed. + */ + private PlatformType platformType; + + /* + * The state of this packet core control plane version on this platform. + */ + private VersionState versionState; + + /* + * The minimum software version of the platform where this packet core version can be deployed. + */ + private String minimumPlatformSoftwareVersion; + + /* + * The maximum software version of the platform where this packet core version can be deployed. + */ + private String maximumPlatformSoftwareVersion; + + /* + * Indicates whether this is the recommended version for this platform. + */ + private RecommendedVersion recommendedVersion; + + /* + * Indicates whether this version is obsoleted for this platform. + */ + private ObsoleteVersion obsoleteVersion; + + /* + * The list of versions to which a high availability upgrade from this version is supported. + */ + private List haUpgradesAvailable; + + /** + * Creates an instance of Platform class. + */ + public Platform() { + } + + /** + * Get the platformType property: The platform type where this version can be deployed. + * + * @return the platformType value. + */ + public PlatformType platformType() { + return this.platformType; + } + + /** + * Set the platformType property: The platform type where this version can be deployed. + * + * @param platformType the platformType value to set. + * @return the Platform object itself. + */ + public Platform withPlatformType(PlatformType platformType) { + this.platformType = platformType; + return this; + } + + /** + * Get the versionState property: The state of this packet core control plane version on this platform. + * + * @return the versionState value. + */ + public VersionState versionState() { + return this.versionState; + } + + /** + * Set the versionState property: The state of this packet core control plane version on this platform. + * + * @param versionState the versionState value to set. + * @return the Platform object itself. + */ + public Platform withVersionState(VersionState versionState) { + this.versionState = versionState; + return this; + } + + /** + * Get the minimumPlatformSoftwareVersion property: The minimum software version of the platform where this packet + * core version can be deployed. + * + * @return the minimumPlatformSoftwareVersion value. + */ + public String minimumPlatformSoftwareVersion() { + return this.minimumPlatformSoftwareVersion; + } + + /** + * Set the minimumPlatformSoftwareVersion property: The minimum software version of the platform where this packet + * core version can be deployed. + * + * @param minimumPlatformSoftwareVersion the minimumPlatformSoftwareVersion value to set. + * @return the Platform object itself. + */ + public Platform withMinimumPlatformSoftwareVersion(String minimumPlatformSoftwareVersion) { + this.minimumPlatformSoftwareVersion = minimumPlatformSoftwareVersion; + return this; + } + + /** + * Get the maximumPlatformSoftwareVersion property: The maximum software version of the platform where this packet + * core version can be deployed. + * + * @return the maximumPlatformSoftwareVersion value. + */ + public String maximumPlatformSoftwareVersion() { + return this.maximumPlatformSoftwareVersion; + } + + /** + * Set the maximumPlatformSoftwareVersion property: The maximum software version of the platform where this packet + * core version can be deployed. + * + * @param maximumPlatformSoftwareVersion the maximumPlatformSoftwareVersion value to set. + * @return the Platform object itself. + */ + public Platform withMaximumPlatformSoftwareVersion(String maximumPlatformSoftwareVersion) { + this.maximumPlatformSoftwareVersion = maximumPlatformSoftwareVersion; + return this; + } + + /** + * Get the recommendedVersion property: Indicates whether this is the recommended version for this platform. + * + * @return the recommendedVersion value. + */ + public RecommendedVersion recommendedVersion() { + return this.recommendedVersion; + } + + /** + * Set the recommendedVersion property: Indicates whether this is the recommended version for this platform. + * + * @param recommendedVersion the recommendedVersion value to set. + * @return the Platform object itself. + */ + public Platform withRecommendedVersion(RecommendedVersion recommendedVersion) { + this.recommendedVersion = recommendedVersion; + return this; + } + + /** + * Get the obsoleteVersion property: Indicates whether this version is obsoleted for this platform. + * + * @return the obsoleteVersion value. + */ + public ObsoleteVersion obsoleteVersion() { + return this.obsoleteVersion; + } + + /** + * Set the obsoleteVersion property: Indicates whether this version is obsoleted for this platform. + * + * @param obsoleteVersion the obsoleteVersion value to set. + * @return the Platform object itself. + */ + public Platform withObsoleteVersion(ObsoleteVersion obsoleteVersion) { + this.obsoleteVersion = obsoleteVersion; + return this; + } + + /** + * Get the haUpgradesAvailable property: The list of versions to which a high availability upgrade from this version + * is supported. + * + * @return the haUpgradesAvailable value. + */ + public List haUpgradesAvailable() { + return this.haUpgradesAvailable; + } + + /** + * Set the haUpgradesAvailable property: The list of versions to which a high availability upgrade from this version + * is supported. + * + * @param haUpgradesAvailable the haUpgradesAvailable value to set. + * @return the Platform object itself. + */ + public Platform withHaUpgradesAvailable(List haUpgradesAvailable) { + this.haUpgradesAvailable = haUpgradesAvailable; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("platformType", this.platformType == null ? null : this.platformType.toString()); + jsonWriter.writeStringField("versionState", this.versionState == null ? null : this.versionState.toString()); + jsonWriter.writeStringField("minimumPlatformSoftwareVersion", this.minimumPlatformSoftwareVersion); + jsonWriter.writeStringField("maximumPlatformSoftwareVersion", this.maximumPlatformSoftwareVersion); + jsonWriter.writeStringField("recommendedVersion", + this.recommendedVersion == null ? null : this.recommendedVersion.toString()); + jsonWriter.writeStringField("obsoleteVersion", + this.obsoleteVersion == null ? null : this.obsoleteVersion.toString()); + jsonWriter.writeArrayField("haUpgradesAvailable", this.haUpgradesAvailable, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Platform from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Platform if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Platform. + */ + public static Platform fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Platform deserializedPlatform = new Platform(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("platformType".equals(fieldName)) { + deserializedPlatform.platformType = PlatformType.fromString(reader.getString()); + } else if ("versionState".equals(fieldName)) { + deserializedPlatform.versionState = VersionState.fromString(reader.getString()); + } else if ("minimumPlatformSoftwareVersion".equals(fieldName)) { + deserializedPlatform.minimumPlatformSoftwareVersion = reader.getString(); + } else if ("maximumPlatformSoftwareVersion".equals(fieldName)) { + deserializedPlatform.maximumPlatformSoftwareVersion = reader.getString(); + } else if ("recommendedVersion".equals(fieldName)) { + deserializedPlatform.recommendedVersion = RecommendedVersion.fromString(reader.getString()); + } else if ("obsoleteVersion".equals(fieldName)) { + deserializedPlatform.obsoleteVersion = ObsoleteVersion.fromString(reader.getString()); + } else if ("haUpgradesAvailable".equals(fieldName)) { + List haUpgradesAvailable = reader.readArray(reader1 -> reader1.getString()); + deserializedPlatform.haUpgradesAvailable = haUpgradesAvailable; + } else { + reader.skipChildren(); + } + } + + return deserializedPlatform; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformConfiguration.java new file mode 100644 index 000000000000..ff140fca9756 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformConfiguration.java @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The platform where the packet core is deployed. + */ +@Fluent +public final class PlatformConfiguration implements JsonSerializable { + /* + * The platform type where packet core is deployed. + */ + private PlatformType type; + + /* + * The Azure Stack Edge device where the packet core is deployed. If the device is part of a fault tolerant pair, + * either device in the pair can be specified. + */ + private AzureStackEdgeDeviceResourceId azureStackEdgeDevice; + + /* + * The Azure Stack Edge devices where the packet core is deployed. If the packet core is deployed across multiple + * devices, all devices will appear in this list. + */ + private List azureStackEdgeDevices; + + /* + * The Azure Stack HCI cluster where the packet core is deployed. + */ + private AzureStackHciClusterResourceId azureStackHciCluster; + + /* + * Azure Arc connected cluster where the packet core is deployed. + */ + private ConnectedClusterResourceId connectedCluster; + + /* + * Azure Arc custom location where the packet core is deployed. + */ + private CustomLocationResourceId customLocation; + + /** + * Creates an instance of PlatformConfiguration class. + */ + public PlatformConfiguration() { + } + + /** + * Get the type property: The platform type where packet core is deployed. + * + * @return the type value. + */ + public PlatformType type() { + return this.type; + } + + /** + * Set the type property: The platform type where packet core is deployed. + * + * @param type the type value to set. + * @return the PlatformConfiguration object itself. + */ + public PlatformConfiguration withType(PlatformType type) { + this.type = type; + return this; + } + + /** + * Get the azureStackEdgeDevice property: The Azure Stack Edge device where the packet core is deployed. If the + * device is part of a fault tolerant pair, either device in the pair can be specified. + * + * @return the azureStackEdgeDevice value. + */ + public AzureStackEdgeDeviceResourceId azureStackEdgeDevice() { + return this.azureStackEdgeDevice; + } + + /** + * Set the azureStackEdgeDevice property: The Azure Stack Edge device where the packet core is deployed. If the + * device is part of a fault tolerant pair, either device in the pair can be specified. + * + * @param azureStackEdgeDevice the azureStackEdgeDevice value to set. + * @return the PlatformConfiguration object itself. + */ + public PlatformConfiguration withAzureStackEdgeDevice(AzureStackEdgeDeviceResourceId azureStackEdgeDevice) { + this.azureStackEdgeDevice = azureStackEdgeDevice; + return this; + } + + /** + * Get the azureStackEdgeDevices property: The Azure Stack Edge devices where the packet core is deployed. If the + * packet core is deployed across multiple devices, all devices will appear in this list. + * + * @return the azureStackEdgeDevices value. + */ + public List azureStackEdgeDevices() { + return this.azureStackEdgeDevices; + } + + /** + * Get the azureStackHciCluster property: The Azure Stack HCI cluster where the packet core is deployed. + * + * @return the azureStackHciCluster value. + */ + public AzureStackHciClusterResourceId azureStackHciCluster() { + return this.azureStackHciCluster; + } + + /** + * Set the azureStackHciCluster property: The Azure Stack HCI cluster where the packet core is deployed. + * + * @param azureStackHciCluster the azureStackHciCluster value to set. + * @return the PlatformConfiguration object itself. + */ + public PlatformConfiguration withAzureStackHciCluster(AzureStackHciClusterResourceId azureStackHciCluster) { + this.azureStackHciCluster = azureStackHciCluster; + return this; + } + + /** + * Get the connectedCluster property: Azure Arc connected cluster where the packet core is deployed. + * + * @return the connectedCluster value. + */ + public ConnectedClusterResourceId connectedCluster() { + return this.connectedCluster; + } + + /** + * Set the connectedCluster property: Azure Arc connected cluster where the packet core is deployed. + * + * @param connectedCluster the connectedCluster value to set. + * @return the PlatformConfiguration object itself. + */ + public PlatformConfiguration withConnectedCluster(ConnectedClusterResourceId connectedCluster) { + this.connectedCluster = connectedCluster; + return this; + } + + /** + * Get the customLocation property: Azure Arc custom location where the packet core is deployed. + * + * @return the customLocation value. + */ + public CustomLocationResourceId customLocation() { + return this.customLocation; + } + + /** + * Set the customLocation property: Azure Arc custom location where the packet core is deployed. + * + * @param customLocation the customLocation value to set. + * @return the PlatformConfiguration object itself. + */ + public PlatformConfiguration withCustomLocation(CustomLocationResourceId customLocation) { + this.customLocation = customLocation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property type in model PlatformConfiguration")); + } + if (azureStackEdgeDevice() != null) { + azureStackEdgeDevice().validate(); + } + if (azureStackEdgeDevices() != null) { + azureStackEdgeDevices().forEach(e -> e.validate()); + } + if (azureStackHciCluster() != null) { + azureStackHciCluster().validate(); + } + if (connectedCluster() != null) { + connectedCluster().validate(); + } + if (customLocation() != null) { + customLocation().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PlatformConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeJsonField("azureStackEdgeDevice", this.azureStackEdgeDevice); + jsonWriter.writeJsonField("azureStackHciCluster", this.azureStackHciCluster); + jsonWriter.writeJsonField("connectedCluster", this.connectedCluster); + jsonWriter.writeJsonField("customLocation", this.customLocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PlatformConfiguration. + */ + public static PlatformConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformConfiguration deserializedPlatformConfiguration = new PlatformConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedPlatformConfiguration.type = PlatformType.fromString(reader.getString()); + } else if ("azureStackEdgeDevice".equals(fieldName)) { + deserializedPlatformConfiguration.azureStackEdgeDevice + = AzureStackEdgeDeviceResourceId.fromJson(reader); + } else if ("azureStackEdgeDevices".equals(fieldName)) { + List azureStackEdgeDevices + = reader.readArray(reader1 -> AzureStackEdgeDeviceResourceId.fromJson(reader1)); + deserializedPlatformConfiguration.azureStackEdgeDevices = azureStackEdgeDevices; + } else if ("azureStackHciCluster".equals(fieldName)) { + deserializedPlatformConfiguration.azureStackHciCluster + = AzureStackHciClusterResourceId.fromJson(reader); + } else if ("connectedCluster".equals(fieldName)) { + deserializedPlatformConfiguration.connectedCluster = ConnectedClusterResourceId.fromJson(reader); + } else if ("customLocation".equals(fieldName)) { + deserializedPlatformConfiguration.customLocation = CustomLocationResourceId.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformType.java new file mode 100644 index 000000000000..ab9f49b33127 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The platform type where packet core is deployed. The contents of this enum can change. + */ +public final class PlatformType extends ExpandableStringEnum { + /** + * Static value AKS-HCI for PlatformType. + */ + public static final PlatformType AKS_HCI = fromString("AKS-HCI"); + + /** + * Static value 3P-AZURE-STACK-HCI for PlatformType. + */ + public static final PlatformType THREE_P_AZURE_STACK_HCI = fromString("3P-AZURE-STACK-HCI"); + + /** + * Creates a new instance of PlatformType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PlatformType() { + } + + /** + * Creates or finds a PlatformType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PlatformType. + */ + public static PlatformType fromString(String name) { + return fromString(name, PlatformType.class); + } + + /** + * Gets known PlatformType values. + * + * @return known PlatformType values. + */ + public static Collection values() { + return values(PlatformType.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlmnId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlmnId.java new file mode 100644 index 000000000000..382d6c464ea2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlmnId.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Public land mobile network (PLMN) ID. This is made up of the mobile country code and mobile network code, as defined + * in https://www.itu.int/rec/T-REC-E.212. The values 001-01 and 001-001 can be used for testing and the values 999-99 + * and 999-999 can be used on internal private networks. + */ +@Fluent +public class PlmnId implements JsonSerializable { + /* + * Mobile country code (MCC). + */ + private String mcc; + + /* + * Mobile network code (MNC). + */ + private String mnc; + + /** + * Creates an instance of PlmnId class. + */ + public PlmnId() { + } + + /** + * Get the mcc property: Mobile country code (MCC). + * + * @return the mcc value. + */ + public String mcc() { + return this.mcc; + } + + /** + * Set the mcc property: Mobile country code (MCC). + * + * @param mcc the mcc value to set. + * @return the PlmnId object itself. + */ + public PlmnId withMcc(String mcc) { + this.mcc = mcc; + return this; + } + + /** + * Get the mnc property: Mobile network code (MNC). + * + * @return the mnc value. + */ + public String mnc() { + return this.mnc; + } + + /** + * Set the mnc property: Mobile network code (MNC). + * + * @param mnc the mnc value to set. + * @return the PlmnId object itself. + */ + public PlmnId withMnc(String mnc) { + this.mnc = mnc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mcc() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property mcc in model PlmnId")); + } + if (mnc() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property mnc in model PlmnId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PlmnId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mcc", this.mcc); + jsonWriter.writeStringField("mnc", this.mnc); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlmnId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlmnId if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PlmnId. + */ + public static PlmnId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlmnId deserializedPlmnId = new PlmnId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mcc".equals(fieldName)) { + deserializedPlmnId.mcc = reader.getString(); + } else if ("mnc".equals(fieldName)) { + deserializedPlmnId.mnc = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlmnId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PortRange.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PortRange.java new file mode 100644 index 000000000000..4b369b631938 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PortRange.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Range of port numbers to use as translated ports on each translated address. + * If not specified and NAPT is enabled, this range defaults to 1,024 - 49,999. + * (Ports under 1,024 should not be used because these are special purpose ports reserved by IANA. Ports 50,000 and + * above are reserved for non-NAPT use.). + */ +@Fluent +public final class PortRange implements JsonSerializable { + /* + * The minimum port number + */ + private Integer minPort; + + /* + * The maximum port number + */ + private Integer maxPort; + + /** + * Creates an instance of PortRange class. + */ + public PortRange() { + } + + /** + * Get the minPort property: The minimum port number. + * + * @return the minPort value. + */ + public Integer minPort() { + return this.minPort; + } + + /** + * Set the minPort property: The minimum port number. + * + * @param minPort the minPort value to set. + * @return the PortRange object itself. + */ + public PortRange withMinPort(Integer minPort) { + this.minPort = minPort; + return this; + } + + /** + * Get the maxPort property: The maximum port number. + * + * @return the maxPort value. + */ + public Integer maxPort() { + return this.maxPort; + } + + /** + * Set the maxPort property: The maximum port number. + * + * @param maxPort the maxPort value to set. + * @return the PortRange object itself. + */ + public PortRange withMaxPort(Integer maxPort) { + this.maxPort = maxPort; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("minPort", this.minPort); + jsonWriter.writeNumberField("maxPort", this.maxPort); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PortRange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PortRange if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the PortRange. + */ + public static PortRange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PortRange deserializedPortRange = new PortRange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minPort".equals(fieldName)) { + deserializedPortRange.minPort = reader.getNullable(JsonReader::getInt); + } else if ("maxPort".equals(fieldName)) { + deserializedPortRange.maxPort = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPortRange; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PortReuseHoldTimes.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PortReuseHoldTimes.java new file mode 100644 index 000000000000..93824cc344ea --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PortReuseHoldTimes.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The minimum time (in seconds) that will pass before a port that was used by a closed pinhole can be recycled for use + * by another pinhole. All hold times must be minimum 1 second. + */ +@Fluent +public final class PortReuseHoldTimes implements JsonSerializable { + /* + * Minimum time in seconds that will pass before a TCP port that was used by a closed pinhole can be reused. Default + * for TCP is 2 minutes. + */ + private Integer tcp; + + /* + * Minimum time in seconds that will pass before a UDP port that was used by a closed pinhole can be reused. Default + * for UDP is 1 minute. + */ + private Integer udp; + + /** + * Creates an instance of PortReuseHoldTimes class. + */ + public PortReuseHoldTimes() { + } + + /** + * Get the tcp property: Minimum time in seconds that will pass before a TCP port that was used by a closed pinhole + * can be reused. Default for TCP is 2 minutes. + * + * @return the tcp value. + */ + public Integer tcp() { + return this.tcp; + } + + /** + * Set the tcp property: Minimum time in seconds that will pass before a TCP port that was used by a closed pinhole + * can be reused. Default for TCP is 2 minutes. + * + * @param tcp the tcp value to set. + * @return the PortReuseHoldTimes object itself. + */ + public PortReuseHoldTimes withTcp(Integer tcp) { + this.tcp = tcp; + return this; + } + + /** + * Get the udp property: Minimum time in seconds that will pass before a UDP port that was used by a closed pinhole + * can be reused. Default for UDP is 1 minute. + * + * @return the udp value. + */ + public Integer udp() { + return this.udp; + } + + /** + * Set the udp property: Minimum time in seconds that will pass before a UDP port that was used by a closed pinhole + * can be reused. Default for UDP is 1 minute. + * + * @param udp the udp value to set. + * @return the PortReuseHoldTimes object itself. + */ + public PortReuseHoldTimes withUdp(Integer udp) { + this.udp = udp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("tcp", this.tcp); + jsonWriter.writeNumberField("udp", this.udp); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PortReuseHoldTimes from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PortReuseHoldTimes if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PortReuseHoldTimes. + */ + public static PortReuseHoldTimes fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PortReuseHoldTimes deserializedPortReuseHoldTimes = new PortReuseHoldTimes(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tcp".equals(fieldName)) { + deserializedPortReuseHoldTimes.tcp = reader.getNullable(JsonReader::getInt); + } else if ("udp".equals(fieldName)) { + deserializedPortReuseHoldTimes.udp = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPortReuseHoldTimes; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionCapability.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionCapability.java new file mode 100644 index 000000000000..c263b32c97b2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionCapability.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Preemption capability. + */ +public final class PreemptionCapability extends ExpandableStringEnum { + /** + * Static value NotPreempt for PreemptionCapability. + */ + public static final PreemptionCapability NOT_PREEMPT = fromString("NotPreempt"); + + /** + * Static value MayPreempt for PreemptionCapability. + */ + public static final PreemptionCapability MAY_PREEMPT = fromString("MayPreempt"); + + /** + * Creates a new instance of PreemptionCapability value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PreemptionCapability() { + } + + /** + * Creates or finds a PreemptionCapability from its string representation. + * + * @param name a name to look for. + * @return the corresponding PreemptionCapability. + */ + public static PreemptionCapability fromString(String name) { + return fromString(name, PreemptionCapability.class); + } + + /** + * Gets known PreemptionCapability values. + * + * @return known PreemptionCapability values. + */ + public static Collection values() { + return values(PreemptionCapability.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionVulnerability.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionVulnerability.java new file mode 100644 index 000000000000..713a497e0275 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionVulnerability.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Preemption vulnerability. + */ +public final class PreemptionVulnerability extends ExpandableStringEnum { + /** + * Static value NotPreemptable for PreemptionVulnerability. + */ + public static final PreemptionVulnerability NOT_PREEMPTABLE = fromString("NotPreemptable"); + + /** + * Static value Preemptable for PreemptionVulnerability. + */ + public static final PreemptionVulnerability PREEMPTABLE = fromString("Preemptable"); + + /** + * Creates a new instance of PreemptionVulnerability value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PreemptionVulnerability() { + } + + /** + * Creates or finds a PreemptionVulnerability from its string representation. + * + * @param name a name to look for. + * @return the corresponding PreemptionVulnerability. + */ + public static PreemptionVulnerability fromString(String name) { + return fromString(name, PreemptionVulnerability.class); + } + + /** + * Gets known PreemptionVulnerability values. + * + * @return known PreemptionVulnerability values. + */ + public static Collection values() { + return values(PreemptionVulnerability.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ProvisioningState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ProvisioningState.java new file mode 100644 index 000000000000..1098a3e6ab09 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ProvisioningState.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current provisioning state. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** + * Static value Unknown for ProvisioningState. + */ + public static final ProvisioningState UNKNOWN = fromString("Unknown"); + + /** + * Static value Succeeded for ProvisioningState. + */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Accepted for ProvisioningState. + */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Static value Deleting for ProvisioningState. + */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Failed for ProvisioningState. + */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ProvisioningState. + */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Deleted for ProvisioningState. + */ + public static final ProvisioningState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PublicLandMobileNetwork.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PublicLandMobileNetwork.java new file mode 100644 index 000000000000..33cf964a5f3b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PublicLandMobileNetwork.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Configuration relating to a particular PLMN. + */ +@Fluent +public final class PublicLandMobileNetwork extends PlmnId { + /* + * Configuration relating to SUPI concealment. + */ + private PublicLandMobileNetworkHomeNetworkPublicKeys homeNetworkPublicKeys; + + /** + * Creates an instance of PublicLandMobileNetwork class. + */ + public PublicLandMobileNetwork() { + } + + /** + * Get the homeNetworkPublicKeys property: Configuration relating to SUPI concealment. + * + * @return the homeNetworkPublicKeys value. + */ + public PublicLandMobileNetworkHomeNetworkPublicKeys homeNetworkPublicKeys() { + return this.homeNetworkPublicKeys; + } + + /** + * Set the homeNetworkPublicKeys property: Configuration relating to SUPI concealment. + * + * @param homeNetworkPublicKeys the homeNetworkPublicKeys value to set. + * @return the PublicLandMobileNetwork object itself. + */ + public PublicLandMobileNetwork + withHomeNetworkPublicKeys(PublicLandMobileNetworkHomeNetworkPublicKeys homeNetworkPublicKeys) { + this.homeNetworkPublicKeys = homeNetworkPublicKeys; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PublicLandMobileNetwork withMcc(String mcc) { + super.withMcc(mcc); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PublicLandMobileNetwork withMnc(String mnc) { + super.withMnc(mnc); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (homeNetworkPublicKeys() != null) { + homeNetworkPublicKeys().validate(); + } + if (mcc() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property mcc in model PublicLandMobileNetwork")); + } + if (mnc() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property mnc in model PublicLandMobileNetwork")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PublicLandMobileNetwork.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mcc", mcc()); + jsonWriter.writeStringField("mnc", mnc()); + jsonWriter.writeJsonField("homeNetworkPublicKeys", this.homeNetworkPublicKeys); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicLandMobileNetwork from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicLandMobileNetwork if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PublicLandMobileNetwork. + */ + public static PublicLandMobileNetwork fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicLandMobileNetwork deserializedPublicLandMobileNetwork = new PublicLandMobileNetwork(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mcc".equals(fieldName)) { + deserializedPublicLandMobileNetwork.withMcc(reader.getString()); + } else if ("mnc".equals(fieldName)) { + deserializedPublicLandMobileNetwork.withMnc(reader.getString()); + } else if ("homeNetworkPublicKeys".equals(fieldName)) { + deserializedPublicLandMobileNetwork.homeNetworkPublicKeys + = PublicLandMobileNetworkHomeNetworkPublicKeys.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPublicLandMobileNetwork; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PublicLandMobileNetworkHomeNetworkPublicKeys.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PublicLandMobileNetworkHomeNetworkPublicKeys.java new file mode 100644 index 000000000000..36eadc5cf004 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PublicLandMobileNetworkHomeNetworkPublicKeys.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Configuration relating to SUPI concealment. + */ +@Fluent +public final class PublicLandMobileNetworkHomeNetworkPublicKeys + implements JsonSerializable { + /* + * This provides a mapping to identify which public key has been used for SUPI concealment using the Profile A + * Protection Scheme. + */ + private List profileA; + + /* + * This provides a mapping to identify which public key has been used for SUPI concealment using the Profile B + * Protection Scheme. + */ + private List profileB; + + /** + * Creates an instance of PublicLandMobileNetworkHomeNetworkPublicKeys class. + */ + public PublicLandMobileNetworkHomeNetworkPublicKeys() { + } + + /** + * Get the profileA property: This provides a mapping to identify which public key has been used for SUPI + * concealment using the Profile A Protection Scheme. + * + * @return the profileA value. + */ + public List profileA() { + return this.profileA; + } + + /** + * Set the profileA property: This provides a mapping to identify which public key has been used for SUPI + * concealment using the Profile A Protection Scheme. + * + * @param profileA the profileA value to set. + * @return the PublicLandMobileNetworkHomeNetworkPublicKeys object itself. + */ + public PublicLandMobileNetworkHomeNetworkPublicKeys withProfileA(List profileA) { + this.profileA = profileA; + return this; + } + + /** + * Get the profileB property: This provides a mapping to identify which public key has been used for SUPI + * concealment using the Profile B Protection Scheme. + * + * @return the profileB value. + */ + public List profileB() { + return this.profileB; + } + + /** + * Set the profileB property: This provides a mapping to identify which public key has been used for SUPI + * concealment using the Profile B Protection Scheme. + * + * @param profileB the profileB value to set. + * @return the PublicLandMobileNetworkHomeNetworkPublicKeys object itself. + */ + public PublicLandMobileNetworkHomeNetworkPublicKeys withProfileB(List profileB) { + this.profileB = profileB; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (profileA() != null) { + profileA().forEach(e -> e.validate()); + } + if (profileB() != null) { + profileB().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("profileA", this.profileA, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("profileB", this.profileB, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicLandMobileNetworkHomeNetworkPublicKeys from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicLandMobileNetworkHomeNetworkPublicKeys if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PublicLandMobileNetworkHomeNetworkPublicKeys. + */ + public static PublicLandMobileNetworkHomeNetworkPublicKeys fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicLandMobileNetworkHomeNetworkPublicKeys deserializedPublicLandMobileNetworkHomeNetworkPublicKeys + = new PublicLandMobileNetworkHomeNetworkPublicKeys(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("profileA".equals(fieldName)) { + List profileA + = reader.readArray(reader1 -> HomeNetworkPublicKey.fromJson(reader1)); + deserializedPublicLandMobileNetworkHomeNetworkPublicKeys.profileA = profileA; + } else if ("profileB".equals(fieldName)) { + List profileB + = reader.readArray(reader1 -> HomeNetworkPublicKey.fromJson(reader1)); + deserializedPublicLandMobileNetworkHomeNetworkPublicKeys.profileB = profileB; + } else { + reader.skipChildren(); + } + } + + return deserializedPublicLandMobileNetworkHomeNetworkPublicKeys; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/QosPolicy.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/QosPolicy.java new file mode 100644 index 000000000000..1445d97d4a3d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/QosPolicy.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * QoS policy. + */ +@Fluent +public class QosPolicy implements JsonSerializable { + /* + * 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. See + * 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition + * the 5QI values. + */ + private Integer fiveQi; + + /* + * QoS Flow allocation and retention priority (ARP) level. Flows with higher priority preempt flows with lower + * priority, if the settings of `preemptionCapability` and `preemptionVulnerability` allow it. 1 is the highest + * level of priority. If this field is not specified then `5qi` is used to derive the ARP value. See 3GPP TS23.501 + * section 5.7.2.2 for a full description of the ARP parameters. + */ + private Integer allocationAndRetentionPriorityLevel; + + /* + * QoS Flow preemption capability. The preemption capability of a QoS Flow controls whether it can preempt another + * QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP + * parameters. + */ + private PreemptionCapability preemptionCapability; + + /* + * QoS Flow preemption vulnerability. The preemption vulnerability of a QoS Flow controls whether it can be + * preempted by a QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of + * the ARP parameters. + */ + private PreemptionVulnerability preemptionVulnerability; + + /* + * The maximum bit rate (MBR) for all service data flows that use this data flow policy rule or service. + */ + private Ambr maximumBitRate; + + /** + * Creates an instance of QosPolicy class. + */ + public QosPolicy() { + } + + /** + * Get the fiveQi property: 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to + * be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table + * 5.7.4-1 for the definition the 5QI values. + * + * @return the fiveQi value. + */ + public Integer fiveQi() { + return this.fiveQi; + } + + /** + * Set the fiveQi property: 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to + * be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table + * 5.7.4-1 for the definition the 5QI values. + * + * @param fiveQi the fiveQi value to set. + * @return the QosPolicy object itself. + */ + public QosPolicy withFiveQi(Integer fiveQi) { + this.fiveQi = fiveQi; + return this; + } + + /** + * Get the allocationAndRetentionPriorityLevel property: QoS Flow allocation and retention priority (ARP) level. + * Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` and + * `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then `5qi` + * is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. + * + * @return the allocationAndRetentionPriorityLevel value. + */ + public Integer allocationAndRetentionPriorityLevel() { + return this.allocationAndRetentionPriorityLevel; + } + + /** + * Set the allocationAndRetentionPriorityLevel property: QoS Flow allocation and retention priority (ARP) level. + * Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` and + * `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then `5qi` + * is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. + * + * @param allocationAndRetentionPriorityLevel the allocationAndRetentionPriorityLevel value to set. + * @return the QosPolicy object itself. + */ + public QosPolicy withAllocationAndRetentionPriorityLevel(Integer allocationAndRetentionPriorityLevel) { + this.allocationAndRetentionPriorityLevel = allocationAndRetentionPriorityLevel; + return this; + } + + /** + * Get the preemptionCapability property: QoS Flow preemption capability. The preemption capability of a QoS Flow + * controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 + * for a full description of the ARP parameters. + * + * @return the preemptionCapability value. + */ + public PreemptionCapability preemptionCapability() { + return this.preemptionCapability; + } + + /** + * Set the preemptionCapability property: QoS Flow preemption capability. The preemption capability of a QoS Flow + * controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 + * for a full description of the ARP parameters. + * + * @param preemptionCapability the preemptionCapability value to set. + * @return the QosPolicy object itself. + */ + public QosPolicy withPreemptionCapability(PreemptionCapability preemptionCapability) { + this.preemptionCapability = preemptionCapability; + return this; + } + + /** + * Get the preemptionVulnerability property: QoS Flow preemption vulnerability. The preemption vulnerability of a + * QoS Flow controls whether it can be preempted by a QoS Flow with a higher priority level. See 3GPP TS23.501 + * section 5.7.2.2 for a full description of the ARP parameters. + * + * @return the preemptionVulnerability value. + */ + public PreemptionVulnerability preemptionVulnerability() { + return this.preemptionVulnerability; + } + + /** + * Set the preemptionVulnerability property: QoS Flow preemption vulnerability. The preemption vulnerability of a + * QoS Flow controls whether it can be preempted by a QoS Flow with a higher priority level. See 3GPP TS23.501 + * section 5.7.2.2 for a full description of the ARP parameters. + * + * @param preemptionVulnerability the preemptionVulnerability value to set. + * @return the QosPolicy object itself. + */ + public QosPolicy withPreemptionVulnerability(PreemptionVulnerability preemptionVulnerability) { + this.preemptionVulnerability = preemptionVulnerability; + return this; + } + + /** + * Get the maximumBitRate property: The maximum bit rate (MBR) for all service data flows that use this data flow + * policy rule or service. + * + * @return the maximumBitRate value. + */ + public Ambr maximumBitRate() { + return this.maximumBitRate; + } + + /** + * Set the maximumBitRate property: The maximum bit rate (MBR) for all service data flows that use this data flow + * policy rule or service. + * + * @param maximumBitRate the maximumBitRate value to set. + * @return the QosPolicy object itself. + */ + public QosPolicy withMaximumBitRate(Ambr maximumBitRate) { + this.maximumBitRate = maximumBitRate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (maximumBitRate() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property maximumBitRate in model QosPolicy")); + } else { + maximumBitRate().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(QosPolicy.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("maximumBitRate", this.maximumBitRate); + jsonWriter.writeNumberField("5qi", this.fiveQi); + jsonWriter.writeNumberField("allocationAndRetentionPriorityLevel", this.allocationAndRetentionPriorityLevel); + jsonWriter.writeStringField("preemptionCapability", + this.preemptionCapability == null ? null : this.preemptionCapability.toString()); + jsonWriter.writeStringField("preemptionVulnerability", + this.preemptionVulnerability == null ? null : this.preemptionVulnerability.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QosPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QosPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the QosPolicy. + */ + public static QosPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QosPolicy deserializedQosPolicy = new QosPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumBitRate".equals(fieldName)) { + deserializedQosPolicy.maximumBitRate = Ambr.fromJson(reader); + } else if ("5qi".equals(fieldName)) { + deserializedQosPolicy.fiveQi = reader.getNullable(JsonReader::getInt); + } else if ("allocationAndRetentionPriorityLevel".equals(fieldName)) { + deserializedQosPolicy.allocationAndRetentionPriorityLevel = reader.getNullable(JsonReader::getInt); + } else if ("preemptionCapability".equals(fieldName)) { + deserializedQosPolicy.preemptionCapability = PreemptionCapability.fromString(reader.getString()); + } else if ("preemptionVulnerability".equals(fieldName)) { + deserializedQosPolicy.preemptionVulnerability + = PreemptionVulnerability.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedQosPolicy; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RatType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RatType.java new file mode 100644 index 000000000000..9938776b3126 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RatType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * RAT Type. + */ +public final class RatType extends ExpandableStringEnum { + /** + * Static value 4G for RatType. + */ + public static final RatType FOURG = fromString("4G"); + + /** + * Static value 5G for RatType. + */ + public static final RatType FIVEG = fromString("5G"); + + /** + * Creates a new instance of RatType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RatType() { + } + + /** + * Creates or finds a RatType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RatType. + */ + public static RatType fromString(String name) { + return fromString(name, RatType.class); + } + + /** + * Gets known RatType values. + * + * @return known RatType values. + */ + public static Collection values() { + return values(RatType.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RecommendedVersion.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RecommendedVersion.java new file mode 100644 index 000000000000..0e369e989960 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RecommendedVersion.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates whether this is the recommended version to use for new packet core control plane deployments. + */ +public final class RecommendedVersion extends ExpandableStringEnum { + /** + * Static value Recommended for RecommendedVersion. + */ + public static final RecommendedVersion RECOMMENDED = fromString("Recommended"); + + /** + * Static value NotRecommended for RecommendedVersion. + */ + public static final RecommendedVersion NOT_RECOMMENDED = fromString("NotRecommended"); + + /** + * Creates a new instance of RecommendedVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RecommendedVersion() { + } + + /** + * Creates or finds a RecommendedVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecommendedVersion. + */ + public static RecommendedVersion fromString(String name) { + return fromString(name, RecommendedVersion.class); + } + + /** + * Gets known RecommendedVersion values. + * + * @return known RecommendedVersion values. + */ + public static Collection values() { + return values(RecommendedVersion.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ReinstallRequired.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ReinstallRequired.java new file mode 100644 index 000000000000..410f16a1fd2d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ReinstallRequired.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether a reinstall of the packet core is required to pick up the latest configuration changes. + */ +public final class ReinstallRequired extends ExpandableStringEnum { + /** + * Static value Required for ReinstallRequired. + */ + public static final ReinstallRequired REQUIRED = fromString("Required"); + + /** + * Static value NotRequired for ReinstallRequired. + */ + public static final ReinstallRequired NOT_REQUIRED = fromString("NotRequired"); + + /** + * Creates a new instance of ReinstallRequired value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReinstallRequired() { + } + + /** + * Creates or finds a ReinstallRequired from its string representation. + * + * @param name a name to look for. + * @return the corresponding ReinstallRequired. + */ + public static ReinstallRequired fromString(String name) { + return fromString(name, ReinstallRequired.class); + } + + /** + * Gets known ReinstallRequired values. + * + * @return known ReinstallRequired values. + */ + public static Collection values() { + return values(ReinstallRequired.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoListResult.java new file mode 100644 index 000000000000..93e8002ecb36 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoListResult.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoModelInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for the list routing information API service call. + */ +@Fluent +public final class RoutingInfoListResult implements JsonSerializable { + /* + * A list of the routing information for the packet core control plane + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of RoutingInfoListResult class. + */ + public RoutingInfoListResult() { + } + + /** + * Get the value property: A list of the routing information for the packet core control plane. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of the routing information for the packet core control plane. + * + * @param value the value value to set. + * @return the RoutingInfoListResult object itself. + */ + public RoutingInfoListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutingInfoListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutingInfoListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RoutingInfoListResult. + */ + public static RoutingInfoListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutingInfoListResult deserializedRoutingInfoListResult = new RoutingInfoListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RoutingInfoModelInner.fromJson(reader1)); + deserializedRoutingInfoListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRoutingInfoListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutingInfoListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoModel.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoModel.java new file mode 100644 index 000000000000..d3ca96f2105f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoModel.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoModelInner; +import java.util.List; + +/** + * An immutable client-side representation of RoutingInfoModel. + */ +public interface RoutingInfoModel { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the controlPlaneAccessRoutes property: A list of IPv4 routes. + * + * @return the controlPlaneAccessRoutes value. + */ + List controlPlaneAccessRoutes(); + + /** + * Gets the userPlaneAccessRoutes property: A list of IPv4 routes. + * + * @return the userPlaneAccessRoutes value. + */ + List userPlaneAccessRoutes(); + + /** + * Gets the userPlaneDataRoutes property: A list of attached data networks and their IPv4 routes. + * + * @return the userPlaneDataRoutes value. + */ + List userPlaneDataRoutes(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoModelInner object. + * + * @return the inner object. + */ + RoutingInfoModelInner innerModel(); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoes.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoes.java new file mode 100644 index 000000000000..9754aaa693fa --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RoutingInfoes.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of RoutingInfoes. + */ +public interface RoutingInfoes { + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * List all of the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the list routing information API service call as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Get the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the routing information for the packet core along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String packetCoreControlPlaneName, + Context context); + + /** + * Get the routing information for the packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the routing information for the packet core. + */ + RoutingInfoModel get(String resourceGroupName, String packetCoreControlPlaneName); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RrcEstablishmentCause.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RrcEstablishmentCause.java new file mode 100644 index 000000000000..e73eba401867 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/RrcEstablishmentCause.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Radio connection establishment cause. + */ +public final class RrcEstablishmentCause extends ExpandableStringEnum { + /** + * Static value Emergency for RrcEstablishmentCause. + */ + public static final RrcEstablishmentCause EMERGENCY = fromString("Emergency"); + + /** + * Static value MobileOriginatedSignaling for RrcEstablishmentCause. + */ + public static final RrcEstablishmentCause MOBILE_ORIGINATED_SIGNALING = fromString("MobileOriginatedSignaling"); + + /** + * Static value MobileTerminatedSignaling for RrcEstablishmentCause. + */ + public static final RrcEstablishmentCause MOBILE_TERMINATED_SIGNALING = fromString("MobileTerminatedSignaling"); + + /** + * Static value MobileOriginatedData for RrcEstablishmentCause. + */ + public static final RrcEstablishmentCause MOBILE_ORIGINATED_DATA = fromString("MobileOriginatedData"); + + /** + * Static value MobileTerminatedData for RrcEstablishmentCause. + */ + public static final RrcEstablishmentCause MOBILE_TERMINATED_DATA = fromString("MobileTerminatedData"); + + /** + * Static value SMS for RrcEstablishmentCause. + */ + public static final RrcEstablishmentCause SMS = fromString("SMS"); + + /** + * Creates a new instance of RrcEstablishmentCause value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RrcEstablishmentCause() { + } + + /** + * Creates or finds a RrcEstablishmentCause from its string representation. + * + * @param name a name to look for. + * @return the corresponding RrcEstablishmentCause. + */ + public static RrcEstablishmentCause fromString(String name) { + return fromString(name, RrcEstablishmentCause.class); + } + + /** + * Gets known RrcEstablishmentCause values. + * + * @return known RrcEstablishmentCause values. + */ + public static Collection values() { + return values(RrcEstablishmentCause.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SdfDirection.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SdfDirection.java new file mode 100644 index 000000000000..ad758f073f9d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SdfDirection.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Service data flow direction. + */ +public final class SdfDirection extends ExpandableStringEnum { + /** + * Static value Uplink for SdfDirection. + */ + public static final SdfDirection UPLINK = fromString("Uplink"); + + /** + * Static value Downlink for SdfDirection. + */ + public static final SdfDirection DOWNLINK = fromString("Downlink"); + + /** + * Static value Bidirectional for SdfDirection. + */ + public static final SdfDirection BIDIRECTIONAL = fromString("Bidirectional"); + + /** + * Creates a new instance of SdfDirection value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SdfDirection() { + } + + /** + * Creates or finds a SdfDirection from its string representation. + * + * @param name a name to look for. + * @return the corresponding SdfDirection. + */ + public static SdfDirection fromString(String name) { + return fromString(name, SdfDirection.class); + } + + /** + * Gets known SdfDirection values. + * + * @return known SdfDirection values. + */ + public static Collection values() { + return values(SdfDirection.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Service.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Service.java new file mode 100644 index 000000000000..a33ae1502de1 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Service.java @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ServiceInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of Service. + */ +public interface Service { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the service resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the servicePrecedence property: A precedence value that is used to decide between services when identifying + * the QoS values to use for a particular SIM. A lower value means a higher priority. This value should be unique + * among all services configured in the mobile network. + * + * @return the servicePrecedence value. + */ + int servicePrecedence(); + + /** + * Gets the serviceQosPolicy property: The QoS policy to use for packets matching this service. This can be + * overridden for particular flows using the ruleQosPolicy field in a PccRuleConfiguration. If this field is null + * then the UE's SIM policy will define the QoS settings. + * + * @return the serviceQosPolicy value. + */ + QosPolicy serviceQosPolicy(); + + /** + * Gets the pccRules property: The set of data flow policy rules that make up this service. + * + * @return the pccRules value. + */ + List pccRules(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.ServiceInner object. + * + * @return the inner object. + */ + ServiceInner innerModel(); + + /** + * The entirety of the Service definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithParentResource, + DefinitionStages.WithServicePrecedence, DefinitionStages.WithPccRules, DefinitionStages.WithCreate { + } + + /** + * The Service definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Service definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Service definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the Service definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, mobileNetworkName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @return the next definition stage. + */ + WithServicePrecedence withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName); + } + + /** + * The stage of the Service definition allowing to specify servicePrecedence. + */ + interface WithServicePrecedence { + /** + * Specifies the servicePrecedence property: A precedence value that is used to decide between services when + * identifying the QoS values to use for a particular SIM. A lower value means a higher priority. This value + * should be unique among all services configured in the mobile network.. + * + * @param servicePrecedence A precedence value that is used to decide between services when identifying the + * QoS values to use for a particular SIM. A lower value means a higher priority. This value should be + * unique among all services configured in the mobile network. + * @return the next definition stage. + */ + WithPccRules withServicePrecedence(int servicePrecedence); + } + + /** + * The stage of the Service definition allowing to specify pccRules. + */ + interface WithPccRules { + /** + * Specifies the pccRules property: The set of data flow policy rules that make up this service.. + * + * @param pccRules The set of data flow policy rules that make up this service. + * @return the next definition stage. + */ + WithCreate withPccRules(List pccRules); + } + + /** + * The stage of the Service definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithServiceQosPolicy { + /** + * Executes the create request. + * + * @return the created resource. + */ + Service create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Service create(Context context); + } + + /** + * The stage of the Service definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the Service definition allowing to specify serviceQosPolicy. + */ + interface WithServiceQosPolicy { + /** + * Specifies the serviceQosPolicy property: The QoS policy to use for packets matching this service. This + * can be overridden for particular flows using the ruleQosPolicy field in a PccRuleConfiguration. If this + * field is null then the UE's SIM policy will define the QoS settings.. + * + * @param serviceQosPolicy The QoS policy to use for packets matching this service. This can be overridden + * for particular flows using the ruleQosPolicy field in a PccRuleConfiguration. If this field is null then + * the UE's SIM policy will define the QoS settings. + * @return the next definition stage. + */ + WithCreate withServiceQosPolicy(QosPolicy serviceQosPolicy); + } + } + + /** + * Begins update for the Service resource. + * + * @return the stage of resource update. + */ + Service.Update update(); + + /** + * The template for Service update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Service apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Service apply(Context context); + } + + /** + * The Service update stages. + */ + interface UpdateStages { + /** + * The stage of the Service update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Service refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Service refresh(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceDataFlowTemplate.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceDataFlowTemplate.java new file mode 100644 index 000000000000..9b94ff7da116 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceDataFlowTemplate.java @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Data flow template. + */ +@Fluent +public final class ServiceDataFlowTemplate implements JsonSerializable { + /* + * The name of the data flow template. This must be unique within the parent data flow policy rule. You must not use + * any of the following reserved strings - `default`, `requested` or `service`. + */ + private String templateName; + + /* + * The direction of this flow. + */ + private SdfDirection direction; + + /* + * A list of the allowed protocol(s) for this flow. If you want this flow to be able to use any protocol within the + * internet protocol suite, use the value `ip`. If you only want to allow a selection of protocols, you must use the + * corresponding IANA Assigned Internet Protocol Number for each protocol, as described in + * https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml. For example, for UDP, you must use 17. + * If you use the value `ip` then you must leave the field `port` unspecified. + */ + private List protocol; + + /* + * The remote IP address(es) to which UEs will connect for this flow. If you want to allow connections on any IP + * address, use the value `any`. Otherwise, you must provide each of the remote IP addresses to which the packet + * core instance will connect for this flow. You must provide each IP address in CIDR notation, including the + * netmask (for example, 192.0.2.54/24). + */ + private List remoteIpList; + + /* + * The port(s) to which UEs will connect for this flow. You can specify zero or more ports or port ranges. If you + * specify one or more ports or port ranges then you must specify a value other than `ip` in the `protocol` field. + * This is an optional setting. If you do not specify it then connections will be allowed on all ports. Port ranges + * must be specified as -. For example: [`8080`, `8082-8085`]. + */ + private List ports; + + /** + * Creates an instance of ServiceDataFlowTemplate class. + */ + public ServiceDataFlowTemplate() { + } + + /** + * Get the templateName property: The name of the data flow template. This must be unique within the parent data + * flow policy rule. You must not use any of the following reserved strings - `default`, `requested` or `service`. + * + * @return the templateName value. + */ + public String templateName() { + return this.templateName; + } + + /** + * Set the templateName property: The name of the data flow template. This must be unique within the parent data + * flow policy rule. You must not use any of the following reserved strings - `default`, `requested` or `service`. + * + * @param templateName the templateName value to set. + * @return the ServiceDataFlowTemplate object itself. + */ + public ServiceDataFlowTemplate withTemplateName(String templateName) { + this.templateName = templateName; + return this; + } + + /** + * Get the direction property: The direction of this flow. + * + * @return the direction value. + */ + public SdfDirection direction() { + return this.direction; + } + + /** + * Set the direction property: The direction of this flow. + * + * @param direction the direction value to set. + * @return the ServiceDataFlowTemplate object itself. + */ + public ServiceDataFlowTemplate withDirection(SdfDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get the protocol property: A list of the allowed protocol(s) for this flow. If you want this flow to be able to + * use any protocol within the internet protocol suite, use the value `ip`. If you only want to allow a selection of + * protocols, you must use the corresponding IANA Assigned Internet Protocol Number for each protocol, as described + * in https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml. For example, for UDP, you must use + * 17. If you use the value `ip` then you must leave the field `port` unspecified. + * + * @return the protocol value. + */ + public List protocol() { + return this.protocol; + } + + /** + * Set the protocol property: A list of the allowed protocol(s) for this flow. If you want this flow to be able to + * use any protocol within the internet protocol suite, use the value `ip`. If you only want to allow a selection of + * protocols, you must use the corresponding IANA Assigned Internet Protocol Number for each protocol, as described + * in https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml. For example, for UDP, you must use + * 17. If you use the value `ip` then you must leave the field `port` unspecified. + * + * @param protocol the protocol value to set. + * @return the ServiceDataFlowTemplate object itself. + */ + public ServiceDataFlowTemplate withProtocol(List protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the remoteIpList property: The remote IP address(es) to which UEs will connect for this flow. If you want to + * allow connections on any IP address, use the value `any`. Otherwise, you must provide each of the remote IP + * addresses to which the packet core instance will connect for this flow. You must provide each IP address in CIDR + * notation, including the netmask (for example, 192.0.2.54/24). + * + * @return the remoteIpList value. + */ + public List remoteIpList() { + return this.remoteIpList; + } + + /** + * Set the remoteIpList property: The remote IP address(es) to which UEs will connect for this flow. If you want to + * allow connections on any IP address, use the value `any`. Otherwise, you must provide each of the remote IP + * addresses to which the packet core instance will connect for this flow. You must provide each IP address in CIDR + * notation, including the netmask (for example, 192.0.2.54/24). + * + * @param remoteIpList the remoteIpList value to set. + * @return the ServiceDataFlowTemplate object itself. + */ + public ServiceDataFlowTemplate withRemoteIpList(List remoteIpList) { + this.remoteIpList = remoteIpList; + return this; + } + + /** + * Get the ports property: The port(s) to which UEs will connect for this flow. You can specify zero or more ports + * or port ranges. If you specify one or more ports or port ranges then you must specify a value other than `ip` in + * the `protocol` field. This is an optional setting. If you do not specify it then connections will be allowed on + * all ports. Port ranges must be specified as <FirstPort>-<LastPort>. For example: [`8080`, + * `8082-8085`]. + * + * @return the ports value. + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports property: The port(s) to which UEs will connect for this flow. You can specify zero or more ports + * or port ranges. If you specify one or more ports or port ranges then you must specify a value other than `ip` in + * the `protocol` field. This is an optional setting. If you do not specify it then connections will be allowed on + * all ports. Port ranges must be specified as <FirstPort>-<LastPort>. For example: [`8080`, + * `8082-8085`]. + * + * @param ports the ports value to set. + * @return the ServiceDataFlowTemplate object itself. + */ + public ServiceDataFlowTemplate withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (templateName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property templateName in model ServiceDataFlowTemplate")); + } + if (direction() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property direction in model ServiceDataFlowTemplate")); + } + if (protocol() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property protocol in model ServiceDataFlowTemplate")); + } + if (remoteIpList() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property remoteIpList in model ServiceDataFlowTemplate")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceDataFlowTemplate.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("templateName", this.templateName); + jsonWriter.writeStringField("direction", this.direction == null ? null : this.direction.toString()); + jsonWriter.writeArrayField("protocol", this.protocol, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("remoteIpList", this.remoteIpList, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceDataFlowTemplate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceDataFlowTemplate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServiceDataFlowTemplate. + */ + public static ServiceDataFlowTemplate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceDataFlowTemplate deserializedServiceDataFlowTemplate = new ServiceDataFlowTemplate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("templateName".equals(fieldName)) { + deserializedServiceDataFlowTemplate.templateName = reader.getString(); + } else if ("direction".equals(fieldName)) { + deserializedServiceDataFlowTemplate.direction = SdfDirection.fromString(reader.getString()); + } else if ("protocol".equals(fieldName)) { + List protocol = reader.readArray(reader1 -> reader1.getString()); + deserializedServiceDataFlowTemplate.protocol = protocol; + } else if ("remoteIpList".equals(fieldName)) { + List remoteIpList = reader.readArray(reader1 -> reader1.getString()); + deserializedServiceDataFlowTemplate.remoteIpList = remoteIpList; + } else if ("ports".equals(fieldName)) { + List ports = reader.readArray(reader1 -> reader1.getString()); + deserializedServiceDataFlowTemplate.ports = ports; + } else { + reader.skipChildren(); + } + } + + return deserializedServiceDataFlowTemplate; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceListResult.java new file mode 100644 index 000000000000..f7635930aeae --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ServiceInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for services API service call. + */ +@Fluent +public final class ServiceListResult implements JsonSerializable { + /* + * A list of services. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of ServiceListResult class. + */ + public ServiceListResult() { + } + + /** + * Get the value property: A list of services. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of services. + * + * @param value the value value to set. + * @return the ServiceListResult object itself. + */ + public ServiceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceListResult. + */ + public static ServiceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceListResult deserializedServiceListResult = new ServiceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ServiceInner.fromJson(reader1)); + deserializedServiceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServiceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceResourceId.java new file mode 100644 index 000000000000..5089ad3e8c8c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ServiceResourceId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a service resource. + */ +@Fluent +public final class ServiceResourceId implements JsonSerializable { + /* + * Service resource ID. + */ + private String id; + + /** + * Creates an instance of ServiceResourceId class. + */ + public ServiceResourceId() { + } + + /** + * Get the id property: Service resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Service resource ID. + * + * @param id the id value to set. + * @return the ServiceResourceId object itself. + */ + public ServiceResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model ServiceResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServiceResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceResourceId if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServiceResourceId. + */ + public static ServiceResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceResourceId deserializedServiceResourceId = new ServiceResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServiceResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Services.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Services.java new file mode 100644 index 000000000000..507d7d56777e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Services.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Services. + */ +public interface Services { + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String serviceName); + + /** + * Deletes the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String serviceName, Context context); + + /** + * Gets information about the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String mobileNetworkName, String serviceName, + Context context); + + /** + * Gets information about the specified service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param serviceName The name of the service. You must not use any of the following reserved strings - `default`, + * `requested` or `service`. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service. + */ + Service get(String resourceGroupName, String mobileNetworkName, String serviceName); + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Gets all the services in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the services in a mobile network as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Gets information about the specified service. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service along with {@link Response}. + */ + Service getById(String id); + + /** + * Gets information about the specified service. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified service along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified service. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified service. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Service resource. + * + * @param name resource name. + * @return the first stage of the new Service definition. + */ + Service.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SignalingConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SignalingConfiguration.java new file mode 100644 index 000000000000..d02d4ea9ebc8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SignalingConfiguration.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Signaling configuration for the packet core. + */ +@Fluent +public final class SignalingConfiguration implements JsonSerializable { + /* + * Configuration enabling 4G NAS reroute. + */ + private NasRerouteConfiguration nasReroute; + + /* + * An ordered list of NAS encryption algorithms, used to encrypt control plane traffic between the UE and packet + * core, in order from most to least preferred. If not specified, the packet core will use a built-in default + * ordering. + */ + private List nasEncryption; + + /** + * Creates an instance of SignalingConfiguration class. + */ + public SignalingConfiguration() { + } + + /** + * Get the nasReroute property: Configuration enabling 4G NAS reroute. + * + * @return the nasReroute value. + */ + public NasRerouteConfiguration nasReroute() { + return this.nasReroute; + } + + /** + * Set the nasReroute property: Configuration enabling 4G NAS reroute. + * + * @param nasReroute the nasReroute value to set. + * @return the SignalingConfiguration object itself. + */ + public SignalingConfiguration withNasReroute(NasRerouteConfiguration nasReroute) { + this.nasReroute = nasReroute; + return this; + } + + /** + * Get the nasEncryption property: An ordered list of NAS encryption algorithms, used to encrypt control plane + * traffic between the UE and packet core, in order from most to least preferred. If not specified, the packet core + * will use a built-in default ordering. + * + * @return the nasEncryption value. + */ + public List nasEncryption() { + return this.nasEncryption; + } + + /** + * Set the nasEncryption property: An ordered list of NAS encryption algorithms, used to encrypt control plane + * traffic between the UE and packet core, in order from most to least preferred. If not specified, the packet core + * will use a built-in default ordering. + * + * @param nasEncryption the nasEncryption value to set. + * @return the SignalingConfiguration object itself. + */ + public SignalingConfiguration withNasEncryption(List nasEncryption) { + this.nasEncryption = nasEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nasReroute() != null) { + nasReroute().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("nasReroute", this.nasReroute); + jsonWriter.writeArrayField("nasEncryption", this.nasEncryption, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SignalingConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SignalingConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SignalingConfiguration. + */ + public static SignalingConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SignalingConfiguration deserializedSignalingConfiguration = new SignalingConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nasReroute".equals(fieldName)) { + deserializedSignalingConfiguration.nasReroute = NasRerouteConfiguration.fromJson(reader); + } else if ("nasEncryption".equals(fieldName)) { + List nasEncryption + = reader.readArray(reader1 -> NasEncryptionType.fromString(reader1.getString())); + deserializedSignalingConfiguration.nasEncryption = nasEncryption; + } else { + reader.skipChildren(); + } + } + + return deserializedSignalingConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sim.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sim.java new file mode 100644 index 000000000000..55a42dd6a565 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sim.java @@ -0,0 +1,441 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of Sim. + */ +public interface Sim { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the authenticationKey property: The Ki value for the SIM. + * + * @return the authenticationKey value. + */ + String authenticationKey(); + + /** + * Gets the operatorKeyCode property: The Opc value for the SIM. + * + * @return the operatorKeyCode value. + */ + String operatorKeyCode(); + + /** + * Gets the provisioningState property: The provisioning state of the SIM resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the simState property: The state of the SIM resource. + * + * @return the simState value. + */ + SimState simState(); + + /** + * Gets the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM on that + * site. + * + * @return the siteProvisioningState value. + */ + Map siteProvisioningState(); + + /** + * Gets the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for + * the SIM. + * + * @return the internationalMobileSubscriberIdentity value. + */ + String internationalMobileSubscriberIdentity(); + + /** + * Gets the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM. + * + * @return the integratedCircuitCardIdentifier value. + */ + String integratedCircuitCardIdentifier(); + + /** + * Gets the deviceType property: An optional free-form text field that can be used to record the device type this + * SIM is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based + * on this value. + * + * @return the deviceType value. + */ + String deviceType(); + + /** + * Gets the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the + * SIM. + * + * @return the simPolicy value. + */ + SimPolicyResourceId simPolicy(); + + /** + * Gets the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is + * assigned at a defined network scope, made up of {attached data network, slice}. + * + * @return the staticIpConfiguration value. + */ + List staticIpConfiguration(); + + /** + * Gets the vendorName property: The name of the SIM vendor who provided this SIM, if any. + * + * @return the vendorName value. + */ + String vendorName(); + + /** + * Gets the vendorKeyFingerprint property: The public key fingerprint of the SIM vendor who provided this SIM, if + * any. + * + * @return the vendorKeyFingerprint value. + */ + String vendorKeyFingerprint(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner object. + * + * @return the inner object. + */ + SimInner innerModel(); + + /** + * The entirety of the Sim definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithInternationalMobileSubscriberIdentity, DefinitionStages.WithCreate { + } + + /** + * The Sim definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Sim definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the Sim definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, simGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @return the next definition stage. + */ + WithInternationalMobileSubscriberIdentity withExistingSimGroup(String resourceGroupName, + String simGroupName); + } + + /** + * The stage of the Sim definition allowing to specify internationalMobileSubscriberIdentity. + */ + interface WithInternationalMobileSubscriberIdentity { + /** + * Specifies the internationalMobileSubscriberIdentity property: The international mobile subscriber + * identity (IMSI) for the SIM.. + * + * @param internationalMobileSubscriberIdentity The international mobile subscriber identity (IMSI) for the + * SIM. + * @return the next definition stage. + */ + WithCreate withInternationalMobileSubscriberIdentity(String internationalMobileSubscriberIdentity); + } + + /** + * The stage of the Sim definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithAuthenticationKey, DefinitionStages.WithOperatorKeyCode, + DefinitionStages.WithIntegratedCircuitCardIdentifier, DefinitionStages.WithDeviceType, + DefinitionStages.WithSimPolicy, DefinitionStages.WithStaticIpConfiguration { + /** + * Executes the create request. + * + * @return the created resource. + */ + Sim create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Sim create(Context context); + } + + /** + * The stage of the Sim definition allowing to specify authenticationKey. + */ + interface WithAuthenticationKey { + /** + * Specifies the authenticationKey property: The Ki value for the SIM.. + * + * @param authenticationKey The Ki value for the SIM. + * @return the next definition stage. + */ + WithCreate withAuthenticationKey(String authenticationKey); + } + + /** + * The stage of the Sim definition allowing to specify operatorKeyCode. + */ + interface WithOperatorKeyCode { + /** + * Specifies the operatorKeyCode property: The Opc value for the SIM.. + * + * @param operatorKeyCode The Opc value for the SIM. + * @return the next definition stage. + */ + WithCreate withOperatorKeyCode(String operatorKeyCode); + } + + /** + * The stage of the Sim definition allowing to specify integratedCircuitCardIdentifier. + */ + interface WithIntegratedCircuitCardIdentifier { + /** + * Specifies the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the + * SIM.. + * + * @param integratedCircuitCardIdentifier The integrated circuit card ID (ICCID) for the SIM. + * @return the next definition stage. + */ + WithCreate withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier); + } + + /** + * The stage of the Sim definition allowing to specify deviceType. + */ + interface WithDeviceType { + /** + * Specifies the deviceType property: An optional free-form text field that can be used to record the device + * type this SIM is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped + * and filtered based on this value.. + * + * @param deviceType An optional free-form text field that can be used to record the device type this SIM is + * associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered + * based on this value. + * @return the next definition stage. + */ + WithCreate withDeviceType(String deviceType); + } + + /** + * The stage of the Sim definition allowing to specify simPolicy. + */ + interface WithSimPolicy { + /** + * Specifies the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same + * location as the SIM.. + * + * @param simPolicy The SIM policy used by this SIM. The SIM policy must be in the same location as the SIM. + * @return the next definition stage. + */ + WithCreate withSimPolicy(SimPolicyResourceId simPolicy); + } + + /** + * The stage of the Sim definition allowing to specify staticIpConfiguration. + */ + interface WithStaticIpConfiguration { + /** + * Specifies the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each + * address is assigned at a defined network scope, made up of {attached data network, slice}.. + * + * @param staticIpConfiguration A list of static IP addresses assigned to this SIM. Each address is assigned + * at a defined network scope, made up of {attached data network, slice}. + * @return the next definition stage. + */ + WithCreate withStaticIpConfiguration(List staticIpConfiguration); + } + } + + /** + * Begins update for the Sim resource. + * + * @return the stage of resource update. + */ + Sim.Update update(); + + /** + * The template for Sim update. + */ + interface Update extends UpdateStages.WithAuthenticationKey, UpdateStages.WithOperatorKeyCode, + UpdateStages.WithIntegratedCircuitCardIdentifier, UpdateStages.WithDeviceType, UpdateStages.WithSimPolicy, + UpdateStages.WithStaticIpConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Sim apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Sim apply(Context context); + } + + /** + * The Sim update stages. + */ + interface UpdateStages { + /** + * The stage of the Sim update allowing to specify authenticationKey. + */ + interface WithAuthenticationKey { + /** + * Specifies the authenticationKey property: The Ki value for the SIM.. + * + * @param authenticationKey The Ki value for the SIM. + * @return the next definition stage. + */ + Update withAuthenticationKey(String authenticationKey); + } + + /** + * The stage of the Sim update allowing to specify operatorKeyCode. + */ + interface WithOperatorKeyCode { + /** + * Specifies the operatorKeyCode property: The Opc value for the SIM.. + * + * @param operatorKeyCode The Opc value for the SIM. + * @return the next definition stage. + */ + Update withOperatorKeyCode(String operatorKeyCode); + } + + /** + * The stage of the Sim update allowing to specify integratedCircuitCardIdentifier. + */ + interface WithIntegratedCircuitCardIdentifier { + /** + * Specifies the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the + * SIM.. + * + * @param integratedCircuitCardIdentifier The integrated circuit card ID (ICCID) for the SIM. + * @return the next definition stage. + */ + Update withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier); + } + + /** + * The stage of the Sim update allowing to specify deviceType. + */ + interface WithDeviceType { + /** + * Specifies the deviceType property: An optional free-form text field that can be used to record the device + * type this SIM is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped + * and filtered based on this value.. + * + * @param deviceType An optional free-form text field that can be used to record the device type this SIM is + * associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered + * based on this value. + * @return the next definition stage. + */ + Update withDeviceType(String deviceType); + } + + /** + * The stage of the Sim update allowing to specify simPolicy. + */ + interface WithSimPolicy { + /** + * Specifies the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same + * location as the SIM.. + * + * @param simPolicy The SIM policy used by this SIM. The SIM policy must be in the same location as the SIM. + * @return the next definition stage. + */ + Update withSimPolicy(SimPolicyResourceId simPolicy); + } + + /** + * The stage of the Sim update allowing to specify staticIpConfiguration. + */ + interface WithStaticIpConfiguration { + /** + * Specifies the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each + * address is assigned at a defined network scope, made up of {attached data network, slice}.. + * + * @param staticIpConfiguration A list of static IP addresses assigned to this SIM. Each address is assigned + * at a defined network scope, made up of {attached data network, slice}. + * @return the next definition stage. + */ + Update withStaticIpConfiguration(List staticIpConfiguration); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Sim refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Sim refresh(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimClone.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimClone.java new file mode 100644 index 000000000000..9b739a832238 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimClone.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SIMs to clone. + */ +@Fluent +public final class SimClone implements JsonSerializable { + /* + * The SIM Group where the SIMs should be cloned. + */ + private SimGroupResourceId targetSimGroupId; + + /* + * A list of SIM resource names to be cloned. + */ + private List sims; + + /** + * Creates an instance of SimClone class. + */ + public SimClone() { + } + + /** + * Get the targetSimGroupId property: The SIM Group where the SIMs should be cloned. + * + * @return the targetSimGroupId value. + */ + public SimGroupResourceId targetSimGroupId() { + return this.targetSimGroupId; + } + + /** + * Set the targetSimGroupId property: The SIM Group where the SIMs should be cloned. + * + * @param targetSimGroupId the targetSimGroupId value to set. + * @return the SimClone object itself. + */ + public SimClone withTargetSimGroupId(SimGroupResourceId targetSimGroupId) { + this.targetSimGroupId = targetSimGroupId; + return this; + } + + /** + * Get the sims property: A list of SIM resource names to be cloned. + * + * @return the sims value. + */ + public List sims() { + return this.sims; + } + + /** + * Set the sims property: A list of SIM resource names to be cloned. + * + * @param sims the sims value to set. + * @return the SimClone object itself. + */ + public SimClone withSims(List sims) { + this.sims = sims; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetSimGroupId() != null) { + targetSimGroupId().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("targetSimGroupId", this.targetSimGroupId); + jsonWriter.writeArrayField("sims", this.sims, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimClone from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimClone if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the SimClone. + */ + public static SimClone fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimClone deserializedSimClone = new SimClone(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetSimGroupId".equals(fieldName)) { + deserializedSimClone.targetSimGroupId = SimGroupResourceId.fromJson(reader); + } else if ("sims".equals(fieldName)) { + List sims = reader.readArray(reader1 -> reader1.getString()); + deserializedSimClone.sims = sims; + } else { + reader.skipChildren(); + } + } + + return deserializedSimClone; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimDeleteList.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimDeleteList.java new file mode 100644 index 000000000000..8555affdcf30 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimDeleteList.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SIMs to delete. + */ +@Fluent +public final class SimDeleteList implements JsonSerializable { + /* + * A list of SIM resource names to delete. + */ + private List sims; + + /** + * Creates an instance of SimDeleteList class. + */ + public SimDeleteList() { + } + + /** + * Get the sims property: A list of SIM resource names to delete. + * + * @return the sims value. + */ + public List sims() { + return this.sims; + } + + /** + * Set the sims property: A list of SIM resource names to delete. + * + * @param sims the sims value to set. + * @return the SimDeleteList object itself. + */ + public SimDeleteList withSims(List sims) { + this.sims = sims; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sims() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sims in model SimDeleteList")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimDeleteList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("sims", this.sims, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimDeleteList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimDeleteList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimDeleteList. + */ + public static SimDeleteList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimDeleteList deserializedSimDeleteList = new SimDeleteList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sims".equals(fieldName)) { + List sims = reader.readArray(reader1 -> reader1.getString()); + deserializedSimDeleteList.sims = sims; + } else { + reader.skipChildren(); + } + } + + return deserializedSimDeleteList; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroup.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroup.java new file mode 100644 index 000000000000..f669998423db --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroup.java @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import java.util.Map; + +/** + * An immutable client-side representation of SimGroup. + */ +public interface SimGroup { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the identity property: The identity used to retrieve the encryption key from Azure key vault. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the SIM group resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the encryptionKey property: A key to encrypt the SIM data that belongs to this SIM group. + * + * @return the encryptionKey value. + */ + KeyVaultKey encryptionKey(); + + /** + * Gets the mobileNetwork property: Mobile network that this SIM group belongs to. The mobile network must be in the + * same location as the SIM group. + * + * @return the mobileNetwork value. + */ + MobileNetworkResourceId mobileNetwork(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner object. + * + * @return the inner object. + */ + SimGroupInner innerModel(); + + /** + * The entirety of the SimGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The SimGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the SimGroup definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the SimGroup definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the SimGroup definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the SimGroup definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithEncryptionKey, DefinitionStages.WithMobileNetwork { + /** + * Executes the create request. + * + * @return the created resource. + */ + SimGroup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + SimGroup create(Context context); + } + + /** + * The stage of the SimGroup definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the SimGroup definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The identity used to retrieve the encryption key from Azure key vault.. + * + * @param identity The identity used to retrieve the encryption key from Azure key vault. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the SimGroup definition allowing to specify encryptionKey. + */ + interface WithEncryptionKey { + /** + * Specifies the encryptionKey property: A key to encrypt the SIM data that belongs to this SIM group.. + * + * @param encryptionKey A key to encrypt the SIM data that belongs to this SIM group. + * @return the next definition stage. + */ + WithCreate withEncryptionKey(KeyVaultKey encryptionKey); + } + + /** + * The stage of the SimGroup definition allowing to specify mobileNetwork. + */ + interface WithMobileNetwork { + /** + * Specifies the mobileNetwork property: Mobile network that this SIM group belongs to. The mobile network + * must be in the same location as the SIM group.. + * + * @param mobileNetwork Mobile network that this SIM group belongs to. The mobile network must be in the + * same location as the SIM group. + * @return the next definition stage. + */ + WithCreate withMobileNetwork(MobileNetworkResourceId mobileNetwork); + } + } + + /** + * Begins update for the SimGroup resource. + * + * @return the stage of resource update. + */ + SimGroup.Update update(); + + /** + * The template for SimGroup update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { + /** + * Executes the update request. + * + * @return the updated resource. + */ + SimGroup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + SimGroup apply(Context context); + } + + /** + * The SimGroup update stages. + */ + interface UpdateStages { + /** + * The stage of the SimGroup update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the SimGroup update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identity associated with this resource.. + * + * @param identity The managed service identity associated with this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + SimGroup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + SimGroup refresh(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroupListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroupListResult.java new file mode 100644 index 000000000000..8f104d883ec7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroupListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for list SIM groups API service call. + */ +@Fluent +public final class SimGroupListResult implements JsonSerializable { + /* + * A list of SIM groups in a resource group. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of SimGroupListResult class. + */ + public SimGroupListResult() { + } + + /** + * Get the value property: A list of SIM groups in a resource group. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of SIM groups in a resource group. + * + * @param value the value value to set. + * @return the SimGroupListResult object itself. + */ + public SimGroupListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimGroupListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SimGroupListResult. + */ + public static SimGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimGroupListResult deserializedSimGroupListResult = new SimGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SimGroupInner.fromJson(reader1)); + deserializedSimGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSimGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSimGroupListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroupResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroupResourceId.java new file mode 100644 index 000000000000..d456b37ab94c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroupResourceId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a SIM group resource. + */ +@Fluent +public final class SimGroupResourceId implements JsonSerializable { + /* + * SIM group resource ID. + */ + private String id; + + /** + * Creates an instance of SimGroupResourceId class. + */ + public SimGroupResourceId() { + } + + /** + * Get the id property: SIM group resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: SIM group resource ID. + * + * @param id the id value to set. + * @return the SimGroupResourceId object itself. + */ + public SimGroupResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model SimGroupResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimGroupResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimGroupResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimGroupResourceId if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimGroupResourceId. + */ + public static SimGroupResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimGroupResourceId deserializedSimGroupResourceId = new SimGroupResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSimGroupResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSimGroupResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroups.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroups.java new file mode 100644 index 000000000000..313d34cb8127 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroups.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of SimGroups. + */ +public interface SimGroups { + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String simGroupName); + + /** + * Deletes the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String simGroupName, Context context); + + /** + * Gets information about the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String simGroupName, Context context); + + /** + * Gets information about the specified SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group. + */ + SimGroup getByResourceGroup(String resourceGroupName, String simGroupName); + + /** + * Gets all the SIM groups in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets all the SIM groups in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets all the SIM groups in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM groups in a resource group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets information about the specified SIM group. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group along with {@link Response}. + */ + SimGroup getById(String id); + + /** + * Gets information about the specified SIM group. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM group along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified SIM group. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified SIM group. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new SimGroup resource. + * + * @param name resource name. + * @return the first stage of the new SimGroup definition. + */ + SimGroup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimListResult.java new file mode 100644 index 000000000000..062473df702e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for list SIMs API service call. + */ +@Fluent +public final class SimListResult implements JsonSerializable { + /* + * A list of SIMs in a resource group. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of SimListResult class. + */ + public SimListResult() { + } + + /** + * Get the value property: A list of SIMs in a resource group. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of SIMs in a resource group. + * + * @param value the value value to set. + * @return the SimListResult object itself. + */ + public SimListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SimListResult. + */ + public static SimListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimListResult deserializedSimListResult = new SimListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SimInner.fromJson(reader1)); + deserializedSimListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSimListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSimListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimMove.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimMove.java new file mode 100644 index 000000000000..999ac8a79ccd --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimMove.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SIMs to move. + */ +@Fluent +public final class SimMove implements JsonSerializable { + /* + * The SIM Group where the SIMs should be moved. + */ + private SimGroupResourceId targetSimGroupId; + + /* + * A list of SIM resource names to be moved. + */ + private List sims; + + /** + * Creates an instance of SimMove class. + */ + public SimMove() { + } + + /** + * Get the targetSimGroupId property: The SIM Group where the SIMs should be moved. + * + * @return the targetSimGroupId value. + */ + public SimGroupResourceId targetSimGroupId() { + return this.targetSimGroupId; + } + + /** + * Set the targetSimGroupId property: The SIM Group where the SIMs should be moved. + * + * @param targetSimGroupId the targetSimGroupId value to set. + * @return the SimMove object itself. + */ + public SimMove withTargetSimGroupId(SimGroupResourceId targetSimGroupId) { + this.targetSimGroupId = targetSimGroupId; + return this; + } + + /** + * Get the sims property: A list of SIM resource names to be moved. + * + * @return the sims value. + */ + public List sims() { + return this.sims; + } + + /** + * Set the sims property: A list of SIM resource names to be moved. + * + * @param sims the sims value to set. + * @return the SimMove object itself. + */ + public SimMove withSims(List sims) { + this.sims = sims; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetSimGroupId() != null) { + targetSimGroupId().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("targetSimGroupId", this.targetSimGroupId); + jsonWriter.writeArrayField("sims", this.sims, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimMove from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimMove if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the SimMove. + */ + public static SimMove fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimMove deserializedSimMove = new SimMove(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetSimGroupId".equals(fieldName)) { + deserializedSimMove.targetSimGroupId = SimGroupResourceId.fromJson(reader); + } else if ("sims".equals(fieldName)) { + List sims = reader.readArray(reader1 -> reader1.getString()); + deserializedSimMove.sims = sims; + } else { + reader.skipChildren(); + } + } + + return deserializedSimMove; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimNameAndEncryptedProperties.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimNameAndEncryptedProperties.java new file mode 100644 index 000000000000..13ff4cd38cbc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimNameAndEncryptedProperties.java @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.EncryptedSimPropertiesFormat; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * SIM name and encrypted properties. + */ +@Fluent +public final class SimNameAndEncryptedProperties implements JsonSerializable { + /* + * The name of the SIM. + */ + private String name; + + /* + * Encrypted SIM Properties. + */ + private EncryptedSimPropertiesFormat innerProperties = new EncryptedSimPropertiesFormat(); + + /** + * Creates an instance of SimNameAndEncryptedProperties class. + */ + public SimNameAndEncryptedProperties() { + } + + /** + * Get the name property: The name of the SIM. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the SIM. + * + * @param name the name value to set. + * @return the SimNameAndEncryptedProperties object itself. + */ + public SimNameAndEncryptedProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the innerProperties property: Encrypted SIM Properties. + * + * @return the innerProperties value. + */ + private EncryptedSimPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the encryptedCredentials property: The encrypted SIM credentials. + * + * @return the encryptedCredentials value. + */ + public String encryptedCredentials() { + return this.innerProperties() == null ? null : this.innerProperties().encryptedCredentials(); + } + + /** + * Set the encryptedCredentials property: The encrypted SIM credentials. + * + * @param encryptedCredentials the encryptedCredentials value to set. + * @return the SimNameAndEncryptedProperties object itself. + */ + public SimNameAndEncryptedProperties withEncryptedCredentials(String encryptedCredentials) { + if (this.innerProperties() == null) { + this.innerProperties = new EncryptedSimPropertiesFormat(); + } + this.innerProperties().withEncryptedCredentials(encryptedCredentials); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the SIM resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the simState property: The state of the SIM resource. + * + * @return the simState value. + */ + public SimState simState() { + return this.innerProperties() == null ? null : this.innerProperties().simState(); + } + + /** + * Get the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM on that site. + * + * @return the siteProvisioningState value. + */ + public Map siteProvisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().siteProvisioningState(); + } + + /** + * Get the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for + * the SIM. + * + * @return the internationalMobileSubscriberIdentity value. + */ + public String internationalMobileSubscriberIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().internationalMobileSubscriberIdentity(); + } + + /** + * Set the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for + * the SIM. + * + * @param internationalMobileSubscriberIdentity the internationalMobileSubscriberIdentity value to set. + * @return the SimNameAndEncryptedProperties object itself. + */ + public SimNameAndEncryptedProperties + withInternationalMobileSubscriberIdentity(String internationalMobileSubscriberIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new EncryptedSimPropertiesFormat(); + } + this.innerProperties().withInternationalMobileSubscriberIdentity(internationalMobileSubscriberIdentity); + return this; + } + + /** + * Get the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM. + * + * @return the integratedCircuitCardIdentifier value. + */ + public String integratedCircuitCardIdentifier() { + return this.innerProperties() == null ? null : this.innerProperties().integratedCircuitCardIdentifier(); + } + + /** + * Set the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM. + * + * @param integratedCircuitCardIdentifier the integratedCircuitCardIdentifier value to set. + * @return the SimNameAndEncryptedProperties object itself. + */ + public SimNameAndEncryptedProperties withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier) { + if (this.innerProperties() == null) { + this.innerProperties = new EncryptedSimPropertiesFormat(); + } + this.innerProperties().withIntegratedCircuitCardIdentifier(integratedCircuitCardIdentifier); + return this; + } + + /** + * Get the deviceType property: An optional free-form text field that can be used to record the device type this SIM + * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on + * this value. + * + * @return the deviceType value. + */ + public String deviceType() { + return this.innerProperties() == null ? null : this.innerProperties().deviceType(); + } + + /** + * Set the deviceType property: An optional free-form text field that can be used to record the device type this SIM + * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on + * this value. + * + * @param deviceType the deviceType value to set. + * @return the SimNameAndEncryptedProperties object itself. + */ + public SimNameAndEncryptedProperties withDeviceType(String deviceType) { + if (this.innerProperties() == null) { + this.innerProperties = new EncryptedSimPropertiesFormat(); + } + this.innerProperties().withDeviceType(deviceType); + return this; + } + + /** + * Get the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the + * SIM. + * + * @return the simPolicy value. + */ + public SimPolicyResourceId simPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().simPolicy(); + } + + /** + * Set the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the + * SIM. + * + * @param simPolicy the simPolicy value to set. + * @return the SimNameAndEncryptedProperties object itself. + */ + public SimNameAndEncryptedProperties withSimPolicy(SimPolicyResourceId simPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new EncryptedSimPropertiesFormat(); + } + this.innerProperties().withSimPolicy(simPolicy); + return this; + } + + /** + * Get the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is + * assigned at a defined network scope, made up of {attached data network, slice}. + * + * @return the staticIpConfiguration value. + */ + public List staticIpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticIpConfiguration(); + } + + /** + * Set the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is + * assigned at a defined network scope, made up of {attached data network, slice}. + * + * @param staticIpConfiguration the staticIpConfiguration value to set. + * @return the SimNameAndEncryptedProperties object itself. + */ + public SimNameAndEncryptedProperties withStaticIpConfiguration(List staticIpConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new EncryptedSimPropertiesFormat(); + } + this.innerProperties().withStaticIpConfiguration(staticIpConfiguration); + return this; + } + + /** + * Get the vendorName property: The name of the SIM vendor who provided this SIM, if any. + * + * @return the vendorName value. + */ + public String vendorName() { + return this.innerProperties() == null ? null : this.innerProperties().vendorName(); + } + + /** + * Get the vendorKeyFingerprint property: The public key fingerprint of the SIM vendor who provided this SIM, if + * any. + * + * @return the vendorKeyFingerprint value. + */ + public String vendorKeyFingerprint() { + return this.innerProperties() == null ? null : this.innerProperties().vendorKeyFingerprint(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model SimNameAndEncryptedProperties")); + } + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model SimNameAndEncryptedProperties")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimNameAndEncryptedProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimNameAndEncryptedProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimNameAndEncryptedProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimNameAndEncryptedProperties. + */ + public static SimNameAndEncryptedProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimNameAndEncryptedProperties deserializedSimNameAndEncryptedProperties + = new SimNameAndEncryptedProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSimNameAndEncryptedProperties.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSimNameAndEncryptedProperties.innerProperties + = EncryptedSimPropertiesFormat.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSimNameAndEncryptedProperties; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimNameAndProperties.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimNameAndProperties.java new file mode 100644 index 000000000000..6d827d74c009 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimNameAndProperties.java @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPropertiesFormat; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * SIM name and properties. + */ +@Fluent +public final class SimNameAndProperties implements JsonSerializable { + /* + * The name of the SIM. + */ + private String name; + + /* + * SIM Properties. + */ + private SimPropertiesFormat innerProperties = new SimPropertiesFormat(); + + /** + * Creates an instance of SimNameAndProperties class. + */ + public SimNameAndProperties() { + } + + /** + * Get the name property: The name of the SIM. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the SIM. + * + * @param name the name value to set. + * @return the SimNameAndProperties object itself. + */ + public SimNameAndProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the innerProperties property: SIM Properties. + * + * @return the innerProperties value. + */ + private SimPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the authenticationKey property: The Ki value for the SIM. + * + * @return the authenticationKey value. + */ + public String authenticationKey() { + return this.innerProperties() == null ? null : this.innerProperties().authenticationKey(); + } + + /** + * Set the authenticationKey property: The Ki value for the SIM. + * + * @param authenticationKey the authenticationKey value to set. + * @return the SimNameAndProperties object itself. + */ + public SimNameAndProperties withAuthenticationKey(String authenticationKey) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withAuthenticationKey(authenticationKey); + return this; + } + + /** + * Get the operatorKeyCode property: The Opc value for the SIM. + * + * @return the operatorKeyCode value. + */ + public String operatorKeyCode() { + return this.innerProperties() == null ? null : this.innerProperties().operatorKeyCode(); + } + + /** + * Set the operatorKeyCode property: The Opc value for the SIM. + * + * @param operatorKeyCode the operatorKeyCode value to set. + * @return the SimNameAndProperties object itself. + */ + public SimNameAndProperties withOperatorKeyCode(String operatorKeyCode) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withOperatorKeyCode(operatorKeyCode); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the SIM resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the simState property: The state of the SIM resource. + * + * @return the simState value. + */ + public SimState simState() { + return this.innerProperties() == null ? null : this.innerProperties().simState(); + } + + /** + * Get the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM on that site. + * + * @return the siteProvisioningState value. + */ + public Map siteProvisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().siteProvisioningState(); + } + + /** + * Get the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for + * the SIM. + * + * @return the internationalMobileSubscriberIdentity value. + */ + public String internationalMobileSubscriberIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().internationalMobileSubscriberIdentity(); + } + + /** + * Set the internationalMobileSubscriberIdentity property: The international mobile subscriber identity (IMSI) for + * the SIM. + * + * @param internationalMobileSubscriberIdentity the internationalMobileSubscriberIdentity value to set. + * @return the SimNameAndProperties object itself. + */ + public SimNameAndProperties + withInternationalMobileSubscriberIdentity(String internationalMobileSubscriberIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withInternationalMobileSubscriberIdentity(internationalMobileSubscriberIdentity); + return this; + } + + /** + * Get the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM. + * + * @return the integratedCircuitCardIdentifier value. + */ + public String integratedCircuitCardIdentifier() { + return this.innerProperties() == null ? null : this.innerProperties().integratedCircuitCardIdentifier(); + } + + /** + * Set the integratedCircuitCardIdentifier property: The integrated circuit card ID (ICCID) for the SIM. + * + * @param integratedCircuitCardIdentifier the integratedCircuitCardIdentifier value to set. + * @return the SimNameAndProperties object itself. + */ + public SimNameAndProperties withIntegratedCircuitCardIdentifier(String integratedCircuitCardIdentifier) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withIntegratedCircuitCardIdentifier(integratedCircuitCardIdentifier); + return this; + } + + /** + * Get the deviceType property: An optional free-form text field that can be used to record the device type this SIM + * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on + * this value. + * + * @return the deviceType value. + */ + public String deviceType() { + return this.innerProperties() == null ? null : this.innerProperties().deviceType(); + } + + /** + * Set the deviceType property: An optional free-form text field that can be used to record the device type this SIM + * is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on + * this value. + * + * @param deviceType the deviceType value to set. + * @return the SimNameAndProperties object itself. + */ + public SimNameAndProperties withDeviceType(String deviceType) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withDeviceType(deviceType); + return this; + } + + /** + * Get the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the + * SIM. + * + * @return the simPolicy value. + */ + public SimPolicyResourceId simPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().simPolicy(); + } + + /** + * Set the simPolicy property: The SIM policy used by this SIM. The SIM policy must be in the same location as the + * SIM. + * + * @param simPolicy the simPolicy value to set. + * @return the SimNameAndProperties object itself. + */ + public SimNameAndProperties withSimPolicy(SimPolicyResourceId simPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withSimPolicy(simPolicy); + return this; + } + + /** + * Get the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is + * assigned at a defined network scope, made up of {attached data network, slice}. + * + * @return the staticIpConfiguration value. + */ + public List staticIpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticIpConfiguration(); + } + + /** + * Set the staticIpConfiguration property: A list of static IP addresses assigned to this SIM. Each address is + * assigned at a defined network scope, made up of {attached data network, slice}. + * + * @param staticIpConfiguration the staticIpConfiguration value to set. + * @return the SimNameAndProperties object itself. + */ + public SimNameAndProperties withStaticIpConfiguration(List staticIpConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SimPropertiesFormat(); + } + this.innerProperties().withStaticIpConfiguration(staticIpConfiguration); + return this; + } + + /** + * Get the vendorName property: The name of the SIM vendor who provided this SIM, if any. + * + * @return the vendorName value. + */ + public String vendorName() { + return this.innerProperties() == null ? null : this.innerProperties().vendorName(); + } + + /** + * Get the vendorKeyFingerprint property: The public key fingerprint of the SIM vendor who provided this SIM, if + * any. + * + * @return the vendorKeyFingerprint value. + */ + public String vendorKeyFingerprint() { + return this.innerProperties() == null ? null : this.innerProperties().vendorKeyFingerprint(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model SimNameAndProperties")); + } + if (innerProperties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model SimNameAndProperties")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimNameAndProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimNameAndProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimNameAndProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimNameAndProperties. + */ + public static SimNameAndProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimNameAndProperties deserializedSimNameAndProperties = new SimNameAndProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSimNameAndProperties.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSimNameAndProperties.innerProperties = SimPropertiesFormat.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSimNameAndProperties; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicies.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicies.java new file mode 100644 index 000000000000..8e12370761e8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicies.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of SimPolicies. + */ +public interface SimPolicies { + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName); + + /** + * Deletes the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String simPolicyName, Context context); + + /** + * Gets information about the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String mobileNetworkName, String simPolicyName, + Context context); + + /** + * Gets information about the specified SIM policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param simPolicyName The name of the SIM policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy. + */ + SimPolicy get(String resourceGroupName, String mobileNetworkName, String simPolicyName); + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Gets all the SIM policies in a mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIM policies in a mobile network as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Gets information about the specified SIM policy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy along with {@link Response}. + */ + SimPolicy getById(String id); + + /** + * Gets information about the specified SIM policy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM policy along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified SIM policy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified SIM policy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new SimPolicy resource. + * + * @param name resource name. + * @return the first stage of the new SimPolicy definition. + */ + SimPolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicy.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicy.java new file mode 100644 index 000000000000..17849a0d4628 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicy.java @@ -0,0 +1,367 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of SimPolicy. + */ +public interface SimPolicy { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the SIM policy resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the siteProvisioningState property: A dictionary of sites to the provisioning state of this SIM policy on + * that site. + * + * @return the siteProvisioningState value. + */ + Map siteProvisioningState(); + + /** + * Gets the ueAmbr property: Aggregate maximum bit rate across all non-GBR QoS flows of all PDU sessions of a given + * UE. See 3GPP TS23.501 section 5.7.2.6 for a full description of the UE-AMBR. + * + * @return the ueAmbr value. + */ + Ambr ueAmbr(); + + /** + * Gets the defaultSlice property: The default slice to use if the UE does not explicitly specify it. This slice + * must exist in the `sliceConfigurations` map. The slice must be in the same location as the SIM policy. + * + * @return the defaultSlice value. + */ + SliceResourceId defaultSlice(); + + /** + * Gets the rfspIndex property: RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an + * optional setting and by default is unspecified. + * + * @return the rfspIndex value. + */ + Integer rfspIndex(); + + /** + * Gets the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. + * + * @return the registrationTimer value. + */ + Integer registrationTimer(); + + /** + * Gets the sliceConfigurations property: The allowed slices and the settings to use for them. The list must not + * contain duplicate items and must contain at least one item. + * + * @return the sliceConfigurations value. + */ + List sliceConfigurations(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyInner object. + * + * @return the inner object. + */ + SimPolicyInner innerModel(); + + /** + * The entirety of the SimPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithUeAmbr, DefinitionStages.WithDefaultSlice, + DefinitionStages.WithSliceConfigurations, DefinitionStages.WithCreate { + } + + /** + * The SimPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the SimPolicy definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the SimPolicy definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the SimPolicy definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, mobileNetworkName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @return the next definition stage. + */ + WithUeAmbr withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName); + } + + /** + * The stage of the SimPolicy definition allowing to specify ueAmbr. + */ + interface WithUeAmbr { + /** + * Specifies the ueAmbr property: Aggregate maximum bit rate across all non-GBR QoS flows of all PDU + * sessions of a given UE. See 3GPP TS23.501 section 5.7.2.6 for a full description of the UE-AMBR.. + * + * @param ueAmbr Aggregate maximum bit rate across all non-GBR QoS flows of all PDU sessions of a given UE. + * See 3GPP TS23.501 section 5.7.2.6 for a full description of the UE-AMBR. + * @return the next definition stage. + */ + WithDefaultSlice withUeAmbr(Ambr ueAmbr); + } + + /** + * The stage of the SimPolicy definition allowing to specify defaultSlice. + */ + interface WithDefaultSlice { + /** + * Specifies the defaultSlice property: The default slice to use if the UE does not explicitly specify it. + * This slice must exist in the `sliceConfigurations` map. The slice must be in the same location as the SIM + * policy.. + * + * @param defaultSlice The default slice to use if the UE does not explicitly specify it. This slice must + * exist in the `sliceConfigurations` map. The slice must be in the same location as the SIM policy. + * @return the next definition stage. + */ + WithSliceConfigurations withDefaultSlice(SliceResourceId defaultSlice); + } + + /** + * The stage of the SimPolicy definition allowing to specify sliceConfigurations. + */ + interface WithSliceConfigurations { + /** + * Specifies the sliceConfigurations property: The allowed slices and the settings to use for them. The list + * must not contain duplicate items and must contain at least one item.. + * + * @param sliceConfigurations The allowed slices and the settings to use for them. The list must not contain + * duplicate items and must contain at least one item. + * @return the next definition stage. + */ + WithCreate withSliceConfigurations(List sliceConfigurations); + } + + /** + * The stage of the SimPolicy definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithRfspIndex, DefinitionStages.WithRegistrationTimer { + /** + * Executes the create request. + * + * @return the created resource. + */ + SimPolicy create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + SimPolicy create(Context context); + } + + /** + * The stage of the SimPolicy definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the SimPolicy definition allowing to specify rfspIndex. + */ + interface WithRfspIndex { + /** + * Specifies the rfspIndex property: RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This + * is an optional setting and by default is unspecified.. + * + * @param rfspIndex RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an optional + * setting and by default is unspecified. + * @return the next definition stage. + */ + WithCreate withRfspIndex(Integer rfspIndex); + } + + /** + * The stage of the SimPolicy definition allowing to specify registrationTimer. + */ + interface WithRegistrationTimer { + /** + * Specifies the registrationTimer property: UE periodic registration update timer (5G) or UE periodic + * tracking area update timer (4G), in seconds.. + * + * @param registrationTimer UE periodic registration update timer (5G) or UE periodic tracking area update + * timer (4G), in seconds. + * @return the next definition stage. + */ + WithCreate withRegistrationTimer(Integer registrationTimer); + } + } + + /** + * Begins update for the SimPolicy resource. + * + * @return the stage of resource update. + */ + SimPolicy.Update update(); + + /** + * The template for SimPolicy update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + SimPolicy apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + SimPolicy apply(Context context); + } + + /** + * The SimPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the SimPolicy update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + SimPolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + SimPolicy refresh(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicyListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicyListResult.java new file mode 100644 index 000000000000..cb4100a8b769 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicyListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for SIM policies API service call. + */ +@Fluent +public final class SimPolicyListResult implements JsonSerializable { + /* + * A list of SIM policies. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of SimPolicyListResult class. + */ + public SimPolicyListResult() { + } + + /** + * Get the value property: A list of SIM policies. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of SIM policies. + * + * @param value the value value to set. + * @return the SimPolicyListResult object itself. + */ + public SimPolicyListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimPolicyListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SimPolicyListResult. + */ + public static SimPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimPolicyListResult deserializedSimPolicyListResult = new SimPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SimPolicyInner.fromJson(reader1)); + deserializedSimPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSimPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSimPolicyListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicyResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicyResourceId.java new file mode 100644 index 000000000000..5e2f795056e8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicyResourceId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a SIM policy resource. + */ +@Fluent +public final class SimPolicyResourceId implements JsonSerializable { + /* + * SIM policy resource ID. + */ + private String id; + + /** + * Creates an instance of SimPolicyResourceId class. + */ + public SimPolicyResourceId() { + } + + /** + * Get the id property: SIM policy resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: SIM policy resource ID. + * + * @param id the id value to set. + * @return the SimPolicyResourceId object itself. + */ + public SimPolicyResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model SimPolicyResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimPolicyResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimPolicyResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimPolicyResourceId if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimPolicyResourceId. + */ + public static SimPolicyResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimPolicyResourceId deserializedSimPolicyResourceId = new SimPolicyResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSimPolicyResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSimPolicyResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimState.java new file mode 100644 index 000000000000..88cf448f4c55 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state of the SIM resource. + */ +public final class SimState extends ExpandableStringEnum { + /** + * Static value Disabled for SimState. + */ + public static final SimState DISABLED = fromString("Disabled"); + + /** + * Static value Enabled for SimState. + */ + public static final SimState ENABLED = fromString("Enabled"); + + /** + * Static value Invalid for SimState. + */ + public static final SimState INVALID = fromString("Invalid"); + + /** + * Creates a new instance of SimState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SimState() { + } + + /** + * Creates or finds a SimState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SimState. + */ + public static SimState fromString(String name) { + return fromString(name, SimState.class); + } + + /** + * Gets known SimState values. + * + * @return known SimState values. + */ + public static Collection values() { + return values(SimState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimStaticIpProperties.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimStaticIpProperties.java new file mode 100644 index 000000000000..39840b95b723 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimStaticIpProperties.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Static IP configuration for a SIM, scoped to a particular attached data network and slice. + */ +@Fluent +public final class SimStaticIpProperties implements JsonSerializable { + /* + * The attached data network on which the static IP address will be used. The combination of attached data network + * and slice defines the network scope of the IP address. The attached data network must be in the same location as + * the SIM. + */ + private AttachedDataNetworkResourceId attachedDataNetwork; + + /* + * The network slice on which the static IP address will be used. The combination of attached data network and slice + * defines the network scope of the IP address. The slice must be in the same location as the SIM. + */ + private SliceResourceId slice; + + /* + * The static IP configuration for the SIM to use at the defined network scope. + */ + private SimStaticIpPropertiesStaticIp staticIp; + + /** + * Creates an instance of SimStaticIpProperties class. + */ + public SimStaticIpProperties() { + } + + /** + * Get the attachedDataNetwork property: The attached data network on which the static IP address will be used. The + * combination of attached data network and slice defines the network scope of the IP address. The attached data + * network must be in the same location as the SIM. + * + * @return the attachedDataNetwork value. + */ + public AttachedDataNetworkResourceId attachedDataNetwork() { + return this.attachedDataNetwork; + } + + /** + * Set the attachedDataNetwork property: The attached data network on which the static IP address will be used. The + * combination of attached data network and slice defines the network scope of the IP address. The attached data + * network must be in the same location as the SIM. + * + * @param attachedDataNetwork the attachedDataNetwork value to set. + * @return the SimStaticIpProperties object itself. + */ + public SimStaticIpProperties withAttachedDataNetwork(AttachedDataNetworkResourceId attachedDataNetwork) { + this.attachedDataNetwork = attachedDataNetwork; + return this; + } + + /** + * Get the slice property: The network slice on which the static IP address will be used. The combination of + * attached data network and slice defines the network scope of the IP address. The slice must be in the same + * location as the SIM. + * + * @return the slice value. + */ + public SliceResourceId slice() { + return this.slice; + } + + /** + * Set the slice property: The network slice on which the static IP address will be used. The combination of + * attached data network and slice defines the network scope of the IP address. The slice must be in the same + * location as the SIM. + * + * @param slice the slice value to set. + * @return the SimStaticIpProperties object itself. + */ + public SimStaticIpProperties withSlice(SliceResourceId slice) { + this.slice = slice; + return this; + } + + /** + * Get the staticIp property: The static IP configuration for the SIM to use at the defined network scope. + * + * @return the staticIp value. + */ + public SimStaticIpPropertiesStaticIp staticIp() { + return this.staticIp; + } + + /** + * Set the staticIp property: The static IP configuration for the SIM to use at the defined network scope. + * + * @param staticIp the staticIp value to set. + * @return the SimStaticIpProperties object itself. + */ + public SimStaticIpProperties withStaticIp(SimStaticIpPropertiesStaticIp staticIp) { + this.staticIp = staticIp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (attachedDataNetwork() != null) { + attachedDataNetwork().validate(); + } + if (slice() != null) { + slice().validate(); + } + if (staticIp() != null) { + staticIp().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("attachedDataNetwork", this.attachedDataNetwork); + jsonWriter.writeJsonField("slice", this.slice); + jsonWriter.writeJsonField("staticIp", this.staticIp); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimStaticIpProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimStaticIpProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SimStaticIpProperties. + */ + public static SimStaticIpProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimStaticIpProperties deserializedSimStaticIpProperties = new SimStaticIpProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("attachedDataNetwork".equals(fieldName)) { + deserializedSimStaticIpProperties.attachedDataNetwork + = AttachedDataNetworkResourceId.fromJson(reader); + } else if ("slice".equals(fieldName)) { + deserializedSimStaticIpProperties.slice = SliceResourceId.fromJson(reader); + } else if ("staticIp".equals(fieldName)) { + deserializedSimStaticIpProperties.staticIp = SimStaticIpPropertiesStaticIp.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSimStaticIpProperties; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimStaticIpPropertiesStaticIp.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimStaticIpPropertiesStaticIp.java new file mode 100644 index 000000000000..31047c594dcc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimStaticIpPropertiesStaticIp.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The static IP configuration for the SIM to use at the defined network scope. + */ +@Fluent +public final class SimStaticIpPropertiesStaticIp implements JsonSerializable { + /* + * The IPv4 address assigned to the SIM at this network scope. This address must be in the + * userEquipmentStaticAddressPoolPrefix defined in the attached data network. + */ + private String ipv4Address; + + /** + * Creates an instance of SimStaticIpPropertiesStaticIp class. + */ + public SimStaticIpPropertiesStaticIp() { + } + + /** + * Get the ipv4Address property: The IPv4 address assigned to the SIM at this network scope. This address must be in + * the userEquipmentStaticAddressPoolPrefix defined in the attached data network. + * + * @return the ipv4Address value. + */ + public String ipv4Address() { + return this.ipv4Address; + } + + /** + * Set the ipv4Address property: The IPv4 address assigned to the SIM at this network scope. This address must be in + * the userEquipmentStaticAddressPoolPrefix defined in the attached data network. + * + * @param ipv4Address the ipv4Address value to set. + * @return the SimStaticIpPropertiesStaticIp object itself. + */ + public SimStaticIpPropertiesStaticIp withIpv4Address(String ipv4Address) { + this.ipv4Address = ipv4Address; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipv4Address", this.ipv4Address); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimStaticIpPropertiesStaticIp from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimStaticIpPropertiesStaticIp if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SimStaticIpPropertiesStaticIp. + */ + public static SimStaticIpPropertiesStaticIp fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimStaticIpPropertiesStaticIp deserializedSimStaticIpPropertiesStaticIp + = new SimStaticIpPropertiesStaticIp(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipv4Address".equals(fieldName)) { + deserializedSimStaticIpPropertiesStaticIp.ipv4Address = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSimStaticIpPropertiesStaticIp; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimUploadList.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimUploadList.java new file mode 100644 index 000000000000..cf1b3203b5c9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimUploadList.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SIMs to upload. + */ +@Fluent +public final class SimUploadList implements JsonSerializable { + /* + * A list of SIMs to upload. + */ + private List sims; + + /** + * Creates an instance of SimUploadList class. + */ + public SimUploadList() { + } + + /** + * Get the sims property: A list of SIMs to upload. + * + * @return the sims value. + */ + public List sims() { + return this.sims; + } + + /** + * Set the sims property: A list of SIMs to upload. + * + * @param sims the sims value to set. + * @return the SimUploadList object itself. + */ + public SimUploadList withSims(List sims) { + this.sims = sims; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sims() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sims in model SimUploadList")); + } else { + sims().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SimUploadList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("sims", this.sims, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SimUploadList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SimUploadList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SimUploadList. + */ + public static SimUploadList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SimUploadList deserializedSimUploadList = new SimUploadList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sims".equals(fieldName)) { + List sims + = reader.readArray(reader1 -> SimNameAndProperties.fromJson(reader1)); + deserializedSimUploadList.sims = sims; + } else { + reader.skipChildren(); + } + } + + return deserializedSimUploadList; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sims.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sims.java new file mode 100644 index 000000000000..20a0724e4b77 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sims.java @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Sims. + */ +public interface Sims { + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String simGroupName, String simName); + + /** + * Deletes the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String simGroupName, String simName, Context context); + + /** + * Gets information about the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String simGroupName, String simName, Context context); + + /** + * Gets information about the specified SIM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param simName The name of the SIM. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM. + */ + Sim get(String resourceGroupName, String simGroupName, String simName); + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByGroup(String resourceGroupName, String simGroupName); + + /** + * Gets all the SIMs in a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the SIMs in a SIM group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByGroup(String resourceGroupName, String simGroupName, Context context); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters, + Context context); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters, + Context context); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkUploadEncrypted(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkUploadEncrypted(String resourceGroupName, String simGroupName, + EncryptedSimUploadList parameters, Context context); + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus move(String resourceGroupName, String simGroupName, SimMove parameters); + + /** + * Move SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to move the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus move(String resourceGroupName, String simGroupName, SimMove parameters, Context context); + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus clone(String resourceGroupName, String simGroupName, SimClone parameters); + + /** + * Clone SIMs to another SIM Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to clone the SIMs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus clone(String resourceGroupName, String simGroupName, SimClone parameters, Context context); + + /** + * Gets information about the specified SIM. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM along with {@link Response}. + */ + Sim getById(String id); + + /** + * Gets information about the specified SIM. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified SIM along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified SIM. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified SIM. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Sim resource. + * + * @param name resource name. + * @return the first stage of the new Sim definition. + */ + Sim.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Site.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Site.java new file mode 100644 index 000000000000..2e24838b1f54 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Site.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SubResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of Site. + */ +public interface Site { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the site resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the networkFunctions property: An array of IDs of the network functions deployed in the site. Deleting the + * site will delete any network functions that are deployed in the site. + * + * @return the networkFunctions value. + */ + List networkFunctions(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner object. + * + * @return the inner object. + */ + SiteInner innerModel(); + + /** + * The entirety of the Site definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Site definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Site definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Site definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the Site definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, mobileNetworkName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @return the next definition stage. + */ + WithCreate withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName); + } + + /** + * The stage of the Site definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags { + /** + * Executes the create request. + * + * @return the created resource. + */ + Site create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Site create(Context context); + } + + /** + * The stage of the Site definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + } + + /** + * Begins update for the Site resource. + * + * @return the stage of resource update. + */ + Site.Update update(); + + /** + * The template for Site update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Site apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Site apply(Context context); + } + + /** + * The Site update stages. + */ + interface UpdateStages { + /** + * The stage of the Site update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Site refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Site refresh(Context context); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param parameters Parameters supplied to delete a packet core under a site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePacketCore(SiteDeletePacketCore parameters); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param parameters Parameters supplied to delete a packet core under a site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePacketCore(SiteDeletePacketCore parameters, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteDeletePacketCore.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteDeletePacketCore.java new file mode 100644 index 000000000000..c7f32e30fdbd --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteDeletePacketCore.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The packet core to delete under a site. + */ +@Fluent +public final class SiteDeletePacketCore implements JsonSerializable { + /* + * Reference to an packet core control plane resource. + */ + private PacketCoreControlPlaneResourceId packetCore; + + /** + * Creates an instance of SiteDeletePacketCore class. + */ + public SiteDeletePacketCore() { + } + + /** + * Get the packetCore property: Reference to an packet core control plane resource. + * + * @return the packetCore value. + */ + public PacketCoreControlPlaneResourceId packetCore() { + return this.packetCore; + } + + /** + * Set the packetCore property: Reference to an packet core control plane resource. + * + * @param packetCore the packetCore value to set. + * @return the SiteDeletePacketCore object itself. + */ + public SiteDeletePacketCore withPacketCore(PacketCoreControlPlaneResourceId packetCore) { + this.packetCore = packetCore; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (packetCore() != null) { + packetCore().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("packetCore", this.packetCore); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SiteDeletePacketCore from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SiteDeletePacketCore if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SiteDeletePacketCore. + */ + public static SiteDeletePacketCore fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SiteDeletePacketCore deserializedSiteDeletePacketCore = new SiteDeletePacketCore(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("packetCore".equals(fieldName)) { + deserializedSiteDeletePacketCore.packetCore = PacketCoreControlPlaneResourceId.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSiteDeletePacketCore; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteListResult.java new file mode 100644 index 000000000000..ebea7341331b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for sites API service call. + */ +@Fluent +public final class SiteListResult implements JsonSerializable { + /* + * A list of sites in a mobile network. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of SiteListResult class. + */ + public SiteListResult() { + } + + /** + * Get the value property: A list of sites in a mobile network. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of sites in a mobile network. + * + * @param value the value value to set. + * @return the SiteListResult object itself. + */ + public SiteListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SiteListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SiteListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SiteListResult. + */ + public static SiteListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SiteListResult deserializedSiteListResult = new SiteListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SiteInner.fromJson(reader1)); + deserializedSiteListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSiteListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSiteListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteProvisioningState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteProvisioningState.java new file mode 100644 index 000000000000..e1b170c42574 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of a resource e.g. SIM/SIM policy on a site. + */ +public final class SiteProvisioningState extends ExpandableStringEnum { + /** + * Static value NotApplicable for SiteProvisioningState. + */ + public static final SiteProvisioningState NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Static value Adding for SiteProvisioningState. + */ + public static final SiteProvisioningState ADDING = fromString("Adding"); + + /** + * Static value Updating for SiteProvisioningState. + */ + public static final SiteProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for SiteProvisioningState. + */ + public static final SiteProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Provisioned for SiteProvisioningState. + */ + public static final SiteProvisioningState PROVISIONED = fromString("Provisioned"); + + /** + * Static value Failed for SiteProvisioningState. + */ + public static final SiteProvisioningState FAILED = fromString("Failed"); + + /** + * Creates a new instance of SiteProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SiteProvisioningState() { + } + + /** + * Creates or finds a SiteProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SiteProvisioningState. + */ + public static SiteProvisioningState fromString(String name) { + return fromString(name, SiteProvisioningState.class); + } + + /** + * Gets known SiteProvisioningState values. + * + * @return known SiteProvisioningState values. + */ + public static Collection values() { + return values(SiteProvisioningState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteResourceId.java new file mode 100644 index 000000000000..11d34e614b13 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteResourceId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a site resource. + */ +@Fluent +public final class SiteResourceId implements JsonSerializable { + /* + * Site resource ID. + */ + private String id; + + /** + * Creates an instance of SiteResourceId class. + */ + public SiteResourceId() { + } + + /** + * Get the id property: Site resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Site resource ID. + * + * @param id the id value to set. + * @return the SiteResourceId object itself. + */ + public SiteResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model SiteResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SiteResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SiteResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SiteResourceId if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SiteResourceId. + */ + public static SiteResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SiteResourceId deserializedSiteResourceId = new SiteResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSiteResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSiteResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sites.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sites.java new file mode 100644 index 000000000000..32251a28c1f2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sites.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Sites. + */ +public interface Sites { + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String siteName); + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String siteName, Context context); + + /** + * Gets information about the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String mobileNetworkName, String siteName, + Context context); + + /** + * Gets information about the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site. + */ + Site get(String resourceGroupName, String mobileNetworkName, String siteName); + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Lists all sites in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for sites API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePacketCore(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePacketCore(String resourceGroupName, String mobileNetworkName, String siteName, + SiteDeletePacketCore parameters, Context context); + + /** + * Gets information about the specified mobile network site. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site along with {@link Response}. + */ + Site getById(String id); + + /** + * Gets information about the specified mobile network site. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified mobile network site along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified mobile network site. This will also delete any network functions that are a part of this + * site. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Site resource. + * + * @param name resource name. + * @return the first stage of the new Site definition. + */ + Site.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Slice.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Slice.java new file mode 100644 index 000000000000..1418db914f01 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Slice.java @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SliceInner; +import java.util.Map; + +/** + * An immutable client-side representation of Slice. + */ +public interface Slice { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the network slice resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the snssai property: Single-network slice selection assistance information (S-NSSAI). Unique at the scope of + * a mobile network. + * + * @return the snssai value. + */ + Snssai snssai(); + + /** + * Gets the description property: An optional description for this network slice. + * + * @return the description value. + */ + String description(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.SliceInner object. + * + * @return the inner object. + */ + SliceInner innerModel(); + + /** + * The entirety of the Slice definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithSnssai, DefinitionStages.WithCreate { + } + + /** + * The Slice definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Slice definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Slice definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the Slice definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, mobileNetworkName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @return the next definition stage. + */ + WithSnssai withExistingMobileNetwork(String resourceGroupName, String mobileNetworkName); + } + + /** + * The stage of the Slice definition allowing to specify snssai. + */ + interface WithSnssai { + /** + * Specifies the snssai property: Single-network slice selection assistance information (S-NSSAI). Unique at + * the scope of a mobile network.. + * + * @param snssai Single-network slice selection assistance information (S-NSSAI). Unique at the scope of a + * mobile network. + * @return the next definition stage. + */ + WithCreate withSnssai(Snssai snssai); + } + + /** + * The stage of the Slice definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithDescription { + /** + * Executes the create request. + * + * @return the created resource. + */ + Slice create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Slice create(Context context); + } + + /** + * The stage of the Slice definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the Slice definition allowing to specify description. + */ + interface WithDescription { + /** + * Specifies the description property: An optional description for this network slice.. + * + * @param description An optional description for this network slice. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + } + + /** + * Begins update for the Slice resource. + * + * @return the stage of resource update. + */ + Slice.Update update(); + + /** + * The template for Slice update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Slice apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Slice apply(Context context); + } + + /** + * The Slice update stages. + */ + interface UpdateStages { + /** + * The stage of the Slice update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Slice refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Slice refresh(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceConfiguration.java new file mode 100644 index 000000000000..6fdd83b1f3d0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceConfiguration.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Per-slice settings. + */ +@Fluent +public final class SliceConfiguration implements JsonSerializable { + /* + * A reference to the slice that these settings apply to. The slice must be in the same location as the SIM policy. + */ + private SliceResourceId slice; + + /* + * The default data network to use if the UE does not explicitly specify it. Configuration for this object must + * exist in the `dataNetworkConfigurations` map. The data network must be in the same location as the SIM policy. + */ + private DataNetworkResourceId defaultDataNetwork; + + /* + * The allowed data networks and the settings to use for them. The list must not contain duplicate items and must + * contain at least one item. + */ + private List dataNetworkConfigurations; + + /** + * Creates an instance of SliceConfiguration class. + */ + public SliceConfiguration() { + } + + /** + * Get the slice property: A reference to the slice that these settings apply to. The slice must be in the same + * location as the SIM policy. + * + * @return the slice value. + */ + public SliceResourceId slice() { + return this.slice; + } + + /** + * Set the slice property: A reference to the slice that these settings apply to. The slice must be in the same + * location as the SIM policy. + * + * @param slice the slice value to set. + * @return the SliceConfiguration object itself. + */ + public SliceConfiguration withSlice(SliceResourceId slice) { + this.slice = slice; + return this; + } + + /** + * Get the defaultDataNetwork property: The default data network to use if the UE does not explicitly specify it. + * Configuration for this object must exist in the `dataNetworkConfigurations` map. The data network must be in the + * same location as the SIM policy. + * + * @return the defaultDataNetwork value. + */ + public DataNetworkResourceId defaultDataNetwork() { + return this.defaultDataNetwork; + } + + /** + * Set the defaultDataNetwork property: The default data network to use if the UE does not explicitly specify it. + * Configuration for this object must exist in the `dataNetworkConfigurations` map. The data network must be in the + * same location as the SIM policy. + * + * @param defaultDataNetwork the defaultDataNetwork value to set. + * @return the SliceConfiguration object itself. + */ + public SliceConfiguration withDefaultDataNetwork(DataNetworkResourceId defaultDataNetwork) { + this.defaultDataNetwork = defaultDataNetwork; + return this; + } + + /** + * Get the dataNetworkConfigurations property: The allowed data networks and the settings to use for them. The list + * must not contain duplicate items and must contain at least one item. + * + * @return the dataNetworkConfigurations value. + */ + public List dataNetworkConfigurations() { + return this.dataNetworkConfigurations; + } + + /** + * Set the dataNetworkConfigurations property: The allowed data networks and the settings to use for them. The list + * must not contain duplicate items and must contain at least one item. + * + * @param dataNetworkConfigurations the dataNetworkConfigurations value to set. + * @return the SliceConfiguration object itself. + */ + public SliceConfiguration withDataNetworkConfigurations(List dataNetworkConfigurations) { + this.dataNetworkConfigurations = dataNetworkConfigurations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (slice() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property slice in model SliceConfiguration")); + } else { + slice().validate(); + } + if (defaultDataNetwork() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property defaultDataNetwork in model SliceConfiguration")); + } else { + defaultDataNetwork().validate(); + } + if (dataNetworkConfigurations() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dataNetworkConfigurations in model SliceConfiguration")); + } else { + dataNetworkConfigurations().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SliceConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("slice", this.slice); + jsonWriter.writeJsonField("defaultDataNetwork", this.defaultDataNetwork); + jsonWriter.writeArrayField("dataNetworkConfigurations", this.dataNetworkConfigurations, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SliceConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SliceConfiguration if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SliceConfiguration. + */ + public static SliceConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SliceConfiguration deserializedSliceConfiguration = new SliceConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("slice".equals(fieldName)) { + deserializedSliceConfiguration.slice = SliceResourceId.fromJson(reader); + } else if ("defaultDataNetwork".equals(fieldName)) { + deserializedSliceConfiguration.defaultDataNetwork = DataNetworkResourceId.fromJson(reader); + } else if ("dataNetworkConfigurations".equals(fieldName)) { + List dataNetworkConfigurations + = reader.readArray(reader1 -> DataNetworkConfiguration.fromJson(reader1)); + deserializedSliceConfiguration.dataNetworkConfigurations = dataNetworkConfigurations; + } else { + reader.skipChildren(); + } + } + + return deserializedSliceConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceListResult.java new file mode 100644 index 000000000000..64ad99f28fae --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SliceInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for network slice API service call. + */ +@Fluent +public final class SliceListResult implements JsonSerializable { + /* + * A list of network slices in a mobile network. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of SliceListResult class. + */ + public SliceListResult() { + } + + /** + * Get the value property: A list of network slices in a mobile network. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of network slices in a mobile network. + * + * @param value the value value to set. + * @return the SliceListResult object itself. + */ + public SliceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SliceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SliceListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SliceListResult. + */ + public static SliceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SliceListResult deserializedSliceListResult = new SliceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SliceInner.fromJson(reader1)); + deserializedSliceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSliceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSliceListResult; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceResourceId.java new file mode 100644 index 000000000000..351c65c2658c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SliceResourceId.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reference to a slice resource. + */ +@Fluent +public final class SliceResourceId implements JsonSerializable { + /* + * Slice resource ID. + */ + private String id; + + /** + * Creates an instance of SliceResourceId class. + */ + public SliceResourceId() { + } + + /** + * Get the id property: Slice resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Slice resource ID. + * + * @param id the id value to set. + * @return the SliceResourceId object itself. + */ + public SliceResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model SliceResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SliceResourceId.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SliceResourceId from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SliceResourceId if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SliceResourceId. + */ + public static SliceResourceId fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SliceResourceId deserializedSliceResourceId = new SliceResourceId(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSliceResourceId.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSliceResourceId; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Slices.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Slices.java new file mode 100644 index 000000000000..946acd0c2584 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Slices.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Slices. + */ +public interface Slices { + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String sliceName); + + /** + * Deletes the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String mobileNetworkName, String sliceName, Context context); + + /** + * Gets information about the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String mobileNetworkName, String sliceName, + Context context); + + /** + * Gets information about the specified network slice. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param sliceName The name of the network slice. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice. + */ + Slice get(String resourceGroupName, String mobileNetworkName, String sliceName); + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName); + + /** + * Lists all slices in the mobile network. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for network slice API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Gets information about the specified network slice. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice along with {@link Response}. + */ + Slice getById(String id); + + /** + * Gets information about the specified network slice. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified network slice along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified network slice. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified network slice. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Slice resource. + * + * @param name resource name. + * @return the first stage of the new Slice definition. + */ + Slice.DefinitionStages.Blank define(String name); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Snssai.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Snssai.java new file mode 100644 index 000000000000..04d4c1c17401 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Snssai.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Single-network slice selection assistance information (S-NSSAI). + */ +@Fluent +public final class Snssai implements JsonSerializable { + /* + * Slice/service type (SST). + */ + private int sst; + + /* + * Slice differentiator (SD). + */ + private String sd; + + /** + * Creates an instance of Snssai class. + */ + public Snssai() { + } + + /** + * Get the sst property: Slice/service type (SST). + * + * @return the sst value. + */ + public int sst() { + return this.sst; + } + + /** + * Set the sst property: Slice/service type (SST). + * + * @param sst the sst value to set. + * @return the Snssai object itself. + */ + public Snssai withSst(int sst) { + this.sst = sst; + return this; + } + + /** + * Get the sd property: Slice differentiator (SD). + * + * @return the sd value. + */ + public String sd() { + return this.sd; + } + + /** + * Set the sd property: Slice differentiator (SD). + * + * @param sd the sd value to set. + * @return the Snssai object itself. + */ + public Snssai withSd(String sd) { + this.sd = sd; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("sst", this.sst); + jsonWriter.writeStringField("sd", this.sd); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Snssai from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Snssai if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Snssai. + */ + public static Snssai fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Snssai deserializedSnssai = new Snssai(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sst".equals(fieldName)) { + deserializedSnssai.sst = reader.getInt(); + } else if ("sd".equals(fieldName)) { + deserializedSnssai.sd = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSnssai; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/TagsObject.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/TagsObject.java new file mode 100644 index 000000000000..592182fbb718 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/TagsObject.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Tags object for patch operations. + */ +@Fluent +public final class TagsObject implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of TagsObject class. + */ + public TagsObject() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the TagsObject object itself. + */ + public TagsObject withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TagsObject from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TagsObject if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the TagsObject. + */ + public static TagsObject fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TagsObject deserializedTagsObject = new TagsObject(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTagsObject.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedTagsObject; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/TrafficControlPermission.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/TrafficControlPermission.java new file mode 100644 index 000000000000..38f4f51eb6ba --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/TrafficControlPermission.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Traffic control permission. + */ +public final class TrafficControlPermission extends ExpandableStringEnum { + /** + * Static value Enabled for TrafficControlPermission. + */ + public static final TrafficControlPermission ENABLED = fromString("Enabled"); + + /** + * Static value Blocked for TrafficControlPermission. + */ + public static final TrafficControlPermission BLOCKED = fromString("Blocked"); + + /** + * Creates a new instance of TrafficControlPermission value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TrafficControlPermission() { + } + + /** + * Creates or finds a TrafficControlPermission from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrafficControlPermission. + */ + public static TrafficControlPermission fromString(String name) { + return fromString(name, TrafficControlPermission.class); + } + + /** + * Gets known TrafficControlPermission values. + * + * @return known TrafficControlPermission values. + */ + public static Collection values() { + return values(TrafficControlPermission.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeConnectionInfo4G.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeConnectionInfo4G.java new file mode 100644 index 000000000000..3b5c7bea0f4f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeConnectionInfo4G.java @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * UE Connection Info for 4G. + */ +@Fluent +public final class UeConnectionInfo4G implements JsonSerializable { + /* + * UE Location Info properties + */ + private UeLocationInfo locationInfo; + + /* + * Global RAN Node ID + */ + private GlobalRanNodeId globalRanNodeId; + + /* + * Per-UE transport network layer association + */ + private String perUeTnla; + + /* + * MME S1AP identifier + */ + private int mmeS1ApId; + + /* + * eNodeB S1AP identifier + */ + private int enbS1ApId; + + /* + * Last Visited TAI + */ + private String lastVisitedTai; + + /* + * State of the UE. + */ + private UeState ueState; + + /* + * Radio connection establishment cause + */ + private RrcEstablishmentCause rrcEstablishmentCause; + + /* + * The UE's usage setting + */ + private UeUsageSetting ueUsageSetting; + + /* + * The timestamp of last activity of UE (UTC). + */ + private OffsetDateTime lastActivityTime; + + /** + * Creates an instance of UeConnectionInfo4G class. + */ + public UeConnectionInfo4G() { + } + + /** + * Get the locationInfo property: UE Location Info properties. + * + * @return the locationInfo value. + */ + public UeLocationInfo locationInfo() { + return this.locationInfo; + } + + /** + * Set the locationInfo property: UE Location Info properties. + * + * @param locationInfo the locationInfo value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withLocationInfo(UeLocationInfo locationInfo) { + this.locationInfo = locationInfo; + return this; + } + + /** + * Get the globalRanNodeId property: Global RAN Node ID. + * + * @return the globalRanNodeId value. + */ + public GlobalRanNodeId globalRanNodeId() { + return this.globalRanNodeId; + } + + /** + * Set the globalRanNodeId property: Global RAN Node ID. + * + * @param globalRanNodeId the globalRanNodeId value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withGlobalRanNodeId(GlobalRanNodeId globalRanNodeId) { + this.globalRanNodeId = globalRanNodeId; + return this; + } + + /** + * Get the perUeTnla property: Per-UE transport network layer association. + * + * @return the perUeTnla value. + */ + public String perUeTnla() { + return this.perUeTnla; + } + + /** + * Set the perUeTnla property: Per-UE transport network layer association. + * + * @param perUeTnla the perUeTnla value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withPerUeTnla(String perUeTnla) { + this.perUeTnla = perUeTnla; + return this; + } + + /** + * Get the mmeS1ApId property: MME S1AP identifier. + * + * @return the mmeS1ApId value. + */ + public int mmeS1ApId() { + return this.mmeS1ApId; + } + + /** + * Set the mmeS1ApId property: MME S1AP identifier. + * + * @param mmeS1ApId the mmeS1ApId value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withMmeS1ApId(int mmeS1ApId) { + this.mmeS1ApId = mmeS1ApId; + return this; + } + + /** + * Get the enbS1ApId property: eNodeB S1AP identifier. + * + * @return the enbS1ApId value. + */ + public int enbS1ApId() { + return this.enbS1ApId; + } + + /** + * Set the enbS1ApId property: eNodeB S1AP identifier. + * + * @param enbS1ApId the enbS1ApId value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withEnbS1ApId(int enbS1ApId) { + this.enbS1ApId = enbS1ApId; + return this; + } + + /** + * Get the lastVisitedTai property: Last Visited TAI. + * + * @return the lastVisitedTai value. + */ + public String lastVisitedTai() { + return this.lastVisitedTai; + } + + /** + * Set the lastVisitedTai property: Last Visited TAI. + * + * @param lastVisitedTai the lastVisitedTai value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withLastVisitedTai(String lastVisitedTai) { + this.lastVisitedTai = lastVisitedTai; + return this; + } + + /** + * Get the ueState property: State of the UE. + * + * @return the ueState value. + */ + public UeState ueState() { + return this.ueState; + } + + /** + * Set the ueState property: State of the UE. + * + * @param ueState the ueState value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withUeState(UeState ueState) { + this.ueState = ueState; + return this; + } + + /** + * Get the rrcEstablishmentCause property: Radio connection establishment cause. + * + * @return the rrcEstablishmentCause value. + */ + public RrcEstablishmentCause rrcEstablishmentCause() { + return this.rrcEstablishmentCause; + } + + /** + * Set the rrcEstablishmentCause property: Radio connection establishment cause. + * + * @param rrcEstablishmentCause the rrcEstablishmentCause value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withRrcEstablishmentCause(RrcEstablishmentCause rrcEstablishmentCause) { + this.rrcEstablishmentCause = rrcEstablishmentCause; + return this; + } + + /** + * Get the ueUsageSetting property: The UE's usage setting. + * + * @return the ueUsageSetting value. + */ + public UeUsageSetting ueUsageSetting() { + return this.ueUsageSetting; + } + + /** + * Set the ueUsageSetting property: The UE's usage setting. + * + * @param ueUsageSetting the ueUsageSetting value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withUeUsageSetting(UeUsageSetting ueUsageSetting) { + this.ueUsageSetting = ueUsageSetting; + return this; + } + + /** + * Get the lastActivityTime property: The timestamp of last activity of UE (UTC). + * + * @return the lastActivityTime value. + */ + public OffsetDateTime lastActivityTime() { + return this.lastActivityTime; + } + + /** + * Set the lastActivityTime property: The timestamp of last activity of UE (UTC). + * + * @param lastActivityTime the lastActivityTime value to set. + * @return the UeConnectionInfo4G object itself. + */ + public UeConnectionInfo4G withLastActivityTime(OffsetDateTime lastActivityTime) { + this.lastActivityTime = lastActivityTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (locationInfo() != null) { + locationInfo().validate(); + } + if (globalRanNodeId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property globalRanNodeId in model UeConnectionInfo4G")); + } else { + globalRanNodeId().validate(); + } + if (ueState() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property ueState in model UeConnectionInfo4G")); + } + if (rrcEstablishmentCause() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property rrcEstablishmentCause in model UeConnectionInfo4G")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeConnectionInfo4G.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("globalRanNodeId", this.globalRanNodeId); + jsonWriter.writeIntField("mmeS1apId", this.mmeS1ApId); + jsonWriter.writeIntField("enbS1apId", this.enbS1ApId); + jsonWriter.writeStringField("ueState", this.ueState == null ? null : this.ueState.toString()); + jsonWriter.writeStringField("rrcEstablishmentCause", + this.rrcEstablishmentCause == null ? null : this.rrcEstablishmentCause.toString()); + jsonWriter.writeJsonField("locationInfo", this.locationInfo); + jsonWriter.writeStringField("perUeTnla", this.perUeTnla); + jsonWriter.writeStringField("lastVisitedTai", this.lastVisitedTai); + jsonWriter.writeStringField("ueUsageSetting", + this.ueUsageSetting == null ? null : this.ueUsageSetting.toString()); + jsonWriter.writeStringField("lastActivityTime", + this.lastActivityTime == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastActivityTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeConnectionInfo4G from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeConnectionInfo4G if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeConnectionInfo4G. + */ + public static UeConnectionInfo4G fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeConnectionInfo4G deserializedUeConnectionInfo4G = new UeConnectionInfo4G(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("globalRanNodeId".equals(fieldName)) { + deserializedUeConnectionInfo4G.globalRanNodeId = GlobalRanNodeId.fromJson(reader); + } else if ("mmeS1apId".equals(fieldName)) { + deserializedUeConnectionInfo4G.mmeS1ApId = reader.getInt(); + } else if ("enbS1apId".equals(fieldName)) { + deserializedUeConnectionInfo4G.enbS1ApId = reader.getInt(); + } else if ("ueState".equals(fieldName)) { + deserializedUeConnectionInfo4G.ueState = UeState.fromString(reader.getString()); + } else if ("rrcEstablishmentCause".equals(fieldName)) { + deserializedUeConnectionInfo4G.rrcEstablishmentCause + = RrcEstablishmentCause.fromString(reader.getString()); + } else if ("locationInfo".equals(fieldName)) { + deserializedUeConnectionInfo4G.locationInfo = UeLocationInfo.fromJson(reader); + } else if ("perUeTnla".equals(fieldName)) { + deserializedUeConnectionInfo4G.perUeTnla = reader.getString(); + } else if ("lastVisitedTai".equals(fieldName)) { + deserializedUeConnectionInfo4G.lastVisitedTai = reader.getString(); + } else if ("ueUsageSetting".equals(fieldName)) { + deserializedUeConnectionInfo4G.ueUsageSetting = UeUsageSetting.fromString(reader.getString()); + } else if ("lastActivityTime".equals(fieldName)) { + deserializedUeConnectionInfo4G.lastActivityTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedUeConnectionInfo4G; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeConnectionInfo5G.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeConnectionInfo5G.java new file mode 100644 index 000000000000..c6fdadeda3c6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeConnectionInfo5G.java @@ -0,0 +1,411 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * UE Connection Info for 5G. + */ +@Fluent +public final class UeConnectionInfo5G implements JsonSerializable { + /* + * UE Location Info properties + */ + private UeLocationInfo locationInfo; + + /* + * Global RAN Node ID + */ + private GlobalRanNodeId globalRanNodeId; + + /* + * Per-UE transport network layer association + */ + private String perUeTnla; + + /* + * The AMF UE NGAP ID + */ + private long amfUeNgapId; + + /* + * The RAN UE NGAP ID + */ + private int ranUeNgapId; + + /* + * Last Visited TAI + */ + private String lastVisitedTai; + + /* + * Allowed Network Slice Selection Assistance Information + */ + private List allowedNssai; + + /* + * State of the UE. + */ + private UeState ueState; + + /* + * Radio connection establishment cause + */ + private RrcEstablishmentCause rrcEstablishmentCause; + + /* + * The UE's usage setting + */ + private UeUsageSetting ueUsageSetting; + + /* + * The timestamp of last activity of UE (UTC). + */ + private OffsetDateTime lastActivityTime; + + /** + * Creates an instance of UeConnectionInfo5G class. + */ + public UeConnectionInfo5G() { + } + + /** + * Get the locationInfo property: UE Location Info properties. + * + * @return the locationInfo value. + */ + public UeLocationInfo locationInfo() { + return this.locationInfo; + } + + /** + * Set the locationInfo property: UE Location Info properties. + * + * @param locationInfo the locationInfo value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withLocationInfo(UeLocationInfo locationInfo) { + this.locationInfo = locationInfo; + return this; + } + + /** + * Get the globalRanNodeId property: Global RAN Node ID. + * + * @return the globalRanNodeId value. + */ + public GlobalRanNodeId globalRanNodeId() { + return this.globalRanNodeId; + } + + /** + * Set the globalRanNodeId property: Global RAN Node ID. + * + * @param globalRanNodeId the globalRanNodeId value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withGlobalRanNodeId(GlobalRanNodeId globalRanNodeId) { + this.globalRanNodeId = globalRanNodeId; + return this; + } + + /** + * Get the perUeTnla property: Per-UE transport network layer association. + * + * @return the perUeTnla value. + */ + public String perUeTnla() { + return this.perUeTnla; + } + + /** + * Set the perUeTnla property: Per-UE transport network layer association. + * + * @param perUeTnla the perUeTnla value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withPerUeTnla(String perUeTnla) { + this.perUeTnla = perUeTnla; + return this; + } + + /** + * Get the amfUeNgapId property: The AMF UE NGAP ID. + * + * @return the amfUeNgapId value. + */ + public long amfUeNgapId() { + return this.amfUeNgapId; + } + + /** + * Set the amfUeNgapId property: The AMF UE NGAP ID. + * + * @param amfUeNgapId the amfUeNgapId value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withAmfUeNgapId(long amfUeNgapId) { + this.amfUeNgapId = amfUeNgapId; + return this; + } + + /** + * Get the ranUeNgapId property: The RAN UE NGAP ID. + * + * @return the ranUeNgapId value. + */ + public int ranUeNgapId() { + return this.ranUeNgapId; + } + + /** + * Set the ranUeNgapId property: The RAN UE NGAP ID. + * + * @param ranUeNgapId the ranUeNgapId value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withRanUeNgapId(int ranUeNgapId) { + this.ranUeNgapId = ranUeNgapId; + return this; + } + + /** + * Get the lastVisitedTai property: Last Visited TAI. + * + * @return the lastVisitedTai value. + */ + public String lastVisitedTai() { + return this.lastVisitedTai; + } + + /** + * Set the lastVisitedTai property: Last Visited TAI. + * + * @param lastVisitedTai the lastVisitedTai value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withLastVisitedTai(String lastVisitedTai) { + this.lastVisitedTai = lastVisitedTai; + return this; + } + + /** + * Get the allowedNssai property: Allowed Network Slice Selection Assistance Information. + * + * @return the allowedNssai value. + */ + public List allowedNssai() { + return this.allowedNssai; + } + + /** + * Set the allowedNssai property: Allowed Network Slice Selection Assistance Information. + * + * @param allowedNssai the allowedNssai value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withAllowedNssai(List allowedNssai) { + this.allowedNssai = allowedNssai; + return this; + } + + /** + * Get the ueState property: State of the UE. + * + * @return the ueState value. + */ + public UeState ueState() { + return this.ueState; + } + + /** + * Set the ueState property: State of the UE. + * + * @param ueState the ueState value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withUeState(UeState ueState) { + this.ueState = ueState; + return this; + } + + /** + * Get the rrcEstablishmentCause property: Radio connection establishment cause. + * + * @return the rrcEstablishmentCause value. + */ + public RrcEstablishmentCause rrcEstablishmentCause() { + return this.rrcEstablishmentCause; + } + + /** + * Set the rrcEstablishmentCause property: Radio connection establishment cause. + * + * @param rrcEstablishmentCause the rrcEstablishmentCause value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withRrcEstablishmentCause(RrcEstablishmentCause rrcEstablishmentCause) { + this.rrcEstablishmentCause = rrcEstablishmentCause; + return this; + } + + /** + * Get the ueUsageSetting property: The UE's usage setting. + * + * @return the ueUsageSetting value. + */ + public UeUsageSetting ueUsageSetting() { + return this.ueUsageSetting; + } + + /** + * Set the ueUsageSetting property: The UE's usage setting. + * + * @param ueUsageSetting the ueUsageSetting value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withUeUsageSetting(UeUsageSetting ueUsageSetting) { + this.ueUsageSetting = ueUsageSetting; + return this; + } + + /** + * Get the lastActivityTime property: The timestamp of last activity of UE (UTC). + * + * @return the lastActivityTime value. + */ + public OffsetDateTime lastActivityTime() { + return this.lastActivityTime; + } + + /** + * Set the lastActivityTime property: The timestamp of last activity of UE (UTC). + * + * @param lastActivityTime the lastActivityTime value to set. + * @return the UeConnectionInfo5G object itself. + */ + public UeConnectionInfo5G withLastActivityTime(OffsetDateTime lastActivityTime) { + this.lastActivityTime = lastActivityTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (locationInfo() != null) { + locationInfo().validate(); + } + if (globalRanNodeId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property globalRanNodeId in model UeConnectionInfo5G")); + } else { + globalRanNodeId().validate(); + } + if (allowedNssai() != null) { + allowedNssai().forEach(e -> e.validate()); + } + if (ueState() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property ueState in model UeConnectionInfo5G")); + } + if (rrcEstablishmentCause() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property rrcEstablishmentCause in model UeConnectionInfo5G")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeConnectionInfo5G.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("globalRanNodeId", this.globalRanNodeId); + jsonWriter.writeLongField("amfUeNgapId", this.amfUeNgapId); + jsonWriter.writeIntField("ranUeNgapId", this.ranUeNgapId); + jsonWriter.writeStringField("ueState", this.ueState == null ? null : this.ueState.toString()); + jsonWriter.writeStringField("rrcEstablishmentCause", + this.rrcEstablishmentCause == null ? null : this.rrcEstablishmentCause.toString()); + jsonWriter.writeJsonField("locationInfo", this.locationInfo); + jsonWriter.writeStringField("perUeTnla", this.perUeTnla); + jsonWriter.writeStringField("lastVisitedTai", this.lastVisitedTai); + jsonWriter.writeArrayField("allowedNssai", this.allowedNssai, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("ueUsageSetting", + this.ueUsageSetting == null ? null : this.ueUsageSetting.toString()); + jsonWriter.writeStringField("lastActivityTime", + this.lastActivityTime == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastActivityTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeConnectionInfo5G from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeConnectionInfo5G if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeConnectionInfo5G. + */ + public static UeConnectionInfo5G fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeConnectionInfo5G deserializedUeConnectionInfo5G = new UeConnectionInfo5G(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("globalRanNodeId".equals(fieldName)) { + deserializedUeConnectionInfo5G.globalRanNodeId = GlobalRanNodeId.fromJson(reader); + } else if ("amfUeNgapId".equals(fieldName)) { + deserializedUeConnectionInfo5G.amfUeNgapId = reader.getLong(); + } else if ("ranUeNgapId".equals(fieldName)) { + deserializedUeConnectionInfo5G.ranUeNgapId = reader.getInt(); + } else if ("ueState".equals(fieldName)) { + deserializedUeConnectionInfo5G.ueState = UeState.fromString(reader.getString()); + } else if ("rrcEstablishmentCause".equals(fieldName)) { + deserializedUeConnectionInfo5G.rrcEstablishmentCause + = RrcEstablishmentCause.fromString(reader.getString()); + } else if ("locationInfo".equals(fieldName)) { + deserializedUeConnectionInfo5G.locationInfo = UeLocationInfo.fromJson(reader); + } else if ("perUeTnla".equals(fieldName)) { + deserializedUeConnectionInfo5G.perUeTnla = reader.getString(); + } else if ("lastVisitedTai".equals(fieldName)) { + deserializedUeConnectionInfo5G.lastVisitedTai = reader.getString(); + } else if ("allowedNssai".equals(fieldName)) { + List allowedNssai = reader.readArray(reader1 -> Snssai.fromJson(reader1)); + deserializedUeConnectionInfo5G.allowedNssai = allowedNssai; + } else if ("ueUsageSetting".equals(fieldName)) { + deserializedUeConnectionInfo5G.ueUsageSetting = UeUsageSetting.fromString(reader.getString()); + } else if ("lastActivityTime".equals(fieldName)) { + deserializedUeConnectionInfo5G.lastActivityTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedUeConnectionInfo5G; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo.java new file mode 100644 index 000000000000..90063c5718c5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.UeInfoInner; + +/** + * An immutable client-side representation of UeInfo. + */ +public interface UeInfo { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Basic UE Information Properties. + * + * @return the properties value. + */ + UeInfoPropertiesFormat properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.UeInfoInner object. + * + * @return the inner object. + */ + UeInfoInner innerModel(); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo4G.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo4G.java new file mode 100644 index 000000000000..47556bcfaf65 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo4G.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * UE Information for 4G. + */ +@Fluent +public final class UeInfo4G extends ExtendedUeInfoProperties { + /* + * RAT Type + */ + private RatType ratType = RatType.FOURG; + + /* + * UE Information properties for 4G. + */ + private UeInfo4GProperties info; + + /** + * Creates an instance of UeInfo4G class. + */ + public UeInfo4G() { + } + + /** + * Get the ratType property: RAT Type. + * + * @return the ratType value. + */ + @Override + public RatType ratType() { + return this.ratType; + } + + /** + * Get the info property: UE Information properties for 4G. + * + * @return the info value. + */ + public UeInfo4GProperties info() { + return this.info; + } + + /** + * Set the info property: UE Information properties for 4G. + * + * @param info the info value to set. + * @return the UeInfo4G object itself. + */ + public UeInfo4G withInfo(UeInfo4GProperties info) { + this.info = info; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public UeInfo4G withLastReadAt(OffsetDateTime lastReadAt) { + super.withLastReadAt(lastReadAt); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (info() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property info in model UeInfo4G")); + } else { + info().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeInfo4G.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("lastReadAt", + lastReadAt() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(lastReadAt())); + jsonWriter.writeJsonField("info", this.info); + jsonWriter.writeStringField("ratType", this.ratType == null ? null : this.ratType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeInfo4G from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeInfo4G if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeInfo4G. + */ + public static UeInfo4G fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeInfo4G deserializedUeInfo4G = new UeInfo4G(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastReadAt".equals(fieldName)) { + deserializedUeInfo4G.withLastReadAt(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("info".equals(fieldName)) { + deserializedUeInfo4G.info = UeInfo4GProperties.fromJson(reader); + } else if ("ratType".equals(fieldName)) { + deserializedUeInfo4G.ratType = RatType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUeInfo4G; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo4GProperties.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo4GProperties.java new file mode 100644 index 000000000000..1f4d7575b26d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo4GProperties.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.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * UE Information properties for 4G. + */ +@Fluent +public final class UeInfo4GProperties implements JsonSerializable { + /* + * International mobile subscriber identifier + */ + private String imsi; + + /* + * International mobile equipment identity + */ + private String imei; + + /* + * International mobile equipment identity – software version + */ + private String imeisv; + + /* + * Globally Unique Temporary Identifier (4G) + */ + private Guti4G guti; + + /* + * UE Connection Info for 4G + */ + private UeConnectionInfo4G connectionInfo; + + /* + * The sessionInfo property. + */ + private List sessionInfo; + + /** + * Creates an instance of UeInfo4GProperties class. + */ + public UeInfo4GProperties() { + } + + /** + * Get the imsi property: International mobile subscriber identifier. + * + * @return the imsi value. + */ + public String imsi() { + return this.imsi; + } + + /** + * Set the imsi property: International mobile subscriber identifier. + * + * @param imsi the imsi value to set. + * @return the UeInfo4GProperties object itself. + */ + public UeInfo4GProperties withImsi(String imsi) { + this.imsi = imsi; + return this; + } + + /** + * Get the imei property: International mobile equipment identity. + * + * @return the imei value. + */ + public String imei() { + return this.imei; + } + + /** + * Set the imei property: International mobile equipment identity. + * + * @param imei the imei value to set. + * @return the UeInfo4GProperties object itself. + */ + public UeInfo4GProperties withImei(String imei) { + this.imei = imei; + return this; + } + + /** + * Get the imeisv property: International mobile equipment identity – software version. + * + * @return the imeisv value. + */ + public String imeisv() { + return this.imeisv; + } + + /** + * Set the imeisv property: International mobile equipment identity – software version. + * + * @param imeisv the imeisv value to set. + * @return the UeInfo4GProperties object itself. + */ + public UeInfo4GProperties withImeisv(String imeisv) { + this.imeisv = imeisv; + return this; + } + + /** + * Get the guti property: Globally Unique Temporary Identifier (4G). + * + * @return the guti value. + */ + public Guti4G guti() { + return this.guti; + } + + /** + * Set the guti property: Globally Unique Temporary Identifier (4G). + * + * @param guti the guti value to set. + * @return the UeInfo4GProperties object itself. + */ + public UeInfo4GProperties withGuti(Guti4G guti) { + this.guti = guti; + return this; + } + + /** + * Get the connectionInfo property: UE Connection Info for 4G. + * + * @return the connectionInfo value. + */ + public UeConnectionInfo4G connectionInfo() { + return this.connectionInfo; + } + + /** + * Set the connectionInfo property: UE Connection Info for 4G. + * + * @param connectionInfo the connectionInfo value to set. + * @return the UeInfo4GProperties object itself. + */ + public UeInfo4GProperties withConnectionInfo(UeConnectionInfo4G connectionInfo) { + this.connectionInfo = connectionInfo; + return this; + } + + /** + * Get the sessionInfo property: The sessionInfo property. + * + * @return the sessionInfo value. + */ + public List sessionInfo() { + return this.sessionInfo; + } + + /** + * Set the sessionInfo property: The sessionInfo property. + * + * @param sessionInfo the sessionInfo value to set. + * @return the UeInfo4GProperties object itself. + */ + public UeInfo4GProperties withSessionInfo(List sessionInfo) { + this.sessionInfo = sessionInfo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (imsi() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property imsi in model UeInfo4GProperties")); + } + if (guti() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property guti in model UeInfo4GProperties")); + } else { + guti().validate(); + } + if (connectionInfo() != null) { + connectionInfo().validate(); + } + if (sessionInfo() != null) { + sessionInfo().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeInfo4GProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("imsi", this.imsi); + jsonWriter.writeJsonField("guti", this.guti); + jsonWriter.writeStringField("imei", this.imei); + jsonWriter.writeStringField("imeisv", this.imeisv); + jsonWriter.writeJsonField("connectionInfo", this.connectionInfo); + jsonWriter.writeArrayField("sessionInfo", this.sessionInfo, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeInfo4GProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeInfo4GProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeInfo4GProperties. + */ + public static UeInfo4GProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeInfo4GProperties deserializedUeInfo4GProperties = new UeInfo4GProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("imsi".equals(fieldName)) { + deserializedUeInfo4GProperties.imsi = reader.getString(); + } else if ("guti".equals(fieldName)) { + deserializedUeInfo4GProperties.guti = Guti4G.fromJson(reader); + } else if ("imei".equals(fieldName)) { + deserializedUeInfo4GProperties.imei = reader.getString(); + } else if ("imeisv".equals(fieldName)) { + deserializedUeInfo4GProperties.imeisv = reader.getString(); + } else if ("connectionInfo".equals(fieldName)) { + deserializedUeInfo4GProperties.connectionInfo = UeConnectionInfo4G.fromJson(reader); + } else if ("sessionInfo".equals(fieldName)) { + List sessionInfo = reader.readArray(reader1 -> UeSessionInfo4G.fromJson(reader1)); + deserializedUeInfo4GProperties.sessionInfo = sessionInfo; + } else { + reader.skipChildren(); + } + } + + return deserializedUeInfo4GProperties; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo5G.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo5G.java new file mode 100644 index 000000000000..448356c75868 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo5G.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * UE Information for 5G. + */ +@Fluent +public final class UeInfo5G extends ExtendedUeInfoProperties { + /* + * RAT Type + */ + private RatType ratType = RatType.FIVEG; + + /* + * UE Information properties for 5G. + */ + private UeInfo5GProperties info; + + /** + * Creates an instance of UeInfo5G class. + */ + public UeInfo5G() { + } + + /** + * Get the ratType property: RAT Type. + * + * @return the ratType value. + */ + @Override + public RatType ratType() { + return this.ratType; + } + + /** + * Get the info property: UE Information properties for 5G. + * + * @return the info value. + */ + public UeInfo5GProperties info() { + return this.info; + } + + /** + * Set the info property: UE Information properties for 5G. + * + * @param info the info value to set. + * @return the UeInfo5G object itself. + */ + public UeInfo5G withInfo(UeInfo5GProperties info) { + this.info = info; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public UeInfo5G withLastReadAt(OffsetDateTime lastReadAt) { + super.withLastReadAt(lastReadAt); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (info() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property info in model UeInfo5G")); + } else { + info().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeInfo5G.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("lastReadAt", + lastReadAt() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(lastReadAt())); + jsonWriter.writeJsonField("info", this.info); + jsonWriter.writeStringField("ratType", this.ratType == null ? null : this.ratType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeInfo5G from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeInfo5G if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeInfo5G. + */ + public static UeInfo5G fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeInfo5G deserializedUeInfo5G = new UeInfo5G(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastReadAt".equals(fieldName)) { + deserializedUeInfo5G.withLastReadAt(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("info".equals(fieldName)) { + deserializedUeInfo5G.info = UeInfo5GProperties.fromJson(reader); + } else if ("ratType".equals(fieldName)) { + deserializedUeInfo5G.ratType = RatType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUeInfo5G; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo5GProperties.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo5GProperties.java new file mode 100644 index 000000000000..76c709eb4e4b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfo5GProperties.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * UE Information properties for 5G. + */ +@Fluent +public final class UeInfo5GProperties implements JsonSerializable { + /* + * Subscription Permanent Identifier + */ + private String supi; + + /* + * Permanent Equipment Identifier + */ + private String pei; + + /* + * 5G GUTI + */ + private Guti5G fivegGuti; + + /* + * UE Connection Info for 5G. + */ + private UeConnectionInfo5G connectionInfo; + + /* + * The sessionInfo property. + */ + private List sessionInfo; + + /** + * Creates an instance of UeInfo5GProperties class. + */ + public UeInfo5GProperties() { + } + + /** + * Get the supi property: Subscription Permanent Identifier. + * + * @return the supi value. + */ + public String supi() { + return this.supi; + } + + /** + * Set the supi property: Subscription Permanent Identifier. + * + * @param supi the supi value to set. + * @return the UeInfo5GProperties object itself. + */ + public UeInfo5GProperties withSupi(String supi) { + this.supi = supi; + return this; + } + + /** + * Get the pei property: Permanent Equipment Identifier. + * + * @return the pei value. + */ + public String pei() { + return this.pei; + } + + /** + * Set the pei property: Permanent Equipment Identifier. + * + * @param pei the pei value to set. + * @return the UeInfo5GProperties object itself. + */ + public UeInfo5GProperties withPei(String pei) { + this.pei = pei; + return this; + } + + /** + * Get the fivegGuti property: 5G GUTI. + * + * @return the fivegGuti value. + */ + public Guti5G fivegGuti() { + return this.fivegGuti; + } + + /** + * Set the fivegGuti property: 5G GUTI. + * + * @param fivegGuti the fivegGuti value to set. + * @return the UeInfo5GProperties object itself. + */ + public UeInfo5GProperties withFivegGuti(Guti5G fivegGuti) { + this.fivegGuti = fivegGuti; + return this; + } + + /** + * Get the connectionInfo property: UE Connection Info for 5G. + * + * @return the connectionInfo value. + */ + public UeConnectionInfo5G connectionInfo() { + return this.connectionInfo; + } + + /** + * Set the connectionInfo property: UE Connection Info for 5G. + * + * @param connectionInfo the connectionInfo value to set. + * @return the UeInfo5GProperties object itself. + */ + public UeInfo5GProperties withConnectionInfo(UeConnectionInfo5G connectionInfo) { + this.connectionInfo = connectionInfo; + return this; + } + + /** + * Get the sessionInfo property: The sessionInfo property. + * + * @return the sessionInfo value. + */ + public List sessionInfo() { + return this.sessionInfo; + } + + /** + * Set the sessionInfo property: The sessionInfo property. + * + * @param sessionInfo the sessionInfo value to set. + * @return the UeInfo5GProperties object itself. + */ + public UeInfo5GProperties withSessionInfo(List sessionInfo) { + this.sessionInfo = sessionInfo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (supi() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property supi in model UeInfo5GProperties")); + } + if (fivegGuti() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property fivegGuti in model UeInfo5GProperties")); + } else { + fivegGuti().validate(); + } + if (connectionInfo() != null) { + connectionInfo().validate(); + } + if (sessionInfo() != null) { + sessionInfo().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeInfo5GProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("supi", this.supi); + jsonWriter.writeJsonField("fivegGuti", this.fivegGuti); + jsonWriter.writeStringField("pei", this.pei); + jsonWriter.writeJsonField("connectionInfo", this.connectionInfo); + jsonWriter.writeArrayField("sessionInfo", this.sessionInfo, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeInfo5GProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeInfo5GProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeInfo5GProperties. + */ + public static UeInfo5GProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeInfo5GProperties deserializedUeInfo5GProperties = new UeInfo5GProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("supi".equals(fieldName)) { + deserializedUeInfo5GProperties.supi = reader.getString(); + } else if ("fivegGuti".equals(fieldName)) { + deserializedUeInfo5GProperties.fivegGuti = Guti5G.fromJson(reader); + } else if ("pei".equals(fieldName)) { + deserializedUeInfo5GProperties.pei = reader.getString(); + } else if ("connectionInfo".equals(fieldName)) { + deserializedUeInfo5GProperties.connectionInfo = UeConnectionInfo5G.fromJson(reader); + } else if ("sessionInfo".equals(fieldName)) { + List sessionInfo = reader.readArray(reader1 -> UeSessionInfo5G.fromJson(reader1)); + deserializedUeInfo5GProperties.sessionInfo = sessionInfo; + } else { + reader.skipChildren(); + } + } + + return deserializedUeInfo5GProperties; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfoList.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfoList.java new file mode 100644 index 000000000000..93a49170c87f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfoList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mobilenetwork.fluent.models.UeInfoInner; +import java.io.IOException; +import java.util.List; + +/** + * Response for packet core list UEs API call. + */ +@Fluent +public final class UeInfoList implements JsonSerializable { + /* + * A list of UEs in a packet core and their basic information. + */ + private List value; + + /* + * The URL to get the next set of results. + */ + private String nextLink; + + /** + * Creates an instance of UeInfoList class. + */ + public UeInfoList() { + } + + /** + * Get the value property: A list of UEs in a packet core and their basic information. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of UEs in a packet core and their basic information. + * + * @param value the value value to set. + * @return the UeInfoList object itself. + */ + public UeInfoList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeInfoList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeInfoList if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the UeInfoList. + */ + public static UeInfoList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeInfoList deserializedUeInfoList = new UeInfoList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> UeInfoInner.fromJson(reader1)); + deserializedUeInfoList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedUeInfoList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUeInfoList; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfoPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfoPropertiesFormat.java new file mode 100644 index 000000000000..3add9919c86d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInfoPropertiesFormat.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Basic UE Information Properties. + */ +@Fluent +public final class UeInfoPropertiesFormat implements JsonSerializable { + /* + * RAT Type + */ + private RatType ratType; + + /* + * State of the UE. + */ + private UeState ueState; + + /* + * The ueIpAddresses property. + */ + private List ueIpAddresses; + + /* + * The timestamp of last list UEs call to the packet core (UTC). + */ + private OffsetDateTime lastReadAt; + + /** + * Creates an instance of UeInfoPropertiesFormat class. + */ + public UeInfoPropertiesFormat() { + } + + /** + * Get the ratType property: RAT Type. + * + * @return the ratType value. + */ + public RatType ratType() { + return this.ratType; + } + + /** + * Set the ratType property: RAT Type. + * + * @param ratType the ratType value to set. + * @return the UeInfoPropertiesFormat object itself. + */ + public UeInfoPropertiesFormat withRatType(RatType ratType) { + this.ratType = ratType; + return this; + } + + /** + * Get the ueState property: State of the UE. + * + * @return the ueState value. + */ + public UeState ueState() { + return this.ueState; + } + + /** + * Set the ueState property: State of the UE. + * + * @param ueState the ueState value to set. + * @return the UeInfoPropertiesFormat object itself. + */ + public UeInfoPropertiesFormat withUeState(UeState ueState) { + this.ueState = ueState; + return this; + } + + /** + * Get the ueIpAddresses property: The ueIpAddresses property. + * + * @return the ueIpAddresses value. + */ + public List ueIpAddresses() { + return this.ueIpAddresses; + } + + /** + * Set the ueIpAddresses property: The ueIpAddresses property. + * + * @param ueIpAddresses the ueIpAddresses value to set. + * @return the UeInfoPropertiesFormat object itself. + */ + public UeInfoPropertiesFormat withUeIpAddresses(List ueIpAddresses) { + this.ueIpAddresses = ueIpAddresses; + return this; + } + + /** + * Get the lastReadAt property: The timestamp of last list UEs call to the packet core (UTC). + * + * @return the lastReadAt value. + */ + public OffsetDateTime lastReadAt() { + return this.lastReadAt; + } + + /** + * Set the lastReadAt property: The timestamp of last list UEs call to the packet core (UTC). + * + * @param lastReadAt the lastReadAt value to set. + * @return the UeInfoPropertiesFormat object itself. + */ + public UeInfoPropertiesFormat withLastReadAt(OffsetDateTime lastReadAt) { + this.lastReadAt = lastReadAt; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ratType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property ratType in model UeInfoPropertiesFormat")); + } + if (ueState() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property ueState in model UeInfoPropertiesFormat")); + } + if (ueIpAddresses() != null) { + ueIpAddresses().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeInfoPropertiesFormat.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ratType", this.ratType == null ? null : this.ratType.toString()); + jsonWriter.writeStringField("ueState", this.ueState == null ? null : this.ueState.toString()); + jsonWriter.writeArrayField("ueIpAddresses", this.ueIpAddresses, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("lastReadAt", + this.lastReadAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastReadAt)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeInfoPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeInfoPropertiesFormat if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeInfoPropertiesFormat. + */ + public static UeInfoPropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeInfoPropertiesFormat deserializedUeInfoPropertiesFormat = new UeInfoPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ratType".equals(fieldName)) { + deserializedUeInfoPropertiesFormat.ratType = RatType.fromString(reader.getString()); + } else if ("ueState".equals(fieldName)) { + deserializedUeInfoPropertiesFormat.ueState = UeState.fromString(reader.getString()); + } else if ("ueIpAddresses".equals(fieldName)) { + List ueIpAddresses = reader.readArray(reader1 -> DnnIpPair.fromJson(reader1)); + deserializedUeInfoPropertiesFormat.ueIpAddresses = ueIpAddresses; + } else if ("lastReadAt".equals(fieldName)) { + deserializedUeInfoPropertiesFormat.lastReadAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedUeInfoPropertiesFormat; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInformations.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInformations.java new file mode 100644 index 000000000000..1a4a50ec6d7d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeInformations.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of UeInformations. + */ +public interface UeInformations { + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * List all UEs and their state in a packet core. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for packet core list UEs API call as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String packetCoreControlPlaneName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeIpAddress.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeIpAddress.java new file mode 100644 index 000000000000..4722012f96d9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeIpAddress.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * UE IP address. + */ +@Fluent +public final class UeIpAddress implements JsonSerializable { + /* + * IPv4 address. + */ + private String ipV4Addr; + + /** + * Creates an instance of UeIpAddress class. + */ + public UeIpAddress() { + } + + /** + * Get the ipV4Addr property: IPv4 address. + * + * @return the ipV4Addr value. + */ + public String ipV4Addr() { + return this.ipV4Addr; + } + + /** + * Set the ipV4Addr property: IPv4 address. + * + * @param ipV4Addr the ipV4Addr value to set. + * @return the UeIpAddress object itself. + */ + public UeIpAddress withIpV4Addr(String ipV4Addr) { + this.ipV4Addr = ipV4Addr; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipV4Addr", this.ipV4Addr); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeIpAddress from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeIpAddress if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the UeIpAddress. + */ + public static UeIpAddress fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeIpAddress deserializedUeIpAddress = new UeIpAddress(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipV4Addr".equals(fieldName)) { + deserializedUeIpAddress.ipV4Addr = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUeIpAddress; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeLocationInfo.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeLocationInfo.java new file mode 100644 index 000000000000..92fe3d4f44b2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeLocationInfo.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * UE Location Info properties. + */ +@Fluent +public final class UeLocationInfo implements JsonSerializable { + /* + * Location Type + */ + private String locationType; + + /* + * Type Allocation Code of UE + */ + private String tac; + + /* + * PLMN Identifier + */ + private PlmnId plmn; + + /** + * Creates an instance of UeLocationInfo class. + */ + public UeLocationInfo() { + } + + /** + * Get the locationType property: Location Type. + * + * @return the locationType value. + */ + public String locationType() { + return this.locationType; + } + + /** + * Set the locationType property: Location Type. + * + * @param locationType the locationType value to set. + * @return the UeLocationInfo object itself. + */ + public UeLocationInfo withLocationType(String locationType) { + this.locationType = locationType; + return this; + } + + /** + * Get the tac property: Type Allocation Code of UE. + * + * @return the tac value. + */ + public String tac() { + return this.tac; + } + + /** + * Set the tac property: Type Allocation Code of UE. + * + * @param tac the tac value to set. + * @return the UeLocationInfo object itself. + */ + public UeLocationInfo withTac(String tac) { + this.tac = tac; + return this; + } + + /** + * Get the plmn property: PLMN Identifier. + * + * @return the plmn value. + */ + public PlmnId plmn() { + return this.plmn; + } + + /** + * Set the plmn property: PLMN Identifier. + * + * @param plmn the plmn value to set. + * @return the UeLocationInfo object itself. + */ + public UeLocationInfo withPlmn(PlmnId plmn) { + this.plmn = plmn; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (locationType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property locationType in model UeLocationInfo")); + } + if (tac() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property tac in model UeLocationInfo")); + } + if (plmn() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property plmn in model UeLocationInfo")); + } else { + plmn().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeLocationInfo.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("locationType", this.locationType); + jsonWriter.writeStringField("tac", this.tac); + jsonWriter.writeJsonField("plmn", this.plmn); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeLocationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeLocationInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeLocationInfo. + */ + public static UeLocationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeLocationInfo deserializedUeLocationInfo = new UeLocationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("locationType".equals(fieldName)) { + deserializedUeLocationInfo.locationType = reader.getString(); + } else if ("tac".equals(fieldName)) { + deserializedUeLocationInfo.tac = reader.getString(); + } else if ("plmn".equals(fieldName)) { + deserializedUeLocationInfo.plmn = PlmnId.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedUeLocationInfo; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeQosFlow.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeQosFlow.java new file mode 100644 index 000000000000..f567965e3ba5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeQosFlow.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * QoS Flow. + */ +@Fluent +public final class UeQosFlow implements JsonSerializable { + /* + * Qos Flow Identifier + */ + private int qfi; + + /* + * 5G QoS Identifier. + */ + private int fiveqi; + + /* + * Maximum Bit Rate + */ + private Ambr mbr; + + /* + * Guaranteed Bit Rate + */ + private Ambr gbr; + + /** + * Creates an instance of UeQosFlow class. + */ + public UeQosFlow() { + } + + /** + * Get the qfi property: Qos Flow Identifier. + * + * @return the qfi value. + */ + public int qfi() { + return this.qfi; + } + + /** + * Set the qfi property: Qos Flow Identifier. + * + * @param qfi the qfi value to set. + * @return the UeQosFlow object itself. + */ + public UeQosFlow withQfi(int qfi) { + this.qfi = qfi; + return this; + } + + /** + * Get the fiveqi property: 5G QoS Identifier. + * + * @return the fiveqi value. + */ + public int fiveqi() { + return this.fiveqi; + } + + /** + * Set the fiveqi property: 5G QoS Identifier. + * + * @param fiveqi the fiveqi value to set. + * @return the UeQosFlow object itself. + */ + public UeQosFlow withFiveqi(int fiveqi) { + this.fiveqi = fiveqi; + return this; + } + + /** + * Get the mbr property: Maximum Bit Rate. + * + * @return the mbr value. + */ + public Ambr mbr() { + return this.mbr; + } + + /** + * Set the mbr property: Maximum Bit Rate. + * + * @param mbr the mbr value to set. + * @return the UeQosFlow object itself. + */ + public UeQosFlow withMbr(Ambr mbr) { + this.mbr = mbr; + return this; + } + + /** + * Get the gbr property: Guaranteed Bit Rate. + * + * @return the gbr value. + */ + public Ambr gbr() { + return this.gbr; + } + + /** + * Set the gbr property: Guaranteed Bit Rate. + * + * @param gbr the gbr value to set. + * @return the UeQosFlow object itself. + */ + public UeQosFlow withGbr(Ambr gbr) { + this.gbr = gbr; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mbr() != null) { + mbr().validate(); + } + if (gbr() != null) { + gbr().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("qfi", this.qfi); + jsonWriter.writeIntField("fiveqi", this.fiveqi); + jsonWriter.writeJsonField("mbr", this.mbr); + jsonWriter.writeJsonField("gbr", this.gbr); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeQosFlow from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeQosFlow if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeQosFlow. + */ + public static UeQosFlow fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeQosFlow deserializedUeQosFlow = new UeQosFlow(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("qfi".equals(fieldName)) { + deserializedUeQosFlow.qfi = reader.getInt(); + } else if ("fiveqi".equals(fieldName)) { + deserializedUeQosFlow.fiveqi = reader.getInt(); + } else if ("mbr".equals(fieldName)) { + deserializedUeQosFlow.mbr = Ambr.fromJson(reader); + } else if ("gbr".equals(fieldName)) { + deserializedUeQosFlow.gbr = Ambr.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedUeQosFlow; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeSessionInfo4G.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeSessionInfo4G.java new file mode 100644 index 000000000000..adcf30dff8b1 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeSessionInfo4G.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * UE Session Info for 4G. + */ +@Fluent +public final class UeSessionInfo4G implements JsonSerializable { + /* + * EPS bearer identifier + */ + private int ebi; + + /* + * Access point name + */ + private String apn; + + /* + * UE IP address + */ + private UeIpAddress ueIpAddress; + + /* + * Packet Data Network Type + */ + private PdnType pdnType; + + /** + * Creates an instance of UeSessionInfo4G class. + */ + public UeSessionInfo4G() { + } + + /** + * Get the ebi property: EPS bearer identifier. + * + * @return the ebi value. + */ + public int ebi() { + return this.ebi; + } + + /** + * Set the ebi property: EPS bearer identifier. + * + * @param ebi the ebi value to set. + * @return the UeSessionInfo4G object itself. + */ + public UeSessionInfo4G withEbi(int ebi) { + this.ebi = ebi; + return this; + } + + /** + * Get the apn property: Access point name. + * + * @return the apn value. + */ + public String apn() { + return this.apn; + } + + /** + * Set the apn property: Access point name. + * + * @param apn the apn value to set. + * @return the UeSessionInfo4G object itself. + */ + public UeSessionInfo4G withApn(String apn) { + this.apn = apn; + return this; + } + + /** + * Get the ueIpAddress property: UE IP address. + * + * @return the ueIpAddress value. + */ + public UeIpAddress ueIpAddress() { + return this.ueIpAddress; + } + + /** + * Set the ueIpAddress property: UE IP address. + * + * @param ueIpAddress the ueIpAddress value to set. + * @return the UeSessionInfo4G object itself. + */ + public UeSessionInfo4G withUeIpAddress(UeIpAddress ueIpAddress) { + this.ueIpAddress = ueIpAddress; + return this; + } + + /** + * Get the pdnType property: Packet Data Network Type. + * + * @return the pdnType value. + */ + public PdnType pdnType() { + return this.pdnType; + } + + /** + * Set the pdnType property: Packet Data Network Type. + * + * @param pdnType the pdnType value to set. + * @return the UeSessionInfo4G object itself. + */ + public UeSessionInfo4G withPdnType(PdnType pdnType) { + this.pdnType = pdnType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (apn() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property apn in model UeSessionInfo4G")); + } + if (ueIpAddress() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property ueIpAddress in model UeSessionInfo4G")); + } else { + ueIpAddress().validate(); + } + if (pdnType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property pdnType in model UeSessionInfo4G")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeSessionInfo4G.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("ebi", this.ebi); + jsonWriter.writeStringField("apn", this.apn); + jsonWriter.writeJsonField("ueIpAddress", this.ueIpAddress); + jsonWriter.writeStringField("pdnType", this.pdnType == null ? null : this.pdnType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeSessionInfo4G from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeSessionInfo4G if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeSessionInfo4G. + */ + public static UeSessionInfo4G fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeSessionInfo4G deserializedUeSessionInfo4G = new UeSessionInfo4G(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ebi".equals(fieldName)) { + deserializedUeSessionInfo4G.ebi = reader.getInt(); + } else if ("apn".equals(fieldName)) { + deserializedUeSessionInfo4G.apn = reader.getString(); + } else if ("ueIpAddress".equals(fieldName)) { + deserializedUeSessionInfo4G.ueIpAddress = UeIpAddress.fromJson(reader); + } else if ("pdnType".equals(fieldName)) { + deserializedUeSessionInfo4G.pdnType = PdnType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUeSessionInfo4G; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeSessionInfo5G.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeSessionInfo5G.java new file mode 100644 index 000000000000..20f1233126e5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeSessionInfo5G.java @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * UE Session Info for 5G. + */ +@Fluent +public final class UeSessionInfo5G implements JsonSerializable { + /* + * PDU session identifier + */ + private int pduSessionId; + + /* + * Data network name + */ + private String dnn; + + /* + * Single-network slice selection assistance information (S-NSSAI). + */ + private Snssai snssai; + + /* + * UE IP address + */ + private UeIpAddress ueIpAddress; + + /* + * Packet Data Network Type + */ + private PdnType pdnType; + + /* + * Aggregate maximum bit rate. + */ + private Ambr ambr; + + /* + * The qosFlow property. + */ + private List qosFlow; + + /** + * Creates an instance of UeSessionInfo5G class. + */ + public UeSessionInfo5G() { + } + + /** + * Get the pduSessionId property: PDU session identifier. + * + * @return the pduSessionId value. + */ + public int pduSessionId() { + return this.pduSessionId; + } + + /** + * Set the pduSessionId property: PDU session identifier. + * + * @param pduSessionId the pduSessionId value to set. + * @return the UeSessionInfo5G object itself. + */ + public UeSessionInfo5G withPduSessionId(int pduSessionId) { + this.pduSessionId = pduSessionId; + return this; + } + + /** + * Get the dnn property: Data network name. + * + * @return the dnn value. + */ + public String dnn() { + return this.dnn; + } + + /** + * Set the dnn property: Data network name. + * + * @param dnn the dnn value to set. + * @return the UeSessionInfo5G object itself. + */ + public UeSessionInfo5G withDnn(String dnn) { + this.dnn = dnn; + return this; + } + + /** + * Get the snssai property: Single-network slice selection assistance information (S-NSSAI). + * + * @return the snssai value. + */ + public Snssai snssai() { + return this.snssai; + } + + /** + * Set the snssai property: Single-network slice selection assistance information (S-NSSAI). + * + * @param snssai the snssai value to set. + * @return the UeSessionInfo5G object itself. + */ + public UeSessionInfo5G withSnssai(Snssai snssai) { + this.snssai = snssai; + return this; + } + + /** + * Get the ueIpAddress property: UE IP address. + * + * @return the ueIpAddress value. + */ + public UeIpAddress ueIpAddress() { + return this.ueIpAddress; + } + + /** + * Set the ueIpAddress property: UE IP address. + * + * @param ueIpAddress the ueIpAddress value to set. + * @return the UeSessionInfo5G object itself. + */ + public UeSessionInfo5G withUeIpAddress(UeIpAddress ueIpAddress) { + this.ueIpAddress = ueIpAddress; + return this; + } + + /** + * Get the pdnType property: Packet Data Network Type. + * + * @return the pdnType value. + */ + public PdnType pdnType() { + return this.pdnType; + } + + /** + * Set the pdnType property: Packet Data Network Type. + * + * @param pdnType the pdnType value to set. + * @return the UeSessionInfo5G object itself. + */ + public UeSessionInfo5G withPdnType(PdnType pdnType) { + this.pdnType = pdnType; + return this; + } + + /** + * Get the ambr property: Aggregate maximum bit rate. + * + * @return the ambr value. + */ + public Ambr ambr() { + return this.ambr; + } + + /** + * Set the ambr property: Aggregate maximum bit rate. + * + * @param ambr the ambr value to set. + * @return the UeSessionInfo5G object itself. + */ + public UeSessionInfo5G withAmbr(Ambr ambr) { + this.ambr = ambr; + return this; + } + + /** + * Get the qosFlow property: The qosFlow property. + * + * @return the qosFlow value. + */ + public List qosFlow() { + return this.qosFlow; + } + + /** + * Set the qosFlow property: The qosFlow property. + * + * @param qosFlow the qosFlow value to set. + * @return the UeSessionInfo5G object itself. + */ + public UeSessionInfo5G withQosFlow(List qosFlow) { + this.qosFlow = qosFlow; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dnn() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property dnn in model UeSessionInfo5G")); + } + if (snssai() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property snssai in model UeSessionInfo5G")); + } else { + snssai().validate(); + } + if (ueIpAddress() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property ueIpAddress in model UeSessionInfo5G")); + } else { + ueIpAddress().validate(); + } + if (pdnType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property pdnType in model UeSessionInfo5G")); + } + if (ambr() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property ambr in model UeSessionInfo5G")); + } else { + ambr().validate(); + } + if (qosFlow() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property qosFlow in model UeSessionInfo5G")); + } else { + qosFlow().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UeSessionInfo5G.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("pduSessionId", this.pduSessionId); + jsonWriter.writeStringField("dnn", this.dnn); + jsonWriter.writeJsonField("snssai", this.snssai); + jsonWriter.writeJsonField("ueIpAddress", this.ueIpAddress); + jsonWriter.writeStringField("pdnType", this.pdnType == null ? null : this.pdnType.toString()); + jsonWriter.writeJsonField("ambr", this.ambr); + jsonWriter.writeArrayField("qosFlow", this.qosFlow, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UeSessionInfo5G from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UeSessionInfo5G if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UeSessionInfo5G. + */ + public static UeSessionInfo5G fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UeSessionInfo5G deserializedUeSessionInfo5G = new UeSessionInfo5G(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("pduSessionId".equals(fieldName)) { + deserializedUeSessionInfo5G.pduSessionId = reader.getInt(); + } else if ("dnn".equals(fieldName)) { + deserializedUeSessionInfo5G.dnn = reader.getString(); + } else if ("snssai".equals(fieldName)) { + deserializedUeSessionInfo5G.snssai = Snssai.fromJson(reader); + } else if ("ueIpAddress".equals(fieldName)) { + deserializedUeSessionInfo5G.ueIpAddress = UeIpAddress.fromJson(reader); + } else if ("pdnType".equals(fieldName)) { + deserializedUeSessionInfo5G.pdnType = PdnType.fromString(reader.getString()); + } else if ("ambr".equals(fieldName)) { + deserializedUeSessionInfo5G.ambr = Ambr.fromJson(reader); + } else if ("qosFlow".equals(fieldName)) { + List qosFlow = reader.readArray(reader1 -> UeQosFlow.fromJson(reader1)); + deserializedUeSessionInfo5G.qosFlow = qosFlow; + } else { + reader.skipChildren(); + } + } + + return deserializedUeSessionInfo5G; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeState.java new file mode 100644 index 000000000000..56b5a3bd16bf --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeState.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * State of the UE. + */ +public final class UeState extends ExpandableStringEnum { + /** + * Static value Connected for UeState. + */ + public static final UeState CONNECTED = fromString("Connected"); + + /** + * Static value Idle for UeState. + */ + public static final UeState IDLE = fromString("Idle"); + + /** + * Static value Detached for UeState. + */ + public static final UeState DETACHED = fromString("Detached"); + + /** + * Static value Deregistered for UeState. + */ + public static final UeState DEREGISTERED = fromString("Deregistered"); + + /** + * Static value Unknown for UeState. + */ + public static final UeState UNKNOWN = fromString("Unknown"); + + /** + * Creates a new instance of UeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UeState() { + } + + /** + * Creates or finds a UeState from its string representation. + * + * @param name a name to look for. + * @return the corresponding UeState. + */ + public static UeState fromString(String name) { + return fromString(name, UeState.class); + } + + /** + * Gets known UeState values. + * + * @return known UeState values. + */ + public static Collection values() { + return values(UeState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeUsageSetting.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeUsageSetting.java new file mode 100644 index 000000000000..c3e7d8216e6b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UeUsageSetting.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The UE's usage setting. + */ +public final class UeUsageSetting extends ExpandableStringEnum { + /** + * Static value VoiceCentric for UeUsageSetting. + */ + public static final UeUsageSetting VOICE_CENTRIC = fromString("VoiceCentric"); + + /** + * Static value DataCentric for UeUsageSetting. + */ + public static final UeUsageSetting DATA_CENTRIC = fromString("DataCentric"); + + /** + * Creates a new instance of UeUsageSetting value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UeUsageSetting() { + } + + /** + * Creates or finds a UeUsageSetting from its string representation. + * + * @param name a name to look for. + * @return the corresponding UeUsageSetting. + */ + public static UeUsageSetting fromString(String name) { + return fromString(name, UeUsageSetting.class); + } + + /** + * Gets known UeUsageSetting values. + * + * @return known UeUsageSetting values. + */ + public static Collection values() { + return values(UeUsageSetting.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserAssignedIdentity.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserAssignedIdentity.java new file mode 100644 index 000000000000..263e88849b3d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserAssignedIdentity.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.UUID; + +/** + * User assigned identity properties. + */ +@Immutable +public final class UserAssignedIdentity implements JsonSerializable { + /* + * The principal ID of the assigned identity. + */ + private UUID principalId; + + /* + * The client ID of the assigned identity. + */ + private UUID clientId; + + /** + * Creates an instance of UserAssignedIdentity class. + */ + public UserAssignedIdentity() { + } + + /** + * Get the principalId property: The principal ID of the assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client ID of the assigned identity. + * + * @return the clientId value. + */ + public UUID clientId() { + return this.clientId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserAssignedIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserAssignedIdentity. + */ + public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedUserAssignedIdentity.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("clientId".equals(fieldName)) { + deserializedUserAssignedIdentity.clientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedUserAssignedIdentity; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserConsentConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserConsentConfiguration.java new file mode 100644 index 000000000000..4f96564c4bf6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserConsentConfiguration.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The UserConsentConfiguration model. + */ +@Fluent +public final class UserConsentConfiguration implements JsonSerializable { + /* + * Allow Microsoft to access non-PII telemetry information from the packet core. + */ + private Boolean allowSupportTelemetryAccess; + + /** + * Creates an instance of UserConsentConfiguration class. + */ + public UserConsentConfiguration() { + } + + /** + * Get the allowSupportTelemetryAccess property: Allow Microsoft to access non-PII telemetry information from the + * packet core. + * + * @return the allowSupportTelemetryAccess value. + */ + public Boolean allowSupportTelemetryAccess() { + return this.allowSupportTelemetryAccess; + } + + /** + * Set the allowSupportTelemetryAccess property: Allow Microsoft to access non-PII telemetry information from the + * packet core. + * + * @param allowSupportTelemetryAccess the allowSupportTelemetryAccess value to set. + * @return the UserConsentConfiguration object itself. + */ + public UserConsentConfiguration withAllowSupportTelemetryAccess(Boolean allowSupportTelemetryAccess) { + this.allowSupportTelemetryAccess = allowSupportTelemetryAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("allowSupportTelemetryAccess", this.allowSupportTelemetryAccess); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserConsentConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserConsentConfiguration if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserConsentConfiguration. + */ + public static UserConsentConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserConsentConfiguration deserializedUserConsentConfiguration = new UserConsentConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("allowSupportTelemetryAccess".equals(fieldName)) { + deserializedUserConsentConfiguration.allowSupportTelemetryAccess + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedUserConsentConfiguration; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserPlaneDataRoutesItem.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserPlaneDataRoutesItem.java new file mode 100644 index 000000000000..ef44b089ed5e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserPlaneDataRoutesItem.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The UserPlaneDataRoutesItem model. + */ +@Fluent +public final class UserPlaneDataRoutesItem implements JsonSerializable { + /* + * Reference to an attached data network resource. + */ + private AttachedDataNetworkResourceId attachedDataNetwork; + + /* + * A list of IPv4 routes. + */ + private List routes; + + /** + * Creates an instance of UserPlaneDataRoutesItem class. + */ + public UserPlaneDataRoutesItem() { + } + + /** + * Get the attachedDataNetwork property: Reference to an attached data network resource. + * + * @return the attachedDataNetwork value. + */ + public AttachedDataNetworkResourceId attachedDataNetwork() { + return this.attachedDataNetwork; + } + + /** + * Set the attachedDataNetwork property: Reference to an attached data network resource. + * + * @param attachedDataNetwork the attachedDataNetwork value to set. + * @return the UserPlaneDataRoutesItem object itself. + */ + public UserPlaneDataRoutesItem withAttachedDataNetwork(AttachedDataNetworkResourceId attachedDataNetwork) { + this.attachedDataNetwork = attachedDataNetwork; + return this; + } + + /** + * Get the routes property: A list of IPv4 routes. + * + * @return the routes value. + */ + public List routes() { + return this.routes; + } + + /** + * Set the routes property: A list of IPv4 routes. + * + * @param routes the routes value to set. + * @return the UserPlaneDataRoutesItem object itself. + */ + public UserPlaneDataRoutesItem withRoutes(List routes) { + this.routes = routes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (attachedDataNetwork() != null) { + attachedDataNetwork().validate(); + } + if (routes() != null) { + routes().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("attachedDataNetwork", this.attachedDataNetwork); + jsonWriter.writeArrayField("routes", this.routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserPlaneDataRoutesItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserPlaneDataRoutesItem if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserPlaneDataRoutesItem. + */ + public static UserPlaneDataRoutesItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserPlaneDataRoutesItem deserializedUserPlaneDataRoutesItem = new UserPlaneDataRoutesItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("attachedDataNetwork".equals(fieldName)) { + deserializedUserPlaneDataRoutesItem.attachedDataNetwork + = AttachedDataNetworkResourceId.fromJson(reader); + } else if ("routes".equals(fieldName)) { + List routes = reader.readArray(reader1 -> Ipv4Route.fromJson(reader1)); + deserializedUserPlaneDataRoutesItem.routes = routes; + } else { + reader.skipChildren(); + } + } + + return deserializedUserPlaneDataRoutesItem; + }); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/VersionState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/VersionState.java new file mode 100644 index 000000000000..afbae5c3b658 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/VersionState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state of this packet core control plane version. + */ +public final class VersionState extends ExpandableStringEnum { + /** + * Static value Unknown for VersionState. + */ + public static final VersionState UNKNOWN = fromString("Unknown"); + + /** + * Static value Preview for VersionState. + */ + public static final VersionState PREVIEW = fromString("Preview"); + + /** + * Static value Validating for VersionState. + */ + public static final VersionState VALIDATING = fromString("Validating"); + + /** + * Static value ValidationFailed for VersionState. + */ + public static final VersionState VALIDATION_FAILED = fromString("ValidationFailed"); + + /** + * Static value Active for VersionState. + */ + public static final VersionState ACTIVE = fromString("Active"); + + /** + * Static value Deprecated for VersionState. + */ + public static final VersionState DEPRECATED = fromString("Deprecated"); + + /** + * Creates a new instance of VersionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VersionState() { + } + + /** + * Creates or finds a VersionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding VersionState. + */ + public static VersionState fromString(String name) { + return fromString(name, VersionState.class); + } + + /** + * Gets known VersionState values. + * + * @return known VersionState values. + */ + public static Collection values() { + return values(VersionState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/package-info.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/package-info.java new file mode 100644 index 000000000000..f2d09ec04aca --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for MobileNetworkManagementClient. + * The resources in this API specification will be used to manage attached data network resources in mobile network + * attached to a particular packet core instance. + */ +package com.azure.resourcemanager.mobilenetwork.models; diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/package-info.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/package-info.java new file mode 100644 index 000000000000..bae4e24a43aa --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for MobileNetworkManagementClient. + * The resources in this API specification will be used to manage attached data network resources in mobile network + * attached to a particular packet core instance. + */ +package com.azure.resourcemanager.mobilenetwork; diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/module-info.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/module-info.java new file mode 100644 index 000000000000..97528b41ddb9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/module-info.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.mobilenetwork { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.mobilenetwork; + exports com.azure.resourcemanager.mobilenetwork.fluent; + exports com.azure.resourcemanager.mobilenetwork.fluent.models; + exports com.azure.resourcemanager.mobilenetwork.models; + + opens com.azure.resourcemanager.mobilenetwork.fluent.models to com.azure.core; + opens com.azure.resourcemanager.mobilenetwork.models to com.azure.core; +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mobilenetwork/proxy-config.json b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mobilenetwork/proxy-config.json new file mode 100644 index 000000000000..7d8145ca322a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mobilenetwork/proxy-config.json @@ -0,0 +1 @@ +[["com.azure.resourcemanager.mobilenetwork.implementation.AttachedDataNetworksClientImpl$AttachedDataNetworksService"],["com.azure.resourcemanager.mobilenetwork.implementation.DataNetworksClientImpl$DataNetworksService"],["com.azure.resourcemanager.mobilenetwork.implementation.DiagnosticsPackagesClientImpl$DiagnosticsPackagesService"],["com.azure.resourcemanager.mobilenetwork.implementation.ExtendedUeInformationsClientImpl$ExtendedUeInformationsService"],["com.azure.resourcemanager.mobilenetwork.implementation.MobileNetworksClientImpl$MobileNetworksService"],["com.azure.resourcemanager.mobilenetwork.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.mobilenetwork.implementation.PacketCapturesClientImpl$PacketCapturesService"],["com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreControlPlaneVersionsClientImpl$PacketCoreControlPlaneVersionsService"],["com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreControlPlanesClientImpl$PacketCoreControlPlanesService"],["com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreDataPlanesClientImpl$PacketCoreDataPlanesService"],["com.azure.resourcemanager.mobilenetwork.implementation.RoutingInfoesClientImpl$RoutingInfoesService"],["com.azure.resourcemanager.mobilenetwork.implementation.ServicesClientImpl$ServicesService"],["com.azure.resourcemanager.mobilenetwork.implementation.SimGroupsClientImpl$SimGroupsService"],["com.azure.resourcemanager.mobilenetwork.implementation.SimPoliciesClientImpl$SimPoliciesService"],["com.azure.resourcemanager.mobilenetwork.implementation.SimsClientImpl$SimsService"],["com.azure.resourcemanager.mobilenetwork.implementation.SitesClientImpl$SitesService"],["com.azure.resourcemanager.mobilenetwork.implementation.SlicesClientImpl$SlicesService"],["com.azure.resourcemanager.mobilenetwork.implementation.UeInformationsClientImpl$UeInformationsService"]] \ No newline at end of file diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mobilenetwork/reflect-config.json b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mobilenetwork/reflect-config.json new file mode 100644 index 000000000000..0637a088a01e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mobilenetwork/reflect-config.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e34e4546a53e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.NaptEnabled; +import com.azure.resourcemanager.mobilenetwork.models.PinholeTimeouts; +import com.azure.resourcemanager.mobilenetwork.models.PortRange; +import com.azure.resourcemanager.mobilenetwork.models.PortReuseHoldTimes; +import java.util.Arrays; + +/** + * Samples for AttachedDataNetworks CreateOrUpdate. + */ +public final class AttachedDataNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkCreate.json + */ + /** + * Sample code: Create attached data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createAttachedDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.attachedDataNetworks() + .define("TestAttachedDataNetwork") + .withRegion("eastus") + .withExistingPacketCoreDataPlane("rg1", "TestPacketCoreCP", "TestPacketCoreDP") + .withUserPlaneDataInterface(new InterfaceProperties().withName("N6")) + .withDnsAddresses(Arrays.asList("1.1.1.1")) + .withNaptConfiguration(new NaptConfiguration().withEnabled(NaptEnabled.ENABLED) + .withPortRange(new PortRange().withMinPort(1024).withMaxPort(49999)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(120).withUdp(60)) + .withPinholeLimits(65536) + .withPinholeTimeouts(new PinholeTimeouts().withTcp(180).withUdp(30).withIcmp(30))) + .withUserEquipmentAddressPoolPrefix(Arrays.asList("2.2.0.0/16")) + .withUserEquipmentStaticAddressPoolPrefix(Arrays.asList("2.4.0.0/16")) + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteSamples.java new file mode 100644 index 000000000000..7761b4d16271 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for AttachedDataNetworks Delete. + */ +public final class AttachedDataNetworksDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkDelete.json + */ + /** + * Sample code: Delete attached data network resource. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + deleteAttachedDataNetworkResource(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.attachedDataNetworks() + .delete("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetSamples.java new file mode 100644 index 000000000000..32d6b5efce2b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for AttachedDataNetworks Get. + */ +public final class AttachedDataNetworksGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkGet.json + */ + /** + * Sample code: Get attached data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getAttachedDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.attachedDataNetworks() + .getWithResponse("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneSamples.java new file mode 100644 index 000000000000..1bffca1995ec --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for AttachedDataNetworks ListByPacketCoreDataPlane. + */ +public final class AttachedDataNetworksListByPacketCoreDataPlaneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkListByPacketCoreDataPlane.json + */ + /** + * Sample code: List attached data networks in a data plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listAttachedDataNetworksInADataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.attachedDataNetworks() + .listByPacketCoreDataPlane("rg1", "TestPacketCoreCP", "TestPacketCoreDP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksUpdateTagsSamples.java new file mode 100644 index 000000000000..3a8c9360b32f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksUpdateTagsSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetwork; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AttachedDataNetworks UpdateTags. + */ +public final class AttachedDataNetworksUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * AttachedDataNetworkUpdateTags.json + */ + /** + * Sample code: Update attached data network tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + updateAttachedDataNetworkTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + AttachedDataNetwork resource = manager.attachedDataNetworks() + .getWithResponse("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateSamples.java new file mode 100644 index 000000000000..94de594f371f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for DataNetworks CreateOrUpdate. + */ +public final class DataNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/DataNetworkCreate + * .json + */ + /** + * Sample code: Create data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.dataNetworks() + .define("testDataNetwork") + .withRegion("eastus") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .withDescription("myFavouriteDataNetwork") + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteSamples.java new file mode 100644 index 000000000000..ef47b8ff4a88 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for DataNetworks Delete. + */ +public final class DataNetworksDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/DataNetworkDelete + * .json + */ + /** + * Sample code: Delete data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.dataNetworks().delete("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetSamples.java new file mode 100644 index 000000000000..7875ddb4a817 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for DataNetworks Get. + */ +public final class DataNetworksGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/DataNetworkGet. + * json + */ + /** + * Sample code: Get data network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.dataNetworks() + .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkSamples.java new file mode 100644 index 000000000000..8023d76eebc6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for DataNetworks ListByMobileNetwork. + */ +public final class DataNetworksListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DataNetworkListByMobileNetwork.json + */ + /** + * Sample code: List data networks in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listDataNetworksInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.dataNetworks().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksUpdateTagsSamples.java new file mode 100644 index 000000000000..282c29ea2ce6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksUpdateTagsSamples.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.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.DataNetwork; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DataNetworks UpdateTags. + */ +public final class DataNetworksUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DataNetworkUpdateTags.json + */ + /** + * Sample code: Update data network tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateDataNetworkTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + DataNetwork resource = manager.dataNetworks() + .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..a9ffa12780e7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for DiagnosticsPackages CreateOrUpdate. + */ +public final class DiagnosticsPackagesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DiagnosticsPackageCreate.json + */ + /** + * Sample code: Create diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages() + .createOrUpdate("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteSamples.java new file mode 100644 index 000000000000..eddb725f5273 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for DiagnosticsPackages Delete. + */ +public final class DiagnosticsPackagesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DiagnosticsPackageDelete.json + */ + /** + * Sample code: Delete diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages().delete("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetSamples.java new file mode 100644 index 000000000000..01b03c962ae2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for DiagnosticsPackages Get. + */ +public final class DiagnosticsPackagesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DiagnosticsPackageGet.json + */ + /** + * Sample code: Get diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages() + .getWithResponse("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneSamples.java new file mode 100644 index 000000000000..b16dd5977dd8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for DiagnosticsPackages ListByPacketCoreControlPlane. + */ +public final class DiagnosticsPackagesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * DiagnosticsPackageListByPacketCoreControlPlane.json + */ + /** + * Sample code: List diagnostics packages under a packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listDiagnosticsPackagesUnderAPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages() + .listByPacketCoreControlPlane("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInformationGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInformationGetSamples.java new file mode 100644 index 000000000000..03f651065d74 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInformationGetSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for ExtendedUeInformation Get. + */ +public final class ExtendedUeInformationGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * ExtendedUeInfo4GGet.json + */ + /** + * Sample code: Get UE Information 4G. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getUEInformation4G(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.extendedUeInformations() + .getWithResponse("rg1", "TestPacketCoreCP", "84449105622", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * ExtendedUeInfo5GGet.json + */ + /** + * Sample code: Get UE Information 5G. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getUEInformation5G(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.extendedUeInformations() + .getWithResponse("rg1", "TestPacketCoreCP", "84449105622", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksCreateOrUpdateSamples.java new file mode 100644 index 000000000000..2d677967f0a5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksCreateOrUpdateSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.HomeNetworkPublicKey; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.PublicLandMobileNetwork; +import com.azure.resourcemanager.mobilenetwork.models.PublicLandMobileNetworkHomeNetworkPublicKeys; +import java.util.Arrays; + +/** + * Samples for MobileNetworks CreateOrUpdate. + */ +public final class MobileNetworksCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkCreate.json + */ + /** + * Sample code: Create mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks() + .define("testMobileNetwork") + .withRegion("eastus") + .withExistingResourceGroup("rg1") + .withPublicLandMobileNetworkIdentifier(new PlmnId().withMcc("001").withMnc("01")) + .withPublicLandMobileNetworks(Arrays.asList(new PublicLandMobileNetwork().withMcc("001") + .withMnc("01") + .withHomeNetworkPublicKeys(new PublicLandMobileNetworkHomeNetworkPublicKeys() + .withProfileA(Arrays.asList( + new HomeNetworkPublicKey().withId(1) + .withUrl("https://contosovault.vault.azure.net/secrets/exampleHnpk"), + new HomeNetworkPublicKey().withId(2) + .withUrl( + "https://contosovault.vault.azure.net/secrets/exampleHnpk2/5e4876e9140e4e16bfe6e2cf92e0cbd2"))) + .withProfileB(Arrays.asList(new HomeNetworkPublicKey().withId(1) + .withUrl("https://contosovault.vault.azure.net/secrets/exampleHnpkProfileB")))))) + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteSamples.java new file mode 100644 index 000000000000..ecad15cdbbd5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for MobileNetworks Delete. + */ +public final class MobileNetworksDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkDelete.json + */ + /** + * Sample code: Delete mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks().delete("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksGetByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksGetByResourceGroupSamples.java new file mode 100644 index 000000000000..8a834b767236 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for MobileNetworks GetByResourceGroup. + */ +public final class MobileNetworksGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/MobileNetworkGet. + * json + */ + /** + * Sample code: Get mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks() + .getByResourceGroupWithResponse("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListByResourceGroupSamples.java new file mode 100644 index 000000000000..d425c104f77c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for MobileNetworks ListByResourceGroup. + */ +public final class MobileNetworksListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkListByResourceGroup.json + */ + /** + * Sample code: List mobile networks in resource group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listMobileNetworksInResourceGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSamples.java new file mode 100644 index 000000000000..f222b3023b25 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for MobileNetworks List. + */ +public final class MobileNetworksListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkListBySubscription.json + */ + /** + * Sample code: List mobile networks in a subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listMobileNetworksInASubscription(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSimGroupsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSimGroupsSamples.java new file mode 100644 index 000000000000..37fed6138c5b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSimGroupsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for MobileNetworks ListSimGroups. + */ +public final class MobileNetworksListSimGroupsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimGroupListByMobileNetwork.json + */ + /** + * Sample code: List SIM groups in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listSIMGroupsInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.mobileNetworks().listSimGroups("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksUpdateTagsSamples.java new file mode 100644 index 000000000000..cbf7d7a2c4f0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksUpdateTagsSamples.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.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.MobileNetwork; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for MobileNetworks UpdateTags. + */ +public final class MobileNetworksUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * MobileNetworkUpdateTags.json + */ + /** + * Sample code: Update mobile network tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateMobileNetworkTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + MobileNetwork resource = manager.mobileNetworks() + .getByResourceGroupWithResponse("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListSamples.java new file mode 100644 index 000000000000..5a236d471972 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/OperationList. + * json + */ + /** + * Sample code: Get Registration Operations. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getRegistrationOperations(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..fe7b1af33984 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import java.util.Arrays; + +/** + * Samples for PacketCaptures CreateOrUpdate. + */ +public final class PacketCapturesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCaptureCreate.json + */ + /** + * Sample code: Create packet capture. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createPacketCapture(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures() + .define("pc1") + .withExistingPacketCoreControlPlane("rg1", "TestPacketCoreCP") + .withNetworkInterfaces(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")) + .withBytesToCapturePerPacket(10000L) + .withTotalBytesPerSession(100000L) + .withTimeLimitInSeconds(100) + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteSamples.java new file mode 100644 index 000000000000..93676a208572 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCaptures Delete. + */ +public final class PacketCapturesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCaptureDelete.json + */ + /** + * Sample code: Delete packet capture. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deletePacketCapture(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().delete("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetSamples.java new file mode 100644 index 000000000000..0d2e802e9ac4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCaptures Get. + */ +public final class PacketCapturesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/PacketCaptureGet. + * json + */ + /** + * Sample code: Get packet capture session. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCaptureSession(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().getWithResponse("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneSamples.java new file mode 100644 index 000000000000..c5cce89dcbc3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCaptures ListByPacketCoreControlPlane. + */ +public final class PacketCapturesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCaptureListByPacketCoreControlPlane.json + */ + /** + * Sample code: List packet capture sessions under a packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listPacketCaptureSessionsUnderAPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures() + .listByPacketCoreControlPlane("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesStopSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesStopSamples.java new file mode 100644 index 000000000000..81019d580302 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesStopSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCaptures Stop. + */ +public final class PacketCapturesStopSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/PacketCaptureStop + * .json + */ + /** + * Sample code: Stop packet capture session. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void stopPacketCaptureSession(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().stop("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionSamples.java new file mode 100644 index 000000000000..0828edee3e20 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlaneVersions GetBySubscription. + */ +public final class PacketCoreControlPlaneVersionsGetBySubscriptionSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneVersionGetBySubscription.json + */ + /** + * Sample code: Get packet core control plane version by subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCoreControlPlaneVersionBySubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions() + .getBySubscriptionWithResponse("2404.0-1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetSamples.java new file mode 100644 index 000000000000..dd63c48a63af --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlaneVersions Get. + */ +public final class PacketCoreControlPlaneVersionsGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneVersionGet.json + */ + /** + * Sample code: Get packet core control plane version. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + getPacketCoreControlPlaneVersion(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions().getWithResponse("2404.0-1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionSamples.java new file mode 100644 index 000000000000..1bae69131d6c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlaneVersions ListBySubscription. + */ +public final class PacketCoreControlPlaneVersionsListBySubscriptionSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneVersionListBySubscription.json + */ + /** + * Sample code: Get supported packet core control plane versions by subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSupportedPacketCoreControlPlaneVersionsBySubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions().listBySubscription(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListSamples.java new file mode 100644 index 000000000000..1e6d4a1027f5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlaneVersions List. + */ +public final class PacketCoreControlPlaneVersionsListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneVersionList.json + */ + /** + * Sample code: Get supported packet core control plane versions. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSupportedPacketCoreControlPlaneVersions( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java new file mode 100644 index 000000000000..7bbcc64e2328 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; + +/** + * Samples for PacketCoreControlPlanes CollectDiagnosticsPackage. + */ +public final class PacketCoreControlPlanesCollectDiagnosticsPackageSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneCollectDiagnosticsPackage.json + */ + /** + * Sample code: Collect diagnostics package from packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void collectDiagnosticsPackageFromPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes() + .collectDiagnosticsPackage("rg1", "TestPacketCoreCP", + new PacketCoreControlPlaneCollectDiagnosticsPackage().withStorageAccountBlobUrl( + "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..8e7ed6805331 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCreateOrUpdateSamples.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.AuthenticationType; +import com.azure.resourcemanager.mobilenetwork.models.AzureStackEdgeDeviceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.BillingSku; +import com.azure.resourcemanager.mobilenetwork.models.ConnectedClusterResourceId; +import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; +import com.azure.resourcemanager.mobilenetwork.models.CustomLocationResourceId; +import com.azure.resourcemanager.mobilenetwork.models.DesiredInstallationState; +import com.azure.resourcemanager.mobilenetwork.models.EventHubConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.HttpsServerCertificate; +import com.azure.resourcemanager.mobilenetwork.models.Installation; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.NasEncryptionType; +import com.azure.resourcemanager.mobilenetwork.models.NasRerouteConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.SignalingConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SiteResourceId; +import java.util.Arrays; + +/** + * Samples for PacketCoreControlPlanes CreateOrUpdate. + */ +public final class PacketCoreControlPlanesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneCreate.json + */ + /** + * Sample code: Create packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + createPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes() + .define("TestPacketCoreCP") + .withRegion("eastus") + .withExistingResourceGroup("rg1") + .withSites(Arrays.asList(new SiteResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"))) + .withPlatform(new PlatformConfiguration().withType(PlatformType.AKS_HCI) + .withAzureStackEdgeDevice(new AzureStackEdgeDeviceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice")) + .withConnectedCluster(new ConnectedClusterResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster")) + .withCustomLocation(new CustomLocationResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"))) + .withControlPlaneAccessInterface(new InterfaceProperties().withName("N2")) + .withSku(BillingSku.G0) + .withLocalDiagnosticsAccess( + new LocalDiagnosticsAccessConfiguration().withAuthenticationType(AuthenticationType.AAD) + .withHttpsServerCertificate(new HttpsServerCertificate() + .withCertificateUrl("https://contosovault.vault.azure.net/certificates/ingress"))) + .withInstallation(new Installation().withDesiredState(DesiredInstallationState.INSTALLED)) + .withCoreNetworkTechnology(CoreNetworkType.FIVE_GC) + .withVersion("0.2.0") + .withUeMtu(1600) + .withEventHub(new EventHubConfiguration().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/contosoNamespace/eventHubs/contosoHub") + .withReportingInterval(60)) + .withSignaling( + new SignalingConfiguration().withNasReroute(new NasRerouteConfiguration().withMacroMmeGroupId(1024)) + .withNasEncryption(Arrays.asList(NasEncryptionType.NEA2_EEA2, NasEncryptionType.NEA1_EEA1, + NasEncryptionType.NEA0_EEA0))) + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteSamples.java new file mode 100644 index 000000000000..aaf98aea1a5b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlanes Delete. + */ +public final class PacketCoreControlPlanesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneDelete.json + */ + /** + * Sample code: Delete packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + deletePacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().delete("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesGetByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..37ae9d21d3c2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlanes GetByResourceGroup. + */ +public final class PacketCoreControlPlanesGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneGet.json + */ + /** + * Sample code: Get packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes() + .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListByResourceGroupSamples.java new file mode 100644 index 000000000000..10694da5d5dc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlanes ListByResourceGroup. + */ +public final class PacketCoreControlPlanesListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneListByResourceGroup.json + */ + /** + * Sample code: List packet core control planes in resource group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listPacketCoreControlPlanesInResourceGroup( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListSamples.java new file mode 100644 index 000000000000..80c8e8f29841 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlanes List. + */ +public final class PacketCoreControlPlanesListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneListBySubscription.json + */ + /** + * Sample code: List packet core control planes in a subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listPacketCoreControlPlanesInASubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java new file mode 100644 index 000000000000..9cdaf535a3e4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlanes Reinstall. + */ +public final class PacketCoreControlPlanesReinstallSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneReinstall.json + */ + /** + * Sample code: Reinstall packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + reinstallPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().reinstall("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java new file mode 100644 index 000000000000..61a44e6f123e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreControlPlanes Rollback. + */ +public final class PacketCoreControlPlanesRollbackSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlaneRollback.json + */ + /** + * Sample code: Rollback packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + rollbackPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().rollback("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesUpdateTagsSamples.java new file mode 100644 index 000000000000..e5a11777f10c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesUpdateTagsSamples.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PacketCoreControlPlanes UpdateTags. + */ +public final class PacketCoreControlPlanesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreControlPlanePatch.json + */ + /** + * Sample code: Patch packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + patchPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + PacketCoreControlPlane resource = manager.packetCoreControlPlanes() + .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d973bce6b5f6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; + +/** + * Samples for PacketCoreDataPlanes CreateOrUpdate. + */ +public final class PacketCoreDataPlanesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneCreate.json + */ + /** + * Sample code: Create packet core data plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createPacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreDataPlanes() + .define("testPacketCoreDP") + .withRegion("eastus") + .withExistingPacketCoreControlPlane("rg1", "testPacketCoreCP") + .withUserPlaneAccessInterface(new InterfaceProperties().withName("N3")) + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteSamples.java new file mode 100644 index 000000000000..250b5d3c9666 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreDataPlanes Delete. + */ +public final class PacketCoreDataPlanesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneDelete.json + */ + /** + * Sample code: Delete packet core data plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deletePacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreDataPlanes() + .delete("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetSamples.java new file mode 100644 index 000000000000..e5b204ad4447 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreDataPlanes Get. + */ +public final class PacketCoreDataPlanesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneGet.json + */ + /** + * Sample code: Get packet core data plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreDataPlanes() + .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneSamples.java new file mode 100644 index 000000000000..746e92bd623d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for PacketCoreDataPlanes ListByPacketCoreControlPlane. + */ +public final class PacketCoreDataPlanesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneListByPacketCoreControlPlane.json + */ + /** + * Sample code: List packet core data planes in a control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listPacketCoreDataPlanesInAControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreDataPlanes() + .listByPacketCoreControlPlane("rg1", "testPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesUpdateTagsSamples.java new file mode 100644 index 000000000000..4b7eae88d232 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesUpdateTagsSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlane; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PacketCoreDataPlanes UpdateTags. + */ +public final class PacketCoreDataPlanesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * PacketCoreDataPlaneUpdateTags.json + */ + /** + * Sample code: Update packet core data plane tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + updatePacketCoreDataPlaneTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + PacketCoreDataPlane resource = manager.packetCoreDataPlanes() + .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoGetSamples.java new file mode 100644 index 000000000000..56e04afe5895 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for RoutingInfo Get. + */ +public final class RoutingInfoGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * RoutingInfoPacketCoreControlPlane.json + */ + /** + * Sample code: Get routing information for the packet core. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + getRoutingInformationForThePacketCore(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.routingInfoes().getWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoListSamples.java new file mode 100644 index 000000000000..dbf6a04aff65 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for RoutingInfo List. + */ +public final class RoutingInfoListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * RoutingInfoListPacketCoreControlPlane.json + */ + /** + * Sample code: List routing information for the packet core. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listRoutingInformationForThePacketCore(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.routingInfoes().list("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..fdf548d26ff3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateSamples.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleQosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.ServiceDataFlowTemplate; +import com.azure.resourcemanager.mobilenetwork.models.TrafficControlPermission; +import java.util.Arrays; + +/** + * Samples for Services CreateOrUpdate. + */ +public final class ServicesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ServiceCreate. + * json + */ + /** + * Sample code: Create service. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.services() + .define("TestService") + .withRegion("eastus") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .withServicePrecedence(255) + .withPccRules(Arrays.asList(new PccRuleConfiguration().withRuleName("default-rule") + .withRulePrecedence(255) + .withRuleQosPolicy(new PccRuleQosPolicy().withFiveQi(9) + .withAllocationAndRetentionPriorityLevel(9) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates( + Arrays.asList(new ServiceDataFlowTemplate().withTemplateName("IP-to-server") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList("ip")) + .withRemoteIpList(Arrays.asList("10.3.4.0/24")) + .withPorts(Arrays.asList()))))) + .withServiceQosPolicy(new QosPolicy().withFiveQi(9) + .withAllocationAndRetentionPriorityLevel(9) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps"))) + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteSamples.java new file mode 100644 index 000000000000..5ea4a2747abe --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Services Delete. + */ +public final class ServicesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ServiceDelete. + * json + */ + /** + * Sample code: Delete service. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.services().delete("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetSamples.java new file mode 100644 index 000000000000..e6c87342be46 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Services Get. + */ +public final class ServicesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ServiceGet.json + */ + /** + * Sample code: Get service. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.services().getWithResponse("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkSamples.java new file mode 100644 index 000000000000..0bd49b71d69e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Services ListByMobileNetwork. + */ +public final class ServicesListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * ServiceListByMobileNetwork.json + */ + /** + * Sample code: List services in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listServicesInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.services() + .listByMobileNetwork("testResourceGroupName", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesUpdateTagsSamples.java new file mode 100644 index 000000000000..64cf238262ca --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesUpdateTagsSamples.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.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.Service; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Services UpdateTags. + */ +public final class ServicesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ServiceUpdateTags + * .json + */ + /** + * Sample code: Update service tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateServiceTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + Service resource = manager.services() + .getWithResponse("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..81c25a9ff012 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsCreateOrUpdateSamples.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.KeyVaultKey; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for SimGroups CreateOrUpdate. + */ +public final class SimGroupsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGroupCreate. + * json + */ + /** + * Sample code: Create SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups() + .define("testSimGroup") + .withRegion("eastus") + .withExistingResourceGroup("rg1") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .withEncryptionKey(new KeyVaultKey().withKeyUrl("fakeTokenPlaceholder")) + .withMobileNetwork(new MobileNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteSamples.java new file mode 100644 index 000000000000..3efdc5795824 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for SimGroups Delete. + */ +public final class SimGroupsDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGroupDelete. + * json + */ + /** + * Sample code: Delete SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups().delete("testResourceGroupName", "testSimGroup", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsGetByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..21977e290112 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for SimGroups GetByResourceGroup. + */ +public final class SimGroupsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGroupGet.json + */ + /** + * Sample code: Get SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups() + .getByResourceGroupWithResponse("testResourceGroupName", "testSimGroupName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListByResourceGroupSamples.java new file mode 100644 index 000000000000..5f3420b0dc91 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for SimGroups ListByResourceGroup. + */ +public final class SimGroupsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimGroupListByResourceGroup.json + */ + /** + * Sample code: List SIM groups in a resource group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listSIMGroupsInAResourceGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListSamples.java new file mode 100644 index 000000000000..d4cd41c90943 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for SimGroups List. + */ +public final class SimGroupsListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimGroupListBySubscription.json + */ + /** + * Sample code: List SIM groups in a subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listSIMGroupsInASubscription(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simGroups().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsUpdateTagsSamples.java new file mode 100644 index 000000000000..a9581982a3f4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsUpdateTagsSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.mobilenetwork.models.SimGroup; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for SimGroups UpdateTags. + */ +public final class SimGroupsUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGroupPatch. + * json + */ + /** + * Sample code: Patch SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void patchSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + SimGroup resource = manager.simGroups() + .getByResourceGroupWithResponse("rg1", "testSimGroup", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b18123ba7b80 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateSamples.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.PduSessionType; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.ServiceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** + * Samples for SimPolicies CreateOrUpdate. + */ +public final class SimPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimPolicyCreate. + * json + */ + /** + * Sample code: Create SIM policy. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies() + .define("testPolicy") + .withRegion("eastus") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .withUeAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) + .withDefaultSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withSliceConfigurations(Arrays.asList(new SliceConfiguration().withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + .withDataNetworkConfigurations(Arrays.asList(new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + .withSessionAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) + .withFiveQi(9) + .withAllocationAndRetentionPriorityLevel(9) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes(Arrays.asList()) + .withAllowedServices(Arrays.asList(new ServiceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"))) + .withMaximumNumberOfBufferedPackets(200))))) + .withRegistrationTimer(3240) + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteSamples.java new file mode 100644 index 000000000000..908ac82cc98d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for SimPolicies Delete. + */ +public final class SimPoliciesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimPolicyDelete. + * json + */ + /** + * Sample code: Delete SIM policy. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies().delete("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetSamples.java new file mode 100644 index 000000000000..7f99a5e341a5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for SimPolicies Get. + */ +public final class SimPoliciesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimPolicyGet.json + */ + /** + * Sample code: Get SIM policy. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies() + .getWithResponse("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkSamples.java new file mode 100644 index 000000000000..df693df7dc8a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for SimPolicies ListByMobileNetwork. + */ +public final class SimPoliciesListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimPolicyListByMobileNetwork.json + */ + /** + * Sample code: List SIM policies in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listSIMPoliciesInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies() + .listByMobileNetwork("testResourceGroupName", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesUpdateTagsSamples.java new file mode 100644 index 000000000000..d4cebaa8ec2e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesUpdateTagsSamples.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.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for SimPolicies UpdateTags. + */ +public final class SimPoliciesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimPolicyUpdateTags.json + */ + /** + * Sample code: Update SIM policy tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateSIMPolicyTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + SimPolicy resource = manager.simPolicies() + .getWithResponse("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java new file mode 100644 index 000000000000..064cfc5218d3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; +import java.util.Arrays; + +/** + * Samples for Sims BulkDelete. + */ +public final class SimsBulkDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimBulkDelete. + * json + */ + /** + * Sample code: Bulk delete SIMs from a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + bulkDeleteSIMsFromASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .bulkDelete("testResourceGroupName", "testSimGroup", + new SimDeleteList().withSims(Arrays.asList("testSim", "testSim2")), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java new file mode 100644 index 000000000000..73b7ab0f91d9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.SimNameAndEncryptedProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** + * Samples for Sims BulkUploadEncrypted. + */ +public final class SimsBulkUploadEncryptedSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SimBulkUploadEncrypted.json + */ + /** + * Sample code: Bulk upload encrypted SIMs to a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + bulkUploadEncryptedSIMsToASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .bulkUploadEncrypted("rg1", "testSimGroup", new EncryptedSimUploadList().withVersion(1) + .withAzureKeyIdentifier(1) + .withVendorKeyFingerprint("fakeTokenPlaceholder") + .withEncryptedTransportKey("fakeTokenPlaceholder") + .withSignedTransportKey("fakeTokenPlaceholder") + .withSims(Arrays.asList(new SimNameAndEncryptedProperties().withName("testSim") + .withEncryptedCredentials("fakeTokenPlaceholder") + .withInternationalMobileSubscriberIdentity("00000") + .withIntegratedCircuitCardIdentifier("8900000000000000000") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.1")))), + new SimNameAndEncryptedProperties().withName("testSim2") + .withEncryptedCredentials("fakeTokenPlaceholder") + .withInternationalMobileSubscriberIdentity("00000") + .withIntegratedCircuitCardIdentifier("8900000000000000001") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.2")))))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java new file mode 100644 index 000000000000..d7d7e1a693e4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimNameAndProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; +import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** + * Samples for Sims BulkUpload. + */ +public final class SimsBulkUploadSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimBulkUpload. + * json + */ + /** + * Sample code: Bulk upload SIMs in a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .bulkUpload("rg1", "testSimGroup", new SimUploadList().withSims(Arrays.asList(new SimNameAndProperties() + .withName("testSim") + .withAuthenticationKey("fakeTokenPlaceholder") + .withOperatorKeyCode("fakeTokenPlaceholder") + .withInternationalMobileSubscriberIdentity("00000") + .withIntegratedCircuitCardIdentifier("8900000000000000000") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.1")))), + new SimNameAndProperties().withName("testSim2") + .withAuthenticationKey("fakeTokenPlaceholder") + .withOperatorKeyCode("fakeTokenPlaceholder") + .withInternationalMobileSubscriberIdentity("00000") + .withIntegratedCircuitCardIdentifier("8900000000000000001") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.2")))))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCloneSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCloneSamples.java new file mode 100644 index 000000000000..6eb4eb82e53d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCloneSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.SimClone; +import com.azure.resourcemanager.mobilenetwork.models.SimGroupResourceId; +import java.util.Arrays; + +/** + * Samples for Sims Clone. + */ +public final class SimsCloneSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimClone.json + */ + /** + * Sample code: Clone list of SIMs to target SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + cloneListOfSIMsToTargetSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .clone("testResourceGroupName", "testSimGroup", + new SimClone().withTargetSimGroupId(new SimGroupResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.MobileNetwork/simGroups/testSimGroup1")) + .withSims(Arrays.asList("testSim", "testSim2")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..40b05f66778f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCreateOrUpdateSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** + * Samples for Sims CreateOrUpdate. + */ +public final class SimsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimCreate.json + */ + /** + * Sample code: Create SIM. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .define("testSim") + .withExistingSimGroup("rg1", "testSimGroup") + .withInternationalMobileSubscriberIdentity("00000") + .withAuthenticationKey("00000000000000000000000000000000") + .withOperatorKeyCode("00000000000000000000000000000000") + .withIntegratedCircuitCardIdentifier("8900000000000000000") + .withDeviceType("Video camera") + .withSimPolicy(new SimPolicyResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + .withStaticIpConfiguration(Arrays.asList(new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + .withSlice(new SliceResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.1")))) + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteSamples.java new file mode 100644 index 000000000000..1f8a763dd304 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Sims Delete. + */ +public final class SimsDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimDelete.json + */ + /** + * Sample code: Delete SIM. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims().delete("testResourceGroupName", "testSimGroup", "testSim", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsGetSamples.java new file mode 100644 index 000000000000..06a67b7b42e1 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Sims Get. + */ +public final class SimsGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimGet.json + */ + /** + * Sample code: Get SIM. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .getWithResponse("testResourceGroupName", "testSimGroup", "testSimName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsListByGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsListByGroupSamples.java new file mode 100644 index 000000000000..a508634a7aab --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsListByGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Sims ListByGroup. + */ +public final class SimsListByGroupSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimListBySimGroup + * .json + */ + /** + * Sample code: List SIMs in a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims().listByGroup("rg1", "testSimGroup", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsMoveSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsMoveSamples.java new file mode 100644 index 000000000000..1d32217dec86 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsMoveSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.SimGroupResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimMove; +import java.util.Arrays; + +/** + * Samples for Sims Move. + */ +public final class SimsMoveSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SimMove.json + */ + /** + * Sample code: Move list of SIMs to target SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + moveListOfSIMsToTargetSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sims() + .move("testResourceGroupName", "testSimGroup", + new SimMove().withTargetSimGroupId(new SimGroupResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.MobileNetwork/simGroups/testSimGroup1")) + .withSims(Arrays.asList("testSim", "testSim2")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..ec33727a9ac8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Sites CreateOrUpdate. + */ +public final class SitesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SiteCreate.json + */ + /** + * Sample code: Create mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites() + .define("testSite") + .withRegion("testLocation") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreSamples.java new file mode 100644 index 000000000000..271a7e3d4e68 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; + +/** + * Samples for Sites DeletePacketCore. + */ +public final class SitesDeletePacketCoreSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SiteDeletePacketCore.json + */ + /** + * Sample code: Delete packet core in mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + deletePacketCoreInMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites() + .deletePacketCore("rg1", "testMobileNetwork", "testSite", + new SiteDeletePacketCore().withPacketCore(new PacketCoreControlPlaneResourceId().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteSamples.java new file mode 100644 index 000000000000..d98e6dce88e5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Sites Delete. + */ +public final class SitesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SiteDelete.json + */ + /** + * Sample code: Delete mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites().delete("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetSamples.java new file mode 100644 index 000000000000..649718968a2d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Sites Get. + */ +public final class SitesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SiteGet.json + */ + /** + * Sample code: Get mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites().getWithResponse("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkSamples.java new file mode 100644 index 000000000000..bc109515529b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Sites ListByMobileNetwork. + */ +public final class SitesListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SiteListByMobileNetwork.json + */ + /** + * Sample code: List mobile network sites in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listMobileNetworkSitesInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.sites().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesUpdateTagsSamples.java new file mode 100644 index 000000000000..62403d2d82e4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesUpdateTagsSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.Site; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Sites UpdateTags. + */ +public final class SitesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SiteUpdateTags. + * json + */ + /** + * Sample code: Update mobile network site tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + updateMobileNetworkSiteTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + Site resource = manager.sites() + .getWithResponse("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..4b705eb87a12 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.Snssai; + +/** + * Samples for Slices CreateOrUpdate. + */ +public final class SlicesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SliceCreate.json + */ + /** + * Sample code: Create network slice. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.slices() + .define("testSlice") + .withRegion("eastus") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .withSnssai(new Snssai().withSst(1).withSd("1abcde")) + .withDescription("myFavouriteSlice") + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteSamples.java new file mode 100644 index 000000000000..9c95ca22c49c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Slices Delete. + */ +public final class SlicesDeleteSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SliceDelete.json + */ + /** + * Sample code: Delete network slice. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.slices().delete("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetSamples.java new file mode 100644 index 000000000000..2c3004c37b0d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Slices Get. + */ +public final class SlicesGetSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SliceGet.json + */ + /** + * Sample code: Get network slice. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.slices().getWithResponse("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkSamples.java new file mode 100644 index 000000000000..42b600f6ae7b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for Slices ListByMobileNetwork. + */ +public final class SlicesListByMobileNetworkSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/ + * SliceListByMobileNetwork.json + */ + /** + * Sample code: List network slices in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void + listNetworkSlicesInAMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.slices().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesUpdateTagsSamples.java new file mode 100644 index 000000000000..50d2f527942f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesUpdateTagsSamples.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.resourcemanager.mobilenetwork.generated; + +import com.azure.resourcemanager.mobilenetwork.models.Slice; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Slices UpdateTags. + */ +public final class SlicesUpdateTagsSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/SliceUpdateTags. + * json + */ + /** + * Sample code: Update network slice tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateNetworkSliceTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + Slice resource = manager.slices() + .getWithResponse("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/UeInformationListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/UeInformationListSamples.java new file mode 100644 index 000000000000..79423ab1c42a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/UeInformationListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +/** + * Samples for UeInformation List. + */ +public final class UeInformationListSamples { + /* + * x-ms-original-file: + * specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/UeInfoList.json + */ + /** + * Sample code: Get UE Information. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getUEInformation(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.ueInformations().list("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AmbrTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AmbrTests.java new file mode 100644 index 000000000000..7c52f7a14e4a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AmbrTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import org.junit.jupiter.api.Assertions; + +public final class AmbrTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Ambr model = BinaryData.fromString("{\"uplink\":\"yl\",\"downlink\":\"coolsttpkiwkkb\"}").toObject(Ambr.class); + Assertions.assertEquals("yl", model.uplink()); + Assertions.assertEquals("coolsttpkiwkkb", model.downlink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Ambr model = new Ambr().withUplink("yl").withDownlink("coolsttpkiwkkb"); + model = BinaryData.fromObject(model).toObject(Ambr.class); + Assertions.assertEquals("yl", model.uplink()); + Assertions.assertEquals("coolsttpkiwkkb", model.downlink()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AmfIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AmfIdTests.java new file mode 100644 index 000000000000..df3e344a83ab --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AmfIdTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AmfId; +import org.junit.jupiter.api.Assertions; + +public final class AmfIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AmfId model = BinaryData.fromString("{\"regionId\":1915158747,\"setId\":91533505,\"pointer\":1338567355}") + .toObject(AmfId.class); + Assertions.assertEquals(1915158747, model.regionId()); + Assertions.assertEquals(91533505, model.setId()); + Assertions.assertEquals(1338567355, model.pointer()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AmfId model = new AmfId().withRegionId(1915158747).withSetId(91533505).withPointer(1338567355); + model = BinaryData.fromObject(model).toObject(AmfId.class); + Assertions.assertEquals(1915158747, model.regionId()); + Assertions.assertEquals(91533505, model.setId()); + Assertions.assertEquals(1338567355, model.pointer()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AsyncOperationIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AsyncOperationIdTests.java new file mode 100644 index 000000000000..1c2d0e5a769f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AsyncOperationIdTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationId; +import org.junit.jupiter.api.Assertions; + +public final class AsyncOperationIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AsyncOperationId model = BinaryData.fromString("{\"id\":\"melmqkrha\"}").toObject(AsyncOperationId.class); + Assertions.assertEquals("melmqkrha", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AsyncOperationId model = new AsyncOperationId().withId("melmqkrha"); + model = BinaryData.fromObject(model).toObject(AsyncOperationId.class); + Assertions.assertEquals("melmqkrha", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkInnerTests.java new file mode 100644 index 000000000000..bd8629b29399 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkInnerTests.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.NaptEnabled; +import com.azure.resourcemanager.mobilenetwork.models.PinholeTimeouts; +import com.azure.resourcemanager.mobilenetwork.models.PortRange; +import com.azure.resourcemanager.mobilenetwork.models.PortReuseHoldTimes; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class AttachedDataNetworkInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AttachedDataNetworkInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"userPlaneDataInterface\":{\"name\":\"quvgjxpybczme\",\"ipv4Address\":\"tzopbsphrupidgsy\",\"ipv4Subnet\":\"ejhphoyc\",\"ipv4Gateway\":\"xaobhdxbmtqioqjz\",\"vlanId\":1801213143,\"ipv4AddressList\":[\"ufpo\"],\"bfdIpv4Endpoints\":[\"izhwlrxy\"]},\"dnsAddresses\":[\"soqijg\",\"dmbpazlobcufpdz\",\"rbt\"],\"naptConfiguration\":{\"enabled\":\"Disabled\",\"portRange\":{\"minPort\":1110459096,\"maxPort\":1499509907},\"portReuseHoldTime\":{\"tcp\":1049703732,\"udp\":1127644012},\"pinholeLimits\":342241824,\"pinholeTimeouts\":{\"tcp\":744579051,\"udp\":1080301009,\"icmp\":673031799}},\"userEquipmentAddressPoolPrefix\":[\"saagdf\",\"glzlhjxrifkwmrv\"],\"userEquipmentStaticAddressPoolPrefix\":[\"izntocipao\",\"ajpsquc\"]},\"location\":\"o\",\"tags\":{\"knygjofjddeq\":\"kfo\"},\"id\":\"rd\",\"name\":\"upewnwreitjzy\",\"type\":\"lusarh\"}") + .toObject(AttachedDataNetworkInner.class); + Assertions.assertEquals("o", model.location()); + Assertions.assertEquals("kfo", model.tags().get("knygjofjddeq")); + Assertions.assertEquals("quvgjxpybczme", model.userPlaneDataInterface().name()); + Assertions.assertEquals("tzopbsphrupidgsy", model.userPlaneDataInterface().ipv4Address()); + Assertions.assertEquals("ejhphoyc", model.userPlaneDataInterface().ipv4Subnet()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.userPlaneDataInterface().ipv4Gateway()); + Assertions.assertEquals(1801213143, model.userPlaneDataInterface().vlanId()); + Assertions.assertEquals("ufpo", model.userPlaneDataInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("izhwlrxy", model.userPlaneDataInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("soqijg", model.dnsAddresses().get(0)); + Assertions.assertEquals(NaptEnabled.DISABLED, model.naptConfiguration().enabled()); + Assertions.assertEquals(1110459096, model.naptConfiguration().portRange().minPort()); + Assertions.assertEquals(1499509907, model.naptConfiguration().portRange().maxPort()); + Assertions.assertEquals(1049703732, model.naptConfiguration().portReuseHoldTime().tcp()); + Assertions.assertEquals(1127644012, model.naptConfiguration().portReuseHoldTime().udp()); + Assertions.assertEquals(342241824, model.naptConfiguration().pinholeLimits()); + Assertions.assertEquals(744579051, model.naptConfiguration().pinholeTimeouts().tcp()); + Assertions.assertEquals(1080301009, model.naptConfiguration().pinholeTimeouts().udp()); + Assertions.assertEquals(673031799, model.naptConfiguration().pinholeTimeouts().icmp()); + Assertions.assertEquals("saagdf", model.userEquipmentAddressPoolPrefix().get(0)); + Assertions.assertEquals("izntocipao", model.userEquipmentStaticAddressPoolPrefix().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AttachedDataNetworkInner model = new AttachedDataNetworkInner().withLocation("o") + .withTags(mapOf("knygjofjddeq", "kfo")) + .withUserPlaneDataInterface(new InterfaceProperties().withName("quvgjxpybczme") + .withIpv4Address("tzopbsphrupidgsy") + .withIpv4Subnet("ejhphoyc") + .withIpv4Gateway("xaobhdxbmtqioqjz") + .withVlanId(1801213143) + .withIpv4AddressList(Arrays.asList("ufpo")) + .withBfdIpv4Endpoints(Arrays.asList("izhwlrxy"))) + .withDnsAddresses(Arrays.asList("soqijg", "dmbpazlobcufpdz", "rbt")) + .withNaptConfiguration(new NaptConfiguration().withEnabled(NaptEnabled.DISABLED) + .withPortRange(new PortRange().withMinPort(1110459096).withMaxPort(1499509907)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(1049703732).withUdp(1127644012)) + .withPinholeLimits(342241824) + .withPinholeTimeouts(new PinholeTimeouts().withTcp(744579051).withUdp(1080301009).withIcmp(673031799))) + .withUserEquipmentAddressPoolPrefix(Arrays.asList("saagdf", "glzlhjxrifkwmrv")) + .withUserEquipmentStaticAddressPoolPrefix(Arrays.asList("izntocipao", "ajpsquc")); + model = BinaryData.fromObject(model).toObject(AttachedDataNetworkInner.class); + Assertions.assertEquals("o", model.location()); + Assertions.assertEquals("kfo", model.tags().get("knygjofjddeq")); + Assertions.assertEquals("quvgjxpybczme", model.userPlaneDataInterface().name()); + Assertions.assertEquals("tzopbsphrupidgsy", model.userPlaneDataInterface().ipv4Address()); + Assertions.assertEquals("ejhphoyc", model.userPlaneDataInterface().ipv4Subnet()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.userPlaneDataInterface().ipv4Gateway()); + Assertions.assertEquals(1801213143, model.userPlaneDataInterface().vlanId()); + Assertions.assertEquals("ufpo", model.userPlaneDataInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("izhwlrxy", model.userPlaneDataInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("soqijg", model.dnsAddresses().get(0)); + Assertions.assertEquals(NaptEnabled.DISABLED, model.naptConfiguration().enabled()); + Assertions.assertEquals(1110459096, model.naptConfiguration().portRange().minPort()); + Assertions.assertEquals(1499509907, model.naptConfiguration().portRange().maxPort()); + Assertions.assertEquals(1049703732, model.naptConfiguration().portReuseHoldTime().tcp()); + Assertions.assertEquals(1127644012, model.naptConfiguration().portReuseHoldTime().udp()); + Assertions.assertEquals(342241824, model.naptConfiguration().pinholeLimits()); + Assertions.assertEquals(744579051, model.naptConfiguration().pinholeTimeouts().tcp()); + Assertions.assertEquals(1080301009, model.naptConfiguration().pinholeTimeouts().udp()); + Assertions.assertEquals(673031799, model.naptConfiguration().pinholeTimeouts().icmp()); + Assertions.assertEquals("saagdf", model.userEquipmentAddressPoolPrefix().get(0)); + Assertions.assertEquals("izntocipao", model.userEquipmentStaticAddressPoolPrefix().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkListResultTests.java new file mode 100644 index 000000000000..a087b624d9f0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkListResultTests.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkListResult; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.NaptEnabled; +import com.azure.resourcemanager.mobilenetwork.models.PinholeTimeouts; +import com.azure.resourcemanager.mobilenetwork.models.PortRange; +import com.azure.resourcemanager.mobilenetwork.models.PortReuseHoldTimes; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class AttachedDataNetworkListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AttachedDataNetworkListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"userPlaneDataInterface\":{\"name\":\"akhmsbzjhcrz\",\"ipv4Address\":\"dphlxaolt\",\"ipv4Subnet\":\"trg\",\"ipv4Gateway\":\"bpf\",\"vlanId\":257181558,\"ipv4AddressList\":[\"zgvfcjrwz\"],\"bfdIpv4Endpoints\":[\"j\",\"felluwfzitonpe\",\"fpjkjlxofp\",\"vhpfxxypininmay\"]},\"dnsAddresses\":[\"ybb\",\"podepoo\",\"inuvamiheogn\"],\"naptConfiguration\":{\"enabled\":\"Disabled\",\"portRange\":{\"minPort\":1879444150,\"maxPort\":222575453},\"portReuseHoldTime\":{\"tcp\":372211152,\"udp\":116358937},\"pinholeLimits\":1045081516,\"pinholeTimeouts\":{\"tcp\":401724837,\"udp\":308422624,\"icmp\":284710625}},\"userEquipmentAddressPoolPrefix\":[\"un\",\"bwjzr\",\"fygxgispemvtzfk\"],\"userEquipmentStaticAddressPoolPrefix\":[\"bljofxqeof\",\"aeqjhqjbasvms\",\"jqul\"]},\"location\":\"sntnbybkzgcw\",\"tags\":{\"vkocrcjdkwtn\":\"lxxwrljdouskc\",\"gls\":\"xbnjbiksq\",\"pee\":\"ainqpjwnzlljfm\"},\"id\":\"vmgxsab\",\"name\":\"yqduujit\",\"type\":\"jczdzevndh\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"userPlaneDataInterface\":{\"name\":\"d\",\"ipv4Address\":\"p\",\"ipv4Subnet\":\"bdkvwrwjf\",\"ipv4Gateway\":\"snhu\",\"vlanId\":1936335434,\"ipv4AddressList\":[\"mrldhu\",\"jzzd\",\"tqxhocdgeab\",\"gphuticndvka\"],\"bfdIpv4Endpoints\":[\"yiftyhxhuro\",\"ftyxolniw\",\"wcukjfkgiawxk\"]},\"dnsAddresses\":[\"ypl\",\"ckbasyypndd\",\"sgcbac\",\"hejkotynqgou\"],\"naptConfiguration\":{\"enabled\":\"Disabled\",\"portRange\":{\"minPort\":708367520,\"maxPort\":1462222832},\"portReuseHoldTime\":{\"tcp\":1581994668,\"udp\":1308251370},\"pinholeLimits\":1800206320,\"pinholeTimeouts\":{\"tcp\":863181749,\"udp\":1288567604,\"icmp\":1720928556}},\"userEquipmentAddressPoolPrefix\":[\"rxybz\"],\"userEquipmentStaticAddressPoolPrefix\":[\"dqytbciqfouflmm\"]},\"location\":\"zsm\",\"tags\":{\"tmut\":\"glougpbk\",\"pwgcuertu\":\"uqktap\",\"bmdg\":\"kdosvqw\"},\"id\":\"bjf\",\"name\":\"dgmb\",\"type\":\"bexppb\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"userPlaneDataInterface\":{\"name\":\"rolfpfp\",\"ipv4Address\":\"lgbquxig\",\"ipv4Subnet\":\"jgzjaoyfhrtx\",\"ipv4Gateway\":\"n\",\"vlanId\":1275359394,\"ipv4AddressList\":[\"ysvlejuvf\",\"awrlyx\"],\"bfdIpv4Endpoints\":[\"cpr\",\"nwbxgjvtbvpyssz\"]},\"dnsAddresses\":[\"rujqg\"],\"naptConfiguration\":{\"enabled\":\"Enabled\",\"portRange\":{\"minPort\":84876236,\"maxPort\":1747028439},\"portReuseHoldTime\":{\"tcp\":313553857,\"udp\":1207198504},\"pinholeLimits\":9622678,\"pinholeTimeouts\":{\"tcp\":1052592180,\"udp\":443488526,\"icmp\":1661646001}},\"userEquipmentAddressPoolPrefix\":[\"a\",\"x\"],\"userEquipmentStaticAddressPoolPrefix\":[\"zuckyfi\",\"rfidfvzwdz\",\"htymw\",\"sdkf\"]},\"location\":\"wxmnteiwao\",\"tags\":{\"pymzidnsezcxtbzs\":\"mijcmmxdcufufs\"},\"id\":\"fycc\",\"name\":\"newmdwzjeiachbo\",\"type\":\"sflnrosfqp\"},{\"properties\":{\"provisioningState\":\"Unknown\",\"userPlaneDataInterface\":{\"name\":\"zzvypyqrimzinp\",\"ipv4Address\":\"wjdk\",\"ipv4Subnet\":\"soodqxhcrmnoh\",\"ipv4Gateway\":\"ckwhds\",\"vlanId\":1580515344,\"ipv4AddressList\":[\"i\"],\"bfdIpv4Endpoints\":[\"sqwpgrjb\",\"norcjxvsnbyxqab\",\"mocpc\",\"shurzafbljjgpbto\"]},\"dnsAddresses\":[\"jmkljavbqidtqajz\"],\"naptConfiguration\":{\"enabled\":\"Enabled\",\"portRange\":{\"minPort\":377543492,\"maxPort\":963090330},\"portReuseHoldTime\":{\"tcp\":623997191,\"udp\":1234306466},\"pinholeLimits\":375716095,\"pinholeTimeouts\":{\"tcp\":1118603156,\"udp\":1382743089,\"icmp\":701234104}},\"userEquipmentAddressPoolPrefix\":[\"zloc\",\"scpai\",\"rhhbcs\"],\"userEquipmentStaticAddressPoolPrefix\":[\"mmajtjaodx\",\"bnbdxkqpxokajion\",\"imexgstxgcpodgma\"]},\"location\":\"r\",\"tags\":{\"vmclw\":\"jwzrl\",\"aqsqsycbkbfk\":\"ijcoejctb\"},\"id\":\"ukdkexxppofmxa\",\"name\":\"c\",\"type\":\"jpgd\"}],\"nextLink\":\"ocjjxhvpmouexh\"}") + .toObject(AttachedDataNetworkListResult.class); + Assertions.assertEquals("sntnbybkzgcw", model.value().get(0).location()); + Assertions.assertEquals("lxxwrljdouskc", model.value().get(0).tags().get("vkocrcjdkwtn")); + Assertions.assertEquals("akhmsbzjhcrz", model.value().get(0).userPlaneDataInterface().name()); + Assertions.assertEquals("dphlxaolt", model.value().get(0).userPlaneDataInterface().ipv4Address()); + Assertions.assertEquals("trg", model.value().get(0).userPlaneDataInterface().ipv4Subnet()); + Assertions.assertEquals("bpf", model.value().get(0).userPlaneDataInterface().ipv4Gateway()); + Assertions.assertEquals(257181558, model.value().get(0).userPlaneDataInterface().vlanId()); + Assertions.assertEquals("zgvfcjrwz", model.value().get(0).userPlaneDataInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("j", model.value().get(0).userPlaneDataInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("ybb", model.value().get(0).dnsAddresses().get(0)); + Assertions.assertEquals(NaptEnabled.DISABLED, model.value().get(0).naptConfiguration().enabled()); + Assertions.assertEquals(1879444150, model.value().get(0).naptConfiguration().portRange().minPort()); + Assertions.assertEquals(222575453, model.value().get(0).naptConfiguration().portRange().maxPort()); + Assertions.assertEquals(372211152, model.value().get(0).naptConfiguration().portReuseHoldTime().tcp()); + Assertions.assertEquals(116358937, model.value().get(0).naptConfiguration().portReuseHoldTime().udp()); + Assertions.assertEquals(1045081516, model.value().get(0).naptConfiguration().pinholeLimits()); + Assertions.assertEquals(401724837, model.value().get(0).naptConfiguration().pinholeTimeouts().tcp()); + Assertions.assertEquals(308422624, model.value().get(0).naptConfiguration().pinholeTimeouts().udp()); + Assertions.assertEquals(284710625, model.value().get(0).naptConfiguration().pinholeTimeouts().icmp()); + Assertions.assertEquals("un", model.value().get(0).userEquipmentAddressPoolPrefix().get(0)); + Assertions.assertEquals("bljofxqeof", model.value().get(0).userEquipmentStaticAddressPoolPrefix().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AttachedDataNetworkListResult model = new AttachedDataNetworkListResult().withValue(Arrays.asList( + new AttachedDataNetworkInner().withLocation("sntnbybkzgcw") + .withTags(mapOf("vkocrcjdkwtn", "lxxwrljdouskc", "gls", "xbnjbiksq", "pee", "ainqpjwnzlljfm")) + .withUserPlaneDataInterface(new InterfaceProperties().withName("akhmsbzjhcrz") + .withIpv4Address("dphlxaolt") + .withIpv4Subnet("trg") + .withIpv4Gateway("bpf") + .withVlanId(257181558) + .withIpv4AddressList(Arrays.asList("zgvfcjrwz")) + .withBfdIpv4Endpoints(Arrays.asList("j", "felluwfzitonpe", "fpjkjlxofp", "vhpfxxypininmay"))) + .withDnsAddresses(Arrays.asList("ybb", "podepoo", "inuvamiheogn")) + .withNaptConfiguration(new NaptConfiguration().withEnabled(NaptEnabled.DISABLED) + .withPortRange(new PortRange().withMinPort(1879444150).withMaxPort(222575453)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(372211152).withUdp(116358937)) + .withPinholeLimits(1045081516) + .withPinholeTimeouts( + new PinholeTimeouts().withTcp(401724837).withUdp(308422624).withIcmp(284710625))) + .withUserEquipmentAddressPoolPrefix(Arrays.asList("un", "bwjzr", "fygxgispemvtzfk")) + .withUserEquipmentStaticAddressPoolPrefix(Arrays.asList("bljofxqeof", "aeqjhqjbasvms", "jqul")), + new AttachedDataNetworkInner().withLocation("zsm") + .withTags(mapOf("tmut", "glougpbk", "pwgcuertu", "uqktap", "bmdg", "kdosvqw")) + .withUserPlaneDataInterface(new InterfaceProperties().withName("d") + .withIpv4Address("p") + .withIpv4Subnet("bdkvwrwjf") + .withIpv4Gateway("snhu") + .withVlanId(1936335434) + .withIpv4AddressList(Arrays.asList("mrldhu", "jzzd", "tqxhocdgeab", "gphuticndvka")) + .withBfdIpv4Endpoints(Arrays.asList("yiftyhxhuro", "ftyxolniw", "wcukjfkgiawxk"))) + .withDnsAddresses(Arrays.asList("ypl", "ckbasyypndd", "sgcbac", "hejkotynqgou")) + .withNaptConfiguration(new NaptConfiguration().withEnabled(NaptEnabled.DISABLED) + .withPortRange(new PortRange().withMinPort(708367520).withMaxPort(1462222832)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(1581994668).withUdp(1308251370)) + .withPinholeLimits(1800206320) + .withPinholeTimeouts( + new PinholeTimeouts().withTcp(863181749).withUdp(1288567604).withIcmp(1720928556))) + .withUserEquipmentAddressPoolPrefix(Arrays.asList("rxybz")) + .withUserEquipmentStaticAddressPoolPrefix(Arrays.asList("dqytbciqfouflmm")), + new AttachedDataNetworkInner().withLocation("wxmnteiwao") + .withTags(mapOf("pymzidnsezcxtbzs", "mijcmmxdcufufs")) + .withUserPlaneDataInterface(new InterfaceProperties().withName("rolfpfp") + .withIpv4Address("lgbquxig") + .withIpv4Subnet("jgzjaoyfhrtx") + .withIpv4Gateway("n") + .withVlanId(1275359394) + .withIpv4AddressList(Arrays.asList("ysvlejuvf", "awrlyx")) + .withBfdIpv4Endpoints(Arrays.asList("cpr", "nwbxgjvtbvpyssz"))) + .withDnsAddresses(Arrays.asList("rujqg")) + .withNaptConfiguration(new NaptConfiguration().withEnabled(NaptEnabled.ENABLED) + .withPortRange(new PortRange().withMinPort(84876236).withMaxPort(1747028439)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(313553857).withUdp(1207198504)) + .withPinholeLimits(9622678) + .withPinholeTimeouts( + new PinholeTimeouts().withTcp(1052592180).withUdp(443488526).withIcmp(1661646001))) + .withUserEquipmentAddressPoolPrefix(Arrays.asList("a", "x")) + .withUserEquipmentStaticAddressPoolPrefix(Arrays.asList("zuckyfi", "rfidfvzwdz", "htymw", "sdkf")), + new AttachedDataNetworkInner().withLocation("r") + .withTags(mapOf("vmclw", "jwzrl", "aqsqsycbkbfk", "ijcoejctb")) + .withUserPlaneDataInterface(new InterfaceProperties().withName("zzvypyqrimzinp") + .withIpv4Address("wjdk") + .withIpv4Subnet("soodqxhcrmnoh") + .withIpv4Gateway("ckwhds") + .withVlanId(1580515344) + .withIpv4AddressList(Arrays.asList("i")) + .withBfdIpv4Endpoints(Arrays.asList("sqwpgrjb", "norcjxvsnbyxqab", "mocpc", "shurzafbljjgpbto"))) + .withDnsAddresses(Arrays.asList("jmkljavbqidtqajz")) + .withNaptConfiguration(new NaptConfiguration().withEnabled(NaptEnabled.ENABLED) + .withPortRange(new PortRange().withMinPort(377543492).withMaxPort(963090330)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(623997191).withUdp(1234306466)) + .withPinholeLimits(375716095) + .withPinholeTimeouts( + new PinholeTimeouts().withTcp(1118603156).withUdp(1382743089).withIcmp(701234104))) + .withUserEquipmentAddressPoolPrefix(Arrays.asList("zloc", "scpai", "rhhbcs")) + .withUserEquipmentStaticAddressPoolPrefix( + Arrays.asList("mmajtjaodx", "bnbdxkqpxokajion", "imexgstxgcpodgma")))); + model = BinaryData.fromObject(model).toObject(AttachedDataNetworkListResult.class); + Assertions.assertEquals("sntnbybkzgcw", model.value().get(0).location()); + Assertions.assertEquals("lxxwrljdouskc", model.value().get(0).tags().get("vkocrcjdkwtn")); + Assertions.assertEquals("akhmsbzjhcrz", model.value().get(0).userPlaneDataInterface().name()); + Assertions.assertEquals("dphlxaolt", model.value().get(0).userPlaneDataInterface().ipv4Address()); + Assertions.assertEquals("trg", model.value().get(0).userPlaneDataInterface().ipv4Subnet()); + Assertions.assertEquals("bpf", model.value().get(0).userPlaneDataInterface().ipv4Gateway()); + Assertions.assertEquals(257181558, model.value().get(0).userPlaneDataInterface().vlanId()); + Assertions.assertEquals("zgvfcjrwz", model.value().get(0).userPlaneDataInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("j", model.value().get(0).userPlaneDataInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("ybb", model.value().get(0).dnsAddresses().get(0)); + Assertions.assertEquals(NaptEnabled.DISABLED, model.value().get(0).naptConfiguration().enabled()); + Assertions.assertEquals(1879444150, model.value().get(0).naptConfiguration().portRange().minPort()); + Assertions.assertEquals(222575453, model.value().get(0).naptConfiguration().portRange().maxPort()); + Assertions.assertEquals(372211152, model.value().get(0).naptConfiguration().portReuseHoldTime().tcp()); + Assertions.assertEquals(116358937, model.value().get(0).naptConfiguration().portReuseHoldTime().udp()); + Assertions.assertEquals(1045081516, model.value().get(0).naptConfiguration().pinholeLimits()); + Assertions.assertEquals(401724837, model.value().get(0).naptConfiguration().pinholeTimeouts().tcp()); + Assertions.assertEquals(308422624, model.value().get(0).naptConfiguration().pinholeTimeouts().udp()); + Assertions.assertEquals(284710625, model.value().get(0).naptConfiguration().pinholeTimeouts().icmp()); + Assertions.assertEquals("un", model.value().get(0).userEquipmentAddressPoolPrefix().get(0)); + Assertions.assertEquals("bljofxqeof", model.value().get(0).userEquipmentStaticAddressPoolPrefix().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkPropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkPropertiesFormatTests.java new file mode 100644 index 000000000000..efc4915f3717 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkPropertiesFormatTests.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AttachedDataNetworkPropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.NaptEnabled; +import com.azure.resourcemanager.mobilenetwork.models.PinholeTimeouts; +import com.azure.resourcemanager.mobilenetwork.models.PortRange; +import com.azure.resourcemanager.mobilenetwork.models.PortReuseHoldTimes; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AttachedDataNetworkPropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AttachedDataNetworkPropertiesFormat model = BinaryData.fromString( + "{\"provisioningState\":\"Deleting\",\"userPlaneDataInterface\":{\"name\":\"qhsmyurkdtml\",\"ipv4Address\":\"ekuksjtx\",\"ipv4Subnet\":\"cdm\",\"ipv4Gateway\":\"rcryuanzwuxzdxta\",\"vlanId\":1199777759,\"ipv4AddressList\":[\"whfpmrqobmtu\"],\"bfdIpv4Endpoints\":[\"ryrtihfxtijbpzv\",\"nwzsymg\"]},\"dnsAddresses\":[\"uf\",\"yzkohdbihanuf\",\"fcbjysagithxqha\"],\"naptConfiguration\":{\"enabled\":\"Disabled\",\"portRange\":{\"minPort\":352895136,\"maxPort\":1464856632},\"portReuseHoldTime\":{\"tcp\":1903365311,\"udp\":2005556864},\"pinholeLimits\":808729246,\"pinholeTimeouts\":{\"tcp\":219984358,\"udp\":1646115006,\"icmp\":222313615}},\"userEquipmentAddressPoolPrefix\":[\"iwbybrkxvdumjg\"],\"userEquipmentStaticAddressPoolPrefix\":[\"wvukx\",\"audccsnhs\"]}") + .toObject(AttachedDataNetworkPropertiesFormat.class); + Assertions.assertEquals("qhsmyurkdtml", model.userPlaneDataInterface().name()); + Assertions.assertEquals("ekuksjtx", model.userPlaneDataInterface().ipv4Address()); + Assertions.assertEquals("cdm", model.userPlaneDataInterface().ipv4Subnet()); + Assertions.assertEquals("rcryuanzwuxzdxta", model.userPlaneDataInterface().ipv4Gateway()); + Assertions.assertEquals(1199777759, model.userPlaneDataInterface().vlanId()); + Assertions.assertEquals("whfpmrqobmtu", model.userPlaneDataInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("ryrtihfxtijbpzv", model.userPlaneDataInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("uf", model.dnsAddresses().get(0)); + Assertions.assertEquals(NaptEnabled.DISABLED, model.naptConfiguration().enabled()); + Assertions.assertEquals(352895136, model.naptConfiguration().portRange().minPort()); + Assertions.assertEquals(1464856632, model.naptConfiguration().portRange().maxPort()); + Assertions.assertEquals(1903365311, model.naptConfiguration().portReuseHoldTime().tcp()); + Assertions.assertEquals(2005556864, model.naptConfiguration().portReuseHoldTime().udp()); + Assertions.assertEquals(808729246, model.naptConfiguration().pinholeLimits()); + Assertions.assertEquals(219984358, model.naptConfiguration().pinholeTimeouts().tcp()); + Assertions.assertEquals(1646115006, model.naptConfiguration().pinholeTimeouts().udp()); + Assertions.assertEquals(222313615, model.naptConfiguration().pinholeTimeouts().icmp()); + Assertions.assertEquals("iwbybrkxvdumjg", model.userEquipmentAddressPoolPrefix().get(0)); + Assertions.assertEquals("wvukx", model.userEquipmentStaticAddressPoolPrefix().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AttachedDataNetworkPropertiesFormat model = new AttachedDataNetworkPropertiesFormat() + .withUserPlaneDataInterface(new InterfaceProperties().withName("qhsmyurkdtml") + .withIpv4Address("ekuksjtx") + .withIpv4Subnet("cdm") + .withIpv4Gateway("rcryuanzwuxzdxta") + .withVlanId(1199777759) + .withIpv4AddressList(Arrays.asList("whfpmrqobmtu")) + .withBfdIpv4Endpoints(Arrays.asList("ryrtihfxtijbpzv", "nwzsymg"))) + .withDnsAddresses(Arrays.asList("uf", "yzkohdbihanuf", "fcbjysagithxqha")) + .withNaptConfiguration(new NaptConfiguration().withEnabled(NaptEnabled.DISABLED) + .withPortRange(new PortRange().withMinPort(352895136).withMaxPort(1464856632)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(1903365311).withUdp(2005556864)) + .withPinholeLimits(808729246) + .withPinholeTimeouts(new PinholeTimeouts().withTcp(219984358).withUdp(1646115006).withIcmp(222313615))) + .withUserEquipmentAddressPoolPrefix(Arrays.asList("iwbybrkxvdumjg")) + .withUserEquipmentStaticAddressPoolPrefix(Arrays.asList("wvukx", "audccsnhs")); + model = BinaryData.fromObject(model).toObject(AttachedDataNetworkPropertiesFormat.class); + Assertions.assertEquals("qhsmyurkdtml", model.userPlaneDataInterface().name()); + Assertions.assertEquals("ekuksjtx", model.userPlaneDataInterface().ipv4Address()); + Assertions.assertEquals("cdm", model.userPlaneDataInterface().ipv4Subnet()); + Assertions.assertEquals("rcryuanzwuxzdxta", model.userPlaneDataInterface().ipv4Gateway()); + Assertions.assertEquals(1199777759, model.userPlaneDataInterface().vlanId()); + Assertions.assertEquals("whfpmrqobmtu", model.userPlaneDataInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("ryrtihfxtijbpzv", model.userPlaneDataInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("uf", model.dnsAddresses().get(0)); + Assertions.assertEquals(NaptEnabled.DISABLED, model.naptConfiguration().enabled()); + Assertions.assertEquals(352895136, model.naptConfiguration().portRange().minPort()); + Assertions.assertEquals(1464856632, model.naptConfiguration().portRange().maxPort()); + Assertions.assertEquals(1903365311, model.naptConfiguration().portReuseHoldTime().tcp()); + Assertions.assertEquals(2005556864, model.naptConfiguration().portReuseHoldTime().udp()); + Assertions.assertEquals(808729246, model.naptConfiguration().pinholeLimits()); + Assertions.assertEquals(219984358, model.naptConfiguration().pinholeTimeouts().tcp()); + Assertions.assertEquals(1646115006, model.naptConfiguration().pinholeTimeouts().udp()); + Assertions.assertEquals(222313615, model.naptConfiguration().pinholeTimeouts().icmp()); + Assertions.assertEquals("iwbybrkxvdumjg", model.userEquipmentAddressPoolPrefix().get(0)); + Assertions.assertEquals("wvukx", model.userEquipmentStaticAddressPoolPrefix().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkResourceIdTests.java new file mode 100644 index 000000000000..08d392c551d4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworkResourceIdTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import org.junit.jupiter.api.Assertions; + +public final class AttachedDataNetworkResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AttachedDataNetworkResourceId model + = BinaryData.fromString("{\"id\":\"gx\"}").toObject(AttachedDataNetworkResourceId.class); + Assertions.assertEquals("gx", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AttachedDataNetworkResourceId model = new AttachedDataNetworkResourceId().withId("gx"); + model = BinaryData.fromObject(model).toObject(AttachedDataNetworkResourceId.class); + Assertions.assertEquals("gx", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..86038874243f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateMockTests.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetwork; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.NaptEnabled; +import com.azure.resourcemanager.mobilenetwork.models.PinholeTimeouts; +import com.azure.resourcemanager.mobilenetwork.models.PortRange; +import com.azure.resourcemanager.mobilenetwork.models.PortReuseHoldTimes; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class AttachedDataNetworksCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"userPlaneDataInterface\":{\"name\":\"rrmhwrbfdp\",\"ipv4Address\":\"lubhvjg\",\"ipv4Subnet\":\"ocu\",\"ipv4Gateway\":\"lw\",\"vlanId\":1284227714,\"ipv4AddressList\":[\"hoocl\",\"tnpqmemczjk\"],\"bfdIpv4Endpoints\":[\"kyujxsglhsrrr\",\"ejylmbkzu\"]},\"dnsAddresses\":[\"igrfihotjewl\",\"xuzzjgnrefq\",\"hqo\",\"oihiqak\"],\"naptConfiguration\":{\"enabled\":\"Enabled\",\"portRange\":{\"minPort\":1733569114,\"maxPort\":995984285},\"portReuseHoldTime\":{\"tcp\":1946832159,\"udp\":1162444848},\"pinholeLimits\":1216566407,\"pinholeTimeouts\":{\"tcp\":1331180848,\"udp\":1755725688,\"icmp\":1827970432}},\"userEquipmentAddressPoolPrefix\":[\"sipi\"],\"userEquipmentStaticAddressPoolPrefix\":[\"bebjfu\",\"bmoichd\"]},\"location\":\"nfpubntnbatz\",\"tags\":{\"attcju\":\"sowsaael\"},\"id\":\"plrvkmjcwmjvlg\",\"name\":\"ggcvk\",\"type\":\"y\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + AttachedDataNetwork response = manager.attachedDataNetworks() + .define("oshbragapyy") + .withRegion("wefohecbvo") + .withExistingPacketCoreDataPlane("rrvwey", "xoy", "ukphaimmoiroq") + .withUserPlaneDataInterface(new InterfaceProperties().withName("vbpavbopfppdbw") + .withIpv4Address("pgahxkumas") + .withIpv4Subnet("aacfdmmc") + .withIpv4Gateway("g") + .withVlanId(1836074224) + .withIpv4AddressList(Arrays.asList("pvufhbze", "ewhoqh", "lbqnbldxeacl")) + .withBfdIpv4Endpoints(Arrays.asList("horimkr", "r", "moucsofldpuviyfc"))) + .withDnsAddresses(Arrays.asList("beolh", "hlvbmxu", "ibsxtkcud")) + .withTags(mapOf("leallklm", "dy", "rdfjmzsyzfhotl", "khlowkxxpv")) + .withNaptConfiguration(new NaptConfiguration().withEnabled(NaptEnabled.ENABLED) + .withPortRange(new PortRange().withMinPort(312817267).withMaxPort(1013426268)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(698476500).withUdp(1137080537)) + .withPinholeLimits(1889972002) + .withPinholeTimeouts(new PinholeTimeouts().withTcp(979302562).withUdp(477093284).withIcmp(782226782))) + .withUserEquipmentAddressPoolPrefix(Arrays.asList("hqykizmdk", "aoaf", "luqvoxmycjimryv")) + .withUserEquipmentStaticAddressPoolPrefix(Arrays.asList("wwpbmzgwesyd")) + .create(); + + Assertions.assertEquals("nfpubntnbatz", response.location()); + Assertions.assertEquals("sowsaael", response.tags().get("attcju")); + Assertions.assertEquals("rrmhwrbfdp", response.userPlaneDataInterface().name()); + Assertions.assertEquals("lubhvjg", response.userPlaneDataInterface().ipv4Address()); + Assertions.assertEquals("ocu", response.userPlaneDataInterface().ipv4Subnet()); + Assertions.assertEquals("lw", response.userPlaneDataInterface().ipv4Gateway()); + Assertions.assertEquals(1284227714, response.userPlaneDataInterface().vlanId()); + Assertions.assertEquals("hoocl", response.userPlaneDataInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("kyujxsglhsrrr", response.userPlaneDataInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("igrfihotjewl", response.dnsAddresses().get(0)); + Assertions.assertEquals(NaptEnabled.ENABLED, response.naptConfiguration().enabled()); + Assertions.assertEquals(1733569114, response.naptConfiguration().portRange().minPort()); + Assertions.assertEquals(995984285, response.naptConfiguration().portRange().maxPort()); + Assertions.assertEquals(1946832159, response.naptConfiguration().portReuseHoldTime().tcp()); + Assertions.assertEquals(1162444848, response.naptConfiguration().portReuseHoldTime().udp()); + Assertions.assertEquals(1216566407, response.naptConfiguration().pinholeLimits()); + Assertions.assertEquals(1331180848, response.naptConfiguration().pinholeTimeouts().tcp()); + Assertions.assertEquals(1755725688, response.naptConfiguration().pinholeTimeouts().udp()); + Assertions.assertEquals(1827970432, response.naptConfiguration().pinholeTimeouts().icmp()); + Assertions.assertEquals("sipi", response.userEquipmentAddressPoolPrefix().get(0)); + Assertions.assertEquals("bebjfu", response.userEquipmentStaticAddressPoolPrefix().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteMockTests.java new file mode 100644 index 000000000000..dfb80e707837 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class AttachedDataNetworksDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.attachedDataNetworks().delete("m", "toebnf", "o", "vcjkgd", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetWithResponseMockTests.java new file mode 100644 index 000000000000..33e5d4682ed0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetWithResponseMockTests.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetwork; +import com.azure.resourcemanager.mobilenetwork.models.NaptEnabled; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class AttachedDataNetworksGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Accepted\",\"userPlaneDataInterface\":{\"name\":\"tuwkffdj\",\"ipv4Address\":\"sysidfvclglxnf\",\"ipv4Subnet\":\"jtkbusqogsfika\",\"ipv4Gateway\":\"ansharujtjiqxfz\",\"vlanId\":846546082,\"ipv4AddressList\":[\"vwkpqh\",\"penuy\",\"bqeqqekewvnqvcd\"],\"bfdIpv4Endpoints\":[\"a\",\"cmfdjwnlax\"]},\"dnsAddresses\":[\"njqikcz\"],\"naptConfiguration\":{\"enabled\":\"Enabled\",\"portRange\":{\"minPort\":422155037,\"maxPort\":1938868822},\"portReuseHoldTime\":{\"tcp\":1614916869,\"udp\":394245524},\"pinholeLimits\":196661330,\"pinholeTimeouts\":{\"tcp\":283921806,\"udp\":1164479404,\"icmp\":47746370}},\"userEquipmentAddressPoolPrefix\":[\"ntsj\",\"qrsxyp\",\"uuuybnchrsziz\"],\"userEquipmentStaticAddressPoolPrefix\":[\"elyetndnbf\",\"yggagflnlgmt\",\"wahzjmucftbyr\"]},\"location\":\"rohkpigqfusu\",\"tags\":{\"noxaxmqeqal\":\"mkwkl\"},\"id\":\"hjnhgwydyynfsvk\",\"name\":\"gbv\",\"type\":\"ta\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + AttachedDataNetwork response = manager.attachedDataNetworks() + .getWithResponse("razftxejwabmdujt", "vcopex", "m", "urbuhhlkyqltq", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("rohkpigqfusu", response.location()); + Assertions.assertEquals("mkwkl", response.tags().get("noxaxmqeqal")); + Assertions.assertEquals("tuwkffdj", response.userPlaneDataInterface().name()); + Assertions.assertEquals("sysidfvclglxnf", response.userPlaneDataInterface().ipv4Address()); + Assertions.assertEquals("jtkbusqogsfika", response.userPlaneDataInterface().ipv4Subnet()); + Assertions.assertEquals("ansharujtjiqxfz", response.userPlaneDataInterface().ipv4Gateway()); + Assertions.assertEquals(846546082, response.userPlaneDataInterface().vlanId()); + Assertions.assertEquals("vwkpqh", response.userPlaneDataInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("a", response.userPlaneDataInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("njqikcz", response.dnsAddresses().get(0)); + Assertions.assertEquals(NaptEnabled.ENABLED, response.naptConfiguration().enabled()); + Assertions.assertEquals(422155037, response.naptConfiguration().portRange().minPort()); + Assertions.assertEquals(1938868822, response.naptConfiguration().portRange().maxPort()); + Assertions.assertEquals(1614916869, response.naptConfiguration().portReuseHoldTime().tcp()); + Assertions.assertEquals(394245524, response.naptConfiguration().portReuseHoldTime().udp()); + Assertions.assertEquals(196661330, response.naptConfiguration().pinholeLimits()); + Assertions.assertEquals(283921806, response.naptConfiguration().pinholeTimeouts().tcp()); + Assertions.assertEquals(1164479404, response.naptConfiguration().pinholeTimeouts().udp()); + Assertions.assertEquals(47746370, response.naptConfiguration().pinholeTimeouts().icmp()); + Assertions.assertEquals("ntsj", response.userEquipmentAddressPoolPrefix().get(0)); + Assertions.assertEquals("elyetndnbf", response.userEquipmentStaticAddressPoolPrefix().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneMockTests.java new file mode 100644 index 000000000000..0039b709045a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetwork; +import com.azure.resourcemanager.mobilenetwork.models.NaptEnabled; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class AttachedDataNetworksListByPacketCoreDataPlaneMockTests { + @Test + public void testListByPacketCoreDataPlane() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"userPlaneDataInterface\":{\"name\":\"bhfhpfpazjzoy\",\"ipv4Address\":\"xhpdulontacnpqwt\",\"ipv4Subnet\":\"tuevrh\",\"ipv4Gateway\":\"jyoogwxh\",\"vlanId\":32518056,\"ipv4AddressList\":[\"gwbsreurf\",\"kfuarenlv\",\"htkln\",\"nafvvkyfedev\"],\"bfdIpv4Endpoints\":[\"slcqxypokkh\"]},\"dnsAddresses\":[\"nqcymczngnbdxxew\",\"ninvudbchaqdt\",\"qecrqctmxx\",\"tddmf\"],\"naptConfiguration\":{\"enabled\":\"Disabled\",\"portRange\":{\"minPort\":297911426,\"maxPort\":1148214254},\"portReuseHoldTime\":{\"tcp\":1703929659,\"udp\":633120546},\"pinholeLimits\":1479756022,\"pinholeTimeouts\":{\"tcp\":117712322,\"udp\":166496686,\"icmp\":469198005}},\"userEquipmentAddressPoolPrefix\":[\"ytprwnwvroev\",\"tlyo\",\"rrrouuxvnsa\",\"bcrymodizrx\"],\"userEquipmentStaticAddressPoolPrefix\":[\"bdxnaz\",\"mkmlmvevfx\",\"op\",\"hbzxli\"]},\"location\":\"rdddtfgxqbawpcb\",\"tags\":{\"napqo\":\"qcy\",\"wwgbdv\":\"yuicdhzbdy\"},\"id\":\"bid\",\"name\":\"hmwffplfmuv\",\"type\":\"pckc\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.attachedDataNetworks() + .listByPacketCoreDataPlane("arfdlpukhpyrnei", "jcpeogkhnmg", "ro", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("rdddtfgxqbawpcb", response.iterator().next().location()); + Assertions.assertEquals("qcy", response.iterator().next().tags().get("napqo")); + Assertions.assertEquals("bhfhpfpazjzoy", response.iterator().next().userPlaneDataInterface().name()); + Assertions.assertEquals("xhpdulontacnpqwt", response.iterator().next().userPlaneDataInterface().ipv4Address()); + Assertions.assertEquals("tuevrh", response.iterator().next().userPlaneDataInterface().ipv4Subnet()); + Assertions.assertEquals("jyoogwxh", response.iterator().next().userPlaneDataInterface().ipv4Gateway()); + Assertions.assertEquals(32518056, response.iterator().next().userPlaneDataInterface().vlanId()); + Assertions.assertEquals("gwbsreurf", + response.iterator().next().userPlaneDataInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("slcqxypokkh", + response.iterator().next().userPlaneDataInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("nqcymczngnbdxxew", response.iterator().next().dnsAddresses().get(0)); + Assertions.assertEquals(NaptEnabled.DISABLED, response.iterator().next().naptConfiguration().enabled()); + Assertions.assertEquals(297911426, response.iterator().next().naptConfiguration().portRange().minPort()); + Assertions.assertEquals(1148214254, response.iterator().next().naptConfiguration().portRange().maxPort()); + Assertions.assertEquals(1703929659, response.iterator().next().naptConfiguration().portReuseHoldTime().tcp()); + Assertions.assertEquals(633120546, response.iterator().next().naptConfiguration().portReuseHoldTime().udp()); + Assertions.assertEquals(1479756022, response.iterator().next().naptConfiguration().pinholeLimits()); + Assertions.assertEquals(117712322, response.iterator().next().naptConfiguration().pinholeTimeouts().tcp()); + Assertions.assertEquals(166496686, response.iterator().next().naptConfiguration().pinholeTimeouts().udp()); + Assertions.assertEquals(469198005, response.iterator().next().naptConfiguration().pinholeTimeouts().icmp()); + Assertions.assertEquals("ytprwnwvroev", response.iterator().next().userEquipmentAddressPoolPrefix().get(0)); + Assertions.assertEquals("bdxnaz", response.iterator().next().userEquipmentStaticAddressPoolPrefix().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AzureStackEdgeDeviceResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AzureStackEdgeDeviceResourceIdTests.java new file mode 100644 index 000000000000..44e9b4e5ecad --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AzureStackEdgeDeviceResourceIdTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AzureStackEdgeDeviceResourceId; +import org.junit.jupiter.api.Assertions; + +public final class AzureStackEdgeDeviceResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AzureStackEdgeDeviceResourceId model + = BinaryData.fromString("{\"id\":\"urqhaka\"}").toObject(AzureStackEdgeDeviceResourceId.class); + Assertions.assertEquals("urqhaka", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AzureStackEdgeDeviceResourceId model = new AzureStackEdgeDeviceResourceId().withId("urqhaka"); + model = BinaryData.fromObject(model).toObject(AzureStackEdgeDeviceResourceId.class); + Assertions.assertEquals("urqhaka", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AzureStackHciClusterResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AzureStackHciClusterResourceIdTests.java new file mode 100644 index 000000000000..fa46fda5c03f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/AzureStackHciClusterResourceIdTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AzureStackHciClusterResourceId; +import org.junit.jupiter.api.Assertions; + +public final class AzureStackHciClusterResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AzureStackHciClusterResourceId model + = BinaryData.fromString("{\"id\":\"hashsfwxosow\"}").toObject(AzureStackHciClusterResourceId.class); + Assertions.assertEquals("hashsfwxosow", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AzureStackHciClusterResourceId model = new AzureStackHciClusterResourceId().withId("hashsfwxosow"); + model = BinaryData.fromObject(model).toObject(AzureStackHciClusterResourceId.class); + Assertions.assertEquals("hashsfwxosow", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/CertificateProvisioningTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/CertificateProvisioningTests.java new file mode 100644 index 000000000000..d4816d996de0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/CertificateProvisioningTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.CertificateProvisioning; + +public final class CertificateProvisioningTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CertificateProvisioning model = BinaryData.fromString("{\"state\":\"NotProvisioned\",\"reason\":\"fbkp\"}") + .toObject(CertificateProvisioning.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CertificateProvisioning model = new CertificateProvisioning(); + model = BinaryData.fromObject(model).toObject(CertificateProvisioning.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ConnectedClusterResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ConnectedClusterResourceIdTests.java new file mode 100644 index 000000000000..80d256a2898e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ConnectedClusterResourceIdTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.ConnectedClusterResourceId; +import org.junit.jupiter.api.Assertions; + +public final class ConnectedClusterResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConnectedClusterResourceId model + = BinaryData.fromString("{\"id\":\"xcug\"}").toObject(ConnectedClusterResourceId.class); + Assertions.assertEquals("xcug", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConnectedClusterResourceId model = new ConnectedClusterResourceId().withId("xcug"); + model = BinaryData.fromObject(model).toObject(ConnectedClusterResourceId.class); + Assertions.assertEquals("xcug", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/CustomLocationResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/CustomLocationResourceIdTests.java new file mode 100644 index 000000000000..54ea36120882 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/CustomLocationResourceIdTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.CustomLocationResourceId; +import org.junit.jupiter.api.Assertions; + +public final class CustomLocationResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CustomLocationResourceId model + = BinaryData.fromString("{\"id\":\"cjooxdjebwpucwwf\"}").toObject(CustomLocationResourceId.class); + Assertions.assertEquals("cjooxdjebwpucwwf", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CustomLocationResourceId model = new CustomLocationResourceId().withId("cjooxdjebwpucwwf"); + model = BinaryData.fromObject(model).toObject(CustomLocationResourceId.class); + Assertions.assertEquals("cjooxdjebwpucwwf", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkConfigurationTests.java new file mode 100644 index 000000000000..5295f288ec54 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkConfigurationTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.PduSessionType; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.ServiceResourceId; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DataNetworkConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataNetworkConfiguration model = BinaryData.fromString( + "{\"dataNetwork\":{\"id\":\"nzqodfvpg\"},\"sessionAmbr\":{\"uplink\":\"hoxgsgbpf\",\"downlink\":\"zdjtxvzflbqv\"},\"5qi\":1973485152,\"allocationAndRetentionPriorityLevel\":887715159,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"defaultSessionType\":\"IPv4\",\"additionalAllowedSessionTypes\":[\"IPv4\"],\"allowedServices\":[{\"id\":\"etnwsdtutnw\"},{\"id\":\"duy\"},{\"id\":\"vuzhyr\"}],\"maximumNumberOfBufferedPackets\":680405996}") + .toObject(DataNetworkConfiguration.class); + Assertions.assertEquals("nzqodfvpg", model.dataNetwork().id()); + Assertions.assertEquals("hoxgsgbpf", model.sessionAmbr().uplink()); + Assertions.assertEquals("zdjtxvzflbqv", model.sessionAmbr().downlink()); + Assertions.assertEquals(1973485152, model.fiveQi()); + Assertions.assertEquals(887715159, model.allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, model.preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, model.preemptionVulnerability()); + Assertions.assertEquals(PduSessionType.IPV4, model.defaultSessionType()); + Assertions.assertEquals(PduSessionType.IPV4, model.additionalAllowedSessionTypes().get(0)); + Assertions.assertEquals("etnwsdtutnw", model.allowedServices().get(0).id()); + Assertions.assertEquals(680405996, model.maximumNumberOfBufferedPackets()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataNetworkConfiguration model + = new DataNetworkConfiguration().withDataNetwork(new DataNetworkResourceId().withId("nzqodfvpg")) + .withSessionAmbr(new Ambr().withUplink("hoxgsgbpf").withDownlink("zdjtxvzflbqv")) + .withFiveQi(1973485152) + .withAllocationAndRetentionPriorityLevel(887715159) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes(Arrays.asList(PduSessionType.IPV4)) + .withAllowedServices(Arrays.asList(new ServiceResourceId().withId("etnwsdtutnw"), + new ServiceResourceId().withId("duy"), new ServiceResourceId().withId("vuzhyr"))) + .withMaximumNumberOfBufferedPackets(680405996); + model = BinaryData.fromObject(model).toObject(DataNetworkConfiguration.class); + Assertions.assertEquals("nzqodfvpg", model.dataNetwork().id()); + Assertions.assertEquals("hoxgsgbpf", model.sessionAmbr().uplink()); + Assertions.assertEquals("zdjtxvzflbqv", model.sessionAmbr().downlink()); + Assertions.assertEquals(1973485152, model.fiveQi()); + Assertions.assertEquals(887715159, model.allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, model.preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, model.preemptionVulnerability()); + Assertions.assertEquals(PduSessionType.IPV4, model.defaultSessionType()); + Assertions.assertEquals(PduSessionType.IPV4, model.additionalAllowedSessionTypes().get(0)); + Assertions.assertEquals("etnwsdtutnw", model.allowedServices().get(0).id()); + Assertions.assertEquals(680405996, model.maximumNumberOfBufferedPackets()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkInnerTests.java new file mode 100644 index 000000000000..a3c7e7371c42 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkInnerTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DataNetworkInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataNetworkInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Unknown\",\"description\":\"qeojnxqbzvddntw\"},\"location\":\"eic\",\"tags\":{\"uhrhcffcyddgl\":\"npzaoq\"},\"id\":\"jthjqkwpyei\",\"name\":\"xmqci\",\"type\":\"q\"}") + .toObject(DataNetworkInner.class); + Assertions.assertEquals("eic", model.location()); + Assertions.assertEquals("npzaoq", model.tags().get("uhrhcffcyddgl")); + Assertions.assertEquals("qeojnxqbzvddntw", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataNetworkInner model = new DataNetworkInner().withLocation("eic") + .withTags(mapOf("uhrhcffcyddgl", "npzaoq")) + .withDescription("qeojnxqbzvddntw"); + model = BinaryData.fromObject(model).toObject(DataNetworkInner.class); + Assertions.assertEquals("eic", model.location()); + Assertions.assertEquals("npzaoq", model.tags().get("uhrhcffcyddgl")); + Assertions.assertEquals("qeojnxqbzvddntw", model.description()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkListResultTests.java new file mode 100644 index 000000000000..bd8310a9fa80 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkListResultTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkListResult; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DataNetworkListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataNetworkListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"a\"},\"location\":\"uhrzayvvt\",\"tags\":{\"ftutqxlngxlefgu\":\"dfgiot\",\"qmi\":\"nxkrx\"},\"id\":\"tthzrvqd\",\"name\":\"abhjybi\",\"type\":\"ehoqfbowskan\"}],\"nextLink\":\"tzlcuiywgqywgn\"}") + .toObject(DataNetworkListResult.class); + Assertions.assertEquals("uhrzayvvt", model.value().get(0).location()); + Assertions.assertEquals("dfgiot", model.value().get(0).tags().get("ftutqxlngxlefgu")); + Assertions.assertEquals("a", model.value().get(0).description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataNetworkListResult model + = new DataNetworkListResult().withValue(Arrays.asList(new DataNetworkInner().withLocation("uhrzayvvt") + .withTags(mapOf("ftutqxlngxlefgu", "dfgiot", "qmi", "nxkrx")) + .withDescription("a"))); + model = BinaryData.fromObject(model).toObject(DataNetworkListResult.class); + Assertions.assertEquals("uhrzayvvt", model.value().get(0).location()); + Assertions.assertEquals("dfgiot", model.value().get(0).tags().get("ftutqxlngxlefgu")); + Assertions.assertEquals("a", model.value().get(0).description()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkPropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkPropertiesFormatTests.java new file mode 100644 index 000000000000..e6787798b144 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkPropertiesFormatTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkPropertiesFormat; +import org.junit.jupiter.api.Assertions; + +public final class DataNetworkPropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataNetworkPropertiesFormat model + = BinaryData.fromString("{\"provisioningState\":\"Deleting\",\"description\":\"ixuigdtopbobj\"}") + .toObject(DataNetworkPropertiesFormat.class); + Assertions.assertEquals("ixuigdtopbobj", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataNetworkPropertiesFormat model = new DataNetworkPropertiesFormat().withDescription("ixuigdtopbobj"); + model = BinaryData.fromObject(model).toObject(DataNetworkPropertiesFormat.class); + Assertions.assertEquals("ixuigdtopbobj", model.description()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkResourceIdTests.java new file mode 100644 index 000000000000..4e0cee29016b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworkResourceIdTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import org.junit.jupiter.api.Assertions; + +public final class DataNetworkResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataNetworkResourceId model + = BinaryData.fromString("{\"id\":\"wrxgkneuvy\"}").toObject(DataNetworkResourceId.class); + Assertions.assertEquals("wrxgkneuvy", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataNetworkResourceId model = new DataNetworkResourceId().withId("wrxgkneuvy"); + model = BinaryData.fromObject(model).toObject(DataNetworkResourceId.class); + Assertions.assertEquals("wrxgkneuvy", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..dc3985645110 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateMockTests.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.DataNetwork; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DataNetworksCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"qtljqobbpihehc\"},\"location\":\"ybmrqbrjbbmp\",\"tags\":{\"wjksghudgzhxo\":\"vykfrexcrse\",\"jkxibda\":\"jggsvo\"},\"id\":\"hrkmdyomkxfbvfbh\",\"name\":\"y\",\"type\":\"rhpw\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + DataNetwork response = manager.dataNetworks() + .define("rwgdnqzbrfks") + .withRegion("cit") + .withExistingMobileNetwork("mzegjon", "hj") + .withTags(mapOf("omflrytswfp", "sxcdgljplkeuach", "skw", "mdgycxn", "shhkvpedw", "qjjyslurl", "wwsko", + "slsrhmpq")) + .withDescription("tk") + .create(); + + Assertions.assertEquals("ybmrqbrjbbmp", response.location()); + Assertions.assertEquals("vykfrexcrse", response.tags().get("wjksghudgzhxo")); + Assertions.assertEquals("qtljqobbpihehc", response.description()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteMockTests.java new file mode 100644 index 000000000000..d54b801f1480 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DataNetworksDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.dataNetworks().delete("izrzb", "psfxsf", "ztlvtmvagbwidqlv", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetWithResponseMockTests.java new file mode 100644 index 000000000000..01bcff6a9984 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.DataNetwork; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DataNetworksGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ujr\"},\"location\":\"fojuidjpuuyj\",\"tags\":{\"tjklntikyjuzk\":\"jikzoeovvtzej\",\"vhqjwtrhtgvg\":\"bqzolxr\",\"lawjmjsmwrok\":\"pcrrk\",\"tlhguynuchl\":\"dxfzzzwyjaf\"},\"id\":\"mltx\",\"name\":\"whmozusgzvlnsnnj\",\"type\":\"fpafolpymwamxq\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + DataNetwork response = manager.dataNetworks() + .getWithResponse("ukoveofi", "rvjfnmjmvlw", "z", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("fojuidjpuuyj", response.location()); + Assertions.assertEquals("jikzoeovvtzej", response.tags().get("tjklntikyjuzk")); + Assertions.assertEquals("ujr", response.description()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkMockTests.java new file mode 100644 index 000000000000..9500e9a5aa68 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.DataNetwork; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DataNetworksListByMobileNetworkMockTests { + @Test + public void testListByMobileNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"c\"},\"location\":\"srlzknmzlan\",\"tags\":{\"phcnzqtpj\":\"dwv\",\"iwdcxsmlzzhzd\":\"mqrhvthl\",\"n\":\"xetlgydlhqv\"},\"id\":\"pxy\",\"name\":\"afiqgeaarbgjekg\",\"type\":\"klbyulidwcw\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.dataNetworks().listByMobileNetwork("rag", "gdphtvdula", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("srlzknmzlan", response.iterator().next().location()); + Assertions.assertEquals("dwv", response.iterator().next().tags().get("phcnzqtpj")); + Assertions.assertEquals("c", response.iterator().next().description()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackageInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackageInnerTests.java new file mode 100644 index 000000000000..b2fdb8691490 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackageInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; + +public final class DiagnosticsPackageInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiagnosticsPackageInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Unknown\",\"status\":\"Collected\",\"reason\":\"zgpphrcgyncocpe\"},\"id\":\"vmmcoofs\",\"name\":\"lzevgbmqjqab\",\"type\":\"y\"}") + .toObject(DiagnosticsPackageInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiagnosticsPackageInner model = new DiagnosticsPackageInner(); + model = BinaryData.fromObject(model).toObject(DiagnosticsPackageInner.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackageListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackageListResultTests.java new file mode 100644 index 000000000000..1f3ec26e4d66 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackageListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackageListResult; +import java.util.Arrays; + +public final class DiagnosticsPackageListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiagnosticsPackageListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"status\":\"NotStarted\",\"reason\":\"bacfionlebxetq\"},\"id\":\"zxdpnqbqqw\",\"name\":\"rjfeallnwsubisnj\",\"type\":\"mpmngnzscxaqwoo\"}],\"nextLink\":\"cbonqvpk\"}") + .toObject(DiagnosticsPackageListResult.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiagnosticsPackageListResult model + = new DiagnosticsPackageListResult().withValue(Arrays.asList(new DiagnosticsPackageInner())); + model = BinaryData.fromObject(model).toObject(DiagnosticsPackageListResult.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagePropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagePropertiesFormatTests.java new file mode 100644 index 000000000000..4c86fb082447 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagePropertiesFormatTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackagePropertiesFormat; + +public final class DiagnosticsPackagePropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiagnosticsPackagePropertiesFormat model + = BinaryData.fromString("{\"provisioningState\":\"Accepted\",\"status\":\"Error\",\"reason\":\"lzu\"}") + .toObject(DiagnosticsPackagePropertiesFormat.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiagnosticsPackagePropertiesFormat model = new DiagnosticsPackagePropertiesFormat(); + model = BinaryData.fromObject(model).toObject(DiagnosticsPackagePropertiesFormat.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..b47ac92042b3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateMockTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackage; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DiagnosticsPackagesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Collecting\",\"reason\":\"snsqowxwcoml\"},\"id\":\"ytwvczcswkacve\",\"name\":\"yfdvlvhbwrnfxtgd\",\"type\":\"pqthehnmnaoya\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + DiagnosticsPackage response = manager.diagnosticsPackages() + .createOrUpdate("gddeimaw", "o", "gkkumuikjcj", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteMockTests.java new file mode 100644 index 000000000000..4b0c5b290a38 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DiagnosticsPackagesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.diagnosticsPackages().delete("srlsmd", "sqplpvmjcd", "ewbidyvteowxv", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetWithResponseMockTests.java new file mode 100644 index 000000000000..4483830d2044 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetWithResponseMockTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackage; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DiagnosticsPackagesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Error\",\"reason\":\"sggux\"},\"id\":\"mlwywaeeczg\",\"name\":\"bukklels\",\"type\":\"xblycsxzuj\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + DiagnosticsPackage response = manager.diagnosticsPackages() + .getWithResponse("kcoeqswank", "t", "tmhdroznnhdr", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneMockTests.java new file mode 100644 index 000000000000..602ed06ff496 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneMockTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackage; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DiagnosticsPackagesListByPacketCoreControlPlaneMockTests { + @Test + public void testListByPacketCoreControlPlane() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"status\":\"Collected\",\"reason\":\"baobn\"},\"id\":\"ujdjltymkmvg\",\"name\":\"ihywartspph\",\"type\":\"ixkykxd\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.diagnosticsPackages() + .listByPacketCoreControlPlane("piudeugfsxzecpa", "wkufykhvuhxepm", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsUploadConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsUploadConfigurationTests.java new file mode 100644 index 000000000000..64e3bd99c588 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsUploadConfigurationTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsUploadConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class DiagnosticsUploadConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiagnosticsUploadConfiguration model = BinaryData.fromString("{\"storageAccountContainerUrl\":\"cg\"}") + .toObject(DiagnosticsUploadConfiguration.class); + Assertions.assertEquals("cg", model.storageAccountContainerUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiagnosticsUploadConfiguration model + = new DiagnosticsUploadConfiguration().withStorageAccountContainerUrl("cg"); + model = BinaryData.fromObject(model).toObject(DiagnosticsUploadConfiguration.class); + Assertions.assertEquals("cg", model.storageAccountContainerUrl()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DnnIpPairTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DnnIpPairTests.java new file mode 100644 index 000000000000..21d4960e52fe --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/DnnIpPairTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.DnnIpPair; +import com.azure.resourcemanager.mobilenetwork.models.UeIpAddress; +import org.junit.jupiter.api.Assertions; + +public final class DnnIpPairTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnnIpPair model = BinaryData.fromString("{\"dnn\":\"hv\",\"ueIpAddress\":{\"ipV4Addr\":\"kvntjlrigjkskyri\"}}") + .toObject(DnnIpPair.class); + Assertions.assertEquals("hv", model.dnn()); + Assertions.assertEquals("kvntjlrigjkskyri", model.ueIpAddress().ipV4Addr()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnnIpPair model + = new DnnIpPair().withDnn("hv").withUeIpAddress(new UeIpAddress().withIpV4Addr("kvntjlrigjkskyri")); + model = BinaryData.fromObject(model).toObject(DnnIpPair.class); + Assertions.assertEquals("hv", model.dnn()); + Assertions.assertEquals("kvntjlrigjkskyri", model.ueIpAddress().ipV4Addr()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/EventHubConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/EventHubConfigurationTests.java new file mode 100644 index 000000000000..6ffa166c95b3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/EventHubConfigurationTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.EventHubConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class EventHubConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EventHubConfiguration model = BinaryData.fromString("{\"id\":\"lwn\",\"reportingInterval\":1035502887}") + .toObject(EventHubConfiguration.class); + Assertions.assertEquals("lwn", model.id()); + Assertions.assertEquals(1035502887, model.reportingInterval()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EventHubConfiguration model = new EventHubConfiguration().withId("lwn").withReportingInterval(1035502887); + model = BinaryData.fromObject(model).toObject(EventHubConfiguration.class); + Assertions.assertEquals("lwn", model.id()); + Assertions.assertEquals(1035502887, model.reportingInterval()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInfoInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInfoInnerTests.java new file mode 100644 index 000000000000..cfe3d6f4e596 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInfoInnerTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ExtendedUeInfoInner; +import com.azure.resourcemanager.mobilenetwork.models.ExtendedUeInfoProperties; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class ExtendedUeInfoInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExtendedUeInfoInner model = BinaryData.fromString( + "{\"properties\":{\"ratType\":\"ExtendedUeInfoProperties\",\"lastReadAt\":\"2021-11-27T16:03:54Z\"},\"id\":\"mygvkzqkj\",\"name\":\"eokbze\",\"type\":\"ezrxcczurtleipqx\"}") + .toObject(ExtendedUeInfoInner.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T16:03:54Z"), model.properties().lastReadAt()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExtendedUeInfoInner model = new ExtendedUeInfoInner().withProperties( + new ExtendedUeInfoProperties().withLastReadAt(OffsetDateTime.parse("2021-11-27T16:03:54Z"))); + model = BinaryData.fromObject(model).toObject(ExtendedUeInfoInner.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T16:03:54Z"), model.properties().lastReadAt()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInfoPropertiesTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInfoPropertiesTests.java new file mode 100644 index 000000000000..707731ab14f2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInfoPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.ExtendedUeInfoProperties; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class ExtendedUeInfoPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExtendedUeInfoProperties model = BinaryData + .fromString("{\"ratType\":\"ExtendedUeInfoProperties\",\"lastReadAt\":\"2021-09-05T03:07:28Z\"}") + .toObject(ExtendedUeInfoProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T03:07:28Z"), model.lastReadAt()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExtendedUeInfoProperties model + = new ExtendedUeInfoProperties().withLastReadAt(OffsetDateTime.parse("2021-09-05T03:07:28Z")); + model = BinaryData.fromObject(model).toObject(ExtendedUeInfoProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T03:07:28Z"), model.lastReadAt()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInformationsGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInformationsGetWithResponseMockTests.java new file mode 100644 index 000000000000..902e79839c11 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ExtendedUeInformationsGetWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.ExtendedUeInfo; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ExtendedUeInformationsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"ratType\":\"ExtendedUeInfoProperties\",\"lastReadAt\":\"2021-03-18T08:16:47Z\"},\"id\":\"dxk\",\"name\":\"eqbw\",\"type\":\"ntghyksarcdr\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + ExtendedUeInfo response = manager.extendedUeInformations() + .getWithResponse("veitit", "nsxzajlns", "hwjuyxxbxqvmvua", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T08:16:47Z"), response.properties().lastReadAt()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/GNbIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/GNbIdTests.java new file mode 100644 index 000000000000..502278d4ed89 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/GNbIdTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.GNbId; +import org.junit.jupiter.api.Assertions; + +public final class GNbIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GNbId model + = BinaryData.fromString("{\"bitLength\":1611878916,\"gNBValue\":\"rygznmmaxriz\"}").toObject(GNbId.class); + Assertions.assertEquals(1611878916, model.bitLength()); + Assertions.assertEquals("rygznmmaxriz", model.gNBValue()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GNbId model = new GNbId().withBitLength(1611878916).withGNBValue("rygznmmaxriz"); + model = BinaryData.fromObject(model).toObject(GNbId.class); + Assertions.assertEquals(1611878916, model.bitLength()); + Assertions.assertEquals("rygznmmaxriz", model.gNBValue()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/GlobalRanNodeIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/GlobalRanNodeIdTests.java new file mode 100644 index 000000000000..f334f84c20af --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/GlobalRanNodeIdTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.GNbId; +import com.azure.resourcemanager.mobilenetwork.models.GlobalRanNodeId; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import org.junit.jupiter.api.Assertions; + +public final class GlobalRanNodeIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GlobalRanNodeId model = BinaryData.fromString( + "{\"plmnId\":{\"mcc\":\"zob\",\"mnc\":\"opxlhslnelxieixy\"},\"gNbId\":{\"bitLength\":1686752311,\"gNBValue\":\"cwcrojphs\"},\"ngeNbId\":\"cawjutifdwfmvi\",\"eNbId\":\"rqjb\",\"n3IwfId\":\"zhraglkafh\",\"wagfId\":\"qjujeickpzvcp\",\"tngfId\":\"mxelnwcltyjed\",\"nid\":\"xm\"}") + .toObject(GlobalRanNodeId.class); + Assertions.assertEquals("zob", model.plmnId().mcc()); + Assertions.assertEquals("opxlhslnelxieixy", model.plmnId().mnc()); + Assertions.assertEquals(1686752311, model.gNbId().bitLength()); + Assertions.assertEquals("cwcrojphs", model.gNbId().gNBValue()); + Assertions.assertEquals("cawjutifdwfmvi", model.ngeNbId()); + Assertions.assertEquals("rqjb", model.eNbId()); + Assertions.assertEquals("zhraglkafh", model.n3IwfId()); + Assertions.assertEquals("qjujeickpzvcp", model.wagfId()); + Assertions.assertEquals("mxelnwcltyjed", model.tngfId()); + Assertions.assertEquals("xm", model.nid()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GlobalRanNodeId model + = new GlobalRanNodeId().withPlmnId(new PlmnId().withMcc("zob").withMnc("opxlhslnelxieixy")) + .withGNbId(new GNbId().withBitLength(1686752311).withGNBValue("cwcrojphs")) + .withNgeNbId("cawjutifdwfmvi") + .withENbId("rqjb") + .withN3IwfId("zhraglkafh") + .withWagfId("qjujeickpzvcp") + .withTngfId("mxelnwcltyjed") + .withNid("xm"); + model = BinaryData.fromObject(model).toObject(GlobalRanNodeId.class); + Assertions.assertEquals("zob", model.plmnId().mcc()); + Assertions.assertEquals("opxlhslnelxieixy", model.plmnId().mnc()); + Assertions.assertEquals(1686752311, model.gNbId().bitLength()); + Assertions.assertEquals("cwcrojphs", model.gNbId().gNBValue()); + Assertions.assertEquals("cawjutifdwfmvi", model.ngeNbId()); + Assertions.assertEquals("rqjb", model.eNbId()); + Assertions.assertEquals("zhraglkafh", model.n3IwfId()); + Assertions.assertEquals("qjujeickpzvcp", model.wagfId()); + Assertions.assertEquals("mxelnwcltyjed", model.tngfId()); + Assertions.assertEquals("xm", model.nid()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Guti5GTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Guti5GTests.java new file mode 100644 index 000000000000..ac0b10b5396f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Guti5GTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AmfId; +import com.azure.resourcemanager.mobilenetwork.models.Guti5G; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import org.junit.jupiter.api.Assertions; + +public final class Guti5GTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Guti5G model = BinaryData.fromString( + "{\"plmn\":{\"mcc\":\"jfpgpicrmn\",\"mnc\":\"hr\"},\"amfId\":{\"regionId\":185750645,\"setId\":1972611629,\"pointer\":1113568853},\"fivegTmsi\":13695929}") + .toObject(Guti5G.class); + Assertions.assertEquals("jfpgpicrmn", model.plmn().mcc()); + Assertions.assertEquals("hr", model.plmn().mnc()); + Assertions.assertEquals(185750645, model.amfId().regionId()); + Assertions.assertEquals(1972611629, model.amfId().setId()); + Assertions.assertEquals(1113568853, model.amfId().pointer()); + Assertions.assertEquals(13695929, model.fivegTmsi()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Guti5G model = new Guti5G().withPlmn(new PlmnId().withMcc("jfpgpicrmn").withMnc("hr")) + .withAmfId(new AmfId().withRegionId(185750645).withSetId(1972611629).withPointer(1113568853)) + .withFivegTmsi(13695929); + model = BinaryData.fromObject(model).toObject(Guti5G.class); + Assertions.assertEquals("jfpgpicrmn", model.plmn().mcc()); + Assertions.assertEquals("hr", model.plmn().mnc()); + Assertions.assertEquals(185750645, model.amfId().regionId()); + Assertions.assertEquals(1972611629, model.amfId().setId()); + Assertions.assertEquals(1113568853, model.amfId().pointer()); + Assertions.assertEquals(13695929, model.fivegTmsi()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HomeNetworkPrivateKeysProvisioningTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HomeNetworkPrivateKeysProvisioningTests.java new file mode 100644 index 000000000000..d2452ea07863 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HomeNetworkPrivateKeysProvisioningTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.HomeNetworkPrivateKeysProvisioning; + +public final class HomeNetworkPrivateKeysProvisioningTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HomeNetworkPrivateKeysProvisioning model + = BinaryData.fromString("{\"state\":\"Failed\"}").toObject(HomeNetworkPrivateKeysProvisioning.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HomeNetworkPrivateKeysProvisioning model = new HomeNetworkPrivateKeysProvisioning(); + model = BinaryData.fromObject(model).toObject(HomeNetworkPrivateKeysProvisioning.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HomeNetworkPublicKeyTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HomeNetworkPublicKeyTests.java new file mode 100644 index 000000000000..ff689591de9d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HomeNetworkPublicKeyTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.HomeNetworkPublicKey; +import org.junit.jupiter.api.Assertions; + +public final class HomeNetworkPublicKeyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HomeNetworkPublicKey model = BinaryData.fromString("{\"id\":61185346,\"url\":\"refovgmkqsleyyvx\"}") + .toObject(HomeNetworkPublicKey.class); + Assertions.assertEquals(61185346, model.id()); + Assertions.assertEquals("refovgmkqsleyyvx", model.url()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HomeNetworkPublicKey model = new HomeNetworkPublicKey().withId(61185346).withUrl("refovgmkqsleyyvx"); + model = BinaryData.fromObject(model).toObject(HomeNetworkPublicKey.class); + Assertions.assertEquals(61185346, model.id()); + Assertions.assertEquals("refovgmkqsleyyvx", model.url()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HttpsServerCertificateTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HttpsServerCertificateTests.java new file mode 100644 index 000000000000..700ed7bab10b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/HttpsServerCertificateTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.HttpsServerCertificate; +import org.junit.jupiter.api.Assertions; + +public final class HttpsServerCertificateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HttpsServerCertificate model = BinaryData + .fromString( + "{\"certificateUrl\":\"ytdxwit\",\"provisioning\":{\"state\":\"Provisioned\",\"reason\":\"wgqwgxhn\"}}") + .toObject(HttpsServerCertificate.class); + Assertions.assertEquals("ytdxwit", model.certificateUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HttpsServerCertificate model = new HttpsServerCertificate().withCertificateUrl("ytdxwit"); + model = BinaryData.fromObject(model).toObject(HttpsServerCertificate.class); + Assertions.assertEquals("ytdxwit", model.certificateUrl()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/IdentityAndTagsObjectTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/IdentityAndTagsObjectTests.java new file mode 100644 index 000000000000..7b609d79f7c3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/IdentityAndTagsObjectTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class IdentityAndTagsObjectTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IdentityAndTagsObject model = BinaryData.fromString( + "{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"nysounqe\":{\"principalId\":\"370a8b57-c4ab-4819-aadd-1953be5e03d9\",\"clientId\":\"441c7a18-a4be-442d-b52e-5d073baf2412\"},\"oaeupfhyhltrpmo\":{\"principalId\":\"d5c2b391-aa80-42c4-92fe-8b5908fb4f25\",\"clientId\":\"c9177650-cfb6-4217-959f-6f85673e1447\"},\"cma\":{\"principalId\":\"9889f241-f016-4c42-a1cf-977ecda21828\",\"clientId\":\"e6e03fa5-926e-4ba8-910f-94a18b152d2a\"}}},\"tags\":{\"aodsfcpkv\":\"kthfui\"}}") + .toObject(IdentityAndTagsObject.class); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("kthfui", model.tags().get("aodsfcpkv")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IdentityAndTagsObject model = new IdentityAndTagsObject() + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("nysounqe", new UserAssignedIdentity(), "oaeupfhyhltrpmo", + new UserAssignedIdentity(), "cma", new UserAssignedIdentity()))) + .withTags(mapOf("aodsfcpkv", "kthfui")); + model = BinaryData.fromObject(model).toObject(IdentityAndTagsObject.class); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("kthfui", model.tags().get("aodsfcpkv")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/InstallationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/InstallationTests.java new file mode 100644 index 000000000000..cf344a6fef30 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/InstallationTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.DesiredInstallationState; +import com.azure.resourcemanager.mobilenetwork.models.Installation; +import org.junit.jupiter.api.Assertions; + +public final class InstallationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Installation model = BinaryData.fromString( + "{\"desiredState\":\"Installed\",\"state\":\"Upgrading\",\"reinstallRequired\":\"NotRequired\",\"reasons\":[\"ControlPlaneAccessInterfaceHasChanged\",\"NoAttachedDataNetworks\",\"NoPacketCoreDataPlane\",\"UserPlaneAccessInterfaceHasChanged\"],\"operation\":{\"id\":\"kv\"}}") + .toObject(Installation.class); + Assertions.assertEquals(DesiredInstallationState.INSTALLED, model.desiredState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Installation model = new Installation().withDesiredState(DesiredInstallationState.INSTALLED); + model = BinaryData.fromObject(model).toObject(Installation.class); + Assertions.assertEquals(DesiredInstallationState.INSTALLED, model.desiredState()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/InterfacePropertiesTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/InterfacePropertiesTests.java new file mode 100644 index 000000000000..581917b60733 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/InterfacePropertiesTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class InterfacePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InterfaceProperties model = BinaryData.fromString( + "{\"name\":\"nyejhkryhtnap\",\"ipv4Address\":\"wlokjyem\",\"ipv4Subnet\":\"vnipjox\",\"ipv4Gateway\":\"nchgej\",\"vlanId\":178199431,\"ipv4AddressList\":[\"ailzydehojwyahu\",\"inpm\",\"njaqwixjspro\"],\"bfdIpv4Endpoints\":[\"putegjvwmfd\",\"t\",\"cmdv\",\"jhulsuuvmkjo\"]}") + .toObject(InterfaceProperties.class); + Assertions.assertEquals("nyejhkryhtnap", model.name()); + Assertions.assertEquals("wlokjyem", model.ipv4Address()); + Assertions.assertEquals("vnipjox", model.ipv4Subnet()); + Assertions.assertEquals("nchgej", model.ipv4Gateway()); + Assertions.assertEquals(178199431, model.vlanId()); + Assertions.assertEquals("ailzydehojwyahu", model.ipv4AddressList().get(0)); + Assertions.assertEquals("putegjvwmfd", model.bfdIpv4Endpoints().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InterfaceProperties model = new InterfaceProperties().withName("nyejhkryhtnap") + .withIpv4Address("wlokjyem") + .withIpv4Subnet("vnipjox") + .withIpv4Gateway("nchgej") + .withVlanId(178199431) + .withIpv4AddressList(Arrays.asList("ailzydehojwyahu", "inpm", "njaqwixjspro")) + .withBfdIpv4Endpoints(Arrays.asList("putegjvwmfd", "t", "cmdv", "jhulsuuvmkjo")); + model = BinaryData.fromObject(model).toObject(InterfaceProperties.class); + Assertions.assertEquals("nyejhkryhtnap", model.name()); + Assertions.assertEquals("wlokjyem", model.ipv4Address()); + Assertions.assertEquals("vnipjox", model.ipv4Subnet()); + Assertions.assertEquals("nchgej", model.ipv4Gateway()); + Assertions.assertEquals(178199431, model.vlanId()); + Assertions.assertEquals("ailzydehojwyahu", model.ipv4AddressList().get(0)); + Assertions.assertEquals("putegjvwmfd", model.bfdIpv4Endpoints().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Ipv4RouteNextHopTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Ipv4RouteNextHopTests.java new file mode 100644 index 000000000000..23f83e92eadf --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Ipv4RouteNextHopTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4RouteNextHop; +import org.junit.jupiter.api.Assertions; + +public final class Ipv4RouteNextHopTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Ipv4RouteNextHop model + = BinaryData.fromString("{\"address\":\"uuvxz\",\"priority\":1447033048}").toObject(Ipv4RouteNextHop.class); + Assertions.assertEquals("uuvxz", model.address()); + Assertions.assertEquals(1447033048, model.priority()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Ipv4RouteNextHop model = new Ipv4RouteNextHop().withAddress("uuvxz").withPriority(1447033048); + model = BinaryData.fromObject(model).toObject(Ipv4RouteNextHop.class); + Assertions.assertEquals("uuvxz", model.address()); + Assertions.assertEquals(1447033048, model.priority()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Ipv4RouteTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Ipv4RouteTests.java new file mode 100644 index 000000000000..137cf53ca479 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/Ipv4RouteTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4Route; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4RouteNextHop; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class Ipv4RouteTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Ipv4Route model = BinaryData.fromString( + "{\"destination\":\"btbhjpglkfgohd\",\"nextHops\":[{\"address\":\"lfphsdyhtozfikd\",\"priority\":493623669}]}") + .toObject(Ipv4Route.class); + Assertions.assertEquals("btbhjpglkfgohd", model.destination()); + Assertions.assertEquals("lfphsdyhtozfikd", model.nextHops().get(0).address()); + Assertions.assertEquals(493623669, model.nextHops().get(0).priority()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Ipv4Route model = new Ipv4Route().withDestination("btbhjpglkfgohd") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop().withAddress("lfphsdyhtozfikd").withPriority(493623669))); + model = BinaryData.fromObject(model).toObject(Ipv4Route.class); + Assertions.assertEquals("btbhjpglkfgohd", model.destination()); + Assertions.assertEquals("lfphsdyhtozfikd", model.nextHops().get(0).address()); + Assertions.assertEquals(493623669, model.nextHops().get(0).priority()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/LocalDiagnosticsAccessConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/LocalDiagnosticsAccessConfigurationTests.java new file mode 100644 index 000000000000..ed2626fed681 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/LocalDiagnosticsAccessConfigurationTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AuthenticationType; +import com.azure.resourcemanager.mobilenetwork.models.HttpsServerCertificate; +import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class LocalDiagnosticsAccessConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LocalDiagnosticsAccessConfiguration model = BinaryData.fromString( + "{\"authenticationType\":\"Password\",\"httpsServerCertificate\":{\"certificateUrl\":\"bvmeuecivy\",\"provisioning\":{\"state\":\"NotProvisioned\",\"reason\":\"ojgjrwjueiotwmc\"}}}") + .toObject(LocalDiagnosticsAccessConfiguration.class); + Assertions.assertEquals(AuthenticationType.PASSWORD, model.authenticationType()); + Assertions.assertEquals("bvmeuecivy", model.httpsServerCertificate().certificateUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LocalDiagnosticsAccessConfiguration model + = new LocalDiagnosticsAccessConfiguration().withAuthenticationType(AuthenticationType.PASSWORD) + .withHttpsServerCertificate(new HttpsServerCertificate().withCertificateUrl("bvmeuecivy")); + model = BinaryData.fromObject(model).toObject(LocalDiagnosticsAccessConfiguration.class); + Assertions.assertEquals(AuthenticationType.PASSWORD, model.authenticationType()); + Assertions.assertEquals("bvmeuecivy", model.httpsServerCertificate().certificateUrl()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ManagedServiceIdentityTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ManagedServiceIdentityTests.java new file mode 100644 index 000000000000..60ec822f5706 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ManagedServiceIdentityTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedServiceIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedServiceIdentity model = BinaryData.fromString( + "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"attpngjcrcczsq\":{\"principalId\":\"109f5479-4a65-4a59-93ab-f55c34942428\",\"clientId\":\"85556be5-7215-4c7b-b230-c0cdec721ccc\"}}}") + .toObject(ManagedServiceIdentity.class); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("attpngjcrcczsq", new UserAssignedIdentity())); + model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworkResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworkResourceIdTests.java new file mode 100644 index 000000000000..76b15f57ba2f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworkResourceIdTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.MobileNetworkResourceId; +import org.junit.jupiter.api.Assertions; + +public final class MobileNetworkResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MobileNetworkResourceId model + = BinaryData.fromString("{\"id\":\"oczvy\"}").toObject(MobileNetworkResourceId.class); + Assertions.assertEquals("oczvy", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MobileNetworkResourceId model = new MobileNetworkResourceId().withId("oczvy"); + model = BinaryData.fromObject(model).toObject(MobileNetworkResourceId.class); + Assertions.assertEquals("oczvy", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteMockTests.java new file mode 100644 index 000000000000..202929b36072 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MobileNetworksDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.mobileNetworks().delete("sj", "emmucfxh", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/NaptConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/NaptConfigurationTests.java new file mode 100644 index 000000000000..ba69cfe16016 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/NaptConfigurationTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.NaptConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.NaptEnabled; +import com.azure.resourcemanager.mobilenetwork.models.PinholeTimeouts; +import com.azure.resourcemanager.mobilenetwork.models.PortRange; +import com.azure.resourcemanager.mobilenetwork.models.PortReuseHoldTimes; +import org.junit.jupiter.api.Assertions; + +public final class NaptConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NaptConfiguration model = BinaryData.fromString( + "{\"enabled\":\"Enabled\",\"portRange\":{\"minPort\":1719373799,\"maxPort\":1302147866},\"portReuseHoldTime\":{\"tcp\":2025512378,\"udp\":230645799},\"pinholeLimits\":127605943,\"pinholeTimeouts\":{\"tcp\":1912467695,\"udp\":220700122,\"icmp\":672653689}}") + .toObject(NaptConfiguration.class); + Assertions.assertEquals(NaptEnabled.ENABLED, model.enabled()); + Assertions.assertEquals(1719373799, model.portRange().minPort()); + Assertions.assertEquals(1302147866, model.portRange().maxPort()); + Assertions.assertEquals(2025512378, model.portReuseHoldTime().tcp()); + Assertions.assertEquals(230645799, model.portReuseHoldTime().udp()); + Assertions.assertEquals(127605943, model.pinholeLimits()); + Assertions.assertEquals(1912467695, model.pinholeTimeouts().tcp()); + Assertions.assertEquals(220700122, model.pinholeTimeouts().udp()); + Assertions.assertEquals(672653689, model.pinholeTimeouts().icmp()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NaptConfiguration model = new NaptConfiguration().withEnabled(NaptEnabled.ENABLED) + .withPortRange(new PortRange().withMinPort(1719373799).withMaxPort(1302147866)) + .withPortReuseHoldTime(new PortReuseHoldTimes().withTcp(2025512378).withUdp(230645799)) + .withPinholeLimits(127605943) + .withPinholeTimeouts(new PinholeTimeouts().withTcp(1912467695).withUdp(220700122).withIcmp(672653689)); + model = BinaryData.fromObject(model).toObject(NaptConfiguration.class); + Assertions.assertEquals(NaptEnabled.ENABLED, model.enabled()); + Assertions.assertEquals(1719373799, model.portRange().minPort()); + Assertions.assertEquals(1302147866, model.portRange().maxPort()); + Assertions.assertEquals(2025512378, model.portReuseHoldTime().tcp()); + Assertions.assertEquals(230645799, model.portReuseHoldTime().udp()); + Assertions.assertEquals(127605943, model.pinholeLimits()); + Assertions.assertEquals(1912467695, model.pinholeTimeouts().tcp()); + Assertions.assertEquals(220700122, model.pinholeTimeouts().udp()); + Assertions.assertEquals(672653689, model.pinholeTimeouts().icmp()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/NasRerouteConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/NasRerouteConfigurationTests.java new file mode 100644 index 000000000000..ef6eaeff4b31 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/NasRerouteConfigurationTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.NasRerouteConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class NasRerouteConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NasRerouteConfiguration model + = BinaryData.fromString("{\"macroMmeGroupId\":26018404}").toObject(NasRerouteConfiguration.class); + Assertions.assertEquals(26018404, model.macroMmeGroupId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NasRerouteConfiguration model = new NasRerouteConfiguration().withMacroMmeGroupId(26018404); + model = BinaryData.fromObject(model).toObject(NasRerouteConfiguration.class); + Assertions.assertEquals(26018404, model.macroMmeGroupId()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationDisplayTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationDisplayTests.java new file mode 100644 index 000000000000..75fe7da1c992 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationDisplayTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.OperationDisplay; +import org.junit.jupiter.api.Assertions; + +public final class OperationDisplayTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"gigr\",\"resource\":\"burvjxxjnspy\",\"operation\":\"tko\",\"description\":\"kouknvudwtiu\"}") + .toObject(OperationDisplay.class); + Assertions.assertEquals("gigr", model.provider()); + Assertions.assertEquals("burvjxxjnspy", model.resource()); + Assertions.assertEquals("tko", model.operation()); + Assertions.assertEquals("kouknvudwtiu", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationDisplay model = new OperationDisplay().withProvider("gigr") + .withResource("burvjxxjnspy") + .withOperation("tko") + .withDescription("kouknvudwtiu"); + model = BinaryData.fromObject(model).toObject(OperationDisplay.class); + Assertions.assertEquals("gigr", model.provider()); + Assertions.assertEquals("burvjxxjnspy", model.resource()); + Assertions.assertEquals("tko", model.operation()); + Assertions.assertEquals("kouknvudwtiu", model.description()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationInnerTests.java new file mode 100644 index 000000000000..99699cd35fc0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.OperationInner; +import org.junit.jupiter.api.Assertions; + +public final class OperationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationInner model = BinaryData.fromString( + "{\"isDataAction\":false,\"name\":\"osvexcsonpclhoc\",\"display\":{\"provider\":\"lkevle\",\"resource\":\"zfbuhf\",\"operation\":\"faxkffeii\",\"description\":\"lvmezyvshxmzsbbz\"}}") + .toObject(OperationInner.class); + Assertions.assertEquals(false, model.isDataAction()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationInner model = new OperationInner().withIsDataAction(false); + model = BinaryData.fromObject(model).toObject(OperationInner.class); + Assertions.assertEquals(false, model.isDataAction()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationListTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationListTests.java new file mode 100644 index 000000000000..e5db27503b18 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationListTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.OperationList; + +public final class OperationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationList model = BinaryData.fromString( + "{\"value\":[{\"isDataAction\":false,\"name\":\"dvjsllrmvvdf\",\"display\":{\"provider\":\"kpnpulexxbczwtr\",\"resource\":\"iqzbq\",\"operation\":\"sovmyokacspkwl\",\"description\":\"dobpxjmflbvvn\"}},{\"isDataAction\":true,\"name\":\"cciw\",\"display\":{\"provider\":\"uqkhrsajiwku\",\"resource\":\"oskg\",\"operation\":\"auu\",\"description\":\"jmvxie\"}}],\"nextLink\":\"ugidyjrr\"}") + .toObject(OperationList.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationList model = new OperationList(); + model = BinaryData.fromObject(model).toObject(OperationList.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListMockTests.java new file mode 100644 index 000000000000..cfb46b9dfe9a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.Operation; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class OperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"isDataAction\":false,\"name\":\"pomyqwcabvnuile\",\"display\":{\"provider\":\"swlpaugmrmfj\",\"resource\":\"xwtoaukhfkvc\",\"operation\":\"izmoaeds\",\"description\":\"wuived\"}}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals(false, response.iterator().next().isDataAction()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCaptureInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCaptureInnerTests.java new file mode 100644 index 000000000000..e8d65a63787e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCaptureInnerTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PacketCaptureInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCaptureInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Stopped\",\"reason\":\"kpoc\",\"captureStartTime\":\"2021-05-19T00:57:25Z\",\"networkInterfaces\":[\"xoegukgjnpiucgy\",\"evqzntypmrbp\",\"zcdrqjsdpydnfyhx\"],\"bytesToCapturePerPacket\":5446401731314405625,\"totalBytesPerSession\":1641594420313598643,\"timeLimitInSeconds\":170373532,\"outputFiles\":[\"sjttgzfbish\"]},\"id\":\"khaj\",\"name\":\"eyeam\",\"type\":\"p\"}") + .toObject(PacketCaptureInner.class); + Assertions.assertEquals("xoegukgjnpiucgy", model.networkInterfaces().get(0)); + Assertions.assertEquals(5446401731314405625L, model.bytesToCapturePerPacket()); + Assertions.assertEquals(1641594420313598643L, model.totalBytesPerSession()); + Assertions.assertEquals(170373532, model.timeLimitInSeconds()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCaptureInner model = new PacketCaptureInner() + .withNetworkInterfaces(Arrays.asList("xoegukgjnpiucgy", "evqzntypmrbp", "zcdrqjsdpydnfyhx")) + .withBytesToCapturePerPacket(5446401731314405625L) + .withTotalBytesPerSession(1641594420313598643L) + .withTimeLimitInSeconds(170373532); + model = BinaryData.fromObject(model).toObject(PacketCaptureInner.class); + Assertions.assertEquals("xoegukgjnpiucgy", model.networkInterfaces().get(0)); + Assertions.assertEquals(5446401731314405625L, model.bytesToCapturePerPacket()); + Assertions.assertEquals(1641594420313598643L, model.totalBytesPerSession()); + Assertions.assertEquals(170373532, model.timeLimitInSeconds()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCaptureListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCaptureListResultTests.java new file mode 100644 index 000000000000..c2e9abd793c4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCaptureListResultTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptureListResult; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PacketCaptureListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCaptureListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"NotStarted\",\"reason\":\"pewr\",\"captureStartTime\":\"2021-08-16T15:51:55Z\",\"networkInterfaces\":[\"vjektcxsenh\",\"lrsf\",\"rzpwvlqdqgbiq\",\"lihkaetcktvfc\"],\"bytesToCapturePerPacket\":2289956898099281831,\"totalBytesPerSession\":6184061974190178172,\"timeLimitInSeconds\":5394429,\"outputFiles\":[\"qhjfbebr\",\"cxerf\",\"wutttxfvjrbi\"]},\"id\":\"hxepcyvahfnlj\",\"name\":\"yq\",\"type\":\"j\"}],\"nextLink\":\"ujqgidok\"}") + .toObject(PacketCaptureListResult.class); + Assertions.assertEquals("vjektcxsenh", model.value().get(0).networkInterfaces().get(0)); + Assertions.assertEquals(2289956898099281831L, model.value().get(0).bytesToCapturePerPacket()); + Assertions.assertEquals(6184061974190178172L, model.value().get(0).totalBytesPerSession()); + Assertions.assertEquals(5394429, model.value().get(0).timeLimitInSeconds()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCaptureListResult model = new PacketCaptureListResult().withValue(Arrays.asList(new PacketCaptureInner() + .withNetworkInterfaces(Arrays.asList("vjektcxsenh", "lrsf", "rzpwvlqdqgbiq", "lihkaetcktvfc")) + .withBytesToCapturePerPacket(2289956898099281831L) + .withTotalBytesPerSession(6184061974190178172L) + .withTimeLimitInSeconds(5394429))); + model = BinaryData.fromObject(model).toObject(PacketCaptureListResult.class); + Assertions.assertEquals("vjektcxsenh", model.value().get(0).networkInterfaces().get(0)); + Assertions.assertEquals(2289956898099281831L, model.value().get(0).bytesToCapturePerPacket()); + Assertions.assertEquals(6184061974190178172L, model.value().get(0).totalBytesPerSession()); + Assertions.assertEquals(5394429, model.value().get(0).timeLimitInSeconds()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturePropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturePropertiesFormatTests.java new file mode 100644 index 000000000000..4441dac6786b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturePropertiesFormatTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCapturePropertiesFormat; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PacketCapturePropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCapturePropertiesFormat model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"status\":\"Error\",\"reason\":\"buxwgip\",\"captureStartTime\":\"2021-08-16T19:25:13Z\",\"networkInterfaces\":[\"wkgshwa\"],\"bytesToCapturePerPacket\":9069419469544491752,\"totalBytesPerSession\":3330402846072067803,\"timeLimitInSeconds\":624724935,\"outputFiles\":[\"uttmrywnuzoqft\"]}") + .toObject(PacketCapturePropertiesFormat.class); + Assertions.assertEquals("wkgshwa", model.networkInterfaces().get(0)); + Assertions.assertEquals(9069419469544491752L, model.bytesToCapturePerPacket()); + Assertions.assertEquals(3330402846072067803L, model.totalBytesPerSession()); + Assertions.assertEquals(624724935, model.timeLimitInSeconds()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCapturePropertiesFormat model + = new PacketCapturePropertiesFormat().withNetworkInterfaces(Arrays.asList("wkgshwa")) + .withBytesToCapturePerPacket(9069419469544491752L) + .withTotalBytesPerSession(3330402846072067803L) + .withTimeLimitInSeconds(624724935); + model = BinaryData.fromObject(model).toObject(PacketCapturePropertiesFormat.class); + Assertions.assertEquals("wkgshwa", model.networkInterfaces().get(0)); + Assertions.assertEquals(9069419469544491752L, model.bytesToCapturePerPacket()); + Assertions.assertEquals(3330402846072067803L, model.totalBytesPerSession()); + Assertions.assertEquals(624724935, model.timeLimitInSeconds()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..f0b81d2e9624 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateMockTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.PacketCapture; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCapturesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Error\",\"reason\":\"ohhoucqpqojxcxz\",\"captureStartTime\":\"2021-07-20T00:10:21Z\",\"networkInterfaces\":[\"dzbenri\",\"cawetzqddt\"],\"bytesToCapturePerPacket\":2874714863507739239,\"totalBytesPerSession\":2672571811626083007,\"timeLimitInSeconds\":1441548942,\"outputFiles\":[\"uatmzwcjjncqtj\",\"mizvgbgatzuuvbx\",\"grebwggahttzlsw\"]},\"id\":\"jqfutlxj\",\"name\":\"qzasunwqrjzfrgqh\",\"type\":\"ohcmbu\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PacketCapture response = manager.packetCaptures() + .define("d") + .withExistingPacketCoreControlPlane("nmbscbbx", "gdhxi") + .withNetworkInterfaces(Arrays.asList("bmdnafcbqwre", "jelaqacigele", "hdbvqvwzkjop", "beonrlkwzdq")) + .withBytesToCapturePerPacket(242190518706221422L) + .withTotalBytesPerSession(8133324851660913956L) + .withTimeLimitInSeconds(915634222) + .create(); + + Assertions.assertEquals("dzbenri", response.networkInterfaces().get(0)); + Assertions.assertEquals(2874714863507739239L, response.bytesToCapturePerPacket()); + Assertions.assertEquals(2672571811626083007L, response.totalBytesPerSession()); + Assertions.assertEquals(1441548942, response.timeLimitInSeconds()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteMockTests.java new file mode 100644 index 000000000000..35bef17b2582 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCapturesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.packetCaptures().delete("u", "vxnqmhrpqpd", "wmkoisq", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetWithResponseMockTests.java new file mode 100644 index 000000000000..b37a4ad1aea3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetWithResponseMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.PacketCapture; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCapturesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Error\",\"reason\":\"splzga\",\"captureStartTime\":\"2021-02-13T02:42:05Z\",\"networkInterfaces\":[\"hvn\",\"wgnxkympqanxrj\",\"ixt\",\"bta\"],\"bytesToCapturePerPacket\":6619905523291650511,\"totalBytesPerSession\":7368472418543037436,\"timeLimitInSeconds\":258038156,\"outputFiles\":[\"ylhk\"]},\"id\":\"nsghp\",\"name\":\"ycphdrwjjkhvyo\",\"type\":\"ac\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PacketCapture response = manager.packetCaptures() + .getWithResponse("cgyee", "xeiqbpsmg", "mguaml", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("hvn", response.networkInterfaces().get(0)); + Assertions.assertEquals(6619905523291650511L, response.bytesToCapturePerPacket()); + Assertions.assertEquals(7368472418543037436L, response.totalBytesPerSession()); + Assertions.assertEquals(258038156, response.timeLimitInSeconds()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneMockTests.java new file mode 100644 index 000000000000..832af01f7e3f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.PacketCapture; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCapturesListByPacketCoreControlPlaneMockTests { + @Test + public void testListByPacketCoreControlPlane() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Unknown\",\"status\":\"NotStarted\",\"reason\":\"m\",\"captureStartTime\":\"2021-09-03T01:56:24Z\",\"networkInterfaces\":[\"ihspnxwqagnepz\",\"aklsbsbq\",\"qagwwrxaomz\"],\"bytesToCapturePerPacket\":9186113905347674849,\"totalBytesPerSession\":1634039749191408723,\"timeLimitInSeconds\":1546615539,\"outputFiles\":[\"hhltnjadhqo\"]},\"id\":\"jqoyueayfbpcm\",\"name\":\"plby\",\"type\":\"rueqthwm\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.packetCaptures().listByPacketCoreControlPlane("hvcta", "s", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ihspnxwqagnepz", response.iterator().next().networkInterfaces().get(0)); + Assertions.assertEquals(9186113905347674849L, response.iterator().next().bytesToCapturePerPacket()); + Assertions.assertEquals(1634039749191408723L, response.iterator().next().totalBytesPerSession()); + Assertions.assertEquals(1546615539, response.iterator().next().timeLimitInSeconds()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneCollectDiagnosticsPackageTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneCollectDiagnosticsPackageTests.java new file mode 100644 index 000000000000..d8fe4a3e8e93 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneCollectDiagnosticsPackageTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; +import org.junit.jupiter.api.Assertions; + +public final class PacketCoreControlPlaneCollectDiagnosticsPackageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCoreControlPlaneCollectDiagnosticsPackage model + = BinaryData.fromString("{\"storageAccountBlobUrl\":\"aq\"}") + .toObject(PacketCoreControlPlaneCollectDiagnosticsPackage.class); + Assertions.assertEquals("aq", model.storageAccountBlobUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCoreControlPlaneCollectDiagnosticsPackage model + = new PacketCoreControlPlaneCollectDiagnosticsPackage().withStorageAccountBlobUrl("aq"); + model = BinaryData.fromObject(model).toObject(PacketCoreControlPlaneCollectDiagnosticsPackage.class); + Assertions.assertEquals("aq", model.storageAccountBlobUrl()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneResourceIdTests.java new file mode 100644 index 000000000000..d2fdb238f42f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneResourceIdTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneResourceId; +import org.junit.jupiter.api.Assertions; + +public final class PacketCoreControlPlaneResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCoreControlPlaneResourceId model + = BinaryData.fromString("{\"id\":\"pwcyyufmhr\"}").toObject(PacketCoreControlPlaneResourceId.class); + Assertions.assertEquals("pwcyyufmhr", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCoreControlPlaneResourceId model = new PacketCoreControlPlaneResourceId().withId("pwcyyufmhr"); + model = BinaryData.fromObject(model).toObject(PacketCoreControlPlaneResourceId.class); + Assertions.assertEquals("pwcyyufmhr", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionInnerTests.java new file mode 100644 index 000000000000..68c8d728037e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionInnerTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionInner; +import com.azure.resourcemanager.mobilenetwork.models.ObsoleteVersion; +import com.azure.resourcemanager.mobilenetwork.models.Platform; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.RecommendedVersion; +import com.azure.resourcemanager.mobilenetwork.models.VersionState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PacketCoreControlPlaneVersionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCoreControlPlaneVersionInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Deleted\",\"platforms\":[{\"platformType\":\"AKS-HCI\",\"versionState\":\"Unknown\",\"minimumPlatformSoftwareVersion\":\"uoegrpkhjwniyqs\",\"maximumPlatformSoftwareVersion\":\"i\",\"recommendedVersion\":\"NotRecommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"zl\",\"mbmpaxmodfvuefy\",\"sbpfvmwyhr\",\"ouyftaakc\"]},{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"Active\",\"minimumPlatformSoftwareVersion\":\"qtmnubexkpzk\",\"maximumPlatformSoftwareVersion\":\"ondjmq\",\"recommendedVersion\":\"NotRecommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"gkopkwhojvpajqgx\"]},{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"Unknown\",\"minimumPlatformSoftwareVersion\":\"bq\",\"maximumPlatformSoftwareVersion\":\"vmkcx\",\"recommendedVersion\":\"NotRecommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"lxprglyatddckcbc\",\"ejrjxgciqibrho\",\"xsdqrhzoymibmrqy\",\"bahwfl\"]},{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"ValidationFailed\",\"minimumPlatformSoftwareVersion\":\"hrkwo\",\"maximumPlatformSoftwareVersion\":\"yvoqa\",\"recommendedVersion\":\"NotRecommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"tg\",\"wbwo\",\"nwashrtd\",\"kcnqxwbpo\"]}]},\"id\":\"lpiujwaa\",\"name\":\"ipqiiobyuqerpq\",\"type\":\"pqwcciuqgbdbutau\"}") + .toObject(PacketCoreControlPlaneVersionInner.class); + Assertions.assertEquals(PlatformType.AKS_HCI, model.platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.UNKNOWN, model.platforms().get(0).versionState()); + Assertions.assertEquals("uoegrpkhjwniyqs", model.platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("i", model.platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.NOT_RECOMMENDED, model.platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, model.platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("zl", model.platforms().get(0).haUpgradesAvailable().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCoreControlPlaneVersionInner model = new PacketCoreControlPlaneVersionInner().withPlatforms(Arrays.asList( + new Platform().withPlatformType(PlatformType.AKS_HCI) + .withVersionState(VersionState.UNKNOWN) + .withMinimumPlatformSoftwareVersion("uoegrpkhjwniyqs") + .withMaximumPlatformSoftwareVersion("i") + .withRecommendedVersion(RecommendedVersion.NOT_RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("zl", "mbmpaxmodfvuefy", "sbpfvmwyhr", "ouyftaakc")), + new Platform().withPlatformType(PlatformType.THREE_P_AZURE_STACK_HCI) + .withVersionState(VersionState.ACTIVE) + .withMinimumPlatformSoftwareVersion("qtmnubexkpzk") + .withMaximumPlatformSoftwareVersion("ondjmq") + .withRecommendedVersion(RecommendedVersion.NOT_RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.NOT_OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("gkopkwhojvpajqgx")), + new Platform().withPlatformType(PlatformType.THREE_P_AZURE_STACK_HCI) + .withVersionState(VersionState.UNKNOWN) + .withMinimumPlatformSoftwareVersion("bq") + .withMaximumPlatformSoftwareVersion("vmkcx") + .withRecommendedVersion(RecommendedVersion.NOT_RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.NOT_OBSOLETE) + .withHaUpgradesAvailable( + Arrays.asList("lxprglyatddckcbc", "ejrjxgciqibrho", "xsdqrhzoymibmrqy", "bahwfl")), + new Platform().withPlatformType(PlatformType.THREE_P_AZURE_STACK_HCI) + .withVersionState(VersionState.VALIDATION_FAILED) + .withMinimumPlatformSoftwareVersion("hrkwo") + .withMaximumPlatformSoftwareVersion("yvoqa") + .withRecommendedVersion(RecommendedVersion.NOT_RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.NOT_OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("tg", "wbwo", "nwashrtd", "kcnqxwbpo")))); + model = BinaryData.fromObject(model).toObject(PacketCoreControlPlaneVersionInner.class); + Assertions.assertEquals(PlatformType.AKS_HCI, model.platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.UNKNOWN, model.platforms().get(0).versionState()); + Assertions.assertEquals("uoegrpkhjwniyqs", model.platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("i", model.platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.NOT_RECOMMENDED, model.platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, model.platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("zl", model.platforms().get(0).haUpgradesAvailable().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionListResultTests.java new file mode 100644 index 000000000000..56dcc13eff84 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionListResultTests.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionInner; +import com.azure.resourcemanager.mobilenetwork.models.ObsoleteVersion; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersionListResult; +import com.azure.resourcemanager.mobilenetwork.models.Platform; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.RecommendedVersion; +import com.azure.resourcemanager.mobilenetwork.models.VersionState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PacketCoreControlPlaneVersionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCoreControlPlaneVersionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"platforms\":[{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"Validating\",\"minimumPlatformSoftwareVersion\":\"jswsrmslyz\",\"maximumPlatformSoftwareVersion\":\"zbchckqqzqioxiy\",\"recommendedVersion\":\"NotRecommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"ked\",\"atrwyhqmibzyh\",\"itsmypyyn\",\"cdpu\"]},{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"Unknown\",\"minimumPlatformSoftwareVersion\":\"z\",\"maximumPlatformSoftwareVersion\":\"abikns\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"ldtlwwr\",\"kdmtncvokotll\"]}]},\"id\":\"yhgsy\",\"name\":\"cogjltdtbn\",\"type\":\"hadoocrk\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"platforms\":[{\"platformType\":\"AKS-HCI\",\"versionState\":\"ValidationFailed\",\"minimumPlatformSoftwareVersion\":\"qgxqquezikyw\",\"maximumPlatformSoftwareVersion\":\"xkalla\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"piccjzkzivgv\",\"c\"]},{\"platformType\":\"AKS-HCI\",\"versionState\":\"ValidationFailed\",\"minimumPlatformSoftwareVersion\":\"rnxxmueed\",\"maximumPlatformSoftwareVersion\":\"rdvstkwqqtch\",\"recommendedVersion\":\"NotRecommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"d\",\"aygdvwvgpioh\",\"wxrt\"]},{\"platformType\":\"AKS-HCI\",\"versionState\":\"Deprecated\",\"minimumPlatformSoftwareVersion\":\"xg\",\"maximumPlatformSoftwareVersion\":\"agvrvmnpkuk\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"xgwim\",\"njhf\",\"xw\"]}]},\"id\":\"zk\",\"name\":\"foqreyfkzik\",\"type\":\"jawneaiv\"}],\"nextLink\":\"czelpcirel\"}") + .toObject(PacketCoreControlPlaneVersionListResult.class); + Assertions.assertEquals(PlatformType.THREE_P_AZURE_STACK_HCI, + model.value().get(0).platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.VALIDATING, model.value().get(0).platforms().get(0).versionState()); + Assertions.assertEquals("jswsrmslyz", model.value().get(0).platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("zbchckqqzqioxiy", + model.value().get(0).platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.NOT_RECOMMENDED, + model.value().get(0).platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, model.value().get(0).platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("ked", model.value().get(0).platforms().get(0).haUpgradesAvailable().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCoreControlPlaneVersionListResult model + = new PacketCoreControlPlaneVersionListResult().withValue(Arrays.asList( + new PacketCoreControlPlaneVersionInner().withPlatforms(Arrays.asList( + new Platform().withPlatformType(PlatformType.THREE_P_AZURE_STACK_HCI) + .withVersionState(VersionState.VALIDATING) + .withMinimumPlatformSoftwareVersion("jswsrmslyz") + .withMaximumPlatformSoftwareVersion("zbchckqqzqioxiy") + .withRecommendedVersion(RecommendedVersion.NOT_RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("ked", "atrwyhqmibzyh", "itsmypyyn", "cdpu")), + new Platform().withPlatformType(PlatformType.THREE_P_AZURE_STACK_HCI) + .withVersionState(VersionState.UNKNOWN) + .withMinimumPlatformSoftwareVersion("z") + .withMaximumPlatformSoftwareVersion("abikns") + .withRecommendedVersion(RecommendedVersion.RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("ldtlwwr", "kdmtncvokotll")))), + new PacketCoreControlPlaneVersionInner().withPlatforms(Arrays.asList( + new Platform().withPlatformType(PlatformType.AKS_HCI) + .withVersionState(VersionState.VALIDATION_FAILED) + .withMinimumPlatformSoftwareVersion("qgxqquezikyw") + .withMaximumPlatformSoftwareVersion("xkalla") + .withRecommendedVersion(RecommendedVersion.RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.NOT_OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("piccjzkzivgv", "c")), + new Platform().withPlatformType(PlatformType.AKS_HCI) + .withVersionState(VersionState.VALIDATION_FAILED) + .withMinimumPlatformSoftwareVersion("rnxxmueed") + .withMaximumPlatformSoftwareVersion("rdvstkwqqtch") + .withRecommendedVersion(RecommendedVersion.NOT_RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.NOT_OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("d", "aygdvwvgpioh", "wxrt")), + new Platform().withPlatformType(PlatformType.AKS_HCI) + .withVersionState(VersionState.DEPRECATED) + .withMinimumPlatformSoftwareVersion("xg") + .withMaximumPlatformSoftwareVersion("agvrvmnpkuk") + .withRecommendedVersion(RecommendedVersion.RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("xgwim", "njhf", "xw")))))); + model = BinaryData.fromObject(model).toObject(PacketCoreControlPlaneVersionListResult.class); + Assertions.assertEquals(PlatformType.THREE_P_AZURE_STACK_HCI, + model.value().get(0).platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.VALIDATING, model.value().get(0).platforms().get(0).versionState()); + Assertions.assertEquals("jswsrmslyz", model.value().get(0).platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("zbchckqqzqioxiy", + model.value().get(0).platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.NOT_RECOMMENDED, + model.value().get(0).platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, model.value().get(0).platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("ked", model.value().get(0).platforms().get(0).haUpgradesAvailable().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionPropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionPropertiesFormatTests.java new file mode 100644 index 000000000000..e08d2439b00a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionPropertiesFormatTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneVersionPropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.ObsoleteVersion; +import com.azure.resourcemanager.mobilenetwork.models.Platform; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.RecommendedVersion; +import com.azure.resourcemanager.mobilenetwork.models.VersionState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PacketCoreControlPlaneVersionPropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCoreControlPlaneVersionPropertiesFormat model = BinaryData.fromString( + "{\"provisioningState\":\"Deleted\",\"platforms\":[{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"ValidationFailed\",\"minimumPlatformSoftwareVersion\":\"hykojoxafnndlpic\",\"maximumPlatformSoftwareVersion\":\"o\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"bpkkpwdre\"]},{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"ValidationFailed\",\"minimumPlatformSoftwareVersion\":\"fovljxyws\",\"maximumPlatformSoftwareVersion\":\"syrsndsytgadgvra\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"zar\"]}]}") + .toObject(PacketCoreControlPlaneVersionPropertiesFormat.class); + Assertions.assertEquals(PlatformType.THREE_P_AZURE_STACK_HCI, model.platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.VALIDATION_FAILED, model.platforms().get(0).versionState()); + Assertions.assertEquals("hykojoxafnndlpic", model.platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("o", model.platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.RECOMMENDED, model.platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, model.platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("bpkkpwdre", model.platforms().get(0).haUpgradesAvailable().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCoreControlPlaneVersionPropertiesFormat model + = new PacketCoreControlPlaneVersionPropertiesFormat().withPlatforms(Arrays.asList( + new Platform().withPlatformType(PlatformType.THREE_P_AZURE_STACK_HCI) + .withVersionState(VersionState.VALIDATION_FAILED) + .withMinimumPlatformSoftwareVersion("hykojoxafnndlpic") + .withMaximumPlatformSoftwareVersion("o") + .withRecommendedVersion(RecommendedVersion.RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("bpkkpwdre")), + new Platform().withPlatformType(PlatformType.THREE_P_AZURE_STACK_HCI) + .withVersionState(VersionState.VALIDATION_FAILED) + .withMinimumPlatformSoftwareVersion("fovljxyws") + .withMaximumPlatformSoftwareVersion("syrsndsytgadgvra") + .withRecommendedVersion(RecommendedVersion.RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("zar")))); + model = BinaryData.fromObject(model).toObject(PacketCoreControlPlaneVersionPropertiesFormat.class); + Assertions.assertEquals(PlatformType.THREE_P_AZURE_STACK_HCI, model.platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.VALIDATION_FAILED, model.platforms().get(0).versionState()); + Assertions.assertEquals("hykojoxafnndlpic", model.platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("o", model.platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.RECOMMENDED, model.platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, model.platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("bpkkpwdre", model.platforms().get(0).haUpgradesAvailable().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionWithResponseMockTests.java new file mode 100644 index 000000000000..7d3bdd2fa6ba --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionWithResponseMockTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.ObsoleteVersion; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersion; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.RecommendedVersion; +import com.azure.resourcemanager.mobilenetwork.models.VersionState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCoreControlPlaneVersionsGetBySubscriptionWithResponseMockTests { + @Test + public void testGetBySubscriptionWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Accepted\",\"platforms\":[{\"platformType\":\"AKS-HCI\",\"versionState\":\"ValidationFailed\",\"minimumPlatformSoftwareVersion\":\"xzcwxhmpejt\",\"maximumPlatformSoftwareVersion\":\"exaonwivkcq\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"lccrmmkyupi\",\"ubyqj\"]},{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"Validating\",\"minimumPlatformSoftwareVersion\":\"frkemyildudxja\",\"maximumPlatformSoftwareVersion\":\"owvfdjkpdxph\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"zvyfijdkzuqnwsi\"]},{\"platformType\":\"AKS-HCI\",\"versionState\":\"Active\",\"minimumPlatformSoftwareVersion\":\"yahluqwqulsutr\",\"maximumPlatformSoftwareVersion\":\"hxykfhyqez\",\"recommendedVersion\":\"NotRecommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"ftbcvexreuquow\"]},{\"platformType\":\"AKS-HCI\",\"versionState\":\"ValidationFailed\",\"minimumPlatformSoftwareVersion\":\"hreagk\",\"maximumPlatformSoftwareVersion\":\"xv\",\"recommendedVersion\":\"NotRecommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"sulmd\",\"glmep\",\"pfseykgs\"]}]},\"id\":\"gpszngafpg\",\"name\":\"lkvec\",\"type\":\"ujcngo\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PacketCoreControlPlaneVersion response = manager.packetCoreControlPlaneVersions() + .getBySubscriptionWithResponse("oaiknaqlnuwig", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(PlatformType.AKS_HCI, response.platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.VALIDATION_FAILED, response.platforms().get(0).versionState()); + Assertions.assertEquals("xzcwxhmpejt", response.platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("exaonwivkcq", response.platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.RECOMMENDED, response.platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, response.platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("lccrmmkyupi", response.platforms().get(0).haUpgradesAvailable().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetWithResponseMockTests.java new file mode 100644 index 000000000000..83ae29f06996 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetWithResponseMockTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.ObsoleteVersion; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersion; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.RecommendedVersion; +import com.azure.resourcemanager.mobilenetwork.models.VersionState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCoreControlPlaneVersionsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Failed\",\"platforms\":[{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"Active\",\"minimumPlatformSoftwareVersion\":\"nlejjjkxybwf\",\"maximumPlatformSoftwareVersion\":\"kjbztensvkzykj\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"wushcdp\",\"upnqrmgjfb\",\"kuwxeoiojfizfavk\"]},{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"ValidationFailed\",\"minimumPlatformSoftwareVersion\":\"yay\",\"maximumPlatformSoftwareVersion\":\"mfzsbf\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"ewsrsxkrplbjaze\"]},{\"platformType\":\"AKS-HCI\",\"versionState\":\"Deprecated\",\"minimumPlatformSoftwareVersion\":\"oypsuhbrnnhj\",\"maximumPlatformSoftwareVersion\":\"qwjhqkbiwetpozyc\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"fsetz\",\"e\",\"bsfledynojpziu\",\"fbzkk\"]}]},\"id\":\"nhqs\",\"name\":\"cljse\",\"type\":\"pkpbafvafhlbylcc\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PacketCoreControlPlaneVersion response = manager.packetCoreControlPlaneVersions() + .getWithResponse("xeslkhhustcpoqm", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(PlatformType.THREE_P_AZURE_STACK_HCI, response.platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.ACTIVE, response.platforms().get(0).versionState()); + Assertions.assertEquals("nlejjjkxybwf", response.platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("kjbztensvkzykj", response.platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.RECOMMENDED, response.platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.NOT_OBSOLETE, response.platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("wushcdp", response.platforms().get(0).haUpgradesAvailable().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionMockTests.java new file mode 100644 index 000000000000..3fba3b31e74c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionMockTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.ObsoleteVersion; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersion; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.RecommendedVersion; +import com.azure.resourcemanager.mobilenetwork.models.VersionState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCoreControlPlaneVersionsListBySubscriptionMockTests { + @Test + public void testListBySubscription() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"platforms\":[{\"platformType\":\"AKS-HCI\",\"versionState\":\"ValidationFailed\",\"minimumPlatformSoftwareVersion\":\"foknubnoitp\",\"maximumPlatformSoftwareVersion\":\"ztrgdgxvcoq\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"xpqitweialwvs\"]}]},\"id\":\"uhz\",\"name\":\"caqt\",\"type\":\"ltcoqc\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.packetCoreControlPlaneVersions().listBySubscription(com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PlatformType.AKS_HCI, response.iterator().next().platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.VALIDATION_FAILED, + response.iterator().next().platforms().get(0).versionState()); + Assertions.assertEquals("foknubnoitp", + response.iterator().next().platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("ztrgdgxvcoq", + response.iterator().next().platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.RECOMMENDED, + response.iterator().next().platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, + response.iterator().next().platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("xpqitweialwvs", + response.iterator().next().platforms().get(0).haUpgradesAvailable().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListMockTests.java new file mode 100644 index 000000000000..aba7acade097 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListMockTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.ObsoleteVersion; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersion; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.RecommendedVersion; +import com.azure.resourcemanager.mobilenetwork.models.VersionState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCoreControlPlaneVersionsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"platforms\":[{\"platformType\":\"AKS-HCI\",\"versionState\":\"Preview\",\"minimumPlatformSoftwareVersion\":\"wrso\",\"maximumPlatformSoftwareVersion\":\"ltdb\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"hfnrac\"]},{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"Validating\",\"minimumPlatformSoftwareVersion\":\"tuujwouh\",\"maximumPlatformSoftwareVersion\":\"wsigrbjbxsj\",\"recommendedVersion\":\"NotRecommended\",\"obsoleteVersion\":\"NotObsolete\",\"haUpgradesAvailable\":[\"kjyaznumtg\"]}]},\"id\":\"uwdchozf\",\"name\":\"kfexlv\",\"type\":\"noakiz\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.packetCoreControlPlaneVersions().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PlatformType.AKS_HCI, response.iterator().next().platforms().get(0).platformType()); + Assertions.assertEquals(VersionState.PREVIEW, response.iterator().next().platforms().get(0).versionState()); + Assertions.assertEquals("wrso", response.iterator().next().platforms().get(0).minimumPlatformSoftwareVersion()); + Assertions.assertEquals("ltdb", response.iterator().next().platforms().get(0).maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.RECOMMENDED, + response.iterator().next().platforms().get(0).recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.NOT_OBSOLETE, + response.iterator().next().platforms().get(0).obsoleteVersion()); + Assertions.assertEquals("hfnrac", response.iterator().next().platforms().get(0).haUpgradesAvailable().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteMockTests.java new file mode 100644 index 000000000000..e590fddcd3ed --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCoreControlPlanesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.packetCoreControlPlanes().delete("cnjrohmbpyryxame", "l", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlaneInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlaneInnerTests.java new file mode 100644 index 000000000000..7061290cb732 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlaneInnerTests.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class PacketCoreDataPlaneInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCoreDataPlaneInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Failed\",\"userPlaneAccessInterface\":{\"name\":\"enwabfatk\",\"ipv4Address\":\"dxbjhwuaanozj\",\"ipv4Subnet\":\"ph\",\"ipv4Gateway\":\"ulpjr\",\"vlanId\":326673667,\"ipv4AddressList\":[\"rvimjwosytxitcsk\"],\"bfdIpv4Endpoints\":[\"tq\"]},\"userPlaneAccessVirtualIpv4Addresses\":[\"ekkezzikhlyfjh\",\"gqggebdunygae\"]},\"location\":\"db\",\"tags\":{\"xllrxcyjm\":\"t\",\"su\":\"a\"},\"id\":\"arm\",\"name\":\"wdmjsjqbjhhyx\",\"type\":\"rw\"}") + .toObject(PacketCoreDataPlaneInner.class); + Assertions.assertEquals("db", model.location()); + Assertions.assertEquals("t", model.tags().get("xllrxcyjm")); + Assertions.assertEquals("enwabfatk", model.userPlaneAccessInterface().name()); + Assertions.assertEquals("dxbjhwuaanozj", model.userPlaneAccessInterface().ipv4Address()); + Assertions.assertEquals("ph", model.userPlaneAccessInterface().ipv4Subnet()); + Assertions.assertEquals("ulpjr", model.userPlaneAccessInterface().ipv4Gateway()); + Assertions.assertEquals(326673667, model.userPlaneAccessInterface().vlanId()); + Assertions.assertEquals("rvimjwosytxitcsk", model.userPlaneAccessInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("tq", model.userPlaneAccessInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("ekkezzikhlyfjh", model.userPlaneAccessVirtualIpv4Addresses().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCoreDataPlaneInner model = new PacketCoreDataPlaneInner().withLocation("db") + .withTags(mapOf("xllrxcyjm", "t", "su", "a")) + .withUserPlaneAccessInterface(new InterfaceProperties().withName("enwabfatk") + .withIpv4Address("dxbjhwuaanozj") + .withIpv4Subnet("ph") + .withIpv4Gateway("ulpjr") + .withVlanId(326673667) + .withIpv4AddressList(Arrays.asList("rvimjwosytxitcsk")) + .withBfdIpv4Endpoints(Arrays.asList("tq"))) + .withUserPlaneAccessVirtualIpv4Addresses(Arrays.asList("ekkezzikhlyfjh", "gqggebdunygae")); + model = BinaryData.fromObject(model).toObject(PacketCoreDataPlaneInner.class); + Assertions.assertEquals("db", model.location()); + Assertions.assertEquals("t", model.tags().get("xllrxcyjm")); + Assertions.assertEquals("enwabfatk", model.userPlaneAccessInterface().name()); + Assertions.assertEquals("dxbjhwuaanozj", model.userPlaneAccessInterface().ipv4Address()); + Assertions.assertEquals("ph", model.userPlaneAccessInterface().ipv4Subnet()); + Assertions.assertEquals("ulpjr", model.userPlaneAccessInterface().ipv4Gateway()); + Assertions.assertEquals(326673667, model.userPlaneAccessInterface().vlanId()); + Assertions.assertEquals("rvimjwosytxitcsk", model.userPlaneAccessInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("tq", model.userPlaneAccessInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("ekkezzikhlyfjh", model.userPlaneAccessVirtualIpv4Addresses().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlaneListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlaneListResultTests.java new file mode 100644 index 000000000000..b688ac349e3f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlaneListResultTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlaneListResult; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class PacketCoreDataPlaneListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCoreDataPlaneListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"userPlaneAccessInterface\":{\"name\":\"ytdw\",\"ipv4Address\":\"brqubp\",\"ipv4Subnet\":\"h\",\"ipv4Gateway\":\"iilivpdtiirqtd\",\"vlanId\":887642500,\"ipv4AddressList\":[\"r\",\"zfgs\",\"uyfxrxxleptramxj\",\"zwl\"],\"bfdIpv4Endpoints\":[\"xuqlcvydypat\",\"ooaojkniodkooebw\",\"ujhemmsbvdkcrodt\",\"infwjlfltkacjve\"]},\"userPlaneAccessVirtualIpv4Addresses\":[\"lfoakg\",\"kfpagao\",\"pulpqblylsyxk\"]},\"location\":\"nsj\",\"tags\":{\"dszue\":\"tiagx\"},\"id\":\"psbzkfzbeyvpn\",\"name\":\"icvi\",\"type\":\"v\"}],\"nextLink\":\"jxdxrbuukz\"}") + .toObject(PacketCoreDataPlaneListResult.class); + Assertions.assertEquals("nsj", model.value().get(0).location()); + Assertions.assertEquals("tiagx", model.value().get(0).tags().get("dszue")); + Assertions.assertEquals("ytdw", model.value().get(0).userPlaneAccessInterface().name()); + Assertions.assertEquals("brqubp", model.value().get(0).userPlaneAccessInterface().ipv4Address()); + Assertions.assertEquals("h", model.value().get(0).userPlaneAccessInterface().ipv4Subnet()); + Assertions.assertEquals("iilivpdtiirqtd", model.value().get(0).userPlaneAccessInterface().ipv4Gateway()); + Assertions.assertEquals(887642500, model.value().get(0).userPlaneAccessInterface().vlanId()); + Assertions.assertEquals("r", model.value().get(0).userPlaneAccessInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("xuqlcvydypat", + model.value().get(0).userPlaneAccessInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("lfoakg", model.value().get(0).userPlaneAccessVirtualIpv4Addresses().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCoreDataPlaneListResult model + = new PacketCoreDataPlaneListResult() + .withValue( + Arrays.asList(new PacketCoreDataPlaneInner().withLocation("nsj") + .withTags(mapOf("dszue", "tiagx")) + .withUserPlaneAccessInterface(new InterfaceProperties().withName("ytdw") + .withIpv4Address("brqubp") + .withIpv4Subnet("h") + .withIpv4Gateway("iilivpdtiirqtd") + .withVlanId(887642500) + .withIpv4AddressList(Arrays.asList("r", "zfgs", "uyfxrxxleptramxj", "zwl")) + .withBfdIpv4Endpoints(Arrays.asList("xuqlcvydypat", "ooaojkniodkooebw", "ujhemmsbvdkcrodt", + "infwjlfltkacjve"))) + .withUserPlaneAccessVirtualIpv4Addresses(Arrays.asList("lfoakg", "kfpagao", "pulpqblylsyxk")))); + model = BinaryData.fromObject(model).toObject(PacketCoreDataPlaneListResult.class); + Assertions.assertEquals("nsj", model.value().get(0).location()); + Assertions.assertEquals("tiagx", model.value().get(0).tags().get("dszue")); + Assertions.assertEquals("ytdw", model.value().get(0).userPlaneAccessInterface().name()); + Assertions.assertEquals("brqubp", model.value().get(0).userPlaneAccessInterface().ipv4Address()); + Assertions.assertEquals("h", model.value().get(0).userPlaneAccessInterface().ipv4Subnet()); + Assertions.assertEquals("iilivpdtiirqtd", model.value().get(0).userPlaneAccessInterface().ipv4Gateway()); + Assertions.assertEquals(887642500, model.value().get(0).userPlaneAccessInterface().vlanId()); + Assertions.assertEquals("r", model.value().get(0).userPlaneAccessInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("xuqlcvydypat", + model.value().get(0).userPlaneAccessInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("lfoakg", model.value().get(0).userPlaneAccessVirtualIpv4Addresses().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanePropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanePropertiesFormatTests.java new file mode 100644 index 000000000000..b894ab2017c4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanePropertiesFormatTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreDataPlanePropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PacketCoreDataPlanePropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PacketCoreDataPlanePropertiesFormat model = BinaryData.fromString( + "{\"provisioningState\":\"Canceled\",\"userPlaneAccessInterface\":{\"name\":\"duhpk\",\"ipv4Address\":\"gymare\",\"ipv4Subnet\":\"ajxq\",\"ipv4Gateway\":\"jhkycub\",\"vlanId\":1237082530,\"ipv4AddressList\":[\"sofwqmzqalkrmnji\",\"pxacqqudfn\",\"yxbaaabjyvayf\"],\"bfdIpv4Endpoints\":[\"rzrtuzqogsex\"]},\"userPlaneAccessVirtualIpv4Addresses\":[\"fdnw\",\"wmewzsyy\",\"euzsoi\",\"judpfrxt\"]}") + .toObject(PacketCoreDataPlanePropertiesFormat.class); + Assertions.assertEquals("duhpk", model.userPlaneAccessInterface().name()); + Assertions.assertEquals("gymare", model.userPlaneAccessInterface().ipv4Address()); + Assertions.assertEquals("ajxq", model.userPlaneAccessInterface().ipv4Subnet()); + Assertions.assertEquals("jhkycub", model.userPlaneAccessInterface().ipv4Gateway()); + Assertions.assertEquals(1237082530, model.userPlaneAccessInterface().vlanId()); + Assertions.assertEquals("sofwqmzqalkrmnji", model.userPlaneAccessInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("rzrtuzqogsex", model.userPlaneAccessInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("fdnw", model.userPlaneAccessVirtualIpv4Addresses().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PacketCoreDataPlanePropertiesFormat model = new PacketCoreDataPlanePropertiesFormat() + .withUserPlaneAccessInterface(new InterfaceProperties().withName("duhpk") + .withIpv4Address("gymare") + .withIpv4Subnet("ajxq") + .withIpv4Gateway("jhkycub") + .withVlanId(1237082530) + .withIpv4AddressList(Arrays.asList("sofwqmzqalkrmnji", "pxacqqudfn", "yxbaaabjyvayf")) + .withBfdIpv4Endpoints(Arrays.asList("rzrtuzqogsex"))) + .withUserPlaneAccessVirtualIpv4Addresses(Arrays.asList("fdnw", "wmewzsyy", "euzsoi", "judpfrxt")); + model = BinaryData.fromObject(model).toObject(PacketCoreDataPlanePropertiesFormat.class); + Assertions.assertEquals("duhpk", model.userPlaneAccessInterface().name()); + Assertions.assertEquals("gymare", model.userPlaneAccessInterface().ipv4Address()); + Assertions.assertEquals("ajxq", model.userPlaneAccessInterface().ipv4Subnet()); + Assertions.assertEquals("jhkycub", model.userPlaneAccessInterface().ipv4Gateway()); + Assertions.assertEquals(1237082530, model.userPlaneAccessInterface().vlanId()); + Assertions.assertEquals("sofwqmzqalkrmnji", model.userPlaneAccessInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("rzrtuzqogsex", model.userPlaneAccessInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("fdnw", model.userPlaneAccessVirtualIpv4Addresses().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..92741d514d1b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateMockTests.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlane; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCoreDataPlanesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"userPlaneAccessInterface\":{\"name\":\"bctvivuzqym\",\"ipv4Address\":\"owog\",\"ipv4Subnet\":\"it\",\"ipv4Gateway\":\"hzvb\",\"vlanId\":591890570,\"ipv4AddressList\":[\"anfzndscxmxeatk\"],\"bfdIpv4Endpoints\":[\"wnrdjyibqbnaom\",\"jrmkuhmaxljalf\"]},\"userPlaneAccessVirtualIpv4Addresses\":[\"jmobca\",\"cd\",\"xxqcwgaxf\"]},\"location\":\"aknokzwjjzrl\",\"tags\":{\"zyyfy\":\"l\",\"jivyqlkjuv\":\"pqsixymmp\",\"zdbpqv\":\"mbmslzoyov\",\"kcvtl\":\"befgvmxn\"},\"id\":\"bse\",\"name\":\"kvcuartrhunl\",\"type\":\"iryky\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PacketCoreDataPlane response = manager.packetCoreDataPlanes() + .define("lxeehuxiq") + .withRegion("fytoi") + .withExistingPacketCoreControlPlane("jpnwynudql", "zsauzp") + .withUserPlaneAccessInterface(new InterfaceProperties().withName("aymezx") + .withIpv4Address("kihmxrfdsajredn") + .withIpv4Subnet("yshtuwgmev") + .withIpv4Gateway("fpwzyifrkgwltx") + .withVlanId(1848088560) + .withIpv4AddressList(Arrays.asList("gzdyimsfayorp", "avkjog", "sl", "bnsmjkwynqxaek")) + .withBfdIpv4Endpoints( + Arrays.asList("kvwjtqpkevmy", "tjcrspxklurccl", "gxannnoytzposewx", "gpxvkqmaupxvpi"))) + .withTags(mapOf("rxwe", "ygvfltgvdihoyn", "cy", "wkd", "dnaienhqhskndnel", "ucpcunnuzdqumoen", + "lknwfoanniyop", "kaa")) + .withUserPlaneAccessVirtualIpv4Addresses(Arrays.asList("aifyzyzeyuubeids")) + .create(); + + Assertions.assertEquals("aknokzwjjzrl", response.location()); + Assertions.assertEquals("l", response.tags().get("zyyfy")); + Assertions.assertEquals("bctvivuzqym", response.userPlaneAccessInterface().name()); + Assertions.assertEquals("owog", response.userPlaneAccessInterface().ipv4Address()); + Assertions.assertEquals("it", response.userPlaneAccessInterface().ipv4Subnet()); + Assertions.assertEquals("hzvb", response.userPlaneAccessInterface().ipv4Gateway()); + Assertions.assertEquals(591890570, response.userPlaneAccessInterface().vlanId()); + Assertions.assertEquals("anfzndscxmxeatk", response.userPlaneAccessInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("wnrdjyibqbnaom", response.userPlaneAccessInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("jmobca", response.userPlaneAccessVirtualIpv4Addresses().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteMockTests.java new file mode 100644 index 000000000000..5aed35798d0a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCoreDataPlanesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.packetCoreDataPlanes().delete("jpds", "zakuejk", "vbiztjofqcv", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetWithResponseMockTests.java new file mode 100644 index 000000000000..82ef92f21c27 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetWithResponseMockTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlane; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCoreDataPlanesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"userPlaneAccessInterface\":{\"name\":\"dawlpjfelqerpp\",\"ipv4Address\":\"bgqnz\",\"ipv4Subnet\":\"h\",\"ipv4Gateway\":\"lialwcjgckbbcccg\",\"vlanId\":183837166,\"ipv4AddressList\":[\"xnyuffatsgftipwc\",\"byubhiqdxyurnpn\",\"hza\"],\"bfdIpv4Endpoints\":[\"nuhiig\",\"yl\",\"ui\",\"vxva\"]},\"userPlaneAccessVirtualIpv4Addresses\":[\"rkdlb\",\"bqxvhcsyhzlwxae\"]},\"location\":\"vurex\",\"tags\":{\"pag\":\"sbdweaderzmwnt\"},\"id\":\"tmvmmagoaqylkjz\",\"name\":\"jiuazjc\",\"type\":\"mxitpfinzcpd\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PacketCoreDataPlane response = manager.packetCoreDataPlanes() + .getWithResponse("vjufycsjmlbe", "yeji", "iuxegth", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("vurex", response.location()); + Assertions.assertEquals("sbdweaderzmwnt", response.tags().get("pag")); + Assertions.assertEquals("dawlpjfelqerpp", response.userPlaneAccessInterface().name()); + Assertions.assertEquals("bgqnz", response.userPlaneAccessInterface().ipv4Address()); + Assertions.assertEquals("h", response.userPlaneAccessInterface().ipv4Subnet()); + Assertions.assertEquals("lialwcjgckbbcccg", response.userPlaneAccessInterface().ipv4Gateway()); + Assertions.assertEquals(183837166, response.userPlaneAccessInterface().vlanId()); + Assertions.assertEquals("xnyuffatsgftipwc", response.userPlaneAccessInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("nuhiig", response.userPlaneAccessInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("rkdlb", response.userPlaneAccessVirtualIpv4Addresses().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneMockTests.java new file mode 100644 index 000000000000..41b78817c17d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneMockTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlane; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PacketCoreDataPlanesListByPacketCoreControlPlaneMockTests { + @Test + public void testListByPacketCoreControlPlane() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"userPlaneAccessInterface\":{\"name\":\"eqdurelyujlfyoum\",\"ipv4Address\":\"kyeclcdigpta\",\"ipv4Subnet\":\"rzmq\",\"ipv4Gateway\":\"cycijoclxiut\",\"vlanId\":1338234971,\"ipv4AddressList\":[\"yzjdnrqjbt\"],\"bfdIpv4Endpoints\":[\"aoqaqbzgyhfwwv\",\"atbwbqam\",\"e\"]},\"userPlaneAccessVirtualIpv4Addresses\":[\"yslpkcvmw\",\"auxxepmyw\",\"ormcqmic\",\"ijqpkzfbojxjmcs\"]},\"location\":\"qwixvcpwnk\",\"tags\":{\"uoiqt\":\"zwofalick\",\"vsknxrwzawnv\":\"mt\",\"ycvdimw\":\"bcfhzagxnv\",\"ryekzkd\":\"zregzgyufutrwpw\"},\"id\":\"meottawj\",\"name\":\"osxw\",\"type\":\"hnhjtfvpndpmi\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.packetCoreDataPlanes() + .listByPacketCoreControlPlane("tkrlgjmtbd", "vcqguefzh", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qwixvcpwnk", response.iterator().next().location()); + Assertions.assertEquals("zwofalick", response.iterator().next().tags().get("uoiqt")); + Assertions.assertEquals("eqdurelyujlfyoum", response.iterator().next().userPlaneAccessInterface().name()); + Assertions.assertEquals("kyeclcdigpta", response.iterator().next().userPlaneAccessInterface().ipv4Address()); + Assertions.assertEquals("rzmq", response.iterator().next().userPlaneAccessInterface().ipv4Subnet()); + Assertions.assertEquals("cycijoclxiut", response.iterator().next().userPlaneAccessInterface().ipv4Gateway()); + Assertions.assertEquals(1338234971, response.iterator().next().userPlaneAccessInterface().vlanId()); + Assertions.assertEquals("yzjdnrqjbt", + response.iterator().next().userPlaneAccessInterface().ipv4AddressList().get(0)); + Assertions.assertEquals("aoqaqbzgyhfwwv", + response.iterator().next().userPlaneAccessInterface().bfdIpv4Endpoints().get(0)); + Assertions.assertEquals("yslpkcvmw", response.iterator().next().userPlaneAccessVirtualIpv4Addresses().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PccRuleConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PccRuleConfigurationTests.java new file mode 100644 index 000000000000..d11e9c7d0896 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PccRuleConfigurationTests.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleQosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.ServiceDataFlowTemplate; +import com.azure.resourcemanager.mobilenetwork.models.TrafficControlPermission; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PccRuleConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PccRuleConfiguration model = BinaryData.fromString( + "{\"ruleName\":\"ujrywvtyl\",\"rulePrecedence\":2136343303,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"curdoiwiitht\",\"downlink\":\"wubxc\"},\"5qi\":40609312,\"allocationAndRetentionPriorityLevel\":1077701136,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"ntwjch\",\"downlink\":\"dgoihxumwctondzj\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"fdlwg\",\"direction\":\"Downlink\",\"protocol\":[\"sb\",\"tov\",\"tgseinqfiufxqkn\"],\"remoteIpList\":[\"rgnepttwqmsniffc\",\"mqnrojlpijnkr\"],\"ports\":[\"ddhcratizzr\"]},{\"templateName\":\"nasx\",\"direction\":\"Uplink\",\"protocol\":[\"ozqyzh\",\"tw\",\"sgogczhonnxk\",\"lgnyhmo\"],\"remoteIpList\":[\"xkk\",\"thrrgh\"],\"ports\":[\"dhqxvcx\",\"frpdsofbshrns\",\"buswdvzyy\"]},{\"templateName\":\"ycnunvjsrtk\",\"direction\":\"Downlink\",\"protocol\":[\"nopqgikyzirtx\",\"yuxzejntpsewgi\",\"ilqu\",\"rydxtqm\"],\"remoteIpList\":[\"ox\",\"rgguf\",\"yaomtb\",\"hhavgrvkffovjz\"],\"ports\":[\"bibgjmfxumv\",\"cluyovwxnbkf\"]}]}") + .toObject(PccRuleConfiguration.class); + Assertions.assertEquals("ujrywvtyl", model.ruleName()); + Assertions.assertEquals(2136343303, model.rulePrecedence()); + Assertions.assertEquals(40609312, model.ruleQosPolicy().fiveQi()); + Assertions.assertEquals(1077701136, model.ruleQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, model.ruleQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, model.ruleQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("ntwjch", model.ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("dgoihxumwctondzj", model.ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("curdoiwiitht", model.ruleQosPolicy().guaranteedBitRate().uplink()); + Assertions.assertEquals("wubxc", model.ruleQosPolicy().guaranteedBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.ENABLED, model.trafficControl()); + Assertions.assertEquals("fdlwg", model.serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.DOWNLINK, model.serviceDataFlowTemplates().get(0).direction()); + Assertions.assertEquals("sb", model.serviceDataFlowTemplates().get(0).protocol().get(0)); + Assertions.assertEquals("rgnepttwqmsniffc", model.serviceDataFlowTemplates().get(0).remoteIpList().get(0)); + Assertions.assertEquals("ddhcratizzr", model.serviceDataFlowTemplates().get(0).ports().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PccRuleConfiguration model = new PccRuleConfiguration().withRuleName("ujrywvtyl") + .withRulePrecedence(2136343303) + .withRuleQosPolicy(new PccRuleQosPolicy().withFiveQi(40609312) + .withAllocationAndRetentionPriorityLevel(1077701136) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("ntwjch").withDownlink("dgoihxumwctondzj")) + .withGuaranteedBitRate(new Ambr().withUplink("curdoiwiitht").withDownlink("wubxc"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("fdlwg") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList("sb", "tov", "tgseinqfiufxqkn")) + .withRemoteIpList(Arrays.asList("rgnepttwqmsniffc", "mqnrojlpijnkr")) + .withPorts(Arrays.asList("ddhcratizzr")), + new ServiceDataFlowTemplate().withTemplateName("nasx") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList("ozqyzh", "tw", "sgogczhonnxk", "lgnyhmo")) + .withRemoteIpList(Arrays.asList("xkk", "thrrgh")) + .withPorts(Arrays.asList("dhqxvcx", "frpdsofbshrns", "buswdvzyy")), + new ServiceDataFlowTemplate().withTemplateName("ycnunvjsrtk") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList("nopqgikyzirtx", "yuxzejntpsewgi", "ilqu", "rydxtqm")) + .withRemoteIpList(Arrays.asList("ox", "rgguf", "yaomtb", "hhavgrvkffovjz")) + .withPorts(Arrays.asList("bibgjmfxumv", "cluyovwxnbkf")))); + model = BinaryData.fromObject(model).toObject(PccRuleConfiguration.class); + Assertions.assertEquals("ujrywvtyl", model.ruleName()); + Assertions.assertEquals(2136343303, model.rulePrecedence()); + Assertions.assertEquals(40609312, model.ruleQosPolicy().fiveQi()); + Assertions.assertEquals(1077701136, model.ruleQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, model.ruleQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, model.ruleQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("ntwjch", model.ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("dgoihxumwctondzj", model.ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("curdoiwiitht", model.ruleQosPolicy().guaranteedBitRate().uplink()); + Assertions.assertEquals("wubxc", model.ruleQosPolicy().guaranteedBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.ENABLED, model.trafficControl()); + Assertions.assertEquals("fdlwg", model.serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.DOWNLINK, model.serviceDataFlowTemplates().get(0).direction()); + Assertions.assertEquals("sb", model.serviceDataFlowTemplates().get(0).protocol().get(0)); + Assertions.assertEquals("rgnepttwqmsniffc", model.serviceDataFlowTemplates().get(0).remoteIpList().get(0)); + Assertions.assertEquals("ddhcratizzr", model.serviceDataFlowTemplates().get(0).ports().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PccRuleQosPolicyTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PccRuleQosPolicyTests.java new file mode 100644 index 000000000000..551cf988718e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PccRuleQosPolicyTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleQosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import org.junit.jupiter.api.Assertions; + +public final class PccRuleQosPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PccRuleQosPolicy model = BinaryData.fromString( + "{\"guaranteedBitRate\":{\"uplink\":\"zxscyhwzdgirujb\",\"downlink\":\"bomvzzbtdcqv\"},\"5qi\":1569127875,\"allocationAndRetentionPriorityLevel\":850066644,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"l\",\"downlink\":\"dshf\"}}") + .toObject(PccRuleQosPolicy.class); + Assertions.assertEquals(1569127875, model.fiveQi()); + Assertions.assertEquals(850066644, model.allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, model.preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, model.preemptionVulnerability()); + Assertions.assertEquals("l", model.maximumBitRate().uplink()); + Assertions.assertEquals("dshf", model.maximumBitRate().downlink()); + Assertions.assertEquals("zxscyhwzdgirujb", model.guaranteedBitRate().uplink()); + Assertions.assertEquals("bomvzzbtdcqv", model.guaranteedBitRate().downlink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PccRuleQosPolicy model = new PccRuleQosPolicy().withFiveQi(1569127875) + .withAllocationAndRetentionPriorityLevel(850066644) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("l").withDownlink("dshf")) + .withGuaranteedBitRate(new Ambr().withUplink("zxscyhwzdgirujb").withDownlink("bomvzzbtdcqv")); + model = BinaryData.fromObject(model).toObject(PccRuleQosPolicy.class); + Assertions.assertEquals(1569127875, model.fiveQi()); + Assertions.assertEquals(850066644, model.allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, model.preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, model.preemptionVulnerability()); + Assertions.assertEquals("l", model.maximumBitRate().uplink()); + Assertions.assertEquals("dshf", model.maximumBitRate().downlink()); + Assertions.assertEquals("zxscyhwzdgirujb", model.guaranteedBitRate().uplink()); + Assertions.assertEquals("bomvzzbtdcqv", model.guaranteedBitRate().downlink()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PinholeTimeoutsTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PinholeTimeoutsTests.java new file mode 100644 index 000000000000..2658ffc2ab47 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PinholeTimeoutsTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.PinholeTimeouts; +import org.junit.jupiter.api.Assertions; + +public final class PinholeTimeoutsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PinholeTimeouts model = BinaryData.fromString("{\"tcp\":1144028813,\"udp\":429084685,\"icmp\":1137960460}") + .toObject(PinholeTimeouts.class); + Assertions.assertEquals(1144028813, model.tcp()); + Assertions.assertEquals(429084685, model.udp()); + Assertions.assertEquals(1137960460, model.icmp()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PinholeTimeouts model = new PinholeTimeouts().withTcp(1144028813).withUdp(429084685).withIcmp(1137960460); + model = BinaryData.fromObject(model).toObject(PinholeTimeouts.class); + Assertions.assertEquals(1144028813, model.tcp()); + Assertions.assertEquals(429084685, model.udp()); + Assertions.assertEquals(1137960460, model.icmp()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlatformConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlatformConfigurationTests.java new file mode 100644 index 000000000000..1396de25a09b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlatformConfigurationTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AzureStackEdgeDeviceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.AzureStackHciClusterResourceId; +import com.azure.resourcemanager.mobilenetwork.models.ConnectedClusterResourceId; +import com.azure.resourcemanager.mobilenetwork.models.CustomLocationResourceId; +import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import org.junit.jupiter.api.Assertions; + +public final class PlatformConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformConfiguration model = BinaryData.fromString( + "{\"type\":\"AKS-HCI\",\"azureStackEdgeDevice\":{\"id\":\"uhcdhm\"},\"azureStackEdgeDevices\":[{\"id\":\"laexqp\"},{\"id\":\"fadmws\"},{\"id\":\"crgvxpvgom\"},{\"id\":\"lf\"}],\"azureStackHciCluster\":{\"id\":\"sgwbnbbeld\"},\"connectedCluster\":{\"id\":\"k\"},\"customLocation\":{\"id\":\"ali\"}}") + .toObject(PlatformConfiguration.class); + Assertions.assertEquals(PlatformType.AKS_HCI, model.type()); + Assertions.assertEquals("uhcdhm", model.azureStackEdgeDevice().id()); + Assertions.assertEquals("sgwbnbbeld", model.azureStackHciCluster().id()); + Assertions.assertEquals("k", model.connectedCluster().id()); + Assertions.assertEquals("ali", model.customLocation().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PlatformConfiguration model = new PlatformConfiguration().withType(PlatformType.AKS_HCI) + .withAzureStackEdgeDevice(new AzureStackEdgeDeviceResourceId().withId("uhcdhm")) + .withAzureStackHciCluster(new AzureStackHciClusterResourceId().withId("sgwbnbbeld")) + .withConnectedCluster(new ConnectedClusterResourceId().withId("k")) + .withCustomLocation(new CustomLocationResourceId().withId("ali")); + model = BinaryData.fromObject(model).toObject(PlatformConfiguration.class); + Assertions.assertEquals(PlatformType.AKS_HCI, model.type()); + Assertions.assertEquals("uhcdhm", model.azureStackEdgeDevice().id()); + Assertions.assertEquals("sgwbnbbeld", model.azureStackHciCluster().id()); + Assertions.assertEquals("k", model.connectedCluster().id()); + Assertions.assertEquals("ali", model.customLocation().id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlatformTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlatformTests.java new file mode 100644 index 000000000000..de0fa47330b2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlatformTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.ObsoleteVersion; +import com.azure.resourcemanager.mobilenetwork.models.Platform; +import com.azure.resourcemanager.mobilenetwork.models.PlatformType; +import com.azure.resourcemanager.mobilenetwork.models.RecommendedVersion; +import com.azure.resourcemanager.mobilenetwork.models.VersionState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PlatformTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Platform model = BinaryData.fromString( + "{\"platformType\":\"3P-AZURE-STACK-HCI\",\"versionState\":\"Validating\",\"minimumPlatformSoftwareVersion\":\"ijfqkacewiipfp\",\"maximumPlatformSoftwareVersion\":\"ji\",\"recommendedVersion\":\"Recommended\",\"obsoleteVersion\":\"Obsolete\",\"haUpgradesAvailable\":[\"hqkvpuvksgplsak\",\"ynfs\",\"n\",\"jphuopxodlqi\"]}") + .toObject(Platform.class); + Assertions.assertEquals(PlatformType.THREE_P_AZURE_STACK_HCI, model.platformType()); + Assertions.assertEquals(VersionState.VALIDATING, model.versionState()); + Assertions.assertEquals("ijfqkacewiipfp", model.minimumPlatformSoftwareVersion()); + Assertions.assertEquals("ji", model.maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.RECOMMENDED, model.recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, model.obsoleteVersion()); + Assertions.assertEquals("hqkvpuvksgplsak", model.haUpgradesAvailable().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Platform model = new Platform().withPlatformType(PlatformType.THREE_P_AZURE_STACK_HCI) + .withVersionState(VersionState.VALIDATING) + .withMinimumPlatformSoftwareVersion("ijfqkacewiipfp") + .withMaximumPlatformSoftwareVersion("ji") + .withRecommendedVersion(RecommendedVersion.RECOMMENDED) + .withObsoleteVersion(ObsoleteVersion.OBSOLETE) + .withHaUpgradesAvailable(Arrays.asList("hqkvpuvksgplsak", "ynfs", "n", "jphuopxodlqi")); + model = BinaryData.fromObject(model).toObject(Platform.class); + Assertions.assertEquals(PlatformType.THREE_P_AZURE_STACK_HCI, model.platformType()); + Assertions.assertEquals(VersionState.VALIDATING, model.versionState()); + Assertions.assertEquals("ijfqkacewiipfp", model.minimumPlatformSoftwareVersion()); + Assertions.assertEquals("ji", model.maximumPlatformSoftwareVersion()); + Assertions.assertEquals(RecommendedVersion.RECOMMENDED, model.recommendedVersion()); + Assertions.assertEquals(ObsoleteVersion.OBSOLETE, model.obsoleteVersion()); + Assertions.assertEquals("hqkvpuvksgplsak", model.haUpgradesAvailable().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlmnIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlmnIdTests.java new file mode 100644 index 000000000000..1fe37839a7b2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PlmnIdTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import org.junit.jupiter.api.Assertions; + +public final class PlmnIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlmnId model = BinaryData.fromString("{\"mcc\":\"ehxnltyfsop\",\"mnc\":\"usue\"}").toObject(PlmnId.class); + Assertions.assertEquals("ehxnltyfsop", model.mcc()); + Assertions.assertEquals("usue", model.mnc()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PlmnId model = new PlmnId().withMcc("ehxnltyfsop").withMnc("usue"); + model = BinaryData.fromObject(model).toObject(PlmnId.class); + Assertions.assertEquals("ehxnltyfsop", model.mcc()); + Assertions.assertEquals("usue", model.mnc()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PortRangeTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PortRangeTests.java new file mode 100644 index 000000000000..8ea53da1f3b3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PortRangeTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.PortRange; +import org.junit.jupiter.api.Assertions; + +public final class PortRangeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PortRange model + = BinaryData.fromString("{\"minPort\":1450432721,\"maxPort\":1530714284}").toObject(PortRange.class); + Assertions.assertEquals(1450432721, model.minPort()); + Assertions.assertEquals(1530714284, model.maxPort()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PortRange model = new PortRange().withMinPort(1450432721).withMaxPort(1530714284); + model = BinaryData.fromObject(model).toObject(PortRange.class); + Assertions.assertEquals(1450432721, model.minPort()); + Assertions.assertEquals(1530714284, model.maxPort()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PortReuseHoldTimesTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PortReuseHoldTimesTests.java new file mode 100644 index 000000000000..3053820e4a1f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PortReuseHoldTimesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.PortReuseHoldTimes; +import org.junit.jupiter.api.Assertions; + +public final class PortReuseHoldTimesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PortReuseHoldTimes model + = BinaryData.fromString("{\"tcp\":1977100929,\"udp\":1527303417}").toObject(PortReuseHoldTimes.class); + Assertions.assertEquals(1977100929, model.tcp()); + Assertions.assertEquals(1527303417, model.udp()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PortReuseHoldTimes model = new PortReuseHoldTimes().withTcp(1977100929).withUdp(1527303417); + model = BinaryData.fromObject(model).toObject(PortReuseHoldTimes.class); + Assertions.assertEquals(1977100929, model.tcp()); + Assertions.assertEquals(1527303417, model.udp()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PublicLandMobileNetworkHomeNetworkPublicKeysTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PublicLandMobileNetworkHomeNetworkPublicKeysTests.java new file mode 100644 index 000000000000..e1096e013bb0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/PublicLandMobileNetworkHomeNetworkPublicKeysTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.HomeNetworkPublicKey; +import com.azure.resourcemanager.mobilenetwork.models.PublicLandMobileNetworkHomeNetworkPublicKeys; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PublicLandMobileNetworkHomeNetworkPublicKeysTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublicLandMobileNetworkHomeNetworkPublicKeys model = BinaryData.fromString( + "{\"profileA\":[{\"id\":662259969,\"url\":\"yk\"},{\"id\":1047075786,\"url\":\"n\"},{\"id\":1631259925,\"url\":\"yexfwh\"}],\"profileB\":[{\"id\":148650220,\"url\":\"vyvdcs\"},{\"id\":1668619152,\"url\":\"nnaamdectehfiqsc\"},{\"id\":478088047,\"url\":\"pvhez\"},{\"id\":902064602,\"url\":\"q\"}]}") + .toObject(PublicLandMobileNetworkHomeNetworkPublicKeys.class); + Assertions.assertEquals(662259969, model.profileA().get(0).id()); + Assertions.assertEquals("yk", model.profileA().get(0).url()); + Assertions.assertEquals(148650220, model.profileB().get(0).id()); + Assertions.assertEquals("vyvdcs", model.profileB().get(0).url()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PublicLandMobileNetworkHomeNetworkPublicKeys model = new PublicLandMobileNetworkHomeNetworkPublicKeys() + .withProfileA(Arrays.asList(new HomeNetworkPublicKey().withId(662259969).withUrl("yk"), + new HomeNetworkPublicKey().withId(1047075786).withUrl("n"), + new HomeNetworkPublicKey().withId(1631259925).withUrl("yexfwh"))) + .withProfileB(Arrays.asList(new HomeNetworkPublicKey().withId(148650220).withUrl("vyvdcs"), + new HomeNetworkPublicKey().withId(1668619152).withUrl("nnaamdectehfiqsc"), + new HomeNetworkPublicKey().withId(478088047).withUrl("pvhez"), + new HomeNetworkPublicKey().withId(902064602).withUrl("q"))); + model = BinaryData.fromObject(model).toObject(PublicLandMobileNetworkHomeNetworkPublicKeys.class); + Assertions.assertEquals(662259969, model.profileA().get(0).id()); + Assertions.assertEquals("yk", model.profileA().get(0).url()); + Assertions.assertEquals(148650220, model.profileB().get(0).id()); + Assertions.assertEquals("vyvdcs", model.profileB().get(0).url()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/QosPolicyTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/QosPolicyTests.java new file mode 100644 index 000000000000..f444dd52e1d2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/QosPolicyTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import org.junit.jupiter.api.Assertions; + +public final class QosPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QosPolicy model = BinaryData.fromString( + "{\"5qi\":393594783,\"allocationAndRetentionPriorityLevel\":912797424,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"bjx\",\"downlink\":\"fw\"}}") + .toObject(QosPolicy.class); + Assertions.assertEquals(393594783, model.fiveQi()); + Assertions.assertEquals(912797424, model.allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, model.preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, model.preemptionVulnerability()); + Assertions.assertEquals("bjx", model.maximumBitRate().uplink()); + Assertions.assertEquals("fw", model.maximumBitRate().downlink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + QosPolicy model = new QosPolicy().withFiveQi(393594783) + .withAllocationAndRetentionPriorityLevel(912797424) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("bjx").withDownlink("fw")); + model = BinaryData.fromObject(model).toObject(QosPolicy.class); + Assertions.assertEquals(393594783, model.fiveQi()); + Assertions.assertEquals(912797424, model.allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, model.preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, model.preemptionVulnerability()); + Assertions.assertEquals("bjx", model.maximumBitRate().uplink()); + Assertions.assertEquals("fw", model.maximumBitRate().downlink()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoListResultTests.java new file mode 100644 index 000000000000..3f0a21318bcc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoListResultTests.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoModelInner; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4Route; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4RouteNextHop; +import com.azure.resourcemanager.mobilenetwork.models.RoutingInfoListResult; +import com.azure.resourcemanager.mobilenetwork.models.UserPlaneDataRoutesItem; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RoutingInfoListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutingInfoListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"controlPlaneAccessRoutes\":[{\"destination\":\"kiidzyex\",\"nextHops\":[{}]},{\"destination\":\"ixhnrztf\",\"nextHops\":[{}]},{\"destination\":\"nxknalaulp\",\"nextHops\":[{},{},{}]},{\"destination\":\"tpnapnyiropuhpig\",\"nextHops\":[{},{},{},{}]}],\"userPlaneAccessRoutes\":[{\"destination\":\"qgitxmed\",\"nextHops\":[{}]}],\"userPlaneDataRoutes\":[{\"attachedDataNetwork\":{\"id\":\"n\"},\"routes\":[{},{},{},{}]},{\"attachedDataNetwork\":{\"id\":\"cwzzhxgktr\"},\"routes\":[{},{},{},{}]},{\"attachedDataNetwork\":{\"id\":\"napkteoellw\"},\"routes\":[{},{},{},{}]}]},\"id\":\"ygpfqb\",\"name\":\"ac\",\"type\":\"op\"},{\"properties\":{\"controlPlaneAccessRoutes\":[{\"destination\":\"hhuao\",\"nextHops\":[{},{}]},{\"destination\":\"qeqxo\",\"nextHops\":[{},{},{}]}],\"userPlaneAccessRoutes\":[{\"destination\":\"xcto\",\"nextHops\":[{},{}]},{\"destination\":\"dmoizpostmg\",\"nextHops\":[{},{},{}]}],\"userPlaneDataRoutes\":[{\"attachedDataNetwork\":{\"id\":\"rmfqjhhkxbpvj\"},\"routes\":[{},{}]},{\"attachedDataNetwork\":{\"id\":\"xxjyngudivkrtsw\"},\"routes\":[{},{}]},{\"attachedDataNetwork\":{\"id\":\"vszjfauvjfdxxi\"},\"routes\":[{}]}]},\"id\":\"t\",\"name\":\"qaqtdoqmcbxvwvxy\",\"type\":\"lqbhsf\"}],\"nextLink\":\"blytk\"}") + .toObject(RoutingInfoListResult.class); + Assertions.assertEquals("kiidzyex", model.value().get(0).controlPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("qgitxmed", model.value().get(0).userPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("n", model.value().get(0).userPlaneDataRoutes().get(0).attachedDataNetwork().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoutingInfoListResult model = new RoutingInfoListResult().withValue(Arrays.asList( + new RoutingInfoModelInner() + .withControlPlaneAccessRoutes(Arrays.asList( + new Ipv4Route().withDestination("kiidzyex").withNextHops(Arrays.asList(new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("ixhnrztf").withNextHops(Arrays.asList(new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("nxknalaulp") + .withNextHops( + Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop(), new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("tpnapnyiropuhpig") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop(), + new Ipv4RouteNextHop(), new Ipv4RouteNextHop())))) + .withUserPlaneAccessRoutes(Arrays.asList( + new Ipv4Route().withDestination("qgitxmed").withNextHops(Arrays.asList(new Ipv4RouteNextHop())))) + .withUserPlaneDataRoutes(Arrays.asList(new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("n")) + .withRoutes(Arrays.asList(new Ipv4Route(), new Ipv4Route(), new Ipv4Route(), new Ipv4Route())), + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("cwzzhxgktr")) + .withRoutes(Arrays.asList(new Ipv4Route(), new Ipv4Route(), new Ipv4Route(), new Ipv4Route())), + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("napkteoellw")) + .withRoutes( + Arrays.asList(new Ipv4Route(), new Ipv4Route(), new Ipv4Route(), new Ipv4Route())))), + new RoutingInfoModelInner() + .withControlPlaneAccessRoutes( + Arrays + .asList( + new Ipv4Route().withDestination("hhuao") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("qeqxo") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop(), + new Ipv4RouteNextHop())))) + .withUserPlaneAccessRoutes( + Arrays + .asList( + new Ipv4Route().withDestination("xcto") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("dmoizpostmg") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop(), + new Ipv4RouteNextHop())))) + .withUserPlaneDataRoutes(Arrays.asList( + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("rmfqjhhkxbpvj")) + .withRoutes(Arrays.asList(new Ipv4Route(), new Ipv4Route())), + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("xxjyngudivkrtsw")) + .withRoutes(Arrays.asList(new Ipv4Route(), new Ipv4Route())), + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("vszjfauvjfdxxi")) + .withRoutes(Arrays.asList(new Ipv4Route())))))); + model = BinaryData.fromObject(model).toObject(RoutingInfoListResult.class); + Assertions.assertEquals("kiidzyex", model.value().get(0).controlPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("qgitxmed", model.value().get(0).userPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("n", model.value().get(0).userPlaneDataRoutes().get(0).attachedDataNetwork().id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoModelInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoModelInnerTests.java new file mode 100644 index 000000000000..5e43a64fbec0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoModelInnerTests.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoModelInner; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4Route; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4RouteNextHop; +import com.azure.resourcemanager.mobilenetwork.models.UserPlaneDataRoutesItem; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RoutingInfoModelInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutingInfoModelInner model = BinaryData.fromString( + "{\"properties\":{\"controlPlaneAccessRoutes\":[{\"destination\":\"ewwwfbkrvrnsv\",\"nextHops\":[{\"address\":\"ohxcrsbfova\",\"priority\":1060545026}]}],\"userPlaneAccessRoutes\":[{\"destination\":\"bhsqfsubcgjbirxb\",\"nextHops\":[{\"address\":\"rfbjf\",\"priority\":157171235},{\"address\":\"sotftpvj\",\"priority\":1933405011}]}],\"userPlaneDataRoutes\":[{\"attachedDataNetwork\":{\"id\":\"zznfqqnvwpmqta\"},\"routes\":[{\"destination\":\"jmkcjhwqytj\",\"nextHops\":[{}]},{\"destination\":\"wj\",\"nextHops\":[{},{},{},{}]},{\"destination\":\"rjerv\",\"nextHops\":[{}]},{\"destination\":\"qp\",\"nextHops\":[{},{},{},{}]}]},{\"attachedDataNetwork\":{\"id\":\"doy\"},\"routes\":[{\"destination\":\"thnzd\",\"nextHops\":[{}]},{\"destination\":\"gnayqigynduh\",\"nextHops\":[{},{},{}]}]},{\"attachedDataNetwork\":{\"id\":\"lkthu\"},\"routes\":[{\"destination\":\"lbg\",\"nextHops\":[{},{},{}]},{\"destination\":\"iertgccymvaolp\",\"nextHops\":[{},{}]}]}]},\"id\":\"lfmmdnbbglzpswi\",\"name\":\"d\",\"type\":\"cwyhzdxssa\"}") + .toObject(RoutingInfoModelInner.class); + Assertions.assertEquals("ewwwfbkrvrnsv", model.controlPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("ohxcrsbfova", model.controlPlaneAccessRoutes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(1060545026, model.controlPlaneAccessRoutes().get(0).nextHops().get(0).priority()); + Assertions.assertEquals("bhsqfsubcgjbirxb", model.userPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("rfbjf", model.userPlaneAccessRoutes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(157171235, model.userPlaneAccessRoutes().get(0).nextHops().get(0).priority()); + Assertions.assertEquals("zznfqqnvwpmqta", model.userPlaneDataRoutes().get(0).attachedDataNetwork().id()); + Assertions.assertEquals("jmkcjhwqytj", model.userPlaneDataRoutes().get(0).routes().get(0).destination()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoutingInfoModelInner model + = new RoutingInfoModelInner() + .withControlPlaneAccessRoutes( + Arrays + .asList(new Ipv4Route().withDestination("ewwwfbkrvrnsv") + .withNextHops(Arrays + .asList(new Ipv4RouteNextHop().withAddress("ohxcrsbfova").withPriority(1060545026))))) + .withUserPlaneAccessRoutes( + Arrays.asList(new Ipv4Route().withDestination("bhsqfsubcgjbirxb") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop().withAddress("rfbjf").withPriority(157171235), + new Ipv4RouteNextHop().withAddress("sotftpvj").withPriority(1933405011))))) + .withUserPlaneDataRoutes(Arrays.asList( + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("zznfqqnvwpmqta")) + .withRoutes(Arrays.asList( + new Ipv4Route().withDestination("jmkcjhwqytj") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop())), + new Ipv4Route() + .withDestination("wj") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop(), + new Ipv4RouteNextHop(), new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("rjerv") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("qp") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop(), + new Ipv4RouteNextHop(), new Ipv4RouteNextHop())))), + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("doy")) + .withRoutes(Arrays.asList( + new Ipv4Route().withDestination("thnzd") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("gnayqigynduh") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop(), + new Ipv4RouteNextHop())))), + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("lkthu")) + .withRoutes(Arrays.asList( + new Ipv4Route().withDestination("lbg") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop(), + new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("iertgccymvaolp") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop())))))); + model = BinaryData.fromObject(model).toObject(RoutingInfoModelInner.class); + Assertions.assertEquals("ewwwfbkrvrnsv", model.controlPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("ohxcrsbfova", model.controlPlaneAccessRoutes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(1060545026, model.controlPlaneAccessRoutes().get(0).nextHops().get(0).priority()); + Assertions.assertEquals("bhsqfsubcgjbirxb", model.userPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("rfbjf", model.userPlaneAccessRoutes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(157171235, model.userPlaneAccessRoutes().get(0).nextHops().get(0).priority()); + Assertions.assertEquals("zznfqqnvwpmqta", model.userPlaneDataRoutes().get(0).attachedDataNetwork().id()); + Assertions.assertEquals("jmkcjhwqytj", model.userPlaneDataRoutes().get(0).routes().get(0).destination()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoPropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoPropertiesFormatTests.java new file mode 100644 index 000000000000..c37a55eda974 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoPropertiesFormatTests.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.RoutingInfoPropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4Route; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4RouteNextHop; +import com.azure.resourcemanager.mobilenetwork.models.UserPlaneDataRoutesItem; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RoutingInfoPropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutingInfoPropertiesFormat model = BinaryData.fromString( + "{\"controlPlaneAccessRoutes\":[{\"destination\":\"nvdfznuda\",\"nextHops\":[{\"address\":\"zbn\",\"priority\":2109510262},{\"address\":\"lpstdbhhxsrzdz\",\"priority\":241843348}]},{\"destination\":\"scdntnevf\",\"nextHops\":[{\"address\":\"ygtdsslswt\",\"priority\":478767297},{\"address\":\"iofz\",\"priority\":158092972},{\"address\":\"emwabnet\",\"priority\":1149443455},{\"address\":\"zhedplvwiw\",\"priority\":1386333367}]},{\"destination\":\"mbes\",\"nextHops\":[{\"address\":\"wwtppj\",\"priority\":799059143}]},{\"destination\":\"ogaok\",\"nextHops\":[{\"address\":\"nsikvmkqzeqqkdl\",\"priority\":228938566}]}],\"userPlaneAccessRoutes\":[{\"destination\":\"hvhgureod\",\"nextHops\":[{\"address\":\"dagxtibqd\",\"priority\":1020209011},{\"address\":\"akbogqxndlkzgxh\",\"priority\":1924988063},{\"address\":\"lbpodxunk\",\"priority\":81041412},{\"address\":\"mubyynt\",\"priority\":2007013655}]}],\"userPlaneDataRoutes\":[{\"attachedDataNetwork\":{\"id\":\"koievseo\"},\"routes\":[{\"destination\":\"l\",\"nextHops\":[{},{},{},{}]}]},{\"attachedDataNetwork\":{\"id\":\"wlauwzizxbmpg\"},\"routes\":[{\"destination\":\"u\",\"nextHops\":[{}]},{\"destination\":\"pbttdum\",\"nextHops\":[{}]},{\"destination\":\"xe\",\"nextHops\":[{},{}]}]}]}") + .toObject(RoutingInfoPropertiesFormat.class); + Assertions.assertEquals("nvdfznuda", model.controlPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("zbn", model.controlPlaneAccessRoutes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(2109510262, model.controlPlaneAccessRoutes().get(0).nextHops().get(0).priority()); + Assertions.assertEquals("hvhgureod", model.userPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("dagxtibqd", model.userPlaneAccessRoutes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(1020209011, model.userPlaneAccessRoutes().get(0).nextHops().get(0).priority()); + Assertions.assertEquals("koievseo", model.userPlaneDataRoutes().get(0).attachedDataNetwork().id()); + Assertions.assertEquals("l", model.userPlaneDataRoutes().get(0).routes().get(0).destination()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoutingInfoPropertiesFormat model = new RoutingInfoPropertiesFormat() + .withControlPlaneAccessRoutes(Arrays.asList( + new Ipv4Route().withDestination("nvdfznuda") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop().withAddress("zbn").withPriority(2109510262), + new Ipv4RouteNextHop().withAddress("lpstdbhhxsrzdz").withPriority(241843348))), + new Ipv4Route().withDestination("scdntnevf") + .withNextHops( + Arrays.asList(new Ipv4RouteNextHop().withAddress("ygtdsslswt").withPriority(478767297), + new Ipv4RouteNextHop().withAddress("iofz").withPriority(158092972), + new Ipv4RouteNextHop().withAddress("emwabnet").withPriority(1149443455), + new Ipv4RouteNextHop().withAddress("zhedplvwiw").withPriority(1386333367))), + new Ipv4Route().withDestination("mbes") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop().withAddress("wwtppj").withPriority(799059143))), + new Ipv4Route().withDestination("ogaok") + .withNextHops( + Arrays.asList(new Ipv4RouteNextHop().withAddress("nsikvmkqzeqqkdl").withPriority(228938566))))) + .withUserPlaneAccessRoutes(Arrays.asList(new Ipv4Route().withDestination("hvhgureod") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop().withAddress("dagxtibqd").withPriority(1020209011), + new Ipv4RouteNextHop().withAddress("akbogqxndlkzgxh").withPriority(1924988063), + new Ipv4RouteNextHop().withAddress("lbpodxunk").withPriority(81041412), + new Ipv4RouteNextHop().withAddress("mubyynt").withPriority(2007013655))))) + .withUserPlaneDataRoutes(Arrays.asList( + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("koievseo")) + .withRoutes(Arrays.asList(new Ipv4Route().withDestination("l") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop(), + new Ipv4RouteNextHop(), new Ipv4RouteNextHop())))), + new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("wlauwzizxbmpg")) + .withRoutes(Arrays.asList( + new Ipv4Route().withDestination("u").withNextHops(Arrays.asList(new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("pbttdum").withNextHops(Arrays.asList(new Ipv4RouteNextHop())), + new Ipv4Route().withDestination("xe") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop(), new Ipv4RouteNextHop())))))); + model = BinaryData.fromObject(model).toObject(RoutingInfoPropertiesFormat.class); + Assertions.assertEquals("nvdfznuda", model.controlPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("zbn", model.controlPlaneAccessRoutes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(2109510262, model.controlPlaneAccessRoutes().get(0).nextHops().get(0).priority()); + Assertions.assertEquals("hvhgureod", model.userPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("dagxtibqd", model.userPlaneAccessRoutes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(1020209011, model.userPlaneAccessRoutes().get(0).nextHops().get(0).priority()); + Assertions.assertEquals("koievseo", model.userPlaneDataRoutes().get(0).attachedDataNetwork().id()); + Assertions.assertEquals("l", model.userPlaneDataRoutes().get(0).routes().get(0).destination()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoesGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoesGetWithResponseMockTests.java new file mode 100644 index 000000000000..100746b196a3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoesGetWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.RoutingInfoModel; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RoutingInfoesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"controlPlaneAccessRoutes\":[{\"destination\":\"uxwigsyeipqdsm\",\"nextHops\":[{}]}],\"userPlaneAccessRoutes\":[{\"destination\":\"dgkkile\",\"nextHops\":[{},{}]},{\"destination\":\"smk\",\"nextHops\":[{},{},{},{}]},{\"destination\":\"bbaedorvvm\",\"nextHops\":[{}]}],\"userPlaneDataRoutes\":[{\"attachedDataNetwork\":{\"id\":\"bdgwumgxdgd\"},\"routes\":[{},{}]},{\"attachedDataNetwork\":{\"id\":\"gdexjd\"},\"routes\":[{},{},{},{}]},{\"attachedDataNetwork\":{\"id\":\"aqwotmmwl\"},\"routes\":[{},{},{}]},{\"attachedDataNetwork\":{\"id\":\"srsxaptefh\"},\"routes\":[{},{},{},{}]}]},\"id\":\"jokjl\",\"name\":\"nhvlqjbekp\",\"type\":\"eksnbksdqhjvyk\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + RoutingInfoModel response = manager.routingInfoes() + .getWithResponse("ivzrrryveimipsk", "yzatvfuzkaft", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("uxwigsyeipqdsm", response.controlPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("dgkkile", response.userPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("bdgwumgxdgd", response.userPlaneDataRoutes().get(0).attachedDataNetwork().id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoesListMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoesListMockTests.java new file mode 100644 index 000000000000..cfa9accf6c4f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/RoutingInfoesListMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.RoutingInfoModel; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RoutingInfoesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"controlPlaneAccessRoutes\":[{\"destination\":\"gkqu\",\"nextHops\":[{},{},{},{}]},{\"destination\":\"ptdacarvvl\",\"nextHops\":[{},{},{},{}]}],\"userPlaneAccessRoutes\":[{\"destination\":\"poi\",\"nextHops\":[{}]}],\"userPlaneDataRoutes\":[{\"attachedDataNetwork\":{\"id\":\"r\"},\"routes\":[{}]},{\"attachedDataNetwork\":{\"id\":\"sqalsxkdn\"},\"routes\":[{},{},{},{}]},{\"attachedDataNetwork\":{\"id\":\"fgsdpcvessmzhhk\"},\"routes\":[{}]},{\"attachedDataNetwork\":{\"id\":\"ldqqctekv\"},\"routes\":[{},{}]}]},\"id\":\"htjqvqyvw\",\"name\":\"hta\",\"type\":\"mxhzzysevus\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.routingInfoes().list("w", "d", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("gkqu", response.iterator().next().controlPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("poi", response.iterator().next().userPlaneAccessRoutes().get(0).destination()); + Assertions.assertEquals("r", + response.iterator().next().userPlaneDataRoutes().get(0).attachedDataNetwork().id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceDataFlowTemplateTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceDataFlowTemplateTests.java new file mode 100644 index 000000000000..254b5144cbfd --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceDataFlowTemplateTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.ServiceDataFlowTemplate; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ServiceDataFlowTemplateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServiceDataFlowTemplate model = BinaryData.fromString( + "{\"templateName\":\"snrbgyefrymsgao\",\"direction\":\"Uplink\",\"protocol\":[\"wncot\"],\"remoteIpList\":[\"fhir\"],\"ports\":[\"moxoftpi\",\"iwyczuh\",\"a\",\"pqjlihhyusps\"]}") + .toObject(ServiceDataFlowTemplate.class); + Assertions.assertEquals("snrbgyefrymsgao", model.templateName()); + Assertions.assertEquals(SdfDirection.UPLINK, model.direction()); + Assertions.assertEquals("wncot", model.protocol().get(0)); + Assertions.assertEquals("fhir", model.remoteIpList().get(0)); + Assertions.assertEquals("moxoftpi", model.ports().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServiceDataFlowTemplate model = new ServiceDataFlowTemplate().withTemplateName("snrbgyefrymsgao") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList("wncot")) + .withRemoteIpList(Arrays.asList("fhir")) + .withPorts(Arrays.asList("moxoftpi", "iwyczuh", "a", "pqjlihhyusps")); + model = BinaryData.fromObject(model).toObject(ServiceDataFlowTemplate.class); + Assertions.assertEquals("snrbgyefrymsgao", model.templateName()); + Assertions.assertEquals(SdfDirection.UPLINK, model.direction()); + Assertions.assertEquals("wncot", model.protocol().get(0)); + Assertions.assertEquals("fhir", model.remoteIpList().get(0)); + Assertions.assertEquals("moxoftpi", model.ports().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceInnerTests.java new file mode 100644 index 000000000000..cf7155509c45 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceInnerTests.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ServiceInner; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleQosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.ServiceDataFlowTemplate; +import com.azure.resourcemanager.mobilenetwork.models.TrafficControlPermission; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ServiceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServiceInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Deleted\",\"servicePrecedence\":1398026456,\"serviceQosPolicy\":{\"5qi\":1827391658,\"allocationAndRetentionPriorityLevel\":460922562,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"zpof\",\"downlink\":\"cckwyfzqwhxxbu\"}},\"pccRules\":[{\"ruleName\":\"a\",\"rulePrecedence\":437954475,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"qztpp\",\"downlink\":\"iolxor\"},\"5qi\":295575748,\"allocationAndRetentionPriorityLevel\":1263192387,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"wsobqwcsdbn\",\"downlink\":\"dcfhucqdpf\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"sbjjc\",\"direction\":\"Downlink\",\"protocol\":[\"xbvtvudu\"],\"remoteIpList\":[\"cormr\",\"xqtvcofu\",\"f\",\"vkg\"],\"ports\":[\"gdknnqv\",\"aznqntoru\"]},{\"templateName\":\"sgsahmkycgr\",\"direction\":\"Bidirectional\",\"protocol\":[\"juetaebur\"],\"remoteIpList\":[\"dmovsm\",\"l\",\"wabm\",\"oefki\"],\"ports\":[\"tpuqujmq\",\"gkfbtndoaong\",\"jcntuj\"]},{\"templateName\":\"tcje\",\"direction\":\"Downlink\",\"protocol\":[\"wwa\",\"zkoj\",\"dcpzfoqo\",\"i\"],\"remoteIpList\":[\"bxarzgszufoxci\",\"opidoamciodh\",\"haz\"],\"ports\":[\"nz\",\"onlwntoeg\"]}]}]},\"location\":\"dwbwhkszzcmrvexz\",\"tags\":{\"gsfraoyzkoow\":\"t\"},\"id\":\"lmnguxaw\",\"name\":\"aldsy\",\"type\":\"uximerqfobw\"}") + .toObject(ServiceInner.class); + Assertions.assertEquals("dwbwhkszzcmrvexz", model.location()); + Assertions.assertEquals("t", model.tags().get("gsfraoyzkoow")); + Assertions.assertEquals(1398026456, model.servicePrecedence()); + Assertions.assertEquals(1827391658, model.serviceQosPolicy().fiveQi()); + Assertions.assertEquals(460922562, model.serviceQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, model.serviceQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + model.serviceQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("zpof", model.serviceQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("cckwyfzqwhxxbu", model.serviceQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("a", model.pccRules().get(0).ruleName()); + Assertions.assertEquals(437954475, model.pccRules().get(0).rulePrecedence()); + Assertions.assertEquals(295575748, model.pccRules().get(0).ruleQosPolicy().fiveQi()); + Assertions.assertEquals(1263192387, + model.pccRules().get(0).ruleQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, + model.pccRules().get(0).ruleQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + model.pccRules().get(0).ruleQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("wsobqwcsdbn", model.pccRules().get(0).ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("dcfhucqdpf", model.pccRules().get(0).ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("qztpp", model.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().uplink()); + Assertions.assertEquals("iolxor", model.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.ENABLED, model.pccRules().get(0).trafficControl()); + Assertions.assertEquals("sbjjc", model.pccRules().get(0).serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.DOWNLINK, + model.pccRules().get(0).serviceDataFlowTemplates().get(0).direction()); + Assertions.assertEquals("xbvtvudu", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).protocol().get(0)); + Assertions.assertEquals("cormr", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).remoteIpList().get(0)); + Assertions.assertEquals("gdknnqv", model.pccRules().get(0).serviceDataFlowTemplates().get(0).ports().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServiceInner model = new ServiceInner().withLocation("dwbwhkszzcmrvexz") + .withTags(mapOf("gsfraoyzkoow", "t")) + .withServicePrecedence(1398026456) + .withServiceQosPolicy(new QosPolicy().withFiveQi(1827391658) + .withAllocationAndRetentionPriorityLevel(460922562) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("zpof").withDownlink("cckwyfzqwhxxbu"))) + .withPccRules(Arrays.asList(new PccRuleConfiguration().withRuleName("a") + .withRulePrecedence(437954475) + .withRuleQosPolicy(new PccRuleQosPolicy().withFiveQi(295575748) + .withAllocationAndRetentionPriorityLevel(1263192387) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("wsobqwcsdbn").withDownlink("dcfhucqdpf")) + .withGuaranteedBitRate(new Ambr().withUplink("qztpp").withDownlink("iolxor"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("sbjjc") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList("xbvtvudu")) + .withRemoteIpList(Arrays.asList("cormr", "xqtvcofu", "f", "vkg")) + .withPorts(Arrays.asList("gdknnqv", "aznqntoru")), + new ServiceDataFlowTemplate().withTemplateName("sgsahmkycgr") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList("juetaebur")) + .withRemoteIpList(Arrays.asList("dmovsm", "l", "wabm", "oefki")) + .withPorts(Arrays.asList("tpuqujmq", "gkfbtndoaong", "jcntuj")), + new ServiceDataFlowTemplate().withTemplateName("tcje") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList("wwa", "zkoj", "dcpzfoqo", "i")) + .withRemoteIpList(Arrays.asList("bxarzgszufoxci", "opidoamciodh", "haz")) + .withPorts(Arrays.asList("nz", "onlwntoeg")))))); + model = BinaryData.fromObject(model).toObject(ServiceInner.class); + Assertions.assertEquals("dwbwhkszzcmrvexz", model.location()); + Assertions.assertEquals("t", model.tags().get("gsfraoyzkoow")); + Assertions.assertEquals(1398026456, model.servicePrecedence()); + Assertions.assertEquals(1827391658, model.serviceQosPolicy().fiveQi()); + Assertions.assertEquals(460922562, model.serviceQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, model.serviceQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + model.serviceQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("zpof", model.serviceQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("cckwyfzqwhxxbu", model.serviceQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("a", model.pccRules().get(0).ruleName()); + Assertions.assertEquals(437954475, model.pccRules().get(0).rulePrecedence()); + Assertions.assertEquals(295575748, model.pccRules().get(0).ruleQosPolicy().fiveQi()); + Assertions.assertEquals(1263192387, + model.pccRules().get(0).ruleQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, + model.pccRules().get(0).ruleQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + model.pccRules().get(0).ruleQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("wsobqwcsdbn", model.pccRules().get(0).ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("dcfhucqdpf", model.pccRules().get(0).ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("qztpp", model.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().uplink()); + Assertions.assertEquals("iolxor", model.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.ENABLED, model.pccRules().get(0).trafficControl()); + Assertions.assertEquals("sbjjc", model.pccRules().get(0).serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.DOWNLINK, + model.pccRules().get(0).serviceDataFlowTemplates().get(0).direction()); + Assertions.assertEquals("xbvtvudu", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).protocol().get(0)); + Assertions.assertEquals("cormr", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).remoteIpList().get(0)); + Assertions.assertEquals("gdknnqv", model.pccRules().get(0).serviceDataFlowTemplates().get(0).ports().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceListResultTests.java new file mode 100644 index 000000000000..825a0b4a7103 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceListResultTests.java @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ServiceInner; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleQosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.ServiceDataFlowTemplate; +import com.azure.resourcemanager.mobilenetwork.models.ServiceListResult; +import com.azure.resourcemanager.mobilenetwork.models.TrafficControlPermission; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ServiceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServiceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"servicePrecedence\":2119274239,\"serviceQosPolicy\":{\"5qi\":363338546,\"allocationAndRetentionPriorityLevel\":398621398,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"ucvpamrs\",\"downlink\":\"euzvx\"}},\"pccRules\":[{\"ruleName\":\"i\",\"rulePrecedence\":286776812,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"hn\",\"downlink\":\"txifqj\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"rhublwpcesutrg\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"pauutpw\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"hihejqgwzpnfqn\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"ypsxjvfoim\",\"rulePrecedence\":1654623017,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"lirc\",\"downlink\":\"zjxvydfcea\"}},\"trafficControl\":\"Blocked\",\"serviceDataFlowTemplates\":[{\"templateName\":\"vygdyft\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"rtwnawjslbi\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"ojgcyzt\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"mznbaeqphch\",\"rulePrecedence\":1311384548,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"nrpxehuw\",\"downlink\":\"ykqgaifmvik\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"vkhbejdznx\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"dsrhnjiv\",\"rulePrecedence\":1229018312,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"tnovqfzgemjdftul\",\"downlink\":\"ltducea\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"zuo\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]}]}]},\"location\":\"wcw\",\"tags\":{\"vk\":\"oknssxmojmsvpkjp\",\"jyxgtczh\":\"cfzq\",\"hmkxmaehvbb\":\"ydbsd\"},\"id\":\"uripltfnhtba\",\"name\":\"kgxywr\",\"type\":\"kpyklyhp\"},{\"properties\":{\"provisioningState\":\"Deleted\",\"servicePrecedence\":1794429860,\"serviceQosPolicy\":{\"5qi\":943931603,\"allocationAndRetentionPriorityLevel\":1956413749,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"ibthostgktstvd\",\"downlink\":\"eclze\"}},\"pccRules\":[{\"ruleName\":\"bcvhzlhpl\",\"rulePrecedence\":751350709,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"kdl\",\"downlink\":\"wqfbumlkxtrqjfsm\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"xhwgfwsrtaw\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"ezbrhubskh\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"ygo\",\"rulePrecedence\":874822525,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"kqfqjbvl\",\"downlink\":\"orfmluiqt\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"vyvnqqyb\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"yeua\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"kq\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"qgzsles\",\"rulePrecedence\":1318524891,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"hernntiewdjc\",\"downlink\":\"bquwrbehw\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"buffkmrqemvvhm\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"drjf\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"acoebj\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]}]}]},\"location\":\"zcjznmwcpmgua\",\"tags\":{\"uxxpshne\":\"aufactkahzovajjz\",\"lqubkwdlen\":\"kulfg\",\"utujba\":\"d\",\"orwmduvwpklv\":\"pjuohminyfl\"},\"id\":\"w\",\"name\":\"ygdxpgpqchis\",\"type\":\"epn\"},{\"properties\":{\"provisioningState\":\"Deleted\",\"servicePrecedence\":1725579406,\"serviceQosPolicy\":{\"5qi\":1933702310,\"allocationAndRetentionPriorityLevel\":1689782344,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"confozauors\",\"downlink\":\"kokwbqplhlvnu\"}},\"pccRules\":[{\"ruleName\":\"pzlrphw\",\"rulePrecedence\":1091324962,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"l\",\"downlink\":\"wey\"}},\"trafficControl\":\"Blocked\",\"serviceDataFlowTemplates\":[{\"templateName\":\"nvmnnrwrbiorkta\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"wjhhgdnhxmsivf\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]}]}]},\"location\":\"loxggdufiqn\",\"tags\":{\"fgdo\":\"uzaofjchvcyyy\",\"qonmacj\":\"cubiipuipw\"},\"id\":\"k\",\"name\":\"izsh\",\"type\":\"vcimpev\"},{\"properties\":{\"provisioningState\":\"Deleted\",\"servicePrecedence\":64895608,\"serviceQosPolicy\":{\"5qi\":1947593422,\"allocationAndRetentionPriorityLevel\":1976070840,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"xsmiccwrwfscjf\",\"downlink\":\"ynszquji\"}},\"pccRules\":[{\"ruleName\":\"voqyt\",\"rulePrecedence\":1573869640,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"owbb\",\"downlink\":\"gyavu\"}},\"trafficControl\":\"Blocked\",\"serviceDataFlowTemplates\":[{\"templateName\":\"joxoism\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"sbpimlq\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"jxkcgxxlxsff\",\"rulePrecedence\":749906444,\"ruleQosPolicy\":{\"maximumBitRate\":{\"uplink\":\"izqzdwlvwlyou\",\"downlink\":\"fgfb\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"dyhgkfminsg\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"zfttsttktlahb\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"ctxtgzukxi\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"m\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]}]}]},\"location\":\"qqqxhrnxrx\",\"tags\":{\"zfvazi\":\"uisavokq\",\"tbajlkatn\":\"jlfrq\",\"s\":\"xyiopidkqqfku\"},\"id\":\"xkdmligo\",\"name\":\"ibrxkp\",\"type\":\"loazuruocbgoo\"}],\"nextLink\":\"te\"}") + .toObject(ServiceListResult.class); + Assertions.assertEquals("wcw", model.value().get(0).location()); + Assertions.assertEquals("oknssxmojmsvpkjp", model.value().get(0).tags().get("vk")); + Assertions.assertEquals(2119274239, model.value().get(0).servicePrecedence()); + Assertions.assertEquals(363338546, model.value().get(0).serviceQosPolicy().fiveQi()); + Assertions.assertEquals(398621398, + model.value().get(0).serviceQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + model.value().get(0).serviceQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.value().get(0).serviceQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("ucvpamrs", model.value().get(0).serviceQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("euzvx", model.value().get(0).serviceQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("i", model.value().get(0).pccRules().get(0).ruleName()); + Assertions.assertEquals(286776812, model.value().get(0).pccRules().get(0).rulePrecedence()); + Assertions.assertEquals("hn", model.value().get(0).pccRules().get(0).ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("txifqj", + model.value().get(0).pccRules().get(0).ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.ENABLED, + model.value().get(0).pccRules().get(0).trafficControl()); + Assertions.assertEquals("rhublwpcesutrg", + model.value().get(0).pccRules().get(0).serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.UPLINK, + model.value().get(0).pccRules().get(0).serviceDataFlowTemplates().get(0).direction()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServiceListResult model + = new ServiceListResult() + .withValue( + Arrays + .asList( + new ServiceInner().withLocation("wcw") + .withTags(mapOf("vk", "oknssxmojmsvpkjp", "jyxgtczh", "cfzq", "hmkxmaehvbb", "ydbsd")) + .withServicePrecedence(2119274239) + .withServiceQosPolicy(new QosPolicy().withFiveQi(363338546) + .withAllocationAndRetentionPriorityLevel(398621398) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("ucvpamrs").withDownlink("euzvx"))) + .withPccRules( + Arrays + .asList( + new PccRuleConfiguration().withRuleName("i") + .withRulePrecedence(286776812) + .withRuleQosPolicy(new PccRuleQosPolicy().withMaximumBitRate( + new Ambr().withUplink("hn").withDownlink("txifqj"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("rhublwpcesutrg") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("pauutpw") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("hihejqgwzpnfqn") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))), + new PccRuleConfiguration().withRuleName("ypsxjvfoim") + .withRulePrecedence(1654623017) + .withRuleQosPolicy(new PccRuleQosPolicy().withMaximumBitRate( + new Ambr().withUplink("lirc").withDownlink("zjxvydfcea"))) + .withTrafficControl(TrafficControlPermission.BLOCKED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("vygdyft") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("rtwnawjslbi") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("ojgcyzt") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))), + new PccRuleConfiguration().withRuleName("mznbaeqphch") + .withRulePrecedence(1311384548) + .withRuleQosPolicy(new PccRuleQosPolicy().withMaximumBitRate( + new Ambr().withUplink("nrpxehuw").withDownlink("ykqgaifmvik"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates(Arrays + .asList(new ServiceDataFlowTemplate().withTemplateName("vkhbejdznx") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))), + new PccRuleConfiguration().withRuleName("dsrhnjiv") + .withRulePrecedence(1229018312) + .withRuleQosPolicy(new PccRuleQosPolicy().withMaximumBitRate( + new Ambr().withUplink("tnovqfzgemjdftul").withDownlink("ltducea"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates( + Arrays.asList(new ServiceDataFlowTemplate().withTemplateName("zuo") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))))), + new ServiceInner().withLocation("zcjznmwcpmgua") + .withTags(mapOf("uxxpshne", "aufactkahzovajjz", "lqubkwdlen", "kulfg", "utujba", "d", + "orwmduvwpklv", "pjuohminyfl")) + .withServicePrecedence(1794429860) + .withServiceQosPolicy(new QosPolicy().withFiveQi(943931603) + .withAllocationAndRetentionPriorityLevel(1956413749) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("ibthostgktstvd").withDownlink("eclze"))) + .withPccRules(Arrays.asList( + new PccRuleConfiguration().withRuleName("bcvhzlhpl") + .withRulePrecedence(751350709) + .withRuleQosPolicy(new PccRuleQosPolicy().withMaximumBitRate( + new Ambr().withUplink("kdl").withDownlink("wqfbumlkxtrqjfsm"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("xhwgfwsrtaw") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("ezbrhubskh") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))), + new PccRuleConfiguration().withRuleName("ygo") + .withRulePrecedence(874822525) + .withRuleQosPolicy(new PccRuleQosPolicy().withMaximumBitRate( + new Ambr().withUplink("kqfqjbvl").withDownlink("orfmluiqt"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("vyvnqqyb") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("yeua") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("kq") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))), + new PccRuleConfiguration().withRuleName("qgzsles") + .withRulePrecedence(1318524891) + .withRuleQosPolicy(new PccRuleQosPolicy().withMaximumBitRate( + new Ambr().withUplink("hernntiewdjc").withDownlink("bquwrbehw"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates( + Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("buffkmrqemvvhm") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("drjf") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("acoebj") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))))), + new ServiceInner().withLocation("loxggdufiqn") + .withTags(mapOf("fgdo", "uzaofjchvcyyy", "qonmacj", "cubiipuipw")) + .withServicePrecedence(1725579406) + .withServiceQosPolicy(new QosPolicy().withFiveQi(1933702310) + .withAllocationAndRetentionPriorityLevel(1689782344) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate( + new Ambr().withUplink("confozauors").withDownlink("kokwbqplhlvnu"))) + .withPccRules(Arrays.asList(new PccRuleConfiguration().withRuleName("pzlrphw") + .withRulePrecedence(1091324962) + .withRuleQosPolicy(new PccRuleQosPolicy() + .withMaximumBitRate(new Ambr().withUplink("l").withDownlink("wey"))) + .withTrafficControl(TrafficControlPermission.BLOCKED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("nvmnnrwrbiorkta") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("wjhhgdnhxmsivf") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))))), + new ServiceInner().withLocation("qqqxhrnxrx") + .withTags(mapOf("zfvazi", "uisavokq", "tbajlkatn", "jlfrq", "s", "xyiopidkqqfku")) + .withServicePrecedence(64895608) + .withServiceQosPolicy(new QosPolicy().withFiveQi(1947593422) + .withAllocationAndRetentionPriorityLevel(1976070840) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withMaximumBitRate( + new Ambr().withUplink("xsmiccwrwfscjf").withDownlink("ynszquji"))) + .withPccRules( + Arrays.asList( + new PccRuleConfiguration().withRuleName("voqyt") + .withRulePrecedence(1573869640) + .withRuleQosPolicy(new PccRuleQosPolicy().withMaximumBitRate( + new Ambr().withUplink("owbb").withDownlink("gyavu"))) + .withTrafficControl(TrafficControlPermission.BLOCKED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("joxoism") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("sbpimlq") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))), + new PccRuleConfiguration().withRuleName("jxkcgxxlxsff") + .withRulePrecedence(749906444) + .withRuleQosPolicy(new PccRuleQosPolicy().withMaximumBitRate( + new Ambr().withUplink("izqzdwlvwlyou").withDownlink("fgfb"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("dyhgkfminsg") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("zfttsttktlahb") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("ctxtgzukxi") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("m") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))))))); + model = BinaryData.fromObject(model).toObject(ServiceListResult.class); + Assertions.assertEquals("wcw", model.value().get(0).location()); + Assertions.assertEquals("oknssxmojmsvpkjp", model.value().get(0).tags().get("vk")); + Assertions.assertEquals(2119274239, model.value().get(0).servicePrecedence()); + Assertions.assertEquals(363338546, model.value().get(0).serviceQosPolicy().fiveQi()); + Assertions.assertEquals(398621398, + model.value().get(0).serviceQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + model.value().get(0).serviceQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.value().get(0).serviceQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("ucvpamrs", model.value().get(0).serviceQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("euzvx", model.value().get(0).serviceQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("i", model.value().get(0).pccRules().get(0).ruleName()); + Assertions.assertEquals(286776812, model.value().get(0).pccRules().get(0).rulePrecedence()); + Assertions.assertEquals("hn", model.value().get(0).pccRules().get(0).ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("txifqj", + model.value().get(0).pccRules().get(0).ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.ENABLED, + model.value().get(0).pccRules().get(0).trafficControl()); + Assertions.assertEquals("rhublwpcesutrg", + model.value().get(0).pccRules().get(0).serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.UPLINK, + model.value().get(0).pccRules().get(0).serviceDataFlowTemplates().get(0).direction()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicePropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicePropertiesFormatTests.java new file mode 100644 index 000000000000..803a39968c94 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicePropertiesFormatTests.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.ServicePropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleQosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.ServiceDataFlowTemplate; +import com.azure.resourcemanager.mobilenetwork.models.TrafficControlPermission; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ServicePropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServicePropertiesFormat model = BinaryData.fromString( + "{\"provisioningState\":\"Accepted\",\"servicePrecedence\":634741251,\"serviceQosPolicy\":{\"5qi\":1383706321,\"allocationAndRetentionPriorityLevel\":189482477,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"pagmhrskdsnf\",\"downlink\":\"sd\"}},\"pccRules\":[{\"ruleName\":\"kgtdlmkkze\",\"rulePrecedence\":1591125890,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"ewpusdsttwvogvb\",\"downlink\":\"ejdcngqqmoakuf\"},\"5qi\":446796481,\"allocationAndRetentionPriorityLevel\":574072146,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"rtwaenuuzko\",\"downlink\":\"bminrfdwoyuhhzi\"}},\"trafficControl\":\"Blocked\",\"serviceDataFlowTemplates\":[{\"templateName\":\"ozbhdmsmlmzq\",\"direction\":\"Uplink\",\"protocol\":[\"trmaequiahxicslf\"],\"remoteIpList\":[\"qzpiyyl\",\"alnswhccsphk\",\"ivwitqscywugg\"],\"ports\":[\"uhczbwemh\",\"i\"]},{\"templateName\":\"sbrgz\",\"direction\":\"Uplink\",\"protocol\":[\"swe\",\"pqwd\",\"ggicccnxqhue\",\"mkttlstvlzywem\"],\"remoteIpList\":[\"rncsdtclu\",\"iypbsfgytgusl\"],\"ports\":[\"dcygqukyhejhz\"]},{\"templateName\":\"sx\",\"direction\":\"Bidirectional\",\"protocol\":[\"elolppvksrpqvuj\",\"raehtwdwrft\"],\"remoteIpList\":[\"iby\"],\"ports\":[\"l\"]},{\"templateName\":\"h\",\"direction\":\"Uplink\",\"protocol\":[\"wpracstwitykhev\",\"c\",\"edcpnmdyodnwzxl\"],\"remoteIpList\":[\"cvnhltiugc\"],\"ports\":[\"vvwxqi\",\"y\"]}]},{\"ruleName\":\"unyowxwl\",\"rulePrecedence\":1093949584,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"kv\",\"downlink\":\"g\"},\"5qi\":1410181750,\"allocationAndRetentionPriorityLevel\":190287490,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"acizsjqlhkrr\",\"downlink\":\"bdeibqipqk\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"ndzwmkrefa\",\"direction\":\"Bidirectional\",\"protocol\":[\"orwkqnyh\",\"b\",\"j\",\"jivfxzsjabib\"],\"remoteIpList\":[\"stawfsdjpvkv\",\"bjxbkzbzk\",\"vncjabudurgk\",\"kmokz\"],\"ports\":[\"klff\"]},{\"templateName\":\"mouwqlgzrfzeey\",\"direction\":\"Uplink\",\"protocol\":[\"zi\",\"ayuhqlbjbsy\",\"bqwrvtldgm\"],\"remoteIpList\":[\"gvmpipaslthaqfx\",\"smwutwbdsrezpd\",\"hneuyowqkd\",\"ytisibir\"],\"ports\":[\"ikpzimejza\",\"lfzxiavrmbzonoki\"]}]},{\"ruleName\":\"rjqc\",\"rulePrecedence\":749799353,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"pfrlazsz\",\"downlink\":\"nwoiind\"},\"5qi\":369486551,\"allocationAndRetentionPriorityLevel\":941939967,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"tlhflsjcdhszf\",\"downlink\":\"vfbgofeljagrqmqh\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"iiiojnalghf\",\"direction\":\"Uplink\",\"protocol\":[\"vsexsowuelu\",\"hhahhxvrhmzkwpjg\",\"wspughftqsxhqx\"],\"remoteIpList\":[\"xukndxdigr\"],\"ports\":[\"ufzdmsyq\",\"fi\",\"whbotzingamv\",\"phoszqz\"]},{\"templateName\":\"dphqamv\",\"direction\":\"Bidirectional\",\"protocol\":[\"wynwcvtbvkayhm\",\"nvyq\",\"atkzwpcnpw\",\"cjaesgvvs\"],\"remoteIpList\":[\"yajguqfhwygzlv\",\"nk\"],\"ports\":[\"semdwzrmu\",\"apfcqdpsq\",\"qvpsvuoymg\",\"celve\"]},{\"templateName\":\"rypqlmfeo\",\"direction\":\"Bidirectional\",\"protocol\":[\"qwkyhkobop\",\"xedk\"],\"remoteIpList\":[\"epbqpcrfkbw\"],\"ports\":[\"njv\",\"dw\",\"lpqekf\",\"nkhtjsyingw\"]},{\"templateName\":\"qatmtdhtmdvy\",\"direction\":\"Uplink\",\"protocol\":[\"kdgszywkbirr\",\"uzhlhkjoqrv\",\"qaatjinrv\"],\"remoteIpList\":[\"upmfiibfg\",\"jioolvrwxk\"],\"ports\":[\"k\",\"llqwjygvjayvblmh\"]}]},{\"ruleName\":\"k\",\"rulePrecedence\":1843099646,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"xvvy\",\"downlink\":\"gsopbyrqufegxu\"},\"5qi\":950135360,\"allocationAndRetentionPriorityLevel\":1393630743,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"ctlpdngitvgb\",\"downlink\":\"hrixkwmy\"}},\"trafficControl\":\"Blocked\",\"serviceDataFlowTemplates\":[{\"templateName\":\"veg\",\"direction\":\"Bidirectional\",\"protocol\":[\"pna\",\"xexccbdreaxhcexd\",\"rvqahqkghtpwi\",\"nhyjsv\"],\"remoteIpList\":[\"cxzbfvoowvr\",\"mtg\",\"qp\"],\"ports\":[\"s\",\"ronzmyhgfip\"]},{\"templateName\":\"sxkm\",\"direction\":\"Bidirectional\",\"protocol\":[\"ekrrjr\"],\"remoteIpList\":[\"fxtsgum\",\"jglikkxwslolb\"],\"ports\":[\"uzlm\",\"felfktg\"]},{\"templateName\":\"lcrpw\",\"direction\":\"Bidirectional\",\"protocol\":[\"znoigbrn\",\"w\"],\"remoteIpList\":[\"kpnb\",\"azej\"],\"ports\":[\"kagfhsxtt\",\"ugzxnf\",\"azpxdtnkdmkqjjl\"]},{\"templateName\":\"uenvrkp\",\"direction\":\"Downlink\",\"protocol\":[\"aibrebqaaysjkixq\",\"nqttezl\",\"fffiak\",\"jpqqmted\"],\"remoteIpList\":[\"mmji\",\"yeozphvwauyqncy\",\"upkvipmdsc\"],\"ports\":[\"upev\",\"hfstotxhojujbyp\"]}]}]}") + .toObject(ServicePropertiesFormat.class); + Assertions.assertEquals(634741251, model.servicePrecedence()); + Assertions.assertEquals(1383706321, model.serviceQosPolicy().fiveQi()); + Assertions.assertEquals(189482477, model.serviceQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, model.serviceQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.serviceQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("pagmhrskdsnf", model.serviceQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("sd", model.serviceQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("kgtdlmkkze", model.pccRules().get(0).ruleName()); + Assertions.assertEquals(1591125890, model.pccRules().get(0).rulePrecedence()); + Assertions.assertEquals(446796481, model.pccRules().get(0).ruleQosPolicy().fiveQi()); + Assertions.assertEquals(574072146, + model.pccRules().get(0).ruleQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + model.pccRules().get(0).ruleQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.pccRules().get(0).ruleQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("rtwaenuuzko", model.pccRules().get(0).ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("bminrfdwoyuhhzi", model.pccRules().get(0).ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("ewpusdsttwvogvb", + model.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().uplink()); + Assertions.assertEquals("ejdcngqqmoakuf", + model.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.BLOCKED, model.pccRules().get(0).trafficControl()); + Assertions.assertEquals("ozbhdmsmlmzq", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.UPLINK, + model.pccRules().get(0).serviceDataFlowTemplates().get(0).direction()); + Assertions.assertEquals("trmaequiahxicslf", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).protocol().get(0)); + Assertions.assertEquals("qzpiyyl", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).remoteIpList().get(0)); + Assertions.assertEquals("uhczbwemh", model.pccRules().get(0).serviceDataFlowTemplates().get(0).ports().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServicePropertiesFormat model + = new ServicePropertiesFormat().withServicePrecedence(634741251) + .withServiceQosPolicy(new QosPolicy().withFiveQi(1383706321) + .withAllocationAndRetentionPriorityLevel(189482477) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("pagmhrskdsnf").withDownlink("sd"))) + .withPccRules( + Arrays.asList( + new PccRuleConfiguration().withRuleName("kgtdlmkkze") + .withRulePrecedence(1591125890) + .withRuleQosPolicy(new PccRuleQosPolicy().withFiveQi(446796481) + .withAllocationAndRetentionPriorityLevel(574072146) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withMaximumBitRate( + new Ambr().withUplink("rtwaenuuzko").withDownlink("bminrfdwoyuhhzi")) + .withGuaranteedBitRate( + new Ambr().withUplink("ewpusdsttwvogvb").withDownlink("ejdcngqqmoakuf"))) + .withTrafficControl(TrafficControlPermission.BLOCKED) + .withServiceDataFlowTemplates(Arrays + .asList( + new ServiceDataFlowTemplate().withTemplateName("ozbhdmsmlmzq") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList("trmaequiahxicslf")) + .withRemoteIpList(Arrays.asList("qzpiyyl", "alnswhccsphk", "ivwitqscywugg")) + .withPorts(Arrays.asList("uhczbwemh", "i")), + new ServiceDataFlowTemplate().withTemplateName("sbrgz") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList("swe", "pqwd", "ggicccnxqhue", "mkttlstvlzywem")) + .withRemoteIpList(Arrays.asList("rncsdtclu", "iypbsfgytgusl")) + .withPorts(Arrays.asList("dcygqukyhejhz")), + new ServiceDataFlowTemplate().withTemplateName("sx") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList("elolppvksrpqvuj", "raehtwdwrft")) + .withRemoteIpList(Arrays.asList("iby")) + .withPorts(Arrays.asList("l")), + new ServiceDataFlowTemplate() + .withTemplateName("h") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList("wpracstwitykhev", "c", "edcpnmdyodnwzxl")) + .withRemoteIpList(Arrays.asList("cvnhltiugc")) + .withPorts(Arrays.asList("vvwxqi", "y")))), + new PccRuleConfiguration().withRuleName("unyowxwl") + .withRulePrecedence(1093949584) + .withRuleQosPolicy(new PccRuleQosPolicy().withFiveQi(1410181750) + .withAllocationAndRetentionPriorityLevel(190287490) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("acizsjqlhkrr").withDownlink("bdeibqipqk")) + .withGuaranteedBitRate(new Ambr().withUplink("kv").withDownlink("g"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("ndzwmkrefa") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList("orwkqnyh", "b", "j", "jivfxzsjabib")) + .withRemoteIpList( + Arrays.asList("stawfsdjpvkv", "bjxbkzbzk", "vncjabudurgk", "kmokz")) + .withPorts(Arrays.asList("klff")), + new ServiceDataFlowTemplate().withTemplateName("mouwqlgzrfzeey") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList("zi", "ayuhqlbjbsy", "bqwrvtldgm")) + .withRemoteIpList( + Arrays.asList("gvmpipaslthaqfx", "smwutwbdsrezpd", "hneuyowqkd", "ytisibir")) + .withPorts(Arrays.asList("ikpzimejza", "lfzxiavrmbzonoki")))), + new PccRuleConfiguration().withRuleName("rjqc") + .withRulePrecedence(749799353) + .withRuleQosPolicy(new PccRuleQosPolicy().withFiveQi(369486551) + .withAllocationAndRetentionPriorityLevel(941939967) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withMaximumBitRate( + new Ambr().withUplink("tlhflsjcdhszf").withDownlink("vfbgofeljagrqmqh")) + .withGuaranteedBitRate(new Ambr().withUplink("pfrlazsz").withDownlink("nwoiind"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates( + Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("iiiojnalghf") + .withDirection(SdfDirection.UPLINK) + .withProtocol( + Arrays.asList("vsexsowuelu", "hhahhxvrhmzkwpjg", "wspughftqsxhqx")) + .withRemoteIpList(Arrays.asList("xukndxdigr")) + .withPorts(Arrays.asList("ufzdmsyq", "fi", "whbotzingamv", "phoszqz")), + new ServiceDataFlowTemplate().withTemplateName("dphqamv") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol( + Arrays.asList("wynwcvtbvkayhm", "nvyq", "atkzwpcnpw", "cjaesgvvs")) + .withRemoteIpList(Arrays.asList("yajguqfhwygzlv", "nk")) + .withPorts(Arrays.asList("semdwzrmu", "apfcqdpsq", "qvpsvuoymg", "celve")), + new ServiceDataFlowTemplate().withTemplateName("rypqlmfeo") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList("qwkyhkobop", "xedk")) + .withRemoteIpList(Arrays.asList("epbqpcrfkbw")) + .withPorts(Arrays.asList("njv", "dw", "lpqekf", "nkhtjsyingw")), + new ServiceDataFlowTemplate().withTemplateName("qatmtdhtmdvy") + .withDirection(SdfDirection.UPLINK) + .withProtocol(Arrays.asList("kdgszywkbirr", "uzhlhkjoqrv", "qaatjinrv")) + .withRemoteIpList(Arrays.asList("upmfiibfg", "jioolvrwxk")) + .withPorts(Arrays.asList("k", "llqwjygvjayvblmh")))), + new PccRuleConfiguration().withRuleName("k") + .withRulePrecedence(1843099646) + .withRuleQosPolicy(new PccRuleQosPolicy().withFiveQi(950135360) + .withAllocationAndRetentionPriorityLevel(1393630743) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("ctlpdngitvgb").withDownlink("hrixkwmy")) + .withGuaranteedBitRate(new Ambr().withUplink("xvvy").withDownlink("gsopbyrqufegxu"))) + .withTrafficControl(TrafficControlPermission.BLOCKED) + .withServiceDataFlowTemplates( + Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("veg") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol( + Arrays.asList("pna", "xexccbdreaxhcexd", "rvqahqkghtpwi", "nhyjsv")) + .withRemoteIpList(Arrays.asList("cxzbfvoowvr", "mtg", "qp")) + .withPorts(Arrays.asList("s", "ronzmyhgfip")), + new ServiceDataFlowTemplate().withTemplateName("sxkm") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList("ekrrjr")) + .withRemoteIpList(Arrays.asList("fxtsgum", "jglikkxwslolb")) + .withPorts(Arrays.asList("uzlm", "felfktg")), + new ServiceDataFlowTemplate().withTemplateName("lcrpw") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList("znoigbrn", "w")) + .withRemoteIpList(Arrays.asList("kpnb", "azej")) + .withPorts(Arrays.asList("kagfhsxtt", "ugzxnf", "azpxdtnkdmkqjjl")), + new ServiceDataFlowTemplate().withTemplateName("uenvrkp") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol( + Arrays.asList("aibrebqaaysjkixq", "nqttezl", "fffiak", "jpqqmted")) + .withRemoteIpList(Arrays.asList("mmji", "yeozphvwauyqncy", "upkvipmdsc")) + .withPorts(Arrays.asList("upev", "hfstotxhojujbyp")))))); + model = BinaryData.fromObject(model).toObject(ServicePropertiesFormat.class); + Assertions.assertEquals(634741251, model.servicePrecedence()); + Assertions.assertEquals(1383706321, model.serviceQosPolicy().fiveQi()); + Assertions.assertEquals(189482477, model.serviceQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, model.serviceQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.serviceQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("pagmhrskdsnf", model.serviceQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("sd", model.serviceQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("kgtdlmkkze", model.pccRules().get(0).ruleName()); + Assertions.assertEquals(1591125890, model.pccRules().get(0).rulePrecedence()); + Assertions.assertEquals(446796481, model.pccRules().get(0).ruleQosPolicy().fiveQi()); + Assertions.assertEquals(574072146, + model.pccRules().get(0).ruleQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + model.pccRules().get(0).ruleQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.pccRules().get(0).ruleQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("rtwaenuuzko", model.pccRules().get(0).ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("bminrfdwoyuhhzi", model.pccRules().get(0).ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("ewpusdsttwvogvb", + model.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().uplink()); + Assertions.assertEquals("ejdcngqqmoakuf", + model.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.BLOCKED, model.pccRules().get(0).trafficControl()); + Assertions.assertEquals("ozbhdmsmlmzq", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.UPLINK, + model.pccRules().get(0).serviceDataFlowTemplates().get(0).direction()); + Assertions.assertEquals("trmaequiahxicslf", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).protocol().get(0)); + Assertions.assertEquals("qzpiyyl", + model.pccRules().get(0).serviceDataFlowTemplates().get(0).remoteIpList().get(0)); + Assertions.assertEquals("uhczbwemh", model.pccRules().get(0).serviceDataFlowTemplates().get(0).ports().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceResourceIdTests.java new file mode 100644 index 000000000000..09b1d43e0327 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServiceResourceIdTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.ServiceResourceId; +import org.junit.jupiter.api.Assertions; + +public final class ServiceResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServiceResourceId model = BinaryData.fromString("{\"id\":\"ipmve\"}").toObject(ServiceResourceId.class); + Assertions.assertEquals("ipmve", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServiceResourceId model = new ServiceResourceId().withId("ipmve"); + model = BinaryData.fromObject(model).toObject(ServiceResourceId.class); + Assertions.assertEquals("ipmve", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..f4e75b3c5bb6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateMockTests.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.PccRuleQosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.QosPolicy; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.Service; +import com.azure.resourcemanager.mobilenetwork.models.ServiceDataFlowTemplate; +import com.azure.resourcemanager.mobilenetwork.models.TrafficControlPermission; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ServicesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"servicePrecedence\":1265234156,\"serviceQosPolicy\":{\"5qi\":1540955255,\"allocationAndRetentionPriorityLevel\":1114161467,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"cpwzv\",\"downlink\":\"doksqdtiwlwxlbon\"}},\"pccRules\":[{\"ruleName\":\"bazqicqchygtvxby\",\"rulePrecedence\":1673817670,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"pubdpkx\",\"downlink\":\"qvgx\"},\"5qi\":400759737,\"allocationAndRetentionPriorityLevel\":1942989758,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"kxdxuwsaifmcwn\",\"downlink\":\"s\"}},\"trafficControl\":\"Blocked\",\"serviceDataFlowTemplates\":[{\"templateName\":\"hg\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"kb\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"njolgjyyxpv\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]}]}]},\"location\":\"zerqzevxoqei\",\"tags\":{\"qulhmzy\":\"waljglzoblqwaaf\",\"qjcrgaxwmzwdf\":\"bhdvafjrqpjiy\"},\"id\":\"bnrzorpdltbqctq\",\"name\":\"fg\",\"type\":\"xsaetg\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Service response = manager.services() + .define("vxhmtfhocnxzcmj") + .withRegion("ycnlbvgjcodk") + .withExistingMobileNetwork("lbnwtpcpahp", "z") + .withServicePrecedence(667323008) + .withPccRules(Arrays.asList(new PccRuleConfiguration().withRuleName("doesxxhmwcdb") + .withRulePrecedence(526210468) + .withRuleQosPolicy(new PccRuleQosPolicy().withFiveQi(954240404) + .withAllocationAndRetentionPriorityLevel(962345519) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("snbagnchjhg").withDownlink("muowakywalhjy")) + .withGuaranteedBitRate(new Ambr().withUplink("ikxkxhneg").withDownlink("njzrbhtmeplvu"))) + .withTrafficControl(TrafficControlPermission.ENABLED) + .withServiceDataFlowTemplates(Arrays.asList( + new ServiceDataFlowTemplate().withTemplateName("qt") + .withDirection(SdfDirection.BIDIRECTIONAL) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()), + new ServiceDataFlowTemplate().withTemplateName("drclssoljome") + .withDirection(SdfDirection.DOWNLINK) + .withProtocol(Arrays.asList()) + .withRemoteIpList(Arrays.asList()))))) + .withTags(mapOf("s", "iiy")) + .withServiceQosPolicy(new QosPolicy().withFiveQi(792794865) + .withAllocationAndRetentionPriorityLevel(553468094) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withMaximumBitRate(new Ambr().withUplink("njevhdlmydidw").withDownlink("epfwwt"))) + .create(); + + Assertions.assertEquals("zerqzevxoqei", response.location()); + Assertions.assertEquals("waljglzoblqwaaf", response.tags().get("qulhmzy")); + Assertions.assertEquals(1265234156, response.servicePrecedence()); + Assertions.assertEquals(1540955255, response.serviceQosPolicy().fiveQi()); + Assertions.assertEquals(1114161467, response.serviceQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, response.serviceQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + response.serviceQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("cpwzv", response.serviceQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("doksqdtiwlwxlbon", response.serviceQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("bazqicqchygtvxby", response.pccRules().get(0).ruleName()); + Assertions.assertEquals(1673817670, response.pccRules().get(0).rulePrecedence()); + Assertions.assertEquals(400759737, response.pccRules().get(0).ruleQosPolicy().fiveQi()); + Assertions.assertEquals(1942989758, + response.pccRules().get(0).ruleQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, + response.pccRules().get(0).ruleQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + response.pccRules().get(0).ruleQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("kxdxuwsaifmcwn", response.pccRules().get(0).ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("s", response.pccRules().get(0).ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("pubdpkx", response.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().uplink()); + Assertions.assertEquals("qvgx", response.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.BLOCKED, response.pccRules().get(0).trafficControl()); + Assertions.assertEquals("hg", response.pccRules().get(0).serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.DOWNLINK, + response.pccRules().get(0).serviceDataFlowTemplates().get(0).direction()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteMockTests.java new file mode 100644 index 000000000000..b1ab8308391f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ServicesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.services().delete("ndzfqivjreuyk", "bmnwa", "ltbxoeeonqlnfw", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetWithResponseMockTests.java new file mode 100644 index 000000000000..7257c77727a8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetWithResponseMockTests.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.Service; +import com.azure.resourcemanager.mobilenetwork.models.TrafficControlPermission; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ServicesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"servicePrecedence\":106775575,\"serviceQosPolicy\":{\"5qi\":246606233,\"allocationAndRetentionPriorityLevel\":1738057369,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"wugiqjti\",\"downlink\":\"gqgdminictteajoh\"}},\"pccRules\":[{\"ruleName\":\"gspnbonhpczykm\",\"rulePrecedence\":462403312,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"wxqcsehchkhufmpq\",\"downlink\":\"mqyjgy\"},\"5qi\":1970671951,\"allocationAndRetentionPriorityLevel\":239242327,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"uzanhsfnhsenwphp\",\"downlink\":\"fngq\"}},\"trafficControl\":\"Blocked\",\"serviceDataFlowTemplates\":[{\"templateName\":\"dftujwjjufwbeqr\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"orhtss\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"qnmdvhazcvjy\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"qswbqerzwx\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"txtd\",\"rulePrecedence\":1174167761,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"lbpktg\",\"downlink\":\"styoua\"},\"5qi\":1232621783,\"allocationAndRetentionPriorityLevel\":1165809393,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"owegmmutey\",\"downlink\":\"eyguq\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"ii\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"spxlzde\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"grijwaiufanrayb\",\"direction\":\"Downlink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"eqfrojs\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"grhydk\",\"rulePrecedence\":502257313,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"ezskiecafygzmx\",\"downlink\":\"eqvdsm\"},\"5qi\":1744360457,\"allocationAndRetentionPriorityLevel\":416842468,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"y\",\"downlink\":\"xalybxawoijpo\"}},\"trafficControl\":\"Blocked\",\"serviceDataFlowTemplates\":[{\"templateName\":\"xpkk\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"djodqhy\",\"rulePrecedence\":1327259513,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"n\",\"downlink\":\"emehllizh\"},\"5qi\":199350721,\"allocationAndRetentionPriorityLevel\":160089592,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"adppyibn\",\"downlink\":\"qladywrxwhydtlu\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"swzsnuyemlowuo\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]}]}]},\"location\":\"xlnwyrmouvblgmo\",\"tags\":{\"vlihcvjd\":\"ltrfowtdvrf\",\"dhftukvhdxlwy\":\"qcrj\"},\"id\":\"jbfqzdk\",\"name\":\"njyixh\",\"type\":\"fratqxmbjroumzz\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Service response = manager.services() + .getWithResponse("y", "mvqdbpbhfckdvez", "rcssbzhddubbnq", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("xlnwyrmouvblgmo", response.location()); + Assertions.assertEquals("ltrfowtdvrf", response.tags().get("vlihcvjd")); + Assertions.assertEquals(106775575, response.servicePrecedence()); + Assertions.assertEquals(246606233, response.serviceQosPolicy().fiveQi()); + Assertions.assertEquals(1738057369, response.serviceQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, response.serviceQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + response.serviceQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("wugiqjti", response.serviceQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("gqgdminictteajoh", response.serviceQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("gspnbonhpczykm", response.pccRules().get(0).ruleName()); + Assertions.assertEquals(462403312, response.pccRules().get(0).rulePrecedence()); + Assertions.assertEquals(1970671951, response.pccRules().get(0).ruleQosPolicy().fiveQi()); + Assertions.assertEquals(239242327, + response.pccRules().get(0).ruleQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, + response.pccRules().get(0).ruleQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + response.pccRules().get(0).ruleQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("uzanhsfnhsenwphp", + response.pccRules().get(0).ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("fngq", response.pccRules().get(0).ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("wxqcsehchkhufmpq", + response.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().uplink()); + Assertions.assertEquals("mqyjgy", response.pccRules().get(0).ruleQosPolicy().guaranteedBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.BLOCKED, response.pccRules().get(0).trafficControl()); + Assertions.assertEquals("dftujwjjufwbeqr", + response.pccRules().get(0).serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.DOWNLINK, + response.pccRules().get(0).serviceDataFlowTemplates().get(0).direction()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkMockTests.java new file mode 100644 index 000000000000..888f8c35a357 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkMockTests.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.SdfDirection; +import com.azure.resourcemanager.mobilenetwork.models.Service; +import com.azure.resourcemanager.mobilenetwork.models.TrafficControlPermission; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ServicesListByMobileNetworkMockTests { + @Test + public void testListByMobileNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Unknown\",\"servicePrecedence\":1650500158,\"serviceQosPolicy\":{\"5qi\":879639926,\"allocationAndRetentionPriorityLevel\":795826837,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"maximumBitRate\":{\"uplink\":\"uasigr\",\"downlink\":\"wsocnequygdjbo\"}},\"pccRules\":[{\"ruleName\":\"rmtqjkqevadr\",\"rulePrecedence\":166558756,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"uawvcmjzk\",\"downlink\":\"iidisczskoswoqiq\"},\"5qi\":1049623274,\"allocationAndRetentionPriorityLevel\":362948209,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"rrcoi\",\"downlink\":\"sbamnppcc\"}},\"trafficControl\":\"Enabled\",\"serviceDataFlowTemplates\":[{\"templateName\":\"tdsbezax\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"ukzxuizh\",\"direction\":\"Bidirectional\",\"protocol\":[],\"remoteIpList\":[]}]},{\"ruleName\":\"nepk\",\"rulePrecedence\":1942019203,\"ruleQosPolicy\":{\"guaranteedBitRate\":{\"uplink\":\"arxqiubx\",\"downlink\":\"ukecpx\"},\"5qi\":962219625,\"allocationAndRetentionPriorityLevel\":2135814710,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"maximumBitRate\":{\"uplink\":\"mkoszudbl\",\"downlink\":\"s\"}},\"trafficControl\":\"Blocked\",\"serviceDataFlowTemplates\":[{\"templateName\":\"caqkiofk\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]},{\"templateName\":\"fmhklbnld\",\"direction\":\"Uplink\",\"protocol\":[],\"remoteIpList\":[]}]}]},\"location\":\"bh\",\"tags\":{\"wusqx\":\"yq\"},\"id\":\"trpb\",\"name\":\"r\",\"type\":\"yuuatvlmbjwcolbm\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.services() + .listByMobileNetwork("valqjrhuzgfxo", "jtpusllywpvtiotz", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("bh", response.iterator().next().location()); + Assertions.assertEquals("yq", response.iterator().next().tags().get("wusqx")); + Assertions.assertEquals(1650500158, response.iterator().next().servicePrecedence()); + Assertions.assertEquals(879639926, response.iterator().next().serviceQosPolicy().fiveQi()); + Assertions.assertEquals(795826837, + response.iterator().next().serviceQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + response.iterator().next().serviceQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + response.iterator().next().serviceQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("uasigr", response.iterator().next().serviceQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("wsocnequygdjbo", + response.iterator().next().serviceQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("rmtqjkqevadr", response.iterator().next().pccRules().get(0).ruleName()); + Assertions.assertEquals(166558756, response.iterator().next().pccRules().get(0).rulePrecedence()); + Assertions.assertEquals(1049623274, response.iterator().next().pccRules().get(0).ruleQosPolicy().fiveQi()); + Assertions.assertEquals(362948209, + response.iterator().next().pccRules().get(0).ruleQosPolicy().allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + response.iterator().next().pccRules().get(0).ruleQosPolicy().preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + response.iterator().next().pccRules().get(0).ruleQosPolicy().preemptionVulnerability()); + Assertions.assertEquals("rrcoi", + response.iterator().next().pccRules().get(0).ruleQosPolicy().maximumBitRate().uplink()); + Assertions.assertEquals("sbamnppcc", + response.iterator().next().pccRules().get(0).ruleQosPolicy().maximumBitRate().downlink()); + Assertions.assertEquals("uawvcmjzk", + response.iterator().next().pccRules().get(0).ruleQosPolicy().guaranteedBitRate().uplink()); + Assertions.assertEquals("iidisczskoswoqiq", + response.iterator().next().pccRules().get(0).ruleQosPolicy().guaranteedBitRate().downlink()); + Assertions.assertEquals(TrafficControlPermission.ENABLED, + response.iterator().next().pccRules().get(0).trafficControl()); + Assertions.assertEquals("tdsbezax", + response.iterator().next().pccRules().get(0).serviceDataFlowTemplates().get(0).templateName()); + Assertions.assertEquals(SdfDirection.BIDIRECTIONAL, + response.iterator().next().pccRules().get(0).serviceDataFlowTemplates().get(0).direction()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SignalingConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SignalingConfigurationTests.java new file mode 100644 index 000000000000..4d28edb59ec0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SignalingConfigurationTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.NasEncryptionType; +import com.azure.resourcemanager.mobilenetwork.models.NasRerouteConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SignalingConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SignalingConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SignalingConfiguration model = BinaryData.fromString( + "{\"nasReroute\":{\"macroMmeGroupId\":1205583230},\"nasEncryption\":[\"NEA1/EEA1\",\"NEA1/EEA1\",\"NEA2/EEA2\",\"NEA0/EEA0\"]}") + .toObject(SignalingConfiguration.class); + Assertions.assertEquals(1205583230, model.nasReroute().macroMmeGroupId()); + Assertions.assertEquals(NasEncryptionType.NEA1_EEA1, model.nasEncryption().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SignalingConfiguration model + = new SignalingConfiguration().withNasReroute(new NasRerouteConfiguration().withMacroMmeGroupId(1205583230)) + .withNasEncryption(Arrays.asList(NasEncryptionType.NEA1_EEA1, NasEncryptionType.NEA1_EEA1, + NasEncryptionType.NEA2_EEA2, NasEncryptionType.NEA0_EEA0)); + model = BinaryData.fromObject(model).toObject(SignalingConfiguration.class); + Assertions.assertEquals(1205583230, model.nasReroute().macroMmeGroupId()); + Assertions.assertEquals(NasEncryptionType.NEA1_EEA1, model.nasEncryption().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimCloneTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimCloneTests.java new file mode 100644 index 000000000000..46b2b5f396c9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimCloneTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.SimClone; +import com.azure.resourcemanager.mobilenetwork.models.SimGroupResourceId; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SimCloneTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimClone model = BinaryData + .fromString("{\"targetSimGroupId\":{\"id\":\"dmflv\"},\"sims\":[\"mjlxrrilozapeewc\",\"pxlktwkuziycsl\"]}") + .toObject(SimClone.class); + Assertions.assertEquals("dmflv", model.targetSimGroupId().id()); + Assertions.assertEquals("mjlxrrilozapeewc", model.sims().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimClone model = new SimClone().withTargetSimGroupId(new SimGroupResourceId().withId("dmflv")) + .withSims(Arrays.asList("mjlxrrilozapeewc", "pxlktwkuziycsl")); + model = BinaryData.fromObject(model).toObject(SimClone.class); + Assertions.assertEquals("dmflv", model.targetSimGroupId().id()); + Assertions.assertEquals("mjlxrrilozapeewc", model.sims().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimDeleteListTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimDeleteListTests.java new file mode 100644 index 000000000000..06d460e8eca7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimDeleteListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SimDeleteListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimDeleteList model + = BinaryData.fromString("{\"sims\":[\"kdncj\",\"xonbzoggculapz\"]}").toObject(SimDeleteList.class); + Assertions.assertEquals("kdncj", model.sims().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimDeleteList model = new SimDeleteList().withSims(Arrays.asList("kdncj", "xonbzoggculapz")); + model = BinaryData.fromObject(model).toObject(SimDeleteList.class); + Assertions.assertEquals("kdncj", model.sims().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupResourceIdTests.java new file mode 100644 index 000000000000..0437fadafce8 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupResourceIdTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.SimGroupResourceId; +import org.junit.jupiter.api.Assertions; + +public final class SimGroupResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimGroupResourceId model = BinaryData.fromString("{\"id\":\"tjb\"}").toObject(SimGroupResourceId.class); + Assertions.assertEquals("tjb", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimGroupResourceId model = new SimGroupResourceId().withId("tjb"); + model = BinaryData.fromObject(model).toObject(SimGroupResourceId.class); + Assertions.assertEquals("tjb", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteMockTests.java new file mode 100644 index 000000000000..4ad277e8851b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SimGroupsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.simGroups().delete("uifr", "vka", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimMoveTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimMoveTests.java new file mode 100644 index 000000000000..8bee1d665b2c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimMoveTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.SimGroupResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimMove; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SimMoveTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimMove model = BinaryData.fromString( + "{\"targetSimGroupId\":{\"id\":\"xrkjpvdw\"},\"sims\":[\"wiivwzjbhyzsx\",\"rkambt\",\"negvmnvuqe\",\"vldspa\"]}") + .toObject(SimMove.class); + Assertions.assertEquals("xrkjpvdw", model.targetSimGroupId().id()); + Assertions.assertEquals("wiivwzjbhyzsx", model.sims().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimMove model = new SimMove().withTargetSimGroupId(new SimGroupResourceId().withId("xrkjpvdw")) + .withSims(Arrays.asList("wiivwzjbhyzsx", "rkambt", "negvmnvuqe", "vldspa")); + model = BinaryData.fromObject(model).toObject(SimMove.class); + Assertions.assertEquals("xrkjpvdw", model.targetSimGroupId().id()); + Assertions.assertEquals("wiivwzjbhyzsx", model.sims().get(0)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..7f6db327593a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateMockTests.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SimPoliciesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"siteProvisioningState\":{\"fho\":\"Updating\",\"xwklooz\":\"Updating\",\"txvcm\":\"Deleting\"},\"ueAmbr\":{\"uplink\":\"funlcpxxvi\",\"downlink\":\"yeyng\"},\"defaultSlice\":{\"id\":\"g\"},\"rfspIndex\":770458191,\"registrationTimer\":1735235828,\"sliceConfigurations\":[{\"slice\":{\"id\":\"ygg\"},\"defaultDataNetwork\":{\"id\":\"pmcrdcuelj\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"ahxm\"},\"sessionAmbr\":{\"uplink\":\"q\",\"downlink\":\"yarvsxzqbglcjk\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"yspthzod\"},\"sessionAmbr\":{\"uplink\":\"btl\",\"downlink\":\"jtgblios\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"kfmkmfdjxyxgbk\"},\"sessionAmbr\":{\"uplink\":\"qvjcteoe\",\"downlink\":\"l\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"slskkz\"},\"sessionAmbr\":{\"uplink\":\"xv\",\"downlink\":\"nzdpvoco\"},\"allowedServices\":[]}]},{\"slice\":{\"id\":\"hpcnabxzfsn\"},\"defaultDataNetwork\":{\"id\":\"gyte\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"zilmhivzkww\"},\"sessionAmbr\":{\"uplink\":\"ncknrzdajlsk\",\"downlink\":\"ptjxulweuc\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"rthxqlehmcg\"},\"sessionAmbr\":{\"uplink\":\"jei\",\"downlink\":\"ue\"},\"allowedServices\":[]}]},{\"slice\":{\"id\":\"oka\"},\"defaultDataNetwork\":{\"id\":\"vfejvqnttmbqda\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"fiv\"},\"sessionAmbr\":{\"uplink\":\"okpysthhzagj\",\"downlink\":\"wyy\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"lhgenuzejgvkv\"},\"sessionAmbr\":{\"uplink\":\"baqszllrzlsmmd\",\"downlink\":\"gmihzpimcqr\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"nxtminklog\"},\"sessionAmbr\":{\"uplink\":\"svtzarhzv\",\"downlink\":\"nsqktc\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"bjwzzos\"},\"sessionAmbr\":{\"uplink\":\"pkybtgl\",\"downlink\":\"kzpgaj\"},\"allowedServices\":[]}]}]},\"location\":\"jcemqbmfuvqar\",\"tags\":{\"fgtdmbvx\":\"uqrebluimmbwx\",\"budbt\":\"kraokq\"},\"id\":\"aokbavlyttaaknwf\",\"name\":\"ke\",\"type\":\"sm\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + SimPolicy response + = manager.simPolicies() + .define("rngl") + .withRegion("ajq") + .withExistingMobileNetwork("slojfkqidnqt", "qxjhqxcsqhtkbtnq") + .withUeAmbr(new Ambr().withUplink("xricctkwmuqq").withDownlink("ajxeiygle")) + .withDefaultSlice(new SliceResourceId().withId("rwvaexhdc")) + .withSliceConfigurations(Arrays + .asList( + new SliceConfiguration().withSlice(new SliceResourceId().withId("kbrup")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("behdmljzacvume")) + .withDataNetworkConfigurations(Arrays.asList(new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("pbibn")) + .withSessionAmbr(new Ambr().withUplink("pphepifexl").withDownlink("qirccj")) + .withAllowedServices(Arrays.asList()))), + new SliceConfiguration().withSlice(new SliceResourceId().withId("ly")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("cgxvrpj")) + .withDataNetworkConfigurations( + Arrays + .asList( + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("czuod")) + .withSessionAmbr( + new Ambr().withUplink("cpunettepdjx").withDownlink("eskoy")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("uiylpc")) + .withSessionAmbr(new Ambr().withUplink("aewse").withDownlink("vesk")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("xegqphr")) + .withSessionAmbr(new Ambr().withUplink("fn").withDownlink("hctmjtsgh")) + .withAllowedServices(Arrays.asList()))), + new SliceConfiguration().withSlice(new SliceResourceId().withId("bcbcpz")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("rpzeqac")) + .withDataNetworkConfigurations(Arrays.asList(new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("dtzmpype")) + .withSessionAmbr(new Ambr().withUplink("cpczshnuqnd").withDownlink("izupfkhu")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration().withDataNetwork(new DataNetworkResourceId().withId("tu")) + .withSessionAmbr(new Ambr().withUplink("zx").withDownlink("mtvtvegwqiukvzwy")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("wtthaokgksk")) + .withSessionAmbr(new Ambr().withUplink("i").withDownlink("bs")) + .withAllowedServices(Arrays.asList()))))) + .withTags(mapOf("dexyionofninbdb", "peexpgeumilhwuit", "cw", "s", "pcbbprtugav", "qrs", "fogdrtbfcm", + "zbcyksiv")) + .withRfspIndex(1400683190) + .withRegistrationTimer(1314607825) + .create(); + + Assertions.assertEquals("jcemqbmfuvqar", response.location()); + Assertions.assertEquals("uqrebluimmbwx", response.tags().get("fgtdmbvx")); + Assertions.assertEquals("funlcpxxvi", response.ueAmbr().uplink()); + Assertions.assertEquals("yeyng", response.ueAmbr().downlink()); + Assertions.assertEquals("g", response.defaultSlice().id()); + Assertions.assertEquals(770458191, response.rfspIndex()); + Assertions.assertEquals(1735235828, response.registrationTimer()); + Assertions.assertEquals("ygg", response.sliceConfigurations().get(0).slice().id()); + Assertions.assertEquals("pmcrdcuelj", response.sliceConfigurations().get(0).defaultDataNetwork().id()); + Assertions.assertEquals("ahxm", + response.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("q", + response.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().uplink()); + Assertions.assertEquals("yarvsxzqbglcjk", + response.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().downlink()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteMockTests.java new file mode 100644 index 000000000000..9da954acbf95 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SimPoliciesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.simPolicies().delete("pfsuqtaaz", "qbxyxoyfpuqqi", "ezxlhdjzqdca", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetWithResponseMockTests.java new file mode 100644 index 000000000000..02037010578a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetWithResponseMockTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SimPoliciesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Deleted\",\"siteProvisioningState\":{\"kgvfnmxaursqf\":\"Deleting\",\"btyi\":\"Adding\",\"yvp\":\"Failed\"},\"ueAmbr\":{\"uplink\":\"rfqjpnqnoo\",\"downlink\":\"sbede\"},\"defaultSlice\":{\"id\":\"rexkxbhxvucn\"},\"rfspIndex\":2132710654,\"registrationTimer\":639452188,\"sliceConfigurations\":[{\"slice\":{\"id\":\"jevdyznf\"},\"defaultDataNetwork\":{\"id\":\"jsvkskmqozzkivy\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"rl\"},\"sessionAmbr\":{\"uplink\":\"izjixlq\",\"downlink\":\"hefkwabsolronqq\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"mgnlqxsjxtel\"},\"sessionAmbr\":{\"uplink\":\"xhvuqbozool\",\"downlink\":\"qocarkuzlbc\"},\"allowedServices\":[]}]},{\"slice\":{\"id\":\"ndtsnxawqytll\"},\"defaultDataNetwork\":{\"id\":\"dyz\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"ckze\"},\"sessionAmbr\":{\"uplink\":\"nxakckyw\",\"downlink\":\"mxgaabjkdtfohfao\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"zvkiwrsiwdy\"},\"sessionAmbr\":{\"uplink\":\"quryk\",\"downlink\":\"rra\"},\"allowedServices\":[]}]}]},\"location\":\"ekcsueh\",\"tags\":{\"cbgydlqi\":\"dac\",\"qxvztpbnfnqtxjt\":\"ywmhmptyrilkfbnr\",\"lswbnf\":\"m\",\"qjn\":\"depld\"},\"id\":\"f\",\"name\":\"ygleexa\",\"type\":\"vmywhsbrcarycsjj\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + SimPolicy response = manager.simPolicies() + .getWithResponse("wvpsoz", "iihjriybmrzo", "pnx", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("ekcsueh", response.location()); + Assertions.assertEquals("dac", response.tags().get("cbgydlqi")); + Assertions.assertEquals("rfqjpnqnoo", response.ueAmbr().uplink()); + Assertions.assertEquals("sbede", response.ueAmbr().downlink()); + Assertions.assertEquals("rexkxbhxvucn", response.defaultSlice().id()); + Assertions.assertEquals(2132710654, response.rfspIndex()); + Assertions.assertEquals(639452188, response.registrationTimer()); + Assertions.assertEquals("jevdyznf", response.sliceConfigurations().get(0).slice().id()); + Assertions.assertEquals("jsvkskmqozzkivy", response.sliceConfigurations().get(0).defaultDataNetwork().id()); + Assertions.assertEquals("rl", + response.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("izjixlq", + response.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().uplink()); + Assertions.assertEquals("hefkwabsolronqq", + response.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().downlink()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkMockTests.java new file mode 100644 index 000000000000..12b1efaf0854 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkMockTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SimPoliciesListByMobileNetworkMockTests { + @Test + public void testListByMobileNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"siteProvisioningState\":{\"ubefgybpmfbfunu\":\"Provisioned\",\"pzkrvfy\":\"Deleting\",\"kdschlzvfictnkjj\":\"NotApplicable\"},\"ueAmbr\":{\"uplink\":\"gcwn\",\"downlink\":\"hbkgfyrt\"},\"defaultSlice\":{\"id\":\"gm\"},\"rfspIndex\":237087161,\"registrationTimer\":655942902,\"sliceConfigurations\":[{\"slice\":{\"id\":\"cdf\"},\"defaultDataNetwork\":{\"id\":\"dqwty\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"vgwmseharxifvqnr\"},\"sessionAmbr\":{\"uplink\":\"tmbpjp\",\"downlink\":\"nvwjhrsidqpxl\"},\"allowedServices\":[]}]},{\"slice\":{\"id\":\"tpakf\"},\"defaultDataNetwork\":{\"id\":\"ngatwmy\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"u\"},\"sessionAmbr\":{\"uplink\":\"rymdwmf\",\"downlink\":\"hpycvjqdvdwkq\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"ldrlefgnaavua\"},\"sessionAmbr\":{\"uplink\":\"n\",\"downlink\":\"etaoutnpdc\"},\"allowedServices\":[]}]}]},\"location\":\"hspfefyihd\",\"tags\":{\"hmtybkcgsuthhll\":\"uyld\",\"jrr\":\"mwynefxexlfciatx\",\"ajfoxc\":\"kmdskjhhxd\"},\"id\":\"scv\",\"name\":\"lxlhuavkrm\",\"type\":\"kmyjmkxett\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.simPolicies().listByMobileNetwork("yvoaqajuvehzp", "dmkrrb", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hspfefyihd", response.iterator().next().location()); + Assertions.assertEquals("uyld", response.iterator().next().tags().get("hmtybkcgsuthhll")); + Assertions.assertEquals("gcwn", response.iterator().next().ueAmbr().uplink()); + Assertions.assertEquals("hbkgfyrt", response.iterator().next().ueAmbr().downlink()); + Assertions.assertEquals("gm", response.iterator().next().defaultSlice().id()); + Assertions.assertEquals(237087161, response.iterator().next().rfspIndex()); + Assertions.assertEquals(655942902, response.iterator().next().registrationTimer()); + Assertions.assertEquals("cdf", response.iterator().next().sliceConfigurations().get(0).slice().id()); + Assertions.assertEquals("dqwty", + response.iterator().next().sliceConfigurations().get(0).defaultDataNetwork().id()); + Assertions.assertEquals("vgwmseharxifvqnr", + response.iterator() + .next() + .sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .dataNetwork() + .id()); + Assertions.assertEquals("tmbpjp", + response.iterator() + .next() + .sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .sessionAmbr() + .uplink()); + Assertions.assertEquals("nvwjhrsidqpxl", + response.iterator() + .next() + .sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .sessionAmbr() + .downlink()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyInnerTests.java new file mode 100644 index 000000000000..166e326ad7e4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyInnerTests.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyInner; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.PduSessionType; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.ServiceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SimPolicyInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimPolicyInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"siteProvisioningState\":{\"tcktyhjtqedcgzu\":\"NotApplicable\",\"mmrqz\":\"Adding\",\"rjvpglydzgkrvqee\":\"Failed\",\"oepry\":\"Deleting\"},\"ueAmbr\":{\"uplink\":\"t\",\"downlink\":\"wytpzdmovz\"},\"defaultSlice\":{\"id\":\"fvaawzqa\"},\"rfspIndex\":1787423883,\"registrationTimer\":97417905,\"sliceConfigurations\":[{\"slice\":{\"id\":\"riglaec\"},\"defaultDataNetwork\":{\"id\":\"ndtic\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"pvz\"},\"sessionAmbr\":{\"uplink\":\"lqtmldgxob\",\"downlink\":\"irclnpk\"},\"5qi\":1115944872,\"allocationAndRetentionPriorityLevel\":1763691901,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"defaultSessionType\":\"IPv6\",\"additionalAllowedSessionTypes\":[\"IPv6\"],\"allowedServices\":[{\"id\":\"jlb\"},{\"id\":\"xqvkjlmxhomdyn\"},{\"id\":\"dwdigumb\"}],\"maximumNumberOfBufferedPackets\":1256720827},{\"dataNetwork\":{\"id\":\"auzzptjazysd\"},\"sessionAmbr\":{\"uplink\":\"hezwwvaiq\",\"downlink\":\"uvvfonkp\"},\"5qi\":1476796114,\"allocationAndRetentionPriorityLevel\":157079545,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"defaultSessionType\":\"IPv4\",\"additionalAllowedSessionTypes\":[\"IPv6\",\"IPv4\",\"IPv4\"],\"allowedServices\":[{\"id\":\"mncsttijfybvp\"}],\"maximumNumberOfBufferedPackets\":1661659645}]}]},\"location\":\"sgsgbdhu\",\"tags\":{\"zvhxnk\":\"njdgkynscliq\",\"bo\":\"mtk\",\"hihfrbbcevqagtlt\":\"ppnvdxz\",\"vgtrdcnifmzzs\":\"hlfkqojpy\"},\"id\":\"ymbrnysuxmpraf\",\"name\":\"g\",\"type\":\"khocxvdfffwaf\"}") + .toObject(SimPolicyInner.class); + Assertions.assertEquals("sgsgbdhu", model.location()); + Assertions.assertEquals("njdgkynscliq", model.tags().get("zvhxnk")); + Assertions.assertEquals("t", model.ueAmbr().uplink()); + Assertions.assertEquals("wytpzdmovz", model.ueAmbr().downlink()); + Assertions.assertEquals("fvaawzqa", model.defaultSlice().id()); + Assertions.assertEquals(1787423883, model.rfspIndex()); + Assertions.assertEquals(97417905, model.registrationTimer()); + Assertions.assertEquals("riglaec", model.sliceConfigurations().get(0).slice().id()); + Assertions.assertEquals("ndtic", model.sliceConfigurations().get(0).defaultDataNetwork().id()); + Assertions.assertEquals("pvz", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("lqtmldgxob", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().uplink()); + Assertions.assertEquals("irclnpk", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().downlink()); + Assertions.assertEquals(1115944872, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).fiveQi()); + Assertions.assertEquals(1763691901, + model.sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).preemptionVulnerability()); + Assertions.assertEquals(PduSessionType.IPV6, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).defaultSessionType()); + Assertions.assertEquals(PduSessionType.IPV6, + model.sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .additionalAllowedSessionTypes() + .get(0)); + Assertions.assertEquals("jlb", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).allowedServices().get(0).id()); + Assertions.assertEquals(1256720827, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).maximumNumberOfBufferedPackets()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimPolicyInner model + = new SimPolicyInner().withLocation("sgsgbdhu") + .withTags(mapOf("zvhxnk", "njdgkynscliq", "bo", "mtk", "hihfrbbcevqagtlt", "ppnvdxz", "vgtrdcnifmzzs", + "hlfkqojpy")) + .withUeAmbr(new Ambr().withUplink("t").withDownlink("wytpzdmovz")) + .withDefaultSlice(new SliceResourceId().withId("fvaawzqa")) + .withRfspIndex(1787423883) + .withRegistrationTimer(97417905) + .withSliceConfigurations( + Arrays + .asList( + new SliceConfiguration().withSlice(new SliceResourceId().withId("riglaec")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("ndtic")) + .withDataNetworkConfigurations( + Arrays.asList( + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("pvz")) + .withSessionAmbr( + new Ambr().withUplink("lqtmldgxob").withDownlink("irclnpk")) + .withFiveQi(1115944872) + .withAllocationAndRetentionPriorityLevel(1763691901) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV6) + .withAdditionalAllowedSessionTypes(Arrays.asList(PduSessionType.IPV6)) + .withAllowedServices(Arrays.asList( + new ServiceResourceId().withId("jlb"), + new ServiceResourceId().withId("xqvkjlmxhomdyn"), + new ServiceResourceId().withId("dwdigumb"))) + .withMaximumNumberOfBufferedPackets(1256720827), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("auzzptjazysd")) + .withSessionAmbr( + new Ambr().withUplink("hezwwvaiq").withDownlink("uvvfonkp")) + .withFiveQi(1476796114) + .withAllocationAndRetentionPriorityLevel(157079545) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes(Arrays.asList(PduSessionType.IPV6, + PduSessionType.IPV4, PduSessionType.IPV4)) + .withAllowedServices( + Arrays.asList(new ServiceResourceId().withId("mncsttijfybvp"))) + .withMaximumNumberOfBufferedPackets(1661659645))))); + model = BinaryData.fromObject(model).toObject(SimPolicyInner.class); + Assertions.assertEquals("sgsgbdhu", model.location()); + Assertions.assertEquals("njdgkynscliq", model.tags().get("zvhxnk")); + Assertions.assertEquals("t", model.ueAmbr().uplink()); + Assertions.assertEquals("wytpzdmovz", model.ueAmbr().downlink()); + Assertions.assertEquals("fvaawzqa", model.defaultSlice().id()); + Assertions.assertEquals(1787423883, model.rfspIndex()); + Assertions.assertEquals(97417905, model.registrationTimer()); + Assertions.assertEquals("riglaec", model.sliceConfigurations().get(0).slice().id()); + Assertions.assertEquals("ndtic", model.sliceConfigurations().get(0).defaultDataNetwork().id()); + Assertions.assertEquals("pvz", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("lqtmldgxob", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().uplink()); + Assertions.assertEquals("irclnpk", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().downlink()); + Assertions.assertEquals(1115944872, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).fiveQi()); + Assertions.assertEquals(1763691901, + model.sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.PREEMPTABLE, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).preemptionVulnerability()); + Assertions.assertEquals(PduSessionType.IPV6, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).defaultSessionType()); + Assertions.assertEquals(PduSessionType.IPV6, + model.sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .additionalAllowedSessionTypes() + .get(0)); + Assertions.assertEquals("jlb", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).allowedServices().get(0).id()); + Assertions.assertEquals(1256720827, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).maximumNumberOfBufferedPackets()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyListResultTests.java new file mode 100644 index 000000000000..41331080f512 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyListResultTests.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyInner; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyListResult; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SimPolicyListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimPolicyListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Unknown\",\"siteProvisioningState\":{\"sjjxundxgketw\":\"NotApplicable\",\"hzjhf\":\"Deleting\"},\"ueAmbr\":{\"uplink\":\"mhv\",\"downlink\":\"muvgp\"},\"defaultSlice\":{\"id\":\"uneqsxvmhf\"},\"rfspIndex\":837522232,\"registrationTimer\":1911590455,\"sliceConfigurations\":[{\"slice\":{\"id\":\"hsasbhu\"},\"defaultDataNetwork\":{\"id\":\"ypoh\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"emslynsqyrp\"},\"sessionAmbr\":{\"uplink\":\"oobrlttyms\",\"downlink\":\"nygq\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"nfwqzdzgtilaxhn\"},\"sessionAmbr\":{\"uplink\":\"hqlyvijo\",\"downlink\":\"wivkxo\"},\"allowedServices\":[]}]},{\"slice\":{\"id\":\"zunbixx\"},\"defaultDataNetwork\":{\"id\":\"ti\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"cpwpg\"},\"sessionAmbr\":{\"uplink\":\"lrcivtsoxfrke\",\"downlink\":\"xpmyyefrpmpdnq\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"skawaoqvmmb\"},\"sessionAmbr\":{\"uplink\":\"pqfrtqlkz\",\"downlink\":\"egnitg\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"kxlzyqdrfeg\"},\"sessionAmbr\":{\"uplink\":\"ealzxwhcansymoyq\",\"downlink\":\"lwigdivbkbx\"},\"allowedServices\":[]}]}]},\"location\":\"mf\",\"tags\":{\"xakjsqzhzb\":\"wasqvdaeyyg\",\"asi\":\"zkgimsid\"},\"id\":\"ddyvvjskgfmo\",\"name\":\"wa\",\"type\":\"pqg\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"siteProvisioningState\":{\"hhvjhh\":\"Updating\"},\"ueAmbr\":{\"uplink\":\"akz\",\"downlink\":\"bbjjidjksyxk\"},\"defaultSlice\":{\"id\":\"xvxevblbjednljla\"},\"rfspIndex\":183271176,\"registrationTimer\":1122513421,\"sliceConfigurations\":[{\"slice\":{\"id\":\"xuns\"},\"defaultDataNetwork\":{\"id\":\"jbnkpp\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"nenlsvxeizzg\"},\"sessionAmbr\":{\"uplink\":\"klnsrmffey\",\"downlink\":\"xcktpiymerteeamm\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"qiekkkzddrt\"},\"sessionAmbr\":{\"uplink\":\"g\",\"downlink\":\"ojbmxv\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"vrefdeesv\"},\"sessionAmbr\":{\"uplink\":\"cuijpxt\",\"downlink\":\"s\"},\"allowedServices\":[]}]},{\"slice\":{\"id\":\"wprtu\"},\"defaultDataNetwork\":{\"id\":\"wsawddjibabxvi\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"tvtzeexavoxtfg\"},\"sessionAmbr\":{\"uplink\":\"ecdmdqbwpy\",\"downlink\":\"q\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"gsfjac\"},\"sessionAmbr\":{\"uplink\":\"slhhxudbxv\",\"downlink\":\"d\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"tnsi\"},\"sessionAmbr\":{\"uplink\":\"ud\",\"downlink\":\"z\"},\"allowedServices\":[]}]},{\"slice\":{\"id\":\"mes\"},\"defaultDataNetwork\":{\"id\":\"kdlpa\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"rcxfailcfxwmdb\"},\"sessionAmbr\":{\"uplink\":\"xdfgsftufqobr\",\"downlink\":\"lnacgcc\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"knh\"},\"sessionAmbr\":{\"uplink\":\"kizvytn\",\"downlink\":\"zvulj\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"aaeranokqgukk\"},\"sessionAmbr\":{\"uplink\":\"qnvb\",\"downlink\":\"oylaxxul\"},\"allowedServices\":[]},{\"dataNetwork\":{\"id\":\"disdosfjbjsvgj\"},\"sessionAmbr\":{\"uplink\":\"whryvycytdcl\",\"downlink\":\"gc\"},\"allowedServices\":[]}]},{\"slice\":{\"id\":\"knfnwmbtmvpdv\"},\"defaultDataNetwork\":{\"id\":\"dhttzaefedxihchr\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"k\"},\"sessionAmbr\":{\"uplink\":\"crjdqnsdfzpbgtg\",\"downlink\":\"ylkdghrje\"},\"allowedServices\":[]}]}]},\"location\":\"tl\",\"tags\":{\"zhokvbwnhh\":\"z\"},\"id\":\"qlgehg\",\"name\":\"pipifh\",\"type\":\"f\"}],\"nextLink\":\"ajvgcxtxjcsheafi\"}") + .toObject(SimPolicyListResult.class); + Assertions.assertEquals("mf", model.value().get(0).location()); + Assertions.assertEquals("wasqvdaeyyg", model.value().get(0).tags().get("xakjsqzhzb")); + Assertions.assertEquals("mhv", model.value().get(0).ueAmbr().uplink()); + Assertions.assertEquals("muvgp", model.value().get(0).ueAmbr().downlink()); + Assertions.assertEquals("uneqsxvmhf", model.value().get(0).defaultSlice().id()); + Assertions.assertEquals(837522232, model.value().get(0).rfspIndex()); + Assertions.assertEquals(1911590455, model.value().get(0).registrationTimer()); + Assertions.assertEquals("hsasbhu", model.value().get(0).sliceConfigurations().get(0).slice().id()); + Assertions.assertEquals("ypoh", model.value().get(0).sliceConfigurations().get(0).defaultDataNetwork().id()); + Assertions.assertEquals("emslynsqyrp", + model.value().get(0).sliceConfigurations().get(0).dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("oobrlttyms", + model.value() + .get(0) + .sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .sessionAmbr() + .uplink()); + Assertions.assertEquals("nygq", + model.value() + .get(0) + .sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .sessionAmbr() + .downlink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimPolicyListResult model + = new SimPolicyListResult() + .withValue( + Arrays + .asList( + new SimPolicyInner().withLocation("mf") + .withTags(mapOf("xakjsqzhzb", "wasqvdaeyyg", "asi", "zkgimsid")) + .withUeAmbr(new Ambr().withUplink("mhv").withDownlink("muvgp")) + .withDefaultSlice(new SliceResourceId().withId("uneqsxvmhf")) + .withRfspIndex(837522232) + .withRegistrationTimer(1911590455) + .withSliceConfigurations(Arrays + .asList( + new SliceConfiguration().withSlice(new SliceResourceId().withId("hsasbhu")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("ypoh")) + .withDataNetworkConfigurations(Arrays.asList(new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("emslynsqyrp")) + .withSessionAmbr( + new Ambr().withUplink("oobrlttyms").withDownlink("nygq")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork( + new DataNetworkResourceId().withId("nfwqzdzgtilaxhn")) + .withSessionAmbr( + new Ambr().withUplink("hqlyvijo").withDownlink("wivkxo")) + .withAllowedServices(Arrays.asList()))), + new SliceConfiguration().withSlice(new SliceResourceId().withId("zunbixx")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("ti")) + .withDataNetworkConfigurations(Arrays.asList( + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("cpwpg")) + .withSessionAmbr(new Ambr().withUplink("lrcivtsoxfrke") + .withDownlink("xpmyyefrpmpdnq")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("skawaoqvmmb")) + .withSessionAmbr( + new Ambr().withUplink("pqfrtqlkz").withDownlink("egnitg")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("kxlzyqdrfeg")) + .withSessionAmbr(new Ambr().withUplink("ealzxwhcansymoyq") + .withDownlink("lwigdivbkbx")) + .withAllowedServices(Arrays.asList()))))), + new SimPolicyInner().withLocation("tl") + .withTags(mapOf("zhokvbwnhh", "z")) + .withUeAmbr(new Ambr().withUplink("akz").withDownlink("bbjjidjksyxk")) + .withDefaultSlice(new SliceResourceId().withId("xvxevblbjednljla")) + .withRfspIndex(183271176) + .withRegistrationTimer(1122513421) + .withSliceConfigurations(Arrays.asList( + new SliceConfiguration() + .withSlice(new SliceResourceId().withId("xuns")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("jbnkpp")) + .withDataNetworkConfigurations(Arrays.asList(new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("nenlsvxeizzg")) + .withSessionAmbr( + new Ambr().withUplink("klnsrmffey").withDownlink("xcktpiymerteeamm")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("qiekkkzddrt")) + .withSessionAmbr(new Ambr().withUplink("g").withDownlink("ojbmxv")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("vrefdeesv")) + .withSessionAmbr(new Ambr().withUplink("cuijpxt").withDownlink("s")) + .withAllowedServices(Arrays.asList()))), + new SliceConfiguration().withSlice(new SliceResourceId().withId("wprtu")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("wsawddjibabxvi")) + .withDataNetworkConfigurations( + Arrays.asList( + new DataNetworkConfiguration() + .withDataNetwork( + new DataNetworkResourceId().withId("tvtzeexavoxtfg")) + .withSessionAmbr( + new Ambr().withUplink("ecdmdqbwpy").withDownlink("q")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("gsfjac")) + .withSessionAmbr( + new Ambr().withUplink("slhhxudbxv").withDownlink("d")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("tnsi")) + .withSessionAmbr(new Ambr().withUplink("ud").withDownlink("z")) + .withAllowedServices(Arrays.asList()))), + new SliceConfiguration() + .withSlice(new SliceResourceId().withId("mes")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("kdlpa")) + .withDataNetworkConfigurations(Arrays.asList(new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("rcxfailcfxwmdb")) + .withSessionAmbr( + new Ambr().withUplink("xdfgsftufqobr").withDownlink("lnacgcc")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("knh")) + .withSessionAmbr(new Ambr().withUplink("kizvytn").withDownlink("zvulj")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("aaeranokqgukk")) + .withSessionAmbr(new Ambr().withUplink("qnvb").withDownlink("oylaxxul")) + .withAllowedServices(Arrays.asList()), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("disdosfjbjsvgj")) + .withSessionAmbr( + new Ambr().withUplink("whryvycytdcl").withDownlink("gc")) + .withAllowedServices(Arrays.asList()))), + new SliceConfiguration().withSlice(new SliceResourceId().withId("knfnwmbtmvpdv")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("dhttzaefedxihchr")) + .withDataNetworkConfigurations(Arrays.asList(new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("k")) + .withSessionAmbr( + new Ambr().withUplink("crjdqnsdfzpbgtg").withDownlink("ylkdghrje")) + .withAllowedServices(Arrays.asList()))))))); + model = BinaryData.fromObject(model).toObject(SimPolicyListResult.class); + Assertions.assertEquals("mf", model.value().get(0).location()); + Assertions.assertEquals("wasqvdaeyyg", model.value().get(0).tags().get("xakjsqzhzb")); + Assertions.assertEquals("mhv", model.value().get(0).ueAmbr().uplink()); + Assertions.assertEquals("muvgp", model.value().get(0).ueAmbr().downlink()); + Assertions.assertEquals("uneqsxvmhf", model.value().get(0).defaultSlice().id()); + Assertions.assertEquals(837522232, model.value().get(0).rfspIndex()); + Assertions.assertEquals(1911590455, model.value().get(0).registrationTimer()); + Assertions.assertEquals("hsasbhu", model.value().get(0).sliceConfigurations().get(0).slice().id()); + Assertions.assertEquals("ypoh", model.value().get(0).sliceConfigurations().get(0).defaultDataNetwork().id()); + Assertions.assertEquals("emslynsqyrp", + model.value().get(0).sliceConfigurations().get(0).dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("oobrlttyms", + model.value() + .get(0) + .sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .sessionAmbr() + .uplink()); + Assertions.assertEquals("nygq", + model.value() + .get(0) + .sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .sessionAmbr() + .downlink()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyPropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyPropertiesFormatTests.java new file mode 100644 index 000000000000..f2ba40cf0ab9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyPropertiesFormatTests.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SimPolicyPropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.PduSessionType; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.ServiceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SimPolicyPropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimPolicyPropertiesFormat model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"siteProvisioningState\":{\"spave\":\"Deleting\",\"r\":\"Adding\",\"bunzozudh\":\"Failed\"},\"ueAmbr\":{\"uplink\":\"xg\",\"downlink\":\"moy\"},\"defaultSlice\":{\"id\":\"cdyuibhmfdnbzyd\"},\"rfspIndex\":1872796730,\"registrationTimer\":1709322147,\"sliceConfigurations\":[{\"slice\":{\"id\":\"naeo\"},\"defaultDataNetwork\":{\"id\":\"srvhmgorffuki\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"vwmzhwplefaxvxil\"},\"sessionAmbr\":{\"uplink\":\"btgn\",\"downlink\":\"nzeyqxtjj\"},\"5qi\":715633855,\"allocationAndRetentionPriorityLevel\":2051044475,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"defaultSessionType\":\"IPv4\",\"additionalAllowedSessionTypes\":[\"IPv6\",\"IPv6\"],\"allowedServices\":[{\"id\":\"beesmieknlra\"},{\"id\":\"iaa\"}],\"maximumNumberOfBufferedPackets\":1541326221},{\"dataNetwork\":{\"id\":\"agy\"},\"sessionAmbr\":{\"uplink\":\"wqfbylyrfgiagt\",\"downlink\":\"ojocqwogf\"},\"5qi\":1301116778,\"allocationAndRetentionPriorityLevel\":2065861659,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"defaultSessionType\":\"IPv6\",\"additionalAllowedSessionTypes\":[\"IPv6\",\"IPv4\",\"IPv4\",\"IPv6\"],\"allowedServices\":[{\"id\":\"sbtkadpysownbtgk\"},{\"id\":\"u\"}],\"maximumNumberOfBufferedPackets\":1343904651},{\"dataNetwork\":{\"id\":\"qctojcmisof\"},\"sessionAmbr\":{\"uplink\":\"eypefojyqd\",\"downlink\":\"cuplcplcwkhih\"},\"5qi\":184216647,\"allocationAndRetentionPriorityLevel\":1075361134,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"defaultSessionType\":\"IPv4\",\"additionalAllowedSessionTypes\":[\"IPv6\",\"IPv4\",\"IPv4\"],\"allowedServices\":[{\"id\":\"cjhfgmvecactxmw\"},{\"id\":\"teyowclu\"}],\"maximumNumberOfBufferedPackets\":1896348924}]},{\"slice\":{\"id\":\"ekqvgqouwif\"},\"defaultDataNetwork\":{\"id\":\"mpjw\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"vqikfxcvhrfsphu\"},\"sessionAmbr\":{\"uplink\":\"grttikteusqczk\",\"downlink\":\"yklxubyjaffmmfbl\"},\"5qi\":1534498660,\"allocationAndRetentionPriorityLevel\":982758961,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"defaultSessionType\":\"IPv4\",\"additionalAllowedSessionTypes\":[\"IPv6\"],\"allowedServices\":[{\"id\":\"etttwgdslqxihhr\"},{\"id\":\"ooizqseyp\"}],\"maximumNumberOfBufferedPackets\":145023209},{\"dataNetwork\":{\"id\":\"tcxapzhyrpetogeb\"},\"sessionAmbr\":{\"uplink\":\"oxslh\",\"downlink\":\"nhl\"},\"5qi\":1064191938,\"allocationAndRetentionPriorityLevel\":413797833,\"preemptionCapability\":\"MayPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"defaultSessionType\":\"IPv4\",\"additionalAllowedSessionTypes\":[\"IPv6\",\"IPv6\"],\"allowedServices\":[{\"id\":\"ehvvib\"},{\"id\":\"xjjs\"},{\"id\":\"oqbeitpkxzt\"},{\"id\":\"oobklftidgfcwq\"}],\"maximumNumberOfBufferedPackets\":817120127},{\"dataNetwork\":{\"id\":\"maqxzhemjyh\"},\"sessionAmbr\":{\"uplink\":\"hujswtwkozzwcul\",\"downlink\":\"bawpfajnjwltlwt\"},\"5qi\":795579219,\"allocationAndRetentionPriorityLevel\":1385863144,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"Preemptable\",\"defaultSessionType\":\"IPv6\",\"additionalAllowedSessionTypes\":[\"IPv6\",\"IPv4\",\"IPv4\",\"IPv4\"],\"allowedServices\":[{\"id\":\"rpoaimlnwi\"}],\"maximumNumberOfBufferedPackets\":1776733764}]}]}") + .toObject(SimPolicyPropertiesFormat.class); + Assertions.assertEquals("xg", model.ueAmbr().uplink()); + Assertions.assertEquals("moy", model.ueAmbr().downlink()); + Assertions.assertEquals("cdyuibhmfdnbzyd", model.defaultSlice().id()); + Assertions.assertEquals(1872796730, model.rfspIndex()); + Assertions.assertEquals(1709322147, model.registrationTimer()); + Assertions.assertEquals("naeo", model.sliceConfigurations().get(0).slice().id()); + Assertions.assertEquals("srvhmgorffuki", model.sliceConfigurations().get(0).defaultDataNetwork().id()); + Assertions.assertEquals("vwmzhwplefaxvxil", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("btgn", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().uplink()); + Assertions.assertEquals("nzeyqxtjj", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().downlink()); + Assertions.assertEquals(715633855, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).fiveQi()); + Assertions.assertEquals(2051044475, + model.sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).preemptionVulnerability()); + Assertions.assertEquals(PduSessionType.IPV4, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).defaultSessionType()); + Assertions.assertEquals(PduSessionType.IPV6, + model.sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .additionalAllowedSessionTypes() + .get(0)); + Assertions.assertEquals("beesmieknlra", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).allowedServices().get(0).id()); + Assertions.assertEquals(1541326221, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).maximumNumberOfBufferedPackets()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimPolicyPropertiesFormat model + = new SimPolicyPropertiesFormat().withUeAmbr(new Ambr().withUplink("xg").withDownlink("moy")) + .withDefaultSlice(new SliceResourceId().withId("cdyuibhmfdnbzyd")) + .withRfspIndex(1872796730) + .withRegistrationTimer(1709322147) + .withSliceConfigurations( + Arrays + .asList( + new SliceConfiguration().withSlice(new SliceResourceId().withId("naeo")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("srvhmgorffuki")) + .withDataNetworkConfigurations( + Arrays + .asList( + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("vwmzhwplefaxvxil")) + .withSessionAmbr( + new Ambr().withUplink("btgn").withDownlink("nzeyqxtjj")) + .withFiveQi(715633855) + .withAllocationAndRetentionPriorityLevel(2051044475) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes( + Arrays.asList(PduSessionType.IPV6, PduSessionType.IPV6)) + .withAllowedServices( + Arrays.asList( + new ServiceResourceId().withId("beesmieknlra"), + new ServiceResourceId().withId("iaa"))) + .withMaximumNumberOfBufferedPackets(1541326221), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("agy")) + .withSessionAmbr( + new Ambr().withUplink("wqfbylyrfgiagt").withDownlink("ojocqwogf")) + .withFiveQi(1301116778) + .withAllocationAndRetentionPriorityLevel(2065861659) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV6) + .withAdditionalAllowedSessionTypes(Arrays.asList(PduSessionType.IPV6, + PduSessionType.IPV4, PduSessionType.IPV4, PduSessionType.IPV6)) + .withAllowedServices( + Arrays.asList(new ServiceResourceId().withId("sbtkadpysownbtgk"), + new ServiceResourceId().withId("u"))) + .withMaximumNumberOfBufferedPackets(1343904651), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("qctojcmisof")) + .withSessionAmbr( + new Ambr().withUplink("eypefojyqd").withDownlink("cuplcplcwkhih")) + .withFiveQi(184216647) + .withAllocationAndRetentionPriorityLevel(1075361134) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes(Arrays.asList(PduSessionType.IPV6, + PduSessionType.IPV4, PduSessionType.IPV4)) + .withAllowedServices( + Arrays.asList(new ServiceResourceId().withId("cjhfgmvecactxmw"), + new ServiceResourceId().withId("teyowclu"))) + .withMaximumNumberOfBufferedPackets(1896348924))), + new SliceConfiguration().withSlice(new SliceResourceId().withId("ekqvgqouwif")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("mpjw")) + .withDataNetworkConfigurations( + Arrays + .asList( + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("vqikfxcvhrfsphu")) + .withSessionAmbr(new Ambr().withUplink("grttikteusqczk") + .withDownlink("yklxubyjaffmmfbl")) + .withFiveQi(1534498660) + .withAllocationAndRetentionPriorityLevel(982758961) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes(Arrays.asList(PduSessionType.IPV6)) + .withAllowedServices(Arrays.asList( + new ServiceResourceId().withId("etttwgdslqxihhr"), + new ServiceResourceId().withId("ooizqseyp"))) + .withMaximumNumberOfBufferedPackets(145023209), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("tcxapzhyrpetogeb")) + .withSessionAmbr(new Ambr().withUplink("oxslh").withDownlink("nhl")) + .withFiveQi(1064191938) + .withAllocationAndRetentionPriorityLevel(413797833) + .withPreemptionCapability(PreemptionCapability.MAY_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes( + Arrays.asList(PduSessionType.IPV6, PduSessionType.IPV6)) + .withAllowedServices(Arrays.asList( + new ServiceResourceId().withId("ehvvib"), + new ServiceResourceId().withId("xjjs"), + new ServiceResourceId().withId( + "oqbeitpkxzt"), + new ServiceResourceId().withId("oobklftidgfcwq"))) + .withMaximumNumberOfBufferedPackets(817120127), + new DataNetworkConfiguration() + .withDataNetwork(new DataNetworkResourceId().withId("maqxzhemjyh")) + .withSessionAmbr(new Ambr().withUplink("hujswtwkozzwcul") + .withDownlink("bawpfajnjwltlwt")) + .withFiveQi(795579219) + .withAllocationAndRetentionPriorityLevel(1385863144) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV6) + .withAdditionalAllowedSessionTypes(Arrays.asList(PduSessionType.IPV6, + PduSessionType.IPV4, PduSessionType.IPV4, PduSessionType.IPV4)) + .withAllowedServices( + Arrays.asList(new ServiceResourceId().withId("rpoaimlnwi"))) + .withMaximumNumberOfBufferedPackets(1776733764))))); + model = BinaryData.fromObject(model).toObject(SimPolicyPropertiesFormat.class); + Assertions.assertEquals("xg", model.ueAmbr().uplink()); + Assertions.assertEquals("moy", model.ueAmbr().downlink()); + Assertions.assertEquals("cdyuibhmfdnbzyd", model.defaultSlice().id()); + Assertions.assertEquals(1872796730, model.rfspIndex()); + Assertions.assertEquals(1709322147, model.registrationTimer()); + Assertions.assertEquals("naeo", model.sliceConfigurations().get(0).slice().id()); + Assertions.assertEquals("srvhmgorffuki", model.sliceConfigurations().get(0).defaultDataNetwork().id()); + Assertions.assertEquals("vwmzhwplefaxvxil", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("btgn", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().uplink()); + Assertions.assertEquals("nzeyqxtjj", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).sessionAmbr().downlink()); + Assertions.assertEquals(715633855, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).fiveQi()); + Assertions.assertEquals(2051044475, + model.sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.MAY_PREEMPT, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).preemptionVulnerability()); + Assertions.assertEquals(PduSessionType.IPV4, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).defaultSessionType()); + Assertions.assertEquals(PduSessionType.IPV6, + model.sliceConfigurations() + .get(0) + .dataNetworkConfigurations() + .get(0) + .additionalAllowedSessionTypes() + .get(0)); + Assertions.assertEquals("beesmieknlra", + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).allowedServices().get(0).id()); + Assertions.assertEquals(1541326221, + model.sliceConfigurations().get(0).dataNetworkConfigurations().get(0).maximumNumberOfBufferedPackets()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyResourceIdTests.java new file mode 100644 index 000000000000..01fcf82d0953 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimPolicyResourceIdTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import org.junit.jupiter.api.Assertions; + +public final class SimPolicyResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimPolicyResourceId model = BinaryData.fromString("{\"id\":\"db\"}").toObject(SimPolicyResourceId.class); + Assertions.assertEquals("db", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimPolicyResourceId model = new SimPolicyResourceId().withId("db"); + model = BinaryData.fromObject(model).toObject(SimPolicyResourceId.class); + Assertions.assertEquals("db", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimStaticIpPropertiesStaticIpTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimStaticIpPropertiesStaticIpTests.java new file mode 100644 index 000000000000..dc8e6ad85ac1 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimStaticIpPropertiesStaticIpTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; +import org.junit.jupiter.api.Assertions; + +public final class SimStaticIpPropertiesStaticIpTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimStaticIpPropertiesStaticIp model + = BinaryData.fromString("{\"ipv4Address\":\"mfpjbabw\"}").toObject(SimStaticIpPropertiesStaticIp.class); + Assertions.assertEquals("mfpjbabw", model.ipv4Address()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimStaticIpPropertiesStaticIp model = new SimStaticIpPropertiesStaticIp().withIpv4Address("mfpjbabw"); + model = BinaryData.fromObject(model).toObject(SimStaticIpPropertiesStaticIp.class); + Assertions.assertEquals("mfpjbabw", model.ipv4Address()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimStaticIpPropertiesTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimStaticIpPropertiesTests.java new file mode 100644 index 000000000000..d9c58801a7c3 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimStaticIpPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import org.junit.jupiter.api.Assertions; + +public final class SimStaticIpPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SimStaticIpProperties model = BinaryData.fromString( + "{\"attachedDataNetwork\":{\"id\":\"vwrdnhfukuvsj\"},\"slice\":{\"id\":\"wsmystuluqypf\"},\"staticIp\":{\"ipv4Address\":\"er\"}}") + .toObject(SimStaticIpProperties.class); + Assertions.assertEquals("vwrdnhfukuvsj", model.attachedDataNetwork().id()); + Assertions.assertEquals("wsmystuluqypf", model.slice().id()); + Assertions.assertEquals("er", model.staticIp().ipv4Address()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SimStaticIpProperties model = new SimStaticIpProperties() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("vwrdnhfukuvsj")) + .withSlice(new SliceResourceId().withId("wsmystuluqypf")) + .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("er")); + model = BinaryData.fromObject(model).toObject(SimStaticIpProperties.class); + Assertions.assertEquals("vwrdnhfukuvsj", model.attachedDataNetwork().id()); + Assertions.assertEquals("wsmystuluqypf", model.slice().id()); + Assertions.assertEquals("er", model.staticIp().ipv4Address()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteMockTests.java new file mode 100644 index 000000000000..aa7a591be390 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SimsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.sims().delete("dgvpyig", "aqqilzdcduwjoed", "ngucaifpaurww", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteDeletePacketCoreTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteDeletePacketCoreTests.java new file mode 100644 index 000000000000..d0f002d3bf2f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteDeletePacketCoreTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; +import org.junit.jupiter.api.Assertions; + +public final class SiteDeletePacketCoreTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SiteDeletePacketCore model = BinaryData.fromString("{\"packetCore\":{\"id\":\"tvlwijpsttexoq\"}}") + .toObject(SiteDeletePacketCore.class); + Assertions.assertEquals("tvlwijpsttexoq", model.packetCore().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SiteDeletePacketCore model = new SiteDeletePacketCore() + .withPacketCore(new PacketCoreControlPlaneResourceId().withId("tvlwijpsttexoq")); + model = BinaryData.fromObject(model).toObject(SiteDeletePacketCore.class); + Assertions.assertEquals("tvlwijpsttexoq", model.packetCore().id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteInnerTests.java new file mode 100644 index 000000000000..531f4ba728e7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteInnerTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SiteInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SiteInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Unknown\",\"networkFunctions\":[{\"id\":\"esmkssjhoiftxfkf\"}]},\"location\":\"gpr\",\"tags\":{\"cbiqtgdqoh\":\"ill\",\"etpwbralll\":\"cwsldri\",\"p\":\"bphbqzmizakakank\"},\"id\":\"n\",\"name\":\"zhajoylhjlmuo\",\"type\":\"xprimrsop\"}") + .toObject(SiteInner.class); + Assertions.assertEquals("gpr", model.location()); + Assertions.assertEquals("ill", model.tags().get("cbiqtgdqoh")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SiteInner model = new SiteInner().withLocation("gpr") + .withTags(mapOf("cbiqtgdqoh", "ill", "etpwbralll", "cwsldri", "p", "bphbqzmizakakank")); + model = BinaryData.fromObject(model).toObject(SiteInner.class); + Assertions.assertEquals("gpr", model.location()); + Assertions.assertEquals("ill", model.tags().get("cbiqtgdqoh")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteListResultTests.java new file mode 100644 index 000000000000..7de216d6448a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteListResultTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import com.azure.resourcemanager.mobilenetwork.models.SiteListResult; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SiteListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SiteListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"networkFunctions\":[{\"id\":\"hguuf\"},{\"id\":\"boyjathwt\"}]},\"location\":\"lbaemwmdxmeb\",\"tags\":{\"veabfqxnmwmqtib\":\"cjpahl\",\"jaeukmrsieekpn\":\"yijddtvqcttad\",\"pibudqwyxebeybpm\":\"zaapmudqmeqwi\"},\"id\":\"znrtffyaqit\",\"name\":\"hheioqaqhvseuf\",\"type\":\"qyrxp\"},{\"properties\":{\"provisioningState\":\"Deleted\",\"networkFunctions\":[{\"id\":\"ismjqfrddgamqu\"},{\"id\":\"os\"},{\"id\":\"ju\"}]},\"location\":\"fcdis\",\"tags\":{\"rxzbujr\":\"nxzhcze\",\"nlnzonzlrpi\":\"rhqvwrevkh\"},\"id\":\"yw\",\"name\":\"cvjtszcofiz\",\"type\":\"htd\"},{\"properties\":{\"provisioningState\":\"Unknown\",\"networkFunctions\":[{\"id\":\"eljeamurvzmlovua\"},{\"id\":\"shcxlpmjerbdk\"}]},\"location\":\"vidizozsdb\",\"tags\":{\"n\":\"jmonfdgn\",\"keifzzhmkdasv\":\"ypuuwwltvuqjctze\"},\"id\":\"lyhb\",\"name\":\"cu\",\"type\":\"chxgs\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"networkFunctions\":[{\"id\":\"robwjlvizbfhf\"},{\"id\":\"vacqpbtuodxesz\"},{\"id\":\"belawumuaslzkwr\"}]},\"location\":\"oycqucwy\",\"tags\":{\"uurutlwexxwlalni\":\"nomdrkywuhpsv\",\"q\":\"xzsrzpge\",\"wwpgdakchzyvlixq\":\"yb\"},\"id\":\"rkcxkj\",\"name\":\"bn\",\"type\":\"mysu\"}],\"nextLink\":\"wq\"}") + .toObject(SiteListResult.class); + Assertions.assertEquals("lbaemwmdxmeb", model.value().get(0).location()); + Assertions.assertEquals("cjpahl", model.value().get(0).tags().get("veabfqxnmwmqtib")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SiteListResult model = new SiteListResult().withValue(Arrays.asList( + new SiteInner().withLocation("lbaemwmdxmeb") + .withTags(mapOf("veabfqxnmwmqtib", "cjpahl", "jaeukmrsieekpn", "yijddtvqcttad", "pibudqwyxebeybpm", + "zaapmudqmeqwi")), + new SiteInner().withLocation("fcdis").withTags(mapOf("rxzbujr", "nxzhcze", "nlnzonzlrpi", "rhqvwrevkh")), + new SiteInner().withLocation("vidizozsdb") + .withTags(mapOf("n", "jmonfdgn", "keifzzhmkdasv", "ypuuwwltvuqjctze")), + new SiteInner().withLocation("oycqucwy") + .withTags(mapOf("uurutlwexxwlalni", "nomdrkywuhpsv", "q", "xzsrzpge", "wwpgdakchzyvlixq", "yb")))); + model = BinaryData.fromObject(model).toObject(SiteListResult.class); + Assertions.assertEquals("lbaemwmdxmeb", model.value().get(0).location()); + Assertions.assertEquals("cjpahl", model.value().get(0).tags().get("veabfqxnmwmqtib")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitePropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitePropertiesFormatTests.java new file mode 100644 index 000000000000..c90a03189ee9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitePropertiesFormatTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SitePropertiesFormat; + +public final class SitePropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SitePropertiesFormat model = BinaryData + .fromString("{\"provisioningState\":\"Deleting\",\"networkFunctions\":[{\"id\":\"eislstvasylwx\"}]}") + .toObject(SitePropertiesFormat.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SitePropertiesFormat model = new SitePropertiesFormat(); + model = BinaryData.fromObject(model).toObject(SitePropertiesFormat.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteResourceIdTests.java new file mode 100644 index 000000000000..6fe769d827b9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SiteResourceIdTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.SiteResourceId; +import org.junit.jupiter.api.Assertions; + +public final class SiteResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SiteResourceId model = BinaryData.fromString("{\"id\":\"vljua\"}").toObject(SiteResourceId.class); + Assertions.assertEquals("vljua", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SiteResourceId model = new SiteResourceId().withId("vljua"); + model = BinaryData.fromObject(model).toObject(SiteResourceId.class); + Assertions.assertEquals("vljua", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..02053b550269 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateMockTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.Site; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SitesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkFunctions\":[{\"id\":\"tollh\"},{\"id\":\"idmytzln\"}]},\"location\":\"xpno\",\"tags\":{\"wqagy\":\"anfbc\",\"tpgaeukya\":\"vtxigvjr\",\"csklhsidsjt\":\"ohpmwhqn\",\"gazlsvbz\":\"lpbnin\"},\"id\":\"cpuo\",\"name\":\"e\",\"type\":\"wjcciklhsy\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Site response = manager.sites() + .define("mqrud") + .withRegion("bcpaqktkrumzued") + .withExistingMobileNetwork("ohdkcprgukx", "ztiochluti") + .withTags(mapOf("gvqrnhyhlwcj", "bfvxovqkxiuxq", "bxrqrkijp", "qggjhf", "qztvx", "uqlsdx")) + .create(); + + Assertions.assertEquals("xpno", response.location()); + Assertions.assertEquals("anfbc", response.tags().get("wqagy")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteMockTests.java new file mode 100644 index 000000000000..cd35b413d9ec --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SitesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.sites().delete("p", "ujd", "gatolekscbctnan", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreMockTests.java new file mode 100644 index 000000000000..df45e686a957 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SitesDeletePacketCoreMockTests { + @Test + public void testDeletePacketCore() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.sites() + .deletePacketCore("yqxzxaqzibmqim", "ymqruqguhfupet", "svvoqsbpkflanfk", + new SiteDeletePacketCore().withPacketCore(new PacketCoreControlPlaneResourceId().withId("syaowuzowp")), + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetWithResponseMockTests.java new file mode 100644 index 000000000000..5e401cf56178 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetWithResponseMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.Site; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SitesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"networkFunctions\":[{\"id\":\"cziu\"},{\"id\":\"s\"},{\"id\":\"rk\"}]},\"location\":\"sjhbtq\",\"tags\":{\"yrfwbivq\":\"fs\",\"yqe\":\"ogfuyzwvbhlim\",\"odlikcdrdaasax\":\"r\",\"wiyjvzuko\":\"obsmf\"},\"id\":\"r\",\"name\":\"awn\",\"type\":\"zm\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Site response = manager.sites() + .getWithResponse("imwbzxpdcldpk", "wnsnlaimouxwks", "mud", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("sjhbtq", response.location()); + Assertions.assertEquals("fs", response.tags().get("yrfwbivq")); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkMockTests.java new file mode 100644 index 000000000000..ab39f1c88017 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.Site; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SitesListByMobileNetworkMockTests { + @Test + public void testListByMobileNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"networkFunctions\":[{\"id\":\"dndoabhjxw\"}]},\"location\":\"weuipmpvksmi\",\"tags\":{\"l\":\"qx\",\"fhyrfrakk\":\"clkrdpq\",\"rcwfcmfcnrjajq\":\"d\",\"zqgxx\":\"atxjtiel\"},\"id\":\"fbbmtlp\",\"name\":\"agynoi\",\"type\":\"rnzcalinc\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.sites().listByMobileNetwork("n", "oywsxvjabjqqaxu", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("weuipmpvksmi", response.iterator().next().location()); + Assertions.assertEquals("qx", response.iterator().next().tags().get("l")); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceConfigurationTests.java new file mode 100644 index 000000000000..d21dc5109f27 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceConfigurationTests.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.PduSessionType; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.ServiceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SliceConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SliceConfiguration model = BinaryData.fromString( + "{\"slice\":{\"id\":\"mylweazulc\"},\"defaultDataNetwork\":{\"id\":\"ethwwnpjhlfz\"},\"dataNetworkConfigurations\":[{\"dataNetwork\":{\"id\":\"pchwa\"},\"sessionAmbr\":{\"uplink\":\"fb\",\"downlink\":\"usnfepgfewet\"},\"5qi\":1730417051,\"allocationAndRetentionPriorityLevel\":378855798,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"defaultSessionType\":\"IPv4\",\"additionalAllowedSessionTypes\":[\"IPv6\",\"IPv4\"],\"allowedServices\":[{\"id\":\"immbcx\"},{\"id\":\"h\"}],\"maximumNumberOfBufferedPackets\":331049008},{\"dataNetwork\":{\"id\":\"orxvxcjzhqiz\"},\"sessionAmbr\":{\"uplink\":\"fpxtg\",\"downlink\":\"scjavftju\"},\"5qi\":562191246,\"allocationAndRetentionPriorityLevel\":2005963573,\"preemptionCapability\":\"NotPreempt\",\"preemptionVulnerability\":\"NotPreemptable\",\"defaultSessionType\":\"IPv4\",\"additionalAllowedSessionTypes\":[\"IPv4\",\"IPv4\",\"IPv4\",\"IPv4\"],\"allowedServices\":[{\"id\":\"civmmg\"},{\"id\":\"f\"}],\"maximumNumberOfBufferedPackets\":1851539206}]}") + .toObject(SliceConfiguration.class); + Assertions.assertEquals("mylweazulc", model.slice().id()); + Assertions.assertEquals("ethwwnpjhlfz", model.defaultDataNetwork().id()); + Assertions.assertEquals("pchwa", model.dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("fb", model.dataNetworkConfigurations().get(0).sessionAmbr().uplink()); + Assertions.assertEquals("usnfepgfewet", model.dataNetworkConfigurations().get(0).sessionAmbr().downlink()); + Assertions.assertEquals(1730417051, model.dataNetworkConfigurations().get(0).fiveQi()); + Assertions.assertEquals(378855798, + model.dataNetworkConfigurations().get(0).allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + model.dataNetworkConfigurations().get(0).preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.dataNetworkConfigurations().get(0).preemptionVulnerability()); + Assertions.assertEquals(PduSessionType.IPV4, model.dataNetworkConfigurations().get(0).defaultSessionType()); + Assertions.assertEquals(PduSessionType.IPV6, + model.dataNetworkConfigurations().get(0).additionalAllowedSessionTypes().get(0)); + Assertions.assertEquals("immbcx", model.dataNetworkConfigurations().get(0).allowedServices().get(0).id()); + Assertions.assertEquals(331049008, model.dataNetworkConfigurations().get(0).maximumNumberOfBufferedPackets()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SliceConfiguration model = new SliceConfiguration().withSlice(new SliceResourceId().withId("mylweazulc")) + .withDefaultDataNetwork(new DataNetworkResourceId().withId("ethwwnpjhlfz")) + .withDataNetworkConfigurations(Arrays.asList( + new DataNetworkConfiguration().withDataNetwork(new DataNetworkResourceId().withId("pchwa")) + .withSessionAmbr(new Ambr().withUplink("fb").withDownlink("usnfepgfewet")) + .withFiveQi(1730417051) + .withAllocationAndRetentionPriorityLevel(378855798) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes(Arrays.asList(PduSessionType.IPV6, PduSessionType.IPV4)) + .withAllowedServices( + Arrays.asList(new ServiceResourceId().withId("immbcx"), new ServiceResourceId().withId("h"))) + .withMaximumNumberOfBufferedPackets(331049008), + new DataNetworkConfiguration().withDataNetwork(new DataNetworkResourceId().withId("orxvxcjzhqiz")) + .withSessionAmbr(new Ambr().withUplink("fpxtg").withDownlink("scjavftju")) + .withFiveQi(562191246) + .withAllocationAndRetentionPriorityLevel(2005963573) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.NOT_PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes(Arrays.asList(PduSessionType.IPV4, PduSessionType.IPV4, + PduSessionType.IPV4, PduSessionType.IPV4)) + .withAllowedServices( + Arrays.asList(new ServiceResourceId().withId("civmmg"), new ServiceResourceId().withId("f"))) + .withMaximumNumberOfBufferedPackets(1851539206))); + model = BinaryData.fromObject(model).toObject(SliceConfiguration.class); + Assertions.assertEquals("mylweazulc", model.slice().id()); + Assertions.assertEquals("ethwwnpjhlfz", model.defaultDataNetwork().id()); + Assertions.assertEquals("pchwa", model.dataNetworkConfigurations().get(0).dataNetwork().id()); + Assertions.assertEquals("fb", model.dataNetworkConfigurations().get(0).sessionAmbr().uplink()); + Assertions.assertEquals("usnfepgfewet", model.dataNetworkConfigurations().get(0).sessionAmbr().downlink()); + Assertions.assertEquals(1730417051, model.dataNetworkConfigurations().get(0).fiveQi()); + Assertions.assertEquals(378855798, + model.dataNetworkConfigurations().get(0).allocationAndRetentionPriorityLevel()); + Assertions.assertEquals(PreemptionCapability.NOT_PREEMPT, + model.dataNetworkConfigurations().get(0).preemptionCapability()); + Assertions.assertEquals(PreemptionVulnerability.NOT_PREEMPTABLE, + model.dataNetworkConfigurations().get(0).preemptionVulnerability()); + Assertions.assertEquals(PduSessionType.IPV4, model.dataNetworkConfigurations().get(0).defaultSessionType()); + Assertions.assertEquals(PduSessionType.IPV6, + model.dataNetworkConfigurations().get(0).additionalAllowedSessionTypes().get(0)); + Assertions.assertEquals("immbcx", model.dataNetworkConfigurations().get(0).allowedServices().get(0).id()); + Assertions.assertEquals(331049008, model.dataNetworkConfigurations().get(0).maximumNumberOfBufferedPackets()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceInnerTests.java new file mode 100644 index 000000000000..509d4948d265 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceInnerTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SliceInner; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SliceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SliceInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Deleted\",\"snssai\":{\"sst\":567152409,\"sd\":\"mqspkcdqzhlctdd\"},\"description\":\"qn\"},\"location\":\"fpch\",\"tags\":{\"umvq\":\"njjrcgegydcwbox\"},\"id\":\"olihrra\",\"name\":\"ouau\",\"type\":\"rjtloq\"}") + .toObject(SliceInner.class); + Assertions.assertEquals("fpch", model.location()); + Assertions.assertEquals("njjrcgegydcwbox", model.tags().get("umvq")); + Assertions.assertEquals(567152409, model.snssai().sst()); + Assertions.assertEquals("mqspkcdqzhlctdd", model.snssai().sd()); + Assertions.assertEquals("qn", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SliceInner model = new SliceInner().withLocation("fpch") + .withTags(mapOf("umvq", "njjrcgegydcwbox")) + .withSnssai(new Snssai().withSst(567152409).withSd("mqspkcdqzhlctdd")) + .withDescription("qn"); + model = BinaryData.fromObject(model).toObject(SliceInner.class); + Assertions.assertEquals("fpch", model.location()); + Assertions.assertEquals("njjrcgegydcwbox", model.tags().get("umvq")); + Assertions.assertEquals(567152409, model.snssai().sst()); + Assertions.assertEquals("mqspkcdqzhlctdd", model.snssai().sd()); + Assertions.assertEquals("qn", model.description()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceListResultTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceListResultTests.java new file mode 100644 index 000000000000..b63bdf9de0fc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceListResultTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SliceInner; +import com.azure.resourcemanager.mobilenetwork.models.SliceListResult; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SliceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SliceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"snssai\":{\"sst\":1738814564,\"sd\":\"dvruzslzojhpctf\"},\"description\":\"dxotng\"},\"location\":\"gugey\",\"tags\":{\"jee\":\"grkyuizabsnmfpph\",\"omfgbeglqgleohib\":\"yhyhsgzfczb\"},\"id\":\"tnluankrr\",\"name\":\"xeeebtijvacvbmqz\",\"type\":\"qqxlajr\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"snssai\":{\"sst\":799727678,\"sd\":\"evehjkuyxoaf\"},\"description\":\"oqltfae\"},\"location\":\"inmfgvxirp\",\"tags\":{\"yznuciqd\":\"iypoqeyhlqhykprl\",\"asiibmiybnnust\":\"mexiitdfuxt\",\"nmgixh\":\"nlj\",\"oudorhcgyyp\":\"mavmq\"},\"id\":\"otwypundmb\",\"name\":\"hu\",\"type\":\"cmjkavlgorbmftpm\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"snssai\":{\"sst\":1730011842,\"sd\":\"ltfvnz\"},\"description\":\"jtotpvopvpbd\"},\"location\":\"qgqqihedsvqwthmk\",\"tags\":{\"qcwdhoh\":\"cysihs\",\"sufco\":\"dtmcd\"},\"id\":\"dxbzlmcmuap\",\"name\":\"vhdbevwqqxey\",\"type\":\"ko\"}],\"nextLink\":\"zinkfkbgbzbowxeq\"}") + .toObject(SliceListResult.class); + Assertions.assertEquals("gugey", model.value().get(0).location()); + Assertions.assertEquals("grkyuizabsnmfpph", model.value().get(0).tags().get("jee")); + Assertions.assertEquals(1738814564, model.value().get(0).snssai().sst()); + Assertions.assertEquals("dvruzslzojhpctf", model.value().get(0).snssai().sd()); + Assertions.assertEquals("dxotng", model.value().get(0).description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SliceListResult model = new SliceListResult().withValue(Arrays.asList( + new SliceInner().withLocation("gugey") + .withTags(mapOf("jee", "grkyuizabsnmfpph", "omfgbeglqgleohib", "yhyhsgzfczb")) + .withSnssai(new Snssai().withSst(1738814564).withSd("dvruzslzojhpctf")) + .withDescription("dxotng"), + new SliceInner().withLocation("inmfgvxirp") + .withTags(mapOf("yznuciqd", "iypoqeyhlqhykprl", "asiibmiybnnust", "mexiitdfuxt", "nmgixh", "nlj", + "oudorhcgyyp", "mavmq")) + .withSnssai(new Snssai().withSst(799727678).withSd("evehjkuyxoaf")) + .withDescription("oqltfae"), + new SliceInner().withLocation("qgqqihedsvqwthmk") + .withTags(mapOf("qcwdhoh", "cysihs", "sufco", "dtmcd")) + .withSnssai(new Snssai().withSst(1730011842).withSd("ltfvnz")) + .withDescription("jtotpvopvpbd"))); + model = BinaryData.fromObject(model).toObject(SliceListResult.class); + Assertions.assertEquals("gugey", model.value().get(0).location()); + Assertions.assertEquals("grkyuizabsnmfpph", model.value().get(0).tags().get("jee")); + Assertions.assertEquals(1738814564, model.value().get(0).snssai().sst()); + Assertions.assertEquals("dvruzslzojhpctf", model.value().get(0).snssai().sd()); + Assertions.assertEquals("dxotng", model.value().get(0).description()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicePropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicePropertiesFormatTests.java new file mode 100644 index 000000000000..e3387b23fd27 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicePropertiesFormatTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.SlicePropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import org.junit.jupiter.api.Assertions; + +public final class SlicePropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SlicePropertiesFormat model = BinaryData.fromString( + "{\"provisioningState\":\"Unknown\",\"snssai\":{\"sst\":373191664,\"sd\":\"rngifl\"},\"description\":\"pasccbi\"}") + .toObject(SlicePropertiesFormat.class); + Assertions.assertEquals(373191664, model.snssai().sst()); + Assertions.assertEquals("rngifl", model.snssai().sd()); + Assertions.assertEquals("pasccbi", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SlicePropertiesFormat model + = new SlicePropertiesFormat().withSnssai(new Snssai().withSst(373191664).withSd("rngifl")) + .withDescription("pasccbi"); + model = BinaryData.fromObject(model).toObject(SlicePropertiesFormat.class); + Assertions.assertEquals(373191664, model.snssai().sst()); + Assertions.assertEquals("rngifl", model.snssai().sd()); + Assertions.assertEquals("pasccbi", model.description()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceResourceIdTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceResourceIdTests.java new file mode 100644 index 000000000000..913fa00eb027 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SliceResourceIdTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import org.junit.jupiter.api.Assertions; + +public final class SliceResourceIdTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SliceResourceId model = BinaryData.fromString("{\"id\":\"hp\"}").toObject(SliceResourceId.class); + Assertions.assertEquals("hp", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SliceResourceId model = new SliceResourceId().withId("hp"); + model = BinaryData.fromObject(model).toObject(SliceResourceId.class); + Assertions.assertEquals("hp", model.id()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..bf78135c7d6b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateMockTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.Slice; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SlicesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"snssai\":{\"sst\":1214725859,\"sd\":\"aqttiek\"},\"description\":\"fuvnyttzgixgyri\"},\"location\":\"gm\",\"tags\":{\"rndpgfjodhdaqotw\":\"hlqtxnrflkn\"},\"id\":\"hipx\",\"name\":\"gsabvcipowzafc\",\"type\":\"uumljcirvpefyc\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Slice response = manager.slices() + .define("xdm") + .withRegion("qmzjqrbrpvnmdy") + .withExistingMobileNetwork("yxpzruzythqk", "whbgxvellvul") + .withSnssai(new Snssai().withSst(857086606).withSd("jdtvmclyymffhmj")) + .withTags(mapOf("t", "bojtjppglaohoqkp", "lmhxdqaolfylnk", "qjilaywkdcwmqsyr", "tmfwobbjwhl", "bjpjvlyw")) + .withDescription("dnyxfzuvrz") + .create(); + + Assertions.assertEquals("gm", response.location()); + Assertions.assertEquals("hlqtxnrflkn", response.tags().get("rndpgfjodhdaqotw")); + Assertions.assertEquals(1214725859, response.snssai().sst()); + Assertions.assertEquals("aqttiek", response.snssai().sd()); + Assertions.assertEquals("fuvnyttzgixgyri", response.description()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteMockTests.java new file mode 100644 index 000000000000..ad260031c596 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SlicesDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.slices().delete("krdre", "xolriy", "h", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetWithResponseMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetWithResponseMockTests.java new file mode 100644 index 000000000000..e54111a98a6a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetWithResponseMockTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.Slice; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SlicesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"snssai\":{\"sst\":438306218,\"sd\":\"deani\"},\"description\":\"llbvgwzsfftedous\"},\"location\":\"tjtgravaqogfkb\",\"tags\":{\"f\":\"uzlqbtxxw\",\"pzkg\":\"njzudr\",\"gqbedygi\":\"eboywhczzqrhm\"},\"id\":\"rzwnyk\",\"name\":\"id\",\"type\":\"chl\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Slice response = manager.slices() + .getWithResponse("beivdlhydwbdbfg", "lpu", "ytjlkesmmpath", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("tjtgravaqogfkb", response.location()); + Assertions.assertEquals("uzlqbtxxw", response.tags().get("f")); + Assertions.assertEquals(438306218, response.snssai().sst()); + Assertions.assertEquals("deani", response.snssai().sd()); + Assertions.assertEquals("llbvgwzsfftedous", response.description()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkMockTests.java new file mode 100644 index 000000000000..1f911e81b9e4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkMockTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.Slice; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SlicesListByMobileNetworkMockTests { + @Test + public void testListByMobileNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"snssai\":{\"sst\":1754727527,\"sd\":\"jiye\"},\"description\":\"fj\"},\"location\":\"wqrxetfgcwv\",\"tags\":{\"ax\":\"dqntycnawthv\",\"jecehokwc\":\"nuyeamcmhud\",\"rg\":\"qtwloes\"},\"id\":\"vrbnyrukoil\",\"name\":\"ciduwjle\",\"type\":\"pjlh\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.slices().listByMobileNetwork("mpwctoflds", "acdhztxkbr", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("wqrxetfgcwv", response.iterator().next().location()); + Assertions.assertEquals("dqntycnawthv", response.iterator().next().tags().get("ax")); + Assertions.assertEquals(1754727527, response.iterator().next().snssai().sst()); + Assertions.assertEquals("jiye", response.iterator().next().snssai().sd()); + Assertions.assertEquals("fj", response.iterator().next().description()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SnssaiTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SnssaiTests.java new file mode 100644 index 000000000000..4f3b92034247 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/SnssaiTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import org.junit.jupiter.api.Assertions; + +public final class SnssaiTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Snssai model = BinaryData.fromString("{\"sst\":1776866664,\"sd\":\"zdlyjdfqw\"}").toObject(Snssai.class); + Assertions.assertEquals(1776866664, model.sst()); + Assertions.assertEquals("zdlyjdfqw", model.sd()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Snssai model = new Snssai().withSst(1776866664).withSd("zdlyjdfqw"); + model = BinaryData.fromObject(model).toObject(Snssai.class); + Assertions.assertEquals(1776866664, model.sst()); + Assertions.assertEquals("zdlyjdfqw", model.sd()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/TagsObjectTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/TagsObjectTests.java new file mode 100644 index 000000000000..d19408df26fa --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/TagsObjectTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class TagsObjectTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TagsObject model = BinaryData.fromString("{\"tags\":{\"fdosyg\":\"lahbcryff\"}}").toObject(TagsObject.class); + Assertions.assertEquals("lahbcryff", model.tags().get("fdosyg")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TagsObject model = new TagsObject().withTags(mapOf("fdosyg", "lahbcryff")); + model = BinaryData.fromObject(model).toObject(TagsObject.class); + Assertions.assertEquals("lahbcryff", model.tags().get("fdosyg")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeConnectionInfo4GTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeConnectionInfo4GTests.java new file mode 100644 index 000000000000..5ab5affca12b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeConnectionInfo4GTests.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.GNbId; +import com.azure.resourcemanager.mobilenetwork.models.GlobalRanNodeId; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.RrcEstablishmentCause; +import com.azure.resourcemanager.mobilenetwork.models.UeConnectionInfo4G; +import com.azure.resourcemanager.mobilenetwork.models.UeLocationInfo; +import com.azure.resourcemanager.mobilenetwork.models.UeState; +import com.azure.resourcemanager.mobilenetwork.models.UeUsageSetting; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class UeConnectionInfo4GTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeConnectionInfo4G model = BinaryData.fromString( + "{\"locationInfo\":{\"locationType\":\"s\",\"tac\":\"njlx\",\"plmn\":{\"mcc\":\"zrhwp\",\"mnc\":\"sxjb\"}},\"globalRanNodeId\":{\"plmnId\":{\"mcc\":\"qehgpd\",\"mnc\":\"hzjqatucoige\"},\"gNbId\":{\"bitLength\":1751850154,\"gNBValue\":\"wfepbnwgfmx\"},\"ngeNbId\":\"cgbjbgdlfgt\",\"eNbId\":\"snaquf\",\"n3IwfId\":\"bctqhamzjrwd\",\"wagfId\":\"zeqyjleziun\",\"tngfId\":\"dfzantkwcegy\",\"nid\":\"lbnseqac\"},\"perUeTnla\":\"vpilg\",\"mmeS1apId\":1863370617,\"enbS1apId\":471177437,\"lastVisitedTai\":\"jagmdi\",\"ueState\":\"Connected\",\"rrcEstablishmentCause\":\"MobileTerminatedData\",\"ueUsageSetting\":\"DataCentric\",\"lastActivityTime\":\"2021-10-04T09:01:28Z\"}") + .toObject(UeConnectionInfo4G.class); + Assertions.assertEquals("s", model.locationInfo().locationType()); + Assertions.assertEquals("njlx", model.locationInfo().tac()); + Assertions.assertEquals("zrhwp", model.locationInfo().plmn().mcc()); + Assertions.assertEquals("sxjb", model.locationInfo().plmn().mnc()); + Assertions.assertEquals("qehgpd", model.globalRanNodeId().plmnId().mcc()); + Assertions.assertEquals("hzjqatucoige", model.globalRanNodeId().plmnId().mnc()); + Assertions.assertEquals(1751850154, model.globalRanNodeId().gNbId().bitLength()); + Assertions.assertEquals("wfepbnwgfmx", model.globalRanNodeId().gNbId().gNBValue()); + Assertions.assertEquals("cgbjbgdlfgt", model.globalRanNodeId().ngeNbId()); + Assertions.assertEquals("snaquf", model.globalRanNodeId().eNbId()); + Assertions.assertEquals("bctqhamzjrwd", model.globalRanNodeId().n3IwfId()); + Assertions.assertEquals("zeqyjleziun", model.globalRanNodeId().wagfId()); + Assertions.assertEquals("dfzantkwcegy", model.globalRanNodeId().tngfId()); + Assertions.assertEquals("lbnseqac", model.globalRanNodeId().nid()); + Assertions.assertEquals("vpilg", model.perUeTnla()); + Assertions.assertEquals(1863370617, model.mmeS1ApId()); + Assertions.assertEquals(471177437, model.enbS1ApId()); + Assertions.assertEquals("jagmdi", model.lastVisitedTai()); + Assertions.assertEquals(UeState.CONNECTED, model.ueState()); + Assertions.assertEquals(RrcEstablishmentCause.MOBILE_TERMINATED_DATA, model.rrcEstablishmentCause()); + Assertions.assertEquals(UeUsageSetting.DATA_CENTRIC, model.ueUsageSetting()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-04T09:01:28Z"), model.lastActivityTime()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeConnectionInfo4G model = new UeConnectionInfo4G() + .withLocationInfo(new UeLocationInfo().withLocationType("s") + .withTac("njlx") + .withPlmn(new PlmnId().withMcc("zrhwp").withMnc("sxjb"))) + .withGlobalRanNodeId( + new GlobalRanNodeId().withPlmnId(new PlmnId().withMcc("qehgpd").withMnc("hzjqatucoige")) + .withGNbId(new GNbId().withBitLength(1751850154).withGNBValue("wfepbnwgfmx")) + .withNgeNbId("cgbjbgdlfgt") + .withENbId("snaquf") + .withN3IwfId("bctqhamzjrwd") + .withWagfId("zeqyjleziun") + .withTngfId("dfzantkwcegy") + .withNid("lbnseqac")) + .withPerUeTnla("vpilg") + .withMmeS1ApId(1863370617) + .withEnbS1ApId(471177437) + .withLastVisitedTai("jagmdi") + .withUeState(UeState.CONNECTED) + .withRrcEstablishmentCause(RrcEstablishmentCause.MOBILE_TERMINATED_DATA) + .withUeUsageSetting(UeUsageSetting.DATA_CENTRIC) + .withLastActivityTime(OffsetDateTime.parse("2021-10-04T09:01:28Z")); + model = BinaryData.fromObject(model).toObject(UeConnectionInfo4G.class); + Assertions.assertEquals("s", model.locationInfo().locationType()); + Assertions.assertEquals("njlx", model.locationInfo().tac()); + Assertions.assertEquals("zrhwp", model.locationInfo().plmn().mcc()); + Assertions.assertEquals("sxjb", model.locationInfo().plmn().mnc()); + Assertions.assertEquals("qehgpd", model.globalRanNodeId().plmnId().mcc()); + Assertions.assertEquals("hzjqatucoige", model.globalRanNodeId().plmnId().mnc()); + Assertions.assertEquals(1751850154, model.globalRanNodeId().gNbId().bitLength()); + Assertions.assertEquals("wfepbnwgfmx", model.globalRanNodeId().gNbId().gNBValue()); + Assertions.assertEquals("cgbjbgdlfgt", model.globalRanNodeId().ngeNbId()); + Assertions.assertEquals("snaquf", model.globalRanNodeId().eNbId()); + Assertions.assertEquals("bctqhamzjrwd", model.globalRanNodeId().n3IwfId()); + Assertions.assertEquals("zeqyjleziun", model.globalRanNodeId().wagfId()); + Assertions.assertEquals("dfzantkwcegy", model.globalRanNodeId().tngfId()); + Assertions.assertEquals("lbnseqac", model.globalRanNodeId().nid()); + Assertions.assertEquals("vpilg", model.perUeTnla()); + Assertions.assertEquals(1863370617, model.mmeS1ApId()); + Assertions.assertEquals(471177437, model.enbS1ApId()); + Assertions.assertEquals("jagmdi", model.lastVisitedTai()); + Assertions.assertEquals(UeState.CONNECTED, model.ueState()); + Assertions.assertEquals(RrcEstablishmentCause.MOBILE_TERMINATED_DATA, model.rrcEstablishmentCause()); + Assertions.assertEquals(UeUsageSetting.DATA_CENTRIC, model.ueUsageSetting()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-04T09:01:28Z"), model.lastActivityTime()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeConnectionInfo5GTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeConnectionInfo5GTests.java new file mode 100644 index 000000000000..0cd01a145b95 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeConnectionInfo5GTests.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.GNbId; +import com.azure.resourcemanager.mobilenetwork.models.GlobalRanNodeId; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.RrcEstablishmentCause; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import com.azure.resourcemanager.mobilenetwork.models.UeConnectionInfo5G; +import com.azure.resourcemanager.mobilenetwork.models.UeLocationInfo; +import com.azure.resourcemanager.mobilenetwork.models.UeState; +import com.azure.resourcemanager.mobilenetwork.models.UeUsageSetting; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class UeConnectionInfo5GTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeConnectionInfo5G model = BinaryData.fromString( + "{\"locationInfo\":{\"locationType\":\"qcbfrmbodths\",\"tac\":\"qgvriibakcla\",\"plmn\":{\"mcc\":\"jfrnxousxauzlwv\",\"mnc\":\"gmwohqfzizvu\"}},\"globalRanNodeId\":{\"plmnId\":{\"mcc\":\"mmkjsvthnwpztek\",\"mnc\":\"vmribiat\"},\"gNbId\":{\"bitLength\":456926110,\"gNBValue\":\"cfotangcfhnykzcu\"},\"ngeNbId\":\"wvxwlmzqwmvt\",\"eNbId\":\"jmxmcuqud\",\"n3IwfId\":\"vclx\",\"wagfId\":\"pdkvg\",\"tngfId\":\"buiyji\",\"nid\":\"zphdugneiknp\"},\"perUeTnla\":\"xgjiuqh\",\"amfUeNgapId\":1708229308799897707,\"ranUeNgapId\":1626830622,\"lastVisitedTai\":\"ipq\",\"allowedNssai\":[{\"sst\":95705489,\"sd\":\"urrxxgewpktv\"},{\"sst\":1381098036,\"sd\":\"kmqp\"},{\"sst\":26203163,\"sd\":\"hlfbcgwgc\"}],\"ueState\":\"Idle\",\"rrcEstablishmentCause\":\"MobileTerminatedData\",\"ueUsageSetting\":\"DataCentric\",\"lastActivityTime\":\"2021-08-15T06:57:59Z\"}") + .toObject(UeConnectionInfo5G.class); + Assertions.assertEquals("qcbfrmbodths", model.locationInfo().locationType()); + Assertions.assertEquals("qgvriibakcla", model.locationInfo().tac()); + Assertions.assertEquals("jfrnxousxauzlwv", model.locationInfo().plmn().mcc()); + Assertions.assertEquals("gmwohqfzizvu", model.locationInfo().plmn().mnc()); + Assertions.assertEquals("mmkjsvthnwpztek", model.globalRanNodeId().plmnId().mcc()); + Assertions.assertEquals("vmribiat", model.globalRanNodeId().plmnId().mnc()); + Assertions.assertEquals(456926110, model.globalRanNodeId().gNbId().bitLength()); + Assertions.assertEquals("cfotangcfhnykzcu", model.globalRanNodeId().gNbId().gNBValue()); + Assertions.assertEquals("wvxwlmzqwmvt", model.globalRanNodeId().ngeNbId()); + Assertions.assertEquals("jmxmcuqud", model.globalRanNodeId().eNbId()); + Assertions.assertEquals("vclx", model.globalRanNodeId().n3IwfId()); + Assertions.assertEquals("pdkvg", model.globalRanNodeId().wagfId()); + Assertions.assertEquals("buiyji", model.globalRanNodeId().tngfId()); + Assertions.assertEquals("zphdugneiknp", model.globalRanNodeId().nid()); + Assertions.assertEquals("xgjiuqh", model.perUeTnla()); + Assertions.assertEquals(1708229308799897707L, model.amfUeNgapId()); + Assertions.assertEquals(1626830622, model.ranUeNgapId()); + Assertions.assertEquals("ipq", model.lastVisitedTai()); + Assertions.assertEquals(95705489, model.allowedNssai().get(0).sst()); + Assertions.assertEquals("urrxxgewpktv", model.allowedNssai().get(0).sd()); + Assertions.assertEquals(UeState.IDLE, model.ueState()); + Assertions.assertEquals(RrcEstablishmentCause.MOBILE_TERMINATED_DATA, model.rrcEstablishmentCause()); + Assertions.assertEquals(UeUsageSetting.DATA_CENTRIC, model.ueUsageSetting()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T06:57:59Z"), model.lastActivityTime()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeConnectionInfo5G model = new UeConnectionInfo5G() + .withLocationInfo(new UeLocationInfo().withLocationType("qcbfrmbodths") + .withTac("qgvriibakcla") + .withPlmn(new PlmnId().withMcc("jfrnxousxauzlwv").withMnc("gmwohqfzizvu"))) + .withGlobalRanNodeId( + new GlobalRanNodeId().withPlmnId(new PlmnId().withMcc("mmkjsvthnwpztek").withMnc("vmribiat")) + .withGNbId(new GNbId().withBitLength(456926110).withGNBValue("cfotangcfhnykzcu")) + .withNgeNbId("wvxwlmzqwmvt") + .withENbId("jmxmcuqud") + .withN3IwfId("vclx") + .withWagfId("pdkvg") + .withTngfId("buiyji") + .withNid("zphdugneiknp")) + .withPerUeTnla("xgjiuqh") + .withAmfUeNgapId(1708229308799897707L) + .withRanUeNgapId(1626830622) + .withLastVisitedTai("ipq") + .withAllowedNssai(Arrays.asList(new Snssai().withSst(95705489).withSd("urrxxgewpktv"), + new Snssai().withSst(1381098036).withSd("kmqp"), new Snssai().withSst(26203163).withSd("hlfbcgwgc"))) + .withUeState(UeState.IDLE) + .withRrcEstablishmentCause(RrcEstablishmentCause.MOBILE_TERMINATED_DATA) + .withUeUsageSetting(UeUsageSetting.DATA_CENTRIC) + .withLastActivityTime(OffsetDateTime.parse("2021-08-15T06:57:59Z")); + model = BinaryData.fromObject(model).toObject(UeConnectionInfo5G.class); + Assertions.assertEquals("qcbfrmbodths", model.locationInfo().locationType()); + Assertions.assertEquals("qgvriibakcla", model.locationInfo().tac()); + Assertions.assertEquals("jfrnxousxauzlwv", model.locationInfo().plmn().mcc()); + Assertions.assertEquals("gmwohqfzizvu", model.locationInfo().plmn().mnc()); + Assertions.assertEquals("mmkjsvthnwpztek", model.globalRanNodeId().plmnId().mcc()); + Assertions.assertEquals("vmribiat", model.globalRanNodeId().plmnId().mnc()); + Assertions.assertEquals(456926110, model.globalRanNodeId().gNbId().bitLength()); + Assertions.assertEquals("cfotangcfhnykzcu", model.globalRanNodeId().gNbId().gNBValue()); + Assertions.assertEquals("wvxwlmzqwmvt", model.globalRanNodeId().ngeNbId()); + Assertions.assertEquals("jmxmcuqud", model.globalRanNodeId().eNbId()); + Assertions.assertEquals("vclx", model.globalRanNodeId().n3IwfId()); + Assertions.assertEquals("pdkvg", model.globalRanNodeId().wagfId()); + Assertions.assertEquals("buiyji", model.globalRanNodeId().tngfId()); + Assertions.assertEquals("zphdugneiknp", model.globalRanNodeId().nid()); + Assertions.assertEquals("xgjiuqh", model.perUeTnla()); + Assertions.assertEquals(1708229308799897707L, model.amfUeNgapId()); + Assertions.assertEquals(1626830622, model.ranUeNgapId()); + Assertions.assertEquals("ipq", model.lastVisitedTai()); + Assertions.assertEquals(95705489, model.allowedNssai().get(0).sst()); + Assertions.assertEquals("urrxxgewpktv", model.allowedNssai().get(0).sd()); + Assertions.assertEquals(UeState.IDLE, model.ueState()); + Assertions.assertEquals(RrcEstablishmentCause.MOBILE_TERMINATED_DATA, model.rrcEstablishmentCause()); + Assertions.assertEquals(UeUsageSetting.DATA_CENTRIC, model.ueUsageSetting()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T06:57:59Z"), model.lastActivityTime()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfo5GPropertiesTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfo5GPropertiesTests.java new file mode 100644 index 000000000000..a0216f6b41d6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfo5GPropertiesTests.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.AmfId; +import com.azure.resourcemanager.mobilenetwork.models.GNbId; +import com.azure.resourcemanager.mobilenetwork.models.GlobalRanNodeId; +import com.azure.resourcemanager.mobilenetwork.models.Guti5G; +import com.azure.resourcemanager.mobilenetwork.models.PdnType; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.RrcEstablishmentCause; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import com.azure.resourcemanager.mobilenetwork.models.UeConnectionInfo5G; +import com.azure.resourcemanager.mobilenetwork.models.UeInfo5GProperties; +import com.azure.resourcemanager.mobilenetwork.models.UeIpAddress; +import com.azure.resourcemanager.mobilenetwork.models.UeLocationInfo; +import com.azure.resourcemanager.mobilenetwork.models.UeQosFlow; +import com.azure.resourcemanager.mobilenetwork.models.UeSessionInfo5G; +import com.azure.resourcemanager.mobilenetwork.models.UeState; +import com.azure.resourcemanager.mobilenetwork.models.UeUsageSetting; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class UeInfo5GPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeInfo5GProperties model = BinaryData.fromString( + "{\"supi\":\"qwhix\",\"pei\":\"nstshi\",\"fivegGuti\":{\"plmn\":{\"mcc\":\"xgvelfclduccbird\",\"mnc\":\"vuwcobiegstmnin\"},\"amfId\":{\"regionId\":648351672,\"setId\":1117030946,\"pointer\":2100756233},\"fivegTmsi\":1305077670},\"connectionInfo\":{\"locationInfo\":{\"locationType\":\"nghgshej\",\"tac\":\"tbxqmuluxlxq\",\"plmn\":{\"mcc\":\"vnersbycucrw\",\"mnc\":\"amikzebrqbsm\"}},\"globalRanNodeId\":{\"plmnId\":{\"mcc\":\"wziqgfuhokzr\",\"mnc\":\"swhvhczznvfbycj\"},\"gNbId\":{\"bitLength\":152171390,\"gNBValue\":\"i\"},\"ngeNbId\":\"vumwmxqh\",\"eNbId\":\"vnoamldseha\",\"n3IwfId\":\"djh\",\"wagfId\":\"lzok\",\"tngfId\":\"ox\",\"nid\":\"lnjetaglt\"},\"perUeTnla\":\"oatftgzpnpbswvef\",\"amfUeNgapId\":4618412568298030001,\"ranUeNgapId\":302338769,\"lastVisitedTai\":\"rmozihmipgawt\",\"allowedNssai\":[{\"sst\":304740778,\"sd\":\"jcxcjxgrytfmpcyc\"},{\"sst\":1979879685,\"sd\":\"mcayk\"},{\"sst\":624858821,\"sd\":\"oxuztrksx\"},{\"sst\":605983945,\"sd\":\"d\"}],\"ueState\":\"Deregistered\",\"rrcEstablishmentCause\":\"Emergency\",\"ueUsageSetting\":\"VoiceCentric\",\"lastActivityTime\":\"2021-10-04T17:45:19Z\"},\"sessionInfo\":[{\"pduSessionId\":1956660642,\"dnn\":\"twk\",\"snssai\":{\"sst\":1803321746,\"sd\":\"srxuzvoam\"},\"ueIpAddress\":{\"ipV4Addr\":\"cqiosmgbza\"},\"pdnType\":\"IPV4\",\"ambr\":{\"uplink\":\"xqdlyrtltlapr\",\"downlink\":\"tz\"},\"qosFlow\":[{\"qfi\":1330760213,\"fiveqi\":2087309055,\"mbr\":{\"uplink\":\"jm\",\"downlink\":\"nnbsoqeqa\"},\"gbr\":{\"uplink\":\"rvlagunbtgfebwln\",\"downlink\":\"mhyreeudz\"}},{\"qfi\":427882084,\"fiveqi\":1880601088,\"mbr\":{\"uplink\":\"pdqmjxlyyzglgouw\",\"downlink\":\"lmjjyuo\"},\"gbr\":{\"uplink\":\"tob\",\"downlink\":\"xkjeytunlbfj\"}},{\"qfi\":1026707104,\"fiveqi\":1174367057,\"mbr\":{\"uplink\":\"snkq\",\"downlink\":\"hsyrqunj\"},\"gbr\":{\"uplink\":\"denxau\",\"downlink\":\"kpak\"}}]},{\"pduSessionId\":1515091142,\"dnn\":\"ifmjnn\",\"snssai\":{\"sst\":641557673,\"sd\":\"qabpxuckpggqow\"},\"ueIpAddress\":{\"ipV4Addr\":\"ird\"},\"pdnType\":\"IPV4\",\"ambr\":{\"uplink\":\"isngwflqqmpizru\",\"downlink\":\"n\"},\"qosFlow\":[{\"qfi\":578532092,\"fiveqi\":1323029390,\"mbr\":{\"uplink\":\"iwfcngjsa\",\"downlink\":\"sii\"},\"gbr\":{\"uplink\":\"mkzjvkviir\",\"downlink\":\"gfgrwsdp\"}},{\"qfi\":360439780,\"fiveqi\":1006538190,\"mbr\":{\"uplink\":\"zvzbglbyv\",\"downlink\":\"ctctbrxkjz\"},\"gbr\":{\"uplink\":\"gxffmshkwf\",\"downlink\":\"kgozxwop\"}},{\"qfi\":1662564263,\"fiveqi\":530743618,\"mbr\":{\"uplink\":\"p\",\"downlink\":\"zqaclna\"},\"gbr\":{\"uplink\":\"biygnugjknfsmfct\",\"downlink\":\"uxuuyilflq\"}},{\"qfi\":1974888424,\"fiveqi\":1113337384,\"mbr\":{\"uplink\":\"vrehmrnjhvsujzt\",\"downlink\":\"zytqjtwhauunfpr\"},\"gbr\":{\"uplink\":\"letlx\",\"downlink\":\"mr\"}}]},{\"pduSessionId\":1161615654,\"dnn\":\"do\",\"snssai\":{\"sst\":128255053,\"sd\":\"amowaziynknlqwzd\"},\"ueIpAddress\":{\"ipV4Addr\":\"iwhxqszdtmaajq\"},\"pdnType\":\"IPV4\",\"ambr\":{\"uplink\":\"uxylrjvmtygjbm\",\"downlink\":\"yospspshc\"},\"qosFlow\":[{\"qfi\":311832546,\"fiveqi\":1921886768,\"mbr\":{\"uplink\":\"pms\",\"downlink\":\"bpssdfp\"},\"gbr\":{\"uplink\":\"ogtieyujtvczkcny\",\"downlink\":\"rxmunjdxvgln\"}},{\"qfi\":1068752485,\"fiveqi\":295683431,\"mbr\":{\"uplink\":\"xpaglqivbgkc\",\"downlink\":\"khpzvuqdflv\"},\"gbr\":{\"uplink\":\"iypfp\",\"downlink\":\"bcpzgpxtivh\"}},{\"qfi\":1447599159,\"fiveqi\":281745669,\"mbr\":{\"uplink\":\"dibgqjxgpnrhgov\",\"downlink\":\"gpikqmh\"},\"gbr\":{\"uplink\":\"owjrmzvuporqz\",\"downlink\":\"fuyd\"}},{\"qfi\":2106281450,\"fiveqi\":1783861602,\"mbr\":{\"uplink\":\"vxcnqmxqps\",\"downlink\":\"okmvkhlggd\"},\"gbr\":{\"uplink\":\"em\",\"downlink\":\"qkzszuwiwtglxxh\"}}]}]}") + .toObject(UeInfo5GProperties.class); + Assertions.assertEquals("qwhix", model.supi()); + Assertions.assertEquals("nstshi", model.pei()); + Assertions.assertEquals("xgvelfclduccbird", model.fivegGuti().plmn().mcc()); + Assertions.assertEquals("vuwcobiegstmnin", model.fivegGuti().plmn().mnc()); + Assertions.assertEquals(648351672, model.fivegGuti().amfId().regionId()); + Assertions.assertEquals(1117030946, model.fivegGuti().amfId().setId()); + Assertions.assertEquals(2100756233, model.fivegGuti().amfId().pointer()); + Assertions.assertEquals(1305077670, model.fivegGuti().fivegTmsi()); + Assertions.assertEquals("nghgshej", model.connectionInfo().locationInfo().locationType()); + Assertions.assertEquals("tbxqmuluxlxq", model.connectionInfo().locationInfo().tac()); + Assertions.assertEquals("vnersbycucrw", model.connectionInfo().locationInfo().plmn().mcc()); + Assertions.assertEquals("amikzebrqbsm", model.connectionInfo().locationInfo().plmn().mnc()); + Assertions.assertEquals("wziqgfuhokzr", model.connectionInfo().globalRanNodeId().plmnId().mcc()); + Assertions.assertEquals("swhvhczznvfbycj", model.connectionInfo().globalRanNodeId().plmnId().mnc()); + Assertions.assertEquals(152171390, model.connectionInfo().globalRanNodeId().gNbId().bitLength()); + Assertions.assertEquals("i", model.connectionInfo().globalRanNodeId().gNbId().gNBValue()); + Assertions.assertEquals("vumwmxqh", model.connectionInfo().globalRanNodeId().ngeNbId()); + Assertions.assertEquals("vnoamldseha", model.connectionInfo().globalRanNodeId().eNbId()); + Assertions.assertEquals("djh", model.connectionInfo().globalRanNodeId().n3IwfId()); + Assertions.assertEquals("lzok", model.connectionInfo().globalRanNodeId().wagfId()); + Assertions.assertEquals("ox", model.connectionInfo().globalRanNodeId().tngfId()); + Assertions.assertEquals("lnjetaglt", model.connectionInfo().globalRanNodeId().nid()); + Assertions.assertEquals("oatftgzpnpbswvef", model.connectionInfo().perUeTnla()); + Assertions.assertEquals(4618412568298030001L, model.connectionInfo().amfUeNgapId()); + Assertions.assertEquals(302338769, model.connectionInfo().ranUeNgapId()); + Assertions.assertEquals("rmozihmipgawt", model.connectionInfo().lastVisitedTai()); + Assertions.assertEquals(304740778, model.connectionInfo().allowedNssai().get(0).sst()); + Assertions.assertEquals("jcxcjxgrytfmpcyc", model.connectionInfo().allowedNssai().get(0).sd()); + Assertions.assertEquals(UeState.DEREGISTERED, model.connectionInfo().ueState()); + Assertions.assertEquals(RrcEstablishmentCause.EMERGENCY, model.connectionInfo().rrcEstablishmentCause()); + Assertions.assertEquals(UeUsageSetting.VOICE_CENTRIC, model.connectionInfo().ueUsageSetting()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-04T17:45:19Z"), + model.connectionInfo().lastActivityTime()); + Assertions.assertEquals(1956660642, model.sessionInfo().get(0).pduSessionId()); + Assertions.assertEquals("twk", model.sessionInfo().get(0).dnn()); + Assertions.assertEquals(1803321746, model.sessionInfo().get(0).snssai().sst()); + Assertions.assertEquals("srxuzvoam", model.sessionInfo().get(0).snssai().sd()); + Assertions.assertEquals("cqiosmgbza", model.sessionInfo().get(0).ueIpAddress().ipV4Addr()); + Assertions.assertEquals(PdnType.IPV4, model.sessionInfo().get(0).pdnType()); + Assertions.assertEquals("xqdlyrtltlapr", model.sessionInfo().get(0).ambr().uplink()); + Assertions.assertEquals("tz", model.sessionInfo().get(0).ambr().downlink()); + Assertions.assertEquals(1330760213, model.sessionInfo().get(0).qosFlow().get(0).qfi()); + Assertions.assertEquals(2087309055, model.sessionInfo().get(0).qosFlow().get(0).fiveqi()); + Assertions.assertEquals("jm", model.sessionInfo().get(0).qosFlow().get(0).mbr().uplink()); + Assertions.assertEquals("nnbsoqeqa", model.sessionInfo().get(0).qosFlow().get(0).mbr().downlink()); + Assertions.assertEquals("rvlagunbtgfebwln", model.sessionInfo().get(0).qosFlow().get(0).gbr().uplink()); + Assertions.assertEquals("mhyreeudz", model.sessionInfo().get(0).qosFlow().get(0).gbr().downlink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeInfo5GProperties model = new UeInfo5GProperties().withSupi("qwhix") + .withPei("nstshi") + .withFivegGuti(new Guti5G().withPlmn(new PlmnId().withMcc("xgvelfclduccbird").withMnc("vuwcobiegstmnin")) + .withAmfId(new AmfId().withRegionId(648351672).withSetId(1117030946).withPointer(2100756233)) + .withFivegTmsi(1305077670)) + .withConnectionInfo(new UeConnectionInfo5G() + .withLocationInfo(new UeLocationInfo().withLocationType("nghgshej") + .withTac("tbxqmuluxlxq") + .withPlmn(new PlmnId().withMcc("vnersbycucrw").withMnc("amikzebrqbsm"))) + .withGlobalRanNodeId( + new GlobalRanNodeId().withPlmnId(new PlmnId().withMcc("wziqgfuhokzr").withMnc("swhvhczznvfbycj")) + .withGNbId(new GNbId().withBitLength(152171390).withGNBValue("i")) + .withNgeNbId("vumwmxqh") + .withENbId("vnoamldseha") + .withN3IwfId("djh") + .withWagfId("lzok") + .withTngfId("ox") + .withNid("lnjetaglt")) + .withPerUeTnla("oatftgzpnpbswvef") + .withAmfUeNgapId(4618412568298030001L) + .withRanUeNgapId(302338769) + .withLastVisitedTai("rmozihmipgawt") + .withAllowedNssai(Arrays.asList(new Snssai().withSst(304740778).withSd("jcxcjxgrytfmpcyc"), + new Snssai().withSst(1979879685).withSd("mcayk"), + new Snssai().withSst(624858821).withSd("oxuztrksx"), new Snssai().withSst(605983945).withSd("d"))) + .withUeState(UeState.DEREGISTERED) + .withRrcEstablishmentCause(RrcEstablishmentCause.EMERGENCY) + .withUeUsageSetting(UeUsageSetting.VOICE_CENTRIC) + .withLastActivityTime(OffsetDateTime.parse("2021-10-04T17:45:19Z"))) + .withSessionInfo(Arrays.asList( + new UeSessionInfo5G().withPduSessionId(1956660642) + .withDnn("twk") + .withSnssai(new Snssai().withSst(1803321746).withSd("srxuzvoam")) + .withUeIpAddress(new UeIpAddress().withIpV4Addr("cqiosmgbza")) + .withPdnType(PdnType.IPV4) + .withAmbr(new Ambr().withUplink("xqdlyrtltlapr").withDownlink("tz")) + .withQosFlow(Arrays.asList( + new UeQosFlow().withQfi(1330760213) + .withFiveqi(2087309055) + .withMbr(new Ambr().withUplink("jm").withDownlink("nnbsoqeqa")) + .withGbr(new Ambr().withUplink("rvlagunbtgfebwln").withDownlink("mhyreeudz")), + new UeQosFlow().withQfi(427882084) + .withFiveqi(1880601088) + .withMbr(new Ambr().withUplink("pdqmjxlyyzglgouw").withDownlink("lmjjyuo")) + .withGbr(new Ambr().withUplink("tob").withDownlink("xkjeytunlbfj")), + new UeQosFlow().withQfi(1026707104) + .withFiveqi(1174367057) + .withMbr(new Ambr().withUplink("snkq").withDownlink("hsyrqunj")) + .withGbr(new Ambr().withUplink("denxau").withDownlink("kpak")))), + new UeSessionInfo5G().withPduSessionId(1515091142) + .withDnn("ifmjnn") + .withSnssai(new Snssai().withSst(641557673).withSd("qabpxuckpggqow")) + .withUeIpAddress(new UeIpAddress().withIpV4Addr("ird")) + .withPdnType(PdnType.IPV4) + .withAmbr(new Ambr().withUplink("isngwflqqmpizru").withDownlink("n")) + .withQosFlow(Arrays.asList( + new UeQosFlow().withQfi(578532092) + .withFiveqi(1323029390) + .withMbr(new Ambr().withUplink("iwfcngjsa").withDownlink("sii")) + .withGbr(new Ambr().withUplink("mkzjvkviir").withDownlink("gfgrwsdp")), + new UeQosFlow().withQfi(360439780) + .withFiveqi(1006538190) + .withMbr(new Ambr().withUplink("zvzbglbyv").withDownlink("ctctbrxkjz")) + .withGbr(new Ambr().withUplink("gxffmshkwf").withDownlink("kgozxwop")), + new UeQosFlow().withQfi(1662564263) + .withFiveqi(530743618) + .withMbr(new Ambr().withUplink("p").withDownlink("zqaclna")) + .withGbr(new Ambr().withUplink("biygnugjknfsmfct").withDownlink("uxuuyilflq")), + new UeQosFlow().withQfi(1974888424) + .withFiveqi(1113337384) + .withMbr(new Ambr().withUplink("vrehmrnjhvsujzt").withDownlink("zytqjtwhauunfpr")) + .withGbr(new Ambr().withUplink("letlx").withDownlink("mr")))), + new UeSessionInfo5G().withPduSessionId(1161615654) + .withDnn("do") + .withSnssai(new Snssai().withSst(128255053).withSd("amowaziynknlqwzd")) + .withUeIpAddress(new UeIpAddress().withIpV4Addr("iwhxqszdtmaajq")) + .withPdnType(PdnType.IPV4) + .withAmbr(new Ambr().withUplink("uxylrjvmtygjbm").withDownlink("yospspshc")) + .withQosFlow(Arrays.asList( + new UeQosFlow().withQfi(311832546) + .withFiveqi(1921886768) + .withMbr(new Ambr().withUplink("pms").withDownlink("bpssdfp")) + .withGbr(new Ambr().withUplink("ogtieyujtvczkcny").withDownlink("rxmunjdxvgln")), + new UeQosFlow().withQfi(1068752485) + .withFiveqi(295683431) + .withMbr(new Ambr().withUplink("xpaglqivbgkc").withDownlink("khpzvuqdflv")) + .withGbr(new Ambr().withUplink("iypfp").withDownlink("bcpzgpxtivh")), + new UeQosFlow().withQfi(1447599159) + .withFiveqi(281745669) + .withMbr(new Ambr().withUplink("dibgqjxgpnrhgov").withDownlink("gpikqmh")) + .withGbr(new Ambr().withUplink("owjrmzvuporqz").withDownlink("fuyd")), + new UeQosFlow().withQfi(2106281450) + .withFiveqi(1783861602) + .withMbr(new Ambr().withUplink("vxcnqmxqps").withDownlink("okmvkhlggd")) + .withGbr(new Ambr().withUplink("em").withDownlink("qkzszuwiwtglxxh")))))); + model = BinaryData.fromObject(model).toObject(UeInfo5GProperties.class); + Assertions.assertEquals("qwhix", model.supi()); + Assertions.assertEquals("nstshi", model.pei()); + Assertions.assertEquals("xgvelfclduccbird", model.fivegGuti().plmn().mcc()); + Assertions.assertEquals("vuwcobiegstmnin", model.fivegGuti().plmn().mnc()); + Assertions.assertEquals(648351672, model.fivegGuti().amfId().regionId()); + Assertions.assertEquals(1117030946, model.fivegGuti().amfId().setId()); + Assertions.assertEquals(2100756233, model.fivegGuti().amfId().pointer()); + Assertions.assertEquals(1305077670, model.fivegGuti().fivegTmsi()); + Assertions.assertEquals("nghgshej", model.connectionInfo().locationInfo().locationType()); + Assertions.assertEquals("tbxqmuluxlxq", model.connectionInfo().locationInfo().tac()); + Assertions.assertEquals("vnersbycucrw", model.connectionInfo().locationInfo().plmn().mcc()); + Assertions.assertEquals("amikzebrqbsm", model.connectionInfo().locationInfo().plmn().mnc()); + Assertions.assertEquals("wziqgfuhokzr", model.connectionInfo().globalRanNodeId().plmnId().mcc()); + Assertions.assertEquals("swhvhczznvfbycj", model.connectionInfo().globalRanNodeId().plmnId().mnc()); + Assertions.assertEquals(152171390, model.connectionInfo().globalRanNodeId().gNbId().bitLength()); + Assertions.assertEquals("i", model.connectionInfo().globalRanNodeId().gNbId().gNBValue()); + Assertions.assertEquals("vumwmxqh", model.connectionInfo().globalRanNodeId().ngeNbId()); + Assertions.assertEquals("vnoamldseha", model.connectionInfo().globalRanNodeId().eNbId()); + Assertions.assertEquals("djh", model.connectionInfo().globalRanNodeId().n3IwfId()); + Assertions.assertEquals("lzok", model.connectionInfo().globalRanNodeId().wagfId()); + Assertions.assertEquals("ox", model.connectionInfo().globalRanNodeId().tngfId()); + Assertions.assertEquals("lnjetaglt", model.connectionInfo().globalRanNodeId().nid()); + Assertions.assertEquals("oatftgzpnpbswvef", model.connectionInfo().perUeTnla()); + Assertions.assertEquals(4618412568298030001L, model.connectionInfo().amfUeNgapId()); + Assertions.assertEquals(302338769, model.connectionInfo().ranUeNgapId()); + Assertions.assertEquals("rmozihmipgawt", model.connectionInfo().lastVisitedTai()); + Assertions.assertEquals(304740778, model.connectionInfo().allowedNssai().get(0).sst()); + Assertions.assertEquals("jcxcjxgrytfmpcyc", model.connectionInfo().allowedNssai().get(0).sd()); + Assertions.assertEquals(UeState.DEREGISTERED, model.connectionInfo().ueState()); + Assertions.assertEquals(RrcEstablishmentCause.EMERGENCY, model.connectionInfo().rrcEstablishmentCause()); + Assertions.assertEquals(UeUsageSetting.VOICE_CENTRIC, model.connectionInfo().ueUsageSetting()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-04T17:45:19Z"), + model.connectionInfo().lastActivityTime()); + Assertions.assertEquals(1956660642, model.sessionInfo().get(0).pduSessionId()); + Assertions.assertEquals("twk", model.sessionInfo().get(0).dnn()); + Assertions.assertEquals(1803321746, model.sessionInfo().get(0).snssai().sst()); + Assertions.assertEquals("srxuzvoam", model.sessionInfo().get(0).snssai().sd()); + Assertions.assertEquals("cqiosmgbza", model.sessionInfo().get(0).ueIpAddress().ipV4Addr()); + Assertions.assertEquals(PdnType.IPV4, model.sessionInfo().get(0).pdnType()); + Assertions.assertEquals("xqdlyrtltlapr", model.sessionInfo().get(0).ambr().uplink()); + Assertions.assertEquals("tz", model.sessionInfo().get(0).ambr().downlink()); + Assertions.assertEquals(1330760213, model.sessionInfo().get(0).qosFlow().get(0).qfi()); + Assertions.assertEquals(2087309055, model.sessionInfo().get(0).qosFlow().get(0).fiveqi()); + Assertions.assertEquals("jm", model.sessionInfo().get(0).qosFlow().get(0).mbr().uplink()); + Assertions.assertEquals("nnbsoqeqa", model.sessionInfo().get(0).qosFlow().get(0).mbr().downlink()); + Assertions.assertEquals("rvlagunbtgfebwln", model.sessionInfo().get(0).qosFlow().get(0).gbr().uplink()); + Assertions.assertEquals("mhyreeudz", model.sessionInfo().get(0).qosFlow().get(0).gbr().downlink()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfo5GTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfo5GTests.java new file mode 100644 index 000000000000..b6799713e3c9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfo5GTests.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.AmfId; +import com.azure.resourcemanager.mobilenetwork.models.GNbId; +import com.azure.resourcemanager.mobilenetwork.models.GlobalRanNodeId; +import com.azure.resourcemanager.mobilenetwork.models.Guti5G; +import com.azure.resourcemanager.mobilenetwork.models.PdnType; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.RrcEstablishmentCause; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import com.azure.resourcemanager.mobilenetwork.models.UeConnectionInfo5G; +import com.azure.resourcemanager.mobilenetwork.models.UeInfo5G; +import com.azure.resourcemanager.mobilenetwork.models.UeInfo5GProperties; +import com.azure.resourcemanager.mobilenetwork.models.UeIpAddress; +import com.azure.resourcemanager.mobilenetwork.models.UeLocationInfo; +import com.azure.resourcemanager.mobilenetwork.models.UeQosFlow; +import com.azure.resourcemanager.mobilenetwork.models.UeSessionInfo5G; +import com.azure.resourcemanager.mobilenetwork.models.UeState; +import com.azure.resourcemanager.mobilenetwork.models.UeUsageSetting; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class UeInfo5GTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeInfo5G model = BinaryData.fromString( + "{\"ratType\":\"5G\",\"info\":{\"supi\":\"f\",\"pei\":\"qscazuawxtz\",\"fivegGuti\":{\"plmn\":{\"mcc\":\"puamwabzxr\",\"mnc\":\"xcushs\"},\"amfId\":{\"regionId\":1307782506,\"setId\":1333151238,\"pointer\":35510152},\"fivegTmsi\":107973649},\"connectionInfo\":{\"locationInfo\":{\"locationType\":\"yasflvgsgzwy\",\"tac\":\"akoi\",\"plmn\":{\"mcc\":\"knsmjblmljhlnymz\",\"mnc\":\"tqyryuzcbmqqv\"}},\"globalRanNodeId\":{\"plmnId\":{\"mcc\":\"mv\",\"mnc\":\"fgtayxonsup\"},\"gNbId\":{\"bitLength\":2074822274,\"gNBValue\":\"qnhcvsqltnzoibg\"},\"ngeNbId\":\"gnxf\",\"eNbId\":\"onmpqoxwdof\",\"n3IwfId\":\"xiqxeiiqbimh\",\"wagfId\":\"wwinhehf\",\"tngfId\":\"ofvwbcb\",\"nid\":\"mbnkb\"},\"perUeTnla\":\"qvxkd\",\"amfUeNgapId\":7873416727054110619,\"ranUeNgapId\":1908297437,\"lastVisitedTai\":\"ebwtswb\",\"allowedNssai\":[{\"sst\":780291452,\"sd\":\"duragegizvc\"},{\"sst\":87980458,\"sd\":\"lisdjubggbq\"},{\"sst\":941272169,\"sd\":\"xkbsazgakgac\"}],\"ueState\":\"Idle\",\"rrcEstablishmentCause\":\"MobileOriginatedSignaling\",\"ueUsageSetting\":\"DataCentric\",\"lastActivityTime\":\"2021-11-29T00:57:03Z\"},\"sessionInfo\":[{\"pduSessionId\":374782594,\"dnn\":\"fapvuhrylniofrz\",\"snssai\":{\"sst\":103942788,\"sd\":\"jed\"},\"ueIpAddress\":{\"ipV4Addr\":\"tkvnlvxbcuiiznkt\"},\"pdnType\":\"IPV4\",\"ambr\":{\"uplink\":\"ansnvp\",\"downlink\":\"ibmikostbzb\"},\"qosFlow\":[{\"qfi\":1151685721,\"fiveqi\":1163334632,\"mbr\":{\"uplink\":\"qnyophzfyls\",\"downlink\":\"crpfbcunez\"},\"gbr\":{\"uplink\":\"e\",\"downlink\":\"elfwy\"}},{\"qfi\":446778446,\"fiveqi\":2072196821,\"mbr\":{\"uplink\":\"xjwet\",\"downlink\":\"psihcla\"},\"gbr\":{\"uplink\":\"va\",\"downlink\":\"lpt\"}}]},{\"pduSessionId\":1048059203,\"dnn\":\"qqwzt\",\"snssai\":{\"sst\":1035382381,\"sd\":\"qkc\"},\"ueIpAddress\":{\"ipV4Addr\":\"xwaxfewzjkj\"},\"pdnType\":\"IPV4\",\"ambr\":{\"uplink\":\"fdeqvhpsyl\",\"downlink\":\"ksh\"},\"qosFlow\":[{\"qfi\":504843018,\"fiveqi\":127913719,\"mbr\":{\"uplink\":\"bmxzjrgywwpg\",\"downlink\":\"xs\"},\"gbr\":{\"uplink\":\"tf\",\"downlink\":\"jgicgaao\"}},{\"qfi\":2031389525,\"fiveqi\":173165571,\"mbr\":{\"uplink\":\"aqutdewemxswvruu\",\"downlink\":\"zzjgehkfki\"},\"gbr\":{\"uplink\":\"tixo\",\"downlink\":\"ffqyinlj\"}}]}]},\"lastReadAt\":\"2021-09-17T05:47:58Z\"}") + .toObject(UeInfo5G.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T05:47:58Z"), model.lastReadAt()); + Assertions.assertEquals("f", model.info().supi()); + Assertions.assertEquals("qscazuawxtz", model.info().pei()); + Assertions.assertEquals("puamwabzxr", model.info().fivegGuti().plmn().mcc()); + Assertions.assertEquals("xcushs", model.info().fivegGuti().plmn().mnc()); + Assertions.assertEquals(1307782506, model.info().fivegGuti().amfId().regionId()); + Assertions.assertEquals(1333151238, model.info().fivegGuti().amfId().setId()); + Assertions.assertEquals(35510152, model.info().fivegGuti().amfId().pointer()); + Assertions.assertEquals(107973649, model.info().fivegGuti().fivegTmsi()); + Assertions.assertEquals("yasflvgsgzwy", model.info().connectionInfo().locationInfo().locationType()); + Assertions.assertEquals("akoi", model.info().connectionInfo().locationInfo().tac()); + Assertions.assertEquals("knsmjblmljhlnymz", model.info().connectionInfo().locationInfo().plmn().mcc()); + Assertions.assertEquals("tqyryuzcbmqqv", model.info().connectionInfo().locationInfo().plmn().mnc()); + Assertions.assertEquals("mv", model.info().connectionInfo().globalRanNodeId().plmnId().mcc()); + Assertions.assertEquals("fgtayxonsup", model.info().connectionInfo().globalRanNodeId().plmnId().mnc()); + Assertions.assertEquals(2074822274, model.info().connectionInfo().globalRanNodeId().gNbId().bitLength()); + Assertions.assertEquals("qnhcvsqltnzoibg", model.info().connectionInfo().globalRanNodeId().gNbId().gNBValue()); + Assertions.assertEquals("gnxf", model.info().connectionInfo().globalRanNodeId().ngeNbId()); + Assertions.assertEquals("onmpqoxwdof", model.info().connectionInfo().globalRanNodeId().eNbId()); + Assertions.assertEquals("xiqxeiiqbimh", model.info().connectionInfo().globalRanNodeId().n3IwfId()); + Assertions.assertEquals("wwinhehf", model.info().connectionInfo().globalRanNodeId().wagfId()); + Assertions.assertEquals("ofvwbcb", model.info().connectionInfo().globalRanNodeId().tngfId()); + Assertions.assertEquals("mbnkb", model.info().connectionInfo().globalRanNodeId().nid()); + Assertions.assertEquals("qvxkd", model.info().connectionInfo().perUeTnla()); + Assertions.assertEquals(7873416727054110619L, model.info().connectionInfo().amfUeNgapId()); + Assertions.assertEquals(1908297437, model.info().connectionInfo().ranUeNgapId()); + Assertions.assertEquals("ebwtswb", model.info().connectionInfo().lastVisitedTai()); + Assertions.assertEquals(780291452, model.info().connectionInfo().allowedNssai().get(0).sst()); + Assertions.assertEquals("duragegizvc", model.info().connectionInfo().allowedNssai().get(0).sd()); + Assertions.assertEquals(UeState.IDLE, model.info().connectionInfo().ueState()); + Assertions.assertEquals(RrcEstablishmentCause.MOBILE_ORIGINATED_SIGNALING, + model.info().connectionInfo().rrcEstablishmentCause()); + Assertions.assertEquals(UeUsageSetting.DATA_CENTRIC, model.info().connectionInfo().ueUsageSetting()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-29T00:57:03Z"), + model.info().connectionInfo().lastActivityTime()); + Assertions.assertEquals(374782594, model.info().sessionInfo().get(0).pduSessionId()); + Assertions.assertEquals("fapvuhrylniofrz", model.info().sessionInfo().get(0).dnn()); + Assertions.assertEquals(103942788, model.info().sessionInfo().get(0).snssai().sst()); + Assertions.assertEquals("jed", model.info().sessionInfo().get(0).snssai().sd()); + Assertions.assertEquals("tkvnlvxbcuiiznkt", model.info().sessionInfo().get(0).ueIpAddress().ipV4Addr()); + Assertions.assertEquals(PdnType.IPV4, model.info().sessionInfo().get(0).pdnType()); + Assertions.assertEquals("ansnvp", model.info().sessionInfo().get(0).ambr().uplink()); + Assertions.assertEquals("ibmikostbzb", model.info().sessionInfo().get(0).ambr().downlink()); + Assertions.assertEquals(1151685721, model.info().sessionInfo().get(0).qosFlow().get(0).qfi()); + Assertions.assertEquals(1163334632, model.info().sessionInfo().get(0).qosFlow().get(0).fiveqi()); + Assertions.assertEquals("qnyophzfyls", model.info().sessionInfo().get(0).qosFlow().get(0).mbr().uplink()); + Assertions.assertEquals("crpfbcunez", model.info().sessionInfo().get(0).qosFlow().get(0).mbr().downlink()); + Assertions.assertEquals("e", model.info().sessionInfo().get(0).qosFlow().get(0).gbr().uplink()); + Assertions.assertEquals("elfwy", model.info().sessionInfo().get(0).qosFlow().get(0).gbr().downlink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeInfo5G model + = new UeInfo5G().withLastReadAt(OffsetDateTime.parse("2021-09-17T05:47:58Z")) + .withInfo( + new UeInfo5GProperties().withSupi("f") + .withPei("qscazuawxtz") + .withFivegGuti(new Guti5G().withPlmn(new PlmnId().withMcc("puamwabzxr").withMnc("xcushs")) + .withAmfId(new AmfId().withRegionId(1307782506).withSetId(1333151238).withPointer(35510152)) + .withFivegTmsi(107973649)) + .withConnectionInfo(new UeConnectionInfo5G() + .withLocationInfo(new UeLocationInfo().withLocationType("yasflvgsgzwy") + .withTac("akoi") + .withPlmn(new PlmnId().withMcc("knsmjblmljhlnymz").withMnc("tqyryuzcbmqqv"))) + .withGlobalRanNodeId( + new GlobalRanNodeId().withPlmnId(new PlmnId().withMcc("mv").withMnc("fgtayxonsup")) + .withGNbId(new GNbId().withBitLength(2074822274).withGNBValue("qnhcvsqltnzoibg")) + .withNgeNbId("gnxf") + .withENbId("onmpqoxwdof") + .withN3IwfId("xiqxeiiqbimh") + .withWagfId("wwinhehf") + .withTngfId("ofvwbcb") + .withNid("mbnkb")) + .withPerUeTnla("qvxkd") + .withAmfUeNgapId(7873416727054110619L) + .withRanUeNgapId(1908297437) + .withLastVisitedTai("ebwtswb") + .withAllowedNssai(Arrays.asList(new Snssai().withSst(780291452).withSd("duragegizvc"), + new Snssai().withSst(87980458).withSd("lisdjubggbq"), + new Snssai().withSst(941272169).withSd("xkbsazgakgac"))) + .withUeState(UeState.IDLE) + .withRrcEstablishmentCause(RrcEstablishmentCause.MOBILE_ORIGINATED_SIGNALING) + .withUeUsageSetting(UeUsageSetting.DATA_CENTRIC) + .withLastActivityTime(OffsetDateTime.parse("2021-11-29T00:57:03Z"))) + .withSessionInfo( + Arrays + .asList( + new UeSessionInfo5G().withPduSessionId(374782594) + .withDnn("fapvuhrylniofrz") + .withSnssai(new Snssai().withSst(103942788).withSd("jed")) + .withUeIpAddress(new UeIpAddress().withIpV4Addr("tkvnlvxbcuiiznkt")) + .withPdnType(PdnType.IPV4) + .withAmbr(new Ambr().withUplink("ansnvp").withDownlink("ibmikostbzb")) + .withQosFlow( + Arrays + .asList( + new UeQosFlow().withQfi(1151685721) + .withFiveqi(1163334632) + .withMbr(new Ambr().withUplink("qnyophzfyls") + .withDownlink("crpfbcunez")) + .withGbr(new Ambr().withUplink("e").withDownlink("elfwy")), + new UeQosFlow().withQfi(446778446) + .withFiveqi(2072196821) + .withMbr(new Ambr().withUplink("xjwet").withDownlink("psihcla")) + .withGbr(new Ambr().withUplink("va").withDownlink("lpt")))), + new UeSessionInfo5G().withPduSessionId(1048059203) + .withDnn("qqwzt") + .withSnssai(new Snssai().withSst(1035382381).withSd("qkc")) + .withUeIpAddress(new UeIpAddress().withIpV4Addr("xwaxfewzjkj")) + .withPdnType(PdnType.IPV4) + .withAmbr(new Ambr().withUplink("fdeqvhpsyl").withDownlink("ksh")) + .withQosFlow(Arrays.asList( + new UeQosFlow().withQfi(504843018) + .withFiveqi(127913719) + .withMbr(new Ambr().withUplink("bmxzjrgywwpg").withDownlink("xs")) + .withGbr(new Ambr().withUplink("tf").withDownlink("jgicgaao")), + new UeQosFlow().withQfi(2031389525) + .withFiveqi(173165571) + .withMbr(new Ambr().withUplink("aqutdewemxswvruu") + .withDownlink("zzjgehkfki")) + .withGbr(new Ambr().withUplink("tixo").withDownlink("ffqyinlj"))))))); + model = BinaryData.fromObject(model).toObject(UeInfo5G.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T05:47:58Z"), model.lastReadAt()); + Assertions.assertEquals("f", model.info().supi()); + Assertions.assertEquals("qscazuawxtz", model.info().pei()); + Assertions.assertEquals("puamwabzxr", model.info().fivegGuti().plmn().mcc()); + Assertions.assertEquals("xcushs", model.info().fivegGuti().plmn().mnc()); + Assertions.assertEquals(1307782506, model.info().fivegGuti().amfId().regionId()); + Assertions.assertEquals(1333151238, model.info().fivegGuti().amfId().setId()); + Assertions.assertEquals(35510152, model.info().fivegGuti().amfId().pointer()); + Assertions.assertEquals(107973649, model.info().fivegGuti().fivegTmsi()); + Assertions.assertEquals("yasflvgsgzwy", model.info().connectionInfo().locationInfo().locationType()); + Assertions.assertEquals("akoi", model.info().connectionInfo().locationInfo().tac()); + Assertions.assertEquals("knsmjblmljhlnymz", model.info().connectionInfo().locationInfo().plmn().mcc()); + Assertions.assertEquals("tqyryuzcbmqqv", model.info().connectionInfo().locationInfo().plmn().mnc()); + Assertions.assertEquals("mv", model.info().connectionInfo().globalRanNodeId().plmnId().mcc()); + Assertions.assertEquals("fgtayxonsup", model.info().connectionInfo().globalRanNodeId().plmnId().mnc()); + Assertions.assertEquals(2074822274, model.info().connectionInfo().globalRanNodeId().gNbId().bitLength()); + Assertions.assertEquals("qnhcvsqltnzoibg", model.info().connectionInfo().globalRanNodeId().gNbId().gNBValue()); + Assertions.assertEquals("gnxf", model.info().connectionInfo().globalRanNodeId().ngeNbId()); + Assertions.assertEquals("onmpqoxwdof", model.info().connectionInfo().globalRanNodeId().eNbId()); + Assertions.assertEquals("xiqxeiiqbimh", model.info().connectionInfo().globalRanNodeId().n3IwfId()); + Assertions.assertEquals("wwinhehf", model.info().connectionInfo().globalRanNodeId().wagfId()); + Assertions.assertEquals("ofvwbcb", model.info().connectionInfo().globalRanNodeId().tngfId()); + Assertions.assertEquals("mbnkb", model.info().connectionInfo().globalRanNodeId().nid()); + Assertions.assertEquals("qvxkd", model.info().connectionInfo().perUeTnla()); + Assertions.assertEquals(7873416727054110619L, model.info().connectionInfo().amfUeNgapId()); + Assertions.assertEquals(1908297437, model.info().connectionInfo().ranUeNgapId()); + Assertions.assertEquals("ebwtswb", model.info().connectionInfo().lastVisitedTai()); + Assertions.assertEquals(780291452, model.info().connectionInfo().allowedNssai().get(0).sst()); + Assertions.assertEquals("duragegizvc", model.info().connectionInfo().allowedNssai().get(0).sd()); + Assertions.assertEquals(UeState.IDLE, model.info().connectionInfo().ueState()); + Assertions.assertEquals(RrcEstablishmentCause.MOBILE_ORIGINATED_SIGNALING, + model.info().connectionInfo().rrcEstablishmentCause()); + Assertions.assertEquals(UeUsageSetting.DATA_CENTRIC, model.info().connectionInfo().ueUsageSetting()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-29T00:57:03Z"), + model.info().connectionInfo().lastActivityTime()); + Assertions.assertEquals(374782594, model.info().sessionInfo().get(0).pduSessionId()); + Assertions.assertEquals("fapvuhrylniofrz", model.info().sessionInfo().get(0).dnn()); + Assertions.assertEquals(103942788, model.info().sessionInfo().get(0).snssai().sst()); + Assertions.assertEquals("jed", model.info().sessionInfo().get(0).snssai().sd()); + Assertions.assertEquals("tkvnlvxbcuiiznkt", model.info().sessionInfo().get(0).ueIpAddress().ipV4Addr()); + Assertions.assertEquals(PdnType.IPV4, model.info().sessionInfo().get(0).pdnType()); + Assertions.assertEquals("ansnvp", model.info().sessionInfo().get(0).ambr().uplink()); + Assertions.assertEquals("ibmikostbzb", model.info().sessionInfo().get(0).ambr().downlink()); + Assertions.assertEquals(1151685721, model.info().sessionInfo().get(0).qosFlow().get(0).qfi()); + Assertions.assertEquals(1163334632, model.info().sessionInfo().get(0).qosFlow().get(0).fiveqi()); + Assertions.assertEquals("qnyophzfyls", model.info().sessionInfo().get(0).qosFlow().get(0).mbr().uplink()); + Assertions.assertEquals("crpfbcunez", model.info().sessionInfo().get(0).qosFlow().get(0).mbr().downlink()); + Assertions.assertEquals("e", model.info().sessionInfo().get(0).qosFlow().get(0).gbr().uplink()); + Assertions.assertEquals("elfwy", model.info().sessionInfo().get(0).qosFlow().get(0).gbr().downlink()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoInnerTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoInnerTests.java new file mode 100644 index 000000000000..9c982f04af97 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoInnerTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.UeInfoInner; +import com.azure.resourcemanager.mobilenetwork.models.DnnIpPair; +import com.azure.resourcemanager.mobilenetwork.models.RatType; +import com.azure.resourcemanager.mobilenetwork.models.UeInfoPropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.UeIpAddress; +import com.azure.resourcemanager.mobilenetwork.models.UeState; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class UeInfoInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeInfoInner model = BinaryData.fromString( + "{\"properties\":{\"ratType\":\"4G\",\"ueState\":\"Detached\",\"ueIpAddresses\":[{\"dnn\":\"kmfx\",\"ueIpAddress\":{\"ipV4Addr\":\"wogqqnobpudcdab\"}}],\"lastReadAt\":\"2021-07-29T09:39:50Z\"},\"id\":\"wyawbzasqbuc\",\"name\":\"jg\",\"type\":\"yexaoguy\"}") + .toObject(UeInfoInner.class); + Assertions.assertEquals(RatType.FOURG, model.properties().ratType()); + Assertions.assertEquals(UeState.DETACHED, model.properties().ueState()); + Assertions.assertEquals("kmfx", model.properties().ueIpAddresses().get(0).dnn()); + Assertions.assertEquals("wogqqnobpudcdab", model.properties().ueIpAddresses().get(0).ueIpAddress().ipV4Addr()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T09:39:50Z"), model.properties().lastReadAt()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeInfoInner model = new UeInfoInner().withProperties(new UeInfoPropertiesFormat().withRatType(RatType.FOURG) + .withUeState(UeState.DETACHED) + .withUeIpAddresses(Arrays.asList( + new DnnIpPair().withDnn("kmfx").withUeIpAddress(new UeIpAddress().withIpV4Addr("wogqqnobpudcdab")))) + .withLastReadAt(OffsetDateTime.parse("2021-07-29T09:39:50Z"))); + model = BinaryData.fromObject(model).toObject(UeInfoInner.class); + Assertions.assertEquals(RatType.FOURG, model.properties().ratType()); + Assertions.assertEquals(UeState.DETACHED, model.properties().ueState()); + Assertions.assertEquals("kmfx", model.properties().ueIpAddresses().get(0).dnn()); + Assertions.assertEquals("wogqqnobpudcdab", model.properties().ueIpAddresses().get(0).ueIpAddress().ipV4Addr()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-29T09:39:50Z"), model.properties().lastReadAt()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoListTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoListTests.java new file mode 100644 index 000000000000..cdf1600976b7 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoListTests.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.UeInfoInner; +import com.azure.resourcemanager.mobilenetwork.models.DnnIpPair; +import com.azure.resourcemanager.mobilenetwork.models.RatType; +import com.azure.resourcemanager.mobilenetwork.models.UeInfoList; +import com.azure.resourcemanager.mobilenetwork.models.UeInfoPropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.UeIpAddress; +import com.azure.resourcemanager.mobilenetwork.models.UeState; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class UeInfoListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeInfoList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"ratType\":\"5G\",\"ueState\":\"Connected\",\"ueIpAddresses\":[{\"dnn\":\"fbzdixzmqpnoda\",\"ueIpAddress\":{}}],\"lastReadAt\":\"2021-04-25T00:58:51Z\"},\"id\":\"ewjptmcg\",\"name\":\"bostzel\",\"type\":\"dlat\"},{\"properties\":{\"ratType\":\"5G\",\"ueState\":\"Connected\",\"ueIpAddresses\":[{\"dnn\":\"iojlvfhrb\",\"ueIpAddress\":{}},{\"dnn\":\"eqvcwwyyurmoch\",\"ueIpAddress\":{}},{\"dnn\":\"prsnmokayzejn\",\"ueIpAddress\":{}}],\"lastReadAt\":\"2021-01-13T00:06:05Z\"},\"id\":\"bzpcpiljhahzvec\",\"name\":\"ndbnwieh\",\"type\":\"lewjwiuubwef\"}],\"nextLink\":\"fapaqtfer\"}") + .toObject(UeInfoList.class); + Assertions.assertEquals(RatType.FIVEG, model.value().get(0).properties().ratType()); + Assertions.assertEquals(UeState.CONNECTED, model.value().get(0).properties().ueState()); + Assertions.assertEquals("fbzdixzmqpnoda", model.value().get(0).properties().ueIpAddresses().get(0).dnn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T00:58:51Z"), + model.value().get(0).properties().lastReadAt()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeInfoList model + = new UeInfoList() + .withValue( + Arrays + .asList( + new UeInfoInner().withProperties(new UeInfoPropertiesFormat().withRatType(RatType.FIVEG) + .withUeState(UeState.CONNECTED) + .withUeIpAddresses(Arrays.asList( + new DnnIpPair().withDnn("fbzdixzmqpnoda").withUeIpAddress(new UeIpAddress()))) + .withLastReadAt(OffsetDateTime.parse("2021-04-25T00:58:51Z"))), + new UeInfoInner().withProperties(new UeInfoPropertiesFormat().withRatType(RatType.FIVEG) + .withUeState(UeState.CONNECTED) + .withUeIpAddresses(Arrays.asList( + new DnnIpPair().withDnn("iojlvfhrb").withUeIpAddress(new UeIpAddress()), + new DnnIpPair().withDnn("eqvcwwyyurmoch").withUeIpAddress(new UeIpAddress()), + new DnnIpPair().withDnn("prsnmokayzejn").withUeIpAddress(new UeIpAddress()))) + .withLastReadAt(OffsetDateTime.parse("2021-01-13T00:06:05Z"))))); + model = BinaryData.fromObject(model).toObject(UeInfoList.class); + Assertions.assertEquals(RatType.FIVEG, model.value().get(0).properties().ratType()); + Assertions.assertEquals(UeState.CONNECTED, model.value().get(0).properties().ueState()); + Assertions.assertEquals("fbzdixzmqpnoda", model.value().get(0).properties().ueIpAddresses().get(0).dnn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T00:58:51Z"), + model.value().get(0).properties().lastReadAt()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoPropertiesFormatTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoPropertiesFormatTests.java new file mode 100644 index 000000000000..abecbe1d20f2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInfoPropertiesFormatTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.DnnIpPair; +import com.azure.resourcemanager.mobilenetwork.models.RatType; +import com.azure.resourcemanager.mobilenetwork.models.UeInfoPropertiesFormat; +import com.azure.resourcemanager.mobilenetwork.models.UeIpAddress; +import com.azure.resourcemanager.mobilenetwork.models.UeState; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class UeInfoPropertiesFormatTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeInfoPropertiesFormat model = BinaryData.fromString( + "{\"ratType\":\"4G\",\"ueState\":\"Deregistered\",\"ueIpAddresses\":[{\"dnn\":\"daultxijjumfq\",\"ueIpAddress\":{\"ipV4Addr\":\"lnqnmcjn\"}},{\"dnn\":\"qdqx\",\"ueIpAddress\":{\"ipV4Addr\":\"wgnyfusfzsvtui\"}},{\"dnn\":\"hajqglcfh\",\"ueIpAddress\":{\"ipV4Addr\":\"qryxyn\"}},{\"dnn\":\"zrdpsovwxznptgoe\",\"ueIpAddress\":{\"ipV4Addr\":\"b\"}}],\"lastReadAt\":\"2021-02-22T05:27:57Z\"}") + .toObject(UeInfoPropertiesFormat.class); + Assertions.assertEquals(RatType.FOURG, model.ratType()); + Assertions.assertEquals(UeState.DEREGISTERED, model.ueState()); + Assertions.assertEquals("daultxijjumfq", model.ueIpAddresses().get(0).dnn()); + Assertions.assertEquals("lnqnmcjn", model.ueIpAddresses().get(0).ueIpAddress().ipV4Addr()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T05:27:57Z"), model.lastReadAt()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeInfoPropertiesFormat model = new UeInfoPropertiesFormat().withRatType(RatType.FOURG) + .withUeState(UeState.DEREGISTERED) + .withUeIpAddresses(Arrays.asList( + new DnnIpPair().withDnn("daultxijjumfq").withUeIpAddress(new UeIpAddress().withIpV4Addr("lnqnmcjn")), + new DnnIpPair().withDnn("qdqx").withUeIpAddress(new UeIpAddress().withIpV4Addr("wgnyfusfzsvtui")), + new DnnIpPair().withDnn("hajqglcfh").withUeIpAddress(new UeIpAddress().withIpV4Addr("qryxyn")), + new DnnIpPair().withDnn("zrdpsovwxznptgoe").withUeIpAddress(new UeIpAddress().withIpV4Addr("b")))) + .withLastReadAt(OffsetDateTime.parse("2021-02-22T05:27:57Z")); + model = BinaryData.fromObject(model).toObject(UeInfoPropertiesFormat.class); + Assertions.assertEquals(RatType.FOURG, model.ratType()); + Assertions.assertEquals(UeState.DEREGISTERED, model.ueState()); + Assertions.assertEquals("daultxijjumfq", model.ueIpAddresses().get(0).dnn()); + Assertions.assertEquals("lnqnmcjn", model.ueIpAddresses().get(0).ueIpAddress().ipV4Addr()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T05:27:57Z"), model.lastReadAt()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInformationsListMockTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInformationsListMockTests.java new file mode 100644 index 000000000000..ca920d4cbab0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeInformationsListMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.mobilenetwork.MobileNetworkManager; +import com.azure.resourcemanager.mobilenetwork.models.RatType; +import com.azure.resourcemanager.mobilenetwork.models.UeInfo; +import com.azure.resourcemanager.mobilenetwork.models.UeState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class UeInformationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"ratType\":\"4G\",\"ueState\":\"Unknown\",\"ueIpAddresses\":[{\"dnn\":\"hvfdqqj\",\"ueIpAddress\":{\"ipV4Addr\":\"hwzdanojisgglmv\"}},{\"dnn\":\"atuztjct\",\"ueIpAddress\":{\"ipV4Addr\":\"vbkaehxs\"}},{\"dnn\":\"ygdfwakwseiv\",\"ueIpAddress\":{\"ipV4Addr\":\"xhysowljux\"}}],\"lastReadAt\":\"2021-08-29T21:10:24Z\"},\"id\":\"ctvtf\",\"name\":\"mskdch\",\"type\":\"aiubavlzwpvgmfa\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MobileNetworkManager manager = MobileNetworkManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.ueInformations().list("xsl", "vlzladl", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(RatType.FOURG, response.iterator().next().properties().ratType()); + Assertions.assertEquals(UeState.UNKNOWN, response.iterator().next().properties().ueState()); + Assertions.assertEquals("hvfdqqj", response.iterator().next().properties().ueIpAddresses().get(0).dnn()); + Assertions.assertEquals("hwzdanojisgglmv", + response.iterator().next().properties().ueIpAddresses().get(0).ueIpAddress().ipV4Addr()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T21:10:24Z"), + response.iterator().next().properties().lastReadAt()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeIpAddressTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeIpAddressTests.java new file mode 100644 index 000000000000..91d6b2b7d2f9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeIpAddressTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.UeIpAddress; +import org.junit.jupiter.api.Assertions; + +public final class UeIpAddressTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeIpAddress model = BinaryData.fromString("{\"ipV4Addr\":\"vzidsxwaab\"}").toObject(UeIpAddress.class); + Assertions.assertEquals("vzidsxwaab", model.ipV4Addr()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeIpAddress model = new UeIpAddress().withIpV4Addr("vzidsxwaab"); + model = BinaryData.fromObject(model).toObject(UeIpAddress.class); + Assertions.assertEquals("vzidsxwaab", model.ipV4Addr()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeLocationInfoTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeLocationInfoTests.java new file mode 100644 index 000000000000..34a582ecae48 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeLocationInfoTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.PlmnId; +import com.azure.resourcemanager.mobilenetwork.models.UeLocationInfo; +import org.junit.jupiter.api.Assertions; + +public final class UeLocationInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeLocationInfo model = BinaryData.fromString( + "{\"locationType\":\"injipnwjf\",\"tac\":\"jqlafcbahhpzp\",\"plmn\":{\"mcc\":\"foiyjwpfilk\",\"mnc\":\"kkholvdndvia\"}}") + .toObject(UeLocationInfo.class); + Assertions.assertEquals("injipnwjf", model.locationType()); + Assertions.assertEquals("jqlafcbahhpzp", model.tac()); + Assertions.assertEquals("foiyjwpfilk", model.plmn().mcc()); + Assertions.assertEquals("kkholvdndvia", model.plmn().mnc()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeLocationInfo model = new UeLocationInfo().withLocationType("injipnwjf") + .withTac("jqlafcbahhpzp") + .withPlmn(new PlmnId().withMcc("foiyjwpfilk").withMnc("kkholvdndvia")); + model = BinaryData.fromObject(model).toObject(UeLocationInfo.class); + Assertions.assertEquals("injipnwjf", model.locationType()); + Assertions.assertEquals("jqlafcbahhpzp", model.tac()); + Assertions.assertEquals("foiyjwpfilk", model.plmn().mcc()); + Assertions.assertEquals("kkholvdndvia", model.plmn().mnc()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeQosFlowTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeQosFlowTests.java new file mode 100644 index 000000000000..748203987937 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeQosFlowTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.UeQosFlow; +import org.junit.jupiter.api.Assertions; + +public final class UeQosFlowTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeQosFlow model = BinaryData.fromString( + "{\"qfi\":105159032,\"fiveqi\":1099892409,\"mbr\":{\"uplink\":\"jgtixr\",\"downlink\":\"vzuyturmlmu\"},\"gbr\":{\"uplink\":\"olbauirop\",\"downlink\":\"ons\"}}") + .toObject(UeQosFlow.class); + Assertions.assertEquals(105159032, model.qfi()); + Assertions.assertEquals(1099892409, model.fiveqi()); + Assertions.assertEquals("jgtixr", model.mbr().uplink()); + Assertions.assertEquals("vzuyturmlmu", model.mbr().downlink()); + Assertions.assertEquals("olbauirop", model.gbr().uplink()); + Assertions.assertEquals("ons", model.gbr().downlink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeQosFlow model = new UeQosFlow().withQfi(105159032) + .withFiveqi(1099892409) + .withMbr(new Ambr().withUplink("jgtixr").withDownlink("vzuyturmlmu")) + .withGbr(new Ambr().withUplink("olbauirop").withDownlink("ons")); + model = BinaryData.fromObject(model).toObject(UeQosFlow.class); + Assertions.assertEquals(105159032, model.qfi()); + Assertions.assertEquals(1099892409, model.fiveqi()); + Assertions.assertEquals("jgtixr", model.mbr().uplink()); + Assertions.assertEquals("vzuyturmlmu", model.mbr().downlink()); + Assertions.assertEquals("olbauirop", model.gbr().uplink()); + Assertions.assertEquals("ons", model.gbr().downlink()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeSessionInfo4GTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeSessionInfo4GTests.java new file mode 100644 index 000000000000..e5bb025e6937 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeSessionInfo4GTests.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.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.PdnType; +import com.azure.resourcemanager.mobilenetwork.models.UeIpAddress; +import com.azure.resourcemanager.mobilenetwork.models.UeSessionInfo4G; +import org.junit.jupiter.api.Assertions; + +public final class UeSessionInfo4GTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeSessionInfo4G model = BinaryData.fromString( + "{\"ebi\":1412186545,\"apn\":\"jbsahrtdtpde\",\"ueIpAddress\":{\"ipV4Addr\":\"ac\"},\"pdnType\":\"IPV4\"}") + .toObject(UeSessionInfo4G.class); + Assertions.assertEquals(1412186545, model.ebi()); + Assertions.assertEquals("jbsahrtdtpde", model.apn()); + Assertions.assertEquals("ac", model.ueIpAddress().ipV4Addr()); + Assertions.assertEquals(PdnType.IPV4, model.pdnType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeSessionInfo4G model = new UeSessionInfo4G().withEbi(1412186545) + .withApn("jbsahrtdtpde") + .withUeIpAddress(new UeIpAddress().withIpV4Addr("ac")) + .withPdnType(PdnType.IPV4); + model = BinaryData.fromObject(model).toObject(UeSessionInfo4G.class); + Assertions.assertEquals(1412186545, model.ebi()); + Assertions.assertEquals("jbsahrtdtpde", model.apn()); + Assertions.assertEquals("ac", model.ueIpAddress().ipV4Addr()); + Assertions.assertEquals(PdnType.IPV4, model.pdnType()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeSessionInfo5GTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeSessionInfo5GTests.java new file mode 100644 index 000000000000..aea4401e763c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UeSessionInfo5GTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.PdnType; +import com.azure.resourcemanager.mobilenetwork.models.Snssai; +import com.azure.resourcemanager.mobilenetwork.models.UeIpAddress; +import com.azure.resourcemanager.mobilenetwork.models.UeQosFlow; +import com.azure.resourcemanager.mobilenetwork.models.UeSessionInfo5G; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class UeSessionInfo5GTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UeSessionInfo5G model = BinaryData.fromString( + "{\"pduSessionId\":964820860,\"dnn\":\"gphuartvtiu\",\"snssai\":{\"sst\":1848545940,\"sd\":\"fchnmnah\"},\"ueIpAddress\":{\"ipV4Addr\":\"xhk\"},\"pdnType\":\"IPV4\",\"ambr\":{\"uplink\":\"qirwrweoox\",\"downlink\":\"fifhxwrsnew\"},\"qosFlow\":[{\"qfi\":2142810621,\"fiveqi\":557932259,\"mbr\":{\"uplink\":\"bubqmamhsycxh\",\"downlink\":\"zgaz\"},\"gbr\":{\"uplink\":\"abo\",\"downlink\":\"dvmfqhppub\"}},{\"qfi\":140837037,\"fiveqi\":1842824093,\"mbr\":{\"uplink\":\"pdfgkmtdherngbt\",\"downlink\":\"juahokqto\"},\"gbr\":{\"uplink\":\"auxofshfph\",\"downlink\":\"pnulaiywzej\"}},{\"qfi\":1948173913,\"fiveqi\":520956012,\"mbr\":{\"uplink\":\"lwkojpllndnpdw\",\"downlink\":\"pqafgfugsnnfhy\"},\"gbr\":{\"uplink\":\"efy\",\"downlink\":\"oc\"}}]}") + .toObject(UeSessionInfo5G.class); + Assertions.assertEquals(964820860, model.pduSessionId()); + Assertions.assertEquals("gphuartvtiu", model.dnn()); + Assertions.assertEquals(1848545940, model.snssai().sst()); + Assertions.assertEquals("fchnmnah", model.snssai().sd()); + Assertions.assertEquals("xhk", model.ueIpAddress().ipV4Addr()); + Assertions.assertEquals(PdnType.IPV4, model.pdnType()); + Assertions.assertEquals("qirwrweoox", model.ambr().uplink()); + Assertions.assertEquals("fifhxwrsnew", model.ambr().downlink()); + Assertions.assertEquals(2142810621, model.qosFlow().get(0).qfi()); + Assertions.assertEquals(557932259, model.qosFlow().get(0).fiveqi()); + Assertions.assertEquals("bubqmamhsycxh", model.qosFlow().get(0).mbr().uplink()); + Assertions.assertEquals("zgaz", model.qosFlow().get(0).mbr().downlink()); + Assertions.assertEquals("abo", model.qosFlow().get(0).gbr().uplink()); + Assertions.assertEquals("dvmfqhppub", model.qosFlow().get(0).gbr().downlink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UeSessionInfo5G model = new UeSessionInfo5G().withPduSessionId(964820860) + .withDnn("gphuartvtiu") + .withSnssai(new Snssai().withSst(1848545940).withSd("fchnmnah")) + .withUeIpAddress(new UeIpAddress().withIpV4Addr("xhk")) + .withPdnType(PdnType.IPV4) + .withAmbr(new Ambr().withUplink("qirwrweoox").withDownlink("fifhxwrsnew")) + .withQosFlow(Arrays.asList( + new UeQosFlow().withQfi(2142810621) + .withFiveqi(557932259) + .withMbr(new Ambr().withUplink("bubqmamhsycxh").withDownlink("zgaz")) + .withGbr(new Ambr().withUplink("abo").withDownlink("dvmfqhppub")), + new UeQosFlow().withQfi(140837037) + .withFiveqi(1842824093) + .withMbr(new Ambr().withUplink("pdfgkmtdherngbt").withDownlink("juahokqto")) + .withGbr(new Ambr().withUplink("auxofshfph").withDownlink("pnulaiywzej")), + new UeQosFlow().withQfi(1948173913) + .withFiveqi(520956012) + .withMbr(new Ambr().withUplink("lwkojpllndnpdw").withDownlink("pqafgfugsnnfhy")) + .withGbr(new Ambr().withUplink("efy").withDownlink("oc")))); + model = BinaryData.fromObject(model).toObject(UeSessionInfo5G.class); + Assertions.assertEquals(964820860, model.pduSessionId()); + Assertions.assertEquals("gphuartvtiu", model.dnn()); + Assertions.assertEquals(1848545940, model.snssai().sst()); + Assertions.assertEquals("fchnmnah", model.snssai().sd()); + Assertions.assertEquals("xhk", model.ueIpAddress().ipV4Addr()); + Assertions.assertEquals(PdnType.IPV4, model.pdnType()); + Assertions.assertEquals("qirwrweoox", model.ambr().uplink()); + Assertions.assertEquals("fifhxwrsnew", model.ambr().downlink()); + Assertions.assertEquals(2142810621, model.qosFlow().get(0).qfi()); + Assertions.assertEquals(557932259, model.qosFlow().get(0).fiveqi()); + Assertions.assertEquals("bubqmamhsycxh", model.qosFlow().get(0).mbr().uplink()); + Assertions.assertEquals("zgaz", model.qosFlow().get(0).mbr().downlink()); + Assertions.assertEquals("abo", model.qosFlow().get(0).gbr().uplink()); + Assertions.assertEquals("dvmfqhppub", model.qosFlow().get(0).gbr().downlink()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserAssignedIdentityTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserAssignedIdentityTests.java new file mode 100644 index 000000000000..4e313e65f8d2 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserAssignedIdentityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; + +public final class UserAssignedIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserAssignedIdentity model = BinaryData.fromString( + "{\"principalId\":\"bdfab966-0311-4546-9aa8-48b8024c00db\",\"clientId\":\"8bf0dbb0-cc45-465a-a5da-160ceaf7bac3\"}") + .toObject(UserAssignedIdentity.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserAssignedIdentity model = new UserAssignedIdentity(); + model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserConsentConfigurationTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserConsentConfigurationTests.java new file mode 100644 index 000000000000..66b7e0e2c0eb --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserConsentConfigurationTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.UserConsentConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class UserConsentConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserConsentConfiguration model + = BinaryData.fromString("{\"allowSupportTelemetryAccess\":true}").toObject(UserConsentConfiguration.class); + Assertions.assertEquals(true, model.allowSupportTelemetryAccess()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserConsentConfiguration model = new UserConsentConfiguration().withAllowSupportTelemetryAccess(true); + model = BinaryData.fromObject(model).toObject(UserConsentConfiguration.class); + Assertions.assertEquals(true, model.allowSupportTelemetryAccess()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserPlaneDataRoutesItemTests.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserPlaneDataRoutesItemTests.java new file mode 100644 index 000000000000..b552fa3b9790 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/java/com/azure/resourcemanager/mobilenetwork/generated/UserPlaneDataRoutesItemTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mobilenetwork.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4Route; +import com.azure.resourcemanager.mobilenetwork.models.Ipv4RouteNextHop; +import com.azure.resourcemanager.mobilenetwork.models.UserPlaneDataRoutesItem; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class UserPlaneDataRoutesItemTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserPlaneDataRoutesItem model = BinaryData.fromString( + "{\"attachedDataNetwork\":{\"id\":\"ithhqzon\"},\"routes\":[{\"destination\":\"b\",\"nextHops\":[{\"address\":\"fwdsj\",\"priority\":677812040},{\"address\":\"jutiiswacff\",\"priority\":264036091}]},{\"destination\":\"zewk\",\"nextHops\":[{\"address\":\"crailvpn\",\"priority\":831905679},{\"address\":\"flrwd\",\"priority\":1982601986},{\"address\":\"xyjrxsagafcnih\",\"priority\":728963944}]},{\"destination\":\"pnedgf\",\"nextHops\":[{\"address\":\"cvqvpkeqdcv\",\"priority\":1258366887},{\"address\":\"ood\",\"priority\":1193557953},{\"address\":\"obzdopcjwvnhdl\",\"priority\":363113472}]}]}") + .toObject(UserPlaneDataRoutesItem.class); + Assertions.assertEquals("ithhqzon", model.attachedDataNetwork().id()); + Assertions.assertEquals("b", model.routes().get(0).destination()); + Assertions.assertEquals("fwdsj", model.routes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(677812040, model.routes().get(0).nextHops().get(0).priority()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserPlaneDataRoutesItem model = new UserPlaneDataRoutesItem() + .withAttachedDataNetwork(new AttachedDataNetworkResourceId().withId("ithhqzon")) + .withRoutes(Arrays.asList( + new Ipv4Route().withDestination("b") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop().withAddress("fwdsj").withPriority(677812040), + new Ipv4RouteNextHop().withAddress("jutiiswacff").withPriority(264036091))), + new Ipv4Route().withDestination("zewk") + .withNextHops(Arrays.asList(new Ipv4RouteNextHop().withAddress("crailvpn").withPriority(831905679), + new Ipv4RouteNextHop().withAddress("flrwd").withPriority(1982601986), + new Ipv4RouteNextHop().withAddress("xyjrxsagafcnih").withPriority(728963944))), + new Ipv4Route().withDestination("pnedgf") + .withNextHops( + Arrays.asList(new Ipv4RouteNextHop().withAddress("cvqvpkeqdcv").withPriority(1258366887), + new Ipv4RouteNextHop().withAddress("ood").withPriority(1193557953), + new Ipv4RouteNextHop().withAddress("obzdopcjwvnhdl").withPriority(363113472))))); + model = BinaryData.fromObject(model).toObject(UserPlaneDataRoutesItem.class); + Assertions.assertEquals("ithhqzon", model.attachedDataNetwork().id()); + Assertions.assertEquals("b", model.routes().get(0).destination()); + Assertions.assertEquals("fwdsj", model.routes().get(0).nextHops().get(0).address()); + Assertions.assertEquals(677812040, model.routes().get(0).nextHops().get(0).priority()); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker new file mode 100644 index 000000000000..1f0955d450f0 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker @@ -0,0 +1 @@ +mock-maker-inline diff --git a/sdk/mobilenetwork/ci.yml b/sdk/mobilenetwork/ci.yml new file mode 100644 index 000000000000..45c8b1f71294 --- /dev/null +++ b/sdk/mobilenetwork/ci.yml @@ -0,0 +1,39 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/mobilenetwork/ci.yml + - sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/ + exclude: + - sdk/mobilenetwork/pom.xml + - sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mobilenetwork/ci.yml + - sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/ + exclude: + - sdk/mobilenetwork/pom.xml + - sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: mobilenetwork + Artifacts: + - name: azure-resourcemanager-mobilenetwork + groupId: com.azure.resourcemanager + safeName: azureresourcemanagermobilenetwork diff --git a/sdk/mobilenetwork/cspell.yml b/sdk/mobilenetwork/cspell.yml new file mode 100644 index 000000000000..8899b8dc6f15 --- /dev/null +++ b/sdk/mobilenetwork/cspell.yml @@ -0,0 +1,9 @@ +# Spell-check overrides for this SDK group. +# Inherits the global config at the repo root. +# +# Add words that only appear in this folder here, in alphabetical order. +# Cross-cutting terms should go in the root cspell.json instead. +version: "0.2" +import: + - ../../.vscode/cspell.json +words: diff --git a/sdk/mobilenetwork/pom.xml b/sdk/mobilenetwork/pom.xml new file mode 100644 index 000000000000..c729302832d2 --- /dev/null +++ b/sdk/mobilenetwork/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-mobilenetwork-service + pom + 1.0.0 + + + azure-resourcemanager-mobilenetwork + + diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/CHANGELOG.md b/sdk/modelsrepository/azure-iot-modelsrepository/CHANGELOG.md new file mode 100644 index 000000000000..31ffcaa3da93 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/CHANGELOG.md @@ -0,0 +1,32 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### New features + +- Added interfaces from `com.azure.core.client.traits` to `ModelsRepositoryClientBuilder` +- Added `retryOptions` to `ModelsRepositoryClientBuilder`. + +### Other Changes + +#### Dependency Updates + +- Upgraded Jackson from `2.18.7` to `2.18.11`. + +## 1.0.0-beta.1 (2021-03-30) + +### New features + +- Initial preview of Azure Models Repository SDK + +### Breaking changes + +- N/A + +### Added + +- N/A + +### Fixes and improvements + +- N/A diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/README.md b/sdk/modelsrepository/azure-iot-modelsrepository/README.md new file mode 100644 index 000000000000..1d24ef85231a --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/README.md @@ -0,0 +1,76 @@ +# Azure IoT Models Repository client library for Java + +This library provides functionality for interacting with the [Azure IoT Models Repository][modelsrepository_iot_endpoint]. It also aims to provide a consistent experience working with digital twin model repositories following Azure IoT conventions. + +[Source code][source] + +## Getting started + +The complete Microsoft Azure SDK can be downloaded from the [Microsoft Azure downloads][microsoft_sdk_download] page, and it ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more. + +For the best development experience, developers should use the official Microsoft Maven packages for libraries. Maven packages will be regularly updated with new functionality and hotfixes. + +### Include the Package + +[//]: # ({x-version-update-start;com.azure:azure-iot-modelsrepository;current}) + +```xml + + com.azure + azure-iot-modelsrepository + 1.0.0-beta.2 + +``` + +[//]: # ({x-version-update-end}) + +### Prerequisites + +- A models repository following [Azure IoT conventions][modelsrepository_conventions] + - The models repository can be located on the local filesystem or hosted on a webserver. + - Azure IoT hosts the global [Azure IoT Models Repository][modelsrepository_iot_endpoint] which the client will point to by default if no URI is provided. + +### Authenticate the Client + +Currently no authentication mechanisms are supported in the client. The global endpoint is not tied to an Azure subscription and does not support auth. All models published are meant for anonymous public consumption. + +## Key concepts + +The Azure IoT Models Repository enables builders to manage and share digital twin models. The models are [JSON-LD][json_ld_reference] documents defined using the Digital Twins Definition Language ([DTDL][dtdlv2_reference]). + +The repository defines a pattern to store DTDL interfaces in a directory structure based on the Digital Twin Model Identifier (DTMI). You can locate an interface in the repository by converting the DTMI to a relative path. For example, the DTMI "`dtmi:com:example:Thermostat;1`" translates to `/dtmi/com/example/thermostat-1.json`. + +## Examples + +You can familiarize yourself with the client using [samples for IoT Models Repository][modelsrepository_samples]. + +## Troubleshooting + +All events and errors that surface from the service calls will be logged with the ClientLogger. + +## Next steps + +See implementation examples with our [code samples][modelsrepository_samples]. + +## Contributing + +This project welcomes contributions and suggestions. +Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. +For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). +Simply follow the instructions provided by the bot. +You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. +For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. + + +[microsoft_sdk_download]: https://azure.microsoft.com/downloads/?sdk=net +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[modelsrepository_iot_endpoint]: https://devicemodels.azure.com/ +[source]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/modelsrepository/azure-iot-modelsrepository/src +[modelsrepository_conventions]: https://github.com/Azure/iot-plugandplay-models-tools/wiki +[json_ld_reference]: https://json-ld.org +[dtdlv2_reference]: https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md +[modelsrepository_samples]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/modelsrepository/azure-iot-modelsrepository/src/samples diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/assets.json b/sdk/modelsrepository/azure-iot-modelsrepository/assets.json new file mode 100644 index 000000000000..8a365ca36fe3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/modelsrepository/azure-iot-modelsrepository", + "Tag": "java/modelsrepository/azure-iot-modelsrepository_1dd92327be" +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/build.ps1 b/sdk/modelsrepository/azure-iot-modelsrepository/build.ps1 new file mode 100644 index 000000000000..4123c2dc3e54 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/build.ps1 @@ -0,0 +1,14 @@ +# Builds the azure-iot-modelsrepository project +# The output will be in the target directory. +# You can use the generated azure-iot-modelsrepository-x-sources.jar to upload to the API review tool at https://apiview.dev/ + +param ( + [Parameter(Mandatory = $false)] + [switch] $skipTests +) + +if ($skipTests) { + mvn install -DskipTests +} else { + mvn install +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/checkstyle-suppressions.xml b/sdk/modelsrepository/azure-iot-modelsrepository/checkstyle-suppressions.xml new file mode 100644 index 000000000000..f856e23b8d1c --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/checkstyle-suppressions.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml b/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml new file mode 100644 index 000000000000..4f2189c69cd8 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml @@ -0,0 +1,125 @@ + + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-iot-modelsrepository + 1.0.0-beta.2 + + Microsoft Azure client library for Models Repository + This package contains the Microsoft Azure IoT ModelsRepository client library. + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + 0.20 + 0.20 + + + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-opens com.azure.iot.modelsrepository/com.azure.iot.modelsrepository=ALL-UNNAMED + + + false + + + + + com.azure + azure-json + 1.5.1 + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + 2.18.11 + test + + + + + + com.fasterxml.jackson.core + jackson-core + 2.18.11 + + + com.fasterxml.jackson.core + jackson-databind + 2.18.11 + + + commons-cli + commons-cli + 1.9.0 + test + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.6.3 + + + + + com.fasterxml.jackson.core:jackson-core:[2.18.11] + com.fasterxml.jackson.core:jackson-databind:[2.18.11] + + + + + + + + diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/spotbugs-exclude.xml b/sdk/modelsrepository/azure-iot-modelsrepository/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/DtmiConventions.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/DtmiConventions.java new file mode 100644 index 000000000000..723036dad238 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/DtmiConventions.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import com.azure.iot.modelsrepository.implementation.ModelsRepositoryConstants; +import com.azure.iot.modelsrepository.implementation.StatusStrings; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Locale; +import java.util.regex.Pattern; + +/** + * DtmiConventions implements the core aspects of the IoT model repo conventions which includes DTMI validation and + * calculating a URI path from a DTMI. + */ +public final class DtmiConventions { + + private DtmiConventions() { + } + + /** + * A DTMI has three components: scheme, path, and version. Scheme and path are separated by a colon. Path and + * version are separated by a semicolon i.e. scheme : path ; version. The scheme is the string literal "dtmi" in + * lowercase. The path is a sequence of one or more segments, separated by colons. The version is a sequence of one + * or more digits. Each path segment is a non-empty string containing only letters, digits, and undersc The first + * character may not be a digit, and the last character may not be an underscore. The version length is limited to + * nine digits, because the number 999,999,999 fits in a 32-bit signed integer value. The first digit may not be + * zero, so there is no ambiguity regarding whether version 1 matches version 01 since the latter is invalid. + */ + private static final Pattern VALID_DTMI_PATTERN = Pattern.compile( + "^dtmi:[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?(?::[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?)*;[1-9][0-9]{0,8}$"); + + /** + * Indicates whether a given string DTMI value is well-formed. + * + * @param dtmi DigitalTwin Model Id + * @return True if dtmi has a valid format. False otherwise. + */ + public static boolean isValidDtmi(String dtmi) { + if (dtmi == null || dtmi.isEmpty()) { + return false; + } + return VALID_DTMI_PATTERN.matcher(dtmi).matches(); + } + + /** + * Generates the model URI. + * + * @param dtmi DigitalTwin Model Id. + * @param repositoryUri The repository uri + * @param expanded Is model from precomputed values + * @return The model uri. + * @throws IllegalArgumentException if the provided dtmi is not valid. + */ + public static URI getModelUri(String dtmi, URI repositoryUri, boolean expanded) { + String dtmiPath = dtmiToPath(dtmi); + + if (expanded) { + dtmiPath = dtmiPath.replace(ModelsRepositoryConstants.JSON_EXTENSION, + ModelsRepositoryConstants.JSON_EXPANDED_EXTENSION); + } + + String stringUri = repositoryUri.toString(); + try { + if (stringUri.endsWith("/")) { + return new URI(stringUri + dtmiPath); + } else { + return new URI(stringUri + "/" + dtmiPath); + } + } catch (URISyntaxException e) { + throw new IllegalArgumentException("Invalid uri syntax", e); + } + } + + /** + * Generates the model path. + * + * @param dtmi DigitalTwin Model Id. + * @param expanded Is model from precomputed values + * @return The model path. + */ + public static String getModelPath(String dtmi, boolean expanded) { + String dtmiPath = dtmiToPath(dtmi); + + if (expanded) { + dtmiPath = dtmiPath.replace(ModelsRepositoryConstants.JSON_EXTENSION, + ModelsRepositoryConstants.JSON_EXPANDED_EXTENSION); + } + + return dtmiPath; + } + + /** + * Generates the model repository's metadata URI. + * + * @param repositoryUri The repository uri + * @return The repository metadata uri. + * @throws IllegalArgumentException if the provided repository URI is not valid + */ + public static URI getMetadataUri(URI repositoryUri) { + try { + String stringUri = repositoryUri.toString(); + if (stringUri.endsWith("/")) { + return new URI(stringUri + ModelsRepositoryConstants.MODELS_REPOSITORY_METADATA_FILE); + } else { + return new URI(stringUri + "/" + ModelsRepositoryConstants.MODELS_REPOSITORY_METADATA_FILE); + } + } catch (URISyntaxException e) { + throw new IllegalArgumentException("Invalid uri syntax", e); + } + } + + static String dtmiToPath(String dtmi) { + if (!isValidDtmi(dtmi)) { + throw new IllegalArgumentException(String.format(StatusStrings.INVALID_DTMI_FORMAT_S, dtmi)); + } + + return dtmi.toLowerCase(Locale.getDefault()).replaceAll(":", "/").replaceAll(";", "-") + + ModelsRepositoryConstants.JSON_EXTENSION; + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelDependencyResolution.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelDependencyResolution.java new file mode 100644 index 000000000000..af2b54c92113 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelDependencyResolution.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +/** + * The model dependency resolution options. + */ +public enum ModelDependencyResolution { + /** + * Disable model dependency resolution. + */ + DISABLED, + + /** + * Enable model dependency resolution. + */ + ENABLED, +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryAsyncClient.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryAsyncClient.java new file mode 100644 index 000000000000..202c63ea8afd --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryAsyncClient.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpPipeline; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.iot.modelsrepository.implementation.ModelsRepositoryAPIImpl; +import com.azure.iot.modelsrepository.implementation.ModelsRepositoryAPIImplBuilder; +import com.azure.iot.modelsrepository.implementation.RepositoryHandler; +import reactor.core.publisher.Mono; + +import java.net.URI; +import java.util.Map; + +import static com.azure.core.util.FluxUtil.withContext; + +/** + * This class provides a client for interacting asynchronously with a ModelsRepository instance. + * This client is instantiated through {@link ModelsRepositoryClientBuilder}. + */ +@ServiceClient(builder = ModelsRepositoryClientBuilder.class, isAsync = true) +public final class ModelsRepositoryAsyncClient { + private static final ClientLogger LOGGER = new ClientLogger(ModelsRepositoryAsyncClient.class); + private final ModelsRepositoryServiceVersion serviceVersion; + private final RepositoryHandler repositoryHandler; + private final ModelDependencyResolution defaultDependencyResolutionOption; + private final URI repositoryEndpoint; + + ModelsRepositoryAsyncClient(URI repositoryEndpoint, HttpPipeline pipeline, + ModelsRepositoryServiceVersion serviceVersion, ModelDependencyResolution dependencyResolutionOption) { + + this.serviceVersion = serviceVersion; + + this.defaultDependencyResolutionOption = dependencyResolutionOption; + this.repositoryEndpoint = repositoryEndpoint; + + ModelsRepositoryAPIImpl protocolLayer + = new ModelsRepositoryAPIImplBuilder().apiVersion(this.serviceVersion.toString()) + .host(repositoryEndpoint.toString()) + .pipeline(pipeline) + .serializerAdapter(JacksonAdapter.createDefaultSerializerAdapter()) + .buildClient(); + + this.repositoryHandler = new RepositoryHandler(repositoryEndpoint, protocolLayer); + } + + /** + * Gets the repository endpoint that the client has been initialized with. + * @return The target repository endpoint. + */ + public String getRepositoryEndpoint() { + return this.repositoryEndpoint.toString(); + } + + /** + * Gets the Models Repository service API version that this client is configured to use for all service requests. + * Unless configured while building this client through {@link ModelsRepositoryClientBuilder#serviceVersion(ModelsRepositoryServiceVersion)}, + * this value will be equal to the latest service API version supported by this client. + * + * @return The ModelsRepository service API version. + */ + public ModelsRepositoryServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * Gets a collection of model definitions. + * + * @param dtmi A well-formed DTDL model Id. See DTDL specs. For example 'dtmi:com:example:Thermostat;1'. + * @return A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi + * and the value is the raw model definition string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getModels(String dtmi) { + return getModels(dtmi, this.defaultDependencyResolutionOption); + } + + /** + * Gets a collection of model definitions. + * + * @param dtmi A well-formed DTDL model Id. See DTDL specs. For example 'dtmi:com:example:Thermostat;1'. + * @param dependencyResolution A {@link ModelDependencyResolution} value to dictate model resolution behavior. + * @return A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi + * and the value is the raw model definition string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getModels(String dtmi, ModelDependencyResolution dependencyResolution) { + return withContext(context -> getModels(dtmi, dependencyResolution, context)); + } + + Mono> getModels(String dtmi, ModelDependencyResolution dependencyResolution, Context context) { + return repositoryHandler.processAsync(dtmi, dependencyResolution, context); + } + + /** + * Gets a collection of model definitions. + * + * @param dtmis Collection of well-formed DTDL model Ids. + * @return A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi + * and the value is the raw model definition string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getModels(Iterable dtmis) { + return getModels(dtmis, this.defaultDependencyResolutionOption); + } + + /** + * Gets a collection of model definitions. + * + * @param dtmis An Iterable of well-formed DTDL model Ids. See DTDL specs. For example 'dtmi:com:example:Thermostat;1'. + * @param dependencyResolution A {@link ModelDependencyResolution} value to dictate model resolution behavior. + * @return A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi + * and the value is the raw model definition string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getModels(Iterable dtmis, ModelDependencyResolution dependencyResolution) { + return withContext(context -> getModels(dtmis, dependencyResolution, context)); + } + + Mono> getModels(Iterable dtmis, ModelDependencyResolution dependencyResolution, + Context context) { + return repositoryHandler.processAsync(dtmis, dependencyResolution, context); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryClient.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryClient.java new file mode 100644 index 000000000000..6ea8175401ad --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryClient.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.util.Context; + +import java.util.Map; + +/** + * This class provides a client for interacting synchronously with a ModelsRepository instance. + * This client is instantiated through {@link ModelsRepositoryClientBuilder}. + */ +@ServiceClient(builder = ModelsRepositoryClientBuilder.class) +public final class ModelsRepositoryClient { + private final ModelsRepositoryAsyncClient modelsRepositoryAsyncClient; + + ModelsRepositoryClient(ModelsRepositoryAsyncClient modelsRepositoryAsyncClient) { + this.modelsRepositoryAsyncClient = modelsRepositoryAsyncClient; + } + + /** + * Gets the repository endpoint that the client has been initialized with. + * @return The target repository endpoint. + */ + public String getRepositoryEndpoint() { + return this.modelsRepositoryAsyncClient.getRepositoryEndpoint(); + } + + /** + * Gets the Azure Models Repository service API version that this client is configured to use for all service requests. + * Unless configured while building this client through {@link ModelsRepositoryClientBuilder#serviceVersion(ModelsRepositoryServiceVersion)}, + * this value will be equal to the latest service API version supported by this client. + * + * @return The Azure Models Repository service API version. + */ + public ModelsRepositoryServiceVersion getServiceVersion() { + return this.modelsRepositoryAsyncClient.getServiceVersion(); + } + + /** + * Gets a collection of model definitions. + * + * @param dtmi A well-formed DTDL model Id. See DTDL specs. For example 'dtmi:com:example:Thermostat;1'. + * @return A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi + * and the value is the raw model definition string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Map getModels(String dtmi) { + return modelsRepositoryAsyncClient.getModels(dtmi).block(); + } + + /** + * Gets a collection of model definitions. + * + * @param dtmi A well-formed DTDL model Id. See DTDL specs. For example 'dtmi:com:example:Thermostat;1'. + * @param dependencyResolution A {@link ModelDependencyResolution} value to dictate model resolution behavior. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi + * and the value is the raw model definition string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Map getModels(String dtmi, ModelDependencyResolution dependencyResolution, Context context) { + return modelsRepositoryAsyncClient.getModels(dtmi, dependencyResolution, context).block(); + } + + /** + * Gets a collection of model definitions. + * + * @param dtmis Collection of well-formed DTDL model Ids. + * @return A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi + * and the value is the raw model definition string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Map getModels(Iterable dtmis) { + return modelsRepositoryAsyncClient.getModels(dtmis).block(); + } + + /** + * Gets a collection of model definitions. + * + * @param dtmis An Iterable of well-formed DTDL model Ids. See DTDL specs. For example 'dtmi:com:example:Thermostat;1'. + * @param dependencyResolution A {@link ModelDependencyResolution} value to dictate model resolution behavior. + * @param context Additional context that is passed through the Http pipeline during the service call. + * @return A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi + * and the value is the raw model definition string. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Map getModels(Iterable dtmis, ModelDependencyResolution dependencyResolution, + Context context) { + return modelsRepositoryAsyncClient.getModels(dtmis, dependencyResolution, context).block(); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryClientBuilder.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryClientBuilder.java new file mode 100644 index 000000000000..eac970251212 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryClientBuilder.java @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeader; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.TracingOptions; +import com.azure.core.util.HttpClientOptions; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.tracing.Tracer; +import com.azure.core.util.tracing.TracerProvider; + +import com.azure.iot.modelsrepository.implementation.ModelsRepositoryConstants; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * This class provides a fluent builder API to help aid the configuration and instantiation of {@link ModelsRepositoryClient} + * and {@link ModelsRepositoryAsyncClient}, call {@link #buildClient() buildClient} and {@link + * #buildAsyncClient() buildAsyncClient} respectively to construct an instance of the desired client. + */ +@ServiceClientBuilder(serviceClients = { ModelsRepositoryClient.class, ModelsRepositoryAsyncClient.class }) +public final class ModelsRepositoryClientBuilder + implements ConfigurationTrait, HttpTrait { + // This is the name of the properties file in this repo that contains the default properties + private static final String MODELS_REPOSITORY_PROPERTIES = "azure-iot-modelsrepository.properties"; + + // These are the keys to the above properties file that define the client library's name and version for use in the user agent string + private static final String SDK_NAME = "name"; + private static final String SDK_VERSION = "version"; + private static final String MODELS_REPOSITORY_TRACING_NAMESPACE_VALUE = "Azure.IoT.ModelsRepository"; + private static URI globalRepositoryUri; + + static { + try { + globalRepositoryUri = new URI(ModelsRepositoryConstants.DEFAULT_MODELS_REPOSITORY_ENDPOINT); + } catch (URISyntaxException e) { + // We know it won't throw since it's a known endpoint and has been validated. + } + } + + private final List additionalPolicies; + + // Fields with default values. + private URI repositoryEndpoint; + + private ModelDependencyResolution modelDependencyResolution = ModelDependencyResolution.ENABLED; + + // optional/have default values + private ModelsRepositoryServiceVersion serviceVersion; + private ClientOptions clientOptions; + private HttpPipeline httpPipeline; + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + + // Right now, Azure Models Repository does not send a retry-after header on its throttling messages. If it adds support later, then + // these values should match the header name (for instance, "x-ms-retry-after-ms" or "Retry-After") and the time unit + // of the header's value. These null values are equivalent to just constructing "new RetryPolicy()". It is safe + // to use a null retryAfterHeader and a null retryAfterTimeUnit when constructing this retry policy as this + // constructor interprets that as saying "this service does not support retry after headers" + private static final RetryPolicy DEFAULT_RETRY_POLICY = new RetryPolicy(null, null); + + private final Map properties; + + private Configuration configuration; + + /** + * The public constructor for ModelsRepositoryClientBuilder + */ + public ModelsRepositoryClientBuilder() { + additionalPolicies = new ArrayList<>(); + properties = CoreUtils.getProperties(MODELS_REPOSITORY_PROPERTIES); + httpLogOptions = new HttpLogOptions(); + this.repositoryEndpoint = globalRepositoryUri; + } + + private static HttpPipeline constructPipeline(HttpLogOptions httpLogOptions, ClientOptions clientOptions, + HttpClient httpClient, List additionalPolicies, HttpPipelinePolicy retryPolicy, + Configuration configuration, Map properties) { + // Closest to API goes first, closest to wire goes last. + List policies = new ArrayList<>(); + + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + + // Give precedence to applicationId configured in clientOptions over the one configured in httpLogOptions. + // Azure.Core deprecated setting the applicationId in httpLogOptions, but we should still support it. + String applicationId + = clientOptions == null ? httpLogOptions.getApplicationId() : clientOptions.getApplicationId(); + + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, configuration)); + + // Adds a "x-ms-client-request-id" header to each request. This header is useful for tracing requests through Azure ecosystems + policies.add(new RequestIdPolicy()); + + // Only the RequestIdPolicy and UserAgentPolicy will take effect prior to the retry policy since neither of those need + // to change in any way upon retry + HttpPolicyProviders.addBeforeRetryPolicies(policies); + + policies.add(retryPolicy); + + // Adds a date header to each HTTP request for tracking purposes + policies.add(new AddDatePolicy()); + + policies.addAll(additionalPolicies); + + // If client options has headers configured, add a policy for each + if (clientOptions != null) { + List httpHeaderList = new ArrayList<>(); + clientOptions.getHeaders() + .forEach(header -> httpHeaderList.add(new HttpHeader(header.getName(), header.getValue()))); + policies.add(new AddHeadersPolicy(new HttpHeaders(httpHeaderList))); + } + + // Custom policies, authentication policy, and add date policy all take place after the retry policy which means + // they will be applied once per http request, and once for every retried http request. For instance, the + // AddDatePolicy will add a date time header for each request that is sent, and if the http request fails + // and the retry policy dictates that the request should be retried, then the date time header policy will + // be applied again and the current date time will be put in the header instead of the date time from + // the first http request attempt. + HttpPolicyProviders.addAfterRetryPolicies(policies); + + policies.add(new HttpLoggingPolicy(httpLogOptions)); + + TracingOptions tracingOptions = null; + if (clientOptions != null) { + tracingOptions = clientOptions.getTracingOptions(); + } + + Tracer tracer = TracerProvider.getDefaultProvider() + .createTracer(clientName, clientVersion, MODELS_REPOSITORY_TRACING_NAMESPACE_VALUE, tracingOptions); + + return new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .tracer(tracer) + .build(); + } + + /** + * Create a {@link ModelsRepositoryClient} based on the builder settings. + * + * @return the created synchronous ModelsRepositoryClient + * @throws IllegalStateException If both {@link #retryOptions(RetryOptions)} + * and {@link #retryPolicy(RetryPolicy)} have been set. + */ + public ModelsRepositoryClient buildClient() { + return new ModelsRepositoryClient(buildAsyncClient()); + } + + /** + * Create a {@link ModelsRepositoryAsyncClient} based on the builder settings. + * + * @return the created asynchronous ModelsRepositoryAsyncClient + * @throws IllegalStateException If both {@link #retryOptions(RetryOptions)} + * and {@link #retryPolicy(RetryPolicy)} have been set. + */ + public ModelsRepositoryAsyncClient buildAsyncClient() { + Configuration buildConfiguration = this.configuration; + if (buildConfiguration == null) { + buildConfiguration = Configuration.getGlobalConfiguration().clone(); + } + + // Set defaults for these fields if they were not set while building the client + ModelsRepositoryServiceVersion serviceVersion = this.serviceVersion; + if (serviceVersion == null) { + serviceVersion = ModelsRepositoryServiceVersion.getLatest(); + } + + // Default is exponential backoff + HttpPipelinePolicy retryPolicy + = ClientBuilderUtil.validateAndGetRetryPolicy(this.retryPolicy, retryOptions, DEFAULT_RETRY_POLICY); + + if (this.httpPipeline == null) { + this.httpPipeline = constructPipeline(this.httpLogOptions, this.clientOptions, this.httpClient, + this.additionalPolicies, retryPolicy, buildConfiguration, this.properties); + } + + return new ModelsRepositoryAsyncClient(this.repositoryEndpoint, this.httpPipeline, serviceVersion, + this.modelDependencyResolution); + } + + /** + * Set the default dependency resolution option that the built client will use. This field will have a default value. + * + * @param modelDependencyResolution A DependencyResolutionOption value to force model resolution behavior. + * @return the updated ModelsRepositoryClientBuilder instance for fluent building. + */ + public ModelsRepositoryClientBuilder + modelDependencyResolution(ModelDependencyResolution modelDependencyResolution) { + this.modelDependencyResolution = modelDependencyResolution; + return this; + } + + /** + * Set the service endpoint that the built client will communicate with. This field is mandatory to set. + * + * @param repositoryEndpoint Uri of the service in String format. + * @return the updated ModelsRepositoryClientBuilder instance for fluent building. + */ + public ModelsRepositoryClientBuilder repositoryEndpoint(String repositoryEndpoint) { + this.repositoryEndpoint = convertToUri(repositoryEndpoint); + return this; + } + + /** + * Sets the {@link ModelsRepositoryServiceVersion} that is used when making API requests. + *

      + * If a service version is not provided, the service version that will be used will be the latest known service + * version based on the version of the client library being used. If no service version is specified, updating to a + * newer version of the client library will have the result of potentially moving to a newer service version. + *

      + * Targeting a specific service version may also mean that the service will return an error for newer APIs. + * + * @param serviceVersion The service API version to use. + * @return the updated ModelsRepositoryClientBuilder instance for fluent building. + */ + public ModelsRepositoryClientBuilder serviceVersion(ModelsRepositoryServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /** + * Sets the {@link HttpClient} to use for sending and receiving requests to and from the service. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + * + * @param httpClient The {@link HttpClient} to use for requests. + * @return the updated ModelsRepositoryClientBuilder instance for fluent building. + */ + @Override + public ModelsRepositoryClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Sets the {@link HttpLogOptions logging configuration} to use when sending and receiving requests to and from + * the service. If a {@code logLevel} is not provided, default value of {@link HttpLogDetailLevel#NONE} is set. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + * + * @param logOptions The {@link HttpLogOptions logging configuration} to use when sending and receiving requests to + * and from the service. + * @return the updated ModelsRepositoryClientBuilder instance for fluent building. + */ + @Override + public ModelsRepositoryClientBuilder httpLogOptions(HttpLogOptions logOptions) { + this.httpLogOptions = logOptions; + return this; + } + + /** + * Adds a {@link HttpPipelinePolicy pipeline policy} to apply on each request sent. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + * + * @param pipelinePolicy A {@link HttpPipelinePolicy pipeline policy}. + * @return the updated ModelsRepositoryClientBuilder instance for fluent building. + * @throws NullPointerException If {@code pipelinePolicy} is {@code null}. + */ + @Override + public ModelsRepositoryClientBuilder addPolicy(HttpPipelinePolicy pipelinePolicy) { + this.additionalPolicies.add(Objects.requireNonNull(pipelinePolicy, "'pipelinePolicy' cannot be null")); + return this; + } + + /** + * Sets the {@link HttpPipelinePolicy} that is used as the retry policy for each request that is sent. + *

      + * The default retry policy will be used if not provided. The default retry policy is {@link RetryPolicy#RetryPolicy()}. + * For implementing custom retry logic, see {@link RetryPolicy} as an example. + *

      + * Setting this is mutually exclusive with using {@link #retryOptions(RetryOptions)}. + * + * @param retryPolicy the retry policy applied to each request. + * @return the updated ModelsRepositoryClientBuilder instance for fluent building. + */ + public ModelsRepositoryClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Sets the {@link RetryOptions} for all the requests made through the client. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + *

      + * Setting this is mutually exclusive with using {@link #retryPolicy(RetryPolicy)}. + * + * @param retryOptions The {@link RetryOptions} to use for all the requests made through the client. + * @return The updated ModelsRepositoryClientBuilder object for fluent building. + */ + @Override + public ModelsRepositoryClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * Sets the {@link HttpPipeline} to use for the service client. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + *

      + * If {@code pipeline} is set, all other settings are ignored, aside from {@link #repositoryEndpoint(String) endpoint}. + * + * @param httpPipeline {@link HttpPipeline} to use for sending service requests and receiving responses. + * @return The updated ModelsRepositoryClientBuilder object for fluent building. + */ + @Override + public ModelsRepositoryClientBuilder pipeline(HttpPipeline httpPipeline) { + this.httpPipeline = httpPipeline; + return this; + } + + /** + * Sets the configuration store that is used during construction of the service client. + *

      + * The default configuration store is a clone of the {@link Configuration#getGlobalConfiguration() global + * configuration store}, use {@link Configuration#NONE} to bypass using configuration settings during construction. + * + * @param configuration The configuration store used to + * @return The updated ModelsRepositoryClientBuilder object for fluent building. + */ + @Override + public ModelsRepositoryClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /** + * Allows for setting common properties such as application ID, headers, proxy configuration, etc. Note that it is + * recommended that this method be called with an instance of the {@link HttpClientOptions} + * class (a subclass of the {@link ClientOptions} base class). The HttpClientOptions subclass provides more + * configuration options suitable for HTTP clients, which is applicable for any class that implements this HttpTrait + * interface. + * + *

      Note: It is important to understand the precedence order of the HttpTrait APIs. In + * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and + * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally + * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this + * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the + * documentation of types that implement this trait to understand the full set of implications.

      + * + * @param clientOptions A configured instance of {@link HttpClientOptions}. + * @return The updated ModelsRepositoryClientBuilder object for fluent building. + * @see HttpClientOptions + */ + @Override + public ModelsRepositoryClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /** + * Converts a string to {@link URI} + * + * @param uri String format of the path + * @return {@link URI} representation of the path/uri. + * @throws IllegalArgumentException If the {@code uri} is invalid. + */ + static URI convertToUri(String uri) throws IllegalArgumentException { + try { + return new URI(uri); + } catch (Exception e) { + throw new IllegalArgumentException("Invalid URI format", e); + } + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryServiceVersion.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryServiceVersion.java new file mode 100644 index 000000000000..7aa909206eee --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/ModelsRepositoryServiceVersion.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import com.azure.core.util.ServiceVersion; + +/** + * The service API versions of Azure Models Repository that are supported by this client. + */ +public enum ModelsRepositoryServiceVersion implements ServiceVersion { + /** + * Service version {@code 2021_02_11}. + */ + V2021_02_11("2021_02_11"); + + private final String version; + + ModelsRepositoryServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service API version of Azure Models Repository that is supported by this client. + * + * @return The latest service API version of Azure Models Repository that is supported by this client. + */ + public static ModelsRepositoryServiceVersion getLatest() { + return V2021_02_11; + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/FileModelFetcher.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/FileModelFetcher.java new file mode 100644 index 000000000000..f36f058f443d --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/FileModelFetcher.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +import com.azure.core.exception.AzureException; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.iot.modelsrepository.DtmiConventions; +import com.azure.iot.modelsrepository.implementation.models.FetchMetadataResult; +import com.azure.iot.modelsrepository.implementation.models.FetchModelResult; +import reactor.core.publisher.Mono; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.LinkedList; +import java.util.Queue; + +/** + * The {@link FileModelFetcher} is an implementation of {@link ModelFetcher} interface + * for supporting local filesystem based model content fetching. + */ +class FileModelFetcher implements ModelFetcher { + + private final ClientLogger logger; + + /** + * Creates an instance of {@link FileModelFetcher} + */ + FileModelFetcher() { + this.logger = new ClientLogger(FileModelFetcher.class); + } + + @Override + public Mono fetchModelAsync(String dtmi, URI repositoryUri, boolean tryFromExpanded, + Context context) { + return Mono.defer(() -> { + Queue work = new LinkedList<>(); + + try { + if (tryFromExpanded) { + work.add(getModelPath(dtmi, repositoryUri, true)); + } + work.add(getModelPath(dtmi, repositoryUri, false)); + } catch (MalformedURLException | URISyntaxException e) { + return Mono.error(new AzureException(e)); + } + + String fnfError = ""; + while (work.size() != 0) { + String tryContentPath = work.poll(); + + Path path = Paths.get(new File(tryContentPath).getPath()); + + logger.info(StatusStrings.FETCHING_MODEL_CONTENT, path); + + if (Files.exists(path)) { + try { + return Mono.just(new FetchModelResult() + .setDefinition(new String(Files.readAllBytes(path), StandardCharsets.UTF_8)) + .setPath(tryContentPath)); + } catch (IOException e) { + return Mono.error(new AzureException(e)); + } + } + + logger.error(String.format(StatusStrings.ERROR_FETCHING_MODEL_CONTENT, path.toString())); + + fnfError = String.format(StatusStrings.ERROR_FETCHING_MODEL_CONTENT, tryContentPath); + } + + return Mono.error(new AzureException(fnfError)); + }); + } + + @Override + public Mono fetchMetadataAsync(URI repositoryUri, Context context) { + try { + String tryContentPath = getMetadataPath(repositoryUri); + Path path = Paths.get(new File(tryContentPath).getPath()); + + logger.info(StatusStrings.FETCHING_METADATA_CONTENT, path); + + if (Files.exists(path)) { + try { + return Mono.just(new FetchMetadataResult() + .setDefinition(new String(Files.readAllBytes(path), StandardCharsets.UTF_8)) + .setPath(tryContentPath)); + } catch (IOException e) { + logger.error(String.format(StatusStrings.ERROR_FETCHING_METADATA_CONTENT + " Error: %s.", + path.toString(), e.getMessage())); + return Mono.error(new AzureException(e)); + } + } + + logger.error(String.format(StatusStrings.ERROR_FETCHING_METADATA_CONTENT, path.toString())); + return Mono.just(new FetchMetadataResult()); + } catch (MalformedURLException | URISyntaxException e) { + return Mono.error(new AzureException(e)); + } + } + + private String getModelPath(String dtmi, URI repositoryUri, boolean expanded) + throws URISyntaxException, MalformedURLException { + return DtmiConventions.getModelUri(dtmi, repositoryUri, expanded).getPath(); + } + + private String getMetadataPath(URI repositoryUri) throws URISyntaxException, MalformedURLException { + return DtmiConventions.getMetadataUri(repositoryUri).getPath(); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/HttpModelFetcher.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/HttpModelFetcher.java new file mode 100644 index 000000000000..94c858ca5d65 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/HttpModelFetcher.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +import com.azure.core.exception.AzureException; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.iot.modelsrepository.DtmiConventions; +import com.azure.iot.modelsrepository.implementation.models.FetchMetadataResult; +import com.azure.iot.modelsrepository.implementation.models.FetchModelResult; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; +import java.util.LinkedList; +import java.util.Queue; + +/** + * The {@link HttpModelFetcher} is an implementation of {@link ModelFetcher} interface + * for supporting http[s] based model content fetching. + */ +class HttpModelFetcher implements ModelFetcher { + private final ModelsRepositoryAPIImpl protocolLayer; + private final ClientLogger logger; + + HttpModelFetcher(ModelsRepositoryAPIImpl protocolLayer) { + this.logger = new ClientLogger(HttpModelFetcher.class); + this.protocolLayer = protocolLayer; + } + + @Override + public Mono fetchModelAsync(String dtmi, URI repositoryUri, boolean tryFromExpanded, + Context context) { + return Mono.defer(() -> { + Queue work = new LinkedList<>(); + try { + if (tryFromExpanded) { + work.add(getModelPath(dtmi, repositoryUri, true)); + } + work.add(getModelPath(dtmi, repositoryUri, false)); + } catch (Exception e) { + return Mono.error(new AzureException(e)); + } + + String tryContentPath = work.poll(); + + logger.info(StatusStrings.FETCHING_MODEL_CONTENT, tryContentPath); + + return evaluatePath(tryContentPath, context).onErrorResume(error -> { + if (!work.isEmpty()) { + return evaluatePath(work.poll(), context); + } else { + logger.error(String.format(StatusStrings.ERROR_FETCHING_MODEL_CONTENT, tryContentPath)); + return Mono.error(error); + } + }).map(s -> new FetchModelResult().setPath(tryContentPath).setDefinition(s)); + }); + } + + @Override + public Mono fetchMetadataAsync(URI repositoryUri, Context context) { + try { + String tryContentPath = getMetadataPath(repositoryUri); + + logger.info(StatusStrings.FETCHING_METADATA_CONTENT, tryContentPath); + + return evaluatePath(tryContentPath, context).onErrorResume(error -> { + logger.error(String.format(StatusStrings.ERROR_FETCHING_METADATA_CONTENT + " Error: %s", tryContentPath, + error.getMessage())); + return Mono.error(error); + }).map(s -> { + try { + return new FetchMetadataResult().setPath(tryContentPath).setDefinition(s); + } catch (IOException e) { + logger.error(String.format(StatusStrings.ERROR_FETCHING_METADATA_CONTENT, tryContentPath)); + return null; + } + }); + } catch (MalformedURLException | URISyntaxException e) { + return Mono.error(new AzureException(e)); + } + } + + private Mono evaluatePath(String tryContentPath, Context context) { + return protocolLayer.getModelsRepository() + .getModelFromPathWithResponseAsync(tryContentPath, context) + .flatMap(response -> { + String stringResponse = new String(response, StandardCharsets.UTF_8); + return Mono.just(stringResponse); + }); + } + + private String getModelPath(String dtmi, URI repositoryUri, boolean expanded) throws URISyntaxException { + return DtmiConventions.getModelPath(dtmi, expanded); + } + + private String getMetadataPath(URI repositoryUri) throws URISyntaxException, MalformedURLException { + return DtmiConventions.getMetadataUri(repositoryUri).getPath(); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/IntermediateFetchModelResult.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/IntermediateFetchModelResult.java new file mode 100644 index 000000000000..579d059b7b4b --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/IntermediateFetchModelResult.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +import com.azure.iot.modelsrepository.implementation.models.FetchModelResult; + +import java.util.Map; + +/** + * This type is used to unify the expand operation return types in the recursive function and has no other use cases. + * Do not take any dependencies on this type. + */ +class IntermediateFetchModelResult { + private final FetchModelResult fetchModelResult; + private final Map map; + + IntermediateFetchModelResult(FetchModelResult fetchModelResult, Map map) { + this.fetchModelResult = fetchModelResult; + this.map = map; + } + + public FetchModelResult getFetchModelResult() { + return fetchModelResult; + } + + public Map getMap() { + return map; + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelFetcher.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelFetcher.java new file mode 100644 index 000000000000..2b5d26ab9446 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelFetcher.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +import com.azure.core.util.Context; +import com.azure.iot.modelsrepository.implementation.models.FetchMetadataResult; +import com.azure.iot.modelsrepository.implementation.models.FetchModelResult; +import reactor.core.publisher.Mono; + +import java.net.URI; + +interface ModelFetcher { + Mono fetchModelAsync(String dtmi, URI repositoryUri, boolean tryFromExpanded, Context context); + + Mono fetchMetadataAsync(URI repositoryUri, Context context); +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsQuery.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsQuery.java new file mode 100644 index 000000000000..ae87b8c838a5 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsQuery.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +import com.azure.iot.modelsrepository.implementation.models.ModelMetadata; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.models.JsonArray; +import com.azure.json.models.JsonElement; +import com.azure.json.models.JsonObject; +import com.azure.json.models.JsonString; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * The {@link ModelsQuery} class is responsible for parsing DTDL v2 models to produce key metadata. + * In the current form this class is focused on determining model dependencies recursively + * via extends and component schemas. + */ +public class ModelsQuery { + private static final String UTF8_BOM = "\uFEFF"; + private final String content; + + public ModelsQuery(String content) { + if (content.startsWith(UTF8_BOM)) { + this.content = content.substring(1); + } else { + this.content = content; + } + } + + public ModelMetadata parseModel() throws IOException { + try (JsonReader jsonReader = JsonProviders.createReader(this.content)) { + JsonToken token = jsonReader.nextToken(); + if (token != JsonToken.START_OBJECT) { + return new ModelMetadata("", new ArrayList<>(), new ArrayList<>()); + } + + return parseInterface(JsonObject.fromJson(jsonReader)); + } + } + + public Map listToMap() throws IOException { + Map result = new HashMap<>(); + + try (JsonReader jsonReader = JsonProviders.createReader(this.content)) { + JsonToken token = jsonReader.nextToken(); // Initialize reading. + if (token == JsonToken.START_ARRAY) { + while ((token = jsonReader.nextToken()) != JsonToken.END_ARRAY) { + if (token == JsonToken.START_OBJECT) { + String nodeString = jsonReader.readChildren(); + String id = new ModelsQuery(nodeString).parseModel().getId(); + result.put(id, nodeString); + } else { + jsonReader.skipChildren(); + } + } + } + } + + return result; + } + + private static ModelMetadata parseInterface(JsonObject root) { + String rootDtmi = parseRootDtmi(root); + List extend = parseExtends(root); + List contents = parseContents(root); + + return new ModelMetadata(rootDtmi, extend, contents); + } + + private static String parseRootDtmi(JsonObject root) { + JsonElement id = root.getProperty(ModelsRepositoryConstants.DTDL_ID); + if (id != null && id.isString()) { + return ((JsonString) id).getValue(); + } + + return ""; + } + + private static List parseExtends(JsonObject root) { + List dependencies = new ArrayList<>(); + + JsonElement extend = root.getProperty(ModelsRepositoryConstants.DTDL_EXTENDS); + if (extend == null) { + return dependencies; + } + + if (extend.isString()) { + dependencies.add(((JsonString) extend).getValue()); + } else if (isOfDtdlType(extend, ModelsRepositoryConstants.DTDL_INTERFACE)) { + ModelMetadata metadata = parseInterface((JsonObject) extend); + dependencies.addAll(metadata.getDependencies()); + } else if (extend.isArray()) { + JsonArray array = (JsonArray) extend; + for (int i = 0; i < array.size(); i++) { + JsonElement extendNode = array.getElement(i); + if (extendNode.isString()) { + dependencies.add(((JsonString) extendNode).getValue()); + } else if (isOfDtdlType(extendNode, ModelsRepositoryConstants.DTDL_INTERFACE)) { + ModelMetadata metadata = parseInterface((JsonObject) extendNode); + dependencies.addAll(metadata.getDependencies()); + } + } + } + + return dependencies; + } + + private static List parseContents(JsonObject root) { + List dependencies = new ArrayList<>(); + + JsonElement contents = root.getProperty(ModelsRepositoryConstants.DTDL_CONTENTS); + if (contents != null && contents.isArray()) { + JsonArray array = (JsonArray) contents; + for (int i = 0; i < array.size(); i++) { + JsonElement contentNode = array.getElement(i); + if (isOfDtdlType(contentNode, ModelsRepositoryConstants.DTDL_COMPONENT)) { + dependencies.addAll(parseComponent((JsonObject) contentNode)); + } + } + } + + return dependencies; + } + + private static List parseComponent(JsonObject root) { + List dependencies = new ArrayList<>(); + + JsonElement componentSchema = root.getProperty(ModelsRepositoryConstants.DTDL_SCHEMA); + if (componentSchema != null) { + if (componentSchema.isString()) { + dependencies.add(((JsonString) componentSchema).getValue()); + } else if (isOfDtdlType(componentSchema, ModelsRepositoryConstants.DTDL_INTERFACE)) { + ModelMetadata metadata = parseInterface((JsonObject) componentSchema); + dependencies.addAll(metadata.getDependencies()); + } else if (componentSchema.isArray()) { + JsonArray array = (JsonArray) componentSchema; + for (int i = 0; i < array.size(); i++) { + JsonElement componentNode = array.getElement(i); + if (componentNode.isString()) { + dependencies.add(((JsonString) componentNode).getValue()); + } else if (isOfDtdlType(componentNode, ModelsRepositoryConstants.DTDL_INTERFACE)) { + ModelMetadata metadata = parseInterface((JsonObject) componentNode); + dependencies.addAll(metadata.getDependencies()); + } + } + } + } + + return dependencies; + } + + private static boolean isOfDtdlType(JsonElement root, String objectTypeString) { + if (root.isObject()) { + JsonElement objectType = ((JsonObject) root).getProperty(ModelsRepositoryConstants.DTDL_TYPE); + if (objectType != null) { + return objectType.isString() && Objects.equals(((JsonString) objectType).getValue(), objectTypeString); + } + } + + return false; + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryAPIImpl.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryAPIImpl.java new file mode 100644 index 000000000000..ba8cc4cf56cb --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryAPIImpl.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.util.serializer.SerializerAdapter; + +/** Initializes a new instance of the ModelsRepositoryAPIImpl type. */ +public final class ModelsRepositoryAPIImpl { + /** server parameter. */ + private final String host; + + /** + * Gets server parameter. + * + * @return the host value. + */ + public String getHost() { + return this.host; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The ModelsRepositoryImpl object to access its operations. */ + private final ModelsRepositoryImpl modelsRepository; + + /** + * Gets the ModelsRepositoryImpl object to access its operations. + * + * @return the ModelsRepositoryImpl object. + */ + public ModelsRepositoryImpl getModelsRepository() { + return this.modelsRepository; + } + + /** + * Initializes an instance of ModelsRepositoryAPI client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param host server parameter. + */ + ModelsRepositoryAPIImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String host, + String apiVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.host = host; + this.apiVersion = apiVersion; + this.modelsRepository = new ModelsRepositoryImpl(this); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryAPIImplBuilder.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryAPIImplBuilder.java new file mode 100644 index 000000000000..aafa10a9e6a6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryAPIImplBuilder.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.Configuration; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.iot.modelsrepository.ModelsRepositoryServiceVersion; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * A builder for creating a new instance of the ModelsRepositoryAPI type. + */ +@ServiceClientBuilder(serviceClients = { ModelsRepositoryAPIImpl.class }) +public final class ModelsRepositoryAPIImplBuilder { + private static final String SDK_NAME = "name"; + + private static final String SDK_VERSION = "version"; + + private final Map properties = new HashMap<>(); + + public ModelsRepositoryAPIImplBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * server parameter + */ + private String host; + + /** + * Sets server parameter. + * + * @param host the host value. + * @return the ModelsRepositoryAPIImplBuilder. + */ + public ModelsRepositoryAPIImplBuilder host(String host) { + this.host = host; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the ModelsRepositoryAPIImplBuilder. + */ + public ModelsRepositoryAPIImplBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the ModelsRepositoryAPIImplBuilder. + */ + public ModelsRepositoryAPIImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The HTTP client used to send the request. + */ + private HttpClient httpClient; + + /** + * Sets The HTTP client used to send the request. + * + * @param httpClient the httpClient value. + * @return the ModelsRepositoryAPIImplBuilder. + */ + public ModelsRepositoryAPIImplBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The configuration store that is used during construction of the service + * client. + */ + private Configuration configuration; + + /** + * Sets The configuration store that is used during construction of the service client. + * + * @param configuration the configuration value. + * @return the ModelsRepositoryAPIImplBuilder. + */ + public ModelsRepositoryAPIImplBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + private HttpLogOptions httpLogOptions; + + /** + * Sets The logging configuration for HTTP requests and responses. + * + * @param httpLogOptions the httpLogOptions value. + * @return the ModelsRepositoryAPIImplBuilder. + */ + public ModelsRepositoryAPIImplBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * Api Version + */ + private String apiVersion; + + /** + * Sets Api Version. + * + * @param apiVersion the apiVersion value. + * @return the ModelsRepositoryAPIImplBuilder. + */ + public ModelsRepositoryAPIImplBuilder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if + * applicable. + */ + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the ModelsRepositoryAPIImplBuilder. + */ + public ModelsRepositoryAPIImplBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /* + * The list of Http pipeline policies to add. + */ + private final List pipelinePolicies; + + /** + * Adds a custom Http pipeline policy. + * + * @param customPolicy The custom Http pipeline policy to add. + * @return the ModelsRepositoryAPIImplBuilder. + */ + public ModelsRepositoryAPIImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { + pipelinePolicies.add(customPolicy); + return this; + } + + /** + * Builds an instance of ModelsRepositoryAPIImpl with the provided parameters. + * + * @return an instance of ModelsRepositoryAPIImpl. + */ + public ModelsRepositoryAPIImpl buildClient() { + if (apiVersion == null) { + this.apiVersion = ModelsRepositoryServiceVersion.getLatest().toString(); + } + if (host == null) { + this.host = ModelsRepositoryConstants.DEFAULT_MODELS_REPOSITORY_ENDPOINT; + } + if (pipeline == null) { + this.pipeline = createHttpPipeline(); + } + if (serializerAdapter == null) { + this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); + } + + return new ModelsRepositoryAPIImpl(pipeline, serializerAdapter, host, apiVersion); + } + + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + if (httpLogOptions == null) { + httpLogOptions = new HttpLogOptions(); + } + List policies = new ArrayList<>(); + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + policies + .add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); + policies.add(new CookiePolicy()); + policies.addAll(this.pipelinePolicies); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + return new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryConstants.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryConstants.java new file mode 100644 index 000000000000..d1efc6044f43 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryConstants.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +public class ModelsRepositoryConstants { + public static final String FILE = "file"; + public static final String HTTP = "http"; + public static final String JSON_EXTENSION = ".json"; + public static final String JSON_EXPANDED_EXTENSION = ".expanded.json"; + public static final String DEFAULT_MODELS_REPOSITORY_ENDPOINT = "https://devicemodels.azure.com"; + public static final String MODELS_REPOSITORY_METADATA_FILE = "metadata.json"; + + // DTDL conventions + public static final String DTDL_TYPE = "@type"; + public static final String DTDL_ID = "@id"; + public static final String DTDL_INTERFACE = "Interface"; + public static final String DTDL_COMPONENT = "Component"; + public static final String DTDL_EXTENDS = "extends"; + public static final String DTDL_SCHEMA = "schema"; + public static final String DTDL_CONTENTS = "contents"; +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryImpl.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryImpl.java new file mode 100644 index 000000000000..d7d046071914 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/ModelsRepositoryImpl.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.ReturnType; +import com.azure.core.exception.AzureException; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ModelsRepository. + */ +public final class ModelsRepositoryImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ModelsRepositoryService service; + + /** + * The service client containing this operation class. + */ + private final ModelsRepositoryAPIImpl client; + + /** + * Initializes an instance of ModelsRepositoryImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ModelsRepositoryImpl(ModelsRepositoryAPIImpl client) { + this.service = RestProxy.create(ModelsRepositoryService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * Retrieves a dtmi model. Status codes: * 200 OK * 400 Bad Request * InvalidArgument + * + * @param path The path of the dtmi. The id is unique within the service and case sensitive. + * @param context The context to associate with this operation. + * @return any object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getModelFromPathWithResponseAsync(String path, Context context) { + if (this.client.getHost() == null) { + return Mono + .error(new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); + } + if (path == null) { + return Mono.error(new IllegalArgumentException("Parameter 'path' is required and cannot be null.")); + } + + return service.getModelFromPath(this.client.getHost(), path, context) + .onErrorMap( + error -> new AzureException(String.format(StatusStrings.ERROR_FETCHING_MODEL_CONTENT, path), error)); + } + + /** + * The interface defining all the services for ModelsRepositoryAPI to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ModelsRepositoryAPI") + private interface ModelsRepositoryService { + + @Get("{path}") + @ExpectedResponses({ 200 }) + Mono getModelFromPath(@HostParam("$host") String host, @PathParam("path") String path, Context context); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/RepositoryHandler.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/RepositoryHandler.java new file mode 100644 index 000000000000..8080fb385b15 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/RepositoryHandler.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.logging.LogLevel; +import com.azure.iot.modelsrepository.DtmiConventions; +import com.azure.iot.modelsrepository.ModelDependencyResolution; +import com.azure.iot.modelsrepository.implementation.models.FetchModelResult; +import com.azure.iot.modelsrepository.implementation.models.ModelMetadata; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * The {@link RepositoryHandler} is responsible for processing fetched models + * and generates processed results which are sent back to the client. + */ +public final class RepositoryHandler { + + private final URI repositoryUri; + private final ModelFetcher modelFetcher; + private final ClientLogger logger; + + public RepositoryHandler(URI repositoryUri, ModelsRepositoryAPIImpl protocolLayer) { + this.repositoryUri = repositoryUri; + this.logger = new ClientLogger(RepositoryHandler.class); + + if (this.repositoryUri.getScheme() != null + && this.repositoryUri.getScheme() + .toLowerCase(Locale.getDefault()) + .startsWith(ModelsRepositoryConstants.HTTP)) { + this.modelFetcher = new HttpModelFetcher(protocolLayer); + } else { + this.modelFetcher = new FileModelFetcher(); + } + } + + public Mono> processAsync(String dtmi, ModelDependencyResolution resolutionOptions, + Context context) { + return processAsync(Collections.singletonList(dtmi), resolutionOptions, context); + } + + public Mono> processAsync(Iterable dtmis, ModelDependencyResolution resolutionOptions, + Context context) { + List modelsToProcess = prepareWork(dtmis); + + return isExpandedAvailable(resolutionOptions, context) + .flatMapMany(tryExpanded -> processAsync(tryExpanded, modelsToProcess, resolutionOptions, context)) + .collectList() + .flatMap(results -> { + Map processedModels = new HashMap<>(); + + try { + for (FetchModelResult result : results) { + ModelsQuery modelsQuery = new ModelsQuery(result.getDefinition()); + if (result.isFromExpanded()) { + Map expanded = modelsQuery.listToMap(); + for (Map.Entry item : expanded.entrySet()) { + processedModels.putIfAbsent(item.getKey(), item.getValue()); + } + } else { + ModelMetadata metadata = modelsQuery.parseModel(); + processedModels.put(metadata.getId(), result.getDefinition()); + } + } + } catch (IOException ex) { + return Mono.error(ex); + } + + return Mono.just(processedModels); + }); + } + + private Flux processAsync(boolean tryExpanded, List dtmis, + ModelDependencyResolution resolution, Context context) { + return Flux.concat(dtmis.stream() + .map(dtmi -> processDtmi(tryExpanded, dtmi, resolution, context)) + .collect(Collectors.toList())); + } + + private Flux processDtmi(boolean tryExpanded, String dtmi, ModelDependencyResolution resolution, + Context context) { + return modelFetcher.fetchModelAsync(dtmi, repositoryUri, tryExpanded, context).flatMapMany(response -> { + // If the model was pre-computed, already expanded, processing of it is done. + if (response.isFromExpanded()) { + return Flux.just(response); + } + + // If resolving dependencies isn't supported processing completes once the model response is returned. + if (resolution != ModelDependencyResolution.ENABLED) { + return Flux.just(response); + } + + try { + ModelMetadata metadata = new ModelsQuery(response.getDefinition()).parseModel(); + List dependencies = metadata.getDependencies(); + + if (!CoreUtils.isNullOrEmpty(dependencies)) { + logger.log(LogLevel.INFORMATIONAL, () -> String.format(StatusStrings.DISCOVERED_DEPENDENCIES, + String.join("\", \"", dependencies))); + return processAsync(tryExpanded, dependencies, resolution, context).concatWith(Flux.just(response)); + } + return Flux.just(response); + } catch (Exception e) { + return Mono.error(e); + } + }); + } + + private List prepareWork(Iterable dtmis) { + List modelsToProcess = new ArrayList<>(); + for (String dtmi : dtmis) { + if (!DtmiConventions.isValidDtmi(dtmi)) { + logger.log(LogLevel.ERROR, () -> String.format(StatusStrings.INVALID_DTMI_FORMAT_S, dtmi)); + } + + modelsToProcess.add(dtmi); + } + + return modelsToProcess; + } + + private Mono isExpandedAvailable(ModelDependencyResolution resolutionOption, Context context) { + // If ModelDependencyResolution.Enabled is requested the client will first attempt to fetch + // metadata.json content from the target repository. The metadata object includes supported features + // of the repository. + // If the metadata indicates expanded models are available. The client will try to fetch pre-computed model + // dependencies using .expanded.json. + // If the model expanded form does not exist fall back to computing model dependencies just-in-time. + if (resolutionOption == ModelDependencyResolution.ENABLED) { + return modelFetcher.fetchMetadataAsync(repositoryUri, context) + .map(result -> result.getDefinition() != null + && result.getDefinition().getFeatures() != null + && result.getDefinition().getFeatures().isExpanded()) + .onErrorReturn(false); + } + + return Mono.just(false); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/StatusStrings.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/StatusStrings.java new file mode 100644 index 000000000000..0873df71d365 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/StatusStrings.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation; + +public class StatusStrings { + public static final String GENERIC_GET_MODELS_ERROR = "Failure handling \"%s\"."; + public static final String INVALID_DTMI_FORMAT_S = "Invalid DTMI format \"%s\"."; + public static final String PROCESSING_DTMIS = "Processing DTMI \"%s\". "; + public static final String DISCOVERED_DEPENDENCIES = "Discovered dependencies \"%s\"."; + public static final String FETCHING_MODEL_CONTENT = "Attempting to fetch model content from \"{}\"."; + public static final String FETCHING_METADATA_CONTENT + = "Attempting to fetch repository metadata content from \"{}\"."; + public static final String ERROR_FETCHING_MODEL_CONTENT + = "Model file \"%s\" not found or not accessible in target repository."; + public static final String ERROR_FETCHING_METADATA_CONTENT + = "Metadata file \"%s\" not found or not accessible in target repository."; + public static final String INCORRECT_DTMI_CASING + = "Fetched model has incorrect DTMI casing. Expected \"%s\", parsed \"%s\"."; +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/FetchMetadataResult.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/FetchMetadataResult.java new file mode 100644 index 000000000000..35c160c09a74 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/FetchMetadataResult.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; + +import java.io.IOException; + +/** + * The {@link FetchMetadataResult} class is used for storing the result of the + * fetch repository metadata operation. It contains the metadata definition + * and path + */ +@Fluent + +public class FetchMetadataResult { + + private ModelsRepositoryMetadata definition; + private String path; + + /** + * Gets the model repository's metadata definition + * + * @return Repository metadata definition + */ + public ModelsRepositoryMetadata getDefinition() { + return this.definition; + } + + /** + * Sets the model repository's metadata definition + * + * @param definition the model repository's metadata definition + * @return the {@link FetchMetadataResult} object itself + */ + public FetchMetadataResult setDefinition(String definition) throws IOException { + try (JsonReader jsonReader = JsonProviders.createReader(definition)) { + this.definition = ModelsRepositoryMetadata.fromJson(jsonReader); + } + return this; + } + + /** + * Gets the model repository's metadata path. + * + * @return model repository's metadata path. + */ + public String getPath() { + return this.path; + } + + /** + * Sets the model repository's metadata path. + * + * @param path the model repository's metadata path. + * @return the {@link FetchMetadataResult} object itself + */ + public FetchMetadataResult setPath(String path) { + this.path = path; + return this; + } + +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/FetchModelResult.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/FetchModelResult.java new file mode 100644 index 000000000000..d11f423de78d --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/FetchModelResult.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.iot.modelsrepository.implementation.ModelsRepositoryConstants; + +import java.util.Locale; + +/** + * The {@link FetchModelResult} class has the purpose of containing key elements of + * an IModelFetcher Fetch() operation including model definition, path and whether + * it was from an expanded (pre-calculated) fetch. + */ +@Fluent +public class FetchModelResult { + + private String definition; + private String path; + + /** + * Gets the dtmi model definition + * + * @return Model definition + */ + public String getDefinition() { + return this.definition; + } + + /** + * Sets the model definition + * + * @param definition the model definition + * @return the {@link FetchModelResult} object itself + */ + public FetchModelResult setDefinition(String definition) { + this.definition = definition; + return this; + } + + /** + * Gets the dtmi path. + * + * @return dtmi path. + */ + public String getPath() { + return this.path; + } + + /** + * Sets the dtmi path. + * + * @param path the dtmi path. + * @return the {@link FetchModelResult} object itself + */ + public FetchModelResult setPath(String path) { + this.path = path; + return this; + } + + /** + * Whether the result is from an expanded (pre-calculated) fetch or not. + * + * @return true: if result is from an expanded fetch operation. + * false: if path is null or result is not from an expanded fetch operation. + */ + public boolean isFromExpanded() { + if (this.path == null) { + return false; + } + + return this.path.toLowerCase(Locale.getDefault()).endsWith(ModelsRepositoryConstants.JSON_EXPANDED_EXTENSION); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/ModelMetadata.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/ModelMetadata.java new file mode 100644 index 000000000000..cf4739d9bbb6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/ModelMetadata.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation.models; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; + +/** + * {@link ModelMetadata} is designated to store KPIs from model parsing. + */ +public class ModelMetadata { + private final String id; + private final List extend; + private final List componentSchemas; + private final List dependencies; + + public ModelMetadata(String id, List extend, List componentSchemas) { + this.id = id; + this.extend = extend; + this.componentSchemas = componentSchemas; + HashSet mergedList = new HashSet<>(extend); + mergedList.addAll(componentSchemas); + this.dependencies = new ArrayList<>(mergedList); + } + + public String getId() { + return id; + } + + public List getExtend() { + return this.extend; + } + + public List getComponentSchemas() { + return this.componentSchemas; + } + + public List getDependencies() { + return this.dependencies; + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/ModelsRepositoryMetadata.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/ModelsRepositoryMetadata.java new file mode 100644 index 000000000000..295f5ee59329 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/ModelsRepositoryMetadata.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation.models; + +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * {@link ModelsRepositoryMetadata} is designated to store + * information about models repository. + */ +public class ModelsRepositoryMetadata implements JsonSerializable { + + private final String commitId; + private final String publishDateUtc; + private final String sourceRepo; + private final Integer totalModelCount; + private final RepositoryFeatures features; + + public ModelsRepositoryMetadata(String commitId, String publishDateUtc, String sourceRepo, Integer totalModelCount, + RepositoryFeatures features) { + this.commitId = commitId; + this.publishDateUtc = publishDateUtc; + this.sourceRepo = sourceRepo; + this.totalModelCount = totalModelCount; + this.features = features; + } + + public ModelsRepositoryMetadata() { + this.commitId = null; + this.publishDateUtc = null; + this.sourceRepo = null; + this.totalModelCount = null; + this.features = null; + } + + public String getCommitId() { + return this.commitId; + } + + public String getPublishDateUtc() { + return this.publishDateUtc; + } + + public String getSourceRepo() { + return this.sourceRepo; + } + + public Integer getTotalModelCount() { + return this.totalModelCount; + } + + public RepositoryFeatures getFeatures() { + return this.features; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("commitId", commitId) + .writeStringField("publishDateUtc", publishDateUtc) + .writeStringField("sourceRepo", sourceRepo) + .writeNumberField("totalModelCount", totalModelCount) + .writeJsonField("features", features) + .writeEndObject(); + } + + public static ModelsRepositoryMetadata fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String commitId = null; + String publishDateUtc = null; + String sourceRepo = null; + Integer totalModelCount = null; + RepositoryFeatures features = null; + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitId".equals(fieldName)) { + commitId = reader.getString(); + } else if ("publishDateUtc".equals(fieldName)) { + publishDateUtc = reader.getString(); + } else if ("sourceRepo".equals(fieldName)) { + sourceRepo = reader.getString(); + } else if ("totalModelCount".equals(fieldName)) { + totalModelCount = reader.getNullable(JsonReader::getInt); + } else if ("features".equals(fieldName)) { + features = RepositoryFeatures.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return new ModelsRepositoryMetadata(commitId, publishDateUtc, sourceRepo, totalModelCount, features); + }); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/RepositoryFeatures.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/RepositoryFeatures.java new file mode 100644 index 000000000000..e0e573f0b607 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/RepositoryFeatures.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository.implementation.models; + +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * {@link RepositoryFeatures} is designated to store + * attributes which apply to all models in the repository + */ +public class RepositoryFeatures implements JsonSerializable { + private final boolean expanded; + private final boolean index; + + public RepositoryFeatures(boolean expanded, boolean index) { + this.expanded = expanded; + this.index = index; + } + + public RepositoryFeatures() { + this.expanded = false; + this.index = false; + } + + public boolean isIndex() { + return index; + } + + public boolean isExpanded() { + return expanded; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeBooleanField("expanded", expanded) + .writeBooleanField("index", index) + .writeEndObject(); + } + + public static RepositoryFeatures fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + boolean expanded = false; + boolean index = false; + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expanded".equals(fieldName)) { + expanded = reader.getBoolean(); + } else if ("index".equals(fieldName)) { + index = reader.getBoolean(); + } else { + reader.skipChildren(); + } + } + + return new RepositoryFeatures(expanded, index); + }); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/package-info.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/package-info.java new file mode 100644 index 000000000000..2e63fa175e28 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/models/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing implementation models for Azure IoT Models Repository. + */ +package com.azure.iot.modelsrepository.implementation.models; diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/package-info.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/package-info.java new file mode 100644 index 000000000000..cdd480d732ca --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/implementation/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing the implementations for ModelsRepositoryAPI. + */ +package com.azure.iot.modelsrepository.implementation; diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/package-info.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/package-info.java new file mode 100644 index 000000000000..2da34b10fe94 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/com/azure/iot/modelsrepository/package-info.java @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/** + * Package containing the classes for ModelsRepositoryAPI. + */ +package com.azure.iot.modelsrepository; diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/module-info.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/module-info.java new file mode 100644 index 000000000000..0b9aa6cd9965 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.iot.modelsrepository { + requires transitive com.azure.core; + + exports com.azure.iot.modelsrepository; + + opens com.azure.iot.modelsrepository to com.azure.core; + opens com.azure.iot.modelsrepository.implementation to com.azure.core; + opens com.azure.iot.modelsrepository.implementation.models to com.azure.core; +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/main/resources/azure-iot-modelsrepository.properties b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/resources/azure-iot-modelsrepository.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/main/resources/azure-iot-modelsrepository.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/README.md b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/README.md new file mode 100644 index 000000000000..4c8a332646a0 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/README.md @@ -0,0 +1,203 @@ +# IoT Models Repository Samples + +The Azure IoT Models Repository enables builders to manage and share digital twin models for global consumption. The models are [JSON-LD][json_ld_reference] documents defined using the Digital Twins Definition Language ([DTDL][dtdlv2_reference]). + +For more info about the Azure IoT Models Repository checkout the [docs][modelsrepository_msdocs]. + +## Introduction + +You can explore the models repository APIs with the client library using the samples project. + +The samples project demonstrates the following: + +- Instantiate the client +- Get models and their dependencies from either a remote endpoint or local repository. + +## Initializing the models repository client + +```java +// When no URI is provided for instantiation, the Azure IoT Models Repository global endpoint +// https://devicemodels.azure.com/ is used and the model dependency resolution +// configuration is set to ENABLED. +ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .buildAsyncClient(); + +ModelsRepositoryClient syncClient = new ModelsRepositoryClientBuilder() + .buildClient(); + +System.out.println("Initialized the async client pointing to the global endpoint" + asyncClient.getRepositoryEndpoint()); +System.out.println("Initialized the sync client pointing to the global endpoint" + syncClient.getRepositoryEndpoint()); +``` + +```java +// This form shows specifying a custom URI for the models repository with default client options. +// The default client options will enable model dependency resolution. +ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint("https://contoso.com/models") + .buildAsyncClient(); + +ModelsRepositoryClient syncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint("https://contoso.com/models") + .buildClient(); + +System.out.println("Initialized the async client pointing to the custom endpoint" + asyncClient.getRepositoryEndpoint); +System.out.println("Initialized the sync client pointing to the custom endpoint" + syncClient.getRepositoryEndpoint); +``` + +```java +// The client will also work with a local file-system URI. This example shows initialization +// with a local URI and disabling model dependency resolution. +ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint(CLIENT_SAMPLES_DIRECTORY_PATH) + .modelDependencyResolution(ModelDependencyResolution.DISABLED) + .buildAsyncClient(); + +ModelsRepositoryClient syncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint(CLIENT_SAMPLES_DIRECTORY_PATH) + .modelDependencyResolution(ModelDependencyResolution.DISABLED) + .buildClient(); + +System.out.println("Initialized the async client pointing to the local file-system: " + asyncClient.getRepositoryEndpoint); +System.out.println("Initialized the sync client pointing to the local file-system: " + syncClient.getRepositoryEndpoint); +``` + +## Sync vs Async clients + +Azure Models Repository SDK for java has two sets of APIs available for every operation, sync APIs and async APIs. + +You can use `ModelsRepositoryClientBuilder` to build either a sync client: `buildClient()` or an async client: `buildAsyncClient()`. + +While using the sync client, the running thread will be blocked by the SDK for the duration of the HTTP request/response. +The async client is implemented using [Reactor](https://projectreactor.io/docs/core/release/reference/). The rest of this document assumes the reader has basic understanding of Reactor and how to interact with async API response types. + +### Override options + +If you need to override pipeline behavior, such as provide your own `HttpClient` instance, you can do that via `clientOptions` in the `ModelsRepositoryClientBuilder`. +It provides an opportunity to override default behavior including: + +- Specifying API version +- Overriding [HttpPipeline](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipeline.java). +- Enabling [HttpLogOptions](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java). +- Controlling [retry strategy](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryPolicy.java). + +## Publish models + +Publishing models to the models repository requires [exercising][modelsrepository_publish_msdocs] common GitHub workflows. + +## Get models + +After publishing, your model(s) will be available for consumption from the global repository endpoint. The following snippet shows how to retrieve the corresponding JSON-LD content. + +```java +// Global endpoint client +// Global endpoint client +ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .buildAsyncClient(); + +// The output of getModels will include at least the definition for the target dtmi. +// If the model dependency resolution configuration is not disabled, then models in which the +// target dtmi depends on will also be included in the returned Map. +String targetDtmi = "dtmi:com:example:TemperatureController;1"; + +// In this case the above dtmi has 2 model dependencies. +// dtmi:com:example:Thermostat;1 and dtmi:azure:DeviceManagement:DeviceInformation;1 +asyncClient.getModels(targetDtmi) + .doOnSuccess(aVoid -> System.out.println("Fetched the model and dependencies for: " + targetDtmi)) + .subscribe(res -> System.out.println(String.format("%s resolved in %s interfaces.", targetDtmi, res.size()))); +``` + +GitHub pull-request workflows are a core aspect of the IoT Models Repository service. To submit models, the user is expected to fork and clone the global [models repository project][modelsrepository_github_repo] then iterate against the local copy. Changes would then be pushed to the fork (ideally in a new branch) and a PR created against the global repository. + +To support testing local changes using this workflow and similar use cases, the client supports initialization with a local file-system URI. You can use this for example, to test and ensure newly added models to the locally cloned models repository are in their proper locations. + +```java +// Local sample repository client +ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint(CLIENT_SAMPLES_DIRECTORY_PATH) + .buildAsyncClient(); + +// The output of getModels will include at least the definition for the target dtmi. +// If the model dependency resolution configuration is not disabled, then models in which the +// target dtmi depends on will also be included in the returned Map. +String targetDtmi = "dtmi:com:example:TemperatureController;1"; + +// In this case the above dtmi has 2 model dependencies. +// dtmi:com:example:Thermostat;1 and dtmi:azure:DeviceManagement:DeviceInformation;1 +asyncClient.getModels(targetDtmi) + .doOnSuccess(aVoid -> System.out.println("Fetched the model and dependencies for: " + targetDtmi)) + .subscribe(res -> System.out.println(String.format("%s resolved in %s interfaces.", targetDtmi, res.size()))); +``` + +You are also able to get definitions for multiple root models at a time by leveraging +the `getModels` overload that supports an `Iterable`. + +```java +// Global endpoint client +ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .buildAsyncClient(); + +// When given an Iterable of dtmis, the output of getModels() will include at +// least the definitions of each dtmi enumerated in the Iterable. +// If the model dependency resolution configuration is not disabled, then models in which each +// enumerated dtmi depends on will also be included in the returned Map. +Iterable dtmis = Arrays.asList("dtmi:com:example:TemperatureController;1", "dtmi:com:example:azuresphere:sampledevice;1"); + +// In this case the dtmi "dtmi:com:example:TemperatureController;1" has 2 model dependencies +// and the dtmi "dtmi:com:example:azuresphere:sampledevice;1" has no additional dependencies. +// The returned Map will include 4 models. +asyncClient.getModels(dtmis) + .doOnSuccess(aVoid -> System.out.println("Fetched the models and dependencies for: " + String.join(", ", dtmis))) + .subscribe(res -> System.out.println(String.format("Dtmis %s resolved in %s interfaces.", String.join(", ", dtmis), res.size()))); +``` + +## DtmiConventions utility functions + +The IoT Models Repository applies a set of conventions for organizing digital twin models. This package exposes a class +called `DtmiConventions` which exposes utility functions supporting these conventions. These same functions are used throughout the client. + +`isValidDtmi` will ensure that the provided DigitalTwins Model Id (DTMI) has the correct format according to [DTDL specifications][dtdlv2_reference]. +```java +// This snippet shows how to validate a given DTMI string is well-formed. + +// Returns True +String validDtmi = "dtmi:com:example:Thermostat;1"; +System.out.println(String.format("Dtmi %s is a valid dtmi: %s", validDtmi, DtmiConventions.isValidDtmi(validDtmi))); + +// Returns False +String invalidDtmi = "dtmi:com:example:Thermostat"; +System.out.println(String.format("Dtmi %s is a valid dtmi: %s", invalidDtmi, DtmiConventions.isValidDtmi(invalidDtmi))); +``` + +`getModelUri` allows for constructing the path in which the provided DTMI is supposed to be located at based on a repository URI. +For instance: If the repository URI is `https://contoso.com/models/` and the DTMI (DigitalTwins Model Id) is `dtmi:com:example:Thermostat;1` then the path in which the file should exist will be `https://constoso.com/models/dtmi/com/example/thermostat-1.json`. + +Same pattern is expected while working with the local file system. +For instance: If the repository URI is `file:///path/to/repository` and the DTMI (DigitalTwins Model Id) is `dtmi:com:example:Thermostat;1` then the path in which the file should exist will be `file:///path/to/repository/dtmi/com/example/thermostat-1.json`. + +If the `boolean` parameter to the `getModelUri` method (`expanded`) is `true`, the result of the resolved path will have `.expanded.json` file extension instead of `.json`. This will allow for the `ModelsRepositoryClient` to only load the pre-computed dependency tree instead of the entire dependency tree. If the `.expanded.json` form of the model payload cannot be found, the client will load the full dependency tree as a fall back mechanism. + +```java +// This snippet shows obtaining a fully qualified path to a model file. + +// Local repository example: +URI localRepositoryUri = new URI("file:///path/to/repository"); +String fullyQualifiedModelUri = DtmiConventions.getModelUri("dtmi:com:example:Thermostat;1", localRepositoryUri, false).toString(); + +// Prints: file:///path/to/repository/dtmi/com/example/thermostat-1.json +System.out.println(fullyQualifiedModelUri); + +// Remote repository example with expanded enabled +URI remoteRepositoryUri = new URI("https://contoso.com/models/"); +fullyQualifiedModelUri = DtmiConventions.getModelUri("dtmi:com:example:Thermostat;1", remoteRepositoryUri, true).toString(); + +// Prints: https://constoso.com/models/dtmi/com/example/thermostat-1.expanded.json +System.out.println(fullyQualifiedModelUri); +``` + + +[modelsrepository_github_repo]: https://github.com/Azure/iot-plugandplay-models +[modelsrepository_msdocs]: https://learn.microsoft.com/azure/iot-pnp/concepts-model-repository +[modelsrepository_publish_msdocs]: https://learn.microsoft.com/azure/iot-pnp/concepts-model-repository#publish-a-model +[modelsrepository_iot_endpoint]: https://devicemodels.azure.com/ +[json_ld_reference]: https://json-ld.org +[dtdlv2_reference]: https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/DtmiConventionsSamples.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/DtmiConventionsSamples.java new file mode 100644 index 000000000000..2ed0d2f4d5a3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/DtmiConventionsSamples.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.core; + +import com.azure.iot.modelsrepository.DtmiConventions; + +import java.net.URI; +import java.net.URISyntaxException; + +/** + * Samples demonstrating how to use {@link DtmiConventions}. + */ +public class DtmiConventionsSamples { + + /** + * Demonstrate how to use {@link DtmiConventions#isValidDtmi(String)} + */ + public static void isValidDtmi() { + // This snippet shows how to validate a given DTMI string is well-formed. + + // Returns True + String validDtmi = "dtmi:com:example:Thermostat;1"; + System.out.println(String.format("Dtmi %s is a valid dtmi: %s", validDtmi, DtmiConventions.isValidDtmi(validDtmi))); + + // Returns False + String invalidDtmi = "dtmi:com:example:Thermostat"; + System.out.println(String.format("Dtmi %s is a valid dtmi: %s", invalidDtmi, DtmiConventions.isValidDtmi(invalidDtmi))); + } + + /** + * Demonstrates how to use {@link DtmiConventions#getModelUri(String, URI, boolean)} + */ + public static void getModelUri() { + // This snippet shows obtaining a fully qualified path to a model file. + + // Local repository example: + try { + URI localRepositoryUri = new URI("file:///path/to/repository"); + String fullyQualifiedModelUri = DtmiConventions.getModelUri("dtmi:com:example:Thermostat;1", localRepositoryUri, false).toString(); + + // Prints: file:///path/to/repository/dtmi/com/example/thermostat-1.json + System.out.println(fullyQualifiedModelUri); + + // Remote repository example with expanded enabled. + URI remoteRepositoryUri = new URI("https://contoso.com/models/"); + fullyQualifiedModelUri = DtmiConventions.getModelUri("dtmi:com:example:Thermostat;1", remoteRepositoryUri, true).toString(); + + // Prints: https://constoso.com/models/dtmi/com/example/thermostat-1.expanded.json + System.out.println(fullyQualifiedModelUri); + } catch (URISyntaxException ex) { + System.out.println("Invalid URI path has been used to instantiate the URI object. Exiting..."); + return; + } + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/Main.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/Main.java new file mode 100644 index 000000000000..33964d2a964f --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/Main.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.core; + +import java.util.Scanner; + +/** + * Entry point for running samples. + */ +public class Main { + public static void main(String[] args) throws InterruptedException { + + // DtmiConventions samples + DtmiConventionsSamples.isValidDtmi(); + DtmiConventionsSamples.getModelUri(); + + // Client initialization samples + ModelResolutionSamples.clientInitializationSamples(); + + // Model resolution samples + ModelResolutionSamples.getModelsFromGlobalRepository(); + ModelResolutionSamples.getModelsFromLocalRepository(); + ModelResolutionSamples.getMultipleModelsFromGlobalRepository(); + + Scanner userInput = new Scanner(System.in); + System.out.println("Press any key to exit."); + userInput.nextLine(); + System.exit(1); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/ModelResolutionSamples.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/ModelResolutionSamples.java new file mode 100644 index 000000000000..e1601bba44a0 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/java/com/azure/iot/core/ModelResolutionSamples.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.core; + +import com.azure.iot.modelsrepository.ModelDependencyResolution; +import com.azure.iot.modelsrepository.ModelsRepositoryAsyncClient; +import com.azure.iot.modelsrepository.ModelsRepositoryClient; +import com.azure.iot.modelsrepository.ModelsRepositoryClientBuilder; + +import java.util.Arrays; + +public class ModelResolutionSamples { + private static final String CLIENT_SAMPLES_DIRECTORY_PATH = (System.getProperty("user.dir").concat("/src/samples/resources/TestModelRepo/")).replace("\\", "/"); + + private static final int MAX_WAIT_TIME_ASYNC_OPERATIONS_IN_SECONDS = 10; + + /** + * Demonstrates how to instantiate sync and async clients. + */ + public static void clientInitializationSamples() { + // When no URI is provided for instantiation, the Azure IoT Models Repository global endpoint + // https://devicemodels.azure.com/ is used and the model dependency resolution + // configuration is set to Enabled. + ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .buildAsyncClient(); + + ModelsRepositoryClient syncClient = new ModelsRepositoryClientBuilder() + .buildClient(); + + System.out.println("Initialized the async client pointing to the global endpoint" + asyncClient.getRepositoryEndpoint()); + System.out.println("Initialized the sync client pointing to the global endpoint" + syncClient.getRepositoryEndpoint()); + + // This form shows specifying a custom URI for the models repository with default client options. + // The default client options will enable model dependency resolution. + asyncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint("https://contoso.com/models") + .buildAsyncClient(); + + syncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint("https://contoso.com/models") + .buildClient(); + + System.out.println("Initialized the async client pointing to the custom endpoint" + asyncClient.getRepositoryEndpoint().toString()); + System.out.println("Initialized the sync client pointing to the custom endpoint" + syncClient.getRepositoryEndpoint().toString()); + + // The client will also work with a local file-system URI. This example shows initialization + // with a local URI and disabling model dependency resolution. + asyncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint(CLIENT_SAMPLES_DIRECTORY_PATH) + .modelDependencyResolution(ModelDependencyResolution.DISABLED) + .buildAsyncClient(); + + syncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint(CLIENT_SAMPLES_DIRECTORY_PATH) + .modelDependencyResolution(ModelDependencyResolution.DISABLED) + .buildClient(); + + System.out.println("Initialized the async client pointing to the local file-system: " + asyncClient.getRepositoryEndpoint()); + System.out.println("Initialized the sync client pointing to the local file-system: " + syncClient.getRepositoryEndpoint()); + } + + /** + * Demonstrates how to get model and its dependencies from the default global endpoint. + * @throws InterruptedException {@link InterruptedException}. + */ + public static void getModelsFromGlobalRepository() throws InterruptedException { + // Global endpoint client + ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .buildAsyncClient(); + + // The output of getModels will include at least the definition for the target dtmi. + // If the model dependency resolution configuration is enabled, then models in which the + // target dtmi depends on will also be included in the returned Map. + String targetDtmi = "dtmi:com:example:TemperatureController;1"; + + // In this case the above dtmi has 2 model dependencies. + // dtmi:com:example:Thermostat;1 and dtmi:azure:DeviceManagement:DeviceInformation;1 + asyncClient.getModels(targetDtmi) + .doOnSuccess(aVoid -> System.out.println("Fetched the model and dependencies for: " + targetDtmi)) + .subscribe(res -> System.out.println(String.format("%s resolved in %s interfaces.", targetDtmi, res.size()))); + } + + /** + * Demonstrates how to get multiple model definitions and their dependencies from the default global endpoint. + * @throws InterruptedException {@link InterruptedException}. + */ + public static void getMultipleModelsFromGlobalRepository() throws InterruptedException { + // Global endpoint client + ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .buildAsyncClient(); + + // When given an Iterable of dtmis, the output of getModels() will include at + // least the definitions of each dtmi enumerated in the Iterable. + // If the model dependency resolution configuration is enabled, then models in which each + // enumerated dtmi depends on will also be included in the returned Map. + Iterable dtmis = Arrays.asList("dtmi:com:example:TemperatureController;1", "dtmi:com:example:azuresphere:sampledevice;1"); + + // In this case the dtmi "dtmi:com:example:TemperatureController;1" has 2 model dependencies + // and the dtmi "dtmi:com:example:azuresphere:sampledevice;1" has no additional dependencies. + // The returned Map will include 4 models. + asyncClient.getModels(dtmis) + .doOnSuccess(aVoid -> System.out.println("Fetched the models and dependencies for: " + String.join(", ", dtmis))) + .subscribe(res -> System.out.println(String.format("Dtmis %s resolved in %s interfaces.", String.join(", ", dtmis), res.size()))); + } + + /** + * Demonstrates how to get a model definition and its dependencies from a local file-system. + * @throws InterruptedException {@link InterruptedException}. + */ + public static void getModelsFromLocalRepository() throws InterruptedException { + // Local sample repository client + ModelsRepositoryAsyncClient asyncClient = new ModelsRepositoryClientBuilder() + .repositoryEndpoint(CLIENT_SAMPLES_DIRECTORY_PATH) + .buildAsyncClient(); + + // The output of getModels will include at least the definition for the target dtmi. + // If the model dependency resolution configuration is enabled, then models in which the + // target dtmi depends on will also be included in the returned Map. + String targetDtmi = "dtmi:com:example:TemperatureController;1"; + + // In this case the above dtmi has 2 model dependencies. + // dtmi:com:example:Thermostat;1 and dtmi:azure:DeviceManagement:DeviceInformation;1 + asyncClient.getModels(targetDtmi) + .doOnSuccess(aVoid -> System.out.println("Fetched the model and dependencies for: " + targetDtmi)) + .subscribe(res -> System.out.println(String.format("%s resolved in %s interfaces.", targetDtmi, res.size()))); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-1.json new file mode 100644 index 000000000000..8a37e6d2c2c3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-1.json @@ -0,0 +1,64 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "@type": "Interface", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "manufacturer", + "displayName": "Manufacturer", + "schema": "string", + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso." + }, + { + "@type": "Property", + "name": "model", + "displayName": "Device model", + "schema": "string", + "description": "Device model name or ID. Ex. Surface Book 2." + }, + { + "@type": "Property", + "name": "swVersion", + "displayName": "Software version", + "schema": "string", + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45" + }, + { + "@type": "Property", + "name": "osName", + "displayName": "Operating system name", + "schema": "string", + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core." + }, + { + "@type": "Property", + "name": "processorArchitecture", + "displayName": "Processor architecture", + "schema": "string", + "description": "Architecture of the processor on the device. Ex. x64 or ARM." + }, + { + "@type": "Property", + "name": "processorManufacturer", + "displayName": "Processor manufacturer", + "schema": "string", + "description": "Name of the manufacturer of the processor on the device. Ex. Intel." + }, + { + "@type": "Property", + "name": "totalStorage", + "displayName": "Total storage", + "schema": "double", + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes." + }, + { + "@type": "Property", + "name": "totalMemory", + "displayName": "Total memory", + "schema": "double", + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes." + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-2.json new file mode 100644 index 000000000000..d35b8a3e3a1d --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-2.json @@ -0,0 +1,16 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;2", + "@type": "Interface", + "extends": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "osKernelVersion", + "displayName": "OS Kernel Version", + "schema": "string", + "description": "OS Kernel Version. Ex. Linux 4.15.0-54-generic x86_64." + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/base-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/base-1.json new file mode 100644 index 000000000000..85424e8a229e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/base-1.json @@ -0,0 +1,56 @@ +{ + "@id": "dtmi:com:example:base;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "baseSerialNumber", + "schema": "string" + } + ], + "displayName": { + "en": "mybaseProp" + }, + "extends": [ + { + "@id": "dtmi:com:example:basic;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "serialNumber", + "schema": "string", + "writable": false + }, + { + "@type": [ + "Telemetry", + "Temperature" + ], + "displayName": { + "en": "temperature" + }, + "name": "temperature", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": "Property", + "displayName": { + "en": "targetTemperature" + }, + "name": "targetTemperature", + "schema": "double", + "writable": true + } + ], + "displayName": { + "en": "Basic" + } + } + ], + "@context": [ + "dtmi:iotcentral:context;2", + "dtmi:dtdl:context;2" + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/base-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/base-2.json new file mode 100644 index 000000000000..29accafcc252 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/base-2.json @@ -0,0 +1,57 @@ +{ + "@id": "dtmi:com:example:base;2", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "baseSerialNumber", + "schema": "string" + } + ], + "displayName": { + "en": "mybaseProp" + }, + "extends": [ + { + "@id": "dtmi:com:example:basic;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "serialNumber", + "schema": "string", + "writable": false + }, + { + "@type": [ + "Telemetry", + "Temperature" + ], + "displayName": { + "en": "temperature" + }, + "name": "temperature", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": "Property", + "displayName": { + "en": "targetTemperature" + }, + "name": "targetTemperature", + "schema": "double", + "writable": true + } + ], + "displayName": { + "en": "Basic" + } + }, + "dtmi:com:example:Freezer;1" + ], + "@context": [ + "dtmi:iotcentral:context;2", + "dtmi:dtdl:context;2" + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/building-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/building-1.json new file mode 100644 index 000000000000..c8b6bc6f7375 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/building-1.json @@ -0,0 +1,19 @@ +{ + "@id": "dtmi:com:example:Building;1", + "@type": "Interface", + "displayName": "Building", + "contents": [ + { + "@type": "Property", + "name": "name", + "schema": "string", + "writable": true + }, + { + "@type": "Relationship", + "name": "contains", + "target": "dtmi:com:example:Room;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/camera-3.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/camera-3.json new file mode 100644 index 000000000000..f912746c0040 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/camera-3.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:Camera;3", + "@type": "Interface", + "displayName": "Phone", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/coldstorage-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/coldstorage-1.json new file mode 100644 index 000000000000..a3b8466118a9 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/coldstorage-1.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:ColdStorage;1", + "@type": "Interface", + "extends": ["dtmi:com:example:Room;1", "dtmi:com:example:Freezer;1"], + "contents": [ + { + "@type": "Property", + "name": "capacity", + "schema": "integer" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/conferenceroom-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/conferenceroom-1.json new file mode 100644 index 000000000000..2e756ee73b6e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/conferenceroom-1.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:ConferenceRoom;1", + "@type": "Interface", + "extends": "dtmi:com:example:Room;1", + "contents": [ + { + "@type": "Property", + "name": "capacity", + "schema": "integer" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/danglingexpanded-1.expanded.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/danglingexpanded-1.expanded.json new file mode 100644 index 000000000000..93126c749ce9 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/danglingexpanded-1.expanded.json @@ -0,0 +1,215 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:DanglingExpanded;1", + "@type": "Interface", + "displayName": "Valid expanded model with no root model.", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "@type": "Interface", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "manufacturer", + "displayName": "Manufacturer", + "schema": "string", + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso." + }, + { + "@type": "Property", + "name": "model", + "displayName": "Device model", + "schema": "string", + "description": "Device model name or ID. Ex. Surface Book 2." + }, + { + "@type": "Property", + "name": "swVersion", + "displayName": "Software version", + "schema": "string", + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45" + }, + { + "@type": "Property", + "name": "osName", + "displayName": "Operating system name", + "schema": "string", + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core." + }, + { + "@type": "Property", + "name": "processorArchitecture", + "displayName": "Processor architecture", + "schema": "string", + "description": "Architecture of the processor on the device. Ex. x64 or ARM." + }, + { + "@type": "Property", + "name": "processorManufacturer", + "displayName": "Processor manufacturer", + "schema": "string", + "description": "Name of the manufacturer of the processor on the device. Ex. Intel." + }, + { + "@type": "Property", + "name": "totalStorage", + "displayName": "Total storage", + "schema": "double", + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes." + }, + { + "@type": "Property", + "name": "totalMemory", + "displayName": "Total memory", + "schema": "double", + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes." + } + ] + } +] diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/freezer-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/freezer-1.json new file mode 100644 index 000000000000..6006b6673299 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/freezer-1.json @@ -0,0 +1,12 @@ +{ + "@id": "dtmi:com:example:Freezer;1", + "@type": "Interface", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:com:example:Thermostat;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/incompleteexpanded-1.expanded.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/incompleteexpanded-1.expanded.json new file mode 100644 index 000000000000..1688ef4c0e3c --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/incompleteexpanded-1.expanded.json @@ -0,0 +1,151 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:IncompleteExpanded;1", + "@type": "Interface", + "displayName": "Incomplete expanded Temperature Controller", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + } +] diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/invalidmodel-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/invalidmodel-1.json new file mode 100644 index 000000000000..4f18d7b17658 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/invalidmodel-1.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:invalidmodel;1", + "@type": "Interface", + "displayName": "Phone", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:fakeDeviceManagement:FakeDeviceInformation;2" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/invalidmodel-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/invalidmodel-2.json new file mode 100644 index 000000000000..61443734cd90 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/invalidmodel-2.json @@ -0,0 +1,23 @@ +{ + "@id": "dtmi:com:example:Phone;2", + "@type": "Interfacez", + "displayName": "Phone", + "contentsz": [ + { + "@type": "Component", + "name": "frontCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "backCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:deviceManagement:DeviceInformation;2" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/phone-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/phone-2.json new file mode 100644 index 000000000000..26c7efbdedc0 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/phone-2.json @@ -0,0 +1,23 @@ +{ + "@id": "dtmi:com:example:Phone;2", + "@type": "Interface", + "displayName": "Phone", + "contents": [ + { + "@type": "Component", + "name": "frontCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "backCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;2" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/room-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/room-1.json new file mode 100644 index 000000000000..1a07edec4d98 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/room-1.json @@ -0,0 +1,12 @@ +{ + "@id": "dtmi:com:example:Room;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "occupied", + "schema": "boolean" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.expanded.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.expanded.json new file mode 100644 index 000000000000..14e8e294189e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.expanded.json @@ -0,0 +1,215 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:TemperatureController;1", + "@type": "Interface", + "displayName": "Temperature Controller", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "@type": "Interface", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "manufacturer", + "displayName": "Manufacturer", + "schema": "string", + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso." + }, + { + "@type": "Property", + "name": "model", + "displayName": "Device model", + "schema": "string", + "description": "Device model name or ID. Ex. Surface Book 2." + }, + { + "@type": "Property", + "name": "swVersion", + "displayName": "Software version", + "schema": "string", + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45" + }, + { + "@type": "Property", + "name": "osName", + "displayName": "Operating system name", + "schema": "string", + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core." + }, + { + "@type": "Property", + "name": "processorArchitecture", + "displayName": "Processor architecture", + "schema": "string", + "description": "Architecture of the processor on the device. Ex. x64 or ARM." + }, + { + "@type": "Property", + "name": "processorManufacturer", + "displayName": "Processor manufacturer", + "schema": "string", + "description": "Name of the manufacturer of the processor on the device. Ex. Intel." + }, + { + "@type": "Property", + "name": "totalStorage", + "displayName": "Total storage", + "schema": "double", + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes." + }, + { + "@type": "Property", + "name": "totalMemory", + "displayName": "Total memory", + "schema": "double", + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes." + } + ] + } +] \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.json new file mode 100644 index 000000000000..c455ddf8bae6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.json @@ -0,0 +1,60 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:TemperatureController;1", + "@type": "Interface", + "displayName": "Temperature Controller", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/thermostat-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/thermostat-1.json new file mode 100644 index 000000000000..315a307bbcb3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/com/example/thermostat-1.json @@ -0,0 +1,19 @@ +{ + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "contents": [ + { + "@type": "Telemetry", + "name": "temp", + "schema": "double" + }, + { + "@type": "Property", + "name": "setPointTemp", + "writable": true, + "schema": "double" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/company/demodevice-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/company/demodevice-1.json new file mode 100644 index 000000000000..33c9554664a6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/company/demodevice-1.json @@ -0,0 +1,31 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:company:demodevice;1", + "@type": "Interface", + "displayName": "demodevice", + "contents": [ + { + "@type": "Component", + "name": "c1", + "schema": "dtmi:azure:deviceManagement:DeviceInformation;1" + }, + { + "@type": "Telemetry", + "name": "temperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "deviceStatus", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "request": { + "name": "delay", + "schema": "integer" + } + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/company/demodevice-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/company/demodevice-2.json new file mode 100644 index 000000000000..9d9b3bd2322a --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/company/demodevice-2.json @@ -0,0 +1,31 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:company:demodevice;1", + "@type": "Interface", + "displayName": "demodevice", + "contents": [ + { + "@type": "Component", + "name": "c1", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1" + }, + { + "@type": "Telemetry", + "name": "temperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "deviceStatus", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "request": { + "name": "delay", + "schema": "integer" + } + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/badfilepath-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/badfilepath-1.json new file mode 100644 index 000000000000..6006b6673299 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/badfilepath-1.json @@ -0,0 +1,12 @@ +{ + "@id": "dtmi:com:example:Freezer;1", + "@type": "Interface", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:com:example:Thermostat;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/emptyarray-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/emptyarray-1.json new file mode 100644 index 000000000000..0637a088a01e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/emptyarray-1.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/namespaceconflict-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/namespaceconflict-1.json new file mode 100644 index 000000000000..6f2df812a67f --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/namespaceconflict-1.json @@ -0,0 +1,37 @@ +{ + "@id": "dtmi:strict:namespaceconflict;1", + "@type": "Interface", + "contents": [ + { + "@type": "Telemetry", + "name": "accelerometer1", + "schema": "dtmi:com:example:acceleration;1" + }, + { + "@type": "Telemetry", + "name": "accelerometer2", + "schema": "dtmi:com:example:acceleration;1" + } + ], + "schemas": [ + { + "@id": "dtmi:com:example:acceleration;1", + "@type": "Object", + "fields": [ + { + "name": "x", + "schema": "double" + }, + { + "name": "y", + "schema": "double" + }, + { + "name": "z", + "schema": "double" + } + ] + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/nondtdl-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/nondtdl-1.json new file mode 100644 index 000000000000..b25ba2ac3af6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/nondtdl-1.json @@ -0,0 +1 @@ +"content" \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/unsupportedrootarray-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/unsupportedrootarray-1.json new file mode 100644 index 000000000000..1f282307a8c3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/samples/resources/TestModelRepo/dtmi/strict/unsupportedrootarray-1.json @@ -0,0 +1,91 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:strict:unsupportedrootarray;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + } +] \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/DtmiConventionTests.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/DtmiConventionTests.java new file mode 100644 index 000000000000..5c7b59f10a74 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/DtmiConventionTests.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; + +import java.net.URI; + +class DtmiConventionTests { + + @ParameterizedTest + @CsvSource({ + "dtmi:com:Example:Model;1, dtmi/com/example/model-1.json", + "dtmi:com:example:Model;1, dtmi/com/example/model-1.json", + "dtmi:com:example:Model:1, ", + "'',", + "," }) + public void dtmiToPathTest(String input, String expected) { + + if (expected == null) { + Assertions.assertThrows(IllegalArgumentException.class, () -> DtmiConventions.dtmiToPath(input)); + return; + } + + String actualValue = DtmiConventions.dtmiToPath(input); + Assertions.assertEquals(expected, actualValue); + } + + @ParameterizedTest + @CsvSource({ + "https://localhost/repository/, https://localhost/repository/dtmi/com/example/thermostat-1.json", + "https://localhost/REPOSITORY, https://localhost/REPOSITORY/dtmi/com/example/thermostat-1.json", + "file:///path/to/repository/, file:///path/to/repository/dtmi/com/example/thermostat-1.json", + "file://path/to/RepoSitory, file://path/to/RepoSitory/dtmi/com/example/thermostat-1.json", + "C:/path/to/repository/, C:/path/to/repository/dtmi/com/example/thermostat-1.json", + "//server//repository, //server//repository/dtmi/com/example/thermostat-1.json" }) + public void getModelUriTests(String repository, String expectedUri) { + final String dtmi = "dtmi:com:example:Thermostat;1"; + + URI repositoryUri = TestHelper.convertToUri(repository); + + if (expectedUri == null || expectedUri.isEmpty()) { + Assertions.assertThrows(IllegalArgumentException.class, + () -> DtmiConventions.getModelUri(dtmi, repositoryUri, false)); + return; + } + + URI modelUri = DtmiConventions.getModelUri(dtmi, repositoryUri, false); + Assertions.assertEquals(expectedUri, modelUri.toString()); + } + + @ParameterizedTest + @CsvSource({ + "https://localhost/repository/, https://localhost/repository/metadata.json", + "https://localhost/REPOSITORY, https://localhost/REPOSITORY/metadata.json", + "file:///path/to/repository/, file:///path/to/repository/metadata.json", + "file://path/to/RepoSitory, file://path/to/RepoSitory/metadata.json", + "C:/path/to/repository/, C:/path/to/repository/metadata.json", + "//server//repository, //server//repository/metadata.json" }) + public void getMetadataUriTests(String repository, String expectedUri) { + URI repositoryUri = TestHelper.convertToUri(repository); + + if (expectedUri == null || expectedUri.isEmpty()) { + Assertions.assertThrows(IllegalArgumentException.class, + () -> DtmiConventions.getMetadataUri(repositoryUri)); + return; + } + + URI metadataUri = DtmiConventions.getMetadataUri(repositoryUri); + Assertions.assertEquals(expectedUri, metadataUri.toString()); + } + + @ParameterizedTest + @CsvSource({ + "dtmi:com:example:Thermostat;1, true", + "dtmi:contoso:scope:entity;2, true", + "dtmi:com:example:Thermostat:1, false", + "dtmi:com:example::Thermostat;1, false", + "com:example:Thermostat;1, false", + "'', false", + "null, false" }) + public void isValidDtmi(String dtmi, boolean expected) { + Assertions.assertEquals(expected, DtmiConventions.isValidDtmi(dtmi)); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelQueryTests.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelQueryTests.java new file mode 100644 index 000000000000..f346cd7e554b --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelQueryTests.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import com.azure.iot.modelsrepository.implementation.ModelsQuery; +import com.azure.iot.modelsrepository.implementation.models.ModelMetadata; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +class ModelQueryTests { + public static final String MODEL_TEMPLATE = "" + "{\n" + "%s \n" + "\"@type\": \"Interface\",\n" + + "\"displayName\": \"Phone\",\n" + "%s \n" + "%s \n" + "\"@context\": \"dtmi:dtdl:context;2\"\n" + "}"; + + @ParameterizedTest + @CsvSource( + value = { "\"@id\":\"dtmi:com:example:thermostat;1\", | dtmi:com:example:thermostat;1", "\"@id\": \"\", | ''" }, + delimiter = '|') + public void getIdTests(String id, String expected) throws IOException { + String modelContent = String.format(MODEL_TEMPLATE, id, "", ""); + ModelsQuery query = new ModelsQuery(modelContent); + String modelId = query.parseModel().getId(); + + Assertions.assertEquals(expected, modelId); + } + + @ParameterizedTest + @CsvSource( + value = { + "\"contents\": " + " [" + " {" + " \"@type\": \"Property\"," + + " \"name\": \"capacity\"," + " \"schema\": \"integer\"" + " }," + " {" + + " \"@type\": \"Component\"," + " \"name\": \"frontCamera\"," + + " \"schema\": \"dtmi:com:example:Camera;3\"" + " }," + " {" + + " \"@type\": \"Component\"," + " \"name\": \"backCamera\"," + + " \"schema\": \"dtmi:com:example:Camera;3\"" + " }," + " {" + + " \"@type\": \"Component\"," + " \"name\": \"deviceInfo\"," + + " \"schema\": \"dtmi:azure:DeviceManagement:DeviceInformation;1\"" + " }" + " ]," + + "| dtmi:com:example:Camera;3,dtmi:com:example:Camera;3,dtmi:azure:DeviceManagement:DeviceInformation;1", + "\"contents\": " + "[" + " {" + " \"@type\": \"Property\"," + " \"name\": \"capacity\"," + + " \"schema\": \"integer\"" + " }" + "]," + "| ''", }, + delimiter = '|') + public void getComponentSchemaTests(String contents, String expected) throws IOException { + List expectedDtmis; + + if (expected.isEmpty()) { + expectedDtmis = new ArrayList<>(); + } else { + expectedDtmis = Arrays.asList(expected.split(",")); + } + + String modelContent = String.format(MODEL_TEMPLATE, "", "", contents); + ModelsQuery query = new ModelsQuery(modelContent); + List componentSchemas = query.parseModel().getComponentSchemas(); + + Assertions.assertEquals(expectedDtmis.size(), componentSchemas.size(), + "number of expected dtmis should match the parsed version"); + + Assertions.assertTrue(expectedDtmis.containsAll(componentSchemas)); + } + + @ParameterizedTest + @CsvSource( + value = { + "\"extends\": [\"dtmi:com:example:Camera;3\",\"dtmi:azure:DeviceManagement:DeviceInformation;1\"]," + "|" + + "dtmi:com:example:Camera;3,dtmi:azure:DeviceManagement:DeviceInformation;1", + "\"extends\":[], | ''", + "\"extends\": \"dtmi:com:example:Camera;3\", | dtmi:com:example:Camera;3" }, + delimiter = '|') + public void getExtendsTests(String extend, String expected) throws IOException { + List expectedDtmis; + + if (expected.isEmpty()) { + expectedDtmis = new ArrayList<>(); + } else { + expectedDtmis = Arrays.asList(expected.split(",")); + } + + String modelContent = String.format(MODEL_TEMPLATE, "", extend, ""); + ModelsQuery query = new ModelsQuery(modelContent); + List componentSchemas = query.parseModel().getExtend(); + + Assertions.assertEquals(expectedDtmis.size(), componentSchemas.size(), + "number of expected dtmis should match the parsed value"); + + Assertions.assertTrue(expectedDtmis.containsAll(componentSchemas)); + } + + @ParameterizedTest + @CsvSource( + value = { + "\"@id\": \"dtmi:com:example:thermostat;1\"," + "|" + + "\"extends\": [\"dtmi:com:example:Camera;3\",\"dtmi:azure:DeviceManagement:DeviceInformation;1\"]," + + "|" + "\"contents\": " + " [" + " {" + " \"@type\": \"Property\"," + + " \"name\": \"capacity\"," + " \"schema\": \"integer\"" + " }," + " {" + + " \"@type\": \"Component\"," + " \"name\": \"frontCamera\"," + + " \"schema\": \"dtmi:com:example:Camera;3\"" + " }," + " {" + + " \"@type\": \"Component\"," + " \"name\": \"backCamera\"," + + " \"schema\": \"dtmi:com:example:Camera;3\"" + " }," + " {" + + " \"@type\": \"Component\"," + " \"name\": \"deviceInfo\"," + + " \"schema\": \"dtmi:azure:DeviceManagement:DeviceInformation;1\"" + " }]," + "|" + + "dtmi:com:example:Camera;3,dtmi:azure:DeviceManagement:DeviceInformation;1", + + "\"@id\": \"dtmi:example:Interface1;1\"," + "|" + "\"extends\": [" + " \"dtmi:example:Interface2;1\", " + + " {" + " \"@id\": \"dtmi:example:Interface3;1\"," + " \"@type\": \"Interface\"," + + " \"contents\": " + " [" + " {" + " \"@type\": \"Component\"," + + " \"name\": \"comp1\"," + " \"schema\": [\"dtmi:example:Interface4;1\"]" + + " }," + " {" + " \"@type\": \"Component\"," + + " \"name\": \"comp2\"," + " \"schema\": " + " {" + + " \"@id\": \"dtmi:example:Interface5;1\"," + + " \"@type\": \"Interface\"," + + " \"extends\": \"dtmi:example:Interface6;1\"" + " }" + + " }" + " ]" + " }]," + "| ''" + "|" + + "dtmi:example:Interface2;1,dtmi:example:Interface4;1,dtmi:example:Interface6;1" }, + delimiter = '|') + public void getModelDependenciesTests(String id, String extend, String contents, String expected) + throws IOException { + List expectedDtmis; + + if (expected.isEmpty()) { + expectedDtmis = new ArrayList<>(); + } else { + expectedDtmis = Arrays.asList(expected.split(",")); + } + + String modelContent = String.format(MODEL_TEMPLATE, id, extend, contents); + ModelsQuery query = new ModelsQuery(modelContent); + ModelMetadata metadata = query.parseModel(); + + Assertions.assertEquals(expectedDtmis.size(), metadata.getDependencies().size()); + Assertions.assertTrue(expectedDtmis.containsAll(metadata.getDependencies())); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelRepositoryIntegrationTests.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelRepositoryIntegrationTests.java new file mode 100644 index 000000000000..298d0b0b4fbe --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelRepositoryIntegrationTests.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import com.azure.core.exception.AzureException; +import com.azure.core.http.HttpClient; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import reactor.test.StepVerifier; + +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static com.azure.iot.modelsrepository.TestHelper.DISPLAY_NAME_WITH_ARGUMENTS; + +class ModelRepositoryIntegrationTests extends ModelsRepositoryTestBase { + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.iot.modelsrepository.TestHelper#getTestParameters") + public void getModelsSingleDtmiNoDependencies(HttpClient httpClient, ModelsRepositoryServiceVersion serviceVersion, + String repositoryUri) throws URISyntaxException { + String dtmi = "dtmi:com:example:Thermostat;1"; + + ModelsRepositoryAsyncClient client = getAsyncClient(httpClient, serviceVersion, repositoryUri); + + StepVerifier.create(client.getModels(dtmi)) + .assertNext(model -> Assertions.assertTrue(model.keySet().size() == 1 && model.containsKey(dtmi))) + .verifyComplete(); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.iot.modelsrepository.TestHelper#getTestParameters") + public void getModelsSingleDtmiDoesNotExist(HttpClient httpClient, ModelsRepositoryServiceVersion serviceVersion, + String repositoryUri) throws URISyntaxException { + final String dtmi = "dtmi:com:example:Thermostatddd;1"; + + ModelsRepositoryAsyncClient client = getAsyncClient(httpClient, serviceVersion, repositoryUri); + + StepVerifier.create(client.getModels(dtmi)) + .verifyErrorSatisfies(error -> Assertions.assertTrue(error.getClass() == AzureException.class)); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.iot.modelsrepository.TestHelper#getTestParameters") + public void getModelsSingleDtmiWithDependencies(HttpClient httpClient, + ModelsRepositoryServiceVersion serviceVersion, String repositoryUri) throws URISyntaxException { + final String dtmi = "dtmi:com:example:TemperatureController;1"; + List expectedDependencies + = Arrays.asList("dtmi:com:example:Thermostat;1", "dtmi:azure:DeviceManagement:DeviceInformation;1"); + List expectedDtmis = new ArrayList<>(expectedDependencies); + expectedDtmis.add(dtmi); + + ModelsRepositoryAsyncClient client = getAsyncClient(httpClient, serviceVersion, repositoryUri); + + StepVerifier.create(client.getModels(dtmi)) + .assertNext(model -> Assertions.assertTrue( + model.keySet().size() == expectedDtmis.size() && model.keySet().containsAll(expectedDependencies))) + .verifyComplete(); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.iot.modelsrepository.TestHelper#getTestParameters") + public void getModelsEnsureNoDuplicates(HttpClient httpClient, ModelsRepositoryServiceVersion serviceVersion, + String repositoryUri) throws URISyntaxException { + List inputDtmis = Arrays.asList("dtmi:azure:DeviceManagement:DeviceInformation;1", + "dtmi:azure:DeviceManagement:DeviceInformation;1"); + + ModelsRepositoryAsyncClient client = getAsyncClient(httpClient, serviceVersion, repositoryUri); + + StepVerifier.create(client.getModels(inputDtmis)) + .assertNext(model -> Assertions.assertEquals(model.keySet().size(), 1)) + .verifyComplete(); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("com.azure.iot.modelsrepository.TestHelper#getTestParameters") + public void getModelsSingleDtmiWithDepsDisableDependencyResolution(HttpClient httpClient, + ModelsRepositoryServiceVersion serviceVersion, String repositoryUri) throws URISyntaxException { + final String dtmi = "dtmi:com:example:Thermostat;1"; + ModelsRepositoryAsyncClient client = getAsyncClient(httpClient, serviceVersion, repositoryUri); + + StepVerifier.create(client.getModels(dtmi, ModelDependencyResolution.DISABLED)) + .assertNext(model -> Assertions.assertTrue(model.keySet().size() == 1 && model.containsKey(dtmi))) + .verifyComplete(); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelsRepositoryTestBase.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelsRepositoryTestBase.java new file mode 100644 index 000000000000..4197796227ca --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/ModelsRepositoryTestBase.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; + +class ModelsRepositoryTestBase extends TestProxyTestBase { + + protected ModelsRepositoryClientBuilder getModelsRepositoryClientbuilder(HttpClient httpClient, + ModelsRepositoryServiceVersion serviceVersion, String repositoryEndpoint) { + ModelsRepositoryClientBuilder builder = new ModelsRepositoryClientBuilder(); + builder.serviceVersion(serviceVersion); + + if (getTestMode() == TestMode.PLAYBACK) { + builder.httpClient(interceptorManager.getPlaybackClient()); + // Use fake credentials for playback mode. + // Connect to a special host when running tests in playback mode. + builder.repositoryEndpoint(repositoryEndpoint); + return builder; + } + + // If it is record mode, we add record mode policies to the builder. + if (getTestMode() == TestMode.RECORD) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + + builder.repositoryEndpoint(repositoryEndpoint); + builder.httpClient(httpClient); + builder.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)); + + return builder; + } + + protected ModelsRepositoryClient getClient(HttpClient httpClient, ModelsRepositoryServiceVersion serviceVersion, + String repositoryEndpoint) { + return getModelsRepositoryClientbuilder(httpClient, serviceVersion, repositoryEndpoint).buildClient(); + } + + protected ModelsRepositoryAsyncClient getAsyncClient(HttpClient httpClient, + ModelsRepositoryServiceVersion serviceVersion, String repositoryEndpoint) { + return getModelsRepositoryClientbuilder(httpClient, serviceVersion, repositoryEndpoint).buildAsyncClient(); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/TestHelper.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/TestHelper.java new file mode 100644 index 000000000000..9cc89a999ae3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/TestHelper.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import com.azure.core.http.HttpClient; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.iot.modelsrepository.implementation.ModelsRepositoryConstants; +import org.junit.jupiter.params.provider.Arguments; + +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; + +import static com.azure.core.test.TestProxyTestBase.AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL; +import static com.azure.core.test.TestProxyTestBase.getHttpClients; + +class TestHelper { + public static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]"; + private static final String AZURE_IOT_MODELSREPOSITORY_TEST_SERVICE_VERSIONS + = "AZURE_IOT_MODELSREPOSITORY_TEST_SERVICE_VERSIONS"; + private static final String LOCAL_TEST_REPOSITORY_PATH_WITH_METADATA + = (System.getProperty("user.dir") + "/src/test/resources/TestModelRepo/metadataModelsrepo/").replace("\\", "/"); + private static final String LOCAL_TEST_REPOSITORY_NO_METADATA_PATH + = (System.getProperty("user.dir") + "/src/test/resources/TestModelRepo/").replace("\\", "/"); + public static final String MODELS_REPOSITORY_NO_METADATA_ENDPOINT + = "https://raw.githubusercontent.com/Azure/iot-plugandplay-models/main"; + + private static final String SERVICE_VERSION_FROM_ENV + = Configuration.getGlobalConfiguration().get(AZURE_IOT_MODELSREPOSITORY_TEST_SERVICE_VERSIONS); + + /** + * Returns a stream of arguments that includes all combinations of eligible {@link HttpClient HttpClients} and + * service versions that should be tested. + * + * @return A stream of HttpClient and service version combinations to test. + */ + static Stream getTestParameters() { + // when this issues is closed, the newer version of junit will have better support for + // cartesian product of arguments - https://github.com/junit-team/junit5/issues/1427 + List argumentsList = new ArrayList<>(); + getApplicableRepositoryUris().forEach( + uri -> getHttpClients().forEach(httpClient -> Arrays.stream(ModelsRepositoryServiceVersion.values()) + .filter(TestHelper::shouldServiceVersionBeTested) + .forEach(serviceVersion -> argumentsList.add(Arguments.of(httpClient, serviceVersion, uri))))); + + return argumentsList.stream(); + } + + static Stream getApplicableRepositoryUris() { + ArrayList endpointList = new ArrayList<>(); + endpointList.add(ModelsRepositoryConstants.DEFAULT_MODELS_REPOSITORY_ENDPOINT); + endpointList.add(LOCAL_TEST_REPOSITORY_PATH_WITH_METADATA); + endpointList.add(MODELS_REPOSITORY_NO_METADATA_ENDPOINT); + endpointList.add(LOCAL_TEST_REPOSITORY_NO_METADATA_PATH); + return StreamSupport.stream(endpointList.spliterator(), false); + } + + /** + * Returns whether the given service version match the rules of test framework. + * + *
        + *
      • Using latest service version as default if no environment variable is set.
      • + *
      • If it's set to ALL, all Service versions in {@link ModelsRepositoryServiceVersion} will be tested.
      • + *
      • Otherwise, Service version string should match env variable.
      • + *
      + *

      + * Environment values currently supported are: "ALL", "${version}". + * Use comma to separate http clients want to test. + * e.g. {@code set AZURE_TEST_SERVICE_VERSIONS = V1_0, V2_0} + * + * @param serviceVersion ServiceVersion needs to check + * @return Boolean indicates whether filters out the service version or not. + */ + private static boolean shouldServiceVersionBeTested(ModelsRepositoryServiceVersion serviceVersion) { + if (CoreUtils.isNullOrEmpty(SERVICE_VERSION_FROM_ENV)) { + return ModelsRepositoryServiceVersion.getLatest().equals(serviceVersion); + } + if (AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL.equalsIgnoreCase(SERVICE_VERSION_FROM_ENV)) { + return true; + } + String[] configuredServiceVersionList = SERVICE_VERSION_FROM_ENV.split(","); + return Arrays.stream(configuredServiceVersionList) + .anyMatch(configuredServiceVersion -> serviceVersion.getVersion().equals(configuredServiceVersion.trim())); + } + + /** + * Converts a string to {@link URI} + * + * @param uri String format of the path + * @return {@link URI} representation of the path/uri. + * @throws IllegalArgumentException If the {@code uri} is invalid. + */ + public static URI convertToUri(String uri) throws IllegalArgumentException { + try { + return new URI(uri); + } catch (Exception e) { + throw new IllegalArgumentException("Invalid URI format", e); + } + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/TestsAssetsHelpers.java b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/TestsAssetsHelpers.java new file mode 100644 index 000000000000..07c93842d20d --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/java/com/azure/iot/modelsrepository/TestsAssetsHelpers.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.iot.modelsrepository; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; + +class TestsAssetsHelpers { + public static String readResourceFile(String filePathFromResources) throws IOException { + String pathToResources = System.getProperty("user.dir") + "/src/test/resources/" + filePathFromResources; + + return new String(Files.readAllBytes(Paths.get(pathToResources))); + } +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-1.json new file mode 100644 index 000000000000..8a37e6d2c2c3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-1.json @@ -0,0 +1,64 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "@type": "Interface", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "manufacturer", + "displayName": "Manufacturer", + "schema": "string", + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso." + }, + { + "@type": "Property", + "name": "model", + "displayName": "Device model", + "schema": "string", + "description": "Device model name or ID. Ex. Surface Book 2." + }, + { + "@type": "Property", + "name": "swVersion", + "displayName": "Software version", + "schema": "string", + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45" + }, + { + "@type": "Property", + "name": "osName", + "displayName": "Operating system name", + "schema": "string", + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core." + }, + { + "@type": "Property", + "name": "processorArchitecture", + "displayName": "Processor architecture", + "schema": "string", + "description": "Architecture of the processor on the device. Ex. x64 or ARM." + }, + { + "@type": "Property", + "name": "processorManufacturer", + "displayName": "Processor manufacturer", + "schema": "string", + "description": "Name of the manufacturer of the processor on the device. Ex. Intel." + }, + { + "@type": "Property", + "name": "totalStorage", + "displayName": "Total storage", + "schema": "double", + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes." + }, + { + "@type": "Property", + "name": "totalMemory", + "displayName": "Total memory", + "schema": "double", + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes." + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-2.json new file mode 100644 index 000000000000..d35b8a3e3a1d --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/azure/devicemanagement/deviceinformation-2.json @@ -0,0 +1,16 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;2", + "@type": "Interface", + "extends": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "osKernelVersion", + "displayName": "OS Kernel Version", + "schema": "string", + "description": "OS Kernel Version. Ex. Linux 4.15.0-54-generic x86_64." + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/base-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/base-1.json new file mode 100644 index 000000000000..85424e8a229e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/base-1.json @@ -0,0 +1,56 @@ +{ + "@id": "dtmi:com:example:base;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "baseSerialNumber", + "schema": "string" + } + ], + "displayName": { + "en": "mybaseProp" + }, + "extends": [ + { + "@id": "dtmi:com:example:basic;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "serialNumber", + "schema": "string", + "writable": false + }, + { + "@type": [ + "Telemetry", + "Temperature" + ], + "displayName": { + "en": "temperature" + }, + "name": "temperature", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": "Property", + "displayName": { + "en": "targetTemperature" + }, + "name": "targetTemperature", + "schema": "double", + "writable": true + } + ], + "displayName": { + "en": "Basic" + } + } + ], + "@context": [ + "dtmi:iotcentral:context;2", + "dtmi:dtdl:context;2" + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/base-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/base-2.json new file mode 100644 index 000000000000..29accafcc252 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/base-2.json @@ -0,0 +1,57 @@ +{ + "@id": "dtmi:com:example:base;2", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "baseSerialNumber", + "schema": "string" + } + ], + "displayName": { + "en": "mybaseProp" + }, + "extends": [ + { + "@id": "dtmi:com:example:basic;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "serialNumber", + "schema": "string", + "writable": false + }, + { + "@type": [ + "Telemetry", + "Temperature" + ], + "displayName": { + "en": "temperature" + }, + "name": "temperature", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": "Property", + "displayName": { + "en": "targetTemperature" + }, + "name": "targetTemperature", + "schema": "double", + "writable": true + } + ], + "displayName": { + "en": "Basic" + } + }, + "dtmi:com:example:Freezer;1" + ], + "@context": [ + "dtmi:iotcentral:context;2", + "dtmi:dtdl:context;2" + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/building-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/building-1.json new file mode 100644 index 000000000000..c8b6bc6f7375 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/building-1.json @@ -0,0 +1,19 @@ +{ + "@id": "dtmi:com:example:Building;1", + "@type": "Interface", + "displayName": "Building", + "contents": [ + { + "@type": "Property", + "name": "name", + "schema": "string", + "writable": true + }, + { + "@type": "Relationship", + "name": "contains", + "target": "dtmi:com:example:Room;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/camera-3.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/camera-3.json new file mode 100644 index 000000000000..f912746c0040 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/camera-3.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:Camera;3", + "@type": "Interface", + "displayName": "Phone", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/coldstorage-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/coldstorage-1.json new file mode 100644 index 000000000000..a3b8466118a9 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/coldstorage-1.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:ColdStorage;1", + "@type": "Interface", + "extends": ["dtmi:com:example:Room;1", "dtmi:com:example:Freezer;1"], + "contents": [ + { + "@type": "Property", + "name": "capacity", + "schema": "integer" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/conferenceroom-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/conferenceroom-1.json new file mode 100644 index 000000000000..2e756ee73b6e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/conferenceroom-1.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:ConferenceRoom;1", + "@type": "Interface", + "extends": "dtmi:com:example:Room;1", + "contents": [ + { + "@type": "Property", + "name": "capacity", + "schema": "integer" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/danglingexpanded-1.expanded.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/danglingexpanded-1.expanded.json new file mode 100644 index 000000000000..93126c749ce9 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/danglingexpanded-1.expanded.json @@ -0,0 +1,215 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:DanglingExpanded;1", + "@type": "Interface", + "displayName": "Valid expanded model with no root model.", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "@type": "Interface", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "manufacturer", + "displayName": "Manufacturer", + "schema": "string", + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso." + }, + { + "@type": "Property", + "name": "model", + "displayName": "Device model", + "schema": "string", + "description": "Device model name or ID. Ex. Surface Book 2." + }, + { + "@type": "Property", + "name": "swVersion", + "displayName": "Software version", + "schema": "string", + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45" + }, + { + "@type": "Property", + "name": "osName", + "displayName": "Operating system name", + "schema": "string", + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core." + }, + { + "@type": "Property", + "name": "processorArchitecture", + "displayName": "Processor architecture", + "schema": "string", + "description": "Architecture of the processor on the device. Ex. x64 or ARM." + }, + { + "@type": "Property", + "name": "processorManufacturer", + "displayName": "Processor manufacturer", + "schema": "string", + "description": "Name of the manufacturer of the processor on the device. Ex. Intel." + }, + { + "@type": "Property", + "name": "totalStorage", + "displayName": "Total storage", + "schema": "double", + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes." + }, + { + "@type": "Property", + "name": "totalMemory", + "displayName": "Total memory", + "schema": "double", + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes." + } + ] + } +] diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/freezer-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/freezer-1.json new file mode 100644 index 000000000000..6006b6673299 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/freezer-1.json @@ -0,0 +1,12 @@ +{ + "@id": "dtmi:com:example:Freezer;1", + "@type": "Interface", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:com:example:Thermostat;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/incompleteexpanded-1.expanded.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/incompleteexpanded-1.expanded.json new file mode 100644 index 000000000000..1688ef4c0e3c --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/incompleteexpanded-1.expanded.json @@ -0,0 +1,151 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:IncompleteExpanded;1", + "@type": "Interface", + "displayName": "Incomplete expanded Temperature Controller", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + } +] diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/invalidmodel-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/invalidmodel-1.json new file mode 100644 index 000000000000..4f18d7b17658 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/invalidmodel-1.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:invalidmodel;1", + "@type": "Interface", + "displayName": "Phone", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:fakeDeviceManagement:FakeDeviceInformation;2" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/invalidmodel-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/invalidmodel-2.json new file mode 100644 index 000000000000..61443734cd90 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/invalidmodel-2.json @@ -0,0 +1,23 @@ +{ + "@id": "dtmi:com:example:Phone;2", + "@type": "Interfacez", + "displayName": "Phone", + "contentsz": [ + { + "@type": "Component", + "name": "frontCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "backCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:deviceManagement:DeviceInformation;2" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/phone-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/phone-2.json new file mode 100644 index 000000000000..26c7efbdedc0 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/phone-2.json @@ -0,0 +1,23 @@ +{ + "@id": "dtmi:com:example:Phone;2", + "@type": "Interface", + "displayName": "Phone", + "contents": [ + { + "@type": "Component", + "name": "frontCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "backCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;2" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/room-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/room-1.json new file mode 100644 index 000000000000..1a07edec4d98 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/room-1.json @@ -0,0 +1,12 @@ +{ + "@id": "dtmi:com:example:Room;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "occupied", + "schema": "boolean" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.expanded.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.expanded.json new file mode 100644 index 000000000000..14e8e294189e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.expanded.json @@ -0,0 +1,215 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:TemperatureController;1", + "@type": "Interface", + "displayName": "Temperature Controller", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "@type": "Interface", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "manufacturer", + "displayName": "Manufacturer", + "schema": "string", + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso." + }, + { + "@type": "Property", + "name": "model", + "displayName": "Device model", + "schema": "string", + "description": "Device model name or ID. Ex. Surface Book 2." + }, + { + "@type": "Property", + "name": "swVersion", + "displayName": "Software version", + "schema": "string", + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45" + }, + { + "@type": "Property", + "name": "osName", + "displayName": "Operating system name", + "schema": "string", + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core." + }, + { + "@type": "Property", + "name": "processorArchitecture", + "displayName": "Processor architecture", + "schema": "string", + "description": "Architecture of the processor on the device. Ex. x64 or ARM." + }, + { + "@type": "Property", + "name": "processorManufacturer", + "displayName": "Processor manufacturer", + "schema": "string", + "description": "Name of the manufacturer of the processor on the device. Ex. Intel." + }, + { + "@type": "Property", + "name": "totalStorage", + "displayName": "Total storage", + "schema": "double", + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes." + }, + { + "@type": "Property", + "name": "totalMemory", + "displayName": "Total memory", + "schema": "double", + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes." + } + ] + } +] \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.json new file mode 100644 index 000000000000..c455ddf8bae6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/temperaturecontroller-1.json @@ -0,0 +1,60 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:TemperatureController;1", + "@type": "Interface", + "displayName": "Temperature Controller", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/thermostat-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/thermostat-1.json new file mode 100644 index 000000000000..315a307bbcb3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/com/example/thermostat-1.json @@ -0,0 +1,19 @@ +{ + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "contents": [ + { + "@type": "Telemetry", + "name": "temp", + "schema": "double" + }, + { + "@type": "Property", + "name": "setPointTemp", + "writable": true, + "schema": "double" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/company/demodevice-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/company/demodevice-1.json new file mode 100644 index 000000000000..33c9554664a6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/company/demodevice-1.json @@ -0,0 +1,31 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:company:demodevice;1", + "@type": "Interface", + "displayName": "demodevice", + "contents": [ + { + "@type": "Component", + "name": "c1", + "schema": "dtmi:azure:deviceManagement:DeviceInformation;1" + }, + { + "@type": "Telemetry", + "name": "temperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "deviceStatus", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "request": { + "name": "delay", + "schema": "integer" + } + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/company/demodevice-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/company/demodevice-2.json new file mode 100644 index 000000000000..9d9b3bd2322a --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/company/demodevice-2.json @@ -0,0 +1,31 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:company:demodevice;1", + "@type": "Interface", + "displayName": "demodevice", + "contents": [ + { + "@type": "Component", + "name": "c1", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1" + }, + { + "@type": "Telemetry", + "name": "temperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "deviceStatus", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "request": { + "name": "delay", + "schema": "integer" + } + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/badfilepath-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/badfilepath-1.json new file mode 100644 index 000000000000..6006b6673299 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/badfilepath-1.json @@ -0,0 +1,12 @@ +{ + "@id": "dtmi:com:example:Freezer;1", + "@type": "Interface", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:com:example:Thermostat;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/emptyarray-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/emptyarray-1.json new file mode 100644 index 000000000000..0637a088a01e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/emptyarray-1.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/namespaceconflict-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/namespaceconflict-1.json new file mode 100644 index 000000000000..6f2df812a67f --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/namespaceconflict-1.json @@ -0,0 +1,37 @@ +{ + "@id": "dtmi:strict:namespaceconflict;1", + "@type": "Interface", + "contents": [ + { + "@type": "Telemetry", + "name": "accelerometer1", + "schema": "dtmi:com:example:acceleration;1" + }, + { + "@type": "Telemetry", + "name": "accelerometer2", + "schema": "dtmi:com:example:acceleration;1" + } + ], + "schemas": [ + { + "@id": "dtmi:com:example:acceleration;1", + "@type": "Object", + "fields": [ + { + "name": "x", + "schema": "double" + }, + { + "name": "y", + "schema": "double" + }, + { + "name": "z", + "schema": "double" + } + ] + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/nondtdl-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/nondtdl-1.json new file mode 100644 index 000000000000..b25ba2ac3af6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/nondtdl-1.json @@ -0,0 +1 @@ +"content" \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/unsupportedrootarray-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/unsupportedrootarray-1.json new file mode 100644 index 000000000000..1f282307a8c3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/dtmi/strict/unsupportedrootarray-1.json @@ -0,0 +1,91 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:strict:unsupportedrootarray;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + } +] \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/azure/devicemanagement/deviceinformation-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/azure/devicemanagement/deviceinformation-1.json new file mode 100644 index 000000000000..8a37e6d2c2c3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/azure/devicemanagement/deviceinformation-1.json @@ -0,0 +1,64 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "@type": "Interface", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "manufacturer", + "displayName": "Manufacturer", + "schema": "string", + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso." + }, + { + "@type": "Property", + "name": "model", + "displayName": "Device model", + "schema": "string", + "description": "Device model name or ID. Ex. Surface Book 2." + }, + { + "@type": "Property", + "name": "swVersion", + "displayName": "Software version", + "schema": "string", + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45" + }, + { + "@type": "Property", + "name": "osName", + "displayName": "Operating system name", + "schema": "string", + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core." + }, + { + "@type": "Property", + "name": "processorArchitecture", + "displayName": "Processor architecture", + "schema": "string", + "description": "Architecture of the processor on the device. Ex. x64 or ARM." + }, + { + "@type": "Property", + "name": "processorManufacturer", + "displayName": "Processor manufacturer", + "schema": "string", + "description": "Name of the manufacturer of the processor on the device. Ex. Intel." + }, + { + "@type": "Property", + "name": "totalStorage", + "displayName": "Total storage", + "schema": "double", + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes." + }, + { + "@type": "Property", + "name": "totalMemory", + "displayName": "Total memory", + "schema": "double", + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes." + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/azure/devicemanagement/deviceinformation-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/azure/devicemanagement/deviceinformation-2.json new file mode 100644 index 000000000000..d35b8a3e3a1d --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/azure/devicemanagement/deviceinformation-2.json @@ -0,0 +1,16 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;2", + "@type": "Interface", + "extends": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "osKernelVersion", + "displayName": "OS Kernel Version", + "schema": "string", + "description": "OS Kernel Version. Ex. Linux 4.15.0-54-generic x86_64." + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/base-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/base-1.json new file mode 100644 index 000000000000..85424e8a229e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/base-1.json @@ -0,0 +1,56 @@ +{ + "@id": "dtmi:com:example:base;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "baseSerialNumber", + "schema": "string" + } + ], + "displayName": { + "en": "mybaseProp" + }, + "extends": [ + { + "@id": "dtmi:com:example:basic;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "serialNumber", + "schema": "string", + "writable": false + }, + { + "@type": [ + "Telemetry", + "Temperature" + ], + "displayName": { + "en": "temperature" + }, + "name": "temperature", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": "Property", + "displayName": { + "en": "targetTemperature" + }, + "name": "targetTemperature", + "schema": "double", + "writable": true + } + ], + "displayName": { + "en": "Basic" + } + } + ], + "@context": [ + "dtmi:iotcentral:context;2", + "dtmi:dtdl:context;2" + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/base-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/base-2.json new file mode 100644 index 000000000000..29accafcc252 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/base-2.json @@ -0,0 +1,57 @@ +{ + "@id": "dtmi:com:example:base;2", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "baseSerialNumber", + "schema": "string" + } + ], + "displayName": { + "en": "mybaseProp" + }, + "extends": [ + { + "@id": "dtmi:com:example:basic;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "serialNumber", + "schema": "string", + "writable": false + }, + { + "@type": [ + "Telemetry", + "Temperature" + ], + "displayName": { + "en": "temperature" + }, + "name": "temperature", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": "Property", + "displayName": { + "en": "targetTemperature" + }, + "name": "targetTemperature", + "schema": "double", + "writable": true + } + ], + "displayName": { + "en": "Basic" + } + }, + "dtmi:com:example:Freezer;1" + ], + "@context": [ + "dtmi:iotcentral:context;2", + "dtmi:dtdl:context;2" + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/building-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/building-1.json new file mode 100644 index 000000000000..c8b6bc6f7375 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/building-1.json @@ -0,0 +1,19 @@ +{ + "@id": "dtmi:com:example:Building;1", + "@type": "Interface", + "displayName": "Building", + "contents": [ + { + "@type": "Property", + "name": "name", + "schema": "string", + "writable": true + }, + { + "@type": "Relationship", + "name": "contains", + "target": "dtmi:com:example:Room;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/camera-3.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/camera-3.json new file mode 100644 index 000000000000..f912746c0040 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/camera-3.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:Camera;3", + "@type": "Interface", + "displayName": "Phone", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/coldstorage-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/coldstorage-1.json new file mode 100644 index 000000000000..a3b8466118a9 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/coldstorage-1.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:ColdStorage;1", + "@type": "Interface", + "extends": ["dtmi:com:example:Room;1", "dtmi:com:example:Freezer;1"], + "contents": [ + { + "@type": "Property", + "name": "capacity", + "schema": "integer" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/conferenceroom-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/conferenceroom-1.json new file mode 100644 index 000000000000..2e756ee73b6e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/conferenceroom-1.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:ConferenceRoom;1", + "@type": "Interface", + "extends": "dtmi:com:example:Room;1", + "contents": [ + { + "@type": "Property", + "name": "capacity", + "schema": "integer" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/danglingexpanded-1.expanded.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/danglingexpanded-1.expanded.json new file mode 100644 index 000000000000..93126c749ce9 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/danglingexpanded-1.expanded.json @@ -0,0 +1,215 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:DanglingExpanded;1", + "@type": "Interface", + "displayName": "Valid expanded model with no root model.", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "@type": "Interface", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "manufacturer", + "displayName": "Manufacturer", + "schema": "string", + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso." + }, + { + "@type": "Property", + "name": "model", + "displayName": "Device model", + "schema": "string", + "description": "Device model name or ID. Ex. Surface Book 2." + }, + { + "@type": "Property", + "name": "swVersion", + "displayName": "Software version", + "schema": "string", + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45" + }, + { + "@type": "Property", + "name": "osName", + "displayName": "Operating system name", + "schema": "string", + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core." + }, + { + "@type": "Property", + "name": "processorArchitecture", + "displayName": "Processor architecture", + "schema": "string", + "description": "Architecture of the processor on the device. Ex. x64 or ARM." + }, + { + "@type": "Property", + "name": "processorManufacturer", + "displayName": "Processor manufacturer", + "schema": "string", + "description": "Name of the manufacturer of the processor on the device. Ex. Intel." + }, + { + "@type": "Property", + "name": "totalStorage", + "displayName": "Total storage", + "schema": "double", + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes." + }, + { + "@type": "Property", + "name": "totalMemory", + "displayName": "Total memory", + "schema": "double", + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes." + } + ] + } +] diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/freezer-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/freezer-1.json new file mode 100644 index 000000000000..6006b6673299 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/freezer-1.json @@ -0,0 +1,12 @@ +{ + "@id": "dtmi:com:example:Freezer;1", + "@type": "Interface", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:com:example:Thermostat;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/incompleteexpanded-1.expanded.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/incompleteexpanded-1.expanded.json new file mode 100644 index 000000000000..1688ef4c0e3c --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/incompleteexpanded-1.expanded.json @@ -0,0 +1,151 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:IncompleteExpanded;1", + "@type": "Interface", + "displayName": "Incomplete expanded Temperature Controller", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + } +] diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/invalidmodel-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/invalidmodel-1.json new file mode 100644 index 000000000000..4f18d7b17658 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/invalidmodel-1.json @@ -0,0 +1,13 @@ +{ + "@id": "dtmi:com:example:invalidmodel;1", + "@type": "Interface", + "displayName": "Phone", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:fakeDeviceManagement:FakeDeviceInformation;2" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/invalidmodel-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/invalidmodel-2.json new file mode 100644 index 000000000000..61443734cd90 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/invalidmodel-2.json @@ -0,0 +1,23 @@ +{ + "@id": "dtmi:com:example:Phone;2", + "@type": "Interfacez", + "displayName": "Phone", + "contentsz": [ + { + "@type": "Component", + "name": "frontCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "backCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:deviceManagement:DeviceInformation;2" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/phone-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/phone-2.json new file mode 100644 index 000000000000..26c7efbdedc0 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/phone-2.json @@ -0,0 +1,23 @@ +{ + "@id": "dtmi:com:example:Phone;2", + "@type": "Interface", + "displayName": "Phone", + "contents": [ + { + "@type": "Component", + "name": "frontCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "backCamera", + "schema": "dtmi:com:example:Camera;3" + }, + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;2" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/room-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/room-1.json new file mode 100644 index 000000000000..1a07edec4d98 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/room-1.json @@ -0,0 +1,12 @@ +{ + "@id": "dtmi:com:example:Room;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "occupied", + "schema": "boolean" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/temperaturecontroller-1.expanded.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/temperaturecontroller-1.expanded.json new file mode 100644 index 000000000000..14e8e294189e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/temperaturecontroller-1.expanded.json @@ -0,0 +1,215 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:TemperatureController;1", + "@type": "Interface", + "displayName": "Temperature Controller", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + }, + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "@type": "Interface", + "displayName": "Device Information", + "contents": [ + { + "@type": "Property", + "name": "manufacturer", + "displayName": "Manufacturer", + "schema": "string", + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso." + }, + { + "@type": "Property", + "name": "model", + "displayName": "Device model", + "schema": "string", + "description": "Device model name or ID. Ex. Surface Book 2." + }, + { + "@type": "Property", + "name": "swVersion", + "displayName": "Software version", + "schema": "string", + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45" + }, + { + "@type": "Property", + "name": "osName", + "displayName": "Operating system name", + "schema": "string", + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core." + }, + { + "@type": "Property", + "name": "processorArchitecture", + "displayName": "Processor architecture", + "schema": "string", + "description": "Architecture of the processor on the device. Ex. x64 or ARM." + }, + { + "@type": "Property", + "name": "processorManufacturer", + "displayName": "Processor manufacturer", + "schema": "string", + "description": "Name of the manufacturer of the processor on the device. Ex. Intel." + }, + { + "@type": "Property", + "name": "totalStorage", + "displayName": "Total storage", + "schema": "double", + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes." + }, + { + "@type": "Property", + "name": "totalMemory", + "displayName": "Total memory", + "schema": "double", + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes." + } + ] + } +] \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/temperaturecontroller-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/temperaturecontroller-1.json new file mode 100644 index 000000000000..c455ddf8bae6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/temperaturecontroller-1.json @@ -0,0 +1,60 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:com:example:TemperatureController;1", + "@type": "Interface", + "displayName": "Temperature Controller", + "description": "Device with two thermostats and remote reboot.", + "contents": [ + { + "@type": [ + "Telemetry", + "DataSize" + ], + "name": "workingSet", + "displayName": "Working Set", + "description": "Current working set of the device memory in KiB.", + "schema": "double", + "unit": "kibibyte" + }, + { + "@type": "Property", + "name": "serialNumber", + "displayName": "Serial Number", + "description": "Serial number of the device.", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "displayName": "Reboot", + "description": "Reboots the device after waiting the number of seconds specified.", + "request": { + "name": "delay", + "displayName": "Delay", + "description": "Number of seconds to wait before rebooting the device.", + "schema": "integer" + } + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat1", + "displayName": "Thermostat One", + "description": "Thermostat One of Two." + }, + { + "@type": "Component", + "schema": "dtmi:com:example:Thermostat;1", + "name": "thermostat2", + "displayName": "Thermostat Two", + "description": "Thermostat Two of Two." + }, + { + "@type": "Component", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1", + "name": "deviceInformation", + "displayName": "Device Information interface", + "description": "Optional interface with basic device hardware information." + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/thermostat-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/thermostat-1.json new file mode 100644 index 000000000000..315a307bbcb3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/com/example/thermostat-1.json @@ -0,0 +1,19 @@ +{ + "@id": "dtmi:com:example:Thermostat;1", + "@type": "Interface", + "displayName": "Thermostat", + "contents": [ + { + "@type": "Telemetry", + "name": "temp", + "schema": "double" + }, + { + "@type": "Property", + "name": "setPointTemp", + "writable": true, + "schema": "double" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/company/demodevice-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/company/demodevice-1.json new file mode 100644 index 000000000000..33c9554664a6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/company/demodevice-1.json @@ -0,0 +1,31 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:company:demodevice;1", + "@type": "Interface", + "displayName": "demodevice", + "contents": [ + { + "@type": "Component", + "name": "c1", + "schema": "dtmi:azure:deviceManagement:DeviceInformation;1" + }, + { + "@type": "Telemetry", + "name": "temperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "deviceStatus", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "request": { + "name": "delay", + "schema": "integer" + } + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/company/demodevice-2.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/company/demodevice-2.json new file mode 100644 index 000000000000..9d9b3bd2322a --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/company/demodevice-2.json @@ -0,0 +1,31 @@ +{ + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:company:demodevice;1", + "@type": "Interface", + "displayName": "demodevice", + "contents": [ + { + "@type": "Component", + "name": "c1", + "schema": "dtmi:azure:DeviceManagement:DeviceInformation;1" + }, + { + "@type": "Telemetry", + "name": "temperature", + "schema": "double" + }, + { + "@type": "Property", + "name": "deviceStatus", + "schema": "string" + }, + { + "@type": "Command", + "name": "reboot", + "request": { + "name": "delay", + "schema": "integer" + } + } + ] +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/badfilepath-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/badfilepath-1.json new file mode 100644 index 000000000000..6006b6673299 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/badfilepath-1.json @@ -0,0 +1,12 @@ +{ + "@id": "dtmi:com:example:Freezer;1", + "@type": "Interface", + "contents": [ + { + "@type": "Component", + "name": "deviceInfo", + "schema": "dtmi:com:example:Thermostat;1" + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/emptyarray-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/emptyarray-1.json new file mode 100644 index 000000000000..0637a088a01e --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/emptyarray-1.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/namespaceconflict-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/namespaceconflict-1.json new file mode 100644 index 000000000000..6f2df812a67f --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/namespaceconflict-1.json @@ -0,0 +1,37 @@ +{ + "@id": "dtmi:strict:namespaceconflict;1", + "@type": "Interface", + "contents": [ + { + "@type": "Telemetry", + "name": "accelerometer1", + "schema": "dtmi:com:example:acceleration;1" + }, + { + "@type": "Telemetry", + "name": "accelerometer2", + "schema": "dtmi:com:example:acceleration;1" + } + ], + "schemas": [ + { + "@id": "dtmi:com:example:acceleration;1", + "@type": "Object", + "fields": [ + { + "name": "x", + "schema": "double" + }, + { + "name": "y", + "schema": "double" + }, + { + "name": "z", + "schema": "double" + } + ] + } + ], + "@context": "dtmi:dtdl:context;2" +} \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/nondtdl-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/nondtdl-1.json new file mode 100644 index 000000000000..b25ba2ac3af6 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/nondtdl-1.json @@ -0,0 +1 @@ +"content" \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/unsupportedrootarray-1.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/unsupportedrootarray-1.json new file mode 100644 index 000000000000..1f282307a8c3 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/dtmi/strict/unsupportedrootarray-1.json @@ -0,0 +1,91 @@ +[ + { + "@context": "dtmi:dtdl:context;2", + "@id": "dtmi:strict:unsupportedrootarray;1", + "@type": "Interface", + "displayName": "Thermostat", + "description": "Reports current temperature and provides desired temperature control.", + "contents": [ + { + "@type": [ + "Telemetry", + "Temperature" + ], + "name": "temperature", + "displayName": "Temperature", + "description": "Temperature in degrees Celsius.", + "schema": "double", + "unit": "degreeCelsius" + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "targetTemperature", + "schema": "double", + "displayName": "Target Temperature", + "description": "Allows to remotely specify the desired target temperature.", + "unit": "degreeCelsius", + "writable": true + }, + { + "@type": [ + "Property", + "Temperature" + ], + "name": "maxTempSinceLastReboot", + "schema": "double", + "unit": "degreeCelsius", + "displayName": "Max temperature since last reboot.", + "description": "Returns the max temperature since last device reboot." + }, + { + "@type": "Command", + "name": "getMaxMinReport", + "displayName": "Get Max-Min report.", + "description": "This command returns the max, min and average temperature from the specified time to the current time.", + "request": { + "name": "since", + "displayName": "Since", + "description": "Period to return the max-min report.", + "schema": "dateTime" + }, + "response": { + "name": "tempReport", + "displayName": "Temperature Report", + "schema": { + "@type": "Object", + "fields": [ + { + "name": "maxTemp", + "displayName": "Max temperature", + "schema": "double" + }, + { + "name": "minTemp", + "displayName": "Min temperature", + "schema": "double" + }, + { + "name": "avgTemp", + "displayName": "Average Temperature", + "schema": "double" + }, + { + "name": "startTime", + "displayName": "Start Time", + "schema": "dateTime" + }, + { + "name": "endTime", + "displayName": "End Time", + "schema": "dateTime" + } + ] + } + } + } + ] + } +] \ No newline at end of file diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/metadata.json b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/metadata.json new file mode 100644 index 000000000000..93e3ed185af7 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/src/test/resources/TestModelRepo/metadataModelsrepo/metadata.json @@ -0,0 +1,10 @@ +{ + "commitId": "f49444d5deefa369300c7653b5958f9907da550a", + "features": { + "expanded": true, + "index": true + }, + "publishDateUtc": "2021-09-16T23:01:01.885362+00:00", + "sourceRepo": "Azure/iot-plugandplay-models", + "totalModelCount": 19010 +} diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/update-recorded-sessions.ps1 b/sdk/modelsrepository/azure-iot-modelsrepository/update-recorded-sessions.ps1 new file mode 100644 index 000000000000..34860c078fd0 --- /dev/null +++ b/sdk/modelsrepository/azure-iot-modelsrepository/update-recorded-sessions.ps1 @@ -0,0 +1,11 @@ + + +$sourceSessionRecordPath = ".\target\test-classes\session-records\" +$targetSessionRecordPath = ".\src\test\resources\" + +if (-not (Test-Path -Path $sourceSessionRecordPath)) +{ + Write-Host("Ensure you have run the tests in Record mode. $sessionRecordPath does not exist`n") +} + +Copy-Item -Path $sourceSessionRecordPath -Destination $targetSessionRecordPath -Force -Recurse -Container \ No newline at end of file diff --git a/sdk/modelsrepository/ci.yml b/sdk/modelsrepository/ci.yml new file mode 100644 index 000000000000..b15536438791 --- /dev/null +++ b/sdk/modelsrepository/ci.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/modelsrepository/ + exclude: + - sdk/modelsrepository/pom.xml + - sdk/modelsrepository/azure-iot-modelsrepository/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/modelsrepository/ + exclude: + - sdk/modelsrepository/pom.xml + - sdk/modelsrepository/azure-iot-modelsrepository/pom.xml + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: modelsrepository + Artifacts: + - name: azure-iot-modelsrepository + groupId: com.azure + safeName: azureiotmodelsrepository diff --git a/sdk/modelsrepository/cspell.yml b/sdk/modelsrepository/cspell.yml new file mode 100644 index 000000000000..2a3facbec75b --- /dev/null +++ b/sdk/modelsrepository/cspell.yml @@ -0,0 +1,12 @@ +# Spell-check overrides for this SDK group. +# Inherits the global config at the repo root. +# +# Add words that only appear in this folder here, in alphabetical order. +# Cross-cutting terms should go in the root cspell.json instead. +version: "0.2" +import: + - ../../.vscode/cspell.json +words: + - "dtdlv" + - "dtmis" + - "undersc" diff --git a/sdk/modelsrepository/pom.xml b/sdk/modelsrepository/pom.xml new file mode 100644 index 000000000000..fe91a6a76e25 --- /dev/null +++ b/sdk/modelsrepository/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + com.azure + azure-iot-modelsrepository-service + pom + 1.0.0 + + azure-iot-modelsrepository + + diff --git a/sdk/modelsrepository/tests.yml b/sdk/modelsrepository/tests.yml new file mode 100644 index 000000000000..6aa619a04e9e --- /dev/null +++ b/sdk/modelsrepository/tests.yml @@ -0,0 +1,11 @@ +trigger: none + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml + parameters: + Artifacts: + - name: azure-iot-modelsrepository + groupId: com.azure + safeName: azureiotmodelsrepository + ServiceDirectory: modelsrepository + Clouds: 'Preview' diff --git a/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/pom.xml b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/pom.xml index 21acaf920966..0d1c4bc1e960 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/pom.xml +++ b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/pom.xml @@ -38,7 +38,6 @@ --add-opens com.azure.monitor.opentelemetry.autoconfigure/com.azure.monitor.opentelemetry.autoconfigure=ALL-UNNAMED --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED --add-reads com.azure.monitor.opentelemetry.autoconfigure=com.azure.core.tracing.opentelemetry - --add-reads com.azure.monitor.opentelemetry.autoconfigure=io.netty.transport false diff --git a/sdk/monitor/azure-resourcemanager-monitor-workspaces/CHANGELOG.md b/sdk/monitor/azure-resourcemanager-monitor-workspaces/CHANGELOG.md index 0ffb431ed378..9153ab73d1e1 100644 --- a/sdk/monitor/azure-resourcemanager-monitor-workspaces/CHANGELOG.md +++ b/sdk/monitor/azure-resourcemanager-monitor-workspaces/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History -## 1.1.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 1.1.0-beta.1 (2026-10-13) - Azure Resource Manager Monitor Workspaces client library for Java. This package contains Microsoft Azure SDK for Monitor Workspaces Management SDK. Package api-version 2026-09-03-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/monitor/azure-resourcemanager-monitor-workspaces/pom.xml b/sdk/monitor/azure-resourcemanager-monitor-workspaces/pom.xml index 4b43b72b0aa3..74ce32a2e50f 100644 --- a/sdk/monitor/azure-resourcemanager-monitor-workspaces/pom.xml +++ b/sdk/monitor/azure-resourcemanager-monitor-workspaces/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-monitor-workspaces - 1.1.0-beta.2 + 1.1.0-beta.1 jar Microsoft Azure SDK for Monitor Workspaces Management diff --git a/sdk/monitor/azure-resourcemanager-monitor/pom.xml b/sdk/monitor/azure-resourcemanager-monitor/pom.xml index 345d791b4245..07b9253f8f36 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/pom.xml +++ b/sdk/monitor/azure-resourcemanager-monitor/pom.xml @@ -84,7 +84,7 @@ com.azure.resourcemanager azure-resourcemanager-compute - 2.62.0 + 2.61.2 test @@ -96,7 +96,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test diff --git a/sdk/network/azure-resourcemanager-network/CHANGELOG.md b/sdk/network/azure-resourcemanager-network/CHANGELOG.md index b1665104fab9..56602c42c17f 100644 --- a/sdk/network/azure-resourcemanager-network/CHANGELOG.md +++ b/sdk/network/azure-resourcemanager-network/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History -## 2.63.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 2.62.0 (2026-10-09) - Package api-version Microsoft.Network: 2026-03-01, Microsoft.Compute: 2018-10-01. diff --git a/sdk/network/azure-resourcemanager-network/pom.xml b/sdk/network/azure-resourcemanager-network/pom.xml index 5707f1b348a3..e83804de4906 100644 --- a/sdk/network/azure-resourcemanager-network/pom.xml +++ b/sdk/network/azure-resourcemanager-network/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.63.0-beta.1 + 2.62.0 jar Microsoft Azure SDK for Network Management diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/CHANGELOG.md b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/CHANGELOG.md new file mode 100644 index 000000000000..94c7231e4b78 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/CHANGELOG.md @@ -0,0 +1,27 @@ +# Release History + +## 1.1.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.1 (2025-02-24) + +Please note, this package has been deprecated and will no longer be maintained after 03/14/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +### Other Changes + +- Please note, this package has been deprecated and will no longer be maintained after 03/14/2025. + +## 1.0.0 (2024-01-24) + +- Azure Resource Manager Network Analytics client library for Java. This package contains Microsoft Azure SDK for Network Analytics Management SDK. Package tag package-2023-11-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +## 1.0.0-beta.1 (2023-11-28) + +- Azure Resource Manager Network Analytics client library for Java. This package contains Microsoft Azure SDK for Network Analytics Management SDK. Package tag package-2023-11-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/README.md b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/README.md new file mode 100644 index 000000000000..7f4ba1b32201 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/README.md @@ -0,0 +1,109 @@ +# Azure Resource Manager Network Analytics client library for Java + +Please note, this package has been deprecated and will no longer be maintained after 03/14/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +Azure Resource Manager Network Analytics client library for Java. + +This package contains Microsoft Azure SDK for Network Analytics Management SDK. Package tag package-2023-11-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +## We'd love to hear your feedback + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-networkanalytics;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-networkanalytics + 1.1.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +With above configuration, `azure` client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +NetworkAnalyticsManager manager = NetworkAnalyticsManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + + diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md new file mode 100644 index 000000000000..ecfc094d5214 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md @@ -0,0 +1,854 @@ +# Code snippets and samples + + +## DataProducts + +- [AddUserRole](#dataproducts_adduserrole) +- [Create](#dataproducts_create) +- [Delete](#dataproducts_delete) +- [GenerateStorageAccountSasToken](#dataproducts_generatestorageaccountsastoken) +- [GetByResourceGroup](#dataproducts_getbyresourcegroup) +- [List](#dataproducts_list) +- [ListByResourceGroup](#dataproducts_listbyresourcegroup) +- [ListRolesAssignments](#dataproducts_listrolesassignments) +- [RemoveUserRole](#dataproducts_removeuserrole) +- [RotateKey](#dataproducts_rotatekey) +- [Update](#dataproducts_update) + +## DataProductsCatalogs + +- [GetByResourceGroup](#dataproductscatalogs_getbyresourcegroup) +- [List](#dataproductscatalogs_list) +- [ListByResourceGroup](#dataproductscatalogs_listbyresourcegroup) + +## DataTypes + +- [Create](#datatypes_create) +- [Delete](#datatypes_delete) +- [DeleteData](#datatypes_deletedata) +- [GenerateStorageContainerSasToken](#datatypes_generatestoragecontainersastoken) +- [Get](#datatypes_get) +- [ListByDataProduct](#datatypes_listbydataproduct) +- [Update](#datatypes_update) + +## Operations + +- [List](#operations_list) +### DataProducts_AddUserRole + +```java +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties; +import java.util.Arrays; +import java.util.stream.Collectors; + +/** + * Samples for DataProducts AddUserRole. + */ +public final class DataProductsAddUserRoleSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_AddUserRole_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().addUserRoleWithResponse("aoiresourceGroupName", "dataproduct01", new RoleAssignmentCommonProperties().withRoleId("00000000-0000-0000-0000-00000000000").withPrincipalId("00000000-0000-0000-0000-00000000000").withUsername("userName").withDataTypeScope(Arrays.asList("scope")).withPrincipalType("User").withRole(DataProductUserRole.READER), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_AddUserRole_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_AddUserRole_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsAddUserRoleMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().addUserRoleWithResponse("aoiresourceGroupName", "dataproduct01", new RoleAssignmentCommonProperties().withRoleId("00000000-0000-0000-0000-00000000000").withPrincipalId("00000000-0000-0000-0000-00000000000").withUsername("UserName").withDataTypeScope(Arrays.asList("scope")).withPrincipalType("User").withRole(DataProductUserRole.READER), com.azure.core.util.Context.NONE); + } +} +``` + +### DataProducts_Create + +```java +import com.azure.resourcemanager.networkanalytics.models.ControlState; +import com.azure.resourcemanager.networkanalytics.models.DataProductNetworkAcls; +import com.azure.resourcemanager.networkanalytics.models.DataProductProperties; +import com.azure.resourcemanager.networkanalytics.models.DefaultAction; +import com.azure.resourcemanager.networkanalytics.models.EncryptionKeyDetails; +import com.azure.resourcemanager.networkanalytics.models.IpRules; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.networkanalytics.models.UserAssignedIdentity; +import com.azure.resourcemanager.networkanalytics.models.VirtualNetworkRule; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for DataProducts Create. + */ +public final class DataProductsCreateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Create_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_Create_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCreateMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().define("dataproduct01").withRegion("eastus").withExistingResourceGroup("aoiresourceGroupName").withTags(mapOf("userSpecifiedKeyName", "fakeTokenPlaceholder")).withProperties(new DataProductProperties().withPublisher("Microsoft").withProduct("MCC").withMajorVersion("1.0.0").withOwners(Arrays.asList("abc@micros.com")).withRedundancy(ControlState.DISABLED).withPurviewAccount("testpurview").withPurviewCollection("134567890").withPrivateLinksEnabled(ControlState.DISABLED).withPublicNetworkAccess(ControlState.ENABLED).withCustomerManagedKeyEncryptionEnabled(ControlState.ENABLED).withCustomerEncryptionKey(new EncryptionKeyDetails().withKeyVaultUri("fakeTokenPlaceholder").withKeyName("fakeTokenPlaceholder").withKeyVersion("fakeTokenPlaceholder")).withNetworkacls(new DataProductNetworkAcls().withVirtualNetworkRule(Arrays.asList(new VirtualNetworkRule().withId("/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName").withAction("Allow").withState(""))).withIpRules(Arrays.asList(new IpRules().withValue("1.1.1.1").withAction("Allow"))).withAllowedQueryIpRangeList(Arrays.asList("1.1.1.1")).withDefaultAction(DefaultAction.ALLOW)).withManagedResourceGroupConfiguration(new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")).withCurrentMinorVersion("1.0.1")).withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf("/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", new UserAssignedIdentity()))).create(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Create_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().define("dataproduct01").withRegion("eastus").withExistingResourceGroup("aoiresourceGroupName").withTags(mapOf("userSpecifiedKeyName", "fakeTokenPlaceholder")).withProperties(new DataProductProperties().withPublisher("Microsoft").withProduct("MCC").withMajorVersion("1.0.0")).create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### DataProducts_Delete + +```java +/** + * Samples for DataProducts Delete. + */ +public final class DataProductsDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_Delete_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsDeleteMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().delete("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().delete("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE); + } +} +``` + +### DataProducts_GenerateStorageAccountSasToken + +```java +import com.azure.resourcemanager.networkanalytics.models.AccountSas; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Samples for DataProducts GenerateStorageAccountSasToken. + */ +public final class DataProductsGenerateStorageAccountSasTokenSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().generateStorageAccountSasTokenWithResponse("aoiresourceGroupName", "dataproduct01", new AccountSas().withStartTimestamp(OffsetDateTime.parse("2023-08-24T05:35:17.051Z")).withExpiryTimestamp(OffsetDateTime.parse("2023-08-24T05:35:17.051Z")).withIpAddress("1.1.1.1"), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsGenerateStorageAccountSasTokenMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().generateStorageAccountSasTokenWithResponse("aoiresourceGroupName", "dataproduct01", new AccountSas().withStartTimestamp(OffsetDateTime.parse("2023-08-24T05:34:58.151Z")).withExpiryTimestamp(OffsetDateTime.parse("2023-08-24T05:34:58.151Z")).withIpAddress("1.1.1.1"), com.azure.core.util.Context.NONE); + } +} +``` + +### DataProducts_GetByResourceGroup + +```java +/** + * Samples for DataProducts GetByResourceGroup. + */ +public final class DataProductsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_Get_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsGetMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().getByResourceGroupWithResponse("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Get_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().getByResourceGroupWithResponse("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE); + } +} +``` + +### DataProducts_List + +```java +/** + * Samples for DataProducts List. + */ +public final class DataProductsListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListBySubscriptionMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().list(com.azure.core.util.Context.NONE); + } +} +``` + +### DataProducts_ListByResourceGroup + +```java +/** + * Samples for DataProducts ListByResourceGroup. + */ +public final class DataProductsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().listByResourceGroup("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListByResourceGroupMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().listByResourceGroup("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } +} +``` + +### DataProducts_ListRolesAssignments + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** + * Samples for DataProducts ListRolesAssignments. + */ +public final class DataProductsListRolesAssignmentsSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListRolesAssignments_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) throws IOException { + manager.dataProducts().listRolesAssignmentsWithResponse("aoiresourceGroupName", "dataproduct01", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListRolesAssignments_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListRolesAssignmentsMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) throws IOException { + manager.dataProducts().listRolesAssignmentsWithResponse("aoiresourceGroupName", "dataproduct01", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), com.azure.core.util.Context.NONE); + } +} +``` + +### DataProducts_RemoveUserRole + +```java +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import java.util.Arrays; +import java.util.stream.Collectors; + +/** + * Samples for DataProducts RemoveUserRole. + */ +public final class DataProductsRemoveUserRoleSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_RemoveUserRole_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_RemoveUserRole_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsRemoveUserRoleMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().removeUserRoleWithResponse("aoiresourceGroupName", "dataproduct01", new RoleAssignmentDetailInner().withRoleId("00000000-0000-0000-0000-00000000000").withPrincipalId("00000000-0000-0000-0000-00000000000").withUsername("UserName").withDataTypeScope(Arrays.asList("scope")).withPrincipalType("User").withRole(DataProductUserRole.READER).withRoleAssignmentId("00000000-0000-0000-0000-00000000000"), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_RemoveUserRole_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().removeUserRoleWithResponse("aoiresourceGroupName", "dataproduct01", new RoleAssignmentDetailInner().withRoleId("00000000-0000-0000-0000-00000000000").withPrincipalId("00000000-0000-0000-0000-00000000000").withUsername("UserName").withDataTypeScope(Arrays.asList("scope")).withPrincipalType("User").withRole(DataProductUserRole.READER).withRoleAssignmentId("00000000-0000-0000-0000-00000000000"), com.azure.core.util.Context.NONE); + } +} +``` + +### DataProducts_RotateKey + +```java +import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo; + +/** + * Samples for DataProducts RotateKey. + */ +public final class DataProductsRotateKeySamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_RotateKey_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_RotateKey_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsRotateKeyMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().rotateKeyWithResponse("aoiresourceGroupName", "dataproduct01", new KeyVaultInfo().withKeyVaultUrl("fakeTokenPlaceholder"), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_RotateKey_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().rotateKeyWithResponse("aoiresourceGroupName", "dataproduct01", new KeyVaultInfo().withKeyVaultUrl("fakeTokenPlaceholder"), com.azure.core.util.Context.NONE); + } +} +``` + +### DataProducts_Update + +```java +import com.azure.resourcemanager.networkanalytics.models.ControlState; +import com.azure.resourcemanager.networkanalytics.models.DataProduct; +import com.azure.resourcemanager.networkanalytics.models.DataProductUpdateProperties; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.networkanalytics.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for DataProducts Update. + */ +public final class DataProductsUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Update_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_Update_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsUpdateMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + DataProduct resource = manager.dataProducts().getByResourceGroupWithResponse("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("userSpecifiedKeyName", "fakeTokenPlaceholder")).withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf("/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", new UserAssignedIdentity()))).withProperties(new DataProductUpdateProperties().withOwners(Arrays.asList("abc@micros.com", "def@micros.com")).withPurviewAccount("testpurview").withPurviewCollection("134567890").withPrivateLinksEnabled(ControlState.DISABLED).withCurrentMinorVersion("1.0.1")).apply(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Update_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + DataProduct resource = manager.dataProducts().getByResourceGroupWithResponse("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE).getValue(); + resource.update().apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### DataProductsCatalogs_GetByResourceGroup + +```java +/** + * Samples for DataProductsCatalogs GetByResourceGroup. + */ +public final class DataProductsCatalogsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_Get_MinimumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().getByResourceGroupWithResponse("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_Get_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsGetMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().getByResourceGroupWithResponse("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } +} +``` + +### DataProductsCatalogs_List + +```java +/** + * Samples for DataProductsCatalogs List. + */ +public final class DataProductsCatalogsListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsListBySubscriptionMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_ListBySubscription_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsListBySubscriptionMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().list(com.azure.core.util.Context.NONE); + } +} +``` + +### DataProductsCatalogs_ListByResourceGroup + +```java +/** + * Samples for DataProductsCatalogs ListByResourceGroup. + */ +public final class DataProductsCatalogsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsListByResourceGroupMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().listByResourceGroup("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsListByResourceGroupMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().listByResourceGroup("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } +} +``` + +### DataTypes_Create + +```java +import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import java.util.stream.Collectors; + +/** + * Samples for DataTypes Create. + */ +public final class DataTypesCreateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Create_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_Create_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesCreateMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().define("datatypename").withExistingDataProduct("aoiresourceGroupName", "dataproduct01").withProperties(new DataTypeProperties().withState(DataTypeState.fromString("STARTED")).withStorageOutputRetention(27).withDatabaseCacheRetention(23).withDatabaseRetention(6)).create(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Create_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().define("datatypename").withExistingDataProduct("aoiresourceGroupName", "dataproduct01").create(); + } +} +``` + +### DataTypes_Delete + +```java +/** + * Samples for DataTypes Delete. + */ +public final class DataTypesDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().delete("aoiresourceGroupName", "dataproduct01", "datatypename", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_Delete_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesDeleteMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().delete("aoiresourceGroupName", "dataproduct01", "datatypename", com.azure.core.util.Context.NONE); + } +} +``` + +### DataTypes_DeleteData + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** + * Samples for DataTypes DeleteData. + */ +public final class DataTypesDeleteDataSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_DeleteData_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_DeleteData_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesDeleteDataMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) throws IOException { + manager.dataTypes().deleteData("aoiresourceGroupName", "dataproduct01", "datatypename", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_DeleteData_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_DeleteData_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesDeleteDataMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) throws IOException { + manager.dataTypes().deleteData("aoiresourceGroupName", "dataproduct01", "datatypename", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), com.azure.core.util.Context.NONE); + } +} +``` + +### DataTypes_GenerateStorageContainerSasToken + +```java +import com.azure.resourcemanager.networkanalytics.models.ContainerSaS; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Samples for DataTypes GenerateStorageContainerSasToken. + */ +public final class DataTypesGenerateStorageContainerSasTokenSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesGenerateStorageContainerSasTokenMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().generateStorageContainerSasTokenWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", new ContainerSaS().withStartTimestamp(OffsetDateTime.parse("2023-08-24T05:34:58.039Z")).withExpiryTimestamp(OffsetDateTime.parse("2023-08-24T05:34:58.039Z")).withIpAddress("1.1.1.1"), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().generateStorageContainerSasTokenWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", new ContainerSaS().withStartTimestamp(OffsetDateTime.parse("2023-08-24T05:35:16.887Z")).withExpiryTimestamp(OffsetDateTime.parse("2023-08-24T05:35:16.887Z")).withIpAddress("1.1.1.1"), com.azure.core.util.Context.NONE); + } +} +``` + +### DataTypes_Get + +```java +/** + * Samples for DataTypes Get. + */ +public final class DataTypesGetSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Get_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().getWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_Get_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesGetMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().getWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", com.azure.core.util.Context.NONE); + } +} +``` + +### DataTypes_ListByDataProduct + +```java +/** + * Samples for DataTypes ListByDataProduct. + */ +public final class DataTypesListByDataProductSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_ListByDataProduct_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_ListByDataProduct_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesListByDataProductMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().listByDataProduct("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_ListByDataProduct_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().listByDataProduct("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE); + } +} +``` + +### DataTypes_Update + +```java +import com.azure.resourcemanager.networkanalytics.models.DataType; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdateProperties; +import java.util.stream.Collectors; + +/** + * Samples for DataTypes Update. + */ +public final class DataTypesUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Update_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + DataType resource = manager.dataTypes().getWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", com.azure.core.util.Context.NONE).getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Update_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_Update_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesUpdateMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + DataType resource = manager.dataTypes().getWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", com.azure.core.util.Context.NONE).getValue(); + resource.update().withProperties(new DataTypeUpdateProperties().withState(DataTypeState.fromString("STARTED")).withStorageOutputRetention(30).withDatabaseCacheRetention(16).withDatabaseRetention(9)).apply(); + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/Operations_List_MinimumSet_Gen.json + */ + /** + * Sample code: Operations_List_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/Operations_List_MaximumSet_Gen.json + */ + /** + * Sample code: Operations_List_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void operationsListMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml new file mode 100644 index 000000000000..1411480e978a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml @@ -0,0 +1,97 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-networkanalytics + 1.1.0-beta.1 + jar + + Microsoft Azure SDK for Network Analytics Management + Please note, this package has been deprecated and will no longer be maintained after 03/14/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-management + 1.19.8 + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + org.mockito + mockito-core + 4.11.0 + test + + + net.bytebuddy + byte-buddy + 1.18.11 + test + + + net.bytebuddy + byte-buddy-agent + 1.18.11 + test + + + com.azure.resourcemanager + azure-resourcemanager-test + 2.0.0-beta.4 + test + + + diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/NetworkAnalyticsManager.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/NetworkAnalyticsManager.java new file mode 100644 index 000000000000..e0520ad6137b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/NetworkAnalyticsManager.java @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.NetworkAnalyticsMgmtClient; +import com.azure.resourcemanager.networkanalytics.implementation.DataProductsCatalogsImpl; +import com.azure.resourcemanager.networkanalytics.implementation.DataProductsImpl; +import com.azure.resourcemanager.networkanalytics.implementation.DataTypesImpl; +import com.azure.resourcemanager.networkanalytics.implementation.NetworkAnalyticsMgmtClientBuilder; +import com.azure.resourcemanager.networkanalytics.implementation.OperationsImpl; +import com.azure.resourcemanager.networkanalytics.models.DataProducts; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogs; +import com.azure.resourcemanager.networkanalytics.models.DataTypes; +import com.azure.resourcemanager.networkanalytics.models.Operations; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Entry point to NetworkAnalyticsManager. + */ +public final class NetworkAnalyticsManager { + private Operations operations; + + private DataProducts dataProducts; + + private DataProductsCatalogs dataProductsCatalogs; + + private DataTypes dataTypes; + + private final NetworkAnalyticsMgmtClient clientObject; + + private NetworkAnalyticsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = new NetworkAnalyticsMgmtClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of Network Analytics service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the Network Analytics service API instance. + */ + public static NetworkAnalyticsManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of Network Analytics service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the Network Analytics service API instance. + */ + public static NetworkAnalyticsManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new NetworkAnalyticsManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create NetworkAnalyticsManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new NetworkAnalyticsManager.Configurable(); + } + + /** + * The Configurable allowing configurations to be set. + */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + *

      + * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of Network Analytics service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the Network Analytics service API instance. + */ + public NetworkAnalyticsManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder.append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.networkanalytics") + .append("/") + .append("1.0.0"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder.append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new NetworkAnalyticsManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of DataProducts. It manages DataProduct. + * + * @return Resource collection API of DataProducts. + */ + public DataProducts dataProducts() { + if (this.dataProducts == null) { + this.dataProducts = new DataProductsImpl(clientObject.getDataProducts(), this); + } + return dataProducts; + } + + /** + * Gets the resource collection API of DataProductsCatalogs. + * + * @return Resource collection API of DataProductsCatalogs. + */ + public DataProductsCatalogs dataProductsCatalogs() { + if (this.dataProductsCatalogs == null) { + this.dataProductsCatalogs = new DataProductsCatalogsImpl(clientObject.getDataProductsCatalogs(), this); + } + return dataProductsCatalogs; + } + + /** + * Gets the resource collection API of DataTypes. It manages DataType. + * + * @return Resource collection API of DataTypes. + */ + public DataTypes dataTypes() { + if (this.dataTypes == null) { + this.dataTypes = new DataTypesImpl(clientObject.getDataTypes(), this); + } + return dataTypes; + } + + /** + * Gets wrapped service client NetworkAnalyticsMgmtClient providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + * + * @return Wrapped service client NetworkAnalyticsMgmtClient. + */ + public NetworkAnalyticsMgmtClient serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsCatalogsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsCatalogsClient.java new file mode 100644 index 000000000000..85fbcd14fac2 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsCatalogsClient.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner; + +/** + * An instance of this class provides access to all the operations defined in DataProductsCatalogsClient. + */ +public interface DataProductsCatalogsClient { + /** + * List data catalog by subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List data catalog by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data catalog resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, Context context); + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data catalog resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataProductsCatalogInner getByResourceGroup(String resourceGroupName); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsClient.java new file mode 100644 index 000000000000..36d0fea6c0e4 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataProductsClient.java @@ -0,0 +1,425 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.AccountSas; +import com.azure.resourcemanager.networkanalytics.models.DataProductUpdate; +import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties; + +/** + * An instance of this class provides access to all the operations defined in DataProductsClient. + */ +public interface DataProductsClient { + /** + * List data products by subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List data products by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Retrieve data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String dataProductName, + Context context); + + /** + * Retrieve data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataProductInner getByResourceGroup(String resourceGroupName, String dataProductName); + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataProductInner> beginCreate(String resourceGroupName, + String dataProductName, DataProductInner resource); + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataProductInner> beginCreate(String resourceGroupName, + String dataProductName, DataProductInner resource, Context context); + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataProductInner create(String resourceGroupName, String dataProductName, DataProductInner resource); + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataProductInner create(String resourceGroupName, String dataProductName, DataProductInner resource, + Context context); + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataProductInner> beginUpdate(String resourceGroupName, + String dataProductName, DataProductUpdate properties); + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataProductInner> beginUpdate(String resourceGroupName, + String dataProductName, DataProductUpdate properties, Context context); + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataProductInner update(String resourceGroupName, String dataProductName, DataProductUpdate properties); + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataProductInner update(String resourceGroupName, String dataProductName, DataProductUpdate properties, + Context context); + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String dataProductName); + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String dataProductName, Context context); + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String dataProductName); + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String dataProductName, Context context); + + /** + * Assign role to the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response addUserRoleWithResponse(String resourceGroupName, String dataProductName, + RoleAssignmentCommonProperties body, Context context); + + /** + * Assign role to the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RoleAssignmentDetailInner addUserRole(String resourceGroupName, String dataProductName, + RoleAssignmentCommonProperties body); + + /** + * Generate sas token for storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generateStorageAccountSasTokenWithResponse(String resourceGroupName, + String dataProductName, AccountSas body, Context context); + + /** + * Generate sas token for storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccountSasTokenInner generateStorageAccountSasToken(String resourceGroupName, String dataProductName, + AccountSas body); + + /** + * List user roles associated with the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listRolesAssignmentsWithResponse(String resourceGroupName, + String dataProductName, Object body, Context context); + + /** + * List user roles associated with the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ListRoleAssignmentsInner listRolesAssignments(String resourceGroupName, String dataProductName, Object body); + + /** + * Remove role from the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response removeUserRoleWithResponse(String resourceGroupName, String dataProductName, + RoleAssignmentDetailInner body, Context context); + + /** + * Remove role from the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void removeUserRole(String resourceGroupName, String dataProductName, RoleAssignmentDetailInner body); + + /** + * Initiate key rotation on Data Product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response rotateKeyWithResponse(String resourceGroupName, String dataProductName, KeyVaultInfo body, + Context context); + + /** + * Initiate key rotation on Data Product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateKey(String resourceGroupName, String dataProductName, KeyVaultInfo body); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataTypesClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataTypesClient.java new file mode 100644 index 000000000000..11b92d53bb2d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataTypesClient.java @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.models.ContainerSasTokenInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner; +import com.azure.resourcemanager.networkanalytics.models.ContainerSaS; +import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdate; + +/** + * An instance of this class provides access to all the operations defined in DataTypesClient. + */ +public interface DataTypesClient { + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDataProduct(String resourceGroupName, String dataProductName); + + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDataProduct(String resourceGroupName, String dataProductName, Context context); + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String dataProductName, String dataTypeName, + Context context); + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataTypeInner get(String resourceGroupName, String dataProductName, String dataTypeName); + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataTypeInner> beginCreate(String resourceGroupName, String dataProductName, + String dataTypeName, DataTypeInner resource); + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataTypeInner> beginCreate(String resourceGroupName, String dataProductName, + String dataTypeName, DataTypeInner resource, Context context); + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataTypeInner create(String resourceGroupName, String dataProductName, String dataTypeName, DataTypeInner resource); + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataTypeInner create(String resourceGroupName, String dataProductName, String dataTypeName, DataTypeInner resource, + Context context); + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataTypeInner> beginUpdate(String resourceGroupName, String dataProductName, + String dataTypeName, DataTypeUpdate properties); + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataTypeInner> beginUpdate(String resourceGroupName, String dataProductName, + String dataTypeName, DataTypeUpdate properties, Context context); + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataTypeInner update(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeUpdate properties); + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataTypeInner update(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeUpdate properties, Context context); + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String dataProductName, + String dataTypeName); + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String dataProductName, + String dataTypeName, Context context); + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String dataProductName, String dataTypeName); + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String dataProductName, String dataTypeName, Context context); + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteData(String resourceGroupName, String dataProductName, + String dataTypeName, Object body); + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteData(String resourceGroupName, String dataProductName, + String dataTypeName, Object body, Context context); + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body); + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body, + Context context); + + /** + * Generate sas token for storage container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generateStorageContainerSasTokenWithResponse(String resourceGroupName, + String dataProductName, String dataTypeName, ContainerSaS body, Context context); + + /** + * Generate sas token for storage container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerSasTokenInner generateStorageContainerSasToken(String resourceGroupName, String dataProductName, + String dataTypeName, ContainerSaS body); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsMgmtClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsMgmtClient.java new file mode 100644 index 000000000000..4346afd2cfc2 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsMgmtClient.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for NetworkAnalyticsMgmtClient class. + */ +public interface NetworkAnalyticsMgmtClient { + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the DataProductsClient object to access its operations. + * + * @return the DataProductsClient object. + */ + DataProductsClient getDataProducts(); + + /** + * Gets the DataProductsCatalogsClient object to access its operations. + * + * @return the DataProductsCatalogsClient object. + */ + DataProductsCatalogsClient getDataProductsCatalogs(); + + /** + * Gets the DataTypesClient object to access its operations. + * + * @return the DataTypesClient object. + */ + DataTypesClient getDataTypes(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java new file mode 100644 index 000000000000..16e81341f5da --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public interface OperationsClient { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/AccountSasTokenInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/AccountSasTokenInner.java new file mode 100644 index 000000000000..0f1de881cd87 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/AccountSasTokenInner.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of storage account sas token . + */ +@Fluent +public final class AccountSasTokenInner { + /* + * Field to specify storage account sas token. + */ + @JsonProperty(value = "storageAccountSasToken") + private String storageAccountSasToken; + + /** + * Creates an instance of AccountSasTokenInner class. + */ + public AccountSasTokenInner() { + } + + /** + * Get the storageAccountSasToken property: Field to specify storage account sas token. + * + * @return the storageAccountSasToken value. + */ + public String storageAccountSasToken() { + return this.storageAccountSasToken; + } + + /** + * Set the storageAccountSasToken property: Field to specify storage account sas token. + * + * @param storageAccountSasToken the storageAccountSasToken value to set. + * @return the AccountSasTokenInner object itself. + */ + public AccountSasTokenInner withStorageAccountSasToken(String storageAccountSasToken) { + this.storageAccountSasToken = storageAccountSasToken; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccountSasToken() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property storageAccountSasToken in model AccountSasTokenInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AccountSasTokenInner.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ContainerSasTokenInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ContainerSasTokenInner.java new file mode 100644 index 000000000000..2605e2bdeb8f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ContainerSasTokenInner.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of storage container account sas token . + */ +@Fluent +public final class ContainerSasTokenInner { + /* + * Field to specify storage container sas token. + */ + @JsonProperty(value = "storageContainerSasToken") + private String storageContainerSasToken; + + /** + * Creates an instance of ContainerSasTokenInner class. + */ + public ContainerSasTokenInner() { + } + + /** + * Get the storageContainerSasToken property: Field to specify storage container sas token. + * + * @return the storageContainerSasToken value. + */ + public String storageContainerSasToken() { + return this.storageContainerSasToken; + } + + /** + * Set the storageContainerSasToken property: Field to specify storage container sas token. + * + * @param storageContainerSasToken the storageContainerSasToken value to set. + * @return the ContainerSasTokenInner object itself. + */ + public ContainerSasTokenInner withStorageContainerSasToken(String storageContainerSasToken) { + this.storageContainerSasToken = storageContainerSasToken; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageContainerSasToken() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property storageContainerSasToken in model ContainerSasTokenInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerSasTokenInner.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductInner.java new file mode 100644 index 000000000000..638b2cd83b66 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductInner.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.models.DataProductProperties; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The data product resource. + */ +@Fluent +public final class DataProductInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DataProductProperties properties; + + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DataProductInner class. + */ + public DataProductInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public DataProductProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the DataProductInner object itself. + */ + public DataProductInner withProperties(DataProductProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the DataProductInner object itself. + */ + public DataProductInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ + @Override + public DataProductInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataProductInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductsCatalogInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductsCatalogInner.java new file mode 100644 index 000000000000..b4e3467554dd --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataProductsCatalogInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The data catalog resource. + */ +@Fluent +public final class DataProductsCatalogInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DataProductsCatalogProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DataProductsCatalogInner class. + */ + public DataProductsCatalogInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public DataProductsCatalogProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the DataProductsCatalogInner object itself. + */ + public DataProductsCatalogInner withProperties(DataProductsCatalogProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataTypeInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataTypeInner.java new file mode 100644 index 000000000000..414722f2786f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataTypeInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The data type resource. + */ +@Fluent +public final class DataTypeInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DataTypeProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DataTypeInner class. + */ + public DataTypeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public DataTypeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the DataTypeInner object itself. + */ + public DataTypeInner withProperties(DataTypeProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ListRoleAssignmentsInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ListRoleAssignmentsInner.java new file mode 100644 index 000000000000..869b0e05bd1c --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/ListRoleAssignmentsInner.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * list role assignments. + */ +@Fluent +public final class ListRoleAssignmentsInner { + /* + * Count of role assignments. + */ + @JsonProperty(value = "count", required = true) + private int count; + + /* + * list of role assignments + */ + @JsonProperty(value = "roleAssignmentResponse", required = true) + private List roleAssignmentResponse; + + /** + * Creates an instance of ListRoleAssignmentsInner class. + */ + public ListRoleAssignmentsInner() { + } + + /** + * Get the count property: Count of role assignments. + * + * @return the count value. + */ + public int count() { + return this.count; + } + + /** + * Set the count property: Count of role assignments. + * + * @param count the count value to set. + * @return the ListRoleAssignmentsInner object itself. + */ + public ListRoleAssignmentsInner withCount(int count) { + this.count = count; + return this; + } + + /** + * Get the roleAssignmentResponse property: list of role assignments. + * + * @return the roleAssignmentResponse value. + */ + public List roleAssignmentResponse() { + return this.roleAssignmentResponse; + } + + /** + * Set the roleAssignmentResponse property: list of role assignments. + * + * @param roleAssignmentResponse the roleAssignmentResponse value to set. + * @return the ListRoleAssignmentsInner object itself. + */ + public ListRoleAssignmentsInner withRoleAssignmentResponse(List roleAssignmentResponse) { + this.roleAssignmentResponse = roleAssignmentResponse; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (roleAssignmentResponse() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property roleAssignmentResponse in model ListRoleAssignmentsInner")); + } else { + roleAssignmentResponse().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ListRoleAssignmentsInner.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java new file mode 100644 index 000000000000..a5190e2372fc --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.networkanalytics.models.ActionType; +import com.azure.resourcemanager.networkanalytics.models.OperationDisplay; +import com.azure.resourcemanager.networkanalytics.models.Origin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * REST API Operation + * + * Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Fluent +public final class OperationInner { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /* + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; + + /** + * Creates an instance of OperationInner class. + */ + public OperationInner() { + } + + /** + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + public ActionType actionType() { + return this.actionType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/RoleAssignmentDetailInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/RoleAssignmentDetailInner.java new file mode 100644 index 000000000000..f434d38ef789 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/RoleAssignmentDetailInner.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The details for role assignment response. + */ +@Fluent +public final class RoleAssignmentDetailInner { + /* + * Role Id of the Built-In Role + */ + @JsonProperty(value = "roleId", required = true) + private String roleId; + + /* + * Object ID of the AAD principal or security-group. + */ + @JsonProperty(value = "principalId", required = true) + private String principalId; + + /* + * User name. + */ + @JsonProperty(value = "userName", required = true) + private String username; + + /* + * Data Type Scope at which the role assignment is created. + */ + @JsonProperty(value = "dataTypeScope", required = true) + private List dataTypeScope; + + /* + * Type of the principal Id: User, Group or ServicePrincipal + */ + @JsonProperty(value = "principalType", required = true) + private String principalType; + + /* + * Data Product role to be assigned to a user. + */ + @JsonProperty(value = "role", required = true) + private DataProductUserRole role; + + /* + * Id of role assignment request + */ + @JsonProperty(value = "roleAssignmentId", required = true) + private String roleAssignmentId; + + /** + * Creates an instance of RoleAssignmentDetailInner class. + */ + public RoleAssignmentDetailInner() { + } + + /** + * Get the roleId property: Role Id of the Built-In Role. + * + * @return the roleId value. + */ + public String roleId() { + return this.roleId; + } + + /** + * Set the roleId property: Role Id of the Built-In Role. + * + * @param roleId the roleId value to set. + * @return the RoleAssignmentDetailInner object itself. + */ + public RoleAssignmentDetailInner withRoleId(String roleId) { + this.roleId = roleId; + return this; + } + + /** + * Get the principalId property: Object ID of the AAD principal or security-group. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principalId property: Object ID of the AAD principal or security-group. + * + * @param principalId the principalId value to set. + * @return the RoleAssignmentDetailInner object itself. + */ + public RoleAssignmentDetailInner withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get the username property: User name. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: User name. + * + * @param username the username value to set. + * @return the RoleAssignmentDetailInner object itself. + */ + public RoleAssignmentDetailInner withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the dataTypeScope property: Data Type Scope at which the role assignment is created. + * + * @return the dataTypeScope value. + */ + public List dataTypeScope() { + return this.dataTypeScope; + } + + /** + * Set the dataTypeScope property: Data Type Scope at which the role assignment is created. + * + * @param dataTypeScope the dataTypeScope value to set. + * @return the RoleAssignmentDetailInner object itself. + */ + public RoleAssignmentDetailInner withDataTypeScope(List dataTypeScope) { + this.dataTypeScope = dataTypeScope; + return this; + } + + /** + * Get the principalType property: Type of the principal Id: User, Group or ServicePrincipal. + * + * @return the principalType value. + */ + public String principalType() { + return this.principalType; + } + + /** + * Set the principalType property: Type of the principal Id: User, Group or ServicePrincipal. + * + * @param principalType the principalType value to set. + * @return the RoleAssignmentDetailInner object itself. + */ + public RoleAssignmentDetailInner withPrincipalType(String principalType) { + this.principalType = principalType; + return this; + } + + /** + * Get the role property: Data Product role to be assigned to a user. + * + * @return the role value. + */ + public DataProductUserRole role() { + return this.role; + } + + /** + * Set the role property: Data Product role to be assigned to a user. + * + * @param role the role value to set. + * @return the RoleAssignmentDetailInner object itself. + */ + public RoleAssignmentDetailInner withRole(DataProductUserRole role) { + this.role = role; + return this; + } + + /** + * Get the roleAssignmentId property: Id of role assignment request. + * + * @return the roleAssignmentId value. + */ + public String roleAssignmentId() { + return this.roleAssignmentId; + } + + /** + * Set the roleAssignmentId property: Id of role assignment request. + * + * @param roleAssignmentId the roleAssignmentId value to set. + * @return the RoleAssignmentDetailInner object itself. + */ + public RoleAssignmentDetailInner withRoleAssignmentId(String roleAssignmentId) { + this.roleAssignmentId = roleAssignmentId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (roleId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property roleId in model RoleAssignmentDetailInner")); + } + if (principalId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property principalId in model RoleAssignmentDetailInner")); + } + if (username() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property username in model RoleAssignmentDetailInner")); + } + if (dataTypeScope() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property dataTypeScope in model RoleAssignmentDetailInner")); + } + if (principalType() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property principalType in model RoleAssignmentDetailInner")); + } + if (role() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property role in model RoleAssignmentDetailInner")); + } + if (roleAssignmentId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property roleAssignmentId in model RoleAssignmentDetailInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RoleAssignmentDetailInner.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java new file mode 100644 index 000000000000..e1f6bff75f08 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the inner data models for NetworkAnalyticsMgmtClient. + * null. + */ +package com.azure.resourcemanager.networkanalytics.fluent.models; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java new file mode 100644 index 000000000000..50e85cb1a400 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the service clients for NetworkAnalyticsMgmtClient. + * null. + */ +package com.azure.resourcemanager.networkanalytics.fluent; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/AccountSasTokenImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/AccountSasTokenImpl.java new file mode 100644 index 000000000000..58ff79c1ce03 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/AccountSasTokenImpl.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner; +import com.azure.resourcemanager.networkanalytics.models.AccountSasToken; + +public final class AccountSasTokenImpl implements AccountSasToken { + private AccountSasTokenInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + AccountSasTokenImpl(AccountSasTokenInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String storageAccountSasToken() { + return this.innerModel().storageAccountSasToken(); + } + + public AccountSasTokenInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ContainerSasTokenImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ContainerSasTokenImpl.java new file mode 100644 index 000000000000..cacf8488a1e0 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ContainerSasTokenImpl.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.resourcemanager.networkanalytics.fluent.models.ContainerSasTokenInner; +import com.azure.resourcemanager.networkanalytics.models.ContainerSasToken; + +public final class ContainerSasTokenImpl implements ContainerSasToken { + private ContainerSasTokenInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + ContainerSasTokenImpl(ContainerSasTokenInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String storageContainerSasToken() { + return this.innerModel().storageContainerSasToken(); + } + + public ContainerSasTokenInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductImpl.java new file mode 100644 index 000000000000..e06fd32b1f01 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductImpl.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.AccountSas; +import com.azure.resourcemanager.networkanalytics.models.AccountSasToken; +import com.azure.resourcemanager.networkanalytics.models.DataProduct; +import com.azure.resourcemanager.networkanalytics.models.DataProductProperties; +import com.azure.resourcemanager.networkanalytics.models.DataProductUpdate; +import com.azure.resourcemanager.networkanalytics.models.DataProductUpdateProperties; +import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo; +import com.azure.resourcemanager.networkanalytics.models.ListRoleAssignments; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentDetail; +import java.util.Collections; +import java.util.Map; + +public final class DataProductImpl implements DataProduct, DataProduct.Definition, DataProduct.Update { + private DataProductInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public DataProductProperties properties() { + return this.innerModel().properties(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DataProductInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String dataProductName; + + private DataProductUpdate updateProperties; + + public DataProductImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public DataProduct create() { + this.innerObject = serviceManager.serviceClient() + .getDataProducts() + .create(resourceGroupName, dataProductName, this.innerModel(), Context.NONE); + return this; + } + + public DataProduct create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDataProducts() + .create(resourceGroupName, dataProductName, this.innerModel(), context); + return this; + } + + DataProductImpl(String name, com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = new DataProductInner(); + this.serviceManager = serviceManager; + this.dataProductName = name; + } + + public DataProductImpl update() { + this.updateProperties = new DataProductUpdate(); + return this; + } + + public DataProduct apply() { + this.innerObject = serviceManager.serviceClient() + .getDataProducts() + .update(resourceGroupName, dataProductName, updateProperties, Context.NONE); + return this; + } + + public DataProduct apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDataProducts() + .update(resourceGroupName, dataProductName, updateProperties, context); + return this; + } + + DataProductImpl(DataProductInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.dataProductName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dataProducts"); + } + + public DataProduct refresh() { + this.innerObject = serviceManager.serviceClient() + .getDataProducts() + .getByResourceGroupWithResponse(resourceGroupName, dataProductName, Context.NONE) + .getValue(); + return this; + } + + public DataProduct refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDataProducts() + .getByResourceGroupWithResponse(resourceGroupName, dataProductName, context) + .getValue(); + return this; + } + + public Response addUserRoleWithResponse(RoleAssignmentCommonProperties body, + Context context) { + return serviceManager.dataProducts().addUserRoleWithResponse(resourceGroupName, dataProductName, body, context); + } + + public RoleAssignmentDetail addUserRole(RoleAssignmentCommonProperties body) { + return serviceManager.dataProducts().addUserRole(resourceGroupName, dataProductName, body); + } + + public Response generateStorageAccountSasTokenWithResponse(AccountSas body, Context context) { + return serviceManager.dataProducts() + .generateStorageAccountSasTokenWithResponse(resourceGroupName, dataProductName, body, context); + } + + public AccountSasToken generateStorageAccountSasToken(AccountSas body) { + return serviceManager.dataProducts().generateStorageAccountSasToken(resourceGroupName, dataProductName, body); + } + + public Response listRolesAssignmentsWithResponse(Object body, Context context) { + return serviceManager.dataProducts() + .listRolesAssignmentsWithResponse(resourceGroupName, dataProductName, body, context); + } + + public ListRoleAssignments listRolesAssignments(Object body) { + return serviceManager.dataProducts().listRolesAssignments(resourceGroupName, dataProductName, body); + } + + public Response removeUserRoleWithResponse(RoleAssignmentDetailInner body, Context context) { + return serviceManager.dataProducts() + .removeUserRoleWithResponse(resourceGroupName, dataProductName, body, context); + } + + public void removeUserRole(RoleAssignmentDetailInner body) { + serviceManager.dataProducts().removeUserRole(resourceGroupName, dataProductName, body); + } + + public Response rotateKeyWithResponse(KeyVaultInfo body, Context context) { + return serviceManager.dataProducts().rotateKeyWithResponse(resourceGroupName, dataProductName, body, context); + } + + public void rotateKey(KeyVaultInfo body) { + serviceManager.dataProducts().rotateKey(resourceGroupName, dataProductName, body); + } + + public DataProductImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public DataProductImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public DataProductImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public DataProductImpl withProperties(DataProductProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public DataProductImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateProperties.withIdentity(identity); + return this; + } + } + + public DataProductImpl withProperties(DataProductUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogImpl.java new file mode 100644 index 000000000000..22546497f6bd --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalog; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogProperties; + +public final class DataProductsCatalogImpl implements DataProductsCatalog { + private DataProductsCatalogInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + DataProductsCatalogImpl(DataProductsCatalogInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public DataProductsCatalogProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DataProductsCatalogInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsClientImpl.java new file mode 100644 index 000000000000..3afa90e3fb9f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsClientImpl.java @@ -0,0 +1,570 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.networkanalytics.fluent.DataProductsCatalogsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DataProductsCatalogsClient. + */ +public final class DataProductsCatalogsClientImpl implements DataProductsCatalogsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DataProductsCatalogsService service; + + /** + * The service client containing this operation class. + */ + private final NetworkAnalyticsMgmtClientImpl client; + + /** + * Initializes an instance of DataProductsCatalogsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DataProductsCatalogsClientImpl(NetworkAnalyticsMgmtClientImpl client) { + this.service = RestProxy.create(DataProductsCatalogsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetworkAnalyticsMgmtClientDataProductsCatalogs to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetworkAnalyticsMgmt") + public interface DataProductsCatalogsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List data catalog by subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List data catalog by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List data catalog by subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List data catalog by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List data catalog by subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List data catalog by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data catalog resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data catalog resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data catalog resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data catalog resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, context).block(); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data catalog resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataProductsCatalogInner getByResourceGroup(String resourceGroupName) { + return getByResourceGroupWithResponse(resourceGroupName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsImpl.java new file mode 100644 index 000000000000..f3ae8567bc28 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsCatalogsImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.DataProductsCatalogsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalog; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogs; + +public final class DataProductsCatalogsImpl implements DataProductsCatalogs { + private static final ClientLogger LOGGER = new ClientLogger(DataProductsCatalogsImpl.class); + + private final DataProductsCatalogsClient innerClient; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + public DataProductsCatalogsImpl(DataProductsCatalogsClient innerClient, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataProductsCatalogImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataProductsCatalogImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataProductsCatalogImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataProductsCatalogImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DataProductsCatalogImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataProductsCatalog getByResourceGroup(String resourceGroupName) { + DataProductsCatalogInner inner = this.serviceClient().getByResourceGroup(resourceGroupName); + if (inner != null) { + return new DataProductsCatalogImpl(inner, this.manager()); + } else { + return null; + } + } + + private DataProductsCatalogsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsClientImpl.java new file mode 100644 index 000000000000..58bdfc22321f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsClientImpl.java @@ -0,0 +1,2033 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.DataProductsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.AccountSas; +import com.azure.resourcemanager.networkanalytics.models.DataProductListResult; +import com.azure.resourcemanager.networkanalytics.models.DataProductUpdate; +import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DataProductsClient. + */ +public final class DataProductsClientImpl implements DataProductsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DataProductsService service; + + /** + * The service client containing this operation class. + */ + private final NetworkAnalyticsMgmtClientImpl client; + + /** + * Initializes an instance of DataProductsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DataProductsClientImpl(NetworkAnalyticsMgmtClientImpl client) { + this.service + = RestProxy.create(DataProductsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetworkAnalyticsMgmtClientDataProducts to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetworkAnalyticsMgmt") + public interface DataProductsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataProducts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, + @BodyParam("application/json") DataProductInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, + @BodyParam("application/json") DataProductUpdate properties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/addUserRole") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> addUserRole(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, + @BodyParam("application/json") RoleAssignmentCommonProperties body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/generateStorageAccountSasToken") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateStorageAccountSasToken(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @BodyParam("application/json") AccountSas body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/listRolesAssignments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listRolesAssignments(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @BodyParam("application/json") Object body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/removeUserRole") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> removeUserRole(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, + @BodyParam("application/json") RoleAssignmentDetailInner body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/rotateKey") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> rotateKey(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @BodyParam("application/json") KeyVaultInfo body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List data products by subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List data products by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List data products by subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List data products by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List data products by subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List data products by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Retrieve data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String dataProductName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieve data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String dataProductName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, accept, context); + } + + /** + * Retrieve data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String dataProductName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, dataProductName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieve data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String dataProductName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, dataProductName, context).block(); + } + + /** + * Retrieve data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataProductInner getByResourceGroup(String resourceGroupName, String dataProductName) { + return getByResourceGroupWithResponse(resourceGroupName, dataProductName, Context.NONE).getValue(); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String dataProductName, + DataProductInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, resource, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String dataProductName, + DataProductInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dataProductName, resource, accept, context); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataProductInner> beginCreateAsync(String resourceGroupName, + String dataProductName, DataProductInner resource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, dataProductName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataProductInner.class, DataProductInner.class, this.client.getContext()); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataProductInner> beginCreateAsync(String resourceGroupName, + String dataProductName, DataProductInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, dataProductName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataProductInner.class, DataProductInner.class, context); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataProductInner> beginCreate(String resourceGroupName, + String dataProductName, DataProductInner resource) { + return this.beginCreateAsync(resourceGroupName, dataProductName, resource).getSyncPoller(); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataProductInner> beginCreate(String resourceGroupName, + String dataProductName, DataProductInner resource, Context context) { + return this.beginCreateAsync(resourceGroupName, dataProductName, resource, context).getSyncPoller(); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String dataProductName, + DataProductInner resource) { + return beginCreateAsync(resourceGroupName, dataProductName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String dataProductName, + DataProductInner resource, Context context) { + return beginCreateAsync(resourceGroupName, dataProductName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataProductInner create(String resourceGroupName, String dataProductName, DataProductInner resource) { + return createAsync(resourceGroupName, dataProductName, resource).block(); + } + + /** + * Create data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataProductInner create(String resourceGroupName, String dataProductName, DataProductInner resource, + Context context) { + return createAsync(resourceGroupName, dataProductName, resource, context).block(); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String dataProductName, + DataProductUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, properties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String dataProductName, + DataProductUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dataProductName, properties, accept, context); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataProductInner> beginUpdateAsync(String resourceGroupName, + String dataProductName, DataProductUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, dataProductName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataProductInner.class, DataProductInner.class, this.client.getContext()); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataProductInner> beginUpdateAsync(String resourceGroupName, + String dataProductName, DataProductUpdate properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, dataProductName, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataProductInner.class, DataProductInner.class, context); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataProductInner> beginUpdate(String resourceGroupName, + String dataProductName, DataProductUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, dataProductName, properties).getSyncPoller(); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataProductInner> beginUpdate(String resourceGroupName, + String dataProductName, DataProductUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, dataProductName, properties, context).getSyncPoller(); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String dataProductName, + DataProductUpdate properties) { + return beginUpdateAsync(resourceGroupName, dataProductName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String dataProductName, + DataProductUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, dataProductName, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataProductInner update(String resourceGroupName, String dataProductName, DataProductUpdate properties) { + return updateAsync(resourceGroupName, dataProductName, properties).block(); + } + + /** + * Update data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataProductInner update(String resourceGroupName, String dataProductName, DataProductUpdate properties, + Context context) { + return updateAsync(resourceGroupName, dataProductName, properties, context).block(); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String dataProductName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String dataProductName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dataProductName, accept, context); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dataProductName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, dataProductName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dataProductName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, dataProductName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String dataProductName) { + return this.beginDeleteAsync(resourceGroupName, dataProductName).getSyncPoller(); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String dataProductName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, dataProductName, context).getSyncPoller(); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String dataProductName) { + return beginDeleteAsync(resourceGroupName, dataProductName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String dataProductName, Context context) { + return beginDeleteAsync(resourceGroupName, dataProductName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String dataProductName) { + deleteAsync(resourceGroupName, dataProductName).block(); + } + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String dataProductName, Context context) { + deleteAsync(resourceGroupName, dataProductName, context).block(); + } + + /** + * Assign role to the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> addUserRoleWithResponseAsync(String resourceGroupName, + String dataProductName, RoleAssignmentCommonProperties body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.addUserRole(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Assign role to the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> addUserRoleWithResponseAsync(String resourceGroupName, + String dataProductName, RoleAssignmentCommonProperties body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.addUserRole(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context); + } + + /** + * Assign role to the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addUserRoleAsync(String resourceGroupName, String dataProductName, + RoleAssignmentCommonProperties body) { + return addUserRoleWithResponseAsync(resourceGroupName, dataProductName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Assign role to the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response addUserRoleWithResponse(String resourceGroupName, String dataProductName, + RoleAssignmentCommonProperties body, Context context) { + return addUserRoleWithResponseAsync(resourceGroupName, dataProductName, body, context).block(); + } + + /** + * Assign role to the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetailInner addUserRole(String resourceGroupName, String dataProductName, + RoleAssignmentCommonProperties body) { + return addUserRoleWithResponse(resourceGroupName, dataProductName, body, Context.NONE).getValue(); + } + + /** + * Generate sas token for storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateStorageAccountSasTokenWithResponseAsync( + String resourceGroupName, String dataProductName, AccountSas body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.generateStorageAccountSasToken(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate sas token for storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateStorageAccountSasTokenWithResponseAsync( + String resourceGroupName, String dataProductName, AccountSas body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.generateStorageAccountSasToken(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context); + } + + /** + * Generate sas token for storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateStorageAccountSasTokenAsync(String resourceGroupName, + String dataProductName, AccountSas body) { + return generateStorageAccountSasTokenWithResponseAsync(resourceGroupName, dataProductName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate sas token for storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateStorageAccountSasTokenWithResponse(String resourceGroupName, + String dataProductName, AccountSas body, Context context) { + return generateStorageAccountSasTokenWithResponseAsync(resourceGroupName, dataProductName, body, context) + .block(); + } + + /** + * Generate sas token for storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccountSasTokenInner generateStorageAccountSasToken(String resourceGroupName, String dataProductName, + AccountSas body) { + return generateStorageAccountSasTokenWithResponse(resourceGroupName, dataProductName, body, Context.NONE) + .getValue(); + } + + /** + * List user roles associated with the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRolesAssignmentsWithResponseAsync(String resourceGroupName, + String dataProductName, Object body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listRolesAssignments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List user roles associated with the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRolesAssignmentsWithResponseAsync(String resourceGroupName, + String dataProductName, Object body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listRolesAssignments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context); + } + + /** + * List user roles associated with the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listRolesAssignmentsAsync(String resourceGroupName, String dataProductName, + Object body) { + return listRolesAssignmentsWithResponseAsync(resourceGroupName, dataProductName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List user roles associated with the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listRolesAssignmentsWithResponse(String resourceGroupName, + String dataProductName, Object body, Context context) { + return listRolesAssignmentsWithResponseAsync(resourceGroupName, dataProductName, body, context).block(); + } + + /** + * List user roles associated with the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListRoleAssignmentsInner listRolesAssignments(String resourceGroupName, String dataProductName, + Object body) { + return listRolesAssignmentsWithResponse(resourceGroupName, dataProductName, body, Context.NONE).getValue(); + } + + /** + * Remove role from the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> removeUserRoleWithResponseAsync(String resourceGroupName, String dataProductName, + RoleAssignmentDetailInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.removeUserRole(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove role from the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> removeUserRoleWithResponseAsync(String resourceGroupName, String dataProductName, + RoleAssignmentDetailInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.removeUserRole(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context); + } + + /** + * Remove role from the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono removeUserRoleAsync(String resourceGroupName, String dataProductName, + RoleAssignmentDetailInner body) { + return removeUserRoleWithResponseAsync(resourceGroupName, dataProductName, body) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Remove role from the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response removeUserRoleWithResponse(String resourceGroupName, String dataProductName, + RoleAssignmentDetailInner body, Context context) { + return removeUserRoleWithResponseAsync(resourceGroupName, dataProductName, body, context).block(); + } + + /** + * Remove role from the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void removeUserRole(String resourceGroupName, String dataProductName, RoleAssignmentDetailInner body) { + removeUserRoleWithResponse(resourceGroupName, dataProductName, body, Context.NONE); + } + + /** + * Initiate key rotation on Data Product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> rotateKeyWithResponseAsync(String resourceGroupName, String dataProductName, + KeyVaultInfo body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.rotateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Initiate key rotation on Data Product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> rotateKeyWithResponseAsync(String resourceGroupName, String dataProductName, + KeyVaultInfo body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.rotateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, body, accept, context); + } + + /** + * Initiate key rotation on Data Product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rotateKeyAsync(String resourceGroupName, String dataProductName, KeyVaultInfo body) { + return rotateKeyWithResponseAsync(resourceGroupName, dataProductName, body).flatMap(ignored -> Mono.empty()); + } + + /** + * Initiate key rotation on Data Product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response rotateKeyWithResponse(String resourceGroupName, String dataProductName, KeyVaultInfo body, + Context context) { + return rotateKeyWithResponseAsync(resourceGroupName, dataProductName, body, context).block(); + } + + /** + * Initiate key rotation on Data Product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateKey(String resourceGroupName, String dataProductName, KeyVaultInfo body) { + rotateKeyWithResponse(resourceGroupName, dataProductName, body, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsImpl.java new file mode 100644 index 000000000000..391b8ac2fd95 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataProductsImpl.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.DataProductsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.AccountSas; +import com.azure.resourcemanager.networkanalytics.models.AccountSasToken; +import com.azure.resourcemanager.networkanalytics.models.DataProduct; +import com.azure.resourcemanager.networkanalytics.models.DataProducts; +import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo; +import com.azure.resourcemanager.networkanalytics.models.ListRoleAssignments; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentDetail; + +public final class DataProductsImpl implements DataProducts { + private static final ClientLogger LOGGER = new ClientLogger(DataProductsImpl.class); + + private final DataProductsClient innerClient; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + public DataProductsImpl(DataProductsClient innerClient, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataProductImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataProductImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataProductImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataProductImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String dataProductName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, dataProductName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DataProductImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataProduct getByResourceGroup(String resourceGroupName, String dataProductName) { + DataProductInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, dataProductName); + if (inner != null) { + return new DataProductImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String dataProductName) { + this.serviceClient().delete(resourceGroupName, dataProductName); + } + + public void delete(String resourceGroupName, String dataProductName, Context context) { + this.serviceClient().delete(resourceGroupName, dataProductName, context); + } + + public Response addUserRoleWithResponse(String resourceGroupName, String dataProductName, + RoleAssignmentCommonProperties body, Context context) { + Response inner + = this.serviceClient().addUserRoleWithResponse(resourceGroupName, dataProductName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RoleAssignmentDetailImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RoleAssignmentDetail addUserRole(String resourceGroupName, String dataProductName, + RoleAssignmentCommonProperties body) { + RoleAssignmentDetailInner inner = this.serviceClient().addUserRole(resourceGroupName, dataProductName, body); + if (inner != null) { + return new RoleAssignmentDetailImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response generateStorageAccountSasTokenWithResponse(String resourceGroupName, + String dataProductName, AccountSas body, Context context) { + Response inner = this.serviceClient() + .generateStorageAccountSasTokenWithResponse(resourceGroupName, dataProductName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AccountSasTokenImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AccountSasToken generateStorageAccountSasToken(String resourceGroupName, String dataProductName, + AccountSas body) { + AccountSasTokenInner inner + = this.serviceClient().generateStorageAccountSasToken(resourceGroupName, dataProductName, body); + if (inner != null) { + return new AccountSasTokenImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listRolesAssignmentsWithResponse(String resourceGroupName, + String dataProductName, Object body, Context context) { + Response inner + = this.serviceClient().listRolesAssignmentsWithResponse(resourceGroupName, dataProductName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ListRoleAssignmentsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ListRoleAssignments listRolesAssignments(String resourceGroupName, String dataProductName, Object body) { + ListRoleAssignmentsInner inner + = this.serviceClient().listRolesAssignments(resourceGroupName, dataProductName, body); + if (inner != null) { + return new ListRoleAssignmentsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response removeUserRoleWithResponse(String resourceGroupName, String dataProductName, + RoleAssignmentDetailInner body, Context context) { + return this.serviceClient().removeUserRoleWithResponse(resourceGroupName, dataProductName, body, context); + } + + public void removeUserRole(String resourceGroupName, String dataProductName, RoleAssignmentDetailInner body) { + this.serviceClient().removeUserRole(resourceGroupName, dataProductName, body); + } + + public Response rotateKeyWithResponse(String resourceGroupName, String dataProductName, KeyVaultInfo body, + Context context) { + return this.serviceClient().rotateKeyWithResponse(resourceGroupName, dataProductName, body, context); + } + + public void rotateKey(String resourceGroupName, String dataProductName, KeyVaultInfo body) { + this.serviceClient().rotateKey(resourceGroupName, dataProductName, body); + } + + public DataProduct getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dataProductName = ResourceManagerUtils.getValueFromIdByName(id, "dataProducts"); + if (dataProductName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, dataProductName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dataProductName = ResourceManagerUtils.getValueFromIdByName(id, "dataProducts"); + if (dataProductName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, dataProductName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dataProductName = ResourceManagerUtils.getValueFromIdByName(id, "dataProducts"); + if (dataProductName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id))); + } + this.delete(resourceGroupName, dataProductName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dataProductName = ResourceManagerUtils.getValueFromIdByName(id, "dataProducts"); + if (dataProductName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id))); + } + this.delete(resourceGroupName, dataProductName, context); + } + + private DataProductsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } + + public DataProductImpl define(String name) { + return new DataProductImpl(name, this.manager()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypeImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypeImpl.java new file mode 100644 index 000000000000..e60ed1002001 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypeImpl.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner; +import com.azure.resourcemanager.networkanalytics.models.ContainerSaS; +import com.azure.resourcemanager.networkanalytics.models.ContainerSasToken; +import com.azure.resourcemanager.networkanalytics.models.DataType; +import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties; +import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdate; +import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdateProperties; + +public final class DataTypeImpl implements DataType, DataType.Definition, DataType.Update { + private DataTypeInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public DataTypeProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DataTypeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String dataProductName; + + private String dataTypeName; + + private DataTypeUpdate updateProperties; + + public DataTypeImpl withExistingDataProduct(String resourceGroupName, String dataProductName) { + this.resourceGroupName = resourceGroupName; + this.dataProductName = dataProductName; + return this; + } + + public DataType create() { + this.innerObject = serviceManager.serviceClient() + .getDataTypes() + .create(resourceGroupName, dataProductName, dataTypeName, this.innerModel(), Context.NONE); + return this; + } + + public DataType create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDataTypes() + .create(resourceGroupName, dataProductName, dataTypeName, this.innerModel(), context); + return this; + } + + DataTypeImpl(String name, com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = new DataTypeInner(); + this.serviceManager = serviceManager; + this.dataTypeName = name; + } + + public DataTypeImpl update() { + this.updateProperties = new DataTypeUpdate(); + return this; + } + + public DataType apply() { + this.innerObject = serviceManager.serviceClient() + .getDataTypes() + .update(resourceGroupName, dataProductName, dataTypeName, updateProperties, Context.NONE); + return this; + } + + public DataType apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDataTypes() + .update(resourceGroupName, dataProductName, dataTypeName, updateProperties, context); + return this; + } + + DataTypeImpl(DataTypeInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.dataProductName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dataProducts"); + this.dataTypeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dataTypes"); + } + + public DataType refresh() { + this.innerObject = serviceManager.serviceClient() + .getDataTypes() + .getWithResponse(resourceGroupName, dataProductName, dataTypeName, Context.NONE) + .getValue(); + return this; + } + + public DataType refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDataTypes() + .getWithResponse(resourceGroupName, dataProductName, dataTypeName, context) + .getValue(); + return this; + } + + public void deleteData(Object body) { + serviceManager.dataTypes().deleteData(resourceGroupName, dataProductName, dataTypeName, body); + } + + public void deleteData(Object body, Context context) { + serviceManager.dataTypes().deleteData(resourceGroupName, dataProductName, dataTypeName, body, context); + } + + public Response generateStorageContainerSasTokenWithResponse(ContainerSaS body, + Context context) { + return serviceManager.dataTypes() + .generateStorageContainerSasTokenWithResponse(resourceGroupName, dataProductName, dataTypeName, body, + context); + } + + public ContainerSasToken generateStorageContainerSasToken(ContainerSaS body) { + return serviceManager.dataTypes() + .generateStorageContainerSasToken(resourceGroupName, dataProductName, dataTypeName, body); + } + + public DataTypeImpl withProperties(DataTypeProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public DataTypeImpl withProperties(DataTypeUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesClientImpl.java new file mode 100644 index 000000000000..bd23cfdcc76b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesClientImpl.java @@ -0,0 +1,1615 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.DataTypesClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.ContainerSasTokenInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner; +import com.azure.resourcemanager.networkanalytics.models.ContainerSaS; +import com.azure.resourcemanager.networkanalytics.models.DataTypeListResult; +import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DataTypesClient. + */ +public final class DataTypesClientImpl implements DataTypesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DataTypesService service; + + /** + * The service client containing this operation class. + */ + private final NetworkAnalyticsMgmtClientImpl client; + + /** + * Initializes an instance of DataTypesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DataTypesClientImpl(NetworkAnalyticsMgmtClientImpl client) { + this.service + = RestProxy.create(DataTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetworkAnalyticsMgmtClientDataTypes to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetworkAnalyticsMgmt") + public interface DataTypesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDataProduct(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName, + @BodyParam("application/json") DataTypeInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName, + @BodyParam("application/json") DataTypeUpdate properties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}/deleteData") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteData(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName, + @BodyParam("application/json") Object body, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}/generateStorageContainerSasToken") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateStorageContainerSasToken(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataProductName") String dataProductName, @PathParam("dataTypeName") String dataTypeName, + @BodyParam("application/json") ContainerSaS body, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDataProductNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDataProductSinglePageAsync(String resourceGroupName, + String dataProductName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByDataProduct(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDataProductSinglePageAsync(String resourceGroupName, + String dataProductName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByDataProduct(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dataProductName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDataProductAsync(String resourceGroupName, String dataProductName) { + return new PagedFlux<>(() -> listByDataProductSinglePageAsync(resourceGroupName, dataProductName), + nextLink -> listByDataProductNextSinglePageAsync(nextLink)); + } + + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDataProductAsync(String resourceGroupName, String dataProductName, + Context context) { + return new PagedFlux<>(() -> listByDataProductSinglePageAsync(resourceGroupName, dataProductName, context), + nextLink -> listByDataProductNextSinglePageAsync(nextLink, context)); + } + + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDataProduct(String resourceGroupName, String dataProductName) { + return new PagedIterable<>(listByDataProductAsync(resourceGroupName, dataProductName)); + } + + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDataProduct(String resourceGroupName, String dataProductName, + Context context) { + return new PagedIterable<>(listByDataProductAsync(resourceGroupName, dataProductName, context)); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String dataProductName, + String dataTypeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String dataProductName, + String dataTypeName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dataProductName, dataTypeName, accept, context); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String dataProductName, String dataTypeName) { + return getWithResponseAsync(resourceGroupName, dataProductName, dataTypeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String dataProductName, + String dataTypeName, Context context) { + return getWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, context).block(); + } + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataTypeInner get(String resourceGroupName, String dataProductName, String dataTypeName) { + return getWithResponse(resourceGroupName, dataProductName, dataTypeName, Context.NONE).getValue(); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String dataProductName, + String dataTypeName, DataTypeInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, resource, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String dataProductName, + String dataTypeName, DataTypeInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dataProductName, dataTypeName, resource, accept, context); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataTypeInner> beginCreateAsync(String resourceGroupName, + String dataProductName, String dataTypeName, DataTypeInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataTypeInner.class, DataTypeInner.class, this.client.getContext()); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataTypeInner> beginCreateAsync(String resourceGroupName, + String dataProductName, String dataTypeName, DataTypeInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataTypeInner.class, DataTypeInner.class, context); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataTypeInner> beginCreate(String resourceGroupName, + String dataProductName, String dataTypeName, DataTypeInner resource) { + return this.beginCreateAsync(resourceGroupName, dataProductName, dataTypeName, resource).getSyncPoller(); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataTypeInner> beginCreate(String resourceGroupName, + String dataProductName, String dataTypeName, DataTypeInner resource, Context context) { + return this.beginCreateAsync(resourceGroupName, dataProductName, dataTypeName, resource, context) + .getSyncPoller(); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeInner resource) { + return beginCreateAsync(resourceGroupName, dataProductName, dataTypeName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeInner resource, Context context) { + return beginCreateAsync(resourceGroupName, dataProductName, dataTypeName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataTypeInner create(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeInner resource) { + return createAsync(resourceGroupName, dataProductName, dataTypeName, resource).block(); + } + + /** + * Create data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataTypeInner create(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeInner resource, Context context) { + return createAsync(resourceGroupName, dataProductName, dataTypeName, resource, context).block(); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String dataProductName, + String dataTypeName, DataTypeUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, properties, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String dataProductName, + String dataTypeName, DataTypeUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dataProductName, dataTypeName, properties, accept, context); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataTypeInner> beginUpdateAsync(String resourceGroupName, + String dataProductName, String dataTypeName, DataTypeUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataTypeInner.class, DataTypeInner.class, this.client.getContext()); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataTypeInner> beginUpdateAsync(String resourceGroupName, + String dataProductName, String dataTypeName, DataTypeUpdate properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataTypeInner.class, DataTypeInner.class, context); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataTypeInner> beginUpdate(String resourceGroupName, + String dataProductName, String dataTypeName, DataTypeUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, dataProductName, dataTypeName, properties).getSyncPoller(); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data type resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataTypeInner> beginUpdate(String resourceGroupName, + String dataProductName, String dataTypeName, DataTypeUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, dataProductName, dataTypeName, properties, context) + .getSyncPoller(); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeUpdate properties) { + return beginUpdateAsync(resourceGroupName, dataProductName, dataTypeName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, dataProductName, dataTypeName, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataTypeInner update(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeUpdate properties) { + return updateAsync(resourceGroupName, dataProductName, dataTypeName, properties).block(); + } + + /** + * Update data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataTypeInner update(String resourceGroupName, String dataProductName, String dataTypeName, + DataTypeUpdate properties, Context context) { + return updateAsync(resourceGroupName, dataProductName, dataTypeName, properties, context).block(); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String dataProductName, + String dataTypeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String dataProductName, + String dataTypeName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dataProductName, dataTypeName, accept, context); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dataProductName, + String dataTypeName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, dataProductName, dataTypeName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dataProductName, + String dataTypeName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String dataProductName, + String dataTypeName) { + return this.beginDeleteAsync(resourceGroupName, dataProductName, dataTypeName).getSyncPoller(); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String dataProductName, + String dataTypeName, Context context) { + return this.beginDeleteAsync(resourceGroupName, dataProductName, dataTypeName, context).getSyncPoller(); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String dataProductName, String dataTypeName) { + return beginDeleteAsync(resourceGroupName, dataProductName, dataTypeName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String dataProductName, String dataTypeName, + Context context) { + return beginDeleteAsync(resourceGroupName, dataProductName, dataTypeName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String dataProductName, String dataTypeName) { + deleteAsync(resourceGroupName, dataProductName, dataTypeName).block(); + } + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String dataProductName, String dataTypeName, Context context) { + deleteAsync(resourceGroupName, dataProductName, dataTypeName, context).block(); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteDataWithResponseAsync(String resourceGroupName, + String dataProductName, String dataTypeName, Object body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteData(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, body, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteDataWithResponseAsync(String resourceGroupName, + String dataProductName, String dataTypeName, Object body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteData(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, body, accept, context); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteDataAsync(String resourceGroupName, String dataProductName, + String dataTypeName, Object body) { + Mono>> mono + = deleteDataWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteDataAsync(String resourceGroupName, String dataProductName, + String dataTypeName, Object body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteDataWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteData(String resourceGroupName, String dataProductName, + String dataTypeName, Object body) { + return this.beginDeleteDataAsync(resourceGroupName, dataProductName, dataTypeName, body).getSyncPoller(); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteData(String resourceGroupName, String dataProductName, + String dataTypeName, Object body, Context context) { + return this.beginDeleteDataAsync(resourceGroupName, dataProductName, dataTypeName, body, context) + .getSyncPoller(); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteDataAsync(String resourceGroupName, String dataProductName, String dataTypeName, + Object body) { + return beginDeleteDataAsync(resourceGroupName, dataProductName, dataTypeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteDataAsync(String resourceGroupName, String dataProductName, String dataTypeName, + Object body, Context context) { + return beginDeleteDataAsync(resourceGroupName, dataProductName, dataTypeName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body) { + deleteDataAsync(resourceGroupName, dataProductName, dataTypeName, body).block(); + } + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body, + Context context) { + deleteDataAsync(resourceGroupName, dataProductName, dataTypeName, body, context).block(); + } + + /** + * Generate sas token for storage container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateStorageContainerSasTokenWithResponseAsync( + String resourceGroupName, String dataProductName, String dataTypeName, ContainerSaS body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.generateStorageContainerSasToken(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dataProductName, + dataTypeName, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate sas token for storage container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateStorageContainerSasTokenWithResponseAsync( + String resourceGroupName, String dataProductName, String dataTypeName, ContainerSaS body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataProductName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataProductName is required and cannot be null.")); + } + if (dataTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter dataTypeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.generateStorageContainerSasToken(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dataProductName, dataTypeName, body, accept, context); + } + + /** + * Generate sas token for storage container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateStorageContainerSasTokenAsync(String resourceGroupName, + String dataProductName, String dataTypeName, ContainerSaS body) { + return generateStorageContainerSasTokenWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate sas token for storage container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateStorageContainerSasTokenWithResponse(String resourceGroupName, + String dataProductName, String dataTypeName, ContainerSaS body, Context context) { + return generateStorageContainerSasTokenWithResponseAsync(resourceGroupName, dataProductName, dataTypeName, body, + context).block(); + } + + /** + * Generate sas token for storage container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerSasTokenInner generateStorageContainerSasToken(String resourceGroupName, String dataProductName, + String dataTypeName, ContainerSaS body) { + return generateStorageContainerSasTokenWithResponse(resourceGroupName, dataProductName, dataTypeName, body, + Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDataProductNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByDataProductNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDataProductNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByDataProductNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesImpl.java new file mode 100644 index 000000000000..0d8fe1128f79 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataTypesImpl.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.DataTypesClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.ContainerSasTokenInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner; +import com.azure.resourcemanager.networkanalytics.models.ContainerSaS; +import com.azure.resourcemanager.networkanalytics.models.ContainerSasToken; +import com.azure.resourcemanager.networkanalytics.models.DataType; +import com.azure.resourcemanager.networkanalytics.models.DataTypes; + +public final class DataTypesImpl implements DataTypes { + private static final ClientLogger LOGGER = new ClientLogger(DataTypesImpl.class); + + private final DataTypesClient innerClient; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + public DataTypesImpl(DataTypesClient innerClient, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByDataProduct(String resourceGroupName, String dataProductName) { + PagedIterable inner = this.serviceClient().listByDataProduct(resourceGroupName, dataProductName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataTypeImpl(inner1, this.manager())); + } + + public PagedIterable listByDataProduct(String resourceGroupName, String dataProductName, + Context context) { + PagedIterable inner + = this.serviceClient().listByDataProduct(resourceGroupName, dataProductName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataTypeImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String dataProductName, String dataTypeName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, dataProductName, dataTypeName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DataTypeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataType get(String resourceGroupName, String dataProductName, String dataTypeName) { + DataTypeInner inner = this.serviceClient().get(resourceGroupName, dataProductName, dataTypeName); + if (inner != null) { + return new DataTypeImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String dataProductName, String dataTypeName) { + this.serviceClient().delete(resourceGroupName, dataProductName, dataTypeName); + } + + public void delete(String resourceGroupName, String dataProductName, String dataTypeName, Context context) { + this.serviceClient().delete(resourceGroupName, dataProductName, dataTypeName, context); + } + + public void deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body) { + this.serviceClient().deleteData(resourceGroupName, dataProductName, dataTypeName, body); + } + + public void deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body, + Context context) { + this.serviceClient().deleteData(resourceGroupName, dataProductName, dataTypeName, body, context); + } + + public Response generateStorageContainerSasTokenWithResponse(String resourceGroupName, + String dataProductName, String dataTypeName, ContainerSaS body, Context context) { + Response inner = this.serviceClient() + .generateStorageContainerSasTokenWithResponse(resourceGroupName, dataProductName, dataTypeName, body, + context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ContainerSasTokenImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ContainerSasToken generateStorageContainerSasToken(String resourceGroupName, String dataProductName, + String dataTypeName, ContainerSaS body) { + ContainerSasTokenInner inner = this.serviceClient() + .generateStorageContainerSasToken(resourceGroupName, dataProductName, dataTypeName, body); + if (inner != null) { + return new ContainerSasTokenImpl(inner, this.manager()); + } else { + return null; + } + } + + public DataType getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dataProductName = ResourceManagerUtils.getValueFromIdByName(id, "dataProducts"); + if (dataProductName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id))); + } + String dataTypeName = ResourceManagerUtils.getValueFromIdByName(id, "dataTypes"); + if (dataTypeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataTypes'.", id))); + } + return this.getWithResponse(resourceGroupName, dataProductName, dataTypeName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dataProductName = ResourceManagerUtils.getValueFromIdByName(id, "dataProducts"); + if (dataProductName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id))); + } + String dataTypeName = ResourceManagerUtils.getValueFromIdByName(id, "dataTypes"); + if (dataTypeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataTypes'.", id))); + } + return this.getWithResponse(resourceGroupName, dataProductName, dataTypeName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dataProductName = ResourceManagerUtils.getValueFromIdByName(id, "dataProducts"); + if (dataProductName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id))); + } + String dataTypeName = ResourceManagerUtils.getValueFromIdByName(id, "dataTypes"); + if (dataTypeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataTypes'.", id))); + } + this.delete(resourceGroupName, dataProductName, dataTypeName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dataProductName = ResourceManagerUtils.getValueFromIdByName(id, "dataProducts"); + if (dataProductName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataProducts'.", id))); + } + String dataTypeName = ResourceManagerUtils.getValueFromIdByName(id, "dataTypes"); + if (dataTypeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dataTypes'.", id))); + } + this.delete(resourceGroupName, dataProductName, dataTypeName, context); + } + + private DataTypesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } + + public DataTypeImpl define(String name) { + return new DataTypeImpl(name, this.manager()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ListRoleAssignmentsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ListRoleAssignmentsImpl.java new file mode 100644 index 000000000000..81f08723134f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ListRoleAssignmentsImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.ListRoleAssignments; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentDetail; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class ListRoleAssignmentsImpl implements ListRoleAssignments { + private ListRoleAssignmentsInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + ListRoleAssignmentsImpl(ListRoleAssignmentsInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public int count() { + return this.innerModel().count(); + } + + public List roleAssignmentResponse() { + List inner = this.innerModel().roleAssignmentResponse(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new RoleAssignmentDetailImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public ListRoleAssignmentsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsMgmtClientBuilder.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsMgmtClientBuilder.java new file mode 100644 index 000000000000..6668be43de67 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsMgmtClientBuilder.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the NetworkAnalyticsMgmtClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { NetworkAnalyticsMgmtClientImpl.class }) +public final class NetworkAnalyticsMgmtClientBuilder { + /* + * The ID of the target subscription. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the NetworkAnalyticsMgmtClientBuilder. + */ + public NetworkAnalyticsMgmtClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the NetworkAnalyticsMgmtClientBuilder. + */ + public NetworkAnalyticsMgmtClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the NetworkAnalyticsMgmtClientBuilder. + */ + public NetworkAnalyticsMgmtClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the NetworkAnalyticsMgmtClientBuilder. + */ + public NetworkAnalyticsMgmtClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the NetworkAnalyticsMgmtClientBuilder. + */ + public NetworkAnalyticsMgmtClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the NetworkAnalyticsMgmtClientBuilder. + */ + public NetworkAnalyticsMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of NetworkAnalyticsMgmtClientImpl with the provided parameters. + * + * @return an instance of NetworkAnalyticsMgmtClientImpl. + */ + public NetworkAnalyticsMgmtClientImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + NetworkAnalyticsMgmtClientImpl client = new NetworkAnalyticsMgmtClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + return client; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsMgmtClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsMgmtClientImpl.java new file mode 100644 index 000000000000..a5b1642a81fd --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsMgmtClientImpl.java @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.networkanalytics.fluent.DataProductsCatalogsClient; +import com.azure.resourcemanager.networkanalytics.fluent.DataProductsClient; +import com.azure.resourcemanager.networkanalytics.fluent.DataTypesClient; +import com.azure.resourcemanager.networkanalytics.fluent.NetworkAnalyticsMgmtClient; +import com.azure.resourcemanager.networkanalytics.fluent.OperationsClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the NetworkAnalyticsMgmtClientImpl type. + */ +@ServiceClient(builder = NetworkAnalyticsMgmtClientBuilder.class) +public final class NetworkAnalyticsMgmtClientImpl implements NetworkAnalyticsMgmtClient { + /** + * The ID of the target subscription. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * server parameter. + */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The default poll interval for long-running operation. + */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The DataProductsClient object to access its operations. + */ + private final DataProductsClient dataProducts; + + /** + * Gets the DataProductsClient object to access its operations. + * + * @return the DataProductsClient object. + */ + public DataProductsClient getDataProducts() { + return this.dataProducts; + } + + /** + * The DataProductsCatalogsClient object to access its operations. + */ + private final DataProductsCatalogsClient dataProductsCatalogs; + + /** + * Gets the DataProductsCatalogsClient object to access its operations. + * + * @return the DataProductsCatalogsClient object. + */ + public DataProductsCatalogsClient getDataProductsCatalogs() { + return this.dataProductsCatalogs; + } + + /** + * The DataTypesClient object to access its operations. + */ + private final DataTypesClient dataTypes; + + /** + * Gets the DataTypesClient object to access its operations. + * + * @return the DataTypesClient object. + */ + public DataTypesClient getDataTypes() { + return this.dataTypes; + } + + /** + * Initializes an instance of NetworkAnalyticsMgmtClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The ID of the target subscription. + * @param endpoint server parameter. + */ + NetworkAnalyticsMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2023-11-15"; + this.operations = new OperationsClientImpl(this); + this.dataProducts = new DataProductsClientImpl(this); + this.dataProductsCatalogs = new DataProductsCatalogsClientImpl(this); + this.dataTypes = new DataTypesClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkAnalyticsMgmtClientImpl.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationImpl.java new file mode 100644 index 000000000000..4c12d87f681b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; +import com.azure.resourcemanager.networkanalytics.models.ActionType; +import com.azure.resourcemanager.networkanalytics.models.Operation; +import com.azure.resourcemanager.networkanalytics.models.OperationDisplay; +import com.azure.resourcemanager.networkanalytics.models.Origin; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + OperationImpl(OperationInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsClientImpl.java new file mode 100644 index 000000000000..4d1c60ed46fa --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsClientImpl.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.networkanalytics.fluent.OperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; +import com.azure.resourcemanager.networkanalytics.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public final class OperationsClientImpl implements OperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationsService service; + + /** + * The service client containing this operation class. + */ + private final NetworkAnalyticsMgmtClientImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(NetworkAnalyticsMgmtClientImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetworkAnalyticsMgmtClientOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NetworkAnalyticsMgmt") + public interface OperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.NetworkAnalytics/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsImpl.java new file mode 100644 index 000000000000..e8630e31b165 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.OperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; +import com.azure.resourcemanager.networkanalytics.models.Operation; +import com.azure.resourcemanager.networkanalytics.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ResourceManagerUtils.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ResourceManagerUtils.java new file mode 100644 index 000000000000..3d4595a13e58 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/ResourceManagerUtils.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (!segments.isEmpty() && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl<>(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/RoleAssignmentDetailImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/RoleAssignmentDetailImpl.java new file mode 100644 index 000000000000..5b2ba822d28d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/RoleAssignmentDetailImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentDetail; +import java.util.Collections; +import java.util.List; + +public final class RoleAssignmentDetailImpl implements RoleAssignmentDetail { + private RoleAssignmentDetailInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager; + + RoleAssignmentDetailImpl(RoleAssignmentDetailInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String roleId() { + return this.innerModel().roleId(); + } + + public String principalId() { + return this.innerModel().principalId(); + } + + public String username() { + return this.innerModel().username(); + } + + public List dataTypeScope() { + List inner = this.innerModel().dataTypeScope(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String principalType() { + return this.innerModel().principalType(); + } + + public DataProductUserRole role() { + return this.innerModel().role(); + } + + public String roleAssignmentId() { + return this.innerModel().roleAssignmentId(); + } + + public RoleAssignmentDetailInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/package-info.java new file mode 100644 index 000000000000..2c2804664b3b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for NetworkAnalyticsMgmtClient. + * null. + */ +package com.azure.resourcemanager.networkanalytics.implementation; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AccountSas.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AccountSas.java new file mode 100644 index 000000000000..aa526f504f27 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AccountSas.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * The details for storage account sas creation. + */ +@Fluent +public final class AccountSas { + /* + * Sas token start timestamp. + */ + @JsonProperty(value = "startTimeStamp", required = true) + private OffsetDateTime startTimestamp; + + /* + * Sas token expiry timestamp. + */ + @JsonProperty(value = "expiryTimeStamp", required = true) + private OffsetDateTime expiryTimestamp; + + /* + * Ip Address + */ + @JsonProperty(value = "ipAddress", required = true) + private String ipAddress; + + /** + * Creates an instance of AccountSas class. + */ + public AccountSas() { + } + + /** + * Get the startTimestamp property: Sas token start timestamp. + * + * @return the startTimestamp value. + */ + public OffsetDateTime startTimestamp() { + return this.startTimestamp; + } + + /** + * Set the startTimestamp property: Sas token start timestamp. + * + * @param startTimestamp the startTimestamp value to set. + * @return the AccountSas object itself. + */ + public AccountSas withStartTimestamp(OffsetDateTime startTimestamp) { + this.startTimestamp = startTimestamp; + return this; + } + + /** + * Get the expiryTimestamp property: Sas token expiry timestamp. + * + * @return the expiryTimestamp value. + */ + public OffsetDateTime expiryTimestamp() { + return this.expiryTimestamp; + } + + /** + * Set the expiryTimestamp property: Sas token expiry timestamp. + * + * @param expiryTimestamp the expiryTimestamp value to set. + * @return the AccountSas object itself. + */ + public AccountSas withExpiryTimestamp(OffsetDateTime expiryTimestamp) { + this.expiryTimestamp = expiryTimestamp; + return this; + } + + /** + * Get the ipAddress property: Ip Address. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: Ip Address. + * + * @param ipAddress the ipAddress value to set. + * @return the AccountSas object itself. + */ + public AccountSas withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (startTimestamp() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property startTimestamp in model AccountSas")); + } + if (expiryTimestamp() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property expiryTimestamp in model AccountSas")); + } + if (ipAddress() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property ipAddress in model AccountSas")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AccountSas.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AccountSasToken.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AccountSasToken.java new file mode 100644 index 000000000000..b5a799a17bbd --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AccountSasToken.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner; + +/** + * An immutable client-side representation of AccountSasToken. + */ +public interface AccountSasToken { + /** + * Gets the storageAccountSasToken property: Field to specify storage account sas token. + * + * @return the storageAccountSasToken value. + */ + String storageAccountSasToken(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner object. + * + * @return the inner object. + */ + AccountSasTokenInner innerModel(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ActionType.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ActionType.java new file mode 100644 index 000000000000..910774bf30c6 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ActionType.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ +public final class ActionType extends ExpandableStringEnum { + /** + * Static value Internal for ActionType. + */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ConsumptionEndpointsProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ConsumptionEndpointsProperties.java new file mode 100644 index 000000000000..12031b92bdb4 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ConsumptionEndpointsProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of Consumption Properties. + */ +@Immutable +public final class ConsumptionEndpointsProperties { + /* + * Ingestion url to upload the data. + */ + @JsonProperty(value = "ingestionUrl", access = JsonProperty.Access.WRITE_ONLY) + private String ingestionUrl; + + /* + * Resource Id of ingestion endpoint. + */ + @JsonProperty(value = "ingestionResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String ingestionResourceId; + + /* + * Url to consume file type. + */ + @JsonProperty(value = "fileAccessUrl", access = JsonProperty.Access.WRITE_ONLY) + private String fileAccessUrl; + + /* + * Resource Id of file access endpoint. + */ + @JsonProperty(value = "fileAccessResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String fileAccessResourceId; + + /* + * Url to consume the processed data. + */ + @JsonProperty(value = "queryUrl", access = JsonProperty.Access.WRITE_ONLY) + private String queryUrl; + + /* + * Resource Id of query endpoint. + */ + @JsonProperty(value = "queryResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String queryResourceId; + + /** + * Creates an instance of ConsumptionEndpointsProperties class. + */ + public ConsumptionEndpointsProperties() { + } + + /** + * Get the ingestionUrl property: Ingestion url to upload the data. + * + * @return the ingestionUrl value. + */ + public String ingestionUrl() { + return this.ingestionUrl; + } + + /** + * Get the ingestionResourceId property: Resource Id of ingestion endpoint. + * + * @return the ingestionResourceId value. + */ + public String ingestionResourceId() { + return this.ingestionResourceId; + } + + /** + * Get the fileAccessUrl property: Url to consume file type. + * + * @return the fileAccessUrl value. + */ + public String fileAccessUrl() { + return this.fileAccessUrl; + } + + /** + * Get the fileAccessResourceId property: Resource Id of file access endpoint. + * + * @return the fileAccessResourceId value. + */ + public String fileAccessResourceId() { + return this.fileAccessResourceId; + } + + /** + * Get the queryUrl property: Url to consume the processed data. + * + * @return the queryUrl value. + */ + public String queryUrl() { + return this.queryUrl; + } + + /** + * Get the queryResourceId property: Resource Id of query endpoint. + * + * @return the queryResourceId value. + */ + public String queryResourceId() { + return this.queryResourceId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ContainerSaS.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ContainerSaS.java new file mode 100644 index 000000000000..7c159adf564c --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ContainerSaS.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * The details for container sas creation. + */ +@Fluent +public final class ContainerSaS { + /* + * Sas token start timestamp. + */ + @JsonProperty(value = "startTimeStamp", required = true) + private OffsetDateTime startTimestamp; + + /* + * Sas token expiry timestamp. + */ + @JsonProperty(value = "expiryTimeStamp", required = true) + private OffsetDateTime expiryTimestamp; + + /* + * Ip Address + */ + @JsonProperty(value = "ipAddress", required = true) + private String ipAddress; + + /** + * Creates an instance of ContainerSaS class. + */ + public ContainerSaS() { + } + + /** + * Get the startTimestamp property: Sas token start timestamp. + * + * @return the startTimestamp value. + */ + public OffsetDateTime startTimestamp() { + return this.startTimestamp; + } + + /** + * Set the startTimestamp property: Sas token start timestamp. + * + * @param startTimestamp the startTimestamp value to set. + * @return the ContainerSaS object itself. + */ + public ContainerSaS withStartTimestamp(OffsetDateTime startTimestamp) { + this.startTimestamp = startTimestamp; + return this; + } + + /** + * Get the expiryTimestamp property: Sas token expiry timestamp. + * + * @return the expiryTimestamp value. + */ + public OffsetDateTime expiryTimestamp() { + return this.expiryTimestamp; + } + + /** + * Set the expiryTimestamp property: Sas token expiry timestamp. + * + * @param expiryTimestamp the expiryTimestamp value to set. + * @return the ContainerSaS object itself. + */ + public ContainerSaS withExpiryTimestamp(OffsetDateTime expiryTimestamp) { + this.expiryTimestamp = expiryTimestamp; + return this; + } + + /** + * Get the ipAddress property: Ip Address. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: Ip Address. + * + * @param ipAddress the ipAddress value to set. + * @return the ContainerSaS object itself. + */ + public ContainerSaS withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (startTimestamp() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property startTimestamp in model ContainerSaS")); + } + if (expiryTimestamp() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property expiryTimestamp in model ContainerSaS")); + } + if (ipAddress() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property ipAddress in model ContainerSaS")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerSaS.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ContainerSasToken.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ContainerSasToken.java new file mode 100644 index 000000000000..f9d594d6e418 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ContainerSasToken.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.resourcemanager.networkanalytics.fluent.models.ContainerSasTokenInner; + +/** + * An immutable client-side representation of ContainerSasToken. + */ +public interface ContainerSasToken { + /** + * Gets the storageContainerSasToken property: Field to specify storage container sas token. + * + * @return the storageContainerSasToken value. + */ + String storageContainerSasToken(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.ContainerSasTokenInner object. + * + * @return the inner object. + */ + ContainerSasTokenInner innerModel(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ControlState.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ControlState.java new file mode 100644 index 000000000000..652e9da3c777 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ControlState.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The data type state. + */ +public final class ControlState extends ExpandableStringEnum { + /** + * Static value Enabled for ControlState. + */ + public static final ControlState ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for ControlState. + */ + public static final ControlState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ControlState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ControlState() { + } + + /** + * Creates or finds a ControlState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ControlState. + */ + @JsonCreator + public static ControlState fromString(String name) { + return fromString(name, ControlState.class); + } + + /** + * Gets known ControlState values. + * + * @return known ControlState values. + */ + public static Collection values() { + return values(ControlState.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProduct.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProduct.java new file mode 100644 index 000000000000..8bf4019f1247 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProduct.java @@ -0,0 +1,414 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import java.util.Map; + +/** + * An immutable client-side representation of DataProduct. + */ +public interface DataProduct { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + DataProductProperties properties(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner object. + * + * @return the inner object. + */ + DataProductInner innerModel(); + + /** + * The entirety of the DataProduct definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The DataProduct definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the DataProduct definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the DataProduct definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the DataProduct definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the DataProduct definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + DataProduct create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DataProduct create(Context context); + } + + /** + * The stage of the DataProduct definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the DataProduct definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(DataProductProperties properties); + } + + /** + * The stage of the DataProduct definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Begins update for the DataProduct resource. + * + * @return the stage of resource update. + */ + DataProduct.Update update(); + + /** + * The template for DataProduct update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DataProduct apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DataProduct apply(Context context); + } + + /** + * The DataProduct update stages. + */ + interface UpdateStages { + /** + * The stage of the DataProduct update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the DataProduct update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the DataProduct update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The updatable properties of the DataProduct.. + * + * @param properties The updatable properties of the DataProduct. + * @return the next definition stage. + */ + Update withProperties(DataProductUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DataProduct refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DataProduct refresh(Context context); + + /** + * Assign role to the data product. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response along with {@link Response}. + */ + Response addUserRoleWithResponse(RoleAssignmentCommonProperties body, Context context); + + /** + * Assign role to the data product. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response. + */ + RoleAssignmentDetail addUserRole(RoleAssignmentCommonProperties body); + + /** + * Generate sas token for storage account. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token along with {@link Response}. + */ + Response generateStorageAccountSasTokenWithResponse(AccountSas body, Context context); + + /** + * Generate sas token for storage account. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token. + */ + AccountSasToken generateStorageAccountSasToken(AccountSas body); + + /** + * List user roles associated with the data product. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments along with {@link Response}. + */ + Response listRolesAssignmentsWithResponse(Object body, Context context); + + /** + * List user roles associated with the data product. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments. + */ + ListRoleAssignments listRolesAssignments(Object body); + + /** + * Remove role from the data product. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response removeUserRoleWithResponse(RoleAssignmentDetailInner body, Context context); + + /** + * Remove role from the data product. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void removeUserRole(RoleAssignmentDetailInner body); + + /** + * Initiate key rotation on Data Product. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response rotateKeyWithResponse(KeyVaultInfo body, Context context); + + /** + * Initiate key rotation on Data Product. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateKey(KeyVaultInfo body); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductInformation.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductInformation.java new file mode 100644 index 000000000000..60cad017ac36 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductInformation.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Data Product Information. + */ +@Fluent +public final class DataProductInformation { + /* + * Name of data product. + */ + @JsonProperty(value = "dataProductName", required = true) + private String dataProductName; + + /* + * Description about data product. + */ + @JsonProperty(value = "description", required = true) + private String description; + + /* + * Version information of data product. + */ + @JsonProperty(value = "dataProductVersions", required = true) + private List dataProductVersions; + + /** + * Creates an instance of DataProductInformation class. + */ + public DataProductInformation() { + } + + /** + * Get the dataProductName property: Name of data product. + * + * @return the dataProductName value. + */ + public String dataProductName() { + return this.dataProductName; + } + + /** + * Set the dataProductName property: Name of data product. + * + * @param dataProductName the dataProductName value to set. + * @return the DataProductInformation object itself. + */ + public DataProductInformation withDataProductName(String dataProductName) { + this.dataProductName = dataProductName; + return this; + } + + /** + * Get the description property: Description about data product. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description about data product. + * + * @param description the description value to set. + * @return the DataProductInformation object itself. + */ + public DataProductInformation withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the dataProductVersions property: Version information of data product. + * + * @return the dataProductVersions value. + */ + public List dataProductVersions() { + return this.dataProductVersions; + } + + /** + * Set the dataProductVersions property: Version information of data product. + * + * @param dataProductVersions the dataProductVersions value to set. + * @return the DataProductInformation object itself. + */ + public DataProductInformation withDataProductVersions(List dataProductVersions) { + this.dataProductVersions = dataProductVersions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataProductName() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property dataProductName in model DataProductInformation")); + } + if (description() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property description in model DataProductInformation")); + } + if (dataProductVersions() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property dataProductVersions in model DataProductInformation")); + } else { + dataProductVersions().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataProductInformation.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductListResult.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductListResult.java new file mode 100644 index 000000000000..019d697ae184 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductListResult.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a DataProduct list operation. + */ +@Fluent +public final class DataProductListResult { + /* + * The DataProduct items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of DataProductListResult class. + */ + public DataProductListResult() { + } + + /** + * Get the value property: The DataProduct items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DataProduct items on this page. + * + * @param value the value value to set. + * @return the DataProductListResult object itself. + */ + public DataProductListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the DataProductListResult object itself. + */ + public DataProductListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DataProductListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataProductListResult.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductNetworkAcls.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductNetworkAcls.java new file mode 100644 index 000000000000..3488b26d6534 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductNetworkAcls.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Data Product Network rule set. + */ +@Fluent +public final class DataProductNetworkAcls { + /* + * Virtual Network Rule + */ + @JsonProperty(value = "virtualNetworkRule", required = true) + private List virtualNetworkRule; + + /* + * IP rule with specific IP or IP range in CIDR format. + */ + @JsonProperty(value = "ipRules", required = true) + private List ipRules; + + /* + * The list of query ips in the format of CIDR allowed to connect to query/visualization endpoint. + */ + @JsonProperty(value = "allowedQueryIpRangeList", required = true) + private List allowedQueryIpRangeList; + + /* + * Default Action + */ + @JsonProperty(value = "defaultAction", required = true) + private DefaultAction defaultAction; + + /** + * Creates an instance of DataProductNetworkAcls class. + */ + public DataProductNetworkAcls() { + } + + /** + * Get the virtualNetworkRule property: Virtual Network Rule. + * + * @return the virtualNetworkRule value. + */ + public List virtualNetworkRule() { + return this.virtualNetworkRule; + } + + /** + * Set the virtualNetworkRule property: Virtual Network Rule. + * + * @param virtualNetworkRule the virtualNetworkRule value to set. + * @return the DataProductNetworkAcls object itself. + */ + public DataProductNetworkAcls withVirtualNetworkRule(List virtualNetworkRule) { + this.virtualNetworkRule = virtualNetworkRule; + return this; + } + + /** + * Get the ipRules property: IP rule with specific IP or IP range in CIDR format. + * + * @return the ipRules value. + */ + public List ipRules() { + return this.ipRules; + } + + /** + * Set the ipRules property: IP rule with specific IP or IP range in CIDR format. + * + * @param ipRules the ipRules value to set. + * @return the DataProductNetworkAcls object itself. + */ + public DataProductNetworkAcls withIpRules(List ipRules) { + this.ipRules = ipRules; + return this; + } + + /** + * Get the allowedQueryIpRangeList property: The list of query ips in the format of CIDR allowed to connect to + * query/visualization endpoint. + * + * @return the allowedQueryIpRangeList value. + */ + public List allowedQueryIpRangeList() { + return this.allowedQueryIpRangeList; + } + + /** + * Set the allowedQueryIpRangeList property: The list of query ips in the format of CIDR allowed to connect to + * query/visualization endpoint. + * + * @param allowedQueryIpRangeList the allowedQueryIpRangeList value to set. + * @return the DataProductNetworkAcls object itself. + */ + public DataProductNetworkAcls withAllowedQueryIpRangeList(List allowedQueryIpRangeList) { + this.allowedQueryIpRangeList = allowedQueryIpRangeList; + return this; + } + + /** + * Get the defaultAction property: Default Action. + * + * @return the defaultAction value. + */ + public DefaultAction defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: Default Action. + * + * @param defaultAction the defaultAction value to set. + * @return the DataProductNetworkAcls object itself. + */ + public DataProductNetworkAcls withDefaultAction(DefaultAction defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualNetworkRule() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property virtualNetworkRule in model DataProductNetworkAcls")); + } else { + virtualNetworkRule().forEach(e -> e.validate()); + } + if (ipRules() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property ipRules in model DataProductNetworkAcls")); + } else { + ipRules().forEach(e -> e.validate()); + } + if (allowedQueryIpRangeList() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property allowedQueryIpRangeList in model DataProductNetworkAcls")); + } + if (defaultAction() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property defaultAction in model DataProductNetworkAcls")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataProductNetworkAcls.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductProperties.java new file mode 100644 index 000000000000..1a5477f75d04 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductProperties.java @@ -0,0 +1,514 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The data product properties. + */ +@Fluent +public final class DataProductProperties { + /* + * The resource GUID property of the data product resource. + */ + @JsonProperty(value = "resourceGuid", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGuid; + + /* + * Latest provisioning state of data product. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Data product publisher name. + */ + @JsonProperty(value = "publisher", required = true) + private String publisher; + + /* + * Product name of data product. + */ + @JsonProperty(value = "product", required = true) + private String product; + + /* + * Major version of data product. + */ + @JsonProperty(value = "majorVersion", required = true) + private String majorVersion; + + /* + * List of name or email associated with data product resource deployment. + */ + @JsonProperty(value = "owners") + private List owners; + + /* + * Flag to enable or disable redundancy for data product. + */ + @JsonProperty(value = "redundancy") + private ControlState redundancy; + + /* + * Purview account url for data product to connect to. + */ + @JsonProperty(value = "purviewAccount") + private String purviewAccount; + + /* + * Purview collection url for data product to connect to. + */ + @JsonProperty(value = "purviewCollection") + private String purviewCollection; + + /* + * Flag to enable or disable private link for data product resource. + */ + @JsonProperty(value = "privateLinksEnabled") + private ControlState privateLinksEnabled; + + /* + * Flag to enable or disable public access of data product resource. + */ + @JsonProperty(value = "publicNetworkAccess") + private ControlState publicNetworkAccess; + + /* + * Flag to enable customer managed key encryption for data product. + */ + @JsonProperty(value = "customerManagedKeyEncryptionEnabled") + private ControlState customerManagedKeyEncryptionEnabled; + + /* + * Customer managed encryption key details for data product. + */ + @JsonProperty(value = "customerEncryptionKey") + private EncryptionKeyDetails customerEncryptionKey; + + /* + * Network rule set for data product. + */ + @JsonProperty(value = "networkacls") + private DataProductNetworkAcls networkacls; + + /* + * Managed resource group configuration. + */ + @JsonProperty(value = "managedResourceGroupConfiguration") + private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; + + /* + * List of available minor versions of the data product resource. + */ + @JsonProperty(value = "availableMinorVersions", access = JsonProperty.Access.WRITE_ONLY) + private List availableMinorVersions; + + /* + * Current configured minor version of the data product resource. + */ + @JsonProperty(value = "currentMinorVersion") + private String currentMinorVersion; + + /* + * Documentation link for the data product based on definition file. + */ + @JsonProperty(value = "documentation", access = JsonProperty.Access.WRITE_ONLY) + private String documentation; + + /* + * Resource links which exposed to the customer to query the data. + */ + @JsonProperty(value = "consumptionEndpoints", access = JsonProperty.Access.WRITE_ONLY) + private ConsumptionEndpointsProperties consumptionEndpoints; + + /* + * Key vault url. + */ + @JsonProperty(value = "keyVaultUrl", access = JsonProperty.Access.WRITE_ONLY) + private String keyVaultUrl; + + /** + * Creates an instance of DataProductProperties class. + */ + public DataProductProperties() { + } + + /** + * Get the resourceGuid property: The resource GUID property of the data product resource. + * + * @return the resourceGuid value. + */ + public String resourceGuid() { + return this.resourceGuid; + } + + /** + * Get the provisioningState property: Latest provisioning state of data product. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the publisher property: Data product publisher name. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: Data product publisher name. + * + * @param publisher the publisher value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the product property: Product name of data product. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: Product name of data product. + * + * @param product the product value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the majorVersion property: Major version of data product. + * + * @return the majorVersion value. + */ + public String majorVersion() { + return this.majorVersion; + } + + /** + * Set the majorVersion property: Major version of data product. + * + * @param majorVersion the majorVersion value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withMajorVersion(String majorVersion) { + this.majorVersion = majorVersion; + return this; + } + + /** + * Get the owners property: List of name or email associated with data product resource deployment. + * + * @return the owners value. + */ + public List owners() { + return this.owners; + } + + /** + * Set the owners property: List of name or email associated with data product resource deployment. + * + * @param owners the owners value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withOwners(List owners) { + this.owners = owners; + return this; + } + + /** + * Get the redundancy property: Flag to enable or disable redundancy for data product. + * + * @return the redundancy value. + */ + public ControlState redundancy() { + return this.redundancy; + } + + /** + * Set the redundancy property: Flag to enable or disable redundancy for data product. + * + * @param redundancy the redundancy value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withRedundancy(ControlState redundancy) { + this.redundancy = redundancy; + return this; + } + + /** + * Get the purviewAccount property: Purview account url for data product to connect to. + * + * @return the purviewAccount value. + */ + public String purviewAccount() { + return this.purviewAccount; + } + + /** + * Set the purviewAccount property: Purview account url for data product to connect to. + * + * @param purviewAccount the purviewAccount value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withPurviewAccount(String purviewAccount) { + this.purviewAccount = purviewAccount; + return this; + } + + /** + * Get the purviewCollection property: Purview collection url for data product to connect to. + * + * @return the purviewCollection value. + */ + public String purviewCollection() { + return this.purviewCollection; + } + + /** + * Set the purviewCollection property: Purview collection url for data product to connect to. + * + * @param purviewCollection the purviewCollection value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withPurviewCollection(String purviewCollection) { + this.purviewCollection = purviewCollection; + return this; + } + + /** + * Get the privateLinksEnabled property: Flag to enable or disable private link for data product resource. + * + * @return the privateLinksEnabled value. + */ + public ControlState privateLinksEnabled() { + return this.privateLinksEnabled; + } + + /** + * Set the privateLinksEnabled property: Flag to enable or disable private link for data product resource. + * + * @param privateLinksEnabled the privateLinksEnabled value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withPrivateLinksEnabled(ControlState privateLinksEnabled) { + this.privateLinksEnabled = privateLinksEnabled; + return this; + } + + /** + * Get the publicNetworkAccess property: Flag to enable or disable public access of data product resource. + * + * @return the publicNetworkAccess value. + */ + public ControlState publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Flag to enable or disable public access of data product resource. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withPublicNetworkAccess(ControlState publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the customerManagedKeyEncryptionEnabled property: Flag to enable customer managed key encryption for data + * product. + * + * @return the customerManagedKeyEncryptionEnabled value. + */ + public ControlState customerManagedKeyEncryptionEnabled() { + return this.customerManagedKeyEncryptionEnabled; + } + + /** + * Set the customerManagedKeyEncryptionEnabled property: Flag to enable customer managed key encryption for data + * product. + * + * @param customerManagedKeyEncryptionEnabled the customerManagedKeyEncryptionEnabled value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties + withCustomerManagedKeyEncryptionEnabled(ControlState customerManagedKeyEncryptionEnabled) { + this.customerManagedKeyEncryptionEnabled = customerManagedKeyEncryptionEnabled; + return this; + } + + /** + * Get the customerEncryptionKey property: Customer managed encryption key details for data product. + * + * @return the customerEncryptionKey value. + */ + public EncryptionKeyDetails customerEncryptionKey() { + return this.customerEncryptionKey; + } + + /** + * Set the customerEncryptionKey property: Customer managed encryption key details for data product. + * + * @param customerEncryptionKey the customerEncryptionKey value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withCustomerEncryptionKey(EncryptionKeyDetails customerEncryptionKey) { + this.customerEncryptionKey = customerEncryptionKey; + return this; + } + + /** + * Get the networkacls property: Network rule set for data product. + * + * @return the networkacls value. + */ + public DataProductNetworkAcls networkacls() { + return this.networkacls; + } + + /** + * Set the networkacls property: Network rule set for data product. + * + * @param networkacls the networkacls value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withNetworkacls(DataProductNetworkAcls networkacls) { + this.networkacls = networkacls; + return this; + } + + /** + * Get the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.managedResourceGroupConfiguration; + } + + /** + * Set the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties + withManagedResourceGroupConfiguration(ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + this.managedResourceGroupConfiguration = managedResourceGroupConfiguration; + return this; + } + + /** + * Get the availableMinorVersions property: List of available minor versions of the data product resource. + * + * @return the availableMinorVersions value. + */ + public List availableMinorVersions() { + return this.availableMinorVersions; + } + + /** + * Get the currentMinorVersion property: Current configured minor version of the data product resource. + * + * @return the currentMinorVersion value. + */ + public String currentMinorVersion() { + return this.currentMinorVersion; + } + + /** + * Set the currentMinorVersion property: Current configured minor version of the data product resource. + * + * @param currentMinorVersion the currentMinorVersion value to set. + * @return the DataProductProperties object itself. + */ + public DataProductProperties withCurrentMinorVersion(String currentMinorVersion) { + this.currentMinorVersion = currentMinorVersion; + return this; + } + + /** + * Get the documentation property: Documentation link for the data product based on definition file. + * + * @return the documentation value. + */ + public String documentation() { + return this.documentation; + } + + /** + * Get the consumptionEndpoints property: Resource links which exposed to the customer to query the data. + * + * @return the consumptionEndpoints value. + */ + public ConsumptionEndpointsProperties consumptionEndpoints() { + return this.consumptionEndpoints; + } + + /** + * Get the keyVaultUrl property: Key vault url. + * + * @return the keyVaultUrl value. + */ + public String keyVaultUrl() { + return this.keyVaultUrl; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publisher() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property publisher in model DataProductProperties")); + } + if (product() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property product in model DataProductProperties")); + } + if (majorVersion() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property majorVersion in model DataProductProperties")); + } + if (customerEncryptionKey() != null) { + customerEncryptionKey().validate(); + } + if (networkacls() != null) { + networkacls().validate(); + } + if (managedResourceGroupConfiguration() != null) { + managedResourceGroupConfiguration().validate(); + } + if (consumptionEndpoints() != null) { + consumptionEndpoints().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataProductProperties.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUpdate.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUpdate.java new file mode 100644 index 000000000000..4801e022b9d2 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUpdate.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The type used for update operations of the DataProduct. + */ +@Fluent +public final class DataProductUpdate { + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the DataProduct. + */ + @JsonProperty(value = "properties") + private DataProductUpdateProperties properties; + + /** + * Creates an instance of DataProductUpdate class. + */ + public DataProductUpdate() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the DataProductUpdate object itself. + */ + public DataProductUpdate withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the DataProductUpdate object itself. + */ + public DataProductUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The updatable properties of the DataProduct. + * + * @return the properties value. + */ + public DataProductUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the DataProduct. + * + * @param properties the properties value to set. + * @return the DataProductUpdate object itself. + */ + public DataProductUpdate withProperties(DataProductUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUpdateProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUpdateProperties.java new file mode 100644 index 000000000000..eefb270443a8 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUpdateProperties.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The updatable properties of the DataProduct. + */ +@Fluent +public final class DataProductUpdateProperties { + /* + * List of name or email associated with data product resource deployment. + */ + @JsonProperty(value = "owners") + private List owners; + + /* + * Purview account url for data product to connect to. + */ + @JsonProperty(value = "purviewAccount") + private String purviewAccount; + + /* + * Purview collection url for data product to connect to. + */ + @JsonProperty(value = "purviewCollection") + private String purviewCollection; + + /* + * Flag to enable or disable private link for data product resource. + */ + @JsonProperty(value = "privateLinksEnabled") + private ControlState privateLinksEnabled; + + /* + * Current configured minor version of the data product resource. + */ + @JsonProperty(value = "currentMinorVersion") + private String currentMinorVersion; + + /** + * Creates an instance of DataProductUpdateProperties class. + */ + public DataProductUpdateProperties() { + } + + /** + * Get the owners property: List of name or email associated with data product resource deployment. + * + * @return the owners value. + */ + public List owners() { + return this.owners; + } + + /** + * Set the owners property: List of name or email associated with data product resource deployment. + * + * @param owners the owners value to set. + * @return the DataProductUpdateProperties object itself. + */ + public DataProductUpdateProperties withOwners(List owners) { + this.owners = owners; + return this; + } + + /** + * Get the purviewAccount property: Purview account url for data product to connect to. + * + * @return the purviewAccount value. + */ + public String purviewAccount() { + return this.purviewAccount; + } + + /** + * Set the purviewAccount property: Purview account url for data product to connect to. + * + * @param purviewAccount the purviewAccount value to set. + * @return the DataProductUpdateProperties object itself. + */ + public DataProductUpdateProperties withPurviewAccount(String purviewAccount) { + this.purviewAccount = purviewAccount; + return this; + } + + /** + * Get the purviewCollection property: Purview collection url for data product to connect to. + * + * @return the purviewCollection value. + */ + public String purviewCollection() { + return this.purviewCollection; + } + + /** + * Set the purviewCollection property: Purview collection url for data product to connect to. + * + * @param purviewCollection the purviewCollection value to set. + * @return the DataProductUpdateProperties object itself. + */ + public DataProductUpdateProperties withPurviewCollection(String purviewCollection) { + this.purviewCollection = purviewCollection; + return this; + } + + /** + * Get the privateLinksEnabled property: Flag to enable or disable private link for data product resource. + * + * @return the privateLinksEnabled value. + */ + public ControlState privateLinksEnabled() { + return this.privateLinksEnabled; + } + + /** + * Set the privateLinksEnabled property: Flag to enable or disable private link for data product resource. + * + * @param privateLinksEnabled the privateLinksEnabled value to set. + * @return the DataProductUpdateProperties object itself. + */ + public DataProductUpdateProperties withPrivateLinksEnabled(ControlState privateLinksEnabled) { + this.privateLinksEnabled = privateLinksEnabled; + return this; + } + + /** + * Get the currentMinorVersion property: Current configured minor version of the data product resource. + * + * @return the currentMinorVersion value. + */ + public String currentMinorVersion() { + return this.currentMinorVersion; + } + + /** + * Set the currentMinorVersion property: Current configured minor version of the data product resource. + * + * @param currentMinorVersion the currentMinorVersion value to set. + * @return the DataProductUpdateProperties object itself. + */ + public DataProductUpdateProperties withCurrentMinorVersion(String currentMinorVersion) { + this.currentMinorVersion = currentMinorVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUserRole.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUserRole.java new file mode 100644 index 000000000000..0d9ef0f4adfa --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductUserRole.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The data type state. + */ +public final class DataProductUserRole extends ExpandableStringEnum { + /** + * Static value Reader for DataProductUserRole. + */ + public static final DataProductUserRole READER = fromString("Reader"); + + /** + * Static value SensitiveReader for DataProductUserRole. + */ + public static final DataProductUserRole SENSITIVE_READER = fromString("SensitiveReader"); + + /** + * Creates a new instance of DataProductUserRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataProductUserRole() { + } + + /** + * Creates or finds a DataProductUserRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataProductUserRole. + */ + @JsonCreator + public static DataProductUserRole fromString(String name) { + return fromString(name, DataProductUserRole.class); + } + + /** + * Gets known DataProductUserRole values. + * + * @return known DataProductUserRole values. + */ + public static Collection values() { + return values(DataProductUserRole.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductVersion.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductVersion.java new file mode 100644 index 000000000000..9c4e40d09ecc --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductVersion.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Product Version. + */ +@Fluent +public final class DataProductVersion { + /* + * Version of data product + */ + @JsonProperty(value = "version", required = true) + private String version; + + /** + * Creates an instance of DataProductVersion class. + */ + public DataProductVersion() { + } + + /** + * Get the version property: Version of data product. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of data product. + * + * @param version the version value to set. + * @return the DataProductVersion object itself. + */ + public DataProductVersion withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (version() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property version in model DataProductVersion")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataProductVersion.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProducts.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProducts.java new file mode 100644 index 000000000000..6ae4ea69698f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProducts.java @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; + +/** + * Resource collection API of DataProducts. + */ +public interface DataProducts { + /** + * List data products by subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List data products by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List data products by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProduct list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Retrieve data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String dataProductName, + Context context); + + /** + * Retrieve data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource. + */ + DataProduct getByResourceGroup(String resourceGroupName, String dataProductName); + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String dataProductName); + + /** + * Delete data product resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String dataProductName, Context context); + + /** + * Assign role to the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response along with {@link Response}. + */ + Response addUserRoleWithResponse(String resourceGroupName, String dataProductName, + RoleAssignmentCommonProperties body, Context context); + + /** + * Assign role to the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details for role assignment response. + */ + RoleAssignmentDetail addUserRole(String resourceGroupName, String dataProductName, + RoleAssignmentCommonProperties body); + + /** + * Generate sas token for storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token along with {@link Response}. + */ + Response generateStorageAccountSasTokenWithResponse(String resourceGroupName, + String dataProductName, AccountSas body, Context context); + + /** + * Generate sas token for storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage account sas token. + */ + AccountSasToken generateStorageAccountSasToken(String resourceGroupName, String dataProductName, AccountSas body); + + /** + * List user roles associated with the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments along with {@link Response}. + */ + Response listRolesAssignmentsWithResponse(String resourceGroupName, String dataProductName, + Object body, Context context); + + /** + * List user roles associated with the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list role assignments. + */ + ListRoleAssignments listRolesAssignments(String resourceGroupName, String dataProductName, Object body); + + /** + * Remove role from the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response removeUserRoleWithResponse(String resourceGroupName, String dataProductName, + RoleAssignmentDetailInner body, Context context); + + /** + * Remove role from the data product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void removeUserRole(String resourceGroupName, String dataProductName, RoleAssignmentDetailInner body); + + /** + * Initiate key rotation on Data Product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response rotateKeyWithResponse(String resourceGroupName, String dataProductName, KeyVaultInfo body, + Context context); + + /** + * Initiate key rotation on Data Product. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void rotateKey(String resourceGroupName, String dataProductName, KeyVaultInfo body); + + /** + * Retrieve data product resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response}. + */ + DataProduct getById(String id); + + /** + * Retrieve data product resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data product resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete data product resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete data product resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DataProduct resource. + * + * @param name resource name. + * @return the first stage of the new DataProduct definition. + */ + DataProduct.DefinitionStages.Blank define(String name); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalog.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalog.java new file mode 100644 index 000000000000..780b85f5e0b2 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalog.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner; + +/** + * An immutable client-side representation of DataProductsCatalog. + */ +public interface DataProductsCatalog { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + DataProductsCatalogProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner object. + * + * @return the inner object. + */ + DataProductsCatalogInner innerModel(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogListResult.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogListResult.java new file mode 100644 index 000000000000..377411893b44 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogListResult.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a DataProductsCatalog list operation. + */ +@Fluent +public final class DataProductsCatalogListResult { + /* + * The DataProductsCatalog items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of DataProductsCatalogListResult class. + */ + public DataProductsCatalogListResult() { + } + + /** + * Get the value property: The DataProductsCatalog items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DataProductsCatalog items on this page. + * + * @param value the value value to set. + * @return the DataProductsCatalogListResult object itself. + */ + public DataProductsCatalogListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the DataProductsCatalogListResult object itself. + */ + public DataProductsCatalogListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DataProductsCatalogListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataProductsCatalogListResult.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogProperties.java new file mode 100644 index 000000000000..d7688884152b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogProperties.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Details for data catalog properties. + */ +@Fluent +public final class DataProductsCatalogProperties { + /* + * The data catalog provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The data product publisher information. + */ + @JsonProperty(value = "publishers", required = true) + private List publishers; + + /** + * Creates an instance of DataProductsCatalogProperties class. + */ + public DataProductsCatalogProperties() { + } + + /** + * Get the provisioningState property: The data catalog provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the publishers property: The data product publisher information. + * + * @return the publishers value. + */ + public List publishers() { + return this.publishers; + } + + /** + * Set the publishers property: The data product publisher information. + * + * @param publishers the publishers value to set. + * @return the DataProductsCatalogProperties object itself. + */ + public DataProductsCatalogProperties withPublishers(List publishers) { + this.publishers = publishers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publishers() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property publishers in model DataProductsCatalogProperties")); + } else { + publishers().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataProductsCatalogProperties.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogs.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogs.java new file mode 100644 index 000000000000..5b7fffb33445 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataProductsCatalogs.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DataProductsCatalogs. + */ +public interface DataProductsCatalogs { + /** + * List data catalog by subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List data catalog by subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List data catalog by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataProductsCatalog list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data catalog resource along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, Context context); + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data catalog resource. + */ + DataProductsCatalog getByResourceGroup(String resourceGroupName); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataType.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataType.java new file mode 100644 index 000000000000..d1ba72be4a4c --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataType.java @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner; + +/** + * An immutable client-side representation of DataType. + */ +public interface DataType { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + DataTypeProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner object. + * + * @return the inner object. + */ + DataTypeInner innerModel(); + + /** + * The entirety of the DataType definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The DataType definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the DataType definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the DataType definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, dataProductName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @return the next definition stage. + */ + WithCreate withExistingDataProduct(String resourceGroupName, String dataProductName); + } + + /** + * The stage of the DataType definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + DataType create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DataType create(Context context); + } + + /** + * The stage of the DataType definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(DataTypeProperties properties); + } + } + + /** + * Begins update for the DataType resource. + * + * @return the stage of resource update. + */ + DataType.Update update(); + + /** + * The template for DataType update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DataType apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DataType apply(Context context); + } + + /** + * The DataType update stages. + */ + interface UpdateStages { + /** + * The stage of the DataType update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The updatable properties of the DataType.. + * + * @param properties The updatable properties of the DataType. + * @return the next definition stage. + */ + Update withProperties(DataTypeUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DataType refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DataType refresh(Context context); + + /** + * Delete data for data type. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteData(Object body); + + /** + * Delete data for data type. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteData(Object body, Context context); + + /** + * Generate sas token for storage container. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token along with {@link Response}. + */ + Response generateStorageContainerSasTokenWithResponse(ContainerSaS body, Context context); + + /** + * Generate sas token for storage container. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token. + */ + ContainerSasToken generateStorageContainerSasToken(ContainerSaS body); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeListResult.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeListResult.java new file mode 100644 index 000000000000..8731ec84e5a9 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeListResult.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a DataType list operation. + */ +@Fluent +public final class DataTypeListResult { + /* + * The DataType items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of DataTypeListResult class. + */ + public DataTypeListResult() { + } + + /** + * Get the value property: The DataType items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DataType items on this page. + * + * @param value the value value to set. + * @return the DataTypeListResult object itself. + */ + public DataTypeListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the DataTypeListResult object itself. + */ + public DataTypeListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DataTypeListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataTypeListResult.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeProperties.java new file mode 100644 index 000000000000..f0747eebdb76 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeProperties.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The data type properties. + */ +@Fluent +public final class DataTypeProperties { + /* + * Latest provisioning state of data product. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * State of data type. + */ + @JsonProperty(value = "state") + private DataTypeState state; + + /* + * Reason for the state of data type. + */ + @JsonProperty(value = "stateReason", access = JsonProperty.Access.WRITE_ONLY) + private String stateReason; + + /* + * Field for storage output retention in days. + */ + @JsonProperty(value = "storageOutputRetention") + private Integer storageOutputRetention; + + /* + * Field for database cache retention in days. + */ + @JsonProperty(value = "databaseCacheRetention") + private Integer databaseCacheRetention; + + /* + * Field for database data retention in days. + */ + @JsonProperty(value = "databaseRetention") + private Integer databaseRetention; + + /* + * Url for data visualization. + */ + @JsonProperty(value = "visualizationUrl", access = JsonProperty.Access.WRITE_ONLY) + private String visualizationUrl; + + /** + * Creates an instance of DataTypeProperties class. + */ + public DataTypeProperties() { + } + + /** + * Get the provisioningState property: Latest provisioning state of data product. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the state property: State of data type. + * + * @return the state value. + */ + public DataTypeState state() { + return this.state; + } + + /** + * Set the state property: State of data type. + * + * @param state the state value to set. + * @return the DataTypeProperties object itself. + */ + public DataTypeProperties withState(DataTypeState state) { + this.state = state; + return this; + } + + /** + * Get the stateReason property: Reason for the state of data type. + * + * @return the stateReason value. + */ + public String stateReason() { + return this.stateReason; + } + + /** + * Get the storageOutputRetention property: Field for storage output retention in days. + * + * @return the storageOutputRetention value. + */ + public Integer storageOutputRetention() { + return this.storageOutputRetention; + } + + /** + * Set the storageOutputRetention property: Field for storage output retention in days. + * + * @param storageOutputRetention the storageOutputRetention value to set. + * @return the DataTypeProperties object itself. + */ + public DataTypeProperties withStorageOutputRetention(Integer storageOutputRetention) { + this.storageOutputRetention = storageOutputRetention; + return this; + } + + /** + * Get the databaseCacheRetention property: Field for database cache retention in days. + * + * @return the databaseCacheRetention value. + */ + public Integer databaseCacheRetention() { + return this.databaseCacheRetention; + } + + /** + * Set the databaseCacheRetention property: Field for database cache retention in days. + * + * @param databaseCacheRetention the databaseCacheRetention value to set. + * @return the DataTypeProperties object itself. + */ + public DataTypeProperties withDatabaseCacheRetention(Integer databaseCacheRetention) { + this.databaseCacheRetention = databaseCacheRetention; + return this; + } + + /** + * Get the databaseRetention property: Field for database data retention in days. + * + * @return the databaseRetention value. + */ + public Integer databaseRetention() { + return this.databaseRetention; + } + + /** + * Set the databaseRetention property: Field for database data retention in days. + * + * @param databaseRetention the databaseRetention value to set. + * @return the DataTypeProperties object itself. + */ + public DataTypeProperties withDatabaseRetention(Integer databaseRetention) { + this.databaseRetention = databaseRetention; + return this; + } + + /** + * Get the visualizationUrl property: Url for data visualization. + * + * @return the visualizationUrl value. + */ + public String visualizationUrl() { + return this.visualizationUrl; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeState.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeState.java new file mode 100644 index 000000000000..727e80b3a33e --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeState.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The data type state. + */ +public final class DataTypeState extends ExpandableStringEnum { + /** + * Static value Stopped for DataTypeState. + */ + public static final DataTypeState STOPPED = fromString("Stopped"); + + /** + * Static value Running for DataTypeState. + */ + public static final DataTypeState RUNNING = fromString("Running"); + + /** + * Creates a new instance of DataTypeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataTypeState() { + } + + /** + * Creates or finds a DataTypeState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataTypeState. + */ + @JsonCreator + public static DataTypeState fromString(String name) { + return fromString(name, DataTypeState.class); + } + + /** + * Gets known DataTypeState values. + * + * @return known DataTypeState values. + */ + public static Collection values() { + return values(DataTypeState.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeUpdate.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeUpdate.java new file mode 100644 index 000000000000..9960877d3a5f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeUpdate.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The type used for update operations of the DataType. + */ +@Fluent +public final class DataTypeUpdate { + /* + * The updatable properties of the DataType. + */ + @JsonProperty(value = "properties") + private DataTypeUpdateProperties properties; + + /** + * Creates an instance of DataTypeUpdate class. + */ + public DataTypeUpdate() { + } + + /** + * Get the properties property: The updatable properties of the DataType. + * + * @return the properties value. + */ + public DataTypeUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the DataType. + * + * @param properties the properties value to set. + * @return the DataTypeUpdate object itself. + */ + public DataTypeUpdate withProperties(DataTypeUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeUpdateProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeUpdateProperties.java new file mode 100644 index 000000000000..756bbe5ffb34 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypeUpdateProperties.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The updatable properties of the DataType. + */ +@Fluent +public final class DataTypeUpdateProperties { + /* + * State of data type. + */ + @JsonProperty(value = "state") + private DataTypeState state; + + /* + * Field for storage output retention in days. + */ + @JsonProperty(value = "storageOutputRetention") + private Integer storageOutputRetention; + + /* + * Field for database cache retention in days. + */ + @JsonProperty(value = "databaseCacheRetention") + private Integer databaseCacheRetention; + + /* + * Field for database data retention in days. + */ + @JsonProperty(value = "databaseRetention") + private Integer databaseRetention; + + /** + * Creates an instance of DataTypeUpdateProperties class. + */ + public DataTypeUpdateProperties() { + } + + /** + * Get the state property: State of data type. + * + * @return the state value. + */ + public DataTypeState state() { + return this.state; + } + + /** + * Set the state property: State of data type. + * + * @param state the state value to set. + * @return the DataTypeUpdateProperties object itself. + */ + public DataTypeUpdateProperties withState(DataTypeState state) { + this.state = state; + return this; + } + + /** + * Get the storageOutputRetention property: Field for storage output retention in days. + * + * @return the storageOutputRetention value. + */ + public Integer storageOutputRetention() { + return this.storageOutputRetention; + } + + /** + * Set the storageOutputRetention property: Field for storage output retention in days. + * + * @param storageOutputRetention the storageOutputRetention value to set. + * @return the DataTypeUpdateProperties object itself. + */ + public DataTypeUpdateProperties withStorageOutputRetention(Integer storageOutputRetention) { + this.storageOutputRetention = storageOutputRetention; + return this; + } + + /** + * Get the databaseCacheRetention property: Field for database cache retention in days. + * + * @return the databaseCacheRetention value. + */ + public Integer databaseCacheRetention() { + return this.databaseCacheRetention; + } + + /** + * Set the databaseCacheRetention property: Field for database cache retention in days. + * + * @param databaseCacheRetention the databaseCacheRetention value to set. + * @return the DataTypeUpdateProperties object itself. + */ + public DataTypeUpdateProperties withDatabaseCacheRetention(Integer databaseCacheRetention) { + this.databaseCacheRetention = databaseCacheRetention; + return this; + } + + /** + * Get the databaseRetention property: Field for database data retention in days. + * + * @return the databaseRetention value. + */ + public Integer databaseRetention() { + return this.databaseRetention; + } + + /** + * Set the databaseRetention property: Field for database data retention in days. + * + * @param databaseRetention the databaseRetention value to set. + * @return the DataTypeUpdateProperties object itself. + */ + public DataTypeUpdateProperties withDatabaseRetention(Integer databaseRetention) { + this.databaseRetention = databaseRetention; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypes.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypes.java new file mode 100644 index 000000000000..6f9a337aa48b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataTypes.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DataTypes. + */ +public interface DataTypes { + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByDataProduct(String resourceGroupName, String dataProductName); + + /** + * List data type by parent resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataType list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByDataProduct(String resourceGroupName, String dataProductName, Context context); + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String dataProductName, String dataTypeName, + Context context); + + /** + * Retrieve data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource. + */ + DataType get(String resourceGroupName, String dataProductName, String dataTypeName); + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String dataProductName, String dataTypeName); + + /** + * Delete data type resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String dataProductName, String dataTypeName, Context context); + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body); + + /** + * Delete data for data type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteData(String resourceGroupName, String dataProductName, String dataTypeName, Object body, + Context context); + + /** + * Generate sas token for storage container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token along with {@link Response}. + */ + Response generateStorageContainerSasTokenWithResponse(String resourceGroupName, + String dataProductName, String dataTypeName, ContainerSaS body, Context context); + + /** + * Generate sas token for storage container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataProductName The data product resource name. + * @param dataTypeName The data type name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of storage container account sas token. + */ + ContainerSasToken generateStorageContainerSasToken(String resourceGroupName, String dataProductName, + String dataTypeName, ContainerSaS body); + + /** + * Retrieve data type resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response}. + */ + DataType getById(String id); + + /** + * Retrieve data type resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data type resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete data type resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete data type resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DataType resource. + * + * @param name resource name. + * @return the first stage of the new DataType definition. + */ + DataType.DefinitionStages.Blank define(String name); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DefaultAction.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DefaultAction.java new file mode 100644 index 000000000000..a06feaa2fff5 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DefaultAction.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Specifies the default action of allow or deny when no other rules match. + */ +public final class DefaultAction extends ExpandableStringEnum { + /** + * Static value Allow for DefaultAction. + */ + public static final DefaultAction ALLOW = fromString("Allow"); + + /** + * Static value Deny for DefaultAction. + */ + public static final DefaultAction DENY = fromString("Deny"); + + /** + * Creates a new instance of DefaultAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DefaultAction() { + } + + /** + * Creates or finds a DefaultAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultAction. + */ + @JsonCreator + public static DefaultAction fromString(String name) { + return fromString(name, DefaultAction.class); + } + + /** + * Gets known DefaultAction values. + * + * @return known DefaultAction values. + */ + public static Collection values() { + return values(DefaultAction.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/EncryptionKeyDetails.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/EncryptionKeyDetails.java new file mode 100644 index 000000000000..5de09cfc8bbd --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/EncryptionKeyDetails.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Encryption key details. + */ +@Fluent +public final class EncryptionKeyDetails { + /* + * The Uri of the key vault. + */ + @JsonProperty(value = "keyVaultUri", required = true) + private String keyVaultUri; + + /* + * The name of the key vault key. + */ + @JsonProperty(value = "keyName", required = true) + private String keyName; + + /* + * The version of the key vault key. + */ + @JsonProperty(value = "keyVersion", required = true) + private String keyVersion; + + /** + * Creates an instance of EncryptionKeyDetails class. + */ + public EncryptionKeyDetails() { + } + + /** + * Get the keyVaultUri property: The Uri of the key vault. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: The Uri of the key vault. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the EncryptionKeyDetails object itself. + */ + public EncryptionKeyDetails withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the keyName property: The name of the key vault key. + * + * @return the keyName value. + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the keyName property: The name of the key vault key. + * + * @param keyName the keyName value to set. + * @return the EncryptionKeyDetails object itself. + */ + public EncryptionKeyDetails withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the keyVersion property: The version of the key vault key. + * + * @return the keyVersion value. + */ + public String keyVersion() { + return this.keyVersion; + } + + /** + * Set the keyVersion property: The version of the key vault key. + * + * @param keyVersion the keyVersion value to set. + * @return the EncryptionKeyDetails object itself. + */ + public EncryptionKeyDetails withKeyVersion(String keyVersion) { + this.keyVersion = keyVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultUri() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property keyVaultUri in model EncryptionKeyDetails")); + } + if (keyName() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property keyName in model EncryptionKeyDetails")); + } + if (keyVersion() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property keyVersion in model EncryptionKeyDetails")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyDetails.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/IpRules.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/IpRules.java new file mode 100644 index 000000000000..073b90db207d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/IpRules.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * IP rule with specific IP or IP range in CIDR format. + */ +@Fluent +public final class IpRules { + /* + * IP Rules Value + */ + @JsonProperty(value = "value") + private String value; + + /* + * The action of virtual network rule. + */ + @JsonProperty(value = "action", required = true) + private String action; + + /** + * Creates an instance of IpRules class. + */ + public IpRules() { + } + + /** + * Get the value property: IP Rules Value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: IP Rules Value. + * + * @param value the value value to set. + * @return the IpRules object itself. + */ + public IpRules withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the action property: The action of virtual network rule. + * + * @return the action value. + */ + public String action() { + return this.action; + } + + /** + * Set the action property: The action of virtual network rule. + * + * @param action the action value to set. + * @return the IpRules object itself. + */ + public IpRules withAction(String action) { + this.action = action; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (action() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property action in model IpRules")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IpRules.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KeyVaultInfo.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KeyVaultInfo.java new file mode 100644 index 000000000000..bf7bf84fc0c7 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KeyVaultInfo.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details for KeyVault. + */ +@Fluent +public final class KeyVaultInfo { + /* + * key vault url. + */ + @JsonProperty(value = "keyVaultUrl", required = true) + private String keyVaultUrl; + + /** + * Creates an instance of KeyVaultInfo class. + */ + public KeyVaultInfo() { + } + + /** + * Get the keyVaultUrl property: key vault url. + * + * @return the keyVaultUrl value. + */ + public String keyVaultUrl() { + return this.keyVaultUrl; + } + + /** + * Set the keyVaultUrl property: key vault url. + * + * @param keyVaultUrl the keyVaultUrl value to set. + * @return the KeyVaultInfo object itself. + */ + public KeyVaultInfo withKeyVaultUrl(String keyVaultUrl) { + this.keyVaultUrl = keyVaultUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultUrl() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property keyVaultUrl in model KeyVaultInfo")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KeyVaultInfo.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ListRoleAssignments.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ListRoleAssignments.java new file mode 100644 index 000000000000..ad214d52877e --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ListRoleAssignments.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner; +import java.util.List; + +/** + * An immutable client-side representation of ListRoleAssignments. + */ +public interface ListRoleAssignments { + /** + * Gets the count property: Count of role assignments. + * + * @return the count value. + */ + int count(); + + /** + * Gets the roleAssignmentResponse property: list of role assignments. + * + * @return the roleAssignmentResponse value. + */ + List roleAssignmentResponse(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner object. + * + * @return the inner object. + */ + ListRoleAssignmentsInner innerModel(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedResourceGroupConfiguration.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedResourceGroupConfiguration.java new file mode 100644 index 000000000000..0400bd87aa34 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedResourceGroupConfiguration.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ManagedResourceGroup related properties. + */ +@Fluent +public final class ManagedResourceGroupConfiguration { + /* + * Name of managed resource group + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Managed Resource Group location + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * Creates an instance of ManagedResourceGroupConfiguration class. + */ + public ManagedResourceGroupConfiguration() { + } + + /** + * Get the name property: Name of managed resource group. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of managed resource group. + * + * @param name the name value to set. + * @return the ManagedResourceGroupConfiguration object itself. + */ + public ManagedResourceGroupConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get the location property: Managed Resource Group location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Managed Resource Group location. + * + * @param location the location value to set. + * @return the ManagedResourceGroupConfiguration object itself. + */ + public ManagedResourceGroupConfiguration withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property name in model ManagedResourceGroupConfiguration")); + } + if (location() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property location in model ManagedResourceGroupConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedResourceGroupConfiguration.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedServiceIdentity.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedServiceIdentity.java new file mode 100644 index 000000000000..02f264495942 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedServiceIdentity.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import java.util.UUID; + +/** + * Managed service identity (system assigned and/or user assigned identities). + */ +@Fluent +public final class ManagedServiceIdentity { + /* + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /* + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private UUID tenantId; + + /* + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ + @JsonProperty(value = "type", required = true) + private ManagedServiceIdentityType type; + + /* + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys + * will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + */ + @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map userAssignedIdentities; + + /** + * Creates an instance of ManagedServiceIdentity class. + */ + public ManagedServiceIdentity() { + } + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided + * for a system assigned identity. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @param type the type value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity")); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedServiceIdentityType.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedServiceIdentityType.java new file mode 100644 index 000000000000..b62b554cb38f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedServiceIdentityType.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ +public final class ManagedServiceIdentityType extends ExpandableStringEnum { + /** + * Static value None for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType NONE = fromString("None"); + + /** + * Static value SystemAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * Static value UserAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Static value SystemAssigned, UserAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + = fromString("SystemAssigned, UserAssigned"); + + /** + * Creates a new instance of ManagedServiceIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedServiceIdentityType() { + } + + /** + * Creates or finds a ManagedServiceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedServiceIdentityType. + */ + @JsonCreator + public static ManagedServiceIdentityType fromString(String name) { + return fromString(name, ManagedServiceIdentityType.class); + } + + /** + * Gets known ManagedServiceIdentityType values. + * + * @return known ManagedServiceIdentityType values. + */ + public static Collection values() { + return values(ManagedServiceIdentityType.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operation.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operation.java new file mode 100644 index 000000000000..666f8653ab5c --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operation.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; + +/** + * An immutable client-side representation of Operation. + */ +public interface Operation { + /** + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationDisplay.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationDisplay.java new file mode 100644 index 000000000000..f3089db10978 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationDisplay.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Localized display information for this particular operation. + */ +@Immutable +public final class OperationDisplay { + /* + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + * Compute". + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + * Schedule Collections". + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + * Machine", "Restart Virtual Machine". + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Creates an instance of OperationDisplay class. + */ + public OperationDisplay() { + } + + /** + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationListResult.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationListResult.java new file mode 100644 index 000000000000..1fced1eee5ca --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationListResult.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set + * of results. + */ +@Immutable +public final class OperationListResult { + /* + * List of operations supported by the resource provider + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of OperationListResult class. + */ + public OperationListResult() { + } + + /** + * Get the value property: List of operations supported by the resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operations.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operations.java new file mode 100644 index 000000000000..ecf29e142584 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operations.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Operations. + */ +public interface Operations { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Origin.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Origin.java new file mode 100644 index 000000000000..697e13e080d2 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Origin.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** + * Static value user for Origin. + */ + public static final Origin USER = fromString("user"); + + /** + * Static value system for Origin. + */ + public static final Origin SYSTEM = fromString("system"); + + /** + * Static value user,system for Origin. + */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ProvisioningState.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ProvisioningState.java new file mode 100644 index 000000000000..bb9d98874249 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ProvisioningState.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The status of the current operation. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for ProvisioningState. + */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ProvisioningState. + */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ProvisioningState. + */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Provisioning for ProvisioningState. + */ + public static final ProvisioningState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Updating for ProvisioningState. + */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for ProvisioningState. + */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Accepted for ProvisioningState. + */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PublisherInformation.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PublisherInformation.java new file mode 100644 index 000000000000..fa799f5275e8 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PublisherInformation.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Details for Publisher Information. + */ +@Fluent +public final class PublisherInformation { + /* + * Name of the publisher. + */ + @JsonProperty(value = "publisherName", required = true) + private String publisherName; + + /* + * Data product information. + */ + @JsonProperty(value = "dataProducts", required = true) + private List dataProducts; + + /** + * Creates an instance of PublisherInformation class. + */ + public PublisherInformation() { + } + + /** + * Get the publisherName property: Name of the publisher. + * + * @return the publisherName value. + */ + public String publisherName() { + return this.publisherName; + } + + /** + * Set the publisherName property: Name of the publisher. + * + * @param publisherName the publisherName value to set. + * @return the PublisherInformation object itself. + */ + public PublisherInformation withPublisherName(String publisherName) { + this.publisherName = publisherName; + return this; + } + + /** + * Get the dataProducts property: Data product information. + * + * @return the dataProducts value. + */ + public List dataProducts() { + return this.dataProducts; + } + + /** + * Set the dataProducts property: Data product information. + * + * @param dataProducts the dataProducts value to set. + * @return the PublisherInformation object itself. + */ + public PublisherInformation withDataProducts(List dataProducts) { + this.dataProducts = dataProducts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publisherName() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property publisherName in model PublisherInformation")); + } + if (dataProducts() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataProducts in model PublisherInformation")); + } else { + dataProducts().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PublisherInformation.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RoleAssignmentCommonProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RoleAssignmentCommonProperties.java new file mode 100644 index 000000000000..1875d506327d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RoleAssignmentCommonProperties.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The details for role assignment common properties. + */ +@Fluent +public final class RoleAssignmentCommonProperties { + /* + * Role Id of the Built-In Role + */ + @JsonProperty(value = "roleId", required = true) + private String roleId; + + /* + * Object ID of the AAD principal or security-group. + */ + @JsonProperty(value = "principalId", required = true) + private String principalId; + + /* + * User name. + */ + @JsonProperty(value = "userName", required = true) + private String username; + + /* + * Data Type Scope at which the role assignment is created. + */ + @JsonProperty(value = "dataTypeScope", required = true) + private List dataTypeScope; + + /* + * Type of the principal Id: User, Group or ServicePrincipal + */ + @JsonProperty(value = "principalType", required = true) + private String principalType; + + /* + * Data Product role to be assigned to a user. + */ + @JsonProperty(value = "role", required = true) + private DataProductUserRole role; + + /** + * Creates an instance of RoleAssignmentCommonProperties class. + */ + public RoleAssignmentCommonProperties() { + } + + /** + * Get the roleId property: Role Id of the Built-In Role. + * + * @return the roleId value. + */ + public String roleId() { + return this.roleId; + } + + /** + * Set the roleId property: Role Id of the Built-In Role. + * + * @param roleId the roleId value to set. + * @return the RoleAssignmentCommonProperties object itself. + */ + public RoleAssignmentCommonProperties withRoleId(String roleId) { + this.roleId = roleId; + return this; + } + + /** + * Get the principalId property: Object ID of the AAD principal or security-group. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principalId property: Object ID of the AAD principal or security-group. + * + * @param principalId the principalId value to set. + * @return the RoleAssignmentCommonProperties object itself. + */ + public RoleAssignmentCommonProperties withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get the username property: User name. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: User name. + * + * @param username the username value to set. + * @return the RoleAssignmentCommonProperties object itself. + */ + public RoleAssignmentCommonProperties withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the dataTypeScope property: Data Type Scope at which the role assignment is created. + * + * @return the dataTypeScope value. + */ + public List dataTypeScope() { + return this.dataTypeScope; + } + + /** + * Set the dataTypeScope property: Data Type Scope at which the role assignment is created. + * + * @param dataTypeScope the dataTypeScope value to set. + * @return the RoleAssignmentCommonProperties object itself. + */ + public RoleAssignmentCommonProperties withDataTypeScope(List dataTypeScope) { + this.dataTypeScope = dataTypeScope; + return this; + } + + /** + * Get the principalType property: Type of the principal Id: User, Group or ServicePrincipal. + * + * @return the principalType value. + */ + public String principalType() { + return this.principalType; + } + + /** + * Set the principalType property: Type of the principal Id: User, Group or ServicePrincipal. + * + * @param principalType the principalType value to set. + * @return the RoleAssignmentCommonProperties object itself. + */ + public RoleAssignmentCommonProperties withPrincipalType(String principalType) { + this.principalType = principalType; + return this; + } + + /** + * Get the role property: Data Product role to be assigned to a user. + * + * @return the role value. + */ + public DataProductUserRole role() { + return this.role; + } + + /** + * Set the role property: Data Product role to be assigned to a user. + * + * @param role the role value to set. + * @return the RoleAssignmentCommonProperties object itself. + */ + public RoleAssignmentCommonProperties withRole(DataProductUserRole role) { + this.role = role; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (roleId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property roleId in model RoleAssignmentCommonProperties")); + } + if (principalId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property principalId in model RoleAssignmentCommonProperties")); + } + if (username() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property username in model RoleAssignmentCommonProperties")); + } + if (dataTypeScope() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property dataTypeScope in model RoleAssignmentCommonProperties")); + } + if (principalType() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property principalType in model RoleAssignmentCommonProperties")); + } + if (role() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property role in model RoleAssignmentCommonProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RoleAssignmentCommonProperties.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RoleAssignmentDetail.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RoleAssignmentDetail.java new file mode 100644 index 000000000000..3ae1886310fc --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RoleAssignmentDetail.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import java.util.List; + +/** + * An immutable client-side representation of RoleAssignmentDetail. + */ +public interface RoleAssignmentDetail { + /** + * Gets the roleId property: Role Id of the Built-In Role. + * + * @return the roleId value. + */ + String roleId(); + + /** + * Gets the principalId property: Object ID of the AAD principal or security-group. + * + * @return the principalId value. + */ + String principalId(); + + /** + * Gets the username property: User name. + * + * @return the username value. + */ + String username(); + + /** + * Gets the dataTypeScope property: Data Type Scope at which the role assignment is created. + * + * @return the dataTypeScope value. + */ + List dataTypeScope(); + + /** + * Gets the principalType property: Type of the principal Id: User, Group or ServicePrincipal. + * + * @return the principalType value. + */ + String principalType(); + + /** + * Gets the role property: Data Product role to be assigned to a user. + * + * @return the role value. + */ + DataProductUserRole role(); + + /** + * Gets the roleAssignmentId property: Id of role assignment request. + * + * @return the roleAssignmentId value. + */ + String roleAssignmentId(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner object. + * + * @return the inner object. + */ + RoleAssignmentDetailInner innerModel(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/UserAssignedIdentity.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/UserAssignedIdentity.java new file mode 100644 index 000000000000..76fab2986d86 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/UserAssignedIdentity.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** + * User assigned identity properties. + */ +@Immutable +public final class UserAssignedIdentity { + /* + * The principal ID of the assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /* + * The client ID of the assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private UUID clientId; + + /** + * Creates an instance of UserAssignedIdentity class. + */ + public UserAssignedIdentity() { + } + + /** + * Get the principalId property: The principal ID of the assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client ID of the assigned identity. + * + * @return the clientId value. + */ + public UUID clientId() { + return this.clientId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkRule.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkRule.java new file mode 100644 index 000000000000..0a5b21bcd5e1 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkRule.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual Network Rule. + */ +@Fluent +public final class VirtualNetworkRule { + /* + * Resource ID of a subnet + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * The action of virtual network rule. + */ + @JsonProperty(value = "action") + private String action; + + /* + * Gets the state of virtual network rule. + */ + @JsonProperty(value = "state") + private String state; + + /** + * Creates an instance of VirtualNetworkRule class. + */ + public VirtualNetworkRule() { + } + + /** + * Get the id property: Resource ID of a subnet. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID of a subnet. + * + * @param id the id value to set. + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withId(String id) { + this.id = id; + return this; + } + + /** + * Get the action property: The action of virtual network rule. + * + * @return the action value. + */ + public String action() { + return this.action; + } + + /** + * Set the action property: The action of virtual network rule. + * + * @param action the action value to set. + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withAction(String action) { + this.action = action; + return this; + } + + /** + * Get the state property: Gets the state of virtual network rule. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Set the state property: Gets the state of virtual network rule. + * + * @param state the state value to set. + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withState(String state) { + this.state = state; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property id in model VirtualNetworkRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkRule.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/package-info.java new file mode 100644 index 000000000000..a471d6d4ab29 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for NetworkAnalyticsMgmtClient. + * null. + */ +package com.azure.resourcemanager.networkanalytics.models; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/package-info.java new file mode 100644 index 000000000000..c2eac74843c1 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for NetworkAnalyticsMgmtClient. + * null. + */ +package com.azure.resourcemanager.networkanalytics; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/module-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/module-info.java new file mode 100644 index 000000000000..51acd5a793c5 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/module-info.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.networkanalytics { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.networkanalytics; + exports com.azure.resourcemanager.networkanalytics.fluent; + exports com.azure.resourcemanager.networkanalytics.fluent.models; + exports com.azure.resourcemanager.networkanalytics.models; + + opens com.azure.resourcemanager.networkanalytics.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.networkanalytics.models to com.azure.core, com.fasterxml.jackson.databind; +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkanalytics/proxy-config.json b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkanalytics/proxy-config.json new file mode 100644 index 000000000000..274a22d318d2 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkanalytics/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.networkanalytics.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.networkanalytics.implementation.DataProductsClientImpl$DataProductsService" ], [ "com.azure.resourcemanager.networkanalytics.implementation.DataProductsCatalogsClientImpl$DataProductsCatalogsService" ], [ "com.azure.resourcemanager.networkanalytics.implementation.DataTypesClientImpl$DataTypesService" ] ] \ No newline at end of file diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkanalytics/reflect-config.json b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkanalytics/reflect-config.json new file mode 100644 index 000000000000..373cf533b62e --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-networkanalytics/reflect-config.json @@ -0,0 +1,216 @@ +[ { + "name" : "com.azure.resourcemanager.networkanalytics.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.fluent.models.DataProductInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.EncryptionKeyDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductNetworkAcls", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.VirtualNetworkRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.IpRules", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.ConsumptionEndpointsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.UserAssignedIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.PublisherInformation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductInformation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductVersion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataTypeListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataTypeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataTypeUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataTypeUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.ContainerSaS", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.fluent.models.ContainerSasTokenInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.AccountSas", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.fluent.models.AccountSasTokenInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.ControlState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DefaultAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataProductUserRole", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.networkanalytics.models.DataTypeState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsAddUserRoleSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsAddUserRoleSamples.java new file mode 100644 index 000000000000..5623c1ae09b3 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsAddUserRoleSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties; +import java.util.Arrays; + +/** + * Samples for DataProducts AddUserRole. + */ +public final class DataProductsAddUserRoleSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_AddUserRole_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().addUserRoleWithResponse("aoiresourceGroupName", "dataproduct01", + new RoleAssignmentCommonProperties().withRoleId("00000000-0000-0000-0000-00000000000") + .withPrincipalId("00000000-0000-0000-0000-00000000000").withUsername("userName") + .withDataTypeScope(Arrays.asList("scope")).withPrincipalType("User") + .withRole(DataProductUserRole.READER), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_AddUserRole_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_AddUserRole_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsAddUserRoleMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().addUserRoleWithResponse("aoiresourceGroupName", "dataproduct01", + new RoleAssignmentCommonProperties().withRoleId("00000000-0000-0000-0000-00000000000") + .withPrincipalId("00000000-0000-0000-0000-00000000000").withUsername("UserName") + .withDataTypeScope(Arrays.asList("scope")).withPrincipalType("User") + .withRole(DataProductUserRole.READER), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsGetByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..501739a40693 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsGetByResourceGroupSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataProductsCatalogs GetByResourceGroup. + */ +public final class DataProductsCatalogsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProductsCatalogs_Get_MinimumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().getByResourceGroupWithResponse("aoiresourceGroupName", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProductsCatalogs_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_Get_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsGetMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().getByResourceGroupWithResponse("aoiresourceGroupName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListByResourceGroupSamples.java new file mode 100644 index 000000000000..f5b3eb22472a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListByResourceGroupSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataProductsCatalogs ListByResourceGroup. + */ +public final class DataProductsCatalogsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().listByResourceGroup("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsListByResourceGroupMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().listByResourceGroup("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListSamples.java new file mode 100644 index 000000000000..70ee3cdee1ea --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataProductsCatalogs List. + */ +public final class DataProductsCatalogsListSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: DataProductsCatalogs_ListBySubscription_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCatalogsListBySubscriptionMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProductsCatalogs().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCreateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCreateSamples.java new file mode 100644 index 000000000000..1b93168922c0 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCreateSamples.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.ControlState; +import com.azure.resourcemanager.networkanalytics.models.DataProductNetworkAcls; +import com.azure.resourcemanager.networkanalytics.models.DataProductProperties; +import com.azure.resourcemanager.networkanalytics.models.DefaultAction; +import com.azure.resourcemanager.networkanalytics.models.EncryptionKeyDetails; +import com.azure.resourcemanager.networkanalytics.models.IpRules; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.networkanalytics.models.UserAssignedIdentity; +import com.azure.resourcemanager.networkanalytics.models.VirtualNetworkRule; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DataProducts Create. + */ +public final class DataProductsCreateSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_Create_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_Create_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + dataProductsCreateMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().define("dataproduct01").withRegion("eastus") + .withExistingResourceGroup("aoiresourceGroupName") + .withTags(mapOf("userSpecifiedKeyName", "fakeTokenPlaceholder")) + .withProperties(new DataProductProperties().withPublisher("Microsoft").withProduct("MCC") + .withMajorVersion("1.0.0").withOwners(Arrays.asList("abc@micros.com")) + .withRedundancy(ControlState.DISABLED).withPurviewAccount("testpurview") + .withPurviewCollection("134567890").withPrivateLinksEnabled(ControlState.DISABLED) + .withPublicNetworkAccess(ControlState.ENABLED) + .withCustomerManagedKeyEncryptionEnabled(ControlState.ENABLED) + .withCustomerEncryptionKey(new EncryptionKeyDetails().withKeyVaultUri("fakeTokenPlaceholder") + .withKeyName("fakeTokenPlaceholder").withKeyVersion("fakeTokenPlaceholder")) + .withNetworkacls(new DataProductNetworkAcls() + .withVirtualNetworkRule(Arrays.asList(new VirtualNetworkRule().withId( + "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName") + .withAction("Allow").withState(""))) + .withIpRules(Arrays.asList(new IpRules().withValue("1.1.1.1").withAction("Allow"))) + .withAllowedQueryIpRangeList(Arrays.asList("1.1.1.1")).withDefaultAction(DefaultAction.ALLOW)) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) + .withCurrentMinorVersion("1.0.1")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + new UserAssignedIdentity()))) + .create(); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_Create_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().define("dataproduct01").withRegion("eastus") + .withExistingResourceGroup("aoiresourceGroupName") + .withTags(mapOf("userSpecifiedKeyName", "fakeTokenPlaceholder")) + .withProperties( + new DataProductProperties().withPublisher("Microsoft").withProduct("MCC").withMajorVersion("1.0.0")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsDeleteSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsDeleteSamples.java new file mode 100644 index 000000000000..615a154fd215 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsDeleteSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataProducts Delete. + */ +public final class DataProductsDeleteSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_Delete_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + dataProductsDeleteMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().delete("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().delete("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsGenerateStorageAccountSasTokenSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsGenerateStorageAccountSasTokenSamples.java new file mode 100644 index 000000000000..024769b4cbca --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsGenerateStorageAccountSasTokenSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.AccountSas; +import java.time.OffsetDateTime; + +/** + * Samples for DataProducts GenerateStorageAccountSasToken. + */ +public final class DataProductsGenerateStorageAccountSasTokenSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] + * rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().generateStorageAccountSasTokenWithResponse("aoiresourceGroupName", "dataproduct01", + new AccountSas().withStartTimestamp(OffsetDateTime.parse("2023-08-24T05:35:17.051Z")) + .withExpiryTimestamp(OffsetDateTime.parse("2023-08-24T05:35:17.051Z")).withIpAddress("1.1.1.1"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsGenerateStorageAccountSasTokenMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().generateStorageAccountSasTokenWithResponse("aoiresourceGroupName", "dataproduct01", + new AccountSas().withStartTimestamp(OffsetDateTime.parse("2023-08-24T05:34:58.151Z")) + .withExpiryTimestamp(OffsetDateTime.parse("2023-08-24T05:34:58.151Z")).withIpAddress("1.1.1.1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsGetByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..36af561f2ac1 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsGetByResourceGroupSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataProducts GetByResourceGroup. + */ +public final class DataProductsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_Get_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + dataProductsGetMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().getByResourceGroupWithResponse("aoiresourceGroupName", "dataproduct01", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_Get_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().getByResourceGroupWithResponse("aoiresourceGroupName", "dataproduct01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListByResourceGroupSamples.java new file mode 100644 index 000000000000..2e4c78e06fb3 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListByResourceGroupSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataProducts ListByResourceGroup. + */ +public final class DataProductsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().listByResourceGroup("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().listByResourceGroup("aoiresourceGroupName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListRolesAssignmentsSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListRolesAssignmentsSamples.java new file mode 100644 index 000000000000..2a467222b1dd --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListRolesAssignmentsSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** + * Samples for DataProducts ListRolesAssignments. + */ +public final class DataProductsListRolesAssignmentsSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_ListRolesAssignments_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) throws IOException { + manager.dataProducts() + .listRolesAssignmentsWithResponse("aoiresourceGroupName", "dataproduct01", SerializerFactory + .createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_ListRolesAssignments_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListRolesAssignments_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListRolesAssignmentsMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) throws IOException { + manager.dataProducts() + .listRolesAssignmentsWithResponse("aoiresourceGroupName", "dataproduct01", SerializerFactory + .createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListSamples.java new file mode 100644 index 000000000000..6d6259f4efdd --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataProducts List. + */ +public final class DataProductsListSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRemoveUserRoleSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRemoveUserRoleSamples.java new file mode 100644 index 000000000000..31c0f8f79a06 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRemoveUserRoleSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import java.util.Arrays; + +/** + * Samples for DataProducts RemoveUserRole. + */ +public final class DataProductsRemoveUserRoleSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_RemoveUserRole_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_RemoveUserRole_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsRemoveUserRoleMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().removeUserRoleWithResponse("aoiresourceGroupName", "dataproduct01", + new RoleAssignmentDetailInner().withRoleId("00000000-0000-0000-0000-00000000000") + .withPrincipalId("00000000-0000-0000-0000-00000000000").withUsername("UserName") + .withDataTypeScope(Arrays.asList("scope")).withPrincipalType("User") + .withRole(DataProductUserRole.READER).withRoleAssignmentId("00000000-0000-0000-0000-00000000000"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_RemoveUserRole_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().removeUserRoleWithResponse("aoiresourceGroupName", "dataproduct01", + new RoleAssignmentDetailInner().withRoleId("00000000-0000-0000-0000-00000000000") + .withPrincipalId("00000000-0000-0000-0000-00000000000").withUsername("UserName") + .withDataTypeScope(Arrays.asList("scope")).withPrincipalType("User") + .withRole(DataProductUserRole.READER).withRoleAssignmentId("00000000-0000-0000-0000-00000000000"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRotateKeySamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRotateKeySamples.java new file mode 100644 index 000000000000..a42bd3c754dc --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRotateKeySamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.KeyVaultInfo; + +/** + * Samples for DataProducts RotateKey. + */ +public final class DataProductsRotateKeySamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_RotateKey_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_RotateKey_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + dataProductsRotateKeyMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().rotateKeyWithResponse("aoiresourceGroupName", "dataproduct01", + new KeyVaultInfo().withKeyVaultUrl("fakeTokenPlaceholder"), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_RotateKey_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataProducts().rotateKeyWithResponse("aoiresourceGroupName", "dataproduct01", + new KeyVaultInfo().withKeyVaultUrl("fakeTokenPlaceholder"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsUpdateSamples.java new file mode 100644 index 000000000000..a2031d49dee9 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsUpdateSamples.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.ControlState; +import com.azure.resourcemanager.networkanalytics.models.DataProduct; +import com.azure.resourcemanager.networkanalytics.models.DataProductUpdateProperties; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.networkanalytics.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DataProducts Update. + */ +public final class DataProductsUpdateSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_Update_MaximumSet_Gen.json + */ + /** + * Sample code: DataProducts_Update_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + dataProductsUpdateMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + DataProduct resource = manager.dataProducts() + .getByResourceGroupWithResponse("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("userSpecifiedKeyName", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + new UserAssignedIdentity()))) + .withProperties( + new DataProductUpdateProperties().withOwners(Arrays.asList("abc@micros.com", "def@micros.com")) + .withPurviewAccount("testpurview").withPurviewCollection("134567890") + .withPrivateLinksEnabled(ControlState.DISABLED).withCurrentMinorVersion("1.0.1")) + .apply(); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataProducts_Update_MinimumSet_Gen.json + */ + /** + * Sample code: DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + DataProduct resource = manager.dataProducts() + .getByResourceGroupWithResponse("aoiresourceGroupName", "dataproduct01", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesCreateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesCreateSamples.java new file mode 100644 index 000000000000..126be7572836 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesCreateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; + +/** + * Samples for DataTypes Create. + */ +public final class DataTypesCreateSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_Create_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_Create_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + dataTypesCreateMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().define("datatypename").withExistingDataProduct("aoiresourceGroupName", "dataproduct01") + .withProperties(new DataTypeProperties().withState(DataTypeState.fromString("STARTED")) + .withStorageOutputRetention(27).withDatabaseCacheRetention(23).withDatabaseRetention(6)) + .create(); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_Create_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().define("datatypename").withExistingDataProduct("aoiresourceGroupName", "dataproduct01") + .create(); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesDeleteDataSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesDeleteDataSamples.java new file mode 100644 index 000000000000..75d988400552 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesDeleteDataSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** + * Samples for DataTypes DeleteData. + */ +public final class DataTypesDeleteDataSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_DeleteData_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_DeleteData_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesDeleteDataMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) throws IOException { + manager.dataTypes() + .deleteData("aoiresourceGroupName", "dataproduct01", "datatypename", SerializerFactory + .createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_DeleteData_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_DeleteData_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesDeleteDataMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) throws IOException { + manager.dataTypes() + .deleteData("aoiresourceGroupName", "dataproduct01", "datatypename", SerializerFactory + .createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesDeleteSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesDeleteSamples.java new file mode 100644 index 000000000000..ea07350af132 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesDeleteSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataTypes Delete. + */ +public final class DataTypesDeleteSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().delete("aoiresourceGroupName", "dataproduct01", "datatypename", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_Delete_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + dataTypesDeleteMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().delete("aoiresourceGroupName", "dataproduct01", "datatypename", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGenerateStorageContainerSasTokenSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGenerateStorageContainerSasTokenSamples.java new file mode 100644 index 000000000000..b892aea87ab5 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGenerateStorageContainerSasTokenSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.ContainerSaS; +import java.time.OffsetDateTime; + +/** + * Samples for DataTypes GenerateStorageContainerSasToken. + */ +public final class DataTypesGenerateStorageContainerSasTokenSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesGenerateStorageContainerSasTokenMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().generateStorageContainerSasTokenWithResponse("aoiresourceGroupName", "dataproduct01", + "datatypename", + new ContainerSaS().withStartTimestamp(OffsetDateTime.parse("2023-08-24T05:34:58.039Z")) + .withExpiryTimestamp(OffsetDateTime.parse("2023-08-24T05:34:58.039Z")).withIpAddress("1.1.1.1"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] + * rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().generateStorageContainerSasTokenWithResponse("aoiresourceGroupName", "dataproduct01", + "datatypename", + new ContainerSaS().withStartTimestamp(OffsetDateTime.parse("2023-08-24T05:35:16.887Z")) + .withExpiryTimestamp(OffsetDateTime.parse("2023-08-24T05:35:16.887Z")).withIpAddress("1.1.1.1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGetSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGetSamples.java new file mode 100644 index 000000000000..c0297be64593 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGetSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataTypes Get. + */ +public final class DataTypesGetSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_Get_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().getWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_Get_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + dataTypesGetMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().getWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesListByDataProductSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesListByDataProductSamples.java new file mode 100644 index 000000000000..9aee933006c7 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesListByDataProductSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for DataTypes ListByDataProduct. + */ +public final class DataTypesListByDataProductSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_ListByDataProduct_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_ListByDataProduct_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesListByDataProductMaximumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().listByDataProduct("aoiresourceGroupName", "dataproduct01", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_ListByDataProduct_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.dataTypes().listByDataProduct("aoiresourceGroupName", "dataproduct01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesUpdateSamples.java new file mode 100644 index 000000000000..7aede019f90c --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesUpdateSamples.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.DataType; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdateProperties; + +/** + * Samples for DataTypes Update. + */ +public final class DataTypesUpdateSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_Update_MinimumSet_Gen.json + */ + /** + * Sample code: DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void dataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + DataType resource = manager.dataTypes() + .getWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * DataTypes_Update_MaximumSet_Gen.json + */ + /** + * Sample code: DataTypes_Update_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + dataTypesUpdateMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + DataType resource = manager.dataTypes() + .getWithResponse("aoiresourceGroupName", "dataproduct01", "datatypename", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new DataTypeUpdateProperties().withState(DataTypeState.fromString("STARTED")) + .withStorageOutputRetention(30).withDatabaseCacheRetention(16).withDatabaseRetention(9)).apply(); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListSamples.java new file mode 100644 index 000000000000..b81379bb486a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * Operations_List_MinimumSet_Gen.json + */ + /** + * Sample code: Operations_List_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void operationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen( + com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/ + * Operations_List_MaximumSet_Gen.json + */ + /** + * Sample code: Operations_List_MaximumSet_Gen. + * + * @param manager Entry point to NetworkAnalyticsManager. + */ + public static void + operationsListMaximumSetGen(com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/AccountSasTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/AccountSasTests.java new file mode 100644 index 000000000000..ffe7e9bec70c --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/AccountSasTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.AccountSas; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class AccountSasTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccountSas model = BinaryData.fromString( + "{\"startTimeStamp\":\"2021-04-17T17:42:02Z\",\"expiryTimeStamp\":\"2021-04-15T11:53:36Z\",\"ipAddress\":\"pclhocohslk\"}") + .toObject(AccountSas.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T17:42:02Z"), model.startTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T11:53:36Z"), model.expiryTimestamp()); + Assertions.assertEquals("pclhocohslk", model.ipAddress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccountSas model = new AccountSas().withStartTimestamp(OffsetDateTime.parse("2021-04-17T17:42:02Z")) + .withExpiryTimestamp(OffsetDateTime.parse("2021-04-15T11:53:36Z")) + .withIpAddress("pclhocohslk"); + model = BinaryData.fromObject(model).toObject(AccountSas.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T17:42:02Z"), model.startTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T11:53:36Z"), model.expiryTimestamp()); + Assertions.assertEquals("pclhocohslk", model.ipAddress()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ConsumptionEndpointsPropertiesTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ConsumptionEndpointsPropertiesTests.java new file mode 100644 index 000000000000..205163d36989 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ConsumptionEndpointsPropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.ConsumptionEndpointsProperties; + +public final class ConsumptionEndpointsPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConsumptionEndpointsProperties model = BinaryData.fromString( + "{\"ingestionUrl\":\"vmgxsab\",\"ingestionResourceId\":\"qduujitcjczdz\",\"fileAccessUrl\":\"ndhkrw\",\"fileAccessResourceId\":\"appd\",\"queryUrl\":\"dkvwrwjfe\",\"queryResourceId\":\"nhutjeltmrldhugj\"}") + .toObject(ConsumptionEndpointsProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConsumptionEndpointsProperties model = new ConsumptionEndpointsProperties(); + model = BinaryData.fromObject(model).toObject(ConsumptionEndpointsProperties.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ContainerSaSTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ContainerSaSTests.java new file mode 100644 index 000000000000..4787f385eb3d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ContainerSaSTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.ContainerSaS; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class ContainerSaSTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ContainerSaS model = BinaryData.fromString( + "{\"startTimeStamp\":\"2021-09-15T05:38:02Z\",\"expiryTimeStamp\":\"2021-05-02T14:53:40Z\",\"ipAddress\":\"v\"}") + .toObject(ContainerSaS.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T05:38:02Z"), model.startTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T14:53:40Z"), model.expiryTimestamp()); + Assertions.assertEquals("v", model.ipAddress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ContainerSaS model = new ContainerSaS().withStartTimestamp(OffsetDateTime.parse("2021-09-15T05:38:02Z")) + .withExpiryTimestamp(OffsetDateTime.parse("2021-05-02T14:53:40Z")) + .withIpAddress("v"); + model = BinaryData.fromObject(model).toObject(ContainerSaS.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T05:38:02Z"), model.startTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T14:53:40Z"), model.expiryTimestamp()); + Assertions.assertEquals("v", model.ipAddress()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductInformationTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductInformationTests.java new file mode 100644 index 000000000000..a127ea9f0c29 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductInformationTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.DataProductInformation; +import com.azure.resourcemanager.networkanalytics.models.DataProductVersion; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DataProductInformationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataProductInformation model = BinaryData.fromString( + "{\"dataProductName\":\"xibqeojnx\",\"description\":\"bzv\",\"dataProductVersions\":[{\"version\":\"ntwndeicbtwnpzao\"},{\"version\":\"vuhrhcffcyddgl\"},{\"version\":\"jthjqkwpyei\"}]}") + .toObject(DataProductInformation.class); + Assertions.assertEquals("xibqeojnx", model.dataProductName()); + Assertions.assertEquals("bzv", model.description()); + Assertions.assertEquals("ntwndeicbtwnpzao", model.dataProductVersions().get(0).version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataProductInformation model = new DataProductInformation().withDataProductName("xibqeojnx") + .withDescription("bzv") + .withDataProductVersions(Arrays.asList(new DataProductVersion().withVersion("ntwndeicbtwnpzao"), + new DataProductVersion().withVersion("vuhrhcffcyddgl"), + new DataProductVersion().withVersion("jthjqkwpyei"))); + model = BinaryData.fromObject(model).toObject(DataProductInformation.class); + Assertions.assertEquals("xibqeojnx", model.dataProductName()); + Assertions.assertEquals("bzv", model.description()); + Assertions.assertEquals("ntwndeicbtwnpzao", model.dataProductVersions().get(0).version()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductNetworkAclsTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductNetworkAclsTests.java new file mode 100644 index 000000000000..ff73cce9c652 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductNetworkAclsTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.DataProductNetworkAcls; +import com.azure.resourcemanager.networkanalytics.models.DefaultAction; +import com.azure.resourcemanager.networkanalytics.models.IpRules; +import com.azure.resourcemanager.networkanalytics.models.VirtualNetworkRule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DataProductNetworkAclsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataProductNetworkAcls model = BinaryData.fromString( + "{\"virtualNetworkRule\":[{\"id\":\"nmayhuybb\",\"action\":\"odepoogin\",\"state\":\"amiheognarxz\"}],\"ipRules\":[{\"value\":\"eotusivyevc\",\"action\":\"iqihn\"},{\"value\":\"ngbwjz\",\"action\":\"nfygxgispemvtz\"},{\"value\":\"ufubl\",\"action\":\"ofx\"}],\"allowedQueryIpRangeList\":[\"ofjaeqjhqjb\",\"s\",\"msmjqulngsntn\"],\"defaultAction\":\"Allow\"}") + .toObject(DataProductNetworkAcls.class); + Assertions.assertEquals("nmayhuybb", model.virtualNetworkRule().get(0).id()); + Assertions.assertEquals("odepoogin", model.virtualNetworkRule().get(0).action()); + Assertions.assertEquals("amiheognarxz", model.virtualNetworkRule().get(0).state()); + Assertions.assertEquals("eotusivyevc", model.ipRules().get(0).value()); + Assertions.assertEquals("iqihn", model.ipRules().get(0).action()); + Assertions.assertEquals("ofjaeqjhqjb", model.allowedQueryIpRangeList().get(0)); + Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataProductNetworkAcls model = new DataProductNetworkAcls() + .withVirtualNetworkRule(Arrays + .asList(new VirtualNetworkRule().withId("nmayhuybb").withAction("odepoogin").withState("amiheognarxz"))) + .withIpRules(Arrays.asList(new IpRules().withValue("eotusivyevc").withAction("iqihn"), + new IpRules().withValue("ngbwjz").withAction("nfygxgispemvtz"), + new IpRules().withValue("ufubl").withAction("ofx"))) + .withAllowedQueryIpRangeList(Arrays.asList("ofjaeqjhqjb", "s", "msmjqulngsntn")) + .withDefaultAction(DefaultAction.ALLOW); + model = BinaryData.fromObject(model).toObject(DataProductNetworkAcls.class); + Assertions.assertEquals("nmayhuybb", model.virtualNetworkRule().get(0).id()); + Assertions.assertEquals("odepoogin", model.virtualNetworkRule().get(0).action()); + Assertions.assertEquals("amiheognarxz", model.virtualNetworkRule().get(0).state()); + Assertions.assertEquals("eotusivyevc", model.ipRules().get(0).value()); + Assertions.assertEquals("iqihn", model.ipRules().get(0).action()); + Assertions.assertEquals("ofjaeqjhqjb", model.allowedQueryIpRangeList().get(0)); + Assertions.assertEquals(DefaultAction.ALLOW, model.defaultAction()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductUpdatePropertiesTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductUpdatePropertiesTests.java new file mode 100644 index 000000000000..274b1e4caa09 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductUpdatePropertiesTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.ControlState; +import com.azure.resourcemanager.networkanalytics.models.DataProductUpdateProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DataProductUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataProductUpdateProperties model = BinaryData.fromString( + "{\"owners\":[\"ampmngnz\",\"c\",\"aqw\",\"ochcbonqvpkvl\"],\"purviewAccount\":\"njeaseipheofloke\",\"purviewCollection\":\"ienjbdlwtgr\",\"privateLinksEnabled\":\"Disabled\",\"currentMinorVersion\":\"pj\"}") + .toObject(DataProductUpdateProperties.class); + Assertions.assertEquals("ampmngnz", model.owners().get(0)); + Assertions.assertEquals("njeaseipheofloke", model.purviewAccount()); + Assertions.assertEquals("ienjbdlwtgr", model.purviewCollection()); + Assertions.assertEquals(ControlState.DISABLED, model.privateLinksEnabled()); + Assertions.assertEquals("pj", model.currentMinorVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataProductUpdateProperties model + = new DataProductUpdateProperties().withOwners(Arrays.asList("ampmngnz", "c", "aqw", "ochcbonqvpkvl")) + .withPurviewAccount("njeaseipheofloke") + .withPurviewCollection("ienjbdlwtgr") + .withPrivateLinksEnabled(ControlState.DISABLED) + .withCurrentMinorVersion("pj"); + model = BinaryData.fromObject(model).toObject(DataProductUpdateProperties.class); + Assertions.assertEquals("ampmngnz", model.owners().get(0)); + Assertions.assertEquals("njeaseipheofloke", model.purviewAccount()); + Assertions.assertEquals("ienjbdlwtgr", model.purviewCollection()); + Assertions.assertEquals(ControlState.DISABLED, model.privateLinksEnabled()); + Assertions.assertEquals("pj", model.currentMinorVersion()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductUpdateTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductUpdateTests.java new file mode 100644 index 000000000000..45dafa676eaf --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductUpdateTests.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.ControlState; +import com.azure.resourcemanager.networkanalytics.models.DataProductUpdate; +import com.azure.resourcemanager.networkanalytics.models.DataProductUpdateProperties; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.networkanalytics.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DataProductUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataProductUpdate model = BinaryData.fromString( + "{\"identity\":{\"principalId\":\"d6a13dec-c6ab-46e1-b357-d42dd1938cb1\",\"tenantId\":\"32877e4f-75d9-43ac-a11d-9ac301c050ef\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"igdtopbob\":{\"principalId\":\"c414294d-22dc-44cd-8588-e5d485b501e2\",\"clientId\":\"52775d55-778f-431c-a20a-300e486b6208\"},\"hm\":{\"principalId\":\"f2b3ce00-f395-41f7-9fe3-9701cd88b4f9\",\"clientId\":\"c5575f34-f028-48d5-87f5-78a0e9762fd4\"},\"a\":{\"principalId\":\"39c12ec5-f1d5-4d79-815a-c4832a2ff9b8\",\"clientId\":\"9795d956-b504-4b92-a9ec-f9491f67a028\"},\"hrzayvvtpgvdf\":{\"principalId\":\"2dac13c4-5efe-442a-bbf2-371d36288ff5\",\"clientId\":\"15324244-ade2-4b66-aa4e-a344f200e1c5\"}}},\"tags\":{\"efgugnxk\":\"tkftutqxlngx\",\"hjybigehoqfbo\":\"xdqmidtthzrvqdra\",\"zlcuiywgqywgndrv\":\"skanyk\",\"ocpecfvmmco\":\"nhzgpphrcgyn\"},\"properties\":{\"owners\":[\"lzevgbmqjqab\",\"y\",\"mivkwlzuvcc\",\"wnfnbacf\"],\"purviewAccount\":\"nlebxetqgtzxd\",\"purviewCollection\":\"qbqqwxr\",\"privateLinksEnabled\":\"Disabled\",\"currentMinorVersion\":\"llnwsubi\"}}") + .toObject(DataProductUpdate.class); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("tkftutqxlngx", model.tags().get("efgugnxk")); + Assertions.assertEquals("lzevgbmqjqab", model.properties().owners().get(0)); + Assertions.assertEquals("nlebxetqgtzxd", model.properties().purviewAccount()); + Assertions.assertEquals("qbqqwxr", model.properties().purviewCollection()); + Assertions.assertEquals(ControlState.DISABLED, model.properties().privateLinksEnabled()); + Assertions.assertEquals("llnwsubi", model.properties().currentMinorVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataProductUpdate model = new DataProductUpdate().withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("igdtopbob", new UserAssignedIdentity(), "hm", new UserAssignedIdentity(), + "a", new UserAssignedIdentity(), "hrzayvvtpgvdf", new UserAssignedIdentity()))) + .withTags(mapOf("efgugnxk", "tkftutqxlngx", "hjybigehoqfbo", "xdqmidtthzrvqdra", "zlcuiywgqywgndrv", + "skanyk", "ocpecfvmmco", "nhzgpphrcgyn")) + .withProperties(new DataProductUpdateProperties() + .withOwners(Arrays.asList("lzevgbmqjqab", "y", "mivkwlzuvcc", "wnfnbacf")) + .withPurviewAccount("nlebxetqgtzxd") + .withPurviewCollection("qbqqwxr") + .withPrivateLinksEnabled(ControlState.DISABLED) + .withCurrentMinorVersion("llnwsubi")); + model = BinaryData.fromObject(model).toObject(DataProductUpdate.class); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("tkftutqxlngx", model.tags().get("efgugnxk")); + Assertions.assertEquals("lzevgbmqjqab", model.properties().owners().get(0)); + Assertions.assertEquals("nlebxetqgtzxd", model.properties().purviewAccount()); + Assertions.assertEquals("qbqqwxr", model.properties().purviewCollection()); + Assertions.assertEquals(ControlState.DISABLED, model.properties().privateLinksEnabled()); + Assertions.assertEquals("llnwsubi", model.properties().currentMinorVersion()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductVersionTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductVersionTests.java new file mode 100644 index 000000000000..cd244665bdce --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductVersionTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.DataProductVersion; +import org.junit.jupiter.api.Assertions; + +public final class DataProductVersionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataProductVersion model = BinaryData.fromString("{\"version\":\"xmqci\"}").toObject(DataProductVersion.class); + Assertions.assertEquals("xmqci", model.version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataProductVersion model = new DataProductVersion().withVersion("xmqci"); + model = BinaryData.fromObject(model).toObject(DataProductVersion.class); + Assertions.assertEquals("xmqci", model.version()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsAddUserRoleWithResponseMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsAddUserRoleWithResponseMockTests.java new file mode 100644 index 000000000000..6428d519d067 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsAddUserRoleWithResponseMockTests.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentDetail; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DataProductsAddUserRoleWithResponseMockTests { + @Test + public void testAddUserRoleWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"roleId\":\"rhdwbavxbniw\",\"principalId\":\"jswztsdbpg\",\"userName\":\"xytxhpzxbz\",\"dataTypeScope\":[\"zabglcuhxwt\"],\"principalType\":\"tyq\",\"role\":\"Reader\",\"roleAssignmentId\":\"lbbovplw\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + RoleAssignmentDetail response = manager.dataProducts() + .addUserRoleWithResponse("babphlwrqlfk", "sthsu", + new RoleAssignmentCommonProperties().withRoleId("ocmnyyazttbtwwrq") + .withPrincipalId("uedck") + .withUsername("ywbiexzfeyueax") + .withDataTypeScope(Arrays.asList("xujwbhqwalmuzyo")) + .withPrincipalType("aepdkzjanc") + .withRole(DataProductUserRole.SENSITIVE_READER), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("rhdwbavxbniw", response.roleId()); + Assertions.assertEquals("jswztsdbpg", response.principalId()); + Assertions.assertEquals("xytxhpzxbz", response.username()); + Assertions.assertEquals("zabglcuhxwt", response.dataTypeScope().get(0)); + Assertions.assertEquals("tyq", response.principalType()); + Assertions.assertEquals(DataProductUserRole.READER, response.role()); + Assertions.assertEquals("lbbovplw", response.roleAssignmentId()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogInnerTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogInnerTests.java new file mode 100644 index 000000000000..1384aa42e6b3 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogInnerTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductInformation; +import com.azure.resourcemanager.networkanalytics.models.DataProductVersion; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogProperties; +import com.azure.resourcemanager.networkanalytics.models.PublisherInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DataProductsCatalogInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataProductsCatalogInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Provisioning\",\"publishers\":[{\"publisherName\":\"uizga\",\"dataProducts\":[{\"dataProductName\":\"ufizuckyf\",\"description\":\"hr\",\"dataProductVersions\":[{\"version\":\"dfvzwdzuhty\"}]}]}]},\"id\":\"isdkfthwxmnteiw\",\"name\":\"opvkmijcm\",\"type\":\"xdcu\"}") + .toObject(DataProductsCatalogInner.class); + Assertions.assertEquals("uizga", model.properties().publishers().get(0).publisherName()); + Assertions.assertEquals("ufizuckyf", + model.properties().publishers().get(0).dataProducts().get(0).dataProductName()); + Assertions.assertEquals("hr", model.properties().publishers().get(0).dataProducts().get(0).description()); + Assertions.assertEquals("dfvzwdzuhty", + model.properties().publishers().get(0).dataProducts().get(0).dataProductVersions().get(0).version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataProductsCatalogInner model = new DataProductsCatalogInner() + .withProperties(new DataProductsCatalogProperties().withPublishers(Arrays.asList(new PublisherInformation() + .withPublisherName("uizga") + .withDataProducts(Arrays.asList(new DataProductInformation().withDataProductName("ufizuckyf") + .withDescription("hr") + .withDataProductVersions(Arrays.asList(new DataProductVersion().withVersion("dfvzwdzuhty")))))))); + model = BinaryData.fromObject(model).toObject(DataProductsCatalogInner.class); + Assertions.assertEquals("uizga", model.properties().publishers().get(0).publisherName()); + Assertions.assertEquals("ufizuckyf", + model.properties().publishers().get(0).dataProducts().get(0).dataProductName()); + Assertions.assertEquals("hr", model.properties().publishers().get(0).dataProducts().get(0).description()); + Assertions.assertEquals("dfvzwdzuhty", + model.properties().publishers().get(0).dataProducts().get(0).dataProductVersions().get(0).version()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogListResultTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogListResultTests.java new file mode 100644 index 000000000000..1c8a1a437f72 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogListResultTests.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataProductsCatalogInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductInformation; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogListResult; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogProperties; +import com.azure.resourcemanager.networkanalytics.models.PublisherInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DataProductsCatalogListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataProductsCatalogListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"publishers\":[{\"publisherName\":\"w\",\"dataProducts\":[{\"dataProductName\":\"lryplwckbasyy\",\"description\":\"nddhsgcbacph\",\"dataProductVersions\":[]},{\"dataProductName\":\"jkot\",\"description\":\"nqgoulzndli\",\"dataProductVersions\":[]},{\"dataProductName\":\"wyqkgfgibm\",\"description\":\"dgak\",\"dataProductVersions\":[]}]},{\"publisherName\":\"qsrxybzqqed\",\"dataProducts\":[{\"dataProductName\":\"tbciqfouflmm\",\"description\":\"kzsmodm\",\"dataProductVersions\":[]}]}]},\"id\":\"ougpbkwt\",\"name\":\"utduqktapspwgcu\",\"type\":\"rtumkdosvq\"},{\"properties\":{\"provisioningState\":\"Updating\",\"publishers\":[{\"publisherName\":\"gbbjfddgmbmbe\",\"dataProducts\":[{\"dataProductName\":\"pbhtqqrolfpfpsa\",\"description\":\"gbquxigj\",\"dataProductVersions\":[]},{\"dataProductName\":\"jgzjaoyfhrtx\",\"description\":\"lnerkujysvleju\",\"dataProductVersions\":[]},{\"dataProductName\":\"fqawrlyxw\",\"description\":\"kcprbnw\",\"dataProductVersions\":[]}]}]},\"id\":\"gjvtbv\",\"name\":\"ysszdnrujqguh\",\"type\":\"uouq\"}],\"nextLink\":\"rwzwbng\"}") + .toObject(DataProductsCatalogListResult.class); + Assertions.assertEquals("w", model.value().get(0).properties().publishers().get(0).publisherName()); + Assertions.assertEquals("lryplwckbasyy", + model.value().get(0).properties().publishers().get(0).dataProducts().get(0).dataProductName()); + Assertions.assertEquals("nddhsgcbacph", + model.value().get(0).properties().publishers().get(0).dataProducts().get(0).description()); + Assertions.assertEquals("rwzwbng", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataProductsCatalogListResult model = new DataProductsCatalogListResult().withValue(Arrays.asList( + new DataProductsCatalogInner() + .withProperties(new DataProductsCatalogProperties().withPublishers(Arrays.asList( + new PublisherInformation().withPublisherName("w") + .withDataProducts(Arrays.asList( + new DataProductInformation().withDataProductName("lryplwckbasyy") + .withDescription("nddhsgcbacph") + .withDataProductVersions(Arrays.asList()), + new DataProductInformation().withDataProductName("jkot") + .withDescription("nqgoulzndli") + .withDataProductVersions(Arrays.asList()), + new DataProductInformation().withDataProductName("wyqkgfgibm") + .withDescription("dgak") + .withDataProductVersions(Arrays.asList()))), + new PublisherInformation().withPublisherName("qsrxybzqqed") + .withDataProducts(Arrays.asList(new DataProductInformation().withDataProductName("tbciqfouflmm") + .withDescription("kzsmodm") + .withDataProductVersions(Arrays.asList())))))), + new DataProductsCatalogInner().withProperties(new DataProductsCatalogProperties() + .withPublishers(Arrays.asList(new PublisherInformation().withPublisherName("gbbjfddgmbmbe") + .withDataProducts(Arrays.asList( + new DataProductInformation().withDataProductName("pbhtqqrolfpfpsa") + .withDescription("gbquxigj") + .withDataProductVersions(Arrays.asList()), + new DataProductInformation().withDataProductName("jgzjaoyfhrtx") + .withDescription("lnerkujysvleju") + .withDataProductVersions(Arrays.asList()), + new DataProductInformation().withDataProductName("fqawrlyxw") + .withDescription("kcprbnw") + .withDataProductVersions(Arrays.asList())))))))) + .withNextLink("rwzwbng"); + model = BinaryData.fromObject(model).toObject(DataProductsCatalogListResult.class); + Assertions.assertEquals("w", model.value().get(0).properties().publishers().get(0).publisherName()); + Assertions.assertEquals("lryplwckbasyy", + model.value().get(0).properties().publishers().get(0).dataProducts().get(0).dataProductName()); + Assertions.assertEquals("nddhsgcbacph", + model.value().get(0).properties().publishers().get(0).dataProducts().get(0).description()); + Assertions.assertEquals("rwzwbng", model.nextLink()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogPropertiesTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogPropertiesTests.java new file mode 100644 index 000000000000..60a530266290 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogPropertiesTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.DataProductInformation; +import com.azure.resourcemanager.networkanalytics.models.DataProductVersion; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalogProperties; +import com.azure.resourcemanager.networkanalytics.models.PublisherInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DataProductsCatalogPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataProductsCatalogProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Failed\",\"publishers\":[{\"publisherName\":\"rpymzidnsez\",\"dataProducts\":[{\"dataProductName\":\"tbzsgfyccs\",\"description\":\"ewmdw\",\"dataProductVersions\":[{\"version\":\"eiachboosflnr\"},{\"version\":\"sfqpteehz\"},{\"version\":\"vypyqrimzinpv\"}]},{\"dataProductName\":\"wjdk\",\"description\":\"rsoodqxhcrmnoh\",\"dataProductVersions\":[{\"version\":\"ckwhds\"}]},{\"dataProductName\":\"ifiyipjxsqwpgrj\",\"description\":\"znorcj\",\"dataProductVersions\":[{\"version\":\"snb\"}]},{\"dataProductName\":\"xqabnmocpcysh\",\"description\":\"rzafbljjgpbtoqcj\",\"dataProductVersions\":[{\"version\":\"ljavbqid\"}]}]}]}") + .toObject(DataProductsCatalogProperties.class); + Assertions.assertEquals("rpymzidnsez", model.publishers().get(0).publisherName()); + Assertions.assertEquals("tbzsgfyccs", model.publishers().get(0).dataProducts().get(0).dataProductName()); + Assertions.assertEquals("ewmdw", model.publishers().get(0).dataProducts().get(0).description()); + Assertions.assertEquals("eiachboosflnr", + model.publishers().get(0).dataProducts().get(0).dataProductVersions().get(0).version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataProductsCatalogProperties model = new DataProductsCatalogProperties() + .withPublishers(Arrays.asList(new PublisherInformation().withPublisherName("rpymzidnsez") + .withDataProducts(Arrays.asList( + new DataProductInformation().withDataProductName("tbzsgfyccs") + .withDescription("ewmdw") + .withDataProductVersions(Arrays.asList(new DataProductVersion().withVersion("eiachboosflnr"), + new DataProductVersion().withVersion("sfqpteehz"), + new DataProductVersion().withVersion("vypyqrimzinpv"))), + new DataProductInformation().withDataProductName("wjdk") + .withDescription("rsoodqxhcrmnoh") + .withDataProductVersions(Arrays.asList(new DataProductVersion().withVersion("ckwhds"))), + new DataProductInformation().withDataProductName("ifiyipjxsqwpgrj") + .withDescription("znorcj") + .withDataProductVersions(Arrays.asList(new DataProductVersion().withVersion("snb"))), + new DataProductInformation().withDataProductName("xqabnmocpcysh") + .withDescription("rzafbljjgpbtoqcj") + .withDataProductVersions(Arrays.asList(new DataProductVersion().withVersion("ljavbqid"))))))); + model = BinaryData.fromObject(model).toObject(DataProductsCatalogProperties.class); + Assertions.assertEquals("rpymzidnsez", model.publishers().get(0).publisherName()); + Assertions.assertEquals("tbzsgfyccs", model.publishers().get(0).dataProducts().get(0).dataProductName()); + Assertions.assertEquals("ewmdw", model.publishers().get(0).dataProducts().get(0).description()); + Assertions.assertEquals("eiachboosflnr", + model.publishers().get(0).dataProducts().get(0).dataProductVersions().get(0).version()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsGetByResourceGroupWithResponseMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..77f6e18818cb --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalog; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DataProductsCatalogsGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"properties\":{\"provisioningState\":\"Failed\",\"publishers\":[{\"publisherName\":\"qzvszjf\",\"dataProducts\":[{\"dataProductName\":\"vjfdx\",\"description\":\"ivetvtcq\",\"dataProductVersions\":[]},{\"dataProductName\":\"qtdo\",\"description\":\"mcbxvwvxysl\",\"dataProductVersions\":[]},{\"dataProductName\":\"bhsfxob\",\"description\":\"ytkblmpew\",\"dataProductVersions\":[]}]},{\"publisherName\":\"wfbkrvrns\",\"dataProducts\":[{\"dataProductName\":\"hqjohxcrsbfova\",\"description\":\"rruvwbhsq\",\"dataProductVersions\":[]},{\"dataProductName\":\"sub\",\"description\":\"gjb\",\"dataProductVersions\":[]},{\"dataProductName\":\"rxbpyb\",\"description\":\"rfbjf\",\"dataProductVersions\":[]}]},{\"publisherName\":\"twss\",\"dataProducts\":[{\"dataProductName\":\"ftpvjzbexil\",\"description\":\"znfqqnvwpmqtar\",\"dataProductVersions\":[]}]}]},\"id\":\"ujmkcjhwqy\",\"name\":\"jrybnwjewgdrjer\",\"type\":\"naenqpehindo\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + DataProductsCatalog response = manager.dataProductsCatalogs() + .getByResourceGroupWithResponse("vkr", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("qzvszjf", response.properties().publishers().get(0).publisherName()); + Assertions.assertEquals("vjfdx", + response.properties().publishers().get(0).dataProducts().get(0).dataProductName()); + Assertions.assertEquals("ivetvtcq", + response.properties().publishers().get(0).dataProducts().get(0).description()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListByResourceGroupMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListByResourceGroupMockTests.java new file mode 100644 index 000000000000..bfc928ced5d8 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListByResourceGroupMockTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalog; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DataProductsCatalogsListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"publishers\":[{\"publisherName\":\"xwyjsflhhc\",\"dataProducts\":[{\"dataProductName\":\"lnjixisxya\",\"description\":\"joya\",\"dataProductVersions\":[]}]},{\"publisherName\":\"cslyjpk\",\"dataProducts\":[{\"dataProductName\":\"dzyexznelixh\",\"description\":\"rzt\",\"dataProductVersions\":[]},{\"dataProductName\":\"o\",\"description\":\"hb\",\"dataProductVersions\":[]},{\"dataProductName\":\"xknalaulppg\",\"description\":\"dtpnapnyiropuhp\",\"dataProductVersions\":[]},{\"dataProductName\":\"gvpgy\",\"description\":\"gqgitxmedjvcsl\",\"dataProductVersions\":[]}]},{\"publisherName\":\"n\",\"dataProducts\":[{\"dataProductName\":\"wncwzzhxgktrmg\",\"description\":\"cnapkteoell\",\"dataProductVersions\":[]},{\"dataProductName\":\"pt\",\"description\":\"d\",\"dataProductVersions\":[]},{\"dataProductName\":\"gpfqbuace\",\"description\":\"pzfqrhhuaoppp\",\"dataProductVersions\":[]}]},{\"publisherName\":\"qeqxo\",\"dataProducts\":[{\"dataProductName\":\"dahzxctobg\",\"description\":\"kdmoi\",\"dataProductVersions\":[]}]}]},\"id\":\"ostmgrcf\",\"name\":\"unrmfqjhhkxb\",\"type\":\"vjymjhxxjyngud\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.dataProductsCatalogs().listByResourceGroup("dttouwaboekqvkel", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("xwyjsflhhc", + response.iterator().next().properties().publishers().get(0).publisherName()); + Assertions.assertEquals("lnjixisxya", + response.iterator().next().properties().publishers().get(0).dataProducts().get(0).dataProductName()); + Assertions.assertEquals("joya", + response.iterator().next().properties().publishers().get(0).dataProducts().get(0).description()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListMockTests.java new file mode 100644 index 000000000000..26cb8dc7175f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsCatalogsListMockTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.models.DataProductsCatalog; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DataProductsCatalogsListMockTests { + @Test + public void testList() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"publishers\":[{\"publisherName\":\"bpbewtghfgb\",\"dataProducts\":[{\"dataProductName\":\"gw\",\"description\":\"zvlvqhjkbegib\",\"dataProductVersions\":[]}]},{\"publisherName\":\"nmxiebwwaloayqc\",\"dataProducts\":[{\"dataProductName\":\"rtzju\",\"description\":\"gwyzm\",\"dataProductVersions\":[]}]},{\"publisherName\":\"txon\",\"dataProducts\":[{\"dataProductName\":\"ts\",\"description\":\"vjcbpwxqpsrknf\",\"dataProductVersions\":[]},{\"dataProductName\":\"guvriuhprwmd\",\"description\":\"vxqtayriwwroyqbe\",\"dataProductVersions\":[]},{\"dataProductName\":\"rmcqiby\",\"description\":\"nojvknmefqsg\",\"dataProductVersions\":[]},{\"dataProductName\":\"vah\",\"description\":\"pjyzhpv\",\"dataProductVersions\":[]}]},{\"publisherName\":\"qzcjrvxdj\",\"dataProducts\":[{\"dataProductName\":\"mwlxk\",\"description\":\"ug\",\"dataProductVersions\":[]},{\"dataProductName\":\"hzovawjvzunlut\",\"description\":\"nnprn\",\"dataProductVersions\":[]},{\"dataProductName\":\"i\",\"description\":\"eilpjzuaejxdu\",\"dataProductVersions\":[]},{\"dataProductName\":\"tskzbbtdzumveek\",\"description\":\"pwo\",\"dataProductVersions\":[]}]}]},\"id\":\"hkfpbs\",\"name\":\"yofd\",\"type\":\"luu\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.dataProductsCatalogs().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("bpbewtghfgb", + response.iterator().next().properties().publishers().get(0).publisherName()); + Assertions.assertEquals("gw", + response.iterator().next().properties().publishers().get(0).dataProducts().get(0).dataProductName()); + Assertions.assertEquals("zvlvqhjkbegib", + response.iterator().next().properties().publishers().get(0).dataProducts().get(0).description()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListRolesAssignmentsWithResponseMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListRolesAssignmentsWithResponseMockTests.java new file mode 100644 index 000000000000..876e4a8f6c44 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsListRolesAssignmentsWithResponseMockTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import com.azure.resourcemanager.networkanalytics.models.ListRoleAssignments; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DataProductsListRolesAssignmentsWithResponseMockTests { + @Test + public void testListRolesAssignmentsWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"count\":611656940,\"roleAssignmentResponse\":[{\"roleId\":\"psiebtfhvpes\",\"principalId\":\"pskrdqmh\",\"userName\":\"jdhtldwkyzxu\",\"dataTypeScope\":[\"kn\",\"ws\"],\"principalType\":\"wsvlxotogtwrupqs\",\"role\":\"Reader\",\"roleAssignmentId\":\"nmic\"},{\"roleId\":\"kvceoveilovnotyf\",\"principalId\":\"fcnj\",\"userName\":\"k\",\"dataTypeScope\":[\"x\",\"hbttkphyw\"],\"principalType\":\"nv\",\"role\":\"Reader\",\"roleAssignmentId\":\"oqnermclfpl\"},{\"roleId\":\"hoxus\",\"principalId\":\"rpabg\",\"userName\":\"epsbjtazqu\",\"dataTypeScope\":[\"ywpmueefjzwfqkq\",\"jidsuyonobglaoc\",\"xtccmg\",\"udxytlmoyrx\"],\"principalType\":\"wfudwpzntxhdzhl\",\"role\":\"Reader\",\"roleAssignmentId\":\"jbhckfrlhr\"},{\"roleId\":\"sbkyvpycanuzbp\",\"principalId\":\"kafkuwbcrnwbm\",\"userName\":\"hhseyv\",\"dataTypeScope\":[\"srtslhspkdeem\"],\"principalType\":\"ofmxagkvtmelmqkr\",\"role\":\"SensitiveReader\",\"roleAssignmentId\":\"hvljuahaquh\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + ListRoleAssignments response = manager.dataProducts() + .listRolesAssignmentsWithResponse("wiyighxpkdw", "baiuebbaumny", "dataupedeojnabckhs", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(611656940, response.count()); + Assertions.assertEquals("psiebtfhvpes", response.roleAssignmentResponse().get(0).roleId()); + Assertions.assertEquals("pskrdqmh", response.roleAssignmentResponse().get(0).principalId()); + Assertions.assertEquals("jdhtldwkyzxu", response.roleAssignmentResponse().get(0).username()); + Assertions.assertEquals("kn", response.roleAssignmentResponse().get(0).dataTypeScope().get(0)); + Assertions.assertEquals("wsvlxotogtwrupqs", response.roleAssignmentResponse().get(0).principalType()); + Assertions.assertEquals(DataProductUserRole.READER, response.roleAssignmentResponse().get(0).role()); + Assertions.assertEquals("nmic", response.roleAssignmentResponse().get(0).roleAssignmentId()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRemoveUserRoleWithResponseMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRemoveUserRoleWithResponseMockTests.java new file mode 100644 index 000000000000..851f7eac7aec --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataProductsRemoveUserRoleWithResponseMockTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DataProductsRemoveUserRoleWithResponseMockTests { + @Test + public void testRemoveUserRoleWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = "{}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(204); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.dataProducts() + .removeUserRoleWithResponse("dhmdua", "aex", + new RoleAssignmentDetailInner().withRoleId("pvfadmwsrcr") + .withPrincipalId("vxpvgomz") + .withUsername("fmisg") + .withDataTypeScope(Arrays.asList("nbbelda", "k", "baliourqhakauha")) + .withPrincipalType("hsfwxosowzxcug") + .withRole(DataProductUserRole.SENSITIVE_READER) + .withRoleAssignmentId("jooxdjebw"), + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeInnerTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeInnerTests.java new file mode 100644 index 000000000000..3d8b64d07e61 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeInnerTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner; +import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import org.junit.jupiter.api.Assertions; + +public final class DataTypeInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataTypeInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"state\":\"Stopped\",\"stateReason\":\"ulexxbczwtr\",\"storageOutputRetention\":1083545989,\"databaseCacheRetention\":299344741,\"databaseRetention\":1177469779,\"visualizationUrl\":\"vsovmyokac\"},\"id\":\"kwlhzdo\",\"name\":\"pxjmflbvvnchr\",\"type\":\"cciw\"}") + .toObject(DataTypeInner.class); + Assertions.assertEquals(DataTypeState.STOPPED, model.properties().state()); + Assertions.assertEquals(1083545989, model.properties().storageOutputRetention()); + Assertions.assertEquals(299344741, model.properties().databaseCacheRetention()); + Assertions.assertEquals(1177469779, model.properties().databaseRetention()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataTypeInner model + = new DataTypeInner().withProperties(new DataTypeProperties().withState(DataTypeState.STOPPED) + .withStorageOutputRetention(1083545989) + .withDatabaseCacheRetention(299344741) + .withDatabaseRetention(1177469779)); + model = BinaryData.fromObject(model).toObject(DataTypeInner.class); + Assertions.assertEquals(DataTypeState.STOPPED, model.properties().state()); + Assertions.assertEquals(1083545989, model.properties().storageOutputRetention()); + Assertions.assertEquals(299344741, model.properties().databaseCacheRetention()); + Assertions.assertEquals(1177469779, model.properties().databaseRetention()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeListResultTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeListResultTests.java new file mode 100644 index 000000000000..9c5a3cdd729a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeListResultTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataTypeInner; +import com.azure.resourcemanager.networkanalytics.models.DataTypeListResult; +import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DataTypeListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataTypeListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"state\":\"Running\",\"stateReason\":\"dcsi\",\"storageOutputRetention\":1906498488,\"databaseCacheRetention\":1750107554,\"databaseRetention\":1611277697,\"visualizationUrl\":\"ectehf\"},\"id\":\"scjeypv\",\"name\":\"ezrkgqhcjrefo\",\"type\":\"gm\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"state\":\"Running\",\"stateReason\":\"vxyqjpkcattpngjc\",\"storageOutputRetention\":183805680,\"databaseCacheRetention\":957799467,\"databaseRetention\":822789925,\"visualizationUrl\":\"hvmdajvnysounq\"},\"id\":\"a\",\"name\":\"oaeupfhyhltrpmo\",\"type\":\"jmcmatuokthfu\"},{\"properties\":{\"provisioningState\":\"Failed\",\"state\":\"Running\",\"stateReason\":\"cpkvxodp\",\"storageOutputRetention\":182574553,\"databaseCacheRetention\":1621494681,\"databaseRetention\":466984415,\"visualizationUrl\":\"agfuaxbezyiu\"},\"id\":\"ktwh\",\"name\":\"dxwzywqsmbsurexi\",\"type\":\"o\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"state\":\"Stopped\",\"stateReason\":\"ksymd\",\"storageOutputRetention\":830050857,\"databaseCacheRetention\":1193107670,\"databaseRetention\":980316888,\"visualizationUrl\":\"xhqyudxorrqnb\"},\"id\":\"czvyifq\",\"name\":\"vkd\",\"type\":\"jsllrmv\"}],\"nextLink\":\"f\"}") + .toObject(DataTypeListResult.class); + Assertions.assertEquals(DataTypeState.RUNNING, model.value().get(0).properties().state()); + Assertions.assertEquals(1906498488, model.value().get(0).properties().storageOutputRetention()); + Assertions.assertEquals(1750107554, model.value().get(0).properties().databaseCacheRetention()); + Assertions.assertEquals(1611277697, model.value().get(0).properties().databaseRetention()); + Assertions.assertEquals("f", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataTypeListResult model = new DataTypeListResult().withValue(Arrays.asList( + new DataTypeInner().withProperties(new DataTypeProperties().withState(DataTypeState.RUNNING) + .withStorageOutputRetention(1906498488) + .withDatabaseCacheRetention(1750107554) + .withDatabaseRetention(1611277697)), + new DataTypeInner().withProperties(new DataTypeProperties().withState(DataTypeState.RUNNING) + .withStorageOutputRetention(183805680) + .withDatabaseCacheRetention(957799467) + .withDatabaseRetention(822789925)), + new DataTypeInner().withProperties(new DataTypeProperties().withState(DataTypeState.RUNNING) + .withStorageOutputRetention(182574553) + .withDatabaseCacheRetention(1621494681) + .withDatabaseRetention(466984415)), + new DataTypeInner().withProperties(new DataTypeProperties().withState(DataTypeState.STOPPED) + .withStorageOutputRetention(830050857) + .withDatabaseCacheRetention(1193107670) + .withDatabaseRetention(980316888)))) + .withNextLink("f"); + model = BinaryData.fromObject(model).toObject(DataTypeListResult.class); + Assertions.assertEquals(DataTypeState.RUNNING, model.value().get(0).properties().state()); + Assertions.assertEquals(1906498488, model.value().get(0).properties().storageOutputRetention()); + Assertions.assertEquals(1750107554, model.value().get(0).properties().databaseCacheRetention()); + Assertions.assertEquals(1611277697, model.value().get(0).properties().databaseRetention()); + Assertions.assertEquals("f", model.nextLink()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypePropertiesTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypePropertiesTests.java new file mode 100644 index 000000000000..529cc262acee --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypePropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import org.junit.jupiter.api.Assertions; + +public final class DataTypePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataTypeProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Canceled\",\"state\":\"Stopped\",\"stateReason\":\"hrsajiwkuofo\",\"storageOutputRetention\":1637974204,\"databaseCacheRetention\":1623882899,\"databaseRetention\":1515601233,\"visualizationUrl\":\"imjm\"}") + .toObject(DataTypeProperties.class); + Assertions.assertEquals(DataTypeState.STOPPED, model.state()); + Assertions.assertEquals(1637974204, model.storageOutputRetention()); + Assertions.assertEquals(1623882899, model.databaseCacheRetention()); + Assertions.assertEquals(1515601233, model.databaseRetention()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataTypeProperties model = new DataTypeProperties().withState(DataTypeState.STOPPED) + .withStorageOutputRetention(1637974204) + .withDatabaseCacheRetention(1623882899) + .withDatabaseRetention(1515601233); + model = BinaryData.fromObject(model).toObject(DataTypeProperties.class); + Assertions.assertEquals(DataTypeState.STOPPED, model.state()); + Assertions.assertEquals(1637974204, model.storageOutputRetention()); + Assertions.assertEquals(1623882899, model.databaseCacheRetention()); + Assertions.assertEquals(1515601233, model.databaseRetention()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeUpdatePropertiesTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeUpdatePropertiesTests.java new file mode 100644 index 000000000000..eb9f01afcfb0 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeUpdatePropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdateProperties; +import org.junit.jupiter.api.Assertions; + +public final class DataTypeUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataTypeUpdateProperties model = BinaryData.fromString( + "{\"state\":\"Running\",\"storageOutputRetention\":1166674819,\"databaseCacheRetention\":857489891,\"databaseRetention\":786534004}") + .toObject(DataTypeUpdateProperties.class); + Assertions.assertEquals(DataTypeState.RUNNING, model.state()); + Assertions.assertEquals(1166674819, model.storageOutputRetention()); + Assertions.assertEquals(857489891, model.databaseCacheRetention()); + Assertions.assertEquals(786534004, model.databaseRetention()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataTypeUpdateProperties model = new DataTypeUpdateProperties().withState(DataTypeState.RUNNING) + .withStorageOutputRetention(1166674819) + .withDatabaseCacheRetention(857489891) + .withDatabaseRetention(786534004); + model = BinaryData.fromObject(model).toObject(DataTypeUpdateProperties.class); + Assertions.assertEquals(DataTypeState.RUNNING, model.state()); + Assertions.assertEquals(1166674819, model.storageOutputRetention()); + Assertions.assertEquals(857489891, model.databaseCacheRetention()); + Assertions.assertEquals(786534004, model.databaseRetention()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeUpdateTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeUpdateTests.java new file mode 100644 index 000000000000..1fc976ff1ffb --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypeUpdateTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdate; +import com.azure.resourcemanager.networkanalytics.models.DataTypeUpdateProperties; +import org.junit.jupiter.api.Assertions; + +public final class DataTypeUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataTypeUpdate model = BinaryData.fromString( + "{\"properties\":{\"state\":\"Stopped\",\"storageOutputRetention\":825029486,\"databaseCacheRetention\":2070328561,\"databaseRetention\":1007558597}}") + .toObject(DataTypeUpdate.class); + Assertions.assertEquals(DataTypeState.STOPPED, model.properties().state()); + Assertions.assertEquals(825029486, model.properties().storageOutputRetention()); + Assertions.assertEquals(2070328561, model.properties().databaseCacheRetention()); + Assertions.assertEquals(1007558597, model.properties().databaseRetention()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataTypeUpdate model + = new DataTypeUpdate().withProperties(new DataTypeUpdateProperties().withState(DataTypeState.STOPPED) + .withStorageOutputRetention(825029486) + .withDatabaseCacheRetention(2070328561) + .withDatabaseRetention(1007558597)); + model = BinaryData.fromObject(model).toObject(DataTypeUpdate.class); + Assertions.assertEquals(DataTypeState.STOPPED, model.properties().state()); + Assertions.assertEquals(825029486, model.properties().storageOutputRetention()); + Assertions.assertEquals(2070328561, model.properties().databaseCacheRetention()); + Assertions.assertEquals(1007558597, model.properties().databaseRetention()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesCreateMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesCreateMockTests.java new file mode 100644 index 000000000000..0149d1f32c0d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesCreateMockTests.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.models.DataType; +import com.azure.resourcemanager.networkanalytics.models.DataTypeProperties; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DataTypesCreateMockTests { + @Test + public void testCreate() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"state\":\"Running\",\"stateReason\":\"zxb\",\"storageOutputRetention\":623062887,\"databaseCacheRetention\":1983379457,\"databaseRetention\":473319481,\"visualizationUrl\":\"zmuvpbttdumorppx\"},\"id\":\"mnzb\",\"name\":\"bhjpglkfgohdne\",\"type\":\"el\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + DataType response = manager.dataTypes() + .define("bqdxbx") + .withExistingDataProduct("fzxmhhvhgureodkw", "bdagxt") + .withProperties(new DataTypeProperties().withState(DataTypeState.RUNNING) + .withStorageOutputRetention(144807252) + .withDatabaseCacheRetention(1090180987) + .withDatabaseRetention(1185146175)) + .create(); + + Assertions.assertEquals(DataTypeState.RUNNING, response.properties().state()); + Assertions.assertEquals(623062887, response.properties().storageOutputRetention()); + Assertions.assertEquals(1983379457, response.properties().databaseCacheRetention()); + Assertions.assertEquals(473319481, response.properties().databaseRetention()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGetWithResponseMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGetWithResponseMockTests.java new file mode 100644 index 000000000000..fe44531aad25 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesGetWithResponseMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.models.DataType; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DataTypesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"properties\":{\"provisioningState\":\"Accepted\",\"state\":\"Stopped\",\"stateReason\":\"t\",\"storageOutputRetention\":1008975068,\"databaseCacheRetention\":1072156994,\"databaseRetention\":2060062752,\"visualizationUrl\":\"ygtdsslswt\"},\"id\":\"eriofzpyqs\",\"name\":\"mwabnetshhszhedp\",\"type\":\"vwiwubmwmbesld\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + DataType response = manager.dataTypes() + .getWithResponse("mnvdfzn", "daodvxzbncblyl", "stdbhhxsrzdzu", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(DataTypeState.STOPPED, response.properties().state()); + Assertions.assertEquals(1008975068, response.properties().storageOutputRetention()); + Assertions.assertEquals(1072156994, response.properties().databaseCacheRetention()); + Assertions.assertEquals(2060062752, response.properties().databaseRetention()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesListByDataProductMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesListByDataProductMockTests.java new file mode 100644 index 000000000000..f134e59c1d46 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/DataTypesListByDataProductMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.models.DataType; +import com.azure.resourcemanager.networkanalytics.models.DataTypeState; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DataTypesListByDataProductMockTests { + @Test + public void testListByDataProduct() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"state\":\"Running\",\"stateReason\":\"humaqolbgyc\",\"storageOutputRetention\":1405569741,\"databaseCacheRetention\":178501813,\"databaseRetention\":1300588551,\"visualizationUrl\":\"cym\"},\"id\":\"olpsslqlf\",\"name\":\"mdnbbglzpswiy\",\"type\":\"mcwyhzdxssadb\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.dataTypes().listByDataProduct("gmifthnzd", "dslgnayqigynduh", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(DataTypeState.RUNNING, response.iterator().next().properties().state()); + Assertions.assertEquals(1405569741, response.iterator().next().properties().storageOutputRetention()); + Assertions.assertEquals(178501813, response.iterator().next().properties().databaseCacheRetention()); + Assertions.assertEquals(1300588551, response.iterator().next().properties().databaseRetention()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/IpRulesTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/IpRulesTests.java new file mode 100644 index 000000000000..13642990ca6c --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/IpRulesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.IpRules; +import org.junit.jupiter.api.Assertions; + +public final class IpRulesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpRules model + = BinaryData.fromString("{\"value\":\"dkwt\",\"action\":\"hxbnjbiksqrg\"}").toObject(IpRules.class); + Assertions.assertEquals("dkwt", model.value()); + Assertions.assertEquals("hxbnjbiksqrg", model.action()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IpRules model = new IpRules().withValue("dkwt").withAction("hxbnjbiksqrg"); + model = BinaryData.fromObject(model).toObject(IpRules.class); + Assertions.assertEquals("dkwt", model.value()); + Assertions.assertEquals("hxbnjbiksqrg", model.action()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ListRoleAssignmentsInnerTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ListRoleAssignmentsInnerTests.java new file mode 100644 index 000000000000..c9fd04b4e9a0 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ListRoleAssignmentsInnerTests.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.fluent.models.ListRoleAssignmentsInner; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ListRoleAssignmentsInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ListRoleAssignmentsInner model = BinaryData.fromString( + "{\"count\":1235353776,\"roleAssignmentResponse\":[{\"roleId\":\"eiithlvmez\",\"principalId\":\"v\",\"userName\":\"hxmzsbbzoggig\",\"dataTypeScope\":[\"wburvjxxjnspydpt\",\"oenkouknvudwti\",\"kbldngkpocipa\"],\"principalType\":\"yxoegukgjnp\",\"role\":\"SensitiveReader\",\"roleAssignmentId\":\"cgygev\"},{\"roleId\":\"zntypmrb\",\"principalId\":\"izcdrqjsd\",\"userName\":\"ydnfyhxdeoejz\",\"dataTypeScope\":[\"w\"],\"principalType\":\"fsj\",\"role\":\"SensitiveReader\",\"roleAssignmentId\":\"gzfbishcbk\"},{\"roleId\":\"ajdeyeamdphaga\",\"principalId\":\"pbuxwgipwhon\",\"userName\":\"wkgshwa\",\"dataTypeScope\":[\"ixzbinjeputtmryw\"],\"principalType\":\"uzoqft\",\"role\":\"SensitiveReader\",\"roleAssignmentId\":\"qzrnkcqvyxlwhz\"}]}") + .toObject(ListRoleAssignmentsInner.class); + Assertions.assertEquals(1235353776, model.count()); + Assertions.assertEquals("eiithlvmez", model.roleAssignmentResponse().get(0).roleId()); + Assertions.assertEquals("v", model.roleAssignmentResponse().get(0).principalId()); + Assertions.assertEquals("hxmzsbbzoggig", model.roleAssignmentResponse().get(0).username()); + Assertions.assertEquals("wburvjxxjnspydpt", model.roleAssignmentResponse().get(0).dataTypeScope().get(0)); + Assertions.assertEquals("yxoegukgjnp", model.roleAssignmentResponse().get(0).principalType()); + Assertions.assertEquals(DataProductUserRole.SENSITIVE_READER, model.roleAssignmentResponse().get(0).role()); + Assertions.assertEquals("cgygev", model.roleAssignmentResponse().get(0).roleAssignmentId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ListRoleAssignmentsInner model = new ListRoleAssignmentsInner().withCount(1235353776) + .withRoleAssignmentResponse(Arrays.asList( + new RoleAssignmentDetailInner().withRoleId("eiithlvmez") + .withPrincipalId("v") + .withUsername("hxmzsbbzoggig") + .withDataTypeScope(Arrays.asList("wburvjxxjnspydpt", "oenkouknvudwti", "kbldngkpocipa")) + .withPrincipalType("yxoegukgjnp") + .withRole(DataProductUserRole.SENSITIVE_READER) + .withRoleAssignmentId("cgygev"), + new RoleAssignmentDetailInner().withRoleId("zntypmrb") + .withPrincipalId("izcdrqjsd") + .withUsername("ydnfyhxdeoejz") + .withDataTypeScope(Arrays.asList("w")) + .withPrincipalType("fsj") + .withRole(DataProductUserRole.SENSITIVE_READER) + .withRoleAssignmentId("gzfbishcbk"), + new RoleAssignmentDetailInner().withRoleId("ajdeyeamdphaga") + .withPrincipalId("pbuxwgipwhon") + .withUsername("wkgshwa") + .withDataTypeScope(Arrays.asList("ixzbinjeputtmryw")) + .withPrincipalType("uzoqft") + .withRole(DataProductUserRole.SENSITIVE_READER) + .withRoleAssignmentId("qzrnkcqvyxlwhz"))); + model = BinaryData.fromObject(model).toObject(ListRoleAssignmentsInner.class); + Assertions.assertEquals(1235353776, model.count()); + Assertions.assertEquals("eiithlvmez", model.roleAssignmentResponse().get(0).roleId()); + Assertions.assertEquals("v", model.roleAssignmentResponse().get(0).principalId()); + Assertions.assertEquals("hxmzsbbzoggig", model.roleAssignmentResponse().get(0).username()); + Assertions.assertEquals("wburvjxxjnspydpt", model.roleAssignmentResponse().get(0).dataTypeScope().get(0)); + Assertions.assertEquals("yxoegukgjnp", model.roleAssignmentResponse().get(0).principalType()); + Assertions.assertEquals(DataProductUserRole.SENSITIVE_READER, model.roleAssignmentResponse().get(0).role()); + Assertions.assertEquals("cgygev", model.roleAssignmentResponse().get(0).roleAssignmentId()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ManagedResourceGroupConfigurationTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ManagedResourceGroupConfigurationTests.java new file mode 100644 index 000000000000..5f7048c24185 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ManagedResourceGroupConfigurationTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class ManagedResourceGroupConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedResourceGroupConfiguration model + = BinaryData.fromString("{\"name\":\"ssainqpjwnzll\",\"location\":\"fmppe\"}") + .toObject(ManagedResourceGroupConfiguration.class); + Assertions.assertEquals("ssainqpjwnzll", model.name()); + Assertions.assertEquals("fmppe", model.location()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedResourceGroupConfiguration model + = new ManagedResourceGroupConfiguration().withName("ssainqpjwnzll").withLocation("fmppe"); + model = BinaryData.fromObject(model).toObject(ManagedResourceGroupConfiguration.class); + Assertions.assertEquals("ssainqpjwnzll", model.name()); + Assertions.assertEquals("fmppe", model.location()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ManagedServiceIdentityTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ManagedServiceIdentityTests.java new file mode 100644 index 000000000000..fb1ad2987e0c --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/ManagedServiceIdentityTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentity; +import com.azure.resourcemanager.networkanalytics.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.networkanalytics.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedServiceIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedServiceIdentity model = BinaryData.fromString( + "{\"principalId\":\"4fcef1a9-72e4-4043-91e6-c47e058fc563\",\"tenantId\":\"57aefc45-bc4f-421d-9558-b51f2d19a9e7\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"oc\":{\"principalId\":\"142fe27d-018d-4656-b8fd-251eb325d9a3\",\"clientId\":\"2e766b34-c45e-432d-b0bd-adcf59a42bd1\"},\"ablgphuticndvk\":{\"principalId\":\"d086e8dc-d66b-4bcd-bebb-6848d6885a40\",\"clientId\":\"7a4a85a1-5f4f-45f7-bf25-cb2cb5f0e347\"},\"wyiftyhxhur\":{\"principalId\":\"e3e5eff6-610a-4c35-b02e-f7c80d1034c3\",\"clientId\":\"0e9b742b-a9e8-4040-b0e5-4d9f198f51d3\"},\"tyxolniwpwc\":{\"principalId\":\"de3770fe-33b1-448c-a5dc-3abaa379a8b6\",\"clientId\":\"88aee310-aca9-44fa-88cd-00c4e77b349a\"}}}") + .toObject(ManagedServiceIdentity.class); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities( + mapOf("oc", new UserAssignedIdentity(), "ablgphuticndvk", new UserAssignedIdentity(), "wyiftyhxhur", + new UserAssignedIdentity(), "tyxolniwpwc", new UserAssignedIdentity())); + model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationDisplayTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationDisplayTests.java new file mode 100644 index 000000000000..eed2cb8dbb92 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationDisplayTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.OperationDisplay; + +public final class OperationDisplayTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") + .toObject(OperationDisplay.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationDisplay model = new OperationDisplay(); + model = BinaryData.fromObject(model).toObject(OperationDisplay.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationInnerTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationInnerTests.java new file mode 100644 index 000000000000..903ca8280c13 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationInnerTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; +import com.azure.resourcemanager.networkanalytics.models.OperationDisplay; + +public final class OperationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationInner model = BinaryData.fromString( + "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + .toObject(OperationInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); + model = BinaryData.fromObject(model).toObject(OperationInner.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationListResultTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationListResultTests.java new file mode 100644 index 000000000000..7150c689d9df --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationListResultTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.OperationListResult; + +public final class OperationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") + .toObject(OperationListResult.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationListResult model = new OperationListResult(); + model = BinaryData.fromObject(model).toObject(OperationListResult.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListMockTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListMockTests.java new file mode 100644 index 000000000000..e5b318172f57 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListMockTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.networkanalytics.NetworkAnalyticsManager; +import com.azure.resourcemanager.networkanalytics.models.Operation; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class OperationsListMockTests { + @Test + public void testList() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr + = "{\"value\":[{\"name\":\"w\",\"isDataAction\":false,\"display\":{\"provider\":\"mmqhgyxzkonocuk\",\"resource\":\"lyaxuc\",\"operation\":\"uqszfk\",\"description\":\"ypewrmjmwvvjekt\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito.when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito.when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + NetworkAnalyticsManager manager = NetworkAnalyticsManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/PublisherInformationTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/PublisherInformationTests.java new file mode 100644 index 000000000000..db7ea70c00af --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/PublisherInformationTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.DataProductInformation; +import com.azure.resourcemanager.networkanalytics.models.DataProductVersion; +import com.azure.resourcemanager.networkanalytics.models.PublisherInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PublisherInformationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublisherInformation model = BinaryData.fromString( + "{\"publisherName\":\"qajzyulpkudjkr\",\"dataProducts\":[{\"dataProductName\":\"hbzhfepg\",\"description\":\"gqexzlocxs\",\"dataProductVersions\":[{\"version\":\"aierhhb\"},{\"version\":\"sglumma\"}]},{\"dataProductName\":\"tjaodxobnb\",\"description\":\"xkqpxo\",\"dataProductVersions\":[{\"version\":\"jionpimexgstxgc\"},{\"version\":\"odgmaajrmvdjwz\"},{\"version\":\"lovmclwhijcoe\"},{\"version\":\"ctbzaq\"}]},{\"dataProductName\":\"qsycbkbfkgu\",\"description\":\"dkexxppofm\",\"dataProductVersions\":[{\"version\":\"x\"},{\"version\":\"fjpgddtocjjxhvp\"},{\"version\":\"o\"},{\"version\":\"exhd\"}]}]}") + .toObject(PublisherInformation.class); + Assertions.assertEquals("qajzyulpkudjkr", model.publisherName()); + Assertions.assertEquals("hbzhfepg", model.dataProducts().get(0).dataProductName()); + Assertions.assertEquals("gqexzlocxs", model.dataProducts().get(0).description()); + Assertions.assertEquals("aierhhb", model.dataProducts().get(0).dataProductVersions().get(0).version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PublisherInformation model = new PublisherInformation().withPublisherName("qajzyulpkudjkr") + .withDataProducts(Arrays.asList( + new DataProductInformation().withDataProductName("hbzhfepg") + .withDescription("gqexzlocxs") + .withDataProductVersions(Arrays.asList(new DataProductVersion().withVersion("aierhhb"), + new DataProductVersion().withVersion("sglumma"))), + new DataProductInformation().withDataProductName("tjaodxobnb") + .withDescription("xkqpxo") + .withDataProductVersions(Arrays.asList(new DataProductVersion().withVersion("jionpimexgstxgc"), + new DataProductVersion().withVersion("odgmaajrmvdjwz"), + new DataProductVersion().withVersion("lovmclwhijcoe"), + new DataProductVersion().withVersion("ctbzaq"))), + new DataProductInformation().withDataProductName("qsycbkbfkgu") + .withDescription("dkexxppofm") + .withDataProductVersions(Arrays.asList(new DataProductVersion().withVersion("x"), + new DataProductVersion().withVersion("fjpgddtocjjxhvp"), + new DataProductVersion().withVersion("o"), new DataProductVersion().withVersion("exhd"))))); + model = BinaryData.fromObject(model).toObject(PublisherInformation.class); + Assertions.assertEquals("qajzyulpkudjkr", model.publisherName()); + Assertions.assertEquals("hbzhfepg", model.dataProducts().get(0).dataProductName()); + Assertions.assertEquals("gqexzlocxs", model.dataProducts().get(0).description()); + Assertions.assertEquals("aierhhb", model.dataProducts().get(0).dataProductVersions().get(0).version()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/RoleAssignmentCommonPropertiesTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/RoleAssignmentCommonPropertiesTests.java new file mode 100644 index 000000000000..747e99d6c6e7 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/RoleAssignmentCommonPropertiesTests.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.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import com.azure.resourcemanager.networkanalytics.models.RoleAssignmentCommonProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RoleAssignmentCommonPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoleAssignmentCommonProperties model = BinaryData.fromString( + "{\"roleId\":\"masxazjpqyegu\",\"principalId\":\"lhbxxhejjzzvdud\",\"userName\":\"wdslfhotwmcy\",\"dataTypeScope\":[\"wlbjnpgacftade\",\"xnltyfsoppu\"],\"principalType\":\"uesnzwdejbavo\",\"role\":\"SensitiveReader\"}") + .toObject(RoleAssignmentCommonProperties.class); + Assertions.assertEquals("masxazjpqyegu", model.roleId()); + Assertions.assertEquals("lhbxxhejjzzvdud", model.principalId()); + Assertions.assertEquals("wdslfhotwmcy", model.username()); + Assertions.assertEquals("wlbjnpgacftade", model.dataTypeScope().get(0)); + Assertions.assertEquals("uesnzwdejbavo", model.principalType()); + Assertions.assertEquals(DataProductUserRole.SENSITIVE_READER, model.role()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoleAssignmentCommonProperties model = new RoleAssignmentCommonProperties().withRoleId("masxazjpqyegu") + .withPrincipalId("lhbxxhejjzzvdud") + .withUsername("wdslfhotwmcy") + .withDataTypeScope(Arrays.asList("wlbjnpgacftade", "xnltyfsoppu")) + .withPrincipalType("uesnzwdejbavo") + .withRole(DataProductUserRole.SENSITIVE_READER); + model = BinaryData.fromObject(model).toObject(RoleAssignmentCommonProperties.class); + Assertions.assertEquals("masxazjpqyegu", model.roleId()); + Assertions.assertEquals("lhbxxhejjzzvdud", model.principalId()); + Assertions.assertEquals("wdslfhotwmcy", model.username()); + Assertions.assertEquals("wlbjnpgacftade", model.dataTypeScope().get(0)); + Assertions.assertEquals("uesnzwdejbavo", model.principalType()); + Assertions.assertEquals(DataProductUserRole.SENSITIVE_READER, model.role()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/RoleAssignmentDetailInnerTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/RoleAssignmentDetailInnerTests.java new file mode 100644 index 000000000000..abe79d6b8a3d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/RoleAssignmentDetailInnerTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.fluent.models.RoleAssignmentDetailInner; +import com.azure.resourcemanager.networkanalytics.models.DataProductUserRole; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RoleAssignmentDetailInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoleAssignmentDetailInner model = BinaryData.fromString( + "{\"roleId\":\"zdmohctbqvu\",\"principalId\":\"wxdndnvowgujjug\",\"userName\":\"dkcglhsl\",\"dataTypeScope\":[\"jdyggdtji\"],\"principalType\":\"hbkuofqwey\",\"role\":\"SensitiveReader\",\"roleAssignmentId\":\"menevfyexfwh\"}") + .toObject(RoleAssignmentDetailInner.class); + Assertions.assertEquals("zdmohctbqvu", model.roleId()); + Assertions.assertEquals("wxdndnvowgujjug", model.principalId()); + Assertions.assertEquals("dkcglhsl", model.username()); + Assertions.assertEquals("jdyggdtji", model.dataTypeScope().get(0)); + Assertions.assertEquals("hbkuofqwey", model.principalType()); + Assertions.assertEquals(DataProductUserRole.SENSITIVE_READER, model.role()); + Assertions.assertEquals("menevfyexfwh", model.roleAssignmentId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoleAssignmentDetailInner model = new RoleAssignmentDetailInner().withRoleId("zdmohctbqvu") + .withPrincipalId("wxdndnvowgujjug") + .withUsername("dkcglhsl") + .withDataTypeScope(Arrays.asList("jdyggdtji")) + .withPrincipalType("hbkuofqwey") + .withRole(DataProductUserRole.SENSITIVE_READER) + .withRoleAssignmentId("menevfyexfwh"); + model = BinaryData.fromObject(model).toObject(RoleAssignmentDetailInner.class); + Assertions.assertEquals("zdmohctbqvu", model.roleId()); + Assertions.assertEquals("wxdndnvowgujjug", model.principalId()); + Assertions.assertEquals("dkcglhsl", model.username()); + Assertions.assertEquals("jdyggdtji", model.dataTypeScope().get(0)); + Assertions.assertEquals("hbkuofqwey", model.principalType()); + Assertions.assertEquals(DataProductUserRole.SENSITIVE_READER, model.role()); + Assertions.assertEquals("menevfyexfwh", model.roleAssignmentId()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/UserAssignedIdentityTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/UserAssignedIdentityTests.java new file mode 100644 index 000000000000..84e9cb33060b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/UserAssignedIdentityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.UserAssignedIdentity; + +public final class UserAssignedIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserAssignedIdentity model = BinaryData.fromString( + "{\"principalId\":\"b4a69e1d-2c1d-421a-9885-4629eb07c93f\",\"clientId\":\"3380f17a-b577-447e-be7d-835ca603b8f2\"}") + .toObject(UserAssignedIdentity.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserAssignedIdentity model = new UserAssignedIdentity(); + model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/VirtualNetworkRuleTests.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/VirtualNetworkRuleTests.java new file mode 100644 index 000000000000..9e8609637f5b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/java/com/azure/resourcemanager/networkanalytics/generated/VirtualNetworkRuleTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.networkanalytics.models.VirtualNetworkRule; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkRule model + = BinaryData.fromString("{\"id\":\"bkzgcwrwclx\",\"action\":\"rljdouskcqv\",\"state\":\"cr\"}") + .toObject(VirtualNetworkRule.class); + Assertions.assertEquals("bkzgcwrwclx", model.id()); + Assertions.assertEquals("rljdouskcqv", model.action()); + Assertions.assertEquals("cr", model.state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkRule model + = new VirtualNetworkRule().withId("bkzgcwrwclx").withAction("rljdouskcqv").withState("cr"); + model = BinaryData.fromObject(model).toObject(VirtualNetworkRule.class); + Assertions.assertEquals("bkzgcwrwclx", model.id()); + Assertions.assertEquals("rljdouskcqv", model.action()); + Assertions.assertEquals("cr", model.state()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker new file mode 100644 index 000000000000..1f0955d450f0 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker @@ -0,0 +1 @@ +mock-maker-inline diff --git a/sdk/networkanalytics/ci.yml b/sdk/networkanalytics/ci.yml new file mode 100644 index 000000000000..5e20f0f99094 --- /dev/null +++ b/sdk/networkanalytics/ci.yml @@ -0,0 +1,46 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/networkanalytics/ci.yml + - sdk/networkanalytics/azure-resourcemanager-networkanalytics/ + exclude: + - sdk/networkanalytics/pom.xml + - sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkanalytics/ci.yml + - sdk/networkanalytics/azure-resourcemanager-networkanalytics/ + exclude: + - sdk/networkanalytics/pom.xml + - sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml + +parameters: + - name: release_azureresourcemanagernetworkanalytics + displayName: azure-resourcemanager-networkanalytics + type: boolean + default: false + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: networkanalytics + Artifacts: + - name: azure-resourcemanager-networkanalytics + groupId: com.azure.resourcemanager + safeName: azureresourcemanagernetworkanalytics + releaseInBatch: ${{ parameters.release_azureresourcemanagernetworkanalytics }} diff --git a/sdk/networkanalytics/cspell.yml b/sdk/networkanalytics/cspell.yml new file mode 100644 index 000000000000..8899b8dc6f15 --- /dev/null +++ b/sdk/networkanalytics/cspell.yml @@ -0,0 +1,9 @@ +# Spell-check overrides for this SDK group. +# Inherits the global config at the repo root. +# +# Add words that only appear in this folder here, in alphabetical order. +# Cross-cutting terms should go in the root cspell.json instead. +version: "0.2" +import: + - ../../.vscode/cspell.json +words: diff --git a/sdk/networkanalytics/pom.xml b/sdk/networkanalytics/pom.xml new file mode 100644 index 000000000000..5e6b0fc7a759 --- /dev/null +++ b/sdk/networkanalytics/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-networkanalytics-service + pom + 1.0.0 + + + azure-resourcemanager-networkanalytics + + diff --git a/sdk/networkanalytics/test-resources.bicep b/sdk/networkanalytics/test-resources.bicep new file mode 100644 index 000000000000..3ff2bac58bec --- /dev/null +++ b/sdk/networkanalytics/test-resources.bicep @@ -0,0 +1,22 @@ +@description('The tenant id to which the application and resources belong.') +param tenantId string = '72f988bf-86f1-41af-91ab-2d7cd011db47' + +@description('The client id of the service principal used to run tests.') +param testApplicationId string + +@description('This is the object id of the service principal used to run tests.') +param testApplicationOid string + +var contributorRoleId = '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c' + +resource contributorRoleId_name 'Microsoft.Authorization/roleAssignments@2022-04-01' = { + name: guid('contributorRoleId${resourceGroup().name}') + properties: { + roleDefinitionId: contributorRoleId + principalId: testApplicationOid + } +} + +output AZURE_TENANT_ID string = tenantId +output AZURE_SUBSCRIPTION_ID string = subscription().subscriptionId +output AZURE_RESOURCE_GROUP_NAME string = resourceGroup().name diff --git a/sdk/openai/azure-ai-openai-realtime/CHANGELOG.md b/sdk/openai/azure-ai-openai-realtime/CHANGELOG.md index 29ba79c4bccd..b64e6ac33abd 100644 --- a/sdk/openai/azure-ai-openai-realtime/CHANGELOG.md +++ b/sdk/openai/azure-ai-openai-realtime/CHANGELOG.md @@ -2,8 +2,6 @@ #### Dependency Updates -- Migrated `netty-codec-http` to `4.2.19.Final` and updated WebSocket event loops for Netty 4.2. - ## 1.0.0-beta.1 (TBD) -- Azure OpenAI Realtime client library for Java. +- Azure OpenAI Realtime client library for Java. \ No newline at end of file diff --git a/sdk/openai/azure-ai-openai-realtime/pom.xml b/sdk/openai/azure-ai-openai-realtime/pom.xml index 77fbbc6d14ea..a666b0f016da 100644 --- a/sdk/openai/azure-ai-openai-realtime/pom.xml +++ b/sdk/openai/azure-ai-openai-realtime/pom.xml @@ -59,14 +59,14 @@ com.azure azure-core - 1.61.0-beta.1 + 1.60.0 io.netty netty-codec-http - 4.2.19.Final + 4.1.138.Final @@ -81,13 +81,7 @@ com.azure azure-core-test - 1.27.0-beta.20 - test - - - com.azure - azure-core-http-netty - 1.17.0-beta.1 + 1.27.0-beta.19 test @@ -108,7 +102,7 @@ - io.netty:netty-codec-http:[4.2.19.Final] + io.netty:netty-codec-http:[4.1.138.Final] diff --git a/sdk/openai/azure-ai-openai-realtime/src/main/java/com/azure/ai/openai/realtime/implementation/websocket/WebSocketSessionNettyImpl.java b/sdk/openai/azure-ai-openai-realtime/src/main/java/com/azure/ai/openai/realtime/implementation/websocket/WebSocketSessionNettyImpl.java index 9bb3205ef776..a033e6c6cac7 100644 --- a/sdk/openai/azure-ai-openai-realtime/src/main/java/com/azure/ai/openai/realtime/implementation/websocket/WebSocketSessionNettyImpl.java +++ b/sdk/openai/azure-ai-openai-realtime/src/main/java/com/azure/ai/openai/realtime/implementation/websocket/WebSocketSessionNettyImpl.java @@ -14,8 +14,7 @@ import io.netty.channel.ChannelOption; import io.netty.channel.ChannelPipeline; import io.netty.channel.EventLoopGroup; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.codec.http.HttpClientCodec; @@ -35,6 +34,7 @@ import javax.net.ssl.SSLException; import java.net.URI; +import java.net.URISyntaxException; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; @@ -103,7 +103,7 @@ protected void initChannel(SocketChannel ch) { this.closeHandler = closeHandler; } - void connect() throws SSLException, InterruptedException, ExecutionException { + void connect() throws URISyntaxException, SSLException, InterruptedException, ExecutionException { String scheme = uri.getScheme() == null ? "ws" : uri.getScheme(); final String host = uri.getHost() == null ? "127.0.0.1" : uri.getHost(); final int port; @@ -131,7 +131,7 @@ void connect() throws SSLException, InterruptedException, ExecutionException { sslCtx = null; } - group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()); + group = new NioEventLoopGroup(); handshaker = WebSocketClientHandshakerFactory.newHandshaker(uri, WebSocketVersion.V13, this.subProtocol, true, this.headers); diff --git a/sdk/openai/azure-ai-openai-realtime/src/main/java/module-info.java b/sdk/openai/azure-ai-openai-realtime/src/main/java/module-info.java index e53704ff8e5e..6ea952fb0ced 100644 --- a/sdk/openai/azure-ai-openai-realtime/src/main/java/module-info.java +++ b/sdk/openai/azure-ai-openai-realtime/src/main/java/module-info.java @@ -10,7 +10,6 @@ requires io.netty.transport; requires io.netty.handler; requires io.netty.codec; - requires io.netty.codec.compression; requires io.netty.codec.http; exports com.azure.ai.openai.realtime; diff --git a/sdk/privatedns/azure-resourcemanager-privatedns/pom.xml b/sdk/privatedns/azure-resourcemanager-privatedns/pom.xml index 6bdac2cfa80d..06aa1227c2b4 100644 --- a/sdk/privatedns/azure-resourcemanager-privatedns/pom.xml +++ b/sdk/privatedns/azure-resourcemanager-privatedns/pom.xml @@ -66,7 +66,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.62.0 + 2.61.2 test diff --git a/sdk/purview/azure-analytics-purview-administration/CHANGELOG.md b/sdk/purview/azure-analytics-purview-administration/CHANGELOG.md new file mode 100644 index 000000000000..66337ffd7a9c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/CHANGELOG.md @@ -0,0 +1,21 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Breaking Changes + +- Removed class `PurviewAccountClientBuilder`. It was replaced by `AccountsClientBuilder`, `CollectionsClientBuilder`, `ResourceSetRulesClientBuilder`. +- Removed class `PurviewMetadataClientBuilder`. It was replaced by `MetadataPolicyClientBuilder`, `MetadataRolesClientBuilder`. +- Merged the `Context` parameter into the `RequestOptions` parameter in methods of clients. + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-core` to `1.29.1`. + +## 1.0.0-beta.1 (2021-10-15) + +### Other Changes + +- Initial beta release for Purview Administration client library. diff --git a/sdk/purview/azure-analytics-purview-administration/README.md b/sdk/purview/azure-analytics-purview-administration/README.md new file mode 100644 index 000000000000..15194ccf0e06 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/README.md @@ -0,0 +1,117 @@ +# Azure Purview Administration client library for Java + +Azure Purview data plane administration. It supports data plane operations. It can manage account, collections, keys, resource set rule, metadata policy, metadata roles. + +**Please rely heavily on the [service's documentation][product_documentation] and [data-plane documentation][protocol_method] to use this library** + +[Package (Maven)][package] | [API reference documentation][api_reference_doc] | [Product Documentation][product_documentation] + +## Getting started + +### Prerequisites + +- A [Java Development Kit (JDK)][jdk_link], version 8 or later. +- [Azure Subscription][azure_subscription] +- An existing Azure Purview administration. + +For more information about creating the account see [here][create_azure_purview_account]. + +Some API in administration requires permissions for the user or the service principal authenticated with the client. +For more information about permissions, see [here][azure_purview_permissions]. + +### Include the Package + +[//]: # ({x-version-update-start;com.azure:azure-analytics-purview-administration;current}) +```xml + + com.azure + azure-analytics-purview-administration + 1.0.0-beta.2 + +``` +[//]: # ({x-version-update-end}) + +### Authenticate the client + +In order to interact with the Azure Purview service, your client must present an Azure Active Directory bearer token to the service. + +After setup, you can choose which type of [credential][azure_identity_credential_type] from `azure-identity` to use. +We recommend using [DefaultAzureCredential][identity_dac], configured through the `AZURE_TOKEN_CREDENTIALS` environment variable. +Set this variable as described in the [Learn documentation][customize_defaultAzureCredential], which provides the most up-to-date guidance and examples. + +You can find more ways to authenticate with [azure-identity][azure_identity]. + +#### Create AccountsClient with Azure Active Directory Credential + +You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. + +To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below, or other credential providers provided with the Azure SDK, please include the `azure-identity` package: + +[//]: # ({x-version-update-start;com.azure:azure-identity;dependency}) +```xml + + com.azure + azure-identity + 1.18.2 + +``` +[//]: # ({x-version-update-end}) + +##### Example + +```java readme-sample-createAccountsClient +AccountsClient client = new AccountsClientBuilder() + .endpoint(System.getenv("ACCOUNT_ENDPOINT")) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); +``` + +## Key concepts + +## Examples + +```java readme-sample-getAccountProperties +AccountsClient client = new AccountsClientBuilder() + .endpoint(System.getenv("ACCOUNT_ENDPOINT")) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); +BinaryData response = client.getAccountPropertiesWithResponse(null).getValue(); +``` + +## Troubleshooting + +### Enabling Logging + +Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite +their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help +locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +## Next steps + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +[azure_subscription]: https://azure.microsoft.com/free/ +[api_reference_doc]: https://azure.github.io/azure-sdk-for-java +[product_documentation]: https://azure.microsoft.com/services/purview/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity +[DefaultAzureCredential]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md#defaultazurecredential +[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable +[package]: https://central.sonatype.com/artifact/com.azure/azure-analytics-purview-administration +[protocol_method]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/protocol-methods.md +[cla]: https://cla.microsoft.com +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com +[create_azure_purview_account]: https://learn.microsoft.com/azure/purview/create-catalog-portal +[azure_purview_permissions]: https://learn.microsoft.com/azure/purview/catalog-permissions +[logging]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/logging.md +[customize_defaultAzureCredential]: https://aka.ms/azsdk/java/identity/credential-chains#how-to-customize-defaultazurecredential +[azure_identity_credential_type]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials +[identity_dac]: https://aka.ms/azsdk/java/identity/credential-chains#defaultazurecredential-overview diff --git a/sdk/purview/azure-analytics-purview-administration/assets.json b/sdk/purview/azure-analytics-purview-administration/assets.json new file mode 100644 index 000000000000..ff8597ec9de4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/purview/azure-analytics-purview-administration", + "Tag": "java/purview/azure-analytics-purview-administration_8abad57efb" +} diff --git a/sdk/purview/azure-analytics-purview-administration/checkstyle-suppressions.xml b/sdk/purview/azure-analytics-purview-administration/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/purview/azure-analytics-purview-administration/pom.xml b/sdk/purview/azure-analytics-purview-administration/pom.xml new file mode 100644 index 000000000000..7f13bc62ff71 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-analytics-purview-administration + 1.0.0-beta.2 + + Microsoft Azure client library for Purview Administration + This package contains Microsoft Azure Purview Administration client library. + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + UTF-8 + 0.25 + 0.15 + + --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + + + false + + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/purview/azure-analytics-purview-administration/spotbugs-exclude.xml b/sdk/purview/azure-analytics-purview-administration/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsAsyncClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsAsyncClient.java new file mode 100644 index 000000000000..4b6486a65d5b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsAsyncClient.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.AccountsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewAccountClient type. + */ +@ServiceClient(builder = AccountsClientBuilder.class, isAsync = true) +public final class AccountsAsyncClient { + @Generated + private final AccountsImpl serviceClient; + + /** + * Initializes an instance of AccountsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + AccountsAsyncClient(AccountsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     identity (Optional): {
      +     *         principalId: String (Optional)
      +     *         tenantId: String (Optional)
      +     *         type: String(SystemAssigned) (Optional)
      +     *     }
      +     *     location: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         cloudConnectors (Optional): {
      +     *             awsExternalId: String (Optional)
      +     *         }
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByObjectId: String (Optional)
      +     *         endpoints (Optional): {
      +     *             catalog: String (Optional)
      +     *             guardian: String (Optional)
      +     *             scan: String (Optional)
      +     *         }
      +     *         friendlyName: String (Optional)
      +     *         managedResourceGroupName: String (Optional)
      +     *         managedResources (Optional): {
      +     *             eventHubNamespace: String (Optional)
      +     *             resourceGroup: String (Optional)
      +     *             storageAccount: String (Optional)
      +     *         }
      +     *         privateEndpointConnections (Optional): [
      +     *              (Optional){
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 properties (Optional): {
      +     *                     privateEndpoint (Optional): {
      +     *                         id: String (Optional)
      +     *                     }
      +     *                     privateLinkServiceConnectionState (Optional): {
      +     *                         actionsRequired: String (Optional)
      +     *                         description: String (Optional)
      +     *                         status: String(Unknown/Pending/Approved/Rejected/Disconnected) (Optional)
      +     *                     }
      +     *                     provisioningState: String (Optional)
      +     *                 }
      +     *                 type: String (Optional)
      +     *             }
      +     *         ]
      +     *         provisioningState: String(Unknown/Creating/Moving/Deleting/SoftDeleting/SoftDeleted/Failed/Succeeded/Canceled) (Optional)
      +     *         publicNetworkAccess: String(NotSpecified/Enabled/Disabled) (Optional)
      +     *     }
      +     *     sku (Optional): {
      +     *         capacity: Integer (Optional)
      +     *         name: String(Standard) (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     *     tags (Optional): {
      +     *         String: String (Required)
      +     *     }
      +     *     type: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return an account along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccountPropertiesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getAccountPropertiesWithResponseAsync(requestOptions); + } + + /** + * Updates an account. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     identity (Optional): {
      +     *         principalId: String (Optional)
      +     *         tenantId: String (Optional)
      +     *         type: String(SystemAssigned) (Optional)
      +     *     }
      +     *     location: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         cloudConnectors (Optional): {
      +     *             awsExternalId: String (Optional)
      +     *         }
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByObjectId: String (Optional)
      +     *         endpoints (Optional): {
      +     *             catalog: String (Optional)
      +     *             guardian: String (Optional)
      +     *             scan: String (Optional)
      +     *         }
      +     *         friendlyName: String (Optional)
      +     *         managedResourceGroupName: String (Optional)
      +     *         managedResources (Optional): {
      +     *             eventHubNamespace: String (Optional)
      +     *             resourceGroup: String (Optional)
      +     *             storageAccount: String (Optional)
      +     *         }
      +     *         privateEndpointConnections (Optional): [
      +     *              (Optional){
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 properties (Optional): {
      +     *                     privateEndpoint (Optional): {
      +     *                         id: String (Optional)
      +     *                     }
      +     *                     privateLinkServiceConnectionState (Optional): {
      +     *                         actionsRequired: String (Optional)
      +     *                         description: String (Optional)
      +     *                         status: String(Unknown/Pending/Approved/Rejected/Disconnected) (Optional)
      +     *                     }
      +     *                     provisioningState: String (Optional)
      +     *                 }
      +     *                 type: String (Optional)
      +     *             }
      +     *         ]
      +     *         provisioningState: String(Unknown/Creating/Moving/Deleting/SoftDeleting/SoftDeleted/Failed/Succeeded/Canceled) (Optional)
      +     *         publicNetworkAccess: String(NotSpecified/Enabled/Disabled) (Optional)
      +     *     }
      +     *     sku (Optional): {
      +     *         capacity: Integer (Optional)
      +     *         name: String(Standard) (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     *     tags (Optional): {
      +     *         String: String (Required)
      +     *     }
      +     *     type: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param accountUpdateParameters The accountUpdateParameters parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return account resource along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateAccountPropertiesWithResponse(BinaryData accountUpdateParameters, + RequestOptions requestOptions) { + return this.serviceClient.updateAccountPropertiesWithResponseAsync(accountUpdateParameters, requestOptions); + } + + /** + * List the authorization keys associated with this account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     atlasKafkaPrimaryEndpoint: String (Optional)
      +     *     atlasKafkaSecondaryEndpoint: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the Account access keys along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccessKeysWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getAccessKeysWithResponseAsync(requestOptions); + } + + /** + * Regenerate the authorization keys associated with this data catalog. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     keyType: String(PrimaryAtlasKafkaKey/SecondaryAtlasKafkaKey) (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     atlasKafkaPrimaryEndpoint: String (Optional)
      +     *     atlasKafkaSecondaryEndpoint: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param keyOptions The keyOptions parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the Account access keys along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateAccessKeyWithResponse(BinaryData keyOptions, + RequestOptions requestOptions) { + return this.serviceClient.regenerateAccessKeyWithResponseAsync(keyOptions, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsClient.java new file mode 100644 index 000000000000..a2030bca3794 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsClient.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.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.AccountsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewAccountClient type. + */ +@ServiceClient(builder = AccountsClientBuilder.class) +public final class AccountsClient { + @Generated + private final AccountsImpl serviceClient; + + /** + * Initializes an instance of AccountsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + AccountsClient(AccountsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     identity (Optional): {
      +     *         principalId: String (Optional)
      +     *         tenantId: String (Optional)
      +     *         type: String(SystemAssigned) (Optional)
      +     *     }
      +     *     location: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         cloudConnectors (Optional): {
      +     *             awsExternalId: String (Optional)
      +     *         }
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByObjectId: String (Optional)
      +     *         endpoints (Optional): {
      +     *             catalog: String (Optional)
      +     *             guardian: String (Optional)
      +     *             scan: String (Optional)
      +     *         }
      +     *         friendlyName: String (Optional)
      +     *         managedResourceGroupName: String (Optional)
      +     *         managedResources (Optional): {
      +     *             eventHubNamespace: String (Optional)
      +     *             resourceGroup: String (Optional)
      +     *             storageAccount: String (Optional)
      +     *         }
      +     *         privateEndpointConnections (Optional): [
      +     *              (Optional){
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 properties (Optional): {
      +     *                     privateEndpoint (Optional): {
      +     *                         id: String (Optional)
      +     *                     }
      +     *                     privateLinkServiceConnectionState (Optional): {
      +     *                         actionsRequired: String (Optional)
      +     *                         description: String (Optional)
      +     *                         status: String(Unknown/Pending/Approved/Rejected/Disconnected) (Optional)
      +     *                     }
      +     *                     provisioningState: String (Optional)
      +     *                 }
      +     *                 type: String (Optional)
      +     *             }
      +     *         ]
      +     *         provisioningState: String(Unknown/Creating/Moving/Deleting/SoftDeleting/SoftDeleted/Failed/Succeeded/Canceled) (Optional)
      +     *         publicNetworkAccess: String(NotSpecified/Enabled/Disabled) (Optional)
      +     *     }
      +     *     sku (Optional): {
      +     *         capacity: Integer (Optional)
      +     *         name: String(Standard) (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     *     tags (Optional): {
      +     *         String: String (Required)
      +     *     }
      +     *     type: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return an account along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAccountPropertiesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getAccountPropertiesWithResponse(requestOptions); + } + + /** + * Updates an account. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     identity (Optional): {
      +     *         principalId: String (Optional)
      +     *         tenantId: String (Optional)
      +     *         type: String(SystemAssigned) (Optional)
      +     *     }
      +     *     location: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         cloudConnectors (Optional): {
      +     *             awsExternalId: String (Optional)
      +     *         }
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByObjectId: String (Optional)
      +     *         endpoints (Optional): {
      +     *             catalog: String (Optional)
      +     *             guardian: String (Optional)
      +     *             scan: String (Optional)
      +     *         }
      +     *         friendlyName: String (Optional)
      +     *         managedResourceGroupName: String (Optional)
      +     *         managedResources (Optional): {
      +     *             eventHubNamespace: String (Optional)
      +     *             resourceGroup: String (Optional)
      +     *             storageAccount: String (Optional)
      +     *         }
      +     *         privateEndpointConnections (Optional): [
      +     *              (Optional){
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 properties (Optional): {
      +     *                     privateEndpoint (Optional): {
      +     *                         id: String (Optional)
      +     *                     }
      +     *                     privateLinkServiceConnectionState (Optional): {
      +     *                         actionsRequired: String (Optional)
      +     *                         description: String (Optional)
      +     *                         status: String(Unknown/Pending/Approved/Rejected/Disconnected) (Optional)
      +     *                     }
      +     *                     provisioningState: String (Optional)
      +     *                 }
      +     *                 type: String (Optional)
      +     *             }
      +     *         ]
      +     *         provisioningState: String(Unknown/Creating/Moving/Deleting/SoftDeleting/SoftDeleted/Failed/Succeeded/Canceled) (Optional)
      +     *         publicNetworkAccess: String(NotSpecified/Enabled/Disabled) (Optional)
      +     *     }
      +     *     sku (Optional): {
      +     *         capacity: Integer (Optional)
      +     *         name: String(Standard) (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     *     tags (Optional): {
      +     *         String: String (Required)
      +     *     }
      +     *     type: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param accountUpdateParameters The accountUpdateParameters parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return account resource along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAccountPropertiesWithResponse(BinaryData accountUpdateParameters, + RequestOptions requestOptions) { + return this.serviceClient.updateAccountPropertiesWithResponse(accountUpdateParameters, requestOptions); + } + + /** + * List the authorization keys associated with this account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     atlasKafkaPrimaryEndpoint: String (Optional)
      +     *     atlasKafkaSecondaryEndpoint: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the Account access keys along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAccessKeysWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getAccessKeysWithResponse(requestOptions); + } + + /** + * Regenerate the authorization keys associated with this data catalog. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     keyType: String(PrimaryAtlasKafkaKey/SecondaryAtlasKafkaKey) (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     atlasKafkaPrimaryEndpoint: String (Optional)
      +     *     atlasKafkaSecondaryEndpoint: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param keyOptions The keyOptions parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the Account access keys along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response regenerateAccessKeyWithResponse(BinaryData keyOptions, RequestOptions requestOptions) { + return this.serviceClient.regenerateAccessKeyWithResponse(keyOptions, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsClientBuilder.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsClientBuilder.java new file mode 100644 index 000000000000..8a7b1086e273 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/AccountsClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.PurviewAccountClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the AccountsClient type. + */ +@ServiceClientBuilder(serviceClients = { AccountsClient.class, AccountsAsyncClient.class }) +public final class AccountsClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-administration.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the AccountsClientBuilder. + */ + @Generated + public AccountsClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccountsClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccountsClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccountsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccountsClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccountsClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccountsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccountsClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccountsClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccountsClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewAccountServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the AccountsClientBuilder. + */ + @Generated + public AccountsClientBuilder serviceVersion(PurviewAccountServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the AccountsClientBuilder. + */ + @Generated + public AccountsClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewAccountClientImpl with the provided parameters. + * + * @return an instance of PurviewAccountClientImpl. + */ + @Generated + private PurviewAccountClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewAccountServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewAccountServiceVersion.getLatest(); + PurviewAccountClientImpl client = new PurviewAccountClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of AccountsAsyncClient class. + * + * @return an instance of AccountsAsyncClient. + */ + @Generated + public AccountsAsyncClient buildAsyncClient() { + return new AccountsAsyncClient(buildInnerClient().getAccounts()); + } + + /** + * Builds an instance of AccountsClient class. + * + * @return an instance of AccountsClient. + */ + @Generated + public AccountsClient buildClient() { + return new AccountsClient(buildInnerClient().getAccounts()); + } + + private static final ClientLogger LOGGER = new ClientLogger(AccountsClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsAsyncClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsAsyncClient.java new file mode 100644 index 000000000000..6afb7bd1f446 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsAsyncClient.java @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.CollectionsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewAccountClient type. + */ +@ServiceClient(builder = CollectionsClientBuilder.class, isAsync = true) +public final class CollectionsAsyncClient { + @Generated + private final CollectionsImpl serviceClient; + + /** + * Initializes an instance of CollectionsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + CollectionsAsyncClient(CollectionsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a collection. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a collection along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getCollectionWithResponse(String collectionName, RequestOptions requestOptions) { + return this.serviceClient.getCollectionWithResponseAsync(collectionName, requestOptions); + } + + /** + * Creates or updates a collection entity. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param collection The collection parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return collection resource along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateCollectionWithResponse(String collectionName, BinaryData collection, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateCollectionWithResponseAsync(collectionName, collection, requestOptions); + } + + /** + * Deletes a Collection entity. + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteCollectionWithResponse(String collectionName, RequestOptions requestOptions) { + return this.serviceClient.deleteCollectionWithResponseAsync(collectionName, requestOptions); + } + + /** + * List the collections in the account. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listCollections(RequestOptions requestOptions) { + return this.serviceClient.listCollectionsAsync(requestOptions); + } + + /** + * Lists the child collections names in the collection. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listChildCollectionNames(String collectionName, RequestOptions requestOptions) { + return this.serviceClient.listChildCollectionNamesAsync(collectionName, requestOptions); + } + + /** + * Gets the parent name and parent friendly name chains that represent the collection path. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentFriendlyNameChain (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     parentNameChain (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the parent name and parent friendly name chains that represent the collection path along with + * {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getCollectionPathWithResponse(String collectionName, + RequestOptions requestOptions) { + return this.serviceClient.getCollectionPathWithResponseAsync(collectionName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsClient.java new file mode 100644 index 000000000000..9b90dffb824b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsClient.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.CollectionsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewAccountClient type. + */ +@ServiceClient(builder = CollectionsClientBuilder.class) +public final class CollectionsClient { + @Generated + private final CollectionsImpl serviceClient; + + /** + * Initializes an instance of CollectionsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + CollectionsClient(CollectionsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a collection. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a collection along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCollectionWithResponse(String collectionName, RequestOptions requestOptions) { + return this.serviceClient.getCollectionWithResponse(collectionName, requestOptions); + } + + /** + * Creates or updates a collection entity. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param collection The collection parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return collection resource along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateCollectionWithResponse(String collectionName, BinaryData collection, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateCollectionWithResponse(collectionName, collection, requestOptions); + } + + /** + * Deletes a Collection entity. + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteCollectionWithResponse(String collectionName, RequestOptions requestOptions) { + return this.serviceClient.deleteCollectionWithResponse(collectionName, requestOptions); + } + + /** + * List the collections in the account. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCollections(RequestOptions requestOptions) { + return this.serviceClient.listCollections(requestOptions); + } + + /** + * Lists the child collections names in the collection. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listChildCollectionNames(String collectionName, RequestOptions requestOptions) { + return this.serviceClient.listChildCollectionNames(collectionName, requestOptions); + } + + /** + * Gets the parent name and parent friendly name chains that represent the collection path. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentFriendlyNameChain (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     parentNameChain (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the parent name and parent friendly name chains that represent the collection path along with + * {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCollectionPathWithResponse(String collectionName, RequestOptions requestOptions) { + return this.serviceClient.getCollectionPathWithResponse(collectionName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsClientBuilder.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsClientBuilder.java new file mode 100644 index 000000000000..9d7ce26a3e03 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/CollectionsClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.PurviewAccountClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the CollectionsClient type. + */ +@ServiceClientBuilder(serviceClients = { CollectionsClient.class, CollectionsAsyncClient.class }) +public final class CollectionsClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-administration.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the CollectionsClientBuilder. + */ + @Generated + public CollectionsClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CollectionsClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CollectionsClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CollectionsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CollectionsClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CollectionsClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CollectionsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CollectionsClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CollectionsClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CollectionsClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewAccountServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the CollectionsClientBuilder. + */ + @Generated + public CollectionsClientBuilder serviceVersion(PurviewAccountServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the CollectionsClientBuilder. + */ + @Generated + public CollectionsClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewAccountClientImpl with the provided parameters. + * + * @return an instance of PurviewAccountClientImpl. + */ + @Generated + private PurviewAccountClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewAccountServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewAccountServiceVersion.getLatest(); + PurviewAccountClientImpl client = new PurviewAccountClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of CollectionsAsyncClient class. + * + * @return an instance of CollectionsAsyncClient. + */ + @Generated + public CollectionsAsyncClient buildAsyncClient() { + return new CollectionsAsyncClient(buildInnerClient().getCollections()); + } + + /** + * Builds an instance of CollectionsClient class. + * + * @return an instance of CollectionsClient. + */ + @Generated + public CollectionsClient buildClient() { + return new CollectionsClient(buildInnerClient().getCollections()); + } + + private static final ClientLogger LOGGER = new ClientLogger(CollectionsClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyAsyncClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyAsyncClient.java new file mode 100644 index 000000000000..5f7b21c57530 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyAsyncClient.java @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.MetadataPoliciesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewMetadataClient type. + */ +@ServiceClient(builder = MetadataPolicyClientBuilder.class, isAsync = true) +public final class MetadataPolicyAsyncClient { + @Generated + private final MetadataPoliciesImpl serviceClient; + + /** + * Initializes an instance of MetadataPolicyAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + MetadataPolicyAsyncClient(MetadataPoliciesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List or Get metadata policies. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      collectionNameStringNoThe name of an existing collection for which one policy + * needs to be fetched.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata Policies as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAll(RequestOptions requestOptions) { + return this.serviceClient.listAllAsync(requestOptions); + } + + /** + * Updates a metadata policy. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param policyId Unique policy id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponse(String policyId, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponseAsync(policyId, requestOptions); + } + + /** + * Gets a metadata policy. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param policyId Id of an existing policy that needs to be fetched. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a metadata policy along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String policyId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(policyId, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyClient.java new file mode 100644 index 000000000000..2f1e1437a014 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyClient.java @@ -0,0 +1,313 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.MetadataPoliciesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewMetadataClient type. + */ +@ServiceClient(builder = MetadataPolicyClientBuilder.class) +public final class MetadataPolicyClient { + @Generated + private final MetadataPoliciesImpl serviceClient; + + /** + * Initializes an instance of MetadataPolicyClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + MetadataPolicyClient(MetadataPoliciesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List or Get metadata policies. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      collectionNameStringNoThe name of an existing collection for which one policy + * needs to be fetched.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata Policies as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + return this.serviceClient.listAll(requestOptions); + } + + /** + * Updates a metadata policy. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param policyId Unique policy id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String policyId, RequestOptions requestOptions) { + return this.serviceClient.updateWithResponse(policyId, requestOptions); + } + + /** + * Gets a metadata policy. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param policyId Id of an existing policy that needs to be fetched. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a metadata policy along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String policyId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(policyId, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyClientBuilder.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyClientBuilder.java new file mode 100644 index 000000000000..ec0f0426de86 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataPolicyClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.PurviewMetadataClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the MetadataPolicyClient type. + */ +@ServiceClientBuilder(serviceClients = { MetadataPolicyClient.class, MetadataPolicyAsyncClient.class }) +public final class MetadataPolicyClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-administration.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the MetadataPolicyClientBuilder. + */ + @Generated + public MetadataPolicyClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataPolicyClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataPolicyClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataPolicyClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataPolicyClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataPolicyClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataPolicyClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataPolicyClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataPolicyClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataPolicyClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewMetadataServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the MetadataPolicyClientBuilder. + */ + @Generated + public MetadataPolicyClientBuilder serviceVersion(PurviewMetadataServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the MetadataPolicyClientBuilder. + */ + @Generated + public MetadataPolicyClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewMetadataClientImpl with the provided parameters. + * + * @return an instance of PurviewMetadataClientImpl. + */ + @Generated + private PurviewMetadataClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewMetadataServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewMetadataServiceVersion.getLatest(); + PurviewMetadataClientImpl client = new PurviewMetadataClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of MetadataPolicyAsyncClient class. + * + * @return an instance of MetadataPolicyAsyncClient. + */ + @Generated + public MetadataPolicyAsyncClient buildAsyncClient() { + return new MetadataPolicyAsyncClient(buildInnerClient().getMetadataPolicies()); + } + + /** + * Builds an instance of MetadataPolicyClient class. + * + * @return an instance of MetadataPolicyClient. + */ + @Generated + public MetadataPolicyClient buildClient() { + return new MetadataPolicyClient(buildInnerClient().getMetadataPolicies()); + } + + private static final ClientLogger LOGGER = new ClientLogger(MetadataPolicyClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesAsyncClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesAsyncClient.java new file mode 100644 index 000000000000..d7ab81a7cb09 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesAsyncClient.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.MetadataRolesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the asynchronous PurviewMetadataClient type. + */ +@ServiceClient(builder = MetadataRolesClientBuilder.class, isAsync = true) +public final class MetadataRolesAsyncClient { + @Generated + private final MetadataRolesImpl serviceClient; + + /** + * Initializes an instance of MetadataRolesAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + MetadataRolesAsyncClient(MetadataRolesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Lists roles for Purview Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         provisioningState: String (Optional)
      +     *         roleType: String (Optional)
      +     *         friendlyName: String (Optional)
      +     *         description: String (Optional)
      +     *         cnfCondition (Optional): [
      +     *              (Optional)[
      +     *                  (Optional){
      +     *                     attributeName: String (Optional)
      +     *                     attributeValueIncludes: String (Optional)
      +     *                     attributeValueIncludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     attributeValueExcludes: String (Optional)
      +     *                     attributeValueExcludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         ]
      +     *         dnfCondition (Optional): [
      +     *              (Optional)[
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         ]
      +     *         version: Long (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata roles as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list(RequestOptions requestOptions) { + return this.serviceClient.listAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesClient.java new file mode 100644 index 000000000000..f18da3181382 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesClient.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.MetadataRolesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewMetadataClient type. + */ +@ServiceClient(builder = MetadataRolesClientBuilder.class) +public final class MetadataRolesClient { + @Generated + private final MetadataRolesImpl serviceClient; + + /** + * Initializes an instance of MetadataRolesClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + MetadataRolesClient(MetadataRolesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Lists roles for Purview Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         provisioningState: String (Optional)
      +     *         roleType: String (Optional)
      +     *         friendlyName: String (Optional)
      +     *         description: String (Optional)
      +     *         cnfCondition (Optional): [
      +     *              (Optional)[
      +     *                  (Optional){
      +     *                     attributeName: String (Optional)
      +     *                     attributeValueIncludes: String (Optional)
      +     *                     attributeValueIncludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     attributeValueExcludes: String (Optional)
      +     *                     attributeValueExcludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         ]
      +     *         dnfCondition (Optional): [
      +     *              (Optional)[
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         ]
      +     *         version: Long (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata roles as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + return this.serviceClient.list(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesClientBuilder.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesClientBuilder.java new file mode 100644 index 000000000000..37ca5010481c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/MetadataRolesClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.PurviewMetadataClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the MetadataRolesClient type. + */ +@ServiceClientBuilder(serviceClients = { MetadataRolesClient.class, MetadataRolesAsyncClient.class }) +public final class MetadataRolesClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-administration.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the MetadataRolesClientBuilder. + */ + @Generated + public MetadataRolesClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataRolesClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataRolesClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataRolesClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataRolesClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataRolesClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataRolesClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataRolesClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataRolesClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MetadataRolesClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewMetadataServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the MetadataRolesClientBuilder. + */ + @Generated + public MetadataRolesClientBuilder serviceVersion(PurviewMetadataServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the MetadataRolesClientBuilder. + */ + @Generated + public MetadataRolesClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewMetadataClientImpl with the provided parameters. + * + * @return an instance of PurviewMetadataClientImpl. + */ + @Generated + private PurviewMetadataClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewMetadataServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewMetadataServiceVersion.getLatest(); + PurviewMetadataClientImpl client = new PurviewMetadataClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of MetadataRolesAsyncClient class. + * + * @return an instance of MetadataRolesAsyncClient. + */ + @Generated + public MetadataRolesAsyncClient buildAsyncClient() { + return new MetadataRolesAsyncClient(buildInnerClient().getMetadataRoles()); + } + + /** + * Builds an instance of MetadataRolesClient class. + * + * @return an instance of MetadataRolesClient. + */ + @Generated + public MetadataRolesClient buildClient() { + return new MetadataRolesClient(buildInnerClient().getMetadataRoles()); + } + + private static final ClientLogger LOGGER = new ClientLogger(MetadataRolesClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/PurviewAccountServiceVersion.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/PurviewAccountServiceVersion.java new file mode 100644 index 000000000000..0d7e1fa88fb5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/PurviewAccountServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of PurviewAccount. + */ +public enum PurviewAccountServiceVersion implements ServiceVersion { + /** + * Enum value 2019-11-01-preview. + */ + V2019_11_01_PREVIEW("2019-11-01-preview"); + + private final String version; + + PurviewAccountServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link PurviewAccountServiceVersion}. + */ + public static PurviewAccountServiceVersion getLatest() { + return V2019_11_01_PREVIEW; + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/PurviewMetadataServiceVersion.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/PurviewMetadataServiceVersion.java new file mode 100644 index 000000000000..155549c44ae5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/PurviewMetadataServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of PurviewMetadata. + */ +public enum PurviewMetadataServiceVersion implements ServiceVersion { + /** + * Enum value 2021-07-01-preview. + */ + V2021_07_01_PREVIEW("2021-07-01-preview"); + + private final String version; + + PurviewMetadataServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link PurviewMetadataServiceVersion}. + */ + public static PurviewMetadataServiceVersion getLatest() { + return V2021_07_01_PREVIEW; + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesAsyncClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesAsyncClient.java new file mode 100644 index 000000000000..6a3fc1a1037a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesAsyncClient.java @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.ResourceSetRulesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewAccountClient type. + */ +@ServiceClient(builder = ResourceSetRulesClientBuilder.class, isAsync = true) +public final class ResourceSetRulesAsyncClient { + @Generated + private final ResourceSetRulesImpl serviceClient; + + /** + * Initializes an instance of ResourceSetRulesAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ResourceSetRulesAsyncClient(ResourceSetRulesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a resource set config service model. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getResourceSetRuleWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getResourceSetRuleWithResponseAsync(requestOptions); + } + + /** + * Creates or updates an resource set config. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param resourceSetRuleConfig The resourceSetRuleConfig parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return resourceSetRuleConfig implementation class along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateResourceSetRuleWithResponse(BinaryData resourceSetRuleConfig, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateResourceSetRuleWithResponseAsync(resourceSetRuleConfig, requestOptions); + } + + /** + * Deletes a ResourceSetRuleConfig resource. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteResourceSetRuleWithResponse(RequestOptions requestOptions) { + return this.serviceClient.deleteResourceSetRuleWithResponseAsync(requestOptions); + } + + /** + * Get a resource set config service model. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listResourceSetRules(RequestOptions requestOptions) { + return this.serviceClient.listResourceSetRulesAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesClient.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesClient.java new file mode 100644 index 000000000000..d05b27d9a372 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesClient.java @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.ResourceSetRulesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewAccountClient type. + */ +@ServiceClient(builder = ResourceSetRulesClientBuilder.class) +public final class ResourceSetRulesClient { + @Generated + private final ResourceSetRulesImpl serviceClient; + + /** + * Initializes an instance of ResourceSetRulesClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ResourceSetRulesClient(ResourceSetRulesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a resource set config service model. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getResourceSetRuleWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getResourceSetRuleWithResponse(requestOptions); + } + + /** + * Creates or updates an resource set config. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param resourceSetRuleConfig The resourceSetRuleConfig parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return resourceSetRuleConfig implementation class along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateResourceSetRuleWithResponse(BinaryData resourceSetRuleConfig, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateResourceSetRuleWithResponse(resourceSetRuleConfig, requestOptions); + } + + /** + * Deletes a ResourceSetRuleConfig resource. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteResourceSetRuleWithResponse(RequestOptions requestOptions) { + return this.serviceClient.deleteResourceSetRuleWithResponse(requestOptions); + } + + /** + * Get a resource set config service model. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listResourceSetRules(RequestOptions requestOptions) { + return this.serviceClient.listResourceSetRules(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesClientBuilder.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesClientBuilder.java new file mode 100644 index 000000000000..d4c01fe80955 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/ResourceSetRulesClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration; + +import com.azure.analytics.purview.administration.implementation.PurviewAccountClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the ResourceSetRulesClient type. + */ +@ServiceClientBuilder(serviceClients = { ResourceSetRulesClient.class, ResourceSetRulesAsyncClient.class }) +public final class ResourceSetRulesClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-administration.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the ResourceSetRulesClientBuilder. + */ + @Generated + public ResourceSetRulesClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ResourceSetRulesClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ResourceSetRulesClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ResourceSetRulesClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ResourceSetRulesClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ResourceSetRulesClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ResourceSetRulesClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ResourceSetRulesClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ResourceSetRulesClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ResourceSetRulesClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewAccountServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the ResourceSetRulesClientBuilder. + */ + @Generated + public ResourceSetRulesClientBuilder serviceVersion(PurviewAccountServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the ResourceSetRulesClientBuilder. + */ + @Generated + public ResourceSetRulesClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewAccountClientImpl with the provided parameters. + * + * @return an instance of PurviewAccountClientImpl. + */ + @Generated + private PurviewAccountClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewAccountServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewAccountServiceVersion.getLatest(); + PurviewAccountClientImpl client = new PurviewAccountClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of ResourceSetRulesAsyncClient class. + * + * @return an instance of ResourceSetRulesAsyncClient. + */ + @Generated + public ResourceSetRulesAsyncClient buildAsyncClient() { + return new ResourceSetRulesAsyncClient(buildInnerClient().getResourceSetRules()); + } + + /** + * Builds an instance of ResourceSetRulesClient class. + * + * @return an instance of ResourceSetRulesClient. + */ + @Generated + public ResourceSetRulesClient buildClient() { + return new ResourceSetRulesClient(buildInnerClient().getResourceSetRules()); + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSetRulesClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/AccountsImpl.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/AccountsImpl.java new file mode 100644 index 000000000000..5599fa90f7a6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/AccountsImpl.java @@ -0,0 +1,667 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.implementation; + +import com.azure.analytics.purview.administration.PurviewAccountServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Accounts. + */ +public final class AccountsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final AccountsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewAccountClientImpl client; + + /** + * Initializes an instance of AccountsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AccountsImpl(PurviewAccountClientImpl client) { + this.service = RestProxy.create(AccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewAccountServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewAccountClientAccounts to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PurviewAccountClientAccounts") + public interface AccountsService { + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getAccountProperties(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getAccountPropertiesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Patch("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> updateAccountProperties(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData accountUpdateParameters, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Patch("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response updateAccountPropertiesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData accountUpdateParameters, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/listkeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getAccessKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/listkeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getAccessKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/regeneratekeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> regenerateAccessKey(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData keyOptions, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/regeneratekeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response regenerateAccessKeySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData keyOptions, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     identity (Optional): {
      +     *         principalId: String (Optional)
      +     *         tenantId: String (Optional)
      +     *         type: String(SystemAssigned) (Optional)
      +     *     }
      +     *     location: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         cloudConnectors (Optional): {
      +     *             awsExternalId: String (Optional)
      +     *         }
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByObjectId: String (Optional)
      +     *         endpoints (Optional): {
      +     *             catalog: String (Optional)
      +     *             guardian: String (Optional)
      +     *             scan: String (Optional)
      +     *         }
      +     *         friendlyName: String (Optional)
      +     *         managedResourceGroupName: String (Optional)
      +     *         managedResources (Optional): {
      +     *             eventHubNamespace: String (Optional)
      +     *             resourceGroup: String (Optional)
      +     *             storageAccount: String (Optional)
      +     *         }
      +     *         privateEndpointConnections (Optional): [
      +     *              (Optional){
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 properties (Optional): {
      +     *                     privateEndpoint (Optional): {
      +     *                         id: String (Optional)
      +     *                     }
      +     *                     privateLinkServiceConnectionState (Optional): {
      +     *                         actionsRequired: String (Optional)
      +     *                         description: String (Optional)
      +     *                         status: String(Unknown/Pending/Approved/Rejected/Disconnected) (Optional)
      +     *                     }
      +     *                     provisioningState: String (Optional)
      +     *                 }
      +     *                 type: String (Optional)
      +     *             }
      +     *         ]
      +     *         provisioningState: String(Unknown/Creating/Moving/Deleting/SoftDeleting/SoftDeleted/Failed/Succeeded/Canceled) (Optional)
      +     *         publicNetworkAccess: String(NotSpecified/Enabled/Disabled) (Optional)
      +     *     }
      +     *     sku (Optional): {
      +     *         capacity: Integer (Optional)
      +     *         name: String(Standard) (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     *     tags (Optional): {
      +     *         String: String (Required)
      +     *     }
      +     *     type: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return an account along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccountPropertiesWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getAccountProperties(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     identity (Optional): {
      +     *         principalId: String (Optional)
      +     *         tenantId: String (Optional)
      +     *         type: String(SystemAssigned) (Optional)
      +     *     }
      +     *     location: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         cloudConnectors (Optional): {
      +     *             awsExternalId: String (Optional)
      +     *         }
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByObjectId: String (Optional)
      +     *         endpoints (Optional): {
      +     *             catalog: String (Optional)
      +     *             guardian: String (Optional)
      +     *             scan: String (Optional)
      +     *         }
      +     *         friendlyName: String (Optional)
      +     *         managedResourceGroupName: String (Optional)
      +     *         managedResources (Optional): {
      +     *             eventHubNamespace: String (Optional)
      +     *             resourceGroup: String (Optional)
      +     *             storageAccount: String (Optional)
      +     *         }
      +     *         privateEndpointConnections (Optional): [
      +     *              (Optional){
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 properties (Optional): {
      +     *                     privateEndpoint (Optional): {
      +     *                         id: String (Optional)
      +     *                     }
      +     *                     privateLinkServiceConnectionState (Optional): {
      +     *                         actionsRequired: String (Optional)
      +     *                         description: String (Optional)
      +     *                         status: String(Unknown/Pending/Approved/Rejected/Disconnected) (Optional)
      +     *                     }
      +     *                     provisioningState: String (Optional)
      +     *                 }
      +     *                 type: String (Optional)
      +     *             }
      +     *         ]
      +     *         provisioningState: String(Unknown/Creating/Moving/Deleting/SoftDeleting/SoftDeleted/Failed/Succeeded/Canceled) (Optional)
      +     *         publicNetworkAccess: String(NotSpecified/Enabled/Disabled) (Optional)
      +     *     }
      +     *     sku (Optional): {
      +     *         capacity: Integer (Optional)
      +     *         name: String(Standard) (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     *     tags (Optional): {
      +     *         String: String (Required)
      +     *     }
      +     *     type: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return an account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAccountPropertiesWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getAccountPropertiesSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Updates an account. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     identity (Optional): {
      +     *         principalId: String (Optional)
      +     *         tenantId: String (Optional)
      +     *         type: String(SystemAssigned) (Optional)
      +     *     }
      +     *     location: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         cloudConnectors (Optional): {
      +     *             awsExternalId: String (Optional)
      +     *         }
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByObjectId: String (Optional)
      +     *         endpoints (Optional): {
      +     *             catalog: String (Optional)
      +     *             guardian: String (Optional)
      +     *             scan: String (Optional)
      +     *         }
      +     *         friendlyName: String (Optional)
      +     *         managedResourceGroupName: String (Optional)
      +     *         managedResources (Optional): {
      +     *             eventHubNamespace: String (Optional)
      +     *             resourceGroup: String (Optional)
      +     *             storageAccount: String (Optional)
      +     *         }
      +     *         privateEndpointConnections (Optional): [
      +     *              (Optional){
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 properties (Optional): {
      +     *                     privateEndpoint (Optional): {
      +     *                         id: String (Optional)
      +     *                     }
      +     *                     privateLinkServiceConnectionState (Optional): {
      +     *                         actionsRequired: String (Optional)
      +     *                         description: String (Optional)
      +     *                         status: String(Unknown/Pending/Approved/Rejected/Disconnected) (Optional)
      +     *                     }
      +     *                     provisioningState: String (Optional)
      +     *                 }
      +     *                 type: String (Optional)
      +     *             }
      +     *         ]
      +     *         provisioningState: String(Unknown/Creating/Moving/Deleting/SoftDeleting/SoftDeleted/Failed/Succeeded/Canceled) (Optional)
      +     *         publicNetworkAccess: String(NotSpecified/Enabled/Disabled) (Optional)
      +     *     }
      +     *     sku (Optional): {
      +     *         capacity: Integer (Optional)
      +     *         name: String(Standard) (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     *     tags (Optional): {
      +     *         String: String (Required)
      +     *     }
      +     *     type: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param accountUpdateParameters The accountUpdateParameters parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return account resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateAccountPropertiesWithResponseAsync(BinaryData accountUpdateParameters, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.updateAccountProperties(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accountUpdateParameters, accept, requestOptions, context)); + } + + /** + * Updates an account. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     identity (Optional): {
      +     *         principalId: String (Optional)
      +     *         tenantId: String (Optional)
      +     *         type: String(SystemAssigned) (Optional)
      +     *     }
      +     *     location: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         cloudConnectors (Optional): {
      +     *             awsExternalId: String (Optional)
      +     *         }
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByObjectId: String (Optional)
      +     *         endpoints (Optional): {
      +     *             catalog: String (Optional)
      +     *             guardian: String (Optional)
      +     *             scan: String (Optional)
      +     *         }
      +     *         friendlyName: String (Optional)
      +     *         managedResourceGroupName: String (Optional)
      +     *         managedResources (Optional): {
      +     *             eventHubNamespace: String (Optional)
      +     *             resourceGroup: String (Optional)
      +     *             storageAccount: String (Optional)
      +     *         }
      +     *         privateEndpointConnections (Optional): [
      +     *              (Optional){
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 properties (Optional): {
      +     *                     privateEndpoint (Optional): {
      +     *                         id: String (Optional)
      +     *                     }
      +     *                     privateLinkServiceConnectionState (Optional): {
      +     *                         actionsRequired: String (Optional)
      +     *                         description: String (Optional)
      +     *                         status: String(Unknown/Pending/Approved/Rejected/Disconnected) (Optional)
      +     *                     }
      +     *                     provisioningState: String (Optional)
      +     *                 }
      +     *                 type: String (Optional)
      +     *             }
      +     *         ]
      +     *         provisioningState: String(Unknown/Creating/Moving/Deleting/SoftDeleting/SoftDeleted/Failed/Succeeded/Canceled) (Optional)
      +     *         publicNetworkAccess: String(NotSpecified/Enabled/Disabled) (Optional)
      +     *     }
      +     *     sku (Optional): {
      +     *         capacity: Integer (Optional)
      +     *         name: String(Standard) (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     *     tags (Optional): {
      +     *         String: String (Required)
      +     *     }
      +     *     type: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param accountUpdateParameters The accountUpdateParameters parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAccountPropertiesWithResponse(BinaryData accountUpdateParameters, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.updateAccountPropertiesSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accountUpdateParameters, accept, requestOptions, + Context.NONE); + } + + /** + * List the authorization keys associated with this account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     atlasKafkaPrimaryEndpoint: String (Optional)
      +     *     atlasKafkaSecondaryEndpoint: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the Account access keys along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccessKeysWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getAccessKeys(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * List the authorization keys associated with this account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     atlasKafkaPrimaryEndpoint: String (Optional)
      +     *     atlasKafkaSecondaryEndpoint: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the Account access keys along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAccessKeysWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getAccessKeysSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Regenerate the authorization keys associated with this data catalog. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     keyType: String(PrimaryAtlasKafkaKey/SecondaryAtlasKafkaKey) (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     atlasKafkaPrimaryEndpoint: String (Optional)
      +     *     atlasKafkaSecondaryEndpoint: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param keyOptions The keyOptions parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the Account access keys along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> regenerateAccessKeyWithResponseAsync(BinaryData keyOptions, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.regenerateAccessKey(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), keyOptions, accept, requestOptions, context)); + } + + /** + * Regenerate the authorization keys associated with this data catalog. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     keyType: String(PrimaryAtlasKafkaKey/SecondaryAtlasKafkaKey) (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     atlasKafkaPrimaryEndpoint: String (Optional)
      +     *     atlasKafkaSecondaryEndpoint: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param keyOptions The keyOptions parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the Account access keys along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response regenerateAccessKeyWithResponse(BinaryData keyOptions, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.regenerateAccessKeySync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + keyOptions, accept, requestOptions, Context.NONE); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/CollectionsImpl.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/CollectionsImpl.java new file mode 100644 index 000000000000..1d06217da568 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/CollectionsImpl.java @@ -0,0 +1,1095 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.implementation; + +import com.azure.analytics.purview.administration.PurviewAccountServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Collections. + */ +public final class CollectionsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final CollectionsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewAccountClientImpl client; + + /** + * Initializes an instance of CollectionsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CollectionsImpl(PurviewAccountClientImpl client) { + this.service + = RestProxy.create(CollectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewAccountServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewAccountClientCollections to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PurviewAccountClientCollections") + public interface CollectionsService { + @Get("/collections/{collectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getCollection(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/collections/{collectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getCollectionSync(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/collections/{collectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdateCollection(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData collection, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/collections/{collectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateCollectionSync(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData collection, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/collections/{collectionName}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteCollection(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/collections/{collectionName}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteCollectionSync(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/collections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listCollections(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/collections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listCollectionsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/collections/{collectionName}/getChildCollectionNames") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listChildCollectionNames(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/collections/{collectionName}/getChildCollectionNames") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listChildCollectionNamesSync(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/collections/{collectionName}/getCollectionPath") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getCollectionPath(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/collections/{collectionName}/getCollectionPath") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getCollectionPathSync(@HostParam("endpoint") String endpoint, + @PathParam("collectionName") String collectionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listCollectionsNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listCollectionsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listChildCollectionNamesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listChildCollectionNamesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get a collection. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a collection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getCollectionWithResponseAsync(String collectionName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getCollection(this.client.getEndpoint(), collectionName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a collection. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a collection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCollectionWithResponse(String collectionName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getCollectionSync(this.client.getEndpoint(), collectionName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Creates or updates a collection entity. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param collection The collection parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return collection resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateCollectionWithResponseAsync(String collectionName, + BinaryData collection, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createOrUpdateCollection(this.client.getEndpoint(), + collectionName, this.client.getServiceVersion().getVersion(), collection, accept, requestOptions, context)); + } + + /** + * Creates or updates a collection entity. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param collection The collection parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return collection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateCollectionWithResponse(String collectionName, BinaryData collection, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createOrUpdateCollectionSync(this.client.getEndpoint(), collectionName, + this.client.getServiceVersion().getVersion(), collection, accept, requestOptions, Context.NONE); + } + + /** + * Deletes a Collection entity. + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteCollectionWithResponseAsync(String collectionName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.deleteCollection(this.client.getEndpoint(), collectionName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a Collection entity. + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteCollectionWithResponse(String collectionName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteCollectionSync(this.client.getEndpoint(), collectionName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * List the collections in the account. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCollectionsSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listCollections(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List the collections in the account. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listCollectionsAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listCollectionsSinglePageAsync(requestOptions), + nextLink -> listCollectionsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List the collections in the account. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listCollectionsSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listCollectionsSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List the collections in the account. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCollections(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listCollectionsSinglePage(requestOptions), + nextLink -> listCollectionsNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Lists the child collections names in the collection. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listChildCollectionNamesSinglePageAsync(String collectionName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listChildCollectionNames(this.client.getEndpoint(), collectionName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Lists the child collections names in the collection. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listChildCollectionNamesAsync(String collectionName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listChildCollectionNamesSinglePageAsync(collectionName, requestOptions), + nextLink -> listChildCollectionNamesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Lists the child collections names in the collection. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listChildCollectionNamesSinglePage(String collectionName, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listChildCollectionNamesSync(this.client.getEndpoint(), collectionName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Lists the child collections names in the collection. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listChildCollectionNames(String collectionName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listChildCollectionNamesSinglePage(collectionName, requestOptions), + nextLink -> listChildCollectionNamesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets the parent name and parent friendly name chains that represent the collection path. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentFriendlyNameChain (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     parentNameChain (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the parent name and parent friendly name chains that represent the collection path along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getCollectionPathWithResponseAsync(String collectionName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getCollectionPath(this.client.getEndpoint(), collectionName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets the parent name and parent friendly name chains that represent the collection path. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentFriendlyNameChain (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     *     parentNameChain (Optional): [
      +     *         String (Optional)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param collectionName The collectionName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the parent name and parent friendly name chains that represent the collection path along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCollectionPathWithResponse(String collectionName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getCollectionPathSync(this.client.getEndpoint(), collectionName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCollectionsNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listCollectionsNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     collectionProvisioningState: String(Unknown/Creating/Moving/Deleting/Failed/Succeeded) (Optional)
      +     *     description: String (Optional)
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     *     parentCollection (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String (Optional)
      +     *     }
      +     *     systemData (Optional): {
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         createdBy: String (Optional)
      +     *         createdByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastModifiedBy: String (Optional)
      +     *         lastModifiedByType: String(User/Application/ManagedIdentity/Key) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listCollectionsNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listCollectionsNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listChildCollectionNamesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listChildCollectionNamesNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     friendlyName: String (Optional)
      +     *     name: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of collections along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listChildCollectionNamesNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listChildCollectionNamesNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/MetadataPoliciesImpl.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/MetadataPoliciesImpl.java new file mode 100644 index 000000000000..6bfda12e6310 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/MetadataPoliciesImpl.java @@ -0,0 +1,1056 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.implementation; + +import com.azure.analytics.purview.administration.PurviewMetadataServiceVersion; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MetadataPolicies. + */ +public final class MetadataPoliciesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final MetadataPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final PurviewMetadataClientImpl client; + + /** + * Initializes an instance of MetadataPoliciesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MetadataPoliciesImpl(PurviewMetadataClientImpl client) { + this.service + = RestProxy.create(MetadataPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewMetadataServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewMetadataClientMetadataPolicies to be used by the proxy service + * to perform REST calls. + */ + @Host("{Endpoint}/policyStore") + @ServiceInterface(name = "PurviewMetadataClientMetadataPolicies") + public interface MetadataPoliciesService { + @Get("/metadataPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAll(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/metadataPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllSync(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/metadataPolicies/{policyId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> update(@HostParam("Endpoint") String endpoint, + @PathParam("policyId") String policyId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/metadataPolicies/{policyId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response updateSync(@HostParam("Endpoint") String endpoint, @PathParam("policyId") String policyId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/metadataPolicies/{policyId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("Endpoint") String endpoint, @PathParam("policyId") String policyId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/metadataPolicies/{policyId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("Endpoint") String endpoint, @PathParam("policyId") String policyId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * List or Get metadata policies. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      collectionNameStringNoThe name of an existing collection for which one policy + * needs to be fetched.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata Policies along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAll(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "values"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List or Get metadata policies. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      collectionNameStringNoThe name of an existing collection for which one policy + * needs to be fetched.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata Policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listAllSinglePageAsync(requestOptions), + nextLink -> listAllNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List or Get metadata policies. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      collectionNameStringNoThe name of an existing collection for which one policy + * needs to be fetched.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata Policies along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listAllSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "values"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List or Get metadata policies. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      collectionNameStringNoThe name of an existing collection for which one policy + * needs to be fetched.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata Policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listAllSinglePage(requestOptions), + nextLink -> listAllNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Updates a metadata policy. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param policyId Unique policy id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync(String policyId, RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), policyId, + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, context)); + } + + /** + * Updates a metadata policy. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param policyId Unique policy id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String policyId, RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return service.updateSync(this.client.getEndpoint(), policyId, this.client.getServiceVersion().getVersion(), + accept, requestOptionsLocal, Context.NONE); + } + + /** + * Gets a metadata policy. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param policyId Id of an existing policy that needs to be fetched. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a metadata policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String policyId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), policyId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets a metadata policy. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param policyId Id of an existing policy that needs to be fetched. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a metadata policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String policyId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), policyId, this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata Policies along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "values"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     name: String (Optional)
      +     *     id: String (Optional)
      +     *     version: Integer (Optional)
      +     *     properties (Optional): {
      +     *         description: String (Optional)
      +     *         decisionRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 effect: String(Deny/Permit) (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                          (Optional){
      +     *                             attributeName: String (Optional)
      +     *                             attributeValueIncludes: String (Optional)
      +     *                             attributeValueIncludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                             attributeValueExcludes: String (Optional)
      +     *                             attributeValueExcludedIn (Optional): [
      +     *                                 String (Optional)
      +     *                             ]
      +     *                         }
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         attributeRules (Optional): [
      +     *              (Optional){
      +     *                 kind: String(decisionrule/attributerule) (Optional)
      +     *                 id: String (Optional)
      +     *                 name: String (Optional)
      +     *                 dnfCondition (Optional): [
      +     *                      (Optional)[
      +     *                         (recursive schema, see above)
      +     *                     ]
      +     *                 ]
      +     *             }
      +     *         ]
      +     *         collection (Optional): {
      +     *             type: String (Optional)
      +     *             referenceName: String (Optional)
      +     *         }
      +     *         parentCollectionName: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata Policies along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "values"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/MetadataRolesImpl.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/MetadataRolesImpl.java new file mode 100644 index 000000000000..4aace4eb29b1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/MetadataRolesImpl.java @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.implementation; + +import com.azure.analytics.purview.administration.PurviewMetadataServiceVersion; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MetadataRoles. + */ +public final class MetadataRolesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final MetadataRolesService service; + + /** + * The service client containing this operation class. + */ + private final PurviewMetadataClientImpl client; + + /** + * Initializes an instance of MetadataRolesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MetadataRolesImpl(PurviewMetadataClientImpl client) { + this.service + = RestProxy.create(MetadataRolesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewMetadataServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewMetadataClientMetadataRoles to be used by the proxy service to + * perform REST calls. + */ + @Host("{Endpoint}/policyStore") + @ServiceInterface(name = "PurviewMetadataClientMetadataRoles") + public interface MetadataRolesService { + @Get("/metadataRoles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> list(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/metadataRoles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSync(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Lists roles for Purview Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         provisioningState: String (Optional)
      +     *         roleType: String (Optional)
      +     *         friendlyName: String (Optional)
      +     *         description: String (Optional)
      +     *         cnfCondition (Optional): [
      +     *              (Optional)[
      +     *                  (Optional){
      +     *                     attributeName: String (Optional)
      +     *                     attributeValueIncludes: String (Optional)
      +     *                     attributeValueIncludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     attributeValueExcludes: String (Optional)
      +     *                     attributeValueExcludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         ]
      +     *         dnfCondition (Optional): [
      +     *              (Optional)[
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         ]
      +     *         version: Long (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "values"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Lists roles for Purview Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         provisioningState: String (Optional)
      +     *         roleType: String (Optional)
      +     *         friendlyName: String (Optional)
      +     *         description: String (Optional)
      +     *         cnfCondition (Optional): [
      +     *              (Optional)[
      +     *                  (Optional){
      +     *                     attributeName: String (Optional)
      +     *                     attributeValueIncludes: String (Optional)
      +     *                     attributeValueIncludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     attributeValueExcludes: String (Optional)
      +     *                     attributeValueExcludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         ]
      +     *         dnfCondition (Optional): [
      +     *              (Optional)[
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         ]
      +     *         version: Long (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata roles as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listSinglePageAsync(requestOptions), + nextLink -> listNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Lists roles for Purview Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         provisioningState: String (Optional)
      +     *         roleType: String (Optional)
      +     *         friendlyName: String (Optional)
      +     *         description: String (Optional)
      +     *         cnfCondition (Optional): [
      +     *              (Optional)[
      +     *                  (Optional){
      +     *                     attributeName: String (Optional)
      +     *                     attributeValueIncludes: String (Optional)
      +     *                     attributeValueIncludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     attributeValueExcludes: String (Optional)
      +     *                     attributeValueExcludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         ]
      +     *         dnfCondition (Optional): [
      +     *              (Optional)[
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         ]
      +     *         version: Long (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata roles along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "values"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Lists roles for Purview Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         provisioningState: String (Optional)
      +     *         roleType: String (Optional)
      +     *         friendlyName: String (Optional)
      +     *         description: String (Optional)
      +     *         cnfCondition (Optional): [
      +     *              (Optional)[
      +     *                  (Optional){
      +     *                     attributeName: String (Optional)
      +     *                     attributeValueIncludes: String (Optional)
      +     *                     attributeValueIncludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     attributeValueExcludes: String (Optional)
      +     *                     attributeValueExcludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         ]
      +     *         dnfCondition (Optional): [
      +     *              (Optional)[
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         ]
      +     *         version: Long (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata roles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listSinglePage(requestOptions), + nextLink -> listNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         provisioningState: String (Optional)
      +     *         roleType: String (Optional)
      +     *         friendlyName: String (Optional)
      +     *         description: String (Optional)
      +     *         cnfCondition (Optional): [
      +     *              (Optional)[
      +     *                  (Optional){
      +     *                     attributeName: String (Optional)
      +     *                     attributeValueIncludes: String (Optional)
      +     *                     attributeValueIncludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     attributeValueExcludes: String (Optional)
      +     *                     attributeValueExcludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         ]
      +     *         dnfCondition (Optional): [
      +     *              (Optional)[
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         ]
      +     *         version: Long (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata roles along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "values"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         provisioningState: String (Optional)
      +     *         roleType: String (Optional)
      +     *         friendlyName: String (Optional)
      +     *         description: String (Optional)
      +     *         cnfCondition (Optional): [
      +     *              (Optional)[
      +     *                  (Optional){
      +     *                     attributeName: String (Optional)
      +     *                     attributeValueIncludes: String (Optional)
      +     *                     attributeValueIncludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                     attributeValueExcludes: String (Optional)
      +     *                     attributeValueExcludedIn (Optional): [
      +     *                         String (Optional)
      +     *                     ]
      +     *                 }
      +     *             ]
      +     *         ]
      +     *         dnfCondition (Optional): [
      +     *              (Optional)[
      +     *                 (recursive schema, see above)
      +     *             ]
      +     *         ]
      +     *         version: Long (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of Metadata roles along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "values"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/PurviewAccountClientImpl.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/PurviewAccountClientImpl.java new file mode 100644 index 000000000000..9a0a5d8b8872 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/PurviewAccountClientImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.implementation; + +import com.azure.analytics.purview.administration.PurviewAccountServiceVersion; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the PurviewAccountClient type. + */ +public final class PurviewAccountClientImpl { + /** + * The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/account/. + */ + private final String endpoint; + + /** + * Gets The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/account/. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final PurviewAccountServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewAccountServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The AccountsImpl object to access its operations. + */ + private final AccountsImpl accounts; + + /** + * Gets the AccountsImpl object to access its operations. + * + * @return the AccountsImpl object. + */ + public AccountsImpl getAccounts() { + return this.accounts; + } + + /** + * The CollectionsImpl object to access its operations. + */ + private final CollectionsImpl collections; + + /** + * Gets the CollectionsImpl object to access its operations. + * + * @return the CollectionsImpl object. + */ + public CollectionsImpl getCollections() { + return this.collections; + } + + /** + * The ResourceSetRulesImpl object to access its operations. + */ + private final ResourceSetRulesImpl resourceSetRules; + + /** + * Gets the ResourceSetRulesImpl object to access its operations. + * + * @return the ResourceSetRulesImpl object. + */ + public ResourceSetRulesImpl getResourceSetRules() { + return this.resourceSetRules; + } + + /** + * Initializes an instance of PurviewAccountClient client. + * + * @param endpoint The account endpoint of your Purview account. Example: + * https://{accountName}.purview.azure.com/account/. + * @param serviceVersion Service version. + */ + public PurviewAccountClientImpl(String endpoint, PurviewAccountServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewAccountClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The account endpoint of your Purview account. Example: + * https://{accountName}.purview.azure.com/account/. + * @param serviceVersion Service version. + */ + public PurviewAccountClientImpl(HttpPipeline httpPipeline, String endpoint, + PurviewAccountServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewAccountClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The account endpoint of your Purview account. Example: + * https://{accountName}.purview.azure.com/account/. + * @param serviceVersion Service version. + */ + public PurviewAccountClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + PurviewAccountServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.accounts = new AccountsImpl(this); + this.collections = new CollectionsImpl(this); + this.resourceSetRules = new ResourceSetRulesImpl(this); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/PurviewMetadataClientImpl.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/PurviewMetadataClientImpl.java new file mode 100644 index 000000000000..ded236dfba05 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/PurviewMetadataClientImpl.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.implementation; + +import com.azure.analytics.purview.administration.PurviewMetadataServiceVersion; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the PurviewMetadataClient type. + */ +public final class PurviewMetadataClientImpl { + /** + * The endpoint of your Purview account. Example: https://{accountName}.purview.azure.com. + */ + private final String endpoint; + + /** + * Gets The endpoint of your Purview account. Example: https://{accountName}.purview.azure.com. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final PurviewMetadataServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewMetadataServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The MetadataRolesImpl object to access its operations. + */ + private final MetadataRolesImpl metadataRoles; + + /** + * Gets the MetadataRolesImpl object to access its operations. + * + * @return the MetadataRolesImpl object. + */ + public MetadataRolesImpl getMetadataRoles() { + return this.metadataRoles; + } + + /** + * The MetadataPoliciesImpl object to access its operations. + */ + private final MetadataPoliciesImpl metadataPolicies; + + /** + * Gets the MetadataPoliciesImpl object to access its operations. + * + * @return the MetadataPoliciesImpl object. + */ + public MetadataPoliciesImpl getMetadataPolicies() { + return this.metadataPolicies; + } + + /** + * Initializes an instance of PurviewMetadataClient client. + * + * @param endpoint The endpoint of your Purview account. Example: https://{accountName}.purview.azure.com. + * @param serviceVersion Service version. + */ + public PurviewMetadataClientImpl(String endpoint, PurviewMetadataServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewMetadataClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The endpoint of your Purview account. Example: https://{accountName}.purview.azure.com. + * @param serviceVersion Service version. + */ + public PurviewMetadataClientImpl(HttpPipeline httpPipeline, String endpoint, + PurviewMetadataServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewMetadataClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The endpoint of your Purview account. Example: https://{accountName}.purview.azure.com. + * @param serviceVersion Service version. + */ + public PurviewMetadataClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + PurviewMetadataServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.metadataRoles = new MetadataRolesImpl(this); + this.metadataPolicies = new MetadataPoliciesImpl(this); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/ResourceSetRulesImpl.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/ResourceSetRulesImpl.java new file mode 100644 index 000000000000..3c24a34732cc --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/ResourceSetRulesImpl.java @@ -0,0 +1,1686 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.implementation; + +import com.azure.analytics.purview.administration.PurviewAccountServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ResourceSetRules. + */ +public final class ResourceSetRulesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ResourceSetRulesService service; + + /** + * The service client containing this operation class. + */ + private final PurviewAccountClientImpl client; + + /** + * Initializes an instance of ResourceSetRulesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ResourceSetRulesImpl(PurviewAccountClientImpl client) { + this.service + = RestProxy.create(ResourceSetRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewAccountServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewAccountClientResourceSetRules to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PurviewAccountClientResourceSetRules") + public interface ResourceSetRulesService { + @Get("/resourceSetRuleConfigs/defaultResourceSetRuleConfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getResourceSetRule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/resourceSetRuleConfigs/defaultResourceSetRuleConfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getResourceSetRuleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/resourceSetRuleConfigs/defaultResourceSetRuleConfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdateResourceSetRule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData resourceSetRuleConfig, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/resourceSetRuleConfigs/defaultResourceSetRuleConfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateResourceSetRuleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData resourceSetRuleConfig, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/resourceSetRuleConfigs/defaultResourceSetRuleConfig") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteResourceSetRule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/resourceSetRuleConfigs/defaultResourceSetRuleConfig") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteResourceSetRuleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/resourceSetRuleConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listResourceSetRules(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/resourceSetRuleConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listResourceSetRulesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listResourceSetRulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listResourceSetRulesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get a resource set config service model. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getResourceSetRuleWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getResourceSetRule(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a resource set config service model. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getResourceSetRuleWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getResourceSetRuleSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Creates or updates an resource set config. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param resourceSetRuleConfig The resourceSetRuleConfig parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return resourceSetRuleConfig implementation class along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateResourceSetRuleWithResponseAsync(BinaryData resourceSetRuleConfig, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createOrUpdateResourceSetRule(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), resourceSetRuleConfig, accept, requestOptions, context)); + } + + /** + * Creates or updates an resource set config. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param resourceSetRuleConfig The resourceSetRuleConfig parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return resourceSetRuleConfig implementation class along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateResourceSetRuleWithResponse(BinaryData resourceSetRuleConfig, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createOrUpdateResourceSetRuleSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), resourceSetRuleConfig, accept, requestOptions, Context.NONE); + } + + /** + * Deletes a ResourceSetRuleConfig resource. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteResourceSetRuleWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.deleteResourceSetRule(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a ResourceSetRuleConfig resource. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteResourceSetRuleWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteResourceSetRuleSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get a resource set config service model. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listResourceSetRulesSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listResourceSetRules(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a resource set config service model. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listResourceSetRulesAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listResourceSetRulesSinglePageAsync(requestOptions), + nextLink -> listResourceSetRulesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a resource set config service model. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listResourceSetRulesSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listResourceSetRulesSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a resource set config service model. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $skipTokenStringNoThe skipToken parameter
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a resource set config service model as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listResourceSetRules(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listResourceSetRulesSinglePage(requestOptions), + nextLink -> listResourceSetRulesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of account resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listResourceSetRulesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listResourceSetRulesNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     advancedResourceSet (Optional): {
      +     *         modifiedAt: OffsetDateTime (Optional)
      +     *         resourceSetProcessing: String(Default/Advanced) (Optional)
      +     *     }
      +     *     name: String (Optional)
      +     *     pathPatternConfig (Optional): {
      +     *         acceptedPatterns (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 filterType: String(Pattern/Regex) (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 path: String (Required)
      +     *             }
      +     *         ]
      +     *         complexReplacers (Optional): [
      +     *              (Optional){
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Optional)
      +     *                 typeName: String (Optional)
      +     *             }
      +     *         ]
      +     *         createdBy: String (Required)
      +     *         enableDefaultPatterns: boolean (Required)
      +     *         lastUpdatedTimestamp: Long (Optional)
      +     *         modifiedBy: String (Optional)
      +     *         normalizationRules (Optional): [
      +     *              (Optional){
      +     *                 description: String (Optional)
      +     *                 disabled: Boolean (Optional)
      +     *                 dynamicReplacement: Boolean (Optional)
      +     *                 entityTypes (Optional): [
      +     *                     String (Optional)
      +     *                 ]
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 name: String (Optional)
      +     *                 regex (Optional): {
      +     *                     maxDigits: Integer (Optional)
      +     *                     maxLetters: Integer (Optional)
      +     *                     minDashes: Integer (Optional)
      +     *                     minDigits: Integer (Optional)
      +     *                     minDigitsOrLetters: Integer (Optional)
      +     *                     minDots: Integer (Optional)
      +     *                     minHex: Integer (Optional)
      +     *                     minLetters: Integer (Optional)
      +     *                     minUnderscores: Integer (Optional)
      +     *                     options: Integer (Optional)
      +     *                     regexStr: String (Optional)
      +     *                 }
      +     *                 replaceWith: String (Optional)
      +     *                 version: Double (Optional)
      +     *             }
      +     *         ]
      +     *         regexReplacers (Optional): [
      +     *              (Optional){
      +     *                 condition: String (Optional)
      +     *                 createdBy: String (Optional)
      +     *                 description: String (Optional)
      +     *                 disabled: boolean (Required)
      +     *                 disableRecursiveReplacerApplication: Boolean (Optional)
      +     *                 doNotReplaceRegex (Optional): (recursive schema, see doNotReplaceRegex above)
      +     *                 lastUpdatedTimestamp: Long (Optional)
      +     *                 modifiedBy: String (Optional)
      +     *                 name: String (Required)
      +     *                 regex (Optional): (recursive schema, see regex above)
      +     *                 replaceWith: String (Optional)
      +     *             }
      +     *         ]
      +     *         rejectedPatterns (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         scopedRules (Optional): [
      +     *              (Optional){
      +     *                 bindingUrl: String (Required)
      +     *                 rules (Optional): [
      +     *                      (Optional){
      +     *                         displayName: String (Optional)
      +     *                         isResourceSet: Boolean (Optional)
      +     *                         lastUpdatedTimestamp: Long (Optional)
      +     *                         name: String (Optional)
      +     *                         qualifiedName: String (Required)
      +     *                     }
      +     *                 ]
      +     *                 storeType: String (Required)
      +     *             }
      +     *         ]
      +     *         version: Integer (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged list of account resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listResourceSetRulesNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listResourceSetRulesNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/package-info.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/package-info.java new file mode 100644 index 000000000000..c6cf9e4cc9bd --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for PurviewAccountClient. + * Creates a Microsoft.Purview data plane account client. + */ +package com.azure.analytics.purview.administration.implementation; diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/package-info.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/package-info.java new file mode 100644 index 000000000000..7fe11d327cea --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/com/azure/analytics/purview/administration/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for PurviewAccountClient. + * Creates a Microsoft.Purview data plane account client. + */ +package com.azure.analytics.purview.administration; diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/java/module-info.java b/sdk/purview/azure-analytics-purview-administration/src/main/java/module-info.java new file mode 100644 index 000000000000..a559c2d42587 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/java/module-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.analytics.purview.administration { + requires transitive com.azure.core; + + exports com.azure.analytics.purview.administration; +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/main/resources/azure-analytics-purview-administration.properties b/sdk/purview/azure-analytics-purview-administration/src/main/resources/azure-analytics-purview-administration.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/main/resources/azure-analytics-purview-administration.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/GetAccount.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/GetAccount.java new file mode 100644 index 000000000000..68153413706f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/GetAccount.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.administration; + +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GetAccount { + public static void main(String[] args) { + AccountsClient client = new AccountsClientBuilder() + .endpoint(System.getenv("ACCOUNT_ENDPOINT")) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); + BinaryData response = client.getAccountPropertiesWithResponse(null).getValue(); + System.out.println(response); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/ReadmeSamples.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/ReadmeSamples.java new file mode 100644 index 000000000000..af0be3434b65 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/ReadmeSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.administration; + +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.core.util.BinaryData; + +/** + * Samples to include in README.md + */ +public class ReadmeSamples { + /** + * Sample to demonstrate creating Purview Accounts client. + */ + public void createClient() { + // BEGIN: readme-sample-createAccountsClient + AccountsClient client = new AccountsClientBuilder() + .endpoint(System.getenv("ACCOUNT_ENDPOINT")) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); + // END: readme-sample-createAccountsClient + } + + /** + * Sample to demonstrate getting the properties of an account. + */ + public void getAccounts() { + // BEGIN: readme-sample-getAccountProperties + AccountsClient client = new AccountsClientBuilder() + .endpoint(System.getenv("ACCOUNT_ENDPOINT")) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); + BinaryData response = client.getAccountPropertiesWithResponse(null).getValue(); + // END: readme-sample-getAccountProperties + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsGetAccessKeys.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsGetAccessKeys.java new file mode 100644 index 000000000000..429b327c2ce8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsGetAccessKeys.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.AccountsClient; +import com.azure.analytics.purview.administration.AccountsClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class AccountsGetAccessKeys { + public static void main(String[] args) { + AccountsClient accountsClient + = new AccountsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.accounts-get-access-keys.accounts-get-access-keys + RequestOptions requestOptions = new RequestOptions(); + Response response = accountsClient.getAccessKeysWithResponse(requestOptions); + // END:com.azure.analytics.purview.administration.generated.accounts-get-access-keys.accounts-get-access-keys + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsGetAccountProperties.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsGetAccountProperties.java new file mode 100644 index 000000000000..4fd03aed43d1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsGetAccountProperties.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.AccountsClient; +import com.azure.analytics.purview.administration.AccountsClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class AccountsGetAccountProperties { + public static void main(String[] args) { + AccountsClient accountsClient + = new AccountsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.accounts-get-account-properties.accounts-get-account-properties + RequestOptions requestOptions = new RequestOptions(); + Response response = accountsClient.getAccountPropertiesWithResponse(requestOptions); + // END:com.azure.analytics.purview.administration.generated.accounts-get-account-properties.accounts-get-account-properties + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsRegenerateKeys.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsRegenerateKeys.java new file mode 100644 index 000000000000..ad440eab5803 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsRegenerateKeys.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.AccountsClient; +import com.azure.analytics.purview.administration.AccountsClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class AccountsRegenerateKeys { + public static void main(String[] args) { + AccountsClient accountsClient + = new AccountsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.accounts-regenerate-access-key.accounts-regenerate-keys + BinaryData keyOptions = BinaryData.fromString("{\"keyType\":\"PrimaryKey\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = accountsClient.regenerateAccessKeyWithResponse(keyOptions, requestOptions); + // END:com.azure.analytics.purview.administration.generated.accounts-regenerate-access-key.accounts-regenerate-keys + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsUpdateAccountProperties.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsUpdateAccountProperties.java new file mode 100644 index 000000000000..337522368cec --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/AccountsUpdateAccountProperties.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.AccountsClient; +import com.azure.analytics.purview.administration.AccountsClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class AccountsUpdateAccountProperties { + public static void main(String[] args) { + AccountsClient accountsClient + = new AccountsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.accounts-update-account-properties.accounts-update-account-properties + BinaryData accountUpdateParameters = BinaryData.fromString("{\"friendlyName\":\"friendly-account1\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = accountsClient.updateAccountPropertiesWithResponse(accountUpdateParameters, requestOptions); + // END:com.azure.analytics.purview.administration.generated.accounts-update-account-properties.accounts-update-account-properties + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsCreateOrUpdateCollection.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsCreateOrUpdateCollection.java new file mode 100644 index 000000000000..91c4e7628f2e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsCreateOrUpdateCollection.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.CollectionsClient; +import com.azure.analytics.purview.administration.CollectionsClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CollectionsCreateOrUpdateCollection { + public static void main(String[] args) { + CollectionsClient collectionsClient + = new CollectionsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.collections-create-or-update-collection.collections-create-or-update-collection + BinaryData collection + = BinaryData.fromString("{\"parentCollection\":{\"referenceName\":\"myParentCollection1\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = collectionsClient.createOrUpdateCollectionWithResponse("myCollection1", collection, requestOptions); + // END:com.azure.analytics.purview.administration.generated.collections-create-or-update-collection.collections-create-or-update-collection + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsDeleteCollection.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsDeleteCollection.java new file mode 100644 index 000000000000..ddd0427becd0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsDeleteCollection.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.CollectionsClient; +import com.azure.analytics.purview.administration.CollectionsClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CollectionsDeleteCollection { + public static void main(String[] args) { + CollectionsClient collectionsClient + = new CollectionsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.collections-delete-collection.collections-delete-collection + RequestOptions requestOptions = new RequestOptions(); + Response response = collectionsClient.deleteCollectionWithResponse("myCollection1", requestOptions); + // END:com.azure.analytics.purview.administration.generated.collections-delete-collection.collections-delete-collection + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollection.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollection.java new file mode 100644 index 000000000000..05c06956c059 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollection.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.CollectionsClient; +import com.azure.analytics.purview.administration.CollectionsClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CollectionsGetCollection { + public static void main(String[] args) { + CollectionsClient collectionsClient + = new CollectionsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.collections-get-collection.collections-get-collection + RequestOptions requestOptions = new RequestOptions(); + Response response = collectionsClient.getCollectionWithResponse("myCollection1", requestOptions); + // END:com.azure.analytics.purview.administration.generated.collections-get-collection.collections-get-collection + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionPath.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionPath.java new file mode 100644 index 000000000000..659a02a5261f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionPath.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.CollectionsClient; +import com.azure.analytics.purview.administration.CollectionsClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CollectionsGetCollectionPath { + public static void main(String[] args) { + CollectionsClient collectionsClient + = new CollectionsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.collections-get-collection-path.collections-get-collection-path + RequestOptions requestOptions = new RequestOptions(); + Response response + = collectionsClient.getCollectionPathWithResponse("myCollection1", requestOptions); + // END:com.azure.analytics.purview.administration.generated.collections-get-collection-path.collections-get-collection-path + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsListChildCollectionNames.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsListChildCollectionNames.java new file mode 100644 index 000000000000..5b528add64a0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsListChildCollectionNames.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.CollectionsClient; +import com.azure.analytics.purview.administration.CollectionsClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CollectionsListChildCollectionNames { + public static void main(String[] args) { + CollectionsClient collectionsClient + = new CollectionsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.collections-list-child-collection-names.collections-list-child-collection-names + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = collectionsClient.listChildCollectionNames("myCollection1", requestOptions); + // END:com.azure.analytics.purview.administration.generated.collections-list-child-collection-names.collections-list-child-collection-names + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsListCollections.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsListCollections.java new file mode 100644 index 000000000000..be3e83090c66 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/CollectionsListCollections.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.CollectionsClient; +import com.azure.analytics.purview.administration.CollectionsClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class CollectionsListCollections { + public static void main(String[] args) { + CollectionsClient collectionsClient + = new CollectionsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.collections-list-collections.collections-list-collections + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = collectionsClient.listCollections(requestOptions); + // END:com.azure.analytics.purview.administration.generated.collections-list-collections.collections-list-collections + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyGet.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyGet.java new file mode 100644 index 000000000000..69cc0e0797f6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyGet.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.MetadataPolicyClient; +import com.azure.analytics.purview.administration.MetadataPolicyClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class MetadataPolicyGet { + public static void main(String[] args) { + MetadataPolicyClient metadataPolicyClient + = new MetadataPolicyClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.metadata-policy-get.metadata-policy-get + RequestOptions requestOptions = new RequestOptions(); + Response response + = metadataPolicyClient.getWithResponse("98ed42ff-b67f-44df-8c8c-7e6b43e77055", requestOptions); + // END:com.azure.analytics.purview.administration.generated.metadata-policy-get.metadata-policy-get + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyListAll.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyListAll.java new file mode 100644 index 000000000000..2efe1c3eaa0a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyListAll.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.MetadataPolicyClient; +import com.azure.analytics.purview.administration.MetadataPolicyClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class MetadataPolicyListAll { + public static void main(String[] args) { + MetadataPolicyClient metadataPolicyClient + = new MetadataPolicyClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.metadata-policy-list-all.metadata-policy-list-all + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = metadataPolicyClient.listAll(requestOptions); + // END:com.azure.analytics.purview.administration.generated.metadata-policy-list-all.metadata-policy-list-all + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyUpdate.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyUpdate.java new file mode 100644 index 000000000000..eadf6575c66a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataPolicyUpdate.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.MetadataPolicyClient; +import com.azure.analytics.purview.administration.MetadataPolicyClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class MetadataPolicyUpdate { + public static void main(String[] args) { + MetadataPolicyClient metadataPolicyClient + = new MetadataPolicyClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.metadata-policy-update.metadata-policy-update + RequestOptions requestOptions = new RequestOptions().setBody(BinaryData.fromString( + "{\"name\":\"policy_mycollection\",\"id\":\"98ed42ff-b67f-44df-8c8c-7e6b43e77055\",\"properties\":{\"description\":\"\",\"attributeRules\":[{\"name\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"principal.microsoft.id\",\"attributeValueIncludedIn\":[\"69e520f2-5f26-4074-9fe1-5187d85ec005\",\"3f10f245-d5c4-4541-98ce-01a4580a30e0\"]},{\"attributeName\":\"derived.purview.role\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:myparentcollection\"}]],\"id\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\"},{\"name\":\"permission:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:myparentcollection\"}]],\"id\":\"permission:mycollection\"}],\"collection\":{\"referenceName\":\"mycollection\"},\"decisionRules\":[{\"dnfCondition\":[[{\"attributeName\":\"resource.purview.collection\",\"attributeValueIncludes\":\"mycollection\"},{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:mycollection\"}]],\"effect\":\"Permit\"}],\"parentCollectionName\":\"myparentcollection\"},\"version\":1}")); + Response response + = metadataPolicyClient.updateWithResponse("98ed42ff-b67f-44df-8c8c-7e6b43e77055", requestOptions); + // END:com.azure.analytics.purview.administration.generated.metadata-policy-update.metadata-policy-update + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataRolesList.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataRolesList.java new file mode 100644 index 000000000000..25d80fd102c6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/MetadataRolesList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.MetadataRolesClient; +import com.azure.analytics.purview.administration.MetadataRolesClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class MetadataRolesList { + public static void main(String[] args) { + MetadataRolesClient metadataRolesClient + = new MetadataRolesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.metadata-roles-list.metadata-roles-list + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = metadataRolesClient.list(requestOptions); + // END:com.azure.analytics.purview.administration.generated.metadata-roles-list.metadata-roles-list + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesCreateOrUpdateResourceSetRule.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesCreateOrUpdateResourceSetRule.java new file mode 100644 index 000000000000..1cd575cfdd12 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesCreateOrUpdateResourceSetRule.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.ResourceSetRulesClient; +import com.azure.analytics.purview.administration.ResourceSetRulesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ResourceSetRulesCreateOrUpdateResourceSetRule { + public static void main(String[] args) { + ResourceSetRulesClient resourceSetRulesClient + = new ResourceSetRulesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.resource-set-rules-create-or-update-resource-set-rule.resource-set-rules-create-or-update-resource-set-rule + BinaryData resourceSetRuleConfig = BinaryData.fromString( + "{\"advancedResourceSet\":{\"resourceSetProcessing\":\"Default\"},\"pathPatternConfig\":{\"acceptedPatterns\":[],\"complexReplacers\":[{\"name\":\"SparkPath\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"typeName\":\"Microsoft.DataMap.PathPattern.SparkPathReplacer\"}],\"createdBy\":\"AzureDataCatalog\",\"enableDefaultPatterns\":true,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regexReplacers\":[{\"name\":\"Guid\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minHex\":32,\"options\":9,\"regexStr\":\"([0-9A-F]{32}|[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})\"},\"replaceWith\":\"{GUID}\"},{\"name\":\"Number\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"^\\\\d+$\"},\"replaceWith\":\"{N}\"},{\"name\":\"yyyy-mm-ddThh-MM-ss\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":12,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])([-\\\\._@]?)([0-5][0-9])([-\\\\._@]?)([0-5][0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8{N}$10{N}$12\"},{\"name\":\"yyyy-mm-ddThh\",\"description\":null,\"condition\":\"ApplyToNonFileName\",\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"yyyy-mm-ddZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":6,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6\"},{\"name\":\"yyyy-mm-dd-hhZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([-\\\\._@]?)(2[0-3]|[01]?[0-9])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"NumberBetweenDelimiter\",\"description\":null,\"condition\":\"ApplyToFileNameOrNonVersionString\",\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(?<=[-\\\\._@])([\\\\d]+)(?=[-\\\\._@])|^(\\\\d+)(?=[-\\\\._@])|(?<=[-\\\\._@])(\\\\d+)$\"},\"replaceWith\":\"{N}\"},{\"name\":\"4ByteHex\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigitsOrLetters\":8,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)([0-9A-F]{8,16})(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{HEX}\"},{\"name\":\"NumberInFile\",\"description\":null,\"condition\":\"ApplyToFileName\",\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(\\\\d+)\"},\"replaceWith\":\"{N}\"},{\"name\":\"Localization(DashSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDashes\":1,\"minLetters\":4,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar-eg|ar-sa|cy-gb|da-dk|de-at|de-ch|de-de|en-au|en-ca|en-gb|en-ie|en-in|en-my|en-nz|en-ph|en-sg|en-us|en-ww|en-xa|en-za|es-ar|es-cl|es-es|es-mx|es-us|es-xl|fi-fi|fr-be|fr-ca|fr-ch|fr-fr|gu-in|hi-in|id-id|it-it|ja-jp|nb-no|nl-nl|nl-be|pt-br|pt-pt|pl-pl|ru-ru|sv-se|ta-in|te-in|zh-cn|zh-hk|zh-tw|ko-kr|tr-tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"},{\"name\":\"Localization(UnderscoreSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minLetters\":4,\"minUnderscores\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar_eg|ar_sa|cy_gb|da_dk|de_at|de_ch|de_de|en_au|en_ca|en_gb|en_ie|en_in|en_my|en_nz|en_ph|en_sg|en_us|en_ww|en_xa|en_za|es_ar|es_cl|es_es|es_mx|es_us|es_xl|fi_fi|fr_be|fr_ca|fr_ch|fr_fr|gu_in|hi_in|id_id|it_it|ja_jp|nb_no|nl_nl|nl_be|pt_br|pt_pt|pl_pl|ru_ru|sv_se|ta_in|te_in|zh_cn|zh_hk|zh_tw|ko_kr|tr_tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"}],\"rejectedPatterns\":[{\"name\":\"OfficeDocuments\",\"path\":\"^.*\\\\.(?i)(DOC|DOCM|DOCX|DOT|ODP|ODS|ODT|PDF|POT|PPS|PPSX|PPT|PPTM|PPTX|XLC|XLS|XLSB|XLSM|XLSX|XLT)(?-i)$\",\"createdBy\":\"AzureDataCatalog\",\"filterType\":\"Regex\",\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\"}]}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = resourceSetRulesClient.createOrUpdateResourceSetRuleWithResponse(resourceSetRuleConfig, requestOptions); + // END:com.azure.analytics.purview.administration.generated.resource-set-rules-create-or-update-resource-set-rule.resource-set-rules-create-or-update-resource-set-rule + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesDeleteResourceSetRule.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesDeleteResourceSetRule.java new file mode 100644 index 000000000000..88a0af3b7507 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesDeleteResourceSetRule.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.ResourceSetRulesClient; +import com.azure.analytics.purview.administration.ResourceSetRulesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ResourceSetRulesDeleteResourceSetRule { + public static void main(String[] args) { + ResourceSetRulesClient resourceSetRulesClient + = new ResourceSetRulesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.resource-set-rules-delete-resource-set-rule.resource-set-rules-delete-resource-set-rule + RequestOptions requestOptions = new RequestOptions(); + Response response = resourceSetRulesClient.deleteResourceSetRuleWithResponse(requestOptions); + // END:com.azure.analytics.purview.administration.generated.resource-set-rules-delete-resource-set-rule.resource-set-rules-delete-resource-set-rule + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesGetResourceSetRule.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesGetResourceSetRule.java new file mode 100644 index 000000000000..3e1ad4acb783 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesGetResourceSetRule.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.ResourceSetRulesClient; +import com.azure.analytics.purview.administration.ResourceSetRulesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ResourceSetRulesGetResourceSetRule { + public static void main(String[] args) { + ResourceSetRulesClient resourceSetRulesClient + = new ResourceSetRulesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.resource-set-rules-get-resource-set-rule.resource-set-rules-get-resource-set-rule + RequestOptions requestOptions = new RequestOptions(); + Response response = resourceSetRulesClient.getResourceSetRuleWithResponse(requestOptions); + // END:com.azure.analytics.purview.administration.generated.resource-set-rules-get-resource-set-rule.resource-set-rules-get-resource-set-rule + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesListResourceSetRules.java b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesListResourceSetRules.java new file mode 100644 index 000000000000..e80eb4479d16 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/samples/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesListResourceSetRules.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.analytics.purview.administration.ResourceSetRulesClient; +import com.azure.analytics.purview.administration.ResourceSetRulesClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ResourceSetRulesListResourceSetRules { + public static void main(String[] args) { + ResourceSetRulesClient resourceSetRulesClient + = new ResourceSetRulesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{endpoint}") + .buildClient(); + // BEGIN:com.azure.analytics.purview.administration.generated.resource-set-rules-list-resource-set-rules.resource-set-rules-list-resource-set-rules + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = resourceSetRulesClient.listResourceSetRules(requestOptions); + // END:com.azure.analytics.purview.administration.generated.resource-set-rules-list-resource-set-rules.resource-set-rules-list-resource-set-rules + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/AccountsClientTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/AccountsClientTests.java new file mode 100644 index 000000000000..13fc033c1210 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/AccountsClientTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.administration; + +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Test; + +public class AccountsClientTests extends PurviewAccountClientTestBase { + private AccountsClient client; + + @Override + protected void beforeTest() { + client = purviewAccountClientBuilderSetUp().buildClient(); + } + + @Test + public void testGetAccount() { + BinaryData response = client.getAccountPropertiesWithResponse(null).getValue(); + System.out.println(response); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/CollectionsClientTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/CollectionsClientTests.java new file mode 100644 index 000000000000..33aca5310056 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/CollectionsClientTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.administration; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Test; + +import java.util.List; +import java.util.stream.Collectors; + +public class CollectionsClientTests extends PurviewAccountClientTestBase { + private CollectionsClient client; + + @Override + protected void beforeTest() { + client = purviewCollectionClientBuilderSetUp().buildClient(); + } + + @Test + public void testCollections() { + PagedIterable response = client.listCollections(null); + List list = response.stream().collect(Collectors.toList()); + System.out.println(list); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/MetadataPolicyClientTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/MetadataPolicyClientTests.java new file mode 100644 index 000000000000..91e947628645 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/MetadataPolicyClientTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.administration; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.json.models.JsonObject; +import com.azure.json.models.JsonString; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.util.List; +import java.util.stream.Collectors; + +public class MetadataPolicyClientTests extends PurviewAccountClientTestBase { + private MetadataPolicyClient client; + + @Override + protected void beforeTest() { + client = purviewMetadataClientBuilderSetUp().buildClient(); + } + + @Test + public void testListPolicy() { + List response = client.listAll(null).stream().collect(Collectors.toList()); + System.out.println(response); + Assertions.assertFalse(response.isEmpty()); + } + + @Test + public void testUpdatePolicy() { + List listResponse = client.listAll(null).stream().collect(Collectors.toList()); + BinaryData item = listResponse.iterator().next(); + + JsonObject policy = item.toObject(JsonObject.class); + String policyId = ((JsonString) policy.getProperty("id")).getValue(); + + RequestOptions requestOptions + = new RequestOptions().addHeader(HttpHeaderName.CONTENT_TYPE, "application/json").setBody(item); + + BinaryData response = client.updateWithResponse(policyId, requestOptions).getValue(); + System.out.println(response); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/PurviewAccountClientTestBase.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/PurviewAccountClientTestBase.java new file mode 100644 index 000000000000..d14f1091abfb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/PurviewAccountClientTestBase.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.administration; + +import com.azure.core.http.HttpClient; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.models.TestProxySanitizer; +import com.azure.core.test.models.TestProxySanitizerType; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +public class PurviewAccountClientTestBase extends TestProxyTestBase { + private static final String ZERO_UUID = "00000000-0000-0000-0000-000000000000"; + private static final String[] REMOVE_SANITIZER_ID = { "AZSDK3430", "AZSDK3493" }; + + protected String getEndpoint() { + String endpoint = interceptorManager.isPlaybackMode() + ? "https://localhost:8080" + : Configuration.getGlobalConfiguration().get("ENDPOINT"); + Objects.requireNonNull(endpoint); + return endpoint; + } + + AccountsClientBuilder purviewAccountClientBuilderSetUp() { + AccountsClientBuilder builder = new AccountsClientBuilder(); + if (interceptorManager.isPlaybackMode()) { + builder.httpClient(interceptorManager.getPlaybackClient()).credential(new MockTokenCredential()); + } else { + builder.httpClient(HttpClient.createDefault()).credential(new DefaultAzureCredentialBuilder().build()); + } + + if (interceptorManager.isRecordMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + + List customSanitizer = new ArrayList<>(); + if (!interceptorManager.isLiveMode()) { + // sanitize response body keys + customSanitizer.add(new TestProxySanitizer("$..clientId", null, "00000000-0000-0000-0000-000000000000", + TestProxySanitizerType.BODY_KEY)); + customSanitizer.add(new TestProxySanitizer("$..principalId", null, "00000000-0000-0000-0000-000000000000", + TestProxySanitizerType.BODY_KEY)); + customSanitizer.add(new TestProxySanitizer("$..tenantId", null, "00000000-0000-0000-0000-000000000000", + TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..createdBy", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..friendlyName", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add(new TestProxySanitizer("$..managedResourceGroupName", null, "REDACTED", + TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..lastModifiedBy", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..catalog", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add(new TestProxySanitizer("$..scan", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..guardian", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..resourceGroup", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..storageAccount", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add(new TestProxySanitizer("$..id", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add(new TestProxySanitizer("name", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + // sanitize subscription id + customSanitizer.add( + new TestProxySanitizer("(?<=/subscriptions/)([^/?]+)", ZERO_UUID, TestProxySanitizerType.BODY_REGEX)); + + interceptorManager.addSanitizers(customSanitizer); + // Remove `id` sanitizer from the list of common sanitizers. + interceptorManager.removeSanitizers(REMOVE_SANITIZER_ID); + } + + builder.endpoint(getEndpoint()); + return Objects.requireNonNull(builder); + } + + CollectionsClientBuilder purviewCollectionClientBuilderSetUp() { + CollectionsClientBuilder builder = new CollectionsClientBuilder(); + + if (interceptorManager.isPlaybackMode()) { + builder.httpClient(interceptorManager.getPlaybackClient()).credential(new MockTokenCredential()); + } else { + builder.httpClient(HttpClient.createDefault()).credential(new DefaultAzureCredentialBuilder().build()); + } + + if (interceptorManager.isRecordMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + + builder.endpoint(getEndpoint()); + + List customSanitizer = new ArrayList<>(); + if (!interceptorManager.isLiveMode()) { + // sanitize response body keys + customSanitizer + .add(new TestProxySanitizer("$..createdBy", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..friendlyName", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..lastModifiedBy", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add(new TestProxySanitizer("$..name", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + interceptorManager.addSanitizers(customSanitizer); + // Remove `id` sanitizer from the list of common sanitizers. + interceptorManager.removeSanitizers(REMOVE_SANITIZER_ID); + } + + return Objects.requireNonNull(builder); + } + + MetadataPolicyClientBuilder purviewMetadataClientBuilderSetUp() { + MetadataPolicyClientBuilder builder = new MetadataPolicyClientBuilder(); + if (interceptorManager.isPlaybackMode()) { + builder.httpClient(interceptorManager.getPlaybackClient()).credential(new MockTokenCredential()); + } else { + builder.httpClient(HttpClient.createDefault()).credential(new DefaultAzureCredentialBuilder().build()); + } + + if (interceptorManager.isRecordMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + + builder.endpoint(getEndpoint()); + + List customSanitizer = new ArrayList<>(); + if (!interceptorManager.isLiveMode()) { + // sanitize response body keys + customSanitizer.add(new TestProxySanitizer("$..attributeValueIncludedIn", null, + "00000000-0000-0000-0000-000000000000", TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..referenceName", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add( + new TestProxySanitizer("$..parentCollectionName", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add( + new TestProxySanitizer("$..attributeValueIncludes", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer + .add(new TestProxySanitizer("$..fromRule", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add( + new TestProxySanitizer("$..attributeValueIncludes", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add(new TestProxySanitizer("$..name", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + customSanitizer.add( + new TestProxySanitizer("$...attributeRules..id", null, "REDACTED", TestProxySanitizerType.BODY_KEY)); + interceptorManager.addSanitizers(customSanitizer); + // Remove `id` sanitizer from the list of common sanitizers. + interceptorManager.removeSanitizers(REMOVE_SANITIZER_ID); + } + + return Objects.requireNonNull(builder); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsGetAccessKeysTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsGetAccessKeysTests.java new file mode 100644 index 000000000000..4258fe6ae68e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsGetAccessKeysTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class AccountsGetAccessKeysTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testAccountsGetAccessKeysTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = accountsClient.getAccessKeysWithResponse(requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("14999", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-ratelimit-remaining-tenant-reads")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"atlasKafkaPrimaryEndpoint\":\"Endpoint=sb://fake_objectId.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=ASDASasdfmasdf123412341234=\",\"atlasKafkaSecondaryEndpoint\":\"Endpoint=sb://fake_objectId.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAccessKey=BSDASasdfmasdf123412341234=\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsGetAccountPropertiesTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsGetAccountPropertiesTests.java new file mode 100644 index 000000000000..f3e68a5a12ce --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsGetAccountPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class AccountsGetAccountPropertiesTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testAccountsGetAccountPropertiesTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = accountsClient.getAccountPropertiesWithResponse(requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("14999", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-ratelimit-remaining-tenant-reads")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"account1\",\"type\":\"Microsoft.ProjectBabylon/accounts\",\"id\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/SampleResourceGroup/providers/Microsoft.ProjectBabylon/accounts/account1\",\"location\":\"West US 2\",\"properties\":{\"createdAt\":\"2019-11-22T18:39:58.6929344Z\",\"createdBy\":\"client-name\",\"createdByObjectId\":\"client-objectId\",\"endpoints\":{\"catalog\":\"https://account1.catalog.babylon.azure-test.com\",\"guardian\":\"https://account1.guardian.babylon.azure-test.com\",\"scan\":\"https://account1.scan.babylon.azure-test.com\"},\"friendlyName\":\"friendly-account1\",\"managedResources\":{\"eventHubNamespace\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.EventHub/namespaces/atlas-westusdddnbtp\",\"resourceGroup\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl\",\"storageAccount\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.Storage/storageAccounts/scanwestustzaagzr\"},\"privateEndpointConnections\":[{\"name\":\"peName-8536c337-7b36-4d67-a7ce-081655baf59e\",\"type\":\"Microsoft.ProjectBabylon/accounts/privateEndpointConnections\",\"id\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/SampleResourceGroup/providers/Microsoft.ProjectBabylon/accounts/account1/privateEndpointConnections/peName-8536c337-7b36-4d67-a7ce-081655baf59e\",\"properties\":{\"privateEndpoint\":{\"id\":\"/subscriptions/baca8a88-4527-4c35-a13e-b2775ce0d7fc/resourceGroups/nrpResourceGroupName/providers/Microsoft.Network/privateEndpoints/peName\"},\"privateLinkServiceConnectionState\":{\"description\":\"Please approve my connection, thanks.\",\"actionsRequired\":\"None\",\"status\":\"Pending\"},\"provisioningState\":\"Succeeded\"}}],\"provisioningState\":\"Succeeded\"},\"sku\":{\"name\":\"Standard\",\"capacity\":4},\"systemData\":{\"createdAt\":\"2019-11-22T18:39:58.6929344Z\",\"createdBy\":\"client-name\",\"createdByType\":\"User\",\"lastModifiedAt\":\"2021-03-16T23:24:34.3430059Z\",\"lastModifiedBy\":\"client-name\",\"lastModifiedByType\":\"User\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsRegenerateKeysTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsRegenerateKeysTests.java new file mode 100644 index 000000000000..ec41580c59e6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsRegenerateKeysTests.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.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class AccountsRegenerateKeysTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testAccountsRegenerateKeysTests() { + BinaryData keyOptions = BinaryData.fromString("{\"keyType\":\"PrimaryKey\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = accountsClient.regenerateAccessKeyWithResponse(keyOptions, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("14999", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-ratelimit-remaining-tenant-reads")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"atlasKafkaPrimaryEndpoint\":\"Endpoint=sb://fake_objectId.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=ASDASasdfmasdf123412341234=\",\"atlasKafkaSecondaryEndpoint\":\"Endpoint=sb://fake_objectId.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAccessKey=BSDASasdfmasdf123412341234=\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsUpdateAccountPropertiesTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsUpdateAccountPropertiesTests.java new file mode 100644 index 000000000000..2fbe10dd1b24 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/AccountsUpdateAccountPropertiesTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class AccountsUpdateAccountPropertiesTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testAccountsUpdateAccountPropertiesTests() { + BinaryData accountUpdateParameters = BinaryData.fromString("{\"friendlyName\":\"friendly-account1\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = accountsClient.updateAccountPropertiesWithResponse(accountUpdateParameters, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("14999", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-ratelimit-remaining-tenant-reads")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"account1\",\"type\":\"Microsoft.ProjectBabylon/accounts\",\"id\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/SampleResourceGroup/providers/Microsoft.ProjectBabylon/accounts/account1\",\"location\":\"West US 2\",\"properties\":{\"createdAt\":\"2019-11-22T18:39:58.6929344Z\",\"createdBy\":\"client-name\",\"createdByObjectId\":\"client-objectId\",\"endpoints\":{\"catalog\":\"https://account2.catalog.babylon.azure-test.com\",\"guardian\":\"https://account1.guardian.babylon.azure-test.com\",\"scan\":\"https://account2.scan.babylon.azure-test.com\"},\"friendlyName\":\"friendly-account1\",\"managedResources\":{\"eventHubNamespace\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.EventHub/namespaces/atlas-westusdddnbtp\",\"resourceGroup\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl\",\"storageAccount\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/managed-rg-mwjotkl/providers/Microsoft.Storage/storageAccounts/scanwestustzaagzr\"},\"provisioningState\":\"Succeeded\"},\"sku\":{\"name\":\"Standard\",\"capacity\":4},\"systemData\":{\"createdAt\":\"2019-11-22T18:39:58.6929344Z\",\"createdBy\":\"client-name\",\"createdByType\":\"User\",\"lastModifiedAt\":\"2021-03-16T23:24:34.3430059Z\",\"lastModifiedBy\":\"client-name\",\"lastModifiedByType\":\"User\"},\"tags\":{\"tag\":\"tag value.\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsCreateOrUpdateCollectionTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsCreateOrUpdateCollectionTests.java new file mode 100644 index 000000000000..bc9f99e916a7 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsCreateOrUpdateCollectionTests.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.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class CollectionsCreateOrUpdateCollectionTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testCollectionsCreateOrUpdateCollectionTests() { + BinaryData collection + = BinaryData.fromString("{\"parentCollection\":{\"referenceName\":\"myParentCollection1\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = collectionsClient.createOrUpdateCollectionWithResponse("myCollection1", collection, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"mycollection1\",\"collectionProvisioningState\":\"Succeeded\",\"friendlyName\":\"Finance\",\"parentCollection\":{\"type\":\"CollectionReference\",\"referenceName\":\"myParentCollection1\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsDeleteCollectionTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsDeleteCollectionTests.java new file mode 100644 index 000000000000..c73f75d6888f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsDeleteCollectionTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class CollectionsDeleteCollectionTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testCollectionsDeleteCollectionTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = collectionsClient.deleteCollectionWithResponse("myCollection1", requestOptions); + Assertions.assertEquals(204, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionPathTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionPathTests.java new file mode 100644 index 000000000000..8e9ef94d938b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionPathTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class CollectionsGetCollectionPathTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testCollectionsGetCollectionPathTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = collectionsClient.getCollectionPathWithResponse("myCollection1", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"parentFriendlyNameChain\":[\"Test account friendly name\",\"parent1\"],\"parentNameChain\":[\"account1\",\"parent1\"]}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionTests.java new file mode 100644 index 000000000000..ccaadc54bf0f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsGetCollectionTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class CollectionsGetCollectionTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testCollectionsGetCollectionTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = collectionsClient.getCollectionWithResponse("myCollection1", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"mycollection1\",\"collectionProvisioningState\":\"Succeeded\",\"friendlyName\":\"Finance\",\"parentCollection\":{\"type\":\"CollectionReference\",\"referenceName\":\"accountName\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsListChildCollectionNamesTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsListChildCollectionNamesTests.java new file mode 100644 index 000000000000..8ae65758b25d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsListChildCollectionNamesTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class CollectionsListChildCollectionNamesTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testCollectionsListChildCollectionNamesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = collectionsClient.listChildCollectionNames("myCollection1", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.iterableByPage().iterator().next().getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("X-Content-Type-Options")) + .getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-request-id")) + .getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-correlation-request-id")) + .getValue()); + Assertions.assertEquals( + BinaryData.fromString("{\"name\":\"mycollection1\",\"friendlyName\":\"The first collection\"}") + .toObject(Object.class), + response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsListCollectionsTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsListCollectionsTests.java new file mode 100644 index 000000000000..ade744b3f854 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/CollectionsListCollectionsTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class CollectionsListCollectionsTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testCollectionsListCollectionsTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = collectionsClient.listCollections(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.iterableByPage().iterator().next().getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("X-Content-Type-Options")) + .getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-request-id")) + .getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-correlation-request-id")) + .getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"mycollection1\",\"collectionProvisioningState\":\"Succeeded\",\"friendlyName\":\"Finance\",\"parentCollection\":{\"type\":\"CollectionReference\",\"referenceName\":\"accountName\"}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyGetTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyGetTests.java new file mode 100644 index 000000000000..6bcbe64e8eba --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyGetTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class MetadataPolicyGetTests extends PurviewMetadataClientTestBase { + @Test + @Disabled + public void testMetadataPolicyGetTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = metadataPolicyClient.getWithResponse("98ed42ff-b67f-44df-8c8c-7e6b43e77055", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea889", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"policy_mycollection\",\"id\":\"98ed42ff-b67f-44df-8c8c-7e6b43e77055\",\"properties\":{\"description\":\"\",\"attributeRules\":[{\"name\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"principal.microsoft.id\",\"attributeValueIncludedIn\":[\"69e520f2-5f26-4074-9fe1-5187d85ec005\"]},{\"attributeName\":\"derived.purview.role\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:myparentcollection\"}]],\"id\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\",\"kind\":\"attributerule\"},{\"name\":\"permission:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:myparentcollection\"}]],\"id\":\"permission:mycollection\",\"kind\":\"attributerule\"}],\"collection\":{\"type\":\"CollectionReference\",\"referenceName\":\"mycollection\"},\"decisionRules\":[{\"dnfCondition\":[[{\"attributeName\":\"resource.purview.collection\",\"attributeValueIncludes\":\"mycollection\"},{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:mycollection\"}]],\"effect\":\"Permit\",\"kind\":\"decisionrule\"}],\"parentCollectionName\":\"myparentcollection\"},\"version\":1}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyListAllTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyListAllTests.java new file mode 100644 index 000000000000..f0a87d57afa2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyListAllTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class MetadataPolicyListAllTests extends PurviewMetadataClientTestBase { + @Test + @Disabled + public void testMetadataPolicyListAllTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = metadataPolicyClient.listAll(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("8e58266a-de42-40d5-b3c4-c6a7e159cfba", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-request-id")) + .getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"policy_mycollection\",\"id\":\"98ed42ff-b67f-44df-8c8c-7e6b43e77055\",\"properties\":{\"description\":\"\",\"attributeRules\":[{\"name\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"principal.microsoft.id\",\"attributeValueIncludedIn\":[\"69e520f2-5f26-4074-9fe1-5187d85ec005\"]},{\"attributeName\":\"derived.purview.role\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:myparentcollection\"}]],\"id\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\",\"kind\":\"attributerule\"},{\"name\":\"permission:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:myparentcollection\"}]],\"id\":\"permission:mycollection\",\"kind\":\"attributerule\"}],\"collection\":{\"type\":\"CollectionReference\",\"referenceName\":\"mycollection\"},\"decisionRules\":[{\"dnfCondition\":[[{\"attributeName\":\"resource.purview.collection\",\"attributeValueIncludes\":\"mycollection\"},{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:mycollection\"}]],\"effect\":\"Permit\",\"kind\":\"decisionrule\"}],\"parentCollectionName\":\"myparentcollection\"},\"version\":1}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyUpdateTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyUpdateTests.java new file mode 100644 index 000000000000..d92fa2fea77f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataPolicyUpdateTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class MetadataPolicyUpdateTests extends PurviewMetadataClientTestBase { + @Test + @Disabled + public void testMetadataPolicyUpdateTests() { + RequestOptions requestOptions = new RequestOptions().setBody(BinaryData.fromString( + "{\"name\":\"policy_mycollection\",\"id\":\"98ed42ff-b67f-44df-8c8c-7e6b43e77055\",\"properties\":{\"description\":\"\",\"attributeRules\":[{\"name\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"principal.microsoft.id\",\"attributeValueIncludedIn\":[\"69e520f2-5f26-4074-9fe1-5187d85ec005\",\"3f10f245-d5c4-4541-98ce-01a4580a30e0\"]},{\"attributeName\":\"derived.purview.role\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:myparentcollection\"}]],\"id\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\"},{\"name\":\"permission:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:myparentcollection\"}]],\"id\":\"permission:mycollection\"}],\"collection\":{\"referenceName\":\"mycollection\"},\"decisionRules\":[{\"dnfCondition\":[[{\"attributeName\":\"resource.purview.collection\",\"attributeValueIncludes\":\"mycollection\"},{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:mycollection\"}]],\"effect\":\"Permit\"}],\"parentCollectionName\":\"myparentcollection\"},\"version\":1}")); + Response response + = metadataPolicyClient.updateWithResponse("98ed42ff-b67f-44df-8c8c-7e6b43e77055", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"policy_mycollection\",\"id\":\"98ed42ff-b67f-44df-8c8c-7e6b43e77055\",\"properties\":{\"description\":\"\",\"attributeRules\":[{\"name\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"principal.microsoft.id\",\"attributeValueIncludedIn\":[\"69e520f2-5f26-4074-9fe1-5187d85ec005\",\"3f10f245-d5c4-4541-98ce-01a4580a30e0\"]},{\"attributeName\":\"derived.purview.role\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:myparentcollection\"}]],\"id\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\",\"kind\":\"attributerule\"},{\"name\":\"permission:mycollection\",\"dnfCondition\":[[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"purviewmetadatarole_builtin_collection-administrator:mycollection\"}],[{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:myparentcollection\"}]],\"id\":\"permission:mycollection\",\"kind\":\"attributerule\"}],\"collection\":{\"type\":\"CollectionReference\",\"referenceName\":\"mycollection\"},\"decisionRules\":[{\"dnfCondition\":[[{\"attributeName\":\"resource.purview.collection\",\"attributeValueIncludes\":\"mycollection\"},{\"attributeName\":\"derived.purview.permission\",\"attributeValueIncludes\":\"permission:mycollection\"}]],\"effect\":\"Permit\",\"kind\":\"decisionrule\"}],\"parentCollectionName\":\"myparentcollection\"},\"version\":2}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataRolesListTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataRolesListTests.java new file mode 100644 index 000000000000..930d428909c2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/MetadataRolesListTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class MetadataRolesListTests extends PurviewMetadataClientTestBase { + @Test + @Disabled + public void testMetadataRolesListTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = metadataRolesClient.list(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("8e58266a-de42-40d5-b3c4-c6a7e159cfba", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-request-id")) + .getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"data-source-administrator\",\"type\":\"Microsoft.Purview/role\",\"id\":\"purviewmetadatarole_builtin_data-source-administrator\",\"properties\":{\"cnfCondition\":[[{\"attributeName\":\"request.azure.dataAction\",\"attributeValueIncludedIn\":[\"Microsoft.Purview/accounts/scan/read\",\"Microsoft.Purview/accounts/scan/write\",\"Microsoft.Purview/accounts/collection/read\"]}]],\"friendlyName\":\"Data Source Administrator\",\"provisioningState\":\"Provisioned\",\"roleType\":\"BuiltIn\",\"version\":1}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/PurviewAccountClientTestBase.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/PurviewAccountClientTestBase.java new file mode 100644 index 000000000000..93461d508e19 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/PurviewAccountClientTestBase.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.analytics.purview.administration.AccountsClient; +import com.azure.analytics.purview.administration.AccountsClientBuilder; +import com.azure.analytics.purview.administration.CollectionsClient; +import com.azure.analytics.purview.administration.CollectionsClientBuilder; +import com.azure.analytics.purview.administration.ResourceSetRulesClient; +import com.azure.analytics.purview.administration.ResourceSetRulesClientBuilder; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +class PurviewAccountClientTestBase extends TestProxyTestBase { + protected AccountsClient accountsClient; + + protected CollectionsClient collectionsClient; + + protected ResourceSetRulesClient resourceSetRulesClient; + + @Override + protected void beforeTest() { + AccountsClientBuilder accountsClientbuilder + = new AccountsClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + accountsClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + accountsClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + accountsClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + accountsClient = accountsClientbuilder.buildClient(); + + CollectionsClientBuilder collectionsClientbuilder = new CollectionsClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + collectionsClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + collectionsClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + collectionsClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + collectionsClient = collectionsClientbuilder.buildClient(); + + ResourceSetRulesClientBuilder resourceSetRulesClientbuilder = new ResourceSetRulesClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + resourceSetRulesClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + resourceSetRulesClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + resourceSetRulesClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + resourceSetRulesClient = resourceSetRulesClientbuilder.buildClient(); + + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/PurviewMetadataClientTestBase.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/PurviewMetadataClientTestBase.java new file mode 100644 index 000000000000..91e0f2b7d072 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/PurviewMetadataClientTestBase.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.analytics.purview.administration.MetadataPolicyClient; +import com.azure.analytics.purview.administration.MetadataPolicyClientBuilder; +import com.azure.analytics.purview.administration.MetadataRolesClient; +import com.azure.analytics.purview.administration.MetadataRolesClientBuilder; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +class PurviewMetadataClientTestBase extends TestProxyTestBase { + protected MetadataRolesClient metadataRolesClient; + + protected MetadataPolicyClient metadataPolicyClient; + + @Override + protected void beforeTest() { + MetadataRolesClientBuilder metadataRolesClientbuilder = new MetadataRolesClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + metadataRolesClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + metadataRolesClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + metadataRolesClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + metadataRolesClient = metadataRolesClientbuilder.buildClient(); + + MetadataPolicyClientBuilder metadataPolicyClientbuilder = new MetadataPolicyClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + metadataPolicyClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + metadataPolicyClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + metadataPolicyClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + metadataPolicyClient = metadataPolicyClientbuilder.buildClient(); + + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesCreateOrUpdateResourceSetRuleTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesCreateOrUpdateResourceSetRuleTests.java new file mode 100644 index 000000000000..72c6668a1918 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesCreateOrUpdateResourceSetRuleTests.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.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ResourceSetRulesCreateOrUpdateResourceSetRuleTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testResourceSetRulesCreateOrUpdateResourceSetRuleTests() { + BinaryData resourceSetRuleConfig = BinaryData.fromString( + "{\"advancedResourceSet\":{\"resourceSetProcessing\":\"Default\"},\"pathPatternConfig\":{\"acceptedPatterns\":[],\"complexReplacers\":[{\"name\":\"SparkPath\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"typeName\":\"Microsoft.DataMap.PathPattern.SparkPathReplacer\"}],\"createdBy\":\"AzureDataCatalog\",\"enableDefaultPatterns\":true,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regexReplacers\":[{\"name\":\"Guid\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minHex\":32,\"options\":9,\"regexStr\":\"([0-9A-F]{32}|[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})\"},\"replaceWith\":\"{GUID}\"},{\"name\":\"Number\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"^\\\\d+$\"},\"replaceWith\":\"{N}\"},{\"name\":\"yyyy-mm-ddThh-MM-ss\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":12,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])([-\\\\._@]?)([0-5][0-9])([-\\\\._@]?)([0-5][0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8{N}$10{N}$12\"},{\"name\":\"yyyy-mm-ddThh\",\"description\":null,\"condition\":\"ApplyToNonFileName\",\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"yyyy-mm-ddZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":6,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6\"},{\"name\":\"yyyy-mm-dd-hhZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([-\\\\._@]?)(2[0-3]|[01]?[0-9])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"NumberBetweenDelimiter\",\"description\":null,\"condition\":\"ApplyToFileNameOrNonVersionString\",\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(?<=[-\\\\._@])([\\\\d]+)(?=[-\\\\._@])|^(\\\\d+)(?=[-\\\\._@])|(?<=[-\\\\._@])(\\\\d+)$\"},\"replaceWith\":\"{N}\"},{\"name\":\"4ByteHex\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigitsOrLetters\":8,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)([0-9A-F]{8,16})(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{HEX}\"},{\"name\":\"NumberInFile\",\"description\":null,\"condition\":\"ApplyToFileName\",\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(\\\\d+)\"},\"replaceWith\":\"{N}\"},{\"name\":\"Localization(DashSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDashes\":1,\"minLetters\":4,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar-eg|ar-sa|cy-gb|da-dk|de-at|de-ch|de-de|en-au|en-ca|en-gb|en-ie|en-in|en-my|en-nz|en-ph|en-sg|en-us|en-ww|en-xa|en-za|es-ar|es-cl|es-es|es-mx|es-us|es-xl|fi-fi|fr-be|fr-ca|fr-ch|fr-fr|gu-in|hi-in|id-id|it-it|ja-jp|nb-no|nl-nl|nl-be|pt-br|pt-pt|pl-pl|ru-ru|sv-se|ta-in|te-in|zh-cn|zh-hk|zh-tw|ko-kr|tr-tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"},{\"name\":\"Localization(UnderscoreSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minLetters\":4,\"minUnderscores\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar_eg|ar_sa|cy_gb|da_dk|de_at|de_ch|de_de|en_au|en_ca|en_gb|en_ie|en_in|en_my|en_nz|en_ph|en_sg|en_us|en_ww|en_xa|en_za|es_ar|es_cl|es_es|es_mx|es_us|es_xl|fi_fi|fr_be|fr_ca|fr_ch|fr_fr|gu_in|hi_in|id_id|it_it|ja_jp|nb_no|nl_nl|nl_be|pt_br|pt_pt|pl_pl|ru_ru|sv_se|ta_in|te_in|zh_cn|zh_hk|zh_tw|ko_kr|tr_tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"}],\"rejectedPatterns\":[{\"name\":\"OfficeDocuments\",\"path\":\"^.*\\\\.(?i)(DOC|DOCM|DOCX|DOT|ODP|ODS|ODT|PDF|POT|PPS|PPSX|PPT|PPTM|PPTX|XLC|XLS|XLSB|XLSM|XLSX|XLT)(?-i)$\",\"createdBy\":\"AzureDataCatalog\",\"filterType\":\"Regex\",\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\"}]}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = resourceSetRulesClient.createOrUpdateResourceSetRuleWithResponse(resourceSetRuleConfig, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"myNewresourceSetRuleConfigName\",\"advancedResourceSet\":{\"modifiedAt\":\"2021-07-08T23:14:06.4084575Z\",\"resourceSetProcessing\":\"Default\"},\"pathPatternConfig\":{\"acceptedPatterns\":[],\"complexReplacers\":[{\"name\":\"SparkPath\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"typeName\":\"Microsoft.DataMap.PathPattern.SparkPathReplacer\"}],\"createdBy\":\"AzureDataCatalog\",\"enableDefaultPatterns\":true,\"lastUpdatedTimestamp\":1585257544,\"modifiedBy\":\"AzureDataCatalog\",\"regexReplacers\":[{\"name\":\"Guid\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minHex\":32,\"options\":9,\"regexStr\":\"([0-9A-F]{32}|[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})\"},\"replaceWith\":\"{GUID}\"},{\"name\":\"Number\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"^\\\\d+$\"},\"replaceWith\":\"{N}\"},{\"name\":\"yyyy-mm-ddThh-MM-ss\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":12,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])([-\\\\._@]?)([0-5][0-9])([-\\\\._@]?)([0-5][0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8{N}$10{N}$12\"},{\"name\":\"yyyy-mm-ddThh\",\"description\":null,\"condition\":\"ApplyToNonFileName\",\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"yyyy-mm-ddZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":6,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6\"},{\"name\":\"yyyy-mm-dd-hhZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([-\\\\._@]?)(2[0-3]|[01]?[0-9])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"NumberBetweenDelimiter\",\"description\":null,\"condition\":\"ApplyToFileNameOrNonVersionString\",\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(?<=[-\\\\._@])([\\\\d]+)(?=[-\\\\._@])|^(\\\\d+)(?=[-\\\\._@])|(?<=[-\\\\._@])(\\\\d+)$\"},\"replaceWith\":\"{N}\"},{\"name\":\"4ByteHex\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigitsOrLetters\":8,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)([0-9A-F]{8,16})(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{HEX}\"},{\"name\":\"NumberInFile\",\"description\":null,\"condition\":\"ApplyToFileName\",\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(\\\\d+)\"},\"replaceWith\":\"{N}\"},{\"name\":\"Localization(DashSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDashes\":1,\"minLetters\":4,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar-eg|ar-sa|cy-gb|da-dk|de-at|de-ch|de-de|en-au|en-ca|en-gb|en-ie|en-in|en-my|en-nz|en-ph|en-sg|en-us|en-ww|en-xa|en-za|es-ar|es-cl|es-es|es-mx|es-us|es-xl|fi-fi|fr-be|fr-ca|fr-ch|fr-fr|gu-in|hi-in|id-id|it-it|ja-jp|nb-no|nl-nl|nl-be|pt-br|pt-pt|pl-pl|ru-ru|sv-se|ta-in|te-in|zh-cn|zh-hk|zh-tw|ko-kr|tr-tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"},{\"name\":\"Localization(UnderscoreSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minLetters\":4,\"minUnderscores\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar_eg|ar_sa|cy_gb|da_dk|de_at|de_ch|de_de|en_au|en_ca|en_gb|en_ie|en_in|en_my|en_nz|en_ph|en_sg|en_us|en_ww|en_xa|en_za|es_ar|es_cl|es_es|es_mx|es_us|es_xl|fi_fi|fr_be|fr_ca|fr_ch|fr_fr|gu_in|hi_in|id_id|it_it|ja_jp|nb_no|nl_nl|nl_be|pt_br|pt_pt|pl_pl|ru_ru|sv_se|ta_in|te_in|zh_cn|zh_hk|zh_tw|ko_kr|tr_tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"}],\"rejectedPatterns\":[{\"name\":\"OfficeDocuments\",\"path\":\"^.*\\\\.(?i)(DOC|DOCM|DOCX|DOT|ODP|ODS|ODT|PDF|POT|PPS|PPSX|PPT|PPTM|PPTX|XLC|XLS|XLSB|XLSM|XLSX|XLT)(?-i)$\",\"createdBy\":\"AzureDataCatalog\",\"filterType\":\"Regex\",\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\"}]}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesDeleteResourceSetRuleTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesDeleteResourceSetRuleTests.java new file mode 100644 index 000000000000..b3ad965ec76b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesDeleteResourceSetRuleTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ResourceSetRulesDeleteResourceSetRuleTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testResourceSetRulesDeleteResourceSetRuleTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = resourceSetRulesClient.deleteResourceSetRuleWithResponse(requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesGetResourceSetRuleTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesGetResourceSetRuleTests.java new file mode 100644 index 000000000000..114e29eb052f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesGetResourceSetRuleTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ResourceSetRulesGetResourceSetRuleTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testResourceSetRulesGetResourceSetRuleTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = resourceSetRulesClient.getResourceSetRuleWithResponse(requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.getHeaders().get(HttpHeaderName.fromString("X-Content-Type-Options")).getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"myNewresourceSetRuleConfigName\",\"advancedResourceSet\":{\"modifiedAt\":\"2021-07-08T23:14:06.4084575Z\",\"resourceSetProcessing\":\"Advanced\"},\"pathPatternConfig\":{\"acceptedPatterns\":[],\"complexReplacers\":[{\"name\":\"SparkPath\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"typeName\":\"Microsoft.DataMap.PathPattern.SparkPathReplacer\"}],\"createdBy\":\"AzureDataCatalog\",\"enableDefaultPatterns\":true,\"lastUpdatedTimestamp\":1585257544,\"modifiedBy\":\"AzureDataCatalog\",\"regexReplacers\":[{\"name\":\"Guid\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minHex\":32,\"options\":9,\"regexStr\":\"([0-9A-F]{32}|[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})\"},\"replaceWith\":\"{GUID}\"},{\"name\":\"Number\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"^\\\\d+$\"},\"replaceWith\":\"{N}\"},{\"name\":\"yyyy-mm-ddThh-MM-ss\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":12,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])([-\\\\._@]?)([0-5][0-9])([-\\\\._@]?)([0-5][0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8{N}$10{N}$12\"},{\"name\":\"yyyy-mm-ddThh\",\"description\":null,\"condition\":\"ApplyToNonFileName\",\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"yyyy-mm-ddZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":6,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6\"},{\"name\":\"yyyy-mm-dd-hhZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([-\\\\._@]?)(2[0-3]|[01]?[0-9])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"NumberBetweenDelimiter\",\"description\":null,\"condition\":\"ApplyToFileNameOrNonVersionString\",\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(?<=[-\\\\._@])([\\\\d]+)(?=[-\\\\._@])|^(\\\\d+)(?=[-\\\\._@])|(?<=[-\\\\._@])(\\\\d+)$\"},\"replaceWith\":\"{N}\"},{\"name\":\"4ByteHex\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigitsOrLetters\":8,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)([0-9A-F]{8,16})(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{HEX}\"},{\"name\":\"NumberInFile\",\"description\":null,\"condition\":\"ApplyToFileName\",\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(\\\\d+)\"},\"replaceWith\":\"{N}\"},{\"name\":\"Localization(DashSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDashes\":1,\"minLetters\":4,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar-eg|ar-sa|cy-gb|da-dk|de-at|de-ch|de-de|en-au|en-ca|en-gb|en-ie|en-in|en-my|en-nz|en-ph|en-sg|en-us|en-ww|en-xa|en-za|es-ar|es-cl|es-es|es-mx|es-us|es-xl|fi-fi|fr-be|fr-ca|fr-ch|fr-fr|gu-in|hi-in|id-id|it-it|ja-jp|nb-no|nl-nl|nl-be|pt-br|pt-pt|pl-pl|ru-ru|sv-se|ta-in|te-in|zh-cn|zh-hk|zh-tw|ko-kr|tr-tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"},{\"name\":\"Localization(UnderscoreSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minLetters\":4,\"minUnderscores\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar_eg|ar_sa|cy_gb|da_dk|de_at|de_ch|de_de|en_au|en_ca|en_gb|en_ie|en_in|en_my|en_nz|en_ph|en_sg|en_us|en_ww|en_xa|en_za|es_ar|es_cl|es_es|es_mx|es_us|es_xl|fi_fi|fr_be|fr_ca|fr_ch|fr_fr|gu_in|hi_in|id_id|it_it|ja_jp|nb_no|nl_nl|nl_be|pt_br|pt_pt|pl_pl|ru_ru|sv_se|ta_in|te_in|zh_cn|zh_hk|zh_tw|ko_kr|tr_tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"}],\"rejectedPatterns\":[{\"name\":\"OfficeDocuments\",\"path\":\"^.*\\\\.(?i)(DOC|DOCM|DOCX|DOT|ODP|ODS|ODT|PDF|POT|PPS|PPSX|PPT|PPTM|PPTX|XLC|XLS|XLSB|XLSM|XLSX|XLT)(?-i)$\",\"createdBy\":\"AzureDataCatalog\",\"filterType\":\"Regex\",\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\"}]}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesListResourceSetRulesTests.java b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesListResourceSetRulesTests.java new file mode 100644 index 000000000000..f5af2687a102 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/src/test/java/com/azure/analytics/purview/administration/generated/ResourceSetRulesListResourceSetRulesTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.administration.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ResourceSetRulesListResourceSetRulesTests extends PurviewAccountClientTestBase { + @Test + @Disabled + public void testResourceSetRulesListResourceSetRulesTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = resourceSetRulesClient.listResourceSetRules(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.iterableByPage().iterator().next().getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("nosniff", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("X-Content-Type-Options")) + .getValue()); + Assertions.assertEquals("d5496da4-9c52-402f-b067-83cc9ddea888", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-request-id")) + .getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-correlation-request-id")) + .getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"myNewresourceSetRuleConfigName\",\"advancedResourceSet\":{\"modifiedAt\":\"2021-07-08T23:14:06.4084575Z\",\"resourceSetProcessing\":\"Default\"},\"pathPatternConfig\":{\"acceptedPatterns\":[],\"complexReplacers\":[{\"name\":\"SparkPath\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"typeName\":\"Microsoft.DataMap.PathPattern.SparkPathReplacer\"}],\"createdBy\":\"AzureDataCatalog\",\"enableDefaultPatterns\":true,\"lastUpdatedTimestamp\":1585257544,\"modifiedBy\":\"AzureDataCatalog\",\"regexReplacers\":[{\"name\":\"Guid\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minHex\":32,\"options\":9,\"regexStr\":\"([0-9A-F]{32}|[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})\"},\"replaceWith\":\"{GUID}\"},{\"name\":\"Number\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"^\\\\d+$\"},\"replaceWith\":\"{N}\"},{\"name\":\"yyyy-mm-ddThh-MM-ss\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":12,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])([-\\\\._@]?)([0-5][0-9])([-\\\\._@]?)([0-5][0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8{N}$10{N}$12\"},{\"name\":\"yyyy-mm-ddThh\",\"description\":null,\"condition\":\"ApplyToNonFileName\",\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([T])(2[0-3]|[01]?[0-9])(Z)?\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"yyyy-mm-ddZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":6,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6\"},{\"name\":\"yyyy-mm-dd-hhZ\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":8,\"options\":8,\"regexStr\":\"(20)[1-9][0-9]([-\\\\._@]?)(0[1-9]|1[012])([-\\\\._@]?)(0[1-9]|[12][0-9]|3[01])([-\\\\._@]?)(2[0-3]|[01]?[0-9])(Z)\"},\"replaceWith\":\"{N}$2{N}$4{N}$6{N}$8\"},{\"name\":\"NumberBetweenDelimiter\",\"description\":null,\"condition\":\"ApplyToFileNameOrNonVersionString\",\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(?<=[-\\\\._@])([\\\\d]+)(?=[-\\\\._@])|^(\\\\d+)(?=[-\\\\._@])|(?<=[-\\\\._@])(\\\\d+)$\"},\"replaceWith\":\"{N}\"},{\"name\":\"4ByteHex\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigitsOrLetters\":8,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)([0-9A-F]{8,16})(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{HEX}\"},{\"name\":\"NumberInFile\",\"description\":null,\"condition\":\"ApplyToFileName\",\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"doNotReplaceRegex\":{\"minDigits\":1,\"minLetters\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)[v](\\\\d+)[\\\\.](\\\\d+)[\\\\.]?(\\\\d+)?(?=[-\\\\._@]|$)\"},\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDigits\":1,\"options\":8,\"regexStr\":\"(\\\\d+)\"},\"replaceWith\":\"{N}\"},{\"name\":\"Localization(DashSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minDashes\":1,\"minLetters\":4,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar-eg|ar-sa|cy-gb|da-dk|de-at|de-ch|de-de|en-au|en-ca|en-gb|en-ie|en-in|en-my|en-nz|en-ph|en-sg|en-us|en-ww|en-xa|en-za|es-ar|es-cl|es-es|es-mx|es-us|es-xl|fi-fi|fr-be|fr-ca|fr-ch|fr-fr|gu-in|hi-in|id-id|it-it|ja-jp|nb-no|nl-nl|nl-be|pt-br|pt-pt|pl-pl|ru-ru|sv-se|ta-in|te-in|zh-cn|zh-hk|zh-tw|ko-kr|tr-tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"},{\"name\":\"Localization(UnderscoreSeparated)\",\"description\":null,\"createdBy\":\"AzureDataCatalog\",\"disableRecursiveReplacerApplication\":false,\"disabled\":false,\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\",\"regex\":{\"minLetters\":4,\"minUnderscores\":1,\"options\":9,\"regexStr\":\"(?<=[-\\\\._@]|^)(ar_eg|ar_sa|cy_gb|da_dk|de_at|de_ch|de_de|en_au|en_ca|en_gb|en_ie|en_in|en_my|en_nz|en_ph|en_sg|en_us|en_ww|en_xa|en_za|es_ar|es_cl|es_es|es_mx|es_us|es_xl|fi_fi|fr_be|fr_ca|fr_ch|fr_fr|gu_in|hi_in|id_id|it_it|ja_jp|nb_no|nl_nl|nl_be|pt_br|pt_pt|pl_pl|ru_ru|sv_se|ta_in|te_in|zh_cn|zh_hk|zh_tw|ko_kr|tr_tr)(?=[-\\\\._@]|$)\"},\"replaceWith\":\"{LOC}\"}],\"rejectedPatterns\":[{\"name\":\"OfficeDocuments\",\"path\":\"^.*\\\\.(?i)(DOC|DOCM|DOCX|DOT|ODP|ODS|ODT|PDF|POT|PPS|PPSX|PPT|PPTM|PPTX|XLC|XLS|XLSB|XLSM|XLSX|XLT)(?-i)$\",\"createdBy\":\"AzureDataCatalog\",\"filterType\":\"Regex\",\"lastUpdatedTimestamp\":0,\"modifiedBy\":\"AzureDataCatalog\"}]}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-administration/swagger/README.md b/sdk/purview/azure-analytics-purview-administration/swagger/README.md new file mode 100644 index 000000000000..7cbb289dd761 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-administration/swagger/README.md @@ -0,0 +1,47 @@ +## Generate autorest code + +``` yaml +batch: + - package-metadata: true + - package-account: true +``` + +``` yaml $(package-metadata) +input-file: + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01-preview/purviewMetadataPolicy.json +use: '@autorest/java@4.1.62' +java: true +output-folder: ../ +namespace: com.azure.analytics.purview.administration +license-header: MICROSOFT_MIT_SMALL +data-plane: true +credential-types: tokencredential +credential-scopes: https://purview.azure.net/.default +generate-samples: true +generate-tests: true +title: PurviewMetadataClient +service-name: PurviewMetadata +artifact-id: azure-analytics-purview-administration +service-versions: + - 2021-07-01-preview +``` + +``` yaml $(package-account) +input-file: + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json +use: '@autorest/java@4.1.62' +java: true +output-folder: ../ +namespace: com.azure.analytics.purview.administration +license-header: MICROSOFT_MIT_SMALL +data-plane: true +credential-types: tokencredential +credential-scopes: https://purview.azure.net/.default +generate-samples: true +generate-tests: true +title: PurviewAccountClient +artifact-id: azure-analytics-purview-administration +service-name: PurviewAccount +service-versions: + - 2019-11-01-preview +``` diff --git a/sdk/purview/azure-analytics-purview-scanning/CHANGELOG.md b/sdk/purview/azure-analytics-purview-scanning/CHANGELOG.md new file mode 100644 index 000000000000..a2e575308cfa --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/CHANGELOG.md @@ -0,0 +1,29 @@ +# Release History + +## 1.0.0-beta.3 (Unreleased) + +### Breaking Changes + +- Merged the `Context` parameter into the `RequestOptions` parameter in methods of clients. +- Modified `tagClassificationVersion` method, method takes one more `action` parameter. + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-core` to `1.23.0`. + +## 1.0.0-beta.2 (2021-10-15) + +### Breaking Changes + +This is a new version of LLC SDK. Changes are + +- A sync client and an async client for each operation group. +- Add `RequestOptions` and `Context` to client method parameters. +- Return type of client method is always `Response` except for paging and long-running operations. +- Allow users to set `ServiceVersion` in client builder. + +## 1.0.0-beta.1 (2021-05-11) + +- Initial beta release for Purview Scanning client library. diff --git a/sdk/purview/azure-analytics-purview-scanning/README.md b/sdk/purview/azure-analytics-purview-scanning/README.md new file mode 100644 index 000000000000..3a1f15e6ff16 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/README.md @@ -0,0 +1,115 @@ +# Azure Purview Scanning client library for Java + +Azure Purview Scanning is a fully managed cloud service whose users can scan your data into your data estate (also known as your **catalog**). Scanning is a process by which the catalog connects directly to a data source on a user-specified schedule. + +- Scan your data into your catalog +- Examine your data +- Extract schemas from your data + +**Please rely heavily on the [service's documentation][product_documentation] and our [data-plane client docs][protocol_method] to use this library** + +[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][api_reference_doc] | [Product Documentation][product_documentation] | [Samples][samples_readme] + +## Getting started + +### Prerequisites + +- A [Java Development Kit (JDK)][jdk_link], version 8 or later. +- [Azure Subscription][azure_subscription] +- An existing Azure Purview account. + +For more information about creating the account see [here][create_azure_purview_account]. + +### Include the Package + +[//]: # ({x-version-update-start;com.azure:azure-analytics-purview-scanning;current}) +```xml + + com.azure + azure-analytics-purview-scanning + 1.0.0-beta.3 + +``` +[//]: # ({x-version-update-end}) + + +### Authenticate the client +In order to interact with the Azure Purview service, your client must present an Azure Active Directory bearer token to the service. + +After setup, you can choose which type of [credential][azure_identity_credential_type] from `azure-identity` to use. +We recommend using [DefaultAzureCredential][identity_dac], configured through the `AZURE_TOKEN_CREDENTIALS` environment variable. +Set this variable as described in the [Learn documentation][customize_defaultAzureCredential], which provides the most up-to-date guidance and examples. + +You can find more ways to authenticate with [azure-identity][azure_identity]. + + +#### Create SystemScanRulesetsClient with Azure Active Directory Credential + +You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. + +To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below, or other credential providers provided with the Azure SDK, please include the `azure-identity` package: + +[//]: # ({x-version-update-start;com.azure:azure-identity;dependency}) +```xml + + com.azure + azure-identity + 1.18.2 + +``` +[//]: # ({x-version-update-end}) + +##### Example +```java readme-sample-createSystemScanRulesetsClient +SystemScanRulesetsClient client = new PurviewScanningClientBuilder() + .endpoint(System.getenv("SCANNING_ENDPOINT")) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildSystemScanRulesetsClient(); +``` + +## Key concepts + +## Examples +More examples can be found in [samples][samples_code]. + +## Troubleshooting + +### Enabling Logging + +Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite +their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help +locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +## Next steps + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +[samples]: src/samples/java/com/azure/analytics/purview/scanning +[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-scanning/src +[samples_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-scanning/src/samples/ +[azure_subscription]: https://azure.microsoft.com/free/ +[api_reference_doc]: https://azure.github.io/azure-sdk-for-java +[product_documentation]: https://azure.microsoft.com/services/purview/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity +[DefaultAzureCredential]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md#defaultazurecredential +[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable +[package]: https://central.sonatype.com/artifact/com.azure/azure-analytics-purview-scanning +[samples_readme]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/purview/azure-analytics-purview-scanning/src/samples/README.md +[protocol_method]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/protocol-methods.md +[create_azure_purview_account]: https://learn.microsoft.com/azure/purview/ +[logging]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/logging.md +[cla]: https://cla.opensource.microsoft.com/ +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com +[customize_defaultAzureCredential]: https://aka.ms/azsdk/java/identity/credential-chains#how-to-customize-defaultazurecredential +[azure_identity_credential_type]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials +[identity_dac]: https://aka.ms/azsdk/java/identity/credential-chains#defaultazurecredential-overview + diff --git a/sdk/purview/azure-analytics-purview-scanning/assets.json b/sdk/purview/azure-analytics-purview-scanning/assets.json new file mode 100644 index 000000000000..10460125d6e4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/purview/azure-analytics-purview-scanning", + "Tag": "java/purview/azure-analytics-purview-scanning_fea6bf1c51" +} diff --git a/sdk/purview/azure-analytics-purview-scanning/checkstyle-suppressions.xml b/sdk/purview/azure-analytics-purview-scanning/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/purview/azure-analytics-purview-scanning/pom.xml b/sdk/purview/azure-analytics-purview-scanning/pom.xml new file mode 100644 index 000000000000..e45c64890b1d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-analytics-purview-scanning + 1.0.0-beta.3 + + Microsoft Azure client library for Purview Scanning + This package contains Microsoft Azure Purview Scanning client library. + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + UTF-8 + 0.1 + 0.05 + + --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + + + false + + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/purview/azure-analytics-purview-scanning/spotbugs-exclude.xml b/sdk/purview/azure-analytics-purview-scanning/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ClassificationRulesAsyncClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ClassificationRulesAsyncClient.java new file mode 100644 index 000000000000..29d3733c65c4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ClassificationRulesAsyncClient.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.ClassificationRulesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class, isAsync = true) +public final class ClassificationRulesAsyncClient { + @Generated + private final ClassificationRulesImpl serviceClient; + + /** + * Initializes an instance of ClassificationRulesAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ClassificationRulesAsyncClient(ClassificationRulesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a classification rule along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String classificationRuleName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(classificationRuleName, requestOptions); + } + + /** + * Creates or Updates a classification rule. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponse(String classificationRuleName, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponseAsync(classificationRuleName, requestOptions); + } + + /** + * Deletes a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(String classificationRuleName, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseAsync(classificationRuleName, requestOptions); + } + + /** + * List classification rules in Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAll(RequestOptions requestOptions) { + return this.serviceClient.listAllAsync(requestOptions); + } + + /** + * Lists the rule versions of a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listVersionsByClassificationRuleName(String classificationRuleName, + RequestOptions requestOptions) { + return this.serviceClient.listVersionsByClassificationRuleNameAsync(classificationRuleName, requestOptions); + } + + /** + * Sets Classification Action on a specific classification rule version. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param classificationRuleVersion The classificationRuleVersion parameter. + * @param action The action parameter. Allowed values: "Keep", "Delete". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> tagClassificationVersionWithResponse(String classificationRuleName, + int classificationRuleVersion, String action, RequestOptions requestOptions) { + return this.serviceClient.tagClassificationVersionWithResponseAsync(classificationRuleName, + classificationRuleVersion, action, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ClassificationRulesClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ClassificationRulesClient.java new file mode 100644 index 000000000000..bfd2f5876a0a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ClassificationRulesClient.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.ClassificationRulesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class) +public final class ClassificationRulesClient { + @Generated + private final ClassificationRulesImpl serviceClient; + + /** + * Initializes an instance of ClassificationRulesClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ClassificationRulesClient(ClassificationRulesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a classification rule along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String classificationRuleName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(classificationRuleName, requestOptions); + } + + /** + * Creates or Updates a classification rule. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String classificationRuleName, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponse(classificationRuleName, requestOptions); + } + + /** + * Deletes a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String classificationRuleName, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponse(classificationRuleName, requestOptions); + } + + /** + * List classification rules in Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + return this.serviceClient.listAll(requestOptions); + } + + /** + * Lists the rule versions of a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVersionsByClassificationRuleName(String classificationRuleName, + RequestOptions requestOptions) { + return this.serviceClient.listVersionsByClassificationRuleName(classificationRuleName, requestOptions); + } + + /** + * Sets Classification Action on a specific classification rule version. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param classificationRuleVersion The classificationRuleVersion parameter. + * @param action The action parameter. Allowed values: "Keep", "Delete". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response tagClassificationVersionWithResponse(String classificationRuleName, + int classificationRuleVersion, String action, RequestOptions requestOptions) { + return this.serviceClient.tagClassificationVersionWithResponse(classificationRuleName, + classificationRuleVersion, action, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/DataSourcesAsyncClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/DataSourcesAsyncClient.java new file mode 100644 index 000000000000..65268966c173 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/DataSourcesAsyncClient.java @@ -0,0 +1,435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.DataSourcesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class, isAsync = true) +public final class DataSourcesAsyncClient { + @Generated + private final DataSourcesImpl serviceClient; + + /** + * Initializes an instance of DataSourcesAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + DataSourcesAsyncClient(DataSourcesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates or Updates a data source. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponse(String dataSourceName, RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponseAsync(dataSourceName, requestOptions); + } + + /** + * Get a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a data source along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String dataSourceName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(dataSourceName, requestOptions); + } + + /** + * Deletes a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(String dataSourceName, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseAsync(dataSourceName, requestOptions); + } + + /** + * List data sources in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAll(RequestOptions requestOptions) { + return this.serviceClient.listAllAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/DataSourcesClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/DataSourcesClient.java new file mode 100644 index 000000000000..4f649d3ddaf4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/DataSourcesClient.java @@ -0,0 +1,434 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.DataSourcesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class) +public final class DataSourcesClient { + @Generated + private final DataSourcesImpl serviceClient; + + /** + * Initializes an instance of DataSourcesClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + DataSourcesClient(DataSourcesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates or Updates a data source. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String dataSourceName, RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponse(dataSourceName, requestOptions); + } + + /** + * Get a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a data source along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String dataSourceName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(dataSourceName, requestOptions); + } + + /** + * Deletes a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String dataSourceName, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponse(dataSourceName, requestOptions); + } + + /** + * List data sources in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + return this.serviceClient.listAll(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/FiltersAsyncClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/FiltersAsyncClient.java new file mode 100644 index 000000000000..808d4bcf9842 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/FiltersAsyncClient.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.FiltersImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class, isAsync = true) +public final class FiltersAsyncClient { + @Generated + private final FiltersImpl serviceClient; + + /** + * Initializes an instance of FiltersAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + FiltersAsyncClient(FiltersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a filter. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a filter along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(dataSourceName, scanName, requestOptions); + } + + /** + * Creates or updates a filter. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponseAsync(dataSourceName, scanName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/FiltersClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/FiltersClient.java new file mode 100644 index 000000000000..35bb9b658fc0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/FiltersClient.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.FiltersImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class) +public final class FiltersClient { + @Generated + private final FiltersImpl serviceClient; + + /** + * Initializes an instance of FiltersClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + FiltersClient(FiltersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a filter. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a filter along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String dataSourceName, String scanName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(dataSourceName, scanName, requestOptions); + } + + /** + * Creates or updates a filter. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponse(dataSourceName, scanName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/KeyVaultConnectionsAsyncClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/KeyVaultConnectionsAsyncClient.java new file mode 100644 index 000000000000..9c7b7e2c4db8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/KeyVaultConnectionsAsyncClient.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.KeyVaultConnectionsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class, isAsync = true) +public final class KeyVaultConnectionsAsyncClient { + @Generated + private final KeyVaultConnectionsImpl serviceClient; + + /** + * Initializes an instance of KeyVaultConnectionsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + KeyVaultConnectionsAsyncClient(KeyVaultConnectionsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets key vault information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return key vault information along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String keyVaultName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(keyVaultName, requestOptions); + } + + /** + * Creates an instance of a key vault connection. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponse(String keyVaultName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createWithResponseAsync(keyVaultName, body, requestOptions); + } + + /** + * Deletes the key vault connection associated with the account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(String keyVaultName, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseAsync(keyVaultName, requestOptions); + } + + /** + * List key vault connections in account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAll(RequestOptions requestOptions) { + return this.serviceClient.listAllAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/KeyVaultConnectionsClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/KeyVaultConnectionsClient.java new file mode 100644 index 000000000000..37e157105e84 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/KeyVaultConnectionsClient.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.KeyVaultConnectionsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class) +public final class KeyVaultConnectionsClient { + @Generated + private final KeyVaultConnectionsImpl serviceClient; + + /** + * Initializes an instance of KeyVaultConnectionsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + KeyVaultConnectionsClient(KeyVaultConnectionsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets key vault information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return key vault information along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String keyVaultName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(keyVaultName, requestOptions); + } + + /** + * Creates an instance of a key vault connection. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String keyVaultName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createWithResponse(keyVaultName, body, requestOptions); + } + + /** + * Deletes the key vault connection associated with the account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String keyVaultName, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponse(keyVaultName, requestOptions); + } + + /** + * List key vault connections in account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + return this.serviceClient.listAll(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/PurviewScanningClientBuilder.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/PurviewScanningClientBuilder.java new file mode 100644 index 000000000000..f8b97aa8a27b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/PurviewScanningClientBuilder.java @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.PurviewScanningClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the PurviewScanningClient type. + */ +@ServiceClientBuilder( + serviceClients = { + KeyVaultConnectionsClient.class, + ClassificationRulesClient.class, + DataSourcesClient.class, + FiltersClient.class, + ScansClient.class, + ScanResultClient.class, + ScanRulesetsClient.class, + SystemScanRulesetsClient.class, + TriggersClient.class, + KeyVaultConnectionsAsyncClient.class, + ClassificationRulesAsyncClient.class, + DataSourcesAsyncClient.class, + FiltersAsyncClient.class, + ScansAsyncClient.class, + ScanResultAsyncClient.class, + ScanRulesetsAsyncClient.class, + SystemScanRulesetsAsyncClient.class, + TriggersAsyncClient.class }) +public final class PurviewScanningClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-scanning.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the PurviewScanningClientBuilder. + */ + @Generated + public PurviewScanningClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PurviewScanningClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PurviewScanningClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PurviewScanningClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PurviewScanningClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PurviewScanningClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PurviewScanningClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PurviewScanningClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PurviewScanningClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PurviewScanningClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewScanningServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the PurviewScanningClientBuilder. + */ + @Generated + public PurviewScanningClientBuilder serviceVersion(PurviewScanningServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the PurviewScanningClientBuilder. + */ + @Generated + public PurviewScanningClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewScanningClientImpl with the provided parameters. + * + * @return an instance of PurviewScanningClientImpl. + */ + @Generated + private PurviewScanningClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewScanningServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewScanningServiceVersion.getLatest(); + PurviewScanningClientImpl client = new PurviewScanningClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of KeyVaultConnectionsAsyncClient class. + * + * @return an instance of KeyVaultConnectionsAsyncClient. + */ + @Generated + public KeyVaultConnectionsAsyncClient buildKeyVaultConnectionsAsyncClient() { + return new KeyVaultConnectionsAsyncClient(buildInnerClient().getKeyVaultConnections()); + } + + /** + * Builds an instance of ClassificationRulesAsyncClient class. + * + * @return an instance of ClassificationRulesAsyncClient. + */ + @Generated + public ClassificationRulesAsyncClient buildClassificationRulesAsyncClient() { + return new ClassificationRulesAsyncClient(buildInnerClient().getClassificationRules()); + } + + /** + * Builds an instance of DataSourcesAsyncClient class. + * + * @return an instance of DataSourcesAsyncClient. + */ + @Generated + public DataSourcesAsyncClient buildDataSourcesAsyncClient() { + return new DataSourcesAsyncClient(buildInnerClient().getDataSources()); + } + + /** + * Builds an instance of FiltersAsyncClient class. + * + * @return an instance of FiltersAsyncClient. + */ + @Generated + public FiltersAsyncClient buildFiltersAsyncClient() { + return new FiltersAsyncClient(buildInnerClient().getFilters()); + } + + /** + * Builds an instance of ScansAsyncClient class. + * + * @return an instance of ScansAsyncClient. + */ + @Generated + public ScansAsyncClient buildScansAsyncClient() { + return new ScansAsyncClient(buildInnerClient().getScans()); + } + + /** + * Builds an instance of ScanResultAsyncClient class. + * + * @return an instance of ScanResultAsyncClient. + */ + @Generated + public ScanResultAsyncClient buildScanResultAsyncClient() { + return new ScanResultAsyncClient(buildInnerClient().getScanResults()); + } + + /** + * Builds an instance of ScanRulesetsAsyncClient class. + * + * @return an instance of ScanRulesetsAsyncClient. + */ + @Generated + public ScanRulesetsAsyncClient buildScanRulesetsAsyncClient() { + return new ScanRulesetsAsyncClient(buildInnerClient().getScanRulesets()); + } + + /** + * Builds an instance of SystemScanRulesetsAsyncClient class. + * + * @return an instance of SystemScanRulesetsAsyncClient. + */ + @Generated + public SystemScanRulesetsAsyncClient buildSystemScanRulesetsAsyncClient() { + return new SystemScanRulesetsAsyncClient(buildInnerClient().getSystemScanRulesets()); + } + + /** + * Builds an instance of TriggersAsyncClient class. + * + * @return an instance of TriggersAsyncClient. + */ + @Generated + public TriggersAsyncClient buildTriggersAsyncClient() { + return new TriggersAsyncClient(buildInnerClient().getTriggers()); + } + + /** + * Builds an instance of KeyVaultConnectionsClient class. + * + * @return an instance of KeyVaultConnectionsClient. + */ + @Generated + public KeyVaultConnectionsClient buildKeyVaultConnectionsClient() { + return new KeyVaultConnectionsClient(buildInnerClient().getKeyVaultConnections()); + } + + /** + * Builds an instance of ClassificationRulesClient class. + * + * @return an instance of ClassificationRulesClient. + */ + @Generated + public ClassificationRulesClient buildClassificationRulesClient() { + return new ClassificationRulesClient(buildInnerClient().getClassificationRules()); + } + + /** + * Builds an instance of DataSourcesClient class. + * + * @return an instance of DataSourcesClient. + */ + @Generated + public DataSourcesClient buildDataSourcesClient() { + return new DataSourcesClient(buildInnerClient().getDataSources()); + } + + /** + * Builds an instance of FiltersClient class. + * + * @return an instance of FiltersClient. + */ + @Generated + public FiltersClient buildFiltersClient() { + return new FiltersClient(buildInnerClient().getFilters()); + } + + /** + * Builds an instance of ScansClient class. + * + * @return an instance of ScansClient. + */ + @Generated + public ScansClient buildScansClient() { + return new ScansClient(buildInnerClient().getScans()); + } + + /** + * Builds an instance of ScanResultClient class. + * + * @return an instance of ScanResultClient. + */ + @Generated + public ScanResultClient buildScanResultClient() { + return new ScanResultClient(buildInnerClient().getScanResults()); + } + + /** + * Builds an instance of ScanRulesetsClient class. + * + * @return an instance of ScanRulesetsClient. + */ + @Generated + public ScanRulesetsClient buildScanRulesetsClient() { + return new ScanRulesetsClient(buildInnerClient().getScanRulesets()); + } + + /** + * Builds an instance of SystemScanRulesetsClient class. + * + * @return an instance of SystemScanRulesetsClient. + */ + @Generated + public SystemScanRulesetsClient buildSystemScanRulesetsClient() { + return new SystemScanRulesetsClient(buildInnerClient().getSystemScanRulesets()); + } + + /** + * Builds an instance of TriggersClient class. + * + * @return an instance of TriggersClient. + */ + @Generated + public TriggersClient buildTriggersClient() { + return new TriggersClient(buildInnerClient().getTriggers()); + } + + private static final ClientLogger LOGGER = new ClientLogger(PurviewScanningClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/PurviewScanningServiceVersion.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/PurviewScanningServiceVersion.java new file mode 100644 index 000000000000..775479b28357 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/PurviewScanningServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of PurviewScanning. + */ +public enum PurviewScanningServiceVersion implements ServiceVersion { + /** + * Enum value 2018-12-01-preview. + */ + V2018_12_01_PREVIEW("2018-12-01-preview"); + + private final String version; + + PurviewScanningServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link PurviewScanningServiceVersion}. + */ + public static PurviewScanningServiceVersion getLatest() { + return V2018_12_01_PREVIEW; + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanResultAsyncClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanResultAsyncClient.java new file mode 100644 index 000000000000..7cfc31f71a75 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanResultAsyncClient.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.ScanResultsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class, isAsync = true) +public final class ScanResultAsyncClient { + @Generated + private final ScanResultsImpl serviceClient; + + /** + * Initializes an instance of ScanResultAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ScanResultAsyncClient(ScanResultsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Runs the scan. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      scanLevelStringNoThe scanLevel parameter. Allowed values: "Full", + * "Incremental".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param runId The runId parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> runScanWithResponse(String dataSourceName, String scanName, String runId, + RequestOptions requestOptions) { + return this.serviceClient.runScanWithResponseAsync(dataSourceName, scanName, runId, requestOptions); + } + + /** + * Cancels a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param runId The runId parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelScanWithResponse(String dataSourceName, String scanName, String runId, + RequestOptions requestOptions) { + return this.serviceClient.cancelScanWithResponseAsync(dataSourceName, scanName, runId, requestOptions); + } + + /** + * Lists the scan history of a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentId: String (Optional)
      +     *     id: String (Optional)
      +     *     resourceId: String (Optional)
      +     *     status: String (Optional)
      +     *     assetsDiscovered: Long (Optional)
      +     *     assetsClassified: Long (Optional)
      +     *     diagnostics (Optional): {
      +     *         notifications (Optional): [
      +     *              (Optional){
      +     *                 message: String (Optional)
      +     *                 code: Integer (Optional)
      +     *             }
      +     *         ]
      +     *         exceptionCountMap (Optional): {
      +     *             String: int (Required)
      +     *         }
      +     *     }
      +     *     startTime: OffsetDateTime (Optional)
      +     *     queuedTime: OffsetDateTime (Optional)
      +     *     pipelineStartTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     scanRulesetVersion: Integer (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     scanLevelType: String(Full/Incremental) (Optional)
      +     *     errorMessage: String (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     *     runType: String (Optional)
      +     *     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listScanHistory(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.listScanHistoryAsync(dataSourceName, scanName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanResultClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanResultClient.java new file mode 100644 index 000000000000..da112312ce3a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanResultClient.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.ScanResultsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class) +public final class ScanResultClient { + @Generated + private final ScanResultsImpl serviceClient; + + /** + * Initializes an instance of ScanResultClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ScanResultClient(ScanResultsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Runs the scan. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      scanLevelStringNoThe scanLevel parameter. Allowed values: "Full", + * "Incremental".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param runId The runId parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response runScanWithResponse(String dataSourceName, String scanName, String runId, + RequestOptions requestOptions) { + return this.serviceClient.runScanWithResponse(dataSourceName, scanName, runId, requestOptions); + } + + /** + * Cancels a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param runId The runId parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelScanWithResponse(String dataSourceName, String scanName, String runId, + RequestOptions requestOptions) { + return this.serviceClient.cancelScanWithResponse(dataSourceName, scanName, runId, requestOptions); + } + + /** + * Lists the scan history of a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentId: String (Optional)
      +     *     id: String (Optional)
      +     *     resourceId: String (Optional)
      +     *     status: String (Optional)
      +     *     assetsDiscovered: Long (Optional)
      +     *     assetsClassified: Long (Optional)
      +     *     diagnostics (Optional): {
      +     *         notifications (Optional): [
      +     *              (Optional){
      +     *                 message: String (Optional)
      +     *                 code: Integer (Optional)
      +     *             }
      +     *         ]
      +     *         exceptionCountMap (Optional): {
      +     *             String: int (Required)
      +     *         }
      +     *     }
      +     *     startTime: OffsetDateTime (Optional)
      +     *     queuedTime: OffsetDateTime (Optional)
      +     *     pipelineStartTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     scanRulesetVersion: Integer (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     scanLevelType: String(Full/Incremental) (Optional)
      +     *     errorMessage: String (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     *     runType: String (Optional)
      +     *     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listScanHistory(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.listScanHistory(dataSourceName, scanName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanRulesetsAsyncClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanRulesetsAsyncClient.java new file mode 100644 index 000000000000..2f692cd218a6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanRulesetsAsyncClient.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.ScanRulesetsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class, isAsync = true) +public final class ScanRulesetsAsyncClient { + @Generated + private final ScanRulesetsImpl serviceClient; + + /** + * Initializes an instance of ScanRulesetsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ScanRulesetsAsyncClient(ScanRulesetsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a scan ruleset. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan ruleset along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String scanRulesetName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(scanRulesetName, requestOptions); + } + + /** + * Creates or Updates a scan ruleset. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponse(String scanRulesetName, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponseAsync(scanRulesetName, requestOptions); + } + + /** + * Deletes a scan ruleset. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(String scanRulesetName, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseAsync(scanRulesetName, requestOptions); + } + + /** + * List scan rulesets in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAll(RequestOptions requestOptions) { + return this.serviceClient.listAllAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanRulesetsClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanRulesetsClient.java new file mode 100644 index 000000000000..f47d11a6a5fb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScanRulesetsClient.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.ScanRulesetsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class) +public final class ScanRulesetsClient { + @Generated + private final ScanRulesetsImpl serviceClient; + + /** + * Initializes an instance of ScanRulesetsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ScanRulesetsClient(ScanRulesetsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a scan ruleset. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan ruleset along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String scanRulesetName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(scanRulesetName, requestOptions); + } + + /** + * Creates or Updates a scan ruleset. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String scanRulesetName, RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponse(scanRulesetName, requestOptions); + } + + /** + * Deletes a scan ruleset. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String scanRulesetName, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponse(scanRulesetName, requestOptions); + } + + /** + * List scan rulesets in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + return this.serviceClient.listAll(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScansAsyncClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScansAsyncClient.java new file mode 100644 index 000000000000..cd8046b2d4cc --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScansAsyncClient.java @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.ScansImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class, isAsync = true) +public final class ScansAsyncClient { + @Generated + private final ScansImpl serviceClient; + + /** + * Initializes an instance of ScansAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ScansAsyncClient(ScansImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates an instance of a scan. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponse(String dataSourceName, String scanName, + BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponseAsync(dataSourceName, scanName, body, requestOptions); + } + + /** + * Gets a scan information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan information along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(dataSourceName, scanName, requestOptions); + } + + /** + * Deletes the scan associated with the data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseAsync(dataSourceName, scanName, requestOptions); + } + + /** + * List scans in data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDataSource(String dataSourceName, RequestOptions requestOptions) { + return this.serviceClient.listByDataSourceAsync(dataSourceName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScansClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScansClient.java new file mode 100644 index 000000000000..6a6f5e30cb74 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/ScansClient.java @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.ScansImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class) +public final class ScansClient { + @Generated + private final ScansImpl serviceClient; + + /** + * Initializes an instance of ScansClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ScansClient(ScansImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates an instance of a scan. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String dataSourceName, String scanName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateWithResponse(dataSourceName, scanName, body, requestOptions); + } + + /** + * Gets a scan information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan information along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String dataSourceName, String scanName, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(dataSourceName, scanName, requestOptions); + } + + /** + * Deletes the scan associated with the data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponse(dataSourceName, scanName, requestOptions); + } + + /** + * List scans in data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDataSource(String dataSourceName, RequestOptions requestOptions) { + return this.serviceClient.listByDataSource(dataSourceName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/SystemScanRulesetsAsyncClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/SystemScanRulesetsAsyncClient.java new file mode 100644 index 000000000000..8bb761b00168 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/SystemScanRulesetsAsyncClient.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.SystemScanRulesetsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class, isAsync = true) +public final class SystemScanRulesetsAsyncClient { + @Generated + private final SystemScanRulesetsImpl serviceClient; + + /** + * Initializes an instance of SystemScanRulesetsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SystemScanRulesetsAsyncClient(SystemScanRulesetsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List all system scan rulesets for an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAll(RequestOptions requestOptions) { + return this.serviceClient.listAllAsync(requestOptions); + } + + /** + * Get a system scan ruleset for a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceType The dataSourceType parameter. Allowed values: "None", "AzureSubscription", + * "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", "AmazonAccount", + * "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", "AzureSqlDatabase", + * "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", "AzureSqlDatabaseManagedInstance", + * "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", "SapS4Hana", "SapEcc", "PowerBI". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a system scan ruleset for a data source along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String dataSourceType, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(dataSourceType, requestOptions); + } + + /** + * Get a scan ruleset by version. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param version The version parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan ruleset by version along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByVersionWithResponse(int version, RequestOptions requestOptions) { + return this.serviceClient.getByVersionWithResponseAsync(version, requestOptions); + } + + /** + * Get the latest version of a system scan ruleset. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the latest version of a system scan ruleset along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLatestWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getLatestWithResponseAsync(requestOptions); + } + + /** + * List system scan ruleset versions in Data catalog. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listVersionsByDataSource(RequestOptions requestOptions) { + return this.serviceClient.listVersionsByDataSourceAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/SystemScanRulesetsClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/SystemScanRulesetsClient.java new file mode 100644 index 000000000000..9939ab8d72c0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/SystemScanRulesetsClient.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.SystemScanRulesetsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class) +public final class SystemScanRulesetsClient { + @Generated + private final SystemScanRulesetsImpl serviceClient; + + /** + * Initializes an instance of SystemScanRulesetsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SystemScanRulesetsClient(SystemScanRulesetsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List all system scan rulesets for an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + return this.serviceClient.listAll(requestOptions); + } + + /** + * Get a system scan ruleset for a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceType The dataSourceType parameter. Allowed values: "None", "AzureSubscription", + * "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", "AmazonAccount", + * "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", "AzureSqlDatabase", + * "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", "AzureSqlDatabaseManagedInstance", + * "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", "SapS4Hana", "SapEcc", "PowerBI". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a system scan ruleset for a data source along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String dataSourceType, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(dataSourceType, requestOptions); + } + + /** + * Get a scan ruleset by version. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param version The version parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan ruleset by version along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByVersionWithResponse(int version, RequestOptions requestOptions) { + return this.serviceClient.getByVersionWithResponse(version, requestOptions); + } + + /** + * Get the latest version of a system scan ruleset. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the latest version of a system scan ruleset along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLatestWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getLatestWithResponse(requestOptions); + } + + /** + * List system scan ruleset versions in Data catalog. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVersionsByDataSource(RequestOptions requestOptions) { + return this.serviceClient.listVersionsByDataSource(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/TriggersAsyncClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/TriggersAsyncClient.java new file mode 100644 index 000000000000..10181e2c5aa8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/TriggersAsyncClient.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.TriggersImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class, isAsync = true) +public final class TriggersAsyncClient { + @Generated + private final TriggersImpl serviceClient; + + /** + * Initializes an instance of TriggersAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + TriggersAsyncClient(TriggersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets trigger information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return trigger information along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTriggerWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.getTriggerWithResponseAsync(dataSourceName, scanName, requestOptions); + } + + /** + * Creates an instance of a trigger. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createTriggerWithResponse(String dataSourceName, String scanName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createTriggerWithResponseAsync(dataSourceName, scanName, body, requestOptions); + } + + /** + * Deletes the trigger associated with the scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteTriggerWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.deleteTriggerWithResponseAsync(dataSourceName, scanName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/TriggersClient.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/TriggersClient.java new file mode 100644 index 000000000000..815bbc1092e9 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/TriggersClient.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning; + +import com.azure.analytics.purview.scanning.implementation.TriggersImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewScanningClient type. + */ +@ServiceClient(builder = PurviewScanningClientBuilder.class) +public final class TriggersClient { + @Generated + private final TriggersImpl serviceClient; + + /** + * Initializes an instance of TriggersClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + TriggersClient(TriggersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets trigger information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return trigger information along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTriggerWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.getTriggerWithResponse(dataSourceName, scanName, requestOptions); + } + + /** + * Creates an instance of a trigger. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createTriggerWithResponse(String dataSourceName, String scanName, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createTriggerWithResponse(dataSourceName, scanName, body, requestOptions); + } + + /** + * Deletes the trigger associated with the scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteTriggerWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + return this.serviceClient.deleteTriggerWithResponse(dataSourceName, scanName, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ClassificationRulesImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ClassificationRulesImpl.java new file mode 100644 index 000000000000..dab2983ccf99 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ClassificationRulesImpl.java @@ -0,0 +1,982 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ClassificationRules. + */ +public final class ClassificationRulesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ClassificationRulesService service; + + /** + * The service client containing this operation class. + */ + private final PurviewScanningClientImpl client; + + /** + * Initializes an instance of ClassificationRulesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ClassificationRulesImpl(PurviewScanningClientImpl client) { + this.service = RestProxy.create(ClassificationRulesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewScanningClientClassificationRules to be used by the proxy + * service to perform REST calls. + */ + @Host("{Endpoint}") + @ServiceInterface(name = "PurviewScanningClientClassificationRules") + public interface ClassificationRulesService { + @Get("/classificationrules/{classificationRuleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/classificationrules/{classificationRuleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/classificationrules/{classificationRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdate(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/classificationrules/{classificationRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateSync(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/classificationrules/{classificationRuleName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> delete(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/classificationrules/{classificationRuleName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteSync(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/classificationrules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAll(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/classificationrules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllSync(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/classificationrules/{classificationRuleName}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listVersionsByClassificationRuleName(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/classificationrules/{classificationRuleName}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listVersionsByClassificationRuleNameSync(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> tagClassificationVersion(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @PathParam("classificationRuleVersion") int classificationRuleVersion, @QueryParam("action") String action, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response tagClassificationVersionSync(@HostParam("Endpoint") String endpoint, + @PathParam("classificationRuleName") String classificationRuleName, + @PathParam("classificationRuleVersion") int classificationRuleVersion, @QueryParam("action") String action, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listVersionsByClassificationRuleNameNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listVersionsByClassificationRuleNameNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a classification rule along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String classificationRuleName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), classificationRuleName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a classification rule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String classificationRuleName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), classificationRuleName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Creates or Updates a classification rule. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String classificationRuleName, + RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), classificationRuleName, + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, context)); + } + + /** + * Creates or Updates a classification rule. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String classificationRuleName, + RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return service.createOrUpdateSync(this.client.getEndpoint(), classificationRuleName, + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, Context.NONE); + } + + /** + * Deletes a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String classificationRuleName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), classificationRuleName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String classificationRuleName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), classificationRuleName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * List classification rules in Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAll(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List classification rules in Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listAllSinglePageAsync(requestOptions), + nextLink -> listAllNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List classification rules in Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listAllSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List classification rules in Account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listAllSinglePage(requestOptions), + nextLink -> listAllNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Lists the rule versions of a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVersionsByClassificationRuleNameSinglePageAsync( + String classificationRuleName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVersionsByClassificationRuleName(this.client.getEndpoint(), + classificationRuleName, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Lists the rule versions of a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listVersionsByClassificationRuleNameAsync(String classificationRuleName, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>( + () -> listVersionsByClassificationRuleNameSinglePageAsync(classificationRuleName, requestOptions), + nextLink -> listVersionsByClassificationRuleNameNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Lists the rule versions of a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listVersionsByClassificationRuleNameSinglePage(String classificationRuleName, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listVersionsByClassificationRuleNameSync(this.client.getEndpoint(), + classificationRuleName, this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Lists the rule versions of a classification rule. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVersionsByClassificationRuleName(String classificationRuleName, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>( + () -> listVersionsByClassificationRuleNameSinglePage(classificationRuleName, requestOptions), + nextLink -> listVersionsByClassificationRuleNameNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Sets Classification Action on a specific classification rule version. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param classificationRuleVersion The classificationRuleVersion parameter. + * @param action The action parameter. Allowed values: "Keep", "Delete". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> tagClassificationVersionWithResponseAsync(String classificationRuleName, + int classificationRuleVersion, String action, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.tagClassificationVersion(this.client.getEndpoint(), + classificationRuleName, classificationRuleVersion, action, this.client.getServiceVersion().getVersion(), + accept, requestOptions, context)); + } + + /** + * Sets Classification Action on a specific classification rule version. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param classificationRuleName The classificationRuleName parameter. + * @param classificationRuleVersion The classificationRuleVersion parameter. + * @param action The action parameter. Allowed values: "Keep", "Delete". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response tagClassificationVersionWithResponse(String classificationRuleName, + int classificationRuleVersion, String action, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.tagClassificationVersionSync(this.client.getEndpoint(), classificationRuleName, + classificationRuleVersion, action, this.client.getServiceVersion().getVersion(), accept, requestOptions, + Context.NONE); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVersionsByClassificationRuleNameNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVersionsByClassificationRuleNameNext(nextLink, + this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(System/Custom) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listVersionsByClassificationRuleNameNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listVersionsByClassificationRuleNameNextSync(nextLink, + this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/DataSourcesImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/DataSourcesImpl.java new file mode 100644 index 000000000000..7eaf0dc58d13 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/DataSourcesImpl.java @@ -0,0 +1,1354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DataSources. + */ +public final class DataSourcesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final DataSourcesService service; + + /** + * The service client containing this operation class. + */ + private final PurviewScanningClientImpl client; + + /** + * Initializes an instance of DataSourcesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DataSourcesImpl(PurviewScanningClientImpl client) { + this.service + = RestProxy.create(DataSourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewScanningClientDataSources to be used by the proxy service to + * perform REST calls. + */ + @Host("{Endpoint}") + @ServiceInterface(name = "PurviewScanningClientDataSources") + public interface DataSourcesService { + @Put("/datasources/{dataSourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdate(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/datasources/{dataSourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/datasources/{dataSourceName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> delete(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/datasources/{dataSourceName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/datasources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAll(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/datasources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllSync(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Creates or Updates a data source. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String dataSourceName, + RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), dataSourceName, + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, context)); + } + + /** + * Creates or Updates a data source. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String dataSourceName, RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return service.createOrUpdateSync(this.client.getEndpoint(), dataSourceName, + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, Context.NONE); + } + + /** + * Get a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a data source along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String dataSourceName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), dataSourceName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a data source along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String dataSourceName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), dataSourceName, this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Deletes a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String dataSourceName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), dataSourceName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String dataSourceName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), dataSourceName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * List data sources in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAll(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List data sources in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listAllSinglePageAsync(requestOptions), + nextLink -> listAllNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List data sources in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listAllSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List data sources in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listAllSinglePage(requestOptions), + nextLink -> listAllNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     *     scans (Optional): [
      +     *          (Optional){
      +     *             id: String (Optional)
      +     *             name: String (Optional)
      +     *             kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *             scanResults (Optional): [
      +     *                  (Optional){
      +     *                     parentId: String (Optional)
      +     *                     id: String (Optional)
      +     *                     resourceId: String (Optional)
      +     *                     status: String (Optional)
      +     *                     assetsDiscovered: Long (Optional)
      +     *                     assetsClassified: Long (Optional)
      +     *                     diagnostics (Optional): {
      +     *                         notifications (Optional): [
      +     *                              (Optional){
      +     *                                 message: String (Optional)
      +     *                                 code: Integer (Optional)
      +     *                             }
      +     *                         ]
      +     *                         exceptionCountMap (Optional): {
      +     *                             String: int (Required)
      +     *                         }
      +     *                     }
      +     *                     startTime: OffsetDateTime (Optional)
      +     *                     queuedTime: OffsetDateTime (Optional)
      +     *                     pipelineStartTime: OffsetDateTime (Optional)
      +     *                     endTime: OffsetDateTime (Optional)
      +     *                     scanRulesetVersion: Integer (Optional)
      +     *                     scanRulesetType: String(Custom/System) (Optional)
      +     *                     scanLevelType: String(Full/Incremental) (Optional)
      +     *                     errorMessage: String (Optional)
      +     *                     error (Optional): {
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                              (Optional){
      +     *                                 code: String (Optional)
      +     *                                 message: String (Optional)
      +     *                                 target: String (Optional)
      +     *                                 details (Optional): [
      +     *                                     (recursive schema, see above)
      +     *                                 ]
      +     *                             }
      +     *                         ]
      +     *                     }
      +     *                     runType: String (Optional)
      +     *                     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *                 }
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/FiltersImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/FiltersImpl.java new file mode 100644 index 000000000000..dc15605d0837 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/FiltersImpl.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Filters. + */ +public final class FiltersImpl { + /** + * The proxy service used to perform REST calls. + */ + private final FiltersService service; + + /** + * The service client containing this operation class. + */ + private final PurviewScanningClientImpl client; + + /** + * Initializes an instance of FiltersImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FiltersImpl(PurviewScanningClientImpl client) { + this.service = RestProxy.create(FiltersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewScanningClientFilters to be used by the proxy service to + * perform REST calls. + */ + @Host("{Endpoint}") + @ServiceInterface(name = "PurviewScanningClientFilters") + public interface FiltersService { + @Get("/datasources/{dataSourceName}/scans/{scanName}/filters/custom") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}/scans/{scanName}/filters/custom") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/datasources/{dataSourceName}/scans/{scanName}/filters/custom") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdate(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/datasources/{dataSourceName}/scans/{scanName}/filters/custom") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + } + + /** + * Get a filter. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a filter along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a filter. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a filter along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String dataSourceName, String scanName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Creates or updates a filter. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), dataSourceName, + scanName, this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, context)); + } + + /** + * Creates or updates a filter. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         excludeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *         includeUriPrefixes (Optional): [
      +     *             String (Optional)
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return service.createOrUpdateSync(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, Context.NONE); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/KeyVaultConnectionsImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/KeyVaultConnectionsImpl.java new file mode 100644 index 000000000000..37b085bf69b9 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/KeyVaultConnectionsImpl.java @@ -0,0 +1,631 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in KeyVaultConnections. + */ +public final class KeyVaultConnectionsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final KeyVaultConnectionsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewScanningClientImpl client; + + /** + * Initializes an instance of KeyVaultConnectionsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KeyVaultConnectionsImpl(PurviewScanningClientImpl client) { + this.service = RestProxy.create(KeyVaultConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewScanningClientKeyVaultConnections to be used by the proxy + * service to perform REST calls. + */ + @Host("{Endpoint}") + @ServiceInterface(name = "PurviewScanningClientKeyVaultConnections") + public interface KeyVaultConnectionsService { + @Get("/azureKeyVaults/{keyVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("Endpoint") String endpoint, + @PathParam("keyVaultName") String keyVaultName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/azureKeyVaults/{keyVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("Endpoint") String endpoint, + @PathParam("keyVaultName") String keyVaultName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/azureKeyVaults/{keyVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> create(@HostParam("Endpoint") String endpoint, + @PathParam("keyVaultName") String keyVaultName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData body, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/azureKeyVaults/{keyVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createSync(@HostParam("Endpoint") String endpoint, + @PathParam("keyVaultName") String keyVaultName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData body, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/azureKeyVaults/{keyVaultName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> delete(@HostParam("Endpoint") String endpoint, + @PathParam("keyVaultName") String keyVaultName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/azureKeyVaults/{keyVaultName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteSync(@HostParam("Endpoint") String endpoint, + @PathParam("keyVaultName") String keyVaultName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/azureKeyVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAll(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/azureKeyVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllSync(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Gets key vault information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return key vault information along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String keyVaultName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), keyVaultName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets key vault information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return key vault information along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String keyVaultName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), keyVaultName, this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Creates an instance of a key vault connection. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponseAsync(String keyVaultName, BinaryData body, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), keyVaultName, + this.client.getServiceVersion().getVersion(), body, accept, requestOptions, context)); + } + + /** + * Creates an instance of a key vault connection. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String keyVaultName, BinaryData body, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), keyVaultName, this.client.getServiceVersion().getVersion(), + body, accept, requestOptions, Context.NONE); + } + + /** + * Deletes the key vault connection associated with the account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String keyVaultName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), keyVaultName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes the key vault connection associated with the account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param keyVaultName The keyVaultName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String keyVaultName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), keyVaultName, this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * List key vault connections in account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAll(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List key vault connections in account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listAllSinglePageAsync(requestOptions), + nextLink -> listAllNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List key vault connections in account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listAllSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List key vault connections in account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listAllSinglePage(requestOptions), + nextLink -> listAllNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         baseUrl: String (Optional)
      +     *         description: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/PurviewScanningClientImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/PurviewScanningClientImpl.java new file mode 100644 index 000000000000..f1dd8d7711ab --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/PurviewScanningClientImpl.java @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the PurviewScanningClient type. + */ +public final class PurviewScanningClientImpl { + /** + * The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. + */ + private final String endpoint; + + /** + * Gets The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final PurviewScanningServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The KeyVaultConnectionsImpl object to access its operations. + */ + private final KeyVaultConnectionsImpl keyVaultConnections; + + /** + * Gets the KeyVaultConnectionsImpl object to access its operations. + * + * @return the KeyVaultConnectionsImpl object. + */ + public KeyVaultConnectionsImpl getKeyVaultConnections() { + return this.keyVaultConnections; + } + + /** + * The ClassificationRulesImpl object to access its operations. + */ + private final ClassificationRulesImpl classificationRules; + + /** + * Gets the ClassificationRulesImpl object to access its operations. + * + * @return the ClassificationRulesImpl object. + */ + public ClassificationRulesImpl getClassificationRules() { + return this.classificationRules; + } + + /** + * The DataSourcesImpl object to access its operations. + */ + private final DataSourcesImpl dataSources; + + /** + * Gets the DataSourcesImpl object to access its operations. + * + * @return the DataSourcesImpl object. + */ + public DataSourcesImpl getDataSources() { + return this.dataSources; + } + + /** + * The FiltersImpl object to access its operations. + */ + private final FiltersImpl filters; + + /** + * Gets the FiltersImpl object to access its operations. + * + * @return the FiltersImpl object. + */ + public FiltersImpl getFilters() { + return this.filters; + } + + /** + * The ScansImpl object to access its operations. + */ + private final ScansImpl scans; + + /** + * Gets the ScansImpl object to access its operations. + * + * @return the ScansImpl object. + */ + public ScansImpl getScans() { + return this.scans; + } + + /** + * The ScanResultsImpl object to access its operations. + */ + private final ScanResultsImpl scanResults; + + /** + * Gets the ScanResultsImpl object to access its operations. + * + * @return the ScanResultsImpl object. + */ + public ScanResultsImpl getScanResults() { + return this.scanResults; + } + + /** + * The ScanRulesetsImpl object to access its operations. + */ + private final ScanRulesetsImpl scanRulesets; + + /** + * Gets the ScanRulesetsImpl object to access its operations. + * + * @return the ScanRulesetsImpl object. + */ + public ScanRulesetsImpl getScanRulesets() { + return this.scanRulesets; + } + + /** + * The SystemScanRulesetsImpl object to access its operations. + */ + private final SystemScanRulesetsImpl systemScanRulesets; + + /** + * Gets the SystemScanRulesetsImpl object to access its operations. + * + * @return the SystemScanRulesetsImpl object. + */ + public SystemScanRulesetsImpl getSystemScanRulesets() { + return this.systemScanRulesets; + } + + /** + * The TriggersImpl object to access its operations. + */ + private final TriggersImpl triggers; + + /** + * Gets the TriggersImpl object to access its operations. + * + * @return the TriggersImpl object. + */ + public TriggersImpl getTriggers() { + return this.triggers; + } + + /** + * Initializes an instance of PurviewScanningClient client. + * + * @param endpoint The scanning endpoint of your purview account. Example: + * https://{accountName}.scan.purview.azure.com. + * @param serviceVersion Service version. + */ + public PurviewScanningClientImpl(String endpoint, PurviewScanningServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewScanningClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The scanning endpoint of your purview account. Example: + * https://{accountName}.scan.purview.azure.com. + * @param serviceVersion Service version. + */ + public PurviewScanningClientImpl(HttpPipeline httpPipeline, String endpoint, + PurviewScanningServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewScanningClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The scanning endpoint of your purview account. Example: + * https://{accountName}.scan.purview.azure.com. + * @param serviceVersion Service version. + */ + public PurviewScanningClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + PurviewScanningServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.keyVaultConnections = new KeyVaultConnectionsImpl(this); + this.classificationRules = new ClassificationRulesImpl(this); + this.dataSources = new DataSourcesImpl(this); + this.filters = new FiltersImpl(this); + this.scans = new ScansImpl(this); + this.scanResults = new ScanResultsImpl(this); + this.scanRulesets = new ScanRulesetsImpl(this); + this.systemScanRulesets = new SystemScanRulesetsImpl(this); + this.triggers = new TriggersImpl(this); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScanResultsImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScanResultsImpl.java new file mode 100644 index 000000000000..3e8b111b22d2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScanResultsImpl.java @@ -0,0 +1,825 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ScanResults. + */ +public final class ScanResultsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ScanResultsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewScanningClientImpl client; + + /** + * Initializes an instance of ScanResultsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScanResultsImpl(PurviewScanningClientImpl client) { + this.service + = RestProxy.create(ScanResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewScanningClientScanResults to be used by the proxy service to + * perform REST calls. + */ + @Host("{Endpoint}") + @ServiceInterface(name = "PurviewScanningClientScanResults") + public interface ScanResultsService { + @Put("/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> runScan(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @PathParam("runId") String runId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response runScanSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @PathParam("runId") String runId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}/:cancel") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> cancelScan(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @PathParam("runId") String runId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}/:cancel") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response cancelScanSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @PathParam("runId") String runId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}/scans/{scanName}/runs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listScanHistory(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}/scans/{scanName}/runs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listScanHistorySync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listScanHistoryNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listScanHistoryNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Runs the scan. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      scanLevelStringNoThe scanLevel parameter. Allowed values: "Full", + * "Incremental".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param runId The runId parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> runScanWithResponseAsync(String dataSourceName, String scanName, String runId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.runScan(this.client.getEndpoint(), dataSourceName, scanName, + runId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Runs the scan. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      scanLevelStringNoThe scanLevel parameter. Allowed values: "Full", + * "Incremental".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param runId The runId parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response runScanWithResponse(String dataSourceName, String scanName, String runId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.runScanSync(this.client.getEndpoint(), dataSourceName, scanName, runId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Cancels a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param runId The runId parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelScanWithResponseAsync(String dataSourceName, String scanName, String runId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.cancelScan(this.client.getEndpoint(), dataSourceName, scanName, + runId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Cancels a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     scanResultId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled) (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param runId The runId parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelScanWithResponse(String dataSourceName, String scanName, String runId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.cancelScanSync(this.client.getEndpoint(), dataSourceName, scanName, runId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Lists the scan history of a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentId: String (Optional)
      +     *     id: String (Optional)
      +     *     resourceId: String (Optional)
      +     *     status: String (Optional)
      +     *     assetsDiscovered: Long (Optional)
      +     *     assetsClassified: Long (Optional)
      +     *     diagnostics (Optional): {
      +     *         notifications (Optional): [
      +     *              (Optional){
      +     *                 message: String (Optional)
      +     *                 code: Integer (Optional)
      +     *             }
      +     *         ]
      +     *         exceptionCountMap (Optional): {
      +     *             String: int (Required)
      +     *         }
      +     *     }
      +     *     startTime: OffsetDateTime (Optional)
      +     *     queuedTime: OffsetDateTime (Optional)
      +     *     pipelineStartTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     scanRulesetVersion: Integer (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     scanLevelType: String(Full/Incremental) (Optional)
      +     *     errorMessage: String (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     *     runType: String (Optional)
      +     *     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listScanHistorySinglePageAsync(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listScanHistory(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Lists the scan history of a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentId: String (Optional)
      +     *     id: String (Optional)
      +     *     resourceId: String (Optional)
      +     *     status: String (Optional)
      +     *     assetsDiscovered: Long (Optional)
      +     *     assetsClassified: Long (Optional)
      +     *     diagnostics (Optional): {
      +     *         notifications (Optional): [
      +     *              (Optional){
      +     *                 message: String (Optional)
      +     *                 code: Integer (Optional)
      +     *             }
      +     *         ]
      +     *         exceptionCountMap (Optional): {
      +     *             String: int (Required)
      +     *         }
      +     *     }
      +     *     startTime: OffsetDateTime (Optional)
      +     *     queuedTime: OffsetDateTime (Optional)
      +     *     pipelineStartTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     scanRulesetVersion: Integer (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     scanLevelType: String(Full/Incremental) (Optional)
      +     *     errorMessage: String (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     *     runType: String (Optional)
      +     *     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listScanHistoryAsync(String dataSourceName, String scanName, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listScanHistorySinglePageAsync(dataSourceName, scanName, requestOptions), + nextLink -> listScanHistoryNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Lists the scan history of a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentId: String (Optional)
      +     *     id: String (Optional)
      +     *     resourceId: String (Optional)
      +     *     status: String (Optional)
      +     *     assetsDiscovered: Long (Optional)
      +     *     assetsClassified: Long (Optional)
      +     *     diagnostics (Optional): {
      +     *         notifications (Optional): [
      +     *              (Optional){
      +     *                 message: String (Optional)
      +     *                 code: Integer (Optional)
      +     *             }
      +     *         ]
      +     *         exceptionCountMap (Optional): {
      +     *             String: int (Required)
      +     *         }
      +     *     }
      +     *     startTime: OffsetDateTime (Optional)
      +     *     queuedTime: OffsetDateTime (Optional)
      +     *     pipelineStartTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     scanRulesetVersion: Integer (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     scanLevelType: String(Full/Incremental) (Optional)
      +     *     errorMessage: String (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     *     runType: String (Optional)
      +     *     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listScanHistorySinglePage(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listScanHistorySync(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Lists the scan history of a scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentId: String (Optional)
      +     *     id: String (Optional)
      +     *     resourceId: String (Optional)
      +     *     status: String (Optional)
      +     *     assetsDiscovered: Long (Optional)
      +     *     assetsClassified: Long (Optional)
      +     *     diagnostics (Optional): {
      +     *         notifications (Optional): [
      +     *              (Optional){
      +     *                 message: String (Optional)
      +     *                 code: Integer (Optional)
      +     *             }
      +     *         ]
      +     *         exceptionCountMap (Optional): {
      +     *             String: int (Required)
      +     *         }
      +     *     }
      +     *     startTime: OffsetDateTime (Optional)
      +     *     queuedTime: OffsetDateTime (Optional)
      +     *     pipelineStartTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     scanRulesetVersion: Integer (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     scanLevelType: String(Full/Incremental) (Optional)
      +     *     errorMessage: String (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     *     runType: String (Optional)
      +     *     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listScanHistory(String dataSourceName, String scanName, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listScanHistorySinglePage(dataSourceName, scanName, requestOptions), + nextLink -> listScanHistoryNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentId: String (Optional)
      +     *     id: String (Optional)
      +     *     resourceId: String (Optional)
      +     *     status: String (Optional)
      +     *     assetsDiscovered: Long (Optional)
      +     *     assetsClassified: Long (Optional)
      +     *     diagnostics (Optional): {
      +     *         notifications (Optional): [
      +     *              (Optional){
      +     *                 message: String (Optional)
      +     *                 code: Integer (Optional)
      +     *             }
      +     *         ]
      +     *         exceptionCountMap (Optional): {
      +     *             String: int (Required)
      +     *         }
      +     *     }
      +     *     startTime: OffsetDateTime (Optional)
      +     *     queuedTime: OffsetDateTime (Optional)
      +     *     pipelineStartTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     scanRulesetVersion: Integer (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     scanLevelType: String(Full/Incremental) (Optional)
      +     *     errorMessage: String (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     *     runType: String (Optional)
      +     *     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listScanHistoryNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listScanHistoryNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     parentId: String (Optional)
      +     *     id: String (Optional)
      +     *     resourceId: String (Optional)
      +     *     status: String (Optional)
      +     *     assetsDiscovered: Long (Optional)
      +     *     assetsClassified: Long (Optional)
      +     *     diagnostics (Optional): {
      +     *         notifications (Optional): [
      +     *              (Optional){
      +     *                 message: String (Optional)
      +     *                 code: Integer (Optional)
      +     *             }
      +     *         ]
      +     *         exceptionCountMap (Optional): {
      +     *             String: int (Required)
      +     *         }
      +     *     }
      +     *     startTime: OffsetDateTime (Optional)
      +     *     queuedTime: OffsetDateTime (Optional)
      +     *     pipelineStartTime: OffsetDateTime (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     scanRulesetVersion: Integer (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     scanLevelType: String(Full/Incremental) (Optional)
      +     *     errorMessage: String (Optional)
      +     *     error (Optional): {
      +     *         code: String (Optional)
      +     *         message: String (Optional)
      +     *         target: String (Optional)
      +     *         details (Optional): [
      +     *              (Optional){
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                     (recursive schema, see above)
      +     *                 ]
      +     *             }
      +     *         ]
      +     *     }
      +     *     runType: String (Optional)
      +     *     dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listScanHistoryNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listScanHistoryNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScanRulesetsImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScanRulesetsImpl.java new file mode 100644 index 000000000000..11fa70a010ab --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScanRulesetsImpl.java @@ -0,0 +1,654 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ScanRulesets. + */ +public final class ScanRulesetsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ScanRulesetsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewScanningClientImpl client; + + /** + * Initializes an instance of ScanRulesetsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScanRulesetsImpl(PurviewScanningClientImpl client) { + this.service + = RestProxy.create(ScanRulesetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewScanningClientScanRulesets to be used by the proxy service to + * perform REST calls. + */ + @Host("{Endpoint}") + @ServiceInterface(name = "PurviewScanningClientScanRulesets") + public interface ScanRulesetsService { + @Get("/scanrulesets/{scanRulesetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("Endpoint") String endpoint, + @PathParam("scanRulesetName") String scanRulesetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/scanrulesets/{scanRulesetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("Endpoint") String endpoint, + @PathParam("scanRulesetName") String scanRulesetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/scanrulesets/{scanRulesetName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdate(@HostParam("Endpoint") String endpoint, + @PathParam("scanRulesetName") String scanRulesetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/scanrulesets/{scanRulesetName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateSync(@HostParam("Endpoint") String endpoint, + @PathParam("scanRulesetName") String scanRulesetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/scanrulesets/{scanRulesetName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> delete(@HostParam("Endpoint") String endpoint, + @PathParam("scanRulesetName") String scanRulesetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/scanrulesets/{scanRulesetName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteSync(@HostParam("Endpoint") String endpoint, + @PathParam("scanRulesetName") String scanRulesetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/scanrulesets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAll(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/scanrulesets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllSync(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Get a scan ruleset. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan ruleset along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String scanRulesetName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), scanRulesetName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a scan ruleset. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan ruleset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String scanRulesetName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), scanRulesetName, this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Creates or Updates a scan ruleset. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String scanRulesetName, + RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), scanRulesetName, + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, context)); + } + + /** + * Creates or Updates a scan ruleset. + *

      Header Parameters

      + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      Content-TypeStringNoThe content type. Allowed values: + * "application/json".
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String scanRulesetName, RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/json"); + } + }); + return service.createOrUpdateSync(this.client.getEndpoint(), scanRulesetName, + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, Context.NONE); + } + + /** + * Deletes a scan ruleset. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String scanRulesetName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), scanRulesetName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a scan ruleset. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param scanRulesetName The scanRulesetName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String scanRulesetName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), scanRulesetName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * List scan rulesets in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAll(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List scan rulesets in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listAllSinglePageAsync(requestOptions), + nextLink -> listAllNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List scan rulesets in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listAllSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List scan rulesets in Data catalog. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listAllSinglePage(requestOptions), + nextLink -> listAllNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScansImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScansImpl.java new file mode 100644 index 000000000000..42412abc6414 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/ScansImpl.java @@ -0,0 +1,1251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Scans. + */ +public final class ScansImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ScansService service; + + /** + * The service client containing this operation class. + */ + private final PurviewScanningClientImpl client; + + /** + * Initializes an instance of ScansImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScansImpl(PurviewScanningClientImpl client) { + this.service = RestProxy.create(ScansService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewScanningClientScans to be used by the proxy service to perform + * REST calls. + */ + @Host("{Endpoint}") + @ServiceInterface(name = "PurviewScanningClientScans") + public interface ScansService { + @Put("/datasources/{dataSourceName}/scans/{scanName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdate(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData body, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/datasources/{dataSourceName}/scans/{scanName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData body, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}/scans/{scanName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}/scans/{scanName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/datasources/{dataSourceName}/scans/{scanName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> delete(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/datasources/{dataSourceName}/scans/{scanName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}/scans") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listByDataSource(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}/scans") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listByDataSourceSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listByDataSourceNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listByDataSourceNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Creates an instance of a scan. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String dataSourceName, String scanName, + BinaryData body, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), dataSourceName, + scanName, this.client.getServiceVersion().getVersion(), body, accept, requestOptions, context)); + } + + /** + * Creates an instance of a scan. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String dataSourceName, String scanName, BinaryData body, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), body, accept, requestOptions, Context.NONE); + } + + /** + * Gets a scan information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan information along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets a scan information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan information along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String dataSourceName, String scanName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Deletes the scan associated with the data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes the scan associated with the data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * List scans in data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDataSourceSinglePageAsync(String dataSourceName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByDataSource(this.client.getEndpoint(), dataSourceName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List scans in data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDataSourceAsync(String dataSourceName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listByDataSourceSinglePageAsync(dataSourceName, requestOptions), + nextLink -> listByDataSourceNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List scans in data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByDataSourceSinglePage(String dataSourceName, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listByDataSourceSync(this.client.getEndpoint(), dataSourceName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List scans in data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDataSource(String dataSourceName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listByDataSourceSinglePage(dataSourceName, requestOptions), + nextLink -> listByDataSourceNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDataSourceNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByDataSourceNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     kind: String(AzureSubscriptionCredential/AzureSubscriptionMsi/AzureResourceGroupCredential/AzureResourceGroupMsi/AzureSynapseWorkspaceCredential/AzureSynapseWorkspaceMsi/AzureSynapseCredential/AzureSynapseMsi/AdlsGen1Credential/AdlsGen1Msi/AdlsGen2Credential/AdlsGen2Msi/AmazonAccountCredential/AmazonS3Credential/AmazonS3RoleARN/AmazonSqlCredential/AzureCosmosDbCredential/AzureDataExplorerCredential/AzureDataExplorerMsi/AzureFileServiceCredential/AzureSqlDatabaseCredential/AzureSqlDatabaseMsi/AmazonPostgreSqlCredential/AzurePostgreSqlCredential/SqlServerDatabaseCredential/AzureSqlDatabaseManagedInstanceCredential/AzureSqlDatabaseManagedInstanceMsi/AzureSqlDataWarehouseCredential/AzureSqlDataWarehouseMsi/AzureMySqlCredential/AzureStorageCredential/AzureStorageMsi/TeradataTeradataCredential/TeradataTeradataUserPass/TeradataUserPass/OracleOracleCredential/OracleOracleUserPass/SapS4HanaSapS4HanaCredential/SapS4HanaSapS4HanaUserPass/SapEccSapEccCredential/SapEccSapEccUserPass/PowerBIDelegated/PowerBIMsi) (Required)
      +     *     scanResults (Optional): [
      +     *          (Optional){
      +     *             parentId: String (Optional)
      +     *             id: String (Optional)
      +     *             resourceId: String (Optional)
      +     *             status: String (Optional)
      +     *             assetsDiscovered: Long (Optional)
      +     *             assetsClassified: Long (Optional)
      +     *             diagnostics (Optional): {
      +     *                 notifications (Optional): [
      +     *                      (Optional){
      +     *                         message: String (Optional)
      +     *                         code: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *                 exceptionCountMap (Optional): {
      +     *                     String: int (Required)
      +     *                 }
      +     *             }
      +     *             startTime: OffsetDateTime (Optional)
      +     *             queuedTime: OffsetDateTime (Optional)
      +     *             pipelineStartTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             scanRulesetVersion: Integer (Optional)
      +     *             scanRulesetType: String(Custom/System) (Optional)
      +     *             scanLevelType: String(Full/Incremental) (Optional)
      +     *             errorMessage: String (Optional)
      +     *             error (Optional): {
      +     *                 code: String (Optional)
      +     *                 message: String (Optional)
      +     *                 target: String (Optional)
      +     *                 details (Optional): [
      +     *                      (Optional){
      +     *                         code: String (Optional)
      +     *                         message: String (Optional)
      +     *                         target: String (Optional)
      +     *                         details (Optional): [
      +     *                             (recursive schema, see above)
      +     *                         ]
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             runType: String (Optional)
      +     *             dataSourceType: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByDataSourceNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listByDataSourceNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/SystemScanRulesetsImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/SystemScanRulesetsImpl.java new file mode 100644 index 000000000000..aa423e057636 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/SystemScanRulesetsImpl.java @@ -0,0 +1,940 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SystemScanRulesets. + */ +public final class SystemScanRulesetsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final SystemScanRulesetsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewScanningClientImpl client; + + /** + * Initializes an instance of SystemScanRulesetsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SystemScanRulesetsImpl(PurviewScanningClientImpl client) { + this.service = RestProxy.create(SystemScanRulesetsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewScanningClientSystemScanRulesets to be used by the proxy + * service to perform REST calls. + */ + @Host("{Endpoint}") + @ServiceInterface(name = "PurviewScanningClientSystemScanRulesets") + public interface SystemScanRulesetsService { + @Get("/systemScanRulesets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAll(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/systemScanRulesets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllSync(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/systemScanRulesets/datasources/{dataSourceType}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceType") String dataSourceType, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/systemScanRulesets/datasources/{dataSourceType}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceType") String dataSourceType, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/systemScanRulesets/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getByVersion(@HostParam("Endpoint") String endpoint, + @PathParam("version") int version, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/systemScanRulesets/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getByVersionSync(@HostParam("Endpoint") String endpoint, @PathParam("version") int version, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/systemScanRulesets/versions/latest") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getLatest(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/systemScanRulesets/versions/latest") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getLatestSync(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/systemScanRulesets/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listVersionsByDataSource(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/systemScanRulesets/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listVersionsByDataSourceSync(@HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listVersionsByDataSourceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listVersionsByDataSourceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * List all system scan rulesets for an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAll(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List all system scan rulesets for an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAllAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listAllSinglePageAsync(requestOptions), + nextLink -> listAllNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List all system scan rulesets for an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listAllSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List all system scan rulesets for an account. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listAllSinglePage(requestOptions), + nextLink -> listAllNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a system scan ruleset for a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceType The dataSourceType parameter. Allowed values: "None", "AzureSubscription", + * "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", "AmazonAccount", + * "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", "AzureSqlDatabase", + * "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", "AzureSqlDatabaseManagedInstance", + * "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", "SapS4Hana", "SapEcc", "PowerBI". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a system scan ruleset for a data source along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String dataSourceType, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), dataSourceType, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a system scan ruleset for a data source. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceType The dataSourceType parameter. Allowed values: "None", "AzureSubscription", + * "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", "AmazonAccount", + * "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", "AzureSqlDatabase", + * "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", "AzureSqlDatabaseManagedInstance", + * "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", "SapS4Hana", "SapEcc", "PowerBI". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a system scan ruleset for a data source along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String dataSourceType, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), dataSourceType, this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Get a scan ruleset by version. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param version The version parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan ruleset by version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByVersionWithResponseAsync(int version, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getByVersion(this.client.getEndpoint(), version, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a scan ruleset by version. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param version The version parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a scan ruleset by version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByVersionWithResponse(int version, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getByVersionSync(this.client.getEndpoint(), version, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Get the latest version of a system scan ruleset. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the latest version of a system scan ruleset along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLatestWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getLatest(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get the latest version of a system scan ruleset. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the latest version of a system scan ruleset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLatestWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getLatestSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } + + /** + * List system scan ruleset versions in Data catalog. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVersionsByDataSourceSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVersionsByDataSource(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List system scan ruleset versions in Data catalog. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listVersionsByDataSourceAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listVersionsByDataSourceSinglePageAsync(requestOptions), + nextLink -> listVersionsByDataSourceNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List system scan ruleset versions in Data catalog. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listVersionsByDataSourceSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listVersionsByDataSourceSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List system scan ruleset versions in Data catalog. + *

      Query Parameters

      + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      dataSourceTypeStringNoThe dataSourceType parameter. Allowed values: "None", + * "AzureSubscription", "AzureResourceGroup", "AzureSynapseWorkspace", "AzureSynapse", "AdlsGen1", "AdlsGen2", + * "AmazonAccount", "AmazonS3", "AmazonSql", "AzureCosmosDb", "AzureDataExplorer", "AzureFileService", + * "AzureSqlDatabase", "AmazonPostgreSql", "AzurePostgreSql", "SqlServerDatabase", + * "AzureSqlDatabaseManagedInstance", "AzureSqlDataWarehouse", "AzureMySql", "AzureStorage", "Teradata", "Oracle", + * "SapS4Hana", "SapEcc", "PowerBI".
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVersionsByDataSource(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listVersionsByDataSourceSinglePage(requestOptions), + nextLink -> listVersionsByDataSourceNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVersionsByDataSourceNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVersionsByDataSourceNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     scanRulesetType: String(Custom/System) (Optional)
      +     *     status: String(Enabled/Disabled) (Optional)
      +     *     version: Integer (Optional)
      +     *     kind: String(None/AzureSubscription/AzureResourceGroup/AzureSynapseWorkspace/AzureSynapse/AdlsGen1/AdlsGen2/AmazonAccount/AmazonS3/AmazonSql/AzureCosmosDb/AzureDataExplorer/AzureFileService/AzureSqlDatabase/AmazonPostgreSql/AzurePostgreSql/SqlServerDatabase/AzureSqlDatabaseManagedInstance/AzureSqlDataWarehouse/AzureMySql/AzureStorage/Teradata/Oracle/SapS4Hana/SapEcc/PowerBI) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listVersionsByDataSourceNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listVersionsByDataSourceNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/TriggersImpl.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/TriggersImpl.java new file mode 100644 index 000000000000..77394b465ed2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/TriggersImpl.java @@ -0,0 +1,672 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.implementation; + +import com.azure.analytics.purview.scanning.PurviewScanningServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Triggers. + */ +public final class TriggersImpl { + /** + * The proxy service used to perform REST calls. + */ + private final TriggersService service; + + /** + * The service client containing this operation class. + */ + private final PurviewScanningClientImpl client; + + /** + * Initializes an instance of TriggersImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TriggersImpl(PurviewScanningClientImpl client) { + this.service = RestProxy.create(TriggersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewScanningServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewScanningClientTriggers to be used by the proxy service to + * perform REST calls. + */ + @Host("{Endpoint}") + @ServiceInterface(name = "PurviewScanningClientTriggers") + public interface TriggersService { + @Get("/datasources/{dataSourceName}/scans/{scanName}/triggers/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getTrigger(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/datasources/{dataSourceName}/scans/{scanName}/triggers/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTriggerSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/datasources/{dataSourceName}/scans/{scanName}/triggers/default") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createTrigger(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData body, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/datasources/{dataSourceName}/scans/{scanName}/triggers/default") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createTriggerSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData body, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/datasources/{dataSourceName}/scans/{scanName}/triggers/default") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteTrigger(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/datasources/{dataSourceName}/scans/{scanName}/triggers/default") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteTriggerSync(@HostParam("Endpoint") String endpoint, + @PathParam("dataSourceName") String dataSourceName, @PathParam("scanName") String scanName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + } + + /** + * Gets trigger information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return trigger information along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTriggerWithResponseAsync(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getTrigger(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Gets trigger information. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return trigger information along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTriggerWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getTriggerSync(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Creates an instance of a trigger. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createTriggerWithResponseAsync(String dataSourceName, String scanName, + BinaryData body, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createTrigger(this.client.getEndpoint(), dataSourceName, + scanName, this.client.getServiceVersion().getVersion(), body, accept, requestOptions, context)); + } + + /** + * Creates an instance of a trigger. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createTriggerWithResponse(String dataSourceName, String scanName, BinaryData body, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createTriggerSync(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), body, accept, requestOptions, Context.NONE); + } + + /** + * Deletes the trigger associated with the scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteTriggerWithResponseAsync(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.deleteTrigger(this.client.getEndpoint(), dataSourceName, + scanName, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes the trigger associated with the scan. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     name: String (Optional)
      +     *     properties (Optional): {
      +     *         recurrence (Optional): {
      +     *             frequency: String(Week/Month) (Optional)
      +     *             interval: Integer (Optional)
      +     *             startTime: OffsetDateTime (Optional)
      +     *             endTime: OffsetDateTime (Optional)
      +     *             schedule (Optional): {
      +     *                 additionalProperties (Optional): {
      +     *                     String: Object (Required)
      +     *                 }
      +     *                 minutes (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 hours (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 weekDays (Optional): [
      +     *                     String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                 ]
      +     *                 monthDays (Optional): [
      +     *                     int (Optional)
      +     *                 ]
      +     *                 monthlyOccurrences (Optional): [
      +     *                      (Optional){
      +     *                         additionalProperties (Optional): {
      +     *                             String: Object (Required)
      +     *                         }
      +     *                         day: String(Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday) (Optional)
      +     *                         occurrence: Integer (Optional)
      +     *                     }
      +     *                 ]
      +     *             }
      +     *             timeZone: String (Optional)
      +     *         }
      +     *         recurrenceInterval: String (Optional)
      +     *         createdAt: OffsetDateTime (Optional)
      +     *         lastModifiedAt: OffsetDateTime (Optional)
      +     *         lastScheduled: OffsetDateTime (Optional)
      +     *         scanLevel: String(Full/Incremental) (Optional)
      +     *         incrementalScanStartTime: OffsetDateTime (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param dataSourceName The dataSourceName parameter. + * @param scanName The scanName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteTriggerWithResponse(String dataSourceName, String scanName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteTriggerSync(this.client.getEndpoint(), dataSourceName, scanName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/package-info.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/package-info.java new file mode 100644 index 000000000000..dbef553059f3 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for PurviewScanningClient. + * Creates a Microsoft.Scanning management client. + */ +package com.azure.analytics.purview.scanning.implementation; diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/package-info.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/package-info.java new file mode 100644 index 000000000000..b0e5a3bf0308 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/com/azure/analytics/purview/scanning/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for PurviewScanningClient. + * Creates a Microsoft.Scanning management client. + */ +package com.azure.analytics.purview.scanning; diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/java/module-info.java b/sdk/purview/azure-analytics-purview-scanning/src/main/java/module-info.java new file mode 100644 index 000000000000..8e5f0bd97388 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/java/module-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.analytics.purview.scanning { + requires transitive com.azure.core; + + exports com.azure.analytics.purview.scanning; +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/main/resources/azure-analytics-purview-scanning.properties b/sdk/purview/azure-analytics-purview-scanning/src/main/resources/azure-analytics-purview-scanning.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/main/resources/azure-analytics-purview-scanning.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/README.md b/sdk/purview/azure-analytics-purview-scanning/src/samples/README.md new file mode 100644 index 000000000000..9a022de3559f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/README.md @@ -0,0 +1,51 @@ +--- +page_type: sample +languages: + - java +products: + - azure +urlFragment: purview-scanning-java-samples +--- + +# Azure Purview Scanning client library samples for Java + +Azure Purview Scanning samples are a set of self-contained Java programs that demonstrate interacting with Azure self-contained service using the client library. Each sample focuses on a specific scenario and can be executed independently. + +## Key concepts + +Key concepts are explained in detail [here][SDK_README_KEY_CONCEPTS]. + +## Getting started + +Getting started explained in detail [here][SDK_README_GETTING_STARTED]. + +## Examples + +The following sections provide code samples covering common scenario operations with the Azure Purview Scanning client library. + +All of these samples need the endpoint to your Purview Scanning resource, and your Purview Scanning API key. + +|**File Name**|**Description**| +|----------------|-------------| +|[ListAllSystemScanRulesets.java][list_all_system_scan_rulesets]|List all system scan rulesets| + +## Troubleshooting + +Troubleshooting steps can be found [here][SDK_README_TROUBLESHOOTING]. + +## Next steps + +See [Next steps][SDK_README_NEXT_STEPS]. + +## Contributing + +If you would like to become an active contributor to this project please refer to our [Contribution Guidelines][SDK_README_CONTRIBUTING] for more information. + + + + + + + + + \ No newline at end of file diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/ListAllSystemScanRulesets.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/ListAllSystemScanRulesets.java new file mode 100644 index 000000000000..178a8286b581 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/ListAllSystemScanRulesets.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.scanning; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.json.models.JsonObject; +import com.azure.json.models.JsonString; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * Sample for listing all system scan rulesets using the SystemScanRulesetsClient. + */ +public class ListAllSystemScanRulesets { + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + */ + public static void main(final String[] args) { + SystemScanRulesetsClient client = new PurviewScanningClientBuilder() + .endpoint(System.getenv("SCANNING_ENDPOINT")) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildSystemScanRulesetsClient(); + + PagedIterable response = client.listAll(null); + List list = response.stream().collect(Collectors.toList()); + + System.out.println(list.size()); + + for (BinaryData systemScanRuleSet : list) { + JsonObject ruleset = systemScanRuleSet.toObject(JsonObject.class); + System.out.println(((JsonString) ruleset.getProperty("name")).getValue() + ": " + + ((JsonString) ruleset.getProperty("status")).getValue()); + } + + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/ReadmeSamples.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/ReadmeSamples.java new file mode 100644 index 000000000000..72b92d7ccc09 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/ReadmeSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.scanning; + +import com.azure.identity.DefaultAzureCredentialBuilder; + +/** + * Code samples for the README.md + */ +public class ReadmeSamples { + /** + * Sample for creating low level client. + */ + public void createClient() { + // BEGIN: readme-sample-createSystemScanRulesetsClient + SystemScanRulesetsClient client = new PurviewScanningClientBuilder() + .endpoint(System.getenv("SCANNING_ENDPOINT")) + .credential(new DefaultAzureCredentialBuilder().build()) + .buildSystemScanRulesetsClient(); + // END: readme-sample-createSystemScanRulesetsClient + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesCreateOrUpdate.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesCreateOrUpdate.java new file mode 100644 index 000000000000..d62e724896b5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesCreateOrUpdate.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.ClassificationRulesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ClassificationRulesCreateOrUpdate { + public static void main(String[] args) { + ClassificationRulesClient classificationRulesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClassificationRulesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.classification-rules-create-or-update.classification-rules-create-or-update + RequestOptions requestOptions = new RequestOptions().setBody(BinaryData.fromString( + "{\"kind\":\"Custom\",\"properties\":{\"description\":\"Let's put a cool desc here\",\"classificationName\":\"MICROSOFT.FINANCIAL.AUSTRALIA.BANK_ACCOUNT_NUMBER\",\"columnPatterns\":[{\"kind\":\"Regex\",\"pattern\":\"^data$\"}],\"dataPatterns\":[{\"kind\":\"Regex\",\"pattern\":\"^[0-9]{2}-[0-9]{4}-[0-9]{6}-[0-9]{3}$\"}],\"minimumPercentageMatch\":60,\"ruleStatus\":\"Enabled\"}}")); + Response response + = classificationRulesClient.createOrUpdateWithResponse("ClassificationRule1", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.classification-rules-create-or-update.classification-rules-create-or-update + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesDelete.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesDelete.java new file mode 100644 index 000000000000..7f8f9a5f92f5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesDelete.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.ClassificationRulesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ClassificationRulesDelete { + public static void main(String[] args) { + ClassificationRulesClient classificationRulesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClassificationRulesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.classification-rules-delete.classification-rules-delete + RequestOptions requestOptions = new RequestOptions(); + Response response + = classificationRulesClient.deleteWithResponse("ClassificationRule1", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.classification-rules-delete.classification-rules-delete + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesGet.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesGet.java new file mode 100644 index 000000000000..b404630e0166 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesGet.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.ClassificationRulesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ClassificationRulesGet { + public static void main(String[] args) { + ClassificationRulesClient classificationRulesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClassificationRulesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.classification-rules-get.classification-rules-get + RequestOptions requestOptions = new RequestOptions(); + Response response + = classificationRulesClient.getWithResponse("ClassificationRule1", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.classification-rules-get.classification-rules-get + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesListAll.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesListAll.java new file mode 100644 index 000000000000..2c79c5b21f21 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesListAll.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.ClassificationRulesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ClassificationRulesListAll { + public static void main(String[] args) { + ClassificationRulesClient classificationRulesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClassificationRulesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.classification-rules-list-all.classification-rules-list-all + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = classificationRulesClient.listAll(requestOptions); + // END:com.azure.analytics.purview.scanning.generated.classification-rules-list-all.classification-rules-list-all + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesListVersionsByClassificationRuleName.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesListVersionsByClassificationRuleName.java new file mode 100644 index 000000000000..2490749a4dc3 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesListVersionsByClassificationRuleName.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.ClassificationRulesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ClassificationRulesListVersionsByClassificationRuleName { + public static void main(String[] args) { + ClassificationRulesClient classificationRulesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClassificationRulesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.classification-rules-list-versions-by-classification-rule-name.classification-rules-list-versions-by-classification-rule-name + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response + = classificationRulesClient.listVersionsByClassificationRuleName("ClassificationRule1", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.classification-rules-list-versions-by-classification-rule-name.classification-rules-list-versions-by-classification-rule-name + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesTagClassificationVersion.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesTagClassificationVersion.java new file mode 100644 index 000000000000..eaccc9bc2704 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ClassificationRulesTagClassificationVersion.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.ClassificationRulesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ClassificationRulesTagClassificationVersion { + public static void main(String[] args) { + ClassificationRulesClient classificationRulesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildClassificationRulesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.classification-rules-tag-classification-version.classification-rules-tag-classification-version + RequestOptions requestOptions = new RequestOptions(); + Response response = classificationRulesClient + .tagClassificationVersionWithResponse("ClassificationRule1", 3, "Keep", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.classification-rules-tag-classification-version.classification-rules-tag-classification-version + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesCreateOrUpdate.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesCreateOrUpdate.java new file mode 100644 index 000000000000..660fff400b94 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesCreateOrUpdate.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.DataSourcesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DataSourcesCreateOrUpdate { + public static void main(String[] args) { + DataSourcesClient dataSourcesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDataSourcesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.data-sources-create-or-update.data-sources-create-or-update + RequestOptions requestOptions = new RequestOptions().setBody(BinaryData.fromString( + "{\"kind\":\"AzureStorage\",\"properties\":{\"collection\":{\"type\":\"CollectionReference\",\"referenceName\":\"Collection-rZX\"},\"endpoint\":\"https://azurestorage.core.windows.net/\"}}")); + Response response = dataSourcesClient.createOrUpdateWithResponse("myDataSource", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.data-sources-create-or-update.data-sources-create-or-update + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesDelete.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesDelete.java new file mode 100644 index 000000000000..be2cc9d21eb5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesDelete.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.DataSourcesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DataSourcesDelete { + public static void main(String[] args) { + DataSourcesClient dataSourcesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDataSourcesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.data-sources-delete.data-sources-delete + RequestOptions requestOptions = new RequestOptions(); + Response response = dataSourcesClient.deleteWithResponse("myDataSource", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.data-sources-delete.data-sources-delete + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesGet.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesGet.java new file mode 100644 index 000000000000..e0982262d033 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesGet.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.DataSourcesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DataSourcesGet { + public static void main(String[] args) { + DataSourcesClient dataSourcesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDataSourcesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.data-sources-get.data-sources-get + RequestOptions requestOptions = new RequestOptions(); + Response response = dataSourcesClient.getWithResponse("myDataSource", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.data-sources-get.data-sources-get + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesListAll.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesListAll.java new file mode 100644 index 000000000000..906cdd7f0b8f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/DataSourcesListAll.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.DataSourcesClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class DataSourcesListAll { + public static void main(String[] args) { + DataSourcesClient dataSourcesClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDataSourcesClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.data-sources-list-all.data-sources-list-all + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = dataSourcesClient.listAll(requestOptions); + // END:com.azure.analytics.purview.scanning.generated.data-sources-list-all.data-sources-list-all + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/FiltersCreateOrUpdate.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/FiltersCreateOrUpdate.java new file mode 100644 index 000000000000..4a63caac4d87 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/FiltersCreateOrUpdate.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.FiltersClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class FiltersCreateOrUpdate { + public static void main(String[] args) { + FiltersClient filtersClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildFiltersClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.filters-create-or-update.filters-create-or-update + RequestOptions requestOptions = new RequestOptions().setBody(BinaryData.fromString( + "{\"properties\":{\"excludeUriPrefixes\":[\"https://foo.file.core.windows.net/share1/user/temp\"],\"includeUriPrefixes\":[\"https://foo.file.core.windows.net/share1/user\",\"https://foo.file.core.windows.net/share1/aggregated\"]}}")); + Response response + = filtersClient.createOrUpdateWithResponse("DataSource1", "Scan1", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.filters-create-or-update.filters-create-or-update + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/FiltersGet.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/FiltersGet.java new file mode 100644 index 000000000000..7879a29fc0fb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/FiltersGet.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.FiltersClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class FiltersGet { + public static void main(String[] args) { + FiltersClient filtersClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildFiltersClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.filters-get.filters-get + RequestOptions requestOptions = new RequestOptions(); + Response response = filtersClient.getWithResponse("myDataSource", "myScanName", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.filters-get.filters-get + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsCreate.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsCreate.java new file mode 100644 index 000000000000..b7dafdcf5aee --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsCreate.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.KeyVaultConnectionsClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class KeyVaultConnectionsCreate { + public static void main(String[] args) { + KeyVaultConnectionsClient keyVaultConnectionsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildKeyVaultConnectionsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.key-vault-connections-create.key-vault-connections-create + BinaryData body = BinaryData.fromString( + "{\"properties\":{\"description\":\"This is a Key Vault\",\"baseUrl\":\"https://babylon-sample-kv.vault.azure.net/\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = keyVaultConnectionsClient.createWithResponse("KeyVault1", body, requestOptions); + // END:com.azure.analytics.purview.scanning.generated.key-vault-connections-create.key-vault-connections-create + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsDelete.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsDelete.java new file mode 100644 index 000000000000..b85daf857095 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsDelete.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.KeyVaultConnectionsClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class KeyVaultConnectionsDelete { + public static void main(String[] args) { + KeyVaultConnectionsClient keyVaultConnectionsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildKeyVaultConnectionsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.key-vault-connections-delete.key-vault-connections-delete + RequestOptions requestOptions = new RequestOptions(); + Response response = keyVaultConnectionsClient.deleteWithResponse("KeyVault1", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.key-vault-connections-delete.key-vault-connections-delete + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsGet.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsGet.java new file mode 100644 index 000000000000..516e73f95339 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsGet.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.KeyVaultConnectionsClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class KeyVaultConnectionsGet { + public static void main(String[] args) { + KeyVaultConnectionsClient keyVaultConnectionsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildKeyVaultConnectionsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.key-vault-connections-get.key-vault-connections-get + RequestOptions requestOptions = new RequestOptions(); + Response response = keyVaultConnectionsClient.getWithResponse("KeyVault1", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.key-vault-connections-get.key-vault-connections-get + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsListAll.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsListAll.java new file mode 100644 index 000000000000..990efe41e442 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/KeyVaultConnectionsListAll.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.KeyVaultConnectionsClient; +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class KeyVaultConnectionsListAll { + public static void main(String[] args) { + KeyVaultConnectionsClient keyVaultConnectionsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildKeyVaultConnectionsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.key-vault-connections-list-all.key-vault-connections-list-all + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = keyVaultConnectionsClient.listAll(requestOptions); + // END:com.azure.analytics.purview.scanning.generated.key-vault-connections-list-all.key-vault-connections-list-all + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultCancelScan.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultCancelScan.java new file mode 100644 index 000000000000..bc032b84bf68 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultCancelScan.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScanResultClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScanResultCancelScan { + public static void main(String[] args) { + ScanResultClient scanResultClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScanResultClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scan-result-cancel-scan.scan-result-cancel-scan + RequestOptions requestOptions = new RequestOptions(); + Response response = scanResultClient.cancelScanWithResponse("myDataSource", "myScanName", + "138301e4-f4f9-4ab5-b734-bac446b236e7", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scan-result-cancel-scan.scan-result-cancel-scan + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultListScanHistory.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultListScanHistory.java new file mode 100644 index 000000000000..efaf905467df --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultListScanHistory.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScanResultClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScanResultListScanHistory { + public static void main(String[] args) { + ScanResultClient scanResultClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScanResultClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scan-result-list-scan-history.scan-result-list-scan-history + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = scanResultClient.listScanHistory("DataSource1", "scan1", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scan-result-list-scan-history.scan-result-list-scan-history + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultRunScan.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultRunScan.java new file mode 100644 index 000000000000..5c5669bf448f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanResultRunScan.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScanResultClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScanResultRunScan { + public static void main(String[] args) { + ScanResultClient scanResultClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScanResultClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scan-result-run-scan.scan-result-run-scan + RequestOptions requestOptions = new RequestOptions().addQueryParam("scanLevel", "Full"); + Response response = scanResultClient.runScanWithResponse("testDataSourceName", "scan1", + "138301e4-f4f9-4ab5-b734-bac446b236e7", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scan-result-run-scan.scan-result-run-scan + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsCreateOrUpdate.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsCreateOrUpdate.java new file mode 100644 index 000000000000..f5803b49ba86 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsCreateOrUpdate.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScanRulesetsClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScanRulesetsCreateOrUpdate { + public static void main(String[] args) { + ScanRulesetsClient scanRulesetsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScanRulesetsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scan-rulesets-create-or-update.scan-rulesets-create-or-update + RequestOptions requestOptions = new RequestOptions().setBody(BinaryData.fromString( + "{\"kind\":\"AzureStorage\",\"properties\":{\"description\":null,\"excludedSystemClassifications\":[\"MICROSOFT.FINANCIAL.AUSTRALIA.BANK_ACCOUNT_NUMBER\",\"MICROSOFT.MISCELLANEOUS.IPADDRESS\"],\"includedCustomClassificationRuleNames\":[\"BF_PII\",\"Dummy_Rule2\"],\"scanningRule\":{\"customFileExtensions\":[{\"description\":\"model file type\",\"customFileType\":{\"builtInType\":null,\"customDelimiter\":\"$\"},\"enabled\":true,\"fileExtension\":\".model\"},{\"description\":\"mdoel1 type\",\"customFileType\":{\"builtInType\":\"JSON\",\"customDelimiter\":null},\"enabled\":true,\"fileExtension\":\".model1\"}],\"fileExtensions\":[\"CSV\",\"JSON\",\"PSV\",\"SSV\",\"TSV\",\"TXT\",\"XML\",\"PARQUET\"]}},\"scanRulesetType\":\"Custom\"}")); + Response response + = scanRulesetsClient.createOrUpdateWithResponse("nyScanRulesetName", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scan-rulesets-create-or-update.scan-rulesets-create-or-update + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsDelete.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsDelete.java new file mode 100644 index 000000000000..6281bbd1fef6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsDelete.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScanRulesetsClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScanRulesetsDelete { + public static void main(String[] args) { + ScanRulesetsClient scanRulesetsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScanRulesetsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scan-rulesets-delete.scan-rulesets-delete + RequestOptions requestOptions = new RequestOptions(); + Response response = scanRulesetsClient.deleteWithResponse("myRuleSetName", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scan-rulesets-delete.scan-rulesets-delete + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsGet.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsGet.java new file mode 100644 index 000000000000..447783261bd1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsGet.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScanRulesetsClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScanRulesetsGet { + public static void main(String[] args) { + ScanRulesetsClient scanRulesetsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScanRulesetsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scan-rulesets-get.scan-rulesets-get + RequestOptions requestOptions = new RequestOptions(); + Response response = scanRulesetsClient.getWithResponse("myRuleSetName", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scan-rulesets-get.scan-rulesets-get + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsListAll.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsListAll.java new file mode 100644 index 000000000000..24235c2d987d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScanRulesetsListAll.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScanRulesetsClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScanRulesetsListAll { + public static void main(String[] args) { + ScanRulesetsClient scanRulesetsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScanRulesetsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scan-rulesets-list-all.scan-rulesets-list-all + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = scanRulesetsClient.listAll(requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scan-rulesets-list-all.scan-rulesets-list-all + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansCreateOrUpdate.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansCreateOrUpdate.java new file mode 100644 index 000000000000..5217c8f0c294 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansCreateOrUpdate.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScansClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScansCreateOrUpdate { + public static void main(String[] args) { + ScansClient scansClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScansClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scans-create-or-update.scans-create-or-update + BinaryData body = BinaryData.fromString( + "{\"kind\":\"AzureStorageCredential\",\"properties\":{\"collection\":{\"type\":\"CollectionReference\",\"referenceName\":\"Collection-rZX\"},\"connectedVia\":null,\"credential\":{\"credentialType\":\"AccountKey\",\"referenceName\":\"CredentialAKV\"},\"scanRulesetName\":\"AzureStorage\",\"scanRulesetType\":\"System\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = scansClient.createOrUpdateWithResponse("myDataSource", "myScanName", body, requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scans-create-or-update.scans-create-or-update + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansDelete.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansDelete.java new file mode 100644 index 000000000000..5afdc1a577b2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansDelete.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScansClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScansDelete { + public static void main(String[] args) { + ScansClient scansClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScansClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scans-delete.scans-delete + RequestOptions requestOptions = new RequestOptions(); + Response response = scansClient.deleteWithResponse("myDataSource", "myScanName", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scans-delete.scans-delete + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansGet.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansGet.java new file mode 100644 index 000000000000..667d9ac0d17a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansGet.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScansClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScansGet { + public static void main(String[] args) { + ScansClient scansClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScansClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scans-get.scans-get + RequestOptions requestOptions = new RequestOptions(); + Response response = scansClient.getWithResponse("myDataSource", "myScanName", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scans-get.scans-get + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansListByDataSource.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansListByDataSource.java new file mode 100644 index 000000000000..f7057c2db301 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/ScansListByDataSource.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.ScansClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ScansListByDataSource { + public static void main(String[] args) { + ScansClient scansClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildScansClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.scans-list-by-data-source.scans-list-by-data-source + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = scansClient.listByDataSource("myDataSource", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.scans-list-by-data-source.scans-list-by-data-source + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGet.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGet.java new file mode 100644 index 000000000000..6ce9cd1210b0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGet.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.SystemScanRulesetsClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SystemScanRulesetsGet { + public static void main(String[] args) { + SystemScanRulesetsClient systemScanRulesetsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildSystemScanRulesetsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-get.system-scan-rulesets-get + RequestOptions requestOptions = new RequestOptions(); + Response response = systemScanRulesetsClient.getWithResponse("AzureStorage", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-get.system-scan-rulesets-get + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGetByVersion.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGetByVersion.java new file mode 100644 index 000000000000..43f2a50b69d9 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGetByVersion.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.SystemScanRulesetsClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SystemScanRulesetsGetByVersion { + public static void main(String[] args) { + SystemScanRulesetsClient systemScanRulesetsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildSystemScanRulesetsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-get-by-version.system-scan-rulesets-get-by-version + RequestOptions requestOptions = new RequestOptions().addQueryParam("dataSourceType", "AzureStorage"); + Response response = systemScanRulesetsClient.getByVersionWithResponse(1, requestOptions); + // END:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-get-by-version.system-scan-rulesets-get-by-version + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGetLatest.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGetLatest.java new file mode 100644 index 000000000000..3873eb232ffa --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsGetLatest.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.SystemScanRulesetsClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SystemScanRulesetsGetLatest { + public static void main(String[] args) { + SystemScanRulesetsClient systemScanRulesetsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildSystemScanRulesetsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-get-latest.system-scan-rulesets-get-latest + RequestOptions requestOptions = new RequestOptions().addQueryParam("dataSourceType", "AzureStorage"); + Response response = systemScanRulesetsClient.getLatestWithResponse(requestOptions); + // END:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-get-latest.system-scan-rulesets-get-latest + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsListAll.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsListAll.java new file mode 100644 index 000000000000..f0d97a5cb72e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsListAll.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.SystemScanRulesetsClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SystemScanRulesetsListAll { + public static void main(String[] args) { + SystemScanRulesetsClient systemScanRulesetsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildSystemScanRulesetsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-list-all.system-scan-rulesets-list-all + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = systemScanRulesetsClient.listAll(requestOptions); + // END:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-list-all.system-scan-rulesets-list-all + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsListVersionsByDataSource.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsListVersionsByDataSource.java new file mode 100644 index 000000000000..10d54467b08d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/SystemScanRulesetsListVersionsByDataSource.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.SystemScanRulesetsClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SystemScanRulesetsListVersionsByDataSource { + public static void main(String[] args) { + SystemScanRulesetsClient systemScanRulesetsClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildSystemScanRulesetsClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-list-versions-by-data-source.system-scan-rulesets-list-versions-by-data-source + RequestOptions requestOptions = new RequestOptions().addQueryParam("dataSourceType", "AzureStorage"); + PagedIterable response = systemScanRulesetsClient.listVersionsByDataSource(requestOptions); + // END:com.azure.analytics.purview.scanning.generated.system-scan-rulesets-list-versions-by-data-source.system-scan-rulesets-list-versions-by-data-source + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersCreateTrigger.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersCreateTrigger.java new file mode 100644 index 000000000000..471f154adff5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersCreateTrigger.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.TriggersClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TriggersCreateTrigger { + public static void main(String[] args) { + TriggersClient triggersClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTriggersClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.triggers-create-trigger.triggers-create-trigger + BinaryData body = BinaryData.fromString( + "{\"properties\":{\"recurrence\":{\"endTime\":\"2021-02-25T00:00:00.000Z\",\"frequency\":\"Month\",\"interval\":1,\"schedule\":{\"hours\":[23],\"minutes\":[56],\"monthDays\":[10]},\"startTime\":\"2021-02-12T14:59:00.416Z\"},\"recurrenceInterval\":null,\"scanLevel\":\"Incremental\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = triggersClient.createTriggerWithResponse("DataSource1", "Scan1", body, requestOptions); + // END:com.azure.analytics.purview.scanning.generated.triggers-create-trigger.triggers-create-trigger + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersDeleteTrigger.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersDeleteTrigger.java new file mode 100644 index 000000000000..5fa03c1f3315 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersDeleteTrigger.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.TriggersClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TriggersDeleteTrigger { + public static void main(String[] args) { + TriggersClient triggersClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTriggersClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.triggers-delete-trigger.triggers-delete-trigger + RequestOptions requestOptions = new RequestOptions(); + Response response + = triggersClient.deleteTriggerWithResponse("DataSource1", "Scan1", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.triggers-delete-trigger.triggers-delete-trigger + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersGetTrigger.java b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersGetTrigger.java new file mode 100644 index 000000000000..66a4519474a9 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/samples/java/com/azure/analytics/purview/scanning/generated/TriggersGetTrigger.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.scanning.generated; + +import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder; +import com.azure.analytics.purview.scanning.TriggersClient; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TriggersGetTrigger { + public static void main(String[] args) { + TriggersClient triggersClient + = new PurviewScanningClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTriggersClient(); + // BEGIN:com.azure.analytics.purview.scanning.generated.triggers-get-trigger.triggers-get-trigger + RequestOptions requestOptions = new RequestOptions(); + Response response + = triggersClient.getTriggerWithResponse("myDataSourceName", "myScanName", requestOptions); + // END:com.azure.analytics.purview.scanning.generated.triggers-get-trigger.triggers-get-trigger + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/test/java/com/azure/analytics/purview/scanning/PurviewScanningClientTestBase.java b/sdk/purview/azure-analytics-purview-scanning/src/test/java/com/azure/analytics/purview/scanning/PurviewScanningClientTestBase.java new file mode 100644 index 000000000000..23c8c34dde00 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/test/java/com/azure/analytics/purview/scanning/PurviewScanningClientTestBase.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.scanning; + +import com.azure.core.http.HttpClient; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +import java.util.Objects; + +public class PurviewScanningClientTestBase extends TestProxyTestBase { + + protected String getEndpoint() { + String endpoint = interceptorManager.isPlaybackMode() + ? "https://localhost:8080/scan" + : Configuration.getGlobalConfiguration().get("SCANNING_ENDPOINT"); + Objects.requireNonNull(endpoint); + return endpoint; + } + + PurviewScanningClientBuilder builderSetUp() { + PurviewScanningClientBuilder builder = new PurviewScanningClientBuilder(); + if (interceptorManager.isPlaybackMode()) { + builder.httpClient(interceptorManager.getPlaybackClient()).credential(new MockTokenCredential()); + } else { + builder.httpClient(HttpClient.createDefault()).credential(new DefaultAzureCredentialBuilder().build()); + } + + if (interceptorManager.isRecordMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + + builder.endpoint(getEndpoint()); + + return Objects.requireNonNull(builder); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/src/test/java/com/azure/analytics/purview/scanning/SystemScanRulesetsClientTests.java b/sdk/purview/azure-analytics-purview-scanning/src/test/java/com/azure/analytics/purview/scanning/SystemScanRulesetsClientTests.java new file mode 100644 index 000000000000..8c6e56b377ea --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/src/test/java/com/azure/analytics/purview/scanning/SystemScanRulesetsClientTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.scanning; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Test; + +import java.util.List; +import java.util.stream.Collectors; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class SystemScanRulesetsClientTests extends PurviewScanningClientTestBase { + private SystemScanRulesetsClient client; + + @Override + protected void beforeTest() { + client = builderSetUp().buildSystemScanRulesetsClient(); + } + + @Test + public void testListAll() { + PagedIterable response = client.listAll(null); + List list = response.stream().collect(Collectors.toList()); + + assertTrue(list.size() > 0); + } +} diff --git a/sdk/purview/azure-analytics-purview-scanning/swagger/README.md b/sdk/purview/azure-analytics-purview-scanning/swagger/README.md new file mode 100644 index 000000000000..ed9b2d880f4c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-scanning/swagger/README.md @@ -0,0 +1,22 @@ +## Generate autorest code +``` yaml +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.Scanning/preview/2018-12-01-preview/scanningService.json +java: true +use: '@autorest/java@4.1.62' +output-folder: ../ +namespace: com.azure.analytics.purview.scanning +sync-methods: all +license-header: MICROSOFT_MIT_SMALL +data-plane: true +credential-types: tokencredential +credential-scopes: https://purview.azure.net/.default +title: PurviewScanningClient +artifact-id: azure-analytics-purview-scanning +service-name: PurviewScanning +service-versions: + - 2018-12-01-preview +generate-client-as-impl: true +generate-sync-async-clients: true +generate-samples: true +generate-builder-per-client: false +``` diff --git a/sdk/purview/azure-analytics-purview-sharing/CHANGELOG.md b/sdk/purview/azure-analytics-purview-sharing/CHANGELOG.md new file mode 100644 index 000000000000..b1e25aa7cf81 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/CHANGELOG.md @@ -0,0 +1,31 @@ +# Release History + +## 1.0.0-beta.3 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.2 (2023-06-12) + +### Features Added + +- Added the new share resource capability that allows listing resources associated with sent and received shares. + +### Breaking Changes + +- Renamed all client method starting with getAll to start with list. + +### Other Changes + +- Reverted internal sync stack changes until enhancement is released. + +## 1.0.0-beta.1 (2023-03-06) + +### New Features + +- Initial release of the Microsoft Purview Share client library for Java diff --git a/sdk/purview/azure-analytics-purview-sharing/README.md b/sdk/purview/azure-analytics-purview-sharing/README.md new file mode 100644 index 000000000000..b3c8ae3b53d8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/README.md @@ -0,0 +1,417 @@ +# Azure Purview Sharing client library for Java + +Microsoft Purview Data Sharing allows data to be shared in-place from Azure Data Lake Storage Gen2 and Azure Storage accounts, both within and across organizations. + +Data providers may use Microsoft Purview Data Sharing to share their data directly with other users and partners (known as data consumers) without data duplication, while centrally managing their sharing activities from within Microsoft Purview. + +For data consumers, Microsoft Purview Data Sharing provides near real-time access to data shared with them by a provider. + +Key capabilities delivered by Microsoft Purview Data Sharing include: +- Share data within the organization or with partners and customers outside of the organization (within the same Azure tenant or across different Azure tenants). +- Share data from ADLS Gen2 or Blob storage in-place without data duplication. +- Share data with multiple recipients. +- Access shared data in near real time. +- Manage sharing relationships and keep track of who the data is shared with/from, for each ADLSGen2 or Blob Storage account. +- Terminate share access at any time. +- Flexible experience through Microsoft Purview governance portal or via REST APIs. + +**Please visit the following resources to learn more about this product.** + +[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][docs] | [Product Documentation][share_product_documentation] | [Samples][samples_code] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] +- An existing Microsoft Purview account. + +For more information about creating a Microsoft Purview account, see [here][create_azure_purview_account]. + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] +- [Product documentation][share_product_documentation] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure:azure-analytics-purview-sharing;current}) +```xml + + com.azure + azure-analytics-purview-sharing + 1.0.0-beta.3 + +``` +[//]: # ({x-version-update-end}) + +### Authentication + +[Azure Identity][azure_identity] package provides the default implementation for authenticating the client. + +## Key concepts + +__Data Provider:__ A data provider is the individual who creates a share by selecting a data source, choosing which files and folders to share, and who to share them with. Microsoft Purview then sends an invitation to each data consumer. + +__Data Consumer:__ A data consumer is the individual who accepts the invitation by specifying a target storage account in their own Azure subscription that they'll use to access the shared data. + +## Examples + +### Data Provider Examples + +The following code examples demonstrate how data providers can use the Microsoft Azure Java SDK for Purview Sharing to manage their sharing activity. + +#### Create a Sent Share Client +```java com.azure.analytics.purview.sharing.createSentShareClient +SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); +``` + +#### Create a Sent Share + +To begin sharing data, the data provider must first create a sent share that identifies the data they would like to share. + +```java com.azure.analytics.purview.sharing.createSentShare +SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +String sentShareId = UUID.randomUUID().toString(); +InPlaceSentShare sentShare = new InPlaceSentShare().setProperties( + new InPlaceSentShareProperties().setDisplayName("sample-share").setDescription("A sample share")); + +StoreReference storeReference = new StoreReference().setReferenceName( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/provider-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE); + +StorageAccountPath storageAccountPath = new StorageAccountPath().setContainerName("container-name") + .setReceiverPath("shared-file-name.txt") + .setSenderPath("original/file-name.txt"); + +List paths = new ArrayList<>(); +paths.add(storageAccountPath); + +BlobStorageArtifact artifact = new BlobStorageArtifact().setStoreReference(storeReference) + .setProperties(new BlobStorageArtifactProperties().setPaths(paths)); + +sentShare.getProperties().setArtifact(artifact); + +SyncPoller response = sentSharesClient.beginCreateOrReplaceSentShare(sentShareId, + BinaryData.fromObject(sentShare), new RequestOptions()); +``` + +#### Send a Share Invitation to a User + +After creating a sent share, the data provider can extend invitations to consumers who may then view the shared data. In this example, an invitation is extended to an individual by specifying their email address. + +```java com.azure.analytics.purview.sharing.sendUserInvitation +SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +String sentShareId = ""; +String sentShareInvitationId = UUID.randomUUID().toString(); + +UserInvitation sentShareInvitation = new UserInvitation().setProperties( + new UserInvitationProperties().setTargetEmail("receiver@microsoft.com") + .setNotify(true) + .setExpirationDate(OffsetDateTime.now().plusDays(60))); + +Response response = sentSharesClient.createSentShareInvitationWithResponse(sentShareId, + sentShareInvitationId, BinaryData.fromObject(sentShareInvitation), new RequestOptions()); +``` + +#### Send a Share Invitation to a Service + +Data providers can also extend invitations to services or applications by specifying the tenant id and object id of the service. *The object id used for sending an invitation to a service must be the object id associated with the Enterprise Application (not the application registration)*. + +```java com.azure.analytics.purview.sharing.sendServiceInvitation +SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +String sentShareId = ""; +String sentShareInvitationId = UUID.randomUUID().toString(); + +ServiceInvitation sentShareInvitation = new ServiceInvitation().setProperties(new ServiceInvitationProperties() + .setTargetActiveDirectoryId(UUID.fromString("")) + .setTargetObjectId(UUID.fromString("")) + .setExpirationDate(OffsetDateTime.now().plusDays(60))); + +Response response = sentSharesClient.createSentShareInvitationWithResponse(sentShareId, + sentShareInvitationId, BinaryData.fromObject(sentShareInvitation), new RequestOptions()); +``` + +#### Get a Sent Share + +After creating a sent share, data providers can retrieve it. + +```java com.azure.analytics.purview.sharing.getSentShare +SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +SentShare retrievedSentShare = sentSharesClient.getSentShareWithResponse("", + new RequestOptions()).getValue().toObject(SentShare.class); +``` + +#### List Sent Shares + +Data providers can also retrieve a list of the sent shares they have created. + +```java com.azure.analytics.purview.sharing.listSentShares +SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +PagedIterable sentShareResults = sentSharesClient.listSentShares( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/provider-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage", + new RequestOptions()); + +List sentShares = sentShareResults.stream() + .map(binaryData -> binaryData.toObject(SentShare.class)) + .collect(Collectors.toList()); +``` + +#### Delete a Sent Share + +A sent share can be deleted by the data provider to stop sharing their data with all data consumers. + +```java com.azure.analytics.purview.sharing.deleteSentShare +SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +sentSharesClient.beginDeleteSentShare(".purview.azure.com/share") + .buildClient(); + +String sentShareId = ""; +String sentShareInvitationId = ""; + +Response sentShareInvitation = sentSharesClient.getSentShareInvitationWithResponse(sentShareId, + sentShareInvitationId, new RequestOptions()); +``` + +#### List Sent Share Invitations + +Data providers can also retrieve a list of the sent share invitations they have created. + +```java com.azure.analytics.purview.sharing.listSentShareInvitations +SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +String sentShareId = ""; + +RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/sentAt desc"); +PagedIterable response = sentSharesClient.listSentShareInvitations(sentShareId, requestOptions); +``` + +#### Delete a Sent Share Invitation + +An individual sent share invitation can be deleted by the data provider to stop sharing their data with the specific data consumer to whom the invitation was addressed. + +```java com.azure.analytics.purview.sharing.deleteSentShareInvitation +SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +String sentShareId = ""; +String sentShareInvitationId = ""; + +sentSharesClient.beginDeleteSentShareInvitation(sentShareId, sentShareInvitationId, new RequestOptions()); +``` + +### Data Consumer Examples + +The following code examples demonstrate how data consumers can use the Microsoft Azure Java SDK for Purview Sharing to manage their sharing activity. + +#### Create a Received Share Client +```java com.azure.analytics.purview.sharing.createReceivedShareClient +ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); +``` + +#### List Detached Received Shares + +To begin viewing data shared with them, a data consumer must first retrieve a list of detached received shares. Within this list, they can identify a detached received share to attach. + +```java com.azure.analytics.purview.sharing.listDetachedReceivedShares +ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); +PagedIterable response = receivedSharesClient.listDetachedReceivedShares(requestOptions); +``` + +#### Attach a Receive Share + +Once the data consumer has identified a received share, they can attach the received share to a location where they can access the shared data. If the received share is already attached, the shared data will be made accessible at the new location specified. + +```java com.azure.analytics.purview.sharing.attachReceivedShare +ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +RequestOptions listRequestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); +PagedIterable listResponse = receivedSharesClient.listDetachedReceivedShares(listRequestOptions); + +Optional detachedReceivedShare = listResponse.stream().findFirst(); + +if (!detachedReceivedShare.isPresent()) { + return; +} + +String receivedShareId = detachedReceivedShare.map(binaryData -> binaryData.toObject(ReceivedShare.class).getId()) + .orElse(null); + +InPlaceReceivedShare receivedShare = new InPlaceReceivedShare() + .setProperties(new InPlaceReceivedShareProperties().setDisplayName("my-received-share")); + +StoreReference storeReference = new StoreReference().setReferenceName( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/consumer-storage-rg/providers/Microsoft.Storage/storageAccounts/consumerstorage") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE); + +BlobAccountSink sink = new BlobAccountSink().setStoreReference(storeReference).setProperties( + new BlobAccountSinkProperties() + .setContainerName("container-name") + .setFolder("folderName") + .setMountPath("optionalMountPath")); + +receivedShare.getProperties().setSink(sink); + +SyncPoller createResponse = receivedSharesClient.beginCreateOrReplaceReceivedShare( + receivedShareId, BinaryData.fromObject(receivedShare), new RequestOptions()); +``` + +#### Get Received Share + +A data consumer can retrieve an individual received share. + +```java com.azure.analytics.purview.sharing.getReceivedShare +ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +Response receivedShare = receivedSharesClient.getReceivedShareWithResponse("", + new RequestOptions()); +``` + +#### List Attached Received Shares + +Data consumers can also retrieve a list of their attached received shares. + +```java com.azure.analytics.purview.sharing.listAttachedReceivedShares +ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); +PagedIterable response = receivedSharesClient.listAttachedReceivedShares( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/consumer-storage-rg/providers/Microsoft.Storage/storageAccounts/consumerstorage", + requestOptions); + +Optional receivedShare = response.stream().findFirst(); + +if (!receivedShare.isPresent()) { + return; +} + +ReceivedShare receivedShareResponse = receivedShare.get().toObject(InPlaceReceivedShare.class); +``` + +#### Delete a Received Share + +A received share can be deleted by the data consumer to terminate their access to shared data. + +```java com.azure.analytics.purview.sharing.deleteReceivedShare +ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +receivedSharesClient.beginDeleteReceivedShare("", new RequestOptions()); +``` + +### Share Resource Examples + +The following code examples demonstrate how to use the Microsoft Azure Java SDK for Purview Sharing to view share resources. A share resource is the underlying resource from which a provider shares data or the destination where a consumer attaches data shared with them. + +#### List Share Resources + +A list of share resources can be retrieved to view all resources within an account where sharing activities have taken place. + +```java com.azure.analytics.purview.sharing.listShareResources +ShareResourcesClient shareResourcesClient = new ShareResourcesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + +PagedIterable shareResourceResults = shareResourcesClient.listShareResources(new RequestOptions()); + +List shareResources = shareResourceResults.stream() + .map(binaryData -> binaryData.toObject(ShareResource.class)) + .collect(Collectors.toList()); +``` + +## Troubleshooting + +### Enabling Logging + +Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite +their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help +locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). + +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request + + +[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/src +[package]: https://central.sonatype.com/artifact/com.azure/azure-analytics-purview-sharing +[share_product_documentation]: https://learn.microsoft.com/azure/purview/concept-data-share +[samples_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/src/samples/ +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[create_azure_purview_account]: https://learn.microsoft.com/azure/purview/create-catalog-portal +[logging]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/logging.md diff --git a/sdk/purview/azure-analytics-purview-sharing/assets.json b/sdk/purview/azure-analytics-purview-sharing/assets.json new file mode 100644 index 000000000000..2334bcf7c05b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/purview/azure-analytics-purview-sharing", + "Tag": "java/purview/azure-analytics-purview-sharing_a2d7d40737" +} diff --git a/sdk/purview/azure-analytics-purview-sharing/checkstyle-suppressions.xml b/sdk/purview/azure-analytics-purview-sharing/checkstyle-suppressions.xml new file mode 100644 index 000000000000..a66b0b7d9867 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/checkstyle-suppressions.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/sdk/purview/azure-analytics-purview-sharing/pom.xml b/sdk/purview/azure-analytics-purview-sharing/pom.xml new file mode 100644 index 000000000000..c9dbedb67345 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/pom.xml @@ -0,0 +1,74 @@ + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-analytics-purview-sharing + 1.0.0-beta.3 + jar + + Microsoft Azure SDK for Purview Sharing + This package contains the Microsoft Azure Purview Sharing client library. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0.25 + 0.15 + + --add-opens com.azure.analytics.purview.sharing/com.azure.analytics.purview.sharing.models=com.azure.core + + true + + false + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/purview/azure-analytics-purview-sharing/spotbugs-exclude.xml b/sdk/purview/azure-analytics-purview-sharing/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/PurviewShareServiceVersion.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/PurviewShareServiceVersion.java new file mode 100644 index 000000000000..eb62b772ec46 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/PurviewShareServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of PurviewShareClient. + */ +public enum PurviewShareServiceVersion implements ServiceVersion { + /** + * Enum value 2023-05-30-preview. + */ + V2023_05_30_PREVIEW("2023-05-30-preview"); + + private final String version; + + PurviewShareServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link PurviewShareServiceVersion}. + */ + public static PurviewShareServiceVersion getLatest() { + return V2023_05_30_PREVIEW; + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesAsyncClient.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesAsyncClient.java new file mode 100644 index 000000000000..7f5acd01e6f5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesAsyncClient.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.implementation.ReceivedSharesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.PollerFlux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewShareClient type. + */ +@ServiceClient(builder = ReceivedSharesClientBuilder.class, isAsync = true) +public final class ReceivedSharesAsyncClient { + @Generated + private final ReceivedSharesImpl serviceClient; + + /** + * Initializes an instance of ReceivedSharesAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ReceivedSharesAsyncClient(ReceivedSharesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a received share by unique id. + * + * Get a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a received share along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getReceivedShareWithResponse(String receivedShareId, + RequestOptions requestOptions) { + return this.serviceClient.getReceivedShareWithResponseAsync(receivedShareId, requestOptions); + } + + /** + * Create or replace a received share. + * + * Update changes to a received share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param receivedShare The received share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of a received share data transfer object. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCreateOrReplaceReceivedShare(String receivedShareId, + BinaryData receivedShare, RequestOptions requestOptions) { + return this.serviceClient.beginCreateOrReplaceReceivedShareAsync(receivedShareId, receivedShare, + requestOptions); + } + + /** + * Deletes a received share + * + * Delete a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of response for long running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginDeleteReceivedShare(String receivedShareId, + RequestOptions requestOptions) { + return this.serviceClient.beginDeleteReceivedShareAsync(receivedShareId, requestOptions); + } + + /** + * Get a list of attached received shares. + * + * List attached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAttachedReceivedShares(String referenceName, RequestOptions requestOptions) { + return this.serviceClient.listAttachedReceivedSharesAsync(referenceName, requestOptions); + } + + /** + * Get a list of detached received shares. + * + * List detached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDetachedReceivedShares(RequestOptions requestOptions) { + return this.serviceClient.listDetachedReceivedSharesAsync(requestOptions); + } + + /** + * Activates the tenant and email combination using the activation code received. + * + * Activates the email registration for current tenant. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param tenantEmailRegistration The tenant email registration payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a tenant email registration data transfer object along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> activateTenantEmailRegistrationWithResponse(BinaryData tenantEmailRegistration, + RequestOptions requestOptions) { + return this.serviceClient.activateTenantEmailRegistrationWithResponseAsync(tenantEmailRegistration, + requestOptions); + } + + /** + * Registers the tenant and email combination for activation. + * + * Register an email for the current tenant. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a tenant email registration data transfer object along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> registerTenantEmailRegistrationWithResponse(RequestOptions requestOptions) { + return this.serviceClient.registerTenantEmailRegistrationWithResponseAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesClient.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesClient.java new file mode 100644 index 000000000000..d17374211a20 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesClient.java @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.implementation.ReceivedSharesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; + +/** + * Initializes a new instance of the synchronous PurviewShareClient type. + */ +@ServiceClient(builder = ReceivedSharesClientBuilder.class) +public final class ReceivedSharesClient { + @Generated + private final ReceivedSharesImpl serviceClient; + + /** + * Initializes an instance of ReceivedSharesClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ReceivedSharesClient(ReceivedSharesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a received share by unique id. + * + * Get a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a received share along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getReceivedShareWithResponse(String receivedShareId, RequestOptions requestOptions) { + return this.serviceClient.getReceivedShareWithResponse(receivedShareId, requestOptions); + } + + /** + * Create or replace a received share. + * + * Update changes to a received share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param receivedShare The received share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of a received share data transfer object. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCreateOrReplaceReceivedShare(String receivedShareId, + BinaryData receivedShare, RequestOptions requestOptions) { + return this.serviceClient.beginCreateOrReplaceReceivedShare(receivedShareId, receivedShare, requestOptions); + } + + /** + * Deletes a received share + * + * Delete a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of response for long running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginDeleteReceivedShare(String receivedShareId, + RequestOptions requestOptions) { + return this.serviceClient.beginDeleteReceivedShare(receivedShareId, requestOptions); + } + + /** + * Get a list of attached received shares. + * + * List attached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAttachedReceivedShares(String referenceName, RequestOptions requestOptions) { + return this.serviceClient.listAttachedReceivedShares(referenceName, requestOptions); + } + + /** + * Get a list of detached received shares. + * + * List detached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDetachedReceivedShares(RequestOptions requestOptions) { + return this.serviceClient.listDetachedReceivedShares(requestOptions); + } + + /** + * Activates the tenant and email combination using the activation code received. + * + * Activates the email registration for current tenant. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param tenantEmailRegistration The tenant email registration payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a tenant email registration data transfer object along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response activateTenantEmailRegistrationWithResponse(BinaryData tenantEmailRegistration, + RequestOptions requestOptions) { + return this.serviceClient.activateTenantEmailRegistrationWithResponse(tenantEmailRegistration, requestOptions); + } + + /** + * Registers the tenant and email combination for activation. + * + * Register an email for the current tenant. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a tenant email registration data transfer object along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response registerTenantEmailRegistrationWithResponse(RequestOptions requestOptions) { + return this.serviceClient.registerTenantEmailRegistrationWithResponse(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesClientBuilder.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesClientBuilder.java new file mode 100644 index 000000000000..5ce3a6a13cf3 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ReceivedSharesClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.implementation.PurviewShareClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the ReceivedSharesClient type. + */ +@ServiceClientBuilder(serviceClients = { ReceivedSharesClient.class, ReceivedSharesAsyncClient.class }) +public final class ReceivedSharesClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-sharing.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the ReceivedSharesClientBuilder. + */ + @Generated + public ReceivedSharesClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ReceivedSharesClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ReceivedSharesClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ReceivedSharesClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ReceivedSharesClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ReceivedSharesClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ReceivedSharesClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ReceivedSharesClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ReceivedSharesClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ReceivedSharesClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewShareServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the ReceivedSharesClientBuilder. + */ + @Generated + public ReceivedSharesClientBuilder serviceVersion(PurviewShareServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the ReceivedSharesClientBuilder. + */ + @Generated + public ReceivedSharesClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewShareClientImpl with the provided parameters. + * + * @return an instance of PurviewShareClientImpl. + */ + @Generated + private PurviewShareClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewShareServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewShareServiceVersion.getLatest(); + PurviewShareClientImpl client = new PurviewShareClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of ReceivedSharesAsyncClient class. + * + * @return an instance of ReceivedSharesAsyncClient. + */ + @Generated + public ReceivedSharesAsyncClient buildAsyncClient() { + return new ReceivedSharesAsyncClient(buildInnerClient().getReceivedShares()); + } + + /** + * Builds an instance of ReceivedSharesClient class. + * + * @return an instance of ReceivedSharesClient. + */ + @Generated + public ReceivedSharesClient buildClient() { + return new ReceivedSharesClient(buildInnerClient().getReceivedShares()); + } + + private static final ClientLogger LOGGER = new ClientLogger(ReceivedSharesClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesAsyncClient.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesAsyncClient.java new file mode 100644 index 000000000000..0a588b6932b5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesAsyncClient.java @@ -0,0 +1,394 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.implementation.SentSharesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.PollerFlux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewShareClient type. + */ +@ServiceClient(builder = SentSharesClientBuilder.class, isAsync = true) +public final class SentSharesAsyncClient { + @Generated + private final SentSharesImpl serviceClient; + + /** + * Initializes an instance of SentSharesAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SentSharesAsyncClient(SentSharesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a list of sent shares. + * + * List sent shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of sent shares as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSentShares(String referenceName, RequestOptions requestOptions) { + return this.serviceClient.listSentSharesAsync(referenceName, requestOptions); + } + + /** + * Get a sent share by guid. + * + * Get a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSentShareWithResponse(String sentShareId, RequestOptions requestOptions) { + return this.serviceClient.getSentShareWithResponseAsync(sentShareId, requestOptions); + } + + /** + * Create or replace a sent share. + * + * Create or replace a sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShare The sent share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of a sent share data transfer object. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCreateOrReplaceSentShare(String sentShareId, BinaryData sentShare, + RequestOptions requestOptions) { + return this.serviceClient.beginCreateOrReplaceSentShareAsync(sentShareId, sentShare, requestOptions); + } + + /** + * Deletes a sent share. + * + * Delete a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of response for long running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginDeleteSentShare(String sentShareId, RequestOptions requestOptions) { + return this.serviceClient.beginDeleteSentShareAsync(sentShareId, requestOptions); + } + + /** + * List all sent share invitations in a sent share + * + * List sent share recipients. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of the sent share invitations as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSentShareInvitations(String sentShareId, RequestOptions requestOptions) { + return this.serviceClient.listSentShareInvitationsAsync(sentShareId, requestOptions); + } + + /** + * Get sent share invitation for a given sent share + * + * Get recipient for a given sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return recipient for a given sent share along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSentShareInvitationWithResponse(String sentShareId, + String sentShareInvitationId, RequestOptions requestOptions) { + return this.serviceClient.getSentShareInvitationWithResponseAsync(sentShareId, sentShareInvitationId, + requestOptions); + } + + /** + * Create a sent share invitation. + * + * Create a recipient for a given sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param sentShareInvitation The sent share invitation to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share invitation data transfer object along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSentShareInvitationWithResponse(String sentShareId, + String sentShareInvitationId, BinaryData sentShareInvitation, RequestOptions requestOptions) { + return this.serviceClient.createSentShareInvitationWithResponseAsync(sentShareId, sentShareInvitationId, + sentShareInvitation, requestOptions); + } + + /** + * Delete Invitation in a share. + * + * Delete a sent share invitation. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of response for long running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginDeleteSentShareInvitation(String sentShareId, String sentShareInvitationId, + RequestOptions requestOptions) { + return this.serviceClient.beginDeleteSentShareInvitationAsync(sentShareId, sentShareInvitationId, + requestOptions); + } + + /** + * Notifies the recipient of the sent share invitation. + * + * Notifies the user recipient of the sent share invitation, does not apply to service invitations. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share invitation data transfer object along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> notifyUserSentShareInvitationWithResponse(String sentShareId, + String sentShareInvitationId, RequestOptions requestOptions) { + return this.serviceClient.notifyUserSentShareInvitationWithResponseAsync(sentShareId, sentShareInvitationId, + requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesClient.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesClient.java new file mode 100644 index 000000000000..e00ae87d68ee --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesClient.java @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.implementation.SentSharesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; + +/** + * Initializes a new instance of the synchronous PurviewShareClient type. + */ +@ServiceClient(builder = SentSharesClientBuilder.class) +public final class SentSharesClient { + @Generated + private final SentSharesImpl serviceClient; + + /** + * Initializes an instance of SentSharesClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SentSharesClient(SentSharesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a list of sent shares. + * + * List sent shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of sent shares as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSentShares(String referenceName, RequestOptions requestOptions) { + return this.serviceClient.listSentShares(referenceName, requestOptions); + } + + /** + * Get a sent share by guid. + * + * Get a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSentShareWithResponse(String sentShareId, RequestOptions requestOptions) { + return this.serviceClient.getSentShareWithResponse(sentShareId, requestOptions); + } + + /** + * Create or replace a sent share. + * + * Create or replace a sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShare The sent share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of a sent share data transfer object. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCreateOrReplaceSentShare(String sentShareId, BinaryData sentShare, + RequestOptions requestOptions) { + return this.serviceClient.beginCreateOrReplaceSentShare(sentShareId, sentShare, requestOptions); + } + + /** + * Deletes a sent share. + * + * Delete a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of response for long running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginDeleteSentShare(String sentShareId, RequestOptions requestOptions) { + return this.serviceClient.beginDeleteSentShare(sentShareId, requestOptions); + } + + /** + * List all sent share invitations in a sent share + * + * List sent share recipients. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of the sent share invitations as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSentShareInvitations(String sentShareId, RequestOptions requestOptions) { + return this.serviceClient.listSentShareInvitations(sentShareId, requestOptions); + } + + /** + * Get sent share invitation for a given sent share + * + * Get recipient for a given sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return recipient for a given sent share along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSentShareInvitationWithResponse(String sentShareId, String sentShareInvitationId, + RequestOptions requestOptions) { + return this.serviceClient.getSentShareInvitationWithResponse(sentShareId, sentShareInvitationId, + requestOptions); + } + + /** + * Create a sent share invitation. + * + * Create a recipient for a given sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param sentShareInvitation The sent share invitation to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share invitation data transfer object along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSentShareInvitationWithResponse(String sentShareId, String sentShareInvitationId, + BinaryData sentShareInvitation, RequestOptions requestOptions) { + return this.serviceClient.createSentShareInvitationWithResponse(sentShareId, sentShareInvitationId, + sentShareInvitation, requestOptions); + } + + /** + * Delete Invitation in a share. + * + * Delete a sent share invitation. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of response for long running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginDeleteSentShareInvitation(String sentShareId, String sentShareInvitationId, + RequestOptions requestOptions) { + return this.serviceClient.beginDeleteSentShareInvitation(sentShareId, sentShareInvitationId, requestOptions); + } + + /** + * Notifies the recipient of the sent share invitation. + * + * Notifies the user recipient of the sent share invitation, does not apply to service invitations. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share invitation data transfer object along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response notifyUserSentShareInvitationWithResponse(String sentShareId, + String sentShareInvitationId, RequestOptions requestOptions) { + return this.serviceClient.notifyUserSentShareInvitationWithResponse(sentShareId, sentShareInvitationId, + requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesClientBuilder.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesClientBuilder.java new file mode 100644 index 000000000000..a7ca85623af0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/SentSharesClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.implementation.PurviewShareClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the SentSharesClient type. + */ +@ServiceClientBuilder(serviceClients = { SentSharesClient.class, SentSharesAsyncClient.class }) +public final class SentSharesClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-sharing.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the SentSharesClientBuilder. + */ + @Generated + public SentSharesClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SentSharesClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SentSharesClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SentSharesClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SentSharesClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SentSharesClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SentSharesClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SentSharesClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SentSharesClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SentSharesClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewShareServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the SentSharesClientBuilder. + */ + @Generated + public SentSharesClientBuilder serviceVersion(PurviewShareServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the SentSharesClientBuilder. + */ + @Generated + public SentSharesClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewShareClientImpl with the provided parameters. + * + * @return an instance of PurviewShareClientImpl. + */ + @Generated + private PurviewShareClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewShareServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewShareServiceVersion.getLatest(); + PurviewShareClientImpl client = new PurviewShareClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of SentSharesAsyncClient class. + * + * @return an instance of SentSharesAsyncClient. + */ + @Generated + public SentSharesAsyncClient buildAsyncClient() { + return new SentSharesAsyncClient(buildInnerClient().getSentShares()); + } + + /** + * Builds an instance of SentSharesClient class. + * + * @return an instance of SentSharesClient. + */ + @Generated + public SentSharesClient buildClient() { + return new SentSharesClient(buildInnerClient().getSentShares()); + } + + private static final ClientLogger LOGGER = new ClientLogger(SentSharesClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesAsyncClient.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesAsyncClient.java new file mode 100644 index 000000000000..0c5f15a03a01 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesAsyncClient.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.implementation.ShareResourcesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the asynchronous PurviewShareClient type. + */ +@ServiceClient(builder = ShareResourcesClientBuilder.class, isAsync = true) +public final class ShareResourcesAsyncClient { + @Generated + private final ShareResourcesImpl serviceClient; + + /** + * Initializes an instance of ShareResourcesAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ShareResourcesAsyncClient(ShareResourcesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * API operation to list ShareResources. + * + * List share resources. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     receivedSharesCount: Integer (Optional)
      +     *     sentSharesCount: Integer (Optional)
      +     *     storeKind: String(AdlsGen2Account/BlobAccount) (Optional)
      +     *     storeReference (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String(ArmResourceReference) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a page of ShareResource results as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listShareResources(RequestOptions requestOptions) { + return this.serviceClient.listShareResourcesAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesClient.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesClient.java new file mode 100644 index 000000000000..896901a09ebf --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesClient.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.implementation.ShareResourcesImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewShareClient type. + */ +@ServiceClient(builder = ShareResourcesClientBuilder.class) +public final class ShareResourcesClient { + @Generated + private final ShareResourcesImpl serviceClient; + + /** + * Initializes an instance of ShareResourcesClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ShareResourcesClient(ShareResourcesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * API operation to list ShareResources. + * + * List share resources. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     receivedSharesCount: Integer (Optional)
      +     *     sentSharesCount: Integer (Optional)
      +     *     storeKind: String(AdlsGen2Account/BlobAccount) (Optional)
      +     *     storeReference (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String(ArmResourceReference) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a page of ShareResource results as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listShareResources(RequestOptions requestOptions) { + return this.serviceClient.listShareResources(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesClientBuilder.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesClientBuilder.java new file mode 100644 index 000000000000..8721c3fdf87b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/ShareResourcesClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.implementation.PurviewShareClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the ShareResourcesClient type. + */ +@ServiceClientBuilder(serviceClients = { ShareResourcesClient.class, ShareResourcesAsyncClient.class }) +public final class ShareResourcesClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-sharing.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the ShareResourcesClientBuilder. + */ + @Generated + public ShareResourcesClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ShareResourcesClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ShareResourcesClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ShareResourcesClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ShareResourcesClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ShareResourcesClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ShareResourcesClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ShareResourcesClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ShareResourcesClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ShareResourcesClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewShareServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the ShareResourcesClientBuilder. + */ + @Generated + public ShareResourcesClientBuilder serviceVersion(PurviewShareServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the ShareResourcesClientBuilder. + */ + @Generated + public ShareResourcesClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewShareClientImpl with the provided parameters. + * + * @return an instance of PurviewShareClientImpl. + */ + @Generated + private PurviewShareClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewShareServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewShareServiceVersion.getLatest(); + PurviewShareClientImpl client = new PurviewShareClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of ShareResourcesAsyncClient class. + * + * @return an instance of ShareResourcesAsyncClient. + */ + @Generated + public ShareResourcesAsyncClient buildAsyncClient() { + return new ShareResourcesAsyncClient(buildInnerClient().getShareResources()); + } + + /** + * Builds an instance of ShareResourcesClient class. + * + * @return an instance of ShareResourcesClient. + */ + @Generated + public ShareResourcesClient buildClient() { + return new ShareResourcesClient(buildInnerClient().getShareResources()); + } + + private static final ClientLogger LOGGER = new ClientLogger(ShareResourcesClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/PurviewShareClientImpl.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/PurviewShareClientImpl.java new file mode 100644 index 000000000000..c12999091959 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/PurviewShareClientImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.implementation; + +import com.azure.analytics.purview.sharing.PurviewShareServiceVersion; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the PurviewShareClient type. + */ +public final class PurviewShareClientImpl { + /** + * The sharing endpoint of your purview account. Example: https://{accountName}.purview.azure.com/share. + */ + private final String endpoint; + + /** + * Gets The sharing endpoint of your purview account. Example: https://{accountName}.purview.azure.com/share. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final PurviewShareServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewShareServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The ReceivedSharesImpl object to access its operations. + */ + private final ReceivedSharesImpl receivedShares; + + /** + * Gets the ReceivedSharesImpl object to access its operations. + * + * @return the ReceivedSharesImpl object. + */ + public ReceivedSharesImpl getReceivedShares() { + return this.receivedShares; + } + + /** + * The SentSharesImpl object to access its operations. + */ + private final SentSharesImpl sentShares; + + /** + * Gets the SentSharesImpl object to access its operations. + * + * @return the SentSharesImpl object. + */ + public SentSharesImpl getSentShares() { + return this.sentShares; + } + + /** + * The ShareResourcesImpl object to access its operations. + */ + private final ShareResourcesImpl shareResources; + + /** + * Gets the ShareResourcesImpl object to access its operations. + * + * @return the ShareResourcesImpl object. + */ + public ShareResourcesImpl getShareResources() { + return this.shareResources; + } + + /** + * Initializes an instance of PurviewShareClient client. + * + * @param endpoint The sharing endpoint of your purview account. Example: + * https://{accountName}.purview.azure.com/share. + * @param serviceVersion Service version. + */ + public PurviewShareClientImpl(String endpoint, PurviewShareServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewShareClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The sharing endpoint of your purview account. Example: + * https://{accountName}.purview.azure.com/share. + * @param serviceVersion Service version. + */ + public PurviewShareClientImpl(HttpPipeline httpPipeline, String endpoint, + PurviewShareServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewShareClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The sharing endpoint of your purview account. Example: + * https://{accountName}.purview.azure.com/share. + * @param serviceVersion Service version. + */ + public PurviewShareClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + PurviewShareServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.receivedShares = new ReceivedSharesImpl(this); + this.sentShares = new SentSharesImpl(this); + this.shareResources = new ShareResourcesImpl(this); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/ReceivedSharesImpl.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/ReceivedSharesImpl.java new file mode 100644 index 000000000000..caea3390e948 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/ReceivedSharesImpl.java @@ -0,0 +1,1474 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.implementation; + +import com.azure.analytics.purview.sharing.PurviewShareServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.DefaultPollingStrategy; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncDefaultPollingStrategy; +import com.azure.core.util.polling.SyncPoller; +import com.azure.core.util.serializer.TypeReference; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ReceivedShares. + */ +public final class ReceivedSharesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ReceivedSharesService service; + + /** + * The service client containing this operation class. + */ + private final PurviewShareClientImpl client; + + /** + * Initializes an instance of ReceivedSharesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ReceivedSharesImpl(PurviewShareClientImpl client) { + this.service + = RestProxy.create(ReceivedSharesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewShareServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewShareClientReceivedShares to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PurviewShareClientReceivedShares") + public interface ReceivedSharesService { + @Get("/receivedShares/{receivedShareId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getReceivedShare(@HostParam("endpoint") String endpoint, + @PathParam("receivedShareId") String receivedShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/receivedShares/{receivedShareId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getReceivedShareSync(@HostParam("endpoint") String endpoint, + @PathParam("receivedShareId") String receivedShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/receivedShares/{receivedShareId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrReplaceReceivedShare(@HostParam("endpoint") String endpoint, + @PathParam("receivedShareId") String receivedShareId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData receivedShare, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/receivedShares/{receivedShareId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrReplaceReceivedShareSync(@HostParam("endpoint") String endpoint, + @PathParam("receivedShareId") String receivedShareId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData receivedShare, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/receivedShares/{receivedShareId}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteReceivedShare(@HostParam("endpoint") String endpoint, + @PathParam("receivedShareId") String receivedShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/receivedShares/{receivedShareId}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteReceivedShareSync(@HostParam("endpoint") String endpoint, + @PathParam("receivedShareId") String receivedShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/receivedShares/attached") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAttachedReceivedShares(@HostParam("endpoint") String endpoint, + @QueryParam("referenceName") String referenceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/receivedShares/attached") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAttachedReceivedSharesSync(@HostParam("endpoint") String endpoint, + @QueryParam("referenceName") String referenceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/receivedShares/detached") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDetachedReceivedShares(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/receivedShares/detached") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDetachedReceivedSharesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/emails:activate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> activateTenantEmailRegistration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData tenantEmailRegistration, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/emails:activate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response activateTenantEmailRegistrationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData tenantEmailRegistration, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/emails:register") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> registerTenantEmailRegistration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/emails:register") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response registerTenantEmailRegistrationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listAttachedReceivedSharesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listAttachedReceivedSharesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listDetachedReceivedSharesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listDetachedReceivedSharesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get a received share by unique id. + * + * Get a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a received share along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getReceivedShareWithResponseAsync(String receivedShareId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getReceivedShare(this.client.getEndpoint(), receivedShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a received share by unique id. + * + * Get a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a received share along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getReceivedShareWithResponse(String receivedShareId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getReceivedShareSync(this.client.getEndpoint(), receivedShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Create or replace a received share. + * + * Update changes to a received share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param receivedShare The received share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a received share data transfer object along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrReplaceReceivedShareWithResponseAsync(String receivedShareId, + BinaryData receivedShare, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrReplaceReceivedShare(this.client.getEndpoint(), receivedShareId, + this.client.getServiceVersion().getVersion(), receivedShare, accept, requestOptions, context)); + } + + /** + * Create or replace a received share. + * + * Update changes to a received share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param receivedShare The received share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a received share data transfer object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceReceivedShareWithResponse(String receivedShareId, + BinaryData receivedShare, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createOrReplaceReceivedShareSync(this.client.getEndpoint(), receivedShareId, + this.client.getServiceVersion().getVersion(), receivedShare, accept, requestOptions, Context.NONE); + } + + /** + * Create or replace a received share. + * + * Update changes to a received share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param receivedShare The received share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of a received share data transfer object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCreateOrReplaceReceivedShareAsync(String receivedShareId, + BinaryData receivedShare, RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.createOrReplaceReceivedShareWithResponseAsync(receivedShareId, receivedShare, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Create or replace a received share. + * + * Update changes to a received share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param receivedShare The received share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of a received share data transfer object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCreateOrReplaceReceivedShare(String receivedShareId, + BinaryData receivedShare, RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.createOrReplaceReceivedShareWithResponse(receivedShareId, receivedShare, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Deletes a received share + * + * Delete a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response for long running operation along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteReceivedShareWithResponseAsync(String receivedShareId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.deleteReceivedShare(this.client.getEndpoint(), receivedShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a received share + * + * Delete a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response for long running operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteReceivedShareWithResponse(String receivedShareId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteReceivedShareSync(this.client.getEndpoint(), receivedShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Deletes a received share + * + * Delete a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of response for long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginDeleteReceivedShareAsync(String receivedShareId, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.deleteReceivedShareWithResponseAsync(receivedShareId, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(Void.class)); + } + + /** + * Deletes a received share + * + * Delete a received share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param receivedShareId Id of the received share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of response for long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginDeleteReceivedShare(String receivedShareId, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.deleteReceivedShareWithResponse(receivedShareId, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(Void.class)); + } + + /** + * Get a list of attached received shares. + * + * List attached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAttachedReceivedSharesSinglePageAsync(String referenceName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAttachedReceivedShares(this.client.getEndpoint(), referenceName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of attached received shares. + * + * List attached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAttachedReceivedSharesAsync(String referenceName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listAttachedReceivedSharesSinglePageAsync(referenceName, requestOptions), + nextLink -> listAttachedReceivedSharesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of attached received shares. + * + * List attached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAttachedReceivedSharesSinglePage(String referenceName, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listAttachedReceivedSharesSync(this.client.getEndpoint(), referenceName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of attached received shares. + * + * List attached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAttachedReceivedShares(String referenceName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listAttachedReceivedSharesSinglePage(referenceName, requestOptions), + nextLink -> listAttachedReceivedSharesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of detached received shares. + * + * List detached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetachedReceivedSharesSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDetachedReceivedShares(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of detached received shares. + * + * List detached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listDetachedReceivedSharesAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listDetachedReceivedSharesSinglePageAsync(requestOptions), + nextLink -> listDetachedReceivedSharesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of detached received shares. + * + * List detached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDetachedReceivedSharesSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDetachedReceivedSharesSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of detached received shares. + * + * List detached received shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDetachedReceivedShares(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listDetachedReceivedSharesSinglePage(requestOptions), + nextLink -> listDetachedReceivedSharesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Activates the tenant and email combination using the activation code received. + * + * Activates the email registration for current tenant. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param tenantEmailRegistration The tenant email registration payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a tenant email registration data transfer object along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> activateTenantEmailRegistrationWithResponseAsync( + BinaryData tenantEmailRegistration, RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return FluxUtil.withContext(context -> service.activateTenantEmailRegistration(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), tenantEmailRegistration, accept, requestOptionsLocal, + context)); + } + + /** + * Activates the tenant and email combination using the activation code received. + * + * Activates the email registration for current tenant. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param tenantEmailRegistration The tenant email registration payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a tenant email registration data transfer object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response activateTenantEmailRegistrationWithResponse(BinaryData tenantEmailRegistration, + RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return service.activateTenantEmailRegistrationSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), tenantEmailRegistration, accept, requestOptionsLocal, + Context.NONE); + } + + /** + * Registers the tenant and email combination for activation. + * + * Register an email for the current tenant. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a tenant email registration data transfer object along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> registerTenantEmailRegistrationWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return FluxUtil.withContext(context -> service.registerTenantEmailRegistration(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, context)); + } + + /** + * Registers the tenant and email combination for activation. + * + * Register an email for the current tenant. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     properties (Optional): {
      +     *         activationCode: String (Required)
      +     *         activationExpiration: OffsetDateTime (Optional)
      +     *         email: String (Optional)
      +     *         registrationStatus: String(ActivationPending/Activated/ActivationAttemptsExhausted) (Optional)
      +     *         state: String(Unknown/Succeeded/Creating/Deleting/Moving/Failed) (Optional)
      +     *         tenantId: String (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a tenant email registration data transfer object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response registerTenantEmailRegistrationWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return service.registerTenantEmailRegistrationSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, Context.NONE); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAttachedReceivedSharesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAttachedReceivedSharesNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAttachedReceivedSharesNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listAttachedReceivedSharesNextSync(nextLink, this.client.getEndpoint(), + accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetachedReceivedSharesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDetachedReceivedSharesNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of received shares along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDetachedReceivedSharesNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listDetachedReceivedSharesNextSync(nextLink, this.client.getEndpoint(), + accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/SentSharesImpl.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/SentSharesImpl.java new file mode 100644 index 000000000000..f1b9da7f802e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/SentSharesImpl.java @@ -0,0 +1,1695 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.implementation; + +import com.azure.analytics.purview.sharing.PurviewShareServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.DefaultPollingStrategy; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncDefaultPollingStrategy; +import com.azure.core.util.polling.SyncPoller; +import com.azure.core.util.serializer.TypeReference; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SentShares. + */ +public final class SentSharesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final SentSharesService service; + + /** + * The service client containing this operation class. + */ + private final PurviewShareClientImpl client; + + /** + * Initializes an instance of SentSharesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SentSharesImpl(PurviewShareClientImpl client) { + this.service + = RestProxy.create(SentSharesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewShareServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewShareClientSentShares to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PurviewShareClientSentShares") + public interface SentSharesService { + @Get("/sentShares") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listSentShares(@HostParam("endpoint") String endpoint, + @QueryParam("referenceName") String referenceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/sentShares") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSentSharesSync(@HostParam("endpoint") String endpoint, + @QueryParam("referenceName") String referenceName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/sentShares/{sentShareId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSentShare(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/sentShares/{sentShareId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSentShareSync(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/sentShares/{sentShareId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrReplaceSentShare(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData sentShare, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/sentShares/{sentShareId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrReplaceSentShareSync(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData sentShare, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/sentShares/{sentShareId}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteSentShare(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/sentShares/{sentShareId}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteSentShareSync(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/sentShares/{sentShareId}/sentShareInvitations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listSentShareInvitations(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/sentShares/{sentShareId}/sentShareInvitations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSentShareInvitationsSync(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSentShareInvitation(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, + @PathParam("sentShareInvitationId") String sentShareInvitationId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSentShareInvitationSync(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, + @PathParam("sentShareInvitationId") String sentShareInvitationId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createSentShareInvitation(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, + @PathParam("sentShareInvitationId") String sentShareInvitationId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData sentShareInvitation, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createSentShareInvitationSync(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, + @PathParam("sentShareInvitationId") String sentShareInvitationId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData sentShareInvitation, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteSentShareInvitation(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, + @PathParam("sentShareInvitationId") String sentShareInvitationId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteSentShareInvitationSync(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, + @PathParam("sentShareInvitationId") String sentShareInvitationId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}:notify") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> notifyUserSentShareInvitation(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, + @PathParam("sentShareInvitationId") String sentShareInvitationId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}:notify") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response notifyUserSentShareInvitationSync(@HostParam("endpoint") String endpoint, + @PathParam("sentShareId") String sentShareId, + @PathParam("sentShareInvitationId") String sentShareInvitationId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listSentSharesNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSentSharesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listSentShareInvitationsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSentShareInvitationsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get a list of sent shares. + * + * List sent shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of sent shares along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSentSharesSinglePageAsync(String referenceName, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSentShares(this.client.getEndpoint(), referenceName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get a list of sent shares. + * + * List sent shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of sent shares as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSentSharesAsync(String referenceName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listSentSharesSinglePageAsync(referenceName, requestOptions), + nextLink -> listSentSharesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a list of sent shares. + * + * List sent shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of sent shares along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSentSharesSinglePage(String referenceName, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listSentSharesSync(this.client.getEndpoint(), referenceName, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get a list of sent shares. + * + * List sent shares. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param referenceName A name that references a data store. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of sent shares as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSentShares(String referenceName, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listSentSharesSinglePage(referenceName, requestOptions), + nextLink -> listSentSharesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get a sent share by guid. + * + * Get a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSentShareWithResponseAsync(String sentShareId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getSentShare(this.client.getEndpoint(), sentShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a sent share by guid. + * + * Get a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSentShareWithResponse(String sentShareId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSentShareSync(this.client.getEndpoint(), sentShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Create or replace a sent share. + * + * Create or replace a sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShare The sent share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share data transfer object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrReplaceSentShareWithResponseAsync(String sentShareId, + BinaryData sentShare, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createOrReplaceSentShare(this.client.getEndpoint(), sentShareId, + this.client.getServiceVersion().getVersion(), sentShare, accept, requestOptions, context)); + } + + /** + * Create or replace a sent share. + * + * Create or replace a sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShare The sent share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share data transfer object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceSentShareWithResponse(String sentShareId, BinaryData sentShare, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createOrReplaceSentShareSync(this.client.getEndpoint(), sentShareId, + this.client.getServiceVersion().getVersion(), sentShare, accept, requestOptions, Context.NONE); + } + + /** + * Create or replace a sent share. + * + * Create or replace a sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShare The sent share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of a sent share data transfer object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCreateOrReplaceSentShareAsync(String sentShareId, + BinaryData sentShare, RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.createOrReplaceSentShareWithResponseAsync(sentShareId, sentShare, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Create or replace a sent share. + * + * Create or replace a sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShare The sent share to create or replace. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of a sent share data transfer object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCreateOrReplaceSentShare(String sentShareId, BinaryData sentShare, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.createOrReplaceSentShareWithResponse(sentShareId, sentShare, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Deletes a sent share. + * + * Delete a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response for long running operation along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSentShareWithResponseAsync(String sentShareId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.deleteSentShare(this.client.getEndpoint(), sentShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Deletes a sent share. + * + * Delete a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response for long running operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteSentShareWithResponse(String sentShareId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteSentShareSync(this.client.getEndpoint(), sentShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Deletes a sent share. + * + * Delete a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of response for long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginDeleteSentShareAsync(String sentShareId, RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.deleteSentShareWithResponseAsync(sentShareId, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(Void.class)); + } + + /** + * Deletes a sent share. + * + * Delete a sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of response for long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginDeleteSentShare(String sentShareId, RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.deleteSentShareWithResponse(sentShareId, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(Void.class)); + } + + /** + * List all sent share invitations in a sent share + * + * List sent share recipients. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of the sent share invitations along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSentShareInvitationsSinglePageAsync(String sentShareId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSentShareInvitations(this.client.getEndpoint(), sentShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List all sent share invitations in a sent share + * + * List sent share recipients. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of the sent share invitations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSentShareInvitationsAsync(String sentShareId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listSentShareInvitationsSinglePageAsync(sentShareId, requestOptions), + nextLink -> listSentShareInvitationsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List all sent share invitations in a sent share + * + * List sent share recipients. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of the sent share invitations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSentShareInvitationsSinglePage(String sentShareId, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listSentShareInvitationsSync(this.client.getEndpoint(), sentShareId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List all sent share invitations in a sent share + * + * List sent share recipients. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of the sent share invitations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSentShareInvitations(String sentShareId, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listSentShareInvitationsSinglePage(sentShareId, requestOptions), + nextLink -> listSentShareInvitationsNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get sent share invitation for a given sent share + * + * Get recipient for a given sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return recipient for a given sent share along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSentShareInvitationWithResponseAsync(String sentShareId, + String sentShareInvitationId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getSentShareInvitation(this.client.getEndpoint(), sentShareId, + sentShareInvitationId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get sent share invitation for a given sent share + * + * Get recipient for a given sent share. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return recipient for a given sent share along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSentShareInvitationWithResponse(String sentShareId, String sentShareInvitationId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSentShareInvitationSync(this.client.getEndpoint(), sentShareId, sentShareInvitationId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Create a sent share invitation. + * + * Create a recipient for a given sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param sentShareInvitation The sent share invitation to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share invitation data transfer object along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSentShareInvitationWithResponseAsync(String sentShareId, + String sentShareInvitationId, BinaryData sentShareInvitation, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.createSentShareInvitation(this.client.getEndpoint(), sentShareId, sentShareInvitationId, + this.client.getServiceVersion().getVersion(), sentShareInvitation, accept, requestOptions, context)); + } + + /** + * Create a sent share invitation. + * + * Create a recipient for a given sent share. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param sentShareInvitation The sent share invitation to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share invitation data transfer object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSentShareInvitationWithResponse(String sentShareId, String sentShareInvitationId, + BinaryData sentShareInvitation, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createSentShareInvitationSync(this.client.getEndpoint(), sentShareId, sentShareInvitationId, + this.client.getServiceVersion().getVersion(), sentShareInvitation, accept, requestOptions, Context.NONE); + } + + /** + * Delete Invitation in a share. + * + * Delete a sent share invitation. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response for long running operation along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSentShareInvitationWithResponseAsync(String sentShareId, + String sentShareInvitationId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.deleteSentShareInvitation(this.client.getEndpoint(), sentShareId, + sentShareInvitationId, this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Delete Invitation in a share. + * + * Delete a sent share invitation. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return response for long running operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteSentShareInvitationWithResponse(String sentShareId, String sentShareInvitationId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteSentShareInvitationSync(this.client.getEndpoint(), sentShareId, sentShareInvitationId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } + + /** + * Delete Invitation in a share. + * + * Delete a sent share invitation. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of response for long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginDeleteSentShareInvitationAsync(String sentShareId, + String sentShareInvitationId, RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.deleteSentShareInvitationWithResponseAsync(sentShareId, sentShareInvitationId, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(Void.class)); + } + + /** + * Delete Invitation in a share. + * + * Delete a sent share invitation. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     endTime: OffsetDateTime (Optional)
      +     *     error (Optional): {
      +     *         code: String (Required)
      +     *         details (Optional): [
      +     *             (recursive schema, see above)
      +     *         ]
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *     }
      +     *     id: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     status: String(Running/TransientFailure/Succeeded/Failed/NotStarted) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of response for long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginDeleteSentShareInvitation(String sentShareId, String sentShareInvitationId, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.deleteSentShareInvitationWithResponse(sentShareId, sentShareInvitationId, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.client.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(Void.class)); + } + + /** + * Notifies the recipient of the sent share invitation. + * + * Notifies the user recipient of the sent share invitation, does not apply to service invitations. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share invitation data transfer object along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> notifyUserSentShareInvitationWithResponseAsync(String sentShareId, + String sentShareInvitationId, RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return FluxUtil.withContext(context -> service.notifyUserSentShareInvitation(this.client.getEndpoint(), + sentShareId, sentShareInvitationId, this.client.getServiceVersion().getVersion(), accept, + requestOptionsLocal, context)); + } + + /** + * Notifies the recipient of the sent share invitation. + * + * Notifies the user recipient of the sent share invitation, does not apply to service invitations. + *

      Header Parameters

      + * + * + * + * + * + *
      Header Parameters
      NameTypeRequiredDescription
      repeatability-request-idStringNoRepeatability request ID header
      repeatability-first-sentStringNoRepeatability first sent header as + * HTTP-date
      + * You can add these to a request with {@link RequestOptions#addHeader} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param sentShareId Id of the sent share. + * @param sentShareInvitationId Id of the sent share invitation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a sent share invitation data transfer object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response notifyUserSentShareInvitationWithResponse(String sentShareId, + String sentShareInvitationId, RequestOptions requestOptions) { + final String accept = "application/json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-request-id"), CoreUtils.randomUuid().toString()); + } + }); + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getHeaders().get(HttpHeaderName.fromString("repeatability-first-sent")) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.fromString("repeatability-first-sent"), + DateTimeRfc1123.toRfc1123String(OffsetDateTime.now())); + } + }); + return service.notifyUserSentShareInvitationSync(this.client.getEndpoint(), sentShareId, sentShareInvitationId, + this.client.getServiceVersion().getVersion(), accept, requestOptionsLocal, Context.NONE); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of sent shares along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSentSharesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listSentSharesNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     shareKind: String(InPlace) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of sent shares along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSentSharesNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listSentSharesNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of the sent share invitations along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSentShareInvitationsNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSentShareInvitationsNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     invitationKind: String(User/Service) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return list of the sent share invitations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSentShareInvitationsNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listSentShareInvitationsNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/ShareResourcesImpl.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/ShareResourcesImpl.java new file mode 100644 index 000000000000..c23a066ad9b1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/ShareResourcesImpl.java @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.implementation; + +import com.azure.analytics.purview.sharing.PurviewShareServiceVersion; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ShareResources. + */ +public final class ShareResourcesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ShareResourcesService service; + + /** + * The service client containing this operation class. + */ + private final PurviewShareClientImpl client; + + /** + * Initializes an instance of ShareResourcesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ShareResourcesImpl(PurviewShareClientImpl client) { + this.service + = RestProxy.create(ShareResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewShareServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewShareClientShareResources to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PurviewShareClientShareResources") + public interface ShareResourcesService { + @Get("/shareResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listShareResources(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/shareResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listShareResourcesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listShareResourcesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listShareResourcesNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * API operation to list ShareResources. + * + * List share resources. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     receivedSharesCount: Integer (Optional)
      +     *     sentSharesCount: Integer (Optional)
      +     *     storeKind: String(AdlsGen2Account/BlobAccount) (Optional)
      +     *     storeReference (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String(ArmResourceReference) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a page of ShareResource results along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listShareResourcesSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listShareResources(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * API operation to list ShareResources. + * + * List share resources. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     receivedSharesCount: Integer (Optional)
      +     *     sentSharesCount: Integer (Optional)
      +     *     storeKind: String(AdlsGen2Account/BlobAccount) (Optional)
      +     *     storeReference (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String(ArmResourceReference) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a page of ShareResource results as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listShareResourcesAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listShareResourcesSinglePageAsync(requestOptions), + nextLink -> listShareResourcesNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * API operation to list ShareResources. + * + * List share resources. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     receivedSharesCount: Integer (Optional)
      +     *     sentSharesCount: Integer (Optional)
      +     *     storeKind: String(AdlsGen2Account/BlobAccount) (Optional)
      +     *     storeReference (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String(ArmResourceReference) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a page of ShareResource results along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listShareResourcesSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listShareResourcesSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * API operation to list ShareResources. + * + * List share resources. + *

      Query Parameters

      + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilters the results using OData syntax
      orderbyStringNoSorts the results using OData syntax
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     receivedSharesCount: Integer (Optional)
      +     *     sentSharesCount: Integer (Optional)
      +     *     storeKind: String(AdlsGen2Account/BlobAccount) (Optional)
      +     *     storeReference (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String(ArmResourceReference) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a page of ShareResource results as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listShareResources(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listShareResourcesSinglePage(requestOptions), + nextLink -> listShareResourcesNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     receivedSharesCount: Integer (Optional)
      +     *     sentSharesCount: Integer (Optional)
      +     *     storeKind: String(AdlsGen2Account/BlobAccount) (Optional)
      +     *     storeReference (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String(ArmResourceReference) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a page of ShareResource results along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listShareResourcesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listShareResourcesNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     type: String (Optional)
      +     *     receivedSharesCount: Integer (Optional)
      +     *     sentSharesCount: Integer (Optional)
      +     *     storeKind: String(AdlsGen2Account/BlobAccount) (Optional)
      +     *     storeReference (Optional): {
      +     *         referenceName: String (Optional)
      +     *         type: String(ArmResourceReference) (Optional)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a page of ShareResource results along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listShareResourcesNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listShareResourcesNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/package-info.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/package-info.java new file mode 100644 index 000000000000..9747dea020b1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for PurviewShareClient. + * Creates a data plane client for Purview Share. + */ +package com.azure.analytics.purview.sharing.implementation; diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/package-info.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/package-info.java new file mode 100644 index 000000000000..69182b337935 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/com/azure/analytics/purview/sharing/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for PurviewShareClient. + * Creates a data plane client for Purview Share. + */ +package com.azure.analytics.purview.sharing; diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/java/module-info.java b/sdk/purview/azure-analytics-purview-sharing/src/main/java/module-info.java new file mode 100644 index 000000000000..9aeff46861bb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/java/module-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.analytics.purview.sharing { + requires transitive com.azure.core; + + exports com.azure.analytics.purview.sharing; +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/main/resources/azure-analytics-purview-sharing.properties b/sdk/purview/azure-analytics-purview-sharing/src/main/resources/azure-analytics-purview-sharing.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/main/resources/azure-analytics-purview-sharing.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/README.md b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/README.md new file mode 100644 index 000000000000..6d898e8b2d9b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/README.md @@ -0,0 +1,33 @@ +--- +page_type: sample +languages: + - java +products: + - azure +urlFragment: purview-sharing-java-samples +--- + +# Azure Purview Sharing client library for Java samples +This document explains samples and how to use them. + +## Key concepts +Key concepts are explained in detail [here][SDK_README_KEY_CONCEPTS]. + +## Getting started +Getting started explained in detail [here][SDK_README_GETTING_STARTED]. + +## Examples +End-to-end examples for the client library can be viewed [here][sample_readme]. + +## Next steps +Start using Azure Purview Sharing Java SDK in your solutions. Our SDK details could be found at [SDK README][SHARE_SDK_README]. + +## Contributing +This project welcomes contributions and suggestions. Find [more contributing][SDK_README_CONTRIBUTING] details here. + + +[SHARE_SDK_README]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/README.md +[SDK_README_GETTING_STARTED]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/README.md#getting-started +[SDK_README_KEY_CONCEPTS]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/README.md#key-concepts +[SDK_README_CONTRIBUTING]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[sample_readme]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/ReadmeSamples.java \ No newline at end of file diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/ReadmeSamples.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/ReadmeSamples.java new file mode 100644 index 000000000000..e5151c563eff --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/ReadmeSamples.java @@ -0,0 +1,325 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.models.BlobAccountSink; +import com.azure.analytics.purview.sharing.models.BlobAccountSinkProperties; +import com.azure.analytics.purview.sharing.models.BlobStorageArtifact; +import com.azure.analytics.purview.sharing.models.BlobStorageArtifactProperties; +import com.azure.analytics.purview.sharing.models.InPlaceReceivedShare; +import com.azure.analytics.purview.sharing.models.InPlaceReceivedShareProperties; +import com.azure.analytics.purview.sharing.models.InPlaceSentShare; +import com.azure.analytics.purview.sharing.models.InPlaceSentShareProperties; +import com.azure.analytics.purview.sharing.models.ReceivedShare; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.SentShare; +import com.azure.analytics.purview.sharing.models.ServiceInvitation; +import com.azure.analytics.purview.sharing.models.ServiceInvitationProperties; +import com.azure.analytics.purview.sharing.models.ShareResource; +import com.azure.analytics.purview.sharing.models.StorageAccountPath; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.analytics.purview.sharing.models.UserInvitation; +import com.azure.analytics.purview.sharing.models.UserInvitationProperties; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.UUID; +import java.util.stream.Collectors; + +@SuppressWarnings("unused") +public final class ReadmeSamples { + + public void createSentShareClientSample() { + // BEGIN: com.azure.analytics.purview.sharing.createSentShareClient + SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + // END: com.azure.analytics.purview.sharing.createSentShareClient + } + + public void createSentShareSample() { + // BEGIN: com.azure.analytics.purview.sharing.createSentShare + SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + String sentShareId = UUID.randomUUID().toString(); + InPlaceSentShare sentShare = new InPlaceSentShare().setProperties( + new InPlaceSentShareProperties().setDisplayName("sample-share").setDescription("A sample share")); + + StoreReference storeReference = new StoreReference().setReferenceName( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/provider-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE); + + StorageAccountPath storageAccountPath = new StorageAccountPath().setContainerName("container-name") + .setReceiverPath("shared-file-name.txt") + .setSenderPath("original/file-name.txt"); + + List paths = new ArrayList<>(); + paths.add(storageAccountPath); + + BlobStorageArtifact artifact = new BlobStorageArtifact().setStoreReference(storeReference) + .setProperties(new BlobStorageArtifactProperties().setPaths(paths)); + + sentShare.getProperties().setArtifact(artifact); + + SyncPoller response = sentSharesClient.beginCreateOrReplaceSentShare(sentShareId, + BinaryData.fromObject(sentShare), new RequestOptions()); + // END: com.azure.analytics.purview.sharing.createSentShare + } + + public void getSentShareSample() { + // BEGIN: com.azure.analytics.purview.sharing.getSentShare + SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + SentShare retrievedSentShare = sentSharesClient.getSentShareWithResponse("", + new RequestOptions()).getValue().toObject(SentShare.class); + // END: com.azure.analytics.purview.sharing.getSentShare + } + + public void deleteSentShareSample() { + // BEGIN: com.azure.analytics.purview.sharing.deleteSentShare + SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + sentSharesClient.beginDeleteSentShare(".purview.azure.com/share") + .buildClient(); + + PagedIterable sentShareResults = sentSharesClient.listSentShares( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/provider-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage", + new RequestOptions()); + + List sentShares = sentShareResults.stream() + .map(binaryData -> binaryData.toObject(SentShare.class)) + .collect(Collectors.toList()); + // END: com.azure.analytics.purview.sharing.listSentShares + } + + public void sendUserInvitationSample() { + // BEGIN: com.azure.analytics.purview.sharing.sendUserInvitation + SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + String sentShareId = ""; + String sentShareInvitationId = UUID.randomUUID().toString(); + + UserInvitation sentShareInvitation = new UserInvitation().setProperties( + new UserInvitationProperties().setTargetEmail("receiver@microsoft.com") + .setNotify(true) + .setExpirationDate(OffsetDateTime.now().plusDays(60))); + + Response response = sentSharesClient.createSentShareInvitationWithResponse(sentShareId, + sentShareInvitationId, BinaryData.fromObject(sentShareInvitation), new RequestOptions()); + // END: com.azure.analytics.purview.sharing.sendUserInvitation + } + + public void sendServiceInvitationSample() { + // BEGIN: com.azure.analytics.purview.sharing.sendServiceInvitation + SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + String sentShareId = ""; + String sentShareInvitationId = UUID.randomUUID().toString(); + + ServiceInvitation sentShareInvitation = new ServiceInvitation().setProperties(new ServiceInvitationProperties() + .setTargetActiveDirectoryId(UUID.fromString("")) + .setTargetObjectId(UUID.fromString("")) + .setExpirationDate(OffsetDateTime.now().plusDays(60))); + + Response response = sentSharesClient.createSentShareInvitationWithResponse(sentShareId, + sentShareInvitationId, BinaryData.fromObject(sentShareInvitation), new RequestOptions()); + // END: com.azure.analytics.purview.sharing.sendServiceInvitation + } + + public void viewSentInvitationsSample() { + // BEGIN: com.azure.analytics.purview.sharing.listSentShareInvitations + SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + String sentShareId = ""; + + RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/sentAt desc"); + PagedIterable response = sentSharesClient.listSentShareInvitations(sentShareId, requestOptions); + // END: com.azure.analytics.purview.sharing.listSentShareInvitations + } + + public void getSentInvitationSample() { + // BEGIN: com.azure.analytics.purview.sharing.getSentShareInvitation + SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + String sentShareId = ""; + String sentShareInvitationId = ""; + + Response sentShareInvitation = sentSharesClient.getSentShareInvitationWithResponse(sentShareId, + sentShareInvitationId, new RequestOptions()); + // END: com.azure.analytics.purview.sharing.getSentShareInvitation + } + + public void deleteSentInvitationSample() { + // BEGIN: com.azure.analytics.purview.sharing.deleteSentShareInvitation + SentSharesClient sentSharesClient = new SentSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + String sentShareId = ""; + String sentShareInvitationId = ""; + + sentSharesClient.beginDeleteSentShareInvitation(sentShareId, sentShareInvitationId, new RequestOptions()); + // END: com.azure.analytics.purview.sharing.deleteSentShareInvitation + } + + public void createReceivedShareClientSample() { + // BEGIN: com.azure.analytics.purview.sharing.createReceivedShareClient + ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + // END: com.azure.analytics.purview.sharing.createReceivedShareClient + } + + public void listDetachedReceivedSharesSample() { + // BEGIN: com.azure.analytics.purview.sharing.listDetachedReceivedShares + ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); + PagedIterable response = receivedSharesClient.listDetachedReceivedShares(requestOptions); + // END: com.azure.analytics.purview.sharing.listDetachedReceivedShares + } + + public void attachReceivedShareSample() throws IOException { + // BEGIN: com.azure.analytics.purview.sharing.attachReceivedShare + ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + RequestOptions listRequestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); + PagedIterable listResponse = receivedSharesClient.listDetachedReceivedShares(listRequestOptions); + + Optional detachedReceivedShare = listResponse.stream().findFirst(); + + if (!detachedReceivedShare.isPresent()) { + return; + } + + String receivedShareId = detachedReceivedShare.map(binaryData -> binaryData.toObject(ReceivedShare.class).getId()) + .orElse(null); + + InPlaceReceivedShare receivedShare = new InPlaceReceivedShare() + .setProperties(new InPlaceReceivedShareProperties().setDisplayName("my-received-share")); + + StoreReference storeReference = new StoreReference().setReferenceName( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/consumer-storage-rg/providers/Microsoft.Storage/storageAccounts/consumerstorage") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE); + + BlobAccountSink sink = new BlobAccountSink().setStoreReference(storeReference).setProperties( + new BlobAccountSinkProperties() + .setContainerName("container-name") + .setFolder("folderName") + .setMountPath("optionalMountPath")); + + receivedShare.getProperties().setSink(sink); + + SyncPoller createResponse = receivedSharesClient.beginCreateOrReplaceReceivedShare( + receivedShareId, BinaryData.fromObject(receivedShare), new RequestOptions()); + // END: com.azure.analytics.purview.sharing.attachReceivedShare + } + + public void getReceivedShareSample() { + // BEGIN: com.azure.analytics.purview.sharing.getReceivedShare + ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + Response receivedShare = receivedSharesClient.getReceivedShareWithResponse("", + new RequestOptions()); + // END: com.azure.analytics.purview.sharing.getReceivedShare + } + + public void listAttachedReceivedShareSample() { + // BEGIN: com.azure.analytics.purview.sharing.listAttachedReceivedShares + ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); + PagedIterable response = receivedSharesClient.listAttachedReceivedShares( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/consumer-storage-rg/providers/Microsoft.Storage/storageAccounts/consumerstorage", + requestOptions); + + Optional receivedShare = response.stream().findFirst(); + + if (!receivedShare.isPresent()) { + return; + } + + ReceivedShare receivedShareResponse = receivedShare.get().toObject(InPlaceReceivedShare.class); + // END: com.azure.analytics.purview.sharing.listAttachedReceivedShares + } + + public void deleteReceivedShareSample() { + // BEGIN: com.azure.analytics.purview.sharing.deleteReceivedShare + ReceivedSharesClient receivedSharesClient = new ReceivedSharesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + receivedSharesClient.beginDeleteReceivedShare("", new RequestOptions()); + // END: com.azure.analytics.purview.sharing.deleteReceivedShare + } + + public void listShareResourcesSample() { + // BEGIN: com.azure.analytics.purview.sharing.listShareResources + ShareResourcesClient shareResourcesClient = new ShareResourcesClientBuilder().credential( + new DefaultAzureCredentialBuilder().build()) + .endpoint("https://.purview.azure.com/share") + .buildClient(); + + PagedIterable shareResourceResults = shareResourcesClient.listShareResources(new RequestOptions()); + + List shareResources = shareResourceResults.stream() + .map(binaryData -> binaryData.toObject(ShareResource.class)) + .collect(Collectors.toList()); + // END: com.azure.analytics.purview.sharing.listShareResources + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistration.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistration.java new file mode 100644 index 000000000000..530c7220909b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistration.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesActivateTenantEmailRegistration { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-activate-tenant-email-registration.received-shares-activate-tenant-email-registration + BinaryData tenantEmailRegistration + = BinaryData.fromString("{\"properties\":{\"activationCode\":\"15ee7153fe0df5a3a449a897d6cec836\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.activateTenantEmailRegistrationWithResponse(tenantEmailRegistration, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-activate-tenant-email-registration.received-shares-activate-tenant-email-registration + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplace.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplace.java new file mode 100644 index 000000000000..48ef89ce5bf0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplace.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesCreateOrReplace { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-create-or-replace-received-share.received-shares-create-or-replace + BinaryData receivedShare = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"updatedReceivedShareName\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainer\",\"folder\":\"receivingFolder\",\"mountPath\":\"path\"},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount\"}}},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = receivedSharesClient + .beginCreateOrReplaceReceivedShare("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", receivedShare, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-create-or-replace-received-share.received-shares-create-or-replace + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2Account.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2Account.java new file mode 100644 index 000000000000..fc367a5abef8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2Account.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesCreateOrReplaceAdlsGen2Account { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-create-or-replace-received-share.received-shares-create-or-replace-adls-gen2account + BinaryData receivedShare = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"updatedReceivedShareNameAdls\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainerAbc\",\"folder\":\"receivingFolderAbc\",\"mountPath\":\"pathAbc\"},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/adlsAccount\"}}},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = receivedSharesClient + .beginCreateOrReplaceReceivedShare("35E28F0E-DEA4-472F-84E4-5F1E45FB9937", receivedShare, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-create-or-replace-received-share.received-shares-create-or-replace-adls-gen2account + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccount.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccount.java new file mode 100644 index 000000000000..47ea1b511acd --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccount.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesCreateOrReplaceBlobAccount { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-create-or-replace-received-share.received-shares-create-or-replace-blob-account + BinaryData receivedShare = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"updatedReceivedShareName\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainer\",\"folder\":\"receivingFolder\",\"mountPath\":\"path\"},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount\"}}},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = receivedSharesClient + .beginCreateOrReplaceReceivedShare("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", receivedShare, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-create-or-replace-received-share.received-shares-create-or-replace-blob-account + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDelete.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDelete.java new file mode 100644 index 000000000000..2cb21be1b552 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDelete.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesDelete { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-delete-received-share.received-shares-delete + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response + = receivedSharesClient.beginDeleteReceivedShare("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-delete-received-share.received-shares-delete + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGet.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGet.java new file mode 100644 index 000000000000..441329f4047f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGet.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesGet { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-get-received-share.received-shares-get + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.getReceivedShareWithResponse("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-get-received-share.received-shares-get + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2Account.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2Account.java new file mode 100644 index 000000000000..53a3795cb6c3 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2Account.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesGetAdlsGen2Account { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-get-received-share.received-shares-get-adls-gen2account + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.getReceivedShareWithResponse("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-get-received-share.received-shares-get-adls-gen2account + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccount.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccount.java new file mode 100644 index 000000000000..a4d01fb280fb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccount.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesGetBlobAccount { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-get-received-share.received-shares-get-blob-account + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.getReceivedShareWithResponse("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-get-received-share.received-shares-get-blob-account + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttached.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttached.java new file mode 100644 index 000000000000..e969f82db80e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttached.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesListAttached { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-list-attached-received-shares.received-shares-list-attached + RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'"); + PagedIterable response = receivedSharesClient.listAttachedReceivedShares( + "/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount", + requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-list-attached-received-shares.received-shares-list-attached + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetached.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetached.java new file mode 100644 index 000000000000..a83bdf94226e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetached.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesListDetached { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-list-detached-received-shares.received-shares-list-detached + RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'"); + PagedIterable response = receivedSharesClient.listDetachedReceivedShares(requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-list-detached-received-shares.received-shares-list-detached + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistration.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistration.java new file mode 100644 index 000000000000..6d1aed91fff8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistration.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ReceivedSharesRegisterTenantEmailRegistration { + public static void main(String[] args) { + ReceivedSharesClient receivedSharesClient + = new ReceivedSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.received-shares-register-tenant-email-registration.received-shares-register-tenant-email-registration + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.registerTenantEmailRegistrationWithResponse(requestOptions); + // END:com.azure.analytics.purview.sharing.generated.received-shares-register-tenant-email-registration.received-shares-register-tenant-email-registration + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitation.java new file mode 100644 index 000000000000..065bfb73ad1e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitation.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesCreateInvitation { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-create-sent-share-invitation.sent-shares-create-invitation + BinaryData sentShareInvitation = BinaryData.fromString( + "{\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":null,\"notify\":true,\"targetEmail\":\"testReceiver@microsoft.com\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.createSentShareInvitationWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", + "9F154FA4-93D1-426B-A908-A9CAC7192B21", sentShareInvitation, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-create-sent-share-invitation.sent-shares-create-invitation + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplace.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplace.java new file mode 100644 index 000000000000..34b9e69e65b4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplace.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesCreateOrReplace { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-create-or-replace-sent-share.sent-shares-create-or-replace + BinaryData sentShare = BinaryData.fromString( + "{\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"SharedFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"displayName\":\"sentShare1\"},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = sentSharesClient + .beginCreateOrReplaceSentShare("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", sentShare, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-create-or-replace-sent-share.sent-shares-create-or-replace + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2Account.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2Account.java new file mode 100644 index 000000000000..f821342fc4d8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2Account.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesCreateOrReplaceAdlsGen2Account { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-create-or-replace-sent-share.sent-shares-create-or-replace-adls-gen2account + BinaryData sentShare = BinaryData.fromString( + "{\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"SharedFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"displayName\":\"sentShare1\"},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = sentSharesClient + .beginCreateOrReplaceSentShare("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", sentShare, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-create-or-replace-sent-share.sent-shares-create-or-replace-adls-gen2account + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccount.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccount.java new file mode 100644 index 000000000000..5abef40eaa96 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccount.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesCreateOrReplaceBlobAccount { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-create-or-replace-sent-share.sent-shares-create-or-replace-blob-account + BinaryData sentShare = BinaryData.fromString( + "{\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"SharedFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"displayName\":\"sentShare1\"},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = sentSharesClient + .beginCreateOrReplaceSentShare("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", sentShare, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-create-or-replace-sent-share.sent-shares-create-or-replace-blob-account + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitation.java new file mode 100644 index 000000000000..ae8438cb48cb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitation.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesCreateServiceInvitation { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-create-sent-share-invitation.sent-shares-create-service-invitation + BinaryData sentShareInvitation = BinaryData.fromString( + "{\"invitationKind\":\"Service\",\"properties\":{\"expirationDate\":null,\"targetActiveDirectoryId\":\"5DAE1226-9FAA-4D71-B8D4-87B81DFF672E\",\"targetObjectId\":\"EFA02830-BB7A-4586-B615-A6DFF19FEBBF\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.createSentShareInvitationWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", + "9F154FA4-93D1-426B-A908-A9CAC7192B21", sentShareInvitation, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-create-sent-share-invitation.sent-shares-create-service-invitation + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitation.java new file mode 100644 index 000000000000..4b32559c253a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitation.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesCreateUserInvitation { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-create-sent-share-invitation.sent-shares-create-user-invitation + BinaryData sentShareInvitation = BinaryData.fromString( + "{\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":\"2025-07-21T23:52:00.7691109Z\",\"notify\":true,\"targetEmail\":\"testReceiver@microsoft.com\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.createSentShareInvitationWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", + "9F154FA4-93D1-426B-A908-A9CAC7192B21", sentShareInvitation, requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-create-sent-share-invitation.sent-shares-create-user-invitation + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDelete.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDelete.java new file mode 100644 index 000000000000..2da6a0de9170 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDelete.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesDelete { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-delete-sent-share.sent-shares-delete + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response + = sentSharesClient.beginDeleteSentShare("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-delete-sent-share.sent-shares-delete + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitation.java new file mode 100644 index 000000000000..72c6a8142bc9 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitation.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesDeleteInvitation { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-delete-sent-share-invitation.sent-shares-delete-invitation + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = sentSharesClient.beginDeleteSentShareInvitation( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-delete-sent-share-invitation.sent-shares-delete-invitation + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGet.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGet.java new file mode 100644 index 000000000000..dc21be352586 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGet.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesGet { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share.sent-shares-get + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.getSentShareWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share.sent-shares-get + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2Account.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2Account.java new file mode 100644 index 000000000000..e08012867d92 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2Account.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesGetAdlsGen2Account { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share.sent-shares-get-adls-gen2account + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.getSentShareWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share.sent-shares-get-adls-gen2account + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccount.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccount.java new file mode 100644 index 000000000000..7f6dc0e47c59 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccount.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesGetBlobAccount { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share.sent-shares-get-blob-account + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.getSentShareWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share.sent-shares-get-blob-account + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitation.java new file mode 100644 index 000000000000..e0d46b60e169 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitation.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesGetInvitation { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share-invitation.sent-shares-get-invitation + RequestOptions requestOptions = new RequestOptions(); + Response response = sentSharesClient.getSentShareInvitationWithResponse( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share-invitation.sent-shares-get-invitation + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitation.java new file mode 100644 index 000000000000..396670260b3a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitation.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesGetServiceInvitation { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share-invitation.sent-shares-get-service-invitation + RequestOptions requestOptions = new RequestOptions(); + Response response = sentSharesClient.getSentShareInvitationWithResponse( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share-invitation.sent-shares-get-service-invitation + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitation.java new file mode 100644 index 000000000000..b88ca551a85c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitation.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesGetUserInvitation { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share-invitation.sent-shares-get-user-invitation + RequestOptions requestOptions = new RequestOptions(); + Response response = sentSharesClient.getSentShareInvitationWithResponse( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-get-sent-share-invitation.sent-shares-get-user-invitation + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesList.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesList.java new file mode 100644 index 000000000000..24a5045a00ef --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesList.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesList { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-list-sent-shares.sent-shares-list + RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'"); + PagedIterable response = sentSharesClient.listSentShares( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage", + requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-list-sent-shares.sent-shares-list + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesListInvitations.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesListInvitations.java new file mode 100644 index 000000000000..73b6fcd4b01b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesListInvitations.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesListInvitations { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-list-sent-share-invitations.sent-shares-list-invitations + RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'"); + PagedIterable response + = sentSharesClient.listSentShareInvitations("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-list-sent-share-invitations.sent-shares-list-invitations + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesNotifyUserInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesNotifyUserInvitation.java new file mode 100644 index 000000000000..01a0f8f0725a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/SentSharesNotifyUserInvitation.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class SentSharesNotifyUserInvitation { + public static void main(String[] args) { + SentSharesClient sentSharesClient + = new SentSharesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.sent-shares-notify-user-sent-share-invitation.sent-shares-notify-user-invitation + RequestOptions requestOptions = new RequestOptions(); + Response response = sentSharesClient.notifyUserSentShareInvitationWithResponse( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions); + // END:com.azure.analytics.purview.sharing.generated.sent-shares-notify-user-sent-share-invitation.sent-shares-notify-user-invitation + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ShareResourcesList.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ShareResourcesList.java new file mode 100644 index 000000000000..0111cdb5bac8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/generated/ShareResourcesList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.ShareResourcesClient; +import com.azure.analytics.purview.sharing.ShareResourcesClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ShareResourcesList { + public static void main(String[] args) { + ShareResourcesClient shareResourcesClient + = new ShareResourcesClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("accountName.purview.azure.com/share") + .buildClient(); + // BEGIN:com.azure.analytics.purview.sharing.generated.share-resources-list-share-resources.share-resources-list + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = shareResourcesClient.listShareResources(requestOptions); + // END:com.azure.analytics.purview.sharing.generated.share-resources-list-share-resources.share-resources-list + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSink.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSink.java new file mode 100644 index 000000000000..26c09dc1e33f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSink.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * AdlsGen2 Sink. + */ +@Fluent +public final class AdlsGen2AccountSink extends Sink { + /* + * The types of asset. + */ + private StoreKind storeKind = StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND; + + /* + * Properties for AdlsGen2 storage account + */ + private AdlsGen2AccountSinkProperties properties; + + /** + * Creates an instance of AdlsGen2AccountSink class. + */ + public AdlsGen2AccountSink() { + } + + /** + * Get the storeKind property: The types of asset. + * + * @return the storeKind value. + */ + @Override + public StoreKind getStoreKind() { + return this.storeKind; + } + + /** + * Get the properties property: Properties for AdlsGen2 storage account. + * + * @return the properties value. + */ + public AdlsGen2AccountSinkProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties for AdlsGen2 storage account. + * + * @param properties the properties value to set. + * @return the AdlsGen2AccountSink object itself. + */ + public AdlsGen2AccountSink setProperties(AdlsGen2AccountSinkProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AdlsGen2AccountSink setStoreReference(StoreReference storeReference) { + super.setStoreReference(storeReference); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("storeReference", getStoreReference()); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("storeKind", this.storeKind == null ? null : this.storeKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdlsGen2AccountSink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdlsGen2AccountSink if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AdlsGen2AccountSink. + */ + public static AdlsGen2AccountSink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdlsGen2AccountSink deserializedAdlsGen2AccountSink = new AdlsGen2AccountSink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storeReference".equals(fieldName)) { + deserializedAdlsGen2AccountSink.setStoreReference(StoreReference.fromJson(reader)); + } else if ("properties".equals(fieldName)) { + deserializedAdlsGen2AccountSink.properties = AdlsGen2AccountSinkProperties.fromJson(reader); + } else if ("storeKind".equals(fieldName)) { + deserializedAdlsGen2AccountSink.storeKind = StoreKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAdlsGen2AccountSink; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSinkProperties.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSinkProperties.java new file mode 100644 index 000000000000..70c0f6760fa1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2AccountSinkProperties.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * Properties for AdlsGen2 storage account. + */ +@Fluent +public final class AdlsGen2AccountSinkProperties implements JsonSerializable { + /* + * Adls Gen 2 Container Name + */ + private String containerName; + + /* + * Adls Gen 2 Folder + */ + private String folder; + + /* + * Adls Gen 2 Location + */ + private String location; + + /* + * Adls Gen 2 Mount Path + */ + private String mountPath; + + /** + * Creates an instance of AdlsGen2AccountSinkProperties class. + */ + public AdlsGen2AccountSinkProperties() { + } + + /** + * Get the containerName property: Adls Gen 2 Container Name. + * + * @return the containerName value. + */ + public String getContainerName() { + return this.containerName; + } + + /** + * Set the containerName property: Adls Gen 2 Container Name. + * + * @param containerName the containerName value to set. + * @return the AdlsGen2AccountSinkProperties object itself. + */ + public AdlsGen2AccountSinkProperties setContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the folder property: Adls Gen 2 Folder. + * + * @return the folder value. + */ + public String getFolder() { + return this.folder; + } + + /** + * Set the folder property: Adls Gen 2 Folder. + * + * @param folder the folder value to set. + * @return the AdlsGen2AccountSinkProperties object itself. + */ + public AdlsGen2AccountSinkProperties setFolder(String folder) { + this.folder = folder; + return this; + } + + /** + * Get the location property: Adls Gen 2 Location. + * + * @return the location value. + */ + public String getLocation() { + return this.location; + } + + /** + * Get the mountPath property: Adls Gen 2 Mount Path. + * + * @return the mountPath value. + */ + public String getMountPath() { + return this.mountPath; + } + + /** + * Set the mountPath property: Adls Gen 2 Mount Path. + * + * @param mountPath the mountPath value to set. + * @return the AdlsGen2AccountSinkProperties object itself. + */ + public AdlsGen2AccountSinkProperties setMountPath(String mountPath) { + this.mountPath = mountPath; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("containerName", this.containerName); + jsonWriter.writeStringField("folder", this.folder); + jsonWriter.writeStringField("mountPath", this.mountPath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdlsGen2AccountSinkProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdlsGen2AccountSinkProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AdlsGen2AccountSinkProperties. + */ + public static AdlsGen2AccountSinkProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdlsGen2AccountSinkProperties deserializedAdlsGen2AccountSinkProperties + = new AdlsGen2AccountSinkProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("containerName".equals(fieldName)) { + deserializedAdlsGen2AccountSinkProperties.containerName = reader.getString(); + } else if ("folder".equals(fieldName)) { + deserializedAdlsGen2AccountSinkProperties.folder = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedAdlsGen2AccountSinkProperties.location = reader.getString(); + } else if ("mountPath".equals(fieldName)) { + deserializedAdlsGen2AccountSinkProperties.mountPath = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdlsGen2AccountSinkProperties; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2Artifact.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2Artifact.java new file mode 100644 index 000000000000..e65abdbf5677 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2Artifact.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * An Adls Gen2 storage account artifact. + */ +@Fluent +public final class AdlsGen2Artifact extends Artifact { + /* + * The types of asset. + */ + private StoreKind storeKind = StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND; + + /* + * Properties for Adls Gen2 storage account. + */ + private AdlsGen2ArtifactProperties properties; + + /** + * Creates an instance of AdlsGen2Artifact class. + */ + public AdlsGen2Artifact() { + } + + /** + * Get the storeKind property: The types of asset. + * + * @return the storeKind value. + */ + @Override + public StoreKind getStoreKind() { + return this.storeKind; + } + + /** + * Get the properties property: Properties for Adls Gen2 storage account. + * + * @return the properties value. + */ + public AdlsGen2ArtifactProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties for Adls Gen2 storage account. + * + * @param properties the properties value to set. + * @return the AdlsGen2Artifact object itself. + */ + public AdlsGen2Artifact setProperties(AdlsGen2ArtifactProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AdlsGen2Artifact setStoreReference(StoreReference storeReference) { + super.setStoreReference(storeReference); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("storeReference", getStoreReference()); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("storeKind", this.storeKind == null ? null : this.storeKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdlsGen2Artifact from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdlsGen2Artifact if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AdlsGen2Artifact. + */ + public static AdlsGen2Artifact fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdlsGen2Artifact deserializedAdlsGen2Artifact = new AdlsGen2Artifact(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storeReference".equals(fieldName)) { + deserializedAdlsGen2Artifact.setStoreReference(StoreReference.fromJson(reader)); + } else if ("properties".equals(fieldName)) { + deserializedAdlsGen2Artifact.properties = AdlsGen2ArtifactProperties.fromJson(reader); + } else if ("storeKind".equals(fieldName)) { + deserializedAdlsGen2Artifact.storeKind = StoreKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAdlsGen2Artifact; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2ArtifactProperties.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2ArtifactProperties.java new file mode 100644 index 000000000000..13853cc1844f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/AdlsGen2ArtifactProperties.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** + * Properties for Adls Gen2 storage account. + */ +@Fluent +public final class AdlsGen2ArtifactProperties implements JsonSerializable { + /* + * Location of the storage account. + */ + private String location; + + /* + * A list of Adls Gen2 storage account paths. + */ + private List paths; + + /** + * Creates an instance of AdlsGen2ArtifactProperties class. + */ + public AdlsGen2ArtifactProperties() { + } + + /** + * Get the location property: Location of the storage account. + * + * @return the location value. + */ + public String getLocation() { + return this.location; + } + + /** + * Get the paths property: A list of Adls Gen2 storage account paths. + * + * @return the paths value. + */ + public List getPaths() { + return this.paths; + } + + /** + * Set the paths property: A list of Adls Gen2 storage account paths. + * + * @param paths the paths value to set. + * @return the AdlsGen2ArtifactProperties object itself. + */ + public AdlsGen2ArtifactProperties setPaths(List paths) { + this.paths = paths; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("paths", this.paths, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdlsGen2ArtifactProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdlsGen2ArtifactProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AdlsGen2ArtifactProperties. + */ + public static AdlsGen2ArtifactProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdlsGen2ArtifactProperties deserializedAdlsGen2ArtifactProperties = new AdlsGen2ArtifactProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("paths".equals(fieldName)) { + List paths = reader.readArray(reader1 -> StorageAccountPath.fromJson(reader1)); + deserializedAdlsGen2ArtifactProperties.paths = paths; + } else if ("location".equals(fieldName)) { + deserializedAdlsGen2ArtifactProperties.location = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdlsGen2ArtifactProperties; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/Artifact.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/Artifact.java new file mode 100644 index 000000000000..a9570c1cc547 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/Artifact.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * A class for sent share artifact. + */ +@Fluent +public class Artifact implements JsonSerializable { + /* + * The types of asset. + */ + private StoreKind storeKind = StoreKind.fromString("Artifact"); + + /* + * A Store Reference for an artifact or sink. + */ + private StoreReference storeReference; + + /** + * Creates an instance of Artifact class. + */ + public Artifact() { + } + + /** + * Get the storeKind property: The types of asset. + * + * @return the storeKind value. + */ + public StoreKind getStoreKind() { + return this.storeKind; + } + + /** + * Get the storeReference property: A Store Reference for an artifact or sink. + * + * @return the storeReference value. + */ + public StoreReference getStoreReference() { + return this.storeReference; + } + + /** + * Set the storeReference property: A Store Reference for an artifact or sink. + * + * @param storeReference the storeReference value to set. + * @return the Artifact object itself. + */ + public Artifact setStoreReference(StoreReference storeReference) { + this.storeReference = storeReference; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("storeReference", this.storeReference); + jsonWriter.writeStringField("storeKind", this.storeKind == null ? null : this.storeKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Artifact from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Artifact if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Artifact. + */ + public static Artifact fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("storeKind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("AdlsGen2Account".equals(discriminatorValue)) { + return AdlsGen2Artifact.fromJson(readerToUse.reset()); + } else if ("BlobAccount".equals(discriminatorValue)) { + return BlobStorageArtifact.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static Artifact fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Artifact deserializedArtifact = new Artifact(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storeReference".equals(fieldName)) { + deserializedArtifact.storeReference = StoreReference.fromJson(reader); + } else if ("storeKind".equals(fieldName)) { + deserializedArtifact.storeKind = StoreKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedArtifact; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobAccountSink.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobAccountSink.java new file mode 100644 index 000000000000..103861492b19 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobAccountSink.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * Blob Sink. + */ +@Fluent +public final class BlobAccountSink extends Sink { + /* + * The types of asset. + */ + private StoreKind storeKind = StoreKind.BLOB_STORAGE_ACCOUNT_STORE_KIND; + + /* + * Properties for blob storage account + */ + private BlobAccountSinkProperties properties; + + /** + * Creates an instance of BlobAccountSink class. + */ + public BlobAccountSink() { + } + + /** + * Get the storeKind property: The types of asset. + * + * @return the storeKind value. + */ + @Override + public StoreKind getStoreKind() { + return this.storeKind; + } + + /** + * Get the properties property: Properties for blob storage account. + * + * @return the properties value. + */ + public BlobAccountSinkProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties for blob storage account. + * + * @param properties the properties value to set. + * @return the BlobAccountSink object itself. + */ + public BlobAccountSink setProperties(BlobAccountSinkProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public BlobAccountSink setStoreReference(StoreReference storeReference) { + super.setStoreReference(storeReference); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("storeReference", getStoreReference()); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("storeKind", this.storeKind == null ? null : this.storeKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlobAccountSink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlobAccountSink if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlobAccountSink. + */ + public static BlobAccountSink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlobAccountSink deserializedBlobAccountSink = new BlobAccountSink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storeReference".equals(fieldName)) { + deserializedBlobAccountSink.setStoreReference(StoreReference.fromJson(reader)); + } else if ("properties".equals(fieldName)) { + deserializedBlobAccountSink.properties = BlobAccountSinkProperties.fromJson(reader); + } else if ("storeKind".equals(fieldName)) { + deserializedBlobAccountSink.storeKind = StoreKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBlobAccountSink; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobAccountSinkProperties.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobAccountSinkProperties.java new file mode 100644 index 000000000000..86a7f277bcea --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobAccountSinkProperties.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * Properties for blob storage account. + */ +@Fluent +public final class BlobAccountSinkProperties implements JsonSerializable { + /* + * Blob Container Name + */ + private String containerName; + + /* + * Blob Folder + */ + private String folder; + + /* + * Blob Location + */ + private String location; + + /* + * Blob Mount Path + */ + private String mountPath; + + /** + * Creates an instance of BlobAccountSinkProperties class. + */ + public BlobAccountSinkProperties() { + } + + /** + * Get the containerName property: Blob Container Name. + * + * @return the containerName value. + */ + public String getContainerName() { + return this.containerName; + } + + /** + * Set the containerName property: Blob Container Name. + * + * @param containerName the containerName value to set. + * @return the BlobAccountSinkProperties object itself. + */ + public BlobAccountSinkProperties setContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the folder property: Blob Folder. + * + * @return the folder value. + */ + public String getFolder() { + return this.folder; + } + + /** + * Set the folder property: Blob Folder. + * + * @param folder the folder value to set. + * @return the BlobAccountSinkProperties object itself. + */ + public BlobAccountSinkProperties setFolder(String folder) { + this.folder = folder; + return this; + } + + /** + * Get the location property: Blob Location. + * + * @return the location value. + */ + public String getLocation() { + return this.location; + } + + /** + * Get the mountPath property: Blob Mount Path. + * + * @return the mountPath value. + */ + public String getMountPath() { + return this.mountPath; + } + + /** + * Set the mountPath property: Blob Mount Path. + * + * @param mountPath the mountPath value to set. + * @return the BlobAccountSinkProperties object itself. + */ + public BlobAccountSinkProperties setMountPath(String mountPath) { + this.mountPath = mountPath; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("containerName", this.containerName); + jsonWriter.writeStringField("folder", this.folder); + jsonWriter.writeStringField("mountPath", this.mountPath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlobAccountSinkProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlobAccountSinkProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlobAccountSinkProperties. + */ + public static BlobAccountSinkProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlobAccountSinkProperties deserializedBlobAccountSinkProperties = new BlobAccountSinkProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("containerName".equals(fieldName)) { + deserializedBlobAccountSinkProperties.containerName = reader.getString(); + } else if ("folder".equals(fieldName)) { + deserializedBlobAccountSinkProperties.folder = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedBlobAccountSinkProperties.location = reader.getString(); + } else if ("mountPath".equals(fieldName)) { + deserializedBlobAccountSinkProperties.mountPath = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBlobAccountSinkProperties; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifact.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifact.java new file mode 100644 index 000000000000..6450806a81b9 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifact.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * Blob storage account artifact. + */ +@Fluent +public final class BlobStorageArtifact extends Artifact { + /* + * The types of asset. + */ + private StoreKind storeKind = StoreKind.BLOB_STORAGE_ACCOUNT_STORE_KIND; + + /* + * Properties for blob storage account. + */ + private BlobStorageArtifactProperties properties; + + /** + * Creates an instance of BlobStorageArtifact class. + */ + public BlobStorageArtifact() { + } + + /** + * Get the storeKind property: The types of asset. + * + * @return the storeKind value. + */ + @Override + public StoreKind getStoreKind() { + return this.storeKind; + } + + /** + * Get the properties property: Properties for blob storage account. + * + * @return the properties value. + */ + public BlobStorageArtifactProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties for blob storage account. + * + * @param properties the properties value to set. + * @return the BlobStorageArtifact object itself. + */ + public BlobStorageArtifact setProperties(BlobStorageArtifactProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public BlobStorageArtifact setStoreReference(StoreReference storeReference) { + super.setStoreReference(storeReference); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("storeReference", getStoreReference()); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("storeKind", this.storeKind == null ? null : this.storeKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlobStorageArtifact from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlobStorageArtifact if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlobStorageArtifact. + */ + public static BlobStorageArtifact fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlobStorageArtifact deserializedBlobStorageArtifact = new BlobStorageArtifact(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storeReference".equals(fieldName)) { + deserializedBlobStorageArtifact.setStoreReference(StoreReference.fromJson(reader)); + } else if ("properties".equals(fieldName)) { + deserializedBlobStorageArtifact.properties = BlobStorageArtifactProperties.fromJson(reader); + } else if ("storeKind".equals(fieldName)) { + deserializedBlobStorageArtifact.storeKind = StoreKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBlobStorageArtifact; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifactProperties.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifactProperties.java new file mode 100644 index 000000000000..a761958f4f97 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/BlobStorageArtifactProperties.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** + * Properties for blob storage account. + */ +@Fluent +public final class BlobStorageArtifactProperties implements JsonSerializable { + /* + * Location of the storage account. + */ + private String location; + + /* + * A list of blob storage account paths. + */ + private List paths; + + /** + * Creates an instance of BlobStorageArtifactProperties class. + */ + public BlobStorageArtifactProperties() { + } + + /** + * Get the location property: Location of the storage account. + * + * @return the location value. + */ + public String getLocation() { + return this.location; + } + + /** + * Get the paths property: A list of blob storage account paths. + * + * @return the paths value. + */ + public List getPaths() { + return this.paths; + } + + /** + * Set the paths property: A list of blob storage account paths. + * + * @param paths the paths value to set. + * @return the BlobStorageArtifactProperties object itself. + */ + public BlobStorageArtifactProperties setPaths(List paths) { + this.paths = paths; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("paths", this.paths, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlobStorageArtifactProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlobStorageArtifactProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BlobStorageArtifactProperties. + */ + public static BlobStorageArtifactProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlobStorageArtifactProperties deserializedBlobStorageArtifactProperties + = new BlobStorageArtifactProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("paths".equals(fieldName)) { + List paths = reader.readArray(reader1 -> StorageAccountPath.fromJson(reader1)); + deserializedBlobStorageArtifactProperties.paths = paths; + } else if ("location".equals(fieldName)) { + deserializedBlobStorageArtifactProperties.location = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBlobStorageArtifactProperties; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShare.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShare.java new file mode 100644 index 000000000000..3f886ff252da --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShare.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * An InPlace received share kind. + */ +@Fluent +public final class InPlaceReceivedShare extends ReceivedShare { + /* + * Defines the supported types for share. + */ + private ShareKind shareKind = ShareKind.IN_PLACE_SHARE_KIND; + + /* + * Properties of in place received share. + */ + private InPlaceReceivedShareProperties properties; + + /* + * Type of the resource. + */ + private String type; + + /* + * The unique id of the resource. + */ + private String id; + + /** + * Creates an instance of InPlaceReceivedShare class. + */ + public InPlaceReceivedShare() { + } + + /** + * Get the shareKind property: Defines the supported types for share. + * + * @return the shareKind value. + */ + @Override + public ShareKind getShareKind() { + return this.shareKind; + } + + /** + * Get the properties property: Properties of in place received share. + * + * @return the properties value. + */ + public InPlaceReceivedShareProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties of in place received share. + * + * @param properties the properties value to set. + * @return the InPlaceReceivedShare object itself. + */ + public InPlaceReceivedShare setProperties(InPlaceReceivedShareProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + @Override + public String getType() { + return this.type; + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + @Override + public String getId() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("shareKind", this.shareKind == null ? null : this.shareKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InPlaceReceivedShare from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InPlaceReceivedShare if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InPlaceReceivedShare. + */ + public static InPlaceReceivedShare fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InPlaceReceivedShare deserializedInPlaceReceivedShare = new InPlaceReceivedShare(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInPlaceReceivedShare.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInPlaceReceivedShare.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedInPlaceReceivedShare.properties = InPlaceReceivedShareProperties.fromJson(reader); + } else if ("shareKind".equals(fieldName)) { + deserializedInPlaceReceivedShare.shareKind = ShareKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInPlaceReceivedShare; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShareProperties.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShareProperties.java new file mode 100644 index 000000000000..9b164fe9a0a7 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceReceivedShareProperties.java @@ -0,0 +1,376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Properties of in place received share. + */ +@Fluent +public final class InPlaceReceivedShareProperties implements JsonSerializable { + /* + * Location of the shared Asset. + */ + private String assetLocation; + + /* + * The types of asset. + */ + private StoreKind assetStoreKind; + + /* + * Time at which the received share was created. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime createdAt; + + /* + * Received Share Name + */ + private String displayName; + + /* + * The expiration date of the received share. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime expirationDate; + + /* + * Email of the user/receiver who received the sent share invitation + */ + private String receiverEmail; + + /* + * Name of the user/receiver who received the sent share invitation + */ + private String receiverName; + + /* + * Tenant name of the user/receiver who received the sent share invitation + */ + private String receiverTenantName; + + /* + * Email of the sender who created the sent share invitation + */ + private String senderEmail; + + /* + * Name of the sender who created the sent share invitation + */ + private String senderName; + + /* + * Tenant name of the sender who created the sent share invitation + */ + private String senderTenantName; + + /* + * Share description. + */ + private String sentShareDescription; + + /* + * Time at which the sent share was shared. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime sharedAt; + + /* + * Share status. + */ + private ShareStatus shareStatus; + + /* + * Holds details on the destination of the mapped artifact + */ + private Sink sink; + + /* + * State of the resource + */ + private State state; + + /** + * Creates an instance of InPlaceReceivedShareProperties class. + */ + public InPlaceReceivedShareProperties() { + } + + /** + * Get the assetLocation property: Location of the shared Asset. + * + * @return the assetLocation value. + */ + public String getAssetLocation() { + return this.assetLocation; + } + + /** + * Get the assetStoreKind property: The types of asset. + * + * @return the assetStoreKind value. + */ + public StoreKind getAssetStoreKind() { + return this.assetStoreKind; + } + + /** + * Set the assetStoreKind property: The types of asset. + * + * @param assetStoreKind the assetStoreKind value to set. + * @return the InPlaceReceivedShareProperties object itself. + */ + public InPlaceReceivedShareProperties setAssetStoreKind(StoreKind assetStoreKind) { + this.assetStoreKind = assetStoreKind; + return this; + } + + /** + * Get the createdAt property: Time at which the received share was created. Represented in the standard date-time + * format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the createdAt value. + */ + public OffsetDateTime getCreatedAt() { + return this.createdAt; + } + + /** + * Get the displayName property: Received Share Name. + * + * @return the displayName value. + */ + public String getDisplayName() { + return this.displayName; + } + + /** + * Set the displayName property: Received Share Name. + * + * @param displayName the displayName value to set. + * @return the InPlaceReceivedShareProperties object itself. + */ + public InPlaceReceivedShareProperties setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the expirationDate property: The expiration date of the received share. Represented in the standard date-time + * format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the expirationDate value. + */ + public OffsetDateTime getExpirationDate() { + return this.expirationDate; + } + + /** + * Get the receiverEmail property: Email of the user/receiver who received the sent share invitation. + * + * @return the receiverEmail value. + */ + public String getReceiverEmail() { + return this.receiverEmail; + } + + /** + * Get the receiverName property: Name of the user/receiver who received the sent share invitation. + * + * @return the receiverName value. + */ + public String getReceiverName() { + return this.receiverName; + } + + /** + * Get the receiverTenantName property: Tenant name of the user/receiver who received the sent share invitation. + * + * @return the receiverTenantName value. + */ + public String getReceiverTenantName() { + return this.receiverTenantName; + } + + /** + * Get the senderEmail property: Email of the sender who created the sent share invitation. + * + * @return the senderEmail value. + */ + public String getSenderEmail() { + return this.senderEmail; + } + + /** + * Get the senderName property: Name of the sender who created the sent share invitation. + * + * @return the senderName value. + */ + public String getSenderName() { + return this.senderName; + } + + /** + * Get the senderTenantName property: Tenant name of the sender who created the sent share invitation. + * + * @return the senderTenantName value. + */ + public String getSenderTenantName() { + return this.senderTenantName; + } + + /** + * Get the sentShareDescription property: Share description. + * + * @return the sentShareDescription value. + */ + public String getSentShareDescription() { + return this.sentShareDescription; + } + + /** + * Get the sharedAt property: Time at which the sent share was shared. Represented in the standard date-time format + * as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the sharedAt value. + */ + public OffsetDateTime getSharedAt() { + return this.sharedAt; + } + + /** + * Get the shareStatus property: Share status. + * + * @return the shareStatus value. + */ + public ShareStatus getShareStatus() { + return this.shareStatus; + } + + /** + * Set the shareStatus property: Share status. + * + * @param shareStatus the shareStatus value to set. + * @return the InPlaceReceivedShareProperties object itself. + */ + public InPlaceReceivedShareProperties setShareStatus(ShareStatus shareStatus) { + this.shareStatus = shareStatus; + return this; + } + + /** + * Get the sink property: Holds details on the destination of the mapped artifact. + * + * @return the sink value. + */ + public Sink getSink() { + return this.sink; + } + + /** + * Set the sink property: Holds details on the destination of the mapped artifact. + * + * @param sink the sink value to set. + * @return the InPlaceReceivedShareProperties object itself. + */ + public InPlaceReceivedShareProperties setSink(Sink sink) { + this.sink = sink; + return this; + } + + /** + * Get the state property: State of the resource. + * + * @return the state value. + */ + public State getState() { + return this.state; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("assetStoreKind", + this.assetStoreKind == null ? null : this.assetStoreKind.toString()); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("shareStatus", this.shareStatus == null ? null : this.shareStatus.toString()); + jsonWriter.writeJsonField("sink", this.sink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InPlaceReceivedShareProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InPlaceReceivedShareProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InPlaceReceivedShareProperties. + */ + public static InPlaceReceivedShareProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InPlaceReceivedShareProperties deserializedInPlaceReceivedShareProperties + = new InPlaceReceivedShareProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("assetLocation".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.assetLocation = reader.getString(); + } else if ("assetStoreKind".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.assetStoreKind + = StoreKind.fromString(reader.getString()); + } else if ("createdAt".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.createdAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("displayName".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.displayName = reader.getString(); + } else if ("expirationDate".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.expirationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("receiverEmail".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.receiverEmail = reader.getString(); + } else if ("receiverName".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.receiverName = reader.getString(); + } else if ("receiverTenantName".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.receiverTenantName = reader.getString(); + } else if ("senderEmail".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.senderEmail = reader.getString(); + } else if ("senderName".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.senderName = reader.getString(); + } else if ("senderTenantName".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.senderTenantName = reader.getString(); + } else if ("sentShareDescription".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.sentShareDescription = reader.getString(); + } else if ("sharedAt".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.sharedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("shareStatus".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.shareStatus = ShareStatus.fromString(reader.getString()); + } else if ("sink".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.sink = Sink.fromJson(reader); + } else if ("state".equals(fieldName)) { + deserializedInPlaceReceivedShareProperties.state = State.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInPlaceReceivedShareProperties; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceSentShare.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceSentShare.java new file mode 100644 index 000000000000..40757bc8d1e9 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceSentShare.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * An InPlace share kind. + */ +@Fluent +public final class InPlaceSentShare extends SentShare { + /* + * Defines the supported types for share. + */ + private ShareKind shareKind = ShareKind.IN_PLACE_SHARE_KIND; + + /* + * Properties for InPlace sent share. + */ + private InPlaceSentShareProperties properties; + + /* + * Type of the resource. + */ + private String type; + + /* + * The unique id of the resource. + */ + private String id; + + /** + * Creates an instance of InPlaceSentShare class. + */ + public InPlaceSentShare() { + } + + /** + * Get the shareKind property: Defines the supported types for share. + * + * @return the shareKind value. + */ + @Override + public ShareKind getShareKind() { + return this.shareKind; + } + + /** + * Get the properties property: Properties for InPlace sent share. + * + * @return the properties value. + */ + public InPlaceSentShareProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties for InPlace sent share. + * + * @param properties the properties value to set. + * @return the InPlaceSentShare object itself. + */ + public InPlaceSentShare setProperties(InPlaceSentShareProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + @Override + public String getType() { + return this.type; + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + @Override + public String getId() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("shareKind", this.shareKind == null ? null : this.shareKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InPlaceSentShare from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InPlaceSentShare if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InPlaceSentShare. + */ + public static InPlaceSentShare fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InPlaceSentShare deserializedInPlaceSentShare = new InPlaceSentShare(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInPlaceSentShare.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInPlaceSentShare.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedInPlaceSentShare.properties = InPlaceSentShareProperties.fromJson(reader); + } else if ("shareKind".equals(fieldName)) { + deserializedInPlaceSentShare.shareKind = ShareKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInPlaceSentShare; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceSentShareProperties.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceSentShareProperties.java new file mode 100644 index 000000000000..cc223e21c286 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InPlaceSentShareProperties.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** + * Properties for InPlace sent share. + */ +@Fluent +public final class InPlaceSentShareProperties implements JsonSerializable { + /* + * A class for sent share artifact. + */ + private Artifact artifact; + + /* + * Time at which the sent share was created. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime createdAt; + + /* + * List of shares on which the sent share depends. + */ + private List dependsOn; + + /* + * Sent share description. + */ + private String description; + + /* + * The name of the sent share + */ + private String displayName; + + /* + * Email of the sender who created the sent share. + */ + private String senderEmail; + + /* + * Name of the sender who created the sent share. + */ + private String senderName; + + /* + * Tenant name of the sender who created the sent share. + */ + private String senderTenantName; + + /* + * State of the resource + */ + private State state; + + /** + * Creates an instance of InPlaceSentShareProperties class. + */ + public InPlaceSentShareProperties() { + } + + /** + * Get the artifact property: A class for sent share artifact. + * + * @return the artifact value. + */ + public Artifact getArtifact() { + return this.artifact; + } + + /** + * Set the artifact property: A class for sent share artifact. + * + * @param artifact the artifact value to set. + * @return the InPlaceSentShareProperties object itself. + */ + public InPlaceSentShareProperties setArtifact(Artifact artifact) { + this.artifact = artifact; + return this; + } + + /** + * Get the createdAt property: Time at which the sent share was created. Represented in the standard date-time + * format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the createdAt value. + */ + public OffsetDateTime getCreatedAt() { + return this.createdAt; + } + + /** + * Get the dependsOn property: List of shares on which the sent share depends. + * + * @return the dependsOn value. + */ + public List getDependsOn() { + return this.dependsOn; + } + + /** + * Get the description property: Sent share description. + * + * @return the description value. + */ + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Sent share description. + * + * @param description the description value to set. + * @return the InPlaceSentShareProperties object itself. + */ + public InPlaceSentShareProperties setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the displayName property: The name of the sent share. + * + * @return the displayName value. + */ + public String getDisplayName() { + return this.displayName; + } + + /** + * Set the displayName property: The name of the sent share. + * + * @param displayName the displayName value to set. + * @return the InPlaceSentShareProperties object itself. + */ + public InPlaceSentShareProperties setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the senderEmail property: Email of the sender who created the sent share. + * + * @return the senderEmail value. + */ + public String getSenderEmail() { + return this.senderEmail; + } + + /** + * Get the senderName property: Name of the sender who created the sent share. + * + * @return the senderName value. + */ + public String getSenderName() { + return this.senderName; + } + + /** + * Get the senderTenantName property: Tenant name of the sender who created the sent share. + * + * @return the senderTenantName value. + */ + public String getSenderTenantName() { + return this.senderTenantName; + } + + /** + * Get the state property: State of the resource. + * + * @return the state value. + */ + public State getState() { + return this.state; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("artifact", this.artifact); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InPlaceSentShareProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InPlaceSentShareProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InPlaceSentShareProperties. + */ + public static InPlaceSentShareProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InPlaceSentShareProperties deserializedInPlaceSentShareProperties = new InPlaceSentShareProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("artifact".equals(fieldName)) { + deserializedInPlaceSentShareProperties.artifact = Artifact.fromJson(reader); + } else if ("displayName".equals(fieldName)) { + deserializedInPlaceSentShareProperties.displayName = reader.getString(); + } else if ("createdAt".equals(fieldName)) { + deserializedInPlaceSentShareProperties.createdAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("dependsOn".equals(fieldName)) { + List dependsOn = reader.readArray( + reader1 -> reader1.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedInPlaceSentShareProperties.dependsOn = dependsOn; + } else if ("description".equals(fieldName)) { + deserializedInPlaceSentShareProperties.description = reader.getString(); + } else if ("senderEmail".equals(fieldName)) { + deserializedInPlaceSentShareProperties.senderEmail = reader.getString(); + } else if ("senderName".equals(fieldName)) { + deserializedInPlaceSentShareProperties.senderName = reader.getString(); + } else if ("senderTenantName".equals(fieldName)) { + deserializedInPlaceSentShareProperties.senderTenantName = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedInPlaceSentShareProperties.state = State.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInPlaceSentShareProperties; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InvitationKind.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InvitationKind.java new file mode 100644 index 000000000000..c0c7f1b1eb67 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/InvitationKind.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** + * The types of invitations. + */ +public final class InvitationKind extends ExpandableStringEnum { + /** + * The invitation is sent to a user. + */ + public static final InvitationKind USER_INVITATION = fromString("User"); + + /** + * The invitation is sent to a service. + */ + public static final InvitationKind SERVICE_INVITATION = fromString("Service"); + + /** + * Creates a new instance of InvitationKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InvitationKind() { + } + + /** + * Creates or finds a InvitationKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding InvitationKind. + */ + public static InvitationKind fromString(String name) { + return fromString(name, InvitationKind.class); + } + + /** + * Gets known InvitationKind values. + * + * @return known InvitationKind values. + */ + public static Collection values() { + return values(InvitationKind.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/OperationResponse.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/OperationResponse.java new file mode 100644 index 000000000000..873fb7291118 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/OperationResponse.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Response for long running operation. + */ +@Fluent +public final class OperationResponse implements JsonSerializable { + /* + * End time of the long running operation. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime endTime; + + /* + * The purview share error body model. + */ + private PurviewShareErrorInfo error; + + /* + * Job id of the long running operation + */ + private String id; + + /* + * Start time of the long running operation. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime startTime; + + /* + * States for long running operations. + */ + private OperationStatus status; + + /** + * Creates an instance of OperationResponse class. + */ + public OperationResponse() { + } + + /** + * Get the endTime property: End time of the long running operation. Represented in the standard date-time format as + * defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the endTime value. + */ + public OffsetDateTime getEndTime() { + return this.endTime; + } + + /** + * Set the endTime property: End time of the long running operation. Represented in the standard date-time format as + * defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @param endTime the endTime value to set. + * @return the OperationResponse object itself. + */ + public OperationResponse setEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the error property: The purview share error body model. + * + * @return the error value. + */ + public PurviewShareErrorInfo getError() { + return this.error; + } + + /** + * Set the error property: The purview share error body model. + * + * @param error the error value to set. + * @return the OperationResponse object itself. + */ + public OperationResponse setError(PurviewShareErrorInfo error) { + this.error = error; + return this; + } + + /** + * Get the id property: Job id of the long running operation. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: Job id of the long running operation. + * + * @param id the id value to set. + * @return the OperationResponse object itself. + */ + public OperationResponse setId(String id) { + this.id = id; + return this; + } + + /** + * Get the startTime property: Start time of the long running operation. Represented in the standard date-time + * format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the startTime value. + */ + public OffsetDateTime getStartTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time of the long running operation. Represented in the standard date-time + * format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @param startTime the startTime value to set. + * @return the OperationResponse object itself. + */ + public OperationResponse setStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the status property: States for long running operations. + * + * @return the status value. + */ + public OperationStatus getStatus() { + return this.status; + } + + /** + * Set the status property: States for long running operations. + * + * @param status the status value to set. + * @return the OperationResponse object itself. + */ + public OperationResponse setStatus(OperationStatus status) { + this.status = status; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationResponse if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationResponse. + */ + public static OperationResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationResponse deserializedOperationResponse = new OperationResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedOperationResponse.status = OperationStatus.fromString(reader.getString()); + } else if ("endTime".equals(fieldName)) { + deserializedOperationResponse.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("error".equals(fieldName)) { + deserializedOperationResponse.error = PurviewShareErrorInfo.fromJson(reader); + } else if ("id".equals(fieldName)) { + deserializedOperationResponse.id = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedOperationResponse.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationResponse; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/OperationStatus.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/OperationStatus.java new file mode 100644 index 000000000000..a3f3a6bd12e5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/OperationStatus.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** + * States for long running operations. + */ +public final class OperationStatus extends ExpandableStringEnum { + /** + * The long running operation is in 'Running' state. + */ + public static final OperationStatus LONG_RUNNING_OPERATION_STATE_IS_RUNNING = fromString("Running"); + + /** + * The long running operation hit a transient failure. + */ + public static final OperationStatus LONG_RUNNING_OPERATION_STATE_IS_TRANSIENT_FAILURE + = fromString("TransientFailure"); + + /** + * The long running operation is in 'Succeeded' state. + */ + public static final OperationStatus LONG_RUNNING_OPERATION_STATE_IS_SUCCEEDED = fromString("Succeeded"); + + /** + * The long running operation is in 'Failed' state. + */ + public static final OperationStatus LONG_RUNNING_OPERATION_STATE_IS_FAILED = fromString("Failed"); + + /** + * The long running operation has not started. + */ + public static final OperationStatus LONG_RUNNING_OPERATION_STATE_IS_NOT_STARTED = fromString("NotStarted"); + + /** + * Creates a new instance of OperationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OperationStatus() { + } + + /** + * Creates or finds a OperationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperationStatus. + */ + public static OperationStatus fromString(String name) { + return fromString(name, OperationStatus.class); + } + + /** + * Gets known OperationStatus values. + * + * @return known OperationStatus values. + */ + public static Collection values() { + return values(OperationStatus.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ProxyResource.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ProxyResource.java new file mode 100644 index 000000000000..fc2928b66c95 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ProxyResource.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * Base data transfer object implementation for proxy resources. + */ +@Immutable +public class ProxyResource implements JsonSerializable { + /* + * The unique id of the resource. + */ + private String id; + + /* + * Type of the resource. + */ + private String type; + + /** + * Creates an instance of ProxyResource class. + */ + public ProxyResource() { + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The unique id of the resource. + * + * @param id the id value to set. + * @return the ProxyResource object itself. + */ + ProxyResource setId(String id) { + this.id = id; + return this; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + public String getType() { + return this.type; + } + + /** + * Set the type property: Type of the resource. + * + * @param type the type value to set. + * @return the ProxyResource object itself. + */ + ProxyResource setType(String type) { + this.type = type; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProxyResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProxyResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ProxyResource. + */ + public static ProxyResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProxyResource deserializedProxyResource = new ProxyResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedProxyResource.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedProxyResource.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProxyResource; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareError.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareError.java new file mode 100644 index 000000000000..6af69e8938bd --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareError.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * The purview share error model. + */ +@Fluent +public final class PurviewShareError implements JsonSerializable { + /* + * The purview share error body model. + */ + private PurviewShareErrorInfo error; + + /** + * Creates an instance of PurviewShareError class. + */ + public PurviewShareError() { + } + + /** + * Get the error property: The purview share error body model. + * + * @return the error value. + */ + public PurviewShareErrorInfo getError() { + return this.error; + } + + /** + * Set the error property: The purview share error body model. + * + * @param error the error value to set. + * @return the PurviewShareError object itself. + */ + public PurviewShareError setError(PurviewShareErrorInfo error) { + this.error = error; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PurviewShareError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PurviewShareError if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PurviewShareError. + */ + public static PurviewShareError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PurviewShareError deserializedPurviewShareError = new PurviewShareError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + deserializedPurviewShareError.error = PurviewShareErrorInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPurviewShareError; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorException.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorException.java new file mode 100644 index 000000000000..29ef11bf02ff --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorException.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** + * Exception thrown for an invalid response with PurviewShareError information. + */ +public final class PurviewShareErrorException extends HttpResponseException { + /** + * Initializes a new instance of the PurviewShareErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public PurviewShareErrorException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the PurviewShareErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public PurviewShareErrorException(String message, HttpResponse response, PurviewShareError value) { + super(message, response, value); + } + + /** + * {@inheritDoc} + */ + @Override + public PurviewShareError getValue() { + return (PurviewShareError) super.getValue(); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorInfo.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorInfo.java new file mode 100644 index 000000000000..acc5c7df2ece --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/PurviewShareErrorInfo.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** + * The purview share error body model. + */ +@Fluent +public final class PurviewShareErrorInfo implements JsonSerializable { + /* + * Code of the error + */ + private String code; + + /* + * Nested details of the error model + */ + private List details; + + /* + * Message of the error + */ + private String message; + + /* + * Target of the error + */ + private String target; + + /** + * Creates an instance of PurviewShareErrorInfo class. + */ + public PurviewShareErrorInfo() { + } + + /** + * Get the code property: Code of the error. + * + * @return the code value. + */ + public String getCode() { + return this.code; + } + + /** + * Set the code property: Code of the error. + * + * @param code the code value to set. + * @return the PurviewShareErrorInfo object itself. + */ + public PurviewShareErrorInfo setCode(String code) { + this.code = code; + return this; + } + + /** + * Get the details property: Nested details of the error model. + * + * @return the details value. + */ + public List getDetails() { + return this.details; + } + + /** + * Set the details property: Nested details of the error model. + * + * @param details the details value to set. + * @return the PurviewShareErrorInfo object itself. + */ + public PurviewShareErrorInfo setDetails(List details) { + this.details = details; + return this; + } + + /** + * Get the message property: Message of the error. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: Message of the error. + * + * @param message the message value to set. + * @return the PurviewShareErrorInfo object itself. + */ + public PurviewShareErrorInfo setMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target property: Target of the error. + * + * @return the target value. + */ + public String getTarget() { + return this.target; + } + + /** + * Set the target property: Target of the error. + * + * @param target the target value to set. + * @return the PurviewShareErrorInfo object itself. + */ + public PurviewShareErrorInfo setTarget(String target) { + this.target = target; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("target", this.target); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PurviewShareErrorInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PurviewShareErrorInfo if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PurviewShareErrorInfo. + */ + public static PurviewShareErrorInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PurviewShareErrorInfo deserializedPurviewShareErrorInfo = new PurviewShareErrorInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedPurviewShareErrorInfo.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedPurviewShareErrorInfo.message = reader.getString(); + } else if ("details".equals(fieldName)) { + List details + = reader.readArray(reader1 -> PurviewShareErrorInfo.fromJson(reader1)); + deserializedPurviewShareErrorInfo.details = details; + } else if ("target".equals(fieldName)) { + deserializedPurviewShareErrorInfo.target = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPurviewShareErrorInfo; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedShare.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedShare.java new file mode 100644 index 000000000000..c411e975b8ca --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedShare.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * A received share data transfer object. + */ +@Immutable +public class ReceivedShare extends ProxyResource { + /* + * Defines the supported types for share. + */ + private ShareKind shareKind = ShareKind.fromString("ReceivedShare"); + + /* + * Type of the resource. + */ + private String type; + + /* + * The unique id of the resource. + */ + private String id; + + /** + * Creates an instance of ReceivedShare class. + */ + public ReceivedShare() { + } + + /** + * Get the shareKind property: Defines the supported types for share. + * + * @return the shareKind value. + */ + public ShareKind getShareKind() { + return this.shareKind; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + @Override + public String getType() { + return this.type; + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + @Override + public String getId() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("shareKind", this.shareKind == null ? null : this.shareKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReceivedShare from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReceivedShare if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ReceivedShare. + */ + public static ReceivedShare fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("shareKind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("InPlace".equals(discriminatorValue)) { + return InPlaceReceivedShare.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static ReceivedShare fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReceivedShare deserializedReceivedShare = new ReceivedShare(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedReceivedShare.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedReceivedShare.type = reader.getString(); + } else if ("shareKind".equals(fieldName)) { + deserializedReceivedShare.shareKind = ShareKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedReceivedShare; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedShareList.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedShareList.java new file mode 100644 index 000000000000..0598907e8ba2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedShareList.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** + * List of received shares. + */ +@Fluent +public final class ReceivedShareList implements JsonSerializable { + /* + * The Url of next result page. + */ + private String nextLink; + + /* + * Collection of items of type ReceivedShare + */ + private List value; + + /** + * Creates an instance of ReceivedShareList class. + */ + public ReceivedShareList() { + } + + /** + * Get the nextLink property: The Url of next result page. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The Url of next result page. + * + * @param nextLink the nextLink value to set. + * @return the ReceivedShareList object itself. + */ + public ReceivedShareList setNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: Collection of items of type ReceivedShare. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Set the value property: Collection of items of type ReceivedShare. + * + * @param value the value value to set. + * @return the ReceivedShareList object itself. + */ + public ReceivedShareList setValue(List value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReceivedShareList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReceivedShareList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ReceivedShareList. + */ + public static ReceivedShareList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReceivedShareList deserializedReceivedShareList = new ReceivedShareList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ReceivedShare.fromJson(reader1)); + deserializedReceivedShareList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedReceivedShareList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedReceivedShareList; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedSharesCreateOrReplaceReceivedShareHeaders.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedSharesCreateOrReplaceReceivedShareHeaders.java new file mode 100644 index 000000000000..a64dd73f821e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedSharesCreateOrReplaceReceivedShareHeaders.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The ReceivedSharesCreateOrReplaceReceivedShareHeaders model. + */ +@Fluent +public final class ReceivedSharesCreateOrReplaceReceivedShareHeaders { + /* + * The Operation-Location property. + */ + private String operationLocation; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ReceivedSharesCreateOrReplaceReceivedShareHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ReceivedSharesCreateOrReplaceReceivedShareHeaders(HttpHeaders rawHeaders) { + this.operationLocation = rawHeaders.getValue(HttpHeaderName.OPERATION_LOCATION); + } + + /** + * Get the operationLocation property: The Operation-Location property. + * + * @return the operationLocation value. + */ + public String getOperationLocation() { + return this.operationLocation; + } + + /** + * Set the operationLocation property: The Operation-Location property. + * + * @param operationLocation the operationLocation value to set. + * @return the ReceivedSharesCreateOrReplaceReceivedShareHeaders object itself. + */ + public ReceivedSharesCreateOrReplaceReceivedShareHeaders setOperationLocation(String operationLocation) { + this.operationLocation = operationLocation; + return this; + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedSharesDeleteReceivedShareHeaders.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedSharesDeleteReceivedShareHeaders.java new file mode 100644 index 000000000000..4b95d7b04c63 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReceivedSharesDeleteReceivedShareHeaders.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The ReceivedSharesDeleteReceivedShareHeaders model. + */ +@Fluent +public final class ReceivedSharesDeleteReceivedShareHeaders { + /* + * The Operation-Location property. + */ + private String operationLocation; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ReceivedSharesDeleteReceivedShareHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ReceivedSharesDeleteReceivedShareHeaders(HttpHeaders rawHeaders) { + this.operationLocation = rawHeaders.getValue(HttpHeaderName.OPERATION_LOCATION); + } + + /** + * Get the operationLocation property: The Operation-Location property. + * + * @return the operationLocation value. + */ + public String getOperationLocation() { + return this.operationLocation; + } + + /** + * Set the operationLocation property: The Operation-Location property. + * + * @param operationLocation the operationLocation value to set. + * @return the ReceivedSharesDeleteReceivedShareHeaders object itself. + */ + public ReceivedSharesDeleteReceivedShareHeaders setOperationLocation(String operationLocation) { + this.operationLocation = operationLocation; + return this; + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReferenceNameType.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReferenceNameType.java new file mode 100644 index 000000000000..14c330eb364f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ReferenceNameType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** + * Defines the type of resource being shared. + */ +public final class ReferenceNameType extends ExpandableStringEnum { + /** + * The type of reference is an ARM resource. + */ + public static final ReferenceNameType ARM_RESOURCE_REFERENCE = fromString("ArmResourceReference"); + + /** + * Creates a new instance of ReferenceNameType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReferenceNameType() { + } + + /** + * Creates or finds a ReferenceNameType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ReferenceNameType. + */ + public static ReferenceNameType fromString(String name) { + return fromString(name, ReferenceNameType.class); + } + + /** + * Gets known ReferenceNameType values. + * + * @return known ReferenceNameType values. + */ + public static Collection values() { + return values(ReferenceNameType.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShare.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShare.java new file mode 100644 index 000000000000..f88c05c7722c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShare.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * A sent share data transfer object. + */ +@Immutable +public class SentShare extends ProxyResource { + /* + * Defines the supported types for share. + */ + private ShareKind shareKind = ShareKind.fromString("SentShare"); + + /* + * Type of the resource. + */ + private String type; + + /* + * The unique id of the resource. + */ + private String id; + + /** + * Creates an instance of SentShare class. + */ + public SentShare() { + } + + /** + * Get the shareKind property: Defines the supported types for share. + * + * @return the shareKind value. + */ + public ShareKind getShareKind() { + return this.shareKind; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + @Override + public String getType() { + return this.type; + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + @Override + public String getId() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("shareKind", this.shareKind == null ? null : this.shareKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SentShare from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SentShare if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the SentShare. + */ + public static SentShare fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("shareKind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("InPlace".equals(discriminatorValue)) { + return InPlaceSentShare.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static SentShare fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SentShare deserializedSentShare = new SentShare(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSentShare.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSentShare.type = reader.getString(); + } else if ("shareKind".equals(fieldName)) { + deserializedSentShare.shareKind = ShareKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSentShare; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareInvitation.java new file mode 100644 index 000000000000..313e225429e1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareInvitation.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * A sent share invitation data transfer object. + */ +@Immutable +public class SentShareInvitation extends ProxyResource { + /* + * The types of invitations. + */ + private InvitationKind invitationKind = InvitationKind.fromString("SentShareInvitation"); + + /* + * Type of the resource. + */ + private String type; + + /* + * The unique id of the resource. + */ + private String id; + + /** + * Creates an instance of SentShareInvitation class. + */ + public SentShareInvitation() { + } + + /** + * Get the invitationKind property: The types of invitations. + * + * @return the invitationKind value. + */ + public InvitationKind getInvitationKind() { + return this.invitationKind; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + @Override + public String getType() { + return this.type; + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + @Override + public String getId() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("invitationKind", + this.invitationKind == null ? null : this.invitationKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SentShareInvitation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SentShareInvitation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SentShareInvitation. + */ + public static SentShareInvitation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("invitationKind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Service".equals(discriminatorValue)) { + return ServiceInvitation.fromJson(readerToUse.reset()); + } else if ("User".equals(discriminatorValue)) { + return UserInvitation.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static SentShareInvitation fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SentShareInvitation deserializedSentShareInvitation = new SentShareInvitation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSentShareInvitation.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSentShareInvitation.type = reader.getString(); + } else if ("invitationKind".equals(fieldName)) { + deserializedSentShareInvitation.invitationKind = InvitationKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSentShareInvitation; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareInvitationList.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareInvitationList.java new file mode 100644 index 000000000000..77b8b6885215 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareInvitationList.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** + * List of the sent share invitations. + */ +@Fluent +public final class SentShareInvitationList implements JsonSerializable { + /* + * The Url of next result page. + */ + private String nextLink; + + /* + * Collection of items of type SentShareInvitation + */ + private List value; + + /** + * Creates an instance of SentShareInvitationList class. + */ + public SentShareInvitationList() { + } + + /** + * Get the nextLink property: The Url of next result page. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The Url of next result page. + * + * @param nextLink the nextLink value to set. + * @return the SentShareInvitationList object itself. + */ + public SentShareInvitationList setNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: Collection of items of type SentShareInvitation. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Set the value property: Collection of items of type SentShareInvitation. + * + * @param value the value value to set. + * @return the SentShareInvitationList object itself. + */ + public SentShareInvitationList setValue(List value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SentShareInvitationList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SentShareInvitationList if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SentShareInvitationList. + */ + public static SentShareInvitationList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SentShareInvitationList deserializedSentShareInvitationList = new SentShareInvitationList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SentShareInvitation.fromJson(reader1)); + deserializedSentShareInvitationList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSentShareInvitationList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSentShareInvitationList; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareList.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareList.java new file mode 100644 index 000000000000..e42ade96603c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentShareList.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** + * List of sent shares. + */ +@Fluent +public final class SentShareList implements JsonSerializable { + /* + * The Url of next result page. + */ + private String nextLink; + + /* + * Collection of items of type SentShare + */ + private List value; + + /** + * Creates an instance of SentShareList class. + */ + public SentShareList() { + } + + /** + * Get the nextLink property: The Url of next result page. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The Url of next result page. + * + * @param nextLink the nextLink value to set. + * @return the SentShareList object itself. + */ + public SentShareList setNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: Collection of items of type SentShare. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Set the value property: Collection of items of type SentShare. + * + * @param value the value value to set. + * @return the SentShareList object itself. + */ + public SentShareList setValue(List value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SentShareList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SentShareList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SentShareList. + */ + public static SentShareList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SentShareList deserializedSentShareList = new SentShareList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SentShare.fromJson(reader1)); + deserializedSentShareList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSentShareList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSentShareList; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesCreateOrReplaceSentShareHeaders.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesCreateOrReplaceSentShareHeaders.java new file mode 100644 index 000000000000..4dac4e5ab578 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesCreateOrReplaceSentShareHeaders.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The SentSharesCreateOrReplaceSentShareHeaders model. + */ +@Fluent +public final class SentSharesCreateOrReplaceSentShareHeaders { + /* + * The Operation-Location property. + */ + private String operationLocation; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of SentSharesCreateOrReplaceSentShareHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public SentSharesCreateOrReplaceSentShareHeaders(HttpHeaders rawHeaders) { + this.operationLocation = rawHeaders.getValue(HttpHeaderName.OPERATION_LOCATION); + } + + /** + * Get the operationLocation property: The Operation-Location property. + * + * @return the operationLocation value. + */ + public String getOperationLocation() { + return this.operationLocation; + } + + /** + * Set the operationLocation property: The Operation-Location property. + * + * @param operationLocation the operationLocation value to set. + * @return the SentSharesCreateOrReplaceSentShareHeaders object itself. + */ + public SentSharesCreateOrReplaceSentShareHeaders setOperationLocation(String operationLocation) { + this.operationLocation = operationLocation; + return this; + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesDeleteSentShareHeaders.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesDeleteSentShareHeaders.java new file mode 100644 index 000000000000..b91b31fdf663 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesDeleteSentShareHeaders.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The SentSharesDeleteSentShareHeaders model. + */ +@Fluent +public final class SentSharesDeleteSentShareHeaders { + /* + * The Operation-Location property. + */ + private String operationLocation; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of SentSharesDeleteSentShareHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public SentSharesDeleteSentShareHeaders(HttpHeaders rawHeaders) { + this.operationLocation = rawHeaders.getValue(HttpHeaderName.OPERATION_LOCATION); + } + + /** + * Get the operationLocation property: The Operation-Location property. + * + * @return the operationLocation value. + */ + public String getOperationLocation() { + return this.operationLocation; + } + + /** + * Set the operationLocation property: The Operation-Location property. + * + * @param operationLocation the operationLocation value to set. + * @return the SentSharesDeleteSentShareHeaders object itself. + */ + public SentSharesDeleteSentShareHeaders setOperationLocation(String operationLocation) { + this.operationLocation = operationLocation; + return this; + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesDeleteSentShareInvitationHeaders.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesDeleteSentShareInvitationHeaders.java new file mode 100644 index 000000000000..09a0e012702b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/SentSharesDeleteSentShareInvitationHeaders.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The SentSharesDeleteSentShareInvitationHeaders model. + */ +@Fluent +public final class SentSharesDeleteSentShareInvitationHeaders { + /* + * The Operation-Location property. + */ + private String operationLocation; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of SentSharesDeleteSentShareInvitationHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public SentSharesDeleteSentShareInvitationHeaders(HttpHeaders rawHeaders) { + this.operationLocation = rawHeaders.getValue(HttpHeaderName.OPERATION_LOCATION); + } + + /** + * Get the operationLocation property: The Operation-Location property. + * + * @return the operationLocation value. + */ + public String getOperationLocation() { + return this.operationLocation; + } + + /** + * Set the operationLocation property: The Operation-Location property. + * + * @param operationLocation the operationLocation value to set. + * @return the SentSharesDeleteSentShareInvitationHeaders object itself. + */ + public SentSharesDeleteSentShareInvitationHeaders setOperationLocation(String operationLocation) { + this.operationLocation = operationLocation; + return this; + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ServiceInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ServiceInvitation.java new file mode 100644 index 000000000000..275a987eb2b1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ServiceInvitation.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * An service invitation kind. + */ +@Fluent +public final class ServiceInvitation extends SentShareInvitation { + /* + * The types of invitations. + */ + private InvitationKind invitationKind = InvitationKind.SERVICE_INVITATION; + + /* + * Properties of the service invitation type. + */ + private ServiceInvitationProperties properties; + + /* + * Type of the resource. + */ + private String type; + + /* + * The unique id of the resource. + */ + private String id; + + /** + * Creates an instance of ServiceInvitation class. + */ + public ServiceInvitation() { + } + + /** + * Get the invitationKind property: The types of invitations. + * + * @return the invitationKind value. + */ + @Override + public InvitationKind getInvitationKind() { + return this.invitationKind; + } + + /** + * Get the properties property: Properties of the service invitation type. + * + * @return the properties value. + */ + public ServiceInvitationProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties of the service invitation type. + * + * @param properties the properties value to set. + * @return the ServiceInvitation object itself. + */ + public ServiceInvitation setProperties(ServiceInvitationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + @Override + public String getType() { + return this.type; + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + @Override + public String getId() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("invitationKind", + this.invitationKind == null ? null : this.invitationKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceInvitation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceInvitation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServiceInvitation. + */ + public static ServiceInvitation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceInvitation deserializedServiceInvitation = new ServiceInvitation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServiceInvitation.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServiceInvitation.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServiceInvitation.properties = ServiceInvitationProperties.fromJson(reader); + } else if ("invitationKind".equals(fieldName)) { + deserializedServiceInvitation.invitationKind = InvitationKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceInvitation; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ServiceInvitationProperties.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ServiceInvitationProperties.java new file mode 100644 index 000000000000..a2efc9492f8b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ServiceInvitationProperties.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Objects; +import java.util.UUID; + +/** + * Properties of the service invitation type. + */ +@Fluent +public final class ServiceInvitationProperties implements JsonSerializable { + /* + * The time at which the invitation will expire. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime expirationDate; + + /* + * Email address of the sender. + */ + private String senderEmail; + + /* + * Name of the sender + */ + private String senderName; + + /* + * Tenant name of the sender + */ + private String senderTenantName; + + /* + * Gets the time at which the invitation was sent. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime sentAt; + + /* + * Share status. + */ + private ShareStatus shareStatus; + + /* + * State of the resource + */ + private State state; + + /* + * The target azure active directory id the invitation is sent to. + */ + private UUID targetActiveDirectoryId; + + /* + * The target object id in the azure active directory the invitation is sent to. + */ + private UUID targetObjectId; + + /** + * Creates an instance of ServiceInvitationProperties class. + */ + public ServiceInvitationProperties() { + } + + /** + * Get the expirationDate property: The time at which the invitation will expire. Represented in the standard + * date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the expirationDate value. + */ + public OffsetDateTime getExpirationDate() { + return this.expirationDate; + } + + /** + * Set the expirationDate property: The time at which the invitation will expire. Represented in the standard + * date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @param expirationDate the expirationDate value to set. + * @return the ServiceInvitationProperties object itself. + */ + public ServiceInvitationProperties setExpirationDate(OffsetDateTime expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get the senderEmail property: Email address of the sender. + * + * @return the senderEmail value. + */ + public String getSenderEmail() { + return this.senderEmail; + } + + /** + * Get the senderName property: Name of the sender. + * + * @return the senderName value. + */ + public String getSenderName() { + return this.senderName; + } + + /** + * Get the senderTenantName property: Tenant name of the sender. + * + * @return the senderTenantName value. + */ + public String getSenderTenantName() { + return this.senderTenantName; + } + + /** + * Get the sentAt property: Gets the time at which the invitation was sent. Represented in the standard date-time + * format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the sentAt value. + */ + public OffsetDateTime getSentAt() { + return this.sentAt; + } + + /** + * Get the shareStatus property: Share status. + * + * @return the shareStatus value. + */ + public ShareStatus getShareStatus() { + return this.shareStatus; + } + + /** + * Set the shareStatus property: Share status. + * + * @param shareStatus the shareStatus value to set. + * @return the ServiceInvitationProperties object itself. + */ + public ServiceInvitationProperties setShareStatus(ShareStatus shareStatus) { + this.shareStatus = shareStatus; + return this; + } + + /** + * Get the state property: State of the resource. + * + * @return the state value. + */ + public State getState() { + return this.state; + } + + /** + * Get the targetActiveDirectoryId property: The target azure active directory id the invitation is sent to. + * + * @return the targetActiveDirectoryId value. + */ + public UUID getTargetActiveDirectoryId() { + return this.targetActiveDirectoryId; + } + + /** + * Set the targetActiveDirectoryId property: The target azure active directory id the invitation is sent to. + * + * @param targetActiveDirectoryId the targetActiveDirectoryId value to set. + * @return the ServiceInvitationProperties object itself. + */ + public ServiceInvitationProperties setTargetActiveDirectoryId(UUID targetActiveDirectoryId) { + this.targetActiveDirectoryId = targetActiveDirectoryId; + return this; + } + + /** + * Get the targetObjectId property: The target object id in the azure active directory the invitation is sent to. + * + * @return the targetObjectId value. + */ + public UUID getTargetObjectId() { + return this.targetObjectId; + } + + /** + * Set the targetObjectId property: The target object id in the azure active directory the invitation is sent to. + * + * @param targetObjectId the targetObjectId value to set. + * @return the ServiceInvitationProperties object itself. + */ + public ServiceInvitationProperties setTargetObjectId(UUID targetObjectId) { + this.targetObjectId = targetObjectId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetActiveDirectoryId", Objects.toString(this.targetActiveDirectoryId, null)); + jsonWriter.writeStringField("targetObjectId", Objects.toString(this.targetObjectId, null)); + jsonWriter.writeStringField("expirationDate", + this.expirationDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationDate)); + jsonWriter.writeStringField("shareStatus", this.shareStatus == null ? null : this.shareStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceInvitationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceInvitationProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServiceInvitationProperties. + */ + public static ServiceInvitationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceInvitationProperties deserializedServiceInvitationProperties = new ServiceInvitationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetActiveDirectoryId".equals(fieldName)) { + deserializedServiceInvitationProperties.targetActiveDirectoryId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("targetObjectId".equals(fieldName)) { + deserializedServiceInvitationProperties.targetObjectId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("expirationDate".equals(fieldName)) { + deserializedServiceInvitationProperties.expirationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("senderEmail".equals(fieldName)) { + deserializedServiceInvitationProperties.senderEmail = reader.getString(); + } else if ("senderName".equals(fieldName)) { + deserializedServiceInvitationProperties.senderName = reader.getString(); + } else if ("senderTenantName".equals(fieldName)) { + deserializedServiceInvitationProperties.senderTenantName = reader.getString(); + } else if ("sentAt".equals(fieldName)) { + deserializedServiceInvitationProperties.sentAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("shareStatus".equals(fieldName)) { + deserializedServiceInvitationProperties.shareStatus = ShareStatus.fromString(reader.getString()); + } else if ("state".equals(fieldName)) { + deserializedServiceInvitationProperties.state = State.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceInvitationProperties; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareKind.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareKind.java new file mode 100644 index 000000000000..1cb2056e96eb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareKind.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** + * Defines the supported types for share. + */ +public final class ShareKind extends ExpandableStringEnum { + /** + * The type of share is in-place sharing. + */ + public static final ShareKind IN_PLACE_SHARE_KIND = fromString("InPlace"); + + /** + * Creates a new instance of ShareKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ShareKind() { + } + + /** + * Creates or finds a ShareKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ShareKind. + */ + public static ShareKind fromString(String name) { + return fromString(name, ShareKind.class); + } + + /** + * Gets known ShareKind values. + * + * @return known ShareKind values. + */ + public static Collection values() { + return values(ShareKind.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareResource.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareResource.java new file mode 100644 index 000000000000..089e7252507d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareResource.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * A share resource. + */ +@Fluent +public final class ShareResource extends ProxyResource { + /* + * A count of Received Shares associated with the + * Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. + */ + private Integer receivedSharesCount; + + /* + * A count of Sent Shares associated with the + * Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. + */ + private Integer sentSharesCount; + + /* + * The types of asset. + */ + private StoreKind storeKind; + + /* + * A Store Reference for an artifact or sink. + */ + private StoreReference storeReference; + + /* + * Type of the resource. + */ + private String type; + + /* + * The unique id of the resource. + */ + private String id; + + /** + * Creates an instance of ShareResource class. + */ + public ShareResource() { + } + + /** + * Get the receivedSharesCount property: A count of Received Shares associated with the + * Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. + * + * @return the receivedSharesCount value. + */ + public Integer getReceivedSharesCount() { + return this.receivedSharesCount; + } + + /** + * Set the receivedSharesCount property: A count of Received Shares associated with the + * Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. + * + * @param receivedSharesCount the receivedSharesCount value to set. + * @return the ShareResource object itself. + */ + public ShareResource setReceivedSharesCount(Integer receivedSharesCount) { + this.receivedSharesCount = receivedSharesCount; + return this; + } + + /** + * Get the sentSharesCount property: A count of Sent Shares associated with the + * Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. + * + * @return the sentSharesCount value. + */ + public Integer getSentSharesCount() { + return this.sentSharesCount; + } + + /** + * Set the sentSharesCount property: A count of Sent Shares associated with the + * Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. + * + * @param sentSharesCount the sentSharesCount value to set. + * @return the ShareResource object itself. + */ + public ShareResource setSentSharesCount(Integer sentSharesCount) { + this.sentSharesCount = sentSharesCount; + return this; + } + + /** + * Get the storeKind property: The types of asset. + * + * @return the storeKind value. + */ + public StoreKind getStoreKind() { + return this.storeKind; + } + + /** + * Set the storeKind property: The types of asset. + * + * @param storeKind the storeKind value to set. + * @return the ShareResource object itself. + */ + public ShareResource setStoreKind(StoreKind storeKind) { + this.storeKind = storeKind; + return this; + } + + /** + * Get the storeReference property: A Store Reference for an artifact or sink. + * + * @return the storeReference value. + */ + public StoreReference getStoreReference() { + return this.storeReference; + } + + /** + * Set the storeReference property: A Store Reference for an artifact or sink. + * + * @param storeReference the storeReference value to set. + * @return the ShareResource object itself. + */ + public ShareResource setStoreReference(StoreReference storeReference) { + this.storeReference = storeReference; + return this; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + @Override + public String getType() { + return this.type; + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + @Override + public String getId() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("receivedSharesCount", this.receivedSharesCount); + jsonWriter.writeNumberField("sentSharesCount", this.sentSharesCount); + jsonWriter.writeStringField("storeKind", this.storeKind == null ? null : this.storeKind.toString()); + jsonWriter.writeJsonField("storeReference", this.storeReference); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ShareResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ShareResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ShareResource. + */ + public static ShareResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ShareResource deserializedShareResource = new ShareResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedShareResource.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedShareResource.type = reader.getString(); + } else if ("receivedSharesCount".equals(fieldName)) { + deserializedShareResource.receivedSharesCount = reader.getNullable(JsonReader::getInt); + } else if ("sentSharesCount".equals(fieldName)) { + deserializedShareResource.sentSharesCount = reader.getNullable(JsonReader::getInt); + } else if ("storeKind".equals(fieldName)) { + deserializedShareResource.storeKind = StoreKind.fromString(reader.getString()); + } else if ("storeReference".equals(fieldName)) { + deserializedShareResource.storeReference = StoreReference.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedShareResource; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareResourceList.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareResourceList.java new file mode 100644 index 000000000000..1b92d8478272 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareResourceList.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** + * A page of ShareResource results. + */ +@Fluent +public final class ShareResourceList implements JsonSerializable { + /* + * The Url of next result page. + */ + private String nextLink; + + /* + * Collection of items of type ShareResource + */ + private List value; + + /** + * Creates an instance of ShareResourceList class. + */ + public ShareResourceList() { + } + + /** + * Get the nextLink property: The Url of next result page. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The Url of next result page. + * + * @param nextLink the nextLink value to set. + * @return the ShareResourceList object itself. + */ + public ShareResourceList setNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: Collection of items of type ShareResource. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Set the value property: Collection of items of type ShareResource. + * + * @param value the value value to set. + * @return the ShareResourceList object itself. + */ + public ShareResourceList setValue(List value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ShareResourceList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ShareResourceList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ShareResourceList. + */ + public static ShareResourceList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ShareResourceList deserializedShareResourceList = new ShareResourceList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ShareResource.fromJson(reader1)); + deserializedShareResourceList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedShareResourceList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedShareResourceList; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareStatus.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareStatus.java new file mode 100644 index 000000000000..ee661914eacf --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/ShareStatus.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** + * Share status. + */ +public final class ShareStatus extends ExpandableStringEnum { + /** + * The share has not been accepted yet. + */ + public static final ShareStatus DETACHED_SHARE_STATUS = fromString("Detached"); + + /** + * The share has been accepted by the recipient. + */ + public static final ShareStatus ATTACHED_SHARE_STATUS = fromString("Attached"); + + /** + * Creates a new instance of ShareStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ShareStatus() { + } + + /** + * Creates or finds a ShareStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ShareStatus. + */ + public static ShareStatus fromString(String name) { + return fromString(name, ShareStatus.class); + } + + /** + * Gets known ShareStatus values. + * + * @return known ShareStatus values. + */ + public static Collection values() { + return values(ShareStatus.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/Sink.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/Sink.java new file mode 100644 index 000000000000..f2fa4e99df07 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/Sink.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * Holds details on the destination of the mapped artifact. + */ +@Fluent +public class Sink implements JsonSerializable { + /* + * The types of asset. + */ + private StoreKind storeKind = StoreKind.fromString("Sink"); + + /* + * A Store Reference for an artifact or sink. + */ + private StoreReference storeReference; + + /** + * Creates an instance of Sink class. + */ + public Sink() { + } + + /** + * Get the storeKind property: The types of asset. + * + * @return the storeKind value. + */ + public StoreKind getStoreKind() { + return this.storeKind; + } + + /** + * Get the storeReference property: A Store Reference for an artifact or sink. + * + * @return the storeReference value. + */ + public StoreReference getStoreReference() { + return this.storeReference; + } + + /** + * Set the storeReference property: A Store Reference for an artifact or sink. + * + * @param storeReference the storeReference value to set. + * @return the Sink object itself. + */ + public Sink setStoreReference(StoreReference storeReference) { + this.storeReference = storeReference; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("storeReference", this.storeReference); + jsonWriter.writeStringField("storeKind", this.storeKind == null ? null : this.storeKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Sink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Sink if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Sink. + */ + public static Sink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("storeKind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("AdlsGen2Account".equals(discriminatorValue)) { + return AdlsGen2AccountSink.fromJson(readerToUse.reset()); + } else if ("BlobAccount".equals(discriminatorValue)) { + return BlobAccountSink.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static Sink fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Sink deserializedSink = new Sink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storeReference".equals(fieldName)) { + deserializedSink.storeReference = StoreReference.fromJson(reader); + } else if ("storeKind".equals(fieldName)) { + deserializedSink.storeKind = StoreKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSink; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/State.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/State.java new file mode 100644 index 000000000000..44fc809c624d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/State.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** + * State of the resource. + */ +public final class State extends ExpandableStringEnum { + /** + * The state of the resource is 'Unknown'. + */ + public static final State UNKNOWN_STATE = fromString("Unknown"); + + /** + * The state of the resource is 'Succeeded'. + */ + public static final State SUCCEEDED_STATE = fromString("Succeeded"); + + /** + * The state of the resource is 'Creating'. + */ + public static final State CREATING_STATE = fromString("Creating"); + + /** + * The state of the resource is 'Deleting'. + */ + public static final State DELETING_STATE = fromString("Deleting"); + + /** + * The state of the resource is 'Moving'. + */ + public static final State MOVING_STATE = fromString("Moving"); + + /** + * The state of the resource is 'Failed'. + */ + public static final State FAILED_STATE = fromString("Failed"); + + /** + * Creates a new instance of State value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public State() { + } + + /** + * Creates or finds a State from its string representation. + * + * @param name a name to look for. + * @return the corresponding State. + */ + public static State fromString(String name) { + return fromString(name, State.class); + } + + /** + * Gets known State values. + * + * @return known State values. + */ + public static Collection values() { + return values(State.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StorageAccountPath.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StorageAccountPath.java new file mode 100644 index 000000000000..18dee03bb825 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StorageAccountPath.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * Defines a single StorageAccountPath path. + */ +@Fluent +public final class StorageAccountPath implements JsonSerializable { + /* + * Gets or sets the container name + */ + private String containerName; + + /* + * Gets or sets the path on the receiver side where the artifact is to be mapped + */ + private String receiverPath; + + /* + * Gets or sets the path to file/folder within the container to be shared + */ + private String senderPath; + + /** + * Creates an instance of StorageAccountPath class. + */ + public StorageAccountPath() { + } + + /** + * Get the containerName property: Gets or sets the container name. + * + * @return the containerName value. + */ + public String getContainerName() { + return this.containerName; + } + + /** + * Set the containerName property: Gets or sets the container name. + * + * @param containerName the containerName value to set. + * @return the StorageAccountPath object itself. + */ + public StorageAccountPath setContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the receiverPath property: Gets or sets the path on the receiver side where the artifact is to be mapped. + * + * @return the receiverPath value. + */ + public String getReceiverPath() { + return this.receiverPath; + } + + /** + * Set the receiverPath property: Gets or sets the path on the receiver side where the artifact is to be mapped. + * + * @param receiverPath the receiverPath value to set. + * @return the StorageAccountPath object itself. + */ + public StorageAccountPath setReceiverPath(String receiverPath) { + this.receiverPath = receiverPath; + return this; + } + + /** + * Get the senderPath property: Gets or sets the path to file/folder within the container to be shared. + * + * @return the senderPath value. + */ + public String getSenderPath() { + return this.senderPath; + } + + /** + * Set the senderPath property: Gets or sets the path to file/folder within the container to be shared. + * + * @param senderPath the senderPath value to set. + * @return the StorageAccountPath object itself. + */ + public StorageAccountPath setSenderPath(String senderPath) { + this.senderPath = senderPath; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("containerName", this.containerName); + jsonWriter.writeStringField("receiverPath", this.receiverPath); + jsonWriter.writeStringField("senderPath", this.senderPath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageAccountPath from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageAccountPath if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the StorageAccountPath. + */ + public static StorageAccountPath fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageAccountPath deserializedStorageAccountPath = new StorageAccountPath(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("containerName".equals(fieldName)) { + deserializedStorageAccountPath.containerName = reader.getString(); + } else if ("receiverPath".equals(fieldName)) { + deserializedStorageAccountPath.receiverPath = reader.getString(); + } else if ("senderPath".equals(fieldName)) { + deserializedStorageAccountPath.senderPath = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageAccountPath; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StoreKind.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StoreKind.java new file mode 100644 index 000000000000..ce8b8a1ad58b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StoreKind.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** + * The types of asset. + */ +public final class StoreKind extends ExpandableStringEnum { + /** + * The store kind is a Adls Gen 2 storage account. + */ + public static final StoreKind ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND = fromString("AdlsGen2Account"); + + /** + * The store kind is a Blob storage account. + */ + public static final StoreKind BLOB_STORAGE_ACCOUNT_STORE_KIND = fromString("BlobAccount"); + + /** + * Creates a new instance of StoreKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StoreKind() { + } + + /** + * Creates or finds a StoreKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding StoreKind. + */ + public static StoreKind fromString(String name) { + return fromString(name, StoreKind.class); + } + + /** + * Gets known StoreKind values. + * + * @return known StoreKind values. + */ + public static Collection values() { + return values(StoreKind.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StoreReference.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StoreReference.java new file mode 100644 index 000000000000..ee7e3681e51d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/StoreReference.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * A Store Reference for an artifact or sink. + */ +@Fluent +public final class StoreReference implements JsonSerializable { + /* + * Reference name for resource associated with the sink or artifact. + */ + private String referenceName; + + /* + * Defines the type of resource being shared + */ + private ReferenceNameType type; + + /** + * Creates an instance of StoreReference class. + */ + public StoreReference() { + } + + /** + * Get the referenceName property: Reference name for resource associated with the sink or artifact. + * + * @return the referenceName value. + */ + public String getReferenceName() { + return this.referenceName; + } + + /** + * Set the referenceName property: Reference name for resource associated with the sink or artifact. + * + * @param referenceName the referenceName value to set. + * @return the StoreReference object itself. + */ + public StoreReference setReferenceName(String referenceName) { + this.referenceName = referenceName; + return this; + } + + /** + * Get the type property: Defines the type of resource being shared. + * + * @return the type value. + */ + public ReferenceNameType getType() { + return this.type; + } + + /** + * Set the type property: Defines the type of resource being shared. + * + * @param type the type value to set. + * @return the StoreReference object itself. + */ + public StoreReference setType(ReferenceNameType type) { + this.type = type; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("referenceName", this.referenceName); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StoreReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StoreReference if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the StoreReference. + */ + public static StoreReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StoreReference deserializedStoreReference = new StoreReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("referenceName".equals(fieldName)) { + deserializedStoreReference.referenceName = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedStoreReference.type = ReferenceNameType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedStoreReference; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistration.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistration.java new file mode 100644 index 000000000000..39d0646185ae --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistration.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * A tenant email registration data transfer object. + */ +@Fluent +public final class TenantEmailRegistration extends ProxyResource { + /* + * Tenant email registration property bag. + */ + private TenantEmailRegistrationProperties properties; + + /* + * Type of the resource. + */ + private String type; + + /* + * The unique id of the resource. + */ + private String id; + + /** + * Creates an instance of TenantEmailRegistration class. + */ + public TenantEmailRegistration() { + } + + /** + * Get the properties property: Tenant email registration property bag. + * + * @return the properties value. + */ + public TenantEmailRegistrationProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Tenant email registration property bag. + * + * @param properties the properties value to set. + * @return the TenantEmailRegistration object itself. + */ + public TenantEmailRegistration setProperties(TenantEmailRegistrationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + @Override + public String getType() { + return this.type; + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + @Override + public String getId() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantEmailRegistration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantEmailRegistration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the TenantEmailRegistration. + */ + public static TenantEmailRegistration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantEmailRegistration deserializedTenantEmailRegistration = new TenantEmailRegistration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTenantEmailRegistration.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTenantEmailRegistration.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedTenantEmailRegistration.properties = TenantEmailRegistrationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTenantEmailRegistration; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationProperties.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationProperties.java new file mode 100644 index 000000000000..f705ff646000 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationProperties.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Tenant email registration property bag. + */ +@Fluent +public final class TenantEmailRegistrationProperties implements JsonSerializable { + /* + * Activation code for the registration. + */ + private String activationCode; + + /* + * Date of the activation expiration. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime activationExpiration; + + /* + * The email to register. + */ + private String email; + + /* + * Defines the supported types for registration. + */ + private TenantEmailRegistrationStatus registrationStatus; + + /* + * State of the resource + */ + private State state; + + /* + * The tenant id to register. + */ + private String tenantId; + + /** + * Creates an instance of TenantEmailRegistrationProperties class. + */ + public TenantEmailRegistrationProperties() { + } + + /** + * Get the activationCode property: Activation code for the registration. + * + * @return the activationCode value. + */ + public String getActivationCode() { + return this.activationCode; + } + + /** + * Set the activationCode property: Activation code for the registration. + * + * @param activationCode the activationCode value to set. + * @return the TenantEmailRegistrationProperties object itself. + */ + public TenantEmailRegistrationProperties setActivationCode(String activationCode) { + this.activationCode = activationCode; + return this; + } + + /** + * Get the activationExpiration property: Date of the activation expiration. Represented in the standard date-time + * format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the activationExpiration value. + */ + public OffsetDateTime getActivationExpiration() { + return this.activationExpiration; + } + + /** + * Get the email property: The email to register. + * + * @return the email value. + */ + public String getEmail() { + return this.email; + } + + /** + * Get the registrationStatus property: Defines the supported types for registration. + * + * @return the registrationStatus value. + */ + public TenantEmailRegistrationStatus getRegistrationStatus() { + return this.registrationStatus; + } + + /** + * Get the state property: State of the resource. + * + * @return the state value. + */ + public State getState() { + return this.state; + } + + /** + * Get the tenantId property: The tenant id to register. + * + * @return the tenantId value. + */ + public String getTenantId() { + return this.tenantId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("activationCode", this.activationCode); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TenantEmailRegistrationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TenantEmailRegistrationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TenantEmailRegistrationProperties. + */ + public static TenantEmailRegistrationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TenantEmailRegistrationProperties deserializedTenantEmailRegistrationProperties + = new TenantEmailRegistrationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("activationCode".equals(fieldName)) { + deserializedTenantEmailRegistrationProperties.activationCode = reader.getString(); + } else if ("activationExpiration".equals(fieldName)) { + deserializedTenantEmailRegistrationProperties.activationExpiration = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("email".equals(fieldName)) { + deserializedTenantEmailRegistrationProperties.email = reader.getString(); + } else if ("registrationStatus".equals(fieldName)) { + deserializedTenantEmailRegistrationProperties.registrationStatus + = TenantEmailRegistrationStatus.fromString(reader.getString()); + } else if ("state".equals(fieldName)) { + deserializedTenantEmailRegistrationProperties.state = State.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedTenantEmailRegistrationProperties.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTenantEmailRegistrationProperties; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationStatus.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationStatus.java new file mode 100644 index 000000000000..776c5007cb50 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/TenantEmailRegistrationStatus.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** + * Defines the supported types for registration. + */ +public final class TenantEmailRegistrationStatus extends ExpandableStringEnum { + /** + * The tenant email registration is in pending state. + */ + public static final TenantEmailRegistrationStatus ACTIVATION_PENDING = fromString("ActivationPending"); + + /** + * The tenant email registration is complete and has been activated. + */ + public static final TenantEmailRegistrationStatus ACTIVATED = fromString("Activated"); + + /** + * The tenant email registration has exhausted the max attempts. + */ + public static final TenantEmailRegistrationStatus ACTIVATION_ATTEMPTS_EXHAUSTED + = fromString("ActivationAttemptsExhausted"); + + /** + * Creates a new instance of TenantEmailRegistrationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TenantEmailRegistrationStatus() { + } + + /** + * Creates or finds a TenantEmailRegistrationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding TenantEmailRegistrationStatus. + */ + public static TenantEmailRegistrationStatus fromString(String name) { + return fromString(name, TenantEmailRegistrationStatus.class); + } + + /** + * Gets known TenantEmailRegistrationStatus values. + * + * @return known TenantEmailRegistrationStatus values. + */ + public static Collection values() { + return values(TenantEmailRegistrationStatus.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/UserInvitation.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/UserInvitation.java new file mode 100644 index 000000000000..de0608c803df --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/UserInvitation.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** + * A user invitation kind. + */ +@Fluent +public final class UserInvitation extends SentShareInvitation { + /* + * The types of invitations. + */ + private InvitationKind invitationKind = InvitationKind.USER_INVITATION; + + /* + * Properties of the user invitation type. + */ + private UserInvitationProperties properties; + + /* + * Type of the resource. + */ + private String type; + + /* + * The unique id of the resource. + */ + private String id; + + /** + * Creates an instance of UserInvitation class. + */ + public UserInvitation() { + } + + /** + * Get the invitationKind property: The types of invitations. + * + * @return the invitationKind value. + */ + @Override + public InvitationKind getInvitationKind() { + return this.invitationKind; + } + + /** + * Get the properties property: Properties of the user invitation type. + * + * @return the properties value. + */ + public UserInvitationProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties of the user invitation type. + * + * @param properties the properties value to set. + * @return the UserInvitation object itself. + */ + public UserInvitation setProperties(UserInvitationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the type property: Type of the resource. + * + * @return the type value. + */ + @Override + public String getType() { + return this.type; + } + + /** + * Get the id property: The unique id of the resource. + * + * @return the id value. + */ + @Override + public String getId() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("invitationKind", + this.invitationKind == null ? null : this.invitationKind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserInvitation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserInvitation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UserInvitation. + */ + public static UserInvitation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserInvitation deserializedUserInvitation = new UserInvitation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedUserInvitation.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedUserInvitation.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedUserInvitation.properties = UserInvitationProperties.fromJson(reader); + } else if ("invitationKind".equals(fieldName)) { + deserializedUserInvitation.invitationKind = InvitationKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUserInvitation; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/UserInvitationProperties.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/UserInvitationProperties.java new file mode 100644 index 000000000000..859cce7a5e15 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/UserInvitationProperties.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Properties of the user invitation type. + */ +@Fluent +public final class UserInvitationProperties implements JsonSerializable { + /* + * The time at which the invitation will expire. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime expirationDate; + + /* + * Whether or not the recipient was notified via email. + */ + private Boolean notify; + + /* + * Email address of the sender. + */ + private String senderEmail; + + /* + * Name of the sender + */ + private String senderName; + + /* + * Tenant name of the sender + */ + private String senderTenantName; + + /* + * Gets the time at which the invitation was sent. Represented in the standard date-time format as defined by [RFC + * 3339](https://www.rfc-editor.org/rfc/rfc3339) + */ + private OffsetDateTime sentAt; + + /* + * Share status. + */ + private ShareStatus shareStatus; + + /* + * State of the resource + */ + private State state; + + /* + * The receiver email for the invitation is being sent. + */ + private String targetEmail; + + /** + * Creates an instance of UserInvitationProperties class. + */ + public UserInvitationProperties() { + } + + /** + * Get the expirationDate property: The time at which the invitation will expire. Represented in the standard + * date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the expirationDate value. + */ + public OffsetDateTime getExpirationDate() { + return this.expirationDate; + } + + /** + * Set the expirationDate property: The time at which the invitation will expire. Represented in the standard + * date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @param expirationDate the expirationDate value to set. + * @return the UserInvitationProperties object itself. + */ + public UserInvitationProperties setExpirationDate(OffsetDateTime expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * Get the notify property: Whether or not the recipient was notified via email. + * + * @return the notify value. + */ + public Boolean isNotify() { + return this.notify; + } + + /** + * Set the notify property: Whether or not the recipient was notified via email. + * + * @param notify the notify value to set. + * @return the UserInvitationProperties object itself. + */ + public UserInvitationProperties setNotify(Boolean notify) { + this.notify = notify; + return this; + } + + /** + * Get the senderEmail property: Email address of the sender. + * + * @return the senderEmail value. + */ + public String getSenderEmail() { + return this.senderEmail; + } + + /** + * Get the senderName property: Name of the sender. + * + * @return the senderName value. + */ + public String getSenderName() { + return this.senderName; + } + + /** + * Get the senderTenantName property: Tenant name of the sender. + * + * @return the senderTenantName value. + */ + public String getSenderTenantName() { + return this.senderTenantName; + } + + /** + * Get the sentAt property: Gets the time at which the invitation was sent. Represented in the standard date-time + * format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339). + * + * @return the sentAt value. + */ + public OffsetDateTime getSentAt() { + return this.sentAt; + } + + /** + * Get the shareStatus property: Share status. + * + * @return the shareStatus value. + */ + public ShareStatus getShareStatus() { + return this.shareStatus; + } + + /** + * Set the shareStatus property: Share status. + * + * @param shareStatus the shareStatus value to set. + * @return the UserInvitationProperties object itself. + */ + public UserInvitationProperties setShareStatus(ShareStatus shareStatus) { + this.shareStatus = shareStatus; + return this; + } + + /** + * Get the state property: State of the resource. + * + * @return the state value. + */ + public State getState() { + return this.state; + } + + /** + * Get the targetEmail property: The receiver email for the invitation is being sent. + * + * @return the targetEmail value. + */ + public String getTargetEmail() { + return this.targetEmail; + } + + /** + * Set the targetEmail property: The receiver email for the invitation is being sent. + * + * @param targetEmail the targetEmail value to set. + * @return the UserInvitationProperties object itself. + */ + public UserInvitationProperties setTargetEmail(String targetEmail) { + this.targetEmail = targetEmail; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetEmail", this.targetEmail); + jsonWriter.writeStringField("expirationDate", + this.expirationDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationDate)); + jsonWriter.writeBooleanField("notify", this.notify); + jsonWriter.writeStringField("shareStatus", this.shareStatus == null ? null : this.shareStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserInvitationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserInvitationProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UserInvitationProperties. + */ + public static UserInvitationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserInvitationProperties deserializedUserInvitationProperties = new UserInvitationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetEmail".equals(fieldName)) { + deserializedUserInvitationProperties.targetEmail = reader.getString(); + } else if ("expirationDate".equals(fieldName)) { + deserializedUserInvitationProperties.expirationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("notify".equals(fieldName)) { + deserializedUserInvitationProperties.notify = reader.getNullable(JsonReader::getBoolean); + } else if ("senderEmail".equals(fieldName)) { + deserializedUserInvitationProperties.senderEmail = reader.getString(); + } else if ("senderName".equals(fieldName)) { + deserializedUserInvitationProperties.senderName = reader.getString(); + } else if ("senderTenantName".equals(fieldName)) { + deserializedUserInvitationProperties.senderTenantName = reader.getString(); + } else if ("sentAt".equals(fieldName)) { + deserializedUserInvitationProperties.sentAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("shareStatus".equals(fieldName)) { + deserializedUserInvitationProperties.shareStatus = ShareStatus.fromString(reader.getString()); + } else if ("state".equals(fieldName)) { + deserializedUserInvitationProperties.state = State.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUserInvitationProperties; + }); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/package-info.java b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/package-info.java new file mode 100644 index 000000000000..5498427408e7 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/samples/java/com/azure/analytics/purview/sharing/models/package-info.java @@ -0,0 +1,5 @@ +/** + * Package containing the data models for PurviewShareClient. + * Creates a data plane client for Purview Share. + */ +package com.azure.analytics.purview.sharing.models; diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/PurviewShareTestBase.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/PurviewShareTestBase.java new file mode 100644 index 000000000000..35b75a741714 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/PurviewShareTestBase.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.sharing; + +import com.azure.analytics.purview.sharing.models.BlobStorageArtifact; +import com.azure.analytics.purview.sharing.models.BlobStorageArtifactProperties; +import com.azure.analytics.purview.sharing.models.InPlaceSentShare; +import com.azure.analytics.purview.sharing.models.InPlaceSentShareProperties; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.SentShare; +import com.azure.analytics.purview.sharing.models.ServiceInvitation; +import com.azure.analytics.purview.sharing.models.ServiceInvitationProperties; +import com.azure.analytics.purview.sharing.models.StorageAccountPath; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.core.util.polling.SyncPoller; +import com.azure.identity.DefaultAzureCredentialBuilder; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +class PurviewShareTestBase extends TestProxyTestBase { + + protected ReceivedSharesClient receivedSharesClient; + + protected SentSharesClient sentSharesClient; + + protected ShareResourcesClient shareResourcesClient; + + protected String clientId; + + protected String targetActiveDirectoryId; + + protected String targetObjectId; + + protected String providerStorageAccountResourceId; + + protected String consumerStorageAccountResourceId; + + protected String consumerEmail; + private boolean sanitizersRemoved = false; + // Removes the OperationLocation, Location, id and name sanitizers from the list of common sanitizers + private static final String[] REMOVE_SANITIZER_ID = { "AZSDK2003", "AZSDK2030", "AZSDK3493", "AZSDK3430" }; + + @Override + protected void beforeTest() { + + this.initializeSentShareClient(); + this.initializeReceivedShareClient(); + this.initializeShareResourceClient(); + + clientId + = Configuration.getGlobalConfiguration().get("AZURE_CLIENT_ID", "6a2919d0-880a-4ed8-B50d-7abe4d74291c"); + targetActiveDirectoryId + = Configuration.getGlobalConfiguration().get("AZURE_TENANT_ID", "4653a7b2-02ff-4155-8e55-2d0c7f3178a1"); + targetObjectId + = Configuration.getGlobalConfiguration().get("TARGET_OBJECT_ID", "789516ef-5d52-4d56-806d-3ab2d49b0356"); + providerStorageAccountResourceId = Configuration.getGlobalConfiguration() + .get("PROVIDER_STORAGE_RESOURCE_ID", + "/subscriptions/8af54e97-8629-48cd-A92e-24753982bf92/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/providerstorage"); + consumerStorageAccountResourceId = Configuration.getGlobalConfiguration() + .get("CONSUMER_STORAGE_RESOURCE_ID", + "/subscriptions/8af54e97-8629-48cd-A92e-24753982bf92/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/consumerstorage"); + consumerEmail = Configuration.getGlobalConfiguration().get("CONSUMER_EMAIL", "consumer@contoso.com"); + } + + protected SentShare createSentShare(UUID uuid) { + + String sentShareId = uuid.toString(); + + InPlaceSentShare sentShare = new InPlaceSentShare().setProperties( + new InPlaceSentShareProperties().setDisplayName(testResourceNamer.randomName("sentshare", 26)) + .setDescription("A sample share")); + + StoreReference storeReference = new StoreReference().setReferenceName(this.providerStorageAccountResourceId) + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE); + + StorageAccountPath storageAccountPath = new StorageAccountPath().setContainerName("test-files") + .setReceiverPath("graph.png") + .setSenderPath("graph.png"); + + List paths = new ArrayList<>(); + paths.add(storageAccountPath); + + BlobStorageArtifact artifact = new BlobStorageArtifact().setStoreReference(storeReference) + .setProperties(new BlobStorageArtifactProperties().setPaths(paths)); + + sentShare.getProperties().setArtifact(artifact); + + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval(sentSharesClient + .beginCreateOrReplaceSentShare(sentShareId, BinaryData.fromObject(sentShare), requestOptions)); + + response.waitForCompletion(); + + return response.getFinalResult().toObject(SentShare.class); + } + + protected Response createSentShareAndServiceInvitation() { + return this.createSentShareAndServiceInvitation(UUID.randomUUID(), UUID.randomUUID()); + } + + protected Response createSentShareAndServiceInvitation(UUID sentShareId, UUID sentShareInvitationId) { + this.createSentShare(sentShareId); + + String invitationId = sentShareInvitationId.toString(); + + ServiceInvitation sentShareInvitation = new ServiceInvitation().setProperties( + new ServiceInvitationProperties().setTargetActiveDirectoryId(UUID.fromString(this.targetActiveDirectoryId)) + .setTargetObjectId(UUID.fromString(this.targetObjectId))); + + return sentSharesClient.createSentShareInvitationWithResponse(sentShareId.toString(), invitationId, + BinaryData.fromObject(sentShareInvitation), new RequestOptions()); + } + + private void initializeReceivedShareClient() { + ReceivedSharesClientBuilder receivedSharesClientbuilder = new ReceivedSharesClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "https://account.purview.azure.com/share")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + receivedSharesClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + receivedSharesClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + receivedSharesClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + if (!interceptorManager.isLiveMode() && !sanitizersRemoved) { + interceptorManager.removeSanitizers(REMOVE_SANITIZER_ID); + sanitizersRemoved = true; + } + + receivedSharesClient = receivedSharesClientbuilder.buildClient(); + } + + private void initializeSentShareClient() { + SentSharesClientBuilder sentSharesClientbuilder = new SentSharesClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "https://account.purview.azure.com/share")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + sentSharesClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + sentSharesClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + sentSharesClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + if (!interceptorManager.isLiveMode() && !sanitizersRemoved) { + interceptorManager.removeSanitizers(REMOVE_SANITIZER_ID); + sanitizersRemoved = true; + } + + sentSharesClient = sentSharesClientbuilder.buildClient(); + } + + private void initializeShareResourceClient() { + ShareResourcesClientBuilder shareResourcesClientbuilder = new ShareResourcesClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "https://account.purview.azure.com/share")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + shareResourcesClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + shareResourcesClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + shareResourcesClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + + if (!interceptorManager.isLiveMode() && !sanitizersRemoved) { + interceptorManager.removeSanitizers(REMOVE_SANITIZER_ID); + sanitizersRemoved = true; + } + + shareResourcesClient = shareResourcesClientbuilder.buildClient(); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/ReceivedShareClientTest.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/ReceivedShareClientTest.java new file mode 100644 index 000000000000..4029eaeaecdc --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/ReceivedShareClientTest.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.sharing; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +import java.util.Optional; +import java.util.UUID; + +import com.azure.analytics.purview.sharing.models.BlobAccountSinkProperties; +import org.junit.jupiter.api.Test; + +import com.azure.analytics.purview.sharing.models.BlobAccountSink; +import com.azure.analytics.purview.sharing.models.InPlaceReceivedShare; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.ShareStatus; +import com.azure.analytics.purview.sharing.models.Sink; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.SyncPoller; + +@SuppressWarnings("unused") +class ReceivedShareClientTest extends PurviewShareTestBase { + + @Override + protected void beforeTest() { + super.beforeTest(); + } + + @Test + void listDetachedShareTest() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + UUID sentShareInvitationId = UUID.fromString(testResourceNamer.randomUuid()); + + super.createSentShareAndServiceInvitation(sentShareId, sentShareInvitationId); + + RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); + PagedIterable receivedShares = receivedSharesClient.listDetachedReceivedShares(requestOptions); + + assertTrue(receivedShares.stream().findAny().isPresent()); + assertTrue(receivedShares.stream() + .map(binaryData -> binaryData.toObject(InPlaceReceivedShare.class)) + .allMatch(share -> share.getProperties().getShareStatus().equals(ShareStatus.DETACHED_SHARE_STATUS))); + } + + @Test + void getReceivedShareTest() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + UUID sentShareInvitationId = UUID.fromString(testResourceNamer.randomUuid()); + + super.createSentShareAndServiceInvitation(sentShareId, sentShareInvitationId); + + RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); + PagedIterable receivedShares = receivedSharesClient.listDetachedReceivedShares(requestOptions); + + InPlaceReceivedShare receivedShare + = receivedShares.stream().findFirst().get().toObject(InPlaceReceivedShare.class); + + InPlaceReceivedShare retrievedShare + = this.receivedSharesClient.getReceivedShareWithResponse(receivedShare.getId(), new RequestOptions()) + .getValue() + .toObject(InPlaceReceivedShare.class); + + assertNotNull(retrievedShare); + assertEquals(receivedShare.getId(), retrievedShare.getId()); + assertEquals(receivedShare.getProperties().getDisplayName(), retrievedShare.getProperties().getDisplayName()); + } + + @Test + void deleteReceivedShareTest() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + UUID sentShareInvitationId = UUID.fromString(testResourceNamer.randomUuid()); + + super.createSentShareAndServiceInvitation(sentShareId, sentShareInvitationId); + + RequestOptions requestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); + PagedIterable receivedShares = receivedSharesClient.listDetachedReceivedShares(requestOptions); + + InPlaceReceivedShare receivedShare + = receivedShares.stream().findFirst().get().toObject(InPlaceReceivedShare.class); + + SyncPoller syncPoller = setPlaybackSyncPollerPollInterval( + this.receivedSharesClient.beginDeleteReceivedShare(receivedShare.getId(), new RequestOptions())); + + PollResponse result = syncPoller.waitForCompletion(); + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, result.getStatus()); + } + + @Test + void attachReceivedShareTest() { + + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + UUID sentShareInvitationId = UUID.fromString(testResourceNamer.randomUuid()); + + super.createSentShareAndServiceInvitation(sentShareId, sentShareInvitationId); + + RequestOptions listRequestOptions = new RequestOptions().addQueryParam("$orderBy", "properties/createdAt desc"); + PagedIterable listResponse = receivedSharesClient.listDetachedReceivedShares(listRequestOptions); + + Optional detachedReceivedShare = listResponse.stream().findFirst(); + + if (!detachedReceivedShare.isPresent()) { + fail("ReceivedShare not found."); + } + + InPlaceReceivedShare receivedShare = detachedReceivedShare.get().toObject(InPlaceReceivedShare.class); + + StoreReference storeReference = new StoreReference().setReferenceName(this.consumerStorageAccountResourceId) + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE); + + Sink sink = new BlobAccountSink().setStoreReference(storeReference) + .setProperties( + new BlobAccountSinkProperties().setContainerName(testResourceNamer.randomName("container", 26)) + .setFolder(testResourceNamer.randomName("folder", 20)) + .setMountPath(testResourceNamer.randomName("mountpath", 20))); + + receivedShare.getProperties().setSink(sink); + + SyncPoller createResponse + = setPlaybackSyncPollerPollInterval(receivedSharesClient.beginCreateOrReplaceReceivedShare( + receivedShare.getId(), BinaryData.fromObject(receivedShare), new RequestOptions())); + + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, createResponse.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/SentShareClientTest.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/SentShareClientTest.java new file mode 100644 index 000000000000..12e524769d63 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/SentShareClientTest.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.sharing; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.util.UUID; + +import com.azure.analytics.purview.sharing.models.UserInvitationProperties; +import org.junit.jupiter.api.Test; + +import com.azure.analytics.purview.sharing.models.SentShare; +import com.azure.analytics.purview.sharing.models.ServiceInvitation; +import com.azure.analytics.purview.sharing.models.UserInvitation; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.SyncPoller; + +@SuppressWarnings("unused") +class SentShareClientTest extends PurviewShareTestBase { + + @Override + protected void beforeTest() { + super.beforeTest(); + } + + @Test + void createSentShareTest() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + SentShare sentShare = super.createSentShare(sentShareId); + + assertNotNull(sentShare); + assertEquals(sentShareId.toString(), sentShare.getId()); + } + + @Test + void createSentShareUserInvitation() { + + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + String sentShareInvitationId = testResourceNamer.randomUuid(); + + this.createSentShare(sentShareId); + + UserInvitation sentShareInvitation + = new UserInvitation().setProperties(new UserInvitationProperties().setTargetEmail(super.consumerEmail) + .setNotify(true) + .setExpirationDate(OffsetDateTime.of(2500, 1, 1, 1, 1, 1, 1, ZoneOffset.UTC))); + + Response invitationResponse + = sentSharesClient.createSentShareInvitationWithResponse(sentShareId.toString(), sentShareInvitationId, + BinaryData.fromObject(sentShareInvitation), new RequestOptions()); + + UserInvitation invitation = invitationResponse.getValue().toObject(UserInvitation.class); + + assertEquals(201, invitationResponse.getStatusCode()); + assertNotNull(invitation); + assertEquals(sentShareInvitationId.toString(), invitation.getId()); + assertEquals(this.consumerEmail, invitation.getProperties().getTargetEmail()); + } + + @Test + void getSentShareTest() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + SentShare sentShare = super.createSentShare(sentShareId); + + SentShare retrievedSentShare + = super.sentSharesClient.getSentShareWithResponse(sentShareId.toString(), new RequestOptions()) + .getValue() + .toObject(SentShare.class); + + assertNotNull(retrievedSentShare); + assertEquals(sentShareId.toString(), retrievedSentShare.getId()); + assertEquals(sentShare.getType(), retrievedSentShare.getType()); + } + + @Test + void listSentSharesTest() { + + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + SentShare sentShare = super.createSentShare(sentShareId); + + PagedIterable sentShares + = super.sentSharesClient.listSentShares(super.providerStorageAccountResourceId, new RequestOptions()); + + assertTrue(sentShares.stream().findAny().isPresent()); + assertTrue(sentShares.stream() + .map(binaryData -> binaryData.toObject(SentShare.class)) + .anyMatch(share -> share.getId().equals(sentShare.getId()))); + } + + @Test + void deleteSentShareTest() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + SentShare sentShare = super.createSentShare(sentShareId); + + SyncPoller syncPoller = setPlaybackSyncPollerPollInterval( + super.sentSharesClient.beginDeleteSentShare(sentShareId.toString(), new RequestOptions())); + + PollResponse result = syncPoller.waitForCompletion(); + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, result.getStatus()); + } + + @Test + void createSentShareServiceInvitation() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + UUID sentShareInvitationId = UUID.fromString(testResourceNamer.randomUuid()); + + Response invitationResponse + = super.createSentShareAndServiceInvitation(sentShareId, sentShareInvitationId); + + ServiceInvitation invitation = invitationResponse.getValue().toObject(ServiceInvitation.class); + + assertEquals(201, invitationResponse.getStatusCode()); + assertEquals(sentShareInvitationId.toString(), invitation.getId()); + assertEquals(this.targetActiveDirectoryId, invitation.getProperties().getTargetActiveDirectoryId().toString()); + assertEquals(this.targetObjectId, invitation.getProperties().getTargetObjectId().toString()); + } + + @Test + void getSentShareServiceInvitation() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + UUID sentShareInvitationId = UUID.fromString(testResourceNamer.randomUuid()); + super.createSentShareAndServiceInvitation(sentShareId, sentShareInvitationId); + + Response invitationResponse = super.sentSharesClient.getSentShareInvitationWithResponse( + sentShareId.toString(), sentShareInvitationId.toString(), new RequestOptions()); + + ServiceInvitation invitation = invitationResponse.getValue().toObject(ServiceInvitation.class); + + assertEquals(200, invitationResponse.getStatusCode()); + assertEquals(sentShareInvitationId.toString(), invitation.getId()); + assertEquals(this.targetActiveDirectoryId, invitation.getProperties().getTargetActiveDirectoryId().toString()); + assertEquals(this.targetObjectId, invitation.getProperties().getTargetObjectId().toString()); + } + + @Test + void listSentShareServiceInvitations() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + UUID sentShareInvitationId = UUID.fromString(testResourceNamer.randomUuid()); + super.createSentShareAndServiceInvitation(sentShareId, sentShareInvitationId); + + PagedIterable invitations + = super.sentSharesClient.listSentShareInvitations(sentShareId.toString(), new RequestOptions()); + + assertTrue(invitations.stream().findAny().isPresent()); + assertTrue(invitations.stream() + .map(binaryData -> binaryData.toObject(ServiceInvitation.class)) + .anyMatch(invitation -> invitation.getId().equals(sentShareInvitationId.toString()))); + } + + @Test + void deleteSentShareServiceInvitation() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + UUID sentShareInvitationId = UUID.fromString(testResourceNamer.randomUuid()); + + Response invitationResponse + = super.createSentShareAndServiceInvitation(sentShareId, sentShareInvitationId); + + ServiceInvitation invitation = invitationResponse.getValue().toObject(ServiceInvitation.class); + + SyncPoller syncPoller + = setPlaybackSyncPollerPollInterval(super.sentSharesClient.beginDeleteSentShareInvitation( + sentShareId.toString(), sentShareInvitationId.toString(), new RequestOptions())); + + PollResponse result = syncPoller.waitForCompletion(); + assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, result.getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/ShareResourceClientTest.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/ShareResourceClientTest.java new file mode 100644 index 000000000000..7ddb84aadff9 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/ShareResourceClientTest.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.purview.sharing; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.UUID; + +import org.junit.jupiter.api.Test; + +import com.azure.analytics.purview.sharing.models.InPlaceSentShare; +import com.azure.analytics.purview.sharing.models.SentShare; +import com.azure.analytics.purview.sharing.models.ShareResource; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +public class ShareResourceClientTest extends PurviewShareTestBase { + + @Override + protected void beforeTest() { + super.beforeTest(); + } + + @Test + void listShareResourcesTest() { + UUID sentShareId = UUID.fromString(testResourceNamer.randomUuid()); + SentShare sentShare = super.createSentShare(sentShareId); + + PagedIterable shareResources = super.shareResourcesClient.listShareResources(new RequestOptions()); + + String sentShareResource + = ((InPlaceSentShare) sentShare).getProperties().getArtifact().getStoreReference().getReferenceName(); + + assertTrue(shareResources.stream().findAny().isPresent()); + assertTrue(shareResources.stream() + .map(binaryData -> binaryData.toObject(ShareResource.class)) + .anyMatch(shareResource -> shareResource.getStoreReference() + .getReferenceName() + .equalsIgnoreCase(sentShareResource))); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2AccountSinkPropertiesTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2AccountSinkPropertiesTests.java new file mode 100644 index 000000000000..74a6803b2380 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2AccountSinkPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.AdlsGen2AccountSinkProperties; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class AdlsGen2AccountSinkPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdlsGen2AccountSinkProperties model = BinaryData.fromString( + "{\"containerName\":\"qpsoacctazak\",\"folder\":\"j\",\"location\":\"hbcryffdfdosyge\",\"mountPath\":\"aojakhmsbzjhcrz\"}") + .toObject(AdlsGen2AccountSinkProperties.class); + Assertions.assertEquals("qpsoacctazak", model.getContainerName()); + Assertions.assertEquals("j", model.getFolder()); + Assertions.assertEquals("aojakhmsbzjhcrz", model.getMountPath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdlsGen2AccountSinkProperties model = new AdlsGen2AccountSinkProperties().setContainerName("qpsoacctazak") + .setFolder("j") + .setMountPath("aojakhmsbzjhcrz"); + model = BinaryData.fromObject(model).toObject(AdlsGen2AccountSinkProperties.class); + Assertions.assertEquals("qpsoacctazak", model.getContainerName()); + Assertions.assertEquals("j", model.getFolder()); + Assertions.assertEquals("aojakhmsbzjhcrz", model.getMountPath()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2AccountSinkTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2AccountSinkTests.java new file mode 100644 index 000000000000..a9304f8482b8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2AccountSinkTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.AdlsGen2AccountSink; +import com.azure.analytics.purview.sharing.models.AdlsGen2AccountSinkProperties; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class AdlsGen2AccountSinkTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdlsGen2AccountSink model = BinaryData.fromString( + "{\"storeKind\":\"AdlsGen2Account\",\"properties\":{\"containerName\":\"tegjvwmf\",\"folder\":\"atscmd\",\"location\":\"jhulsuuvmkjo\",\"mountPath\":\"rwfndiod\"},\"storeReference\":{\"referenceName\":\"slwejdpvw\",\"type\":\"ArmResourceReference\"}}") + .toObject(AdlsGen2AccountSink.class); + Assertions.assertEquals("slwejdpvw", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + Assertions.assertEquals("tegjvwmf", model.getProperties().getContainerName()); + Assertions.assertEquals("atscmd", model.getProperties().getFolder()); + Assertions.assertEquals("rwfndiod", model.getProperties().getMountPath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdlsGen2AccountSink model = new AdlsGen2AccountSink() + .setStoreReference( + new StoreReference().setReferenceName("slwejdpvw").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)) + .setProperties(new AdlsGen2AccountSinkProperties().setContainerName("tegjvwmf") + .setFolder("atscmd") + .setMountPath("rwfndiod")); + model = BinaryData.fromObject(model).toObject(AdlsGen2AccountSink.class); + Assertions.assertEquals("slwejdpvw", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + Assertions.assertEquals("tegjvwmf", model.getProperties().getContainerName()); + Assertions.assertEquals("atscmd", model.getProperties().getFolder()); + Assertions.assertEquals("rwfndiod", model.getProperties().getMountPath()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2ArtifactPropertiesTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2ArtifactPropertiesTests.java new file mode 100644 index 000000000000..96ccd30991e1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2ArtifactPropertiesTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.AdlsGen2ArtifactProperties; +import com.azure.analytics.purview.sharing.models.StorageAccountPath; +import com.azure.core.util.BinaryData; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AdlsGen2ArtifactPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdlsGen2ArtifactProperties model = BinaryData.fromString( + "{\"location\":\"iheogna\",\"paths\":[{\"containerName\":\"zxtheotusivyevcc\",\"receiverPath\":\"ihnhun\",\"senderPath\":\"wjzrnfygxgisp\"},{\"containerName\":\"mvtzfkufub\",\"receiverPath\":\"ofx\",\"senderPath\":\"ofjaeqjhqjb\"}]}") + .toObject(AdlsGen2ArtifactProperties.class); + Assertions.assertEquals("zxtheotusivyevcc", model.getPaths().get(0).getContainerName()); + Assertions.assertEquals("ihnhun", model.getPaths().get(0).getReceiverPath()); + Assertions.assertEquals("wjzrnfygxgisp", model.getPaths().get(0).getSenderPath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdlsGen2ArtifactProperties model = new AdlsGen2ArtifactProperties().setPaths(Arrays.asList( + new StorageAccountPath().setContainerName("zxtheotusivyevcc") + .setReceiverPath("ihnhun") + .setSenderPath("wjzrnfygxgisp"), + new StorageAccountPath().setContainerName("mvtzfkufub") + .setReceiverPath("ofx") + .setSenderPath("ofjaeqjhqjb"))); + model = BinaryData.fromObject(model).toObject(AdlsGen2ArtifactProperties.class); + Assertions.assertEquals("zxtheotusivyevcc", model.getPaths().get(0).getContainerName()); + Assertions.assertEquals("ihnhun", model.getPaths().get(0).getReceiverPath()); + Assertions.assertEquals("wjzrnfygxgisp", model.getPaths().get(0).getSenderPath()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2ArtifactTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2ArtifactTests.java new file mode 100644 index 000000000000..f20c67ed0701 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/AdlsGen2ArtifactTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.AdlsGen2Artifact; +import com.azure.analytics.purview.sharing.models.AdlsGen2ArtifactProperties; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.StorageAccountPath; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AdlsGen2ArtifactTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdlsGen2Artifact model = BinaryData.fromString( + "{\"storeKind\":\"AdlsGen2Account\",\"properties\":{\"location\":\"gqjbpfzfsin\",\"paths\":[{\"containerName\":\"v\",\"receiverPath\":\"jrwzox\",\"senderPath\":\"tfell\"},{\"containerName\":\"wfzitonpeqfpjk\",\"receiverPath\":\"xofpdvhpfxxypi\",\"senderPath\":\"nmayhuybb\"}]},\"storeReference\":{\"referenceName\":\"odepoogin\",\"type\":\"ArmResourceReference\"}}") + .toObject(AdlsGen2Artifact.class); + Assertions.assertEquals("odepoogin", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + Assertions.assertEquals("v", model.getProperties().getPaths().get(0).getContainerName()); + Assertions.assertEquals("jrwzox", model.getProperties().getPaths().get(0).getReceiverPath()); + Assertions.assertEquals("tfell", model.getProperties().getPaths().get(0).getSenderPath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdlsGen2Artifact model = new AdlsGen2Artifact() + .setStoreReference( + new StoreReference().setReferenceName("odepoogin").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)) + .setProperties(new AdlsGen2ArtifactProperties().setPaths(Arrays.asList( + new StorageAccountPath().setContainerName("v").setReceiverPath("jrwzox").setSenderPath("tfell"), + new StorageAccountPath().setContainerName("wfzitonpeqfpjk") + .setReceiverPath("xofpdvhpfxxypi") + .setSenderPath("nmayhuybb")))); + model = BinaryData.fromObject(model).toObject(AdlsGen2Artifact.class); + Assertions.assertEquals("odepoogin", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + Assertions.assertEquals("v", model.getProperties().getPaths().get(0).getContainerName()); + Assertions.assertEquals("jrwzox", model.getProperties().getPaths().get(0).getReceiverPath()); + Assertions.assertEquals("tfell", model.getProperties().getPaths().get(0).getSenderPath()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ArtifactTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ArtifactTests.java new file mode 100644 index 000000000000..d8492951c5de --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ArtifactTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.Artifact; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class ArtifactTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Artifact model = BinaryData.fromString( + "{\"storeKind\":\"Artifact\",\"storeReference\":{\"referenceName\":\"wclxxwrl\",\"type\":\"ArmResourceReference\"}}") + .toObject(Artifact.class); + Assertions.assertEquals("wclxxwrl", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Artifact model = new Artifact().setStoreReference( + new StoreReference().setReferenceName("wclxxwrl").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)); + model = BinaryData.fromObject(model).toObject(Artifact.class); + Assertions.assertEquals("wclxxwrl", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobAccountSinkPropertiesTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobAccountSinkPropertiesTests.java new file mode 100644 index 000000000000..5f489ec0d2cd --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobAccountSinkPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.BlobAccountSinkProperties; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class BlobAccountSinkPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BlobAccountSinkProperties model = BinaryData.fromString( + "{\"containerName\":\"zlljfmppeebvm\",\"folder\":\"xsabkyqdu\",\"location\":\"itcjczdz\",\"mountPath\":\"ndhkrw\"}") + .toObject(BlobAccountSinkProperties.class); + Assertions.assertEquals("zlljfmppeebvm", model.getContainerName()); + Assertions.assertEquals("xsabkyqdu", model.getFolder()); + Assertions.assertEquals("ndhkrw", model.getMountPath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BlobAccountSinkProperties model = new BlobAccountSinkProperties().setContainerName("zlljfmppeebvm") + .setFolder("xsabkyqdu") + .setMountPath("ndhkrw"); + model = BinaryData.fromObject(model).toObject(BlobAccountSinkProperties.class); + Assertions.assertEquals("zlljfmppeebvm", model.getContainerName()); + Assertions.assertEquals("xsabkyqdu", model.getFolder()); + Assertions.assertEquals("ndhkrw", model.getMountPath()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobAccountSinkTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobAccountSinkTests.java new file mode 100644 index 000000000000..f10bade7b8ed --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobAccountSinkTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.BlobAccountSink; +import com.azure.analytics.purview.sharing.models.BlobAccountSinkProperties; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class BlobAccountSinkTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BlobAccountSink model = BinaryData.fromString( + "{\"storeKind\":\"BlobAccount\",\"properties\":{\"containerName\":\"uskcqvkocrcj\",\"folder\":\"kwt\",\"location\":\"xbnjbiksq\",\"mountPath\":\"lssai\"},\"storeReference\":{\"referenceName\":\"p\",\"type\":\"ArmResourceReference\"}}") + .toObject(BlobAccountSink.class); + Assertions.assertEquals("p", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + Assertions.assertEquals("uskcqvkocrcj", model.getProperties().getContainerName()); + Assertions.assertEquals("kwt", model.getProperties().getFolder()); + Assertions.assertEquals("lssai", model.getProperties().getMountPath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BlobAccountSink model = new BlobAccountSink() + .setStoreReference( + new StoreReference().setReferenceName("p").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)) + .setProperties(new BlobAccountSinkProperties().setContainerName("uskcqvkocrcj") + .setFolder("kwt") + .setMountPath("lssai")); + model = BinaryData.fromObject(model).toObject(BlobAccountSink.class); + Assertions.assertEquals("p", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + Assertions.assertEquals("uskcqvkocrcj", model.getProperties().getContainerName()); + Assertions.assertEquals("kwt", model.getProperties().getFolder()); + Assertions.assertEquals("lssai", model.getProperties().getMountPath()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobStorageArtifactPropertiesTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobStorageArtifactPropertiesTests.java new file mode 100644 index 000000000000..c708da968a29 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobStorageArtifactPropertiesTests.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.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.BlobStorageArtifactProperties; +import com.azure.analytics.purview.sharing.models.StorageAccountPath; +import com.azure.core.util.BinaryData; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BlobStorageArtifactPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BlobStorageArtifactProperties model = BinaryData.fromString( + "{\"location\":\"cbacphejkotynqg\",\"paths\":[{\"containerName\":\"l\",\"receiverPath\":\"dlikwyqkgfgibma\",\"senderPath\":\"akeqs\"},{\"containerName\":\"xybz\",\"receiverPath\":\"e\",\"senderPath\":\"ytb\"},{\"containerName\":\"iqfouflmmnkz\",\"receiverPath\":\"odmgl\",\"senderPath\":\"gpbkwtmut\"}]}") + .toObject(BlobStorageArtifactProperties.class); + Assertions.assertEquals("l", model.getPaths().get(0).getContainerName()); + Assertions.assertEquals("dlikwyqkgfgibma", model.getPaths().get(0).getReceiverPath()); + Assertions.assertEquals("akeqs", model.getPaths().get(0).getSenderPath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BlobStorageArtifactProperties model = new BlobStorageArtifactProperties().setPaths(Arrays.asList( + new StorageAccountPath().setContainerName("l").setReceiverPath("dlikwyqkgfgibma").setSenderPath("akeqs"), + new StorageAccountPath().setContainerName("xybz").setReceiverPath("e").setSenderPath("ytb"), + new StorageAccountPath().setContainerName("iqfouflmmnkz") + .setReceiverPath("odmgl") + .setSenderPath("gpbkwtmut"))); + model = BinaryData.fromObject(model).toObject(BlobStorageArtifactProperties.class); + Assertions.assertEquals("l", model.getPaths().get(0).getContainerName()); + Assertions.assertEquals("dlikwyqkgfgibma", model.getPaths().get(0).getReceiverPath()); + Assertions.assertEquals("akeqs", model.getPaths().get(0).getSenderPath()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobStorageArtifactTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobStorageArtifactTests.java new file mode 100644 index 000000000000..cba959bac2ea --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/BlobStorageArtifactTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.BlobStorageArtifact; +import com.azure.analytics.purview.sharing.models.BlobStorageArtifactProperties; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.StorageAccountPath; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BlobStorageArtifactTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BlobStorageArtifact model = BinaryData.fromString( + "{\"storeKind\":\"BlobAccount\",\"properties\":{\"location\":\"appd\",\"paths\":[{\"containerName\":\"dkvwrwjfe\",\"receiverPath\":\"nhutjeltmrldhugj\",\"senderPath\":\"datqxhocdgeabl\"},{\"containerName\":\"phut\",\"receiverPath\":\"ndv\",\"senderPath\":\"ozwyiftyhxhuro\"},{\"containerName\":\"ftyxolniw\",\"receiverPath\":\"cukjf\",\"senderPath\":\"iawxklry\"}]},\"storeReference\":{\"referenceName\":\"wckbasyypnd\",\"type\":\"ArmResourceReference\"}}") + .toObject(BlobStorageArtifact.class); + Assertions.assertEquals("wckbasyypnd", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + Assertions.assertEquals("dkvwrwjfe", model.getProperties().getPaths().get(0).getContainerName()); + Assertions.assertEquals("nhutjeltmrldhugj", model.getProperties().getPaths().get(0).getReceiverPath()); + Assertions.assertEquals("datqxhocdgeabl", model.getProperties().getPaths().get(0).getSenderPath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BlobStorageArtifact model = new BlobStorageArtifact() + .setStoreReference( + new StoreReference().setReferenceName("wckbasyypnd").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)) + .setProperties(new BlobStorageArtifactProperties().setPaths(Arrays.asList( + new StorageAccountPath().setContainerName("dkvwrwjfe") + .setReceiverPath("nhutjeltmrldhugj") + .setSenderPath("datqxhocdgeabl"), + new StorageAccountPath().setContainerName("phut") + .setReceiverPath("ndv") + .setSenderPath("ozwyiftyhxhuro"), + new StorageAccountPath().setContainerName("ftyxolniw") + .setReceiverPath("cukjf") + .setSenderPath("iawxklry")))); + model = BinaryData.fromObject(model).toObject(BlobStorageArtifact.class); + Assertions.assertEquals("wckbasyypnd", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + Assertions.assertEquals("dkvwrwjfe", model.getProperties().getPaths().get(0).getContainerName()); + Assertions.assertEquals("nhutjeltmrldhugj", model.getProperties().getPaths().get(0).getReceiverPath()); + Assertions.assertEquals("datqxhocdgeabl", model.getProperties().getPaths().get(0).getSenderPath()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceReceivedSharePropertiesTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceReceivedSharePropertiesTests.java new file mode 100644 index 000000000000..2ddff1061b3a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceReceivedSharePropertiesTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.InPlaceReceivedShareProperties; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.ShareStatus; +import com.azure.analytics.purview.sharing.models.Sink; +import com.azure.analytics.purview.sharing.models.StoreKind; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class InPlaceReceivedSharePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InPlaceReceivedShareProperties model = BinaryData.fromString( + "{\"assetLocation\":\"zw\",\"assetStoreKind\":\"AdlsGen2Account\",\"createdAt\":\"2021-02-26T13:15:22Z\",\"displayName\":\"nwui\",\"expirationDate\":\"2021-04-01T12:07:24Z\",\"receiverEmail\":\"x\",\"receiverName\":\"izuckyfihrfidfvz\",\"receiverTenantName\":\"zuhtymwisdkfthwx\",\"senderEmail\":\"t\",\"senderName\":\"waopvkmijcmmxd\",\"senderTenantName\":\"fufsrpymzi\",\"sentShareDescription\":\"sezcxtb\",\"sharedAt\":\"2021-06-01T17:59:42Z\",\"shareStatus\":\"Detached\",\"sink\":{\"storeKind\":\"Sink\",\"storeReference\":{\"referenceName\":\"sne\",\"type\":\"ArmResourceReference\"}},\"state\":\"Moving\"}") + .toObject(InPlaceReceivedShareProperties.class); + Assertions.assertEquals(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND, model.getAssetStoreKind()); + Assertions.assertEquals("nwui", model.getDisplayName()); + Assertions.assertEquals(ShareStatus.DETACHED_SHARE_STATUS, model.getShareStatus()); + Assertions.assertEquals("sne", model.getSink().getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getSink().getStoreReference().getType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InPlaceReceivedShareProperties model + = new InPlaceReceivedShareProperties().setAssetStoreKind(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND) + .setDisplayName("nwui") + .setShareStatus(ShareStatus.DETACHED_SHARE_STATUS) + .setSink(new Sink().setStoreReference( + new StoreReference().setReferenceName("sne").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE))); + model = BinaryData.fromObject(model).toObject(InPlaceReceivedShareProperties.class); + Assertions.assertEquals(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND, model.getAssetStoreKind()); + Assertions.assertEquals("nwui", model.getDisplayName()); + Assertions.assertEquals(ShareStatus.DETACHED_SHARE_STATUS, model.getShareStatus()); + Assertions.assertEquals("sne", model.getSink().getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getSink().getStoreReference().getType()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceReceivedShareTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceReceivedShareTests.java new file mode 100644 index 000000000000..7588c1dff070 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceReceivedShareTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.InPlaceReceivedShare; +import com.azure.analytics.purview.sharing.models.InPlaceReceivedShareProperties; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.ShareStatus; +import com.azure.analytics.purview.sharing.models.Sink; +import com.azure.analytics.purview.sharing.models.StoreKind; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class InPlaceReceivedShareTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InPlaceReceivedShare model = BinaryData.fromString( + "{\"shareKind\":\"InPlace\",\"properties\":{\"assetLocation\":\"qktapspwgcuert\",\"assetStoreKind\":\"AdlsGen2Account\",\"createdAt\":\"2021-08-11T17:15:33Z\",\"displayName\":\"vqwhbmdgbbjfd\",\"expirationDate\":\"2021-09-14T17:27:38Z\",\"receiverEmail\":\"mbe\",\"receiverName\":\"pbhtqqrolfpfpsa\",\"receiverTenantName\":\"bquxigjy\",\"senderEmail\":\"zjaoyfhrtxil\",\"senderName\":\"rkujy\",\"senderTenantName\":\"l\",\"sentShareDescription\":\"uvfqawrlyxwj\",\"sharedAt\":\"2021-05-18T18:45:02Z\",\"shareStatus\":\"Attached\",\"sink\":{\"storeKind\":\"Sink\",\"storeReference\":{\"referenceName\":\"b\",\"type\":\"ArmResourceReference\"}},\"state\":\"Succeeded\"},\"id\":\"vpys\",\"type\":\"dnrujqguhmuouqfp\"}") + .toObject(InPlaceReceivedShare.class); + Assertions.assertEquals(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND, + model.getProperties().getAssetStoreKind()); + Assertions.assertEquals("vqwhbmdgbbjfd", model.getProperties().getDisplayName()); + Assertions.assertEquals(ShareStatus.ATTACHED_SHARE_STATUS, model.getProperties().getShareStatus()); + Assertions.assertEquals("b", model.getProperties().getSink().getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getProperties().getSink().getStoreReference().getType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InPlaceReceivedShare model = new InPlaceReceivedShare().setProperties( + new InPlaceReceivedShareProperties().setAssetStoreKind(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND) + .setDisplayName("vqwhbmdgbbjfd") + .setShareStatus(ShareStatus.ATTACHED_SHARE_STATUS) + .setSink(new Sink().setStoreReference( + new StoreReference().setReferenceName("b").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)))); + model = BinaryData.fromObject(model).toObject(InPlaceReceivedShare.class); + Assertions.assertEquals(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND, + model.getProperties().getAssetStoreKind()); + Assertions.assertEquals("vqwhbmdgbbjfd", model.getProperties().getDisplayName()); + Assertions.assertEquals(ShareStatus.ATTACHED_SHARE_STATUS, model.getProperties().getShareStatus()); + Assertions.assertEquals("b", model.getProperties().getSink().getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getProperties().getSink().getStoreReference().getType()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceSentSharePropertiesTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceSentSharePropertiesTests.java new file mode 100644 index 000000000000..b91355fcd2c4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceSentSharePropertiesTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.Artifact; +import com.azure.analytics.purview.sharing.models.InPlaceSentShareProperties; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class InPlaceSentSharePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InPlaceSentShareProperties model = BinaryData.fromString( + "{\"artifact\":{\"storeKind\":\"Artifact\",\"storeReference\":{\"referenceName\":\"hurzafblj\",\"type\":\"ArmResourceReference\"}},\"createdAt\":\"2021-03-25T07:01:11Z\",\"dependsOn\":[\"aaca43c1-d5df-420d-a361-2130d49f22f6\"],\"description\":\"jmkljavbqidtqajz\",\"displayName\":\"ulpkudjkrl\",\"senderEmail\":\"bzhfepgzgqexz\",\"senderName\":\"c\",\"senderTenantName\":\"c\",\"state\":\"Unknown\"}") + .toObject(InPlaceSentShareProperties.class); + Assertions.assertEquals("hurzafblj", model.getArtifact().getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getArtifact().getStoreReference().getType()); + Assertions.assertEquals("jmkljavbqidtqajz", model.getDescription()); + Assertions.assertEquals("ulpkudjkrl", model.getDisplayName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InPlaceSentShareProperties model = new InPlaceSentShareProperties() + .setArtifact(new Artifact().setStoreReference( + new StoreReference().setReferenceName("hurzafblj").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE))) + .setDescription("jmkljavbqidtqajz") + .setDisplayName("ulpkudjkrl"); + model = BinaryData.fromObject(model).toObject(InPlaceSentShareProperties.class); + Assertions.assertEquals("hurzafblj", model.getArtifact().getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getArtifact().getStoreReference().getType()); + Assertions.assertEquals("jmkljavbqidtqajz", model.getDescription()); + Assertions.assertEquals("ulpkudjkrl", model.getDisplayName()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceSentShareTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceSentShareTests.java new file mode 100644 index 000000000000..c63c83919360 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/InPlaceSentShareTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.Artifact; +import com.azure.analytics.purview.sharing.models.InPlaceSentShare; +import com.azure.analytics.purview.sharing.models.InPlaceSentShareProperties; +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class InPlaceSentShareTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InPlaceSentShare model = BinaryData.fromString( + "{\"shareKind\":\"InPlace\",\"properties\":{\"artifact\":{\"storeKind\":\"Artifact\",\"storeReference\":{\"referenceName\":\"eiachboosflnr\",\"type\":\"ArmResourceReference\"}},\"createdAt\":\"2021-02-19T13:41:36Z\",\"dependsOn\":[\"437e0dbc-a2ea-4305-8a54-4f22311ef841\"],\"description\":\"hzzvypyq\",\"displayName\":\"i\",\"senderEmail\":\"inpvswjdkirsoodq\",\"senderName\":\"crmnohjtckwhds\",\"senderTenantName\":\"fiyipjxsqwpgrj\",\"state\":\"Succeeded\"},\"id\":\"rcjxvsnbyxqabn\",\"type\":\"cpc\"}") + .toObject(InPlaceSentShare.class); + Assertions.assertEquals("eiachboosflnr", + model.getProperties().getArtifact().getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getProperties().getArtifact().getStoreReference().getType()); + Assertions.assertEquals("hzzvypyq", model.getProperties().getDescription()); + Assertions.assertEquals("i", model.getProperties().getDisplayName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InPlaceSentShare model + = new InPlaceSentShare().setProperties(new InPlaceSentShareProperties() + .setArtifact(new Artifact().setStoreReference(new StoreReference().setReferenceName("eiachboosflnr") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE))) + .setDescription("hzzvypyq") + .setDisplayName("i")); + model = BinaryData.fromObject(model).toObject(InPlaceSentShare.class); + Assertions.assertEquals("eiachboosflnr", + model.getProperties().getArtifact().getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getProperties().getArtifact().getStoreReference().getType()); + Assertions.assertEquals("hzzvypyq", model.getProperties().getDescription()); + Assertions.assertEquals("i", model.getProperties().getDisplayName()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ProxyResourceTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ProxyResourceTests.java new file mode 100644 index 000000000000..fd9ba2310a29 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ProxyResourceTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ProxyResource; +import com.azure.core.util.BinaryData; + +public final class ProxyResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProxyResource model + = BinaryData.fromString("{\"id\":\"upi\",\"type\":\"sybbejhph\"}").toObject(ProxyResource.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProxyResource model = new ProxyResource(); + model = BinaryData.fromObject(model).toObject(ProxyResource.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/PurviewShareClientTestBase.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/PurviewShareClientTestBase.java new file mode 100644 index 000000000000..8ca83c3003c5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/PurviewShareClientTestBase.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.analytics.purview.sharing.ReceivedSharesClient; +import com.azure.analytics.purview.sharing.ReceivedSharesClientBuilder; +import com.azure.analytics.purview.sharing.SentSharesClient; +import com.azure.analytics.purview.sharing.SentSharesClientBuilder; +import com.azure.analytics.purview.sharing.ShareResourcesClient; +import com.azure.analytics.purview.sharing.ShareResourcesClientBuilder; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +class PurviewShareClientTestBase extends TestProxyTestBase { + protected ReceivedSharesClient receivedSharesClient; + + protected SentSharesClient sentSharesClient; + + protected ShareResourcesClient shareResourcesClient; + + @Override + protected void beforeTest() { + ReceivedSharesClientBuilder receivedSharesClientbuilder = new ReceivedSharesClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + receivedSharesClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + receivedSharesClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + receivedSharesClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + receivedSharesClient = receivedSharesClientbuilder.buildClient(); + + SentSharesClientBuilder sentSharesClientbuilder + = new SentSharesClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + sentSharesClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + sentSharesClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + sentSharesClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + sentSharesClient = sentSharesClientbuilder.buildClient(); + + ShareResourcesClientBuilder shareResourcesClientbuilder = new ShareResourcesClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + shareResourcesClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + shareResourcesClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + shareResourcesClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + shareResourcesClient = shareResourcesClientbuilder.buildClient(); + + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedShareListTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedShareListTests.java new file mode 100644 index 000000000000..96a86ab138ef --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedShareListTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ReceivedShare; +import com.azure.analytics.purview.sharing.models.ReceivedShareList; +import com.azure.core.util.BinaryData; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ReceivedShareListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReceivedShareList model = BinaryData.fromString( + "{\"nextLink\":\"wnoi\",\"value\":[{\"shareKind\":\"ReceivedShare\",\"id\":\"lrxybqsoq\",\"type\":\"gkdmb\"},{\"shareKind\":\"ReceivedShare\",\"id\":\"zlobcufpd\",\"type\":\"rbt\"}]}") + .toObject(ReceivedShareList.class); + Assertions.assertEquals("wnoi", model.getNextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReceivedShareList model = new ReceivedShareList().setNextLink("wnoi") + .setValue(Arrays.asList(new ReceivedShare(), new ReceivedShare())); + model = BinaryData.fromObject(model).toObject(ReceivedShareList.class); + Assertions.assertEquals("wnoi", model.getNextLink()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedShareTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedShareTests.java new file mode 100644 index 000000000000..245a238f9bde --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedShareTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ReceivedShare; +import com.azure.core.util.BinaryData; + +public final class ReceivedShareTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReceivedShare model + = BinaryData.fromString("{\"shareKind\":\"ReceivedShare\",\"id\":\"mhquvgjxp\",\"type\":\"czmehmtzopbsp\"}") + .toObject(ReceivedShare.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ReceivedShare model = new ReceivedShare(); + model = BinaryData.fromObject(model).toObject(ReceivedShare.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistrationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistrationTests.java new file mode 100644 index 000000000000..9a765b698aa8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesActivateTenantEmailRegistrationTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesActivateTenantEmailRegistrationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesActivateTenantEmailRegistrationTests() { + BinaryData tenantEmailRegistration + = BinaryData.fromString("{\"properties\":{\"activationCode\":\"15ee7153fe0df5a3a449a897d6cec836\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.activateTenantEmailRegistrationWithResponse(tenantEmailRegistration, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("b470712a-ffbc-4d9f-ab99-6640db8bbcb8", + response.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"tenantEmailRegistration\",\"id\":\"cb817140-a0cf-464f-8a82-0a9627a026ab\",\"properties\":{\"activationCode\":\"15ee7153fe0df5a3a449a897d6cec836\",\"activationExpiration\":\"2022-08-16T22:35:17.2093506Z\",\"email\":\"john.smith@contoso.com\",\"registrationStatus\":\"Activated\",\"state\":\"Succeeded\",\"tenantId\":\"f686d426-8d16-42db-81b7-ab578e110ccd\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2AccountTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2AccountTests.java new file mode 100644 index 000000000000..2b2e8d0f69c5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceAdlsGen2AccountTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesCreateOrReplaceAdlsGen2AccountTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesCreateOrReplaceAdlsGen2AccountTests() { + BinaryData receivedShare = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"updatedReceivedShareNameAdls\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainerAbc\",\"folder\":\"receivingFolderAbc\",\"mountPath\":\"pathAbc\"},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/adlsAccount\"}}},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval(receivedSharesClient + .beginCreateOrReplaceReceivedShare("35E28F0E-DEA4-472F-84E4-5F1E45FB9937", receivedShare, requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccountTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccountTests.java new file mode 100644 index 000000000000..0ad4b25555da --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceBlobAccountTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesCreateOrReplaceBlobAccountTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesCreateOrReplaceBlobAccountTests() { + BinaryData receivedShare = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"updatedReceivedShareName\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainer\",\"folder\":\"receivingFolder\",\"mountPath\":\"path\"},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount\"}}},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval(receivedSharesClient + .beginCreateOrReplaceReceivedShare("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", receivedShare, requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceTests.java new file mode 100644 index 000000000000..fa55905652d5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesCreateOrReplaceTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesCreateOrReplaceTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesCreateOrReplaceTests() { + BinaryData receivedShare = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"updatedReceivedShareName\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainer\",\"folder\":\"receivingFolder\",\"mountPath\":\"path\"},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount\"}}},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval(receivedSharesClient + .beginCreateOrReplaceReceivedShare("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", receivedShare, requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDeleteTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDeleteTests.java new file mode 100644 index 000000000000..df02e0235ed4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesDeleteTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesDeleteTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesDeleteTests() { + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval( + receivedSharesClient.beginDeleteReceivedShare("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2AccountTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2AccountTests.java new file mode 100644 index 000000000000..1ab83de0fa75 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetAdlsGen2AccountTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesGetAdlsGen2AccountTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesGetAdlsGen2AccountTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.getReceivedShareWithResponse("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 12 July 2022 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"receivedShares\",\"id\":\"0D67B9C8-A6C6-4990-9EDE-12EA059D3002\",\"properties\":{\"assetLocation\":\"eastus\",\"assetStoreKind\":\"AdlsGen2Account\",\"createdAt\":\"2022-07-19T18:18:50.7095202Z\",\"displayName\":\"receivedShareName1\",\"receiverEmail\":\"johndoe@fabrikam.com\",\"receiverName\":\"John Doe\",\"receiverTenantName\":\"Fabrikam\",\"senderEmail\":\"ali.smith@contoso.com\",\"senderName\":\"Ali Smith\",\"senderTenantName\":\"Contoso\",\"sentShareDescription\":\"description\",\"shareStatus\":\"Attached\",\"sharedAt\":\"2022-07-18T18:17:56.1065304Z\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainerAbc\",\"folder\":\"receivingFolderAbc\",\"location\":\"eastus\",\"mountPath\":\"pathAbc\"},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/adlsAccount\"}},\"state\":\"Succeeded\"},\"shareKind\":\"InPlace\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccountTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccountTests.java new file mode 100644 index 000000000000..db4f4667c324 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetBlobAccountTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesGetBlobAccountTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesGetBlobAccountTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.getReceivedShareWithResponse("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 12 July 2022 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"receivedShares\",\"id\":\"0D67B9C8-A6C6-4990-9EDE-12EA059D3002\",\"properties\":{\"assetLocation\":\"eastus\",\"assetStoreKind\":\"BlobAccount\",\"createdAt\":\"2022-07-12T18:18:50.7095202Z\",\"displayName\":\"receivedShareName1\",\"receiverEmail\":\"janedoe@fabrikam.com\",\"receiverName\":\"Jane Doe\",\"receiverTenantName\":\"Fabrikam\",\"senderEmail\":\"ali.smith@contoso.com\",\"senderName\":\"Ali Smith\",\"senderTenantName\":\"Contoso\",\"sentShareDescription\":\"description\",\"shareStatus\":\"Attached\",\"sharedAt\":\"2022-07-12T18:17:56.1065304Z\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainer\",\"folder\":\"receivingFolder\",\"location\":\"eastus\",\"mountPath\":\"path\"},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount\"}},\"state\":\"Succeeded\"},\"shareKind\":\"InPlace\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetTests.java new file mode 100644 index 000000000000..03e4b78f0a24 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesGetTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesGetTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesGetTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.getReceivedShareWithResponse("0D67B9C8-A6C6-4990-9EDE-12EA059D3002", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 12 July 2022 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"receivedShares\",\"id\":\"0D67B9C8-A6C6-4990-9EDE-12EA059D3002\",\"properties\":{\"assetLocation\":\"eastus\",\"assetStoreKind\":\"AdlsGen2Account\",\"createdAt\":\"2022-07-19T18:18:50.7095202Z\",\"displayName\":\"receivedShareName1\",\"receiverEmail\":\"johndoe@fabrikam.com\",\"receiverName\":\"John Doe\",\"receiverTenantName\":\"Fabrikam\",\"senderEmail\":\"ali.smith@contoso.com\",\"senderName\":\"Ali Smith\",\"senderTenantName\":\"Contoso\",\"sentShareDescription\":\"description\",\"shareStatus\":\"Attached\",\"sharedAt\":\"2022-07-18T18:17:56.1065304Z\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainerAbc\",\"folder\":\"receivingFolderAbc\",\"location\":\"eastus\",\"mountPath\":\"pathAbc\"},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/adlsAccount\"}},\"state\":\"Succeeded\"},\"shareKind\":\"InPlace\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttachedTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttachedTests.java new file mode 100644 index 000000000000..90a27bb13635 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListAttachedTests.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.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesListAttachedTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesListAttachedTests() { + RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'"); + PagedIterable response = receivedSharesClient.listAttachedReceivedShares( + "/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount", + requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("Wed, 12 July 2022 18:04:32 GMT", + response.iterableByPage().iterator().next().getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-correlation-request-id")) + .getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"receivedShares\",\"id\":\"0D67B9C8-A6C6-4990-9EDE-12EA059D3002\",\"properties\":{\"assetLocation\":\"eastus\",\"assetStoreKind\":\"BlobAccount\",\"createdAt\":\"2022-07-12T18:18:50.7095202Z\",\"displayName\":\"receivedShareName1\",\"receiverEmail\":\"janedoe@fabrikam.com\",\"receiverName\":\"Jane Doe\",\"receiverTenantName\":\"Fabrikam\",\"senderEmail\":\"ali.smith@contoso.com\",\"senderName\":\"Ali Smith\",\"senderTenantName\":\"Contoso\",\"sentShareDescription\":\"description\",\"shareStatus\":\"Attached\",\"sharedAt\":\"2022-07-12T18:17:56.1065304Z\",\"sink\":{\"properties\":{\"containerName\":\"receivingContainer\",\"folder\":\"receivingFolder\",\"location\":\"eastus\",\"mountPath\":\"path\"},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/4D8FD81D-431D-4B1D-B46C-C770CFC034FC/resourceGroups/contoso-rg/providers/Microsoft.Storage/storageAccounts/blobAccount\"}},\"state\":\"Succeeded\"},\"shareKind\":\"InPlace\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetachedTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetachedTests.java new file mode 100644 index 000000000000..f20c4a1fb93e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesListDetachedTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesListDetachedTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesListDetachedTests() { + RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'"); + PagedIterable response = receivedSharesClient.listDetachedReceivedShares(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("Wed, 12 July 2022 18:04:32 GMT", + response.iterableByPage().iterator().next().getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-correlation-request-id")) + .getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"receivedShares\",\"id\":\"0D67B9C8-A6C6-4990-9EDE-12EA059D3002\",\"properties\":{\"assetLocation\":\"eastus\",\"assetStoreKind\":\"BlobAccount\",\"createdAt\":\"2022-07-12T18:18:50.7095202Z\",\"displayName\":\"receivedShareName1\",\"receiverEmail\":\"janedoe@fabrikam.com\",\"receiverName\":null,\"receiverTenantName\":null,\"senderEmail\":\"ali.smith@contoso.com\",\"senderName\":\"Ali Smith\",\"senderTenantName\":\"Contoso\",\"sentShareDescription\":\"description\",\"shareStatus\":\"Detached\",\"sharedAt\":\"2022-07-12T18:17:56.1065304Z\",\"state\":\"Succeeded\"},\"shareKind\":\"InPlace\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistrationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistrationTests.java new file mode 100644 index 000000000000..94d9eab428e1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ReceivedSharesRegisterTenantEmailRegistrationTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ReceivedSharesRegisterTenantEmailRegistrationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testReceivedSharesRegisterTenantEmailRegistrationTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = receivedSharesClient.registerTenantEmailRegistrationWithResponse(requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("b470712a-ffbc-4d9f-ab99-6640db8bbcb8", + response.getHeaders().get(HttpHeaderName.fromString("repeatability-request-id")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"tenantEmailRegistration\",\"id\":\"cb817140-a0cf-464f-8a82-0a9627a026ab\",\"properties\":{\"activationCode\":\"15ee7153fe0df5a3a449a897d6cec836\",\"activationExpiration\":\"2022-08-16T22:35:17.2093506Z\",\"email\":\"john.smith@contoso.com\",\"registrationStatus\":\"ActivationPending\",\"state\":\"Succeeded\",\"tenantId\":\"f686d426-8d16-42db-81b7-ab578e110ccd\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareInvitationListTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareInvitationListTests.java new file mode 100644 index 000000000000..944d373faa22 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareInvitationListTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.SentShareInvitation; +import com.azure.analytics.purview.sharing.models.SentShareInvitationList; +import com.azure.core.util.BinaryData; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SentShareInvitationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SentShareInvitationList model = BinaryData.fromString( + "{\"nextLink\":\"pewnw\",\"value\":[{\"invitationKind\":\"SentShareInvitation\",\"id\":\"tjzyflus\",\"type\":\"hmofc\"},{\"invitationKind\":\"SentShareInvitation\",\"id\":\"smy\",\"type\":\"kdtmlxhekuk\"}]}") + .toObject(SentShareInvitationList.class); + Assertions.assertEquals("pewnw", model.getNextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SentShareInvitationList model = new SentShareInvitationList().setNextLink("pewnw") + .setValue(Arrays.asList(new SentShareInvitation(), new SentShareInvitation())); + model = BinaryData.fromObject(model).toObject(SentShareInvitationList.class); + Assertions.assertEquals("pewnw", model.getNextLink()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareInvitationTests.java new file mode 100644 index 000000000000..5753a83bb4dc --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareInvitationTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.SentShareInvitation; +import com.azure.core.util.BinaryData; + +public final class SentShareInvitationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SentShareInvitation model = BinaryData + .fromString("{\"invitationKind\":\"SentShareInvitation\",\"id\":\"txukcdmp\",\"type\":\"cryuan\"}") + .toObject(SentShareInvitation.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SentShareInvitation model = new SentShareInvitation(); + model = BinaryData.fromObject(model).toObject(SentShareInvitation.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareListTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareListTests.java new file mode 100644 index 000000000000..9058683dc006 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareListTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.SentShare; +import com.azure.analytics.purview.sharing.models.SentShareList; +import com.azure.core.util.BinaryData; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SentShareListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SentShareList model = BinaryData.fromString( + "{\"nextLink\":\"qjnqglhqgnufoooj\",\"value\":[{\"shareKind\":\"SentShare\",\"id\":\"fsqesaagdfmglzlh\",\"type\":\"rifkwm\"},{\"shareKind\":\"SentShare\",\"id\":\"ktsizntocipaou\",\"type\":\"psqucmpoyf\"}]}") + .toObject(SentShareList.class); + Assertions.assertEquals("qjnqglhqgnufoooj", model.getNextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SentShareList model = new SentShareList().setNextLink("qjnqglhqgnufoooj") + .setValue(Arrays.asList(new SentShare(), new SentShare())); + model = BinaryData.fromObject(model).toObject(SentShareList.class); + Assertions.assertEquals("qjnqglhqgnufoooj", model.getNextLink()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareTests.java new file mode 100644 index 000000000000..e6c67ca56791 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentShareTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.SentShare; +import com.azure.core.util.BinaryData; + +public final class SentShareTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SentShare model + = BinaryData.fromString("{\"shareKind\":\"SentShare\",\"id\":\"fogknygjofjdde\",\"type\":\"rd\"}") + .toObject(SentShare.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SentShare model = new SentShare(); + model = BinaryData.fromObject(model).toObject(SentShare.class); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitationTests.java new file mode 100644 index 000000000000..dad668507d1d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateInvitationTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesCreateInvitationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesCreateInvitationTests() { + BinaryData sentShareInvitation = BinaryData.fromString( + "{\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":null,\"notify\":true,\"targetEmail\":\"testReceiver@microsoft.com\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.createSentShareInvitationWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", + "9F154FA4-93D1-426B-A908-A9CAC7192B21", sentShareInvitation, requestOptions); + Assertions.assertEquals(201, response.getStatusCode()); + Assertions.assertEquals("Thu, 4 Aug 2022 13:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"sentShares/sentShareInvitations\",\"id\":\"9F154FA4-93D1-426B-A908-A9CAC7192B21\",\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":null,\"notify\":true,\"senderEmail\":\"testSender@microsoft.com\",\"senderName\":\"Test Sender\",\"senderTenantName\":\"Test Tenant\",\"sentAt\":\"2022-08-04T13:04:32.8172128Z\",\"shareStatus\":\"Detached\",\"state\":\"Succeeded\",\"targetEmail\":\"testReceiver@microsoft.com\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2AccountTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2AccountTests.java new file mode 100644 index 000000000000..7212b0ead5e4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceAdlsGen2AccountTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesCreateOrReplaceAdlsGen2AccountTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesCreateOrReplaceAdlsGen2AccountTests() { + BinaryData sentShare = BinaryData.fromString( + "{\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"SharedFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"displayName\":\"sentShare1\"},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval(sentSharesClient + .beginCreateOrReplaceSentShare("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", sentShare, requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccountTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccountTests.java new file mode 100644 index 000000000000..7ce3c0b7f685 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceBlobAccountTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesCreateOrReplaceBlobAccountTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesCreateOrReplaceBlobAccountTests() { + BinaryData sentShare = BinaryData.fromString( + "{\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"SharedFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"displayName\":\"sentShare1\"},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval(sentSharesClient + .beginCreateOrReplaceSentShare("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", sentShare, requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceTests.java new file mode 100644 index 000000000000..8f3af6ac19d2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateOrReplaceTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesCreateOrReplaceTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesCreateOrReplaceTests() { + BinaryData sentShare = BinaryData.fromString( + "{\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"SharedFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"displayName\":\"sentShare1\"},\"shareKind\":\"InPlace\"}"); + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval(sentSharesClient + .beginCreateOrReplaceSentShare("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", sentShare, requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitationTests.java new file mode 100644 index 000000000000..063d4c9441b3 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateServiceInvitationTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesCreateServiceInvitationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesCreateServiceInvitationTests() { + BinaryData sentShareInvitation = BinaryData.fromString( + "{\"invitationKind\":\"Service\",\"properties\":{\"expirationDate\":null,\"targetActiveDirectoryId\":\"5DAE1226-9FAA-4D71-B8D4-87B81DFF672E\",\"targetObjectId\":\"EFA02830-BB7A-4586-B615-A6DFF19FEBBF\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.createSentShareInvitationWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", + "9F154FA4-93D1-426B-A908-A9CAC7192B21", sentShareInvitation, requestOptions); + Assertions.assertEquals(201, response.getStatusCode()); + Assertions.assertEquals("Thu, 4 Aug 2022 13:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"sentShares/sentShareInvitations\",\"id\":\"9F154FA4-93D1-426B-A908-A9CAC7192B21\",\"invitationKind\":\"Service\",\"properties\":{\"expirationDate\":null,\"senderEmail\":\"testSender@microsoft.com\",\"senderName\":\"Test Sender\",\"senderTenantName\":\"Test Tenant\",\"sentAt\":\"2022-08-04T13:04:32.8172128Z\",\"shareStatus\":\"Detached\",\"state\":\"Succeeded\",\"targetActiveDirectoryId\":\"5DAE1226-9FAA-4D71-B8D4-87B81DFF672E\",\"targetObjectId\":\"EFA02830-BB7A-4586-B615-A6DFF19FEBBF\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitationTests.java new file mode 100644 index 000000000000..1dd2d7220b38 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesCreateUserInvitationTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesCreateUserInvitationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesCreateUserInvitationTests() { + BinaryData sentShareInvitation = BinaryData.fromString( + "{\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":\"2025-07-21T23:52:00.7691109Z\",\"notify\":true,\"targetEmail\":\"testReceiver@microsoft.com\"}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.createSentShareInvitationWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", + "9F154FA4-93D1-426B-A908-A9CAC7192B21", sentShareInvitation, requestOptions); + Assertions.assertEquals(201, response.getStatusCode()); + Assertions.assertEquals("Thu, 4 Aug 2022 13:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"sentShares/sentShareInvitations\",\"id\":\"9F154FA4-93D1-426B-A908-A9CAC7192B21\",\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":\"2025-07-21T23:52:00.7691109Z\",\"notify\":true,\"senderEmail\":\"testSender@microsoft.com\",\"senderName\":\"Test Sender\",\"senderTenantName\":\"Test Tenant\",\"sentAt\":\"2022-08-04T13:04:32.8172128Z\",\"shareStatus\":\"Detached\",\"state\":\"Succeeded\",\"targetEmail\":\"testReceiver@microsoft.com\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitationTests.java new file mode 100644 index 000000000000..14da4d0c05a0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteInvitationTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesDeleteInvitationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesDeleteInvitationTests() { + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response + = setPlaybackSyncPollerPollInterval(sentSharesClient.beginDeleteSentShareInvitation( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteTests.java new file mode 100644 index 000000000000..94bdc714ad42 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesDeleteTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesDeleteTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesDeleteTests() { + RequestOptions requestOptions = new RequestOptions(); + SyncPoller response = setPlaybackSyncPollerPollInterval( + sentSharesClient.beginDeleteSentShare("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions)); + Assertions.assertEquals(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, + response.waitForCompletion().getStatus()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2AccountTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2AccountTests.java new file mode 100644 index 000000000000..19068ea194df --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetAdlsGen2AccountTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesGetAdlsGen2AccountTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesGetAdlsGen2AccountTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.getSentShareWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"SentShare\",\"id\":\"FF4A2AAE-8755-47BB-9C00-A774B5A7006E\",\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"ShareFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"createdAt\":\"2021-07-21T23:45:35.3708674Z\",\"dependsOn\":[],\"displayName\":\"sentShare1\",\"senderEmail\":\"johnsmith@contoso.com\",\"senderName\":\"John Smith\",\"senderTenantName\":\"Contoso\",\"state\":\"Succeeded\"},\"shareKind\":\"InPlace\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccountTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccountTests.java new file mode 100644 index 000000000000..4cee1ec5a487 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetBlobAccountTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesGetBlobAccountTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesGetBlobAccountTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.getSentShareWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"SentShare\",\"id\":\"FF4A2AAE-8755-47BB-9C00-A774B5A7006E\",\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"ShareFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"createdAt\":\"2021-07-21T23:45:35.3708674Z\",\"dependsOn\":[],\"displayName\":\"sentShare1\",\"senderEmail\":\"johnsmith@contoso.com\",\"senderName\":\"John Smith\",\"senderTenantName\":\"Contoso\",\"state\":\"Succeeded\"},\"shareKind\":\"InPlace\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitationTests.java new file mode 100644 index 000000000000..f039708974b8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetInvitationTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesGetInvitationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesGetInvitationTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = sentSharesClient.getSentShareInvitationWithResponse( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Fri, 12 Aug 2022 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"sentShares/sentShareInvitations\",\"id\":\"9F154FA4-93D1-426B-A908-A9CAC7192B21\",\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":null,\"notify\":true,\"senderEmail\":\"testSender@microsoft.com\",\"senderName\":\"Test Sender\",\"senderTenantName\":\"Test Tenant\",\"sentAt\":\"2022-08-04T13:04:32.8172128Z\",\"shareStatus\":\"Detached\",\"state\":\"Succeeded\",\"targetEmail\":\"testReceiver@microsoft.com\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitationTests.java new file mode 100644 index 000000000000..81c8ab51605b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetServiceInvitationTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesGetServiceInvitationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesGetServiceInvitationTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = sentSharesClient.getSentShareInvitationWithResponse( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Fri, 12 Aug 2022 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"sentShares/sentShareInvitations\",\"id\":\"9F154FA4-93D1-426B-A908-A9CAC7192B21\",\"invitationKind\":\"Service\",\"properties\":{\"expirationDate\":\"2022-08-11T13:04:32.8172128Z\",\"senderEmail\":\"testSender@microsoft.com\",\"senderName\":\"Test Sender\",\"senderTenantName\":\"Test Tenant\",\"sentAt\":\"2022-08-04T13:04:32.8172128Z\",\"shareStatus\":\"Detached\",\"state\":\"Succeeded\",\"targetActiveDirectoryId\":\"5DAE1226-9FAA-4D71-B8D4-87B81DFF672E\",\"targetObjectId\":\"EFA02830-BB7A-4586-B615-A6DFF19FEBBF\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetTests.java new file mode 100644 index 000000000000..5c657f93eab7 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesGetTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesGetTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = sentSharesClient.getSentShareWithResponse("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"SentShare\",\"id\":\"FF4A2AAE-8755-47BB-9C00-A774B5A7006E\",\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"ShareFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"createdAt\":\"2021-07-21T23:45:35.3708674Z\",\"dependsOn\":[],\"displayName\":\"sentShare1\",\"senderEmail\":\"johnsmith@contoso.com\",\"senderName\":\"John Smith\",\"senderTenantName\":\"Contoso\",\"state\":\"Succeeded\"},\"shareKind\":\"InPlace\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitationTests.java new file mode 100644 index 000000000000..a83622cdaf3e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesGetUserInvitationTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesGetUserInvitationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesGetUserInvitationTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = sentSharesClient.getSentShareInvitationWithResponse( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Fri, 12 Aug 2022 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"sentShares/sentShareInvitations\",\"id\":\"9F154FA4-93D1-426B-A908-A9CAC7192B21\",\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":null,\"notify\":true,\"senderEmail\":\"testSender@microsoft.com\",\"senderName\":\"Test Sender\",\"senderTenantName\":\"Test Tenant\",\"sentAt\":\"2022-08-04T13:04:32.8172128Z\",\"shareStatus\":\"Detached\",\"state\":\"Succeeded\",\"targetEmail\":\"testReceiver@microsoft.com\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesListInvitationsTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesListInvitationsTests.java new file mode 100644 index 000000000000..4d8daa765f3e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesListInvitationsTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesListInvitationsTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesListInvitationsTests() { + RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'"); + PagedIterable response + = sentSharesClient.listSentShareInvitations("FF4A2AAE-8755-47BB-9C00-A774B5A7006E", requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 17:33:55 GMT", + response.iterableByPage().iterator().next().getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("5d862c55-4de9-4a46-969d-cf1ed3e235ed", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-correlation-request-id")) + .getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"sentShares/sentShareInvitations\",\"id\":\"9F154FA4-93D1-426B-A908-A9CAC7192B21\",\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":null,\"notify\":true,\"senderEmail\":\"testSender@microsoft.com\",\"senderName\":\"Test Sender\",\"senderTenantName\":\"Test Tenant\",\"sentAt\":\"2022-08-04T13:04:32.8172128Z\",\"shareStatus\":\"Detached\",\"state\":\"Succeeded\",\"targetEmail\":\"testReceiver@microsoft.com\"}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesListTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesListTests.java new file mode 100644 index 000000000000..96e26ec2eba2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesListTests.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.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesListTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesListTests() { + RequestOptions requestOptions = new RequestOptions().addQueryParam("filter", "Name eq 'testName'"); + PagedIterable response = sentSharesClient.listSentShares( + "/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage", + requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("Wed, 13 Sep 2017 18:04:32 GMT", + response.iterableByPage().iterator().next().getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-correlation-request-id")) + .getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"SentShare\",\"id\":\"FF4A2AAE-8755-47BB-9C00-A774B5A7006E\",\"properties\":{\"description\":\"description\",\"artifact\":{\"properties\":{\"paths\":[{\"containerName\":\"container1\",\"receiverPath\":\"ShareFile.txt\",\"senderPath\":\"directory/file.txt\"}]},\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}},\"createdAt\":\"2021-07-21T23:45:35.3708674Z\",\"dependsOn\":[],\"displayName\":\"sentShare1\",\"senderEmail\":\"johnsmith@contoso.com\",\"senderName\":\"John Smith\",\"senderTenantName\":\"Contoso\",\"state\":\"Succeeded\"},\"shareKind\":\"InPlace\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesNotifyUserInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesNotifyUserInvitationTests.java new file mode 100644 index 000000000000..7f6bc32a6759 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SentSharesNotifyUserInvitationTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class SentSharesNotifyUserInvitationTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testSentSharesNotifyUserInvitationTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response = sentSharesClient.notifyUserSentShareInvitationWithResponse( + "FF4A2AAE-8755-47BB-9C00-A774B5A7006E", "9F154FA4-93D1-426B-A908-A9CAC7192B21", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals("Fri, 12 Aug 2022 18:04:32 GMT", + response.getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.getHeaders().get(HttpHeaderName.fromString("x-ms-correlation-request-id")).getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"sentShares/sentShareInvitations\",\"id\":\"9F154FA4-93D1-426B-A908-A9CAC7192B21\",\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":null,\"notify\":true,\"senderEmail\":\"testSender@microsoft.com\",\"senderName\":\"Test Sender\",\"senderTenantName\":\"Test Tenant\",\"sentAt\":\"2022-08-04T13:04:32.8172128Z\",\"shareStatus\":\"Detached\",\"state\":\"Succeeded\",\"targetEmail\":\"testReceiver@microsoft.com\"}}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ServiceInvitationPropertiesTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ServiceInvitationPropertiesTests.java new file mode 100644 index 000000000000..532f966dfdae --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ServiceInvitationPropertiesTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ServiceInvitationProperties; +import com.azure.analytics.purview.sharing.models.ShareStatus; +import com.azure.core.util.BinaryData; +import java.time.OffsetDateTime; +import java.util.UUID; +import org.junit.jupiter.api.Assertions; + +public final class ServiceInvitationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServiceInvitationProperties model = BinaryData.fromString( + "{\"expirationDate\":\"2021-03-11T04:53:43Z\",\"senderEmail\":\"zrlovmclwhijcoej\",\"senderName\":\"bzaqsqsycbkbfk\",\"senderTenantName\":\"kdkexxp\",\"sentAt\":\"2021-12-06T23:26:40Z\",\"shareStatus\":\"Attached\",\"state\":\"Creating\",\"targetActiveDirectoryId\":\"e0549b0f-1b64-499f-ae71-00beb447a084\",\"targetObjectId\":\"380feec2-0bbb-4a48-b368-1b9a6f54a489\"}") + .toObject(ServiceInvitationProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T04:53:43Z"), model.getExpirationDate()); + Assertions.assertEquals(ShareStatus.ATTACHED_SHARE_STATUS, model.getShareStatus()); + Assertions.assertEquals(UUID.fromString("e0549b0f-1b64-499f-ae71-00beb447a084"), + model.getTargetActiveDirectoryId()); + Assertions.assertEquals(UUID.fromString("380feec2-0bbb-4a48-b368-1b9a6f54a489"), model.getTargetObjectId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServiceInvitationProperties model + = new ServiceInvitationProperties().setExpirationDate(OffsetDateTime.parse("2021-03-11T04:53:43Z")) + .setShareStatus(ShareStatus.ATTACHED_SHARE_STATUS) + .setTargetActiveDirectoryId(UUID.fromString("e0549b0f-1b64-499f-ae71-00beb447a084")) + .setTargetObjectId(UUID.fromString("380feec2-0bbb-4a48-b368-1b9a6f54a489")); + model = BinaryData.fromObject(model).toObject(ServiceInvitationProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T04:53:43Z"), model.getExpirationDate()); + Assertions.assertEquals(ShareStatus.ATTACHED_SHARE_STATUS, model.getShareStatus()); + Assertions.assertEquals(UUID.fromString("e0549b0f-1b64-499f-ae71-00beb447a084"), + model.getTargetActiveDirectoryId()); + Assertions.assertEquals(UUID.fromString("380feec2-0bbb-4a48-b368-1b9a6f54a489"), model.getTargetObjectId()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ServiceInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ServiceInvitationTests.java new file mode 100644 index 000000000000..bc0b98d5c10c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ServiceInvitationTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ServiceInvitation; +import com.azure.analytics.purview.sharing.models.ServiceInvitationProperties; +import com.azure.analytics.purview.sharing.models.ShareStatus; +import com.azure.core.util.BinaryData; +import java.time.OffsetDateTime; +import java.util.UUID; +import org.junit.jupiter.api.Assertions; + +public final class ServiceInvitationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServiceInvitation model = BinaryData.fromString( + "{\"invitationKind\":\"Service\",\"properties\":{\"expirationDate\":\"2021-07-11T14:04:52Z\",\"senderEmail\":\"hbcsgl\",\"senderName\":\"majtjaod\",\"senderTenantName\":\"bnbdxkqpxokajion\",\"sentAt\":\"2021-11-13T15:28:04Z\",\"shareStatus\":\"Detached\",\"state\":\"Creating\",\"targetActiveDirectoryId\":\"c9eb7121-6bf1-4dba-8549-01f869cab8f5\",\"targetObjectId\":\"1a00a47e-cb6c-4f1d-b3df-a11dacdf2005\"},\"id\":\"xgcp\",\"type\":\"gmaajrm\"}") + .toObject(ServiceInvitation.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-11T14:04:52Z"), + model.getProperties().getExpirationDate()); + Assertions.assertEquals(ShareStatus.DETACHED_SHARE_STATUS, model.getProperties().getShareStatus()); + Assertions.assertEquals(UUID.fromString("c9eb7121-6bf1-4dba-8549-01f869cab8f5"), + model.getProperties().getTargetActiveDirectoryId()); + Assertions.assertEquals(UUID.fromString("1a00a47e-cb6c-4f1d-b3df-a11dacdf2005"), + model.getProperties().getTargetObjectId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServiceInvitation model = new ServiceInvitation().setProperties( + new ServiceInvitationProperties().setExpirationDate(OffsetDateTime.parse("2021-07-11T14:04:52Z")) + .setShareStatus(ShareStatus.DETACHED_SHARE_STATUS) + .setTargetActiveDirectoryId(UUID.fromString("c9eb7121-6bf1-4dba-8549-01f869cab8f5")) + .setTargetObjectId(UUID.fromString("1a00a47e-cb6c-4f1d-b3df-a11dacdf2005"))); + model = BinaryData.fromObject(model).toObject(ServiceInvitation.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-11T14:04:52Z"), + model.getProperties().getExpirationDate()); + Assertions.assertEquals(ShareStatus.DETACHED_SHARE_STATUS, model.getProperties().getShareStatus()); + Assertions.assertEquals(UUID.fromString("c9eb7121-6bf1-4dba-8549-01f869cab8f5"), + model.getProperties().getTargetActiveDirectoryId()); + Assertions.assertEquals(UUID.fromString("1a00a47e-cb6c-4f1d-b3df-a11dacdf2005"), + model.getProperties().getTargetObjectId()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourceListTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourceListTests.java new file mode 100644 index 000000000000..0e858cdd53fe --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourceListTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.ShareResource; +import com.azure.analytics.purview.sharing.models.ShareResourceList; +import com.azure.analytics.purview.sharing.models.StoreKind; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ShareResourceListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ShareResourceList model = BinaryData.fromString( + "{\"nextLink\":\"uxzdxtay\",\"value\":[{\"receivedSharesCount\":130471446,\"sentSharesCount\":1622829124,\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"referenceName\":\"qobmtukk\",\"type\":\"ArmResourceReference\"},\"id\":\"tihfx\",\"type\":\"jbpzvgnwzsymg\"},{\"receivedSharesCount\":271043498,\"sentSharesCount\":1526885086,\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"referenceName\":\"hdbihan\",\"type\":\"ArmResourceReference\"},\"id\":\"cbjy\",\"type\":\"git\"},{\"receivedSharesCount\":1190451363,\"sentSharesCount\":1575612003,\"storeKind\":\"BlobAccount\",\"storeReference\":{\"referenceName\":\"ikxwc\",\"type\":\"ArmResourceReference\"},\"id\":\"cnpqxuhivyqniwby\",\"type\":\"k\"},{\"receivedSharesCount\":827133079,\"sentSharesCount\":832798449,\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"referenceName\":\"fwvuk\",\"type\":\"ArmResourceReference\"},\"id\":\"dcc\",\"type\":\"h\"}]}") + .toObject(ShareResourceList.class); + Assertions.assertEquals("uxzdxtay", model.getNextLink()); + Assertions.assertEquals(130471446, model.getValue().get(0).getReceivedSharesCount()); + Assertions.assertEquals(1622829124, model.getValue().get(0).getSentSharesCount()); + Assertions.assertEquals(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND, model.getValue().get(0).getStoreKind()); + Assertions.assertEquals("qobmtukk", model.getValue().get(0).getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getValue().get(0).getStoreReference().getType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ShareResourceList model = new ShareResourceList().setNextLink("uxzdxtay") + .setValue(Arrays.asList( + new ShareResource().setReceivedSharesCount(130471446) + .setSentSharesCount(1622829124) + .setStoreKind(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND) + .setStoreReference(new StoreReference().setReferenceName("qobmtukk") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)), + new ShareResource().setReceivedSharesCount(271043498) + .setSentSharesCount(1526885086) + .setStoreKind(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND) + .setStoreReference(new StoreReference().setReferenceName("hdbihan") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)), + new ShareResource().setReceivedSharesCount(1190451363) + .setSentSharesCount(1575612003) + .setStoreKind(StoreKind.BLOB_STORAGE_ACCOUNT_STORE_KIND) + .setStoreReference(new StoreReference().setReferenceName("ikxwc") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)), + new ShareResource().setReceivedSharesCount(827133079) + .setSentSharesCount(832798449) + .setStoreKind(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND) + .setStoreReference(new StoreReference().setReferenceName("fwvuk") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)))); + model = BinaryData.fromObject(model).toObject(ShareResourceList.class); + Assertions.assertEquals("uxzdxtay", model.getNextLink()); + Assertions.assertEquals(130471446, model.getValue().get(0).getReceivedSharesCount()); + Assertions.assertEquals(1622829124, model.getValue().get(0).getSentSharesCount()); + Assertions.assertEquals(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND, model.getValue().get(0).getStoreKind()); + Assertions.assertEquals("qobmtukk", model.getValue().get(0).getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, + model.getValue().get(0).getStoreReference().getType()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourceTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourceTests.java new file mode 100644 index 000000000000..f56a71b03a66 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourceTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.ShareResource; +import com.azure.analytics.purview.sharing.models.StoreKind; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class ShareResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ShareResource model = BinaryData.fromString( + "{\"receivedSharesCount\":2045600331,\"sentSharesCount\":1132741350,\"storeKind\":\"AdlsGen2Account\",\"storeReference\":{\"referenceName\":\"ryhtnapczwlokjy\",\"type\":\"ArmResourceReference\"},\"id\":\"vnipjox\",\"type\":\"nchgej\"}") + .toObject(ShareResource.class); + Assertions.assertEquals(2045600331, model.getReceivedSharesCount()); + Assertions.assertEquals(1132741350, model.getSentSharesCount()); + Assertions.assertEquals(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND, model.getStoreKind()); + Assertions.assertEquals("ryhtnapczwlokjy", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ShareResource model = new ShareResource().setReceivedSharesCount(2045600331) + .setSentSharesCount(1132741350) + .setStoreKind(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND) + .setStoreReference(new StoreReference().setReferenceName("ryhtnapczwlokjy") + .setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)); + model = BinaryData.fromObject(model).toObject(ShareResource.class); + Assertions.assertEquals(2045600331, model.getReceivedSharesCount()); + Assertions.assertEquals(1132741350, model.getSentSharesCount()); + Assertions.assertEquals(StoreKind.ADLS_GEN2STORAGE_ACCOUNT_STORE_KIND, model.getStoreKind()); + Assertions.assertEquals("ryhtnapczwlokjy", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourcesListTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourcesListTests.java new file mode 100644 index 000000000000..8672b46e0de2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/ShareResourcesListTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ShareResourcesListTests extends PurviewShareClientTestBase { + @Test + @Disabled + public void testShareResourcesListTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = shareResourcesClient.listShareResources(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals("Wed, 12 July 2022 18:04:32 GMT", + response.iterableByPage().iterator().next().getHeaders().get(HttpHeaderName.fromString("Date")).getValue()); + Assertions.assertEquals("25c78f97-0b0a-4fe9-ad39-883a482265cd", + response.iterableByPage() + .iterator() + .next() + .getHeaders() + .get(HttpHeaderName.fromString("x-ms-correlation-request-id")) + .getValue()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"ShareResource\",\"id\":\"cb817140-a0cf-464f-8a82-0a9627a026ab\",\"receivedSharesCount\":1,\"sentSharesCount\":1,\"storeKind\":\"BlobAccount\",\"storeReference\":{\"type\":\"ArmResourceReference\",\"referenceName\":\"/subscriptions/de06c3a0-4610-4ca0-8cbb-bbdac204bd65/resourceGroups/sender-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage\"}}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SinkTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SinkTests.java new file mode 100644 index 000000000000..99737209adc2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/SinkTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.Sink; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class SinkTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Sink model = BinaryData.fromString( + "{\"storeKind\":\"Sink\",\"storeReference\":{\"referenceName\":\"dphlxaolt\",\"type\":\"ArmResourceReference\"}}") + .toObject(Sink.class); + Assertions.assertEquals("dphlxaolt", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Sink model = new Sink().setStoreReference( + new StoreReference().setReferenceName("dphlxaolt").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE)); + model = BinaryData.fromObject(model).toObject(Sink.class); + Assertions.assertEquals("dphlxaolt", model.getStoreReference().getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getStoreReference().getType()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/StorageAccountPathTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/StorageAccountPathTests.java new file mode 100644 index 000000000000..539f62bee855 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/StorageAccountPathTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.StorageAccountPath; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class StorageAccountPathTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageAccountPath model = BinaryData + .fromString("{\"containerName\":\"s\",\"receiverPath\":\"smjqulngsntnbyb\",\"senderPath\":\"gc\"}") + .toObject(StorageAccountPath.class); + Assertions.assertEquals("s", model.getContainerName()); + Assertions.assertEquals("smjqulngsntnbyb", model.getReceiverPath()); + Assertions.assertEquals("gc", model.getSenderPath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageAccountPath model + = new StorageAccountPath().setContainerName("s").setReceiverPath("smjqulngsntnbyb").setSenderPath("gc"); + model = BinaryData.fromObject(model).toObject(StorageAccountPath.class); + Assertions.assertEquals("s", model.getContainerName()); + Assertions.assertEquals("smjqulngsntnbyb", model.getReceiverPath()); + Assertions.assertEquals("gc", model.getSenderPath()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/StoreReferenceTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/StoreReferenceTests.java new file mode 100644 index 000000000000..7bb62cfdc537 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/StoreReferenceTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ReferenceNameType; +import com.azure.analytics.purview.sharing.models.StoreReference; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; + +public final class StoreReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StoreReference model + = BinaryData.fromString("{\"referenceName\":\"odmailzyd\",\"type\":\"ArmResourceReference\"}") + .toObject(StoreReference.class); + Assertions.assertEquals("odmailzyd", model.getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StoreReference model + = new StoreReference().setReferenceName("odmailzyd").setType(ReferenceNameType.ARM_RESOURCE_REFERENCE); + model = BinaryData.fromObject(model).toObject(StoreReference.class); + Assertions.assertEquals("odmailzyd", model.getReferenceName()); + Assertions.assertEquals(ReferenceNameType.ARM_RESOURCE_REFERENCE, model.getType()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/UserInvitationPropertiesTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/UserInvitationPropertiesTests.java new file mode 100644 index 000000000000..9935d187738f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/UserInvitationPropertiesTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ShareStatus; +import com.azure.analytics.purview.sharing.models.UserInvitationProperties; +import com.azure.core.util.BinaryData; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class UserInvitationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserInvitationProperties model = BinaryData.fromString( + "{\"expirationDate\":\"2021-02-28T12:47:25Z\",\"notify\":true,\"senderEmail\":\"kw\",\"senderName\":\"eicxmqciwqvhkhi\",\"senderTenantName\":\"igdtopbob\",\"sentAt\":\"2021-02-18T21:42:16Z\",\"shareStatus\":\"Detached\",\"state\":\"Unknown\",\"targetEmail\":\"u\"}") + .toObject(UserInvitationProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-28T12:47:25Z"), model.getExpirationDate()); + Assertions.assertEquals(true, model.isNotify()); + Assertions.assertEquals(ShareStatus.DETACHED_SHARE_STATUS, model.getShareStatus()); + Assertions.assertEquals("u", model.getTargetEmail()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserInvitationProperties model + = new UserInvitationProperties().setExpirationDate(OffsetDateTime.parse("2021-02-28T12:47:25Z")) + .setNotify(true) + .setShareStatus(ShareStatus.DETACHED_SHARE_STATUS) + .setTargetEmail("u"); + model = BinaryData.fromObject(model).toObject(UserInvitationProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-28T12:47:25Z"), model.getExpirationDate()); + Assertions.assertEquals(true, model.isNotify()); + Assertions.assertEquals(ShareStatus.DETACHED_SHARE_STATUS, model.getShareStatus()); + Assertions.assertEquals("u", model.getTargetEmail()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/UserInvitationTests.java b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/UserInvitationTests.java new file mode 100644 index 000000000000..63fa2506526c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/src/test/java/com/azure/analytics/purview/sharing/generated/UserInvitationTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.sharing.generated; + +import com.azure.analytics.purview.sharing.models.ShareStatus; +import com.azure.analytics.purview.sharing.models.UserInvitation; +import com.azure.analytics.purview.sharing.models.UserInvitationProperties; +import com.azure.core.util.BinaryData; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class UserInvitationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserInvitation model = BinaryData.fromString( + "{\"invitationKind\":\"User\",\"properties\":{\"expirationDate\":\"2021-06-05T20:06:24Z\",\"notify\":false,\"senderEmail\":\"ddtocjjxhvp\",\"senderName\":\"uexhdzx\",\"senderTenantName\":\"qeojnxqbzvddntw\",\"sentAt\":\"2021-07-30T22:07:59Z\",\"shareStatus\":\"Attached\",\"state\":\"Succeeded\",\"targetEmail\":\"w\"},\"id\":\"zao\",\"type\":\"uhrhcffcyddgl\"}") + .toObject(UserInvitation.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-05T20:06:24Z"), + model.getProperties().getExpirationDate()); + Assertions.assertEquals(false, model.getProperties().isNotify()); + Assertions.assertEquals(ShareStatus.ATTACHED_SHARE_STATUS, model.getProperties().getShareStatus()); + Assertions.assertEquals("w", model.getProperties().getTargetEmail()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserInvitation model = new UserInvitation().setProperties( + new UserInvitationProperties().setExpirationDate(OffsetDateTime.parse("2021-06-05T20:06:24Z")) + .setNotify(false) + .setShareStatus(ShareStatus.ATTACHED_SHARE_STATUS) + .setTargetEmail("w")); + model = BinaryData.fromObject(model).toObject(UserInvitation.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-05T20:06:24Z"), + model.getProperties().getExpirationDate()); + Assertions.assertEquals(false, model.getProperties().isNotify()); + Assertions.assertEquals(ShareStatus.ATTACHED_SHARE_STATUS, model.getProperties().getShareStatus()); + Assertions.assertEquals("w", model.getProperties().getTargetEmail()); + } +} diff --git a/sdk/purview/azure-analytics-purview-sharing/swagger/README.md b/sdk/purview/azure-analytics-purview-sharing/swagger/README.md new file mode 100644 index 000000000000..abd18bd4070c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-sharing/swagger/README.md @@ -0,0 +1,50 @@ +## Generate autorest code + +```yaml +input-file: +- https://github.com/Azure/azure-rest-api-specs/blob/main/specification/purview/data-plane/Azure.Analytics.Purview.Share/preview/2023-05-30-preview/share.json +output-folder: ../ +java: true +use: '@autorest/java@4.1.62' +data-plane: true +generate-tests: true +artifact-id: azure-analytics-purview-sharing +generate-samples: true +namespace: com.azure.analytics.purview.sharing +service-versions: +- 2023-05-30-preview +directive: + rename-operation: + [ + from: "SentShares_Get", + to: "SentShares_GetSentShare", + from: "SentShares_CreateOrReplace", + to: "SentShares_CreateOrReplaceSentShare", + from: "SentShares_Delete", + to: "SentShares_DeleteSentShare", + from: "SentShares_List", + to: "SentShares_ListSentShares", + from: "SentShares_GetInvitation", + to: "SentShares_GetSentShareInvitation", + from: "SentShares_CreateInvitation", + to: "SentShares_CreateSentShareInvitation", + from: "SentShares_DeleteInvitation", + to: "SentShares_DeleteSentShareInvitation", + from: "SentShares_ListInvitations", + to: "SentShares_ListSentShareInvitations", + from: "SentShares_NotifyUserInvitation", + to: "SentShares_NotifyUserSentShareInvitation", + from: "ReceivedShares_Get", + to: "ReceivedShares_GetReceivedShare", + from: "ReceivedShares_CreateOrReplace", + to: "ReceivedShares_CreateOrReplaceReceivedShare", + from: "ReceivedShares_Delete", + to: "ReceivedShares_DeleteReceivedShare", + from: "ReceivedShares_ListAttached", + to: "ReceivedShares_ListAttachedReceivedShares", + from: "ReceivedShares_ListDetached", + to: "ReceivedShares_ListDetachedReceivedShares", + from: "ShareResources_List", + to: "ShareResources_ListShareResources" + ] +``` diff --git a/sdk/purview/azure-analytics-purview-workflow/CHANGELOG.md b/sdk/purview/azure-analytics-purview-workflow/CHANGELOG.md new file mode 100644 index 000000000000..5c1e86ff0d5d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/CHANGELOG.md @@ -0,0 +1,20 @@ +# Release History + +## 1.0.0-beta.2 (2023-10-20) + +### Features Added + +- Add `/workflows/{id}/validate` API. +- Add admin query options to workflow / workflow run APIs. +d +### Breaking Changes + +- Split `PurviewWorkflowClient` into `UserRequestsClient`, `WorkflowClient`, `WorkflowRunClient` and `WorkflowTaskClient`. + +### Other Changes + +- Update descriptions of some APIs. + +## 1.0.0-beta.1 (2023-02-28) + +- Azure PurviewWorkflow client library for Java. This package contains Microsoft Azure PurviewWorkflow client library. diff --git a/sdk/purview/azure-analytics-purview-workflow/README.md b/sdk/purview/azure-analytics-purview-workflow/README.md new file mode 100644 index 000000000000..6e5751ac7b2b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/README.md @@ -0,0 +1,115 @@ +# Azure Purview Workflow client library for Java + +Workflows are automated, repeatable business processes that users can create within Microsoft Purview to validate and orchestrate CUD (create, update, delete) operations on their data entities. Enabling these processes allow organizations to track changes, enforce policy compliance, and ensure quality data across their data landscape. + +Use the client library for Purview Workflow to: + +- Manage workflows +- Submit user requests and monitor workflow runs +- View and respond to workflow tasks + +**For more details about how to use workflow, please refer to the [service documentation][product_documentation]** + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] +- An existing Azure [Purview account][purview_resource]. + +### Authentication + +Since the Workflow service uses an Azure Active Directory (AAD) bearer token for authentication and identification, an email address should be encoded into the token to allow for notification when using Workflow. It is recommended that the [Azure Identity][azure_identity] library be used with a the [UsernamePasswordCredential][username_password_credential]. Before using the [Azure Identity][azure_identity] library with Workflow, [an application][app_registration] should be registered and used for the clientId passed to the [UsernamePasswordCredential][username_password_credential]. + +To use the [UsernamePasswordCredential][username_password_credential] provider shown below, or other credential providers provided with the Azure SDK, please include the `azure-identity` package: + +[//]: # ({x-version-update-start;com.azure:azure-identity;dependency}) +```xml + + com.azure + azure-identity + 1.18.2 + +``` + +Set the values of the client ID, tenant ID of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID. +Set the value of user name and password of an AAD user as environment variables: USER_NAME, PASSWORD. + +```java readme-sample-createWorkflowClient +WorkflowClient purviewWorkflowClient = new WorkflowClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .credential(new UsernamePasswordCredentialBuilder() + .clientId(Configuration.getGlobalConfiguration().get("CLIENTID", "clientId")) + .tenantId(Configuration.getGlobalConfiguration().get("TENANTID", "tenantId")) + .username(Configuration.getGlobalConfiguration().get("USERNAME", "username")) + .password(Configuration.getGlobalConfiguration().get("PASSWORD", "password")) + .build()) + .buildClient(); +``` + +## Examples + +The following section provides several code snippets covering some of the most common scenarios, including: + +- [Create Workflow](#create-workflow) +- [Submit User Requests](#submit-user-requests) +- [Approve Workflow Task](#approve-workflow-task) + +### Create workflow + +```java readme-sample-createWorkflow +BinaryData workflowCreateOrUpdateCommand = + BinaryData.fromString( + "{\"name\":\"Create glossary term workflow\",\"description\":\"\",\"triggers\":[{\"type\":\"when_term_creation_is_requested\",\"underGlossaryHierarchy\":\"/glossaries/20031e20-b4df-4a66-a61d-1b0716f3fa48\"}],\"isEnabled\":true,\"actionDag\":{\"actions\":{\"Startandwaitforanapproval\":{\"type\":\"Approval\",\"inputs\":{\"parameters\":{\"approvalType\":\"PendingOnAll\",\"title\":\"ApprovalRequestforCreateGlossaryTerm\",\"assignedTo\":[\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"]}},\"runAfter\":{}},\"Condition\":{\"type\":\"If\",\"expression\":{\"and\":[{\"equals\":[\"@outputs('Startandwaitforanapproval')['body/outcome']\",\"Approved\"]}]},\"actions\":{\"Createglossaryterm\":{\"type\":\"CreateTerm\",\"runAfter\":{}},\"Sendemailnotification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailSubject\":\"GlossaryTermCreate-APPROVED\",\"emailMessage\":\"YourrequestforGlossaryTerm@{triggerBody()['request']['term']['name']}isapproved.\",\"emailRecipients\":[\"@{triggerBody()['request']['requestor']}\"]}},\"runAfter\":{\"Createglossaryterm\":[\"Succeeded\"]}}},\"else\":{\"actions\":{\"Sendrejectemailnotification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailSubject\":\"GlossaryTermCreate-REJECTED\",\"emailMessage\":\"YourrequestforGlossaryTerm@{triggerBody()['request']['term']['name']}isrejected.\",\"emailRecipients\":[\"@{triggerBody()['request']['requestor']}\"]}},\"runAfter\":{}}}},\"runAfter\":{\"Startandwaitforanapproval\":[\"Succeeded\"]}}}}}"); +RequestOptions requestOptions = new RequestOptions(); +Response response = + purviewWorkflowClient.createOrReplaceWithResponse( + "4afb5752-e47f-43a1-8ba7-c696bf8d2745", workflowCreateOrUpdateCommand, requestOptions); +``` + +### Submit user requests + +```java readme-sample-submitUserRequests +BinaryData userRequestsPayload = + BinaryData.fromString( + "{\"comment\":\"Thanks!\",\"operations\":[{\"type\":\"CreateTerm\",\"payload\":{\"glossaryTerm\":{\"name\":\"term\",\"anchor\":{\"glossaryGuid\":\"20031e20-b4df-4a66-a61d-1b0716f3fa48\"},\"nickName\":\"term\",\"status\":\"Approved\"}}}]}"); +RequestOptions requestOptions = new RequestOptions(); +Response response = + userRequestsClient.submitWithResponse(userRequestsPayload, requestOptions); +``` + +### Approve workflow task + +```java readme-sample-approveApproval +BinaryData approvalResponseComment = BinaryData.fromString("{\"comment\":\"Thanks for raising this!\"}"); +RequestOptions requestOptions = new RequestOptions(); +Response response = + approvalClient.approveWithResponse( + "69b57a00-f5de-4a17-a44a-6479adae373d", approvalResponseComment, requestOptions); +``` + +## Key concepts + +## Troubleshooting + +## Next steps + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +[product_documentation]: https://learn.microsoft.com/azure/purview/concept-workflow +[jdk]: https://learn.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[purview_resource]: https://learn.microsoft.com/azure/purview/create-catalog-portal +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md +[app_registration]:https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app +[username_password_credential]: https://learn.microsoft.com/java/api/com.azure.identity.usernamepasswordcredential?source=recommendations&view=azure-java-stable + + diff --git a/sdk/purview/azure-analytics-purview-workflow/assets.json b/sdk/purview/azure-analytics-purview-workflow/assets.json new file mode 100644 index 000000000000..52b43d726aa0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/purview/azure-analytics-purview-workflow", + "Tag": "java/purview/azure-analytics-purview-workflow_270085feb0" +} diff --git a/sdk/purview/azure-analytics-purview-workflow/checkstyle-suppressions.xml b/sdk/purview/azure-analytics-purview-workflow/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/purview/azure-analytics-purview-workflow/pom.xml b/sdk/purview/azure-analytics-purview-workflow/pom.xml new file mode 100644 index 000000000000..8d3f22bd9ce3 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/pom.xml @@ -0,0 +1,76 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-analytics-purview-workflow + 1.0.0-beta.2 + jar + + Microsoft Azure SDK for Purview Workflow + This package contains Microsoft Azure Purview Workflow client library. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0.25 + 0.15 + + --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + + true + + false + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/purview/azure-analytics-purview-workflow/spotbugs-exclude.xml b/sdk/purview/azure-analytics-purview-workflow/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalAsyncClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalAsyncClient.java new file mode 100644 index 000000000000..81d9a809d32d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalAsyncClient.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.ApprovalsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = ApprovalClientBuilder.class, isAsync = true) +public final class ApprovalAsyncClient { + @Generated + private final ApprovalsImpl serviceClient; + + /** + * Initializes an instance of ApprovalAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ApprovalAsyncClient(ApprovalsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Approve an approval. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param approvalResponseComment The request body of approving an approval type of workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> approveWithResponse(String taskId, BinaryData approvalResponseComment, + RequestOptions requestOptions) { + return this.serviceClient.approveWithResponseAsync(taskId, approvalResponseComment, requestOptions); + } + + /** + * Reject an approval. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param approvalResponseComment The request body of rejecting an approval type of workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> rejectWithResponse(String taskId, BinaryData approvalResponseComment, + RequestOptions requestOptions) { + return this.serviceClient.rejectWithResponseAsync(taskId, approvalResponseComment, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalClient.java new file mode 100644 index 000000000000..e7dec6dabc6d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalClient.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.ApprovalsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = ApprovalClientBuilder.class) +public final class ApprovalClient { + @Generated + private final ApprovalsImpl serviceClient; + + /** + * Initializes an instance of ApprovalClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ApprovalClient(ApprovalsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Approve an approval. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param approvalResponseComment The request body of approving an approval type of workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response approveWithResponse(String taskId, BinaryData approvalResponseComment, + RequestOptions requestOptions) { + return this.serviceClient.approveWithResponse(taskId, approvalResponseComment, requestOptions); + } + + /** + * Reject an approval. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param approvalResponseComment The request body of rejecting an approval type of workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response rejectWithResponse(String taskId, BinaryData approvalResponseComment, + RequestOptions requestOptions) { + return this.serviceClient.rejectWithResponse(taskId, approvalResponseComment, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalClientBuilder.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalClientBuilder.java new file mode 100644 index 000000000000..d3b190210aae --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/ApprovalClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.PurviewWorkflowClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the ApprovalClient type. + */ +@ServiceClientBuilder(serviceClients = { ApprovalClient.class, ApprovalAsyncClient.class }) +public final class ApprovalClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-workflow.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the ApprovalClientBuilder. + */ + @Generated + public ApprovalClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ApprovalClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ApprovalClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ApprovalClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ApprovalClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ApprovalClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ApprovalClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ApprovalClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ApprovalClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ApprovalClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewWorkflowServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the ApprovalClientBuilder. + */ + @Generated + public ApprovalClientBuilder serviceVersion(PurviewWorkflowServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the ApprovalClientBuilder. + */ + @Generated + public ApprovalClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewWorkflowClientImpl with the provided parameters. + * + * @return an instance of PurviewWorkflowClientImpl. + */ + @Generated + private PurviewWorkflowClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewWorkflowServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewWorkflowServiceVersion.getLatest(); + PurviewWorkflowClientImpl client = new PurviewWorkflowClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of ApprovalAsyncClient class. + * + * @return an instance of ApprovalAsyncClient. + */ + @Generated + public ApprovalAsyncClient buildAsyncClient() { + return new ApprovalAsyncClient(buildInnerClient().getApprovals()); + } + + /** + * Builds an instance of ApprovalClient class. + * + * @return an instance of ApprovalClient. + */ + @Generated + public ApprovalClient buildClient() { + return new ApprovalClient(buildInnerClient().getApprovals()); + } + + private static final ClientLogger LOGGER = new ClientLogger(ApprovalClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/PurviewWorkflowServiceVersion.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/PurviewWorkflowServiceVersion.java new file mode 100644 index 000000000000..83537c750268 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/PurviewWorkflowServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of PurviewWorkflowClient. + */ +public enum PurviewWorkflowServiceVersion implements ServiceVersion { + /** + * Enum value 2023-10-01-preview. + */ + V2023_10_01_PREVIEW("2023-10-01-preview"); + + private final String version; + + PurviewWorkflowServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link PurviewWorkflowServiceVersion}. + */ + public static PurviewWorkflowServiceVersion getLatest() { + return V2023_10_01_PREVIEW; + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusAsyncClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusAsyncClient.java new file mode 100644 index 000000000000..3ae1c1e81d90 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusAsyncClient.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.TaskStatusImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = TaskStatusClientBuilder.class, isAsync = true) +public final class TaskStatusAsyncClient { + @Generated + private final TaskStatusImpl serviceClient; + + /** + * Initializes an instance of TaskStatusAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + TaskStatusAsyncClient(TaskStatusImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Update the status of a workflow task request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     newStatus: String(NotStarted/InProgress/Completed/Canceled) (Required)
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param taskUpdateCommand Request body of updating workflow task request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponse(String taskId, BinaryData taskUpdateCommand, + RequestOptions requestOptions) { + return this.serviceClient.updateWithResponseAsync(taskId, taskUpdateCommand, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusClient.java new file mode 100644 index 000000000000..6accca47b4a2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusClient.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.TaskStatusImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = TaskStatusClientBuilder.class) +public final class TaskStatusClient { + @Generated + private final TaskStatusImpl serviceClient; + + /** + * Initializes an instance of TaskStatusClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + TaskStatusClient(TaskStatusImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Update the status of a workflow task request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     newStatus: String(NotStarted/InProgress/Completed/Canceled) (Required)
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param taskUpdateCommand Request body of updating workflow task request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String taskId, BinaryData taskUpdateCommand, + RequestOptions requestOptions) { + return this.serviceClient.updateWithResponse(taskId, taskUpdateCommand, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusClientBuilder.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusClientBuilder.java new file mode 100644 index 000000000000..b81662eb9717 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/TaskStatusClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.PurviewWorkflowClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the TaskStatusClient type. + */ +@ServiceClientBuilder(serviceClients = { TaskStatusClient.class, TaskStatusAsyncClient.class }) +public final class TaskStatusClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-workflow.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the TaskStatusClientBuilder. + */ + @Generated + public TaskStatusClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TaskStatusClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TaskStatusClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TaskStatusClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TaskStatusClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TaskStatusClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TaskStatusClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TaskStatusClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TaskStatusClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public TaskStatusClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewWorkflowServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the TaskStatusClientBuilder. + */ + @Generated + public TaskStatusClientBuilder serviceVersion(PurviewWorkflowServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the TaskStatusClientBuilder. + */ + @Generated + public TaskStatusClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewWorkflowClientImpl with the provided parameters. + * + * @return an instance of PurviewWorkflowClientImpl. + */ + @Generated + private PurviewWorkflowClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewWorkflowServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewWorkflowServiceVersion.getLatest(); + PurviewWorkflowClientImpl client = new PurviewWorkflowClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of TaskStatusAsyncClient class. + * + * @return an instance of TaskStatusAsyncClient. + */ + @Generated + public TaskStatusAsyncClient buildAsyncClient() { + return new TaskStatusAsyncClient(buildInnerClient().getTaskStatus()); + } + + /** + * Builds an instance of TaskStatusClient class. + * + * @return an instance of TaskStatusClient. + */ + @Generated + public TaskStatusClient buildClient() { + return new TaskStatusClient(buildInnerClient().getTaskStatus()); + } + + private static final ClientLogger LOGGER = new ClientLogger(TaskStatusClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsAsyncClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsAsyncClient.java new file mode 100644 index 000000000000..70f6ef212925 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsAsyncClient.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.UserRequestsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = UserRequestsClientBuilder.class, isAsync = true) +public final class UserRequestsAsyncClient { + @Generated + private final UserRequestsImpl serviceClient; + + /** + * Initializes an instance of UserRequestsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + UserRequestsAsyncClient(UserRequestsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Submit a user request for requestor, a user request describes user ask to do operation(s) on Purview. If any + * workflow's trigger matches with an operation in request, a run of the workflow is created. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     operations (Required): [
      +     *          (Required){
      +     *             type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *             payload: Object (Required)
      +     *         }
      +     *     ]
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     requestId: String (Required)
      +     *     requestor: String (Required)
      +     *     operations (Required): [
      +     *          (Required){
      +     *             type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *             payload: Object (Required)
      +     *             workflowRunIds (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     *     comment: String (Optional)
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param userRequestsPayload The payload of submitting a user request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return describes user ask to do operation(s) on Purview along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> submitWithResponse(BinaryData userRequestsPayload, + RequestOptions requestOptions) { + return this.serviceClient.submitWithResponseAsync(userRequestsPayload, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsClient.java new file mode 100644 index 000000000000..71f4a0d2bcbf --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsClient.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.UserRequestsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = UserRequestsClientBuilder.class) +public final class UserRequestsClient { + @Generated + private final UserRequestsImpl serviceClient; + + /** + * Initializes an instance of UserRequestsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + UserRequestsClient(UserRequestsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Submit a user request for requestor, a user request describes user ask to do operation(s) on Purview. If any + * workflow's trigger matches with an operation in request, a run of the workflow is created. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     operations (Required): [
      +     *          (Required){
      +     *             type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *             payload: Object (Required)
      +     *         }
      +     *     ]
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     requestId: String (Required)
      +     *     requestor: String (Required)
      +     *     operations (Required): [
      +     *          (Required){
      +     *             type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *             payload: Object (Required)
      +     *             workflowRunIds (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     *     comment: String (Optional)
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param userRequestsPayload The payload of submitting a user request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return describes user ask to do operation(s) on Purview along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response submitWithResponse(BinaryData userRequestsPayload, RequestOptions requestOptions) { + return this.serviceClient.submitWithResponse(userRequestsPayload, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsClientBuilder.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsClientBuilder.java new file mode 100644 index 000000000000..22d5d9a0f3d3 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/UserRequestsClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.PurviewWorkflowClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the UserRequestsClient type. + */ +@ServiceClientBuilder(serviceClients = { UserRequestsClient.class, UserRequestsAsyncClient.class }) +public final class UserRequestsClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-workflow.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the UserRequestsClientBuilder. + */ + @Generated + public UserRequestsClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public UserRequestsClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public UserRequestsClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public UserRequestsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public UserRequestsClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public UserRequestsClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public UserRequestsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public UserRequestsClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public UserRequestsClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public UserRequestsClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewWorkflowServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the UserRequestsClientBuilder. + */ + @Generated + public UserRequestsClientBuilder serviceVersion(PurviewWorkflowServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the UserRequestsClientBuilder. + */ + @Generated + public UserRequestsClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewWorkflowClientImpl with the provided parameters. + * + * @return an instance of PurviewWorkflowClientImpl. + */ + @Generated + private PurviewWorkflowClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewWorkflowServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewWorkflowServiceVersion.getLatest(); + PurviewWorkflowClientImpl client = new PurviewWorkflowClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of UserRequestsAsyncClient class. + * + * @return an instance of UserRequestsAsyncClient. + */ + @Generated + public UserRequestsAsyncClient buildAsyncClient() { + return new UserRequestsAsyncClient(buildInnerClient().getUserRequests()); + } + + /** + * Builds an instance of UserRequestsClient class. + * + * @return an instance of UserRequestsClient. + */ + @Generated + public UserRequestsClient buildClient() { + return new UserRequestsClient(buildInnerClient().getUserRequests()); + } + + private static final ClientLogger LOGGER = new ClientLogger(UserRequestsClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowAsyncClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowAsyncClient.java new file mode 100644 index 000000000000..a67964b0e148 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowAsyncClient.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowsOperationsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowClientBuilder.class, isAsync = true) +public final class WorkflowAsyncClient { + @Generated + private final WorkflowsOperationsImpl serviceClient; + + /** + * Initializes an instance of WorkflowAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowAsyncClient(WorkflowsOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a specific workflow. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific workflow along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String workflowId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(workflowId, requestOptions); + } + + /** + * Create or replace a workflow. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param workflowCreateOrUpdateCommand Create or update workflow payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow properties along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrReplaceWithResponse(String workflowId, + BinaryData workflowCreateOrUpdateCommand, RequestOptions requestOptions) { + return this.serviceClient.createOrReplaceWithResponseAsync(workflowId, workflowCreateOrUpdateCommand, + requestOptions); + } + + /** + * Delete a workflow. + * + * @param workflowId The workflow id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(String workflowId, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseAsync(workflowId, requestOptions); + } + + /** + * Validate a workflow. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             severity: String(error/warning) (Required)
      +     *             location (Required): {
      +     *                 type: String(workflow/action/actionParameter) (Required)
      +     *                 actionName: String (Optional)
      +     *                 parameterKey: String (Optional)
      +     *             }
      +     *             message: String (Required)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param workflowValidateQuery Check workflow payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> validateWithResponse(String workflowId, BinaryData workflowValidateQuery, + RequestOptions requestOptions) { + return this.serviceClient.validateWithResponseAsync(workflowId, workflowValidateQuery, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowClient.java new file mode 100644 index 000000000000..36d93cffa91f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowClient.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowsOperationsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowClientBuilder.class) +public final class WorkflowClient { + @Generated + private final WorkflowsOperationsImpl serviceClient; + + /** + * Initializes an instance of WorkflowClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowClient(WorkflowsOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a specific workflow. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific workflow along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String workflowId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(workflowId, requestOptions); + } + + /** + * Create or replace a workflow. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param workflowCreateOrUpdateCommand Create or update workflow payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow properties along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrReplaceWithResponse(String workflowId, BinaryData workflowCreateOrUpdateCommand, + RequestOptions requestOptions) { + return this.serviceClient.createOrReplaceWithResponse(workflowId, workflowCreateOrUpdateCommand, + requestOptions); + } + + /** + * Delete a workflow. + * + * @param workflowId The workflow id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String workflowId, RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponse(workflowId, requestOptions); + } + + /** + * Validate a workflow. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             severity: String(error/warning) (Required)
      +     *             location (Required): {
      +     *                 type: String(workflow/action/actionParameter) (Required)
      +     *                 actionName: String (Optional)
      +     *                 parameterKey: String (Optional)
      +     *             }
      +     *             message: String (Required)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param workflowValidateQuery Check workflow payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateWithResponse(String workflowId, BinaryData workflowValidateQuery, + RequestOptions requestOptions) { + return this.serviceClient.validateWithResponse(workflowId, workflowValidateQuery, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowClientBuilder.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowClientBuilder.java new file mode 100644 index 000000000000..8b7f11622179 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.PurviewWorkflowClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the WorkflowClient type. + */ +@ServiceClientBuilder(serviceClients = { WorkflowClient.class, WorkflowAsyncClient.class }) +public final class WorkflowClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-workflow.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the WorkflowClientBuilder. + */ + @Generated + public WorkflowClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewWorkflowServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the WorkflowClientBuilder. + */ + @Generated + public WorkflowClientBuilder serviceVersion(PurviewWorkflowServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the WorkflowClientBuilder. + */ + @Generated + public WorkflowClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewWorkflowClientImpl with the provided parameters. + * + * @return an instance of PurviewWorkflowClientImpl. + */ + @Generated + private PurviewWorkflowClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewWorkflowServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewWorkflowServiceVersion.getLatest(); + PurviewWorkflowClientImpl client = new PurviewWorkflowClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of WorkflowAsyncClient class. + * + * @return an instance of WorkflowAsyncClient. + */ + @Generated + public WorkflowAsyncClient buildAsyncClient() { + return new WorkflowAsyncClient(buildInnerClient().getWorkflowsOperations()); + } + + /** + * Builds an instance of WorkflowClient class. + * + * @return an instance of WorkflowClient. + */ + @Generated + public WorkflowClient buildClient() { + return new WorkflowClient(buildInnerClient().getWorkflowsOperations()); + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkflowClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunAsyncClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunAsyncClient.java new file mode 100644 index 000000000000..90c27320ac54 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunAsyncClient.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowRunsOperationsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowRunClientBuilder.class, isAsync = true) +public final class WorkflowRunAsyncClient { + @Generated + private final WorkflowRunsOperationsImpl serviceClient; + + /** + * Initializes an instance of WorkflowRunAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowRunAsyncClient(WorkflowRunsOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a workflow run. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     workflowId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     requestor: String (Optional)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Optional): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     *     actionDag: Object (Required)
      +     *     detail (Required): {
      +     *         runInput: Object (Required)
      +     *         actions: Object (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param workflowRunId The workflow run id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a workflow run along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String workflowRunId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(workflowRunId, requestOptions); + } + + /** + * Cancel a workflow run. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowRunId The workflow run id. + * @param runCancelReply Reply of canceling a workflow run. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelWithResponse(String workflowRunId, BinaryData runCancelReply, + RequestOptions requestOptions) { + return this.serviceClient.cancelWithResponseAsync(workflowRunId, runCancelReply, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunClient.java new file mode 100644 index 000000000000..1bad9b856360 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunClient.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowRunsOperationsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowRunClientBuilder.class) +public final class WorkflowRunClient { + @Generated + private final WorkflowRunsOperationsImpl serviceClient; + + /** + * Initializes an instance of WorkflowRunClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowRunClient(WorkflowRunsOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a workflow run. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     workflowId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     requestor: String (Optional)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Optional): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     *     actionDag: Object (Required)
      +     *     detail (Required): {
      +     *         runInput: Object (Required)
      +     *         actions: Object (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param workflowRunId The workflow run id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a workflow run along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String workflowRunId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(workflowRunId, requestOptions); + } + + /** + * Cancel a workflow run. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowRunId The workflow run id. + * @param runCancelReply Reply of canceling a workflow run. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelWithResponse(String workflowRunId, BinaryData runCancelReply, + RequestOptions requestOptions) { + return this.serviceClient.cancelWithResponse(workflowRunId, runCancelReply, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunClientBuilder.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunClientBuilder.java new file mode 100644 index 000000000000..507ee6f006db --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.PurviewWorkflowClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the WorkflowRunClient type. + */ +@ServiceClientBuilder(serviceClients = { WorkflowRunClient.class, WorkflowRunAsyncClient.class }) +public final class WorkflowRunClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-workflow.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the WorkflowRunClientBuilder. + */ + @Generated + public WorkflowRunClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewWorkflowServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the WorkflowRunClientBuilder. + */ + @Generated + public WorkflowRunClientBuilder serviceVersion(PurviewWorkflowServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the WorkflowRunClientBuilder. + */ + @Generated + public WorkflowRunClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewWorkflowClientImpl with the provided parameters. + * + * @return an instance of PurviewWorkflowClientImpl. + */ + @Generated + private PurviewWorkflowClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewWorkflowServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewWorkflowServiceVersion.getLatest(); + PurviewWorkflowClientImpl client = new PurviewWorkflowClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of WorkflowRunAsyncClient class. + * + * @return an instance of WorkflowRunAsyncClient. + */ + @Generated + public WorkflowRunAsyncClient buildAsyncClient() { + return new WorkflowRunAsyncClient(buildInnerClient().getWorkflowRunsOperations()); + } + + /** + * Builds an instance of WorkflowRunClient class. + * + * @return an instance of WorkflowRunClient. + */ + @Generated + public WorkflowRunClient buildClient() { + return new WorkflowRunClient(buildInnerClient().getWorkflowRunsOperations()); + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkflowRunClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsAsyncClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsAsyncClient.java new file mode 100644 index 000000000000..b41bcf7cd145 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsAsyncClient.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowRunsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the asynchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowRunsClientBuilder.class, isAsync = true) +public final class WorkflowRunsAsyncClient { + @Generated + private final WorkflowRunsImpl serviceClient; + + /** + * Initializes an instance of WorkflowRunsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowRunsAsyncClient(WorkflowRunsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List workflow runs. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's workflow runs or view as admin.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      runStatusesList<String>NoFilter workflow runs by workflow run status. In + * the form of "," separated string.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     workflowId: String (Required)
      +     *     startTime: OffsetDateTime (Required)
      +     *     requestor: String (Required)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list(RequestOptions requestOptions) { + return this.serviceClient.listAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsClient.java new file mode 100644 index 000000000000..2c06d7b7fada --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsClient.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowRunsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowRunsClientBuilder.class) +public final class WorkflowRunsClient { + @Generated + private final WorkflowRunsImpl serviceClient; + + /** + * Initializes an instance of WorkflowRunsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowRunsClient(WorkflowRunsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List workflow runs. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's workflow runs or view as admin.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      runStatusesList<String>NoFilter workflow runs by workflow run status. In + * the form of "," separated string.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     workflowId: String (Required)
      +     *     startTime: OffsetDateTime (Required)
      +     *     requestor: String (Required)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + return this.serviceClient.list(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsClientBuilder.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsClientBuilder.java new file mode 100644 index 000000000000..9b63a872ee79 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowRunsClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.PurviewWorkflowClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the WorkflowRunsClient type. + */ +@ServiceClientBuilder(serviceClients = { WorkflowRunsClient.class, WorkflowRunsAsyncClient.class }) +public final class WorkflowRunsClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-workflow.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the WorkflowRunsClientBuilder. + */ + @Generated + public WorkflowRunsClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunsClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunsClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunsClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunsClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunsClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunsClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowRunsClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewWorkflowServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the WorkflowRunsClientBuilder. + */ + @Generated + public WorkflowRunsClientBuilder serviceVersion(PurviewWorkflowServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the WorkflowRunsClientBuilder. + */ + @Generated + public WorkflowRunsClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewWorkflowClientImpl with the provided parameters. + * + * @return an instance of PurviewWorkflowClientImpl. + */ + @Generated + private PurviewWorkflowClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewWorkflowServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewWorkflowServiceVersion.getLatest(); + PurviewWorkflowClientImpl client = new PurviewWorkflowClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of WorkflowRunsAsyncClient class. + * + * @return an instance of WorkflowRunsAsyncClient. + */ + @Generated + public WorkflowRunsAsyncClient buildAsyncClient() { + return new WorkflowRunsAsyncClient(buildInnerClient().getWorkflowRuns()); + } + + /** + * Builds an instance of WorkflowRunsClient class. + * + * @return an instance of WorkflowRunsClient. + */ + @Generated + public WorkflowRunsClient buildClient() { + return new WorkflowRunsClient(buildInnerClient().getWorkflowRuns()); + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkflowRunsClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskAsyncClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskAsyncClient.java new file mode 100644 index 000000000000..b76d11e9f771 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskAsyncClient.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowTasksOperationsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowTaskClientBuilder.class, isAsync = true) +public final class WorkflowTaskAsyncClient { + @Generated + private final WorkflowTasksOperationsImpl serviceClient; + + /** + * Initializes an instance of WorkflowTaskAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowTaskAsyncClient(WorkflowTasksOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a workflow task. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a workflow task along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String taskId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponseAsync(taskId, requestOptions); + } + + /** + * Reassign a workflow task. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     reassignments (Optional): [
      +     *          (Optional){
      +     *             reassignFrom: String (Required)
      +     *             reassignTo: String (Required)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param reassignCommand The request body of reassigning a workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> reassignWithResponse(String taskId, BinaryData reassignCommand, + RequestOptions requestOptions) { + return this.serviceClient.reassignWithResponseAsync(taskId, reassignCommand, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskClient.java new file mode 100644 index 000000000000..5d331f064451 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskClient.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowTasksOperationsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowTaskClientBuilder.class) +public final class WorkflowTaskClient { + @Generated + private final WorkflowTasksOperationsImpl serviceClient; + + /** + * Initializes an instance of WorkflowTaskClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowTaskClient(WorkflowTasksOperationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get a workflow task. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a workflow task along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String taskId, RequestOptions requestOptions) { + return this.serviceClient.getWithResponse(taskId, requestOptions); + } + + /** + * Reassign a workflow task. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     reassignments (Optional): [
      +     *          (Optional){
      +     *             reassignFrom: String (Required)
      +     *             reassignTo: String (Required)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param reassignCommand The request body of reassigning a workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response reassignWithResponse(String taskId, BinaryData reassignCommand, + RequestOptions requestOptions) { + return this.serviceClient.reassignWithResponse(taskId, reassignCommand, requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskClientBuilder.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskClientBuilder.java new file mode 100644 index 000000000000..02af77b07375 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTaskClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.PurviewWorkflowClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the WorkflowTaskClient type. + */ +@ServiceClientBuilder(serviceClients = { WorkflowTaskClient.class, WorkflowTaskAsyncClient.class }) +public final class WorkflowTaskClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-workflow.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the WorkflowTaskClientBuilder. + */ + @Generated + public WorkflowTaskClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTaskClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTaskClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTaskClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTaskClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTaskClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTaskClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTaskClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTaskClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTaskClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewWorkflowServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the WorkflowTaskClientBuilder. + */ + @Generated + public WorkflowTaskClientBuilder serviceVersion(PurviewWorkflowServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the WorkflowTaskClientBuilder. + */ + @Generated + public WorkflowTaskClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewWorkflowClientImpl with the provided parameters. + * + * @return an instance of PurviewWorkflowClientImpl. + */ + @Generated + private PurviewWorkflowClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewWorkflowServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewWorkflowServiceVersion.getLatest(); + PurviewWorkflowClientImpl client = new PurviewWorkflowClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of WorkflowTaskAsyncClient class. + * + * @return an instance of WorkflowTaskAsyncClient. + */ + @Generated + public WorkflowTaskAsyncClient buildAsyncClient() { + return new WorkflowTaskAsyncClient(buildInnerClient().getWorkflowTasksOperations()); + } + + /** + * Builds an instance of WorkflowTaskClient class. + * + * @return an instance of WorkflowTaskClient. + */ + @Generated + public WorkflowTaskClient buildClient() { + return new WorkflowTaskClient(buildInnerClient().getWorkflowTasksOperations()); + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkflowTaskClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksAsyncClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksAsyncClient.java new file mode 100644 index 000000000000..b2b4cad2310a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksAsyncClient.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowTasksImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the asynchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowTasksClientBuilder.class, isAsync = true) +public final class WorkflowTasksAsyncClient { + @Generated + private final WorkflowTasksImpl serviceClient; + + /** + * Initializes an instance of WorkflowTasksAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowTasksAsyncClient(WorkflowTasksImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get all workflow tasks. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's sent, received or history workflow + * tasks.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      taskTypesList<String>NoFilter items by workflow task type. In the form + * of "," separated string.
      taskStatusesList<String>NoFilter workflow tasks by status. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      assigneesList<String>NoAssignees' ids to filter. In the form of "," + * separated string.
      workflowNameKeywordStringNoThe key word which could used to filter workflow + * item with related workflow.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all workflow tasks as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list(RequestOptions requestOptions) { + return this.serviceClient.listAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksClient.java new file mode 100644 index 000000000000..565d94f4c502 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksClient.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowTasksImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowTasksClientBuilder.class) +public final class WorkflowTasksClient { + @Generated + private final WorkflowTasksImpl serviceClient; + + /** + * Initializes an instance of WorkflowTasksClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowTasksClient(WorkflowTasksImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get all workflow tasks. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's sent, received or history workflow + * tasks.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      taskTypesList<String>NoFilter items by workflow task type. In the form + * of "," separated string.
      taskStatusesList<String>NoFilter workflow tasks by status. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      assigneesList<String>NoAssignees' ids to filter. In the form of "," + * separated string.
      workflowNameKeywordStringNoThe key word which could used to filter workflow + * item with related workflow.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all workflow tasks as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + return this.serviceClient.list(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksClientBuilder.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksClientBuilder.java new file mode 100644 index 000000000000..5734d0ecf6b5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowTasksClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.PurviewWorkflowClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the WorkflowTasksClient type. + */ +@ServiceClientBuilder(serviceClients = { WorkflowTasksClient.class, WorkflowTasksAsyncClient.class }) +public final class WorkflowTasksClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-workflow.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the WorkflowTasksClientBuilder. + */ + @Generated + public WorkflowTasksClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTasksClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTasksClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTasksClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTasksClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTasksClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTasksClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTasksClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTasksClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowTasksClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewWorkflowServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the WorkflowTasksClientBuilder. + */ + @Generated + public WorkflowTasksClientBuilder serviceVersion(PurviewWorkflowServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the WorkflowTasksClientBuilder. + */ + @Generated + public WorkflowTasksClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewWorkflowClientImpl with the provided parameters. + * + * @return an instance of PurviewWorkflowClientImpl. + */ + @Generated + private PurviewWorkflowClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewWorkflowServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewWorkflowServiceVersion.getLatest(); + PurviewWorkflowClientImpl client = new PurviewWorkflowClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of WorkflowTasksAsyncClient class. + * + * @return an instance of WorkflowTasksAsyncClient. + */ + @Generated + public WorkflowTasksAsyncClient buildAsyncClient() { + return new WorkflowTasksAsyncClient(buildInnerClient().getWorkflowTasks()); + } + + /** + * Builds an instance of WorkflowTasksClient class. + * + * @return an instance of WorkflowTasksClient. + */ + @Generated + public WorkflowTasksClient buildClient() { + return new WorkflowTasksClient(buildInnerClient().getWorkflowTasks()); + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkflowTasksClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsAsyncClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsAsyncClient.java new file mode 100644 index 000000000000..9c7e1b3270d0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsAsyncClient.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the asynchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowsClientBuilder.class, isAsync = true) +public final class WorkflowsAsyncClient { + @Generated + private final WorkflowsImpl serviceClient; + + /** + * Initializes an instance of WorkflowsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowsAsyncClient(WorkflowsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List all workflows. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow list as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list(RequestOptions requestOptions) { + return this.serviceClient.listAsync(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsClient.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsClient.java new file mode 100644 index 000000000000..38267129136e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsClient.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.WorkflowsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PurviewWorkflowClient type. + */ +@ServiceClient(builder = WorkflowsClientBuilder.class) +public final class WorkflowsClient { + @Generated + private final WorkflowsImpl serviceClient; + + /** + * Initializes an instance of WorkflowsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + WorkflowsClient(WorkflowsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List all workflows. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow list as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + return this.serviceClient.list(requestOptions); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsClientBuilder.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsClientBuilder.java new file mode 100644 index 000000000000..1818a2754cf7 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/WorkflowsClientBuilder.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.analytics.purview.workflow.implementation.PurviewWorkflowClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the WorkflowsClient type. + */ +@ServiceClientBuilder(serviceClients = { WorkflowsClient.class, WorkflowsAsyncClient.class }) +public final class WorkflowsClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://purview.azure.net/.default" }; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-analytics-purview-workflow.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the WorkflowsClientBuilder. + */ + @Generated + public WorkflowsClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowsClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowsClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowsClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowsClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowsClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowsClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public WorkflowsClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private PurviewWorkflowServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the WorkflowsClientBuilder. + */ + @Generated + public WorkflowsClientBuilder serviceVersion(PurviewWorkflowServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the WorkflowsClientBuilder. + */ + @Generated + public WorkflowsClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PurviewWorkflowClientImpl with the provided parameters. + * + * @return an instance of PurviewWorkflowClientImpl. + */ + @Generated + private PurviewWorkflowClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + PurviewWorkflowServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : PurviewWorkflowServiceVersion.getLatest(); + PurviewWorkflowClientImpl client = new PurviewWorkflowClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of WorkflowsAsyncClient class. + * + * @return an instance of WorkflowsAsyncClient. + */ + @Generated + public WorkflowsAsyncClient buildAsyncClient() { + return new WorkflowsAsyncClient(buildInnerClient().getWorkflows()); + } + + /** + * Builds an instance of WorkflowsClient class. + * + * @return an instance of WorkflowsClient. + */ + @Generated + public WorkflowsClient buildClient() { + return new WorkflowsClient(buildInnerClient().getWorkflows()); + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkflowsClientBuilder.class); +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/ApprovalsImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/ApprovalsImpl.java new file mode 100644 index 000000000000..c56806d24ce1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/ApprovalsImpl.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Approvals. + */ +public final class ApprovalsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ApprovalsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewWorkflowClientImpl client; + + /** + * Initializes an instance of ApprovalsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ApprovalsImpl(PurviewWorkflowClientImpl client) { + this.service + = RestProxy.create(ApprovalsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewWorkflowApprovals to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}/workflow") + @ServiceInterface(name = "PurviewWorkflowApprovals") + public interface ApprovalsService { + @Post("/workflowtasks/{taskId}/approve-approval") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> approve(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData approvalResponseComment, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/workflowtasks/{taskId}/approve-approval") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response approveSync(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData approvalResponseComment, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/workflowtasks/{taskId}/reject-approval") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> reject(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData approvalResponseComment, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/workflowtasks/{taskId}/reject-approval") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response rejectSync(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData approvalResponseComment, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + } + + /** + * Approve an approval. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param approvalResponseComment The request body of approving an approval type of workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> approveWithResponseAsync(String taskId, BinaryData approvalResponseComment, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.approve(this.client.getEndpoint(), taskId, + this.client.getServiceVersion().getVersion(), approvalResponseComment, accept, requestOptions, context)); + } + + /** + * Approve an approval. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param approvalResponseComment The request body of approving an approval type of workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response approveWithResponse(String taskId, BinaryData approvalResponseComment, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.approveSync(this.client.getEndpoint(), taskId, this.client.getServiceVersion().getVersion(), + approvalResponseComment, accept, requestOptions, Context.NONE); + } + + /** + * Reject an approval. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param approvalResponseComment The request body of rejecting an approval type of workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> rejectWithResponseAsync(String taskId, BinaryData approvalResponseComment, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.reject(this.client.getEndpoint(), taskId, + this.client.getServiceVersion().getVersion(), approvalResponseComment, accept, requestOptions, context)); + } + + /** + * Reject an approval. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param approvalResponseComment The request body of rejecting an approval type of workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response rejectWithResponse(String taskId, BinaryData approvalResponseComment, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.rejectSync(this.client.getEndpoint(), taskId, this.client.getServiceVersion().getVersion(), + approvalResponseComment, accept, requestOptions, Context.NONE); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/PurviewWorkflowClientImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/PurviewWorkflowClientImpl.java new file mode 100644 index 000000000000..0bb0ed9532ce --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/PurviewWorkflowClientImpl.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the PurviewWorkflowClient type. + */ +public final class PurviewWorkflowClientImpl { + /** + * The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/. + */ + private final String endpoint; + + /** + * Gets The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final PurviewWorkflowServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The WorkflowsImpl object to access its operations. + */ + private final WorkflowsImpl workflows; + + /** + * Gets the WorkflowsImpl object to access its operations. + * + * @return the WorkflowsImpl object. + */ + public WorkflowsImpl getWorkflows() { + return this.workflows; + } + + /** + * The WorkflowsOperationsImpl object to access its operations. + */ + private final WorkflowsOperationsImpl workflowsOperations; + + /** + * Gets the WorkflowsOperationsImpl object to access its operations. + * + * @return the WorkflowsOperationsImpl object. + */ + public WorkflowsOperationsImpl getWorkflowsOperations() { + return this.workflowsOperations; + } + + /** + * The UserRequestsImpl object to access its operations. + */ + private final UserRequestsImpl userRequests; + + /** + * Gets the UserRequestsImpl object to access its operations. + * + * @return the UserRequestsImpl object. + */ + public UserRequestsImpl getUserRequests() { + return this.userRequests; + } + + /** + * The WorkflowRunsImpl object to access its operations. + */ + private final WorkflowRunsImpl workflowRuns; + + /** + * Gets the WorkflowRunsImpl object to access its operations. + * + * @return the WorkflowRunsImpl object. + */ + public WorkflowRunsImpl getWorkflowRuns() { + return this.workflowRuns; + } + + /** + * The WorkflowRunsOperationsImpl object to access its operations. + */ + private final WorkflowRunsOperationsImpl workflowRunsOperations; + + /** + * Gets the WorkflowRunsOperationsImpl object to access its operations. + * + * @return the WorkflowRunsOperationsImpl object. + */ + public WorkflowRunsOperationsImpl getWorkflowRunsOperations() { + return this.workflowRunsOperations; + } + + /** + * The WorkflowTasksImpl object to access its operations. + */ + private final WorkflowTasksImpl workflowTasks; + + /** + * Gets the WorkflowTasksImpl object to access its operations. + * + * @return the WorkflowTasksImpl object. + */ + public WorkflowTasksImpl getWorkflowTasks() { + return this.workflowTasks; + } + + /** + * The WorkflowTasksOperationsImpl object to access its operations. + */ + private final WorkflowTasksOperationsImpl workflowTasksOperations; + + /** + * Gets the WorkflowTasksOperationsImpl object to access its operations. + * + * @return the WorkflowTasksOperationsImpl object. + */ + public WorkflowTasksOperationsImpl getWorkflowTasksOperations() { + return this.workflowTasksOperations; + } + + /** + * The ApprovalsImpl object to access its operations. + */ + private final ApprovalsImpl approvals; + + /** + * Gets the ApprovalsImpl object to access its operations. + * + * @return the ApprovalsImpl object. + */ + public ApprovalsImpl getApprovals() { + return this.approvals; + } + + /** + * The TaskStatusImpl object to access its operations. + */ + private final TaskStatusImpl taskStatus; + + /** + * Gets the TaskStatusImpl object to access its operations. + * + * @return the TaskStatusImpl object. + */ + public TaskStatusImpl getTaskStatus() { + return this.taskStatus; + } + + /** + * Initializes an instance of PurviewWorkflowClient client. + * + * @param endpoint The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/. + * @param serviceVersion Service version. + */ + public PurviewWorkflowClientImpl(String endpoint, PurviewWorkflowServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewWorkflowClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/. + * @param serviceVersion Service version. + */ + public PurviewWorkflowClientImpl(HttpPipeline httpPipeline, String endpoint, + PurviewWorkflowServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of PurviewWorkflowClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/. + * @param serviceVersion Service version. + */ + public PurviewWorkflowClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + PurviewWorkflowServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.workflows = new WorkflowsImpl(this); + this.workflowsOperations = new WorkflowsOperationsImpl(this); + this.userRequests = new UserRequestsImpl(this); + this.workflowRuns = new WorkflowRunsImpl(this); + this.workflowRunsOperations = new WorkflowRunsOperationsImpl(this); + this.workflowTasks = new WorkflowTasksImpl(this); + this.workflowTasksOperations = new WorkflowTasksOperationsImpl(this); + this.approvals = new ApprovalsImpl(this); + this.taskStatus = new TaskStatusImpl(this); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/TaskStatusImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/TaskStatusImpl.java new file mode 100644 index 000000000000..814d3812fbeb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/TaskStatusImpl.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TaskStatus. + */ +public final class TaskStatusImpl { + /** + * The proxy service used to perform REST calls. + */ + private final TaskStatusService service; + + /** + * The service client containing this operation class. + */ + private final PurviewWorkflowClientImpl client; + + /** + * Initializes an instance of TaskStatusImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TaskStatusImpl(PurviewWorkflowClientImpl client) { + this.service + = RestProxy.create(TaskStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewWorkflowTaskStatus to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}/workflow") + @ServiceInterface(name = "PurviewWorkflowTaskStatus") + public interface TaskStatusService { + @Post("/workflowtasks/{taskId}/change-task-status") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> update(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData taskUpdateCommand, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/workflowtasks/{taskId}/change-task-status") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response updateSync(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData taskUpdateCommand, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Update the status of a workflow task request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     newStatus: String(NotStarted/InProgress/Completed/Canceled) (Required)
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param taskUpdateCommand Request body of updating workflow task request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync(String taskId, BinaryData taskUpdateCommand, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), taskId, + this.client.getServiceVersion().getVersion(), taskUpdateCommand, accept, requestOptions, context)); + } + + /** + * Update the status of a workflow task request. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     newStatus: String(NotStarted/InProgress/Completed/Canceled) (Required)
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param taskUpdateCommand Request body of updating workflow task request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String taskId, BinaryData taskUpdateCommand, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), taskId, this.client.getServiceVersion().getVersion(), + taskUpdateCommand, accept, requestOptions, Context.NONE); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/UserRequestsImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/UserRequestsImpl.java new file mode 100644 index 000000000000..aaad241f4227 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/UserRequestsImpl.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in UserRequests. + */ +public final class UserRequestsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final UserRequestsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewWorkflowClientImpl client; + + /** + * Initializes an instance of UserRequestsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UserRequestsImpl(PurviewWorkflowClientImpl client) { + this.service + = RestProxy.create(UserRequestsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewWorkflowUserRequests to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}/workflow") + @ServiceInterface(name = "PurviewWorkflowUserRequests") + public interface UserRequestsService { + @Post("/userrequests") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> submit(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData userRequestsPayload, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/userrequests") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response submitSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData userRequestsPayload, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Submit a user request for requestor, a user request describes user ask to do operation(s) on Purview. If any + * workflow's trigger matches with an operation in request, a run of the workflow is created. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     operations (Required): [
      +     *          (Required){
      +     *             type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *             payload: Object (Required)
      +     *         }
      +     *     ]
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     requestId: String (Required)
      +     *     requestor: String (Required)
      +     *     operations (Required): [
      +     *          (Required){
      +     *             type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *             payload: Object (Required)
      +     *             workflowRunIds (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     *     comment: String (Optional)
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param userRequestsPayload The payload of submitting a user request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return describes user ask to do operation(s) on Purview along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> submitWithResponseAsync(BinaryData userRequestsPayload, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.submit(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), userRequestsPayload, accept, requestOptions, context)); + } + + /** + * Submit a user request for requestor, a user request describes user ask to do operation(s) on Purview. If any + * workflow's trigger matches with an operation in request, a run of the workflow is created. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     operations (Required): [
      +     *          (Required){
      +     *             type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *             payload: Object (Required)
      +     *         }
      +     *     ]
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     requestId: String (Required)
      +     *     requestor: String (Required)
      +     *     operations (Required): [
      +     *          (Required){
      +     *             type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *             payload: Object (Required)
      +     *             workflowRunIds (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     *     comment: String (Optional)
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param userRequestsPayload The payload of submitting a user request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return describes user ask to do operation(s) on Purview along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response submitWithResponse(BinaryData userRequestsPayload, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.submitSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + userRequestsPayload, accept, requestOptions, Context.NONE); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowRunsImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowRunsImpl.java new file mode 100644 index 000000000000..0d540998c73e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowRunsImpl.java @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.UrlBuilder; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WorkflowRuns. + */ +public final class WorkflowRunsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final WorkflowRunsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewWorkflowClientImpl client; + + /** + * Initializes an instance of WorkflowRunsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkflowRunsImpl(PurviewWorkflowClientImpl client) { + this.service + = RestProxy.create(WorkflowRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewWorkflowWorkflowRuns to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}/workflow") + @ServiceInterface(name = "PurviewWorkflowWorkflowRuns") + public interface WorkflowRunsService { + @Get("/workflowruns") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/workflowruns") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * List workflow runs. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's workflow runs or view as admin.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      runStatusesList<String>NoFilter workflow runs by workflow run status. In + * the form of "," separated string.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     workflowId: String (Required)
      +     *     startTime: OffsetDateTime (Required)
      +     *     requestor: String (Required)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List workflow runs. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's workflow runs or view as admin.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      runStatusesList<String>NoFilter workflow runs by workflow run status. In + * the form of "," separated string.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     workflowId: String (Required)
      +     *     startTime: OffsetDateTime (Required)
      +     *     requestor: String (Required)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * List workflow runs. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's workflow runs or view as admin.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      runStatusesList<String>NoFilter workflow runs by workflow run status. In + * the form of "," separated string.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     workflowId: String (Required)
      +     *     startTime: OffsetDateTime (Required)
      +     *     requestor: String (Required)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List workflow runs. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's workflow runs or view as admin.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      runStatusesList<String>NoFilter workflow runs by workflow run status. In + * the form of "," separated string.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     workflowId: String (Required)
      +     *     startTime: OffsetDateTime (Required)
      +     *     requestor: String (Required)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     workflowId: String (Required)
      +     *     startTime: OffsetDateTime (Required)
      +     *     requestor: String (Required)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     workflowId: String (Required)
      +     *     startTime: OffsetDateTime (Required)
      +     *     requestor: String (Required)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Required)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowRunsOperationsImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowRunsOperationsImpl.java new file mode 100644 index 000000000000..a0cffc3a8e82 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowRunsOperationsImpl.java @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WorkflowRunsOperations. + */ +public final class WorkflowRunsOperationsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final WorkflowRunsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewWorkflowClientImpl client; + + /** + * Initializes an instance of WorkflowRunsOperationsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkflowRunsOperationsImpl(PurviewWorkflowClientImpl client) { + this.service + = RestProxy.create(WorkflowRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewWorkflowWorkflowRunsOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}/workflow") + @ServiceInterface(name = "PurviewWorkflowWorkflowRunsOperations") + public interface WorkflowRunsService { + @Get("/workflowruns/{workflowRunId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("workflowRunId") String workflowRunId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/workflowruns/{workflowRunId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("workflowRunId") String workflowRunId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/workflowruns/{workflowRunId}/cancel") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> cancel(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("workflowRunId") String workflowRunId, + @BodyParam("application/json") BinaryData runCancelReply, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/workflowruns/{workflowRunId}/cancel") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response cancelSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("workflowRunId") String workflowRunId, @BodyParam("application/json") BinaryData runCancelReply, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get a workflow run. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     workflowId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     requestor: String (Optional)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Optional): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     *     actionDag: Object (Required)
      +     *     detail (Required): {
      +     *         runInput: Object (Required)
      +     *         actions: Object (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param workflowRunId The workflow run id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a workflow run along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String workflowRunId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), workflowRunId, accept, requestOptions, context)); + } + + /** + * Get a workflow run. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Optional)
      +     *     workflowId: String (Optional)
      +     *     startTime: OffsetDateTime (Optional)
      +     *     requestor: String (Optional)
      +     *     userRequestId: String (Optional)
      +     *     runPayload (Optional): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Required)
      +     *     }
      +     *     status: String(NotStarted/InProgress/Failed/Completed/Canceling/CancellationFailed/Canceled) (Optional)
      +     *     endTime: OffsetDateTime (Optional)
      +     *     cancelTime: OffsetDateTime (Optional)
      +     *     cancelComment: String (Optional)
      +     *     actionDag: Object (Required)
      +     *     detail (Required): {
      +     *         runInput: Object (Required)
      +     *         actions: Object (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param workflowRunId The workflow run id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a workflow run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String workflowRunId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), workflowRunId, + accept, requestOptions, Context.NONE); + } + + /** + * Cancel a workflow run. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowRunId The workflow run id. + * @param runCancelReply Reply of canceling a workflow run. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelWithResponseAsync(String workflowRunId, BinaryData runCancelReply, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.cancel(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + workflowRunId, runCancelReply, accept, requestOptions, context)); + } + + /** + * Cancel a workflow run. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     comment: String (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowRunId The workflow run id. + * @param runCancelReply Reply of canceling a workflow run. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelWithResponse(String workflowRunId, BinaryData runCancelReply, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.cancelSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + workflowRunId, runCancelReply, accept, requestOptions, Context.NONE); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowTasksImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowTasksImpl.java new file mode 100644 index 000000000000..90f1167feb4b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowTasksImpl.java @@ -0,0 +1,627 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.UrlBuilder; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WorkflowTasks. + */ +public final class WorkflowTasksImpl { + /** + * The proxy service used to perform REST calls. + */ + private final WorkflowTasksService service; + + /** + * The service client containing this operation class. + */ + private final PurviewWorkflowClientImpl client; + + /** + * Initializes an instance of WorkflowTasksImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkflowTasksImpl(PurviewWorkflowClientImpl client) { + this.service + = RestProxy.create(WorkflowTasksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewWorkflowWorkflowTasks to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}/workflow") + @ServiceInterface(name = "PurviewWorkflowWorkflowTasks") + public interface WorkflowTasksService { + @Get("/workflowtasks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/workflowtasks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Get all workflow tasks. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's sent, received or history workflow + * tasks.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      taskTypesList<String>NoFilter items by workflow task type. In the form + * of "," separated string.
      taskStatusesList<String>NoFilter workflow tasks by status. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      assigneesList<String>NoAssignees' ids to filter. In the form of "," + * separated string.
      workflowNameKeywordStringNoThe key word which could used to filter workflow + * item with related workflow.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all workflow tasks along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get all workflow tasks. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's sent, received or history workflow + * tasks.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      taskTypesList<String>NoFilter items by workflow task type. In the form + * of "," separated string.
      taskStatusesList<String>NoFilter workflow tasks by status. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      assigneesList<String>NoAssignees' ids to filter. In the form of "," + * separated string.
      workflowNameKeywordStringNoThe key word which could used to filter workflow + * item with related workflow.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all workflow tasks as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Get all workflow tasks. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's sent, received or history workflow + * tasks.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      taskTypesList<String>NoFilter items by workflow task type. In the form + * of "," separated string.
      taskStatusesList<String>NoFilter workflow tasks by status. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      assigneesList<String>NoAssignees' ids to filter. In the form of "," + * separated string.
      workflowNameKeywordStringNoThe key word which could used to filter workflow + * item with related workflow.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all workflow tasks along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get all workflow tasks. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      viewModeStringNoTo filter user's sent, received or history workflow + * tasks.
      workflowIdsList<String>NoFilter items by workflow id list. In the form + * of "," separated string.
      timeWindowStringNoTime window of filtering items. Allowed values: "1d", "7d", + * "30d", "90d".
      maxpagesizeIntegerNoThe maximum page size to get the items at one time. The + * default value is 100.
      orderbyStringNoThe key word which used to sort the results. Allowed values: + * "status desc", "status asc", "requestor desc", "requestor asc", "startTime desc", "startTime asc", "createdTime + * desc", "createdTime asc".
      taskTypesList<String>NoFilter items by workflow task type. In the form + * of "," separated string.
      taskStatusesList<String>NoFilter workflow tasks by status. In the form + * of "," separated string.
      requestorsList<String>NoRequestors' ids to filter. In the form of "," + * separated string.
      assigneesList<String>NoAssignees' ids to filter. In the form of "," + * separated string.
      workflowNameKeywordStringNoThe key word which could used to filter workflow + * item with related workflow.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all workflow tasks as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all workflow tasks along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return all workflow tasks along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowTasksOperationsImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowTasksOperationsImpl.java new file mode 100644 index 000000000000..403705c36e38 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowTasksOperationsImpl.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.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WorkflowTasksOperations. + */ +public final class WorkflowTasksOperationsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final WorkflowTasksService service; + + /** + * The service client containing this operation class. + */ + private final PurviewWorkflowClientImpl client; + + /** + * Initializes an instance of WorkflowTasksOperationsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkflowTasksOperationsImpl(PurviewWorkflowClientImpl client) { + this.service + = RestProxy.create(WorkflowTasksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewWorkflowWorkflowTasksOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}/workflow") + @ServiceInterface(name = "PurviewWorkflowWorkflowTasksOperations") + public interface WorkflowTasksService { + @Get("/workflowtasks/{taskId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/workflowtasks/{taskId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/workflowtasks/{taskId}/reassign") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> reassign(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData reassignCommand, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/workflowtasks/{taskId}/reassign") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response reassignSync(@HostParam("endpoint") String endpoint, @PathParam("taskId") String taskId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData reassignCommand, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get a workflow task. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a workflow task along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String taskId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), taskId, accept, requestOptions, context)); + } + + /** + * Get a workflow task. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     type: String(Approval/SimpleTask/approval/simpleTask) (Required)
      +     *     id: String (Required)
      +     *     title: String (Optional)
      +     *     workflowRunId: String (Required)
      +     *     workflowId: String (Required)
      +     *     requestor: String (Required)
      +     *     createdTime: OffsetDateTime (Required)
      +     *     lastUpdateTime: OffsetDateTime (Required)
      +     *     payload (Required): {
      +     *         type: String(CreateTerm/UpdateTerm/DeleteTerm/ImportTerms/UpdateAsset/GrantDataAccess) (Required)
      +     *         targetValue: String (Required)
      +     *         payload: Object (Optional)
      +     *     }
      +     *     reminderInfo (Optional): {
      +     *         lastRemindTime: OffsetDateTime (Optional)
      +     *         nextRemindTime: OffsetDateTime (Required)
      +     *         reminderSettings: Object (Required)
      +     *     }
      +     *     expiryInfo (Optional): {
      +     *         lastExpiryNotificationTime: OffsetDateTime (Optional)
      +     *         nextExpiryNotificationTime: OffsetDateTime (Required)
      +     *         expiryTime: OffsetDateTime (Required)
      +     *         expirySettings (Required): {
      +     *             expireAfter: Object (Required)
      +     *             notifyOnExpiration (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a workflow task along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String taskId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), taskId, accept, requestOptions, Context.NONE); + } + + /** + * Reassign a workflow task. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     reassignments (Optional): [
      +     *          (Optional){
      +     *             reassignFrom: String (Required)
      +     *             reassignTo: String (Required)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param reassignCommand The request body of reassigning a workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> reassignWithResponseAsync(String taskId, BinaryData reassignCommand, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.reassign(this.client.getEndpoint(), taskId, + this.client.getServiceVersion().getVersion(), reassignCommand, accept, requestOptions, context)); + } + + /** + * Reassign a workflow task. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     reassignments (Optional): [
      +     *          (Optional){
      +     *             reassignFrom: String (Required)
      +     *             reassignTo: String (Required)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param taskId The task id. + * @param reassignCommand The request body of reassigning a workflow task. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response reassignWithResponse(String taskId, BinaryData reassignCommand, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.reassignSync(this.client.getEndpoint(), taskId, this.client.getServiceVersion().getVersion(), + reassignCommand, accept, requestOptions, Context.NONE); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowsImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowsImpl.java new file mode 100644 index 000000000000..033c3214e92a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowsImpl.java @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Workflows. + */ +public final class WorkflowsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final WorkflowsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewWorkflowClientImpl client; + + /** + * Initializes an instance of WorkflowsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkflowsImpl(PurviewWorkflowClientImpl client) { + this.service + = RestProxy.create(WorkflowsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewWorkflowWorkflows to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}/workflow") + @ServiceInterface(name = "PurviewWorkflowWorkflows") + public interface WorkflowsService { + @Get("/workflows") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/workflows") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * List all workflows. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow list along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List all workflows. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> listSinglePageAsync(requestOptions), + nextLink -> listNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * List all workflows. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List all workflows. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> listSinglePage(requestOptions), + nextLink -> listNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow list along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowsOperationsImpl.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowsOperationsImpl.java new file mode 100644 index 000000000000..c57d60618400 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/WorkflowsOperationsImpl.java @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.implementation; + +import com.azure.analytics.purview.workflow.PurviewWorkflowServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WorkflowsOperations. + */ +public final class WorkflowsOperationsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final WorkflowsService service; + + /** + * The service client containing this operation class. + */ + private final PurviewWorkflowClientImpl client; + + /** + * Initializes an instance of WorkflowsOperationsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkflowsOperationsImpl(PurviewWorkflowClientImpl client) { + this.service + = RestProxy.create(WorkflowsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public PurviewWorkflowServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for PurviewWorkflowWorkflowsOperations to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}/workflow") + @ServiceInterface(name = "PurviewWorkflowWorkflowsOperations") + public interface WorkflowsService { + @Get("/workflows/{workflowId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @PathParam("workflowId") String workflowId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/workflows/{workflowId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSync(@HostParam("endpoint") String endpoint, @PathParam("workflowId") String workflowId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Put("/workflows/{workflowId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrReplace(@HostParam("endpoint") String endpoint, + @PathParam("workflowId") String workflowId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData workflowCreateOrUpdateCommand, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/workflows/{workflowId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrReplaceSync(@HostParam("endpoint") String endpoint, + @PathParam("workflowId") String workflowId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData workflowCreateOrUpdateCommand, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/workflows/{workflowId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> delete(@HostParam("endpoint") String endpoint, @PathParam("workflowId") String workflowId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Delete("/workflows/{workflowId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @PathParam("workflowId") String workflowId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/workflows/{workflowId}/validate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> validate(@HostParam("endpoint") String endpoint, + @PathParam("workflowId") String workflowId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData workflowValidateQuery, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/workflows/{workflowId}/validate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response validateSync(@HostParam("endpoint") String endpoint, + @PathParam("workflowId") String workflowId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BinaryData workflowValidateQuery, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + } + + /** + * Get a specific workflow. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific workflow along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String workflowId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), workflowId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get a specific workflow. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a specific workflow along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String workflowId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), workflowId, this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Create or replace a workflow. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param workflowCreateOrUpdateCommand Create or update workflow payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrReplaceWithResponseAsync(String workflowId, + BinaryData workflowCreateOrUpdateCommand, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createOrReplace(this.client.getEndpoint(), workflowId, + this.client.getServiceVersion().getVersion(), workflowCreateOrUpdateCommand, accept, requestOptions, + context)); + } + + /** + * Create or replace a workflow. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     createdTime: OffsetDateTime (Optional)
      +     *     createdBy: String (Optional)
      +     *     lastUpdateTime: OffsetDateTime (Optional)
      +     *     updatedBy: String (Optional)
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Required)
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param workflowCreateOrUpdateCommand Create or update workflow payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the workflow properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrReplaceWithResponse(String workflowId, BinaryData workflowCreateOrUpdateCommand, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), workflowId, + this.client.getServiceVersion().getVersion(), workflowCreateOrUpdateCommand, accept, requestOptions, + Context.NONE); + } + + /** + * Delete a workflow. + * + * @param workflowId The workflow id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String workflowId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), workflowId, + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Delete a workflow. + * + * @param workflowId The workflow id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String workflowId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), workflowId, this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } + + /** + * Validate a workflow. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             severity: String(error/warning) (Required)
      +     *             location (Required): {
      +     *                 type: String(workflow/action/actionParameter) (Required)
      +     *                 actionName: String (Optional)
      +     *                 parameterKey: String (Optional)
      +     *             }
      +     *             message: String (Required)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param workflowValidateQuery Check workflow payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> validateWithResponseAsync(String workflowId, BinaryData workflowValidateQuery, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.validate(this.client.getEndpoint(), workflowId, + this.client.getServiceVersion().getVersion(), workflowValidateQuery, accept, requestOptions, context)); + } + + /** + * Validate a workflow. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     triggers (Required): [
      +     *          (Required){
      +     *             type: String(when_term_creation_is_requested/when_term_deletion_is_requested/when_term_update_is_requested/when_terms_import_is_requested/when_data_access_grant_is_requested/when_asset_update_is_requested) (Required)
      +     *             underGlossaryHierarchy: String (Optional)
      +     *             underCollection: String (Optional)
      +     *             underGlossary: String (Optional)
      +     *         }
      +     *     ]
      +     *     name: String (Required)
      +     *     isEnabled: boolean (Required)
      +     *     description: String (Required)
      +     *     actionDag: Object (Optional)
      +     * }
      +     * }
      +     * 
      + * + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             severity: String(error/warning) (Required)
      +     *             location (Required): {
      +     *                 type: String(workflow/action/actionParameter) (Required)
      +     *                 actionName: String (Optional)
      +     *                 parameterKey: String (Optional)
      +     *             }
      +     *             message: String (Required)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param workflowId The workflow id. + * @param workflowValidateQuery Check workflow payload. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateWithResponse(String workflowId, BinaryData workflowValidateQuery, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.validateSync(this.client.getEndpoint(), workflowId, this.client.getServiceVersion().getVersion(), + workflowValidateQuery, accept, requestOptions, Context.NONE); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/package-info.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/package-info.java new file mode 100644 index 000000000000..bb37c6724e78 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/implementation/package-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for PurviewWorkflow. + * Workflows are automated, repeatable business processes which allow organizations to track changes, enforce policy + * compliance, and ensure quality data across their data landscape.Workflow service is a micro service within Microsoft + * Purview to validate and orchestrate CUD (create, update, delete) operations on their data entities. This spec defines + * REST API of Purview Workflow Service, which could used for creating Purview workflow client. + */ +package com.azure.analytics.purview.workflow.implementation; diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/package-info.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/package-info.java new file mode 100644 index 000000000000..585716f6f564 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/com/azure/analytics/purview/workflow/package-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for PurviewWorkflow. + * Workflows are automated, repeatable business processes which allow organizations to track changes, enforce policy + * compliance, and ensure quality data across their data landscape.Workflow service is a micro service within Microsoft + * Purview to validate and orchestrate CUD (create, update, delete) operations on their data entities. This spec defines + * REST API of Purview Workflow Service, which could used for creating Purview workflow client. + */ +package com.azure.analytics.purview.workflow; diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/java/module-info.java b/sdk/purview/azure-analytics-purview-workflow/src/main/java/module-info.java new file mode 100644 index 000000000000..0501d59571db --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/java/module-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.analytics.purview.workflow { + requires transitive com.azure.core; + + exports com.azure.analytics.purview.workflow; +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/main/resources/azure-analytics-purview-workflow.properties b/sdk/purview/azure-analytics-purview-workflow/src/main/resources/azure-analytics-purview-workflow.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/main/resources/azure-analytics-purview-workflow.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/ReadmeSamples.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/ReadmeSamples.java new file mode 100644 index 000000000000..741f3177d544 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/ReadmeSamples.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.UsernamePasswordCredentialBuilder; + +public final class ReadmeSamples { + // BEGIN: readme-sample-createWorkflowClient + WorkflowClient purviewWorkflowClient = new WorkflowClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .credential(new UsernamePasswordCredentialBuilder() + .clientId(Configuration.getGlobalConfiguration().get("CLIENTID", "clientId")) + .tenantId(Configuration.getGlobalConfiguration().get("TENANTID", "tenantId")) + .username(Configuration.getGlobalConfiguration().get("USERNAME", "username")) + .password(Configuration.getGlobalConfiguration().get("PASSWORD", "password")) + .build()) + .buildClient(); + // END: readme-sample-createWorkflowClient + + // BEGIN: readme-sample-createUserRequestsClient + UserRequestsClient userRequestsClient = new UserRequestsClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .credential(new UsernamePasswordCredentialBuilder() + .clientId(Configuration.getGlobalConfiguration().get("CLIENTID", "clientId")) + .tenantId(Configuration.getGlobalConfiguration().get("TENANTID", "tenantId")) + .username(Configuration.getGlobalConfiguration().get("USERNAME", "username")) + .password(Configuration.getGlobalConfiguration().get("PASSWORD", "password")) + .build()) + .buildClient(); + // END: readme-sample-createUserRequestsClient + + // BEGIN: readme-sample-createApprovalClient + ApprovalClient approvalClient = new ApprovalClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .credential(new UsernamePasswordCredentialBuilder() + .clientId(Configuration.getGlobalConfiguration().get("CLIENTID", "clientId")) + .tenantId(Configuration.getGlobalConfiguration().get("TENANTID", "tenantId")) + .username(Configuration.getGlobalConfiguration().get("USERNAME", "username")) + .password(Configuration.getGlobalConfiguration().get("PASSWORD", "password")) + .build()) + .buildClient(); + // END: readme-sample-createApprovalClient + + public void createWorkflow() { + // BEGIN: readme-sample-createWorkflow + BinaryData workflowCreateOrUpdateCommand = + BinaryData.fromString( + "{\"name\":\"Create glossary term workflow\",\"description\":\"\",\"triggers\":[{\"type\":\"when_term_creation_is_requested\",\"underGlossaryHierarchy\":\"/glossaries/20031e20-b4df-4a66-a61d-1b0716f3fa48\"}],\"isEnabled\":true,\"actionDag\":{\"actions\":{\"Startandwaitforanapproval\":{\"type\":\"Approval\",\"inputs\":{\"parameters\":{\"approvalType\":\"PendingOnAll\",\"title\":\"ApprovalRequestforCreateGlossaryTerm\",\"assignedTo\":[\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"]}},\"runAfter\":{}},\"Condition\":{\"type\":\"If\",\"expression\":{\"and\":[{\"equals\":[\"@outputs('Startandwaitforanapproval')['body/outcome']\",\"Approved\"]}]},\"actions\":{\"Createglossaryterm\":{\"type\":\"CreateTerm\",\"runAfter\":{}},\"Sendemailnotification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailSubject\":\"GlossaryTermCreate-APPROVED\",\"emailMessage\":\"YourrequestforGlossaryTerm@{triggerBody()['request']['term']['name']}isapproved.\",\"emailRecipients\":[\"@{triggerBody()['request']['requestor']}\"]}},\"runAfter\":{\"Createglossaryterm\":[\"Succeeded\"]}}},\"else\":{\"actions\":{\"Sendrejectemailnotification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailSubject\":\"GlossaryTermCreate-REJECTED\",\"emailMessage\":\"YourrequestforGlossaryTerm@{triggerBody()['request']['term']['name']}isrejected.\",\"emailRecipients\":[\"@{triggerBody()['request']['requestor']}\"]}},\"runAfter\":{}}}},\"runAfter\":{\"Startandwaitforanapproval\":[\"Succeeded\"]}}}}}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = + purviewWorkflowClient.createOrReplaceWithResponse( + "4afb5752-e47f-43a1-8ba7-c696bf8d2745", workflowCreateOrUpdateCommand, requestOptions); + // END: readme-sample-createWorkflow + } + + public void submitUserRequests() { + // BEGIN: readme-sample-submitUserRequests + BinaryData userRequestsPayload = + BinaryData.fromString( + "{\"comment\":\"Thanks!\",\"operations\":[{\"type\":\"CreateTerm\",\"payload\":{\"glossaryTerm\":{\"name\":\"term\",\"anchor\":{\"glossaryGuid\":\"20031e20-b4df-4a66-a61d-1b0716f3fa48\"},\"nickName\":\"term\",\"status\":\"Approved\"}}}]}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = + userRequestsClient.submitWithResponse(userRequestsPayload, requestOptions); + // END: readme-sample-submitUserRequests + } + + public void approveApproval() { + // BEGIN: readme-sample-approveApproval + BinaryData approvalResponseComment = BinaryData.fromString("{\"comment\":\"Thanks for raising this!\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = + approvalClient.approveWithResponse( + "69b57a00-f5de-4a17-a44a-6479adae373d", approvalResponseComment, requestOptions); + // END: readme-sample-approveApproval + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/ApprovalApprove.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/ApprovalApprove.java new file mode 100644 index 000000000000..c638aaf63c60 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/ApprovalApprove.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.ApprovalClient; +import com.azure.analytics.purview.workflow.ApprovalClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ApprovalApprove { + public static void main(String[] args) { + ApprovalClient approvalClient + = new ApprovalClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.approval-approve.approval-approve + BinaryData approvalResponseComment = BinaryData.fromString("{\"comment\":\"Thanks for raising this!\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = approvalClient.approveWithResponse("98d98e2c-23fa-4157-a3f8-ff8ce5cc095c", + approvalResponseComment, requestOptions); + // END:com.azure.analytics.purview.workflow.generated.approval-approve.approval-approve + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/ApprovalReject.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/ApprovalReject.java new file mode 100644 index 000000000000..319a3c33744a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/ApprovalReject.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.ApprovalClient; +import com.azure.analytics.purview.workflow.ApprovalClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class ApprovalReject { + public static void main(String[] args) { + ApprovalClient approvalClient + = new ApprovalClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.approval-reject.approval-reject + BinaryData approvalResponseComment = BinaryData.fromString("{\"comment\":\"Thanks for raising this!\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = approvalClient.rejectWithResponse("98d98e2c-23fa-4157-a3f8-ff8ce5cc095c", + approvalResponseComment, requestOptions); + // END:com.azure.analytics.purview.workflow.generated.approval-reject.approval-reject + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/TaskRequestUpdate.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/TaskRequestUpdate.java new file mode 100644 index 000000000000..2eff63e36346 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/TaskRequestUpdate.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.TaskStatusClient; +import com.azure.analytics.purview.workflow.TaskStatusClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TaskRequestUpdate { + public static void main(String[] args) { + TaskStatusClient taskStatusClient + = new TaskStatusClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.task-status-update.task-request-update + BinaryData taskUpdateCommand = BinaryData.fromString("{\"comment\":\"Thanks!\",\"newStatus\":\"InProgress\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = taskStatusClient.updateWithResponse("d5bd0215-df84-4245-8e18-3a8f012be376", + taskUpdateCommand, requestOptions); + // END:com.azure.analytics.purview.workflow.generated.task-status-update.task-request-update + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/UserRequestsSubmit.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/UserRequestsSubmit.java new file mode 100644 index 000000000000..1b5cd742c10c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/UserRequestsSubmit.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.UserRequestsClient; +import com.azure.analytics.purview.workflow.UserRequestsClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class UserRequestsSubmit { + public static void main(String[] args) { + UserRequestsClient userRequestsClient + = new UserRequestsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.user-requests-submit.user-requests-submit + BinaryData userRequestsPayload = BinaryData.fromString( + "{\"comment\":\"Thanks!\",\"operations\":[{\"type\":\"CreateTerm\",\"payload\":{\"glossaryTerm\":{\"name\":\"term\",\"anchor\":{\"glossaryGuid\":\"20031e20-b4df-4a66-a61d-1b0716f3fa48\"},\"nickName\":\"term\",\"status\":\"Approved\"}}}]}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = userRequestsClient.submitWithResponse(userRequestsPayload, requestOptions); + // END:com.azure.analytics.purview.workflow.generated.user-requests-submit.user-requests-submit + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkTaskGet.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkTaskGet.java new file mode 100644 index 000000000000..2e26620b9b4e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkTaskGet.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowTaskClient; +import com.azure.analytics.purview.workflow.WorkflowTaskClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkTaskGet { + public static void main(String[] args) { + WorkflowTaskClient workflowTaskClient + = new WorkflowTaskClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflow-task-get.work-task-get + RequestOptions requestOptions = new RequestOptions(); + Response response + = workflowTaskClient.getWithResponse("98d98e2c-23fa-4157-a3f8-ff8ce5cc095c", requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflow-task-get.work-task-get + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowCreateOrUpdate.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowCreateOrUpdate.java new file mode 100644 index 000000000000..07bcf4c6d164 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowCreateOrUpdate.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowClient; +import com.azure.analytics.purview.workflow.WorkflowClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkflowCreateOrUpdate { + public static void main(String[] args) { + WorkflowClient workflowClient + = new WorkflowClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflow-create-or-replace.workflow-create-or-update + BinaryData workflowCreateOrUpdateCommand = BinaryData.fromString( + "{\"name\":\"Create glossary term workflow\",\"description\":\"\",\"actionDag\":{\"actions\":{\"Condition\":{\"type\":\"If\",\"actions\":{\"Create glossary term\":{\"type\":\"CreateTerm\",\"runAfter\":{}},\"Send email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{runInput()['term']['name']} is approved.\",\"emailRecipients\":[\"@{runInput()['requestor']}\"],\"emailSubject\":\"Glossary Term Create - APPROVED\"}},\"runAfter\":{\"Create glossary term\":[\"Succeeded\"]}}},\"else\":{\"actions\":{\"Send reject email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{runInput()['term']['name']} is rejected.\",\"emailRecipients\":[\"@{runInput()['requestor']}\"],\"emailSubject\":\"Glossary Term Create - REJECTED\"}},\"runAfter\":{}}}},\"expression\":{\"and\":[{\"equals\":[\"@{outputs('Start and wait for an approval')['outcome']}\",\"Approved\"]}]},\"runAfter\":{\"Start and wait for an approval\":[\"Succeeded\"]}},\"Start and wait for an approval\":{\"type\":\"Approval\",\"inputs\":{\"parameters\":{\"approvalType\":\"PendingOnAll\",\"assignedTo\":[\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"],\"title\":\"Approval Request for Create Glossary Term\"}},\"runAfter\":{}}}},\"isEnabled\":true,\"triggers\":[{\"type\":\"when_term_creation_is_requested\",\"underGlossaryHierarchy\":\"/glossaries/20031e20-b4df-4a66-a61d-1b0716f3fa48\"}]}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = workflowClient.createOrReplaceWithResponse( + "4afb5752-e47f-43a1-8ba7-c696bf8d2745", workflowCreateOrUpdateCommand, requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflow-create-or-replace.workflow-create-or-update + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowDelete.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowDelete.java new file mode 100644 index 000000000000..ed5b720a5adc --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowDelete.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowClient; +import com.azure.analytics.purview.workflow.WorkflowClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkflowDelete { + public static void main(String[] args) { + WorkflowClient workflowClient + = new WorkflowClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflow-delete.workflow-delete + RequestOptions requestOptions = new RequestOptions(); + Response response + = workflowClient.deleteWithResponse("4afb5752-e47f-43a1-8ba7-c696bf8d2745", requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflow-delete.workflow-delete + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowGet.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowGet.java new file mode 100644 index 000000000000..bbcc7fd8db74 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowGet.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowClient; +import com.azure.analytics.purview.workflow.WorkflowClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkflowGet { + public static void main(String[] args) { + WorkflowClient workflowClient + = new WorkflowClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflow-get.workflow-get + RequestOptions requestOptions = new RequestOptions(); + Response response + = workflowClient.getWithResponse("d503b2d2-84da-4a85-9e85-6e82e39d59a0", requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflow-get.workflow-get + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunCancel.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunCancel.java new file mode 100644 index 000000000000..00f9736d2fb5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunCancel.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowRunClient; +import com.azure.analytics.purview.workflow.WorkflowRunClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkflowRunCancel { + public static void main(String[] args) { + WorkflowRunClient workflowRunClient + = new WorkflowRunClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflow-run-cancel.workflow-run-cancel + BinaryData runCancelReply = BinaryData.fromString("{\"comment\":\"Thanks!\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = workflowRunClient.cancelWithResponse("b7aaf54b-59c2-4a0e-a7d0-f431044f2198", + runCancelReply, requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflow-run-cancel.workflow-run-cancel + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunGet.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunGet.java new file mode 100644 index 000000000000..52b512ade844 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunGet.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowRunClient; +import com.azure.analytics.purview.workflow.WorkflowRunClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkflowRunGet { + public static void main(String[] args) { + WorkflowRunClient workflowRunClient + = new WorkflowRunClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflow-run-get.workflow-run-get + RequestOptions requestOptions = new RequestOptions(); + Response response + = workflowRunClient.getWithResponse("04334a74-3400-11ed-a261-0242ac120002", requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflow-run-get.workflow-run-get + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunsList.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunsList.java new file mode 100644 index 000000000000..1057f26f5e90 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowRunsList.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowRunsClient; +import com.azure.analytics.purview.workflow.WorkflowRunsClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkflowRunsList { + public static void main(String[] args) { + WorkflowRunsClient workflowRunsClient + = new WorkflowRunsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflow-runs-list.workflow-runs-list + RequestOptions requestOptions = new RequestOptions().addQueryParam("maxpagesize", "1000") + .addQueryParam("orderby", "startTime desc") + .addQueryParam("timeWindow", "30d"); + PagedIterable response = workflowRunsClient.list(requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflow-runs-list.workflow-runs-list + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowTaskReassign.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowTaskReassign.java new file mode 100644 index 000000000000..9c7d6208e324 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowTaskReassign.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowTaskClient; +import com.azure.analytics.purview.workflow.WorkflowTaskClientBuilder; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkflowTaskReassign { + public static void main(String[] args) { + WorkflowTaskClient workflowTaskClient + = new WorkflowTaskClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflow-task-reassign.workflow-task-reassign + BinaryData reassignCommand = BinaryData.fromString( + "{\"reassignments\":[{\"reassignFrom\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"reassignTo\":\"7645223c-cdca-43e9-98c8-bd4d97e79e5e\"}]}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = workflowTaskClient.reassignWithResponse("11b0244b-70ea-4c6b-9d28-08f52de40f2f", + reassignCommand, requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflow-task-reassign.workflow-task-reassign + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowTasksList.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowTasksList.java new file mode 100644 index 000000000000..e70f89eae83e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowTasksList.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowTasksClient; +import com.azure.analytics.purview.workflow.WorkflowTasksClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkflowTasksList { + public static void main(String[] args) { + WorkflowTasksClient workflowTasksClient + = new WorkflowTasksClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflow-tasks-list.workflow-tasks-list + RequestOptions requestOptions = new RequestOptions().addQueryParam("maxpagesize", "1000") + .addQueryParam("orderby", "createdTime desc") + .addQueryParam("timeWindow", "30d") + .addQueryParam("viewMode", "sent"); + PagedIterable response = workflowTasksClient.list(requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflow-tasks-list.workflow-tasks-list + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowsList.java b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowsList.java new file mode 100644 index 000000000000..8548e2a4f690 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/samples/java/com/azure/analytics/purview/workflow/generated/WorkflowsList.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.analytics.purview.workflow.WorkflowsClient; +import com.azure.analytics.purview.workflow.WorkflowsClientBuilder; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class WorkflowsList { + public static void main(String[] args) { + WorkflowsClient workflowsClient + = new WorkflowsClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT")) + .buildClient(); + // BEGIN:com.azure.analytics.purview.workflow.generated.workflows-list.workflows-list + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = workflowsClient.list(requestOptions); + // END:com.azure.analytics.purview.workflow.generated.workflows-list.workflows-list + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/ApprovalApproveTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/ApprovalApproveTests.java new file mode 100644 index 000000000000..28fc9e2bb669 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/ApprovalApproveTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ApprovalApproveTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testApprovalApproveTests() { + BinaryData approvalResponseComment = BinaryData.fromString("{\"comment\":\"Thanks for raising this!\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = approvalClient.approveWithResponse("98d98e2c-23fa-4157-a3f8-ff8ce5cc095c", + approvalResponseComment, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/ApprovalRejectTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/ApprovalRejectTests.java new file mode 100644 index 000000000000..006b02972a6c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/ApprovalRejectTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class ApprovalRejectTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testApprovalRejectTests() { + BinaryData approvalResponseComment = BinaryData.fromString("{\"comment\":\"Thanks for raising this!\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = approvalClient.rejectWithResponse("98d98e2c-23fa-4157-a3f8-ff8ce5cc095c", + approvalResponseComment, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/PurviewWorkflowClientTestBase.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/PurviewWorkflowClientTestBase.java new file mode 100644 index 000000000000..b7ef4b149ca6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/PurviewWorkflowClientTestBase.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.analytics.purview.workflow.ApprovalClient; +import com.azure.analytics.purview.workflow.ApprovalClientBuilder; +import com.azure.analytics.purview.workflow.TaskStatusClient; +import com.azure.analytics.purview.workflow.TaskStatusClientBuilder; +import com.azure.analytics.purview.workflow.UserRequestsClient; +import com.azure.analytics.purview.workflow.UserRequestsClientBuilder; +import com.azure.analytics.purview.workflow.WorkflowClient; +import com.azure.analytics.purview.workflow.WorkflowClientBuilder; +import com.azure.analytics.purview.workflow.WorkflowRunClient; +import com.azure.analytics.purview.workflow.WorkflowRunClientBuilder; +import com.azure.analytics.purview.workflow.WorkflowRunsClient; +import com.azure.analytics.purview.workflow.WorkflowRunsClientBuilder; +import com.azure.analytics.purview.workflow.WorkflowTaskClient; +import com.azure.analytics.purview.workflow.WorkflowTaskClientBuilder; +import com.azure.analytics.purview.workflow.WorkflowTasksClient; +import com.azure.analytics.purview.workflow.WorkflowTasksClientBuilder; +import com.azure.analytics.purview.workflow.WorkflowsClient; +import com.azure.analytics.purview.workflow.WorkflowsClientBuilder; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.identity.DefaultAzureCredentialBuilder; + +class PurviewWorkflowClientTestBase extends TestProxyTestBase { + protected WorkflowsClient workflowsClient; + + protected WorkflowClient workflowClient; + + protected UserRequestsClient userRequestsClient; + + protected WorkflowRunsClient workflowRunsClient; + + protected WorkflowRunClient workflowRunClient; + + protected WorkflowTasksClient workflowTasksClient; + + protected WorkflowTaskClient workflowTaskClient; + + protected ApprovalClient approvalClient; + + protected TaskStatusClient taskStatusClient; + + @Override + protected void beforeTest() { + WorkflowsClientBuilder workflowsClientbuilder + = new WorkflowsClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + workflowsClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + workflowsClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + workflowsClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + workflowsClient = workflowsClientbuilder.buildClient(); + + WorkflowClientBuilder workflowClientbuilder + = new WorkflowClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + workflowClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + workflowClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + workflowClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + workflowClient = workflowClientbuilder.buildClient(); + + UserRequestsClientBuilder userRequestsClientbuilder = new UserRequestsClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + userRequestsClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + userRequestsClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + userRequestsClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + userRequestsClient = userRequestsClientbuilder.buildClient(); + + WorkflowRunsClientBuilder workflowRunsClientbuilder = new WorkflowRunsClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + workflowRunsClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + workflowRunsClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + workflowRunsClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + workflowRunsClient = workflowRunsClientbuilder.buildClient(); + + WorkflowRunClientBuilder workflowRunClientbuilder = new WorkflowRunClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + workflowRunClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + workflowRunClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + workflowRunClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + workflowRunClient = workflowRunClientbuilder.buildClient(); + + WorkflowTasksClientBuilder workflowTasksClientbuilder = new WorkflowTasksClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + workflowTasksClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + workflowTasksClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + workflowTasksClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + workflowTasksClient = workflowTasksClientbuilder.buildClient(); + + WorkflowTaskClientBuilder workflowTaskClientbuilder = new WorkflowTaskClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + workflowTaskClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + workflowTaskClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + workflowTaskClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + workflowTaskClient = workflowTaskClientbuilder.buildClient(); + + ApprovalClientBuilder approvalClientbuilder + = new ApprovalClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + approvalClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + approvalClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + approvalClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + approvalClient = approvalClientbuilder.buildClient(); + + TaskStatusClientBuilder taskStatusClientbuilder + = new TaskStatusClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.PLAYBACK) { + taskStatusClientbuilder.credential(new MockTokenCredential()); + } else if (getTestMode() == TestMode.RECORD) { + taskStatusClientbuilder.addPolicy(interceptorManager.getRecordPolicy()) + .credential(new DefaultAzureCredentialBuilder().build()); + } else if (getTestMode() == TestMode.LIVE) { + taskStatusClientbuilder.credential(new DefaultAzureCredentialBuilder().build()); + } + taskStatusClient = taskStatusClientbuilder.buildClient(); + + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/TaskRequestUpdateTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/TaskRequestUpdateTests.java new file mode 100644 index 000000000000..9bef5e2beff0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/TaskRequestUpdateTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class TaskRequestUpdateTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testTaskRequestUpdateTests() { + BinaryData taskUpdateCommand = BinaryData.fromString("{\"comment\":\"Thanks!\",\"newStatus\":\"InProgress\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = taskStatusClient.updateWithResponse("d5bd0215-df84-4245-8e18-3a8f012be376", + taskUpdateCommand, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/UserRequestsSubmitTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/UserRequestsSubmitTests.java new file mode 100644 index 000000000000..42d51d7c82cb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/UserRequestsSubmitTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class UserRequestsSubmitTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testUserRequestsSubmitTests() { + BinaryData userRequestsPayload = BinaryData.fromString( + "{\"comment\":\"Thanks!\",\"operations\":[{\"type\":\"CreateTerm\",\"payload\":{\"glossaryTerm\":{\"name\":\"term\",\"anchor\":{\"glossaryGuid\":\"20031e20-b4df-4a66-a61d-1b0716f3fa48\"},\"nickName\":\"term\",\"status\":\"Approved\"}}}]}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = userRequestsClient.submitWithResponse(userRequestsPayload, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"comment\":\"Thanks!\",\"requestId\":\"26026374-f2f6-4627-b2f4-ba2db93c7e2c\",\"requestor\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"status\":\"InProgress\",\"operations\":[{\"type\":\"CreateTerm\",\"payload\":{\"glossaryTerm\":{\"name\":\"term\",\"anchor\":{\"glossaryGuid\":\"20031e20-b4df-4a66-a61d-1b0716f3fa48\"},\"nickName\":\"term\",\"status\":\"Approved\"}},\"workflowRunIds\":[\"26026374-f2f6-4627-b2f4-ba2db93c7e2c\"]}]}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkTaskGetTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkTaskGetTests.java new file mode 100644 index 000000000000..74f35172d23d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkTaskGetTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkTaskGetTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkTaskGetTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = workflowTaskClient.getWithResponse("98d98e2c-23fa-4157-a3f8-ff8ce5cc095c", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"Approval\",\"approvalDetail\":{\"approvalType\":\"PendingOnAll\",\"approvers\":{\"eece94d9-0619-4669-bb8a-d6ecec5220bc\":{\"comment\":\"Thanks!\",\"reply\":\"Approved\",\"responseTime\":\"2023-02-06T09:57:46.056708512Z\"}},\"status\":\"Pending\"},\"createdTime\":\"2023-01-13T09:57:59.878107314Z\",\"expiryInfo\":{\"expirySettings\":{\"expireAfter\":{\"Month\":{\"number\":1}},\"notifyOnExpiration\":[]},\"expiryTime\":\"2023-02-12T09:57:59.878107314Z\",\"nextExpiryNotificationTime\":\"2023-02-12T09:57:59.878107314Z\"},\"id\":\"54b7ccdb-0b09-427e-8105-61a8dd4b1309\",\"lastUpdateTime\":\"2023-01-13T09:58:08.034872193Z\",\"payload\":{\"type\":\"CreateTerm\",\"payload\":{\"glossaryTerm\":{\"name\":\"term\",\"anchor\":{\"glossaryGuid\":\"20031e20-b4df-4a66-a61d-1b0716f3fa48\"},\"attributes\":{},\"nickName\":\"term\",\"status\":\"Approved\"}},\"targetValue\":\"term\"},\"reminderInfo\":{\"lastRemindTime\":\"2023-01-16T09:57:59.878107314Z\",\"nextRemindTime\":\"2023-01-18T09:57:59.878107314Z\",\"reminderSettings\":{\"reminderFrequency\":{\"Day\":{\"number\":1}}}},\"requestor\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"title\":\"Approval Request for Create Glossary Term\",\"workflowId\":\"3fb9ba13-bf35-4f29-ab63-70b5234923c2\",\"workflowRunId\":\"2245c5e1-63d0-436a-b1c0-8252f03f0e17\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowCreateOrUpdateTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowCreateOrUpdateTests.java new file mode 100644 index 000000000000..ac0261f4a93e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowCreateOrUpdateTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkflowCreateOrUpdateTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkflowCreateOrUpdateTests() { + BinaryData workflowCreateOrUpdateCommand = BinaryData.fromString( + "{\"name\":\"Create glossary term workflow\",\"description\":\"\",\"actionDag\":{\"actions\":{\"Condition\":{\"type\":\"If\",\"actions\":{\"Create glossary term\":{\"type\":\"CreateTerm\",\"runAfter\":{}},\"Send email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{runInput()['term']['name']} is approved.\",\"emailRecipients\":[\"@{runInput()['requestor']}\"],\"emailSubject\":\"Glossary Term Create - APPROVED\"}},\"runAfter\":{\"Create glossary term\":[\"Succeeded\"]}}},\"else\":{\"actions\":{\"Send reject email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{runInput()['term']['name']} is rejected.\",\"emailRecipients\":[\"@{runInput()['requestor']}\"],\"emailSubject\":\"Glossary Term Create - REJECTED\"}},\"runAfter\":{}}}},\"expression\":{\"and\":[{\"equals\":[\"@{outputs('Start and wait for an approval')['outcome']}\",\"Approved\"]}]},\"runAfter\":{\"Start and wait for an approval\":[\"Succeeded\"]}},\"Start and wait for an approval\":{\"type\":\"Approval\",\"inputs\":{\"parameters\":{\"approvalType\":\"PendingOnAll\",\"assignedTo\":[\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"],\"title\":\"Approval Request for Create Glossary Term\"}},\"runAfter\":{}}}},\"isEnabled\":true,\"triggers\":[{\"type\":\"when_term_creation_is_requested\",\"underGlossaryHierarchy\":\"/glossaries/20031e20-b4df-4a66-a61d-1b0716f3fa48\"}]}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = workflowClient.createOrReplaceWithResponse( + "4afb5752-e47f-43a1-8ba7-c696bf8d2745", workflowCreateOrUpdateCommand, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"Create glossary term workflow\",\"description\":\"\",\"actionDag\":{\"actions\":{\"Condition\":{\"type\":\"If\",\"actions\":{\"Create glossary term\":{\"type\":\"CreateTerm\",\"runAfter\":{}},\"Send email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{runInput()['term']['name']} is approved.\",\"emailRecipients\":[\"@{runInput()['requestor']}\"],\"emailSubject\":\"Glossary Term Create - APPROVED\"}},\"runAfter\":{\"Create glossary term\":[\"Succeeded\"]},\"runtimeConfiguration\":{\"secureInput\":false,\"secureOutput\":false}}},\"else\":{\"actions\":{\"Send reject email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{runInput()['term']['name']} is rejected.\",\"emailRecipients\":[\"@{runInput()['requestor']}\"],\"emailSubject\":\"Glossary Term Create - REJECTED\"}},\"runAfter\":{},\"runtimeConfiguration\":{\"secureInput\":false,\"secureOutput\":false}}}},\"expression\":{\"and\":[{\"equals\":[\"@{outputs('Start and wait for an approval')['outcome']}\",\"Approved\"]}]},\"runAfter\":{\"Start and wait for an approval\":[\"Succeeded\"]}},\"Start and wait for an approval\":{\"type\":\"Approval\",\"inputs\":{\"parameters\":{\"approvalType\":\"PendingOnAll\",\"assignedTo\":[\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"],\"title\":\"Approval Request for Create Glossary Term\"}},\"runAfter\":{}}}},\"createdBy\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"createdTime\":\"2023-01-11T07:05:22.812901453Z\",\"id\":\"179682a4-917d-11ed-a1eb-0242ac120002\",\"isEnabled\":true,\"lastUpdateTime\":\"2023-01-11T07:05:22.812901453Z\",\"triggers\":[{\"type\":\"when_term_creation_is_requested\",\"underGlossaryHierarchy\":\"/glossaries/20031e20-b4df-4a66-a61d-1b0716f3fa48\"}],\"updatedBy\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowDeleteTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowDeleteTests.java new file mode 100644 index 000000000000..5077c172426c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowDeleteTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkflowDeleteTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkflowDeleteTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = workflowClient.deleteWithResponse("4afb5752-e47f-43a1-8ba7-c696bf8d2745", requestOptions); + Assertions.assertEquals(204, response.getStatusCode()); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowGetTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowGetTests.java new file mode 100644 index 000000000000..2c0ea6743cdd --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowGetTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkflowGetTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkflowGetTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = workflowClient.getWithResponse("d503b2d2-84da-4a85-9e85-6e82e39d59a0", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"Create glossary term\",\"description\":\"\",\"actionDag\":{\"actions\":{\"Condition\":{\"type\":\"If\",\"actions\":{\"Create glossary term\":{\"type\":\"CreateTerm\",\"runAfter\":{}},\"Send email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{triggerBody()['request']['term']['name']} is approved.\",\"emailRecipients\":[\"@{triggerBody()['request']['requestor']}\"],\"emailSubject\":\"Glossary Term Create - APPROVED\"}},\"runAfter\":{\"Create glossary term\":[\"Succeeded\"]},\"runtimeConfiguration\":{\"secureInput\":false,\"secureOutput\":false}}},\"else\":{\"actions\":{\"Send reject email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{triggerBody()['request']['term']['name']} is rejected.\",\"emailRecipients\":[\"@{triggerBody()['request']['requestor']}\"],\"emailSubject\":\"Glossary Term Create - REJECTED\"}},\"runAfter\":{},\"runtimeConfiguration\":{\"secureInput\":false,\"secureOutput\":false}}}},\"expression\":{\"and\":[{\"equals\":[\"@outputs('Start and wait for an approval')['body/outcome']\",\"Approved\"]}]},\"runAfter\":{\"Start and wait for an approval\":[\"Succeeded\"]}},\"Start and wait for an approval\":{\"type\":\"Approval\",\"inputs\":{\"parameters\":{\"approvalType\":\"PendingOnAll\",\"assignedTo\":[\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"],\"title\":\"Approval Request for Create Glossary Term\"}},\"runAfter\":{}}}},\"createdBy\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"createdTime\":\"2023-01-11T10:14:45.485999448Z\",\"id\":\"773b326e-751c-4277-96a6-c4f522e9750f\",\"isEnabled\":true,\"lastUpdateTime\":\"2023-01-11T10:14:45.485999448Z\",\"triggers\":[{\"type\":\"when_term_creation_is_requested\"}],\"updatedBy\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunCancelTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunCancelTests.java new file mode 100644 index 000000000000..3289f063d609 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunCancelTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkflowRunCancelTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkflowRunCancelTests() { + BinaryData runCancelReply = BinaryData.fromString("{\"comment\":\"Thanks!\"}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = workflowRunClient.cancelWithResponse("b7aaf54b-59c2-4a0e-a7d0-f431044f2198", + runCancelReply, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunGetTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunGetTests.java new file mode 100644 index 000000000000..630c0535f013 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunGetTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkflowRunGetTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkflowRunGetTests() { + RequestOptions requestOptions = new RequestOptions(); + Response response + = workflowRunClient.getWithResponse("04334a74-3400-11ed-a261-0242ac120002", requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"actionDag\":{\"actions\":{\"Condition\":{\"type\":\"If\",\"actions\":{\"Create glossary term\":{\"type\":\"CreateTerm\",\"runAfter\":{}},\"Send email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{triggerBody()['request']['term']['name']} is approved.\",\"emailRecipients\":[\"@{triggerBody()['request']['requestor']}\"],\"emailSubject\":\"Glossary Term Create - APPROVED\"}},\"runAfter\":{\"Create glossary term\":[\"Succeeded\"]},\"runtimeConfiguration\":{\"secureInput\":false,\"secureOutput\":false}}},\"else\":{\"actions\":{\"Send reject email notification\":{\"type\":\"EmailNotification\",\"inputs\":{\"parameters\":{\"emailMessage\":\"Your request for Glossary Term @{triggerBody()['request']['term']['name']} is rejected.\",\"emailRecipients\":[\"@{triggerBody()['request']['requestor']}\"],\"emailSubject\":\"Glossary Term Create - REJECTED\"}},\"runAfter\":{},\"runtimeConfiguration\":{\"secureInput\":false,\"secureOutput\":false}}}},\"expression\":{\"and\":[{\"equals\":[\"@outputs('Start and wait for an approval')['body/outcome']\",\"Approved\"]}]},\"runAfter\":{\"Start and wait for an approval\":[\"Succeeded\"]}},\"Start and wait for an approval\":{\"type\":\"Approval\",\"inputs\":{\"parameters\":{\"approvalType\":\"PendingOnAll\",\"assignedTo\":[\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"],\"expirySettings\":{\"expireAfter\":\"1 month\",\"notifyOnExpiration\":[]},\"reminderSettings\":{\"interval\":\"1 day\"},\"title\":\"Approval Request for Create Glossary Term\"}},\"runAfter\":{}}}},\"detail\":{\"actions\":{\"Start and wait for an approval\":{\"input\":{\"type\":\"inlined\",\"parameters\":{\"approvalType\":\"PendingOnAll\",\"assignedTo\":[\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"],\"expirySettings\":{\"expireAfter\":\"1 month\",\"notifyOnExpiration\":[]},\"reminderSettings\":{\"interval\":\"1 day\"},\"title\":\"Approval Request for Create Glossary Term\"}},\"startTime\":\"2023-01-12T09:36:12.347229300Z\",\"status\":\"Running\"}},\"runInput\":{\"request\":{\"requestor\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"term\":{\"name\":\"term123\",\"definition\":null,\"experts\":[],\"formalName\":\"term123\",\"parent\":null,\"stewards\":[]}}}},\"id\":\"4f8d70c3-c09b-4e56-bfd1-8b86c79bd4d9\",\"requestor\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"runPayload\":{\"type\":\"CreateTerm\",\"payload\":{\"glossaryTerm\":{\"name\":\"term123\",\"anchor\":{\"glossaryGuid\":\"20031e20-b4df-4a66-a61d-1b0716f3fa48\"},\"attributes\":{},\"nickName\":\"term123\",\"status\":\"Approved\"}},\"targetValue\":\"term123\"},\"startTime\":\"2023-01-12T09:36:11.533263721Z\",\"status\":\"InProgress\",\"workflowId\":\"3fb9ba13-bf35-4f29-ab63-70b5234923c2\"}") + .toObject(Object.class), response.getValue().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunsListTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunsListTests.java new file mode 100644 index 000000000000..a49e29619408 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowRunsListTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkflowRunsListTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkflowRunsListTests() { + RequestOptions requestOptions = new RequestOptions().addQueryParam("maxpagesize", "1000") + .addQueryParam("orderby", "startTime desc") + .addQueryParam("timeWindow", "30d"); + PagedIterable response = workflowRunsClient.list(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"id\":\"4f8d70c3-c09b-4e56-bfd1-8b86c79bd4d9\",\"requestor\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"runPayload\":{\"type\":\"CreateTerm\",\"targetValue\":\"term123\"},\"startTime\":\"2023-01-12T09:36:11.533263721Z\",\"status\":\"InProgress\",\"userRequestId\":\"4f8d70c3-c09b-4e56-bfd1-8b86c79bd4d9\",\"workflowId\":\"3fb9ba13-bf35-4f29-ab63-70b5234923c2\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowTaskReassignTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowTaskReassignTests.java new file mode 100644 index 000000000000..18c2b646e6bd --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowTaskReassignTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkflowTaskReassignTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkflowTaskReassignTests() { + BinaryData reassignCommand = BinaryData.fromString( + "{\"reassignments\":[{\"reassignFrom\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"reassignTo\":\"7645223c-cdca-43e9-98c8-bd4d97e79e5e\"}]}"); + RequestOptions requestOptions = new RequestOptions(); + Response response = workflowTaskClient.reassignWithResponse("11b0244b-70ea-4c6b-9d28-08f52de40f2f", + reassignCommand, requestOptions); + Assertions.assertEquals(200, response.getStatusCode()); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowTasksListTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowTasksListTests.java new file mode 100644 index 000000000000..297287f8422a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowTasksListTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkflowTasksListTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkflowTasksListTests() { + RequestOptions requestOptions = new RequestOptions().addQueryParam("maxpagesize", "1000") + .addQueryParam("orderby", "createdTime desc") + .addQueryParam("timeWindow", "30d") + .addQueryParam("viewMode", "sent"); + PagedIterable response = workflowTasksClient.list(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"type\":\"Approval\",\"approvalDetail\":{\"approvalType\":\"PendingOnAll\",\"approvers\":{\"eece94d9-0619-4669-bb8a-d6ecec5220bc\":{\"reply\":\"Pending\"}},\"status\":\"Pending\"},\"createdTime\":\"2023-01-18T06:53:15.205196688Z\",\"expiryInfo\":{\"expirySettings\":{\"expireAfter\":{\"Month\":{\"number\":1}},\"notifyOnExpiration\":[]},\"expiryTime\":\"2023-02-17T06:53:15.205196688Z\",\"nextExpiryNotificationTime\":\"2023-02-17T06:53:15.205196688Z\"},\"id\":\"3aec5deb-b819-499c-afe0-b742255c0577\",\"lastUpdateTime\":\"2023-01-18T06:53:23.159652782Z\",\"payload\":{\"type\":\"CreateTerm\",\"targetValue\":\"term\"},\"reminderInfo\":{\"nextRemindTime\":\"2023-01-19T06:53:15.205196688Z\",\"reminderSettings\":{\"reminderFrequency\":{\"Day\":{\"number\":1}}}},\"requestor\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"title\":\"Approval Request for Create Glossary Term\",\"workflowId\":\"3fb9ba13-bf35-4f29-ab63-70b5234923c2\",\"workflowRunId\":\"26026374-f2f6-4627-b2f4-ba2db93c7e2c\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowsListTests.java b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowsListTests.java new file mode 100644 index 000000000000..1e3bf8efc355 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/src/test/java/com/azure/analytics/purview/workflow/generated/WorkflowsListTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.purview.workflow.generated; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public final class WorkflowsListTests extends PurviewWorkflowClientTestBase { + @Test + @Disabled + public void testWorkflowsListTests() { + RequestOptions requestOptions = new RequestOptions(); + PagedIterable response = workflowsClient.list(requestOptions); + Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode()); + Assertions.assertEquals(BinaryData.fromString( + "{\"name\":\"Create glossary term\",\"description\":\"\",\"createdBy\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\",\"createdTime\":\"2023-01-11T10:14:45.485999448Z\",\"id\":\"773b326e-751c-4277-96a6-c4f522e9750f\",\"isEnabled\":true,\"lastUpdateTime\":\"2023-01-11T10:14:45.485999448Z\",\"triggers\":[{\"type\":\"when_term_creation_is_requested\"}],\"updatedBy\":\"eece94d9-0619-4669-bb8a-d6ecec5220bc\"}") + .toObject(Object.class), response.iterator().next().toObject(Object.class)); + } +} diff --git a/sdk/purview/azure-analytics-purview-workflow/swagger/README.md b/sdk/purview/azure-analytics-purview-workflow/swagger/README.md new file mode 100644 index 000000000000..1e81a535de59 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-workflow/swagger/README.md @@ -0,0 +1,18 @@ +## Generate autorest code + +```yaml +input-file: +- https://github.com/Azure/azure-rest-api-specs/blob/afa158ef56a05f6603924f4a493817cec332b113/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2023-10-01-preview/purviewWorkflow.json +output-folder: ../ +java: true +use: '@autorest/java@4.1.62' +title: PurviewWorkflow +security-scopes: https://purview.azure.net/.default +data-plane: true +generate-tests: true +artifact-id: azure-analytics-purview-workflow +generate-samples: true +namespace: com.azure.analytics.purview.workflow +service-versions: +- 2023-10-01-preview +``` diff --git a/sdk/purview/ci.yml b/sdk/purview/ci.yml index 579d4f7806e0..98c12a1cb62b 100644 --- a/sdk/purview/ci.yml +++ b/sdk/purview/ci.yml @@ -11,7 +11,11 @@ trigger: - sdk/purview/ exclude: - sdk/purview/pom.xml + - sdk/purview/azure-analytics-purview-administration/pom.xml - sdk/purview/azure-analytics-purview-datamap/pom.xml + - sdk/purview/azure-analytics-purview-scanning/pom.xml + - sdk/purview/azure-analytics-purview-sharing/pom.xml + - sdk/purview/azure-analytics-purview-workflow/pom.xml - sdk/purview/azure-resourcemanager-purview/pom.xml pr: @@ -26,30 +30,66 @@ pr: - sdk/purview/ exclude: - sdk/purview/pom.xml + - sdk/purview/azure-analytics-purview-administration/pom.xml - sdk/purview/azure-analytics-purview-datamap/pom.xml + - sdk/purview/azure-analytics-purview-scanning/pom.xml + - sdk/purview/azure-analytics-purview-sharing/pom.xml + - sdk/purview/azure-analytics-purview-workflow/pom.xml - sdk/purview/azure-resourcemanager-purview/pom.xml parameters: + - name: release_azureanalyticspurviewadministration + displayName: azure-analytics-purview-administration + type: boolean + default: true - name: release_azureanalyticspurviewdatamap displayName: azure-analytics-purview-datamap type: boolean default: true + - name: release_azureanalyticspurviewscanning + displayName: azure-analytics-purview-scanning + type: boolean + default: true - name: release_azureresourcemanagerpurview displayName: azure-resourcemanager-purview type: boolean default: false + - name: release_azureanalyticspurviewsharing + displayName: azure-analytics-purview-sharing + type: boolean + default: true + - name: release_azureanalyticspurviewworkflow + displayName: azure-analytics-purview-workflow + type: boolean + default: true extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: purview Artifacts: + - name: azure-analytics-purview-administration + groupId: com.azure + safeName: azureanalyticspurviewadministration + releaseInBatch: ${{ parameters.release_azureanalyticspurviewadministration }} - name: azure-analytics-purview-datamap groupId: com.azure safeName: azureanalyticspurviewdatamap releaseInBatch: ${{ parameters.release_azureanalyticspurviewdatamap }} + - name: azure-analytics-purview-scanning + groupId: com.azure + safeName: azureanalyticspurviewscanning + releaseInBatch: ${{ parameters.release_azureanalyticspurviewscanning }} - name: azure-resourcemanager-purview groupId: com.azure.resourcemanager safeName: azureresourcemanagerpurview releaseInBatch: ${{ parameters.release_azureresourcemanagerpurview }} + - name: azure-analytics-purview-sharing + groupId: com.azure + safeName: azureanalyticspurviewsharing + releaseInBatch: ${{ parameters.release_azureanalyticspurviewsharing }} + - name: azure-analytics-purview-workflow + groupId: com.azure + safeName: azureanalyticspurviewworkflow + releaseInBatch: ${{ parameters.release_azureanalyticspurviewworkflow }} diff --git a/sdk/purview/pom.xml b/sdk/purview/pom.xml index 092e543ace09..8db543523d65 100644 --- a/sdk/purview/pom.xml +++ b/sdk/purview/pom.xml @@ -9,7 +9,11 @@ pom 1.0.0 + azure-analytics-purview-administration azure-analytics-purview-datamap + azure-analytics-purview-scanning + azure-analytics-purview-sharing + azure-analytics-purview-workflow azure-resourcemanager-purview
      diff --git a/sdk/quantum/azure-quantum-jobs/CHANGELOG.md b/sdk/quantum/azure-quantum-jobs/CHANGELOG.md new file mode 100644 index 000000000000..e83b6dc544db --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/CHANGELOG.md @@ -0,0 +1,9 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + + +## 1.0.0-beta.1 (2021-02-02) + +### New features +Initial release of azure-quantum-jobs. See [Getting Started](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/quantum/azure-quantum-jobs/README.md#getting-started) for more details. diff --git a/sdk/quantum/azure-quantum-jobs/README.md b/sdk/quantum/azure-quantum-jobs/README.md new file mode 100644 index 000000000000..a28399de73cd --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/README.md @@ -0,0 +1,229 @@ +# Azure Quantum Jobs client library for Java + +Azure Quantum is a Microsoft Azure service that you can use to run quantum computing programs in the cloud. Using the Azure Quantum tools and SDKs, you can create quantum programs and run them against different quantum simulators and machines. You can use the Azure.Quantum.Jobs client library to: +- Create, enumerate, and cancel quantum jobs +- Enumerate provider status and quotas + + +[Source code][source] | [API reference documentation](https://azure.github.io/azure-sdk-for-java/) | [Product documentation](https://learn.microsoft.com/azure/quantum/) | [Samples][samples] + +## Getting started + +This section should include everything a developer needs to do to install and create their first client connection *very quickly*. + +### Install the package + +Install the Azure Quantum Jobs client library for Java by adding the following to your pom.xml file: + +[//]: # ({x-version-update-start;com.azure:azure-quantum-jobs;current}) +```xml + + com.azure + azure-quantum-jobs + 1.0.0-beta.2 + +``` +[//]: # ({x-version-update-end}) + +**Prerequisites**: You must have an [Azure subscription][azure_subscription], [Azure Quantum workspace][azure_quantum_workspaces], [Azure storage account][azure_storage], and a [Java Development Kit (JDK)][jdk_link] of version 8 or later. + +### Authenticate the client + +To authenticate with the service, you will have to pass a [`TokenCredential`][token-credential] to the client builder as described [below](#create-the-client). + +`TokenCredential` is the default Authentication mechanism used by Azure SDKs. + +## Key concepts + +`QuantumJobClient` is the root class to be used to authenticate and create, enumerate, and cancel jobs. + +`JobDetails` contains all the properties of a job. + +`ProviderStatus` contains status information for a provider. + +`QuantumJobQuota` contains quota properties. + +## Examples + +* [Create the client](#create-the-client) +* [Get Container SAS URI](#get-container-sas-uri) +* [Upload Input Data](#upload-input-data) +* [Create The Job](#create-the-job) +* [Get Job](#get-job) +* [List Jobs](#list-jobs) + +### Create the client + +Create an instance of the client of your choice by passing the following values to `QuantumClientBuilder` and then calling the appropriate build method. +- [Subscription][subscriptions] - looks like XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX and can be found in your list of subscriptions on azure +- [Resource Group][resource-groups] - a container that holds related resources for an Azure solution +- [Workspace][workspaces] - a collection of assets associated with running quantum +- [Host][location] - the host endpoint is "https://{location}.quantum.azure.com". Choose the best data center location by geographical region +- [StorageContainerName][blob-storage] - your blob storage +- [Credential][credentials] - used to authenticate + +```java readme-sample-getClients +JobsClient jobsClient = new QuantumClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .host("{endpoint}") + .subscriptionId("{subscriptionId}") + .resourceGroupName("{resourceGroup}") + .workspaceName("{workspaceName}") + .buildJobsClient(); + +StorageClient storageClient = new QuantumClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .host("{endpoint}") + .subscriptionId("{subscriptionId}") + .resourceGroupName("{resourceGroup}") + .workspaceName("{workspaceName}") + .buildStorageClient(); +``` + +### Get Container SAS URI + +Create a storage container to put your data in. + +```java readme-sample-getContainerSasUri +// Get container URI with SAS key +String containerName = "{storageContainerName}"; + +// Create container if it doesn't already exist +BlobContainerClient containerClient = new BlobContainerClientBuilder() + .containerName(containerName) + .endpoint(containerUri) + .buildClient(); +if (!containerClient.exists()) { + containerClient.create(); +} + +// Get connection string to the container +String containerUri = storageClient.sasUri( + new BlobDetails().setContainerName(containerName) +).getSasUri(); +``` + +### Compile your quantum program into QIR + +This step can be done in multiple ways and it is not in scope for this sample. + +[Quantum Intermediate Representation (QIR)](https://github.com/qir-alliance/qir-spec) is a [QIR Alliance](https://www.qir-alliance.org/) specification to represent quantum programs within the [LLVM](https://llvm.org/) Intermediate Representation (IR). + +A few methods to compile or generate a quantum program into QIR: +- [Q# compiler](https://github.com/microsoft/qsharp-compiler/): Can be used to [compile Q# Code into QIR](https://github.com/microsoft/qsharp-compiler/tree/main/src/QsCompiler/QirGeneration). +- [PyQIR](https://github.com/qir-alliance/pyqir): PyQIR is a set of APIs for generating, parsing, and evaluating Quantum Intermediate Representation (QIR). +- [IQ#](https://github.com/microsoft/iqsharp): Can be used to compile a Q# program into QIR with the [%qir](https://learn.microsoft.com/qsharp/api/iqsharp-magic/qir) magic command. + +In this sample, we assume you already have a file with the QIR bitcode and you know the method name that you want to execute (entry point). + +We will use the QIR bitcode sample (`BellState.bc` in the samples folde), compiled a Q# code (`BellState.qs` in the samples folder) targeting the `quantinuum.sim.h1-1e` target, with `AdaptiveExecution` target capability. + +### Upload Input Data + +Using the SAS URI, upload the QIR bitcode input data to the blob client. + +```java readme-sample-uploadInputData +// Get input data blob Uri with SAS key +String blobName = "{blobName}"; +BlobDetails blobDetails = new BlobDetails() + .setContainerName(containerName) + .setBlobName(blobName); +BlobHttpHeaders blobHttpHeaders = new BlobHttpHeaders() + .setContentType("qir.v1"); +String inputDataUri = storageClient.sasUri(blobDetails).getSasUri(); + +// Upload input data to blob +BlobClient blobClient = new BlobClientBuilder() + .endpoint(inputDataUri) + .buildClient(); +String qirFilePath = FileSystems.getDefault().getPath("src/samples/java/com/azure/quantum/jobs/BellState.bc").toString(); +blobClient.uploadFromFile(qirFilePath, null, blobHttpHeaders, null, null, null, null); +``` + +### Create The Job + +Now that you've uploaded your QIR program bitcode to Azure Storage, you can use the `create()` method in `JobsClient` or `JobsAsyncClient`, or the `createWithResponse()` method in `JobsAsyncClient` to submit an Azure Quantum job. + +```java readme-sample-createTheJob +String jobId = String.format("job-%s", UUID.randomUUID()); +Map inputParams = new HashMap(); +inputParams.put("entryPoint", "ENTRYPOINT__BellState"); +inputParams.put("arguments", new ArrayList()); +inputParams.put("targetCapability", "AdaptiveExecution"); +JobDetails createJobDetails = new JobDetails() + .setContainerUri(containerUri) + .setId(jobId) + .setInputDataFormat("qir.v1") + .setOutputDataFormat("microsoft.quantum-results.v1") + .setProviderId("quantinuum") + .setTarget("quantinuum.sim.h1-1e") + .setName("{jobName}") + .setInputParams(inputParams); +JobDetails jobDetails = jobsClient.create(jobId, createJobDetails); +``` + +### Get Job + +To retrieve a specific job by its ID, you can use `get()` from `JobsClient` or `JobsAsyncClient`, or `getWithResponse()` in `JobsAsyncClient`. + +```java readme-sample-getJob +// Get the job that we've just created based on its jobId +JobDetails myJob = jobsClient.get(jobId); +``` + +### List Jobs + +To enumerate all the jobs in the workspace, use the `list()` method from `JobClient` or `JobAsyncClient`, or from `JobAsyncClient` use `listSinglePage()` or `listNextPage()`. + +```java readme-sample-listJobs +PagedIterable jobs = jobsClient.list(); +jobs.forEach(job -> System.out.println(job.getName())); +``` + +## Troubleshooting + +All Quantum Jobs service operations will throw a RequestFailedException on failure with helpful ErrorCodes. Many of these errors are recoverable. + +## Next steps + +* Visit our [Product documentation](https://learn.microsoft.com/azure/quantum/) to learn more about Azure Quantum. + +## Contributing + +See the [CONTRIBUTING.md][contributing] for details on building, +testing, and contributing to this library. + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. For +details, visit [cla.microsoft.com][cla]. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. +For more information see the [Code of Conduct FAQ][coc_faq] +or contact [opencode@microsoft.com][coc_contact] with any +additional questions or comments. + + +[source]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/quantum/azure-quantum-jobs/src +[style-guide-msft]: https://learn.microsoft.com/style-guide/capitalization +[token-credential]: https://learn.microsoft.com/dotnet/api/azure.core.tokencredential?view=azure-dotnet +[resource-groups]: https://learn.microsoft.com/azure/azure-resource-manager/management/manage-resource-groups-portal +[workspaces]: https://learn.microsoft.com/azure/quantum/how-to-create-quantum-workspaces-with-the-azure-portal +[location]: https://azure.microsoft.com/global-infrastructure/services/?products=quantum +[blob-storage]: https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction +[contributing]: https://github.com/Azure/azure-sdk-for-java/tree/main/CONTRIBUTING.md +[subscriptions]: https://ms.portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade +[credentials]: https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme#credentials +[style-guide-msft]: https://learn.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide +[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable +[azure_subscription]: https://azure.microsoft.com/free +[azure_quantum]: https://azure.microsoft.com/services/quantum/ +[azure_quantum_workspaces]: https://learn.microsoft.com/azure/quantum/how-to-create-quantum-workspaces-with-the-azure-portal +[azure_storage]: https://azure.microsoft.com/free/storage/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_contact]: mailto:opencode@microsoft.com +[samples]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs + + diff --git a/sdk/quantum/azure-quantum-jobs/assets.json b/sdk/quantum/azure-quantum-jobs/assets.json new file mode 100644 index 000000000000..c5868f0894c0 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/quantum/azure-quantum-jobs", + "Tag": "java/quantum/azure-quantum-jobs_33923fceea" +} diff --git a/sdk/quantum/azure-quantum-jobs/checkstyle-suppressions.xml b/sdk/quantum/azure-quantum-jobs/checkstyle-suppressions.xml new file mode 100644 index 000000000000..36d3b81c195e --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/checkstyle-suppressions.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/quantum/azure-quantum-jobs/pom.xml b/sdk/quantum/azure-quantum-jobs/pom.xml new file mode 100644 index 000000000000..ef412a3a10ed --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-quantum-jobs + 1.0.0-beta.2 + + Microsoft Azure client library for Azure Quantum service + This package contains the Microsoft Azure Quantum SDK. + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + 0.10 + + --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + --add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + + + false + + + + + com.azure + azure-json + 1.5.1 + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + com.azure + azure-storage-blob + 12.36.0 + test + + + diff --git a/sdk/quantum/azure-quantum-jobs/spotbugs-exclude.xml b/sdk/quantum/azure-quantum-jobs/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/JobsAsyncClient.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/JobsAsyncClient.java new file mode 100644 index 000000000000..6b4752b3529b --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/JobsAsyncClient.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.Response; +import com.azure.quantum.jobs.implementation.JobsImpl; +import com.azure.quantum.jobs.models.JobDetails; +import com.azure.quantum.jobs.models.RestErrorException; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the asynchronous QuantumClient type. */ +@ServiceClient(builder = QuantumClientBuilder.class, isAsync = true) +public final class JobsAsyncClient { + private final JobsImpl serviceClient; + + /** + * Initializes an instance of Jobs client. + * + * @param serviceClient the service client implementation. + */ + JobsAsyncClient(JobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List jobs. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of job details. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public Mono> listSinglePage() { + return this.serviceClient.listSinglePageAsync(); + } + + /** + * List jobs. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of job details. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list() { + return this.serviceClient.listAsync(); + } + + /** + * Get job by id. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String jobId) { + return this.serviceClient.getWithResponseAsync(jobId); + } + + /** + * Get job by id. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono get(String jobId) { + return this.serviceClient.getAsync(jobId); + } + + /** + * Create a job. + * + * @param jobId Id of the job. + * @param job The complete metadata of the job to submit. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponse(String jobId, JobDetails job) { + return this.serviceClient.createWithResponseAsync(jobId, job); + } + + /** + * Create a job. + * + * @param jobId Id of the job. + * @param job The complete metadata of the job to submit. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono create(String jobId, JobDetails job) { + return this.serviceClient.createAsync(jobId, job); + } + + /** + * Cancel a job. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelWithResponse(String jobId) { + return this.serviceClient.cancelWithResponseAsync(jobId); + } + + /** + * Cancel a job. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancel(String jobId) { + return this.serviceClient.cancelAsync(jobId); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of job details. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public Mono> listNextSinglePage(String nextLink) { + return this.serviceClient.listNextSinglePageAsync(nextLink); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/JobsClient.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/JobsClient.java new file mode 100644 index 000000000000..a4b3f7de913a --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/JobsClient.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.quantum.jobs.implementation.JobsImpl; +import com.azure.quantum.jobs.models.JobDetails; +import com.azure.quantum.jobs.models.RestErrorException; + +/** Initializes a new instance of the synchronous QuantumClient type. */ +@ServiceClient(builder = QuantumClientBuilder.class) +public final class JobsClient { + private final JobsImpl serviceClient; + + /** + * Initializes an instance of Jobs client. + * + * @param serviceClient the service client implementation. + */ + JobsClient(JobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List jobs. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of job details. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return this.serviceClient.list(); + } + + /** + * Get job by id. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobDetails get(String jobId) { + return this.serviceClient.get(jobId); + } + + /** + * Create a job. + * + * @param jobId Id of the job. + * @param job The complete metadata of the job to submit. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobDetails create(String jobId, JobDetails job) { + return this.serviceClient.create(jobId, job); + } + + /** + * Cancel a job. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancel(String jobId) { + this.serviceClient.cancel(jobId); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/ProvidersAsyncClient.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/ProvidersAsyncClient.java new file mode 100644 index 000000000000..e5103f4f5b9c --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/ProvidersAsyncClient.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedResponse; +import com.azure.quantum.jobs.implementation.ProvidersImpl; +import com.azure.quantum.jobs.models.ProviderStatus; +import com.azure.quantum.jobs.models.RestErrorException; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the asynchronous QuantumClient type. */ +@ServiceClient(builder = QuantumClientBuilder.class, isAsync = true) +public final class ProvidersAsyncClient { + private final ProvidersImpl serviceClient; + + /** + * Initializes an instance of Providers client. + * + * @param serviceClient the service client implementation. + */ + ProvidersAsyncClient(ProvidersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get provider status. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return provider status. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public Mono> getStatusSinglePage() { + return this.serviceClient.getStatusSinglePageAsync(); + } + + /** + * Get provider status. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return provider status. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getStatus() { + return this.serviceClient.getStatusAsync(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return providers status. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public Mono> getStatusNextSinglePage(String nextLink) { + return this.serviceClient.getStatusNextSinglePageAsync(nextLink); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/ProvidersClient.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/ProvidersClient.java new file mode 100644 index 000000000000..39c2e41c5e0a --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/ProvidersClient.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.quantum.jobs.implementation.ProvidersImpl; +import com.azure.quantum.jobs.models.ProviderStatus; +import com.azure.quantum.jobs.models.RestErrorException; + +/** Initializes a new instance of the synchronous QuantumClient type. */ +@ServiceClient(builder = QuantumClientBuilder.class) +public final class ProvidersClient { + private final ProvidersImpl serviceClient; + + /** + * Initializes an instance of Providers client. + * + * @param serviceClient the service client implementation. + */ + ProvidersClient(ProvidersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get provider status. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return provider status. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getStatus() { + return this.serviceClient.getStatus(); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuantumClientBuilder.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuantumClientBuilder.java new file mode 100644 index 000000000000..a514eae2d48c --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuantumClientBuilder.java @@ -0,0 +1,369 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.Configuration; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.quantum.jobs.implementation.QuantumClientImpl; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** A builder for creating a new instance of the QuantumClient type. */ +@ServiceClientBuilder( + serviceClients = { + JobsClient.class, + ProvidersClient.class, + StorageClient.class, + QuotasClient.class, + JobsAsyncClient.class, + ProvidersAsyncClient.class, + StorageAsyncClient.class, + QuotasAsyncClient.class }) +public final class QuantumClientBuilder { + private static final String SDK_NAME = "name"; + + private static final String SDK_VERSION = "version"; + + static final String[] DEFAULT_SCOPES = new String[] { "https://quantum.microsoft.com/.default" }; + + private final Map properties = new HashMap<>(); + + /** Create an instance of the QuantumClientBuilder. */ + public QuantumClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000) + */ + private String subscriptionId; + + /** + * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * + * @param subscriptionId the subscriptionId value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * Name of an Azure resource group. + */ + private String resourceGroupName; + + /** + * Sets Name of an Azure resource group. + * + * @param resourceGroupName the resourceGroupName value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder resourceGroupName(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + /* + * Name of the workspace. + */ + private String workspaceName; + + /** + * Sets Name of the workspace. + * + * @param workspaceName the workspaceName value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder workspaceName(String workspaceName) { + this.workspaceName = workspaceName; + return this; + } + + /* + * server parameter + */ + private String host; + + /** + * Sets server parameter. + * + * @param host the host value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder host(String host) { + this.host = host; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The HTTP client used to send the request. + */ + private HttpClient httpClient; + + /** + * Sets The HTTP client used to send the request. + * + * @param httpClient the httpClient value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The configuration store that is used during construction of the service + * client. + */ + private Configuration configuration; + + /** + * Sets The configuration store that is used during construction of the service client. + * + * @param configuration the configuration value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + private TokenCredential tokenCredential; + + /** + * Sets The TokenCredential used for authentication. + * + * @param tokenCredential the tokenCredential value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + private HttpLogOptions httpLogOptions; + + /** + * Sets The logging configuration for HTTP requests and responses. + * + * @param httpLogOptions the httpLogOptions value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if + * applicable. + */ + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /* + * The list of Http pipeline policies to add. + */ + private final List pipelinePolicies; + + /** + * Adds a custom Http pipeline policy. + * + * @param customPolicy The custom Http pipeline policy to add. + * @return the QuantumClientBuilder. + */ + public QuantumClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + pipelinePolicies.add(customPolicy); + return this; + } + + /** + * Builds an instance of QuantumClientImpl with the provided parameters. + * + * @return an instance of QuantumClientImpl. + */ + private QuantumClientImpl buildInnerClient() { + if (host == null) { + this.host = "https://quantum.azure.com"; + } + if (pipeline == null) { + this.pipeline = createHttpPipeline(); + } + if (serializerAdapter == null) { + this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); + } + QuantumClientImpl client = new QuantumClientImpl(pipeline, serializerAdapter, subscriptionId, resourceGroupName, + workspaceName, host); + return client; + } + + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + if (httpLogOptions == null) { + httpLogOptions = new HttpLogOptions(); + } + List policies = new ArrayList<>(); + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + policies + .add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); + policies.add(new CookiePolicy()); + policies.addAll(this.pipelinePolicies); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of JobsAsyncClient async client. + * + * @return an instance of JobsAsyncClient. + */ + public JobsAsyncClient buildJobsAsyncClient() { + return new JobsAsyncClient(buildInnerClient().getJobs()); + } + + /** + * Builds an instance of ProvidersAsyncClient async client. + * + * @return an instance of ProvidersAsyncClient. + */ + public ProvidersAsyncClient buildProvidersAsyncClient() { + return new ProvidersAsyncClient(buildInnerClient().getProviders()); + } + + /** + * Builds an instance of StorageAsyncClient async client. + * + * @return an instance of StorageAsyncClient. + */ + public StorageAsyncClient buildStorageAsyncClient() { + return new StorageAsyncClient(buildInnerClient().getStorages()); + } + + /** + * Builds an instance of QuotasAsyncClient async client. + * + * @return an instance of QuotasAsyncClient. + */ + public QuotasAsyncClient buildQuotasAsyncClient() { + return new QuotasAsyncClient(buildInnerClient().getQuotas()); + } + + /** + * Builds an instance of JobsClient sync client. + * + * @return an instance of JobsClient. + */ + public JobsClient buildJobsClient() { + return new JobsClient(buildInnerClient().getJobs()); + } + + /** + * Builds an instance of ProvidersClient sync client. + * + * @return an instance of ProvidersClient. + */ + public ProvidersClient buildProvidersClient() { + return new ProvidersClient(buildInnerClient().getProviders()); + } + + /** + * Builds an instance of StorageClient sync client. + * + * @return an instance of StorageClient. + */ + public StorageClient buildStorageClient() { + return new StorageClient(buildInnerClient().getStorages()); + } + + /** + * Builds an instance of QuotasClient sync client. + * + * @return an instance of QuotasClient. + */ + public QuotasClient buildQuotasClient() { + return new QuotasClient(buildInnerClient().getQuotas()); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuotasAsyncClient.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuotasAsyncClient.java new file mode 100644 index 000000000000..38d869d4e428 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuotasAsyncClient.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedResponse; +import com.azure.quantum.jobs.implementation.QuotasImpl; +import com.azure.quantum.jobs.models.Quota; +import com.azure.quantum.jobs.models.RestErrorException; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the asynchronous QuantumClient type. */ +@ServiceClient(builder = QuantumClientBuilder.class, isAsync = true) +public final class QuotasAsyncClient { + private final QuotasImpl serviceClient; + + /** + * Initializes an instance of Quotas client. + * + * @param serviceClient the service client implementation. + */ + QuotasAsyncClient(QuotasImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List quotas for the given workspace. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public Mono> listSinglePage() { + return this.serviceClient.listSinglePageAsync(); + } + + /** + * List quotas for the given workspace. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list() { + return this.serviceClient.listAsync(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public Mono> listNextSinglePage(String nextLink) { + return this.serviceClient.listNextSinglePageAsync(nextLink); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuotasClient.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuotasClient.java new file mode 100644 index 000000000000..cb0c84622cd7 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/QuotasClient.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.quantum.jobs.implementation.QuotasImpl; +import com.azure.quantum.jobs.models.Quota; +import com.azure.quantum.jobs.models.RestErrorException; + +/** Initializes a new instance of the synchronous QuantumClient type. */ +@ServiceClient(builder = QuantumClientBuilder.class) +public final class QuotasClient { + private final QuotasImpl serviceClient; + + /** + * Initializes an instance of Quotas client. + * + * @param serviceClient the service client implementation. + */ + QuotasClient(QuotasImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List quotas for the given workspace. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return this.serviceClient.list(); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/StorageAsyncClient.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/StorageAsyncClient.java new file mode 100644 index 000000000000..55a3198fb984 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/StorageAsyncClient.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.quantum.jobs.implementation.StoragesImpl; +import com.azure.quantum.jobs.models.BlobDetails; +import com.azure.quantum.jobs.models.RestErrorException; +import com.azure.quantum.jobs.models.SasUriResponse; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the asynchronous QuantumClient type. */ +@ServiceClient(builder = QuantumClientBuilder.class, isAsync = true) +public final class StorageAsyncClient { + private final StoragesImpl serviceClient; + + /** + * Initializes an instance of Storages client. + * + * @param serviceClient the service client implementation. + */ + StorageAsyncClient(StoragesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets a URL with SAS token for a container/blob in the storage account associated with the workspace. The SAS URL + * can be used to upload job input and/or download job output. + * + * @param blobDetails The details (name and container) of the blob to store or download data. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a URL with SAS token for a container/blob in the storage account associated with the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> sasUriWithResponse(BlobDetails blobDetails) { + return this.serviceClient.sasUriWithResponseAsync(blobDetails); + } + + /** + * Gets a URL with SAS token for a container/blob in the storage account associated with the workspace. The SAS URL + * can be used to upload job input and/or download job output. + * + * @param blobDetails The details (name and container) of the blob to store or download data. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a URL with SAS token for a container/blob in the storage account associated with the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono sasUri(BlobDetails blobDetails) { + return this.serviceClient.sasUriAsync(blobDetails); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/StorageClient.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/StorageClient.java new file mode 100644 index 000000000000..730af5345678 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/StorageClient.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.quantum.jobs.implementation.StoragesImpl; +import com.azure.quantum.jobs.models.BlobDetails; +import com.azure.quantum.jobs.models.RestErrorException; +import com.azure.quantum.jobs.models.SasUriResponse; + +/** Initializes a new instance of the synchronous QuantumClient type. */ +@ServiceClient(builder = QuantumClientBuilder.class) +public final class StorageClient { + private final StoragesImpl serviceClient; + + /** + * Initializes an instance of Storages client. + * + * @param serviceClient the service client implementation. + */ + StorageClient(StoragesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets a URL with SAS token for a container/blob in the storage account associated with the workspace. The SAS URL + * can be used to upload job input and/or download job output. + * + * @param blobDetails The details (name and container) of the blob to store or download data. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a URL with SAS token for a container/blob in the storage account associated with the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SasUriResponse sasUri(BlobDetails blobDetails) { + return this.serviceClient.sasUri(blobDetails); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/JobsImpl.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/JobsImpl.java new file mode 100644 index 000000000000..9369af89f2fa --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/JobsImpl.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.quantum.jobs.models.JobDetails; +import com.azure.quantum.jobs.models.JobDetailsList; +import com.azure.quantum.jobs.models.RestErrorException; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Jobs. */ +public final class JobsImpl { + /** The proxy service used to perform REST calls. */ + private final JobsService service; + + /** The service client containing this operation class. */ + private final QuantumClientImpl client; + + /** + * Initializes an instance of JobsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + JobsImpl(QuantumClientImpl client) { + this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for QuantumClientJobs to be used by the proxy service to perform REST + * calls. + */ + @Host("{$host}") + @ServiceInterface(name = "QuantumClientJobs") + private interface JobsService { + @Get("/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/jobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> list(@HostParam("$host") String host, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept); + + @Get("/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/jobs/{jobId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(RestErrorException.class) + Mono> get(@HostParam("$host") String host, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("jobId") String jobId, @HeaderParam("Accept") String accept); + + @Put("/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/jobs/{jobId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(RestErrorException.class) + Mono> create(@HostParam("$host") String host, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("jobId") String jobId, @BodyParam("application/json") JobDetails job, + @HeaderParam("Accept") String accept); + + @Delete("/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/jobs/{jobId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(RestErrorException.class) + Mono> cancel(@HostParam("$host") String host, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("jobId") String jobId, @HeaderParam("Accept") String accept); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String host, @HeaderParam("Accept") String accept); + } + + /** + * List jobs. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of job details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync() { + final String accept = "application/json"; + return service + .list(this.client.getHost(), this.client.getSubscriptionId(), this.client.getResourceGroupName(), + this.client.getWorkspaceName(), accept) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } + + /** + * List jobs. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of job details. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List jobs. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of job details. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Get job by id. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String jobId) { + final String accept = "application/json"; + return service.get(this.client.getHost(), this.client.getSubscriptionId(), this.client.getResourceGroupName(), + this.client.getWorkspaceName(), jobId, accept); + } + + /** + * Get job by id. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String jobId) { + return getWithResponseAsync(jobId).flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get job by id. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobDetails get(String jobId) { + return getAsync(jobId).block(); + } + + /** + * Create a job. + * + * @param jobId Id of the job. + * @param job The complete metadata of the job to submit. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponseAsync(String jobId, JobDetails job) { + final String accept = "application/json"; + return service.create(this.client.getHost(), this.client.getSubscriptionId(), + this.client.getResourceGroupName(), this.client.getWorkspaceName(), jobId, job, accept); + } + + /** + * Create a job. + * + * @param jobId Id of the job. + * @param job The complete metadata of the job to submit. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync(String jobId, JobDetails job) { + return createWithResponseAsync(jobId, job).flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create a job. + * + * @param jobId Id of the job. + * @param job The complete metadata of the job to submit. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobDetails create(String jobId, JobDetails job) { + return createAsync(jobId, job).block(); + } + + /** + * Cancel a job. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelWithResponseAsync(String jobId) { + final String accept = "application/json"; + return service.cancel(this.client.getHost(), this.client.getSubscriptionId(), + this.client.getResourceGroupName(), this.client.getWorkspaceName(), jobId, accept); + } + + /** + * Cancel a job. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelAsync(String jobId) { + return cancelWithResponseAsync(jobId).flatMap((Response res) -> Mono.empty()); + } + + /** + * Cancel a job. + * + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancel(String jobId) { + cancelAsync(jobId).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of job details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return service.listNext(nextLink, this.client.getHost(), accept) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/ProvidersImpl.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/ProvidersImpl.java new file mode 100644 index 000000000000..9faa378a62b3 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/ProvidersImpl.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.quantum.jobs.models.ProviderStatus; +import com.azure.quantum.jobs.models.ProviderStatusList; +import com.azure.quantum.jobs.models.RestErrorException; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Providers. */ +public final class ProvidersImpl { + /** The proxy service used to perform REST calls. */ + private final ProvidersService service; + + /** The service client containing this operation class. */ + private final QuantumClientImpl client; + + /** + * Initializes an instance of ProvidersImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProvidersImpl(QuantumClientImpl client) { + this.service + = RestProxy.create(ProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for QuantumClientProviders to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "QuantumClientProvide") + private interface ProvidersService { + @Get("/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/providerStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(RestErrorException.class) + Mono> getStatus(@HostParam("$host") String host, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(RestErrorException.class) + Mono> getStatusNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String host, @HeaderParam("Accept") String accept); + } + + /** + * Get provider status. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return provider status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getStatusSinglePageAsync() { + final String accept = "application/json"; + return service + .getStatus(this.client.getHost(), this.client.getSubscriptionId(), this.client.getResourceGroupName(), + this.client.getWorkspaceName(), accept) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } + + /** + * Get provider status. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return provider status. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getStatusAsync() { + return new PagedFlux<>(() -> getStatusSinglePageAsync(), nextLink -> getStatusNextSinglePageAsync(nextLink)); + } + + /** + * Get provider status. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return provider status. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getStatus() { + return new PagedIterable<>(getStatusAsync()); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return providers status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getStatusNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return service.getStatusNext(nextLink, this.client.getHost(), accept) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/QuantumClientImpl.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/QuantumClientImpl.java new file mode 100644 index 000000000000..5c3af34f163a --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/QuantumClientImpl.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** Initializes a new instance of the QuantumClient type. */ +public final class QuantumClientImpl { + /** The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ + private final String subscriptionId; + + /** + * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** Name of an Azure resource group. */ + private final String resourceGroupName; + + /** + * Gets Name of an Azure resource group. + * + * @return the resourceGroupName value. + */ + public String getResourceGroupName() { + return this.resourceGroupName; + } + + /** Name of the workspace. */ + private final String workspaceName; + + /** + * Gets Name of the workspace. + * + * @return the workspaceName value. + */ + public String getWorkspaceName() { + return this.workspaceName; + } + + /** server parameter. */ + private final String host; + + /** + * Gets server parameter. + * + * @return the host value. + */ + public String getHost() { + return this.host; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The JobsImpl object to access its operations. */ + private final JobsImpl jobs; + + /** + * Gets the JobsImpl object to access its operations. + * + * @return the JobsImpl object. + */ + public JobsImpl getJobs() { + return this.jobs; + } + + /** The ProvidersImpl object to access its operations. */ + private final ProvidersImpl providers; + + /** + * Gets the ProvidersImpl object to access its operations. + * + * @return the ProvidersImpl object. + */ + public ProvidersImpl getProviders() { + return this.providers; + } + + /** The StoragesImpl object to access its operations. */ + private final StoragesImpl storages; + + /** + * Gets the StoragesImpl object to access its operations. + * + * @return the StoragesImpl object. + */ + public StoragesImpl getStorages() { + return this.storages; + } + + /** The QuotasImpl object to access its operations. */ + private final QuotasImpl quotas; + + /** + * Gets the QuotasImpl object to access its operations. + * + * @return the QuotasImpl object. + */ + public QuotasImpl getQuotas() { + return this.quotas; + } + + /** + * Initializes an instance of QuantumClient client. + * + * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + * @param resourceGroupName Name of an Azure resource group. + * @param workspaceName Name of the workspace. + * @param host server parameter. + */ + public QuantumClientImpl(String subscriptionId, String resourceGroupName, String workspaceName, String host) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), subscriptionId, resourceGroupName, workspaceName, host); + } + + /** + * Initializes an instance of QuantumClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + * @param resourceGroupName Name of an Azure resource group. + * @param workspaceName Name of the workspace. + * @param host server parameter. + */ + public QuantumClientImpl(HttpPipeline httpPipeline, String subscriptionId, String resourceGroupName, + String workspaceName, String host) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), subscriptionId, resourceGroupName, + workspaceName, host); + } + + /** + * Initializes an instance of QuantumClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + * @param resourceGroupName Name of an Azure resource group. + * @param workspaceName Name of the workspace. + * @param host server parameter. + */ + public QuantumClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String subscriptionId, + String resourceGroupName, String workspaceName, String host) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.subscriptionId = subscriptionId; + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.host = host; + this.jobs = new JobsImpl(this); + this.providers = new ProvidersImpl(this); + this.storages = new StoragesImpl(this); + this.quotas = new QuotasImpl(this); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/QuotasImpl.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/QuotasImpl.java new file mode 100644 index 000000000000..6806530c4c23 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/QuotasImpl.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.quantum.jobs.models.Quota; +import com.azure.quantum.jobs.models.QuotaList; +import com.azure.quantum.jobs.models.RestErrorException; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Quotas. */ +public final class QuotasImpl { + /** The proxy service used to perform REST calls. */ + private final QuotasService service; + + /** The service client containing this operation class. */ + private final QuantumClientImpl client; + + /** + * Initializes an instance of QuotasImpl. + * + * @param client the instance of the service client containing this operation class. + */ + QuotasImpl(QuantumClientImpl client) { + this.service = RestProxy.create(QuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for QuantumClientQuotas to be used by the proxy service to perform REST + * calls. + */ + @Host("{$host}") + @ServiceInterface(name = "QuantumClientQuotas") + private interface QuotasService { + @Get("/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/quotas") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(RestErrorException.class) + Mono> list(@HostParam("$host") String host, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(RestErrorException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String host, @HeaderParam("Accept") String accept); + } + + /** + * List quotas for the given workspace. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync() { + final String accept = "application/json"; + return service + .list(this.client.getHost(), this.client.getSubscriptionId(), this.client.getResourceGroupName(), + this.client.getWorkspaceName(), accept) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } + + /** + * List quotas for the given workspace. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List quotas for the given workspace. + * + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return service.listNext(nextLink, this.client.getHost(), accept) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/StoragesImpl.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/StoragesImpl.java new file mode 100644 index 000000000000..4b27d8547a40 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/StoragesImpl.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.quantum.jobs.models.BlobDetails; +import com.azure.quantum.jobs.models.RestErrorException; +import com.azure.quantum.jobs.models.SasUriResponse; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Storages. */ +public final class StoragesImpl { + /** The proxy service used to perform REST calls. */ + private final StoragesService service; + + /** The service client containing this operation class. */ + private final QuantumClientImpl client; + + /** + * Initializes an instance of StoragesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + StoragesImpl(QuantumClientImpl client) { + this.service = RestProxy.create(StoragesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for QuantumClientStorages to be used by the proxy service to perform REST + * calls. + */ + @Host("{$host}") + @ServiceInterface(name = "QuantumClientStorage") + private interface StoragesService { + @Post("/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/storage/sasUri") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(RestErrorException.class) + Mono> sasUri(@HostParam("$host") String host, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") BlobDetails blobDetails, @HeaderParam("Accept") String accept); + } + + /** + * Gets a URL with SAS token for a container/blob in the storage account associated with the workspace. The SAS URL + * can be used to upload job input and/or download job output. + * + * @param blobDetails The details (name and container) of the blob to store or download data. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a URL with SAS token for a container/blob in the storage account associated with the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> sasUriWithResponseAsync(BlobDetails blobDetails) { + final String accept = "application/json"; + return service.sasUri(this.client.getHost(), this.client.getSubscriptionId(), + this.client.getResourceGroupName(), this.client.getWorkspaceName(), blobDetails, accept); + } + + /** + * Gets a URL with SAS token for a container/blob in the storage account associated with the workspace. The SAS URL + * can be used to upload job input and/or download job output. + * + * @param blobDetails The details (name and container) of the blob to store or download data. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a URL with SAS token for a container/blob in the storage account associated with the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono sasUriAsync(BlobDetails blobDetails) { + return sasUriWithResponseAsync(blobDetails).flatMap((Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a URL with SAS token for a container/blob in the storage account associated with the workspace. The SAS URL + * can be used to upload job input and/or download job output. + * + * @param blobDetails The details (name and container) of the blob to store or download data. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws RestErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a URL with SAS token for a container/blob in the storage account associated with the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SasUriResponse sasUri(BlobDetails blobDetails) { + return sasUriAsync(blobDetails).block(); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/package-info.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/package-info.java new file mode 100644 index 000000000000..c0538abe729e --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/implementation/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the implementations for QuantumClient. Azure Quantum REST API client. */ +package com.azure.quantum.jobs.implementation; diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/BlobDetails.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/BlobDetails.java new file mode 100644 index 000000000000..e36e27cf4924 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/BlobDetails.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** Blob details. */ +@Fluent +public final class BlobDetails implements JsonSerializable { + /* + * The container name. + */ + private String containerName; + + /* + * The blob name. + */ + private String blobName; + + /** + * Creates an instance of {@link BlobDetails}. + */ + public BlobDetails() { + } + + /** + * Get the containerName property: The container name. + * + * @return the containerName value. + */ + public String getContainerName() { + return this.containerName; + } + + /** + * Set the containerName property: The container name. + * + * @param containerName the containerName value to set. + * @return the BlobDetails object itself. + */ + public BlobDetails setContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the blobName property: The blob name. + * + * @return the blobName value. + */ + public String getBlobName() { + return this.blobName; + } + + /** + * Set the blobName property: The blob name. + * + * @param blobName the blobName value to set. + * @return the BlobDetails object itself. + */ + public BlobDetails setBlobName(String blobName) { + this.blobName = blobName; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("containerName", containerName) + .writeStringField("blobName", blobName) + .writeEndObject(); + } + + /** + * Deserializes an instance of {@link BlobDetails} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link BlobDetails}, or null if {@link JsonReader} was pointing {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static BlobDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlobDetails blobDetails = new BlobDetails(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("containerName".equals(fieldName)) { + blobDetails.containerName = reader.getString(); + } else if ("blobName".equals(fieldName)) { + blobDetails.blobName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return blobDetails; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/DimensionScope.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/DimensionScope.java new file mode 100644 index 000000000000..4d75f0a83d27 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/DimensionScope.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for DimensionScope. */ +public final class DimensionScope extends ExpandableStringEnum { + /** Static value Workspace for DimensionScope. */ + public static final DimensionScope WORKSPACE = fromString("Workspace"); + + /** Static value Subscription for DimensionScope. */ + public static final DimensionScope SUBSCRIPTION = fromString("Subscription"); + + /** + * Creates a new instance of {@link DimensionScope} with no string value. + * + * @deprecated Use {@link #fromString(String)} instead to create or get an instance of {@link DimensionScope}. + */ + @Deprecated + public DimensionScope() { + } + + /** + * Creates or finds a DimensionScope from its string representation. + * + * @param name a name to look for. + * @return the corresponding DimensionScope. + */ + public static DimensionScope fromString(String name) { + return fromString(name, DimensionScope.class); + } + + /** + * Gets the known values for DimensionScope. + * @return known DimensionScope values. + */ + public static Collection values() { + return values(DimensionScope.class); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ErrorData.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ErrorData.java new file mode 100644 index 000000000000..8d7f491ab761 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ErrorData.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** An error response from Azure. */ +@Fluent +public final class ErrorData implements JsonSerializable { + /* + * An identifier for the error. Codes are invariant and are intended to be + * consumed programmatically. + */ + private String code; + + /* + * A message describing the error, intended to be suitable for displaying + * in a user interface. + */ + private String message; + + /** + * Creates an instance of {@link ErrorData}. + */ + public ErrorData() { + } + + /** + * Get the code property: An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. + * + * @return the code value. + */ + public String getCode() { + return this.code; + } + + /** + * Set the code property: An identifier for the error. Codes are invariant and are intended to be consumed + * programmatically. + * + * @param code the code value to set. + * @return the ErrorData object itself. + */ + public ErrorData setCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: A message describing the error, intended to be suitable for displaying in a user + * interface. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: A message describing the error, intended to be suitable for displaying in a user + * interface. + * + * @param message the message value to set. + * @return the ErrorData object itself. + */ + public ErrorData setMessage(String message) { + this.message = message; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("code", code) + .writeStringField("message", message) + .writeEndObject(); + } + + /** + * Deserializes an instance of {@link ErrorData} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link ErrorData}, or null if {@link JsonReader} was pointing {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static ErrorData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ErrorData errorData = new ErrorData(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + errorData.code = reader.getString(); + } else if ("message".equals(fieldName)) { + errorData.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return errorData; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobDetails.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobDetails.java new file mode 100644 index 000000000000..f957f4caa7a2 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobDetails.java @@ -0,0 +1,482 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Map; +import java.util.Objects; + +/** Job details. */ +@Fluent +public final class JobDetails implements JsonSerializable { + /* + * The job id. + */ + private String id; + + /* + * The job name. Is not required for the name to be unique and it's only + * used for display purposes. + */ + private String name; + + /* + * The blob container SAS uri, the container is used to host job data. + */ + private String containerUri; + + /* + * The input blob SAS uri, if specified, it will override the default input + * blob in the container. + */ + private String inputDataUri; + + /* + * The format of the input data. + */ + private String inputDataFormat; + + /* + * The input parameters for the job. JSON object used by the target solver. + * It is expected that the size of this object is small and only used to + * specify parameters for the execution target, not the input data. + */ + private Object inputParams; + + /* + * The unique identifier for the provider. + */ + private String providerId; + + /* + * The target identifier to run the job. + */ + private String target; + + /* + * The job metadata. Metadata provides client the ability to store + * client-specific information + */ + private Map metadata; + + /* + * The output blob SAS uri. When a job finishes successfully, results will + * be uploaded to this blob. + */ + private String outputDataUri; + + /* + * The format of the output data. + */ + private String outputDataFormat; + + /* + * The job status. + */ + private JobStatus status; + + /* + * The creation time of the job. + */ + private OffsetDateTime creationTime; + + /* + * The time when the job began execution. + */ + private OffsetDateTime beginExecutionTime; + + /* + * The time when the job finished execution. + */ + private OffsetDateTime endExecutionTime; + + /* + * The time when a job was successfully cancelled. + */ + private OffsetDateTime cancellationTime; + + /* + * The error data for the job. This is expected only when Status 'Failed'. + */ + private ErrorData errorData; + + /** + * Creates an instance of {@link JobDetails}. + */ + public JobDetails() { + } + + /** + * Get the id property: The job id. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: The job id. + * + * @param id the id value to set. + * @return the JobDetails object itself. + */ + public JobDetails setId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The job name. Is not required for the name to be unique and it's only used for display + * purposes. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The job name. Is not required for the name to be unique and it's only used for display + * purposes. + * + * @param name the name value to set. + * @return the JobDetails object itself. + */ + public JobDetails setName(String name) { + this.name = name; + return this; + } + + /** + * Get the containerUri property: The blob container SAS uri, the container is used to host job data. + * + * @return the containerUri value. + */ + public String getContainerUri() { + return this.containerUri; + } + + /** + * Set the containerUri property: The blob container SAS uri, the container is used to host job data. + * + * @param containerUri the containerUri value to set. + * @return the JobDetails object itself. + */ + public JobDetails setContainerUri(String containerUri) { + this.containerUri = containerUri; + return this; + } + + /** + * Get the inputDataUri property: The input blob SAS uri, if specified, it will override the default input blob in + * the container. + * + * @return the inputDataUri value. + */ + public String getInputDataUri() { + return this.inputDataUri; + } + + /** + * Set the inputDataUri property: The input blob SAS uri, if specified, it will override the default input blob in + * the container. + * + * @param inputDataUri the inputDataUri value to set. + * @return the JobDetails object itself. + */ + public JobDetails setInputDataUri(String inputDataUri) { + this.inputDataUri = inputDataUri; + return this; + } + + /** + * Get the inputDataFormat property: The format of the input data. + * + * @return the inputDataFormat value. + */ + public String getInputDataFormat() { + return this.inputDataFormat; + } + + /** + * Set the inputDataFormat property: The format of the input data. + * + * @param inputDataFormat the inputDataFormat value to set. + * @return the JobDetails object itself. + */ + public JobDetails setInputDataFormat(String inputDataFormat) { + this.inputDataFormat = inputDataFormat; + return this; + } + + /** + * Get the inputParams property: The input parameters for the job. JSON object used by the target solver. It is + * expected that the size of this object is small and only used to specify parameters for the execution target, not + * the input data. + * + * @return the inputParams value. + */ + public Object getInputParams() { + return this.inputParams; + } + + /** + * Set the inputParams property: The input parameters for the job. JSON object used by the target solver. It is + * expected that the size of this object is small and only used to specify parameters for the execution target, not + * the input data. + * + * @param inputParams the inputParams value to set. + * @return the JobDetails object itself. + */ + public JobDetails setInputParams(Object inputParams) { + this.inputParams = inputParams; + return this; + } + + /** + * Get the providerId property: The unique identifier for the provider. + * + * @return the providerId value. + */ + public String getProviderId() { + return this.providerId; + } + + /** + * Set the providerId property: The unique identifier for the provider. + * + * @param providerId the providerId value to set. + * @return the JobDetails object itself. + */ + public JobDetails setProviderId(String providerId) { + this.providerId = providerId; + return this; + } + + /** + * Get the target property: The target identifier to run the job. + * + * @return the target value. + */ + public String getTarget() { + return this.target; + } + + /** + * Set the target property: The target identifier to run the job. + * + * @param target the target value to set. + * @return the JobDetails object itself. + */ + public JobDetails setTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the metadata property: The job metadata. Metadata provides client the ability to store client-specific + * information. + * + * @return the metadata value. + */ + public Map getMetadata() { + return this.metadata; + } + + /** + * Set the metadata property: The job metadata. Metadata provides client the ability to store client-specific + * information. + * + * @param metadata the metadata value to set. + * @return the JobDetails object itself. + */ + public JobDetails setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the outputDataUri property: The output blob SAS uri. When a job finishes successfully, results will be + * uploaded to this blob. + * + * @return the outputDataUri value. + */ + public String getOutputDataUri() { + return this.outputDataUri; + } + + /** + * Set the outputDataUri property: The output blob SAS uri. When a job finishes successfully, results will be + * uploaded to this blob. + * + * @param outputDataUri the outputDataUri value to set. + * @return the JobDetails object itself. + */ + public JobDetails setOutputDataUri(String outputDataUri) { + this.outputDataUri = outputDataUri; + return this; + } + + /** + * Get the outputDataFormat property: The format of the output data. + * + * @return the outputDataFormat value. + */ + public String getOutputDataFormat() { + return this.outputDataFormat; + } + + /** + * Set the outputDataFormat property: The format of the output data. + * + * @param outputDataFormat the outputDataFormat value to set. + * @return the JobDetails object itself. + */ + public JobDetails setOutputDataFormat(String outputDataFormat) { + this.outputDataFormat = outputDataFormat; + return this; + } + + /** + * Get the status property: The job status. + * + * @return the status value. + */ + public JobStatus getStatus() { + return this.status; + } + + /** + * Get the creationTime property: The creation time of the job. + * + * @return the creationTime value. + */ + public OffsetDateTime getCreationTime() { + return this.creationTime; + } + + /** + * Get the beginExecutionTime property: The time when the job began execution. + * + * @return the beginExecutionTime value. + */ + public OffsetDateTime getBeginExecutionTime() { + return this.beginExecutionTime; + } + + /** + * Get the endExecutionTime property: The time when the job finished execution. + * + * @return the endExecutionTime value. + */ + public OffsetDateTime getEndExecutionTime() { + return this.endExecutionTime; + } + + /** + * Get the cancellationTime property: The time when a job was successfully cancelled. + * + * @return the cancellationTime value. + */ + public OffsetDateTime getCancellationTime() { + return this.cancellationTime; + } + + /** + * Get the errorData property: The error data for the job. This is expected only when Status 'Failed'. + * + * @return the errorData value. + */ + public ErrorData getErrorData() { + return this.errorData; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("id", id) + .writeStringField("name", name) + .writeStringField("containerUri", containerUri) + .writeStringField("inputDataUri", inputDataUri) + .writeStringField("inputDataFormat", inputDataFormat) + .writeUntypedField("inputParams", inputParams) + .writeStringField("providerId", providerId) + .writeStringField("target", target) + .writeMapField("metadata", metadata, JsonWriter::writeString) + .writeStringField("outputDataUri", outputDataUri) + .writeStringField("outputDataFormat", outputDataFormat) + .writeStringField("status", Objects.toString(status, null)) + .writeEndObject(); + } + + /** + * Deserializes an instance of {@link JobDetails} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link JobDetails}, or null if {@link JsonReader} was pointing {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static JobDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobDetails jobDetails = new JobDetails(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + jobDetails.id = reader.getString(); + } else if ("name".equals(fieldName)) { + jobDetails.name = reader.getString(); + } else if ("containerUri".equals(fieldName)) { + jobDetails.containerUri = reader.getString(); + } else if ("inputDataUri".equals(fieldName)) { + jobDetails.inputDataUri = reader.getString(); + } else if ("inputDataFormat".equals(fieldName)) { + jobDetails.inputDataFormat = reader.getString(); + } else if ("inputParams".equals(fieldName)) { + jobDetails.inputParams = reader.readUntyped(); + } else if ("providerId".equals(fieldName)) { + jobDetails.providerId = reader.getString(); + } else if ("target".equals(fieldName)) { + jobDetails.target = reader.getString(); + } else if ("metadata".equals(fieldName)) { + jobDetails.metadata = reader.readMap(JsonReader::getString); + } else if ("outputDataUri".equals(fieldName)) { + jobDetails.outputDataUri = reader.getString(); + } else if ("outputDataFormat".equals(fieldName)) { + jobDetails.outputDataFormat = reader.getString(); + } else if ("status".equals(fieldName)) { + jobDetails.status = JobStatus.fromString(reader.getString()); + } else if ("creationTime".equals(fieldName)) { + jobDetails.creationTime = CoreUtils.parseBestOffsetDateTime(reader.getString()); + } else if ("beginExecutionTime".equals(fieldName)) { + jobDetails.beginExecutionTime = CoreUtils.parseBestOffsetDateTime(reader.getString()); + } else if ("endExecutionTime".equals(fieldName)) { + jobDetails.endExecutionTime = CoreUtils.parseBestOffsetDateTime(reader.getString()); + } else if ("cancellationTime".equals(fieldName)) { + jobDetails.cancellationTime = CoreUtils.parseBestOffsetDateTime(reader.getString()); + } else if ("errorData".equals(fieldName)) { + jobDetails.errorData = ErrorData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return jobDetails; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobDetailsList.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobDetailsList.java new file mode 100644 index 000000000000..39ee71651623 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobDetailsList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** List of job details. */ +@Fluent +public final class JobDetailsList implements JsonSerializable { + /* + * The value property. + */ + private List value; + + /* + * Total records count number. + */ + private Long count; + + /* + * Link to the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of {@link JobDetailsList}. + */ + public JobDetailsList() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Get the count property: Total records count number. + * + * @return the count value. + */ + public Long getCount() { + return this.count; + } + + /** + * Set the count property: Total records count number. + * + * @param count the count value to set. + * @return the JobDetailsList object itself. + */ + public JobDetailsList setCount(Long count) { + this.count = count; + return this; + } + + /** + * Get the nextLink property: Link to the next page of results. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeNumberField("count", count).writeEndObject(); + } + + /** + * Deserializes an instance of {@link JobDetailsList} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link JobDetailsList}, or null if {@link JsonReader} was pointing + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static JobDetailsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobDetailsList jobDetailsList = new JobDetailsList(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + jobDetailsList.value = reader.readArray(JobDetails::fromJson); + } else if ("count".equals(fieldName)) { + jobDetailsList.count = reader.getNullable(JsonReader::getLong); + } else if ("nextLink".equals(fieldName)) { + jobDetailsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return jobDetailsList; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobStatus.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobStatus.java new file mode 100644 index 000000000000..cd3babba91ef --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/JobStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for JobStatus. */ +public final class JobStatus extends ExpandableStringEnum { + /** Static value Waiting for JobStatus. */ + public static final JobStatus WAITING = fromString("Waiting"); + + /** Static value Executing for JobStatus. */ + public static final JobStatus EXECUTING = fromString("Executing"); + + /** Static value Succeeded for JobStatus. */ + public static final JobStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for JobStatus. */ + public static final JobStatus FAILED = fromString("Failed"); + + /** Static value Cancelled for JobStatus. */ + public static final JobStatus CANCELLED = fromString("Cancelled"); + + /** + * Creates a new instance of {@link JobStatus} with no string value. + * + * @deprecated Use {@link #fromString(String)} instead to create or get an instance of {@link JobStatus}. + */ + @Deprecated + public JobStatus() { + } + + /** + * Creates or finds a JobStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobStatus. + */ + public static JobStatus fromString(String name) { + return fromString(name, JobStatus.class); + } + + /** + * Gets the known values for JobStatus. + * @return known JobStatus values. + */ + public static Collection values() { + return values(JobStatus.class); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/MeterPeriod.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/MeterPeriod.java new file mode 100644 index 000000000000..77c3b7148d3e --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/MeterPeriod.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for MeterPeriod. */ +public final class MeterPeriod extends ExpandableStringEnum { + /** Static value None for MeterPeriod. */ + public static final MeterPeriod NONE = fromString("None"); + + /** Static value Monthly for MeterPeriod. */ + public static final MeterPeriod MONTHLY = fromString("Monthly"); + + /** + * Creates a new instance of {@link MeterPeriod} with no string value. + * + * @deprecated Use {@link #fromString(String)} instead to create or get an instance of {@link MeterPeriod}. + */ + @Deprecated + public MeterPeriod() { + } + + /** + * Creates or finds a MeterPeriod from its string representation. + * + * @param name a name to look for. + * @return the corresponding MeterPeriod. + */ + public static MeterPeriod fromString(String name) { + return fromString(name, MeterPeriod.class); + } + + /** + * Gets the known values for MeterPeriod. + * @return known MeterPeriod values. + */ + public static Collection values() { + return values(MeterPeriod.class); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderAvailability.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderAvailability.java new file mode 100644 index 000000000000..e30eebead3ff --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderAvailability.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for ProviderAvailability. */ +public final class ProviderAvailability extends ExpandableStringEnum { + /** Static value Available for ProviderAvailability. */ + public static final ProviderAvailability AVAILABLE = fromString("Available"); + + /** Static value Degraded for ProviderAvailability. */ + public static final ProviderAvailability DEGRADED = fromString("Degraded"); + + /** Static value Unavailable for ProviderAvailability. */ + public static final ProviderAvailability UNAVAILABLE = fromString("Unavailable"); + + /** + * Creates a new instance of {@link ProviderAvailability} with no string value. + * + * @deprecated Use {@link #fromString(String)} instead to create or get an instance of {@link ProviderAvailability}. + */ + @Deprecated + public ProviderAvailability() { + } + + /** + * Creates or finds a ProviderAvailability from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProviderAvailability. + */ + public static ProviderAvailability fromString(String name) { + return fromString(name, ProviderAvailability.class); + } + + /** + * Gets the known values for ProviderAvailability. + * @return known ProviderAvailability values. + */ + public static Collection values() { + return values(ProviderAvailability.class); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderStatus.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderStatus.java new file mode 100644 index 000000000000..c858396b54b4 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderStatus.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** Providers status. */ +@Immutable +public final class ProviderStatus implements JsonSerializable { + /* + * Provider id. + */ + private String id; + + /* + * Provider availability. + */ + private ProviderAvailability currentAvailability; + + /* + * The targets property. + */ + private List targets; + + /** + * Creates an instance of {@link ProviderStatus}. + */ + public ProviderStatus() { + } + + /** + * Get the id property: Provider id. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Get the currentAvailability property: Provider availability. + * + * @return the currentAvailability value. + */ + public ProviderAvailability getCurrentAvailability() { + return this.currentAvailability; + } + + /** + * Get the targets property: The targets property. + * + * @return the targets value. + */ + public List getTargets() { + return this.targets; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeEndObject(); + } + + /** + * Deserializes an instance of {@link ProviderStatus} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link ProviderStatus}, or null if {@link JsonReader} was pointing {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static ProviderStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderStatus providerStatus = new ProviderStatus(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + providerStatus.id = reader.getString(); + } else if ("currentAvailability".equals(fieldName)) { + providerStatus.currentAvailability = ProviderAvailability.fromString(reader.getString()); + } else if ("targets".equals(fieldName)) { + providerStatus.targets = reader.readArray(TargetStatus::fromJson); + } else { + reader.skipChildren(); + } + } + + return providerStatus; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderStatusList.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderStatusList.java new file mode 100644 index 000000000000..8ea7e0603903 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/ProviderStatusList.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** Providers status. */ +@Immutable +public final class ProviderStatusList implements JsonSerializable { + /* + * The value property. + */ + private List value; + + /* + * Link to the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of {@link ProviderStatusList}. + */ + public ProviderStatusList() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Get the nextLink property: Link to the next page of results. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeEndObject(); + } + + /** + * Deserializes an instance of {@link ProviderStatusList} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link ProviderStatusList}, or null if {@link JsonReader} was pointing + * {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static ProviderStatusList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderStatusList providerStatusList = new ProviderStatusList(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + providerStatusList.value = reader.readArray(ProviderStatus::fromJson); + } else if ("nextLink".equals(fieldName)) { + providerStatusList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return providerStatusList; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/Quota.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/Quota.java new file mode 100644 index 000000000000..c93e7b049e5d --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/Quota.java @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.Objects; + +/** Quota information. */ +@Fluent +public final class Quota implements JsonSerializable { + /* + * The name of the dimension associated with the quota. + */ + private String dimension; + + /* + * The scope at which the quota is applied. + */ + private DimensionScope scope; + + /* + * The unique identifier for the provider. + */ + private String providerId; + + /* + * The amount of the usage that has been applied for the current period. + */ + private Float utilization; + + /* + * The amount of the usage that has been reserved but not applied for the + * current period. + */ + private Float holds; + + /* + * The maximum amount of usage allowed for the current period. + */ + private Float limit; + + /* + * The time period in which the quota's underlying meter is accumulated. + * Based on calendar year. 'None' is used for concurrent quotas. + */ + private MeterPeriod period; + + /** + * Creates an instance of {@link Quota}. + */ + public Quota() { + } + + /** + * Get the dimension property: The name of the dimension associated with the quota. + * + * @return the dimension value. + */ + public String getDimension() { + return this.dimension; + } + + /** + * Set the dimension property: The name of the dimension associated with the quota. + * + * @param dimension the dimension value to set. + * @return the Quota object itself. + */ + public Quota setDimension(String dimension) { + this.dimension = dimension; + return this; + } + + /** + * Get the scope property: The scope at which the quota is applied. + * + * @return the scope value. + */ + public DimensionScope getScope() { + return this.scope; + } + + /** + * Set the scope property: The scope at which the quota is applied. + * + * @param scope the scope value to set. + * @return the Quota object itself. + */ + public Quota setScope(DimensionScope scope) { + this.scope = scope; + return this; + } + + /** + * Get the providerId property: The unique identifier for the provider. + * + * @return the providerId value. + */ + public String getProviderId() { + return this.providerId; + } + + /** + * Set the providerId property: The unique identifier for the provider. + * + * @param providerId the providerId value to set. + * @return the Quota object itself. + */ + public Quota setProviderId(String providerId) { + this.providerId = providerId; + return this; + } + + /** + * Get the utilization property: The amount of the usage that has been applied for the current period. + * + * @return the utilization value. + */ + public Float getUtilization() { + return this.utilization; + } + + /** + * Set the utilization property: The amount of the usage that has been applied for the current period. + * + * @param utilization the utilization value to set. + * @return the Quota object itself. + */ + public Quota setUtilization(Float utilization) { + this.utilization = utilization; + return this; + } + + /** + * Get the holds property: The amount of the usage that has been reserved but not applied for the current period. + * + * @return the holds value. + */ + public Float getHolds() { + return this.holds; + } + + /** + * Set the holds property: The amount of the usage that has been reserved but not applied for the current period. + * + * @param holds the holds value to set. + * @return the Quota object itself. + */ + public Quota setHolds(Float holds) { + this.holds = holds; + return this; + } + + /** + * Get the limit property: The maximum amount of usage allowed for the current period. + * + * @return the limit value. + */ + public Float getLimit() { + return this.limit; + } + + /** + * Set the limit property: The maximum amount of usage allowed for the current period. + * + * @param limit the limit value to set. + * @return the Quota object itself. + */ + public Quota setLimit(Float limit) { + this.limit = limit; + return this; + } + + /** + * Get the period property: The time period in which the quota's underlying meter is accumulated. Based on calendar + * year. 'None' is used for concurrent quotas. + * + * @return the period value. + */ + public MeterPeriod getPeriod() { + return this.period; + } + + /** + * Set the period property: The time period in which the quota's underlying meter is accumulated. Based on calendar + * year. 'None' is used for concurrent quotas. + * + * @param period the period value to set. + * @return the Quota object itself. + */ + public Quota setPeriod(MeterPeriod period) { + this.period = period; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject() + .writeStringField("dimension", dimension) + .writeStringField("scope", Objects.toString(scope, null)) + .writeStringField("providerId", providerId) + .writeNumberField("utilization", utilization) + .writeNumberField("holds", holds) + .writeNumberField("limit", limit) + .writeStringField("period", Objects.toString(period, null)) + .writeEndObject(); + } + + /** + * Deserializes an instance of {@link Quota} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link Quota}, or null if {@link JsonReader} was pointing {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static Quota fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Quota quota = new Quota(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dimension".equals(fieldName)) { + quota.dimension = reader.getString(); + } else if ("scope".equals(fieldName)) { + quota.scope = DimensionScope.fromString(reader.getString()); + } else if ("providerId".equals(fieldName)) { + quota.providerId = reader.getString(); + } else if ("utilization".equals(fieldName)) { + quota.utilization = reader.getNullable(JsonReader::getFloat); + } else if ("holds".equals(fieldName)) { + quota.holds = reader.getNullable(JsonReader::getFloat); + } else if ("limit".equals(fieldName)) { + quota.limit = reader.getNullable(JsonReader::getFloat); + } else if ("period".equals(fieldName)) { + quota.period = MeterPeriod.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return quota; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/QuotaList.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/QuotaList.java new file mode 100644 index 000000000000..44cfe97b9845 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/QuotaList.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; +import java.util.List; + +/** List of quotas. */ +@Immutable +public final class QuotaList implements JsonSerializable { + /* + * The value property. + */ + private List value; + + /* + * Link to the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of {@link QuotaList}. + */ + public QuotaList() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Get the nextLink property: Link to the next page of results. + * + * @return the nextLink value. + */ + public String getNextLink() { + return this.nextLink; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeEndObject(); + } + + /** + * Deserializes an instance of {@link QuotaList} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link QuotaList}, or null if {@link JsonReader} was pointing {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static QuotaList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QuotaList quotaList = new QuotaList(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + quotaList.value = reader.readArray(Quota::fromJson); + } else if ("nextLink".equals(fieldName)) { + quotaList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return quotaList; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/RestError.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/RestError.java new file mode 100644 index 000000000000..fc7e33c887f4 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/RestError.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** Error information returned by the API. */ +@Fluent +public final class RestError implements JsonSerializable { + /* + * An error response from Azure. + */ + private ErrorData error; + + /** + * Creates an instance of {@link RestError}. + */ + public RestError() { + } + + /** + * Get the error property: An error response from Azure. + * + * @return the error value. + */ + public ErrorData getError() { + return this.error; + } + + /** + * Set the error property: An error response from Azure. + * + * @param error the error value to set. + * @return the RestError object itself. + */ + public RestError setError(ErrorData error) { + this.error = error; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeJsonField("error", error).writeEndObject(); + } + + /** + * Deserializes an instance of {@link RestError} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link RestError}, or null if {@link JsonReader} was pointing {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static RestError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestError restError = new RestError(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + restError.error = ErrorData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return restError; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/RestErrorException.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/RestErrorException.java new file mode 100644 index 000000000000..996ee378eb8e --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/RestErrorException.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** Exception thrown for an invalid response with RestError information. */ +public final class RestErrorException extends HttpResponseException { + /** + * Initializes a new instance of the RestErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public RestErrorException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the RestErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public RestErrorException(String message, HttpResponse response, RestError value) { + super(message, response, value); + } + + @Override + public RestError getValue() { + return (RestError) super.getValue(); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/SasUriResponse.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/SasUriResponse.java new file mode 100644 index 000000000000..14f5d0822bee --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/SasUriResponse.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** Get SAS URL operation response. */ +@Fluent +public final class SasUriResponse implements JsonSerializable { + /* + * A URL with a SAS token to upload a blob for execution in the given + * workspace. + */ + private String sasUri; + + /** + * Creates an instance of {@link SasUriResponse}. + */ + public SasUriResponse() { + } + + /** + * Get the sasUri property: A URL with a SAS token to upload a blob for execution in the given workspace. + * + * @return the sasUri value. + */ + public String getSasUri() { + return this.sasUri; + } + + /** + * Set the sasUri property: A URL with a SAS token to upload a blob for execution in the given workspace. + * + * @param sasUri the sasUri value to set. + * @return the SasUriResponse object itself. + */ + public SasUriResponse setSasUri(String sasUri) { + this.sasUri = sasUri; + return this; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeStringField("sasUri", sasUri).writeEndObject(); + } + + /** + * Deserializes an instance of {@link SasUriResponse} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link SasUriResponse}, or null if {@link JsonReader} was pointing {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static SasUriResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SasUriResponse sasUriResponse = new SasUriResponse(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sasUri".equals(fieldName)) { + sasUriResponse.sasUri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return sasUriResponse; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/TargetAvailability.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/TargetAvailability.java new file mode 100644 index 000000000000..93a8e0c35693 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/TargetAvailability.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.util.ExpandableStringEnum; + +import java.util.Collection; + +/** Defines values for TargetAvailability. */ +public final class TargetAvailability extends ExpandableStringEnum { + /** Static value Available for TargetAvailability. */ + public static final TargetAvailability AVAILABLE = fromString("Available"); + + /** Static value Degraded for TargetAvailability. */ + public static final TargetAvailability DEGRADED = fromString("Degraded"); + + /** Static value Unavailable for TargetAvailability. */ + public static final TargetAvailability UNAVAILABLE = fromString("Unavailable"); + + /** + * Creates a new instance of {@link TargetAvailability} with no string value. + * + * @deprecated Use {@link #fromString(String)} instead to create or get an instance of {@link TargetAvailability}. + */ + @Deprecated + public TargetAvailability() { + } + + /** + * Creates or finds a TargetAvailability from its string representation. + * + * @param name a name to look for. + * @return the corresponding TargetAvailability. + */ + public static TargetAvailability fromString(String name) { + return fromString(name, TargetAvailability.class); + } + + /** + * Gets the known values for TargetAvailability. + * @return known TargetAvailability values. + */ + public static Collection values() { + return values(TargetAvailability.class); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/TargetStatus.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/TargetStatus.java new file mode 100644 index 000000000000..c87fbbf4c324 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/TargetStatus.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.quantum.jobs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; + +import java.io.IOException; + +/** Target status. */ +@Immutable +public final class TargetStatus implements JsonSerializable { + /* + * Target id. + */ + private String id; + + /* + * Target availability. + */ + private TargetAvailability currentAvailability; + + /* + * Average queue time in seconds. + */ + private Long averageQueueTime; + + /* + * A page with detailed status of the provider. + */ + private String statusPage; + + /** + * Creates an instance of {@link TargetStatus}. + */ + public TargetStatus() { + } + + /** + * Get the id property: Target id. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Get the currentAvailability property: Target availability. + * + * @return the currentAvailability value. + */ + public TargetAvailability getCurrentAvailability() { + return this.currentAvailability; + } + + /** + * Get the averageQueueTime property: Average queue time in seconds. + * + * @return the averageQueueTime value. + */ + public Long getAverageQueueTime() { + return this.averageQueueTime; + } + + /** + * Get the statusPage property: A page with detailed status of the provider. + * + * @return the statusPage value. + */ + public String getStatusPage() { + return this.statusPage; + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeStartObject().writeEndObject(); + } + + /** + * Deserializes an instance of {@link TargetStatus} from the passed {@link JsonReader}. + * + * @param jsonReader The {@link JsonReader} to read. + * @return An instance of {@link TargetStatus}, or null if {@link JsonReader} was pointing {@link JsonToken#NULL}. + * @throws IOException If an error occurs while reading the {@link JsonReader}. + */ + public static TargetStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TargetStatus targetStatus = new TargetStatus(); + + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + targetStatus.id = reader.getString(); + } else if ("currentAvailability".equals(fieldName)) { + targetStatus.currentAvailability = TargetAvailability.fromString(reader.getString()); + } else if ("averageQueueTime".equals(fieldName)) { + targetStatus.averageQueueTime = reader.getNullable(JsonReader::getLong); + } else if ("statusPage".equals(fieldName)) { + targetStatus.statusPage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return targetStatus; + }); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/package-info.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/package-info.java new file mode 100644 index 000000000000..df01f4de3e3a --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/models/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for QuantumClient. Azure Quantum REST API client. */ +package com.azure.quantum.jobs.models; diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/package-info.java b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/package-info.java new file mode 100644 index 000000000000..e6b769642415 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/com/azure/quantum/jobs/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for QuantumClient. Azure Quantum REST API client. */ +package com.azure.quantum.jobs; diff --git a/sdk/quantum/azure-quantum-jobs/src/main/java/module-info.java b/sdk/quantum/azure-quantum-jobs/src/main/java/module-info.java new file mode 100644 index 000000000000..bec47ef4b256 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/java/module-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.quantum.jobs { + exports com.azure.quantum.jobs; + exports com.azure.quantum.jobs.models; + + requires transitive com.azure.core; + + opens com.azure.quantum.jobs.models to com.azure.core; +} diff --git a/sdk/quantum/azure-quantum-jobs/src/main/resources/azure-quantum-jobs.properties b/sdk/quantum/azure-quantum-jobs/src/main/resources/azure-quantum-jobs.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/main/resources/azure-quantum-jobs.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/BellState.bc b/sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/BellState.bc new file mode 100644 index 0000000000000000000000000000000000000000..0d9dc0bbee7f048b51cfe2bb24f6518cb90a6810 GIT binary patch literal 2308 zcmah~e@q+K9e@6L7jVudaT2qfox3{8EXG>fKx5CgWMiPDrP+~!M5j#l8QUYR2gVp; z$hw^|={eL%9ELP&%A`=SYV41Vt!#?6Xv5fHUSzd2S=VSqkzJgWO*BFai>fsnduO|Y zMCo?Yz31=e`|I=lzVACX+UIXK$N>-m09+F7!RKH8o%h^lb3dlsN#hRy(`-4Pm}7V zU2IHdo8Y@M=r81iy(LQgk*9Z!DQYw|aou-jPh2DxGcfL10)PW>*FP2ALAY7~`IUnS z1$hWA)nAsJnT|VM?i0j8?^}|7tB5UxsZbpMvG74LSsCq^kJr@x5=FO+ zF7sdS80qh{ZXsN{@pI>R+h!d3M?7BB_^!3GlSa3WlLZymdr!~QXkt!V|W%oJXj!n4J7 znZ~b^csi`SPK*B>w;MBdW1_fTNf{>XhN!?anR*5$eK>0RlfX2alKkN$>+fO%{z$L~ z2|3xIf(>3~tKWG^dJjndPGN;Owqlj$32Y5kL1>iAN!5Z)b%Vs=&@JciLSFedp319e zH_Y0f{ZZs*vAzE3do_ z3A9$5W+Rrl$o{dEA!avbQ|2p4VW2;NVyiz~#MYeBPjcdQLV8Cl zy+cSJP*|@FThU@ryq^>QHHQ@_>{G4!qcs{|2rF;p_pOo2yQDHrD&YyPk_WuRk4#tX zmMa3|WW<>5x(ZJp7CQoYwz8-EaL8uh{UhOwRaOKv@a&M0E`I{rr(l2Fl?zOd+S%6*vAxXwY0!BT>3GEZOk%ZWLQ(2gb)j>;QG+zzmzh}@l4YZ%VdiG zDjX_&Igc+Bc!B2D)v#)T#+Rn>Oo=@2J$R+WkPDJEPe)9b-~b3Lmm_944Dl5Aji3nt zUWNN^VRJ2a`zqmEh*jlQ$0uI-jGfthrdw$E&70GI`8QoNnpW`6|4cLU>+dE0xoORn zuDDt(1fx!>sl2zU#bPM0TVL0@oPa>Z?{=e)LsGY}44GTXRz(PbjxytzET&KZbToNi zu@DXO7(!vbP*sKm)yXG8HqNT!oYqBg8Qbb&3K%Ly{ z6}}fO67kFQB_eo7iHL2z#~`bMeI2^kG}iRho0}gVCaoJhc~f0;;zg8tjsHfje)kP3 zz4^g&v*@upa%c0y-@hiv1Z6w_wfR6q+_cqiY<|!}bH2M_6ae}O00eN?W3s2lz^(s& z`@RYP3xg2fC77J%^v%aQj=xNO{phg{hojNs^SuBCl!JvPz*r{!8E64v| zCZ$lGUiYJcboEbbpMI9`>J8mm?Xz@)!PwyK)_UsnMz2TL;PudMgU(ZTq`u)uw@c^N I!D9sf0b~a8*8l(j literal 0 HcmV?d00001 diff --git a/sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/BellState.qs b/sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/BellState.qs new file mode 100644 index 000000000000..5170b5fb2f4e --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/BellState.qs @@ -0,0 +1,11 @@ +namespace QSharpBellState { + open Microsoft.Quantum.Intrinsic; + + operation BellState() : (Result,Result) { + use q0 = Qubit(); + use q1 = Qubit(); + H(q0); + CNOT(q0, q1); + return (M(q0), M(q1)); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/ReadmeSamples.java b/sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/ReadmeSamples.java new file mode 100644 index 000000000000..3d0fddfbad1b --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/samples/java/com/azure/quantum/jobs/ReadmeSamples.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.quantum.jobs; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.quantum.jobs.models.BlobDetails; +import com.azure.quantum.jobs.models.JobDetails; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.BlobClientBuilder; +import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.BlobContainerClientBuilder; +import com.azure.storage.blob.models.BlobHttpHeaders; + +import java.nio.file.FileSystems; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * Class containing code snippets that will be injected to README.md. + */ +public class ReadmeSamples { + + private JobsClient jobsClient = new QuantumClientBuilder().buildJobsClient(); + private StorageClient storageClient = new QuantumClientBuilder().buildStorageClient(); + private String containerName = "containerName"; + private String containerUri = "containerUri"; + private String jobId = "jobId"; + + /** + * Code snippet for creating JobsClient and StorageClient + */ + public void getClients() { + // BEGIN: readme-sample-getClients + JobsClient jobsClient = new QuantumClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .host("{endpoint}") + .subscriptionId("{subscriptionId}") + .resourceGroupName("{resourceGroup}") + .workspaceName("{workspaceName}") + .buildJobsClient(); + + StorageClient storageClient = new QuantumClientBuilder() + .credential(new DefaultAzureCredentialBuilder().build()) + .host("{endpoint}") + .subscriptionId("{subscriptionId}") + .resourceGroupName("{resourceGroup}") + .workspaceName("{workspaceName}") + .buildStorageClient(); + // END: readme-sample-getClients + } + + /** + * Code snippet to create a storage container to store data for jobs. + */ + public void getContainerSasUri() { + // BEGIN: readme-sample-getContainerSasUri + // Get container URI with SAS key + String containerName = "{storageContainerName}"; + + // Create container if it doesn't already exist + BlobContainerClient containerClient = new BlobContainerClientBuilder() + .containerName(containerName) + .endpoint(containerUri) + .buildClient(); + if (!containerClient.exists()) { + containerClient.create(); + } + + // Get connection string to the container + String containerUri = storageClient.sasUri( + new BlobDetails().setContainerName(containerName) + ).getSasUri(); + // END: readme-sample-getContainerSasUri + } + + /** + * Code snippet to upload data to be used for jobs. + */ + public void uploadInputData() { + // BEGIN: readme-sample-uploadInputData + // Get input data blob Uri with SAS key + String blobName = "{blobName}"; + BlobDetails blobDetails = new BlobDetails() + .setContainerName(containerName) + .setBlobName(blobName); + BlobHttpHeaders blobHttpHeaders = new BlobHttpHeaders() + .setContentType("qir.v1"); + String inputDataUri = storageClient.sasUri(blobDetails).getSasUri(); + + // Upload input data to blob + BlobClient blobClient = new BlobClientBuilder() + .endpoint(inputDataUri) + .buildClient(); + String qirFilePath = FileSystems.getDefault().getPath("src/samples/java/com/azure/quantum/jobs/BellState.bc").toString(); + blobClient.uploadFromFile(qirFilePath, null, blobHttpHeaders, null, null, null, null); + // END: readme-sample-uploadInputData + } + + /** + * Code snippet to create a job. + */ + public void createTheJob() { + // BEGIN: readme-sample-createTheJob + String jobId = String.format("job-%s", UUID.randomUUID()); + Map inputParams = new HashMap(); + inputParams.put("entryPoint", "ENTRYPOINT__BellState"); + inputParams.put("arguments", new ArrayList()); + inputParams.put("targetCapability", "AdaptiveExecution"); + JobDetails createJobDetails = new JobDetails() + .setContainerUri(containerUri) + .setId(jobId) + .setInputDataFormat("qir.v1") + .setOutputDataFormat("microsoft.quantum-results.v1") + .setProviderId("quantinuum") + .setTarget("quantinuum.sim.h1-1e") + .setName("{jobName}") + .setInputParams(inputParams); + JobDetails jobDetails = jobsClient.create(jobId, createJobDetails); + // END: readme-sample-createTheJob + } + + /** + * Code snippet to get a job. + */ + public void getJob() { + // BEGIN: readme-sample-getJob + // Get the job that we've just created based on its jobId + JobDetails myJob = jobsClient.get(jobId); + // END: readme-sample-getJob + } + + /** + * Code snippet to list all jobs in a workspace. + */ + public void listJobs() { + // BEGIN: readme-sample-listJobs + PagedIterable jobs = jobsClient.list(); + jobs.forEach(job -> System.out.println(job.getName())); + // END: readme-sample-listJobs + } + +} diff --git a/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/BellState.bc b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/BellState.bc new file mode 100644 index 0000000000000000000000000000000000000000..0d9dc0bbee7f048b51cfe2bb24f6518cb90a6810 GIT binary patch literal 2308 zcmah~e@q+K9e@6L7jVudaT2qfox3{8EXG>fKx5CgWMiPDrP+~!M5j#l8QUYR2gVp; z$hw^|={eL%9ELP&%A`=SYV41Vt!#?6Xv5fHUSzd2S=VSqkzJgWO*BFai>fsnduO|Y zMCo?Yz31=e`|I=lzVACX+UIXK$N>-m09+F7!RKH8o%h^lb3dlsN#hRy(`-4Pm}7V zU2IHdo8Y@M=r81iy(LQgk*9Z!DQYw|aou-jPh2DxGcfL10)PW>*FP2ALAY7~`IUnS z1$hWA)nAsJnT|VM?i0j8?^}|7tB5UxsZbpMvG74LSsCq^kJr@x5=FO+ zF7sdS80qh{ZXsN{@pI>R+h!d3M?7BB_^!3GlSa3WlLZymdr!~QXkt!V|W%oJXj!n4J7 znZ~b^csi`SPK*B>w;MBdW1_fTNf{>XhN!?anR*5$eK>0RlfX2alKkN$>+fO%{z$L~ z2|3xIf(>3~tKWG^dJjndPGN;Owqlj$32Y5kL1>iAN!5Z)b%Vs=&@JciLSFedp319e zH_Y0f{ZZs*vAzE3do_ z3A9$5W+Rrl$o{dEA!avbQ|2p4VW2;NVyiz~#MYeBPjcdQLV8Cl zy+cSJP*|@FThU@ryq^>QHHQ@_>{G4!qcs{|2rF;p_pOo2yQDHrD&YyPk_WuRk4#tX zmMa3|WW<>5x(ZJp7CQoYwz8-EaL8uh{UhOwRaOKv@a&M0E`I{rr(l2Fl?zOd+S%6*vAxXwY0!BT>3GEZOk%ZWLQ(2gb)j>;QG+zzmzh}@l4YZ%VdiG zDjX_&Igc+Bc!B2D)v#)T#+Rn>Oo=@2J$R+WkPDJEPe)9b-~b3Lmm_944Dl5Aji3nt zUWNN^VRJ2a`zqmEh*jlQ$0uI-jGfthrdw$E&70GI`8QoNnpW`6|4cLU>+dE0xoORn zuDDt(1fx!>sl2zU#bPM0TVL0@oPa>Z?{=e)LsGY}44GTXRz(PbjxytzET&KZbToNi zu@DXO7(!vbP*sKm)yXG8HqNT!oYqBg8Qbb&3K%Ly{ z6}}fO67kFQB_eo7iHL2z#~`bMeI2^kG}iRho0}gVCaoJhc~f0;;zg8tjsHfje)kP3 zz4^g&v*@upa%c0y-@hiv1Z6w_wfR6q+_cqiY<|!}bH2M_6ae}O00eN?W3s2lz^(s& z`@RYP3xg2fC77J%^v%aQj=xNO{phg{hojNs^SuBCl!JvPz*r{!8E64v| zCZ$lGUiYJcboEbbpMI9`>J8mm?Xz@)!PwyK)_UsnMz2TL;PudMgU(ZTq`u)uw@c^N I!D9sf0b~a8*8l(j literal 0 HcmV?d00001 diff --git a/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/BellState.qs b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/BellState.qs new file mode 100644 index 000000000000..5170b5fb2f4e --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/BellState.qs @@ -0,0 +1,11 @@ +namespace QSharpBellState { + open Microsoft.Quantum.Intrinsic; + + operation BellState() : (Result,Result) { + use q0 = Qubit(); + use q1 = Qubit(); + H(q0); + CNOT(q0, q1); + return (M(q0), M(q1)); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/JobsClientTest.java b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/JobsClientTest.java new file mode 100644 index 000000000000..6bbebe7150e8 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/JobsClientTest.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.quantum.jobs; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.test.annotation.LiveOnly; +import com.azure.quantum.jobs.models.BlobDetails; +import com.azure.quantum.jobs.models.JobDetails; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.BlobClientBuilder; +import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.BlobContainerClientBuilder; +import com.azure.storage.blob.models.BlobHttpHeaders; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.nio.file.FileSystems; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.atomic.AtomicBoolean; + +import static org.junit.jupiter.api.Assertions.*; + +@LiveOnly +public class JobsClientTest extends QuantumClientTestBase { + // LiveOnly because "SAS URL and tokens cannot be stored in recordings." + private static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]"; + private JobsClient jobsClient; + private StorageClient storageClient; + + private void initializeClients(HttpClient httpClient) { + jobsClient = getClientBuilder(httpClient).buildJobsClient(); + storageClient = getClientBuilder(httpClient).buildStorageClient(); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("getHttpClients") + public void jobLifecycleTest(HttpClient httpClient) { + + initializeClients(httpClient); + + //set up job details + String containerName = "testcontainer"; + String containerUri = storageClient.sasUri(new BlobDetails().setContainerName(containerName)).getSasUri(); + String qirFilePath + = FileSystems.getDefault().getPath("src/samples/java/com/azure/quantum/jobs/BellState.bc").toString(); + BlobDetails d = new BlobDetails().setContainerName(containerName) + .setBlobName(String.format("input-%s.bc", testResourceNamer.randomUuid())); + BlobHttpHeaders blobHttpHeaders = new BlobHttpHeaders().setContentType("qir.v1"); + String inputDataUri = storageClient.sasUri(d).getSasUri(); + String jobId = String.format("%s", testResourceNamer.randomUuid()); + String jobName = String.format("javaSdkTest-%s", jobId); + String inputDataFormat = "qir.v1"; + String outputDataFormat = "microsoft.quantum-results.v1"; + String providerId = "quantinuum"; + String target = "quantinuum.sim.h1-1e"; + + //if in record mode, setup the storage account + if (!interceptorManager.isPlaybackMode()) { + // create container if it doesn't exist + BlobContainerClient containerClient + = new BlobContainerClientBuilder().containerName(containerName).endpoint(containerUri).buildClient(); + if (!containerClient.exists()) { + containerClient.create(); + } + + // upload input data to blob + BlobClient blobClient = new BlobClientBuilder().endpoint(inputDataUri).buildClient(); + blobClient.uploadFromFile(qirFilePath, null, blobHttpHeaders, null, null, null, null); + } + + //test create job + Map inputParams = new HashMap(); + inputParams.put("entryPoint", "ENTRYPOINT__BellState"); + inputParams.put("arguments", new ArrayList()); + inputParams.put("targetCapability", "AdaptiveExecution"); + JobDetails createJobDetails = new JobDetails().setContainerUri(containerUri) + .setId(jobId) + .setInputDataFormat(inputDataFormat) + .setOutputDataFormat(outputDataFormat) + .setProviderId(providerId) + .setTarget(target) + .setName(jobName) + .setInputParams(inputParams); + JobDetails jobDetails = jobsClient.create(jobId, createJobDetails); + + assertEquals(inputDataFormat, jobDetails.getInputDataFormat()); + assertEquals(outputDataFormat, jobDetails.getOutputDataFormat()); + assertEquals(providerId, jobDetails.getProviderId()); + assertEquals(target, jobDetails.getTarget()); + assertNotEquals(null, jobDetails.getId()); + assertNotEquals(null, jobDetails.getName()); + assertNotEquals(null, jobDetails.getInputDataUri()); + assertEquals(jobId, jobDetails.getId()); + assertEquals(jobName, jobDetails.getName()); + + //test list job + PagedIterable jobs = jobsClient.list(); + AtomicBoolean jobFound = new AtomicBoolean(false); + jobs.forEach(job -> { + if (job.getId().equals(jobId)) { + jobFound.set(true); + assertEquals(inputDataFormat, job.getInputDataFormat()); + assertEquals(outputDataFormat, job.getOutputDataFormat()); + assertEquals(providerId, job.getProviderId()); + assertEquals(target, job.getTarget()); + assertEquals(jobName, job.getName()); + } + }); + assertTrue(jobFound.get()); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/ProviderClientTest.java b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/ProviderClientTest.java new file mode 100644 index 000000000000..f85c86680861 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/ProviderClientTest.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.quantum.jobs; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.quantum.jobs.models.ProviderStatus; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.*; + +public class ProviderClientTest extends QuantumClientTestBase { + private static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]"; + private ProvidersClient client; + + private void initializeClient(HttpClient httpClient) { + client = getClientBuilder(httpClient).buildProvidersClient(); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("getHttpClients") + public void getStatusTest(HttpClient httpClient) { + initializeClient(httpClient); + + PagedIterable jobs = client.getStatus(); + AtomicInteger total = new AtomicInteger(); + + //check constant values on all jobs + jobs.forEach(status -> { + assertNotEquals(null, status.getId()); + assertNotEquals(null, status.getTargets()); + assertNotEquals(null, status.getCurrentAvailability()); + total.getAndIncrement(); + }); + // should be at least one in the list + assertTrue(total.intValue() >= 1); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/QuantumClientTestBase.java b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/QuantumClientTestBase.java new file mode 100644 index 000000000000..52c276854328 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/QuantumClientTestBase.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.quantum.jobs; + +import com.azure.core.http.HttpClient; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.models.BodilessMatcher; +import com.azure.core.test.models.CustomMatcher; +import com.azure.core.test.models.TestProxyRequestMatcher; +import com.azure.core.test.models.TestProxySanitizer; +import com.azure.core.test.models.TestProxySanitizerType; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.logging.LogLevel; +import com.azure.identity.AzureCliCredentialBuilder; +import com.azure.identity.AzureDeveloperCliCredentialBuilder; +import com.azure.identity.AzurePipelinesCredentialBuilder; +import com.azure.identity.AzurePowerShellCredentialBuilder; +import com.azure.identity.ChainedTokenCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.identity.EnvironmentCredentialBuilder; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class QuantumClientTestBase extends TestProxyTestBase { + private static final ClientLogger LOGGER = new ClientLogger(QuantumClientTestBase.class); + + private final String SANITIZED = "Sanitized"; + private final String SUBSCRIPTION_ID = "00000000-0000-0000-0000-000000000000"; + private final String RESOURCE_GROUP = "myresourcegroup"; + private final String WORKSPACE = "myworkspace"; + private final String LOCATION = "eastus"; + + QuantumClientBuilder getClientBuilder(HttpClient httpClient) { + + LOGGER.log(LogLevel.VERBOSE, () -> "Subscription id: " + getSubscriptionId()); + LOGGER.log(LogLevel.VERBOSE, () -> "Resource group: " + getResourceGroup()); + LOGGER.log(LogLevel.VERBOSE, () -> "Workspace: " + getWorkspaceName()); + LOGGER.log(LogLevel.VERBOSE, () -> "Location: " + getLocation()); + LOGGER.log(LogLevel.VERBOSE, () -> "Endpoint: " + getEndpoint()); + LOGGER.log(LogLevel.VERBOSE, () -> "Test mode: " + getTestMode()); + + QuantumClientBuilder builder = new QuantumClientBuilder(); + + if (interceptorManager.isPlaybackMode()) { + List customMatchers = new ArrayList<>(); + customMatchers.add(new BodilessMatcher()); + customMatchers.add(new CustomMatcher().setExcludedHeaders(Arrays.asList("Authorization", "Cookie"))); + interceptorManager.addMatchers(customMatchers); + + builder.httpClient(interceptorManager.getPlaybackClient()).credential(new MockTokenCredential()); + } else { + builder.httpClient(httpClient); + + if (interceptorManager.isRecordMode()) { + builder.credential(new DefaultAzureCredentialBuilder().build()) + .addPolicy(interceptorManager.getRecordPolicy()); + } else if (interceptorManager.isLiveMode()) { + Configuration config = Configuration.getGlobalConfiguration(); + + ChainedTokenCredentialBuilder chainedTokenCredentialBuilder + = new ChainedTokenCredentialBuilder().addLast(new EnvironmentCredentialBuilder().build()) + .addLast(new AzureCliCredentialBuilder().build()) + .addLast(new AzureDeveloperCliCredentialBuilder().build()) + .addLast(new AzurePowerShellCredentialBuilder().build()); + + String serviceConnectionId = config.get("AZURESUBSCRIPTION_SERVICE_CONNECTION_ID"); + String clientId = config.get("AZURESUBSCRIPTION_CLIENT_ID"); + String tenantId = config.get("AZURESUBSCRIPTION_TENANT_ID"); + String systemAccessToken = config.get("SYSTEM_ACCESSTOKEN"); + + if (!CoreUtils.isNullOrEmpty(serviceConnectionId) + && !CoreUtils.isNullOrEmpty(clientId) + && !CoreUtils.isNullOrEmpty(tenantId) + && !CoreUtils.isNullOrEmpty(systemAccessToken)) { + + chainedTokenCredentialBuilder + .addLast(new AzurePipelinesCredentialBuilder().systemAccessToken(systemAccessToken) + .clientId(clientId) + .tenantId(tenantId) + .serviceConnectionId(serviceConnectionId) + .build()); + } + + builder.credential(chainedTokenCredentialBuilder.build()); + } + } + + if (interceptorManager.isRecordMode() || interceptorManager.isPlaybackMode()) { + List customSanitizers = new ArrayList<>(); + + customSanitizers + .add(new TestProxySanitizer(getSubscriptionId(), SUBSCRIPTION_ID, TestProxySanitizerType.BODY_REGEX)); + customSanitizers + .add(new TestProxySanitizer(getResourceGroup(), RESOURCE_GROUP, TestProxySanitizerType.BODY_REGEX)); + customSanitizers + .add(new TestProxySanitizer(getWorkspaceName(), WORKSPACE, TestProxySanitizerType.BODY_REGEX)); + customSanitizers.add(new TestProxySanitizer(getLocation(), LOCATION, TestProxySanitizerType.BODY_REGEX)); + customSanitizers + .add(new TestProxySanitizer(getSubscriptionId(), SUBSCRIPTION_ID, TestProxySanitizerType.URL)); + customSanitizers + .add(new TestProxySanitizer(getResourceGroup(), RESOURCE_GROUP, TestProxySanitizerType.URL)); + customSanitizers.add(new TestProxySanitizer(getWorkspaceName(), WORKSPACE, TestProxySanitizerType.URL)); + customSanitizers.add(new TestProxySanitizer(getLocation(), LOCATION, TestProxySanitizerType.URL)); + customSanitizers.add(new TestProxySanitizer("(?:\\\\?(sv|sig|se|srt|ss|sp)=)(?.*)", SANITIZED, + TestProxySanitizerType.BODY_REGEX).setGroupForReplace("secret")); + customSanitizers.add(new TestProxySanitizer("$..sasUri", null, SANITIZED, TestProxySanitizerType.BODY_KEY)); + customSanitizers + .add(new TestProxySanitizer("$..containerUri", null, SANITIZED, TestProxySanitizerType.BODY_KEY)); + customSanitizers + .add(new TestProxySanitizer("$..inputDataUri", null, SANITIZED, TestProxySanitizerType.BODY_KEY)); + customSanitizers + .add(new TestProxySanitizer("$..outputDataUri", null, SANITIZED, TestProxySanitizerType.BODY_KEY)); + interceptorManager.addSanitizers(customSanitizers); + } + + return builder.subscriptionId(getSubscriptionId()) + .resourceGroupName(getResourceGroup()) + .workspaceName(getWorkspaceName()) + .host(getEndpoint()); + } + + String getEndpoint() { + return String.format("https://%s.quantum.azure.com", getLocation()); + } + + String getLocation() { + return Configuration.getGlobalConfiguration().get("AZURE_QUANTUM_WORKSPACE_LOCATION", LOCATION); + } + + String getSubscriptionId() { + return Configuration.getGlobalConfiguration() + .get(Configuration.PROPERTY_AZURE_SUBSCRIPTION_ID, SUBSCRIPTION_ID); + } + + String getResourceGroup() { + return Configuration.getGlobalConfiguration().get(Configuration.PROPERTY_AZURE_RESOURCE_GROUP, RESOURCE_GROUP); + } + + String getWorkspaceName() { + return Configuration.getGlobalConfiguration().get("AZURE_QUANTUM_WORKSPACE_NAME", WORKSPACE); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/QuotasClientTest.java b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/QuotasClientTest.java new file mode 100644 index 000000000000..465a7978bf41 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/QuotasClientTest.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.quantum.jobs; + +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.quantum.jobs.models.Quota; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.*; + +public class QuotasClientTest extends QuantumClientTestBase { + private static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]"; + private QuotasClient client; + + private void initializeClient(HttpClient httpClient) { + client = getClientBuilder(httpClient).buildQuotasClient(); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("getHttpClients") + public void listTest(HttpClient httpClient) { + initializeClient(httpClient); + + PagedIterable quotas = client.list(); + AtomicInteger total = new AtomicInteger(); + + //check constant values on all jobs + quotas.forEach(quota -> { + assertNotEquals(null, quota.getDimension()); + assertNotEquals(null, quota.getScope()); + assertNotEquals(null, quota.getProviderId()); + assertNotEquals(null, quota.getUtilization()); + assertNotEquals(null, quota.getHolds()); + assertNotEquals(null, quota.getLimit()); + assertNotEquals(null, quota.getPeriod()); + total.getAndIncrement(); + }); + // should be at least one in the list + assertTrue(total.intValue() >= 1); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/StorageClientTest.java b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/StorageClientTest.java new file mode 100644 index 000000000000..335e834aee21 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/test/java/com/azure/quantum/jobs/StorageClientTest.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.quantum.jobs; + +import com.azure.core.http.HttpClient; +import com.azure.quantum.jobs.models.BlobDetails; +import com.azure.quantum.jobs.models.SasUriResponse; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +public class StorageClientTest extends QuantumClientTestBase { + + private static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]"; + private StorageClient client; + + private void initializeClient(HttpClient httpClient) { + client = getClientBuilder(httpClient).buildStorageClient(); + } + + @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) + @MethodSource("getHttpClients") + public void sasUriTest(HttpClient httpClient) { + initializeClient(httpClient); + + String containerName = "testcontainer"; + SasUriResponse response = client.sasUri(new BlobDetails().setContainerName(containerName)); + + assertNotEquals(null, response); + assertNotEquals(null, response.getSasUri()); + } +} diff --git a/sdk/quantum/azure-quantum-jobs/src/test/resources/problem.json b/sdk/quantum/azure-quantum-jobs/src/test/resources/problem.json new file mode 100644 index 000000000000..f15d9ee91978 --- /dev/null +++ b/sdk/quantum/azure-quantum-jobs/src/test/resources/problem.json @@ -0,0 +1,32 @@ +{ + "cost_function": { + "version": "1.0", + "type": "ising", + "terms": [ + { + "c": -3, + "ids": [ 1, 0 ] + }, + { + "c": 5, + "ids": [ 2, 0 ] + }, + { + "c": 9, + "ids": [ 2, 1 ] + }, + { + "c": 2, + "ids": [ 3, 0 ] + }, + { + "c": -4, + "ids": [ 3, 1 ] + }, + { + "c": 4, + "ids": [ 3, 2 ] + } + ] + } +} diff --git a/sdk/quantum/ci.yml b/sdk/quantum/ci.yml index f57e399147bc..d51f2f37e17d 100644 --- a/sdk/quantum/ci.yml +++ b/sdk/quantum/ci.yml @@ -11,6 +11,7 @@ trigger: - sdk/quantum/ exclude: - sdk/quantum/pom.xml + - sdk/quantum/azure-quantum-jobs/pom.xml - sdk/quantum/azure-resourcemanager-quantum/pom.xml pr: @@ -25,6 +26,7 @@ pr: - sdk/quantum/ exclude: - sdk/quantum/pom.xml + - sdk/quantum/azure-quantum-jobs/pom.xml - sdk/quantum/azure-resourcemanager-quantum/pom.xml parameters: @@ -33,11 +35,20 @@ parameters: type: boolean default: false + - name: release_azurequantumjobs + displayName: azure-quantum-jobs + type: boolean + default: true + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: quantum Artifacts: + - name: azure-quantum-jobs + groupId: com.azure + safeName: azurequantumjobs + releaseInBatch: ${{ parameters.release_azurequantumjobs }} - name: azure-resourcemanager-quantum groupId: com.azure.resourcemanager safeName: azureresourcemanagerquantum diff --git a/sdk/quantum/pom.xml b/sdk/quantum/pom.xml index 162cbe8866e3..7a3716b84fe6 100644 --- a/sdk/quantum/pom.xml +++ b/sdk/quantum/pom.xml @@ -9,6 +9,7 @@ 1.0.0 + azure-quantum-jobs azure-resourcemanager-quantum diff --git a/sdk/redis/azure-resourcemanager-redis/pom.xml b/sdk/redis/azure-resourcemanager-redis/pom.xml index 3d2fab9d79f9..8a85f1434606 100644 --- a/sdk/redis/azure-resourcemanager-redis/pom.xml +++ b/sdk/redis/azure-resourcemanager-redis/pom.xml @@ -84,7 +84,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml index b348db14b8ac..6888e760d824 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml @@ -74,7 +74,7 @@ com.azure.resourcemanager azure-resourcemanager-compute - 2.62.0 + 2.61.2 test diff --git a/sdk/resourcemanager/autocent.js b/sdk/resourcemanager/autocent.js index 0f0ae5bce0c2..bed3e1f50e1c 100644 --- a/sdk/resourcemanager/autocent.js +++ b/sdk/resourcemanager/autocent.js @@ -13,6 +13,9 @@ const pkgRegEx2 = /Package\s+tag\s+(.+)\. com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 com.azure.resourcemanager azure-resourcemanager-compute - 2.62.0 + 2.61.2 com.azure.resourcemanager azure-resourcemanager-network - 2.62.0 + 2.61.2 com.azure.resourcemanager @@ -142,7 +142,7 @@ com.azure.resourcemanager azure-resourcemanager-containerservice - 2.65.0 + 2.64.2 com.azure.resourcemanager diff --git a/sdk/resourcemanager/docs/SINGLE_SERVICE_PACKAGES.md b/sdk/resourcemanager/docs/SINGLE_SERVICE_PACKAGES.md index dfea2cc7a803..b596d270e43c 100644 --- a/sdk/resourcemanager/docs/SINGLE_SERVICE_PACKAGES.md +++ b/sdk/resourcemanager/docs/SINGLE_SERVICE_PACKAGES.md @@ -1499,6 +1499,30 @@ service * [1.0.0-beta.1](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-migrationdiscoverysap/1.0.0-beta.1) +
      +
      + mobilenetwork + +* [package-2024-04](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager#tag-package-2024-04) + * [1.3.0](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.3.0) + * [1.2.0](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.2.0) +* [package-2024-02](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager#tag-package-2024-02) + * [1.1.0](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.1.0) +* [package-2023-09](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager#tag-package-2023-09) + * [1.0.0](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.0.0) +* [package-2023-06](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager#tag-package-2023-06) + * [1.0.0-beta.6](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.0.0-beta.6) +* [package-2022-11-01](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager#tag-package-2022-11-01) + * [1.0.0-beta.5](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.0.0-beta.5) + * [1.0.0-beta.4](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.0.0-beta.4) +* [package-2022-04-01-preview](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager#tag-package-2022-04-01-preview) + * [1.0.0-beta.3](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.0.0-beta.3) +* [package-2022-03-01-preview](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager#tag-package-2022-03-01-preview) + * [1.0.0-beta.2](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.0.0-beta.2) +* [package-2022-01-01-preview](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager#tag-package-2022-01-01-preview) + * [1.0.0-beta.1](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-mobilenetwork/1.0.0-beta.1) +
      +
      mysql diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientTest.java index 206cc29a186c..8e607a15a11a 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationAsyncClientTest.java @@ -38,6 +38,7 @@ import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlWriter; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -527,7 +528,7 @@ void deleteRuleWithResponse() { // Act & Assert StepVerifier.create(client.deleteRuleWithResponse(topicName, subscriptionName, ruleName)) - .assertNext(actual -> assertEquals(204, actual.getStatusCode())) + .assertNext(actual -> assertEquals(actual.getStatusCode(), HttpResponseStatus.NO_CONTENT.code())) .expectComplete() .verify(DEFAULT_TIMEOUT); } @@ -554,7 +555,7 @@ void deleteSubscriptionWithResponse() { // Act & Assert StepVerifier.create(client.deleteSubscriptionWithResponse(topicName, subscriptionName)) - .assertNext(actual -> assertEquals(204, actual.getStatusCode())) + .assertNext(actual -> assertEquals(actual.getStatusCode(), HttpResponseStatus.NO_CONTENT.code())) .expectComplete() .verify(DEFAULT_TIMEOUT); } @@ -580,7 +581,7 @@ void deleteTopicWithResponse() { // Act & Assert StepVerifier.create(client.deleteTopicWithResponse(topicName)) - .assertNext(actual -> assertEquals(204, actual.getStatusCode())) + .assertNext(actual -> assertEquals(actual.getStatusCode(), HttpResponseStatus.NO_CONTENT.code())) .expectComplete() .verify(DEFAULT_TIMEOUT); } diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClientTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClientTest.java index c5c780ed6db3..9d8174d3acc2 100644 --- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClientTest.java +++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/administration/ServiceBusAdministrationClientTest.java @@ -36,6 +36,7 @@ import com.azure.messaging.servicebus.administration.models.QueueProperties; import com.azure.messaging.servicebus.administration.models.QueueRuntimeProperties; import com.azure.messaging.servicebus.administration.models.SubscriptionProperties; +import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -507,7 +508,7 @@ void deleteRuleWithResponse() { final Response actual = client.deleteRuleWithResponse(topicName, subscriptionName, ruleName, context); // Assert - assertEquals(204, actual.getStatusCode()); + assertEquals(actual.getStatusCode(), HttpResponseStatus.NO_CONTENT.code()); } @Test @@ -533,7 +534,7 @@ void deleteSubscriptionWithResponse() { final Response actual = client.deleteSubscriptionWithResponse(topicName, subscriptionName, context); // Assert - assertEquals(204, actual.getStatusCode()); + assertEquals(actual.getStatusCode(), HttpResponseStatus.NO_CONTENT.code()); } @Test @@ -559,7 +560,7 @@ void deleteTopicWithResponse() { final Response actual = client.deleteTopicWithResponse(topicName, context); // Assert - assertEquals(204, actual.getStatusCode()); + assertEquals(actual.getStatusCode(), HttpResponseStatus.NO_CONTENT.code()); } /** diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/CHANGELOG.md b/sdk/spring/spring-cloud-azure-autoconfigure/CHANGELOG.md index 8c3881a6746d..5114a28e73ae 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/CHANGELOG.md +++ b/sdk/spring/spring-cloud-azure-autoconfigure/CHANGELOG.md @@ -10,8 +10,6 @@ ### Other Changes -- Aligned Reactor version resolution and test HTTP transport dependencies with Netty 4.2, and added offline transport compatibility tests. - ## 7.4.0 (2026-07-24) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#740-2026-07-24) for more details. @@ -255,3 +253,4 @@ Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-jav ## 4.0.0-beta.2 (2021-11-22) Please refer to [spring/CHANGELOG.md](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CHANGELOG.md#400-beta2-2021-11-22) for more details. + diff --git a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml index 1cadcdb71fe5..2c1dc467d888 100644 --- a/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml +++ b/sdk/spring/spring-cloud-azure-autoconfigure/pom.xml @@ -102,12 +102,6 @@ lettuce-core 7.5.2.RELEASE true - - - io.projectreactor - reactor-core - - org.springframework.boot @@ -199,7 +193,7 @@ com.azure azure-core - 1.61.0-beta.1 + 1.60.0 true @@ -289,7 +283,7 @@ com.azure azure-security-keyvault-jca - 2.13.0 + 2.12.0 true @@ -423,13 +417,6 @@ - - - com.azure - azure-core-http-netty - 1.17.0-beta.1 - test - org.springframework.boot spring-boot-starter-test diff --git a/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml b/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml index f0277e20afdc..fe0fb0cb7894 100644 --- a/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml +++ b/sdk/spring/spring-cloud-azure-starter-keyvault-jca/pom.xml @@ -64,7 +64,7 @@ com.azure azure-security-keyvault-jca - 2.13.0 + 2.12.0 diff --git a/sdk/sql/azure-resourcemanager-sql/pom.xml b/sdk/sql/azure-resourcemanager-sql/pom.xml index f50eafce2485..e160bdb10637 100644 --- a/sdk/sql/azure-resourcemanager-sql/pom.xml +++ b/sdk/sql/azure-resourcemanager-sql/pom.xml @@ -72,7 +72,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 com.azure.resourcemanager diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml b/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml index 8e98d63c21ff..536ad99bf6ae 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml +++ b/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml @@ -77,7 +77,7 @@ com.azure.resourcemanager azure-resourcemanager-compute - 2.62.0 + 2.61.2 test diff --git a/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md b/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md index ab7ef2c52bad..e6db05b12a16 100644 --- a/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md +++ b/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.60.0-beta.1 (Unreleased) +## 2.59.0-beta.1 (Unreleased) ### Features Added @@ -10,119 +10,6 @@ ### Other Changes -## 2.59.0 (2026-10-13) - -- Package api-version 2026-09-01. - -### Features Added - -* `models.BlobAccessPointAccessKeyAuthProperties` was added - -* `models.BlobAccessPointEndpointConnectionPropertiesUpdate` was added - -* `models.ResourceProvisioningState` was added - -* `models.BlobAccessPointConnectionPropertiesUpdate` was added - -* `models.BlobAccessPointAccessKeyAuthPropertiesUpdate` was added - -* `models.BlobAccessPointNetAppOntapSourceProperties` was added - -* `models.BlobAccessPointGenericS3SourcePropertiesUpdate` was added - -* `models.BlobAccessPointDellOneFsSourcePropertiesUpdate` was added - -* `models.BlobAccessPointQumuloSourceProperties` was added - -* `models.BlobAccessPointProposedConnectionTestRequest` was added - -* `models.BlobAccessPointConnectionTestRequest` was added - -* `models.BlobAccessPointTlsVerification` was added - -* `models.BlobAccessPointRemoteAuthProperties` was added - -* `models.BlobAccessPointSourceType` was added - -* `models.BlobAccessPointRemoteAuthType` was added - -* `models.BlobAccessPointConfigurationUpdate` was added - -* `models.TurboTierStatus` was added - -* `models.BlobAccessPointPrivateLinkIdType` was added - -* `models.TurboTier` was added - -* `models.BlobAccessPointSourcePropertiesUpdate` was added - -* `models.BlobAccessPointNasuniSourceProperties` was added - -* `models.BlobAccessPointPrivateLinkConnectionPropertiesUpdate` was added - -* `models.BlobAccessPointQumuloSourcePropertiesUpdate` was added - -* `models.BlobAccessPointConnectionTestStatus` was added - -* `models.BlobAccessPointConfigurationConnection` was added - -* `models.BlobAccessPointConnectionType` was added - -* `models.BlobAccessPointNetAppOntapSourcePropertiesUpdate` was added - -* `models.ContextCacheCheckNameAvailabilityParameters` was added - -* `models.BlobAccessPointAzureNetAppFilesSourceProperties` was added - -* `models.BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate` was added - -* `models.BlobAccessPointConfigurationProperties` was added - -* `models.BlobAccessPointConfigurationState` was added - -* `models.BlobAccessPointConnectionProperties` was added - -* `models.BlobAccessPointGenericS3SourceProperties` was added - -* `models.BlobAccessPointCommvaultSourcePropertiesUpdate` was added - -* `models.BlobAccessPointEndpointConnectionProperties` was added - -* `models.BlobAccessPointCommvaultSourceProperties` was added - -* `models.BlobAccessPointNasuniSourcePropertiesUpdate` was added - -* `models.ContextCacheCheckNameAvailabilityFailureReason` was added - -* `models.BlobAccessPointRemoteAuthPropertiesUpdate` was added - -* `models.BlobAccessPointConfigurationPropertiesUpdate` was added - -* `models.BlobAccessPointDellOneFsSourceProperties` was added - -* `models.BlobAccessPointPrivateLinkConnectionProperties` was added - -* `models.BlobAccessPointSourceProperties` was added - -#### `models.StorageAccountUpdateParameters` was modified - -* `withTurboTier(models.TurboTier)` was added -* `turboTier()` was added - -#### `models.NspAccessRuleProperties` was modified - -* `serviceTags()` was added - -#### `models.StorageDataCollaborationPolicyProperties` was modified - -* `withAllowBlobAccessPoints(java.lang.Boolean)` was added -* `allowBlobAccessPoints()` was added - -#### `models.StorageAccountCreateParameters` was modified - -* `withTurboTier(models.TurboTier)` was added -* `turboTier()` was added - ## 2.58.2 (2026-10-09) ### Other Changes diff --git a/sdk/storage/azure-resourcemanager-storage/README.md b/sdk/storage/azure-resourcemanager-storage/README.md index c1017b5faf95..41b42838bcb7 100644 --- a/sdk/storage/azure-resourcemanager-storage/README.md +++ b/sdk/storage/azure-resourcemanager-storage/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storage/azure-resourcemanager-storage/pom.xml b/sdk/storage/azure-resourcemanager-storage/pom.xml index 2275b25cb91e..601d668ac006 100644 --- a/sdk/storage/azure-resourcemanager-storage/pom.xml +++ b/sdk/storage/azure-resourcemanager-storage/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.60.0-beta.1 + 2.59.0-beta.1 jar Microsoft Azure SDK for Storage Management diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConfigurationsClient.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConfigurationsClient.java deleted file mode 100644 index 6d73b854897d..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConfigurationsClient.java +++ /dev/null @@ -1,638 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.storage.fluent.models.BlobAccessPointConfigurationInner; -import com.azure.resourcemanager.storage.fluent.models.BlobAccessPointConnectionTestResponseInner; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationUpdate; -import com.azure.resourcemanager.storage.models.BlobAccessPointConnectionTestRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BlobAccessPointConfigurationsClient. - */ -public interface BlobAccessPointConfigurationsClient { - /** - * Get the specified Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Blob Access Point configuration along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName); - - /** - * Get the specified Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Blob Access Point configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName); - - /** - * Get the specified Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Blob Access Point configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, Context context); - - /** - * Get the specified Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Blob Access Point configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BlobAccessPointConfigurationInner get(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName); - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource); - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, BlobAccessPointConfigurationInner> beginCreateAsync( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationInner resource); - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BlobAccessPointConfigurationInner> beginCreate( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationInner resource); - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BlobAccessPointConfigurationInner> beginCreate( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationInner resource, Context context); - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource); - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage - * Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BlobAccessPointConfigurationInner create(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource); - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage - * Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BlobAccessPointConfigurationInner create(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource, Context context); - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties); - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, BlobAccessPointConfigurationInner> beginUpdateAsync( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationUpdate properties); - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BlobAccessPointConfigurationInner> beginUpdate( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationUpdate properties); - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BlobAccessPointConfigurationInner> beginUpdate( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationUpdate properties, Context context); - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties); - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage - * Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BlobAccessPointConfigurationInner update(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties); - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage - * Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BlobAccessPointConfigurationInner update(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties, Context context); - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName); - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName); - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName); - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, Context context); - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String accountName, String blobAccessPointConfigurationName); - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String blobAccessPointConfigurationName); - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String blobAccessPointConfigurationName, Context context); - - /** - * List all Blob Access Point configurations in a Storage Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByStorageAccountAsync(String resourceGroupName, - String accountName); - - /** - * List all Blob Access Point configurations in a Storage Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByStorageAccount(String resourceGroupName, String accountName); - - /** - * List all Blob Access Point configurations in a Storage Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByStorageAccount(String resourceGroupName, String accountName, - Context context); - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> testExistingConnectionWithResponseAsync(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body); - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, BlobAccessPointConnectionTestResponseInner> - beginTestExistingConnectionAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body); - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BlobAccessPointConnectionTestResponseInner> - beginTestExistingConnection(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body); - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BlobAccessPointConnectionTestResponseInner> - beginTestExistingConnection(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body, Context context); - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono testExistingConnectionAsync(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body); - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BlobAccessPointConnectionTestResponseInner testExistingConnection(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body); - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BlobAccessPointConnectionTestResponseInner testExistingConnection(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body, Context context); -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConnectionTestsClient.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConnectionTestsClient.java deleted file mode 100644 index 96e41ae74c79..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConnectionTestsClient.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.storage.fluent.models.BlobAccessPointConnectionTestResponseInner; -import com.azure.resourcemanager.storage.models.BlobAccessPointProposedConnectionTestRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BlobAccessPointConnectionTestsClient. - */ -public interface BlobAccessPointConnectionTestsClient { - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> testProposedConnectionWithResponseAsync(String resourceGroupName, - String accountName, BlobAccessPointProposedConnectionTestRequest body); - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, BlobAccessPointConnectionTestResponseInner> - beginTestProposedConnectionAsync(String resourceGroupName, String accountName, - BlobAccessPointProposedConnectionTestRequest body); - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BlobAccessPointConnectionTestResponseInner> - beginTestProposedConnection(String resourceGroupName, String accountName, - BlobAccessPointProposedConnectionTestRequest body); - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BlobAccessPointConnectionTestResponseInner> - beginTestProposedConnection(String resourceGroupName, String accountName, - BlobAccessPointProposedConnectionTestRequest body, Context context); - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono testProposedConnectionAsync(String resourceGroupName, - String accountName, BlobAccessPointProposedConnectionTestRequest body); - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BlobAccessPointConnectionTestResponseInner testProposedConnection(String resourceGroupName, String accountName, - BlobAccessPointProposedConnectionTestRequest body); - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BlobAccessPointConnectionTestResponseInner testProposedConnection(String resourceGroupName, String accountName, - BlobAccessPointProposedConnectionTestRequest body, Context context); -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ContextCachesClient.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ContextCachesClient.java index 71967f1c8f0c..7a13c8bd1d93 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ContextCachesClient.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ContextCachesClient.java @@ -16,9 +16,7 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import com.azure.resourcemanager.storage.fluent.models.ContextCacheCheckNameAvailabilityResultInner; import com.azure.resourcemanager.storage.fluent.models.ContextCacheInner; -import com.azure.resourcemanager.storage.models.ContextCacheCheckNameAvailabilityParameters; import com.azure.resourcemanager.storage.models.ContextCacheUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -455,58 +453,4 @@ ContextCacheInner update(String resourceGroupName, String contextCacheName, Cont */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - - /** - * Check the availability of a context cache resource name. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the context cache name availability check along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> - checkNameAvailabilityWithResponseAsync(ContextCacheCheckNameAvailabilityParameters body); - - /** - * Check the availability of a context cache resource name. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the context cache name availability check on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono - checkNameAvailabilityAsync(ContextCacheCheckNameAvailabilityParameters body); - - /** - * Check the availability of a context cache resource name. - * - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the context cache name availability check along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response - checkNameAvailabilityWithResponse(ContextCacheCheckNameAvailabilityParameters body, Context context); - - /** - * Check the availability of a context cache resource name. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the context cache name availability check. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContextCacheCheckNameAvailabilityResultInner - checkNameAvailability(ContextCacheCheckNameAvailabilityParameters body); } diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClient.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClient.java index 591e10380500..99e1d7e3f655 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClient.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClient.java @@ -179,20 +179,6 @@ public interface StorageManagementClient { */ ContextCacheContainersClient getContextCacheContainers(); - /** - * Gets the BlobAccessPointConfigurationsClient object to access its operations. - * - * @return the BlobAccessPointConfigurationsClient object. - */ - BlobAccessPointConfigurationsClient getBlobAccessPointConfigurations(); - - /** - * Gets the BlobAccessPointConnectionTestsClient object to access its operations. - * - * @return the BlobAccessPointConnectionTestsClient object. - */ - BlobAccessPointConnectionTestsClient getBlobAccessPointConnectionTests(); - /** * Gets the AdvancedPlatformMetricsClient object to access its operations. * diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConfigurationInner.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConfigurationInner.java deleted file mode 100644 index 8a6e56bc29c8..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConfigurationInner.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationProperties; -import java.io.IOException; -import java.util.Map; - -/** - * A BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account. - */ -@Fluent -public final class BlobAccessPointConfigurationInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private BlobAccessPointConfigurationProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of BlobAccessPointConfigurationInner class. - */ - public BlobAccessPointConfigurationInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public BlobAccessPointConfigurationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the BlobAccessPointConfigurationInner object itself. - */ - public BlobAccessPointConfigurationInner withProperties(BlobAccessPointConfigurationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public BlobAccessPointConfigurationInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BlobAccessPointConfigurationInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model BlobAccessPointConfigurationInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointConfigurationInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConfigurationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConfigurationInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointConfigurationInner. - */ - public static BlobAccessPointConfigurationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConfigurationInner deserializedBlobAccessPointConfigurationInner - = new BlobAccessPointConfigurationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedBlobAccessPointConfigurationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedBlobAccessPointConfigurationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedBlobAccessPointConfigurationInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBlobAccessPointConfigurationInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBlobAccessPointConfigurationInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedBlobAccessPointConfigurationInner.properties - = BlobAccessPointConfigurationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedBlobAccessPointConfigurationInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConfigurationInner; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConnectionTestResponseInner.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConnectionTestResponseInner.java deleted file mode 100644 index 462edc82d718..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConnectionTestResponseInner.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The result of testing a Blob Access Point configuration connection. - */ -@Immutable -public final class BlobAccessPointConnectionTestResponseInner - implements JsonSerializable { - /* - * The name of the request attempted against the backing data source. - */ - private String methodName; - - /* - * A normalized and redacted error message received from the backing data source. This value is empty when the - * connection test succeeds. - */ - private String errorMessage; - - /* - * The request ID associated with the request sent to the backing data source for validation. - */ - private String requestId; - - /** - * Creates an instance of BlobAccessPointConnectionTestResponseInner class. - */ - private BlobAccessPointConnectionTestResponseInner() { - } - - /** - * Get the methodName property: The name of the request attempted against the backing data source. - * - * @return the methodName value. - */ - public String methodName() { - return this.methodName; - } - - /** - * Get the errorMessage property: A normalized and redacted error message received from the backing data source. - * This value is empty when the connection test succeeds. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the requestId property: The request ID associated with the request sent to the backing data source for - * validation. - * - * @return the requestId value. - */ - public String requestId() { - return this.requestId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (methodName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property methodName in model BlobAccessPointConnectionTestResponseInner")); - } - if (requestId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property requestId in model BlobAccessPointConnectionTestResponseInner")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointConnectionTestResponseInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("methodName", this.methodName); - jsonWriter.writeStringField("requestId", this.requestId); - jsonWriter.writeStringField("errorMessage", this.errorMessage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConnectionTestResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConnectionTestResponseInner if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointConnectionTestResponseInner. - */ - public static BlobAccessPointConnectionTestResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConnectionTestResponseInner deserializedBlobAccessPointConnectionTestResponseInner - = new BlobAccessPointConnectionTestResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("methodName".equals(fieldName)) { - deserializedBlobAccessPointConnectionTestResponseInner.methodName = reader.getString(); - } else if ("requestId".equals(fieldName)) { - deserializedBlobAccessPointConnectionTestResponseInner.requestId = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedBlobAccessPointConnectionTestResponseInner.errorMessage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConnectionTestResponseInner; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobContainerInner.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobContainerInner.java index a9a3de2dfbfe..4df7cfd1c0be 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobContainerInner.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobContainerInner.java @@ -10,7 +10,6 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationConnection; import com.azure.resourcemanager.storage.models.ImmutabilityPolicyProperties; import com.azure.resourcemanager.storage.models.ImmutableStorageWithVersioning; import com.azure.resourcemanager.storage.models.LeaseDuration; @@ -409,36 +408,6 @@ public BlobContainerInner withEnableNfsV3AllSquash(Boolean enableNfsV3AllSquash) return this; } - /** - * Get the blobAccessPointConfiguration property: Configuration that attaches this container to a Blob Access Point. - * If set, the container is a read-only virtual container whose read/list requests are forwarded to the connected - * backing data store. Cannot be changed, removed, or added after container creation. - * - * @return the blobAccessPointConfiguration value. - */ - public BlobAccessPointConfigurationConnection blobAccessPointConfiguration() { - return this.innerContainerProperties() == null - ? null - : this.innerContainerProperties().blobAccessPointConfiguration(); - } - - /** - * Set the blobAccessPointConfiguration property: Configuration that attaches this container to a Blob Access Point. - * If set, the container is a read-only virtual container whose read/list requests are forwarded to the connected - * backing data store. Cannot be changed, removed, or added after container creation. - * - * @param blobAccessPointConfiguration the blobAccessPointConfiguration value to set. - * @return the BlobContainerInner object itself. - */ - public BlobContainerInner - withBlobAccessPointConfiguration(BlobAccessPointConfigurationConnection blobAccessPointConfiguration) { - if (this.innerContainerProperties() == null) { - this.innerContainerProperties = new ContainerProperties(); - } - this.innerContainerProperties().withBlobAccessPointConfiguration(blobAccessPointConfiguration); - return this; - } - /** * Validates the instance. * diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/ContainerProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/ContainerProperties.java index 609c723d0fac..1a01d3c5b368 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/ContainerProperties.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/ContainerProperties.java @@ -10,7 +10,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationConnection; import com.azure.resourcemanager.storage.models.ImmutabilityPolicyProperties; import com.azure.resourcemanager.storage.models.ImmutableStorageWithVersioning; import com.azure.resourcemanager.storage.models.LeaseDuration; @@ -127,13 +126,6 @@ public final class ContainerProperties implements JsonSerializable { - /* - * A boolean value that indicates whether the context cache name is available to use. If true, the name is - * available. If false, the name has already been taken or is invalid and cannot be used. - */ - private boolean nameAvailable; - - /* - * The reason why the context cache name is not available. The Reason element is only returned if NameAvailable is - * false - */ - private ContextCacheCheckNameAvailabilityFailureReason reason; - - /* - * The error message providing additional information about the context cache name availability check failure. - */ - private String message; - - /** - * Creates an instance of ContextCacheCheckNameAvailabilityResultInner class. - */ - private ContextCacheCheckNameAvailabilityResultInner() { - } - - /** - * Get the nameAvailable property: A boolean value that indicates whether the context cache name is available to - * use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used. - * - * @return the nameAvailable value. - */ - public boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Get the reason property: The reason why the context cache name is not available. The Reason element is only - * returned if NameAvailable is false. - * - * @return the reason value. - */ - public ContextCacheCheckNameAvailabilityFailureReason reason() { - return this.reason; - } - - /** - * Get the message property: The error message providing additional information about the context cache name - * availability check failure. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContextCacheCheckNameAvailabilityResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContextCacheCheckNameAvailabilityResultInner if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContextCacheCheckNameAvailabilityResultInner. - */ - public static ContextCacheCheckNameAvailabilityResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContextCacheCheckNameAvailabilityResultInner deserializedContextCacheCheckNameAvailabilityResultInner - = new ContextCacheCheckNameAvailabilityResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nameAvailable".equals(fieldName)) { - deserializedContextCacheCheckNameAvailabilityResultInner.nameAvailable = reader.getBoolean(); - } else if ("reason".equals(fieldName)) { - deserializedContextCacheCheckNameAvailabilityResultInner.reason - = ContextCacheCheckNameAvailabilityFailureReason.fromString(reader.getString()); - } else if ("message".equals(fieldName)) { - deserializedContextCacheCheckNameAvailabilityResultInner.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContextCacheCheckNameAvailabilityResultInner; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/ListContainerItemInner.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/ListContainerItemInner.java index d15e1a4e9daa..34360396583e 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/ListContainerItemInner.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/ListContainerItemInner.java @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.storage.models.AzureEntityResource; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationConnection; import com.azure.resourcemanager.storage.models.ImmutabilityPolicyProperties; import com.azure.resourcemanager.storage.models.ImmutableStorageWithVersioning; import com.azure.resourcemanager.storage.models.LeaseDuration; @@ -301,17 +300,6 @@ public Boolean enableNfsV3AllSquash() { return this.innerProperties() == null ? null : this.innerProperties().enableNfsV3AllSquash(); } - /** - * Get the blobAccessPointConfiguration property: Configuration that attaches this container to a Blob Access Point. - * If set, the container is a read-only virtual container whose read/list requests are forwarded to the connected - * backing data store. Cannot be changed, removed, or added after container creation. - * - * @return the blobAccessPointConfiguration value. - */ - public BlobAccessPointConfigurationConnection blobAccessPointConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().blobAccessPointConfiguration(); - } - /** * Validates the instance. * diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountInner.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountInner.java index 757d2faf21d6..9a4647f8ae89 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountInner.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountInner.java @@ -39,7 +39,6 @@ import com.azure.resourcemanager.storage.models.StorageAccountSharedKeyAccessProperties; import com.azure.resourcemanager.storage.models.StorageAccountSkuConversionStatus; import com.azure.resourcemanager.storage.models.StorageDataCollaborationPolicyProperties; -import com.azure.resourcemanager.storage.models.TurboTier; import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -420,29 +419,6 @@ public AccessTier accessTier() { return this.innerProperties() == null ? null : this.innerProperties().accessTier(); } - /** - * Get the turboTier property: Configures Turbo Tier for the storage account. - * - * @return the turboTier value. - */ - public TurboTier turboTier() { - return this.innerProperties() == null ? null : this.innerProperties().turboTier(); - } - - /** - * Set the turboTier property: Configures Turbo Tier for the storage account. - * - * @param turboTier the turboTier value to set. - * @return the StorageAccountInner object itself. - */ - public StorageAccountInner withTurboTier(TurboTier turboTier) { - if (this.innerProperties() == null) { - this.innerProperties = new StorageAccountPropertiesInner(); - } - this.innerProperties().withTurboTier(turboTier); - return this; - } - /** * Get the azureFilesIdentityBasedAuthentication property: Provides the identity based authentication settings for * Azure Files. diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesCreateParameters.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesCreateParameters.java index 2a6a5eceb6c9..8401b213f1cb 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesCreateParameters.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesCreateParameters.java @@ -27,7 +27,6 @@ import com.azure.resourcemanager.storage.models.SasPolicy; import com.azure.resourcemanager.storage.models.StorageAccountSharedKeyAccessProperties; import com.azure.resourcemanager.storage.models.StorageDataCollaborationPolicyProperties; -import com.azure.resourcemanager.storage.models.TurboTier; import java.io.IOException; /** @@ -81,11 +80,6 @@ public final class StorageAccountPropertiesCreateParameters */ private AccessTier accessTier; - /* - * Configures Turbo Tier for the storage account. - */ - private TurboTier turboTier; - /* * Provides the identity based authentication settings for Azure Files. */ @@ -383,26 +377,6 @@ public StorageAccountPropertiesCreateParameters withAccessTier(AccessTier access return this; } - /** - * Get the turboTier property: Configures Turbo Tier for the storage account. - * - * @return the turboTier value. - */ - public TurboTier turboTier() { - return this.turboTier; - } - - /** - * Set the turboTier property: Configures Turbo Tier for the storage account. - * - * @param turboTier the turboTier value to set. - * @return the StorageAccountPropertiesCreateParameters object itself. - */ - public StorageAccountPropertiesCreateParameters withTurboTier(TurboTier turboTier) { - this.turboTier = turboTier; - return this; - } - /** * Get the azureFilesIdentityBasedAuthentication property: Provides the identity based authentication settings for * Azure Files. @@ -892,9 +866,6 @@ public void validate() { if (networkRuleSet() != null) { networkRuleSet().validate(); } - if (turboTier() != null) { - turboTier().validate(); - } if (azureFilesIdentityBasedAuthentication() != null) { azureFilesIdentityBasedAuthentication().validate(); } @@ -934,7 +905,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("encryption", this.encryption); jsonWriter.writeJsonField("networkAcls", this.networkRuleSet); jsonWriter.writeStringField("accessTier", this.accessTier == null ? null : this.accessTier.toString()); - jsonWriter.writeJsonField("turboTier", this.turboTier); jsonWriter.writeJsonField("azureFilesIdentityBasedAuthentication", this.azureFilesIdentityBasedAuthentication); jsonWriter.writeBooleanField("supportsHttpsTrafficOnly", this.enableHttpsTrafficOnly); jsonWriter.writeBooleanField("isSftpEnabled", this.isSftpEnabled); @@ -998,8 +968,6 @@ public static StorageAccountPropertiesCreateParameters fromJson(JsonReader jsonR } else if ("accessTier".equals(fieldName)) { deserializedStorageAccountPropertiesCreateParameters.accessTier = AccessTier.fromString(reader.getString()); - } else if ("turboTier".equals(fieldName)) { - deserializedStorageAccountPropertiesCreateParameters.turboTier = TurboTier.fromJson(reader); } else if ("azureFilesIdentityBasedAuthentication".equals(fieldName)) { deserializedStorageAccountPropertiesCreateParameters.azureFilesIdentityBasedAuthentication = AzureFilesIdentityBasedAuthentication.fromJson(reader); diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesInner.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesInner.java index 2f01f3993e3a..039309a04c29 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesInner.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesInner.java @@ -34,7 +34,6 @@ import com.azure.resourcemanager.storage.models.StorageAccountSharedKeyAccessProperties; import com.azure.resourcemanager.storage.models.StorageAccountSkuConversionStatus; import com.azure.resourcemanager.storage.models.StorageDataCollaborationPolicyProperties; -import com.azure.resourcemanager.storage.models.TurboTier; import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -127,11 +126,6 @@ public final class StorageAccountPropertiesInner implements JsonSerializable> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("blobAccessPointConfigurationName") String blobAccessPointConfigurationName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobAccessPointConfigurations/{blobAccessPointConfigurationName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("blobAccessPointConfigurationName") String blobAccessPointConfigurationName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BlobAccessPointConfigurationInner resource, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobAccessPointConfigurations/{blobAccessPointConfigurationName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("blobAccessPointConfigurationName") String blobAccessPointConfigurationName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BlobAccessPointConfigurationUpdate properties, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobAccessPointConfigurations/{blobAccessPointConfigurationName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("blobAccessPointConfigurationName") String blobAccessPointConfigurationName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobAccessPointConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByStorageAccount( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @HeaderParam("Accept") String accept, Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobAccessPointConfigurations/{blobAccessPointConfigurationName}/testExistingConnection") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> testExistingConnection(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("blobAccessPointConfigurationName") String blobAccessPointConfigurationName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BlobAccessPointConnectionTestRequest body, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByStorageAccountNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the specified Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Blob Access Point configuration along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, blobAccessPointConfigurationName, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the specified Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Blob Access Point configuration along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, blobAccessPointConfigurationName, accept, context); - } - - /** - * Get the specified Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Blob Access Point configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName) { - return getWithResponseAsync(resourceGroupName, accountName, blobAccessPointConfigurationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the specified Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Blob Access Point configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, context).block(); - } - - /** - * Get the specified Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Blob Access Point configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BlobAccessPointConfigurationInner get(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName) { - return getWithResponse(resourceGroupName, accountName, blobAccessPointConfigurationName, Context.NONE) - .getValue(); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, blobAccessPointConfigurationName, - contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, blobAccessPointConfigurationName, contentType, accept, resource, context); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, BlobAccessPointConfigurationInner> - beginCreateAsync(String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationInner resource) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), BlobAccessPointConfigurationInner.class, - BlobAccessPointConfigurationInner.class, this.client.getContext()); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BlobAccessPointConfigurationInner> - beginCreateAsync(String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationInner resource, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, accountName, - blobAccessPointConfigurationName, resource, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), BlobAccessPointConfigurationInner.class, - BlobAccessPointConfigurationInner.class, context); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BlobAccessPointConfigurationInner> beginCreate( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationInner resource) { - return this.beginCreateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, resource) - .getSyncPoller(); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BlobAccessPointConfigurationInner> beginCreate( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationInner resource, Context context) { - return this - .beginCreateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, resource, context) - .getSyncPoller(); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource) { - return beginCreateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource, Context context) { - return beginCreateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, resource, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage - * Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BlobAccessPointConfigurationInner create(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource) { - return createAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, resource).block(); - } - - /** - * Creates or updates a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage - * Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BlobAccessPointConfigurationInner create(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationInner resource, Context context) { - return createAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, resource, context).block(); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, blobAccessPointConfigurationName, - contentType, accept, properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, blobAccessPointConfigurationName, contentType, accept, properties, context); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, BlobAccessPointConfigurationInner> - beginUpdateAsync(String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationUpdate properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), BlobAccessPointConfigurationInner.class, - BlobAccessPointConfigurationInner.class, this.client.getContext()); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BlobAccessPointConfigurationInner> - beginUpdateAsync(String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationUpdate properties, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, - blobAccessPointConfigurationName, properties, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), BlobAccessPointConfigurationInner.class, - BlobAccessPointConfigurationInner.class, context); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BlobAccessPointConfigurationInner> beginUpdate( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, properties) - .getSyncPoller(); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a BlobAccessPointConfiguration is a tracked Azure resource modeled - * as a sub-resource of a Storage Account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BlobAccessPointConfigurationInner> beginUpdate( - String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - BlobAccessPointConfigurationUpdate properties, Context context) { - return this - .beginUpdateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, properties, context) - .getSyncPoller(); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties) { - return beginUpdateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, properties, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage - * Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BlobAccessPointConfigurationInner update(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties) { - return updateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, properties).block(); - } - - /** - * Update a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage - * Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BlobAccessPointConfigurationInner update(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConfigurationUpdate properties, Context context) { - return updateAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, properties, context) - .block(); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, blobAccessPointConfigurationName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, accountName, blobAccessPointConfigurationName, context); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, blobAccessPointConfigurationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName) { - return this.beginDeleteAsync(resourceGroupName, accountName, blobAccessPointConfigurationName).getSyncPoller(); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, Context context) { - return this.beginDeleteAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, context) - .getSyncPoller(); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName) { - return beginDeleteAsync(resourceGroupName, accountName, blobAccessPointConfigurationName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String blobAccessPointConfigurationName) { - deleteAsync(resourceGroupName, accountName, blobAccessPointConfigurationName).block(); - } - - /** - * Delete a Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String blobAccessPointConfigurationName, - Context context) { - deleteAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, context).block(); - } - - /** - * List all Blob Access Point configurations in a Storage Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByStorageAccountSinglePageAsync(String resourceGroupName, String accountName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByStorageAccount(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all Blob Access Point configurations in a Storage Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByStorageAccountSinglePageAsync(String resourceGroupName, String accountName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByStorageAccount(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List all Blob Access Point configurations in a Storage Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByStorageAccountAsync(String resourceGroupName, - String accountName) { - return new PagedFlux<>(() -> listByStorageAccountSinglePageAsync(resourceGroupName, accountName), - nextLink -> listByStorageAccountNextSinglePageAsync(nextLink)); - } - - /** - * List all Blob Access Point configurations in a Storage Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByStorageAccountAsync(String resourceGroupName, - String accountName, Context context) { - return new PagedFlux<>(() -> listByStorageAccountSinglePageAsync(resourceGroupName, accountName, context), - nextLink -> listByStorageAccountNextSinglePageAsync(nextLink, context)); - } - - /** - * List all Blob Access Point configurations in a Storage Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByStorageAccount(String resourceGroupName, - String accountName) { - return new PagedIterable<>(listByStorageAccountAsync(resourceGroupName, accountName)); - } - - /** - * List all Blob Access Point configurations in a Storage Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByStorageAccount(String resourceGroupName, - String accountName, Context context) { - return new PagedIterable<>(listByStorageAccountAsync(resourceGroupName, accountName, context)); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> testExistingConnectionWithResponseAsync(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.testExistingConnection(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, - blobAccessPointConfigurationName, contentType, accept, body, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testExistingConnectionWithResponseAsync(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (blobAccessPointConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter blobAccessPointConfigurationName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.testExistingConnection(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, blobAccessPointConfigurationName, - contentType, accept, body, context); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, BlobAccessPointConnectionTestResponseInner> - beginTestExistingConnectionAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body) { - Mono>> mono = testExistingConnectionWithResponseAsync(resourceGroupName, accountName, - blobAccessPointConfigurationName, body); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), BlobAccessPointConnectionTestResponseInner.class, - BlobAccessPointConnectionTestResponseInner.class, this.client.getContext()); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, BlobAccessPointConnectionTestResponseInner> - beginTestExistingConnectionAsync(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = testExistingConnectionWithResponseAsync(resourceGroupName, accountName, - blobAccessPointConfigurationName, body, context); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), BlobAccessPointConnectionTestResponseInner.class, - BlobAccessPointConnectionTestResponseInner.class, context); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, BlobAccessPointConnectionTestResponseInner> - beginTestExistingConnection(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body) { - return this - .beginTestExistingConnectionAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, body) - .getSyncPoller(); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, BlobAccessPointConnectionTestResponseInner> - beginTestExistingConnection(String resourceGroupName, String accountName, - String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body, Context context) { - return this - .beginTestExistingConnectionAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, body, - context) - .getSyncPoller(); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono testExistingConnectionAsync(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body) { - return beginTestExistingConnectionAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testExistingConnectionAsync(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body, - Context context) { - return beginTestExistingConnectionAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, body, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BlobAccessPointConnectionTestResponseInner testExistingConnection(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body) { - return testExistingConnectionAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, body) - .block(); - } - - /** - * Test the connection configured on an existing Blob Access Point configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param blobAccessPointConfigurationName The name of the Blob Access Point configuration. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BlobAccessPointConnectionTestResponseInner testExistingConnection(String resourceGroupName, - String accountName, String blobAccessPointConfigurationName, BlobAccessPointConnectionTestRequest body, - Context context) { - return testExistingConnectionAsync(resourceGroupName, accountName, blobAccessPointConfigurationName, body, - context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByStorageAccountNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByStorageAccountNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BlobAccessPointConfiguration list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByStorageAccountNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByStorageAccountNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/BlobAccessPointConnectionTestsClientImpl.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/BlobAccessPointConnectionTestsClientImpl.java deleted file mode 100644 index bcbe996a0639..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/BlobAccessPointConnectionTestsClientImpl.java +++ /dev/null @@ -1,355 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.storage.fluent.BlobAccessPointConnectionTestsClient; -import com.azure.resourcemanager.storage.fluent.models.BlobAccessPointConnectionTestResponseInner; -import com.azure.resourcemanager.storage.models.BlobAccessPointProposedConnectionTestRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BlobAccessPointConnectionTestsClient. - */ -public final class BlobAccessPointConnectionTestsClientImpl implements BlobAccessPointConnectionTestsClient { - /** - * The proxy service used to perform REST calls. - */ - private final BlobAccessPointConnectionTestsService service; - - /** - * The service client containing this operation class. - */ - private final StorageManagementClientImpl client; - - /** - * Initializes an instance of BlobAccessPointConnectionTestsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BlobAccessPointConnectionTestsClientImpl(StorageManagementClientImpl client) { - this.service = RestProxy.create(BlobAccessPointConnectionTestsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for StorageManagementClientBlobAccessPointConnectionTests to be used by - * the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "StorageManagementClientBlobAccessPointConnectionTests") - public interface BlobAccessPointConnectionTestsService { - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/testBlobAccessPointConfigurationProposedConnection") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> testProposedConnection(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BlobAccessPointProposedConnectionTestRequest body, Context context); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> testProposedConnectionWithResponseAsync(String resourceGroupName, - String accountName, BlobAccessPointProposedConnectionTestRequest body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.testProposedConnection(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, - contentType, accept, body, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testProposedConnectionWithResponseAsync(String resourceGroupName, - String accountName, BlobAccessPointProposedConnectionTestRequest body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.testProposedConnection(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, BlobAccessPointConnectionTestResponseInner> - beginTestProposedConnectionAsync(String resourceGroupName, String accountName, - BlobAccessPointProposedConnectionTestRequest body) { - Mono>> mono - = testProposedConnectionWithResponseAsync(resourceGroupName, accountName, body); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), BlobAccessPointConnectionTestResponseInner.class, - BlobAccessPointConnectionTestResponseInner.class, this.client.getContext()); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, BlobAccessPointConnectionTestResponseInner> - beginTestProposedConnectionAsync(String resourceGroupName, String accountName, - BlobAccessPointProposedConnectionTestRequest body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = testProposedConnectionWithResponseAsync(resourceGroupName, accountName, body, context); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), BlobAccessPointConnectionTestResponseInner.class, - BlobAccessPointConnectionTestResponseInner.class, context); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, BlobAccessPointConnectionTestResponseInner> - beginTestProposedConnection(String resourceGroupName, String accountName, - BlobAccessPointProposedConnectionTestRequest body) { - return this.beginTestProposedConnectionAsync(resourceGroupName, accountName, body).getSyncPoller(); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, BlobAccessPointConnectionTestResponseInner> - beginTestProposedConnection(String resourceGroupName, String accountName, - BlobAccessPointProposedConnectionTestRequest body, Context context) { - return this.beginTestProposedConnectionAsync(resourceGroupName, accountName, body, context).getSyncPoller(); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono testProposedConnectionAsync(String resourceGroupName, - String accountName, BlobAccessPointProposedConnectionTestRequest body) { - return beginTestProposedConnectionAsync(resourceGroupName, accountName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testProposedConnectionAsync(String resourceGroupName, - String accountName, BlobAccessPointProposedConnectionTestRequest body, Context context) { - return beginTestProposedConnectionAsync(resourceGroupName, accountName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BlobAccessPointConnectionTestResponseInner testProposedConnection(String resourceGroupName, - String accountName, BlobAccessPointProposedConnectionTestRequest body) { - return testProposedConnectionAsync(resourceGroupName, accountName, body).block(); - } - - /** - * Test a proposed Blob Access Point connection before the configuration is created. The connection is validated in - * the context of the storage account in the request path, so no Blob Access Point configuration needs to exist - * beforehand. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the storage account within the specified resource group. Storage account names - * must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of testing a Blob Access Point configuration connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BlobAccessPointConnectionTestResponseInner testProposedConnection(String resourceGroupName, - String accountName, BlobAccessPointProposedConnectionTestRequest body, Context context) { - return testProposedConnectionAsync(resourceGroupName, accountName, body, context).block(); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/ContextCachesClientImpl.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/ContextCachesClientImpl.java index cb3156ca9044..d96e5ccbbdea 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/ContextCachesClientImpl.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/ContextCachesClientImpl.java @@ -14,7 +14,6 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -37,10 +36,8 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; import com.azure.resourcemanager.storage.fluent.ContextCachesClient; -import com.azure.resourcemanager.storage.fluent.models.ContextCacheCheckNameAvailabilityResultInner; import com.azure.resourcemanager.storage.fluent.models.ContextCacheInner; import com.azure.resourcemanager.storage.implementation.models.ContextCacheListResult; -import com.azure.resourcemanager.storage.models.ContextCacheCheckNameAvailabilityParameters; import com.azure.resourcemanager.storage.models.ContextCacheUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -135,15 +132,6 @@ Mono> list(@HostParam("endpoint") String endpoi @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/contextCacheCheckNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") ContextCacheCheckNameAvailabilityParameters body, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -1191,120 +1179,6 @@ public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } - /** - * Check the availability of a context cache resource name. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the context cache name availability check along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - checkNameAvailabilityWithResponseAsync(ContextCacheCheckNameAvailabilityParameters body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), contentType, accept, body, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check the availability of a context cache resource name. - * - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the context cache name availability check along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkNameAvailabilityWithResponseAsync(ContextCacheCheckNameAvailabilityParameters body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, body, context); - } - - /** - * Check the availability of a context cache resource name. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the context cache name availability check on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono - checkNameAvailabilityAsync(ContextCacheCheckNameAvailabilityParameters body) { - return checkNameAvailabilityWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Check the availability of a context cache resource name. - * - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the context cache name availability check along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response - checkNameAvailabilityWithResponse(ContextCacheCheckNameAvailabilityParameters body, Context context) { - return checkNameAvailabilityWithResponseAsync(body, context).block(); - } - - /** - * Check the availability of a context cache resource name. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the context cache name availability check. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContextCacheCheckNameAvailabilityResultInner - checkNameAvailability(ContextCacheCheckNameAvailabilityParameters body) { - return checkNameAvailabilityWithResponse(body, Context.NONE).getValue(); - } - /** * Get the next page of items. * diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageManagementClientImpl.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageManagementClientImpl.java index 4e371bb8521a..0aa3056c882d 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageManagementClientImpl.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageManagementClientImpl.java @@ -10,8 +10,6 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import com.azure.resourcemanager.storage.fluent.AdvancedPlatformMetricsClient; -import com.azure.resourcemanager.storage.fluent.BlobAccessPointConfigurationsClient; -import com.azure.resourcemanager.storage.fluent.BlobAccessPointConnectionTestsClient; import com.azure.resourcemanager.storage.fluent.BlobContainersClient; import com.azure.resourcemanager.storage.fluent.BlobInventoryPoliciesClient; import com.azure.resourcemanager.storage.fluent.BlobServicesClient; @@ -398,34 +396,6 @@ public ContextCacheContainersClient getContextCacheContainers() { return this.contextCacheContainers; } - /** - * The BlobAccessPointConfigurationsClient object to access its operations. - */ - private final BlobAccessPointConfigurationsClient blobAccessPointConfigurations; - - /** - * Gets the BlobAccessPointConfigurationsClient object to access its operations. - * - * @return the BlobAccessPointConfigurationsClient object. - */ - public BlobAccessPointConfigurationsClient getBlobAccessPointConfigurations() { - return this.blobAccessPointConfigurations; - } - - /** - * The BlobAccessPointConnectionTestsClient object to access its operations. - */ - private final BlobAccessPointConnectionTestsClient blobAccessPointConnectionTests; - - /** - * Gets the BlobAccessPointConnectionTestsClient object to access its operations. - * - * @return the BlobAccessPointConnectionTestsClient object. - */ - public BlobAccessPointConnectionTestsClient getBlobAccessPointConnectionTests() { - return this.blobAccessPointConnectionTests; - } - /** * The AdvancedPlatformMetricsClient object to access its operations. */ @@ -584,7 +554,7 @@ public UsagesClient getUsages() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-09-01"; + this.apiVersion = "2026-06-01"; this.operations = new OperationsClientImpl(this); this.blobContainers = new BlobContainersClientImpl(this); this.blobServices = new BlobServicesClientImpl(this); @@ -604,8 +574,6 @@ public UsagesClient getUsages() { this.dataShares = new DataSharesClientImpl(this); this.contextCaches = new ContextCachesClientImpl(this); this.contextCacheContainers = new ContextCacheContainersClientImpl(this); - this.blobAccessPointConfigurations = new BlobAccessPointConfigurationsClientImpl(this); - this.blobAccessPointConnectionTests = new BlobAccessPointConnectionTestsClientImpl(this); this.advancedPlatformMetrics = new AdvancedPlatformMetricsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.storageTaskAssignmentsInstancesReports = new StorageTaskAssignmentsInstancesReportsClientImpl(this); diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/models/BlobAccessPointConfigurationListResult.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/models/BlobAccessPointConfigurationListResult.java deleted file mode 100644 index f407e3c9a45d..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/models/BlobAccessPointConfigurationListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storage.fluent.models.BlobAccessPointConfigurationInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a BlobAccessPointConfiguration list operation. - */ -@Immutable -public final class BlobAccessPointConfigurationListResult - implements JsonSerializable { - /* - * The BlobAccessPointConfiguration items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of BlobAccessPointConfigurationListResult class. - */ - private BlobAccessPointConfigurationListResult() { - } - - /** - * Get the value property: The BlobAccessPointConfiguration items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model BlobAccessPointConfigurationListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointConfigurationListResult.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConfigurationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConfigurationListResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointConfigurationListResult. - */ - public static BlobAccessPointConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConfigurationListResult deserializedBlobAccessPointConfigurationListResult - = new BlobAccessPointConfigurationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> BlobAccessPointConfigurationInner.fromJson(reader1)); - deserializedBlobAccessPointConfigurationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedBlobAccessPointConfigurationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConfigurationListResult; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthProperties.java deleted file mode 100644 index afb4a0867216..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthProperties.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * S3 access-key authentication properties. - */ -@Fluent -public final class BlobAccessPointAccessKeyAuthProperties extends BlobAccessPointRemoteAuthProperties { - /* - * The authentication type. This value determines the remaining shape of the authentication object. - */ - private BlobAccessPointRemoteAuthType authType = BlobAccessPointRemoteAuthType.ACCESS_KEY; - - /* - * The access key ID. - */ - private String accessKeyId; - - /* - * The secret access key. This value is never returned by read or list operations. - */ - private String secretAccessKey; - - /* - * The region used by the request-signing algorithm. Defaults to 'us-east-1' when not specified. - */ - private String signingRegion; - - /* - * The host used when computing request signatures. The endpoint host is used by default. - */ - private String hostOverride; - - /** - * Creates an instance of BlobAccessPointAccessKeyAuthProperties class. - */ - public BlobAccessPointAccessKeyAuthProperties() { - } - - /** - * Get the authType property: The authentication type. This value determines the remaining shape of the - * authentication object. - * - * @return the authType value. - */ - @Override - public BlobAccessPointRemoteAuthType authType() { - return this.authType; - } - - /** - * Get the accessKeyId property: The access key ID. - * - * @return the accessKeyId value. - */ - public String accessKeyId() { - return this.accessKeyId; - } - - /** - * Set the accessKeyId property: The access key ID. - * - * @param accessKeyId the accessKeyId value to set. - * @return the BlobAccessPointAccessKeyAuthProperties object itself. - */ - public BlobAccessPointAccessKeyAuthProperties withAccessKeyId(String accessKeyId) { - this.accessKeyId = accessKeyId; - return this; - } - - /** - * Get the secretAccessKey property: The secret access key. This value is never returned by read or list operations. - * - * @return the secretAccessKey value. - */ - public String secretAccessKey() { - return this.secretAccessKey; - } - - /** - * Set the secretAccessKey property: The secret access key. This value is never returned by read or list operations. - * - * @param secretAccessKey the secretAccessKey value to set. - * @return the BlobAccessPointAccessKeyAuthProperties object itself. - */ - public BlobAccessPointAccessKeyAuthProperties withSecretAccessKey(String secretAccessKey) { - this.secretAccessKey = secretAccessKey; - return this; - } - - /** - * Get the signingRegion property: The region used by the request-signing algorithm. Defaults to 'us-east-1' when - * not specified. - * - * @return the signingRegion value. - */ - public String signingRegion() { - return this.signingRegion; - } - - /** - * Set the signingRegion property: The region used by the request-signing algorithm. Defaults to 'us-east-1' when - * not specified. - * - * @param signingRegion the signingRegion value to set. - * @return the BlobAccessPointAccessKeyAuthProperties object itself. - */ - public BlobAccessPointAccessKeyAuthProperties withSigningRegion(String signingRegion) { - this.signingRegion = signingRegion; - return this; - } - - /** - * Get the hostOverride property: The host used when computing request signatures. The endpoint host is used by - * default. - * - * @return the hostOverride value. - */ - public String hostOverride() { - return this.hostOverride; - } - - /** - * Set the hostOverride property: The host used when computing request signatures. The endpoint host is used by - * default. - * - * @param hostOverride the hostOverride value to set. - * @return the BlobAccessPointAccessKeyAuthProperties object itself. - */ - public BlobAccessPointAccessKeyAuthProperties withHostOverride(String hostOverride) { - this.hostOverride = hostOverride; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (accessKeyId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property accessKeyId in model BlobAccessPointAccessKeyAuthProperties")); - } - if (secretAccessKey() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property secretAccessKey in model BlobAccessPointAccessKeyAuthProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointAccessKeyAuthProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("accessKeyId", this.accessKeyId); - jsonWriter.writeStringField("secretAccessKey", this.secretAccessKey); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("signingRegion", this.signingRegion); - jsonWriter.writeStringField("hostOverride", this.hostOverride); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointAccessKeyAuthProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointAccessKeyAuthProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointAccessKeyAuthProperties. - */ - public static BlobAccessPointAccessKeyAuthProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointAccessKeyAuthProperties deserializedBlobAccessPointAccessKeyAuthProperties - = new BlobAccessPointAccessKeyAuthProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("accessKeyId".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthProperties.accessKeyId = reader.getString(); - } else if ("secretAccessKey".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthProperties.secretAccessKey = reader.getString(); - } else if ("authType".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthProperties.authType - = BlobAccessPointRemoteAuthType.fromString(reader.getString()); - } else if ("signingRegion".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthProperties.signingRegion = reader.getString(); - } else if ("hostOverride".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthProperties.hostOverride = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointAccessKeyAuthProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthPropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthPropertiesUpdate.java deleted file mode 100644 index 5533df80342b..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthPropertiesUpdate.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * S3 access-key authentication properties. - */ -@Fluent -public final class BlobAccessPointAccessKeyAuthPropertiesUpdate extends BlobAccessPointRemoteAuthPropertiesUpdate { - /* - * The authentication type. This value determines the remaining shape of the authentication object. - */ - private BlobAccessPointRemoteAuthType authType = BlobAccessPointRemoteAuthType.ACCESS_KEY; - - /* - * The access key ID. - */ - private String accessKeyId; - - /* - * The secret access key. This value is never returned by read or list operations. - */ - private String secretAccessKey; - - /* - * The region used by the request-signing algorithm. Defaults to 'us-east-1' when not specified. - */ - private String signingRegion; - - /* - * The host used when computing request signatures. The endpoint host is used by default. - */ - private String hostOverride; - - /** - * Creates an instance of BlobAccessPointAccessKeyAuthPropertiesUpdate class. - */ - public BlobAccessPointAccessKeyAuthPropertiesUpdate() { - } - - /** - * Get the authType property: The authentication type. This value determines the remaining shape of the - * authentication object. - * - * @return the authType value. - */ - @Override - public BlobAccessPointRemoteAuthType authType() { - return this.authType; - } - - /** - * Get the accessKeyId property: The access key ID. - * - * @return the accessKeyId value. - */ - public String accessKeyId() { - return this.accessKeyId; - } - - /** - * Set the accessKeyId property: The access key ID. - * - * @param accessKeyId the accessKeyId value to set. - * @return the BlobAccessPointAccessKeyAuthPropertiesUpdate object itself. - */ - public BlobAccessPointAccessKeyAuthPropertiesUpdate withAccessKeyId(String accessKeyId) { - this.accessKeyId = accessKeyId; - return this; - } - - /** - * Get the secretAccessKey property: The secret access key. This value is never returned by read or list operations. - * - * @return the secretAccessKey value. - */ - public String secretAccessKey() { - return this.secretAccessKey; - } - - /** - * Set the secretAccessKey property: The secret access key. This value is never returned by read or list operations. - * - * @param secretAccessKey the secretAccessKey value to set. - * @return the BlobAccessPointAccessKeyAuthPropertiesUpdate object itself. - */ - public BlobAccessPointAccessKeyAuthPropertiesUpdate withSecretAccessKey(String secretAccessKey) { - this.secretAccessKey = secretAccessKey; - return this; - } - - /** - * Get the signingRegion property: The region used by the request-signing algorithm. Defaults to 'us-east-1' when - * not specified. - * - * @return the signingRegion value. - */ - public String signingRegion() { - return this.signingRegion; - } - - /** - * Set the signingRegion property: The region used by the request-signing algorithm. Defaults to 'us-east-1' when - * not specified. - * - * @param signingRegion the signingRegion value to set. - * @return the BlobAccessPointAccessKeyAuthPropertiesUpdate object itself. - */ - public BlobAccessPointAccessKeyAuthPropertiesUpdate withSigningRegion(String signingRegion) { - this.signingRegion = signingRegion; - return this; - } - - /** - * Get the hostOverride property: The host used when computing request signatures. The endpoint host is used by - * default. - * - * @return the hostOverride value. - */ - public String hostOverride() { - return this.hostOverride; - } - - /** - * Set the hostOverride property: The host used when computing request signatures. The endpoint host is used by - * default. - * - * @param hostOverride the hostOverride value to set. - * @return the BlobAccessPointAccessKeyAuthPropertiesUpdate object itself. - */ - public BlobAccessPointAccessKeyAuthPropertiesUpdate withHostOverride(String hostOverride) { - this.hostOverride = hostOverride; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("accessKeyId", this.accessKeyId); - jsonWriter.writeStringField("secretAccessKey", this.secretAccessKey); - jsonWriter.writeStringField("signingRegion", this.signingRegion); - jsonWriter.writeStringField("hostOverride", this.hostOverride); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointAccessKeyAuthPropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointAccessKeyAuthPropertiesUpdate if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointAccessKeyAuthPropertiesUpdate. - */ - public static BlobAccessPointAccessKeyAuthPropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointAccessKeyAuthPropertiesUpdate deserializedBlobAccessPointAccessKeyAuthPropertiesUpdate - = new BlobAccessPointAccessKeyAuthPropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authType".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthPropertiesUpdate.authType - = BlobAccessPointRemoteAuthType.fromString(reader.getString()); - } else if ("accessKeyId".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthPropertiesUpdate.accessKeyId = reader.getString(); - } else if ("secretAccessKey".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthPropertiesUpdate.secretAccessKey = reader.getString(); - } else if ("signingRegion".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthPropertiesUpdate.signingRegion = reader.getString(); - } else if ("hostOverride".equals(fieldName)) { - deserializedBlobAccessPointAccessKeyAuthPropertiesUpdate.hostOverride = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointAccessKeyAuthPropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourceProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourceProperties.java deleted file mode 100644 index d1e6ef0f2982..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourceProperties.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * An Azure NetApp Files backing source. - */ -@Fluent -public final class BlobAccessPointAzureNetAppFilesSourceProperties extends BlobAccessPointSourceProperties { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.AZURE_NET_APP_FILES; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionProperties connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthProperties auth; - - /** - * Creates an instance of BlobAccessPointAzureNetAppFilesSourceProperties class. - */ - public BlobAccessPointAzureNetAppFilesSourceProperties() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionProperties connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointAzureNetAppFilesSourceProperties object itself. - */ - public BlobAccessPointAzureNetAppFilesSourceProperties - withConnection(BlobAccessPointConnectionProperties connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthProperties auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointAzureNetAppFilesSourceProperties object itself. - */ - public BlobAccessPointAzureNetAppFilesSourceProperties withAuth(BlobAccessPointRemoteAuthProperties auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property connection in model BlobAccessPointAzureNetAppFilesSourceProperties")); - } else { - connection().validate(); - } - if (auth() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property auth in model BlobAccessPointAzureNetAppFilesSourceProperties")); - } else { - auth().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointAzureNetAppFilesSourceProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointAzureNetAppFilesSourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointAzureNetAppFilesSourceProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointAzureNetAppFilesSourceProperties. - */ - public static BlobAccessPointAzureNetAppFilesSourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointAzureNetAppFilesSourceProperties deserializedBlobAccessPointAzureNetAppFilesSourceProperties - = new BlobAccessPointAzureNetAppFilesSourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connection".equals(fieldName)) { - deserializedBlobAccessPointAzureNetAppFilesSourceProperties.connection - = BlobAccessPointConnectionProperties.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointAzureNetAppFilesSourceProperties.auth - = BlobAccessPointRemoteAuthProperties.fromJson(reader); - } else if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointAzureNetAppFilesSourceProperties.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointAzureNetAppFilesSourceProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate.java deleted file mode 100644 index fa97a72da3e5..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * An Azure NetApp Files backing source. - */ -@Fluent -public final class BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate extends BlobAccessPointSourcePropertiesUpdate { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.AZURE_NET_APP_FILES; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionPropertiesUpdate connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthPropertiesUpdate auth; - - /** - * Creates an instance of BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate class. - */ - public BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionPropertiesUpdate connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate object itself. - */ - public BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate - withConnection(BlobAccessPointConnectionPropertiesUpdate connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthPropertiesUpdate auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate object itself. - */ - public BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate - withAuth(BlobAccessPointRemoteAuthPropertiesUpdate auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() != null) { - connection().validate(); - } - if (auth() != null) { - auth().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate. - */ - public static BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate deserializedBlobAccessPointAzureNetAppFilesSourcePropertiesUpdate - = new BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointAzureNetAppFilesSourcePropertiesUpdate.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else if ("connection".equals(fieldName)) { - deserializedBlobAccessPointAzureNetAppFilesSourcePropertiesUpdate.connection - = BlobAccessPointConnectionPropertiesUpdate.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointAzureNetAppFilesSourcePropertiesUpdate.auth - = BlobAccessPointRemoteAuthPropertiesUpdate.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointAzureNetAppFilesSourcePropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourceProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourceProperties.java deleted file mode 100644 index 81ef77af18e3..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourceProperties.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Commvault backing source. - */ -@Fluent -public final class BlobAccessPointCommvaultSourceProperties extends BlobAccessPointSourceProperties { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.COMMVAULT; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionProperties connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthProperties auth; - - /** - * Creates an instance of BlobAccessPointCommvaultSourceProperties class. - */ - public BlobAccessPointCommvaultSourceProperties() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionProperties connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointCommvaultSourceProperties object itself. - */ - public BlobAccessPointCommvaultSourceProperties withConnection(BlobAccessPointConnectionProperties connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthProperties auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointCommvaultSourceProperties object itself. - */ - public BlobAccessPointCommvaultSourceProperties withAuth(BlobAccessPointRemoteAuthProperties auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property connection in model BlobAccessPointCommvaultSourceProperties")); - } else { - connection().validate(); - } - if (auth() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property auth in model BlobAccessPointCommvaultSourceProperties")); - } else { - auth().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointCommvaultSourceProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointCommvaultSourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointCommvaultSourceProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointCommvaultSourceProperties. - */ - public static BlobAccessPointCommvaultSourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointCommvaultSourceProperties deserializedBlobAccessPointCommvaultSourceProperties - = new BlobAccessPointCommvaultSourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connection".equals(fieldName)) { - deserializedBlobAccessPointCommvaultSourceProperties.connection - = BlobAccessPointConnectionProperties.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointCommvaultSourceProperties.auth - = BlobAccessPointRemoteAuthProperties.fromJson(reader); - } else if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointCommvaultSourceProperties.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointCommvaultSourceProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourcePropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourcePropertiesUpdate.java deleted file mode 100644 index 99b89ca5d300..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourcePropertiesUpdate.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Commvault backing source. - */ -@Fluent -public final class BlobAccessPointCommvaultSourcePropertiesUpdate extends BlobAccessPointSourcePropertiesUpdate { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.COMMVAULT; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionPropertiesUpdate connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthPropertiesUpdate auth; - - /** - * Creates an instance of BlobAccessPointCommvaultSourcePropertiesUpdate class. - */ - public BlobAccessPointCommvaultSourcePropertiesUpdate() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionPropertiesUpdate connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointCommvaultSourcePropertiesUpdate object itself. - */ - public BlobAccessPointCommvaultSourcePropertiesUpdate - withConnection(BlobAccessPointConnectionPropertiesUpdate connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthPropertiesUpdate auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointCommvaultSourcePropertiesUpdate object itself. - */ - public BlobAccessPointCommvaultSourcePropertiesUpdate withAuth(BlobAccessPointRemoteAuthPropertiesUpdate auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() != null) { - connection().validate(); - } - if (auth() != null) { - auth().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointCommvaultSourcePropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointCommvaultSourcePropertiesUpdate if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointCommvaultSourcePropertiesUpdate. - */ - public static BlobAccessPointCommvaultSourcePropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointCommvaultSourcePropertiesUpdate deserializedBlobAccessPointCommvaultSourcePropertiesUpdate - = new BlobAccessPointCommvaultSourcePropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointCommvaultSourcePropertiesUpdate.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else if ("connection".equals(fieldName)) { - deserializedBlobAccessPointCommvaultSourcePropertiesUpdate.connection - = BlobAccessPointConnectionPropertiesUpdate.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointCommvaultSourcePropertiesUpdate.auth - = BlobAccessPointRemoteAuthPropertiesUpdate.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointCommvaultSourcePropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationConnection.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationConnection.java deleted file mode 100644 index b9c645bda22b..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationConnection.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Blob Access Point configuration associated with a blob container. - */ -@Fluent -public final class BlobAccessPointConfigurationConnection - implements JsonSerializable { - /* - * Name of the Blob Access Point Configuration to connect to. - */ - private String blobAccessPointConfigurationName; - - /* - * System-generated unique identifier of the Blob Access Point Configuration to connect to. If not provided on - * create, the service looks up and persists the current unique id. - */ - private String blobAccessPointConfigurationUniqueId; - - /** - * Creates an instance of BlobAccessPointConfigurationConnection class. - */ - public BlobAccessPointConfigurationConnection() { - } - - /** - * Get the blobAccessPointConfigurationName property: Name of the Blob Access Point Configuration to connect to. - * - * @return the blobAccessPointConfigurationName value. - */ - public String blobAccessPointConfigurationName() { - return this.blobAccessPointConfigurationName; - } - - /** - * Set the blobAccessPointConfigurationName property: Name of the Blob Access Point Configuration to connect to. - * - * @param blobAccessPointConfigurationName the blobAccessPointConfigurationName value to set. - * @return the BlobAccessPointConfigurationConnection object itself. - */ - public BlobAccessPointConfigurationConnection - withBlobAccessPointConfigurationName(String blobAccessPointConfigurationName) { - this.blobAccessPointConfigurationName = blobAccessPointConfigurationName; - return this; - } - - /** - * Get the blobAccessPointConfigurationUniqueId property: System-generated unique identifier of the Blob Access - * Point Configuration to connect to. If not provided on create, the service looks up and persists the current - * unique id. - * - * @return the blobAccessPointConfigurationUniqueId value. - */ - public String blobAccessPointConfigurationUniqueId() { - return this.blobAccessPointConfigurationUniqueId; - } - - /** - * Set the blobAccessPointConfigurationUniqueId property: System-generated unique identifier of the Blob Access - * Point Configuration to connect to. If not provided on create, the service looks up and persists the current - * unique id. - * - * @param blobAccessPointConfigurationUniqueId the blobAccessPointConfigurationUniqueId value to set. - * @return the BlobAccessPointConfigurationConnection object itself. - */ - public BlobAccessPointConfigurationConnection - withBlobAccessPointConfigurationUniqueId(String blobAccessPointConfigurationUniqueId) { - this.blobAccessPointConfigurationUniqueId = blobAccessPointConfigurationUniqueId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("blobAccessPointConfigurationName", this.blobAccessPointConfigurationName); - jsonWriter.writeStringField("blobAccessPointConfigurationUniqueId", this.blobAccessPointConfigurationUniqueId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConfigurationConnection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConfigurationConnection if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointConfigurationConnection. - */ - public static BlobAccessPointConfigurationConnection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConfigurationConnection deserializedBlobAccessPointConfigurationConnection - = new BlobAccessPointConfigurationConnection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("blobAccessPointConfigurationName".equals(fieldName)) { - deserializedBlobAccessPointConfigurationConnection.blobAccessPointConfigurationName - = reader.getString(); - } else if ("blobAccessPointConfigurationUniqueId".equals(fieldName)) { - deserializedBlobAccessPointConfigurationConnection.blobAccessPointConfigurationUniqueId - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConfigurationConnection; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationProperties.java deleted file mode 100644 index 64905d3e6431..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationProperties.java +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Details of a Blob Access Point configuration. - */ -@Fluent -public final class BlobAccessPointConfigurationProperties - implements JsonSerializable { - /* - * The system-generated unique identifier of the configuration. - */ - private String uniqueId; - - /* - * The configuration state. A configuration is created in the Active state when this value is not specified. - */ - private BlobAccessPointConfigurationState state; - - /* - * An arbitrary description of the Blob Access Point configuration. - */ - private String description; - - /* - * The status of the most recent connection test. - */ - private BlobAccessPointConnectionTestStatus lastConnectionTestStatus; - - /* - * The timestamp of the most recent connection test. - */ - private OffsetDateTime lastConnectionTestTimestamp; - - /* - * The normalized and redacted error from the most recent failed connection test. - */ - private String lastConnectionTestErrorMessage; - - /* - * Information about the backing data source. - */ - private BlobAccessPointSourceProperties source; - - /* - * The status of the last operation. - */ - private ResourceProvisioningState provisioningState; - - /** - * Creates an instance of BlobAccessPointConfigurationProperties class. - */ - public BlobAccessPointConfigurationProperties() { - } - - /** - * Get the uniqueId property: The system-generated unique identifier of the configuration. - * - * @return the uniqueId value. - */ - public String uniqueId() { - return this.uniqueId; - } - - /** - * Get the state property: The configuration state. A configuration is created in the Active state when this value - * is not specified. - * - * @return the state value. - */ - public BlobAccessPointConfigurationState state() { - return this.state; - } - - /** - * Set the state property: The configuration state. A configuration is created in the Active state when this value - * is not specified. - * - * @param state the state value to set. - * @return the BlobAccessPointConfigurationProperties object itself. - */ - public BlobAccessPointConfigurationProperties withState(BlobAccessPointConfigurationState state) { - this.state = state; - return this; - } - - /** - * Get the description property: An arbitrary description of the Blob Access Point configuration. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: An arbitrary description of the Blob Access Point configuration. - * - * @param description the description value to set. - * @return the BlobAccessPointConfigurationProperties object itself. - */ - public BlobAccessPointConfigurationProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the lastConnectionTestStatus property: The status of the most recent connection test. - * - * @return the lastConnectionTestStatus value. - */ - public BlobAccessPointConnectionTestStatus lastConnectionTestStatus() { - return this.lastConnectionTestStatus; - } - - /** - * Get the lastConnectionTestTimestamp property: The timestamp of the most recent connection test. - * - * @return the lastConnectionTestTimestamp value. - */ - public OffsetDateTime lastConnectionTestTimestamp() { - return this.lastConnectionTestTimestamp; - } - - /** - * Get the lastConnectionTestErrorMessage property: The normalized and redacted error from the most recent failed - * connection test. - * - * @return the lastConnectionTestErrorMessage value. - */ - public String lastConnectionTestErrorMessage() { - return this.lastConnectionTestErrorMessage; - } - - /** - * Get the source property: Information about the backing data source. - * - * @return the source value. - */ - public BlobAccessPointSourceProperties source() { - return this.source; - } - - /** - * Set the source property: Information about the backing data source. - * - * @param source the source value to set. - * @return the BlobAccessPointConfigurationProperties object itself. - */ - public BlobAccessPointConfigurationProperties withSource(BlobAccessPointSourceProperties source) { - this.source = source; - return this; - } - - /** - * Get the provisioningState property: The status of the last operation. - * - * @return the provisioningState value. - */ - public ResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (source() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property source in model BlobAccessPointConfigurationProperties")); - } else { - source().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointConfigurationProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("source", this.source); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConfigurationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConfigurationProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointConfigurationProperties. - */ - public static BlobAccessPointConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConfigurationProperties deserializedBlobAccessPointConfigurationProperties - = new BlobAccessPointConfigurationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("source".equals(fieldName)) { - deserializedBlobAccessPointConfigurationProperties.source - = BlobAccessPointSourceProperties.fromJson(reader); - } else if ("uniqueId".equals(fieldName)) { - deserializedBlobAccessPointConfigurationProperties.uniqueId = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedBlobAccessPointConfigurationProperties.state - = BlobAccessPointConfigurationState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedBlobAccessPointConfigurationProperties.description = reader.getString(); - } else if ("lastConnectionTestStatus".equals(fieldName)) { - deserializedBlobAccessPointConfigurationProperties.lastConnectionTestStatus - = BlobAccessPointConnectionTestStatus.fromString(reader.getString()); - } else if ("lastConnectionTestTimestamp".equals(fieldName)) { - deserializedBlobAccessPointConfigurationProperties.lastConnectionTestTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastConnectionTestErrorMessage".equals(fieldName)) { - deserializedBlobAccessPointConfigurationProperties.lastConnectionTestErrorMessage - = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedBlobAccessPointConfigurationProperties.provisioningState - = ResourceProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConfigurationProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationPropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationPropertiesUpdate.java deleted file mode 100644 index c5a8c826b544..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationPropertiesUpdate.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of a Blob Access Point configuration. - */ -@Fluent -public final class BlobAccessPointConfigurationPropertiesUpdate - implements JsonSerializable { - /* - * The configuration state. A configuration is created in the Active state when this value is not specified. - */ - private BlobAccessPointConfigurationState state; - - /* - * An arbitrary description of the Blob Access Point configuration. - */ - private String description; - - /* - * Information about the backing data source. - */ - private BlobAccessPointSourcePropertiesUpdate source; - - /** - * Creates an instance of BlobAccessPointConfigurationPropertiesUpdate class. - */ - public BlobAccessPointConfigurationPropertiesUpdate() { - } - - /** - * Get the state property: The configuration state. A configuration is created in the Active state when this value - * is not specified. - * - * @return the state value. - */ - public BlobAccessPointConfigurationState state() { - return this.state; - } - - /** - * Set the state property: The configuration state. A configuration is created in the Active state when this value - * is not specified. - * - * @param state the state value to set. - * @return the BlobAccessPointConfigurationPropertiesUpdate object itself. - */ - public BlobAccessPointConfigurationPropertiesUpdate withState(BlobAccessPointConfigurationState state) { - this.state = state; - return this; - } - - /** - * Get the description property: An arbitrary description of the Blob Access Point configuration. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: An arbitrary description of the Blob Access Point configuration. - * - * @param description the description value to set. - * @return the BlobAccessPointConfigurationPropertiesUpdate object itself. - */ - public BlobAccessPointConfigurationPropertiesUpdate withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the source property: Information about the backing data source. - * - * @return the source value. - */ - public BlobAccessPointSourcePropertiesUpdate source() { - return this.source; - } - - /** - * Set the source property: Information about the backing data source. - * - * @param source the source value to set. - * @return the BlobAccessPointConfigurationPropertiesUpdate object itself. - */ - public BlobAccessPointConfigurationPropertiesUpdate withSource(BlobAccessPointSourcePropertiesUpdate source) { - this.source = source; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (source() != null) { - source().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeJsonField("source", this.source); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConfigurationPropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConfigurationPropertiesUpdate if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointConfigurationPropertiesUpdate. - */ - public static BlobAccessPointConfigurationPropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConfigurationPropertiesUpdate deserializedBlobAccessPointConfigurationPropertiesUpdate - = new BlobAccessPointConfigurationPropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("state".equals(fieldName)) { - deserializedBlobAccessPointConfigurationPropertiesUpdate.state - = BlobAccessPointConfigurationState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedBlobAccessPointConfigurationPropertiesUpdate.description = reader.getString(); - } else if ("source".equals(fieldName)) { - deserializedBlobAccessPointConfigurationPropertiesUpdate.source - = BlobAccessPointSourcePropertiesUpdate.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConfigurationPropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationState.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationState.java deleted file mode 100644 index 32ae256cc84d..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationState.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The state of a Blob Access Point configuration. - */ -public final class BlobAccessPointConfigurationState extends ExpandableStringEnum { - /** - * The Blob Access Point configuration is active. - */ - public static final BlobAccessPointConfigurationState ACTIVE = fromString("Active"); - - /** - * The Blob Access Point configuration is inactive. - */ - public static final BlobAccessPointConfigurationState INACTIVE = fromString("Inactive"); - - /** - * Creates a new instance of BlobAccessPointConfigurationState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlobAccessPointConfigurationState() { - } - - /** - * Creates or finds a BlobAccessPointConfigurationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlobAccessPointConfigurationState. - */ - public static BlobAccessPointConfigurationState fromString(String name) { - return fromString(name, BlobAccessPointConfigurationState.class); - } - - /** - * Gets known BlobAccessPointConfigurationState values. - * - * @return known BlobAccessPointConfigurationState values. - */ - public static Collection values() { - return values(BlobAccessPointConfigurationState.class); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationUpdate.java deleted file mode 100644 index e5df8cc74c64..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationUpdate.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * A BlobAccessPointConfiguration is a tracked Azure resource modeled as a sub-resource of a Storage Account. - */ -@Fluent -public final class BlobAccessPointConfigurationUpdate implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /* - * The resource-specific properties for this resource. - */ - private BlobAccessPointConfigurationPropertiesUpdate properties; - - /** - * Creates an instance of BlobAccessPointConfigurationUpdate class. - */ - public BlobAccessPointConfigurationUpdate() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the BlobAccessPointConfigurationUpdate object itself. - */ - public BlobAccessPointConfigurationUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public BlobAccessPointConfigurationPropertiesUpdate properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the BlobAccessPointConfigurationUpdate object itself. - */ - public BlobAccessPointConfigurationUpdate withProperties(BlobAccessPointConfigurationPropertiesUpdate properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConfigurationUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConfigurationUpdate if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointConfigurationUpdate. - */ - public static BlobAccessPointConfigurationUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConfigurationUpdate deserializedBlobAccessPointConfigurationUpdate - = new BlobAccessPointConfigurationUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBlobAccessPointConfigurationUpdate.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedBlobAccessPointConfigurationUpdate.properties - = BlobAccessPointConfigurationPropertiesUpdate.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConfigurationUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionProperties.java deleted file mode 100644 index 5bd41ecf17e1..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details for connecting to a backing data source. - */ -@Immutable -public class BlobAccessPointConnectionProperties implements JsonSerializable { - /* - * The connection type. This value determines the remaining shape of the connection object. - */ - private BlobAccessPointConnectionType connectionType - = BlobAccessPointConnectionType.fromString("BlobAccessPointConnectionProperties"); - - /** - * Creates an instance of BlobAccessPointConnectionProperties class. - */ - public BlobAccessPointConnectionProperties() { - } - - /** - * Get the connectionType property: The connection type. This value determines the remaining shape of the connection - * object. - * - * @return the connectionType value. - */ - public BlobAccessPointConnectionType connectionType() { - return this.connectionType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("connectionType", - this.connectionType == null ? null : this.connectionType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConnectionProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointConnectionProperties. - */ - public static BlobAccessPointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("connectionType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Endpoint".equals(discriminatorValue)) { - return BlobAccessPointEndpointConnectionProperties.fromJson(readerToUse.reset()); - } else if ("PrivateLink".equals(discriminatorValue)) { - return BlobAccessPointPrivateLinkConnectionProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static BlobAccessPointConnectionProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConnectionProperties deserializedBlobAccessPointConnectionProperties - = new BlobAccessPointConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connectionType".equals(fieldName)) { - deserializedBlobAccessPointConnectionProperties.connectionType - = BlobAccessPointConnectionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConnectionProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionPropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionPropertiesUpdate.java deleted file mode 100644 index 70923b9dc7fc..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionPropertiesUpdate.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details for connecting to a backing data source. - */ -@Immutable -public class BlobAccessPointConnectionPropertiesUpdate - implements JsonSerializable { - /* - * The connection type. This value determines the remaining shape of the connection object. - */ - private BlobAccessPointConnectionType connectionType - = BlobAccessPointConnectionType.fromString("BlobAccessPointConnectionPropertiesUpdate"); - - /** - * Creates an instance of BlobAccessPointConnectionPropertiesUpdate class. - */ - public BlobAccessPointConnectionPropertiesUpdate() { - } - - /** - * Get the connectionType property: The connection type. This value determines the remaining shape of the connection - * object. - * - * @return the connectionType value. - */ - public BlobAccessPointConnectionType connectionType() { - return this.connectionType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("connectionType", - this.connectionType == null ? null : this.connectionType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConnectionPropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConnectionPropertiesUpdate if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointConnectionPropertiesUpdate. - */ - public static BlobAccessPointConnectionPropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("connectionType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Endpoint".equals(discriminatorValue)) { - return BlobAccessPointEndpointConnectionPropertiesUpdate.fromJson(readerToUse.reset()); - } else if ("PrivateLink".equals(discriminatorValue)) { - return BlobAccessPointPrivateLinkConnectionPropertiesUpdate.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static BlobAccessPointConnectionPropertiesUpdate fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConnectionPropertiesUpdate deserializedBlobAccessPointConnectionPropertiesUpdate - = new BlobAccessPointConnectionPropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connectionType".equals(fieldName)) { - deserializedBlobAccessPointConnectionPropertiesUpdate.connectionType - = BlobAccessPointConnectionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConnectionPropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestRequest.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestRequest.java deleted file mode 100644 index a1907cacdb17..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestRequest.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The request used to test an existing Blob Access Point configuration. - */ -@Fluent -public final class BlobAccessPointConnectionTestRequest - implements JsonSerializable { - /* - * The system-generated unique identifier of the Blob Access Point configuration, as returned by a read operation. - * This value must match the configuration named in the request path, and is required so that a configuration which - * was deleted and recreated under the same name is not tested by mistake. - */ - private String uniqueId; - - /** - * Creates an instance of BlobAccessPointConnectionTestRequest class. - */ - public BlobAccessPointConnectionTestRequest() { - } - - /** - * Get the uniqueId property: The system-generated unique identifier of the Blob Access Point configuration, as - * returned by a read operation. This value must match the configuration named in the request path, and is required - * so that a configuration which was deleted and recreated under the same name is not tested by mistake. - * - * @return the uniqueId value. - */ - public String uniqueId() { - return this.uniqueId; - } - - /** - * Set the uniqueId property: The system-generated unique identifier of the Blob Access Point configuration, as - * returned by a read operation. This value must match the configuration named in the request path, and is required - * so that a configuration which was deleted and recreated under the same name is not tested by mistake. - * - * @param uniqueId the uniqueId value to set. - * @return the BlobAccessPointConnectionTestRequest object itself. - */ - public BlobAccessPointConnectionTestRequest withUniqueId(String uniqueId) { - this.uniqueId = uniqueId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (uniqueId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property uniqueId in model BlobAccessPointConnectionTestRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointConnectionTestRequest.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uniqueId", this.uniqueId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointConnectionTestRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointConnectionTestRequest if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointConnectionTestRequest. - */ - public static BlobAccessPointConnectionTestRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointConnectionTestRequest deserializedBlobAccessPointConnectionTestRequest - = new BlobAccessPointConnectionTestRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uniqueId".equals(fieldName)) { - deserializedBlobAccessPointConnectionTestRequest.uniqueId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointConnectionTestRequest; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestStatus.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestStatus.java deleted file mode 100644 index b281824311bf..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestStatus.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The status of the most recent connection test. - */ -public final class BlobAccessPointConnectionTestStatus - extends ExpandableStringEnum { - /** - * The connection test succeeded. - */ - public static final BlobAccessPointConnectionTestStatus SUCCEEDED = fromString("Succeeded"); - - /** - * The connection test failed. - */ - public static final BlobAccessPointConnectionTestStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of BlobAccessPointConnectionTestStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlobAccessPointConnectionTestStatus() { - } - - /** - * Creates or finds a BlobAccessPointConnectionTestStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlobAccessPointConnectionTestStatus. - */ - public static BlobAccessPointConnectionTestStatus fromString(String name) { - return fromString(name, BlobAccessPointConnectionTestStatus.class); - } - - /** - * Gets known BlobAccessPointConnectionTestStatus values. - * - * @return known BlobAccessPointConnectionTestStatus values. - */ - public static Collection values() { - return values(BlobAccessPointConnectionTestStatus.class); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionType.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionType.java deleted file mode 100644 index f526edb20b58..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The connection type used to reach a non-Azure backing data source. - */ -public final class BlobAccessPointConnectionType extends ExpandableStringEnum { - /** - * Connect directly to a public or otherwise routable endpoint. - */ - public static final BlobAccessPointConnectionType ENDPOINT = fromString("Endpoint"); - - /** - * Connect through Azure Private Link. - */ - public static final BlobAccessPointConnectionType PRIVATE_LINK = fromString("PrivateLink"); - - /** - * Creates a new instance of BlobAccessPointConnectionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlobAccessPointConnectionType() { - } - - /** - * Creates or finds a BlobAccessPointConnectionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlobAccessPointConnectionType. - */ - public static BlobAccessPointConnectionType fromString(String name) { - return fromString(name, BlobAccessPointConnectionType.class); - } - - /** - * Gets known BlobAccessPointConnectionType values. - * - * @return known BlobAccessPointConnectionType values. - */ - public static Collection values() { - return values(BlobAccessPointConnectionType.class); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourceProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourceProperties.java deleted file mode 100644 index 42a33519569c..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourceProperties.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Dell OneFS backing source. - */ -@Fluent -public final class BlobAccessPointDellOneFsSourceProperties extends BlobAccessPointSourceProperties { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.DELL_ONE_FS; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionProperties connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthProperties auth; - - /** - * Creates an instance of BlobAccessPointDellOneFsSourceProperties class. - */ - public BlobAccessPointDellOneFsSourceProperties() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionProperties connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointDellOneFsSourceProperties object itself. - */ - public BlobAccessPointDellOneFsSourceProperties withConnection(BlobAccessPointConnectionProperties connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthProperties auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointDellOneFsSourceProperties object itself. - */ - public BlobAccessPointDellOneFsSourceProperties withAuth(BlobAccessPointRemoteAuthProperties auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property connection in model BlobAccessPointDellOneFsSourceProperties")); - } else { - connection().validate(); - } - if (auth() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property auth in model BlobAccessPointDellOneFsSourceProperties")); - } else { - auth().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointDellOneFsSourceProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointDellOneFsSourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointDellOneFsSourceProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointDellOneFsSourceProperties. - */ - public static BlobAccessPointDellOneFsSourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointDellOneFsSourceProperties deserializedBlobAccessPointDellOneFsSourceProperties - = new BlobAccessPointDellOneFsSourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connection".equals(fieldName)) { - deserializedBlobAccessPointDellOneFsSourceProperties.connection - = BlobAccessPointConnectionProperties.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointDellOneFsSourceProperties.auth - = BlobAccessPointRemoteAuthProperties.fromJson(reader); - } else if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointDellOneFsSourceProperties.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointDellOneFsSourceProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourcePropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourcePropertiesUpdate.java deleted file mode 100644 index 6a586c097eae..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourcePropertiesUpdate.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Dell OneFS backing source. - */ -@Fluent -public final class BlobAccessPointDellOneFsSourcePropertiesUpdate extends BlobAccessPointSourcePropertiesUpdate { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.DELL_ONE_FS; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionPropertiesUpdate connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthPropertiesUpdate auth; - - /** - * Creates an instance of BlobAccessPointDellOneFsSourcePropertiesUpdate class. - */ - public BlobAccessPointDellOneFsSourcePropertiesUpdate() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionPropertiesUpdate connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointDellOneFsSourcePropertiesUpdate object itself. - */ - public BlobAccessPointDellOneFsSourcePropertiesUpdate - withConnection(BlobAccessPointConnectionPropertiesUpdate connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthPropertiesUpdate auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointDellOneFsSourcePropertiesUpdate object itself. - */ - public BlobAccessPointDellOneFsSourcePropertiesUpdate withAuth(BlobAccessPointRemoteAuthPropertiesUpdate auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() != null) { - connection().validate(); - } - if (auth() != null) { - auth().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointDellOneFsSourcePropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointDellOneFsSourcePropertiesUpdate if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointDellOneFsSourcePropertiesUpdate. - */ - public static BlobAccessPointDellOneFsSourcePropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointDellOneFsSourcePropertiesUpdate deserializedBlobAccessPointDellOneFsSourcePropertiesUpdate - = new BlobAccessPointDellOneFsSourcePropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointDellOneFsSourcePropertiesUpdate.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else if ("connection".equals(fieldName)) { - deserializedBlobAccessPointDellOneFsSourcePropertiesUpdate.connection - = BlobAccessPointConnectionPropertiesUpdate.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointDellOneFsSourcePropertiesUpdate.auth - = BlobAccessPointRemoteAuthPropertiesUpdate.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointDellOneFsSourcePropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionProperties.java deleted file mode 100644 index 67d001264ee9..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionProperties.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A direct endpoint connection. - */ -@Fluent -public final class BlobAccessPointEndpointConnectionProperties extends BlobAccessPointConnectionProperties { - /* - * The connection type. This value determines the remaining shape of the connection object. - */ - private BlobAccessPointConnectionType connectionType = BlobAccessPointConnectionType.ENDPOINT; - - /* - * The backing endpoint, including its protocol, host, optional port, and optional path. - */ - private String endpoint; - - /* - * TLS certificate verification behavior. Defaults to Perform when not specified. - */ - private BlobAccessPointTlsVerification tlsVerification; - - /** - * Creates an instance of BlobAccessPointEndpointConnectionProperties class. - */ - public BlobAccessPointEndpointConnectionProperties() { - } - - /** - * Get the connectionType property: The connection type. This value determines the remaining shape of the connection - * object. - * - * @return the connectionType value. - */ - @Override - public BlobAccessPointConnectionType connectionType() { - return this.connectionType; - } - - /** - * Get the endpoint property: The backing endpoint, including its protocol, host, optional port, and optional path. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: The backing endpoint, including its protocol, host, optional port, and optional path. - * - * @param endpoint the endpoint value to set. - * @return the BlobAccessPointEndpointConnectionProperties object itself. - */ - public BlobAccessPointEndpointConnectionProperties withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the tlsVerification property: TLS certificate verification behavior. Defaults to Perform when not specified. - * - * @return the tlsVerification value. - */ - public BlobAccessPointTlsVerification tlsVerification() { - return this.tlsVerification; - } - - /** - * Set the tlsVerification property: TLS certificate verification behavior. Defaults to Perform when not specified. - * - * @param tlsVerification the tlsVerification value to set. - * @return the BlobAccessPointEndpointConnectionProperties object itself. - */ - public BlobAccessPointEndpointConnectionProperties - withTlsVerification(BlobAccessPointTlsVerification tlsVerification) { - this.tlsVerification = tlsVerification; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (endpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property endpoint in model BlobAccessPointEndpointConnectionProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointEndpointConnectionProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeStringField("connectionType", - this.connectionType == null ? null : this.connectionType.toString()); - jsonWriter.writeStringField("tlsVerification", - this.tlsVerification == null ? null : this.tlsVerification.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointEndpointConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointEndpointConnectionProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointEndpointConnectionProperties. - */ - public static BlobAccessPointEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointEndpointConnectionProperties deserializedBlobAccessPointEndpointConnectionProperties - = new BlobAccessPointEndpointConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endpoint".equals(fieldName)) { - deserializedBlobAccessPointEndpointConnectionProperties.endpoint = reader.getString(); - } else if ("connectionType".equals(fieldName)) { - deserializedBlobAccessPointEndpointConnectionProperties.connectionType - = BlobAccessPointConnectionType.fromString(reader.getString()); - } else if ("tlsVerification".equals(fieldName)) { - deserializedBlobAccessPointEndpointConnectionProperties.tlsVerification - = BlobAccessPointTlsVerification.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointEndpointConnectionProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionPropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionPropertiesUpdate.java deleted file mode 100644 index 6a95509261e6..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionPropertiesUpdate.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A direct endpoint connection. - */ -@Fluent -public final class BlobAccessPointEndpointConnectionPropertiesUpdate extends BlobAccessPointConnectionPropertiesUpdate { - /* - * The connection type. This value determines the remaining shape of the connection object. - */ - private BlobAccessPointConnectionType connectionType = BlobAccessPointConnectionType.ENDPOINT; - - /* - * TLS certificate verification behavior. Defaults to Perform when not specified. - */ - private BlobAccessPointTlsVerification tlsVerification; - - /** - * Creates an instance of BlobAccessPointEndpointConnectionPropertiesUpdate class. - */ - public BlobAccessPointEndpointConnectionPropertiesUpdate() { - } - - /** - * Get the connectionType property: The connection type. This value determines the remaining shape of the connection - * object. - * - * @return the connectionType value. - */ - @Override - public BlobAccessPointConnectionType connectionType() { - return this.connectionType; - } - - /** - * Get the tlsVerification property: TLS certificate verification behavior. Defaults to Perform when not specified. - * - * @return the tlsVerification value. - */ - public BlobAccessPointTlsVerification tlsVerification() { - return this.tlsVerification; - } - - /** - * Set the tlsVerification property: TLS certificate verification behavior. Defaults to Perform when not specified. - * - * @param tlsVerification the tlsVerification value to set. - * @return the BlobAccessPointEndpointConnectionPropertiesUpdate object itself. - */ - public BlobAccessPointEndpointConnectionPropertiesUpdate - withTlsVerification(BlobAccessPointTlsVerification tlsVerification) { - this.tlsVerification = tlsVerification; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("connectionType", - this.connectionType == null ? null : this.connectionType.toString()); - jsonWriter.writeStringField("tlsVerification", - this.tlsVerification == null ? null : this.tlsVerification.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointEndpointConnectionPropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointEndpointConnectionPropertiesUpdate if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointEndpointConnectionPropertiesUpdate. - */ - public static BlobAccessPointEndpointConnectionPropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointEndpointConnectionPropertiesUpdate deserializedBlobAccessPointEndpointConnectionPropertiesUpdate - = new BlobAccessPointEndpointConnectionPropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connectionType".equals(fieldName)) { - deserializedBlobAccessPointEndpointConnectionPropertiesUpdate.connectionType - = BlobAccessPointConnectionType.fromString(reader.getString()); - } else if ("tlsVerification".equals(fieldName)) { - deserializedBlobAccessPointEndpointConnectionPropertiesUpdate.tlsVerification - = BlobAccessPointTlsVerification.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointEndpointConnectionPropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourceProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourceProperties.java deleted file mode 100644 index c34ad6ce2b77..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourceProperties.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Another S3-compatible backing source. - */ -@Fluent -public final class BlobAccessPointGenericS3SourceProperties extends BlobAccessPointSourceProperties { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.S3COMPATIBLE; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionProperties connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthProperties auth; - - /** - * Creates an instance of BlobAccessPointGenericS3SourceProperties class. - */ - public BlobAccessPointGenericS3SourceProperties() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionProperties connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointGenericS3SourceProperties object itself. - */ - public BlobAccessPointGenericS3SourceProperties withConnection(BlobAccessPointConnectionProperties connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthProperties auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointGenericS3SourceProperties object itself. - */ - public BlobAccessPointGenericS3SourceProperties withAuth(BlobAccessPointRemoteAuthProperties auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property connection in model BlobAccessPointGenericS3SourceProperties")); - } else { - connection().validate(); - } - if (auth() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property auth in model BlobAccessPointGenericS3SourceProperties")); - } else { - auth().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointGenericS3SourceProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointGenericS3SourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointGenericS3SourceProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointGenericS3SourceProperties. - */ - public static BlobAccessPointGenericS3SourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointGenericS3SourceProperties deserializedBlobAccessPointGenericS3SourceProperties - = new BlobAccessPointGenericS3SourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connection".equals(fieldName)) { - deserializedBlobAccessPointGenericS3SourceProperties.connection - = BlobAccessPointConnectionProperties.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointGenericS3SourceProperties.auth - = BlobAccessPointRemoteAuthProperties.fromJson(reader); - } else if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointGenericS3SourceProperties.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointGenericS3SourceProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourcePropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourcePropertiesUpdate.java deleted file mode 100644 index 00a77cfc4996..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourcePropertiesUpdate.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Another S3-compatible backing source. - */ -@Fluent -public final class BlobAccessPointGenericS3SourcePropertiesUpdate extends BlobAccessPointSourcePropertiesUpdate { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.S3COMPATIBLE; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionPropertiesUpdate connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthPropertiesUpdate auth; - - /** - * Creates an instance of BlobAccessPointGenericS3SourcePropertiesUpdate class. - */ - public BlobAccessPointGenericS3SourcePropertiesUpdate() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionPropertiesUpdate connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointGenericS3SourcePropertiesUpdate object itself. - */ - public BlobAccessPointGenericS3SourcePropertiesUpdate - withConnection(BlobAccessPointConnectionPropertiesUpdate connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthPropertiesUpdate auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointGenericS3SourcePropertiesUpdate object itself. - */ - public BlobAccessPointGenericS3SourcePropertiesUpdate withAuth(BlobAccessPointRemoteAuthPropertiesUpdate auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() != null) { - connection().validate(); - } - if (auth() != null) { - auth().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointGenericS3SourcePropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointGenericS3SourcePropertiesUpdate if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointGenericS3SourcePropertiesUpdate. - */ - public static BlobAccessPointGenericS3SourcePropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointGenericS3SourcePropertiesUpdate deserializedBlobAccessPointGenericS3SourcePropertiesUpdate - = new BlobAccessPointGenericS3SourcePropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointGenericS3SourcePropertiesUpdate.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else if ("connection".equals(fieldName)) { - deserializedBlobAccessPointGenericS3SourcePropertiesUpdate.connection - = BlobAccessPointConnectionPropertiesUpdate.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointGenericS3SourcePropertiesUpdate.auth - = BlobAccessPointRemoteAuthPropertiesUpdate.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointGenericS3SourcePropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourceProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourceProperties.java deleted file mode 100644 index 6e48f9dc2722..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourceProperties.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Nasuni backing source. - */ -@Fluent -public final class BlobAccessPointNasuniSourceProperties extends BlobAccessPointSourceProperties { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.NASUNI; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionProperties connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthProperties auth; - - /** - * Creates an instance of BlobAccessPointNasuniSourceProperties class. - */ - public BlobAccessPointNasuniSourceProperties() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionProperties connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointNasuniSourceProperties object itself. - */ - public BlobAccessPointNasuniSourceProperties withConnection(BlobAccessPointConnectionProperties connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthProperties auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointNasuniSourceProperties object itself. - */ - public BlobAccessPointNasuniSourceProperties withAuth(BlobAccessPointRemoteAuthProperties auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property connection in model BlobAccessPointNasuniSourceProperties")); - } else { - connection().validate(); - } - if (auth() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property auth in model BlobAccessPointNasuniSourceProperties")); - } else { - auth().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointNasuniSourceProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointNasuniSourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointNasuniSourceProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointNasuniSourceProperties. - */ - public static BlobAccessPointNasuniSourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointNasuniSourceProperties deserializedBlobAccessPointNasuniSourceProperties - = new BlobAccessPointNasuniSourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connection".equals(fieldName)) { - deserializedBlobAccessPointNasuniSourceProperties.connection - = BlobAccessPointConnectionProperties.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointNasuniSourceProperties.auth - = BlobAccessPointRemoteAuthProperties.fromJson(reader); - } else if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointNasuniSourceProperties.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointNasuniSourceProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourcePropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourcePropertiesUpdate.java deleted file mode 100644 index fc813f1da5ae..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourcePropertiesUpdate.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Nasuni backing source. - */ -@Fluent -public final class BlobAccessPointNasuniSourcePropertiesUpdate extends BlobAccessPointSourcePropertiesUpdate { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.NASUNI; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionPropertiesUpdate connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthPropertiesUpdate auth; - - /** - * Creates an instance of BlobAccessPointNasuniSourcePropertiesUpdate class. - */ - public BlobAccessPointNasuniSourcePropertiesUpdate() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionPropertiesUpdate connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointNasuniSourcePropertiesUpdate object itself. - */ - public BlobAccessPointNasuniSourcePropertiesUpdate - withConnection(BlobAccessPointConnectionPropertiesUpdate connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthPropertiesUpdate auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointNasuniSourcePropertiesUpdate object itself. - */ - public BlobAccessPointNasuniSourcePropertiesUpdate withAuth(BlobAccessPointRemoteAuthPropertiesUpdate auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() != null) { - connection().validate(); - } - if (auth() != null) { - auth().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointNasuniSourcePropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointNasuniSourcePropertiesUpdate if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointNasuniSourcePropertiesUpdate. - */ - public static BlobAccessPointNasuniSourcePropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointNasuniSourcePropertiesUpdate deserializedBlobAccessPointNasuniSourcePropertiesUpdate - = new BlobAccessPointNasuniSourcePropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointNasuniSourcePropertiesUpdate.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else if ("connection".equals(fieldName)) { - deserializedBlobAccessPointNasuniSourcePropertiesUpdate.connection - = BlobAccessPointConnectionPropertiesUpdate.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointNasuniSourcePropertiesUpdate.auth - = BlobAccessPointRemoteAuthPropertiesUpdate.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointNasuniSourcePropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourceProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourceProperties.java deleted file mode 100644 index 502a08d2774e..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourceProperties.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A NetApp ONTAP backing source. - */ -@Fluent -public final class BlobAccessPointNetAppOntapSourceProperties extends BlobAccessPointSourceProperties { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.NET_APP_ONTAP; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionProperties connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthProperties auth; - - /** - * Creates an instance of BlobAccessPointNetAppOntapSourceProperties class. - */ - public BlobAccessPointNetAppOntapSourceProperties() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionProperties connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointNetAppOntapSourceProperties object itself. - */ - public BlobAccessPointNetAppOntapSourceProperties withConnection(BlobAccessPointConnectionProperties connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthProperties auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointNetAppOntapSourceProperties object itself. - */ - public BlobAccessPointNetAppOntapSourceProperties withAuth(BlobAccessPointRemoteAuthProperties auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property connection in model BlobAccessPointNetAppOntapSourceProperties")); - } else { - connection().validate(); - } - if (auth() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property auth in model BlobAccessPointNetAppOntapSourceProperties")); - } else { - auth().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointNetAppOntapSourceProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointNetAppOntapSourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointNetAppOntapSourceProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointNetAppOntapSourceProperties. - */ - public static BlobAccessPointNetAppOntapSourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointNetAppOntapSourceProperties deserializedBlobAccessPointNetAppOntapSourceProperties - = new BlobAccessPointNetAppOntapSourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connection".equals(fieldName)) { - deserializedBlobAccessPointNetAppOntapSourceProperties.connection - = BlobAccessPointConnectionProperties.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointNetAppOntapSourceProperties.auth - = BlobAccessPointRemoteAuthProperties.fromJson(reader); - } else if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointNetAppOntapSourceProperties.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointNetAppOntapSourceProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourcePropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourcePropertiesUpdate.java deleted file mode 100644 index b8b814e9abd5..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourcePropertiesUpdate.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A NetApp ONTAP backing source. - */ -@Fluent -public final class BlobAccessPointNetAppOntapSourcePropertiesUpdate extends BlobAccessPointSourcePropertiesUpdate { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.NET_APP_ONTAP; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionPropertiesUpdate connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthPropertiesUpdate auth; - - /** - * Creates an instance of BlobAccessPointNetAppOntapSourcePropertiesUpdate class. - */ - public BlobAccessPointNetAppOntapSourcePropertiesUpdate() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionPropertiesUpdate connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointNetAppOntapSourcePropertiesUpdate object itself. - */ - public BlobAccessPointNetAppOntapSourcePropertiesUpdate - withConnection(BlobAccessPointConnectionPropertiesUpdate connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthPropertiesUpdate auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointNetAppOntapSourcePropertiesUpdate object itself. - */ - public BlobAccessPointNetAppOntapSourcePropertiesUpdate withAuth(BlobAccessPointRemoteAuthPropertiesUpdate auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() != null) { - connection().validate(); - } - if (auth() != null) { - auth().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointNetAppOntapSourcePropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointNetAppOntapSourcePropertiesUpdate if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointNetAppOntapSourcePropertiesUpdate. - */ - public static BlobAccessPointNetAppOntapSourcePropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointNetAppOntapSourcePropertiesUpdate deserializedBlobAccessPointNetAppOntapSourcePropertiesUpdate - = new BlobAccessPointNetAppOntapSourcePropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointNetAppOntapSourcePropertiesUpdate.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else if ("connection".equals(fieldName)) { - deserializedBlobAccessPointNetAppOntapSourcePropertiesUpdate.connection - = BlobAccessPointConnectionPropertiesUpdate.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointNetAppOntapSourcePropertiesUpdate.auth - = BlobAccessPointRemoteAuthPropertiesUpdate.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointNetAppOntapSourcePropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionProperties.java deleted file mode 100644 index ba402f8956ea..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionProperties.java +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A connection established through Azure Private Link. - */ -@Fluent -public final class BlobAccessPointPrivateLinkConnectionProperties extends BlobAccessPointConnectionProperties { - /* - * The connection type. This value determines the remaining shape of the connection object. - */ - private BlobAccessPointConnectionType connectionType = BlobAccessPointConnectionType.PRIVATE_LINK; - - /* - * Indicates that privateLinkId contains an Azure resource ID. - */ - private BlobAccessPointPrivateLinkIdType privateLinkIdType; - - /* - * The Azure resource ID of the backing Private Link service. - */ - private String privateLinkId; - - /* - * The Private Link group ID, when required by the backing resource. - */ - private String privateLinkGroupId; - - /* - * The Azure region in which the private endpoint is provisioned. - */ - private String privateLinkLocation; - - /* - * The connection request message sent to the Private Link owner. - */ - private String requestMessage; - - /* - * The backing endpoint as seen by the target of the Private Link. - */ - private String endpoint; - - /* - * TLS certificate verification behavior. Defaults to Perform when not specified. - */ - private BlobAccessPointTlsVerification tlsVerification; - - /* - * The name of the private endpoint created by Azure Storage. - */ - private String privateEndpointName; - - /** - * Creates an instance of BlobAccessPointPrivateLinkConnectionProperties class. - */ - public BlobAccessPointPrivateLinkConnectionProperties() { - } - - /** - * Get the connectionType property: The connection type. This value determines the remaining shape of the connection - * object. - * - * @return the connectionType value. - */ - @Override - public BlobAccessPointConnectionType connectionType() { - return this.connectionType; - } - - /** - * Get the privateLinkIdType property: Indicates that privateLinkId contains an Azure resource ID. - * - * @return the privateLinkIdType value. - */ - public BlobAccessPointPrivateLinkIdType privateLinkIdType() { - return this.privateLinkIdType; - } - - /** - * Set the privateLinkIdType property: Indicates that privateLinkId contains an Azure resource ID. - * - * @param privateLinkIdType the privateLinkIdType value to set. - * @return the BlobAccessPointPrivateLinkConnectionProperties object itself. - */ - public BlobAccessPointPrivateLinkConnectionProperties - withPrivateLinkIdType(BlobAccessPointPrivateLinkIdType privateLinkIdType) { - this.privateLinkIdType = privateLinkIdType; - return this; - } - - /** - * Get the privateLinkId property: The Azure resource ID of the backing Private Link service. - * - * @return the privateLinkId value. - */ - public String privateLinkId() { - return this.privateLinkId; - } - - /** - * Set the privateLinkId property: The Azure resource ID of the backing Private Link service. - * - * @param privateLinkId the privateLinkId value to set. - * @return the BlobAccessPointPrivateLinkConnectionProperties object itself. - */ - public BlobAccessPointPrivateLinkConnectionProperties withPrivateLinkId(String privateLinkId) { - this.privateLinkId = privateLinkId; - return this; - } - - /** - * Get the privateLinkGroupId property: The Private Link group ID, when required by the backing resource. - * - * @return the privateLinkGroupId value. - */ - public String privateLinkGroupId() { - return this.privateLinkGroupId; - } - - /** - * Set the privateLinkGroupId property: The Private Link group ID, when required by the backing resource. - * - * @param privateLinkGroupId the privateLinkGroupId value to set. - * @return the BlobAccessPointPrivateLinkConnectionProperties object itself. - */ - public BlobAccessPointPrivateLinkConnectionProperties withPrivateLinkGroupId(String privateLinkGroupId) { - this.privateLinkGroupId = privateLinkGroupId; - return this; - } - - /** - * Get the privateLinkLocation property: The Azure region in which the private endpoint is provisioned. - * - * @return the privateLinkLocation value. - */ - public String privateLinkLocation() { - return this.privateLinkLocation; - } - - /** - * Set the privateLinkLocation property: The Azure region in which the private endpoint is provisioned. - * - * @param privateLinkLocation the privateLinkLocation value to set. - * @return the BlobAccessPointPrivateLinkConnectionProperties object itself. - */ - public BlobAccessPointPrivateLinkConnectionProperties withPrivateLinkLocation(String privateLinkLocation) { - this.privateLinkLocation = privateLinkLocation; - return this; - } - - /** - * Get the requestMessage property: The connection request message sent to the Private Link owner. - * - * @return the requestMessage value. - */ - public String requestMessage() { - return this.requestMessage; - } - - /** - * Set the requestMessage property: The connection request message sent to the Private Link owner. - * - * @param requestMessage the requestMessage value to set. - * @return the BlobAccessPointPrivateLinkConnectionProperties object itself. - */ - public BlobAccessPointPrivateLinkConnectionProperties withRequestMessage(String requestMessage) { - this.requestMessage = requestMessage; - return this; - } - - /** - * Get the endpoint property: The backing endpoint as seen by the target of the Private Link. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: The backing endpoint as seen by the target of the Private Link. - * - * @param endpoint the endpoint value to set. - * @return the BlobAccessPointPrivateLinkConnectionProperties object itself. - */ - public BlobAccessPointPrivateLinkConnectionProperties withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the tlsVerification property: TLS certificate verification behavior. Defaults to Perform when not specified. - * - * @return the tlsVerification value. - */ - public BlobAccessPointTlsVerification tlsVerification() { - return this.tlsVerification; - } - - /** - * Set the tlsVerification property: TLS certificate verification behavior. Defaults to Perform when not specified. - * - * @param tlsVerification the tlsVerification value to set. - * @return the BlobAccessPointPrivateLinkConnectionProperties object itself. - */ - public BlobAccessPointPrivateLinkConnectionProperties - withTlsVerification(BlobAccessPointTlsVerification tlsVerification) { - this.tlsVerification = tlsVerification; - return this; - } - - /** - * Get the privateEndpointName property: The name of the private endpoint created by Azure Storage. - * - * @return the privateEndpointName value. - */ - public String privateEndpointName() { - return this.privateEndpointName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (privateLinkIdType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkIdType in model BlobAccessPointPrivateLinkConnectionProperties")); - } - if (privateLinkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkId in model BlobAccessPointPrivateLinkConnectionProperties")); - } - if (privateLinkLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkLocation in model BlobAccessPointPrivateLinkConnectionProperties")); - } - if (requestMessage() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property requestMessage in model BlobAccessPointPrivateLinkConnectionProperties")); - } - if (endpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property endpoint in model BlobAccessPointPrivateLinkConnectionProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointPrivateLinkConnectionProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("privateLinkIdType", - this.privateLinkIdType == null ? null : this.privateLinkIdType.toString()); - jsonWriter.writeStringField("privateLinkId", this.privateLinkId); - jsonWriter.writeStringField("privateLinkLocation", this.privateLinkLocation); - jsonWriter.writeStringField("requestMessage", this.requestMessage); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeStringField("connectionType", - this.connectionType == null ? null : this.connectionType.toString()); - jsonWriter.writeStringField("privateLinkGroupId", this.privateLinkGroupId); - jsonWriter.writeStringField("tlsVerification", - this.tlsVerification == null ? null : this.tlsVerification.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointPrivateLinkConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointPrivateLinkConnectionProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointPrivateLinkConnectionProperties. - */ - public static BlobAccessPointPrivateLinkConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointPrivateLinkConnectionProperties deserializedBlobAccessPointPrivateLinkConnectionProperties - = new BlobAccessPointPrivateLinkConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("privateLinkIdType".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionProperties.privateLinkIdType - = BlobAccessPointPrivateLinkIdType.fromString(reader.getString()); - } else if ("privateLinkId".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionProperties.privateLinkId = reader.getString(); - } else if ("privateLinkLocation".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionProperties.privateLinkLocation = reader.getString(); - } else if ("requestMessage".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionProperties.requestMessage = reader.getString(); - } else if ("endpoint".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionProperties.endpoint = reader.getString(); - } else if ("connectionType".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionProperties.connectionType - = BlobAccessPointConnectionType.fromString(reader.getString()); - } else if ("privateLinkGroupId".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionProperties.privateLinkGroupId = reader.getString(); - } else if ("tlsVerification".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionProperties.tlsVerification - = BlobAccessPointTlsVerification.fromString(reader.getString()); - } else if ("privateEndpointName".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionProperties.privateEndpointName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointPrivateLinkConnectionProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionPropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionPropertiesUpdate.java deleted file mode 100644 index db2f2a295028..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionPropertiesUpdate.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A connection established through Azure Private Link. - */ -@Fluent -public final class BlobAccessPointPrivateLinkConnectionPropertiesUpdate - extends BlobAccessPointConnectionPropertiesUpdate { - /* - * The connection type. This value determines the remaining shape of the connection object. - */ - private BlobAccessPointConnectionType connectionType = BlobAccessPointConnectionType.PRIVATE_LINK; - - /* - * TLS certificate verification behavior. Defaults to Perform when not specified. - */ - private BlobAccessPointTlsVerification tlsVerification; - - /** - * Creates an instance of BlobAccessPointPrivateLinkConnectionPropertiesUpdate class. - */ - public BlobAccessPointPrivateLinkConnectionPropertiesUpdate() { - } - - /** - * Get the connectionType property: The connection type. This value determines the remaining shape of the connection - * object. - * - * @return the connectionType value. - */ - @Override - public BlobAccessPointConnectionType connectionType() { - return this.connectionType; - } - - /** - * Get the tlsVerification property: TLS certificate verification behavior. Defaults to Perform when not specified. - * - * @return the tlsVerification value. - */ - public BlobAccessPointTlsVerification tlsVerification() { - return this.tlsVerification; - } - - /** - * Set the tlsVerification property: TLS certificate verification behavior. Defaults to Perform when not specified. - * - * @param tlsVerification the tlsVerification value to set. - * @return the BlobAccessPointPrivateLinkConnectionPropertiesUpdate object itself. - */ - public BlobAccessPointPrivateLinkConnectionPropertiesUpdate - withTlsVerification(BlobAccessPointTlsVerification tlsVerification) { - this.tlsVerification = tlsVerification; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("connectionType", - this.connectionType == null ? null : this.connectionType.toString()); - jsonWriter.writeStringField("tlsVerification", - this.tlsVerification == null ? null : this.tlsVerification.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointPrivateLinkConnectionPropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointPrivateLinkConnectionPropertiesUpdate if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointPrivateLinkConnectionPropertiesUpdate. - */ - public static BlobAccessPointPrivateLinkConnectionPropertiesUpdate fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointPrivateLinkConnectionPropertiesUpdate deserializedBlobAccessPointPrivateLinkConnectionPropertiesUpdate - = new BlobAccessPointPrivateLinkConnectionPropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connectionType".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionPropertiesUpdate.connectionType - = BlobAccessPointConnectionType.fromString(reader.getString()); - } else if ("tlsVerification".equals(fieldName)) { - deserializedBlobAccessPointPrivateLinkConnectionPropertiesUpdate.tlsVerification - = BlobAccessPointTlsVerification.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointPrivateLinkConnectionPropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkIdType.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkIdType.java deleted file mode 100644 index c470c4daf3f1..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkIdType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The format used by a Private Link identifier. - */ -public final class BlobAccessPointPrivateLinkIdType extends ExpandableStringEnum { - /** - * The identifier is an Azure resource ID. - */ - public static final BlobAccessPointPrivateLinkIdType RESOURCE_ID = fromString("ResourceId"); - - /** - * Creates a new instance of BlobAccessPointPrivateLinkIdType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlobAccessPointPrivateLinkIdType() { - } - - /** - * Creates or finds a BlobAccessPointPrivateLinkIdType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlobAccessPointPrivateLinkIdType. - */ - public static BlobAccessPointPrivateLinkIdType fromString(String name) { - return fromString(name, BlobAccessPointPrivateLinkIdType.class); - } - - /** - * Gets known BlobAccessPointPrivateLinkIdType values. - * - * @return known BlobAccessPointPrivateLinkIdType values. - */ - public static Collection values() { - return values(BlobAccessPointPrivateLinkIdType.class); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointProposedConnectionTestRequest.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointProposedConnectionTestRequest.java deleted file mode 100644 index 18fdd1bcc5e6..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointProposedConnectionTestRequest.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The request used to test a proposed Blob Access Point configuration. - */ -@Fluent -public final class BlobAccessPointProposedConnectionTestRequest - implements JsonSerializable { - /* - * Information about the backing data source whose connection is tested. - */ - private BlobAccessPointSourceProperties source; - - /** - * Creates an instance of BlobAccessPointProposedConnectionTestRequest class. - */ - public BlobAccessPointProposedConnectionTestRequest() { - } - - /** - * Get the source property: Information about the backing data source whose connection is tested. - * - * @return the source value. - */ - public BlobAccessPointSourceProperties source() { - return this.source; - } - - /** - * Set the source property: Information about the backing data source whose connection is tested. - * - * @param source the source value to set. - * @return the BlobAccessPointProposedConnectionTestRequest object itself. - */ - public BlobAccessPointProposedConnectionTestRequest withSource(BlobAccessPointSourceProperties source) { - this.source = source; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (source() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property source in model BlobAccessPointProposedConnectionTestRequest")); - } else { - source().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointProposedConnectionTestRequest.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("source", this.source); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointProposedConnectionTestRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointProposedConnectionTestRequest if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointProposedConnectionTestRequest. - */ - public static BlobAccessPointProposedConnectionTestRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointProposedConnectionTestRequest deserializedBlobAccessPointProposedConnectionTestRequest - = new BlobAccessPointProposedConnectionTestRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("source".equals(fieldName)) { - deserializedBlobAccessPointProposedConnectionTestRequest.source - = BlobAccessPointSourceProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointProposedConnectionTestRequest; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourceProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourceProperties.java deleted file mode 100644 index a48515b494a3..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourceProperties.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Qumulo backing source. - */ -@Fluent -public final class BlobAccessPointQumuloSourceProperties extends BlobAccessPointSourceProperties { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.QUMULO; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionProperties connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthProperties auth; - - /** - * Creates an instance of BlobAccessPointQumuloSourceProperties class. - */ - public BlobAccessPointQumuloSourceProperties() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionProperties connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointQumuloSourceProperties object itself. - */ - public BlobAccessPointQumuloSourceProperties withConnection(BlobAccessPointConnectionProperties connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthProperties auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointQumuloSourceProperties object itself. - */ - public BlobAccessPointQumuloSourceProperties withAuth(BlobAccessPointRemoteAuthProperties auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property connection in model BlobAccessPointQumuloSourceProperties")); - } else { - connection().validate(); - } - if (auth() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property auth in model BlobAccessPointQumuloSourceProperties")); - } else { - auth().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobAccessPointQumuloSourceProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointQumuloSourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointQumuloSourceProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobAccessPointQumuloSourceProperties. - */ - public static BlobAccessPointQumuloSourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointQumuloSourceProperties deserializedBlobAccessPointQumuloSourceProperties - = new BlobAccessPointQumuloSourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connection".equals(fieldName)) { - deserializedBlobAccessPointQumuloSourceProperties.connection - = BlobAccessPointConnectionProperties.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointQumuloSourceProperties.auth - = BlobAccessPointRemoteAuthProperties.fromJson(reader); - } else if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointQumuloSourceProperties.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointQumuloSourceProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourcePropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourcePropertiesUpdate.java deleted file mode 100644 index 61623be0e129..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourcePropertiesUpdate.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Qumulo backing source. - */ -@Fluent -public final class BlobAccessPointQumuloSourcePropertiesUpdate extends BlobAccessPointSourcePropertiesUpdate { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType = BlobAccessPointSourceType.QUMULO; - - /* - * Details for connecting to the backing data source. The connection target is fixed when the configuration is - * created; only the TLS verification behavior can be changed afterwards. - */ - private BlobAccessPointConnectionPropertiesUpdate connection; - - /* - * Details for authenticating to the backing data source. - */ - private BlobAccessPointRemoteAuthPropertiesUpdate auth; - - /** - * Creates an instance of BlobAccessPointQumuloSourcePropertiesUpdate class. - */ - public BlobAccessPointQumuloSourcePropertiesUpdate() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - @Override - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Get the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @return the connection value. - */ - public BlobAccessPointConnectionPropertiesUpdate connection() { - return this.connection; - } - - /** - * Set the connection property: Details for connecting to the backing data source. The connection target is fixed - * when the configuration is created; only the TLS verification behavior can be changed afterwards. - * - * @param connection the connection value to set. - * @return the BlobAccessPointQumuloSourcePropertiesUpdate object itself. - */ - public BlobAccessPointQumuloSourcePropertiesUpdate - withConnection(BlobAccessPointConnectionPropertiesUpdate connection) { - this.connection = connection; - return this; - } - - /** - * Get the auth property: Details for authenticating to the backing data source. - * - * @return the auth value. - */ - public BlobAccessPointRemoteAuthPropertiesUpdate auth() { - return this.auth; - } - - /** - * Set the auth property: Details for authenticating to the backing data source. - * - * @param auth the auth value to set. - * @return the BlobAccessPointQumuloSourcePropertiesUpdate object itself. - */ - public BlobAccessPointQumuloSourcePropertiesUpdate withAuth(BlobAccessPointRemoteAuthPropertiesUpdate auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (connection() != null) { - connection().validate(); - } - if (auth() != null) { - auth().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - jsonWriter.writeJsonField("connection", this.connection); - jsonWriter.writeJsonField("auth", this.auth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointQumuloSourcePropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointQumuloSourcePropertiesUpdate if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointQumuloSourcePropertiesUpdate. - */ - public static BlobAccessPointQumuloSourcePropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointQumuloSourcePropertiesUpdate deserializedBlobAccessPointQumuloSourcePropertiesUpdate - = new BlobAccessPointQumuloSourcePropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointQumuloSourcePropertiesUpdate.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else if ("connection".equals(fieldName)) { - deserializedBlobAccessPointQumuloSourcePropertiesUpdate.connection - = BlobAccessPointConnectionPropertiesUpdate.fromJson(reader); - } else if ("auth".equals(fieldName)) { - deserializedBlobAccessPointQumuloSourcePropertiesUpdate.auth - = BlobAccessPointRemoteAuthPropertiesUpdate.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointQumuloSourcePropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthProperties.java deleted file mode 100644 index 188992163350..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthProperties.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Authentication properties for a non-Azure S3-compatible source. - */ -@Immutable -public class BlobAccessPointRemoteAuthProperties implements JsonSerializable { - /* - * The authentication type. This value determines the remaining shape of the authentication object. - */ - private BlobAccessPointRemoteAuthType authType - = BlobAccessPointRemoteAuthType.fromString("BlobAccessPointRemoteAuthProperties"); - - /** - * Creates an instance of BlobAccessPointRemoteAuthProperties class. - */ - public BlobAccessPointRemoteAuthProperties() { - } - - /** - * Get the authType property: The authentication type. This value determines the remaining shape of the - * authentication object. - * - * @return the authType value. - */ - public BlobAccessPointRemoteAuthType authType() { - return this.authType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointRemoteAuthProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointRemoteAuthProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointRemoteAuthProperties. - */ - public static BlobAccessPointRemoteAuthProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("authType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AccessKey".equals(discriminatorValue)) { - return BlobAccessPointAccessKeyAuthProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static BlobAccessPointRemoteAuthProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointRemoteAuthProperties deserializedBlobAccessPointRemoteAuthProperties - = new BlobAccessPointRemoteAuthProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authType".equals(fieldName)) { - deserializedBlobAccessPointRemoteAuthProperties.authType - = BlobAccessPointRemoteAuthType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointRemoteAuthProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthPropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthPropertiesUpdate.java deleted file mode 100644 index f3b7ceaa222e..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthPropertiesUpdate.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Authentication properties for a non-Azure S3-compatible source. - */ -@Immutable -public class BlobAccessPointRemoteAuthPropertiesUpdate - implements JsonSerializable { - /* - * The authentication type. This value determines the remaining shape of the authentication object. - */ - private BlobAccessPointRemoteAuthType authType - = BlobAccessPointRemoteAuthType.fromString("BlobAccessPointRemoteAuthPropertiesUpdate"); - - /** - * Creates an instance of BlobAccessPointRemoteAuthPropertiesUpdate class. - */ - public BlobAccessPointRemoteAuthPropertiesUpdate() { - } - - /** - * Get the authType property: The authentication type. This value determines the remaining shape of the - * authentication object. - * - * @return the authType value. - */ - public BlobAccessPointRemoteAuthType authType() { - return this.authType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointRemoteAuthPropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointRemoteAuthPropertiesUpdate if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointRemoteAuthPropertiesUpdate. - */ - public static BlobAccessPointRemoteAuthPropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("authType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AccessKey".equals(discriminatorValue)) { - return BlobAccessPointAccessKeyAuthPropertiesUpdate.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static BlobAccessPointRemoteAuthPropertiesUpdate fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointRemoteAuthPropertiesUpdate deserializedBlobAccessPointRemoteAuthPropertiesUpdate - = new BlobAccessPointRemoteAuthPropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authType".equals(fieldName)) { - deserializedBlobAccessPointRemoteAuthPropertiesUpdate.authType - = BlobAccessPointRemoteAuthType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointRemoteAuthPropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthType.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthType.java deleted file mode 100644 index b7f44233012d..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * How Azure Storage authenticates to a non-Azure S3-compatible source. - */ -public final class BlobAccessPointRemoteAuthType extends ExpandableStringEnum { - /** - * Authenticate with an S3 access key and secret access key. - */ - public static final BlobAccessPointRemoteAuthType ACCESS_KEY = fromString("AccessKey"); - - /** - * Creates a new instance of BlobAccessPointRemoteAuthType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlobAccessPointRemoteAuthType() { - } - - /** - * Creates or finds a BlobAccessPointRemoteAuthType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlobAccessPointRemoteAuthType. - */ - public static BlobAccessPointRemoteAuthType fromString(String name) { - return fromString(name, BlobAccessPointRemoteAuthType.class); - } - - /** - * Gets known BlobAccessPointRemoteAuthType values. - * - * @return known BlobAccessPointRemoteAuthType values. - */ - public static Collection values() { - return values(BlobAccessPointRemoteAuthType.class); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceProperties.java deleted file mode 100644 index a3f99c9bc9ed..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceProperties.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Information about the data source exposed through a Blob Access Point. - */ -@Immutable -public class BlobAccessPointSourceProperties implements JsonSerializable { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType - = BlobAccessPointSourceType.fromString("BlobAccessPointSourceProperties"); - - /** - * Creates an instance of BlobAccessPointSourceProperties class. - */ - public BlobAccessPointSourceProperties() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointSourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointSourceProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointSourceProperties. - */ - public static BlobAccessPointSourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("sourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("NetAppOntap".equals(discriminatorValue)) { - return BlobAccessPointNetAppOntapSourceProperties.fromJson(readerToUse.reset()); - } else if ("AzureNetAppFiles".equals(discriminatorValue)) { - return BlobAccessPointAzureNetAppFilesSourceProperties.fromJson(readerToUse.reset()); - } else if ("DellOneFs".equals(discriminatorValue)) { - return BlobAccessPointDellOneFsSourceProperties.fromJson(readerToUse.reset()); - } else if ("Qumulo".equals(discriminatorValue)) { - return BlobAccessPointQumuloSourceProperties.fromJson(readerToUse.reset()); - } else if ("Commvault".equals(discriminatorValue)) { - return BlobAccessPointCommvaultSourceProperties.fromJson(readerToUse.reset()); - } else if ("Nasuni".equals(discriminatorValue)) { - return BlobAccessPointNasuniSourceProperties.fromJson(readerToUse.reset()); - } else if ("S3Compatible".equals(discriminatorValue)) { - return BlobAccessPointGenericS3SourceProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static BlobAccessPointSourceProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointSourceProperties deserializedBlobAccessPointSourceProperties - = new BlobAccessPointSourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointSourceProperties.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointSourceProperties; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourcePropertiesUpdate.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourcePropertiesUpdate.java deleted file mode 100644 index 0a563747dea9..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourcePropertiesUpdate.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Information about the data source exposed through a Blob Access Point. - */ -@Immutable -public class BlobAccessPointSourcePropertiesUpdate implements JsonSerializable { - /* - * The source type. This value determines the remaining shape of the source object. - */ - private BlobAccessPointSourceType sourceType - = BlobAccessPointSourceType.fromString("BlobAccessPointSourcePropertiesUpdate"); - - /** - * Creates an instance of BlobAccessPointSourcePropertiesUpdate class. - */ - public BlobAccessPointSourcePropertiesUpdate() { - } - - /** - * Get the sourceType property: The source type. This value determines the remaining shape of the source object. - * - * @return the sourceType value. - */ - public BlobAccessPointSourceType sourceType() { - return this.sourceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobAccessPointSourcePropertiesUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobAccessPointSourcePropertiesUpdate if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobAccessPointSourcePropertiesUpdate. - */ - public static BlobAccessPointSourcePropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("sourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("NetAppOntap".equals(discriminatorValue)) { - return BlobAccessPointNetAppOntapSourcePropertiesUpdate.fromJson(readerToUse.reset()); - } else if ("AzureNetAppFiles".equals(discriminatorValue)) { - return BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate.fromJson(readerToUse.reset()); - } else if ("DellOneFs".equals(discriminatorValue)) { - return BlobAccessPointDellOneFsSourcePropertiesUpdate.fromJson(readerToUse.reset()); - } else if ("Qumulo".equals(discriminatorValue)) { - return BlobAccessPointQumuloSourcePropertiesUpdate.fromJson(readerToUse.reset()); - } else if ("Commvault".equals(discriminatorValue)) { - return BlobAccessPointCommvaultSourcePropertiesUpdate.fromJson(readerToUse.reset()); - } else if ("Nasuni".equals(discriminatorValue)) { - return BlobAccessPointNasuniSourcePropertiesUpdate.fromJson(readerToUse.reset()); - } else if ("S3Compatible".equals(discriminatorValue)) { - return BlobAccessPointGenericS3SourcePropertiesUpdate.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static BlobAccessPointSourcePropertiesUpdate fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobAccessPointSourcePropertiesUpdate deserializedBlobAccessPointSourcePropertiesUpdate - = new BlobAccessPointSourcePropertiesUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceType".equals(fieldName)) { - deserializedBlobAccessPointSourcePropertiesUpdate.sourceType - = BlobAccessPointSourceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobAccessPointSourcePropertiesUpdate; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceType.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceType.java deleted file mode 100644 index 5c8785fd8840..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceType.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of the non-Azure S3-compatible data source exposed through the Blob Access Point. - */ -public final class BlobAccessPointSourceType extends ExpandableStringEnum { - /** - * NetApp ONTAP. - */ - public static final BlobAccessPointSourceType NET_APP_ONTAP = fromString("NetAppOntap"); - - /** - * Azure NetApp Files. - */ - public static final BlobAccessPointSourceType AZURE_NET_APP_FILES = fromString("AzureNetAppFiles"); - - /** - * Dell OneFS. - */ - public static final BlobAccessPointSourceType DELL_ONE_FS = fromString("DellOneFs"); - - /** - * Qumulo S3-compatible data source. - */ - public static final BlobAccessPointSourceType QUMULO = fromString("Qumulo"); - - /** - * Commvault S3-compatible data source. - */ - public static final BlobAccessPointSourceType COMMVAULT = fromString("Commvault"); - - /** - * Nasuni S3-compatible data source. - */ - public static final BlobAccessPointSourceType NASUNI = fromString("Nasuni"); - - /** - * Another S3-compatible data source. - */ - public static final BlobAccessPointSourceType S3COMPATIBLE = fromString("S3Compatible"); - - /** - * Creates a new instance of BlobAccessPointSourceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlobAccessPointSourceType() { - } - - /** - * Creates or finds a BlobAccessPointSourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlobAccessPointSourceType. - */ - public static BlobAccessPointSourceType fromString(String name) { - return fromString(name, BlobAccessPointSourceType.class); - } - - /** - * Gets known BlobAccessPointSourceType values. - * - * @return known BlobAccessPointSourceType values. - */ - public static Collection values() { - return values(BlobAccessPointSourceType.class); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointTlsVerification.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointTlsVerification.java deleted file mode 100644 index 4c25682c2d06..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointTlsVerification.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * TLS certificate verification behavior. - */ -public final class BlobAccessPointTlsVerification extends ExpandableStringEnum { - /** - * Verify the TLS certificate chain. - */ - public static final BlobAccessPointTlsVerification PERFORM = fromString("Perform"); - - /** - * Skip TLS certificate-chain verification. Use only when the backing source uses a certificate that cannot be - * validated against a trusted root. Skipping verification exposes credentials and data to an on-path attacker. - */ - public static final BlobAccessPointTlsVerification SKIP = fromString("Skip"); - - /** - * Creates a new instance of BlobAccessPointTlsVerification value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlobAccessPointTlsVerification() { - } - - /** - * Creates or finds a BlobAccessPointTlsVerification from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlobAccessPointTlsVerification. - */ - public static BlobAccessPointTlsVerification fromString(String name) { - return fromString(name, BlobAccessPointTlsVerification.class); - } - - /** - * Gets known BlobAccessPointTlsVerification values. - * - * @return known BlobAccessPointTlsVerification values. - */ - public static Collection values() { - return values(BlobAccessPointTlsVerification.class); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityFailureReason.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityFailureReason.java deleted file mode 100644 index 06b2863cc01f..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityFailureReason.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The reason why the context cache name is not available. The Reason element is only returned if NameAvailable is - * false. - */ -public final class ContextCacheCheckNameAvailabilityFailureReason - extends ExpandableStringEnum { - /** - * The context cache name is already in use. - */ - public static final ContextCacheCheckNameAvailabilityFailureReason ALREADY_EXISTS = fromString("AlreadyExists"); - - /** - * The context cache name is invalid. - */ - public static final ContextCacheCheckNameAvailabilityFailureReason CONTEXT_CACHE_NAME_INVALID - = fromString("ContextCacheNameInvalid"); - - /** - * Creates a new instance of ContextCacheCheckNameAvailabilityFailureReason value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContextCacheCheckNameAvailabilityFailureReason() { - } - - /** - * Creates or finds a ContextCacheCheckNameAvailabilityFailureReason from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContextCacheCheckNameAvailabilityFailureReason. - */ - public static ContextCacheCheckNameAvailabilityFailureReason fromString(String name) { - return fromString(name, ContextCacheCheckNameAvailabilityFailureReason.class); - } - - /** - * Gets known ContextCacheCheckNameAvailabilityFailureReason values. - * - * @return known ContextCacheCheckNameAvailabilityFailureReason values. - */ - public static Collection values() { - return values(ContextCacheCheckNameAvailabilityFailureReason.class); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityParameters.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityParameters.java deleted file mode 100644 index 215b0233d93a..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityParameters.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The parameters used to check the availability of the context cache resource name. - */ -@Fluent -public final class ContextCacheCheckNameAvailabilityParameters - implements JsonSerializable { - /* - * The name of the context cache resource to check for availability. - */ - private String name; - - /* - * The type of the context cache resource to check for availability. - */ - private final String type = "Microsoft.Storage/contextCaches"; - - /** - * Creates an instance of ContextCacheCheckNameAvailabilityParameters class. - */ - public ContextCacheCheckNameAvailabilityParameters() { - } - - /** - * Get the name property: The name of the context cache resource to check for availability. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the context cache resource to check for availability. - * - * @param name the name value to set. - * @return the ContextCacheCheckNameAvailabilityParameters object itself. - */ - public ContextCacheCheckNameAvailabilityParameters withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The type of the context cache resource to check for availability. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property name in model ContextCacheCheckNameAvailabilityParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContextCacheCheckNameAvailabilityParameters.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContextCacheCheckNameAvailabilityParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContextCacheCheckNameAvailabilityParameters if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContextCacheCheckNameAvailabilityParameters. - */ - public static ContextCacheCheckNameAvailabilityParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContextCacheCheckNameAvailabilityParameters deserializedContextCacheCheckNameAvailabilityParameters - = new ContextCacheCheckNameAvailabilityParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedContextCacheCheckNameAvailabilityParameters.name = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContextCacheCheckNameAvailabilityParameters; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/NspAccessRuleProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/NspAccessRuleProperties.java index 8f4dda643ec4..2f13d3e0d95e 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/NspAccessRuleProperties.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/NspAccessRuleProperties.java @@ -42,11 +42,6 @@ public final class NspAccessRuleProperties implements JsonSerializable fullyQualifiedDomainNames; - /* - * Service Tags for inbound rules - */ - private List serviceTags; - /** * Creates an instance of NspAccessRuleProperties class. */ @@ -98,15 +93,6 @@ public List fullyQualifiedDomainNames() { return this.fullyQualifiedDomainNames; } - /** - * Get the serviceTags property: Service Tags for inbound rules. - * - * @return the serviceTags value. - */ - public List serviceTags() { - return this.serviceTags; - } - /** * Validates the instance. * @@ -131,7 +117,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("addressPrefixes", this.addressPrefixes, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("subscriptions", this.subscriptions, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("serviceTags", this.serviceTags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -167,9 +152,6 @@ public static NspAccessRuleProperties fromJson(JsonReader jsonReader) throws IOE } else if ("fullyQualifiedDomainNames".equals(fieldName)) { List fullyQualifiedDomainNames = reader.readArray(reader1 -> reader1.getString()); deserializedNspAccessRuleProperties.fullyQualifiedDomainNames = fullyQualifiedDomainNames; - } else if ("serviceTags".equals(fieldName)) { - List serviceTags = reader.readArray(reader1 -> reader1.getString()); - deserializedNspAccessRuleProperties.serviceTags = serviceTags; } else { reader.skipChildren(); } diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccountCreateParameters.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccountCreateParameters.java index 8db572571c4f..a3bf8ca2c4b8 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccountCreateParameters.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccountCreateParameters.java @@ -458,29 +458,6 @@ public StorageAccountCreateParameters withAccessTier(AccessTier accessTier) { return this; } - /** - * Get the turboTier property: Configures Turbo Tier for the storage account. - * - * @return the turboTier value. - */ - public TurboTier turboTier() { - return this.innerProperties() == null ? null : this.innerProperties().turboTier(); - } - - /** - * Set the turboTier property: Configures Turbo Tier for the storage account. - * - * @param turboTier the turboTier value to set. - * @return the StorageAccountCreateParameters object itself. - */ - public StorageAccountCreateParameters withTurboTier(TurboTier turboTier) { - if (this.innerProperties() == null) { - this.innerProperties = new StorageAccountPropertiesCreateParameters(); - } - this.innerProperties().withTurboTier(turboTier); - return this; - } - /** * Get the azureFilesIdentityBasedAuthentication property: Provides the identity based authentication settings for * Azure Files. diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccountUpdateParameters.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccountUpdateParameters.java index e06781891731..14e80beda9ea 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccountUpdateParameters.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccountUpdateParameters.java @@ -327,29 +327,6 @@ public StorageAccountUpdateParameters withAccessTier(AccessTier accessTier) { return this; } - /** - * Get the turboTier property: Configures Turbo Tier for the storage account. - * - * @return the turboTier value. - */ - public TurboTier turboTier() { - return this.innerProperties() == null ? null : this.innerProperties().turboTier(); - } - - /** - * Set the turboTier property: Configures Turbo Tier for the storage account. - * - * @param turboTier the turboTier value to set. - * @return the StorageAccountUpdateParameters object itself. - */ - public StorageAccountUpdateParameters withTurboTier(TurboTier turboTier) { - if (this.innerProperties() == null) { - this.innerProperties = new StorageAccountPropertiesUpdateParameters(); - } - this.innerProperties().withTurboTier(turboTier); - return this; - } - /** * Get the azureFilesIdentityBasedAuthentication property: Provides the identity based authentication settings for * Azure Files. diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageDataCollaborationPolicyProperties.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageDataCollaborationPolicyProperties.java index bcc1b4466a22..c8b118317417 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageDataCollaborationPolicyProperties.java +++ b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageDataCollaborationPolicyProperties.java @@ -22,11 +22,6 @@ public final class StorageDataCollaborationPolicyProperties */ private Boolean allowStorageConnectors; - /* - * Indicates whether Blob Access Point configurations are allowed to be created or managed on the storage account. - */ - private Boolean allowBlobAccessPoints; - /* * Indicates whether data shares are allowed to be created or managed on the storage account. */ @@ -65,28 +60,6 @@ public StorageDataCollaborationPolicyProperties withAllowStorageConnectors(Boole return this; } - /** - * Get the allowBlobAccessPoints property: Indicates whether Blob Access Point configurations are allowed to be - * created or managed on the storage account. - * - * @return the allowBlobAccessPoints value. - */ - public Boolean allowBlobAccessPoints() { - return this.allowBlobAccessPoints; - } - - /** - * Set the allowBlobAccessPoints property: Indicates whether Blob Access Point configurations are allowed to be - * created or managed on the storage account. - * - * @param allowBlobAccessPoints the allowBlobAccessPoints value to set. - * @return the StorageDataCollaborationPolicyProperties object itself. - */ - public StorageDataCollaborationPolicyProperties withAllowBlobAccessPoints(Boolean allowBlobAccessPoints) { - this.allowBlobAccessPoints = allowBlobAccessPoints; - return this; - } - /** * Get the allowStorageDataShares property: Indicates whether data shares are allowed to be created or managed on * the storage account. @@ -147,7 +120,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("allowStorageConnectors", this.allowStorageConnectors); - jsonWriter.writeBooleanField("allowBlobAccessPoints", this.allowBlobAccessPoints); jsonWriter.writeBooleanField("allowStorageDataShares", this.allowStorageDataShares); jsonWriter.writeBooleanField("allowCrossTenantDataSharing", this.allowCrossTenantDataSharing); return jsonWriter.writeEndObject(); @@ -172,9 +144,6 @@ public static StorageDataCollaborationPolicyProperties fromJson(JsonReader jsonR if ("allowStorageConnectors".equals(fieldName)) { deserializedStorageDataCollaborationPolicyProperties.allowStorageConnectors = reader.getNullable(JsonReader::getBoolean); - } else if ("allowBlobAccessPoints".equals(fieldName)) { - deserializedStorageDataCollaborationPolicyProperties.allowBlobAccessPoints - = reader.getNullable(JsonReader::getBoolean); } else if ("allowStorageDataShares".equals(fieldName)) { deserializedStorageDataCollaborationPolicyProperties.allowStorageDataShares = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/TurboTier.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/TurboTier.java deleted file mode 100644 index 8aeb2d402561..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/TurboTier.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configures Turbo Tier for a storage account. - */ -@Fluent -public final class TurboTier implements JsonSerializable { - /* - * Indicates whether Turbo Tier is enabled or disabled. - */ - private TurboTierStatus status; - - /* - * The target fill percentage used for placement. The valid range is 10 to 100. When status is Enabled and this - * property is omitted, the default value is 20. - */ - private Integer targetPercent; - - /** - * Creates an instance of TurboTier class. - */ - public TurboTier() { - } - - /** - * Get the status property: Indicates whether Turbo Tier is enabled or disabled. - * - * @return the status value. - */ - public TurboTierStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether Turbo Tier is enabled or disabled. - * - * @param status the status value to set. - * @return the TurboTier object itself. - */ - public TurboTier withStatus(TurboTierStatus status) { - this.status = status; - return this; - } - - /** - * Get the targetPercent property: The target fill percentage used for placement. The valid range is 10 to 100. When - * status is Enabled and this property is omitted, the default value is 20. - * - * @return the targetPercent value. - */ - public Integer targetPercent() { - return this.targetPercent; - } - - /** - * Set the targetPercent property: The target fill percentage used for placement. The valid range is 10 to 100. When - * status is Enabled and this property is omitted, the default value is 20. - * - * @param targetPercent the targetPercent value to set. - * @return the TurboTier object itself. - */ - public TurboTier withTargetPercent(Integer targetPercent) { - this.targetPercent = targetPercent; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeNumberField("targetPercent", this.targetPercent); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TurboTier from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TurboTier if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the TurboTier. - */ - public static TurboTier fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TurboTier deserializedTurboTier = new TurboTier(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedTurboTier.status = TurboTierStatus.fromString(reader.getString()); - } else if ("targetPercent".equals(fieldName)) { - deserializedTurboTier.targetPercent = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTurboTier; - }); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/TurboTierStatus.java b/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/TurboTierStatus.java deleted file mode 100644 index 2f4c3ae83d95..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/TurboTierStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether Turbo Tier is enabled or disabled. - */ -public final class TurboTierStatus extends ExpandableStringEnum { - /** - * Turbo Tier is enabled. - */ - public static final TurboTierStatus ENABLED = fromString("Enabled"); - - /** - * Turbo Tier is disabled. - */ - public static final TurboTierStatus DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of TurboTierStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TurboTierStatus() { - } - - /** - * Creates or finds a TurboTierStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding TurboTierStatus. - */ - public static TurboTierStatus fromString(String name) { - return fromString(name, TurboTierStatus.class); - } - - /** - * Gets known TurboTierStatus values. - * - * @return known TurboTierStatus values. - */ - public static Collection values() { - return values(TurboTierStatus.class); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/resources/META-INF/azure-resourcemanager-storage_metadata.json b/sdk/storage/azure-resourcemanager-storage/src/main/resources/META-INF/azure-resourcemanager-storage_metadata.json index 92b2761025be..8060042df79c 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/resources/META-INF/azure-resourcemanager-storage_metadata.json +++ b/sdk/storage/azure-resourcemanager-storage/src/main/resources/META-INF/azure-resourcemanager-storage_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.Storage":"2026-09-01"},"crossLanguagePackageId":"Microsoft.Storage","crossLanguageVersion":"a1d8513df2ec","generatedFiles":["src/main/java/com/azure/resourcemanager/storage/fluent/AdvancedPlatformMetricsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConfigurationsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/BlobAccessPointConnectionTestsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/BlobContainersClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/BlobInventoryPoliciesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/BlobServicesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ConnectorsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ContextCacheContainersClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ContextCachesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/DataSharesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/DeletedAccountsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/EncryptionScopesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/FileServicesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/FileSharesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/LocalUsersOperationsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ManagementPoliciesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/NetworkSecurityPerimeterConfigurationsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ObjectReplicationPoliciesOperationsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/QueueServicesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/QueuesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/SkusClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageAccountsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageTaskAssignmentInstancesReportsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageTaskAssignmentsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageTaskAssignmentsInstancesReportsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/TableServicesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/TablesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/AdvancedPlatformMetricsRuleInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConfigurationInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobAccessPointConnectionTestResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobContainerInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobInventoryPolicyInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobInventoryPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobRestoreStatusInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobServicePropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobServicePropertiesProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/CheckNameAvailabilityResultInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ConnectorInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ContainerProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ContextCacheCheckNameAvailabilityResultInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ContextCacheContainerInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ContextCacheInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/DataShareInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/DeletedAccountInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/DeletedAccountProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/EncryptionScopeInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/EncryptionScopeProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileServiceItemsInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileServicePropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileServicePropertiesProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileServiceUsageInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileShareInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileShareItemInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileShareProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ImmutabilityPolicyInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ImmutabilityPolicyProperty.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LeaseContainerResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LeaseShareResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LegalHoldInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListAccountSasResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListContainerItemInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListQueueInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListQueueProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListQueueServicesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListServiceSasResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListTableServicesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LocalUserInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LocalUserKeysInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LocalUserProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LocalUserRegeneratePasswordResultInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ManagementPolicyInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ManagementPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ObjectReplicationPolicyInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ObjectReplicationPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/QueueProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/QueueServicePropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/QueueServicePropertiesProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/SkuInformationInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountListKeysResultInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountMigrationInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountMigrationProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesCreateParameters.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageQueueInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageTaskAssignmentInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageTaskReportInstanceInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TableInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TableProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TableServicePropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TableServicePropertiesProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TestConnectionResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/storage/fluent/package-info.java","src/main/java/com/azure/resourcemanager/storage/implementation/AdvancedPlatformMetricsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/BlobAccessPointConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/BlobAccessPointConnectionTestsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/BlobContainersClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/BlobInventoryPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/BlobServicesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ConnectorsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ContextCacheContainersClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ContextCachesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/DataSharesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/DeletedAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/EncryptionScopesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/FileServicesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/FileSharesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/LocalUsersOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ManagementPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ObjectReplicationPoliciesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/QueueServicesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/QueuesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/SkusClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageManagementClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageTaskAssignmentInstancesReportsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageTaskAssignmentsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageTaskAssignmentsInstancesReportsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/TableServicesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/TablesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/AdvancedPlatformMetricsRuleListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/BlobAccessPointConfigurationListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/BlobServiceItems.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ConnectorListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ContextCacheContainerListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ContextCacheListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/DataShareListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/DeletedAccountListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/EncryptionScopeListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/FileServiceUsages.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/FileShareItems.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ListBlobInventoryPolicy.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ListContainerItems.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ListQueueResource.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ListTableResource.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/LocalUsers.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/NetworkSecurityPerimeterConfigurationList.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ObjectReplicationPolicies.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/StorageAccountListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/StorageSkuListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/StorageTaskAssignmentsList.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/StorageTaskReportSummary.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/UsageListResult.java","src/main/java/com/azure/resourcemanager/storage/models/AccessPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/AccessTier.java","src/main/java/com/azure/resourcemanager/storage/models/AccountImmutabilityPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/models/AccountImmutabilityPolicyState.java","src/main/java/com/azure/resourcemanager/storage/models/AccountLimits.java","src/main/java/com/azure/resourcemanager/storage/models/AccountSasParameters.java","src/main/java/com/azure/resourcemanager/storage/models/AccountStatus.java","src/main/java/com/azure/resourcemanager/storage/models/AccountUsage.java","src/main/java/com/azure/resourcemanager/storage/models/AccountUsageElements.java","src/main/java/com/azure/resourcemanager/storage/models/Action.java","src/main/java/com/azure/resourcemanager/storage/models/ActiveDirectoryProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ActiveDirectoryPropertiesAccountType.java","src/main/java/com/azure/resourcemanager/storage/models/AdvancedPlatformMetricsFilterType.java","src/main/java/com/azure/resourcemanager/storage/models/AdvancedPlatformMetricsRuleConfig.java","src/main/java/com/azure/resourcemanager/storage/models/AdvancedPlatformMetricsRuleProperties.java","src/main/java/com/azure/resourcemanager/storage/models/AdvancedPlatformMetricsRuleType.java","src/main/java/com/azure/resourcemanager/storage/models/AiProvider.java","src/main/java/com/azure/resourcemanager/storage/models/AllowedCopyScope.java","src/main/java/com/azure/resourcemanager/storage/models/AzureEntityResource.java","src/main/java/com/azure/resourcemanager/storage/models/AzureFilesIdentityBasedAuthentication.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAccessKeyAuthPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourceProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointAzureNetAppFilesSourcePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourceProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointCommvaultSourcePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationConnection.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationState.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConfigurationUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestRequest.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionTestStatus.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointConnectionType.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourceProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointDellOneFsSourcePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointEndpointConnectionPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourceProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointGenericS3SourcePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourceProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNasuniSourcePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourceProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointNetAppOntapSourcePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkConnectionPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointPrivateLinkIdType.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointProposedConnectionTestRequest.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourceProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointQumuloSourcePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointRemoteAuthType.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceProperties.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourcePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointSourceType.java","src/main/java/com/azure/resourcemanager/storage/models/BlobAccessPointTlsVerification.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersCreateOrUpdateImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersDeleteImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersDeleteImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersExtendImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersExtendImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersGetImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersGetImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersLockImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersLockImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryCreationTime.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicyDefinition.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicyFilter.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicyName.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicyRule.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicySchema.java","src/main/java/com/azure/resourcemanager/storage/models/BlobRestoreParameters.java","src/main/java/com/azure/resourcemanager/storage/models/BlobRestoreProgressStatus.java","src/main/java/com/azure/resourcemanager/storage/models/BlobRestoreRange.java","src/main/java/com/azure/resourcemanager/storage/models/BurstingConstants.java","src/main/java/com/azure/resourcemanager/storage/models/Bypass.java","src/main/java/com/azure/resourcemanager/storage/models/ChangeFeed.java","src/main/java/com/azure/resourcemanager/storage/models/ConnectorUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheAccountKind.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityFailureReason.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheCheckNameAvailabilityParameters.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheContainerProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheContainerPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheContainerUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCachePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/CorsRule.java","src/main/java/com/azure/resourcemanager/storage/models/CorsRuleAllowedMethodsItem.java","src/main/java/com/azure/resourcemanager/storage/models/CorsRules.java","src/main/java/com/azure/resourcemanager/storage/models/CustomDomain.java","src/main/java/com/azure/resourcemanager/storage/models/CustomerManagedKeyEncryption.java","src/main/java/com/azure/resourcemanager/storage/models/DataShareConnection.java","src/main/java/com/azure/resourcemanager/storage/models/DataShareSource.java","src/main/java/com/azure/resourcemanager/storage/models/DataShareSourceUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/DataShareUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/DateAfterCreation.java","src/main/java/com/azure/resourcemanager/storage/models/DateAfterModification.java","src/main/java/com/azure/resourcemanager/storage/models/DefaultAction.java","src/main/java/com/azure/resourcemanager/storage/models/DefaultSharePermission.java","src/main/java/com/azure/resourcemanager/storage/models/DeleteRetentionPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/DeletedShare.java","src/main/java/com/azure/resourcemanager/storage/models/Dimension.java","src/main/java/com/azure/resourcemanager/storage/models/DirectoryServiceOptions.java","src/main/java/com/azure/resourcemanager/storage/models/DnsEndpointType.java","src/main/java/com/azure/resourcemanager/storage/models/DualStackEndpointPreference.java","src/main/java/com/azure/resourcemanager/storage/models/EnabledProtocols.java","src/main/java/com/azure/resourcemanager/storage/models/Encryption.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionInTransit.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionScopeKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionScopeSource.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionScopeState.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionService.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionServices.java","src/main/java/com/azure/resourcemanager/storage/models/Endpoints.java","src/main/java/com/azure/resourcemanager/storage/models/ExecutionTarget.java","src/main/java/com/azure/resourcemanager/storage/models/ExecutionTrigger.java","src/main/java/com/azure/resourcemanager/storage/models/ExecutionTriggerUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ExpirationAction.java","src/main/java/com/azure/resourcemanager/storage/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/storage/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/storage/models/FailoverType.java","src/main/java/com/azure/resourcemanager/storage/models/FileServiceUsageProperties.java","src/main/java/com/azure/resourcemanager/storage/models/FileShareLimits.java","src/main/java/com/azure/resourcemanager/storage/models/FileSharePropertiesFileSharePaidBursting.java","src/main/java/com/azure/resourcemanager/storage/models/FileShareRecommendations.java","src/main/java/com/azure/resourcemanager/storage/models/FileSharesLeaseHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/FileSharesLeaseResponse.java","src/main/java/com/azure/resourcemanager/storage/models/Format.java","src/main/java/com/azure/resourcemanager/storage/models/GeoPriorityReplicationStatus.java","src/main/java/com/azure/resourcemanager/storage/models/GeoReplicationStats.java","src/main/java/com/azure/resourcemanager/storage/models/GeoReplicationStatus.java","src/main/java/com/azure/resourcemanager/storage/models/HttpProtocol.java","src/main/java/com/azure/resourcemanager/storage/models/Identity.java","src/main/java/com/azure/resourcemanager/storage/models/IdentityType.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutabilityPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutabilityPolicyState.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutabilityPolicyUpdateType.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutableStorageAccount.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutableStorageWithVersioning.java","src/main/java/com/azure/resourcemanager/storage/models/InfrastructureEncryption.java","src/main/java/com/azure/resourcemanager/storage/models/IntervalUnit.java","src/main/java/com/azure/resourcemanager/storage/models/InventoryRuleType.java","src/main/java/com/azure/resourcemanager/storage/models/IpRule.java","src/main/java/com/azure/resourcemanager/storage/models/IssueType.java","src/main/java/com/azure/resourcemanager/storage/models/KeyCreationTime.java","src/main/java/com/azure/resourcemanager/storage/models/KeyEncryptionKeyIdentity.java","src/main/java/com/azure/resourcemanager/storage/models/KeyEncryptionKeyIdentityType.java","src/main/java/com/azure/resourcemanager/storage/models/KeyPermission.java","src/main/java/com/azure/resourcemanager/storage/models/KeyPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/KeySource.java","src/main/java/com/azure/resourcemanager/storage/models/KeyType.java","src/main/java/com/azure/resourcemanager/storage/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/storage/models/Kind.java","src/main/java/com/azure/resourcemanager/storage/models/LargeFileSharesState.java","src/main/java/com/azure/resourcemanager/storage/models/LastAccessTimeTrackingPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseContainerRequest.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseContainerRequestAction.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseDuration.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseShareAction.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseShareRequest.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseState.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseStatus.java","src/main/java/com/azure/resourcemanager/storage/models/LegalHoldProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ListContainersInclude.java","src/main/java/com/azure/resourcemanager/storage/models/ListEncryptionScopesInclude.java","src/main/java/com/azure/resourcemanager/storage/models/ListKeyExpand.java","src/main/java/com/azure/resourcemanager/storage/models/ListLocalUserIncludeParam.java","src/main/java/com/azure/resourcemanager/storage/models/ManagedIdentityAuthProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ManagedIdentityAuthPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyAction.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyBaseBlob.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyDefinition.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyFilter.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyName.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyRule.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicySchema.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicySnapShot.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyVersion.java","src/main/java/com/azure/resourcemanager/storage/models/MetricSpecification.java","src/main/java/com/azure/resourcemanager/storage/models/MetricsEmitted.java","src/main/java/com/azure/resourcemanager/storage/models/MigrationName.java","src/main/java/com/azure/resourcemanager/storage/models/MigrationState.java","src/main/java/com/azure/resourcemanager/storage/models/MigrationStatus.java","src/main/java/com/azure/resourcemanager/storage/models/MinimumTlsVersion.java","src/main/java/com/azure/resourcemanager/storage/models/Multichannel.java","src/main/java/com/azure/resourcemanager/storage/models/Name.java","src/main/java/com/azure/resourcemanager/storage/models/NativeDataSharingProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkSecurityPerimeterConfigurationPropertiesProfile.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkSecurityPerimeterConfigurationProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/NfsSetting.java","src/main/java/com/azure/resourcemanager/storage/models/NspAccessRule.java","src/main/java/com/azure/resourcemanager/storage/models/NspAccessRuleDirection.java","src/main/java/com/azure/resourcemanager/storage/models/NspAccessRuleProperties.java","src/main/java/com/azure/resourcemanager/storage/models/NspAccessRulePropertiesSubscriptionsItem.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyFilter.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyPropertiesMetrics.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyPropertiesPriorityReplication.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyPropertiesTagsReplication.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyRule.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectType.java","src/main/java/com/azure/resourcemanager/storage/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/storage/models/PermissionScope.java","src/main/java/com/azure/resourcemanager/storage/models/Permissions.java","src/main/java/com/azure/resourcemanager/storage/models/Placement.java","src/main/java/com/azure/resourcemanager/storage/models/PolicyViolationAction.java","src/main/java/com/azure/resourcemanager/storage/models/PostFailoverRedundancy.java","src/main/java/com/azure/resourcemanager/storage/models/PostPlannedFailoverRedundancy.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/storage/models/ProtectedAppendWritesHistory.java","src/main/java/com/azure/resourcemanager/storage/models/ProtocolSettings.java","src/main/java/com/azure/resourcemanager/storage/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/storage/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/PublicAccess.java","src/main/java/com/azure/resourcemanager/storage/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/storage/models/Reason.java","src/main/java/com/azure/resourcemanager/storage/models/ReasonCode.java","src/main/java/com/azure/resourcemanager/storage/models/ResourceAccessRule.java","src/main/java/com/azure/resourcemanager/storage/models/ResourceAssociationAccessMode.java","src/main/java/com/azure/resourcemanager/storage/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/RestorePolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/models/Restriction.java","src/main/java/com/azure/resourcemanager/storage/models/RootSquashType.java","src/main/java/com/azure/resourcemanager/storage/models/RoutingChoice.java","src/main/java/com/azure/resourcemanager/storage/models/RoutingPreference.java","src/main/java/com/azure/resourcemanager/storage/models/RuleType.java","src/main/java/com/azure/resourcemanager/storage/models/RunResult.java","src/main/java/com/azure/resourcemanager/storage/models/RunStatusEnum.java","src/main/java/com/azure/resourcemanager/storage/models/SasPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/Schedule.java","src/main/java/com/azure/resourcemanager/storage/models/ServiceSasParameters.java","src/main/java/com/azure/resourcemanager/storage/models/ServiceSharedKeyAccessProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/storage/models/Services.java","src/main/java/com/azure/resourcemanager/storage/models/Severity.java","src/main/java/com/azure/resourcemanager/storage/models/ShareAccessTier.java","src/main/java/com/azure/resourcemanager/storage/models/SignedIdentifier.java","src/main/java/com/azure/resourcemanager/storage/models/SignedResource.java","src/main/java/com/azure/resourcemanager/storage/models/SignedResourceTypes.java","src/main/java/com/azure/resourcemanager/storage/models/Sku.java","src/main/java/com/azure/resourcemanager/storage/models/SkuCapability.java","src/main/java/com/azure/resourcemanager/storage/models/SkuConversionStatus.java","src/main/java/com/azure/resourcemanager/storage/models/SkuInformationLocationInfoItem.java","src/main/java/com/azure/resourcemanager/storage/models/SkuName.java","src/main/java/com/azure/resourcemanager/storage/models/SkuTier.java","src/main/java/com/azure/resourcemanager/storage/models/SmbOAuthSettings.java","src/main/java/com/azure/resourcemanager/storage/models/SmbSetting.java","src/main/java/com/azure/resourcemanager/storage/models/SshPublicKey.java","src/main/java/com/azure/resourcemanager/storage/models/State.java","src/main/java/com/azure/resourcemanager/storage/models/StaticWebsite.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountCheckNameAvailabilityParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountCreateParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountEncryption.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountExpand.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountInternetEndpoints.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountIpv6Endpoints.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountKey.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountMicrosoftEndpoints.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountRegenerateKeyParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountSharedKeyAccessProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountSkuConversionStatus.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountUpdateParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorAuthProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorAuthPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorAuthType.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorConnection.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorConnectionType.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorDataSourceType.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorSource.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorSourceType.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorSourceUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorState.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataCollaborationPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataShareAccessPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataShareAccessPolicyPermission.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataShareAsset.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataShareProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataSharePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentExecutionContext.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentReport.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentUpdateExecutionContext.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentUpdateParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentUpdateProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentUpdateReport.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskReportProperties.java","src/main/java/com/azure/resourcemanager/storage/models/TableAccessPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/TableSignedIdentifier.java","src/main/java/com/azure/resourcemanager/storage/models/TagFilter.java","src/main/java/com/azure/resourcemanager/storage/models/TagProperty.java","src/main/java/com/azure/resourcemanager/storage/models/TestExistingConnectionRequest.java","src/main/java/com/azure/resourcemanager/storage/models/TrackedResourceUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/TriggerParameters.java","src/main/java/com/azure/resourcemanager/storage/models/TriggerParametersUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/TriggerType.java","src/main/java/com/azure/resourcemanager/storage/models/TurboTier.java","src/main/java/com/azure/resourcemanager/storage/models/TurboTierStatus.java","src/main/java/com/azure/resourcemanager/storage/models/UpdateHistoryProperty.java","src/main/java/com/azure/resourcemanager/storage/models/UsageName.java","src/main/java/com/azure/resourcemanager/storage/models/UsageUnit.java","src/main/java/com/azure/resourcemanager/storage/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/storage/models/VirtualNetworkRule.java","src/main/java/com/azure/resourcemanager/storage/models/ZonePlacementPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/package-info.java","src/main/java/com/azure/resourcemanager/storage/package-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.Storage":"2026-06-01"},"crossLanguagePackageId":"Microsoft.Storage","crossLanguageVersion":"ade95e03577d","generatedFiles":["src/main/java/com/azure/resourcemanager/storage/fluent/AdvancedPlatformMetricsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/BlobContainersClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/BlobInventoryPoliciesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/BlobServicesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ConnectorsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ContextCacheContainersClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ContextCachesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/DataSharesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/DeletedAccountsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/EncryptionScopesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/FileServicesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/FileSharesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/LocalUsersOperationsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ManagementPoliciesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/NetworkSecurityPerimeterConfigurationsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/ObjectReplicationPoliciesOperationsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/QueueServicesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/QueuesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/SkusClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageAccountsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageManagementClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageTaskAssignmentInstancesReportsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageTaskAssignmentsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/StorageTaskAssignmentsInstancesReportsClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/TableServicesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/TablesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/AdvancedPlatformMetricsRuleInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobContainerInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobInventoryPolicyInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobInventoryPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobRestoreStatusInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobServicePropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/BlobServicePropertiesProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/CheckNameAvailabilityResultInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ConnectorInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ContainerProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ContextCacheContainerInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ContextCacheInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/DataShareInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/DeletedAccountInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/DeletedAccountProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/EncryptionScopeInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/EncryptionScopeProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileServiceItemsInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileServicePropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileServicePropertiesProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileServiceUsageInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileShareInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileShareItemInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/FileShareProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ImmutabilityPolicyInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ImmutabilityPolicyProperty.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LeaseContainerResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LeaseShareResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LegalHoldInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListAccountSasResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListContainerItemInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListQueueInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListQueueProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListQueueServicesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListServiceSasResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ListTableServicesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LocalUserInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LocalUserKeysInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LocalUserProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/LocalUserRegeneratePasswordResultInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ManagementPolicyInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ManagementPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ObjectReplicationPolicyInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/ObjectReplicationPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/QueueProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/QueueServicePropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/QueueServicePropertiesProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/SkuInformationInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountListKeysResultInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountMigrationInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountMigrationProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesCreateParameters.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageQueueInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageTaskAssignmentInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageTaskReportInstanceInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TableInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TableProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TableServicePropertiesInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TableServicePropertiesProperties.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/TestConnectionResponseInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/storage/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/storage/fluent/package-info.java","src/main/java/com/azure/resourcemanager/storage/implementation/AdvancedPlatformMetricsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/BlobContainersClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/BlobInventoryPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/BlobServicesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ConnectorsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ContextCacheContainersClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ContextCachesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/DataSharesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/DeletedAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/EncryptionScopesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/FileServicesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/FileSharesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/LocalUsersOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ManagementPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/ObjectReplicationPoliciesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/QueueServicesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/QueuesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/SkusClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageManagementClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageTaskAssignmentInstancesReportsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageTaskAssignmentsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/StorageTaskAssignmentsInstancesReportsClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/TableServicesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/TablesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/AdvancedPlatformMetricsRuleListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/BlobServiceItems.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ConnectorListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ContextCacheContainerListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ContextCacheListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/DataShareListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/DeletedAccountListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/EncryptionScopeListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/FileServiceUsages.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/FileShareItems.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ListBlobInventoryPolicy.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ListContainerItems.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ListQueueResource.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ListTableResource.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/LocalUsers.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/NetworkSecurityPerimeterConfigurationList.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/ObjectReplicationPolicies.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/StorageAccountListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/StorageSkuListResult.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/StorageTaskAssignmentsList.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/StorageTaskReportSummary.java","src/main/java/com/azure/resourcemanager/storage/implementation/models/UsageListResult.java","src/main/java/com/azure/resourcemanager/storage/models/AccessPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/AccessTier.java","src/main/java/com/azure/resourcemanager/storage/models/AccountImmutabilityPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/models/AccountImmutabilityPolicyState.java","src/main/java/com/azure/resourcemanager/storage/models/AccountLimits.java","src/main/java/com/azure/resourcemanager/storage/models/AccountSasParameters.java","src/main/java/com/azure/resourcemanager/storage/models/AccountStatus.java","src/main/java/com/azure/resourcemanager/storage/models/AccountUsage.java","src/main/java/com/azure/resourcemanager/storage/models/AccountUsageElements.java","src/main/java/com/azure/resourcemanager/storage/models/Action.java","src/main/java/com/azure/resourcemanager/storage/models/ActiveDirectoryProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ActiveDirectoryPropertiesAccountType.java","src/main/java/com/azure/resourcemanager/storage/models/AdvancedPlatformMetricsFilterType.java","src/main/java/com/azure/resourcemanager/storage/models/AdvancedPlatformMetricsRuleConfig.java","src/main/java/com/azure/resourcemanager/storage/models/AdvancedPlatformMetricsRuleProperties.java","src/main/java/com/azure/resourcemanager/storage/models/AdvancedPlatformMetricsRuleType.java","src/main/java/com/azure/resourcemanager/storage/models/AiProvider.java","src/main/java/com/azure/resourcemanager/storage/models/AllowedCopyScope.java","src/main/java/com/azure/resourcemanager/storage/models/AzureEntityResource.java","src/main/java/com/azure/resourcemanager/storage/models/AzureFilesIdentityBasedAuthentication.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersCreateOrUpdateImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersCreateOrUpdateImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersDeleteImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersDeleteImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersExtendImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersExtendImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersGetImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersGetImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersLockImmutabilityPolicyHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/BlobContainersLockImmutabilityPolicyResponse.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryCreationTime.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicyDefinition.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicyFilter.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicyName.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicyRule.java","src/main/java/com/azure/resourcemanager/storage/models/BlobInventoryPolicySchema.java","src/main/java/com/azure/resourcemanager/storage/models/BlobRestoreParameters.java","src/main/java/com/azure/resourcemanager/storage/models/BlobRestoreProgressStatus.java","src/main/java/com/azure/resourcemanager/storage/models/BlobRestoreRange.java","src/main/java/com/azure/resourcemanager/storage/models/BurstingConstants.java","src/main/java/com/azure/resourcemanager/storage/models/Bypass.java","src/main/java/com/azure/resourcemanager/storage/models/ChangeFeed.java","src/main/java/com/azure/resourcemanager/storage/models/ConnectorUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheAccountKind.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheContainerProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheContainerPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheContainerUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCachePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/ContextCacheUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/CorsRule.java","src/main/java/com/azure/resourcemanager/storage/models/CorsRuleAllowedMethodsItem.java","src/main/java/com/azure/resourcemanager/storage/models/CorsRules.java","src/main/java/com/azure/resourcemanager/storage/models/CustomDomain.java","src/main/java/com/azure/resourcemanager/storage/models/CustomerManagedKeyEncryption.java","src/main/java/com/azure/resourcemanager/storage/models/DataShareConnection.java","src/main/java/com/azure/resourcemanager/storage/models/DataShareSource.java","src/main/java/com/azure/resourcemanager/storage/models/DataShareSourceUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/DataShareUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/DateAfterCreation.java","src/main/java/com/azure/resourcemanager/storage/models/DateAfterModification.java","src/main/java/com/azure/resourcemanager/storage/models/DefaultAction.java","src/main/java/com/azure/resourcemanager/storage/models/DefaultSharePermission.java","src/main/java/com/azure/resourcemanager/storage/models/DeleteRetentionPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/DeletedShare.java","src/main/java/com/azure/resourcemanager/storage/models/Dimension.java","src/main/java/com/azure/resourcemanager/storage/models/DirectoryServiceOptions.java","src/main/java/com/azure/resourcemanager/storage/models/DnsEndpointType.java","src/main/java/com/azure/resourcemanager/storage/models/DualStackEndpointPreference.java","src/main/java/com/azure/resourcemanager/storage/models/EnabledProtocols.java","src/main/java/com/azure/resourcemanager/storage/models/Encryption.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionInTransit.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionScopeKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionScopeSource.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionScopeState.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionService.java","src/main/java/com/azure/resourcemanager/storage/models/EncryptionServices.java","src/main/java/com/azure/resourcemanager/storage/models/Endpoints.java","src/main/java/com/azure/resourcemanager/storage/models/ExecutionTarget.java","src/main/java/com/azure/resourcemanager/storage/models/ExecutionTrigger.java","src/main/java/com/azure/resourcemanager/storage/models/ExecutionTriggerUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ExpirationAction.java","src/main/java/com/azure/resourcemanager/storage/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/storage/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/storage/models/FailoverType.java","src/main/java/com/azure/resourcemanager/storage/models/FileServiceUsageProperties.java","src/main/java/com/azure/resourcemanager/storage/models/FileShareLimits.java","src/main/java/com/azure/resourcemanager/storage/models/FileSharePropertiesFileSharePaidBursting.java","src/main/java/com/azure/resourcemanager/storage/models/FileShareRecommendations.java","src/main/java/com/azure/resourcemanager/storage/models/FileSharesLeaseHeaders.java","src/main/java/com/azure/resourcemanager/storage/models/FileSharesLeaseResponse.java","src/main/java/com/azure/resourcemanager/storage/models/Format.java","src/main/java/com/azure/resourcemanager/storage/models/GeoPriorityReplicationStatus.java","src/main/java/com/azure/resourcemanager/storage/models/GeoReplicationStats.java","src/main/java/com/azure/resourcemanager/storage/models/GeoReplicationStatus.java","src/main/java/com/azure/resourcemanager/storage/models/HttpProtocol.java","src/main/java/com/azure/resourcemanager/storage/models/Identity.java","src/main/java/com/azure/resourcemanager/storage/models/IdentityType.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutabilityPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutabilityPolicyState.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutabilityPolicyUpdateType.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutableStorageAccount.java","src/main/java/com/azure/resourcemanager/storage/models/ImmutableStorageWithVersioning.java","src/main/java/com/azure/resourcemanager/storage/models/InfrastructureEncryption.java","src/main/java/com/azure/resourcemanager/storage/models/IntervalUnit.java","src/main/java/com/azure/resourcemanager/storage/models/InventoryRuleType.java","src/main/java/com/azure/resourcemanager/storage/models/IpRule.java","src/main/java/com/azure/resourcemanager/storage/models/IssueType.java","src/main/java/com/azure/resourcemanager/storage/models/KeyCreationTime.java","src/main/java/com/azure/resourcemanager/storage/models/KeyEncryptionKeyIdentity.java","src/main/java/com/azure/resourcemanager/storage/models/KeyEncryptionKeyIdentityType.java","src/main/java/com/azure/resourcemanager/storage/models/KeyPermission.java","src/main/java/com/azure/resourcemanager/storage/models/KeyPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/KeySource.java","src/main/java/com/azure/resourcemanager/storage/models/KeyType.java","src/main/java/com/azure/resourcemanager/storage/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/storage/models/Kind.java","src/main/java/com/azure/resourcemanager/storage/models/LargeFileSharesState.java","src/main/java/com/azure/resourcemanager/storage/models/LastAccessTimeTrackingPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseContainerRequest.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseContainerRequestAction.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseDuration.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseShareAction.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseShareRequest.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseState.java","src/main/java/com/azure/resourcemanager/storage/models/LeaseStatus.java","src/main/java/com/azure/resourcemanager/storage/models/LegalHoldProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ListContainersInclude.java","src/main/java/com/azure/resourcemanager/storage/models/ListEncryptionScopesInclude.java","src/main/java/com/azure/resourcemanager/storage/models/ListKeyExpand.java","src/main/java/com/azure/resourcemanager/storage/models/ListLocalUserIncludeParam.java","src/main/java/com/azure/resourcemanager/storage/models/ManagedIdentityAuthProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ManagedIdentityAuthPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyAction.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyBaseBlob.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyDefinition.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyFilter.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyName.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyRule.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicySchema.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicySnapShot.java","src/main/java/com/azure/resourcemanager/storage/models/ManagementPolicyVersion.java","src/main/java/com/azure/resourcemanager/storage/models/MetricSpecification.java","src/main/java/com/azure/resourcemanager/storage/models/MetricsEmitted.java","src/main/java/com/azure/resourcemanager/storage/models/MigrationName.java","src/main/java/com/azure/resourcemanager/storage/models/MigrationState.java","src/main/java/com/azure/resourcemanager/storage/models/MigrationStatus.java","src/main/java/com/azure/resourcemanager/storage/models/MinimumTlsVersion.java","src/main/java/com/azure/resourcemanager/storage/models/Multichannel.java","src/main/java/com/azure/resourcemanager/storage/models/Name.java","src/main/java/com/azure/resourcemanager/storage/models/NativeDataSharingProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkRuleSet.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkSecurityPerimeterConfigurationPropertiesProfile.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.java","src/main/java/com/azure/resourcemanager/storage/models/NetworkSecurityPerimeterConfigurationProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/NfsSetting.java","src/main/java/com/azure/resourcemanager/storage/models/NspAccessRule.java","src/main/java/com/azure/resourcemanager/storage/models/NspAccessRuleDirection.java","src/main/java/com/azure/resourcemanager/storage/models/NspAccessRuleProperties.java","src/main/java/com/azure/resourcemanager/storage/models/NspAccessRulePropertiesSubscriptionsItem.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyFilter.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyPropertiesMetrics.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyPropertiesPriorityReplication.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyPropertiesTagsReplication.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectReplicationPolicyRule.java","src/main/java/com/azure/resourcemanager/storage/models/ObjectType.java","src/main/java/com/azure/resourcemanager/storage/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/storage/models/PermissionScope.java","src/main/java/com/azure/resourcemanager/storage/models/Permissions.java","src/main/java/com/azure/resourcemanager/storage/models/Placement.java","src/main/java/com/azure/resourcemanager/storage/models/PolicyViolationAction.java","src/main/java/com/azure/resourcemanager/storage/models/PostFailoverRedundancy.java","src/main/java/com/azure/resourcemanager/storage/models/PostPlannedFailoverRedundancy.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/storage/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/storage/models/ProtectedAppendWritesHistory.java","src/main/java/com/azure/resourcemanager/storage/models/ProtocolSettings.java","src/main/java/com/azure/resourcemanager/storage/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/storage/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/storage/models/PublicAccess.java","src/main/java/com/azure/resourcemanager/storage/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/storage/models/Reason.java","src/main/java/com/azure/resourcemanager/storage/models/ReasonCode.java","src/main/java/com/azure/resourcemanager/storage/models/ResourceAccessRule.java","src/main/java/com/azure/resourcemanager/storage/models/ResourceAssociationAccessMode.java","src/main/java/com/azure/resourcemanager/storage/models/RestorePolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/models/Restriction.java","src/main/java/com/azure/resourcemanager/storage/models/RootSquashType.java","src/main/java/com/azure/resourcemanager/storage/models/RoutingChoice.java","src/main/java/com/azure/resourcemanager/storage/models/RoutingPreference.java","src/main/java/com/azure/resourcemanager/storage/models/RuleType.java","src/main/java/com/azure/resourcemanager/storage/models/RunResult.java","src/main/java/com/azure/resourcemanager/storage/models/RunStatusEnum.java","src/main/java/com/azure/resourcemanager/storage/models/SasPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/Schedule.java","src/main/java/com/azure/resourcemanager/storage/models/ServiceSasParameters.java","src/main/java/com/azure/resourcemanager/storage/models/ServiceSharedKeyAccessProperties.java","src/main/java/com/azure/resourcemanager/storage/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/storage/models/Services.java","src/main/java/com/azure/resourcemanager/storage/models/Severity.java","src/main/java/com/azure/resourcemanager/storage/models/ShareAccessTier.java","src/main/java/com/azure/resourcemanager/storage/models/SignedIdentifier.java","src/main/java/com/azure/resourcemanager/storage/models/SignedResource.java","src/main/java/com/azure/resourcemanager/storage/models/SignedResourceTypes.java","src/main/java/com/azure/resourcemanager/storage/models/Sku.java","src/main/java/com/azure/resourcemanager/storage/models/SkuCapability.java","src/main/java/com/azure/resourcemanager/storage/models/SkuConversionStatus.java","src/main/java/com/azure/resourcemanager/storage/models/SkuInformationLocationInfoItem.java","src/main/java/com/azure/resourcemanager/storage/models/SkuName.java","src/main/java/com/azure/resourcemanager/storage/models/SkuTier.java","src/main/java/com/azure/resourcemanager/storage/models/SmbOAuthSettings.java","src/main/java/com/azure/resourcemanager/storage/models/SmbSetting.java","src/main/java/com/azure/resourcemanager/storage/models/SshPublicKey.java","src/main/java/com/azure/resourcemanager/storage/models/State.java","src/main/java/com/azure/resourcemanager/storage/models/StaticWebsite.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountCheckNameAvailabilityParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountCreateParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountEncryption.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountExpand.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountInternetEndpoints.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountIpv6Endpoints.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountKey.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountMicrosoftEndpoints.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountRegenerateKeyParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountSharedKeyAccessProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountSkuConversionStatus.java","src/main/java/com/azure/resourcemanager/storage/models/StorageAccountUpdateParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorAuthProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorAuthPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorAuthType.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorConnection.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorConnectionType.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorDataSourceType.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorPropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorSource.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorSourceType.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorSourceUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/StorageConnectorState.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataCollaborationPolicyProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataShareAccessPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataShareAccessPolicyPermission.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataShareAsset.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataShareProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageDataSharePropertiesUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentExecutionContext.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentReport.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentUpdateExecutionContext.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentUpdateParameters.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentUpdateProperties.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskAssignmentUpdateReport.java","src/main/java/com/azure/resourcemanager/storage/models/StorageTaskReportProperties.java","src/main/java/com/azure/resourcemanager/storage/models/TableAccessPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/TableSignedIdentifier.java","src/main/java/com/azure/resourcemanager/storage/models/TagFilter.java","src/main/java/com/azure/resourcemanager/storage/models/TagProperty.java","src/main/java/com/azure/resourcemanager/storage/models/TestExistingConnectionRequest.java","src/main/java/com/azure/resourcemanager/storage/models/TrackedResourceUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/TriggerParameters.java","src/main/java/com/azure/resourcemanager/storage/models/TriggerParametersUpdate.java","src/main/java/com/azure/resourcemanager/storage/models/TriggerType.java","src/main/java/com/azure/resourcemanager/storage/models/UpdateHistoryProperty.java","src/main/java/com/azure/resourcemanager/storage/models/UsageName.java","src/main/java/com/azure/resourcemanager/storage/models/UsageUnit.java","src/main/java/com/azure/resourcemanager/storage/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/storage/models/VirtualNetworkRule.java","src/main/java/com/azure/resourcemanager/storage/models/ZonePlacementPolicy.java","src/main/java/com/azure/resourcemanager/storage/models/package-info.java","src/main/java/com/azure/resourcemanager/storage/package-info.java"]} \ No newline at end of file diff --git a/sdk/storage/azure-resourcemanager-storage/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storage/proxy-config.json b/sdk/storage/azure-resourcemanager-storage/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storage/proxy-config.json index e76d6f684009..b94468650d7c 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storage/proxy-config.json +++ b/sdk/storage/azure-resourcemanager-storage/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storage/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.storage.implementation.AdvancedPlatformMetricsClientImpl$AdvancedPlatformMetricsService"],["com.azure.resourcemanager.storage.implementation.BlobAccessPointConfigurationsClientImpl$BlobAccessPointConfigurationsService"],["com.azure.resourcemanager.storage.implementation.BlobAccessPointConnectionTestsClientImpl$BlobAccessPointConnectionTestsService"],["com.azure.resourcemanager.storage.implementation.BlobContainersClientImpl$BlobContainersService"],["com.azure.resourcemanager.storage.implementation.BlobInventoryPoliciesClientImpl$BlobInventoryPoliciesService"],["com.azure.resourcemanager.storage.implementation.BlobServicesClientImpl$BlobServicesService"],["com.azure.resourcemanager.storage.implementation.ConnectorsClientImpl$ConnectorsService"],["com.azure.resourcemanager.storage.implementation.ContextCacheContainersClientImpl$ContextCacheContainersService"],["com.azure.resourcemanager.storage.implementation.ContextCachesClientImpl$ContextCachesService"],["com.azure.resourcemanager.storage.implementation.DataSharesClientImpl$DataSharesService"],["com.azure.resourcemanager.storage.implementation.DeletedAccountsClientImpl$DeletedAccountsService"],["com.azure.resourcemanager.storage.implementation.EncryptionScopesClientImpl$EncryptionScopesService"],["com.azure.resourcemanager.storage.implementation.FileServicesClientImpl$FileServicesService"],["com.azure.resourcemanager.storage.implementation.FileSharesClientImpl$FileSharesService"],["com.azure.resourcemanager.storage.implementation.LocalUsersOperationsClientImpl$LocalUsersOperationsService"],["com.azure.resourcemanager.storage.implementation.ManagementPoliciesClientImpl$ManagementPoliciesService"],["com.azure.resourcemanager.storage.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.storage.implementation.ObjectReplicationPoliciesOperationsClientImpl$ObjectReplicationPoliciesOperationsService"],["com.azure.resourcemanager.storage.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.storage.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.storage.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.storage.implementation.QueueServicesClientImpl$QueueServicesService"],["com.azure.resourcemanager.storage.implementation.QueuesClientImpl$QueuesService"],["com.azure.resourcemanager.storage.implementation.SkusClientImpl$SkusService"],["com.azure.resourcemanager.storage.implementation.StorageAccountsClientImpl$StorageAccountsService"],["com.azure.resourcemanager.storage.implementation.StorageTaskAssignmentInstancesReportsClientImpl$StorageTaskAssignmentInstancesReportsService"],["com.azure.resourcemanager.storage.implementation.StorageTaskAssignmentsClientImpl$StorageTaskAssignmentsService"],["com.azure.resourcemanager.storage.implementation.StorageTaskAssignmentsInstancesReportsClientImpl$StorageTaskAssignmentsInstancesReportsService"],["com.azure.resourcemanager.storage.implementation.TableServicesClientImpl$TableServicesService"],["com.azure.resourcemanager.storage.implementation.TablesClientImpl$TablesService"],["com.azure.resourcemanager.storage.implementation.UsagesClientImpl$UsagesService"]] \ No newline at end of file +[["com.azure.resourcemanager.storage.implementation.AdvancedPlatformMetricsClientImpl$AdvancedPlatformMetricsService"],["com.azure.resourcemanager.storage.implementation.BlobContainersClientImpl$BlobContainersService"],["com.azure.resourcemanager.storage.implementation.BlobInventoryPoliciesClientImpl$BlobInventoryPoliciesService"],["com.azure.resourcemanager.storage.implementation.BlobServicesClientImpl$BlobServicesService"],["com.azure.resourcemanager.storage.implementation.ConnectorsClientImpl$ConnectorsService"],["com.azure.resourcemanager.storage.implementation.ContextCacheContainersClientImpl$ContextCacheContainersService"],["com.azure.resourcemanager.storage.implementation.ContextCachesClientImpl$ContextCachesService"],["com.azure.resourcemanager.storage.implementation.DataSharesClientImpl$DataSharesService"],["com.azure.resourcemanager.storage.implementation.DeletedAccountsClientImpl$DeletedAccountsService"],["com.azure.resourcemanager.storage.implementation.EncryptionScopesClientImpl$EncryptionScopesService"],["com.azure.resourcemanager.storage.implementation.FileServicesClientImpl$FileServicesService"],["com.azure.resourcemanager.storage.implementation.FileSharesClientImpl$FileSharesService"],["com.azure.resourcemanager.storage.implementation.LocalUsersOperationsClientImpl$LocalUsersOperationsService"],["com.azure.resourcemanager.storage.implementation.ManagementPoliciesClientImpl$ManagementPoliciesService"],["com.azure.resourcemanager.storage.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.storage.implementation.ObjectReplicationPoliciesOperationsClientImpl$ObjectReplicationPoliciesOperationsService"],["com.azure.resourcemanager.storage.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.storage.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.storage.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.storage.implementation.QueueServicesClientImpl$QueueServicesService"],["com.azure.resourcemanager.storage.implementation.QueuesClientImpl$QueuesService"],["com.azure.resourcemanager.storage.implementation.SkusClientImpl$SkusService"],["com.azure.resourcemanager.storage.implementation.StorageAccountsClientImpl$StorageAccountsService"],["com.azure.resourcemanager.storage.implementation.StorageTaskAssignmentInstancesReportsClientImpl$StorageTaskAssignmentInstancesReportsService"],["com.azure.resourcemanager.storage.implementation.StorageTaskAssignmentsClientImpl$StorageTaskAssignmentsService"],["com.azure.resourcemanager.storage.implementation.StorageTaskAssignmentsInstancesReportsClientImpl$StorageTaskAssignmentsInstancesReportsService"],["com.azure.resourcemanager.storage.implementation.TableServicesClientImpl$TableServicesService"],["com.azure.resourcemanager.storage.implementation.TablesClientImpl$TablesService"],["com.azure.resourcemanager.storage.implementation.UsagesClientImpl$UsagesService"]] \ No newline at end of file diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsCreateOrUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsCreateOrUpdateSamples.java index 916522c9c1e2..ff1457d53330 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsCreateOrUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ public final class AdvancedPlatformMetricsCreateOrUpdateSamples { /* * x-ms-original-file: - * 2026-09-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_CreateOrUpdate_AllContainers.json + * 2026-06-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_CreateOrUpdate_AllContainers.json */ /** * Sample code: AdvancedPlatformMetricsRules_CreateOrUpdate_AllContainers - Create advanced platform metrics rule @@ -41,7 +41,7 @@ public final class AdvancedPlatformMetricsCreateOrUpdateSamples { /* * x-ms-original-file: - * 2026-09-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_CreateOrUpdate_ContainerList.json + * 2026-06-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_CreateOrUpdate_ContainerList.json */ /** * Sample code: AdvancedPlatformMetricsRules_CreateOrUpdate_ContainerList - Create advanced platform metrics rule @@ -66,7 +66,7 @@ public final class AdvancedPlatformMetricsCreateOrUpdateSamples { /* * x-ms-original-file: - * 2026-09-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_CreateOrUpdate_ContainerPrefix.json + * 2026-06-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_CreateOrUpdate_ContainerPrefix.json */ /** * Sample code: AdvancedPlatformMetricsRules_CreateOrUpdate_ContainerPrefix - Create advanced platform metrics rule diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsDeleteSamples.java index f1c9ca978d38..a3d8c8a5446b 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsDeleteSamples.java @@ -11,7 +11,7 @@ */ public final class AdvancedPlatformMetricsDeleteSamples { /* - * x-ms-original-file: 2026-09-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_Delete.json + * x-ms-original-file: 2026-06-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_Delete.json */ /** * Sample code: AdvancedPlatformMetricsRules_Delete - Delete advanced platform metrics rule. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsGetSamples.java index 110984e6c510..c318b6d31a0e 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsGetSamples.java @@ -11,7 +11,7 @@ */ public final class AdvancedPlatformMetricsGetSamples { /* - * x-ms-original-file: 2026-09-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_Get.json + * x-ms-original-file: 2026-06-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_Get.json */ /** * Sample code: AdvancedPlatformMetricsRules_Get - Get advanced platform metrics rule. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsListSamples.java index ff0f03230378..2e08f8839bb4 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/AdvancedPlatformMetricsListSamples.java @@ -9,7 +9,7 @@ */ public final class AdvancedPlatformMetricsListSamples { /* - * x-ms-original-file: 2026-09-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_List.json + * x-ms-original-file: 2026-06-01/AdvancedPlatformMetricsCRUD/AdvancedPlatformMetricsRules_List.json */ /** * Sample code: AdvancedPlatformMetricsRules_List - List advanced platform metrics rules. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsCreateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsCreateSamples.java deleted file mode 100644 index 1a5dc7b05f88..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsCreateSamples.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.generated; - -import com.azure.resourcemanager.storage.fluent.models.BlobAccessPointConfigurationInner; -import com.azure.resourcemanager.storage.models.BlobAccessPointAccessKeyAuthProperties; -import com.azure.resourcemanager.storage.models.BlobAccessPointAzureNetAppFilesSourceProperties; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationProperties; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationState; -import com.azure.resourcemanager.storage.models.BlobAccessPointEndpointConnectionProperties; -import com.azure.resourcemanager.storage.models.BlobAccessPointNetAppOntapSourceProperties; -import com.azure.resourcemanager.storage.models.BlobAccessPointPrivateLinkConnectionProperties; -import com.azure.resourcemanager.storage.models.BlobAccessPointPrivateLinkIdType; -import com.azure.resourcemanager.storage.models.BlobAccessPointTlsVerification; - -/** - * Samples for BlobAccessPointConfigurations Create. - */ -public final class BlobAccessPointConfigurationsCreateSamples { - /* - * x-ms-original-file: 2026-09-01/BlobAccessPointConfigurations_Create.json - */ - /** - * Sample code: CreateBlobAccessPointConfiguration. - * - * @param manager Entry point to StorageManager. - */ - public static void createBlobAccessPointConfiguration(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getBlobAccessPointConfigurations() - .create("testrg", "teststorageaccount", "testaccesspointconfig", - new BlobAccessPointConfigurationInner().withLocation("eastus") - .withProperties(new BlobAccessPointConfigurationProperties() - .withState(BlobAccessPointConfigurationState.ACTIVE) - .withDescription("NetApp ONTAP S3-compatible source") - .withSource(new BlobAccessPointNetAppOntapSourceProperties() - .withConnection(new BlobAccessPointEndpointConnectionProperties() - .withEndpoint("https://netapp.contoso.com/bucket1") - .withTlsVerification(BlobAccessPointTlsVerification.PERFORM)) - .withAuth( - new BlobAccessPointAccessKeyAuthProperties().withAccessKeyId("fakeTokenPlaceholder") - .withSecretAccessKey("fakeTokenPlaceholder") - .withSigningRegion("us-east-1")))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-01/BlobAccessPointConfigurations_Create_AzureNetAppFilesPrivateLink.json - */ - /** - * Sample code: CreateBlobAccessPointConfigurationWithAzureNetAppFilesPrivateLink. - * - * @param manager Entry point to StorageManager. - */ - public static void createBlobAccessPointConfigurationWithAzureNetAppFilesPrivateLink( - com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getBlobAccessPointConfigurations() - .create("testrg", "teststorageaccount", "anfprivatelinkaccesspoint", new BlobAccessPointConfigurationInner() - .withLocation("eastus") - .withProperties(new BlobAccessPointConfigurationProperties() - .withState(BlobAccessPointConfigurationState.ACTIVE) - .withDescription("Azure NetApp Files S3-compatible source over Private Link") - .withSource(new BlobAccessPointAzureNetAppFilesSourceProperties() - .withConnection(new BlobAccessPointPrivateLinkConnectionProperties() - .withPrivateLinkIdType(BlobAccessPointPrivateLinkIdType.RESOURCE_ID) - .withPrivateLinkId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Network/privateLinkServices/anfpls") - .withPrivateLinkGroupId("s3") - .withPrivateLinkLocation("eastus") - .withRequestMessage("Blob Access Point connection request for Azure NetApp Files") - .withEndpoint("https://anf.contoso.com/bucket1") - .withTlsVerification(BlobAccessPointTlsVerification.PERFORM)) - .withAuth(new BlobAccessPointAccessKeyAuthProperties().withAccessKeyId("fakeTokenPlaceholder") - .withSecretAccessKey("fakeTokenPlaceholder") - .withSigningRegion("us-east-1")))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsDeleteSamples.java deleted file mode 100644 index 62548fd564f3..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.generated; - -/** - * Samples for BlobAccessPointConfigurations Delete. - */ -public final class BlobAccessPointConfigurationsDeleteSamples { - /* - * x-ms-original-file: 2026-09-01/BlobAccessPointConfigurations_Delete.json - */ - /** - * Sample code: DeleteBlobAccessPointConfiguration. - * - * @param manager Entry point to StorageManager. - */ - public static void deleteBlobAccessPointConfiguration(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getBlobAccessPointConfigurations() - .delete("testrg", "teststorageaccount", "testaccesspointconfig", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsGetSamples.java deleted file mode 100644 index af6382b2d54f..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.generated; - -/** - * Samples for BlobAccessPointConfigurations Get. - */ -public final class BlobAccessPointConfigurationsGetSamples { - /* - * x-ms-original-file: 2026-09-01/BlobAccessPointConfigurations_Get.json - */ - /** - * Sample code: GetBlobAccessPointConfiguration. - * - * @param manager Entry point to StorageManager. - */ - public static void getBlobAccessPointConfiguration(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getBlobAccessPointConfigurations() - .getWithResponse("testrg", "teststorageaccount", "testaccesspointconfig", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsListByStorageAccountSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsListByStorageAccountSamples.java deleted file mode 100644 index 364df8251e4b..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsListByStorageAccountSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.generated; - -/** - * Samples for BlobAccessPointConfigurations ListByStorageAccount. - */ -public final class BlobAccessPointConfigurationsListByStorageAccountSamples { - /* - * x-ms-original-file: 2026-09-01/BlobAccessPointConfigurations_ListByStorageAccount.json - */ - /** - * Sample code: ListBlobAccessPointConfigurationsByStorageAccount. - * - * @param manager Entry point to StorageManager. - */ - public static void - listBlobAccessPointConfigurationsByStorageAccount(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getBlobAccessPointConfigurations() - .listByStorageAccount("testrg", "teststorageaccount", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsTestExistingConnectionSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsTestExistingConnectionSamples.java deleted file mode 100644 index 15b38b9e7a9c..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsTestExistingConnectionSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.generated; - -import com.azure.resourcemanager.storage.models.BlobAccessPointConnectionTestRequest; - -/** - * Samples for BlobAccessPointConfigurations TestExistingConnection. - */ -public final class BlobAccessPointConfigurationsTestExistingConnectionSamples { - /* - * x-ms-original-file: 2026-09-01/BlobAccessPointConfigurations_TestExistingConnection.json - */ - /** - * Sample code: BlobAccessPointConfigurationTestExistingConnection. - * - * @param manager Entry point to StorageManager. - */ - public static void - blobAccessPointConfigurationTestExistingConnection(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getBlobAccessPointConfigurations() - .testExistingConnection("testrg", "teststorageaccount", "testaccesspointconfig", - new BlobAccessPointConnectionTestRequest().withUniqueId("11111111-2222-3333-4444-555555555555"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsUpdateSamples.java deleted file mode 100644 index 70e32b2f308c..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConfigurationsUpdateSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.generated; - -import com.azure.resourcemanager.storage.models.BlobAccessPointAccessKeyAuthPropertiesUpdate; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationPropertiesUpdate; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationState; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationUpdate; -import com.azure.resourcemanager.storage.models.BlobAccessPointNetAppOntapSourcePropertiesUpdate; - -/** - * Samples for BlobAccessPointConfigurations Update. - */ -public final class BlobAccessPointConfigurationsUpdateSamples { - /* - * x-ms-original-file: 2026-09-01/BlobAccessPointConfigurations_Update.json - */ - /** - * Sample code: UpdateBlobAccessPointConfiguration. - * - * @param manager Entry point to StorageManager. - */ - public static void updateBlobAccessPointConfiguration(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getBlobAccessPointConfigurations() - .update("testrg", "teststorageaccount", "testaccesspointconfig", - new BlobAccessPointConfigurationUpdate() - .withProperties(new BlobAccessPointConfigurationPropertiesUpdate() - .withState(BlobAccessPointConfigurationState.INACTIVE) - .withDescription("Updated NetApp ONTAP S3-compatible source") - .withSource(new BlobAccessPointNetAppOntapSourcePropertiesUpdate() - .withAuth(new BlobAccessPointAccessKeyAuthPropertiesUpdate() - .withSecretAccessKey("fakeTokenPlaceholder")))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConnectionTestsTestProposedConnectionSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConnectionTestsTestProposedConnectionSamples.java deleted file mode 100644 index 52e12c784c1d..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobAccessPointConnectionTestsTestProposedConnectionSamples.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.generated; - -import com.azure.resourcemanager.storage.models.BlobAccessPointAccessKeyAuthProperties; -import com.azure.resourcemanager.storage.models.BlobAccessPointGenericS3SourceProperties; -import com.azure.resourcemanager.storage.models.BlobAccessPointPrivateLinkConnectionProperties; -import com.azure.resourcemanager.storage.models.BlobAccessPointPrivateLinkIdType; -import com.azure.resourcemanager.storage.models.BlobAccessPointProposedConnectionTestRequest; -import com.azure.resourcemanager.storage.models.BlobAccessPointTlsVerification; - -/** - * Samples for BlobAccessPointConnectionTests TestProposedConnection. - */ -public final class BlobAccessPointConnectionTestsTestProposedConnectionSamples { - /* - * x-ms-original-file: 2026-09-01/BlobAccessPointConnectionTests_TestProposedConnection.json - */ - /** - * Sample code: BlobAccessPointTestProposedConnection. - * - * @param manager Entry point to StorageManager. - */ - public static void blobAccessPointTestProposedConnection(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getBlobAccessPointConnectionTests() - .testProposedConnection("testrg", "teststorageaccount", new BlobAccessPointProposedConnectionTestRequest() - .withSource(new BlobAccessPointGenericS3SourceProperties() - .withConnection(new BlobAccessPointPrivateLinkConnectionProperties() - .withPrivateLinkIdType(BlobAccessPointPrivateLinkIdType.RESOURCE_ID) - .withPrivateLinkId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Network/privateLinkServices/testpls") - .withPrivateLinkGroupId("s3") - .withPrivateLinkLocation("eastus") - .withRequestMessage("Blob Access Point connection request") - .withEndpoint("https://s3.contoso.com/bucket1") - .withTlsVerification(BlobAccessPointTlsVerification.PERFORM)) - .withAuth(new BlobAccessPointAccessKeyAuthProperties().withAccessKeyId("fakeTokenPlaceholder") - .withSecretAccessKey("fakeTokenPlaceholder") - .withSigningRegion("us-east-1"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersClearLegalHoldSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersClearLegalHoldSamples.java index aa1ee3561ff8..72b59fd9bf58 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersClearLegalHoldSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersClearLegalHoldSamples.java @@ -12,7 +12,7 @@ */ public final class BlobContainersClearLegalHoldSamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersClearLegalHold.json + * x-ms-original-file: 2026-06-01/BlobContainersClearLegalHold.json */ /** * Sample code: ClearLegalHoldContainers. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersCreateOrUpdateImmutabilityPolicySamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersCreateOrUpdateImmutabilityPolicySamples.java index edaa22d05373..44c6d7c4adb8 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersCreateOrUpdateImmutabilityPolicySamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersCreateOrUpdateImmutabilityPolicySamples.java @@ -11,7 +11,7 @@ */ public final class BlobContainersCreateOrUpdateImmutabilityPolicySamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersPutImmutabilityPolicy.json + * x-ms-original-file: 2026-06-01/BlobContainersPutImmutabilityPolicy.json */ /** * Sample code: CreateOrUpdateImmutabilityPolicy. @@ -28,7 +28,7 @@ public static void createOrUpdateImmutabilityPolicy(com.azure.resourcemanager.st } /* - * x-ms-original-file: 2026-09-01/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json + * x-ms-original-file: 2026-06-01/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json */ /** * Sample code: CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersCreateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersCreateSamples.java index f86dfbfe3ee0..8e13e97d8469 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersCreateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersCreateSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.storage.generated; import com.azure.resourcemanager.storage.fluent.models.BlobContainerInner; -import com.azure.resourcemanager.storage.models.BlobAccessPointConfigurationConnection; import com.azure.resourcemanager.storage.models.ImmutableStorageWithVersioning; /** @@ -13,7 +12,7 @@ */ public final class BlobContainersCreateSamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersPutDefaultEncryptionScope.json + * x-ms-original-file: 2026-06-01/BlobContainersPutDefaultEncryptionScope.json */ /** * Sample code: PutContainerWithDefaultEncryptionScope. @@ -31,26 +30,7 @@ public final class BlobContainersCreateSamples { } /* - * x-ms-original-file: 2026-09-01/BlobContainersPutBlobAccessPointConfiguration.json - */ - /** - * Sample code: PutContainerWithBlobAccessPointConfiguration. - * - * @param manager Entry point to StorageManager. - */ - public static void - putContainerWithBlobAccessPointConfiguration(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getBlobContainers() - .createWithResponse("res3376", "sto328", "container6185", - new BlobContainerInner().withBlobAccessPointConfiguration(new BlobAccessPointConfigurationConnection() - .withBlobAccessPointConfigurationName("myAccessPointConfig") - .withBlobAccessPointConfigurationUniqueId("00000000-0000-0000-0000-000000000000")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-01/BlobContainersPutObjectLevelWorm.json + * x-ms-original-file: 2026-06-01/BlobContainersPutObjectLevelWorm.json */ /** * Sample code: PutContainerWithObjectLevelWorm. @@ -66,7 +46,7 @@ public static void putContainerWithObjectLevelWorm(com.azure.resourcemanager.sto } /* - * x-ms-original-file: 2026-09-01/BlobContainersPut.json + * x-ms-original-file: 2026-06-01/BlobContainersPut.json */ /** * Sample code: PutContainers. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersDeleteImmutabilityPolicySamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersDeleteImmutabilityPolicySamples.java index f7fcbdb7fd1e..003d2404f597 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersDeleteImmutabilityPolicySamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersDeleteImmutabilityPolicySamples.java @@ -9,7 +9,7 @@ */ public final class BlobContainersDeleteImmutabilityPolicySamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersDeleteImmutabilityPolicy.json + * x-ms-original-file: 2026-06-01/BlobContainersDeleteImmutabilityPolicy.json */ /** * Sample code: DeleteImmutabilityPolicy. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersDeleteSamples.java index 4e6378f6be0f..f05754911ea5 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class BlobContainersDeleteSamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersDelete.json + * x-ms-original-file: 2026-06-01/BlobContainersDelete.json */ /** * Sample code: DeleteContainers. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersExtendImmutabilityPolicySamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersExtendImmutabilityPolicySamples.java index a9a1e37c3312..4c159570422f 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersExtendImmutabilityPolicySamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersExtendImmutabilityPolicySamples.java @@ -11,7 +11,7 @@ */ public final class BlobContainersExtendImmutabilityPolicySamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersExtendImmutabilityPolicy.json + * x-ms-original-file: 2026-06-01/BlobContainersExtendImmutabilityPolicy.json */ /** * Sample code: ExtendImmutabilityPolicy. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersGetImmutabilityPolicySamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersGetImmutabilityPolicySamples.java index e943daa110f9..40300f1a7421 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersGetImmutabilityPolicySamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersGetImmutabilityPolicySamples.java @@ -9,7 +9,7 @@ */ public final class BlobContainersGetImmutabilityPolicySamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersGetImmutabilityPolicy.json + * x-ms-original-file: 2026-06-01/BlobContainersGetImmutabilityPolicy.json */ /** * Sample code: GetImmutabilityPolicy. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersGetSamples.java index b5435d6a389d..f49498286d3e 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersGetSamples.java @@ -9,7 +9,7 @@ */ public final class BlobContainersGetSamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersGet.json + * x-ms-original-file: 2026-06-01/BlobContainersGet.json */ /** * Sample code: GetContainers. @@ -23,7 +23,7 @@ public static void getContainers(com.azure.resourcemanager.storage.StorageManage } /* - * x-ms-original-file: 2026-09-01/BlobContainersGetWithAllowProtectedAppendWritesAll.json + * x-ms-original-file: 2026-06-01/BlobContainersGetWithAllowProtectedAppendWritesAll.json */ /** * Sample code: GetBlobContainersGetWithAllowProtectedAppendWritesAll. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersLeaseSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersLeaseSamples.java index c78e2f7deeb8..3b4d07f0d773 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersLeaseSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersLeaseSamples.java @@ -12,7 +12,7 @@ */ public final class BlobContainersLeaseSamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersLease_Break.json + * x-ms-original-file: 2026-06-01/BlobContainersLease_Break.json */ /** * Sample code: Break a lease on a container. @@ -29,7 +29,7 @@ public static void breakALeaseOnAContainer(com.azure.resourcemanager.storage.Sto } /* - * x-ms-original-file: 2026-09-01/BlobContainersLease_Acquire.json + * x-ms-original-file: 2026-06-01/BlobContainersLease_Acquire.json */ /** * Sample code: Acquire a lease on a container. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersListSamples.java index 6b0f6ddff08f..8c5e89aef2e6 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersListSamples.java @@ -11,7 +11,7 @@ */ public final class BlobContainersListSamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersList.json + * x-ms-original-file: 2026-06-01/BlobContainersList.json */ /** * Sample code: ListContainers. @@ -25,7 +25,7 @@ public static void listContainers(com.azure.resourcemanager.storage.StorageManag } /* - * x-ms-original-file: 2026-09-01/DeletedBlobContainersList.json + * x-ms-original-file: 2026-06-01/DeletedBlobContainersList.json */ /** * Sample code: ListDeletedContainers. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersLockImmutabilityPolicySamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersLockImmutabilityPolicySamples.java index 1fac3cf76abc..0a85550367ca 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersLockImmutabilityPolicySamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersLockImmutabilityPolicySamples.java @@ -9,7 +9,7 @@ */ public final class BlobContainersLockImmutabilityPolicySamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersLockImmutabilityPolicy.json + * x-ms-original-file: 2026-06-01/BlobContainersLockImmutabilityPolicy.json */ /** * Sample code: LockImmutabilityPolicy. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersObjectLevelWormSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersObjectLevelWormSamples.java index c045bfc9032d..f10414284311 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersObjectLevelWormSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersObjectLevelWormSamples.java @@ -9,7 +9,7 @@ */ public final class BlobContainersObjectLevelWormSamples { /* - * x-ms-original-file: 2026-09-01/ObjectLevelWormContainerMigration.json + * x-ms-original-file: 2026-06-01/ObjectLevelWormContainerMigration.json */ /** * Sample code: VersionLevelWormContainerMigration. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersSetLegalHoldSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersSetLegalHoldSamples.java index 775d6e57cfe8..1562bdfe9165 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersSetLegalHoldSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersSetLegalHoldSamples.java @@ -12,7 +12,7 @@ */ public final class BlobContainersSetLegalHoldSamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersSetLegalHold.json + * x-ms-original-file: 2026-06-01/BlobContainersSetLegalHold.json */ /** * Sample code: SetLegalHoldContainers. @@ -27,7 +27,7 @@ public static void setLegalHoldContainers(com.azure.resourcemanager.storage.Stor } /* - * x-ms-original-file: 2026-09-01/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json + * x-ms-original-file: 2026-06-01/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json */ /** * Sample code: SetLegalHoldContainersWithAllowProtectedAppendWritesAll. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersUpdateSamples.java index 2a68cf266fb2..6b3f7865e97c 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobContainersUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class BlobContainersUpdateSamples { /* - * x-ms-original-file: 2026-09-01/BlobContainersPatch.json + * x-ms-original-file: 2026-06-01/BlobContainersPatch.json */ /** * Sample code: UpdateContainers. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesCreateOrUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesCreateOrUpdateSamples.java index 5600821d0cb6..97fffcccc9cd 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesCreateOrUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesCreateOrUpdateSamples.java @@ -22,7 +22,7 @@ */ public final class BlobInventoryPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json + * x-ms-original-file: 2026-06-01/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json */ /** * Sample code: StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount. @@ -81,7 +81,7 @@ public static void storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchema } /* - * x-ms-original-file: 2026-09-01/StorageAccountSetBlobInventoryPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountSetBlobInventoryPolicy.json */ /** * Sample code: StorageAccountSetBlobInventoryPolicy. @@ -132,7 +132,7 @@ public static void storageAccountSetBlobInventoryPolicy(com.azure.resourcemanage } /* - * x-ms-original-file: 2026-09-01/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json + * x-ms-original-file: 2026-06-01/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json */ /** * Sample code: StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesDeleteSamples.java index 7daff71561ee..01a8ca819722 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesDeleteSamples.java @@ -11,7 +11,7 @@ */ public final class BlobInventoryPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountDeleteBlobInventoryPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountDeleteBlobInventoryPolicy.json */ /** * Sample code: StorageAccountDeleteBlobInventoryPolicy. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesGetSamples.java index 6e8555a66af9..f2b32f1bb0f5 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesGetSamples.java @@ -11,7 +11,7 @@ */ public final class BlobInventoryPoliciesGetSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountGetBlobInventoryPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountGetBlobInventoryPolicy.json */ /** * Sample code: StorageAccountGetBlobInventoryPolicy. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesListSamples.java index c689bae8aeca..828449cbf301 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobInventoryPoliciesListSamples.java @@ -9,7 +9,7 @@ */ public final class BlobInventoryPoliciesListSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountListBlobInventoryPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountListBlobInventoryPolicy.json */ /** * Sample code: StorageAccountGetBlobInventoryPolicy. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesGetServicePropertiesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesGetServicePropertiesSamples.java index 41b3cc33f85e..26245cb8a2bc 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesGetServicePropertiesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesGetServicePropertiesSamples.java @@ -9,7 +9,7 @@ */ public final class BlobServicesGetServicePropertiesSamples { /* - * x-ms-original-file: 2026-09-01/BlobServicesGet.json + * x-ms-original-file: 2026-06-01/BlobServicesGet.json */ /** * Sample code: GetBlobServices. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesListSamples.java index a24d3e2ff7ba..937d6282d547 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesListSamples.java @@ -9,7 +9,7 @@ */ public final class BlobServicesListSamples { /* - * x-ms-original-file: 2026-09-01/BlobServicesList.json + * x-ms-original-file: 2026-06-01/BlobServicesList.json */ /** * Sample code: ListBlobServices. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesSetServicePropertiesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesSetServicePropertiesSamples.java index 4ae433bb9a8b..988749f7a76d 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesSetServicePropertiesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/BlobServicesSetServicePropertiesSamples.java @@ -20,7 +20,7 @@ */ public final class BlobServicesSetServicePropertiesSamples { /* - * x-ms-original-file: 2026-09-01/BlobServicesPut.json + * x-ms-original-file: 2026-06-01/BlobServicesPut.json */ /** * Sample code: PutBlobServices. @@ -62,7 +62,7 @@ public static void putBlobServices(com.azure.resourcemanager.storage.StorageMana } /* - * x-ms-original-file: 2026-09-01/BlobServicesPutAllowPermanentDelete.json + * x-ms-original-file: 2026-06-01/BlobServicesPutAllowPermanentDelete.json */ /** * Sample code: BlobServicesPutAllowPermanentDelete. @@ -81,7 +81,7 @@ public static void blobServicesPutAllowPermanentDelete(com.azure.resourcemanager } /* - * x-ms-original-file: 2026-09-01/BlobServicesPutLastAccessTimeBasedTracking.json + * x-ms-original-file: 2026-06-01/BlobServicesPutLastAccessTimeBasedTracking.json */ /** * Sample code: BlobServicesPutLastAccessTimeBasedTracking. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsCreateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsCreateSamples.java index 709aa0a60a90..62160b159760 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsCreateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsCreateSamples.java @@ -17,7 +17,7 @@ */ public final class ConnectorsCreateSamples { /* - * x-ms-original-file: 2026-09-01/StorageConnectorCRUD/StorageConnectors_Create.json + * x-ms-original-file: 2026-06-01/StorageConnectorCRUD/StorageConnectors_Create.json */ /** * Sample code: CreateConnector. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsDeleteSamples.java index 2fea9fbbb1a0..7dca63887ac3 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectorsDeleteSamples { /* - * x-ms-original-file: 2026-09-01/StorageConnectorCRUD/StorageConnectors_Delete.json + * x-ms-original-file: 2026-06-01/StorageConnectorCRUD/StorageConnectors_Delete.json */ /** * Sample code: DeleteConnector. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsGetSamples.java index 8d5baa3920c7..8c347e31f03a 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectorsGetSamples { /* - * x-ms-original-file: 2026-09-01/StorageConnectorCRUD/StorageConnectors_Get.json + * x-ms-original-file: 2026-06-01/StorageConnectorCRUD/StorageConnectors_Get.json */ /** * Sample code: GetConnector. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsListByStorageAccountSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsListByStorageAccountSamples.java index a09adab99dee..f71bae1f3204 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsListByStorageAccountSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsListByStorageAccountSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectorsListByStorageAccountSamples { /* - * x-ms-original-file: 2026-09-01/StorageConnectorCRUD/StorageConnectors_ListByStorageAccount.json + * x-ms-original-file: 2026-06-01/StorageConnectorCRUD/StorageConnectors_ListByStorageAccount.json */ /** * Sample code: ListConnectorsByStorageAccount. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsTestExistingConnectionSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsTestExistingConnectionSamples.java index 7e2bc873559a..bdd91980b643 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsTestExistingConnectionSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsTestExistingConnectionSamples.java @@ -11,7 +11,7 @@ */ public final class ConnectorsTestExistingConnectionSamples { /* - * x-ms-original-file: 2026-09-01/StorageConnectorCRUD/StorageConnectors_TestExistingConnection.json + * x-ms-original-file: 2026-06-01/StorageConnectorCRUD/StorageConnectors_TestExistingConnection.json */ /** * Sample code: ExistingConnectionTest. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsUpdateSamples.java index aa86cfa945f9..711ad5667161 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ConnectorsUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class ConnectorsUpdateSamples { /* - * x-ms-original-file: 2026-09-01/StorageConnectorCRUD/StorageConnectors_Update.json + * x-ms-original-file: 2026-06-01/StorageConnectorCRUD/StorageConnectors_Update.json */ /** * Sample code: UpdateConnector. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersCreateOrUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersCreateOrUpdateSamples.java index feb062970619..850e4a155263 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersCreateOrUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ContextCacheContainersCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheContainerCRUD/ContextCacheContainers_CreateOrUpdate.json + * x-ms-original-file: 2026-06-01/StorageContextCacheContainerCRUD/ContextCacheContainers_CreateOrUpdate.json */ /** * Sample code: Create a Context Cache Container. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersDeleteSamples.java index 8c14b2950775..02ef968ebbc6 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ContextCacheContainersDeleteSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheContainerCRUD/ContextCacheContainers_Delete.json + * x-ms-original-file: 2026-06-01/StorageContextCacheContainerCRUD/ContextCacheContainers_Delete.json */ /** * Sample code: Delete a Context Cache Container. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersGetSamples.java index 903fbba6dc9e..15bed54659bf 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersGetSamples.java @@ -9,7 +9,7 @@ */ public final class ContextCacheContainersGetSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheContainerCRUD/ContextCacheContainers_Get.json + * x-ms-original-file: 2026-06-01/StorageContextCacheContainerCRUD/ContextCacheContainers_Get.json */ /** * Sample code: Get a Context Cache Container. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersListByContextCacheSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersListByContextCacheSamples.java index 6f338791ae0b..6b23529fab8c 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersListByContextCacheSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersListByContextCacheSamples.java @@ -9,7 +9,7 @@ */ public final class ContextCacheContainersListByContextCacheSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheContainerCRUD/ContextCacheContainers_ListByContextCache.json + * x-ms-original-file: 2026-06-01/StorageContextCacheContainerCRUD/ContextCacheContainers_ListByContextCache.json */ /** * Sample code: List Context Cache Containers in a Context Cache. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersUpdateSamples.java index 33604d2fb8b9..70d702f90fc3 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCacheContainersUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ContextCacheContainersUpdateSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheContainerCRUD/ContextCacheContainers_Update.json + * x-ms-original-file: 2026-06-01/StorageContextCacheContainerCRUD/ContextCacheContainers_Update.json */ /** * Sample code: Update a Context Cache Container. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesCheckNameAvailabilitySamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesCheckNameAvailabilitySamples.java deleted file mode 100644 index d9e9bf999af3..000000000000 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.storage.generated; - -import com.azure.resourcemanager.storage.models.ContextCacheCheckNameAvailabilityParameters; - -/** - * Samples for ContextCaches CheckNameAvailability. - */ -public final class ContextCachesCheckNameAvailabilitySamples { - /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_CheckNameAvailability.json - */ - /** - * Sample code: ContextCacheCheckNameAvailability. - * - * @param manager Entry point to StorageManager. - */ - public static void contextCacheCheckNameAvailability(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getContextCaches() - .checkNameAvailabilityWithResponse( - new ContextCacheCheckNameAvailabilityParameters().withName("testcontextcache"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesCreateOrUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesCreateOrUpdateSamples.java index 1171b92e3767..359d6245792d 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesCreateOrUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesCreateOrUpdateSamples.java @@ -13,7 +13,6 @@ import com.azure.resourcemanager.storage.models.KeyEncryptionKeyIdentity; import com.azure.resourcemanager.storage.models.KeyEncryptionKeyIdentityType; import com.azure.resourcemanager.storage.models.StorageAccountEncryption; -import com.azure.resourcemanager.storage.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -22,37 +21,7 @@ */ public final class ContextCachesCreateOrUpdateSamples { /* - * x-ms-original-file: - * 2026-09-01/StorageContextCacheCRUD/ContextCaches_CreateOrUpdate_SystemAssignedUserAssigned.json - */ - /** - * Sample code: Create a Context Cache with system-assigned and user-assigned identity. - * - * @param manager Entry point to StorageManager. - */ - public static void createAContextCacheWithSystemAssignedAndUserAssignedIdentity( - com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getContextCaches() - .createOrUpdate("testrg", "testcontextcache", - new ContextCacheInner().withLocation("eastus") - .withTags(mapOf("environment", "test")) - .withProperties(new ContextCacheProperties().withAccountKind(ContextCacheAccountKind.REGIONAL) - .withDescription("Test context cache") - .withEncryption(new StorageAccountEncryption() - .withCustomerManagedKeyEncryption(new CustomerManagedKeyEncryption() - .withKeyEncryptionKeyIdentity(new KeyEncryptionKeyIdentity() - .withIdentityType(KeyEncryptionKeyIdentityType.SYSTEM_ASSIGNED_IDENTITY)) - .withKeyEncryptionKeyUrl("fakeTokenPlaceholder")))) - .withIdentity(new Identity().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami", - new UserAssignedIdentity()))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_CreateOrUpdate_SystemIdentity.json + * x-ms-original-file: 2026-06-01/StorageContextCacheCRUD/ContextCaches_CreateOrUpdate_SystemIdentity.json */ /** * Sample code: Create a Azure Context Cache Account with System Assigned Identity. @@ -78,36 +47,7 @@ public static void createAAzureContextCacheAccountWithSystemAssignedIdentity( } /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_CreateOrUpdate_UserAssignedIdentity.json - */ - /** - * Sample code: Create a Context Cache with user-assigned identity. - * - * @param manager Entry point to StorageManager. - */ - public static void - createAContextCacheWithUserAssignedIdentity(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getContextCaches() - .createOrUpdate("testrg", "testcontextcache", new ContextCacheInner().withLocation("eastus") - .withTags(mapOf("environment", "test")) - .withProperties(new ContextCacheProperties().withAccountKind(ContextCacheAccountKind.REGIONAL) - .withDescription("Test context cache") - .withEncryption(new StorageAccountEncryption().withCustomerManagedKeyEncryption( - new CustomerManagedKeyEncryption().withKeyEncryptionKeyIdentity(new KeyEncryptionKeyIdentity() - .withIdentityType(KeyEncryptionKeyIdentityType.USER_ASSIGNED_IDENTITY) - .withUserAssignedIdentityResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami")) - .withKeyEncryptionKeyUrl("fakeTokenPlaceholder")))) - .withIdentity(new Identity().withType(IdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami", - new UserAssignedIdentity()))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_CreateOrUpdate.json + * x-ms-original-file: 2026-06-01/StorageContextCacheCRUD/ContextCaches_CreateOrUpdate.json */ /** * Sample code: Create a Context Cache. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesDeleteSamples.java index 9765ba3e8314..8ec3cf121b9e 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ContextCachesDeleteSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_Delete.json + * x-ms-original-file: 2026-06-01/StorageContextCacheCRUD/ContextCaches_Delete.json */ /** * Sample code: Delete a Context Cache. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesGetByResourceGroupSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesGetByResourceGroupSamples.java index dc3f77937283..c7bd5d45b60f 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesGetByResourceGroupSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ContextCachesGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_Get.json + * x-ms-original-file: 2026-06-01/StorageContextCacheCRUD/ContextCaches_Get.json */ /** * Sample code: Get a Context Cache. @@ -19,6 +19,6 @@ public final class ContextCachesGetByResourceGroupSamples { public static void getAContextCache(com.azure.resourcemanager.storage.StorageManager manager) { manager.serviceClient() .getContextCaches() - .getByResourceGroupWithResponse("testrg", "testcontextcache", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("testrg", "testaccount", com.azure.core.util.Context.NONE); } } diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesListByResourceGroupSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesListByResourceGroupSamples.java index e2f87e001267..00dad2569a15 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesListByResourceGroupSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ContextCachesListByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_ListByResourceGroup.json + * x-ms-original-file: 2026-06-01/StorageContextCacheCRUD/ContextCaches_ListByResourceGroup.json */ /** * Sample code: List Context Caches by Resource Group. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesListSamples.java index 6829dc03926a..34e598989425 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesListSamples.java @@ -9,7 +9,7 @@ */ public final class ContextCachesListSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_ListBySubscription.json + * x-ms-original-file: 2026-06-01/StorageContextCacheCRUD/ContextCaches_ListBySubscription.json */ /** * Sample code: List Context Caches by Subscription. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesUpdateSamples.java index 528fadb079b3..1a859514e459 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ContextCachesUpdateSamples.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.storage.models.KeyEncryptionKeyIdentity; import com.azure.resourcemanager.storage.models.KeyEncryptionKeyIdentityType; import com.azure.resourcemanager.storage.models.StorageAccountEncryption; -import com.azure.resourcemanager.storage.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; @@ -21,7 +20,7 @@ */ public final class ContextCachesUpdateSamples { /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_Update_CustomerManagedKey.json + * x-ms-original-file: 2026-06-01/StorageContextCacheCRUD/ContextCaches_Update_CustomerManagedKey.json */ /** * Sample code: Update a Azure Context Cache Account's Customer Managed Key Encryption Settings. @@ -46,7 +45,7 @@ public static void updateAAzureContextCacheAccountSCustomerManagedKeyEncryptionS } /* - * x-ms-original-file: 2026-09-01/StorageContextCacheCRUD/ContextCaches_Update.json + * x-ms-original-file: 2026-06-01/StorageContextCacheCRUD/ContextCaches_Update.json */ /** * Sample code: Update a Context Cache tags. @@ -56,18 +55,11 @@ public static void updateAAzureContextCacheAccountSCustomerManagedKeyEncryptionS public static void updateAContextCacheTags(com.azure.resourcemanager.storage.StorageManager manager) { manager.serviceClient() .getContextCaches() - .update("testrg", "testcontextcache", new ContextCacheUpdate() - .withTags(mapOf("environment", "production", "team", "promptservice")) - .withIdentity(new Identity().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-uami", - new UserAssignedIdentity()))) - .withProperties(new ContextCachePropertiesUpdate().withDescription("Updated context cache") - .withEncryption(new StorageAccountEncryption() - .withCustomerManagedKeyEncryption(new CustomerManagedKeyEncryption() - .withKeyEncryptionKeyIdentity(new KeyEncryptionKeyIdentity() - .withIdentityType(KeyEncryptionKeyIdentityType.SYSTEM_ASSIGNED_IDENTITY)) - .withKeyEncryptionKeyUrl("fakeTokenPlaceholder")))), + .update("testrg", "testaccount", + new ContextCacheUpdate().withTags(mapOf("environment", "production", "team", "context-cache")) + .withIdentity(new Identity().withType(IdentityType.SYSTEM_ASSIGNED)) + .withProperties(new ContextCachePropertiesUpdate() + .withDescription("Updated Prompt Service account description")), com.azure.core.util.Context.NONE); } diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesCreateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesCreateSamples.java index e709d6eb7754..da7750fefd86 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesCreateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesCreateSamples.java @@ -16,7 +16,7 @@ */ public final class DataSharesCreateSamples { /* - * x-ms-original-file: 2026-09-01/StorageDataShareCRUD/StorageDataShares_Create.json + * x-ms-original-file: 2026-06-01/StorageDataShareCRUD/StorageDataShares_Create.json */ /** * Sample code: CreateDataShare. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesDeleteSamples.java index cc7ebe9dd1cd..9cbfb13a898e 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class DataSharesDeleteSamples { /* - * x-ms-original-file: 2026-09-01/StorageDataShareCRUD/StorageDataShares_Delete.json + * x-ms-original-file: 2026-06-01/StorageDataShareCRUD/StorageDataShares_Delete.json */ /** * Sample code: DeleteDataShare. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesGetSamples.java index bfe343dba8c8..af4879a48130 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesGetSamples.java @@ -9,7 +9,7 @@ */ public final class DataSharesGetSamples { /* - * x-ms-original-file: 2026-09-01/StorageDataShareCRUD/StorageDataShares_Get.json + * x-ms-original-file: 2026-06-01/StorageDataShareCRUD/StorageDataShares_Get.json */ /** * Sample code: GetDataShare. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesListByStorageAccountSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesListByStorageAccountSamples.java index 94ec107a3b88..67274e810cf9 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesListByStorageAccountSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesListByStorageAccountSamples.java @@ -9,7 +9,7 @@ */ public final class DataSharesListByStorageAccountSamples { /* - * x-ms-original-file: 2026-09-01/StorageDataShareCRUD/StorageDataShares_ListByStorageAccount.json + * x-ms-original-file: 2026-06-01/StorageDataShareCRUD/StorageDataShares_ListByStorageAccount.json */ /** * Sample code: ListDataSharesByStorageAccount. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesUpdateSamples.java index 753939e9b1ca..acebdf6b0493 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DataSharesUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class DataSharesUpdateSamples { /* - * x-ms-original-file: 2026-09-01/StorageDataShareCRUD/StorageDataShares_Update.json + * x-ms-original-file: 2026-06-01/StorageDataShareCRUD/StorageDataShares_Update.json */ /** * Sample code: UpdateDataShare. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DeletedAccountsGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DeletedAccountsGetSamples.java index 50938623f972..e3bd854fbce7 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DeletedAccountsGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DeletedAccountsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DeletedAccountsGetSamples { /* - * x-ms-original-file: 2026-09-01/DeletedAccountGet.json + * x-ms-original-file: 2026-06-01/DeletedAccountGet.json */ /** * Sample code: DeletedAccountGet. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DeletedAccountsListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DeletedAccountsListSamples.java index a51aa1043010..27bc77679085 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DeletedAccountsListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/DeletedAccountsListSamples.java @@ -9,7 +9,7 @@ */ public final class DeletedAccountsListSamples { /* - * x-ms-original-file: 2026-09-01/DeletedAccountList.json + * x-ms-original-file: 2026-06-01/DeletedAccountList.json */ /** * Sample code: DeletedAccountList. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesGetSamples.java index ffef4ae0f168..8507ec59ba8e 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesGetSamples.java @@ -9,7 +9,7 @@ */ public final class EncryptionScopesGetSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountGetEncryptionScope.json + * x-ms-original-file: 2026-06-01/StorageAccountGetEncryptionScope.json */ /** * Sample code: StorageAccountGetEncryptionScope. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesListSamples.java index f1cf42a601a1..8fd173a8d337 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesListSamples.java @@ -9,7 +9,7 @@ */ public final class EncryptionScopesListSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountEncryptionScopeList.json + * x-ms-original-file: 2026-06-01/StorageAccountEncryptionScopeList.json */ /** * Sample code: StorageAccountEncryptionScopeList. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesPatchSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesPatchSamples.java index 547a5ca14fe1..3cfbaff64f81 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesPatchSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesPatchSamples.java @@ -13,7 +13,7 @@ */ public final class EncryptionScopesPatchSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountPatchEncryptionScope.json + * x-ms-original-file: 2026-06-01/StorageAccountPatchEncryptionScope.json */ /** * Sample code: StorageAccountPatchEncryptionScope. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesPutSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesPutSamples.java index 877af1d712f1..99675940e245 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesPutSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/EncryptionScopesPutSamples.java @@ -11,7 +11,7 @@ */ public final class EncryptionScopesPutSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json + * x-ms-original-file: 2026-06-01/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json */ /** * Sample code: StorageAccountPutEncryptionScopeWithInfrastructureEncryption. @@ -27,7 +27,7 @@ public static void storageAccountPutEncryptionScopeWithInfrastructureEncryption( } /* - * x-ms-original-file: 2026-09-01/StorageAccountPutEncryptionScope.json + * x-ms-original-file: 2026-06-01/StorageAccountPutEncryptionScope.json */ /** * Sample code: StorageAccountPutEncryptionScope. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesGetServicePropertiesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesGetServicePropertiesSamples.java index d1f164426e5f..dee27a39ef1d 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesGetServicePropertiesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesGetServicePropertiesSamples.java @@ -9,7 +9,7 @@ */ public final class FileServicesGetServicePropertiesSamples { /* - * x-ms-original-file: 2026-09-01/FileServicesGet.json + * x-ms-original-file: 2026-06-01/FileServicesGet.json */ /** * Sample code: GetFileServices. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesGetServiceUsageSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesGetServiceUsageSamples.java index 5e3f721735c6..f9f842b9f896 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesGetServiceUsageSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesGetServiceUsageSamples.java @@ -9,7 +9,7 @@ */ public final class FileServicesGetServiceUsageSamples { /* - * x-ms-original-file: 2026-09-01/FileServicesGetUsage.json + * x-ms-original-file: 2026-06-01/FileServicesGetUsage.json */ /** * Sample code: GetFileServiceUsage. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesListSamples.java index 1160ae8763ca..1504c44459b1 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesListSamples.java @@ -9,7 +9,7 @@ */ public final class FileServicesListSamples { /* - * x-ms-original-file: 2026-09-01/FileServicesList.json + * x-ms-original-file: 2026-06-01/FileServicesList.json */ /** * Sample code: ListFileServices. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesListServiceUsagesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesListServiceUsagesSamples.java index c33660c1d3c2..daa016598374 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesListServiceUsagesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesListServiceUsagesSamples.java @@ -9,7 +9,7 @@ */ public final class FileServicesListServiceUsagesSamples { /* - * x-ms-original-file: 2026-09-01/FileServicesListUsages.json + * x-ms-original-file: 2026-06-01/FileServicesListUsages.json */ /** * Sample code: ListFileServiceUsages. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesSetServicePropertiesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesSetServicePropertiesSamples.java index 97fbc19812b1..a6b1725c76f7 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesSetServicePropertiesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileServicesSetServicePropertiesSamples.java @@ -20,7 +20,7 @@ */ public final class FileServicesSetServicePropertiesSamples { /* - * x-ms-original-file: 2026-09-01/FileServicesPut.json + * x-ms-original-file: 2026-06-01/FileServicesPut.json */ /** * Sample code: PutFileServices. @@ -55,7 +55,7 @@ public static void putFileServices(com.azure.resourcemanager.storage.StorageMana } /* - * x-ms-original-file: 2026-09-01/FileServicesPut_EnableSecureSmbFeatures.json + * x-ms-original-file: 2026-06-01/FileServicesPut_EnableSecureSmbFeatures.json */ /** * Sample code: PutFileServices_EnableSecureSmbFeatures. @@ -76,7 +76,7 @@ public static void putFileServices(com.azure.resourcemanager.storage.StorageMana } /* - * x-ms-original-file: 2026-09-01/FileServicesPut_EnableSMBMultichannel.json + * x-ms-original-file: 2026-06-01/FileServicesPut_EnableSMBMultichannel.json */ /** * Sample code: PutFileServices_EnableSMBMultichannel. @@ -93,7 +93,7 @@ public static void putFileServicesEnableSMBMultichannel(com.azure.resourcemanage } /* - * x-ms-original-file: 2026-09-01/FileServicesPut_EncryptionInTransitRequired.json + * x-ms-original-file: 2026-06-01/FileServicesPut_EncryptionInTransitRequired.json */ /** * Sample code: PutFileServices_EncryptionInTransitRequired. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesCreateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesCreateSamples.java index 70fe725713c6..7128ad8db9a7 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesCreateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesCreateSamples.java @@ -14,7 +14,7 @@ */ public final class FileSharesCreateSamples { /* - * x-ms-original-file: 2026-09-01/FileSharesPut_ProvisionedV2.json + * x-ms-original-file: 2026-06-01/FileSharesPut_ProvisionedV2.json */ /** * Sample code: PutSharesProvisionedV2. @@ -30,7 +30,7 @@ public static void putSharesProvisionedV2(com.azure.resourcemanager.storage.Stor } /* - * x-ms-original-file: 2026-09-01/FileSharesPut_AccessTier.json + * x-ms-original-file: 2026-06-01/FileSharesPut_AccessTier.json */ /** * Sample code: PutShares with Access Tier. @@ -45,7 +45,7 @@ public static void putSharesWithAccessTier(com.azure.resourcemanager.storage.Sto } /* - * x-ms-original-file: 2026-09-01/FileSharesPut_NFS.json + * x-ms-original-file: 2026-06-01/FileSharesPut_NFS.json */ /** * Sample code: Create NFS Shares. @@ -61,7 +61,7 @@ public static void createNFSShares(com.azure.resourcemanager.storage.StorageMana } /* - * x-ms-original-file: 2026-09-01/FileSharesPut_PaidBursting.json + * x-ms-original-file: 2026-06-01/FileSharesPut_PaidBursting.json */ /** * Sample code: PutShares with Paid Bursting. @@ -80,7 +80,7 @@ public static void putSharesWithPaidBursting(com.azure.resourcemanager.storage.S } /* - * x-ms-original-file: 2026-09-01/FileSharesPut.json + * x-ms-original-file: 2026-06-01/FileSharesPut.json */ /** * Sample code: PutShares. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesDeleteSamples.java index 165968407751..ca40eb3fa670 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class FileSharesDeleteSamples { /* - * x-ms-original-file: 2026-09-01/FileSharesDelete.json + * x-ms-original-file: 2026-06-01/FileSharesDelete.json */ /** * Sample code: DeleteShares. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesGetSamples.java index e2b90c22c50e..a62f221b3ab8 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesGetSamples.java @@ -9,7 +9,7 @@ */ public final class FileSharesGetSamples { /* - * x-ms-original-file: 2026-09-01/FileSharesGet_Stats.json + * x-ms-original-file: 2026-06-01/FileSharesGet_Stats.json */ /** * Sample code: GetShareStats. @@ -23,7 +23,7 @@ public static void getShareStats(com.azure.resourcemanager.storage.StorageManage } /* - * x-ms-original-file: 2026-09-01/FileSharesGet_PaidBursting.json + * x-ms-original-file: 2026-06-01/FileSharesGet_PaidBursting.json */ /** * Sample code: GetSharePaidBursting. @@ -37,7 +37,7 @@ public static void getSharePaidBursting(com.azure.resourcemanager.storage.Storag } /* - * x-ms-original-file: 2026-09-01/FileSharesGet_ProvisionedV2.json + * x-ms-original-file: 2026-06-01/FileSharesGet_ProvisionedV2.json */ /** * Sample code: GetShareProvisionedV2. @@ -51,7 +51,7 @@ public static void getShareProvisionedV2(com.azure.resourcemanager.storage.Stora } /* - * x-ms-original-file: 2026-09-01/FileSharesGet.json + * x-ms-original-file: 2026-06-01/FileSharesGet.json */ /** * Sample code: GetShares. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesLeaseSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesLeaseSamples.java index a475c4bead73..bc087089de97 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesLeaseSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesLeaseSamples.java @@ -12,7 +12,7 @@ */ public final class FileSharesLeaseSamples { /* - * x-ms-original-file: 2026-09-01/FileSharesLease_Break.json + * x-ms-original-file: 2026-06-01/FileSharesLease_Break.json */ /** * Sample code: Break a lease on a share. @@ -29,7 +29,7 @@ public static void breakALeaseOnAShare(com.azure.resourcemanager.storage.Storage } /* - * x-ms-original-file: 2026-09-01/FileSharesLease_Acquire.json + * x-ms-original-file: 2026-06-01/FileSharesLease_Acquire.json */ /** * Sample code: Acquire a lease on a share. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesListSamples.java index c7a29671b08c..5064a8379967 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesListSamples.java @@ -9,7 +9,7 @@ */ public final class FileSharesListSamples { /* - * x-ms-original-file: 2026-09-01/FileSharesList.json + * x-ms-original-file: 2026-06-01/FileSharesList.json */ /** * Sample code: ListShares. @@ -23,7 +23,7 @@ public static void listShares(com.azure.resourcemanager.storage.StorageManager m } /* - * x-ms-original-file: 2026-09-01/DeletedFileSharesList.json + * x-ms-original-file: 2026-06-01/DeletedFileSharesList.json */ /** * Sample code: ListDeletedShares. @@ -37,7 +37,7 @@ public static void listDeletedShares(com.azure.resourcemanager.storage.StorageMa } /* - * x-ms-original-file: 2026-09-01/FileSharesList_ProvisionedV2.json + * x-ms-original-file: 2026-06-01/FileSharesList_ProvisionedV2.json */ /** * Sample code: ListSharesProvisionedV2. @@ -51,7 +51,7 @@ public static void listSharesProvisionedV2(com.azure.resourcemanager.storage.Sto } /* - * x-ms-original-file: 2026-09-01/FileShareSnapshotsList.json + * x-ms-original-file: 2026-06-01/FileShareSnapshotsList.json */ /** * Sample code: ListShareSnapshots. @@ -65,7 +65,7 @@ public static void listShareSnapshots(com.azure.resourcemanager.storage.StorageM } /* - * x-ms-original-file: 2026-09-01/FileSharesList_PaidBursting.json + * x-ms-original-file: 2026-06-01/FileSharesList_PaidBursting.json */ /** * Sample code: ListSharesPaidBursting. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesRestoreSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesRestoreSamples.java index c3099026dc66..8af2e2bde228 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesRestoreSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesRestoreSamples.java @@ -11,7 +11,7 @@ */ public final class FileSharesRestoreSamples { /* - * x-ms-original-file: 2026-09-01/FileSharesRestore.json + * x-ms-original-file: 2026-06-01/FileSharesRestore.json */ /** * Sample code: RestoreShares. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesUpdateSamples.java index 633b164f61ef..5cb763d56522 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/FileSharesUpdateSamples.java @@ -18,7 +18,7 @@ */ public final class FileSharesUpdateSamples { /* - * x-ms-original-file: 2026-09-01/FileSharesPatch.json + * x-ms-original-file: 2026-06-01/FileSharesPatch.json */ /** * Sample code: UpdateShares. @@ -33,7 +33,7 @@ public static void updateShares(com.azure.resourcemanager.storage.StorageManager } /* - * x-ms-original-file: 2026-09-01/FileShareAclsPatch.json + * x-ms-original-file: 2026-06-01/FileShareAclsPatch.json */ /** * Sample code: UpdateShareAcls. @@ -56,7 +56,7 @@ public static void updateShareAcls(com.azure.resourcemanager.storage.StorageMana } /* - * x-ms-original-file: 2026-09-01/FileSharesPatch_PaidBursting.json + * x-ms-original-file: 2026-06-01/FileSharesPatch_PaidBursting.json */ /** * Sample code: UpdateSharePaidBursting. @@ -75,7 +75,7 @@ public static void updateSharePaidBursting(com.azure.resourcemanager.storage.Sto } /* - * x-ms-original-file: 2026-09-01/FileSharesPatch_ProvisionedV2.json + * x-ms-original-file: 2026-06-01/FileSharesPatch_ProvisionedV2.json */ /** * Sample code: UpdateShareProvisionedV2. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationCreateOrUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationCreateOrUpdateSamples.java index 7c8133ba326a..cc17067fc9ba 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationCreateOrUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class LocalUsersOperationCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-01/LocalUserCreate.json + * x-ms-original-file: 2026-06-01/LocalUserCreate.json */ /** * Sample code: CreateLocalUser. @@ -39,7 +39,7 @@ public static void createLocalUser(com.azure.resourcemanager.storage.StorageMana } /* - * x-ms-original-file: 2026-09-01/LocalUserCreateNFSv3Enabled.json + * x-ms-original-file: 2026-06-01/LocalUserCreateNFSv3Enabled.json */ /** * Sample code: CreateNFSv3EnabledLocalUser. @@ -55,7 +55,7 @@ public static void createNFSv3EnabledLocalUser(com.azure.resourcemanager.storage } /* - * x-ms-original-file: 2026-09-01/LocalUserUpdate.json + * x-ms-original-file: 2026-06-01/LocalUserUpdate.json */ /** * Sample code: UpdateLocalUser. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationDeleteSamples.java index 089d8f96f444..a2083c6439bd 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class LocalUsersOperationDeleteSamples { /* - * x-ms-original-file: 2026-09-01/LocalUserDelete.json + * x-ms-original-file: 2026-06-01/LocalUserDelete.json */ /** * Sample code: DeleteLocalUser. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationGetSamples.java index 09685bd8cb04..829578f1ab00 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationGetSamples.java @@ -9,7 +9,7 @@ */ public final class LocalUsersOperationGetSamples { /* - * x-ms-original-file: 2026-09-01/LocalUserGet.json + * x-ms-original-file: 2026-06-01/LocalUserGet.json */ /** * Sample code: GetLocalUser. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationListKeysSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationListKeysSamples.java index da958607b09c..9cd73cc866eb 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationListKeysSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationListKeysSamples.java @@ -9,7 +9,7 @@ */ public final class LocalUsersOperationListKeysSamples { /* - * x-ms-original-file: 2026-09-01/LocalUserListKeys.json + * x-ms-original-file: 2026-06-01/LocalUserListKeys.json */ /** * Sample code: ListLocalUserKeys. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationListSamples.java index aac991ca8d90..2b6e463a4cef 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationListSamples.java @@ -11,7 +11,7 @@ */ public final class LocalUsersOperationListSamples { /* - * x-ms-original-file: 2026-09-01/LocalUsersListNFSv3Enabled.json + * x-ms-original-file: 2026-06-01/LocalUsersListNFSv3Enabled.json */ /** * Sample code: ListNFSv3EnabledLocalUsers. @@ -25,7 +25,7 @@ public static void listNFSv3EnabledLocalUsers(com.azure.resourcemanager.storage. } /* - * x-ms-original-file: 2026-09-01/LocalUsersList.json + * x-ms-original-file: 2026-06-01/LocalUsersList.json */ /** * Sample code: ListLocalUsers. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationRegeneratePasswordSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationRegeneratePasswordSamples.java index 70a9808710ab..3637391e7dc0 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationRegeneratePasswordSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/LocalUsersOperationRegeneratePasswordSamples.java @@ -9,7 +9,7 @@ */ public final class LocalUsersOperationRegeneratePasswordSamples { /* - * x-ms-original-file: 2026-09-01/LocalUserRegeneratePassword.json + * x-ms-original-file: 2026-06-01/LocalUserRegeneratePassword.json */ /** * Sample code: RegenerateLocalUserPassword. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesCreateOrUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesCreateOrUpdateSamples.java index c55bf784d45a..3640a84d2d04 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesCreateOrUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesCreateOrUpdateSamples.java @@ -25,7 +25,7 @@ */ public final class ManagementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountSetManagementPolicyColdTierActions.json + * x-ms-original-file: 2026-06-01/StorageAccountSetManagementPolicyColdTierActions.json */ /** * Sample code: StorageAccountSetManagementPolicyColdTierActions. @@ -72,7 +72,7 @@ public final class ManagementPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-09-01/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json + * x-ms-original-file: 2026-06-01/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json */ /** * Sample code: StorageAccountSetManagementPolicyWithSnapshotAndVersion. @@ -121,7 +121,7 @@ public static void storageAccountSetManagementPolicyWithSnapshotAndVersion( } /* - * x-ms-original-file: 2026-09-01/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json + * x-ms-original-file: 2026-06-01/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json */ /** * Sample code: StorageAccountSetManagementPolicyForBlockAndAppendBlobs. @@ -156,7 +156,7 @@ public static void storageAccountSetManagementPolicyForBlockAndAppendBlobs( } /* - * x-ms-original-file: 2026-09-01/StorageAccountSetManagementPolicyHotTierActions.json + * x-ms-original-file: 2026-06-01/StorageAccountSetManagementPolicyHotTierActions.json */ /** * Sample code: StorageAccountSetManagementPolicyHotTierActions. @@ -191,7 +191,7 @@ public static void storageAccountSetManagementPolicyForBlockAndAppendBlobs( } /* - * x-ms-original-file: 2026-09-01/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json + * x-ms-original-file: 2026-06-01/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json */ /** * Sample code: StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions. @@ -228,7 +228,7 @@ public static void storageAccountSetManagementPolicyLastAccessTimeBasedBlobActio } /* - * x-ms-original-file: 2026-09-01/StorageAccountSetManagementPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountSetManagementPolicy.json */ /** * Sample code: StorageAccountSetManagementPolicies. @@ -283,7 +283,7 @@ public static void storageAccountSetManagementPolicies(com.azure.resourcemanager } /* - * x-ms-original-file: 2026-09-01/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json + * x-ms-original-file: 2026-06-01/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json */ /** * Sample code: StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions. @@ -319,7 +319,7 @@ public static void storageAccountSetManagementPolicyBaseBlobDaysAfterCreationAct } /* - * x-ms-original-file: 2026-09-01/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json + * x-ms-original-file: 2026-06-01/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json */ /** * Sample code: StorageAccountSetManagementPolicy_LastTierChangeTimeActions. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesDeleteSamples.java index c644cf85e2d6..a7cc9df0a202 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesDeleteSamples.java @@ -11,7 +11,7 @@ */ public final class ManagementPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountDeleteManagementPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountDeleteManagementPolicy.json */ /** * Sample code: StorageAccountDeleteManagementPolicies. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesGetSamples.java index 891e33861631..80b2b8e4f527 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ManagementPoliciesGetSamples.java @@ -11,7 +11,7 @@ */ public final class ManagementPoliciesGetSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountGetManagementPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountGetManagementPolicy.json */ /** * Sample code: StorageAccountGetManagementPolicies. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java index 2f91a1c80978..93e628791858 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityPerimeterConfigurationsGetSamples { /* - * x-ms-original-file: 2026-09-01/NetworkSecurityPerimeterConfigurationGet.json + * x-ms-original-file: 2026-06-01/NetworkSecurityPerimeterConfigurationGet.json */ /** * Sample code: NetworkSecurityPerimeterConfigurationGet. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsListSamples.java index fcc11c9e5da7..edc99edb4bbd 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityPerimeterConfigurationsListSamples { /* - * x-ms-original-file: 2026-09-01/NetworkSecurityPerimeterConfigurationList.json + * x-ms-original-file: 2026-06-01/NetworkSecurityPerimeterConfigurationList.json */ /** * Sample code: NetworkSecurityPerimeterConfigurationList. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java index 434268370db0..2304d5686eb5 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { /* - * x-ms-original-file: 2026-09-01/NetworkSecurityPerimeterConfigurationReconcile.json + * x-ms-original-file: 2026-06-01/NetworkSecurityPerimeterConfigurationReconcile.json */ /** * Sample code: NetworkSecurityPerimeterConfigurationReconcile. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationCreateOrUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationCreateOrUpdateSamples.java index 4b3aab657252..a99626d559f0 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationCreateOrUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class ObjectReplicationPoliciesOperationCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateObjectReplicationPolicyOnSource.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateObjectReplicationPolicyOnSource.json */ /** * Sample code: StorageAccountCreateObjectReplicationPolicyOnSource. @@ -48,7 +48,7 @@ public final class ObjectReplicationPoliciesOperationCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateObjectReplicationPolicyOnDestination.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdateObjectReplicationPolicyOnDestination.json */ /** * Sample code: StorageAccountUpdateObjectReplicationPolicyOnDestination. @@ -79,7 +79,7 @@ public static void storageAccountUpdateObjectReplicationPolicyOnDestination( } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateObjectReplicationPolicyOnDestination.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateObjectReplicationPolicyOnDestination.json */ /** * Sample code: StorageAccountCreateObjectReplicationPolicyOnDestination. @@ -103,7 +103,7 @@ public static void storageAccountCreateObjectReplicationPolicyOnDestination( } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateObjectReplicationPolicyOnSource.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdateObjectReplicationPolicyOnSource.json */ /** * Sample code: StorageAccountUpdateObjectReplicationPolicyOnSource. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationDeleteSamples.java index 7ebcfbce387b..790cf0854a78 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ObjectReplicationPoliciesOperationDeleteSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountDeleteObjectReplicationPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountDeleteObjectReplicationPolicy.json */ /** * Sample code: StorageAccountDeleteObjectReplicationPolicies. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationGetSamples.java index 1ab464173293..7ca87e86ccc3 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationGetSamples.java @@ -9,7 +9,7 @@ */ public final class ObjectReplicationPoliciesOperationGetSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountGetObjectReplicationPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountGetObjectReplicationPolicy.json */ /** * Sample code: StorageAccountGetObjectReplicationPolicies. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationListSamples.java index ebd879f6e44e..c23eb644deac 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/ObjectReplicationPoliciesOperationListSamples.java @@ -9,7 +9,7 @@ */ public final class ObjectReplicationPoliciesOperationListSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountListObjectReplicationPolicies.json + * x-ms-original-file: 2026-06-01/StorageAccountListObjectReplicationPolicies.json */ /** * Sample code: StorageAccountListObjectReplicationPolicies. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/OperationsListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/OperationsListSamples.java index 8bf54948d7ea..f4725a716929 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/OperationsListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-09-01/OperationsList.json + * x-ms-original-file: 2026-06-01/OperationsList.json */ /** * Sample code: OperationsList. @@ -19,16 +19,4 @@ public final class OperationsListSamples { public static void operationsList(com.azure.resourcemanager.storage.StorageManager manager) { manager.serviceClient().getOperations().list(com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: 2026-09-01/Operations_List.json - */ - /** - * Sample code: ListOperations. - * - * @param manager Entry point to StorageManager. - */ - public static void listOperations(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient().getOperations().list(com.azure.core.util.Context.NONE); - } } diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsDeleteSamples.java index b18d045684ad..ac7ed8409ebb 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountDeletePrivateEndpointConnection.json + * x-ms-original-file: 2026-06-01/StorageAccountDeletePrivateEndpointConnection.json */ /** * Sample code: StorageAccountDeletePrivateEndpointConnection. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsGetSamples.java index a42ebb82498b..006892e5c385 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountGetPrivateEndpointConnection.json + * x-ms-original-file: 2026-06-01/StorageAccountGetPrivateEndpointConnection.json */ /** * Sample code: StorageAccountGetPrivateEndpointConnection. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsListSamples.java index f7f014a68232..2d4e1c92e2e0 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountListPrivateEndpointConnections.json + * x-ms-original-file: 2026-06-01/StorageAccountListPrivateEndpointConnections.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsPutSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsPutSamples.java index 335b3e65b1e9..921778917c7f 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsPutSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateEndpointConnectionsPutSamples.java @@ -13,7 +13,7 @@ */ public final class PrivateEndpointConnectionsPutSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountPutPrivateEndpointConnection.json + * x-ms-original-file: 2026-06-01/StorageAccountPutPrivateEndpointConnection.json */ /** * Sample code: StorageAccountPutPrivateEndpointConnection. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateLinkResourcesListByStorageAccountSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateLinkResourcesListByStorageAccountSamples.java index b4f4f2855332..c1988c350652 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateLinkResourcesListByStorageAccountSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/PrivateLinkResourcesListByStorageAccountSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateLinkResourcesListByStorageAccountSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountListPrivateLinkResources.json + * x-ms-original-file: 2026-06-01/StorageAccountListPrivateLinkResources.json */ /** * Sample code: StorageAccountListPrivateLinkResources. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueCreateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueCreateSamples.java index 062b768eccbc..cb1148d95059 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueCreateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueCreateSamples.java @@ -13,7 +13,7 @@ */ public final class QueueCreateSamples { /* - * x-ms-original-file: 2026-09-01/QueueOperationPut.json + * x-ms-original-file: 2026-06-01/QueueOperationPut.json */ /** * Sample code: QueueOperationPut. @@ -28,7 +28,7 @@ public static void queueOperationPut(com.azure.resourcemanager.storage.StorageMa } /* - * x-ms-original-file: 2026-09-01/QueueOperationPutWithMetadata.json + * x-ms-original-file: 2026-06-01/QueueOperationPutWithMetadata.json */ /** * Sample code: QueueOperationPutWithMetadata. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueDeleteSamples.java index 2cdfcdb77d6f..d42a05237404 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class QueueDeleteSamples { /* - * x-ms-original-file: 2026-09-01/QueueOperationDelete.json + * x-ms-original-file: 2026-06-01/QueueOperationDelete.json */ /** * Sample code: QueueOperationDelete. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueGetSamples.java index 4466eff799e8..25254349a5f7 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueGetSamples.java @@ -9,7 +9,7 @@ */ public final class QueueGetSamples { /* - * x-ms-original-file: 2026-09-01/QueueOperationGet.json + * x-ms-original-file: 2026-06-01/QueueOperationGet.json */ /** * Sample code: QueueOperationGet. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueListSamples.java index 9993706ea185..e9e0cdd24f42 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueListSamples.java @@ -9,7 +9,7 @@ */ public final class QueueListSamples { /* - * x-ms-original-file: 2026-09-01/QueueOperationList.json + * x-ms-original-file: 2026-06-01/QueueOperationList.json */ /** * Sample code: QueueOperationList. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesGetServicePropertiesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesGetServicePropertiesSamples.java index c0caa76119ca..2457bd594a6a 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesGetServicePropertiesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesGetServicePropertiesSamples.java @@ -9,7 +9,7 @@ */ public final class QueueServicesGetServicePropertiesSamples { /* - * x-ms-original-file: 2026-09-01/QueueServicesGet.json + * x-ms-original-file: 2026-06-01/QueueServicesGet.json */ /** * Sample code: QueueServicesGet. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesListSamples.java index f4230bd261e2..eaaf82aee4b0 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesListSamples.java @@ -9,7 +9,7 @@ */ public final class QueueServicesListSamples { /* - * x-ms-original-file: 2026-09-01/QueueServicesList.json + * x-ms-original-file: 2026-06-01/QueueServicesList.json */ /** * Sample code: QueueServicesList. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesSetServicePropertiesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesSetServicePropertiesSamples.java index b67f28616b29..3b23ea38e253 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesSetServicePropertiesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueServicesSetServicePropertiesSamples.java @@ -15,7 +15,7 @@ */ public final class QueueServicesSetServicePropertiesSamples { /* - * x-ms-original-file: 2026-09-01/QueueServicesPut.json + * x-ms-original-file: 2026-06-01/QueueServicesPut.json */ /** * Sample code: QueueServicesPut. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueUpdateSamples.java index 1d99f81794cb..4cf3605fd176 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/QueueUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class QueueUpdateSamples { /* - * x-ms-original-file: 2026-09-01/QueueOperationPatch.json + * x-ms-original-file: 2026-06-01/QueueOperationPatch.json */ /** * Sample code: QueueOperationPatch. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/SkusListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/SkusListSamples.java index 2399c903af80..0777fca2dd8a 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/SkusListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/SkusListSamples.java @@ -9,7 +9,7 @@ */ public final class SkusListSamples { /* - * x-ms-original-file: 2026-09-01/SKUListWithLocationInfo.json + * x-ms-original-file: 2026-06-01/SKUListWithLocationInfo.json */ /** * Sample code: SKUListWithLocationInfo. @@ -21,7 +21,7 @@ public static void sKUListWithLocationInfo(com.azure.resourcemanager.storage.Sto } /* - * x-ms-original-file: 2026-09-01/SKUList.json + * x-ms-original-file: 2026-06-01/SKUList.json */ /** * Sample code: SkuList. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsAbortHierarchicalNamespaceMigrationSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsAbortHierarchicalNamespaceMigrationSamples.java index 44e580fa0277..dd2cda69d4bd 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsAbortHierarchicalNamespaceMigrationSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsAbortHierarchicalNamespaceMigrationSamples.java @@ -9,7 +9,7 @@ */ public final class StorageAccountsAbortHierarchicalNamespaceMigrationSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountAbortHierarchicalNamespaceMigration.json + * x-ms-original-file: 2026-06-01/StorageAccountAbortHierarchicalNamespaceMigration.json */ /** * Sample code: StorageAccountAbortHierarchicalNamespaceMigration. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCheckNameAvailabilitySamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCheckNameAvailabilitySamples.java index 6d4e2e601a6c..d7c6f9c74522 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCheckNameAvailabilitySamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCheckNameAvailabilitySamples.java @@ -11,7 +11,7 @@ */ public final class StorageAccountsCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountCheckNameAvailability.json + * x-ms-original-file: 2026-06-01/StorageAccountCheckNameAvailability.json */ /** * Sample code: StorageAccountCheckNameAvailability. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCreateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCreateSamples.java index e63489683894..9a9ed4db6fac 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCreateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCreateSamples.java @@ -41,8 +41,6 @@ import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters; import com.azure.resourcemanager.storage.models.StorageAccountSharedKeyAccessProperties; import com.azure.resourcemanager.storage.models.StorageDataCollaborationPolicyProperties; -import com.azure.resourcemanager.storage.models.TurboTier; -import com.azure.resourcemanager.storage.models.TurboTierStatus; import com.azure.resourcemanager.storage.models.UserAssignedIdentity; import com.azure.resourcemanager.storage.models.VirtualNetworkRule; import com.azure.resourcemanager.storage.models.ZonePlacementPolicy; @@ -55,7 +53,7 @@ */ public final class StorageAccountsCreateSamples { /* - * x-ms-original-file: 2026-09-01/NfsV3AccountCreate.json + * x-ms-original-file: 2026-06-01/NfsV3AccountCreate.json */ /** * Sample code: NfsV3AccountCreate. @@ -81,7 +79,7 @@ public static void nfsV3AccountCreate(com.azure.resourcemanager.storage.StorageM } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateWithSmartAccessTier.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateWithSmartAccessTier.json */ /** * Sample code: StorageAccountCreateWithSmartAccessTier. @@ -123,7 +121,7 @@ public static void nfsV3AccountCreate(com.azure.resourcemanager.storage.StorageM } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreate.json + * x-ms-original-file: 2026-06-01/StorageAccountCreate.json */ /** * Sample code: StorageAccountCreate. @@ -171,27 +169,7 @@ public static void storageAccountCreate(com.azure.resourcemanager.storage.Storag } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateWithTurboTier.json - */ - /** - * Sample code: StorageAccountCreateWithTurboTier. - * - * @param manager Entry point to StorageManager. - */ - public static void storageAccountCreateWithTurboTier(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getStorageAccounts() - .create("res9101", "staturbocontoso01", - new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_LRS)) - .withKind(Kind.STORAGE_V2) - .withLocation("eastus2") - .withAccessTier(AccessTier.HOT) - .withTurboTier(new TurboTier().withStatus(TurboTierStatus.ENABLED).withTargetPercent(10)), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-01/StorageAccountCreate_zones.json + * x-ms-original-file: 2026-06-01/StorageAccountCreate_zones.json */ /** * Sample code: StorageAccountCreate_zones. @@ -230,7 +208,7 @@ public static void storageAccountCreateZones(com.azure.resourcemanager.storage.S } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreate_placement.json + * x-ms-original-file: 2026-06-01/StorageAccountCreate_placement.json */ /** * Sample code: StorageAccountCreate_placement. @@ -269,7 +247,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateDisallowPublicNetworkAccess.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateDisallowPublicNetworkAccess.json */ /** * Sample code: StorageAccountCreateDisallowPublicNetworkAccess. @@ -307,7 +285,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateDnsEndpointTypeToStandard.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateDnsEndpointTypeToStandard.json */ /** * Sample code: StorageAccountCreateDnsEndpointTypeToStandard. @@ -347,7 +325,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json */ /** * Sample code: StorageAccountCreateDnsEndpointTypeToAzureDnsZone. @@ -387,7 +365,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateWithDataCollaborationPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateWithDataCollaborationPolicy.json */ /** * Sample code: StorageAccountCreateWithDataCollaborationPolicy. @@ -410,7 +388,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreatePremiumBlockBlobStorage.json + * x-ms-original-file: 2026-06-01/StorageAccountCreatePremiumBlockBlobStorage.json */ /** * Sample code: StorageAccountCreatePremiumBlockBlobStorage. @@ -438,7 +416,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateWithImmutabilityPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateWithImmutabilityPolicy.json */ /** * Sample code: StorageAccountCreateWithImmutabilityPolicy. @@ -464,7 +442,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateAllowedCopyScopeToPrivateLink.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateAllowedCopyScopeToPrivateLink.json */ /** * Sample code: StorageAccountCreateAllowedCopyScopeToPrivateLink. @@ -500,7 +478,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateEnablePublicNetworkAccess.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateEnablePublicNetworkAccess.json */ /** * Sample code: StorageAccountCreateEnablePublicNetworkAccess. @@ -538,7 +516,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateAllowedCopyScopeToAAD.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateAllowedCopyScopeToAAD.json */ /** * Sample code: StorageAccountCreateAllowedCopyScopeToAAD. @@ -574,7 +552,7 @@ public static void storageAccountCreatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json */ /** * Sample code: StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId. @@ -608,7 +586,7 @@ public static void storageAccountCreateUserAssignedIdentityWithFederatedIdentity } /* - * x-ms-original-file: 2026-09-01/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json + * x-ms-original-file: 2026-06-01/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json */ /** * Sample code: StorageAccountCreateUserAssignedEncryptionIdentityWithCMK. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCustomerInitiatedMigrationSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCustomerInitiatedMigrationSamples.java index 05fc81794a7e..91a3b4d741bb 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCustomerInitiatedMigrationSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsCustomerInitiatedMigrationSamples.java @@ -12,7 +12,7 @@ */ public final class StorageAccountsCustomerInitiatedMigrationSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountPostMigration.json + * x-ms-original-file: 2026-06-01/StorageAccountPostMigration.json */ /** * Sample code: StorageAccountPostMigration. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsDeleteSamples.java index 2b524e949d6a..66ecc971e9b7 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class StorageAccountsDeleteSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountDelete.json + * x-ms-original-file: 2026-06-01/StorageAccountDelete.json */ /** * Sample code: StorageAccountDelete. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsFailoverSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsFailoverSamples.java index d5ea72ead7d1..5c218d74459f 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsFailoverSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsFailoverSamples.java @@ -11,7 +11,7 @@ */ public final class StorageAccountsFailoverSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountFailover.json + * x-ms-original-file: 2026-06-01/StorageAccountFailover.json */ /** * Sample code: StorageAccountFailover. @@ -25,7 +25,7 @@ public static void storageAccountFailover(com.azure.resourcemanager.storage.Stor } /* - * x-ms-original-file: 2026-09-01/StorageAccountFailoverPlanned.json + * x-ms-original-file: 2026-06-01/StorageAccountFailoverPlanned.json */ /** * Sample code: StorageAccountFailoverPlanned. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsGetByResourceGroupSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsGetByResourceGroupSamples.java index 7f03894bab30..da983e5a649b 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsGetByResourceGroupSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsGetByResourceGroupSamples.java @@ -11,7 +11,7 @@ */ public final class StorageAccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json + * x-ms-original-file: 2026-06-01/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json */ /** * Sample code: StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue. @@ -27,7 +27,7 @@ public static void storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue } /* - * x-ms-original-file: 2026-09-01/StorageAccountGetProperties.json + * x-ms-original-file: 2026-06-01/StorageAccountGetProperties.json */ /** * Sample code: StorageAccountGetProperties. @@ -41,7 +41,7 @@ public static void storageAccountGetProperties(com.azure.resourcemanager.storage } /* - * x-ms-original-file: 2026-09-01/StorageAccountGetPropertiesCMKVersionExpirationTime.json + * x-ms-original-file: 2026-06-01/StorageAccountGetPropertiesCMKVersionExpirationTime.json */ /** * Sample code: StorageAccountGetPropertiesCMKVersionExpirationTime. @@ -56,7 +56,7 @@ public static void storageAccountGetProperties(com.azure.resourcemanager.storage } /* - * x-ms-original-file: 2026-09-01/StorageAccountGetPropertiesGeoReplicationStatscanFailoverFalse.json + * x-ms-original-file: 2026-06-01/StorageAccountGetPropertiesGeoReplicationStatscanFailoverFalse.json */ /** * Sample code: StorageAccountGetPropertiesGeoReplicationStatscanFailoverFalse. @@ -72,7 +72,7 @@ public static void storageAccountGetPropertiesGeoReplicationStatscanFailoverFals } /* - * x-ms-original-file: 2026-09-01/StorageAccountGetAsyncSkuConversionStatus.json + * x-ms-original-file: 2026-06-01/StorageAccountGetAsyncSkuConversionStatus.json */ /** * Sample code: StorageAccountGetAsyncSkuConversionStatus. @@ -87,7 +87,7 @@ public static void storageAccountGetPropertiesGeoReplicationStatscanFailoverFals } /* - * x-ms-original-file: 2026-09-01/StorageAccountGetPropertiesCMKEnabled.json + * x-ms-original-file: 2026-06-01/StorageAccountGetPropertiesCMKEnabled.json */ /** * Sample code: StorageAccountGetPropertiesCMKEnabled. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsGetCustomerInitiatedMigrationSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsGetCustomerInitiatedMigrationSamples.java index 3ff537ed87e8..6f327dab7f92 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsGetCustomerInitiatedMigrationSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsGetCustomerInitiatedMigrationSamples.java @@ -11,7 +11,7 @@ */ public final class StorageAccountsGetCustomerInitiatedMigrationSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountGetMigrationInProgress.json + * x-ms-original-file: 2026-06-01/StorageAccountGetMigrationInProgress.json */ /** * Sample code: StorageAccountGetMigrationInProgress. @@ -26,7 +26,7 @@ public static void storageAccountGetMigrationInProgress(com.azure.resourcemanage } /* - * x-ms-original-file: 2026-09-01/StorageAccountGetMigrationFailed.json + * x-ms-original-file: 2026-06-01/StorageAccountGetMigrationFailed.json */ /** * Sample code: StorageAccountGetMigrationFailed. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsHierarchicalNamespaceMigrationSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsHierarchicalNamespaceMigrationSamples.java index a88cd9c5c900..38cadf9f3d4e 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsHierarchicalNamespaceMigrationSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsHierarchicalNamespaceMigrationSamples.java @@ -9,7 +9,7 @@ */ public final class StorageAccountsHierarchicalNamespaceMigrationSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountHierarchicalNamespaceMigration.json + * x-ms-original-file: 2026-06-01/StorageAccountHierarchicalNamespaceMigration.json */ /** * Sample code: StorageAccountHierarchicalNamespaceMigration. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListAccountSasSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListAccountSasSamples.java index ac8a6c5ae13b..d8b896c8c942 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListAccountSasSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListAccountSasSamples.java @@ -16,7 +16,7 @@ */ public final class StorageAccountsListAccountSasSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountListAccountSAS.json + * x-ms-original-file: 2026-06-01/StorageAccountListAccountSAS.json */ /** * Sample code: StorageAccountListAccountSAS. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListByResourceGroupSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListByResourceGroupSamples.java index 22df5a96a42d..fb58fc9afbd0 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListByResourceGroupSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class StorageAccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountListByResourceGroup.json + * x-ms-original-file: 2026-06-01/StorageAccountListByResourceGroup.json */ /** * Sample code: StorageAccountListByResourceGroup. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListKeysSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListKeysSamples.java index 17f47a869d19..30b70b90991e 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListKeysSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListKeysSamples.java @@ -9,7 +9,7 @@ */ public final class StorageAccountsListKeysSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountListKeys.json + * x-ms-original-file: 2026-06-01/StorageAccountListKeys.json */ /** * Sample code: StorageAccountListKeys. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListSamples.java index 87a087be607a..8c2655289e10 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListSamples.java @@ -9,7 +9,7 @@ */ public final class StorageAccountsListSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountList.json + * x-ms-original-file: 2026-06-01/StorageAccountList.json */ /** * Sample code: StorageAccountList. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListServiceSasSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListServiceSasSamples.java index 39bf9a185a11..3df6cd40e95c 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListServiceSasSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsListServiceSasSamples.java @@ -14,7 +14,7 @@ */ public final class StorageAccountsListServiceSasSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountListServiceSAS.json + * x-ms-original-file: 2026-06-01/StorageAccountListServiceSAS.json */ /** * Sample code: StorageAccountListServiceSAS. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRegenerateKeySamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRegenerateKeySamples.java index 0c22981cf327..e1c6964dec61 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRegenerateKeySamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRegenerateKeySamples.java @@ -11,7 +11,7 @@ */ public final class StorageAccountsRegenerateKeySamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountRegenerateKey.json + * x-ms-original-file: 2026-06-01/StorageAccountRegenerateKey.json */ /** * Sample code: StorageAccountRegenerateKey. @@ -27,7 +27,7 @@ public static void storageAccountRegenerateKey(com.azure.resourcemanager.storage } /* - * x-ms-original-file: 2026-09-01/StorageAccountRegenerateKerbKey.json + * x-ms-original-file: 2026-06-01/StorageAccountRegenerateKerbKey.json */ /** * Sample code: StorageAccountRegenerateKerbKey. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRestoreBlobRangesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRestoreBlobRangesSamples.java index b848c0f00865..8adf5297701a 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRestoreBlobRangesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRestoreBlobRangesSamples.java @@ -14,7 +14,7 @@ */ public final class StorageAccountsRestoreBlobRangesSamples { /* - * x-ms-original-file: 2026-09-01/BlobRangesRestore.json + * x-ms-original-file: 2026-06-01/BlobRangesRestore.json */ /** * Sample code: BlobRangesRestore. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRevokeUserDelegationKeysSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRevokeUserDelegationKeysSamples.java index b797f6849614..d93c44a80e29 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRevokeUserDelegationKeysSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsRevokeUserDelegationKeysSamples.java @@ -9,7 +9,7 @@ */ public final class StorageAccountsRevokeUserDelegationKeysSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountRevokeUserDelegationKeys.json + * x-ms-original-file: 2026-06-01/StorageAccountRevokeUserDelegationKeys.json */ /** * Sample code: StorageAccountRevokeUserDelegationKeys. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsUpdateSamples.java index 69ba2959fa2a..2d8782073a8b 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageAccountsUpdateSamples.java @@ -46,8 +46,6 @@ import com.azure.resourcemanager.storage.models.StorageAccountSharedKeyAccessProperties; import com.azure.resourcemanager.storage.models.StorageAccountUpdateParameters; import com.azure.resourcemanager.storage.models.StorageDataCollaborationPolicyProperties; -import com.azure.resourcemanager.storage.models.TurboTier; -import com.azure.resourcemanager.storage.models.TurboTierStatus; import com.azure.resourcemanager.storage.models.UserAssignedIdentity; import com.azure.resourcemanager.storage.models.ZonePlacementPolicy; import java.util.Arrays; @@ -59,7 +57,7 @@ */ public final class StorageAccountsUpdateSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateWithImmutabilityPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdateWithImmutabilityPolicy.json */ /** * Sample code: StorageAccountUpdateWithImmutabilityPolicy. @@ -81,7 +79,7 @@ public final class StorageAccountsUpdateSamples { } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json */ /** * Sample code: StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId. @@ -114,7 +112,7 @@ public static void storageAccountUpdateUserAssignedIdentityWithFederatedIdentity } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdate_placement.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdate_placement.json */ /** * Sample code: StorageAccountUpdate_placement. @@ -155,7 +153,7 @@ public static void storageAccountUpdatePlacement(com.azure.resourcemanager.stora } /* - * x-ms-original-file: 2026-09-01/StorageAccountEnableSmbOAuth.json + * x-ms-original-file: 2026-06-01/StorageAccountEnableSmbOAuth.json */ /** * Sample code: StorageAccountEnableSmbOAuth. @@ -174,7 +172,7 @@ public static void storageAccountEnableSmbOAuth(com.azure.resourcemanager.storag } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateWithDataCollaborationPolicy.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdateWithDataCollaborationPolicy.json */ /** * Sample code: StorageAccountUpdateWithDataCollaborationPolicy. @@ -194,7 +192,7 @@ public static void storageAccountEnableSmbOAuth(com.azure.resourcemanager.storag } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateDisablePublicNetworkAccess.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdateDisablePublicNetworkAccess.json */ /** * Sample code: StorageAccountUpdateDisablePublicNetworkAccess. @@ -232,7 +230,7 @@ public static void storageAccountEnableSmbOAuth(com.azure.resourcemanager.storag } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdate_zones.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdate_zones.json */ /** * Sample code: StorageAccountUpdate_zones. @@ -272,7 +270,7 @@ public static void storageAccountUpdateZones(com.azure.resourcemanager.storage.S } /* - * x-ms-original-file: 2026-09-01/StorageAccountLeverageIPv6Ability.json + * x-ms-original-file: 2026-06-01/StorageAccountLeverageIPv6Ability.json */ /** * Sample code: StorageAccountUpdateEnableIpv6Features. @@ -294,22 +292,7 @@ public static void storageAccountUpdateZones(com.azure.resourcemanager.storage.S } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateDisableTurboTier.json - */ - /** - * Sample code: StorageAccountUpdateDisableTurboTier. - * - * @param manager Entry point to StorageManager. - */ - public static void storageAccountUpdateDisableTurboTier(com.azure.resourcemanager.storage.StorageManager manager) { - manager.serviceClient() - .getStorageAccounts() - .updateWithResponse("res9407", "staturbocontoso01", new StorageAccountUpdateParameters() - .withTurboTier(new TurboTier().withStatus(TurboTierStatus.DISABLED)), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-09-01/StorageAccountEnableAD.json + * x-ms-original-file: 2026-06-01/StorageAccountEnableAD.json */ /** * Sample code: StorageAccountEnableAD. @@ -334,7 +317,7 @@ public static void storageAccountEnableAD(com.azure.resourcemanager.storage.Stor } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateAllowedCopyScopeToAAD.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdateAllowedCopyScopeToAAD.json */ /** * Sample code: StorageAccountUpdateAllowedCopyScopeToAAD. @@ -372,7 +355,7 @@ public static void storageAccountEnableAD(com.azure.resourcemanager.storage.Stor } /* - * x-ms-original-file: 2026-09-01/StorageAccountEnableCMK.json + * x-ms-original-file: 2026-06-01/StorageAccountEnableCMK.json */ /** * Sample code: StorageAccountEnableCMK. @@ -395,7 +378,7 @@ public static void storageAccountEnableCMK(com.azure.resourcemanager.storage.Sto } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdate.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdate.json */ /** * Sample code: StorageAccountUpdate. @@ -445,7 +428,7 @@ public static void storageAccountUpdate(com.azure.resourcemanager.storage.Storag } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateAccessTierToSmart.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdateAccessTierToSmart.json */ /** * Sample code: StorageAccountUpdateAccessTierToSmart. @@ -487,7 +470,7 @@ public static void storageAccountUpdateAccessTierToSmart(com.azure.resourcemanag } /* - * x-ms-original-file: 2026-09-01/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json + * x-ms-original-file: 2026-06-01/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json */ /** * Sample code: StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentInstancesReportListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentInstancesReportListSamples.java index aa474ba9336f..bbad926e0d58 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentInstancesReportListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentInstancesReportListSamples.java @@ -9,7 +9,7 @@ */ public final class StorageTaskAssignmentInstancesReportListSamples { /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json */ /** * Sample code: ListStorageTaskAssignmentInstancesReportSummary. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsCreateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsCreateSamples.java index 2fe196279559..ce24281bd1f3 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsCreateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsCreateSamples.java @@ -20,7 +20,7 @@ */ public final class StorageTaskAssignmentsCreateSamples { /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json */ /** * Sample code: PutStorageTaskAssignment. @@ -46,7 +46,7 @@ public static void putStorageTaskAssignment(com.azure.resourcemanager.storage.St } /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsCrud/PutStorageTaskAssignmentMockRun.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsCrud/PutStorageTaskAssignmentMockRun.json */ /** * Sample code: PutStorageTaskAssignmentMockRun. @@ -72,7 +72,7 @@ public static void putStorageTaskAssignmentMockRun(com.azure.resourcemanager.sto } /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json */ /** * Sample code: PutStorageTaskAssignmentRequiredProperties. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsDeleteSamples.java index 79d0ccef3605..1f482a2a4402 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class StorageTaskAssignmentsDeleteSamples { /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json */ /** * Sample code: DeleteStorageTaskAssignment. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsGetSamples.java index b80eb0591161..b4bcd411ba4a 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class StorageTaskAssignmentsGetSamples { /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json */ /** * Sample code: GetStorageTaskAssignment. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsInstancesReportListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsInstancesReportListSamples.java index 8218dcf06ad3..07f63e7c8781 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsInstancesReportListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsInstancesReportListSamples.java @@ -9,7 +9,7 @@ */ public final class StorageTaskAssignmentsInstancesReportListSamples { /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json */ /** * Sample code: ListStorageTaskAssignmentsInstancesReportSummary. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsListSamples.java index fc357ee20b2a..429c71d1ed02 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsListSamples.java @@ -9,7 +9,7 @@ */ public final class StorageTaskAssignmentsListSamples { /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json */ /** * Sample code: ListStorageTaskAssignmentsForAccount. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsStopAssignmentSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsStopAssignmentSamples.java index 0dc11dc07102..272daac9d9b8 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsStopAssignmentSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsStopAssignmentSamples.java @@ -9,7 +9,7 @@ */ public final class StorageTaskAssignmentsStopAssignmentSamples { /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsCrud/StopStorageTaskAssignment.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsCrud/StopStorageTaskAssignment.json */ /** * Sample code: StopStorageTaskAssignment. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsUpdateSamples.java index 4ec3de68c374..7a87527d9594 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/StorageTaskAssignmentsUpdateSamples.java @@ -20,7 +20,7 @@ */ public final class StorageTaskAssignmentsUpdateSamples { /* - * x-ms-original-file: 2026-09-01/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json + * x-ms-original-file: 2026-06-01/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json */ /** * Sample code: PatchStorageTaskAssignment. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableCreateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableCreateSamples.java index 894e7d4c0a7b..49f64e3c58ac 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableCreateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableCreateSamples.java @@ -15,7 +15,7 @@ */ public final class TableCreateSamples { /* - * x-ms-original-file: 2026-09-01/TableOperationPut.json + * x-ms-original-file: 2026-06-01/TableOperationPut.json */ /** * Sample code: TableOperationPut. @@ -29,7 +29,7 @@ public static void tableOperationPut(com.azure.resourcemanager.storage.StorageMa } /* - * x-ms-original-file: 2026-09-01/TableOperationPutOrPatchAclsTableCreate.json + * x-ms-original-file: 2026-06-01/TableOperationPutOrPatchAclsTableCreate.json */ /** * Sample code: TableOperationPutOrPatchAcls. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableDeleteSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableDeleteSamples.java index b016b64f8e0c..983c2bb9d467 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableDeleteSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class TableDeleteSamples { /* - * x-ms-original-file: 2026-09-01/TableOperationDelete.json + * x-ms-original-file: 2026-06-01/TableOperationDelete.json */ /** * Sample code: TableOperationDelete. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableGetSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableGetSamples.java index d34a1484be37..a117a424d07a 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableGetSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableGetSamples.java @@ -9,7 +9,7 @@ */ public final class TableGetSamples { /* - * x-ms-original-file: 2026-09-01/TableOperationGet.json + * x-ms-original-file: 2026-06-01/TableOperationGet.json */ /** * Sample code: TableOperationGet. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableListSamples.java index fd050188e5a5..57add6e3272d 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableListSamples.java @@ -9,7 +9,7 @@ */ public final class TableListSamples { /* - * x-ms-original-file: 2026-09-01/TableOperationList.json + * x-ms-original-file: 2026-06-01/TableOperationList.json */ /** * Sample code: TableOperationList. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesGetServicePropertiesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesGetServicePropertiesSamples.java index 438de46d3492..fb2324eb9b65 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesGetServicePropertiesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesGetServicePropertiesSamples.java @@ -9,7 +9,7 @@ */ public final class TableServicesGetServicePropertiesSamples { /* - * x-ms-original-file: 2026-09-01/TableServicesGet.json + * x-ms-original-file: 2026-06-01/TableServicesGet.json */ /** * Sample code: TableServicesGet. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesListSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesListSamples.java index af587c91cd04..e8600ef09d8d 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesListSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesListSamples.java @@ -9,7 +9,7 @@ */ public final class TableServicesListSamples { /* - * x-ms-original-file: 2026-09-01/TableServicesList.json + * x-ms-original-file: 2026-06-01/TableServicesList.json */ /** * Sample code: TableServicesList. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesSetServicePropertiesSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesSetServicePropertiesSamples.java index a2cd3c076792..fba491e4ca15 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesSetServicePropertiesSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableServicesSetServicePropertiesSamples.java @@ -15,7 +15,7 @@ */ public final class TableServicesSetServicePropertiesSamples { /* - * x-ms-original-file: 2026-09-01/TableServicesPut.json + * x-ms-original-file: 2026-06-01/TableServicesPut.json */ /** * Sample code: TableServicesPut. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableUpdateSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableUpdateSamples.java index dc4cd9e79f5c..fdbc2baeaac7 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableUpdateSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/TableUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class TableUpdateSamples { /* - * x-ms-original-file: 2026-09-01/TableOperationPutOrPatchAcls.json + * x-ms-original-file: 2026-06-01/TableOperationPutOrPatchAcls.json */ /** * Sample code: TableOperationPutOrPatchAcls. @@ -43,7 +43,7 @@ public static void tableOperationPutOrPatchAcls(com.azure.resourcemanager.storag } /* - * x-ms-original-file: 2026-09-01/TableOperationPatch.json + * x-ms-original-file: 2026-06-01/TableOperationPatch.json */ /** * Sample code: TableOperationPatch. diff --git a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/UsagesListByLocationSamples.java b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/UsagesListByLocationSamples.java index 52f3277b8db8..fa46ba3e2959 100644 --- a/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/UsagesListByLocationSamples.java +++ b/sdk/storage/azure-resourcemanager-storage/src/samples/java/com/azure/resourcemanager/storage/generated/UsagesListByLocationSamples.java @@ -9,7 +9,7 @@ */ public final class UsagesListByLocationSamples { /* - * x-ms-original-file: 2026-09-01/StorageAccountListLocationUsage.json + * x-ms-original-file: 2026-06-01/StorageAccountListLocationUsage.json */ /** * Sample code: UsageList. diff --git a/sdk/storage/azure-resourcemanager-storage/tsp-location.yaml b/sdk/storage/azure-resourcemanager-storage/tsp-location.yaml index fa89ce2025b5..7157eecd2483 100644 --- a/sdk/storage/azure-resourcemanager-storage/tsp-location.yaml +++ b/sdk/storage/azure-resourcemanager-storage/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/storage/resource-manager/Microsoft.Storage/Storage -commit: fd6b671904429f73310b882648f81346b05024d1 +directory: specification/storage/Storage.Management +commit: ec4027ffadfa8c62280acab86dfdc91d51844fc9 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/pom.xml b/sdk/storagemover/azure-resourcemanager-storagemover/pom.xml index 4ecfabd7af9b..83f6f3bfd2e0 100644 --- a/sdk/storagemover/azure-resourcemanager-storagemover/pom.xml +++ b/sdk/storagemover/azure-resourcemanager-storagemover/pom.xml @@ -78,7 +78,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.62.0 + 2.61.2 test @@ -90,7 +90,7 @@ com.azure.resourcemanager azure-resourcemanager-storage - 2.59.0 + 2.58.2 test diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/CHANGELOG.md b/sdk/synapse/azure-analytics-synapse-accesscontrol/CHANGELOG.md new file mode 100644 index 000000000000..6298535befe9 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/CHANGELOG.md @@ -0,0 +1,42 @@ +# Release History + +## 1.0.0-beta.5 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.4 (2021-08-10) +- Update to 2020-12-01 API version + +## 1.0.0-beta.3 (2021-04-06) + +### Breaking Changes +- `listRoleAssignmentsWithResponse()` now returns `RoleAssignmentsListRoleAssignmentsResponse` + +### Dependency Updates +- Update azure-core to 1.15.0 + +## 1.0.0-beta.2 (2021-02-09) + +- Support specifying the service API version. (AutoRest update) +- Send missing "Accept" request headers + +## 1.0.0-beta.1 (2020-12-08) + +Version 1.0.0-beta.1 is a beta of our efforts in creating an Azure Synapse Access Control client library that is developer-friendly, idiomatic to +the Java ecosystem, and as consistent across different languages and platforms as possible. The principles that guide +our efforts can be found in the +[Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java_introduction.html). + +### New Features + +- It uses Azure Synapse 2019-08-01-preview API +- Two client design: + - `RoleDefinitionsClient` to manage role definitions in Synapse + - `RoleAssignmentsClient` to manage role assignments in Synapse +- Reactive streams support using [Project Reactor](https://projectreactor.io/) diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/README.md b/sdk/synapse/azure-analytics-synapse-accesscontrol/README.md new file mode 100644 index 000000000000..72b3a4605e4e --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/README.md @@ -0,0 +1,111 @@ +# Azure Synapse Access Control client library for Java +Azure Synapse is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics. It gives you the freedom to query data on your terms, using either serverless on-demand or provisioned resources—at scale. Azure Synapse brings these two worlds together with a unified experience to ingest, prepare, manage, and serve data for immediate BI and machine learning needs. + +The Azure Synapse Analytics access control client library enables programmatically managing role assignments. + +[Source code][source_code] | [API reference documentation][api_documentation] | [Product documentation][azsynapse_docs] + +## Getting started +### Adding the package to your project +Maven dependency for the Azure Synapse Access Control client library. Add it to your project's POM file. + +[//]: # ({x-version-update-start;com.azure:azure-analytics-synapse-accesscontrol;current}) +```xml + + com.azure + azure-analytics-synapse-accesscontrol + 1.0.0-beta.5 + +``` +[//]: # ({x-version-update-end}) + +### Prerequisites +- [Java Development Kit (JDK)][jdk] with version 8 or above +- An [Azure subscription][azure_sub]. +- An existing Azure Synapse workspace. If you need to create an Azure Synapse workspace, you can use the Azure Portal or [Azure CLI][azure_cli]. + ```Bash + az synapse workspace create \ + --name \ + --resource-group \ + --storage-account \ + --file-system \ + --sql-admin-login-user \ + --sql-admin-login-password \ + --location + ``` + +### Authenticate the client +In order to interact with the Azure Synapse service, you'll need to create an instance of the `RoleDefinitionsClient` or `RoleAssignmentsClient` class. You would need a **workspace endpoint** and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object using the default `DefaultAzureCredential` examples shown in this document. + +The `DefaultAzureCredential` way of authentication by providing client secret credentials is being used in this getting started section but you can find more ways to authenticate with [azure-identity][azure_identity]. + +#### Create/Get credentials +To create/get client secret credentials you can use the [Azure Portal][azure_create_application_in_portal], [Azure CLI][azure_synapse_cli_full] or [Azure Cloud Shell](https://shell.azure.com/bash) + +Here is an [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to + + * Create a service principal and configure its access to Azure resources: + + ```Bash + az ad sp create-for-rbac -n --skip-assignment + ``` + + Output: + + ```json + { + "appId": "generated-app-ID", + "displayName": "dummy-app-name", + "name": "http://dummy-app-name", + "password": "random-password", + "tenant": "tenant-ID" + } + ``` + +## Key concepts + +(coming soon) + +## Examples + +(coming soon) + +## Troubleshooting + +### Default HTTP client +All client libraries by default use the Netty HTTP client. Adding the above dependency will automatically configure the client library to use the Netty HTTP client. Configuring or changing the HTTP client is detailed in the [HTTP clients wiki](https://learn.microsoft.com/azure/developer/java/sdk/http-client-pipeline#http-clients). + +### Default SSL library +All client libraries, by default, use the Tomcat-native Boring SSL library to enable native-level performance for SSL operations. The Boring SSL library is an Uber JAR containing native libraries for Linux / macOS / Windows, and provides better performance compared to the default SSL implementation within the JDK. For more information, including how to reduce the dependency size, refer to the [performance tuning][performance_tuning] section of the wiki. + +## Next steps +Several Synapse Java SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Azure Synapse Analytics. + +### Additional documentation +For more extensive documentation on Azure Synapse Analytics, see the [API reference documentation][azsynapse_rest]. + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact with any additional questions or comments. + + +[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/synapse/azure-analytics-synapse-accesscontrol/src +[api_documentation]: https://azure.github.io/azure-sdk-for-java +[azsynapse_docs]: https://learn.microsoft.com/azure/synapse-analytics/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/?view=azure-java-stable +[azure_sub]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity +[maven]: https://maven.apache.org/ +[azure_subscription]: https://azure.microsoft.com/ +[azure_synapse]: https://learn.microsoft.com/azure/synapse-analytics/quickstart-create-workspace +[azure_cli]: https://learn.microsoft.com/cli/azure +[rest_api]: https://learn.microsoft.com/rest/api/synapse/ +[azsynapse_rest]: https://learn.microsoft.com/rest/api/synapse/ +[azure_create_application_in_portal]: https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +[azure_synapse_cli_full]: https://learn.microsoft.com/cli/azure/synapse?view=azure-cli-latest +[performance_tuning]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/performance-tuning.md + diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/checkstyle-suppressions.xml b/sdk/synapse/azure-analytics-synapse-accesscontrol/checkstyle-suppressions.xml new file mode 100644 index 000000000000..ebf68622f6f8 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/checkstyle-suppressions.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml b/sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml new file mode 100644 index 000000000000..3732f9c3caa2 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-analytics-synapse-accesscontrol + 1.0.0-beta.5 + + Microsoft Azure client library for Synapse Access Control + This package contains the Microsoft Azure Synapse Analytics Access Control SDK. + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + true + + false + + + + + com.azure + azure-json + 1.5.1 + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/spotbugs-exclude.xml b/sdk/synapse/azure-analytics-synapse-accesscontrol/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/AccessControlClientBuilder.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/AccessControlClientBuilder.java new file mode 100644 index 000000000000..19e0b4fd5cf2 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/AccessControlClientBuilder.java @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol; + +import com.azure.analytics.synapse.accesscontrol.implementation.AccessControlClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the AccessControlClient type. + */ +@ServiceClientBuilder( + serviceClients = { + RoleAssignmentsClient.class, + RoleDefinitionsClient.class, + RoleAssignmentsAsyncClient.class, + RoleDefinitionsAsyncClient.class }) +public final class AccessControlClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://dev.azuresynapse.net/.default" }; + + @Generated + private static final Map PROPERTIES = new HashMap<>(); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the AccessControlClientBuilder. + */ + @Generated + public AccessControlClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccessControlClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccessControlClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccessControlClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccessControlClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccessControlClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccessControlClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccessControlClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccessControlClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AccessControlClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Api Version + */ + @Generated + private String apiVersion; + + /** + * Sets Api Version. + * + * @param apiVersion the apiVersion value. + * @return the AccessControlClientBuilder. + */ + @Generated + public AccessControlClientBuilder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + @Generated + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the AccessControlClientBuilder. + */ + @Generated + public AccessControlClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the AccessControlClientBuilder. + */ + @Generated + public AccessControlClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of AccessControlClientImpl with the provided parameters. + * + * @return an instance of AccessControlClientImpl. + */ + @Generated + private AccessControlClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + String localApiVersion = (apiVersion != null) ? apiVersion : "2020-12-01"; + SerializerAdapter localSerializerAdapter + = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); + AccessControlClientImpl client + = new AccessControlClientImpl(localPipeline, localSerializerAdapter, this.endpoint, localApiVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of RoleAssignmentsAsyncClient class. + * + * @return an instance of RoleAssignmentsAsyncClient. + */ + @Generated + public RoleAssignmentsAsyncClient buildRoleAssignmentsAsyncClient() { + return new RoleAssignmentsAsyncClient(buildInnerClient().getRoleAssignments()); + } + + /** + * Builds an instance of RoleDefinitionsAsyncClient class. + * + * @return an instance of RoleDefinitionsAsyncClient. + */ + @Generated + public RoleDefinitionsAsyncClient buildRoleDefinitionsAsyncClient() { + return new RoleDefinitionsAsyncClient(buildInnerClient().getRoleDefinitions()); + } + + /** + * Builds an instance of RoleAssignmentsClient class. + * + * @return an instance of RoleAssignmentsClient. + */ + @Generated + public RoleAssignmentsClient buildRoleAssignmentsClient() { + return new RoleAssignmentsClient(buildInnerClient().getRoleAssignments()); + } + + /** + * Builds an instance of RoleDefinitionsClient class. + * + * @return an instance of RoleDefinitionsClient. + */ + @Generated + public RoleDefinitionsClient buildRoleDefinitionsClient() { + return new RoleDefinitionsClient(buildInnerClient().getRoleDefinitions()); + } + + private static final ClientLogger LOGGER = new ClientLogger(AccessControlClientBuilder.class); +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleAssignmentsAsyncClient.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleAssignmentsAsyncClient.java new file mode 100644 index 000000000000..ed25692ce9bb --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleAssignmentsAsyncClient.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.analytics.synapse.accesscontrol; + +import com.azure.analytics.synapse.accesscontrol.implementation.RoleAssignmentsImpl; +import com.azure.analytics.synapse.accesscontrol.models.CheckPrincipalAccessResponse; +import com.azure.analytics.synapse.accesscontrol.models.ErrorContractException; +import com.azure.analytics.synapse.accesscontrol.models.RequiredAction; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentDetails; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentDetailsList; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentsListRoleAssignmentsHeaders; +import com.azure.analytics.synapse.accesscontrol.models.SubjectInfo; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import java.util.List; +import java.util.UUID; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AccessControlClient type. + */ +@ServiceClient(builder = AccessControlClientBuilder.class, isAsync = true) +public final class RoleAssignmentsAsyncClient { + @Generated + private final RoleAssignmentsImpl serviceClient; + + /** + * Initializes an instance of RoleAssignmentsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + RoleAssignmentsAsyncClient(RoleAssignmentsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkPrincipalAccessWithResponse(SubjectInfo subject, + List actions, String scope) { + return this.serviceClient.checkPrincipalAccessWithResponseAsync(subject, actions, scope); + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkPrincipalAccess(SubjectInfo subject, List actions, + String scope) { + return this.serviceClient.checkPrincipalAccessAsync(subject, actions, scope); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + listRoleAssignmentsWithResponse(String roleId, String principalId, String scope, String continuationToken) { + return this.serviceClient.listRoleAssignmentsWithResponseAsync(roleId, principalId, scope, continuationToken); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listRoleAssignments(String roleId, String principalId, String scope, + String continuationToken) { + return this.serviceClient.listRoleAssignmentsAsync(roleId, principalId, scope, continuationToken); + } + + /** + * List role assignments. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listRoleAssignments() { + return this.serviceClient.listRoleAssignmentsAsync(); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listRoleAssignmentsNoCustomHeadersWithResponse(String roleId, + String principalId, String scope, String continuationToken) { + return this.serviceClient.listRoleAssignmentsNoCustomHeadersWithResponseAsync(roleId, principalId, scope, + continuationToken); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createRoleAssignmentWithResponse(String roleAssignmentId, UUID roleId, + UUID principalId, String scope, String principalType) { + return this.serviceClient.createRoleAssignmentWithResponseAsync(roleAssignmentId, roleId, principalId, scope, + principalType); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRoleAssignment(String roleAssignmentId, UUID roleId, UUID principalId, + String scope, String principalType) { + return this.serviceClient.createRoleAssignmentAsync(roleAssignmentId, roleId, principalId, scope, + principalType); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRoleAssignment(String roleAssignmentId, UUID roleId, UUID principalId, + String scope) { + return this.serviceClient.createRoleAssignmentAsync(roleAssignmentId, roleId, principalId, scope); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRoleAssignmentByIdWithResponse(String roleAssignmentId) { + return this.serviceClient.getRoleAssignmentByIdWithResponseAsync(roleAssignmentId); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRoleAssignmentById(String roleAssignmentId) { + return this.serviceClient.getRoleAssignmentByIdAsync(roleAssignmentId); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteRoleAssignmentByIdWithResponse(String roleAssignmentId, String scope) { + return this.serviceClient.deleteRoleAssignmentByIdWithResponseAsync(roleAssignmentId, scope); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteRoleAssignmentById(String roleAssignmentId, String scope) { + return this.serviceClient.deleteRoleAssignmentByIdAsync(roleAssignmentId, scope); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteRoleAssignmentById(String roleAssignmentId) { + return this.serviceClient.deleteRoleAssignmentByIdAsync(roleAssignmentId); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleAssignmentsClient.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleAssignmentsClient.java new file mode 100644 index 000000000000..7413d78a6bac --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleAssignmentsClient.java @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol; + +import com.azure.analytics.synapse.accesscontrol.implementation.RoleAssignmentsImpl; +import com.azure.analytics.synapse.accesscontrol.models.CheckPrincipalAccessResponse; +import com.azure.analytics.synapse.accesscontrol.models.ErrorContractException; +import com.azure.analytics.synapse.accesscontrol.models.RequiredAction; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentDetails; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentDetailsList; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentsListRoleAssignmentsHeaders; +import com.azure.analytics.synapse.accesscontrol.models.SubjectInfo; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.Context; +import java.util.List; +import java.util.UUID; + +/** + * Initializes a new instance of the synchronous AccessControlClient type. + */ +@ServiceClient(builder = AccessControlClientBuilder.class) +public final class RoleAssignmentsClient { + @Generated + private final RoleAssignmentsImpl serviceClient; + + /** + * Initializes an instance of RoleAssignmentsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + RoleAssignmentsClient(RoleAssignmentsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkPrincipalAccessWithResponse(SubjectInfo subject, + List actions, String scope, Context context) { + return this.serviceClient.checkPrincipalAccessWithResponse(subject, actions, scope, context); + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckPrincipalAccessResponse checkPrincipalAccess(SubjectInfo subject, List actions, + String scope) { + return this.serviceClient.checkPrincipalAccess(subject, actions, scope); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listRoleAssignmentsWithResponse(String roleId, String principalId, String scope, String continuationToken, + Context context) { + return this.serviceClient.listRoleAssignmentsWithResponse(roleId, principalId, scope, continuationToken, + context); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetailsList listRoleAssignments(String roleId, String principalId, String scope, + String continuationToken) { + return this.serviceClient.listRoleAssignments(roleId, principalId, scope, continuationToken); + } + + /** + * List role assignments. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetailsList listRoleAssignments() { + return this.serviceClient.listRoleAssignments(); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listRoleAssignmentsNoCustomHeadersWithResponse(String roleId, + String principalId, String scope, String continuationToken, Context context) { + return this.serviceClient.listRoleAssignmentsNoCustomHeadersWithResponse(roleId, principalId, scope, + continuationToken, context); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createRoleAssignmentWithResponse(String roleAssignmentId, UUID roleId, + UUID principalId, String scope, String principalType, Context context) { + return this.serviceClient.createRoleAssignmentWithResponse(roleAssignmentId, roleId, principalId, scope, + principalType, context); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetails createRoleAssignment(String roleAssignmentId, UUID roleId, UUID principalId, + String scope, String principalType) { + return this.serviceClient.createRoleAssignment(roleAssignmentId, roleId, principalId, scope, principalType); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetails createRoleAssignment(String roleAssignmentId, UUID roleId, UUID principalId, + String scope) { + return this.serviceClient.createRoleAssignment(roleAssignmentId, roleId, principalId, scope); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRoleAssignmentByIdWithResponse(String roleAssignmentId, Context context) { + return this.serviceClient.getRoleAssignmentByIdWithResponse(roleAssignmentId, context); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetails getRoleAssignmentById(String roleAssignmentId) { + return this.serviceClient.getRoleAssignmentById(roleAssignmentId); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteRoleAssignmentByIdWithResponse(String roleAssignmentId, String scope, Context context) { + return this.serviceClient.deleteRoleAssignmentByIdWithResponse(roleAssignmentId, scope, context); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRoleAssignmentById(String roleAssignmentId, String scope) { + this.serviceClient.deleteRoleAssignmentById(roleAssignmentId, scope); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRoleAssignmentById(String roleAssignmentId) { + this.serviceClient.deleteRoleAssignmentById(roleAssignmentId); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleDefinitionsAsyncClient.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleDefinitionsAsyncClient.java new file mode 100644 index 000000000000..e87a4f1d907c --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleDefinitionsAsyncClient.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol; + +import com.azure.analytics.synapse.accesscontrol.implementation.RoleDefinitionsImpl; +import com.azure.analytics.synapse.accesscontrol.models.ErrorContractException; +import com.azure.analytics.synapse.accesscontrol.models.SynapseRoleDefinition; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import java.util.List; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AccessControlClient type. + */ +@ServiceClient(builder = AccessControlClientBuilder.class, isAsync = true) +public final class RoleDefinitionsAsyncClient { + @Generated + private final RoleDefinitionsImpl serviceClient; + + /** + * Initializes an instance of RoleDefinitionsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + RoleDefinitionsAsyncClient(RoleDefinitionsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> listRoleDefinitionsWithResponse(Boolean isBuiltIn, + String scope) { + return this.serviceClient.listRoleDefinitionsWithResponseAsync(isBuiltIn, scope); + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listRoleDefinitions(Boolean isBuiltIn, String scope) { + return this.serviceClient.listRoleDefinitionsAsync(isBuiltIn, scope); + } + + /** + * List role definitions. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listRoleDefinitions() { + return this.serviceClient.listRoleDefinitionsAsync(); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRoleDefinitionByIdWithResponse(String roleDefinitionId) { + return this.serviceClient.getRoleDefinitionByIdWithResponseAsync(roleDefinitionId); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRoleDefinitionById(String roleDefinitionId) { + return this.serviceClient.getRoleDefinitionByIdAsync(roleDefinitionId); + } + + /** + * List rbac scopes. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> listScopesWithResponse() { + return this.serviceClient.listScopesWithResponseAsync(); + } + + /** + * List rbac scopes. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listScopes() { + return this.serviceClient.listScopesAsync(); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleDefinitionsClient.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleDefinitionsClient.java new file mode 100644 index 000000000000..7b4fa0c4ed76 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/RoleDefinitionsClient.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol; + +import com.azure.analytics.synapse.accesscontrol.implementation.RoleDefinitionsImpl; +import com.azure.analytics.synapse.accesscontrol.models.ErrorContractException; +import com.azure.analytics.synapse.accesscontrol.models.SynapseRoleDefinition; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** + * Initializes a new instance of the synchronous AccessControlClient type. + */ +@ServiceClient(builder = AccessControlClientBuilder.class) +public final class RoleDefinitionsClient { + @Generated + private final RoleDefinitionsImpl serviceClient; + + /** + * Initializes an instance of RoleDefinitionsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + RoleDefinitionsClient(RoleDefinitionsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listRoleDefinitionsWithResponse(Boolean isBuiltIn, String scope, + Context context) { + return this.serviceClient.listRoleDefinitionsWithResponse(isBuiltIn, scope, context); + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public List listRoleDefinitions(Boolean isBuiltIn, String scope) { + return this.serviceClient.listRoleDefinitions(isBuiltIn, scope); + } + + /** + * List role definitions. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public List listRoleDefinitions() { + return this.serviceClient.listRoleDefinitions(); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRoleDefinitionByIdWithResponse(String roleDefinitionId, Context context) { + return this.serviceClient.getRoleDefinitionByIdWithResponse(roleDefinitionId, context); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SynapseRoleDefinition getRoleDefinitionById(String roleDefinitionId) { + return this.serviceClient.getRoleDefinitionById(roleDefinitionId); + } + + /** + * List rbac scopes. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listScopesWithResponse(Context context) { + return this.serviceClient.listScopesWithResponse(context); + } + + /** + * List rbac scopes. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public List listScopes() { + return this.serviceClient.listScopes(); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/AccessControlClientImpl.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/AccessControlClientImpl.java new file mode 100644 index 000000000000..bad684693c6e --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/AccessControlClientImpl.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the AccessControlClient type. + */ +public final class AccessControlClientImpl { + /** + * The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + */ + private final String endpoint; + + /** + * Gets The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The RoleAssignmentsImpl object to access its operations. + */ + private final RoleAssignmentsImpl roleAssignments; + + /** + * Gets the RoleAssignmentsImpl object to access its operations. + * + * @return the RoleAssignmentsImpl object. + */ + public RoleAssignmentsImpl getRoleAssignments() { + return this.roleAssignments; + } + + /** + * The RoleDefinitionsImpl object to access its operations. + */ + private final RoleDefinitionsImpl roleDefinitions; + + /** + * Gets the RoleDefinitionsImpl object to access its operations. + * + * @return the RoleDefinitionsImpl object. + */ + public RoleDefinitionsImpl getRoleDefinitions() { + return this.roleDefinitions; + } + + /** + * Initializes an instance of AccessControlClient client. + * + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param apiVersion Api Version. + */ + public AccessControlClientImpl(String endpoint, String apiVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion); + } + + /** + * Initializes an instance of AccessControlClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param apiVersion Api Version. + */ + public AccessControlClientImpl(HttpPipeline httpPipeline, String endpoint, String apiVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion); + } + + /** + * Initializes an instance of AccessControlClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param apiVersion Api Version. + */ + public AccessControlClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + String apiVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + this.roleAssignments = new RoleAssignmentsImpl(this); + this.roleDefinitions = new RoleDefinitionsImpl(this); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/RoleAssignmentsImpl.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/RoleAssignmentsImpl.java new file mode 100644 index 000000000000..3b2f68bb5690 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/RoleAssignmentsImpl.java @@ -0,0 +1,836 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.implementation; + +import com.azure.analytics.synapse.accesscontrol.models.CheckPrincipalAccessRequest; +import com.azure.analytics.synapse.accesscontrol.models.CheckPrincipalAccessResponse; +import com.azure.analytics.synapse.accesscontrol.models.ErrorContractException; +import com.azure.analytics.synapse.accesscontrol.models.RequiredAction; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentDetails; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentDetailsList; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentRequest; +import com.azure.analytics.synapse.accesscontrol.models.RoleAssignmentsListRoleAssignmentsHeaders; +import com.azure.analytics.synapse.accesscontrol.models.SubjectInfo; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import java.util.UUID; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in RoleAssignments. + */ +public final class RoleAssignmentsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final RoleAssignmentsService service; + + /** + * The service client containing this operation class. + */ + private final AccessControlClientImpl client; + + /** + * Initializes an instance of RoleAssignmentsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RoleAssignmentsImpl(AccessControlClientImpl client) { + this.service + = RestProxy.create(RoleAssignmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AccessControlClientRoleAssignments to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AccessControlClientRoleAssignments") + public interface RoleAssignmentsService { + @Post("/checkAccessSynapseRbac") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorContractException.class) + Mono> checkPrincipalAccess(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CheckPrincipalAccessRequest request, @HeaderParam("Accept") String accept, + Context context); + + @Get("/roleAssignments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorContractException.class) + Mono> listRoleAssignments( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @QueryParam("roleId") String roleId, @QueryParam("principalId") String principalId, + @QueryParam("scope") String scope, @HeaderParam("x-ms-continuation") String continuationToken, + @HeaderParam("Accept") String accept, Context context); + + @Get("/roleAssignments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorContractException.class) + Mono> listRoleAssignmentsNoCustomHeaders( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @QueryParam("roleId") String roleId, @QueryParam("principalId") String principalId, + @QueryParam("scope") String scope, @HeaderParam("x-ms-continuation") String continuationToken, + @HeaderParam("Accept") String accept, Context context); + + @Put("/roleAssignments/{roleAssignmentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorContractException.class) + Mono> createRoleAssignment(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("roleAssignmentId") String roleAssignmentId, + @BodyParam("application/json") RoleAssignmentRequest request, @HeaderParam("Accept") String accept, + Context context); + + @Get("/roleAssignments/{roleAssignmentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorContractException.class) + Mono> getRoleAssignmentById(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("roleAssignmentId") String roleAssignmentId, + @HeaderParam("Accept") String accept, Context context); + + @Delete("/roleAssignments/{roleAssignmentId}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ErrorContractException.class) + Mono> deleteRoleAssignmentById(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("roleAssignmentId") String roleAssignmentId, + @QueryParam("scope") String scope, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkPrincipalAccessWithResponseAsync(SubjectInfo subject, + List actions, String scope) { + return FluxUtil.withContext(context -> checkPrincipalAccessWithResponseAsync(subject, actions, scope, context)); + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkPrincipalAccessWithResponseAsync(SubjectInfo subject, + List actions, String scope, Context context) { + final String accept = "application/json, text/json"; + CheckPrincipalAccessRequest request = new CheckPrincipalAccessRequest(); + request.setSubject(subject); + request.setActions(actions); + request.setScope(scope); + return service.checkPrincipalAccess(this.client.getEndpoint(), this.client.getApiVersion(), request, accept, + context); + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkPrincipalAccessAsync(SubjectInfo subject, + List actions, String scope) { + return checkPrincipalAccessWithResponseAsync(subject, actions, scope) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkPrincipalAccessAsync(SubjectInfo subject, + List actions, String scope, Context context) { + return checkPrincipalAccessWithResponseAsync(subject, actions, scope, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkPrincipalAccessWithResponse(SubjectInfo subject, + List actions, String scope, Context context) { + return checkPrincipalAccessWithResponseAsync(subject, actions, scope, context).block(); + } + + /** + * Check if the given principalId has access to perform list of actions at a given scope. + * + * @param subject Subject details. + * @param actions List of actions. + * @param scope Scope at which the check access is done. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return check access response details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckPrincipalAccessResponse checkPrincipalAccess(SubjectInfo subject, List actions, + String scope) { + return checkPrincipalAccessWithResponse(subject, actions, scope, Context.NONE).getValue(); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + listRoleAssignmentsWithResponseAsync(String roleId, String principalId, String scope, + String continuationToken) { + return FluxUtil.withContext( + context -> listRoleAssignmentsWithResponseAsync(roleId, principalId, scope, continuationToken, context)); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + listRoleAssignmentsWithResponseAsync(String roleId, String principalId, String scope, String continuationToken, + Context context) { + final String accept = "application/json, text/json"; + return service.listRoleAssignments(this.client.getEndpoint(), this.client.getApiVersion(), roleId, principalId, + scope, continuationToken, accept, context); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listRoleAssignmentsAsync(String roleId, String principalId, String scope, + String continuationToken) { + return listRoleAssignmentsWithResponseAsync(roleId, principalId, scope, continuationToken) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List role assignments. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listRoleAssignmentsAsync() { + final String roleId = null; + final String principalId = null; + final String scope = null; + final String continuationToken = null; + return listRoleAssignmentsWithResponseAsync(roleId, principalId, scope, continuationToken) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listRoleAssignmentsAsync(String roleId, String principalId, String scope, + String continuationToken, Context context) { + return listRoleAssignmentsWithResponseAsync(roleId, principalId, scope, continuationToken, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listRoleAssignmentsWithResponse(String roleId, String principalId, String scope, String continuationToken, + Context context) { + return listRoleAssignmentsWithResponseAsync(roleId, principalId, scope, continuationToken, context).block(); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetailsList listRoleAssignments(String roleId, String principalId, String scope, + String continuationToken) { + return listRoleAssignmentsWithResponse(roleId, principalId, scope, continuationToken, Context.NONE).getValue(); + } + + /** + * List role assignments. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetailsList listRoleAssignments() { + final String roleId = null; + final String principalId = null; + final String scope = null; + final String continuationToken = null; + return listRoleAssignmentsWithResponse(roleId, principalId, scope, continuationToken, Context.NONE).getValue(); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listRoleAssignmentsNoCustomHeadersWithResponseAsync(String roleId, + String principalId, String scope, String continuationToken) { + return FluxUtil.withContext(context -> listRoleAssignmentsNoCustomHeadersWithResponseAsync(roleId, principalId, + scope, continuationToken, context)); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listRoleAssignmentsNoCustomHeadersWithResponseAsync(String roleId, + String principalId, String scope, String continuationToken, Context context) { + final String accept = "application/json, text/json"; + return service.listRoleAssignmentsNoCustomHeaders(this.client.getEndpoint(), this.client.getApiVersion(), + roleId, principalId, scope, continuationToken, accept, context); + } + + /** + * List role assignments. + * + * @param roleId Synapse Built-In Role Id. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope of the Synapse Built-in Role. + * @param continuationToken Continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listRoleAssignmentsNoCustomHeadersWithResponse(String roleId, + String principalId, String scope, String continuationToken, Context context) { + return listRoleAssignmentsNoCustomHeadersWithResponseAsync(roleId, principalId, scope, continuationToken, + context).block(); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createRoleAssignmentWithResponseAsync(String roleAssignmentId, + UUID roleId, UUID principalId, String scope, String principalType) { + return FluxUtil.withContext(context -> createRoleAssignmentWithResponseAsync(roleAssignmentId, roleId, + principalId, scope, principalType, context)); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createRoleAssignmentWithResponseAsync(String roleAssignmentId, + UUID roleId, UUID principalId, String scope, String principalType, Context context) { + final String accept = "application/json, text/json"; + RoleAssignmentRequest request = new RoleAssignmentRequest(); + request.setRoleId(roleId); + request.setPrincipalId(principalId); + request.setScope(scope); + request.setPrincipalType(principalType); + return service.createRoleAssignment(this.client.getEndpoint(), this.client.getApiVersion(), roleAssignmentId, + request, accept, context); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRoleAssignmentAsync(String roleAssignmentId, UUID roleId, UUID principalId, + String scope, String principalType) { + return createRoleAssignmentWithResponseAsync(roleAssignmentId, roleId, principalId, scope, principalType) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRoleAssignmentAsync(String roleAssignmentId, UUID roleId, UUID principalId, + String scope) { + final String principalType = null; + return createRoleAssignmentWithResponseAsync(roleAssignmentId, roleId, principalId, scope, principalType) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createRoleAssignmentAsync(String roleAssignmentId, UUID roleId, UUID principalId, + String scope, String principalType, Context context) { + return createRoleAssignmentWithResponseAsync(roleAssignmentId, roleId, principalId, scope, principalType, + context).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createRoleAssignmentWithResponse(String roleAssignmentId, UUID roleId, + UUID principalId, String scope, String principalType, Context context) { + return createRoleAssignmentWithResponseAsync(roleAssignmentId, roleId, principalId, scope, principalType, + context).block(); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @param principalType Type of the principal Id: User, Group or ServicePrincipal. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetails createRoleAssignment(String roleAssignmentId, UUID roleId, UUID principalId, + String scope, String principalType) { + return createRoleAssignmentWithResponse(roleAssignmentId, roleId, principalId, scope, principalType, + Context.NONE).getValue(); + } + + /** + * Create role assignment. + * + * @param roleAssignmentId The ID of the role assignment. + * @param roleId Role ID of the Synapse Built-In Role. + * @param principalId Object ID of the AAD principal or security-group. + * @param scope Scope at which the role assignment is created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role Assignment response details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetails createRoleAssignment(String roleAssignmentId, UUID roleId, UUID principalId, + String scope) { + final String principalType = null; + return createRoleAssignmentWithResponse(roleAssignmentId, roleId, principalId, scope, principalType, + Context.NONE).getValue(); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRoleAssignmentByIdWithResponseAsync(String roleAssignmentId) { + return FluxUtil.withContext(context -> getRoleAssignmentByIdWithResponseAsync(roleAssignmentId, context)); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRoleAssignmentByIdWithResponseAsync(String roleAssignmentId, + Context context) { + final String accept = "application/json, text/json"; + return service.getRoleAssignmentById(this.client.getEndpoint(), this.client.getApiVersion(), roleAssignmentId, + accept, context); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRoleAssignmentByIdAsync(String roleAssignmentId) { + return getRoleAssignmentByIdWithResponseAsync(roleAssignmentId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRoleAssignmentByIdAsync(String roleAssignmentId, Context context) { + return getRoleAssignmentByIdWithResponseAsync(roleAssignmentId, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRoleAssignmentByIdWithResponse(String roleAssignmentId, Context context) { + return getRoleAssignmentByIdWithResponseAsync(roleAssignmentId, context).block(); + } + + /** + * Get role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role assignment by role assignment Id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RoleAssignmentDetails getRoleAssignmentById(String roleAssignmentId) { + return getRoleAssignmentByIdWithResponse(roleAssignmentId, Context.NONE).getValue(); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteRoleAssignmentByIdWithResponseAsync(String roleAssignmentId, String scope) { + return FluxUtil + .withContext(context -> deleteRoleAssignmentByIdWithResponseAsync(roleAssignmentId, scope, context)); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteRoleAssignmentByIdWithResponseAsync(String roleAssignmentId, String scope, + Context context) { + final String accept = "application/json, text/json"; + return service.deleteRoleAssignmentById(this.client.getEndpoint(), this.client.getApiVersion(), + roleAssignmentId, scope, accept, context); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteRoleAssignmentByIdAsync(String roleAssignmentId, String scope) { + return deleteRoleAssignmentByIdWithResponseAsync(roleAssignmentId, scope).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteRoleAssignmentByIdAsync(String roleAssignmentId) { + final String scope = null; + return deleteRoleAssignmentByIdWithResponseAsync(roleAssignmentId, scope).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteRoleAssignmentByIdAsync(String roleAssignmentId, String scope, Context context) { + return deleteRoleAssignmentByIdWithResponseAsync(roleAssignmentId, scope, context) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteRoleAssignmentByIdWithResponse(String roleAssignmentId, String scope, Context context) { + return deleteRoleAssignmentByIdWithResponseAsync(roleAssignmentId, scope, context).block(); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRoleAssignmentById(String roleAssignmentId, String scope) { + deleteRoleAssignmentByIdWithResponse(roleAssignmentId, scope, Context.NONE); + } + + /** + * Delete role assignment by role assignment Id. + * + * @param roleAssignmentId The ID of the role assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRoleAssignmentById(String roleAssignmentId) { + final String scope = null; + deleteRoleAssignmentByIdWithResponse(roleAssignmentId, scope, Context.NONE); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/RoleDefinitionsImpl.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/RoleDefinitionsImpl.java new file mode 100644 index 000000000000..5d9e9c97338e --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/RoleDefinitionsImpl.java @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.implementation; + +import com.azure.analytics.synapse.accesscontrol.models.ErrorContractException; +import com.azure.analytics.synapse.accesscontrol.models.SynapseRoleDefinition; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import java.util.List; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in RoleDefinitions. + */ +public final class RoleDefinitionsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final RoleDefinitionsService service; + + /** + * The service client containing this operation class. + */ + private final AccessControlClientImpl client; + + /** + * Initializes an instance of RoleDefinitionsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RoleDefinitionsImpl(AccessControlClientImpl client) { + this.service + = RestProxy.create(RoleDefinitionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AccessControlClientRoleDefinitions to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AccessControlClientRoleDefinitions") + public interface RoleDefinitionsService { + @Get("/roleDefinitions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorContractException.class) + Mono>> listRoleDefinitions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @QueryParam("isBuiltIn") Boolean isBuiltIn, + @QueryParam("scope") String scope, @HeaderParam("Accept") String accept, Context context); + + @Get("/roleDefinitions/{roleDefinitionId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorContractException.class) + Mono> getRoleDefinitionById(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("roleDefinitionId") String roleDefinitionId, + @HeaderParam("Accept") String accept, Context context); + + @Get("/rbacScopes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorContractException.class) + Mono>> listScopes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> listRoleDefinitionsWithResponseAsync(Boolean isBuiltIn, + String scope) { + return FluxUtil.withContext(context -> listRoleDefinitionsWithResponseAsync(isBuiltIn, scope, context)); + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> listRoleDefinitionsWithResponseAsync(Boolean isBuiltIn, + String scope, Context context) { + final String accept = "application/json, text/json"; + return service.listRoleDefinitions(this.client.getEndpoint(), this.client.getApiVersion(), isBuiltIn, scope, + accept, context); + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listRoleDefinitionsAsync(Boolean isBuiltIn, String scope) { + return listRoleDefinitionsWithResponseAsync(isBuiltIn, scope).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List role definitions. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listRoleDefinitionsAsync() { + final Boolean isBuiltIn = null; + final String scope = null; + return listRoleDefinitionsWithResponseAsync(isBuiltIn, scope).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listRoleDefinitionsAsync(Boolean isBuiltIn, String scope, + Context context) { + return listRoleDefinitionsWithResponseAsync(isBuiltIn, scope, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listRoleDefinitionsWithResponse(Boolean isBuiltIn, String scope, + Context context) { + return listRoleDefinitionsWithResponseAsync(isBuiltIn, scope, context).block(); + } + + /** + * List role definitions. + * + * @param isBuiltIn Is a Synapse Built-In Role or not. + * @param scope Scope of the Synapse Built-in Role. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listRoleDefinitions(Boolean isBuiltIn, String scope) { + return listRoleDefinitionsWithResponse(isBuiltIn, scope, Context.NONE).getValue(); + } + + /** + * List role definitions. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse roles available. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listRoleDefinitions() { + final Boolean isBuiltIn = null; + final String scope = null; + return listRoleDefinitionsWithResponse(isBuiltIn, scope, Context.NONE).getValue(); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRoleDefinitionByIdWithResponseAsync(String roleDefinitionId) { + return FluxUtil.withContext(context -> getRoleDefinitionByIdWithResponseAsync(roleDefinitionId, context)); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getRoleDefinitionByIdWithResponseAsync(String roleDefinitionId, + Context context) { + final String accept = "application/json, text/json"; + return service.getRoleDefinitionById(this.client.getEndpoint(), this.client.getApiVersion(), roleDefinitionId, + accept, context); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRoleDefinitionByIdAsync(String roleDefinitionId) { + return getRoleDefinitionByIdWithResponseAsync(roleDefinitionId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getRoleDefinitionByIdAsync(String roleDefinitionId, Context context) { + return getRoleDefinitionByIdWithResponseAsync(roleDefinitionId, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRoleDefinitionByIdWithResponse(String roleDefinitionId, Context context) { + return getRoleDefinitionByIdWithResponseAsync(roleDefinitionId, context).block(); + } + + /** + * Get role definition by role definition Id. + * + * @param roleDefinitionId Synapse Built-In Role Definition Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return role definition by role definition Id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SynapseRoleDefinition getRoleDefinitionById(String roleDefinitionId) { + return getRoleDefinitionByIdWithResponse(roleDefinitionId, Context.NONE).getValue(); + } + + /** + * List rbac scopes. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> listScopesWithResponseAsync() { + return FluxUtil.withContext(context -> listScopesWithResponseAsync(context)); + } + + /** + * List rbac scopes. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> listScopesWithResponseAsync(Context context) { + final String accept = "application/json, text/json"; + return service.listScopes(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + } + + /** + * List rbac scopes. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listScopesAsync() { + return listScopesWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List rbac scopes. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listScopesAsync(Context context) { + return listScopesWithResponseAsync(context).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List rbac scopes. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listScopesWithResponse(Context context) { + return listScopesWithResponseAsync(context).block(); + } + + /** + * List rbac scopes. + * + * @throws ErrorContractException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Synapse rbac scopes available. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listScopes() { + return listScopesWithResponse(Context.NONE).getValue(); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/package-info.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/package-info.java new file mode 100644 index 000000000000..e08026f6b88f --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for AccessControlClient. + * null. + */ +package com.azure.analytics.synapse.accesscontrol.implementation; diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckAccessDecision.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckAccessDecision.java new file mode 100644 index 000000000000..c24b61ce2e43 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckAccessDecision.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Check access response details. + */ +@Fluent +public final class CheckAccessDecision implements JsonSerializable { + /* + * Access Decision. + */ + @Generated + private String accessDecision; + + /* + * Action Id. + */ + @Generated + private String actionId; + + /* + * Role Assignment response details + */ + @Generated + private RoleAssignmentDetails roleAssignment; + + /** + * Creates an instance of CheckAccessDecision class. + */ + @Generated + public CheckAccessDecision() { + } + + /** + * Get the accessDecision property: Access Decision. + * + * @return the accessDecision value. + */ + @Generated + public String getAccessDecision() { + return this.accessDecision; + } + + /** + * Set the accessDecision property: Access Decision. + * + * @param accessDecision the accessDecision value to set. + * @return the CheckAccessDecision object itself. + */ + @Generated + public CheckAccessDecision setAccessDecision(String accessDecision) { + this.accessDecision = accessDecision; + return this; + } + + /** + * Get the actionId property: Action Id. + * + * @return the actionId value. + */ + @Generated + public String getActionId() { + return this.actionId; + } + + /** + * Set the actionId property: Action Id. + * + * @param actionId the actionId value to set. + * @return the CheckAccessDecision object itself. + */ + @Generated + public CheckAccessDecision setActionId(String actionId) { + this.actionId = actionId; + return this; + } + + /** + * Get the roleAssignment property: Role Assignment response details. + * + * @return the roleAssignment value. + */ + @Generated + public RoleAssignmentDetails getRoleAssignment() { + return this.roleAssignment; + } + + /** + * Set the roleAssignment property: Role Assignment response details. + * + * @param roleAssignment the roleAssignment value to set. + * @return the CheckAccessDecision object itself. + */ + @Generated + public CheckAccessDecision setRoleAssignment(RoleAssignmentDetails roleAssignment) { + this.roleAssignment = roleAssignment; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("accessDecision", this.accessDecision); + jsonWriter.writeStringField("actionId", this.actionId); + jsonWriter.writeJsonField("roleAssignment", this.roleAssignment); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckAccessDecision from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckAccessDecision if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CheckAccessDecision. + */ + @Generated + public static CheckAccessDecision fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckAccessDecision deserializedCheckAccessDecision = new CheckAccessDecision(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("accessDecision".equals(fieldName)) { + deserializedCheckAccessDecision.accessDecision = reader.getString(); + } else if ("actionId".equals(fieldName)) { + deserializedCheckAccessDecision.actionId = reader.getString(); + } else if ("roleAssignment".equals(fieldName)) { + deserializedCheckAccessDecision.roleAssignment = RoleAssignmentDetails.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckAccessDecision; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckPrincipalAccessRequest.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckPrincipalAccessRequest.java new file mode 100644 index 000000000000..41a495fd2b7a --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckPrincipalAccessRequest.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Check access request details. + */ +@Fluent +public final class CheckPrincipalAccessRequest implements JsonSerializable { + /* + * Subject details + */ + @Generated + private SubjectInfo subject; + + /* + * List of actions. + */ + @Generated + private List actions; + + /* + * Scope at which the check access is done. + */ + @Generated + private String scope; + + /** + * Creates an instance of CheckPrincipalAccessRequest class. + */ + @Generated + public CheckPrincipalAccessRequest() { + } + + /** + * Get the subject property: Subject details. + * + * @return the subject value. + */ + @Generated + public SubjectInfo getSubject() { + return this.subject; + } + + /** + * Set the subject property: Subject details. + * + * @param subject the subject value to set. + * @return the CheckPrincipalAccessRequest object itself. + */ + @Generated + public CheckPrincipalAccessRequest setSubject(SubjectInfo subject) { + this.subject = subject; + return this; + } + + /** + * Get the actions property: List of actions. + * + * @return the actions value. + */ + @Generated + public List getActions() { + return this.actions; + } + + /** + * Set the actions property: List of actions. + * + * @param actions the actions value to set. + * @return the CheckPrincipalAccessRequest object itself. + */ + @Generated + public CheckPrincipalAccessRequest setActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the scope property: Scope at which the check access is done. + * + * @return the scope value. + */ + @Generated + public String getScope() { + return this.scope; + } + + /** + * Set the scope property: Scope at which the check access is done. + * + * @param scope the scope value to set. + * @return the CheckPrincipalAccessRequest object itself. + */ + @Generated + public CheckPrincipalAccessRequest setScope(String scope) { + this.scope = scope; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("subject", this.subject); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("scope", this.scope); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckPrincipalAccessRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckPrincipalAccessRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CheckPrincipalAccessRequest. + */ + @Generated + public static CheckPrincipalAccessRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckPrincipalAccessRequest deserializedCheckPrincipalAccessRequest = new CheckPrincipalAccessRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subject".equals(fieldName)) { + deserializedCheckPrincipalAccessRequest.subject = SubjectInfo.fromJson(reader); + } else if ("actions".equals(fieldName)) { + List actions = reader.readArray(reader1 -> RequiredAction.fromJson(reader1)); + deserializedCheckPrincipalAccessRequest.actions = actions; + } else if ("scope".equals(fieldName)) { + deserializedCheckPrincipalAccessRequest.scope = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckPrincipalAccessRequest; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckPrincipalAccessResponse.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckPrincipalAccessResponse.java new file mode 100644 index 000000000000..035b7d7a7067 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/CheckPrincipalAccessResponse.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Check access response details. + */ +@Fluent +public final class CheckPrincipalAccessResponse implements JsonSerializable { + /* + * To check if the current user, group, or service principal has permission to read artifacts in the specified + * workspace. + */ + @Generated + private List accessDecisions; + + /** + * Creates an instance of CheckPrincipalAccessResponse class. + */ + @Generated + public CheckPrincipalAccessResponse() { + } + + /** + * Get the accessDecisions property: To check if the current user, group, or service principal has permission to + * read artifacts in the specified workspace. + * + * @return the accessDecisions value. + */ + @Generated + public List getAccessDecisions() { + return this.accessDecisions; + } + + /** + * Set the accessDecisions property: To check if the current user, group, or service principal has permission to + * read artifacts in the specified workspace. + * + * @param accessDecisions the accessDecisions value to set. + * @return the CheckPrincipalAccessResponse object itself. + */ + @Generated + public CheckPrincipalAccessResponse setAccessDecisions(List accessDecisions) { + this.accessDecisions = accessDecisions; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("accessDecisions", this.accessDecisions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckPrincipalAccessResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckPrincipalAccessResponse if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CheckPrincipalAccessResponse. + */ + @Generated + public static CheckPrincipalAccessResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckPrincipalAccessResponse deserializedCheckPrincipalAccessResponse = new CheckPrincipalAccessResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("accessDecisions".equals(fieldName)) { + List accessDecisions + = reader.readArray(reader1 -> CheckAccessDecision.fromJson(reader1)); + deserializedCheckPrincipalAccessResponse.accessDecisions = accessDecisions; + } else { + reader.skipChildren(); + } + } + + return deserializedCheckPrincipalAccessResponse; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorAdditionalInfo.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorAdditionalInfo.java new file mode 100644 index 000000000000..f071980cd815 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorAdditionalInfo.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The resource management error additional info. + */ +@Immutable +public final class ErrorAdditionalInfo implements JsonSerializable { + /* + * The additional info type. + */ + @Generated + private String type; + + /* + * The additional info. + */ + @Generated + private Object info; + + /** + * Creates an instance of ErrorAdditionalInfo class. + */ + @Generated + public ErrorAdditionalInfo() { + } + + /** + * Get the type property: The additional info type. + * + * @return the type value. + */ + @Generated + public String getType() { + return this.type; + } + + /** + * Get the info property: The additional info. + * + * @return the info value. + */ + @Generated + public Object getInfo() { + return this.info; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorAdditionalInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorAdditionalInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ErrorAdditionalInfo. + */ + @Generated + public static ErrorAdditionalInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ErrorAdditionalInfo deserializedErrorAdditionalInfo = new ErrorAdditionalInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedErrorAdditionalInfo.type = reader.getString(); + } else if ("info".equals(fieldName)) { + deserializedErrorAdditionalInfo.info = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedErrorAdditionalInfo; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorContract.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorContract.java new file mode 100644 index 000000000000..5c872f168c50 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorContract.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Error details. + * + * Contains details when the response code indicates an error. + */ +@Fluent +public final class ErrorContract implements JsonSerializable { + /* + * The error details. + */ + @Generated + private ErrorResponse error; + + /** + * Creates an instance of ErrorContract class. + */ + @Generated + public ErrorContract() { + } + + /** + * Get the error property: The error details. + * + * @return the error value. + */ + @Generated + public ErrorResponse getError() { + return this.error; + } + + /** + * Set the error property: The error details. + * + * @param error the error value to set. + * @return the ErrorContract object itself. + */ + @Generated + public ErrorContract setError(ErrorResponse error) { + this.error = error; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorContract from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorContract if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ErrorContract. + */ + @Generated + public static ErrorContract fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ErrorContract deserializedErrorContract = new ErrorContract(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + deserializedErrorContract.error = ErrorResponse.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedErrorContract; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorContractException.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorContractException.java new file mode 100644 index 000000000000..7ddd4e13f743 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorContractException.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** + * Exception thrown for an invalid response with ErrorContract information. + */ +public final class ErrorContractException extends HttpResponseException { + /** + * Initializes a new instance of the ErrorContractException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public ErrorContractException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorContractException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public ErrorContractException(String message, HttpResponse response, ErrorContract value) { + super(message, response, value); + } + + /** + * {@inheritDoc} + */ + @Override + public ErrorContract getValue() { + return (ErrorContract) super.getValue(); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorResponse.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorResponse.java new file mode 100644 index 000000000000..8278bdcab6d2 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/ErrorResponse.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Error Response + * + * Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also + * follows the OData error response format.). + */ +@Immutable +public final class ErrorResponse implements JsonSerializable { + /* + * The error code. + */ + @Generated + private String code; + + /* + * The error message. + */ + @Generated + private String message; + + /* + * The error target. + */ + @Generated + private String target; + + /* + * The error details. + */ + @Generated + private List details; + + /* + * The error additional info. + */ + @Generated + private List additionalInfo; + + /** + * Creates an instance of ErrorResponse class. + */ + @Generated + public ErrorResponse() { + } + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + @Generated + public String getMessage() { + return this.message; + } + + /** + * Get the target property: The error target. + * + * @return the target value. + */ + @Generated + public String getTarget() { + return this.target; + } + + /** + * Get the details property: The error details. + * + * @return the details value. + */ + @Generated + public List getDetails() { + return this.details; + } + + /** + * Get the additionalInfo property: The error additional info. + * + * @return the additionalInfo value. + */ + @Generated + public List getAdditionalInfo() { + return this.additionalInfo; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorResponse if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ErrorResponse. + */ + @Generated + public static ErrorResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ErrorResponse deserializedErrorResponse = new ErrorResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedErrorResponse.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedErrorResponse.message = reader.getString(); + } else if ("target".equals(fieldName)) { + deserializedErrorResponse.target = reader.getString(); + } else if ("details".equals(fieldName)) { + List details = reader.readArray(reader1 -> ErrorResponse.fromJson(reader1)); + deserializedErrorResponse.details = details; + } else if ("additionalInfo".equals(fieldName)) { + List additionalInfo + = reader.readArray(reader1 -> ErrorAdditionalInfo.fromJson(reader1)); + deserializedErrorResponse.additionalInfo = additionalInfo; + } else { + reader.skipChildren(); + } + } + + return deserializedErrorResponse; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RequiredAction.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RequiredAction.java new file mode 100644 index 000000000000..9403188b0b32 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RequiredAction.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Action Info. + */ +@Fluent +public final class RequiredAction implements JsonSerializable { + /* + * Action Id. + */ + @Generated + private String id; + + /* + * Is a data action or not. + */ + @Generated + private boolean isDataAction; + + /** + * Creates an instance of RequiredAction class. + */ + @Generated + public RequiredAction() { + } + + /** + * Get the id property: Action Id. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Set the id property: Action Id. + * + * @param id the id value to set. + * @return the RequiredAction object itself. + */ + @Generated + public RequiredAction setId(String id) { + this.id = id; + return this; + } + + /** + * Get the isDataAction property: Is a data action or not. + * + * @return the isDataAction value. + */ + @Generated + public boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set the isDataAction property: Is a data action or not. + * + * @param isDataAction the isDataAction value to set. + * @return the RequiredAction object itself. + */ + @Generated + public RequiredAction setIsDataAction(boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeBooleanField("isDataAction", this.isDataAction); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RequiredAction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RequiredAction if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RequiredAction. + */ + @Generated + public static RequiredAction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RequiredAction deserializedRequiredAction = new RequiredAction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRequiredAction.id = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedRequiredAction.isDataAction = reader.getBoolean(); + } else { + reader.skipChildren(); + } + } + + return deserializedRequiredAction; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentDetails.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentDetails.java new file mode 100644 index 000000000000..28afc12237f5 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentDetails.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Objects; +import java.util.UUID; + +/** + * Role Assignment response details. + */ +@Fluent +public final class RoleAssignmentDetails implements JsonSerializable { + /* + * Role Assignment ID + */ + @Generated + private String id; + + /* + * Role ID of the Synapse Built-In Role + */ + @Generated + private UUID roleDefinitionId; + + /* + * Object ID of the AAD principal or security-group + */ + @Generated + private UUID principalId; + + /* + * Scope at the role assignment is created + */ + @Generated + private String scope; + + /* + * Type of the principal Id: User, Group or ServicePrincipal + */ + @Generated + private String principalType; + + /** + * Creates an instance of RoleAssignmentDetails class. + */ + @Generated + public RoleAssignmentDetails() { + } + + /** + * Get the id property: Role Assignment ID. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Set the id property: Role Assignment ID. + * + * @param id the id value to set. + * @return the RoleAssignmentDetails object itself. + */ + @Generated + public RoleAssignmentDetails setId(String id) { + this.id = id; + return this; + } + + /** + * Get the roleDefinitionId property: Role ID of the Synapse Built-In Role. + * + * @return the roleDefinitionId value. + */ + @Generated + public UUID getRoleDefinitionId() { + return this.roleDefinitionId; + } + + /** + * Set the roleDefinitionId property: Role ID of the Synapse Built-In Role. + * + * @param roleDefinitionId the roleDefinitionId value to set. + * @return the RoleAssignmentDetails object itself. + */ + @Generated + public RoleAssignmentDetails setRoleDefinitionId(UUID roleDefinitionId) { + this.roleDefinitionId = roleDefinitionId; + return this; + } + + /** + * Get the principalId property: Object ID of the AAD principal or security-group. + * + * @return the principalId value. + */ + @Generated + public UUID getPrincipalId() { + return this.principalId; + } + + /** + * Set the principalId property: Object ID of the AAD principal or security-group. + * + * @param principalId the principalId value to set. + * @return the RoleAssignmentDetails object itself. + */ + @Generated + public RoleAssignmentDetails setPrincipalId(UUID principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get the scope property: Scope at the role assignment is created. + * + * @return the scope value. + */ + @Generated + public String getScope() { + return this.scope; + } + + /** + * Set the scope property: Scope at the role assignment is created. + * + * @param scope the scope value to set. + * @return the RoleAssignmentDetails object itself. + */ + @Generated + public RoleAssignmentDetails setScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get the principalType property: Type of the principal Id: User, Group or ServicePrincipal. + * + * @return the principalType value. + */ + @Generated + public String getPrincipalType() { + return this.principalType; + } + + /** + * Set the principalType property: Type of the principal Id: User, Group or ServicePrincipal. + * + * @param principalType the principalType value to set. + * @return the RoleAssignmentDetails object itself. + */ + @Generated + public RoleAssignmentDetails setPrincipalType(String principalType) { + this.principalType = principalType; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("roleDefinitionId", Objects.toString(this.roleDefinitionId, null)); + jsonWriter.writeStringField("principalId", Objects.toString(this.principalId, null)); + jsonWriter.writeStringField("scope", this.scope); + jsonWriter.writeStringField("principalType", this.principalType); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoleAssignmentDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoleAssignmentDetails if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RoleAssignmentDetails. + */ + @Generated + public static RoleAssignmentDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoleAssignmentDetails deserializedRoleAssignmentDetails = new RoleAssignmentDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRoleAssignmentDetails.id = reader.getString(); + } else if ("roleDefinitionId".equals(fieldName)) { + deserializedRoleAssignmentDetails.roleDefinitionId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("principalId".equals(fieldName)) { + deserializedRoleAssignmentDetails.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("scope".equals(fieldName)) { + deserializedRoleAssignmentDetails.scope = reader.getString(); + } else if ("principalType".equals(fieldName)) { + deserializedRoleAssignmentDetails.principalType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRoleAssignmentDetails; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentDetailsList.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentDetailsList.java new file mode 100644 index 000000000000..3a649494afab --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentDetailsList.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Role Assignment response details. + */ +@Fluent +public final class RoleAssignmentDetailsList implements JsonSerializable { + /* + * Number of role assignments + */ + @Generated + private Integer count; + + /* + * A list of role assignments + */ + @Generated + private List value; + + /** + * Creates an instance of RoleAssignmentDetailsList class. + */ + @Generated + public RoleAssignmentDetailsList() { + } + + /** + * Get the count property: Number of role assignments. + * + * @return the count value. + */ + @Generated + public Integer getCount() { + return this.count; + } + + /** + * Set the count property: Number of role assignments. + * + * @param count the count value to set. + * @return the RoleAssignmentDetailsList object itself. + */ + @Generated + public RoleAssignmentDetailsList setCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the value property: A list of role assignments. + * + * @return the value value. + */ + @Generated + public List getValue() { + return this.value; + } + + /** + * Set the value property: A list of role assignments. + * + * @param value the value value to set. + * @return the RoleAssignmentDetailsList object itself. + */ + @Generated + public RoleAssignmentDetailsList setValue(List value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoleAssignmentDetailsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoleAssignmentDetailsList if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RoleAssignmentDetailsList. + */ + @Generated + public static RoleAssignmentDetailsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoleAssignmentDetailsList deserializedRoleAssignmentDetailsList = new RoleAssignmentDetailsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedRoleAssignmentDetailsList.count = reader.getNullable(JsonReader::getInt); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RoleAssignmentDetails.fromJson(reader1)); + deserializedRoleAssignmentDetailsList.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedRoleAssignmentDetailsList; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentRequest.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentRequest.java new file mode 100644 index 000000000000..4e9e19f365d6 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentRequest.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Objects; +import java.util.UUID; + +/** + * Role Assignment request details. + */ +@Fluent +public final class RoleAssignmentRequest implements JsonSerializable { + /* + * Role ID of the Synapse Built-In Role + */ + @Generated + private UUID roleId; + + /* + * Object ID of the AAD principal or security-group + */ + @Generated + private UUID principalId; + + /* + * Scope at which the role assignment is created + */ + @Generated + private String scope; + + /* + * Type of the principal Id: User, Group or ServicePrincipal + */ + @Generated + private String principalType; + + /** + * Creates an instance of RoleAssignmentRequest class. + */ + @Generated + public RoleAssignmentRequest() { + } + + /** + * Get the roleId property: Role ID of the Synapse Built-In Role. + * + * @return the roleId value. + */ + @Generated + public UUID getRoleId() { + return this.roleId; + } + + /** + * Set the roleId property: Role ID of the Synapse Built-In Role. + * + * @param roleId the roleId value to set. + * @return the RoleAssignmentRequest object itself. + */ + @Generated + public RoleAssignmentRequest setRoleId(UUID roleId) { + this.roleId = roleId; + return this; + } + + /** + * Get the principalId property: Object ID of the AAD principal or security-group. + * + * @return the principalId value. + */ + @Generated + public UUID getPrincipalId() { + return this.principalId; + } + + /** + * Set the principalId property: Object ID of the AAD principal or security-group. + * + * @param principalId the principalId value to set. + * @return the RoleAssignmentRequest object itself. + */ + @Generated + public RoleAssignmentRequest setPrincipalId(UUID principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get the scope property: Scope at which the role assignment is created. + * + * @return the scope value. + */ + @Generated + public String getScope() { + return this.scope; + } + + /** + * Set the scope property: Scope at which the role assignment is created. + * + * @param scope the scope value to set. + * @return the RoleAssignmentRequest object itself. + */ + @Generated + public RoleAssignmentRequest setScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get the principalType property: Type of the principal Id: User, Group or ServicePrincipal. + * + * @return the principalType value. + */ + @Generated + public String getPrincipalType() { + return this.principalType; + } + + /** + * Set the principalType property: Type of the principal Id: User, Group or ServicePrincipal. + * + * @param principalType the principalType value to set. + * @return the RoleAssignmentRequest object itself. + */ + @Generated + public RoleAssignmentRequest setPrincipalType(String principalType) { + this.principalType = principalType; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("roleId", Objects.toString(this.roleId, null)); + jsonWriter.writeStringField("principalId", Objects.toString(this.principalId, null)); + jsonWriter.writeStringField("scope", this.scope); + jsonWriter.writeStringField("principalType", this.principalType); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoleAssignmentRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoleAssignmentRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RoleAssignmentRequest. + */ + @Generated + public static RoleAssignmentRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoleAssignmentRequest deserializedRoleAssignmentRequest = new RoleAssignmentRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("roleId".equals(fieldName)) { + deserializedRoleAssignmentRequest.roleId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("principalId".equals(fieldName)) { + deserializedRoleAssignmentRequest.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("scope".equals(fieldName)) { + deserializedRoleAssignmentRequest.scope = reader.getString(); + } else if ("principalType".equals(fieldName)) { + deserializedRoleAssignmentRequest.principalType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRoleAssignmentRequest; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentsListRoleAssignmentsHeaders.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentsListRoleAssignmentsHeaders.java new file mode 100644 index 000000000000..6c0196ebd55f --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/RoleAssignmentsListRoleAssignmentsHeaders.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The RoleAssignmentsListRoleAssignmentsHeaders model. + */ +@Fluent +public final class RoleAssignmentsListRoleAssignmentsHeaders { + /* + * The x-ms-continuation property. + */ + @Generated + private String xMsContinuation; + + private static final HttpHeaderName X_MS_CONTINUATION = HttpHeaderName.fromString("x-ms-continuation"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of RoleAssignmentsListRoleAssignmentsHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public RoleAssignmentsListRoleAssignmentsHeaders(HttpHeaders rawHeaders) { + this.xMsContinuation = rawHeaders.getValue(X_MS_CONTINUATION); + } + + /** + * Get the xMsContinuation property: The x-ms-continuation property. + * + * @return the xMsContinuation value. + */ + @Generated + public String getXMsContinuation() { + return this.xMsContinuation; + } + + /** + * Set the xMsContinuation property: The x-ms-continuation property. + * + * @param xMsContinuation the xMsContinuation value to set. + * @return the RoleAssignmentsListRoleAssignmentsHeaders object itself. + */ + @Generated + public RoleAssignmentsListRoleAssignmentsHeaders setXMsContinuation(String xMsContinuation) { + this.xMsContinuation = xMsContinuation; + return this; + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SubjectInfo.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SubjectInfo.java new file mode 100644 index 000000000000..77c6840561a3 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SubjectInfo.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Subject details. + */ +@Fluent +public final class SubjectInfo implements JsonSerializable { + /* + * Principal Id + */ + @Generated + private UUID principalId; + + /* + * List of group Ids that the principalId is part of. + */ + @Generated + private List groupIds; + + /** + * Creates an instance of SubjectInfo class. + */ + @Generated + public SubjectInfo() { + } + + /** + * Get the principalId property: Principal Id. + * + * @return the principalId value. + */ + @Generated + public UUID getPrincipalId() { + return this.principalId; + } + + /** + * Set the principalId property: Principal Id. + * + * @param principalId the principalId value to set. + * @return the SubjectInfo object itself. + */ + @Generated + public SubjectInfo setPrincipalId(UUID principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get the groupIds property: List of group Ids that the principalId is part of. + * + * @return the groupIds value. + */ + @Generated + public List getGroupIds() { + return this.groupIds; + } + + /** + * Set the groupIds property: List of group Ids that the principalId is part of. + * + * @param groupIds the groupIds value to set. + * @return the SubjectInfo object itself. + */ + @Generated + public SubjectInfo setGroupIds(List groupIds) { + this.groupIds = groupIds; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("principalId", Objects.toString(this.principalId, null)); + jsonWriter.writeArrayField("groupIds", this.groupIds, + (writer, element) -> writer.writeString(Objects.toString(element, null))); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubjectInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubjectInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SubjectInfo. + */ + @Generated + public static SubjectInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubjectInfo deserializedSubjectInfo = new SubjectInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedSubjectInfo.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("groupIds".equals(fieldName)) { + List groupIds = reader.readArray( + reader1 -> reader1.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()))); + deserializedSubjectInfo.groupIds = groupIds; + } else { + reader.skipChildren(); + } + } + + return deserializedSubjectInfo; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SynapseRbacPermission.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SynapseRbacPermission.java new file mode 100644 index 000000000000..d10e99cc9803 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SynapseRbacPermission.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Synapse role definition details. + */ +@Fluent +public final class SynapseRbacPermission implements JsonSerializable { + /* + * List of actions + */ + @Generated + private List actions; + + /* + * List of Not actions + */ + @Generated + private List notActions; + + /* + * List of data actions + */ + @Generated + private List dataActions; + + /* + * List of Not data actions + */ + @Generated + private List notDataActions; + + /** + * Creates an instance of SynapseRbacPermission class. + */ + @Generated + public SynapseRbacPermission() { + } + + /** + * Get the actions property: List of actions. + * + * @return the actions value. + */ + @Generated + public List getActions() { + return this.actions; + } + + /** + * Set the actions property: List of actions. + * + * @param actions the actions value to set. + * @return the SynapseRbacPermission object itself. + */ + @Generated + public SynapseRbacPermission setActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the notActions property: List of Not actions. + * + * @return the notActions value. + */ + @Generated + public List getNotActions() { + return this.notActions; + } + + /** + * Set the notActions property: List of Not actions. + * + * @param notActions the notActions value to set. + * @return the SynapseRbacPermission object itself. + */ + @Generated + public SynapseRbacPermission setNotActions(List notActions) { + this.notActions = notActions; + return this; + } + + /** + * Get the dataActions property: List of data actions. + * + * @return the dataActions value. + */ + @Generated + public List getDataActions() { + return this.dataActions; + } + + /** + * Set the dataActions property: List of data actions. + * + * @param dataActions the dataActions value to set. + * @return the SynapseRbacPermission object itself. + */ + @Generated + public SynapseRbacPermission setDataActions(List dataActions) { + this.dataActions = dataActions; + return this; + } + + /** + * Get the notDataActions property: List of Not data actions. + * + * @return the notDataActions value. + */ + @Generated + public List getNotDataActions() { + return this.notDataActions; + } + + /** + * Set the notDataActions property: List of Not data actions. + * + * @param notDataActions the notDataActions value to set. + * @return the SynapseRbacPermission object itself. + */ + @Generated + public SynapseRbacPermission setNotDataActions(List notDataActions) { + this.notDataActions = notDataActions; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("notActions", this.notActions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("dataActions", this.dataActions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("notDataActions", this.notDataActions, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SynapseRbacPermission from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SynapseRbacPermission if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SynapseRbacPermission. + */ + @Generated + public static SynapseRbacPermission fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SynapseRbacPermission deserializedSynapseRbacPermission = new SynapseRbacPermission(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actions".equals(fieldName)) { + List actions = reader.readArray(reader1 -> reader1.getString()); + deserializedSynapseRbacPermission.actions = actions; + } else if ("notActions".equals(fieldName)) { + List notActions = reader.readArray(reader1 -> reader1.getString()); + deserializedSynapseRbacPermission.notActions = notActions; + } else if ("dataActions".equals(fieldName)) { + List dataActions = reader.readArray(reader1 -> reader1.getString()); + deserializedSynapseRbacPermission.dataActions = dataActions; + } else if ("notDataActions".equals(fieldName)) { + List notDataActions = reader.readArray(reader1 -> reader1.getString()); + deserializedSynapseRbacPermission.notDataActions = notDataActions; + } else { + reader.skipChildren(); + } + } + + return deserializedSynapseRbacPermission; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SynapseRoleDefinition.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SynapseRoleDefinition.java new file mode 100644 index 000000000000..d80a5058a792 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/SynapseRoleDefinition.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.accesscontrol.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Synapse role definition details. + */ +@Fluent +public final class SynapseRoleDefinition implements JsonSerializable { + /* + * Role Definition ID + */ + @Generated + private UUID id; + + /* + * Name of the Synapse role + */ + @Generated + private String name; + + /* + * Is a built-in role or not + */ + @Generated + private Boolean isBuiltIn; + + /* + * Description for the Synapse role + */ + @Generated + private String description; + + /* + * Permissions for the Synapse role + */ + @Generated + private List permissions; + + /* + * Allowed scopes for the Synapse role + */ + @Generated + private List scopes; + + /* + * Availability of the Synapse role + */ + @Generated + private String availabilityStatus; + + /** + * Creates an instance of SynapseRoleDefinition class. + */ + @Generated + public SynapseRoleDefinition() { + } + + /** + * Get the id property: Role Definition ID. + * + * @return the id value. + */ + @Generated + public UUID getId() { + return this.id; + } + + /** + * Set the id property: Role Definition ID. + * + * @param id the id value to set. + * @return the SynapseRoleDefinition object itself. + */ + @Generated + public SynapseRoleDefinition setId(UUID id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name of the Synapse role. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: Name of the Synapse role. + * + * @param name the name value to set. + * @return the SynapseRoleDefinition object itself. + */ + @Generated + public SynapseRoleDefinition setName(String name) { + this.name = name; + return this; + } + + /** + * Get the isBuiltIn property: Is a built-in role or not. + * + * @return the isBuiltIn value. + */ + @Generated + public Boolean isBuiltIn() { + return this.isBuiltIn; + } + + /** + * Set the isBuiltIn property: Is a built-in role or not. + * + * @param isBuiltIn the isBuiltIn value to set. + * @return the SynapseRoleDefinition object itself. + */ + @Generated + public SynapseRoleDefinition setIsBuiltIn(Boolean isBuiltIn) { + this.isBuiltIn = isBuiltIn; + return this; + } + + /** + * Get the description property: Description for the Synapse role. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Description for the Synapse role. + * + * @param description the description value to set. + * @return the SynapseRoleDefinition object itself. + */ + @Generated + public SynapseRoleDefinition setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the permissions property: Permissions for the Synapse role. + * + * @return the permissions value. + */ + @Generated + public List getPermissions() { + return this.permissions; + } + + /** + * Set the permissions property: Permissions for the Synapse role. + * + * @param permissions the permissions value to set. + * @return the SynapseRoleDefinition object itself. + */ + @Generated + public SynapseRoleDefinition setPermissions(List permissions) { + this.permissions = permissions; + return this; + } + + /** + * Get the scopes property: Allowed scopes for the Synapse role. + * + * @return the scopes value. + */ + @Generated + public List getScopes() { + return this.scopes; + } + + /** + * Set the scopes property: Allowed scopes for the Synapse role. + * + * @param scopes the scopes value to set. + * @return the SynapseRoleDefinition object itself. + */ + @Generated + public SynapseRoleDefinition setScopes(List scopes) { + this.scopes = scopes; + return this; + } + + /** + * Get the availabilityStatus property: Availability of the Synapse role. + * + * @return the availabilityStatus value. + */ + @Generated + public String getAvailabilityStatus() { + return this.availabilityStatus; + } + + /** + * Set the availabilityStatus property: Availability of the Synapse role. + * + * @param availabilityStatus the availabilityStatus value to set. + * @return the SynapseRoleDefinition object itself. + */ + @Generated + public SynapseRoleDefinition setAvailabilityStatus(String availabilityStatus) { + this.availabilityStatus = availabilityStatus; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", Objects.toString(this.id, null)); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeBooleanField("isBuiltIn", this.isBuiltIn); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeArrayField("permissions", this.permissions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("availabilityStatus", this.availabilityStatus); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SynapseRoleDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SynapseRoleDefinition if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SynapseRoleDefinition. + */ + @Generated + public static SynapseRoleDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SynapseRoleDefinition deserializedSynapseRoleDefinition = new SynapseRoleDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSynapseRoleDefinition.id + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("name".equals(fieldName)) { + deserializedSynapseRoleDefinition.name = reader.getString(); + } else if ("isBuiltIn".equals(fieldName)) { + deserializedSynapseRoleDefinition.isBuiltIn = reader.getNullable(JsonReader::getBoolean); + } else if ("description".equals(fieldName)) { + deserializedSynapseRoleDefinition.description = reader.getString(); + } else if ("permissions".equals(fieldName)) { + List permissions + = reader.readArray(reader1 -> SynapseRbacPermission.fromJson(reader1)); + deserializedSynapseRoleDefinition.permissions = permissions; + } else if ("scopes".equals(fieldName)) { + List scopes = reader.readArray(reader1 -> reader1.getString()); + deserializedSynapseRoleDefinition.scopes = scopes; + } else if ("availabilityStatus".equals(fieldName)) { + deserializedSynapseRoleDefinition.availabilityStatus = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSynapseRoleDefinition; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/package-info.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/package-info.java new file mode 100644 index 000000000000..f54c600bf908 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for AccessControlClient. + * null. + */ +package com.azure.analytics.synapse.accesscontrol.models; diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/package-info.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/package-info.java new file mode 100644 index 000000000000..921701749019 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/com/azure/analytics/synapse/accesscontrol/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for AccessControlClient. + * null. + */ +package com.azure.analytics.synapse.accesscontrol; diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/module-info.java b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/module-info.java new file mode 100644 index 000000000000..d1c4e70971a4 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.analytics.synapse.accesscontrol { + requires transitive com.azure.core; + + exports com.azure.analytics.synapse.accesscontrol; + exports com.azure.analytics.synapse.accesscontrol.models; + + opens com.azure.analytics.synapse.accesscontrol.implementation to com.azure.core; + opens com.azure.analytics.synapse.accesscontrol.models to com.azure.core; +} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/resources/azure-analytics-synapse-accesscontrol.properties b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/resources/azure-analytics-synapse-accesscontrol.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/src/main/resources/azure-analytics-synapse-accesscontrol.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/synapse/azure-analytics-synapse-accesscontrol/swagger/README.md b/sdk/synapse/azure-analytics-synapse-accesscontrol/swagger/README.md new file mode 100644 index 000000000000..450e289578ca --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-accesscontrol/swagger/README.md @@ -0,0 +1,50 @@ +# Azure Synapse Analytics Access Control for Java + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Synapse Analytics Access Control. +--- +## Getting Started + +To build the SDK for Synapse Analytics Access Control, simply [Install AutoRest](https://aka.ms/autorest) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +### Setup +```ps +npm install -g autorest +``` + +### Generation + +```ps +cd +autorest +``` + +### Code generation settings + +## Java + +```yaml +input-file: + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/3d6211cf28f83236cdf78e7cfc50efd3fb7cba72/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/checkAccessSynapseRbac.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/3d6211cf28f83236cdf78e7cfc50efd3fb7cba72/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/roleDefinitions.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/3d6211cf28f83236cdf78e7cfc50efd3fb7cba72/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/roleAssignments.json +java: true +use: '@autorest/java@4.1.62' +output-folder: ../ +generate-client-as-impl: true +generate-sync-async-clients: true +namespace: com.azure.analytics.synapse.accesscontrol +sync-methods: all +license-header: MICROSOFT_MIT_SMALL +models-subpackage: models +required-parameter-client-methods: true +credential-types: tokencredential +credential-scopes: https://dev.azuresynapse.net/.default +``` diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/CHANGELOG.md b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/CHANGELOG.md new file mode 100644 index 000000000000..dedbb1f0fc36 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/CHANGELOG.md @@ -0,0 +1,42 @@ +# Release History + +## 1.0.0-beta.6 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.5 (2021-09-08) +- Roll back API version to 2020-12-01 + +## 1.0.0-beta.4 (2021-08-10) +- Update API version to 2021-06-01-preview +- Added missing properties for managed private endpoints in stable version + +## 1.0.0-beta.3 (2021-04-06) + +### Dependency Updates +- Update azure-core to 1.15.0 + +## 1.0.0-beta.2 (2021-02-09) + +- Support specifying the service API version. (AutoRest update) +- Send missing "Accept" request headers + +## 1.0.0-beta.1 (2020-12-15) + +Version 1.0.0-beta.1 is a beta of our efforts in creating an Azure Synapse Managed Private Endpoints client library that is developer-friendly, idiomatic to +the Java ecosystem, and as consistent across different languages and platforms as possible. The principles that guide +our efforts can be found in the +[Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java_introduction.html). + +### New Features + +- It uses Azure Synapse 2019-06-01-preview API +- One client design: + - `ManagedPrivateEndpointsClient` to manage private endpoints for Azure Synapse +- Reactive streams support using [Project Reactor](https://projectreactor.io/) diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/README.md b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/README.md new file mode 100644 index 000000000000..380e10c38a42 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/README.md @@ -0,0 +1,111 @@ +# Azure Synapse Managed Private Endpoints client library for Java +Azure Synapse is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics. It gives you the freedom to query data on your terms, using either serverless on-demand or provisioned resources—at scale. Azure Synapse brings these two worlds together with a unified experience to ingest, prepare, manage, and serve data for immediate BI and machine learning needs. + +The Azure Synapse Analytics managed private endpoints client library enables programmatically managing private endpoints. + +[Source code][source_code] | [API reference documentation][api_documentation] | [Product documentation][azsynapse_docs] + +## Getting started +### Adding the package to your project +Maven dependency for the Azure Synapse managed private endpoints client library. Add it to your project's POM file. + +[//]: # ({x-version-update-start;com.azure:azure-analytics-synapse-managedprivateendpoints;current}) +```xml + + com.azure + azure-analytics-synapse-managedprivateendpoints + 1.0.0-beta.6 + +``` +[//]: # ({x-version-update-end}) + +### Prerequisites +- [Java Development Kit (JDK)][jdk] with version 8 or above +- An [Azure subscription][azure_sub]. +- An existing Azure Synapse workspace. If you need to create an Azure Synapse workspace, you can use the Azure Portal or [Azure CLI][azure_cli]. + ```Bash + az synapse workspace create \ + --name \ + --resource-group \ + --storage-account \ + --file-system \ + --sql-admin-login-user \ + --sql-admin-login-password \ + --location + ``` + +### Authenticate the client +In order to interact with the Azure Synapse service, you'll need to create an instance of the `ManagedPrivateEndpointsClient` class. You would need a **workspace endpoint** and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object using the default `DefaultAzureCredential` examples shown in this document. + +The `DefaultAzureCredential` way of authentication by providing client secret credentials is being used in this getting started section but you can find more ways to authenticate with [azure-identity][azure_identity]. + +#### Create/Get credentials +To create/get client secret credentials you can use the [Azure Portal][azure_create_application_in_portal], [Azure CLI][azure_synapse_cli_full] or [Azure Cloud Shell](https://shell.azure.com/bash) + +Here is an [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to + + * Create a service principal and configure its access to Azure resources: + + ```Bash + az ad sp create-for-rbac -n --skip-assignment + ``` + + Output: + + ```json + { + "appId": "generated-app-ID", + "displayName": "dummy-app-name", + "name": "http://dummy-app-name", + "password": "random-password", + "tenant": "tenant-ID" + } + ``` + +## Key concepts + +(coming soon) + +## Examples + +(coming soon) + +## Troubleshooting + +### Default HTTP client +All client libraries by default use the Netty HTTP client. Adding the above dependency will automatically configure the client library to use the Netty HTTP client. Configuring or changing the HTTP client is detailed in the [HTTP clients wiki](https://learn.microsoft.com/azure/developer/java/sdk/http-client-pipeline#http-clients). + +### Default SSL library +All client libraries, by default, use the Tomcat-native Boring SSL library to enable native-level performance for SSL operations. The Boring SSL library is an Uber JAR containing native libraries for Linux / macOS / Windows, and provides better performance compared to the default SSL implementation within the JDK. For more information, including how to reduce the dependency size, refer to the [performance tuning][performance_tuning] section of the wiki. + +## Next steps +Several Synapse Java SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Azure Synapse Analytics. + +### Additional documentation +For more extensive documentation on Azure Synapse Analytics, see the [API reference documentation][azsynapse_rest]. + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact with any additional questions or comments. + + +[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/synapse/azure-analytics-synapse-accesscontrol/src +[api_documentation]: https://azure.github.io/azure-sdk-for-java +[azsynapse_docs]: https://learn.microsoft.com/azure/synapse-analytics/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity +[maven]: https://maven.apache.org/ +[azure_subscription]: https://azure.microsoft.com/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/?view=azure-java-stable +[azure_sub]: https://azure.microsoft.com/free/ +[azure_synapse]: https://learn.microsoft.com/azure/synapse-analytics/quickstart-create-workspace +[azure_cli]: https://learn.microsoft.com/cli/azure +[rest_api]: https://learn.microsoft.com/rest/api/synapse/ +[azsynapse_rest]: https://learn.microsoft.com/rest/api/synapse/ +[azure_create_application_in_portal]: https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +[azure_synapse_cli_full]: https://learn.microsoft.com/cli/azure/synapse?view=azure-cli-latest +[performance_tuning]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/performance-tuning.md + diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/checkstyle-suppressions.xml b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml new file mode 100644 index 000000000000..adfd5f9ae527 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-analytics-synapse-managedprivateendpoints + 1.0.0-beta.6 + + Microsoft Azure client library for Synapse Managed Private Endpoints + This package contains the Microsoft Azure Synapse Analytics Managed Private Endpoints SDK. + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + true + + false + + + + + com.azure + azure-json + 1.5.1 + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/spotbugs-exclude.xml b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsAsyncClient.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsAsyncClient.java new file mode 100644 index 000000000000..ca68189adeea --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsAsyncClient.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.managedprivateendpoints; + +import com.azure.analytics.synapse.managedprivateendpoints.implementation.ManagedPrivateEndpointsImpl; +import com.azure.analytics.synapse.managedprivateendpoints.models.ManagedPrivateEndpoint; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.Response; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous ManagedPrivateEndpointsClient type. + */ +@ServiceClient(builder = ManagedPrivateEndpointsClientBuilder.class, isAsync = true) +public final class ManagedPrivateEndpointsAsyncClient { + @Generated + private final ManagedPrivateEndpointsImpl serviceClient; + + /** + * Initializes an instance of ManagedPrivateEndpointsAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ManagedPrivateEndpointsAsyncClient(ManagedPrivateEndpointsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponse(String managedVirtualNetworkName, + String managedPrivateEndpointName) { + return this.serviceClient.getWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName); + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono get(String managedVirtualNetworkName, String managedPrivateEndpointName) { + return this.serviceClient.getAsync(managedVirtualNetworkName, managedPrivateEndpointName); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponse(String managedVirtualNetworkName, + String managedPrivateEndpointName, ManagedPrivateEndpoint managedPrivateEndpoint) { + return this.serviceClient.createWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, + managedPrivateEndpoint); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono create(String managedVirtualNetworkName, String managedPrivateEndpointName, + ManagedPrivateEndpoint managedPrivateEndpoint) { + return this.serviceClient.createAsync(managedVirtualNetworkName, managedPrivateEndpointName, + managedPrivateEndpoint); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(String managedVirtualNetworkName, + String managedPrivateEndpointName) { + return this.serviceClient.deleteWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono delete(String managedVirtualNetworkName, String managedPrivateEndpointName) { + return this.serviceClient.deleteAsync(managedVirtualNetworkName, managedPrivateEndpointName); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list(String managedVirtualNetworkName) { + return this.serviceClient.listAsync(managedVirtualNetworkName); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsClient.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsClient.java new file mode 100644 index 000000000000..976973cf3f55 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsClient.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.managedprivateendpoints; + +import com.azure.analytics.synapse.managedprivateendpoints.implementation.ManagedPrivateEndpointsImpl; +import com.azure.analytics.synapse.managedprivateendpoints.models.ManagedPrivateEndpoint; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Initializes a new instance of the synchronous ManagedPrivateEndpointsClient type. + */ +@ServiceClient(builder = ManagedPrivateEndpointsClientBuilder.class) +public final class ManagedPrivateEndpointsClient { + @Generated + private final ManagedPrivateEndpointsImpl serviceClient; + + /** + * Initializes an instance of ManagedPrivateEndpointsClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ManagedPrivateEndpointsClient(ManagedPrivateEndpointsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String managedVirtualNetworkName, + String managedPrivateEndpointName, Context context) { + return this.serviceClient.getWithResponse(managedVirtualNetworkName, managedPrivateEndpointName, context); + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedPrivateEndpoint get(String managedVirtualNetworkName, String managedPrivateEndpointName) { + return this.serviceClient.get(managedVirtualNetworkName, managedPrivateEndpointName); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String managedVirtualNetworkName, + String managedPrivateEndpointName, ManagedPrivateEndpoint managedPrivateEndpoint, Context context) { + return this.serviceClient.createWithResponse(managedVirtualNetworkName, managedPrivateEndpointName, + managedPrivateEndpoint, context); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedPrivateEndpoint create(String managedVirtualNetworkName, String managedPrivateEndpointName, + ManagedPrivateEndpoint managedPrivateEndpoint) { + return this.serviceClient.create(managedVirtualNetworkName, managedPrivateEndpointName, managedPrivateEndpoint); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String managedVirtualNetworkName, String managedPrivateEndpointName, + Context context) { + return this.serviceClient.deleteWithResponse(managedVirtualNetworkName, managedPrivateEndpointName, context); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String managedVirtualNetworkName, String managedPrivateEndpointName) { + this.serviceClient.delete(managedVirtualNetworkName, managedPrivateEndpointName); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String managedVirtualNetworkName) { + return this.serviceClient.list(managedVirtualNetworkName); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String managedVirtualNetworkName, Context context) { + return this.serviceClient.list(managedVirtualNetworkName, context); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsClientBuilder.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsClientBuilder.java new file mode 100644 index 000000000000..88b192822626 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/ManagedPrivateEndpointsClientBuilder.java @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.managedprivateendpoints; + +import com.azure.analytics.synapse.managedprivateendpoints.implementation.ManagedPrivateEndpointsClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the ManagedPrivateEndpointsClient type. + */ +@ServiceClientBuilder( + serviceClients = { ManagedPrivateEndpointsClient.class, ManagedPrivateEndpointsAsyncClient.class }) +public final class ManagedPrivateEndpointsClientBuilder implements HttpTrait, + ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://dev.azuresynapse.net/.default" }; + + @Generated + private static final Map PROPERTIES = new HashMap<>(); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the ManagedPrivateEndpointsClientBuilder. + */ + @Generated + public ManagedPrivateEndpointsClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ManagedPrivateEndpointsClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ManagedPrivateEndpointsClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ManagedPrivateEndpointsClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ManagedPrivateEndpointsClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ManagedPrivateEndpointsClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ManagedPrivateEndpointsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ManagedPrivateEndpointsClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ManagedPrivateEndpointsClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public ManagedPrivateEndpointsClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Api Version + */ + @Generated + private String apiVersion; + + /** + * Sets Api Version. + * + * @param apiVersion the apiVersion value. + * @return the ManagedPrivateEndpointsClientBuilder. + */ + @Generated + public ManagedPrivateEndpointsClientBuilder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + @Generated + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the ManagedPrivateEndpointsClientBuilder. + */ + @Generated + public ManagedPrivateEndpointsClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the ManagedPrivateEndpointsClientBuilder. + */ + @Generated + public ManagedPrivateEndpointsClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of ManagedPrivateEndpointsClientImpl with the provided parameters. + * + * @return an instance of ManagedPrivateEndpointsClientImpl. + */ + @Generated + private ManagedPrivateEndpointsClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + String localApiVersion = (apiVersion != null) ? apiVersion : "2020-12-01"; + SerializerAdapter localSerializerAdapter + = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); + ManagedPrivateEndpointsClientImpl client = new ManagedPrivateEndpointsClientImpl(localPipeline, + localSerializerAdapter, this.endpoint, localApiVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of ManagedPrivateEndpointsAsyncClient class. + * + * @return an instance of ManagedPrivateEndpointsAsyncClient. + */ + @Generated + public ManagedPrivateEndpointsAsyncClient buildAsyncClient() { + return new ManagedPrivateEndpointsAsyncClient(buildInnerClient().getManagedPrivateEndpoints()); + } + + /** + * Builds an instance of ManagedPrivateEndpointsClient class. + * + * @return an instance of ManagedPrivateEndpointsClient. + */ + @Generated + public ManagedPrivateEndpointsClient buildClient() { + return new ManagedPrivateEndpointsClient(buildInnerClient().getManagedPrivateEndpoints()); + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedPrivateEndpointsClientBuilder.class); +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/ManagedPrivateEndpointsClientImpl.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/ManagedPrivateEndpointsClientImpl.java new file mode 100644 index 000000000000..a2613f9a2236 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/ManagedPrivateEndpointsClientImpl.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.managedprivateendpoints.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the ManagedPrivateEndpointsClient type. + */ +public final class ManagedPrivateEndpointsClientImpl { + /** + * The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + */ + private final String endpoint; + + /** + * Gets The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The ManagedPrivateEndpointsImpl object to access its operations. + */ + private final ManagedPrivateEndpointsImpl managedPrivateEndpoints; + + /** + * Gets the ManagedPrivateEndpointsImpl object to access its operations. + * + * @return the ManagedPrivateEndpointsImpl object. + */ + public ManagedPrivateEndpointsImpl getManagedPrivateEndpoints() { + return this.managedPrivateEndpoints; + } + + /** + * Initializes an instance of ManagedPrivateEndpointsClient client. + * + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param apiVersion Api Version. + */ + public ManagedPrivateEndpointsClientImpl(String endpoint, String apiVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion); + } + + /** + * Initializes an instance of ManagedPrivateEndpointsClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param apiVersion Api Version. + */ + public ManagedPrivateEndpointsClientImpl(HttpPipeline httpPipeline, String endpoint, String apiVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion); + } + + /** + * Initializes an instance of ManagedPrivateEndpointsClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param apiVersion Api Version. + */ + public ManagedPrivateEndpointsClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + String endpoint, String apiVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + this.managedPrivateEndpoints = new ManagedPrivateEndpointsImpl(this); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/ManagedPrivateEndpointsImpl.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/ManagedPrivateEndpointsImpl.java new file mode 100644 index 000000000000..76f9d7b2e79c --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/ManagedPrivateEndpointsImpl.java @@ -0,0 +1,618 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.managedprivateendpoints.implementation; + +import com.azure.analytics.synapse.managedprivateendpoints.models.ManagedPrivateEndpoint; +import com.azure.analytics.synapse.managedprivateendpoints.models.ManagedPrivateEndpointListResponse; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedPrivateEndpoints. + */ +public final class ManagedPrivateEndpointsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedPrivateEndpointsService service; + + /** + * The service client containing this operation class. + */ + private final ManagedPrivateEndpointsClientImpl client; + + /** + * Initializes an instance of ManagedPrivateEndpointsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedPrivateEndpointsImpl(ManagedPrivateEndpointsClientImpl client) { + this.service = RestProxy.create(ManagedPrivateEndpointsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ManagedPrivateEndpointsClientManagedPrivateEndpoints to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ManagedPrivateEndpointsClientManagedPrivateEndpoints") + public interface ManagedPrivateEndpointsService { + @Get("/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("managedVirtualNetworkName") String managedVirtualNetworkName, + @PathParam("managedPrivateEndpointName") String managedPrivateEndpointName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("managedVirtualNetworkName") String managedVirtualNetworkName, + @PathParam("managedPrivateEndpointName") String managedPrivateEndpointName, + @BodyParam("application/json") ManagedPrivateEndpoint managedPrivateEndpoint, + @HeaderParam("Accept") String accept, Context context); + + @Delete("/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("managedVirtualNetworkName") String managedVirtualNetworkName, + @PathParam("managedPrivateEndpointName") String managedPrivateEndpointName, Context context); + + @Get("/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("managedVirtualNetworkName") String managedVirtualNetworkName, + @HeaderParam("Accept") String accept, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String managedVirtualNetworkName, + String managedPrivateEndpointName) { + return FluxUtil.withContext( + context -> getWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, context)); + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String managedVirtualNetworkName, + String managedPrivateEndpointName, Context context) { + final String accept = "application/json"; + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), managedVirtualNetworkName, + managedPrivateEndpointName, accept, context); + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String managedVirtualNetworkName, String managedPrivateEndpointName) { + return getWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String managedVirtualNetworkName, String managedPrivateEndpointName, + Context context) { + return getWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String managedVirtualNetworkName, + String managedPrivateEndpointName, Context context) { + return getWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, context).block(); + } + + /** + * Get Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed Private Endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedPrivateEndpoint get(String managedVirtualNetworkName, String managedPrivateEndpointName) { + return getWithResponse(managedVirtualNetworkName, managedPrivateEndpointName, Context.NONE).getValue(); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponseAsync(String managedVirtualNetworkName, + String managedPrivateEndpointName, ManagedPrivateEndpoint managedPrivateEndpoint) { + return FluxUtil.withContext(context -> createWithResponseAsync(managedVirtualNetworkName, + managedPrivateEndpointName, managedPrivateEndpoint, context)); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponseAsync(String managedVirtualNetworkName, + String managedPrivateEndpointName, ManagedPrivateEndpoint managedPrivateEndpoint, Context context) { + final String accept = "application/json"; + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), managedVirtualNetworkName, + managedPrivateEndpointName, managedPrivateEndpoint, accept, context); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync(String managedVirtualNetworkName, String managedPrivateEndpointName, + ManagedPrivateEndpoint managedPrivateEndpoint) { + return createWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, managedPrivateEndpoint) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync(String managedVirtualNetworkName, String managedPrivateEndpointName, + ManagedPrivateEndpoint managedPrivateEndpoint, Context context) { + return createWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, managedPrivateEndpoint, + context).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String managedVirtualNetworkName, + String managedPrivateEndpointName, ManagedPrivateEndpoint managedPrivateEndpoint, Context context) { + return createWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, managedPrivateEndpoint, + context).block(); + } + + /** + * Create Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param managedPrivateEndpoint Managed private endpoint properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managed private endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedPrivateEndpoint create(String managedVirtualNetworkName, String managedPrivateEndpointName, + ManagedPrivateEndpoint managedPrivateEndpoint) { + return createWithResponse(managedVirtualNetworkName, managedPrivateEndpointName, managedPrivateEndpoint, + Context.NONE).getValue(); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String managedVirtualNetworkName, + String managedPrivateEndpointName) { + return FluxUtil.withContext( + context -> deleteWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, context)); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String managedVirtualNetworkName, + String managedPrivateEndpointName, Context context) { + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), managedVirtualNetworkName, + managedPrivateEndpointName, context); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String managedVirtualNetworkName, String managedPrivateEndpointName) { + return deleteWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String managedVirtualNetworkName, String managedPrivateEndpointName, + Context context) { + return deleteWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, context) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String managedVirtualNetworkName, String managedPrivateEndpointName, + Context context) { + return deleteWithResponseAsync(managedVirtualNetworkName, managedPrivateEndpointName, context).block(); + } + + /** + * Delete Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param managedPrivateEndpointName Managed private endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String managedVirtualNetworkName, String managedPrivateEndpointName) { + deleteWithResponse(managedVirtualNetworkName, managedPrivateEndpointName, Context.NONE); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(String managedVirtualNetworkName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + managedVirtualNetworkName, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listSinglePageAsync(String managedVirtualNetworkName, + Context context) { + final String accept = "application/json"; + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), managedVirtualNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String managedVirtualNetworkName) { + return new PagedFlux<>(() -> listSinglePageAsync(managedVirtualNetworkName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String managedVirtualNetworkName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(managedVirtualNetworkName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listSinglePage(String managedVirtualNetworkName) { + return listSinglePageAsync(managedVirtualNetworkName).block(); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listSinglePage(String managedVirtualNetworkName, Context context) { + return listSinglePageAsync(managedVirtualNetworkName, context).block(); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String managedVirtualNetworkName) { + return new PagedIterable<>(listAsync(managedVirtualNetworkName)); + } + + /** + * List Managed Private Endpoints. + * + * @param managedVirtualNetworkName Managed virtual network name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String managedVirtualNetworkName, Context context) { + return new PagedIterable<>(listAsync(managedVirtualNetworkName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listNextSinglePageAsync(String nextLink, Context context) { + final String accept = "application/json"; + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getValue(), res.getValue().getNextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listNextSinglePage(String nextLink) { + return listNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed private endpoints along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listNextSinglePage(String nextLink, Context context) { + return listNextSinglePageAsync(nextLink, context).block(); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/package-info.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/package-info.java new file mode 100644 index 000000000000..8007cd099f5a --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for ManagedPrivateEndpointsClient. + * null. + */ +package com.azure.analytics.synapse.managedprivateendpoints.implementation; diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpoint.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpoint.java new file mode 100644 index 000000000000..f8288d2c204a --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpoint.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.managedprivateendpoints.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Managed private endpoint. + */ +@Fluent +public final class ManagedPrivateEndpoint implements JsonSerializable { + /* + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{ + * resourceType}/{resourceName} + */ + @Generated + private String id; + + /* + * The name of the resource + */ + @Generated + private String name; + + /* + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + */ + @Generated + private String type; + + /* + * Managed private endpoint properties + */ + @Generated + private ManagedPrivateEndpointProperties properties; + + /** + * Creates an instance of ManagedPrivateEndpoint class. + */ + @Generated + public ManagedPrivateEndpoint() { + } + + /** + * Get the id property: Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the type property: The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * + * @return the type value. + */ + @Generated + public String getType() { + return this.type; + } + + /** + * Get the properties property: Managed private endpoint properties. + * + * @return the properties value. + */ + @Generated + public ManagedPrivateEndpointProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Managed private endpoint properties. + * + * @param properties the properties value to set. + * @return the ManagedPrivateEndpoint object itself. + */ + @Generated + public ManagedPrivateEndpoint setProperties(ManagedPrivateEndpointProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedPrivateEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedPrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedPrivateEndpoint. + */ + @Generated + public static ManagedPrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedPrivateEndpoint deserializedManagedPrivateEndpoint = new ManagedPrivateEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedPrivateEndpoint.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedPrivateEndpoint.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedPrivateEndpoint.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedPrivateEndpoint.properties = ManagedPrivateEndpointProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedPrivateEndpoint; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointConnectionState.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointConnectionState.java new file mode 100644 index 000000000000..fc4d92bc0b7d --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointConnectionState.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.managedprivateendpoints.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The connection state of a managed private endpoint. + */ +@Fluent +public final class ManagedPrivateEndpointConnectionState + implements JsonSerializable { + /* + * The approval status + */ + @Generated + private String status; + + /* + * The managed private endpoint description + */ + @Generated + private String description; + + /* + * The actions required on the managed private endpoint + */ + @Generated + private String actionsRequired; + + /** + * Creates an instance of ManagedPrivateEndpointConnectionState class. + */ + @Generated + public ManagedPrivateEndpointConnectionState() { + } + + /** + * Get the status property: The approval status. + * + * @return the status value. + */ + @Generated + public String getStatus() { + return this.status; + } + + /** + * Get the description property: The managed private endpoint description. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Set the description property: The managed private endpoint description. + * + * @param description the description value to set. + * @return the ManagedPrivateEndpointConnectionState object itself. + */ + @Generated + public ManagedPrivateEndpointConnectionState setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionsRequired property: The actions required on the managed private endpoint. + * + * @return the actionsRequired value. + */ + @Generated + public String getActionsRequired() { + return this.actionsRequired; + } + + /** + * Set the actionsRequired property: The actions required on the managed private endpoint. + * + * @param actionsRequired the actionsRequired value to set. + * @return the ManagedPrivateEndpointConnectionState object itself. + */ + @Generated + public ManagedPrivateEndpointConnectionState setActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("actionsRequired", this.actionsRequired); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedPrivateEndpointConnectionState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedPrivateEndpointConnectionState if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedPrivateEndpointConnectionState. + */ + @Generated + public static ManagedPrivateEndpointConnectionState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedPrivateEndpointConnectionState deserializedManagedPrivateEndpointConnectionState + = new ManagedPrivateEndpointConnectionState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedManagedPrivateEndpointConnectionState.status = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedManagedPrivateEndpointConnectionState.description = reader.getString(); + } else if ("actionsRequired".equals(fieldName)) { + deserializedManagedPrivateEndpointConnectionState.actionsRequired = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedPrivateEndpointConnectionState; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointListResponse.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointListResponse.java new file mode 100644 index 000000000000..44dd0e12ac75 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointListResponse.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.managedprivateendpoints.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A list of managed private endpoints. + */ +@Fluent +public final class ManagedPrivateEndpointListResponse implements JsonSerializable { + /* + * List of managed private endpoints + */ + @Generated + private List value; + + /* + * The link to the next page of results, if any remaining results exist. + */ + @Generated + private String nextLink; + + /** + * Creates an instance of ManagedPrivateEndpointListResponse class. + */ + @Generated + public ManagedPrivateEndpointListResponse() { + } + + /** + * Get the value property: List of managed private endpoints. + * + * @return the value value. + */ + @Generated + public List getValue() { + return this.value; + } + + /** + * Set the value property: List of managed private endpoints. + * + * @param value the value value to set. + * @return the ManagedPrivateEndpointListResponse object itself. + */ + @Generated + public ManagedPrivateEndpointListResponse setValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of results, if any remaining results exist. + * + * @return the nextLink value. + */ + @Generated + public String getNextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedPrivateEndpointListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedPrivateEndpointListResponse if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedPrivateEndpointListResponse. + */ + @Generated + public static ManagedPrivateEndpointListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedPrivateEndpointListResponse deserializedManagedPrivateEndpointListResponse + = new ManagedPrivateEndpointListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedPrivateEndpoint.fromJson(reader1)); + deserializedManagedPrivateEndpointListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedPrivateEndpointListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedPrivateEndpointListResponse; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointProperties.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointProperties.java new file mode 100644 index 000000000000..7031df600f0a --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/ManagedPrivateEndpointProperties.java @@ -0,0 +1,291 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.managedprivateendpoints.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Properties of a managed private endpoint. + */ +@Fluent +public final class ManagedPrivateEndpointProperties implements JsonSerializable { + /* + * The name of managed private endpoint + */ + @Generated + private String name; + + /* + * The ARM resource ID of the resource to which the managed private endpoint is created + */ + @Generated + private String privateLinkResourceId; + + /* + * The groupId to which the managed private endpoint is created + */ + @Generated + private String groupId; + + /* + * The managed private endpoint provisioning state + */ + @Generated + private String provisioningState; + + /* + * The managed private endpoint connection state + */ + @Generated + private ManagedPrivateEndpointConnectionState connectionState; + + /* + * Denotes whether the managed private endpoint is reserved + */ + @Generated + private Boolean isReserved; + + /* + * List of fully qualified domain names + */ + @Generated + private List fqdns; + + /* + * Denotes whether the managed private endpoint is compliant + */ + @Generated + private Boolean isCompliant; + + /** + * Creates an instance of ManagedPrivateEndpointProperties class. + */ + @Generated + public ManagedPrivateEndpointProperties() { + } + + /** + * Get the name property: The name of managed private endpoint. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name of managed private endpoint. + * + * @param name the name value to set. + * @return the ManagedPrivateEndpointProperties object itself. + */ + @Generated + public ManagedPrivateEndpointProperties setName(String name) { + this.name = name; + return this; + } + + /** + * Get the privateLinkResourceId property: The ARM resource ID of the resource to which the managed private endpoint + * is created. + * + * @return the privateLinkResourceId value. + */ + @Generated + public String getPrivateLinkResourceId() { + return this.privateLinkResourceId; + } + + /** + * Set the privateLinkResourceId property: The ARM resource ID of the resource to which the managed private endpoint + * is created. + * + * @param privateLinkResourceId the privateLinkResourceId value to set. + * @return the ManagedPrivateEndpointProperties object itself. + */ + @Generated + public ManagedPrivateEndpointProperties setPrivateLinkResourceId(String privateLinkResourceId) { + this.privateLinkResourceId = privateLinkResourceId; + return this; + } + + /** + * Get the groupId property: The groupId to which the managed private endpoint is created. + * + * @return the groupId value. + */ + @Generated + public String getGroupId() { + return this.groupId; + } + + /** + * Set the groupId property: The groupId to which the managed private endpoint is created. + * + * @param groupId the groupId value to set. + * @return the ManagedPrivateEndpointProperties object itself. + */ + @Generated + public ManagedPrivateEndpointProperties setGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the provisioningState property: The managed private endpoint provisioning state. + * + * @return the provisioningState value. + */ + @Generated + public String getProvisioningState() { + return this.provisioningState; + } + + /** + * Get the connectionState property: The managed private endpoint connection state. + * + * @return the connectionState value. + */ + @Generated + public ManagedPrivateEndpointConnectionState getConnectionState() { + return this.connectionState; + } + + /** + * Set the connectionState property: The managed private endpoint connection state. + * + * @param connectionState the connectionState value to set. + * @return the ManagedPrivateEndpointProperties object itself. + */ + @Generated + public ManagedPrivateEndpointProperties setConnectionState(ManagedPrivateEndpointConnectionState connectionState) { + this.connectionState = connectionState; + return this; + } + + /** + * Get the isReserved property: Denotes whether the managed private endpoint is reserved. + * + * @return the isReserved value. + */ + @Generated + public Boolean isReserved() { + return this.isReserved; + } + + /** + * Get the fqdns property: List of fully qualified domain names. + * + * @return the fqdns value. + */ + @Generated + public List getFqdns() { + return this.fqdns; + } + + /** + * Set the fqdns property: List of fully qualified domain names. + * + * @param fqdns the fqdns value to set. + * @return the ManagedPrivateEndpointProperties object itself. + */ + @Generated + public ManagedPrivateEndpointProperties setFqdns(List fqdns) { + this.fqdns = fqdns; + return this; + } + + /** + * Get the isCompliant property: Denotes whether the managed private endpoint is compliant. + * + * @return the isCompliant value. + */ + @Generated + public Boolean isCompliant() { + return this.isCompliant; + } + + /** + * Set the isCompliant property: Denotes whether the managed private endpoint is compliant. + * + * @param isCompliant the isCompliant value to set. + * @return the ManagedPrivateEndpointProperties object itself. + */ + @Generated + public ManagedPrivateEndpointProperties setIsCompliant(Boolean isCompliant) { + this.isCompliant = isCompliant; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("privateLinkResourceId", this.privateLinkResourceId); + jsonWriter.writeStringField("groupId", this.groupId); + jsonWriter.writeJsonField("connectionState", this.connectionState); + jsonWriter.writeArrayField("fqdns", this.fqdns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("isCompliant", this.isCompliant); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedPrivateEndpointProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedPrivateEndpointProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedPrivateEndpointProperties. + */ + @Generated + public static ManagedPrivateEndpointProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedPrivateEndpointProperties deserializedManagedPrivateEndpointProperties + = new ManagedPrivateEndpointProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedManagedPrivateEndpointProperties.name = reader.getString(); + } else if ("privateLinkResourceId".equals(fieldName)) { + deserializedManagedPrivateEndpointProperties.privateLinkResourceId = reader.getString(); + } else if ("groupId".equals(fieldName)) { + deserializedManagedPrivateEndpointProperties.groupId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedPrivateEndpointProperties.provisioningState = reader.getString(); + } else if ("connectionState".equals(fieldName)) { + deserializedManagedPrivateEndpointProperties.connectionState + = ManagedPrivateEndpointConnectionState.fromJson(reader); + } else if ("isReserved".equals(fieldName)) { + deserializedManagedPrivateEndpointProperties.isReserved + = reader.getNullable(JsonReader::getBoolean); + } else if ("fqdns".equals(fieldName)) { + List fqdns = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedPrivateEndpointProperties.fqdns = fqdns; + } else if ("isCompliant".equals(fieldName)) { + deserializedManagedPrivateEndpointProperties.isCompliant + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedPrivateEndpointProperties; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/package-info.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/package-info.java new file mode 100644 index 000000000000..6af8bb2e8767 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for ManagedPrivateEndpointsClient. + * null. + */ +package com.azure.analytics.synapse.managedprivateendpoints.models; diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/package-info.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/package-info.java new file mode 100644 index 000000000000..3649aaa49881 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/com/azure/analytics/synapse/managedprivateendpoints/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for ManagedPrivateEndpointsClient. + * null. + */ +package com.azure.analytics.synapse.managedprivateendpoints; diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/module-info.java b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/module-info.java new file mode 100644 index 000000000000..2e7b93308359 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.analytics.synapse.managedprivateendpoints { + requires transitive com.azure.core; + + exports com.azure.analytics.synapse.managedprivateendpoints; + exports com.azure.analytics.synapse.managedprivateendpoints.models; + + opens com.azure.analytics.synapse.managedprivateendpoints.implementation to com.azure.core; + opens com.azure.analytics.synapse.managedprivateendpoints.models to com.azure.core; +} diff --git a/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/swagger/README.md b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/swagger/README.md new file mode 100644 index 000000000000..577155c4f431 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-managedprivateendpoints/swagger/README.md @@ -0,0 +1,47 @@ +# Azure Synapse Analytics Managed Private Endpoints Service for Java + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Synapse Analytics Managed Private Endpoints. +--- +## Getting Started + +To build the SDK for Synapse Analytics Managed Private Endpoints, simply [Install AutoRest](https://aka.ms/autorest) and +in this folder, run: + +> `autorest` +To see additional help and options, run: + +> `autorest --help` +### Setup +```ps +npm install -g autorest +``` + +### Generation + +```ps +cd +autorest +``` + +### Code generation settings + +## Java + +```yaml +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/3d6211cf28f83236cdf78e7cfc50efd3fb7cba72/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/managedPrivateEndpoints.json +java: true +use: '@autorest/java@4.1.62' +output-folder: ..\ +generate-client-as-impl: true +generate-sync-async-clients: true +namespace: com.azure.analytics.synapse.managedprivateendpoints +sync-methods: all +license-header: MICROSOFT_MIT_SMALL +models-subpackage: models +required-parameter-client-methods: true +credential-types: tokencredential +credential-scopes: https://dev.azuresynapse.net/.default +title: ManagedPrivateEndpointsClient +``` diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/CHANGELOG.md b/sdk/synapse/azure-analytics-synapse-monitoring/CHANGELOG.md new file mode 100644 index 000000000000..49cc06277203 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/CHANGELOG.md @@ -0,0 +1,46 @@ +# Release History + +## 1.0.0-beta.5 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.4 (2021-08-10) + +### Features Added + +- Update to 2020-12-01 API version + +## 1.0.0-beta.3 (2021-04-06) + +### Other Changes + +#### Dependency Updates + +- Update azure-core to 1.15.0 + +## 1.0.0-beta.2 (2021-02-09) + +### Bugs Fixed + +- Support specifying the service API version. (AutoRest update) +- Send missing "Accept" request headers + +## 1.0.0-beta.1 (2020-12-15) + +Version 1.0.0-beta.1 is a beta of our efforts in creating an Azure Synapse Monitoring client library that is developer-friendly, idiomatic to +the Java ecosystem, and as consistent across different languages and platforms as possible. The principles that guide +our efforts can be found in the +[Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java_introduction.html). + +### Features Added + +- It uses Azure Synapse 2019-11-01-preview API +- One client design: + - `MonitoringClient` to monitor jobs in Synapse workspaces +- Reactive streams support using [Project Reactor](https://projectreactor.io/) diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/README.md b/sdk/synapse/azure-analytics-synapse-monitoring/README.md new file mode 100644 index 000000000000..065212f92663 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/README.md @@ -0,0 +1,111 @@ +# Azure Synapse Monitoring client library for Java +Azure Synapse is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics. It gives you the freedom to query data on your terms, using either serverless on-demand or provisioned resources—at scale. Azure Synapse brings these two worlds together with a unified experience to ingest, prepare, manage, and serve data for immediate BI and machine learning needs. + +The Azure Synapse Analytics monitoring client library enables programmatically monitoring your Synapse workspace. + +[Source code][source_code] | [API reference documentation][api_documentation] | [Product documentation][azsynapse_docs] + +## Getting started +### Adding the package to your project +Maven dependency for the Azure Synapse monitoring client library. Add it to your project's POM file. + +[//]: # ({x-version-update-start;com.azure:azure-analytics-synapse-monitoring;current}) +```xml + + com.azure + azure-analytics-synapse-monitoring + 1.0.0-beta.5 + +``` +[//]: # ({x-version-update-end}) + +### Prerequisites +- [Java Development Kit (JDK)][jdk] with version 8 or above +- An [Azure subscription][azure_sub]. +- An existing Azure Synapse workspace. If you need to create an Azure Synapse workspace, you can use the Azure Portal or [Azure CLI][azure_cli]. + ```Bash + az synapse workspace create \ + --name \ + --resource-group \ + --storage-account \ + --file-system \ + --sql-admin-login-user \ + --sql-admin-login-password \ + --location + ``` + +### Authenticate the client +In order to interact with the Azure Synapse service, you'll need to create an instance of the `MonitoringClient` class. You would need a **workspace endpoint** and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object using the default `DefaultAzureCredential` examples shown in this document. + +The `DefaultAzureCredential` way of authentication by providing client secret credentials is being used in this getting started section but you can find more ways to authenticate with [azure-identity][azure_identity]. + +#### Create/Get credentials +To create/get client secret credentials you can use the [Azure Portal][azure_create_application_in_portal], [Azure CLI][azure_synapse_cli_full] or [Azure Cloud Shell](https://shell.azure.com/bash) + +Here is an [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to + + * Create a service principal and configure its access to Azure resources: + + ```Bash + az ad sp create-for-rbac -n --skip-assignment + ``` + + Output: + + ```json + { + "appId": "generated-app-ID", + "displayName": "dummy-app-name", + "name": "http://dummy-app-name", + "password": "random-password", + "tenant": "tenant-ID" + } + ``` + +## Key concepts + +(coming soon) + +## Examples + +(coming soon) + +## Troubleshooting + +### Default HTTP client +All client libraries by default use the Netty HTTP client. Adding the above dependency will automatically configure the client library to use the Netty HTTP client. Configuring or changing the HTTP client is detailed in the [HTTP clients wiki](https://learn.microsoft.com/azure/developer/java/sdk/http-client-pipeline#http-clients). + +### Default SSL library +All client libraries, by default, use the Tomcat-native Boring SSL library to enable native-level performance for SSL operations. The Boring SSL library is an Uber JAR containing native libraries for Linux / macOS / Windows, and provides better performance compared to the default SSL implementation within the JDK. For more information, including how to reduce the dependency size, refer to the [performance tuning][performance_tuning] section of the wiki. + +## Next steps +Several Synapse Java SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Azure Synapse Analytics. + +### Additional documentation +For more extensive documentation on Azure Synapse Analytics, see the [API reference documentation][azsynapse_rest]. + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact with any additional questions or comments. + + +[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/synapse/azure-analytics-synapse-accesscontrol/src +[api_documentation]: https://azure.github.io/azure-sdk-for-java +[azsynapse_docs]: https://learn.microsoft.com/azure/synapse-analytics/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity +[maven]: https://maven.apache.org/ +[azure_subscription]: https://azure.microsoft.com/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/?view=azure-java-stable +[azure_sub]: https://azure.microsoft.com/free/ +[azure_synapse]: https://learn.microsoft.com/azure/synapse-analytics/quickstart-create-workspace +[azure_cli]: https://learn.microsoft.com/cli/azure +[rest_api]: https://learn.microsoft.com/rest/api/synapse/ +[azsynapse_rest]: https://learn.microsoft.com/rest/api/synapse/ +[azure_create_application_in_portal]: https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +[azure_synapse_cli_full]: https://learn.microsoft.com/cli/azure/synapse?view=azure-cli-latest +[performance_tuning]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/performance-tuning.md + diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/checkstyle-suppressions.xml b/sdk/synapse/azure-analytics-synapse-monitoring/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/pom.xml b/sdk/synapse/azure-analytics-synapse-monitoring/pom.xml new file mode 100644 index 000000000000..6e72e7c4db9a --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-analytics-synapse-monitoring + 1.0.0-beta.5 + + Microsoft Azure client library for Synapse Monitoring + This package contains the Microsoft Azure Synapse Analytics Monitoring SDK. + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + true + + false + + + + + com.azure + azure-json + 1.5.1 + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/spotbugs-exclude.xml b/sdk/synapse/azure-analytics-synapse-monitoring/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringAsyncClient.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringAsyncClient.java new file mode 100644 index 000000000000..74491deb270f --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringAsyncClient.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.monitoring; + +import com.azure.analytics.synapse.monitoring.implementation.MonitoringsImpl; +import com.azure.analytics.synapse.monitoring.models.SparkJobListViewResponse; +import com.azure.analytics.synapse.monitoring.models.SqlQueryStringDataModel; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous MonitoringClient type. + */ +@ServiceClient(builder = MonitoringClientBuilder.class, isAsync = true) +public final class MonitoringAsyncClient { + @Generated + private final MonitoringsImpl serviceClient; + + /** + * Initializes an instance of MonitoringAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + MonitoringAsyncClient(MonitoringsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkJobListWithResponse(String xMsClientRequestId) { + return this.serviceClient.getSparkJobListWithResponseAsync(xMsClientRequestId); + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkJobList(String xMsClientRequestId) { + return this.serviceClient.getSparkJobListAsync(xMsClientRequestId); + } + + /** + * Get list of spark applications for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkJobList() { + return this.serviceClient.getSparkJobListAsync(); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSqlJobQueryStringWithResponse(String xMsClientRequestId, + String filter, String orderby, String skip) { + return this.serviceClient.getSqlJobQueryStringWithResponseAsync(xMsClientRequestId, filter, orderby, skip); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSqlJobQueryString(String xMsClientRequestId, String filter, String orderby, + String skip) { + return this.serviceClient.getSqlJobQueryStringAsync(xMsClientRequestId, filter, orderby, skip); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSqlJobQueryString() { + return this.serviceClient.getSqlJobQueryStringAsync(); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringClient.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringClient.java new file mode 100644 index 000000000000..8a876e644f52 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringClient.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.monitoring; + +import com.azure.analytics.synapse.monitoring.implementation.MonitoringsImpl; +import com.azure.analytics.synapse.monitoring.models.SparkJobListViewResponse; +import com.azure.analytics.synapse.monitoring.models.SqlQueryStringDataModel; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Initializes a new instance of the synchronous MonitoringClient type. + */ +@ServiceClient(builder = MonitoringClientBuilder.class) +public final class MonitoringClient { + @Generated + private final MonitoringsImpl serviceClient; + + /** + * Initializes an instance of MonitoringClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + MonitoringClient(MonitoringsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkJobListWithResponse(String xMsClientRequestId, Context context) { + return this.serviceClient.getSparkJobListWithResponse(xMsClientRequestId, context); + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkJobListViewResponse getSparkJobList(String xMsClientRequestId) { + return this.serviceClient.getSparkJobList(xMsClientRequestId); + } + + /** + * Get list of spark applications for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkJobListViewResponse getSparkJobList() { + return this.serviceClient.getSparkJobList(); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSqlJobQueryStringWithResponse(String xMsClientRequestId, String filter, + String orderby, String skip, Context context) { + return this.serviceClient.getSqlJobQueryStringWithResponse(xMsClientRequestId, filter, orderby, skip, context); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SqlQueryStringDataModel getSqlJobQueryString(String xMsClientRequestId, String filter, String orderby, + String skip) { + return this.serviceClient.getSqlJobQueryString(xMsClientRequestId, filter, orderby, skip); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SqlQueryStringDataModel getSqlJobQueryString() { + return this.serviceClient.getSqlJobQueryString(); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringClientBuilder.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringClientBuilder.java new file mode 100644 index 000000000000..77bfc4f232f1 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/MonitoringClientBuilder.java @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.monitoring; + +import com.azure.analytics.synapse.monitoring.implementation.MonitoringClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the MonitoringClient type. + */ +@ServiceClientBuilder(serviceClients = { MonitoringClient.class, MonitoringAsyncClient.class }) +public final class MonitoringClientBuilder + implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://dev.azuresynapse.net/.default" }; + + @Generated + private static final Map PROPERTIES = new HashMap<>(); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the MonitoringClientBuilder. + */ + @Generated + public MonitoringClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MonitoringClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MonitoringClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MonitoringClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MonitoringClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MonitoringClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MonitoringClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MonitoringClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MonitoringClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public MonitoringClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Api Version + */ + @Generated + private String apiVersion; + + /** + * Sets Api Version. + * + * @param apiVersion the apiVersion value. + * @return the MonitoringClientBuilder. + */ + @Generated + public MonitoringClientBuilder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + @Generated + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the MonitoringClientBuilder. + */ + @Generated + public MonitoringClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the MonitoringClientBuilder. + */ + @Generated + public MonitoringClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of MonitoringClientImpl with the provided parameters. + * + * @return an instance of MonitoringClientImpl. + */ + @Generated + private MonitoringClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + String localApiVersion = (apiVersion != null) ? apiVersion : "2020-12-01"; + SerializerAdapter localSerializerAdapter + = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); + MonitoringClientImpl client + = new MonitoringClientImpl(localPipeline, localSerializerAdapter, this.endpoint, localApiVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of MonitoringAsyncClient class. + * + * @return an instance of MonitoringAsyncClient. + */ + @Generated + public MonitoringAsyncClient buildAsyncClient() { + return new MonitoringAsyncClient(buildInnerClient().getMonitorings()); + } + + /** + * Builds an instance of MonitoringClient class. + * + * @return an instance of MonitoringClient. + */ + @Generated + public MonitoringClient buildClient() { + return new MonitoringClient(buildInnerClient().getMonitorings()); + } + + private static final ClientLogger LOGGER = new ClientLogger(MonitoringClientBuilder.class); +} diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/MonitoringClientImpl.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/MonitoringClientImpl.java new file mode 100644 index 000000000000..ba1adb2c4522 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/MonitoringClientImpl.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.monitoring.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the MonitoringClient type. + */ +public final class MonitoringClientImpl { + /** + * The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + */ + private final String endpoint; + + /** + * Gets The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The MonitoringsImpl object to access its operations. + */ + private final MonitoringsImpl monitorings; + + /** + * Gets the MonitoringsImpl object to access its operations. + * + * @return the MonitoringsImpl object. + */ + public MonitoringsImpl getMonitorings() { + return this.monitorings; + } + + /** + * Initializes an instance of MonitoringClient client. + * + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param apiVersion Api Version. + */ + public MonitoringClientImpl(String endpoint, String apiVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion); + } + + /** + * Initializes an instance of MonitoringClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param apiVersion Api Version. + */ + public MonitoringClientImpl(HttpPipeline httpPipeline, String endpoint, String apiVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion); + } + + /** + * Initializes an instance of MonitoringClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param apiVersion Api Version. + */ + public MonitoringClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + String apiVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + this.monitorings = new MonitoringsImpl(this); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/MonitoringsImpl.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/MonitoringsImpl.java new file mode 100644 index 000000000000..1cfedb509d62 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/MonitoringsImpl.java @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.monitoring.implementation; + +import com.azure.analytics.synapse.monitoring.models.SparkJobListViewResponse; +import com.azure.analytics.synapse.monitoring.models.SqlQueryStringDataModel; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Monitorings. + */ +public final class MonitoringsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final MonitoringsService service; + + /** + * The service client containing this operation class. + */ + private final MonitoringClientImpl client; + + /** + * Initializes an instance of MonitoringsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MonitoringsImpl(MonitoringClientImpl client) { + this.service + = RestProxy.create(MonitoringsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MonitoringClientMonitorings to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MonitoringClientMonitorings") + public interface MonitoringsService { + @Get("/monitoring/workloadTypes/spark/Applications") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSparkJobList(@HostParam("endpoint") String endpoint, + @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Get("/monitoring/workloadTypes/sql/querystring") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSqlJobQueryString(@HostParam("endpoint") String endpoint, + @HeaderParam("x-ms-client-request-id") String xMsClientRequestId, + @QueryParam("api-version") String apiVersion, @QueryParam("filter") String filter, + @QueryParam("$orderby") String orderby, @QueryParam("skip") String skip, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkJobListWithResponseAsync(String xMsClientRequestId) { + return FluxUtil.withContext(context -> getSparkJobListWithResponseAsync(xMsClientRequestId, context)); + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkJobListWithResponseAsync(String xMsClientRequestId, + Context context) { + final String accept = "application/json"; + return service.getSparkJobList(this.client.getEndpoint(), xMsClientRequestId, this.client.getApiVersion(), + accept, context); + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkJobListAsync(String xMsClientRequestId) { + return getSparkJobListWithResponseAsync(xMsClientRequestId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get list of spark applications for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkJobListAsync() { + final String xMsClientRequestId = null; + return getSparkJobListWithResponseAsync(xMsClientRequestId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkJobListAsync(String xMsClientRequestId, Context context) { + return getSparkJobListWithResponseAsync(xMsClientRequestId, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkJobListWithResponse(String xMsClientRequestId, Context context) { + return getSparkJobListWithResponseAsync(xMsClientRequestId, context).block(); + } + + /** + * Get list of spark applications for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkJobListViewResponse getSparkJobList(String xMsClientRequestId) { + return getSparkJobListWithResponse(xMsClientRequestId, Context.NONE).getValue(); + } + + /** + * Get list of spark applications for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of spark applications for the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkJobListViewResponse getSparkJobList() { + final String xMsClientRequestId = null; + return getSparkJobListWithResponse(xMsClientRequestId, Context.NONE).getValue(); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSqlJobQueryStringWithResponseAsync(String xMsClientRequestId, + String filter, String orderby, String skip) { + return FluxUtil.withContext( + context -> getSqlJobQueryStringWithResponseAsync(xMsClientRequestId, filter, orderby, skip, context)); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSqlJobQueryStringWithResponseAsync(String xMsClientRequestId, + String filter, String orderby, String skip, Context context) { + final String accept = "application/json"; + return service.getSqlJobQueryString(this.client.getEndpoint(), xMsClientRequestId, this.client.getApiVersion(), + filter, orderby, skip, accept, context); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSqlJobQueryStringAsync(String xMsClientRequestId, String filter, + String orderby, String skip) { + return getSqlJobQueryStringWithResponseAsync(xMsClientRequestId, filter, orderby, skip) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSqlJobQueryStringAsync() { + final String xMsClientRequestId = null; + final String filter = null; + final String orderby = null; + final String skip = null; + return getSqlJobQueryStringWithResponseAsync(xMsClientRequestId, filter, orderby, skip) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSqlJobQueryStringAsync(String xMsClientRequestId, String filter, + String orderby, String skip, Context context) { + return getSqlJobQueryStringWithResponseAsync(xMsClientRequestId, filter, orderby, skip, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSqlJobQueryStringWithResponse(String xMsClientRequestId, String filter, + String orderby, String skip, Context context) { + return getSqlJobQueryStringWithResponseAsync(xMsClientRequestId, filter, orderby, skip, context).block(); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @param xMsClientRequestId Can provide a guid, which is helpful for debugging and to provide better customer + * support. + * @param filter The filter parameter. + * @param orderby The orderby parameter. + * @param skip The skip parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SqlQueryStringDataModel getSqlJobQueryString(String xMsClientRequestId, String filter, String orderby, + String skip) { + return getSqlJobQueryStringWithResponse(xMsClientRequestId, filter, orderby, skip, Context.NONE).getValue(); + } + + /** + * Get SQL OD/DW Query for the workspace. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sQL OD/DW Query for the workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SqlQueryStringDataModel getSqlJobQueryString() { + final String xMsClientRequestId = null; + final String filter = null; + final String orderby = null; + final String skip = null; + return getSqlJobQueryStringWithResponse(xMsClientRequestId, filter, orderby, skip, Context.NONE).getValue(); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/package-info.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/package-info.java new file mode 100644 index 000000000000..1dd170b344f0 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for MonitoringClient. + * null. + */ +package com.azure.analytics.synapse.monitoring.implementation; diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SparkJob.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SparkJob.java new file mode 100644 index 000000000000..456294622424 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SparkJob.java @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.monitoring.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The SparkJob model. + */ +@Fluent +public final class SparkJob implements JsonSerializable { + /* + * The state property. + */ + @Generated + private String state; + + /* + * The name property. + */ + @Generated + private String name; + + /* + * The submitter property. + */ + @Generated + private String submitter; + + /* + * The compute property. + */ + @Generated + private String compute; + + /* + * The sparkApplicationId property. + */ + @Generated + private String sparkApplicationId; + + /* + * The livyId property. + */ + @Generated + private String livyId; + + /* + * The timing property. + */ + @Generated + private List timing; + + /* + * The sparkJobDefinition property. + */ + @Generated + private String sparkJobDefinition; + + /* + * The pipeline property. + */ + @Generated + private List pipeline; + + /* + * The jobType property. + */ + @Generated + private String jobType; + + /* + * The submitTime property. + */ + @Generated + private OffsetDateTime submitTime; + + /* + * The endTime property. + */ + @Generated + private OffsetDateTime endTime; + + /* + * The queuedDuration property. + */ + @Generated + private String queuedDuration; + + /* + * The runningDuration property. + */ + @Generated + private String runningDuration; + + /* + * The totalDuration property. + */ + @Generated + private String totalDuration; + + /** + * Creates an instance of SparkJob class. + */ + @Generated + public SparkJob() { + } + + /** + * Get the state property: The state property. + * + * @return the state value. + */ + @Generated + public String getState() { + return this.state; + } + + /** + * Set the state property: The state property. + * + * @param state the state value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setState(String state) { + this.state = state; + return this; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setName(String name) { + this.name = name; + return this; + } + + /** + * Get the submitter property: The submitter property. + * + * @return the submitter value. + */ + @Generated + public String getSubmitter() { + return this.submitter; + } + + /** + * Set the submitter property: The submitter property. + * + * @param submitter the submitter value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setSubmitter(String submitter) { + this.submitter = submitter; + return this; + } + + /** + * Get the compute property: The compute property. + * + * @return the compute value. + */ + @Generated + public String getCompute() { + return this.compute; + } + + /** + * Set the compute property: The compute property. + * + * @param compute the compute value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setCompute(String compute) { + this.compute = compute; + return this; + } + + /** + * Get the sparkApplicationId property: The sparkApplicationId property. + * + * @return the sparkApplicationId value. + */ + @Generated + public String getSparkApplicationId() { + return this.sparkApplicationId; + } + + /** + * Set the sparkApplicationId property: The sparkApplicationId property. + * + * @param sparkApplicationId the sparkApplicationId value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setSparkApplicationId(String sparkApplicationId) { + this.sparkApplicationId = sparkApplicationId; + return this; + } + + /** + * Get the livyId property: The livyId property. + * + * @return the livyId value. + */ + @Generated + public String getLivyId() { + return this.livyId; + } + + /** + * Set the livyId property: The livyId property. + * + * @param livyId the livyId value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setLivyId(String livyId) { + this.livyId = livyId; + return this; + } + + /** + * Get the timing property: The timing property. + * + * @return the timing value. + */ + @Generated + public List getTiming() { + return this.timing; + } + + /** + * Set the timing property: The timing property. + * + * @param timing the timing value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setTiming(List timing) { + this.timing = timing; + return this; + } + + /** + * Get the sparkJobDefinition property: The sparkJobDefinition property. + * + * @return the sparkJobDefinition value. + */ + @Generated + public String getSparkJobDefinition() { + return this.sparkJobDefinition; + } + + /** + * Set the sparkJobDefinition property: The sparkJobDefinition property. + * + * @param sparkJobDefinition the sparkJobDefinition value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setSparkJobDefinition(String sparkJobDefinition) { + this.sparkJobDefinition = sparkJobDefinition; + return this; + } + + /** + * Get the pipeline property: The pipeline property. + * + * @return the pipeline value. + */ + @Generated + public List getPipeline() { + return this.pipeline; + } + + /** + * Set the pipeline property: The pipeline property. + * + * @param pipeline the pipeline value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setPipeline(List pipeline) { + this.pipeline = pipeline; + return this; + } + + /** + * Get the jobType property: The jobType property. + * + * @return the jobType value. + */ + @Generated + public String getJobType() { + return this.jobType; + } + + /** + * Set the jobType property: The jobType property. + * + * @param jobType the jobType value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setJobType(String jobType) { + this.jobType = jobType; + return this; + } + + /** + * Get the submitTime property: The submitTime property. + * + * @return the submitTime value. + */ + @Generated + public OffsetDateTime getSubmitTime() { + return this.submitTime; + } + + /** + * Set the submitTime property: The submitTime property. + * + * @param submitTime the submitTime value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setSubmitTime(OffsetDateTime submitTime) { + this.submitTime = submitTime; + return this; + } + + /** + * Get the endTime property: The endTime property. + * + * @return the endTime value. + */ + @Generated + public OffsetDateTime getEndTime() { + return this.endTime; + } + + /** + * Set the endTime property: The endTime property. + * + * @param endTime the endTime value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the queuedDuration property: The queuedDuration property. + * + * @return the queuedDuration value. + */ + @Generated + public String getQueuedDuration() { + return this.queuedDuration; + } + + /** + * Set the queuedDuration property: The queuedDuration property. + * + * @param queuedDuration the queuedDuration value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setQueuedDuration(String queuedDuration) { + this.queuedDuration = queuedDuration; + return this; + } + + /** + * Get the runningDuration property: The runningDuration property. + * + * @return the runningDuration value. + */ + @Generated + public String getRunningDuration() { + return this.runningDuration; + } + + /** + * Set the runningDuration property: The runningDuration property. + * + * @param runningDuration the runningDuration value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setRunningDuration(String runningDuration) { + this.runningDuration = runningDuration; + return this; + } + + /** + * Get the totalDuration property: The totalDuration property. + * + * @return the totalDuration value. + */ + @Generated + public String getTotalDuration() { + return this.totalDuration; + } + + /** + * Set the totalDuration property: The totalDuration property. + * + * @param totalDuration the totalDuration value to set. + * @return the SparkJob object itself. + */ + @Generated + public SparkJob setTotalDuration(String totalDuration) { + this.totalDuration = totalDuration; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("submitter", this.submitter); + jsonWriter.writeStringField("compute", this.compute); + jsonWriter.writeStringField("sparkApplicationId", this.sparkApplicationId); + jsonWriter.writeStringField("livyId", this.livyId); + jsonWriter.writeArrayField("timing", this.timing, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("sparkJobDefinition", this.sparkJobDefinition); + jsonWriter.writeArrayField("pipeline", this.pipeline, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("jobType", this.jobType); + jsonWriter.writeStringField("submitTime", + this.submitTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.submitTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeStringField("queuedDuration", this.queuedDuration); + jsonWriter.writeStringField("runningDuration", this.runningDuration); + jsonWriter.writeStringField("totalDuration", this.totalDuration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkJob from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkJob if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the SparkJob. + */ + @Generated + public static SparkJob fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkJob deserializedSparkJob = new SparkJob(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedSparkJob.state = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSparkJob.name = reader.getString(); + } else if ("submitter".equals(fieldName)) { + deserializedSparkJob.submitter = reader.getString(); + } else if ("compute".equals(fieldName)) { + deserializedSparkJob.compute = reader.getString(); + } else if ("sparkApplicationId".equals(fieldName)) { + deserializedSparkJob.sparkApplicationId = reader.getString(); + } else if ("livyId".equals(fieldName)) { + deserializedSparkJob.livyId = reader.getString(); + } else if ("timing".equals(fieldName)) { + List timing = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkJob.timing = timing; + } else if ("sparkJobDefinition".equals(fieldName)) { + deserializedSparkJob.sparkJobDefinition = reader.getString(); + } else if ("pipeline".equals(fieldName)) { + List pipeline = reader.readArray(reader1 -> SparkJob.fromJson(reader1)); + deserializedSparkJob.pipeline = pipeline; + } else if ("jobType".equals(fieldName)) { + deserializedSparkJob.jobType = reader.getString(); + } else if ("submitTime".equals(fieldName)) { + deserializedSparkJob.submitTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedSparkJob.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("queuedDuration".equals(fieldName)) { + deserializedSparkJob.queuedDuration = reader.getString(); + } else if ("runningDuration".equals(fieldName)) { + deserializedSparkJob.runningDuration = reader.getString(); + } else if ("totalDuration".equals(fieldName)) { + deserializedSparkJob.totalDuration = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkJob; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SparkJobListViewResponse.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SparkJobListViewResponse.java new file mode 100644 index 000000000000..6118216858d6 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SparkJobListViewResponse.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.monitoring.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SparkJobListViewResponse model. + */ +@Fluent +public final class SparkJobListViewResponse implements JsonSerializable { + /* + * The nJobs property. + */ + @Generated + private Integer nJobs; + + /* + * The sparkJobs property. + */ + @Generated + private List sparkJobs; + + /** + * Creates an instance of SparkJobListViewResponse class. + */ + @Generated + public SparkJobListViewResponse() { + } + + /** + * Get the nJobs property: The nJobs property. + * + * @return the nJobs value. + */ + @Generated + public Integer getNJobs() { + return this.nJobs; + } + + /** + * Set the nJobs property: The nJobs property. + * + * @param nJobs the nJobs value to set. + * @return the SparkJobListViewResponse object itself. + */ + @Generated + public SparkJobListViewResponse setNJobs(Integer nJobs) { + this.nJobs = nJobs; + return this; + } + + /** + * Get the sparkJobs property: The sparkJobs property. + * + * @return the sparkJobs value. + */ + @Generated + public List getSparkJobs() { + return this.sparkJobs; + } + + /** + * Set the sparkJobs property: The sparkJobs property. + * + * @param sparkJobs the sparkJobs value to set. + * @return the SparkJobListViewResponse object itself. + */ + @Generated + public SparkJobListViewResponse setSparkJobs(List sparkJobs) { + this.sparkJobs = sparkJobs; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("nJobs", this.nJobs); + jsonWriter.writeArrayField("sparkJobs", this.sparkJobs, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkJobListViewResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkJobListViewResponse if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SparkJobListViewResponse. + */ + @Generated + public static SparkJobListViewResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkJobListViewResponse deserializedSparkJobListViewResponse = new SparkJobListViewResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nJobs".equals(fieldName)) { + deserializedSparkJobListViewResponse.nJobs = reader.getNullable(JsonReader::getInt); + } else if ("sparkJobs".equals(fieldName)) { + List sparkJobs = reader.readArray(reader1 -> SparkJob.fromJson(reader1)); + deserializedSparkJobListViewResponse.sparkJobs = sparkJobs; + } else { + reader.skipChildren(); + } + } + + return deserializedSparkJobListViewResponse; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SqlQueryStringDataModel.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SqlQueryStringDataModel.java new file mode 100644 index 000000000000..d01ba30d78c9 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/SqlQueryStringDataModel.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.monitoring.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The SqlQueryStringDataModel model. + */ +@Fluent +public final class SqlQueryStringDataModel implements JsonSerializable { + /* + * The query property. + */ + @Generated + private String query; + + /** + * Creates an instance of SqlQueryStringDataModel class. + */ + @Generated + public SqlQueryStringDataModel() { + } + + /** + * Get the query property: The query property. + * + * @return the query value. + */ + @Generated + public String getQuery() { + return this.query; + } + + /** + * Set the query property: The query property. + * + * @param query the query value to set. + * @return the SqlQueryStringDataModel object itself. + */ + @Generated + public SqlQueryStringDataModel setQuery(String query) { + this.query = query; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("query", this.query); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SqlQueryStringDataModel from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SqlQueryStringDataModel if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SqlQueryStringDataModel. + */ + @Generated + public static SqlQueryStringDataModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SqlQueryStringDataModel deserializedSqlQueryStringDataModel = new SqlQueryStringDataModel(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("query".equals(fieldName)) { + deserializedSqlQueryStringDataModel.query = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSqlQueryStringDataModel; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/package-info.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/package-info.java new file mode 100644 index 000000000000..594b6de4f967 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for MonitoringClient. + * null. + */ +package com.azure.analytics.synapse.monitoring.models; diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/package-info.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/package-info.java new file mode 100644 index 000000000000..1bcd7c474a11 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/com/azure/analytics/synapse/monitoring/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for MonitoringClient. + * null. + */ +package com.azure.analytics.synapse.monitoring; diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/module-info.java b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/module-info.java new file mode 100644 index 000000000000..8561bb33bf3b --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.analytics.synapse.monitoring { + requires transitive com.azure.core; + + exports com.azure.analytics.synapse.monitoring; + exports com.azure.analytics.synapse.monitoring.models; + + opens com.azure.analytics.synapse.monitoring.implementation to com.azure.core; + opens com.azure.analytics.synapse.monitoring.models to com.azure.core; +} diff --git a/sdk/synapse/azure-analytics-synapse-monitoring/swagger/README.md b/sdk/synapse/azure-analytics-synapse-monitoring/swagger/README.md new file mode 100644 index 000000000000..379198482b39 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-monitoring/swagger/README.md @@ -0,0 +1,46 @@ +# Azure Synapse Analytics Monitoring Service for Java + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Synapse Analytics Monitoring Service. +--- +## Getting Started + +To build the SDK for Synapse Analytics Monitoring Service, simply [Install AutoRest](https://aka.ms/autorest) and in +this folder, run: + +> `autorest` +To see additional help and options, run: + +> `autorest --help` +### Setup +```ps +npm install -g autorest +``` + +### Generation + +```ps +cd +autorest +``` + +### Code generation settings + +## Java + +```yaml +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/3d6211cf28f83236cdf78e7cfc50efd3fb7cba72/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/monitoring.json +java: true +use: '@autorest/java@4.1.62' +output-folder: ..\ +generate-client-as-impl: true +generate-sync-async-clients: true +namespace: com.azure.analytics.synapse.monitoring +sync-methods: all +license-header: MICROSOFT_MIT_SMALL +models-subpackage: models +required-parameter-client-methods: true +credential-types: tokencredential +credential-scopes: https://dev.azuresynapse.net/.default +``` diff --git a/sdk/synapse/azure-analytics-synapse-spark/CHANGELOG.md b/sdk/synapse/azure-analytics-synapse-spark/CHANGELOG.md new file mode 100644 index 000000000000..784d0b8dab0c --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/CHANGELOG.md @@ -0,0 +1,57 @@ +# Release History + +## 1.0.0-beta.6 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.5 (2021-10-14) + +### New Features +- Added `ClientOptions` to `SparkClientBuilder` +- Added `LivyStatementStates` and `LivyStates` enum classes. + +### Other Changes +- Re-generate with latest release tag `package-spark-2020-12-01` + +## 1.0.0-beta.4 (2021-08-10) +- Update to 2020-12-01 API version + +## 1.0.0-beta.3 (2021-04-06) + +### Breaking Changes +- Remove `SparkServiceVersion` class + +### Dependency Updates +- Update azure-core to 1.15.0 + +## 1.0.0-beta.2 (2021-02-09) + +- Support specifying the service API version. (AutoRest update) +- Send missing "Accept" request headers + +**Breaking changes:** +- `getMsg()` renamed to `getMessage()` on `SparkStatementCancellationResult` +- `setMsg()` renamed to `setMessage()` on `SparkStatementCancellationResult` +- `PYSPARK` renamed to `PY_SPARK` on `SparkStatementLanguageType` +- `DOTNETSPARK` renamed to `DOT_NET_SPARK` on `SparkStatementLanguageType` + +## 1.0.0-beta.1 (2020-12-08) + +Version 1.0.0-beta.1 is a beta of our efforts in creating an Azure Synapse Spark client library that is developer-friendly, idiomatic to +the Java ecosystem, and as consistent across different languages and platforms as possible. The principles that guide +our efforts can be found in the +[Azure SDK Design Guidelines for Java](https://azure.github.io/azure-sdk/java_introduction.html). + +### New Features + +- It uses Azure Synapse 2019-11-01-preview API +- Two client design: + - `SparkBatchClient` to manage Spark batch jobs + - `SparkSessionClient` to manage Spark sessions and statements +- Reactive streams support using [Project Reactor](https://projectreactor.io/) diff --git a/sdk/synapse/azure-analytics-synapse-spark/README.md b/sdk/synapse/azure-analytics-synapse-spark/README.md new file mode 100644 index 000000000000..a9a78cb9e134 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/README.md @@ -0,0 +1,234 @@ +# Azure Synapse Spark client library for Java +Azure Synapse is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics. It gives you the freedom to query data on your terms, using either serverless on-demand or provisioned resources—at scale. Azure Synapse brings these two worlds together with a unified experience to ingest, prepare, manage, and serve data for immediate BI and machine learning needs. + +The Azure Synapse Analytics Spark client library enables programmatically managing Spark jobs. + +[Source code][source_code] | [API reference documentation][api_documentation] | [Product documentation][azsynapse_docs] | [Samples][spark_samples] + +## Getting started +### Adding the package to your project +Maven dependency for the Azure Synapse Spark client library. Add it to your project's POM file. + +[//]: # ({x-version-update-start;com.azure:azure-analytics-synapse-spark;current}) +```xml + + com.azure + azure-analytics-synapse-spark + 1.0.0-beta.6 + +``` +[//]: # ({x-version-update-end}) + +### Prerequisites +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure subscription][azure_sub]. +- An existing Azure Synapse workspace. If you need to create an Azure Synapse workspace, you can use the [Azure Portal][azure_portal] or [Azure CLI][azure_cli]. + ```Bash + az synapse workspace create \ + --name \ + --resource-group \ + --storage-account \ + --file-system \ + --sql-admin-login-user \ + --sql-admin-login-password \ + --location + ``` + +### Authenticate the client +In order to interact with the Azure Synapse service, you'll need to create an instance of the [SparkClient](#create-spark-client) class. You would need a **workspace endpoint** and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object using the default `DefaultAzureCredential` examples shown in this document. + +The `DefaultAzureCredential` way of authentication by providing client secret credentials is being used in this getting started section but you can find more ways to authenticate with [azure-identity][azure_identity]. + +#### Create/Get credentials +To create/get client secret credentials you can use the [Azure Portal][azure_create_application_in_portal], [Azure CLI][azure_synapse_cli_full] or [Azure Cloud Shell](https://shell.azure.com/bash) + +Here is an [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to + + * Create a service principal and configure its access to Azure resources: + + ```Bash + az ad sp create-for-rbac -n --skip-assignment + ``` + + Output: + + ```json + { + "appId": "generated-app-ID", + "displayName": "dummy-app-name", + "name": "http://dummy-app-name", + "password": "random-password", + "tenant": "tenant-ID" + } + ``` + +#### Create Spark client +Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET**, and **AZURE_TENANT_ID** environment variables and replaced **your-workspace-endpoint** with the URI returned above, you can create Spark clients. For example, the following code creates SparkBatchClient: + +```Java +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.analytics.synapse.spark.SparkBatchClient; +import com.azure.analytics.synapse.spark.SparkClientBuilder; + +SparkBatchClient batchClient = new SparkClientBuilder() + .endpoint("https://{YOUR_WORKSPACE_NAME}.dev.azuresynapse.net") + .sparkPoolName("{SPARK_POOL_NAME}") + .credential(new DefaultAzureCredentialBuilder().build()) + .buildSparkBatchClient(); +``` + +> NOTE: For using an asynchronous client use SparkBatchAsyncClient instead of SparkBatchClient and call `buildSparkBatchAsyncClient()` + +## Key concepts + +### Spark batch Client + +The Spark batch client performs the interactions with the Azure Synapse service for getting, setting, updating, deleting, and listing Spark batch jobs. Asynchronous (SparkBatchAsyncClient) and synchronous (SparkBatchClient) clients exist in the SDK allowing for the selection of a client based on an application's use case. + +## Examples +The Azure.Analytics.Synapse.Spark package supports synchronous and asynchronous APIs. The following section covers some of the most common Azure Synapse Analytics Spark job related tasks: + +### Sync API +The following sections provide several code snippets covering some of the most common Azure Synapse Spark service tasks, including: + +### Spark batch job examples +* [Create a Spark batch job](#create-a-spark-batch-job) +* [List role Spark batch jobs](#list-spark-batch-jobs) +* [Cancel a Spark batch job](#cancel-a-spark-batch-job) + +### Create a Spark batch job + +`createSparkBatchJob` creates a Spark batch job. + +```java +SparkBatchJobOptions options = new SparkBatchJobOptions() + .setName(name) + .setFile(file) + .setClassName("WordCount") + .setArguments(Arrays.asList( + String.format("abfss://%s@%s.dfs.core.windows.net/samples/java/wordcount/shakespeare.txt", fileSystem, storageAccount), + String.format("abfss://%s@%s.dfs.core.windows.net/samples/java/wordcount/result/", fileSystem, storageAccount) + )) + .setDriverMemory("28g") + .setDriverCores(4) + .setExecutorMemory("28g") + .setExecutorCores(4) + .setExecutorCount(2); + +SparkBatchJob jobCreated = batchClient.createSparkBatchJob(options); +``` + +### List Spark batch jobs +`getSparkBatchJobs` enumerates the Spark batch jobs in the Synapse workspace. + +```java +SparkBatchJobCollection jobs = batchClient.getSparkBatchJobs(); +for (SparkBatchJob job : jobs.getSessions()) { + System.out.println(job.getName()); +} +``` + +### Cancel a Spark batch job + +`cancelSparkBatchJob` cancels a Spark batch job by the given job ID. + +```java +batchClient.cancelSparkBatchJob(jobId); +``` + +### Async API +The following sections provide several code snippets covering some of the most common asynchronous Azure Synapse Spark service tasks, including: + +* [Create a Spark job asynchronously](#create-a-spark-job-asynchronously) +* [List Spark jobs asynchronously](#list-spark-batch-jobs-asynchronously) +* [Cancel a Spark batch job asynchronously](#cancel-a-spark-batch-job-asynchronously) + +> Note : You should add `System.in.read()` or `Thread.sleep()` after the function calls in the main class/thread to allow async functions/operations to execute and finish before the main application/thread exits. + +### Create a Spark job asynchronously + +`createSparkBatchJob` creates a Spark batch job. + +```java +String storageAccount = ""; +String fileSystem = ""; +String name = ""; +String file = String.format("abfss://%s@%s.dfs.core.windows.net/samples/java/wordcount/wordcount.jar", fileSystem, storageAccount); +SparkBatchJobOptions options = new SparkBatchJobOptions() + .setName(name) + .setFile(file) + .setClassName("WordCount") + .setArguments(Arrays.asList( + String.format("abfss://%s@%s.dfs.core.windows.net/samples/java/wordcount/shakespeare.txt", fileSystem, storageAccount), + String.format("abfss://%s@%s.dfs.core.windows.net/samples/java/wordcount/result/", fileSystem, storageAccount) + )) + .setDriverMemory("28g") + .setDriverCores(4) + .setExecutorMemory("28g") + .setExecutorCores(4) + .setExecutorCount(2); + +batchClient.createSparkBatchJob(options).subscribe(job -> System.out.printf("Job ID: %f\n", job.getId())); +``` + +### List Spark batch jobs asynchronously +`getSparkBatchJobs` enumerates the Spark batch jobs in the Synapse workspace. + +```java +batchClient.getSparkBatchJobs().subscribe(jobs -> { + for (SparkBatchJob job : jobs.getSessions()) { + System.out.println(job.getName()); + } +}); +``` + +### Cancel a Spark batch job asynchronously + +`cancelSparkBatchJob` deletes a Spark batch job by the job ID. + +```java +batchClient.cancelSparkBatchJob(jobId); +``` + +## Troubleshooting + +### Default HTTP client +All client libraries by default use the Netty HTTP client. Adding the above dependency will automatically configure the client library to use the Netty HTTP client. Configuring or changing the HTTP client is detailed in the [HTTP clients wiki](https://learn.microsoft.com/azure/developer/java/sdk/http-client-pipeline#http-clients). + +### Default SSL library +All client libraries, by default, use the Tomcat-native Boring SSL library to enable native-level performance for SSL operations. The Boring SSL library is an Uber JAR containing native libraries for Linux / macOS / Windows, and provides better performance compared to the default SSL implementation within the JDK. For more information, including how to reduce the dependency size, refer to the [performance tuning][performance_tuning] section of the wiki. + +## Next steps +Several Synapse Java SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Azure Synapse Analytics. + +### Additional documentation +For more extensive documentation on Azure Synapse Analytics, see the [API reference documentation][azsynapse_rest]. + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact with any additional questions or comments. + + +[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/synapse/azure-analytics-synapse-spark/src +[api_documentation]: https://azure.github.io/azure-sdk-for-java +[azsynapse_docs]: https://learn.microsoft.com/azure/synapse-analytics/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity +[maven]: https://maven.apache.org/ +[azure_subscription]: https://azure.microsoft.com/ +[azure_synapse]: https://learn.microsoft.com/azure/synapse-analytics/quickstart-create-workspace +[azure_cli]: https://learn.microsoft.com/cli/azure +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/?view=azure-java-stable +[azure_sub]: https://azure.microsoft.com/free/ +[rest_api]: https://learn.microsoft.com/rest/api/synapse/ +[azsynapse_rest]: https://learn.microsoft.com/rest/api/synapse/ +[azure_create_application_in_portal]: https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +[azure_synapse_cli_full]: https://learn.microsoft.com/cli/azure/synapse?view=azure-cli-latest +[spark_samples]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/synapse/azure-analytics-synapse-spark/src/samples/java/com/azure/analytics/synapse/spark +[performance_tuning]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/performance-tuning.md +[jdk]: https://learn.microsoft.com/java/azure/jdk/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://learn.microsoft.com/azure/synapse-analytics/quickstart-create-workspace diff --git a/sdk/synapse/azure-analytics-synapse-spark/assets.json b/sdk/synapse/azure-analytics-synapse-spark/assets.json new file mode 100644 index 000000000000..363d364debf8 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/synapse/azure-analytics-synapse-spark", + "Tag": "java/synapse/azure-analytics-synapse-spark_61d48916ef" +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/checkstyle-suppressions.xml b/sdk/synapse/azure-analytics-synapse-spark/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/synapse/azure-analytics-synapse-spark/pom.xml b/sdk/synapse/azure-analytics-synapse-spark/pom.xml new file mode 100644 index 000000000000..80cee06ef82a --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/pom.xml @@ -0,0 +1,79 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-analytics-synapse-spark + 1.0.0-beta.6 + + Microsoft Azure client library for Synapse Spark service + This package contains the Microsoft Azure Synapse Analytics Spark SDK. + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + true + + + --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED + --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + --add-opens com.azure.analytics.synapse.spark/com.azure.analytics.synapse.spark=ALL-UNNAMED + + + false + + + + + com.azure + azure-json + 1.5.1 + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + diff --git a/sdk/synapse/azure-analytics-synapse-spark/spotbugs-exclude.xml b/sdk/synapse/azure-analytics-synapse-spark/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkBatchAsyncClient.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkBatchAsyncClient.java new file mode 100644 index 000000000000..3284113bb474 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkBatchAsyncClient.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.implementation.SparkBatchesImpl; +import com.azure.analytics.synapse.spark.models.SparkBatchJob; +import com.azure.analytics.synapse.spark.models.SparkBatchJobCollection; +import com.azure.analytics.synapse.spark.models.SparkBatchJobOptions; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous SparkClient type. + */ +@ServiceClient(builder = SparkClientBuilder.class, isAsync = true) +public final class SparkBatchAsyncClient { + @Generated + private final SparkBatchesImpl serviceClient; + + /** + * Initializes an instance of SparkBatchAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SparkBatchAsyncClient(SparkBatchesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkBatchJobsWithResponse(Integer from, Integer size, + Boolean detailed) { + return this.serviceClient.getSparkBatchJobsWithResponseAsync(from, size, detailed); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJobs(Integer from, Integer size, Boolean detailed) { + return this.serviceClient.getSparkBatchJobsAsync(from, size, detailed); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJobs() { + return this.serviceClient.getSparkBatchJobsAsync(); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSparkBatchJobWithResponse(SparkBatchJobOptions sparkBatchJobOptions, + Boolean detailed) { + return this.serviceClient.createSparkBatchJobWithResponseAsync(sparkBatchJobOptions, detailed); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions, Boolean detailed) { + return this.serviceClient.createSparkBatchJobAsync(sparkBatchJobOptions, detailed); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions) { + return this.serviceClient.createSparkBatchJobAsync(sparkBatchJobOptions); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkBatchJobWithResponse(int batchId, Boolean detailed) { + return this.serviceClient.getSparkBatchJobWithResponseAsync(batchId, detailed); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJob(int batchId, Boolean detailed) { + return this.serviceClient.getSparkBatchJobAsync(batchId, detailed); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJob(int batchId) { + return this.serviceClient.getSparkBatchJobAsync(batchId); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelSparkBatchJobWithResponse(int batchId) { + return this.serviceClient.cancelSparkBatchJobWithResponseAsync(batchId); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelSparkBatchJob(int batchId) { + return this.serviceClient.cancelSparkBatchJobAsync(batchId); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkBatchClient.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkBatchClient.java new file mode 100644 index 000000000000..20b41ea89635 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkBatchClient.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.implementation.SparkBatchesImpl; +import com.azure.analytics.synapse.spark.models.SparkBatchJob; +import com.azure.analytics.synapse.spark.models.SparkBatchJobCollection; +import com.azure.analytics.synapse.spark.models.SparkBatchJobOptions; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Initializes a new instance of the synchronous SparkClient type. + */ +@ServiceClient(builder = SparkClientBuilder.class) +public final class SparkBatchClient { + @Generated + private final SparkBatchesImpl serviceClient; + + /** + * Initializes an instance of SparkBatchClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SparkBatchClient(SparkBatchesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkBatchJobsWithResponse(Integer from, Integer size, Boolean detailed, + Context context) { + return this.serviceClient.getSparkBatchJobsWithResponse(from, size, detailed, context); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJobCollection getSparkBatchJobs(Integer from, Integer size, Boolean detailed) { + return this.serviceClient.getSparkBatchJobs(from, size, detailed); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJobCollection getSparkBatchJobs() { + return this.serviceClient.getSparkBatchJobs(); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSparkBatchJobWithResponse(SparkBatchJobOptions sparkBatchJobOptions, + Boolean detailed, Context context) { + return this.serviceClient.createSparkBatchJobWithResponse(sparkBatchJobOptions, detailed, context); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJob createSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions, Boolean detailed) { + return this.serviceClient.createSparkBatchJob(sparkBatchJobOptions, detailed); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJob createSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions) { + return this.serviceClient.createSparkBatchJob(sparkBatchJobOptions); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkBatchJobWithResponse(int batchId, Boolean detailed, Context context) { + return this.serviceClient.getSparkBatchJobWithResponse(batchId, detailed, context); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJob getSparkBatchJob(int batchId, Boolean detailed) { + return this.serviceClient.getSparkBatchJob(batchId, detailed); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJob getSparkBatchJob(int batchId) { + return this.serviceClient.getSparkBatchJob(batchId); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelSparkBatchJobWithResponse(int batchId, Context context) { + return this.serviceClient.cancelSparkBatchJobWithResponse(batchId, context); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancelSparkBatchJob(int batchId) { + this.serviceClient.cancelSparkBatchJob(batchId); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkClientBuilder.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkClientBuilder.java new file mode 100644 index 000000000000..779da2a16fa5 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkClientBuilder.java @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.implementation.SparkClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.TokenCredentialTrait; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the SparkClient type. + */ +@ServiceClientBuilder( + serviceClients = { + SparkBatchClient.class, + SparkSessionClient.class, + SparkBatchAsyncClient.class, + SparkSessionAsyncClient.class }) +public final class SparkClientBuilder implements HttpTrait, ConfigurationTrait, + TokenCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final String[] DEFAULT_SCOPES = new String[] { "https://dev.azuresynapse.net/.default" }; + + @Generated + private static final Map PROPERTIES = new HashMap<>(); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the SparkClientBuilder. + */ + @Generated + public SparkClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SparkClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SparkClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SparkClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SparkClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SparkClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SparkClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SparkClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The TokenCredential used for authentication. + */ + @Generated + private TokenCredential tokenCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SparkClientBuilder credential(TokenCredential tokenCredential) { + this.tokenCredential = tokenCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public SparkClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Valid api-version for the request. + */ + @Generated + private String livyApiVersion; + + /** + * Sets Valid api-version for the request. + * + * @param livyApiVersion the livyApiVersion value. + * @return the SparkClientBuilder. + */ + @Generated + public SparkClientBuilder livyApiVersion(String livyApiVersion) { + this.livyApiVersion = livyApiVersion; + return this; + } + + /* + * Name of the spark pool. + */ + @Generated + private String sparkPoolName; + + /** + * Sets Name of the spark pool. + * + * @param sparkPoolName the sparkPoolName value. + * @return the SparkClientBuilder. + */ + @Generated + public SparkClientBuilder sparkPoolName(String sparkPoolName) { + this.sparkPoolName = sparkPoolName; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + @Generated + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the SparkClientBuilder. + */ + @Generated + public SparkClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the SparkClientBuilder. + */ + @Generated + public SparkClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of SparkClientImpl with the provided parameters. + * + * @return an instance of SparkClientImpl. + */ + @Generated + private SparkClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + SerializerAdapter localSerializerAdapter + = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); + SparkClientImpl client = new SparkClientImpl(localPipeline, localSerializerAdapter, this.endpoint, + this.livyApiVersion, this.sparkPoolName); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + Objects.requireNonNull(livyApiVersion, "'livyApiVersion' cannot be null."); + Objects.requireNonNull(sparkPoolName, "'sparkPoolName' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (tokenCredential != null) { + policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of SparkBatchAsyncClient class. + * + * @return an instance of SparkBatchAsyncClient. + */ + @Generated + public SparkBatchAsyncClient buildSparkBatchAsyncClient() { + return new SparkBatchAsyncClient(buildInnerClient().getSparkBatches()); + } + + /** + * Builds an instance of SparkSessionAsyncClient class. + * + * @return an instance of SparkSessionAsyncClient. + */ + @Generated + public SparkSessionAsyncClient buildSparkSessionAsyncClient() { + return new SparkSessionAsyncClient(buildInnerClient().getSparkSessions()); + } + + /** + * Builds an instance of SparkBatchClient class. + * + * @return an instance of SparkBatchClient. + */ + @Generated + public SparkBatchClient buildSparkBatchClient() { + return new SparkBatchClient(buildInnerClient().getSparkBatches()); + } + + /** + * Builds an instance of SparkSessionClient class. + * + * @return an instance of SparkSessionClient. + */ + @Generated + public SparkSessionClient buildSparkSessionClient() { + return new SparkSessionClient(buildInnerClient().getSparkSessions()); + } + + private static final ClientLogger LOGGER = new ClientLogger(SparkClientBuilder.class); +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkSessionAsyncClient.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkSessionAsyncClient.java new file mode 100644 index 000000000000..e59f419a60d4 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkSessionAsyncClient.java @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.implementation.SparkSessionsImpl; +import com.azure.analytics.synapse.spark.models.SparkSession; +import com.azure.analytics.synapse.spark.models.SparkSessionCollection; +import com.azure.analytics.synapse.spark.models.SparkSessionOptions; +import com.azure.analytics.synapse.spark.models.SparkStatement; +import com.azure.analytics.synapse.spark.models.SparkStatementCancellationResult; +import com.azure.analytics.synapse.spark.models.SparkStatementCollection; +import com.azure.analytics.synapse.spark.models.SparkStatementOptions; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous SparkClient type. + */ +@ServiceClient(builder = SparkClientBuilder.class, isAsync = true) +public final class SparkSessionAsyncClient { + @Generated + private final SparkSessionsImpl serviceClient; + + /** + * Initializes an instance of SparkSessionAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SparkSessionAsyncClient(SparkSessionsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkSessionsWithResponse(Integer from, Integer size, + Boolean detailed) { + return this.serviceClient.getSparkSessionsWithResponseAsync(from, size, detailed); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSessions(Integer from, Integer size, Boolean detailed) { + return this.serviceClient.getSparkSessionsAsync(from, size, detailed); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSessions() { + return this.serviceClient.getSparkSessionsAsync(); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSparkSessionWithResponse(SparkSessionOptions sparkSessionOptions, + Boolean detailed) { + return this.serviceClient.createSparkSessionWithResponseAsync(sparkSessionOptions, detailed); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkSession(SparkSessionOptions sparkSessionOptions, Boolean detailed) { + return this.serviceClient.createSparkSessionAsync(sparkSessionOptions, detailed); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkSession(SparkSessionOptions sparkSessionOptions) { + return this.serviceClient.createSparkSessionAsync(sparkSessionOptions); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkSessionWithResponse(int sessionId, Boolean detailed) { + return this.serviceClient.getSparkSessionWithResponseAsync(sessionId, detailed); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSession(int sessionId, Boolean detailed) { + return this.serviceClient.getSparkSessionAsync(sessionId, detailed); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSession(int sessionId) { + return this.serviceClient.getSparkSessionAsync(sessionId); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelSparkSessionWithResponse(int sessionId) { + return this.serviceClient.cancelSparkSessionWithResponseAsync(sessionId); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelSparkSession(int sessionId) { + return this.serviceClient.cancelSparkSessionAsync(sessionId); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resetSparkSessionTimeoutWithResponse(int sessionId) { + return this.serviceClient.resetSparkSessionTimeoutWithResponseAsync(sessionId); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resetSparkSessionTimeout(int sessionId) { + return this.serviceClient.resetSparkSessionTimeoutAsync(sessionId); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkStatementsWithResponse(int sessionId) { + return this.serviceClient.getSparkStatementsWithResponseAsync(sessionId); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkStatements(int sessionId) { + return this.serviceClient.getSparkStatementsAsync(sessionId); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSparkStatementWithResponse(int sessionId, + SparkStatementOptions sparkStatementOptions) { + return this.serviceClient.createSparkStatementWithResponseAsync(sessionId, sparkStatementOptions); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkStatement(int sessionId, SparkStatementOptions sparkStatementOptions) { + return this.serviceClient.createSparkStatementAsync(sessionId, sparkStatementOptions); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkStatementWithResponse(int sessionId, int statementId) { + return this.serviceClient.getSparkStatementWithResponseAsync(sessionId, statementId); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkStatement(int sessionId, int statementId) { + return this.serviceClient.getSparkStatementAsync(sessionId, statementId); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelSparkStatementWithResponse(int sessionId, + int statementId) { + return this.serviceClient.cancelSparkStatementWithResponseAsync(sessionId, statementId); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelSparkStatement(int sessionId, int statementId) { + return this.serviceClient.cancelSparkStatementAsync(sessionId, statementId); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkSessionClient.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkSessionClient.java new file mode 100644 index 000000000000..1e9160626182 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/SparkSessionClient.java @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.implementation.SparkSessionsImpl; +import com.azure.analytics.synapse.spark.models.SparkSession; +import com.azure.analytics.synapse.spark.models.SparkSessionCollection; +import com.azure.analytics.synapse.spark.models.SparkSessionOptions; +import com.azure.analytics.synapse.spark.models.SparkStatement; +import com.azure.analytics.synapse.spark.models.SparkStatementCancellationResult; +import com.azure.analytics.synapse.spark.models.SparkStatementCollection; +import com.azure.analytics.synapse.spark.models.SparkStatementOptions; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Initializes a new instance of the synchronous SparkClient type. + */ +@ServiceClient(builder = SparkClientBuilder.class) +public final class SparkSessionClient { + @Generated + private final SparkSessionsImpl serviceClient; + + /** + * Initializes an instance of SparkSessionClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + SparkSessionClient(SparkSessionsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkSessionsWithResponse(Integer from, Integer size, Boolean detailed, + Context context) { + return this.serviceClient.getSparkSessionsWithResponse(from, size, detailed, context); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSessionCollection getSparkSessions(Integer from, Integer size, Boolean detailed) { + return this.serviceClient.getSparkSessions(from, size, detailed); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSessionCollection getSparkSessions() { + return this.serviceClient.getSparkSessions(); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSparkSessionWithResponse(SparkSessionOptions sparkSessionOptions, + Boolean detailed, Context context) { + return this.serviceClient.createSparkSessionWithResponse(sparkSessionOptions, detailed, context); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSession createSparkSession(SparkSessionOptions sparkSessionOptions, Boolean detailed) { + return this.serviceClient.createSparkSession(sparkSessionOptions, detailed); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSession createSparkSession(SparkSessionOptions sparkSessionOptions) { + return this.serviceClient.createSparkSession(sparkSessionOptions); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkSessionWithResponse(int sessionId, Boolean detailed, Context context) { + return this.serviceClient.getSparkSessionWithResponse(sessionId, detailed, context); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSession getSparkSession(int sessionId, Boolean detailed) { + return this.serviceClient.getSparkSession(sessionId, detailed); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSession getSparkSession(int sessionId) { + return this.serviceClient.getSparkSession(sessionId); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelSparkSessionWithResponse(int sessionId, Context context) { + return this.serviceClient.cancelSparkSessionWithResponse(sessionId, context); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancelSparkSession(int sessionId) { + this.serviceClient.cancelSparkSession(sessionId); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetSparkSessionTimeoutWithResponse(int sessionId, Context context) { + return this.serviceClient.resetSparkSessionTimeoutWithResponse(sessionId, context); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetSparkSessionTimeout(int sessionId) { + this.serviceClient.resetSparkSessionTimeout(sessionId); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkStatementsWithResponse(int sessionId, Context context) { + return this.serviceClient.getSparkStatementsWithResponse(sessionId, context); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkStatementCollection getSparkStatements(int sessionId) { + return this.serviceClient.getSparkStatements(sessionId); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSparkStatementWithResponse(int sessionId, + SparkStatementOptions sparkStatementOptions, Context context) { + return this.serviceClient.createSparkStatementWithResponse(sessionId, sparkStatementOptions, context); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkStatement createSparkStatement(int sessionId, SparkStatementOptions sparkStatementOptions) { + return this.serviceClient.createSparkStatement(sessionId, sparkStatementOptions); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkStatementWithResponse(int sessionId, int statementId, Context context) { + return this.serviceClient.getSparkStatementWithResponse(sessionId, statementId, context); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkStatement getSparkStatement(int sessionId, int statementId) { + return this.serviceClient.getSparkStatement(sessionId, statementId); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelSparkStatementWithResponse(int sessionId, int statementId, + Context context) { + return this.serviceClient.cancelSparkStatementWithResponse(sessionId, statementId, context); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkStatementCancellationResult cancelSparkStatement(int sessionId, int statementId) { + return this.serviceClient.cancelSparkStatement(sessionId, statementId); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkBatchesImpl.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkBatchesImpl.java new file mode 100644 index 000000000000..19fe28d19b06 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkBatchesImpl.java @@ -0,0 +1,589 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.implementation; + +import com.azure.analytics.synapse.spark.models.SparkBatchJob; +import com.azure.analytics.synapse.spark.models.SparkBatchJobCollection; +import com.azure.analytics.synapse.spark.models.SparkBatchJobOptions; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SparkBatches. + */ +public final class SparkBatchesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final SparkBatchesService service; + + /** + * The service client containing this operation class. + */ + private final SparkClientImpl client; + + /** + * Initializes an instance of SparkBatchesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SparkBatchesImpl(SparkClientImpl client) { + this.service + = RestProxy.create(SparkBatchesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SparkClientSparkBatches to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "SparkClientSparkBatches") + public interface SparkBatchesService { + @Get("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSparkBatchJobs(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, @QueryParam("from") Integer from, + @QueryParam("size") Integer size, @QueryParam("detailed") Boolean detailed, + @HeaderParam("Accept") String accept, Context context); + + @Post("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createSparkBatchJob(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, + @QueryParam("detailed") Boolean detailed, + @BodyParam("application/json") SparkBatchJobOptions sparkBatchJobOptions, + @HeaderParam("Accept") String accept, Context context); + + @Get("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSparkBatchJob(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, @PathParam("batchId") int batchId, + @QueryParam("detailed") Boolean detailed, @HeaderParam("Accept") String accept, Context context); + + @Delete("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> cancelSparkBatchJob(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, @PathParam("batchId") int batchId, + Context context); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkBatchJobsWithResponseAsync(Integer from, Integer size, + Boolean detailed) { + return FluxUtil.withContext(context -> getSparkBatchJobsWithResponseAsync(from, size, detailed, context)); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkBatchJobsWithResponseAsync(Integer from, Integer size, + Boolean detailed, Context context) { + final String accept = "application/json"; + return service.getSparkBatchJobs(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), from, size, detailed, accept, context); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJobsAsync(Integer from, Integer size, Boolean detailed) { + return getSparkBatchJobsWithResponseAsync(from, size, detailed) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJobsAsync() { + final Integer from = null; + final Integer size = null; + final Boolean detailed = null; + return getSparkBatchJobsWithResponseAsync(from, size, detailed) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJobsAsync(Integer from, Integer size, Boolean detailed, + Context context) { + return getSparkBatchJobsWithResponseAsync(from, size, detailed, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkBatchJobsWithResponse(Integer from, Integer size, Boolean detailed, + Context context) { + return getSparkBatchJobsWithResponseAsync(from, size, detailed, context).block(); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJobCollection getSparkBatchJobs(Integer from, Integer size, Boolean detailed) { + return getSparkBatchJobsWithResponse(from, size, detailed, Context.NONE).getValue(); + } + + /** + * List all spark batch jobs which are running under a particular spark pool. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for batch list operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJobCollection getSparkBatchJobs() { + final Integer from = null; + final Integer size = null; + final Boolean detailed = null; + return getSparkBatchJobsWithResponse(from, size, detailed, Context.NONE).getValue(); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSparkBatchJobWithResponseAsync(SparkBatchJobOptions sparkBatchJobOptions, + Boolean detailed) { + return FluxUtil + .withContext(context -> createSparkBatchJobWithResponseAsync(sparkBatchJobOptions, detailed, context)); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSparkBatchJobWithResponseAsync(SparkBatchJobOptions sparkBatchJobOptions, + Boolean detailed, Context context) { + final String accept = "application/json"; + return service.createSparkBatchJob(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), detailed, sparkBatchJobOptions, accept, context); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkBatchJobAsync(SparkBatchJobOptions sparkBatchJobOptions, Boolean detailed) { + return createSparkBatchJobWithResponseAsync(sparkBatchJobOptions, detailed) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkBatchJobAsync(SparkBatchJobOptions sparkBatchJobOptions) { + final Boolean detailed = null; + return createSparkBatchJobWithResponseAsync(sparkBatchJobOptions, detailed) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkBatchJobAsync(SparkBatchJobOptions sparkBatchJobOptions, Boolean detailed, + Context context) { + return createSparkBatchJobWithResponseAsync(sparkBatchJobOptions, detailed, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSparkBatchJobWithResponse(SparkBatchJobOptions sparkBatchJobOptions, + Boolean detailed, Context context) { + return createSparkBatchJobWithResponseAsync(sparkBatchJobOptions, detailed, context).block(); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJob createSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions, Boolean detailed) { + return createSparkBatchJobWithResponse(sparkBatchJobOptions, detailed, Context.NONE).getValue(); + } + + /** + * Create new spark batch job. + * + * @param sparkBatchJobOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJob createSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions) { + final Boolean detailed = null; + return createSparkBatchJobWithResponse(sparkBatchJobOptions, detailed, Context.NONE).getValue(); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkBatchJobWithResponseAsync(int batchId, Boolean detailed) { + return FluxUtil.withContext(context -> getSparkBatchJobWithResponseAsync(batchId, detailed, context)); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkBatchJobWithResponseAsync(int batchId, Boolean detailed, + Context context) { + final String accept = "application/json"; + return service.getSparkBatchJob(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), batchId, detailed, accept, context); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJobAsync(int batchId, Boolean detailed) { + return getSparkBatchJobWithResponseAsync(batchId, detailed).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJobAsync(int batchId) { + final Boolean detailed = null; + return getSparkBatchJobWithResponseAsync(batchId, detailed).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkBatchJobAsync(int batchId, Boolean detailed, Context context) { + return getSparkBatchJobWithResponseAsync(batchId, detailed, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkBatchJobWithResponse(int batchId, Boolean detailed, Context context) { + return getSparkBatchJobWithResponseAsync(batchId, detailed, context).block(); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJob getSparkBatchJob(int batchId, Boolean detailed) { + return getSparkBatchJobWithResponse(batchId, detailed, Context.NONE).getValue(); + } + + /** + * Gets a single spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark batch job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkBatchJob getSparkBatchJob(int batchId) { + final Boolean detailed = null; + return getSparkBatchJobWithResponse(batchId, detailed, Context.NONE).getValue(); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelSparkBatchJobWithResponseAsync(int batchId) { + return FluxUtil.withContext(context -> cancelSparkBatchJobWithResponseAsync(batchId, context)); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelSparkBatchJobWithResponseAsync(int batchId, Context context) { + return service.cancelSparkBatchJob(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), batchId, context); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelSparkBatchJobAsync(int batchId) { + return cancelSparkBatchJobWithResponseAsync(batchId).flatMap(ignored -> Mono.empty()); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelSparkBatchJobAsync(int batchId, Context context) { + return cancelSparkBatchJobWithResponseAsync(batchId, context).flatMap(ignored -> Mono.empty()); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelSparkBatchJobWithResponse(int batchId, Context context) { + return cancelSparkBatchJobWithResponseAsync(batchId, context).block(); + } + + /** + * Cancels a running spark batch job. + * + * @param batchId Identifier for the batch job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancelSparkBatchJob(int batchId) { + cancelSparkBatchJobWithResponse(batchId, Context.NONE); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkClientImpl.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkClientImpl.java new file mode 100644 index 000000000000..ad85f9a0e738 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkClientImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the SparkClient type. + */ +public final class SparkClientImpl { + /** + * The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + */ + private final String endpoint; + + /** + * Gets The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Valid api-version for the request. + */ + private final String livyApiVersion; + + /** + * Gets Valid api-version for the request. + * + * @return the livyApiVersion value. + */ + public String getLivyApiVersion() { + return this.livyApiVersion; + } + + /** + * Name of the spark pool. + */ + private final String sparkPoolName; + + /** + * Gets Name of the spark pool. + * + * @return the sparkPoolName value. + */ + public String getSparkPoolName() { + return this.sparkPoolName; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The SparkBatchesImpl object to access its operations. + */ + private final SparkBatchesImpl sparkBatches; + + /** + * Gets the SparkBatchesImpl object to access its operations. + * + * @return the SparkBatchesImpl object. + */ + public SparkBatchesImpl getSparkBatches() { + return this.sparkBatches; + } + + /** + * The SparkSessionsImpl object to access its operations. + */ + private final SparkSessionsImpl sparkSessions; + + /** + * Gets the SparkSessionsImpl object to access its operations. + * + * @return the SparkSessionsImpl object. + */ + public SparkSessionsImpl getSparkSessions() { + return this.sparkSessions; + } + + /** + * Initializes an instance of SparkClient client. + * + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param livyApiVersion Valid api-version for the request. + * @param sparkPoolName Name of the spark pool. + */ + public SparkClientImpl(String endpoint, String livyApiVersion, String sparkPoolName) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, livyApiVersion, sparkPoolName); + } + + /** + * Initializes an instance of SparkClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param livyApiVersion Valid api-version for the request. + * @param sparkPoolName Name of the spark pool. + */ + public SparkClientImpl(HttpPipeline httpPipeline, String endpoint, String livyApiVersion, String sparkPoolName) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, livyApiVersion, sparkPoolName); + } + + /** + * Initializes an instance of SparkClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + * @param livyApiVersion Valid api-version for the request. + * @param sparkPoolName Name of the spark pool. + */ + public SparkClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + String livyApiVersion, String sparkPoolName) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.livyApiVersion = livyApiVersion; + this.sparkPoolName = sparkPoolName; + this.sparkBatches = new SparkBatchesImpl(this); + this.sparkSessions = new SparkSessionsImpl(this); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkSessionsImpl.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkSessionsImpl.java new file mode 100644 index 000000000000..aa0f9fccc1f7 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/SparkSessionsImpl.java @@ -0,0 +1,1119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.implementation; + +import com.azure.analytics.synapse.spark.models.SparkSession; +import com.azure.analytics.synapse.spark.models.SparkSessionCollection; +import com.azure.analytics.synapse.spark.models.SparkSessionOptions; +import com.azure.analytics.synapse.spark.models.SparkStatement; +import com.azure.analytics.synapse.spark.models.SparkStatementCancellationResult; +import com.azure.analytics.synapse.spark.models.SparkStatementCollection; +import com.azure.analytics.synapse.spark.models.SparkStatementOptions; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SparkSessions. + */ +public final class SparkSessionsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final SparkSessionsService service; + + /** + * The service client containing this operation class. + */ + private final SparkClientImpl client; + + /** + * Initializes an instance of SparkSessionsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SparkSessionsImpl(SparkClientImpl client) { + this.service + = RestProxy.create(SparkSessionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SparkClientSparkSessions to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "SparkClientSparkSessions") + public interface SparkSessionsService { + @Get("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSparkSessions(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, @QueryParam("from") Integer from, + @QueryParam("size") Integer size, @QueryParam("detailed") Boolean detailed, + @HeaderParam("Accept") String accept, Context context); + + @Post("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createSparkSession(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, + @QueryParam("detailed") Boolean detailed, + @BodyParam("application/json") SparkSessionOptions sparkSessionOptions, + @HeaderParam("Accept") String accept, Context context); + + @Get("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSparkSession(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, + @PathParam("sessionId") int sessionId, @QueryParam("detailed") Boolean detailed, + @HeaderParam("Accept") String accept, Context context); + + @Delete("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> cancelSparkSession(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, + @PathParam("sessionId") int sessionId, Context context); + + @Put("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/reset-timeout") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> resetSparkSessionTimeout(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, + @PathParam("sessionId") int sessionId, Context context); + + @Get("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSparkStatements(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, + @PathParam("sessionId") int sessionId, @HeaderParam("Accept") String accept, Context context); + + @Post("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createSparkStatement(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, + @PathParam("sessionId") int sessionId, + @BodyParam("application/json") SparkStatementOptions sparkStatementOptions, + @HeaderParam("Accept") String accept, Context context); + + @Get("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSparkStatement(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, + @PathParam("sessionId") int sessionId, @PathParam("statementId") int statementId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}/cancel") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> cancelSparkStatement(@HostParam("endpoint") String endpoint, + @PathParam(value = "livyApiVersion", encoded = true) String livyApiVersion, + @PathParam(value = "sparkPoolName", encoded = true) String sparkPoolName, + @PathParam("sessionId") int sessionId, @PathParam("statementId") int statementId, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkSessionsWithResponseAsync(Integer from, Integer size, + Boolean detailed) { + return FluxUtil.withContext(context -> getSparkSessionsWithResponseAsync(from, size, detailed, context)); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkSessionsWithResponseAsync(Integer from, Integer size, + Boolean detailed, Context context) { + final String accept = "application/json"; + return service.getSparkSessions(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), from, size, detailed, accept, context); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSessionsAsync(Integer from, Integer size, Boolean detailed) { + return getSparkSessionsWithResponseAsync(from, size, detailed).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSessionsAsync() { + final Integer from = null; + final Integer size = null; + final Boolean detailed = null; + return getSparkSessionsWithResponseAsync(from, size, detailed).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSessionsAsync(Integer from, Integer size, Boolean detailed, + Context context) { + return getSparkSessionsWithResponseAsync(from, size, detailed, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkSessionsWithResponse(Integer from, Integer size, Boolean detailed, + Context context) { + return getSparkSessionsWithResponseAsync(from, size, detailed, context).block(); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @param from Optional param specifying which index the list should begin from. + * @param size Optional param specifying the size of the returned list. + * By default it is 20 and that is the maximum. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSessionCollection getSparkSessions(Integer from, Integer size, Boolean detailed) { + return getSparkSessionsWithResponse(from, size, detailed, Context.NONE).getValue(); + } + + /** + * List all spark sessions which are running under a particular spark pool. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSessionCollection getSparkSessions() { + final Integer from = null; + final Integer size = null; + final Boolean detailed = null; + return getSparkSessionsWithResponse(from, size, detailed, Context.NONE).getValue(); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSparkSessionWithResponseAsync(SparkSessionOptions sparkSessionOptions, + Boolean detailed) { + return FluxUtil + .withContext(context -> createSparkSessionWithResponseAsync(sparkSessionOptions, detailed, context)); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSparkSessionWithResponseAsync(SparkSessionOptions sparkSessionOptions, + Boolean detailed, Context context) { + final String accept = "application/json"; + return service.createSparkSession(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), detailed, sparkSessionOptions, accept, context); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkSessionAsync(SparkSessionOptions sparkSessionOptions, Boolean detailed) { + return createSparkSessionWithResponseAsync(sparkSessionOptions, detailed) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkSessionAsync(SparkSessionOptions sparkSessionOptions) { + final Boolean detailed = null; + return createSparkSessionWithResponseAsync(sparkSessionOptions, detailed) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkSessionAsync(SparkSessionOptions sparkSessionOptions, Boolean detailed, + Context context) { + return createSparkSessionWithResponseAsync(sparkSessionOptions, detailed, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSparkSessionWithResponse(SparkSessionOptions sparkSessionOptions, + Boolean detailed, Context context) { + return createSparkSessionWithResponseAsync(sparkSessionOptions, detailed, context).block(); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSession createSparkSession(SparkSessionOptions sparkSessionOptions, Boolean detailed) { + return createSparkSessionWithResponse(sparkSessionOptions, detailed, Context.NONE).getValue(); + } + + /** + * Create new spark session. + * + * @param sparkSessionOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSession createSparkSession(SparkSessionOptions sparkSessionOptions) { + final Boolean detailed = null; + return createSparkSessionWithResponse(sparkSessionOptions, detailed, Context.NONE).getValue(); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkSessionWithResponseAsync(int sessionId, Boolean detailed) { + return FluxUtil.withContext(context -> getSparkSessionWithResponseAsync(sessionId, detailed, context)); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkSessionWithResponseAsync(int sessionId, Boolean detailed, + Context context) { + final String accept = "application/json"; + return service.getSparkSession(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), sessionId, detailed, accept, context); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSessionAsync(int sessionId, Boolean detailed) { + return getSparkSessionWithResponseAsync(sessionId, detailed).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSessionAsync(int sessionId) { + final Boolean detailed = null; + return getSparkSessionWithResponseAsync(sessionId, detailed).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkSessionAsync(int sessionId, Boolean detailed, Context context) { + return getSparkSessionWithResponseAsync(sessionId, detailed, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkSessionWithResponse(int sessionId, Boolean detailed, Context context) { + return getSparkSessionWithResponseAsync(sessionId, detailed, context).block(); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @param detailed Optional query param specifying whether detailed response is returned beyond plain livy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSession getSparkSession(int sessionId, Boolean detailed) { + return getSparkSessionWithResponse(sessionId, detailed, Context.NONE).getValue(); + } + + /** + * Gets a single spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single spark session. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkSession getSparkSession(int sessionId) { + final Boolean detailed = null; + return getSparkSessionWithResponse(sessionId, detailed, Context.NONE).getValue(); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelSparkSessionWithResponseAsync(int sessionId) { + return FluxUtil.withContext(context -> cancelSparkSessionWithResponseAsync(sessionId, context)); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelSparkSessionWithResponseAsync(int sessionId, Context context) { + return service.cancelSparkSession(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), sessionId, context); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelSparkSessionAsync(int sessionId) { + return cancelSparkSessionWithResponseAsync(sessionId).flatMap(ignored -> Mono.empty()); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelSparkSessionAsync(int sessionId, Context context) { + return cancelSparkSessionWithResponseAsync(sessionId, context).flatMap(ignored -> Mono.empty()); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelSparkSessionWithResponse(int sessionId, Context context) { + return cancelSparkSessionWithResponseAsync(sessionId, context).block(); + } + + /** + * Cancels a running spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancelSparkSession(int sessionId) { + cancelSparkSessionWithResponse(sessionId, Context.NONE); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resetSparkSessionTimeoutWithResponseAsync(int sessionId) { + return FluxUtil.withContext(context -> resetSparkSessionTimeoutWithResponseAsync(sessionId, context)); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resetSparkSessionTimeoutWithResponseAsync(int sessionId, Context context) { + return service.resetSparkSessionTimeout(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), sessionId, context); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resetSparkSessionTimeoutAsync(int sessionId) { + return resetSparkSessionTimeoutWithResponseAsync(sessionId).flatMap(ignored -> Mono.empty()); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resetSparkSessionTimeoutAsync(int sessionId, Context context) { + return resetSparkSessionTimeoutWithResponseAsync(sessionId, context).flatMap(ignored -> Mono.empty()); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetSparkSessionTimeoutWithResponse(int sessionId, Context context) { + return resetSparkSessionTimeoutWithResponseAsync(sessionId, context).block(); + } + + /** + * Sends a keep alive call to the current session to reset the session timeout. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetSparkSessionTimeout(int sessionId) { + resetSparkSessionTimeoutWithResponse(sessionId, Context.NONE); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkStatementsWithResponseAsync(int sessionId) { + return FluxUtil.withContext(context -> getSparkStatementsWithResponseAsync(sessionId, context)); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkStatementsWithResponseAsync(int sessionId, + Context context) { + final String accept = "application/json"; + return service.getSparkStatements(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), sessionId, accept, context); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkStatementsAsync(int sessionId) { + return getSparkStatementsWithResponseAsync(sessionId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkStatementsAsync(int sessionId, Context context) { + return getSparkStatementsWithResponseAsync(sessionId, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkStatementsWithResponse(int sessionId, Context context) { + return getSparkStatementsWithResponseAsync(sessionId, context).block(); + } + + /** + * Gets a list of statements within a spark session. + * + * @param sessionId Identifier for the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of statements within a spark session. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkStatementCollection getSparkStatements(int sessionId) { + return getSparkStatementsWithResponse(sessionId, Context.NONE).getValue(); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSparkStatementWithResponseAsync(int sessionId, + SparkStatementOptions sparkStatementOptions) { + return FluxUtil + .withContext(context -> createSparkStatementWithResponseAsync(sessionId, sparkStatementOptions, context)); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSparkStatementWithResponseAsync(int sessionId, + SparkStatementOptions sparkStatementOptions, Context context) { + final String accept = "application/json"; + return service.createSparkStatement(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), sessionId, sparkStatementOptions, accept, context); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkStatementAsync(int sessionId, SparkStatementOptions sparkStatementOptions) { + return createSparkStatementWithResponseAsync(sessionId, sparkStatementOptions) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSparkStatementAsync(int sessionId, SparkStatementOptions sparkStatementOptions, + Context context) { + return createSparkStatementWithResponseAsync(sessionId, sparkStatementOptions, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSparkStatementWithResponse(int sessionId, + SparkStatementOptions sparkStatementOptions, Context context) { + return createSparkStatementWithResponseAsync(sessionId, sparkStatementOptions, context).block(); + } + + /** + * Create statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param sparkStatementOptions Livy compatible batch job request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkStatement createSparkStatement(int sessionId, SparkStatementOptions sparkStatementOptions) { + return createSparkStatementWithResponse(sessionId, sparkStatementOptions, Context.NONE).getValue(); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkStatementWithResponseAsync(int sessionId, int statementId) { + return FluxUtil.withContext(context -> getSparkStatementWithResponseAsync(sessionId, statementId, context)); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSparkStatementWithResponseAsync(int sessionId, int statementId, + Context context) { + final String accept = "application/json"; + return service.getSparkStatement(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), sessionId, statementId, accept, context); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkStatementAsync(int sessionId, int statementId) { + return getSparkStatementWithResponseAsync(sessionId, statementId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSparkStatementAsync(int sessionId, int statementId, Context context) { + return getSparkStatementWithResponseAsync(sessionId, statementId, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSparkStatementWithResponse(int sessionId, int statementId, Context context) { + return getSparkStatementWithResponseAsync(sessionId, statementId, context).block(); + } + + /** + * Gets a single statement within a spark session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single statement within a spark session. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkStatement getSparkStatement(int sessionId, int statementId) { + return getSparkStatementWithResponse(sessionId, statementId, Context.NONE).getValue(); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelSparkStatementWithResponseAsync(int sessionId, + int statementId) { + return FluxUtil.withContext(context -> cancelSparkStatementWithResponseAsync(sessionId, statementId, context)); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelSparkStatementWithResponseAsync(int sessionId, + int statementId, Context context) { + final String accept = "application/json"; + return service.cancelSparkStatement(this.client.getEndpoint(), this.client.getLivyApiVersion(), + this.client.getSparkPoolName(), sessionId, statementId, accept, context); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelSparkStatementAsync(int sessionId, int statementId) { + return cancelSparkStatementWithResponseAsync(sessionId, statementId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelSparkStatementAsync(int sessionId, int statementId, + Context context) { + return cancelSparkStatementWithResponseAsync(sessionId, statementId, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelSparkStatementWithResponse(int sessionId, int statementId, + Context context) { + return cancelSparkStatementWithResponseAsync(sessionId, statementId, context).block(); + } + + /** + * Kill a statement within a session. + * + * @param sessionId Identifier for the session. + * @param statementId Identifier for the statement. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SparkStatementCancellationResult cancelSparkStatement(int sessionId, int statementId) { + return cancelSparkStatementWithResponse(sessionId, statementId, Context.NONE).getValue(); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/package-info.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/package-info.java new file mode 100644 index 000000000000..599d9d47aa37 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for SparkClient. + * null. + */ +package com.azure.analytics.synapse.spark.implementation; diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/LivyStatementStates.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/LivyStatementStates.java new file mode 100644 index 000000000000..2d6ce3cca05d --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/LivyStatementStates.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for LivyStatementStates. + */ +public final class LivyStatementStates extends ExpandableStringEnum { + /** + * Static value waiting for LivyStatementStates. + */ + @Generated + public static final LivyStatementStates WAITING = fromString("waiting"); + + /** + * Static value running for LivyStatementStates. + */ + @Generated + public static final LivyStatementStates RUNNING = fromString("running"); + + /** + * Static value available for LivyStatementStates. + */ + @Generated + public static final LivyStatementStates AVAILABLE = fromString("available"); + + /** + * Static value error for LivyStatementStates. + */ + @Generated + public static final LivyStatementStates ERROR = fromString("error"); + + /** + * Static value cancelling for LivyStatementStates. + */ + @Generated + public static final LivyStatementStates CANCELLING = fromString("cancelling"); + + /** + * Static value cancelled for LivyStatementStates. + */ + @Generated + public static final LivyStatementStates CANCELLED = fromString("cancelled"); + + /** + * Creates a new instance of LivyStatementStates value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public LivyStatementStates() { + } + + /** + * Creates or finds a LivyStatementStates from its string representation. + * + * @param name a name to look for. + * @return the corresponding LivyStatementStates. + */ + @Generated + public static LivyStatementStates fromString(String name) { + return fromString(name, LivyStatementStates.class); + } + + /** + * Gets known LivyStatementStates values. + * + * @return known LivyStatementStates values. + */ + @Generated + public static Collection values() { + return values(LivyStatementStates.class); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/LivyStates.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/LivyStates.java new file mode 100644 index 000000000000..2f365d3b8efb --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/LivyStates.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The batch state. + */ +public final class LivyStates extends ExpandableStringEnum { + /** + * Static value not_started for LivyStates. + */ + @Generated + public static final LivyStates NOT_STARTED = fromString("not_started"); + + /** + * Static value starting for LivyStates. + */ + @Generated + public static final LivyStates STARTING = fromString("starting"); + + /** + * Static value idle for LivyStates. + */ + @Generated + public static final LivyStates IDLE = fromString("idle"); + + /** + * Static value busy for LivyStates. + */ + @Generated + public static final LivyStates BUSY = fromString("busy"); + + /** + * Static value shutting_down for LivyStates. + */ + @Generated + public static final LivyStates SHUTTING_DOWN = fromString("shutting_down"); + + /** + * Static value error for LivyStates. + */ + @Generated + public static final LivyStates ERROR = fromString("error"); + + /** + * Static value dead for LivyStates. + */ + @Generated + public static final LivyStates DEAD = fromString("dead"); + + /** + * Static value killed for LivyStates. + */ + @Generated + public static final LivyStates KILLED = fromString("killed"); + + /** + * Static value success for LivyStates. + */ + @Generated + public static final LivyStates SUCCESS = fromString("success"); + + /** + * Static value running for LivyStates. + */ + @Generated + public static final LivyStates RUNNING = fromString("running"); + + /** + * Static value recovering for LivyStates. + */ + @Generated + public static final LivyStates RECOVERING = fromString("recovering"); + + /** + * Creates a new instance of LivyStates value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public LivyStates() { + } + + /** + * Creates or finds a LivyStates from its string representation. + * + * @param name a name to look for. + * @return the corresponding LivyStates. + */ + @Generated + public static LivyStates fromString(String name) { + return fromString(name, LivyStates.class); + } + + /** + * Gets known LivyStates values. + * + * @return known LivyStates values. + */ + @Generated + public static Collection values() { + return values(LivyStates.class); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/PluginCurrentState.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/PluginCurrentState.java new file mode 100644 index 000000000000..4c047b81b12c --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/PluginCurrentState.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for PluginCurrentState. + */ +public final class PluginCurrentState extends ExpandableStringEnum { + /** + * Static value Preparation for PluginCurrentState. + */ + @Generated + public static final PluginCurrentState PREPARATION = fromString("Preparation"); + + /** + * Static value ResourceAcquisition for PluginCurrentState. + */ + @Generated + public static final PluginCurrentState RESOURCE_ACQUISITION = fromString("ResourceAcquisition"); + + /** + * Static value Queued for PluginCurrentState. + */ + @Generated + public static final PluginCurrentState QUEUED = fromString("Queued"); + + /** + * Static value Submission for PluginCurrentState. + */ + @Generated + public static final PluginCurrentState SUBMISSION = fromString("Submission"); + + /** + * Static value Monitoring for PluginCurrentState. + */ + @Generated + public static final PluginCurrentState MONITORING = fromString("Monitoring"); + + /** + * Static value Cleanup for PluginCurrentState. + */ + @Generated + public static final PluginCurrentState CLEANUP = fromString("Cleanup"); + + /** + * Static value Ended for PluginCurrentState. + */ + @Generated + public static final PluginCurrentState ENDED = fromString("Ended"); + + /** + * Creates a new instance of PluginCurrentState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public PluginCurrentState() { + } + + /** + * Creates or finds a PluginCurrentState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PluginCurrentState. + */ + @Generated + public static PluginCurrentState fromString(String name) { + return fromString(name, PluginCurrentState.class); + } + + /** + * Gets known PluginCurrentState values. + * + * @return known PluginCurrentState values. + */ + @Generated + public static Collection values() { + return values(PluginCurrentState.class); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SchedulerCurrentState.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SchedulerCurrentState.java new file mode 100644 index 000000000000..19748ecb4537 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SchedulerCurrentState.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for SchedulerCurrentState. + */ +public final class SchedulerCurrentState extends ExpandableStringEnum { + /** + * Static value Queued for SchedulerCurrentState. + */ + @Generated + public static final SchedulerCurrentState QUEUED = fromString("Queued"); + + /** + * Static value Scheduled for SchedulerCurrentState. + */ + @Generated + public static final SchedulerCurrentState SCHEDULED = fromString("Scheduled"); + + /** + * Static value Ended for SchedulerCurrentState. + */ + @Generated + public static final SchedulerCurrentState ENDED = fromString("Ended"); + + /** + * Creates a new instance of SchedulerCurrentState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public SchedulerCurrentState() { + } + + /** + * Creates or finds a SchedulerCurrentState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SchedulerCurrentState. + */ + @Generated + public static SchedulerCurrentState fromString(String name) { + return fromString(name, SchedulerCurrentState.class); + } + + /** + * Gets known SchedulerCurrentState values. + * + * @return known SchedulerCurrentState values. + */ + @Generated + public static Collection values() { + return values(SchedulerCurrentState.class); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJob.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJob.java new file mode 100644 index 000000000000..d7879d24b44e --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJob.java @@ -0,0 +1,626 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The SparkBatchJob model. + */ +@Fluent +public final class SparkBatchJob implements JsonSerializable { + /* + * The livyInfo property. + */ + @Generated + private SparkBatchJobState livyInfo; + + /* + * The batch name. + */ + @Generated + private String name; + + /* + * The workspace name. + */ + @Generated + private String workspaceName; + + /* + * The Spark pool name. + */ + @Generated + private String sparkPoolName; + + /* + * The submitter name. + */ + @Generated + private String submitterName; + + /* + * The submitter identifier. + */ + @Generated + private String submitterId; + + /* + * The artifact identifier. + */ + @Generated + private String artifactId; + + /* + * The job type. + */ + @Generated + private SparkJobType jobType; + + /* + * The Spark batch job result. + */ + @Generated + private SparkBatchJobResultType result; + + /* + * The scheduler information. + */ + @Generated + private SparkScheduler scheduler; + + /* + * The plugin information. + */ + @Generated + private SparkServicePlugin plugin; + + /* + * The error information. + */ + @Generated + private List errors; + + /* + * The tags. + */ + @Generated + private Map tags; + + /* + * The session Id. + */ + @Generated + private int id; + + /* + * The application id of this session + */ + @Generated + private String appId; + + /* + * The detailed application info. + */ + @Generated + private Map appInfo; + + /* + * The batch state + */ + @Generated + private LivyStates state; + + /* + * The log lines. + */ + @Generated + private List logLines; + + /** + * Creates an instance of SparkBatchJob class. + */ + @Generated + public SparkBatchJob() { + } + + /** + * Get the livyInfo property: The livyInfo property. + * + * @return the livyInfo value. + */ + @Generated + public SparkBatchJobState getLivyInfo() { + return this.livyInfo; + } + + /** + * Set the livyInfo property: The livyInfo property. + * + * @param livyInfo the livyInfo value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setLivyInfo(SparkBatchJobState livyInfo) { + this.livyInfo = livyInfo; + return this; + } + + /** + * Get the name property: The batch name. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The batch name. + * + * @param name the name value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setName(String name) { + this.name = name; + return this; + } + + /** + * Get the workspaceName property: The workspace name. + * + * @return the workspaceName value. + */ + @Generated + public String getWorkspaceName() { + return this.workspaceName; + } + + /** + * Set the workspaceName property: The workspace name. + * + * @param workspaceName the workspaceName value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setWorkspaceName(String workspaceName) { + this.workspaceName = workspaceName; + return this; + } + + /** + * Get the sparkPoolName property: The Spark pool name. + * + * @return the sparkPoolName value. + */ + @Generated + public String getSparkPoolName() { + return this.sparkPoolName; + } + + /** + * Set the sparkPoolName property: The Spark pool name. + * + * @param sparkPoolName the sparkPoolName value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setSparkPoolName(String sparkPoolName) { + this.sparkPoolName = sparkPoolName; + return this; + } + + /** + * Get the submitterName property: The submitter name. + * + * @return the submitterName value. + */ + @Generated + public String getSubmitterName() { + return this.submitterName; + } + + /** + * Set the submitterName property: The submitter name. + * + * @param submitterName the submitterName value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setSubmitterName(String submitterName) { + this.submitterName = submitterName; + return this; + } + + /** + * Get the submitterId property: The submitter identifier. + * + * @return the submitterId value. + */ + @Generated + public String getSubmitterId() { + return this.submitterId; + } + + /** + * Set the submitterId property: The submitter identifier. + * + * @param submitterId the submitterId value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setSubmitterId(String submitterId) { + this.submitterId = submitterId; + return this; + } + + /** + * Get the artifactId property: The artifact identifier. + * + * @return the artifactId value. + */ + @Generated + public String getArtifactId() { + return this.artifactId; + } + + /** + * Set the artifactId property: The artifact identifier. + * + * @param artifactId the artifactId value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setArtifactId(String artifactId) { + this.artifactId = artifactId; + return this; + } + + /** + * Get the jobType property: The job type. + * + * @return the jobType value. + */ + @Generated + public SparkJobType getJobType() { + return this.jobType; + } + + /** + * Set the jobType property: The job type. + * + * @param jobType the jobType value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setJobType(SparkJobType jobType) { + this.jobType = jobType; + return this; + } + + /** + * Get the result property: The Spark batch job result. + * + * @return the result value. + */ + @Generated + public SparkBatchJobResultType getResult() { + return this.result; + } + + /** + * Set the result property: The Spark batch job result. + * + * @param result the result value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setResult(SparkBatchJobResultType result) { + this.result = result; + return this; + } + + /** + * Get the scheduler property: The scheduler information. + * + * @return the scheduler value. + */ + @Generated + public SparkScheduler getScheduler() { + return this.scheduler; + } + + /** + * Set the scheduler property: The scheduler information. + * + * @param scheduler the scheduler value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setScheduler(SparkScheduler scheduler) { + this.scheduler = scheduler; + return this; + } + + /** + * Get the plugin property: The plugin information. + * + * @return the plugin value. + */ + @Generated + public SparkServicePlugin getPlugin() { + return this.plugin; + } + + /** + * Set the plugin property: The plugin information. + * + * @param plugin the plugin value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setPlugin(SparkServicePlugin plugin) { + this.plugin = plugin; + return this; + } + + /** + * Get the errors property: The error information. + * + * @return the errors value. + */ + @Generated + public List getErrors() { + return this.errors; + } + + /** + * Set the errors property: The error information. + * + * @param errors the errors value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setErrors(List errors) { + this.errors = errors; + return this; + } + + /** + * Get the tags property: The tags. + * + * @return the tags value. + */ + @Generated + public Map getTags() { + return this.tags; + } + + /** + * Set the tags property: The tags. + * + * @param tags the tags value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the id property: The session Id. + * + * @return the id value. + */ + @Generated + public int getId() { + return this.id; + } + + /** + * Set the id property: The session Id. + * + * @param id the id value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setId(int id) { + this.id = id; + return this; + } + + /** + * Get the appId property: The application id of this session. + * + * @return the appId value. + */ + @Generated + public String getAppId() { + return this.appId; + } + + /** + * Set the appId property: The application id of this session. + * + * @param appId the appId value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setAppId(String appId) { + this.appId = appId; + return this; + } + + /** + * Get the appInfo property: The detailed application info. + * + * @return the appInfo value. + */ + @Generated + public Map getAppInfo() { + return this.appInfo; + } + + /** + * Set the appInfo property: The detailed application info. + * + * @param appInfo the appInfo value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setAppInfo(Map appInfo) { + this.appInfo = appInfo; + return this; + } + + /** + * Get the state property: The batch state. + * + * @return the state value. + */ + @Generated + public LivyStates getState() { + return this.state; + } + + /** + * Set the state property: The batch state. + * + * @param state the state value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setState(LivyStates state) { + this.state = state; + return this; + } + + /** + * Get the logLines property: The log lines. + * + * @return the logLines value. + */ + @Generated + public List getLogLines() { + return this.logLines; + } + + /** + * Set the logLines property: The log lines. + * + * @param logLines the logLines value to set. + * @return the SparkBatchJob object itself. + */ + @Generated + public SparkBatchJob setLogLines(List logLines) { + this.logLines = logLines; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("id", this.id); + jsonWriter.writeJsonField("livyInfo", this.livyInfo); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("workspaceName", this.workspaceName); + jsonWriter.writeStringField("sparkPoolName", this.sparkPoolName); + jsonWriter.writeStringField("submitterName", this.submitterName); + jsonWriter.writeStringField("submitterId", this.submitterId); + jsonWriter.writeStringField("artifactId", this.artifactId); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeStringField("result", this.result == null ? null : this.result.toString()); + jsonWriter.writeJsonField("schedulerInfo", this.scheduler); + jsonWriter.writeJsonField("pluginInfo", this.plugin); + jsonWriter.writeArrayField("errorInfo", this.errors, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("appId", this.appId); + jsonWriter.writeMapField("appInfo", this.appInfo, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeArrayField("log", this.logLines, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkBatchJob from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkBatchJob if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SparkBatchJob. + */ + @Generated + public static SparkBatchJob fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkBatchJob deserializedSparkBatchJob = new SparkBatchJob(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSparkBatchJob.id = reader.getInt(); + } else if ("livyInfo".equals(fieldName)) { + deserializedSparkBatchJob.livyInfo = SparkBatchJobState.fromJson(reader); + } else if ("name".equals(fieldName)) { + deserializedSparkBatchJob.name = reader.getString(); + } else if ("workspaceName".equals(fieldName)) { + deserializedSparkBatchJob.workspaceName = reader.getString(); + } else if ("sparkPoolName".equals(fieldName)) { + deserializedSparkBatchJob.sparkPoolName = reader.getString(); + } else if ("submitterName".equals(fieldName)) { + deserializedSparkBatchJob.submitterName = reader.getString(); + } else if ("submitterId".equals(fieldName)) { + deserializedSparkBatchJob.submitterId = reader.getString(); + } else if ("artifactId".equals(fieldName)) { + deserializedSparkBatchJob.artifactId = reader.getString(); + } else if ("jobType".equals(fieldName)) { + deserializedSparkBatchJob.jobType = SparkJobType.fromString(reader.getString()); + } else if ("result".equals(fieldName)) { + deserializedSparkBatchJob.result = SparkBatchJobResultType.fromString(reader.getString()); + } else if ("schedulerInfo".equals(fieldName)) { + deserializedSparkBatchJob.scheduler = SparkScheduler.fromJson(reader); + } else if ("pluginInfo".equals(fieldName)) { + deserializedSparkBatchJob.plugin = SparkServicePlugin.fromJson(reader); + } else if ("errorInfo".equals(fieldName)) { + List errors = reader.readArray(reader1 -> SparkServiceError.fromJson(reader1)); + deserializedSparkBatchJob.errors = errors; + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkBatchJob.tags = tags; + } else if ("appId".equals(fieldName)) { + deserializedSparkBatchJob.appId = reader.getString(); + } else if ("appInfo".equals(fieldName)) { + Map appInfo = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkBatchJob.appInfo = appInfo; + } else if ("state".equals(fieldName)) { + deserializedSparkBatchJob.state = LivyStates.fromString(reader.getString()); + } else if ("log".equals(fieldName)) { + List logLines = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkBatchJob.logLines = logLines; + } else { + reader.skipChildren(); + } + } + + return deserializedSparkBatchJob; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobCollection.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobCollection.java new file mode 100644 index 000000000000..085104bf7171 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobCollection.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Response for batch list operation. + */ +@Fluent +public final class SparkBatchJobCollection implements JsonSerializable { + /* + * The start index of fetched sessions. + */ + @Generated + private int from; + + /* + * Number of sessions fetched. + */ + @Generated + private int total; + + /* + * Batch list + */ + @Generated + private List sessions; + + /** + * Creates an instance of SparkBatchJobCollection class. + */ + @Generated + public SparkBatchJobCollection() { + } + + /** + * Get the from property: The start index of fetched sessions. + * + * @return the from value. + */ + @Generated + public int getFrom() { + return this.from; + } + + /** + * Set the from property: The start index of fetched sessions. + * + * @param from the from value to set. + * @return the SparkBatchJobCollection object itself. + */ + @Generated + public SparkBatchJobCollection setFrom(int from) { + this.from = from; + return this; + } + + /** + * Get the total property: Number of sessions fetched. + * + * @return the total value. + */ + @Generated + public int getTotal() { + return this.total; + } + + /** + * Set the total property: Number of sessions fetched. + * + * @param total the total value to set. + * @return the SparkBatchJobCollection object itself. + */ + @Generated + public SparkBatchJobCollection setTotal(int total) { + this.total = total; + return this; + } + + /** + * Get the sessions property: Batch list. + * + * @return the sessions value. + */ + @Generated + public List getSessions() { + return this.sessions; + } + + /** + * Set the sessions property: Batch list. + * + * @param sessions the sessions value to set. + * @return the SparkBatchJobCollection object itself. + */ + @Generated + public SparkBatchJobCollection setSessions(List sessions) { + this.sessions = sessions; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("from", this.from); + jsonWriter.writeIntField("total", this.total); + jsonWriter.writeArrayField("sessions", this.sessions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkBatchJobCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkBatchJobCollection if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SparkBatchJobCollection. + */ + @Generated + public static SparkBatchJobCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkBatchJobCollection deserializedSparkBatchJobCollection = new SparkBatchJobCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("from".equals(fieldName)) { + deserializedSparkBatchJobCollection.from = reader.getInt(); + } else if ("total".equals(fieldName)) { + deserializedSparkBatchJobCollection.total = reader.getInt(); + } else if ("sessions".equals(fieldName)) { + List sessions = reader.readArray(reader1 -> SparkBatchJob.fromJson(reader1)); + deserializedSparkBatchJobCollection.sessions = sessions; + } else { + reader.skipChildren(); + } + } + + return deserializedSparkBatchJobCollection; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobOptions.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobOptions.java new file mode 100644 index 000000000000..644654889274 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobOptions.java @@ -0,0 +1,567 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The SparkBatchJobOptions model. + */ +@Fluent +public final class SparkBatchJobOptions implements JsonSerializable { + /* + * Dictionary of + */ + @Generated + private Map tags; + + /* + * The artifactId property. + */ + @Generated + private String artifactId; + + /* + * The name property. + */ + @Generated + private String name; + + /* + * The file property. + */ + @Generated + private String file; + + /* + * The className property. + */ + @Generated + private String className; + + /* + * The args property. + */ + @Generated + private List arguments; + + /* + * The jars property. + */ + @Generated + private List jars; + + /* + * The pyFiles property. + */ + @Generated + private List pythonFiles; + + /* + * The files property. + */ + @Generated + private List files; + + /* + * The archives property. + */ + @Generated + private List archives; + + /* + * Dictionary of + */ + @Generated + private Map configuration; + + /* + * The driverMemory property. + */ + @Generated + private String driverMemory; + + /* + * The driverCores property. + */ + @Generated + private Integer driverCores; + + /* + * The executorMemory property. + */ + @Generated + private String executorMemory; + + /* + * The executorCores property. + */ + @Generated + private Integer executorCores; + + /* + * The numExecutors property. + */ + @Generated + private Integer executorCount; + + /** + * Creates an instance of SparkBatchJobOptions class. + */ + @Generated + public SparkBatchJobOptions() { + } + + /** + * Get the tags property: Dictionary of <string>. + * + * @return the tags value. + */ + @Generated + public Map getTags() { + return this.tags; + } + + /** + * Set the tags property: Dictionary of <string>. + * + * @param tags the tags value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the artifactId property: The artifactId property. + * + * @return the artifactId value. + */ + @Generated + public String getArtifactId() { + return this.artifactId; + } + + /** + * Set the artifactId property: The artifactId property. + * + * @param artifactId the artifactId value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setArtifactId(String artifactId) { + this.artifactId = artifactId; + return this; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setName(String name) { + this.name = name; + return this; + } + + /** + * Get the file property: The file property. + * + * @return the file value. + */ + @Generated + public String getFile() { + return this.file; + } + + /** + * Set the file property: The file property. + * + * @param file the file value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setFile(String file) { + this.file = file; + return this; + } + + /** + * Get the className property: The className property. + * + * @return the className value. + */ + @Generated + public String getClassName() { + return this.className; + } + + /** + * Set the className property: The className property. + * + * @param className the className value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setClassName(String className) { + this.className = className; + return this; + } + + /** + * Get the arguments property: The args property. + * + * @return the arguments value. + */ + @Generated + public List getArguments() { + return this.arguments; + } + + /** + * Set the arguments property: The args property. + * + * @param arguments the arguments value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setArguments(List arguments) { + this.arguments = arguments; + return this; + } + + /** + * Get the jars property: The jars property. + * + * @return the jars value. + */ + @Generated + public List getJars() { + return this.jars; + } + + /** + * Set the jars property: The jars property. + * + * @param jars the jars value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setJars(List jars) { + this.jars = jars; + return this; + } + + /** + * Get the pythonFiles property: The pyFiles property. + * + * @return the pythonFiles value. + */ + @Generated + public List getPythonFiles() { + return this.pythonFiles; + } + + /** + * Set the pythonFiles property: The pyFiles property. + * + * @param pythonFiles the pythonFiles value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setPythonFiles(List pythonFiles) { + this.pythonFiles = pythonFiles; + return this; + } + + /** + * Get the files property: The files property. + * + * @return the files value. + */ + @Generated + public List getFiles() { + return this.files; + } + + /** + * Set the files property: The files property. + * + * @param files the files value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setFiles(List files) { + this.files = files; + return this; + } + + /** + * Get the archives property: The archives property. + * + * @return the archives value. + */ + @Generated + public List getArchives() { + return this.archives; + } + + /** + * Set the archives property: The archives property. + * + * @param archives the archives value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setArchives(List archives) { + this.archives = archives; + return this; + } + + /** + * Get the configuration property: Dictionary of <string>. + * + * @return the configuration value. + */ + @Generated + public Map getConfiguration() { + return this.configuration; + } + + /** + * Set the configuration property: Dictionary of <string>. + * + * @param configuration the configuration value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setConfiguration(Map configuration) { + this.configuration = configuration; + return this; + } + + /** + * Get the driverMemory property: The driverMemory property. + * + * @return the driverMemory value. + */ + @Generated + public String getDriverMemory() { + return this.driverMemory; + } + + /** + * Set the driverMemory property: The driverMemory property. + * + * @param driverMemory the driverMemory value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setDriverMemory(String driverMemory) { + this.driverMemory = driverMemory; + return this; + } + + /** + * Get the driverCores property: The driverCores property. + * + * @return the driverCores value. + */ + @Generated + public Integer getDriverCores() { + return this.driverCores; + } + + /** + * Set the driverCores property: The driverCores property. + * + * @param driverCores the driverCores value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setDriverCores(Integer driverCores) { + this.driverCores = driverCores; + return this; + } + + /** + * Get the executorMemory property: The executorMemory property. + * + * @return the executorMemory value. + */ + @Generated + public String getExecutorMemory() { + return this.executorMemory; + } + + /** + * Set the executorMemory property: The executorMemory property. + * + * @param executorMemory the executorMemory value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setExecutorMemory(String executorMemory) { + this.executorMemory = executorMemory; + return this; + } + + /** + * Get the executorCores property: The executorCores property. + * + * @return the executorCores value. + */ + @Generated + public Integer getExecutorCores() { + return this.executorCores; + } + + /** + * Set the executorCores property: The executorCores property. + * + * @param executorCores the executorCores value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setExecutorCores(Integer executorCores) { + this.executorCores = executorCores; + return this; + } + + /** + * Get the executorCount property: The numExecutors property. + * + * @return the executorCount value. + */ + @Generated + public Integer getExecutorCount() { + return this.executorCount; + } + + /** + * Set the executorCount property: The numExecutors property. + * + * @param executorCount the executorCount value to set. + * @return the SparkBatchJobOptions object itself. + */ + @Generated + public SparkBatchJobOptions setExecutorCount(Integer executorCount) { + this.executorCount = executorCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("file", this.file); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("artifactId", this.artifactId); + jsonWriter.writeStringField("className", this.className); + jsonWriter.writeArrayField("args", this.arguments, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("jars", this.jars, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("pyFiles", this.pythonFiles, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("files", this.files, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("archives", this.archives, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("conf", this.configuration, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("driverMemory", this.driverMemory); + jsonWriter.writeNumberField("driverCores", this.driverCores); + jsonWriter.writeStringField("executorMemory", this.executorMemory); + jsonWriter.writeNumberField("executorCores", this.executorCores); + jsonWriter.writeNumberField("numExecutors", this.executorCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkBatchJobOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkBatchJobOptions if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SparkBatchJobOptions. + */ + @Generated + public static SparkBatchJobOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkBatchJobOptions deserializedSparkBatchJobOptions = new SparkBatchJobOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSparkBatchJobOptions.name = reader.getString(); + } else if ("file".equals(fieldName)) { + deserializedSparkBatchJobOptions.file = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkBatchJobOptions.tags = tags; + } else if ("artifactId".equals(fieldName)) { + deserializedSparkBatchJobOptions.artifactId = reader.getString(); + } else if ("className".equals(fieldName)) { + deserializedSparkBatchJobOptions.className = reader.getString(); + } else if ("args".equals(fieldName)) { + List arguments = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkBatchJobOptions.arguments = arguments; + } else if ("jars".equals(fieldName)) { + List jars = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkBatchJobOptions.jars = jars; + } else if ("pyFiles".equals(fieldName)) { + List pythonFiles = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkBatchJobOptions.pythonFiles = pythonFiles; + } else if ("files".equals(fieldName)) { + List files = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkBatchJobOptions.files = files; + } else if ("archives".equals(fieldName)) { + List archives = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkBatchJobOptions.archives = archives; + } else if ("conf".equals(fieldName)) { + Map configuration = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkBatchJobOptions.configuration = configuration; + } else if ("driverMemory".equals(fieldName)) { + deserializedSparkBatchJobOptions.driverMemory = reader.getString(); + } else if ("driverCores".equals(fieldName)) { + deserializedSparkBatchJobOptions.driverCores = reader.getNullable(JsonReader::getInt); + } else if ("executorMemory".equals(fieldName)) { + deserializedSparkBatchJobOptions.executorMemory = reader.getString(); + } else if ("executorCores".equals(fieldName)) { + deserializedSparkBatchJobOptions.executorCores = reader.getNullable(JsonReader::getInt); + } else if ("numExecutors".equals(fieldName)) { + deserializedSparkBatchJobOptions.executorCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkBatchJobOptions; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobResultType.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobResultType.java new file mode 100644 index 000000000000..0c22b10728fd --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobResultType.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The Spark batch job result. + */ +public final class SparkBatchJobResultType extends ExpandableStringEnum { + /** + * Static value Uncertain for SparkBatchJobResultType. + */ + @Generated + public static final SparkBatchJobResultType UNCERTAIN = fromString("Uncertain"); + + /** + * Static value Succeeded for SparkBatchJobResultType. + */ + @Generated + public static final SparkBatchJobResultType SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for SparkBatchJobResultType. + */ + @Generated + public static final SparkBatchJobResultType FAILED = fromString("Failed"); + + /** + * Static value Cancelled for SparkBatchJobResultType. + */ + @Generated + public static final SparkBatchJobResultType CANCELLED = fromString("Cancelled"); + + /** + * Creates a new instance of SparkBatchJobResultType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public SparkBatchJobResultType() { + } + + /** + * Creates or finds a SparkBatchJobResultType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SparkBatchJobResultType. + */ + @Generated + public static SparkBatchJobResultType fromString(String name) { + return fromString(name, SparkBatchJobResultType.class); + } + + /** + * Gets known SparkBatchJobResultType values. + * + * @return known SparkBatchJobResultType values. + */ + @Generated + public static Collection values() { + return values(SparkBatchJobResultType.class); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobState.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobState.java new file mode 100644 index 000000000000..76d9c8e535e9 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkBatchJobState.java @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The SparkBatchJobState model. + */ +@Fluent +public final class SparkBatchJobState implements JsonSerializable { + /* + * the time that at which "not_started" livy state was first seen. + */ + @Generated + private OffsetDateTime notStartedAt; + + /* + * the time that at which "starting" livy state was first seen. + */ + @Generated + private OffsetDateTime startingAt; + + /* + * the time that at which "running" livy state was first seen. + */ + @Generated + private OffsetDateTime runningAt; + + /* + * time that at which "dead" livy state was first seen. + */ + @Generated + private OffsetDateTime deadAt; + + /* + * the time that at which "success" livy state was first seen. + */ + @Generated + private OffsetDateTime successAt; + + /* + * the time that at which "killed" livy state was first seen. + */ + @Generated + private OffsetDateTime terminatedAt; + + /* + * the time that at which "recovering" livy state was first seen. + */ + @Generated + private OffsetDateTime recoveringAt; + + /* + * the Spark job state. + */ + @Generated + private String currentState; + + /* + * The jobCreationRequest property. + */ + @Generated + private SparkRequest jobCreationRequest; + + /** + * Creates an instance of SparkBatchJobState class. + */ + @Generated + public SparkBatchJobState() { + } + + /** + * Get the notStartedAt property: the time that at which "not_started" livy state was first seen. + * + * @return the notStartedAt value. + */ + @Generated + public OffsetDateTime getNotStartedAt() { + return this.notStartedAt; + } + + /** + * Set the notStartedAt property: the time that at which "not_started" livy state was first seen. + * + * @param notStartedAt the notStartedAt value to set. + * @return the SparkBatchJobState object itself. + */ + @Generated + public SparkBatchJobState setNotStartedAt(OffsetDateTime notStartedAt) { + this.notStartedAt = notStartedAt; + return this; + } + + /** + * Get the startingAt property: the time that at which "starting" livy state was first seen. + * + * @return the startingAt value. + */ + @Generated + public OffsetDateTime getStartingAt() { + return this.startingAt; + } + + /** + * Set the startingAt property: the time that at which "starting" livy state was first seen. + * + * @param startingAt the startingAt value to set. + * @return the SparkBatchJobState object itself. + */ + @Generated + public SparkBatchJobState setStartingAt(OffsetDateTime startingAt) { + this.startingAt = startingAt; + return this; + } + + /** + * Get the runningAt property: the time that at which "running" livy state was first seen. + * + * @return the runningAt value. + */ + @Generated + public OffsetDateTime getRunningAt() { + return this.runningAt; + } + + /** + * Set the runningAt property: the time that at which "running" livy state was first seen. + * + * @param runningAt the runningAt value to set. + * @return the SparkBatchJobState object itself. + */ + @Generated + public SparkBatchJobState setRunningAt(OffsetDateTime runningAt) { + this.runningAt = runningAt; + return this; + } + + /** + * Get the deadAt property: time that at which "dead" livy state was first seen. + * + * @return the deadAt value. + */ + @Generated + public OffsetDateTime getDeadAt() { + return this.deadAt; + } + + /** + * Set the deadAt property: time that at which "dead" livy state was first seen. + * + * @param deadAt the deadAt value to set. + * @return the SparkBatchJobState object itself. + */ + @Generated + public SparkBatchJobState setDeadAt(OffsetDateTime deadAt) { + this.deadAt = deadAt; + return this; + } + + /** + * Get the successAt property: the time that at which "success" livy state was first seen. + * + * @return the successAt value. + */ + @Generated + public OffsetDateTime getSuccessAt() { + return this.successAt; + } + + /** + * Set the successAt property: the time that at which "success" livy state was first seen. + * + * @param successAt the successAt value to set. + * @return the SparkBatchJobState object itself. + */ + @Generated + public SparkBatchJobState setSuccessAt(OffsetDateTime successAt) { + this.successAt = successAt; + return this; + } + + /** + * Get the terminatedAt property: the time that at which "killed" livy state was first seen. + * + * @return the terminatedAt value. + */ + @Generated + public OffsetDateTime getTerminatedAt() { + return this.terminatedAt; + } + + /** + * Set the terminatedAt property: the time that at which "killed" livy state was first seen. + * + * @param terminatedAt the terminatedAt value to set. + * @return the SparkBatchJobState object itself. + */ + @Generated + public SparkBatchJobState setTerminatedAt(OffsetDateTime terminatedAt) { + this.terminatedAt = terminatedAt; + return this; + } + + /** + * Get the recoveringAt property: the time that at which "recovering" livy state was first seen. + * + * @return the recoveringAt value. + */ + @Generated + public OffsetDateTime getRecoveringAt() { + return this.recoveringAt; + } + + /** + * Set the recoveringAt property: the time that at which "recovering" livy state was first seen. + * + * @param recoveringAt the recoveringAt value to set. + * @return the SparkBatchJobState object itself. + */ + @Generated + public SparkBatchJobState setRecoveringAt(OffsetDateTime recoveringAt) { + this.recoveringAt = recoveringAt; + return this; + } + + /** + * Get the currentState property: the Spark job state. + * + * @return the currentState value. + */ + @Generated + public String getCurrentState() { + return this.currentState; + } + + /** + * Set the currentState property: the Spark job state. + * + * @param currentState the currentState value to set. + * @return the SparkBatchJobState object itself. + */ + @Generated + public SparkBatchJobState setCurrentState(String currentState) { + this.currentState = currentState; + return this; + } + + /** + * Get the jobCreationRequest property: The jobCreationRequest property. + * + * @return the jobCreationRequest value. + */ + @Generated + public SparkRequest getJobCreationRequest() { + return this.jobCreationRequest; + } + + /** + * Set the jobCreationRequest property: The jobCreationRequest property. + * + * @param jobCreationRequest the jobCreationRequest value to set. + * @return the SparkBatchJobState object itself. + */ + @Generated + public SparkBatchJobState setJobCreationRequest(SparkRequest jobCreationRequest) { + this.jobCreationRequest = jobCreationRequest; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("notStartedAt", + this.notStartedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.notStartedAt)); + jsonWriter.writeStringField("startingAt", + this.startingAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startingAt)); + jsonWriter.writeStringField("runningAt", + this.runningAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.runningAt)); + jsonWriter.writeStringField("deadAt", + this.deadAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.deadAt)); + jsonWriter.writeStringField("successAt", + this.successAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.successAt)); + jsonWriter.writeStringField("killedAt", + this.terminatedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.terminatedAt)); + jsonWriter.writeStringField("recoveringAt", + this.recoveringAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.recoveringAt)); + jsonWriter.writeStringField("currentState", this.currentState); + jsonWriter.writeJsonField("jobCreationRequest", this.jobCreationRequest); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkBatchJobState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkBatchJobState if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SparkBatchJobState. + */ + @Generated + public static SparkBatchJobState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkBatchJobState deserializedSparkBatchJobState = new SparkBatchJobState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("notStartedAt".equals(fieldName)) { + deserializedSparkBatchJobState.notStartedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("startingAt".equals(fieldName)) { + deserializedSparkBatchJobState.startingAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("runningAt".equals(fieldName)) { + deserializedSparkBatchJobState.runningAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("deadAt".equals(fieldName)) { + deserializedSparkBatchJobState.deadAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("successAt".equals(fieldName)) { + deserializedSparkBatchJobState.successAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("killedAt".equals(fieldName)) { + deserializedSparkBatchJobState.terminatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("recoveringAt".equals(fieldName)) { + deserializedSparkBatchJobState.recoveringAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("currentState".equals(fieldName)) { + deserializedSparkBatchJobState.currentState = reader.getString(); + } else if ("jobCreationRequest".equals(fieldName)) { + deserializedSparkBatchJobState.jobCreationRequest = SparkRequest.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkBatchJobState; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkErrorSource.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkErrorSource.java new file mode 100644 index 000000000000..c48298075c59 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkErrorSource.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for SparkErrorSource. + */ +public final class SparkErrorSource extends ExpandableStringEnum { + /** + * Static value System for SparkErrorSource. + */ + @Generated + public static final SparkErrorSource SYSTEM = fromString("System"); + + /** + * Static value User for SparkErrorSource. + */ + @Generated + public static final SparkErrorSource USER = fromString("User"); + + /** + * Static value Unknown for SparkErrorSource. + */ + @Generated + public static final SparkErrorSource UNKNOWN = fromString("Unknown"); + + /** + * Static value Dependency for SparkErrorSource. + */ + @Generated + public static final SparkErrorSource DEPENDENCY = fromString("Dependency"); + + /** + * Creates a new instance of SparkErrorSource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public SparkErrorSource() { + } + + /** + * Creates or finds a SparkErrorSource from its string representation. + * + * @param name a name to look for. + * @return the corresponding SparkErrorSource. + */ + @Generated + public static SparkErrorSource fromString(String name) { + return fromString(name, SparkErrorSource.class); + } + + /** + * Gets known SparkErrorSource values. + * + * @return known SparkErrorSource values. + */ + @Generated + public static Collection values() { + return values(SparkErrorSource.class); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkJobType.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkJobType.java new file mode 100644 index 000000000000..a6fa82debf9b --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkJobType.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The job type. + */ +public final class SparkJobType extends ExpandableStringEnum { + /** + * Static value SparkBatch for SparkJobType. + */ + @Generated + public static final SparkJobType SPARK_BATCH = fromString("SparkBatch"); + + /** + * Static value SparkSession for SparkJobType. + */ + @Generated + public static final SparkJobType SPARK_SESSION = fromString("SparkSession"); + + /** + * Creates a new instance of SparkJobType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public SparkJobType() { + } + + /** + * Creates or finds a SparkJobType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SparkJobType. + */ + @Generated + public static SparkJobType fromString(String name) { + return fromString(name, SparkJobType.class); + } + + /** + * Gets known SparkJobType values. + * + * @return known SparkJobType values. + */ + @Generated + public static Collection values() { + return values(SparkJobType.class); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkRequest.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkRequest.java new file mode 100644 index 000000000000..0d93e98802d4 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkRequest.java @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The SparkRequest model. + */ +@Fluent +public final class SparkRequest implements JsonSerializable { + /* + * The name property. + */ + @Generated + private String name; + + /* + * The file property. + */ + @Generated + private String file; + + /* + * The className property. + */ + @Generated + private String className; + + /* + * The args property. + */ + @Generated + private List arguments; + + /* + * The jars property. + */ + @Generated + private List jars; + + /* + * The pyFiles property. + */ + @Generated + private List pythonFiles; + + /* + * The files property. + */ + @Generated + private List files; + + /* + * The archives property. + */ + @Generated + private List archives; + + /* + * Dictionary of + */ + @Generated + private Map configuration; + + /* + * The driverMemory property. + */ + @Generated + private String driverMemory; + + /* + * The driverCores property. + */ + @Generated + private Integer driverCores; + + /* + * The executorMemory property. + */ + @Generated + private String executorMemory; + + /* + * The executorCores property. + */ + @Generated + private Integer executorCores; + + /* + * The numExecutors property. + */ + @Generated + private Integer executorCount; + + /** + * Creates an instance of SparkRequest class. + */ + @Generated + public SparkRequest() { + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setName(String name) { + this.name = name; + return this; + } + + /** + * Get the file property: The file property. + * + * @return the file value. + */ + @Generated + public String getFile() { + return this.file; + } + + /** + * Set the file property: The file property. + * + * @param file the file value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setFile(String file) { + this.file = file; + return this; + } + + /** + * Get the className property: The className property. + * + * @return the className value. + */ + @Generated + public String getClassName() { + return this.className; + } + + /** + * Set the className property: The className property. + * + * @param className the className value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setClassName(String className) { + this.className = className; + return this; + } + + /** + * Get the arguments property: The args property. + * + * @return the arguments value. + */ + @Generated + public List getArguments() { + return this.arguments; + } + + /** + * Set the arguments property: The args property. + * + * @param arguments the arguments value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setArguments(List arguments) { + this.arguments = arguments; + return this; + } + + /** + * Get the jars property: The jars property. + * + * @return the jars value. + */ + @Generated + public List getJars() { + return this.jars; + } + + /** + * Set the jars property: The jars property. + * + * @param jars the jars value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setJars(List jars) { + this.jars = jars; + return this; + } + + /** + * Get the pythonFiles property: The pyFiles property. + * + * @return the pythonFiles value. + */ + @Generated + public List getPythonFiles() { + return this.pythonFiles; + } + + /** + * Set the pythonFiles property: The pyFiles property. + * + * @param pythonFiles the pythonFiles value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setPythonFiles(List pythonFiles) { + this.pythonFiles = pythonFiles; + return this; + } + + /** + * Get the files property: The files property. + * + * @return the files value. + */ + @Generated + public List getFiles() { + return this.files; + } + + /** + * Set the files property: The files property. + * + * @param files the files value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setFiles(List files) { + this.files = files; + return this; + } + + /** + * Get the archives property: The archives property. + * + * @return the archives value. + */ + @Generated + public List getArchives() { + return this.archives; + } + + /** + * Set the archives property: The archives property. + * + * @param archives the archives value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setArchives(List archives) { + this.archives = archives; + return this; + } + + /** + * Get the configuration property: Dictionary of <string>. + * + * @return the configuration value. + */ + @Generated + public Map getConfiguration() { + return this.configuration; + } + + /** + * Set the configuration property: Dictionary of <string>. + * + * @param configuration the configuration value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setConfiguration(Map configuration) { + this.configuration = configuration; + return this; + } + + /** + * Get the driverMemory property: The driverMemory property. + * + * @return the driverMemory value. + */ + @Generated + public String getDriverMemory() { + return this.driverMemory; + } + + /** + * Set the driverMemory property: The driverMemory property. + * + * @param driverMemory the driverMemory value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setDriverMemory(String driverMemory) { + this.driverMemory = driverMemory; + return this; + } + + /** + * Get the driverCores property: The driverCores property. + * + * @return the driverCores value. + */ + @Generated + public Integer getDriverCores() { + return this.driverCores; + } + + /** + * Set the driverCores property: The driverCores property. + * + * @param driverCores the driverCores value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setDriverCores(Integer driverCores) { + this.driverCores = driverCores; + return this; + } + + /** + * Get the executorMemory property: The executorMemory property. + * + * @return the executorMemory value. + */ + @Generated + public String getExecutorMemory() { + return this.executorMemory; + } + + /** + * Set the executorMemory property: The executorMemory property. + * + * @param executorMemory the executorMemory value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setExecutorMemory(String executorMemory) { + this.executorMemory = executorMemory; + return this; + } + + /** + * Get the executorCores property: The executorCores property. + * + * @return the executorCores value. + */ + @Generated + public Integer getExecutorCores() { + return this.executorCores; + } + + /** + * Set the executorCores property: The executorCores property. + * + * @param executorCores the executorCores value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setExecutorCores(Integer executorCores) { + this.executorCores = executorCores; + return this; + } + + /** + * Get the executorCount property: The numExecutors property. + * + * @return the executorCount value. + */ + @Generated + public Integer getExecutorCount() { + return this.executorCount; + } + + /** + * Set the executorCount property: The numExecutors property. + * + * @param executorCount the executorCount value to set. + * @return the SparkRequest object itself. + */ + @Generated + public SparkRequest setExecutorCount(Integer executorCount) { + this.executorCount = executorCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("file", this.file); + jsonWriter.writeStringField("className", this.className); + jsonWriter.writeArrayField("args", this.arguments, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("jars", this.jars, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("pyFiles", this.pythonFiles, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("files", this.files, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("archives", this.archives, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("conf", this.configuration, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("driverMemory", this.driverMemory); + jsonWriter.writeNumberField("driverCores", this.driverCores); + jsonWriter.writeStringField("executorMemory", this.executorMemory); + jsonWriter.writeNumberField("executorCores", this.executorCores); + jsonWriter.writeNumberField("numExecutors", this.executorCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SparkRequest. + */ + @Generated + public static SparkRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkRequest deserializedSparkRequest = new SparkRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSparkRequest.name = reader.getString(); + } else if ("file".equals(fieldName)) { + deserializedSparkRequest.file = reader.getString(); + } else if ("className".equals(fieldName)) { + deserializedSparkRequest.className = reader.getString(); + } else if ("args".equals(fieldName)) { + List arguments = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkRequest.arguments = arguments; + } else if ("jars".equals(fieldName)) { + List jars = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkRequest.jars = jars; + } else if ("pyFiles".equals(fieldName)) { + List pythonFiles = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkRequest.pythonFiles = pythonFiles; + } else if ("files".equals(fieldName)) { + List files = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkRequest.files = files; + } else if ("archives".equals(fieldName)) { + List archives = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkRequest.archives = archives; + } else if ("conf".equals(fieldName)) { + Map configuration = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkRequest.configuration = configuration; + } else if ("driverMemory".equals(fieldName)) { + deserializedSparkRequest.driverMemory = reader.getString(); + } else if ("driverCores".equals(fieldName)) { + deserializedSparkRequest.driverCores = reader.getNullable(JsonReader::getInt); + } else if ("executorMemory".equals(fieldName)) { + deserializedSparkRequest.executorMemory = reader.getString(); + } else if ("executorCores".equals(fieldName)) { + deserializedSparkRequest.executorCores = reader.getNullable(JsonReader::getInt); + } else if ("numExecutors".equals(fieldName)) { + deserializedSparkRequest.executorCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkRequest; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkScheduler.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkScheduler.java new file mode 100644 index 000000000000..aa0ae625e079 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkScheduler.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The SparkScheduler model. + */ +@Fluent +public final class SparkScheduler implements JsonSerializable { + /* + * The submittedAt property. + */ + @Generated + private OffsetDateTime submittedAt; + + /* + * The scheduledAt property. + */ + @Generated + private OffsetDateTime scheduledAt; + + /* + * The endedAt property. + */ + @Generated + private OffsetDateTime endedAt; + + /* + * The cancellationRequestedAt property. + */ + @Generated + private OffsetDateTime cancellationRequestedAt; + + /* + * The currentState property. + */ + @Generated + private SchedulerCurrentState currentState; + + /** + * Creates an instance of SparkScheduler class. + */ + @Generated + public SparkScheduler() { + } + + /** + * Get the submittedAt property: The submittedAt property. + * + * @return the submittedAt value. + */ + @Generated + public OffsetDateTime getSubmittedAt() { + return this.submittedAt; + } + + /** + * Set the submittedAt property: The submittedAt property. + * + * @param submittedAt the submittedAt value to set. + * @return the SparkScheduler object itself. + */ + @Generated + public SparkScheduler setSubmittedAt(OffsetDateTime submittedAt) { + this.submittedAt = submittedAt; + return this; + } + + /** + * Get the scheduledAt property: The scheduledAt property. + * + * @return the scheduledAt value. + */ + @Generated + public OffsetDateTime getScheduledAt() { + return this.scheduledAt; + } + + /** + * Set the scheduledAt property: The scheduledAt property. + * + * @param scheduledAt the scheduledAt value to set. + * @return the SparkScheduler object itself. + */ + @Generated + public SparkScheduler setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * Get the endedAt property: The endedAt property. + * + * @return the endedAt value. + */ + @Generated + public OffsetDateTime getEndedAt() { + return this.endedAt; + } + + /** + * Set the endedAt property: The endedAt property. + * + * @param endedAt the endedAt value to set. + * @return the SparkScheduler object itself. + */ + @Generated + public SparkScheduler setEndedAt(OffsetDateTime endedAt) { + this.endedAt = endedAt; + return this; + } + + /** + * Get the cancellationRequestedAt property: The cancellationRequestedAt property. + * + * @return the cancellationRequestedAt value. + */ + @Generated + public OffsetDateTime getCancellationRequestedAt() { + return this.cancellationRequestedAt; + } + + /** + * Set the cancellationRequestedAt property: The cancellationRequestedAt property. + * + * @param cancellationRequestedAt the cancellationRequestedAt value to set. + * @return the SparkScheduler object itself. + */ + @Generated + public SparkScheduler setCancellationRequestedAt(OffsetDateTime cancellationRequestedAt) { + this.cancellationRequestedAt = cancellationRequestedAt; + return this; + } + + /** + * Get the currentState property: The currentState property. + * + * @return the currentState value. + */ + @Generated + public SchedulerCurrentState getCurrentState() { + return this.currentState; + } + + /** + * Set the currentState property: The currentState property. + * + * @param currentState the currentState value to set. + * @return the SparkScheduler object itself. + */ + @Generated + public SparkScheduler setCurrentState(SchedulerCurrentState currentState) { + this.currentState = currentState; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("submittedAt", + this.submittedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.submittedAt)); + jsonWriter.writeStringField("scheduledAt", + this.scheduledAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.scheduledAt)); + jsonWriter.writeStringField("endedAt", + this.endedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endedAt)); + jsonWriter.writeStringField("cancellationRequestedAt", + this.cancellationRequestedAt == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.cancellationRequestedAt)); + jsonWriter.writeStringField("currentState", this.currentState == null ? null : this.currentState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkScheduler from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkScheduler if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SparkScheduler. + */ + @Generated + public static SparkScheduler fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkScheduler deserializedSparkScheduler = new SparkScheduler(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("submittedAt".equals(fieldName)) { + deserializedSparkScheduler.submittedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("scheduledAt".equals(fieldName)) { + deserializedSparkScheduler.scheduledAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endedAt".equals(fieldName)) { + deserializedSparkScheduler.endedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("cancellationRequestedAt".equals(fieldName)) { + deserializedSparkScheduler.cancellationRequestedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("currentState".equals(fieldName)) { + deserializedSparkScheduler.currentState = SchedulerCurrentState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkScheduler; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkServiceError.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkServiceError.java new file mode 100644 index 000000000000..4a85bdbe8dad --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkServiceError.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The SparkServiceError model. + */ +@Fluent +public final class SparkServiceError implements JsonSerializable { + /* + * The message property. + */ + @Generated + private String message; + + /* + * The errorCode property. + */ + @Generated + private String errorCode; + + /* + * The source property. + */ + @Generated + private SparkErrorSource source; + + /** + * Creates an instance of SparkServiceError class. + */ + @Generated + public SparkServiceError() { + } + + /** + * Get the message property: The message property. + * + * @return the message value. + */ + @Generated + public String getMessage() { + return this.message; + } + + /** + * Set the message property: The message property. + * + * @param message the message value to set. + * @return the SparkServiceError object itself. + */ + @Generated + public SparkServiceError setMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the errorCode property: The errorCode property. + * + * @return the errorCode value. + */ + @Generated + public String getErrorCode() { + return this.errorCode; + } + + /** + * Set the errorCode property: The errorCode property. + * + * @param errorCode the errorCode value to set. + * @return the SparkServiceError object itself. + */ + @Generated + public SparkServiceError setErrorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get the source property: The source property. + * + * @return the source value. + */ + @Generated + public SparkErrorSource getSource() { + return this.source; + } + + /** + * Set the source property: The source property. + * + * @param source the source value to set. + * @return the SparkServiceError object itself. + */ + @Generated + public SparkServiceError setSource(SparkErrorSource source) { + this.source = source; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("source", this.source == null ? null : this.source.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkServiceError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkServiceError if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SparkServiceError. + */ + @Generated + public static SparkServiceError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkServiceError deserializedSparkServiceError = new SparkServiceError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("message".equals(fieldName)) { + deserializedSparkServiceError.message = reader.getString(); + } else if ("errorCode".equals(fieldName)) { + deserializedSparkServiceError.errorCode = reader.getString(); + } else if ("source".equals(fieldName)) { + deserializedSparkServiceError.source = SparkErrorSource.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkServiceError; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkServicePlugin.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkServicePlugin.java new file mode 100644 index 000000000000..e9330d359e53 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkServicePlugin.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The SparkServicePlugin model. + */ +@Fluent +public final class SparkServicePlugin implements JsonSerializable { + /* + * The preparationStartedAt property. + */ + @Generated + private OffsetDateTime preparationStartedAt; + + /* + * The resourceAcquisitionStartedAt property. + */ + @Generated + private OffsetDateTime resourceAcquisitionStartedAt; + + /* + * The submissionStartedAt property. + */ + @Generated + private OffsetDateTime submissionStartedAt; + + /* + * The monitoringStartedAt property. + */ + @Generated + private OffsetDateTime monitoringStartedAt; + + /* + * The cleanupStartedAt property. + */ + @Generated + private OffsetDateTime cleanupStartedAt; + + /* + * The currentState property. + */ + @Generated + private PluginCurrentState currentState; + + /** + * Creates an instance of SparkServicePlugin class. + */ + @Generated + public SparkServicePlugin() { + } + + /** + * Get the preparationStartedAt property: The preparationStartedAt property. + * + * @return the preparationStartedAt value. + */ + @Generated + public OffsetDateTime getPreparationStartedAt() { + return this.preparationStartedAt; + } + + /** + * Set the preparationStartedAt property: The preparationStartedAt property. + * + * @param preparationStartedAt the preparationStartedAt value to set. + * @return the SparkServicePlugin object itself. + */ + @Generated + public SparkServicePlugin setPreparationStartedAt(OffsetDateTime preparationStartedAt) { + this.preparationStartedAt = preparationStartedAt; + return this; + } + + /** + * Get the resourceAcquisitionStartedAt property: The resourceAcquisitionStartedAt property. + * + * @return the resourceAcquisitionStartedAt value. + */ + @Generated + public OffsetDateTime getResourceAcquisitionStartedAt() { + return this.resourceAcquisitionStartedAt; + } + + /** + * Set the resourceAcquisitionStartedAt property: The resourceAcquisitionStartedAt property. + * + * @param resourceAcquisitionStartedAt the resourceAcquisitionStartedAt value to set. + * @return the SparkServicePlugin object itself. + */ + @Generated + public SparkServicePlugin setResourceAcquisitionStartedAt(OffsetDateTime resourceAcquisitionStartedAt) { + this.resourceAcquisitionStartedAt = resourceAcquisitionStartedAt; + return this; + } + + /** + * Get the submissionStartedAt property: The submissionStartedAt property. + * + * @return the submissionStartedAt value. + */ + @Generated + public OffsetDateTime getSubmissionStartedAt() { + return this.submissionStartedAt; + } + + /** + * Set the submissionStartedAt property: The submissionStartedAt property. + * + * @param submissionStartedAt the submissionStartedAt value to set. + * @return the SparkServicePlugin object itself. + */ + @Generated + public SparkServicePlugin setSubmissionStartedAt(OffsetDateTime submissionStartedAt) { + this.submissionStartedAt = submissionStartedAt; + return this; + } + + /** + * Get the monitoringStartedAt property: The monitoringStartedAt property. + * + * @return the monitoringStartedAt value. + */ + @Generated + public OffsetDateTime getMonitoringStartedAt() { + return this.monitoringStartedAt; + } + + /** + * Set the monitoringStartedAt property: The monitoringStartedAt property. + * + * @param monitoringStartedAt the monitoringStartedAt value to set. + * @return the SparkServicePlugin object itself. + */ + @Generated + public SparkServicePlugin setMonitoringStartedAt(OffsetDateTime monitoringStartedAt) { + this.monitoringStartedAt = monitoringStartedAt; + return this; + } + + /** + * Get the cleanupStartedAt property: The cleanupStartedAt property. + * + * @return the cleanupStartedAt value. + */ + @Generated + public OffsetDateTime getCleanupStartedAt() { + return this.cleanupStartedAt; + } + + /** + * Set the cleanupStartedAt property: The cleanupStartedAt property. + * + * @param cleanupStartedAt the cleanupStartedAt value to set. + * @return the SparkServicePlugin object itself. + */ + @Generated + public SparkServicePlugin setCleanupStartedAt(OffsetDateTime cleanupStartedAt) { + this.cleanupStartedAt = cleanupStartedAt; + return this; + } + + /** + * Get the currentState property: The currentState property. + * + * @return the currentState value. + */ + @Generated + public PluginCurrentState getCurrentState() { + return this.currentState; + } + + /** + * Set the currentState property: The currentState property. + * + * @param currentState the currentState value to set. + * @return the SparkServicePlugin object itself. + */ + @Generated + public SparkServicePlugin setCurrentState(PluginCurrentState currentState) { + this.currentState = currentState; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("preparationStartedAt", + this.preparationStartedAt == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.preparationStartedAt)); + jsonWriter.writeStringField("resourceAcquisitionStartedAt", + this.resourceAcquisitionStartedAt == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.resourceAcquisitionStartedAt)); + jsonWriter.writeStringField("submissionStartedAt", + this.submissionStartedAt == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.submissionStartedAt)); + jsonWriter.writeStringField("monitoringStartedAt", + this.monitoringStartedAt == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.monitoringStartedAt)); + jsonWriter.writeStringField("cleanupStartedAt", + this.cleanupStartedAt == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.cleanupStartedAt)); + jsonWriter.writeStringField("currentState", this.currentState == null ? null : this.currentState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkServicePlugin from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkServicePlugin if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SparkServicePlugin. + */ + @Generated + public static SparkServicePlugin fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkServicePlugin deserializedSparkServicePlugin = new SparkServicePlugin(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("preparationStartedAt".equals(fieldName)) { + deserializedSparkServicePlugin.preparationStartedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("resourceAcquisitionStartedAt".equals(fieldName)) { + deserializedSparkServicePlugin.resourceAcquisitionStartedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("submissionStartedAt".equals(fieldName)) { + deserializedSparkServicePlugin.submissionStartedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("monitoringStartedAt".equals(fieldName)) { + deserializedSparkServicePlugin.monitoringStartedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("cleanupStartedAt".equals(fieldName)) { + deserializedSparkServicePlugin.cleanupStartedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("currentState".equals(fieldName)) { + deserializedSparkServicePlugin.currentState = PluginCurrentState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkServicePlugin; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSession.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSession.java new file mode 100644 index 000000000000..09003c2d84c6 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSession.java @@ -0,0 +1,626 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The SparkSession model. + */ +@Fluent +public final class SparkSession implements JsonSerializable { + /* + * The livyInfo property. + */ + @Generated + private SparkSessionState livyInfo; + + /* + * The name property. + */ + @Generated + private String name; + + /* + * The workspaceName property. + */ + @Generated + private String workspaceName; + + /* + * The sparkPoolName property. + */ + @Generated + private String sparkPoolName; + + /* + * The submitterName property. + */ + @Generated + private String submitterName; + + /* + * The submitterId property. + */ + @Generated + private String submitterId; + + /* + * The artifactId property. + */ + @Generated + private String artifactId; + + /* + * The job type. + */ + @Generated + private SparkJobType jobType; + + /* + * The result property. + */ + @Generated + private SparkSessionResultType result; + + /* + * The schedulerInfo property. + */ + @Generated + private SparkScheduler scheduler; + + /* + * The pluginInfo property. + */ + @Generated + private SparkServicePlugin plugin; + + /* + * The errorInfo property. + */ + @Generated + private List errors; + + /* + * Dictionary of + */ + @Generated + private Map tags; + + /* + * The id property. + */ + @Generated + private int id; + + /* + * The appId property. + */ + @Generated + private String appId; + + /* + * Dictionary of + */ + @Generated + private Map appInfo; + + /* + * The session state. + */ + @Generated + private LivyStates state; + + /* + * The log property. + */ + @Generated + private List logLines; + + /** + * Creates an instance of SparkSession class. + */ + @Generated + public SparkSession() { + } + + /** + * Get the livyInfo property: The livyInfo property. + * + * @return the livyInfo value. + */ + @Generated + public SparkSessionState getLivyInfo() { + return this.livyInfo; + } + + /** + * Set the livyInfo property: The livyInfo property. + * + * @param livyInfo the livyInfo value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setLivyInfo(SparkSessionState livyInfo) { + this.livyInfo = livyInfo; + return this; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setName(String name) { + this.name = name; + return this; + } + + /** + * Get the workspaceName property: The workspaceName property. + * + * @return the workspaceName value. + */ + @Generated + public String getWorkspaceName() { + return this.workspaceName; + } + + /** + * Set the workspaceName property: The workspaceName property. + * + * @param workspaceName the workspaceName value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setWorkspaceName(String workspaceName) { + this.workspaceName = workspaceName; + return this; + } + + /** + * Get the sparkPoolName property: The sparkPoolName property. + * + * @return the sparkPoolName value. + */ + @Generated + public String getSparkPoolName() { + return this.sparkPoolName; + } + + /** + * Set the sparkPoolName property: The sparkPoolName property. + * + * @param sparkPoolName the sparkPoolName value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setSparkPoolName(String sparkPoolName) { + this.sparkPoolName = sparkPoolName; + return this; + } + + /** + * Get the submitterName property: The submitterName property. + * + * @return the submitterName value. + */ + @Generated + public String getSubmitterName() { + return this.submitterName; + } + + /** + * Set the submitterName property: The submitterName property. + * + * @param submitterName the submitterName value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setSubmitterName(String submitterName) { + this.submitterName = submitterName; + return this; + } + + /** + * Get the submitterId property: The submitterId property. + * + * @return the submitterId value. + */ + @Generated + public String getSubmitterId() { + return this.submitterId; + } + + /** + * Set the submitterId property: The submitterId property. + * + * @param submitterId the submitterId value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setSubmitterId(String submitterId) { + this.submitterId = submitterId; + return this; + } + + /** + * Get the artifactId property: The artifactId property. + * + * @return the artifactId value. + */ + @Generated + public String getArtifactId() { + return this.artifactId; + } + + /** + * Set the artifactId property: The artifactId property. + * + * @param artifactId the artifactId value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setArtifactId(String artifactId) { + this.artifactId = artifactId; + return this; + } + + /** + * Get the jobType property: The job type. + * + * @return the jobType value. + */ + @Generated + public SparkJobType getJobType() { + return this.jobType; + } + + /** + * Set the jobType property: The job type. + * + * @param jobType the jobType value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setJobType(SparkJobType jobType) { + this.jobType = jobType; + return this; + } + + /** + * Get the result property: The result property. + * + * @return the result value. + */ + @Generated + public SparkSessionResultType getResult() { + return this.result; + } + + /** + * Set the result property: The result property. + * + * @param result the result value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setResult(SparkSessionResultType result) { + this.result = result; + return this; + } + + /** + * Get the scheduler property: The schedulerInfo property. + * + * @return the scheduler value. + */ + @Generated + public SparkScheduler getScheduler() { + return this.scheduler; + } + + /** + * Set the scheduler property: The schedulerInfo property. + * + * @param scheduler the scheduler value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setScheduler(SparkScheduler scheduler) { + this.scheduler = scheduler; + return this; + } + + /** + * Get the plugin property: The pluginInfo property. + * + * @return the plugin value. + */ + @Generated + public SparkServicePlugin getPlugin() { + return this.plugin; + } + + /** + * Set the plugin property: The pluginInfo property. + * + * @param plugin the plugin value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setPlugin(SparkServicePlugin plugin) { + this.plugin = plugin; + return this; + } + + /** + * Get the errors property: The errorInfo property. + * + * @return the errors value. + */ + @Generated + public List getErrors() { + return this.errors; + } + + /** + * Set the errors property: The errorInfo property. + * + * @param errors the errors value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setErrors(List errors) { + this.errors = errors; + return this; + } + + /** + * Get the tags property: Dictionary of <string>. + * + * @return the tags value. + */ + @Generated + public Map getTags() { + return this.tags; + } + + /** + * Set the tags property: Dictionary of <string>. + * + * @param tags the tags value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + @Generated + public int getId() { + return this.id; + } + + /** + * Set the id property: The id property. + * + * @param id the id value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setId(int id) { + this.id = id; + return this; + } + + /** + * Get the appId property: The appId property. + * + * @return the appId value. + */ + @Generated + public String getAppId() { + return this.appId; + } + + /** + * Set the appId property: The appId property. + * + * @param appId the appId value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setAppId(String appId) { + this.appId = appId; + return this; + } + + /** + * Get the appInfo property: Dictionary of <string>. + * + * @return the appInfo value. + */ + @Generated + public Map getAppInfo() { + return this.appInfo; + } + + /** + * Set the appInfo property: Dictionary of <string>. + * + * @param appInfo the appInfo value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setAppInfo(Map appInfo) { + this.appInfo = appInfo; + return this; + } + + /** + * Get the state property: The session state. + * + * @return the state value. + */ + @Generated + public LivyStates getState() { + return this.state; + } + + /** + * Set the state property: The session state. + * + * @param state the state value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setState(LivyStates state) { + this.state = state; + return this; + } + + /** + * Get the logLines property: The log property. + * + * @return the logLines value. + */ + @Generated + public List getLogLines() { + return this.logLines; + } + + /** + * Set the logLines property: The log property. + * + * @param logLines the logLines value to set. + * @return the SparkSession object itself. + */ + @Generated + public SparkSession setLogLines(List logLines) { + this.logLines = logLines; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("id", this.id); + jsonWriter.writeJsonField("livyInfo", this.livyInfo); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("workspaceName", this.workspaceName); + jsonWriter.writeStringField("sparkPoolName", this.sparkPoolName); + jsonWriter.writeStringField("submitterName", this.submitterName); + jsonWriter.writeStringField("submitterId", this.submitterId); + jsonWriter.writeStringField("artifactId", this.artifactId); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeStringField("result", this.result == null ? null : this.result.toString()); + jsonWriter.writeJsonField("schedulerInfo", this.scheduler); + jsonWriter.writeJsonField("pluginInfo", this.plugin); + jsonWriter.writeArrayField("errorInfo", this.errors, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("appId", this.appId); + jsonWriter.writeMapField("appInfo", this.appInfo, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeArrayField("log", this.logLines, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkSession from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkSession if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SparkSession. + */ + @Generated + public static SparkSession fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkSession deserializedSparkSession = new SparkSession(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSparkSession.id = reader.getInt(); + } else if ("livyInfo".equals(fieldName)) { + deserializedSparkSession.livyInfo = SparkSessionState.fromJson(reader); + } else if ("name".equals(fieldName)) { + deserializedSparkSession.name = reader.getString(); + } else if ("workspaceName".equals(fieldName)) { + deserializedSparkSession.workspaceName = reader.getString(); + } else if ("sparkPoolName".equals(fieldName)) { + deserializedSparkSession.sparkPoolName = reader.getString(); + } else if ("submitterName".equals(fieldName)) { + deserializedSparkSession.submitterName = reader.getString(); + } else if ("submitterId".equals(fieldName)) { + deserializedSparkSession.submitterId = reader.getString(); + } else if ("artifactId".equals(fieldName)) { + deserializedSparkSession.artifactId = reader.getString(); + } else if ("jobType".equals(fieldName)) { + deserializedSparkSession.jobType = SparkJobType.fromString(reader.getString()); + } else if ("result".equals(fieldName)) { + deserializedSparkSession.result = SparkSessionResultType.fromString(reader.getString()); + } else if ("schedulerInfo".equals(fieldName)) { + deserializedSparkSession.scheduler = SparkScheduler.fromJson(reader); + } else if ("pluginInfo".equals(fieldName)) { + deserializedSparkSession.plugin = SparkServicePlugin.fromJson(reader); + } else if ("errorInfo".equals(fieldName)) { + List errors = reader.readArray(reader1 -> SparkServiceError.fromJson(reader1)); + deserializedSparkSession.errors = errors; + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkSession.tags = tags; + } else if ("appId".equals(fieldName)) { + deserializedSparkSession.appId = reader.getString(); + } else if ("appInfo".equals(fieldName)) { + Map appInfo = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkSession.appInfo = appInfo; + } else if ("state".equals(fieldName)) { + deserializedSparkSession.state = LivyStates.fromString(reader.getString()); + } else if ("log".equals(fieldName)) { + List logLines = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkSession.logLines = logLines; + } else { + reader.skipChildren(); + } + } + + return deserializedSparkSession; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionCollection.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionCollection.java new file mode 100644 index 000000000000..6583f7bd3301 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionCollection.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SparkSessionCollection model. + */ +@Fluent +public final class SparkSessionCollection implements JsonSerializable { + /* + * The from property. + */ + @Generated + private int from; + + /* + * The total property. + */ + @Generated + private int total; + + /* + * The sessions property. + */ + @Generated + private List sessions; + + /** + * Creates an instance of SparkSessionCollection class. + */ + @Generated + public SparkSessionCollection() { + } + + /** + * Get the from property: The from property. + * + * @return the from value. + */ + @Generated + public int getFrom() { + return this.from; + } + + /** + * Set the from property: The from property. + * + * @param from the from value to set. + * @return the SparkSessionCollection object itself. + */ + @Generated + public SparkSessionCollection setFrom(int from) { + this.from = from; + return this; + } + + /** + * Get the total property: The total property. + * + * @return the total value. + */ + @Generated + public int getTotal() { + return this.total; + } + + /** + * Set the total property: The total property. + * + * @param total the total value to set. + * @return the SparkSessionCollection object itself. + */ + @Generated + public SparkSessionCollection setTotal(int total) { + this.total = total; + return this; + } + + /** + * Get the sessions property: The sessions property. + * + * @return the sessions value. + */ + @Generated + public List getSessions() { + return this.sessions; + } + + /** + * Set the sessions property: The sessions property. + * + * @param sessions the sessions value to set. + * @return the SparkSessionCollection object itself. + */ + @Generated + public SparkSessionCollection setSessions(List sessions) { + this.sessions = sessions; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("from", this.from); + jsonWriter.writeIntField("total", this.total); + jsonWriter.writeArrayField("sessions", this.sessions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkSessionCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkSessionCollection if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SparkSessionCollection. + */ + @Generated + public static SparkSessionCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkSessionCollection deserializedSparkSessionCollection = new SparkSessionCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("from".equals(fieldName)) { + deserializedSparkSessionCollection.from = reader.getInt(); + } else if ("total".equals(fieldName)) { + deserializedSparkSessionCollection.total = reader.getInt(); + } else if ("sessions".equals(fieldName)) { + List sessions = reader.readArray(reader1 -> SparkSession.fromJson(reader1)); + deserializedSparkSessionCollection.sessions = sessions; + } else { + reader.skipChildren(); + } + } + + return deserializedSparkSessionCollection; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionOptions.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionOptions.java new file mode 100644 index 000000000000..7f058982ddeb --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionOptions.java @@ -0,0 +1,567 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The SparkSessionOptions model. + */ +@Fluent +public final class SparkSessionOptions implements JsonSerializable { + /* + * Dictionary of + */ + @Generated + private Map tags; + + /* + * The artifactId property. + */ + @Generated + private String artifactId; + + /* + * The name property. + */ + @Generated + private String name; + + /* + * The file property. + */ + @Generated + private String file; + + /* + * The className property. + */ + @Generated + private String className; + + /* + * The args property. + */ + @Generated + private List arguments; + + /* + * The jars property. + */ + @Generated + private List jars; + + /* + * The pyFiles property. + */ + @Generated + private List pythonFiles; + + /* + * The files property. + */ + @Generated + private List files; + + /* + * The archives property. + */ + @Generated + private List archives; + + /* + * Dictionary of + */ + @Generated + private Map configuration; + + /* + * The driverMemory property. + */ + @Generated + private String driverMemory; + + /* + * The driverCores property. + */ + @Generated + private Integer driverCores; + + /* + * The executorMemory property. + */ + @Generated + private String executorMemory; + + /* + * The executorCores property. + */ + @Generated + private Integer executorCores; + + /* + * The numExecutors property. + */ + @Generated + private Integer executorCount; + + /** + * Creates an instance of SparkSessionOptions class. + */ + @Generated + public SparkSessionOptions() { + } + + /** + * Get the tags property: Dictionary of <string>. + * + * @return the tags value. + */ + @Generated + public Map getTags() { + return this.tags; + } + + /** + * Set the tags property: Dictionary of <string>. + * + * @param tags the tags value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the artifactId property: The artifactId property. + * + * @return the artifactId value. + */ + @Generated + public String getArtifactId() { + return this.artifactId; + } + + /** + * Set the artifactId property: The artifactId property. + * + * @param artifactId the artifactId value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setArtifactId(String artifactId) { + this.artifactId = artifactId; + return this; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setName(String name) { + this.name = name; + return this; + } + + /** + * Get the file property: The file property. + * + * @return the file value. + */ + @Generated + public String getFile() { + return this.file; + } + + /** + * Set the file property: The file property. + * + * @param file the file value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setFile(String file) { + this.file = file; + return this; + } + + /** + * Get the className property: The className property. + * + * @return the className value. + */ + @Generated + public String getClassName() { + return this.className; + } + + /** + * Set the className property: The className property. + * + * @param className the className value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setClassName(String className) { + this.className = className; + return this; + } + + /** + * Get the arguments property: The args property. + * + * @return the arguments value. + */ + @Generated + public List getArguments() { + return this.arguments; + } + + /** + * Set the arguments property: The args property. + * + * @param arguments the arguments value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setArguments(List arguments) { + this.arguments = arguments; + return this; + } + + /** + * Get the jars property: The jars property. + * + * @return the jars value. + */ + @Generated + public List getJars() { + return this.jars; + } + + /** + * Set the jars property: The jars property. + * + * @param jars the jars value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setJars(List jars) { + this.jars = jars; + return this; + } + + /** + * Get the pythonFiles property: The pyFiles property. + * + * @return the pythonFiles value. + */ + @Generated + public List getPythonFiles() { + return this.pythonFiles; + } + + /** + * Set the pythonFiles property: The pyFiles property. + * + * @param pythonFiles the pythonFiles value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setPythonFiles(List pythonFiles) { + this.pythonFiles = pythonFiles; + return this; + } + + /** + * Get the files property: The files property. + * + * @return the files value. + */ + @Generated + public List getFiles() { + return this.files; + } + + /** + * Set the files property: The files property. + * + * @param files the files value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setFiles(List files) { + this.files = files; + return this; + } + + /** + * Get the archives property: The archives property. + * + * @return the archives value. + */ + @Generated + public List getArchives() { + return this.archives; + } + + /** + * Set the archives property: The archives property. + * + * @param archives the archives value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setArchives(List archives) { + this.archives = archives; + return this; + } + + /** + * Get the configuration property: Dictionary of <string>. + * + * @return the configuration value. + */ + @Generated + public Map getConfiguration() { + return this.configuration; + } + + /** + * Set the configuration property: Dictionary of <string>. + * + * @param configuration the configuration value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setConfiguration(Map configuration) { + this.configuration = configuration; + return this; + } + + /** + * Get the driverMemory property: The driverMemory property. + * + * @return the driverMemory value. + */ + @Generated + public String getDriverMemory() { + return this.driverMemory; + } + + /** + * Set the driverMemory property: The driverMemory property. + * + * @param driverMemory the driverMemory value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setDriverMemory(String driverMemory) { + this.driverMemory = driverMemory; + return this; + } + + /** + * Get the driverCores property: The driverCores property. + * + * @return the driverCores value. + */ + @Generated + public Integer getDriverCores() { + return this.driverCores; + } + + /** + * Set the driverCores property: The driverCores property. + * + * @param driverCores the driverCores value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setDriverCores(Integer driverCores) { + this.driverCores = driverCores; + return this; + } + + /** + * Get the executorMemory property: The executorMemory property. + * + * @return the executorMemory value. + */ + @Generated + public String getExecutorMemory() { + return this.executorMemory; + } + + /** + * Set the executorMemory property: The executorMemory property. + * + * @param executorMemory the executorMemory value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setExecutorMemory(String executorMemory) { + this.executorMemory = executorMemory; + return this; + } + + /** + * Get the executorCores property: The executorCores property. + * + * @return the executorCores value. + */ + @Generated + public Integer getExecutorCores() { + return this.executorCores; + } + + /** + * Set the executorCores property: The executorCores property. + * + * @param executorCores the executorCores value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setExecutorCores(Integer executorCores) { + this.executorCores = executorCores; + return this; + } + + /** + * Get the executorCount property: The numExecutors property. + * + * @return the executorCount value. + */ + @Generated + public Integer getExecutorCount() { + return this.executorCount; + } + + /** + * Set the executorCount property: The numExecutors property. + * + * @param executorCount the executorCount value to set. + * @return the SparkSessionOptions object itself. + */ + @Generated + public SparkSessionOptions setExecutorCount(Integer executorCount) { + this.executorCount = executorCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("artifactId", this.artifactId); + jsonWriter.writeStringField("file", this.file); + jsonWriter.writeStringField("className", this.className); + jsonWriter.writeArrayField("args", this.arguments, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("jars", this.jars, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("pyFiles", this.pythonFiles, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("files", this.files, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("archives", this.archives, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("conf", this.configuration, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("driverMemory", this.driverMemory); + jsonWriter.writeNumberField("driverCores", this.driverCores); + jsonWriter.writeStringField("executorMemory", this.executorMemory); + jsonWriter.writeNumberField("executorCores", this.executorCores); + jsonWriter.writeNumberField("numExecutors", this.executorCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkSessionOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkSessionOptions if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SparkSessionOptions. + */ + @Generated + public static SparkSessionOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkSessionOptions deserializedSparkSessionOptions = new SparkSessionOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSparkSessionOptions.name = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkSessionOptions.tags = tags; + } else if ("artifactId".equals(fieldName)) { + deserializedSparkSessionOptions.artifactId = reader.getString(); + } else if ("file".equals(fieldName)) { + deserializedSparkSessionOptions.file = reader.getString(); + } else if ("className".equals(fieldName)) { + deserializedSparkSessionOptions.className = reader.getString(); + } else if ("args".equals(fieldName)) { + List arguments = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkSessionOptions.arguments = arguments; + } else if ("jars".equals(fieldName)) { + List jars = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkSessionOptions.jars = jars; + } else if ("pyFiles".equals(fieldName)) { + List pythonFiles = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkSessionOptions.pythonFiles = pythonFiles; + } else if ("files".equals(fieldName)) { + List files = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkSessionOptions.files = files; + } else if ("archives".equals(fieldName)) { + List archives = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkSessionOptions.archives = archives; + } else if ("conf".equals(fieldName)) { + Map configuration = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkSessionOptions.configuration = configuration; + } else if ("driverMemory".equals(fieldName)) { + deserializedSparkSessionOptions.driverMemory = reader.getString(); + } else if ("driverCores".equals(fieldName)) { + deserializedSparkSessionOptions.driverCores = reader.getNullable(JsonReader::getInt); + } else if ("executorMemory".equals(fieldName)) { + deserializedSparkSessionOptions.executorMemory = reader.getString(); + } else if ("executorCores".equals(fieldName)) { + deserializedSparkSessionOptions.executorCores = reader.getNullable(JsonReader::getInt); + } else if ("numExecutors".equals(fieldName)) { + deserializedSparkSessionOptions.executorCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkSessionOptions; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionResultType.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionResultType.java new file mode 100644 index 000000000000..4bdcb9100f59 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionResultType.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for SparkSessionResultType. + */ +public final class SparkSessionResultType extends ExpandableStringEnum { + /** + * Static value Uncertain for SparkSessionResultType. + */ + @Generated + public static final SparkSessionResultType UNCERTAIN = fromString("Uncertain"); + + /** + * Static value Succeeded for SparkSessionResultType. + */ + @Generated + public static final SparkSessionResultType SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for SparkSessionResultType. + */ + @Generated + public static final SparkSessionResultType FAILED = fromString("Failed"); + + /** + * Static value Cancelled for SparkSessionResultType. + */ + @Generated + public static final SparkSessionResultType CANCELLED = fromString("Cancelled"); + + /** + * Creates a new instance of SparkSessionResultType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public SparkSessionResultType() { + } + + /** + * Creates or finds a SparkSessionResultType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SparkSessionResultType. + */ + @Generated + public static SparkSessionResultType fromString(String name) { + return fromString(name, SparkSessionResultType.class); + } + + /** + * Gets known SparkSessionResultType values. + * + * @return known SparkSessionResultType values. + */ + @Generated + public static Collection values() { + return values(SparkSessionResultType.class); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionState.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionState.java new file mode 100644 index 000000000000..dda3a61c32d6 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkSessionState.java @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The SparkSessionState model. + */ +@Fluent +public final class SparkSessionState implements JsonSerializable { + /* + * The notStartedAt property. + */ + @Generated + private OffsetDateTime notStartedAt; + + /* + * The startingAt property. + */ + @Generated + private OffsetDateTime startingAt; + + /* + * The idleAt property. + */ + @Generated + private OffsetDateTime idleAt; + + /* + * The deadAt property. + */ + @Generated + private OffsetDateTime deadAt; + + /* + * The shuttingDownAt property. + */ + @Generated + private OffsetDateTime shuttingDownAt; + + /* + * The killedAt property. + */ + @Generated + private OffsetDateTime terminatedAt; + + /* + * The recoveringAt property. + */ + @Generated + private OffsetDateTime recoveringAt; + + /* + * The busyAt property. + */ + @Generated + private OffsetDateTime busyAt; + + /* + * The errorAt property. + */ + @Generated + private OffsetDateTime errorAt; + + /* + * The currentState property. + */ + @Generated + private String currentState; + + /* + * The jobCreationRequest property. + */ + @Generated + private SparkRequest jobCreationRequest; + + /** + * Creates an instance of SparkSessionState class. + */ + @Generated + public SparkSessionState() { + } + + /** + * Get the notStartedAt property: The notStartedAt property. + * + * @return the notStartedAt value. + */ + @Generated + public OffsetDateTime getNotStartedAt() { + return this.notStartedAt; + } + + /** + * Set the notStartedAt property: The notStartedAt property. + * + * @param notStartedAt the notStartedAt value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setNotStartedAt(OffsetDateTime notStartedAt) { + this.notStartedAt = notStartedAt; + return this; + } + + /** + * Get the startingAt property: The startingAt property. + * + * @return the startingAt value. + */ + @Generated + public OffsetDateTime getStartingAt() { + return this.startingAt; + } + + /** + * Set the startingAt property: The startingAt property. + * + * @param startingAt the startingAt value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setStartingAt(OffsetDateTime startingAt) { + this.startingAt = startingAt; + return this; + } + + /** + * Get the idleAt property: The idleAt property. + * + * @return the idleAt value. + */ + @Generated + public OffsetDateTime getIdleAt() { + return this.idleAt; + } + + /** + * Set the idleAt property: The idleAt property. + * + * @param idleAt the idleAt value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setIdleAt(OffsetDateTime idleAt) { + this.idleAt = idleAt; + return this; + } + + /** + * Get the deadAt property: The deadAt property. + * + * @return the deadAt value. + */ + @Generated + public OffsetDateTime getDeadAt() { + return this.deadAt; + } + + /** + * Set the deadAt property: The deadAt property. + * + * @param deadAt the deadAt value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setDeadAt(OffsetDateTime deadAt) { + this.deadAt = deadAt; + return this; + } + + /** + * Get the shuttingDownAt property: The shuttingDownAt property. + * + * @return the shuttingDownAt value. + */ + @Generated + public OffsetDateTime getShuttingDownAt() { + return this.shuttingDownAt; + } + + /** + * Set the shuttingDownAt property: The shuttingDownAt property. + * + * @param shuttingDownAt the shuttingDownAt value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setShuttingDownAt(OffsetDateTime shuttingDownAt) { + this.shuttingDownAt = shuttingDownAt; + return this; + } + + /** + * Get the terminatedAt property: The killedAt property. + * + * @return the terminatedAt value. + */ + @Generated + public OffsetDateTime getTerminatedAt() { + return this.terminatedAt; + } + + /** + * Set the terminatedAt property: The killedAt property. + * + * @param terminatedAt the terminatedAt value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setTerminatedAt(OffsetDateTime terminatedAt) { + this.terminatedAt = terminatedAt; + return this; + } + + /** + * Get the recoveringAt property: The recoveringAt property. + * + * @return the recoveringAt value. + */ + @Generated + public OffsetDateTime getRecoveringAt() { + return this.recoveringAt; + } + + /** + * Set the recoveringAt property: The recoveringAt property. + * + * @param recoveringAt the recoveringAt value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setRecoveringAt(OffsetDateTime recoveringAt) { + this.recoveringAt = recoveringAt; + return this; + } + + /** + * Get the busyAt property: The busyAt property. + * + * @return the busyAt value. + */ + @Generated + public OffsetDateTime getBusyAt() { + return this.busyAt; + } + + /** + * Set the busyAt property: The busyAt property. + * + * @param busyAt the busyAt value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setBusyAt(OffsetDateTime busyAt) { + this.busyAt = busyAt; + return this; + } + + /** + * Get the errorAt property: The errorAt property. + * + * @return the errorAt value. + */ + @Generated + public OffsetDateTime getErrorAt() { + return this.errorAt; + } + + /** + * Set the errorAt property: The errorAt property. + * + * @param errorAt the errorAt value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setErrorAt(OffsetDateTime errorAt) { + this.errorAt = errorAt; + return this; + } + + /** + * Get the currentState property: The currentState property. + * + * @return the currentState value. + */ + @Generated + public String getCurrentState() { + return this.currentState; + } + + /** + * Set the currentState property: The currentState property. + * + * @param currentState the currentState value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setCurrentState(String currentState) { + this.currentState = currentState; + return this; + } + + /** + * Get the jobCreationRequest property: The jobCreationRequest property. + * + * @return the jobCreationRequest value. + */ + @Generated + public SparkRequest getJobCreationRequest() { + return this.jobCreationRequest; + } + + /** + * Set the jobCreationRequest property: The jobCreationRequest property. + * + * @param jobCreationRequest the jobCreationRequest value to set. + * @return the SparkSessionState object itself. + */ + @Generated + public SparkSessionState setJobCreationRequest(SparkRequest jobCreationRequest) { + this.jobCreationRequest = jobCreationRequest; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("notStartedAt", + this.notStartedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.notStartedAt)); + jsonWriter.writeStringField("startingAt", + this.startingAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startingAt)); + jsonWriter.writeStringField("idleAt", + this.idleAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.idleAt)); + jsonWriter.writeStringField("deadAt", + this.deadAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.deadAt)); + jsonWriter.writeStringField("shuttingDownAt", + this.shuttingDownAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.shuttingDownAt)); + jsonWriter.writeStringField("killedAt", + this.terminatedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.terminatedAt)); + jsonWriter.writeStringField("recoveringAt", + this.recoveringAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.recoveringAt)); + jsonWriter.writeStringField("busyAt", + this.busyAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.busyAt)); + jsonWriter.writeStringField("errorAt", + this.errorAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.errorAt)); + jsonWriter.writeStringField("currentState", this.currentState); + jsonWriter.writeJsonField("jobCreationRequest", this.jobCreationRequest); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkSessionState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkSessionState if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SparkSessionState. + */ + @Generated + public static SparkSessionState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkSessionState deserializedSparkSessionState = new SparkSessionState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("notStartedAt".equals(fieldName)) { + deserializedSparkSessionState.notStartedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("startingAt".equals(fieldName)) { + deserializedSparkSessionState.startingAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("idleAt".equals(fieldName)) { + deserializedSparkSessionState.idleAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("deadAt".equals(fieldName)) { + deserializedSparkSessionState.deadAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("shuttingDownAt".equals(fieldName)) { + deserializedSparkSessionState.shuttingDownAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("killedAt".equals(fieldName)) { + deserializedSparkSessionState.terminatedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("recoveringAt".equals(fieldName)) { + deserializedSparkSessionState.recoveringAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("busyAt".equals(fieldName)) { + deserializedSparkSessionState.busyAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("errorAt".equals(fieldName)) { + deserializedSparkSessionState.errorAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("currentState".equals(fieldName)) { + deserializedSparkSessionState.currentState = reader.getString(); + } else if ("jobCreationRequest".equals(fieldName)) { + deserializedSparkSessionState.jobCreationRequest = SparkRequest.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkSessionState; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatement.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatement.java new file mode 100644 index 000000000000..d2fac2d94c26 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatement.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The SparkStatement model. + */ +@Fluent +public final class SparkStatement implements JsonSerializable { + /* + * The id property. + */ + @Generated + private int id; + + /* + * The code property. + */ + @Generated + private String code; + + /* + * The state property. + */ + @Generated + private LivyStatementStates state; + + /* + * The output property. + */ + @Generated + private SparkStatementOutput output; + + /** + * Creates an instance of SparkStatement class. + */ + @Generated + public SparkStatement() { + } + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + @Generated + public int getId() { + return this.id; + } + + /** + * Set the id property: The id property. + * + * @param id the id value to set. + * @return the SparkStatement object itself. + */ + @Generated + public SparkStatement setId(int id) { + this.id = id; + return this; + } + + /** + * Get the code property: The code property. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Set the code property: The code property. + * + * @param code the code value to set. + * @return the SparkStatement object itself. + */ + @Generated + public SparkStatement setCode(String code) { + this.code = code; + return this; + } + + /** + * Get the state property: The state property. + * + * @return the state value. + */ + @Generated + public LivyStatementStates getState() { + return this.state; + } + + /** + * Set the state property: The state property. + * + * @param state the state value to set. + * @return the SparkStatement object itself. + */ + @Generated + public SparkStatement setState(LivyStatementStates state) { + this.state = state; + return this; + } + + /** + * Get the output property: The output property. + * + * @return the output value. + */ + @Generated + public SparkStatementOutput getOutput() { + return this.output; + } + + /** + * Set the output property: The output property. + * + * @param output the output value to set. + * @return the SparkStatement object itself. + */ + @Generated + public SparkStatement setOutput(SparkStatementOutput output) { + this.output = output; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("id", this.id); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeJsonField("output", this.output); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkStatement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkStatement if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SparkStatement. + */ + @Generated + public static SparkStatement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkStatement deserializedSparkStatement = new SparkStatement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSparkStatement.id = reader.getInt(); + } else if ("code".equals(fieldName)) { + deserializedSparkStatement.code = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedSparkStatement.state = LivyStatementStates.fromString(reader.getString()); + } else if ("output".equals(fieldName)) { + deserializedSparkStatement.output = SparkStatementOutput.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkStatement; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementCancellationResult.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementCancellationResult.java new file mode 100644 index 000000000000..7d37bdf6a915 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementCancellationResult.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The SparkStatementCancellationResult model. + */ +@Fluent +public final class SparkStatementCancellationResult implements JsonSerializable { + /* + * The msg property from the Livy API. The value is always "canceled". + */ + @Generated + private String message; + + /** + * Creates an instance of SparkStatementCancellationResult class. + */ + @Generated + public SparkStatementCancellationResult() { + } + + /** + * Get the message property: The msg property from the Livy API. The value is always "canceled". + * + * @return the message value. + */ + @Generated + public String getMessage() { + return this.message; + } + + /** + * Set the message property: The msg property from the Livy API. The value is always "canceled". + * + * @param message the message value to set. + * @return the SparkStatementCancellationResult object itself. + */ + @Generated + public SparkStatementCancellationResult setMessage(String message) { + this.message = message; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("msg", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkStatementCancellationResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkStatementCancellationResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SparkStatementCancellationResult. + */ + @Generated + public static SparkStatementCancellationResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkStatementCancellationResult deserializedSparkStatementCancellationResult + = new SparkStatementCancellationResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("msg".equals(fieldName)) { + deserializedSparkStatementCancellationResult.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkStatementCancellationResult; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementCollection.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementCollection.java new file mode 100644 index 000000000000..6a8996e4fec6 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementCollection.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SparkStatementCollection model. + */ +@Fluent +public final class SparkStatementCollection implements JsonSerializable { + /* + * The total_statements property. + */ + @Generated + private int total; + + /* + * The statements property. + */ + @Generated + private List statements; + + /** + * Creates an instance of SparkStatementCollection class. + */ + @Generated + public SparkStatementCollection() { + } + + /** + * Get the total property: The total_statements property. + * + * @return the total value. + */ + @Generated + public int getTotal() { + return this.total; + } + + /** + * Set the total property: The total_statements property. + * + * @param total the total value to set. + * @return the SparkStatementCollection object itself. + */ + @Generated + public SparkStatementCollection setTotal(int total) { + this.total = total; + return this; + } + + /** + * Get the statements property: The statements property. + * + * @return the statements value. + */ + @Generated + public List getStatements() { + return this.statements; + } + + /** + * Set the statements property: The statements property. + * + * @param statements the statements value to set. + * @return the SparkStatementCollection object itself. + */ + @Generated + public SparkStatementCollection setStatements(List statements) { + this.statements = statements; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("total_statements", this.total); + jsonWriter.writeArrayField("statements", this.statements, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkStatementCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkStatementCollection if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SparkStatementCollection. + */ + @Generated + public static SparkStatementCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkStatementCollection deserializedSparkStatementCollection = new SparkStatementCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("total_statements".equals(fieldName)) { + deserializedSparkStatementCollection.total = reader.getInt(); + } else if ("statements".equals(fieldName)) { + List statements = reader.readArray(reader1 -> SparkStatement.fromJson(reader1)); + deserializedSparkStatementCollection.statements = statements; + } else { + reader.skipChildren(); + } + } + + return deserializedSparkStatementCollection; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementLanguageType.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementLanguageType.java new file mode 100644 index 000000000000..1916027b2f1f --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementLanguageType.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for SparkStatementLanguageType. + */ +public final class SparkStatementLanguageType extends ExpandableStringEnum { + /** + * Static value spark for SparkStatementLanguageType. + */ + @Generated + public static final SparkStatementLanguageType SPARK = fromString("spark"); + + /** + * Static value pyspark for SparkStatementLanguageType. + */ + @Generated + public static final SparkStatementLanguageType PY_SPARK = fromString("pyspark"); + + /** + * Static value dotnetspark for SparkStatementLanguageType. + */ + @Generated + public static final SparkStatementLanguageType DOT_NET_SPARK = fromString("dotnetspark"); + + /** + * Static value sql for SparkStatementLanguageType. + */ + @Generated + public static final SparkStatementLanguageType SQL = fromString("sql"); + + /** + * Creates a new instance of SparkStatementLanguageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public SparkStatementLanguageType() { + } + + /** + * Creates or finds a SparkStatementLanguageType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SparkStatementLanguageType. + */ + @Generated + public static SparkStatementLanguageType fromString(String name) { + return fromString(name, SparkStatementLanguageType.class); + } + + /** + * Gets known SparkStatementLanguageType values. + * + * @return known SparkStatementLanguageType values. + */ + @Generated + public static Collection values() { + return values(SparkStatementLanguageType.class); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementOptions.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementOptions.java new file mode 100644 index 000000000000..52b720b73d3f --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementOptions.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The SparkStatementOptions model. + */ +@Fluent +public final class SparkStatementOptions implements JsonSerializable { + /* + * The code property. + */ + @Generated + private String code; + + /* + * The kind property. + */ + @Generated + private SparkStatementLanguageType kind; + + /** + * Creates an instance of SparkStatementOptions class. + */ + @Generated + public SparkStatementOptions() { + } + + /** + * Get the code property: The code property. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + + /** + * Set the code property: The code property. + * + * @param code the code value to set. + * @return the SparkStatementOptions object itself. + */ + @Generated + public SparkStatementOptions setCode(String code) { + this.code = code; + return this; + } + + /** + * Get the kind property: The kind property. + * + * @return the kind value. + */ + @Generated + public SparkStatementLanguageType getKind() { + return this.kind; + } + + /** + * Set the kind property: The kind property. + * + * @param kind the kind value to set. + * @return the SparkStatementOptions object itself. + */ + @Generated + public SparkStatementOptions setKind(SparkStatementLanguageType kind) { + this.kind = kind; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkStatementOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkStatementOptions if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SparkStatementOptions. + */ + @Generated + public static SparkStatementOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkStatementOptions deserializedSparkStatementOptions = new SparkStatementOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedSparkStatementOptions.code = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedSparkStatementOptions.kind = SparkStatementLanguageType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSparkStatementOptions; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementOutput.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementOutput.java new file mode 100644 index 000000000000..a518137b61d1 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/SparkStatementOutput.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.analytics.synapse.spark.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SparkStatementOutput model. + */ +@Fluent +public final class SparkStatementOutput implements JsonSerializable { + /* + * The status property. + */ + @Generated + private String status; + + /* + * The execution_count property. + */ + @Generated + private int executionCount; + + /* + * Any object + */ + @Generated + private Object data; + + /* + * The ename property. + */ + @Generated + private String errorName; + + /* + * The evalue property. + */ + @Generated + private String errorValue; + + /* + * The traceback property. + */ + @Generated + private List traceback; + + /** + * Creates an instance of SparkStatementOutput class. + */ + @Generated + public SparkStatementOutput() { + } + + /** + * Get the status property: The status property. + * + * @return the status value. + */ + @Generated + public String getStatus() { + return this.status; + } + + /** + * Set the status property: The status property. + * + * @param status the status value to set. + * @return the SparkStatementOutput object itself. + */ + @Generated + public SparkStatementOutput setStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the executionCount property: The execution_count property. + * + * @return the executionCount value. + */ + @Generated + public int getExecutionCount() { + return this.executionCount; + } + + /** + * Set the executionCount property: The execution_count property. + * + * @param executionCount the executionCount value to set. + * @return the SparkStatementOutput object itself. + */ + @Generated + public SparkStatementOutput setExecutionCount(int executionCount) { + this.executionCount = executionCount; + return this; + } + + /** + * Get the data property: Any object. + * + * @return the data value. + */ + @Generated + public Object getData() { + return this.data; + } + + /** + * Set the data property: Any object. + * + * @param data the data value to set. + * @return the SparkStatementOutput object itself. + */ + @Generated + public SparkStatementOutput setData(Object data) { + this.data = data; + return this; + } + + /** + * Get the errorName property: The ename property. + * + * @return the errorName value. + */ + @Generated + public String getErrorName() { + return this.errorName; + } + + /** + * Set the errorName property: The ename property. + * + * @param errorName the errorName value to set. + * @return the SparkStatementOutput object itself. + */ + @Generated + public SparkStatementOutput setErrorName(String errorName) { + this.errorName = errorName; + return this; + } + + /** + * Get the errorValue property: The evalue property. + * + * @return the errorValue value. + */ + @Generated + public String getErrorValue() { + return this.errorValue; + } + + /** + * Set the errorValue property: The evalue property. + * + * @param errorValue the errorValue value to set. + * @return the SparkStatementOutput object itself. + */ + @Generated + public SparkStatementOutput setErrorValue(String errorValue) { + this.errorValue = errorValue; + return this; + } + + /** + * Get the traceback property: The traceback property. + * + * @return the traceback value. + */ + @Generated + public List getTraceback() { + return this.traceback; + } + + /** + * Set the traceback property: The traceback property. + * + * @param traceback the traceback value to set. + * @return the SparkStatementOutput object itself. + */ + @Generated + public SparkStatementOutput setTraceback(List traceback) { + this.traceback = traceback; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("execution_count", this.executionCount); + jsonWriter.writeStringField("status", this.status); + if (this.data != null) { + jsonWriter.writeUntypedField("data", this.data); + } + jsonWriter.writeStringField("ename", this.errorName); + jsonWriter.writeStringField("evalue", this.errorValue); + jsonWriter.writeArrayField("traceback", this.traceback, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SparkStatementOutput from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SparkStatementOutput if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SparkStatementOutput. + */ + @Generated + public static SparkStatementOutput fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SparkStatementOutput deserializedSparkStatementOutput = new SparkStatementOutput(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("execution_count".equals(fieldName)) { + deserializedSparkStatementOutput.executionCount = reader.getInt(); + } else if ("status".equals(fieldName)) { + deserializedSparkStatementOutput.status = reader.getString(); + } else if ("data".equals(fieldName)) { + deserializedSparkStatementOutput.data = reader.readUntyped(); + } else if ("ename".equals(fieldName)) { + deserializedSparkStatementOutput.errorName = reader.getString(); + } else if ("evalue".equals(fieldName)) { + deserializedSparkStatementOutput.errorValue = reader.getString(); + } else if ("traceback".equals(fieldName)) { + List traceback = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkStatementOutput.traceback = traceback; + } else { + reader.skipChildren(); + } + } + + return deserializedSparkStatementOutput; + }); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/package-info.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/package-info.java new file mode 100644 index 000000000000..dac285ae8679 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for SparkClient. + * null. + */ +package com.azure.analytics.synapse.spark.models; diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/package-info.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/package-info.java new file mode 100644 index 000000000000..6b9b8ec1c387 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/com/azure/analytics/synapse/spark/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for SparkClient. + * null. + */ +package com.azure.analytics.synapse.spark; diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/java/module-info.java b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/module-info.java new file mode 100644 index 000000000000..1866cdc42104 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +module com.azure.analytics.synapse.spark { + requires transitive com.azure.core; + + exports com.azure.analytics.synapse.spark; + exports com.azure.analytics.synapse.spark.models; + + opens com.azure.analytics.synapse.spark.implementation to com.azure.core; + opens com.azure.analytics.synapse.spark.models to com.azure.core; +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/main/resources/azure-analytics-synapse-spark.properties b/sdk/synapse/azure-analytics-synapse-spark/src/main/resources/azure-analytics-synapse-spark.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/main/resources/azure-analytics-synapse-spark.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/samples/java/com/azure/analytics/synapse/spark/HelloWorld.java b/sdk/synapse/azure-analytics-synapse-spark/src/samples/java/com/azure/analytics/synapse/spark/HelloWorld.java new file mode 100644 index 000000000000..bf28e1e05595 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/samples/java/com/azure/analytics/synapse/spark/HelloWorld.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.models.SparkBatchJob; +import com.azure.analytics.synapse.spark.models.SparkBatchJobCollection; +import com.azure.analytics.synapse.spark.models.SparkBatchJobOptions; +import com.azure.identity.DefaultAzureCredentialBuilder; + +import java.util.Arrays; + +public class HelloWorld { + + /** + * Authenticates with the Synapse workspace and shows how to set, get, update and delete a role assignment in the workspace. + * + * @param args Unused. Arguments to the program. + * @throws IllegalArgumentException when invalid workspace endpoint is passed. + */ + public static void main(String[] args) throws IllegalArgumentException { + // Instantiate a Spark Batch client that will be used to call the service. Notice that the client is using default Azure + // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', + // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. + SparkBatchClient batchClient = new SparkClientBuilder() + .endpoint("https://{YOUR_WORKSPACE_NAME}.dev.azuresynapse.net") + .credential(new DefaultAzureCredentialBuilder().build()) + .buildSparkBatchClient(); + + String storageAccount = ""; + String fileSystem = ""; + String name = ""; + String file = String.format("abfss://%s@%s.dfs.core.windows.net/%s/%s", fileSystem, storageAccount, "", ""); + SparkBatchJobOptions options = new SparkBatchJobOptions() + .setName(name) + .setFile(file) + .setClassName("WordCount") + .setArguments(Arrays.asList( + String.format("abfss://%s@%s.dfs.core.windows.net/%s/%s", fileSystem, storageAccount, "", ""), + String.format("abfss://%s@%s.dfs.core.windows.net/%s/", fileSystem, storageAccount, "") + )) + .setDriverMemory("28g") + .setDriverCores(4) + .setExecutorMemory("28g") + .setExecutorCores(4) + .setExecutorCount(2); + + SparkBatchJob jobCreated = batchClient.createSparkBatchJob(options); + + // List Spark batch jobs + SparkBatchJobCollection jobs = batchClient.getSparkBatchJobs(); + for (SparkBatchJob job : jobs.getSessions()) { + System.out.println(job.getName()); + } + + // Cancel Spark batch job + int jobId = 0; + batchClient.cancelSparkBatchJob(jobId); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/samples/java/com/azure/analytics/synapse/spark/HelloWorldAsync.java b/sdk/synapse/azure-analytics-synapse-spark/src/samples/java/com/azure/analytics/synapse/spark/HelloWorldAsync.java new file mode 100644 index 000000000000..c10fe0991c6c --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/samples/java/com/azure/analytics/synapse/spark/HelloWorldAsync.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.models.SparkBatchJob; +import com.azure.analytics.synapse.spark.models.SparkBatchJobOptions; +import com.azure.identity.DefaultAzureCredentialBuilder; + +import java.util.Arrays; + +public class HelloWorldAsync { + + /** + * Authenticates with the Synapse workspace and shows how to set, get, update and delete a role assignment in the workspace. + * + * @param args Unused. Arguments to the program. + * @throws IllegalArgumentException when invalid workspace endpoint is passed. + */ + public static void main(String[] args) throws IllegalArgumentException, InterruptedException { + // Instantiate a Spark Batch client that will be used to call the service. Notice that the client is using default Azure + // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', + // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with the service principal credentials. + SparkBatchAsyncClient batchClient = new SparkClientBuilder() + .endpoint("https://{YOUR_WORKSPACE_NAME}.dev.azuresynapse.net") + .credential(new DefaultAzureCredentialBuilder().build()) + .buildSparkBatchAsyncClient(); + + String storageAccount = ""; + String fileSystem = ""; + String name = ""; + String file = String.format("abfss://%s@%s.dfs.core.windows.net/%s/%s", fileSystem, storageAccount, "", ""); + SparkBatchJobOptions options = new SparkBatchJobOptions() + .setName(name) + .setFile(file) + .setClassName("WordCount") + .setArguments(Arrays.asList( + String.format("abfss://%s@%s.dfs.core.windows.net/%s/%s", fileSystem, storageAccount, "", ""), + String.format("abfss://%s@%s.dfs.core.windows.net/%s/", fileSystem, storageAccount, "") + )) + .setDriverMemory("28g") + .setDriverCores(4) + .setExecutorMemory("28g") + .setExecutorCores(4) + .setExecutorCount(2); + + batchClient.createSparkBatchJob(options).subscribe(job -> System.out.printf("Job ID: %d%n", job.getId())); + + // Wait for operation completion + Thread.sleep(30000); + + // List Spark batch jobs + batchClient.getSparkBatchJobs().subscribe(jobs -> { + for (SparkBatchJob job : jobs.getSessions()) { + System.out.println(job.getName()); + } + }); + + // Cancel Spark batch job + int jobId = 0; + batchClient.cancelSparkBatchJob(jobId); + + // Wait for operation completion + Thread.sleep(30000); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkBatchClientTest.java b/sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkBatchClientTest.java new file mode 100644 index 000000000000..af02136dab83 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkBatchClientTest.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.models.SparkBatchJob; +import org.junit.jupiter.api.Test; + +public class SparkBatchClientTest extends SparkClientTestBase { + + private SparkBatchClient client; + + @Override + protected void beforeTest() { + client = clientSetup(httpPipeline -> new SparkClientBuilder().endpoint(getEndpoint()) + .pipeline(httpPipeline) + .sparkPoolName(getSparkPoolName()) + .livyApiVersion(livyApiVersion) + .buildSparkBatchClient()); + } + + /** + * Tests that Spark jobs can be listed in the Spark pool. + */ + @Test + public void getSparkBatchJob() { + for (SparkBatchJob expectedSparkJob : client.getSparkBatchJobs().getSessions()) { + SparkBatchJob actualSparkJob = client.getSparkBatchJob(expectedSparkJob.getId()); + validateSparkBatchJob(expectedSparkJob, actualSparkJob); + } + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkClientTestBase.java b/sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkClientTestBase.java new file mode 100644 index 000000000000..9ac740063e36 --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkClientTestBase.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.models.SparkBatchJob; +import com.azure.analytics.synapse.spark.models.SparkSession; +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.identity.AzureCliCredentialBuilder; +import com.azure.identity.AzureDeveloperCliCredentialBuilder; +import com.azure.identity.AzurePipelinesCredentialBuilder; +import com.azure.identity.AzurePowerShellCredentialBuilder; +import com.azure.identity.ChainedTokenCredentialBuilder; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.identity.EnvironmentCredentialBuilder; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public abstract class SparkClientTestBase extends TestProxyTestBase { + + static final String NAME = "name"; + static final String SYNAPSE_PROPERTIES = "azure-analytics-synapse-spark.properties"; + static final String VERSION = "version"; + private final HttpLogOptions httpLogOptions = new HttpLogOptions(); + private final Map properties = CoreUtils.getProperties(SYNAPSE_PROPERTIES); + private final String clientName = properties.getOrDefault(NAME, "UnknownName"); + private final String clientVersion = properties.getOrDefault(VERSION, "UnknownVersion"); + private final String fakeSparkPool = "Spark1"; + final String livyApiVersion = "2019-11-01-preview"; + + protected String getEndpoint() { + String endpoint = interceptorManager.isPlaybackMode() + ? "https://localhost:8080" + : Configuration.getGlobalConfiguration().get("AZURE_SYNAPSE_WORKSPACE_URL"); + Objects.requireNonNull(endpoint); + return endpoint; + } + + protected String getSparkPoolName() { + String sparkPoolName = interceptorManager.isPlaybackMode() + ? fakeSparkPool + : Configuration.getGlobalConfiguration().get("AZURE_SYNAPSE_SPARK_POOL_NAME"); + Objects.requireNonNull(sparkPoolName); + return sparkPoolName; + } + + T clientSetup(Function clientBuilder) { + TokenCredential credential; + + switch (getTestMode()) { + case RECORD: + credential = new DefaultAzureCredentialBuilder().build(); + + break; + + case LIVE: + Configuration config = Configuration.getGlobalConfiguration(); + + ChainedTokenCredentialBuilder chainedTokenCredentialBuilder + = new ChainedTokenCredentialBuilder().addLast(new EnvironmentCredentialBuilder().build()) + .addLast(new AzureCliCredentialBuilder().build()) + .addLast(new AzureDeveloperCliCredentialBuilder().build()) + .addLast(new AzurePowerShellCredentialBuilder().build()); + + String serviceConnectionId = config.get("AZURESUBSCRIPTION_SERVICE_CONNECTION_ID"); + String clientId = config.get("AZURESUBSCRIPTION_CLIENT_ID"); + String tenantId = config.get("AZURESUBSCRIPTION_TENANT_ID"); + String systemAccessToken = config.get("SYSTEM_ACCESSTOKEN"); + + if (!CoreUtils.isNullOrEmpty(serviceConnectionId) + && !CoreUtils.isNullOrEmpty(clientId) + && !CoreUtils.isNullOrEmpty(tenantId) + && !CoreUtils.isNullOrEmpty(systemAccessToken)) { + + chainedTokenCredentialBuilder + .addLast(new AzurePipelinesCredentialBuilder().systemAccessToken(systemAccessToken) + .clientId(clientId) + .tenantId(tenantId) + .serviceConnectionId(serviceConnectionId) + .build()); + } + + credential = chainedTokenCredentialBuilder.build(); + + break; + + default: + // On PLAYBACK mode + credential = new MockTokenCredential(); + + break; + } + + HttpClient httpClient; + Configuration buildConfiguration = Configuration.getGlobalConfiguration().clone(); + + // Closest to API goes first, closest to wire goes last. + final List policies = new ArrayList<>(); + policies + .add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddDatePolicy()); + + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(new BearerTokenAuthenticationPolicy(credential, "https://dev.azuresynapse.net/.default")); + + policies.add(new RetryPolicy()); + + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))); + + if (interceptorManager.isPlaybackMode()) { + httpClient = interceptorManager.getPlaybackClient(); + } else { + httpClient = new NettyAsyncHttpClientBuilder().wiretap(true).build(); + } + + if (interceptorManager.isRecordMode()) { + policies.add(interceptorManager.getRecordPolicy()); + } + + if (!interceptorManager.isLiveMode()) { + interceptorManager.removeSanitizers("AZSDK3425", "AZSDK3430"); + } + + HttpPipeline pipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + + T client; + client = clientBuilder.apply(pipeline); + + return Objects.requireNonNull(client); + } + + void validateSparkBatchJob(SparkBatchJob expectedSparkJob, SparkBatchJob actualSparkJob) { + assertEquals(expectedSparkJob.getName(), actualSparkJob.getName()); + assertEquals(expectedSparkJob.getId(), actualSparkJob.getId()); + assertEquals(expectedSparkJob.getAppId(), actualSparkJob.getAppId()); + assertEquals(expectedSparkJob.getSubmitterId(), actualSparkJob.getSubmitterId()); + assertEquals(expectedSparkJob.getArtifactId(), actualSparkJob.getArtifactId()); + } + + void validateSparkSession(SparkSession expectedSparkSession, SparkSession actualSparkSession) { + assertEquals(expectedSparkSession.getName(), actualSparkSession.getName()); + assertEquals(expectedSparkSession.getId(), actualSparkSession.getId()); + assertEquals(expectedSparkSession.getAppId(), actualSparkSession.getAppId()); + assertEquals(expectedSparkSession.getSubmitterId(), actualSparkSession.getSubmitterId()); + assertEquals(expectedSparkSession.getArtifactId(), actualSparkSession.getArtifactId()); + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkSessionClientTest.java b/sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkSessionClientTest.java new file mode 100644 index 000000000000..d395dd00c9dc --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/src/test/java/com/azure/analytics/synapse/spark/SparkSessionClientTest.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.analytics.synapse.spark; + +import com.azure.analytics.synapse.spark.models.SparkSession; +import org.junit.jupiter.api.Test; + +public class SparkSessionClientTest extends SparkClientTestBase { + + private SparkSessionClient client; + + @Override + protected void beforeTest() { + client = clientSetup(httpPipeline -> new SparkClientBuilder().endpoint(getEndpoint()) + .pipeline(httpPipeline) + .sparkPoolName(getSparkPoolName()) + .livyApiVersion(livyApiVersion) + .buildSparkSessionClient()); + } + + /** + * Tests that role assignments can be listed in the key vault. + */ + @Test + public void getSparkSession() { + for (SparkSession expectedSparkSession : client.getSparkSessions().getSessions()) { + SparkSession actualSparkSession = client.getSparkSession(expectedSparkSession.getId()); + validateSparkSession(expectedSparkSession, actualSparkSession); + } + } +} diff --git a/sdk/synapse/azure-analytics-synapse-spark/swagger/README.md b/sdk/synapse/azure-analytics-synapse-spark/swagger/README.md new file mode 100644 index 000000000000..8cce86c147bb --- /dev/null +++ b/sdk/synapse/azure-analytics-synapse-spark/swagger/README.md @@ -0,0 +1,56 @@ +# Azure Synapse Analytics Spark Service for Java + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Synapse Analytics Spark Service. +--- +## Getting Started + +To build the SDK for Synapse Analytics Spark Service, simply [Install AutoRest](https://aka.ms/autorest) and in +this folder, run: + +> `autorest` +To see additional help and options, run: + +> `autorest --help` +### Setup +```ps +npm install -g autorest +``` + +### Generation + +```ps +cd +autorest +``` + +### Code generation settings + +## Java + +```yaml +java: true +output-folder: ..\ +use: '@autorest/java@4.1.62' +generate-client-as-impl: true +generate-sync-async-clients: true +namespace: com.azure.analytics.synapse.spark +sync-methods: all +license-header: MICROSOFT_MIT_SMALL +models-subpackage: models +required-parameter-client-methods: true +credential-types: tokencredential +credential-scopes: https://dev.azuresynapse.net/.default +require: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/bee724836ffdeb5458274037dc75f4d43576b5e3/specification/synapse/data-plane/readme.md +tag: package-spark-2020-12-01 +``` + +### Add x-ms-client-default to livyApiVersion +```yaml +directive: +- from: swagger-document + where: $.parameters.LivyApiVersion + transform: > + $["x-ms-client-default"] = $.default; +``` diff --git a/sdk/synapse/ci.yml b/sdk/synapse/ci.yml index 09f26e62fc67..930963d18cc1 100644 --- a/sdk/synapse/ci.yml +++ b/sdk/synapse/ci.yml @@ -9,11 +9,19 @@ trigger: paths: include: - sdk/synapse/ci.yml + - sdk/synapse/azure-analytics-synapse-accesscontrol/ - sdk/synapse/azure-analytics-synapse-artifacts/ + - sdk/synapse/azure-analytics-synapse-managedprivateendpoints/ + - sdk/synapse/azure-analytics-synapse-monitoring/ + - sdk/synapse/azure-analytics-synapse-spark/ - sdk/synapse/azure-resourcemanager-synapse/ exclude: - sdk/synapse/pom.xml + - sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml - sdk/synapse/azure-analytics-synapse-artifacts/pom.xml + - sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml + - sdk/synapse/azure-analytics-synapse-monitoring/pom.xml + - sdk/synapse/azure-analytics-synapse-spark/pom.xml - sdk/synapse/azure-resourcemanager-synapse/pom.xml pr: @@ -26,18 +34,42 @@ pr: paths: include: - sdk/synapse/ci.yml + - sdk/synapse/azure-analytics-synapse-accesscontrol/ - sdk/synapse/azure-analytics-synapse-artifacts/ + - sdk/synapse/azure-analytics-synapse-managedprivateendpoints/ + - sdk/synapse/azure-analytics-synapse-monitoring/ + - sdk/synapse/azure-analytics-synapse-spark/ - sdk/synapse/azure-resourcemanager-synapse/ exclude: - sdk/synapse/pom.xml + - sdk/synapse/azure-analytics-synapse-accesscontrol/pom.xml - sdk/synapse/azure-analytics-synapse-artifacts/pom.xml + - sdk/synapse/azure-analytics-synapse-managedprivateendpoints/pom.xml + - sdk/synapse/azure-analytics-synapse-monitoring/pom.xml + - sdk/synapse/azure-analytics-synapse-spark/pom.xml - sdk/synapse/azure-resourcemanager-synapse/pom.xml parameters: + - name: release_azureanalyticssynapseaccesscontrol + displayName: 'azure-analytics-synapse-accesscontrol' + type: boolean + default: true - name: release_azureanalyticssynapseartifacts displayName: 'azure-analytics-synapse-artifacts' type: boolean default: true + - name: release_azureanalyticssynapsespark + displayName: 'azure-analytics-synapse-spark' + type: boolean + default: true + - name: release_azureanalyticssynapsemanagedprivateendpoints + displayName: 'azure-analytics-synapse-managedprivateendpoints' + type: boolean + default: true + - name: release_azureanalyticssynapsemonitoring + displayName: 'azure-analytics-synapse-monitoring' + type: boolean + default: true - name: release_azureresourcemanagersynapse displayName: 'azure-resourcemanager-synapse' type: boolean @@ -48,10 +80,26 @@ extends: parameters: ServiceDirectory: synapse Artifacts: + - name: azure-analytics-synapse-accesscontrol + groupId: com.azure + safeName: azureanalyticssynapseaccesscontrol + releaseInBatch: ${{ parameters.release_azureanalyticssynapseaccesscontrol }} - name: azure-analytics-synapse-artifacts groupId: com.azure safeName: azureanalyticssynapseartifacts releaseInBatch: ${{ parameters.release_azureanalyticssynapseartifacts }} + - name: azure-analytics-synapse-spark + groupId: com.azure + safeName: azureanalyticssynapsespark + releaseInBatch: ${{ parameters.release_azureanalyticssynapsespark }} + - name: azure-analytics-synapse-managedprivateendpoints + groupId: com.azure + safeName: azureanalyticssynapsemanagedprivateendpoints + releaseInBatch: ${{ parameters.release_azureanalyticssynapsemanagedprivateendpoints }} + - name: azure-analytics-synapse-monitoring + groupId: com.azure + safeName: azureanalyticssynapsemonitoring + releaseInBatch: ${{ parameters.release_azureanalyticssynapsemonitoring }} - name: azure-resourcemanager-synapse groupId: com.azure.resourcemanager safeName: azureresourcemanagersynapse diff --git a/sdk/synapse/pom.xml b/sdk/synapse/pom.xml index e39048fa910d..b2b98c415e63 100644 --- a/sdk/synapse/pom.xml +++ b/sdk/synapse/pom.xml @@ -9,7 +9,11 @@ 1.0.0 + azure-analytics-synapse-accesscontrol azure-analytics-synapse-artifacts + azure-analytics-synapse-managedprivateendpoints/ + azure-analytics-synapse-monitoring + azure-analytics-synapse-spark azure-resourcemanager-synapse diff --git a/sdk/terraform/azure-resourcemanager-terraform/CHANGELOG.md b/sdk/terraform/azure-resourcemanager-terraform/CHANGELOG.md index e090ec88b846..024cc8c563dd 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/CHANGELOG.md +++ b/sdk/terraform/azure-resourcemanager-terraform/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.2 (Unreleased) ### Features Added @@ -10,100 +10,6 @@ ### Other Changes -## 1.0.0-beta.2 (2026-08-27) - -- Azure Resource Manager Azure Terraform client library for Java. This package contains Microsoft Azure SDK for Azure Terraform Management SDK. The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform resources. Package api-version 2026-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Breaking Changes - -#### `models.Terraforms` was modified - -* `void exportTerraform(models.BaseExportModel)` -> `models.TerraformOperationStatus exportTerraform(models.BaseExportModel)` -* `void exportTerraform(models.BaseExportModel,com.azure.core.util.Context)` -> `models.TerraformOperationStatus exportTerraform(models.BaseExportModel,com.azure.core.util.Context)` - -#### `models.ExportResourceGroup` was modified - -* `validate()` was removed - -#### `models.ExportQuery` was modified - -* `validate()` was removed - -#### `models.OperationDisplay` was modified - -* `validate()` was removed - -#### `models.ExportResource` was modified - -* `validate()` was removed - -#### `AzureTerraformManager` was modified - -* `fluent.AzureTerraformClient serviceClient()` -> `fluent.AzureTerraformManagementClient serviceClient()` - -#### `models.BaseExportModel` was modified - -* `validate()` was removed - -### Features Added - -* `models.ExportResult` was added - -* `models.TerraformOperationStatus` was added - -* `models.AuthorizationScopeFilter` was added - -* `models.ResourceProvisioningState` was added - -* `models.AzureExtensionResourceType` was added - -#### `models.ExportResourceGroup` was modified - -* `withIncludeExtensions(java.util.List)` was added -* `withExcludeAzureResource(java.util.List)` was added -* `withIncludeRoleAssignment(java.lang.Boolean)` was added -* `withExcludeTerraformResource(java.util.List)` was added -* `withIncludeManagedResource(java.lang.Boolean)` was added - -#### `models.ExportQuery` was modified - -* `withIncludeManagedResource(java.lang.Boolean)` was added -* `withExcludeAzureResource(java.util.List)` was added -* `withIncludeRoleAssignment(java.lang.Boolean)` was added -* `withIncludeResourceGroup(java.lang.Boolean)` was added -* `withIncludeExtensions(java.util.List)` was added -* `withExcludeTerraformResource(java.util.List)` was added -* `authorizationScopeFilter()` was added -* `withAuthorizationScopeFilter(models.AuthorizationScopeFilter)` was added -* `table()` was added -* `withTable(java.lang.String)` was added -* `includeResourceGroup()` was added - -#### `models.ExportResource` was modified - -* `withIncludeManagedResource(java.lang.Boolean)` was added -* `withExcludeAzureResource(java.util.List)` was added -* `withIncludeExtensions(java.util.List)` was added -* `recursive()` was added -* `includeResourceGroup()` was added -* `withIncludeResourceGroup(java.lang.Boolean)` was added -* `withIncludeRoleAssignment(java.lang.Boolean)` was added -* `withRecursive(java.lang.Boolean)` was added -* `withExcludeTerraformResource(java.util.List)` was added - -#### `models.BaseExportModel` was modified - -* `includeManagedResource()` was added -* `withIncludeExtensions(java.util.List)` was added -* `withIncludeRoleAssignment(java.lang.Boolean)` was added -* `includeExtensions()` was added -* `withExcludeAzureResource(java.util.List)` was added -* `withIncludeManagedResource(java.lang.Boolean)` was added -* `excludeTerraformResource()` was added -* `includeRoleAssignment()` was added -* `withExcludeTerraformResource(java.util.List)` was added -* `excludeAzureResource()` was added - ## 1.0.0-beta.1 (2024-11-20) - Azure Resource Manager Azure Terraform client library for Java. This package contains Microsoft Azure SDK for Azure Terraform Management SDK. The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform resources. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/terraform/azure-resourcemanager-terraform/README.md b/sdk/terraform/azure-resourcemanager-terraform/README.md index 78d6224f2bfa..e046b66d1d6d 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/README.md +++ b/sdk/terraform/azure-resourcemanager-terraform/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Azure Terraform client library for Java. -This package contains Microsoft Azure SDK for Azure Terraform Management SDK. The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform resources. Package api-version 2026-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Azure Terraform Management SDK. The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform resources. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ AzureTerraformManager manager = AzureTerraformManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,3 +100,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + + diff --git a/sdk/terraform/azure-resourcemanager-terraform/SAMPLE.md b/sdk/terraform/azure-resourcemanager-terraform/SAMPLE.md index 1cd1bafdb655..aa4df8d52cbd 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/SAMPLE.md +++ b/sdk/terraform/azure-resourcemanager-terraform/SAMPLE.md @@ -16,7 +16,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-09-01-preview/ListOperations.json + * x-ms-original-file: 2023-07-01-preview/ListOperations.json */ /** * Sample code: Get a list of operations for a resource provider. @@ -40,7 +40,7 @@ import com.azure.resourcemanager.terraform.models.ExportResourceGroup; */ public final class TerraformExportTerraformSamples { /* - * x-ms-original-file: 2026-09-01-preview/ExportTerraform.json + * x-ms-original-file: 2023-07-01-preview/ExportTerraform.json */ /** * Sample code: ExportTerraform. diff --git a/sdk/terraform/azure-resourcemanager-terraform/pom.xml b/sdk/terraform/azure-resourcemanager-terraform/pom.xml index 4d232d5e0a1c..33ef43f3097c 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/pom.xml +++ b/sdk/terraform/azure-resourcemanager-terraform/pom.xml @@ -3,7 +3,7 @@ ~ Licensed under the MIT License. ~ Code generated by Microsoft (R) TypeSpec Code Generator. --> - + 4.0.0 com.azure @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-terraform - 1.0.0-beta.3 + 1.0.0-beta.2 jar Microsoft Azure SDK for Azure Terraform Management - This package contains Microsoft Azure SDK for Azure Terraform Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform resources. Package api-version 2026-09-01-preview. + This package contains Microsoft Azure SDK for Azure Terraform Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform resources. https://github.com/Azure/azure-sdk-for-java @@ -46,6 +46,7 @@ 0 0 true + false diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/implementation/AzureTerraformManagementClientImpl.java b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/implementation/AzureTerraformManagementClientImpl.java index 2c70be3270d9..31945ea40768 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/implementation/AzureTerraformManagementClientImpl.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/implementation/AzureTerraformManagementClientImpl.java @@ -172,7 +172,7 @@ public TerraformsClient getTerraforms() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-09-01-preview"; + this.apiVersion = "2025-09-01-preview"; this.operations = new OperationsClientImpl(this); this.terraforms = new TerraformsClientImpl(this); } diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/AzureExtensionResourceType.java b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/AzureExtensionResourceType.java deleted file mode 100644 index d6e5fef464ba..000000000000 --- a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/AzureExtensionResourceType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.terraform.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The Azure extension resource type. - */ -public final class AzureExtensionResourceType extends ExpandableStringEnum { - /** - * The Azure role assignment extension resource type. - */ - public static final AzureExtensionResourceType ROLE_ASSIGNMENTS = fromString("role-assignments"); - - /** - * The Azure lock extension resource type. - */ - public static final AzureExtensionResourceType LOCKS = fromString("locks"); - - /** - * The Azure diagnostic settings extension resource type. - */ - public static final AzureExtensionResourceType DIAGNOSTIC_SETTINGS = fromString("diagnostic-settings"); - - /** - * Creates a new instance of AzureExtensionResourceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AzureExtensionResourceType() { - } - - /** - * Creates or finds a AzureExtensionResourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AzureExtensionResourceType. - */ - public static AzureExtensionResourceType fromString(String name) { - return fromString(name, AzureExtensionResourceType.class); - } - - /** - * Gets known AzureExtensionResourceType values. - * - * @return known AzureExtensionResourceType values. - */ - public static Collection values() { - return values(AzureExtensionResourceType.class); - } -} diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/BaseExportModel.java b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/BaseExportModel.java index afd9642a8d84..c794efb366ec 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/BaseExportModel.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/BaseExportModel.java @@ -39,16 +39,11 @@ public class BaseExportModel implements JsonSerializable { private Boolean maskSensitive; /* - * Whether to include role assignments assigned to the resources exported. Defaults to `false`. This is deprecated - * in favor of `includeExtensions` (with `role-assignments` specified). + * Whether to include RBAC role assignments assigned to the resources exported. Only resource-scoped role + * assignments are supported. Defaults to `false`. */ private Boolean includeRoleAssignment; - /* - * Include extension resource types directly associated to the resources exported - */ - private List includeExtensions; - /* * Whether to include internal resources managed by Azure in the exported configuration. Defaults to `false`. */ @@ -145,8 +140,8 @@ public BaseExportModel withMaskSensitive(Boolean maskSensitive) { } /** - * Get the includeRoleAssignment property: Whether to include role assignments assigned to the resources exported. - * Defaults to `false`. This is deprecated in favor of `includeExtensions` (with `role-assignments` specified). + * Get the includeRoleAssignment property: Whether to include RBAC role assignments assigned to the resources + * exported. Only resource-scoped role assignments are supported. Defaults to `false`. * * @return the includeRoleAssignment value. */ @@ -155,8 +150,8 @@ public Boolean includeRoleAssignment() { } /** - * Set the includeRoleAssignment property: Whether to include role assignments assigned to the resources exported. - * Defaults to `false`. This is deprecated in favor of `includeExtensions` (with `role-assignments` specified). + * Set the includeRoleAssignment property: Whether to include RBAC role assignments assigned to the resources + * exported. Only resource-scoped role assignments are supported. Defaults to `false`. * * @param includeRoleAssignment the includeRoleAssignment value to set. * @return the BaseExportModel object itself. @@ -166,28 +161,6 @@ public BaseExportModel withIncludeRoleAssignment(Boolean includeRoleAssignment) return this; } - /** - * Get the includeExtensions property: Include extension resource types directly associated to the resources - * exported. - * - * @return the includeExtensions value. - */ - public List includeExtensions() { - return this.includeExtensions; - } - - /** - * Set the includeExtensions property: Include extension resource types directly associated to the resources - * exported. - * - * @param includeExtensions the includeExtensions value to set. - * @return the BaseExportModel object itself. - */ - public BaseExportModel withIncludeExtensions(List includeExtensions) { - this.includeExtensions = includeExtensions; - return this; - } - /** * Get the includeManagedResource property: Whether to include internal resources managed by Azure in the exported * configuration. Defaults to `false`. @@ -266,8 +239,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("fullProperties", this.fullProperties); jsonWriter.writeBooleanField("maskSensitive", this.maskSensitive); jsonWriter.writeBooleanField("includeRoleAssignment", this.includeRoleAssignment); - jsonWriter.writeArrayField("includeExtensions", this.includeExtensions, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeBooleanField("includeManagedResource", this.includeManagedResource); jsonWriter.writeArrayField("excludeAzureResource", this.excludeAzureResource, (writer, element) -> writer.writeString(element)); @@ -330,10 +301,6 @@ static BaseExportModel fromJsonKnownDiscriminator(JsonReader jsonReader) throws deserializedBaseExportModel.maskSensitive = reader.getNullable(JsonReader::getBoolean); } else if ("includeRoleAssignment".equals(fieldName)) { deserializedBaseExportModel.includeRoleAssignment = reader.getNullable(JsonReader::getBoolean); - } else if ("includeExtensions".equals(fieldName)) { - List includeExtensions - = reader.readArray(reader1 -> AzureExtensionResourceType.fromString(reader1.getString())); - deserializedBaseExportModel.includeExtensions = includeExtensions; } else if ("includeManagedResource".equals(fieldName)) { deserializedBaseExportModel.includeManagedResource = reader.getNullable(JsonReader::getBoolean); } else if ("excludeAzureResource".equals(fieldName)) { diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportQuery.java b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportQuery.java index b7caae05b7bb..9c2c716c7535 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportQuery.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportQuery.java @@ -231,15 +231,6 @@ public ExportQuery withIncludeRoleAssignment(Boolean includeRoleAssignment) { return this; } - /** - * {@inheritDoc} - */ - @Override - public ExportQuery withIncludeExtensions(List includeExtensions) { - super.withIncludeExtensions(includeExtensions); - return this; - } - /** * {@inheritDoc} */ @@ -277,8 +268,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("fullProperties", fullProperties()); jsonWriter.writeBooleanField("maskSensitive", maskSensitive()); jsonWriter.writeBooleanField("includeRoleAssignment", includeRoleAssignment()); - jsonWriter.writeArrayField("includeExtensions", includeExtensions(), - (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeBooleanField("includeManagedResource", includeManagedResource()); jsonWriter.writeArrayField("excludeAzureResource", excludeAzureResource(), (writer, element) -> writer.writeString(element)); @@ -319,10 +308,6 @@ public static ExportQuery fromJson(JsonReader jsonReader) throws IOException { deserializedExportQuery.withMaskSensitive(reader.getNullable(JsonReader::getBoolean)); } else if ("includeRoleAssignment".equals(fieldName)) { deserializedExportQuery.withIncludeRoleAssignment(reader.getNullable(JsonReader::getBoolean)); - } else if ("includeExtensions".equals(fieldName)) { - List includeExtensions - = reader.readArray(reader1 -> AzureExtensionResourceType.fromString(reader1.getString())); - deserializedExportQuery.withIncludeExtensions(includeExtensions); } else if ("includeManagedResource".equals(fieldName)) { deserializedExportQuery.withIncludeManagedResource(reader.getNullable(JsonReader::getBoolean)); } else if ("excludeAzureResource".equals(fieldName)) { diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportResource.java b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportResource.java index fafd012dee06..01c391b4d899 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportResource.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportResource.java @@ -234,15 +234,6 @@ public ExportResource withIncludeRoleAssignment(Boolean includeRoleAssignment) { return this; } - /** - * {@inheritDoc} - */ - @Override - public ExportResource withIncludeExtensions(List includeExtensions) { - super.withIncludeExtensions(includeExtensions); - return this; - } - /** * {@inheritDoc} */ @@ -280,8 +271,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("fullProperties", fullProperties()); jsonWriter.writeBooleanField("maskSensitive", maskSensitive()); jsonWriter.writeBooleanField("includeRoleAssignment", includeRoleAssignment()); - jsonWriter.writeArrayField("includeExtensions", includeExtensions(), - (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeBooleanField("includeManagedResource", includeManagedResource()); jsonWriter.writeArrayField("excludeAzureResource", excludeAzureResource(), (writer, element) -> writer.writeString(element)); @@ -321,10 +310,6 @@ public static ExportResource fromJson(JsonReader jsonReader) throws IOException deserializedExportResource.withMaskSensitive(reader.getNullable(JsonReader::getBoolean)); } else if ("includeRoleAssignment".equals(fieldName)) { deserializedExportResource.withIncludeRoleAssignment(reader.getNullable(JsonReader::getBoolean)); - } else if ("includeExtensions".equals(fieldName)) { - List includeExtensions - = reader.readArray(reader1 -> AzureExtensionResourceType.fromString(reader1.getString())); - deserializedExportResource.withIncludeExtensions(includeExtensions); } else if ("includeManagedResource".equals(fieldName)) { deserializedExportResource.withIncludeManagedResource(reader.getNullable(JsonReader::getBoolean)); } else if ("excludeAzureResource".equals(fieldName)) { diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportResourceGroup.java b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportResourceGroup.java index 5d4a4f336af7..f4c58aa0a535 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportResourceGroup.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/models/ExportResourceGroup.java @@ -123,15 +123,6 @@ public ExportResourceGroup withIncludeRoleAssignment(Boolean includeRoleAssignme return this; } - /** - * {@inheritDoc} - */ - @Override - public ExportResourceGroup withIncludeExtensions(List includeExtensions) { - super.withIncludeExtensions(includeExtensions); - return this; - } - /** * {@inheritDoc} */ @@ -169,8 +160,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("fullProperties", fullProperties()); jsonWriter.writeBooleanField("maskSensitive", maskSensitive()); jsonWriter.writeBooleanField("includeRoleAssignment", includeRoleAssignment()); - jsonWriter.writeArrayField("includeExtensions", includeExtensions(), - (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeBooleanField("includeManagedResource", includeManagedResource()); jsonWriter.writeArrayField("excludeAzureResource", excludeAzureResource(), (writer, element) -> writer.writeString(element)); @@ -207,10 +196,6 @@ public static ExportResourceGroup fromJson(JsonReader jsonReader) throws IOExcep } else if ("includeRoleAssignment".equals(fieldName)) { deserializedExportResourceGroup .withIncludeRoleAssignment(reader.getNullable(JsonReader::getBoolean)); - } else if ("includeExtensions".equals(fieldName)) { - List includeExtensions - = reader.readArray(reader1 -> AzureExtensionResourceType.fromString(reader1.getString())); - deserializedExportResourceGroup.withIncludeExtensions(includeExtensions); } else if ("includeManagedResource".equals(fieldName)) { deserializedExportResourceGroup .withIncludeManagedResource(reader.getNullable(JsonReader::getBoolean)); diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/main/resources/META-INF/azure-resourcemanager-terraform_metadata.json b/sdk/terraform/azure-resourcemanager-terraform/src/main/resources/META-INF/azure-resourcemanager-terraform_metadata.json index cb03244d40a1..8dac3ba082ea 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/main/resources/META-INF/azure-resourcemanager-terraform_metadata.json +++ b/sdk/terraform/azure-resourcemanager-terraform/src/main/resources/META-INF/azure-resourcemanager-terraform_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.AzureTerraform":"2026-09-01-preview"},"crossLanguagePackageId":"Microsoft.AzureTerraform","crossLanguageVersion":"70f3a1b0dc39","crossLanguageDefinitions":{"com.azure.resourcemanager.terraform.fluent.AzureTerraformManagementClient":"Microsoft.AzureTerraform","com.azure.resourcemanager.terraform.fluent.OperationsClient":"Microsoft.AzureTerraform.Operations","com.azure.resourcemanager.terraform.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.terraform.fluent.TerraformsClient":"Microsoft.AzureTerraform.Terraform","com.azure.resourcemanager.terraform.fluent.TerraformsClient.beginExportTerraform":"Microsoft.AzureTerraform.Terraform.exportTerraform","com.azure.resourcemanager.terraform.fluent.TerraformsClient.exportTerraform":"Microsoft.AzureTerraform.Terraform.exportTerraform","com.azure.resourcemanager.terraform.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.terraform.fluent.models.TerraformOperationStatusInner":"Microsoft.AzureTerraform.TerraformOperationStatus","com.azure.resourcemanager.terraform.implementation.AzureTerraformManagementClientBuilder":"Microsoft.AzureTerraform","com.azure.resourcemanager.terraform.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.terraform.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.terraform.models.AuthorizationScopeFilter":"Microsoft.AzureTerraform.authorizationScopeFilter","com.azure.resourcemanager.terraform.models.AzureExtensionResourceType":"Microsoft.AzureTerraform.azureExtensionResourceType","com.azure.resourcemanager.terraform.models.BaseExportModel":"Microsoft.AzureTerraform.BaseExportModel","com.azure.resourcemanager.terraform.models.ExportQuery":"Microsoft.AzureTerraform.ExportQuery","com.azure.resourcemanager.terraform.models.ExportResource":"Microsoft.AzureTerraform.ExportResource","com.azure.resourcemanager.terraform.models.ExportResourceGroup":"Microsoft.AzureTerraform.ExportResourceGroup","com.azure.resourcemanager.terraform.models.ExportResult":"Microsoft.AzureTerraform.ExportResult","com.azure.resourcemanager.terraform.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.terraform.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.terraform.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.terraform.models.TargetProvider":"Microsoft.AzureTerraform.targetProvider","com.azure.resourcemanager.terraform.models.Type":"Microsoft.AzureTerraform.Type"},"generatedFiles":["src/main/java/com/azure/resourcemanager/terraform/AzureTerraformManager.java","src/main/java/com/azure/resourcemanager/terraform/fluent/AzureTerraformManagementClient.java","src/main/java/com/azure/resourcemanager/terraform/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/terraform/fluent/TerraformsClient.java","src/main/java/com/azure/resourcemanager/terraform/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/terraform/fluent/models/TerraformOperationStatusInner.java","src/main/java/com/azure/resourcemanager/terraform/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/terraform/fluent/package-info.java","src/main/java/com/azure/resourcemanager/terraform/implementation/AzureTerraformManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/terraform/implementation/AzureTerraformManagementClientImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/terraform/implementation/TerraformOperationStatusImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/TerraformsClientImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/TerraformsImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/terraform/implementation/package-info.java","src/main/java/com/azure/resourcemanager/terraform/models/ActionType.java","src/main/java/com/azure/resourcemanager/terraform/models/AuthorizationScopeFilter.java","src/main/java/com/azure/resourcemanager/terraform/models/AzureExtensionResourceType.java","src/main/java/com/azure/resourcemanager/terraform/models/BaseExportModel.java","src/main/java/com/azure/resourcemanager/terraform/models/ExportQuery.java","src/main/java/com/azure/resourcemanager/terraform/models/ExportResource.java","src/main/java/com/azure/resourcemanager/terraform/models/ExportResourceGroup.java","src/main/java/com/azure/resourcemanager/terraform/models/ExportResult.java","src/main/java/com/azure/resourcemanager/terraform/models/Operation.java","src/main/java/com/azure/resourcemanager/terraform/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/terraform/models/Operations.java","src/main/java/com/azure/resourcemanager/terraform/models/Origin.java","src/main/java/com/azure/resourcemanager/terraform/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/terraform/models/TargetProvider.java","src/main/java/com/azure/resourcemanager/terraform/models/TerraformOperationStatus.java","src/main/java/com/azure/resourcemanager/terraform/models/Terraforms.java","src/main/java/com/azure/resourcemanager/terraform/models/Type.java","src/main/java/com/azure/resourcemanager/terraform/models/package-info.java","src/main/java/com/azure/resourcemanager/terraform/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.AzureTerraform":"2025-09-01-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.terraform.fluent.AzureTerraformManagementClient":"Microsoft.AzureTerraform","com.azure.resourcemanager.terraform.fluent.OperationsClient":"Microsoft.AzureTerraform.Operations","com.azure.resourcemanager.terraform.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.terraform.fluent.TerraformsClient":"Microsoft.AzureTerraform.Terraform","com.azure.resourcemanager.terraform.fluent.TerraformsClient.beginExportTerraform":"Microsoft.AzureTerraform.Terraform.exportTerraform","com.azure.resourcemanager.terraform.fluent.TerraformsClient.exportTerraform":"Microsoft.AzureTerraform.Terraform.exportTerraform","com.azure.resourcemanager.terraform.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.terraform.fluent.models.TerraformOperationStatusInner":"Microsoft.AzureTerraform.TerraformOperationStatus","com.azure.resourcemanager.terraform.implementation.AzureTerraformManagementClientBuilder":"Microsoft.AzureTerraform","com.azure.resourcemanager.terraform.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.terraform.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.terraform.models.AuthorizationScopeFilter":"Microsoft.AzureTerraform.authorizationScopeFilter","com.azure.resourcemanager.terraform.models.BaseExportModel":"Microsoft.AzureTerraform.BaseExportModel","com.azure.resourcemanager.terraform.models.ExportQuery":"Microsoft.AzureTerraform.ExportQuery","com.azure.resourcemanager.terraform.models.ExportResource":"Microsoft.AzureTerraform.ExportResource","com.azure.resourcemanager.terraform.models.ExportResourceGroup":"Microsoft.AzureTerraform.ExportResourceGroup","com.azure.resourcemanager.terraform.models.ExportResult":"Microsoft.AzureTerraform.ExportResult","com.azure.resourcemanager.terraform.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.terraform.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.terraform.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.terraform.models.TargetProvider":"Microsoft.AzureTerraform.targetProvider","com.azure.resourcemanager.terraform.models.Type":"Microsoft.AzureTerraform.Type"},"generatedFiles":["src/main/java/com/azure/resourcemanager/terraform/AzureTerraformManager.java","src/main/java/com/azure/resourcemanager/terraform/fluent/AzureTerraformManagementClient.java","src/main/java/com/azure/resourcemanager/terraform/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/terraform/fluent/TerraformsClient.java","src/main/java/com/azure/resourcemanager/terraform/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/terraform/fluent/models/TerraformOperationStatusInner.java","src/main/java/com/azure/resourcemanager/terraform/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/terraform/fluent/package-info.java","src/main/java/com/azure/resourcemanager/terraform/implementation/AzureTerraformManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/terraform/implementation/AzureTerraformManagementClientImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/terraform/implementation/TerraformOperationStatusImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/TerraformsClientImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/TerraformsImpl.java","src/main/java/com/azure/resourcemanager/terraform/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/terraform/implementation/package-info.java","src/main/java/com/azure/resourcemanager/terraform/models/ActionType.java","src/main/java/com/azure/resourcemanager/terraform/models/AuthorizationScopeFilter.java","src/main/java/com/azure/resourcemanager/terraform/models/BaseExportModel.java","src/main/java/com/azure/resourcemanager/terraform/models/ExportQuery.java","src/main/java/com/azure/resourcemanager/terraform/models/ExportResource.java","src/main/java/com/azure/resourcemanager/terraform/models/ExportResourceGroup.java","src/main/java/com/azure/resourcemanager/terraform/models/ExportResult.java","src/main/java/com/azure/resourcemanager/terraform/models/Operation.java","src/main/java/com/azure/resourcemanager/terraform/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/terraform/models/Operations.java","src/main/java/com/azure/resourcemanager/terraform/models/Origin.java","src/main/java/com/azure/resourcemanager/terraform/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/terraform/models/TargetProvider.java","src/main/java/com/azure/resourcemanager/terraform/models/TerraformOperationStatus.java","src/main/java/com/azure/resourcemanager/terraform/models/Terraforms.java","src/main/java/com/azure/resourcemanager/terraform/models/Type.java","src/main/java/com/azure/resourcemanager/terraform/models/package-info.java","src/main/java/com/azure/resourcemanager/terraform/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/samples/java/com/azure/resourcemanager/terraform/generated/OperationsListSamples.java b/sdk/terraform/azure-resourcemanager-terraform/src/samples/java/com/azure/resourcemanager/terraform/generated/OperationsListSamples.java index 9bc02bd3f4b8..5a946c33ea88 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/samples/java/com/azure/resourcemanager/terraform/generated/OperationsListSamples.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/samples/java/com/azure/resourcemanager/terraform/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-09-01-preview/ListOperations.json + * x-ms-original-file: 2025-09-01-preview/ListOperations.json */ /** * Sample code: Get a list of operations for a resource provider. diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/samples/java/com/azure/resourcemanager/terraform/generated/TerraformExportTerraformSamples.java b/sdk/terraform/azure-resourcemanager-terraform/src/samples/java/com/azure/resourcemanager/terraform/generated/TerraformExportTerraformSamples.java index e3a9ce0ea4ef..c65fe3035c79 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/samples/java/com/azure/resourcemanager/terraform/generated/TerraformExportTerraformSamples.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/samples/java/com/azure/resourcemanager/terraform/generated/TerraformExportTerraformSamples.java @@ -11,7 +11,7 @@ */ public final class TerraformExportTerraformSamples { /* - * x-ms-original-file: 2026-09-01-preview/ExportTerraform.json + * x-ms-original-file: 2025-09-01-preview/ExportTerraform.json */ /** * Sample code: ExportTerraform. diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/BaseExportModelTests.java b/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/BaseExportModelTests.java index 518d988ee054..c449297ea0d6 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/BaseExportModelTests.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/BaseExportModelTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.terraform.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.terraform.models.AzureExtensionResourceType; import com.azure.resourcemanager.terraform.models.BaseExportModel; import com.azure.resourcemanager.terraform.models.TargetProvider; import java.util.Arrays; @@ -15,16 +14,15 @@ public final class BaseExportModelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BaseExportModel model = BinaryData.fromString( - "{\"type\":\"BaseExportModel\",\"targetProvider\":\"azapi\",\"fullProperties\":false,\"maskSensitive\":false,\"includeRoleAssignment\":true,\"includeExtensions\":[\"locks\",\"diagnostic-settings\",\"diagnostic-settings\"],\"includeManagedResource\":false,\"excludeAzureResource\":[\"uf\",\"yzkohdbihanuf\",\"fcbjysagithxqha\"],\"excludeTerraformResource\":[\"pikxwczbyscnpqxu\",\"ivyqniwbybrkxvd\",\"mjgr\"]}") + "{\"type\":\"BaseExportModel\",\"targetProvider\":\"azapi\",\"fullProperties\":false,\"maskSensitive\":false,\"includeRoleAssignment\":true,\"includeManagedResource\":true,\"excludeAzureResource\":[\"ymglzufcyz\",\"ohdbihanufh\",\"cbjy\"],\"excludeTerraformResource\":[\"ithxqhabifpi\"]}") .toObject(BaseExportModel.class); Assertions.assertEquals(TargetProvider.AZAPI, model.targetProvider()); Assertions.assertFalse(model.fullProperties()); Assertions.assertFalse(model.maskSensitive()); Assertions.assertTrue(model.includeRoleAssignment()); - Assertions.assertEquals(AzureExtensionResourceType.LOCKS, model.includeExtensions().get(0)); - Assertions.assertFalse(model.includeManagedResource()); - Assertions.assertEquals("uf", model.excludeAzureResource().get(0)); - Assertions.assertEquals("pikxwczbyscnpqxu", model.excludeTerraformResource().get(0)); + Assertions.assertTrue(model.includeManagedResource()); + Assertions.assertEquals("ymglzufcyz", model.excludeAzureResource().get(0)); + Assertions.assertEquals("ithxqhabifpi", model.excludeTerraformResource().get(0)); } @org.junit.jupiter.api.Test @@ -33,19 +31,16 @@ public void testSerialize() throws Exception { .withFullProperties(false) .withMaskSensitive(false) .withIncludeRoleAssignment(true) - .withIncludeExtensions(Arrays.asList(AzureExtensionResourceType.LOCKS, - AzureExtensionResourceType.DIAGNOSTIC_SETTINGS, AzureExtensionResourceType.DIAGNOSTIC_SETTINGS)) - .withIncludeManagedResource(false) - .withExcludeAzureResource(Arrays.asList("uf", "yzkohdbihanuf", "fcbjysagithxqha")) - .withExcludeTerraformResource(Arrays.asList("pikxwczbyscnpqxu", "ivyqniwbybrkxvd", "mjgr")); + .withIncludeManagedResource(true) + .withExcludeAzureResource(Arrays.asList("ymglzufcyz", "ohdbihanufh", "cbjy")) + .withExcludeTerraformResource(Arrays.asList("ithxqhabifpi")); model = BinaryData.fromObject(model).toObject(BaseExportModel.class); Assertions.assertEquals(TargetProvider.AZAPI, model.targetProvider()); Assertions.assertFalse(model.fullProperties()); Assertions.assertFalse(model.maskSensitive()); Assertions.assertTrue(model.includeRoleAssignment()); - Assertions.assertEquals(AzureExtensionResourceType.LOCKS, model.includeExtensions().get(0)); - Assertions.assertFalse(model.includeManagedResource()); - Assertions.assertEquals("uf", model.excludeAzureResource().get(0)); - Assertions.assertEquals("pikxwczbyscnpqxu", model.excludeTerraformResource().get(0)); + Assertions.assertTrue(model.includeManagedResource()); + Assertions.assertEquals("ymglzufcyz", model.excludeAzureResource().get(0)); + Assertions.assertEquals("ithxqhabifpi", model.excludeTerraformResource().get(0)); } } diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/ExportResourceGroupTests.java b/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/ExportResourceGroupTests.java index 0f5b3f2635fe..5cc78de55532 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/ExportResourceGroupTests.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/ExportResourceGroupTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.terraform.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.terraform.models.AzureExtensionResourceType; import com.azure.resourcemanager.terraform.models.ExportResourceGroup; import com.azure.resourcemanager.terraform.models.TargetProvider; import java.util.Arrays; @@ -15,42 +14,39 @@ public final class ExportResourceGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExportResourceGroup model = BinaryData.fromString( - "{\"type\":\"ExportResourceGroup\",\"resourceGroupName\":\"pslwejdpvw\",\"namePattern\":\"oqpsoa\",\"targetProvider\":\"azurerm\",\"fullProperties\":true,\"maskSensitive\":false,\"includeRoleAssignment\":false,\"includeExtensions\":[\"role-assignments\"],\"includeManagedResource\":false,\"excludeAzureResource\":[\"ffdfdosygexpa\",\"jakhmsbzjh\"],\"excludeTerraformResource\":[\"evdphlxaol\",\"hqtrgqjbpf\"]}") + "{\"type\":\"ExportResourceGroup\",\"resourceGroupName\":\"zkrwfn\",\"namePattern\":\"odjpslwejd\",\"targetProvider\":\"azapi\",\"fullProperties\":true,\"maskSensitive\":true,\"includeRoleAssignment\":true,\"includeManagedResource\":true,\"excludeAzureResource\":[\"tazak\",\"j\",\"ahbc\",\"yffdfdos\"],\"excludeTerraformResource\":[\"xpaojakhmsbz\"]}") .toObject(ExportResourceGroup.class); - Assertions.assertEquals(TargetProvider.AZURERM, model.targetProvider()); + Assertions.assertEquals(TargetProvider.AZAPI, model.targetProvider()); Assertions.assertTrue(model.fullProperties()); - Assertions.assertFalse(model.maskSensitive()); - Assertions.assertFalse(model.includeRoleAssignment()); - Assertions.assertEquals(AzureExtensionResourceType.ROLE_ASSIGNMENTS, model.includeExtensions().get(0)); - Assertions.assertFalse(model.includeManagedResource()); - Assertions.assertEquals("ffdfdosygexpa", model.excludeAzureResource().get(0)); - Assertions.assertEquals("evdphlxaol", model.excludeTerraformResource().get(0)); - Assertions.assertEquals("pslwejdpvw", model.resourceGroupName()); - Assertions.assertEquals("oqpsoa", model.namePattern()); + Assertions.assertTrue(model.maskSensitive()); + Assertions.assertTrue(model.includeRoleAssignment()); + Assertions.assertTrue(model.includeManagedResource()); + Assertions.assertEquals("tazak", model.excludeAzureResource().get(0)); + Assertions.assertEquals("xpaojakhmsbz", model.excludeTerraformResource().get(0)); + Assertions.assertEquals("zkrwfn", model.resourceGroupName()); + Assertions.assertEquals("odjpslwejd", model.namePattern()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExportResourceGroup model = new ExportResourceGroup().withTargetProvider(TargetProvider.AZURERM) + ExportResourceGroup model = new ExportResourceGroup().withTargetProvider(TargetProvider.AZAPI) .withFullProperties(true) - .withMaskSensitive(false) - .withIncludeRoleAssignment(false) - .withIncludeExtensions(Arrays.asList(AzureExtensionResourceType.ROLE_ASSIGNMENTS)) - .withIncludeManagedResource(false) - .withExcludeAzureResource(Arrays.asList("ffdfdosygexpa", "jakhmsbzjh")) - .withExcludeTerraformResource(Arrays.asList("evdphlxaol", "hqtrgqjbpf")) - .withResourceGroupName("pslwejdpvw") - .withNamePattern("oqpsoa"); + .withMaskSensitive(true) + .withIncludeRoleAssignment(true) + .withIncludeManagedResource(true) + .withExcludeAzureResource(Arrays.asList("tazak", "j", "ahbc", "yffdfdos")) + .withExcludeTerraformResource(Arrays.asList("xpaojakhmsbz")) + .withResourceGroupName("zkrwfn") + .withNamePattern("odjpslwejd"); model = BinaryData.fromObject(model).toObject(ExportResourceGroup.class); - Assertions.assertEquals(TargetProvider.AZURERM, model.targetProvider()); + Assertions.assertEquals(TargetProvider.AZAPI, model.targetProvider()); Assertions.assertTrue(model.fullProperties()); - Assertions.assertFalse(model.maskSensitive()); - Assertions.assertFalse(model.includeRoleAssignment()); - Assertions.assertEquals(AzureExtensionResourceType.ROLE_ASSIGNMENTS, model.includeExtensions().get(0)); - Assertions.assertFalse(model.includeManagedResource()); - Assertions.assertEquals("ffdfdosygexpa", model.excludeAzureResource().get(0)); - Assertions.assertEquals("evdphlxaol", model.excludeTerraformResource().get(0)); - Assertions.assertEquals("pslwejdpvw", model.resourceGroupName()); - Assertions.assertEquals("oqpsoa", model.namePattern()); + Assertions.assertTrue(model.maskSensitive()); + Assertions.assertTrue(model.includeRoleAssignment()); + Assertions.assertTrue(model.includeManagedResource()); + Assertions.assertEquals("tazak", model.excludeAzureResource().get(0)); + Assertions.assertEquals("xpaojakhmsbz", model.excludeTerraformResource().get(0)); + Assertions.assertEquals("zkrwfn", model.resourceGroupName()); + Assertions.assertEquals("odjpslwejd", model.namePattern()); } } diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/ExportResourceTests.java b/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/ExportResourceTests.java index a4926d9e4251..5b99e57b5c75 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/ExportResourceTests.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/ExportResourceTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.terraform.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.terraform.models.AzureExtensionResourceType; import com.azure.resourcemanager.terraform.models.ExportResource; import com.azure.resourcemanager.terraform.models.TargetProvider; import java.util.Arrays; @@ -15,54 +14,51 @@ public final class ExportResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExportResource model = BinaryData.fromString( - "{\"type\":\"ExportResource\",\"resourceIds\":[\"wlokjyem\"],\"resourceName\":\"vnipjox\",\"resourceType\":\"nchgej\",\"namePattern\":\"odmailzyd\",\"recursive\":false,\"includeResourceGroup\":true,\"targetProvider\":\"azurerm\",\"fullProperties\":true,\"maskSensitive\":false,\"includeRoleAssignment\":false,\"includeExtensions\":[\"locks\",\"locks\"],\"includeManagedResource\":true,\"excludeAzureResource\":[\"xj\",\"prozvcputegjvwmf\",\"atscmd\",\"pjhulsuuvmkj\"],\"excludeTerraformResource\":[\"rwfndiod\"]}") + "{\"type\":\"ExportResource\",\"resourceIds\":[\"rtfw\",\"ukxgaud\"],\"resourceName\":\"snhsjcnyejhkryh\",\"resourceType\":\"apcz\",\"namePattern\":\"okjye\",\"recursive\":true,\"includeResourceGroup\":false,\"targetProvider\":\"azapi\",\"fullProperties\":true,\"maskSensitive\":false,\"includeRoleAssignment\":false,\"includeManagedResource\":true,\"excludeAzureResource\":[\"jspodmailzyde\",\"o\",\"wyahuxinpmqnja\"],\"excludeTerraformResource\":[\"xj\",\"prozvcputegjvwmf\",\"atscmd\",\"pjhulsuuvmkj\"]}") .toObject(ExportResource.class); - Assertions.assertEquals(TargetProvider.AZURERM, model.targetProvider()); + Assertions.assertEquals(TargetProvider.AZAPI, model.targetProvider()); Assertions.assertTrue(model.fullProperties()); Assertions.assertFalse(model.maskSensitive()); Assertions.assertFalse(model.includeRoleAssignment()); - Assertions.assertEquals(AzureExtensionResourceType.LOCKS, model.includeExtensions().get(0)); Assertions.assertTrue(model.includeManagedResource()); - Assertions.assertEquals("xj", model.excludeAzureResource().get(0)); - Assertions.assertEquals("rwfndiod", model.excludeTerraformResource().get(0)); - Assertions.assertEquals("wlokjyem", model.resourceIds().get(0)); - Assertions.assertEquals("vnipjox", model.resourceName()); - Assertions.assertEquals("nchgej", model.resourceType()); - Assertions.assertEquals("odmailzyd", model.namePattern()); - Assertions.assertFalse(model.recursive()); - Assertions.assertTrue(model.includeResourceGroup()); + Assertions.assertEquals("jspodmailzyde", model.excludeAzureResource().get(0)); + Assertions.assertEquals("xj", model.excludeTerraformResource().get(0)); + Assertions.assertEquals("rtfw", model.resourceIds().get(0)); + Assertions.assertEquals("snhsjcnyejhkryh", model.resourceName()); + Assertions.assertEquals("apcz", model.resourceType()); + Assertions.assertEquals("okjye", model.namePattern()); + Assertions.assertTrue(model.recursive()); + Assertions.assertFalse(model.includeResourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExportResource model = new ExportResource().withTargetProvider(TargetProvider.AZURERM) + ExportResource model = new ExportResource().withTargetProvider(TargetProvider.AZAPI) .withFullProperties(true) .withMaskSensitive(false) .withIncludeRoleAssignment(false) - .withIncludeExtensions(Arrays.asList(AzureExtensionResourceType.LOCKS, AzureExtensionResourceType.LOCKS)) .withIncludeManagedResource(true) - .withExcludeAzureResource(Arrays.asList("xj", "prozvcputegjvwmf", "atscmd", "pjhulsuuvmkj")) - .withExcludeTerraformResource(Arrays.asList("rwfndiod")) - .withResourceIds(Arrays.asList("wlokjyem")) - .withResourceName("vnipjox") - .withResourceType("nchgej") - .withNamePattern("odmailzyd") - .withRecursive(false) - .withIncludeResourceGroup(true); + .withExcludeAzureResource(Arrays.asList("jspodmailzyde", "o", "wyahuxinpmqnja")) + .withExcludeTerraformResource(Arrays.asList("xj", "prozvcputegjvwmf", "atscmd", "pjhulsuuvmkj")) + .withResourceIds(Arrays.asList("rtfw", "ukxgaud")) + .withResourceName("snhsjcnyejhkryh") + .withResourceType("apcz") + .withNamePattern("okjye") + .withRecursive(true) + .withIncludeResourceGroup(false); model = BinaryData.fromObject(model).toObject(ExportResource.class); - Assertions.assertEquals(TargetProvider.AZURERM, model.targetProvider()); + Assertions.assertEquals(TargetProvider.AZAPI, model.targetProvider()); Assertions.assertTrue(model.fullProperties()); Assertions.assertFalse(model.maskSensitive()); Assertions.assertFalse(model.includeRoleAssignment()); - Assertions.assertEquals(AzureExtensionResourceType.LOCKS, model.includeExtensions().get(0)); Assertions.assertTrue(model.includeManagedResource()); - Assertions.assertEquals("xj", model.excludeAzureResource().get(0)); - Assertions.assertEquals("rwfndiod", model.excludeTerraformResource().get(0)); - Assertions.assertEquals("wlokjyem", model.resourceIds().get(0)); - Assertions.assertEquals("vnipjox", model.resourceName()); - Assertions.assertEquals("nchgej", model.resourceType()); - Assertions.assertEquals("odmailzyd", model.namePattern()); - Assertions.assertFalse(model.recursive()); - Assertions.assertTrue(model.includeResourceGroup()); + Assertions.assertEquals("jspodmailzyde", model.excludeAzureResource().get(0)); + Assertions.assertEquals("xj", model.excludeTerraformResource().get(0)); + Assertions.assertEquals("rtfw", model.resourceIds().get(0)); + Assertions.assertEquals("snhsjcnyejhkryh", model.resourceName()); + Assertions.assertEquals("apcz", model.resourceType()); + Assertions.assertEquals("okjye", model.namePattern()); + Assertions.assertTrue(model.recursive()); + Assertions.assertFalse(model.includeResourceGroup()); } } diff --git a/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/OperationsListMockTests.java b/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/OperationsListMockTests.java index cc0c747c5177..fbe316e6e901 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/OperationsListMockTests.java +++ b/sdk/terraform/azure-resourcemanager-terraform/src/test/java/com/azure/resourcemanager/terraform/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"b\",\"isDataAction\":false,\"display\":{\"provider\":\"mjqulngsn\",\"resource\":\"bybkzgcwrwclxx\",\"operation\":\"ljdousk\",\"description\":\"vkocrcjdkwtn\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"jzrnf\",\"isDataAction\":true,\"display\":{\"provider\":\"spemvtzfk\",\"resource\":\"ubljofxqe\",\"operation\":\"jaeq\",\"description\":\"qjbasvms\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/terraform/azure-resourcemanager-terraform/tsp-location.yaml b/sdk/terraform/azure-resourcemanager-terraform/tsp-location.yaml index 437dcf97b738..d8cf0e832ea0 100644 --- a/sdk/terraform/azure-resourcemanager-terraform/tsp-location.yaml +++ b/sdk/terraform/azure-resourcemanager-terraform/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/terraform/resource-manager/Microsoft.AzureTerraform/AzureTerraform -commit: fd120e0fcfaa15303cf56fb1987fa805d76cc467 +directory: specification/terraform/Microsoft.AzureTerraform.Management +commit: 6267b64842af3d744c5b092a3f3beef49729ad6d repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/tools/azure-openrewrite/pom.xml b/sdk/tools/azure-openrewrite/pom.xml index 4bd5d0894971..e5945a1c52a3 100644 --- a/sdk/tools/azure-openrewrite/pom.xml +++ b/sdk/tools/azure-openrewrite/pom.xml @@ -273,7 +273,7 @@ com.azure azure-security-keyvault-jca - 2.13.0 + 2.12.0 test @@ -335,7 +335,7 @@ com.azure azure-security-keyvault-jca - 2.13.0 + 2.12.0 provided diff --git a/sdk/translation/azure-ai-documenttranslator/CHANGELOG.md b/sdk/translation/azure-ai-documenttranslator/CHANGELOG.md new file mode 100644 index 000000000000..d89af47bf1e9 --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/CHANGELOG.md @@ -0,0 +1,15 @@ +# Release History + +## 1.0.0-beta.2 (2024-12-06) + +### Other Changes + +#### Deprecation Notice + +Please note, this package has been deprecated and will no longer be maintained. We encourage you to +upgrade to the replacement package, `azure-ai-translation-document`, to continue receiving updates. +Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +## 1.0.0-beta.1 (2021-04-27) + +- Initial beta release for Document Translation client library. diff --git a/sdk/translation/azure-ai-documenttranslator/README.md b/sdk/translation/azure-ai-documenttranslator/README.md new file mode 100644 index 000000000000..cff9148c5f4c --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/README.md @@ -0,0 +1,92 @@ +# Azure Document Translator client library for Java + +## Deprecation Notice + +> Please note, this package has been deprecated and will no longer be maintained. We encourage you to +> upgrade to the replacement package, `azure-ai-translation-document`, to continue receiving updates. +> Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + +Microsoft Azure Cognitive Services Document Translator API enables you to translate documents in batch. + +[Source code][source_code] | [Package (Maven)][package] | [Product Documentation][product_documentation] | [Samples][samples_readme] + +## Getting started + +### Prerequisites + +- A [Java Development Kit (JDK)][jdk_link], version 8 or later. +- [Azure Subscription][azure_subscription] +- An existing Cognitive Services. + +For more information about creating the resource or how to get the location and sku information see [here][cognitive_resource_cli]. + +### Include the Package + +[//]: # ({x-version-update-start;com.azure:azure-ai-documenttranslator;current}) +```xml + + com.azure + azure-ai-documenttranslator + 1.0.0-beta.2 + +``` +[//]: # ({x-version-update-end}) + + +### Authenticate the client +In order to interact with the Document Translator service, you'll need to create an instance of the [`BatchDocumentTranslationClient`][batch_document_translation_client_class] class. You will need an **endpoint** and an **API key** to instantiate a client object. + +#### Get API Key + +You can obtain the endpoint and API key from the resource information in the [Azure Portal][azure_portal] from your Document Translator resource. The endpoint is of format `https://.cognitiveservices.azure.com`. + +##### Example +```java readme-sample-createBatchDocumentTranslationRestClient +String endpoint = String.format("https://%s.cognitiveservices.azure.com/translator/text/batch/v1.0-preview.1", + ""); +String apiKey = ""; + +BatchDocumentTranslationClient client = new BatchDocumentTranslationClientBuilder() + .credential(new AzureKeyCredential(apiKey)) + .endpoint(endpoint) + .httpClient(new NettyAsyncHttpClientBuilder().build()) + .buildClient(); +``` + +## Key concepts + +## Examples +More examples can be found in [samples][samples_code]. + +## Troubleshooting + +### Enabling Logging + +Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite +their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help +locate the root issue. View the [logging][logging] wiki for guidance about enabling logging. + +## Next steps + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +[samples]: src/samples/java/com/azure/ai/documenttranslator +[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-documenttranslator/src +[samples_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/translation/azure-ai-documenttranslator/src/samples/ +[azure_subscription]: https://azure.microsoft.com/free/ +[product_documentation]: https://learn.microsoft.com/azure/ai-services/translator/document-translation/overview#get-started +[cognitive_resource_cli]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli +[batch_document_translation_client_class]: https://github.com/Azure/azure-sdk-for-java/tree/7cebc63a02f2f6ccd2a8adc9b7975e2e71bd3f74/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClient.java +[azure_portal]: https://portal.azure.com +[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable +[package]: https://central.sonatype.com/artifact/com.azure/azure-ai-documenttranslator +[samples_readme]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/translation/azure-ai-documenttranslator/src/samples/README.md + + diff --git a/sdk/translation/azure-ai-documenttranslator/assets.json b/sdk/translation/azure-ai-documenttranslator/assets.json new file mode 100644 index 000000000000..66babe37fce2 --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "java", + "TagPrefix": "java/translation/azure-ai-documenttranslator", + "Tag": "java/translation/azure-ai-documenttranslator_5e2b561f3b" +} diff --git a/sdk/translation/azure-ai-documenttranslator/checkstyle-suppressions.xml b/sdk/translation/azure-ai-documenttranslator/checkstyle-suppressions.xml new file mode 100644 index 000000000000..4e18c6ea8bca --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/sdk/translation/azure-ai-documenttranslator/pom.xml b/sdk/translation/azure-ai-documenttranslator/pom.xml new file mode 100644 index 000000000000..151994e8b42c --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/pom.xml @@ -0,0 +1,81 @@ + + 4.0.0 + + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-ai-documenttranslator + 1.0.0-beta.2 + + Microsoft Azure client library for Document Translation + Please note, this package has been deprecated and will no longer be maintained. + We encourage you to upgrade to the replacement package, `azure-ai-translation-document`, to continue receiving updates. + Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + true + + --add-exports com.azure.core/com.azure.core.implementation.jackson=ALL-UNNAMED + + + false + + + + + com.azure + azure-core + 1.60.0 + + + com.azure + azure-core-experimental + 1.0.0-beta.71 + + + com.azure + azure-core-http-netty + 1.16.8 + + + + + com.azure + azure-core-test + 1.27.0-beta.19 + test + + + com.azure + azure-identity + 1.18.7 + test + + + com.azure + azure-core-serializer-json-jackson + 1.6.8 + test + + + diff --git a/sdk/translation/azure-ai-documenttranslator/spotbugs-exclude.xml b/sdk/translation/azure-ai-documenttranslator/spotbugs-exclude.xml new file mode 100644 index 000000000000..f3dfd5709361 --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/spotbugs-exclude.xml @@ -0,0 +1,7 @@ + + + + diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationAsyncClient.java b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationAsyncClient.java new file mode 100644 index 000000000000..92a2a903b0d8 --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationAsyncClient.java @@ -0,0 +1,624 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.documenttranslator; + +import com.azure.ai.documenttranslator.implementation.DocumentTranslationsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.PollerFlux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous BatchDocumentTranslationClient type. + */ +@ServiceClient(builder = BatchDocumentTranslationClientBuilder.class, isAsync = true) +public final class BatchDocumentTranslationAsyncClient { + @Generated + private final DocumentTranslationsImpl serviceClient; + + /** + * Initializes an instance of BatchDocumentTranslationAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + BatchDocumentTranslationAsyncClient(DocumentTranslationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Submit a document translation request to the Document Translation service + * + * Use this API to submit a bulk (batch) translation request to the Document Translation service. + * Each request can contain multiple documents and must contain a source and destination container for each + * document. + * + * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after + * the container name. + * + * Glossaries / Translation memory can be included in the request and are applied by the service when the document + * is translated. + * + * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. + * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each + * target language must be unique. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     inputs (Required): [
      +     *          (Required){
      +     *             source (Required): {
      +     *                 sourceUrl: String (Required)
      +     *                 filter (Optional): {
      +     *                     prefix: String (Optional)
      +     *                     suffix: String (Optional)
      +     *                 }
      +     *                 language: String (Optional)
      +     *                 storageSource: String(AzureBlob) (Optional)
      +     *             }
      +     *             targets (Required): [
      +     *                  (Required){
      +     *                     targetUrl: String (Required)
      +     *                     category: String (Optional)
      +     *                     language: String (Required)
      +     *                     glossaries (Optional): [
      +     *                          (Optional){
      +     *                             glossaryUrl: String (Required)
      +     *                             format: String (Required)
      +     *                             version: String (Optional)
      +     *                             storageSource: String(AzureBlob) (Optional)
      +     *                         }
      +     *                     ]
      +     *                     storageSource: String(AzureBlob) (Optional)
      +     *                 }
      +     *             ]
      +     *             storageType: String(Folder/File) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body request details. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginStartTranslation(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.beginStartTranslationAsync(body, requestOptions); + } + + /** + * Returns a list of batch requests submitted and the status for each request + * + * Returns a list of batch requests submitted and the status for each request. + * This list only contains batch requests submitted by the user (based on the resource). + * + * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a + * partial result and include a continuation token in the response. + * The absence of a continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By + * default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled operations. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * The server honors the values specified by the client. However, clients must be prepared to handle responses that + * contain a different page size or contain a continuation token. + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job Status Response as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getTranslationsStatus(RequestOptions requestOptions) { + return this.serviceClient.getTranslationsStatusAsync(requestOptions); + } + + /** + * Returns the status for a specific document + * + * Returns the translation status for a specific document based on the request Id and document Id. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The batch id. + * @param documentId Format - uuid. The document id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return document Status Response along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDocumentStatusWithResponse(String id, String documentId, + RequestOptions requestOptions) { + return this.serviceClient.getDocumentStatusWithResponseAsync(id, documentId, requestOptions); + } + + /** + * Returns the status for a document translation request + * + * Returns the status for a document translation request. + * The status includes the overall request status, as well as the status for documents that are being translated as + * part of that request. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job status response along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTranslationStatusWithResponse(String id, RequestOptions requestOptions) { + return this.serviceClient.getTranslationStatusWithResponseAsync(id, requestOptions); + } + + /** + * Cancel a currently processing or queued translation + * + * Cancel a currently processing or queued translation. + * Cancel a currently processing or queued translation. + * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be + * returned. + * All documents that have completed translation will not be cancelled and will be charged. + * All pending documents will be cancelled if possible. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation-id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job status response along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelTranslationWithResponse(String id, RequestOptions requestOptions) { + return this.serviceClient.cancelTranslationWithResponseAsync(id, requestOptions); + } + + /** + * Returns the status for all documents in a batch document translation request + * + * Returns the status for all documents in a batch document translation request. + * + * If the number of documents in the response exceeds our paging limit, server-side paging is used. + * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a + * continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of document status held by the server based on the + * sorting method specified. By default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled documents. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return documents Status Response as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getDocumentsStatus(String id, RequestOptions requestOptions) { + return this.serviceClient.getDocumentsStatusAsync(id, requestOptions); + } + + /** + * Returns a list of supported document formats + * + * The list of supported document formats supported by the Document Translation service. + * The list includes the common file extension, as well as the content-type if using the upload API. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             format: String (Required)
      +     *             fileExtensions (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             contentTypes (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             defaultVersion: String (Optional)
      +     *             versions (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSupportedDocumentFormatsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getSupportedDocumentFormatsWithResponseAsync(requestOptions); + } + + /** + * Returns the list of supported glossary formats + * + * The list of supported glossary formats supported by the Document Translation service. + * The list includes the common file extension used. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             format: String (Required)
      +     *             fileExtensions (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             contentTypes (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             defaultVersion: String (Optional)
      +     *             versions (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSupportedGlossaryFormatsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getSupportedGlossaryFormatsWithResponseAsync(requestOptions); + } + + /** + * Returns a list of supported storage sources + * + * Returns a list of storage sources/options supported by the Document Translation service. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *         String(AzureBlob) (Required)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSupportedStorageSourcesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getSupportedStorageSourcesWithResponseAsync(requestOptions); + } +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClient.java b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClient.java new file mode 100644 index 000000000000..f00298ba4eaa --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClient.java @@ -0,0 +1,620 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.documenttranslator; + +import com.azure.ai.documenttranslator.implementation.DocumentTranslationsImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; + +/** + * Initializes a new instance of the synchronous BatchDocumentTranslationClient type. + */ +@ServiceClient(builder = BatchDocumentTranslationClientBuilder.class) +public final class BatchDocumentTranslationClient { + @Generated + private final DocumentTranslationsImpl serviceClient; + + /** + * Initializes an instance of BatchDocumentTranslationClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + BatchDocumentTranslationClient(DocumentTranslationsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Submit a document translation request to the Document Translation service + * + * Use this API to submit a bulk (batch) translation request to the Document Translation service. + * Each request can contain multiple documents and must contain a source and destination container for each + * document. + * + * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after + * the container name. + * + * Glossaries / Translation memory can be included in the request and are applied by the service when the document + * is translated. + * + * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. + * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each + * target language must be unique. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     inputs (Required): [
      +     *          (Required){
      +     *             source (Required): {
      +     *                 sourceUrl: String (Required)
      +     *                 filter (Optional): {
      +     *                     prefix: String (Optional)
      +     *                     suffix: String (Optional)
      +     *                 }
      +     *                 language: String (Optional)
      +     *                 storageSource: String(AzureBlob) (Optional)
      +     *             }
      +     *             targets (Required): [
      +     *                  (Required){
      +     *                     targetUrl: String (Required)
      +     *                     category: String (Optional)
      +     *                     language: String (Required)
      +     *                     glossaries (Optional): [
      +     *                          (Optional){
      +     *                             glossaryUrl: String (Required)
      +     *                             format: String (Required)
      +     *                             version: String (Optional)
      +     *                             storageSource: String(AzureBlob) (Optional)
      +     *                         }
      +     *                     ]
      +     *                     storageSource: String(AzureBlob) (Optional)
      +     *                 }
      +     *             ]
      +     *             storageType: String(Folder/File) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body request details. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginStartTranslation(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.beginStartTranslation(body, requestOptions); + } + + /** + * Returns a list of batch requests submitted and the status for each request + * + * Returns a list of batch requests submitted and the status for each request. + * This list only contains batch requests submitted by the user (based on the resource). + * + * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a + * partial result and include a continuation token in the response. + * The absence of a continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By + * default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled operations. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * The server honors the values specified by the client. However, clients must be prepared to handle responses that + * contain a different page size or contain a continuation token. + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job Status Response as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getTranslationsStatus(RequestOptions requestOptions) { + return this.serviceClient.getTranslationsStatus(requestOptions); + } + + /** + * Returns the status for a specific document + * + * Returns the translation status for a specific document based on the request Id and document Id. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The batch id. + * @param documentId Format - uuid. The document id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return document Status Response along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDocumentStatusWithResponse(String id, String documentId, + RequestOptions requestOptions) { + return this.serviceClient.getDocumentStatusWithResponse(id, documentId, requestOptions); + } + + /** + * Returns the status for a document translation request + * + * Returns the status for a document translation request. + * The status includes the overall request status, as well as the status for documents that are being translated as + * part of that request. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job status response along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTranslationStatusWithResponse(String id, RequestOptions requestOptions) { + return this.serviceClient.getTranslationStatusWithResponse(id, requestOptions); + } + + /** + * Cancel a currently processing or queued translation + * + * Cancel a currently processing or queued translation. + * Cancel a currently processing or queued translation. + * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be + * returned. + * All documents that have completed translation will not be cancelled and will be charged. + * All pending documents will be cancelled if possible. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation-id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job status response along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelTranslationWithResponse(String id, RequestOptions requestOptions) { + return this.serviceClient.cancelTranslationWithResponse(id, requestOptions); + } + + /** + * Returns the status for all documents in a batch document translation request + * + * Returns the status for all documents in a batch document translation request. + * + * If the number of documents in the response exceeds our paging limit, server-side paging is used. + * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a + * continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of document status held by the server based on the + * sorting method specified. By default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled documents. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return documents Status Response as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getDocumentsStatus(String id, RequestOptions requestOptions) { + return this.serviceClient.getDocumentsStatus(id, requestOptions); + } + + /** + * Returns a list of supported document formats + * + * The list of supported document formats supported by the Document Translation service. + * The list includes the common file extension, as well as the content-type if using the upload API. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             format: String (Required)
      +     *             fileExtensions (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             contentTypes (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             defaultVersion: String (Optional)
      +     *             versions (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSupportedDocumentFormatsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getSupportedDocumentFormatsWithResponse(requestOptions); + } + + /** + * Returns the list of supported glossary formats + * + * The list of supported glossary formats supported by the Document Translation service. + * The list includes the common file extension used. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             format: String (Required)
      +     *             fileExtensions (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             contentTypes (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             defaultVersion: String (Optional)
      +     *             versions (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSupportedGlossaryFormatsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getSupportedGlossaryFormatsWithResponse(requestOptions); + } + + /** + * Returns a list of supported storage sources + * + * Returns a list of storage sources/options supported by the Document Translation service. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *         String(AzureBlob) (Required)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSupportedStorageSourcesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getSupportedStorageSourcesWithResponse(requestOptions); + } +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClientBuilder.java b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClientBuilder.java new file mode 100644 index 000000000000..02bc38d18d06 --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClientBuilder.java @@ -0,0 +1,332 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.documenttranslator; + +import com.azure.ai.documenttranslator.implementation.BatchDocumentTranslationClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.KeyCredentialTrait; +import com.azure.core.credential.KeyCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.KeyCredentialPolicy; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the BatchDocumentTranslationClient type. + */ +@ServiceClientBuilder( + serviceClients = { BatchDocumentTranslationClient.class, BatchDocumentTranslationAsyncClient.class }) +public final class BatchDocumentTranslationClientBuilder implements HttpTrait, + ConfigurationTrait, + KeyCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-ai-documenttranslator.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the BatchDocumentTranslationClientBuilder. + */ + @Generated + public BatchDocumentTranslationClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public BatchDocumentTranslationClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public BatchDocumentTranslationClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public BatchDocumentTranslationClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public BatchDocumentTranslationClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public BatchDocumentTranslationClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public BatchDocumentTranslationClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public BatchDocumentTranslationClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The KeyCredential used for authentication. + */ + @Generated + private KeyCredential keyCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public BatchDocumentTranslationClientBuilder credential(KeyCredential keyCredential) { + this.keyCredential = keyCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public BatchDocumentTranslationClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private BatchDocumentTranslationServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the BatchDocumentTranslationClientBuilder. + */ + @Generated + public BatchDocumentTranslationClientBuilder serviceVersion(BatchDocumentTranslationServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the BatchDocumentTranslationClientBuilder. + */ + @Generated + public BatchDocumentTranslationClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of BatchDocumentTranslationClientImpl with the provided parameters. + * + * @return an instance of BatchDocumentTranslationClientImpl. + */ + @Generated + private BatchDocumentTranslationClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + BatchDocumentTranslationServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : BatchDocumentTranslationServiceVersion.getLatest(); + BatchDocumentTranslationClientImpl client = new BatchDocumentTranslationClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (keyCredential != null) { + policies.add(new KeyCredentialPolicy("Ocp-Apim-Subscription-Key", keyCredential)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of BatchDocumentTranslationAsyncClient class. + * + * @return an instance of BatchDocumentTranslationAsyncClient. + */ + @Generated + public BatchDocumentTranslationAsyncClient buildAsyncClient() { + return new BatchDocumentTranslationAsyncClient(buildInnerClient().getDocumentTranslations()); + } + + /** + * Builds an instance of BatchDocumentTranslationClient class. + * + * @return an instance of BatchDocumentTranslationClient. + */ + @Generated + public BatchDocumentTranslationClient buildClient() { + return new BatchDocumentTranslationClient(buildInnerClient().getDocumentTranslations()); + } + + private static final ClientLogger LOGGER = new ClientLogger(BatchDocumentTranslationClientBuilder.class); +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationServiceVersion.java b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationServiceVersion.java new file mode 100644 index 000000000000..d6347d20276a --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/BatchDocumentTranslationServiceVersion.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.documenttranslator; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of BatchDocumentTranslationClient. + */ +public enum BatchDocumentTranslationServiceVersion implements ServiceVersion { + /** + * Enum value v1.0. + */ + V1_0("v1.0"); + + private final String version; + + BatchDocumentTranslationServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link BatchDocumentTranslationServiceVersion}. + */ + public static BatchDocumentTranslationServiceVersion getLatest() { + return V1_0; + } +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/BatchDocumentTranslationClientImpl.java b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/BatchDocumentTranslationClientImpl.java new file mode 100644 index 000000000000..811553a0f22c --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/BatchDocumentTranslationClientImpl.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.documenttranslator.implementation; + +import com.azure.ai.documenttranslator.BatchDocumentTranslationServiceVersion; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; + +/** + * Initializes a new instance of the BatchDocumentTranslationClient type. + */ +public final class BatchDocumentTranslationClientImpl { + /** + * Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus.api.cognitive.microsoft.com). + */ + private final String endpoint; + + /** + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus.api.cognitive.microsoft.com). + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final BatchDocumentTranslationServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public BatchDocumentTranslationServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The DocumentTranslationsImpl object to access its operations. + */ + private final DocumentTranslationsImpl documentTranslations; + + /** + * Gets the DocumentTranslationsImpl object to access its operations. + * + * @return the DocumentTranslationsImpl object. + */ + public DocumentTranslationsImpl getDocumentTranslations() { + return this.documentTranslations; + } + + /** + * Initializes an instance of BatchDocumentTranslationClient client. + * + * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public BatchDocumentTranslationClientImpl(String endpoint, BatchDocumentTranslationServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of BatchDocumentTranslationClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public BatchDocumentTranslationClientImpl(HttpPipeline httpPipeline, String endpoint, + BatchDocumentTranslationServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of BatchDocumentTranslationClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: + * https://westus.api.cognitive.microsoft.com). + * @param serviceVersion Service version. + */ + public BatchDocumentTranslationClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + String endpoint, BatchDocumentTranslationServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.documentTranslations = new DocumentTranslationsImpl(this); + } +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/DocumentTranslationsImpl.java b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/DocumentTranslationsImpl.java new file mode 100644 index 000000000000..a2c1b26e0ef4 --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/DocumentTranslationsImpl.java @@ -0,0 +1,2364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.documenttranslator.implementation; + +import com.azure.ai.documenttranslator.BatchDocumentTranslationServiceVersion; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.DefaultPollingStrategy; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncDefaultPollingStrategy; +import com.azure.core.util.polling.SyncPoller; +import com.azure.core.util.serializer.TypeReference; +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DocumentTranslations. + */ +public final class DocumentTranslationsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final DocumentTranslationsService service; + + /** + * The service client containing this operation class. + */ + private final BatchDocumentTranslationClientImpl client; + + /** + * Initializes an instance of DocumentTranslationsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DocumentTranslationsImpl(BatchDocumentTranslationClientImpl client) { + this.service = RestProxy.create(DocumentTranslationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public BatchDocumentTranslationServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for BatchDocumentTranslationClientDocumentTranslations to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}/translator/text/batch/v1.0") + @ServiceInterface(name = "BatchDocumentTranslationClientDocumentTranslations") + public interface DocumentTranslationsService { + @Post("/batches") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> startTranslation(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") BinaryData body, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/batches") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response startTranslationSync(@HostParam("endpoint") String endpoint, + @BodyParam("application/json") BinaryData body, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/batches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getTranslationsStatus(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/batches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTranslationsStatusSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/batches/{id}/documents/{documentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDocumentStatus(@HostParam("endpoint") String endpoint, @PathParam("id") String id, + @PathParam("documentId") String documentId, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/batches/{id}/documents/{documentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDocumentStatusSync(@HostParam("endpoint") String endpoint, @PathParam("id") String id, + @PathParam("documentId") String documentId, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/batches/{id}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getTranslationStatus(@HostParam("endpoint") String endpoint, + @PathParam("id") String id, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("/batches/{id}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTranslationStatusSync(@HostParam("endpoint") String endpoint, + @PathParam("id") String id, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Delete("/batches/{id}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> cancelTranslation(@HostParam("endpoint") String endpoint, @PathParam("id") String id, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/batches/{id}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response cancelTranslationSync(@HostParam("endpoint") String endpoint, @PathParam("id") String id, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/batches/{id}/documents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDocumentsStatus(@HostParam("endpoint") String endpoint, + @PathParam("id") String id, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("/batches/{id}/documents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDocumentsStatusSync(@HostParam("endpoint") String endpoint, @PathParam("id") String id, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/documents/formats") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSupportedDocumentFormats(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/documents/formats") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSupportedDocumentFormatsSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/glossaries/formats") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSupportedGlossaryFormats(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/glossaries/formats") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSupportedGlossaryFormatsSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/storagesources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getSupportedStorageSources(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/storagesources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getSupportedStorageSourcesSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getTranslationsStatusNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTranslationsStatusNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getDocumentsStatusNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getDocumentsStatusNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * Submit a document translation request to the Document Translation service + * + * Use this API to submit a bulk (batch) translation request to the Document Translation service. + * Each request can contain multiple documents and must contain a source and destination container for each + * document. + * + * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after + * the container name. + * + * Glossaries / Translation memory can be included in the request and are applied by the service when the document + * is translated. + * + * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. + * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each + * target language must be unique. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     inputs (Required): [
      +     *          (Required){
      +     *             source (Required): {
      +     *                 sourceUrl: String (Required)
      +     *                 filter (Optional): {
      +     *                     prefix: String (Optional)
      +     *                     suffix: String (Optional)
      +     *                 }
      +     *                 language: String (Optional)
      +     *                 storageSource: String(AzureBlob) (Optional)
      +     *             }
      +     *             targets (Required): [
      +     *                  (Required){
      +     *                     targetUrl: String (Required)
      +     *                     category: String (Optional)
      +     *                     language: String (Required)
      +     *                     glossaries (Optional): [
      +     *                          (Optional){
      +     *                             glossaryUrl: String (Required)
      +     *                             format: String (Required)
      +     *                             version: String (Optional)
      +     *                             storageSource: String(AzureBlob) (Optional)
      +     *                         }
      +     *                     ]
      +     *                     storageSource: String(AzureBlob) (Optional)
      +     *                 }
      +     *             ]
      +     *             storageType: String(Folder/File) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body request details. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startTranslationWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.startTranslation(this.client.getEndpoint(), body, accept, requestOptions, context)); + } + + /** + * Submit a document translation request to the Document Translation service + * + * Use this API to submit a bulk (batch) translation request to the Document Translation service. + * Each request can contain multiple documents and must contain a source and destination container for each + * document. + * + * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after + * the container name. + * + * Glossaries / Translation memory can be included in the request and are applied by the service when the document + * is translated. + * + * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. + * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each + * target language must be unique. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     inputs (Required): [
      +     *          (Required){
      +     *             source (Required): {
      +     *                 sourceUrl: String (Required)
      +     *                 filter (Optional): {
      +     *                     prefix: String (Optional)
      +     *                     suffix: String (Optional)
      +     *                 }
      +     *                 language: String (Optional)
      +     *                 storageSource: String(AzureBlob) (Optional)
      +     *             }
      +     *             targets (Required): [
      +     *                  (Required){
      +     *                     targetUrl: String (Required)
      +     *                     category: String (Optional)
      +     *                     language: String (Required)
      +     *                     glossaries (Optional): [
      +     *                          (Optional){
      +     *                             glossaryUrl: String (Required)
      +     *                             format: String (Required)
      +     *                             version: String (Optional)
      +     *                             storageSource: String(AzureBlob) (Optional)
      +     *                         }
      +     *                     ]
      +     *                     storageSource: String(AzureBlob) (Optional)
      +     *                 }
      +     *             ]
      +     *             storageType: String(Folder/File) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body request details. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response startTranslationWithResponse(BinaryData body, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.startTranslationSync(this.client.getEndpoint(), body, accept, requestOptions, Context.NONE); + } + + /** + * Submit a document translation request to the Document Translation service + * + * Use this API to submit a bulk (batch) translation request to the Document Translation service. + * Each request can contain multiple documents and must contain a source and destination container for each + * document. + * + * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after + * the container name. + * + * Glossaries / Translation memory can be included in the request and are applied by the service when the document + * is translated. + * + * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. + * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each + * target language must be unique. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     inputs (Required): [
      +     *          (Required){
      +     *             source (Required): {
      +     *                 sourceUrl: String (Required)
      +     *                 filter (Optional): {
      +     *                     prefix: String (Optional)
      +     *                     suffix: String (Optional)
      +     *                 }
      +     *                 language: String (Optional)
      +     *                 storageSource: String(AzureBlob) (Optional)
      +     *             }
      +     *             targets (Required): [
      +     *                  (Required){
      +     *                     targetUrl: String (Required)
      +     *                     category: String (Optional)
      +     *                     language: String (Required)
      +     *                     glossaries (Optional): [
      +     *                          (Optional){
      +     *                             glossaryUrl: String (Required)
      +     *                             format: String (Required)
      +     *                             version: String (Optional)
      +     *                             storageSource: String(AzureBlob) (Optional)
      +     *                         }
      +     *                     ]
      +     *                     storageSource: String(AzureBlob) (Optional)
      +     *                 }
      +     *             ]
      +     *             storageType: String(Folder/File) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body request details. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginStartTranslationAsync(BinaryData body, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.startTranslationWithResponseAsync(body, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}/translator/text/batch/v1.0".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE)), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Submit a document translation request to the Document Translation service + * + * Use this API to submit a bulk (batch) translation request to the Document Translation service. + * Each request can contain multiple documents and must contain a source and destination container for each + * document. + * + * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after + * the container name. + * + * Glossaries / Translation memory can be included in the request and are applied by the service when the document + * is translated. + * + * If the glossary is invalid or unreachable during translation, an error is indicated in the document status. + * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each + * target language must be unique. + *

      Request Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     inputs (Required): [
      +     *          (Required){
      +     *             source (Required): {
      +     *                 sourceUrl: String (Required)
      +     *                 filter (Optional): {
      +     *                     prefix: String (Optional)
      +     *                     suffix: String (Optional)
      +     *                 }
      +     *                 language: String (Optional)
      +     *                 storageSource: String(AzureBlob) (Optional)
      +     *             }
      +     *             targets (Required): [
      +     *                  (Required){
      +     *                     targetUrl: String (Required)
      +     *                     category: String (Optional)
      +     *                     language: String (Required)
      +     *                     glossaries (Optional): [
      +     *                          (Optional){
      +     *                             glossaryUrl: String (Required)
      +     *                             format: String (Required)
      +     *                             version: String (Optional)
      +     *                             storageSource: String(AzureBlob) (Optional)
      +     *                         }
      +     *                     ]
      +     *                     storageSource: String(AzureBlob) (Optional)
      +     *                 }
      +     *             ]
      +     *             storageType: String(Folder/File) (Optional)
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param body request details. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginStartTranslation(BinaryData body, RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.startTranslationWithResponse(body, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.client.getHttpPipeline()) + .setEndpoint("{endpoint}/translator/text/batch/v1.0".replace("{endpoint}", this.client.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE)), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Returns a list of batch requests submitted and the status for each request + * + * Returns a list of batch requests submitted and the status for each request. + * This list only contains batch requests submitted by the user (based on the resource). + * + * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a + * partial result and include a continuation token in the response. + * The absence of a continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By + * default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled operations. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * The server honors the values specified by the client. However, clients must be prepared to handle responses that + * contain a different page size or contain a continuation token. + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job Status Response along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTranslationsStatusSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getTranslationsStatus(this.client.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "@nextLink"), null)); + } + + /** + * Returns a list of batch requests submitted and the status for each request + * + * Returns a list of batch requests submitted and the status for each request. + * This list only contains batch requests submitted by the user (based on the resource). + * + * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a + * partial result and include a continuation token in the response. + * The absence of a continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By + * default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled operations. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * The server honors the values specified by the client. However, clients must be prepared to handle responses that + * contain a different page size or contain a continuation token. + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job Status Response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getTranslationsStatusAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> getTranslationsStatusSinglePageAsync(requestOptions), + nextLink -> getTranslationsStatusNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Returns a list of batch requests submitted and the status for each request + * + * Returns a list of batch requests submitted and the status for each request. + * This list only contains batch requests submitted by the user (based on the resource). + * + * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a + * partial result and include a continuation token in the response. + * The absence of a continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By + * default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled operations. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * The server honors the values specified by the client. However, clients must be prepared to handle responses that + * contain a different page size or contain a continuation token. + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job Status Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getTranslationsStatusSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.getTranslationsStatusSync(this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "@nextLink"), null); + } + + /** + * Returns a list of batch requests submitted and the status for each request + * + * Returns a list of batch requests submitted and the status for each request. + * This list only contains batch requests submitted by the user (based on the resource). + * + * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a + * partial result and include a continuation token in the response. + * The absence of a continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By + * default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled operations. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * The server honors the values specified by the client. However, clients must be prepared to handle responses that + * contain a different page size or contain a continuation token. + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job Status Response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getTranslationsStatus(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> getTranslationsStatusSinglePage(requestOptions), + nextLink -> getTranslationsStatusNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Returns the status for a specific document + * + * Returns the translation status for a specific document based on the request Id and document Id. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The batch id. + * @param documentId Format - uuid. The document id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return document Status Response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getDocumentStatusWithResponseAsync(String id, String documentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getDocumentStatus(this.client.getEndpoint(), id, documentId, + accept, requestOptions, context)); + } + + /** + * Returns the status for a specific document + * + * Returns the translation status for a specific document based on the request Id and document Id. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The batch id. + * @param documentId Format - uuid. The document id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return document Status Response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDocumentStatusWithResponse(String id, String documentId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getDocumentStatusSync(this.client.getEndpoint(), id, documentId, accept, requestOptions, + Context.NONE); + } + + /** + * Returns the status for a document translation request + * + * Returns the status for a document translation request. + * The status includes the overall request status, as well as the status for documents that are being translated as + * part of that request. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job status response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTranslationStatusWithResponseAsync(String id, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.getTranslationStatus(this.client.getEndpoint(), id, accept, requestOptions, context)); + } + + /** + * Returns the status for a document translation request + * + * Returns the status for a document translation request. + * The status includes the overall request status, as well as the status for documents that are being translated as + * part of that request. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job status response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTranslationStatusWithResponse(String id, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getTranslationStatusSync(this.client.getEndpoint(), id, accept, requestOptions, Context.NONE); + } + + /** + * Cancel a currently processing or queued translation + * + * Cancel a currently processing or queued translation. + * Cancel a currently processing or queued translation. + * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be + * returned. + * All documents that have completed translation will not be cancelled and will be charged. + * All pending documents will be cancelled if possible. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation-id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job status response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> cancelTranslationWithResponseAsync(String id, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.cancelTranslation(this.client.getEndpoint(), id, accept, requestOptions, context)); + } + + /** + * Cancel a currently processing or queued translation + * + * Cancel a currently processing or queued translation. + * Cancel a currently processing or queued translation. + * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be + * returned. + * All documents that have completed translation will not be cancelled and will be charged. + * All pending documents will be cancelled if possible. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation-id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job status response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelTranslationWithResponse(String id, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.cancelTranslationSync(this.client.getEndpoint(), id, accept, requestOptions, Context.NONE); + } + + /** + * Returns the status for all documents in a batch document translation request + * + * Returns the status for all documents in a batch document translation request. + * + * If the number of documents in the response exceeds our paging limit, server-side paging is used. + * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a + * continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of document status held by the server based on the + * sorting method specified. By default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled documents. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return documents Status Response along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDocumentsStatusSinglePageAsync(String id, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getDocumentsStatus(this.client.getEndpoint(), id, accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "@nextLink"), null)); + } + + /** + * Returns the status for all documents in a batch document translation request + * + * Returns the status for all documents in a batch document translation request. + * + * If the number of documents in the response exceeds our paging limit, server-side paging is used. + * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a + * continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of document status held by the server based on the + * sorting method specified. By default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled documents. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return documents Status Response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getDocumentsStatusAsync(String id, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> getDocumentsStatusSinglePageAsync(id, requestOptions), + nextLink -> getDocumentsStatusNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Returns the status for all documents in a batch document translation request + * + * Returns the status for all documents in a batch document translation request. + * + * If the number of documents in the response exceeds our paging limit, server-side paging is used. + * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a + * continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of document status held by the server based on the + * sorting method specified. By default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled documents. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return documents Status Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getDocumentsStatusSinglePage(String id, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.getDocumentsStatusSync(this.client.getEndpoint(), id, accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "@nextLink"), null); + } + + /** + * Returns the status for all documents in a batch document translation request + * + * Returns the status for all documents in a batch document translation request. + * + * If the number of documents in the response exceeds our paging limit, server-side paging is used. + * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a + * continuation token means that no additional pages are available. + * + * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset + * for the collection. + * + * $top indicates the total number of records the user wants to be returned across all pages. + * $skip indicates the number of records to skip from the list of document status held by the server based on the + * sorting method specified. By default, we sort by descending start time. + * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not + * specified and there are more items to be returned), @nextLink will contain the link to the next page. + * + * $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or + * "$orderBy=createdDateTimeUtc desc"). + * The default sorting is descending by createdDateTimeUtc. + * Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return + * succeeded and cancelled documents. + * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of + * datetime to filter the returned list by. + * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd). + * + * When both $top and $skip are included, the server should first apply $skip and then $top on the collection. + * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about + * it instead of just ignoring the query options. + * This reduces the risk of the client making assumptions about the data returned. + *

      Query Parameters

      + * + * + * + * + * + * + * + * + * + * + * + *
      Query Parameters
      NameTypeRequiredDescription
      $topIntegerNo$top indicates the total number of records the user wants to be + * returned across all pages. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $skipIntegerNo$skip indicates the number of records to skip from the list of + * records held by the server based on the sorting method specified. By default, we sort by descending start time. + * + * Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the + * collection. + * When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the + * collection. + * + * Note: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about + * it instead of just ignoring the query options.
      $maxpagesizeIntegerNo$maxpagesize is the maximum items returned in a page. If + * more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink + * will contain the link to the next page. + * + * Clients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The + * server SHOULD honor this preference if the specified page size is smaller than the server's default page + * size.
      idsList<String>NoIds to use in filtering. In the form of "," separated + * string.
      statusesList<String>NoStatuses to use in filtering. In the form of "," + * separated string.
      createdDateTimeUtcStartOffsetDateTimeNothe start datetime to get items + * after
      createdDateTimeUtcEndOffsetDateTimeNothe end datetime to get items + * before
      $orderByList<String>Nothe sorting query for the collection (ex: + * 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc'). In the form of "," separated string.
      + * You can add these to a request with {@link RequestOptions#addQueryParam} + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param id Format - uuid. The operation id. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return documents Status Response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getDocumentsStatus(String id, RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> getDocumentsStatusSinglePage(id, requestOptions), + nextLink -> getDocumentsStatusNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Returns a list of supported document formats + * + * The list of supported document formats supported by the Document Translation service. + * The list includes the common file extension, as well as the content-type if using the upload API. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             format: String (Required)
      +     *             fileExtensions (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             contentTypes (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             defaultVersion: String (Optional)
      +     *             versions (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSupportedDocumentFormatsWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.getSupportedDocumentFormats(this.client.getEndpoint(), accept, requestOptions, context)); + } + + /** + * Returns a list of supported document formats + * + * The list of supported document formats supported by the Document Translation service. + * The list includes the common file extension, as well as the content-type if using the upload API. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             format: String (Required)
      +     *             fileExtensions (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             contentTypes (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             defaultVersion: String (Optional)
      +     *             versions (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSupportedDocumentFormatsWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSupportedDocumentFormatsSync(this.client.getEndpoint(), accept, requestOptions, Context.NONE); + } + + /** + * Returns the list of supported glossary formats + * + * The list of supported glossary formats supported by the Document Translation service. + * The list includes the common file extension used. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             format: String (Required)
      +     *             fileExtensions (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             contentTypes (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             defaultVersion: String (Optional)
      +     *             versions (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSupportedGlossaryFormatsWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.getSupportedGlossaryFormats(this.client.getEndpoint(), accept, requestOptions, context)); + } + + /** + * Returns the list of supported glossary formats + * + * The list of supported glossary formats supported by the Document Translation service. + * The list includes the common file extension used. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *          (Required){
      +     *             format: String (Required)
      +     *             fileExtensions (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             contentTypes (Required): [
      +     *                 String (Required)
      +     *             ]
      +     *             defaultVersion: String (Optional)
      +     *             versions (Optional): [
      +     *                 String (Optional)
      +     *             ]
      +     *         }
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSupportedGlossaryFormatsWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSupportedGlossaryFormatsSync(this.client.getEndpoint(), accept, requestOptions, Context.NONE); + } + + /** + * Returns a list of supported storage sources + * + * Returns a list of storage sources/options supported by the Document Translation service. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *         String(AzureBlob) (Required)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSupportedStorageSourcesWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.getSupportedStorageSources(this.client.getEndpoint(), accept, requestOptions, context)); + } + + /** + * Returns a list of supported storage sources + * + * Returns a list of storage sources/options supported by the Document Translation service. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     value (Required): [
      +     *         String(AzureBlob) (Required)
      +     *     ]
      +     * }
      +     * }
      +     * 
      + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return base type for List return in our api along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSupportedStorageSourcesWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getSupportedStorageSourcesSync(this.client.getEndpoint(), accept, requestOptions, Context.NONE); + } + + /** + * Returns a list of batch requests submitted and the status for each request + * + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job Status Response along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTranslationsStatusNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getTranslationsStatusNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "@nextLink"), null)); + } + + /** + * Returns a list of batch requests submitted and the status for each request + * + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     id: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     summary (Required): {
      +     *         total: int (Required)
      +     *         failed: int (Required)
      +     *         success: int (Required)
      +     *         inProgress: int (Required)
      +     *         notYetStarted: int (Required)
      +     *         cancelled: int (Required)
      +     *         totalCharacterCharged: long (Required)
      +     *     }
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return translation job Status Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getTranslationsStatusNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.getTranslationsStatusNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "@nextLink"), null); + } + + /** + * Returns the status for all documents in a batch document translation request + * + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return documents Status Response along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDocumentsStatusNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDocumentsStatusNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "@nextLink"), null)); + } + + /** + * Returns the status for all documents in a batch document translation request + * + * Get the next page of items. + *

      Response Body Schema

      + * + *
      +     * {@code
      +     * {
      +     *     path: String (Optional)
      +     *     sourcePath: String (Required)
      +     *     createdDateTimeUtc: OffsetDateTime (Required)
      +     *     lastActionDateTimeUtc: OffsetDateTime (Required)
      +     *     status: String(NotStarted/Running/Succeeded/Failed/Cancelled/Cancelling/ValidationFailed) (Required)
      +     *     to: String (Required)
      +     *     error (Optional): {
      +     *         code: String(InvalidRequest/InvalidArgument/InternalServerError/ServiceUnavailable/ResourceNotFound/Unauthorized/RequestRateTooHigh) (Required)
      +     *         message: String (Required)
      +     *         target: String (Optional)
      +     *         innerError (Optional): {
      +     *             code: String (Required)
      +     *             message: String (Required)
      +     *             target: String (Optional)
      +     *             innerError (Optional): (recursive schema, see innerError above)
      +     *         }
      +     *     }
      +     *     progress: float (Required)
      +     *     id: String (Required)
      +     *     characterCharged: Long (Optional)
      +     * }
      +     * }
      +     * 
      + * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return documents Status Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getDocumentsStatusNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.getDocumentsStatusNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "@nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/package-info.java b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/package-info.java new file mode 100644 index 000000000000..3d46c2ae0b8f --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for BatchDocumentTranslationClient. + * null. + */ +package com.azure.ai.documenttranslator.implementation; diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/package-info.java b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/package-info.java new file mode 100644 index 000000000000..30ad3812528a --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/java/com/azure/ai/documenttranslator/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for BatchDocumentTranslationClient. + * null. + */ +package com.azure.ai.documenttranslator; diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/java/module-info.java b/sdk/translation/azure-ai-documenttranslator/src/main/java/module-info.java new file mode 100644 index 000000000000..1767f70e13d1 --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/java/module-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.ai.documenttranslator { + requires transitive com.azure.core; + + exports com.azure.ai.documenttranslator; +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/main/resources/azure-ai-documenttranslator.properties b/sdk/translation/azure-ai-documenttranslator/src/main/resources/azure-ai-documenttranslator.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/main/resources/azure-ai-documenttranslator.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/translation/azure-ai-documenttranslator/src/samples/README.md b/sdk/translation/azure-ai-documenttranslator/src/samples/README.md new file mode 100644 index 000000000000..b7dde6705b1d --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/samples/README.md @@ -0,0 +1,54 @@ +--- +page_type: sample +languages: + - java +products: + - azure + - azure-cognitive-services + - azure-translator +urlFragment: documenttranslator-java-samples +--- + +# Azure Document Translator client library samples for Java + +Azure Document Translator samples are a set of self-contained Java programs that demonstrate interacting with Azure self-contained service using the client library. Each sample focuses on a specific scenario and can be executed independently. + +## Key concepts + +Key concepts are explained in detail [here][SDK_README_KEY_CONCEPTS]. + +## Getting started + +Getting started explained in detail [here][SDK_README_GETTING_STARTED]. + +## Examples + +The following sections provide code samples covering common scenario operations with the Azure Document Translator client library. + +All of these samples need the endpoint to your Document Translator resource, and your Document Translator API key. + +|**File Name**|**Description**| +|----------------|-------------| +|[TranslateDocuments.java][translate_documents]|Translate documents in batch| + +## Troubleshooting + +Troubleshooting steps can be found [here][SDK_README_TROUBLESHOOTING]. + +## Next steps + +See [Next steps][SDK_README_NEXT_STEPS]. + +## Contributing + +If you would like to become an active contributor to this project please refer to our [Contribution +Guidelines][SDK_README_CONTRIBUTING] for more information. + + + + + + + + + diff --git a/sdk/translation/azure-ai-documenttranslator/src/samples/java/com/azure/ai/documenttranslator/ReadmeSamples.java b/sdk/translation/azure-ai-documenttranslator/src/samples/java/com/azure/ai/documenttranslator/ReadmeSamples.java new file mode 100644 index 000000000000..ed34a50a8fdf --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/samples/java/com/azure/ai/documenttranslator/ReadmeSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.documenttranslator; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; + +/** + * Code samples for the README.md + */ +public class ReadmeSamples { + /** + * Sample for creating low level client. + */ + public void createClient() { + // BEGIN: readme-sample-createBatchDocumentTranslationRestClient + String endpoint = String.format("https://%s.cognitiveservices.azure.com/translator/text/batch/v1.0-preview.1", + ""); + String apiKey = ""; + + BatchDocumentTranslationClient client = new BatchDocumentTranslationClientBuilder() + .credential(new AzureKeyCredential(apiKey)) + .endpoint(endpoint) + .httpClient(new NettyAsyncHttpClientBuilder().build()) + .buildClient(); + // END: readme-sample-createBatchDocumentTranslationRestClient + } +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/samples/java/com/azure/ai/documenttranslator/TranslateDocuments.java b/sdk/translation/azure-ai-documenttranslator/src/samples/java/com/azure/ai/documenttranslator/TranslateDocuments.java new file mode 100644 index 000000000000..9fe35e573e9e --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/samples/java/com/azure/ai/documenttranslator/TranslateDocuments.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.documenttranslator; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.http.netty.NettyAsyncHttpClientBuilder; +import com.azure.core.util.BinaryData; +import com.azure.core.util.polling.SyncPoller; +import com.azure.json.models.JsonArray; +import com.azure.json.models.JsonObject; +import com.azure.json.models.JsonString; + +/** + * Sample for translating documents using the document translator client. + */ +public class TranslateDocuments { + /** + * Main method to invoke this demo. + * + * @param args Unused arguments to the program. + */ + public static void main(final String[] args) { + // Step 0: create a client + BatchDocumentTranslationClient client = new BatchDocumentTranslationClientBuilder() + .credential(new AzureKeyCredential(System.getenv("API_KEY"))) + .endpoint(System.getenv("API_ENDPOINT")) + .httpClient(new NettyAsyncHttpClientBuilder().build()) + .buildClient(); + + // Step 1: Construct the request object + JsonObject source = new JsonObject().setProperty("sourceUrl", new JsonString("SOURCE_URL")); + + JsonObject target = new JsonObject() + .setProperty("language", new JsonString("zh-Hans")) + .setProperty("targetUrl", new JsonString("TARGET_URL")); + + JsonObject input = new JsonObject() + .setProperty("source", source) + .setProperty("targets", new JsonArray().addElement(target)); + + JsonObject requestBody = new JsonObject().setProperty("inputs", new JsonArray().addElement(input)); + + // Step 2: Send the request + SyncPoller poller = client.beginStartTranslation(BinaryData.fromObject(requestBody), + null); + + System.out.println("Translation request submitted..."); + + // Step 3: Poll until translation is completed + poller.waitForCompletion(); + } +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/test/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClientTestBase.java b/sdk/translation/azure-ai-documenttranslator/src/test/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClientTestBase.java new file mode 100644 index 000000000000..b3c734f37d3a --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/test/java/com/azure/ai/documenttranslator/BatchDocumentTranslationClientTestBase.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.documenttranslator; + +import com.azure.core.credential.AzureKeyCredential; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.util.Configuration; + +public class BatchDocumentTranslationClientTestBase extends TestProxyTestBase { + + BatchDocumentTranslationClient getClient() { + BatchDocumentTranslationClientBuilder builder + = new BatchDocumentTranslationClientBuilder().endpoint(getEndpoint()) + .credential(new AzureKeyCredential(getKey())); + + if (interceptorManager.isPlaybackMode()) { + builder.httpClient(interceptorManager.getPlaybackClient()); + } else if (interceptorManager.isRecordMode()) { + builder.addPolicy(interceptorManager.getRecordPolicy()); + } + + return builder.buildClient(); + } + + private String getKey() { + return interceptorManager.isPlaybackMode() + ? "fakeKeyPlaceholder" + : Configuration.getGlobalConfiguration().get("DOCUMENT_TRANSLATION_API_KEY"); + } + + String getEndpoint() { + return interceptorManager.isPlaybackMode() + ? "https://localhost:8080" + : Configuration.getGlobalConfiguration().get("DOCUMENT_TRANSLATION_ENDPOINT"); + } +} diff --git a/sdk/translation/azure-ai-documenttranslator/src/test/java/com/azure/ai/documenttranslator/BatchDocumentTranslationRestClientTests.java b/sdk/translation/azure-ai-documenttranslator/src/test/java/com/azure/ai/documenttranslator/BatchDocumentTranslationRestClientTests.java new file mode 100644 index 000000000000..86ffe2911fdd --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/src/test/java/com/azure/ai/documenttranslator/BatchDocumentTranslationRestClientTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.documenttranslator; + +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import com.azure.json.models.JsonArray; +import com.azure.json.models.JsonElement; +import com.azure.json.models.JsonObject; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class BatchDocumentTranslationRestClientTests extends BatchDocumentTranslationClientTestBase { + @Test + public void testGetSupportedDocumentFormats() throws IOException { + BatchDocumentTranslationClient client = getClient(); + String response = client.getSupportedDocumentFormatsWithResponse(null).getValue().toString(); + + assertNotNull(response); + + try (JsonReader jsonReader = JsonProviders.createReader(response)) { + JsonObject jsonObject = JsonObject.fromJson(jsonReader); + + JsonElement jsonElement = jsonObject.getProperty("value"); + assertNotNull(jsonElement); + assertTrue(jsonElement.isArray(), "Expected value to be an array"); + assertTrue(((JsonArray) jsonElement).size() > 0, "Expected value to have at least one element"); + } + } + + @Test + public void testGetSupportedGlossaryFormats() throws IOException { + BatchDocumentTranslationClient client = getClient(); + String response = client.getSupportedGlossaryFormatsWithResponse(null).getValue().toString(); + + assertNotNull(response); + + try (JsonReader jsonReader = JsonProviders.createReader(response)) { + JsonObject jsonObject = JsonObject.fromJson(jsonReader); + + JsonElement jsonElement = jsonObject.getProperty("value"); + assertNotNull(jsonElement); + assertTrue(jsonElement.isArray(), "Expected value to be an array"); + assertTrue(((JsonArray) jsonElement).size() > 0, "Expected value to have at least one element"); + } + } +} diff --git a/sdk/translation/azure-ai-documenttranslator/swagger/README.md b/sdk/translation/azure-ai-documenttranslator/swagger/README.md new file mode 100644 index 000000000000..b3ecad9292d5 --- /dev/null +++ b/sdk/translation/azure-ai-documenttranslator/swagger/README.md @@ -0,0 +1,13 @@ +## Generate autorest code +``` yaml +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cognitiveservices/data-plane/TranslatorText/stable/v1.0/TranslatorBatch.json +use: '@autorest/java@4.1.62' +java: true +output-folder: ../ +namespace: com.azure.ai.documenttranslator +generate-client-interfaces: false +sync-methods: all +license-header: MICROSOFT_MIT_SMALL +data-plane: true +credential-types: AzureKey +``` diff --git a/sdk/translation/ci.yml b/sdk/translation/ci.yml index 856921028651..704a076742eb 100644 --- a/sdk/translation/ci.yml +++ b/sdk/translation/ci.yml @@ -10,6 +10,7 @@ trigger: - sdk/translation/ exclude: - sdk/translation/pom.xml + - sdk/translation/azure-ai-documenttranslator/pom.xml - sdk/translation/azure-ai-translation-text/pom.xml - sdk/translation/azure-ai-translation-document/pom.xml @@ -25,10 +26,15 @@ pr: - sdk/translation/ exclude: - sdk/translation/pom.xml + - sdk/translation/azure-ai-documenttranslator/pom.xml - sdk/translation/azure-ai-translation-text/pom.xml - sdk/translation/azure-ai-translation-document/pom.xml parameters: + - name: release_azureaidocumenttranslator + displayName: 'azure-ai-documenttranslator' + type: boolean + default: false - name: release_azureaitranslationtext displayName: 'azure-ai-translation-text' type: boolean @@ -43,6 +49,10 @@ extends: parameters: ServiceDirectory: translation Artifacts: + - name: azure-ai-documenttranslator + groupId: com.azure + safeName: azureaidocumenttranslator + releaseInBatch: ${{ parameters.release_azureaidocumenttranslator }} - name: azure-ai-translation-text groupId: com.azure safeName: azureaitranslationtext diff --git a/sdk/translation/pom.xml b/sdk/translation/pom.xml index 2c57e5e6aba5..36bb16e02fcf 100644 --- a/sdk/translation/pom.xml +++ b/sdk/translation/pom.xml @@ -9,6 +9,7 @@ pom 1.0.0 + azure-ai-documenttranslator azure-ai-translation-document azure-ai-translation-text diff --git a/sdk/voicelive/azure-ai-voicelive/pom.xml b/sdk/voicelive/azure-ai-voicelive/pom.xml index 4e816b571c22..2957a0dac503 100644 --- a/sdk/voicelive/azure-ai-voicelive/pom.xml +++ b/sdk/voicelive/azure-ai-voicelive/pom.xml @@ -84,7 +84,7 @@ Code generated by Microsoft (R) TypeSpec Code Generator. io.projectreactor reactor-test - 3.8.7 + 3.7.19 test diff --git a/sdk/webpubsub/azure-messaging-webpubsub-chat/pom.xml b/sdk/webpubsub/azure-messaging-webpubsub-chat/pom.xml index 884bafaebba3..f95a74d16a94 100644 --- a/sdk/webpubsub/azure-messaging-webpubsub-chat/pom.xml +++ b/sdk/webpubsub/azure-messaging-webpubsub-chat/pom.xml @@ -48,12 +48,12 @@ com.azure azure-core - 1.61.0-beta.1 + 1.60.0 com.azure azure-core-http-netty - 1.17.0-beta.1 + 1.16.8 com.nimbusds @@ -63,7 +63,7 @@ com.azure azure-core-test - 1.27.0-beta.20 + 1.27.0-beta.19 test @@ -75,7 +75,7 @@ io.projectreactor.netty reactor-netty-http - 1.3.7 + 1.2.18 test
      @@ -90,7 +90,7 @@ com.nimbusds:nimbus-jose-jwt:[9.37.3] - io.projectreactor.netty:reactor-netty-http:[1.3.7] + io.projectreactor.netty:reactor-netty-http:[1.2.18] diff --git a/sdk/webpubsub/azure-messaging-webpubsub-client/CHANGELOG.md b/sdk/webpubsub/azure-messaging-webpubsub-client/CHANGELOG.md index cdb638dfd811..5f0708972dc2 100644 --- a/sdk/webpubsub/azure-messaging-webpubsub-client/CHANGELOG.md +++ b/sdk/webpubsub/azure-messaging-webpubsub-client/CHANGELOG.md @@ -14,7 +14,7 @@ #### Dependency Updates -- Migrated `netty-codec-http` to `4.2.19.Final` and updated WebSocket event loops for Netty 4.2. +- Upgraded `netty-codec-http` from `4.1.137.Final` to version `4.1.138.Final`. ## 1.1.11 (2026-10-06) diff --git a/sdk/webpubsub/azure-messaging-webpubsub-client/pom.xml b/sdk/webpubsub/azure-messaging-webpubsub-client/pom.xml index d4235659fa57..b5c069ce771a 100644 --- a/sdk/webpubsub/azure-messaging-webpubsub-client/pom.xml +++ b/sdk/webpubsub/azure-messaging-webpubsub-client/pom.xml @@ -48,27 +48,21 @@ com.azure azure-core - 1.61.0-beta.1 + 1.60.0 io.netty netty-codec-http - 4.2.19.Final + 4.1.138.Final com.azure azure-core-test - 1.27.0-beta.20 - test - - - com.azure - azure-core-http-netty - 1.17.0-beta.1 + 1.27.0-beta.19 test @@ -107,7 +101,7 @@ - io.netty:netty-codec-http:[4.2.19.Final] + io.netty:netty-codec-http:[4.1.138.Final] diff --git a/sdk/webpubsub/azure-messaging-webpubsub-client/src/main/java/com/azure/messaging/webpubsub/client/implementation/websocket/WebSocketSessionNettyImpl.java b/sdk/webpubsub/azure-messaging-webpubsub-client/src/main/java/com/azure/messaging/webpubsub/client/implementation/websocket/WebSocketSessionNettyImpl.java index 9f46a915ee10..8229e60f16cf 100644 --- a/sdk/webpubsub/azure-messaging-webpubsub-client/src/main/java/com/azure/messaging/webpubsub/client/implementation/websocket/WebSocketSessionNettyImpl.java +++ b/sdk/webpubsub/azure-messaging-webpubsub-client/src/main/java/com/azure/messaging/webpubsub/client/implementation/websocket/WebSocketSessionNettyImpl.java @@ -10,15 +10,11 @@ import com.azure.messaging.webpubsub.client.implementation.models.WebPubSubMessage; import com.azure.messaging.webpubsub.client.models.ConnectFailedException; import io.netty.bootstrap.Bootstrap; -import io.netty.buffer.ByteBufAllocator; -import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.Channel; import io.netty.channel.ChannelInitializer; -import io.netty.channel.ChannelOption; import io.netty.channel.ChannelPipeline; import io.netty.channel.EventLoopGroup; -import io.netty.channel.MultiThreadIoEventLoopGroup; -import io.netty.channel.nio.NioIoHandler; +import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.codec.http.DefaultHttpHeaders; @@ -33,7 +29,6 @@ import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketClientCompressionHandler; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; -import io.netty.util.internal.SystemPropertyUtil; import javax.net.ssl.SSLException; import java.net.URI; @@ -80,7 +75,7 @@ protected void initChannel(SocketChannel ch) { p.addLast(sslCtx.newHandler(ch.alloc(), host, port)); } - p.addLast(new HttpClientCodec(), new HttpObjectAggregator(8192), new WebSocketClientCompressionHandler(0), + p.addLast(new HttpClientCodec(), new HttpObjectAggregator(8192), WebSocketClientCompressionHandler.INSTANCE, handler); } } @@ -128,7 +123,7 @@ void connect() throws URISyntaxException, SSLException, InterruptedException, Ex sslCtx = null; } - group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()); + group = new NioEventLoopGroup(); handshaker = WebSocketClientHandshakerFactory.newHandshaker(uri, WebSocketVersion.V13, protocol, true, new DefaultHttpHeaders().add(HttpHeaderName.USER_AGENT.getCaseInsensitiveName(), userAgent)); @@ -138,13 +133,6 @@ void connect() throws URISyntaxException, SSLException, InterruptedException, Ex Bootstrap b = new Bootstrap(); b.group(group) .channel(NioSocketChannel.class) - .option(ChannelOption.ALLOCATOR, - // If io.netty.allocator.type was configured, respect the configuration. Otherwise, fallback to the - // default setting from Netty 4.1 which was the pooled allocator. In the future, this should be - // validated for if this should use the new Netty 4.2 default which is an adaptive allocator. - SystemPropertyUtil.contains("io.netty.allocator.type") - ? ByteBufAllocator.DEFAULT - : PooledByteBufAllocator.DEFAULT) .handler(new WebSocketChannelHandler(host, port, sslCtx, clientHandler)); final CompletableFuture handshakeCallbackFuture = new CompletableFuture<>(); diff --git a/sdk/webpubsub/azure-messaging-webpubsub-client/src/main/java/module-info.java b/sdk/webpubsub/azure-messaging-webpubsub-client/src/main/java/module-info.java index 478c4b9eb9a9..b701da2f86b2 100644 --- a/sdk/webpubsub/azure-messaging-webpubsub-client/src/main/java/module-info.java +++ b/sdk/webpubsub/azure-messaging-webpubsub-client/src/main/java/module-info.java @@ -9,7 +9,6 @@ requires io.netty.transport; requires io.netty.handler; requires io.netty.codec; - requires io.netty.codec.compression; requires io.netty.codec.http; exports com.azure.messaging.webpubsub.client;